diff --git a/.gitignore b/.gitignore index 2202eef..fa8fabc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ debug.log -node_modules \ No newline at end of file +node_modules +.DS_Store \ No newline at end of file diff --git a/.wordpress-org/banner-1544x500.png b/.wordpress-org/banner-1544x500.png index 5093584..5245c52 100644 Binary files a/.wordpress-org/banner-1544x500.png and b/.wordpress-org/banner-1544x500.png differ diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png index b919bc6..ef8840b 100644 Binary files a/.wordpress-org/banner-772x250.png and b/.wordpress-org/banner-772x250.png differ diff --git a/app/Constants.php b/app/Constants.php index 83d9df2..2b11584 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -47,7 +47,7 @@ public static function getLangParams(): object "waitingBlockConfirmations" => esc_html__('Waiting for block confirmations:', 'cryptopay'), "waitingTransactionConfirmations" => esc_html__('Waiting for transaction confirmation...', 'cryptopay'), "openInExplorer" => esc_html__('Open in explorer', 'cryptopay'), - "waitingConfirmation" => esc_html__('Waiting confirmation...', 'cryptopay'), + "waitingConfirmation" => esc_html__('Waiting for confirmation...', 'cryptopay'), "selectWallet" => esc_html__('Select wallet', 'cryptopay'), "selectPaymentMethod" => esc_html__('Select payment method', 'cryptopay'), "pleaseTryToConnectAgain" => esc_html__('Please try to connect again by selecting network {networkName} from your wallet!', 'cryptopay'), @@ -58,7 +58,7 @@ public static function getLangParams(): object "payNow" => esc_html__('Pay now', 'cryptopay'), "payWith" => esc_html__('Pay with {name}', 'cryptopay'), "loading" => esc_html__('Loading...', 'cryptopay'), - "waitingApproval" => esc_html__('Waiting approval...', 'cryptopay'), + "waitingApproval" => esc_html__('Waiting for approval...', 'cryptopay'), "paymentRejected" => esc_html__('Payment rejected!', 'cryptopay'), "transferAmountError" => esc_html__('Transfer amount need to be bigger from zero!', 'cryptopay'), "transactionCreateFail" => esc_html__('Transaction create fail! Please try again.', 'cryptopay'), @@ -125,6 +125,7 @@ public static function getLangParams(): object "redirecting" => esc_html__('Redirecting...', 'cryptopay'), "connecting" => esc_html__('Connecting...', 'cryptopay'), "cannotPaySameAddress" => esc_html__('The payment cannot proceed because the payer and receiver address are the same! Please pay with a different wallet!', 'cryptopay'), + "reownProjectIdRequired" => esc_html__('Reown Project ID is required! Please contact the site administrator.', 'cryptopay'), ]); } diff --git a/app/Pages/TransactionPage.php b/app/Pages/TransactionPage.php index 2274904..6deeaec 100644 --- a/app/Pages/TransactionPage.php +++ b/app/Pages/TransactionPage.php @@ -251,14 +251,14 @@ public function page(): void ] ]); }) - ->createDataList(function () use ($params) { + ->createDataList(function ($entry, $orderQuery, $perPage, $offset) use ($params) { if (isset($_GET['s']) && !empty($_GET['s'])) { $s = isset($_GET['s']) ? sanitize_text_field($_GET['s']) : null; $result = (object) $this->model->search($s, $params); return [$result->transactions->toArray(false), $result->count]; } else { - $transactions = $this->model->findBy($params, ['id', 'DESC']); - return [$transactions->toArray(false), $transactions->count()]; + $transactions = $this->model->findBy($params, $orderQuery, $perPage, $offset); + return [$transactions->toArray(false), $this->model->getCount($params)]; } }); diff --git a/app/PluginHero/BaseAPI.php b/app/PluginHero/BaseAPI.php index 203a1e9..7181d77 100644 --- a/app/PluginHero/BaseAPI.php +++ b/app/PluginHero/BaseAPI.php @@ -21,12 +21,19 @@ abstract class BaseAPI */ private array $middlewares = []; + /** + * @var int + */ + protected int $currentUserId; + /** * @param array> $routeList * @return void */ public function addRoutes(array $routeList): void { + add_action('init', [$this, 'init']); + if (empty($routeList)) { return; } @@ -66,6 +73,14 @@ public function addRoutes(array $routeList): void Helpers::addAPI($this); } + /** + * @return void + */ + public function init(): void + { + $this->currentUserId = get_current_user_id(); + } + /** * @param string $nameSpace * @param array|\Closure $caller @@ -110,9 +125,9 @@ public function middlewareFilter(mixed $result, \WP_REST_Server $server, \WP_RES public function getUrl(?string $nameSpace = null): string { if ('rest' == $this->type) { - $nameSpace = isset($this->nameSpaces[$nameSpace]) - ? $this->nameSpaces[$nameSpace] - : array_values($this->nameSpaces)[0]; + $nameSpace = $nameSpace + ? $nameSpace + : array_values($this->nameSpaces)[0]; return home_url('?rest_route=/' . $nameSpace); } else { diff --git a/app/PluginHero/Helpers.php b/app/PluginHero/Helpers.php index a43d0bc..9d55874 100644 --- a/app/PluginHero/Helpers.php +++ b/app/PluginHero/Helpers.php @@ -57,6 +57,22 @@ public static function getPHPVersion(): float return floatval($version[0] . '.' . $version[1]); } + /** + * Hi, this is a helper function to get the ionCube version. + * But we not use it in the wp.org plugins. + * Only in premium versions for protect license. + * @return int|null + */ + public static function getIoncubeVersion(): ?int + { + if (function_exists('ioncube_loader_iversion')) { + $version = ioncube_loader_iversion(); + $version = sprintf('%d', $version / 10000); + return intval($version); + } + return null; + } + /** * @param array $rules * @param string $pluginFile @@ -86,6 +102,33 @@ public static function createRequirementRules(array $rules, string $pluginFile): } } + if (isset($rules['ioncubeVersion'])) { + $ionCubeVersion = self::getIoncubeVersion(); + $requiredIonCubeVersion = $rules['ioncubeVersion']; + if (!is_int($requiredIonCubeVersion)) { + throw new \Exception('ioncubeVersion must be an integer!'); + } + if (!$ionCubeVersion || $ionCubeVersion < $requiredIonCubeVersion) { + $status = false; + // @phpcs:ignore + add_action('admin_notices', function () use ($requiredIonCubeVersion, $ionCubeVersion, $pluginName): void { + $message = $pluginName . ": Is disabled because " . ('cli' == php_sapi_name() ? 'ionCube ' . $requiredIonCubeVersion : 'ionCube ' . $requiredIonCubeVersion . '') . " PHP Loader is not installed! In order for " . $pluginName . " to work, you must have ionCube " . $requiredIonCubeVersion . " and above. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking. Please visit " . ('cli' == php_sapi_name() ? 'ioncube.com/loaders.php' : 'ioncube.com/loaders.php') . " for install assistance or you can ask your server service provider to install ionCube " . $requiredIonCubeVersion . " or above. Your current installed IonCube version is " . ($ionCubeVersion ? $ionCubeVersion : 'not installed') . "."; // @phpcs:ignore + printf('

%1$s

', wp_kses_post($message)); + }); + } + if (extension_loaded('xdebug') && $status) { + $modes = xdebug_info('mode'); + $loaderFile = file_get_contents(dirname(__DIR__) . '/Loader.php', true); + if (isset($modes[0]) && 'off' != $modes[0] && false !== strpos($loaderFile, 'HR+')) { + $status = false; + add_action('admin_notices', function () use ($pluginName): void { + $message = $pluginName . ': xDebug installation was detected and ' . $pluginName . ' was disabled because of it. This is because ' . $pluginName . ' uses IonCube for license protection and the IonCube Loader is incompatible with xDebug, causing the site to crash. xDebug helps developers with debug and profile, but it doesn\'t need to be on the production site. So to turn off xDebug, please set mode to off or uninstall it. If you are not familiar with this process, you can get help from your server service provider.'; // @phpcs:ignore + printf('

%1$s

', esc_html($message)); + }); + } + } + } + if (isset($rules['extensions'])) { $extensions = $rules['extensions']; if (!is_array($extensions)) { diff --git a/app/PluginHero/Helpers/Data.php b/app/PluginHero/Helpers/Data.php index 8c7e1dc..dadf09b 100644 --- a/app/PluginHero/Helpers/Data.php +++ b/app/PluginHero/Helpers/Data.php @@ -226,11 +226,25 @@ public static function getAddon(string $key): Addon */ public static function getPluginData(string $file): object { - if (!function_exists('get_plugin_data')) { - require_once(ABSPATH . 'wp-admin/includes/plugin.php'); - } - - $pluginData = (object) get_plugin_data($file); + $pluginData = (object) get_file_data($file, [ + 'Name' => 'Plugin Name', + 'PluginURI' => 'Plugin URI', + 'Version' => 'Version', + 'Description' => 'Description', + 'Author' => 'Author', + 'AuthorURI' => 'Author URI', + 'TextDomain' => 'Text Domain', + 'DomainPath' => 'Domain Path', + 'License' => 'License', + 'LicenseURI' => 'License URI', + 'Network' => 'Network', + 'RequiresWP' => 'Requires at least', + 'RequiresPHP' => 'Requires PHP', + 'UpdateURI' => 'Update URI', + 'RequiresPlugins' => 'Requires Plugins', + 'Title' => 'Plugin Name', + 'AuthorName' => 'Author' + ]); if (!isset($pluginData->Slug)) { // phpcs:ignore $pluginData->Slug = self::getPluginSlug($file); // phpcs:ignore @@ -264,7 +278,7 @@ public static function getUserBy(string $field, mixed $value): ?object // @phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery $result = $wpdb->get_row( $wpdb->prepare( - "SELECT * FROM $wpdb->users WHERE `%s` = %s", + "SELECT * FROM $wpdb->users WHERE %s = %s", $field, $value ) diff --git a/app/PluginHero/Helpers/Feedback.php b/app/PluginHero/Helpers/Feedback.php index db4b13c..2b9848f 100644 --- a/app/PluginHero/Helpers/Feedback.php +++ b/app/PluginHero/Helpers/Feedback.php @@ -72,6 +72,14 @@ public static function feedback(bool $form = true, ?string $wpOrgSlug = null): v } }); + add_action('rest_api_init', function (): void { + register_rest_route('bp-plugin-check', self::getProp('pluginKey'), [ + 'callback' => fn() => wp_send_json_success(), + 'methods' => ['POST', 'GET'], + 'permission_callback' => '__return_true' + ]); + }); + if ($form) { global $pagenow, $wp_filesystem; if ('plugins.php' === $pagenow) { diff --git a/app/PluginHero/Helpers/General.php b/app/PluginHero/Helpers/General.php index 4611255..c503972 100644 --- a/app/PluginHero/Helpers/General.php +++ b/app/PluginHero/Helpers/General.php @@ -14,7 +14,7 @@ trait General { - /** + /** * @return string */ public static function getCurrentUrl(): string @@ -101,7 +101,7 @@ public static function getIp(): ?string { $ip = null; if (isset($_SERVER['REMOTE_ADDR'])) { - $ip = wp_unslash($_SERVER['REMOTE_ADDR']); + $ip = wp_unslash(esc_url_raw($_SERVER['REMOTE_ADDR'])); $ip = rest_is_ip_address($ip); if (false === $ip) { $ip = null; diff --git a/app/PluginHero/templates/data-table.php b/app/PluginHero/templates/data-table.php index 2411a31..2930614 100644 --- a/app/PluginHero/templates/data-table.php +++ b/app/PluginHero/templates/data-table.php @@ -1,3 +1,4 @@ + diff --git a/app/PluginHero/templates/feedback.php b/app/PluginHero/templates/feedback.php index 7ad5952..799b37f 100644 --- a/app/PluginHero/templates/feedback.php +++ b/app/PluginHero/templates/feedback.php @@ -1,4 +1,4 @@ - +
"; echo "Log date: " . esc_html($date) . "
"; diff --git a/app/PluginHero/templates/notice.php b/app/PluginHero/templates/notice.php index 9569a73..233914b 100644 --- a/app/PluginHero/templates/notice.php +++ b/app/PluginHero/templates/notice.php @@ -1,5 +1,5 @@ diff --git a/app/PluginHero/templates/plugins.php b/app/PluginHero/templates/plugins.php index 3529ab9..b109ded 100644 --- a/app/PluginHero/templates/plugins.php +++ b/app/PluginHero/templates/plugins.php @@ -1,4 +1,4 @@ - +

diff --git a/app/PluginHero/templates/table-search-form.php b/app/PluginHero/templates/table-search-form.php index 2929428..b3fd7b0 100644 --- a/app/PluginHero/templates/table-search-form.php +++ b/app/PluginHero/templates/table-search-form.php @@ -1,10 +1,14 @@ -
$value) { ?> + foreach ($_GET as $key => $value) { + $key = sanitize_text_field($key); + $value = sanitize_text_field($value); + ?> diff --git a/app/RestAPI.php b/app/RestAPI.php index f39651e..c941d58 100644 --- a/app/RestAPI.php +++ b/app/RestAPI.php @@ -35,7 +35,7 @@ class RestAPI extends BaseAPI /** * @var int */ - private int $currentUserId; + protected int $currentUserId; /** * @var Request @@ -64,12 +64,12 @@ public function __construct() } // create payment data - add_action('rest_pre_dispatch', [$this, 'middleware'], 10, 3); + $this->addMiddleware('cryptopay-lite', [$this, 'middleware']); $this->addRoutes([ 'cryptopay-lite' => [ 'init' => [ - 'callback' => 'init', + 'callback' => 'initPayment', 'methods' => ['GET'] ], 'create-transaction' => [ @@ -120,30 +120,28 @@ public function getObjectParam(string $key): object public function middleware(mixed $result, \WP_REST_Server $server, \WP_REST_Request $request): mixed { // check if request is cryptopay - if ('cryptopay-lite' === (Helpers::getRoutePaths($request->get_route())[0] ?? null)) { - if ($addon = $this->request->getParam('cp_addon')) { - try { - // check addon - Helpers::checkIntegration($this->addon = $addon); - $this->paymentData = new PaymentDataType($addon); - $this->paymentData->setUserId($this->currentUserId); - $this->paymentData->setHash($this->request->getParam('hash')); - $this->paymentData->setOrder( - OrderType::fromObject($this->getObjectParam('order')) - ); - $this->paymentData->setParams( - ParamsType::fromObject($this->getObjectParam('params')) - ); - $this->paymentData->setNetwork( - NetworkType::fromObject($this->getObjectParam('network')) - ); - $this->paymentData->setDynamicData( - DynamicDataType::fromObject($this->getObjectParam('dynamicData')) - ); - } catch (\Exception $e) { - Helpers::debug($e->getMessage(), 'ERROR', $e); - Response::error($e->getMessage(), 'INT100'); - } + if ($addon = $this->request->getParam('cp_addon')) { + try { + // check addon + Helpers::checkIntegration($this->addon = $addon); + $this->paymentData = new PaymentDataType($addon); + $this->paymentData->setUserId($this->currentUserId); + $this->paymentData->setHash($this->request->getParam('hash')); + $this->paymentData->setOrder( + OrderType::fromObject($this->getObjectParam('order')) + ); + $this->paymentData->setParams( + ParamsType::fromObject($this->getObjectParam('params')) + ); + $this->paymentData->setNetwork( + NetworkType::fromObject($this->getObjectParam('network')) + ); + $this->paymentData->setDynamicData( + DynamicDataType::fromObject($this->getObjectParam('dynamicData')) + ); + } catch (\Exception $e) { + Helpers::debug($e->getMessage(), 'ERROR', $e); + Response::error($e->getMessage(), 'INT100'); } } @@ -156,7 +154,7 @@ public function middleware(mixed $result, \WP_REST_Server $server, \WP_REST_Requ * payment address and parameters that the relevant network may need. * @return void */ - public function init(): void + public function initPayment(): void { try { $payment = new Payment($this->paymentData->getAddon()); @@ -321,7 +319,9 @@ public function setReminderEmail(): void ]); $this->paymentData->getModel()->update([ - 'reminderEmail' => $email + 'reminderEmail' => $email, + 'userId' => $this->currentUserId, + 'updatedAt' => current_time('mysql') ], [ 'hash' => $this->paymentData->getHash() ]); diff --git a/app/Settings/EvmChains.php b/app/Settings/EvmChains.php index 15311ad..382db46 100644 --- a/app/Settings/EvmChains.php +++ b/app/Settings/EvmChains.php @@ -104,16 +104,17 @@ public static function initSettings(): void ], [ 'id' => 'walletconnect', - 'title' => esc_html('WalletConnect'), + 'title' => esc_html('WalletConnect (legacy)'), 'type' => 'switcher', - 'default' => true + 'default' => true, + 'desc' => esc_html__('If you enabled Web3Wallets, please disable it.', 'cryptopay'), ], [ - 'id' => 'web3modal', - 'title' => esc_html('Web3 Wallets (Web3Modal)'), + 'id' => 'web3wallets', + 'title' => esc_html('Web3 Wallets (Reown AppKit - formerly Web3Modal)'), 'type' => 'switcher', 'default' => true, - 'desc' => esc_html__('It is a module within Web3Modal that supports hundreds of wallets with WalletConnect support. Since all the above wallets are already supported, you can deactivate all other wallets and allow users to make transactions only through Web3Modal.', 'cryptopay'), + 'desc' => esc_html__('It is a module within Reown AppKit that supports hundreds of wallets with WalletConnect support. Since all the above wallets are already supported, you can deactivate all other wallets and allow users to make transactions only through Reown AppKit.', 'cryptopay'), ], ] ], diff --git a/app/Settings/Settings.php b/app/Settings/Settings.php index 8ea3bb1..201bb39 100644 --- a/app/Settings/Settings.php +++ b/app/Settings/Settings.php @@ -62,13 +62,18 @@ public function __construct() ], [ 'id' => 'wcProjectId', - 'title' => esc_html__('WalletConnect Project ID', 'cryptopay'), + 'title' => esc_html__('Reown AppKit ID (formerly WalletConnect)', 'cryptopay'), 'type' => 'text', - 'desc' => esc_html__('WalletConnect Project ID is required for WalletConnect, which are used to connect to mobile wallets on many networks. If you do not have a WalletConnect Project ID, WalletConnect will not work. You can get your project ID by registering for WalletConnect Cloud at the link below.', 'cryptopay') + 'desc' => esc_html__('Project ID is required for WalletConnect and AppKit, which are used to connect to mobile wallets on many networks. If you do not have a Project ID, Reown AppKit will not work. You can get your project ID by registering for Reown Cloud at the link below.', 'cryptopay') . CPL_BR2 . Helpers::view('components/link', [ - 'text' => esc_html__('WalletConnect Cloud', 'cryptopay'), - 'url' => 'https://cloud.walletconnect.com/sign-in' + 'text' => esc_html__('Reown Cloud (formerly WalletConnect)', 'cryptopay'), + 'url' => 'https://cloud.reown.com/sign-in' + ]) + . CPL_BR2 . + Helpers::view('components/link', [ + 'text' => esc_html__('Guide', 'cryptopay'), + 'url' => 'https://beycanpress.gitbook.io/cryptopay-docs/overview/installation#id-10-reown-project-id-formerly-walletconnect' ]) , ] diff --git a/app/WooCommerce/Gateway/Blocks/CryptoPay.php b/app/WooCommerce/Gateway/Blocks/CryptoPay.php index ab30431..0ee902f 100644 --- a/app/WooCommerce/Gateway/Blocks/CryptoPay.php +++ b/app/WooCommerce/Gateway/Blocks/CryptoPay.php @@ -33,7 +33,7 @@ class CryptoPay extends AbstractPaymentMethodType /** * @var string */ - private string $scriptId; + private string $scriptId = ''; /** * @return void @@ -94,6 +94,10 @@ public function get_payment_method_icons(): array */ public function get_payment_method_script_handles(): array { + if (!$this->is_active()) { + return []; + } + return [$this->scriptId = Helpers::registerScript('blocks.min.js')]; } diff --git a/assets/images/icons/$read.svg b/assets/images/icons/$read.svg deleted file mode 100644 index ecfca20..0000000 --- a/assets/images/icons/$read.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - diff --git a/assets/images/icons/$snow.svg b/assets/images/icons/$snow.svg deleted file mode 100644 index 0309ed5..0000000 --- a/assets/images/icons/$snow.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/0xbtc.svg b/assets/images/icons/0xbtc.svg deleted file mode 100644 index 1edca71..0000000 --- a/assets/images/icons/0xbtc.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/10set.svg b/assets/images/icons/10set.svg deleted file mode 100644 index 6414342..0000000 --- a/assets/images/icons/10set.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/1flr.svg b/assets/images/icons/1flr.svg deleted file mode 100644 index 238444b..0000000 --- a/assets/images/icons/1flr.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/1inch.svg b/assets/images/icons/1inch.svg deleted file mode 100644 index e0a1f28..0000000 --- a/assets/images/icons/1inch.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/1st.svg b/assets/images/icons/1st.svg deleted file mode 100644 index b6cfd03..0000000 --- a/assets/images/icons/1st.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/aave.svg b/assets/images/icons/aave.svg deleted file mode 100644 index c6784c4..0000000 --- a/assets/images/icons/aave.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/abbc.svg b/assets/images/icons/abbc.svg deleted file mode 100644 index 8f7b039..0000000 --- a/assets/images/icons/abbc.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/abt.svg b/assets/images/icons/abt.svg deleted file mode 100644 index 503fb0c..0000000 --- a/assets/images/icons/abt.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/ac3.svg b/assets/images/icons/ac3.svg deleted file mode 100644 index 5c357c9..0000000 --- a/assets/images/icons/ac3.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/aca.svg b/assets/images/icons/aca.svg deleted file mode 100644 index ff9bf8f..0000000 --- a/assets/images/icons/aca.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/act.svg b/assets/images/icons/act.svg deleted file mode 100644 index 28099e7..0000000 --- a/assets/images/icons/act.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ada.svg b/assets/images/icons/ada.svg deleted file mode 100644 index 278e300..0000000 --- a/assets/images/icons/ada.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/assets/images/icons/adb.svg b/assets/images/icons/adb.svg deleted file mode 100644 index 0ea34ca..0000000 --- a/assets/images/icons/adb.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/adx.svg b/assets/images/icons/adx.svg deleted file mode 100644 index 9a62e24..0000000 --- a/assets/images/icons/adx.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/ae.svg b/assets/images/icons/ae.svg deleted file mode 100644 index 5eca306..0000000 --- a/assets/images/icons/ae.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/assets/images/icons/aeon.svg b/assets/images/icons/aeon.svg deleted file mode 100644 index f2bb970..0000000 --- a/assets/images/icons/aeon.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/aergo.svg b/assets/images/icons/aergo.svg deleted file mode 100644 index bcf6bf5..0000000 --- a/assets/images/icons/aergo.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/agi.svg b/assets/images/icons/agi.svg deleted file mode 100644 index 9c23f82..0000000 --- a/assets/images/icons/agi.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/aion.svg b/assets/images/icons/aion.svg deleted file mode 100644 index 1283458..0000000 --- a/assets/images/icons/aion.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ait.svg b/assets/images/icons/ait.svg deleted file mode 100644 index f1616a9..0000000 --- a/assets/images/icons/ait.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/akro.svg b/assets/images/icons/akro.svg deleted file mode 100644 index 15e3a22..0000000 --- a/assets/images/icons/akro.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/akt.svg b/assets/images/icons/akt.svg deleted file mode 100644 index 29f4b53..0000000 --- a/assets/images/icons/akt.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/alcx.svg b/assets/images/icons/alcx.svg deleted file mode 100644 index 21dd9d6..0000000 --- a/assets/images/icons/alcx.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/assets/images/icons/aleph.svg b/assets/images/icons/aleph.svg deleted file mode 100644 index 24ffddf..0000000 --- a/assets/images/icons/aleph.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/assets/images/icons/algo.svg b/assets/images/icons/algo.svg deleted file mode 100644 index 3665b9c..0000000 --- a/assets/images/icons/algo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/assets/images/icons/alis.svg b/assets/images/icons/alis.svg deleted file mode 100644 index 796974d..0000000 --- a/assets/images/icons/alis.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/alpha.svg b/assets/images/icons/alpha.svg deleted file mode 100644 index eb52a2d..0000000 --- a/assets/images/icons/alpha.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/alusd.svg b/assets/images/icons/alusd.svg deleted file mode 100644 index 7c42547..0000000 --- a/assets/images/icons/alusd.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/alx.svg b/assets/images/icons/alx.svg deleted file mode 100644 index e81f0bf..0000000 --- a/assets/images/icons/alx.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/amb.svg b/assets/images/icons/amb.svg deleted file mode 100644 index 6400171..0000000 --- a/assets/images/icons/amb.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/amlt.svg b/assets/images/icons/amlt.svg deleted file mode 100644 index 6dd1a5d..0000000 --- a/assets/images/icons/amlt.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/amp.svg b/assets/images/icons/amp.svg deleted file mode 100644 index 8cf87eb..0000000 --- a/assets/images/icons/amp.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ampl.svg b/assets/images/icons/ampl.svg deleted file mode 100644 index 96a3e03..0000000 --- a/assets/images/icons/ampl.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/assets/images/icons/anc.svg b/assets/images/icons/anc.svg deleted file mode 100644 index 25527fd..0000000 --- a/assets/images/icons/anc.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/anj.svg b/assets/images/icons/anj.svg deleted file mode 100644 index b44e8e5..0000000 --- a/assets/images/icons/anj.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ankr.svg b/assets/images/icons/ankr.svg deleted file mode 100644 index 0be4e0a..0000000 --- a/assets/images/icons/ankr.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ant.svg b/assets/images/icons/ant.svg deleted file mode 100644 index 070083c..0000000 --- a/assets/images/icons/ant.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ape.svg b/assets/images/icons/ape.svg deleted file mode 100644 index cb5a33c..0000000 --- a/assets/images/icons/ape.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/aph.svg b/assets/images/icons/aph.svg deleted file mode 100644 index 196659f..0000000 --- a/assets/images/icons/aph.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/assets/images/icons/apl.svg b/assets/images/icons/apl.svg deleted file mode 100644 index c173126..0000000 --- a/assets/images/icons/apl.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/appc.svg b/assets/images/icons/appc.svg deleted file mode 100644 index 757821b..0000000 --- a/assets/images/icons/appc.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/apt.svg b/assets/images/icons/apt.svg deleted file mode 100644 index 54670c2..0000000 --- a/assets/images/icons/apt.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/assets/images/icons/apw.svg b/assets/images/icons/apw.svg deleted file mode 100644 index 0472cfa..0000000 --- a/assets/images/icons/apw.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/apy.svg b/assets/images/icons/apy.svg deleted file mode 100644 index b938644..0000000 --- a/assets/images/icons/apy.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ar.svg b/assets/images/icons/ar.svg deleted file mode 100644 index f62f210..0000000 --- a/assets/images/icons/ar.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/arb.svg b/assets/images/icons/arb.svg deleted file mode 100644 index dd17407..0000000 --- a/assets/images/icons/arb.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ardr.svg b/assets/images/icons/ardr.svg deleted file mode 100644 index f6ace1b..0000000 --- a/assets/images/icons/ardr.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ark.svg b/assets/images/icons/ark.svg deleted file mode 100644 index 7c89690..0000000 --- a/assets/images/icons/ark.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/armor.svg b/assets/images/icons/armor.svg deleted file mode 100644 index 49653be..0000000 --- a/assets/images/icons/armor.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/arn.svg b/assets/images/icons/arn.svg deleted file mode 100644 index cf316ce..0000000 --- a/assets/images/icons/arn.svg +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/aro.svg b/assets/images/icons/aro.svg deleted file mode 100644 index 7d5b5ef..0000000 --- a/assets/images/icons/aro.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/arrr.svg b/assets/images/icons/arrr.svg deleted file mode 100644 index 591dfdc..0000000 --- a/assets/images/icons/arrr.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/asm.svg b/assets/images/icons/asm.svg deleted file mode 100644 index b6634b4..0000000 --- a/assets/images/icons/asm.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ast.svg b/assets/images/icons/ast.svg deleted file mode 100644 index 9e94f79..0000000 --- a/assets/images/icons/ast.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/astro.svg b/assets/images/icons/astro.svg deleted file mode 100644 index 526eeb0..0000000 --- a/assets/images/icons/astro.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/atmi.svg b/assets/images/icons/atmi.svg deleted file mode 100644 index 6b38db1..0000000 --- a/assets/images/icons/atmi.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/assets/images/icons/atom.svg b/assets/images/icons/atom.svg deleted file mode 100644 index e1b6071..0000000 --- a/assets/images/icons/atom.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/auc.svg b/assets/images/icons/auc.svg deleted file mode 100644 index 0e7af75..0000000 --- a/assets/images/icons/auc.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/audio.svg b/assets/images/icons/audio.svg deleted file mode 100644 index 39f134c..0000000 --- a/assets/images/icons/audio.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/aura.svg b/assets/images/icons/aura.svg deleted file mode 100644 index d614b7a..0000000 --- a/assets/images/icons/aura.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/auto.svg b/assets/images/icons/auto.svg deleted file mode 100644 index fe4c57d..0000000 --- a/assets/images/icons/auto.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/awc.svg b/assets/images/icons/awc.svg deleted file mode 100644 index dfd0173..0000000 --- a/assets/images/icons/awc.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/axp.svg b/assets/images/icons/axp.svg deleted file mode 100644 index fdd82a3..0000000 --- a/assets/images/icons/axp.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/axs.svg b/assets/images/icons/axs.svg deleted file mode 100644 index 588effc..0000000 --- a/assets/images/icons/axs.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/azero.svg b/assets/images/icons/azero.svg deleted file mode 100644 index 95c3ade..0000000 --- a/assets/images/icons/azero.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/babydoge.svg b/assets/images/icons/babydoge.svg deleted file mode 100644 index c4616cf..0000000 --- a/assets/images/icons/babydoge.svg +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bac.svg b/assets/images/icons/bac.svg deleted file mode 100644 index 608f842..0000000 --- a/assets/images/icons/bac.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/bal.svg b/assets/images/icons/bal.svg deleted file mode 100644 index 1ed2f2a..0000000 --- a/assets/images/icons/bal.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bam.svg b/assets/images/icons/bam.svg deleted file mode 100644 index 310368b..0000000 --- a/assets/images/icons/bam.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/band.svg b/assets/images/icons/band.svg deleted file mode 100644 index 67b950b..0000000 --- a/assets/images/icons/band.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/bao.svg b/assets/images/icons/bao.svg deleted file mode 100644 index 4bdd9cd..0000000 --- a/assets/images/icons/bao.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bat.svg b/assets/images/icons/bat.svg deleted file mode 100644 index ba5ed90..0000000 --- a/assets/images/icons/bat.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/bay.svg b/assets/images/icons/bay.svg deleted file mode 100644 index 244b436..0000000 --- a/assets/images/icons/bay.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/bbr.svg b/assets/images/icons/bbr.svg deleted file mode 100644 index 2735b52..0000000 --- a/assets/images/icons/bbr.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/bcd.svg b/assets/images/icons/bcd.svg deleted file mode 100644 index baac82b..0000000 --- a/assets/images/icons/bcd.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/bch.svg b/assets/images/icons/bch.svg deleted file mode 100644 index a449e95..0000000 --- a/assets/images/icons/bch.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/assets/images/icons/bcha.svg b/assets/images/icons/bcha.svg deleted file mode 100644 index 4642dc7..0000000 --- a/assets/images/icons/bcha.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/bcn.svg b/assets/images/icons/bcn.svg deleted file mode 100644 index 5e7cb76..0000000 --- a/assets/images/icons/bcn.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bco.svg b/assets/images/icons/bco.svg deleted file mode 100644 index 9237ab7..0000000 --- a/assets/images/icons/bco.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bel.svg b/assets/images/icons/bel.svg deleted file mode 100644 index 05d6cc0..0000000 --- a/assets/images/icons/bel.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/beta.svg b/assets/images/icons/beta.svg deleted file mode 100644 index ba3cf06..0000000 --- a/assets/images/icons/beta.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bf.svg b/assets/images/icons/bf.svg deleted file mode 100644 index 4559b18..0000000 --- a/assets/images/icons/bf.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bfc.svg b/assets/images/icons/bfc.svg deleted file mode 100644 index 7988db8..0000000 --- a/assets/images/icons/bfc.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bico.svg b/assets/images/icons/bico.svg deleted file mode 100644 index 90d1bea..0000000 --- a/assets/images/icons/bico.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bifi.svg b/assets/images/icons/bifi.svg deleted file mode 100644 index 6ef994d..0000000 --- a/assets/images/icons/bifi.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/bit-2.svg b/assets/images/icons/bit-2.svg deleted file mode 100644 index 992260a..0000000 --- a/assets/images/icons/bit-2.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bit.svg b/assets/images/icons/bit.svg deleted file mode 100644 index 27aea96..0000000 --- a/assets/images/icons/bit.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/bix.svg b/assets/images/icons/bix.svg deleted file mode 100644 index eff027b..0000000 --- a/assets/images/icons/bix.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - -bix - - - - - - - - - diff --git a/assets/images/icons/bld.svg b/assets/images/icons/bld.svg deleted file mode 100644 index 4b97542..0000000 --- a/assets/images/icons/bld.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/blk.svg b/assets/images/icons/blk.svg deleted file mode 100644 index 58d640c..0000000 --- a/assets/images/icons/blk.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/block.svg b/assets/images/icons/block.svg deleted file mode 100644 index bea6b74..0000000 --- a/assets/images/icons/block.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/blt.svg b/assets/images/icons/blt.svg deleted file mode 100644 index 99282eb..0000000 --- a/assets/images/icons/blt.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/blue.svg b/assets/images/icons/blue.svg deleted file mode 100644 index d9466a2..0000000 --- a/assets/images/icons/blue.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/blz.svg b/assets/images/icons/blz.svg deleted file mode 100644 index 3da31a4..0000000 --- a/assets/images/icons/blz.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bnt.svg b/assets/images/icons/bnt.svg deleted file mode 100644 index 0b50876..0000000 --- a/assets/images/icons/bnt.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/assets/images/icons/bond-2.svg b/assets/images/icons/bond-2.svg deleted file mode 100644 index cc1b316..0000000 --- a/assets/images/icons/bond-2.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bond.svg b/assets/images/icons/bond.svg deleted file mode 100644 index 9834347..0000000 --- a/assets/images/icons/bond.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/assets/images/icons/bondly.svg b/assets/images/icons/bondly.svg deleted file mode 100644 index 87ed0d8..0000000 --- a/assets/images/icons/bondly.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bora.svg b/assets/images/icons/bora.svg deleted file mode 100644 index 5229695..0000000 --- a/assets/images/icons/bora.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/box.svg b/assets/images/icons/box.svg deleted file mode 100644 index 90da42f..0000000 --- a/assets/images/icons/box.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/bpt.svg b/assets/images/icons/bpt.svg deleted file mode 100644 index 9ac5cc0..0000000 --- a/assets/images/icons/bpt.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/bqx.svg b/assets/images/icons/bqx.svg deleted file mode 100644 index 85a12c1..0000000 --- a/assets/images/icons/bqx.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/brd.svg b/assets/images/icons/brd.svg deleted file mode 100644 index 48074f4..0000000 --- a/assets/images/icons/brd.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/brise.svg b/assets/images/icons/brise.svg deleted file mode 100644 index 54a5014..0000000 --- a/assets/images/icons/brise.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/btc++.svg b/assets/images/icons/btc++.svg deleted file mode 100644 index 2782103..0000000 --- a/assets/images/icons/btc++.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/btc.svg b/assets/images/icons/btc.svg deleted file mode 100644 index 5872507..0000000 --- a/assets/images/icons/btc.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/assets/images/icons/btcd.svg b/assets/images/icons/btcd.svg deleted file mode 100644 index 4eef26b..0000000 --- a/assets/images/icons/btcd.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/btcp.svg b/assets/images/icons/btcp.svg deleted file mode 100644 index 39c35a0..0000000 --- a/assets/images/icons/btcp.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/btg.svg b/assets/images/icons/btg.svg deleted file mode 100644 index 1d0062b..0000000 --- a/assets/images/icons/btg.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/btmx.svg b/assets/images/icons/btmx.svg deleted file mode 100644 index 1c65fa7..0000000 --- a/assets/images/icons/btmx.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bto.svg b/assets/images/icons/bto.svg deleted file mode 100644 index 93d6873..0000000 --- a/assets/images/icons/bto.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/btr.svg b/assets/images/icons/btr.svg deleted file mode 100644 index bb71416..0000000 --- a/assets/images/icons/btr.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bts.svg b/assets/images/icons/bts.svg deleted file mode 100644 index 600d624..0000000 --- a/assets/images/icons/bts.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/btt.svg b/assets/images/icons/btt.svg deleted file mode 100644 index 6bef90b..0000000 --- a/assets/images/icons/btt.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/btu.svg b/assets/images/icons/btu.svg deleted file mode 100644 index 585a2ef..0000000 --- a/assets/images/icons/btu.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bu.svg b/assets/images/icons/bu.svg deleted file mode 100644 index acc57f4..0000000 --- a/assets/images/icons/bu.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/bunny.svg b/assets/images/icons/bunny.svg deleted file mode 100644 index eface4a..0000000 --- a/assets/images/icons/bunny.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/busd.svg b/assets/images/icons/busd.svg deleted file mode 100644 index 25f2858..0000000 --- a/assets/images/icons/busd.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/bwt.svg b/assets/images/icons/bwt.svg deleted file mode 100644 index d14cc15..0000000 --- a/assets/images/icons/bwt.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/bz.svg b/assets/images/icons/bz.svg deleted file mode 100644 index 61d585f..0000000 --- a/assets/images/icons/bz.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/bznt.svg b/assets/images/icons/bznt.svg deleted file mode 100644 index b928060..0000000 --- a/assets/images/icons/bznt.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/bzrx.svg b/assets/images/icons/bzrx.svg deleted file mode 100644 index f19ca66..0000000 --- a/assets/images/icons/bzrx.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/c20.svg b/assets/images/icons/c20.svg deleted file mode 100644 index 37fd1ad..0000000 --- a/assets/images/icons/c20.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/c98.svg b/assets/images/icons/c98.svg deleted file mode 100644 index c128279..0000000 --- a/assets/images/icons/c98.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cake.svg b/assets/images/icons/cake.svg deleted file mode 100644 index 12250f3..0000000 --- a/assets/images/icons/cake.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/canto.svg b/assets/images/icons/canto.svg deleted file mode 100644 index 5859101..0000000 --- a/assets/images/icons/canto.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cap.svg b/assets/images/icons/cap.svg deleted file mode 100644 index db2e659..0000000 --- a/assets/images/icons/cap.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/capp.svg b/assets/images/icons/capp.svg deleted file mode 100644 index 0e40b0c..0000000 --- a/assets/images/icons/capp.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/car.svg b/assets/images/icons/car.svg deleted file mode 100644 index 3911ef9..0000000 --- a/assets/images/icons/car.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/card.svg b/assets/images/icons/card.svg deleted file mode 100644 index 5f159ef..0000000 --- a/assets/images/icons/card.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/cbat.svg b/assets/images/icons/cbat.svg deleted file mode 100644 index 1295390..0000000 --- a/assets/images/icons/cbat.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/cbc.svg b/assets/images/icons/cbc.svg deleted file mode 100644 index 860404f..0000000 --- a/assets/images/icons/cbc.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cbt.svg b/assets/images/icons/cbt.svg deleted file mode 100644 index d669a19..0000000 --- a/assets/images/icons/cbt.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cccx.svg b/assets/images/icons/cccx.svg deleted file mode 100644 index 82d34ab..0000000 --- a/assets/images/icons/cccx.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cdai.svg b/assets/images/icons/cdai.svg deleted file mode 100644 index 086e980..0000000 --- a/assets/images/icons/cdai.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cdt.svg b/assets/images/icons/cdt.svg deleted file mode 100644 index b1325b8..0000000 --- a/assets/images/icons/cdt.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cel.svg b/assets/images/icons/cel.svg deleted file mode 100644 index 4bf4548..0000000 --- a/assets/images/icons/cel.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/celo.svg b/assets/images/icons/celo.svg deleted file mode 100644 index 30b6e03..0000000 --- a/assets/images/icons/celo.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/celr.svg b/assets/images/icons/celr.svg deleted file mode 100644 index 675342f..0000000 --- a/assets/images/icons/celr.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cennz.svg b/assets/images/icons/cennz.svg deleted file mode 100644 index 122210e..0000000 --- a/assets/images/icons/cennz.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cet.svg b/assets/images/icons/cet.svg deleted file mode 100644 index 291c037..0000000 --- a/assets/images/icons/cet.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ceth.svg b/assets/images/icons/ceth.svg deleted file mode 100644 index ce6d219..0000000 --- a/assets/images/icons/ceth.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cfg.svg b/assets/images/icons/cfg.svg deleted file mode 100644 index 4ea6c1e..0000000 --- a/assets/images/icons/cfg.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cfx.svg b/assets/images/icons/cfx.svg deleted file mode 100644 index a528a9d..0000000 --- a/assets/images/icons/cfx.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/chai.svg b/assets/images/icons/chai.svg deleted file mode 100644 index 886b0a7..0000000 --- a/assets/images/icons/chai.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/chat.svg b/assets/images/icons/chat.svg deleted file mode 100644 index daca2a3..0000000 --- a/assets/images/icons/chat.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/chr.svg b/assets/images/icons/chr.svg deleted file mode 100644 index 7e82aeb..0000000 --- a/assets/images/icons/chr.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/chsb.svg b/assets/images/icons/chsb.svg deleted file mode 100644 index 50d09ce..0000000 --- a/assets/images/icons/chsb.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/chz.svg b/assets/images/icons/chz.svg deleted file mode 100644 index 0a9ab74..0000000 --- a/assets/images/icons/chz.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ckb.svg b/assets/images/icons/ckb.svg deleted file mode 100644 index 87d6fba..0000000 --- a/assets/images/icons/ckb.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/assets/images/icons/clo.svg b/assets/images/icons/clo.svg deleted file mode 100644 index 9224915..0000000 --- a/assets/images/icons/clo.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cloak.svg b/assets/images/icons/cloak.svg deleted file mode 100644 index 1a4843f..0000000 --- a/assets/images/icons/cloak.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/clout.svg b/assets/images/icons/clout.svg deleted file mode 100644 index 0ba6603..0000000 --- a/assets/images/icons/clout.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/assets/images/icons/cmt.svg b/assets/images/icons/cmt.svg deleted file mode 100644 index 35e5daf..0000000 --- a/assets/images/icons/cmt.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cnd.svg b/assets/images/icons/cnd.svg deleted file mode 100644 index f956fee..0000000 --- a/assets/images/icons/cnd.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cnx.svg b/assets/images/icons/cnx.svg deleted file mode 100644 index 0e2ef5f..0000000 --- a/assets/images/icons/cnx.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cocn.svg b/assets/images/icons/cocn.svg deleted file mode 100644 index 2a1efc8..0000000 --- a/assets/images/icons/cocn.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/comp.svg b/assets/images/icons/comp.svg deleted file mode 100644 index aeedf88..0000000 --- a/assets/images/icons/comp.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/coni.svg b/assets/images/icons/coni.svg deleted file mode 100644 index a0a013f..0000000 --- a/assets/images/icons/coni.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/cosm.svg b/assets/images/icons/cosm.svg deleted file mode 100644 index 1390198..0000000 --- a/assets/images/icons/cosm.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/coti.svg b/assets/images/icons/coti.svg deleted file mode 100644 index 1a6f2d4..0000000 --- a/assets/images/icons/coti.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cov.svg b/assets/images/icons/cov.svg deleted file mode 100644 index 19b0a0c..0000000 --- a/assets/images/icons/cov.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/assets/images/icons/cova.svg b/assets/images/icons/cova.svg deleted file mode 100644 index 3288bc3..0000000 --- a/assets/images/icons/cova.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/cover.svg b/assets/images/icons/cover.svg deleted file mode 100644 index 5e7383c..0000000 --- a/assets/images/icons/cover.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cpc.svg b/assets/images/icons/cpc.svg deleted file mode 100644 index 8ddb08f..0000000 --- a/assets/images/icons/cpc.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/cpx.svg b/assets/images/icons/cpx.svg deleted file mode 100644 index 68b071d..0000000 --- a/assets/images/icons/cpx.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/assets/images/icons/crd.svg b/assets/images/icons/crd.svg deleted file mode 100644 index a9b6f20..0000000 --- a/assets/images/icons/crd.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/cre.svg b/assets/images/icons/cre.svg deleted file mode 100644 index 31ed2b2..0000000 --- a/assets/images/icons/cre.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cream.svg b/assets/images/icons/cream.svg deleted file mode 100644 index 0cc72bb..0000000 --- a/assets/images/icons/cream.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/cred.svg b/assets/images/icons/cred.svg deleted file mode 100644 index ba5511d..0000000 --- a/assets/images/icons/cred.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/crep.svg b/assets/images/icons/crep.svg deleted file mode 100644 index 04b2703..0000000 --- a/assets/images/icons/crep.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cro.svg b/assets/images/icons/cro.svg deleted file mode 100644 index 648717c..0000000 --- a/assets/images/icons/cro.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/crpt.svg b/assets/images/icons/crpt.svg deleted file mode 100644 index 11f01e9..0000000 --- a/assets/images/icons/crpt.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/crv.svg b/assets/images/icons/crv.svg deleted file mode 100644 index 308784e..0000000 --- a/assets/images/icons/crv.svg +++ /dev/null @@ -1,18511 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cs.svg b/assets/images/icons/cs.svg deleted file mode 100644 index 73bc490..0000000 --- a/assets/images/icons/cs.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/csai.svg b/assets/images/icons/csai.svg deleted file mode 100644 index 53adf47..0000000 --- a/assets/images/icons/csai.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/csc.svg b/assets/images/icons/csc.svg deleted file mode 100644 index 1c6200c..0000000 --- a/assets/images/icons/csc.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/cspr.svg b/assets/images/icons/cspr.svg deleted file mode 100644 index cdddf17..0000000 --- a/assets/images/icons/cspr.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ctc.svg b/assets/images/icons/ctc.svg deleted file mode 100644 index 20154b0..0000000 --- a/assets/images/icons/ctc.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ctxc.svg b/assets/images/icons/ctxc.svg deleted file mode 100644 index 8873a86..0000000 --- a/assets/images/icons/ctxc.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cube.svg b/assets/images/icons/cube.svg deleted file mode 100644 index 39098b5..0000000 --- a/assets/images/icons/cube.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/cusdc.svg b/assets/images/icons/cusdc.svg deleted file mode 100644 index b9cba8b..0000000 --- a/assets/images/icons/cusdc.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cv.svg b/assets/images/icons/cv.svg deleted file mode 100644 index aace511..0000000 --- a/assets/images/icons/cv.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/cvc.svg b/assets/images/icons/cvc.svg deleted file mode 100644 index ae24376..0000000 --- a/assets/images/icons/cvc.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/assets/images/icons/cvp.svg b/assets/images/icons/cvp.svg deleted file mode 100644 index 625dcc7..0000000 --- a/assets/images/icons/cvp.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/assets/images/icons/cvt.svg b/assets/images/icons/cvt.svg deleted file mode 100644 index 71f6167..0000000 --- a/assets/images/icons/cvt.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cvx.svg b/assets/images/icons/cvx.svg deleted file mode 100644 index 4d414b2..0000000 --- a/assets/images/icons/cvx.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/cwbtc.svg b/assets/images/icons/cwbtc.svg deleted file mode 100644 index ee9ee5b..0000000 --- a/assets/images/icons/cwbtc.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/czrx.svg b/assets/images/icons/czrx.svg deleted file mode 100644 index 3dbaec9..0000000 --- a/assets/images/icons/czrx.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dadi.svg b/assets/images/icons/dadi.svg deleted file mode 100644 index 82c0fdb..0000000 --- a/assets/images/icons/dadi.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dafi.svg b/assets/images/icons/dafi.svg deleted file mode 100644 index 7723343..0000000 --- a/assets/images/icons/dafi.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dag.svg b/assets/images/icons/dag.svg deleted file mode 100644 index 4754dca..0000000 --- a/assets/images/icons/dag.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dao.svg b/assets/images/icons/dao.svg deleted file mode 100644 index 3e2938b..0000000 --- a/assets/images/icons/dao.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dasc.svg b/assets/images/icons/dasc.svg deleted file mode 100644 index 9f69200..0000000 --- a/assets/images/icons/dasc.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dash.svg b/assets/images/icons/dash.svg deleted file mode 100644 index 8faa30b..0000000 --- a/assets/images/icons/dash.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/dat.svg b/assets/images/icons/dat.svg deleted file mode 100644 index 2377ba7..0000000 --- a/assets/images/icons/dat.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/data.svg b/assets/images/icons/data.svg deleted file mode 100644 index ea8bfe1..0000000 --- a/assets/images/icons/data.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/datx.svg b/assets/images/icons/datx.svg deleted file mode 100644 index cd602ab..0000000 --- a/assets/images/icons/datx.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/assets/images/icons/dbc.svg b/assets/images/icons/dbc.svg deleted file mode 100644 index 6e39ad1..0000000 --- a/assets/images/icons/dbc.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/assets/images/icons/dcc.svg b/assets/images/icons/dcc.svg deleted file mode 100644 index d88f747..0000000 --- a/assets/images/icons/dcc.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/dcn.svg b/assets/images/icons/dcn.svg deleted file mode 100644 index f7c7ee2..0000000 --- a/assets/images/icons/dcn.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/dcr.svg b/assets/images/icons/dcr.svg deleted file mode 100644 index 854b810..0000000 --- a/assets/images/icons/dcr.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dct.svg b/assets/images/icons/dct.svg deleted file mode 100644 index f868420..0000000 --- a/assets/images/icons/dct.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ddd.svg b/assets/images/icons/ddd.svg deleted file mode 100644 index 9192225..0000000 --- a/assets/images/icons/ddd.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/dent.svg b/assets/images/icons/dent.svg deleted file mode 100644 index e55cf53..0000000 --- a/assets/images/icons/dent.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/dep.svg b/assets/images/icons/dep.svg deleted file mode 100644 index 9f84146..0000000 --- a/assets/images/icons/dep.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/assets/images/icons/deri.svg b/assets/images/icons/deri.svg deleted file mode 100644 index 0f30331..0000000 --- a/assets/images/icons/deri.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/dfi.svg b/assets/images/icons/dfi.svg deleted file mode 100644 index 5314806..0000000 --- a/assets/images/icons/dfi.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/dft.svg b/assets/images/icons/dft.svg deleted file mode 100644 index 9a20ff6..0000000 --- a/assets/images/icons/dft.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dfyn.svg b/assets/images/icons/dfyn.svg deleted file mode 100644 index 301ea94..0000000 --- a/assets/images/icons/dfyn.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/dgb.svg b/assets/images/icons/dgb.svg deleted file mode 100644 index e7ae1de..0000000 --- a/assets/images/icons/dgb.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dgd.svg b/assets/images/icons/dgd.svg deleted file mode 100644 index 60cb84b..0000000 --- a/assets/images/icons/dgd.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dgtx.svg b/assets/images/icons/dgtx.svg deleted file mode 100644 index 14c0766..0000000 --- a/assets/images/icons/dgtx.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/dia.svg b/assets/images/icons/dia.svg deleted file mode 100644 index b195ab8..0000000 --- a/assets/images/icons/dia.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dinero.svg b/assets/images/icons/dinero.svg deleted file mode 100644 index e50c54a..0000000 --- a/assets/images/icons/dinero.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/divi.svg b/assets/images/icons/divi.svg deleted file mode 100644 index 5a55277..0000000 --- a/assets/images/icons/divi.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/dlt.svg b/assets/images/icons/dlt.svg deleted file mode 100644 index d363216..0000000 --- a/assets/images/icons/dlt.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/assets/images/icons/dmt.svg b/assets/images/icons/dmt.svg deleted file mode 100644 index 5199e1a..0000000 --- a/assets/images/icons/dmt.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dnt.svg b/assets/images/icons/dnt.svg deleted file mode 100644 index a4d2efc..0000000 --- a/assets/images/icons/dnt.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/dock.svg b/assets/images/icons/dock.svg deleted file mode 100644 index 8d235fd..0000000 --- a/assets/images/icons/dock.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/dodo.svg b/assets/images/icons/dodo.svg deleted file mode 100644 index 04c048f..0000000 --- a/assets/images/icons/dodo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/doge.svg b/assets/images/icons/doge.svg deleted file mode 100644 index 3a312e5..0000000 --- a/assets/images/icons/doge.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/dojo.svg b/assets/images/icons/dojo.svg deleted file mode 100644 index a94836f..0000000 --- a/assets/images/icons/dojo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/dome.svg b/assets/images/icons/dome.svg deleted file mode 100644 index cab4fc0..0000000 --- a/assets/images/icons/dome.svg +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dor.svg b/assets/images/icons/dor.svg deleted file mode 100644 index 947d2ca..0000000 --- a/assets/images/icons/dor.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/dot.svg b/assets/images/icons/dot.svg deleted file mode 100644 index 92352bf..0000000 --- a/assets/images/icons/dot.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/drgn.svg b/assets/images/icons/drgn.svg deleted file mode 100644 index 2b16542..0000000 --- a/assets/images/icons/drgn.svg +++ /dev/null @@ -1,810 +0,0 @@ - - - -drgn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/drop.svg b/assets/images/icons/drop.svg deleted file mode 100644 index 2e46f72..0000000 --- a/assets/images/icons/drop.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dta.svg b/assets/images/icons/dta.svg deleted file mode 100644 index 15d2513..0000000 --- a/assets/images/icons/dta.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/dtr.svg b/assets/images/icons/dtr.svg deleted file mode 100644 index 9838c09..0000000 --- a/assets/images/icons/dtr.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/dtx.svg b/assets/images/icons/dtx.svg deleted file mode 100644 index 3ffeb80..0000000 --- a/assets/images/icons/dtx.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/dvf.svg b/assets/images/icons/dvf.svg deleted file mode 100644 index fd242f6..0000000 --- a/assets/images/icons/dvf.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/dxd.svg b/assets/images/icons/dxd.svg deleted file mode 100644 index 804b8bb..0000000 --- a/assets/images/icons/dxd.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/dxt.svg b/assets/images/icons/dxt.svg deleted file mode 100644 index 98eeb8d..0000000 --- a/assets/images/icons/dxt.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/dydx.svg b/assets/images/icons/dydx.svg deleted file mode 100644 index c67b0f3..0000000 --- a/assets/images/icons/dydx.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/edg.svg b/assets/images/icons/edg.svg deleted file mode 100644 index 2cc6ef4..0000000 --- a/assets/images/icons/edg.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/edo.svg b/assets/images/icons/edo.svg deleted file mode 100644 index 9840d0c..0000000 --- a/assets/images/icons/edo.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/efi.svg b/assets/images/icons/efi.svg deleted file mode 100644 index 796d8f1..0000000 --- a/assets/images/icons/efi.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/efx.svg b/assets/images/icons/efx.svg deleted file mode 100644 index f133b04..0000000 --- a/assets/images/icons/efx.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - diff --git a/assets/images/icons/egld.svg b/assets/images/icons/egld.svg deleted file mode 100644 index 13387fa..0000000 --- a/assets/images/icons/egld.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/egt.svg b/assets/images/icons/egt.svg deleted file mode 100644 index 4205310..0000000 --- a/assets/images/icons/egt.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/ekg.svg b/assets/images/icons/ekg.svg deleted file mode 100644 index 651a5bb..0000000 --- a/assets/images/icons/ekg.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/ekt.svg b/assets/images/icons/ekt.svg deleted file mode 100644 index 447f07d..0000000 --- a/assets/images/icons/ekt.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ela.svg b/assets/images/icons/ela.svg deleted file mode 100644 index d447e87..0000000 --- a/assets/images/icons/ela.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/elec.svg b/assets/images/icons/elec.svg deleted file mode 100644 index 8291b97..0000000 --- a/assets/images/icons/elec.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/elf.svg b/assets/images/icons/elf.svg deleted file mode 100644 index afb50f0..0000000 --- a/assets/images/icons/elf.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/elg.svg b/assets/images/icons/elg.svg deleted file mode 100644 index d515a43..0000000 --- a/assets/images/icons/elg.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/emc.svg b/assets/images/icons/emc.svg deleted file mode 100644 index b80e572..0000000 --- a/assets/images/icons/emc.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/emc2.svg b/assets/images/icons/emc2.svg deleted file mode 100644 index 7cbdb86..0000000 --- a/assets/images/icons/emc2.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/eng.svg b/assets/images/icons/eng.svg deleted file mode 100644 index a415a5c..0000000 --- a/assets/images/icons/eng.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/enj.svg b/assets/images/icons/enj.svg deleted file mode 100644 index 2437dff..0000000 --- a/assets/images/icons/enj.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ens.svg b/assets/images/icons/ens.svg deleted file mode 100644 index 7729c8f..0000000 --- a/assets/images/icons/ens.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/eos.svg b/assets/images/icons/eos.svg deleted file mode 100644 index f1b964e..0000000 --- a/assets/images/icons/eos.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - diff --git a/assets/images/icons/eosdac.svg b/assets/images/icons/eosdac.svg deleted file mode 100644 index 12f9a21..0000000 --- a/assets/images/icons/eosdac.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ern.svg b/assets/images/icons/ern.svg deleted file mode 100644 index a8e7930..0000000 --- a/assets/images/icons/ern.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/esd.svg b/assets/images/icons/esd.svg deleted file mode 100644 index 08d6ae8..0000000 --- a/assets/images/icons/esd.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/esp.svg b/assets/images/icons/esp.svg deleted file mode 100644 index 1498c90..0000000 --- a/assets/images/icons/esp.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ess.svg b/assets/images/icons/ess.svg deleted file mode 100644 index 1a9584d..0000000 --- a/assets/images/icons/ess.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/assets/images/icons/etc.svg b/assets/images/icons/etc.svg deleted file mode 100644 index a7bcfa1..0000000 --- a/assets/images/icons/etc.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/ethw.svg b/assets/images/icons/ethw.svg deleted file mode 100644 index 2442d7d..0000000 --- a/assets/images/icons/ethw.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/etn.svg b/assets/images/icons/etn.svg deleted file mode 100644 index 476e08a..0000000 --- a/assets/images/icons/etn.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/etp.svg b/assets/images/icons/etp.svg deleted file mode 100644 index c871cfa..0000000 --- a/assets/images/icons/etp.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/etz.svg b/assets/images/icons/etz.svg deleted file mode 100644 index 50e747c..0000000 --- a/assets/images/icons/etz.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/euroc.svg b/assets/images/icons/euroc.svg deleted file mode 100644 index 8e34623..0000000 --- a/assets/images/icons/euroc.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ever.svg b/assets/images/icons/ever.svg deleted file mode 100644 index ec90637..0000000 --- a/assets/images/icons/ever.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/evmos.svg b/assets/images/icons/evmos.svg deleted file mode 100644 index 1cf67ad..0000000 --- a/assets/images/icons/evmos.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/assets/images/icons/evx.svg b/assets/images/icons/evx.svg deleted file mode 100644 index f1e6372..0000000 --- a/assets/images/icons/evx.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - -evx - - - - diff --git a/assets/images/icons/ewt.svg b/assets/images/icons/ewt.svg deleted file mode 100644 index c55dd4c..0000000 --- a/assets/images/icons/ewt.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/exrn.svg b/assets/images/icons/exrn.svg deleted file mode 100644 index 9761d11..0000000 --- a/assets/images/icons/exrn.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/exy.svg b/assets/images/icons/exy.svg deleted file mode 100644 index 333def6..0000000 --- a/assets/images/icons/exy.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ezy.svg b/assets/images/icons/ezy.svg deleted file mode 100644 index df61d64..0000000 --- a/assets/images/icons/ezy.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/fab.svg b/assets/images/icons/fab.svg deleted file mode 100644 index e71de90..0000000 --- a/assets/images/icons/fab.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/fct.svg b/assets/images/icons/fct.svg deleted file mode 100644 index 4df1f48..0000000 --- a/assets/images/icons/fct.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/feed.svg b/assets/images/icons/feed.svg deleted file mode 100644 index c9f866b..0000000 --- a/assets/images/icons/feed.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/fei.svg b/assets/images/icons/fei.svg deleted file mode 100644 index 904c02e..0000000 --- a/assets/images/icons/fei.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/fet.svg b/assets/images/icons/fet.svg deleted file mode 100644 index 0af463e..0000000 --- a/assets/images/icons/fet.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/fida.svg b/assets/images/icons/fida.svg deleted file mode 100644 index 6bbacda..0000000 --- a/assets/images/icons/fida.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/fil.svg b/assets/images/icons/fil.svg deleted file mode 100644 index 2f7341a..0000000 --- a/assets/images/icons/fil.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/filda.svg b/assets/images/icons/filda.svg deleted file mode 100644 index 26df3d6..0000000 --- a/assets/images/icons/filda.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/flex.svg b/assets/images/icons/flex.svg deleted file mode 100644 index 1a27bfe..0000000 --- a/assets/images/icons/flex.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/flow.svg b/assets/images/icons/flow.svg deleted file mode 100644 index 3a8d071..0000000 --- a/assets/images/icons/flow.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/flux.svg b/assets/images/icons/flux.svg deleted file mode 100644 index 9269c7e..0000000 --- a/assets/images/icons/flux.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/fota.svg b/assets/images/icons/fota.svg deleted file mode 100644 index 02a2557..0000000 --- a/assets/images/icons/fota.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/assets/images/icons/fox.svg b/assets/images/icons/fox.svg deleted file mode 100644 index 757b45b..0000000 --- a/assets/images/icons/fox.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/frax.svg b/assets/images/icons/frax.svg deleted file mode 100644 index a8de0ae..0000000 --- a/assets/images/icons/frax.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/frm.svg b/assets/images/icons/frm.svg deleted file mode 100644 index 7e446ad..0000000 --- a/assets/images/icons/frm.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/front.svg b/assets/images/icons/front.svg deleted file mode 100644 index 45cb3d1..0000000 --- a/assets/images/icons/front.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/fsn.svg b/assets/images/icons/fsn.svg deleted file mode 100644 index f23129e..0000000 --- a/assets/images/icons/fsn.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ft.svg b/assets/images/icons/ft.svg deleted file mode 100644 index d03cd5e..0000000 --- a/assets/images/icons/ft.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - diff --git a/assets/images/icons/ftc.svg b/assets/images/icons/ftc.svg deleted file mode 100644 index 5780e19..0000000 --- a/assets/images/icons/ftc.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ftt.svg b/assets/images/icons/ftt.svg deleted file mode 100644 index d296105..0000000 --- a/assets/images/icons/ftt.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/fuel.svg b/assets/images/icons/fuel.svg deleted file mode 100644 index 1beabeb..0000000 --- a/assets/images/icons/fuel.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/fun.svg b/assets/images/icons/fun.svg deleted file mode 100644 index b1fefdb..0000000 --- a/assets/images/icons/fun.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/assets/images/icons/fxc.svg b/assets/images/icons/fxc.svg deleted file mode 100644 index 5661b20..0000000 --- a/assets/images/icons/fxc.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/fxs.svg b/assets/images/icons/fxs.svg deleted file mode 100644 index e0d5ebe..0000000 --- a/assets/images/icons/fxs.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/assets/images/icons/fxt.svg b/assets/images/icons/fxt.svg deleted file mode 100644 index 84fd0e2..0000000 --- a/assets/images/icons/fxt.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/gal.svg b/assets/images/icons/gal.svg deleted file mode 100644 index d863210..0000000 --- a/assets/images/icons/gal.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/gala.svg b/assets/images/icons/gala.svg deleted file mode 100644 index 094d91d..0000000 --- a/assets/images/icons/gala.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/gdc.svg b/assets/images/icons/gdc.svg deleted file mode 100644 index 16f1b50..0000000 --- a/assets/images/icons/gdc.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/gem.svg b/assets/images/icons/gem.svg deleted file mode 100644 index a39ef86..0000000 --- a/assets/images/icons/gem.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/gen.svg b/assets/images/icons/gen.svg deleted file mode 100644 index 288e248..0000000 --- a/assets/images/icons/gen.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/glmr.svg b/assets/images/icons/glmr.svg deleted file mode 100644 index 5662113..0000000 --- a/assets/images/icons/glmr.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/gmt.svg b/assets/images/icons/gmt.svg deleted file mode 100644 index adcf3cb..0000000 --- a/assets/images/icons/gmt.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/gmx.svg b/assets/images/icons/gmx.svg deleted file mode 100644 index 0b21ef9..0000000 --- a/assets/images/icons/gmx.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/gno.svg b/assets/images/icons/gno.svg deleted file mode 100644 index b4f914d..0000000 --- a/assets/images/icons/gno.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/gns.svg b/assets/images/icons/gns.svg deleted file mode 100644 index 2233a60..0000000 --- a/assets/images/icons/gns.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/gnt.svg b/assets/images/icons/gnt.svg deleted file mode 100644 index 68ac61d..0000000 --- a/assets/images/icons/gnt.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/assets/images/icons/gnx.svg b/assets/images/icons/gnx.svg deleted file mode 100644 index 16859d0..0000000 --- a/assets/images/icons/gnx.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/go.svg b/assets/images/icons/go.svg deleted file mode 100644 index 350cba5..0000000 --- a/assets/images/icons/go.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/goc.svg b/assets/images/icons/goc.svg deleted file mode 100644 index 5bbe87f..0000000 --- a/assets/images/icons/goc.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/got.svg b/assets/images/icons/got.svg deleted file mode 100644 index cdb5ff1..0000000 --- a/assets/images/icons/got.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/assets/images/icons/grin.svg b/assets/images/icons/grin.svg deleted file mode 100644 index ad8ed97..0000000 --- a/assets/images/icons/grin.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/grs.svg b/assets/images/icons/grs.svg deleted file mode 100644 index 80cc142..0000000 --- a/assets/images/icons/grs.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/grt.svg b/assets/images/icons/grt.svg deleted file mode 100644 index 2187098..0000000 --- a/assets/images/icons/grt.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/gsc.svg b/assets/images/icons/gsc.svg deleted file mode 100644 index 81cbc4c..0000000 --- a/assets/images/icons/gsc.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/gswap.svg b/assets/images/icons/gswap.svg deleted file mode 100644 index 7c61882..0000000 --- a/assets/images/icons/gswap.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/gt.svg b/assets/images/icons/gt.svg deleted file mode 100644 index b0a7618..0000000 --- a/assets/images/icons/gt.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/gtc.svg b/assets/images/icons/gtc.svg deleted file mode 100644 index 34f562b..0000000 --- a/assets/images/icons/gtc.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/gto.svg b/assets/images/icons/gto.svg deleted file mode 100644 index a1cb917..0000000 --- a/assets/images/icons/gto.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/gusd.svg b/assets/images/icons/gusd.svg deleted file mode 100644 index 5eb420b..0000000 --- a/assets/images/icons/gusd.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/gvt.svg b/assets/images/icons/gvt.svg deleted file mode 100644 index 89d0c0c..0000000 --- a/assets/images/icons/gvt.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/gxs.svg b/assets/images/icons/gxs.svg deleted file mode 100644 index 1f9f417..0000000 --- a/assets/images/icons/gxs.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/assets/images/icons/hakka.svg b/assets/images/icons/hakka.svg deleted file mode 100644 index 02d6568..0000000 --- a/assets/images/icons/hakka.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/hav.svg b/assets/images/icons/hav.svg deleted file mode 100644 index eed9b12..0000000 --- a/assets/images/icons/hav.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/hbar.svg b/assets/images/icons/hbar.svg deleted file mode 100644 index d098499..0000000 --- a/assets/images/icons/hbar.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/assets/images/icons/hc.svg b/assets/images/icons/hc.svg deleted file mode 100644 index 6e3f8dc..0000000 --- a/assets/images/icons/hc.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/heart.svg b/assets/images/icons/heart.svg deleted file mode 100644 index 5017cf8..0000000 --- a/assets/images/icons/heart.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/assets/images/icons/hedg.svg b/assets/images/icons/hedg.svg deleted file mode 100644 index 92e6866..0000000 --- a/assets/images/icons/hedg.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/her.svg b/assets/images/icons/her.svg deleted file mode 100644 index 7e3c7ea..0000000 --- a/assets/images/icons/her.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/assets/images/icons/hex.svg b/assets/images/icons/hex.svg deleted file mode 100644 index 47f82b2..0000000 --- a/assets/images/icons/hex.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/high.svg b/assets/images/icons/high.svg deleted file mode 100644 index 30d5e20..0000000 --- a/assets/images/icons/high.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/hive.svg b/assets/images/icons/hive.svg deleted file mode 100644 index bb8a3a1..0000000 --- a/assets/images/icons/hive.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/hnt.svg b/assets/images/icons/hnt.svg deleted file mode 100644 index 5626515..0000000 --- a/assets/images/icons/hnt.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - diff --git a/assets/images/icons/hot-x.svg b/assets/images/icons/hot-x.svg deleted file mode 100644 index 6e275b1..0000000 --- a/assets/images/icons/hot-x.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/assets/images/icons/hot.svg b/assets/images/icons/hot.svg deleted file mode 100644 index 648bf8a..0000000 --- a/assets/images/icons/hot.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/assets/images/icons/hpb.svg b/assets/images/icons/hpb.svg deleted file mode 100644 index b90c4e5..0000000 --- a/assets/images/icons/hpb.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/hsr.svg b/assets/images/icons/hsr.svg deleted file mode 100644 index f41d811..0000000 --- a/assets/images/icons/hsr.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/ht.svg b/assets/images/icons/ht.svg deleted file mode 100644 index d8c040e..0000000 --- a/assets/images/icons/ht.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/hum.svg b/assets/images/icons/hum.svg deleted file mode 100644 index 940f937..0000000 --- a/assets/images/icons/hum.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/husd.svg b/assets/images/icons/husd.svg deleted file mode 100644 index 7b29959..0000000 --- a/assets/images/icons/husd.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/hvn.svg b/assets/images/icons/hvn.svg deleted file mode 100644 index 82f8073..0000000 --- a/assets/images/icons/hvn.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/hydro.svg b/assets/images/icons/hydro.svg deleted file mode 100644 index 38aba12..0000000 --- a/assets/images/icons/hydro.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/hyn.svg b/assets/images/icons/hyn.svg deleted file mode 100644 index fb11824..0000000 --- a/assets/images/icons/hyn.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/hzn.svg b/assets/images/icons/hzn.svg deleted file mode 100644 index 56798e6..0000000 --- a/assets/images/icons/hzn.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ibat.svg b/assets/images/icons/ibat.svg deleted file mode 100644 index be5a28d..0000000 --- a/assets/images/icons/ibat.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/icn.svg b/assets/images/icons/icn.svg deleted file mode 100644 index fbd2bd3..0000000 --- a/assets/images/icons/icn.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/icp.svg b/assets/images/icons/icp.svg deleted file mode 100644 index a26c3c6..0000000 --- a/assets/images/icons/icp.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/icx.svg b/assets/images/icons/icx.svg deleted file mode 100644 index e284daa..0000000 --- a/assets/images/icons/icx.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/idai.svg b/assets/images/icons/idai.svg deleted file mode 100644 index b81dfa5..0000000 --- a/assets/images/icons/idai.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/idex.svg b/assets/images/icons/idex.svg deleted file mode 100644 index ec7a01c..0000000 --- a/assets/images/icons/idex.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ieth.svg b/assets/images/icons/ieth.svg deleted file mode 100644 index 37cb153..0000000 --- a/assets/images/icons/ieth.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ignis.svg b/assets/images/icons/ignis.svg deleted file mode 100644 index 2400f38..0000000 --- a/assets/images/icons/ignis.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/iknc.svg b/assets/images/icons/iknc.svg deleted file mode 100644 index 6bf3bf5..0000000 --- a/assets/images/icons/iknc.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ilink.svg b/assets/images/icons/ilink.svg deleted file mode 100644 index 8f35c4d..0000000 --- a/assets/images/icons/ilink.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ilv.svg b/assets/images/icons/ilv.svg deleted file mode 100644 index 1129d20..0000000 --- a/assets/images/icons/ilv.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/assets/images/icons/imx.svg b/assets/images/icons/imx.svg deleted file mode 100644 index 7b531ed..0000000 --- a/assets/images/icons/imx.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/assets/images/icons/inb.svg b/assets/images/icons/inb.svg deleted file mode 100644 index 86f4430..0000000 --- a/assets/images/icons/inb.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ins.svg b/assets/images/icons/ins.svg deleted file mode 100644 index 6c52844..0000000 --- a/assets/images/icons/ins.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - -ins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/iost.svg b/assets/images/icons/iost.svg deleted file mode 100644 index 6689c9b..0000000 --- a/assets/images/icons/iost.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - -资源 7xhdpi - - diff --git a/assets/images/icons/iota.svg b/assets/images/icons/iota.svg deleted file mode 100644 index 08e5bcf..0000000 --- a/assets/images/icons/iota.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - diff --git a/assets/images/icons/iotx.svg b/assets/images/icons/iotx.svg deleted file mode 100644 index fcd9260..0000000 --- a/assets/images/icons/iotx.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/iq.svg b/assets/images/icons/iq.svg deleted file mode 100644 index fcf8bc9..0000000 --- a/assets/images/icons/iq.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/irep.svg b/assets/images/icons/irep.svg deleted file mode 100644 index de825d0..0000000 --- a/assets/images/icons/irep.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/iris.svg b/assets/images/icons/iris.svg deleted file mode 100644 index da456a3..0000000 --- a/assets/images/icons/iris.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ist.svg b/assets/images/icons/ist.svg deleted file mode 100644 index 0bb2f33..0000000 --- a/assets/images/icons/ist.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/isusd.svg b/assets/images/icons/isusd.svg deleted file mode 100644 index ef46d60..0000000 --- a/assets/images/icons/isusd.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/iusdc.svg b/assets/images/icons/iusdc.svg deleted file mode 100644 index f9d2c93..0000000 --- a/assets/images/icons/iusdc.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/iwbtc.svg b/assets/images/icons/iwbtc.svg deleted file mode 100644 index 3490f52..0000000 --- a/assets/images/icons/iwbtc.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ixt.svg b/assets/images/icons/ixt.svg deleted file mode 100644 index 8c54f02..0000000 --- a/assets/images/icons/ixt.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/izrx.svg b/assets/images/icons/izrx.svg deleted file mode 100644 index 2836447..0000000 --- a/assets/images/icons/izrx.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/jnt.svg b/assets/images/icons/jnt.svg deleted file mode 100644 index 7cbec56..0000000 --- a/assets/images/icons/jnt.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - diff --git a/assets/images/icons/jrt.svg b/assets/images/icons/jrt.svg deleted file mode 100644 index b9d846c..0000000 --- a/assets/images/icons/jrt.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/jst.svg b/assets/images/icons/jst.svg deleted file mode 100644 index 385aa2d..0000000 --- a/assets/images/icons/jst.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/juno.svg b/assets/images/icons/juno.svg deleted file mode 100644 index e84539d..0000000 --- a/assets/images/icons/juno.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/kava.svg b/assets/images/icons/kava.svg deleted file mode 100644 index 5ce908c..0000000 --- a/assets/images/icons/kava.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/kcs.svg b/assets/images/icons/kcs.svg deleted file mode 100644 index c348cf6..0000000 --- a/assets/images/icons/kcs.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/kda.svg b/assets/images/icons/kda.svg deleted file mode 100644 index 752bb28..0000000 --- a/assets/images/icons/kda.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/keep.svg b/assets/images/icons/keep.svg deleted file mode 100644 index 301150c..0000000 --- a/assets/images/icons/keep.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/assets/images/icons/key.svg b/assets/images/icons/key.svg deleted file mode 100644 index c14ca1b..0000000 --- a/assets/images/icons/key.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/kick.svg b/assets/images/icons/kick.svg deleted file mode 100644 index e011590..0000000 --- a/assets/images/icons/kick.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/kin.svg b/assets/images/icons/kin.svg deleted file mode 100644 index 292d25a..0000000 --- a/assets/images/icons/kin.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/kira.svg b/assets/images/icons/kira.svg deleted file mode 100644 index 27c47da..0000000 --- a/assets/images/icons/kira.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/kiro.svg b/assets/images/icons/kiro.svg deleted file mode 100644 index 22e43a5..0000000 --- a/assets/images/icons/kiro.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/klay.svg b/assets/images/icons/klay.svg deleted file mode 100644 index b963e42..0000000 --- a/assets/images/icons/klay.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/klv.svg b/assets/images/icons/klv.svg deleted file mode 100644 index 4746961..0000000 --- a/assets/images/icons/klv.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/kmd.svg b/assets/images/icons/kmd.svg deleted file mode 100644 index 902c00b..0000000 --- a/assets/images/icons/kmd.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/knc.svg b/assets/images/icons/knc.svg deleted file mode 100644 index 474ce44..0000000 --- a/assets/images/icons/knc.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/ksm.svg b/assets/images/icons/ksm.svg deleted file mode 100644 index 8d8c996..0000000 --- a/assets/images/icons/ksm.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ktn.svg b/assets/images/icons/ktn.svg deleted file mode 100644 index f4b66a4..0000000 --- a/assets/images/icons/ktn.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/kub.svg b/assets/images/icons/kub.svg deleted file mode 100644 index e2885d2..0000000 --- a/assets/images/icons/kub.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/lamb.svg b/assets/images/icons/lamb.svg deleted file mode 100644 index 8994c53..0000000 --- a/assets/images/icons/lamb.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/land.svg b/assets/images/icons/land.svg deleted file mode 100644 index 2426598..0000000 --- a/assets/images/icons/land.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/lba.svg b/assets/images/icons/lba.svg deleted file mode 100644 index 7dd5862..0000000 --- a/assets/images/icons/lba.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/assets/images/icons/lcx.svg b/assets/images/icons/lcx.svg deleted file mode 100644 index d7f0e68..0000000 --- a/assets/images/icons/lcx.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/ldo.svg b/assets/images/icons/ldo.svg deleted file mode 100644 index 3723584..0000000 --- a/assets/images/icons/ldo.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/lend.svg b/assets/images/icons/lend.svg deleted file mode 100644 index e714e21..0000000 --- a/assets/images/icons/lend.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/leo.svg b/assets/images/icons/leo.svg deleted file mode 100644 index 7e63d52..0000000 --- a/assets/images/icons/leo.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/link.svg b/assets/images/icons/link.svg deleted file mode 100644 index 8a7e473..0000000 --- a/assets/images/icons/link.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/lit.svg b/assets/images/icons/lit.svg deleted file mode 100644 index 525da93..0000000 --- a/assets/images/icons/lit.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/lky.svg b/assets/images/icons/lky.svg deleted file mode 100644 index cf64633..0000000 --- a/assets/images/icons/lky.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/ln.svg b/assets/images/icons/ln.svg deleted file mode 100644 index 8f7f2af..0000000 --- a/assets/images/icons/ln.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/lode.svg b/assets/images/icons/lode.svg deleted file mode 100644 index 47b0243..0000000 --- a/assets/images/icons/lode.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/loki.svg b/assets/images/icons/loki.svg deleted file mode 100644 index 6c2acb4..0000000 --- a/assets/images/icons/loki.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/lon.svg b/assets/images/icons/lon.svg deleted file mode 100644 index 74c2e9e..0000000 --- a/assets/images/icons/lon.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/looks.svg b/assets/images/icons/looks.svg deleted file mode 100644 index 6302643..0000000 --- a/assets/images/icons/looks.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/loom.svg b/assets/images/icons/loom.svg deleted file mode 100644 index 24e1591..0000000 --- a/assets/images/icons/loom.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/lpt.svg b/assets/images/icons/lpt.svg deleted file mode 100644 index 34d7a23..0000000 --- a/assets/images/icons/lpt.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/lqd.svg b/assets/images/icons/lqd.svg deleted file mode 100644 index 2c6b719..0000000 --- a/assets/images/icons/lqd.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/lqty.svg b/assets/images/icons/lqty.svg deleted file mode 100644 index dff1425..0000000 --- a/assets/images/icons/lqty.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/lrc.svg b/assets/images/icons/lrc.svg deleted file mode 100644 index 27c6b56..0000000 --- a/assets/images/icons/lrc.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/lsk.svg b/assets/images/icons/lsk.svg deleted file mode 100644 index a61dfe5..0000000 --- a/assets/images/icons/lsk.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/ltc.svg b/assets/images/icons/ltc.svg deleted file mode 100644 index cb37d27..0000000 --- a/assets/images/icons/ltc.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/lto.svg b/assets/images/icons/lto.svg deleted file mode 100644 index 605e30b..0000000 --- a/assets/images/icons/lto.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/luca.svg b/assets/images/icons/luca.svg deleted file mode 100644 index 847171c..0000000 --- a/assets/images/icons/luca.svg +++ /dev/null @@ -1,727 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/lun.svg b/assets/images/icons/lun.svg deleted file mode 100644 index f1d5e16..0000000 --- a/assets/images/icons/lun.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/assets/images/icons/luna.svg b/assets/images/icons/luna.svg deleted file mode 100644 index 01ee4ac..0000000 --- a/assets/images/icons/luna.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/lusd.svg b/assets/images/icons/lusd.svg deleted file mode 100644 index 8225faf..0000000 --- a/assets/images/icons/lusd.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/lxt.svg b/assets/images/icons/lxt.svg deleted file mode 100644 index 44e2657..0000000 --- a/assets/images/icons/lxt.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/lym.svg b/assets/images/icons/lym.svg deleted file mode 100644 index fc9dd31..0000000 --- a/assets/images/icons/lym.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/maha.svg b/assets/images/icons/maha.svg deleted file mode 100644 index 83f4082..0000000 --- a/assets/images/icons/maha.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/maid.svg b/assets/images/icons/maid.svg deleted file mode 100644 index d4a50b6..0000000 --- a/assets/images/icons/maid.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/man.svg b/assets/images/icons/man.svg deleted file mode 100644 index 8d0daea..0000000 --- a/assets/images/icons/man.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mana.svg b/assets/images/icons/mana.svg deleted file mode 100644 index 3cf2954..0000000 --- a/assets/images/icons/mana.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mars.svg b/assets/images/icons/mars.svg deleted file mode 100644 index 5c530e8..0000000 --- a/assets/images/icons/mars.svg +++ /dev/null @@ -1,17292 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mask.svg b/assets/images/icons/mask.svg deleted file mode 100644 index 2da5f05..0000000 --- a/assets/images/icons/mask.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/math.svg b/assets/images/icons/math.svg deleted file mode 100644 index 08c11e1..0000000 --- a/assets/images/icons/math.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/matter.svg b/assets/images/icons/matter.svg deleted file mode 100644 index 5201047..0000000 --- a/assets/images/icons/matter.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mbc.svg b/assets/images/icons/mbc.svg deleted file mode 100644 index 0b42cb2..0000000 --- a/assets/images/icons/mbc.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/mbox.svg b/assets/images/icons/mbox.svg deleted file mode 100644 index 3236a9d..0000000 --- a/assets/images/icons/mbox.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mc.svg b/assets/images/icons/mc.svg deleted file mode 100644 index bd095ad..0000000 --- a/assets/images/icons/mc.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mco.svg b/assets/images/icons/mco.svg deleted file mode 100644 index 7d9b57d..0000000 --- a/assets/images/icons/mco.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/assets/images/icons/mcx.svg b/assets/images/icons/mcx.svg deleted file mode 100644 index cf649ef..0000000 --- a/assets/images/icons/mcx.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mda.svg b/assets/images/icons/mda.svg deleted file mode 100644 index a6023d4..0000000 --- a/assets/images/icons/mda.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/assets/images/icons/mds.svg b/assets/images/icons/mds.svg deleted file mode 100644 index 76f4205..0000000 --- a/assets/images/icons/mds.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/med.svg b/assets/images/icons/med.svg deleted file mode 100644 index b6e3dd8..0000000 --- a/assets/images/icons/med.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/medx.svg b/assets/images/icons/medx.svg deleted file mode 100644 index f4ecf79..0000000 --- a/assets/images/icons/medx.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/met.svg b/assets/images/icons/met.svg deleted file mode 100644 index ca9dcf6..0000000 --- a/assets/images/icons/met.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - diff --git a/assets/images/icons/metano.svg b/assets/images/icons/metano.svg deleted file mode 100644 index b19d1ee..0000000 --- a/assets/images/icons/metano.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/metis.svg b/assets/images/icons/metis.svg deleted file mode 100644 index 1afeac6..0000000 --- a/assets/images/icons/metis.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mex.svg b/assets/images/icons/mex.svg deleted file mode 100644 index fee1b9c..0000000 --- a/assets/images/icons/mex.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mfg.svg b/assets/images/icons/mfg.svg deleted file mode 100644 index 71154da..0000000 --- a/assets/images/icons/mfg.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/mft.svg b/assets/images/icons/mft.svg deleted file mode 100644 index cea9ec9..0000000 --- a/assets/images/icons/mft.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mim.svg b/assets/images/icons/mim.svg deleted file mode 100644 index d96d312..0000000 --- a/assets/images/icons/mim.svg +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mimatic.svg b/assets/images/icons/mimatic.svg deleted file mode 100644 index 500c01a..0000000 --- a/assets/images/icons/mimatic.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mina.svg b/assets/images/icons/mina.svg deleted file mode 100644 index 6d5a015..0000000 --- a/assets/images/icons/mina.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/mir.svg b/assets/images/icons/mir.svg deleted file mode 100644 index 7e72ac0..0000000 --- a/assets/images/icons/mir.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mith.svg b/assets/images/icons/mith.svg deleted file mode 100644 index 4fe53a0..0000000 --- a/assets/images/icons/mith.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/assets/images/icons/mkr.svg b/assets/images/icons/mkr.svg deleted file mode 100644 index e3928e1..0000000 --- a/assets/images/icons/mkr.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mln.svg b/assets/images/icons/mln.svg deleted file mode 100644 index 41f6e95..0000000 --- a/assets/images/icons/mln.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/mngo.svg b/assets/images/icons/mngo.svg deleted file mode 100644 index 7d05b11..0000000 --- a/assets/images/icons/mngo.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mntl.svg b/assets/images/icons/mntl.svg deleted file mode 100644 index ddc475d..0000000 --- a/assets/images/icons/mntl.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/mnw.svg b/assets/images/icons/mnw.svg deleted file mode 100644 index 822a4ce..0000000 --- a/assets/images/icons/mnw.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mod.svg b/assets/images/icons/mod.svg deleted file mode 100644 index d865c32..0000000 --- a/assets/images/icons/mod.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mot.svg b/assets/images/icons/mot.svg deleted file mode 100644 index c10bc88..0000000 --- a/assets/images/icons/mot.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/assets/images/icons/mpl.svg b/assets/images/icons/mpl.svg deleted file mode 100644 index 15723bd..0000000 --- a/assets/images/icons/mpl.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/mta.svg b/assets/images/icons/mta.svg deleted file mode 100644 index 60cc8dd..0000000 --- a/assets/images/icons/mta.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mth.svg b/assets/images/icons/mth.svg deleted file mode 100644 index 06f9a56..0000000 --- a/assets/images/icons/mth.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/mtl.svg b/assets/images/icons/mtl.svg deleted file mode 100644 index 50f63f5..0000000 --- a/assets/images/icons/mtl.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/assets/images/icons/mtn.svg b/assets/images/icons/mtn.svg deleted file mode 100644 index 1ef8a70..0000000 --- a/assets/images/icons/mtn.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/mvc.svg b/assets/images/icons/mvc.svg deleted file mode 100644 index aae4d7f..0000000 --- a/assets/images/icons/mvc.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/mvl.svg b/assets/images/icons/mvl.svg deleted file mode 100644 index 0fc2011..0000000 --- a/assets/images/icons/mvl.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mvp.svg b/assets/images/icons/mvp.svg deleted file mode 100644 index eaff0cf..0000000 --- a/assets/images/icons/mvp.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/mwat.svg b/assets/images/icons/mwat.svg deleted file mode 100644 index 7e02b46..0000000 --- a/assets/images/icons/mwat.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/mwc.svg b/assets/images/icons/mwc.svg deleted file mode 100644 index 62bb59f..0000000 --- a/assets/images/icons/mwc.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/mxm.svg b/assets/images/icons/mxm.svg deleted file mode 100644 index 984daeb..0000000 --- a/assets/images/icons/mxm.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/myb.svg b/assets/images/icons/myb.svg deleted file mode 100644 index 89214a0..0000000 --- a/assets/images/icons/myb.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/nano.svg b/assets/images/icons/nano.svg deleted file mode 100644 index 72b1ca4..0000000 --- a/assets/images/icons/nano.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/assets/images/icons/nas.svg b/assets/images/icons/nas.svg deleted file mode 100644 index b13287f..0000000 --- a/assets/images/icons/nas.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/nav.svg b/assets/images/icons/nav.svg deleted file mode 100644 index b0c49ca..0000000 --- a/assets/images/icons/nav.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ncash.svg b/assets/images/icons/ncash.svg deleted file mode 100644 index 0499eaf..0000000 --- a/assets/images/icons/ncash.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/nct.svg b/assets/images/icons/nct.svg deleted file mode 100644 index 7736b0b..0000000 --- a/assets/images/icons/nct.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/near.svg b/assets/images/icons/near.svg deleted file mode 100644 index 4a71d63..0000000 --- a/assets/images/icons/near.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/assets/images/icons/nebl.svg b/assets/images/icons/nebl.svg deleted file mode 100644 index a71d135..0000000 --- a/assets/images/icons/nebl.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/nec.svg b/assets/images/icons/nec.svg deleted file mode 100644 index 2d38168..0000000 --- a/assets/images/icons/nec.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/neo.svg b/assets/images/icons/neo.svg deleted file mode 100644 index 180f25b..0000000 --- a/assets/images/icons/neo.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/neox.svg b/assets/images/icons/neox.svg deleted file mode 100644 index 49f817a..0000000 --- a/assets/images/icons/neox.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/new.svg b/assets/images/icons/new.svg deleted file mode 100644 index 2a28dd9..0000000 --- a/assets/images/icons/new.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/nex.svg b/assets/images/icons/nex.svg deleted file mode 100644 index 73010fb..0000000 --- a/assets/images/icons/nex.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/nexo.svg b/assets/images/icons/nexo.svg deleted file mode 100644 index ca8d5b6..0000000 --- a/assets/images/icons/nexo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/nexxo.svg b/assets/images/icons/nexxo.svg deleted file mode 100644 index f212a83..0000000 --- a/assets/images/icons/nexxo.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/nft.svg b/assets/images/icons/nft.svg deleted file mode 100644 index af4a083..0000000 --- a/assets/images/icons/nft.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ngc.svg b/assets/images/icons/ngc.svg deleted file mode 100644 index f97e67e..0000000 --- a/assets/images/icons/ngc.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/niox.svg b/assets/images/icons/niox.svg deleted file mode 100644 index 260512b..0000000 --- a/assets/images/icons/niox.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/nkn.svg b/assets/images/icons/nkn.svg deleted file mode 100644 index 41a61d1..0000000 --- a/assets/images/icons/nkn.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/nlg.svg b/assets/images/icons/nlg.svg deleted file mode 100644 index 9508b83..0000000 --- a/assets/images/icons/nlg.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/nmr.svg b/assets/images/icons/nmr.svg deleted file mode 100644 index 2a71fbe..0000000 --- a/assets/images/icons/nmr.svg +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/noia.svg b/assets/images/icons/noia.svg deleted file mode 100644 index 2218fb1..0000000 --- a/assets/images/icons/noia.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/nper.svg b/assets/images/icons/nper.svg deleted file mode 100644 index 2e8c50f..0000000 --- a/assets/images/icons/nper.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/assets/images/icons/npxs.svg b/assets/images/icons/npxs.svg deleted file mode 100644 index d89146a..0000000 --- a/assets/images/icons/npxs.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/nrg.svg b/assets/images/icons/nrg.svg deleted file mode 100644 index 524016d..0000000 --- a/assets/images/icons/nrg.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/nrv.svg b/assets/images/icons/nrv.svg deleted file mode 100644 index 6887c7b..0000000 --- a/assets/images/icons/nrv.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/nrve.svg b/assets/images/icons/nrve.svg deleted file mode 100644 index c7cf556..0000000 --- a/assets/images/icons/nrve.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - -Fill 1 Copy -Created with Sketch. - - - - diff --git a/assets/images/icons/ntic.svg b/assets/images/icons/ntic.svg deleted file mode 100644 index 7652108..0000000 --- a/assets/images/icons/ntic.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/nu.svg b/assets/images/icons/nu.svg deleted file mode 100644 index a3cea42..0000000 --- a/assets/images/icons/nu.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/assets/images/icons/nuls.svg b/assets/images/icons/nuls.svg deleted file mode 100644 index be1816d..0000000 --- a/assets/images/icons/nuls.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/nxs.svg b/assets/images/icons/nxs.svg deleted file mode 100644 index d488ab4..0000000 --- a/assets/images/icons/nxs.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/nxt.svg b/assets/images/icons/nxt.svg deleted file mode 100644 index e9fed79..0000000 --- a/assets/images/icons/nxt.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/oag.svg b/assets/images/icons/oag.svg deleted file mode 100644 index d0c703f..0000000 --- a/assets/images/icons/oag.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/oax.svg b/assets/images/icons/oax.svg deleted file mode 100644 index 151a434..0000000 --- a/assets/images/icons/oax.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/assets/images/icons/ocean.svg b/assets/images/icons/ocean.svg deleted file mode 100644 index cb03344..0000000 --- a/assets/images/icons/ocean.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ocn.svg b/assets/images/icons/ocn.svg deleted file mode 100644 index 8083397..0000000 --- a/assets/images/icons/ocn.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/ode.svg b/assets/images/icons/ode.svg deleted file mode 100644 index 4dc8472..0000000 --- a/assets/images/icons/ode.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/assets/images/icons/ogn.svg b/assets/images/icons/ogn.svg deleted file mode 100644 index 74548a9..0000000 --- a/assets/images/icons/ogn.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ohm.svg b/assets/images/icons/ohm.svg deleted file mode 100644 index 451e0c2..0000000 --- a/assets/images/icons/ohm.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/okb.svg b/assets/images/icons/okb.svg deleted file mode 100644 index b9de7bc..0000000 --- a/assets/images/icons/okb.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/olt.svg b/assets/images/icons/olt.svg deleted file mode 100644 index 974bde8..0000000 --- a/assets/images/icons/olt.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/omg.svg b/assets/images/icons/omg.svg deleted file mode 100644 index 5b9d6c7..0000000 --- a/assets/images/icons/omg.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/one.svg b/assets/images/icons/one.svg deleted file mode 100644 index a58c4a5..0000000 --- a/assets/images/icons/one.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/onion.svg b/assets/images/icons/onion.svg deleted file mode 100644 index a7daf95..0000000 --- a/assets/images/icons/onion.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/ont.svg b/assets/images/icons/ont.svg deleted file mode 100644 index 25cf4fe..0000000 --- a/assets/images/icons/ont.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/op.svg b/assets/images/icons/op.svg deleted file mode 100644 index 2e5ce31..0000000 --- a/assets/images/icons/op.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/images/icons/opbnb.svg b/assets/images/icons/opbnb.svg deleted file mode 100644 index 939fe9e..0000000 --- a/assets/images/icons/opbnb.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/open.svg b/assets/images/icons/open.svg deleted file mode 100644 index 5400cad..0000000 --- a/assets/images/icons/open.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/assets/images/icons/opium.svg b/assets/images/icons/opium.svg deleted file mode 100644 index e3b2915..0000000 --- a/assets/images/icons/opium.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/opx.svg b/assets/images/icons/opx.svg deleted file mode 100644 index 20c59be..0000000 --- a/assets/images/icons/opx.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/orbs.svg b/assets/images/icons/orbs.svg deleted file mode 100644 index 7268834..0000000 --- a/assets/images/icons/orbs.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/orc.svg b/assets/images/icons/orc.svg deleted file mode 100644 index 1f56b14..0000000 --- a/assets/images/icons/orc.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/orn.svg b/assets/images/icons/orn.svg deleted file mode 100644 index 5e53028..0000000 --- a/assets/images/icons/orn.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/osmo.svg b/assets/images/icons/osmo.svg deleted file mode 100644 index 53f4226..0000000 --- a/assets/images/icons/osmo.svg +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ost.svg b/assets/images/icons/ost.svg deleted file mode 100644 index 9526a76..0000000 --- a/assets/images/icons/ost.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/assets/images/icons/ovc.svg b/assets/images/icons/ovc.svg deleted file mode 100644 index ed726da..0000000 --- a/assets/images/icons/ovc.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/oxt.svg b/assets/images/icons/oxt.svg deleted file mode 100644 index e3ee960..0000000 --- a/assets/images/icons/oxt.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/pBTC.svg b/assets/images/icons/pBTC.svg deleted file mode 100644 index 7f37006..0000000 --- a/assets/images/icons/pBTC.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/pai.svg b/assets/images/icons/pai.svg deleted file mode 100644 index 7927a93..0000000 --- a/assets/images/icons/pai.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/paint.svg b/assets/images/icons/paint.svg deleted file mode 100644 index e3350a5..0000000 --- a/assets/images/icons/paint.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pal.svg b/assets/images/icons/pal.svg deleted file mode 100644 index c8be370..0000000 --- a/assets/images/icons/pal.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/par.svg b/assets/images/icons/par.svg deleted file mode 100644 index 61e66ce..0000000 --- a/assets/images/icons/par.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/part.svg b/assets/images/icons/part.svg deleted file mode 100644 index 090f13b..0000000 --- a/assets/images/icons/part.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pax.svg b/assets/images/icons/pax.svg deleted file mode 100644 index 4789296..0000000 --- a/assets/images/icons/pax.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/paxg.svg b/assets/images/icons/paxg.svg deleted file mode 100644 index c0d95b9..0000000 --- a/assets/images/icons/paxg.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pay.svg b/assets/images/icons/pay.svg deleted file mode 100644 index 4db2d99..0000000 --- a/assets/images/icons/pay.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/assets/images/icons/pbirb.svg b/assets/images/icons/pbirb.svg deleted file mode 100644 index 2a050e2..0000000 --- a/assets/images/icons/pbirb.svg +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pbr.svg b/assets/images/icons/pbr.svg deleted file mode 100644 index 21da883..0000000 --- a/assets/images/icons/pbr.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/pendle.svg b/assets/images/icons/pendle.svg deleted file mode 100644 index 7baf392..0000000 --- a/assets/images/icons/pendle.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/perl.svg b/assets/images/icons/perl.svg deleted file mode 100644 index 9d0874a..0000000 --- a/assets/images/icons/perl.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/perp.svg b/assets/images/icons/perp.svg deleted file mode 100644 index ae21d05..0000000 --- a/assets/images/icons/perp.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/pha.svg b/assets/images/icons/pha.svg deleted file mode 100644 index 37988ee..0000000 --- a/assets/images/icons/pha.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/pickle.svg b/assets/images/icons/pickle.svg deleted file mode 100644 index f34f4ff..0000000 --- a/assets/images/icons/pickle.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/pivx.svg b/assets/images/icons/pivx.svg deleted file mode 100644 index fd3c22d..0000000 --- a/assets/images/icons/pivx.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/plDAI.svg b/assets/images/icons/plDAI.svg deleted file mode 100644 index 08ecae1..0000000 --- a/assets/images/icons/plDAI.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/plUSDC.svg b/assets/images/icons/plUSDC.svg deleted file mode 100644 index 5454d6b..0000000 --- a/assets/images/icons/plUSDC.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/play.svg b/assets/images/icons/play.svg deleted file mode 100644 index fdae2ec..0000000 --- a/assets/images/icons/play.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/plr.svg b/assets/images/icons/plr.svg deleted file mode 100644 index c94f179..0000000 --- a/assets/images/icons/plr.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/pltc.svg b/assets/images/icons/pltc.svg deleted file mode 100644 index b005a4b..0000000 --- a/assets/images/icons/pltc.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/png.svg b/assets/images/icons/png.svg deleted file mode 100644 index 68be0ba..0000000 --- a/assets/images/icons/png.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pnk.svg b/assets/images/icons/pnk.svg deleted file mode 100644 index 73c6928..0000000 --- a/assets/images/icons/pnk.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pnt.svg b/assets/images/icons/pnt.svg deleted file mode 100644 index 30a9d44..0000000 --- a/assets/images/icons/pnt.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/poa.svg b/assets/images/icons/poa.svg deleted file mode 100644 index 512d373..0000000 --- a/assets/images/icons/poa.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/poe.svg b/assets/images/icons/poe.svg deleted file mode 100644 index 8ddb134..0000000 --- a/assets/images/icons/poe.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pokt.svg b/assets/images/icons/pokt.svg deleted file mode 100644 index f88b83d..0000000 --- a/assets/images/icons/pokt.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/assets/images/icons/pol.svg b/assets/images/icons/pol.svg new file mode 100644 index 0000000..5af10be --- /dev/null +++ b/assets/images/icons/pol.svg @@ -0,0 +1,15 @@ + + + + + + diff --git a/assets/images/icons/pols.svg b/assets/images/icons/pols.svg deleted file mode 100644 index a29d559..0000000 --- a/assets/images/icons/pols.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/poly-2.svg b/assets/images/icons/poly-2.svg deleted file mode 100644 index be17f7d..0000000 --- a/assets/images/icons/poly-2.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/poly.svg b/assets/images/icons/poly.svg deleted file mode 100644 index e42df7e..0000000 --- a/assets/images/icons/poly.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pom.svg b/assets/images/icons/pom.svg deleted file mode 100644 index d4fdc5c..0000000 --- a/assets/images/icons/pom.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/pond.svg b/assets/images/icons/pond.svg deleted file mode 100644 index 45da9ac..0000000 --- a/assets/images/icons/pond.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/pool.svg b/assets/images/icons/pool.svg deleted file mode 100644 index ed54a3d..0000000 --- a/assets/images/icons/pool.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/powr.svg b/assets/images/icons/powr.svg deleted file mode 100644 index 122c896..0000000 --- a/assets/images/icons/powr.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ppay.svg b/assets/images/icons/ppay.svg deleted file mode 100644 index b593e83..0000000 --- a/assets/images/icons/ppay.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/ppc.svg b/assets/images/icons/ppc.svg deleted file mode 100644 index cffac34..0000000 --- a/assets/images/icons/ppc.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/assets/images/icons/ppp.svg b/assets/images/icons/ppp.svg deleted file mode 100644 index 182ebc4..0000000 --- a/assets/images/icons/ppp.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ppt.svg b/assets/images/icons/ppt.svg deleted file mode 100644 index dd68ced..0000000 --- a/assets/images/icons/ppt.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/pre.svg b/assets/images/icons/pre.svg deleted file mode 100644 index f0fea37..0000000 --- a/assets/images/icons/pre.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/premia.svg b/assets/images/icons/premia.svg deleted file mode 100644 index 277385a..0000000 --- a/assets/images/icons/premia.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/prl.svg b/assets/images/icons/prl.svg deleted file mode 100644 index 8dbab6e..0000000 --- a/assets/images/icons/prl.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - -qrl - - - - - - - - diff --git a/assets/images/icons/pro.svg b/assets/images/icons/pro.svg deleted file mode 100644 index bf00e2d..0000000 --- a/assets/images/icons/pro.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/assets/images/icons/prom.svg b/assets/images/icons/prom.svg deleted file mode 100644 index 34ad1ba..0000000 --- a/assets/images/icons/prom.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/pros.svg b/assets/images/icons/pros.svg deleted file mode 100644 index f972dff..0000000 --- a/assets/images/icons/pros.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/prq.svg b/assets/images/icons/prq.svg deleted file mode 100644 index 789a88c..0000000 --- a/assets/images/icons/prq.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/pst.svg b/assets/images/icons/pst.svg deleted file mode 100644 index 9873a22..0000000 --- a/assets/images/icons/pst.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/pyr.svg b/assets/images/icons/pyr.svg deleted file mode 100644 index 71387cb..0000000 --- a/assets/images/icons/pyr.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/qash.svg b/assets/images/icons/qash.svg deleted file mode 100644 index 4a64ab6..0000000 --- a/assets/images/icons/qash.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - diff --git a/assets/images/icons/qbit.svg b/assets/images/icons/qbit.svg deleted file mode 100644 index 1fabd8f..0000000 --- a/assets/images/icons/qbit.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/qi.svg b/assets/images/icons/qi.svg deleted file mode 100644 index 416a87e..0000000 --- a/assets/images/icons/qi.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/qkc.svg b/assets/images/icons/qkc.svg deleted file mode 100644 index 41831fc..0000000 --- a/assets/images/icons/qkc.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/qlc.svg b/assets/images/icons/qlc.svg deleted file mode 100644 index 594c16c..0000000 --- a/assets/images/icons/qlc.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - -qlc - - diff --git a/assets/images/icons/qnt.svg b/assets/images/icons/qnt.svg deleted file mode 100644 index d7857ee..0000000 --- a/assets/images/icons/qnt.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/qrdo.svg b/assets/images/icons/qrdo.svg deleted file mode 100644 index 38a2065..0000000 --- a/assets/images/icons/qrdo.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/qsp.svg b/assets/images/icons/qsp.svg deleted file mode 100644 index 228a1d5..0000000 --- a/assets/images/icons/qsp.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/assets/images/icons/qtum.svg b/assets/images/icons/qtum.svg deleted file mode 100644 index 9bbca6c..0000000 --- a/assets/images/icons/qtum.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/quick.svg b/assets/images/icons/quick.svg deleted file mode 100644 index 5000334..0000000 --- a/assets/images/icons/quick.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/r.svg b/assets/images/icons/r.svg deleted file mode 100644 index eacd8f1..0000000 --- a/assets/images/icons/r.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/raca.svg b/assets/images/icons/raca.svg deleted file mode 100644 index 85c8bf5..0000000 --- a/assets/images/icons/raca.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/assets/images/icons/rae.svg b/assets/images/icons/rae.svg deleted file mode 100644 index 261226d..0000000 --- a/assets/images/icons/rae.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/rari.svg b/assets/images/icons/rari.svg deleted file mode 100644 index f1677fe..0000000 --- a/assets/images/icons/rari.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/ray.svg b/assets/images/icons/ray.svg deleted file mode 100644 index eae47ac..0000000 --- a/assets/images/icons/ray.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rbn.svg b/assets/images/icons/rbn.svg deleted file mode 100644 index d9aae59..0000000 --- a/assets/images/icons/rbn.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/rcn.svg b/assets/images/icons/rcn.svg deleted file mode 100644 index 9d52090..0000000 --- a/assets/images/icons/rcn.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/assets/images/icons/rdd.svg b/assets/images/icons/rdd.svg deleted file mode 100644 index 9f2d706..0000000 --- a/assets/images/icons/rdd.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rdn.svg b/assets/images/icons/rdn.svg deleted file mode 100644 index 7d673fb..0000000 --- a/assets/images/icons/rdn.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/assets/images/icons/ren.svg b/assets/images/icons/ren.svg deleted file mode 100644 index 29a5871..0000000 --- a/assets/images/icons/ren.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rep.svg b/assets/images/icons/rep.svg deleted file mode 100644 index d07bfc5..0000000 --- a/assets/images/icons/rep.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/req.svg b/assets/images/icons/req.svg deleted file mode 100644 index b330fa7..0000000 --- a/assets/images/icons/req.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/rev.svg b/assets/images/icons/rev.svg deleted file mode 100644 index 938df08..0000000 --- a/assets/images/icons/rev.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rfox.svg b/assets/images/icons/rfox.svg deleted file mode 100644 index 7586111..0000000 --- a/assets/images/icons/rfox.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rhoc.svg b/assets/images/icons/rhoc.svg deleted file mode 100644 index 455f1b8..0000000 --- a/assets/images/icons/rhoc.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/rif.svg b/assets/images/icons/rif.svg deleted file mode 100644 index cd96e9c..0000000 --- a/assets/images/icons/rif.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/assets/images/icons/rlc.svg b/assets/images/icons/rlc.svg deleted file mode 100644 index da626dc..0000000 --- a/assets/images/icons/rlc.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/assets/images/icons/rly.svg b/assets/images/icons/rly.svg deleted file mode 100644 index ecc7601..0000000 --- a/assets/images/icons/rly.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/rndr.svg b/assets/images/icons/rndr.svg deleted file mode 100644 index 522fc5d..0000000 --- a/assets/images/icons/rndr.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/rook.svg b/assets/images/icons/rook.svg deleted file mode 100644 index e603188..0000000 --- a/assets/images/icons/rook.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/assets/images/icons/rose.svg b/assets/images/icons/rose.svg deleted file mode 100644 index 1797249..0000000 --- a/assets/images/icons/rose.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/rpx.svg b/assets/images/icons/rpx.svg deleted file mode 100644 index 2a32924..0000000 --- a/assets/images/icons/rpx.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/assets/images/icons/rsr.svg b/assets/images/icons/rsr.svg deleted file mode 100644 index 651ce61..0000000 --- a/assets/images/icons/rsr.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/rsv.svg b/assets/images/icons/rsv.svg deleted file mode 100644 index 229d366..0000000 --- a/assets/images/icons/rsv.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/rune.svg b/assets/images/icons/rune.svg deleted file mode 100644 index d2b43e3..0000000 --- a/assets/images/icons/rune.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/rvn.svg b/assets/images/icons/rvn.svg deleted file mode 100644 index 3cdc841..0000000 --- a/assets/images/icons/rvn.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/s.svg b/assets/images/icons/s.svg deleted file mode 100644 index e57167d..0000000 --- a/assets/images/icons/s.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sai.svg b/assets/images/icons/sai.svg deleted file mode 100644 index 08bd55f..0000000 --- a/assets/images/icons/sai.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/salt.svg b/assets/images/icons/salt.svg deleted file mode 100644 index a8dd54f..0000000 --- a/assets/images/icons/salt.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - -salt - - - - - - diff --git a/assets/images/icons/san.svg b/assets/images/icons/san.svg deleted file mode 100644 index a3840a6..0000000 --- a/assets/images/icons/san.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/sand.svg b/assets/images/icons/sand.svg deleted file mode 100644 index b1e64b8..0000000 --- a/assets/images/icons/sand.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/sapp.svg b/assets/images/icons/sapp.svg deleted file mode 100644 index 3185b3d..0000000 --- a/assets/images/icons/sapp.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/sar.svg b/assets/images/icons/sar.svg deleted file mode 100644 index 486909a..0000000 --- a/assets/images/icons/sar.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/scrl.svg b/assets/images/icons/scrl.svg deleted file mode 100644 index 1d4e316..0000000 --- a/assets/images/icons/scrl.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/scrt.svg b/assets/images/icons/scrt.svg deleted file mode 100644 index 4f2f231..0000000 --- a/assets/images/icons/scrt.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sdt.svg b/assets/images/icons/sdt.svg deleted file mode 100644 index 152b923..0000000 --- a/assets/images/icons/sdt.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/seele.svg b/assets/images/icons/seele.svg deleted file mode 100644 index 82ba0e5..0000000 --- a/assets/images/icons/seele.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/sefi.svg b/assets/images/icons/sefi.svg deleted file mode 100644 index 36dc836..0000000 --- a/assets/images/icons/sefi.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sem.svg b/assets/images/icons/sem.svg deleted file mode 100644 index 3f65a0c..0000000 --- a/assets/images/icons/sem.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/seth2.svg b/assets/images/icons/seth2.svg deleted file mode 100644 index b2a5f72..0000000 --- a/assets/images/icons/seth2.svg +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sfi.svg b/assets/images/icons/sfi.svg deleted file mode 100644 index 163d787..0000000 --- a/assets/images/icons/sfi.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/assets/images/icons/sfm.svg b/assets/images/icons/sfm.svg deleted file mode 100644 index 126b42d..0000000 --- a/assets/images/icons/sfm.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sfp.svg b/assets/images/icons/sfp.svg deleted file mode 100644 index d62b375..0000000 --- a/assets/images/icons/sfp.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sha.svg b/assets/images/icons/sha.svg deleted file mode 100644 index ab6562c..0000000 --- a/assets/images/icons/sha.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/shib.svg b/assets/images/icons/shib.svg deleted file mode 100644 index 7c0397b..0000000 --- a/assets/images/icons/shib.svg +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/shr.svg b/assets/images/icons/shr.svg deleted file mode 100644 index e1c6797..0000000 --- a/assets/images/icons/shr.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/shuf.svg b/assets/images/icons/shuf.svg deleted file mode 100644 index d007208..0000000 --- a/assets/images/icons/shuf.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sia.svg b/assets/images/icons/sia.svg deleted file mode 100644 index 0aae9a9..0000000 --- a/assets/images/icons/sia.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/skl.svg b/assets/images/icons/skl.svg deleted file mode 100644 index 80b8c6c..0000000 --- a/assets/images/icons/skl.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sky.svg b/assets/images/icons/sky.svg deleted file mode 100644 index 55b28a5..0000000 --- a/assets/images/icons/sky.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/assets/images/icons/slp.svg b/assets/images/icons/slp.svg deleted file mode 100644 index 41f9124..0000000 --- a/assets/images/icons/slp.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/slt.svg b/assets/images/icons/slt.svg deleted file mode 100644 index dea9eb4..0000000 --- a/assets/images/icons/slt.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - -Asset 1 - - diff --git a/assets/images/icons/smart.svg b/assets/images/icons/smart.svg deleted file mode 100644 index 9a7ba79..0000000 --- a/assets/images/icons/smart.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/snc.svg b/assets/images/icons/snc.svg deleted file mode 100644 index 8e4c4dc..0000000 --- a/assets/images/icons/snc.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/assets/images/icons/sngls.svg b/assets/images/icons/sngls.svg deleted file mode 100644 index 31b5a45..0000000 --- a/assets/images/icons/sngls.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - -sngls - - - - diff --git a/assets/images/icons/snm.svg b/assets/images/icons/snm.svg deleted file mode 100644 index 8c4930b..0000000 --- a/assets/images/icons/snm.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/assets/images/icons/snt.svg b/assets/images/icons/snt.svg deleted file mode 100644 index 2e67a10..0000000 --- a/assets/images/icons/snt.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/snx.svg b/assets/images/icons/snx.svg deleted file mode 100644 index 2f60fb2..0000000 --- a/assets/images/icons/snx.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/assets/images/icons/sol.svg b/assets/images/icons/sol.svg deleted file mode 100644 index 52c92a0..0000000 --- a/assets/images/icons/sol.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/soul.svg b/assets/images/icons/soul.svg deleted file mode 100644 index 50d56a7..0000000 --- a/assets/images/icons/soul.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sov.svg b/assets/images/icons/sov.svg deleted file mode 100644 index a93cf39..0000000 --- a/assets/images/icons/sov.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/spike.svg b/assets/images/icons/spike.svg deleted file mode 100644 index 386abb8..0000000 --- a/assets/images/icons/spike.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/spn.svg b/assets/images/icons/spn.svg deleted file mode 100644 index 9ca867a..0000000 --- a/assets/images/icons/spn.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/assets/images/icons/srm.svg b/assets/images/icons/srm.svg deleted file mode 100644 index f4a1fd2..0000000 --- a/assets/images/icons/srm.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/ssv.svg b/assets/images/icons/ssv.svg deleted file mode 100644 index 84bbb98..0000000 --- a/assets/images/icons/ssv.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/stake.svg b/assets/images/icons/stake.svg deleted file mode 100644 index d1c9b16..0000000 --- a/assets/images/icons/stake.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/steem.svg b/assets/images/icons/steem.svg deleted file mode 100644 index 2635c8b..0000000 --- a/assets/images/icons/steem.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/step.svg b/assets/images/icons/step.svg deleted file mode 100644 index 4b0cfb0..0000000 --- a/assets/images/icons/step.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/steth.svg b/assets/images/icons/steth.svg deleted file mode 100644 index cb77f92..0000000 --- a/assets/images/icons/steth.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/stg.svg b/assets/images/icons/stg.svg deleted file mode 100644 index ef79be6..0000000 --- a/assets/images/icons/stg.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/stmx.svg b/assets/images/icons/stmx.svg deleted file mode 100644 index f43451c..0000000 --- a/assets/images/icons/stmx.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/storj.svg b/assets/images/icons/storj.svg deleted file mode 100644 index 8d273e7..0000000 --- a/assets/images/icons/storj.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/storm.svg b/assets/images/icons/storm.svg deleted file mode 100644 index 47d5bbf..0000000 --- a/assets/images/icons/storm.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/stpt.svg b/assets/images/icons/stpt.svg deleted file mode 100644 index 97c6952..0000000 --- a/assets/images/icons/stpt.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/assets/images/icons/strat.svg b/assets/images/icons/strat.svg deleted file mode 100644 index fc510b0..0000000 --- a/assets/images/icons/strat.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/assets/images/icons/strk.svg b/assets/images/icons/strk.svg deleted file mode 100644 index 236c82f..0000000 --- a/assets/images/icons/strk.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/stx.svg b/assets/images/icons/stx.svg deleted file mode 100644 index b2e84b0..0000000 --- a/assets/images/icons/stx.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/stz.svg b/assets/images/icons/stz.svg deleted file mode 100644 index d39a38e..0000000 --- a/assets/images/icons/stz.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sub.svg b/assets/images/icons/sub.svg deleted file mode 100644 index 5fdb549..0000000 --- a/assets/images/icons/sub.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/super.svg b/assets/images/icons/super.svg deleted file mode 100644 index 0740d14..0000000 --- a/assets/images/icons/super.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/suqa.svg b/assets/images/icons/suqa.svg deleted file mode 100644 index 8b44317..0000000 --- a/assets/images/icons/suqa.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/sushi.svg b/assets/images/icons/sushi.svg deleted file mode 100644 index 37b5651..0000000 --- a/assets/images/icons/sushi.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/suter.svg b/assets/images/icons/suter.svg deleted file mode 100644 index 39d58d5..0000000 --- a/assets/images/icons/suter.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/swap.svg b/assets/images/icons/swap.svg deleted file mode 100644 index fd09751..0000000 --- a/assets/images/icons/swap.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sweat.svg b/assets/images/icons/sweat.svg deleted file mode 100644 index 4a5cb8f..0000000 --- a/assets/images/icons/sweat.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/swth.svg b/assets/images/icons/swth.svg deleted file mode 100644 index 24d5206..0000000 --- a/assets/images/icons/swth.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/sxdt.svg b/assets/images/icons/sxdt.svg deleted file mode 100644 index 54886ba..0000000 --- a/assets/images/icons/sxdt.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/sxp.svg b/assets/images/icons/sxp.svg deleted file mode 100644 index 74b8fa8..0000000 --- a/assets/images/icons/sxp.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/syn.svg b/assets/images/icons/syn.svg deleted file mode 100644 index c822ba7..0000000 --- a/assets/images/icons/syn.svg +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/sys.svg b/assets/images/icons/sys.svg deleted file mode 100644 index f9edbc7..0000000 --- a/assets/images/icons/sys.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - diff --git a/assets/images/icons/tbtc.svg b/assets/images/icons/tbtc.svg deleted file mode 100644 index 65a1a45..0000000 --- a/assets/images/icons/tbtc.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/assets/images/icons/tct.svg b/assets/images/icons/tct.svg deleted file mode 100644 index a222f4c..0000000 --- a/assets/images/icons/tct.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/tel.svg b/assets/images/icons/tel.svg deleted file mode 100644 index 9949929..0000000 --- a/assets/images/icons/tel.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - diff --git a/assets/images/icons/tfuel.svg b/assets/images/icons/tfuel.svg deleted file mode 100644 index dbc84b0..0000000 --- a/assets/images/icons/tfuel.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/thc.svg b/assets/images/icons/thc.svg deleted file mode 100644 index 0fca4a9..0000000 --- a/assets/images/icons/thc.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/theta.svg b/assets/images/icons/theta.svg deleted file mode 100644 index f3abca2..0000000 --- a/assets/images/icons/theta.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/thr.svg b/assets/images/icons/thr.svg deleted file mode 100644 index f33844f..0000000 --- a/assets/images/icons/thr.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/tio.svg b/assets/images/icons/tio.svg deleted file mode 100644 index 9d25bda..0000000 --- a/assets/images/icons/tio.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/titan.svg b/assets/images/icons/titan.svg deleted file mode 100644 index b0c670b..0000000 --- a/assets/images/icons/titan.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/tkn.svg b/assets/images/icons/tkn.svg deleted file mode 100644 index 87223a7..0000000 --- a/assets/images/icons/tkn.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/tko.svg b/assets/images/icons/tko.svg deleted file mode 100644 index f50d8e1..0000000 --- a/assets/images/icons/tko.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/tky.svg b/assets/images/icons/tky.svg deleted file mode 100644 index 3ed7ad1..0000000 --- a/assets/images/icons/tky.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/assets/images/icons/tnb.svg b/assets/images/icons/tnb.svg deleted file mode 100644 index 89c5d85..0000000 --- a/assets/images/icons/tnb.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - -tnb - - - - - diff --git a/assets/images/icons/tnc.svg b/assets/images/icons/tnc.svg deleted file mode 100644 index 248c2b4..0000000 --- a/assets/images/icons/tnc.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/tnt.svg b/assets/images/icons/tnt.svg deleted file mode 100644 index 5354247..0000000 --- a/assets/images/icons/tnt.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/tomo.svg b/assets/images/icons/tomo.svg deleted file mode 100644 index dbee087..0000000 --- a/assets/images/icons/tomo.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/torn.svg b/assets/images/icons/torn.svg deleted file mode 100644 index ec90415..0000000 --- a/assets/images/icons/torn.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/tpay.svg b/assets/images/icons/tpay.svg deleted file mode 100644 index fc0eab1..0000000 --- a/assets/images/icons/tpay.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/trac.svg b/assets/images/icons/trac.svg deleted file mode 100644 index 441c632..0000000 --- a/assets/images/icons/trac.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/trb.svg b/assets/images/icons/trb.svg deleted file mode 100644 index cb2ca40..0000000 --- a/assets/images/icons/trb.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/tribe.svg b/assets/images/icons/tribe.svg deleted file mode 100644 index 6964252..0000000 --- a/assets/images/icons/tribe.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/trig.svg b/assets/images/icons/trig.svg deleted file mode 100644 index a5a4c17..0000000 --- a/assets/images/icons/trig.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/trtl.svg b/assets/images/icons/trtl.svg deleted file mode 100644 index 3f77eb5..0000000 --- a/assets/images/icons/trtl.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/tru.svg b/assets/images/icons/tru.svg deleted file mode 100644 index 303794f..0000000 --- a/assets/images/icons/tru.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/trx.svg b/assets/images/icons/trx.svg deleted file mode 100644 index 7543f59..0000000 --- a/assets/images/icons/trx.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/tryb.svg b/assets/images/icons/tryb.svg deleted file mode 100644 index 5ea5f87..0000000 --- a/assets/images/icons/tryb.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ttc.svg b/assets/images/icons/ttc.svg deleted file mode 100644 index 8508b0f..0000000 --- a/assets/images/icons/ttc.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/tube.svg b/assets/images/icons/tube.svg deleted file mode 100644 index d9ee9b6..0000000 --- a/assets/images/icons/tube.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/tusd.svg b/assets/images/icons/tusd.svg deleted file mode 100644 index 64023c8..0000000 --- a/assets/images/icons/tusd.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/twt.svg b/assets/images/icons/twt.svg deleted file mode 100644 index 0a54d83..0000000 --- a/assets/images/icons/twt.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/tyzen.svg b/assets/images/icons/tyzen.svg deleted file mode 100644 index 82880a9..0000000 --- a/assets/images/icons/tyzen.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/ubq.svg b/assets/images/icons/ubq.svg deleted file mode 100644 index ea3d4ae..0000000 --- a/assets/images/icons/ubq.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/ubt.svg b/assets/images/icons/ubt.svg deleted file mode 100644 index 140965e..0000000 --- a/assets/images/icons/ubt.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/uft.svg b/assets/images/icons/uft.svg deleted file mode 100644 index 71cc300..0000000 --- a/assets/images/icons/uft.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/ult.svg b/assets/images/icons/ult.svg deleted file mode 100644 index b0a098b..0000000 --- a/assets/images/icons/ult.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/uma.svg b/assets/images/icons/uma.svg deleted file mode 100644 index 036e0e5..0000000 --- a/assets/images/icons/uma.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/uncx.svg b/assets/images/icons/uncx.svg deleted file mode 100644 index 2e96a2d..0000000 --- a/assets/images/icons/uncx.svg +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/unfi.svg b/assets/images/icons/unfi.svg deleted file mode 100644 index cbdf38b..0000000 --- a/assets/images/icons/unfi.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/uni.svg b/assets/images/icons/uni.svg deleted file mode 100644 index 292ee80..0000000 --- a/assets/images/icons/uni.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/uniqo.svg b/assets/images/icons/uniqo.svg deleted file mode 100644 index 87bf8d2..0000000 --- a/assets/images/icons/uniqo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/unn.svg b/assets/images/icons/unn.svg deleted file mode 100644 index e2acfdf..0000000 --- a/assets/images/icons/unn.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/uos.svg b/assets/images/icons/uos.svg deleted file mode 100644 index 9b33678..0000000 --- a/assets/images/icons/uos.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/upp.svg b/assets/images/icons/upp.svg deleted file mode 100644 index efa9bd8..0000000 --- a/assets/images/icons/upp.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/usdd.svg b/assets/images/icons/usdd.svg deleted file mode 100644 index 49573b6..0000000 --- a/assets/images/icons/usdd.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/usdn.svg b/assets/images/icons/usdn.svg deleted file mode 100644 index 8e756e5..0000000 --- a/assets/images/icons/usdn.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/usdp.svg b/assets/images/icons/usdp.svg deleted file mode 100644 index cd138d2..0000000 --- a/assets/images/icons/usdp.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/usds.svg b/assets/images/icons/usds.svg deleted file mode 100644 index 78220cf..0000000 --- a/assets/images/icons/usds.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/utk.svg b/assets/images/icons/utk.svg deleted file mode 100644 index 8cccf69..0000000 --- a/assets/images/icons/utk.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/uuu.svg b/assets/images/icons/uuu.svg deleted file mode 100644 index 919e9d5..0000000 --- a/assets/images/icons/uuu.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/value.svg b/assets/images/icons/value.svg deleted file mode 100644 index 7e6fbb1..0000000 --- a/assets/images/icons/value.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/veri.svg b/assets/images/icons/veri.svg deleted file mode 100644 index 1440f00..0000000 --- a/assets/images/icons/veri.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/assets/images/icons/vest.svg b/assets/images/icons/vest.svg deleted file mode 100644 index 5426b4b..0000000 --- a/assets/images/icons/vest.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/vet.svg b/assets/images/icons/vet.svg deleted file mode 100644 index 8329450..0000000 --- a/assets/images/icons/vet.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/vgx.svg b/assets/images/icons/vgx.svg deleted file mode 100644 index 548bacf..0000000 --- a/assets/images/icons/vgx.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/via.svg b/assets/images/icons/via.svg deleted file mode 100644 index 4d3a66c..0000000 --- a/assets/images/icons/via.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/assets/images/icons/vib.svg b/assets/images/icons/vib.svg deleted file mode 100644 index 9d23fc7..0000000 --- a/assets/images/icons/vib.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - -vib - - - diff --git a/assets/images/icons/vibe.svg b/assets/images/icons/vibe.svg deleted file mode 100644 index 491a91c..0000000 --- a/assets/images/icons/vibe.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/assets/images/icons/vidt.svg b/assets/images/icons/vidt.svg deleted file mode 100644 index 1cf9f3c..0000000 --- a/assets/images/icons/vidt.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/vikky.svg b/assets/images/icons/vikky.svg deleted file mode 100644 index b89a25b..0000000 --- a/assets/images/icons/vikky.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/assets/images/icons/vin.svg b/assets/images/icons/vin.svg deleted file mode 100644 index 00a0e9d..0000000 --- a/assets/images/icons/vin.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/vite.svg b/assets/images/icons/vite.svg deleted file mode 100644 index d755487..0000000 --- a/assets/images/icons/vite.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/assets/images/icons/viu.svg b/assets/images/icons/viu.svg deleted file mode 100644 index 5d4af3b..0000000 --- a/assets/images/icons/viu.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/vlx.svg b/assets/images/icons/vlx.svg deleted file mode 100644 index 5a9b41c..0000000 --- a/assets/images/icons/vlx.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/vrs.svg b/assets/images/icons/vrs.svg deleted file mode 100644 index 7427065..0000000 --- a/assets/images/icons/vrs.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/vsp.svg b/assets/images/icons/vsp.svg deleted file mode 100644 index 4877034..0000000 --- a/assets/images/icons/vsp.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/vsys.svg b/assets/images/icons/vsys.svg deleted file mode 100644 index ed916ca..0000000 --- a/assets/images/icons/vsys.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/vtc.svg b/assets/images/icons/vtc.svg deleted file mode 100644 index a856dc4..0000000 --- a/assets/images/icons/vtc.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/vvs.svg b/assets/images/icons/vvs.svg deleted file mode 100644 index d59d51d..0000000 --- a/assets/images/icons/vvs.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/wabi.svg b/assets/images/icons/wabi.svg deleted file mode 100644 index 69533a4..0000000 --- a/assets/images/icons/wabi.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/wan.svg b/assets/images/icons/wan.svg deleted file mode 100644 index 09579cc..0000000 --- a/assets/images/icons/wan.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/warp.svg b/assets/images/icons/warp.svg deleted file mode 100644 index dd45aa8..0000000 --- a/assets/images/icons/warp.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/waves.svg b/assets/images/icons/waves.svg deleted file mode 100644 index 5886dfe..0000000 --- a/assets/images/icons/waves.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/assets/images/icons/wbtc.svg b/assets/images/icons/wbtc.svg deleted file mode 100644 index dc8874e..0000000 --- a/assets/images/icons/wbtc.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/assets/images/icons/wct.svg b/assets/images/icons/wct.svg deleted file mode 100644 index ca42fa8..0000000 --- a/assets/images/icons/wct.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/wexpoly.svg b/assets/images/icons/wexpoly.svg deleted file mode 100644 index 0de17e6..0000000 --- a/assets/images/icons/wexpoly.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/whale.svg b/assets/images/icons/whale.svg deleted file mode 100644 index c7efdff..0000000 --- a/assets/images/icons/whale.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/wib.svg b/assets/images/icons/wib.svg deleted file mode 100644 index 6e65115..0000000 --- a/assets/images/icons/wib.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/wing.svg b/assets/images/icons/wing.svg deleted file mode 100644 index afd5191..0000000 --- a/assets/images/icons/wing.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/assets/images/icons/wings.svg b/assets/images/icons/wings.svg deleted file mode 100644 index 484dcd1..0000000 --- a/assets/images/icons/wings.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - -wings - - - - diff --git a/assets/images/icons/woo.svg b/assets/images/icons/woo.svg deleted file mode 100644 index 96c0297..0000000 --- a/assets/images/icons/woo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/wpr.svg b/assets/images/icons/wpr.svg deleted file mode 100644 index fcea47d..0000000 --- a/assets/images/icons/wpr.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/wrx.svg b/assets/images/icons/wrx.svg deleted file mode 100644 index 1f069b5..0000000 --- a/assets/images/icons/wrx.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/wtc.svg b/assets/images/icons/wtc.svg deleted file mode 100644 index a6881b5..0000000 --- a/assets/images/icons/wtc.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/icons/wxt.svg b/assets/images/icons/wxt.svg deleted file mode 100644 index 594a0da..0000000 --- a/assets/images/icons/wxt.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xai.svg b/assets/images/icons/xai.svg deleted file mode 100644 index b285e20..0000000 --- a/assets/images/icons/xai.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/xas.svg b/assets/images/icons/xas.svg deleted file mode 100644 index 48b019b..0000000 --- a/assets/images/icons/xas.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/xchf.svg b/assets/images/icons/xchf.svg deleted file mode 100644 index 4ff6808..0000000 --- a/assets/images/icons/xchf.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xcn.svg b/assets/images/icons/xcn.svg deleted file mode 100644 index 42f471c..0000000 --- a/assets/images/icons/xcn.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xec.svg b/assets/images/icons/xec.svg deleted file mode 100644 index 64dc69a..0000000 --- a/assets/images/icons/xec.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/xem.svg b/assets/images/icons/xem.svg deleted file mode 100644 index 1cfb247..0000000 --- a/assets/images/icons/xem.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/xhv.svg b/assets/images/icons/xhv.svg deleted file mode 100644 index 303cf62..0000000 --- a/assets/images/icons/xhv.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xin.svg b/assets/images/icons/xin.svg deleted file mode 100644 index 63d1616..0000000 --- a/assets/images/icons/xin.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/xlm.svg b/assets/images/icons/xlm.svg deleted file mode 100644 index 3ea6416..0000000 --- a/assets/images/icons/xlm.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xln.svg b/assets/images/icons/xln.svg deleted file mode 100644 index 6b93147..0000000 --- a/assets/images/icons/xln.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/xlq.svg b/assets/images/icons/xlq.svg deleted file mode 100644 index 7076c74..0000000 --- a/assets/images/icons/xlq.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/xmark.svg b/assets/images/icons/xmark.svg deleted file mode 100644 index 548a559..0000000 --- a/assets/images/icons/xmark.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/xmr.svg b/assets/images/icons/xmr.svg deleted file mode 100644 index ffaab48..0000000 --- a/assets/images/icons/xmr.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xmx.svg b/assets/images/icons/xmx.svg deleted file mode 100644 index 958bf37..0000000 --- a/assets/images/icons/xmx.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/images/icons/xnk.svg b/assets/images/icons/xnk.svg deleted file mode 100644 index 72503da..0000000 --- a/assets/images/icons/xnk.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/xno.svg b/assets/images/icons/xno.svg deleted file mode 100644 index 3b9004a..0000000 --- a/assets/images/icons/xno.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xns.svg b/assets/images/icons/xns.svg deleted file mode 100644 index 0661be7..0000000 --- a/assets/images/icons/xns.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/xor.svg b/assets/images/icons/xor.svg deleted file mode 100644 index 0ca23c9..0000000 --- a/assets/images/icons/xor.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xpr.svg b/assets/images/icons/xpr.svg deleted file mode 100644 index 225a50b..0000000 --- a/assets/images/icons/xpr.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/xprt.svg b/assets/images/icons/xprt.svg deleted file mode 100644 index 49aff5e..0000000 --- a/assets/images/icons/xprt.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xrd.svg b/assets/images/icons/xrd.svg deleted file mode 100644 index b5ed77d..0000000 --- a/assets/images/icons/xrd.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xrp.svg b/assets/images/icons/xrp.svg deleted file mode 100644 index d2c0e5c..0000000 --- a/assets/images/icons/xrp.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/assets/images/icons/xsn.svg b/assets/images/icons/xsn.svg deleted file mode 100644 index fc3e930..0000000 --- a/assets/images/icons/xsn.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xsr.svg b/assets/images/icons/xsr.svg deleted file mode 100644 index 5750e4c..0000000 --- a/assets/images/icons/xsr.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/xtz.svg b/assets/images/icons/xtz.svg deleted file mode 100644 index 6217602..0000000 --- a/assets/images/icons/xtz.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/assets/images/icons/xvg.svg b/assets/images/icons/xvg.svg deleted file mode 100644 index 42376e9..0000000 --- a/assets/images/icons/xvg.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/xyo.svg b/assets/images/icons/xyo.svg deleted file mode 100644 index 48ab690..0000000 --- a/assets/images/icons/xyo.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/xzc.svg b/assets/images/icons/xzc.svg deleted file mode 100644 index 2f5a14f..0000000 --- a/assets/images/icons/xzc.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/assets/images/icons/yfi.svg b/assets/images/icons/yfi.svg deleted file mode 100644 index d8ed98f..0000000 --- a/assets/images/icons/yfi.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/yoyo.svg b/assets/images/icons/yoyo.svg deleted file mode 100644 index c03a9a5..0000000 --- a/assets/images/icons/yoyo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - -yoyow - - - - - - - - - - - diff --git a/assets/images/icons/zai.svg b/assets/images/icons/zai.svg deleted file mode 100644 index 426546c..0000000 --- a/assets/images/icons/zai.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/assets/images/icons/zb.svg b/assets/images/icons/zb.svg deleted file mode 100644 index 8117f51..0000000 --- a/assets/images/icons/zb.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/zco.svg b/assets/images/icons/zco.svg deleted file mode 100644 index f9da8dd..0000000 --- a/assets/images/icons/zco.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/assets/images/icons/zec.svg b/assets/images/icons/zec.svg deleted file mode 100644 index 9bbf6a2..0000000 --- a/assets/images/icons/zec.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/zel.svg b/assets/images/icons/zel.svg deleted file mode 100644 index 67f3704..0000000 --- a/assets/images/icons/zel.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/assets/images/icons/zen.svg b/assets/images/icons/zen.svg deleted file mode 100644 index 82d4d9e..0000000 --- a/assets/images/icons/zen.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/zeta.svg b/assets/images/icons/zeta.svg deleted file mode 100644 index b1bb98a..0000000 --- a/assets/images/icons/zeta.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/zil.svg b/assets/images/icons/zil.svg deleted file mode 100644 index 53df17a..0000000 --- a/assets/images/icons/zil.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/assets/images/icons/zks.svg b/assets/images/icons/zks.svg deleted file mode 100644 index 8e39fd9..0000000 --- a/assets/images/icons/zks.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - diff --git a/assets/images/icons/zksync.svg b/assets/images/icons/zksync.svg deleted file mode 100644 index 6fd4d66..0000000 --- a/assets/images/icons/zksync.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/assets/images/icons/zpay.svg b/assets/images/icons/zpay.svg deleted file mode 100644 index a1dd4aa..0000000 --- a/assets/images/icons/zpay.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/icons/zrx.svg b/assets/images/icons/zrx.svg deleted file mode 100644 index 84b42c2..0000000 --- a/assets/images/icons/zrx.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 09d58ae..52b8a46 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1,30 +1,30 @@ -var Fpe=Object.defineProperty;var jpe=(il,Gl,ha)=>Gl in il?Fpe(il,Gl,{enumerable:!0,configurable:!0,writable:!0,value:ha}):il[Gl]=ha;var ff=(il,Gl,ha)=>jpe(il,typeof Gl!="symbol"?Gl+"":Gl,ha);(function(il){typeof define=="function"&&define.amd?define(il):il()})(function(){"use strict";var il=document.createElement("style");il.textContent=`.walletconnect-modal__base{max-width:400px!important}.swal2-container{font-family:Arial,Helvetica,sans-serif;z-index:99999999999!important}.swal2-title{font-size:1.25em}.cpl-theme-dark .swal2-popup{background:#141d20!important;color:#a8aeb6!important}.cpl-theme-dark .swal2-styled.swal2-confirm{background:#050b13cf!important}.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px #00000013,0 1px 2px #00000013,1px 2px 4px #00000013,1px 3px 8px #00000013,2px 4px 16px #00000013;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:.5em 0 0;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:#0006}div:where(.swal2-container).swal2-backdrop-hide{background:#0000!important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0,1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0,1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0,1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none!important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(#0000001a,#0000001a)}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(#0003,#0003)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px #0000;font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus-visible{box-shadow:0 0 0 3px #7066e080}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus-visible{box-shadow:0 0 0 3px #dc374180}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus-visible{box-shadow:0 0 0 3px #6e788180}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px #6496c880}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:#0003}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:#0000;color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:#0000;color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px #6496c880}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:#0000;box-shadow:inset 0 1px 1px #0000000f,0 0 0 3px #0000;color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px #0000000f,0 0 0 3px #6496c880}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:#0000;font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:#0000;color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message):before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:#0000;font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotate(2deg)}33%{transform:translateY(0) rotate(-2deg)}66%{transform:translateY(.3125em) rotate(2deg)}to{transform:translateY(0) rotate(0)}}@keyframes swal2-toast-hide{to{transform:rotate(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}to{transform:scale(.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}to{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotate(45deg);opacity:0}25%{transform:rotate(-25deg);opacity:.4}50%{transform:rotate(15deg);opacity:.8}75%{transform:rotate(-5deg);opacity:1}to{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:#0000!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px #0006}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:#0000;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translate(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translate(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto} -`,document.head.appendChild(il);const Gl=e=>{const t={};return e.replace(/:root\s*{([^}]*)}/g,(l,n)=>n.trim().split(";").forEach(a=>{const[i,c]=a.split(":").map(d=>d.trim());i&&c&&(t[i]=c)})),e.replace(/var\(--([\w-]+)\)/g,(l,n)=>t[`--${n}`]?t[`--${n}`]:`var(--${n})`).replace(/:root\s*{([^}]*)}/g,"")},ha=e=>{const t=r=>{let l;r.init&&(l={order:{amount:Number(r.init.order.amount),currency:String(r.init.order.currency),paymentAmount:Number(r.init.order.paymentAmount),id:r.init.order.id?Number(r.init.order.id):void 0,paymentCurrency:Object.assign({},r.init.order.paymentCurrency)||{}},receiver:String(r.init.receiver),blockConfirmationCount:Number(r.init.blockConfirmationCount)});const n=[];r.networks.forEach(d=>{n.push(d)});const a={evmchains:window.MultipleChain.EvmChains},i=d=>Array.isArray(d)&&d.length===0?{}:d||{};return{init:l,networks:n,providers:a,mode:r.mode,theme:r.theme,wallets:r.wallets,logo:String(r.logo),addon:String(r.addon),debug:!!r.debug,modal:!!r.modal,testnet:!!r.testnet,version:String(r.version),imagesUrl:String(r.imagesUrl),lang:i(r.lang),addresses:r.addresses||void 0,userEmail:r.userEmail||void 0,confirmation:!!r.confirmation,adapterConfig:r.adapterConfig||{},reminderEmail:!!r.reminderEmail,amountUpdateMin:Number(r.amountUpdateMin),createTransaction:!!r.createTransaction,discountRates:i(r.discountRates),apiUrl:r.apiUrl?String(r.apiUrl):void 0}},o=r=>{for(const l in r){if(l=="providers")return r;r[l]===void 0?delete r[l]:typeof r[l]=="object"&&o(r[l])}return r};return o(t(e))},S5='.app.modal{top:0;left:0;width:100%;height:100%;display:none;position:fixed;overflow-y:auto;z-index:99999999;place-items:center;background-color:#00000080!important}.app.modal.active{display:grid}.app.modal>.container{margin:76px auto 40px}.app.modal>.container>.inner{box-shadow:0 0 20px #54545480}.app.modal>.container>div:last-child a{color:#e4e4e4}.app.modal>.container>div:last-child span{color:#dcdcdc}@media screen and (max-width: 450px){.app.modal>.container{margin:20px;width:calc(100% - 40px)}}.app .container{font-family:Arial,Helvetica,sans-serif}.app .container .disable-el[data-disabled=true]{background:#d0d2d4;color:#fff;cursor:no-drop;pointer-events:none}.app .container .disable-el[data-disabled=true] .discount{color:#fff}.app .container .loading{padding:30px 0;box-sizing:border-box;text-align:center}.app .container .loading svg{width:94px!important;height:94px!important}.app .container.theme-dark .disable-el[data-disabled=true]{background:#464a4e}.text-center{text-align:center}.margin-bottom{margin-bottom:20px}.swal2-container{font-family:Arial,Helvetica,sans-serif;z-index:999999999999!important}.el-input__wrapper,.el-input__wrapper:hover{box-shadow:0 0 0 1px #dcdfe6 inset!important}.el-input-group__prepend,.el-input__wrapper,.el-input__inner{background:var(--background-color)}.list{width:100%}.list .title{width:100%;padding:20px;font-size:24px;font-weight:500;text-align:center;line-height:normal;box-sizing:border-box;color:var(--text-color);border-bottom:1px solid var(--border-color)}.list ul{margin:0;padding:0;overflow:hidden;max-height:400px;list-style-type:none;border-bottom-left-radius:8px;border-bottom-right-radius:8px}.list ul>div{overflow-y:auto;max-height:400px}.list ul li{height:90px;width:100%;display:flex;align-items:center;cursor:pointer;box-sizing:border-box;padding:20px;position:relative}.list ul li:last-child{border-bottom:none}.list ul li .icon-wrapper{width:50px;height:50px;margin-right:10px}.list ul li .icon-wrapper .icon{width:50px;height:50px;border-radius:3px}.list ul li .name{font-size:16px;font-weight:500;margin-right:35px;text-align:left;line-height:20px;color:var(--text-color)}.list ul li .el-icon{right:20px;position:absolute;color:var(--text-color)}.list ul li:hover{background:var(--primary-color)}@media screen and (max-width: 450px){.list ul li{height:auto}.list ul li .name{font-size:16px;margin-bottom:10px}}.list ul .no-found{padding:20px;min-height:inherit;box-sizing:border-box;display:flex;text-align:center;align-items:center;justify-content:center;color:var(--text-color)}.modal:not(.disabled){top:0;left:0;width:100%;height:100%;display:none;position:fixed;overflow-y:auto;z-index:9999999999;place-items:center;background-color:transparent}.modal.active{display:grid}.modal>.content{width:100%;margin:0;max-width:450px;border-radius:8px;box-sizing:border-box;color:var(--text-color);background-color:var(--background-color);box-shadow:0 4px 8px var(--box-shadow-color)}.modal>.content>.title{width:100%;padding:20px;font-size:24px;font-weight:500;line-height:normal;text-align:center;box-sizing:border-box;border-bottom:1px solid var(--border-color)}.modal:not(.disabled)>.content{margin:40px auto}@media screen and (max-width: 450px){.modal:not(.disabled)>.content{margin:20px;width:calc(100% - 40px)}}.list ul li.network .discount,.list ul li.currency .discount{left:80px;bottom:10px;font-size:12px;position:absolute;text-decoration:underline;color:var(--discount-color)}.list ul li.currency .icon-wrapper{position:relative}.list ul li.currency .icon-wrapper .network-icon{position:absolute;border-radius:50%;width:25px;height:25px;right:-5px;max-width:25px;bottom:-5px;border:3px solid #000;background-color:#fff}.list ul li.currency .network-name{font-size:14px;text-align:right;position:relative;margin-left:auto;margin-right:35px;color:var(--text-color)}.container.theme-dark .list ul li.currency .icon-wrapper .network-icon{background-color:#000}.currencies{margin:0;list-style:none;background:transparent;border-radius:10px;word-wrap:break-word;max-height:300px;overflow-y:auto;overflow-x:hidden;padding:20px;box-sizing:border-box}.currencies .el-row{padding:0}.currencies .el-row .el-col{font-weight:400}.currencies .el-row .el-col:not(:nth-child(-n+2)){margin-top:10px}.currencies .el-row .el-col:not(:nth-last-child(-n+2)){margin-bottom:10px}.currencies li{display:flex;align-items:center;line-height:0;cursor:pointer;height:28px;border-radius:12px;padding:8px;box-sizing:content-box;color:var(--text-color);justify-content:space-between;background:var(--primary-color)}.currencies li span:first-child{display:flex;align-items:center;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.currencies li .icon{width:28px;margin-right:5px!important;margin-left:0!important}.currencies li:hover{color:var(--button-text-color);background:var(--button-hover-background-color)}.currencies li:hover .discount{color:var(--button-text-color)}.currencies li.selected{color:var(--button-text-color);background:var(--button-background-color);cursor:no-drop}.currencies li.selected .discount{color:var(--button-text-color)}.currencies li .discount{margin-left:10px;font-size:10px;color:var(--discount-color);text-decoration:underline;white-space:nowrap;flex-shrink:0}@media screen and (max-width: 530px){.currencies li{display:inline-block;min-height:28px;height:auto;width:calc(100% - 17px);text-align:center}.currencies li span:first-child{justify-content:center}.currencies li .discount{margin-top:10px;margin-left:0;margin-bottom:6px;display:inline-block;text-align:center}}.button{width:100%;padding:20px;height:60px;text-align:center;box-sizing:border-box;font-size:18px;font-weight:500;cursor:pointer;border-top-left-radius:0;border-top-right-radius:0;white-space:break-spaces;color:var(--button-text-color);background:var(--button-background-color);border-color:var(--button-background-color)}.button:hover{background:var(--button-hover-background-color);border-color:var(--button-hover-background-color)}.button:disabled{background:var(--button-disabled-color);border-color:var(--button-disabled-color);cursor:no-drop}.button:disabled:hover{background:var(--button-disabled-color);border-color:var(--button-disabled-color)}.button-colors{color:var(--button-text-color);background:var(--button-background-color);border-color:var(--button-background-color)}.button-colors:hover{background:var(--button-hover-background-color);border-color:var(--button-hover-background-color)}.button-colors:disabled{background:var(--button-disabled-color);border-color:var(--button-disabled-color);cursor:no-drop}.button-colors:disabled:hover{background:var(--button-disabled-color);border-color:var(--button-disabled-color)}.header{padding:20px;box-sizing:border-box;border-bottom:1px solid var(--border-color)}.header .el-col{line-height:16px}.header .el-col:not(:nth-last-child(-n+2)){margin-bottom:10px}.header .el-col:nth-child(n){text-align:left}.header .el-col:nth-child(2n){text-align:right}.header .payment-amount{font-size:14px;font-weight:700}.header .payment-amount .discounted{text-align:right}.header .payment-amount .discounted span:first-child{color:red;font-size:12px;text-decoration:line-through}.header .payment-amount .discounted span:last-child{margin-left:5px}.header .change-network{font-size:12px;cursor:pointer;border-radius:8px;text-decoration:underline}.container.theme-dark .header .payment-amount .discounted span:first-child{color:#d23a3a}.list ul.adapters li.adapter .status{color:#000;font-size:14px;font-weight:500;margin-left:auto}.list ul.adapters li.adapter .status .detected,.list ul.adapters li.adapter .status .openInApp,.list ul.adapters li.adapter .status .openInAppManual{color:#1e8454}.list ul.adapters li.adapter .status .download,.list ul.adapters li.adapter .status .onlyDesktop{color:#1292bc}.list ul.adapters.disabled{opacity:.5;cursor:no-drop}.list ul.adapters.disabled .adapter{pointer-events:none}.container{width:100%;margin:0 auto;max-width:450px;position:relative;box-sizing:border-box}.container>.inner{overflow:hidden;position:relative;border-radius:8px;box-sizing:border-box;border:1px solid var(--border-color);background-color:var(--background-color);box-shadow:0 4px 8px var(--box-shadow-color)}.container>.inner:has(.modal.active:not(.disabled)):before{top:0;left:0;right:0;bottom:0;content:"";position:fixed;z-index:999999999;background-color:#00000080}.container>.inner ul::-webkit-scrollbar,.container>.inner ul>div::-webkit-scrollbar{width:10px}.container>.inner ul::-webkit-scrollbar-track,.container>.inner ul>div::-webkit-scrollbar-track{background:var(--primary-color)}.container>.inner ul::-webkit-scrollbar-thumb,.container>.inner ul>div::-webkit-scrollbar-thumb{background:var(--secondary-color)}.container>.inner ul::-webkit-scrollbar-thumb:hover,.container>.inner ul>div::-webkit-scrollbar-thumb:hover{background:var(--tertiary-color)}.container>div:last-child{display:flex;font-size:14px;padding:20px 30px 0;justify-content:center}.container>div:last-child a{font-weight:600;color:#7f7f7f;text-decoration:none}.container>div:last-child span{color:#7f7f7f;font-weight:400;margin-right:5px}',E5="/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}",T5=`@charset "UTF-8";:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645,.045,.355,1);--el-transition-function-fast-bezier:cubic-bezier(.23,1,.32,1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px}:root{color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0,0,0,.04),0px 8px 20px rgba(0,0,0,.08);--el-box-shadow-light:0px 0px 12px rgba(0,0,0,.12);--el-box-shadow-lighter:0px 0px 6px rgba(0,0,0,.12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0,0,0,.08),0px 12px 32px rgba(0,0,0,.12),0px 8px 16px -8px rgba(0,0,0,.16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0,0,0,.8);--el-overlay-color-light:rgba(0,0,0,.7);--el-overlay-color-lighter:rgba(0,0,0,.5);--el-mask-color:rgba(255,255,255,.9);--el-mask-color-extra-light:rgba(255,255,255,.3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transform-origin:center top;transition:var(--el-transition-md-fade)}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transform-origin:center bottom;transition:var(--el-transition-md-fade)}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transform-origin:top left;transition:var(--el-transition-md-fade)}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.el-icon{--color:inherit;align-items:center;display:inline-flex;height:1em;justify-content:center;line-height:1em;position:relative;width:1em;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-affix--fixed{position:fixed}.el-alert{--el-alert-padding:8px 16px;--el-alert-border-radius-base:var(--el-border-radius-base);--el-alert-title-font-size:14px;--el-alert-title-with-description-font-size:16px;--el-alert-description-font-size:14px;--el-alert-close-font-size:16px;--el-alert-close-customed-font-size:14px;--el-alert-icon-size:16px;--el-alert-icon-large-size:28px;align-items:center;background-color:var(--el-color-white);border-radius:var(--el-alert-border-radius-base);box-sizing:border-box;display:flex;margin:0;opacity:1;overflow:hidden;padding:var(--el-alert-padding);position:relative;transition:opacity var(--el-transition-duration-fast);width:100%}.el-alert.is-light .el-alert__close-btn{color:var(--el-text-color-placeholder)}.el-alert.is-dark .el-alert__close-btn,.el-alert.is-dark .el-alert__description{color:var(--el-color-white)}.el-alert.is-center{justify-content:center}.el-alert--success{--el-alert-bg-color:var(--el-color-success-light-9)}.el-alert--success.is-light{background-color:var(--el-alert-bg-color)}.el-alert--success.is-light,.el-alert--success.is-light .el-alert__description{color:var(--el-color-success)}.el-alert--success.is-dark{background-color:var(--el-color-success);color:var(--el-color-white)}.el-alert--info{--el-alert-bg-color:var(--el-color-info-light-9)}.el-alert--info.is-light{background-color:var(--el-alert-bg-color)}.el-alert--info.is-light,.el-alert--info.is-light .el-alert__description{color:var(--el-color-info)}.el-alert--info.is-dark{background-color:var(--el-color-info);color:var(--el-color-white)}.el-alert--warning{--el-alert-bg-color:var(--el-color-warning-light-9)}.el-alert--warning.is-light{background-color:var(--el-alert-bg-color)}.el-alert--warning.is-light,.el-alert--warning.is-light .el-alert__description{color:var(--el-color-warning)}.el-alert--warning.is-dark{background-color:var(--el-color-warning);color:var(--el-color-white)}.el-alert--error{--el-alert-bg-color:var(--el-color-error-light-9)}.el-alert--error.is-light{background-color:var(--el-alert-bg-color)}.el-alert--error.is-light,.el-alert--error.is-light .el-alert__description{color:var(--el-color-error)}.el-alert--error.is-dark{background-color:var(--el-color-error);color:var(--el-color-white)}.el-alert__content{display:flex;flex-direction:column;gap:4px}.el-alert .el-alert__icon{font-size:var(--el-alert-icon-size);margin-right:8px;width:var(--el-alert-icon-size)}.el-alert .el-alert__icon.is-big{font-size:var(--el-alert-icon-large-size);margin-right:12px;width:var(--el-alert-icon-large-size)}.el-alert__title{font-size:var(--el-alert-title-font-size);line-height:24px}.el-alert__title.with-description{font-size:var(--el-alert-title-with-description-font-size)}.el-alert .el-alert__description{font-size:var(--el-alert-description-font-size);margin:0}.el-alert .el-alert__close-btn{cursor:pointer;font-size:var(--el-alert-close-font-size);opacity:1;position:absolute;right:16px;top:12px}.el-alert .el-alert__close-btn.is-customed{font-size:var(--el-alert-close-customed-font-size);font-style:normal;line-height:24px;top:8px}.el-alert-fade-enter-from,.el-alert-fade-leave-active{opacity:0}.el-aside{box-sizing:border-box;flex-shrink:0;overflow:auto;width:var(--el-aside-width,300px)}.el-autocomplete{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;display:inline-block;position:relative;width:var(--el-input-width)}.el-autocomplete__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-autocomplete__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-autocomplete__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-autocomplete-suggestion{border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-autocomplete-suggestion__wrap{box-sizing:border-box;max-height:280px;padding:10px 0}.el-autocomplete-suggestion__list{margin:0;padding:0}.el-autocomplete-suggestion li{color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-base);line-height:34px;list-style:none;margin:0;overflow:hidden;padding:0 20px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-autocomplete-suggestion li:hover,.el-autocomplete-suggestion li.highlighted{background-color:var(--el-fill-color-light)}.el-autocomplete-suggestion li.divider{border-top:1px solid var(--el-color-black);margin-top:6px}.el-autocomplete-suggestion li.divider:last-child{margin-bottom:-6px}.el-autocomplete-suggestion.is-loading li{color:var(--el-text-color-secondary);font-size:20px;height:100px;line-height:100px;text-align:center}.el-autocomplete-suggestion.is-loading li:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-autocomplete-suggestion.is-loading li:hover{background-color:var(--el-bg-color-overlay)}.el-autocomplete-suggestion.is-loading .el-icon-loading{vertical-align:middle}.el-avatar{--el-avatar-text-color:var(--el-color-white);--el-avatar-bg-color:var(--el-text-color-disabled);--el-avatar-text-size:14px;--el-avatar-icon-size:18px;--el-avatar-border-radius:var(--el-border-radius-base);--el-avatar-size-large:56px;--el-avatar-size-small:24px;--el-avatar-size:40px;align-items:center;background:var(--el-avatar-bg-color);box-sizing:border-box;color:var(--el-avatar-text-color);display:inline-flex;font-size:var(--el-avatar-text-size);height:var(--el-avatar-size);justify-content:center;overflow:hidden;text-align:center;width:var(--el-avatar-size)}.el-avatar>img{display:block;height:100%;width:100%}.el-avatar--circle{border-radius:50%}.el-avatar--square{border-radius:var(--el-avatar-border-radius)}.el-avatar--icon{font-size:var(--el-avatar-icon-size)}.el-avatar--small{--el-avatar-size:24px}.el-avatar--large{--el-avatar-size:56px}.el-backtop{--el-backtop-bg-color:var(--el-bg-color-overlay);--el-backtop-text-color:var(--el-color-primary);--el-backtop-hover-bg-color:var(--el-border-color-extra-light);align-items:center;background-color:var(--el-backtop-bg-color);border-radius:50%;box-shadow:var(--el-box-shadow-lighter);color:var(--el-backtop-text-color);cursor:pointer;display:flex;font-size:20px;height:40px;justify-content:center;position:fixed;width:40px;z-index:5}.el-backtop:hover{background-color:var(--el-backtop-hover-bg-color)}.el-backtop__icon{font-size:20px}.el-badge{--el-badge-bg-color:var(--el-color-danger);--el-badge-radius:10px;--el-badge-font-size:12px;--el-badge-padding:6px;--el-badge-size:18px;display:inline-block;position:relative;vertical-align:middle;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.el-badge__content{align-items:center;background-color:var(--el-badge-bg-color);border:1px solid var(--el-bg-color);border-radius:var(--el-badge-radius);color:var(--el-color-white);display:inline-flex;font-size:var(--el-badge-font-size);height:var(--el-badge-size);justify-content:center;padding:0 var(--el-badge-padding);white-space:nowrap}.el-badge__content.is-fixed{position:absolute;right:calc(1px + var(--el-badge-size)/2);top:0;transform:translateY(-50%) translate(100%);z-index:var(--el-index-normal)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{border-radius:50%;height:8px;padding:0;right:0;width:8px}.el-badge__content--primary{background-color:var(--el-color-primary)}.el-badge__content--success{background-color:var(--el-color-success)}.el-badge__content--warning{background-color:var(--el-color-warning)}.el-badge__content--info{background-color:var(--el-color-info)}.el-badge__content--danger{background-color:var(--el-color-danger)}.el-breadcrumb{font-size:14px;line-height:1}.el-breadcrumb:after,.el-breadcrumb:before{content:"";display:table}.el-breadcrumb:after{clear:both}.el-breadcrumb__separator{color:var(--el-text-color-placeholder);font-weight:700;margin:0 9px}.el-breadcrumb__separator.el-icon{font-weight:400;margin:0 6px}.el-breadcrumb__separator.el-icon svg{vertical-align:middle}.el-breadcrumb__item{align-items:center;display:inline-flex;float:left}.el-breadcrumb__inner{color:var(--el-text-color-regular)}.el-breadcrumb__inner a,.el-breadcrumb__inner.is-link{color:var(--el-text-color-primary);font-weight:700;text-decoration:none;transition:var(--el-transition-color)}.el-breadcrumb__inner a:hover,.el-breadcrumb__inner.is-link:hover{color:var(--el-color-primary);cursor:pointer}.el-breadcrumb__item:last-child .el-breadcrumb__inner,.el-breadcrumb__item:last-child .el-breadcrumb__inner a,.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover{color:var(--el-text-color-regular);cursor:text;font-weight:400}.el-breadcrumb__item:last-child .el-breadcrumb__separator{display:none}.el-button-group{display:inline-block;vertical-align:middle}.el-button-group:after,.el-button-group:before{content:"";display:table}.el-button-group:after{clear:both}.el-button-group>.el-button{float:left;position:relative}.el-button-group>.el-button+.el-button{margin-left:0}.el-button-group>.el-button:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.el-button-group>.el-button:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.el-button-group>.el-button:first-child:last-child{border-bottom-left-radius:var(--el-border-radius-base);border-bottom-right-radius:var(--el-border-radius-base);border-top-left-radius:var(--el-border-radius-base);border-top-right-radius:var(--el-border-radius-base)}.el-button-group>.el-button:first-child:last-child.is-round{border-radius:var(--el-border-radius-round)}.el-button-group>.el-button:first-child:last-child.is-circle{border-radius:50%}.el-button-group>.el-button:not(:first-child):not(:last-child){border-radius:0}.el-button-group>.el-button:not(:last-child){margin-right:-1px}.el-button-group>.el-button:active,.el-button-group>.el-button:focus,.el-button-group>.el-button:hover{z-index:1}.el-button-group>.el-button.is-active{z-index:1}.el-button-group>.el-dropdown>.el-button{border-bottom-left-radius:0;border-left-color:var(--el-button-divide-border-color);border-top-left-radius:0}.el-button-group .el-button--primary:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--primary:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--primary:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button{--el-button-font-weight:var(--el-font-weight-primary);--el-button-border-color:var(--el-border-color);--el-button-bg-color:var(--el-fill-color-blank);--el-button-text-color:var(--el-text-color-regular);--el-button-disabled-text-color:var(--el-disabled-text-color);--el-button-disabled-bg-color:var(--el-fill-color-blank);--el-button-disabled-border-color:var(--el-border-color-light);--el-button-divide-border-color:rgba(255,255,255,.5);--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-color-primary-light-9);--el-button-hover-border-color:var(--el-color-primary-light-7);--el-button-active-text-color:var(--el-button-hover-text-color);--el-button-active-border-color:var(--el-color-primary);--el-button-active-bg-color:var(--el-button-hover-bg-color);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-hover-link-text-color:var(--el-color-info);--el-button-active-color:var(--el-text-color-primary);align-items:center;-webkit-appearance:none;background-color:var(--el-button-bg-color);border:var(--el-border);border-color:var(--el-button-border-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-button-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-button-font-weight);height:32px;justify-content:center;line-height:1;outline:none;padding:8px 15px;text-align:center;transition:.1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-button:hover{background-color:var(--el-button-hover-bg-color);border-color:var(--el-button-hover-border-color);color:var(--el-button-hover-text-color);outline:none}.el-button:active{background-color:var(--el-button-active-bg-color);border-color:var(--el-button-active-border-color);color:var(--el-button-active-text-color);outline:none}.el-button:focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button>span{align-items:center;display:inline-flex}.el-button+.el-button{margin-left:12px}.el-button.is-round{padding:8px 15px}.el-button::-moz-focus-inner{border:0}.el-button [class*=el-icon]+span{margin-left:6px}.el-button [class*=el-icon] svg{vertical-align:bottom}.el-button.is-plain{--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-fill-color-blank);--el-button-hover-border-color:var(--el-color-primary)}.el-button.is-active{background-color:var(--el-button-active-bg-color);border-color:var(--el-button-active-border-color);color:var(--el-button-active-text-color);outline:none}.el-button.is-disabled,.el-button.is-disabled:hover{background-color:var(--el-button-disabled-bg-color);background-image:none;border-color:var(--el-button-disabled-border-color);color:var(--el-button-disabled-text-color);cursor:not-allowed}.el-button.is-loading{pointer-events:none;position:relative}.el-button.is-loading:before{background-color:var(--el-mask-color-extra-light);border-radius:inherit;bottom:-1px;content:"";left:-1px;pointer-events:none;position:absolute;right:-1px;top:-1px;z-index:1}.el-button.is-round{border-radius:var(--el-border-radius-round)}.el-button.is-circle{border-radius:50%;padding:8px;width:32px}.el-button.is-text{background-color:transparent;border:0 solid transparent;color:var(--el-button-text-color)}.el-button.is-text.is-disabled{background-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button.is-text:not(.is-disabled):hover{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled):focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button.is-text:not(.is-disabled):active{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled).is-has-bg:hover{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg:active{background-color:var(--el-fill-color-dark)}.el-button__text--expand{letter-spacing:.3em;margin-right:-.3em}.el-button.is-link{background:transparent;border-color:transparent;color:var(--el-button-text-color);height:auto;padding:2px}.el-button.is-link:hover{color:var(--el-button-hover-link-text-color)}.el-button.is-link.is-disabled{background-color:transparent!important;border-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button.is-link:not(.is-disabled):hover{background-color:transparent;border-color:transparent}.el-button.is-link:not(.is-disabled):active{background-color:transparent;border-color:transparent;color:var(--el-button-active-color)}.el-button--text{background:transparent;border-color:transparent;color:var(--el-color-primary);padding-left:0;padding-right:0}.el-button--text.is-disabled{background-color:transparent!important;border-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button--text:not(.is-disabled):hover{background-color:transparent;border-color:transparent;color:var(--el-color-primary-light-3)}.el-button--text:not(.is-disabled):active{background-color:transparent;border-color:transparent;color:var(--el-color-primary-dark-2)}.el-button__link--expand{letter-spacing:.3em;margin-right:-.3em}.el-button--primary{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-primary);--el-button-border-color:var(--el-color-primary);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-active-color:var(--el-color-primary-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-primary-light-5);--el-button-hover-bg-color:var(--el-color-primary-light-3);--el-button-hover-border-color:var(--el-color-primary-light-3);--el-button-active-bg-color:var(--el-color-primary-dark-2);--el-button-active-border-color:var(--el-color-primary-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-primary-light-5);--el-button-disabled-border-color:var(--el-color-primary-light-5)}.el-button--primary.is-link,.el-button--primary.is-plain,.el-button--primary.is-text{--el-button-text-color:var(--el-color-primary);--el-button-bg-color:var(--el-color-primary-light-9);--el-button-border-color:var(--el-color-primary-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-primary);--el-button-hover-border-color:var(--el-color-primary);--el-button-active-text-color:var(--el-color-white)}.el-button--primary.is-link.is-disabled,.el-button--primary.is-link.is-disabled:active,.el-button--primary.is-link.is-disabled:focus,.el-button--primary.is-link.is-disabled:hover,.el-button--primary.is-plain.is-disabled,.el-button--primary.is-plain.is-disabled:active,.el-button--primary.is-plain.is-disabled:focus,.el-button--primary.is-plain.is-disabled:hover,.el-button--primary.is-text.is-disabled,.el-button--primary.is-text.is-disabled:active,.el-button--primary.is-text.is-disabled:focus,.el-button--primary.is-text.is-disabled:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8);color:var(--el-color-primary-light-5)}.el-button--success{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-success);--el-button-border-color:var(--el-color-success);--el-button-outline-color:var(--el-color-success-light-5);--el-button-active-color:var(--el-color-success-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-success-light-5);--el-button-hover-bg-color:var(--el-color-success-light-3);--el-button-hover-border-color:var(--el-color-success-light-3);--el-button-active-bg-color:var(--el-color-success-dark-2);--el-button-active-border-color:var(--el-color-success-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-success-light-5);--el-button-disabled-border-color:var(--el-color-success-light-5)}.el-button--success.is-link,.el-button--success.is-plain,.el-button--success.is-text{--el-button-text-color:var(--el-color-success);--el-button-bg-color:var(--el-color-success-light-9);--el-button-border-color:var(--el-color-success-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-success);--el-button-hover-border-color:var(--el-color-success);--el-button-active-text-color:var(--el-color-white)}.el-button--success.is-link.is-disabled,.el-button--success.is-link.is-disabled:active,.el-button--success.is-link.is-disabled:focus,.el-button--success.is-link.is-disabled:hover,.el-button--success.is-plain.is-disabled,.el-button--success.is-plain.is-disabled:active,.el-button--success.is-plain.is-disabled:focus,.el-button--success.is-plain.is-disabled:hover,.el-button--success.is-text.is-disabled,.el-button--success.is-text.is-disabled:active,.el-button--success.is-text.is-disabled:focus,.el-button--success.is-text.is-disabled:hover{background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8);color:var(--el-color-success-light-5)}.el-button--warning{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-warning);--el-button-border-color:var(--el-color-warning);--el-button-outline-color:var(--el-color-warning-light-5);--el-button-active-color:var(--el-color-warning-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-warning-light-5);--el-button-hover-bg-color:var(--el-color-warning-light-3);--el-button-hover-border-color:var(--el-color-warning-light-3);--el-button-active-bg-color:var(--el-color-warning-dark-2);--el-button-active-border-color:var(--el-color-warning-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-warning-light-5);--el-button-disabled-border-color:var(--el-color-warning-light-5)}.el-button--warning.is-link,.el-button--warning.is-plain,.el-button--warning.is-text{--el-button-text-color:var(--el-color-warning);--el-button-bg-color:var(--el-color-warning-light-9);--el-button-border-color:var(--el-color-warning-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-warning);--el-button-hover-border-color:var(--el-color-warning);--el-button-active-text-color:var(--el-color-white)}.el-button--warning.is-link.is-disabled,.el-button--warning.is-link.is-disabled:active,.el-button--warning.is-link.is-disabled:focus,.el-button--warning.is-link.is-disabled:hover,.el-button--warning.is-plain.is-disabled,.el-button--warning.is-plain.is-disabled:active,.el-button--warning.is-plain.is-disabled:focus,.el-button--warning.is-plain.is-disabled:hover,.el-button--warning.is-text.is-disabled,.el-button--warning.is-text.is-disabled:active,.el-button--warning.is-text.is-disabled:focus,.el-button--warning.is-text.is-disabled:hover{background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8);color:var(--el-color-warning-light-5)}.el-button--danger{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-danger);--el-button-border-color:var(--el-color-danger);--el-button-outline-color:var(--el-color-danger-light-5);--el-button-active-color:var(--el-color-danger-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-danger-light-5);--el-button-hover-bg-color:var(--el-color-danger-light-3);--el-button-hover-border-color:var(--el-color-danger-light-3);--el-button-active-bg-color:var(--el-color-danger-dark-2);--el-button-active-border-color:var(--el-color-danger-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-danger-light-5);--el-button-disabled-border-color:var(--el-color-danger-light-5)}.el-button--danger.is-link,.el-button--danger.is-plain,.el-button--danger.is-text{--el-button-text-color:var(--el-color-danger);--el-button-bg-color:var(--el-color-danger-light-9);--el-button-border-color:var(--el-color-danger-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-danger);--el-button-hover-border-color:var(--el-color-danger);--el-button-active-text-color:var(--el-color-white)}.el-button--danger.is-link.is-disabled,.el-button--danger.is-link.is-disabled:active,.el-button--danger.is-link.is-disabled:focus,.el-button--danger.is-link.is-disabled:hover,.el-button--danger.is-plain.is-disabled,.el-button--danger.is-plain.is-disabled:active,.el-button--danger.is-plain.is-disabled:focus,.el-button--danger.is-plain.is-disabled:hover,.el-button--danger.is-text.is-disabled,.el-button--danger.is-text.is-disabled:active,.el-button--danger.is-text.is-disabled:focus,.el-button--danger.is-text.is-disabled:hover{background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8);color:var(--el-color-danger-light-5)}.el-button--info{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-info);--el-button-border-color:var(--el-color-info);--el-button-outline-color:var(--el-color-info-light-5);--el-button-active-color:var(--el-color-info-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-info-light-5);--el-button-hover-bg-color:var(--el-color-info-light-3);--el-button-hover-border-color:var(--el-color-info-light-3);--el-button-active-bg-color:var(--el-color-info-dark-2);--el-button-active-border-color:var(--el-color-info-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-info-light-5);--el-button-disabled-border-color:var(--el-color-info-light-5)}.el-button--info.is-link,.el-button--info.is-plain,.el-button--info.is-text{--el-button-text-color:var(--el-color-info);--el-button-bg-color:var(--el-color-info-light-9);--el-button-border-color:var(--el-color-info-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-info);--el-button-hover-border-color:var(--el-color-info);--el-button-active-text-color:var(--el-color-white)}.el-button--info.is-link.is-disabled,.el-button--info.is-link.is-disabled:active,.el-button--info.is-link.is-disabled:focus,.el-button--info.is-link.is-disabled:hover,.el-button--info.is-plain.is-disabled,.el-button--info.is-plain.is-disabled:active,.el-button--info.is-plain.is-disabled:focus,.el-button--info.is-plain.is-disabled:hover,.el-button--info.is-text.is-disabled,.el-button--info.is-text.is-disabled:active,.el-button--info.is-text.is-disabled:focus,.el-button--info.is-text.is-disabled:hover{background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8);color:var(--el-color-info-light-5)}.el-button--large{--el-button-size:40px;border-radius:var(--el-border-radius-base);font-size:var(--el-font-size-base);height:var(--el-button-size);padding:12px 19px}.el-button--large [class*=el-icon]+span{margin-left:8px}.el-button--large.is-round{padding:12px 19px}.el-button--large.is-circle{padding:12px;width:var(--el-button-size)}.el-button--small{--el-button-size:24px;border-radius:calc(var(--el-border-radius-base) - 1px);font-size:12px;height:var(--el-button-size);padding:5px 11px}.el-button--small [class*=el-icon]+span{margin-left:4px}.el-button--small.is-round{padding:5px 11px}.el-button--small.is-circle{padding:5px;width:var(--el-button-size)}.el-calendar{--el-calendar-border:var(--el-table-border,1px solid var(--el-border-color-lighter));--el-calendar-header-border-bottom:var(--el-calendar-border);--el-calendar-selected-bg-color:var(--el-color-primary-light-9);--el-calendar-cell-width:85px;background-color:var(--el-fill-color-blank)}.el-calendar__header{border-bottom:var(--el-calendar-header-border-bottom);display:flex;justify-content:space-between;padding:12px 20px}.el-calendar__title{align-self:center;color:var(--el-text-color)}.el-calendar__body{padding:12px 20px 35px}.el-calendar-table{table-layout:fixed;width:100%}.el-calendar-table thead th{color:var(--el-text-color-regular);font-weight:400;padding:12px 0}.el-calendar-table:not(.is-range) td.next,.el-calendar-table:not(.is-range) td.prev{color:var(--el-text-color-placeholder)}.el-calendar-table td{border-bottom:var(--el-calendar-border);border-right:var(--el-calendar-border);transition:background-color var(--el-transition-duration-fast) ease;vertical-align:top}.el-calendar-table td.is-selected{background-color:var(--el-calendar-selected-bg-color)}.el-calendar-table td.is-today{color:var(--el-color-primary)}.el-calendar-table tr:first-child td{border-top:var(--el-calendar-border)}.el-calendar-table tr td:first-child{border-left:var(--el-calendar-border)}.el-calendar-table tr.el-calendar-table__row--hide-border td{border-top:none}.el-calendar-table .el-calendar-day{box-sizing:border-box;height:var(--el-calendar-cell-width);padding:8px}.el-calendar-table .el-calendar-day:hover{background-color:var(--el-calendar-selected-bg-color);cursor:pointer}.el-card{--el-card-border-color:var(--el-border-color-light);--el-card-border-radius:4px;--el-card-padding:20px;--el-card-bg-color:var(--el-fill-color-blank);background-color:var(--el-card-bg-color);border:1px solid var(--el-card-border-color);border-radius:var(--el-card-border-radius);color:var(--el-text-color-primary);overflow:hidden;transition:var(--el-transition-duration)}.el-card.is-always-shadow{box-shadow:var(--el-box-shadow-light)}.el-card.is-hover-shadow:focus,.el-card.is-hover-shadow:hover{box-shadow:var(--el-box-shadow-light)}.el-card__header{border-bottom:1px solid var(--el-card-border-color);box-sizing:border-box;padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding)}.el-card__body{padding:var(--el-card-padding)}.el-card__footer{border-top:1px solid var(--el-card-border-color);box-sizing:border-box;padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding)}.el-carousel__item{display:inline-block;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.el-carousel__item,.el-carousel__item.is-active{z-index:calc(var(--el-index-normal) - 1)}.el-carousel__item--card,.el-carousel__item.is-animating{transition:transform .4s ease-in-out}.el-carousel__item--card{width:50%}.el-carousel__item--card.is-in-stage{cursor:pointer;z-index:var(--el-index-normal)}.el-carousel__item--card.is-in-stage.is-hover .el-carousel__mask,.el-carousel__item--card.is-in-stage:hover .el-carousel__mask{opacity:.12}.el-carousel__item--card.is-active{z-index:calc(var(--el-index-normal) + 1)}.el-carousel__item--card-vertical{height:50%;width:100%}.el-carousel__mask{background-color:var(--el-color-white);height:100%;left:0;opacity:.24;position:absolute;top:0;transition:var(--el-transition-duration-fast);width:100%}.el-carousel{--el-carousel-arrow-font-size:12px;--el-carousel-arrow-size:36px;--el-carousel-arrow-background:rgba(31,45,61,.11);--el-carousel-arrow-hover-background:rgba(31,45,61,.23);--el-carousel-indicator-width:30px;--el-carousel-indicator-height:2px;--el-carousel-indicator-padding-horizontal:4px;--el-carousel-indicator-padding-vertical:12px;--el-carousel-indicator-out-color:var(--el-border-color-hover);position:relative}.el-carousel--horizontal,.el-carousel--vertical{overflow:hidden}.el-carousel__container{height:300px;position:relative}.el-carousel__arrow{align-items:center;background-color:var(--el-carousel-arrow-background);border:none;border-radius:50%;color:#fff;cursor:pointer;display:inline-flex;font-size:var(--el-carousel-arrow-font-size);height:var(--el-carousel-arrow-size);justify-content:center;margin:0;outline:none;padding:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);transition:var(--el-transition-duration);width:var(--el-carousel-arrow-size);z-index:10}.el-carousel__arrow--left{left:16px}.el-carousel__arrow--right{right:16px}.el-carousel__arrow:hover{background-color:var(--el-carousel-arrow-hover-background)}.el-carousel__arrow i{cursor:pointer}.el-carousel__indicators{list-style:none;margin:0;padding:0;position:absolute;z-index:calc(var(--el-index-normal) + 1)}.el-carousel__indicators--horizontal{bottom:0;left:50%;transform:translate(-50%)}.el-carousel__indicators--vertical{right:0;top:50%;transform:translateY(-50%)}.el-carousel__indicators--outside{bottom:calc(var(--el-carousel-indicator-height) + var(--el-carousel-indicator-padding-vertical)*2);position:static;text-align:center;transform:none}.el-carousel__indicators--outside .el-carousel__indicator:hover button{opacity:.64}.el-carousel__indicators--outside button{background-color:var(--el-carousel-indicator-out-color);opacity:.24}.el-carousel__indicators--right{right:0}.el-carousel__indicators--labels{left:0;right:0;text-align:center;transform:none}.el-carousel__indicators--labels .el-carousel__button{color:#000;font-size:12px;height:auto;padding:2px 18px;width:auto}.el-carousel__indicators--labels .el-carousel__indicator{padding:6px 4px}.el-carousel__indicator{background-color:transparent;cursor:pointer}.el-carousel__indicator:hover button{opacity:.72}.el-carousel__indicator--horizontal{display:inline-block;padding:var(--el-carousel-indicator-padding-vertical) var(--el-carousel-indicator-padding-horizontal)}.el-carousel__indicator--vertical{padding:var(--el-carousel-indicator-padding-horizontal) var(--el-carousel-indicator-padding-vertical)}.el-carousel__indicator--vertical .el-carousel__button{height:calc(var(--el-carousel-indicator-width)/2);width:var(--el-carousel-indicator-height)}.el-carousel__indicator.is-active button{opacity:1}.el-carousel__button{background-color:#fff;border:none;cursor:pointer;display:block;height:var(--el-carousel-indicator-height);margin:0;opacity:.48;outline:none;padding:0;transition:var(--el-transition-duration);width:var(--el-carousel-indicator-width)}.carousel-arrow-left-enter-from,.carousel-arrow-left-leave-active{opacity:0;transform:translateY(-50%) translate(-10px)}.carousel-arrow-right-enter-from,.carousel-arrow-right-leave-active{opacity:0;transform:translateY(-50%) translate(10px)}.el-transitioning{filter:url(#elCarouselHorizontal)}.el-transitioning-vertical{filter:url(#elCarouselVertical)}.el-cascader-panel{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);border-radius:var(--el-cascader-menu-radius);display:flex;font-size:var(--el-cascader-menu-font-size)}.el-cascader-panel.is-bordered{border:var(--el-cascader-menu-border);border-radius:var(--el-cascader-menu-radius)}.el-cascader-menu{border-right:var(--el-cascader-menu-border);box-sizing:border-box;color:var(--el-cascader-menu-text-color);min-width:180px}.el-cascader-menu:last-child{border-right:none}.el-cascader-menu:last-child .el-cascader-node{padding-right:20px}.el-cascader-menu__wrap.el-scrollbar__wrap{height:204px}.el-cascader-menu__list{box-sizing:border-box;list-style:none;margin:0;min-height:100%;padding:6px 0;position:relative}.el-cascader-menu__hover-zone{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.el-cascader-menu__empty-text{align-items:center;color:var(--el-cascader-color-empty);display:flex;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.el-cascader-menu__empty-text .is-loading{margin-right:2px}.el-cascader-node{align-items:center;display:flex;height:34px;line-height:34px;outline:none;padding:0 30px 0 20px;position:relative}.el-cascader-node.is-selectable.in-active-path{color:var(--el-cascader-menu-text-color)}.el-cascader-node.in-active-path,.el-cascader-node.is-active,.el-cascader-node.is-selectable.in-checked-path{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader-node:not(.is-disabled){cursor:pointer}.el-cascader-node:not(.is-disabled):focus,.el-cascader-node:not(.is-disabled):hover{background:var(--el-cascader-node-background-hover)}.el-cascader-node.is-disabled{color:var(--el-cascader-node-color-disabled);cursor:not-allowed}.el-cascader-node__prefix{left:10px;position:absolute}.el-cascader-node__postfix{position:absolute;right:10px}.el-cascader-node__label{flex:1;overflow:hidden;padding:0 8px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-cascader-node>.el-checkbox{margin-right:0}.el-cascader-node>.el-radio{margin-right:0}.el-cascader-node>.el-radio .el-radio__label{padding-left:0}.el-cascader{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);display:inline-block;font-size:var(--el-font-size-base);line-height:32px;outline:none;position:relative;vertical-align:middle}.el-cascader:not(.is-disabled):hover .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset;cursor:pointer}.el-cascader .el-input{cursor:pointer;display:flex}.el-cascader .el-input .el-input__inner{cursor:pointer;text-overflow:ellipsis}.el-cascader .el-input .el-input__suffix-inner .el-icon{height:calc(100% - 2px)}.el-cascader .el-input .el-input__suffix-inner .el-icon svg{vertical-align:middle}.el-cascader .el-input .icon-arrow-down{font-size:14px;transition:transform var(--el-transition-duration)}.el-cascader .el-input .icon-arrow-down.is-reverse{transform:rotate(180deg)}.el-cascader .el-input .icon-circle-close:hover{color:var(--el-input-clear-hover-color,var(--el-text-color-secondary))}.el-cascader .el-input.is-focus .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-cascader--large{font-size:14px;line-height:40px}.el-cascader--small{font-size:12px;line-height:24px}.el-cascader.is-disabled .el-cascader__label{color:var(--el-disabled-text-color);z-index:calc(var(--el-index-normal) + 1)}.el-cascader__dropdown{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);border-radius:var(--el-cascader-menu-radius);font-size:var(--el-cascader-menu-font-size)}.el-cascader__dropdown.el-popper{background:var(--el-cascader-menu-fill);border:var(--el-cascader-menu-border)}.el-cascader__dropdown.el-popper .el-popper__arrow:before{border:var(--el-cascader-menu-border)}.el-cascader__dropdown.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-cascader__dropdown.el-popper{box-shadow:var(--el-cascader-menu-shadow)}.el-cascader__tags{box-sizing:border-box;display:flex;flex-wrap:wrap;left:0;line-height:normal;position:absolute;right:30px;text-align:left;top:50%;transform:translateY(-50%)}.el-cascader__tags .el-tag{align-items:center;background:var(--el-cascader-tag-background);display:inline-flex;margin:2px 0 2px 6px;max-width:100%;text-overflow:ellipsis}.el-cascader__tags .el-tag:not(.is-hit){border-color:transparent}.el-cascader__tags .el-tag>span{flex:1;overflow:hidden;text-overflow:ellipsis}.el-cascader__tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__tags.is-validate{right:55px}.el-cascader__collapse-tags{white-space:normal;z-index:var(--el-index-normal)}.el-cascader__collapse-tags .el-tag{align-items:center;background:var(--el-fill-color);display:inline-flex;margin:2px 0 2px 6px;max-width:100%;text-overflow:ellipsis}.el-cascader__collapse-tags .el-tag:not(.is-hit){border-color:transparent}.el-cascader__collapse-tags .el-tag>span{flex:1;overflow:hidden;text-overflow:ellipsis}.el-cascader__collapse-tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__collapse-tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__suggestion-panel{border-radius:var(--el-cascader-menu-radius)}.el-cascader__suggestion-list{color:var(--el-cascader-menu-text-color);font-size:var(--el-font-size-base);margin:0;max-height:204px;padding:6px 0;text-align:center}.el-cascader__suggestion-item{align-items:center;cursor:pointer;display:flex;height:34px;justify-content:space-between;outline:none;padding:0 15px;text-align:left}.el-cascader__suggestion-item:focus,.el-cascader__suggestion-item:hover{background:var(--el-cascader-node-background-hover)}.el-cascader__suggestion-item.is-checked{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader__suggestion-item>span{margin-right:10px}.el-cascader__empty-text{color:var(--el-cascader-color-empty);margin:10px 0}.el-cascader__search-input{background:transparent;border:none;box-sizing:border-box;color:var(--el-cascader-menu-text-color);flex:1;height:24px;margin:2px 0 2px 11px;min-width:60px;outline:none;padding:0}.el-cascader__search-input::-moz-placeholder{color:transparent}.el-cascader__search-input:-ms-input-placeholder{color:transparent}.el-cascader__search-input::placeholder{color:transparent}.el-check-tag{background-color:var(--el-color-info-light-9);border-radius:var(--el-border-radius-base);color:var(--el-color-info);cursor:pointer;display:inline-block;font-size:var(--el-font-size-base);font-weight:700;line-height:var(--el-font-size-base);padding:7px 15px;transition:var(--el-transition-all)}.el-check-tag:hover{background-color:var(--el-color-info-light-7)}.el-check-tag.is-checked.el-check-tag--primary{background-color:var(--el-color-primary-light-8);color:var(--el-color-primary)}.el-check-tag.is-checked.el-check-tag--primary:hover{background-color:var(--el-color-primary-light-7)}.el-check-tag.is-checked.el-check-tag--success{background-color:var(--el-color-success-light-8);color:var(--el-color-success)}.el-check-tag.is-checked.el-check-tag--success:hover{background-color:var(--el-color-success-light-7)}.el-check-tag.is-checked.el-check-tag--warning{background-color:var(--el-color-warning-light-8);color:var(--el-color-warning)}.el-check-tag.is-checked.el-check-tag--warning:hover{background-color:var(--el-color-warning-light-7)}.el-check-tag.is-checked.el-check-tag--danger{background-color:var(--el-color-danger-light-8);color:var(--el-color-danger)}.el-check-tag.is-checked.el-check-tag--danger:hover{background-color:var(--el-color-danger-light-7)}.el-check-tag.is-checked.el-check-tag--error{background-color:var(--el-color-error-light-8);color:var(--el-color-error)}.el-check-tag.is-checked.el-check-tag--error:hover{background-color:var(--el-color-error-light-7)}.el-check-tag.is-checked.el-check-tag--info{background-color:var(--el-color-info-light-8);color:var(--el-color-info)}.el-check-tag.is-checked.el-check-tag--info:hover{background-color:var(--el-color-info-light-7)}.el-checkbox-button{--el-checkbox-button-checked-bg-color:var(--el-color-primary);--el-checkbox-button-checked-text-color:var(--el-color-white);--el-checkbox-button-checked-border-color:var(--el-color-primary);display:inline-block;position:relative}.el-checkbox-button__inner{-webkit-appearance:none;background:var(--el-button-bg-color,var(--el-fill-color-blank));border:var(--el-border);border-left-color:transparent;border-radius:0;box-sizing:border-box;color:var(--el-button-text-color,var(--el-text-color-regular));cursor:pointer;display:inline-block;font-size:var(--el-font-size-base);font-weight:var(--el-checkbox-font-weight);line-height:1;margin:0;outline:none;padding:8px 15px;position:relative;text-align:center;transition:var(--el-transition-all);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-checkbox-button__inner.is-round{padding:8px 15px}.el-checkbox-button__inner:hover{color:var(--el-color-primary)}.el-checkbox-button__inner [class*=el-icon-]{line-height:.9}.el-checkbox-button__inner [class*=el-icon-]+span{margin-left:5px}.el-checkbox-button__original{margin:0;opacity:0;outline:none;position:absolute;z-index:-1}.el-checkbox-button.is-checked .el-checkbox-button__inner{background-color:var(--el-checkbox-button-checked-bg-color);border-color:var(--el-checkbox-button-checked-border-color);box-shadow:-1px 0 0 0 var(--el-color-primary-light-7);color:var(--el-checkbox-button-checked-text-color)}.el-checkbox-button.is-checked:first-child .el-checkbox-button__inner{border-left-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button.is-disabled .el-checkbox-button__inner{background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));background-image:none;border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none;color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox-button.is-disabled:first-child .el-checkbox-button__inner{border-left-color:var(--el-button-disabled-border-color,var(--el-border-color-light))}.el-checkbox-button:first-child .el-checkbox-button__inner{border-bottom-left-radius:var(--el-border-radius-base);border-left:var(--el-border);border-top-left-radius:var(--el-border-radius-base);box-shadow:none!important}.el-checkbox-button.is-focus .el-checkbox-button__inner{border-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button:last-child .el-checkbox-button__inner{border-bottom-right-radius:var(--el-border-radius-base);border-top-right-radius:var(--el-border-radius-base)}.el-checkbox-button--large .el-checkbox-button__inner{border-radius:0;font-size:var(--el-font-size-base);padding:12px 19px}.el-checkbox-button--large .el-checkbox-button__inner.is-round{padding:12px 19px}.el-checkbox-button--small .el-checkbox-button__inner{border-radius:0;font-size:12px;padding:5px 11px}.el-checkbox-button--small .el-checkbox-button__inner.is-round{padding:5px 11px}.el-checkbox-group{font-size:0;line-height:0}.el-checkbox{--el-checkbox-font-size:14px;--el-checkbox-font-weight:var(--el-font-weight-primary);--el-checkbox-text-color:var(--el-text-color-regular);--el-checkbox-input-height:14px;--el-checkbox-input-width:14px;--el-checkbox-border-radius:var(--el-border-radius-small);--el-checkbox-bg-color:var(--el-fill-color-blank);--el-checkbox-input-border:var(--el-border);--el-checkbox-disabled-border-color:var(--el-border-color);--el-checkbox-disabled-input-fill:var(--el-fill-color-light);--el-checkbox-disabled-icon-color:var(--el-text-color-placeholder);--el-checkbox-disabled-checked-input-fill:var(--el-border-color-extra-light);--el-checkbox-disabled-checked-input-border-color:var(--el-border-color);--el-checkbox-disabled-checked-icon-color:var(--el-text-color-placeholder);--el-checkbox-checked-text-color:var(--el-color-primary);--el-checkbox-checked-input-border-color:var(--el-color-primary);--el-checkbox-checked-bg-color:var(--el-color-primary);--el-checkbox-checked-icon-color:var(--el-color-white);--el-checkbox-input-border-color-hover:var(--el-color-primary);align-items:center;color:var(--el-checkbox-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-checkbox-font-weight);height:var(--el-checkbox-height,32px);margin-right:30px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-checkbox.is-disabled{cursor:not-allowed}.el-checkbox.is-bordered{border:var(--el-border);border-radius:var(--el-border-radius-base);box-sizing:border-box;padding:0 15px 0 9px}.el-checkbox.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-checkbox.is-bordered.is-disabled{border-color:var(--el-border-color-lighter)}.el-checkbox.is-bordered.el-checkbox--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__label{font-size:var(--el-font-size-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.is-bordered.el-checkbox--small{border-radius:calc(var(--el-border-radius-base) - 1px);padding:0 11px 0 7px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox input:focus-visible+.el-checkbox__inner{border-radius:var(--el-checkbox-border-radius);outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px}.el-checkbox__input{cursor:pointer;display:inline-flex;outline:none;position:relative;white-space:nowrap}.el-checkbox__input.is-disabled .el-checkbox__inner{background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color);cursor:not-allowed}.el-checkbox__input.is-disabled .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-icon-color);cursor:not-allowed}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-disabled-checked-icon-color);border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled+span.el-checkbox__label{color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox__input.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-checked-icon-color);transform:rotate(45deg) scaleY(1)}.el-checkbox__input.is-checked+.el-checkbox__label{color:var(--el-checkbox-checked-text-color)}.el-checkbox__input.is-focus:not(.is-checked) .el-checkbox__original:not(:focus-visible){border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__input.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-checked-icon-color);content:"";display:block;height:2px;left:0;position:absolute;right:0;top:5px;transform:scale(.5)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{background-color:var(--el-checkbox-bg-color);border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;display:inline-block;height:var(--el-checkbox-input-height);position:relative;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46),outline .25s cubic-bezier(.71,-.46,.29,1.46);width:var(--el-checkbox-input-width);z-index:var(--el-index-normal)}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{border:1px solid transparent;border-left:0;border-top:0;box-sizing:content-box;content:"";height:7px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);transform-origin:center;transition:transform .15s ease-in .05s;width:3px}.el-checkbox__original{height:0;margin:0;opacity:0;outline:none;position:absolute;width:0;z-index:-1}.el-checkbox__label{display:inline-block;font-size:var(--el-checkbox-font-size);line-height:1;padding-left:8px}.el-checkbox.el-checkbox--large{height:40px}.el-checkbox.el-checkbox--large .el-checkbox__label{font-size:14px}.el-checkbox.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.el-checkbox--small{height:24px}.el-checkbox.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.el-checkbox--small .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{top:4px}.el-checkbox.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox:last-of-type{margin-right:0}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{display:block;min-height:1px}.el-col-0{flex:0 0 0%;max-width:0}.el-col-0,.el-col-0.is-guttered{display:none}.el-col-offset-0{margin-left:0}.el-col-pull-0{position:relative;right:0}.el-col-push-0{left:0;position:relative}.el-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-1,.el-col-1.is-guttered{display:block}.el-col-offset-1{margin-left:4.1666666667%}.el-col-pull-1{position:relative;right:4.1666666667%}.el-col-push-1{left:4.1666666667%;position:relative}.el-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-2,.el-col-2.is-guttered{display:block}.el-col-offset-2{margin-left:8.3333333333%}.el-col-pull-2{position:relative;right:8.3333333333%}.el-col-push-2{left:8.3333333333%;position:relative}.el-col-3{flex:0 0 12.5%;max-width:12.5%}.el-col-3,.el-col-3.is-guttered{display:block}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{left:12.5%;position:relative}.el-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-4,.el-col-4.is-guttered{display:block}.el-col-offset-4{margin-left:16.6666666667%}.el-col-pull-4{position:relative;right:16.6666666667%}.el-col-push-4{left:16.6666666667%;position:relative}.el-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-5,.el-col-5.is-guttered{display:block}.el-col-offset-5{margin-left:20.8333333333%}.el-col-pull-5{position:relative;right:20.8333333333%}.el-col-push-5{left:20.8333333333%;position:relative}.el-col-6{flex:0 0 25%;max-width:25%}.el-col-6,.el-col-6.is-guttered{display:block}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{left:25%;position:relative}.el-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-7,.el-col-7.is-guttered{display:block}.el-col-offset-7{margin-left:29.1666666667%}.el-col-pull-7{position:relative;right:29.1666666667%}.el-col-push-7{left:29.1666666667%;position:relative}.el-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-8,.el-col-8.is-guttered{display:block}.el-col-offset-8{margin-left:33.3333333333%}.el-col-pull-8{position:relative;right:33.3333333333%}.el-col-push-8{left:33.3333333333%;position:relative}.el-col-9{flex:0 0 37.5%;max-width:37.5%}.el-col-9,.el-col-9.is-guttered{display:block}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{left:37.5%;position:relative}.el-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-10,.el-col-10.is-guttered{display:block}.el-col-offset-10{margin-left:41.6666666667%}.el-col-pull-10{position:relative;right:41.6666666667%}.el-col-push-10{left:41.6666666667%;position:relative}.el-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-11,.el-col-11.is-guttered{display:block}.el-col-offset-11{margin-left:45.8333333333%}.el-col-pull-11{position:relative;right:45.8333333333%}.el-col-push-11{left:45.8333333333%;position:relative}.el-col-12{flex:0 0 50%;max-width:50%}.el-col-12,.el-col-12.is-guttered{display:block}.el-col-offset-12{margin-left:50%}.el-col-pull-12{position:relative;right:50%}.el-col-push-12{left:50%;position:relative}.el-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-13,.el-col-13.is-guttered{display:block}.el-col-offset-13{margin-left:54.1666666667%}.el-col-pull-13{position:relative;right:54.1666666667%}.el-col-push-13{left:54.1666666667%;position:relative}.el-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-14,.el-col-14.is-guttered{display:block}.el-col-offset-14{margin-left:58.3333333333%}.el-col-pull-14{position:relative;right:58.3333333333%}.el-col-push-14{left:58.3333333333%;position:relative}.el-col-15{flex:0 0 62.5%;max-width:62.5%}.el-col-15,.el-col-15.is-guttered{display:block}.el-col-offset-15{margin-left:62.5%}.el-col-pull-15{position:relative;right:62.5%}.el-col-push-15{left:62.5%;position:relative}.el-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-16,.el-col-16.is-guttered{display:block}.el-col-offset-16{margin-left:66.6666666667%}.el-col-pull-16{position:relative;right:66.6666666667%}.el-col-push-16{left:66.6666666667%;position:relative}.el-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-17,.el-col-17.is-guttered{display:block}.el-col-offset-17{margin-left:70.8333333333%}.el-col-pull-17{position:relative;right:70.8333333333%}.el-col-push-17{left:70.8333333333%;position:relative}.el-col-18{flex:0 0 75%;max-width:75%}.el-col-18,.el-col-18.is-guttered{display:block}.el-col-offset-18{margin-left:75%}.el-col-pull-18{position:relative;right:75%}.el-col-push-18{left:75%;position:relative}.el-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-19,.el-col-19.is-guttered{display:block}.el-col-offset-19{margin-left:79.1666666667%}.el-col-pull-19{position:relative;right:79.1666666667%}.el-col-push-19{left:79.1666666667%;position:relative}.el-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-20,.el-col-20.is-guttered{display:block}.el-col-offset-20{margin-left:83.3333333333%}.el-col-pull-20{position:relative;right:83.3333333333%}.el-col-push-20{left:83.3333333333%;position:relative}.el-col-21{flex:0 0 87.5%;max-width:87.5%}.el-col-21,.el-col-21.is-guttered{display:block}.el-col-offset-21{margin-left:87.5%}.el-col-pull-21{position:relative;right:87.5%}.el-col-push-21{left:87.5%;position:relative}.el-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-22,.el-col-22.is-guttered{display:block}.el-col-offset-22{margin-left:91.6666666667%}.el-col-pull-22{position:relative;right:91.6666666667%}.el-col-push-22{left:91.6666666667%;position:relative}.el-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-23,.el-col-23.is-guttered{display:block}.el-col-offset-23{margin-left:95.8333333333%}.el-col-pull-23{position:relative;right:95.8333333333%}.el-col-push-23{left:95.8333333333%;position:relative}.el-col-24{flex:0 0 100%;max-width:100%}.el-col-24,.el-col-24.is-guttered{display:block}.el-col-offset-24{margin-left:100%}.el-col-pull-24{position:relative;right:100%}.el-col-push-24{left:100%;position:relative}@media only screen and (max-width:767px){.el-col-xs-0{display:none;flex:0 0 0%;max-width:0}.el-col-xs-0.is-guttered{display:none}.el-col-xs-offset-0{margin-left:0}.el-col-xs-pull-0{position:relative;right:0}.el-col-xs-push-0{left:0;position:relative}.el-col-xs-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xs-1,.el-col-xs-1.is-guttered{display:block}.el-col-xs-offset-1{margin-left:4.1666666667%}.el-col-xs-pull-1{position:relative;right:4.1666666667%}.el-col-xs-push-1{left:4.1666666667%;position:relative}.el-col-xs-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xs-2,.el-col-xs-2.is-guttered{display:block}.el-col-xs-offset-2{margin-left:8.3333333333%}.el-col-xs-pull-2{position:relative;right:8.3333333333%}.el-col-xs-push-2{left:8.3333333333%;position:relative}.el-col-xs-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xs-3,.el-col-xs-3.is-guttered{display:block}.el-col-xs-offset-3{margin-left:12.5%}.el-col-xs-pull-3{position:relative;right:12.5%}.el-col-xs-push-3{left:12.5%;position:relative}.el-col-xs-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xs-4,.el-col-xs-4.is-guttered{display:block}.el-col-xs-offset-4{margin-left:16.6666666667%}.el-col-xs-pull-4{position:relative;right:16.6666666667%}.el-col-xs-push-4{left:16.6666666667%;position:relative}.el-col-xs-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xs-5,.el-col-xs-5.is-guttered{display:block}.el-col-xs-offset-5{margin-left:20.8333333333%}.el-col-xs-pull-5{position:relative;right:20.8333333333%}.el-col-xs-push-5{left:20.8333333333%;position:relative}.el-col-xs-6{flex:0 0 25%;max-width:25%}.el-col-xs-6,.el-col-xs-6.is-guttered{display:block}.el-col-xs-offset-6{margin-left:25%}.el-col-xs-pull-6{position:relative;right:25%}.el-col-xs-push-6{left:25%;position:relative}.el-col-xs-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xs-7,.el-col-xs-7.is-guttered{display:block}.el-col-xs-offset-7{margin-left:29.1666666667%}.el-col-xs-pull-7{position:relative;right:29.1666666667%}.el-col-xs-push-7{left:29.1666666667%;position:relative}.el-col-xs-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xs-8,.el-col-xs-8.is-guttered{display:block}.el-col-xs-offset-8{margin-left:33.3333333333%}.el-col-xs-pull-8{position:relative;right:33.3333333333%}.el-col-xs-push-8{left:33.3333333333%;position:relative}.el-col-xs-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xs-9,.el-col-xs-9.is-guttered{display:block}.el-col-xs-offset-9{margin-left:37.5%}.el-col-xs-pull-9{position:relative;right:37.5%}.el-col-xs-push-9{left:37.5%;position:relative}.el-col-xs-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xs-10.is-guttered{display:block}.el-col-xs-offset-10{margin-left:41.6666666667%}.el-col-xs-pull-10{position:relative;right:41.6666666667%}.el-col-xs-push-10{left:41.6666666667%;position:relative}.el-col-xs-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xs-11.is-guttered{display:block}.el-col-xs-offset-11{margin-left:45.8333333333%}.el-col-xs-pull-11{position:relative;right:45.8333333333%}.el-col-xs-push-11{left:45.8333333333%;position:relative}.el-col-xs-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xs-12.is-guttered{display:block}.el-col-xs-offset-12{margin-left:50%}.el-col-xs-pull-12{position:relative;right:50%}.el-col-xs-push-12{left:50%;position:relative}.el-col-xs-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xs-13.is-guttered{display:block}.el-col-xs-offset-13{margin-left:54.1666666667%}.el-col-xs-pull-13{position:relative;right:54.1666666667%}.el-col-xs-push-13{left:54.1666666667%;position:relative}.el-col-xs-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xs-14.is-guttered{display:block}.el-col-xs-offset-14{margin-left:58.3333333333%}.el-col-xs-pull-14{position:relative;right:58.3333333333%}.el-col-xs-push-14{left:58.3333333333%;position:relative}.el-col-xs-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xs-15.is-guttered{display:block}.el-col-xs-offset-15{margin-left:62.5%}.el-col-xs-pull-15{position:relative;right:62.5%}.el-col-xs-push-15{left:62.5%;position:relative}.el-col-xs-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xs-16.is-guttered{display:block}.el-col-xs-offset-16{margin-left:66.6666666667%}.el-col-xs-pull-16{position:relative;right:66.6666666667%}.el-col-xs-push-16{left:66.6666666667%;position:relative}.el-col-xs-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xs-17.is-guttered{display:block}.el-col-xs-offset-17{margin-left:70.8333333333%}.el-col-xs-pull-17{position:relative;right:70.8333333333%}.el-col-xs-push-17{left:70.8333333333%;position:relative}.el-col-xs-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xs-18.is-guttered{display:block}.el-col-xs-offset-18{margin-left:75%}.el-col-xs-pull-18{position:relative;right:75%}.el-col-xs-push-18{left:75%;position:relative}.el-col-xs-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xs-19.is-guttered{display:block}.el-col-xs-offset-19{margin-left:79.1666666667%}.el-col-xs-pull-19{position:relative;right:79.1666666667%}.el-col-xs-push-19{left:79.1666666667%;position:relative}.el-col-xs-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xs-20.is-guttered{display:block}.el-col-xs-offset-20{margin-left:83.3333333333%}.el-col-xs-pull-20{position:relative;right:83.3333333333%}.el-col-xs-push-20{left:83.3333333333%;position:relative}.el-col-xs-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xs-21.is-guttered{display:block}.el-col-xs-offset-21{margin-left:87.5%}.el-col-xs-pull-21{position:relative;right:87.5%}.el-col-xs-push-21{left:87.5%;position:relative}.el-col-xs-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xs-22.is-guttered{display:block}.el-col-xs-offset-22{margin-left:91.6666666667%}.el-col-xs-pull-22{position:relative;right:91.6666666667%}.el-col-xs-push-22{left:91.6666666667%;position:relative}.el-col-xs-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xs-23.is-guttered{display:block}.el-col-xs-offset-23{margin-left:95.8333333333%}.el-col-xs-pull-23{position:relative;right:95.8333333333%}.el-col-xs-push-23{left:95.8333333333%;position:relative}.el-col-xs-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xs-24.is-guttered{display:block}.el-col-xs-offset-24{margin-left:100%}.el-col-xs-pull-24{position:relative;right:100%}.el-col-xs-push-24{left:100%;position:relative}}@media only screen and (min-width:768px){.el-col-sm-0{display:none;flex:0 0 0%;max-width:0}.el-col-sm-0.is-guttered{display:none}.el-col-sm-offset-0{margin-left:0}.el-col-sm-pull-0{position:relative;right:0}.el-col-sm-push-0{left:0;position:relative}.el-col-sm-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-sm-1,.el-col-sm-1.is-guttered{display:block}.el-col-sm-offset-1{margin-left:4.1666666667%}.el-col-sm-pull-1{position:relative;right:4.1666666667%}.el-col-sm-push-1{left:4.1666666667%;position:relative}.el-col-sm-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-sm-2,.el-col-sm-2.is-guttered{display:block}.el-col-sm-offset-2{margin-left:8.3333333333%}.el-col-sm-pull-2{position:relative;right:8.3333333333%}.el-col-sm-push-2{left:8.3333333333%;position:relative}.el-col-sm-3{flex:0 0 12.5%;max-width:12.5%}.el-col-sm-3,.el-col-sm-3.is-guttered{display:block}.el-col-sm-offset-3{margin-left:12.5%}.el-col-sm-pull-3{position:relative;right:12.5%}.el-col-sm-push-3{left:12.5%;position:relative}.el-col-sm-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-sm-4,.el-col-sm-4.is-guttered{display:block}.el-col-sm-offset-4{margin-left:16.6666666667%}.el-col-sm-pull-4{position:relative;right:16.6666666667%}.el-col-sm-push-4{left:16.6666666667%;position:relative}.el-col-sm-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-sm-5,.el-col-sm-5.is-guttered{display:block}.el-col-sm-offset-5{margin-left:20.8333333333%}.el-col-sm-pull-5{position:relative;right:20.8333333333%}.el-col-sm-push-5{left:20.8333333333%;position:relative}.el-col-sm-6{flex:0 0 25%;max-width:25%}.el-col-sm-6,.el-col-sm-6.is-guttered{display:block}.el-col-sm-offset-6{margin-left:25%}.el-col-sm-pull-6{position:relative;right:25%}.el-col-sm-push-6{left:25%;position:relative}.el-col-sm-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-sm-7,.el-col-sm-7.is-guttered{display:block}.el-col-sm-offset-7{margin-left:29.1666666667%}.el-col-sm-pull-7{position:relative;right:29.1666666667%}.el-col-sm-push-7{left:29.1666666667%;position:relative}.el-col-sm-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-sm-8,.el-col-sm-8.is-guttered{display:block}.el-col-sm-offset-8{margin-left:33.3333333333%}.el-col-sm-pull-8{position:relative;right:33.3333333333%}.el-col-sm-push-8{left:33.3333333333%;position:relative}.el-col-sm-9{flex:0 0 37.5%;max-width:37.5%}.el-col-sm-9,.el-col-sm-9.is-guttered{display:block}.el-col-sm-offset-9{margin-left:37.5%}.el-col-sm-pull-9{position:relative;right:37.5%}.el-col-sm-push-9{left:37.5%;position:relative}.el-col-sm-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-sm-10.is-guttered{display:block}.el-col-sm-offset-10{margin-left:41.6666666667%}.el-col-sm-pull-10{position:relative;right:41.6666666667%}.el-col-sm-push-10{left:41.6666666667%;position:relative}.el-col-sm-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-sm-11.is-guttered{display:block}.el-col-sm-offset-11{margin-left:45.8333333333%}.el-col-sm-pull-11{position:relative;right:45.8333333333%}.el-col-sm-push-11{left:45.8333333333%;position:relative}.el-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.el-col-sm-12.is-guttered{display:block}.el-col-sm-offset-12{margin-left:50%}.el-col-sm-pull-12{position:relative;right:50%}.el-col-sm-push-12{left:50%;position:relative}.el-col-sm-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-sm-13.is-guttered{display:block}.el-col-sm-offset-13{margin-left:54.1666666667%}.el-col-sm-pull-13{position:relative;right:54.1666666667%}.el-col-sm-push-13{left:54.1666666667%;position:relative}.el-col-sm-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-sm-14.is-guttered{display:block}.el-col-sm-offset-14{margin-left:58.3333333333%}.el-col-sm-pull-14{position:relative;right:58.3333333333%}.el-col-sm-push-14{left:58.3333333333%;position:relative}.el-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-sm-15.is-guttered{display:block}.el-col-sm-offset-15{margin-left:62.5%}.el-col-sm-pull-15{position:relative;right:62.5%}.el-col-sm-push-15{left:62.5%;position:relative}.el-col-sm-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-sm-16.is-guttered{display:block}.el-col-sm-offset-16{margin-left:66.6666666667%}.el-col-sm-pull-16{position:relative;right:66.6666666667%}.el-col-sm-push-16{left:66.6666666667%;position:relative}.el-col-sm-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-sm-17.is-guttered{display:block}.el-col-sm-offset-17{margin-left:70.8333333333%}.el-col-sm-pull-17{position:relative;right:70.8333333333%}.el-col-sm-push-17{left:70.8333333333%;position:relative}.el-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.el-col-sm-18.is-guttered{display:block}.el-col-sm-offset-18{margin-left:75%}.el-col-sm-pull-18{position:relative;right:75%}.el-col-sm-push-18{left:75%;position:relative}.el-col-sm-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-sm-19.is-guttered{display:block}.el-col-sm-offset-19{margin-left:79.1666666667%}.el-col-sm-pull-19{position:relative;right:79.1666666667%}.el-col-sm-push-19{left:79.1666666667%;position:relative}.el-col-sm-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-sm-20.is-guttered{display:block}.el-col-sm-offset-20{margin-left:83.3333333333%}.el-col-sm-pull-20{position:relative;right:83.3333333333%}.el-col-sm-push-20{left:83.3333333333%;position:relative}.el-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-sm-21.is-guttered{display:block}.el-col-sm-offset-21{margin-left:87.5%}.el-col-sm-pull-21{position:relative;right:87.5%}.el-col-sm-push-21{left:87.5%;position:relative}.el-col-sm-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-sm-22.is-guttered{display:block}.el-col-sm-offset-22{margin-left:91.6666666667%}.el-col-sm-pull-22{position:relative;right:91.6666666667%}.el-col-sm-push-22{left:91.6666666667%;position:relative}.el-col-sm-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-sm-23.is-guttered{display:block}.el-col-sm-offset-23{margin-left:95.8333333333%}.el-col-sm-pull-23{position:relative;right:95.8333333333%}.el-col-sm-push-23{left:95.8333333333%;position:relative}.el-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.el-col-sm-24.is-guttered{display:block}.el-col-sm-offset-24{margin-left:100%}.el-col-sm-pull-24{position:relative;right:100%}.el-col-sm-push-24{left:100%;position:relative}}@media only screen and (min-width:992px){.el-col-md-0{display:none;flex:0 0 0%;max-width:0}.el-col-md-0.is-guttered{display:none}.el-col-md-offset-0{margin-left:0}.el-col-md-pull-0{position:relative;right:0}.el-col-md-push-0{left:0;position:relative}.el-col-md-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-md-1,.el-col-md-1.is-guttered{display:block}.el-col-md-offset-1{margin-left:4.1666666667%}.el-col-md-pull-1{position:relative;right:4.1666666667%}.el-col-md-push-1{left:4.1666666667%;position:relative}.el-col-md-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-md-2,.el-col-md-2.is-guttered{display:block}.el-col-md-offset-2{margin-left:8.3333333333%}.el-col-md-pull-2{position:relative;right:8.3333333333%}.el-col-md-push-2{left:8.3333333333%;position:relative}.el-col-md-3{flex:0 0 12.5%;max-width:12.5%}.el-col-md-3,.el-col-md-3.is-guttered{display:block}.el-col-md-offset-3{margin-left:12.5%}.el-col-md-pull-3{position:relative;right:12.5%}.el-col-md-push-3{left:12.5%;position:relative}.el-col-md-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-md-4,.el-col-md-4.is-guttered{display:block}.el-col-md-offset-4{margin-left:16.6666666667%}.el-col-md-pull-4{position:relative;right:16.6666666667%}.el-col-md-push-4{left:16.6666666667%;position:relative}.el-col-md-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-md-5,.el-col-md-5.is-guttered{display:block}.el-col-md-offset-5{margin-left:20.8333333333%}.el-col-md-pull-5{position:relative;right:20.8333333333%}.el-col-md-push-5{left:20.8333333333%;position:relative}.el-col-md-6{flex:0 0 25%;max-width:25%}.el-col-md-6,.el-col-md-6.is-guttered{display:block}.el-col-md-offset-6{margin-left:25%}.el-col-md-pull-6{position:relative;right:25%}.el-col-md-push-6{left:25%;position:relative}.el-col-md-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-md-7,.el-col-md-7.is-guttered{display:block}.el-col-md-offset-7{margin-left:29.1666666667%}.el-col-md-pull-7{position:relative;right:29.1666666667%}.el-col-md-push-7{left:29.1666666667%;position:relative}.el-col-md-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-md-8,.el-col-md-8.is-guttered{display:block}.el-col-md-offset-8{margin-left:33.3333333333%}.el-col-md-pull-8{position:relative;right:33.3333333333%}.el-col-md-push-8{left:33.3333333333%;position:relative}.el-col-md-9{flex:0 0 37.5%;max-width:37.5%}.el-col-md-9,.el-col-md-9.is-guttered{display:block}.el-col-md-offset-9{margin-left:37.5%}.el-col-md-pull-9{position:relative;right:37.5%}.el-col-md-push-9{left:37.5%;position:relative}.el-col-md-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-md-10.is-guttered{display:block}.el-col-md-offset-10{margin-left:41.6666666667%}.el-col-md-pull-10{position:relative;right:41.6666666667%}.el-col-md-push-10{left:41.6666666667%;position:relative}.el-col-md-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-md-11.is-guttered{display:block}.el-col-md-offset-11{margin-left:45.8333333333%}.el-col-md-pull-11{position:relative;right:45.8333333333%}.el-col-md-push-11{left:45.8333333333%;position:relative}.el-col-md-12{display:block;flex:0 0 50%;max-width:50%}.el-col-md-12.is-guttered{display:block}.el-col-md-offset-12{margin-left:50%}.el-col-md-pull-12{position:relative;right:50%}.el-col-md-push-12{left:50%;position:relative}.el-col-md-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-md-13.is-guttered{display:block}.el-col-md-offset-13{margin-left:54.1666666667%}.el-col-md-pull-13{position:relative;right:54.1666666667%}.el-col-md-push-13{left:54.1666666667%;position:relative}.el-col-md-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-md-14.is-guttered{display:block}.el-col-md-offset-14{margin-left:58.3333333333%}.el-col-md-pull-14{position:relative;right:58.3333333333%}.el-col-md-push-14{left:58.3333333333%;position:relative}.el-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-md-15.is-guttered{display:block}.el-col-md-offset-15{margin-left:62.5%}.el-col-md-pull-15{position:relative;right:62.5%}.el-col-md-push-15{left:62.5%;position:relative}.el-col-md-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-md-16.is-guttered{display:block}.el-col-md-offset-16{margin-left:66.6666666667%}.el-col-md-pull-16{position:relative;right:66.6666666667%}.el-col-md-push-16{left:66.6666666667%;position:relative}.el-col-md-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-md-17.is-guttered{display:block}.el-col-md-offset-17{margin-left:70.8333333333%}.el-col-md-pull-17{position:relative;right:70.8333333333%}.el-col-md-push-17{left:70.8333333333%;position:relative}.el-col-md-18{display:block;flex:0 0 75%;max-width:75%}.el-col-md-18.is-guttered{display:block}.el-col-md-offset-18{margin-left:75%}.el-col-md-pull-18{position:relative;right:75%}.el-col-md-push-18{left:75%;position:relative}.el-col-md-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-md-19.is-guttered{display:block}.el-col-md-offset-19{margin-left:79.1666666667%}.el-col-md-pull-19{position:relative;right:79.1666666667%}.el-col-md-push-19{left:79.1666666667%;position:relative}.el-col-md-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-md-20.is-guttered{display:block}.el-col-md-offset-20{margin-left:83.3333333333%}.el-col-md-pull-20{position:relative;right:83.3333333333%}.el-col-md-push-20{left:83.3333333333%;position:relative}.el-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-md-21.is-guttered{display:block}.el-col-md-offset-21{margin-left:87.5%}.el-col-md-pull-21{position:relative;right:87.5%}.el-col-md-push-21{left:87.5%;position:relative}.el-col-md-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-md-22.is-guttered{display:block}.el-col-md-offset-22{margin-left:91.6666666667%}.el-col-md-pull-22{position:relative;right:91.6666666667%}.el-col-md-push-22{left:91.6666666667%;position:relative}.el-col-md-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-md-23.is-guttered{display:block}.el-col-md-offset-23{margin-left:95.8333333333%}.el-col-md-pull-23{position:relative;right:95.8333333333%}.el-col-md-push-23{left:95.8333333333%;position:relative}.el-col-md-24{display:block;flex:0 0 100%;max-width:100%}.el-col-md-24.is-guttered{display:block}.el-col-md-offset-24{margin-left:100%}.el-col-md-pull-24{position:relative;right:100%}.el-col-md-push-24{left:100%;position:relative}}@media only screen and (min-width:1200px){.el-col-lg-0{display:none;flex:0 0 0%;max-width:0}.el-col-lg-0.is-guttered{display:none}.el-col-lg-offset-0{margin-left:0}.el-col-lg-pull-0{position:relative;right:0}.el-col-lg-push-0{left:0;position:relative}.el-col-lg-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-lg-1,.el-col-lg-1.is-guttered{display:block}.el-col-lg-offset-1{margin-left:4.1666666667%}.el-col-lg-pull-1{position:relative;right:4.1666666667%}.el-col-lg-push-1{left:4.1666666667%;position:relative}.el-col-lg-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-lg-2,.el-col-lg-2.is-guttered{display:block}.el-col-lg-offset-2{margin-left:8.3333333333%}.el-col-lg-pull-2{position:relative;right:8.3333333333%}.el-col-lg-push-2{left:8.3333333333%;position:relative}.el-col-lg-3{flex:0 0 12.5%;max-width:12.5%}.el-col-lg-3,.el-col-lg-3.is-guttered{display:block}.el-col-lg-offset-3{margin-left:12.5%}.el-col-lg-pull-3{position:relative;right:12.5%}.el-col-lg-push-3{left:12.5%;position:relative}.el-col-lg-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-lg-4,.el-col-lg-4.is-guttered{display:block}.el-col-lg-offset-4{margin-left:16.6666666667%}.el-col-lg-pull-4{position:relative;right:16.6666666667%}.el-col-lg-push-4{left:16.6666666667%;position:relative}.el-col-lg-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-lg-5,.el-col-lg-5.is-guttered{display:block}.el-col-lg-offset-5{margin-left:20.8333333333%}.el-col-lg-pull-5{position:relative;right:20.8333333333%}.el-col-lg-push-5{left:20.8333333333%;position:relative}.el-col-lg-6{flex:0 0 25%;max-width:25%}.el-col-lg-6,.el-col-lg-6.is-guttered{display:block}.el-col-lg-offset-6{margin-left:25%}.el-col-lg-pull-6{position:relative;right:25%}.el-col-lg-push-6{left:25%;position:relative}.el-col-lg-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-lg-7,.el-col-lg-7.is-guttered{display:block}.el-col-lg-offset-7{margin-left:29.1666666667%}.el-col-lg-pull-7{position:relative;right:29.1666666667%}.el-col-lg-push-7{left:29.1666666667%;position:relative}.el-col-lg-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-lg-8,.el-col-lg-8.is-guttered{display:block}.el-col-lg-offset-8{margin-left:33.3333333333%}.el-col-lg-pull-8{position:relative;right:33.3333333333%}.el-col-lg-push-8{left:33.3333333333%;position:relative}.el-col-lg-9{flex:0 0 37.5%;max-width:37.5%}.el-col-lg-9,.el-col-lg-9.is-guttered{display:block}.el-col-lg-offset-9{margin-left:37.5%}.el-col-lg-pull-9{position:relative;right:37.5%}.el-col-lg-push-9{left:37.5%;position:relative}.el-col-lg-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-lg-10.is-guttered{display:block}.el-col-lg-offset-10{margin-left:41.6666666667%}.el-col-lg-pull-10{position:relative;right:41.6666666667%}.el-col-lg-push-10{left:41.6666666667%;position:relative}.el-col-lg-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-lg-11.is-guttered{display:block}.el-col-lg-offset-11{margin-left:45.8333333333%}.el-col-lg-pull-11{position:relative;right:45.8333333333%}.el-col-lg-push-11{left:45.8333333333%;position:relative}.el-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.el-col-lg-12.is-guttered{display:block}.el-col-lg-offset-12{margin-left:50%}.el-col-lg-pull-12{position:relative;right:50%}.el-col-lg-push-12{left:50%;position:relative}.el-col-lg-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-lg-13.is-guttered{display:block}.el-col-lg-offset-13{margin-left:54.1666666667%}.el-col-lg-pull-13{position:relative;right:54.1666666667%}.el-col-lg-push-13{left:54.1666666667%;position:relative}.el-col-lg-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-lg-14.is-guttered{display:block}.el-col-lg-offset-14{margin-left:58.3333333333%}.el-col-lg-pull-14{position:relative;right:58.3333333333%}.el-col-lg-push-14{left:58.3333333333%;position:relative}.el-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-lg-15.is-guttered{display:block}.el-col-lg-offset-15{margin-left:62.5%}.el-col-lg-pull-15{position:relative;right:62.5%}.el-col-lg-push-15{left:62.5%;position:relative}.el-col-lg-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-lg-16.is-guttered{display:block}.el-col-lg-offset-16{margin-left:66.6666666667%}.el-col-lg-pull-16{position:relative;right:66.6666666667%}.el-col-lg-push-16{left:66.6666666667%;position:relative}.el-col-lg-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-lg-17.is-guttered{display:block}.el-col-lg-offset-17{margin-left:70.8333333333%}.el-col-lg-pull-17{position:relative;right:70.8333333333%}.el-col-lg-push-17{left:70.8333333333%;position:relative}.el-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.el-col-lg-18.is-guttered{display:block}.el-col-lg-offset-18{margin-left:75%}.el-col-lg-pull-18{position:relative;right:75%}.el-col-lg-push-18{left:75%;position:relative}.el-col-lg-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-lg-19.is-guttered{display:block}.el-col-lg-offset-19{margin-left:79.1666666667%}.el-col-lg-pull-19{position:relative;right:79.1666666667%}.el-col-lg-push-19{left:79.1666666667%;position:relative}.el-col-lg-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-lg-20.is-guttered{display:block}.el-col-lg-offset-20{margin-left:83.3333333333%}.el-col-lg-pull-20{position:relative;right:83.3333333333%}.el-col-lg-push-20{left:83.3333333333%;position:relative}.el-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-lg-21.is-guttered{display:block}.el-col-lg-offset-21{margin-left:87.5%}.el-col-lg-pull-21{position:relative;right:87.5%}.el-col-lg-push-21{left:87.5%;position:relative}.el-col-lg-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-lg-22.is-guttered{display:block}.el-col-lg-offset-22{margin-left:91.6666666667%}.el-col-lg-pull-22{position:relative;right:91.6666666667%}.el-col-lg-push-22{left:91.6666666667%;position:relative}.el-col-lg-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-lg-23.is-guttered{display:block}.el-col-lg-offset-23{margin-left:95.8333333333%}.el-col-lg-pull-23{position:relative;right:95.8333333333%}.el-col-lg-push-23{left:95.8333333333%;position:relative}.el-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.el-col-lg-24.is-guttered{display:block}.el-col-lg-offset-24{margin-left:100%}.el-col-lg-pull-24{position:relative;right:100%}.el-col-lg-push-24{left:100%;position:relative}}@media only screen and (min-width:1920px){.el-col-xl-0{display:none;flex:0 0 0%;max-width:0}.el-col-xl-0.is-guttered{display:none}.el-col-xl-offset-0{margin-left:0}.el-col-xl-pull-0{position:relative;right:0}.el-col-xl-push-0{left:0;position:relative}.el-col-xl-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xl-1,.el-col-xl-1.is-guttered{display:block}.el-col-xl-offset-1{margin-left:4.1666666667%}.el-col-xl-pull-1{position:relative;right:4.1666666667%}.el-col-xl-push-1{left:4.1666666667%;position:relative}.el-col-xl-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xl-2,.el-col-xl-2.is-guttered{display:block}.el-col-xl-offset-2{margin-left:8.3333333333%}.el-col-xl-pull-2{position:relative;right:8.3333333333%}.el-col-xl-push-2{left:8.3333333333%;position:relative}.el-col-xl-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xl-3,.el-col-xl-3.is-guttered{display:block}.el-col-xl-offset-3{margin-left:12.5%}.el-col-xl-pull-3{position:relative;right:12.5%}.el-col-xl-push-3{left:12.5%;position:relative}.el-col-xl-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xl-4,.el-col-xl-4.is-guttered{display:block}.el-col-xl-offset-4{margin-left:16.6666666667%}.el-col-xl-pull-4{position:relative;right:16.6666666667%}.el-col-xl-push-4{left:16.6666666667%;position:relative}.el-col-xl-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xl-5,.el-col-xl-5.is-guttered{display:block}.el-col-xl-offset-5{margin-left:20.8333333333%}.el-col-xl-pull-5{position:relative;right:20.8333333333%}.el-col-xl-push-5{left:20.8333333333%;position:relative}.el-col-xl-6{flex:0 0 25%;max-width:25%}.el-col-xl-6,.el-col-xl-6.is-guttered{display:block}.el-col-xl-offset-6{margin-left:25%}.el-col-xl-pull-6{position:relative;right:25%}.el-col-xl-push-6{left:25%;position:relative}.el-col-xl-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xl-7,.el-col-xl-7.is-guttered{display:block}.el-col-xl-offset-7{margin-left:29.1666666667%}.el-col-xl-pull-7{position:relative;right:29.1666666667%}.el-col-xl-push-7{left:29.1666666667%;position:relative}.el-col-xl-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xl-8,.el-col-xl-8.is-guttered{display:block}.el-col-xl-offset-8{margin-left:33.3333333333%}.el-col-xl-pull-8{position:relative;right:33.3333333333%}.el-col-xl-push-8{left:33.3333333333%;position:relative}.el-col-xl-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xl-9,.el-col-xl-9.is-guttered{display:block}.el-col-xl-offset-9{margin-left:37.5%}.el-col-xl-pull-9{position:relative;right:37.5%}.el-col-xl-push-9{left:37.5%;position:relative}.el-col-xl-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xl-10.is-guttered{display:block}.el-col-xl-offset-10{margin-left:41.6666666667%}.el-col-xl-pull-10{position:relative;right:41.6666666667%}.el-col-xl-push-10{left:41.6666666667%;position:relative}.el-col-xl-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xl-11.is-guttered{display:block}.el-col-xl-offset-11{margin-left:45.8333333333%}.el-col-xl-pull-11{position:relative;right:45.8333333333%}.el-col-xl-push-11{left:45.8333333333%;position:relative}.el-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xl-12.is-guttered{display:block}.el-col-xl-offset-12{margin-left:50%}.el-col-xl-pull-12{position:relative;right:50%}.el-col-xl-push-12{left:50%;position:relative}.el-col-xl-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xl-13.is-guttered{display:block}.el-col-xl-offset-13{margin-left:54.1666666667%}.el-col-xl-pull-13{position:relative;right:54.1666666667%}.el-col-xl-push-13{left:54.1666666667%;position:relative}.el-col-xl-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xl-14.is-guttered{display:block}.el-col-xl-offset-14{margin-left:58.3333333333%}.el-col-xl-pull-14{position:relative;right:58.3333333333%}.el-col-xl-push-14{left:58.3333333333%;position:relative}.el-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xl-15.is-guttered{display:block}.el-col-xl-offset-15{margin-left:62.5%}.el-col-xl-pull-15{position:relative;right:62.5%}.el-col-xl-push-15{left:62.5%;position:relative}.el-col-xl-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xl-16.is-guttered{display:block}.el-col-xl-offset-16{margin-left:66.6666666667%}.el-col-xl-pull-16{position:relative;right:66.6666666667%}.el-col-xl-push-16{left:66.6666666667%;position:relative}.el-col-xl-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xl-17.is-guttered{display:block}.el-col-xl-offset-17{margin-left:70.8333333333%}.el-col-xl-pull-17{position:relative;right:70.8333333333%}.el-col-xl-push-17{left:70.8333333333%;position:relative}.el-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xl-18.is-guttered{display:block}.el-col-xl-offset-18{margin-left:75%}.el-col-xl-pull-18{position:relative;right:75%}.el-col-xl-push-18{left:75%;position:relative}.el-col-xl-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xl-19.is-guttered{display:block}.el-col-xl-offset-19{margin-left:79.1666666667%}.el-col-xl-pull-19{position:relative;right:79.1666666667%}.el-col-xl-push-19{left:79.1666666667%;position:relative}.el-col-xl-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xl-20.is-guttered{display:block}.el-col-xl-offset-20{margin-left:83.3333333333%}.el-col-xl-pull-20{position:relative;right:83.3333333333%}.el-col-xl-push-20{left:83.3333333333%;position:relative}.el-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xl-21.is-guttered{display:block}.el-col-xl-offset-21{margin-left:87.5%}.el-col-xl-pull-21{position:relative;right:87.5%}.el-col-xl-push-21{left:87.5%;position:relative}.el-col-xl-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xl-22.is-guttered{display:block}.el-col-xl-offset-22{margin-left:91.6666666667%}.el-col-xl-pull-22{position:relative;right:91.6666666667%}.el-col-xl-push-22{left:91.6666666667%;position:relative}.el-col-xl-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xl-23.is-guttered{display:block}.el-col-xl-offset-23{margin-left:95.8333333333%}.el-col-xl-pull-23{position:relative;right:95.8333333333%}.el-col-xl-push-23{left:95.8333333333%;position:relative}.el-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xl-24.is-guttered{display:block}.el-col-xl-offset-24{margin-left:100%}.el-col-xl-pull-24{position:relative;right:100%}.el-col-xl-push-24{left:100%;position:relative}}.el-collapse{--el-collapse-border-color:var(--el-border-color-lighter);--el-collapse-header-height:48px;--el-collapse-header-bg-color:var(--el-fill-color-blank);--el-collapse-header-text-color:var(--el-text-color-primary);--el-collapse-header-font-size:13px;--el-collapse-content-bg-color:var(--el-fill-color-blank);--el-collapse-content-font-size:13px;--el-collapse-content-text-color:var(--el-text-color-primary);border-bottom:1px solid var(--el-collapse-border-color);border-top:1px solid var(--el-collapse-border-color)}.el-collapse-item.is-disabled .el-collapse-item__header{color:var(--el-text-color-disabled);cursor:not-allowed}.el-collapse-item__header{align-items:center;background-color:var(--el-collapse-header-bg-color);border:none;border-bottom:1px solid var(--el-collapse-border-color);color:var(--el-collapse-header-text-color);cursor:pointer;display:flex;font-size:var(--el-collapse-header-font-size);font-weight:500;height:var(--el-collapse-header-height);line-height:var(--el-collapse-header-height);outline:none;padding:0;transition:border-bottom-color var(--el-transition-duration);width:100%}.el-collapse-item__arrow{font-weight:300;margin:0 8px 0 auto;transition:transform var(--el-transition-duration)}.el-collapse-item__arrow.is-active{transform:rotate(90deg)}.el-collapse-item__header.focusing:focus:not(:hover){color:var(--el-color-primary)}.el-collapse-item__header.is-active{border-bottom-color:transparent}.el-collapse-item__wrap{background-color:var(--el-collapse-content-bg-color);border-bottom:1px solid var(--el-collapse-border-color);box-sizing:border-box;overflow:hidden;will-change:height}.el-collapse-item__content{color:var(--el-collapse-content-text-color);font-size:var(--el-collapse-content-font-size);line-height:1.7692307692;padding-bottom:25px}.el-collapse-item:last-child{margin-bottom:-1px}.el-color-predefine{display:flex;font-size:12px;margin-top:8px;width:280px}.el-color-predefine__colors{display:flex;flex:1;flex-wrap:wrap}.el-color-predefine__color-selector{border-radius:4px;cursor:pointer;height:20px;margin:0 0 8px 8px;width:20px}.el-color-predefine__color-selector:nth-child(10n+1){margin-left:0}.el-color-predefine__color-selector.selected{box-shadow:0 0 3px 2px var(--el-color-primary)}.el-color-predefine__color-selector>div{border-radius:3px;display:flex;height:100%}.el-color-predefine__color-selector.is-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.el-color-hue-slider{background-color:red;box-sizing:border-box;float:right;height:12px;padding:0 2px;position:relative;width:280px}.el-color-hue-slider__bar{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red);height:100%;position:relative}.el-color-hue-slider__thumb{background:#fff;border:1px solid var(--el-border-color-lighter);border-radius:1px;box-shadow:0 0 2px #0009;box-sizing:border-box;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:4px;z-index:1}.el-color-hue-slider.is-vertical{height:180px;padding:2px 0;width:12px}.el-color-hue-slider.is-vertical .el-color-hue-slider__bar{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.el-color-hue-slider.is-vertical .el-color-hue-slider__thumb{height:4px;left:0;top:0;width:100%}.el-color-svpanel{height:180px;position:relative;width:280px}.el-color-svpanel__black,.el-color-svpanel__white{bottom:0;left:0;position:absolute;right:0;top:0}.el-color-svpanel__white{background:linear-gradient(90deg,#fff,#fff0)}.el-color-svpanel__black{background:linear-gradient(0deg,#000,#0000)}.el-color-svpanel__cursor{position:absolute}.el-color-svpanel__cursor>div{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}.el-color-alpha-slider{background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px;box-sizing:border-box;height:12px;position:relative;width:280px}.el-color-alpha-slider__bar{background:linear-gradient(to right,rgba(255,255,255,0) 0,var(--el-bg-color) 100%);height:100%;position:relative}.el-color-alpha-slider__thumb{background:#fff;border:1px solid var(--el-border-color-lighter);border-radius:1px;box-shadow:0 0 2px #0009;box-sizing:border-box;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:4px;z-index:1}.el-color-alpha-slider.is-vertical{height:180px;width:20px}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__bar{background:linear-gradient(180deg,#fff0 0,#fff)}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__thumb{height:4px;left:0;top:0;width:100%}.el-color-dropdown{width:300px}.el-color-dropdown__main-wrapper{margin-bottom:6px}.el-color-dropdown__main-wrapper:after{clear:both;content:"";display:table}.el-color-dropdown__btns{margin-top:12px;text-align:right}.el-color-dropdown__value{color:#000;float:left;font-size:12px;line-height:26px;width:160px}.el-color-picker{display:inline-block;line-height:normal;outline:none;position:relative}.el-color-picker:hover:not(.is-disabled,.is-focused) .el-color-picker__trigger{border-color:var(--el-border-color-hover)}.el-color-picker:focus-visible:not(.is-disabled) .el-color-picker__trigger{outline:2px solid var(--el-color-primary);outline-offset:1px}.el-color-picker.is-focused .el-color-picker__trigger{border-color:var(--el-color-primary)}.el-color-picker.is-disabled .el-color-picker__trigger{cursor:not-allowed}.el-color-picker--large{height:40px}.el-color-picker--large .el-color-picker__trigger{height:40px;width:40px}.el-color-picker--large .el-color-picker__mask{height:38px;width:38px}.el-color-picker--small{height:24px}.el-color-picker--small .el-color-picker__trigger{height:24px;width:24px}.el-color-picker--small .el-color-picker__mask{height:22px;width:22px}.el-color-picker--small .el-color-picker__empty,.el-color-picker--small .el-color-picker__icon{transform:scale(.8)}.el-color-picker__mask{background-color:#ffffffb3;border-radius:4px;cursor:not-allowed;height:30px;left:1px;position:absolute;top:1px;width:30px;z-index:1}.el-color-picker__trigger{align-items:center;border:1px solid var(--el-border-color);border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:0;height:32px;justify-content:center;padding:4px;position:relative;width:32px}.el-color-picker__color{border:1px solid var(--el-text-color-secondary);border-radius:var(--el-border-radius-small);box-sizing:border-box;display:block;height:100%;position:relative;text-align:center;width:100%}.el-color-picker__color.is-alpha{background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px}.el-color-picker__color-inner{align-items:center;display:inline-flex;height:100%;justify-content:center;width:100%}.el-color-picker .el-color-picker__empty{color:var(--el-text-color-secondary);font-size:12px}.el-color-picker .el-color-picker__icon{align-items:center;color:#fff;display:inline-flex;font-size:12px;justify-content:center}.el-color-picker__panel{background-color:#fff;border-radius:var(--el-border-radius-base);box-shadow:var(--el-box-shadow-light);box-sizing:content-box;padding:6px;position:absolute;z-index:10}.el-color-picker__panel.el-popper{border:1px solid var(--el-border-color-lighter)}.el-color-picker,.el-color-picker__panel{--el-color-picker-alpha-bg-a:#ccc;--el-color-picker-alpha-bg-b:transparent}.dark .el-color-picker,.dark .el-color-picker__panel{--el-color-picker-alpha-bg-a:#333333}.el-container{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0}.el-container.is-vertical{flex-direction:column}.el-date-table{font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-date-table.is-week-mode .el-date-table__row:hover .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table.is-week-mode .el-date-table__row:hover td.available:hover{color:var(--el-datepicker-text-color)}.el-date-table.is-week-mode .el-date-table__row:hover td:first-child .el-date-table-cell{border-bottom-left-radius:15px;border-top-left-radius:15px;margin-left:5px}.el-date-table.is-week-mode .el-date-table__row:hover td:last-child .el-date-table-cell{border-bottom-right-radius:15px;border-top-right-radius:15px;margin-right:5px}.el-date-table.is-week-mode .el-date-table__row.current .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td{box-sizing:border-box;cursor:pointer;height:30px;padding:4px 0;position:relative;text-align:center;width:32px}.el-date-table td .el-date-table-cell{box-sizing:border-box;height:30px;padding:3px 0}.el-date-table td .el-date-table-cell .el-date-table-cell__text{border-radius:50%;display:block;height:24px;left:50%;line-height:24px;margin:0 auto;position:absolute;transform:translate(-50%);width:24px}.el-date-table td.next-month,.el-date-table td.prev-month{color:var(--el-datepicker-off-text-color)}.el-date-table td.today{position:relative}.el-date-table td.today .el-date-table-cell__text{color:var(--el-color-primary);font-weight:700}.el-date-table td.today.end-date .el-date-table-cell__text,.el-date-table td.today.start-date .el-date-table-cell__text{color:#fff}.el-date-table td.available:hover{color:var(--el-datepicker-hover-text-color)}.el-date-table td.in-range .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td.in-range .el-date-table-cell:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-date-table td.current:not(.disabled) .el-date-table-cell__text{background-color:var(--el-datepicker-active-color);color:#fff}.el-date-table td.current:not(.disabled):focus-visible .el-date-table-cell__text{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-date-table td.end-date .el-date-table-cell,.el-date-table td.start-date .el-date-table-cell{color:#fff}.el-date-table td.end-date .el-date-table-cell__text,.el-date-table td.start-date .el-date-table-cell__text{background-color:var(--el-datepicker-active-color)}.el-date-table td.start-date .el-date-table-cell{border-bottom-left-radius:15px;border-top-left-radius:15px;margin-left:5px}.el-date-table td.end-date .el-date-table-cell{border-bottom-right-radius:15px;border-top-right-radius:15px;margin-right:5px}.el-date-table td.disabled .el-date-table-cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed;opacity:1}.el-date-table td.selected .el-date-table-cell{border-radius:15px;margin-left:5px;margin-right:5px}.el-date-table td.selected .el-date-table-cell__text{background-color:var(--el-datepicker-active-color);border-radius:15px;color:#fff}.el-date-table td.week{color:var(--el-datepicker-header-text-color);font-size:80%}.el-date-table td:focus{outline:none}.el-date-table th{border-bottom:1px solid var(--el-border-color-lighter);color:var(--el-datepicker-header-text-color);font-weight:400;padding:5px}.el-month-table{border-collapse:collapse;font-size:12px;margin:-1px}.el-month-table td{cursor:pointer;padding:8px 0;position:relative;text-align:center;width:68px}.el-month-table td div{box-sizing:border-box;height:48px;padding:6px 0}.el-month-table td.today .cell{color:var(--el-color-primary);font-weight:700}.el-month-table td.today.end-date .cell,.el-month-table td.today.start-date .cell{color:#fff}.el-month-table td.disabled .cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed}.el-month-table td.disabled .cell:hover{color:var(--el-text-color-placeholder)}.el-month-table td .cell{border-radius:18px;color:var(--el-datepicker-text-color);display:block;height:36px;left:50%;line-height:36px;margin:0 auto;position:absolute;transform:translate(-50%);width:54px}.el-month-table td .cell:hover{color:var(--el-datepicker-hover-text-color)}.el-month-table td.in-range div{background-color:var(--el-datepicker-inrange-bg-color)}.el-month-table td.in-range div:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-month-table td.end-date div,.el-month-table td.start-date div{color:#fff}.el-month-table td.end-date .cell,.el-month-table td.start-date .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-month-table td.start-date div{border-bottom-left-radius:24px;border-top-left-radius:24px;margin-left:3px}.el-month-table td.end-date div{border-bottom-right-radius:24px;border-top-right-radius:24px;margin-right:3px}.el-month-table td.current:not(.disabled) div{border-radius:24px;margin-left:3px;margin-right:3px}.el-month-table td.current:not(.disabled) .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-month-table td:focus-visible{outline:none}.el-month-table td:focus-visible .cell{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-year-table{border-collapse:collapse;font-size:12px;margin:-1px}.el-year-table .el-icon{color:var(--el-datepicker-icon-color)}.el-year-table td{cursor:pointer;padding:8px 0;position:relative;text-align:center;width:68px}.el-year-table td div{box-sizing:border-box;height:48px;padding:6px 0}.el-year-table td.today .cell{color:var(--el-color-primary);font-weight:700}.el-year-table td.disabled .cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed}.el-year-table td.disabled .cell:hover{color:var(--el-text-color-placeholder)}.el-year-table td .cell{border-radius:18px;color:var(--el-datepicker-text-color);display:block;height:36px;left:50%;line-height:36px;margin:0 auto;position:absolute;transform:translate(-50%);width:54px}.el-year-table td .cell:hover{color:var(--el-datepicker-hover-text-color)}.el-year-table td.current:not(.disabled) div{border-radius:24px;margin-left:3px;margin-right:3px}.el-year-table td.current:not(.disabled) .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-year-table td:focus-visible{outline:none}.el-year-table td:focus-visible .cell{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-time-spinner.has-seconds .el-time-spinner__wrapper{width:33.3%}.el-time-spinner__wrapper{display:inline-block;max-height:192px;overflow:auto;position:relative;vertical-align:top;width:50%}.el-time-spinner__wrapper.el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default){padding-bottom:15px}.el-time-spinner__wrapper.is-arrow{box-sizing:border-box;overflow:hidden;text-align:center}.el-time-spinner__wrapper.is-arrow .el-time-spinner__list{transform:translateY(-32px)}.el-time-spinner__wrapper.is-arrow .el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:default}.el-time-spinner__arrow{color:var(--el-text-color-secondary);cursor:pointer;font-size:12px;height:30px;left:0;line-height:30px;position:absolute;text-align:center;width:100%;z-index:var(--el-index-normal)}.el-time-spinner__arrow:hover{color:var(--el-color-primary)}.el-time-spinner__arrow.arrow-up{top:10px}.el-time-spinner__arrow.arrow-down{bottom:10px}.el-time-spinner__input.el-input{width:70%}.el-time-spinner__input.el-input .el-input__inner,.el-time-spinner__list{padding:0;text-align:center}.el-time-spinner__list{list-style:none;margin:0}.el-time-spinner__list:after,.el-time-spinner__list:before{content:"";display:block;height:80px;width:100%}.el-time-spinner__item{color:var(--el-text-color-regular);font-size:12px;height:32px;line-height:32px}.el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:pointer}.el-time-spinner__item.is-active:not(.is-disabled){color:var(--el-text-color-primary);font-weight:700}.el-time-spinner__item.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-picker__popper{--el-datepicker-border-color:var(--el-disabled-border-color)}.el-picker__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-datepicker-border-color);box-shadow:var(--el-box-shadow-light)}.el-picker__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-datepicker-border-color)}.el-picker__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-date-editor{--el-date-editor-width:220px;--el-date-editor-monthrange-width:300px;--el-date-editor-daterange-width:350px;--el-date-editor-datetimerange-width:400px;--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;position:relative;text-align:left;vertical-align:middle}.el-date-editor.el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset}.el-date-editor.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-date-editor.el-input,.el-date-editor.el-input__wrapper{height:var(--el-input-height,var(--el-component-size));width:var(--el-date-editor-width)}.el-date-editor--monthrange{--el-date-editor-width:var(--el-date-editor-monthrange-width)}.el-date-editor--daterange,.el-date-editor--timerange{--el-date-editor-width:var(--el-date-editor-daterange-width)}.el-date-editor--datetimerange{--el-date-editor-width:var(--el-date-editor-datetimerange-width)}.el-date-editor--dates .el-input__wrapper{text-overflow:ellipsis;white-space:nowrap}.el-date-editor .clear-icon,.el-date-editor .close-icon{cursor:pointer}.el-date-editor .clear-icon:hover{color:var(--el-text-color-secondary)}.el-date-editor .el-range__icon{color:var(--el-text-color-placeholder);float:left;font-size:14px;height:inherit}.el-date-editor .el-range__icon svg{vertical-align:middle}.el-date-editor .el-range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--el-text-color-regular);display:inline-block;font-size:var(--el-font-size-base);height:30px;line-height:30px;margin:0;outline:none;padding:0;text-align:center;width:39%}.el-date-editor .el-range-input::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-input:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-input::placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-separator{align-items:center;color:var(--el-text-color-primary);display:inline-flex;flex:1;font-size:14px;height:100%;justify-content:center;margin:0;overflow-wrap:break-word;padding:0 5px}.el-date-editor .el-range__close-icon{color:var(--el-text-color-placeholder);cursor:pointer;font-size:14px;height:inherit;width:unset}.el-date-editor .el-range__close-icon:hover{color:var(--el-text-color-secondary)}.el-date-editor .el-range__close-icon svg{vertical-align:middle}.el-date-editor .el-range__close-icon--hidden{opacity:0;visibility:hidden}.el-range-editor.el-input__wrapper{align-items:center;display:inline-flex;padding:0 10px}.el-range-editor.is-active,.el-range-editor.is-active:hover{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-range-editor--large{line-height:var(--el-component-size-large)}.el-range-editor--large.el-input__wrapper{height:var(--el-component-size-large)}.el-range-editor--large .el-range-separator{font-size:14px;line-height:40px}.el-range-editor--large .el-range-input{font-size:14px;height:38px;line-height:38px}.el-range-editor--small{line-height:var(--el-component-size-small)}.el-range-editor--small.el-input__wrapper{height:var(--el-component-size-small)}.el-range-editor--small .el-range-separator{font-size:12px;line-height:24px}.el-range-editor--small .el-range-input{font-size:12px;height:22px;line-height:22px}.el-range-editor.is-disabled{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled:focus,.el-range-editor.is-disabled:hover{border-color:var(--el-disabled-border-color)}.el-range-editor.is-disabled input{background-color:var(--el-disabled-bg-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled input::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled input:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled input::placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled .el-range-separator{color:var(--el-disabled-text-color)}.el-picker-panel{background:var(--el-bg-color-overlay);border-radius:var(--el-border-radius-base);color:var(--el-text-color-regular);line-height:30px}.el-picker-panel .el-time-panel{background-color:var(--el-bg-color-overlay);border:1px solid var(--el-datepicker-border-color);box-shadow:var(--el-box-shadow-light);margin:5px 0}.el-picker-panel__body-wrapper:after,.el-picker-panel__body:after{clear:both;content:"";display:table}.el-picker-panel__content{margin:15px;position:relative}.el-picker-panel__footer{background-color:var(--el-bg-color-overlay);border-top:1px solid var(--el-datepicker-inner-border-color);font-size:0;padding:4px 12px;position:relative;text-align:right}.el-picker-panel__shortcut{background-color:transparent;border:0;color:var(--el-datepicker-text-color);cursor:pointer;display:block;font-size:14px;line-height:28px;outline:none;padding-left:12px;text-align:left;width:100%}.el-picker-panel__shortcut:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__shortcut.active{background-color:#e6f1fe;color:var(--el-datepicker-active-color)}.el-picker-panel__btn{background-color:transparent;border:1px solid var(--el-fill-color-darker);border-radius:2px;color:var(--el-text-color-primary);cursor:pointer;font-size:12px;line-height:24px;outline:none;padding:0 20px}.el-picker-panel__btn[disabled]{color:var(--el-text-color-disabled);cursor:not-allowed}.el-picker-panel__icon-btn{background:transparent;border:0;color:var(--el-datepicker-icon-color);cursor:pointer;font-size:12px;margin-top:8px;outline:none}.el-picker-panel__icon-btn:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn:focus-visible{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn.is-disabled{color:var(--el-text-color-disabled)}.el-picker-panel__icon-btn.is-disabled:hover{cursor:not-allowed}.el-picker-panel__icon-btn .el-icon{cursor:pointer;font-size:inherit}.el-picker-panel__link-btn{vertical-align:middle}.el-picker-panel [slot=sidebar],.el-picker-panel__sidebar{background-color:var(--el-bg-color-overlay);border-right:1px solid var(--el-datepicker-inner-border-color);bottom:0;box-sizing:border-box;overflow:auto;padding-top:6px;position:absolute;top:0;width:110px}.el-picker-panel [slot=sidebar]+.el-picker-panel__body,.el-picker-panel__sidebar+.el-picker-panel__body{margin-left:110px}.el-date-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);width:322px}.el-date-picker.has-sidebar.has-time{width:434px}.el-date-picker.has-sidebar{width:438px}.el-date-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-picker .el-picker-panel__content{width:292px}.el-date-picker table{table-layout:fixed;width:100%}.el-date-picker__editor-wrap{display:table-cell;padding:0 5px;position:relative}.el-date-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;display:table;font-size:12px;padding:8px 5px 5px;position:relative;width:100%}.el-date-picker__header{margin:12px;text-align:center}.el-date-picker__header--bordered{border-bottom:1px solid var(--el-border-color-lighter);margin-bottom:0;padding-bottom:12px}.el-date-picker__header--bordered+.el-picker-panel__content{margin-top:0}.el-date-picker__header-label{color:var(--el-text-color-regular);cursor:pointer;font-size:16px;font-weight:500;line-height:22px;padding:0 5px;text-align:center}.el-date-picker__header-label:hover{color:var(--el-datepicker-hover-text-color)}.el-date-picker__header-label:focus-visible{color:var(--el-datepicker-hover-text-color);outline:none}.el-date-picker__header-label.active{color:var(--el-datepicker-active-color)}.el-date-picker__prev-btn{float:left}.el-date-picker__next-btn{float:right}.el-date-picker__time-wrap{padding:10px;text-align:center}.el-date-picker__time-label{cursor:pointer;float:left;line-height:30px;margin-left:10px}.el-date-picker .el-time-panel{position:absolute}.el-date-range-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);width:646px}.el-date-range-picker.has-sidebar{width:756px}.el-date-range-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-range-picker table{table-layout:fixed;width:100%}.el-date-range-picker .el-picker-panel__body{min-width:513px}.el-date-range-picker .el-picker-panel__content{margin:0}.el-date-range-picker__header{height:28px;position:relative;text-align:center}.el-date-range-picker__header [class*=arrow-left]{float:left}.el-date-range-picker__header [class*=arrow-right]{float:right}.el-date-range-picker__header div{font-size:16px;font-weight:500;margin-right:50px}.el-date-range-picker__content{box-sizing:border-box;float:left;margin:0;padding:16px;width:50%}.el-date-range-picker__content.is-left{border-right:1px solid var(--el-datepicker-inner-border-color)}.el-date-range-picker__content .el-date-range-picker__header div{margin-left:50px;margin-right:50px}.el-date-range-picker__editors-wrap{box-sizing:border-box;display:table-cell}.el-date-range-picker__editors-wrap.is-right{text-align:right}.el-date-range-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;display:table;font-size:12px;padding:8px 5px 5px;position:relative;width:100%}.el-date-range-picker__time-header>.el-icon-arrow-right{color:var(--el-datepicker-icon-color);display:table-cell;font-size:20px;vertical-align:middle}.el-date-range-picker__time-picker-wrap{display:table-cell;padding:0 5px;position:relative}.el-date-range-picker__time-picker-wrap .el-picker-panel{background:#fff;position:absolute;right:0;top:13px;z-index:1}.el-date-range-picker__time-picker-wrap .el-time-panel{position:absolute}.el-time-range-picker{overflow:visible;width:354px}.el-time-range-picker__content{padding:10px;position:relative;text-align:center;z-index:1}.el-time-range-picker__cell{box-sizing:border-box;display:inline-block;margin:0;padding:4px 7px 7px;width:50%}.el-time-range-picker__header{font-size:14px;margin-bottom:5px;text-align:center}.el-time-range-picker__body{border:1px solid var(--el-datepicker-border-color);border-radius:2px}.el-time-panel{border-radius:2px;box-sizing:content-box;left:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:180px;z-index:var(--el-index-top)}.el-time-panel__content{font-size:0;overflow:hidden;position:relative}.el-time-panel__content:after,.el-time-panel__content:before{box-sizing:border-box;content:"";height:32px;left:0;margin-top:-16px;padding-top:6px;position:absolute;right:0;text-align:left;top:50%;z-index:-1}.el-time-panel__content:after{left:50%;margin-left:12%;margin-right:12%}.el-time-panel__content:before{border-bottom:1px solid var(--el-border-color-light);border-top:1px solid var(--el-border-color-light);margin-left:12%;margin-right:12%;padding-left:50%}.el-time-panel__content.has-seconds:after{left:66.6666666667%}.el-time-panel__content.has-seconds:before{padding-left:33.3333333333%}.el-time-panel__footer{border-top:1px solid var(--el-timepicker-inner-border-color,var(--el-border-color-light));box-sizing:border-box;height:36px;line-height:25px;padding:4px;text-align:right}.el-time-panel__btn{background-color:transparent;border:none;color:var(--el-text-color-primary);cursor:pointer;font-size:12px;line-height:28px;margin:0 5px;outline:none;padding:0 5px}.el-time-panel__btn.confirm{color:var(--el-timepicker-active-color,var(--el-color-primary));font-weight:800}.el-descriptions{--el-descriptions-table-border:1px solid var(--el-border-color-lighter);--el-descriptions-item-bordered-label-background:var(--el-fill-color-light);box-sizing:border-box;color:var(--el-text-color-primary);font-size:var(--el-font-size-base)}.el-descriptions__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.el-descriptions__title{color:var(--el-text-color-primary);font-size:16px;font-weight:700}.el-descriptions__body{background-color:var(--el-fill-color-blank)}.el-descriptions__body .el-descriptions__table{border-collapse:collapse;width:100%}.el-descriptions__body .el-descriptions__table .el-descriptions__cell{box-sizing:border-box;font-size:14px;font-weight:400;line-height:23px;text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-left{text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-center{text-align:center}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-right{text-align:right}.el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:var(--el-descriptions-table-border);padding:8px 11px}.el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:12px}.el-descriptions--large{font-size:14px}.el-descriptions--large .el-descriptions__header{margin-bottom:20px}.el-descriptions--large .el-descriptions__header .el-descriptions__title{font-size:16px}.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:14px}.el-descriptions--large .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:12px 15px}.el-descriptions--large .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:16px}.el-descriptions--small{font-size:12px}.el-descriptions--small .el-descriptions__header{margin-bottom:12px}.el-descriptions--small .el-descriptions__header .el-descriptions__title{font-size:14px}.el-descriptions--small .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:12px}.el-descriptions--small .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:4px 7px}.el-descriptions--small .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:8px}.el-descriptions__label.el-descriptions__cell.is-bordered-label{background:var(--el-descriptions-item-bordered-label-background);color:var(--el-text-color-regular);font-weight:700}.el-descriptions__label:not(.is-bordered-label){color:var(--el-text-color-primary);margin-right:16px}.el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:6px}.el-descriptions__content.el-descriptions__cell.is-bordered-content{color:var(--el-text-color-primary)}.el-descriptions__content:not(.is-bordered-label){color:var(--el-text-color-regular)}.el-descriptions--large .el-descriptions__label:not(.is-bordered-label){margin-right:16px}.el-descriptions--large .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:8px}.el-descriptions--small .el-descriptions__label:not(.is-bordered-label){margin-right:12px}.el-descriptions--small .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:4px}:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{-webkit-animation:v-modal-in var(--el-transition-duration-fast) ease;animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{-webkit-animation:v-modal-out var(--el-transition-duration-fast) ease forwards;animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@-webkit-keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-in{0%{opacity:0}}@-webkit-keyframes v-modal-out{to{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-small);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{-webkit-animation:modal-fade-in var(--el-transition-duration);animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{-webkit-animation:dialog-fade-in var(--el-transition-duration);animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{-webkit-animation:modal-fade-out var(--el-transition-duration);animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{-webkit-animation:dialog-fade-out var(--el-transition-duration);animation:dialog-fade-out var(--el-transition-duration)}@-webkit-keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@-webkit-keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}.el-divider{position:relative}.el-divider--horizontal{border-top:1px var(--el-border-color) var(--el-border-style);display:block;height:1px;margin:24px 0;width:100%}.el-divider--vertical{border-left:1px var(--el-border-color) var(--el-border-style);display:inline-block;height:1em;margin:0 8px;position:relative;vertical-align:middle;width:1px}.el-divider__text{background-color:var(--el-bg-color);color:var(--el-text-color-primary);font-size:14px;font-weight:500;padding:0 20px;position:absolute}.el-divider__text.is-left{left:20px;transform:translateY(-50%)}.el-divider__text.is-center{left:50%;transform:translate(-50%) translateY(-50%)}.el-divider__text.is-right{right:20px;transform:translateY(-50%)}.el-drawer{--el-drawer-bg-color:var(--el-dialog-bg-color,var(--el-bg-color));--el-drawer-padding-primary:var(--el-dialog-padding-primary,20px);background-color:var(--el-drawer-bg-color);box-shadow:var(--el-box-shadow-dark);box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;position:absolute;transition:all var(--el-transition-duration)}.el-drawer .btt,.el-drawer .ltr,.el-drawer .rtl,.el-drawer .ttb{transform:translate(0)}.el-drawer__sr-focus:focus{outline:none!important}.el-drawer__header{align-items:center;color:#72767b;display:flex;margin-bottom:32px;padding:var(--el-drawer-padding-primary);padding-bottom:0}.el-drawer__header>:first-child{flex:1}.el-drawer__title{flex:1;font-size:1rem;line-height:inherit;margin:0}.el-drawer__footer{padding:var(--el-drawer-padding-primary);padding-top:10px;text-align:right}.el-drawer__close-btn{background-color:transparent;border:none;color:inherit;cursor:pointer;display:inline-flex;font-size:var(--el-font-size-extra-large);outline:none}.el-drawer__close-btn:focus i,.el-drawer__close-btn:hover i{color:var(--el-color-primary)}.el-drawer__body{flex:1;overflow:auto;padding:var(--el-drawer-padding-primary)}.el-drawer__body>*{box-sizing:border-box}.el-drawer.ltr,.el-drawer.rtl{bottom:0;height:100%;top:0}.el-drawer.btt,.el-drawer.ttb{left:0;right:0;width:100%}.el-drawer.ltr{left:0}.el-drawer.rtl{right:0}.el-drawer.ttb{top:0}.el-drawer.btt{bottom:0}.el-drawer-fade-enter-active,.el-drawer-fade-leave-active{transition:all var(--el-transition-duration)}.el-drawer-fade-enter-active,.el-drawer-fade-enter-from,.el-drawer-fade-enter-to,.el-drawer-fade-leave-active,.el-drawer-fade-leave-from,.el-drawer-fade-leave-to{overflow:hidden!important}.el-drawer-fade-enter-from,.el-drawer-fade-leave-to{opacity:0}.el-drawer-fade-enter-to,.el-drawer-fade-leave-from{opacity:1}.el-drawer-fade-enter-from .rtl,.el-drawer-fade-leave-to .rtl{transform:translate(100%)}.el-drawer-fade-enter-from .ltr,.el-drawer-fade-leave-to .ltr{transform:translate(-100%)}.el-drawer-fade-enter-from .ttb,.el-drawer-fade-leave-to .ttb{transform:translateY(-100%)}.el-drawer-fade-enter-from .btt,.el-drawer-fade-leave-to .btt{transform:translateY(100%)}.el-dropdown{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10;color:var(--el-text-color-regular);display:inline-flex;font-size:var(--el-font-size-base);line-height:1;position:relative;vertical-align:top}.el-dropdown.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-dropdown__popper{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10}.el-dropdown__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-dropdown-menu-box-shadow)}.el-dropdown__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-dropdown__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-dropdown__popper .el-dropdown-menu{border:none}.el-dropdown__popper .el-dropdown__popper-selfdefine{outline:none}.el-dropdown__popper .el-scrollbar__bar{z-index:calc(var(--el-dropdown-menu-index) + 1)}.el-dropdown__popper .el-dropdown__list{box-sizing:border-box;list-style:none;margin:0;padding:0}.el-dropdown .el-dropdown__caret-button{align-items:center;border-left:none;display:inline-flex;justify-content:center;padding-left:0;padding-right:0;width:32px}.el-dropdown .el-dropdown__caret-button>span{display:inline-flex}.el-dropdown .el-dropdown__caret-button:before{background:var(--el-overlay-color-lighter);bottom:-1px;content:"";display:block;left:0;position:absolute;top:-1px;width:1px}.el-dropdown .el-dropdown__caret-button.el-button:before{background:var(--el-border-color);opacity:.5}.el-dropdown .el-dropdown__caret-button .el-dropdown__icon{font-size:inherit;padding-left:0}.el-dropdown .el-dropdown-selfdefine{outline:none}.el-dropdown--large .el-dropdown__caret-button{width:40px}.el-dropdown--small .el-dropdown__caret-button{width:24px}.el-dropdown-menu{background-color:var(--el-bg-color-overlay);border:none;border-radius:var(--el-border-radius-base);box-shadow:none;left:0;list-style:none;margin:0;padding:5px 0;position:relative;top:0;z-index:var(--el-dropdown-menu-index)}.el-dropdown-menu__item{align-items:center;color:var(--el-text-color-regular);cursor:pointer;display:flex;font-size:var(--el-font-size-base);line-height:22px;list-style:none;margin:0;outline:none;padding:5px 16px;white-space:nowrap}.el-dropdown-menu__item:not(.is-disabled):focus,.el-dropdown-menu__item:not(.is-disabled):hover{background-color:var(--el-dropdown-menuItem-hover-fill);color:var(--el-dropdown-menuItem-hover-color)}.el-dropdown-menu__item i{margin-right:5px}.el-dropdown-menu__item--divided{border-top:1px solid var(--el-border-color-lighter);margin:6px 0}.el-dropdown-menu__item.is-disabled{color:var(--el-text-color-disabled);cursor:not-allowed}.el-dropdown-menu--large{padding:7px 0}.el-dropdown-menu--large .el-dropdown-menu__item{font-size:14px;line-height:22px;padding:7px 20px}.el-dropdown-menu--large .el-dropdown-menu__item--divided{margin:8px 0}.el-dropdown-menu--small{padding:3px 0}.el-dropdown-menu--small .el-dropdown-menu__item{font-size:12px;line-height:20px;padding:2px 12px}.el-dropdown-menu--small .el-dropdown-menu__item--divided{margin:4px 0}.el-empty{--el-empty-padding:40px 0;--el-empty-image-width:160px;--el-empty-description-margin-top:20px;--el-empty-bottom-margin-top:20px;--el-empty-fill-color-0:var(--el-color-white);--el-empty-fill-color-1:#fcfcfd;--el-empty-fill-color-2:#f8f9fb;--el-empty-fill-color-3:#f7f8fc;--el-empty-fill-color-4:#eeeff3;--el-empty-fill-color-5:#edeef2;--el-empty-fill-color-6:#e9ebef;--el-empty-fill-color-7:#e5e7e9;--el-empty-fill-color-8:#e0e3e9;--el-empty-fill-color-9:#d5d7de;align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:var(--el-empty-padding);text-align:center}.el-empty__image{width:var(--el-empty-image-width)}.el-empty__image img{height:100%;-o-object-fit:contain;object-fit:contain;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;width:100%}.el-empty__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;height:100%;vertical-align:top;width:100%}.el-empty__description{margin-top:var(--el-empty-description-margin-top)}.el-empty__description p{color:var(--el-text-color-secondary);font-size:var(--el-font-size-base);margin:0}.el-empty__bottom{margin-top:var(--el-empty-bottom-margin-top)}.el-footer{--el-footer-padding:0 20px;--el-footer-height:60px;box-sizing:border-box;flex-shrink:0;height:var(--el-footer-height);padding:var(--el-footer-padding)}.el-form{--el-form-label-font-size:var(--el-font-size-base);--el-form-inline-content-width:220px}.el-form--label-left .el-form-item__label{justify-content:flex-start}.el-form--label-top .el-form-item{display:block}.el-form--label-top .el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--inline .el-form-item{display:inline-flex;margin-right:32px;vertical-align:middle}.el-form--inline.el-form--label-top{display:flex;flex-wrap:wrap}.el-form--inline.el-form--label-top .el-form-item{display:block}.el-form--large.el-form--label-top .el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default.el-form--label-top .el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small.el-form--label-top .el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}.el-form-item{display:flex;--font-size:14px;margin-bottom:18px}.el-form-item .el-form-item{margin-bottom:0}.el-form-item .el-input__validateIcon{display:none}.el-form-item--large{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:22px}.el-form-item--large .el-form-item__label{height:40px;line-height:40px}.el-form-item--large .el-form-item__content{line-height:40px}.el-form-item--large .el-form-item__error{padding-top:4px}.el-form-item--default{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--default .el-form-item__label{height:32px;line-height:32px}.el-form-item--default .el-form-item__content{line-height:32px}.el-form-item--default .el-form-item__error{padding-top:2px}.el-form-item--small{--font-size:12px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--small .el-form-item__label{height:24px;line-height:24px}.el-form-item--small .el-form-item__content{line-height:24px}.el-form-item--small .el-form-item__error{padding-top:2px}.el-form-item__label-wrap{display:flex}.el-form-item__label{align-items:flex-start;box-sizing:border-box;color:var(--el-text-color-regular);display:inline-flex;flex:0 0 auto;font-size:var(--el-form-label-font-size);height:32px;justify-content:flex-end;line-height:32px;padding:0 12px 0 0}.el-form-item__content{align-items:center;display:flex;flex:1;flex-wrap:wrap;font-size:var(--font-size);line-height:32px;min-width:0;position:relative}.el-form-item__content .el-input-group{vertical-align:top}.el-form-item__error{color:var(--el-color-danger);font-size:12px;left:0;line-height:1;padding-top:2px;position:absolute;top:100%}.el-form-item__error--inline{display:inline-block;left:auto;margin-left:10px;position:relative;top:auto}.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before,.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before{color:var(--el-color-danger);content:"*";margin-right:4px}.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after,.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after{color:var(--el-color-danger);content:"*";margin-left:4px}.el-form-item.is-error .el-input__wrapper,.el-form-item.is-error .el-input__wrapper.is-focus,.el-form-item.is-error .el-input__wrapper:focus,.el-form-item.is-error .el-input__wrapper:hover,.el-form-item.is-error .el-select__wrapper,.el-form-item.is-error .el-select__wrapper.is-focus,.el-form-item.is-error .el-select__wrapper:focus,.el-form-item.is-error .el-select__wrapper:hover,.el-form-item.is-error .el-textarea__inner,.el-form-item.is-error .el-textarea__inner.is-focus,.el-form-item.is-error .el-textarea__inner:focus,.el-form-item.is-error .el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-form-item.is-error .el-input-group__append .el-input__wrapper,.el-form-item.is-error .el-input-group__prepend .el-input__wrapper{box-shadow:inset 0 0 0 1px transparent}.el-form-item.is-error .el-input__validateIcon{color:var(--el-color-danger)}.el-form-item--feedback .el-input__validateIcon{display:inline-flex}.el-header{--el-header-padding:0 20px;--el-header-height:60px;box-sizing:border-box;flex-shrink:0;height:var(--el-header-height);padding:var(--el-header-padding)}.el-image-viewer__wrapper{bottom:0;left:0;position:fixed;right:0;top:0}.el-image-viewer__btn{align-items:center;border-radius:50%;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;opacity:.8;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}.el-image-viewer__btn .el-icon{cursor:pointer;font-size:inherit}.el-image-viewer__close{font-size:40px;height:40px;right:40px;top:40px;width:40px}.el-image-viewer__canvas{align-items:center;display:flex;height:100%;justify-content:center;position:static;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.el-image-viewer__actions{background-color:var(--el-text-color-regular);border-color:#fff;border-radius:22px;bottom:30px;height:44px;left:50%;padding:0 23px;transform:translate(-50%);width:282px}.el-image-viewer__actions__inner{align-items:center;color:#fff;cursor:default;display:flex;font-size:23px;height:100%;justify-content:space-around;width:100%}.el-image-viewer__prev{left:40px}.el-image-viewer__next,.el-image-viewer__prev{background-color:var(--el-text-color-regular);border-color:#fff;color:#fff;font-size:24px;height:44px;top:50%;transform:translateY(-50%);width:44px}.el-image-viewer__next{right:40px;text-indent:2px}.el-image-viewer__close{background-color:var(--el-text-color-regular);border-color:#fff;color:#fff;font-size:24px;height:44px;width:44px}.el-image-viewer__mask{background:#000;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%}.viewer-fade-enter-active{-webkit-animation:viewer-fade-in var(--el-transition-duration);animation:viewer-fade-in var(--el-transition-duration)}.viewer-fade-leave-active{-webkit-animation:viewer-fade-out var(--el-transition-duration);animation:viewer-fade-out var(--el-transition-duration)}@-webkit-keyframes viewer-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes viewer-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@-webkit-keyframes viewer-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes viewer-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}.el-image__error,.el-image__inner,.el-image__placeholder,.el-image__wrapper{height:100%;width:100%}.el-image{display:inline-block;overflow:hidden;position:relative}.el-image__inner{opacity:1;vertical-align:top}.el-image__inner.is-loading{opacity:0}.el-image__wrapper{left:0;position:absolute;top:0}.el-image__error,.el-image__placeholder{background:var(--el-fill-color-light)}.el-image__error{align-items:center;color:var(--el-text-color-placeholder);display:flex;font-size:14px;justify-content:center;vertical-align:middle}.el-image__preview{cursor:pointer}.el-textarea{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;display:inline-block;font-size:var(--el-font-size-base);position:relative;vertical-align:bottom;width:100%}.el-textarea__inner{-webkit-appearance:none;background-color:var(--el-input-bg-color,var(--el-fill-color-blank));background-image:none;border:none;border-radius:var(--el-input-border-radius,var(--el-border-radius-base));box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;box-sizing:border-box;color:var(--el-input-text-color,var(--el-text-color-regular));display:block;font-family:inherit;font-size:inherit;line-height:1.5;padding:5px 11px;position:relative;resize:vertical;transition:var(--el-transition-box-shadow);width:100%}.el-textarea__inner::-moz-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner:-ms-input-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-textarea__inner:focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset;outline:none}.el-textarea .el-input__count{background:var(--el-fill-color-blank);bottom:5px;color:var(--el-color-info);font-size:12px;line-height:14px;position:absolute;right:10px}.el-textarea.is-disabled .el-textarea__inner{background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset;color:var(--el-disabled-text-color);cursor:not-allowed}.el-textarea.is-disabled .el-textarea__inner::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-disabled .el-textarea__inner:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-disabled .el-textarea__inner::placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-exceed .el-textarea__inner{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-textarea.is-exceed .el-input__count{color:var(--el-color-danger)}.el-input{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;--el-input-height:var(--el-component-size);box-sizing:border-box;display:inline-flex;font-size:var(--el-font-size-base);line-height:var(--el-input-height);position:relative;vertical-align:middle;width:var(--el-input-width)}.el-input::-webkit-scrollbar{width:6px;z-index:11}.el-input::-webkit-scrollbar:horizontal{height:6px}.el-input::-webkit-scrollbar-thumb{background:var(--el-text-color-disabled);border-radius:5px;width:6px}.el-input::-webkit-scrollbar-corner,.el-input::-webkit-scrollbar-track{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track-piece{background:var(--el-fill-color-blank);width:6px}.el-input .el-input__clear,.el-input .el-input__password{color:var(--el-input-icon-color);cursor:pointer;font-size:14px}.el-input .el-input__clear:hover,.el-input .el-input__password:hover{color:var(--el-input-clear-hover-color)}.el-input .el-input__count{align-items:center;color:var(--el-color-info);display:inline-flex;font-size:12px;height:100%}.el-input .el-input__count .el-input__count-inner{background:var(--el-fill-color-blank);display:inline-block;line-height:normal;padding-left:8px}.el-input__wrapper{align-items:center;background-color:var(--el-input-bg-color,var(--el-fill-color-blank));background-image:none;border-radius:var(--el-input-border-radius,var(--el-border-radius-base));box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;cursor:text;display:inline-flex;flex-grow:1;justify-content:center;padding:1px 11px;transform:translateZ(0);transition:var(--el-transition-box-shadow)}.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-input__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 32px) - 2px);-webkit-appearance:none;background:none;border:none;box-sizing:border-box;color:var(--el-input-text-color,var(--el-text-color-regular));flex-grow:1;font-size:inherit;height:var(--el-input-inner-height);line-height:var(--el-input-inner-height);outline:none;padding:0;width:100%}.el-input__inner:focus{outline:none}.el-input__inner::-moz-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner:-ms-input-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner[type=password]::-ms-reveal{display:none}.el-input__inner[type=number]{line-height:1}.el-input__prefix{color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:inline-flex;flex-shrink:0;flex-wrap:nowrap;height:100%;pointer-events:none;text-align:center;transition:all var(--el-transition-duration);white-space:nowrap}.el-input__prefix-inner{align-items:center;display:inline-flex;justify-content:center;pointer-events:all}.el-input__prefix-inner>:last-child{margin-right:8px}.el-input__prefix-inner>:first-child,.el-input__prefix-inner>:first-child.el-input__icon{margin-left:0}.el-input__suffix{color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:inline-flex;flex-shrink:0;flex-wrap:nowrap;height:100%;pointer-events:none;text-align:center;transition:all var(--el-transition-duration);white-space:nowrap}.el-input__suffix-inner{align-items:center;display:inline-flex;justify-content:center;pointer-events:all}.el-input__suffix-inner>:first-child{margin-left:8px}.el-input .el-input__icon{align-items:center;display:flex;height:inherit;justify-content:center;line-height:inherit;margin-left:8px;transition:all var(--el-transition-duration)}.el-input__validateIcon{pointer-events:none}.el-input.is-active .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-color, ) inset}.el-input.is-disabled{cursor:not-allowed}.el-input.is-disabled .el-input__wrapper{background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset}.el-input.is-disabled .el-input__inner{color:var(--el-disabled-text-color);-webkit-text-fill-color:var(--el-disabled-text-color);cursor:not-allowed}.el-input.is-disabled .el-input__inner::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__inner:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__inner::placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__icon{cursor:not-allowed}.el-input.is-exceed .el-input__wrapper{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-input.is-exceed .el-input__suffix .el-input__count{color:var(--el-color-danger)}.el-input--large{--el-input-height:var(--el-component-size-large);font-size:14px}.el-input--large .el-input__wrapper{padding:1px 15px}.el-input--large .el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 40px) - 2px)}.el-input--small{--el-input-height:var(--el-component-size-small);font-size:12px}.el-input--small .el-input__wrapper{padding:1px 7px}.el-input--small .el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 24px) - 2px)}.el-input-group{align-items:stretch;display:inline-flex;width:100%}.el-input-group__append,.el-input-group__prepend{align-items:center;background-color:var(--el-fill-color-light);border-radius:var(--el-input-border-radius);color:var(--el-color-info);display:inline-flex;justify-content:center;min-height:100%;padding:0 20px;position:relative;white-space:nowrap}.el-input-group__append:focus,.el-input-group__prepend:focus{outline:none}.el-input-group__append .el-button,.el-input-group__append .el-select,.el-input-group__prepend .el-button,.el-input-group__prepend .el-select{display:inline-block;margin:0 -20px}.el-input-group__append button.el-button,.el-input-group__append button.el-button:hover,.el-input-group__append div.el-select .el-select__wrapper,.el-input-group__append div.el-select:hover .el-select__wrapper,.el-input-group__prepend button.el-button,.el-input-group__prepend button.el-button:hover,.el-input-group__prepend div.el-select .el-select__wrapper,.el-input-group__prepend div.el-select:hover .el-select__wrapper{background-color:transparent;border-color:transparent;color:inherit}.el-input-group__append .el-button,.el-input-group__append .el-input,.el-input-group__prepend .el-button,.el-input-group__prepend .el-input{font-size:inherit}.el-input-group__prepend{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group__append{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-group--prepend>.el-input__wrapper{border-bottom-left-radius:0;border-top-left-radius:0}.el-input-group--prepend .el-input-group__prepend .el-select .el-select__wrapper{border-bottom-right-radius:0;border-top-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group--append>.el-input__wrapper{border-bottom-right-radius:0;border-top-right-radius:0}.el-input-group--append .el-input-group__append .el-select .el-select__wrapper{border-bottom-left-radius:0;border-top-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-hidden{display:none!important}.el-input-number{display:inline-flex;line-height:30px;position:relative;width:150px}.el-input-number .el-input__wrapper{padding-left:42px;padding-right:42px}.el-input-number .el-input__inner{-webkit-appearance:none;-moz-appearance:textfield;line-height:1;text-align:center}.el-input-number .el-input__inner::-webkit-inner-spin-button,.el-input-number .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-input-number__decrease,.el-input-number__increase{align-items:center;background:var(--el-fill-color-light);bottom:1px;color:var(--el-text-color-regular);cursor:pointer;display:flex;font-size:13px;height:auto;justify-content:center;position:absolute;top:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:32px;z-index:1}.el-input-number__decrease:hover,.el-input-number__increase:hover{color:var(--el-color-primary)}.el-input-number__decrease:hover~.el-input:not(.is-disabled) .el-input__wrapper,.el-input-number__increase:hover~.el-input:not(.is-disabled) .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-input-number__decrease.is-disabled,.el-input-number__increase.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-input-number__increase{border-left:var(--el-border);border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0;right:1px}.el-input-number__decrease{border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);border-right:var(--el-border);left:1px}.el-input-number.is-disabled .el-input-number__decrease,.el-input-number.is-disabled .el-input-number__increase{border-color:var(--el-disabled-border-color);color:var(--el-disabled-border-color)}.el-input-number.is-disabled .el-input-number__decrease:hover,.el-input-number.is-disabled .el-input-number__increase:hover{color:var(--el-disabled-border-color);cursor:not-allowed}.el-input-number--large{line-height:38px;width:180px}.el-input-number--large .el-input-number__decrease,.el-input-number--large .el-input-number__increase{font-size:14px;width:40px}.el-input-number--large .el-input--large .el-input__wrapper{padding-left:47px;padding-right:47px}.el-input-number--small{line-height:22px;width:120px}.el-input-number--small .el-input-number__decrease,.el-input-number--small .el-input-number__increase{font-size:12px;width:24px}.el-input-number--small .el-input--small .el-input__wrapper{padding-left:31px;padding-right:31px}.el-input-number--small .el-input-number__decrease [class*=el-icon],.el-input-number--small .el-input-number__increase [class*=el-icon]{transform:scale(.9)}.el-input-number.is-without-controls .el-input__wrapper{padding-left:15px;padding-right:15px}.el-input-number.is-controls-right .el-input__wrapper{padding-left:15px;padding-right:42px}.el-input-number.is-controls-right .el-input-number__decrease,.el-input-number.is-controls-right .el-input-number__increase{--el-input-number-controls-height:15px;height:var(--el-input-number-controls-height);line-height:var(--el-input-number-controls-height)}.el-input-number.is-controls-right .el-input-number__decrease [class*=el-icon],.el-input-number.is-controls-right .el-input-number__increase [class*=el-icon]{transform:scale(.8)}.el-input-number.is-controls-right .el-input-number__increase{border-bottom:var(--el-border);border-radius:0 var(--el-border-radius-base) 0 0;bottom:auto;left:auto}.el-input-number.is-controls-right .el-input-number__decrease{border-left:var(--el-border);border-radius:0 0 var(--el-border-radius-base) 0;border-right:none;left:auto;right:1px;top:auto}.el-input-number.is-controls-right[class*=large] [class*=decrease],.el-input-number.is-controls-right[class*=large] [class*=increase]{--el-input-number-controls-height:19px}.el-input-number.is-controls-right[class*=small] [class*=decrease],.el-input-number.is-controls-right[class*=small] [class*=increase]{--el-input-number-controls-height:11px}.el-link{--el-link-font-size:var(--el-font-size-base);--el-link-font-weight:var(--el-font-weight-primary);--el-link-text-color:var(--el-text-color-regular);--el-link-hover-text-color:var(--el-color-primary);--el-link-disabled-text-color:var(--el-text-color-placeholder);align-items:center;color:var(--el-link-text-color);cursor:pointer;display:inline-flex;flex-direction:row;font-size:var(--el-link-font-size);font-weight:var(--el-link-font-weight);justify-content:center;outline:none;padding:0;position:relative;text-decoration:none;vertical-align:middle}.el-link:hover{color:var(--el-link-hover-text-color)}.el-link.is-underline:hover:after{border-bottom:1px solid var(--el-link-hover-text-color);bottom:0;content:"";height:0;left:0;position:absolute;right:0}.el-link.is-disabled{color:var(--el-link-disabled-text-color);cursor:not-allowed}.el-link [class*=el-icon-]+span{margin-left:5px}.el-link.el-link--default:after{border-color:var(--el-link-hover-text-color)}.el-link__inner{align-items:center;display:inline-flex;justify-content:center}.el-link.el-link--primary{--el-link-text-color:var(--el-color-primary);--el-link-hover-text-color:var(--el-color-primary-light-3);--el-link-disabled-text-color:var(--el-color-primary-light-5)}.el-link.el-link--primary:after{border-color:var(--el-link-text-color)}.el-link.el-link--primary.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--success{--el-link-text-color:var(--el-color-success);--el-link-hover-text-color:var(--el-color-success-light-3);--el-link-disabled-text-color:var(--el-color-success-light-5)}.el-link.el-link--success:after{border-color:var(--el-link-text-color)}.el-link.el-link--success.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--warning{--el-link-text-color:var(--el-color-warning);--el-link-hover-text-color:var(--el-color-warning-light-3);--el-link-disabled-text-color:var(--el-color-warning-light-5)}.el-link.el-link--warning:after{border-color:var(--el-link-text-color)}.el-link.el-link--warning.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--danger{--el-link-text-color:var(--el-color-danger);--el-link-hover-text-color:var(--el-color-danger-light-3);--el-link-disabled-text-color:var(--el-color-danger-light-5)}.el-link.el-link--danger:after{border-color:var(--el-link-text-color)}.el-link.el-link--danger.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--error{--el-link-text-color:var(--el-color-error);--el-link-hover-text-color:var(--el-color-error-light-3);--el-link-disabled-text-color:var(--el-color-error-light-5)}.el-link.el-link--error:after{border-color:var(--el-link-text-color)}.el-link.el-link--error.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--info{--el-link-text-color:var(--el-color-info);--el-link-hover-text-color:var(--el-color-info-light-3);--el-link-disabled-text-color:var(--el-color-info-light-5)}.el-link.el-link--info:after{border-color:var(--el-link-text-color)}.el-link.el-link--info.is-underline:hover:after{border-color:var(--el-link-text-color)}:root{--el-loading-spinner-size:42px;--el-loading-fullscreen-spinner-size:50px}.el-loading-parent--relative{position:relative!important}.el-loading-parent--hidden{overflow:hidden!important}.el-loading-mask{background-color:var(--el-mask-color);bottom:0;left:0;margin:0;position:absolute;right:0;top:0;transition:opacity var(--el-transition-duration);z-index:2000}.el-loading-mask.is-fullscreen{position:fixed}.el-loading-mask.is-fullscreen .el-loading-spinner{margin-top:calc((0px - var(--el-loading-fullscreen-spinner-size))/2)}.el-loading-mask.is-fullscreen .el-loading-spinner .circular{height:var(--el-loading-fullscreen-spinner-size);width:var(--el-loading-fullscreen-spinner-size)}.el-loading-spinner{margin-top:calc((0px - var(--el-loading-spinner-size))/2);position:absolute;text-align:center;top:50%;width:100%}.el-loading-spinner .el-loading-text{color:var(--el-color-primary);font-size:14px;margin:3px 0}.el-loading-spinner .circular{-webkit-animation:loading-rotate 2s linear infinite;animation:loading-rotate 2s linear infinite;display:inline;height:var(--el-loading-spinner-size);width:var(--el-loading-spinner-size)}.el-loading-spinner .path{-webkit-animation:loading-dash 1.5s ease-in-out infinite;animation:loading-dash 1.5s ease-in-out infinite;stroke-dasharray:90,150;stroke-dashoffset:0;stroke-width:2;stroke:var(--el-color-primary);stroke-linecap:round}.el-loading-spinner i{color:var(--el-color-primary)}.el-loading-fade-enter-from,.el-loading-fade-leave-to{opacity:0}@-webkit-keyframes loading-rotate{to{transform:rotate(1turn)}}@keyframes loading-rotate{to{transform:rotate(1turn)}}@-webkit-keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}@keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}.el-main{--el-main-padding:20px;box-sizing:border-box;display:block;flex:1;flex-basis:auto;overflow:auto;padding:var(--el-main-padding)}:root{--el-menu-active-color:var(--el-color-primary);--el-menu-text-color:var(--el-text-color-primary);--el-menu-hover-text-color:var(--el-color-primary);--el-menu-bg-color:var(--el-fill-color-blank);--el-menu-hover-bg-color:var(--el-color-primary-light-9);--el-menu-item-height:56px;--el-menu-sub-item-height:calc(var(--el-menu-item-height) - 6px);--el-menu-horizontal-height:60px;--el-menu-horizontal-sub-item-height:36px;--el-menu-item-font-size:var(--el-font-size-base);--el-menu-item-hover-fill:var(--el-color-primary-light-9);--el-menu-border-color:var(--el-border-color);--el-menu-base-level-padding:20px;--el-menu-level-padding:20px;--el-menu-icon-width:24px}.el-menu{background-color:var(--el-menu-bg-color);border-right:1px solid var(--el-menu-border-color);box-sizing:border-box;list-style:none;margin:0;padding-left:0;position:relative}.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item-group__title,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-sub-menu__title{padding-left:calc(var(--el-menu-base-level-padding) + var(--el-menu-level)*var(--el-menu-level-padding));white-space:nowrap}.el-menu:not(.el-menu--collapse) .el-sub-menu__title{padding-right:calc(var(--el-menu-base-level-padding) + var(--el-menu-icon-width))}.el-menu--horizontal{border-right:none;display:flex;flex-wrap:nowrap;height:var(--el-menu-horizontal-height)}.el-menu--horizontal.el-menu--popup-container{height:unset}.el-menu--horizontal.el-menu{border-bottom:1px solid var(--el-menu-border-color)}.el-menu--horizontal>.el-menu-item{align-items:center;border-bottom:2px solid transparent;color:var(--el-menu-text-color);display:inline-flex;height:100%;justify-content:center;margin:0}.el-menu--horizontal>.el-menu-item a,.el-menu--horizontal>.el-menu-item a:hover{color:inherit}.el-menu--horizontal>.el-sub-menu:focus,.el-menu--horizontal>.el-sub-menu:hover{outline:none}.el-menu--horizontal>.el-sub-menu:hover .el-sub-menu__title{color:var(--el-menu-hover-text-color)}.el-menu--horizontal>.el-sub-menu.is-active .el-sub-menu__title{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title{border-bottom:2px solid transparent;color:var(--el-menu-text-color);height:100%}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover{background-color:var(--el-menu-bg-color)}.el-menu--horizontal .el-menu .el-menu-item,.el-menu--horizontal .el-menu .el-sub-menu__title{align-items:center;background-color:var(--el-menu-bg-color);color:var(--el-menu-text-color);display:flex;height:var(--el-menu-horizontal-sub-item-height);line-height:var(--el-menu-horizontal-sub-item-height);padding:0 10px}.el-menu--horizontal .el-menu .el-sub-menu__title{padding-right:40px}.el-menu--horizontal .el-menu .el-menu-item.is-active,.el-menu--horizontal .el-menu .el-sub-menu.is-active>.el-sub-menu__title{color:var(--el-menu-active-color)}.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,.el-menu--horizontal .el-menu-item:not(.is-disabled):hover{background-color:var(--el-menu-hover-bg-color);color:var(--el-menu-hover-text-color);outline:none}.el-menu--horizontal>.el-menu-item.is-active{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)!important}.el-menu--collapse{width:calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding)*2)}.el-menu--collapse>.el-menu-item [class^=el-icon],.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title [class^=el-icon],.el-menu--collapse>.el-sub-menu>.el-sub-menu__title [class^=el-icon]{margin:0;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-menu--collapse>.el-menu-item .el-sub-menu__icon-arrow,.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow{display:none}.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title>span,.el-menu--collapse>.el-menu-item>span,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title>span{display:inline-block;height:0;overflow:hidden;visibility:hidden;width:0}.el-menu--collapse>.el-menu-item.is-active i{color:inherit}.el-menu--collapse .el-menu .el-sub-menu{min-width:200px}.el-menu--collapse .el-sub-menu.is-active .el-sub-menu__title{color:var(--el-menu-active-color)}.el-menu--popup{border:none;border-radius:var(--el-border-radius-small);box-shadow:var(--el-box-shadow-light);min-width:200px;padding:5px 0;z-index:100}.el-menu .el-icon{flex-shrink:0}.el-menu-item{align-items:center;box-sizing:border-box;color:var(--el-menu-text-color);cursor:pointer;display:flex;font-size:var(--el-menu-item-font-size);height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);list-style:none;padding:0 var(--el-menu-base-level-padding);position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);white-space:nowrap}.el-menu-item *{vertical-align:bottom}.el-menu-item i{color:inherit}.el-menu-item:focus,.el-menu-item:hover{outline:none}.el-menu-item:hover{background-color:var(--el-menu-hover-bg-color)}.el-menu-item.is-disabled{background:none!important;cursor:not-allowed;opacity:.25}.el-menu-item [class^=el-icon]{font-size:18px;margin-right:5px;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-menu-item.is-active{color:var(--el-menu-active-color)}.el-menu-item.is-active i{color:inherit}.el-menu-item .el-menu-tooltip__trigger{align-items:center;box-sizing:border-box;display:inline-flex;height:100%;left:0;padding:0 var(--el-menu-base-level-padding);position:absolute;top:0;width:100%}.el-sub-menu{list-style:none;margin:0;padding-left:0}.el-sub-menu__title{align-items:center;box-sizing:border-box;color:var(--el-menu-text-color);cursor:pointer;display:flex;font-size:var(--el-menu-item-font-size);height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);list-style:none;padding:0 var(--el-menu-base-level-padding);position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);white-space:nowrap}.el-sub-menu__title *{vertical-align:bottom}.el-sub-menu__title i{color:inherit}.el-sub-menu__title:focus,.el-sub-menu__title:hover{outline:none}.el-sub-menu__title.is-disabled{background:none!important;cursor:not-allowed;opacity:.25}.el-sub-menu__title:hover{background-color:var(--el-menu-hover-bg-color)}.el-sub-menu .el-menu{border:none}.el-sub-menu .el-menu-item{height:var(--el-menu-sub-item-height);line-height:var(--el-menu-sub-item-height)}.el-sub-menu__hide-arrow .el-sub-menu__icon-arrow{display:none!important}.el-sub-menu.is-active .el-sub-menu__title{border-bottom-color:var(--el-menu-active-color)}.el-sub-menu.is-disabled .el-menu-item,.el-sub-menu.is-disabled .el-sub-menu__title{background:none!important;cursor:not-allowed;opacity:.25}.el-sub-menu .el-icon{font-size:18px;margin-right:5px;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-sub-menu .el-icon.el-sub-menu__icon-more{margin-right:0!important}.el-sub-menu .el-sub-menu__icon-arrow{font-size:12px;margin-right:0;margin-top:-6px;position:absolute;right:var(--el-menu-base-level-padding);top:50%;transition:transform var(--el-transition-duration);width:inherit}.el-menu-item-group>ul{padding:0}.el-menu-item-group__title{color:var(--el-text-color-secondary);font-size:12px;line-height:normal;padding:7px 0 7px var(--el-menu-base-level-padding)}.horizontal-collapse-transition .el-sub-menu__title .el-sub-menu__icon-arrow{opacity:0;transition:var(--el-transition-duration-fast)}.el-message-box{--el-messagebox-title-color:var(--el-text-color-primary);--el-messagebox-width:420px;--el-messagebox-border-radius:4px;--el-messagebox-box-shadow:var(--el-box-shadow);--el-messagebox-font-size:var(--el-font-size-large);--el-messagebox-content-font-size:var(--el-font-size-base);--el-messagebox-content-color:var(--el-text-color-regular);--el-messagebox-error-font-size:12px;--el-messagebox-padding-primary:12px;--el-messagebox-font-line-height:var(--el-font-line-height-primary);-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:var(--el-bg-color);border-radius:var(--el-messagebox-border-radius);box-shadow:var(--el-messagebox-box-shadow);box-sizing:border-box;display:inline-block;font-size:var(--el-messagebox-font-size);max-width:var(--el-messagebox-width);overflow:hidden;overflow-wrap:break-word;padding:var(--el-messagebox-padding-primary);position:relative;text-align:left;vertical-align:middle;width:100%}.el-message-box:focus{outline:none!important}.el-overlay.is-message-box .el-overlay-message-box{bottom:0;left:0;overflow:auto;padding:16px;position:fixed;right:0;text-align:center;top:0}.el-overlay.is-message-box .el-overlay-message-box:after{content:"";display:inline-block;height:100%;vertical-align:middle;width:0}.el-message-box.is-draggable .el-message-box__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-message-box__header{padding-bottom:var(--el-messagebox-padding-primary)}.el-message-box__header.show-close{padding-right:calc(var(--el-messagebox-padding-primary) + var(--el-message-close-size, 16px))}.el-message-box__title{color:var(--el-messagebox-title-color);font-size:var(--el-messagebox-font-size);line-height:var(--el-messagebox-font-line-height)}.el-message-box__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:40px;outline:none;padding:0;position:absolute;right:0;top:0;width:40px}.el-message-box__headerbtn .el-message-box__close{color:var(--el-color-info);font-size:inherit}.el-message-box__headerbtn:focus .el-message-box__close,.el-message-box__headerbtn:hover .el-message-box__close{color:var(--el-color-primary)}.el-message-box__content{color:var(--el-messagebox-content-color);font-size:var(--el-messagebox-content-font-size)}.el-message-box__container{align-items:center;display:flex;gap:12px}.el-message-box__input{padding-top:12px}.el-message-box__input div.invalid>input{border-color:var(--el-color-error)}.el-message-box__input div.invalid>input:focus{border-color:var(--el-color-error)}.el-message-box__status{font-size:24px}.el-message-box__status.el-message-box-icon--success{--el-messagebox-color:var(--el-color-success);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--info{--el-messagebox-color:var(--el-color-info);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--warning{--el-messagebox-color:var(--el-color-warning);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--error{--el-messagebox-color:var(--el-color-error);color:var(--el-messagebox-color)}.el-message-box__message{margin:0}.el-message-box__message p{line-height:var(--el-messagebox-font-line-height);margin:0}.el-message-box__errormsg{color:var(--el-color-error);font-size:var(--el-messagebox-error-font-size);line-height:var(--el-messagebox-font-line-height)}.el-message-box__btns{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end;padding-top:var(--el-messagebox-padding-primary)}.el-message-box--center .el-message-box__title{align-items:center;display:flex;gap:6px;justify-content:center}.el-message-box--center .el-message-box__status{font-size:inherit}.el-message-box--center .el-message-box__btns,.el-message-box--center .el-message-box__container{justify-content:center}.fade-in-linear-enter-active .el-overlay-message-box{-webkit-animation:msgbox-fade-in var(--el-transition-duration);animation:msgbox-fade-in var(--el-transition-duration)}.fade-in-linear-leave-active .el-overlay-message-box{animation:msgbox-fade-in var(--el-transition-duration) reverse}@-webkit-keyframes msgbox-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes msgbox-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}.el-message{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:11px 15px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary);align-items:center;background-color:var(--el-message-bg-color);border-color:var(--el-message-border-color);border-radius:var(--el-border-radius-base);border-style:var(--el-border-style);border-width:var(--el-border-width);box-sizing:border-box;display:flex;gap:8px;left:50%;max-width:calc(100% - 32px);padding:var(--el-message-padding);position:fixed;top:20px;transform:translate(-50%);transition:opacity var(--el-transition-duration),transform .4s,top .4s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.el-message.is-center{justify-content:center}.el-message.is-plain{background-color:var(--el-bg-color-overlay);border-color:var(--el-bg-color-overlay);box-shadow:var(--el-box-shadow-light)}.el-message p{margin:0}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message .el-message__badge{position:absolute;right:-8px;top:-8px}.el-message__content{font-size:14px;line-height:1;padding:0}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{color:var(--el-message-close-icon-color);cursor:pointer;font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}.el-notification{--el-notification-width:330px;--el-notification-padding:14px 26px 14px 13px;--el-notification-radius:8px;--el-notification-shadow:var(--el-box-shadow-light);--el-notification-border-color:var(--el-border-color-lighter);--el-notification-icon-size:24px;--el-notification-close-font-size:var(--el-message-close-size,16px);--el-notification-group-margin-left:13px;--el-notification-group-margin-right:8px;--el-notification-content-font-size:var(--el-font-size-base);--el-notification-content-color:var(--el-text-color-regular);--el-notification-title-font-size:16px;--el-notification-title-color:var(--el-text-color-primary);--el-notification-close-color:var(--el-text-color-secondary);--el-notification-close-hover-color:var(--el-text-color-regular);background-color:var(--el-bg-color-overlay);border:1px solid var(--el-notification-border-color);border-radius:var(--el-notification-radius);box-shadow:var(--el-notification-shadow);box-sizing:border-box;display:flex;overflow:hidden;overflow-wrap:break-word;padding:var(--el-notification-padding);position:fixed;transition:opacity var(--el-transition-duration),transform var(--el-transition-duration),left var(--el-transition-duration),right var(--el-transition-duration),top .4s,bottom var(--el-transition-duration);width:var(--el-notification-width);z-index:9999}.el-notification.right{right:16px}.el-notification.left{left:16px}.el-notification__group{margin-left:var(--el-notification-group-margin-left);margin-right:var(--el-notification-group-margin-right)}.el-notification__title{color:var(--el-notification-title-color);font-size:var(--el-notification-title-font-size);font-weight:700;line-height:var(--el-notification-icon-size);margin:0}.el-notification__content{color:var(--el-notification-content-color);font-size:var(--el-notification-content-font-size);line-height:24px;margin:6px 0 0}.el-notification__content p{margin:0}.el-notification .el-notification__icon{font-size:var(--el-notification-icon-size);height:var(--el-notification-icon-size);width:var(--el-notification-icon-size)}.el-notification .el-notification__closeBtn{color:var(--el-notification-close-color);cursor:pointer;font-size:var(--el-notification-close-font-size);position:absolute;right:15px;top:18px}.el-notification .el-notification__closeBtn:hover{color:var(--el-notification-close-hover-color)}.el-notification .el-notification--success{--el-notification-icon-color:var(--el-color-success);color:var(--el-notification-icon-color)}.el-notification .el-notification--info{--el-notification-icon-color:var(--el-color-info);color:var(--el-notification-icon-color)}.el-notification .el-notification--warning{--el-notification-icon-color:var(--el-color-warning);color:var(--el-notification-icon-color)}.el-notification .el-notification--error{--el-notification-icon-color:var(--el-color-error);color:var(--el-notification-icon-color)}.el-notification-fade-enter-from.right{right:0;transform:translate(100%)}.el-notification-fade-enter-from.left{left:0;transform:translate(-100%)}.el-notification-fade-leave-to{opacity:0}.el-overlay{background-color:var(--el-overlay-color-lighter);bottom:0;height:100%;left:0;overflow:auto;position:fixed;right:0;top:0;z-index:2000}.el-overlay .el-overlay-root{height:0}.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{align-items:center;display:flex;justify-content:space-between;line-height:24px}.el-page-header__left{align-items:center;display:flex;margin-right:40px;position:relative}.el-page-header__back{align-items:center;cursor:pointer;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;display:flex;font-size:16px;margin-right:10px}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.el-pagination{--el-pagination-font-size:14px;--el-pagination-bg-color:var(--el-fill-color-blank);--el-pagination-text-color:var(--el-text-color-primary);--el-pagination-border-radius:2px;--el-pagination-button-color:var(--el-text-color-primary);--el-pagination-button-width:32px;--el-pagination-button-height:32px;--el-pagination-button-disabled-color:var(--el-text-color-placeholder);--el-pagination-button-disabled-bg-color:var(--el-fill-color-blank);--el-pagination-button-bg-color:var(--el-fill-color);--el-pagination-hover-color:var(--el-color-primary);--el-pagination-font-size-small:12px;--el-pagination-button-width-small:24px;--el-pagination-button-height-small:24px;--el-pagination-button-width-large:40px;--el-pagination-button-height-large:40px;--el-pagination-item-gap:16px;align-items:center;color:var(--el-pagination-text-color);display:flex;font-size:var(--el-pagination-font-size);font-weight:400;white-space:nowrap}.el-pagination .el-input__inner{-moz-appearance:textfield;text-align:center}.el-pagination .el-select{width:128px}.el-pagination button{align-items:center;background:var(--el-pagination-bg-color);border:none;border-radius:var(--el-pagination-border-radius);box-sizing:border-box;color:var(--el-pagination-button-color);cursor:pointer;display:flex;font-size:var(--el-pagination-font-size);height:var(--el-pagination-button-height);justify-content:center;line-height:var(--el-pagination-button-height);min-width:var(--el-pagination-button-width);padding:0 4px;text-align:center}.el-pagination button *{pointer-events:none}.el-pagination button:focus{outline:none}.el-pagination button:hover{color:var(--el-pagination-hover-color)}.el-pagination button.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pagination button.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pagination button.is-disabled,.el-pagination button:disabled{background-color:var(--el-pagination-button-disabled-bg-color);color:var(--el-pagination-button-disabled-color);cursor:not-allowed}.el-pagination button:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-pagination .btn-next .el-icon,.el-pagination .btn-prev .el-icon{display:block;font-size:12px;font-weight:700;width:inherit}.el-pagination>.is-first{margin-left:0!important}.el-pagination>.is-last{margin-right:0!important}.el-pagination .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination__sizes,.el-pagination__total{color:var(--el-text-color-regular);font-weight:400;margin-left:var(--el-pagination-item-gap)}.el-pagination__total[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__jump{align-items:center;color:var(--el-text-color-regular);display:flex;font-weight:400;margin-left:var(--el-pagination-item-gap)}.el-pagination__jump[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__goto{margin-right:8px}.el-pagination__editor{box-sizing:border-box;text-align:center}.el-pagination__editor.el-input{width:56px}.el-pagination__editor .el-input__inner::-webkit-inner-spin-button,.el-pagination__editor .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-pagination__classifier{margin-left:8px}.el-pagination__rightwrapper{align-items:center;display:flex;flex:1;justify-content:flex-end}.el-pagination.is-background .btn-next,.el-pagination.is-background .btn-prev,.el-pagination.is-background .el-pager li{background-color:var(--el-pagination-button-bg-color);margin:0 4px}.el-pagination.is-background .btn-next.is-active,.el-pagination.is-background .btn-prev.is-active,.el-pagination.is-background .el-pager li.is-active{background-color:var(--el-color-primary);color:var(--el-color-white)}.el-pagination.is-background .btn-next.is-disabled,.el-pagination.is-background .btn-next:disabled,.el-pagination.is-background .btn-prev.is-disabled,.el-pagination.is-background .btn-prev:disabled,.el-pagination.is-background .el-pager li.is-disabled,.el-pagination.is-background .el-pager li:disabled{background-color:var(--el-disabled-bg-color);color:var(--el-text-color-placeholder)}.el-pagination.is-background .btn-next.is-disabled.is-active,.el-pagination.is-background .btn-next:disabled.is-active,.el-pagination.is-background .btn-prev.is-disabled.is-active,.el-pagination.is-background .btn-prev:disabled.is-active,.el-pagination.is-background .el-pager li.is-disabled.is-active,.el-pagination.is-background .el-pager li:disabled.is-active{background-color:var(--el-fill-color-dark);color:var(--el-text-color-secondary)}.el-pagination.is-background .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination--small .btn-next,.el-pagination--small .btn-prev,.el-pagination--small .el-pager li{font-size:var(--el-pagination-font-size-small);height:var(--el-pagination-button-height-small);line-height:var(--el-pagination-button-height-small);min-width:var(--el-pagination-button-width-small)}.el-pagination--small button,.el-pagination--small span:not([class*=suffix]){font-size:var(--el-pagination-font-size-small)}.el-pagination--small .el-select{width:100px}.el-pagination--large .btn-next,.el-pagination--large .btn-prev,.el-pagination--large .el-pager li{height:var(--el-pagination-button-height-large);line-height:var(--el-pagination-button-height-large);min-width:var(--el-pagination-button-width-large)}.el-pagination--large .el-select .el-input{width:160px}.el-pager{font-size:0;list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-pager,.el-pager li{align-items:center;display:flex}.el-pager li{background:var(--el-pagination-bg-color);border:none;border-radius:var(--el-pagination-border-radius);box-sizing:border-box;color:var(--el-pagination-button-color);cursor:pointer;font-size:var(--el-pagination-font-size);height:var(--el-pagination-button-height);justify-content:center;line-height:var(--el-pagination-button-height);min-width:var(--el-pagination-button-width);padding:0 4px;text-align:center}.el-pager li *{pointer-events:none}.el-pager li:focus{outline:none}.el-pager li:hover{color:var(--el-pagination-hover-color)}.el-pager li.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pager li.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pager li.is-disabled,.el-pager li:disabled{background-color:var(--el-pagination-button-disabled-bg-color);color:var(--el-pagination-button-disabled-color);cursor:not-allowed}.el-pager li:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-popconfirm__main{align-items:center;display:flex}.el-popconfirm__icon{margin-right:5px}.el-popconfirm__action{margin-top:8px;text-align:right}.el-popover{--el-popover-bg-color:var(--el-bg-color-overlay);--el-popover-font-size:var(--el-font-size-base);--el-popover-border-color:var(--el-border-color-lighter);--el-popover-padding:12px;--el-popover-padding-large:18px 20px;--el-popover-title-font-size:16px;--el-popover-title-text-color:var(--el-text-color-primary);--el-popover-border-radius:4px}.el-popover.el-popper{background:var(--el-popover-bg-color);border:1px solid var(--el-popover-border-color);border-radius:var(--el-popover-border-radius);box-shadow:var(--el-box-shadow-light);box-sizing:border-box;color:var(--el-text-color-regular);font-size:var(--el-popover-font-size);line-height:1.4;min-width:150px;overflow-wrap:break-word;padding:var(--el-popover-padding);z-index:var(--el-index-popper)}.el-popover.el-popper--plain{padding:var(--el-popover-padding-large)}.el-popover__title{color:var(--el-popover-title-text-color);font-size:var(--el-popover-title-font-size);line-height:1;margin-bottom:12px}.el-popover__reference:focus:hover,.el-popover__reference:focus:not(.focusing){outline-width:0}.el-popover.el-popper.is-dark{--el-popover-bg-color:var(--el-text-color-primary);--el-popover-border-color:var(--el-text-color-primary);--el-popover-title-text-color:var(--el-bg-color);color:var(--el-bg-color)}.el-popover.el-popper:focus,.el-popover.el-popper:focus:active{outline-width:0}.el-progress{align-items:center;display:flex;line-height:1;position:relative}.el-progress__text{color:var(--el-text-color-regular);font-size:14px;line-height:1;margin-left:5px;min-width:50px}.el-progress__text i{display:block;vertical-align:middle}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{left:0;margin:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);width:100%}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{display:inline-block;vertical-align:middle}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{display:block;margin-right:0;padding-right:0}.el-progress--text-inside .el-progress-bar{margin-right:0;padding-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bar__inner{background-color:var(--el-color-danger)}.el-progress.is-exception .el-progress__text{color:var(--el-color-danger)}.el-progress-bar{box-sizing:border-box;flex-grow:1}.el-progress-bar__outer{background-color:var(--el-border-color-lighter);border-radius:100px;height:6px;overflow:hidden;position:relative;vertical-align:middle}.el-progress-bar__inner{background-color:var(--el-color-primary);border-radius:100px;height:100%;left:0;line-height:1;position:absolute;text-align:right;top:0;transition:width .6s ease;white-space:nowrap}.el-progress-bar__inner:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-progress-bar__inner--indeterminate{-webkit-animation:indeterminate 3s infinite;animation:indeterminate 3s infinite;transform:translateZ(0)}.el-progress-bar__inner--striped{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0,transparent 50%,rgba(0,0,0,.1) 0,rgba(0,0,0,.1) 75%,transparent 0,transparent);background-size:1.25em 1.25em}.el-progress-bar__inner--striped.el-progress-bar__inner--striped-flow{-webkit-animation:striped-flow 3s linear infinite;animation:striped-flow 3s linear infinite}.el-progress-bar__innerText{color:#fff;display:inline-block;font-size:12px;margin:0 5px;vertical-align:middle}@-webkit-keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@-webkit-keyframes indeterminate{0%{left:-100%}to{left:100%}}@keyframes indeterminate{0%{left:-100%}to{left:100%}}@-webkit-keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}@keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}.el-radio-button{--el-radio-button-checked-bg-color:var(--el-color-primary);--el-radio-button-checked-text-color:var(--el-color-white);--el-radio-button-checked-border-color:var(--el-color-primary);--el-radio-button-disabled-checked-fill:var(--el-border-color-extra-light)}.el-radio-button,.el-radio-button__inner{display:inline-block;outline:none;position:relative}.el-radio-button__inner{-webkit-appearance:none;background:var(--el-button-bg-color,var(--el-fill-color-blank));border:var(--el-border);border-left:0;border-radius:0;box-sizing:border-box;color:var(--el-button-text-color,var(--el-text-color-regular));cursor:pointer;font-size:var(--el-font-size-base);font-weight:var(--el-button-font-weight,var(--el-font-weight-primary));line-height:1;margin:0;padding:8px 15px;text-align:center;transition:var(--el-transition-all);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-radio-button__inner.is-round{padding:8px 15px}.el-radio-button__inner:hover{color:var(--el-color-primary)}.el-radio-button__inner [class*=el-icon-]{line-height:.9}.el-radio-button__inner [class*=el-icon-]+span{margin-left:5px}.el-radio-button:first-child .el-radio-button__inner{border-left:var(--el-border);border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);box-shadow:none!important}.el-radio-button__original-radio{opacity:0;outline:none;position:absolute;z-index:-1}.el-radio-button__original-radio:checked+.el-radio-button__inner{background-color:var(--el-radio-button-checked-bg-color,var(--el-color-primary));border-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));box-shadow:-1px 0 0 0 var(--el-radio-button-checked-border-color,var(--el-color-primary));color:var(--el-radio-button-checked-text-color,var(--el-color-white))}.el-radio-button__original-radio:focus-visible+.el-radio-button__inner{border-left:var(--el-border);border-left-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));border-radius:var(--el-border-radius-base);box-shadow:none;outline:2px solid var(--el-radio-button-checked-border-color);outline-offset:1px;z-index:2}.el-radio-button__original-radio:disabled+.el-radio-button__inner{background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));background-image:none;border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none;color:var(--el-disabled-text-color);cursor:not-allowed}.el-radio-button__original-radio:disabled:checked+.el-radio-button__inner{background-color:var(--el-radio-button-disabled-checked-fill)}.el-radio-button:last-child .el-radio-button__inner{border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0}.el-radio-button:first-child:last-child .el-radio-button__inner{border-radius:var(--el-border-radius-base)}.el-radio-button--large .el-radio-button__inner{border-radius:0;font-size:var(--el-font-size-base);padding:12px 19px}.el-radio-button--large .el-radio-button__inner.is-round{padding:12px 19px}.el-radio-button--small .el-radio-button__inner{border-radius:0;font-size:12px;padding:5px 11px}.el-radio-button--small .el-radio-button__inner.is-round{padding:5px 11px}.el-radio-group{align-items:center;display:inline-flex;flex-wrap:wrap;font-size:0}.el-radio{--el-radio-font-size:var(--el-font-size-base);--el-radio-text-color:var(--el-text-color-regular);--el-radio-font-weight:var(--el-font-weight-primary);--el-radio-input-height:14px;--el-radio-input-width:14px;--el-radio-input-border-radius:var(--el-border-radius-circle);--el-radio-input-bg-color:var(--el-fill-color-blank);--el-radio-input-border:var(--el-border);--el-radio-input-border-color:var(--el-border-color);--el-radio-input-border-color-hover:var(--el-color-primary);align-items:center;color:var(--el-radio-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-radio-font-weight);height:32px;margin-right:32px;outline:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-radio.el-radio--large{height:40px}.el-radio.el-radio--small{height:24px}.el-radio.is-bordered{border:var(--el-border);border-radius:var(--el-border-radius-base);box-sizing:border-box;padding:0 15px 0 9px}.el-radio.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-radio.is-bordered.is-disabled{border-color:var(--el-border-color-lighter);cursor:not-allowed}.el-radio.is-bordered.el-radio--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-radio.is-bordered.el-radio--large .el-radio__label{font-size:var(--el-font-size-base)}.el-radio.is-bordered.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.is-bordered.el-radio--small{border-radius:var(--el-border-radius-base);padding:0 11px 0 7px}.el-radio.is-bordered.el-radio--small .el-radio__label{font-size:12px}.el-radio.is-bordered.el-radio--small .el-radio__inner{height:12px;width:12px}.el-radio:last-child{margin-right:0}.el-radio__input{cursor:pointer;display:inline-flex;outline:none;position:relative;vertical-align:middle;white-space:nowrap}.el-radio__input.is-disabled .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner:after{background-color:var(--el-disabled-bg-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner+.el-radio__label{cursor:not-allowed}.el-radio__input.is-disabled.is-checked .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color)}.el-radio__input.is-disabled.is-checked .el-radio__inner:after{background-color:var(--el-text-color-placeholder)}.el-radio__input.is-disabled+span.el-radio__label{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-radio__input.is-checked .el-radio__inner{background:var(--el-color-primary);border-color:var(--el-color-primary)}.el-radio__input.is-checked .el-radio__inner:after{transform:translate(-50%,-50%) scale(1)}.el-radio__input.is-checked+.el-radio__label{color:var(--el-color-primary)}.el-radio__input.is-focus .el-radio__inner{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner{background-color:var(--el-radio-input-bg-color);border:var(--el-radio-input-border);border-radius:var(--el-radio-input-border-radius);box-sizing:border-box;cursor:pointer;display:inline-block;height:var(--el-radio-input-height);position:relative;width:var(--el-radio-input-width)}.el-radio__inner:hover{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner:after{background-color:var(--el-color-white);border-radius:var(--el-radio-input-border-radius);content:"";height:4px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:transform .15s ease-in;width:4px}.el-radio__original{bottom:0;left:0;margin:0;opacity:0;outline:none;position:absolute;right:0;top:0;z-index:-1}.el-radio__original:focus-visible+.el-radio__inner{border-radius:var(--el-radio-input-border-radius);outline:2px solid var(--el-radio-input-border-color-hover);outline-offset:1px}.el-radio:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:0 0 2px 2px var(--el-radio-input-border-color-hover)}.el-radio__label{font-size:var(--el-radio-font-size);padding-left:8px}.el-radio.el-radio--large .el-radio__label{font-size:14px}.el-radio.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.el-radio--small .el-radio__label{font-size:12px}.el-radio.el-radio--small .el-radio__inner{height:12px;width:12px}.el-rate{--el-rate-height:20px;--el-rate-font-size:var(--el-font-size-base);--el-rate-icon-size:18px;--el-rate-icon-margin:6px;--el-rate-void-color:var(--el-border-color-darker);--el-rate-fill-color:#f7ba2a;--el-rate-disabled-void-color:var(--el-fill-color);--el-rate-text-color:var(--el-text-color-primary);align-items:center;display:inline-flex;height:32px}.el-rate:active,.el-rate:focus{outline:none}.el-rate__item{color:var(--el-rate-void-color);cursor:pointer;display:inline-block;font-size:0;line-height:normal;position:relative;vertical-align:middle}.el-rate .el-rate__icon{display:inline-block;font-size:var(--el-rate-icon-size);margin-right:var(--el-rate-icon-margin);position:relative;transition:var(--el-transition-duration)}.el-rate .el-rate__icon.hover{transform:scale(1.15)}.el-rate .el-rate__icon .path2{left:0;position:absolute;top:0}.el-rate .el-rate__icon.is-active{color:var(--el-rate-fill-color)}.el-rate__decimal{color:var(--el-rate-fill-color);display:inline-block;overflow:hidden}.el-rate__decimal,.el-rate__decimal--box{left:0;position:absolute;top:0}.el-rate__text{color:var(--el-rate-text-color);font-size:var(--el-rate-font-size);vertical-align:middle}.el-rate--large{height:40px}.el-rate--small{height:24px}.el-rate--small .el-rate__icon{font-size:14px}.el-rate.is-disabled .el-rate__item{color:var(--el-rate-disabled-void-color);cursor:auto}.el-result{--el-result-padding:40px 30px;--el-result-icon-font-size:64px;--el-result-title-font-size:20px;--el-result-title-margin-top:20px;--el-result-subtitle-margin-top:10px;--el-result-extra-margin-top:30px;align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:var(--el-result-padding);text-align:center}.el-result__icon svg{height:var(--el-result-icon-font-size);width:var(--el-result-icon-font-size)}.el-result__title{margin-top:var(--el-result-title-margin-top)}.el-result__title p{color:var(--el-text-color-primary);font-size:var(--el-result-title-font-size);line-height:1.3;margin:0}.el-result__subtitle{margin-top:var(--el-result-subtitle-margin-top)}.el-result__subtitle p{color:var(--el-text-color-regular);font-size:var(--el-font-size-base);line-height:1.3;margin:0}.el-result__extra{margin-top:var(--el-result-extra-margin-top)}.el-result .icon-primary{--el-result-color:var(--el-color-primary);color:var(--el-result-color)}.el-result .icon-success{--el-result-color:var(--el-color-success);color:var(--el-result-color)}.el-result .icon-warning{--el-result-color:var(--el-color-warning);color:var(--el-result-color)}.el-result .icon-danger{--el-result-color:var(--el-color-danger);color:var(--el-result-color)}.el-result .icon-error{--el-result-color:var(--el-color-error);color:var(--el-result-color)}.el-result .icon-info{--el-result-color:var(--el-color-info);color:var(--el-result-color)}.el-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-top{align-items:flex-start}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}.el-scrollbar{--el-scrollbar-opacity:.3;--el-scrollbar-bg-color:var(--el-text-color-secondary);--el-scrollbar-hover-opacity:.5;--el-scrollbar-hover-bg-color:var(--el-text-color-secondary);height:100%;overflow:hidden;position:relative}.el-scrollbar__wrap{height:100%;overflow:auto}.el-scrollbar__wrap--hidden-default{scrollbar-width:none}.el-scrollbar__wrap--hidden-default::-webkit-scrollbar{display:none}.el-scrollbar__thumb{background-color:var(--el-scrollbar-bg-color,var(--el-text-color-secondary));border-radius:inherit;cursor:pointer;display:block;height:0;opacity:var(--el-scrollbar-opacity,.3);position:relative;transition:var(--el-transition-duration) background-color;width:0}.el-scrollbar__thumb:hover{background-color:var(--el-scrollbar-hover-bg-color,var(--el-text-color-secondary));opacity:var(--el-scrollbar-hover-opacity,.5)}.el-scrollbar__bar{border-radius:4px;bottom:2px;position:absolute;right:2px;z-index:1}.el-scrollbar__bar.is-vertical{top:2px;width:6px}.el-scrollbar__bar.is-vertical>div{width:100%}.el-scrollbar__bar.is-horizontal{height:6px;left:2px}.el-scrollbar__bar.is-horizontal>div{height:100%}.el-scrollbar-fade-enter-active{transition:opacity .34s ease-out}.el-scrollbar-fade-leave-active{transition:opacity .12s ease-out}.el-scrollbar-fade-enter-from,.el-scrollbar-fade-leave-active{opacity:0}.el-select-dropdown{border-radius:var(--el-border-radius-base);box-sizing:border-box;z-index:calc(var(--el-index-top) + 1)}.el-select-dropdown .el-scrollbar.is-empty .el-select-dropdown__list{padding:0}.el-select-dropdown__empty,.el-select-dropdown__loading{color:var(--el-text-color-secondary);font-size:var(--el-select-font-size);margin:0;padding:10px 0;text-align:center}.el-select-dropdown__wrap{max-height:274px}.el-select-dropdown__list{box-sizing:border-box;list-style:none;margin:0;padding:6px 0}.el-select-dropdown__list.el-vl__window{margin:6px 0;padding:0}.el-select-dropdown__header{border-bottom:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__footer{border-top:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__item{box-sizing:border-box;color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-base);height:34px;line-height:34px;overflow:hidden;padding:0 32px 0 20px;position:relative;text-overflow:ellipsis;white-space:nowrap}.el-select-dropdown__item.is-hovering{background-color:var(--el-fill-color-light)}.el-select-dropdown__item.is-selected{color:var(--el-color-primary);font-weight:700}.el-select-dropdown__item.is-disabled{background-color:unset;color:var(--el-text-color-placeholder);cursor:not-allowed}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-selected:after{background-color:var(--el-color-primary);background-position:50%;background-repeat:no-repeat;border-right:none;border-top:none;content:"";height:12px;mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") no-repeat;mask-size:100% 100%;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") no-repeat;-webkit-mask-size:100% 100%;position:absolute;right:20px;top:50%;transform:translateY(-50%);width:12px}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-disabled:after{background-color:var(--el-text-color-placeholder)}.el-select-group{margin:0;padding:0}.el-select-group__wrap{list-style:none;margin:0;padding:0;position:relative}.el-select-group__title{color:var(--el-color-info);font-size:12px;line-height:34px;padding-left:20px}.el-select-group .el-select-dropdown__item{padding-left:20px}.el-select{--el-select-border-color-hover:var(--el-border-color-hover);--el-select-disabled-color:var(--el-disabled-text-color);--el-select-disabled-border:var(--el-disabled-border-color);--el-select-font-size:var(--el-font-size-base);--el-select-close-hover-color:var(--el-text-color-secondary);--el-select-input-color:var(--el-text-color-placeholder);--el-select-multiple-input-color:var(--el-text-color-regular);--el-select-input-focus-border-color:var(--el-color-primary);--el-select-input-font-size:14px;--el-select-width:100%;display:inline-block;position:relative;vertical-align:middle;width:var(--el-select-width)}.el-select__wrapper{align-items:center;background-color:var(--el-fill-color-blank);border-radius:var(--el-border-radius-base);box-shadow:0 0 0 1px var(--el-border-color) inset;box-sizing:border-box;cursor:pointer;display:flex;font-size:14px;gap:6px;line-height:24px;min-height:32px;padding:4px 12px;position:relative;text-align:left;transition:var(--el-transition-duration)}.el-select__wrapper:hover{box-shadow:0 0 0 1px var(--el-text-color) inset}.el-select__wrapper.is-filterable{cursor:text}.el-select__wrapper.is-focused{box-shadow:0 0 0 1px var(--el-color-primary) inset}.el-select__wrapper.is-hovering:not(.is-focused){box-shadow:0 0 0 1px var(--el-border-color-hover) inset}.el-select__wrapper.is-disabled{background-color:var(--el-fill-color-light);box-shadow:0 0 0 1px var(--el-select-disabled-border) inset;color:var(--el-text-color-placeholder);cursor:not-allowed}.el-select__wrapper.is-disabled:hover{box-shadow:0 0 0 1px var(--el-select-disabled-border) inset}.el-select__wrapper.is-disabled.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-select__wrapper.is-disabled .el-select__selected-item{color:var(--el-select-disabled-color)}.el-select__wrapper.is-disabled .el-select__caret,.el-select__wrapper.is-disabled .el-tag{cursor:not-allowed}.el-select__prefix,.el-select__suffix{align-items:center;color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:flex;flex-shrink:0;gap:6px}.el-select__caret{color:var(--el-select-input-color);cursor:pointer;font-size:var(--el-select-input-font-size);transform:rotate(0);transition:var(--el-transition-duration)}.el-select__caret.is-reverse{transform:rotate(180deg)}.el-select__selection{align-items:center;display:flex;flex:1;flex-wrap:wrap;gap:6px;min-width:0;position:relative}.el-select__selection.is-near{margin-left:-8px}.el-select__selection .el-tag{border-color:transparent;cursor:pointer}.el-select__selection .el-tag .el-tag__content{min-width:0}.el-select__selected-item{display:flex;flex-wrap:wrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-select__tags-text{line-height:normal}.el-select__placeholder,.el-select__tags-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-select__placeholder{color:var(--el-input-text-color,var(--el-text-color-regular));position:absolute;top:50%;transform:translateY(-50%);width:100%}.el-select__placeholder.is-transparent{color:var(--el-text-color-placeholder);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-select__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-select__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-select__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-select__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-select__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-select__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-select__input-wrapper{max-width:100%}.el-select__input-wrapper.is-hidden{opacity:0;position:absolute}.el-select__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--el-select-multiple-input-color);font-family:inherit;font-size:inherit;height:24px;max-width:100%;outline:none;padding:0}.el-select__input.is-disabled{cursor:not-allowed}.el-select__input-calculator{left:0;max-width:100%;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:pre}.el-select--large .el-select__wrapper{font-size:14px;gap:6px;line-height:24px;min-height:40px;padding:8px 16px}.el-select--large .el-select__selection{gap:6px}.el-select--large .el-select__selection.is-near{margin-left:-8px}.el-select--large .el-select__prefix,.el-select--large .el-select__suffix{gap:6px}.el-select--large .el-select__input{height:24px}.el-select--small .el-select__wrapper{font-size:12px;gap:4px;line-height:20px;min-height:24px;padding:2px 8px}.el-select--small .el-select__selection{gap:4px}.el-select--small .el-select__selection.is-near{margin-left:-6px}.el-select--small .el-select__prefix,.el-select--small .el-select__suffix{gap:4px}.el-select--small .el-select__input{height:20px}.el-skeleton{--el-skeleton-circle-size:var(--el-avatar-size)}.el-skeleton__item{background:var(--el-skeleton-color);border-radius:var(--el-border-radius-base);display:inline-block;height:16px;width:100%}.el-skeleton__circle{border-radius:50%;height:var(--el-skeleton-circle-size);line-height:var(--el-skeleton-circle-size);width:var(--el-skeleton-circle-size)}.el-skeleton__button{border-radius:4px;height:40px;width:64px}.el-skeleton__p{width:100%}.el-skeleton__p.is-last{width:61%}.el-skeleton__p.is-first{width:33%}.el-skeleton__text{height:var(--el-font-size-small);width:100%}.el-skeleton__caption{height:var(--el-font-size-extra-small)}.el-skeleton__h1{height:var(--el-font-size-extra-large)}.el-skeleton__h3{height:var(--el-font-size-large)}.el-skeleton__h5{height:var(--el-font-size-medium)}.el-skeleton__image{align-items:center;border-radius:0;display:flex;justify-content:center;width:unset}.el-skeleton__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;height:22%;width:22%}.el-skeleton{--el-skeleton-color:var(--el-fill-color);--el-skeleton-to-color:var(--el-fill-color-darker)}@-webkit-keyframes el-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}@keyframes el-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}.el-skeleton{width:100%}.el-skeleton__first-line,.el-skeleton__paragraph{background:var(--el-skeleton-color);height:16px;margin-top:16px}.el-skeleton.is-animated .el-skeleton__item{-webkit-animation:el-skeleton-loading 1.4s ease infinite;animation:el-skeleton-loading 1.4s ease infinite;background:linear-gradient(90deg,var(--el-skeleton-color) 25%,var(--el-skeleton-to-color) 37%,var(--el-skeleton-color) 63%);background-size:400% 100%}.el-slider{--el-slider-main-bg-color:var(--el-color-primary);--el-slider-runway-bg-color:var(--el-border-color-light);--el-slider-stop-bg-color:var(--el-color-white);--el-slider-disabled-color:var(--el-text-color-placeholder);--el-slider-border-radius:3px;--el-slider-height:6px;--el-slider-button-size:20px;--el-slider-button-wrapper-size:36px;--el-slider-button-wrapper-offset:-15px;align-items:center;display:flex;height:32px;width:100%}.el-slider__runway{background-color:var(--el-slider-runway-bg-color);border-radius:var(--el-slider-border-radius);cursor:pointer;flex:1;height:var(--el-slider-height);position:relative}.el-slider__runway.show-input{margin-right:30px;width:auto}.el-slider__runway.is-disabled{cursor:default}.el-slider__runway.is-disabled .el-slider__bar{background-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button{border-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button-wrapper.hover,.el-slider__runway.is-disabled .el-slider__button-wrapper:hover,.el-slider__runway.is-disabled .el-slider__button-wrapper.dragging{cursor:not-allowed}.el-slider__runway.is-disabled .el-slider__button.dragging,.el-slider__runway.is-disabled .el-slider__button.hover,.el-slider__runway.is-disabled .el-slider__button:hover{transform:scale(1)}.el-slider__runway.is-disabled .el-slider__button.hover,.el-slider__runway.is-disabled .el-slider__button:hover,.el-slider__runway.is-disabled .el-slider__button.dragging{cursor:not-allowed}.el-slider__input{flex-shrink:0;width:130px}.el-slider__bar{background-color:var(--el-slider-main-bg-color);border-bottom-left-radius:var(--el-slider-border-radius);border-top-left-radius:var(--el-slider-border-radius);height:var(--el-slider-height);position:absolute}.el-slider__button-wrapper{background-color:transparent;height:var(--el-slider-button-wrapper-size);line-height:normal;outline:none;position:absolute;text-align:center;top:var(--el-slider-button-wrapper-offset);transform:translate(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:var(--el-slider-button-wrapper-size);z-index:1}.el-slider__button-wrapper:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-slider__button-wrapper.hover,.el-slider__button-wrapper:hover{cursor:-webkit-grab;cursor:grab}.el-slider__button-wrapper.dragging{cursor:-webkit-grabbing;cursor:grabbing}.el-slider__button{background-color:var(--el-color-white);border:2px solid var(--el-slider-main-bg-color);border-radius:50%;box-sizing:border-box;display:inline-block;height:var(--el-slider-button-size);transition:var(--el-transition-duration-fast);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:var(--el-slider-button-size)}.el-slider__button.dragging,.el-slider__button.hover,.el-slider__button:hover{transform:scale(1.2)}.el-slider__button.hover,.el-slider__button:hover{cursor:-webkit-grab;cursor:grab}.el-slider__button.dragging{cursor:-webkit-grabbing;cursor:grabbing}.el-slider__stop{background-color:var(--el-slider-stop-bg-color);border-radius:var(--el-border-radius-circle);height:var(--el-slider-height);position:absolute;transform:translate(-50%);width:var(--el-slider-height)}.el-slider__marks{height:100%;left:12px;top:0;width:18px}.el-slider__marks-text{color:var(--el-color-info);font-size:14px;margin-top:15px;position:absolute;transform:translate(-50%);white-space:pre}.el-slider.is-vertical{display:inline-flex;flex:0;height:100%;position:relative;width:auto}.el-slider.is-vertical .el-slider__runway{height:100%;margin:0 16px;width:var(--el-slider-height)}.el-slider.is-vertical .el-slider__bar{border-radius:0 0 3px 3px;height:auto;width:var(--el-slider-height)}.el-slider.is-vertical .el-slider__button-wrapper{left:var(--el-slider-button-wrapper-offset);top:auto;transform:translateY(50%)}.el-slider.is-vertical .el-slider__stop{transform:translateY(50%)}.el-slider.is-vertical .el-slider__marks-text{left:15px;margin-top:0;transform:translateY(50%)}.el-slider--large{height:40px}.el-slider--small{height:24px}.el-space{display:inline-flex;vertical-align:top}.el-space__item{display:flex;flex-wrap:wrap}.el-space__item>*{flex:1}.el-space--vertical{flex-direction:column}.el-time-spinner{white-space:nowrap;width:100%}.el-spinner{display:inline-block;vertical-align:middle}.el-spinner-inner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;height:50px;width:50px}.el-spinner-inner .path{stroke:var(--el-border-color-lighter);stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}@-webkit-keyframes rotate{to{transform:rotate(1turn)}}@keyframes rotate{to{transform:rotate(1turn)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}.el-step{flex-shrink:1;position:relative}.el-step:last-of-type .el-step__line{display:none}.el-step:last-of-type.is-flex{flex-basis:auto!important;flex-grow:0;flex-shrink:0}.el-step:last-of-type .el-step__description,.el-step:last-of-type .el-step__main{padding-right:0}.el-step__head{position:relative;width:100%}.el-step__head.is-process{border-color:var(--el-text-color-primary);color:var(--el-text-color-primary)}.el-step__head.is-wait{border-color:var(--el-text-color-placeholder);color:var(--el-text-color-placeholder)}.el-step__head.is-success{border-color:var(--el-color-success);color:var(--el-color-success)}.el-step__head.is-error{border-color:var(--el-color-danger);color:var(--el-color-danger)}.el-step__head.is-finish{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-step__icon{align-items:center;background:var(--el-bg-color);box-sizing:border-box;display:inline-flex;font-size:14px;height:24px;justify-content:center;position:relative;transition:.15s ease-out;width:24px;z-index:1}.el-step__icon.is-text{border:2px solid;border-color:inherit;border-radius:50%}.el-step__icon.is-icon{width:40px}.el-step__icon-inner{color:inherit;display:inline-block;font-weight:700;line-height:1;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:25px;font-weight:400}.el-step__icon-inner.is-status{transform:translateY(1px)}.el-step__line{background-color:var(--el-text-color-placeholder);border-color:inherit;position:absolute}.el-step__line-inner{border:1px solid;border-color:inherit;box-sizing:border-box;display:block;height:0;transition:.15s ease-out;width:0}.el-step__main{text-align:left;white-space:normal}.el-step__title{font-size:16px;line-height:38px}.el-step__title.is-process{color:var(--el-text-color-primary);font-weight:700}.el-step__title.is-wait{color:var(--el-text-color-placeholder)}.el-step__title.is-success{color:var(--el-color-success)}.el-step__title.is-error{color:var(--el-color-danger)}.el-step__title.is-finish{color:var(--el-color-primary)}.el-step__description{font-size:12px;font-weight:400;line-height:20px;margin-top:-5px;padding-right:10%}.el-step__description.is-process{color:var(--el-text-color-primary)}.el-step__description.is-wait{color:var(--el-text-color-placeholder)}.el-step__description.is-success{color:var(--el-color-success)}.el-step__description.is-error{color:var(--el-color-danger)}.el-step__description.is-finish{color:var(--el-color-primary)}.el-step.is-horizontal{display:inline-block}.el-step.is-horizontal .el-step__line{height:2px;left:0;right:0;top:11px}.el-step.is-vertical{display:flex}.el-step.is-vertical .el-step__head{flex-grow:0;width:24px}.el-step.is-vertical .el-step__main{flex-grow:1;padding-left:10px}.el-step.is-vertical .el-step__title{line-height:24px;padding-bottom:8px}.el-step.is-vertical .el-step__line{bottom:0;left:11px;top:0;width:2px}.el-step.is-vertical .el-step__icon.is-icon{width:24px}.el-step.is-center .el-step__head,.el-step.is-center .el-step__main{text-align:center}.el-step.is-center .el-step__description{padding-left:20%;padding-right:20%}.el-step.is-center .el-step__line{left:50%;right:-50%}.el-step.is-simple{align-items:center;display:flex}.el-step.is-simple .el-step__head{font-size:0;padding-right:10px;width:auto}.el-step.is-simple .el-step__icon{background:transparent;font-size:12px;height:16px;width:16px}.el-step.is-simple .el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:18px}.el-step.is-simple .el-step__icon-inner.is-status{transform:scale(.8) translateY(1px)}.el-step.is-simple .el-step__main{align-items:stretch;display:flex;flex-grow:1;position:relative}.el-step.is-simple .el-step__title{font-size:16px;line-height:20px}.el-step.is-simple:not(:last-of-type) .el-step__title{max-width:50%;overflow-wrap:break-word}.el-step.is-simple .el-step__arrow{align-items:center;display:flex;flex-grow:1;justify-content:center}.el-step.is-simple .el-step__arrow:after,.el-step.is-simple .el-step__arrow:before{background:var(--el-text-color-placeholder);content:"";display:inline-block;height:15px;position:absolute;width:1px}.el-step.is-simple .el-step__arrow:before{transform:rotate(-45deg) translateY(-4px);transform-origin:0 0}.el-step.is-simple .el-step__arrow:after{transform:rotate(45deg) translateY(4px);transform-origin:100% 100%}.el-step.is-simple:last-of-type .el-step__arrow{display:none}.el-steps{display:flex}.el-steps--simple{background:var(--el-fill-color-light);border-radius:4px;padding:13px 8%}.el-steps--horizontal{white-space:nowrap}.el-steps--vertical{flex-flow:column;height:100%}.el-switch{--el-switch-on-color:var(--el-color-primary);--el-switch-off-color:var(--el-border-color);align-items:center;display:inline-flex;font-size:14px;height:32px;line-height:20px;position:relative;vertical-align:middle}.el-switch.is-disabled .el-switch__core,.el-switch.is-disabled .el-switch__label{cursor:not-allowed}.el-switch__label{color:var(--el-text-color-primary);cursor:pointer;display:inline-block;font-size:14px;font-weight:500;height:20px;transition:var(--el-transition-duration-fast);vertical-align:middle}.el-switch__label.is-active{color:var(--el-color-primary)}.el-switch__label--left{margin-right:10px}.el-switch__label--right{margin-left:10px}.el-switch__label *{display:inline-block;font-size:14px;line-height:1}.el-switch__label .el-icon{height:inherit}.el-switch__label .el-icon svg{vertical-align:middle}.el-switch__input{height:0;margin:0;opacity:0;position:absolute;width:0}.el-switch__input:focus-visible~.el-switch__core{outline:2px solid var(--el-switch-on-color);outline-offset:1px}.el-switch__core{align-items:center;background:var(--el-switch-off-color);border:1px solid var(--el-switch-border-color,var(--el-switch-off-color));border-radius:10px;box-sizing:border-box;cursor:pointer;display:inline-flex;height:20px;min-width:40px;outline:none;position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration)}.el-switch__core .el-switch__inner{align-items:center;display:flex;height:16px;justify-content:center;overflow:hidden;padding:0 4px 0 18px;transition:all var(--el-transition-duration);width:100%}.el-switch__core .el-switch__inner .is-icon,.el-switch__core .el-switch__inner .is-text{color:var(--el-color-white);font-size:12px;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-switch__core .el-switch__action{align-items:center;background-color:var(--el-color-white);border-radius:var(--el-border-radius-circle);color:var(--el-switch-off-color);display:flex;height:16px;justify-content:center;left:1px;position:absolute;transition:all var(--el-transition-duration);width:16px}.el-switch.is-checked .el-switch__core{background-color:var(--el-switch-on-color);border-color:var(--el-switch-border-color,var(--el-switch-on-color))}.el-switch.is-checked .el-switch__core .el-switch__action{color:var(--el-switch-on-color);left:calc(100% - 17px)}.el-switch.is-checked .el-switch__core .el-switch__inner{padding:0 18px 0 4px}.el-switch.is-disabled{opacity:.6}.el-switch--wide .el-switch__label.el-switch__label--left span{left:10px}.el-switch--wide .el-switch__label.el-switch__label--right span{right:10px}.el-switch .label-fade-enter-from,.el-switch .label-fade-leave-active{opacity:0}.el-switch--large{font-size:14px;height:40px;line-height:24px}.el-switch--large .el-switch__label{font-size:14px;height:24px}.el-switch--large .el-switch__label *{font-size:14px}.el-switch--large .el-switch__core{border-radius:12px;height:24px;min-width:50px}.el-switch--large .el-switch__core .el-switch__inner{height:20px;padding:0 6px 0 22px}.el-switch--large .el-switch__core .el-switch__action{height:20px;width:20px}.el-switch--large.is-checked .el-switch__core .el-switch__action{left:calc(100% - 21px)}.el-switch--large.is-checked .el-switch__core .el-switch__inner{padding:0 22px 0 6px}.el-switch--small{font-size:12px;height:24px;line-height:16px}.el-switch--small .el-switch__label{font-size:12px;height:16px}.el-switch--small .el-switch__label *{font-size:12px}.el-switch--small .el-switch__core{border-radius:8px;height:16px;min-width:30px}.el-switch--small .el-switch__core .el-switch__inner{height:12px;padding:0 2px 0 14px}.el-switch--small .el-switch__core .el-switch__action{height:12px;width:12px}.el-switch--small.is-checked .el-switch__core .el-switch__action{left:calc(100% - 13px)}.el-switch--small.is-checked .el-switch__core .el-switch__inner{padding:0 14px 0 2px}.el-table-column--selection .cell{padding-left:14px;padding-right:14px}.el-table-filter{background-color:#fff;border:1px solid var(--el-border-color-lighter);border-radius:2px;box-shadow:var(--el-box-shadow-light);box-sizing:border-box}.el-table-filter__list{list-style:none;margin:0;min-width:100px;padding:5px 0}.el-table-filter__list-item{cursor:pointer;font-size:var(--el-font-size-base);line-height:36px;padding:0 10px}.el-table-filter__list-item:hover{background-color:var(--el-color-primary-light-9);color:var(--el-color-primary)}.el-table-filter__list-item.is-active{background-color:var(--el-color-primary);color:#fff}.el-table-filter__content{min-width:100px}.el-table-filter__bottom{border-top:1px solid var(--el-border-color-lighter);padding:8px}.el-table-filter__bottom button{background:transparent;border:none;color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-small);padding:0 3px}.el-table-filter__bottom button:hover{color:var(--el-color-primary)}.el-table-filter__bottom button:focus{outline:none}.el-table-filter__bottom button.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-table-filter__wrap{max-height:280px}.el-table-filter__checkbox-group{padding:10px}.el-table-filter__checkbox-group label.el-checkbox{align-items:center;display:flex;height:unset;margin-bottom:12px;margin-left:5px;margin-right:5px}.el-table-filter__checkbox-group .el-checkbox:last-child{margin-bottom:0}.el-table{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-bg-color);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-bg-color);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px rgba(0,0,0,.15);--el-table-fixed-right-column:inset -10px 0 10px -10px rgba(0,0,0,.15);--el-table-index:var(--el-index-normal);background-color:var(--el-table-bg-color);box-sizing:border-box;color:var(--el-table-text-color);font-size:14px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-width:100%;overflow:hidden;position:relative;width:100%}.el-table__inner-wrapper{display:flex;flex-direction:column;height:100%;position:relative}.el-table__inner-wrapper:before{bottom:0;height:1px;left:0}.el-table tbody:focus-visible{outline:none}.el-table.has-footer.el-table--fluid-height tr:last-child td.el-table__cell,.el-table.has-footer.el-table--scrollable-y tr:last-child td.el-table__cell{border-bottom-color:transparent}.el-table__empty-block{align-items:center;display:flex;justify-content:center;left:0;min-height:60px;position:-webkit-sticky;position:sticky;text-align:center;width:100%}.el-table__empty-text{color:var(--el-text-color-secondary);line-height:60px;width:50%}.el-table__expand-column .cell{padding:0;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table__expand-icon{color:var(--el-text-color-regular);cursor:pointer;font-size:12px;height:20px;position:relative;transition:transform var(--el-transition-duration-fast) ease-in-out}.el-table__expand-icon--expanded{transform:rotate(90deg)}.el-table__expand-icon>.el-icon{font-size:12px}.el-table__expanded-cell{background-color:var(--el-table-expanded-cell-bg-color)}.el-table__expanded-cell[class*=cell]{padding:20px 50px}.el-table__expanded-cell:hover{background-color:transparent!important}.el-table__placeholder{display:inline-block;width:20px}.el-table__append-wrapper{overflow:hidden}.el-table--fit{border-bottom:0;border-right:0}.el-table--fit .el-table__cell.gutter{border-right-width:1px}.el-table--fit .el-table__inner-wrapper:before{width:100%}.el-table thead{color:var(--el-table-header-text-color)}.el-table thead th{font-weight:600}.el-table thead.is-group th.el-table__cell{background:var(--el-fill-color-light)}.el-table .el-table__cell{box-sizing:border-box;min-width:0;padding:8px 0;position:relative;text-align:left;text-overflow:ellipsis;vertical-align:middle;z-index:var(--el-table-index)}.el-table .el-table__cell.is-center{text-align:center}.el-table .el-table__cell.is-right{text-align:right}.el-table .el-table__cell.gutter{border-bottom-width:0;border-right-width:0;padding:0;width:15px}.el-table .el-table__cell.is-hidden>*{visibility:hidden}.el-table .cell{box-sizing:border-box;line-height:23px;overflow:hidden;overflow-wrap:break-word;padding:0 12px;text-overflow:ellipsis;white-space:normal}.el-table .cell.el-tooltip{min-width:50px;white-space:nowrap}.el-table--large{font-size:var(--el-font-size-base)}.el-table--large .el-table__cell{padding:12px 0}.el-table--large .cell{padding:0 16px}.el-table--default{font-size:14px}.el-table--default .el-table__cell{padding:8px 0}.el-table--default .cell{padding:0 12px}.el-table--small{font-size:12px}.el-table--small .el-table__cell{padding:4px 0}.el-table--small .cell{padding:0 8px}.el-table tr{background-color:var(--el-table-tr-bg-color)}.el-table tr input[type=checkbox]{margin:0}.el-table td.el-table__cell,.el-table th.el-table__cell.is-leaf{border-bottom:var(--el-table-border)}.el-table th.el-table__cell.is-sortable{cursor:pointer}.el-table th.el-table__cell{background-color:var(--el-table-header-bg-color)}.el-table th.el-table__cell>.cell.highlight{color:var(--el-color-primary)}.el-table th.el-table__cell.required>div:before{background:#ff4d51;border-radius:50%;content:"";display:inline-block;height:8px;margin-right:5px;vertical-align:middle;width:8px}.el-table td.el-table__cell div{box-sizing:border-box}.el-table td.el-table__cell.gutter{width:0}.el-table--border .el-table__inner-wrapper:after,.el-table--border:after,.el-table--border:before,.el-table__inner-wrapper:before{background-color:var(--el-table-border-color);content:"";position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table--border .el-table__inner-wrapper:after{height:1px;left:0;top:0;width:100%;z-index:calc(var(--el-table-index) + 2)}.el-table--border:before{height:100%;left:0;top:-1px;width:1px}.el-table--border:after{height:100%;right:0;top:-1px;width:1px}.el-table--border .el-table__inner-wrapper{border-bottom:none;border-right:none}.el-table--border .el-table__footer-wrapper{flex-shrink:0;position:relative}.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table--border th.el-table__cell.gutter:last-of-type{border-bottom:var(--el-table-border);border-bottom-width:1px}.el-table--border th.el-table__cell{border-bottom:var(--el-table-border)}.el-table--hidden{visibility:hidden}.el-table__body-wrapper,.el-table__footer-wrapper,.el-table__header-wrapper{width:100%}.el-table__body-wrapper tr td.el-table-fixed-column--left,.el-table__body-wrapper tr td.el-table-fixed-column--right,.el-table__body-wrapper tr th.el-table-fixed-column--left,.el-table__body-wrapper tr th.el-table-fixed-column--right,.el-table__footer-wrapper tr td.el-table-fixed-column--left,.el-table__footer-wrapper tr td.el-table-fixed-column--right,.el-table__footer-wrapper tr th.el-table-fixed-column--left,.el-table__footer-wrapper tr th.el-table-fixed-column--right,.el-table__header-wrapper tr td.el-table-fixed-column--left,.el-table__header-wrapper tr td.el-table-fixed-column--right,.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background:inherit;position:-webkit-sticky!important;position:sticky!important;z-index:calc(var(--el-table-index) + 1)}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{bottom:-1px;box-shadow:none;content:"";overflow-x:hidden;overflow-y:hidden;pointer-events:none;position:absolute;top:0;touch-action:none;width:10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before{left:-10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{box-shadow:none;right:-10px}.el-table__body-wrapper tr td.el-table__fixed-right-patch,.el-table__body-wrapper tr th.el-table__fixed-right-patch,.el-table__footer-wrapper tr td.el-table__fixed-right-patch,.el-table__footer-wrapper tr th.el-table__fixed-right-patch,.el-table__header-wrapper tr td.el-table__fixed-right-patch,.el-table__header-wrapper tr th.el-table__fixed-right-patch{background:#fff;position:-webkit-sticky!important;position:sticky!important;right:0;z-index:calc(var(--el-table-index) + 1)}.el-table__header-wrapper{flex-shrink:0}.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body,.el-table__footer,.el-table__header{border-collapse:separate;table-layout:fixed}.el-table__header-wrapper{overflow:hidden}.el-table__header-wrapper tbody td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__footer-wrapper{flex-shrink:0;overflow:hidden}.el-table__footer-wrapper tfoot td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__body-wrapper .el-table-column--selection>.cell,.el-table__header-wrapper .el-table-column--selection>.cell{align-items:center;display:inline-flex;height:23px}.el-table__body-wrapper .el-table-column--selection .el-checkbox,.el-table__header-wrapper .el-table-column--selection .el-checkbox{height:unset}.el-table.is-scrolling-left .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:var(--el-table-border)}.el-table.is-scrolling-left th.el-table-fixed-column--left{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-right th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-middle .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-none .el-table-fixed-column--left.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--left.is-last-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-last-column:before{box-shadow:none}.el-table.is-scrolling-none th.el-table-fixed-column--left,.el-table.is-scrolling-none th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body-wrapper{flex:1;overflow:hidden;position:relative}.el-table__body-wrapper .el-scrollbar__bar{z-index:calc(var(--el-table-index) + 2)}.el-table .caret-wrapper{align-items:center;cursor:pointer;display:inline-flex;flex-direction:column;height:14px;overflow:initial;position:relative;vertical-align:middle;width:24px}.el-table .sort-caret{border:5px solid transparent;height:0;left:7px;position:absolute;width:0}.el-table .sort-caret.ascending{border-bottom-color:var(--el-text-color-placeholder);top:-5px}.el-table .sort-caret.descending{border-top-color:var(--el-text-color-placeholder);bottom:-3px}.el-table .ascending .sort-caret.ascending{border-bottom-color:var(--el-color-primary)}.el-table .descending .sort-caret.descending{border-top-color:var(--el-color-primary)}.el-table .hidden-columns{position:absolute;visibility:hidden;z-index:-1}.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{background:var(--el-fill-color-lighter)}.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table__body tr.hover-row.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,.el-table__body tr.hover-row>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr>td.hover-cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr.current-row>td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table.el-table--scrollable-y .el-table__body-header{position:-webkit-sticky;position:sticky;top:0;z-index:calc(var(--el-table-index) + 2)}.el-table.el-table--scrollable-y .el-table__body-footer{bottom:0;position:-webkit-sticky;position:sticky;z-index:calc(var(--el-table-index) + 2)}.el-table__column-resize-proxy{border-left:var(--el-table-border);bottom:0;left:200px;position:absolute;top:0;width:0;z-index:calc(var(--el-table-index) + 9)}.el-table__column-filter-trigger{cursor:pointer;display:inline-block}.el-table__column-filter-trigger i{color:var(--el-color-info);font-size:14px;vertical-align:middle}.el-table__border-left-patch{height:100%;top:0;width:1px}.el-table__border-bottom-patch,.el-table__border-left-patch{background-color:var(--el-table-border-color);left:0;position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table__border-bottom-patch{height:1px}.el-table__border-right-patch{background-color:var(--el-table-border-color);height:100%;position:absolute;top:0;width:1px;z-index:calc(var(--el-table-index) + 2)}.el-table--enable-row-transition .el-table__body td.el-table__cell{transition:background-color .25s ease}.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table [class*=el-table__row--level] .el-table__expand-icon{display:inline-block;height:12px;line-height:12px;margin-right:8px;text-align:center;width:12px}.el-table .el-table.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table:not(.el-table--border) .el-table__cell{border-right:none}.el-table:not(.el-table--border)>.el-table__inner-wrapper:after{content:none}.el-table-v2{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-bg-color);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-bg-color);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px rgba(0,0,0,.15);--el-table-fixed-right-column:inset -10px 0 10px -10px rgba(0,0,0,.15);--el-table-index:var(--el-index-normal);font-size:14px}.el-table-v2 *{box-sizing:border-box}.el-table-v2__root{position:relative}.el-table-v2__root:hover .el-table-v2__main .el-virtual-scrollbar{opacity:1}.el-table-v2__main{background-color:var(--el-bg-color);display:flex;flex-direction:column-reverse;left:0;overflow:hidden;position:absolute;top:0}.el-table-v2__main .el-vl__horizontal,.el-table-v2__main .el-vl__vertical{z-index:2}.el-table-v2__left{background-color:var(--el-bg-color);box-shadow:2px 0 4px #0000000f;display:flex;flex-direction:column-reverse;left:0;overflow:hidden;position:absolute;top:0}.el-table-v2__left .el-virtual-scrollbar{opacity:0}.el-table-v2__left .el-vl__horizontal,.el-table-v2__left .el-vl__vertical{z-index:-1}.el-table-v2__right{background-color:var(--el-bg-color);box-shadow:-2px 0 4px #0000000f;display:flex;flex-direction:column-reverse;overflow:hidden;position:absolute;right:0;top:0}.el-table-v2__right .el-virtual-scrollbar{opacity:0}.el-table-v2__right .el-vl__horizontal,.el-table-v2__right .el-vl__vertical{z-index:-1}.el-table-v2__header-row,.el-table-v2__row{-webkit-padding-end:var(--el-table-scrollbar-size);padding-inline-end:var(--el-table-scrollbar-size)}.el-table-v2__header-wrapper{overflow:hidden}.el-table-v2__header{overflow:hidden;position:relative}.el-table-v2__footer{bottom:0;overflow:hidden;right:0}.el-table-v2__empty,.el-table-v2__footer,.el-table-v2__overlay{left:0;position:absolute}.el-table-v2__overlay{bottom:0;right:0;top:0;z-index:9999}.el-table-v2__header-row{border-bottom:var(--el-table-border);display:flex}.el-table-v2__header-cell{align-items:center;background-color:var(--el-table-header-bg-color);color:var(--el-table-header-text-color);display:flex;font-weight:700;height:100%;overflow:hidden;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table-v2__header-cell.is-align-center{justify-content:center;text-align:center}.el-table-v2__header-cell.is-align-right{justify-content:flex-end;text-align:right}.el-table-v2__header-cell.is-sortable{cursor:pointer}.el-table-v2__header-cell:hover .el-icon{display:block}.el-table-v2__sort-icon{display:none;opacity:.6;transition:opacity,display var(--el-transition-duration)}.el-table-v2__sort-icon.is-sorting{display:block;opacity:1}.el-table-v2__row{align-items:center;border-bottom:var(--el-table-border);display:flex;transition:background-color var(--el-transition-duration)}.el-table-v2__row.is-hovered,.el-table-v2__row:hover{background-color:var(--el-table-row-hover-bg-color)}.el-table-v2__row-cell{align-items:center;display:flex;height:100%;overflow:hidden;padding:0 8px}.el-table-v2__row-cell.is-align-center{justify-content:center;text-align:center}.el-table-v2__row-cell.is-align-right{justify-content:flex-end;text-align:right}.el-table-v2__expand-icon{cursor:pointer;margin:0 4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table-v2__expand-icon svg{transition:transform var(--el-transition-duration)}.el-table-v2__expand-icon.is-expanded svg{transform:rotate(90deg)}.el-table-v2:not(.is-dynamic) .el-table-v2__cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-table-v2.is-dynamic .el-table-v2__row{align-items:stretch;overflow:hidden}.el-table-v2.is-dynamic .el-table-v2__row .el-table-v2__row-cell{overflow-wrap:break-word}.el-tabs{--el-tabs-header-height:40px}.el-tabs__header{margin:0 0 15px;padding:0;position:relative}.el-tabs__active-bar{background-color:var(--el-color-primary);bottom:0;height:2px;left:0;list-style:none;position:absolute;transition:width var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),transform var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);z-index:1}.el-tabs__new-tab{align-items:center;border:1px solid var(--el-border-color);border-radius:3px;color:var(--el-text-color-primary);cursor:pointer;display:flex;float:right;font-size:12px;height:20px;justify-content:center;line-height:20px;margin:10px 0 10px 10px;text-align:center;transition:all .15s;width:20px}.el-tabs__new-tab .is-icon-plus{height:inherit;transform:scale(.8);width:inherit}.el-tabs__new-tab .is-icon-plus svg{vertical-align:middle}.el-tabs__new-tab:hover{color:var(--el-color-primary)}.el-tabs__nav-wrap{margin-bottom:-1px;overflow:hidden;position:relative}.el-tabs__nav-wrap:after{background-color:var(--el-border-color-light);bottom:0;content:"";height:2px;left:0;position:absolute;width:100%;z-index:var(--el-index-normal)}.el-tabs__nav-wrap.is-scrollable{box-sizing:border-box;padding:0 20px}.el-tabs__nav-scroll{overflow:hidden}.el-tabs__nav-next,.el-tabs__nav-prev{color:var(--el-text-color-secondary);cursor:pointer;font-size:12px;line-height:44px;position:absolute;text-align:center;width:20px}.el-tabs__nav-next{right:0}.el-tabs__nav-prev{left:0}.el-tabs__nav{display:flex;float:left;position:relative;transition:transform var(--el-transition-duration);white-space:nowrap;z-index:calc(var(--el-index-normal) + 1)}.el-tabs__nav.is-stretch{display:flex;min-width:100%}.el-tabs__nav.is-stretch>*{flex:1;text-align:center}.el-tabs__item{align-items:center;box-sizing:border-box;color:var(--el-text-color-primary);display:flex;font-size:var(--el-font-size-base);font-weight:500;height:var(--el-tabs-header-height);justify-content:center;list-style:none;padding:0 20px;position:relative}.el-tabs__item:focus,.el-tabs__item:focus:active{outline:none}.el-tabs__item:focus-visible{border-radius:3px;box-shadow:0 0 2px 2px var(--el-color-primary) inset}.el-tabs__item .is-icon-close{border-radius:50%;margin-left:5px;text-align:center;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs__item .is-icon-close:before{display:inline-block;transform:scale(.9)}.el-tabs__item .is-icon-close:hover{background-color:var(--el-text-color-placeholder);color:#fff}.el-tabs__item.is-active{color:var(--el-color-primary)}.el-tabs__item:hover{color:var(--el-color-primary);cursor:pointer}.el-tabs__item.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-tabs__content{overflow:hidden;position:relative}.el-tabs--card>.el-tabs__header{border-bottom:1px solid var(--el-border-color-light);height:var(--el-tabs-header-height)}.el-tabs--card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--card>.el-tabs__header .el-tabs__nav{border:1px solid var(--el-border-color-light);border-bottom:none;border-radius:4px 4px 0 0;box-sizing:border-box}.el-tabs--card>.el-tabs__header .el-tabs__active-bar{display:none}.el-tabs--card>.el-tabs__header .el-tabs__item .is-icon-close{font-size:12px;height:14px;overflow:hidden;position:relative;right:-2px;transform-origin:100% 50%;width:0}.el-tabs--card>.el-tabs__header .el-tabs__item{border-bottom:1px solid transparent;border-left:1px solid var(--el-border-color-light);transition:color var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),padding var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs--card>.el-tabs__header .el-tabs__item:first-child{border-left:none}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover{padding-left:13px;padding-right:13px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover .is-icon-close{width:14px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active{border-bottom-color:var(--el-bg-color)}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable{padding-left:20px;padding-right:20px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable .is-icon-close{width:14px}.el-tabs--border-card{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color)}.el-tabs--border-card>.el-tabs__content{padding:15px}.el-tabs--border-card>.el-tabs__header{background-color:var(--el-fill-color-light);border-bottom:1px solid var(--el-border-color-light);margin:0}.el-tabs--border-card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--border-card>.el-tabs__header .el-tabs__item{border:1px solid transparent;color:var(--el-text-color-secondary);margin-top:-1px;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:first-child{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item+.el-tabs__item{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{background-color:var(--el-bg-color-overlay);border-left-color:var(--el-border-color);border-right-color:var(--el-border-color);color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover{color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-disabled{color:var(--el-disabled-text-color)}.el-tabs--border-card>.el-tabs__header .is-scrollable .el-tabs__item:first-child{margin-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),.el-tabs--bottom .el-tabs__item.is-top:nth-child(2),.el-tabs--top .el-tabs__item.is-bottom:nth-child(2),.el-tabs--top .el-tabs__item.is-top:nth-child(2){padding-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:last-child,.el-tabs--bottom .el-tabs__item.is-top:last-child,.el-tabs--top .el-tabs__item.is-bottom:last-child,.el-tabs--top .el-tabs__item.is-top:last-child{padding-right:0}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){padding-left:20px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover{padding-left:13px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child{padding-right:20px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover{padding-right:13px}.el-tabs--bottom .el-tabs__header.is-bottom{margin-bottom:0;margin-top:10px}.el-tabs--bottom.el-tabs--border-card .el-tabs__header.is-bottom{border-bottom:0;border-top:1px solid var(--el-border-color)}.el-tabs--bottom.el-tabs--border-card .el-tabs__nav-wrap.is-bottom{margin-bottom:0;margin-top:-1px}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom:not(.is-active){border:1px solid transparent}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom{margin:0 -1px -1px}.el-tabs--left,.el-tabs--right{overflow:hidden}.el-tabs--left .el-tabs__header.is-left,.el-tabs--left .el-tabs__header.is-right,.el-tabs--left .el-tabs__nav-scroll,.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__header.is-left,.el-tabs--right .el-tabs__header.is-right,.el-tabs--right .el-tabs__nav-scroll,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{height:100%}.el-tabs--left .el-tabs__active-bar.is-left,.el-tabs--left .el-tabs__active-bar.is-right,.el-tabs--right .el-tabs__active-bar.is-left,.el-tabs--right .el-tabs__active-bar.is-right{bottom:auto;height:auto;top:0;width:2px}.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{margin-bottom:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{cursor:pointer;height:30px;line-height:30px;text-align:center;width:100%}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i{transform:rotate(90deg)}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{left:auto;top:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next{bottom:0;right:auto}.el-tabs--left .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--left .el-tabs__nav-wrap.is-right.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-right.is-scrollable{padding:30px 0}.el-tabs--left .el-tabs__nav-wrap.is-left:after,.el-tabs--left .el-tabs__nav-wrap.is-right:after,.el-tabs--right .el-tabs__nav-wrap.is-left:after,.el-tabs--right .el-tabs__nav-wrap.is-right:after{bottom:auto;height:100%;top:0;width:2px}.el-tabs--left .el-tabs__nav.is-left,.el-tabs--left .el-tabs__nav.is-right,.el-tabs--right .el-tabs__nav.is-left,.el-tabs--right .el-tabs__nav.is-right{flex-direction:column}.el-tabs--left .el-tabs__item.is-left,.el-tabs--right .el-tabs__item.is-left{justify-content:flex-end}.el-tabs--left .el-tabs__item.is-right,.el-tabs--right .el-tabs__item.is-right{justify-content:flex-start}.el-tabs--left .el-tabs__header.is-left{float:left;margin-bottom:0;margin-right:10px}.el-tabs--left .el-tabs__nav-wrap.is-left{margin-right:-1px}.el-tabs--left .el-tabs__nav-wrap.is-left:after{left:auto;right:0}.el-tabs--left .el-tabs__active-bar.is-left{left:auto;right:0}.el-tabs--left .el-tabs__item.is-left{text-align:right}.el-tabs--left.el-tabs--card .el-tabs__active-bar.is-left{display:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left{border-bottom:none;border-left:none;border-right:1px solid var(--el-border-color-light);border-top:1px solid var(--el-border-color-light);text-align:left}.el-tabs--left.el-tabs--card .el-tabs__item.is-left:first-child{border-right:1px solid var(--el-border-color-light);border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left:none;border-right:1px solid #fff}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:first-child{border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:last-child{border-bottom:none}.el-tabs--left.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-radius:4px 0 0 4px;border-right:none}.el-tabs--left.el-tabs--card .el-tabs__new-tab{float:none}.el-tabs--left.el-tabs--border-card .el-tabs__header.is-left{border-right:1px solid var(--el-border-color)}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left{border:1px solid transparent;margin:-1px 0 -1px -1px}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left.is-active{border-color:rgb(209,219,229) transparent}.el-tabs--right .el-tabs__header.is-right{float:right;margin-bottom:0;margin-left:10px}.el-tabs--right .el-tabs__nav-wrap.is-right{margin-left:-1px}.el-tabs--right .el-tabs__nav-wrap.is-right:after{left:0;right:auto}.el-tabs--right .el-tabs__active-bar.is-right{left:0}.el-tabs--right.el-tabs--card .el-tabs__active-bar.is-right{display:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right{border-bottom:none;border-top:1px solid var(--el-border-color-light)}.el-tabs--right.el-tabs--card .el-tabs__item.is-right:first-child{border-left:1px solid var(--el-border-color-light);border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left:1px solid #fff;border-right:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:first-child{border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:last-child{border-bottom:none}.el-tabs--right.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-left:none;border-radius:0 4px 4px 0}.el-tabs--right.el-tabs--border-card .el-tabs__header.is-right{border-left:1px solid var(--el-border-color)}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right{border:1px solid transparent;margin:-1px -1px -1px 0}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right.is-active{border-color:rgb(209,219,229) transparent}.slideInLeft-transition,.slideInRight-transition{display:inline-block}.slideInRight-enter{-webkit-animation:slideInRight-enter var(--el-transition-duration);animation:slideInRight-enter var(--el-transition-duration)}.slideInRight-leave{-webkit-animation:slideInRight-leave var(--el-transition-duration);animation:slideInRight-leave var(--el-transition-duration);left:0;position:absolute;right:0}.slideInLeft-enter{-webkit-animation:slideInLeft-enter var(--el-transition-duration);animation:slideInLeft-enter var(--el-transition-duration)}.slideInLeft-leave{-webkit-animation:slideInLeft-leave var(--el-transition-duration);animation:slideInLeft-leave var(--el-transition-duration);left:0;position:absolute;right:0}@-webkit-keyframes slideInRight-enter{0%{opacity:0;transform:translate(100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@keyframes slideInRight-enter{0%{opacity:0;transform:translate(100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@-webkit-keyframes slideInRight-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(100%);transform-origin:0 0}}@keyframes slideInRight-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(100%);transform-origin:0 0}}@-webkit-keyframes slideInLeft-enter{0%{opacity:0;transform:translate(-100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@keyframes slideInLeft-enter{0%{opacity:0;transform:translate(-100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@-webkit-keyframes slideInLeft-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(-100%);transform-origin:0 0}}@keyframes slideInLeft-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(-100%);transform-origin:0 0}}.el-tag{--el-tag-font-size:12px;--el-tag-border-radius:4px;--el-tag-border-radius-rounded:9999px;--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary);align-items:center;background-color:var(--el-tag-bg-color);border-color:var(--el-tag-border-color);border-radius:var(--el-tag-border-radius);border-style:solid;border-width:1px;box-sizing:border-box;color:var(--el-tag-text-color);display:inline-flex;font-size:var(--el-tag-font-size);height:24px;justify-content:center;line-height:1;padding:0 9px;vertical-align:middle;white-space:nowrap;--el-icon-size:14px}.el-tag.el-tag--primary{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-bg-color:var(--el-color-success-light-9);--el-tag-border-color:var(--el-color-success-light-8);--el-tag-hover-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-bg-color:var(--el-color-warning-light-9);--el-tag-border-color:var(--el-color-warning-light-8);--el-tag-hover-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-bg-color:var(--el-color-danger-light-9);--el-tag-border-color:var(--el-color-danger-light-8);--el-tag-hover-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-bg-color:var(--el-color-error-light-9);--el-tag-border-color:var(--el-color-error-light-8);--el-tag-hover-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-bg-color:var(--el-color-info-light-9);--el-tag-border-color:var(--el-color-info-light-8);--el-tag-hover-color:var(--el-color-info)}.el-tag.el-tag--primary{--el-tag-text-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-text-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-text-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-text-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-text-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-text-color:var(--el-color-info)}.el-tag.is-hit{border-color:var(--el-color-primary)}.el-tag.is-round{border-radius:var(--el-tag-border-radius-rounded)}.el-tag .el-tag__close{color:var(--el-tag-text-color);flex-shrink:0}.el-tag .el-tag__close:hover{background-color:var(--el-tag-hover-color);color:var(--el-color-white)}.el-tag .el-icon{border-radius:50%;cursor:pointer;font-size:calc(var(--el-icon-size) - 2px);height:var(--el-icon-size);width:var(--el-icon-size)}.el-tag .el-tag__close{margin-left:6px}.el-tag--dark{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3);--el-tag-text-color:var(--el-color-white)}.el-tag--dark.el-tag--primary{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--success{--el-tag-bg-color:var(--el-color-success);--el-tag-border-color:var(--el-color-success);--el-tag-hover-color:var(--el-color-success-light-3)}.el-tag--dark.el-tag--warning{--el-tag-bg-color:var(--el-color-warning);--el-tag-border-color:var(--el-color-warning);--el-tag-hover-color:var(--el-color-warning-light-3)}.el-tag--dark.el-tag--danger{--el-tag-bg-color:var(--el-color-danger);--el-tag-border-color:var(--el-color-danger);--el-tag-hover-color:var(--el-color-danger-light-3)}.el-tag--dark.el-tag--error{--el-tag-bg-color:var(--el-color-error);--el-tag-border-color:var(--el-color-error);--el-tag-hover-color:var(--el-color-error-light-3)}.el-tag--dark.el-tag--info{--el-tag-bg-color:var(--el-color-info);--el-tag-border-color:var(--el-color-info);--el-tag-hover-color:var(--el-color-info-light-3)}.el-tag--dark.el-tag--danger,.el-tag--dark.el-tag--error,.el-tag--dark.el-tag--info,.el-tag--dark.el-tag--primary,.el-tag--dark.el-tag--success,.el-tag--dark.el-tag--warning{--el-tag-text-color:var(--el-color-white)}.el-tag--plain{--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary);--el-tag-bg-color:var(--el-fill-color-blank)}.el-tag--plain.el-tag--primary{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary)}.el-tag--plain.el-tag--success{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-success-light-5);--el-tag-hover-color:var(--el-color-success)}.el-tag--plain.el-tag--warning{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-warning-light-5);--el-tag-hover-color:var(--el-color-warning)}.el-tag--plain.el-tag--danger{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-danger-light-5);--el-tag-hover-color:var(--el-color-danger)}.el-tag--plain.el-tag--error{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-error-light-5);--el-tag-hover-color:var(--el-color-error)}.el-tag--plain.el-tag--info{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-info-light-5);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-closable{padding-right:5px}.el-tag--large{height:32px;padding:0 11px;--el-icon-size:16px}.el-tag--large .el-tag__close{margin-left:8px}.el-tag--large.is-closable{padding-right:7px}.el-tag--small{height:20px;padding:0 7px;--el-icon-size:12px}.el-tag--small .el-tag__close{margin-left:4px}.el-tag--small.is-closable{padding-right:3px}.el-tag--small .el-icon-close{transform:scale(.8)}.el-tag.el-tag--primary.is-hit{border-color:var(--el-color-primary)}.el-tag.el-tag--success.is-hit{border-color:var(--el-color-success)}.el-tag.el-tag--warning.is-hit{border-color:var(--el-color-warning)}.el-tag.el-tag--danger.is-hit{border-color:var(--el-color-danger)}.el-tag.el-tag--error.is-hit{border-color:var(--el-color-error)}.el-tag.el-tag--info.is-hit{border-color:var(--el-color-info)}.el-text{--el-text-font-size:var(--el-font-size-base);--el-text-color:var(--el-text-color-regular);align-self:center;color:var(--el-text-color);font-size:var(--el-text-font-size);margin:0;overflow-wrap:break-word;padding:0}.el-text.is-truncated{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-text.is-line-clamp{display:-webkit-inline-box;-webkit-box-orient:vertical;overflow:hidden}.el-text--large{--el-text-font-size:var(--el-font-size-medium)}.el-text--default{--el-text-font-size:var(--el-font-size-base)}.el-text--small{--el-text-font-size:var(--el-font-size-extra-small)}.el-text.el-text--primary{--el-text-color:var(--el-color-primary)}.el-text.el-text--success{--el-text-color:var(--el-color-success)}.el-text.el-text--warning{--el-text-color:var(--el-color-warning)}.el-text.el-text--danger{--el-text-color:var(--el-color-danger)}.el-text.el-text--error{--el-text-color:var(--el-color-error)}.el-text.el-text--info{--el-text-color:var(--el-color-info)}.el-text>.el-icon{vertical-align:-2px}.time-select{margin:5px 0;min-width:0}.time-select .el-picker-panel__content{margin:0;max-height:200px}.time-select-item{font-size:14px;line-height:20px;padding:8px 10px}.time-select-item.disabled{color:var(--el-datepicker-border-color);cursor:not-allowed}.time-select-item:hover{background-color:var(--el-fill-color-light);cursor:pointer;font-weight:700}.time-select .time-select-item.selected:not(.disabled){color:var(--el-color-primary);font-weight:700}.el-timeline-item{padding-bottom:20px;position:relative}.el-timeline-item__wrapper{padding-left:28px;position:relative;top:-3px}.el-timeline-item__tail{border-left:2px solid var(--el-timeline-node-color);height:100%;left:4px;position:absolute}.el-timeline-item .el-timeline-item__icon{color:var(--el-color-white);font-size:var(--el-font-size-small)}.el-timeline-item__node{align-items:center;background-color:var(--el-timeline-node-color);border-color:var(--el-timeline-node-color);border-radius:50%;box-sizing:border-box;display:flex;justify-content:center;position:absolute}.el-timeline-item__node--normal{height:var(--el-timeline-node-size-normal);left:-1px;width:var(--el-timeline-node-size-normal)}.el-timeline-item__node--large{height:var(--el-timeline-node-size-large);left:-2px;width:var(--el-timeline-node-size-large)}.el-timeline-item__node.is-hollow{background:var(--el-color-white);border-style:solid;border-width:2px}.el-timeline-item__node--primary{background-color:var(--el-color-primary);border-color:var(--el-color-primary)}.el-timeline-item__node--success{background-color:var(--el-color-success);border-color:var(--el-color-success)}.el-timeline-item__node--warning{background-color:var(--el-color-warning);border-color:var(--el-color-warning)}.el-timeline-item__node--danger{background-color:var(--el-color-danger);border-color:var(--el-color-danger)}.el-timeline-item__node--info{background-color:var(--el-color-info);border-color:var(--el-color-info)}.el-timeline-item__dot{align-items:center;display:flex;justify-content:center;position:absolute}.el-timeline-item__content{color:var(--el-text-color-primary)}.el-timeline-item__timestamp{color:var(--el-text-color-secondary);font-size:var(--el-font-size-small);line-height:1}.el-timeline-item__timestamp.is-top{margin-bottom:8px;padding-top:4px}.el-timeline-item__timestamp.is-bottom{margin-top:8px}.el-timeline{--el-timeline-node-size-normal:12px;--el-timeline-node-size-large:14px;--el-timeline-node-color:var(--el-border-color-light);font-size:var(--el-font-size-base);list-style:none;margin:0}.el-timeline .el-timeline-item:last-child .el-timeline-item__tail{display:none}.el-timeline .el-timeline-item__center{align-items:center;display:flex}.el-timeline .el-timeline-item__center .el-timeline-item__wrapper{width:100%}.el-timeline .el-timeline-item__center .el-timeline-item__tail{top:0}.el-timeline .el-timeline-item__center:first-child .el-timeline-item__tail{height:calc(50% + 10px);top:calc(50% - 10px)}.el-timeline .el-timeline-item__center:last-child .el-timeline-item__tail{display:block;height:calc(50% - 10px)}.el-tooltip-v2__content{--el-tooltip-v2-padding:5px 10px;--el-tooltip-v2-border-radius:4px;--el-tooltip-v2-border-color:var(--el-border-color);background-color:var(--el-color-white);border:1px solid var(--el-border-color);border-radius:var(--el-tooltip-v2-border-radius);color:var(--el-color-black);padding:var(--el-tooltip-v2-padding)}.el-tooltip-v2__arrow{color:var(--el-color-white);height:var(--el-tooltip-v2-arrow-height);left:var(--el-tooltip-v2-arrow-x);pointer-events:none;position:absolute;top:var(--el-tooltip-v2-arrow-y);width:var(--el-tooltip-v2-arrow-width)}.el-tooltip-v2__arrow:before{border:var(--el-tooltip-v2-arrow-border-width) solid transparent;content:"";height:0;position:absolute;width:0}.el-tooltip-v2__arrow:after{border:var(--el-tooltip-v2-arrow-border-width) solid transparent;content:"";height:0;position:absolute;width:0}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow{bottom:0}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow:before{border-bottom:0;border-top-color:var(--el-color-white);border-top-width:var(--el-tooltip-v2-arrow-border-width);top:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow:after{border-bottom:0;border-top-color:var(--el-border-color);border-top-width:var(--el-tooltip-v2-arrow-border-width);top:100%;z-index:-1}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow{top:0}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow:before{border-bottom-color:var(--el-color-white);border-bottom-width:var(--el-tooltip-v2-arrow-border-width);border-top:0;bottom:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow:after{border-bottom-color:var(--el-border-color);border-bottom-width:var(--el-tooltip-v2-arrow-border-width);border-top:0;bottom:100%;z-index:-1}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow{right:0}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow:before{border-left-color:var(--el-color-white);border-left-width:var(--el-tooltip-v2-arrow-border-width);border-right:0;left:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow:after{border-left-color:var(--el-border-color);border-left-width:var(--el-tooltip-v2-arrow-border-width);border-right:0;left:100%;z-index:-1}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow{left:0}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow:before{border-left:0;border-right-color:var(--el-color-white);border-right-width:var(--el-tooltip-v2-arrow-border-width);right:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow:after{border-left:0;border-right-color:var(--el-border-color);border-right-width:var(--el-tooltip-v2-arrow-border-width);right:100%;z-index:-1}.el-tooltip-v2__content.is-dark{--el-tooltip-v2-border-color:transparent;color:var(--el-color-white)}.el-tooltip-v2__content.is-dark,.el-tooltip-v2__content.is-dark .el-tooltip-v2__arrow{background-color:var(--el-color-black);border-color:transparent}.el-transfer{--el-transfer-border-color:var(--el-border-color-lighter);--el-transfer-border-radius:var(--el-border-radius-base);--el-transfer-panel-width:200px;--el-transfer-panel-header-height:40px;--el-transfer-panel-header-bg-color:var(--el-fill-color-light);--el-transfer-panel-footer-height:40px;--el-transfer-panel-body-height:278px;--el-transfer-item-height:30px;--el-transfer-filter-height:32px;font-size:var(--el-font-size-base)}.el-transfer__buttons{display:inline-block;padding:0 30px;vertical-align:middle}.el-transfer__button{vertical-align:top}.el-transfer__button:nth-child(2){margin:0 0 0 10px}.el-transfer__button i,.el-transfer__button span{font-size:14px}.el-transfer__button .el-icon+span{margin-left:0}.el-transfer-panel{background:var(--el-bg-color-overlay);box-sizing:border-box;display:inline-block;max-height:100%;overflow:hidden;position:relative;text-align:left;vertical-align:middle;width:var(--el-transfer-panel-width)}.el-transfer-panel__body{border-bottom:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);border-left:1px solid var(--el-transfer-border-color);border-right:1px solid var(--el-transfer-border-color);height:var(--el-transfer-panel-body-height);overflow:hidden}.el-transfer-panel__body.is-with-footer{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.el-transfer-panel__list{box-sizing:border-box;height:var(--el-transfer-panel-body-height);list-style:none;margin:0;overflow:auto;padding:6px 0}.el-transfer-panel__list.is-filterable{height:calc(100% - var(--el-transfer-filter-height) - 30px);padding-top:0}.el-transfer-panel__item{display:block!important;height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);padding-left:15px}.el-transfer-panel__item+.el-transfer-panel__item{margin-left:0}.el-transfer-panel__item.el-checkbox{color:var(--el-text-color-regular)}.el-transfer-panel__item:hover{color:var(--el-color-primary)}.el-transfer-panel__item.el-checkbox .el-checkbox__label{box-sizing:border-box;display:block;line-height:var(--el-transfer-item-height);overflow:hidden;padding-left:22px;text-overflow:ellipsis;white-space:nowrap;width:100%}.el-transfer-panel__item .el-checkbox__input{position:absolute;top:8px}.el-transfer-panel__filter{box-sizing:border-box;padding:15px;text-align:center}.el-transfer-panel__filter .el-input__inner{border-radius:calc(var(--el-transfer-filter-height)/2);box-sizing:border-box;display:inline-block;font-size:12px;height:var(--el-transfer-filter-height);width:100%}.el-transfer-panel__filter .el-icon-circle-close{cursor:pointer}.el-transfer-panel .el-transfer-panel__header{align-items:center;background:var(--el-transfer-panel-header-bg-color);border:1px solid var(--el-transfer-border-color);border-top-left-radius:var(--el-transfer-border-radius);border-top-right-radius:var(--el-transfer-border-radius);box-sizing:border-box;color:var(--el-color-black);display:flex;height:var(--el-transfer-panel-header-height);margin:0;padding-left:15px}.el-transfer-panel .el-transfer-panel__header .el-checkbox{align-items:center;display:flex;position:relative;width:100%}.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label{color:var(--el-text-color-primary);font-size:16px;font-weight:400}.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span{color:var(--el-text-color-secondary);font-size:12px;font-weight:400;position:absolute;right:15px;top:50%;transform:translate3d(0,-50%,0)}.el-transfer-panel .el-transfer-panel__footer{background:var(--el-bg-color-overlay);border:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);height:var(--el-transfer-panel-footer-height);margin:0;padding:0}.el-transfer-panel .el-transfer-panel__footer:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-transfer-panel .el-transfer-panel__footer .el-checkbox{color:var(--el-text-color-regular);padding-left:20px}.el-transfer-panel .el-transfer-panel__empty{color:var(--el-text-color-secondary);height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);margin:0;padding:6px 15px 0;text-align:center}.el-transfer-panel .el-checkbox__label{padding-left:8px}.el-transfer-panel .el-checkbox__inner{border-radius:3px;height:14px;width:14px}.el-transfer-panel .el-checkbox__inner:after{height:6px;left:4px;width:3px}.el-tree{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder);background:var(--el-fill-color-blank);color:var(--el-tree-text-color);cursor:default;font-size:var(--el-font-size-base);position:relative}.el-tree__empty-block{height:100%;min-height:60px;position:relative;text-align:center;width:100%}.el-tree__empty-text{color:var(--el-text-color-secondary);font-size:var(--el-font-size-base);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.el-tree__drop-indicator{background-color:var(--el-color-primary);height:1px;left:0;position:absolute;right:0}.el-tree-node{outline:none;white-space:nowrap}.el-tree-node:focus>.el-tree-node__content{background-color:var(--el-tree-node-hover-bg-color)}.el-tree-node.is-drop-inner>.el-tree-node__content .el-tree-node__label{background-color:var(--el-color-primary);color:#fff}.el-tree-node__content{--el-checkbox-height:var(--el-tree-node-content-height);align-items:center;cursor:pointer;display:flex;height:var(--el-tree-node-content-height)}.el-tree-node__content>.el-tree-node__expand-icon{box-sizing:content-box;padding:6px}.el-tree-node__content>label.el-checkbox{margin-right:8px}.el-tree-node__content:hover{background-color:var(--el-tree-node-hover-bg-color)}.el-tree.is-dragging .el-tree-node__content{cursor:move}.el-tree.is-dragging .el-tree-node__content *{pointer-events:none}.el-tree.is-dragging.is-drop-not-allow .el-tree-node__content{cursor:not-allowed}.el-tree-node__expand-icon{color:var(--el-tree-expand-icon-color);cursor:pointer;font-size:12px;transform:rotate(0);transition:transform var(--el-transition-duration) ease-in-out}.el-tree-node__expand-icon.expanded{transform:rotate(90deg)}.el-tree-node__expand-icon.is-leaf{color:transparent;cursor:default;visibility:hidden}.el-tree-node__expand-icon.is-hidden{visibility:hidden}.el-tree-node__loading-icon{color:var(--el-tree-expand-icon-color);font-size:var(--el-font-size-base);margin-right:8px}.el-tree-node>.el-tree-node__children{background-color:transparent;overflow:hidden}.el-tree-node.is-expanded>.el-tree-node__children{display:block}.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:var(--el-color-primary-light-9)}.el-tree-select{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder)}.el-tree-select__popper .el-tree-node__expand-icon{margin-left:8px}.el-tree-select__popper .el-tree-node.is-checked>.el-tree-node__content .el-select-dropdown__item.selected:after{content:none}.el-tree-select__popper .el-select-dropdown__list>.el-select-dropdown__item{padding-left:32px}.el-tree-select__popper .el-select-dropdown__item{background:transparent!important;flex:1;height:20px;line-height:20px;padding-left:0}.el-upload{--el-upload-dragger-padding-horizontal:40px;--el-upload-dragger-padding-vertical:10px;align-items:center;cursor:pointer;display:inline-flex;justify-content:center;outline:none}.el-upload__input{display:none}.el-upload__tip{color:var(--el-text-color-regular);font-size:12px;margin-top:7px}.el-upload iframe{filter:alpha(opacity=0);left:0;opacity:0;position:absolute;top:0;z-index:-1}.el-upload--picture-card{--el-upload-picture-card-size:148px;align-items:center;background-color:var(--el-fill-color-lighter);border:1px dashed var(--el-border-color-darker);border-radius:6px;box-sizing:border-box;cursor:pointer;display:inline-flex;height:var(--el-upload-picture-card-size);justify-content:center;vertical-align:top;width:var(--el-upload-picture-card-size)}.el-upload--picture-card>i{color:var(--el-text-color-secondary);font-size:28px}.el-upload--picture-card:hover{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload.is-drag{display:block}.el-upload:focus{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload:focus .el-upload-dragger{border-color:var(--el-color-primary)}.el-upload-dragger{background-color:var(--el-fill-color-blank);border:1px dashed var(--el-border-color);border-radius:6px;box-sizing:border-box;cursor:pointer;overflow:hidden;padding:var(--el-upload-dragger-padding-horizontal) var(--el-upload-dragger-padding-vertical);position:relative;text-align:center}.el-upload-dragger .el-icon--upload{color:var(--el-text-color-placeholder);font-size:67px;line-height:50px;margin-bottom:16px}.el-upload-dragger+.el-upload__tip{text-align:center}.el-upload-dragger~.el-upload__files{border-top:var(--el-border);margin-top:7px;padding-top:5px}.el-upload-dragger .el-upload__text{color:var(--el-text-color-regular);font-size:14px;text-align:center}.el-upload-dragger .el-upload__text em{color:var(--el-color-primary);font-style:normal}.el-upload-dragger:hover{border-color:var(--el-color-primary)}.el-upload-dragger.is-dragover{background-color:var(--el-color-primary-light-9);border:2px dashed var(--el-color-primary);padding:calc(var(--el-upload-dragger-padding-horizontal) - 1px) calc(var(--el-upload-dragger-padding-vertical) - 1px)}.el-upload-list{list-style:none;margin:10px 0 0;padding:0;position:relative}.el-upload-list__item{border-radius:4px;box-sizing:border-box;color:var(--el-text-color-regular);font-size:14px;margin-bottom:5px;position:relative;transition:all .5s cubic-bezier(.55,0,.1,1);width:100%}.el-upload-list__item .el-progress{position:absolute;top:20px;width:100%}.el-upload-list__item .el-progress__text{position:absolute;right:0;top:-13px}.el-upload-list__item .el-progress-bar{margin-right:0;padding-right:0}.el-upload-list__item .el-icon--upload-success{color:var(--el-color-success)}.el-upload-list__item .el-icon--close{color:var(--el-text-color-regular);cursor:pointer;display:none;opacity:.75;position:absolute;right:5px;top:50%;transform:translateY(-50%);transition:opacity var(--el-transition-duration)}.el-upload-list__item .el-icon--close:hover{color:var(--el-color-primary);opacity:1}.el-upload-list__item .el-icon--close-tip{color:var(--el-color-primary);cursor:pointer;display:none;font-size:12px;font-style:normal;opacity:1;position:absolute;right:5px;top:1px}.el-upload-list__item:hover{background-color:var(--el-fill-color-light)}.el-upload-list__item:hover .el-icon--close{display:inline-flex}.el-upload-list__item:hover .el-progress__text{display:none}.el-upload-list__item .el-upload-list__item-info{display:inline-flex;flex-direction:column;justify-content:center;margin-left:4px;width:calc(100% - 30px)}.el-upload-list__item.is-success .el-upload-list__item-status-label{display:inline-flex}.el-upload-list__item.is-success .el-upload-list__item-name:focus,.el-upload-list__item.is-success .el-upload-list__item-name:hover{color:var(--el-color-primary);cursor:pointer}.el-upload-list__item.is-success:focus:not(:hover) .el-icon--close-tip{display:inline-block}.el-upload-list__item.is-success:active,.el-upload-list__item.is-success:not(.focusing):focus{outline-width:0}.el-upload-list__item.is-success:active .el-icon--close-tip,.el-upload-list__item.is-success:not(.focusing):focus .el-icon--close-tip{display:none}.el-upload-list__item.is-success:focus .el-upload-list__item-status-label,.el-upload-list__item.is-success:hover .el-upload-list__item-status-label{display:none;opacity:0}.el-upload-list__item-name{align-items:center;color:var(--el-text-color-regular);display:inline-flex;font-size:var(--el-font-size-base);padding:0 4px;text-align:center;transition:color var(--el-transition-duration)}.el-upload-list__item-name .el-icon{color:var(--el-text-color-secondary);margin-right:6px}.el-upload-list__item-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-upload-list__item-status-label{align-items:center;display:none;height:100%;justify-content:center;line-height:inherit;position:absolute;right:5px;top:0;transition:opacity var(--el-transition-duration)}.el-upload-list__item-delete{color:var(--el-text-color-regular);display:none;font-size:12px;position:absolute;right:10px;top:0}.el-upload-list__item-delete:hover{color:var(--el-color-primary)}.el-upload-list--picture-card{--el-upload-list-picture-card-size:148px;display:inline-flex;flex-wrap:wrap;margin:0}.el-upload-list--picture-card .el-upload-list__item{background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);border-radius:6px;box-sizing:border-box;display:inline-flex;height:var(--el-upload-list-picture-card-size);margin:0 8px 8px 0;overflow:hidden;padding:0;width:var(--el-upload-list-picture-card-size)}.el-upload-list--picture-card .el-upload-list__item .el-icon--check,.el-upload-list--picture-card .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture-card .el-upload-list__item .el-icon--close{display:none}.el-upload-list--picture-card .el-upload-list__item:hover .el-upload-list__item-status-label{display:block;opacity:0}.el-upload-list--picture-card .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture-card .el-upload-list__item .el-upload-list__item-name{display:none}.el-upload-list--picture-card .el-upload-list__item-thumbnail{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.el-upload-list--picture-card .el-upload-list__item-status-label{background:var(--el-color-success);height:24px;right:-15px;text-align:center;top:-6px;transform:rotate(45deg);width:40px}.el-upload-list--picture-card .el-upload-list__item-status-label i{font-size:12px;margin-top:11px;transform:rotate(-45deg)}.el-upload-list--picture-card .el-upload-list__item-actions{align-items:center;background-color:var(--el-overlay-color-lighter);color:#fff;cursor:default;display:inline-flex;font-size:20px;height:100%;justify-content:center;left:0;opacity:0;position:absolute;top:0;transition:opacity var(--el-transition-duration);width:100%}.el-upload-list--picture-card .el-upload-list__item-actions span{cursor:pointer;display:none}.el-upload-list--picture-card .el-upload-list__item-actions span+span{margin-left:1rem}.el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete{color:inherit;font-size:inherit;position:static}.el-upload-list--picture-card .el-upload-list__item-actions:hover{opacity:1}.el-upload-list--picture-card .el-upload-list__item-actions:hover span{display:inline-flex}.el-upload-list--picture-card .el-progress{bottom:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:126px}.el-upload-list--picture-card .el-progress .el-progress__text{top:50%}.el-upload-list--picture .el-upload-list__item{align-items:center;background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);border-radius:6px;box-sizing:border-box;display:flex;margin-top:10px;overflow:hidden;padding:10px;z-index:0}.el-upload-list--picture .el-upload-list__item .el-icon--check,.el-upload-list--picture .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture .el-upload-list__item:hover .el-upload-list__item-status-label{display:inline-flex;opacity:0}.el-upload-list--picture .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name i{display:none}.el-upload-list--picture .el-upload-list__item .el-icon--close{top:5px;transform:translateY(0)}.el-upload-list--picture .el-upload-list__item-thumbnail{align-items:center;background-color:var(--el-color-white);display:inline-flex;height:70px;justify-content:center;-o-object-fit:contain;object-fit:contain;position:relative;width:70px;z-index:1}.el-upload-list--picture .el-upload-list__item-status-label{background:var(--el-color-success);height:26px;position:absolute;right:-17px;text-align:center;top:-7px;transform:rotate(45deg);width:46px}.el-upload-list--picture .el-upload-list__item-status-label i{font-size:12px;margin-top:12px;transform:rotate(-45deg)}.el-upload-list--picture .el-progress{position:relative;top:-7px}.el-upload-cover{cursor:default;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%;z-index:10}.el-upload-cover:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-upload-cover img{display:block;height:100%;width:100%}.el-upload-cover__label{background:var(--el-color-success);height:24px;right:-15px;text-align:center;top:-6px;transform:rotate(45deg);width:40px}.el-upload-cover__label i{color:#fff;font-size:12px;margin-top:11px;transform:rotate(-45deg)}.el-upload-cover__progress{display:inline-block;position:static;vertical-align:middle;width:243px}.el-upload-cover__progress+.el-upload__inner{opacity:0}.el-upload-cover__content{height:100%;left:0;position:absolute;top:0;width:100%}.el-upload-cover__interact{background-color:var(--el-overlay-color-light);bottom:0;height:100%;left:0;position:absolute;text-align:center;width:100%}.el-upload-cover__interact .btn{color:#fff;cursor:pointer;display:inline-block;font-size:14px;margin-top:60px;transition:var(--el-transition-md-fade);vertical-align:middle}.el-upload-cover__interact .btn i{margin-top:0}.el-upload-cover__interact .btn span{opacity:0;transition:opacity .15s linear}.el-upload-cover__interact .btn:not(:first-child){margin-left:35px}.el-upload-cover__interact .btn:hover{transform:translateY(-13px)}.el-upload-cover__interact .btn:hover span{opacity:1}.el-upload-cover__interact .btn i{color:#fff;display:block;font-size:24px;line-height:inherit;margin:0 auto 5px}.el-upload-cover__title{background-color:#fff;bottom:0;color:var(--el-text-color-primary);font-size:14px;font-weight:400;height:36px;left:0;line-height:36px;margin:0;overflow:hidden;padding:0 10px;position:absolute;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.el-upload-cover+.el-upload__inner{opacity:0;position:relative;z-index:1}.el-vl__wrapper{position:relative}.el-vl__wrapper:hover .el-virtual-scrollbar,.el-vl__wrapper.always-on .el-virtual-scrollbar{opacity:1}.el-vl__window{scrollbar-width:none}.el-vl__window::-webkit-scrollbar{display:none}.el-virtual-scrollbar{opacity:0;transition:opacity .34s ease-out}.el-virtual-scrollbar.always-on{opacity:1}.el-vg__wrapper{position:relative}.el-popper{--el-popper-border-radius:var(--el-popover-border-radius,4px);border-radius:var(--el-popper-border-radius);font-size:12px;line-height:20px;min-width:10px;overflow-wrap:break-word;padding:5px 11px;position:absolute;visibility:visible;z-index:2000}.el-popper.is-dark{background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary);color:var(--el-bg-color)}.el-popper.is-dark .el-popper__arrow:before{background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary);right:0}.el-popper.is-light{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light)}.el-popper.is-light .el-popper__arrow:before{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);right:0}.el-popper.is-pure{padding:0}.el-popper__arrow{height:10px;position:absolute;width:10px;z-index:-1}.el-popper__arrow:before{background:var(--el-text-color-primary);box-sizing:border-box;content:" ";height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:-1}.el-popper[data-popper-placement^=top]>.el-popper__arrow{bottom:-5px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-bottom-right-radius:2px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-5px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-top-left-radius:2px}.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-5px}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-top-right-radius:2px}.el-popper[data-popper-placement^=right]>.el-popper__arrow{left:-5px}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-bottom-left-radius:2px}.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent!important;border-top-color:transparent!important}.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent!important;border-right-color:transparent!important}.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent!important;border-left-color:transparent!important}.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent!important;border-top-color:transparent!important}.el-statistic{--el-statistic-title-font-weight:400;--el-statistic-title-font-size:var(--el-font-size-extra-small);--el-statistic-title-color:var(--el-text-color-regular);--el-statistic-content-font-weight:400;--el-statistic-content-font-size:var(--el-font-size-extra-large);--el-statistic-content-color:var(--el-text-color-primary)}.el-statistic__head{color:var(--el-statistic-title-color);font-size:var(--el-statistic-title-font-size);font-weight:var(--el-statistic-title-font-weight);line-height:20px;margin-bottom:4px}.el-statistic__content{color:var(--el-statistic-content-color);font-size:var(--el-statistic-content-font-size);font-weight:var(--el-statistic-content-font-weight)}.el-statistic__value{display:inline-block}.el-statistic__prefix{display:inline-block;margin-right:4px}.el-statistic__suffix{display:inline-block;margin-left:4px}.el-tour{--el-tour-width:520px;--el-tour-padding-primary:12px;--el-tour-font-line-height:var(--el-font-line-height-primary);--el-tour-title-font-size:16px;--el-tour-title-text-color:var(--el-text-color-primary);--el-tour-title-font-weight:400;--el-tour-close-color:var(--el-color-info);--el-tour-font-size:14px;--el-tour-color:var(--el-text-color-primary);--el-tour-bg-color:var(--el-bg-color);--el-tour-border-radius:4px}.el-tour__hollow{transition:all var(--el-transition-duration) ease}.el-tour__content{border-radius:var(--el-tour-border-radius);box-shadow:var(--el-box-shadow-light);outline:none;overflow-wrap:break-word;padding:var(--el-tour-padding-primary);width:var(--el-tour-width)}.el-tour__arrow,.el-tour__content{background:var(--el-tour-bg-color);box-sizing:border-box}.el-tour__arrow{height:10px;pointer-events:none;position:absolute;transform:rotate(45deg);width:10px}.el-tour__content[data-side^=top] .el-tour__arrow{border-left-color:transparent;border-top-color:transparent}.el-tour__content[data-side^=bottom] .el-tour__arrow{border-bottom-color:transparent;border-right-color:transparent}.el-tour__content[data-side^=left] .el-tour__arrow{border-bottom-color:transparent;border-left-color:transparent}.el-tour__content[data-side^=right] .el-tour__arrow{border-right-color:transparent;border-top-color:transparent}.el-tour__content[data-side^=top] .el-tour__arrow{bottom:-5px}.el-tour__content[data-side^=bottom] .el-tour__arrow{top:-5px}.el-tour__content[data-side^=left] .el-tour__arrow{right:-5px}.el-tour__content[data-side^=right] .el-tour__arrow{left:-5px}.el-tour__closebtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:40px;outline:none;padding:0;position:absolute;right:0;top:0;width:40px}.el-tour__closebtn .el-tour__close{color:var(--el-tour-close-color);font-size:inherit}.el-tour__closebtn:focus .el-tour__close,.el-tour__closebtn:hover .el-tour__close{color:var(--el-color-primary)}.el-tour__header{padding-bottom:var(--el-tour-padding-primary)}.el-tour__header.show-close{padding-right:calc(var(--el-tour-padding-primary) + var(--el-message-close-size, 16px))}.el-tour__title{color:var(--el-tour-title-text-color);font-size:var(--el-tour-title-font-size);font-weight:var(--el-tour-title-font-weight);line-height:var(--el-tour-font-line-height)}.el-tour__body{color:var(--el-tour-text-color);font-size:var(--el-tour-font-size)}.el-tour__body img,.el-tour__body video{max-width:100%}.el-tour__footer{box-sizing:border-box;display:flex;justify-content:space-between;padding-top:var(--el-tour-padding-primary)}.el-tour__content .el-tour-indicators{display:inline-block;flex:1}.el-tour__content .el-tour-indicator{background:var(--el-color-info-light-9);border-radius:50%;display:inline-block;height:6px;margin-right:6px;width:6px}.el-tour__content .el-tour-indicator.is-active{background:var(--el-color-primary)}.el-tour.el-tour--primary{--el-tour-title-text-color:#fff;--el-tour-text-color:#fff;--el-tour-bg-color:var(--el-color-primary);--el-tour-close-color:#fff}.el-tour.el-tour--primary .el-tour__closebtn:focus .el-tour__close,.el-tour.el-tour--primary .el-tour__closebtn:hover .el-tour__close{color:var(--el-tour-title-text-color)}.el-tour.el-tour--primary .el-button--default{background:#fff;border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-tour.el-tour--primary .el-button--primary{border-color:#fff}.el-tour.el-tour--primary .el-tour-indicator{background:#ffffff26}.el-tour.el-tour--primary .el-tour-indicator.is-active{background:#fff}.el-tour-parent--hidden{overflow:hidden}.el-anchor{--el-anchor-bg-color:var(--el-bg-color);--el-anchor-padding-indent:14px;--el-anchor-line-height:22px;--el-anchor-font-size:12px;--el-anchor-color:var(--el-text-color-secondary);--el-anchor-active-color:var(--el-color-primary);--el-anchor-marker-bg-color:var(--el-color-primary);background-color:var(--el-anchor-bg-color);position:relative}.el-anchor__marker{background-color:var(--el-anchor-marker-bg-color);border-radius:4px;opacity:0;position:absolute;z-index:0}.el-anchor.el-anchor--vertical .el-anchor__marker{height:14px;left:0;top:8px;transition:top .25s ease-in-out,opacity .25s;width:4px}.el-anchor.el-anchor--vertical .el-anchor__list{padding-left:var(--el-anchor-padding-indent)}.el-anchor.el-anchor--vertical.el-anchor--underline:before{background-color:#0505050f;content:"";height:100%;left:0;position:absolute;width:2px}.el-anchor.el-anchor--vertical.el-anchor--underline .el-anchor__marker{border-radius:unset;width:2px}.el-anchor.el-anchor--horizontal .el-anchor__marker{bottom:0;height:2px;transition:left .25s ease-in-out,opacity .25s,width .25s;width:20px}.el-anchor.el-anchor--horizontal .el-anchor__list{display:flex;padding-bottom:4px}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item{padding-left:16px}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item:first-child{padding-left:0}.el-anchor.el-anchor--horizontal.el-anchor--underline:before{background-color:#0505050f;bottom:0;content:"";height:2px;position:absolute;width:100%}.el-anchor.el-anchor--horizontal.el-anchor--underline .el-anchor__marker{border-radius:unset;height:2px}.el-anchor__item{display:flex;flex-direction:column;overflow:hidden}.el-anchor__link{color:var(--el-anchor-color);cursor:pointer;font-size:var(--el-anchor-font-size);line-height:var(--el-anchor-line-height);max-width:100%;outline:none;overflow:hidden;padding:4px 0;text-decoration:none;text-overflow:ellipsis;transition:color var(--el-transition-duration);white-space:nowrap}.el-anchor__link:focus,.el-anchor__link:hover{color:var(--el-anchor-color)}.el-anchor__link.is-active{color:var(--el-anchor-active-color)}.el-anchor .el-anchor__list .el-anchor__item a{display:inline-block}.el-segmented{--el-segmented-color:var(--el-text-color-regular);--el-segmented-bg-color:var(--el-fill-color-light);--el-segmented-padding:2px;--el-segmented-item-selected-color:var(--el-color-white);--el-segmented-item-selected-bg-color:var(--el-color-primary);--el-segmented-item-selected-disabled-bg-color:var(--el-color-primary-light-5);--el-segmented-item-hover-color:var(--el-text-color-primary);--el-segmented-item-hover-bg-color:var(--el-fill-color-dark);--el-segmented-item-active-bg-color:var(--el-fill-color-darker);--el-segmented-item-disabled-color:var(--el-text-color-placeholder);align-items:stretch;background:var(--el-segmented-bg-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-segmented-color);display:inline-flex;font-size:14px;min-height:32px;padding:var(--el-segmented-padding)}.el-segmented__group{align-items:stretch;display:flex;position:relative;width:100%}.el-segmented__item-selected{background:var(--el-segmented-item-selected-bg-color);border-radius:calc(var(--el-border-radius-base) - 2px);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:all .3s;width:10px}.el-segmented__item-selected.is-disabled{background:var(--el-segmented-item-selected-disabled-bg-color)}.el-segmented__item-selected.is-focus-visible:before{border-radius:inherit;content:"";top:0;right:0;bottom:0;left:0;outline:2px solid var(--el-segmented-item-selected-bg-color);outline-offset:1px;position:absolute}.el-segmented__item{align-items:center;border-radius:calc(var(--el-border-radius-base) - 2px);cursor:pointer;display:flex;flex:1;padding:0 11px}.el-segmented__item:not(.is-disabled):not(.is-selected):hover{background:var(--el-segmented-item-hover-bg-color);color:var(--el-segmented-item-hover-color)}.el-segmented__item:not(.is-disabled):not(.is-selected):active{background:var(--el-segmented-item-active-bg-color)}.el-segmented__item.is-selected,.el-segmented__item.is-selected.is-disabled{color:var(--el-segmented-item-selected-color)}.el-segmented__item.is-disabled{color:var(--el-segmented-item-disabled-color);cursor:not-allowed}.el-segmented__item-input{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.el-segmented__item-label{flex:1;line-height:normal;overflow:hidden;text-align:center;text-overflow:ellipsis;transition:color .3s;white-space:nowrap;z-index:1}.el-segmented.is-block{display:flex}.el-segmented.is-block .el-segmented__item{min-width:0}.el-segmented--large{border-radius:var(--el-border-radius-base);font-size:16px;min-height:40px}.el-segmented--large .el-segmented__item,.el-segmented--large .el-segmented__item-selected{border-radius:calc(var(--el-border-radius-base) - 2px)}.el-segmented--large .el-segmented__item{padding:0 11px}.el-segmented--small{border-radius:calc(var(--el-border-radius-base) - 1px);font-size:14px;min-height:24px}.el-segmented--small .el-segmented__item,.el-segmented--small .el-segmented__item-selected{border-radius:calc(var(--el-border-radius-base) - 3px)}.el-segmented--small .el-segmented__item{padding:0 7px}`,Xl=globalThis||void 0||self;/** +var Hpe=Object.defineProperty;var Fpe=(il,Gl,ha)=>Gl in il?Hpe(il,Gl,{enumerable:!0,configurable:!0,writable:!0,value:ha}):il[Gl]=ha;var pf=(il,Gl,ha)=>Fpe(il,typeof Gl!="symbol"?Gl+"":Gl,ha);(function(il){typeof define=="function"&&define.amd?define(il):il()})(function(){"use strict";var il=document.createElement("style");il.textContent=`.walletconnect-modal__base{max-width:400px!important}.swal2-container{font-family:Arial,Helvetica,sans-serif;z-index:9999999!important}.swal2-title{font-size:1.25em}.cpl-theme-dark .swal2-popup{background:#141d20!important;color:#a8aeb6!important}.cpl-theme-dark .swal2-styled.swal2-confirm{background:#050b13cf!important}.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px #00000013,0 1px 2px #00000013,1px 2px 4px #00000013,1px 3px 8px #00000013,2px 4px 16px #00000013;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:.5em 0 0;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:#0006}div:where(.swal2-container).swal2-backdrop-hide{background:#0000!important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0,1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0,1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0,1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none!important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(#0000001a,#0000001a)}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(#0003,#0003)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px #0000;font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus-visible{box-shadow:0 0 0 3px #7066e080}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus-visible{box-shadow:0 0 0 3px #dc374180}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus-visible{box-shadow:0 0 0 3px #6e788180}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px #6496c880}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:#0003}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:#0000;color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:#0000;color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px #6496c880}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:#0000;box-shadow:inset 0 1px 1px #0000000f,0 0 0 3px #0000;color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px #0000000f,0 0 0 3px #6496c880}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:#0000;font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:#0000;color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message):before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:#0000;font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotate(2deg)}33%{transform:translateY(0) rotate(-2deg)}66%{transform:translateY(.3125em) rotate(2deg)}to{transform:translateY(0) rotate(0)}}@keyframes swal2-toast-hide{to{transform:rotate(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}to{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}to{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}to{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}to{transform:scale(.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}to{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}to{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}to{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}to{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}to{transform:rotateX(0);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}to{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotate(45deg);opacity:0}25%{transform:rotate(-25deg);opacity:.4}50%{transform:rotate(15deg);opacity:.8}75%{transform:rotate(-5deg);opacity:1}to{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:#0000!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px #0006}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:#0000;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translate(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translate(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto} +`,document.head.appendChild(il);const Gl=e=>{const t={};return e.replace(/:root\s*{([^}]*)}/g,(l,n)=>n.trim().split(";").forEach(a=>{const[i,c]=a.split(":").map(d=>d.trim());i&&c&&(t[i]=c)})),e.replace(/var\(--([\w-]+)\)/g,(l,n)=>t[`--${n}`]?t[`--${n}`]:`var(--${n})`).replace(/:root\s*{([^}]*)}/g,"")},ha=e=>{const t=r=>{let l;r.init&&(l={order:{amount:Number(r.init.order.amount),currency:String(r.init.order.currency),paymentAmount:Number(r.init.order.paymentAmount),id:r.init.order.id?Number(r.init.order.id):void 0,paymentCurrency:Object.assign({},r.init.order.paymentCurrency)||{}},receiver:String(r.init.receiver),blockConfirmationCount:Number(r.init.blockConfirmationCount)});const n=[];r.networks.forEach(d=>{n.push(d)});const a={evmchains:window.MultipleChain.EvmChains},i=d=>Array.isArray(d)&&d.length===0?{}:d||{};return{init:l,networks:n,providers:a,mode:r.mode,theme:r.theme,wallets:r.wallets,logo:String(r.logo),addon:String(r.addon),debug:!!r.debug,modal:!!r.modal,testnet:!!r.testnet,version:String(r.version),imagesUrl:String(r.imagesUrl),lang:i(r.lang),addresses:r.addresses||void 0,userEmail:r.userEmail||void 0,confirmation:!!r.confirmation,adapterConfig:r.adapterConfig||{},reminderEmail:!!r.reminderEmail,amountUpdateMin:Number(r.amountUpdateMin),createTransaction:!!r.createTransaction,discountRates:i(r.discountRates),apiUrl:r.apiUrl?String(r.apiUrl):void 0}},o=r=>{for(const l in r){if(l=="providers")return r;r[l]===void 0?delete r[l]:typeof r[l]=="object"&&o(r[l])}return r};return o(t(e))},C5='.app.modal{top:0;left:0;width:100%;height:100%;display:none;position:fixed;overflow-y:auto;z-index:99998;place-items:center;background-color:#00000080!important}.app.modal.active{display:grid}.app.modal>.container{margin:76px auto 40px}.app.modal>.container>.inner{box-shadow:0 0 20px #54545480}.app.modal>.container>div:last-child a{color:#e4e4e4}.app.modal>.container>div:last-child span{color:#dcdcdc}@media screen and (max-width: 450px){.app.modal>.container{margin:20px;width:calc(100% - 40px)}}.app .container{font-family:Arial,Helvetica,sans-serif}.app .container .disable-el[data-disabled=true]{background:#d0d2d4;color:#fff;cursor:no-drop;pointer-events:none}.app .container .disable-el[data-disabled=true] .discount{color:#fff}.app .container .loading{padding:30px 0;box-sizing:border-box;text-align:center}.app .container .loading svg{width:94px!important;height:94px!important}.app .container.theme-dark .disable-el[data-disabled=true]{background:#464a4e}.text-center{text-align:center}.margin-bottom{margin-bottom:20px}.el-input__wrapper,.el-input__wrapper:hover{box-shadow:0 0 0 1px #dcdfe6 inset!important}.el-input-group__prepend,.el-input__wrapper,.el-input__inner{background:var(--background-color)}.list{width:100%}.list .title{width:100%;padding:20px;font-size:24px;font-weight:500;text-align:center;line-height:normal;box-sizing:border-box;color:var(--text-color);border-bottom:1px solid var(--border-color)}.list ul{margin:0;padding:0;overflow:hidden;max-height:400px;list-style-type:none;border-bottom-left-radius:8px;border-bottom-right-radius:8px}.list ul>div{overflow-y:auto;max-height:400px}.list ul li{height:90px;width:100%;display:flex;align-items:center;cursor:pointer;box-sizing:border-box;padding:20px;position:relative}.list ul li:last-child{border-bottom:none}.list ul li .icon-wrapper{width:50px;height:50px;margin-right:10px}.list ul li .icon-wrapper .icon{width:50px;height:50px;border-radius:3px}.list ul li .name{font-size:16px;font-weight:500;margin-right:35px;text-align:left;line-height:20px;color:var(--text-color)}.list ul li .el-icon{right:20px;position:absolute;color:var(--text-color)}.list ul li:hover{background:var(--primary-color)}@media screen and (max-width: 450px){.list ul li{height:auto}.list ul li .name{font-size:16px;margin-bottom:10px}}.list ul .no-found{padding:20px;min-height:inherit;box-sizing:border-box;display:flex;text-align:center;align-items:center;justify-content:center;color:var(--text-color)}.modal:not(.disabled){top:0;left:0;width:100%;height:100%;display:none;position:fixed;overflow-y:auto;z-index:99998;place-items:center;background-color:transparent}.modal.active{display:grid}.modal>.content{width:100%;margin:0;max-width:450px;border-radius:8px;box-sizing:border-box;color:var(--text-color);background-color:var(--background-color);box-shadow:0 4px 8px var(--box-shadow-color)}.modal>.content>.title{width:100%;padding:20px;font-size:24px;font-weight:500;line-height:normal;text-align:center;box-sizing:border-box;border-bottom:1px solid var(--border-color)}.modal:not(.disabled)>.content{margin:40px auto}@media screen and (max-width: 450px){.modal:not(.disabled)>.content{margin:20px;width:calc(100% - 40px)}}.list ul li.network .discount,.list ul li.currency .discount{left:80px;bottom:10px;font-size:12px;position:absolute;text-decoration:underline;color:var(--discount-color)}.list ul li.currency .icon-wrapper{position:relative}.list ul li.currency .icon-wrapper .network-icon{position:absolute;border-radius:50%;width:25px;height:25px;right:-5px;max-width:25px;bottom:-5px;border:3px solid #000;background-color:#fff}.list ul li.currency .network-name{font-size:14px;text-align:right;position:relative;margin-left:auto;margin-right:35px;color:var(--text-color)}.container.theme-dark .list ul li.currency .icon-wrapper .network-icon{background-color:#000}.currencies{margin:0;list-style:none;background:transparent;border-radius:10px;word-wrap:break-word;max-height:300px;overflow-y:auto;overflow-x:hidden;padding:20px;box-sizing:border-box}.currencies .el-row{padding:0}.currencies .el-row .el-col{font-weight:400}.currencies .el-row .el-col:not(:nth-child(-n+2)){margin-top:10px}.currencies .el-row .el-col:not(:nth-last-child(-n+2)){margin-bottom:10px}.currencies li{display:flex;align-items:center;line-height:0;cursor:pointer;height:28px;border-radius:12px;padding:8px;box-sizing:content-box;color:var(--text-color);justify-content:space-between;background:var(--primary-color)}.currencies li span:first-child{display:flex;align-items:center;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.currencies li .icon{width:28px;margin-right:5px!important;margin-left:0!important}.currencies li:hover{color:var(--button-text-color);background:var(--button-hover-background-color)}.currencies li:hover .discount{color:var(--button-text-color)}.currencies li.selected{color:var(--button-text-color);background:var(--button-background-color);cursor:no-drop}.currencies li.selected .discount{color:var(--button-text-color)}.currencies li .discount{margin-left:10px;font-size:10px;color:var(--discount-color);text-decoration:underline;white-space:nowrap;flex-shrink:0}@media screen and (max-width: 530px){.currencies li{display:inline-block;min-height:28px;height:auto;width:calc(100% - 17px);text-align:center}.currencies li span:first-child{justify-content:center}.currencies li .discount{margin-top:10px;margin-left:0;margin-bottom:6px;display:inline-block;text-align:center}}.button{width:100%;padding:20px;height:60px;text-align:center;box-sizing:border-box;font-size:18px;font-weight:500;cursor:pointer;border-top-left-radius:0;border-top-right-radius:0;white-space:break-spaces;color:var(--button-text-color);background:var(--button-background-color);border-color:var(--button-background-color)}.button:hover{background:var(--button-hover-background-color);border-color:var(--button-hover-background-color)}.button:disabled{background:var(--button-disabled-color);border-color:var(--button-disabled-color);cursor:no-drop}.button:disabled:hover{background:var(--button-disabled-color);border-color:var(--button-disabled-color)}.button-colors{color:var(--button-text-color);background:var(--button-background-color);border-color:var(--button-background-color)}.button-colors:hover{background:var(--button-hover-background-color);border-color:var(--button-hover-background-color)}.button-colors:disabled{background:var(--button-disabled-color);border-color:var(--button-disabled-color);cursor:no-drop}.button-colors:disabled:hover{background:var(--button-disabled-color);border-color:var(--button-disabled-color)}.header{padding:20px;box-sizing:border-box;border-bottom:1px solid var(--border-color)}.header .el-col{line-height:16px}.header .el-col:not(:nth-last-child(-n+2)){margin-bottom:10px}.header .el-col:nth-child(n){text-align:left}.header .el-col:nth-child(2n){text-align:right}.header .payment-amount{font-size:14px;font-weight:700}.header .payment-amount .discounted{text-align:right}.header .payment-amount .discounted span:first-child{color:red;font-size:12px;text-decoration:line-through}.header .payment-amount .discounted span:last-child{margin-left:5px}.header .change-network{font-size:12px;cursor:pointer;border-radius:8px;text-decoration:underline}.container.theme-dark .header .payment-amount .discounted span:first-child{color:#d23a3a}.list ul.adapters li.adapter .status{color:#000;font-size:14px;font-weight:500;margin-left:auto}.list ul.adapters li.adapter .status .detected,.list ul.adapters li.adapter .status .openInApp,.list ul.adapters li.adapter .status .openInAppManual{color:#1e8454}.list ul.adapters li.adapter .status .download,.list ul.adapters li.adapter .status .onlyDesktop{color:#1292bc}.list ul.adapters.disabled{opacity:.5;cursor:no-drop}.list ul.adapters.disabled .adapter{pointer-events:none}.container{width:100%;margin:0 auto;max-width:450px;position:relative;box-sizing:border-box}.container>.inner{overflow:hidden;position:relative;border-radius:8px;box-sizing:border-box;border:1px solid var(--border-color);background-color:var(--background-color);box-shadow:0 4px 8px var(--box-shadow-color)}.container>.inner:has(.modal.active:not(.disabled)):before{top:0;left:0;right:0;bottom:0;content:"";position:fixed;z-index:99997;background-color:#00000080}.container>.inner ul::-webkit-scrollbar,.container>.inner ul>div::-webkit-scrollbar{width:10px}.container>.inner ul::-webkit-scrollbar-track,.container>.inner ul>div::-webkit-scrollbar-track{background:var(--primary-color)}.container>.inner ul::-webkit-scrollbar-thumb,.container>.inner ul>div::-webkit-scrollbar-thumb{background:var(--secondary-color)}.container>.inner ul::-webkit-scrollbar-thumb:hover,.container>.inner ul>div::-webkit-scrollbar-thumb:hover{background:var(--tertiary-color)}.container>div:last-child{display:flex;font-size:14px;padding:20px 30px 0;justify-content:center}.container>div:last-child a{font-weight:600;color:#7f7f7f;text-decoration:none}.container>div:last-child span{color:#7f7f7f;font-weight:400;margin-right:5px}',S5="/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}",E5=`@charset "UTF-8";:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645,.045,.355,1);--el-transition-function-fast-bezier:cubic-bezier(.23,1,.32,1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px}:root{color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0,0,0,.04),0px 8px 20px rgba(0,0,0,.08);--el-box-shadow-light:0px 0px 12px rgba(0,0,0,.12);--el-box-shadow-lighter:0px 0px 6px rgba(0,0,0,.12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0,0,0,.08),0px 12px 32px rgba(0,0,0,.12),0px 8px 16px -8px rgba(0,0,0,.16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0,0,0,.8);--el-overlay-color-light:rgba(0,0,0,.7);--el-overlay-color-lighter:rgba(0,0,0,.5);--el-mask-color:rgba(255,255,255,.9);--el-mask-color-extra-light:rgba(255,255,255,.3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transform-origin:center top;transition:var(--el-transition-md-fade)}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transform-origin:center bottom;transition:var(--el-transition-md-fade)}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transform-origin:top left;transition:var(--el-transition-md-fade)}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.el-icon{--color:inherit;align-items:center;display:inline-flex;height:1em;justify-content:center;line-height:1em;position:relative;width:1em;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-affix--fixed{position:fixed}.el-alert{--el-alert-padding:8px 16px;--el-alert-border-radius-base:var(--el-border-radius-base);--el-alert-title-font-size:14px;--el-alert-title-with-description-font-size:16px;--el-alert-description-font-size:14px;--el-alert-close-font-size:16px;--el-alert-close-customed-font-size:14px;--el-alert-icon-size:16px;--el-alert-icon-large-size:28px;align-items:center;background-color:var(--el-color-white);border-radius:var(--el-alert-border-radius-base);box-sizing:border-box;display:flex;margin:0;opacity:1;overflow:hidden;padding:var(--el-alert-padding);position:relative;transition:opacity var(--el-transition-duration-fast);width:100%}.el-alert.is-light .el-alert__close-btn{color:var(--el-text-color-placeholder)}.el-alert.is-dark .el-alert__close-btn,.el-alert.is-dark .el-alert__description{color:var(--el-color-white)}.el-alert.is-center{justify-content:center}.el-alert--success{--el-alert-bg-color:var(--el-color-success-light-9)}.el-alert--success.is-light{background-color:var(--el-alert-bg-color)}.el-alert--success.is-light,.el-alert--success.is-light .el-alert__description{color:var(--el-color-success)}.el-alert--success.is-dark{background-color:var(--el-color-success);color:var(--el-color-white)}.el-alert--info{--el-alert-bg-color:var(--el-color-info-light-9)}.el-alert--info.is-light{background-color:var(--el-alert-bg-color)}.el-alert--info.is-light,.el-alert--info.is-light .el-alert__description{color:var(--el-color-info)}.el-alert--info.is-dark{background-color:var(--el-color-info);color:var(--el-color-white)}.el-alert--warning{--el-alert-bg-color:var(--el-color-warning-light-9)}.el-alert--warning.is-light{background-color:var(--el-alert-bg-color)}.el-alert--warning.is-light,.el-alert--warning.is-light .el-alert__description{color:var(--el-color-warning)}.el-alert--warning.is-dark{background-color:var(--el-color-warning);color:var(--el-color-white)}.el-alert--error{--el-alert-bg-color:var(--el-color-error-light-9)}.el-alert--error.is-light{background-color:var(--el-alert-bg-color)}.el-alert--error.is-light,.el-alert--error.is-light .el-alert__description{color:var(--el-color-error)}.el-alert--error.is-dark{background-color:var(--el-color-error);color:var(--el-color-white)}.el-alert__content{display:flex;flex-direction:column;gap:4px}.el-alert .el-alert__icon{font-size:var(--el-alert-icon-size);margin-right:8px;width:var(--el-alert-icon-size)}.el-alert .el-alert__icon.is-big{font-size:var(--el-alert-icon-large-size);margin-right:12px;width:var(--el-alert-icon-large-size)}.el-alert__title{font-size:var(--el-alert-title-font-size);line-height:24px}.el-alert__title.with-description{font-size:var(--el-alert-title-with-description-font-size)}.el-alert .el-alert__description{font-size:var(--el-alert-description-font-size);margin:0}.el-alert .el-alert__close-btn{cursor:pointer;font-size:var(--el-alert-close-font-size);opacity:1;position:absolute;right:16px;top:12px}.el-alert .el-alert__close-btn.is-customed{font-size:var(--el-alert-close-customed-font-size);font-style:normal;line-height:24px;top:8px}.el-alert-fade-enter-from,.el-alert-fade-leave-active{opacity:0}.el-aside{box-sizing:border-box;flex-shrink:0;overflow:auto;width:var(--el-aside-width,300px)}.el-autocomplete{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;display:inline-block;position:relative;width:var(--el-input-width)}.el-autocomplete__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-autocomplete__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-autocomplete__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-autocomplete-suggestion{border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-autocomplete-suggestion__wrap{box-sizing:border-box;max-height:280px;padding:10px 0}.el-autocomplete-suggestion__list{margin:0;padding:0}.el-autocomplete-suggestion li{color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-base);line-height:34px;list-style:none;margin:0;overflow:hidden;padding:0 20px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-autocomplete-suggestion li:hover,.el-autocomplete-suggestion li.highlighted{background-color:var(--el-fill-color-light)}.el-autocomplete-suggestion li.divider{border-top:1px solid var(--el-color-black);margin-top:6px}.el-autocomplete-suggestion li.divider:last-child{margin-bottom:-6px}.el-autocomplete-suggestion.is-loading li{color:var(--el-text-color-secondary);font-size:20px;height:100px;line-height:100px;text-align:center}.el-autocomplete-suggestion.is-loading li:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-autocomplete-suggestion.is-loading li:hover{background-color:var(--el-bg-color-overlay)}.el-autocomplete-suggestion.is-loading .el-icon-loading{vertical-align:middle}.el-avatar{--el-avatar-text-color:var(--el-color-white);--el-avatar-bg-color:var(--el-text-color-disabled);--el-avatar-text-size:14px;--el-avatar-icon-size:18px;--el-avatar-border-radius:var(--el-border-radius-base);--el-avatar-size-large:56px;--el-avatar-size-small:24px;--el-avatar-size:40px;align-items:center;background:var(--el-avatar-bg-color);box-sizing:border-box;color:var(--el-avatar-text-color);display:inline-flex;font-size:var(--el-avatar-text-size);height:var(--el-avatar-size);justify-content:center;overflow:hidden;text-align:center;width:var(--el-avatar-size)}.el-avatar>img{display:block;height:100%;width:100%}.el-avatar--circle{border-radius:50%}.el-avatar--square{border-radius:var(--el-avatar-border-radius)}.el-avatar--icon{font-size:var(--el-avatar-icon-size)}.el-avatar--small{--el-avatar-size:24px}.el-avatar--large{--el-avatar-size:56px}.el-backtop{--el-backtop-bg-color:var(--el-bg-color-overlay);--el-backtop-text-color:var(--el-color-primary);--el-backtop-hover-bg-color:var(--el-border-color-extra-light);align-items:center;background-color:var(--el-backtop-bg-color);border-radius:50%;box-shadow:var(--el-box-shadow-lighter);color:var(--el-backtop-text-color);cursor:pointer;display:flex;font-size:20px;height:40px;justify-content:center;position:fixed;width:40px;z-index:5}.el-backtop:hover{background-color:var(--el-backtop-hover-bg-color)}.el-backtop__icon{font-size:20px}.el-badge{--el-badge-bg-color:var(--el-color-danger);--el-badge-radius:10px;--el-badge-font-size:12px;--el-badge-padding:6px;--el-badge-size:18px;display:inline-block;position:relative;vertical-align:middle;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.el-badge__content{align-items:center;background-color:var(--el-badge-bg-color);border:1px solid var(--el-bg-color);border-radius:var(--el-badge-radius);color:var(--el-color-white);display:inline-flex;font-size:var(--el-badge-font-size);height:var(--el-badge-size);justify-content:center;padding:0 var(--el-badge-padding);white-space:nowrap}.el-badge__content.is-fixed{position:absolute;right:calc(1px + var(--el-badge-size)/2);top:0;transform:translateY(-50%) translate(100%);z-index:var(--el-index-normal)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{border-radius:50%;height:8px;padding:0;right:0;width:8px}.el-badge__content--primary{background-color:var(--el-color-primary)}.el-badge__content--success{background-color:var(--el-color-success)}.el-badge__content--warning{background-color:var(--el-color-warning)}.el-badge__content--info{background-color:var(--el-color-info)}.el-badge__content--danger{background-color:var(--el-color-danger)}.el-breadcrumb{font-size:14px;line-height:1}.el-breadcrumb:after,.el-breadcrumb:before{content:"";display:table}.el-breadcrumb:after{clear:both}.el-breadcrumb__separator{color:var(--el-text-color-placeholder);font-weight:700;margin:0 9px}.el-breadcrumb__separator.el-icon{font-weight:400;margin:0 6px}.el-breadcrumb__separator.el-icon svg{vertical-align:middle}.el-breadcrumb__item{align-items:center;display:inline-flex;float:left}.el-breadcrumb__inner{color:var(--el-text-color-regular)}.el-breadcrumb__inner a,.el-breadcrumb__inner.is-link{color:var(--el-text-color-primary);font-weight:700;text-decoration:none;transition:var(--el-transition-color)}.el-breadcrumb__inner a:hover,.el-breadcrumb__inner.is-link:hover{color:var(--el-color-primary);cursor:pointer}.el-breadcrumb__item:last-child .el-breadcrumb__inner,.el-breadcrumb__item:last-child .el-breadcrumb__inner a,.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover{color:var(--el-text-color-regular);cursor:text;font-weight:400}.el-breadcrumb__item:last-child .el-breadcrumb__separator{display:none}.el-button-group{display:inline-block;vertical-align:middle}.el-button-group:after,.el-button-group:before{content:"";display:table}.el-button-group:after{clear:both}.el-button-group>.el-button{float:left;position:relative}.el-button-group>.el-button+.el-button{margin-left:0}.el-button-group>.el-button:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.el-button-group>.el-button:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.el-button-group>.el-button:first-child:last-child{border-bottom-left-radius:var(--el-border-radius-base);border-bottom-right-radius:var(--el-border-radius-base);border-top-left-radius:var(--el-border-radius-base);border-top-right-radius:var(--el-border-radius-base)}.el-button-group>.el-button:first-child:last-child.is-round{border-radius:var(--el-border-radius-round)}.el-button-group>.el-button:first-child:last-child.is-circle{border-radius:50%}.el-button-group>.el-button:not(:first-child):not(:last-child){border-radius:0}.el-button-group>.el-button:not(:last-child){margin-right:-1px}.el-button-group>.el-button:active,.el-button-group>.el-button:focus,.el-button-group>.el-button:hover{z-index:1}.el-button-group>.el-button.is-active{z-index:1}.el-button-group>.el-dropdown>.el-button{border-bottom-left-radius:0;border-left-color:var(--el-button-divide-border-color);border-top-left-radius:0}.el-button-group .el-button--primary:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--primary:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--primary:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--success:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--warning:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--danger:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group .el-button--info:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button{--el-button-font-weight:var(--el-font-weight-primary);--el-button-border-color:var(--el-border-color);--el-button-bg-color:var(--el-fill-color-blank);--el-button-text-color:var(--el-text-color-regular);--el-button-disabled-text-color:var(--el-disabled-text-color);--el-button-disabled-bg-color:var(--el-fill-color-blank);--el-button-disabled-border-color:var(--el-border-color-light);--el-button-divide-border-color:rgba(255,255,255,.5);--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-color-primary-light-9);--el-button-hover-border-color:var(--el-color-primary-light-7);--el-button-active-text-color:var(--el-button-hover-text-color);--el-button-active-border-color:var(--el-color-primary);--el-button-active-bg-color:var(--el-button-hover-bg-color);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-hover-link-text-color:var(--el-color-info);--el-button-active-color:var(--el-text-color-primary);align-items:center;-webkit-appearance:none;background-color:var(--el-button-bg-color);border:var(--el-border);border-color:var(--el-button-border-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-button-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-button-font-weight);height:32px;justify-content:center;line-height:1;outline:none;padding:8px 15px;text-align:center;transition:.1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-button:hover{background-color:var(--el-button-hover-bg-color);border-color:var(--el-button-hover-border-color);color:var(--el-button-hover-text-color);outline:none}.el-button:active{background-color:var(--el-button-active-bg-color);border-color:var(--el-button-active-border-color);color:var(--el-button-active-text-color);outline:none}.el-button:focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button>span{align-items:center;display:inline-flex}.el-button+.el-button{margin-left:12px}.el-button.is-round{padding:8px 15px}.el-button::-moz-focus-inner{border:0}.el-button [class*=el-icon]+span{margin-left:6px}.el-button [class*=el-icon] svg{vertical-align:bottom}.el-button.is-plain{--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-fill-color-blank);--el-button-hover-border-color:var(--el-color-primary)}.el-button.is-active{background-color:var(--el-button-active-bg-color);border-color:var(--el-button-active-border-color);color:var(--el-button-active-text-color);outline:none}.el-button.is-disabled,.el-button.is-disabled:hover{background-color:var(--el-button-disabled-bg-color);background-image:none;border-color:var(--el-button-disabled-border-color);color:var(--el-button-disabled-text-color);cursor:not-allowed}.el-button.is-loading{pointer-events:none;position:relative}.el-button.is-loading:before{background-color:var(--el-mask-color-extra-light);border-radius:inherit;bottom:-1px;content:"";left:-1px;pointer-events:none;position:absolute;right:-1px;top:-1px;z-index:1}.el-button.is-round{border-radius:var(--el-border-radius-round)}.el-button.is-circle{border-radius:50%;padding:8px;width:32px}.el-button.is-text{background-color:transparent;border:0 solid transparent;color:var(--el-button-text-color)}.el-button.is-text.is-disabled{background-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button.is-text:not(.is-disabled):hover{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled):focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button.is-text:not(.is-disabled):active{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled).is-has-bg:hover{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg:active{background-color:var(--el-fill-color-dark)}.el-button__text--expand{letter-spacing:.3em;margin-right:-.3em}.el-button.is-link{background:transparent;border-color:transparent;color:var(--el-button-text-color);height:auto;padding:2px}.el-button.is-link:hover{color:var(--el-button-hover-link-text-color)}.el-button.is-link.is-disabled{background-color:transparent!important;border-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button.is-link:not(.is-disabled):hover{background-color:transparent;border-color:transparent}.el-button.is-link:not(.is-disabled):active{background-color:transparent;border-color:transparent;color:var(--el-button-active-color)}.el-button--text{background:transparent;border-color:transparent;color:var(--el-color-primary);padding-left:0;padding-right:0}.el-button--text.is-disabled{background-color:transparent!important;border-color:transparent!important;color:var(--el-button-disabled-text-color)}.el-button--text:not(.is-disabled):hover{background-color:transparent;border-color:transparent;color:var(--el-color-primary-light-3)}.el-button--text:not(.is-disabled):active{background-color:transparent;border-color:transparent;color:var(--el-color-primary-dark-2)}.el-button__link--expand{letter-spacing:.3em;margin-right:-.3em}.el-button--primary{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-primary);--el-button-border-color:var(--el-color-primary);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-active-color:var(--el-color-primary-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-primary-light-5);--el-button-hover-bg-color:var(--el-color-primary-light-3);--el-button-hover-border-color:var(--el-color-primary-light-3);--el-button-active-bg-color:var(--el-color-primary-dark-2);--el-button-active-border-color:var(--el-color-primary-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-primary-light-5);--el-button-disabled-border-color:var(--el-color-primary-light-5)}.el-button--primary.is-link,.el-button--primary.is-plain,.el-button--primary.is-text{--el-button-text-color:var(--el-color-primary);--el-button-bg-color:var(--el-color-primary-light-9);--el-button-border-color:var(--el-color-primary-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-primary);--el-button-hover-border-color:var(--el-color-primary);--el-button-active-text-color:var(--el-color-white)}.el-button--primary.is-link.is-disabled,.el-button--primary.is-link.is-disabled:active,.el-button--primary.is-link.is-disabled:focus,.el-button--primary.is-link.is-disabled:hover,.el-button--primary.is-plain.is-disabled,.el-button--primary.is-plain.is-disabled:active,.el-button--primary.is-plain.is-disabled:focus,.el-button--primary.is-plain.is-disabled:hover,.el-button--primary.is-text.is-disabled,.el-button--primary.is-text.is-disabled:active,.el-button--primary.is-text.is-disabled:focus,.el-button--primary.is-text.is-disabled:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8);color:var(--el-color-primary-light-5)}.el-button--success{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-success);--el-button-border-color:var(--el-color-success);--el-button-outline-color:var(--el-color-success-light-5);--el-button-active-color:var(--el-color-success-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-success-light-5);--el-button-hover-bg-color:var(--el-color-success-light-3);--el-button-hover-border-color:var(--el-color-success-light-3);--el-button-active-bg-color:var(--el-color-success-dark-2);--el-button-active-border-color:var(--el-color-success-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-success-light-5);--el-button-disabled-border-color:var(--el-color-success-light-5)}.el-button--success.is-link,.el-button--success.is-plain,.el-button--success.is-text{--el-button-text-color:var(--el-color-success);--el-button-bg-color:var(--el-color-success-light-9);--el-button-border-color:var(--el-color-success-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-success);--el-button-hover-border-color:var(--el-color-success);--el-button-active-text-color:var(--el-color-white)}.el-button--success.is-link.is-disabled,.el-button--success.is-link.is-disabled:active,.el-button--success.is-link.is-disabled:focus,.el-button--success.is-link.is-disabled:hover,.el-button--success.is-plain.is-disabled,.el-button--success.is-plain.is-disabled:active,.el-button--success.is-plain.is-disabled:focus,.el-button--success.is-plain.is-disabled:hover,.el-button--success.is-text.is-disabled,.el-button--success.is-text.is-disabled:active,.el-button--success.is-text.is-disabled:focus,.el-button--success.is-text.is-disabled:hover{background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8);color:var(--el-color-success-light-5)}.el-button--warning{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-warning);--el-button-border-color:var(--el-color-warning);--el-button-outline-color:var(--el-color-warning-light-5);--el-button-active-color:var(--el-color-warning-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-warning-light-5);--el-button-hover-bg-color:var(--el-color-warning-light-3);--el-button-hover-border-color:var(--el-color-warning-light-3);--el-button-active-bg-color:var(--el-color-warning-dark-2);--el-button-active-border-color:var(--el-color-warning-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-warning-light-5);--el-button-disabled-border-color:var(--el-color-warning-light-5)}.el-button--warning.is-link,.el-button--warning.is-plain,.el-button--warning.is-text{--el-button-text-color:var(--el-color-warning);--el-button-bg-color:var(--el-color-warning-light-9);--el-button-border-color:var(--el-color-warning-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-warning);--el-button-hover-border-color:var(--el-color-warning);--el-button-active-text-color:var(--el-color-white)}.el-button--warning.is-link.is-disabled,.el-button--warning.is-link.is-disabled:active,.el-button--warning.is-link.is-disabled:focus,.el-button--warning.is-link.is-disabled:hover,.el-button--warning.is-plain.is-disabled,.el-button--warning.is-plain.is-disabled:active,.el-button--warning.is-plain.is-disabled:focus,.el-button--warning.is-plain.is-disabled:hover,.el-button--warning.is-text.is-disabled,.el-button--warning.is-text.is-disabled:active,.el-button--warning.is-text.is-disabled:focus,.el-button--warning.is-text.is-disabled:hover{background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8);color:var(--el-color-warning-light-5)}.el-button--danger{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-danger);--el-button-border-color:var(--el-color-danger);--el-button-outline-color:var(--el-color-danger-light-5);--el-button-active-color:var(--el-color-danger-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-danger-light-5);--el-button-hover-bg-color:var(--el-color-danger-light-3);--el-button-hover-border-color:var(--el-color-danger-light-3);--el-button-active-bg-color:var(--el-color-danger-dark-2);--el-button-active-border-color:var(--el-color-danger-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-danger-light-5);--el-button-disabled-border-color:var(--el-color-danger-light-5)}.el-button--danger.is-link,.el-button--danger.is-plain,.el-button--danger.is-text{--el-button-text-color:var(--el-color-danger);--el-button-bg-color:var(--el-color-danger-light-9);--el-button-border-color:var(--el-color-danger-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-danger);--el-button-hover-border-color:var(--el-color-danger);--el-button-active-text-color:var(--el-color-white)}.el-button--danger.is-link.is-disabled,.el-button--danger.is-link.is-disabled:active,.el-button--danger.is-link.is-disabled:focus,.el-button--danger.is-link.is-disabled:hover,.el-button--danger.is-plain.is-disabled,.el-button--danger.is-plain.is-disabled:active,.el-button--danger.is-plain.is-disabled:focus,.el-button--danger.is-plain.is-disabled:hover,.el-button--danger.is-text.is-disabled,.el-button--danger.is-text.is-disabled:active,.el-button--danger.is-text.is-disabled:focus,.el-button--danger.is-text.is-disabled:hover{background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8);color:var(--el-color-danger-light-5)}.el-button--info{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-info);--el-button-border-color:var(--el-color-info);--el-button-outline-color:var(--el-color-info-light-5);--el-button-active-color:var(--el-color-info-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-info-light-5);--el-button-hover-bg-color:var(--el-color-info-light-3);--el-button-hover-border-color:var(--el-color-info-light-3);--el-button-active-bg-color:var(--el-color-info-dark-2);--el-button-active-border-color:var(--el-color-info-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-info-light-5);--el-button-disabled-border-color:var(--el-color-info-light-5)}.el-button--info.is-link,.el-button--info.is-plain,.el-button--info.is-text{--el-button-text-color:var(--el-color-info);--el-button-bg-color:var(--el-color-info-light-9);--el-button-border-color:var(--el-color-info-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-info);--el-button-hover-border-color:var(--el-color-info);--el-button-active-text-color:var(--el-color-white)}.el-button--info.is-link.is-disabled,.el-button--info.is-link.is-disabled:active,.el-button--info.is-link.is-disabled:focus,.el-button--info.is-link.is-disabled:hover,.el-button--info.is-plain.is-disabled,.el-button--info.is-plain.is-disabled:active,.el-button--info.is-plain.is-disabled:focus,.el-button--info.is-plain.is-disabled:hover,.el-button--info.is-text.is-disabled,.el-button--info.is-text.is-disabled:active,.el-button--info.is-text.is-disabled:focus,.el-button--info.is-text.is-disabled:hover{background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8);color:var(--el-color-info-light-5)}.el-button--large{--el-button-size:40px;border-radius:var(--el-border-radius-base);font-size:var(--el-font-size-base);height:var(--el-button-size);padding:12px 19px}.el-button--large [class*=el-icon]+span{margin-left:8px}.el-button--large.is-round{padding:12px 19px}.el-button--large.is-circle{padding:12px;width:var(--el-button-size)}.el-button--small{--el-button-size:24px;border-radius:calc(var(--el-border-radius-base) - 1px);font-size:12px;height:var(--el-button-size);padding:5px 11px}.el-button--small [class*=el-icon]+span{margin-left:4px}.el-button--small.is-round{padding:5px 11px}.el-button--small.is-circle{padding:5px;width:var(--el-button-size)}.el-calendar{--el-calendar-border:var(--el-table-border,1px solid var(--el-border-color-lighter));--el-calendar-header-border-bottom:var(--el-calendar-border);--el-calendar-selected-bg-color:var(--el-color-primary-light-9);--el-calendar-cell-width:85px;background-color:var(--el-fill-color-blank)}.el-calendar__header{border-bottom:var(--el-calendar-header-border-bottom);display:flex;justify-content:space-between;padding:12px 20px}.el-calendar__title{align-self:center;color:var(--el-text-color)}.el-calendar__body{padding:12px 20px 35px}.el-calendar-table{table-layout:fixed;width:100%}.el-calendar-table thead th{color:var(--el-text-color-regular);font-weight:400;padding:12px 0}.el-calendar-table:not(.is-range) td.next,.el-calendar-table:not(.is-range) td.prev{color:var(--el-text-color-placeholder)}.el-calendar-table td{border-bottom:var(--el-calendar-border);border-right:var(--el-calendar-border);transition:background-color var(--el-transition-duration-fast) ease;vertical-align:top}.el-calendar-table td.is-selected{background-color:var(--el-calendar-selected-bg-color)}.el-calendar-table td.is-today{color:var(--el-color-primary)}.el-calendar-table tr:first-child td{border-top:var(--el-calendar-border)}.el-calendar-table tr td:first-child{border-left:var(--el-calendar-border)}.el-calendar-table tr.el-calendar-table__row--hide-border td{border-top:none}.el-calendar-table .el-calendar-day{box-sizing:border-box;height:var(--el-calendar-cell-width);padding:8px}.el-calendar-table .el-calendar-day:hover{background-color:var(--el-calendar-selected-bg-color);cursor:pointer}.el-card{--el-card-border-color:var(--el-border-color-light);--el-card-border-radius:4px;--el-card-padding:20px;--el-card-bg-color:var(--el-fill-color-blank);background-color:var(--el-card-bg-color);border:1px solid var(--el-card-border-color);border-radius:var(--el-card-border-radius);color:var(--el-text-color-primary);overflow:hidden;transition:var(--el-transition-duration)}.el-card.is-always-shadow{box-shadow:var(--el-box-shadow-light)}.el-card.is-hover-shadow:focus,.el-card.is-hover-shadow:hover{box-shadow:var(--el-box-shadow-light)}.el-card__header{border-bottom:1px solid var(--el-card-border-color);box-sizing:border-box;padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding)}.el-card__body{padding:var(--el-card-padding)}.el-card__footer{border-top:1px solid var(--el-card-border-color);box-sizing:border-box;padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding)}.el-carousel__item{display:inline-block;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.el-carousel__item,.el-carousel__item.is-active{z-index:calc(var(--el-index-normal) - 1)}.el-carousel__item--card,.el-carousel__item.is-animating{transition:transform .4s ease-in-out}.el-carousel__item--card{width:50%}.el-carousel__item--card.is-in-stage{cursor:pointer;z-index:var(--el-index-normal)}.el-carousel__item--card.is-in-stage.is-hover .el-carousel__mask,.el-carousel__item--card.is-in-stage:hover .el-carousel__mask{opacity:.12}.el-carousel__item--card.is-active{z-index:calc(var(--el-index-normal) + 1)}.el-carousel__item--card-vertical{height:50%;width:100%}.el-carousel__mask{background-color:var(--el-color-white);height:100%;left:0;opacity:.24;position:absolute;top:0;transition:var(--el-transition-duration-fast);width:100%}.el-carousel{--el-carousel-arrow-font-size:12px;--el-carousel-arrow-size:36px;--el-carousel-arrow-background:rgba(31,45,61,.11);--el-carousel-arrow-hover-background:rgba(31,45,61,.23);--el-carousel-indicator-width:30px;--el-carousel-indicator-height:2px;--el-carousel-indicator-padding-horizontal:4px;--el-carousel-indicator-padding-vertical:12px;--el-carousel-indicator-out-color:var(--el-border-color-hover);position:relative}.el-carousel--horizontal,.el-carousel--vertical{overflow:hidden}.el-carousel__container{height:300px;position:relative}.el-carousel__arrow{align-items:center;background-color:var(--el-carousel-arrow-background);border:none;border-radius:50%;color:#fff;cursor:pointer;display:inline-flex;font-size:var(--el-carousel-arrow-font-size);height:var(--el-carousel-arrow-size);justify-content:center;margin:0;outline:none;padding:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);transition:var(--el-transition-duration);width:var(--el-carousel-arrow-size);z-index:10}.el-carousel__arrow--left{left:16px}.el-carousel__arrow--right{right:16px}.el-carousel__arrow:hover{background-color:var(--el-carousel-arrow-hover-background)}.el-carousel__arrow i{cursor:pointer}.el-carousel__indicators{list-style:none;margin:0;padding:0;position:absolute;z-index:calc(var(--el-index-normal) + 1)}.el-carousel__indicators--horizontal{bottom:0;left:50%;transform:translate(-50%)}.el-carousel__indicators--vertical{right:0;top:50%;transform:translateY(-50%)}.el-carousel__indicators--outside{bottom:calc(var(--el-carousel-indicator-height) + var(--el-carousel-indicator-padding-vertical)*2);position:static;text-align:center;transform:none}.el-carousel__indicators--outside .el-carousel__indicator:hover button{opacity:.64}.el-carousel__indicators--outside button{background-color:var(--el-carousel-indicator-out-color);opacity:.24}.el-carousel__indicators--right{right:0}.el-carousel__indicators--labels{left:0;right:0;text-align:center;transform:none}.el-carousel__indicators--labels .el-carousel__button{color:#000;font-size:12px;height:auto;padding:2px 18px;width:auto}.el-carousel__indicators--labels .el-carousel__indicator{padding:6px 4px}.el-carousel__indicator{background-color:transparent;cursor:pointer}.el-carousel__indicator:hover button{opacity:.72}.el-carousel__indicator--horizontal{display:inline-block;padding:var(--el-carousel-indicator-padding-vertical) var(--el-carousel-indicator-padding-horizontal)}.el-carousel__indicator--vertical{padding:var(--el-carousel-indicator-padding-horizontal) var(--el-carousel-indicator-padding-vertical)}.el-carousel__indicator--vertical .el-carousel__button{height:calc(var(--el-carousel-indicator-width)/2);width:var(--el-carousel-indicator-height)}.el-carousel__indicator.is-active button{opacity:1}.el-carousel__button{background-color:#fff;border:none;cursor:pointer;display:block;height:var(--el-carousel-indicator-height);margin:0;opacity:.48;outline:none;padding:0;transition:var(--el-transition-duration);width:var(--el-carousel-indicator-width)}.carousel-arrow-left-enter-from,.carousel-arrow-left-leave-active{opacity:0;transform:translateY(-50%) translate(-10px)}.carousel-arrow-right-enter-from,.carousel-arrow-right-leave-active{opacity:0;transform:translateY(-50%) translate(10px)}.el-transitioning{filter:url(#elCarouselHorizontal)}.el-transitioning-vertical{filter:url(#elCarouselVertical)}.el-cascader-panel{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);border-radius:var(--el-cascader-menu-radius);display:flex;font-size:var(--el-cascader-menu-font-size)}.el-cascader-panel.is-bordered{border:var(--el-cascader-menu-border);border-radius:var(--el-cascader-menu-radius)}.el-cascader-menu{border-right:var(--el-cascader-menu-border);box-sizing:border-box;color:var(--el-cascader-menu-text-color);min-width:180px}.el-cascader-menu:last-child{border-right:none}.el-cascader-menu:last-child .el-cascader-node{padding-right:20px}.el-cascader-menu__wrap.el-scrollbar__wrap{height:204px}.el-cascader-menu__list{box-sizing:border-box;list-style:none;margin:0;min-height:100%;padding:6px 0;position:relative}.el-cascader-menu__hover-zone{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.el-cascader-menu__empty-text{align-items:center;color:var(--el-cascader-color-empty);display:flex;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.el-cascader-menu__empty-text .is-loading{margin-right:2px}.el-cascader-node{align-items:center;display:flex;height:34px;line-height:34px;outline:none;padding:0 30px 0 20px;position:relative}.el-cascader-node.is-selectable.in-active-path{color:var(--el-cascader-menu-text-color)}.el-cascader-node.in-active-path,.el-cascader-node.is-active,.el-cascader-node.is-selectable.in-checked-path{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader-node:not(.is-disabled){cursor:pointer}.el-cascader-node:not(.is-disabled):focus,.el-cascader-node:not(.is-disabled):hover{background:var(--el-cascader-node-background-hover)}.el-cascader-node.is-disabled{color:var(--el-cascader-node-color-disabled);cursor:not-allowed}.el-cascader-node__prefix{left:10px;position:absolute}.el-cascader-node__postfix{position:absolute;right:10px}.el-cascader-node__label{flex:1;overflow:hidden;padding:0 8px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-cascader-node>.el-checkbox{margin-right:0}.el-cascader-node>.el-radio{margin-right:0}.el-cascader-node>.el-radio .el-radio__label{padding-left:0}.el-cascader{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);display:inline-block;font-size:var(--el-font-size-base);line-height:32px;outline:none;position:relative;vertical-align:middle}.el-cascader:not(.is-disabled):hover .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset;cursor:pointer}.el-cascader .el-input{cursor:pointer;display:flex}.el-cascader .el-input .el-input__inner{cursor:pointer;text-overflow:ellipsis}.el-cascader .el-input .el-input__suffix-inner .el-icon{height:calc(100% - 2px)}.el-cascader .el-input .el-input__suffix-inner .el-icon svg{vertical-align:middle}.el-cascader .el-input .icon-arrow-down{font-size:14px;transition:transform var(--el-transition-duration)}.el-cascader .el-input .icon-arrow-down.is-reverse{transform:rotate(180deg)}.el-cascader .el-input .icon-circle-close:hover{color:var(--el-input-clear-hover-color,var(--el-text-color-secondary))}.el-cascader .el-input.is-focus .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-cascader--large{font-size:14px;line-height:40px}.el-cascader--small{font-size:12px;line-height:24px}.el-cascader.is-disabled .el-cascader__label{color:var(--el-disabled-text-color);z-index:calc(var(--el-index-normal) + 1)}.el-cascader__dropdown{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);border-radius:var(--el-cascader-menu-radius);font-size:var(--el-cascader-menu-font-size)}.el-cascader__dropdown.el-popper{background:var(--el-cascader-menu-fill);border:var(--el-cascader-menu-border)}.el-cascader__dropdown.el-popper .el-popper__arrow:before{border:var(--el-cascader-menu-border)}.el-cascader__dropdown.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-cascader__dropdown.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-cascader__dropdown.el-popper{box-shadow:var(--el-cascader-menu-shadow)}.el-cascader__tags{box-sizing:border-box;display:flex;flex-wrap:wrap;left:0;line-height:normal;position:absolute;right:30px;text-align:left;top:50%;transform:translateY(-50%)}.el-cascader__tags .el-tag{align-items:center;background:var(--el-cascader-tag-background);display:inline-flex;margin:2px 0 2px 6px;max-width:100%;text-overflow:ellipsis}.el-cascader__tags .el-tag:not(.is-hit){border-color:transparent}.el-cascader__tags .el-tag>span{flex:1;overflow:hidden;text-overflow:ellipsis}.el-cascader__tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__tags.is-validate{right:55px}.el-cascader__collapse-tags{white-space:normal;z-index:var(--el-index-normal)}.el-cascader__collapse-tags .el-tag{align-items:center;background:var(--el-fill-color);display:inline-flex;margin:2px 0 2px 6px;max-width:100%;text-overflow:ellipsis}.el-cascader__collapse-tags .el-tag:not(.is-hit){border-color:transparent}.el-cascader__collapse-tags .el-tag>span{flex:1;overflow:hidden;text-overflow:ellipsis}.el-cascader__collapse-tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__collapse-tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__suggestion-panel{border-radius:var(--el-cascader-menu-radius)}.el-cascader__suggestion-list{color:var(--el-cascader-menu-text-color);font-size:var(--el-font-size-base);margin:0;max-height:204px;padding:6px 0;text-align:center}.el-cascader__suggestion-item{align-items:center;cursor:pointer;display:flex;height:34px;justify-content:space-between;outline:none;padding:0 15px;text-align:left}.el-cascader__suggestion-item:focus,.el-cascader__suggestion-item:hover{background:var(--el-cascader-node-background-hover)}.el-cascader__suggestion-item.is-checked{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader__suggestion-item>span{margin-right:10px}.el-cascader__empty-text{color:var(--el-cascader-color-empty);margin:10px 0}.el-cascader__search-input{background:transparent;border:none;box-sizing:border-box;color:var(--el-cascader-menu-text-color);flex:1;height:24px;margin:2px 0 2px 11px;min-width:60px;outline:none;padding:0}.el-cascader__search-input::-moz-placeholder{color:transparent}.el-cascader__search-input:-ms-input-placeholder{color:transparent}.el-cascader__search-input::placeholder{color:transparent}.el-check-tag{background-color:var(--el-color-info-light-9);border-radius:var(--el-border-radius-base);color:var(--el-color-info);cursor:pointer;display:inline-block;font-size:var(--el-font-size-base);font-weight:700;line-height:var(--el-font-size-base);padding:7px 15px;transition:var(--el-transition-all)}.el-check-tag:hover{background-color:var(--el-color-info-light-7)}.el-check-tag.is-checked.el-check-tag--primary{background-color:var(--el-color-primary-light-8);color:var(--el-color-primary)}.el-check-tag.is-checked.el-check-tag--primary:hover{background-color:var(--el-color-primary-light-7)}.el-check-tag.is-checked.el-check-tag--success{background-color:var(--el-color-success-light-8);color:var(--el-color-success)}.el-check-tag.is-checked.el-check-tag--success:hover{background-color:var(--el-color-success-light-7)}.el-check-tag.is-checked.el-check-tag--warning{background-color:var(--el-color-warning-light-8);color:var(--el-color-warning)}.el-check-tag.is-checked.el-check-tag--warning:hover{background-color:var(--el-color-warning-light-7)}.el-check-tag.is-checked.el-check-tag--danger{background-color:var(--el-color-danger-light-8);color:var(--el-color-danger)}.el-check-tag.is-checked.el-check-tag--danger:hover{background-color:var(--el-color-danger-light-7)}.el-check-tag.is-checked.el-check-tag--error{background-color:var(--el-color-error-light-8);color:var(--el-color-error)}.el-check-tag.is-checked.el-check-tag--error:hover{background-color:var(--el-color-error-light-7)}.el-check-tag.is-checked.el-check-tag--info{background-color:var(--el-color-info-light-8);color:var(--el-color-info)}.el-check-tag.is-checked.el-check-tag--info:hover{background-color:var(--el-color-info-light-7)}.el-checkbox-button{--el-checkbox-button-checked-bg-color:var(--el-color-primary);--el-checkbox-button-checked-text-color:var(--el-color-white);--el-checkbox-button-checked-border-color:var(--el-color-primary);display:inline-block;position:relative}.el-checkbox-button__inner{-webkit-appearance:none;background:var(--el-button-bg-color,var(--el-fill-color-blank));border:var(--el-border);border-left-color:transparent;border-radius:0;box-sizing:border-box;color:var(--el-button-text-color,var(--el-text-color-regular));cursor:pointer;display:inline-block;font-size:var(--el-font-size-base);font-weight:var(--el-checkbox-font-weight);line-height:1;margin:0;outline:none;padding:8px 15px;position:relative;text-align:center;transition:var(--el-transition-all);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-checkbox-button__inner.is-round{padding:8px 15px}.el-checkbox-button__inner:hover{color:var(--el-color-primary)}.el-checkbox-button__inner [class*=el-icon-]{line-height:.9}.el-checkbox-button__inner [class*=el-icon-]+span{margin-left:5px}.el-checkbox-button__original{margin:0;opacity:0;outline:none;position:absolute;z-index:-1}.el-checkbox-button.is-checked .el-checkbox-button__inner{background-color:var(--el-checkbox-button-checked-bg-color);border-color:var(--el-checkbox-button-checked-border-color);box-shadow:-1px 0 0 0 var(--el-color-primary-light-7);color:var(--el-checkbox-button-checked-text-color)}.el-checkbox-button.is-checked:first-child .el-checkbox-button__inner{border-left-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button.is-disabled .el-checkbox-button__inner{background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));background-image:none;border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none;color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox-button.is-disabled:first-child .el-checkbox-button__inner{border-left-color:var(--el-button-disabled-border-color,var(--el-border-color-light))}.el-checkbox-button:first-child .el-checkbox-button__inner{border-bottom-left-radius:var(--el-border-radius-base);border-left:var(--el-border);border-top-left-radius:var(--el-border-radius-base);box-shadow:none!important}.el-checkbox-button.is-focus .el-checkbox-button__inner{border-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button:last-child .el-checkbox-button__inner{border-bottom-right-radius:var(--el-border-radius-base);border-top-right-radius:var(--el-border-radius-base)}.el-checkbox-button--large .el-checkbox-button__inner{border-radius:0;font-size:var(--el-font-size-base);padding:12px 19px}.el-checkbox-button--large .el-checkbox-button__inner.is-round{padding:12px 19px}.el-checkbox-button--small .el-checkbox-button__inner{border-radius:0;font-size:12px;padding:5px 11px}.el-checkbox-button--small .el-checkbox-button__inner.is-round{padding:5px 11px}.el-checkbox-group{font-size:0;line-height:0}.el-checkbox{--el-checkbox-font-size:14px;--el-checkbox-font-weight:var(--el-font-weight-primary);--el-checkbox-text-color:var(--el-text-color-regular);--el-checkbox-input-height:14px;--el-checkbox-input-width:14px;--el-checkbox-border-radius:var(--el-border-radius-small);--el-checkbox-bg-color:var(--el-fill-color-blank);--el-checkbox-input-border:var(--el-border);--el-checkbox-disabled-border-color:var(--el-border-color);--el-checkbox-disabled-input-fill:var(--el-fill-color-light);--el-checkbox-disabled-icon-color:var(--el-text-color-placeholder);--el-checkbox-disabled-checked-input-fill:var(--el-border-color-extra-light);--el-checkbox-disabled-checked-input-border-color:var(--el-border-color);--el-checkbox-disabled-checked-icon-color:var(--el-text-color-placeholder);--el-checkbox-checked-text-color:var(--el-color-primary);--el-checkbox-checked-input-border-color:var(--el-color-primary);--el-checkbox-checked-bg-color:var(--el-color-primary);--el-checkbox-checked-icon-color:var(--el-color-white);--el-checkbox-input-border-color-hover:var(--el-color-primary);align-items:center;color:var(--el-checkbox-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-checkbox-font-weight);height:var(--el-checkbox-height,32px);margin-right:30px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-checkbox.is-disabled{cursor:not-allowed}.el-checkbox.is-bordered{border:var(--el-border);border-radius:var(--el-border-radius-base);box-sizing:border-box;padding:0 15px 0 9px}.el-checkbox.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-checkbox.is-bordered.is-disabled{border-color:var(--el-border-color-lighter)}.el-checkbox.is-bordered.el-checkbox--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__label{font-size:var(--el-font-size-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.is-bordered.el-checkbox--small{border-radius:calc(var(--el-border-radius-base) - 1px);padding:0 11px 0 7px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox input:focus-visible+.el-checkbox__inner{border-radius:var(--el-checkbox-border-radius);outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px}.el-checkbox__input{cursor:pointer;display:inline-flex;outline:none;position:relative;white-space:nowrap}.el-checkbox__input.is-disabled .el-checkbox__inner{background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color);cursor:not-allowed}.el-checkbox__input.is-disabled .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-icon-color);cursor:not-allowed}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-disabled-checked-icon-color);border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled+span.el-checkbox__label{color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox__input.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-checked-icon-color);transform:rotate(45deg) scaleY(1)}.el-checkbox__input.is-checked+.el-checkbox__label{color:var(--el-checkbox-checked-text-color)}.el-checkbox__input.is-focus:not(.is-checked) .el-checkbox__original:not(:focus-visible){border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__input.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-checked-icon-color);content:"";display:block;height:2px;left:0;position:absolute;right:0;top:5px;transform:scale(.5)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{background-color:var(--el-checkbox-bg-color);border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;display:inline-block;height:var(--el-checkbox-input-height);position:relative;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46),outline .25s cubic-bezier(.71,-.46,.29,1.46);width:var(--el-checkbox-input-width);z-index:var(--el-index-normal)}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{border:1px solid transparent;border-left:0;border-top:0;box-sizing:content-box;content:"";height:7px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);transform-origin:center;transition:transform .15s ease-in .05s;width:3px}.el-checkbox__original{height:0;margin:0;opacity:0;outline:none;position:absolute;width:0;z-index:-1}.el-checkbox__label{display:inline-block;font-size:var(--el-checkbox-font-size);line-height:1;padding-left:8px}.el-checkbox.el-checkbox--large{height:40px}.el-checkbox.el-checkbox--large .el-checkbox__label{font-size:14px}.el-checkbox.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.el-checkbox--small{height:24px}.el-checkbox.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.el-checkbox--small .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{top:4px}.el-checkbox.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox:last-of-type{margin-right:0}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{display:block;min-height:1px}.el-col-0{flex:0 0 0%;max-width:0}.el-col-0,.el-col-0.is-guttered{display:none}.el-col-offset-0{margin-left:0}.el-col-pull-0{position:relative;right:0}.el-col-push-0{left:0;position:relative}.el-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-1,.el-col-1.is-guttered{display:block}.el-col-offset-1{margin-left:4.1666666667%}.el-col-pull-1{position:relative;right:4.1666666667%}.el-col-push-1{left:4.1666666667%;position:relative}.el-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-2,.el-col-2.is-guttered{display:block}.el-col-offset-2{margin-left:8.3333333333%}.el-col-pull-2{position:relative;right:8.3333333333%}.el-col-push-2{left:8.3333333333%;position:relative}.el-col-3{flex:0 0 12.5%;max-width:12.5%}.el-col-3,.el-col-3.is-guttered{display:block}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{left:12.5%;position:relative}.el-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-4,.el-col-4.is-guttered{display:block}.el-col-offset-4{margin-left:16.6666666667%}.el-col-pull-4{position:relative;right:16.6666666667%}.el-col-push-4{left:16.6666666667%;position:relative}.el-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-5,.el-col-5.is-guttered{display:block}.el-col-offset-5{margin-left:20.8333333333%}.el-col-pull-5{position:relative;right:20.8333333333%}.el-col-push-5{left:20.8333333333%;position:relative}.el-col-6{flex:0 0 25%;max-width:25%}.el-col-6,.el-col-6.is-guttered{display:block}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{left:25%;position:relative}.el-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-7,.el-col-7.is-guttered{display:block}.el-col-offset-7{margin-left:29.1666666667%}.el-col-pull-7{position:relative;right:29.1666666667%}.el-col-push-7{left:29.1666666667%;position:relative}.el-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-8,.el-col-8.is-guttered{display:block}.el-col-offset-8{margin-left:33.3333333333%}.el-col-pull-8{position:relative;right:33.3333333333%}.el-col-push-8{left:33.3333333333%;position:relative}.el-col-9{flex:0 0 37.5%;max-width:37.5%}.el-col-9,.el-col-9.is-guttered{display:block}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{left:37.5%;position:relative}.el-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-10,.el-col-10.is-guttered{display:block}.el-col-offset-10{margin-left:41.6666666667%}.el-col-pull-10{position:relative;right:41.6666666667%}.el-col-push-10{left:41.6666666667%;position:relative}.el-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-11,.el-col-11.is-guttered{display:block}.el-col-offset-11{margin-left:45.8333333333%}.el-col-pull-11{position:relative;right:45.8333333333%}.el-col-push-11{left:45.8333333333%;position:relative}.el-col-12{flex:0 0 50%;max-width:50%}.el-col-12,.el-col-12.is-guttered{display:block}.el-col-offset-12{margin-left:50%}.el-col-pull-12{position:relative;right:50%}.el-col-push-12{left:50%;position:relative}.el-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-13,.el-col-13.is-guttered{display:block}.el-col-offset-13{margin-left:54.1666666667%}.el-col-pull-13{position:relative;right:54.1666666667%}.el-col-push-13{left:54.1666666667%;position:relative}.el-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-14,.el-col-14.is-guttered{display:block}.el-col-offset-14{margin-left:58.3333333333%}.el-col-pull-14{position:relative;right:58.3333333333%}.el-col-push-14{left:58.3333333333%;position:relative}.el-col-15{flex:0 0 62.5%;max-width:62.5%}.el-col-15,.el-col-15.is-guttered{display:block}.el-col-offset-15{margin-left:62.5%}.el-col-pull-15{position:relative;right:62.5%}.el-col-push-15{left:62.5%;position:relative}.el-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-16,.el-col-16.is-guttered{display:block}.el-col-offset-16{margin-left:66.6666666667%}.el-col-pull-16{position:relative;right:66.6666666667%}.el-col-push-16{left:66.6666666667%;position:relative}.el-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-17,.el-col-17.is-guttered{display:block}.el-col-offset-17{margin-left:70.8333333333%}.el-col-pull-17{position:relative;right:70.8333333333%}.el-col-push-17{left:70.8333333333%;position:relative}.el-col-18{flex:0 0 75%;max-width:75%}.el-col-18,.el-col-18.is-guttered{display:block}.el-col-offset-18{margin-left:75%}.el-col-pull-18{position:relative;right:75%}.el-col-push-18{left:75%;position:relative}.el-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-19,.el-col-19.is-guttered{display:block}.el-col-offset-19{margin-left:79.1666666667%}.el-col-pull-19{position:relative;right:79.1666666667%}.el-col-push-19{left:79.1666666667%;position:relative}.el-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-20,.el-col-20.is-guttered{display:block}.el-col-offset-20{margin-left:83.3333333333%}.el-col-pull-20{position:relative;right:83.3333333333%}.el-col-push-20{left:83.3333333333%;position:relative}.el-col-21{flex:0 0 87.5%;max-width:87.5%}.el-col-21,.el-col-21.is-guttered{display:block}.el-col-offset-21{margin-left:87.5%}.el-col-pull-21{position:relative;right:87.5%}.el-col-push-21{left:87.5%;position:relative}.el-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-22,.el-col-22.is-guttered{display:block}.el-col-offset-22{margin-left:91.6666666667%}.el-col-pull-22{position:relative;right:91.6666666667%}.el-col-push-22{left:91.6666666667%;position:relative}.el-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-23,.el-col-23.is-guttered{display:block}.el-col-offset-23{margin-left:95.8333333333%}.el-col-pull-23{position:relative;right:95.8333333333%}.el-col-push-23{left:95.8333333333%;position:relative}.el-col-24{flex:0 0 100%;max-width:100%}.el-col-24,.el-col-24.is-guttered{display:block}.el-col-offset-24{margin-left:100%}.el-col-pull-24{position:relative;right:100%}.el-col-push-24{left:100%;position:relative}@media only screen and (max-width:767px){.el-col-xs-0{display:none;flex:0 0 0%;max-width:0}.el-col-xs-0.is-guttered{display:none}.el-col-xs-offset-0{margin-left:0}.el-col-xs-pull-0{position:relative;right:0}.el-col-xs-push-0{left:0;position:relative}.el-col-xs-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xs-1,.el-col-xs-1.is-guttered{display:block}.el-col-xs-offset-1{margin-left:4.1666666667%}.el-col-xs-pull-1{position:relative;right:4.1666666667%}.el-col-xs-push-1{left:4.1666666667%;position:relative}.el-col-xs-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xs-2,.el-col-xs-2.is-guttered{display:block}.el-col-xs-offset-2{margin-left:8.3333333333%}.el-col-xs-pull-2{position:relative;right:8.3333333333%}.el-col-xs-push-2{left:8.3333333333%;position:relative}.el-col-xs-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xs-3,.el-col-xs-3.is-guttered{display:block}.el-col-xs-offset-3{margin-left:12.5%}.el-col-xs-pull-3{position:relative;right:12.5%}.el-col-xs-push-3{left:12.5%;position:relative}.el-col-xs-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xs-4,.el-col-xs-4.is-guttered{display:block}.el-col-xs-offset-4{margin-left:16.6666666667%}.el-col-xs-pull-4{position:relative;right:16.6666666667%}.el-col-xs-push-4{left:16.6666666667%;position:relative}.el-col-xs-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xs-5,.el-col-xs-5.is-guttered{display:block}.el-col-xs-offset-5{margin-left:20.8333333333%}.el-col-xs-pull-5{position:relative;right:20.8333333333%}.el-col-xs-push-5{left:20.8333333333%;position:relative}.el-col-xs-6{flex:0 0 25%;max-width:25%}.el-col-xs-6,.el-col-xs-6.is-guttered{display:block}.el-col-xs-offset-6{margin-left:25%}.el-col-xs-pull-6{position:relative;right:25%}.el-col-xs-push-6{left:25%;position:relative}.el-col-xs-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xs-7,.el-col-xs-7.is-guttered{display:block}.el-col-xs-offset-7{margin-left:29.1666666667%}.el-col-xs-pull-7{position:relative;right:29.1666666667%}.el-col-xs-push-7{left:29.1666666667%;position:relative}.el-col-xs-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xs-8,.el-col-xs-8.is-guttered{display:block}.el-col-xs-offset-8{margin-left:33.3333333333%}.el-col-xs-pull-8{position:relative;right:33.3333333333%}.el-col-xs-push-8{left:33.3333333333%;position:relative}.el-col-xs-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xs-9,.el-col-xs-9.is-guttered{display:block}.el-col-xs-offset-9{margin-left:37.5%}.el-col-xs-pull-9{position:relative;right:37.5%}.el-col-xs-push-9{left:37.5%;position:relative}.el-col-xs-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xs-10.is-guttered{display:block}.el-col-xs-offset-10{margin-left:41.6666666667%}.el-col-xs-pull-10{position:relative;right:41.6666666667%}.el-col-xs-push-10{left:41.6666666667%;position:relative}.el-col-xs-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xs-11.is-guttered{display:block}.el-col-xs-offset-11{margin-left:45.8333333333%}.el-col-xs-pull-11{position:relative;right:45.8333333333%}.el-col-xs-push-11{left:45.8333333333%;position:relative}.el-col-xs-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xs-12.is-guttered{display:block}.el-col-xs-offset-12{margin-left:50%}.el-col-xs-pull-12{position:relative;right:50%}.el-col-xs-push-12{left:50%;position:relative}.el-col-xs-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xs-13.is-guttered{display:block}.el-col-xs-offset-13{margin-left:54.1666666667%}.el-col-xs-pull-13{position:relative;right:54.1666666667%}.el-col-xs-push-13{left:54.1666666667%;position:relative}.el-col-xs-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xs-14.is-guttered{display:block}.el-col-xs-offset-14{margin-left:58.3333333333%}.el-col-xs-pull-14{position:relative;right:58.3333333333%}.el-col-xs-push-14{left:58.3333333333%;position:relative}.el-col-xs-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xs-15.is-guttered{display:block}.el-col-xs-offset-15{margin-left:62.5%}.el-col-xs-pull-15{position:relative;right:62.5%}.el-col-xs-push-15{left:62.5%;position:relative}.el-col-xs-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xs-16.is-guttered{display:block}.el-col-xs-offset-16{margin-left:66.6666666667%}.el-col-xs-pull-16{position:relative;right:66.6666666667%}.el-col-xs-push-16{left:66.6666666667%;position:relative}.el-col-xs-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xs-17.is-guttered{display:block}.el-col-xs-offset-17{margin-left:70.8333333333%}.el-col-xs-pull-17{position:relative;right:70.8333333333%}.el-col-xs-push-17{left:70.8333333333%;position:relative}.el-col-xs-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xs-18.is-guttered{display:block}.el-col-xs-offset-18{margin-left:75%}.el-col-xs-pull-18{position:relative;right:75%}.el-col-xs-push-18{left:75%;position:relative}.el-col-xs-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xs-19.is-guttered{display:block}.el-col-xs-offset-19{margin-left:79.1666666667%}.el-col-xs-pull-19{position:relative;right:79.1666666667%}.el-col-xs-push-19{left:79.1666666667%;position:relative}.el-col-xs-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xs-20.is-guttered{display:block}.el-col-xs-offset-20{margin-left:83.3333333333%}.el-col-xs-pull-20{position:relative;right:83.3333333333%}.el-col-xs-push-20{left:83.3333333333%;position:relative}.el-col-xs-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xs-21.is-guttered{display:block}.el-col-xs-offset-21{margin-left:87.5%}.el-col-xs-pull-21{position:relative;right:87.5%}.el-col-xs-push-21{left:87.5%;position:relative}.el-col-xs-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xs-22.is-guttered{display:block}.el-col-xs-offset-22{margin-left:91.6666666667%}.el-col-xs-pull-22{position:relative;right:91.6666666667%}.el-col-xs-push-22{left:91.6666666667%;position:relative}.el-col-xs-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xs-23.is-guttered{display:block}.el-col-xs-offset-23{margin-left:95.8333333333%}.el-col-xs-pull-23{position:relative;right:95.8333333333%}.el-col-xs-push-23{left:95.8333333333%;position:relative}.el-col-xs-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xs-24.is-guttered{display:block}.el-col-xs-offset-24{margin-left:100%}.el-col-xs-pull-24{position:relative;right:100%}.el-col-xs-push-24{left:100%;position:relative}}@media only screen and (min-width:768px){.el-col-sm-0{display:none;flex:0 0 0%;max-width:0}.el-col-sm-0.is-guttered{display:none}.el-col-sm-offset-0{margin-left:0}.el-col-sm-pull-0{position:relative;right:0}.el-col-sm-push-0{left:0;position:relative}.el-col-sm-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-sm-1,.el-col-sm-1.is-guttered{display:block}.el-col-sm-offset-1{margin-left:4.1666666667%}.el-col-sm-pull-1{position:relative;right:4.1666666667%}.el-col-sm-push-1{left:4.1666666667%;position:relative}.el-col-sm-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-sm-2,.el-col-sm-2.is-guttered{display:block}.el-col-sm-offset-2{margin-left:8.3333333333%}.el-col-sm-pull-2{position:relative;right:8.3333333333%}.el-col-sm-push-2{left:8.3333333333%;position:relative}.el-col-sm-3{flex:0 0 12.5%;max-width:12.5%}.el-col-sm-3,.el-col-sm-3.is-guttered{display:block}.el-col-sm-offset-3{margin-left:12.5%}.el-col-sm-pull-3{position:relative;right:12.5%}.el-col-sm-push-3{left:12.5%;position:relative}.el-col-sm-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-sm-4,.el-col-sm-4.is-guttered{display:block}.el-col-sm-offset-4{margin-left:16.6666666667%}.el-col-sm-pull-4{position:relative;right:16.6666666667%}.el-col-sm-push-4{left:16.6666666667%;position:relative}.el-col-sm-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-sm-5,.el-col-sm-5.is-guttered{display:block}.el-col-sm-offset-5{margin-left:20.8333333333%}.el-col-sm-pull-5{position:relative;right:20.8333333333%}.el-col-sm-push-5{left:20.8333333333%;position:relative}.el-col-sm-6{flex:0 0 25%;max-width:25%}.el-col-sm-6,.el-col-sm-6.is-guttered{display:block}.el-col-sm-offset-6{margin-left:25%}.el-col-sm-pull-6{position:relative;right:25%}.el-col-sm-push-6{left:25%;position:relative}.el-col-sm-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-sm-7,.el-col-sm-7.is-guttered{display:block}.el-col-sm-offset-7{margin-left:29.1666666667%}.el-col-sm-pull-7{position:relative;right:29.1666666667%}.el-col-sm-push-7{left:29.1666666667%;position:relative}.el-col-sm-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-sm-8,.el-col-sm-8.is-guttered{display:block}.el-col-sm-offset-8{margin-left:33.3333333333%}.el-col-sm-pull-8{position:relative;right:33.3333333333%}.el-col-sm-push-8{left:33.3333333333%;position:relative}.el-col-sm-9{flex:0 0 37.5%;max-width:37.5%}.el-col-sm-9,.el-col-sm-9.is-guttered{display:block}.el-col-sm-offset-9{margin-left:37.5%}.el-col-sm-pull-9{position:relative;right:37.5%}.el-col-sm-push-9{left:37.5%;position:relative}.el-col-sm-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-sm-10.is-guttered{display:block}.el-col-sm-offset-10{margin-left:41.6666666667%}.el-col-sm-pull-10{position:relative;right:41.6666666667%}.el-col-sm-push-10{left:41.6666666667%;position:relative}.el-col-sm-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-sm-11.is-guttered{display:block}.el-col-sm-offset-11{margin-left:45.8333333333%}.el-col-sm-pull-11{position:relative;right:45.8333333333%}.el-col-sm-push-11{left:45.8333333333%;position:relative}.el-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.el-col-sm-12.is-guttered{display:block}.el-col-sm-offset-12{margin-left:50%}.el-col-sm-pull-12{position:relative;right:50%}.el-col-sm-push-12{left:50%;position:relative}.el-col-sm-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-sm-13.is-guttered{display:block}.el-col-sm-offset-13{margin-left:54.1666666667%}.el-col-sm-pull-13{position:relative;right:54.1666666667%}.el-col-sm-push-13{left:54.1666666667%;position:relative}.el-col-sm-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-sm-14.is-guttered{display:block}.el-col-sm-offset-14{margin-left:58.3333333333%}.el-col-sm-pull-14{position:relative;right:58.3333333333%}.el-col-sm-push-14{left:58.3333333333%;position:relative}.el-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-sm-15.is-guttered{display:block}.el-col-sm-offset-15{margin-left:62.5%}.el-col-sm-pull-15{position:relative;right:62.5%}.el-col-sm-push-15{left:62.5%;position:relative}.el-col-sm-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-sm-16.is-guttered{display:block}.el-col-sm-offset-16{margin-left:66.6666666667%}.el-col-sm-pull-16{position:relative;right:66.6666666667%}.el-col-sm-push-16{left:66.6666666667%;position:relative}.el-col-sm-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-sm-17.is-guttered{display:block}.el-col-sm-offset-17{margin-left:70.8333333333%}.el-col-sm-pull-17{position:relative;right:70.8333333333%}.el-col-sm-push-17{left:70.8333333333%;position:relative}.el-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.el-col-sm-18.is-guttered{display:block}.el-col-sm-offset-18{margin-left:75%}.el-col-sm-pull-18{position:relative;right:75%}.el-col-sm-push-18{left:75%;position:relative}.el-col-sm-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-sm-19.is-guttered{display:block}.el-col-sm-offset-19{margin-left:79.1666666667%}.el-col-sm-pull-19{position:relative;right:79.1666666667%}.el-col-sm-push-19{left:79.1666666667%;position:relative}.el-col-sm-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-sm-20.is-guttered{display:block}.el-col-sm-offset-20{margin-left:83.3333333333%}.el-col-sm-pull-20{position:relative;right:83.3333333333%}.el-col-sm-push-20{left:83.3333333333%;position:relative}.el-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-sm-21.is-guttered{display:block}.el-col-sm-offset-21{margin-left:87.5%}.el-col-sm-pull-21{position:relative;right:87.5%}.el-col-sm-push-21{left:87.5%;position:relative}.el-col-sm-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-sm-22.is-guttered{display:block}.el-col-sm-offset-22{margin-left:91.6666666667%}.el-col-sm-pull-22{position:relative;right:91.6666666667%}.el-col-sm-push-22{left:91.6666666667%;position:relative}.el-col-sm-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-sm-23.is-guttered{display:block}.el-col-sm-offset-23{margin-left:95.8333333333%}.el-col-sm-pull-23{position:relative;right:95.8333333333%}.el-col-sm-push-23{left:95.8333333333%;position:relative}.el-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.el-col-sm-24.is-guttered{display:block}.el-col-sm-offset-24{margin-left:100%}.el-col-sm-pull-24{position:relative;right:100%}.el-col-sm-push-24{left:100%;position:relative}}@media only screen and (min-width:992px){.el-col-md-0{display:none;flex:0 0 0%;max-width:0}.el-col-md-0.is-guttered{display:none}.el-col-md-offset-0{margin-left:0}.el-col-md-pull-0{position:relative;right:0}.el-col-md-push-0{left:0;position:relative}.el-col-md-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-md-1,.el-col-md-1.is-guttered{display:block}.el-col-md-offset-1{margin-left:4.1666666667%}.el-col-md-pull-1{position:relative;right:4.1666666667%}.el-col-md-push-1{left:4.1666666667%;position:relative}.el-col-md-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-md-2,.el-col-md-2.is-guttered{display:block}.el-col-md-offset-2{margin-left:8.3333333333%}.el-col-md-pull-2{position:relative;right:8.3333333333%}.el-col-md-push-2{left:8.3333333333%;position:relative}.el-col-md-3{flex:0 0 12.5%;max-width:12.5%}.el-col-md-3,.el-col-md-3.is-guttered{display:block}.el-col-md-offset-3{margin-left:12.5%}.el-col-md-pull-3{position:relative;right:12.5%}.el-col-md-push-3{left:12.5%;position:relative}.el-col-md-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-md-4,.el-col-md-4.is-guttered{display:block}.el-col-md-offset-4{margin-left:16.6666666667%}.el-col-md-pull-4{position:relative;right:16.6666666667%}.el-col-md-push-4{left:16.6666666667%;position:relative}.el-col-md-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-md-5,.el-col-md-5.is-guttered{display:block}.el-col-md-offset-5{margin-left:20.8333333333%}.el-col-md-pull-5{position:relative;right:20.8333333333%}.el-col-md-push-5{left:20.8333333333%;position:relative}.el-col-md-6{flex:0 0 25%;max-width:25%}.el-col-md-6,.el-col-md-6.is-guttered{display:block}.el-col-md-offset-6{margin-left:25%}.el-col-md-pull-6{position:relative;right:25%}.el-col-md-push-6{left:25%;position:relative}.el-col-md-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-md-7,.el-col-md-7.is-guttered{display:block}.el-col-md-offset-7{margin-left:29.1666666667%}.el-col-md-pull-7{position:relative;right:29.1666666667%}.el-col-md-push-7{left:29.1666666667%;position:relative}.el-col-md-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-md-8,.el-col-md-8.is-guttered{display:block}.el-col-md-offset-8{margin-left:33.3333333333%}.el-col-md-pull-8{position:relative;right:33.3333333333%}.el-col-md-push-8{left:33.3333333333%;position:relative}.el-col-md-9{flex:0 0 37.5%;max-width:37.5%}.el-col-md-9,.el-col-md-9.is-guttered{display:block}.el-col-md-offset-9{margin-left:37.5%}.el-col-md-pull-9{position:relative;right:37.5%}.el-col-md-push-9{left:37.5%;position:relative}.el-col-md-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-md-10.is-guttered{display:block}.el-col-md-offset-10{margin-left:41.6666666667%}.el-col-md-pull-10{position:relative;right:41.6666666667%}.el-col-md-push-10{left:41.6666666667%;position:relative}.el-col-md-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-md-11.is-guttered{display:block}.el-col-md-offset-11{margin-left:45.8333333333%}.el-col-md-pull-11{position:relative;right:45.8333333333%}.el-col-md-push-11{left:45.8333333333%;position:relative}.el-col-md-12{display:block;flex:0 0 50%;max-width:50%}.el-col-md-12.is-guttered{display:block}.el-col-md-offset-12{margin-left:50%}.el-col-md-pull-12{position:relative;right:50%}.el-col-md-push-12{left:50%;position:relative}.el-col-md-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-md-13.is-guttered{display:block}.el-col-md-offset-13{margin-left:54.1666666667%}.el-col-md-pull-13{position:relative;right:54.1666666667%}.el-col-md-push-13{left:54.1666666667%;position:relative}.el-col-md-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-md-14.is-guttered{display:block}.el-col-md-offset-14{margin-left:58.3333333333%}.el-col-md-pull-14{position:relative;right:58.3333333333%}.el-col-md-push-14{left:58.3333333333%;position:relative}.el-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-md-15.is-guttered{display:block}.el-col-md-offset-15{margin-left:62.5%}.el-col-md-pull-15{position:relative;right:62.5%}.el-col-md-push-15{left:62.5%;position:relative}.el-col-md-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-md-16.is-guttered{display:block}.el-col-md-offset-16{margin-left:66.6666666667%}.el-col-md-pull-16{position:relative;right:66.6666666667%}.el-col-md-push-16{left:66.6666666667%;position:relative}.el-col-md-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-md-17.is-guttered{display:block}.el-col-md-offset-17{margin-left:70.8333333333%}.el-col-md-pull-17{position:relative;right:70.8333333333%}.el-col-md-push-17{left:70.8333333333%;position:relative}.el-col-md-18{display:block;flex:0 0 75%;max-width:75%}.el-col-md-18.is-guttered{display:block}.el-col-md-offset-18{margin-left:75%}.el-col-md-pull-18{position:relative;right:75%}.el-col-md-push-18{left:75%;position:relative}.el-col-md-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-md-19.is-guttered{display:block}.el-col-md-offset-19{margin-left:79.1666666667%}.el-col-md-pull-19{position:relative;right:79.1666666667%}.el-col-md-push-19{left:79.1666666667%;position:relative}.el-col-md-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-md-20.is-guttered{display:block}.el-col-md-offset-20{margin-left:83.3333333333%}.el-col-md-pull-20{position:relative;right:83.3333333333%}.el-col-md-push-20{left:83.3333333333%;position:relative}.el-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-md-21.is-guttered{display:block}.el-col-md-offset-21{margin-left:87.5%}.el-col-md-pull-21{position:relative;right:87.5%}.el-col-md-push-21{left:87.5%;position:relative}.el-col-md-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-md-22.is-guttered{display:block}.el-col-md-offset-22{margin-left:91.6666666667%}.el-col-md-pull-22{position:relative;right:91.6666666667%}.el-col-md-push-22{left:91.6666666667%;position:relative}.el-col-md-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-md-23.is-guttered{display:block}.el-col-md-offset-23{margin-left:95.8333333333%}.el-col-md-pull-23{position:relative;right:95.8333333333%}.el-col-md-push-23{left:95.8333333333%;position:relative}.el-col-md-24{display:block;flex:0 0 100%;max-width:100%}.el-col-md-24.is-guttered{display:block}.el-col-md-offset-24{margin-left:100%}.el-col-md-pull-24{position:relative;right:100%}.el-col-md-push-24{left:100%;position:relative}}@media only screen and (min-width:1200px){.el-col-lg-0{display:none;flex:0 0 0%;max-width:0}.el-col-lg-0.is-guttered{display:none}.el-col-lg-offset-0{margin-left:0}.el-col-lg-pull-0{position:relative;right:0}.el-col-lg-push-0{left:0;position:relative}.el-col-lg-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-lg-1,.el-col-lg-1.is-guttered{display:block}.el-col-lg-offset-1{margin-left:4.1666666667%}.el-col-lg-pull-1{position:relative;right:4.1666666667%}.el-col-lg-push-1{left:4.1666666667%;position:relative}.el-col-lg-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-lg-2,.el-col-lg-2.is-guttered{display:block}.el-col-lg-offset-2{margin-left:8.3333333333%}.el-col-lg-pull-2{position:relative;right:8.3333333333%}.el-col-lg-push-2{left:8.3333333333%;position:relative}.el-col-lg-3{flex:0 0 12.5%;max-width:12.5%}.el-col-lg-3,.el-col-lg-3.is-guttered{display:block}.el-col-lg-offset-3{margin-left:12.5%}.el-col-lg-pull-3{position:relative;right:12.5%}.el-col-lg-push-3{left:12.5%;position:relative}.el-col-lg-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-lg-4,.el-col-lg-4.is-guttered{display:block}.el-col-lg-offset-4{margin-left:16.6666666667%}.el-col-lg-pull-4{position:relative;right:16.6666666667%}.el-col-lg-push-4{left:16.6666666667%;position:relative}.el-col-lg-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-lg-5,.el-col-lg-5.is-guttered{display:block}.el-col-lg-offset-5{margin-left:20.8333333333%}.el-col-lg-pull-5{position:relative;right:20.8333333333%}.el-col-lg-push-5{left:20.8333333333%;position:relative}.el-col-lg-6{flex:0 0 25%;max-width:25%}.el-col-lg-6,.el-col-lg-6.is-guttered{display:block}.el-col-lg-offset-6{margin-left:25%}.el-col-lg-pull-6{position:relative;right:25%}.el-col-lg-push-6{left:25%;position:relative}.el-col-lg-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-lg-7,.el-col-lg-7.is-guttered{display:block}.el-col-lg-offset-7{margin-left:29.1666666667%}.el-col-lg-pull-7{position:relative;right:29.1666666667%}.el-col-lg-push-7{left:29.1666666667%;position:relative}.el-col-lg-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-lg-8,.el-col-lg-8.is-guttered{display:block}.el-col-lg-offset-8{margin-left:33.3333333333%}.el-col-lg-pull-8{position:relative;right:33.3333333333%}.el-col-lg-push-8{left:33.3333333333%;position:relative}.el-col-lg-9{flex:0 0 37.5%;max-width:37.5%}.el-col-lg-9,.el-col-lg-9.is-guttered{display:block}.el-col-lg-offset-9{margin-left:37.5%}.el-col-lg-pull-9{position:relative;right:37.5%}.el-col-lg-push-9{left:37.5%;position:relative}.el-col-lg-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-lg-10.is-guttered{display:block}.el-col-lg-offset-10{margin-left:41.6666666667%}.el-col-lg-pull-10{position:relative;right:41.6666666667%}.el-col-lg-push-10{left:41.6666666667%;position:relative}.el-col-lg-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-lg-11.is-guttered{display:block}.el-col-lg-offset-11{margin-left:45.8333333333%}.el-col-lg-pull-11{position:relative;right:45.8333333333%}.el-col-lg-push-11{left:45.8333333333%;position:relative}.el-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.el-col-lg-12.is-guttered{display:block}.el-col-lg-offset-12{margin-left:50%}.el-col-lg-pull-12{position:relative;right:50%}.el-col-lg-push-12{left:50%;position:relative}.el-col-lg-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-lg-13.is-guttered{display:block}.el-col-lg-offset-13{margin-left:54.1666666667%}.el-col-lg-pull-13{position:relative;right:54.1666666667%}.el-col-lg-push-13{left:54.1666666667%;position:relative}.el-col-lg-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-lg-14.is-guttered{display:block}.el-col-lg-offset-14{margin-left:58.3333333333%}.el-col-lg-pull-14{position:relative;right:58.3333333333%}.el-col-lg-push-14{left:58.3333333333%;position:relative}.el-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-lg-15.is-guttered{display:block}.el-col-lg-offset-15{margin-left:62.5%}.el-col-lg-pull-15{position:relative;right:62.5%}.el-col-lg-push-15{left:62.5%;position:relative}.el-col-lg-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-lg-16.is-guttered{display:block}.el-col-lg-offset-16{margin-left:66.6666666667%}.el-col-lg-pull-16{position:relative;right:66.6666666667%}.el-col-lg-push-16{left:66.6666666667%;position:relative}.el-col-lg-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-lg-17.is-guttered{display:block}.el-col-lg-offset-17{margin-left:70.8333333333%}.el-col-lg-pull-17{position:relative;right:70.8333333333%}.el-col-lg-push-17{left:70.8333333333%;position:relative}.el-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.el-col-lg-18.is-guttered{display:block}.el-col-lg-offset-18{margin-left:75%}.el-col-lg-pull-18{position:relative;right:75%}.el-col-lg-push-18{left:75%;position:relative}.el-col-lg-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-lg-19.is-guttered{display:block}.el-col-lg-offset-19{margin-left:79.1666666667%}.el-col-lg-pull-19{position:relative;right:79.1666666667%}.el-col-lg-push-19{left:79.1666666667%;position:relative}.el-col-lg-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-lg-20.is-guttered{display:block}.el-col-lg-offset-20{margin-left:83.3333333333%}.el-col-lg-pull-20{position:relative;right:83.3333333333%}.el-col-lg-push-20{left:83.3333333333%;position:relative}.el-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-lg-21.is-guttered{display:block}.el-col-lg-offset-21{margin-left:87.5%}.el-col-lg-pull-21{position:relative;right:87.5%}.el-col-lg-push-21{left:87.5%;position:relative}.el-col-lg-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-lg-22.is-guttered{display:block}.el-col-lg-offset-22{margin-left:91.6666666667%}.el-col-lg-pull-22{position:relative;right:91.6666666667%}.el-col-lg-push-22{left:91.6666666667%;position:relative}.el-col-lg-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-lg-23.is-guttered{display:block}.el-col-lg-offset-23{margin-left:95.8333333333%}.el-col-lg-pull-23{position:relative;right:95.8333333333%}.el-col-lg-push-23{left:95.8333333333%;position:relative}.el-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.el-col-lg-24.is-guttered{display:block}.el-col-lg-offset-24{margin-left:100%}.el-col-lg-pull-24{position:relative;right:100%}.el-col-lg-push-24{left:100%;position:relative}}@media only screen and (min-width:1920px){.el-col-xl-0{display:none;flex:0 0 0%;max-width:0}.el-col-xl-0.is-guttered{display:none}.el-col-xl-offset-0{margin-left:0}.el-col-xl-pull-0{position:relative;right:0}.el-col-xl-push-0{left:0;position:relative}.el-col-xl-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.el-col-xl-1,.el-col-xl-1.is-guttered{display:block}.el-col-xl-offset-1{margin-left:4.1666666667%}.el-col-xl-pull-1{position:relative;right:4.1666666667%}.el-col-xl-push-1{left:4.1666666667%;position:relative}.el-col-xl-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.el-col-xl-2,.el-col-xl-2.is-guttered{display:block}.el-col-xl-offset-2{margin-left:8.3333333333%}.el-col-xl-pull-2{position:relative;right:8.3333333333%}.el-col-xl-push-2{left:8.3333333333%;position:relative}.el-col-xl-3{flex:0 0 12.5%;max-width:12.5%}.el-col-xl-3,.el-col-xl-3.is-guttered{display:block}.el-col-xl-offset-3{margin-left:12.5%}.el-col-xl-pull-3{position:relative;right:12.5%}.el-col-xl-push-3{left:12.5%;position:relative}.el-col-xl-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.el-col-xl-4,.el-col-xl-4.is-guttered{display:block}.el-col-xl-offset-4{margin-left:16.6666666667%}.el-col-xl-pull-4{position:relative;right:16.6666666667%}.el-col-xl-push-4{left:16.6666666667%;position:relative}.el-col-xl-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.el-col-xl-5,.el-col-xl-5.is-guttered{display:block}.el-col-xl-offset-5{margin-left:20.8333333333%}.el-col-xl-pull-5{position:relative;right:20.8333333333%}.el-col-xl-push-5{left:20.8333333333%;position:relative}.el-col-xl-6{flex:0 0 25%;max-width:25%}.el-col-xl-6,.el-col-xl-6.is-guttered{display:block}.el-col-xl-offset-6{margin-left:25%}.el-col-xl-pull-6{position:relative;right:25%}.el-col-xl-push-6{left:25%;position:relative}.el-col-xl-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.el-col-xl-7,.el-col-xl-7.is-guttered{display:block}.el-col-xl-offset-7{margin-left:29.1666666667%}.el-col-xl-pull-7{position:relative;right:29.1666666667%}.el-col-xl-push-7{left:29.1666666667%;position:relative}.el-col-xl-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.el-col-xl-8,.el-col-xl-8.is-guttered{display:block}.el-col-xl-offset-8{margin-left:33.3333333333%}.el-col-xl-pull-8{position:relative;right:33.3333333333%}.el-col-xl-push-8{left:33.3333333333%;position:relative}.el-col-xl-9{flex:0 0 37.5%;max-width:37.5%}.el-col-xl-9,.el-col-xl-9.is-guttered{display:block}.el-col-xl-offset-9{margin-left:37.5%}.el-col-xl-pull-9{position:relative;right:37.5%}.el-col-xl-push-9{left:37.5%;position:relative}.el-col-xl-10{display:block;flex:0 0 41.6666666667%;max-width:41.6666666667%}.el-col-xl-10.is-guttered{display:block}.el-col-xl-offset-10{margin-left:41.6666666667%}.el-col-xl-pull-10{position:relative;right:41.6666666667%}.el-col-xl-push-10{left:41.6666666667%;position:relative}.el-col-xl-11{display:block;flex:0 0 45.8333333333%;max-width:45.8333333333%}.el-col-xl-11.is-guttered{display:block}.el-col-xl-offset-11{margin-left:45.8333333333%}.el-col-xl-pull-11{position:relative;right:45.8333333333%}.el-col-xl-push-11{left:45.8333333333%;position:relative}.el-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.el-col-xl-12.is-guttered{display:block}.el-col-xl-offset-12{margin-left:50%}.el-col-xl-pull-12{position:relative;right:50%}.el-col-xl-push-12{left:50%;position:relative}.el-col-xl-13{display:block;flex:0 0 54.1666666667%;max-width:54.1666666667%}.el-col-xl-13.is-guttered{display:block}.el-col-xl-offset-13{margin-left:54.1666666667%}.el-col-xl-pull-13{position:relative;right:54.1666666667%}.el-col-xl-push-13{left:54.1666666667%;position:relative}.el-col-xl-14{display:block;flex:0 0 58.3333333333%;max-width:58.3333333333%}.el-col-xl-14.is-guttered{display:block}.el-col-xl-offset-14{margin-left:58.3333333333%}.el-col-xl-pull-14{position:relative;right:58.3333333333%}.el-col-xl-push-14{left:58.3333333333%;position:relative}.el-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.el-col-xl-15.is-guttered{display:block}.el-col-xl-offset-15{margin-left:62.5%}.el-col-xl-pull-15{position:relative;right:62.5%}.el-col-xl-push-15{left:62.5%;position:relative}.el-col-xl-16{display:block;flex:0 0 66.6666666667%;max-width:66.6666666667%}.el-col-xl-16.is-guttered{display:block}.el-col-xl-offset-16{margin-left:66.6666666667%}.el-col-xl-pull-16{position:relative;right:66.6666666667%}.el-col-xl-push-16{left:66.6666666667%;position:relative}.el-col-xl-17{display:block;flex:0 0 70.8333333333%;max-width:70.8333333333%}.el-col-xl-17.is-guttered{display:block}.el-col-xl-offset-17{margin-left:70.8333333333%}.el-col-xl-pull-17{position:relative;right:70.8333333333%}.el-col-xl-push-17{left:70.8333333333%;position:relative}.el-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.el-col-xl-18.is-guttered{display:block}.el-col-xl-offset-18{margin-left:75%}.el-col-xl-pull-18{position:relative;right:75%}.el-col-xl-push-18{left:75%;position:relative}.el-col-xl-19{display:block;flex:0 0 79.1666666667%;max-width:79.1666666667%}.el-col-xl-19.is-guttered{display:block}.el-col-xl-offset-19{margin-left:79.1666666667%}.el-col-xl-pull-19{position:relative;right:79.1666666667%}.el-col-xl-push-19{left:79.1666666667%;position:relative}.el-col-xl-20{display:block;flex:0 0 83.3333333333%;max-width:83.3333333333%}.el-col-xl-20.is-guttered{display:block}.el-col-xl-offset-20{margin-left:83.3333333333%}.el-col-xl-pull-20{position:relative;right:83.3333333333%}.el-col-xl-push-20{left:83.3333333333%;position:relative}.el-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.el-col-xl-21.is-guttered{display:block}.el-col-xl-offset-21{margin-left:87.5%}.el-col-xl-pull-21{position:relative;right:87.5%}.el-col-xl-push-21{left:87.5%;position:relative}.el-col-xl-22{display:block;flex:0 0 91.6666666667%;max-width:91.6666666667%}.el-col-xl-22.is-guttered{display:block}.el-col-xl-offset-22{margin-left:91.6666666667%}.el-col-xl-pull-22{position:relative;right:91.6666666667%}.el-col-xl-push-22{left:91.6666666667%;position:relative}.el-col-xl-23{display:block;flex:0 0 95.8333333333%;max-width:95.8333333333%}.el-col-xl-23.is-guttered{display:block}.el-col-xl-offset-23{margin-left:95.8333333333%}.el-col-xl-pull-23{position:relative;right:95.8333333333%}.el-col-xl-push-23{left:95.8333333333%;position:relative}.el-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.el-col-xl-24.is-guttered{display:block}.el-col-xl-offset-24{margin-left:100%}.el-col-xl-pull-24{position:relative;right:100%}.el-col-xl-push-24{left:100%;position:relative}}.el-collapse{--el-collapse-border-color:var(--el-border-color-lighter);--el-collapse-header-height:48px;--el-collapse-header-bg-color:var(--el-fill-color-blank);--el-collapse-header-text-color:var(--el-text-color-primary);--el-collapse-header-font-size:13px;--el-collapse-content-bg-color:var(--el-fill-color-blank);--el-collapse-content-font-size:13px;--el-collapse-content-text-color:var(--el-text-color-primary);border-bottom:1px solid var(--el-collapse-border-color);border-top:1px solid var(--el-collapse-border-color)}.el-collapse-item.is-disabled .el-collapse-item__header{color:var(--el-text-color-disabled);cursor:not-allowed}.el-collapse-item__header{align-items:center;background-color:var(--el-collapse-header-bg-color);border:none;border-bottom:1px solid var(--el-collapse-border-color);color:var(--el-collapse-header-text-color);cursor:pointer;display:flex;font-size:var(--el-collapse-header-font-size);font-weight:500;height:var(--el-collapse-header-height);line-height:var(--el-collapse-header-height);outline:none;padding:0;transition:border-bottom-color var(--el-transition-duration);width:100%}.el-collapse-item__arrow{font-weight:300;margin:0 8px 0 auto;transition:transform var(--el-transition-duration)}.el-collapse-item__arrow.is-active{transform:rotate(90deg)}.el-collapse-item__header.focusing:focus:not(:hover){color:var(--el-color-primary)}.el-collapse-item__header.is-active{border-bottom-color:transparent}.el-collapse-item__wrap{background-color:var(--el-collapse-content-bg-color);border-bottom:1px solid var(--el-collapse-border-color);box-sizing:border-box;overflow:hidden;will-change:height}.el-collapse-item__content{color:var(--el-collapse-content-text-color);font-size:var(--el-collapse-content-font-size);line-height:1.7692307692;padding-bottom:25px}.el-collapse-item:last-child{margin-bottom:-1px}.el-color-predefine{display:flex;font-size:12px;margin-top:8px;width:280px}.el-color-predefine__colors{display:flex;flex:1;flex-wrap:wrap}.el-color-predefine__color-selector{border-radius:4px;cursor:pointer;height:20px;margin:0 0 8px 8px;width:20px}.el-color-predefine__color-selector:nth-child(10n+1){margin-left:0}.el-color-predefine__color-selector.selected{box-shadow:0 0 3px 2px var(--el-color-primary)}.el-color-predefine__color-selector>div{border-radius:3px;display:flex;height:100%}.el-color-predefine__color-selector.is-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.el-color-hue-slider{background-color:red;box-sizing:border-box;float:right;height:12px;padding:0 2px;position:relative;width:280px}.el-color-hue-slider__bar{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red);height:100%;position:relative}.el-color-hue-slider__thumb{background:#fff;border:1px solid var(--el-border-color-lighter);border-radius:1px;box-shadow:0 0 2px #0009;box-sizing:border-box;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:4px;z-index:1}.el-color-hue-slider.is-vertical{height:180px;padding:2px 0;width:12px}.el-color-hue-slider.is-vertical .el-color-hue-slider__bar{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.el-color-hue-slider.is-vertical .el-color-hue-slider__thumb{height:4px;left:0;top:0;width:100%}.el-color-svpanel{height:180px;position:relative;width:280px}.el-color-svpanel__black,.el-color-svpanel__white{bottom:0;left:0;position:absolute;right:0;top:0}.el-color-svpanel__white{background:linear-gradient(90deg,#fff,#fff0)}.el-color-svpanel__black{background:linear-gradient(0deg,#000,#0000)}.el-color-svpanel__cursor{position:absolute}.el-color-svpanel__cursor>div{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}.el-color-alpha-slider{background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px;box-sizing:border-box;height:12px;position:relative;width:280px}.el-color-alpha-slider__bar{background:linear-gradient(to right,rgba(255,255,255,0) 0,var(--el-bg-color) 100%);height:100%;position:relative}.el-color-alpha-slider__thumb{background:#fff;border:1px solid var(--el-border-color-lighter);border-radius:1px;box-shadow:0 0 2px #0009;box-sizing:border-box;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:4px;z-index:1}.el-color-alpha-slider.is-vertical{height:180px;width:20px}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__bar{background:linear-gradient(180deg,#fff0 0,#fff)}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__thumb{height:4px;left:0;top:0;width:100%}.el-color-dropdown{width:300px}.el-color-dropdown__main-wrapper{margin-bottom:6px}.el-color-dropdown__main-wrapper:after{clear:both;content:"";display:table}.el-color-dropdown__btns{margin-top:12px;text-align:right}.el-color-dropdown__value{color:#000;float:left;font-size:12px;line-height:26px;width:160px}.el-color-picker{display:inline-block;line-height:normal;outline:none;position:relative}.el-color-picker:hover:not(.is-disabled,.is-focused) .el-color-picker__trigger{border-color:var(--el-border-color-hover)}.el-color-picker:focus-visible:not(.is-disabled) .el-color-picker__trigger{outline:2px solid var(--el-color-primary);outline-offset:1px}.el-color-picker.is-focused .el-color-picker__trigger{border-color:var(--el-color-primary)}.el-color-picker.is-disabled .el-color-picker__trigger{cursor:not-allowed}.el-color-picker--large{height:40px}.el-color-picker--large .el-color-picker__trigger{height:40px;width:40px}.el-color-picker--large .el-color-picker__mask{height:38px;width:38px}.el-color-picker--small{height:24px}.el-color-picker--small .el-color-picker__trigger{height:24px;width:24px}.el-color-picker--small .el-color-picker__mask{height:22px;width:22px}.el-color-picker--small .el-color-picker__empty,.el-color-picker--small .el-color-picker__icon{transform:scale(.8)}.el-color-picker__mask{background-color:#ffffffb3;border-radius:4px;cursor:not-allowed;height:30px;left:1px;position:absolute;top:1px;width:30px;z-index:1}.el-color-picker__trigger{align-items:center;border:1px solid var(--el-border-color);border-radius:4px;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:0;height:32px;justify-content:center;padding:4px;position:relative;width:32px}.el-color-picker__color{border:1px solid var(--el-text-color-secondary);border-radius:var(--el-border-radius-small);box-sizing:border-box;display:block;height:100%;position:relative;text-align:center;width:100%}.el-color-picker__color.is-alpha{background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px}.el-color-picker__color-inner{align-items:center;display:inline-flex;height:100%;justify-content:center;width:100%}.el-color-picker .el-color-picker__empty{color:var(--el-text-color-secondary);font-size:12px}.el-color-picker .el-color-picker__icon{align-items:center;color:#fff;display:inline-flex;font-size:12px;justify-content:center}.el-color-picker__panel{background-color:#fff;border-radius:var(--el-border-radius-base);box-shadow:var(--el-box-shadow-light);box-sizing:content-box;padding:6px;position:absolute;z-index:10}.el-color-picker__panel.el-popper{border:1px solid var(--el-border-color-lighter)}.el-color-picker,.el-color-picker__panel{--el-color-picker-alpha-bg-a:#ccc;--el-color-picker-alpha-bg-b:transparent}.dark .el-color-picker,.dark .el-color-picker__panel{--el-color-picker-alpha-bg-a:#333333}.el-container{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0}.el-container.is-vertical{flex-direction:column}.el-date-table{font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-date-table.is-week-mode .el-date-table__row:hover .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table.is-week-mode .el-date-table__row:hover td.available:hover{color:var(--el-datepicker-text-color)}.el-date-table.is-week-mode .el-date-table__row:hover td:first-child .el-date-table-cell{border-bottom-left-radius:15px;border-top-left-radius:15px;margin-left:5px}.el-date-table.is-week-mode .el-date-table__row:hover td:last-child .el-date-table-cell{border-bottom-right-radius:15px;border-top-right-radius:15px;margin-right:5px}.el-date-table.is-week-mode .el-date-table__row.current .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td{box-sizing:border-box;cursor:pointer;height:30px;padding:4px 0;position:relative;text-align:center;width:32px}.el-date-table td .el-date-table-cell{box-sizing:border-box;height:30px;padding:3px 0}.el-date-table td .el-date-table-cell .el-date-table-cell__text{border-radius:50%;display:block;height:24px;left:50%;line-height:24px;margin:0 auto;position:absolute;transform:translate(-50%);width:24px}.el-date-table td.next-month,.el-date-table td.prev-month{color:var(--el-datepicker-off-text-color)}.el-date-table td.today{position:relative}.el-date-table td.today .el-date-table-cell__text{color:var(--el-color-primary);font-weight:700}.el-date-table td.today.end-date .el-date-table-cell__text,.el-date-table td.today.start-date .el-date-table-cell__text{color:#fff}.el-date-table td.available:hover{color:var(--el-datepicker-hover-text-color)}.el-date-table td.in-range .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td.in-range .el-date-table-cell:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-date-table td.current:not(.disabled) .el-date-table-cell__text{background-color:var(--el-datepicker-active-color);color:#fff}.el-date-table td.current:not(.disabled):focus-visible .el-date-table-cell__text{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-date-table td.end-date .el-date-table-cell,.el-date-table td.start-date .el-date-table-cell{color:#fff}.el-date-table td.end-date .el-date-table-cell__text,.el-date-table td.start-date .el-date-table-cell__text{background-color:var(--el-datepicker-active-color)}.el-date-table td.start-date .el-date-table-cell{border-bottom-left-radius:15px;border-top-left-radius:15px;margin-left:5px}.el-date-table td.end-date .el-date-table-cell{border-bottom-right-radius:15px;border-top-right-radius:15px;margin-right:5px}.el-date-table td.disabled .el-date-table-cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed;opacity:1}.el-date-table td.selected .el-date-table-cell{border-radius:15px;margin-left:5px;margin-right:5px}.el-date-table td.selected .el-date-table-cell__text{background-color:var(--el-datepicker-active-color);border-radius:15px;color:#fff}.el-date-table td.week{color:var(--el-datepicker-header-text-color);font-size:80%}.el-date-table td:focus{outline:none}.el-date-table th{border-bottom:1px solid var(--el-border-color-lighter);color:var(--el-datepicker-header-text-color);font-weight:400;padding:5px}.el-month-table{border-collapse:collapse;font-size:12px;margin:-1px}.el-month-table td{cursor:pointer;padding:8px 0;position:relative;text-align:center;width:68px}.el-month-table td div{box-sizing:border-box;height:48px;padding:6px 0}.el-month-table td.today .cell{color:var(--el-color-primary);font-weight:700}.el-month-table td.today.end-date .cell,.el-month-table td.today.start-date .cell{color:#fff}.el-month-table td.disabled .cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed}.el-month-table td.disabled .cell:hover{color:var(--el-text-color-placeholder)}.el-month-table td .cell{border-radius:18px;color:var(--el-datepicker-text-color);display:block;height:36px;left:50%;line-height:36px;margin:0 auto;position:absolute;transform:translate(-50%);width:54px}.el-month-table td .cell:hover{color:var(--el-datepicker-hover-text-color)}.el-month-table td.in-range div{background-color:var(--el-datepicker-inrange-bg-color)}.el-month-table td.in-range div:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-month-table td.end-date div,.el-month-table td.start-date div{color:#fff}.el-month-table td.end-date .cell,.el-month-table td.start-date .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-month-table td.start-date div{border-bottom-left-radius:24px;border-top-left-radius:24px;margin-left:3px}.el-month-table td.end-date div{border-bottom-right-radius:24px;border-top-right-radius:24px;margin-right:3px}.el-month-table td.current:not(.disabled) div{border-radius:24px;margin-left:3px;margin-right:3px}.el-month-table td.current:not(.disabled) .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-month-table td:focus-visible{outline:none}.el-month-table td:focus-visible .cell{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-year-table{border-collapse:collapse;font-size:12px;margin:-1px}.el-year-table .el-icon{color:var(--el-datepicker-icon-color)}.el-year-table td{cursor:pointer;padding:8px 0;position:relative;text-align:center;width:68px}.el-year-table td div{box-sizing:border-box;height:48px;padding:6px 0}.el-year-table td.today .cell{color:var(--el-color-primary);font-weight:700}.el-year-table td.disabled .cell{background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);cursor:not-allowed}.el-year-table td.disabled .cell:hover{color:var(--el-text-color-placeholder)}.el-year-table td .cell{border-radius:18px;color:var(--el-datepicker-text-color);display:block;height:36px;left:50%;line-height:36px;margin:0 auto;position:absolute;transform:translate(-50%);width:54px}.el-year-table td .cell:hover{color:var(--el-datepicker-hover-text-color)}.el-year-table td.current:not(.disabled) div{border-radius:24px;margin-left:3px;margin-right:3px}.el-year-table td.current:not(.disabled) .cell{background-color:var(--el-datepicker-active-color);color:#fff}.el-year-table td:focus-visible{outline:none}.el-year-table td:focus-visible .cell{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-time-spinner.has-seconds .el-time-spinner__wrapper{width:33.3%}.el-time-spinner__wrapper{display:inline-block;max-height:192px;overflow:auto;position:relative;vertical-align:top;width:50%}.el-time-spinner__wrapper.el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default){padding-bottom:15px}.el-time-spinner__wrapper.is-arrow{box-sizing:border-box;overflow:hidden;text-align:center}.el-time-spinner__wrapper.is-arrow .el-time-spinner__list{transform:translateY(-32px)}.el-time-spinner__wrapper.is-arrow .el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:default}.el-time-spinner__arrow{color:var(--el-text-color-secondary);cursor:pointer;font-size:12px;height:30px;left:0;line-height:30px;position:absolute;text-align:center;width:100%;z-index:var(--el-index-normal)}.el-time-spinner__arrow:hover{color:var(--el-color-primary)}.el-time-spinner__arrow.arrow-up{top:10px}.el-time-spinner__arrow.arrow-down{bottom:10px}.el-time-spinner__input.el-input{width:70%}.el-time-spinner__input.el-input .el-input__inner,.el-time-spinner__list{padding:0;text-align:center}.el-time-spinner__list{list-style:none;margin:0}.el-time-spinner__list:after,.el-time-spinner__list:before{content:"";display:block;height:80px;width:100%}.el-time-spinner__item{color:var(--el-text-color-regular);font-size:12px;height:32px;line-height:32px}.el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:pointer}.el-time-spinner__item.is-active:not(.is-disabled){color:var(--el-text-color-primary);font-weight:700}.el-time-spinner__item.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-picker__popper{--el-datepicker-border-color:var(--el-disabled-border-color)}.el-picker__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-datepicker-border-color);box-shadow:var(--el-box-shadow-light)}.el-picker__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-datepicker-border-color)}.el-picker__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-picker__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-date-editor{--el-date-editor-width:220px;--el-date-editor-monthrange-width:300px;--el-date-editor-daterange-width:350px;--el-date-editor-datetimerange-width:400px;--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;position:relative;text-align:left;vertical-align:middle}.el-date-editor.el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset}.el-date-editor.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-date-editor.el-input,.el-date-editor.el-input__wrapper{height:var(--el-input-height,var(--el-component-size));width:var(--el-date-editor-width)}.el-date-editor--monthrange{--el-date-editor-width:var(--el-date-editor-monthrange-width)}.el-date-editor--daterange,.el-date-editor--timerange{--el-date-editor-width:var(--el-date-editor-daterange-width)}.el-date-editor--datetimerange{--el-date-editor-width:var(--el-date-editor-datetimerange-width)}.el-date-editor--dates .el-input__wrapper{text-overflow:ellipsis;white-space:nowrap}.el-date-editor .clear-icon,.el-date-editor .close-icon{cursor:pointer}.el-date-editor .clear-icon:hover{color:var(--el-text-color-secondary)}.el-date-editor .el-range__icon{color:var(--el-text-color-placeholder);float:left;font-size:14px;height:inherit}.el-date-editor .el-range__icon svg{vertical-align:middle}.el-date-editor .el-range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--el-text-color-regular);display:inline-block;font-size:var(--el-font-size-base);height:30px;line-height:30px;margin:0;outline:none;padding:0;text-align:center;width:39%}.el-date-editor .el-range-input::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-input:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-input::placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-separator{align-items:center;color:var(--el-text-color-primary);display:inline-flex;flex:1;font-size:14px;height:100%;justify-content:center;margin:0;overflow-wrap:break-word;padding:0 5px}.el-date-editor .el-range__close-icon{color:var(--el-text-color-placeholder);cursor:pointer;font-size:14px;height:inherit;width:unset}.el-date-editor .el-range__close-icon:hover{color:var(--el-text-color-secondary)}.el-date-editor .el-range__close-icon svg{vertical-align:middle}.el-date-editor .el-range__close-icon--hidden{opacity:0;visibility:hidden}.el-range-editor.el-input__wrapper{align-items:center;display:inline-flex;padding:0 10px}.el-range-editor.is-active,.el-range-editor.is-active:hover{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-range-editor--large{line-height:var(--el-component-size-large)}.el-range-editor--large.el-input__wrapper{height:var(--el-component-size-large)}.el-range-editor--large .el-range-separator{font-size:14px;line-height:40px}.el-range-editor--large .el-range-input{font-size:14px;height:38px;line-height:38px}.el-range-editor--small{line-height:var(--el-component-size-small)}.el-range-editor--small.el-input__wrapper{height:var(--el-component-size-small)}.el-range-editor--small .el-range-separator{font-size:12px;line-height:24px}.el-range-editor--small .el-range-input{font-size:12px;height:22px;line-height:22px}.el-range-editor.is-disabled{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled:focus,.el-range-editor.is-disabled:hover{border-color:var(--el-disabled-border-color)}.el-range-editor.is-disabled input{background-color:var(--el-disabled-bg-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled input::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled input:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled input::placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled .el-range-separator{color:var(--el-disabled-text-color)}.el-picker-panel{background:var(--el-bg-color-overlay);border-radius:var(--el-border-radius-base);color:var(--el-text-color-regular);line-height:30px}.el-picker-panel .el-time-panel{background-color:var(--el-bg-color-overlay);border:1px solid var(--el-datepicker-border-color);box-shadow:var(--el-box-shadow-light);margin:5px 0}.el-picker-panel__body-wrapper:after,.el-picker-panel__body:after{clear:both;content:"";display:table}.el-picker-panel__content{margin:15px;position:relative}.el-picker-panel__footer{background-color:var(--el-bg-color-overlay);border-top:1px solid var(--el-datepicker-inner-border-color);font-size:0;padding:4px 12px;position:relative;text-align:right}.el-picker-panel__shortcut{background-color:transparent;border:0;color:var(--el-datepicker-text-color);cursor:pointer;display:block;font-size:14px;line-height:28px;outline:none;padding-left:12px;text-align:left;width:100%}.el-picker-panel__shortcut:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__shortcut.active{background-color:#e6f1fe;color:var(--el-datepicker-active-color)}.el-picker-panel__btn{background-color:transparent;border:1px solid var(--el-fill-color-darker);border-radius:2px;color:var(--el-text-color-primary);cursor:pointer;font-size:12px;line-height:24px;outline:none;padding:0 20px}.el-picker-panel__btn[disabled]{color:var(--el-text-color-disabled);cursor:not-allowed}.el-picker-panel__icon-btn{background:transparent;border:0;color:var(--el-datepicker-icon-color);cursor:pointer;font-size:12px;margin-top:8px;outline:none}.el-picker-panel__icon-btn:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn:focus-visible{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn.is-disabled{color:var(--el-text-color-disabled)}.el-picker-panel__icon-btn.is-disabled:hover{cursor:not-allowed}.el-picker-panel__icon-btn .el-icon{cursor:pointer;font-size:inherit}.el-picker-panel__link-btn{vertical-align:middle}.el-picker-panel [slot=sidebar],.el-picker-panel__sidebar{background-color:var(--el-bg-color-overlay);border-right:1px solid var(--el-datepicker-inner-border-color);bottom:0;box-sizing:border-box;overflow:auto;padding-top:6px;position:absolute;top:0;width:110px}.el-picker-panel [slot=sidebar]+.el-picker-panel__body,.el-picker-panel__sidebar+.el-picker-panel__body{margin-left:110px}.el-date-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);width:322px}.el-date-picker.has-sidebar.has-time{width:434px}.el-date-picker.has-sidebar{width:438px}.el-date-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-picker .el-picker-panel__content{width:292px}.el-date-picker table{table-layout:fixed;width:100%}.el-date-picker__editor-wrap{display:table-cell;padding:0 5px;position:relative}.el-date-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;display:table;font-size:12px;padding:8px 5px 5px;position:relative;width:100%}.el-date-picker__header{margin:12px;text-align:center}.el-date-picker__header--bordered{border-bottom:1px solid var(--el-border-color-lighter);margin-bottom:0;padding-bottom:12px}.el-date-picker__header--bordered+.el-picker-panel__content{margin-top:0}.el-date-picker__header-label{color:var(--el-text-color-regular);cursor:pointer;font-size:16px;font-weight:500;line-height:22px;padding:0 5px;text-align:center}.el-date-picker__header-label:hover{color:var(--el-datepicker-hover-text-color)}.el-date-picker__header-label:focus-visible{color:var(--el-datepicker-hover-text-color);outline:none}.el-date-picker__header-label.active{color:var(--el-datepicker-active-color)}.el-date-picker__prev-btn{float:left}.el-date-picker__next-btn{float:right}.el-date-picker__time-wrap{padding:10px;text-align:center}.el-date-picker__time-label{cursor:pointer;float:left;line-height:30px;margin-left:10px}.el-date-picker .el-time-panel{position:absolute}.el-date-range-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);width:646px}.el-date-range-picker.has-sidebar{width:756px}.el-date-range-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-range-picker table{table-layout:fixed;width:100%}.el-date-range-picker .el-picker-panel__body{min-width:513px}.el-date-range-picker .el-picker-panel__content{margin:0}.el-date-range-picker__header{height:28px;position:relative;text-align:center}.el-date-range-picker__header [class*=arrow-left]{float:left}.el-date-range-picker__header [class*=arrow-right]{float:right}.el-date-range-picker__header div{font-size:16px;font-weight:500;margin-right:50px}.el-date-range-picker__content{box-sizing:border-box;float:left;margin:0;padding:16px;width:50%}.el-date-range-picker__content.is-left{border-right:1px solid var(--el-datepicker-inner-border-color)}.el-date-range-picker__content .el-date-range-picker__header div{margin-left:50px;margin-right:50px}.el-date-range-picker__editors-wrap{box-sizing:border-box;display:table-cell}.el-date-range-picker__editors-wrap.is-right{text-align:right}.el-date-range-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;display:table;font-size:12px;padding:8px 5px 5px;position:relative;width:100%}.el-date-range-picker__time-header>.el-icon-arrow-right{color:var(--el-datepicker-icon-color);display:table-cell;font-size:20px;vertical-align:middle}.el-date-range-picker__time-picker-wrap{display:table-cell;padding:0 5px;position:relative}.el-date-range-picker__time-picker-wrap .el-picker-panel{background:#fff;position:absolute;right:0;top:13px;z-index:1}.el-date-range-picker__time-picker-wrap .el-time-panel{position:absolute}.el-time-range-picker{overflow:visible;width:354px}.el-time-range-picker__content{padding:10px;position:relative;text-align:center;z-index:1}.el-time-range-picker__cell{box-sizing:border-box;display:inline-block;margin:0;padding:4px 7px 7px;width:50%}.el-time-range-picker__header{font-size:14px;margin-bottom:5px;text-align:center}.el-time-range-picker__body{border:1px solid var(--el-datepicker-border-color);border-radius:2px}.el-time-panel{border-radius:2px;box-sizing:content-box;left:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:180px;z-index:var(--el-index-top)}.el-time-panel__content{font-size:0;overflow:hidden;position:relative}.el-time-panel__content:after,.el-time-panel__content:before{box-sizing:border-box;content:"";height:32px;left:0;margin-top:-16px;padding-top:6px;position:absolute;right:0;text-align:left;top:50%;z-index:-1}.el-time-panel__content:after{left:50%;margin-left:12%;margin-right:12%}.el-time-panel__content:before{border-bottom:1px solid var(--el-border-color-light);border-top:1px solid var(--el-border-color-light);margin-left:12%;margin-right:12%;padding-left:50%}.el-time-panel__content.has-seconds:after{left:66.6666666667%}.el-time-panel__content.has-seconds:before{padding-left:33.3333333333%}.el-time-panel__footer{border-top:1px solid var(--el-timepicker-inner-border-color,var(--el-border-color-light));box-sizing:border-box;height:36px;line-height:25px;padding:4px;text-align:right}.el-time-panel__btn{background-color:transparent;border:none;color:var(--el-text-color-primary);cursor:pointer;font-size:12px;line-height:28px;margin:0 5px;outline:none;padding:0 5px}.el-time-panel__btn.confirm{color:var(--el-timepicker-active-color,var(--el-color-primary));font-weight:800}.el-descriptions{--el-descriptions-table-border:1px solid var(--el-border-color-lighter);--el-descriptions-item-bordered-label-background:var(--el-fill-color-light);box-sizing:border-box;color:var(--el-text-color-primary);font-size:var(--el-font-size-base)}.el-descriptions__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.el-descriptions__title{color:var(--el-text-color-primary);font-size:16px;font-weight:700}.el-descriptions__body{background-color:var(--el-fill-color-blank)}.el-descriptions__body .el-descriptions__table{border-collapse:collapse;width:100%}.el-descriptions__body .el-descriptions__table .el-descriptions__cell{box-sizing:border-box;font-size:14px;font-weight:400;line-height:23px;text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-left{text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-center{text-align:center}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-right{text-align:right}.el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:var(--el-descriptions-table-border);padding:8px 11px}.el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:12px}.el-descriptions--large{font-size:14px}.el-descriptions--large .el-descriptions__header{margin-bottom:20px}.el-descriptions--large .el-descriptions__header .el-descriptions__title{font-size:16px}.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:14px}.el-descriptions--large .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:12px 15px}.el-descriptions--large .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:16px}.el-descriptions--small{font-size:12px}.el-descriptions--small .el-descriptions__header{margin-bottom:12px}.el-descriptions--small .el-descriptions__header .el-descriptions__title{font-size:14px}.el-descriptions--small .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:12px}.el-descriptions--small .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:4px 7px}.el-descriptions--small .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:8px}.el-descriptions__label.el-descriptions__cell.is-bordered-label{background:var(--el-descriptions-item-bordered-label-background);color:var(--el-text-color-regular);font-weight:700}.el-descriptions__label:not(.is-bordered-label){color:var(--el-text-color-primary);margin-right:16px}.el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:6px}.el-descriptions__content.el-descriptions__cell.is-bordered-content{color:var(--el-text-color-primary)}.el-descriptions__content:not(.is-bordered-label){color:var(--el-text-color-regular)}.el-descriptions--large .el-descriptions__label:not(.is-bordered-label){margin-right:16px}.el-descriptions--large .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:8px}.el-descriptions--small .el-descriptions__label:not(.is-bordered-label){margin-right:12px}.el-descriptions--small .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:4px}:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{-webkit-animation:v-modal-in var(--el-transition-duration-fast) ease;animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{-webkit-animation:v-modal-out var(--el-transition-duration-fast) ease forwards;animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@-webkit-keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-in{0%{opacity:0}}@-webkit-keyframes v-modal-out{to{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{background:var(--el-popup-modal-bg-color);height:100%;left:0;opacity:var(--el-popup-modal-opacity);position:fixed;top:0;width:100%}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-small);background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;margin:var(--el-dialog-margin-top,15vh) auto 50px;overflow-wrap:break-word;padding:var(--el-dialog-padding-primary);position:relative;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{bottom:0;left:0;margin:0;overflow:auto;position:fixed;right:0;top:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size, 16px))}.el-dialog__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:48px;outline:none;padding:0;position:absolute;right:0;top:0;width:48px}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{color:var(--el-text-color-primary);font-size:var(--el-dialog-title-font-size);line-height:var(--el-dialog-font-line-height)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{box-sizing:border-box;padding-top:var(--el-dialog-padding-primary);text-align:right}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}.dialog-fade-enter-active{-webkit-animation:modal-fade-in var(--el-transition-duration);animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{-webkit-animation:dialog-fade-in var(--el-transition-duration);animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{-webkit-animation:modal-fade-out var(--el-transition-duration);animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{-webkit-animation:dialog-fade-out var(--el-transition-duration);animation:dialog-fade-out var(--el-transition-duration)}@-webkit-keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes dialog-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@-webkit-keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}.el-divider{position:relative}.el-divider--horizontal{border-top:1px var(--el-border-color) var(--el-border-style);display:block;height:1px;margin:24px 0;width:100%}.el-divider--vertical{border-left:1px var(--el-border-color) var(--el-border-style);display:inline-block;height:1em;margin:0 8px;position:relative;vertical-align:middle;width:1px}.el-divider__text{background-color:var(--el-bg-color);color:var(--el-text-color-primary);font-size:14px;font-weight:500;padding:0 20px;position:absolute}.el-divider__text.is-left{left:20px;transform:translateY(-50%)}.el-divider__text.is-center{left:50%;transform:translate(-50%) translateY(-50%)}.el-divider__text.is-right{right:20px;transform:translateY(-50%)}.el-drawer{--el-drawer-bg-color:var(--el-dialog-bg-color,var(--el-bg-color));--el-drawer-padding-primary:var(--el-dialog-padding-primary,20px);background-color:var(--el-drawer-bg-color);box-shadow:var(--el-box-shadow-dark);box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;position:absolute;transition:all var(--el-transition-duration)}.el-drawer .btt,.el-drawer .ltr,.el-drawer .rtl,.el-drawer .ttb{transform:translate(0)}.el-drawer__sr-focus:focus{outline:none!important}.el-drawer__header{align-items:center;color:#72767b;display:flex;margin-bottom:32px;padding:var(--el-drawer-padding-primary);padding-bottom:0}.el-drawer__header>:first-child{flex:1}.el-drawer__title{flex:1;font-size:1rem;line-height:inherit;margin:0}.el-drawer__footer{padding:var(--el-drawer-padding-primary);padding-top:10px;text-align:right}.el-drawer__close-btn{background-color:transparent;border:none;color:inherit;cursor:pointer;display:inline-flex;font-size:var(--el-font-size-extra-large);outline:none}.el-drawer__close-btn:focus i,.el-drawer__close-btn:hover i{color:var(--el-color-primary)}.el-drawer__body{flex:1;overflow:auto;padding:var(--el-drawer-padding-primary)}.el-drawer__body>*{box-sizing:border-box}.el-drawer.ltr,.el-drawer.rtl{bottom:0;height:100%;top:0}.el-drawer.btt,.el-drawer.ttb{left:0;right:0;width:100%}.el-drawer.ltr{left:0}.el-drawer.rtl{right:0}.el-drawer.ttb{top:0}.el-drawer.btt{bottom:0}.el-drawer-fade-enter-active,.el-drawer-fade-leave-active{transition:all var(--el-transition-duration)}.el-drawer-fade-enter-active,.el-drawer-fade-enter-from,.el-drawer-fade-enter-to,.el-drawer-fade-leave-active,.el-drawer-fade-leave-from,.el-drawer-fade-leave-to{overflow:hidden!important}.el-drawer-fade-enter-from,.el-drawer-fade-leave-to{opacity:0}.el-drawer-fade-enter-to,.el-drawer-fade-leave-from{opacity:1}.el-drawer-fade-enter-from .rtl,.el-drawer-fade-leave-to .rtl{transform:translate(100%)}.el-drawer-fade-enter-from .ltr,.el-drawer-fade-leave-to .ltr{transform:translate(-100%)}.el-drawer-fade-enter-from .ttb,.el-drawer-fade-leave-to .ttb{transform:translateY(-100%)}.el-drawer-fade-enter-from .btt,.el-drawer-fade-leave-to .btt{transform:translateY(100%)}.el-dropdown{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10;color:var(--el-text-color-regular);display:inline-flex;font-size:var(--el-font-size-base);line-height:1;position:relative;vertical-align:top}.el-dropdown.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-dropdown__popper{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10}.el-dropdown__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-dropdown-menu-box-shadow)}.el-dropdown__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-dropdown__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-dropdown__popper .el-dropdown-menu{border:none}.el-dropdown__popper .el-dropdown__popper-selfdefine{outline:none}.el-dropdown__popper .el-scrollbar__bar{z-index:calc(var(--el-dropdown-menu-index) + 1)}.el-dropdown__popper .el-dropdown__list{box-sizing:border-box;list-style:none;margin:0;padding:0}.el-dropdown .el-dropdown__caret-button{align-items:center;border-left:none;display:inline-flex;justify-content:center;padding-left:0;padding-right:0;width:32px}.el-dropdown .el-dropdown__caret-button>span{display:inline-flex}.el-dropdown .el-dropdown__caret-button:before{background:var(--el-overlay-color-lighter);bottom:-1px;content:"";display:block;left:0;position:absolute;top:-1px;width:1px}.el-dropdown .el-dropdown__caret-button.el-button:before{background:var(--el-border-color);opacity:.5}.el-dropdown .el-dropdown__caret-button .el-dropdown__icon{font-size:inherit;padding-left:0}.el-dropdown .el-dropdown-selfdefine{outline:none}.el-dropdown--large .el-dropdown__caret-button{width:40px}.el-dropdown--small .el-dropdown__caret-button{width:24px}.el-dropdown-menu{background-color:var(--el-bg-color-overlay);border:none;border-radius:var(--el-border-radius-base);box-shadow:none;left:0;list-style:none;margin:0;padding:5px 0;position:relative;top:0;z-index:var(--el-dropdown-menu-index)}.el-dropdown-menu__item{align-items:center;color:var(--el-text-color-regular);cursor:pointer;display:flex;font-size:var(--el-font-size-base);line-height:22px;list-style:none;margin:0;outline:none;padding:5px 16px;white-space:nowrap}.el-dropdown-menu__item:not(.is-disabled):focus,.el-dropdown-menu__item:not(.is-disabled):hover{background-color:var(--el-dropdown-menuItem-hover-fill);color:var(--el-dropdown-menuItem-hover-color)}.el-dropdown-menu__item i{margin-right:5px}.el-dropdown-menu__item--divided{border-top:1px solid var(--el-border-color-lighter);margin:6px 0}.el-dropdown-menu__item.is-disabled{color:var(--el-text-color-disabled);cursor:not-allowed}.el-dropdown-menu--large{padding:7px 0}.el-dropdown-menu--large .el-dropdown-menu__item{font-size:14px;line-height:22px;padding:7px 20px}.el-dropdown-menu--large .el-dropdown-menu__item--divided{margin:8px 0}.el-dropdown-menu--small{padding:3px 0}.el-dropdown-menu--small .el-dropdown-menu__item{font-size:12px;line-height:20px;padding:2px 12px}.el-dropdown-menu--small .el-dropdown-menu__item--divided{margin:4px 0}.el-empty{--el-empty-padding:40px 0;--el-empty-image-width:160px;--el-empty-description-margin-top:20px;--el-empty-bottom-margin-top:20px;--el-empty-fill-color-0:var(--el-color-white);--el-empty-fill-color-1:#fcfcfd;--el-empty-fill-color-2:#f8f9fb;--el-empty-fill-color-3:#f7f8fc;--el-empty-fill-color-4:#eeeff3;--el-empty-fill-color-5:#edeef2;--el-empty-fill-color-6:#e9ebef;--el-empty-fill-color-7:#e5e7e9;--el-empty-fill-color-8:#e0e3e9;--el-empty-fill-color-9:#d5d7de;align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:var(--el-empty-padding);text-align:center}.el-empty__image{width:var(--el-empty-image-width)}.el-empty__image img{height:100%;-o-object-fit:contain;object-fit:contain;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;width:100%}.el-empty__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;height:100%;vertical-align:top;width:100%}.el-empty__description{margin-top:var(--el-empty-description-margin-top)}.el-empty__description p{color:var(--el-text-color-secondary);font-size:var(--el-font-size-base);margin:0}.el-empty__bottom{margin-top:var(--el-empty-bottom-margin-top)}.el-footer{--el-footer-padding:0 20px;--el-footer-height:60px;box-sizing:border-box;flex-shrink:0;height:var(--el-footer-height);padding:var(--el-footer-padding)}.el-form{--el-form-label-font-size:var(--el-font-size-base);--el-form-inline-content-width:220px}.el-form--label-left .el-form-item__label{justify-content:flex-start}.el-form--label-top .el-form-item{display:block}.el-form--label-top .el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--inline .el-form-item{display:inline-flex;margin-right:32px;vertical-align:middle}.el-form--inline.el-form--label-top{display:flex;flex-wrap:wrap}.el-form--inline.el-form--label-top .el-form-item{display:block}.el-form--large.el-form--label-top .el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default.el-form--label-top .el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small.el-form--label-top .el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}.el-form-item{display:flex;--font-size:14px;margin-bottom:18px}.el-form-item .el-form-item{margin-bottom:0}.el-form-item .el-input__validateIcon{display:none}.el-form-item--large{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:22px}.el-form-item--large .el-form-item__label{height:40px;line-height:40px}.el-form-item--large .el-form-item__content{line-height:40px}.el-form-item--large .el-form-item__error{padding-top:4px}.el-form-item--default{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--default .el-form-item__label{height:32px;line-height:32px}.el-form-item--default .el-form-item__content{line-height:32px}.el-form-item--default .el-form-item__error{padding-top:2px}.el-form-item--small{--font-size:12px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--small .el-form-item__label{height:24px;line-height:24px}.el-form-item--small .el-form-item__content{line-height:24px}.el-form-item--small .el-form-item__error{padding-top:2px}.el-form-item__label-wrap{display:flex}.el-form-item__label{align-items:flex-start;box-sizing:border-box;color:var(--el-text-color-regular);display:inline-flex;flex:0 0 auto;font-size:var(--el-form-label-font-size);height:32px;justify-content:flex-end;line-height:32px;padding:0 12px 0 0}.el-form-item__content{align-items:center;display:flex;flex:1;flex-wrap:wrap;font-size:var(--font-size);line-height:32px;min-width:0;position:relative}.el-form-item__content .el-input-group{vertical-align:top}.el-form-item__error{color:var(--el-color-danger);font-size:12px;left:0;line-height:1;padding-top:2px;position:absolute;top:100%}.el-form-item__error--inline{display:inline-block;left:auto;margin-left:10px;position:relative;top:auto}.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before,.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before{color:var(--el-color-danger);content:"*";margin-right:4px}.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after,.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after{color:var(--el-color-danger);content:"*";margin-left:4px}.el-form-item.is-error .el-input__wrapper,.el-form-item.is-error .el-input__wrapper.is-focus,.el-form-item.is-error .el-input__wrapper:focus,.el-form-item.is-error .el-input__wrapper:hover,.el-form-item.is-error .el-select__wrapper,.el-form-item.is-error .el-select__wrapper.is-focus,.el-form-item.is-error .el-select__wrapper:focus,.el-form-item.is-error .el-select__wrapper:hover,.el-form-item.is-error .el-textarea__inner,.el-form-item.is-error .el-textarea__inner.is-focus,.el-form-item.is-error .el-textarea__inner:focus,.el-form-item.is-error .el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-form-item.is-error .el-input-group__append .el-input__wrapper,.el-form-item.is-error .el-input-group__prepend .el-input__wrapper{box-shadow:inset 0 0 0 1px transparent}.el-form-item.is-error .el-input__validateIcon{color:var(--el-color-danger)}.el-form-item--feedback .el-input__validateIcon{display:inline-flex}.el-header{--el-header-padding:0 20px;--el-header-height:60px;box-sizing:border-box;flex-shrink:0;height:var(--el-header-height);padding:var(--el-header-padding)}.el-image-viewer__wrapper{bottom:0;left:0;position:fixed;right:0;top:0}.el-image-viewer__btn{align-items:center;border-radius:50%;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;opacity:.8;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}.el-image-viewer__btn .el-icon{cursor:pointer;font-size:inherit}.el-image-viewer__close{font-size:40px;height:40px;right:40px;top:40px;width:40px}.el-image-viewer__canvas{align-items:center;display:flex;height:100%;justify-content:center;position:static;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.el-image-viewer__actions{background-color:var(--el-text-color-regular);border-color:#fff;border-radius:22px;bottom:30px;height:44px;left:50%;padding:0 23px;transform:translate(-50%);width:282px}.el-image-viewer__actions__inner{align-items:center;color:#fff;cursor:default;display:flex;font-size:23px;height:100%;justify-content:space-around;width:100%}.el-image-viewer__prev{left:40px}.el-image-viewer__next,.el-image-viewer__prev{background-color:var(--el-text-color-regular);border-color:#fff;color:#fff;font-size:24px;height:44px;top:50%;transform:translateY(-50%);width:44px}.el-image-viewer__next{right:40px;text-indent:2px}.el-image-viewer__close{background-color:var(--el-text-color-regular);border-color:#fff;color:#fff;font-size:24px;height:44px;width:44px}.el-image-viewer__mask{background:#000;height:100%;left:0;opacity:.5;position:absolute;top:0;width:100%}.viewer-fade-enter-active{-webkit-animation:viewer-fade-in var(--el-transition-duration);animation:viewer-fade-in var(--el-transition-duration)}.viewer-fade-leave-active{-webkit-animation:viewer-fade-out var(--el-transition-duration);animation:viewer-fade-out var(--el-transition-duration)}@-webkit-keyframes viewer-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes viewer-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@-webkit-keyframes viewer-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}@keyframes viewer-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}.el-image__error,.el-image__inner,.el-image__placeholder,.el-image__wrapper{height:100%;width:100%}.el-image{display:inline-block;overflow:hidden;position:relative}.el-image__inner{opacity:1;vertical-align:top}.el-image__inner.is-loading{opacity:0}.el-image__wrapper{left:0;position:absolute;top:0}.el-image__error,.el-image__placeholder{background:var(--el-fill-color-light)}.el-image__error{align-items:center;color:var(--el-text-color-placeholder);display:flex;font-size:14px;justify-content:center;vertical-align:middle}.el-image__preview{cursor:pointer}.el-textarea{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;display:inline-block;font-size:var(--el-font-size-base);position:relative;vertical-align:bottom;width:100%}.el-textarea__inner{-webkit-appearance:none;background-color:var(--el-input-bg-color,var(--el-fill-color-blank));background-image:none;border:none;border-radius:var(--el-input-border-radius,var(--el-border-radius-base));box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;box-sizing:border-box;color:var(--el-input-text-color,var(--el-text-color-regular));display:block;font-family:inherit;font-size:inherit;line-height:1.5;padding:5px 11px;position:relative;resize:vertical;transition:var(--el-transition-box-shadow);width:100%}.el-textarea__inner::-moz-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner:-ms-input-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-textarea__inner:focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset;outline:none}.el-textarea .el-input__count{background:var(--el-fill-color-blank);bottom:5px;color:var(--el-color-info);font-size:12px;line-height:14px;position:absolute;right:10px}.el-textarea.is-disabled .el-textarea__inner{background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset;color:var(--el-disabled-text-color);cursor:not-allowed}.el-textarea.is-disabled .el-textarea__inner::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-disabled .el-textarea__inner:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-disabled .el-textarea__inner::placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-exceed .el-textarea__inner{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-textarea.is-exceed .el-input__count{color:var(--el-color-danger)}.el-input{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;--el-input-height:var(--el-component-size);box-sizing:border-box;display:inline-flex;font-size:var(--el-font-size-base);line-height:var(--el-input-height);position:relative;vertical-align:middle;width:var(--el-input-width)}.el-input::-webkit-scrollbar{width:6px;z-index:11}.el-input::-webkit-scrollbar:horizontal{height:6px}.el-input::-webkit-scrollbar-thumb{background:var(--el-text-color-disabled);border-radius:5px;width:6px}.el-input::-webkit-scrollbar-corner,.el-input::-webkit-scrollbar-track{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track-piece{background:var(--el-fill-color-blank);width:6px}.el-input .el-input__clear,.el-input .el-input__password{color:var(--el-input-icon-color);cursor:pointer;font-size:14px}.el-input .el-input__clear:hover,.el-input .el-input__password:hover{color:var(--el-input-clear-hover-color)}.el-input .el-input__count{align-items:center;color:var(--el-color-info);display:inline-flex;font-size:12px;height:100%}.el-input .el-input__count .el-input__count-inner{background:var(--el-fill-color-blank);display:inline-block;line-height:normal;padding-left:8px}.el-input__wrapper{align-items:center;background-color:var(--el-input-bg-color,var(--el-fill-color-blank));background-image:none;border-radius:var(--el-input-border-radius,var(--el-border-radius-base));box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;cursor:text;display:inline-flex;flex-grow:1;justify-content:center;padding:1px 11px;transform:translateZ(0);transition:var(--el-transition-box-shadow)}.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-input__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 32px) - 2px);-webkit-appearance:none;background:none;border:none;box-sizing:border-box;color:var(--el-input-text-color,var(--el-text-color-regular));flex-grow:1;font-size:inherit;height:var(--el-input-inner-height);line-height:var(--el-input-inner-height);outline:none;padding:0;width:100%}.el-input__inner:focus{outline:none}.el-input__inner::-moz-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner:-ms-input-placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner[type=password]::-ms-reveal{display:none}.el-input__inner[type=number]{line-height:1}.el-input__prefix{color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:inline-flex;flex-shrink:0;flex-wrap:nowrap;height:100%;pointer-events:none;text-align:center;transition:all var(--el-transition-duration);white-space:nowrap}.el-input__prefix-inner{align-items:center;display:inline-flex;justify-content:center;pointer-events:all}.el-input__prefix-inner>:last-child{margin-right:8px}.el-input__prefix-inner>:first-child,.el-input__prefix-inner>:first-child.el-input__icon{margin-left:0}.el-input__suffix{color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:inline-flex;flex-shrink:0;flex-wrap:nowrap;height:100%;pointer-events:none;text-align:center;transition:all var(--el-transition-duration);white-space:nowrap}.el-input__suffix-inner{align-items:center;display:inline-flex;justify-content:center;pointer-events:all}.el-input__suffix-inner>:first-child{margin-left:8px}.el-input .el-input__icon{align-items:center;display:flex;height:inherit;justify-content:center;line-height:inherit;margin-left:8px;transition:all var(--el-transition-duration)}.el-input__validateIcon{pointer-events:none}.el-input.is-active .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-color, ) inset}.el-input.is-disabled{cursor:not-allowed}.el-input.is-disabled .el-input__wrapper{background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset}.el-input.is-disabled .el-input__inner{color:var(--el-disabled-text-color);-webkit-text-fill-color:var(--el-disabled-text-color);cursor:not-allowed}.el-input.is-disabled .el-input__inner::-moz-placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__inner:-ms-input-placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__inner::placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__icon{cursor:not-allowed}.el-input.is-exceed .el-input__wrapper{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-input.is-exceed .el-input__suffix .el-input__count{color:var(--el-color-danger)}.el-input--large{--el-input-height:var(--el-component-size-large);font-size:14px}.el-input--large .el-input__wrapper{padding:1px 15px}.el-input--large .el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 40px) - 2px)}.el-input--small{--el-input-height:var(--el-component-size-small);font-size:12px}.el-input--small .el-input__wrapper{padding:1px 7px}.el-input--small .el-input__inner{--el-input-inner-height:calc(var(--el-input-height, 24px) - 2px)}.el-input-group{align-items:stretch;display:inline-flex;width:100%}.el-input-group__append,.el-input-group__prepend{align-items:center;background-color:var(--el-fill-color-light);border-radius:var(--el-input-border-radius);color:var(--el-color-info);display:inline-flex;justify-content:center;min-height:100%;padding:0 20px;position:relative;white-space:nowrap}.el-input-group__append:focus,.el-input-group__prepend:focus{outline:none}.el-input-group__append .el-button,.el-input-group__append .el-select,.el-input-group__prepend .el-button,.el-input-group__prepend .el-select{display:inline-block;margin:0 -20px}.el-input-group__append button.el-button,.el-input-group__append button.el-button:hover,.el-input-group__append div.el-select .el-select__wrapper,.el-input-group__append div.el-select:hover .el-select__wrapper,.el-input-group__prepend button.el-button,.el-input-group__prepend button.el-button:hover,.el-input-group__prepend div.el-select .el-select__wrapper,.el-input-group__prepend div.el-select:hover .el-select__wrapper{background-color:transparent;border-color:transparent;color:inherit}.el-input-group__append .el-button,.el-input-group__append .el-input,.el-input-group__prepend .el-button,.el-input-group__prepend .el-input{font-size:inherit}.el-input-group__prepend{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group__append{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-group--prepend>.el-input__wrapper{border-bottom-left-radius:0;border-top-left-radius:0}.el-input-group--prepend .el-input-group__prepend .el-select .el-select__wrapper{border-bottom-right-radius:0;border-top-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group--append>.el-input__wrapper{border-bottom-right-radius:0;border-top-right-radius:0}.el-input-group--append .el-input-group__append .el-select .el-select__wrapper{border-bottom-left-radius:0;border-top-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-hidden{display:none!important}.el-input-number{display:inline-flex;line-height:30px;position:relative;width:150px}.el-input-number .el-input__wrapper{padding-left:42px;padding-right:42px}.el-input-number .el-input__inner{-webkit-appearance:none;-moz-appearance:textfield;line-height:1;text-align:center}.el-input-number .el-input__inner::-webkit-inner-spin-button,.el-input-number .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-input-number__decrease,.el-input-number__increase{align-items:center;background:var(--el-fill-color-light);bottom:1px;color:var(--el-text-color-regular);cursor:pointer;display:flex;font-size:13px;height:auto;justify-content:center;position:absolute;top:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:32px;z-index:1}.el-input-number__decrease:hover,.el-input-number__increase:hover{color:var(--el-color-primary)}.el-input-number__decrease:hover~.el-input:not(.is-disabled) .el-input__wrapper,.el-input-number__increase:hover~.el-input:not(.is-disabled) .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-input-number__decrease.is-disabled,.el-input-number__increase.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-input-number__increase{border-left:var(--el-border);border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0;right:1px}.el-input-number__decrease{border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);border-right:var(--el-border);left:1px}.el-input-number.is-disabled .el-input-number__decrease,.el-input-number.is-disabled .el-input-number__increase{border-color:var(--el-disabled-border-color);color:var(--el-disabled-border-color)}.el-input-number.is-disabled .el-input-number__decrease:hover,.el-input-number.is-disabled .el-input-number__increase:hover{color:var(--el-disabled-border-color);cursor:not-allowed}.el-input-number--large{line-height:38px;width:180px}.el-input-number--large .el-input-number__decrease,.el-input-number--large .el-input-number__increase{font-size:14px;width:40px}.el-input-number--large .el-input--large .el-input__wrapper{padding-left:47px;padding-right:47px}.el-input-number--small{line-height:22px;width:120px}.el-input-number--small .el-input-number__decrease,.el-input-number--small .el-input-number__increase{font-size:12px;width:24px}.el-input-number--small .el-input--small .el-input__wrapper{padding-left:31px;padding-right:31px}.el-input-number--small .el-input-number__decrease [class*=el-icon],.el-input-number--small .el-input-number__increase [class*=el-icon]{transform:scale(.9)}.el-input-number.is-without-controls .el-input__wrapper{padding-left:15px;padding-right:15px}.el-input-number.is-controls-right .el-input__wrapper{padding-left:15px;padding-right:42px}.el-input-number.is-controls-right .el-input-number__decrease,.el-input-number.is-controls-right .el-input-number__increase{--el-input-number-controls-height:15px;height:var(--el-input-number-controls-height);line-height:var(--el-input-number-controls-height)}.el-input-number.is-controls-right .el-input-number__decrease [class*=el-icon],.el-input-number.is-controls-right .el-input-number__increase [class*=el-icon]{transform:scale(.8)}.el-input-number.is-controls-right .el-input-number__increase{border-bottom:var(--el-border);border-radius:0 var(--el-border-radius-base) 0 0;bottom:auto;left:auto}.el-input-number.is-controls-right .el-input-number__decrease{border-left:var(--el-border);border-radius:0 0 var(--el-border-radius-base) 0;border-right:none;left:auto;right:1px;top:auto}.el-input-number.is-controls-right[class*=large] [class*=decrease],.el-input-number.is-controls-right[class*=large] [class*=increase]{--el-input-number-controls-height:19px}.el-input-number.is-controls-right[class*=small] [class*=decrease],.el-input-number.is-controls-right[class*=small] [class*=increase]{--el-input-number-controls-height:11px}.el-link{--el-link-font-size:var(--el-font-size-base);--el-link-font-weight:var(--el-font-weight-primary);--el-link-text-color:var(--el-text-color-regular);--el-link-hover-text-color:var(--el-color-primary);--el-link-disabled-text-color:var(--el-text-color-placeholder);align-items:center;color:var(--el-link-text-color);cursor:pointer;display:inline-flex;flex-direction:row;font-size:var(--el-link-font-size);font-weight:var(--el-link-font-weight);justify-content:center;outline:none;padding:0;position:relative;text-decoration:none;vertical-align:middle}.el-link:hover{color:var(--el-link-hover-text-color)}.el-link.is-underline:hover:after{border-bottom:1px solid var(--el-link-hover-text-color);bottom:0;content:"";height:0;left:0;position:absolute;right:0}.el-link.is-disabled{color:var(--el-link-disabled-text-color);cursor:not-allowed}.el-link [class*=el-icon-]+span{margin-left:5px}.el-link.el-link--default:after{border-color:var(--el-link-hover-text-color)}.el-link__inner{align-items:center;display:inline-flex;justify-content:center}.el-link.el-link--primary{--el-link-text-color:var(--el-color-primary);--el-link-hover-text-color:var(--el-color-primary-light-3);--el-link-disabled-text-color:var(--el-color-primary-light-5)}.el-link.el-link--primary:after{border-color:var(--el-link-text-color)}.el-link.el-link--primary.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--success{--el-link-text-color:var(--el-color-success);--el-link-hover-text-color:var(--el-color-success-light-3);--el-link-disabled-text-color:var(--el-color-success-light-5)}.el-link.el-link--success:after{border-color:var(--el-link-text-color)}.el-link.el-link--success.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--warning{--el-link-text-color:var(--el-color-warning);--el-link-hover-text-color:var(--el-color-warning-light-3);--el-link-disabled-text-color:var(--el-color-warning-light-5)}.el-link.el-link--warning:after{border-color:var(--el-link-text-color)}.el-link.el-link--warning.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--danger{--el-link-text-color:var(--el-color-danger);--el-link-hover-text-color:var(--el-color-danger-light-3);--el-link-disabled-text-color:var(--el-color-danger-light-5)}.el-link.el-link--danger:after{border-color:var(--el-link-text-color)}.el-link.el-link--danger.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--error{--el-link-text-color:var(--el-color-error);--el-link-hover-text-color:var(--el-color-error-light-3);--el-link-disabled-text-color:var(--el-color-error-light-5)}.el-link.el-link--error:after{border-color:var(--el-link-text-color)}.el-link.el-link--error.is-underline:hover:after{border-color:var(--el-link-text-color)}.el-link.el-link--info{--el-link-text-color:var(--el-color-info);--el-link-hover-text-color:var(--el-color-info-light-3);--el-link-disabled-text-color:var(--el-color-info-light-5)}.el-link.el-link--info:after{border-color:var(--el-link-text-color)}.el-link.el-link--info.is-underline:hover:after{border-color:var(--el-link-text-color)}:root{--el-loading-spinner-size:42px;--el-loading-fullscreen-spinner-size:50px}.el-loading-parent--relative{position:relative!important}.el-loading-parent--hidden{overflow:hidden!important}.el-loading-mask{background-color:var(--el-mask-color);bottom:0;left:0;margin:0;position:absolute;right:0;top:0;transition:opacity var(--el-transition-duration);z-index:2000}.el-loading-mask.is-fullscreen{position:fixed}.el-loading-mask.is-fullscreen .el-loading-spinner{margin-top:calc((0px - var(--el-loading-fullscreen-spinner-size))/2)}.el-loading-mask.is-fullscreen .el-loading-spinner .circular{height:var(--el-loading-fullscreen-spinner-size);width:var(--el-loading-fullscreen-spinner-size)}.el-loading-spinner{margin-top:calc((0px - var(--el-loading-spinner-size))/2);position:absolute;text-align:center;top:50%;width:100%}.el-loading-spinner .el-loading-text{color:var(--el-color-primary);font-size:14px;margin:3px 0}.el-loading-spinner .circular{-webkit-animation:loading-rotate 2s linear infinite;animation:loading-rotate 2s linear infinite;display:inline;height:var(--el-loading-spinner-size);width:var(--el-loading-spinner-size)}.el-loading-spinner .path{-webkit-animation:loading-dash 1.5s ease-in-out infinite;animation:loading-dash 1.5s ease-in-out infinite;stroke-dasharray:90,150;stroke-dashoffset:0;stroke-width:2;stroke:var(--el-color-primary);stroke-linecap:round}.el-loading-spinner i{color:var(--el-color-primary)}.el-loading-fade-enter-from,.el-loading-fade-leave-to{opacity:0}@-webkit-keyframes loading-rotate{to{transform:rotate(1turn)}}@keyframes loading-rotate{to{transform:rotate(1turn)}}@-webkit-keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}@keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}.el-main{--el-main-padding:20px;box-sizing:border-box;display:block;flex:1;flex-basis:auto;overflow:auto;padding:var(--el-main-padding)}:root{--el-menu-active-color:var(--el-color-primary);--el-menu-text-color:var(--el-text-color-primary);--el-menu-hover-text-color:var(--el-color-primary);--el-menu-bg-color:var(--el-fill-color-blank);--el-menu-hover-bg-color:var(--el-color-primary-light-9);--el-menu-item-height:56px;--el-menu-sub-item-height:calc(var(--el-menu-item-height) - 6px);--el-menu-horizontal-height:60px;--el-menu-horizontal-sub-item-height:36px;--el-menu-item-font-size:var(--el-font-size-base);--el-menu-item-hover-fill:var(--el-color-primary-light-9);--el-menu-border-color:var(--el-border-color);--el-menu-base-level-padding:20px;--el-menu-level-padding:20px;--el-menu-icon-width:24px}.el-menu{background-color:var(--el-menu-bg-color);border-right:1px solid var(--el-menu-border-color);box-sizing:border-box;list-style:none;margin:0;padding-left:0;position:relative}.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item-group__title,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-sub-menu__title{padding-left:calc(var(--el-menu-base-level-padding) + var(--el-menu-level)*var(--el-menu-level-padding));white-space:nowrap}.el-menu:not(.el-menu--collapse) .el-sub-menu__title{padding-right:calc(var(--el-menu-base-level-padding) + var(--el-menu-icon-width))}.el-menu--horizontal{border-right:none;display:flex;flex-wrap:nowrap;height:var(--el-menu-horizontal-height)}.el-menu--horizontal.el-menu--popup-container{height:unset}.el-menu--horizontal.el-menu{border-bottom:1px solid var(--el-menu-border-color)}.el-menu--horizontal>.el-menu-item{align-items:center;border-bottom:2px solid transparent;color:var(--el-menu-text-color);display:inline-flex;height:100%;justify-content:center;margin:0}.el-menu--horizontal>.el-menu-item a,.el-menu--horizontal>.el-menu-item a:hover{color:inherit}.el-menu--horizontal>.el-sub-menu:focus,.el-menu--horizontal>.el-sub-menu:hover{outline:none}.el-menu--horizontal>.el-sub-menu:hover .el-sub-menu__title{color:var(--el-menu-hover-text-color)}.el-menu--horizontal>.el-sub-menu.is-active .el-sub-menu__title{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title{border-bottom:2px solid transparent;color:var(--el-menu-text-color);height:100%}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover{background-color:var(--el-menu-bg-color)}.el-menu--horizontal .el-menu .el-menu-item,.el-menu--horizontal .el-menu .el-sub-menu__title{align-items:center;background-color:var(--el-menu-bg-color);color:var(--el-menu-text-color);display:flex;height:var(--el-menu-horizontal-sub-item-height);line-height:var(--el-menu-horizontal-sub-item-height);padding:0 10px}.el-menu--horizontal .el-menu .el-sub-menu__title{padding-right:40px}.el-menu--horizontal .el-menu .el-menu-item.is-active,.el-menu--horizontal .el-menu .el-sub-menu.is-active>.el-sub-menu__title{color:var(--el-menu-active-color)}.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,.el-menu--horizontal .el-menu-item:not(.is-disabled):hover{background-color:var(--el-menu-hover-bg-color);color:var(--el-menu-hover-text-color);outline:none}.el-menu--horizontal>.el-menu-item.is-active{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)!important}.el-menu--collapse{width:calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding)*2)}.el-menu--collapse>.el-menu-item [class^=el-icon],.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title [class^=el-icon],.el-menu--collapse>.el-sub-menu>.el-sub-menu__title [class^=el-icon]{margin:0;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-menu--collapse>.el-menu-item .el-sub-menu__icon-arrow,.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow{display:none}.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title>span,.el-menu--collapse>.el-menu-item>span,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title>span{display:inline-block;height:0;overflow:hidden;visibility:hidden;width:0}.el-menu--collapse>.el-menu-item.is-active i{color:inherit}.el-menu--collapse .el-menu .el-sub-menu{min-width:200px}.el-menu--collapse .el-sub-menu.is-active .el-sub-menu__title{color:var(--el-menu-active-color)}.el-menu--popup{border:none;border-radius:var(--el-border-radius-small);box-shadow:var(--el-box-shadow-light);min-width:200px;padding:5px 0;z-index:100}.el-menu .el-icon{flex-shrink:0}.el-menu-item{align-items:center;box-sizing:border-box;color:var(--el-menu-text-color);cursor:pointer;display:flex;font-size:var(--el-menu-item-font-size);height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);list-style:none;padding:0 var(--el-menu-base-level-padding);position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);white-space:nowrap}.el-menu-item *{vertical-align:bottom}.el-menu-item i{color:inherit}.el-menu-item:focus,.el-menu-item:hover{outline:none}.el-menu-item:hover{background-color:var(--el-menu-hover-bg-color)}.el-menu-item.is-disabled{background:none!important;cursor:not-allowed;opacity:.25}.el-menu-item [class^=el-icon]{font-size:18px;margin-right:5px;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-menu-item.is-active{color:var(--el-menu-active-color)}.el-menu-item.is-active i{color:inherit}.el-menu-item .el-menu-tooltip__trigger{align-items:center;box-sizing:border-box;display:inline-flex;height:100%;left:0;padding:0 var(--el-menu-base-level-padding);position:absolute;top:0;width:100%}.el-sub-menu{list-style:none;margin:0;padding-left:0}.el-sub-menu__title{align-items:center;box-sizing:border-box;color:var(--el-menu-text-color);cursor:pointer;display:flex;font-size:var(--el-menu-item-font-size);height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);list-style:none;padding:0 var(--el-menu-base-level-padding);position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);white-space:nowrap}.el-sub-menu__title *{vertical-align:bottom}.el-sub-menu__title i{color:inherit}.el-sub-menu__title:focus,.el-sub-menu__title:hover{outline:none}.el-sub-menu__title.is-disabled{background:none!important;cursor:not-allowed;opacity:.25}.el-sub-menu__title:hover{background-color:var(--el-menu-hover-bg-color)}.el-sub-menu .el-menu{border:none}.el-sub-menu .el-menu-item{height:var(--el-menu-sub-item-height);line-height:var(--el-menu-sub-item-height)}.el-sub-menu__hide-arrow .el-sub-menu__icon-arrow{display:none!important}.el-sub-menu.is-active .el-sub-menu__title{border-bottom-color:var(--el-menu-active-color)}.el-sub-menu.is-disabled .el-menu-item,.el-sub-menu.is-disabled .el-sub-menu__title{background:none!important;cursor:not-allowed;opacity:.25}.el-sub-menu .el-icon{font-size:18px;margin-right:5px;text-align:center;vertical-align:middle;width:var(--el-menu-icon-width)}.el-sub-menu .el-icon.el-sub-menu__icon-more{margin-right:0!important}.el-sub-menu .el-sub-menu__icon-arrow{font-size:12px;margin-right:0;margin-top:-6px;position:absolute;right:var(--el-menu-base-level-padding);top:50%;transition:transform var(--el-transition-duration);width:inherit}.el-menu-item-group>ul{padding:0}.el-menu-item-group__title{color:var(--el-text-color-secondary);font-size:12px;line-height:normal;padding:7px 0 7px var(--el-menu-base-level-padding)}.horizontal-collapse-transition .el-sub-menu__title .el-sub-menu__icon-arrow{opacity:0;transition:var(--el-transition-duration-fast)}.el-message-box{--el-messagebox-title-color:var(--el-text-color-primary);--el-messagebox-width:420px;--el-messagebox-border-radius:4px;--el-messagebox-box-shadow:var(--el-box-shadow);--el-messagebox-font-size:var(--el-font-size-large);--el-messagebox-content-font-size:var(--el-font-size-base);--el-messagebox-content-color:var(--el-text-color-regular);--el-messagebox-error-font-size:12px;--el-messagebox-padding-primary:12px;--el-messagebox-font-line-height:var(--el-font-line-height-primary);-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:var(--el-bg-color);border-radius:var(--el-messagebox-border-radius);box-shadow:var(--el-messagebox-box-shadow);box-sizing:border-box;display:inline-block;font-size:var(--el-messagebox-font-size);max-width:var(--el-messagebox-width);overflow:hidden;overflow-wrap:break-word;padding:var(--el-messagebox-padding-primary);position:relative;text-align:left;vertical-align:middle;width:100%}.el-message-box:focus{outline:none!important}.el-overlay.is-message-box .el-overlay-message-box{bottom:0;left:0;overflow:auto;padding:16px;position:fixed;right:0;text-align:center;top:0}.el-overlay.is-message-box .el-overlay-message-box:after{content:"";display:inline-block;height:100%;vertical-align:middle;width:0}.el-message-box.is-draggable .el-message-box__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-message-box__header{padding-bottom:var(--el-messagebox-padding-primary)}.el-message-box__header.show-close{padding-right:calc(var(--el-messagebox-padding-primary) + var(--el-message-close-size, 16px))}.el-message-box__title{color:var(--el-messagebox-title-color);font-size:var(--el-messagebox-font-size);line-height:var(--el-messagebox-font-line-height)}.el-message-box__headerbtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:40px;outline:none;padding:0;position:absolute;right:0;top:0;width:40px}.el-message-box__headerbtn .el-message-box__close{color:var(--el-color-info);font-size:inherit}.el-message-box__headerbtn:focus .el-message-box__close,.el-message-box__headerbtn:hover .el-message-box__close{color:var(--el-color-primary)}.el-message-box__content{color:var(--el-messagebox-content-color);font-size:var(--el-messagebox-content-font-size)}.el-message-box__container{align-items:center;display:flex;gap:12px}.el-message-box__input{padding-top:12px}.el-message-box__input div.invalid>input{border-color:var(--el-color-error)}.el-message-box__input div.invalid>input:focus{border-color:var(--el-color-error)}.el-message-box__status{font-size:24px}.el-message-box__status.el-message-box-icon--success{--el-messagebox-color:var(--el-color-success);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--info{--el-messagebox-color:var(--el-color-info);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--warning{--el-messagebox-color:var(--el-color-warning);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--error{--el-messagebox-color:var(--el-color-error);color:var(--el-messagebox-color)}.el-message-box__message{margin:0}.el-message-box__message p{line-height:var(--el-messagebox-font-line-height);margin:0}.el-message-box__errormsg{color:var(--el-color-error);font-size:var(--el-messagebox-error-font-size);line-height:var(--el-messagebox-font-line-height)}.el-message-box__btns{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end;padding-top:var(--el-messagebox-padding-primary)}.el-message-box--center .el-message-box__title{align-items:center;display:flex;gap:6px;justify-content:center}.el-message-box--center .el-message-box__status{font-size:inherit}.el-message-box--center .el-message-box__btns,.el-message-box--center .el-message-box__container{justify-content:center}.fade-in-linear-enter-active .el-overlay-message-box{-webkit-animation:msgbox-fade-in var(--el-transition-duration);animation:msgbox-fade-in var(--el-transition-duration)}.fade-in-linear-leave-active .el-overlay-message-box{animation:msgbox-fade-in var(--el-transition-duration) reverse}@-webkit-keyframes msgbox-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes msgbox-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}.el-message{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:11px 15px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary);align-items:center;background-color:var(--el-message-bg-color);border-color:var(--el-message-border-color);border-radius:var(--el-border-radius-base);border-style:var(--el-border-style);border-width:var(--el-border-width);box-sizing:border-box;display:flex;gap:8px;left:50%;max-width:calc(100% - 32px);padding:var(--el-message-padding);position:fixed;top:20px;transform:translate(-50%);transition:opacity var(--el-transition-duration),transform .4s,top .4s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.el-message.is-center{justify-content:center}.el-message.is-plain{background-color:var(--el-bg-color-overlay);border-color:var(--el-bg-color-overlay);box-shadow:var(--el-box-shadow-light)}.el-message p{margin:0}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message .el-message__badge{position:absolute;right:-8px;top:-8px}.el-message__content{font-size:14px;line-height:1;padding:0}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{color:var(--el-message-close-icon-color);cursor:pointer;font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}.el-notification{--el-notification-width:330px;--el-notification-padding:14px 26px 14px 13px;--el-notification-radius:8px;--el-notification-shadow:var(--el-box-shadow-light);--el-notification-border-color:var(--el-border-color-lighter);--el-notification-icon-size:24px;--el-notification-close-font-size:var(--el-message-close-size,16px);--el-notification-group-margin-left:13px;--el-notification-group-margin-right:8px;--el-notification-content-font-size:var(--el-font-size-base);--el-notification-content-color:var(--el-text-color-regular);--el-notification-title-font-size:16px;--el-notification-title-color:var(--el-text-color-primary);--el-notification-close-color:var(--el-text-color-secondary);--el-notification-close-hover-color:var(--el-text-color-regular);background-color:var(--el-bg-color-overlay);border:1px solid var(--el-notification-border-color);border-radius:var(--el-notification-radius);box-shadow:var(--el-notification-shadow);box-sizing:border-box;display:flex;overflow:hidden;overflow-wrap:break-word;padding:var(--el-notification-padding);position:fixed;transition:opacity var(--el-transition-duration),transform var(--el-transition-duration),left var(--el-transition-duration),right var(--el-transition-duration),top .4s,bottom var(--el-transition-duration);width:var(--el-notification-width);z-index:9999}.el-notification.right{right:16px}.el-notification.left{left:16px}.el-notification__group{margin-left:var(--el-notification-group-margin-left);margin-right:var(--el-notification-group-margin-right)}.el-notification__title{color:var(--el-notification-title-color);font-size:var(--el-notification-title-font-size);font-weight:700;line-height:var(--el-notification-icon-size);margin:0}.el-notification__content{color:var(--el-notification-content-color);font-size:var(--el-notification-content-font-size);line-height:24px;margin:6px 0 0}.el-notification__content p{margin:0}.el-notification .el-notification__icon{font-size:var(--el-notification-icon-size);height:var(--el-notification-icon-size);width:var(--el-notification-icon-size)}.el-notification .el-notification__closeBtn{color:var(--el-notification-close-color);cursor:pointer;font-size:var(--el-notification-close-font-size);position:absolute;right:15px;top:18px}.el-notification .el-notification__closeBtn:hover{color:var(--el-notification-close-hover-color)}.el-notification .el-notification--success{--el-notification-icon-color:var(--el-color-success);color:var(--el-notification-icon-color)}.el-notification .el-notification--info{--el-notification-icon-color:var(--el-color-info);color:var(--el-notification-icon-color)}.el-notification .el-notification--warning{--el-notification-icon-color:var(--el-color-warning);color:var(--el-notification-icon-color)}.el-notification .el-notification--error{--el-notification-icon-color:var(--el-color-error);color:var(--el-notification-icon-color)}.el-notification-fade-enter-from.right{right:0;transform:translate(100%)}.el-notification-fade-enter-from.left{left:0;transform:translate(-100%)}.el-notification-fade-leave-to{opacity:0}.el-overlay{background-color:var(--el-overlay-color-lighter);bottom:0;height:100%;left:0;overflow:auto;position:fixed;right:0;top:0;z-index:2000}.el-overlay .el-overlay-root{height:0}.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{align-items:center;display:flex;justify-content:space-between;line-height:24px}.el-page-header__left{align-items:center;display:flex;margin-right:40px;position:relative}.el-page-header__back{align-items:center;cursor:pointer;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;display:flex;font-size:16px;margin-right:10px}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.el-pagination{--el-pagination-font-size:14px;--el-pagination-bg-color:var(--el-fill-color-blank);--el-pagination-text-color:var(--el-text-color-primary);--el-pagination-border-radius:2px;--el-pagination-button-color:var(--el-text-color-primary);--el-pagination-button-width:32px;--el-pagination-button-height:32px;--el-pagination-button-disabled-color:var(--el-text-color-placeholder);--el-pagination-button-disabled-bg-color:var(--el-fill-color-blank);--el-pagination-button-bg-color:var(--el-fill-color);--el-pagination-hover-color:var(--el-color-primary);--el-pagination-font-size-small:12px;--el-pagination-button-width-small:24px;--el-pagination-button-height-small:24px;--el-pagination-button-width-large:40px;--el-pagination-button-height-large:40px;--el-pagination-item-gap:16px;align-items:center;color:var(--el-pagination-text-color);display:flex;font-size:var(--el-pagination-font-size);font-weight:400;white-space:nowrap}.el-pagination .el-input__inner{-moz-appearance:textfield;text-align:center}.el-pagination .el-select{width:128px}.el-pagination button{align-items:center;background:var(--el-pagination-bg-color);border:none;border-radius:var(--el-pagination-border-radius);box-sizing:border-box;color:var(--el-pagination-button-color);cursor:pointer;display:flex;font-size:var(--el-pagination-font-size);height:var(--el-pagination-button-height);justify-content:center;line-height:var(--el-pagination-button-height);min-width:var(--el-pagination-button-width);padding:0 4px;text-align:center}.el-pagination button *{pointer-events:none}.el-pagination button:focus{outline:none}.el-pagination button:hover{color:var(--el-pagination-hover-color)}.el-pagination button.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pagination button.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pagination button.is-disabled,.el-pagination button:disabled{background-color:var(--el-pagination-button-disabled-bg-color);color:var(--el-pagination-button-disabled-color);cursor:not-allowed}.el-pagination button:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-pagination .btn-next .el-icon,.el-pagination .btn-prev .el-icon{display:block;font-size:12px;font-weight:700;width:inherit}.el-pagination>.is-first{margin-left:0!important}.el-pagination>.is-last{margin-right:0!important}.el-pagination .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination__sizes,.el-pagination__total{color:var(--el-text-color-regular);font-weight:400;margin-left:var(--el-pagination-item-gap)}.el-pagination__total[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__jump{align-items:center;color:var(--el-text-color-regular);display:flex;font-weight:400;margin-left:var(--el-pagination-item-gap)}.el-pagination__jump[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__goto{margin-right:8px}.el-pagination__editor{box-sizing:border-box;text-align:center}.el-pagination__editor.el-input{width:56px}.el-pagination__editor .el-input__inner::-webkit-inner-spin-button,.el-pagination__editor .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-pagination__classifier{margin-left:8px}.el-pagination__rightwrapper{align-items:center;display:flex;flex:1;justify-content:flex-end}.el-pagination.is-background .btn-next,.el-pagination.is-background .btn-prev,.el-pagination.is-background .el-pager li{background-color:var(--el-pagination-button-bg-color);margin:0 4px}.el-pagination.is-background .btn-next.is-active,.el-pagination.is-background .btn-prev.is-active,.el-pagination.is-background .el-pager li.is-active{background-color:var(--el-color-primary);color:var(--el-color-white)}.el-pagination.is-background .btn-next.is-disabled,.el-pagination.is-background .btn-next:disabled,.el-pagination.is-background .btn-prev.is-disabled,.el-pagination.is-background .btn-prev:disabled,.el-pagination.is-background .el-pager li.is-disabled,.el-pagination.is-background .el-pager li:disabled{background-color:var(--el-disabled-bg-color);color:var(--el-text-color-placeholder)}.el-pagination.is-background .btn-next.is-disabled.is-active,.el-pagination.is-background .btn-next:disabled.is-active,.el-pagination.is-background .btn-prev.is-disabled.is-active,.el-pagination.is-background .btn-prev:disabled.is-active,.el-pagination.is-background .el-pager li.is-disabled.is-active,.el-pagination.is-background .el-pager li:disabled.is-active{background-color:var(--el-fill-color-dark);color:var(--el-text-color-secondary)}.el-pagination.is-background .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination--small .btn-next,.el-pagination--small .btn-prev,.el-pagination--small .el-pager li{font-size:var(--el-pagination-font-size-small);height:var(--el-pagination-button-height-small);line-height:var(--el-pagination-button-height-small);min-width:var(--el-pagination-button-width-small)}.el-pagination--small button,.el-pagination--small span:not([class*=suffix]){font-size:var(--el-pagination-font-size-small)}.el-pagination--small .el-select{width:100px}.el-pagination--large .btn-next,.el-pagination--large .btn-prev,.el-pagination--large .el-pager li{height:var(--el-pagination-button-height-large);line-height:var(--el-pagination-button-height-large);min-width:var(--el-pagination-button-width-large)}.el-pagination--large .el-select .el-input{width:160px}.el-pager{font-size:0;list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-pager,.el-pager li{align-items:center;display:flex}.el-pager li{background:var(--el-pagination-bg-color);border:none;border-radius:var(--el-pagination-border-radius);box-sizing:border-box;color:var(--el-pagination-button-color);cursor:pointer;font-size:var(--el-pagination-font-size);height:var(--el-pagination-button-height);justify-content:center;line-height:var(--el-pagination-button-height);min-width:var(--el-pagination-button-width);padding:0 4px;text-align:center}.el-pager li *{pointer-events:none}.el-pager li:focus{outline:none}.el-pager li:hover{color:var(--el-pagination-hover-color)}.el-pager li.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pager li.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pager li.is-disabled,.el-pager li:disabled{background-color:var(--el-pagination-button-disabled-bg-color);color:var(--el-pagination-button-disabled-color);cursor:not-allowed}.el-pager li:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-popconfirm__main{align-items:center;display:flex}.el-popconfirm__icon{margin-right:5px}.el-popconfirm__action{margin-top:8px;text-align:right}.el-popover{--el-popover-bg-color:var(--el-bg-color-overlay);--el-popover-font-size:var(--el-font-size-base);--el-popover-border-color:var(--el-border-color-lighter);--el-popover-padding:12px;--el-popover-padding-large:18px 20px;--el-popover-title-font-size:16px;--el-popover-title-text-color:var(--el-text-color-primary);--el-popover-border-radius:4px}.el-popover.el-popper{background:var(--el-popover-bg-color);border:1px solid var(--el-popover-border-color);border-radius:var(--el-popover-border-radius);box-shadow:var(--el-box-shadow-light);box-sizing:border-box;color:var(--el-text-color-regular);font-size:var(--el-popover-font-size);line-height:1.4;min-width:150px;overflow-wrap:break-word;padding:var(--el-popover-padding);z-index:var(--el-index-popper)}.el-popover.el-popper--plain{padding:var(--el-popover-padding-large)}.el-popover__title{color:var(--el-popover-title-text-color);font-size:var(--el-popover-title-font-size);line-height:1;margin-bottom:12px}.el-popover__reference:focus:hover,.el-popover__reference:focus:not(.focusing){outline-width:0}.el-popover.el-popper.is-dark{--el-popover-bg-color:var(--el-text-color-primary);--el-popover-border-color:var(--el-text-color-primary);--el-popover-title-text-color:var(--el-bg-color);color:var(--el-bg-color)}.el-popover.el-popper:focus,.el-popover.el-popper:focus:active{outline-width:0}.el-progress{align-items:center;display:flex;line-height:1;position:relative}.el-progress__text{color:var(--el-text-color-regular);font-size:14px;line-height:1;margin-left:5px;min-width:50px}.el-progress__text i{display:block;vertical-align:middle}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{left:0;margin:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);width:100%}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{display:inline-block;vertical-align:middle}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{display:block;margin-right:0;padding-right:0}.el-progress--text-inside .el-progress-bar{margin-right:0;padding-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bar__inner{background-color:var(--el-color-danger)}.el-progress.is-exception .el-progress__text{color:var(--el-color-danger)}.el-progress-bar{box-sizing:border-box;flex-grow:1}.el-progress-bar__outer{background-color:var(--el-border-color-lighter);border-radius:100px;height:6px;overflow:hidden;position:relative;vertical-align:middle}.el-progress-bar__inner{background-color:var(--el-color-primary);border-radius:100px;height:100%;left:0;line-height:1;position:absolute;text-align:right;top:0;transition:width .6s ease;white-space:nowrap}.el-progress-bar__inner:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-progress-bar__inner--indeterminate{-webkit-animation:indeterminate 3s infinite;animation:indeterminate 3s infinite;transform:translateZ(0)}.el-progress-bar__inner--striped{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0,transparent 50%,rgba(0,0,0,.1) 0,rgba(0,0,0,.1) 75%,transparent 0,transparent);background-size:1.25em 1.25em}.el-progress-bar__inner--striped.el-progress-bar__inner--striped-flow{-webkit-animation:striped-flow 3s linear infinite;animation:striped-flow 3s linear infinite}.el-progress-bar__innerText{color:#fff;display:inline-block;font-size:12px;margin:0 5px;vertical-align:middle}@-webkit-keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@-webkit-keyframes indeterminate{0%{left:-100%}to{left:100%}}@keyframes indeterminate{0%{left:-100%}to{left:100%}}@-webkit-keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}@keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}.el-radio-button{--el-radio-button-checked-bg-color:var(--el-color-primary);--el-radio-button-checked-text-color:var(--el-color-white);--el-radio-button-checked-border-color:var(--el-color-primary);--el-radio-button-disabled-checked-fill:var(--el-border-color-extra-light)}.el-radio-button,.el-radio-button__inner{display:inline-block;outline:none;position:relative}.el-radio-button__inner{-webkit-appearance:none;background:var(--el-button-bg-color,var(--el-fill-color-blank));border:var(--el-border);border-left:0;border-radius:0;box-sizing:border-box;color:var(--el-button-text-color,var(--el-text-color-regular));cursor:pointer;font-size:var(--el-font-size-base);font-weight:var(--el-button-font-weight,var(--el-font-weight-primary));line-height:1;margin:0;padding:8px 15px;text-align:center;transition:var(--el-transition-all);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.el-radio-button__inner.is-round{padding:8px 15px}.el-radio-button__inner:hover{color:var(--el-color-primary)}.el-radio-button__inner [class*=el-icon-]{line-height:.9}.el-radio-button__inner [class*=el-icon-]+span{margin-left:5px}.el-radio-button:first-child .el-radio-button__inner{border-left:var(--el-border);border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);box-shadow:none!important}.el-radio-button__original-radio{opacity:0;outline:none;position:absolute;z-index:-1}.el-radio-button__original-radio:checked+.el-radio-button__inner{background-color:var(--el-radio-button-checked-bg-color,var(--el-color-primary));border-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));box-shadow:-1px 0 0 0 var(--el-radio-button-checked-border-color,var(--el-color-primary));color:var(--el-radio-button-checked-text-color,var(--el-color-white))}.el-radio-button__original-radio:focus-visible+.el-radio-button__inner{border-left:var(--el-border);border-left-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));border-radius:var(--el-border-radius-base);box-shadow:none;outline:2px solid var(--el-radio-button-checked-border-color);outline-offset:1px;z-index:2}.el-radio-button__original-radio:disabled+.el-radio-button__inner{background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));background-image:none;border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none;color:var(--el-disabled-text-color);cursor:not-allowed}.el-radio-button__original-radio:disabled:checked+.el-radio-button__inner{background-color:var(--el-radio-button-disabled-checked-fill)}.el-radio-button:last-child .el-radio-button__inner{border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0}.el-radio-button:first-child:last-child .el-radio-button__inner{border-radius:var(--el-border-radius-base)}.el-radio-button--large .el-radio-button__inner{border-radius:0;font-size:var(--el-font-size-base);padding:12px 19px}.el-radio-button--large .el-radio-button__inner.is-round{padding:12px 19px}.el-radio-button--small .el-radio-button__inner{border-radius:0;font-size:12px;padding:5px 11px}.el-radio-button--small .el-radio-button__inner.is-round{padding:5px 11px}.el-radio-group{align-items:center;display:inline-flex;flex-wrap:wrap;font-size:0}.el-radio{--el-radio-font-size:var(--el-font-size-base);--el-radio-text-color:var(--el-text-color-regular);--el-radio-font-weight:var(--el-font-weight-primary);--el-radio-input-height:14px;--el-radio-input-width:14px;--el-radio-input-border-radius:var(--el-border-radius-circle);--el-radio-input-bg-color:var(--el-fill-color-blank);--el-radio-input-border:var(--el-border);--el-radio-input-border-color:var(--el-border-color);--el-radio-input-border-color-hover:var(--el-color-primary);align-items:center;color:var(--el-radio-text-color);cursor:pointer;display:inline-flex;font-size:var(--el-font-size-base);font-weight:var(--el-radio-font-weight);height:32px;margin-right:32px;outline:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-radio.el-radio--large{height:40px}.el-radio.el-radio--small{height:24px}.el-radio.is-bordered{border:var(--el-border);border-radius:var(--el-border-radius-base);box-sizing:border-box;padding:0 15px 0 9px}.el-radio.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-radio.is-bordered.is-disabled{border-color:var(--el-border-color-lighter);cursor:not-allowed}.el-radio.is-bordered.el-radio--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-radio.is-bordered.el-radio--large .el-radio__label{font-size:var(--el-font-size-base)}.el-radio.is-bordered.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.is-bordered.el-radio--small{border-radius:var(--el-border-radius-base);padding:0 11px 0 7px}.el-radio.is-bordered.el-radio--small .el-radio__label{font-size:12px}.el-radio.is-bordered.el-radio--small .el-radio__inner{height:12px;width:12px}.el-radio:last-child{margin-right:0}.el-radio__input{cursor:pointer;display:inline-flex;outline:none;position:relative;vertical-align:middle;white-space:nowrap}.el-radio__input.is-disabled .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner:after{background-color:var(--el-disabled-bg-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner+.el-radio__label{cursor:not-allowed}.el-radio__input.is-disabled.is-checked .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color)}.el-radio__input.is-disabled.is-checked .el-radio__inner:after{background-color:var(--el-text-color-placeholder)}.el-radio__input.is-disabled+span.el-radio__label{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-radio__input.is-checked .el-radio__inner{background:var(--el-color-primary);border-color:var(--el-color-primary)}.el-radio__input.is-checked .el-radio__inner:after{transform:translate(-50%,-50%) scale(1)}.el-radio__input.is-checked+.el-radio__label{color:var(--el-color-primary)}.el-radio__input.is-focus .el-radio__inner{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner{background-color:var(--el-radio-input-bg-color);border:var(--el-radio-input-border);border-radius:var(--el-radio-input-border-radius);box-sizing:border-box;cursor:pointer;display:inline-block;height:var(--el-radio-input-height);position:relative;width:var(--el-radio-input-width)}.el-radio__inner:hover{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner:after{background-color:var(--el-color-white);border-radius:var(--el-radio-input-border-radius);content:"";height:4px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) scale(0);transition:transform .15s ease-in;width:4px}.el-radio__original{bottom:0;left:0;margin:0;opacity:0;outline:none;position:absolute;right:0;top:0;z-index:-1}.el-radio__original:focus-visible+.el-radio__inner{border-radius:var(--el-radio-input-border-radius);outline:2px solid var(--el-radio-input-border-color-hover);outline-offset:1px}.el-radio:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:0 0 2px 2px var(--el-radio-input-border-color-hover)}.el-radio__label{font-size:var(--el-radio-font-size);padding-left:8px}.el-radio.el-radio--large .el-radio__label{font-size:14px}.el-radio.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.el-radio--small .el-radio__label{font-size:12px}.el-radio.el-radio--small .el-radio__inner{height:12px;width:12px}.el-rate{--el-rate-height:20px;--el-rate-font-size:var(--el-font-size-base);--el-rate-icon-size:18px;--el-rate-icon-margin:6px;--el-rate-void-color:var(--el-border-color-darker);--el-rate-fill-color:#f7ba2a;--el-rate-disabled-void-color:var(--el-fill-color);--el-rate-text-color:var(--el-text-color-primary);align-items:center;display:inline-flex;height:32px}.el-rate:active,.el-rate:focus{outline:none}.el-rate__item{color:var(--el-rate-void-color);cursor:pointer;display:inline-block;font-size:0;line-height:normal;position:relative;vertical-align:middle}.el-rate .el-rate__icon{display:inline-block;font-size:var(--el-rate-icon-size);margin-right:var(--el-rate-icon-margin);position:relative;transition:var(--el-transition-duration)}.el-rate .el-rate__icon.hover{transform:scale(1.15)}.el-rate .el-rate__icon .path2{left:0;position:absolute;top:0}.el-rate .el-rate__icon.is-active{color:var(--el-rate-fill-color)}.el-rate__decimal{color:var(--el-rate-fill-color);display:inline-block;overflow:hidden}.el-rate__decimal,.el-rate__decimal--box{left:0;position:absolute;top:0}.el-rate__text{color:var(--el-rate-text-color);font-size:var(--el-rate-font-size);vertical-align:middle}.el-rate--large{height:40px}.el-rate--small{height:24px}.el-rate--small .el-rate__icon{font-size:14px}.el-rate.is-disabled .el-rate__item{color:var(--el-rate-disabled-void-color);cursor:auto}.el-result{--el-result-padding:40px 30px;--el-result-icon-font-size:64px;--el-result-title-font-size:20px;--el-result-title-margin-top:20px;--el-result-subtitle-margin-top:10px;--el-result-extra-margin-top:30px;align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:var(--el-result-padding);text-align:center}.el-result__icon svg{height:var(--el-result-icon-font-size);width:var(--el-result-icon-font-size)}.el-result__title{margin-top:var(--el-result-title-margin-top)}.el-result__title p{color:var(--el-text-color-primary);font-size:var(--el-result-title-font-size);line-height:1.3;margin:0}.el-result__subtitle{margin-top:var(--el-result-subtitle-margin-top)}.el-result__subtitle p{color:var(--el-text-color-regular);font-size:var(--el-font-size-base);line-height:1.3;margin:0}.el-result__extra{margin-top:var(--el-result-extra-margin-top)}.el-result .icon-primary{--el-result-color:var(--el-color-primary);color:var(--el-result-color)}.el-result .icon-success{--el-result-color:var(--el-color-success);color:var(--el-result-color)}.el-result .icon-warning{--el-result-color:var(--el-color-warning);color:var(--el-result-color)}.el-result .icon-danger{--el-result-color:var(--el-color-danger);color:var(--el-result-color)}.el-result .icon-error{--el-result-color:var(--el-color-error);color:var(--el-result-color)}.el-result .icon-info{--el-result-color:var(--el-color-info);color:var(--el-result-color)}.el-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-top{align-items:flex-start}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}.el-scrollbar{--el-scrollbar-opacity:.3;--el-scrollbar-bg-color:var(--el-text-color-secondary);--el-scrollbar-hover-opacity:.5;--el-scrollbar-hover-bg-color:var(--el-text-color-secondary);height:100%;overflow:hidden;position:relative}.el-scrollbar__wrap{height:100%;overflow:auto}.el-scrollbar__wrap--hidden-default{scrollbar-width:none}.el-scrollbar__wrap--hidden-default::-webkit-scrollbar{display:none}.el-scrollbar__thumb{background-color:var(--el-scrollbar-bg-color,var(--el-text-color-secondary));border-radius:inherit;cursor:pointer;display:block;height:0;opacity:var(--el-scrollbar-opacity,.3);position:relative;transition:var(--el-transition-duration) background-color;width:0}.el-scrollbar__thumb:hover{background-color:var(--el-scrollbar-hover-bg-color,var(--el-text-color-secondary));opacity:var(--el-scrollbar-hover-opacity,.5)}.el-scrollbar__bar{border-radius:4px;bottom:2px;position:absolute;right:2px;z-index:1}.el-scrollbar__bar.is-vertical{top:2px;width:6px}.el-scrollbar__bar.is-vertical>div{width:100%}.el-scrollbar__bar.is-horizontal{height:6px;left:2px}.el-scrollbar__bar.is-horizontal>div{height:100%}.el-scrollbar-fade-enter-active{transition:opacity .34s ease-out}.el-scrollbar-fade-leave-active{transition:opacity .12s ease-out}.el-scrollbar-fade-enter-from,.el-scrollbar-fade-leave-active{opacity:0}.el-select-dropdown{border-radius:var(--el-border-radius-base);box-sizing:border-box;z-index:calc(var(--el-index-top) + 1)}.el-select-dropdown .el-scrollbar.is-empty .el-select-dropdown__list{padding:0}.el-select-dropdown__empty,.el-select-dropdown__loading{color:var(--el-text-color-secondary);font-size:var(--el-select-font-size);margin:0;padding:10px 0;text-align:center}.el-select-dropdown__wrap{max-height:274px}.el-select-dropdown__list{box-sizing:border-box;list-style:none;margin:0;padding:6px 0}.el-select-dropdown__list.el-vl__window{margin:6px 0;padding:0}.el-select-dropdown__header{border-bottom:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__footer{border-top:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__item{box-sizing:border-box;color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-base);height:34px;line-height:34px;overflow:hidden;padding:0 32px 0 20px;position:relative;text-overflow:ellipsis;white-space:nowrap}.el-select-dropdown__item.is-hovering{background-color:var(--el-fill-color-light)}.el-select-dropdown__item.is-selected{color:var(--el-color-primary);font-weight:700}.el-select-dropdown__item.is-disabled{background-color:unset;color:var(--el-text-color-placeholder);cursor:not-allowed}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-selected:after{background-color:var(--el-color-primary);background-position:50%;background-repeat:no-repeat;border-right:none;border-top:none;content:"";height:12px;mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") no-repeat;mask-size:100% 100%;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") no-repeat;-webkit-mask-size:100% 100%;position:absolute;right:20px;top:50%;transform:translateY(-50%);width:12px}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-disabled:after{background-color:var(--el-text-color-placeholder)}.el-select-group{margin:0;padding:0}.el-select-group__wrap{list-style:none;margin:0;padding:0;position:relative}.el-select-group__title{color:var(--el-color-info);font-size:12px;line-height:34px;padding-left:20px}.el-select-group .el-select-dropdown__item{padding-left:20px}.el-select{--el-select-border-color-hover:var(--el-border-color-hover);--el-select-disabled-color:var(--el-disabled-text-color);--el-select-disabled-border:var(--el-disabled-border-color);--el-select-font-size:var(--el-font-size-base);--el-select-close-hover-color:var(--el-text-color-secondary);--el-select-input-color:var(--el-text-color-placeholder);--el-select-multiple-input-color:var(--el-text-color-regular);--el-select-input-focus-border-color:var(--el-color-primary);--el-select-input-font-size:14px;--el-select-width:100%;display:inline-block;position:relative;vertical-align:middle;width:var(--el-select-width)}.el-select__wrapper{align-items:center;background-color:var(--el-fill-color-blank);border-radius:var(--el-border-radius-base);box-shadow:0 0 0 1px var(--el-border-color) inset;box-sizing:border-box;cursor:pointer;display:flex;font-size:14px;gap:6px;line-height:24px;min-height:32px;padding:4px 12px;position:relative;text-align:left;transition:var(--el-transition-duration)}.el-select__wrapper:hover{box-shadow:0 0 0 1px var(--el-text-color) inset}.el-select__wrapper.is-filterable{cursor:text}.el-select__wrapper.is-focused{box-shadow:0 0 0 1px var(--el-color-primary) inset}.el-select__wrapper.is-hovering:not(.is-focused){box-shadow:0 0 0 1px var(--el-border-color-hover) inset}.el-select__wrapper.is-disabled{background-color:var(--el-fill-color-light);box-shadow:0 0 0 1px var(--el-select-disabled-border) inset;color:var(--el-text-color-placeholder);cursor:not-allowed}.el-select__wrapper.is-disabled:hover{box-shadow:0 0 0 1px var(--el-select-disabled-border) inset}.el-select__wrapper.is-disabled.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-select__wrapper.is-disabled .el-select__selected-item{color:var(--el-select-disabled-color)}.el-select__wrapper.is-disabled .el-select__caret,.el-select__wrapper.is-disabled .el-tag{cursor:not-allowed}.el-select__prefix,.el-select__suffix{align-items:center;color:var(--el-input-icon-color,var(--el-text-color-placeholder));display:flex;flex-shrink:0;gap:6px}.el-select__caret{color:var(--el-select-input-color);cursor:pointer;font-size:var(--el-select-input-font-size);transform:rotate(0);transition:var(--el-transition-duration)}.el-select__caret.is-reverse{transform:rotate(180deg)}.el-select__selection{align-items:center;display:flex;flex:1;flex-wrap:wrap;gap:6px;min-width:0;position:relative}.el-select__selection.is-near{margin-left:-8px}.el-select__selection .el-tag{border-color:transparent;cursor:pointer}.el-select__selection .el-tag .el-tag__content{min-width:0}.el-select__selected-item{display:flex;flex-wrap:wrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-select__tags-text{line-height:normal}.el-select__placeholder,.el-select__tags-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-select__placeholder{color:var(--el-input-text-color,var(--el-text-color-regular));position:absolute;top:50%;transform:translateY(-50%);width:100%}.el-select__placeholder.is-transparent{color:var(--el-text-color-placeholder);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-select__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-select__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-select__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent;border-top-color:transparent}.el-select__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-select__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent;border-left-color:transparent}.el-select__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-select__input-wrapper{max-width:100%}.el-select__input-wrapper.is-hidden{opacity:0;position:absolute}.el-select__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--el-select-multiple-input-color);font-family:inherit;font-size:inherit;height:24px;max-width:100%;outline:none;padding:0}.el-select__input.is-disabled{cursor:not-allowed}.el-select__input-calculator{left:0;max-width:100%;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:pre}.el-select--large .el-select__wrapper{font-size:14px;gap:6px;line-height:24px;min-height:40px;padding:8px 16px}.el-select--large .el-select__selection{gap:6px}.el-select--large .el-select__selection.is-near{margin-left:-8px}.el-select--large .el-select__prefix,.el-select--large .el-select__suffix{gap:6px}.el-select--large .el-select__input{height:24px}.el-select--small .el-select__wrapper{font-size:12px;gap:4px;line-height:20px;min-height:24px;padding:2px 8px}.el-select--small .el-select__selection{gap:4px}.el-select--small .el-select__selection.is-near{margin-left:-6px}.el-select--small .el-select__prefix,.el-select--small .el-select__suffix{gap:4px}.el-select--small .el-select__input{height:20px}.el-skeleton{--el-skeleton-circle-size:var(--el-avatar-size)}.el-skeleton__item{background:var(--el-skeleton-color);border-radius:var(--el-border-radius-base);display:inline-block;height:16px;width:100%}.el-skeleton__circle{border-radius:50%;height:var(--el-skeleton-circle-size);line-height:var(--el-skeleton-circle-size);width:var(--el-skeleton-circle-size)}.el-skeleton__button{border-radius:4px;height:40px;width:64px}.el-skeleton__p{width:100%}.el-skeleton__p.is-last{width:61%}.el-skeleton__p.is-first{width:33%}.el-skeleton__text{height:var(--el-font-size-small);width:100%}.el-skeleton__caption{height:var(--el-font-size-extra-small)}.el-skeleton__h1{height:var(--el-font-size-extra-large)}.el-skeleton__h3{height:var(--el-font-size-large)}.el-skeleton__h5{height:var(--el-font-size-medium)}.el-skeleton__image{align-items:center;border-radius:0;display:flex;justify-content:center;width:unset}.el-skeleton__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;height:22%;width:22%}.el-skeleton{--el-skeleton-color:var(--el-fill-color);--el-skeleton-to-color:var(--el-fill-color-darker)}@-webkit-keyframes el-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}@keyframes el-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}.el-skeleton{width:100%}.el-skeleton__first-line,.el-skeleton__paragraph{background:var(--el-skeleton-color);height:16px;margin-top:16px}.el-skeleton.is-animated .el-skeleton__item{-webkit-animation:el-skeleton-loading 1.4s ease infinite;animation:el-skeleton-loading 1.4s ease infinite;background:linear-gradient(90deg,var(--el-skeleton-color) 25%,var(--el-skeleton-to-color) 37%,var(--el-skeleton-color) 63%);background-size:400% 100%}.el-slider{--el-slider-main-bg-color:var(--el-color-primary);--el-slider-runway-bg-color:var(--el-border-color-light);--el-slider-stop-bg-color:var(--el-color-white);--el-slider-disabled-color:var(--el-text-color-placeholder);--el-slider-border-radius:3px;--el-slider-height:6px;--el-slider-button-size:20px;--el-slider-button-wrapper-size:36px;--el-slider-button-wrapper-offset:-15px;align-items:center;display:flex;height:32px;width:100%}.el-slider__runway{background-color:var(--el-slider-runway-bg-color);border-radius:var(--el-slider-border-radius);cursor:pointer;flex:1;height:var(--el-slider-height);position:relative}.el-slider__runway.show-input{margin-right:30px;width:auto}.el-slider__runway.is-disabled{cursor:default}.el-slider__runway.is-disabled .el-slider__bar{background-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button{border-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button-wrapper.hover,.el-slider__runway.is-disabled .el-slider__button-wrapper:hover,.el-slider__runway.is-disabled .el-slider__button-wrapper.dragging{cursor:not-allowed}.el-slider__runway.is-disabled .el-slider__button.dragging,.el-slider__runway.is-disabled .el-slider__button.hover,.el-slider__runway.is-disabled .el-slider__button:hover{transform:scale(1)}.el-slider__runway.is-disabled .el-slider__button.hover,.el-slider__runway.is-disabled .el-slider__button:hover,.el-slider__runway.is-disabled .el-slider__button.dragging{cursor:not-allowed}.el-slider__input{flex-shrink:0;width:130px}.el-slider__bar{background-color:var(--el-slider-main-bg-color);border-bottom-left-radius:var(--el-slider-border-radius);border-top-left-radius:var(--el-slider-border-radius);height:var(--el-slider-height);position:absolute}.el-slider__button-wrapper{background-color:transparent;height:var(--el-slider-button-wrapper-size);line-height:normal;outline:none;position:absolute;text-align:center;top:var(--el-slider-button-wrapper-offset);transform:translate(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:var(--el-slider-button-wrapper-size);z-index:1}.el-slider__button-wrapper:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-slider__button-wrapper.hover,.el-slider__button-wrapper:hover{cursor:-webkit-grab;cursor:grab}.el-slider__button-wrapper.dragging{cursor:-webkit-grabbing;cursor:grabbing}.el-slider__button{background-color:var(--el-color-white);border:2px solid var(--el-slider-main-bg-color);border-radius:50%;box-sizing:border-box;display:inline-block;height:var(--el-slider-button-size);transition:var(--el-transition-duration-fast);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:var(--el-slider-button-size)}.el-slider__button.dragging,.el-slider__button.hover,.el-slider__button:hover{transform:scale(1.2)}.el-slider__button.hover,.el-slider__button:hover{cursor:-webkit-grab;cursor:grab}.el-slider__button.dragging{cursor:-webkit-grabbing;cursor:grabbing}.el-slider__stop{background-color:var(--el-slider-stop-bg-color);border-radius:var(--el-border-radius-circle);height:var(--el-slider-height);position:absolute;transform:translate(-50%);width:var(--el-slider-height)}.el-slider__marks{height:100%;left:12px;top:0;width:18px}.el-slider__marks-text{color:var(--el-color-info);font-size:14px;margin-top:15px;position:absolute;transform:translate(-50%);white-space:pre}.el-slider.is-vertical{display:inline-flex;flex:0;height:100%;position:relative;width:auto}.el-slider.is-vertical .el-slider__runway{height:100%;margin:0 16px;width:var(--el-slider-height)}.el-slider.is-vertical .el-slider__bar{border-radius:0 0 3px 3px;height:auto;width:var(--el-slider-height)}.el-slider.is-vertical .el-slider__button-wrapper{left:var(--el-slider-button-wrapper-offset);top:auto;transform:translateY(50%)}.el-slider.is-vertical .el-slider__stop{transform:translateY(50%)}.el-slider.is-vertical .el-slider__marks-text{left:15px;margin-top:0;transform:translateY(50%)}.el-slider--large{height:40px}.el-slider--small{height:24px}.el-space{display:inline-flex;vertical-align:top}.el-space__item{display:flex;flex-wrap:wrap}.el-space__item>*{flex:1}.el-space--vertical{flex-direction:column}.el-time-spinner{white-space:nowrap;width:100%}.el-spinner{display:inline-block;vertical-align:middle}.el-spinner-inner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;height:50px;width:50px}.el-spinner-inner .path{stroke:var(--el-border-color-lighter);stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}@-webkit-keyframes rotate{to{transform:rotate(1turn)}}@keyframes rotate{to{transform:rotate(1turn)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}.el-step{flex-shrink:1;position:relative}.el-step:last-of-type .el-step__line{display:none}.el-step:last-of-type.is-flex{flex-basis:auto!important;flex-grow:0;flex-shrink:0}.el-step:last-of-type .el-step__description,.el-step:last-of-type .el-step__main{padding-right:0}.el-step__head{position:relative;width:100%}.el-step__head.is-process{border-color:var(--el-text-color-primary);color:var(--el-text-color-primary)}.el-step__head.is-wait{border-color:var(--el-text-color-placeholder);color:var(--el-text-color-placeholder)}.el-step__head.is-success{border-color:var(--el-color-success);color:var(--el-color-success)}.el-step__head.is-error{border-color:var(--el-color-danger);color:var(--el-color-danger)}.el-step__head.is-finish{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-step__icon{align-items:center;background:var(--el-bg-color);box-sizing:border-box;display:inline-flex;font-size:14px;height:24px;justify-content:center;position:relative;transition:.15s ease-out;width:24px;z-index:1}.el-step__icon.is-text{border:2px solid;border-color:inherit;border-radius:50%}.el-step__icon.is-icon{width:40px}.el-step__icon-inner{color:inherit;display:inline-block;font-weight:700;line-height:1;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:25px;font-weight:400}.el-step__icon-inner.is-status{transform:translateY(1px)}.el-step__line{background-color:var(--el-text-color-placeholder);border-color:inherit;position:absolute}.el-step__line-inner{border:1px solid;border-color:inherit;box-sizing:border-box;display:block;height:0;transition:.15s ease-out;width:0}.el-step__main{text-align:left;white-space:normal}.el-step__title{font-size:16px;line-height:38px}.el-step__title.is-process{color:var(--el-text-color-primary);font-weight:700}.el-step__title.is-wait{color:var(--el-text-color-placeholder)}.el-step__title.is-success{color:var(--el-color-success)}.el-step__title.is-error{color:var(--el-color-danger)}.el-step__title.is-finish{color:var(--el-color-primary)}.el-step__description{font-size:12px;font-weight:400;line-height:20px;margin-top:-5px;padding-right:10%}.el-step__description.is-process{color:var(--el-text-color-primary)}.el-step__description.is-wait{color:var(--el-text-color-placeholder)}.el-step__description.is-success{color:var(--el-color-success)}.el-step__description.is-error{color:var(--el-color-danger)}.el-step__description.is-finish{color:var(--el-color-primary)}.el-step.is-horizontal{display:inline-block}.el-step.is-horizontal .el-step__line{height:2px;left:0;right:0;top:11px}.el-step.is-vertical{display:flex}.el-step.is-vertical .el-step__head{flex-grow:0;width:24px}.el-step.is-vertical .el-step__main{flex-grow:1;padding-left:10px}.el-step.is-vertical .el-step__title{line-height:24px;padding-bottom:8px}.el-step.is-vertical .el-step__line{bottom:0;left:11px;top:0;width:2px}.el-step.is-vertical .el-step__icon.is-icon{width:24px}.el-step.is-center .el-step__head,.el-step.is-center .el-step__main{text-align:center}.el-step.is-center .el-step__description{padding-left:20%;padding-right:20%}.el-step.is-center .el-step__line{left:50%;right:-50%}.el-step.is-simple{align-items:center;display:flex}.el-step.is-simple .el-step__head{font-size:0;padding-right:10px;width:auto}.el-step.is-simple .el-step__icon{background:transparent;font-size:12px;height:16px;width:16px}.el-step.is-simple .el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:18px}.el-step.is-simple .el-step__icon-inner.is-status{transform:scale(.8) translateY(1px)}.el-step.is-simple .el-step__main{align-items:stretch;display:flex;flex-grow:1;position:relative}.el-step.is-simple .el-step__title{font-size:16px;line-height:20px}.el-step.is-simple:not(:last-of-type) .el-step__title{max-width:50%;overflow-wrap:break-word}.el-step.is-simple .el-step__arrow{align-items:center;display:flex;flex-grow:1;justify-content:center}.el-step.is-simple .el-step__arrow:after,.el-step.is-simple .el-step__arrow:before{background:var(--el-text-color-placeholder);content:"";display:inline-block;height:15px;position:absolute;width:1px}.el-step.is-simple .el-step__arrow:before{transform:rotate(-45deg) translateY(-4px);transform-origin:0 0}.el-step.is-simple .el-step__arrow:after{transform:rotate(45deg) translateY(4px);transform-origin:100% 100%}.el-step.is-simple:last-of-type .el-step__arrow{display:none}.el-steps{display:flex}.el-steps--simple{background:var(--el-fill-color-light);border-radius:4px;padding:13px 8%}.el-steps--horizontal{white-space:nowrap}.el-steps--vertical{flex-flow:column;height:100%}.el-switch{--el-switch-on-color:var(--el-color-primary);--el-switch-off-color:var(--el-border-color);align-items:center;display:inline-flex;font-size:14px;height:32px;line-height:20px;position:relative;vertical-align:middle}.el-switch.is-disabled .el-switch__core,.el-switch.is-disabled .el-switch__label{cursor:not-allowed}.el-switch__label{color:var(--el-text-color-primary);cursor:pointer;display:inline-block;font-size:14px;font-weight:500;height:20px;transition:var(--el-transition-duration-fast);vertical-align:middle}.el-switch__label.is-active{color:var(--el-color-primary)}.el-switch__label--left{margin-right:10px}.el-switch__label--right{margin-left:10px}.el-switch__label *{display:inline-block;font-size:14px;line-height:1}.el-switch__label .el-icon{height:inherit}.el-switch__label .el-icon svg{vertical-align:middle}.el-switch__input{height:0;margin:0;opacity:0;position:absolute;width:0}.el-switch__input:focus-visible~.el-switch__core{outline:2px solid var(--el-switch-on-color);outline-offset:1px}.el-switch__core{align-items:center;background:var(--el-switch-off-color);border:1px solid var(--el-switch-border-color,var(--el-switch-off-color));border-radius:10px;box-sizing:border-box;cursor:pointer;display:inline-flex;height:20px;min-width:40px;outline:none;position:relative;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration)}.el-switch__core .el-switch__inner{align-items:center;display:flex;height:16px;justify-content:center;overflow:hidden;padding:0 4px 0 18px;transition:all var(--el-transition-duration);width:100%}.el-switch__core .el-switch__inner .is-icon,.el-switch__core .el-switch__inner .is-text{color:var(--el-color-white);font-size:12px;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.el-switch__core .el-switch__action{align-items:center;background-color:var(--el-color-white);border-radius:var(--el-border-radius-circle);color:var(--el-switch-off-color);display:flex;height:16px;justify-content:center;left:1px;position:absolute;transition:all var(--el-transition-duration);width:16px}.el-switch.is-checked .el-switch__core{background-color:var(--el-switch-on-color);border-color:var(--el-switch-border-color,var(--el-switch-on-color))}.el-switch.is-checked .el-switch__core .el-switch__action{color:var(--el-switch-on-color);left:calc(100% - 17px)}.el-switch.is-checked .el-switch__core .el-switch__inner{padding:0 18px 0 4px}.el-switch.is-disabled{opacity:.6}.el-switch--wide .el-switch__label.el-switch__label--left span{left:10px}.el-switch--wide .el-switch__label.el-switch__label--right span{right:10px}.el-switch .label-fade-enter-from,.el-switch .label-fade-leave-active{opacity:0}.el-switch--large{font-size:14px;height:40px;line-height:24px}.el-switch--large .el-switch__label{font-size:14px;height:24px}.el-switch--large .el-switch__label *{font-size:14px}.el-switch--large .el-switch__core{border-radius:12px;height:24px;min-width:50px}.el-switch--large .el-switch__core .el-switch__inner{height:20px;padding:0 6px 0 22px}.el-switch--large .el-switch__core .el-switch__action{height:20px;width:20px}.el-switch--large.is-checked .el-switch__core .el-switch__action{left:calc(100% - 21px)}.el-switch--large.is-checked .el-switch__core .el-switch__inner{padding:0 22px 0 6px}.el-switch--small{font-size:12px;height:24px;line-height:16px}.el-switch--small .el-switch__label{font-size:12px;height:16px}.el-switch--small .el-switch__label *{font-size:12px}.el-switch--small .el-switch__core{border-radius:8px;height:16px;min-width:30px}.el-switch--small .el-switch__core .el-switch__inner{height:12px;padding:0 2px 0 14px}.el-switch--small .el-switch__core .el-switch__action{height:12px;width:12px}.el-switch--small.is-checked .el-switch__core .el-switch__action{left:calc(100% - 13px)}.el-switch--small.is-checked .el-switch__core .el-switch__inner{padding:0 14px 0 2px}.el-table-column--selection .cell{padding-left:14px;padding-right:14px}.el-table-filter{background-color:#fff;border:1px solid var(--el-border-color-lighter);border-radius:2px;box-shadow:var(--el-box-shadow-light);box-sizing:border-box}.el-table-filter__list{list-style:none;margin:0;min-width:100px;padding:5px 0}.el-table-filter__list-item{cursor:pointer;font-size:var(--el-font-size-base);line-height:36px;padding:0 10px}.el-table-filter__list-item:hover{background-color:var(--el-color-primary-light-9);color:var(--el-color-primary)}.el-table-filter__list-item.is-active{background-color:var(--el-color-primary);color:#fff}.el-table-filter__content{min-width:100px}.el-table-filter__bottom{border-top:1px solid var(--el-border-color-lighter);padding:8px}.el-table-filter__bottom button{background:transparent;border:none;color:var(--el-text-color-regular);cursor:pointer;font-size:var(--el-font-size-small);padding:0 3px}.el-table-filter__bottom button:hover{color:var(--el-color-primary)}.el-table-filter__bottom button:focus{outline:none}.el-table-filter__bottom button.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-table-filter__wrap{max-height:280px}.el-table-filter__checkbox-group{padding:10px}.el-table-filter__checkbox-group label.el-checkbox{align-items:center;display:flex;height:unset;margin-bottom:12px;margin-left:5px;margin-right:5px}.el-table-filter__checkbox-group .el-checkbox:last-child{margin-bottom:0}.el-table{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-bg-color);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-bg-color);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px rgba(0,0,0,.15);--el-table-fixed-right-column:inset -10px 0 10px -10px rgba(0,0,0,.15);--el-table-index:var(--el-index-normal);background-color:var(--el-table-bg-color);box-sizing:border-box;color:var(--el-table-text-color);font-size:14px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-width:100%;overflow:hidden;position:relative;width:100%}.el-table__inner-wrapper{display:flex;flex-direction:column;height:100%;position:relative}.el-table__inner-wrapper:before{bottom:0;height:1px;left:0}.el-table tbody:focus-visible{outline:none}.el-table.has-footer.el-table--fluid-height tr:last-child td.el-table__cell,.el-table.has-footer.el-table--scrollable-y tr:last-child td.el-table__cell{border-bottom-color:transparent}.el-table__empty-block{align-items:center;display:flex;justify-content:center;left:0;min-height:60px;position:-webkit-sticky;position:sticky;text-align:center;width:100%}.el-table__empty-text{color:var(--el-text-color-secondary);line-height:60px;width:50%}.el-table__expand-column .cell{padding:0;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table__expand-icon{color:var(--el-text-color-regular);cursor:pointer;font-size:12px;height:20px;position:relative;transition:transform var(--el-transition-duration-fast) ease-in-out}.el-table__expand-icon--expanded{transform:rotate(90deg)}.el-table__expand-icon>.el-icon{font-size:12px}.el-table__expanded-cell{background-color:var(--el-table-expanded-cell-bg-color)}.el-table__expanded-cell[class*=cell]{padding:20px 50px}.el-table__expanded-cell:hover{background-color:transparent!important}.el-table__placeholder{display:inline-block;width:20px}.el-table__append-wrapper{overflow:hidden}.el-table--fit{border-bottom:0;border-right:0}.el-table--fit .el-table__cell.gutter{border-right-width:1px}.el-table--fit .el-table__inner-wrapper:before{width:100%}.el-table thead{color:var(--el-table-header-text-color)}.el-table thead th{font-weight:600}.el-table thead.is-group th.el-table__cell{background:var(--el-fill-color-light)}.el-table .el-table__cell{box-sizing:border-box;min-width:0;padding:8px 0;position:relative;text-align:left;text-overflow:ellipsis;vertical-align:middle;z-index:var(--el-table-index)}.el-table .el-table__cell.is-center{text-align:center}.el-table .el-table__cell.is-right{text-align:right}.el-table .el-table__cell.gutter{border-bottom-width:0;border-right-width:0;padding:0;width:15px}.el-table .el-table__cell.is-hidden>*{visibility:hidden}.el-table .cell{box-sizing:border-box;line-height:23px;overflow:hidden;overflow-wrap:break-word;padding:0 12px;text-overflow:ellipsis;white-space:normal}.el-table .cell.el-tooltip{min-width:50px;white-space:nowrap}.el-table--large{font-size:var(--el-font-size-base)}.el-table--large .el-table__cell{padding:12px 0}.el-table--large .cell{padding:0 16px}.el-table--default{font-size:14px}.el-table--default .el-table__cell{padding:8px 0}.el-table--default .cell{padding:0 12px}.el-table--small{font-size:12px}.el-table--small .el-table__cell{padding:4px 0}.el-table--small .cell{padding:0 8px}.el-table tr{background-color:var(--el-table-tr-bg-color)}.el-table tr input[type=checkbox]{margin:0}.el-table td.el-table__cell,.el-table th.el-table__cell.is-leaf{border-bottom:var(--el-table-border)}.el-table th.el-table__cell.is-sortable{cursor:pointer}.el-table th.el-table__cell{background-color:var(--el-table-header-bg-color)}.el-table th.el-table__cell>.cell.highlight{color:var(--el-color-primary)}.el-table th.el-table__cell.required>div:before{background:#ff4d51;border-radius:50%;content:"";display:inline-block;height:8px;margin-right:5px;vertical-align:middle;width:8px}.el-table td.el-table__cell div{box-sizing:border-box}.el-table td.el-table__cell.gutter{width:0}.el-table--border .el-table__inner-wrapper:after,.el-table--border:after,.el-table--border:before,.el-table__inner-wrapper:before{background-color:var(--el-table-border-color);content:"";position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table--border .el-table__inner-wrapper:after{height:1px;left:0;top:0;width:100%;z-index:calc(var(--el-table-index) + 2)}.el-table--border:before{height:100%;left:0;top:-1px;width:1px}.el-table--border:after{height:100%;right:0;top:-1px;width:1px}.el-table--border .el-table__inner-wrapper{border-bottom:none;border-right:none}.el-table--border .el-table__footer-wrapper{flex-shrink:0;position:relative}.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table--border th.el-table__cell.gutter:last-of-type{border-bottom:var(--el-table-border);border-bottom-width:1px}.el-table--border th.el-table__cell{border-bottom:var(--el-table-border)}.el-table--hidden{visibility:hidden}.el-table__body-wrapper,.el-table__footer-wrapper,.el-table__header-wrapper{width:100%}.el-table__body-wrapper tr td.el-table-fixed-column--left,.el-table__body-wrapper tr td.el-table-fixed-column--right,.el-table__body-wrapper tr th.el-table-fixed-column--left,.el-table__body-wrapper tr th.el-table-fixed-column--right,.el-table__footer-wrapper tr td.el-table-fixed-column--left,.el-table__footer-wrapper tr td.el-table-fixed-column--right,.el-table__footer-wrapper tr th.el-table-fixed-column--left,.el-table__footer-wrapper tr th.el-table-fixed-column--right,.el-table__header-wrapper tr td.el-table-fixed-column--left,.el-table__header-wrapper tr td.el-table-fixed-column--right,.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background:inherit;position:-webkit-sticky!important;position:sticky!important;z-index:calc(var(--el-table-index) + 1)}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{bottom:-1px;box-shadow:none;content:"";overflow-x:hidden;overflow-y:hidden;pointer-events:none;position:absolute;top:0;touch-action:none;width:10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before{left:-10px}.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before{box-shadow:none;right:-10px}.el-table__body-wrapper tr td.el-table__fixed-right-patch,.el-table__body-wrapper tr th.el-table__fixed-right-patch,.el-table__footer-wrapper tr td.el-table__fixed-right-patch,.el-table__footer-wrapper tr th.el-table__fixed-right-patch,.el-table__header-wrapper tr td.el-table__fixed-right-patch,.el-table__header-wrapper tr th.el-table__fixed-right-patch{background:#fff;position:-webkit-sticky!important;position:sticky!important;right:0;z-index:calc(var(--el-table-index) + 1)}.el-table__header-wrapper{flex-shrink:0}.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body,.el-table__footer,.el-table__header{border-collapse:separate;table-layout:fixed}.el-table__header-wrapper{overflow:hidden}.el-table__header-wrapper tbody td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__footer-wrapper{flex-shrink:0;overflow:hidden}.el-table__footer-wrapper tfoot td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__body-wrapper .el-table-column--selection>.cell,.el-table__header-wrapper .el-table-column--selection>.cell{align-items:center;display:inline-flex;height:23px}.el-table__body-wrapper .el-table-column--selection .el-checkbox,.el-table__header-wrapper .el-table-column--selection .el-checkbox{height:unset}.el-table.is-scrolling-left .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:var(--el-table-border)}.el-table.is-scrolling-left th.el-table-fixed-column--left{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-right th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-middle .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-none .el-table-fixed-column--left.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--left.is-last-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-last-column:before{box-shadow:none}.el-table.is-scrolling-none th.el-table-fixed-column--left,.el-table.is-scrolling-none th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body-wrapper{flex:1;overflow:hidden;position:relative}.el-table__body-wrapper .el-scrollbar__bar{z-index:calc(var(--el-table-index) + 2)}.el-table .caret-wrapper{align-items:center;cursor:pointer;display:inline-flex;flex-direction:column;height:14px;overflow:initial;position:relative;vertical-align:middle;width:24px}.el-table .sort-caret{border:5px solid transparent;height:0;left:7px;position:absolute;width:0}.el-table .sort-caret.ascending{border-bottom-color:var(--el-text-color-placeholder);top:-5px}.el-table .sort-caret.descending{border-top-color:var(--el-text-color-placeholder);bottom:-3px}.el-table .ascending .sort-caret.ascending{border-bottom-color:var(--el-color-primary)}.el-table .descending .sort-caret.descending{border-top-color:var(--el-color-primary)}.el-table .hidden-columns{position:absolute;visibility:hidden;z-index:-1}.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{background:var(--el-fill-color-lighter)}.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table__body tr.hover-row.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,.el-table__body tr.hover-row>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr>td.hover-cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr.current-row>td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table.el-table--scrollable-y .el-table__body-header{position:-webkit-sticky;position:sticky;top:0;z-index:calc(var(--el-table-index) + 2)}.el-table.el-table--scrollable-y .el-table__body-footer{bottom:0;position:-webkit-sticky;position:sticky;z-index:calc(var(--el-table-index) + 2)}.el-table__column-resize-proxy{border-left:var(--el-table-border);bottom:0;left:200px;position:absolute;top:0;width:0;z-index:calc(var(--el-table-index) + 9)}.el-table__column-filter-trigger{cursor:pointer;display:inline-block}.el-table__column-filter-trigger i{color:var(--el-color-info);font-size:14px;vertical-align:middle}.el-table__border-left-patch{height:100%;top:0;width:1px}.el-table__border-bottom-patch,.el-table__border-left-patch{background-color:var(--el-table-border-color);left:0;position:absolute;z-index:calc(var(--el-table-index) + 2)}.el-table__border-bottom-patch{height:1px}.el-table__border-right-patch{background-color:var(--el-table-border-color);height:100%;position:absolute;top:0;width:1px;z-index:calc(var(--el-table-index) + 2)}.el-table--enable-row-transition .el-table__body td.el-table__cell{transition:background-color .25s ease}.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table [class*=el-table__row--level] .el-table__expand-icon{display:inline-block;height:12px;line-height:12px;margin-right:8px;text-align:center;width:12px}.el-table .el-table.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table:not(.el-table--border) .el-table__cell{border-right:none}.el-table:not(.el-table--border)>.el-table__inner-wrapper:after{content:none}.el-table-v2{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-bg-color);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-bg-color);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px rgba(0,0,0,.15);--el-table-fixed-right-column:inset -10px 0 10px -10px rgba(0,0,0,.15);--el-table-index:var(--el-index-normal);font-size:14px}.el-table-v2 *{box-sizing:border-box}.el-table-v2__root{position:relative}.el-table-v2__root:hover .el-table-v2__main .el-virtual-scrollbar{opacity:1}.el-table-v2__main{background-color:var(--el-bg-color);display:flex;flex-direction:column-reverse;left:0;overflow:hidden;position:absolute;top:0}.el-table-v2__main .el-vl__horizontal,.el-table-v2__main .el-vl__vertical{z-index:2}.el-table-v2__left{background-color:var(--el-bg-color);box-shadow:2px 0 4px #0000000f;display:flex;flex-direction:column-reverse;left:0;overflow:hidden;position:absolute;top:0}.el-table-v2__left .el-virtual-scrollbar{opacity:0}.el-table-v2__left .el-vl__horizontal,.el-table-v2__left .el-vl__vertical{z-index:-1}.el-table-v2__right{background-color:var(--el-bg-color);box-shadow:-2px 0 4px #0000000f;display:flex;flex-direction:column-reverse;overflow:hidden;position:absolute;right:0;top:0}.el-table-v2__right .el-virtual-scrollbar{opacity:0}.el-table-v2__right .el-vl__horizontal,.el-table-v2__right .el-vl__vertical{z-index:-1}.el-table-v2__header-row,.el-table-v2__row{-webkit-padding-end:var(--el-table-scrollbar-size);padding-inline-end:var(--el-table-scrollbar-size)}.el-table-v2__header-wrapper{overflow:hidden}.el-table-v2__header{overflow:hidden;position:relative}.el-table-v2__footer{bottom:0;overflow:hidden;right:0}.el-table-v2__empty,.el-table-v2__footer,.el-table-v2__overlay{left:0;position:absolute}.el-table-v2__overlay{bottom:0;right:0;top:0;z-index:9999}.el-table-v2__header-row{border-bottom:var(--el-table-border);display:flex}.el-table-v2__header-cell{align-items:center;background-color:var(--el-table-header-bg-color);color:var(--el-table-header-text-color);display:flex;font-weight:700;height:100%;overflow:hidden;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table-v2__header-cell.is-align-center{justify-content:center;text-align:center}.el-table-v2__header-cell.is-align-right{justify-content:flex-end;text-align:right}.el-table-v2__header-cell.is-sortable{cursor:pointer}.el-table-v2__header-cell:hover .el-icon{display:block}.el-table-v2__sort-icon{display:none;opacity:.6;transition:opacity,display var(--el-transition-duration)}.el-table-v2__sort-icon.is-sorting{display:block;opacity:1}.el-table-v2__row{align-items:center;border-bottom:var(--el-table-border);display:flex;transition:background-color var(--el-transition-duration)}.el-table-v2__row.is-hovered,.el-table-v2__row:hover{background-color:var(--el-table-row-hover-bg-color)}.el-table-v2__row-cell{align-items:center;display:flex;height:100%;overflow:hidden;padding:0 8px}.el-table-v2__row-cell.is-align-center{justify-content:center;text-align:center}.el-table-v2__row-cell.is-align-right{justify-content:flex-end;text-align:right}.el-table-v2__expand-icon{cursor:pointer;margin:0 4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-table-v2__expand-icon svg{transition:transform var(--el-transition-duration)}.el-table-v2__expand-icon.is-expanded svg{transform:rotate(90deg)}.el-table-v2:not(.is-dynamic) .el-table-v2__cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-table-v2.is-dynamic .el-table-v2__row{align-items:stretch;overflow:hidden}.el-table-v2.is-dynamic .el-table-v2__row .el-table-v2__row-cell{overflow-wrap:break-word}.el-tabs{--el-tabs-header-height:40px}.el-tabs__header{margin:0 0 15px;padding:0;position:relative}.el-tabs__active-bar{background-color:var(--el-color-primary);bottom:0;height:2px;left:0;list-style:none;position:absolute;transition:width var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),transform var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);z-index:1}.el-tabs__new-tab{align-items:center;border:1px solid var(--el-border-color);border-radius:3px;color:var(--el-text-color-primary);cursor:pointer;display:flex;float:right;font-size:12px;height:20px;justify-content:center;line-height:20px;margin:10px 0 10px 10px;text-align:center;transition:all .15s;width:20px}.el-tabs__new-tab .is-icon-plus{height:inherit;transform:scale(.8);width:inherit}.el-tabs__new-tab .is-icon-plus svg{vertical-align:middle}.el-tabs__new-tab:hover{color:var(--el-color-primary)}.el-tabs__nav-wrap{margin-bottom:-1px;overflow:hidden;position:relative}.el-tabs__nav-wrap:after{background-color:var(--el-border-color-light);bottom:0;content:"";height:2px;left:0;position:absolute;width:100%;z-index:var(--el-index-normal)}.el-tabs__nav-wrap.is-scrollable{box-sizing:border-box;padding:0 20px}.el-tabs__nav-scroll{overflow:hidden}.el-tabs__nav-next,.el-tabs__nav-prev{color:var(--el-text-color-secondary);cursor:pointer;font-size:12px;line-height:44px;position:absolute;text-align:center;width:20px}.el-tabs__nav-next{right:0}.el-tabs__nav-prev{left:0}.el-tabs__nav{display:flex;float:left;position:relative;transition:transform var(--el-transition-duration);white-space:nowrap;z-index:calc(var(--el-index-normal) + 1)}.el-tabs__nav.is-stretch{display:flex;min-width:100%}.el-tabs__nav.is-stretch>*{flex:1;text-align:center}.el-tabs__item{align-items:center;box-sizing:border-box;color:var(--el-text-color-primary);display:flex;font-size:var(--el-font-size-base);font-weight:500;height:var(--el-tabs-header-height);justify-content:center;list-style:none;padding:0 20px;position:relative}.el-tabs__item:focus,.el-tabs__item:focus:active{outline:none}.el-tabs__item:focus-visible{border-radius:3px;box-shadow:0 0 2px 2px var(--el-color-primary) inset}.el-tabs__item .is-icon-close{border-radius:50%;margin-left:5px;text-align:center;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs__item .is-icon-close:before{display:inline-block;transform:scale(.9)}.el-tabs__item .is-icon-close:hover{background-color:var(--el-text-color-placeholder);color:#fff}.el-tabs__item.is-active{color:var(--el-color-primary)}.el-tabs__item:hover{color:var(--el-color-primary);cursor:pointer}.el-tabs__item.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-tabs__content{overflow:hidden;position:relative}.el-tabs--card>.el-tabs__header{border-bottom:1px solid var(--el-border-color-light);height:var(--el-tabs-header-height)}.el-tabs--card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--card>.el-tabs__header .el-tabs__nav{border:1px solid var(--el-border-color-light);border-bottom:none;border-radius:4px 4px 0 0;box-sizing:border-box}.el-tabs--card>.el-tabs__header .el-tabs__active-bar{display:none}.el-tabs--card>.el-tabs__header .el-tabs__item .is-icon-close{font-size:12px;height:14px;overflow:hidden;position:relative;right:-2px;transform-origin:100% 50%;width:0}.el-tabs--card>.el-tabs__header .el-tabs__item{border-bottom:1px solid transparent;border-left:1px solid var(--el-border-color-light);transition:color var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),padding var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs--card>.el-tabs__header .el-tabs__item:first-child{border-left:none}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover{padding-left:13px;padding-right:13px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover .is-icon-close{width:14px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active{border-bottom-color:var(--el-bg-color)}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable{padding-left:20px;padding-right:20px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable .is-icon-close{width:14px}.el-tabs--border-card{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color)}.el-tabs--border-card>.el-tabs__content{padding:15px}.el-tabs--border-card>.el-tabs__header{background-color:var(--el-fill-color-light);border-bottom:1px solid var(--el-border-color-light);margin:0}.el-tabs--border-card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--border-card>.el-tabs__header .el-tabs__item{border:1px solid transparent;color:var(--el-text-color-secondary);margin-top:-1px;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:first-child{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item+.el-tabs__item{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{background-color:var(--el-bg-color-overlay);border-left-color:var(--el-border-color);border-right-color:var(--el-border-color);color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover{color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-disabled{color:var(--el-disabled-text-color)}.el-tabs--border-card>.el-tabs__header .is-scrollable .el-tabs__item:first-child{margin-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),.el-tabs--bottom .el-tabs__item.is-top:nth-child(2),.el-tabs--top .el-tabs__item.is-bottom:nth-child(2),.el-tabs--top .el-tabs__item.is-top:nth-child(2){padding-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:last-child,.el-tabs--bottom .el-tabs__item.is-top:last-child,.el-tabs--top .el-tabs__item.is-bottom:last-child,.el-tabs--top .el-tabs__item.is-top:last-child{padding-right:0}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){padding-left:20px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2):not(.is-active).is-closable:hover{padding-left:13px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child{padding-right:20px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child:not(.is-active).is-closable:hover{padding-right:13px}.el-tabs--bottom .el-tabs__header.is-bottom{margin-bottom:0;margin-top:10px}.el-tabs--bottom.el-tabs--border-card .el-tabs__header.is-bottom{border-bottom:0;border-top:1px solid var(--el-border-color)}.el-tabs--bottom.el-tabs--border-card .el-tabs__nav-wrap.is-bottom{margin-bottom:0;margin-top:-1px}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom:not(.is-active){border:1px solid transparent}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom{margin:0 -1px -1px}.el-tabs--left,.el-tabs--right{overflow:hidden}.el-tabs--left .el-tabs__header.is-left,.el-tabs--left .el-tabs__header.is-right,.el-tabs--left .el-tabs__nav-scroll,.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__header.is-left,.el-tabs--right .el-tabs__header.is-right,.el-tabs--right .el-tabs__nav-scroll,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{height:100%}.el-tabs--left .el-tabs__active-bar.is-left,.el-tabs--left .el-tabs__active-bar.is-right,.el-tabs--right .el-tabs__active-bar.is-left,.el-tabs--right .el-tabs__active-bar.is-right{bottom:auto;height:auto;top:0;width:2px}.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{margin-bottom:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{cursor:pointer;height:30px;line-height:30px;text-align:center;width:100%}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i{transform:rotate(90deg)}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{left:auto;top:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next{bottom:0;right:auto}.el-tabs--left .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--left .el-tabs__nav-wrap.is-right.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-right.is-scrollable{padding:30px 0}.el-tabs--left .el-tabs__nav-wrap.is-left:after,.el-tabs--left .el-tabs__nav-wrap.is-right:after,.el-tabs--right .el-tabs__nav-wrap.is-left:after,.el-tabs--right .el-tabs__nav-wrap.is-right:after{bottom:auto;height:100%;top:0;width:2px}.el-tabs--left .el-tabs__nav.is-left,.el-tabs--left .el-tabs__nav.is-right,.el-tabs--right .el-tabs__nav.is-left,.el-tabs--right .el-tabs__nav.is-right{flex-direction:column}.el-tabs--left .el-tabs__item.is-left,.el-tabs--right .el-tabs__item.is-left{justify-content:flex-end}.el-tabs--left .el-tabs__item.is-right,.el-tabs--right .el-tabs__item.is-right{justify-content:flex-start}.el-tabs--left .el-tabs__header.is-left{float:left;margin-bottom:0;margin-right:10px}.el-tabs--left .el-tabs__nav-wrap.is-left{margin-right:-1px}.el-tabs--left .el-tabs__nav-wrap.is-left:after{left:auto;right:0}.el-tabs--left .el-tabs__active-bar.is-left{left:auto;right:0}.el-tabs--left .el-tabs__item.is-left{text-align:right}.el-tabs--left.el-tabs--card .el-tabs__active-bar.is-left{display:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left{border-bottom:none;border-left:none;border-right:1px solid var(--el-border-color-light);border-top:1px solid var(--el-border-color-light);text-align:left}.el-tabs--left.el-tabs--card .el-tabs__item.is-left:first-child{border-right:1px solid var(--el-border-color-light);border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left:none;border-right:1px solid #fff}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:first-child{border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:last-child{border-bottom:none}.el-tabs--left.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-radius:4px 0 0 4px;border-right:none}.el-tabs--left.el-tabs--card .el-tabs__new-tab{float:none}.el-tabs--left.el-tabs--border-card .el-tabs__header.is-left{border-right:1px solid var(--el-border-color)}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left{border:1px solid transparent;margin:-1px 0 -1px -1px}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left.is-active{border-color:rgb(209,219,229) transparent}.el-tabs--right .el-tabs__header.is-right{float:right;margin-bottom:0;margin-left:10px}.el-tabs--right .el-tabs__nav-wrap.is-right{margin-left:-1px}.el-tabs--right .el-tabs__nav-wrap.is-right:after{left:0;right:auto}.el-tabs--right .el-tabs__active-bar.is-right{left:0}.el-tabs--right.el-tabs--card .el-tabs__active-bar.is-right{display:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right{border-bottom:none;border-top:1px solid var(--el-border-color-light)}.el-tabs--right.el-tabs--card .el-tabs__item.is-right:first-child{border-left:1px solid var(--el-border-color-light);border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left:1px solid #fff;border-right:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:first-child{border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:last-child{border-bottom:none}.el-tabs--right.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-left:none;border-radius:0 4px 4px 0}.el-tabs--right.el-tabs--border-card .el-tabs__header.is-right{border-left:1px solid var(--el-border-color)}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right{border:1px solid transparent;margin:-1px -1px -1px 0}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right.is-active{border-color:rgb(209,219,229) transparent}.slideInLeft-transition,.slideInRight-transition{display:inline-block}.slideInRight-enter{-webkit-animation:slideInRight-enter var(--el-transition-duration);animation:slideInRight-enter var(--el-transition-duration)}.slideInRight-leave{-webkit-animation:slideInRight-leave var(--el-transition-duration);animation:slideInRight-leave var(--el-transition-duration);left:0;position:absolute;right:0}.slideInLeft-enter{-webkit-animation:slideInLeft-enter var(--el-transition-duration);animation:slideInLeft-enter var(--el-transition-duration)}.slideInLeft-leave{-webkit-animation:slideInLeft-leave var(--el-transition-duration);animation:slideInLeft-leave var(--el-transition-duration);left:0;position:absolute;right:0}@-webkit-keyframes slideInRight-enter{0%{opacity:0;transform:translate(100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@keyframes slideInRight-enter{0%{opacity:0;transform:translate(100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@-webkit-keyframes slideInRight-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(100%);transform-origin:0 0}}@keyframes slideInRight-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(100%);transform-origin:0 0}}@-webkit-keyframes slideInLeft-enter{0%{opacity:0;transform:translate(-100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@keyframes slideInLeft-enter{0%{opacity:0;transform:translate(-100%);transform-origin:0 0}to{opacity:1;transform:translate(0);transform-origin:0 0}}@-webkit-keyframes slideInLeft-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(-100%);transform-origin:0 0}}@keyframes slideInLeft-leave{0%{opacity:1;transform:translate(0);transform-origin:0 0}to{opacity:0;transform:translate(-100%);transform-origin:0 0}}.el-tag{--el-tag-font-size:12px;--el-tag-border-radius:4px;--el-tag-border-radius-rounded:9999px;--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary);align-items:center;background-color:var(--el-tag-bg-color);border-color:var(--el-tag-border-color);border-radius:var(--el-tag-border-radius);border-style:solid;border-width:1px;box-sizing:border-box;color:var(--el-tag-text-color);display:inline-flex;font-size:var(--el-tag-font-size);height:24px;justify-content:center;line-height:1;padding:0 9px;vertical-align:middle;white-space:nowrap;--el-icon-size:14px}.el-tag.el-tag--primary{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-bg-color:var(--el-color-success-light-9);--el-tag-border-color:var(--el-color-success-light-8);--el-tag-hover-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-bg-color:var(--el-color-warning-light-9);--el-tag-border-color:var(--el-color-warning-light-8);--el-tag-hover-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-bg-color:var(--el-color-danger-light-9);--el-tag-border-color:var(--el-color-danger-light-8);--el-tag-hover-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-bg-color:var(--el-color-error-light-9);--el-tag-border-color:var(--el-color-error-light-8);--el-tag-hover-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-bg-color:var(--el-color-info-light-9);--el-tag-border-color:var(--el-color-info-light-8);--el-tag-hover-color:var(--el-color-info)}.el-tag.el-tag--primary{--el-tag-text-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-text-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-text-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-text-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-text-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-text-color:var(--el-color-info)}.el-tag.is-hit{border-color:var(--el-color-primary)}.el-tag.is-round{border-radius:var(--el-tag-border-radius-rounded)}.el-tag .el-tag__close{color:var(--el-tag-text-color);flex-shrink:0}.el-tag .el-tag__close:hover{background-color:var(--el-tag-hover-color);color:var(--el-color-white)}.el-tag .el-icon{border-radius:50%;cursor:pointer;font-size:calc(var(--el-icon-size) - 2px);height:var(--el-icon-size);width:var(--el-icon-size)}.el-tag .el-tag__close{margin-left:6px}.el-tag--dark{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3);--el-tag-text-color:var(--el-color-white)}.el-tag--dark.el-tag--primary{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--success{--el-tag-bg-color:var(--el-color-success);--el-tag-border-color:var(--el-color-success);--el-tag-hover-color:var(--el-color-success-light-3)}.el-tag--dark.el-tag--warning{--el-tag-bg-color:var(--el-color-warning);--el-tag-border-color:var(--el-color-warning);--el-tag-hover-color:var(--el-color-warning-light-3)}.el-tag--dark.el-tag--danger{--el-tag-bg-color:var(--el-color-danger);--el-tag-border-color:var(--el-color-danger);--el-tag-hover-color:var(--el-color-danger-light-3)}.el-tag--dark.el-tag--error{--el-tag-bg-color:var(--el-color-error);--el-tag-border-color:var(--el-color-error);--el-tag-hover-color:var(--el-color-error-light-3)}.el-tag--dark.el-tag--info{--el-tag-bg-color:var(--el-color-info);--el-tag-border-color:var(--el-color-info);--el-tag-hover-color:var(--el-color-info-light-3)}.el-tag--dark.el-tag--danger,.el-tag--dark.el-tag--error,.el-tag--dark.el-tag--info,.el-tag--dark.el-tag--primary,.el-tag--dark.el-tag--success,.el-tag--dark.el-tag--warning{--el-tag-text-color:var(--el-color-white)}.el-tag--plain{--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary);--el-tag-bg-color:var(--el-fill-color-blank)}.el-tag--plain.el-tag--primary{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary)}.el-tag--plain.el-tag--success{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-success-light-5);--el-tag-hover-color:var(--el-color-success)}.el-tag--plain.el-tag--warning{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-warning-light-5);--el-tag-hover-color:var(--el-color-warning)}.el-tag--plain.el-tag--danger{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-danger-light-5);--el-tag-hover-color:var(--el-color-danger)}.el-tag--plain.el-tag--error{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-error-light-5);--el-tag-hover-color:var(--el-color-error)}.el-tag--plain.el-tag--info{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-info-light-5);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-closable{padding-right:5px}.el-tag--large{height:32px;padding:0 11px;--el-icon-size:16px}.el-tag--large .el-tag__close{margin-left:8px}.el-tag--large.is-closable{padding-right:7px}.el-tag--small{height:20px;padding:0 7px;--el-icon-size:12px}.el-tag--small .el-tag__close{margin-left:4px}.el-tag--small.is-closable{padding-right:3px}.el-tag--small .el-icon-close{transform:scale(.8)}.el-tag.el-tag--primary.is-hit{border-color:var(--el-color-primary)}.el-tag.el-tag--success.is-hit{border-color:var(--el-color-success)}.el-tag.el-tag--warning.is-hit{border-color:var(--el-color-warning)}.el-tag.el-tag--danger.is-hit{border-color:var(--el-color-danger)}.el-tag.el-tag--error.is-hit{border-color:var(--el-color-error)}.el-tag.el-tag--info.is-hit{border-color:var(--el-color-info)}.el-text{--el-text-font-size:var(--el-font-size-base);--el-text-color:var(--el-text-color-regular);align-self:center;color:var(--el-text-color);font-size:var(--el-text-font-size);margin:0;overflow-wrap:break-word;padding:0}.el-text.is-truncated{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-text.is-line-clamp{display:-webkit-inline-box;-webkit-box-orient:vertical;overflow:hidden}.el-text--large{--el-text-font-size:var(--el-font-size-medium)}.el-text--default{--el-text-font-size:var(--el-font-size-base)}.el-text--small{--el-text-font-size:var(--el-font-size-extra-small)}.el-text.el-text--primary{--el-text-color:var(--el-color-primary)}.el-text.el-text--success{--el-text-color:var(--el-color-success)}.el-text.el-text--warning{--el-text-color:var(--el-color-warning)}.el-text.el-text--danger{--el-text-color:var(--el-color-danger)}.el-text.el-text--error{--el-text-color:var(--el-color-error)}.el-text.el-text--info{--el-text-color:var(--el-color-info)}.el-text>.el-icon{vertical-align:-2px}.time-select{margin:5px 0;min-width:0}.time-select .el-picker-panel__content{margin:0;max-height:200px}.time-select-item{font-size:14px;line-height:20px;padding:8px 10px}.time-select-item.disabled{color:var(--el-datepicker-border-color);cursor:not-allowed}.time-select-item:hover{background-color:var(--el-fill-color-light);cursor:pointer;font-weight:700}.time-select .time-select-item.selected:not(.disabled){color:var(--el-color-primary);font-weight:700}.el-timeline-item{padding-bottom:20px;position:relative}.el-timeline-item__wrapper{padding-left:28px;position:relative;top:-3px}.el-timeline-item__tail{border-left:2px solid var(--el-timeline-node-color);height:100%;left:4px;position:absolute}.el-timeline-item .el-timeline-item__icon{color:var(--el-color-white);font-size:var(--el-font-size-small)}.el-timeline-item__node{align-items:center;background-color:var(--el-timeline-node-color);border-color:var(--el-timeline-node-color);border-radius:50%;box-sizing:border-box;display:flex;justify-content:center;position:absolute}.el-timeline-item__node--normal{height:var(--el-timeline-node-size-normal);left:-1px;width:var(--el-timeline-node-size-normal)}.el-timeline-item__node--large{height:var(--el-timeline-node-size-large);left:-2px;width:var(--el-timeline-node-size-large)}.el-timeline-item__node.is-hollow{background:var(--el-color-white);border-style:solid;border-width:2px}.el-timeline-item__node--primary{background-color:var(--el-color-primary);border-color:var(--el-color-primary)}.el-timeline-item__node--success{background-color:var(--el-color-success);border-color:var(--el-color-success)}.el-timeline-item__node--warning{background-color:var(--el-color-warning);border-color:var(--el-color-warning)}.el-timeline-item__node--danger{background-color:var(--el-color-danger);border-color:var(--el-color-danger)}.el-timeline-item__node--info{background-color:var(--el-color-info);border-color:var(--el-color-info)}.el-timeline-item__dot{align-items:center;display:flex;justify-content:center;position:absolute}.el-timeline-item__content{color:var(--el-text-color-primary)}.el-timeline-item__timestamp{color:var(--el-text-color-secondary);font-size:var(--el-font-size-small);line-height:1}.el-timeline-item__timestamp.is-top{margin-bottom:8px;padding-top:4px}.el-timeline-item__timestamp.is-bottom{margin-top:8px}.el-timeline{--el-timeline-node-size-normal:12px;--el-timeline-node-size-large:14px;--el-timeline-node-color:var(--el-border-color-light);font-size:var(--el-font-size-base);list-style:none;margin:0}.el-timeline .el-timeline-item:last-child .el-timeline-item__tail{display:none}.el-timeline .el-timeline-item__center{align-items:center;display:flex}.el-timeline .el-timeline-item__center .el-timeline-item__wrapper{width:100%}.el-timeline .el-timeline-item__center .el-timeline-item__tail{top:0}.el-timeline .el-timeline-item__center:first-child .el-timeline-item__tail{height:calc(50% + 10px);top:calc(50% - 10px)}.el-timeline .el-timeline-item__center:last-child .el-timeline-item__tail{display:block;height:calc(50% - 10px)}.el-tooltip-v2__content{--el-tooltip-v2-padding:5px 10px;--el-tooltip-v2-border-radius:4px;--el-tooltip-v2-border-color:var(--el-border-color);background-color:var(--el-color-white);border:1px solid var(--el-border-color);border-radius:var(--el-tooltip-v2-border-radius);color:var(--el-color-black);padding:var(--el-tooltip-v2-padding)}.el-tooltip-v2__arrow{color:var(--el-color-white);height:var(--el-tooltip-v2-arrow-height);left:var(--el-tooltip-v2-arrow-x);pointer-events:none;position:absolute;top:var(--el-tooltip-v2-arrow-y);width:var(--el-tooltip-v2-arrow-width)}.el-tooltip-v2__arrow:before{border:var(--el-tooltip-v2-arrow-border-width) solid transparent;content:"";height:0;position:absolute;width:0}.el-tooltip-v2__arrow:after{border:var(--el-tooltip-v2-arrow-border-width) solid transparent;content:"";height:0;position:absolute;width:0}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow{bottom:0}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow:before{border-bottom:0;border-top-color:var(--el-color-white);border-top-width:var(--el-tooltip-v2-arrow-border-width);top:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=top] .el-tooltip-v2__arrow:after{border-bottom:0;border-top-color:var(--el-border-color);border-top-width:var(--el-tooltip-v2-arrow-border-width);top:100%;z-index:-1}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow{top:0}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow:before{border-bottom-color:var(--el-color-white);border-bottom-width:var(--el-tooltip-v2-arrow-border-width);border-top:0;bottom:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=bottom] .el-tooltip-v2__arrow:after{border-bottom-color:var(--el-border-color);border-bottom-width:var(--el-tooltip-v2-arrow-border-width);border-top:0;bottom:100%;z-index:-1}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow{right:0}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow:before{border-left-color:var(--el-color-white);border-left-width:var(--el-tooltip-v2-arrow-border-width);border-right:0;left:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=left] .el-tooltip-v2__arrow:after{border-left-color:var(--el-border-color);border-left-width:var(--el-tooltip-v2-arrow-border-width);border-right:0;left:100%;z-index:-1}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow{left:0}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow:before{border-left:0;border-right-color:var(--el-color-white);border-right-width:var(--el-tooltip-v2-arrow-border-width);right:calc(100% - 1px)}.el-tooltip-v2__content[data-side^=right] .el-tooltip-v2__arrow:after{border-left:0;border-right-color:var(--el-border-color);border-right-width:var(--el-tooltip-v2-arrow-border-width);right:100%;z-index:-1}.el-tooltip-v2__content.is-dark{--el-tooltip-v2-border-color:transparent;color:var(--el-color-white)}.el-tooltip-v2__content.is-dark,.el-tooltip-v2__content.is-dark .el-tooltip-v2__arrow{background-color:var(--el-color-black);border-color:transparent}.el-transfer{--el-transfer-border-color:var(--el-border-color-lighter);--el-transfer-border-radius:var(--el-border-radius-base);--el-transfer-panel-width:200px;--el-transfer-panel-header-height:40px;--el-transfer-panel-header-bg-color:var(--el-fill-color-light);--el-transfer-panel-footer-height:40px;--el-transfer-panel-body-height:278px;--el-transfer-item-height:30px;--el-transfer-filter-height:32px;font-size:var(--el-font-size-base)}.el-transfer__buttons{display:inline-block;padding:0 30px;vertical-align:middle}.el-transfer__button{vertical-align:top}.el-transfer__button:nth-child(2){margin:0 0 0 10px}.el-transfer__button i,.el-transfer__button span{font-size:14px}.el-transfer__button .el-icon+span{margin-left:0}.el-transfer-panel{background:var(--el-bg-color-overlay);box-sizing:border-box;display:inline-block;max-height:100%;overflow:hidden;position:relative;text-align:left;vertical-align:middle;width:var(--el-transfer-panel-width)}.el-transfer-panel__body{border-bottom:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);border-left:1px solid var(--el-transfer-border-color);border-right:1px solid var(--el-transfer-border-color);height:var(--el-transfer-panel-body-height);overflow:hidden}.el-transfer-panel__body.is-with-footer{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.el-transfer-panel__list{box-sizing:border-box;height:var(--el-transfer-panel-body-height);list-style:none;margin:0;overflow:auto;padding:6px 0}.el-transfer-panel__list.is-filterable{height:calc(100% - var(--el-transfer-filter-height) - 30px);padding-top:0}.el-transfer-panel__item{display:block!important;height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);padding-left:15px}.el-transfer-panel__item+.el-transfer-panel__item{margin-left:0}.el-transfer-panel__item.el-checkbox{color:var(--el-text-color-regular)}.el-transfer-panel__item:hover{color:var(--el-color-primary)}.el-transfer-panel__item.el-checkbox .el-checkbox__label{box-sizing:border-box;display:block;line-height:var(--el-transfer-item-height);overflow:hidden;padding-left:22px;text-overflow:ellipsis;white-space:nowrap;width:100%}.el-transfer-panel__item .el-checkbox__input{position:absolute;top:8px}.el-transfer-panel__filter{box-sizing:border-box;padding:15px;text-align:center}.el-transfer-panel__filter .el-input__inner{border-radius:calc(var(--el-transfer-filter-height)/2);box-sizing:border-box;display:inline-block;font-size:12px;height:var(--el-transfer-filter-height);width:100%}.el-transfer-panel__filter .el-icon-circle-close{cursor:pointer}.el-transfer-panel .el-transfer-panel__header{align-items:center;background:var(--el-transfer-panel-header-bg-color);border:1px solid var(--el-transfer-border-color);border-top-left-radius:var(--el-transfer-border-radius);border-top-right-radius:var(--el-transfer-border-radius);box-sizing:border-box;color:var(--el-color-black);display:flex;height:var(--el-transfer-panel-header-height);margin:0;padding-left:15px}.el-transfer-panel .el-transfer-panel__header .el-checkbox{align-items:center;display:flex;position:relative;width:100%}.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label{color:var(--el-text-color-primary);font-size:16px;font-weight:400}.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span{color:var(--el-text-color-secondary);font-size:12px;font-weight:400;position:absolute;right:15px;top:50%;transform:translate3d(0,-50%,0)}.el-transfer-panel .el-transfer-panel__footer{background:var(--el-bg-color-overlay);border:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);height:var(--el-transfer-panel-footer-height);margin:0;padding:0}.el-transfer-panel .el-transfer-panel__footer:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-transfer-panel .el-transfer-panel__footer .el-checkbox{color:var(--el-text-color-regular);padding-left:20px}.el-transfer-panel .el-transfer-panel__empty{color:var(--el-text-color-secondary);height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);margin:0;padding:6px 15px 0;text-align:center}.el-transfer-panel .el-checkbox__label{padding-left:8px}.el-transfer-panel .el-checkbox__inner{border-radius:3px;height:14px;width:14px}.el-transfer-panel .el-checkbox__inner:after{height:6px;left:4px;width:3px}.el-tree{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder);background:var(--el-fill-color-blank);color:var(--el-tree-text-color);cursor:default;font-size:var(--el-font-size-base);position:relative}.el-tree__empty-block{height:100%;min-height:60px;position:relative;text-align:center;width:100%}.el-tree__empty-text{color:var(--el-text-color-secondary);font-size:var(--el-font-size-base);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.el-tree__drop-indicator{background-color:var(--el-color-primary);height:1px;left:0;position:absolute;right:0}.el-tree-node{outline:none;white-space:nowrap}.el-tree-node:focus>.el-tree-node__content{background-color:var(--el-tree-node-hover-bg-color)}.el-tree-node.is-drop-inner>.el-tree-node__content .el-tree-node__label{background-color:var(--el-color-primary);color:#fff}.el-tree-node__content{--el-checkbox-height:var(--el-tree-node-content-height);align-items:center;cursor:pointer;display:flex;height:var(--el-tree-node-content-height)}.el-tree-node__content>.el-tree-node__expand-icon{box-sizing:content-box;padding:6px}.el-tree-node__content>label.el-checkbox{margin-right:8px}.el-tree-node__content:hover{background-color:var(--el-tree-node-hover-bg-color)}.el-tree.is-dragging .el-tree-node__content{cursor:move}.el-tree.is-dragging .el-tree-node__content *{pointer-events:none}.el-tree.is-dragging.is-drop-not-allow .el-tree-node__content{cursor:not-allowed}.el-tree-node__expand-icon{color:var(--el-tree-expand-icon-color);cursor:pointer;font-size:12px;transform:rotate(0);transition:transform var(--el-transition-duration) ease-in-out}.el-tree-node__expand-icon.expanded{transform:rotate(90deg)}.el-tree-node__expand-icon.is-leaf{color:transparent;cursor:default;visibility:hidden}.el-tree-node__expand-icon.is-hidden{visibility:hidden}.el-tree-node__loading-icon{color:var(--el-tree-expand-icon-color);font-size:var(--el-font-size-base);margin-right:8px}.el-tree-node>.el-tree-node__children{background-color:transparent;overflow:hidden}.el-tree-node.is-expanded>.el-tree-node__children{display:block}.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:var(--el-color-primary-light-9)}.el-tree-select{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder)}.el-tree-select__popper .el-tree-node__expand-icon{margin-left:8px}.el-tree-select__popper .el-tree-node.is-checked>.el-tree-node__content .el-select-dropdown__item.selected:after{content:none}.el-tree-select__popper .el-select-dropdown__list>.el-select-dropdown__item{padding-left:32px}.el-tree-select__popper .el-select-dropdown__item{background:transparent!important;flex:1;height:20px;line-height:20px;padding-left:0}.el-upload{--el-upload-dragger-padding-horizontal:40px;--el-upload-dragger-padding-vertical:10px;align-items:center;cursor:pointer;display:inline-flex;justify-content:center;outline:none}.el-upload__input{display:none}.el-upload__tip{color:var(--el-text-color-regular);font-size:12px;margin-top:7px}.el-upload iframe{filter:alpha(opacity=0);left:0;opacity:0;position:absolute;top:0;z-index:-1}.el-upload--picture-card{--el-upload-picture-card-size:148px;align-items:center;background-color:var(--el-fill-color-lighter);border:1px dashed var(--el-border-color-darker);border-radius:6px;box-sizing:border-box;cursor:pointer;display:inline-flex;height:var(--el-upload-picture-card-size);justify-content:center;vertical-align:top;width:var(--el-upload-picture-card-size)}.el-upload--picture-card>i{color:var(--el-text-color-secondary);font-size:28px}.el-upload--picture-card:hover{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload.is-drag{display:block}.el-upload:focus{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload:focus .el-upload-dragger{border-color:var(--el-color-primary)}.el-upload-dragger{background-color:var(--el-fill-color-blank);border:1px dashed var(--el-border-color);border-radius:6px;box-sizing:border-box;cursor:pointer;overflow:hidden;padding:var(--el-upload-dragger-padding-horizontal) var(--el-upload-dragger-padding-vertical);position:relative;text-align:center}.el-upload-dragger .el-icon--upload{color:var(--el-text-color-placeholder);font-size:67px;line-height:50px;margin-bottom:16px}.el-upload-dragger+.el-upload__tip{text-align:center}.el-upload-dragger~.el-upload__files{border-top:var(--el-border);margin-top:7px;padding-top:5px}.el-upload-dragger .el-upload__text{color:var(--el-text-color-regular);font-size:14px;text-align:center}.el-upload-dragger .el-upload__text em{color:var(--el-color-primary);font-style:normal}.el-upload-dragger:hover{border-color:var(--el-color-primary)}.el-upload-dragger.is-dragover{background-color:var(--el-color-primary-light-9);border:2px dashed var(--el-color-primary);padding:calc(var(--el-upload-dragger-padding-horizontal) - 1px) calc(var(--el-upload-dragger-padding-vertical) - 1px)}.el-upload-list{list-style:none;margin:10px 0 0;padding:0;position:relative}.el-upload-list__item{border-radius:4px;box-sizing:border-box;color:var(--el-text-color-regular);font-size:14px;margin-bottom:5px;position:relative;transition:all .5s cubic-bezier(.55,0,.1,1);width:100%}.el-upload-list__item .el-progress{position:absolute;top:20px;width:100%}.el-upload-list__item .el-progress__text{position:absolute;right:0;top:-13px}.el-upload-list__item .el-progress-bar{margin-right:0;padding-right:0}.el-upload-list__item .el-icon--upload-success{color:var(--el-color-success)}.el-upload-list__item .el-icon--close{color:var(--el-text-color-regular);cursor:pointer;display:none;opacity:.75;position:absolute;right:5px;top:50%;transform:translateY(-50%);transition:opacity var(--el-transition-duration)}.el-upload-list__item .el-icon--close:hover{color:var(--el-color-primary);opacity:1}.el-upload-list__item .el-icon--close-tip{color:var(--el-color-primary);cursor:pointer;display:none;font-size:12px;font-style:normal;opacity:1;position:absolute;right:5px;top:1px}.el-upload-list__item:hover{background-color:var(--el-fill-color-light)}.el-upload-list__item:hover .el-icon--close{display:inline-flex}.el-upload-list__item:hover .el-progress__text{display:none}.el-upload-list__item .el-upload-list__item-info{display:inline-flex;flex-direction:column;justify-content:center;margin-left:4px;width:calc(100% - 30px)}.el-upload-list__item.is-success .el-upload-list__item-status-label{display:inline-flex}.el-upload-list__item.is-success .el-upload-list__item-name:focus,.el-upload-list__item.is-success .el-upload-list__item-name:hover{color:var(--el-color-primary);cursor:pointer}.el-upload-list__item.is-success:focus:not(:hover) .el-icon--close-tip{display:inline-block}.el-upload-list__item.is-success:active,.el-upload-list__item.is-success:not(.focusing):focus{outline-width:0}.el-upload-list__item.is-success:active .el-icon--close-tip,.el-upload-list__item.is-success:not(.focusing):focus .el-icon--close-tip{display:none}.el-upload-list__item.is-success:focus .el-upload-list__item-status-label,.el-upload-list__item.is-success:hover .el-upload-list__item-status-label{display:none;opacity:0}.el-upload-list__item-name{align-items:center;color:var(--el-text-color-regular);display:inline-flex;font-size:var(--el-font-size-base);padding:0 4px;text-align:center;transition:color var(--el-transition-duration)}.el-upload-list__item-name .el-icon{color:var(--el-text-color-secondary);margin-right:6px}.el-upload-list__item-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-upload-list__item-status-label{align-items:center;display:none;height:100%;justify-content:center;line-height:inherit;position:absolute;right:5px;top:0;transition:opacity var(--el-transition-duration)}.el-upload-list__item-delete{color:var(--el-text-color-regular);display:none;font-size:12px;position:absolute;right:10px;top:0}.el-upload-list__item-delete:hover{color:var(--el-color-primary)}.el-upload-list--picture-card{--el-upload-list-picture-card-size:148px;display:inline-flex;flex-wrap:wrap;margin:0}.el-upload-list--picture-card .el-upload-list__item{background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);border-radius:6px;box-sizing:border-box;display:inline-flex;height:var(--el-upload-list-picture-card-size);margin:0 8px 8px 0;overflow:hidden;padding:0;width:var(--el-upload-list-picture-card-size)}.el-upload-list--picture-card .el-upload-list__item .el-icon--check,.el-upload-list--picture-card .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture-card .el-upload-list__item .el-icon--close{display:none}.el-upload-list--picture-card .el-upload-list__item:hover .el-upload-list__item-status-label{display:block;opacity:0}.el-upload-list--picture-card .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture-card .el-upload-list__item .el-upload-list__item-name{display:none}.el-upload-list--picture-card .el-upload-list__item-thumbnail{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.el-upload-list--picture-card .el-upload-list__item-status-label{background:var(--el-color-success);height:24px;right:-15px;text-align:center;top:-6px;transform:rotate(45deg);width:40px}.el-upload-list--picture-card .el-upload-list__item-status-label i{font-size:12px;margin-top:11px;transform:rotate(-45deg)}.el-upload-list--picture-card .el-upload-list__item-actions{align-items:center;background-color:var(--el-overlay-color-lighter);color:#fff;cursor:default;display:inline-flex;font-size:20px;height:100%;justify-content:center;left:0;opacity:0;position:absolute;top:0;transition:opacity var(--el-transition-duration);width:100%}.el-upload-list--picture-card .el-upload-list__item-actions span{cursor:pointer;display:none}.el-upload-list--picture-card .el-upload-list__item-actions span+span{margin-left:1rem}.el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete{color:inherit;font-size:inherit;position:static}.el-upload-list--picture-card .el-upload-list__item-actions:hover{opacity:1}.el-upload-list--picture-card .el-upload-list__item-actions:hover span{display:inline-flex}.el-upload-list--picture-card .el-progress{bottom:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:126px}.el-upload-list--picture-card .el-progress .el-progress__text{top:50%}.el-upload-list--picture .el-upload-list__item{align-items:center;background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);border-radius:6px;box-sizing:border-box;display:flex;margin-top:10px;overflow:hidden;padding:10px;z-index:0}.el-upload-list--picture .el-upload-list__item .el-icon--check,.el-upload-list--picture .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture .el-upload-list__item:hover .el-upload-list__item-status-label{display:inline-flex;opacity:0}.el-upload-list--picture .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name i{display:none}.el-upload-list--picture .el-upload-list__item .el-icon--close{top:5px;transform:translateY(0)}.el-upload-list--picture .el-upload-list__item-thumbnail{align-items:center;background-color:var(--el-color-white);display:inline-flex;height:70px;justify-content:center;-o-object-fit:contain;object-fit:contain;position:relative;width:70px;z-index:1}.el-upload-list--picture .el-upload-list__item-status-label{background:var(--el-color-success);height:26px;position:absolute;right:-17px;text-align:center;top:-7px;transform:rotate(45deg);width:46px}.el-upload-list--picture .el-upload-list__item-status-label i{font-size:12px;margin-top:12px;transform:rotate(-45deg)}.el-upload-list--picture .el-progress{position:relative;top:-7px}.el-upload-cover{cursor:default;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%;z-index:10}.el-upload-cover:after{content:"";display:inline-block;height:100%;vertical-align:middle}.el-upload-cover img{display:block;height:100%;width:100%}.el-upload-cover__label{background:var(--el-color-success);height:24px;right:-15px;text-align:center;top:-6px;transform:rotate(45deg);width:40px}.el-upload-cover__label i{color:#fff;font-size:12px;margin-top:11px;transform:rotate(-45deg)}.el-upload-cover__progress{display:inline-block;position:static;vertical-align:middle;width:243px}.el-upload-cover__progress+.el-upload__inner{opacity:0}.el-upload-cover__content{height:100%;left:0;position:absolute;top:0;width:100%}.el-upload-cover__interact{background-color:var(--el-overlay-color-light);bottom:0;height:100%;left:0;position:absolute;text-align:center;width:100%}.el-upload-cover__interact .btn{color:#fff;cursor:pointer;display:inline-block;font-size:14px;margin-top:60px;transition:var(--el-transition-md-fade);vertical-align:middle}.el-upload-cover__interact .btn i{margin-top:0}.el-upload-cover__interact .btn span{opacity:0;transition:opacity .15s linear}.el-upload-cover__interact .btn:not(:first-child){margin-left:35px}.el-upload-cover__interact .btn:hover{transform:translateY(-13px)}.el-upload-cover__interact .btn:hover span{opacity:1}.el-upload-cover__interact .btn i{color:#fff;display:block;font-size:24px;line-height:inherit;margin:0 auto 5px}.el-upload-cover__title{background-color:#fff;bottom:0;color:var(--el-text-color-primary);font-size:14px;font-weight:400;height:36px;left:0;line-height:36px;margin:0;overflow:hidden;padding:0 10px;position:absolute;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.el-upload-cover+.el-upload__inner{opacity:0;position:relative;z-index:1}.el-vl__wrapper{position:relative}.el-vl__wrapper:hover .el-virtual-scrollbar,.el-vl__wrapper.always-on .el-virtual-scrollbar{opacity:1}.el-vl__window{scrollbar-width:none}.el-vl__window::-webkit-scrollbar{display:none}.el-virtual-scrollbar{opacity:0;transition:opacity .34s ease-out}.el-virtual-scrollbar.always-on{opacity:1}.el-vg__wrapper{position:relative}.el-popper{--el-popper-border-radius:var(--el-popover-border-radius,4px);border-radius:var(--el-popper-border-radius);font-size:12px;line-height:20px;min-width:10px;overflow-wrap:break-word;padding:5px 11px;position:absolute;visibility:visible;z-index:2000}.el-popper.is-dark{background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary);color:var(--el-bg-color)}.el-popper.is-dark .el-popper__arrow:before{background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary);right:0}.el-popper.is-light{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light)}.el-popper.is-light .el-popper__arrow:before{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);right:0}.el-popper.is-pure{padding:0}.el-popper__arrow{height:10px;position:absolute;width:10px;z-index:-1}.el-popper__arrow:before{background:var(--el-text-color-primary);box-sizing:border-box;content:" ";height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:-1}.el-popper[data-popper-placement^=top]>.el-popper__arrow{bottom:-5px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-bottom-right-radius:2px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-5px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-top-left-radius:2px}.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-5px}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-top-right-radius:2px}.el-popper[data-popper-placement^=right]>.el-popper__arrow{left:-5px}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-bottom-left-radius:2px}.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-left-color:transparent!important;border-top-color:transparent!important}.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent!important;border-right-color:transparent!important}.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:transparent!important;border-left-color:transparent!important}.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent!important;border-top-color:transparent!important}.el-statistic{--el-statistic-title-font-weight:400;--el-statistic-title-font-size:var(--el-font-size-extra-small);--el-statistic-title-color:var(--el-text-color-regular);--el-statistic-content-font-weight:400;--el-statistic-content-font-size:var(--el-font-size-extra-large);--el-statistic-content-color:var(--el-text-color-primary)}.el-statistic__head{color:var(--el-statistic-title-color);font-size:var(--el-statistic-title-font-size);font-weight:var(--el-statistic-title-font-weight);line-height:20px;margin-bottom:4px}.el-statistic__content{color:var(--el-statistic-content-color);font-size:var(--el-statistic-content-font-size);font-weight:var(--el-statistic-content-font-weight)}.el-statistic__value{display:inline-block}.el-statistic__prefix{display:inline-block;margin-right:4px}.el-statistic__suffix{display:inline-block;margin-left:4px}.el-tour{--el-tour-width:520px;--el-tour-padding-primary:12px;--el-tour-font-line-height:var(--el-font-line-height-primary);--el-tour-title-font-size:16px;--el-tour-title-text-color:var(--el-text-color-primary);--el-tour-title-font-weight:400;--el-tour-close-color:var(--el-color-info);--el-tour-font-size:14px;--el-tour-color:var(--el-text-color-primary);--el-tour-bg-color:var(--el-bg-color);--el-tour-border-radius:4px}.el-tour__hollow{transition:all var(--el-transition-duration) ease}.el-tour__content{border-radius:var(--el-tour-border-radius);box-shadow:var(--el-box-shadow-light);outline:none;overflow-wrap:break-word;padding:var(--el-tour-padding-primary);width:var(--el-tour-width)}.el-tour__arrow,.el-tour__content{background:var(--el-tour-bg-color);box-sizing:border-box}.el-tour__arrow{height:10px;pointer-events:none;position:absolute;transform:rotate(45deg);width:10px}.el-tour__content[data-side^=top] .el-tour__arrow{border-left-color:transparent;border-top-color:transparent}.el-tour__content[data-side^=bottom] .el-tour__arrow{border-bottom-color:transparent;border-right-color:transparent}.el-tour__content[data-side^=left] .el-tour__arrow{border-bottom-color:transparent;border-left-color:transparent}.el-tour__content[data-side^=right] .el-tour__arrow{border-right-color:transparent;border-top-color:transparent}.el-tour__content[data-side^=top] .el-tour__arrow{bottom:-5px}.el-tour__content[data-side^=bottom] .el-tour__arrow{top:-5px}.el-tour__content[data-side^=left] .el-tour__arrow{right:-5px}.el-tour__content[data-side^=right] .el-tour__arrow{left:-5px}.el-tour__closebtn{background:transparent;border:none;cursor:pointer;font-size:var(--el-message-close-size,16px);height:40px;outline:none;padding:0;position:absolute;right:0;top:0;width:40px}.el-tour__closebtn .el-tour__close{color:var(--el-tour-close-color);font-size:inherit}.el-tour__closebtn:focus .el-tour__close,.el-tour__closebtn:hover .el-tour__close{color:var(--el-color-primary)}.el-tour__header{padding-bottom:var(--el-tour-padding-primary)}.el-tour__header.show-close{padding-right:calc(var(--el-tour-padding-primary) + var(--el-message-close-size, 16px))}.el-tour__title{color:var(--el-tour-title-text-color);font-size:var(--el-tour-title-font-size);font-weight:var(--el-tour-title-font-weight);line-height:var(--el-tour-font-line-height)}.el-tour__body{color:var(--el-tour-text-color);font-size:var(--el-tour-font-size)}.el-tour__body img,.el-tour__body video{max-width:100%}.el-tour__footer{box-sizing:border-box;display:flex;justify-content:space-between;padding-top:var(--el-tour-padding-primary)}.el-tour__content .el-tour-indicators{display:inline-block;flex:1}.el-tour__content .el-tour-indicator{background:var(--el-color-info-light-9);border-radius:50%;display:inline-block;height:6px;margin-right:6px;width:6px}.el-tour__content .el-tour-indicator.is-active{background:var(--el-color-primary)}.el-tour.el-tour--primary{--el-tour-title-text-color:#fff;--el-tour-text-color:#fff;--el-tour-bg-color:var(--el-color-primary);--el-tour-close-color:#fff}.el-tour.el-tour--primary .el-tour__closebtn:focus .el-tour__close,.el-tour.el-tour--primary .el-tour__closebtn:hover .el-tour__close{color:var(--el-tour-title-text-color)}.el-tour.el-tour--primary .el-button--default{background:#fff;border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-tour.el-tour--primary .el-button--primary{border-color:#fff}.el-tour.el-tour--primary .el-tour-indicator{background:#ffffff26}.el-tour.el-tour--primary .el-tour-indicator.is-active{background:#fff}.el-tour-parent--hidden{overflow:hidden}.el-anchor{--el-anchor-bg-color:var(--el-bg-color);--el-anchor-padding-indent:14px;--el-anchor-line-height:22px;--el-anchor-font-size:12px;--el-anchor-color:var(--el-text-color-secondary);--el-anchor-active-color:var(--el-color-primary);--el-anchor-marker-bg-color:var(--el-color-primary);background-color:var(--el-anchor-bg-color);position:relative}.el-anchor__marker{background-color:var(--el-anchor-marker-bg-color);border-radius:4px;opacity:0;position:absolute;z-index:0}.el-anchor.el-anchor--vertical .el-anchor__marker{height:14px;left:0;top:8px;transition:top .25s ease-in-out,opacity .25s;width:4px}.el-anchor.el-anchor--vertical .el-anchor__list{padding-left:var(--el-anchor-padding-indent)}.el-anchor.el-anchor--vertical.el-anchor--underline:before{background-color:#0505050f;content:"";height:100%;left:0;position:absolute;width:2px}.el-anchor.el-anchor--vertical.el-anchor--underline .el-anchor__marker{border-radius:unset;width:2px}.el-anchor.el-anchor--horizontal .el-anchor__marker{bottom:0;height:2px;transition:left .25s ease-in-out,opacity .25s,width .25s;width:20px}.el-anchor.el-anchor--horizontal .el-anchor__list{display:flex;padding-bottom:4px}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item{padding-left:16px}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item:first-child{padding-left:0}.el-anchor.el-anchor--horizontal.el-anchor--underline:before{background-color:#0505050f;bottom:0;content:"";height:2px;position:absolute;width:100%}.el-anchor.el-anchor--horizontal.el-anchor--underline .el-anchor__marker{border-radius:unset;height:2px}.el-anchor__item{display:flex;flex-direction:column;overflow:hidden}.el-anchor__link{color:var(--el-anchor-color);cursor:pointer;font-size:var(--el-anchor-font-size);line-height:var(--el-anchor-line-height);max-width:100%;outline:none;overflow:hidden;padding:4px 0;text-decoration:none;text-overflow:ellipsis;transition:color var(--el-transition-duration);white-space:nowrap}.el-anchor__link:focus,.el-anchor__link:hover{color:var(--el-anchor-color)}.el-anchor__link.is-active{color:var(--el-anchor-active-color)}.el-anchor .el-anchor__list .el-anchor__item a{display:inline-block}.el-segmented{--el-segmented-color:var(--el-text-color-regular);--el-segmented-bg-color:var(--el-fill-color-light);--el-segmented-padding:2px;--el-segmented-item-selected-color:var(--el-color-white);--el-segmented-item-selected-bg-color:var(--el-color-primary);--el-segmented-item-selected-disabled-bg-color:var(--el-color-primary-light-5);--el-segmented-item-hover-color:var(--el-text-color-primary);--el-segmented-item-hover-bg-color:var(--el-fill-color-dark);--el-segmented-item-active-bg-color:var(--el-fill-color-darker);--el-segmented-item-disabled-color:var(--el-text-color-placeholder);align-items:stretch;background:var(--el-segmented-bg-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-segmented-color);display:inline-flex;font-size:14px;min-height:32px;padding:var(--el-segmented-padding)}.el-segmented__group{align-items:stretch;display:flex;position:relative;width:100%}.el-segmented__item-selected{background:var(--el-segmented-item-selected-bg-color);border-radius:calc(var(--el-border-radius-base) - 2px);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:all .3s;width:10px}.el-segmented__item-selected.is-disabled{background:var(--el-segmented-item-selected-disabled-bg-color)}.el-segmented__item-selected.is-focus-visible:before{border-radius:inherit;content:"";top:0;right:0;bottom:0;left:0;outline:2px solid var(--el-segmented-item-selected-bg-color);outline-offset:1px;position:absolute}.el-segmented__item{align-items:center;border-radius:calc(var(--el-border-radius-base) - 2px);cursor:pointer;display:flex;flex:1;padding:0 11px}.el-segmented__item:not(.is-disabled):not(.is-selected):hover{background:var(--el-segmented-item-hover-bg-color);color:var(--el-segmented-item-hover-color)}.el-segmented__item:not(.is-disabled):not(.is-selected):active{background:var(--el-segmented-item-active-bg-color)}.el-segmented__item.is-selected,.el-segmented__item.is-selected.is-disabled{color:var(--el-segmented-item-selected-color)}.el-segmented__item.is-disabled{color:var(--el-segmented-item-disabled-color);cursor:not-allowed}.el-segmented__item-input{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.el-segmented__item-label{flex:1;line-height:normal;overflow:hidden;text-align:center;text-overflow:ellipsis;transition:color .3s;white-space:nowrap;z-index:1}.el-segmented.is-block{display:flex}.el-segmented.is-block .el-segmented__item{min-width:0}.el-segmented--large{border-radius:var(--el-border-radius-base);font-size:16px;min-height:40px}.el-segmented--large .el-segmented__item,.el-segmented--large .el-segmented__item-selected{border-radius:calc(var(--el-border-radius-base) - 2px)}.el-segmented--large .el-segmented__item{padding:0 11px}.el-segmented--small{border-radius:calc(var(--el-border-radius-base) - 1px);font-size:14px;min-height:24px}.el-segmented--small .el-segmented__item,.el-segmented--small .el-segmented__item-selected{border-radius:calc(var(--el-border-radius-base) - 3px)}.el-segmented--small .el-segmented__item{padding:0 7px}`,Xl=globalThis||void 0||self;/** * @vue/shared v3.4.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function vf(e,t){const o=new Set(e.split(","));return r=>o.has(r)}const go={},ii=[],Wt=()=>{},$5=()=>!1,hu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),mf=e=>e.startsWith("onUpdate:"),$o=Object.assign,gf=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},M5=Object.prototype.hasOwnProperty,Pt=(e,t)=>M5.call(e,t),Ke=Array.isArray,si=e=>Ts(e)==="[object Map]",vu=e=>Ts(e)==="[object Set]",va=e=>Ts(e)==="[object Date]",it=e=>typeof e=="function",ut=e=>typeof e=="string",El=e=>typeof e=="symbol",xt=e=>e!==null&&typeof e=="object",Es=e=>(xt(e)||it(e))&&it(e.then)&&it(e.catch),Tm=Object.prototype.toString,Ts=e=>Tm.call(e),mu=e=>Ts(e).slice(8,-1),gu=e=>Ts(e)==="[object Object]",bf=e=>ut(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$s=vf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bu=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},A5=/-(\w)/g,Fr=bu(e=>e.replace(A5,(t,o)=>o?o.toUpperCase():"")),z5=/\B([A-Z])/g,An=bu(e=>e.replace(z5,"-$1").toLowerCase()),Ms=bu(e=>e.charAt(0).toUpperCase()+e.slice(1)),As=bu(e=>e?`on${Ms(e)}`:""),zn=(e,t)=>!Object.is(e,t),_u=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},_f=e=>{const t=parseFloat(e);return isNaN(t)?e:t},I5=e=>{const t=ut(e)?Number(e):NaN;return isNaN(t)?e:t};let Mm;const Am=()=>Mm||(Mm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Xl<"u"?Xl:{});function Je(e){if(Ke(e)){const t={};for(let o=0;o{if(o){const r=o.split(N5);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(ut(e))t=e;else if(Ke(e))for(let o=0;oci(o,t))}const Om=e=>!!(e&&e.__v_isRef===!0),$e=e=>ut(e)?e:e==null?"":Ke(e)||xt(e)&&(e.toString===Tm||!it(e.toString))?Om(e)?$e(e.value):JSON.stringify(e,Nm,2):String(e),Nm=(e,t)=>Om(t)?Nm(e,t.value):si(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,l],n)=>(o[wf(r,n)+" =>"]=l,o),{})}:vu(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>wf(o))}:El(t)?wf(t):xt(t)&&!Ke(t)&&!gu(t)?String(t):t,wf=(e,t="")=>{var o;return El(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function hf(e,t){const o=new Set(e.split(","));return r=>o.has(r)}const bo={},ii=[],qt=()=>{},T5=()=>!1,fu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vf=e=>e.startsWith("onUpdate:"),$o=Object.assign,mf=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},$5=Object.prototype.hasOwnProperty,Pt=(e,t)=>$5.call(e,t),Ke=Array.isArray,si=e=>Ts(e)==="[object Map]",hu=e=>Ts(e)==="[object Set]",va=e=>Ts(e)==="[object Date]",it=e=>typeof e=="function",ut=e=>typeof e=="string",El=e=>typeof e=="symbol",xt=e=>e!==null&&typeof e=="object",Es=e=>(xt(e)||it(e))&&it(e.then)&&it(e.catch),Em=Object.prototype.toString,Ts=e=>Em.call(e),vu=e=>Ts(e).slice(8,-1),mu=e=>Ts(e)==="[object Object]",gf=e=>ut(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$s=hf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gu=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},M5=/-(\w)/g,Fr=gu(e=>e.replace(M5,(t,o)=>o?o.toUpperCase():"")),A5=/\B([A-Z])/g,An=gu(e=>e.replace(A5,"-$1").toLowerCase()),Ms=gu(e=>e.charAt(0).toUpperCase()+e.slice(1)),As=gu(e=>e?`on${Ms(e)}`:""),zn=(e,t)=>!Object.is(e,t),bu=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},bf=e=>{const t=parseFloat(e);return isNaN(t)?e:t},z5=e=>{const t=ut(e)?Number(e):NaN;return isNaN(t)?e:t};let $m;const Mm=()=>$m||($m=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Xl<"u"?Xl:{});function Je(e){if(Ke(e)){const t={};for(let o=0;o{if(o){const r=o.split(O5);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function O(e){let t="";if(ut(e))t=e;else if(Ke(e))for(let o=0;oci(o,t))}const Im=e=>!!(e&&e.__v_isRef===!0),$e=e=>ut(e)?e:e==null?"":Ke(e)||xt(e)&&(e.toString===Em||!it(e.toString))?Im(e)?$e(e.value):JSON.stringify(e,Om,2):String(e),Om=(e,t)=>Im(t)?Om(e,t.value):si(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,l],n)=>(o[_f(r,n)+" =>"]=l,o),{})}:hu(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>_f(o))}:El(t)?_f(t):xt(t)&&!Ke(t)&&!mu(t)?String(t):t,_f=(e,t="")=>{var o;return El(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/** * @vue/reactivity v3.4.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Rr;class Pm{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Rr,!t&&Rr&&(this.index=(Rr.scopes||(Rr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const o=Rr;try{return Rr=this,t()}finally{Rr=o}}}on(){Rr=this}off(){Rr=this.parent}stop(t){if(this._active){let o,r;for(o=0,r=this.effects.length;o=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Ql()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=In,o=ma;try{return In=!0,ma=this,this._runnings++,Rm(this),this.fn()}finally{Lm(this),this._runnings--,ma=o,In=t}}stop(){this.active&&(Rm(this),Lm(this),this.onStop&&this.onStop(),this.active=!1)}}function D5(e){return e.value}function Rm(e){e._trackId++,e._depsLength=0}function Lm(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const o=new Map;return o.cleanup=e,o.computed=t,o},wu=new WeakMap,ga=Symbol(""),Mf=Symbol("");function Cr(e,t,o){if(In&&ma){let r=wu.get(e);r||wu.set(e,r=new Map);let l=r.get(o);l||r.set(o,l=Fm(()=>r.delete(o))),Dm(ma,l)}}function en(e,t,o,r,l,n){const a=wu.get(e);if(!a)return;let i=[];if(t==="clear")i=[...a.values()];else if(o==="length"&&Ke(e)){const c=Number(r);a.forEach((d,u)=>{(u==="length"||!El(u)&&u>=c)&&i.push(d)})}else switch(o!==void 0&&i.push(a.get(o)),t){case"add":Ke(e)?bf(o)&&i.push(a.get("length")):(i.push(a.get(ga)),si(e)&&i.push(a.get(Mf)));break;case"delete":Ke(e)||(i.push(a.get(ga)),si(e)&&i.push(a.get(Mf)));break;case"set":si(e)&&i.push(a.get(ga));break}Ef();for(const c of i)c&&Hm(c,4);Tf()}function H5(e,t){const o=wu.get(e);return o&&o.get(t)}const F5=vf("__proto__,__v_isRef,__isVue"),jm=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(El)),Km=j5();function j5(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...o){const r=jt(this);for(let n=0,a=this.length;n{e[t]=function(...o){Jl(),Ef();const r=jt(this)[t].apply(this,o);return Tf(),Ql(),r}}),e}function K5(e){El(e)||(e=String(e));const t=jt(this);return Cr(t,"has",e),t.hasOwnProperty(e)}class Um{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,r){const l=this._isReadonly,n=this._isShallow;if(o==="__v_isReactive")return!l;if(o==="__v_isReadonly")return l;if(o==="__v_isShallow")return n;if(o==="__v_raw")return r===(l?n?tg:eg:n?Qm:Jm).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=Ke(t);if(!l){if(a&&Pt(Km,o))return Reflect.get(Km,o,r);if(o==="hasOwnProperty")return K5}const i=Reflect.get(t,o,r);return(El(o)?jm.has(o):F5(o))||(l||Cr(t,"get",o),n)?i:Zt(i)?a&&bf(o)?i:i.value:xt(i)?l?ui(i):Dt(i):i}}class Wm extends Um{constructor(t=!1){super(!1,t)}set(t,o,r,l){let n=t[o];if(!this._isShallow){const c=zs(n);if(!Mu(r)&&!zs(r)&&(n=jt(n),r=jt(r)),!Ke(t)&&Zt(n)&&!Zt(r))return c?!1:(n.value=r,!0)}const a=Ke(t)&&bf(o)?Number(o)e,yu=e=>Reflect.getPrototypeOf(e);function xu(e,t,o=!1,r=!1){e=e.__v_raw;const l=jt(e),n=jt(t);o||(zn(t,n)&&Cr(l,"get",t),Cr(l,"get",n));const{has:a}=yu(l),i=r?Af:o?zf:Is;if(a.call(l,t))return i(e.get(t));if(a.call(l,n))return i(e.get(n));e!==l&&e.get(t)}function ku(e,t=!1){const o=this.__v_raw,r=jt(o),l=jt(e);return t||(zn(e,l)&&Cr(r,"has",e),Cr(r,"has",l)),e===l?o.has(e):o.has(e)||o.has(l)}function Cu(e,t=!1){return e=e.__v_raw,!t&&Cr(jt(e),"iterate",ga),Reflect.get(e,"size",e)}function Ym(e){e=jt(e);const t=jt(this);return yu(t).has.call(t,e)||(t.add(e),en(t,"add",e,e)),this}function Gm(e,t){t=jt(t);const o=jt(this),{has:r,get:l}=yu(o);let n=r.call(o,e);n||(e=jt(e),n=r.call(o,e));const a=l.call(o,e);return o.set(e,t),n?zn(t,a)&&en(o,"set",e,t):en(o,"add",e,t),this}function Xm(e){const t=jt(this),{has:o,get:r}=yu(t);let l=o.call(t,e);l||(e=jt(e),l=o.call(t,e)),r&&r.call(t,e);const n=t.delete(e);return l&&en(t,"delete",e,void 0),n}function Zm(){const e=jt(this),t=e.size!==0,o=e.clear();return t&&en(e,"clear",void 0,void 0),o}function Su(e,t){return function(r,l){const n=this,a=n.__v_raw,i=jt(a),c=t?Af:e?zf:Is;return!e&&Cr(i,"iterate",ga),a.forEach((d,u)=>r.call(l,c(d),c(u),n))}}function Eu(e,t,o){return function(...r){const l=this.__v_raw,n=jt(l),a=si(n),i=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=l[e](...r),u=o?Af:t?zf:Is;return!t&&Cr(n,"iterate",c?Mf:ga),{next(){const{value:p,done:h}=d.next();return h?{value:p,done:h}:{value:i?[u(p[0]),u(p[1])]:u(p),done:h}},[Symbol.iterator](){return this}}}}function On(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function G5(){const e={get(n){return xu(this,n)},get size(){return Cu(this)},has:ku,add:Ym,set:Gm,delete:Xm,clear:Zm,forEach:Su(!1,!1)},t={get(n){return xu(this,n,!1,!0)},get size(){return Cu(this)},has:ku,add:Ym,set:Gm,delete:Xm,clear:Zm,forEach:Su(!1,!0)},o={get(n){return xu(this,n,!0)},get size(){return Cu(this,!0)},has(n){return ku.call(this,n,!0)},add:On("add"),set:On("set"),delete:On("delete"),clear:On("clear"),forEach:Su(!0,!1)},r={get(n){return xu(this,n,!0,!0)},get size(){return Cu(this,!0)},has(n){return ku.call(this,n,!0)},add:On("add"),set:On("set"),delete:On("delete"),clear:On("clear"),forEach:Su(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{e[n]=Eu(n,!1,!1),o[n]=Eu(n,!0,!1),t[n]=Eu(n,!1,!0),r[n]=Eu(n,!0,!0)}),[e,o,t,r]}const[X5,Z5,J5,Q5]=G5();function Tu(e,t){const o=t?e?Q5:J5:e?Z5:X5;return(r,l,n)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?r:Reflect.get(Pt(o,l)&&l in r?o:r,l,n)}const ek={get:Tu(!1,!1)},tk={get:Tu(!1,!0)},ok={get:Tu(!0,!1)},rk={get:Tu(!0,!0)},Jm=new WeakMap,Qm=new WeakMap,eg=new WeakMap,tg=new WeakMap;function lk(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nk(e){return e.__v_skip||!Object.isExtensible(e)?0:lk(mu(e))}function Dt(e){return zs(e)?e:$u(e,!1,U5,ek,Jm)}function og(e){return $u(e,!1,q5,tk,Qm)}function ui(e){return $u(e,!0,W5,ok,eg)}function Upe(e){return $u(e,!0,Y5,rk,tg)}function $u(e,t,o,r,l){if(!xt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const n=l.get(e);if(n)return n;const a=nk(e);if(a===0)return e;const i=new Proxy(e,a===2?r:o);return l.set(e,i),i}function ba(e){return zs(e)?ba(e.__v_raw):!!(e&&e.__v_isReactive)}function zs(e){return!!(e&&e.__v_isReadonly)}function Mu(e){return!!(e&&e.__v_isShallow)}function rg(e){return e?!!e.__v_raw:!1}function jt(e){const t=e&&e.__v_raw;return t?jt(t):e}function Nn(e){return Object.isExtensible(e)&&$m(e,"__v_skip",!0),e}const Is=e=>xt(e)?Dt(e):e,zf=e=>xt(e)?ui(e):e;class lg{constructor(t,o,r,l){this.getter=t,this._setter=o,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Cf(()=>t(this._value),()=>Os(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!l,this.__v_isReadonly=r}get value(){const t=jt(this);return(!t._cacheable||t.effect.dirty)&&zn(t._value,t._value=t.effect.run())&&Os(t,4),If(t),t.effect._dirtyLevel>=2&&Os(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function ak(e,t,o=!1){let r,l;const n=it(e);return n?(r=e,l=Wt):(r=e.get,l=e.set),new lg(r,l,n||!l,o)}function If(e){var t;In&&ma&&(e=jt(e),Dm(ma,(t=e.dep)!=null?t:e.dep=Fm(()=>e.dep=void 0,e instanceof lg?e:void 0)))}function Os(e,t=4,o,r){e=jt(e);const l=e.dep;l&&Hm(l,t)}function Zt(e){return!!(e&&e.__v_isRef===!0)}function D(e){return ng(e,!1)}function lo(e){return ng(e,!0)}function ng(e,t){return Zt(e)?e:new ik(e,t)}class ik{constructor(t,o){this.__v_isShallow=o,this.dep=void 0,this.__v_isRef=!0,this._rawValue=o?t:jt(t),this._value=o?t:Is(t)}get value(){return If(this),this._value}set value(t){const o=this.__v_isShallow||Mu(t)||zs(t);t=o?t:jt(t),zn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=o?t:Is(t),Os(this,4))}}function s(e){return Zt(e)?e.value:e}const sk={get:(e,t,o)=>s(Reflect.get(e,t,o)),set:(e,t,o,r)=>{const l=e[t];return Zt(l)&&!Zt(o)?(l.value=o,!0):Reflect.set(e,t,o,r)}};function ag(e){return ba(e)?e:new Proxy(e,sk)}class ck{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:o,set:r}=t(()=>If(this),()=>Os(this));this._get=o,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function uk(e){return new ck(e)}function Bo(e){const t=Ke(e)?new Array(e.length):{};for(const o in e)t[o]=ig(e,o);return t}class dk{constructor(t,o,r){this._object=t,this._key=o,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return H5(jt(this._object),this._key)}}class pk{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Yt(e,t,o){return Zt(e)?e:it(e)?new pk(e):xt(e)&&arguments.length>1?ig(e,t,o):D(e)}function ig(e,t,o){const r=e[t];return Zt(r)?r:new dk(e,t,o)}/** +**/let Rr;class Nm{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Rr,!t&&Rr&&(this.index=(Rr.scopes||(Rr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const o=Rr;try{return Rr=this,t()}finally{Rr=o}}}on(){Rr=this}off(){Rr=this.parent}stop(t){if(this._active){let o,r;for(o=0,r=this.effects.length;o=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Ql()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=In,o=ma;try{return In=!0,ma=this,this._runnings++,Pm(this),this.fn()}finally{Rm(this),this._runnings--,ma=o,In=t}}stop(){this.active&&(Pm(this),Rm(this),this.onStop&&this.onStop(),this.active=!1)}}function V5(e){return e.value}function Pm(e){e._trackId++,e._depsLength=0}function Rm(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const o=new Map;return o.cleanup=e,o.computed=t,o},_u=new WeakMap,ga=Symbol(""),$f=Symbol("");function Cr(e,t,o){if(In&&ma){let r=_u.get(e);r||_u.set(e,r=new Map);let l=r.get(o);l||r.set(o,l=Hm(()=>r.delete(o))),Vm(ma,l)}}function en(e,t,o,r,l,n){const a=_u.get(e);if(!a)return;let i=[];if(t==="clear")i=[...a.values()];else if(o==="length"&&Ke(e)){const c=Number(r);a.forEach((d,u)=>{(u==="length"||!El(u)&&u>=c)&&i.push(d)})}else switch(o!==void 0&&i.push(a.get(o)),t){case"add":Ke(e)?gf(o)&&i.push(a.get("length")):(i.push(a.get(ga)),si(e)&&i.push(a.get($f)));break;case"delete":Ke(e)||(i.push(a.get(ga)),si(e)&&i.push(a.get($f)));break;case"set":si(e)&&i.push(a.get(ga));break}Sf();for(const c of i)c&&Dm(c,4);Ef()}function D5(e,t){const o=_u.get(e);return o&&o.get(t)}const H5=hf("__proto__,__v_isRef,__isVue"),Fm=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(El)),jm=F5();function F5(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...o){const r=Kt(this);for(let n=0,a=this.length;n{e[t]=function(...o){Jl(),Sf();const r=Kt(this)[t].apply(this,o);return Ef(),Ql(),r}}),e}function j5(e){El(e)||(e=String(e));const t=Kt(this);return Cr(t,"has",e),t.hasOwnProperty(e)}class Km{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,r){const l=this._isReadonly,n=this._isShallow;if(o==="__v_isReactive")return!l;if(o==="__v_isReadonly")return l;if(o==="__v_isShallow")return n;if(o==="__v_raw")return r===(l?n?eg:Qm:n?Jm:Zm).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=Ke(t);if(!l){if(a&&Pt(jm,o))return Reflect.get(jm,o,r);if(o==="hasOwnProperty")return j5}const i=Reflect.get(t,o,r);return(El(o)?Fm.has(o):H5(o))||(l||Cr(t,"get",o),n)?i:Zt(i)?a&&gf(o)?i:i.value:xt(i)?l?ui(i):Dt(i):i}}class Um extends Km{constructor(t=!1){super(!1,t)}set(t,o,r,l){let n=t[o];if(!this._isShallow){const c=zs(n);if(!$u(r)&&!zs(r)&&(n=Kt(n),r=Kt(r)),!Ke(t)&&Zt(n)&&!Zt(r))return c?!1:(n.value=r,!0)}const a=Ke(t)&&gf(o)?Number(o)e,wu=e=>Reflect.getPrototypeOf(e);function yu(e,t,o=!1,r=!1){e=e.__v_raw;const l=Kt(e),n=Kt(t);o||(zn(t,n)&&Cr(l,"get",t),Cr(l,"get",n));const{has:a}=wu(l),i=r?Mf:o?Af:Is;if(a.call(l,t))return i(e.get(t));if(a.call(l,n))return i(e.get(n));e!==l&&e.get(t)}function xu(e,t=!1){const o=this.__v_raw,r=Kt(o),l=Kt(e);return t||(zn(e,l)&&Cr(r,"has",e),Cr(r,"has",l)),e===l?o.has(e):o.has(e)||o.has(l)}function ku(e,t=!1){return e=e.__v_raw,!t&&Cr(Kt(e),"iterate",ga),Reflect.get(e,"size",e)}function qm(e){e=Kt(e);const t=Kt(this);return wu(t).has.call(t,e)||(t.add(e),en(t,"add",e,e)),this}function Ym(e,t){t=Kt(t);const o=Kt(this),{has:r,get:l}=wu(o);let n=r.call(o,e);n||(e=Kt(e),n=r.call(o,e));const a=l.call(o,e);return o.set(e,t),n?zn(t,a)&&en(o,"set",e,t):en(o,"add",e,t),this}function Gm(e){const t=Kt(this),{has:o,get:r}=wu(t);let l=o.call(t,e);l||(e=Kt(e),l=o.call(t,e)),r&&r.call(t,e);const n=t.delete(e);return l&&en(t,"delete",e,void 0),n}function Xm(){const e=Kt(this),t=e.size!==0,o=e.clear();return t&&en(e,"clear",void 0,void 0),o}function Cu(e,t){return function(r,l){const n=this,a=n.__v_raw,i=Kt(a),c=t?Mf:e?Af:Is;return!e&&Cr(i,"iterate",ga),a.forEach((d,u)=>r.call(l,c(d),c(u),n))}}function Su(e,t,o){return function(...r){const l=this.__v_raw,n=Kt(l),a=si(n),i=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=l[e](...r),u=o?Mf:t?Af:Is;return!t&&Cr(n,"iterate",c?$f:ga),{next(){const{value:p,done:h}=d.next();return h?{value:p,done:h}:{value:i?[u(p[0]),u(p[1])]:u(p),done:h}},[Symbol.iterator](){return this}}}}function On(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Y5(){const e={get(n){return yu(this,n)},get size(){return ku(this)},has:xu,add:qm,set:Ym,delete:Gm,clear:Xm,forEach:Cu(!1,!1)},t={get(n){return yu(this,n,!1,!0)},get size(){return ku(this)},has:xu,add:qm,set:Ym,delete:Gm,clear:Xm,forEach:Cu(!1,!0)},o={get(n){return yu(this,n,!0)},get size(){return ku(this,!0)},has(n){return xu.call(this,n,!0)},add:On("add"),set:On("set"),delete:On("delete"),clear:On("clear"),forEach:Cu(!0,!1)},r={get(n){return yu(this,n,!0,!0)},get size(){return ku(this,!0)},has(n){return xu.call(this,n,!0)},add:On("add"),set:On("set"),delete:On("delete"),clear:On("clear"),forEach:Cu(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{e[n]=Su(n,!1,!1),o[n]=Su(n,!0,!1),t[n]=Su(n,!1,!0),r[n]=Su(n,!0,!0)}),[e,o,t,r]}const[G5,X5,Z5,J5]=Y5();function Eu(e,t){const o=t?e?J5:Z5:e?X5:G5;return(r,l,n)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?r:Reflect.get(Pt(o,l)&&l in r?o:r,l,n)}const Q5={get:Eu(!1,!1)},ek={get:Eu(!1,!0)},tk={get:Eu(!0,!1)},ok={get:Eu(!0,!0)},Zm=new WeakMap,Jm=new WeakMap,Qm=new WeakMap,eg=new WeakMap;function rk(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lk(e){return e.__v_skip||!Object.isExtensible(e)?0:rk(vu(e))}function Dt(e){return zs(e)?e:Tu(e,!1,K5,Q5,Zm)}function tg(e){return Tu(e,!1,W5,ek,Jm)}function ui(e){return Tu(e,!0,U5,tk,Qm)}function Kpe(e){return Tu(e,!0,q5,ok,eg)}function Tu(e,t,o,r,l){if(!xt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const n=l.get(e);if(n)return n;const a=lk(e);if(a===0)return e;const i=new Proxy(e,a===2?r:o);return l.set(e,i),i}function ba(e){return zs(e)?ba(e.__v_raw):!!(e&&e.__v_isReactive)}function zs(e){return!!(e&&e.__v_isReadonly)}function $u(e){return!!(e&&e.__v_isShallow)}function og(e){return e?!!e.__v_raw:!1}function Kt(e){const t=e&&e.__v_raw;return t?Kt(t):e}function Nn(e){return Object.isExtensible(e)&&Tm(e,"__v_skip",!0),e}const Is=e=>xt(e)?Dt(e):e,Af=e=>xt(e)?ui(e):e;class rg{constructor(t,o,r,l){this.getter=t,this._setter=o,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new kf(()=>t(this._value),()=>Os(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!l,this.__v_isReadonly=r}get value(){const t=Kt(this);return(!t._cacheable||t.effect.dirty)&&zn(t._value,t._value=t.effect.run())&&Os(t,4),zf(t),t.effect._dirtyLevel>=2&&Os(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function nk(e,t,o=!1){let r,l;const n=it(e);return n?(r=e,l=qt):(r=e.get,l=e.set),new rg(r,l,n||!l,o)}function zf(e){var t;In&&ma&&(e=Kt(e),Vm(ma,(t=e.dep)!=null?t:e.dep=Hm(()=>e.dep=void 0,e instanceof rg?e:void 0)))}function Os(e,t=4,o,r){e=Kt(e);const l=e.dep;l&&Dm(l,t)}function Zt(e){return!!(e&&e.__v_isRef===!0)}function D(e){return lg(e,!1)}function lo(e){return lg(e,!0)}function lg(e,t){return Zt(e)?e:new ak(e,t)}class ak{constructor(t,o){this.__v_isShallow=o,this.dep=void 0,this.__v_isRef=!0,this._rawValue=o?t:Kt(t),this._value=o?t:Is(t)}get value(){return zf(this),this._value}set value(t){const o=this.__v_isShallow||$u(t)||zs(t);t=o?t:Kt(t),zn(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=o?t:Is(t),Os(this,4))}}function s(e){return Zt(e)?e.value:e}const ik={get:(e,t,o)=>s(Reflect.get(e,t,o)),set:(e,t,o,r)=>{const l=e[t];return Zt(l)&&!Zt(o)?(l.value=o,!0):Reflect.set(e,t,o,r)}};function ng(e){return ba(e)?e:new Proxy(e,ik)}class sk{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:o,set:r}=t(()=>zf(this),()=>Os(this));this._get=o,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function ck(e){return new sk(e)}function Bo(e){const t=Ke(e)?new Array(e.length):{};for(const o in e)t[o]=ag(e,o);return t}class uk{constructor(t,o,r){this._object=t,this._key=o,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return D5(Kt(this._object),this._key)}}class dk{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Yt(e,t,o){return Zt(e)?e:it(e)?new dk(e):xt(e)&&arguments.length>1?ag(e,t,o):D(e)}function ag(e,t,o){const r=e[t];return Zt(r)?r:new uk(e,t,o)}/** * @vue/runtime-core v3.4.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const Ns=[];function Wpe(e,...t){Jl();const o=Ns.length?Ns[Ns.length-1].component:null,r=o&&o.appContext.config.warnHandler,l=fk();if(r)tn(r,o,11,[e+t.map(n=>{var a,i;return(i=(a=n.toString)==null?void 0:a.call(n))!=null?i:JSON.stringify(n)}).join(""),o&&o.proxy,l.map(({vnode:n})=>`at <${c1(o,n.type)}>`).join(` +**/const Ns=[];function Upe(e,...t){Jl();const o=Ns.length?Ns[Ns.length-1].component:null,r=o&&o.appContext.config.warnHandler,l=pk();if(r)tn(r,o,11,[e+t.map(n=>{var a,i;return(i=(a=n.toString)==null?void 0:a.call(n))!=null?i:JSON.stringify(n)}).join(""),o&&o.proxy,l.map(({vnode:n})=>`at <${s1(o,n.type)}>`).join(` `),l]);else{const n=[`[Vue warn]: ${e}`,...t];l.length&&n.push(` -`,...hk(l)),console.warn(...n)}Ql()}function fk(){let e=Ns[Ns.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function hk(e){const t=[];return e.forEach((o,r)=>{t.push(...r===0?[]:[` -`],...vk(o))}),t}function vk({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,l=` at <${c1(e.component,e.type,r)}`,n=">"+o;return e.props?[l,...mk(e.props),n]:[l+n]}function mk(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach(r=>{t.push(...sg(r,e[r]))}),o.length>3&&t.push(" ..."),t}function sg(e,t,o){return ut(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:Zt(t)?(t=sg(e,jt(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):it(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=jt(t),o?t:[`${e}=`,t])}function tn(e,t,o,r){try{return r?e(...r):e()}catch(l){Au(l,t,o)}}function jr(e,t,o,r){if(it(e)){const l=tn(e,t,o,r);return l&&Es(l)&&l.catch(n=>{Au(n,t,o)}),l}if(Ke(e)){const l=[];for(let n=0;n>>1,l=lr[r],n=Rs(l);nTl&&lr.splice(t,1)}function wk(e){Ke(e)?di.push(...e):(!Pn||!Pn.includes(e,e.allowRecurse?_a+1:_a))&&di.push(e),ug()}function dg(e,t,o=Ps?Tl+1:0){for(;oRs(o)-Rs(r));if(di.length=0,Pn){Pn.push(...t);return}for(Pn=t,_a=0;_ae.id==null?1/0:e.id,yk=(e,t)=>{const o=Rs(e)-Rs(t);if(o===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function fg(e){Of=!1,Ps=!0,lr.sort(yk);try{for(Tl=0;Tlut(v)?v.trim():v)),p&&(l=o.map(_f))}let i,c=r[i=As(t)]||r[i=As(Fr(t))];!c&&n&&(c=r[i=As(An(t))]),c&&jr(c,e,6,l);const d=r[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,jr(d,e,6,l)}}function hg(e,t,o=!1){const r=t.emitsCache,l=r.get(e);if(l!==void 0)return l;const n=e.emits;let a={},i=!1;if(!it(e)){const c=d=>{const u=hg(d,t,!0);u&&(i=!0,$o(a,u))};!o&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!n&&!i?(xt(e)&&r.set(e,null),null):(Ke(n)?n.forEach(c=>a[c]=null):$o(a,n),xt(e)&&r.set(e,a),a)}function zu(e,t){return!e||!hu(t)?!1:(t=t.slice(2).replace(/Once$/,""),Pt(e,t[0].toLowerCase()+t.slice(1))||Pt(e,An(t))||Pt(e,t))}let Vo=null,vg=null;function Iu(e){const t=Vo;return Vo=e,vg=e&&e.type.__scopeId||null,t}function le(e,t=Vo,o){if(!t||e._n)return e;const r=(...l)=>{r._d&&Qg(-1);const n=Iu(t);let a;try{a=e(...l)}finally{Iu(n),r._d&&Qg(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function qpe(){}function Rf(e){const{type:t,vnode:o,proxy:r,withProxy:l,propsOptions:[n],slots:a,attrs:i,emit:c,render:d,renderCache:u,props:p,data:h,setupState:v,ctx:m,inheritAttrs:f}=e,_=Iu(e);let g,y;try{if(o.shapeFlag&4){const x=l||r,$=x;g=$l(d.call($,x,u,p,v,h,m)),y=i}else{const x=t;g=$l(x.length>1?x(p,{attrs:i,slots:a,emit:c}):x(p,null)),y=t.props?i:kk(i)}}catch(x){Fs.length=0,Au(x,e,1),g=ee(Jo)}let w=g;if(y&&f!==!1){const x=Object.keys(y),{shapeFlag:$}=w;x.length&&$&7&&(n&&x.some(mf)&&(y=Ck(y,n)),w=nn(w,y,!1,!0))}return o.dirs&&(w=nn(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(o.dirs):o.dirs),o.transition&&(w.transition=o.transition),g=w,Iu(_),g}const kk=e=>{let t;for(const o in e)(o==="class"||o==="style"||hu(o))&&((t||(t={}))[o]=e[o]);return t},Ck=(e,t)=>{const o={};for(const r in e)(!mf(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function Sk(e,t,o){const{props:r,children:l,component:n}=e,{props:a,children:i,patchFlag:c}=t,d=n.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&c>=0){if(c&1024)return!0;if(c&16)return r?mg(r,a,d):!!a;if(c&8){const u=t.dynamicProps;for(let p=0;pe.__isSuspense;function Mk(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):wk(e)}function Nu(e,t,o=Xo,r=!1){if(o){const l=o[e]||(o[e]=[]),n=t.__weh||(t.__weh=(...a)=>{Jl();const i=Ks(o),c=jr(t,o,e,a);return i(),Ql(),c});return r?l.unshift(n):l.push(n),n}}const on=e=>(t,o=Xo)=>{(!Ku||e==="sp")&&Nu(e,(...r)=>t(...r),o)},Pu=on("bm"),ft=on("m"),_g=on("bu"),rn=on("u"),to=on("bum"),Rn=on("um"),Ak=on("sp"),zk=on("rtg"),Ik=on("rtc");function Ok(e,t=Xo){Nu("ec",e,t)}function mt(e,t){if(Vo===null)return e;const o=Uu(Vo),r=e.dirs||(e.dirs=[]);for(let l=0;lt(a,i,void 0,n));else{const a=Object.keys(e);l=new Array(a.length);for(let i=0,c=a.length;i{const n=r.fn(...l);return n&&(n.key=r.key),n}:r.fn)}return e}/*! #__NO_SIDE_EFFECTS__ */function N(e,t){return it(e)?$o({name:e.name},t,{setup:e}):e}const Ls=e=>!!e.type.__asyncLoader;function be(e,t,o={},r,l){if(Vo.isCE||Vo.parent&&Ls(Vo.parent)&&Vo.parent.isCE)return t!=="default"&&(o.name=t),ee("slot",o,r&&r());let n=e[t];n&&n._c&&(n._d=!1),b();const a=n&&wg(n(o)),i=he(Qe,{key:o.key||a&&a.key||`_${t}`},a||(r?r():[]),a&&e._===1?64:-2);return i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),n&&n._c&&(n._d=!0),i}function wg(e){return e.some(t=>io(t)?!(t.type===Jo||t.type===Qe&&!wg(t.children)):!0)?e:null}function Nk(e,t){const o={};for(const r in e)o[As(r)]=e[r];return o}const Vf=e=>e?r1(e)?Uu(e):Vf(e.parent):null,Bs=$o(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Vf(e.parent),$root:e=>Vf(e.root),$emit:e=>e.emit,$options:e=>Ff(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Pf(e.update)}),$nextTick:e=>e.n||(e.n=et.bind(e.proxy)),$watch:e=>t9.bind(e)}),Df=(e,t)=>e!==go&&!e.__isScriptSetup&&Pt(e,t),Pk={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:r,data:l,props:n,accessCache:a,type:i,appContext:c}=e;let d;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return l[t];case 4:return o[t];case 3:return n[t]}else{if(Df(r,t))return a[t]=1,r[t];if(l!==go&&Pt(l,t))return a[t]=2,l[t];if((d=e.propsOptions[0])&&Pt(d,t))return a[t]=3,n[t];if(o!==go&&Pt(o,t))return a[t]=4,o[t];Hf&&(a[t]=0)}}const u=Bs[t];let p,h;if(u)return t==="$attrs"&&Cr(e.attrs,"get",""),u(e);if((p=i.__cssModules)&&(p=p[t]))return p;if(o!==go&&Pt(o,t))return a[t]=4,o[t];if(h=c.config.globalProperties,Pt(h,t))return h[t]},set({_:e},t,o){const{data:r,setupState:l,ctx:n}=e;return Df(l,t)?(l[t]=o,!0):r!==go&&Pt(r,t)?(r[t]=o,!0):Pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(n[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:l,propsOptions:n}},a){let i;return!!o[a]||e!==go&&Pt(e,a)||Df(t,a)||(i=n[0])&&Pt(i,a)||Pt(r,a)||Pt(Bs,a)||Pt(l.config.globalProperties,a)},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Pt(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Do(){return yg().slots}function ya(){return yg().attrs}function yg(){const e=wt();return e.setupContext||(e.setupContext=i1(e))}function xg(e){return Ke(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}let Hf=!0;function Rk(e){const t=Ff(e),o=e.proxy,r=e.ctx;Hf=!1,t.beforeCreate&&kg(t.beforeCreate,e,"bc");const{data:l,computed:n,methods:a,watch:i,provide:c,inject:d,created:u,beforeMount:p,mounted:h,beforeUpdate:v,updated:m,activated:f,deactivated:_,beforeDestroy:g,beforeUnmount:y,destroyed:w,unmounted:x,render:$,renderTracked:T,renderTriggered:R,errorCaptured:P,serverPrefetch:L,expose:V,inheritAttrs:B,components:j,directives:te,filters:J}=t;if(d&&Lk(d,r,null),a)for(const F in a){const K=a[F];it(K)&&(r[F]=K.bind(o))}if(l){const F=l.call(o,o);xt(F)&&(e.data=Dt(F))}if(Hf=!0,n)for(const F in n){const K=n[F],I=it(K)?K.bind(o,o):it(K.get)?K.get.bind(o,o):Wt,U=!it(K)&&it(K.set)?K.set.bind(o):Wt,oe=C({get:I,set:U});Object.defineProperty(r,F,{enumerable:!0,configurable:!0,get:()=>oe.value,set:ne=>oe.value=ne})}if(i)for(const F in i)Cg(i[F],r,o,F);if(c){const F=it(c)?c.call(o):c;Reflect.ownKeys(F).forEach(K=>{zt(K,F[K])})}u&&kg(u,e,"c");function H(F,K){Ke(K)?K.forEach(I=>F(I.bind(o))):K&&F(K.bind(o))}if(H(Pu,p),H(ft,h),H(_g,v),H(rn,m),H(o9,f),H(jg,_),H(Ok,P),H(Ik,T),H(zk,R),H(to,y),H(Rn,x),H(Ak,L),Ke(V))if(V.length){const F=e.exposed||(e.exposed={});V.forEach(K=>{Object.defineProperty(F,K,{get:()=>o[K],set:I=>o[K]=I})})}else e.exposed||(e.exposed={});$&&e.render===Wt&&(e.render=$),B!=null&&(e.inheritAttrs=B),j&&(e.components=j),te&&(e.directives=te)}function Lk(e,t,o=Wt){Ke(e)&&(e=jf(e));for(const r in e){const l=e[r];let n;xt(l)?"default"in l?n=Ge(l.from||r,l.default,!0):n=Ge(l.from||r):n=Ge(l),Zt(n)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[r]=n}}function kg(e,t,o){jr(Ke(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function Cg(e,t,o,r){const l=r.includes(".")?Fg(o,r):()=>o[r];if(ut(e)){const n=t[e];it(n)&&Se(l,n)}else if(it(e))Se(l,e.bind(o));else if(xt(e))if(Ke(e))e.forEach(n=>Cg(n,t,o,r));else{const n=it(e.handler)?e.handler.bind(o):t[e.handler];it(n)&&Se(l,n,e)}}function Ff(e){const t=e.type,{mixins:o,extends:r}=t,{mixins:l,optionsCache:n,config:{optionMergeStrategies:a}}=e.appContext,i=n.get(t);let c;return i?c=i:!l.length&&!o&&!r?c=t:(c={},l.length&&l.forEach(d=>Ru(c,d,a,!0)),Ru(c,t,a)),xt(t)&&n.set(t,c),c}function Ru(e,t,o,r=!1){const{mixins:l,extends:n}=t;n&&Ru(e,n,o,!0),l&&l.forEach(a=>Ru(e,a,o,!0));for(const a in t)if(!(r&&a==="expose")){const i=Bk[a]||o&&o[a];e[a]=i?i(e[a],t[a]):t[a]}return e}const Bk={data:Sg,props:Eg,emits:Eg,methods:Vs,computed:Vs,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:Vs,directives:Vs,watch:Dk,provide:Sg,inject:Vk};function Sg(e,t){return t?e?function(){return $o(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function Vk(e,t){return Vs(jf(e),jf(t))}function jf(e){if(Ke(e)){const t={};for(let o=0;o1)return o&&it(t)?t.call(r&&r.proxy):t}}function jk(){return!!(Xo||Vo||pi)}const $g={},Mg=()=>Object.create($g),Ag=e=>Object.getPrototypeOf(e)===$g;function Kk(e,t,o,r=!1){const l={},n=Mg();e.propsDefaults=Object.create(null),zg(e,t,l,n);for(const a in e.propsOptions[0])a in l||(l[a]=void 0);o?e.props=r?l:og(l):e.type.props?e.props=l:e.props=n,e.attrs=n}function Uk(e,t,o,r){const{props:l,attrs:n,vnode:{patchFlag:a}}=e,i=jt(l),[c]=e.propsOptions;let d=!1;if((r||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[h,v]=Ig(p,t,!0);$o(a,h),v&&i.push(...v)};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!n&&!c)return xt(e)&&r.set(e,ii),ii;if(Ke(n))for(let u=0;u-1,v[1]=f<0||m-1||Pt(v,"default"))&&i.push(p)}}}const d=[a,i];return xt(e)&&r.set(e,d),d}function Og(e){return e[0]!=="$"&&!$s(e)}function Ng(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Pg(e,t){return Ng(e)===Ng(t)}function Rg(e,t){return Ke(t)?t.findIndex(o=>Pg(o,e)):it(t)&&Pg(t,e)?0:-1}const Lg=e=>e[0]==="_"||e==="$stable",Uf=e=>Ke(e)?e.map($l):[$l(e)],Wk=(e,t,o)=>{if(t._n)return t;const r=le((...l)=>Uf(t(...l)),o);return r._c=!1,r},Bg=(e,t,o)=>{const r=e._ctx;for(const l in e){if(Lg(l))continue;const n=e[l];if(it(n))t[l]=Wk(l,n,r);else if(n!=null){const a=Uf(n);t[l]=()=>a}}},Vg=(e,t)=>{const o=Uf(t);e.slots.default=()=>o},qk=(e,t)=>{const o=e.slots=Mg();if(e.vnode.shapeFlag&32){const r=t._;r?($o(o,t),$m(o,"_",r,!0)):Bg(t,o)}else t&&Vg(e,t)},Yk=(e,t,o)=>{const{vnode:r,slots:l}=e;let n=!0,a=go;if(r.shapeFlag&32){const i=t._;i?o&&i===1?n=!1:($o(l,t),!o&&i===1&&delete l._):(n=!t.$stable,Bg(t,l)),a=t}else t&&(Vg(e,t),a={default:1});if(n)for(const i in l)!Lg(i)&&a[i]==null&&delete l[i]};function Wf(e,t,o,r,l=!1){if(Ke(e)){e.forEach((h,v)=>Wf(h,t&&(Ke(t)?t[v]:t),o,r,l));return}if(Ls(r)&&!l)return;const n=r.shapeFlag&4?Uu(r.component):r.el,a=l?null:n,{i,r:c}=e,d=t&&t.r,u=i.refs===go?i.refs={}:i.refs,p=i.setupState;if(d!=null&&d!==c&&(ut(d)?(u[d]=null,Pt(p,d)&&(p[d]=null)):Zt(d)&&(d.value=null)),it(c))tn(c,i,12,[a,u]);else{const h=ut(c),v=Zt(c);if(h||v){const m=()=>{if(e.f){const f=h?Pt(p,c)?p[c]:u[c]:c.value;l?Ke(f)&&gf(f,n):Ke(f)?f.includes(n)||f.push(n):h?(u[c]=[n],Pt(p,c)&&(p[c]=u[c])):(c.value=[n],e.k&&(u[e.k]=c.value))}else h?(u[c]=a,Pt(p,c)&&(p[c]=a)):v&&(c.value=a,e.k&&(u[e.k]=a))};a?(m.id=-1,Sr(m,o)):m()}}}const Sr=Mk;function Gk(e){return Xk(e)}function Xk(e,t){const o=Am();o.__VUE__=!0;const{insert:r,remove:l,patchProp:n,createElement:a,createText:i,createComment:c,setText:d,setElementText:u,parentNode:p,nextSibling:h,setScopeId:v=Wt,insertStaticContent:m}=e,f=(ae,pe,ke,Oe=null,we=null,Te=null,Ne=void 0,Ie=null,Ae=!!pe.dynamicChildren)=>{if(ae===pe)return;ae&&!ka(ae,pe)&&(Oe=_e(ae),ne(ae,we,Te,!0),ae=null),pe.patchFlag===-2&&(Ae=!1,pe.dynamicChildren=null);const{type:xe,ref:We,shapeFlag:qe}=pe;switch(xe){case vi:_(ae,pe,ke,Oe);break;case Jo:g(ae,pe,ke,Oe);break;case Hu:ae==null&&y(pe,ke,Oe,Ne);break;case Qe:j(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae);break;default:qe&1?$(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae):qe&6?te(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae):(qe&64||qe&128)&&xe.process(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae,Ce)}We!=null&&we&&Wf(We,ae&&ae.ref,Te,pe||ae,!pe)},_=(ae,pe,ke,Oe)=>{if(ae==null)r(pe.el=i(pe.children),ke,Oe);else{const we=pe.el=ae.el;pe.children!==ae.children&&d(we,pe.children)}},g=(ae,pe,ke,Oe)=>{ae==null?r(pe.el=c(pe.children||""),ke,Oe):pe.el=ae.el},y=(ae,pe,ke,Oe)=>{[ae.el,ae.anchor]=m(ae.children,pe,ke,Oe,ae.el,ae.anchor)},w=({el:ae,anchor:pe},ke,Oe)=>{let we;for(;ae&&ae!==pe;)we=h(ae),r(ae,ke,Oe),ae=we;r(pe,ke,Oe)},x=({el:ae,anchor:pe})=>{let ke;for(;ae&&ae!==pe;)ke=h(ae),l(ae),ae=ke;l(pe)},$=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{pe.type==="svg"?Ne="svg":pe.type==="math"&&(Ne="mathml"),ae==null?T(pe,ke,Oe,we,Te,Ne,Ie,Ae):L(ae,pe,we,Te,Ne,Ie,Ae)},T=(ae,pe,ke,Oe,we,Te,Ne,Ie)=>{let Ae,xe;const{props:We,shapeFlag:qe,transition:ye,dirs:Ye}=ae;if(Ae=ae.el=a(ae.type,Te,We&&We.is,We),qe&8?u(Ae,ae.children):qe&16&&P(ae.children,Ae,null,Oe,we,qf(ae,Te),Ne,Ie),Ye&&wa(ae,null,Oe,"created"),R(Ae,ae,ae.scopeId,Ne,Oe),We){for(const pt in We)pt!=="value"&&!$s(pt)&&n(Ae,pt,null,We[pt],Te,ae.children,Oe,we,de);"value"in We&&n(Ae,"value",null,We.value,Te),(xe=We.onVnodeBeforeMount)&&Ml(xe,Oe,ae)}Ye&&wa(ae,null,Oe,"beforeMount");const tt=Zk(we,ye);tt&&ye.beforeEnter(Ae),r(Ae,pe,ke),((xe=We&&We.onVnodeMounted)||tt||Ye)&&Sr(()=>{xe&&Ml(xe,Oe,ae),tt&&ye.enter(Ae),Ye&&wa(ae,null,Oe,"mounted")},we)},R=(ae,pe,ke,Oe,we)=>{if(ke&&v(ae,ke),Oe)for(let Te=0;Te{for(let xe=Ae;xe{const Ie=pe.el=ae.el;let{patchFlag:Ae,dynamicChildren:xe,dirs:We}=pe;Ae|=ae.patchFlag&16;const qe=ae.props||go,ye=pe.props||go;let Ye;if(ke&&xa(ke,!1),(Ye=ye.onVnodeBeforeUpdate)&&Ml(Ye,ke,pe,ae),We&&wa(pe,ae,ke,"beforeUpdate"),ke&&xa(ke,!0),xe?V(ae.dynamicChildren,xe,Ie,ke,Oe,qf(pe,we),Te):Ne||K(ae,pe,Ie,null,ke,Oe,qf(pe,we),Te,!1),Ae>0){if(Ae&16)B(Ie,pe,qe,ye,ke,Oe,we);else if(Ae&2&&qe.class!==ye.class&&n(Ie,"class",null,ye.class,we),Ae&4&&n(Ie,"style",qe.style,ye.style,we),Ae&8){const tt=pe.dynamicProps;for(let pt=0;pt{Ye&&Ml(Ye,ke,pe,ae),We&&wa(pe,ae,ke,"updated")},Oe)},V=(ae,pe,ke,Oe,we,Te,Ne)=>{for(let Ie=0;Ie{if(ke!==Oe){if(ke!==go)for(const Ie in ke)!$s(Ie)&&!(Ie in Oe)&&n(ae,Ie,ke[Ie],null,Ne,pe.children,we,Te,de);for(const Ie in Oe){if($s(Ie))continue;const Ae=Oe[Ie],xe=ke[Ie];Ae!==xe&&Ie!=="value"&&n(ae,Ie,xe,Ae,Ne,pe.children,we,Te,de)}"value"in Oe&&n(ae,"value",ke.value,Oe.value,Ne)}},j=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{const xe=pe.el=ae?ae.el:i(""),We=pe.anchor=ae?ae.anchor:i("");let{patchFlag:qe,dynamicChildren:ye,slotScopeIds:Ye}=pe;Ye&&(Ie=Ie?Ie.concat(Ye):Ye),ae==null?(r(xe,ke,Oe),r(We,ke,Oe),P(pe.children||[],ke,We,we,Te,Ne,Ie,Ae)):qe>0&&qe&64&&ye&&ae.dynamicChildren?(V(ae.dynamicChildren,ye,ke,we,Te,Ne,Ie),(pe.key!=null||we&&pe===we.subTree)&&Yf(ae,pe,!0)):K(ae,pe,ke,We,we,Te,Ne,Ie,Ae)},te=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{pe.slotScopeIds=Ie,ae==null?pe.shapeFlag&512?we.ctx.activate(pe,ke,Oe,Ne,Ae):J(pe,ke,Oe,we,Te,Ne,Ae):Z(ae,pe,Ae)},J=(ae,pe,ke,Oe,we,Te,Ne)=>{const Ie=ae.component=f9(ae,Oe,we);if(Bu(ae)&&(Ie.ctx.renderer=Ce),h9(Ie),Ie.asyncDep){if(we&&we.registerDep(Ie,H,Ne),!ae.el){const Ae=Ie.subTree=ee(Jo);g(null,Ae,pe,ke)}}else H(Ie,ae,pe,ke,we,Te,Ne)},Z=(ae,pe,ke)=>{const Oe=pe.component=ae.component;if(Sk(ae,pe,ke))if(Oe.asyncDep&&!Oe.asyncResolved){F(Oe,pe,ke);return}else Oe.next=pe,_k(Oe.update),Oe.effect.dirty=!0,Oe.update();else pe.el=ae.el,Oe.vnode=pe},H=(ae,pe,ke,Oe,we,Te,Ne)=>{const Ie=()=>{if(ae.isMounted){let{next:We,bu:qe,u:ye,parent:Ye,vnode:tt}=ae;{const A=Dg(ae);if(A){We&&(We.el=tt.el,F(ae,We,Ne)),A.asyncDep.then(()=>{ae.isUnmounted||Ie()});return}}let pt=We,dt;xa(ae,!1),We?(We.el=tt.el,F(ae,We,Ne)):We=tt,qe&&_u(qe),(dt=We.props&&We.props.onVnodeBeforeUpdate)&&Ml(dt,Ye,We,tt),xa(ae,!0);const Y=Rf(ae),S=ae.subTree;ae.subTree=Y,f(S,Y,p(S.el),_e(S),ae,we,Te),We.el=Y.el,pt===null&&Ek(ae,Y.el),ye&&Sr(ye,we),(dt=We.props&&We.props.onVnodeUpdated)&&Sr(()=>Ml(dt,Ye,We,tt),we)}else{let We;const{el:qe,props:ye}=pe,{bm:Ye,m:tt,parent:pt}=ae,dt=Ls(pe);if(xa(ae,!1),Ye&&_u(Ye),!dt&&(We=ye&&ye.onVnodeBeforeMount)&&Ml(We,pt,pe),xa(ae,!0),qe&&De){const Y=()=>{ae.subTree=Rf(ae),De(qe,ae.subTree,ae,we,null)};dt?pe.type.__asyncLoader().then(()=>!ae.isUnmounted&&Y()):Y()}else{const Y=ae.subTree=Rf(ae);f(null,Y,ke,Oe,ae,we,Te),pe.el=Y.el}if(tt&&Sr(tt,we),!dt&&(We=ye&&ye.onVnodeMounted)){const Y=pe;Sr(()=>Ml(We,pt,Y),we)}(pe.shapeFlag&256||pt&&Ls(pt.vnode)&&pt.vnode.shapeFlag&256)&&ae.a&&Sr(ae.a,we),ae.isMounted=!0,pe=ke=Oe=null}},Ae=ae.effect=new Cf(Ie,Wt,()=>Pf(xe),ae.scope),xe=ae.update=()=>{Ae.dirty&&Ae.run()};xe.id=ae.uid,xa(ae,!0),xe()},F=(ae,pe,ke)=>{pe.component=ae;const Oe=ae.vnode.props;ae.vnode=pe,ae.next=null,Uk(ae,pe.props,Oe,ke),Yk(ae,pe.children,ke),Jl(),dg(ae),Ql()},K=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae=!1)=>{const xe=ae&&ae.children,We=ae?ae.shapeFlag:0,qe=pe.children,{patchFlag:ye,shapeFlag:Ye}=pe;if(ye>0){if(ye&128){U(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae);return}else if(ye&256){I(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae);return}}Ye&8?(We&16&&de(xe,we,Te),qe!==xe&&u(ke,qe)):We&16?Ye&16?U(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae):de(xe,we,Te,!0):(We&8&&u(ke,""),Ye&16&&P(qe,ke,Oe,we,Te,Ne,Ie,Ae))},I=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{ae=ae||ii,pe=pe||ii;const xe=ae.length,We=pe.length,qe=Math.min(xe,We);let ye;for(ye=0;yeWe?de(ae,we,Te,!0,!1,qe):P(pe,ke,Oe,we,Te,Ne,Ie,Ae,qe)},U=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{let xe=0;const We=pe.length;let qe=ae.length-1,ye=We-1;for(;xe<=qe&&xe<=ye;){const Ye=ae[xe],tt=pe[xe]=Ae?Vn(pe[xe]):$l(pe[xe]);if(ka(Ye,tt))f(Ye,tt,ke,null,we,Te,Ne,Ie,Ae);else break;xe++}for(;xe<=qe&&xe<=ye;){const Ye=ae[qe],tt=pe[ye]=Ae?Vn(pe[ye]):$l(pe[ye]);if(ka(Ye,tt))f(Ye,tt,ke,null,we,Te,Ne,Ie,Ae);else break;qe--,ye--}if(xe>qe){if(xe<=ye){const Ye=ye+1,tt=Yeye)for(;xe<=qe;)ne(ae[xe],we,Te,!0),xe++;else{const Ye=xe,tt=xe,pt=new Map;for(xe=tt;xe<=ye;xe++){const ge=pe[xe]=Ae?Vn(pe[xe]):$l(pe[xe]);ge.key!=null&&pt.set(ge.key,xe)}let dt,Y=0;const S=ye-tt+1;let A=!1,G=0;const X=new Array(S);for(xe=0;xe=S){ne(ge,we,Te,!0);continue}let fe;if(ge.key!=null)fe=pt.get(ge.key);else for(dt=tt;dt<=ye;dt++)if(X[dt-tt]===0&&ka(ge,pe[dt])){fe=dt;break}fe===void 0?ne(ge,we,Te,!0):(X[fe-tt]=xe+1,fe>=G?G=fe:A=!0,f(ge,pe[fe],ke,null,we,Te,Ne,Ie,Ae),Y++)}const re=A?Jk(X):ii;for(dt=re.length-1,xe=S-1;xe>=0;xe--){const ge=tt+xe,fe=pe[ge],Fe=ge+1{const{el:Te,type:Ne,transition:Ie,children:Ae,shapeFlag:xe}=ae;if(xe&6){oe(ae.component.subTree,pe,ke,Oe);return}if(xe&128){ae.suspense.move(pe,ke,Oe);return}if(xe&64){Ne.move(ae,pe,ke,Ce);return}if(Ne===Qe){r(Te,pe,ke);for(let qe=0;qeIe.enter(Te),we);else{const{leave:qe,delayLeave:ye,afterLeave:Ye}=Ie,tt=()=>r(Te,pe,ke),pt=()=>{qe(Te,()=>{tt(),Ye&&Ye()})};ye?ye(Te,tt,pt):pt()}else r(Te,pe,ke)},ne=(ae,pe,ke,Oe=!1,we=!1)=>{const{type:Te,props:Ne,ref:Ie,children:Ae,dynamicChildren:xe,shapeFlag:We,patchFlag:qe,dirs:ye,memoIndex:Ye}=ae;if(qe===-2&&(we=!1),Ie!=null&&Wf(Ie,null,ke,ae,!0),Ye!=null&&(pe.renderCache[Ye]=void 0),We&256){pe.ctx.deactivate(ae);return}const tt=We&1&&ye,pt=!Ls(ae);let dt;if(pt&&(dt=Ne&&Ne.onVnodeBeforeUnmount)&&Ml(dt,pe,ae),We&6)Me(ae.component,ke,Oe);else{if(We&128){ae.suspense.unmount(ke,Oe);return}tt&&wa(ae,null,pe,"beforeUnmount"),We&64?ae.type.remove(ae,pe,ke,Ce,Oe):xe&&(Te!==Qe||qe>0&&qe&64)?de(xe,pe,ke,!1,!0):(Te===Qe&&qe&384||!we&&We&16)&&de(Ae,pe,ke),Oe&&ce(ae)}(pt&&(dt=Ne&&Ne.onVnodeUnmounted)||tt)&&Sr(()=>{dt&&Ml(dt,pe,ae),tt&&wa(ae,null,pe,"unmounted")},ke)},ce=ae=>{const{type:pe,el:ke,anchor:Oe,transition:we}=ae;if(pe===Qe){Q(ke,Oe);return}if(pe===Hu){x(ae);return}const Te=()=>{l(ke),we&&!we.persisted&&we.afterLeave&&we.afterLeave()};if(ae.shapeFlag&1&&we&&!we.persisted){const{leave:Ne,delayLeave:Ie}=we,Ae=()=>Ne(ke,Te);Ie?Ie(ae.el,Te,Ae):Ae()}else Te()},Q=(ae,pe)=>{let ke;for(;ae!==pe;)ke=h(ae),l(ae),ae=ke;l(pe)},Me=(ae,pe,ke)=>{const{bum:Oe,scope:we,update:Te,subTree:Ne,um:Ie,m:Ae,a:xe}=ae;Hg(Ae),Hg(xe),Oe&&_u(Oe),we.stop(),Te&&(Te.active=!1,ne(Ne,ae,pe,ke)),Ie&&Sr(Ie,pe),Sr(()=>{ae.isUnmounted=!0},pe),pe&&pe.pendingBranch&&!pe.isUnmounted&&ae.asyncDep&&!ae.asyncResolved&&ae.suspenseId===pe.pendingId&&(pe.deps--,pe.deps===0&&pe.resolve())},de=(ae,pe,ke,Oe=!1,we=!1,Te=0)=>{for(let Ne=Te;Neae.shapeFlag&6?_e(ae.component.subTree):ae.shapeFlag&128?ae.suspense.next():h(ae.anchor||ae.el);let me=!1;const Re=(ae,pe,ke)=>{ae==null?pe._vnode&&ne(pe._vnode,null,null,!0):f(pe._vnode||null,ae,pe,null,null,null,ke),me||(me=!0,dg(),pg(),me=!1),pe._vnode=ae},Ce={p:f,um:ne,m:oe,r:ce,mt:J,mc:P,pc:K,pbc:V,n:_e,o:e};let Ee,De;return{render:Re,hydrate:Ee,createApp:Fk(Re,Ee)}}function qf({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function xa({effect:e,update:t},o){e.allowRecurse=t.allowRecurse=o}function Zk(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yf(e,t,o=!1){const r=e.children,l=t.children;if(Ke(r)&&Ke(l))for(let n=0;n>1,e[o[i]]0&&(t[r]=o[n-1]),o[n]=r)}}for(n=o.length,a=o[n-1];n-- >0;)o[n]=a,a=t[a];return o}function Dg(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Dg(t)}function Hg(e){if(e)for(let t=0;tGe(Qk);function Go(e,t){return Gf(e,null,t)}const Lu={};function Se(e,t,o){return Gf(e,t,o)}function Gf(e,t,{immediate:o,deep:r,flush:l,once:n,onTrack:a,onTrigger:i}=go){if(t&&n){const T=t;t=(...R)=>{T(...R),$()}}const c=Xo,d=T=>r===!0?T:Ln(T,r===!1?1:void 0);let u,p=!1,h=!1;if(Zt(e)?(u=()=>e.value,p=Mu(e)):ba(e)?(u=()=>d(e),p=!0):Ke(e)?(h=!0,p=e.some(T=>ba(T)||Mu(T)),u=()=>e.map(T=>{if(Zt(T))return T.value;if(ba(T))return d(T);if(it(T))return tn(T,c,2)})):it(e)?t?u=()=>tn(e,c,2):u=()=>(v&&v(),jr(e,c,3,[m])):u=Wt,t&&r){const T=u;u=()=>Ln(T())}let v,m=T=>{v=w.onStop=()=>{tn(T,c,4),v=w.onStop=void 0}},f;if(Ku)if(m=Wt,t?o&&jr(t,c,3,[u(),h?[]:void 0,m]):u(),l==="sync"){const T=e9();f=T.__watcherHandles||(T.__watcherHandles=[])}else return Wt;let _=h?new Array(e.length).fill(Lu):Lu;const g=()=>{if(!(!w.active||!w.dirty))if(t){const T=w.run();(r||p||(h?T.some((R,P)=>zn(R,_[P])):zn(T,_)))&&(v&&v(),jr(t,c,3,[T,_===Lu?void 0:h&&_[0]===Lu?[]:_,m]),_=T)}else w.run()};g.allowRecurse=!!t;let y;l==="sync"?y=g:l==="post"?y=()=>Sr(g,c&&c.suspense):(g.pre=!0,c&&(g.id=c.uid),y=()=>Pf(g));const w=new Cf(u,Wt,y),x=xf(),$=()=>{w.stop(),x&&gf(x.effects,w)};return t?o?g():_=w.run():l==="post"?Sr(w.run.bind(w),c&&c.suspense):w.run(),f&&f.push($),$}function t9(e,t,o){const r=this.proxy,l=ut(e)?e.includes(".")?Fg(r,e):()=>r[e]:e.bind(r,r);let n;it(t)?n=t:(n=t.handler,o=t);const a=Ks(this),i=Gf(l,n.bind(r),o);return a(),i}function Fg(e,t){const o=t.split(".");return()=>{let r=e;for(let l=0;l{Ln(r,t,o)});else if(gu(e)){for(const r in e)Ln(e[r],t,o);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ln(e[r],t,o)}return e}const Bu=e=>e.type.__isKeepAlive;function o9(e,t){Kg(e,"a",t)}function jg(e,t){Kg(e,"da",t)}function Kg(e,t,o=Xo){const r=e.__wdc||(e.__wdc=()=>{let l=o;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(Nu(t,r,o),o){let l=o.parent;for(;l&&l.parent;)Bu(l.parent.vnode)&&r9(r,t,o,l),l=l.parent}}function r9(e,t,o,r){const l=Nu(t,e,r,!0);Rn(()=>{gf(r[t],l)},o)}const Bn=Symbol("_leaveCb"),Vu=Symbol("_enterCb");function Ug(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ft(()=>{e.isMounted=!0}),to(()=>{e.isUnmounting=!0}),e}const Kr=[Function,Array],Wg={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Kr,onEnter:Kr,onAfterEnter:Kr,onEnterCancelled:Kr,onBeforeLeave:Kr,onLeave:Kr,onAfterLeave:Kr,onLeaveCancelled:Kr,onBeforeAppear:Kr,onAppear:Kr,onAfterAppear:Kr,onAppearCancelled:Kr},qg=e=>{const t=e.subTree;return t.component?qg(t.component):t},l9={name:"BaseTransition",props:Wg,setup(e,{slots:t}){const o=wt(),r=Ug();return()=>{const l=t.default&&Zf(t.default(),!0);if(!l||!l.length)return;let n=l[0];if(l.length>1){for(const h of l)if(h.type!==Jo){n=h;break}}const a=jt(e),{mode:i}=a;if(r.isLeaving)return Xf(n);const c=Gg(n);if(!c)return Xf(n);let d=Ds(c,a,r,o,h=>d=h);fi(c,d);const u=o.subTree,p=u&&Gg(u);if(p&&p.type!==Jo&&!ka(c,p)&&qg(o).type!==Jo){const h=Ds(p,a,r,o);if(fi(p,h),i==="out-in"&&c.type!==Jo)return r.isLeaving=!0,h.afterLeave=()=>{r.isLeaving=!1,o.update.active!==!1&&(o.effect.dirty=!0,o.update())},Xf(n);i==="in-out"&&c.type!==Jo&&(h.delayLeave=(v,m,f)=>{const _=Yg(r,p);_[String(p.key)]=p,v[Bn]=()=>{m(),v[Bn]=void 0,delete d.delayedLeave},d.delayedLeave=f})}return n}}};function Yg(e,t){const{leavingVNodes:o}=e;let r=o.get(t.type);return r||(r=Object.create(null),o.set(t.type,r)),r}function Ds(e,t,o,r,l){const{appear:n,mode:a,persisted:i=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:h,onLeave:v,onAfterLeave:m,onLeaveCancelled:f,onBeforeAppear:_,onAppear:g,onAfterAppear:y,onAppearCancelled:w}=t,x=String(e.key),$=Yg(o,e),T=(L,V)=>{L&&jr(L,r,9,V)},R=(L,V)=>{const B=V[1];T(L,V),Ke(L)?L.every(j=>j.length<=1)&&B():L.length<=1&&B()},P={mode:a,persisted:i,beforeEnter(L){let V=c;if(!o.isMounted)if(n)V=_||c;else return;L[Bn]&&L[Bn](!0);const B=$[x];B&&ka(e,B)&&B.el[Bn]&&B.el[Bn](),T(V,[L])},enter(L){let V=d,B=u,j=p;if(!o.isMounted)if(n)V=g||d,B=y||u,j=w||p;else return;let te=!1;const J=L[Vu]=Z=>{te||(te=!0,Z?T(j,[L]):T(B,[L]),P.delayedLeave&&P.delayedLeave(),L[Vu]=void 0)};V?R(V,[L,J]):J()},leave(L,V){const B=String(e.key);if(L[Vu]&&L[Vu](!0),o.isUnmounting)return V();T(h,[L]);let j=!1;const te=L[Bn]=J=>{j||(j=!0,V(),J?T(f,[L]):T(m,[L]),L[Bn]=void 0,$[B]===e&&delete $[B])};$[B]=e,v?R(v,[L,te]):te()},clone(L){const V=Ds(L,t,o,r,l);return l&&l(V),V}};return P}function Xf(e){if(Bu(e))return e=nn(e),e.children=null,e}function Gg(e){if(!Bu(e))return e;const{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&it(o.default))return o.default()}}function fi(e,t){e.shapeFlag&6&&e.component?fi(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Zf(e,t=!1,o){let r=[],l=0;for(let n=0;n1)for(let n=0;ne.__isTeleport,Hs=e=>e&&(e.disabled||e.disabled===""),Xg=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Zg=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Jf=(e,t)=>{const o=e&&e.to;return ut(o)?t?t(o):null:o},a9={name:"Teleport",__isTeleport:!0,process(e,t,o,r,l,n,a,i,c,d){const{mc:u,pc:p,pbc:h,o:{insert:v,querySelector:m,createText:f,createComment:_}}=d,g=Hs(t.props);let{shapeFlag:y,children:w,dynamicChildren:x}=t;if(e==null){const $=t.el=f(""),T=t.anchor=f("");v($,o,r),v(T,o,r);const R=t.target=Jf(t.props,m),P=t.targetAnchor=f("");R&&(v(P,R),a==="svg"||Xg(R)?a="svg":(a==="mathml"||Zg(R))&&(a="mathml"));const L=(V,B)=>{y&16&&u(w,V,B,l,n,a,i,c)};g?L(o,T):R&&L(R,P)}else{t.el=e.el;const $=t.anchor=e.anchor,T=t.target=e.target,R=t.targetAnchor=e.targetAnchor,P=Hs(e.props),L=P?o:T,V=P?$:R;if(a==="svg"||Xg(T)?a="svg":(a==="mathml"||Zg(T))&&(a="mathml"),x?(h(e.dynamicChildren,x,L,l,n,a,i),Yf(e,t,!0)):c||p(e,t,L,V,l,n,a,i,!1),g)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Du(t,o,$,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=t.target=Jf(t.props,m);B&&Du(t,B,null,d,0)}else P&&Du(t,T,R,d,1)}Jg(t)},remove(e,t,o,{um:r,o:{remove:l}},n){const{shapeFlag:a,children:i,anchor:c,targetAnchor:d,target:u,props:p}=e;if(u&&l(d),n&&l(c),a&16){const h=n||!Hs(p);for(let v=0;v0?sl||ii:null,s9(),js>0&&sl&&sl.push(e),e}function M(e,t,o,r,l,n){return e1(E(e,t,o,r,l,n,!0))}function he(e,t,o,r,l){return e1(ee(e,t,o,r,l,!0))}function io(e){return e?e.__v_isVNode===!0:!1}function ka(e,t){return e.type===t.type&&e.key===t.key}const t1=({key:e})=>e??null,Fu=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?ut(e)||Zt(e)||it(e)?{i:Vo,r:e,k:t,f:!!o}:e:null);function E(e,t=null,o=null,r=0,l=null,n=e===Qe?0:1,a=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&t1(t),ref:t&&Fu(t),scopeId:vg,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:r,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Vo};return i?(Qf(c,o),n&128&&e.normalize(c)):o&&(c.shapeFlag|=ut(o)?8:16),js>0&&!a&&sl&&(c.patchFlag>0||n&6)&&c.patchFlag!==32&&sl.push(c),c}const ee=c9;function c9(e,t=null,o=null,r=0,l=null,n=!1){if((!e||e===gg)&&(e=Jo),io(e)){const i=nn(e,t,!0);return o&&Qf(i,o),js>0&&!n&&sl&&(i.shapeFlag&6?sl[sl.indexOf(e)]=i:sl.push(i)),i.patchFlag=-2,i}if(_9(e)&&(e=e.__vccOpts),t){t=mi(t);let{class:i,style:c}=t;i&&!ut(i)&&(t.class=O(i)),xt(c)&&(rg(c)&&!Ke(c)&&(c=$o({},c)),t.style=Je(c))}const a=ut(e)?1:$k(e)?128:n9(e)?64:xt(e)?4:it(e)?2:0;return E(e,t,o,r,l,a,n,!0)}function mi(e){return e?rg(e)||Ag(e)?$o({},e):e:null}function nn(e,t,o=!1,r=!1){const{props:l,ref:n,patchFlag:a,children:i,transition:c}=e,d=t?Mt(l||{},t):l,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&t1(d),ref:t&&t.ref?o&&n?Ke(n)?n.concat(Fu(t)):[n,Fu(t)]:Fu(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Qe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&nn(e.ssContent),ssFallback:e.ssFallback&&nn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&fi(u,c.clone(u)),u}function Ct(e=" ",t=0){return ee(vi,null,e,t)}function u9(e,t){const o=ee(Hu,null,e);return o.staticCount=t,o}function se(e="",t=!1){return t?(b(),he(Jo,null,e)):ee(Jo,null,e)}function $l(e){return e==null||typeof e=="boolean"?ee(Jo):Ke(e)?ee(Qe,null,e.slice()):typeof e=="object"?Vn(e):ee(vi,null,String(e))}function Vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:nn(e)}function Qf(e,t){let o=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ke(t))o=16;else if(typeof t=="object")if(r&65){const l=t.default;l&&(l._c&&(l._d=!1),Qf(e,l()),l._c&&(l._d=!0));return}else{o=32;const l=t._;!l&&!Ag(t)?t._ctx=Vo:l===3&&Vo&&(Vo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:Vo},o=32):(t=String(t),r&64?(o=16,t=[Ct(t)]):o=8);e.children=t,e.shapeFlag|=o}function Mt(...e){const t={};for(let o=0;oXo||Vo;let ju,e0;{const e=Am(),t=(o,r)=>{let l;return(l=e[o])||(l=e[o]=[]),l.push(r),n=>{l.length>1?l.forEach(a=>a(n)):l[0](n)}};ju=t("__VUE_INSTANCE_SETTERS__",o=>Xo=o),e0=t("__VUE_SSR_SETTERS__",o=>Ku=o)}const Ks=e=>{const t=Xo;return ju(e),e.scope.on(),()=>{e.scope.off(),ju(t)}},o1=()=>{Xo&&Xo.scope.off(),ju(null)};function r1(e){return e.vnode.shapeFlag&4}let Ku=!1;function h9(e,t=!1){t&&e0(t);const{props:o,children:r}=e.vnode,l=r1(e);Kk(e,o,l,t),qk(e,r);const n=l?v9(e,t):void 0;return t&&e0(!1),n}function v9(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pk);const{setup:r}=o;if(r){const l=e.setupContext=r.length>1?i1(e):null,n=Ks(e);Jl();const a=tn(r,e,0,[e.props,l]);if(Ql(),n(),Es(a)){if(a.then(o1,o1),t)return a.then(i=>{l1(e,i,t)}).catch(i=>{Au(i,e,0)});e.asyncDep=a}else l1(e,a,t)}else a1(e,t)}function l1(e,t,o){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xt(t)&&(e.setupState=ag(t)),a1(e,o)}let n1;function a1(e,t,o){const r=e.type;if(!e.render){if(!t&&n1&&!r.render){const l=r.template||Ff(e).template;if(l){const{isCustomElement:n,compilerOptions:a}=e.appContext.config,{delimiters:i,compilerOptions:c}=r,d=$o($o({isCustomElement:n,delimiters:i},a),c);r.render=n1(l,d)}}e.render=r.render||Wt}{const l=Ks(e);Jl();try{Rk(e)}finally{Ql(),l()}}}const m9={get(e,t){return Cr(e,"get",""),e[t]}};function i1(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,m9),slots:e.slots,emit:e.emit,expose:t}}function Uu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ag(Nn(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Bs)return Bs[o](e)},has(t,o){return o in t||o in Bs}})):e.proxy}const g9=/(?:^|[-_])(\w)/g,b9=e=>e.replace(g9,t=>t.toUpperCase()).replace(/[-_]/g,"");function s1(e,t=!0){return it(e)?e.displayName||e.name:e.name||t&&e.__name}function c1(e,t,o=!1){let r=s1(t);if(!r&&t.__file){const l=t.__file.match(/([^/\\]+)\.\w+$/);l&&(r=l[1])}if(!r&&e&&e.parent){const l=n=>{for(const a in n)if(n[a]===t)return a};r=l(e.components||e.parent.type.components)||l(e.appContext.components)}return r?b9(r):o?"App":"Anonymous"}function _9(e){return it(e)&&"__vccOpts"in e}const C=(e,t)=>ak(e,t,Ku);function rt(e,t,o){const r=arguments.length;return r===2?xt(t)&&!Ke(t)?io(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&io(o)&&(o=[o]),ee(e,t,o))}const w9="3.4.31",y9=Wt;/** +`,...fk(l)),console.warn(...n)}Ql()}function pk(){let e=Ns[Ns.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function fk(e){const t=[];return e.forEach((o,r)=>{t.push(...r===0?[]:[` +`],...hk(o))}),t}function hk({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,l=` at <${s1(e.component,e.type,r)}`,n=">"+o;return e.props?[l,...vk(e.props),n]:[l+n]}function vk(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach(r=>{t.push(...ig(r,e[r]))}),o.length>3&&t.push(" ..."),t}function ig(e,t,o){return ut(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:Zt(t)?(t=ig(e,Kt(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):it(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Kt(t),o?t:[`${e}=`,t])}function tn(e,t,o,r){try{return r?e(...r):e()}catch(l){Mu(l,t,o)}}function jr(e,t,o,r){if(it(e)){const l=tn(e,t,o,r);return l&&Es(l)&&l.catch(n=>{Mu(n,t,o)}),l}if(Ke(e)){const l=[];for(let n=0;n>>1,l=lr[r],n=Rs(l);nTl&&lr.splice(t,1)}function _k(e){Ke(e)?di.push(...e):(!Pn||!Pn.includes(e,e.allowRecurse?_a+1:_a))&&di.push(e),cg()}function ug(e,t,o=Ps?Tl+1:0){for(;oRs(o)-Rs(r));if(di.length=0,Pn){Pn.push(...t);return}for(Pn=t,_a=0;_ae.id==null?1/0:e.id,wk=(e,t)=>{const o=Rs(e)-Rs(t);if(o===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function pg(e){If=!1,Ps=!0,lr.sort(wk);try{for(Tl=0;Tlut(v)?v.trim():v)),p&&(l=o.map(bf))}let i,c=r[i=As(t)]||r[i=As(Fr(t))];!c&&n&&(c=r[i=As(An(t))]),c&&jr(c,e,6,l);const d=r[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,jr(d,e,6,l)}}function fg(e,t,o=!1){const r=t.emitsCache,l=r.get(e);if(l!==void 0)return l;const n=e.emits;let a={},i=!1;if(!it(e)){const c=d=>{const u=fg(d,t,!0);u&&(i=!0,$o(a,u))};!o&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!n&&!i?(xt(e)&&r.set(e,null),null):(Ke(n)?n.forEach(c=>a[c]=null):$o(a,n),xt(e)&&r.set(e,a),a)}function Au(e,t){return!e||!fu(t)?!1:(t=t.slice(2).replace(/Once$/,""),Pt(e,t[0].toLowerCase()+t.slice(1))||Pt(e,An(t))||Pt(e,t))}let Vo=null,hg=null;function zu(e){const t=Vo;return Vo=e,hg=e&&e.type.__scopeId||null,t}function le(e,t=Vo,o){if(!t||e._n)return e;const r=(...l)=>{r._d&&Jg(-1);const n=zu(t);let a;try{a=e(...l)}finally{zu(n),r._d&&Jg(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Wpe(){}function Pf(e){const{type:t,vnode:o,proxy:r,withProxy:l,propsOptions:[n],slots:a,attrs:i,emit:c,render:d,renderCache:u,props:p,data:h,setupState:v,ctx:m,inheritAttrs:f}=e,_=zu(e);let g,y;try{if(o.shapeFlag&4){const x=l||r,$=x;g=$l(d.call($,x,u,p,v,h,m)),y=i}else{const x=t;g=$l(x.length>1?x(p,{attrs:i,slots:a,emit:c}):x(p,null)),y=t.props?i:xk(i)}}catch(x){Fs.length=0,Mu(x,e,1),g=te(Jo)}let w=g;if(y&&f!==!1){const x=Object.keys(y),{shapeFlag:$}=w;x.length&&$&7&&(n&&x.some(vf)&&(y=kk(y,n)),w=nn(w,y,!1,!0))}return o.dirs&&(w=nn(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(o.dirs):o.dirs),o.transition&&(w.transition=o.transition),g=w,zu(_),g}const xk=e=>{let t;for(const o in e)(o==="class"||o==="style"||fu(o))&&((t||(t={}))[o]=e[o]);return t},kk=(e,t)=>{const o={};for(const r in e)(!vf(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function Ck(e,t,o){const{props:r,children:l,component:n}=e,{props:a,children:i,patchFlag:c}=t,d=n.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&c>=0){if(c&1024)return!0;if(c&16)return r?vg(r,a,d):!!a;if(c&8){const u=t.dynamicProps;for(let p=0;pe.__isSuspense;function $k(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):_k(e)}function Ou(e,t,o=Xo,r=!1){if(o){const l=o[e]||(o[e]=[]),n=t.__weh||(t.__weh=(...a)=>{Jl();const i=Ks(o),c=jr(t,o,e,a);return i(),Ql(),c});return r?l.unshift(n):l.push(n),n}}const on=e=>(t,o=Xo)=>{(!ju||e==="sp")&&Ou(e,(...r)=>t(...r),o)},Nu=on("bm"),ft=on("m"),bg=on("bu"),rn=on("u"),to=on("bum"),Rn=on("um"),Mk=on("sp"),Ak=on("rtg"),zk=on("rtc");function Ik(e,t=Xo){Ou("ec",e,t)}function mt(e,t){if(Vo===null)return e;const o=Ku(Vo),r=e.dirs||(e.dirs=[]);for(let l=0;lt(a,i,void 0,n));else{const a=Object.keys(e);l=new Array(a.length);for(let i=0,c=a.length;i{const n=r.fn(...l);return n&&(n.key=r.key),n}:r.fn)}return e}/*! #__NO_SIDE_EFFECTS__ */function N(e,t){return it(e)?$o({name:e.name},t,{setup:e}):e}const Ls=e=>!!e.type.__asyncLoader;function be(e,t,o={},r,l){if(Vo.isCE||Vo.parent&&Ls(Vo.parent)&&Vo.parent.isCE)return t!=="default"&&(o.name=t),te("slot",o,r&&r());let n=e[t];n&&n._c&&(n._d=!1),b();const a=n&&_g(n(o)),i=he(Qe,{key:o.key||a&&a.key||`_${t}`},a||(r?r():[]),a&&e._===1?64:-2);return i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),n&&n._c&&(n._d=!0),i}function _g(e){return e.some(t=>io(t)?!(t.type===Jo||t.type===Qe&&!_g(t.children)):!0)?e:null}function Ok(e,t){const o={};for(const r in e)o[As(r)]=e[r];return o}const Bf=e=>e?o1(e)?Ku(e):Bf(e.parent):null,Bs=$o(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Bf(e.parent),$root:e=>Bf(e.root),$emit:e=>e.emit,$options:e=>Hf(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Nf(e.update)}),$nextTick:e=>e.n||(e.n=et.bind(e.proxy)),$watch:e=>e9.bind(e)}),Vf=(e,t)=>e!==bo&&!e.__isScriptSetup&&Pt(e,t),Nk={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:r,data:l,props:n,accessCache:a,type:i,appContext:c}=e;let d;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return l[t];case 4:return o[t];case 3:return n[t]}else{if(Vf(r,t))return a[t]=1,r[t];if(l!==bo&&Pt(l,t))return a[t]=2,l[t];if((d=e.propsOptions[0])&&Pt(d,t))return a[t]=3,n[t];if(o!==bo&&Pt(o,t))return a[t]=4,o[t];Df&&(a[t]=0)}}const u=Bs[t];let p,h;if(u)return t==="$attrs"&&Cr(e.attrs,"get",""),u(e);if((p=i.__cssModules)&&(p=p[t]))return p;if(o!==bo&&Pt(o,t))return a[t]=4,o[t];if(h=c.config.globalProperties,Pt(h,t))return h[t]},set({_:e},t,o){const{data:r,setupState:l,ctx:n}=e;return Vf(l,t)?(l[t]=o,!0):r!==bo&&Pt(r,t)?(r[t]=o,!0):Pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(n[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:l,propsOptions:n}},a){let i;return!!o[a]||e!==bo&&Pt(e,a)||Vf(t,a)||(i=n[0])&&Pt(i,a)||Pt(r,a)||Pt(Bs,a)||Pt(l.config.globalProperties,a)},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Pt(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Do(){return wg().slots}function ya(){return wg().attrs}function wg(){const e=wt();return e.setupContext||(e.setupContext=a1(e))}function yg(e){return Ke(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}let Df=!0;function Pk(e){const t=Hf(e),o=e.proxy,r=e.ctx;Df=!1,t.beforeCreate&&xg(t.beforeCreate,e,"bc");const{data:l,computed:n,methods:a,watch:i,provide:c,inject:d,created:u,beforeMount:p,mounted:h,beforeUpdate:v,updated:m,activated:f,deactivated:_,beforeDestroy:g,beforeUnmount:y,destroyed:w,unmounted:x,render:$,renderTracked:T,renderTriggered:L,errorCaptured:P,serverPrefetch:R,expose:V,inheritAttrs:B,components:F,directives:Q,filters:J}=t;if(d&&Rk(d,r,null),a)for(const j in a){const K=a[j];it(K)&&(r[j]=K.bind(o))}if(l){const j=l.call(o,o);xt(j)&&(e.data=Dt(j))}if(Df=!0,n)for(const j in n){const K=n[j],I=it(K)?K.bind(o,o):it(K.get)?K.get.bind(o,o):qt,U=!it(K)&&it(K.set)?K.set.bind(o):qt,oe=C({get:I,set:U});Object.defineProperty(r,j,{enumerable:!0,configurable:!0,get:()=>oe.value,set:ne=>oe.value=ne})}if(i)for(const j in i)kg(i[j],r,o,j);if(c){const j=it(c)?c.call(o):c;Reflect.ownKeys(j).forEach(K=>{zt(K,j[K])})}u&&xg(u,e,"c");function H(j,K){Ke(K)?K.forEach(I=>j(I.bind(o))):K&&j(K.bind(o))}if(H(Nu,p),H(ft,h),H(bg,v),H(rn,m),H(t9,f),H(Fg,_),H(Ik,P),H(zk,T),H(Ak,L),H(to,y),H(Rn,x),H(Mk,R),Ke(V))if(V.length){const j=e.exposed||(e.exposed={});V.forEach(K=>{Object.defineProperty(j,K,{get:()=>o[K],set:I=>o[K]=I})})}else e.exposed||(e.exposed={});$&&e.render===qt&&(e.render=$),B!=null&&(e.inheritAttrs=B),F&&(e.components=F),Q&&(e.directives=Q)}function Rk(e,t,o=qt){Ke(e)&&(e=Ff(e));for(const r in e){const l=e[r];let n;xt(l)?"default"in l?n=Ge(l.from||r,l.default,!0):n=Ge(l.from||r):n=Ge(l),Zt(n)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[r]=n}}function xg(e,t,o){jr(Ke(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function kg(e,t,o,r){const l=r.includes(".")?Hg(o,r):()=>o[r];if(ut(e)){const n=t[e];it(n)&&Se(l,n)}else if(it(e))Se(l,e.bind(o));else if(xt(e))if(Ke(e))e.forEach(n=>kg(n,t,o,r));else{const n=it(e.handler)?e.handler.bind(o):t[e.handler];it(n)&&Se(l,n,e)}}function Hf(e){const t=e.type,{mixins:o,extends:r}=t,{mixins:l,optionsCache:n,config:{optionMergeStrategies:a}}=e.appContext,i=n.get(t);let c;return i?c=i:!l.length&&!o&&!r?c=t:(c={},l.length&&l.forEach(d=>Pu(c,d,a,!0)),Pu(c,t,a)),xt(t)&&n.set(t,c),c}function Pu(e,t,o,r=!1){const{mixins:l,extends:n}=t;n&&Pu(e,n,o,!0),l&&l.forEach(a=>Pu(e,a,o,!0));for(const a in t)if(!(r&&a==="expose")){const i=Lk[a]||o&&o[a];e[a]=i?i(e[a],t[a]):t[a]}return e}const Lk={data:Cg,props:Sg,emits:Sg,methods:Vs,computed:Vs,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:Vs,directives:Vs,watch:Vk,provide:Cg,inject:Bk};function Cg(e,t){return t?e?function(){return $o(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function Bk(e,t){return Vs(Ff(e),Ff(t))}function Ff(e){if(Ke(e)){const t={};for(let o=0;o1)return o&&it(t)?t.call(r&&r.proxy):t}}function Fk(){return!!(Xo||Vo||pi)}const Tg={},$g=()=>Object.create(Tg),Mg=e=>Object.getPrototypeOf(e)===Tg;function jk(e,t,o,r=!1){const l={},n=$g();e.propsDefaults=Object.create(null),Ag(e,t,l,n);for(const a in e.propsOptions[0])a in l||(l[a]=void 0);o?e.props=r?l:tg(l):e.type.props?e.props=l:e.props=n,e.attrs=n}function Kk(e,t,o,r){const{props:l,attrs:n,vnode:{patchFlag:a}}=e,i=Kt(l),[c]=e.propsOptions;let d=!1;if((r||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[h,v]=zg(p,t,!0);$o(a,h),v&&i.push(...v)};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!n&&!c)return xt(e)&&r.set(e,ii),ii;if(Ke(n))for(let u=0;u-1,v[1]=f<0||m-1||Pt(v,"default"))&&i.push(p)}}}const d=[a,i];return xt(e)&&r.set(e,d),d}function Ig(e){return e[0]!=="$"&&!$s(e)}function Og(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Ng(e,t){return Og(e)===Og(t)}function Pg(e,t){return Ke(t)?t.findIndex(o=>Ng(o,e)):it(t)&&Ng(t,e)?0:-1}const Rg=e=>e[0]==="_"||e==="$stable",Kf=e=>Ke(e)?e.map($l):[$l(e)],Uk=(e,t,o)=>{if(t._n)return t;const r=le((...l)=>Kf(t(...l)),o);return r._c=!1,r},Lg=(e,t,o)=>{const r=e._ctx;for(const l in e){if(Rg(l))continue;const n=e[l];if(it(n))t[l]=Uk(l,n,r);else if(n!=null){const a=Kf(n);t[l]=()=>a}}},Bg=(e,t)=>{const o=Kf(t);e.slots.default=()=>o},Wk=(e,t)=>{const o=e.slots=$g();if(e.vnode.shapeFlag&32){const r=t._;r?($o(o,t),Tm(o,"_",r,!0)):Lg(t,o)}else t&&Bg(e,t)},qk=(e,t,o)=>{const{vnode:r,slots:l}=e;let n=!0,a=bo;if(r.shapeFlag&32){const i=t._;i?o&&i===1?n=!1:($o(l,t),!o&&i===1&&delete l._):(n=!t.$stable,Lg(t,l)),a=t}else t&&(Bg(e,t),a={default:1});if(n)for(const i in l)!Rg(i)&&a[i]==null&&delete l[i]};function Uf(e,t,o,r,l=!1){if(Ke(e)){e.forEach((h,v)=>Uf(h,t&&(Ke(t)?t[v]:t),o,r,l));return}if(Ls(r)&&!l)return;const n=r.shapeFlag&4?Ku(r.component):r.el,a=l?null:n,{i,r:c}=e,d=t&&t.r,u=i.refs===bo?i.refs={}:i.refs,p=i.setupState;if(d!=null&&d!==c&&(ut(d)?(u[d]=null,Pt(p,d)&&(p[d]=null)):Zt(d)&&(d.value=null)),it(c))tn(c,i,12,[a,u]);else{const h=ut(c),v=Zt(c);if(h||v){const m=()=>{if(e.f){const f=h?Pt(p,c)?p[c]:u[c]:c.value;l?Ke(f)&&mf(f,n):Ke(f)?f.includes(n)||f.push(n):h?(u[c]=[n],Pt(p,c)&&(p[c]=u[c])):(c.value=[n],e.k&&(u[e.k]=c.value))}else h?(u[c]=a,Pt(p,c)&&(p[c]=a)):v&&(c.value=a,e.k&&(u[e.k]=a))};a?(m.id=-1,Sr(m,o)):m()}}}const Sr=$k;function Yk(e){return Gk(e)}function Gk(e,t){const o=Mm();o.__VUE__=!0;const{insert:r,remove:l,patchProp:n,createElement:a,createText:i,createComment:c,setText:d,setElementText:u,parentNode:p,nextSibling:h,setScopeId:v=qt,insertStaticContent:m}=e,f=(ae,pe,ke,Oe=null,we=null,Te=null,Ne=void 0,Ie=null,Ae=!!pe.dynamicChildren)=>{if(ae===pe)return;ae&&!ka(ae,pe)&&(Oe=_e(ae),ne(ae,we,Te,!0),ae=null),pe.patchFlag===-2&&(Ae=!1,pe.dynamicChildren=null);const{type:xe,ref:We,shapeFlag:qe}=pe;switch(xe){case vi:_(ae,pe,ke,Oe);break;case Jo:g(ae,pe,ke,Oe);break;case Du:ae==null&&y(pe,ke,Oe,Ne);break;case Qe:F(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae);break;default:qe&1?$(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae):qe&6?Q(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae):(qe&64||qe&128)&&xe.process(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae,Ce)}We!=null&&we&&Uf(We,ae&&ae.ref,Te,pe||ae,!pe)},_=(ae,pe,ke,Oe)=>{if(ae==null)r(pe.el=i(pe.children),ke,Oe);else{const we=pe.el=ae.el;pe.children!==ae.children&&d(we,pe.children)}},g=(ae,pe,ke,Oe)=>{ae==null?r(pe.el=c(pe.children||""),ke,Oe):pe.el=ae.el},y=(ae,pe,ke,Oe)=>{[ae.el,ae.anchor]=m(ae.children,pe,ke,Oe,ae.el,ae.anchor)},w=({el:ae,anchor:pe},ke,Oe)=>{let we;for(;ae&&ae!==pe;)we=h(ae),r(ae,ke,Oe),ae=we;r(pe,ke,Oe)},x=({el:ae,anchor:pe})=>{let ke;for(;ae&&ae!==pe;)ke=h(ae),l(ae),ae=ke;l(pe)},$=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{pe.type==="svg"?Ne="svg":pe.type==="math"&&(Ne="mathml"),ae==null?T(pe,ke,Oe,we,Te,Ne,Ie,Ae):R(ae,pe,we,Te,Ne,Ie,Ae)},T=(ae,pe,ke,Oe,we,Te,Ne,Ie)=>{let Ae,xe;const{props:We,shapeFlag:qe,transition:ye,dirs:Ye}=ae;if(Ae=ae.el=a(ae.type,Te,We&&We.is,We),qe&8?u(Ae,ae.children):qe&16&&P(ae.children,Ae,null,Oe,we,Wf(ae,Te),Ne,Ie),Ye&&wa(ae,null,Oe,"created"),L(Ae,ae,ae.scopeId,Ne,Oe),We){for(const pt in We)pt!=="value"&&!$s(pt)&&n(Ae,pt,null,We[pt],Te,ae.children,Oe,we,de);"value"in We&&n(Ae,"value",null,We.value,Te),(xe=We.onVnodeBeforeMount)&&Ml(xe,Oe,ae)}Ye&&wa(ae,null,Oe,"beforeMount");const tt=Xk(we,ye);tt&&ye.beforeEnter(Ae),r(Ae,pe,ke),((xe=We&&We.onVnodeMounted)||tt||Ye)&&Sr(()=>{xe&&Ml(xe,Oe,ae),tt&&ye.enter(Ae),Ye&&wa(ae,null,Oe,"mounted")},we)},L=(ae,pe,ke,Oe,we)=>{if(ke&&v(ae,ke),Oe)for(let Te=0;Te{for(let xe=Ae;xe{const Ie=pe.el=ae.el;let{patchFlag:Ae,dynamicChildren:xe,dirs:We}=pe;Ae|=ae.patchFlag&16;const qe=ae.props||bo,ye=pe.props||bo;let Ye;if(ke&&xa(ke,!1),(Ye=ye.onVnodeBeforeUpdate)&&Ml(Ye,ke,pe,ae),We&&wa(pe,ae,ke,"beforeUpdate"),ke&&xa(ke,!0),xe?V(ae.dynamicChildren,xe,Ie,ke,Oe,Wf(pe,we),Te):Ne||K(ae,pe,Ie,null,ke,Oe,Wf(pe,we),Te,!1),Ae>0){if(Ae&16)B(Ie,pe,qe,ye,ke,Oe,we);else if(Ae&2&&qe.class!==ye.class&&n(Ie,"class",null,ye.class,we),Ae&4&&n(Ie,"style",qe.style,ye.style,we),Ae&8){const tt=pe.dynamicProps;for(let pt=0;pt{Ye&&Ml(Ye,ke,pe,ae),We&&wa(pe,ae,ke,"updated")},Oe)},V=(ae,pe,ke,Oe,we,Te,Ne)=>{for(let Ie=0;Ie{if(ke!==Oe){if(ke!==bo)for(const Ie in ke)!$s(Ie)&&!(Ie in Oe)&&n(ae,Ie,ke[Ie],null,Ne,pe.children,we,Te,de);for(const Ie in Oe){if($s(Ie))continue;const Ae=Oe[Ie],xe=ke[Ie];Ae!==xe&&Ie!=="value"&&n(ae,Ie,xe,Ae,Ne,pe.children,we,Te,de)}"value"in Oe&&n(ae,"value",ke.value,Oe.value,Ne)}},F=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{const xe=pe.el=ae?ae.el:i(""),We=pe.anchor=ae?ae.anchor:i("");let{patchFlag:qe,dynamicChildren:ye,slotScopeIds:Ye}=pe;Ye&&(Ie=Ie?Ie.concat(Ye):Ye),ae==null?(r(xe,ke,Oe),r(We,ke,Oe),P(pe.children||[],ke,We,we,Te,Ne,Ie,Ae)):qe>0&&qe&64&&ye&&ae.dynamicChildren?(V(ae.dynamicChildren,ye,ke,we,Te,Ne,Ie),(pe.key!=null||we&&pe===we.subTree)&&qf(ae,pe,!0)):K(ae,pe,ke,We,we,Te,Ne,Ie,Ae)},Q=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{pe.slotScopeIds=Ie,ae==null?pe.shapeFlag&512?we.ctx.activate(pe,ke,Oe,Ne,Ae):J(pe,ke,Oe,we,Te,Ne,Ae):Z(ae,pe,Ae)},J=(ae,pe,ke,Oe,we,Te,Ne)=>{const Ie=ae.component=p9(ae,Oe,we);if(Lu(ae)&&(Ie.ctx.renderer=Ce),f9(Ie),Ie.asyncDep){if(we&&we.registerDep(Ie,H,Ne),!ae.el){const Ae=Ie.subTree=te(Jo);g(null,Ae,pe,ke)}}else H(Ie,ae,pe,ke,we,Te,Ne)},Z=(ae,pe,ke)=>{const Oe=pe.component=ae.component;if(Ck(ae,pe,ke))if(Oe.asyncDep&&!Oe.asyncResolved){j(Oe,pe,ke);return}else Oe.next=pe,bk(Oe.update),Oe.effect.dirty=!0,Oe.update();else pe.el=ae.el,Oe.vnode=pe},H=(ae,pe,ke,Oe,we,Te,Ne)=>{const Ie=()=>{if(ae.isMounted){let{next:We,bu:qe,u:ye,parent:Ye,vnode:tt}=ae;{const A=Vg(ae);if(A){We&&(We.el=tt.el,j(ae,We,Ne)),A.asyncDep.then(()=>{ae.isUnmounted||Ie()});return}}let pt=We,dt;xa(ae,!1),We?(We.el=tt.el,j(ae,We,Ne)):We=tt,qe&&bu(qe),(dt=We.props&&We.props.onVnodeBeforeUpdate)&&Ml(dt,Ye,We,tt),xa(ae,!0);const Y=Pf(ae),S=ae.subTree;ae.subTree=Y,f(S,Y,p(S.el),_e(S),ae,we,Te),We.el=Y.el,pt===null&&Sk(ae,Y.el),ye&&Sr(ye,we),(dt=We.props&&We.props.onVnodeUpdated)&&Sr(()=>Ml(dt,Ye,We,tt),we)}else{let We;const{el:qe,props:ye}=pe,{bm:Ye,m:tt,parent:pt}=ae,dt=Ls(pe);if(xa(ae,!1),Ye&&bu(Ye),!dt&&(We=ye&&ye.onVnodeBeforeMount)&&Ml(We,pt,pe),xa(ae,!0),qe&&De){const Y=()=>{ae.subTree=Pf(ae),De(qe,ae.subTree,ae,we,null)};dt?pe.type.__asyncLoader().then(()=>!ae.isUnmounted&&Y()):Y()}else{const Y=ae.subTree=Pf(ae);f(null,Y,ke,Oe,ae,we,Te),pe.el=Y.el}if(tt&&Sr(tt,we),!dt&&(We=ye&&ye.onVnodeMounted)){const Y=pe;Sr(()=>Ml(We,pt,Y),we)}(pe.shapeFlag&256||pt&&Ls(pt.vnode)&&pt.vnode.shapeFlag&256)&&ae.a&&Sr(ae.a,we),ae.isMounted=!0,pe=ke=Oe=null}},Ae=ae.effect=new kf(Ie,qt,()=>Nf(xe),ae.scope),xe=ae.update=()=>{Ae.dirty&&Ae.run()};xe.id=ae.uid,xa(ae,!0),xe()},j=(ae,pe,ke)=>{pe.component=ae;const Oe=ae.vnode.props;ae.vnode=pe,ae.next=null,Kk(ae,pe.props,Oe,ke),qk(ae,pe.children,ke),Jl(),ug(ae),Ql()},K=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae=!1)=>{const xe=ae&&ae.children,We=ae?ae.shapeFlag:0,qe=pe.children,{patchFlag:ye,shapeFlag:Ye}=pe;if(ye>0){if(ye&128){U(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae);return}else if(ye&256){I(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae);return}}Ye&8?(We&16&&de(xe,we,Te),qe!==xe&&u(ke,qe)):We&16?Ye&16?U(xe,qe,ke,Oe,we,Te,Ne,Ie,Ae):de(xe,we,Te,!0):(We&8&&u(ke,""),Ye&16&&P(qe,ke,Oe,we,Te,Ne,Ie,Ae))},I=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{ae=ae||ii,pe=pe||ii;const xe=ae.length,We=pe.length,qe=Math.min(xe,We);let ye;for(ye=0;yeWe?de(ae,we,Te,!0,!1,qe):P(pe,ke,Oe,we,Te,Ne,Ie,Ae,qe)},U=(ae,pe,ke,Oe,we,Te,Ne,Ie,Ae)=>{let xe=0;const We=pe.length;let qe=ae.length-1,ye=We-1;for(;xe<=qe&&xe<=ye;){const Ye=ae[xe],tt=pe[xe]=Ae?Vn(pe[xe]):$l(pe[xe]);if(ka(Ye,tt))f(Ye,tt,ke,null,we,Te,Ne,Ie,Ae);else break;xe++}for(;xe<=qe&&xe<=ye;){const Ye=ae[qe],tt=pe[ye]=Ae?Vn(pe[ye]):$l(pe[ye]);if(ka(Ye,tt))f(Ye,tt,ke,null,we,Te,Ne,Ie,Ae);else break;qe--,ye--}if(xe>qe){if(xe<=ye){const Ye=ye+1,tt=Yeye)for(;xe<=qe;)ne(ae[xe],we,Te,!0),xe++;else{const Ye=xe,tt=xe,pt=new Map;for(xe=tt;xe<=ye;xe++){const ge=pe[xe]=Ae?Vn(pe[xe]):$l(pe[xe]);ge.key!=null&&pt.set(ge.key,xe)}let dt,Y=0;const S=ye-tt+1;let A=!1,G=0;const X=new Array(S);for(xe=0;xe=S){ne(ge,we,Te,!0);continue}let fe;if(ge.key!=null)fe=pt.get(ge.key);else for(dt=tt;dt<=ye;dt++)if(X[dt-tt]===0&&ka(ge,pe[dt])){fe=dt;break}fe===void 0?ne(ge,we,Te,!0):(X[fe-tt]=xe+1,fe>=G?G=fe:A=!0,f(ge,pe[fe],ke,null,we,Te,Ne,Ie,Ae),Y++)}const re=A?Zk(X):ii;for(dt=re.length-1,xe=S-1;xe>=0;xe--){const ge=tt+xe,fe=pe[ge],Fe=ge+1{const{el:Te,type:Ne,transition:Ie,children:Ae,shapeFlag:xe}=ae;if(xe&6){oe(ae.component.subTree,pe,ke,Oe);return}if(xe&128){ae.suspense.move(pe,ke,Oe);return}if(xe&64){Ne.move(ae,pe,ke,Ce);return}if(Ne===Qe){r(Te,pe,ke);for(let qe=0;qeIe.enter(Te),we);else{const{leave:qe,delayLeave:ye,afterLeave:Ye}=Ie,tt=()=>r(Te,pe,ke),pt=()=>{qe(Te,()=>{tt(),Ye&&Ye()})};ye?ye(Te,tt,pt):pt()}else r(Te,pe,ke)},ne=(ae,pe,ke,Oe=!1,we=!1)=>{const{type:Te,props:Ne,ref:Ie,children:Ae,dynamicChildren:xe,shapeFlag:We,patchFlag:qe,dirs:ye,memoIndex:Ye}=ae;if(qe===-2&&(we=!1),Ie!=null&&Uf(Ie,null,ke,ae,!0),Ye!=null&&(pe.renderCache[Ye]=void 0),We&256){pe.ctx.deactivate(ae);return}const tt=We&1&&ye,pt=!Ls(ae);let dt;if(pt&&(dt=Ne&&Ne.onVnodeBeforeUnmount)&&Ml(dt,pe,ae),We&6)Me(ae.component,ke,Oe);else{if(We&128){ae.suspense.unmount(ke,Oe);return}tt&&wa(ae,null,pe,"beforeUnmount"),We&64?ae.type.remove(ae,pe,ke,Ce,Oe):xe&&(Te!==Qe||qe>0&&qe&64)?de(xe,pe,ke,!1,!0):(Te===Qe&&qe&384||!we&&We&16)&&de(Ae,pe,ke),Oe&&ce(ae)}(pt&&(dt=Ne&&Ne.onVnodeUnmounted)||tt)&&Sr(()=>{dt&&Ml(dt,pe,ae),tt&&wa(ae,null,pe,"unmounted")},ke)},ce=ae=>{const{type:pe,el:ke,anchor:Oe,transition:we}=ae;if(pe===Qe){ee(ke,Oe);return}if(pe===Du){x(ae);return}const Te=()=>{l(ke),we&&!we.persisted&&we.afterLeave&&we.afterLeave()};if(ae.shapeFlag&1&&we&&!we.persisted){const{leave:Ne,delayLeave:Ie}=we,Ae=()=>Ne(ke,Te);Ie?Ie(ae.el,Te,Ae):Ae()}else Te()},ee=(ae,pe)=>{let ke;for(;ae!==pe;)ke=h(ae),l(ae),ae=ke;l(pe)},Me=(ae,pe,ke)=>{const{bum:Oe,scope:we,update:Te,subTree:Ne,um:Ie,m:Ae,a:xe}=ae;Dg(Ae),Dg(xe),Oe&&bu(Oe),we.stop(),Te&&(Te.active=!1,ne(Ne,ae,pe,ke)),Ie&&Sr(Ie,pe),Sr(()=>{ae.isUnmounted=!0},pe),pe&&pe.pendingBranch&&!pe.isUnmounted&&ae.asyncDep&&!ae.asyncResolved&&ae.suspenseId===pe.pendingId&&(pe.deps--,pe.deps===0&&pe.resolve())},de=(ae,pe,ke,Oe=!1,we=!1,Te=0)=>{for(let Ne=Te;Neae.shapeFlag&6?_e(ae.component.subTree):ae.shapeFlag&128?ae.suspense.next():h(ae.anchor||ae.el);let me=!1;const Re=(ae,pe,ke)=>{ae==null?pe._vnode&&ne(pe._vnode,null,null,!0):f(pe._vnode||null,ae,pe,null,null,null,ke),me||(me=!0,ug(),dg(),me=!1),pe._vnode=ae},Ce={p:f,um:ne,m:oe,r:ce,mt:J,mc:P,pc:K,pbc:V,n:_e,o:e};let Ee,De;return{render:Re,hydrate:Ee,createApp:Hk(Re,Ee)}}function Wf({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function xa({effect:e,update:t},o){e.allowRecurse=t.allowRecurse=o}function Xk(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function qf(e,t,o=!1){const r=e.children,l=t.children;if(Ke(r)&&Ke(l))for(let n=0;n>1,e[o[i]]0&&(t[r]=o[n-1]),o[n]=r)}}for(n=o.length,a=o[n-1];n-- >0;)o[n]=a,a=t[a];return o}function Vg(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Vg(t)}function Dg(e){if(e)for(let t=0;tGe(Jk);function Go(e,t){return Yf(e,null,t)}const Ru={};function Se(e,t,o){return Yf(e,t,o)}function Yf(e,t,{immediate:o,deep:r,flush:l,once:n,onTrack:a,onTrigger:i}=bo){if(t&&n){const T=t;t=(...L)=>{T(...L),$()}}const c=Xo,d=T=>r===!0?T:Ln(T,r===!1?1:void 0);let u,p=!1,h=!1;if(Zt(e)?(u=()=>e.value,p=$u(e)):ba(e)?(u=()=>d(e),p=!0):Ke(e)?(h=!0,p=e.some(T=>ba(T)||$u(T)),u=()=>e.map(T=>{if(Zt(T))return T.value;if(ba(T))return d(T);if(it(T))return tn(T,c,2)})):it(e)?t?u=()=>tn(e,c,2):u=()=>(v&&v(),jr(e,c,3,[m])):u=qt,t&&r){const T=u;u=()=>Ln(T())}let v,m=T=>{v=w.onStop=()=>{tn(T,c,4),v=w.onStop=void 0}},f;if(ju)if(m=qt,t?o&&jr(t,c,3,[u(),h?[]:void 0,m]):u(),l==="sync"){const T=Qk();f=T.__watcherHandles||(T.__watcherHandles=[])}else return qt;let _=h?new Array(e.length).fill(Ru):Ru;const g=()=>{if(!(!w.active||!w.dirty))if(t){const T=w.run();(r||p||(h?T.some((L,P)=>zn(L,_[P])):zn(T,_)))&&(v&&v(),jr(t,c,3,[T,_===Ru?void 0:h&&_[0]===Ru?[]:_,m]),_=T)}else w.run()};g.allowRecurse=!!t;let y;l==="sync"?y=g:l==="post"?y=()=>Sr(g,c&&c.suspense):(g.pre=!0,c&&(g.id=c.uid),y=()=>Nf(g));const w=new kf(u,qt,y),x=yf(),$=()=>{w.stop(),x&&mf(x.effects,w)};return t?o?g():_=w.run():l==="post"?Sr(w.run.bind(w),c&&c.suspense):w.run(),f&&f.push($),$}function e9(e,t,o){const r=this.proxy,l=ut(e)?e.includes(".")?Hg(r,e):()=>r[e]:e.bind(r,r);let n;it(t)?n=t:(n=t.handler,o=t);const a=Ks(this),i=Yf(l,n.bind(r),o);return a(),i}function Hg(e,t){const o=t.split(".");return()=>{let r=e;for(let l=0;l{Ln(r,t,o)});else if(mu(e)){for(const r in e)Ln(e[r],t,o);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ln(e[r],t,o)}return e}const Lu=e=>e.type.__isKeepAlive;function t9(e,t){jg(e,"a",t)}function Fg(e,t){jg(e,"da",t)}function jg(e,t,o=Xo){const r=e.__wdc||(e.__wdc=()=>{let l=o;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(Ou(t,r,o),o){let l=o.parent;for(;l&&l.parent;)Lu(l.parent.vnode)&&o9(r,t,o,l),l=l.parent}}function o9(e,t,o,r){const l=Ou(t,e,r,!0);Rn(()=>{mf(r[t],l)},o)}const Bn=Symbol("_leaveCb"),Bu=Symbol("_enterCb");function Kg(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ft(()=>{e.isMounted=!0}),to(()=>{e.isUnmounting=!0}),e}const Kr=[Function,Array],Ug={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Kr,onEnter:Kr,onAfterEnter:Kr,onEnterCancelled:Kr,onBeforeLeave:Kr,onLeave:Kr,onAfterLeave:Kr,onLeaveCancelled:Kr,onBeforeAppear:Kr,onAppear:Kr,onAfterAppear:Kr,onAppearCancelled:Kr},Wg=e=>{const t=e.subTree;return t.component?Wg(t.component):t},r9={name:"BaseTransition",props:Ug,setup(e,{slots:t}){const o=wt(),r=Kg();return()=>{const l=t.default&&Xf(t.default(),!0);if(!l||!l.length)return;let n=l[0];if(l.length>1){for(const h of l)if(h.type!==Jo){n=h;break}}const a=Kt(e),{mode:i}=a;if(r.isLeaving)return Gf(n);const c=Yg(n);if(!c)return Gf(n);let d=Ds(c,a,r,o,h=>d=h);fi(c,d);const u=o.subTree,p=u&&Yg(u);if(p&&p.type!==Jo&&!ka(c,p)&&Wg(o).type!==Jo){const h=Ds(p,a,r,o);if(fi(p,h),i==="out-in"&&c.type!==Jo)return r.isLeaving=!0,h.afterLeave=()=>{r.isLeaving=!1,o.update.active!==!1&&(o.effect.dirty=!0,o.update())},Gf(n);i==="in-out"&&c.type!==Jo&&(h.delayLeave=(v,m,f)=>{const _=qg(r,p);_[String(p.key)]=p,v[Bn]=()=>{m(),v[Bn]=void 0,delete d.delayedLeave},d.delayedLeave=f})}return n}}};function qg(e,t){const{leavingVNodes:o}=e;let r=o.get(t.type);return r||(r=Object.create(null),o.set(t.type,r)),r}function Ds(e,t,o,r,l){const{appear:n,mode:a,persisted:i=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:h,onLeave:v,onAfterLeave:m,onLeaveCancelled:f,onBeforeAppear:_,onAppear:g,onAfterAppear:y,onAppearCancelled:w}=t,x=String(e.key),$=qg(o,e),T=(R,V)=>{R&&jr(R,r,9,V)},L=(R,V)=>{const B=V[1];T(R,V),Ke(R)?R.every(F=>F.length<=1)&&B():R.length<=1&&B()},P={mode:a,persisted:i,beforeEnter(R){let V=c;if(!o.isMounted)if(n)V=_||c;else return;R[Bn]&&R[Bn](!0);const B=$[x];B&&ka(e,B)&&B.el[Bn]&&B.el[Bn](),T(V,[R])},enter(R){let V=d,B=u,F=p;if(!o.isMounted)if(n)V=g||d,B=y||u,F=w||p;else return;let Q=!1;const J=R[Bu]=Z=>{Q||(Q=!0,Z?T(F,[R]):T(B,[R]),P.delayedLeave&&P.delayedLeave(),R[Bu]=void 0)};V?L(V,[R,J]):J()},leave(R,V){const B=String(e.key);if(R[Bu]&&R[Bu](!0),o.isUnmounting)return V();T(h,[R]);let F=!1;const Q=R[Bn]=J=>{F||(F=!0,V(),J?T(f,[R]):T(m,[R]),R[Bn]=void 0,$[B]===e&&delete $[B])};$[B]=e,v?L(v,[R,Q]):Q()},clone(R){const V=Ds(R,t,o,r,l);return l&&l(V),V}};return P}function Gf(e){if(Lu(e))return e=nn(e),e.children=null,e}function Yg(e){if(!Lu(e))return e;const{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&it(o.default))return o.default()}}function fi(e,t){e.shapeFlag&6&&e.component?fi(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Xf(e,t=!1,o){let r=[],l=0;for(let n=0;n1)for(let n=0;ne.__isTeleport,Hs=e=>e&&(e.disabled||e.disabled===""),Gg=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Xg=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Zf=(e,t)=>{const o=e&&e.to;return ut(o)?t?t(o):null:o},n9={name:"Teleport",__isTeleport:!0,process(e,t,o,r,l,n,a,i,c,d){const{mc:u,pc:p,pbc:h,o:{insert:v,querySelector:m,createText:f,createComment:_}}=d,g=Hs(t.props);let{shapeFlag:y,children:w,dynamicChildren:x}=t;if(e==null){const $=t.el=f(""),T=t.anchor=f("");v($,o,r),v(T,o,r);const L=t.target=Zf(t.props,m),P=t.targetAnchor=f("");L&&(v(P,L),a==="svg"||Gg(L)?a="svg":(a==="mathml"||Xg(L))&&(a="mathml"));const R=(V,B)=>{y&16&&u(w,V,B,l,n,a,i,c)};g?R(o,T):L&&R(L,P)}else{t.el=e.el;const $=t.anchor=e.anchor,T=t.target=e.target,L=t.targetAnchor=e.targetAnchor,P=Hs(e.props),R=P?o:T,V=P?$:L;if(a==="svg"||Gg(T)?a="svg":(a==="mathml"||Xg(T))&&(a="mathml"),x?(h(e.dynamicChildren,x,R,l,n,a,i),qf(e,t,!0)):c||p(e,t,R,V,l,n,a,i,!1),g)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Vu(t,o,$,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=t.target=Zf(t.props,m);B&&Vu(t,B,null,d,0)}else P&&Vu(t,T,L,d,1)}Zg(t)},remove(e,t,o,{um:r,o:{remove:l}},n){const{shapeFlag:a,children:i,anchor:c,targetAnchor:d,target:u,props:p}=e;if(u&&l(d),n&&l(c),a&16){const h=n||!Hs(p);for(let v=0;v0?sl||ii:null,i9(),js>0&&sl&&sl.push(e),e}function M(e,t,o,r,l,n){return Qg(E(e,t,o,r,l,n,!0))}function he(e,t,o,r,l){return Qg(te(e,t,o,r,l,!0))}function io(e){return e?e.__v_isVNode===!0:!1}function ka(e,t){return e.type===t.type&&e.key===t.key}const e1=({key:e})=>e??null,Hu=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?ut(e)||Zt(e)||it(e)?{i:Vo,r:e,k:t,f:!!o}:e:null);function E(e,t=null,o=null,r=0,l=null,n=e===Qe?0:1,a=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&e1(t),ref:t&&Hu(t),scopeId:hg,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:r,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Vo};return i?(Jf(c,o),n&128&&e.normalize(c)):o&&(c.shapeFlag|=ut(o)?8:16),js>0&&!a&&sl&&(c.patchFlag>0||n&6)&&c.patchFlag!==32&&sl.push(c),c}const te=s9;function s9(e,t=null,o=null,r=0,l=null,n=!1){if((!e||e===mg)&&(e=Jo),io(e)){const i=nn(e,t,!0);return o&&Jf(i,o),js>0&&!n&&sl&&(i.shapeFlag&6?sl[sl.indexOf(e)]=i:sl.push(i)),i.patchFlag=-2,i}if(b9(e)&&(e=e.__vccOpts),t){t=mi(t);let{class:i,style:c}=t;i&&!ut(i)&&(t.class=O(i)),xt(c)&&(og(c)&&!Ke(c)&&(c=$o({},c)),t.style=Je(c))}const a=ut(e)?1:Tk(e)?128:l9(e)?64:xt(e)?4:it(e)?2:0;return E(e,t,o,r,l,a,n,!0)}function mi(e){return e?og(e)||Mg(e)?$o({},e):e:null}function nn(e,t,o=!1,r=!1){const{props:l,ref:n,patchFlag:a,children:i,transition:c}=e,d=t?Mt(l||{},t):l,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&e1(d),ref:t&&t.ref?o&&n?Ke(n)?n.concat(Hu(t)):[n,Hu(t)]:Hu(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Qe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&nn(e.ssContent),ssFallback:e.ssFallback&&nn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&fi(u,c.clone(u)),u}function Ct(e=" ",t=0){return te(vi,null,e,t)}function c9(e,t){const o=te(Du,null,e);return o.staticCount=t,o}function se(e="",t=!1){return t?(b(),he(Jo,null,e)):te(Jo,null,e)}function $l(e){return e==null||typeof e=="boolean"?te(Jo):Ke(e)?te(Qe,null,e.slice()):typeof e=="object"?Vn(e):te(vi,null,String(e))}function Vn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:nn(e)}function Jf(e,t){let o=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ke(t))o=16;else if(typeof t=="object")if(r&65){const l=t.default;l&&(l._c&&(l._d=!1),Jf(e,l()),l._c&&(l._d=!0));return}else{o=32;const l=t._;!l&&!Mg(t)?t._ctx=Vo:l===3&&Vo&&(Vo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:Vo},o=32):(t=String(t),r&64?(o=16,t=[Ct(t)]):o=8);e.children=t,e.shapeFlag|=o}function Mt(...e){const t={};for(let o=0;oXo||Vo;let Fu,Qf;{const e=Mm(),t=(o,r)=>{let l;return(l=e[o])||(l=e[o]=[]),l.push(r),n=>{l.length>1?l.forEach(a=>a(n)):l[0](n)}};Fu=t("__VUE_INSTANCE_SETTERS__",o=>Xo=o),Qf=t("__VUE_SSR_SETTERS__",o=>ju=o)}const Ks=e=>{const t=Xo;return Fu(e),e.scope.on(),()=>{e.scope.off(),Fu(t)}},t1=()=>{Xo&&Xo.scope.off(),Fu(null)};function o1(e){return e.vnode.shapeFlag&4}let ju=!1;function f9(e,t=!1){t&&Qf(t);const{props:o,children:r}=e.vnode,l=o1(e);jk(e,o,l,t),Wk(e,r);const n=l?h9(e,t):void 0;return t&&Qf(!1),n}function h9(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nk);const{setup:r}=o;if(r){const l=e.setupContext=r.length>1?a1(e):null,n=Ks(e);Jl();const a=tn(r,e,0,[e.props,l]);if(Ql(),n(),Es(a)){if(a.then(t1,t1),t)return a.then(i=>{r1(e,i,t)}).catch(i=>{Mu(i,e,0)});e.asyncDep=a}else r1(e,a,t)}else n1(e,t)}function r1(e,t,o){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xt(t)&&(e.setupState=ng(t)),n1(e,o)}let l1;function n1(e,t,o){const r=e.type;if(!e.render){if(!t&&l1&&!r.render){const l=r.template||Hf(e).template;if(l){const{isCustomElement:n,compilerOptions:a}=e.appContext.config,{delimiters:i,compilerOptions:c}=r,d=$o($o({isCustomElement:n,delimiters:i},a),c);r.render=l1(l,d)}}e.render=r.render||qt}{const l=Ks(e);Jl();try{Pk(e)}finally{Ql(),l()}}}const v9={get(e,t){return Cr(e,"get",""),e[t]}};function a1(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,v9),slots:e.slots,emit:e.emit,expose:t}}function Ku(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ng(Nn(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Bs)return Bs[o](e)},has(t,o){return o in t||o in Bs}})):e.proxy}const m9=/(?:^|[-_])(\w)/g,g9=e=>e.replace(m9,t=>t.toUpperCase()).replace(/[-_]/g,"");function i1(e,t=!0){return it(e)?e.displayName||e.name:e.name||t&&e.__name}function s1(e,t,o=!1){let r=i1(t);if(!r&&t.__file){const l=t.__file.match(/([^/\\]+)\.\w+$/);l&&(r=l[1])}if(!r&&e&&e.parent){const l=n=>{for(const a in n)if(n[a]===t)return a};r=l(e.components||e.parent.type.components)||l(e.appContext.components)}return r?g9(r):o?"App":"Anonymous"}function b9(e){return it(e)&&"__vccOpts"in e}const C=(e,t)=>nk(e,t,ju);function rt(e,t,o){const r=arguments.length;return r===2?xt(t)&&!Ke(t)?io(t)?te(e,null,[t]):te(e,t):te(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&io(o)&&(o=[o]),te(e,t,o))}const _9="3.4.31",w9=qt;/** * @vue/runtime-dom v3.4.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const x9="http://www.w3.org/2000/svg",k9="http://www.w3.org/1998/Math/MathML",an=typeof document<"u"?document:null,u1=an&&an.createElement("template"),C9={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{const l=t==="svg"?an.createElementNS(x9,e):t==="mathml"?an.createElementNS(k9,e):o?an.createElement(e,{is:o}):an.createElement(e);return e==="select"&&r&&r.multiple!=null&&l.setAttribute("multiple",r.multiple),l},createText:e=>an.createTextNode(e),createComment:e=>an.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>an.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,l,n){const a=o?o.previousSibling:t.lastChild;if(l&&(l===n||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),o),!(l===n||!(l=l.nextSibling)););else{u1.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const i=u1.content;if(r==="svg"||r==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},Dn="transition",Us="animation",gi=Symbol("_vtc"),Mo=(e,{slots:t})=>rt(l9,f1(e),t);Mo.displayName="Transition";const d1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},S9=Mo.props=$o({},Wg,d1),Ca=(e,t=[])=>{Ke(e)?e.forEach(o=>o(...t)):e&&e(...t)},p1=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function f1(e){const t={};for(const j in e)j in d1||(t[j]=e[j]);if(e.css===!1)return t;const{name:o="v",type:r,duration:l,enterFromClass:n=`${o}-enter-from`,enterActiveClass:a=`${o}-enter-active`,enterToClass:i=`${o}-enter-to`,appearFromClass:c=n,appearActiveClass:d=a,appearToClass:u=i,leaveFromClass:p=`${o}-leave-from`,leaveActiveClass:h=`${o}-leave-active`,leaveToClass:v=`${o}-leave-to`}=e,m=E9(l),f=m&&m[0],_=m&&m[1],{onBeforeEnter:g,onEnter:y,onEnterCancelled:w,onLeave:x,onLeaveCancelled:$,onBeforeAppear:T=g,onAppear:R=y,onAppearCancelled:P=w}=t,L=(j,te,J)=>{Hn(j,te?u:i),Hn(j,te?d:a),J&&J()},V=(j,te)=>{j._isLeaving=!1,Hn(j,p),Hn(j,v),Hn(j,h),te&&te()},B=j=>(te,J)=>{const Z=j?R:y,H=()=>L(te,j,J);Ca(Z,[te,H]),h1(()=>{Hn(te,j?c:n),sn(te,j?u:i),p1(Z)||v1(te,r,f,H)})};return $o(t,{onBeforeEnter(j){Ca(g,[j]),sn(j,n),sn(j,a)},onBeforeAppear(j){Ca(T,[j]),sn(j,c),sn(j,d)},onEnter:B(!1),onAppear:B(!0),onLeave(j,te){j._isLeaving=!0;const J=()=>V(j,te);sn(j,p),sn(j,h),_1(),h1(()=>{j._isLeaving&&(Hn(j,p),sn(j,v),p1(x)||v1(j,r,_,J))}),Ca(x,[j,J])},onEnterCancelled(j){L(j,!1),Ca(w,[j])},onAppearCancelled(j){L(j,!0),Ca(P,[j])},onLeaveCancelled(j){V(j),Ca($,[j])}})}function E9(e){if(e==null)return null;if(xt(e))return[t0(e.enter),t0(e.leave)];{const t=t0(e);return[t,t]}}function t0(e){return I5(e)}function sn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[gi]||(e[gi]=new Set)).add(t)}function Hn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[gi];o&&(o.delete(t),o.size||(e[gi]=void 0))}function h1(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let T9=0;function v1(e,t,o,r){const l=e._endId=++T9,n=()=>{l===e._endId&&r()};if(o)return setTimeout(n,o);const{type:a,timeout:i,propCount:c}=m1(e,t);if(!a)return r();const d=a+"end";let u=0;const p=()=>{e.removeEventListener(d,h),n()},h=v=>{v.target===e&&++u>=c&&p()};setTimeout(()=>{u(o[m]||"").split(", "),l=r(`${Dn}Delay`),n=r(`${Dn}Duration`),a=g1(l,n),i=r(`${Us}Delay`),c=r(`${Us}Duration`),d=g1(i,c);let u=null,p=0,h=0;t===Dn?a>0&&(u=Dn,p=a,h=n.length):t===Us?d>0&&(u=Us,p=d,h=c.length):(p=Math.max(a,d),u=p>0?a>d?Dn:Us:null,h=u?u===Dn?n.length:c.length:0);const v=u===Dn&&/\b(transform|all)(,|$)/.test(r(`${Dn}Property`).toString());return{type:u,timeout:p,propCount:h,hasTransform:v}}function g1(e,t){for(;e.lengthb1(o)+b1(e[r])))}function b1(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function _1(){return document.body.offsetHeight}function $9(e,t,o){const r=e[gi];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const Wu=Symbol("_vod"),w1=Symbol("_vsh"),Lt={beforeMount(e,{value:t},{transition:o}){e[Wu]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Ws(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:r}){!t!=!o&&(r?t?(r.beforeEnter(e),Ws(e,!0),r.enter(e)):r.leave(e,()=>{Ws(e,!1)}):Ws(e,t))},beforeUnmount(e,{value:t}){Ws(e,t)}};function Ws(e,t){e.style.display=t?e[Wu]:"none",e[w1]=!t}const M9=Symbol(""),A9=/(^|;)\s*display\s*:/;function z9(e,t,o){const r=e.style,l=ut(o);let n=!1;if(o&&!l){if(t)if(ut(t))for(const a of t.split(";")){const i=a.slice(0,a.indexOf(":")).trim();o[i]==null&&qu(r,i,"")}else for(const a in t)o[a]==null&&qu(r,a,"");for(const a in o)a==="display"&&(n=!0),qu(r,a,o[a])}else if(l){if(t!==o){const a=r[M9];a&&(o+=";"+a),r.cssText=o,n=A9.test(o)}}else t&&e.removeAttribute("style");Wu in e&&(e[Wu]=n?r.display:"",e[w1]&&(r.display="none"))}const y1=/\s*!important$/;function qu(e,t,o){if(Ke(o))o.forEach(r=>qu(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const r=I9(e,t);y1.test(o)?e.setProperty(An(r),o.replace(y1,""),"important"):e[r]=o}}const x1=["Webkit","Moz","ms"],o0={};function I9(e,t){const o=o0[t];if(o)return o;let r=Fr(t);if(r!=="filter"&&r in e)return o0[t]=r;r=Ms(r);for(let l=0;lr0||(L9.then(()=>r0=0),r0=Date.now());function V9(e,t){const o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;jr(D9(r,o.value),t,5,[r])};return o.value=e,o.attached=B9(),o}function D9(e,t){if(Ke(t)){const o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(r=>l=>!l._stopped&&r&&r(l))}else return t}const T1=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,H9=(e,t,o,r,l,n,a,i,c)=>{const d=l==="svg";t==="class"?$9(e,r,d):t==="style"?z9(e,o,r):hu(t)?mf(t)||P9(e,t,o,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):F9(e,t,r,d))?(O9(e,t,r,n,a,i,c),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&C1(e,t,r,d,a,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),C1(e,t,r,d))};function F9(e,t,o,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&T1(t)&&it(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return T1(t)&&ut(o)?!1:t in e}const $1=new WeakMap,M1=new WeakMap,Yu=Symbol("_moveCb"),A1=Symbol("_enterCb"),z1={name:"TransitionGroup",props:$o({},S9,{tag:String,moveClass:String}),setup(e,{slots:t}){const o=wt(),r=Ug();let l,n;return rn(()=>{if(!l.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!q9(l[0].el,o.vnode.el,a))return;l.forEach(K9),l.forEach(U9);const i=l.filter(W9);_1(),i.forEach(c=>{const d=c.el,u=d.style;sn(d,a),u.transform=u.webkitTransform=u.transitionDuration="";const p=d[Yu]=h=>{h&&h.target!==d||(!h||/transform$/.test(h.propertyName))&&(d.removeEventListener("transitionend",p),d[Yu]=null,Hn(d,a))};d.addEventListener("transitionend",p)})}),()=>{const a=jt(e),i=f1(a);let c=a.tag||Qe;if(l=[],n)for(let d=0;ddelete e.mode;z1.props;const I1=z1;function K9(e){const t=e.el;t[Yu]&&t[Yu](),t[A1]&&t[A1]()}function U9(e){M1.set(e,e.el.getBoundingClientRect())}function W9(e){const t=$1.get(e),o=M1.get(e),r=t.left-o.left,l=t.top-o.top;if(r||l){const n=e.el.style;return n.transform=n.webkitTransform=`translate(${r}px,${l}px)`,n.transitionDuration="0s",e}}function q9(e,t,o){const r=e.cloneNode(),l=e[gi];l&&l.forEach(i=>{i.split(/\s+/).forEach(c=>c&&r.classList.remove(c))}),o.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const n=t.nodeType===1?t:t.parentNode;n.appendChild(r);const{hasTransform:a}=m1(r);return n.removeChild(r),a}const bi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?o=>_u(t,o):t};function Y9(e){e.target.composing=!0}function O1(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const cn=Symbol("_assign"),l0={created(e,{modifiers:{lazy:t,trim:o,number:r}},l){e[cn]=bi(l);const n=r||l.props&&l.props.type==="number";Fn(e,t?"change":"input",a=>{if(a.target.composing)return;let i=e.value;o&&(i=i.trim()),n&&(i=_f(i)),e[cn](i)}),o&&Fn(e,"change",()=>{e.value=e.value.trim()}),t||(Fn(e,"compositionstart",Y9),Fn(e,"compositionend",O1),Fn(e,"change",O1))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:r,trim:l,number:n}},a){if(e[cn]=bi(a),e.composing)return;const i=(n||e.type==="number")&&!/^0\d/.test(e.value)?_f(e.value):e.value,c=t??"";i!==c&&(document.activeElement===e&&e.type!=="range"&&(r&&t===o||l&&e.value.trim()===c)||(e.value=c))}},Gu={deep:!0,created(e,t,o){e[cn]=bi(o),Fn(e,"change",()=>{const r=e._modelValue,l=R1(e),n=e.checked,a=e[cn];if(Ke(r)){const i=Im(r,l),c=i!==-1;if(n&&!c)a(r.concat(l));else if(!n&&c){const d=[...r];d.splice(i,1),a(d)}}else if(vu(r)){const i=new Set(r);n?i.add(l):i.delete(l),a(i)}else a(L1(e,n))})},mounted:N1,beforeUpdate(e,t,o){e[cn]=bi(o),N1(e,t,o)}};function N1(e,{value:t,oldValue:o},r){e._modelValue=t,Ke(t)?e.checked=Im(t,r.props.value)>-1:vu(t)?e.checked=t.has(r.props.value):t!==o&&(e.checked=ci(t,L1(e,!0)))}const P1={created(e,{value:t},o){e.checked=ci(t,o.props.value),e[cn]=bi(o),Fn(e,"change",()=>{e[cn](R1(e))})},beforeUpdate(e,{value:t,oldValue:o},r){e[cn]=bi(r),t!==o&&(e.checked=ci(t,r.props.value))}};function R1(e){return"_value"in e?e._value:e.value}function L1(e,t){const o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}const G9=["ctrl","shift","alt","meta"],X9={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>G9.some(o=>e[`${o}Key`]&&!t.includes(o))},ct=(e,t)=>{const o=e._withMods||(e._withMods={}),r=t.join(".");return o[r]||(o[r]=(l,...n)=>{for(let a=0;a{const o=e._withKeys||(e._withKeys={}),r=t.join(".");return o[r]||(o[r]=l=>{if(!("key"in l))return;const n=An(l.key);if(t.some(a=>a===n||Z9[a]===n))return e(l)})},J9=$o({patchProp:H9},C9);let B1;function V1(){return B1||(B1=Gk(J9))}const jn=(...e)=>{V1().render(...e)},D1=(...e)=>{const t=V1().createApp(...e),{mount:o}=t;return t.mount=r=>{const l=eC(r);if(!l)return;const n=t._component;!it(n)&&!n.render&&!n.template&&(n.template=l.innerHTML),l.innerHTML="";const a=o(l,!1,Q9(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),a},t};function Q9(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function eC(e){return ut(e)?document.querySelector(e):e}var Ao=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H1={exports:{}};/*! +**/const y9="http://www.w3.org/2000/svg",x9="http://www.w3.org/1998/Math/MathML",an=typeof document<"u"?document:null,c1=an&&an.createElement("template"),k9={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{const l=t==="svg"?an.createElementNS(y9,e):t==="mathml"?an.createElementNS(x9,e):o?an.createElement(e,{is:o}):an.createElement(e);return e==="select"&&r&&r.multiple!=null&&l.setAttribute("multiple",r.multiple),l},createText:e=>an.createTextNode(e),createComment:e=>an.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>an.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,l,n){const a=o?o.previousSibling:t.lastChild;if(l&&(l===n||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),o),!(l===n||!(l=l.nextSibling)););else{c1.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const i=c1.content;if(r==="svg"||r==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},Dn="transition",Us="animation",gi=Symbol("_vtc"),Mo=(e,{slots:t})=>rt(r9,p1(e),t);Mo.displayName="Transition";const u1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},C9=Mo.props=$o({},Ug,u1),Ca=(e,t=[])=>{Ke(e)?e.forEach(o=>o(...t)):e&&e(...t)},d1=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function p1(e){const t={};for(const F in e)F in u1||(t[F]=e[F]);if(e.css===!1)return t;const{name:o="v",type:r,duration:l,enterFromClass:n=`${o}-enter-from`,enterActiveClass:a=`${o}-enter-active`,enterToClass:i=`${o}-enter-to`,appearFromClass:c=n,appearActiveClass:d=a,appearToClass:u=i,leaveFromClass:p=`${o}-leave-from`,leaveActiveClass:h=`${o}-leave-active`,leaveToClass:v=`${o}-leave-to`}=e,m=S9(l),f=m&&m[0],_=m&&m[1],{onBeforeEnter:g,onEnter:y,onEnterCancelled:w,onLeave:x,onLeaveCancelled:$,onBeforeAppear:T=g,onAppear:L=y,onAppearCancelled:P=w}=t,R=(F,Q,J)=>{Hn(F,Q?u:i),Hn(F,Q?d:a),J&&J()},V=(F,Q)=>{F._isLeaving=!1,Hn(F,p),Hn(F,v),Hn(F,h),Q&&Q()},B=F=>(Q,J)=>{const Z=F?L:y,H=()=>R(Q,F,J);Ca(Z,[Q,H]),f1(()=>{Hn(Q,F?c:n),sn(Q,F?u:i),d1(Z)||h1(Q,r,f,H)})};return $o(t,{onBeforeEnter(F){Ca(g,[F]),sn(F,n),sn(F,a)},onBeforeAppear(F){Ca(T,[F]),sn(F,c),sn(F,d)},onEnter:B(!1),onAppear:B(!0),onLeave(F,Q){F._isLeaving=!0;const J=()=>V(F,Q);sn(F,p),sn(F,h),b1(),f1(()=>{F._isLeaving&&(Hn(F,p),sn(F,v),d1(x)||h1(F,r,_,J))}),Ca(x,[F,J])},onEnterCancelled(F){R(F,!1),Ca(w,[F])},onAppearCancelled(F){R(F,!0),Ca(P,[F])},onLeaveCancelled(F){V(F),Ca($,[F])}})}function S9(e){if(e==null)return null;if(xt(e))return[e0(e.enter),e0(e.leave)];{const t=e0(e);return[t,t]}}function e0(e){return z5(e)}function sn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[gi]||(e[gi]=new Set)).add(t)}function Hn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[gi];o&&(o.delete(t),o.size||(e[gi]=void 0))}function f1(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let E9=0;function h1(e,t,o,r){const l=e._endId=++E9,n=()=>{l===e._endId&&r()};if(o)return setTimeout(n,o);const{type:a,timeout:i,propCount:c}=v1(e,t);if(!a)return r();const d=a+"end";let u=0;const p=()=>{e.removeEventListener(d,h),n()},h=v=>{v.target===e&&++u>=c&&p()};setTimeout(()=>{u(o[m]||"").split(", "),l=r(`${Dn}Delay`),n=r(`${Dn}Duration`),a=m1(l,n),i=r(`${Us}Delay`),c=r(`${Us}Duration`),d=m1(i,c);let u=null,p=0,h=0;t===Dn?a>0&&(u=Dn,p=a,h=n.length):t===Us?d>0&&(u=Us,p=d,h=c.length):(p=Math.max(a,d),u=p>0?a>d?Dn:Us:null,h=u?u===Dn?n.length:c.length:0);const v=u===Dn&&/\b(transform|all)(,|$)/.test(r(`${Dn}Property`).toString());return{type:u,timeout:p,propCount:h,hasTransform:v}}function m1(e,t){for(;e.lengthg1(o)+g1(e[r])))}function g1(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function b1(){return document.body.offsetHeight}function T9(e,t,o){const r=e[gi];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const Uu=Symbol("_vod"),_1=Symbol("_vsh"),Lt={beforeMount(e,{value:t},{transition:o}){e[Uu]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Ws(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:r}){!t!=!o&&(r?t?(r.beforeEnter(e),Ws(e,!0),r.enter(e)):r.leave(e,()=>{Ws(e,!1)}):Ws(e,t))},beforeUnmount(e,{value:t}){Ws(e,t)}};function Ws(e,t){e.style.display=t?e[Uu]:"none",e[_1]=!t}const $9=Symbol(""),M9=/(^|;)\s*display\s*:/;function A9(e,t,o){const r=e.style,l=ut(o);let n=!1;if(o&&!l){if(t)if(ut(t))for(const a of t.split(";")){const i=a.slice(0,a.indexOf(":")).trim();o[i]==null&&Wu(r,i,"")}else for(const a in t)o[a]==null&&Wu(r,a,"");for(const a in o)a==="display"&&(n=!0),Wu(r,a,o[a])}else if(l){if(t!==o){const a=r[$9];a&&(o+=";"+a),r.cssText=o,n=M9.test(o)}}else t&&e.removeAttribute("style");Uu in e&&(e[Uu]=n?r.display:"",e[_1]&&(r.display="none"))}const w1=/\s*!important$/;function Wu(e,t,o){if(Ke(o))o.forEach(r=>Wu(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const r=z9(e,t);w1.test(o)?e.setProperty(An(r),o.replace(w1,""),"important"):e[r]=o}}const y1=["Webkit","Moz","ms"],t0={};function z9(e,t){const o=t0[t];if(o)return o;let r=Fr(t);if(r!=="filter"&&r in e)return t0[t]=r;r=Ms(r);for(let l=0;lo0||(R9.then(()=>o0=0),o0=Date.now());function B9(e,t){const o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;jr(V9(r,o.value),t,5,[r])};return o.value=e,o.attached=L9(),o}function V9(e,t){if(Ke(t)){const o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(r=>l=>!l._stopped&&r&&r(l))}else return t}const E1=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,D9=(e,t,o,r,l,n,a,i,c)=>{const d=l==="svg";t==="class"?T9(e,r,d):t==="style"?A9(e,o,r):fu(t)?vf(t)||N9(e,t,o,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):H9(e,t,r,d))?(I9(e,t,r,n,a,i,c),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&k1(e,t,r,d,a,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),k1(e,t,r,d))};function H9(e,t,o,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&E1(t)&&it(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return E1(t)&&ut(o)?!1:t in e}const T1=new WeakMap,$1=new WeakMap,qu=Symbol("_moveCb"),M1=Symbol("_enterCb"),A1={name:"TransitionGroup",props:$o({},C9,{tag:String,moveClass:String}),setup(e,{slots:t}){const o=wt(),r=Kg();let l,n;return rn(()=>{if(!l.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!W9(l[0].el,o.vnode.el,a))return;l.forEach(j9),l.forEach(K9);const i=l.filter(U9);b1(),i.forEach(c=>{const d=c.el,u=d.style;sn(d,a),u.transform=u.webkitTransform=u.transitionDuration="";const p=d[qu]=h=>{h&&h.target!==d||(!h||/transform$/.test(h.propertyName))&&(d.removeEventListener("transitionend",p),d[qu]=null,Hn(d,a))};d.addEventListener("transitionend",p)})}),()=>{const a=Kt(e),i=p1(a);let c=a.tag||Qe;if(l=[],n)for(let d=0;ddelete e.mode;A1.props;const z1=A1;function j9(e){const t=e.el;t[qu]&&t[qu](),t[M1]&&t[M1]()}function K9(e){$1.set(e,e.el.getBoundingClientRect())}function U9(e){const t=T1.get(e),o=$1.get(e),r=t.left-o.left,l=t.top-o.top;if(r||l){const n=e.el.style;return n.transform=n.webkitTransform=`translate(${r}px,${l}px)`,n.transitionDuration="0s",e}}function W9(e,t,o){const r=e.cloneNode(),l=e[gi];l&&l.forEach(i=>{i.split(/\s+/).forEach(c=>c&&r.classList.remove(c))}),o.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const n=t.nodeType===1?t:t.parentNode;n.appendChild(r);const{hasTransform:a}=v1(r);return n.removeChild(r),a}const bi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?o=>bu(t,o):t};function q9(e){e.target.composing=!0}function I1(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const cn=Symbol("_assign"),r0={created(e,{modifiers:{lazy:t,trim:o,number:r}},l){e[cn]=bi(l);const n=r||l.props&&l.props.type==="number";Fn(e,t?"change":"input",a=>{if(a.target.composing)return;let i=e.value;o&&(i=i.trim()),n&&(i=bf(i)),e[cn](i)}),o&&Fn(e,"change",()=>{e.value=e.value.trim()}),t||(Fn(e,"compositionstart",q9),Fn(e,"compositionend",I1),Fn(e,"change",I1))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:r,trim:l,number:n}},a){if(e[cn]=bi(a),e.composing)return;const i=(n||e.type==="number")&&!/^0\d/.test(e.value)?bf(e.value):e.value,c=t??"";i!==c&&(document.activeElement===e&&e.type!=="range"&&(r&&t===o||l&&e.value.trim()===c)||(e.value=c))}},Yu={deep:!0,created(e,t,o){e[cn]=bi(o),Fn(e,"change",()=>{const r=e._modelValue,l=P1(e),n=e.checked,a=e[cn];if(Ke(r)){const i=zm(r,l),c=i!==-1;if(n&&!c)a(r.concat(l));else if(!n&&c){const d=[...r];d.splice(i,1),a(d)}}else if(hu(r)){const i=new Set(r);n?i.add(l):i.delete(l),a(i)}else a(R1(e,n))})},mounted:O1,beforeUpdate(e,t,o){e[cn]=bi(o),O1(e,t,o)}};function O1(e,{value:t,oldValue:o},r){e._modelValue=t,Ke(t)?e.checked=zm(t,r.props.value)>-1:hu(t)?e.checked=t.has(r.props.value):t!==o&&(e.checked=ci(t,R1(e,!0)))}const N1={created(e,{value:t},o){e.checked=ci(t,o.props.value),e[cn]=bi(o),Fn(e,"change",()=>{e[cn](P1(e))})},beforeUpdate(e,{value:t,oldValue:o},r){e[cn]=bi(r),t!==o&&(e.checked=ci(t,r.props.value))}};function P1(e){return"_value"in e?e._value:e.value}function R1(e,t){const o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}const Y9=["ctrl","shift","alt","meta"],G9={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Y9.some(o=>e[`${o}Key`]&&!t.includes(o))},ct=(e,t)=>{const o=e._withMods||(e._withMods={}),r=t.join(".");return o[r]||(o[r]=(l,...n)=>{for(let a=0;a{const o=e._withKeys||(e._withKeys={}),r=t.join(".");return o[r]||(o[r]=l=>{if(!("key"in l))return;const n=An(l.key);if(t.some(a=>a===n||X9[a]===n))return e(l)})},Z9=$o({patchProp:D9},k9);let L1;function B1(){return L1||(L1=Yk(Z9))}const jn=(...e)=>{B1().render(...e)},V1=(...e)=>{const t=B1().createApp(...e),{mount:o}=t;return t.mount=r=>{const l=Q9(r);if(!l)return;const n=t._component;!it(n)&&!n.render&&!n.template&&(n.template=l.innerHTML),l.innerHTML="";const a=o(l,!1,J9(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),a},t};function J9(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Q9(e){return ut(e)?document.querySelector(e):e}var Ao=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D1={exports:{}};/*! * sweetalert2 v11.12.1 * Released under the MIT License. -*/(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){function o(q,k){(k==null||k>q.length)&&(k=q.length);for(var z=0,W=Array(k);z=q.length?{done:!0}:{done:!1,value:q[W++]}},e:function(Ht){throw Ht},f:ve}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,gt=!0,Kt=!1;return{s:function(){z=z.call(q)},n:function(){var Ht=z.next();return gt=Ht.done,Ht},e:function(Ht){Kt=!0,je=Ht},f:function(){try{gt||z.return==null||z.return()}finally{if(Kt)throw je}}}}function g(){return g=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(q,k,z){var W=j(q,k);if(W){var ve=Object.getOwnPropertyDescriptor(W,k);return ve.get?ve.get.call(arguments.length<3?q:z):ve.value}},g.apply(null,arguments)}function y(q){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},y(q)}function w(q,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");q.prototype=Object.create(k&&k.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),Object.defineProperty(q,"prototype",{writable:!1}),k&&V(q,k)}function x(){try{var q=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x=function(){return!!q})()}function $(q){if(typeof Symbol<"u"&&q[Symbol.iterator]!=null||q["@@iterator"]!=null)return Array.from(q)}function T(q,k){var z=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(z!=null){var W,ve,je,gt,Kt=[],Ht=!0,To=!1;try{if(je=(z=z.call(q)).next,k!==0)for(;!(Ht=(W=je.call(z)).done)&&(Kt.push(W.value),Kt.length!==k);Ht=!0);}catch(fu){To=!0,ve=fu}finally{try{if(!Ht&&z.return!=null&&(gt=z.return(),Object(gt)!==gt))return}finally{if(To)throw ve}}return Kt}}function R(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +*/(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){function o(q,k){(k==null||k>q.length)&&(k=q.length);for(var z=0,W=Array(k);z=q.length?{done:!0}:{done:!1,value:q[W++]}},e:function(Ht){throw Ht},f:ve}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,gt=!0,Ut=!1;return{s:function(){z=z.call(q)},n:function(){var Ht=z.next();return gt=Ht.done,Ht},e:function(Ht){Ut=!0,je=Ht},f:function(){try{gt||z.return==null||z.return()}finally{if(Ut)throw je}}}}function g(){return g=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(q,k,z){var W=F(q,k);if(W){var ve=Object.getOwnPropertyDescriptor(W,k);return ve.get?ve.get.call(arguments.length<3?q:z):ve.value}},g.apply(null,arguments)}function y(q){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},y(q)}function w(q,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");q.prototype=Object.create(k&&k.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),Object.defineProperty(q,"prototype",{writable:!1}),k&&V(q,k)}function x(){try{var q=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x=function(){return!!q})()}function $(q){if(typeof Symbol<"u"&&q[Symbol.iterator]!=null||q["@@iterator"]!=null)return Array.from(q)}function T(q,k){var z=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(z!=null){var W,ve,je,gt,Ut=[],Ht=!0,To=!1;try{if(je=(z=z.call(q)).next,k!==0)for(;!(Ht=(W=je.call(z)).done)&&(Ut.push(W.value),Ut.length!==k);Ht=!0);}catch(pu){To=!0,ve=pu}finally{try{if(!Ht&&z.return!=null&&(gt=z.return(),Object(gt)!==gt))return}finally{if(To)throw ve}}return Ut}}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(q,k){if(k&&(typeof k=="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(q)}function V(q,k){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,W){return z.__proto__=W,z},V(q,k)}function B(q,k){return r(q)||T(q,k)||F(q,k)||R()}function j(q,k){for(;!{}.hasOwnProperty.call(q,k)&&(q=y(q))!==null;);return q}function te(q){return l(q)||$(q)||F(q)||P()}function J(q,k){if(typeof q!="object"||!q)return q;var z=q[Symbol.toPrimitive];if(z!==void 0){var W=z.call(q,k);if(typeof W!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}function Z(q){var k=J(q,"string");return typeof k=="symbol"?k:k+""}function H(q){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},H(q)}function F(q,k){if(q){if(typeof q=="string")return o(q,k);var z={}.toString.call(q).slice(8,-1);return z==="Object"&&q.constructor&&(z=q.constructor.name),z==="Map"||z==="Set"?Array.from(q):z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z)?o(q,k):void 0}}var K=100,I={},U=function(){I.previousActiveElement instanceof HTMLElement?(I.previousActiveElement.focus(),I.previousActiveElement=null):document.body&&document.body.focus()},oe=function(k){return new Promise(function(z){if(!k)return z();var W=window.scrollX,ve=window.scrollY;I.restoreFocusTimeout=setTimeout(function(){U(),z()},K),window.scrollTo(W,ve)})},ne="swal2-",ce=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"],Q=ce.reduce(function(q,k){return q[k]=ne+k,q},{}),Me=["success","warning","info","question","error"],de=Me.reduce(function(q,k){return q[k]=ne+k,q},{}),_e="SweetAlert2:",me=function(k){return k.charAt(0).toUpperCase()+k.slice(1)},Re=function(k){console.warn("".concat(_e," ").concat(H(k)==="object"?k.join(" "):k))},Ce=function(k){console.error("".concat(_e," ").concat(k))},Ee=[],De=function(k){Ee.includes(k)||(Ee.push(k),Re(k))},ae=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;De('"'.concat(k,'" is deprecated and will be removed in the next major release.').concat(z?' Use "'.concat(z,'" instead.'):""))},pe=function(k){return typeof k=="function"?k():k},ke=function(k){return k&&typeof k.toPromise=="function"},Oe=function(k){return ke(k)?k.toPromise():Promise.resolve(k)},we=function(k){return k&&Promise.resolve(k)===k},Te=function(){return document.body.querySelector(".".concat(Q.container))},Ne=function(k){var z=Te();return z?z.querySelector(k):null},Ie=function(k){return Ne(".".concat(k))},Ae=function(){return Ie(Q.popup)},xe=function(){return Ie(Q.icon)},We=function(){return Ie(Q["icon-content"])},qe=function(){return Ie(Q.title)},ye=function(){return Ie(Q["html-container"])},Ye=function(){return Ie(Q.image)},tt=function(){return Ie(Q["progress-steps"])},pt=function(){return Ie(Q["validation-message"])},dt=function(){return Ne(".".concat(Q.actions," .").concat(Q.confirm))},Y=function(){return Ne(".".concat(Q.actions," .").concat(Q.cancel))},S=function(){return Ne(".".concat(Q.actions," .").concat(Q.deny))},A=function(){return Ie(Q["input-label"])},G=function(){return Ne(".".concat(Q.loader))},X=function(){return Ie(Q.actions)},re=function(){return Ie(Q.footer)},ge=function(){return Ie(Q["timer-progress-bar"])},fe=function(){return Ie(Q.close)},Fe=` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R(q,k){if(k&&(typeof k=="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(q)}function V(q,k){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,W){return z.__proto__=W,z},V(q,k)}function B(q,k){return r(q)||T(q,k)||j(q,k)||L()}function F(q,k){for(;!{}.hasOwnProperty.call(q,k)&&(q=y(q))!==null;);return q}function Q(q){return l(q)||$(q)||j(q)||P()}function J(q,k){if(typeof q!="object"||!q)return q;var z=q[Symbol.toPrimitive];if(z!==void 0){var W=z.call(q,k);if(typeof W!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)}function Z(q){var k=J(q,"string");return typeof k=="symbol"?k:k+""}function H(q){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},H(q)}function j(q,k){if(q){if(typeof q=="string")return o(q,k);var z={}.toString.call(q).slice(8,-1);return z==="Object"&&q.constructor&&(z=q.constructor.name),z==="Map"||z==="Set"?Array.from(q):z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z)?o(q,k):void 0}}var K=100,I={},U=function(){I.previousActiveElement instanceof HTMLElement?(I.previousActiveElement.focus(),I.previousActiveElement=null):document.body&&document.body.focus()},oe=function(k){return new Promise(function(z){if(!k)return z();var W=window.scrollX,ve=window.scrollY;I.restoreFocusTimeout=setTimeout(function(){U(),z()},K),window.scrollTo(W,ve)})},ne="swal2-",ce=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"],ee=ce.reduce(function(q,k){return q[k]=ne+k,q},{}),Me=["success","warning","info","question","error"],de=Me.reduce(function(q,k){return q[k]=ne+k,q},{}),_e="SweetAlert2:",me=function(k){return k.charAt(0).toUpperCase()+k.slice(1)},Re=function(k){console.warn("".concat(_e," ").concat(H(k)==="object"?k.join(" "):k))},Ce=function(k){console.error("".concat(_e," ").concat(k))},Ee=[],De=function(k){Ee.includes(k)||(Ee.push(k),Re(k))},ae=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;De('"'.concat(k,'" is deprecated and will be removed in the next major release.').concat(z?' Use "'.concat(z,'" instead.'):""))},pe=function(k){return typeof k=="function"?k():k},ke=function(k){return k&&typeof k.toPromise=="function"},Oe=function(k){return ke(k)?k.toPromise():Promise.resolve(k)},we=function(k){return k&&Promise.resolve(k)===k},Te=function(){return document.body.querySelector(".".concat(ee.container))},Ne=function(k){var z=Te();return z?z.querySelector(k):null},Ie=function(k){return Ne(".".concat(k))},Ae=function(){return Ie(ee.popup)},xe=function(){return Ie(ee.icon)},We=function(){return Ie(ee["icon-content"])},qe=function(){return Ie(ee.title)},ye=function(){return Ie(ee["html-container"])},Ye=function(){return Ie(ee.image)},tt=function(){return Ie(ee["progress-steps"])},pt=function(){return Ie(ee["validation-message"])},dt=function(){return Ne(".".concat(ee.actions," .").concat(ee.confirm))},Y=function(){return Ne(".".concat(ee.actions," .").concat(ee.cancel))},S=function(){return Ne(".".concat(ee.actions," .").concat(ee.deny))},A=function(){return Ie(ee["input-label"])},G=function(){return Ne(".".concat(ee.loader))},X=function(){return Ie(ee.actions)},re=function(){return Ie(ee.footer)},ge=function(){return Ie(ee["timer-progress-bar"])},fe=function(){return Ie(ee.close)},Fe=` a[href], area[href], input:not([disabled]), @@ -39,68 +39,68 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho audio[controls], video[controls], summary -`,at=function(){var k=Ae();if(!k)return[];var z=k.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),W=Array.from(z).sort(function(gt,Kt){var Ht=parseInt(gt.getAttribute("tabindex")||"0"),To=parseInt(Kt.getAttribute("tabindex")||"0");return Ht>To?1:Ht .").concat(Q[z]));case"checkbox":return k.querySelector(".".concat(Q.popup," > .").concat(Q.checkbox," input"));case"radio":return k.querySelector(".".concat(Q.popup," > .").concat(Q.radio," input:checked"))||k.querySelector(".".concat(Q.popup," > .").concat(Q.radio," input:first-child"));case"range":return k.querySelector(".".concat(Q.popup," > .").concat(Q.range," input"));default:return k.querySelector(".".concat(Q.popup," > .").concat(Q.input))}},kl=function(k){if(k.focus(),k.type!=="file"){var z=k.value;k.value="",k.value=z}},Or=function(k,z,W){!k||!z||(typeof z=="string"&&(z=z.split(/\s+/).filter(Boolean)),z.forEach(function(ve){Array.isArray(k)?k.forEach(function(je){W?je.classList.add(ve):je.classList.remove(ve)}):W?k.classList.add(ve):k.classList.remove(ve)}))},Bt=function(k,z){Or(k,z,!0)},pr=function(k,z){Or(k,z,!1)},or=function(k,z){for(var W=Array.from(k.children),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:"flex";k&&(k.style.display=z)},Eo=function(k){k&&(k.style.display="none")},rr=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";k&&new MutationObserver(function(){He(k,k.innerHTML,z)}).observe(k,{childList:!0,subtree:!0})},ua=function(k,z,W,ve){var je=k.querySelector(z);je&&je.style.setProperty(W,ve)},He=function(k,z){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";z?yo(k,W):Eo(k)},ot=function(k){return!!(k&&(k.offsetWidth||k.offsetHeight||k.getClientRects().length))},eo=function(){return!ot(dt())&&!ot(S())&&!ot(Y())},ao=function(k){return k.scrollHeight>k.clientHeight},Po=function(k){var z=window.getComputedStyle(k),W=parseFloat(z.getPropertyValue("animation-duration")||"0"),ve=parseFloat(z.getPropertyValue("transition-duration")||"0");return W>0||ve>0},Pr=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,W=ge();W&&ot(W)&&(z&&(W.style.transition="none",W.style.width="100%"),setTimeout(function(){W.style.transition="width ".concat(k/1e3,"s linear"),W.style.width="0%"},10))},Wl=function(){var k=ge();if(k){var z=parseInt(window.getComputedStyle(k).width);k.style.removeProperty("transition"),k.style.width="100%";var W=parseInt(window.getComputedStyle(k).width),ve=z/W*100;k.style.width="".concat(ve,"%")}},fr=function(){return typeof window>"u"||typeof document>"u"},hr=` -
- -
    -
    - -

    -
    - - -
    +`,at=function(){var k=Ae();if(!k)return[];var z=k.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),W=Array.from(z).sort(function(gt,Ut){var Ht=parseInt(gt.getAttribute("tabindex")||"0"),To=parseInt(Ut.getAttribute("tabindex")||"0");return Ht>To?1:Ht .").concat(ee[z]));case"checkbox":return k.querySelector(".".concat(ee.popup," > .").concat(ee.checkbox," input"));case"radio":return k.querySelector(".".concat(ee.popup," > .").concat(ee.radio," input:checked"))||k.querySelector(".".concat(ee.popup," > .").concat(ee.radio," input:first-child"));case"range":return k.querySelector(".".concat(ee.popup," > .").concat(ee.range," input"));default:return k.querySelector(".".concat(ee.popup," > .").concat(ee.input))}},kl=function(k){if(k.focus(),k.type!=="file"){var z=k.value;k.value="",k.value=z}},Or=function(k,z,W){!k||!z||(typeof z=="string"&&(z=z.split(/\s+/).filter(Boolean)),z.forEach(function(ve){Array.isArray(k)?k.forEach(function(je){W?je.classList.add(ve):je.classList.remove(ve)}):W?k.classList.add(ve):k.classList.remove(ve)}))},Bt=function(k,z){Or(k,z,!0)},pr=function(k,z){Or(k,z,!1)},or=function(k,z){for(var W=Array.from(k.children),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:"flex";k&&(k.style.display=z)},Eo=function(k){k&&(k.style.display="none")},rr=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";k&&new MutationObserver(function(){He(k,k.innerHTML,z)}).observe(k,{childList:!0,subtree:!0})},ua=function(k,z,W,ve){var je=k.querySelector(z);je&&je.style.setProperty(W,ve)},He=function(k,z){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";z?yo(k,W):Eo(k)},ot=function(k){return!!(k&&(k.offsetWidth||k.offsetHeight||k.getClientRects().length))},eo=function(){return!ot(dt())&&!ot(S())&&!ot(Y())},ao=function(k){return k.scrollHeight>k.clientHeight},Po=function(k){var z=window.getComputedStyle(k),W=parseFloat(z.getPropertyValue("animation-duration")||"0"),ve=parseFloat(z.getPropertyValue("transition-duration")||"0");return W>0||ve>0},Pr=function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,W=ge();W&&ot(W)&&(z&&(W.style.transition="none",W.style.width="100%"),setTimeout(function(){W.style.transition="width ".concat(k/1e3,"s linear"),W.style.width="0%"},10))},Wl=function(){var k=ge();if(k){var z=parseInt(window.getComputedStyle(k).width);k.style.removeProperty("transition"),k.style.width="100%";var W=parseInt(window.getComputedStyle(k).width),ve=z/W*100;k.style.width="".concat(ve,"%")}},fr=function(){return typeof window>"u"||typeof document>"u"},hr=` +
    + +
      +
      + +

      +
      + + +
      - -
      -
      ")},ef=function(k,z){var W=Ye();if(W){if(!z.imageUrl){Eo(W);return}yo(W,""),W.setAttribute("src",z.imageUrl),W.setAttribute("alt",z.imageAlt||""),Nr(W,"width",z.imageWidth),Nr(W,"height",z.imageHeight),W.className=Q.image,qo(W,z,"image")}},bm=function(k,z){var W=Te(),ve=Ae();if(!(!W||!ve)){if(z.toast){Nr(W,"width",z.width),ve.style.width="100%";var je=G();je&&ve.insertBefore(je,xe())}else Nr(ve,"width",z.width);Nr(ve,"padding",z.padding),z.color&&(ve.style.color=z.color),z.background&&(ve.style.background=z.background),Eo(pt()),cu(ve,z)}},cu=function(k,z){var W=z.showClass||{};k.className="".concat(Q.popup," ").concat(ot(k)?W.popup:""),z.toast?(Bt([document.documentElement,document.body],Q["toast-shown"]),Bt(k,Q.toast)):Bt(k,Q.modal),qo(k,z,"popup"),typeof z.customClass=="string"&&Bt(k,z.customClass),z.icon&&Bt(k,Q["icon-".concat(z.icon)])},tf=function(k,z){var W=tt();if(W){var ve=z.progressSteps,je=z.currentProgressStep;if(!ve||ve.length===0||je===void 0){Eo(W);return}yo(W),W.textContent="",je>=ve.length&&Re("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),ve.forEach(function(gt,Kt){var Ht=_m(gt);if(W.appendChild(Ht),Kt===je&&Bt(Ht,Q["active-progress-step"]),Kt!==ve.length-1){var To=wm(z);W.appendChild(To)}})}},_m=function(k){var z=document.createElement("li");return Bt(z,Q["progress-step"]),bt(z,k),z},wm=function(k){var z=document.createElement("li");return Bt(z,Q["progress-step-line"]),k.progressStepsDistance&&Nr(z,"width",k.progressStepsDistance),z},of=function(k,z){var W=qe();W&&(rr(W),He(W,z.title||z.titleText,"block"),z.title&&ru(z.title,W),z.titleText&&(W.innerText=z.titleText),qo(W,z,"title"))},rf=function(k,z){bm(k,z),nm(k,z),tf(k,z),hm(k,z),ef(k,z),of(k,z),lm(k,z),Tn(k,z),lu(k,z),fm(k,z);var W=Ae();typeof z.didRender=="function"&&W&&z.didRender(W)},ws=function(){return ot(Ae())},lf=function(){var k;return(k=dt())===null||k===void 0?void 0:k.click()},uu=function(){var k;return(k=S())===null||k===void 0?void 0:k.click()},ym=function(){var k;return(k=Y())===null||k===void 0?void 0:k.click()},da=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ie=function(k){k.keydownTarget&&k.keydownHandlerAdded&&(k.keydownTarget.removeEventListener("keydown",k.keydownHandler,{capture:k.keydownListenerCapture}),k.keydownHandlerAdded=!1)},Ve=function(k,z,W){ie(k),z.toast||(k.keydownHandler=function(ve){return mr(z,ve,W)},k.keydownTarget=z.keydownListenerCapture?window:Ae(),k.keydownListenerCapture=z.keydownListenerCapture,k.keydownTarget.addEventListener("keydown",k.keydownHandler,{capture:k.keydownListenerCapture}),k.keydownHandlerAdded=!0)},Xe=function(k,z){var W,ve=at();if(ve.length){k=k+z,k===ve.length?k=0:k===-1&&(k=ve.length-1),ve[k].focus();return}(W=Ae())===null||W===void 0||W.focus()},$t=["ArrowRight","ArrowDown"],Yo=["ArrowLeft","ArrowUp"],mr=function(k,z,W){k&&(z.isComposing||z.keyCode===229||(k.stopKeydownPropagation&&z.stopPropagation(),z.key==="Enter"?Sl(z,k):z.key==="Tab"?gr(z):[].concat($t,Yo).includes(z.key)?nf(z.key):z.key==="Escape"&&pa(z,k,W)))},Sl=function(k,z){if(pe(z.allowEnterKey)){var W=xl(Ae(),z.input);if(k.target&&W&&k.target instanceof HTMLElement&&k.target.outerHTML===W.outerHTML){if(["textarea","file"].includes(z.input))return;lf(),k.preventDefault()}}},gr=function(k){for(var z=k.target,W=at(),ve=-1,je=0;je1},_de=function(){if(Qt(document.body,Q.iosfix)){var k=parseInt(document.body.style.top,10);pr(document.body,Q.iosfix),document.body.style.top="",document.body.scrollTop=k*-1}},wde=function(){var k=document.createElement("div");k.className=Q["scrollbar-measure"],document.body.appendChild(k);var z=k.getBoundingClientRect().width-k.clientWidth;return document.body.removeChild(k),z},ks=null,yde=function(k){ks===null&&(document.body.scrollHeight>window.innerHeight||k==="scroll")&&(ks=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(ks+wde(),"px"))},xde=function(){ks!==null&&(document.body.style.paddingRight="".concat(ks,"px"),ks=null)};function qx(q,k,z,W){At()?Gx(q,W):(oe(z).then(function(){return Gx(q,W)}),ie(I)),ys?(k.setAttribute("style","display:none !important"),k.removeAttribute("class"),k.innerHTML=""):k.remove(),_t()&&(xde(),_de(),du()),kde()}function kde(){pr([document.documentElement,document.body],[Q.shown,Q["height-auto"],Q["no-backdrop"],Q["toast-shown"]])}function fa(q){q=Sde(q);var k=Mn.swalPromiseResolve.get(this),z=Cde(this);this.isAwaitingPromise?q.isDismissed||(pu(this),k(q)):z&&k(q)}var Cde=function(k){var z=Ae();if(!z)return!1;var W=po.innerParams.get(k);if(!W||Qt(z,W.hideClass.popup))return!1;pr(z,W.showClass.popup),Bt(z,W.hideClass.popup);var ve=Te();return pr(ve,W.showClass.backdrop),Bt(ve,W.hideClass.backdrop),Ede(k,z,W),!0};function Yx(q){var k=Mn.swalPromiseReject.get(this);pu(this),k&&k(q)}var pu=function(k){k.isAwaitingPromise&&(delete k.isAwaitingPromise,po.innerParams.get(k)||k._destroy())},Sde=function(k){return typeof k>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},k)},Ede=function(k,z,W){var ve=Te(),je=En&&Po(z);typeof W.willClose=="function"&&W.willClose(z),je?Tde(k,z,ve,W.returnFocus,W.didClose):qx(k,ve,W.returnFocus,W.didClose)},Tde=function(k,z,W,ve,je){En&&(I.swalCloseEventFinishedCallback=qx.bind(null,k,W,ve,je),z.addEventListener(En,function(gt){gt.target===z&&(I.swalCloseEventFinishedCallback(),delete I.swalCloseEventFinishedCallback)}))},Gx=function(k,z){setTimeout(function(){typeof z=="function"&&z.bind(k.params)(),k._destroy&&k._destroy()})},Cs=function(k){var z=Ae();if(z||new pf,z=Ae(),!!z){var W=G();At()?Eo(xe()):$de(z,k),yo(W),z.setAttribute("data-loading","true"),z.setAttribute("aria-busy","true"),z.focus()}},$de=function(k,z){var W=X(),ve=G();!W||!ve||(!z&&ot(dt())&&(z=dt()),yo(W),z&&(Eo(z),ve.setAttribute("data-button-to-replace",z.className),W.insertBefore(ve,z)),Bt([k,W],Q.loading))},Mde=function(k,z){z.input==="select"||z.input==="radio"?Nde(k,z):["text","email","number","tel","textarea"].some(function(W){return W===z.input})&&(ke(z.inputValue)||we(z.inputValue))&&(Cs(dt()),Pde(k,z))},Ade=function(k,z){var W=k.getInput();if(!W)return null;switch(z.input){case"checkbox":return zde(W);case"radio":return Ide(W);case"file":return Ode(W);default:return z.inputAutoTrim?W.value.trim():W.value}},zde=function(k){return k.checked?1:0},Ide=function(k){return k.checked?k.value:null},Ode=function(k){return k.files&&k.files.length?k.getAttribute("multiple")!==null?k.files:k.files[0]:null},Nde=function(k,z){var W=Ae();if(W){var ve=function(gt){z.input==="select"?Rde(W,Xx(gt),z):z.input==="radio"&&Lde(W,Xx(gt),z)};ke(z.inputOptions)||we(z.inputOptions)?(Cs(dt()),Oe(z.inputOptions).then(function(je){k.hideLoading(),ve(je)})):H(z.inputOptions)==="object"?ve(z.inputOptions):Ce("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(H(z.inputOptions)))}},Pde=function(k,z){var W=k.getInput();W&&(Eo(W),Oe(z.inputValue).then(function(ve){W.value=z.input==="number"?"".concat(parseFloat(ve)||0):"".concat(ve),yo(W),W.focus(),k.hideLoading()}).catch(function(ve){Ce("Error in inputValue promise: ".concat(ve)),W.value="",yo(W),W.focus(),k.hideLoading()}))};function Rde(q,k,z){var W=or(q,Q.select);if(W){var ve=function(gt,Kt,Ht){var To=document.createElement("option");To.value=Ht,bt(To,Kt),To.selected=Zx(Ht,z.inputValue),gt.appendChild(To)};k.forEach(function(je){var gt=je[0],Kt=je[1];if(Array.isArray(Kt)){var Ht=document.createElement("optgroup");Ht.label=gt,Ht.disabled=!1,W.appendChild(Ht),Kt.forEach(function(To){return ve(Ht,To[1],To[0])})}else ve(W,Kt,gt)}),W.focus()}}function Lde(q,k,z){var W=or(q,Q.radio);if(W){k.forEach(function(je){var gt=je[0],Kt=je[1],Ht=document.createElement("input"),To=document.createElement("label");Ht.type="radio",Ht.name=Q.radio,Ht.value=gt,Zx(gt,z.inputValue)&&(Ht.checked=!0);var fu=document.createElement("span");bt(fu,Kt),fu.className=Q.label,To.appendChild(Ht),To.appendChild(fu),W.appendChild(To)});var ve=W.querySelectorAll("input");ve.length&&ve[0].focus()}}var Xx=function q(k){var z=[];return k instanceof Map?k.forEach(function(W,ve){var je=W;H(je)==="object"&&(je=q(je)),z.push([ve,je])}):Object.keys(k).forEach(function(W){var ve=k[W];H(ve)==="object"&&(ve=q(ve)),z.push([W,ve])}),z},Zx=function(k,z){return!!z&&z.toString()===k.toString()},sf=void 0,Bde=function(k){var z=po.innerParams.get(k);k.disableButtons(),z.input?Jx(k,"confirm"):km(k,!0)},Vde=function(k){var z=po.innerParams.get(k);k.disableButtons(),z.returnInputValueOnDeny?Jx(k,"deny"):xm(k,!1)},Dde=function(k,z){k.disableButtons(),z(da.cancel)},Jx=function(k,z){var W=po.innerParams.get(k);if(!W.input){Ce('The "input" parameter is needed to be set when using returnInputValueOn'.concat(me(z)));return}var ve=k.getInput(),je=Ade(k,W);W.inputValidator?Hde(k,je,z):ve&&!ve.checkValidity()?(k.enableButtons(),k.showValidationMessage(W.validationMessage||ve.validationMessage)):z==="deny"?xm(k,je):km(k,je)},Hde=function(k,z,W){var ve=po.innerParams.get(k);k.disableInput();var je=Promise.resolve().then(function(){return Oe(ve.inputValidator(z,ve.validationMessage))});je.then(function(gt){k.enableButtons(),k.enableInput(),gt?k.showValidationMessage(gt):W==="deny"?xm(k,z):km(k,z)})},xm=function(k,z){var W=po.innerParams.get(k||sf);if(W.showLoaderOnDeny&&Cs(S()),W.preDeny){k.isAwaitingPromise=!0;var ve=Promise.resolve().then(function(){return Oe(W.preDeny(z,W.validationMessage))});ve.then(function(je){je===!1?(k.hideLoading(),pu(k)):k.close({isDenied:!0,value:typeof je>"u"?z:je})}).catch(function(je){return e5(k||sf,je)})}else k.close({isDenied:!0,value:z})},Qx=function(k,z){k.close({isConfirmed:!0,value:z})},e5=function(k,z){k.rejectPromise(z)},km=function(k,z){var W=po.innerParams.get(k||sf);if(W.showLoaderOnConfirm&&Cs(),W.preConfirm){k.resetValidationMessage(),k.isAwaitingPromise=!0;var ve=Promise.resolve().then(function(){return Oe(W.preConfirm(z,W.validationMessage))});ve.then(function(je){ot(pt())||je===!1?(k.hideLoading(),pu(k)):Qx(k,typeof je>"u"?z:je)}).catch(function(je){return e5(k||sf,je)})}else Qx(k,z)};function cf(){var q=po.innerParams.get(this);if(q){var k=po.domCache.get(this);Eo(k.loader),At()?q.icon&&yo(xe()):Fde(k),pr([k.popup,k.actions],Q.loading),k.popup.removeAttribute("aria-busy"),k.popup.removeAttribute("data-loading"),k.confirmButton.disabled=!1,k.denyButton.disabled=!1,k.cancelButton.disabled=!1}}var Fde=function(k){var z=k.popup.getElementsByClassName(k.loader.getAttribute("data-button-to-replace"));z.length?yo(z[0],"inline-block"):eo()&&Eo(k.actions)};function t5(){var q=po.innerParams.get(this),k=po.domCache.get(this);return k?xl(k.popup,q.input):null}function o5(q,k,z){var W=po.domCache.get(q);k.forEach(function(ve){W[ve].disabled=z})}function r5(q,k){var z=Ae();if(!(!z||!q))if(q.type==="radio")for(var W=z.querySelectorAll('[name="'.concat(Q.radio,'"]')),ve=0;ve0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Sm[q]=this,_5||(document.body.addEventListener("click",hpe),_5=!0)}var hpe=function(k){for(var z=k.target;z&&z!==document;z=z.parentNode)for(var W in Sm){var ve=z.getAttribute(W);if(ve){Sm[W].fire({template:ve});return}}},vpe=Object.freeze({__proto__:null,argsToParams:ape,bindClickHandler:fpe,clickCancel:ym,clickConfirm:lf,clickDeny:uu,enableLoading:Cs,fire:ipe,getActions:X,getCancelButton:Y,getCloseButton:fe,getConfirmButton:dt,getContainer:Te,getDenyButton:S,getFocusableElements:at,getFooter:re,getHtmlContainer:ye,getIcon:xe,getIconContent:We,getImage:Ye,getInputLabel:A,getLoader:G,getPopup:Ae,getProgressSteps:tt,getTimerLeft:cpe,getTimerProgressBar:ge,getTitle:qe,getValidationMessage:pt,increaseTimer:dpe,isDeprecatedParameter:p5,isLoading:no,isTimerRunning:ppe,isUpdatableParameter:d5,isValidParameter:u5,isVisible:ws,mixin:spe,resumeTimer:b5,showLoading:Cs,stopTimer:g5,toggleTimer:upe}),mpe=function(){function q(k,z){d(this,q),this.callback=k,this.remaining=z,this.running=!1,this.start()}return f(q,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(z){var W=this.running;return W&&this.stop(),this.remaining+=z,W&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),w5=["swal-title","swal-html","swal-footer"],gpe=function(k){var z=typeof k.template=="string"?document.querySelector(k.template):k.template;if(!z)return{};var W=z.content;Spe(W);var ve=Object.assign(bpe(W),_pe(W),wpe(W),ype(W),xpe(W),kpe(W),Cpe(W,w5));return ve},bpe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-param"));return W.forEach(function(ve){ai(ve,["name","value"]);var je=ve.getAttribute("name"),gt=ve.getAttribute("value");typeof Ss[je]=="boolean"?z[je]=gt!=="false":H(Ss[je])==="object"?z[je]=JSON.parse(gt):z[je]=gt}),z},_pe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-function-param"));return W.forEach(function(ve){var je=ve.getAttribute("name"),gt=ve.getAttribute("value");z[je]=new Function("return ".concat(gt))()}),z},wpe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-button"));return W.forEach(function(ve){ai(ve,["type","color","aria-label"]);var je=ve.getAttribute("type");z["".concat(je,"ButtonText")]=ve.innerHTML,z["show".concat(me(je),"Button")]=!0,ve.hasAttribute("color")&&(z["".concat(je,"ButtonColor")]=ve.getAttribute("color")),ve.hasAttribute("aria-label")&&(z["".concat(je,"ButtonAriaLabel")]=ve.getAttribute("aria-label"))}),z},ype=function(k){var z={},W=k.querySelector("swal-image");return W&&(ai(W,["src","width","height","alt"]),W.hasAttribute("src")&&(z.imageUrl=W.getAttribute("src")||void 0),W.hasAttribute("width")&&(z.imageWidth=W.getAttribute("width")||void 0),W.hasAttribute("height")&&(z.imageHeight=W.getAttribute("height")||void 0),W.hasAttribute("alt")&&(z.imageAlt=W.getAttribute("alt")||void 0)),z},xpe=function(k){var z={},W=k.querySelector("swal-icon");return W&&(ai(W,["type","color"]),W.hasAttribute("type")&&(z.icon=W.getAttribute("type")),W.hasAttribute("color")&&(z.iconColor=W.getAttribute("color")),z.iconHtml=W.innerHTML),z},kpe=function(k){var z={},W=k.querySelector("swal-input");W&&(ai(W,["type","label","placeholder","value"]),z.input=W.getAttribute("type")||"text",W.hasAttribute("label")&&(z.inputLabel=W.getAttribute("label")),W.hasAttribute("placeholder")&&(z.inputPlaceholder=W.getAttribute("placeholder")),W.hasAttribute("value")&&(z.inputValue=W.getAttribute("value")));var ve=Array.from(k.querySelectorAll("swal-input-option"));return ve.length&&(z.inputOptions={},ve.forEach(function(je){ai(je,["value"]);var gt=je.getAttribute("value"),Kt=je.innerHTML;z.inputOptions[gt]=Kt})),z},Cpe=function(k,z){var W={};for(var ve in z){var je=z[ve],gt=k.querySelector(je);gt&&(ai(gt,[]),W[je.replace(/^swal-/,"")]=gt.innerHTML.trim())}return W},Spe=function(k){var z=w5.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(k.children).forEach(function(W){var ve=W.tagName.toLowerCase();z.includes(ve)||Re("Unrecognized element <".concat(ve,">"))})},ai=function(k,z){Array.from(k.attributes).forEach(function(W){z.indexOf(W.name)===-1&&Re(['Unrecognized attribute "'.concat(W.name,'" on <').concat(k.tagName.toLowerCase(),">."),"".concat(z.length?"Allowed attributes are: ".concat(z.join(", ")):"To set the value, use HTML within the element.")])})},y5=10,Epe=function(k){var z=Te(),W=Ae();typeof k.willOpen=="function"&&k.willOpen(W);var ve=window.getComputedStyle(document.body),je=ve.overflowY;Ape(z,W,k),setTimeout(function(){$pe(z,W)},y5),_t()&&(Mpe(z,k.scrollbarPadding,je),af()),!At()&&!I.previousActiveElement&&(I.previousActiveElement=document.activeElement),typeof k.didOpen=="function"&&setTimeout(function(){return k.didOpen(W)}),pr(z,Q["no-transition"])},Tpe=function q(k){var z=Ae();if(!(k.target!==z||!En)){var W=Te();z.removeEventListener(En,q),W.style.overflowY="auto"}},$pe=function(k,z){En&&Po(z)?(k.style.overflowY="hidden",z.addEventListener(En,Tpe)):k.style.overflowY="auto"},Mpe=function(k,z,W){xs(),z&&W!=="hidden"&&yde(W),setTimeout(function(){k.scrollTop=0})},Ape=function(k,z,W){Bt(k,W.showClass.backdrop),W.animation?(z.style.setProperty("opacity","0","important"),yo(z,"grid"),setTimeout(function(){Bt(z,W.showClass.popup),z.style.removeProperty("opacity")},y5)):yo(z,"grid"),Bt([document.documentElement,document.body],Q.shown),W.heightAuto&&W.backdrop&&!W.toast&&Bt([document.documentElement,document.body],Q["height-auto"])},x5={email:function(k,z){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(k)?Promise.resolve():Promise.resolve(z||"Invalid email address")},url:function(k,z){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(k)?Promise.resolve():Promise.resolve(z||"Invalid URL")}};function zpe(q){q.inputValidator||(q.input==="email"&&(q.inputValidator=x5.email),q.input==="url"&&(q.inputValidator=x5.url))}function Ipe(q){(!q.target||typeof q.target=="string"&&!document.querySelector(q.target)||typeof q.target!="string"&&!q.target.appendChild)&&(Re('Target parameter is not valid, defaulting to "body"'),q.target="body")}function Ope(q){zpe(q),q.showLoaderOnConfirm&&!q.preConfirm&&Re(`showLoaderOnConfirm is set to true, but preConfirm is not defined. +`,iu=function(k,z){if(!(!z.icon&&!z.iconHtml)){var W=k.innerHTML,ve="";if(z.iconHtml)ve=Jp(z.iconHtml);else if(z.icon==="success")ve=vm,W=W.replace(/ style=".*?"/g,"");else if(z.icon==="error")ve=mm;else if(z.icon){var je={question:"?",warning:"!",info:"i"};ve=Jp(je[z.icon])}W.trim()!==ve.trim()&&bt(k,ve)}},$n=function(k,z){if(z.iconColor){k.style.color=z.iconColor,k.style.borderColor=z.iconColor;for(var W=0,ve=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];W').concat(k,"
      ")},Qp=function(k,z){var W=Ye();if(W){if(!z.imageUrl){Eo(W);return}yo(W,""),W.setAttribute("src",z.imageUrl),W.setAttribute("alt",z.imageAlt||""),Nr(W,"width",z.imageWidth),Nr(W,"height",z.imageHeight),W.className=ee.image,qo(W,z,"image")}},gm=function(k,z){var W=Te(),ve=Ae();if(!(!W||!ve)){if(z.toast){Nr(W,"width",z.width),ve.style.width="100%";var je=G();je&&ve.insertBefore(je,xe())}else Nr(ve,"width",z.width);Nr(ve,"padding",z.padding),z.color&&(ve.style.color=z.color),z.background&&(ve.style.background=z.background),Eo(pt()),su(ve,z)}},su=function(k,z){var W=z.showClass||{};k.className="".concat(ee.popup," ").concat(ot(k)?W.popup:""),z.toast?(Bt([document.documentElement,document.body],ee["toast-shown"]),Bt(k,ee.toast)):Bt(k,ee.modal),qo(k,z,"popup"),typeof z.customClass=="string"&&Bt(k,z.customClass),z.icon&&Bt(k,ee["icon-".concat(z.icon)])},ef=function(k,z){var W=tt();if(W){var ve=z.progressSteps,je=z.currentProgressStep;if(!ve||ve.length===0||je===void 0){Eo(W);return}yo(W),W.textContent="",je>=ve.length&&Re("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),ve.forEach(function(gt,Ut){var Ht=bm(gt);if(W.appendChild(Ht),Ut===je&&Bt(Ht,ee["active-progress-step"]),Ut!==ve.length-1){var To=_m(z);W.appendChild(To)}})}},bm=function(k){var z=document.createElement("li");return Bt(z,ee["progress-step"]),bt(z,k),z},_m=function(k){var z=document.createElement("li");return Bt(z,ee["progress-step-line"]),k.progressStepsDistance&&Nr(z,"width",k.progressStepsDistance),z},tf=function(k,z){var W=qe();W&&(rr(W),He(W,z.title||z.titleText,"block"),z.title&&ou(z.title,W),z.titleText&&(W.innerText=z.titleText),qo(W,z,"title"))},of=function(k,z){gm(k,z),lm(k,z),ef(k,z),fm(k,z),Qp(k,z),tf(k,z),rm(k,z),Tn(k,z),ru(k,z),pm(k,z);var W=Ae();typeof z.didRender=="function"&&W&&z.didRender(W)},ws=function(){return ot(Ae())},rf=function(){var k;return(k=dt())===null||k===void 0?void 0:k.click()},cu=function(){var k;return(k=S())===null||k===void 0?void 0:k.click()},wm=function(){var k;return(k=Y())===null||k===void 0?void 0:k.click()},da=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ie=function(k){k.keydownTarget&&k.keydownHandlerAdded&&(k.keydownTarget.removeEventListener("keydown",k.keydownHandler,{capture:k.keydownListenerCapture}),k.keydownHandlerAdded=!1)},Ve=function(k,z,W){ie(k),z.toast||(k.keydownHandler=function(ve){return mr(z,ve,W)},k.keydownTarget=z.keydownListenerCapture?window:Ae(),k.keydownListenerCapture=z.keydownListenerCapture,k.keydownTarget.addEventListener("keydown",k.keydownHandler,{capture:k.keydownListenerCapture}),k.keydownHandlerAdded=!0)},Xe=function(k,z){var W,ve=at();if(ve.length){k=k+z,k===ve.length?k=0:k===-1&&(k=ve.length-1),ve[k].focus();return}(W=Ae())===null||W===void 0||W.focus()},$t=["ArrowRight","ArrowDown"],Yo=["ArrowLeft","ArrowUp"],mr=function(k,z,W){k&&(z.isComposing||z.keyCode===229||(k.stopKeydownPropagation&&z.stopPropagation(),z.key==="Enter"?Sl(z,k):z.key==="Tab"?gr(z):[].concat($t,Yo).includes(z.key)?lf(z.key):z.key==="Escape"&&pa(z,k,W)))},Sl=function(k,z){if(pe(z.allowEnterKey)){var W=xl(Ae(),z.input);if(k.target&&W&&k.target instanceof HTMLElement&&k.target.outerHTML===W.outerHTML){if(["textarea","file"].includes(z.input))return;rf(),k.preventDefault()}}},gr=function(k){for(var z=k.target,W=at(),ve=-1,je=0;je1},bde=function(){if(Qt(document.body,ee.iosfix)){var k=parseInt(document.body.style.top,10);pr(document.body,ee.iosfix),document.body.style.top="",document.body.scrollTop=k*-1}},_de=function(){var k=document.createElement("div");k.className=ee["scrollbar-measure"],document.body.appendChild(k);var z=k.getBoundingClientRect().width-k.clientWidth;return document.body.removeChild(k),z},ks=null,wde=function(k){ks===null&&(document.body.scrollHeight>window.innerHeight||k==="scroll")&&(ks=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(ks+_de(),"px"))},yde=function(){ks!==null&&(document.body.style.paddingRight="".concat(ks,"px"),ks=null)};function Wx(q,k,z,W){At()?Yx(q,W):(oe(z).then(function(){return Yx(q,W)}),ie(I)),ys?(k.setAttribute("style","display:none !important"),k.removeAttribute("class"),k.innerHTML=""):k.remove(),_t()&&(yde(),bde(),uu()),xde()}function xde(){pr([document.documentElement,document.body],[ee.shown,ee["height-auto"],ee["no-backdrop"],ee["toast-shown"]])}function fa(q){q=Cde(q);var k=Mn.swalPromiseResolve.get(this),z=kde(this);this.isAwaitingPromise?q.isDismissed||(du(this),k(q)):z&&k(q)}var kde=function(k){var z=Ae();if(!z)return!1;var W=po.innerParams.get(k);if(!W||Qt(z,W.hideClass.popup))return!1;pr(z,W.showClass.popup),Bt(z,W.hideClass.popup);var ve=Te();return pr(ve,W.showClass.backdrop),Bt(ve,W.hideClass.backdrop),Sde(k,z,W),!0};function qx(q){var k=Mn.swalPromiseReject.get(this);du(this),k&&k(q)}var du=function(k){k.isAwaitingPromise&&(delete k.isAwaitingPromise,po.innerParams.get(k)||k._destroy())},Cde=function(k){return typeof k>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},k)},Sde=function(k,z,W){var ve=Te(),je=En&&Po(z);typeof W.willClose=="function"&&W.willClose(z),je?Ede(k,z,ve,W.returnFocus,W.didClose):Wx(k,ve,W.returnFocus,W.didClose)},Ede=function(k,z,W,ve,je){En&&(I.swalCloseEventFinishedCallback=Wx.bind(null,k,W,ve,je),z.addEventListener(En,function(gt){gt.target===z&&(I.swalCloseEventFinishedCallback(),delete I.swalCloseEventFinishedCallback)}))},Yx=function(k,z){setTimeout(function(){typeof z=="function"&&z.bind(k.params)(),k._destroy&&k._destroy()})},Cs=function(k){var z=Ae();if(z||new df,z=Ae(),!!z){var W=G();At()?Eo(xe()):Tde(z,k),yo(W),z.setAttribute("data-loading","true"),z.setAttribute("aria-busy","true"),z.focus()}},Tde=function(k,z){var W=X(),ve=G();!W||!ve||(!z&&ot(dt())&&(z=dt()),yo(W),z&&(Eo(z),ve.setAttribute("data-button-to-replace",z.className),W.insertBefore(ve,z)),Bt([k,W],ee.loading))},$de=function(k,z){z.input==="select"||z.input==="radio"?Ode(k,z):["text","email","number","tel","textarea"].some(function(W){return W===z.input})&&(ke(z.inputValue)||we(z.inputValue))&&(Cs(dt()),Nde(k,z))},Mde=function(k,z){var W=k.getInput();if(!W)return null;switch(z.input){case"checkbox":return Ade(W);case"radio":return zde(W);case"file":return Ide(W);default:return z.inputAutoTrim?W.value.trim():W.value}},Ade=function(k){return k.checked?1:0},zde=function(k){return k.checked?k.value:null},Ide=function(k){return k.files&&k.files.length?k.getAttribute("multiple")!==null?k.files:k.files[0]:null},Ode=function(k,z){var W=Ae();if(W){var ve=function(gt){z.input==="select"?Pde(W,Gx(gt),z):z.input==="radio"&&Rde(W,Gx(gt),z)};ke(z.inputOptions)||we(z.inputOptions)?(Cs(dt()),Oe(z.inputOptions).then(function(je){k.hideLoading(),ve(je)})):H(z.inputOptions)==="object"?ve(z.inputOptions):Ce("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(H(z.inputOptions)))}},Nde=function(k,z){var W=k.getInput();W&&(Eo(W),Oe(z.inputValue).then(function(ve){W.value=z.input==="number"?"".concat(parseFloat(ve)||0):"".concat(ve),yo(W),W.focus(),k.hideLoading()}).catch(function(ve){Ce("Error in inputValue promise: ".concat(ve)),W.value="",yo(W),W.focus(),k.hideLoading()}))};function Pde(q,k,z){var W=or(q,ee.select);if(W){var ve=function(gt,Ut,Ht){var To=document.createElement("option");To.value=Ht,bt(To,Ut),To.selected=Xx(Ht,z.inputValue),gt.appendChild(To)};k.forEach(function(je){var gt=je[0],Ut=je[1];if(Array.isArray(Ut)){var Ht=document.createElement("optgroup");Ht.label=gt,Ht.disabled=!1,W.appendChild(Ht),Ut.forEach(function(To){return ve(Ht,To[1],To[0])})}else ve(W,Ut,gt)}),W.focus()}}function Rde(q,k,z){var W=or(q,ee.radio);if(W){k.forEach(function(je){var gt=je[0],Ut=je[1],Ht=document.createElement("input"),To=document.createElement("label");Ht.type="radio",Ht.name=ee.radio,Ht.value=gt,Xx(gt,z.inputValue)&&(Ht.checked=!0);var pu=document.createElement("span");bt(pu,Ut),pu.className=ee.label,To.appendChild(Ht),To.appendChild(pu),W.appendChild(To)});var ve=W.querySelectorAll("input");ve.length&&ve[0].focus()}}var Gx=function q(k){var z=[];return k instanceof Map?k.forEach(function(W,ve){var je=W;H(je)==="object"&&(je=q(je)),z.push([ve,je])}):Object.keys(k).forEach(function(W){var ve=k[W];H(ve)==="object"&&(ve=q(ve)),z.push([W,ve])}),z},Xx=function(k,z){return!!z&&z.toString()===k.toString()},af=void 0,Lde=function(k){var z=po.innerParams.get(k);k.disableButtons(),z.input?Zx(k,"confirm"):xm(k,!0)},Bde=function(k){var z=po.innerParams.get(k);k.disableButtons(),z.returnInputValueOnDeny?Zx(k,"deny"):ym(k,!1)},Vde=function(k,z){k.disableButtons(),z(da.cancel)},Zx=function(k,z){var W=po.innerParams.get(k);if(!W.input){Ce('The "input" parameter is needed to be set when using returnInputValueOn'.concat(me(z)));return}var ve=k.getInput(),je=Mde(k,W);W.inputValidator?Dde(k,je,z):ve&&!ve.checkValidity()?(k.enableButtons(),k.showValidationMessage(W.validationMessage||ve.validationMessage)):z==="deny"?ym(k,je):xm(k,je)},Dde=function(k,z,W){var ve=po.innerParams.get(k);k.disableInput();var je=Promise.resolve().then(function(){return Oe(ve.inputValidator(z,ve.validationMessage))});je.then(function(gt){k.enableButtons(),k.enableInput(),gt?k.showValidationMessage(gt):W==="deny"?ym(k,z):xm(k,z)})},ym=function(k,z){var W=po.innerParams.get(k||af);if(W.showLoaderOnDeny&&Cs(S()),W.preDeny){k.isAwaitingPromise=!0;var ve=Promise.resolve().then(function(){return Oe(W.preDeny(z,W.validationMessage))});ve.then(function(je){je===!1?(k.hideLoading(),du(k)):k.close({isDenied:!0,value:typeof je>"u"?z:je})}).catch(function(je){return Qx(k||af,je)})}else k.close({isDenied:!0,value:z})},Jx=function(k,z){k.close({isConfirmed:!0,value:z})},Qx=function(k,z){k.rejectPromise(z)},xm=function(k,z){var W=po.innerParams.get(k||af);if(W.showLoaderOnConfirm&&Cs(),W.preConfirm){k.resetValidationMessage(),k.isAwaitingPromise=!0;var ve=Promise.resolve().then(function(){return Oe(W.preConfirm(z,W.validationMessage))});ve.then(function(je){ot(pt())||je===!1?(k.hideLoading(),du(k)):Jx(k,typeof je>"u"?z:je)}).catch(function(je){return Qx(k||af,je)})}else Jx(k,z)};function sf(){var q=po.innerParams.get(this);if(q){var k=po.domCache.get(this);Eo(k.loader),At()?q.icon&&yo(xe()):Hde(k),pr([k.popup,k.actions],ee.loading),k.popup.removeAttribute("aria-busy"),k.popup.removeAttribute("data-loading"),k.confirmButton.disabled=!1,k.denyButton.disabled=!1,k.cancelButton.disabled=!1}}var Hde=function(k){var z=k.popup.getElementsByClassName(k.loader.getAttribute("data-button-to-replace"));z.length?yo(z[0],"inline-block"):eo()&&Eo(k.actions)};function e5(){var q=po.innerParams.get(this),k=po.domCache.get(this);return k?xl(k.popup,q.input):null}function t5(q,k,z){var W=po.domCache.get(q);k.forEach(function(ve){W[ve].disabled=z})}function o5(q,k){var z=Ae();if(!(!z||!q))if(q.type==="radio")for(var W=z.querySelectorAll('[name="'.concat(ee.radio,'"]')),ve=0;ve0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Cm[q]=this,b5||(document.body.addEventListener("click",fpe),b5=!0)}var fpe=function(k){for(var z=k.target;z&&z!==document;z=z.parentNode)for(var W in Cm){var ve=z.getAttribute(W);if(ve){Cm[W].fire({template:ve});return}}},hpe=Object.freeze({__proto__:null,argsToParams:npe,bindClickHandler:ppe,clickCancel:wm,clickConfirm:rf,clickDeny:cu,enableLoading:Cs,fire:ape,getActions:X,getCancelButton:Y,getCloseButton:fe,getConfirmButton:dt,getContainer:Te,getDenyButton:S,getFocusableElements:at,getFooter:re,getHtmlContainer:ye,getIcon:xe,getIconContent:We,getImage:Ye,getInputLabel:A,getLoader:G,getPopup:Ae,getProgressSteps:tt,getTimerLeft:spe,getTimerProgressBar:ge,getTitle:qe,getValidationMessage:pt,increaseTimer:upe,isDeprecatedParameter:d5,isLoading:no,isTimerRunning:dpe,isUpdatableParameter:u5,isValidParameter:c5,isVisible:ws,mixin:ipe,resumeTimer:g5,showLoading:Cs,stopTimer:m5,toggleTimer:cpe}),vpe=function(){function q(k,z){d(this,q),this.callback=k,this.remaining=z,this.running=!1,this.start()}return f(q,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(z){var W=this.running;return W&&this.stop(),this.remaining+=z,W&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),_5=["swal-title","swal-html","swal-footer"],mpe=function(k){var z=typeof k.template=="string"?document.querySelector(k.template):k.template;if(!z)return{};var W=z.content;Cpe(W);var ve=Object.assign(gpe(W),bpe(W),_pe(W),wpe(W),ype(W),xpe(W),kpe(W,_5));return ve},gpe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-param"));return W.forEach(function(ve){ai(ve,["name","value"]);var je=ve.getAttribute("name"),gt=ve.getAttribute("value");typeof Ss[je]=="boolean"?z[je]=gt!=="false":H(Ss[je])==="object"?z[je]=JSON.parse(gt):z[je]=gt}),z},bpe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-function-param"));return W.forEach(function(ve){var je=ve.getAttribute("name"),gt=ve.getAttribute("value");z[je]=new Function("return ".concat(gt))()}),z},_pe=function(k){var z={},W=Array.from(k.querySelectorAll("swal-button"));return W.forEach(function(ve){ai(ve,["type","color","aria-label"]);var je=ve.getAttribute("type");z["".concat(je,"ButtonText")]=ve.innerHTML,z["show".concat(me(je),"Button")]=!0,ve.hasAttribute("color")&&(z["".concat(je,"ButtonColor")]=ve.getAttribute("color")),ve.hasAttribute("aria-label")&&(z["".concat(je,"ButtonAriaLabel")]=ve.getAttribute("aria-label"))}),z},wpe=function(k){var z={},W=k.querySelector("swal-image");return W&&(ai(W,["src","width","height","alt"]),W.hasAttribute("src")&&(z.imageUrl=W.getAttribute("src")||void 0),W.hasAttribute("width")&&(z.imageWidth=W.getAttribute("width")||void 0),W.hasAttribute("height")&&(z.imageHeight=W.getAttribute("height")||void 0),W.hasAttribute("alt")&&(z.imageAlt=W.getAttribute("alt")||void 0)),z},ype=function(k){var z={},W=k.querySelector("swal-icon");return W&&(ai(W,["type","color"]),W.hasAttribute("type")&&(z.icon=W.getAttribute("type")),W.hasAttribute("color")&&(z.iconColor=W.getAttribute("color")),z.iconHtml=W.innerHTML),z},xpe=function(k){var z={},W=k.querySelector("swal-input");W&&(ai(W,["type","label","placeholder","value"]),z.input=W.getAttribute("type")||"text",W.hasAttribute("label")&&(z.inputLabel=W.getAttribute("label")),W.hasAttribute("placeholder")&&(z.inputPlaceholder=W.getAttribute("placeholder")),W.hasAttribute("value")&&(z.inputValue=W.getAttribute("value")));var ve=Array.from(k.querySelectorAll("swal-input-option"));return ve.length&&(z.inputOptions={},ve.forEach(function(je){ai(je,["value"]);var gt=je.getAttribute("value"),Ut=je.innerHTML;z.inputOptions[gt]=Ut})),z},kpe=function(k,z){var W={};for(var ve in z){var je=z[ve],gt=k.querySelector(je);gt&&(ai(gt,[]),W[je.replace(/^swal-/,"")]=gt.innerHTML.trim())}return W},Cpe=function(k){var z=_5.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(k.children).forEach(function(W){var ve=W.tagName.toLowerCase();z.includes(ve)||Re("Unrecognized element <".concat(ve,">"))})},ai=function(k,z){Array.from(k.attributes).forEach(function(W){z.indexOf(W.name)===-1&&Re(['Unrecognized attribute "'.concat(W.name,'" on <').concat(k.tagName.toLowerCase(),">."),"".concat(z.length?"Allowed attributes are: ".concat(z.join(", ")):"To set the value, use HTML within the element.")])})},w5=10,Spe=function(k){var z=Te(),W=Ae();typeof k.willOpen=="function"&&k.willOpen(W);var ve=window.getComputedStyle(document.body),je=ve.overflowY;Mpe(z,W,k),setTimeout(function(){Tpe(z,W)},w5),_t()&&($pe(z,k.scrollbarPadding,je),nf()),!At()&&!I.previousActiveElement&&(I.previousActiveElement=document.activeElement),typeof k.didOpen=="function"&&setTimeout(function(){return k.didOpen(W)}),pr(z,ee["no-transition"])},Epe=function q(k){var z=Ae();if(!(k.target!==z||!En)){var W=Te();z.removeEventListener(En,q),W.style.overflowY="auto"}},Tpe=function(k,z){En&&Po(z)?(k.style.overflowY="hidden",z.addEventListener(En,Epe)):k.style.overflowY="auto"},$pe=function(k,z,W){xs(),z&&W!=="hidden"&&wde(W),setTimeout(function(){k.scrollTop=0})},Mpe=function(k,z,W){Bt(k,W.showClass.backdrop),W.animation?(z.style.setProperty("opacity","0","important"),yo(z,"grid"),setTimeout(function(){Bt(z,W.showClass.popup),z.style.removeProperty("opacity")},w5)):yo(z,"grid"),Bt([document.documentElement,document.body],ee.shown),W.heightAuto&&W.backdrop&&!W.toast&&Bt([document.documentElement,document.body],ee["height-auto"])},y5={email:function(k,z){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(k)?Promise.resolve():Promise.resolve(z||"Invalid email address")},url:function(k,z){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(k)?Promise.resolve():Promise.resolve(z||"Invalid URL")}};function Ape(q){q.inputValidator||(q.input==="email"&&(q.inputValidator=y5.email),q.input==="url"&&(q.inputValidator=y5.url))}function zpe(q){(!q.target||typeof q.target=="string"&&!document.querySelector(q.target)||typeof q.target!="string"&&!q.target.appendChild)&&(Re('Target parameter is not valid, defaulting to "body"'),q.target="body")}function Ipe(q){Ape(q),q.showLoaderOnConfirm&&!q.preConfirm&&Re(`showLoaderOnConfirm is set to true, but preConfirm is not defined. showLoaderOnConfirm should be used together with preConfirm, see usage example: -https://sweetalert2.github.io/#ajax-request`),Ipe(q),typeof q.title=="string"&&(q.title=q.title.split(` -`).join("
      ")),Hr(q)}var Yl,df=new WeakMap,Ro=function(){function q(){if(d(this,q),p(this,df,void 0),!(typeof window>"u")){Yl=this;for(var k=arguments.length,z=new Array(k),W=0;W1&&arguments[1]!==void 0?arguments[1]:{};if(Gde(Object.assign({},W,z)),I.currentInstance){var ve=Mn.swalPromiseResolve.get(I.currentInstance),je=I.currentInstance.isAwaitingPromise;I.currentInstance._destroy(),je||ve({isDismissed:!0}),_t()&&du()}I.currentInstance=Yl;var gt=Ppe(z,W);Ope(gt),Object.freeze(gt),I.timeout&&(I.timeout.stop(),delete I.timeout),clearTimeout(I.restoreFocusTimeout);var Kt=Rpe(Yl);return rf(Yl,gt),po.innerParams.set(Yl,gt),Npe(Yl,Kt,gt)}},{key:"then",value:function(z){return u(df,this).then(z)}},{key:"finally",value:function(z){return u(df,this).finally(z)}}])}(),Npe=function(k,z,W){return new Promise(function(ve,je){var gt=function(Ht){k.close({isDismissed:!0,dismiss:Ht})};Mn.swalPromiseResolve.set(k,ve),Mn.swalPromiseReject.set(k,je),z.confirmButton.onclick=function(){Bde(k)},z.denyButton.onclick=function(){Vde(k)},z.cancelButton.onclick=function(){Dde(k,gt)},z.closeButton.onclick=function(){gt(da.close)},Qde(W,z,gt),Ve(I,W,gt),Mde(k,W),Epe(W),Lpe(I,W,gt),Bpe(z,W),setTimeout(function(){z.container.scrollTop=0})})},Ppe=function(k,z){var W=gpe(k),ve=Object.assign({},Ss,z,W,k);return ve.showClass=Object.assign({},Ss.showClass,ve.showClass),ve.hideClass=Object.assign({},Ss.hideClass,ve.hideClass),ve.animation===!1&&(ve.showClass={backdrop:"swal2-noanimation"},ve.hideClass={}),ve},Rpe=function(k){var z={popup:Ae(),container:Te(),actions:X(),confirmButton:dt(),denyButton:S(),cancelButton:Y(),loader:G(),closeButton:fe(),validationMessage:pt(),progressSteps:tt()};return po.domCache.set(k,z),z},Lpe=function(k,z,W){var ve=ge();Eo(ve),z.timer&&(k.timeout=new mpe(function(){W("timer"),delete k.timeout},z.timer),z.timerProgressBar&&(yo(ve),qo(ve,z,"timerProgressBar"),setTimeout(function(){k.timeout&&k.timeout.running&&Pr(z.timer)})))},Bpe=function(k,z){if(!z.toast){if(!pe(z.allowEnterKey)){ae("allowEnterKey"),Hpe();return}Vpe(k)||Dpe(k,z)||Xe(-1,1)}},Vpe=function(k){var z=k.popup.querySelectorAll("[autofocus]"),W=_(z),ve;try{for(W.s();!(ve=W.n()).done;){var je=ve.value;if(je instanceof HTMLElement&&ot(je))return je.focus(),!0}}catch(gt){W.e(gt)}finally{W.f()}return!1},Dpe=function(k,z){return z.focusDeny&&ot(k.denyButton)?(k.denyButton.focus(),!0):z.focusCancel&&ot(k.cancelButton)?(k.cancelButton.focus(),!0):z.focusConfirm&&ot(k.confirmButton)?(k.confirmButton.focus(),!0):!1},Hpe=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var k5=new Date,C5=localStorage.getItem("swal-initiation");C5?(k5.getTime()-Date.parse(C5))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var q=document.createElement("audio");q.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",q.loop=!0,document.body.appendChild(q),setTimeout(function(){q.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(k5))}Ro.prototype.disableButtons=n5,Ro.prototype.enableButtons=l5,Ro.prototype.getInput=t5,Ro.prototype.disableInput=i5,Ro.prototype.enableInput=a5,Ro.prototype.hideLoading=cf,Ro.prototype.disableLoading=cf,Ro.prototype.showValidationMessage=s5,Ro.prototype.resetValidationMessage=c5,Ro.prototype.close=fa,Ro.prototype.closePopup=fa,Ro.prototype.closeModal=fa,Ro.prototype.closeToast=fa,Ro.prototype.rejectPromise=Yx,Ro.prototype.update=f5,Ro.prototype._destroy=h5,Object.assign(Ro,vpe),Object.keys(Jde).forEach(function(q){Ro[q]=function(){if(Yl&&Yl[q]){var k;return(k=Yl)[q].apply(k,arguments)}return null}}),Ro.DismissReason=da,Ro.version="11.12.1";var pf=Ro;return pf.default=pf,pf}),typeof Ao<"u"&&Ao.Sweetalert2&&(Ao.swal=Ao.sweetAlert=Ao.Swal=Ao.SweetAlert=Ao.Sweetalert2),typeof document<"u"&&function(o,r){var l=o.createElement("style");if(o.getElementsByTagName("head")[0].appendChild(l),l.styleSheet)l.styleSheet.disabled||(l.styleSheet.cssText=r);else try{l.innerHTML=r}catch{l.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(H1);var tC=H1.exports;const Er=cl(tC);var oC=!1;let F1;const Xu=e=>F1=e,j1=Symbol();function n0(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var qs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(qs||(qs={}));function rC(){const e=yf(!0),t=e.run(()=>D({}));let o=[],r=[];const l=Nn({install(n){Xu(l),l._a=n,n.provide(j1,l),n.config.globalProperties.$pinia=l,r.forEach(a=>o.push(a)),r=[]},use(n){return!this._a&&!oC?r.push(n):o.push(n),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return l}const K1=()=>{};function U1(e,t,o,r=K1){e.push(t);const l=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!o&&xf()&&kf(l),l}function _i(e,...t){e.slice().forEach(o=>{o(...t)})}const lC=e=>e();function a0(e,t){e instanceof Map&&t instanceof Map&&t.forEach((o,r)=>e.set(r,o)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const r=t[o],l=e[o];n0(l)&&n0(r)&&e.hasOwnProperty(o)&&!Zt(r)&&!ba(r)?e[o]=a0(l,r):e[o]=r}return e}const nC=Symbol();function aC(e){return!n0(e)||!e.hasOwnProperty(nC)}const{assign:Kn}=Object;function iC(e){return!!(Zt(e)&&e.effect)}function sC(e,t,o,r){const{state:l,actions:n,getters:a}=t,i=o.state.value[e];let c;function d(){i||(o.state.value[e]=l?l():{});const u=Bo(o.state.value[e]);return Kn(u,n,Object.keys(a||{}).reduce((p,h)=>(p[h]=Nn(C(()=>{Xu(o);const v=o._s.get(e);return a[h].call(v,v)})),p),{}))}return c=W1(e,d,t,o,r,!0),c}function W1(e,t,o={},r,l,n){let a;const i=Kn({actions:{}},o),c={deep:!0};let d,u,p=[],h=[],v;const m=r.state.value[e];!n&&!m&&(r.state.value[e]={}),D({});let f;function _(P){let L;d=u=!1,typeof P=="function"?(P(r.state.value[e]),L={type:qs.patchFunction,storeId:e,events:v}):(a0(r.state.value[e],P),L={type:qs.patchObject,payload:P,storeId:e,events:v});const V=f=Symbol();et().then(()=>{f===V&&(d=!0)}),u=!0,_i(p,L,r.state.value[e])}const g=n?function(){const{state:L}=o,V=L?L():{};this.$patch(B=>{Kn(B,V)})}:K1;function y(){a.stop(),p=[],h=[],r._s.delete(e)}function w(P,L){return function(){Xu(r);const V=Array.from(arguments),B=[],j=[];function te(H){B.push(H)}function J(H){j.push(H)}_i(h,{args:V,name:P,store:$,after:te,onError:J});let Z;try{Z=L.apply(this&&this.$id===e?this:$,V)}catch(H){throw _i(j,H),H}return Z instanceof Promise?Z.then(H=>(_i(B,H),H)).catch(H=>(_i(j,H),Promise.reject(H))):(_i(B,Z),Z)}}const x={_p:r,$id:e,$onAction:U1.bind(null,h),$patch:_,$reset:g,$subscribe(P,L={}){const V=U1(p,P,L.detached,()=>B()),B=a.run(()=>Se(()=>r.state.value[e],j=>{(L.flush==="sync"?u:d)&&P({storeId:e,type:qs.direct,events:v},j)},Kn({},c,L)));return V},$dispose:y},$=Dt(x);r._s.set(e,$);const R=(r._a&&r._a.runWithContext||lC)(()=>r._e.run(()=>(a=yf()).run(t)));for(const P in R){const L=R[P];if(Zt(L)&&!iC(L)||ba(L))n||(m&&aC(L)&&(Zt(L)?L.value=m[P]:a0(L,m[P])),r.state.value[e][P]=L);else if(typeof L=="function"){const V=w(P,L);R[P]=V,i.actions[P]=L}}return Kn($,R),Kn(jt($),R),Object.defineProperty($,"$state",{get:()=>r.state.value[e],set:P=>{_(L=>{Kn(L,P)})}}),r._p.forEach(P=>{Kn($,a.run(()=>P({store:$,app:r._a,pinia:r,options:i})))}),m&&n&&o.hydrate&&o.hydrate($.$state,m),d=!0,u=!0,$}function q1(e,t,o){let r,l;const n=typeof t=="function";typeof e=="string"?(r=e,l=n?o:t):(l=e,r=e.id);function a(i,c){const d=jk();return i=i||(d?Ge(j1,null):null),i&&Xu(i),i=F1,i._s.has(r)||(n?W1(r,t,l,i):sC(r,l,i)),i._s.get(r)}return a.$id=r,a}const cC=q1("config",()=>{const e=D({order:{id:null,amount:0,currency:""},networks:[],modal:!1,started:!1,blockConfirmationCount:0,amountUpdateInterval:0}),t=n=>{if(typeof e.value[n]>"u")throw new Error(`Config key "${n}" not found`)},o=(n,a)=>{t(n),e.value[n]=a},r=()=>{clearInterval(e.value.amountUpdateInterval),e.value.amountUpdateInterval=0},l=C(()=>e.value.started);return{set:o,get:e,isAppStarted:l,stopAmountUpdateInterval:r}});let Un,Y1;const uC=e=>{Un=e},dC=e=>{},pC=e=>{Y1=e},G1=(e,t)=>{const o=t??Un.browser.adapters;return Object.keys(o).filter(r=>e.includes(o[r].id)).reduce((r,l)=>(r[l]=o[l],r),{})};var Zu=(e=>(e.TRANSACTION="transaction",e.CONFIRMATION="confirmation",e))(Zu||{});const fC=q1("payment",()=>{const e=D({order:{id:0,amount:0,currency:"",paymentAmount:0,paymentCurrency:{symbol:""}},init:null,receiver:"",network:null,api:{},transactionHash:null,process:"transaction"}),t=(h,v)=>{if(typeof e.value.order[h]>"u")throw new Error(`Order param "${h}" not found`);e.value.order[h]=v},o=h=>{Object.entries(h).forEach(([v,m])=>{t(v,m)})},r=h=>{e.value.api=h},l=h=>{e.value.init=h},n=h=>{e.value.process=h},a=h=>{e.value.network=h},i=h=>{e.value.receiver=h},c=h=>{e.value.transactionHash=h},d=C(()=>e.value.order.paymentAmount==0),u=C(()=>{if(!e.value.init)return!1;const h=parseFloat(String(e.value.order.amount)),v=parseFloat(String(e.value.init.order.amount));return h!==v});return Go(()=>{e.value.receiver||Vt.call("paymentReset")}),{get:e,setAPI:r,setInit:l,setProcess:n,setNetwork:a,setReceiver:i,setOrderParam:t,setOrderParams:o,setTransactionHash:c,transactionInstance:h=>{var v;return(v=e.value.order.paymentCurrency)!=null&&v.address?new Un.models.TokenTransaction(h):new Un.models.CoinTransaction(h)},isPaymentAmountUpdating:d,isOrderAndInitAmountNotEqual:u}});let i0,Ho,Tt,ht,qt;const hC=e=>{i0=e,Ho=i0.config,Tt=i0.payment},vC=e=>{qt=e,ht=e.lang},mC={config:cC,payment:fC},gC=()=>{Er.close()},Al=(e,t="")=>Er.fire({title:e,html:t,icon:"info",didOpen:()=>{Er.hideLoading()}}),Ju=(e,t="")=>Er.fire({title:e,html:t,icon:"warning",didOpen:()=>{Er.hideLoading()}}),bo=(e,t="")=>Er.fire({title:e,html:t,icon:"error",didOpen:()=>{Er.hideLoading()}}),X1=(e,t="")=>Er.fire({title:e,html:t,icon:"success",didOpen:()=>{Er.hideLoading()}}),s0=(e,t="")=>{Er.fire({title:e,html:t,allowOutsideClick:!1,didOpen:()=>{Er.showLoading()}})},Ys=()=>{const e=document.createElement("div");e.className+="overlay",e.style.backgroundColor="#EFEFEF",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="99999999999",e.style.top="0px",e.style.left="0px",e.style.opacity=".5",document.body.appendChild(e)},c0=()=>{window.onbeforeunload=()=>"There is an ongoing process, please do not close the browser."},Gs=()=>{window.onbeforeunload=null},Z1=(e,t)=>{for(const o of t)e&&Object.prototype.hasOwnProperty.call(e,o)&&delete e[o];return e},un=e=>JSON.parse(JSON.stringify(e)),wi=(e,t=[])=>Z1(un(e),["wallets","currencies","image","wsUrl","network","web3Domain"].filter(o=>!t.includes(o))),bC=e=>{const t=document.querySelector(e),o=new FormData(t),r={};return o.forEach((l,n)=>{const a=n.split("[");let i=r;for(let d=0;dfunction(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),u0=()=>{if(typeof window>"u")return!1;try{const e=window.navigator,o=e.userAgent.toLowerCase(),r=e.standalone,l=/ip(ad|hone|od)/.test(o)||e.platform==="MacIntel"&&e.maxTouchPoints>1,n=/android/.test(o),a=/safari/.test(o);return n&&/; wv\)/.test(o)||l&&!r&&!a}catch{return!1}},xi=async e=>{var t;e!=null&&e.disconnect&&await e.disconnect(),(t=e==null?void 0:e.adapter)!=null&&t.disconnect&&await e.adapter.disconnect(),Object.keys(localStorage).filter(o=>o.startsWith("wc@2")||o.startsWith("wagmi")||o.startsWith("@w3m")||o.startsWith("W3M")||o.startsWith("--walletlink")).forEach(o=>localStorage.removeItem(o)),localStorage.removeItem("walletconnect"),localStorage.removeItem("WALLETCONNECT_DEEPLINK_CHOICE"),indexedDB.deleteDatabase("WALLET_CONNECT_V2_INDEXED_DB")},_C=()=>{const e=new Date,t=e.getTime()+e.getTimezoneOffset()*6e4,o=new Date(t+36e5*0);return Math.floor(o.getTime()/1e3)},wC=e=>new Promise(t=>setTimeout(t,e)),J1=(e,t)=>parseFloat(parseFloat((e/(1-t/100)).toString()).toFixed(6)),Qu=e=>qt.lang.pleaseTryToConnectAgain.replace("{networkName}",(e==null?void 0:e.name)??""),Xs=e=>qt.imagesUrl+"icons/"+e.toLowerCase()+".svg",ed=(e,t)=>{if(qt.debug)try{console[e](...t)}catch(o){console.error(o,t)}},zo={log:(...e)=>ed("log",e),info:(...e)=>ed("info",e),warn:(...e)=>ed("warn",e),error:(...e)=>ed("error",e)},Q1=Object.freeze(Object.defineProperty({__proto__:null,clone:un,closePopup:gC,debug:zo,deletePropInObject:Z1,disableScreen:Ys,errorPopup:bo,formToObj:bC,fromPercent:J1,getCoinIcon:Xs,getUTCTime:_C,getWrongNetworkMsg:Qu,infoPopup:Al,isMobile:yi,isWebview:u0,ongoingProcess:c0,ongoingProcessEnded:Gs,removeNoNeededParams:wi,resetWalletConnect:xi,sleep:wC,successPopup:X1,waitingPopup:s0,warningPopup:Ju},Symbol.toStringTag,{value:"Module"})),Vt={list:{},check:e=>e&&(e.error||e.info||e.warning)?(e.message&&(e.error?bo(e.message):e.warning?Ju(e.message):e.info&&Al(e.message)),!1):!0,getIds:()=>({paymentAmount:["paymentReset","updateCurrency","walletListClosed","walletListOpened"],walletList:["paymentReset","paymentDeclined","connectionDeclined"]}),add:(e,t,o=null,r=0)=>{const l=e.split(",");if(l.length>1){l.forEach(a=>{Vt.add(a.trim(),t,o,r)});return}Vt.list[e]||(Vt.list[e]=[]);const n=Vt.list[e].findIndex(a=>a.customId==o);o&&Vt.list[e][n]?Vt.list[e][n]={callback:t,customId:o,priority:r}:Vt.list[e].push({callback:t,customId:o,priority:r}),Vt.list[e].sort((a,i)=>a.priority-i.priority)},remove(e,t=null){if(this.list[e])if(t){const o=this.list[e].findIndex(r=>r.customId==t);o>-1&&this.list[e].splice(o,1)}else this.list[e]=[]},call(e,t={}){if(typeof t!="object")throw new Error("Event context must be an object.");return new Promise(o=>{(async()=>{var l;if(this.list[e])for(let n=0;nHo.get.networks),l=D({});r.value.forEach(i=>{i.currencies.forEach(c=>{qt.discountRates[c.symbol]&&(l.value[i.id||i.code]||(l.value[i.id||i.code]=[]),l.value[i.id||i.code].push({currency:c.symbol,rate:qt.discountRates[c.symbol]}))})}),Object.entries(l.value).forEach(([i,c])=>{o.value[i]=c.sort((d,u)=>u.rate-d.rate)[0].rate});const n=i=>o.value[i.id||i.code],a=async i=>{var c;await Vt.call("selectedNetwork",{newNetwork:i,oldNetwork:(c=Tt.get)==null?void 0:c.network}),t(i,i.currencies[0])};return(i,c)=>{const d=nt("Right"),u=nt("el-icon"),p=nt("cp-list");return b(),he(p,{list:r.value,itemClass:"network",title:s(ht).selectNetwork,onHandleClick:a,noFoundMsg:s(ht).notFoundAnyNetworkForPayment},{default:le(({item:h})=>[E("div",yC,[E("img",{class:"icon",alt:h.nativeCurrency.symbol,src:s(Xs)(h.nativeCurrency.symbol)},null,8,xC)]),E("span",kC,$e(h.name),1),n(h)?(b(),M("span",CC,$e(n(h))+"% "+$e(s(ht).discount),1)):se("",!0),ee(u,{size:25},{default:le(()=>[ee(d)]),_:1})]),_:1},8,["list","title","noFoundMsg"])}}}),EC={class:"icon-wrapper"},TC=["alt","src"],$C=["alt","src"],MC={class:"name"},AC={class:"network-name"},zC={key:0,class:"discount"},IC=N({__name:"CurrencyMode",setup(e){const t=Ge("$init"),o=D([]),r=C(()=>Ho.get.networks);r.value.forEach(n=>{n.currencies.forEach(a=>{o.value.push(Object.assign(a,{network:{name:n.name,id:n.id||n.code,image:Xs(n.nativeCurrency.symbol)}}))})});const l=async n=>{const a=r.value.find(c=>c.id==n.network.id||c.code==n.network.id),i=un(n);delete i.network,await t(a,i)};return Vt.add("walletListClosed",()=>{Tt.$reset()},"currencyMode"),(n,a)=>{const i=nt("Right"),c=nt("el-icon"),d=nt("cp-list");return b(),he(d,{list:o.value,itemClass:"currency",title:s(ht).selectCurrency,onHandleClick:l,noFoundMsg:s(ht).notFoundAnyCurrencyForPayment},{default:le(({item:u})=>[E("div",EC,[E("img",{class:"icon",alt:u.symbol,src:s(Xs)(u.symbol)},null,8,TC),E("img",{class:"network-icon",alt:u.network.name,src:u.network.image},null,8,$C)]),E("span",MC,$e(u.symbol),1),E("span",AC,$e(u.network.name),1),s(qt).discountRates[u.symbol]?(b(),M("span",zC,$e(s(qt).discountRates[u.symbol])+"% "+$e(s(ht).discount),1)):se("",!0),ee(c,{size:25},{default:le(()=>[ee(i)]),_:1})]),_:1},8,["list","title","noFoundMsg"])}}}),OC=["innerHTML"],NC=N({__name:"PaymentAmount",setup(e){const t=Tt.get.order,o=C(()=>{if(Tt.isPaymentAmountUpdating)return"...";if(qt.discountRates[t.paymentCurrency.symbol]){const c=t.paymentAmount||0,u=qt.discountRates[t.paymentCurrency.symbol];return` +https://sweetalert2.github.io/#ajax-request`),zpe(q),typeof q.title=="string"&&(q.title=q.title.split(` +`).join("
      ")),Hr(q)}var Yl,uf=new WeakMap,Ro=function(){function q(){if(d(this,q),p(this,uf,void 0),!(typeof window>"u")){Yl=this;for(var k=arguments.length,z=new Array(k),W=0;W1&&arguments[1]!==void 0?arguments[1]:{};if(Yde(Object.assign({},W,z)),I.currentInstance){var ve=Mn.swalPromiseResolve.get(I.currentInstance),je=I.currentInstance.isAwaitingPromise;I.currentInstance._destroy(),je||ve({isDismissed:!0}),_t()&&uu()}I.currentInstance=Yl;var gt=Npe(z,W);Ipe(gt),Object.freeze(gt),I.timeout&&(I.timeout.stop(),delete I.timeout),clearTimeout(I.restoreFocusTimeout);var Ut=Ppe(Yl);return of(Yl,gt),po.innerParams.set(Yl,gt),Ope(Yl,Ut,gt)}},{key:"then",value:function(z){return u(uf,this).then(z)}},{key:"finally",value:function(z){return u(uf,this).finally(z)}}])}(),Ope=function(k,z,W){return new Promise(function(ve,je){var gt=function(Ht){k.close({isDismissed:!0,dismiss:Ht})};Mn.swalPromiseResolve.set(k,ve),Mn.swalPromiseReject.set(k,je),z.confirmButton.onclick=function(){Lde(k)},z.denyButton.onclick=function(){Bde(k)},z.cancelButton.onclick=function(){Vde(k,gt)},z.closeButton.onclick=function(){gt(da.close)},Jde(W,z,gt),Ve(I,W,gt),$de(k,W),Spe(W),Rpe(I,W,gt),Lpe(z,W),setTimeout(function(){z.container.scrollTop=0})})},Npe=function(k,z){var W=mpe(k),ve=Object.assign({},Ss,z,W,k);return ve.showClass=Object.assign({},Ss.showClass,ve.showClass),ve.hideClass=Object.assign({},Ss.hideClass,ve.hideClass),ve.animation===!1&&(ve.showClass={backdrop:"swal2-noanimation"},ve.hideClass={}),ve},Ppe=function(k){var z={popup:Ae(),container:Te(),actions:X(),confirmButton:dt(),denyButton:S(),cancelButton:Y(),loader:G(),closeButton:fe(),validationMessage:pt(),progressSteps:tt()};return po.domCache.set(k,z),z},Rpe=function(k,z,W){var ve=ge();Eo(ve),z.timer&&(k.timeout=new vpe(function(){W("timer"),delete k.timeout},z.timer),z.timerProgressBar&&(yo(ve),qo(ve,z,"timerProgressBar"),setTimeout(function(){k.timeout&&k.timeout.running&&Pr(z.timer)})))},Lpe=function(k,z){if(!z.toast){if(!pe(z.allowEnterKey)){ae("allowEnterKey"),Dpe();return}Bpe(k)||Vpe(k,z)||Xe(-1,1)}},Bpe=function(k){var z=k.popup.querySelectorAll("[autofocus]"),W=_(z),ve;try{for(W.s();!(ve=W.n()).done;){var je=ve.value;if(je instanceof HTMLElement&&ot(je))return je.focus(),!0}}catch(gt){W.e(gt)}finally{W.f()}return!1},Vpe=function(k,z){return z.focusDeny&&ot(k.denyButton)?(k.denyButton.focus(),!0):z.focusCancel&&ot(k.cancelButton)?(k.cancelButton.focus(),!0):z.focusConfirm&&ot(k.confirmButton)?(k.confirmButton.focus(),!0):!1},Dpe=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var x5=new Date,k5=localStorage.getItem("swal-initiation");k5?(x5.getTime()-Date.parse(k5))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var q=document.createElement("audio");q.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",q.loop=!0,document.body.appendChild(q),setTimeout(function(){q.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(x5))}Ro.prototype.disableButtons=l5,Ro.prototype.enableButtons=r5,Ro.prototype.getInput=e5,Ro.prototype.disableInput=a5,Ro.prototype.enableInput=n5,Ro.prototype.hideLoading=sf,Ro.prototype.disableLoading=sf,Ro.prototype.showValidationMessage=i5,Ro.prototype.resetValidationMessage=s5,Ro.prototype.close=fa,Ro.prototype.closePopup=fa,Ro.prototype.closeModal=fa,Ro.prototype.closeToast=fa,Ro.prototype.rejectPromise=qx,Ro.prototype.update=p5,Ro.prototype._destroy=f5,Object.assign(Ro,hpe),Object.keys(Zde).forEach(function(q){Ro[q]=function(){if(Yl&&Yl[q]){var k;return(k=Yl)[q].apply(k,arguments)}return null}}),Ro.DismissReason=da,Ro.version="11.12.1";var df=Ro;return df.default=df,df}),typeof Ao<"u"&&Ao.Sweetalert2&&(Ao.swal=Ao.sweetAlert=Ao.Swal=Ao.SweetAlert=Ao.Sweetalert2),typeof document<"u"&&function(o,r){var l=o.createElement("style");if(o.getElementsByTagName("head")[0].appendChild(l),l.styleSheet)l.styleSheet.disabled||(l.styleSheet.cssText=r);else try{l.innerHTML=r}catch{l.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(D1);var eC=D1.exports;const Er=cl(eC);var tC=!1;let H1;const Gu=e=>H1=e,F1=Symbol();function l0(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var qs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(qs||(qs={}));function oC(){const e=wf(!0),t=e.run(()=>D({}));let o=[],r=[];const l=Nn({install(n){Gu(l),l._a=n,n.provide(F1,l),n.config.globalProperties.$pinia=l,r.forEach(a=>o.push(a)),r=[]},use(n){return!this._a&&!tC?r.push(n):o.push(n),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return l}const j1=()=>{};function K1(e,t,o,r=j1){e.push(t);const l=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!o&&yf()&&xf(l),l}function _i(e,...t){e.slice().forEach(o=>{o(...t)})}const rC=e=>e();function n0(e,t){e instanceof Map&&t instanceof Map&&t.forEach((o,r)=>e.set(r,o)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const r=t[o],l=e[o];l0(l)&&l0(r)&&e.hasOwnProperty(o)&&!Zt(r)&&!ba(r)?e[o]=n0(l,r):e[o]=r}return e}const lC=Symbol();function nC(e){return!l0(e)||!e.hasOwnProperty(lC)}const{assign:Kn}=Object;function aC(e){return!!(Zt(e)&&e.effect)}function iC(e,t,o,r){const{state:l,actions:n,getters:a}=t,i=o.state.value[e];let c;function d(){i||(o.state.value[e]=l?l():{});const u=Bo(o.state.value[e]);return Kn(u,n,Object.keys(a||{}).reduce((p,h)=>(p[h]=Nn(C(()=>{Gu(o);const v=o._s.get(e);return a[h].call(v,v)})),p),{}))}return c=U1(e,d,t,o,r,!0),c}function U1(e,t,o={},r,l,n){let a;const i=Kn({actions:{}},o),c={deep:!0};let d,u,p=[],h=[],v;const m=r.state.value[e];!n&&!m&&(r.state.value[e]={}),D({});let f;function _(P){let R;d=u=!1,typeof P=="function"?(P(r.state.value[e]),R={type:qs.patchFunction,storeId:e,events:v}):(n0(r.state.value[e],P),R={type:qs.patchObject,payload:P,storeId:e,events:v});const V=f=Symbol();et().then(()=>{f===V&&(d=!0)}),u=!0,_i(p,R,r.state.value[e])}const g=n?function(){const{state:R}=o,V=R?R():{};this.$patch(B=>{Kn(B,V)})}:j1;function y(){a.stop(),p=[],h=[],r._s.delete(e)}function w(P,R){return function(){Gu(r);const V=Array.from(arguments),B=[],F=[];function Q(H){B.push(H)}function J(H){F.push(H)}_i(h,{args:V,name:P,store:$,after:Q,onError:J});let Z;try{Z=R.apply(this&&this.$id===e?this:$,V)}catch(H){throw _i(F,H),H}return Z instanceof Promise?Z.then(H=>(_i(B,H),H)).catch(H=>(_i(F,H),Promise.reject(H))):(_i(B,Z),Z)}}const x={_p:r,$id:e,$onAction:K1.bind(null,h),$patch:_,$reset:g,$subscribe(P,R={}){const V=K1(p,P,R.detached,()=>B()),B=a.run(()=>Se(()=>r.state.value[e],F=>{(R.flush==="sync"?u:d)&&P({storeId:e,type:qs.direct,events:v},F)},Kn({},c,R)));return V},$dispose:y},$=Dt(x);r._s.set(e,$);const L=(r._a&&r._a.runWithContext||rC)(()=>r._e.run(()=>(a=wf()).run(t)));for(const P in L){const R=L[P];if(Zt(R)&&!aC(R)||ba(R))n||(m&&nC(R)&&(Zt(R)?R.value=m[P]:n0(R,m[P])),r.state.value[e][P]=R);else if(typeof R=="function"){const V=w(P,R);L[P]=V,i.actions[P]=R}}return Kn($,L),Kn(Kt($),L),Object.defineProperty($,"$state",{get:()=>r.state.value[e],set:P=>{_(R=>{Kn(R,P)})}}),r._p.forEach(P=>{Kn($,a.run(()=>P({store:$,app:r._a,pinia:r,options:i})))}),m&&n&&o.hydrate&&o.hydrate($.$state,m),d=!0,u=!0,$}function W1(e,t,o){let r,l;const n=typeof t=="function";typeof e=="string"?(r=e,l=n?o:t):(l=e,r=e.id);function a(i,c){const d=Fk();return i=i||(d?Ge(F1,null):null),i&&Gu(i),i=H1,i._s.has(r)||(n?U1(r,t,l,i):iC(r,l,i)),i._s.get(r)}return a.$id=r,a}const sC=W1("config",()=>{const e=D({order:{id:null,amount:0,currency:""},networks:[],modal:!1,started:!1,blockConfirmationCount:0,amountUpdateInterval:0}),t=n=>{if(typeof e.value[n]>"u")throw new Error(`Config key "${n}" not found`)},o=(n,a)=>{t(n),e.value[n]=a},r=()=>{clearInterval(e.value.amountUpdateInterval),e.value.amountUpdateInterval=0},l=C(()=>e.value.started);return{set:o,get:e,isAppStarted:l,stopAmountUpdateInterval:r}});let Un,q1;const cC=e=>{Un=e},uC=e=>{},dC=e=>{q1=e},Y1=(e,t)=>{const o=t??Un.browser.adapters;return Object.keys(o).filter(r=>e.includes(o[r].id)).reduce((r,l)=>(r[l]=o[l],r),{})};var Xu=(e=>(e.TRANSACTION="transaction",e.CONFIRMATION="confirmation",e))(Xu||{});const pC=W1("payment",()=>{const e=D({order:{id:0,amount:0,currency:"",paymentAmount:0,paymentCurrency:{symbol:""}},init:null,receiver:"",network:null,api:{},transactionHash:null,process:"transaction"}),t=(h,v)=>{if(typeof e.value.order[h]>"u")throw new Error(`Order param "${h}" not found`);e.value.order[h]=v},o=h=>{Object.entries(h).forEach(([v,m])=>{t(v,m)})},r=h=>{e.value.api=h},l=h=>{e.value.init=h},n=h=>{e.value.process=h},a=h=>{e.value.network=h},i=h=>{e.value.receiver=h},c=h=>{e.value.transactionHash=h},d=C(()=>e.value.order.paymentAmount==0),u=C(()=>{if(!e.value.init)return!1;const h=parseFloat(String(e.value.order.amount)),v=parseFloat(String(e.value.init.order.amount));return h!==v});return Go(()=>{e.value.receiver||Vt.call("paymentReset")}),{get:e,setAPI:r,setInit:l,setProcess:n,setNetwork:a,setReceiver:i,setOrderParam:t,setOrderParams:o,setTransactionHash:c,transactionInstance:h=>{var v;return(v=e.value.order.paymentCurrency)!=null&&v.address?new Un.models.TokenTransaction(h):new Un.models.CoinTransaction(h)},isPaymentAmountUpdating:d,isOrderAndInitAmountNotEqual:u}});let a0,Ho,Tt,ht,Ft;const fC=e=>{a0=e,Ho=a0.config,Tt=a0.payment},hC=e=>{Ft=e,ht=e.lang},vC={config:sC,payment:pC},mC=()=>{Er.close()},Al=(e,t="")=>Er.fire({title:e,html:t,icon:"info",didOpen:()=>{Er.hideLoading()}}),Zu=(e,t="")=>Er.fire({title:e,html:t,icon:"warning",didOpen:()=>{Er.hideLoading()}}),fo=(e,t="")=>Er.fire({title:e,html:t,icon:"error",didOpen:()=>{Er.hideLoading()}}),G1=(e,t="")=>Er.fire({title:e,html:t,icon:"success",didOpen:()=>{Er.hideLoading()}}),i0=(e,t="")=>{Er.fire({title:e,html:t,allowOutsideClick:!1,didOpen:()=>{Er.showLoading()}})},s0=()=>{window.onbeforeunload=()=>"There is an ongoing process, please do not close the browser."},Ys=()=>{window.onbeforeunload=null},X1=(e,t)=>{for(const o of t)e&&Object.prototype.hasOwnProperty.call(e,o)&&delete e[o];return e},un=e=>JSON.parse(JSON.stringify(e)),wi=(e,t=[])=>X1(un(e),["wallets","currencies","image","wsUrl","network","web3Domain"].filter(o=>!t.includes(o))),gC=e=>{const t=document.querySelector(e),o=new FormData(t),r={};return o.forEach((l,n)=>{const a=n.split("[");let i=r;for(let d=0;dfunction(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),c0=()=>{if(typeof window>"u")return!1;try{const e=window.navigator,o=e.userAgent.toLowerCase(),r=e.standalone,l=/ip(ad|hone|od)/.test(o)||e.platform==="MacIntel"&&e.maxTouchPoints>1,n=/android/.test(o),a=/safari/.test(o);return n&&/; wv\)/.test(o)||l&&!r&&!a}catch{return!1}},xi=async e=>{var t;e!=null&&e.disconnect?await e.disconnect():(t=e==null?void 0:e.adapter)!=null&&t.disconnect&&await e.adapter.disconnect(),Object.keys(localStorage).filter(o=>o.startsWith("wc@2")||o.startsWith("wagmi")||o.startsWith("@w3m")||o.startsWith("W3M")||o.startsWith("@appkit")||o.startsWith("--walletlink")).forEach(o=>localStorage.removeItem(o)),localStorage.removeItem("walletconnect"),localStorage.removeItem("WALLETCONNECT_DEEPLINK_CHOICE"),indexedDB.deleteDatabase("WALLET_CONNECT_V2_INDEXED_DB")},bC=()=>{const e=new Date,t=e.getTime()+e.getTimezoneOffset()*6e4,o=new Date(t+36e5*0);return Math.floor(o.getTime()/1e3)},_C=e=>new Promise(t=>setTimeout(t,e)),Z1=(e,t)=>parseFloat(parseFloat((e/(1-t/100)).toString()).toFixed(6)),Ju=e=>Ft.lang.pleaseTryToConnectAgain.replace("{networkName}",(e==null?void 0:e.name)??""),Gs=e=>Ft.imagesUrl+"icons/"+e.toLowerCase()+".svg",Qu=(e,t)=>{if(Ft.debug)try{console[e](...t)}catch(o){console.error(o,t)}},zo={log:(...e)=>Qu("log",e),info:(...e)=>Qu("info",e),warn:(...e)=>Qu("warn",e),error:(...e)=>Qu("error",e)},J1=Object.freeze(Object.defineProperty({__proto__:null,clone:un,closePopup:mC,debug:zo,deletePropInObject:X1,errorPopup:fo,formToObj:gC,fromPercent:Z1,getCoinIcon:Gs,getUTCTime:bC,getWrongNetworkMsg:Ju,infoPopup:Al,isMobile:yi,isWebview:c0,ongoingProcess:s0,ongoingProcessEnded:Ys,removeNoNeededParams:wi,resetWalletConnect:xi,sleep:_C,successPopup:G1,waitingPopup:i0,warningPopup:Zu},Symbol.toStringTag,{value:"Module"})),Vt={list:{},check:e=>e&&(e.error||e.info||e.warning)?(e.message&&(e.error?fo(e.message):e.warning?Zu(e.message):e.info&&Al(e.message)),!1):!0,getIds:()=>({paymentAmount:["paymentReset","updateCurrency","walletListClosed","walletListOpened"],walletList:["paymentReset","paymentDeclined","connectionDeclined"]}),add:(e,t,o=null,r=0)=>{const l=e.split(",");if(l.length>1){l.forEach(a=>{Vt.add(a.trim(),t,o,r)});return}Vt.list[e]||(Vt.list[e]=[]);const n=Vt.list[e].findIndex(a=>a.customId==o);o&&Vt.list[e][n]?Vt.list[e][n]={callback:t,customId:o,priority:r}:Vt.list[e].push({callback:t,customId:o,priority:r}),Vt.list[e].sort((a,i)=>a.priority-i.priority)},remove(e,t=null){if(this.list[e])if(t){const o=this.list[e].findIndex(r=>r.customId==t);o>-1&&this.list[e].splice(o,1)}else this.list[e]=[]},call(e,t={}){if(typeof t!="object")throw new Error("Event context must be an object.");return new Promise(o=>{(async()=>{var l;if(this.list[e])for(let n=0;nHo.get.networks),l=D({});r.value.forEach(i=>{i.currencies.forEach(c=>{Ft.discountRates[c.symbol]&&(l.value[i.id||i.code]||(l.value[i.id||i.code]=[]),l.value[i.id||i.code].push({currency:c.symbol,rate:Ft.discountRates[c.symbol]}))})}),Object.entries(l.value).forEach(([i,c])=>{o.value[i]=c.sort((d,u)=>u.rate-d.rate)[0].rate});const n=i=>o.value[i.id||i.code],a=async i=>{var c;await Vt.call("selectedNetwork",{newNetwork:i,oldNetwork:(c=Tt.get)==null?void 0:c.network}),t(i,i.currencies[0])};return(i,c)=>{const d=nt("Right"),u=nt("el-icon"),p=nt("cp-list");return b(),he(p,{list:r.value,itemClass:"network",title:s(ht).selectNetwork,onHandleClick:a,noFoundMsg:s(ht).notFoundAnyNetworkForPayment},{default:le(({item:h})=>[E("div",wC,[E("img",{class:"icon",alt:h.nativeCurrency.symbol,src:s(Gs)(h.nativeCurrency.symbol)},null,8,yC)]),E("span",xC,$e(h.name),1),n(h)?(b(),M("span",kC,$e(n(h))+"% "+$e(s(ht).discount),1)):se("",!0),te(u,{size:25},{default:le(()=>[te(d)]),_:1})]),_:1},8,["list","title","noFoundMsg"])}}}),SC={class:"icon-wrapper"},EC=["alt","src"],TC=["alt","src"],$C={class:"name"},MC={class:"network-name"},AC={key:0,class:"discount"},zC=N({__name:"CurrencyMode",setup(e){const t=Ge("$init"),o=D([]),r=C(()=>Ho.get.networks);r.value.forEach(n=>{n.currencies.forEach(a=>{o.value.push(Object.assign(a,{network:{name:n.name,id:n.id||n.code,image:Gs(n.nativeCurrency.symbol)}}))})});const l=async n=>{const a=r.value.find(c=>c.id==n.network.id||c.code==n.network.id),i=un(n);delete i.network,await t(a,i)};return Vt.add("walletListClosed",()=>{Tt.$reset()},"currencyMode"),(n,a)=>{const i=nt("Right"),c=nt("el-icon"),d=nt("cp-list");return b(),he(d,{list:o.value,itemClass:"currency",title:s(ht).selectCurrency,onHandleClick:l,noFoundMsg:s(ht).notFoundAnyCurrencyForPayment},{default:le(({item:u})=>[E("div",SC,[E("img",{class:"icon",alt:u.symbol,src:s(Gs)(u.symbol)},null,8,EC),E("img",{class:"network-icon",alt:u.network.name,src:u.network.image},null,8,TC)]),E("span",$C,$e(u.symbol),1),E("span",MC,$e(u.network.name),1),s(Ft).discountRates[u.symbol]?(b(),M("span",AC,$e(s(Ft).discountRates[u.symbol])+"% "+$e(s(ht).discount),1)):se("",!0),te(c,{size:25},{default:le(()=>[te(i)]),_:1})]),_:1},8,["list","title","noFoundMsg"])}}}),IC=["innerHTML"],OC=N({__name:"PaymentAmount",setup(e){const t=Tt.get.order,o=C(()=>{if(Tt.isPaymentAmountUpdating)return"...";if(Ft.discountRates[t.paymentCurrency.symbol]){const c=t.paymentAmount||0,u=Ft.discountRates[t.paymentCurrency.symbol];return` - ${J1(c,u)+" "+t.paymentCurrency.symbol} + ${Z1(c,u)+" "+t.paymentCurrency.symbol} ${c+" "+t.paymentCurrency.symbol} - `}else return(t.paymentAmount||0)+" "+t.paymentCurrency.symbol}),r=async c=>{if(t.amount==0)return 0;Tt.setOrderParam("paymentAmount",0);const d=await Tt.get.api.currencyConverter();return await Vt.call("currencyConverter",{paymentCurrency:c,paymentAmount:d}),d?Tt.setOrderParams({paymentAmount:d}):(Tt.setOrderParam("paymentAmount",0),Al(ht.convertingError).then(()=>{Ys(),window.location.reload()})),d};let l=un(t);Se(t,c=>{l&&l.amount!=c.amount&&r(t.paymentCurrency),l=un(c)});const n=c=>{if(Ho.get.amountUpdateInterval)return;const d=setInterval(async()=>{i(t.paymentCurrency)},qt.amountUpdateMin*60*1e3);zo.log("Start amount updater: ",d,"event: ",c),Ho.set("amountUpdateInterval",d)},a=c=>{if(!Ho.get.amountUpdateInterval)return;const d=Ho.get.amountUpdateInterval;zo.log("Stop amount updater: ",d,"event: ",c),Ho.stopAmountUpdateInterval()},i=async c=>qt.modal&&!Ho.get.modal?zo.log("Currency not updated, because modal is not opened"):(zo.log("Currency updating: ",c),a("interval"),await r(c),n("interval"),!0);return Vt.add("selectedCurrency",({newCurrency:c})=>(Tt.setOrderParams({paymentCurrency:c}),i(c)),"paymentAmount"),Vt.add("paymentReset",()=>{a("paymentReset")},"paymentAmount"),qt.mode=="network"?(Vt.add("walletListOpened",({eventName:c})=>{a(c)},"paymentAmount"),Vt.add("walletListClosed",({eventName:c})=>{n(c)},"paymentAmount")):(Vt.add("walletConnectionRequest",({eventName:c})=>{a(c)},"paymentAmount"),Vt.add("walletPaymentDeclined, walletConnectionDeclined",({eventName:c})=>{n(c)},"paymentAmount")),ft(()=>{n("mounted")}),(c,d)=>(b(),M("div",{class:"payment-amount",innerHTML:o.value},null,8,OC))}}),PC=["data-disabled"],eb=N({__name:"InformationHeader",setup(e){const t=Tt.get.order,o=Tt.get.network,r=C(()=>Ho.get.networks),l=C(()=>{switch(qt.mode){case"network":return r.value.length>1;case"currency":return!0;default:return!0}});return(async()=>{if(window.cpCheckRpc)return;window.cpCheckRpc=!0,await Y1.checkRpcConnection()instanceof Error&&bo(ht.rpcConnectionError).then(()=>{window.location.reload()})})(),(n,a)=>{const i=nt("el-col"),c=nt("el-row");return b(),he(c,{justify:"center",class:"header"},{default:le(()=>[s(t).id?(b(),he(i,{key:0,span:12},{default:le(()=>[Ct($e(s(ht).orderId),1)]),_:1})):se("",!0),s(t).id?(b(),he(i,{key:1,span:12},{default:le(()=>[Ct($e(s(t).id),1)]),_:1})):se("",!0),ee(i,{span:12},{default:le(()=>[Ct($e(s(ht).orderAmount),1)]),_:1}),ee(i,{span:12},{default:le(()=>[Ct($e(s(t).amount)+" "+$e(s(t).currency),1)]),_:1}),ee(i,{span:12},{default:le(()=>[Ct($e(s(ht).amountToBePaid),1)]),_:1}),ee(i,{span:12},{default:le(()=>[ee(NC)]),_:1}),s(o)?(b(),he(i,{key:2,span:12},{default:le(()=>[Ct($e(s(ht).selectedNetwork),1)]),_:1})):se("",!0),s(o)?(b(),he(i,{key:3,span:12},{default:le(()=>[Ct($e(s(o).name)+" ",1),l.value?(b(),M("span",{key:0,onClick:a[0]||(a[0]=d=>s(Tt).$reset()),class:"change-network disable-el","data-disabled":s(Tt).isPaymentAmountUpdating}," ("+$e(s(ht).change)+")",9,PC)):se("",!0)]),_:1})):se("",!0)]),_:1})}}}),RC={class:"currencies"},LC=["onClick","data-disabled"],BC=["src","alt"],VC={class:"name"},DC={key:0,class:"discount"},HC=N({__name:"CurrencyList",setup(e){const t=Ge("container"),o=Tt.get.order,r=Tt.get.network,l=un((r==null?void 0:r.currencies)??[]),n=D(ht.payNow),a=c=>o.paymentCurrency.address==c.address?"selected":"",i=async c=>{Tt.isPaymentAmountUpdating||o.paymentCurrency.symbol==c.symbol||await Vt.call("selectedCurrency",{newCurrency:c,oldCurrency:o==null?void 0:o.paymentCurrency})};return ft(async()=>{let c=setInterval(()=>{var d;if((d=t==null?void 0:t.value)!=null&&d.querySelectorAll){const u=t.value.querySelectorAll(".adapters li");if(u.length==1&&u[0]){clearInterval(c);const p=u[0].querySelector(".name");let h=p==null?void 0:p.getAttribute("data-key"),v=p==null?void 0:p.getAttribute("data-name");h=="web3modal"?n.value=ht.payNow:n.value=ht.payWith.replace("{name}",v||"")}}},1)}),(c,d)=>{const u=nt("el-col"),p=nt("el-row"),h=nt("el-button");return b(),M(Qe,null,[ee(eb),s(l).length>1?(b(),he(p,{key:0},{default:le(()=>[ee(u,{span:24},{default:le(()=>[E("ul",RC,[ee(p,{gutter:20},{default:le(()=>[(b(!0),M(Qe,null,It(s(l),v=>(b(),he(u,{span:12,key:v.address},{default:le(()=>[E("li",{class:O(["disable-el",a(v)]),onClick:m=>i(v),"data-disabled":s(Tt).isPaymentAmountUpdating},[E("span",null,[E("img",{class:"icon",src:s(Xs)(v.symbol),alt:v.symbol},null,8,BC),E("span",VC,$e(v.symbol),1)]),s(qt).discountRates[v.symbol]?(b(),M("span",DC," ("+$e(s(qt).discountRates[v.symbol])+"% "+$e(s(ht).discount)+") ",1)):se("",!0)],10,LC)]),_:2},1024))),128))]),_:1})])]),_:1})]),_:1})):se("",!0),ee(h,{type:"primary",class:"button",disabled:s(Tt).isPaymentAmountUpdating,onClick:d[0]||(d[0]=v=>s(Vt).call("payNow",{order:s(o),network:s(r)}))},{default:le(()=>[Ct($e(n.value),1)]),_:1},8,["disabled"])],64)}}});var tb=(e=>(e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e))(tb||{}),ki=(e=>(e.GENERAL="GENERAL",e.CONTRACT="CONTRACT",e.COIN="COIN",e.TOKEN="TOKEN",e.NFT="NFT",e))(ki||{}),Ci=(e=>(e.FAILED="FAILED",e.PENDING="PENDING",e.CONFIRMED="CONFIRMED",e))(Ci||{}),Fo=(e=>(e.RPC_TIMEOUT="RPC_TIMEOUT",e.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",e.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",e.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",e.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",e.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",e.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",e.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",e.INVALID_AMOUNT="INVALID_AMOUNT",e.INVALID_ADDRESS="INVALID_ADDRESS",e.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",e.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",e.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",e.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",e.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",e.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",e.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",e.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",e.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",e.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",e.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",e.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",e.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",e.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",e.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",e.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",e.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",e))(Fo||{}),Zs=(e=>(e.BROWSER="BROWSER",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e.UNIVERSAL="UNIVERSAL",e))(Zs||{});ki.GENERAL+"",ki.CONTRACT+"",ki.COIN+"",ki.TOKEN+"",ki.NFT+"";const FC=N({__name:"PaymentRequest",setup(e,{expose:t}){const o=Tt.get.order,r=Tt.get.network,l=Tt.get.receiver,n=D(!1),a=(c,d)=>{c!=Fo.CLOSED_WALLETCONNECT_MODAL&&(c==Fo.TRANSACTION_CREATION_FAILED?bo(ht.transactionCreateFail,ht.pleaseTryAgain):c==Fo.INSUFFICIENT_BALANCE?Al(ht.insufficientBalance):c==Fo.INVALID_AMOUNT?Al(ht.transferAmountError):c==Fo.WALLET_REQUEST_REJECTED||c==Fo.WALLET_CONNECT_REJECTED?Ju(ht.paymentRejected):c==Fo.RPC_ACCESS_DENIED||c.includes("Access forbidden")?bo(ht.rpcAccessForbidden):c==Fo.UNACCEPTED_CHAIN||c==Fo.RPC_REQUEST_ERROR?bo(ht.connectionError,Qu(r)):c==Fo.RPC_TIMEOUT?bo(ht.rpcTimeout):ht[d]?bo(ht[d]):c=="SAME_ADDRESS"?bo(ht.cannotPaySameAddress):bo(ht.anyError))};return t({start:async c=>{var u;n.value=!0,c0(),await Vt.call("walletPaymentRequest",{order:o,wallet:c,network:r});const d=async p=>{zo.error(p),await Vt.call("walletPaymentDeclined",{order:o,wallet:c,network:r}),n.value=!1,a(typeof p=="string"?p:p.message)};try{let p;(u=o.paymentCurrency)!=null&&u.address?p=new Un.assets.Token(o.paymentCurrency.address):p=new Un.assets.Coin;const h=await c.getAddress();if(zo.log("sender: ",h),h.toLowerCase()==l.toLowerCase())throw new Error("SAME_ADDRESS");const v=await p.transfer(h,l,o.paymentAmount);c.sendTransaction(v).then(async m=>{await Vt.call("walletPaymentApproved",{order:o,wallet:c,network:r}),n.value=!1,Tt.setTransactionHash(m)}).catch(d).finally(()=>{Gs(),xi(c)})}catch(p){d(p),Gs(),xi(c)}}}),(c,d)=>{const u=nt("cp-loading"),p=nt("cp-modal");return n.value?(b(),he(p,{key:0,title:s(ht).waitingApproval},{default:le(()=>[ee(u)]),_:1},8,["title"])):se("",!0)}}}),jC={class:"icon-wrapper"},KC=["src","alt"],UC=["data-key","data-name"],WC={class:"status"},qC={key:0},YC={key:1,class:"detected"},GC={key:2,class:"download"},XC={key:3,class:"onlyDesktop"},ZC={key:4,class:"openInApp"},JC={key:5,class:"openInAppManual"},QC=N({__name:"WalletAdapterList",emits:["statusChanged"],setup(e,{emit:t}){const o=Tt.get.order,r=Un.browser.Wallet,l=Tt.get.network,n=D(!1),a=D(0),i=D({}),c=D(!1),d=D(!1),u=D(["currency"].includes(qt.mode)),p=t;p("statusChanged",u.value),Se(u,R=>{p("statusChanged",R)});const h=D(null),v=D(null),m=C(()=>n.value?ht.connectionWallet:ht.selectWallet);Vt.add("payNow",()=>{f()},"walletList");const f=async()=>{var R,P;u.value=!0,Vt.call("walletListOpened",{network:l,order:o}),Object.values(i.value).length==1&&((P=(R=v.value)==null?void 0:R.listContent.querySelector("li"))==null||P.click())},_=()=>{Tt.isPaymentAmountUpdating||n.value||g()},g=()=>{u.value=!1,clearTimeout(a.value),Vt.call("walletListClosed",{network:l,order:o})};Vt.add("paymentReset",()=>{clearTimeout(a.value)},"walletList");const y=async R=>{const P={true:1,universal:2,false:3},L=await Promise.all(Object.keys(R).map(async V=>{const B=R[V],J=B.platforms.includes(Zs.UNIVERSAL)?"universal":await B.isDetected();return{key:V,isDetected:J}}));return L.sort((V,B)=>P[V.isDetected]-P[B.isDetected]),L.map(V=>V.key)},w=async()=>{let R=G1(qt.wallets);return R=(await y(R)).reduce((L,V)=>(L[V]=R[V],L),{}),u0()&&Object.values(R).forEach(async L=>{if(await L.isDetected())return R={},R[L.id]=L,!0}),R},x=()=>{clearTimeout(a.value),a.value=setTimeout(()=>{n.value=!1,bo(ht.walletConnectionTimedOut)},30*1e3)},$=R=>R==Fo.CLOSED_WALLETCONNECT_MODAL?!1:R.indexOf("Connection request reset. Please try again.")===-1;Vt.add("walletConnectionDeclined, walletPaymentDeclined",({wallet:R})=>{qt.mode=="network"?Object.values(i.value).length>1?f():g():f(),n.value=!1,clearTimeout(a.value),xi(R),d.value=!1},"walletList"),Vt.add("walletPaymentApproved",()=>{c.value=!0},"walletList");const T=async R=>{if(!r)return bo(ht.notFoundAnyWallet);const P=new r(R);if(await xi(P),await P.isDetected()===!1)return yi()?P.getPlatforms().includes(Zs.MOBILE)?P.adapter.createDeepLink?(Al(ht.openInAppMsg),window.open(P.createDeepLink(window.location.origin),"_blank")):Al(ht.openInAppManualMsg):Al(ht.onlyDesktopMsg):P.getDownloadLink()?(window.open(P.getDownloadLink(),"_blank"),Al(ht.downloadMsg)):Al(ht.downloadManualMsg);await Vt.call("walletConnectionRequest",{network:l,order:o,wallet:P}),["walletconnect","web3modal"].includes(P.getId())||x();const L=qt.adapterConfig;P.getId()=="web3modal"&&(L.events=[function(B){B.data.event==="CONNECT_SUCCESS"&&x()}]),L.metadata={name:"CryptoPay",url:window.location.origin,description:"Crypto Payment Gateway",icons:[qt.logo]};try{n.value=!0,P.connect(L).then(async()=>{var V;n.value=!1,clearTimeout(a.value),await Vt.call("walletConnectionApproved",{network:l,order:o,wallet:P}),dC(P),(V=h.value)==null||V.start(P),d.value=!0}).catch(async V=>{n.value=!1,clearTimeout(a.value),zo.error(V),await Vt.call("walletConnectionDeclined",{network:l,order:o,wallet:P});const B=typeof V=="string"?V:V.message;$(B)&&(B==Fo.WALLET_REQUEST_REJECTED||B==Fo.WALLET_CONNECT_REJECTED?Ju(ht.connectionRejected):B==Fo.WALLET_ALREADY_PROCESSING?bo(ht.alreadyProcessing):B==Fo.UNACCEPTED_CHAIN?bo(ht.connectionError,Qu(l)):B==Fo.RPC_ACCESS_DENIED?bo(ht.rpcAccessForbidden):B==Fo.RPC_REQUEST_ERROR?bo(ht.connectionError,Qu(l)):B==Fo.RPC_TIMEOUT?bo(ht.rpcTimeout):ht[V]?bo(ht[V]):typeof V=="object"?V.message.includes("Proposal expired")&&bo(ht.walletConnectionTimedOut):bo(ht.anyError))})}catch(V){zo.error(V)}};return ft(async()=>{i.value=await w()}),(R,P)=>{const L=nt("cp-loading"),V=nt("cp-list"),B=nt("cp-modal");return b(),M(Qe,null,[c.value?se("",!0):mt((b(),he(B,{key:0,show:u.value,title:m.value,onClose:P[0]||(P[0]=j=>_())},{default:le(()=>[s(qt).mode=="currency"?mt((b(),he(eb,{key:0},null,512)),[[Lt,!n.value]]):se("",!0),n.value?(b(),he(L,{key:1})):(b(),he(V,{key:2,search:!1,ref_key:"adapterListEl",ref:v,itemClass:"adapter",onHandleClick:T,list:Object.values(i.value),noFoundMsg:s(ht).notFoundAnyNetworkForPayment,listClass:"adapters "+(s(Tt).isPaymentAmountUpdating?"disabled":"")},{default:le(({item:j})=>[E("div",jC,[E("img",{class:"icon",src:j.icon,alt:j.name},null,8,KC)]),E("span",{class:"name","data-key":j.id,"data-name":j.name},$e(j.name),9,UC),E("span",WC,[j.platforms.includes(s(Zs).UNIVERSAL)?(b(),M("span",qC)):j.isDetected()===!0?(b(),M("span",YC,$e(s(ht).detected),1)):!yi()&&j.isDetected()===!1?(b(),M("span",GC,$e(s(ht).download),1)):yi()&&!j.platforms.includes(s(Zs).MOBILE)?(b(),M("span",XC,$e(s(ht).onlyDesktop),1)):yi()&&j.createDeepLink?(b(),M("span",ZC,$e(s(ht).openInApp),1)):yi()&&!j.createDeepLink?(b(),M("span",JC,$e(s(ht).openInAppManual),1)):se("",!0)])]),_:1},8,["list","noFoundMsg","listClass"]))]),_:1},8,["show","title"])),[[Lt,!d.value]]),ee(FC,{ref_key:"paymentRequest",ref:h},null,512)],64)}}});let Sa={};const Js={add:e=>{Sa=Object.assign(Sa,e)},set:(e,t)=>{Sa[e]=t},remove:e=>{delete Sa[e]},get:e=>Sa[e],getAll:()=>Sa,removeAll:()=>{Sa={}}},e7=N({__name:"TransactionProcess",props:{transactionHash:{type:String,required:!0}},setup(e){const t=D(!0),o=e;return ft(async()=>{try{const r=Tt.get.order,l=Tt.get.network,n=Tt.transactionInstance(o.transactionHash),a=await Vt.call("transactionReceived",{order:r,network:l,transaction:n});if(!Vt.check(a))return;if(qt.createTransaction){const i=await Tt.get.api.createTransaction(n);if(i.success)i.data&&Js.add(i.data);else{await Vt.call("transactionCreateFail",{order:r,network:l,transaction:n}),bo(i.message||ht.anyError).then(()=>{Ys(),i.data&&i.data.redirect?i.data.redirect=="reload"?window.location.reload():window.location.href=i.data.redirect:window.location.reload()});return}await Vt.call("transactionCreated",{order:r,network:l,transaction:n})}qt.confirmation&&Tt.setProcess(Zu.CONFIRMATION),t.value=!1}catch(r){return zo.error(r),!1}}),(r,l)=>{const n=nt("cp-loading"),a=nt("cp-modal");return t.value?(b(),he(a,{key:0,title:s(ht).processing},{default:le(()=>[ee(n)]),_:1},8,["title"])):se("",!0)}}});function ob(e,t){return function(){return e.apply(t,arguments)}}const{toString:t7}=Object.prototype,{getPrototypeOf:d0}=Object,td=(e=>t=>{const o=t7.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ul=e=>(e=e.toLowerCase(),t=>td(t)===e),od=e=>t=>typeof t===e,{isArray:Si}=Array,Qs=od("undefined");function o7(e){return e!==null&&!Qs(e)&&e.constructor!==null&&!Qs(e.constructor)&&Ur(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rb=ul("ArrayBuffer");function r7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rb(e.buffer),t}const l7=od("string"),Ur=od("function"),lb=od("number"),rd=e=>e!==null&&typeof e=="object",n7=e=>e===!0||e===!1,ld=e=>{if(td(e)!=="object")return!1;const t=d0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},a7=ul("Date"),i7=ul("File"),s7=ul("Blob"),c7=ul("FileList"),u7=e=>rd(e)&&Ur(e.pipe),d7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ur(e.append)&&((t=td(e))==="formdata"||t==="object"&&Ur(e.toString)&&e.toString()==="[object FormData]"))},p7=ul("URLSearchParams"),[f7,h7,v7,m7]=["ReadableStream","Request","Response","Headers"].map(ul),g7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ec(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),Si(e))for(r=0,l=e.length;r0;)if(l=o[r],t===l.toLowerCase())return l;return null}const ab=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Xl,ib=e=>!Qs(e)&&e!==ab;function p0(){const{caseless:e}=ib(this)&&this||{},t={},o=(r,l)=>{const n=e&&nb(t,l)||l;ld(t[n])&&ld(r)?t[n]=p0(t[n],r):ld(r)?t[n]=p0({},r):Si(r)?t[n]=r.slice():t[n]=r};for(let r=0,l=arguments.length;r(ec(t,(l,n)=>{o&&Ur(l)?e[n]=ob(l,o):e[n]=l},{allOwnKeys:r}),e),_7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),w7=(e,t,o,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},y7=(e,t,o,r)=>{let l,n,a;const i={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),n=l.length;n-- >0;)a=l[n],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=o!==!1&&d0(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},x7=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const r=e.indexOf(t,o);return r!==-1&&r===o},k7=e=>{if(!e)return null;if(Si(e))return e;let t=e.length;if(!lb(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},C7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&d0(Uint8Array)),S7=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let l;for(;(l=r.next())&&!l.done;){const n=l.value;t.call(e,n[0],n[1])}},E7=(e,t)=>{let o;const r=[];for(;(o=e.exec(t))!==null;)r.push(o);return r},T7=ul("HTMLFormElement"),$7=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,l){return r.toUpperCase()+l}),sb=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),M7=ul("RegExp"),cb=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),r={};ec(o,(l,n)=>{let a;(a=t(l,n,e))!==!1&&(r[n]=a||l)}),Object.defineProperties(e,r)},A7=e=>{cb(e,(t,o)=>{if(Ur(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=e[o];if(Ur(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},z7=(e,t)=>{const o={},r=l=>{l.forEach(n=>{o[n]=!0})};return Si(e)?r(e):r(String(e).split(t)),o},I7=()=>{},O7=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,f0="abcdefghijklmnopqrstuvwxyz",ub="0123456789",db={DIGIT:ub,ALPHA:f0,ALPHA_DIGIT:f0+f0.toUpperCase()+ub},N7=(e=16,t=db.ALPHA_DIGIT)=>{let o="";const{length:r}=t;for(;e--;)o+=t[Math.random()*r|0];return o};function P7(e){return!!(e&&Ur(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const R7=e=>{const t=new Array(10),o=(r,l)=>{if(rd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[l]=r;const n=Si(r)?[]:{};return ec(r,(a,i)=>{const c=o(a,l+1);!Qs(c)&&(n[i]=c)}),t[l]=void 0,n}}return r};return o(e,0)},L7=ul("AsyncFunction"),Ue={isArray:Si,isArrayBuffer:rb,isBuffer:o7,isFormData:d7,isArrayBufferView:r7,isString:l7,isNumber:lb,isBoolean:n7,isObject:rd,isPlainObject:ld,isReadableStream:f7,isRequest:h7,isResponse:v7,isHeaders:m7,isUndefined:Qs,isDate:a7,isFile:i7,isBlob:s7,isRegExp:M7,isFunction:Ur,isStream:u7,isURLSearchParams:p7,isTypedArray:C7,isFileList:c7,forEach:ec,merge:p0,extend:b7,trim:g7,stripBOM:_7,inherits:w7,toFlatObject:y7,kindOf:td,kindOfTest:ul,endsWith:x7,toArray:k7,forEachEntry:S7,matchAll:E7,isHTMLForm:T7,hasOwnProperty:sb,hasOwnProp:sb,reduceDescriptors:cb,freezeMethods:A7,toObjectSet:z7,toCamelCase:$7,noop:I7,toFiniteNumber:O7,findKey:nb,global:ab,isContextDefined:ib,ALPHABET:db,generateString:N7,isSpecCompliantForm:P7,toJSONObject:R7,isAsyncFn:L7,isThenable:e=>e&&(rd(e)||Ur(e))&&Ur(e.then)&&Ur(e.catch)};var pb={},nd={};nd.byteLength=D7,nd.toByteArray=F7,nd.fromByteArray=U7;for(var zl=[],Wr=[],B7=typeof Uint8Array<"u"?Uint8Array:Array,h0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ei=0,V7=h0.length;Ei0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");o===-1&&(o=t);var r=o===t?0:4-o%4;return[o,r]}function D7(e){var t=fb(e),o=t[0],r=t[1];return(o+r)*3/4-r}function H7(e,t,o){return(t+o)*3/4-o}function F7(e){var t,o=fb(e),r=o[0],l=o[1],n=new B7(H7(e,r,l)),a=0,i=l>0?r-4:r,c;for(c=0;c>16&255,n[a++]=t>>8&255,n[a++]=t&255;return l===2&&(t=Wr[e.charCodeAt(c)]<<2|Wr[e.charCodeAt(c+1)]>>4,n[a++]=t&255),l===1&&(t=Wr[e.charCodeAt(c)]<<10|Wr[e.charCodeAt(c+1)]<<4|Wr[e.charCodeAt(c+2)]>>2,n[a++]=t>>8&255,n[a++]=t&255),n}function j7(e){return zl[e>>18&63]+zl[e>>12&63]+zl[e>>6&63]+zl[e&63]}function K7(e,t,o){for(var r,l=[],n=t;ni?i:a+n));return r===1?(t=e[o-1],l.push(zl[t>>2]+zl[t<<4&63]+"==")):r===2&&(t=(e[o-2]<<8)+e[o-1],l.push(zl[t>>10]+zl[t>>4&63]+zl[t<<2&63]+"=")),l.join("")}var v0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */v0.read=function(e,t,o,r,l){var n,a,i=l*8-r-1,c=(1<>1,u=-7,p=o?l-1:0,h=o?-1:1,v=e[t+p];for(p+=h,n=v&(1<<-u)-1,v>>=-u,u+=i;u>0;n=n*256+e[t+p],p+=h,u-=8);for(a=n&(1<<-u)-1,n>>=-u,u+=r;u>0;a=a*256+e[t+p],p+=h,u-=8);if(n===0)n=1-d;else{if(n===c)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,r),n=n-d}return(v?-1:1)*a*Math.pow(2,n-r)},v0.write=function(e,t,o,r,l,n){var a,i,c,d=n*8-l-1,u=(1<>1,h=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:n-1,m=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+p>=1?t+=h/c:t+=h*Math.pow(2,1-p),t*c>=2&&(a++,c/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(t*c-1)*Math.pow(2,l),a=a+p):(i=t*Math.pow(2,p-1)*Math.pow(2,l),a=0));l>=8;e[o+v]=i&255,v+=m,i/=256,l-=8);for(a=a<0;e[o+v]=a&255,v+=m,a/=256,d-=8);e[o+v-m]|=f*128};/*! + `}else return(t.paymentAmount||0)+" "+t.paymentCurrency.symbol}),r=async c=>{if(t.amount==0)return 0;Tt.setOrderParam("paymentAmount",0);const d=await Tt.get.api.currencyConverter();return await Vt.call("currencyConverter",{paymentCurrency:c,paymentAmount:d}),d?Tt.setOrderParams({paymentAmount:d}):(Tt.setOrderParam("paymentAmount",0),Al(ht.convertingError).then(()=>{window.location.reload()})),d};let l=un(t);Se(t,c=>{l&&l.amount!=c.amount&&r(t.paymentCurrency),l=un(c)});const n=c=>{if(Ho.get.amountUpdateInterval)return;const d=setInterval(async()=>{i(t.paymentCurrency)},Ft.amountUpdateMin*60*1e3);zo.log("Start amount updater: ",d,"event: ",c),Ho.set("amountUpdateInterval",d)},a=c=>{if(!Ho.get.amountUpdateInterval)return;const d=Ho.get.amountUpdateInterval;zo.log("Stop amount updater: ",d,"event: ",c),Ho.stopAmountUpdateInterval()},i=async c=>Ft.modal&&!Ho.get.modal?zo.log("Currency not updated, because modal is not opened"):(zo.log("Currency updating: ",c),a("interval"),await r(c),n("interval"),!0);return Vt.add("selectedCurrency",({newCurrency:c})=>(Tt.setOrderParams({paymentCurrency:c}),i(c)),"paymentAmount"),Vt.add("paymentReset",()=>{a("paymentReset")},"paymentAmount"),Ft.mode=="network"?(Vt.add("walletListOpened",({eventName:c})=>{a(c)},"paymentAmount"),Vt.add("walletListClosed",({eventName:c})=>{n(c)},"paymentAmount")):(Vt.add("walletConnectionRequest",({eventName:c})=>{a(c)},"paymentAmount"),Vt.add("walletPaymentDeclined, walletConnectionDeclined",({eventName:c})=>{n(c)},"paymentAmount")),ft(()=>{n("mounted")}),(c,d)=>(b(),M("div",{class:"payment-amount",innerHTML:o.value},null,8,IC))}}),NC=["data-disabled"],Q1=N({__name:"InformationHeader",setup(e){const t=Tt.get.order,o=Tt.get.network,r=C(()=>Ho.get.networks),l=C(()=>{switch(Ft.mode){case"network":return r.value.length>1;case"currency":return!0;default:return!0}});return(async()=>{if(window.cpCheckRpc)return;window.cpCheckRpc=!0,await q1.checkRpcConnection()instanceof Error&&fo(ht.rpcConnectionError).then(()=>{window.location.reload()})})(),(n,a)=>{const i=nt("el-col"),c=nt("el-row");return b(),he(c,{justify:"center",class:"header"},{default:le(()=>[s(t).id?(b(),he(i,{key:0,span:12},{default:le(()=>[Ct($e(s(ht).orderId),1)]),_:1})):se("",!0),s(t).id?(b(),he(i,{key:1,span:12},{default:le(()=>[Ct($e(s(t).id),1)]),_:1})):se("",!0),te(i,{span:12},{default:le(()=>[Ct($e(s(ht).orderAmount),1)]),_:1}),te(i,{span:12},{default:le(()=>[Ct($e(s(t).amount)+" "+$e(s(t).currency),1)]),_:1}),te(i,{span:12},{default:le(()=>[Ct($e(s(ht).amountToBePaid),1)]),_:1}),te(i,{span:12},{default:le(()=>[te(OC)]),_:1}),s(o)?(b(),he(i,{key:2,span:12},{default:le(()=>[Ct($e(s(ht).selectedNetwork),1)]),_:1})):se("",!0),s(o)?(b(),he(i,{key:3,span:12},{default:le(()=>[Ct($e(s(o).name)+" ",1),l.value?(b(),M("span",{key:0,onClick:a[0]||(a[0]=d=>s(Tt).$reset()),class:"change-network disable-el","data-disabled":s(Tt).isPaymentAmountUpdating}," ("+$e(s(ht).change)+")",9,NC)):se("",!0)]),_:1})):se("",!0)]),_:1})}}}),PC={class:"currencies"},RC=["onClick","data-disabled"],LC=["src","alt"],BC={class:"name"},VC={key:0,class:"discount"},DC=N({__name:"CurrencyList",setup(e){const t=Ge("container"),o=Tt.get.order,r=Tt.get.network,l=un((r==null?void 0:r.currencies)??[]),n=D(ht.payNow),a=c=>o.paymentCurrency.address==c.address?"selected":"",i=async c=>{Tt.isPaymentAmountUpdating||o.paymentCurrency.symbol==c.symbol||await Vt.call("selectedCurrency",{newCurrency:c,oldCurrency:o==null?void 0:o.paymentCurrency})};return ft(async()=>{let c=setInterval(()=>{var d;if((d=t==null?void 0:t.value)!=null&&d.querySelectorAll){const u=t.value.querySelectorAll(".adapters li");if(u.length==1&&u[0]){clearInterval(c);const p=u[0].querySelector(".name");let h=p==null?void 0:p.getAttribute("data-key"),v=p==null?void 0:p.getAttribute("data-name");h=="web3wallets"?n.value=ht.payNow:n.value=ht.payWith.replace("{name}",v||"")}}},1)}),(c,d)=>{const u=nt("el-col"),p=nt("el-row"),h=nt("el-button");return b(),M(Qe,null,[te(Q1),s(l).length>1?(b(),he(p,{key:0},{default:le(()=>[te(u,{span:24},{default:le(()=>[E("ul",PC,[te(p,{gutter:20},{default:le(()=>[(b(!0),M(Qe,null,It(s(l),v=>(b(),he(u,{span:12,key:v.address},{default:le(()=>[E("li",{class:O(["disable-el",a(v)]),onClick:m=>i(v),"data-disabled":s(Tt).isPaymentAmountUpdating},[E("span",null,[E("img",{class:"icon",src:s(Gs)(v.symbol),alt:v.symbol},null,8,LC),E("span",BC,$e(v.symbol),1)]),s(Ft).discountRates[v.symbol]?(b(),M("span",VC," ("+$e(s(Ft).discountRates[v.symbol])+"% "+$e(s(ht).discount)+") ",1)):se("",!0)],10,RC)]),_:2},1024))),128))]),_:1})])]),_:1})]),_:1})):se("",!0),te(h,{type:"primary",class:"button",disabled:s(Tt).isPaymentAmountUpdating,onClick:d[0]||(d[0]=v=>s(Vt).call("payNow",{order:s(o),network:s(r)}))},{default:le(()=>[Ct($e(n.value),1)]),_:1},8,["disabled"])],64)}}});var eb=(e=>(e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e))(eb||{}),ki=(e=>(e.GENERAL="GENERAL",e.CONTRACT="CONTRACT",e.COIN="COIN",e.TOKEN="TOKEN",e.NFT="NFT",e))(ki||{}),Ci=(e=>(e.FAILED="FAILED",e.PENDING="PENDING",e.CONFIRMED="CONFIRMED",e))(Ci||{}),Fo=(e=>(e.RPC_TIMEOUT="RPC_TIMEOUT",e.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",e.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",e.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",e.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",e.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",e.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",e.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",e.INVALID_AMOUNT="INVALID_AMOUNT",e.INVALID_ADDRESS="INVALID_ADDRESS",e.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",e.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",e.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",e.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",e.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",e.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",e.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",e.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",e.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",e.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",e.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",e.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",e.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",e.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",e.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",e.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",e.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",e))(Fo||{}),Xs=(e=>(e.BROWSER="BROWSER",e.MOBILE="MOBILE",e.DESKTOP="DESKTOP",e.UNIVERSAL="UNIVERSAL",e))(Xs||{});ki.GENERAL+"",ki.CONTRACT+"",ki.COIN+"",ki.TOKEN+"",ki.NFT+"";const HC=N({__name:"PaymentRequest",setup(e,{expose:t}){const o=Tt.get.order,r=Tt.get.network,l=Tt.get.receiver,n=D(!1),a=(c,d)=>{c!=Fo.CLOSED_WALLETCONNECT_MODAL&&(c==Fo.TRANSACTION_CREATION_FAILED?fo(ht.transactionCreateFail,ht.pleaseTryAgain):c==Fo.INSUFFICIENT_BALANCE?Al(ht.insufficientBalance):c==Fo.INVALID_AMOUNT?Al(ht.transferAmountError):c==Fo.WALLET_REQUEST_REJECTED||c==Fo.WALLET_CONNECT_REJECTED?Zu(ht.paymentRejected):c==Fo.RPC_ACCESS_DENIED||c.includes("Access forbidden")?fo(ht.rpcAccessForbidden):c==Fo.UNACCEPTED_CHAIN||c==Fo.RPC_REQUEST_ERROR?fo(ht.connectionError,Ju(r)):c==Fo.RPC_TIMEOUT?fo(ht.rpcTimeout):ht[d]?fo(ht[d]):c=="SAME_ADDRESS"?fo(ht.cannotPaySameAddress):fo(ht.anyError))};return t({start:async c=>{var u;n.value=!0,s0(),await Vt.call("walletPaymentRequest",{order:o,wallet:c,network:r});const d=async p=>{zo.error(p),await Vt.call("walletPaymentDeclined",{order:o,wallet:c,network:r}),n.value=!1,a(typeof p=="string"?p:p.message)};try{let p;(u=o.paymentCurrency)!=null&&u.address?p=new Un.assets.Token(o.paymentCurrency.address):p=new Un.assets.Coin;const h=await c.getAddress();if(zo.log("sender: ",h),h.toLowerCase()==l.toLowerCase())throw new Error("SAME_ADDRESS");const v=await p.transfer(h,l,o.paymentAmount);c.sendTransaction(v).then(async m=>{await Vt.call("walletPaymentApproved",{order:o,wallet:c,network:r}),n.value=!1,Tt.setTransactionHash(m)}).catch(d).finally(()=>{Ys(),xi(c)})}catch(p){d(p),Ys(),xi(c)}}}),(c,d)=>{const u=nt("cp-loading"),p=nt("cp-modal");return n.value?(b(),he(p,{key:0,title:s(ht).waitingApproval},{default:le(()=>[te(u)]),_:1},8,["title"])):se("",!0)}}}),FC={class:"icon-wrapper"},jC=["src","alt"],KC=["data-key","data-name"],UC={class:"status"},WC={key:0},qC={key:1,class:"detected"},YC={key:2,class:"download"},GC={key:3,class:"onlyDesktop"},XC={key:4,class:"openInApp"},ZC={key:5,class:"openInAppManual"},JC=N({__name:"WalletAdapterList",emits:["statusChanged"],setup(e,{emit:t}){const o=Tt.get.order,r=Un.browser.Wallet,l=Tt.get.network,n=D(0),a=D(!1),i=D({}),c=D(!1),d=D(!1),u=D(["currency"].includes(Ft.mode)),p=t;p("statusChanged",u.value),Se(u,P=>{p("statusChanged",P)});const h=D(null),v=D(null),m=C(()=>a.value?ht.connectionWallet:ht.selectWallet);Vt.add("payNow",()=>{f()},"walletList");const f=async()=>{var P,R;u.value=!0,Vt.call("walletListOpened",{network:l,order:o}),Object.values(i.value).length==1&&Ft.mode=="network"&&((R=(P=v.value)==null?void 0:P.listContent.querySelector("li"))==null||R.click())},_=()=>{Tt.isPaymentAmountUpdating||a.value||g()},g=()=>{u.value=!1,clearTimeout(n.value),Vt.call("walletListClosed",{network:l,order:o})};Vt.add("paymentReset",()=>{clearTimeout(n.value)},"walletList");const y=async P=>{const R={true:1,universal:2,false:3},V=await Promise.all(Object.keys(P).map(async B=>{const F=P[B],Z=F.platforms.includes(Xs.UNIVERSAL)?"universal":await F.isDetected();return{key:B,isDetected:Z}}));return V.sort((B,F)=>R[B.isDetected]-R[F.isDetected]),V.map(B=>B.key)},w=async()=>{let P=Y1(Ft.wallets);if(P=(await y(P)).reduce((V,B)=>(V[B]=P[B],V),{}),c0())for(const V in P){const B=P[V];if(await B.isDetected()){P={},P[B.id]=B;break}}return P},x=()=>{clearTimeout(n.value),n.value=setTimeout(()=>{a.value=!1,fo(ht.walletConnectionTimedOut)},30*1e3)},$=P=>P==Fo.CLOSED_WALLETCONNECT_MODAL?!1:P.indexOf("Connection request reset. Please try again.")===-1;Vt.add("walletConnectionDeclined, walletPaymentDeclined",({wallet:P})=>{Ft.mode=="network"?Object.values(i.value).length>1?f():g():f(),a.value=!1,clearTimeout(n.value),xi(P),d.value=!1},"walletList"),Vt.add("walletPaymentApproved",()=>{c.value=!0},"walletList");const T=["walletconnect","web3wallets"],L=async P=>{if(!r)return fo(ht.notFoundAnyWallet);const R=new r(P);if(await xi(R),await R.isDetected()===!1)return yi()?R.getPlatforms().includes(Xs.MOBILE)?R.adapter.createDeepLink?(Al(ht.openInAppMsg),window.open(R.createDeepLink(window.location.origin),"_blank")):Al(ht.openInAppManualMsg):Al(ht.onlyDesktopMsg):R.getDownloadLink()?(window.open(R.getDownloadLink(),"_blank"),Al(ht.downloadMsg)):Al(ht.downloadManualMsg);if(await Vt.call("walletConnectionRequest",{network:l,order:o,wallet:R}),T.includes(R.getId())){if(!Ft.adapterConfig.projectId){fo(ht.reownProjectIdRequired);return}}else x();const V=Ft.adapterConfig;V.themeVariables={"--w3m-z-index":9999998,"--wcm-z-index":9999998},R.getId()=="web3wallets"&&(V.events=[function(F){F.data.event==="MODAL_CLOSE"&&(l.wallets.length===1&&Ft.mode=="network"&&g(),clearTimeout(n.value),a.value=!1)}]),V.metadata={name:"CryptoPay",url:window.location.origin,description:"Crypto Payment Gateway",icons:[Ft.logo]};try{a.value=!0,R.connect(V).then(async()=>{var B;a.value=!1,clearTimeout(n.value),await Vt.call("walletConnectionApproved",{network:l,order:o,wallet:R}),uC(R),(B=h.value)==null||B.start(R),d.value=!0}).catch(async B=>{a.value=!1,clearTimeout(n.value),zo.error(B),await Vt.call("walletConnectionDeclined",{network:l,order:o,wallet:R});const F=typeof B=="string"?B:B.message;$(F)&&(F==Fo.WALLET_REQUEST_REJECTED||F==Fo.WALLET_CONNECT_REJECTED?Zu(ht.connectionRejected):F==Fo.WALLET_ALREADY_PROCESSING?fo(ht.alreadyProcessing):F==Fo.UNACCEPTED_CHAIN?fo(ht.connectionError,Ju(l)):F==Fo.RPC_ACCESS_DENIED?fo(ht.rpcAccessForbidden):F==Fo.RPC_REQUEST_ERROR?fo(ht.connectionError,Ju(l)):F==Fo.RPC_TIMEOUT?fo(ht.rpcTimeout):ht[B]?fo(ht[B]):typeof B=="object"?B.message.includes("Proposal expired")&&fo(ht.walletConnectionTimedOut):fo(ht.anyError))})}catch(B){zo.error(B)}};return ft(async()=>{i.value=await w()}),(P,R)=>{const V=nt("cp-loading"),B=nt("cp-list"),F=nt("cp-modal");return b(),M(Qe,null,[c.value?se("",!0):mt((b(),he(F,{key:0,show:u.value,title:m.value,onClose:R[0]||(R[0]=Q=>_())},{default:le(()=>[s(Ft).mode=="currency"?mt((b(),he(Q1,{key:0},null,512)),[[Lt,!a.value]]):se("",!0),a.value?(b(),he(V,{key:1})):(b(),he(B,{key:2,search:!1,ref_key:"adapterListEl",ref:v,itemClass:"adapter",onHandleClick:L,list:Object.values(i.value),noFoundMsg:s(ht).notFoundAnyNetworkForPayment,listClass:"adapters "+(s(Tt).isPaymentAmountUpdating?"disabled":"")},{default:le(({item:Q})=>[E("div",FC,[E("img",{class:"icon",src:Q.icon,alt:Q.name},null,8,jC)]),E("span",{class:"name","data-key":Q.id,"data-name":Q.name},$e(Q.name),9,KC),E("span",UC,[Q.platforms.includes(s(Xs).UNIVERSAL)?(b(),M("span",WC)):Q.isDetected()===!0?(b(),M("span",qC,$e(s(ht).detected),1)):!yi()&&Q.isDetected()===!1?(b(),M("span",YC,$e(s(ht).download),1)):yi()&&!Q.platforms.includes(s(Xs).MOBILE)?(b(),M("span",GC,$e(s(ht).onlyDesktop),1)):yi()&&Q.createDeepLink?(b(),M("span",XC,$e(s(ht).openInApp),1)):yi()&&!Q.createDeepLink?(b(),M("span",ZC,$e(s(ht).openInAppManual),1)):se("",!0)])]),_:1},8,["list","noFoundMsg","listClass"]))]),_:1},8,["show","title"])),[[Lt,!d.value]]),te(HC,{ref_key:"paymentRequest",ref:h},null,512)],64)}}});let Sa={};const Zs={add:e=>{Sa=Object.assign(Sa,e)},set:(e,t)=>{Sa[e]=t},remove:e=>{delete Sa[e]},get:e=>Sa[e],getAll:()=>Sa,removeAll:()=>{Sa={}}},QC=N({__name:"TransactionProcess",props:{transactionHash:{type:String,required:!0}},setup(e){const t=D(!0),o=e;return ft(async()=>{try{const r=Tt.get.order,l=Tt.get.network,n=Tt.transactionInstance(o.transactionHash),a=await Vt.call("transactionReceived",{order:r,network:l,transaction:n});if(!Vt.check(a))return;if(Ft.createTransaction){const i=await Tt.get.api.createTransaction(n);if(i.success)i.data&&Zs.add(i.data);else{await Vt.call("transactionCreateFail",{order:r,network:l,transaction:n}),fo(i.message||ht.anyError).then(()=>{i.data&&i.data.redirect?i.data.redirect=="reload"?window.location.reload():window.location.href=i.data.redirect:window.location.reload()});return}await Vt.call("transactionCreated",{order:r,network:l,transaction:n})}Ft.confirmation&&Tt.setProcess(Xu.CONFIRMATION),t.value=!1}catch(r){return zo.error(r),!1}}),(r,l)=>{const n=nt("cp-loading"),a=nt("cp-modal");return t.value?(b(),he(a,{key:0,title:s(ht).processing},{default:le(()=>[te(n)]),_:1},8,["title"])):se("",!0)}}});function tb(e,t){return function(){return e.apply(t,arguments)}}const{toString:e7}=Object.prototype,{getPrototypeOf:u0}=Object,ed=(e=>t=>{const o=e7.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ul=e=>(e=e.toLowerCase(),t=>ed(t)===e),td=e=>t=>typeof t===e,{isArray:Si}=Array,Js=td("undefined");function t7(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&Ur(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ob=ul("ArrayBuffer");function o7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ob(e.buffer),t}const r7=td("string"),Ur=td("function"),rb=td("number"),od=e=>e!==null&&typeof e=="object",l7=e=>e===!0||e===!1,rd=e=>{if(ed(e)!=="object")return!1;const t=u0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},n7=ul("Date"),a7=ul("File"),i7=ul("Blob"),s7=ul("FileList"),c7=e=>od(e)&&Ur(e.pipe),u7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ur(e.append)&&((t=ed(e))==="formdata"||t==="object"&&Ur(e.toString)&&e.toString()==="[object FormData]"))},d7=ul("URLSearchParams"),[p7,f7,h7,v7]=["ReadableStream","Request","Response","Headers"].map(ul),m7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qs(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),Si(e))for(r=0,l=e.length;r0;)if(l=o[r],t===l.toLowerCase())return l;return null}const nb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Xl,ab=e=>!Js(e)&&e!==nb;function d0(){const{caseless:e}=ab(this)&&this||{},t={},o=(r,l)=>{const n=e&&lb(t,l)||l;rd(t[n])&&rd(r)?t[n]=d0(t[n],r):rd(r)?t[n]=d0({},r):Si(r)?t[n]=r.slice():t[n]=r};for(let r=0,l=arguments.length;r(Qs(t,(l,n)=>{o&&Ur(l)?e[n]=tb(l,o):e[n]=l},{allOwnKeys:r}),e),b7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_7=(e,t,o,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},w7=(e,t,o,r)=>{let l,n,a;const i={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),n=l.length;n-- >0;)a=l[n],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=o!==!1&&u0(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},y7=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const r=e.indexOf(t,o);return r!==-1&&r===o},x7=e=>{if(!e)return null;if(Si(e))return e;let t=e.length;if(!rb(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},k7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&u0(Uint8Array)),C7=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let l;for(;(l=r.next())&&!l.done;){const n=l.value;t.call(e,n[0],n[1])}},S7=(e,t)=>{let o;const r=[];for(;(o=e.exec(t))!==null;)r.push(o);return r},E7=ul("HTMLFormElement"),T7=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,l){return r.toUpperCase()+l}),ib=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),$7=ul("RegExp"),sb=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),r={};Qs(o,(l,n)=>{let a;(a=t(l,n,e))!==!1&&(r[n]=a||l)}),Object.defineProperties(e,r)},M7=e=>{sb(e,(t,o)=>{if(Ur(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=e[o];if(Ur(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},A7=(e,t)=>{const o={},r=l=>{l.forEach(n=>{o[n]=!0})};return Si(e)?r(e):r(String(e).split(t)),o},z7=()=>{},I7=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,p0="abcdefghijklmnopqrstuvwxyz",cb="0123456789",ub={DIGIT:cb,ALPHA:p0,ALPHA_DIGIT:p0+p0.toUpperCase()+cb},O7=(e=16,t=ub.ALPHA_DIGIT)=>{let o="";const{length:r}=t;for(;e--;)o+=t[Math.random()*r|0];return o};function N7(e){return!!(e&&Ur(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const P7=e=>{const t=new Array(10),o=(r,l)=>{if(od(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[l]=r;const n=Si(r)?[]:{};return Qs(r,(a,i)=>{const c=o(a,l+1);!Js(c)&&(n[i]=c)}),t[l]=void 0,n}}return r};return o(e,0)},R7=ul("AsyncFunction"),Ue={isArray:Si,isArrayBuffer:ob,isBuffer:t7,isFormData:u7,isArrayBufferView:o7,isString:r7,isNumber:rb,isBoolean:l7,isObject:od,isPlainObject:rd,isReadableStream:p7,isRequest:f7,isResponse:h7,isHeaders:v7,isUndefined:Js,isDate:n7,isFile:a7,isBlob:i7,isRegExp:$7,isFunction:Ur,isStream:c7,isURLSearchParams:d7,isTypedArray:k7,isFileList:s7,forEach:Qs,merge:d0,extend:g7,trim:m7,stripBOM:b7,inherits:_7,toFlatObject:w7,kindOf:ed,kindOfTest:ul,endsWith:y7,toArray:x7,forEachEntry:C7,matchAll:S7,isHTMLForm:E7,hasOwnProperty:ib,hasOwnProp:ib,reduceDescriptors:sb,freezeMethods:M7,toObjectSet:A7,toCamelCase:T7,noop:z7,toFiniteNumber:I7,findKey:lb,global:nb,isContextDefined:ab,ALPHABET:ub,generateString:O7,isSpecCompliantForm:N7,toJSONObject:P7,isAsyncFn:R7,isThenable:e=>e&&(od(e)||Ur(e))&&Ur(e.then)&&Ur(e.catch)};var db={},ld={};ld.byteLength=V7,ld.toByteArray=H7,ld.fromByteArray=K7;for(var zl=[],Wr=[],L7=typeof Uint8Array<"u"?Uint8Array:Array,f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ei=0,B7=f0.length;Ei0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");o===-1&&(o=t);var r=o===t?0:4-o%4;return[o,r]}function V7(e){var t=pb(e),o=t[0],r=t[1];return(o+r)*3/4-r}function D7(e,t,o){return(t+o)*3/4-o}function H7(e){var t,o=pb(e),r=o[0],l=o[1],n=new L7(D7(e,r,l)),a=0,i=l>0?r-4:r,c;for(c=0;c>16&255,n[a++]=t>>8&255,n[a++]=t&255;return l===2&&(t=Wr[e.charCodeAt(c)]<<2|Wr[e.charCodeAt(c+1)]>>4,n[a++]=t&255),l===1&&(t=Wr[e.charCodeAt(c)]<<10|Wr[e.charCodeAt(c+1)]<<4|Wr[e.charCodeAt(c+2)]>>2,n[a++]=t>>8&255,n[a++]=t&255),n}function F7(e){return zl[e>>18&63]+zl[e>>12&63]+zl[e>>6&63]+zl[e&63]}function j7(e,t,o){for(var r,l=[],n=t;ni?i:a+n));return r===1?(t=e[o-1],l.push(zl[t>>2]+zl[t<<4&63]+"==")):r===2&&(t=(e[o-2]<<8)+e[o-1],l.push(zl[t>>10]+zl[t>>4&63]+zl[t<<2&63]+"=")),l.join("")}var h0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */h0.read=function(e,t,o,r,l){var n,a,i=l*8-r-1,c=(1<>1,u=-7,p=o?l-1:0,h=o?-1:1,v=e[t+p];for(p+=h,n=v&(1<<-u)-1,v>>=-u,u+=i;u>0;n=n*256+e[t+p],p+=h,u-=8);for(a=n&(1<<-u)-1,n>>=-u,u+=r;u>0;a=a*256+e[t+p],p+=h,u-=8);if(n===0)n=1-d;else{if(n===c)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,r),n=n-d}return(v?-1:1)*a*Math.pow(2,n-r)},h0.write=function(e,t,o,r,l,n){var a,i,c,d=n*8-l-1,u=(1<>1,h=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:n-1,m=r?1:-1,f=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+p>=1?t+=h/c:t+=h*Math.pow(2,1-p),t*c>=2&&(a++,c/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(t*c-1)*Math.pow(2,l),a=a+p):(i=t*Math.pow(2,p-1)*Math.pow(2,l),a=0));l>=8;e[o+v]=i&255,v+=m,i/=256,l-=8);for(a=a<0;e[o+v]=a&255,v+=m,a/=256,d-=8);e[o+v-m]|=f*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(e){const t=nd,o=v0,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=$,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l;const{Uint8Array:n,ArrayBuffer:a,SharedArrayBuffer:i}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const Y=new n(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,n.prototype),Object.setPrototypeOf(Y,S),Y.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(Y){if(Y>l)throw new RangeError('The value "'+Y+'" is invalid for option "size"');const S=new n(Y);return Object.setPrototypeOf(S,u.prototype),S}function u(Y,S,A){if(typeof Y=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(Y)}return p(Y,S,A)}u.poolSize=8192;function p(Y,S,A){if(typeof Y=="string")return f(Y,S);if(a.isView(Y))return g(Y);if(Y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y);if(ye(Y,a)||Y&&ye(Y.buffer,a)||typeof i<"u"&&(ye(Y,i)||Y&&ye(Y.buffer,i)))return y(Y,S,A);if(typeof Y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=Y.valueOf&&Y.valueOf();if(G!=null&&G!==Y)return u.from(G,S,A);const X=w(Y);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Y[Symbol.toPrimitive]=="function")return u.from(Y[Symbol.toPrimitive]("string"),S,A);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y)}u.from=function(Y,S,A){return p(Y,S,A)},Object.setPrototypeOf(u.prototype,n.prototype),Object.setPrototypeOf(u,n);function h(Y){if(typeof Y!="number")throw new TypeError('"size" argument must be of type number');if(Y<0)throw new RangeError('The value "'+Y+'" is invalid for option "size"')}function v(Y,S,A){return h(Y),Y<=0?d(Y):S!==void 0?typeof A=="string"?d(Y).fill(S,A):d(Y).fill(S):d(Y)}u.alloc=function(Y,S,A){return v(Y,S,A)};function m(Y){return h(Y),d(Y<0?0:x(Y)|0)}u.allocUnsafe=function(Y){return m(Y)},u.allocUnsafeSlow=function(Y){return m(Y)};function f(Y,S){if((typeof S!="string"||S==="")&&(S="utf8"),!u.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const A=T(Y,S)|0;let G=d(A);const X=G.write(Y,S);return X!==A&&(G=G.slice(0,X)),G}function _(Y){const S=Y.length<0?0:x(Y.length)|0,A=d(S);for(let G=0;G=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return Y|0}function $(Y){return+Y!=Y&&(Y=0),u.alloc(+Y)}u.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==u.prototype},u.compare=function(S,A){if(ye(S,n)&&(S=u.from(S,S.offset,S.byteLength)),ye(A,n)&&(A=u.from(A,A.offset,A.byteLength)),!u.isBuffer(S)||!u.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===A)return 0;let G=S.length,X=A.length;for(let re=0,ge=Math.min(G,X);reX.length?(u.isBuffer(ge)||(ge=u.from(ge)),ge.copy(X,re)):n.prototype.set.call(X,ge,re);else if(u.isBuffer(ge))ge.copy(X,re);else throw new TypeError('"list" argument must be an Array of Buffers');re+=ge.length}return X};function T(Y,S){if(u.isBuffer(Y))return Y.length;if(a.isView(Y)||ye(Y,a))return Y.byteLength;if(typeof Y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Y);const A=Y.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&A===0)return 0;let X=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":return Ie(Y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A*2;case"hex":return A>>>1;case"base64":return We(Y).length;default:if(X)return G?-1:Ie(Y).length;S=(""+S).toLowerCase(),X=!0}}u.byteLength=T;function R(Y,S,A){let G=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((A===void 0||A>this.length)&&(A=this.length),A<=0)||(A>>>=0,S>>>=0,A<=S))return"";for(Y||(Y="utf8");;)switch(Y){case"hex":return ne(this,S,A);case"utf8":case"utf-8":return F(this,S,A);case"ascii":return U(this,S,A);case"latin1":case"binary":return oe(this,S,A);case"base64":return H(this,S,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,S,A);default:if(G)throw new TypeError("Unknown encoding: "+Y);Y=(Y+"").toLowerCase(),G=!0}}u.prototype._isBuffer=!0;function P(Y,S,A){const G=Y[S];Y[S]=Y[A],Y[A]=G}u.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let A=0;AA&&(S+=" ... "),""},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(S,A,G,X,re){if(ye(S,n)&&(S=u.from(S,S.offset,S.byteLength)),!u.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(A===void 0&&(A=0),G===void 0&&(G=S?S.length:0),X===void 0&&(X=0),re===void 0&&(re=this.length),A<0||G>S.length||X<0||re>this.length)throw new RangeError("out of range index");if(X>=re&&A>=G)return 0;if(X>=re)return-1;if(A>=G)return 1;if(A>>>=0,G>>>=0,X>>>=0,re>>>=0,this===S)return 0;let ge=re-X,fe=G-A;const Fe=Math.min(ge,fe),at=this.slice(X,re),_t=S.slice(A,G);for(let At=0;At2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,Ye(A)&&(A=X?0:Y.length-1),A<0&&(A=Y.length+A),A>=Y.length){if(X)return-1;A=Y.length-1}else if(A<0)if(X)A=0;else return-1;if(typeof S=="string"&&(S=u.from(S,G)),u.isBuffer(S))return S.length===0?-1:V(Y,S,A,G,X);if(typeof S=="number")return S=S&255,typeof n.prototype.indexOf=="function"?X?n.prototype.indexOf.call(Y,S,A):n.prototype.lastIndexOf.call(Y,S,A):V(Y,[S],A,G,X);throw new TypeError("val must be string, number or Buffer")}function V(Y,S,A,G,X){let re=1,ge=Y.length,fe=S.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(Y.length<2||S.length<2)return-1;re=2,ge/=2,fe/=2,A/=2}function Fe(_t,At){return re===1?_t[At]:_t.readUInt16BE(At*re)}let at;if(X){let _t=-1;for(at=A;atge&&(A=ge-fe),at=A;at>=0;at--){let _t=!0;for(let At=0;AtX&&(G=X)):G=X;const re=S.length;G>re/2&&(G=re/2);let ge;for(ge=0;ge>>0,isFinite(G)?(G=G>>>0,X===void 0&&(X="utf8")):(X=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const re=this.length-A;if((G===void 0||G>re)&&(G=re),S.length>0&&(G<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");let ge=!1;for(;;)switch(X){case"hex":return B(this,S,A,G);case"utf8":case"utf-8":return j(this,S,A,G);case"ascii":case"latin1":case"binary":return te(this,S,A,G);case"base64":return J(this,S,A,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,S,A,G);default:if(ge)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),ge=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(Y,S,A){return S===0&&A===Y.length?t.fromByteArray(Y):t.fromByteArray(Y.slice(S,A))}function F(Y,S,A){A=Math.min(Y.length,A);const G=[];let X=S;for(;X239?4:re>223?3:re>191?2:1;if(X+fe<=A){let Fe,at,_t,At;switch(fe){case 1:re<128&&(ge=re);break;case 2:Fe=Y[X+1],(Fe&192)===128&&(At=(re&31)<<6|Fe&63,At>127&&(ge=At));break;case 3:Fe=Y[X+1],at=Y[X+2],(Fe&192)===128&&(at&192)===128&&(At=(re&15)<<12|(Fe&63)<<6|at&63,At>2047&&(At<55296||At>57343)&&(ge=At));break;case 4:Fe=Y[X+1],at=Y[X+2],_t=Y[X+3],(Fe&192)===128&&(at&192)===128&&(_t&192)===128&&(At=(re&15)<<18|(Fe&63)<<12|(at&63)<<6|_t&63,At>65535&&At<1114112&&(ge=At))}}ge===null?(ge=65533,fe=1):ge>65535&&(ge-=65536,G.push(ge>>>10&1023|55296),ge=56320|ge&1023),G.push(ge),X+=fe}return I(G)}const K=4096;function I(Y){const S=Y.length;if(S<=K)return String.fromCharCode.apply(String,Y);let A="",G=0;for(;GG)&&(A=G);let X="";for(let re=S;reG&&(S=G),A<0?(A+=G,A<0&&(A=0)):A>G&&(A=G),AA)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(S,A,G){S=S>>>0,A=A>>>0,G||Q(S,A,this.length);let X=this[S],re=1,ge=0;for(;++ge>>0,A=A>>>0,G||Q(S,A,this.length);let X=this[S+--A],re=1;for(;A>0&&(re*=256);)X+=this[S+--A]*re;return X},u.prototype.readUint8=u.prototype.readUInt8=function(S,A){return S=S>>>0,A||Q(S,1,this.length),this[S]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(S,A){return S=S>>>0,A||Q(S,2,this.length),this[S]|this[S+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(S,A){return S=S>>>0,A||Q(S,2,this.length),this[S]<<8|this[S+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(S,A){return S=S>>>0,A||Q(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(S,A){return S=S>>>0,A||Q(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},u.prototype.readBigUInt64LE=pt(function(S){S=S>>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=A+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,re=this[++S]+this[++S]*2**8+this[++S]*2**16+G*2**24;return BigInt(X)+(BigInt(re)<>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=A*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],re=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+G;return(BigInt(X)<>>0,A=A>>>0,G||Q(S,A,this.length);let X=this[S],re=1,ge=0;for(;++ge=re&&(X-=Math.pow(2,8*A)),X},u.prototype.readIntBE=function(S,A,G){S=S>>>0,A=A>>>0,G||Q(S,A,this.length);let X=A,re=1,ge=this[S+--X];for(;X>0&&(re*=256);)ge+=this[S+--X]*re;return re*=128,ge>=re&&(ge-=Math.pow(2,8*A)),ge},u.prototype.readInt8=function(S,A){return S=S>>>0,A||Q(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},u.prototype.readInt16LE=function(S,A){S=S>>>0,A||Q(S,2,this.length);const G=this[S]|this[S+1]<<8;return G&32768?G|4294901760:G},u.prototype.readInt16BE=function(S,A){S=S>>>0,A||Q(S,2,this.length);const G=this[S+1]|this[S]<<8;return G&32768?G|4294901760:G},u.prototype.readInt32LE=function(S,A){return S=S>>>0,A||Q(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},u.prototype.readInt32BE=function(S,A){return S=S>>>0,A||Q(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},u.prototype.readBigInt64LE=pt(function(S){S=S>>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(G<<24);return(BigInt(X)<>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=(A<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(X)<>>0,A||Q(S,4,this.length),o.read(this,S,!0,23,4)},u.prototype.readFloatBE=function(S,A){return S=S>>>0,A||Q(S,4,this.length),o.read(this,S,!1,23,4)},u.prototype.readDoubleLE=function(S,A){return S=S>>>0,A||Q(S,8,this.length),o.read(this,S,!0,52,8)},u.prototype.readDoubleBE=function(S,A){return S=S>>>0,A||Q(S,8,this.length),o.read(this,S,!1,52,8)};function Me(Y,S,A,G,X,re){if(!u.isBuffer(Y))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>X||SY.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(S,A,G,X){if(S=+S,A=A>>>0,G=G>>>0,!X){const fe=Math.pow(2,8*G)-1;Me(this,S,A,G,fe,0)}let re=1,ge=0;for(this[A]=S&255;++ge>>0,G=G>>>0,!X){const fe=Math.pow(2,8*G)-1;Me(this,S,A,G,fe,0)}let re=G-1,ge=1;for(this[A+re]=S&255;--re>=0&&(ge*=256);)this[A+re]=S/ge&255;return A+G},u.prototype.writeUint8=u.prototype.writeUInt8=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,1,255,0),this[A]=S&255,A+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,65535,0),this[A]=S&255,this[A+1]=S>>>8,A+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,65535,0),this[A]=S>>>8,this[A+1]=S&255,A+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,4294967295,0),this[A+3]=S>>>24,this[A+2]=S>>>16,this[A+1]=S>>>8,this[A]=S&255,A+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,4294967295,0),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4};function de(Y,S,A,G,X){ke(S,G,X,Y,A,7);let re=Number(S&BigInt(4294967295));Y[A++]=re,re=re>>8,Y[A++]=re,re=re>>8,Y[A++]=re,re=re>>8,Y[A++]=re;let ge=Number(S>>BigInt(32)&BigInt(4294967295));return Y[A++]=ge,ge=ge>>8,Y[A++]=ge,ge=ge>>8,Y[A++]=ge,ge=ge>>8,Y[A++]=ge,A}function _e(Y,S,A,G,X){ke(S,G,X,Y,A,7);let re=Number(S&BigInt(4294967295));Y[A+7]=re,re=re>>8,Y[A+6]=re,re=re>>8,Y[A+5]=re,re=re>>8,Y[A+4]=re;let ge=Number(S>>BigInt(32)&BigInt(4294967295));return Y[A+3]=ge,ge=ge>>8,Y[A+2]=ge,ge=ge>>8,Y[A+1]=ge,ge=ge>>8,Y[A]=ge,A+8}u.prototype.writeBigUInt64LE=pt(function(S,A=0){return de(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=pt(function(S,A=0){return _e(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(S,A,G,X){if(S=+S,A=A>>>0,!X){const Fe=Math.pow(2,8*G-1);Me(this,S,A,G,Fe-1,-Fe)}let re=0,ge=1,fe=0;for(this[A]=S&255;++re>0)-fe&255;return A+G},u.prototype.writeIntBE=function(S,A,G,X){if(S=+S,A=A>>>0,!X){const Fe=Math.pow(2,8*G-1);Me(this,S,A,G,Fe-1,-Fe)}let re=G-1,ge=1,fe=0;for(this[A+re]=S&255;--re>=0&&(ge*=256);)S<0&&fe===0&&this[A+re+1]!==0&&(fe=1),this[A+re]=(S/ge>>0)-fe&255;return A+G},u.prototype.writeInt8=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,1,127,-128),S<0&&(S=255+S+1),this[A]=S&255,A+1},u.prototype.writeInt16LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,32767,-32768),this[A]=S&255,this[A+1]=S>>>8,A+2},u.prototype.writeInt16BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,32767,-32768),this[A]=S>>>8,this[A+1]=S&255,A+2},u.prototype.writeInt32LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,2147483647,-2147483648),this[A]=S&255,this[A+1]=S>>>8,this[A+2]=S>>>16,this[A+3]=S>>>24,A+4},u.prototype.writeInt32BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4},u.prototype.writeBigInt64LE=pt(function(S,A=0){return de(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=pt(function(S,A=0){return _e(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function me(Y,S,A,G,X,re){if(A+G>Y.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function Re(Y,S,A,G,X){return S=+S,A=A>>>0,X||me(Y,S,A,4),o.write(Y,S,A,G,23,4),A+4}u.prototype.writeFloatLE=function(S,A,G){return Re(this,S,A,!0,G)},u.prototype.writeFloatBE=function(S,A,G){return Re(this,S,A,!1,G)};function Ce(Y,S,A,G,X){return S=+S,A=A>>>0,X||me(Y,S,A,8),o.write(Y,S,A,G,52,8),A+8}u.prototype.writeDoubleLE=function(S,A,G){return Ce(this,S,A,!0,G)},u.prototype.writeDoubleBE=function(S,A,G){return Ce(this,S,A,!1,G)},u.prototype.copy=function(S,A,G,X){if(!u.isBuffer(S))throw new TypeError("argument should be a Buffer");if(G||(G=0),!X&&X!==0&&(X=this.length),A>=S.length&&(A=S.length),A||(A=0),X>0&&X=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),S.length-A>>0,G=G===void 0?this.length:G>>>0,S||(S=0);let re;if(typeof S=="number")for(re=A;re2**32?X=ae(String(A)):typeof A=="bigint"&&(X=String(A),(A>BigInt(2)**BigInt(32)||A<-(BigInt(2)**BigInt(32)))&&(X=ae(X)),X+="n"),G+=` It must be ${S}. Received ${X}`,G},RangeError);function ae(Y){let S="",A=Y.length;const G=Y[0]==="-"?1:0;for(;A>=G+4;A-=3)S=`_${Y.slice(A-3,A)}${S}`;return`${Y.slice(0,A)}${S}`}function pe(Y,S,A){Oe(S,"offset"),(Y[S]===void 0||Y[S+A]===void 0)&&we(S,Y.length-(A+1))}function ke(Y,S,A,G,X,re){if(Y>A||Y= 0${ge} and < 2${ge} ** ${(re+1)*8}${ge}`:fe=`>= -(2${ge} ** ${(re+1)*8-1}${ge}) and < 2 ** ${(re+1)*8-1}${ge}`,new Ee.ERR_OUT_OF_RANGE("value",fe,Y)}pe(G,X,re)}function Oe(Y,S){if(typeof Y!="number")throw new Ee.ERR_INVALID_ARG_TYPE(S,"number",Y)}function we(Y,S,A){throw Math.floor(Y)!==Y?(Oe(Y,A),new Ee.ERR_OUT_OF_RANGE("offset","an integer",Y)):S<0?new Ee.ERR_BUFFER_OUT_OF_BOUNDS:new Ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,Y)}const Te=/[^+/0-9A-Za-z-_]/g;function Ne(Y){if(Y=Y.split("=")[0],Y=Y.trim().replace(Te,""),Y.length<2)return"";for(;Y.length%4!==0;)Y=Y+"=";return Y}function Ie(Y,S){S=S||1/0;let A;const G=Y.length;let X=null;const re=[];for(let ge=0;ge55295&&A<57344){if(!X){if(A>56319){(S-=3)>-1&&re.push(239,191,189);continue}else if(ge+1===G){(S-=3)>-1&&re.push(239,191,189);continue}X=A;continue}if(A<56320){(S-=3)>-1&&re.push(239,191,189),X=A;continue}A=(X-55296<<10|A-56320)+65536}else X&&(S-=3)>-1&&re.push(239,191,189);if(X=null,A<128){if((S-=1)<0)break;re.push(A)}else if(A<2048){if((S-=2)<0)break;re.push(A>>6|192,A&63|128)}else if(A<65536){if((S-=3)<0)break;re.push(A>>12|224,A>>6&63|128,A&63|128)}else if(A<1114112){if((S-=4)<0)break;re.push(A>>18|240,A>>12&63|128,A>>6&63|128,A&63|128)}else throw new Error("Invalid code point")}return re}function Ae(Y){const S=[];for(let A=0;A>8,X=A%256,re.push(X),re.push(G);return re}function We(Y){return t.toByteArray(Ne(Y))}function qe(Y,S,A,G){let X;for(X=0;X=S.length||X>=Y.length);++X)S[X+A]=Y[X];return X}function ye(Y,S){return Y instanceof S||Y!=null&&Y.constructor!=null&&Y.constructor.name!=null&&Y.constructor.name===S.name}function Ye(Y){return Y!==Y}const tt=function(){const Y="0123456789abcdef",S=new Array(256);for(let A=0;A<16;++A){const G=A*16;for(let X=0;X<16;++X)S[G+X]=Y[A]+Y[X]}return S}();function pt(Y){return typeof BigInt>"u"?dt:Y}function dt(){throw new Error("BigInt not supported")}})(pb);const W7=pb.Buffer;function Ft(e,t,o,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),r&&(this.request=r),l&&(this.response=l)}Ue.inherits(Ft,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hb=Ft.prototype,vb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vb[e]={value:e}}),Object.defineProperties(Ft,vb),Object.defineProperty(hb,"isAxiosError",{value:!0}),Ft.from=(e,t,o,r,l,n)=>{const a=Object.create(hb);return Ue.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),Ft.call(a,e.message,t,o,r,l),a.cause=e,a.name=e.name,n&&Object.assign(a,n),a};const q7=null;function m0(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function mb(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function gb(e,t,o){return e?e.concat(t).map(function(l,n){return l=mb(l),!o&&n?"["+l+"]":l}).join(o?".":""):t}function Y7(e){return Ue.isArray(e)&&!e.some(m0)}const G7=Ue.toFlatObject(Ue,{},null,function(t){return/^is[A-Z]/.test(t)});function ad(e,t,o){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=Ue.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,_){return!Ue.isUndefined(_[f])});const r=o.metaTokens,l=o.visitor||u,n=o.dots,a=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(l))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(Ue.isDate(m))return m.toISOString();if(!c&&Ue.isBlob(m))throw new Ft("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(m)||Ue.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):W7.from(m):m}function u(m,f,_){let g=m;if(m&&!_&&typeof m=="object"){if(Ue.endsWith(f,"{}"))f=r?f:f.slice(0,-2),m=JSON.stringify(m);else if(Ue.isArray(m)&&Y7(m)||(Ue.isFileList(m)||Ue.endsWith(f,"[]"))&&(g=Ue.toArray(m)))return f=mb(f),g.forEach(function(w,x){!(Ue.isUndefined(w)||w===null)&&t.append(a===!0?gb([f],x,n):a===null?f:f+"[]",d(w))}),!1}return m0(m)?!0:(t.append(gb(_,f,n),d(m)),!1)}const p=[],h=Object.assign(G7,{defaultVisitor:u,convertValue:d,isVisitable:m0});function v(m,f){if(!Ue.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),Ue.forEach(m,function(g,y){(!(Ue.isUndefined(g)||g===null)&&l.call(t,g,Ue.isString(y)?y.trim():y,f,h))===!0&&v(g,f?f.concat(y):[y])}),p.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return v(e),t}function bb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function g0(e,t){this._pairs=[],e&&ad(e,this,t)}const _b=g0.prototype;_b.append=function(t,o){this._pairs.push([t,o])},_b.toString=function(t){const o=t?function(r){return t.call(this,r,bb)}:bb;return this._pairs.map(function(l){return o(l[0])+"="+o(l[1])},"").join("&")};function X7(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wb(e,t,o){if(!t)return e;const r=o&&o.encode||X7,l=o&&o.serialize;let n;if(l?n=l(t,o):n=Ue.isURLSearchParams(t)?t.toString():new g0(t,o).toString(r),n){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}class yb{constructor(){this.handlers=[]}use(t,o,r){return this.handlers.push({fulfilled:t,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const xb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z7={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:g0,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},b0=typeof window<"u"&&typeof document<"u",J7=(e=>b0&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Q7=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eS=b0&&window.location.href||"http://localhost",dl={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:b0,hasStandardBrowserEnv:J7,hasStandardBrowserWebWorkerEnv:Q7,origin:eS},Symbol.toStringTag,{value:"Module"})),...Z7};function tS(e,t){return ad(e,new dl.classes.URLSearchParams,Object.assign({visitor:function(o,r,l,n){return dl.isNode&&Ue.isBuffer(o)?(this.append(r,o.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function oS(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rS(e){const t={},o=Object.keys(e);let r;const l=o.length;let n;for(r=0;r=o.length;return a=!a&&Ue.isArray(l)?l.length:a,c?(Ue.hasOwnProp(l,a)?l[a]=[l[a],r]:l[a]=r,!i):((!l[a]||!Ue.isObject(l[a]))&&(l[a]=[]),t(o,r,l[a],n)&&Ue.isArray(l[a])&&(l[a]=rS(l[a])),!i)}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const o={};return Ue.forEachEntry(e,(r,l)=>{t(oS(r),l,o,0)}),o}return null}function lS(e,t,o){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(e)}const tc={transitional:xb,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const r=o.getContentType()||"",l=r.indexOf("application/json")>-1,n=Ue.isObject(t);if(n&&Ue.isHTMLForm(t)&&(t=new FormData(t)),Ue.isFormData(t))return l?JSON.stringify(kb(t)):t;if(Ue.isArrayBuffer(t)||Ue.isBuffer(t)||Ue.isStream(t)||Ue.isFile(t)||Ue.isBlob(t)||Ue.isReadableStream(t))return t;if(Ue.isArrayBufferView(t))return t.buffer;if(Ue.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tS(t,this.formSerializer).toString();if((i=Ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ad(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return n||l?(o.setContentType("application/json",!1),lS(t)):t}],transformResponse:[function(t){const o=this.transitional||tc.transitional,r=o&&o.forcedJSONParsing,l=this.responseType==="json";if(Ue.isResponse(t)||Ue.isReadableStream(t))return t;if(t&&Ue.isString(t)&&(r&&!this.responseType||l)){const a=!(o&&o.silentJSONParsing)&&l;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?Ft.from(i,Ft.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dl.classes.FormData,Blob:dl.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{tc.headers[e]={}});const nS=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aS=e=>{const t={};let o,r,l;return e&&e.split(` -`).forEach(function(a){l=a.indexOf(":"),o=a.substring(0,l).trim().toLowerCase(),r=a.substring(l+1).trim(),!(!o||t[o]&&nS[o])&&(o==="set-cookie"?t[o]?t[o].push(r):t[o]=[r]:t[o]=t[o]?t[o]+", "+r:r)}),t},Cb=Symbol("internals");function oc(e){return e&&String(e).trim().toLowerCase()}function id(e){return e===!1||e==null?e:Ue.isArray(e)?e.map(id):String(e)}function iS(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(e);)t[r[1]]=r[2];return t}const sS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _0(e,t,o,r,l){if(Ue.isFunction(r))return r.call(this,t,o);if(l&&(t=o),!!Ue.isString(t)){if(Ue.isString(r))return t.indexOf(r)!==-1;if(Ue.isRegExp(r))return r.test(t)}}function cS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,r)=>o.toUpperCase()+r)}function uS(e,t){const o=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+o,{value:function(l,n,a){return this[r].call(this,t,l,n,a)},configurable:!0})})}class Tr{constructor(t){t&&this.set(t)}set(t,o,r){const l=this;function n(i,c,d){const u=oc(c);if(!u)throw new Error("header name must be a non-empty string");const p=Ue.findKey(l,u);(!p||l[p]===void 0||d===!0||d===void 0&&l[p]!==!1)&&(l[p||c]=id(i))}const a=(i,c)=>Ue.forEach(i,(d,u)=>n(d,u,c));if(Ue.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(Ue.isString(t)&&(t=t.trim())&&!sS(t))a(aS(t),o);else if(Ue.isHeaders(t))for(const[i,c]of t.entries())n(c,i,r);else t!=null&&n(o,t,r);return this}get(t,o){if(t=oc(t),t){const r=Ue.findKey(this,t);if(r){const l=this[r];if(!o)return l;if(o===!0)return iS(l);if(Ue.isFunction(o))return o.call(this,l,r);if(Ue.isRegExp(o))return o.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=oc(t),t){const r=Ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!o||_0(this,this[r],r,o)))}return!1}delete(t,o){const r=this;let l=!1;function n(a){if(a=oc(a),a){const i=Ue.findKey(r,a);i&&(!o||_0(r,r[i],i,o))&&(delete r[i],l=!0)}}return Ue.isArray(t)?t.forEach(n):n(t),l}clear(t){const o=Object.keys(this);let r=o.length,l=!1;for(;r--;){const n=o[r];(!t||_0(this,this[n],n,t,!0))&&(delete this[n],l=!0)}return l}normalize(t){const o=this,r={};return Ue.forEach(this,(l,n)=>{const a=Ue.findKey(r,n);if(a){o[a]=id(l),delete o[n];return}const i=t?cS(n):String(n).trim();i!==n&&delete o[n],o[i]=id(l),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return Ue.forEach(this,(r,l)=>{r!=null&&r!==!1&&(o[l]=t&&Ue.isArray(r)?r.join(", "):r)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const r=new this(t);return o.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[Cb]=this[Cb]={accessors:{}}).accessors,l=this.prototype;function n(a){const i=oc(a);r[i]||(uS(l,a),r[i]=!0)}return Ue.isArray(t)?t.forEach(n):n(t),this}}Tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ue.reduceDescriptors(Tr.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[o]=r}}}),Ue.freezeMethods(Tr);function w0(e,t){const o=this||tc,r=t||o,l=Tr.from(r.headers);let n=r.data;return Ue.forEach(e,function(i){n=i.call(o,n,l.normalize(),t?t.status:void 0)}),l.normalize(),n}function Sb(e){return!!(e&&e.__CANCEL__)}function Ti(e,t,o){Ft.call(this,e??"canceled",Ft.ERR_CANCELED,t,o),this.name="CanceledError"}Ue.inherits(Ti,Ft,{__CANCEL__:!0});function Eb(e,t,o){const r=o.config.validateStatus;!o.status||!r||r(o.status)?e(o):t(new Ft("Request failed with status code "+o.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function dS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pS(e,t){e=e||10;const o=new Array(e),r=new Array(e);let l=0,n=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[n];a||(a=d),o[l]=c,r[l]=d;let p=n,h=0;for(;p!==l;)h+=o[p++],p=p%e;if(l=(l+1)%e,l===n&&(n=(n+1)%e),d-ar)return l&&(clearTimeout(l),l=null),o=i,e.apply(null,arguments);l||(l=setTimeout(()=>(l=null,o=Date.now(),e.apply(null,arguments)),r-(i-o)))}}const sd=(e,t,o=3)=>{let r=0;const l=pS(50,250);return fS(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,c=a-r,d=l(c),u=a<=i;r=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&u?(i-a)/d:void 0,event:n,lengthComputable:i!=null};p[t?"download":"upload"]=!0,e(p)},o)},hS=dl.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let r;function l(n){let a=n;return t&&(o.setAttribute("href",a),a=o.href),o.setAttribute("href",a),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return r=l(window.location.href),function(a){const i=Ue.isString(a)?l(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),vS=dl.hasStandardBrowserEnv?{write(e,t,o,r,l,n){const a=[e+"="+encodeURIComponent(t)];Ue.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),Ue.isString(r)&&a.push("path="+r),Ue.isString(l)&&a.push("domain="+l),n===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tb(e,t){return e&&!mS(t)?gS(e,t):t}const $b=e=>e instanceof Tr?{...e}:e;function Ea(e,t){t=t||{};const o={};function r(d,u,p){return Ue.isPlainObject(d)&&Ue.isPlainObject(u)?Ue.merge.call({caseless:p},d,u):Ue.isPlainObject(u)?Ue.merge({},u):Ue.isArray(u)?u.slice():u}function l(d,u,p){if(Ue.isUndefined(u)){if(!Ue.isUndefined(d))return r(void 0,d,p)}else return r(d,u,p)}function n(d,u){if(!Ue.isUndefined(u))return r(void 0,u)}function a(d,u){if(Ue.isUndefined(u)){if(!Ue.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function i(d,u,p){if(p in t)return r(d,u);if(p in e)return r(void 0,d)}const c={url:n,method:n,data:n,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(d,u)=>l($b(d),$b(u),!0)};return Ue.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=c[u]||l,h=p(e[u],t[u],u);Ue.isUndefined(h)&&p!==i||(o[u]=h)}),o}const Mb=e=>{const t=Ea({},e);let{data:o,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:n,headers:a,auth:i}=t;t.headers=a=Tr.from(a),t.url=wb(Tb(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(Ue.isFormData(o)){if(dl.hasStandardBrowserEnv||dl.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[d,...u]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...u].join("; "))}}if(dl.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||r!==!1&&hS(t.url))){const d=l&&n&&vS.read(n);d&&a.set(l,d)}return t},bS=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,r){const l=Mb(e);let n=l.data;const a=Tr.from(l.headers).normalize();let{responseType:i}=l,c;function d(){l.cancelToken&&l.cancelToken.unsubscribe(c),l.signal&&l.signal.removeEventListener("abort",c)}let u=new XMLHttpRequest;u.open(l.method.toUpperCase(),l.url,!0),u.timeout=l.timeout;function p(){if(!u)return;const v=Tr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),f={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:v,config:e,request:u};Eb(function(g){o(g),d()},function(g){r(g),d()},f),u=null}"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(r(new Ft("Request aborted",Ft.ECONNABORTED,l,u)),u=null)},u.onerror=function(){r(new Ft("Network Error",Ft.ERR_NETWORK,l,u)),u=null},u.ontimeout=function(){let m=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const f=l.transitional||xb;l.timeoutErrorMessage&&(m=l.timeoutErrorMessage),r(new Ft(m,f.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,l,u)),u=null},n===void 0&&a.setContentType(null),"setRequestHeader"in u&&Ue.forEach(a.toJSON(),function(m,f){u.setRequestHeader(f,m)}),Ue.isUndefined(l.withCredentials)||(u.withCredentials=!!l.withCredentials),i&&i!=="json"&&(u.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&u.addEventListener("progress",sd(l.onDownloadProgress,!0)),typeof l.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",sd(l.onUploadProgress)),(l.cancelToken||l.signal)&&(c=v=>{u&&(r(!v||v.type?new Ti(null,e,u):v),u.abort(),u=null)},l.cancelToken&&l.cancelToken.subscribe(c),l.signal&&(l.signal.aborted?c():l.signal.addEventListener("abort",c)));const h=dS(l.url);if(h&&dl.protocols.indexOf(h)===-1){r(new Ft("Unsupported protocol "+h+":",Ft.ERR_BAD_REQUEST,e));return}u.send(n||null)})},_S=(e,t)=>{let o=new AbortController,r;const l=function(c){if(!r){r=!0,a();const d=c instanceof Error?c:this.reason;o.abort(d instanceof Ft?d:new Ti(d instanceof Error?d.message:d))}};let n=t&&setTimeout(()=>{l(new Ft(`timeout ${t} of ms exceeded`,Ft.ETIMEDOUT))},t);const a=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",l):c.unsubscribe(l))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",l));const{signal:i}=o;return i.unsubscribe=a,[i,()=>{n&&clearTimeout(n),n=null}]},wS=function*(e,t){let o=e.byteLength;if(!t||o{const n=yS(e,t,l);let a=0;return new ReadableStream({type:"bytes",async pull(i){const{done:c,value:d}=await n.next();if(c){i.close(),r();return}let u=d.byteLength;o&&o(a+=u),i.enqueue(new Uint8Array(d))},cancel(i){return r(i),n.return()}},{highWaterMark:2})},zb=(e,t)=>{const o=e!=null;return r=>setTimeout(()=>t({lengthComputable:o,total:e,loaded:r}))},cd=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ib=cd&&typeof ReadableStream=="function",y0=cd&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),xS=Ib&&(()=>{let e=!1;const t=new Request(dl.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Ob=64*1024,x0=Ib&&!!(()=>{try{return Ue.isReadableStream(new Response("").body)}catch{}})(),ud={stream:x0&&(e=>e.body)};cd&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ud[t]&&(ud[t]=Ue.isFunction(e[t])?o=>o[t]():(o,r)=>{throw new Ft(`Response type '${t}' is not supported`,Ft.ERR_NOT_SUPPORT,r)})})})(new Response);const kS=async e=>{if(e==null)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Ue.isArrayBufferView(e))return e.byteLength;if(Ue.isURLSearchParams(e)&&(e=e+""),Ue.isString(e))return(await y0(e)).byteLength},CS=async(e,t)=>{const o=Ue.toFiniteNumber(e.getContentLength());return o??kS(t)},k0={http:q7,xhr:bS,fetch:cd&&(async e=>{let{url:t,method:o,data:r,signal:l,cancelToken:n,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:u,withCredentials:p="same-origin",fetchOptions:h}=Mb(e);d=d?(d+"").toLowerCase():"text";let[v,m]=l||n||a?_S([l,n],a):[],f,_;const g=()=>{!f&&setTimeout(()=>{v&&v.unsubscribe()}),f=!0};let y;try{if(c&&xS&&o!=="get"&&o!=="head"&&(y=await CS(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),R;Ue.isFormData(r)&&(R=T.headers.get("content-type"))&&u.setContentType(R),T.body&&(r=Ab(T.body,Ob,zb(y,sd(c)),null,y0))}Ue.isString(p)||(p=p?"cors":"omit"),_=new Request(t,{...h,signal:v,method:o.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let w=await fetch(_);const x=x0&&(d==="stream"||d==="response");if(x0&&(i||x)){const T={};["status","statusText","headers"].forEach(P=>{T[P]=w[P]});const R=Ue.toFiniteNumber(w.headers.get("content-length"));w=new Response(Ab(w.body,Ob,i&&zb(R,sd(i,!0)),x&&g,y0),T)}d=d||"text";let $=await ud[Ue.findKey(ud,d)||"text"](w,e);return!x&&g(),m&&m(),await new Promise((T,R)=>{Eb(T,R,{data:$,headers:Tr.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:_})})}catch(w){throw g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ft("Network Error",Ft.ERR_NETWORK,e,_),{cause:w.cause||w}):Ft.from(w,w&&w.code,e,_)}})};Ue.forEach(k0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Nb=e=>`- ${e}`,SS=e=>Ue.isFunction(e)||e===null||e===!1,Pb={getAdapter:e=>{e=Ue.isArray(e)?e:[e];const{length:t}=e;let o,r;const l={};for(let n=0;n`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?n.length>1?`since : -`+n.map(Nb).join(` -`):" "+Nb(n[0]):"as no adapter specified";throw new Ft("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:k0};function C0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ti(null,e)}function Rb(e){return C0(e),e.headers=Tr.from(e.headers),e.data=w0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pb.getAdapter(e.adapter||tc.adapter)(e).then(function(r){return C0(e),r.data=w0.call(e,e.transformResponse,r),r.headers=Tr.from(r.headers),r},function(r){return Sb(r)||(C0(e),r&&r.response&&(r.response.data=w0.call(e,e.transformResponse,r.response),r.response.headers=Tr.from(r.response.headers))),Promise.reject(r)})}const Lb="1.7.2",S0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{S0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Bb={};S0.transitional=function(t,o,r){function l(n,a){return"[Axios v"+Lb+"] Transitional option '"+n+"'"+a+(r?". "+r:"")}return(n,a,i)=>{if(t===!1)throw new Ft(l(a," has been removed"+(o?" in "+o:"")),Ft.ERR_DEPRECATED);return o&&!Bb[a]&&(Bb[a]=!0,console.warn(l(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(n,a,i):!0}};function ES(e,t,o){if(typeof e!="object")throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const n=r[l],a=t[n];if(a){const i=e[n],c=i===void 0||a(i,n,e);if(c!==!0)throw new Ft("option "+n+" must be "+c,Ft.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Ft("Unknown option "+n,Ft.ERR_BAD_OPTION)}}const E0={assertOptions:ES,validators:S0},Wn=E0.validators;class Ta{constructor(t){this.defaults=t,this.interceptors={request:new yb,response:new yb}}async request(t,o){try{return await this._request(t,o)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;const n=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+n):r.stack=n}catch{}}throw r}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Ea(this.defaults,o);const{transitional:r,paramsSerializer:l,headers:n}=o;r!==void 0&&E0.assertOptions(r,{silentJSONParsing:Wn.transitional(Wn.boolean),forcedJSONParsing:Wn.transitional(Wn.boolean),clarifyTimeoutError:Wn.transitional(Wn.boolean)},!1),l!=null&&(Ue.isFunction(l)?o.paramsSerializer={serialize:l}:E0.assertOptions(l,{encode:Wn.function,serialize:Wn.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=n&&Ue.merge(n.common,n[o.method]);n&&Ue.forEach(["delete","get","head","post","put","patch","common"],m=>{delete n[m]}),o.headers=Tr.concat(a,n);const i=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(o)===!1||(c=c&&f.synchronous,i.unshift(f.fulfilled,f.rejected))});const d=[];this.interceptors.response.forEach(function(f){d.push(f.fulfilled,f.rejected)});let u,p=0,h;if(!c){const m=[Rb.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,d),h=m.length,u=Promise.resolve(o);p{if(!r._listeners)return;let n=r._listeners.length;for(;n-- >0;)r._listeners[n](l);r._listeners=null}),this.promise.then=l=>{let n;const a=new Promise(i=>{r.subscribe(i),n=i}).then(l);return a.cancel=function(){r.unsubscribe(n)},a},t(function(n,a,i){r.reason||(r.reason=new Ti(n,a,i),o(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new T0(function(l){t=l}),cancel:t}}}function TS(e){return function(o){return e.apply(null,o)}}function $S(e){return Ue.isObject(e)&&e.isAxiosError===!0}const $0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($0).forEach(([e,t])=>{$0[t]=e});function Vb(e){const t=new Ta(e),o=ob(Ta.prototype.request,t);return Ue.extend(o,Ta.prototype,t,{allOwnKeys:!0}),Ue.extend(o,t,null,{allOwnKeys:!0}),o.create=function(l){return Vb(Ea(e,l))},o}const fo=Vb(tc);fo.Axios=Ta,fo.CanceledError=Ti,fo.CancelToken=T0,fo.isCancel=Sb,fo.VERSION=Lb,fo.toFormData=ad,fo.AxiosError=Ft,fo.Cancel=fo.CanceledError,fo.all=function(t){return Promise.all(t)},fo.spread=TS,fo.isAxiosError=$S,fo.mergeConfig=Ea,fo.AxiosHeaders=Tr,fo.formToJSON=e=>kb(Ue.isHTMLForm(e)?new FormData(e):e),fo.getAdapter=Pb.getAdapter,fo.HttpStatusCode=$0,fo.default=fo;const MS={key:0},AS={key:0},zS={key:1},IS=N({__name:"ConfirmationProcess",props:{transactionHash:{type:String,required:!0}},setup(e){const t=e,o=Tt.get.order,r=Tt.get.network,l=Tt.get.receiver,n=D(1),a=D(!0),i=D(0),c=D(null),d=D(null),u=C(()=>qt.apiUrl&&qt.reminderEmail&&!c.value),p=async f=>{a.value=!1,c.value=f,s0(ht.pleaseWait),clearInterval(i.value),await fo.post("set-reminder-email",{email:f,hash:t.transactionHash}),Gs();const _=Js.get("redirectUrls");_?window.location.href=_.reminderEmail||_.success:window.location.reload()},h=()=>{Er.fire({title:ht.importantInformation,html:ht.setReminderEmailMsg,showCancelButton:!0,confirmButtonText:ht.continue}).then(async f=>{if(f.isConfirmed){if(qt.userEmail)return p(qt.userEmail);const{value:_}=await Er.fire({title:ht.enterYourEmailAddress,input:"email",inputPlaceholder:ht.email,showCancelButton:!0,confirmButtonText:ht.save});_&&p(_)}})},v=Tt.transactionInstance(t.transactionHash),m=()=>{window.open(v.getUrl(),"_blank")};return ft(async()=>{c0(),await Vt.call("confirmationStarted",{order:o,network:r,transaction:v});let f;try{zo.log("Waiting for transaction");try{f=await v.wait(5e3),zo.log("Verifying transaction"),f=await v.verifyTransfer(tb.INCOMING,l,o.paymentAmount)}catch(y){f=Ci.FAILED,zo.error(y)}zo.log("Transaction status:",f),f==Ci.CONFIRMED&&Ho.get.blockConfirmationCount>0&&(f=await new Promise(y=>{i.value=setInterval(async()=>{d.value=await v.getBlockConfirmationCount(),d.value>=Ho.get.blockConfirmationCount&&(y(Ci.CONFIRMED),clearInterval(i.value))},5e3)}))}catch(y){f=Ci.FAILED,zo.error(y)}n.value=2;let _;qt.createTransaction&&(_=await Tt.get.api.paymentFinished(f==Ci.CONFIRMED)),a.value=!1,Gs();const g=await Vt.call("confirmationCompleted",{order:o,status:f,network:r,transaction:v});if(Vt.check(g)&&!g.disablePopup&&typeof _<"u"){let y;_.success?y=X1(_.message):y=bo(_.message),y.then(()=>{Ys(),s0(ht.redirecting),_.data.redirect=="reload"?window.location.reload():window.location.href=_.data.redirect})}}),(f,_)=>{const g=nt("cp-loading"),y=nt("el-col"),w=nt("el-button"),x=nt("el-row"),$=nt("cp-modal");return a.value?(b(),he($,{key:0,title:s(ht).waitingConfirmation},{default:le(()=>[ee(g),ee(x,{justify:"center",class:"text-center"},{default:le(()=>[n.value==1?(b(),M("div",MS,[ee(y,{span:24,class:"margin-bottom"},{default:le(()=>[d.value!=null?(b(),M("div",AS,$e(s(ht).waitingBlockConfirmations)+" "+$e(d.value)+" / "+$e(s(Ho).get.blockConfirmationCount),1)):(b(),M("div",zS,$e(s(ht).waitingTransactionConfirmations),1))]),_:1}),u0()?se("",!0):(b(),he(y,{key:0,span:24},{default:le(()=>[ee(w,{class:"margin-bottom button-colors",type:"primary",onClick:_[0]||(_[0]=T=>m())},{default:le(()=>[Ct($e(s(ht).openInExplorer),1)]),_:1})]),_:1})),u.value?(b(),he(w,{key:1,type:"info",class:"margin-bottom",onClick:_[1]||(_[1]=T=>h())},{default:le(()=>[Ct($e(s(ht).setReminderEmail),1)]),_:1})):se("",!0)])):(b(),he(y,{key:1,span:24,class:"margin-bottom"},{default:le(()=>[Ct($e(s(ht).paymentCompleting),1)]),_:1}))]),_:1})]),_:1},8,["title"])):se("",!0)}}}),OS={key:0},NS={key:2},PS=N({__name:"App",setup(e){const t=D(!1),o=D(!0),r=C(()=>Ho.get.networks.length==1),l=C(()=>{switch(qt.mode){case"network":return r.value?!Tt.get.network:!0;case"currency":return!0;default:return!0}}),n=C(()=>i.value?Tt.get.network:Tt.get.network&&!Tt.get.transactionHash),a=C(()=>{switch(qt.mode){case"network":return r.value?!0:!o.value;case"currency":return!1;default:return!0}}),i=C(()=>{switch(qt.mode){case"network":return r.value;case"currency":return!1;default:return!1}}),c=()=>{Tt.isPaymentAmountUpdating||Tt.$reset()},d=u=>Object.keys(u).length===0;return zt("$init",async(u,p)=>{if(!p)return bo(ht.notFoundAnyCurrency);t.value=!0,Tt.setOrderParams({...Ho.get.order,paymentCurrency:p}),zo.log("isOrderAndInitAmountNotEqual",Tt.isOrderAndInitAmountNotEqual),Tt.isOrderAndInitAmountNotEqual&&Tt.setInit(null);const h=Tt.get.init,v=await Vt.call("init",{network:u,currency:p,init:h});if(zo.log("Init context",v),!Vt.check(v))return t.value=!1;v!=null&&v.init&&Tt.setInit(v.init);let m={success:!0};try{const f=async _=>{Ho.set("blockConfirmationCount",_.blockConfirmationCount);const g=qt.providers[u.code],y=wi(u,["wsUrl"]),w=new g.Provider(y),x=G1(u.wallets,g.browser.adapters);return d(x)?{success:!1,message:ht.notFoundAnyWallet.replace("{networkName}",u.name)}:(uC(g),pC(w),Tt.setInit(_),Tt.setNetwork(u),Tt.setReceiver(_.receiver),Tt.setOrderParams(_.order),{success:!0})};Tt.get.init?(zo.log("init","use exist init data"),m=await f(Tt.get.init)):(zo.log("init","get init data from api"),m=await f(await Tt.get.api.init(u)))}catch(f){zo.error(f),m={success:!1,message:f.message}}t.value=!1,m.success||bo(m.message??"").then(()=>{if(m.data){Ys();const f=m.data;f.redirect?window.location.href=f.redirect:f.redirect=="reload"&&window.location.reload()}})}),(u,p)=>{const h=nt("cp-modal"),v=nt("cp-loading"),m=nt("cp-container");return s(Ho).isAppStarted?(b(),he(m,{key:0},{default:le(()=>[l.value?(b(),M("div",OS,[s(qt).mode=="network"?(b(),he(SC,{key:0})):s(qt).mode=="currency"?(b(),he(IC,{key:1})):se("",!0)])):se("",!0),n.value?(b(),he(h,{key:1,onClose:p[1]||(p[1]=f=>c()),class:O(i.value?"disabled":"")},{default:le(()=>[a.value?(b(),he(HC,{key:0})):se("",!0),ee(QC,{onStatusChanged:p[0]||(p[0]=f=>o.value=f)})]),_:1},8,["class"])):se("",!0),s(Tt).get.transactionHash?(b(),M("div",NS,[s(Tt).get.process==s(Zu).TRANSACTION?(b(),he(e7,{key:0,transactionHash:s(Tt).get.transactionHash},null,8,["transactionHash"])):s(Tt).get.process==s(Zu).CONFIRMATION?(b(),he(IS,{key:1,transactionHash:s(Tt).get.transactionHash},null,8,["transactionHash"])):se("",!0)])):se("",!0),t.value?(b(),he(h,{key:3,title:s(ht).loading},{default:le(()=>[ee(v)]),_:1},8,["title"])):se("",!0)]),_:1})):se("",!0)}}});var dd={exports:{}};dd.exports,function(e,t){var o=200,r="__lodash_hash_undefined__",l=9007199254740991,n="[object Arguments]",a="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",u="[object Function]",p="[object GeneratorFunction]",h="[object Map]",v="[object Number]",m="[object Object]",f="[object Promise]",_="[object RegExp]",g="[object Set]",y="[object String]",w="[object Symbol]",x="[object WeakMap]",$="[object ArrayBuffer]",T="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",L="[object Int8Array]",V="[object Int16Array]",B="[object Int32Array]",j="[object Uint8Array]",te="[object Uint8ClampedArray]",J="[object Uint16Array]",Z="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,F=/\w*$/,K=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,U={};U[n]=U[a]=U[$]=U[T]=U[i]=U[c]=U[R]=U[P]=U[L]=U[V]=U[B]=U[h]=U[v]=U[m]=U[_]=U[g]=U[y]=U[w]=U[j]=U[te]=U[J]=U[Z]=!0,U[d]=U[u]=U[x]=!1;var oe=typeof Ao=="object"&&Ao&&Ao.Object===Object&&Ao,ne=typeof self=="object"&&self&&self.Object===Object&&self,ce=oe||ne||Function("return this")(),Q=t&&!t.nodeType&&t,Me=Q&&!0&&e&&!e.nodeType&&e,de=Me&&Me.exports===Q;function _e(ie,Ve){return ie.set(Ve[0],Ve[1]),ie}function me(ie,Ve){return ie.add(Ve),ie}function Re(ie,Ve){for(var Xe=-1,$t=ie?ie.length:0;++Xe<$t&&Ve(ie[Xe],Xe,ie)!==!1;);return ie}function Ce(ie,Ve){for(var Xe=-1,$t=Ve.length,Yo=ie.length;++Xe<$t;)ie[Yo+Xe]=Ve[Xe];return ie}function Ee(ie,Ve,Xe,$t){for(var Yo=-1,mr=ie?ie.length:0;++Yo-1}function ao(ie,Ve){var Xe=this.__data__,$t=_s(Xe,ie);return $t<0?Xe.push([ie,Ve]):Xe[$t][1]=Ve,this}rr.prototype.clear=ua,rr.prototype.delete=He,rr.prototype.get=ot,rr.prototype.has=eo,rr.prototype.set=ao;function Po(ie){var Ve=-1,Xe=ie?ie.length:0;for(this.clear();++Ve-1&&ie%1==0&&ie-1&&ie%1==0&&ie<=l}function ws(ie){var Ve=typeof ie;return!!ie&&(Ve=="object"||Ve=="function")}function lf(ie){return!!ie&&typeof ie=="object"}function uu(ie){return tf(ie)?ru(ie):nm(ie)}function ym(){return[]}function da(){return!1}e.exports=Qp}(dd,dd.exports);var RS=dd.exports;const Db=cl(RS);function LS({store:e}){const t=Db(e.$state);e.$reset=()=>e.$patch(Db(t))}const BS='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',VS=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Hb=e=>Array.from(e.querySelectorAll(BS)).filter(t=>DS(t)&&VS(t)),DS=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},pd=function(e,t,...o){let r;t.includes("mouse")||t.includes("click")?r="MouseEvents":t.includes("key")?r="KeyboardEvent":r="HTMLEvents";const l=document.createEvent(r);return l.initEvent(t,...o),e.dispatchEvent(l),e},Fb=e=>!e.getAttribute("aria-owns"),jb=(e,t,o)=>{const{parentNode:r}=e;if(!r)return null;const l=r.querySelectorAll(o),n=Array.prototype.indexOf.call(l,e);return l[n+t]||null},fd=e=>{e&&(e.focus(),!Fb(e)&&e.click())},ho=(e,t,{checkForDefaultPrevented:o=!0}={})=>l=>{const n=e==null?void 0:e(l);if(o===!1||!n)return t==null?void 0:t(l)},Kb=e=>t=>t.pointerType==="mouse"?e(t):void 0;var HS=Object.defineProperty,FS=Object.defineProperties,jS=Object.getOwnPropertyDescriptors,Ub=Object.getOwnPropertySymbols,KS=Object.prototype.hasOwnProperty,US=Object.prototype.propertyIsEnumerable,Wb=(e,t,o)=>t in e?HS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,WS=(e,t)=>{for(var o in t||(t={}))KS.call(t,o)&&Wb(e,o,t[o]);if(Ub)for(var o of Ub(t))US.call(t,o)&&Wb(e,o,t[o]);return e},qS=(e,t)=>FS(e,jS(t));function qb(e,t){var o;const r=lo();return Go(()=>{r.value=e()},qS(WS({},t),{flush:(o=void 0)!=null?o:"sync"})),ui(r)}var Yb;const Nt=typeof window<"u",YS=e=>typeof e<"u",M0=e=>typeof e=="function",GS=e=>typeof e=="string",$i=()=>{},A0=Nt&&((Yb=window==null?void 0:window.navigator)==null?void 0:Yb.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function qn(e){return typeof e=="function"?e():s(e)}function Gb(e,t){function o(...r){return new Promise((l,n)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(l).catch(n)})}return o}function XS(e,t={}){let o,r,l=$i;const n=i=>{clearTimeout(i),l(),l=$i};return i=>{const c=qn(e),d=qn(t.maxWait);return o&&n(o),c<=0||d!==void 0&&d<=0?(r&&(n(r),r=null),Promise.resolve(i())):new Promise((u,p)=>{l=t.rejectOnCancel?p:u,d&&!r&&(r=setTimeout(()=>{o&&n(o),r=null,u(i())},d)),o=setTimeout(()=>{r&&n(r),r=null,u(i())},c)})}}function ZS(e,t=!0,o=!0,r=!1){let l=0,n,a=!0,i=$i,c;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=$i)};return p=>{const h=qn(e),v=Date.now()-l,m=()=>c=p();return d(),h<=0?(l=Date.now(),m()):(v>h&&(o||!a)?(l=Date.now(),m()):t&&(c=new Promise((f,_)=>{i=r?_:f,n=setTimeout(()=>{l=Date.now(),a=!0,f(m()),d()},Math.max(0,h-v))})),!o&&!n&&(n=setTimeout(()=>a=!0,h)),a=!1,c)}}function JS(e){return e}function QS(e,t){let o,r,l;const n=D(!0),a=()=>{n.value=!0,l()};Se(e,a,{flush:"sync"});const i=M0(t)?t:t.get,c=M0(t)?void 0:t.set,d=uk((u,p)=>(r=u,l=p,{get(){return n.value&&(o=i(),n.value=!1),r(),o},set(h){c==null||c(h)}}));return Object.isExtensible(d)&&(d.trigger=a),d}function rc(e){return xf()?(kf(e),!0):!1}function eE(e,t=200,o={}){return Gb(XS(t,o),e)}function tE(e,t=200,o={}){const r=D(e.value),l=eE(()=>{r.value=e.value},t,o);return Se(e,()=>l()),r}function Xb(e,t=200,o=!1,r=!0,l=!1){return Gb(ZS(t,o,r,l),e)}function z0(e,t=!0){wt()?ft(e):t?e():et(e)}function $a(e,t,o={}){const{immediate:r=!0}=o,l=D(!1);let n=null;function a(){n&&(clearTimeout(n),n=null)}function i(){l.value=!1,a()}function c(...d){a(),l.value=!0,n=setTimeout(()=>{l.value=!1,n=null,e(...d)},qn(t))}return r&&(l.value=!0,Nt&&c()),rc(i),{isPending:ui(l),start:c,stop:i}}function $r(e){var t;const o=qn(e);return(t=o==null?void 0:o.$el)!=null?t:o}const Yn=Nt?window:void 0,oE=Nt?window.document:void 0;function oo(...e){let t,o,r,l;if(GS(e[0])||Array.isArray(e[0])?([o,r,l]=e,t=Yn):[t,o,r,l]=e,!t)return $i;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const n=[],a=()=>{n.forEach(u=>u()),n.length=0},i=(u,p,h,v)=>(u.addEventListener(p,h,v),()=>u.removeEventListener(p,h,v)),c=Se(()=>[$r(t),qn(l)],([u,p])=>{a(),u&&n.push(...o.flatMap(h=>r.map(v=>i(u,h,v,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),a()};return rc(d),d}let Zb=!1;function I0(e,t,o={}){const{window:r=Yn,ignore:l=[],capture:n=!0,detectIframe:a=!1}=o;if(!r)return;A0&&!Zb&&(Zb=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",$i)));let i=!0;const c=h=>l.some(v=>{if(typeof v=="string")return Array.from(r.document.querySelectorAll(v)).some(m=>m===h.target||h.composedPath().includes(m));{const m=$r(v);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[oo(r,"click",h=>{const v=$r(e);if(!(!v||v===h.target||h.composedPath().includes(v))){if(h.detail===0&&(i=!c(h)),!i){i=!0;return}t(h)}},{passive:!0,capture:n}),oo(r,"pointerdown",h=>{const v=$r(e);v&&(i=!h.composedPath().includes(v)&&!c(h))},{passive:!0}),a&&oo(r,"blur",h=>{var v;const m=$r(e);((v=r.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&t(h)})].filter(Boolean);return()=>u.forEach(h=>h())}function rE(e={}){var t;const{window:o=Yn}=e,r=(t=e.document)!=null?t:o==null?void 0:o.document,l=QS(()=>null,()=>r==null?void 0:r.activeElement);return o&&(oo(o,"blur",n=>{n.relatedTarget===null&&l.trigger()},!0),oo(o,"focus",l.trigger,!0)),l}function Jb(e,t=!1){const o=D(),r=()=>o.value=!!e();return r(),z0(r,t),o}function lE(e){return JSON.parse(JSON.stringify(e))}const O0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Xl<"u"?Xl:typeof self<"u"?self:{},N0="__vueuse_ssr_handlers__";O0[N0]=O0[N0]||{},O0[N0];function nE(e,t,{window:o=Yn,initialValue:r=""}={}){const l=D(r),n=C(()=>{var a;return $r(t)||((a=o==null?void 0:o.document)==null?void 0:a.documentElement)});return Se([n,()=>qn(e)],([a,i])=>{var c;if(a&&o){const d=(c=o.getComputedStyle(a).getPropertyValue(i))==null?void 0:c.trim();l.value=d||r}},{immediate:!0}),Se(l,a=>{var i;(i=n.value)!=null&&i.style&&n.value.style.setProperty(qn(e),a)}),l}function aE({document:e=oE}={}){if(!e)return D("visible");const t=D(e.visibilityState);return oo(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var Qb=Object.getOwnPropertySymbols,iE=Object.prototype.hasOwnProperty,sE=Object.prototype.propertyIsEnumerable,cE=(e,t)=>{var o={};for(var r in e)iE.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Qb)for(var r of Qb(e))t.indexOf(r)<0&&sE.call(e,r)&&(o[r]=e[r]);return o};function so(e,t,o={}){const r=o,{window:l=Yn}=r,n=cE(r,["window"]);let a;const i=Jb(()=>l&&"ResizeObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=Se(()=>$r(e),p=>{c(),i.value&&l&&p&&(a=new ResizeObserver(t),a.observe(p,n))},{immediate:!0,flush:"post"}),u=()=>{c(),d()};return rc(u),{isSupported:i,stop:u}}function e_(e,t={}){const{reset:o=!0,windowResize:r=!0,windowScroll:l=!0,immediate:n=!0}=t,a=D(0),i=D(0),c=D(0),d=D(0),u=D(0),p=D(0),h=D(0),v=D(0);function m(){const f=$r(e);if(!f){o&&(a.value=0,i.value=0,c.value=0,d.value=0,u.value=0,p.value=0,h.value=0,v.value=0);return}const _=f.getBoundingClientRect();a.value=_.height,i.value=_.bottom,c.value=_.left,d.value=_.right,u.value=_.top,p.value=_.width,h.value=_.x,v.value=_.y}return so(e,m),Se(()=>$r(e),f=>!f&&m()),l&&oo("scroll",m,{capture:!0,passive:!0}),r&&oo("resize",m,{passive:!0}),z0(()=>{n&&m()}),{height:a,bottom:i,left:c,right:d,top:u,width:p,x:h,y:v,update:m}}var t_=Object.getOwnPropertySymbols,uE=Object.prototype.hasOwnProperty,dE=Object.prototype.propertyIsEnumerable,pE=(e,t)=>{var o={};for(var r in e)uE.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&t_)for(var r of t_(e))t.indexOf(r)<0&&dE.call(e,r)&&(o[r]=e[r]);return o};function o_(e,t,o={}){const r=o,{window:l=Yn}=r,n=pE(r,["window"]);let a;const i=Jb(()=>l&&"MutationObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=Se(()=>$r(e),p=>{c(),i.value&&l&&p&&(a=new MutationObserver(t),a.observe(p,n))},{immediate:!0}),u=()=>{c(),d()};return rc(u),{isSupported:i,stop:u}}var r_;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(r_||(r_={}));var fE=Object.defineProperty,l_=Object.getOwnPropertySymbols,hE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,n_=(e,t,o)=>t in e?fE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,mE=(e,t)=>{for(var o in t||(t={}))hE.call(t,o)&&n_(e,o,t[o]);if(l_)for(var o of l_(t))vE.call(t,o)&&n_(e,o,t[o]);return e};mE({linear:JS},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function a_(e,t,o,r={}){var l,n,a;const{clone:i=!1,passive:c=!1,eventName:d,deep:u=!1,defaultValue:p}=r,h=wt(),v=o||(h==null?void 0:h.emit)||((l=h==null?void 0:h.$emit)==null?void 0:l.bind(h))||((a=(n=h==null?void 0:h.proxy)==null?void 0:n.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let m=d;t||(t="modelValue"),m=d||m||`update:${t.toString()}`;const f=g=>i?M0(i)?i(g):lE(g):g,_=()=>YS(e[t])?f(e[t]):p;if(c){const g=_(),y=D(g);return Se(()=>e[t],w=>y.value=f(w)),Se(y,w=>{(w!==e[t]||u)&&v(m,w)},{deep:u}),y}else return C({get(){return _()},set(g){v(m,g)}})}function gE({window:e=Yn}={}){if(!e)return D(!1);const t=D(e.document.hasFocus());return oo(e,"blur",()=>{t.value=!1}),oo(e,"focus",()=>{t.value=!0}),t}function bE(e={}){const{window:t=Yn,initialWidth:o=1/0,initialHeight:r=1/0,listenOrientation:l=!0,includeScrollbar:n=!0}=e,a=D(o),i=D(r),c=()=>{t&&(n?(a.value=t.innerWidth,i.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,i.value=t.document.documentElement.clientHeight))};return c(),z0(c),oo("resize",c,{passive:!0}),l&&oo("orientationchange",c,{passive:!0}),{width:a,height:i}}const i_=()=>Nt&&/firefox/i.test(window.navigator.userAgent),_E=(e,t)=>{if(!Nt||!e||!t)return!1;const o=e.getBoundingClientRect();let r;return t instanceof Element?r=t.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},o.topr.top&&o.right>r.left&&o.left{let t=0,o=e;for(;o;)t+=o.offsetTop,o=o.offsetParent;return t},P0=(e,t)=>Math.abs(s_(e)-s_(t)),R0=e=>{let t,o;return e.type==="touchend"?(o=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(o=e.touches[0].clientY,t=e.touches[0].clientX):(o=e.clientY,t=e.clientX),{clientX:t,clientY:o}};function wE(e,t,o,r){const l=o-t;return e/=r/2,e<1?l/2*e*e*e+t:l/2*((e-=2)*e*e+2)+t}var c_=typeof Xl=="object"&&Xl&&Xl.Object===Object&&Xl,yE=typeof self=="object"&&self&&self.Object===Object&&self,pl=c_||yE||Function("return this")(),qr=pl.Symbol,u_=Object.prototype,xE=u_.hasOwnProperty,kE=u_.toString,lc=qr?qr.toStringTag:void 0;function CE(e){var t=xE.call(e,lc),o=e[lc];try{e[lc]=void 0;var r=!0}catch{}var l=kE.call(e);return r&&(t?e[lc]=o:delete e[lc]),l}var SE=Object.prototype,EE=SE.toString;function TE(e){return EE.call(e)}var $E="[object Null]",ME="[object Undefined]",d_=qr?qr.toStringTag:void 0;function Ma(e){return e==null?e===void 0?ME:$E:d_&&d_ in Object(e)?CE(e):TE(e)}function Il(e){return e!=null&&typeof e=="object"}var AE="[object Symbol]";function hd(e){return typeof e=="symbol"||Il(e)&&Ma(e)==AE}function L0(e,t){for(var o=-1,r=e==null?0:e.length,l=Array(r);++o0){if(++t>=nT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cT(e){return function(){return e}}var vd=function(){try{var e=za(Object,"defineProperty");return e({},"",{}),e}catch{}}(),uT=vd?function(e,t){return vd(e,"toString",{configurable:!0,enumerable:!1,value:cT(t),writable:!0})}:B0,w_=sT(uT);function dT(e,t){for(var o=-1,r=e==null?0:e.length;++o-1}var mT=9007199254740991,gT=/^(?:0|[1-9]\d*)$/;function md(e,t){var o=typeof e;return t=t??mT,!!t&&(o=="number"||o!="symbol"&&gT.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=wT}function Ai(e){return e!=null&&K0(e.length)&&!V0(e)}function yT(e,t,o){if(!wr(o))return!1;var r=typeof t;return(r=="number"?Ai(o)&&md(t,o.length):r=="string"&&t in o)?nc(o[t],e):!1}function xT(e){return C_(function(t,o){var r=-1,l=o.length,n=l>1?o[l-1]:void 0,a=l>2?o[2]:void 0;for(n=e.length>3&&typeof n=="function"?(l--,n):void 0,a&&yT(o[0],o[1],a)&&(n=l<3?void 0:n,l=1),t=Object(t);++r-1}function I$(e,t){var o=this.__data__,r=gd(o,e);return r<0?(++this.size,o.push([e,t])):o[r][1]=t,this}function dn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t0&&o(i)?t>1?fc(i,t-1,o,r,l):X0(l,i):r||(l[l.length]=i)}return l}function P_(e){var t=e==null?0:e.length;return t?fc(e,1):[]}function R_(e){return w_(k_(e,void 0,P_),e+"")}var Z0=O_(Object.getPrototypeOf,Object),Y$="[object Object]",G$=Function.prototype,X$=Object.prototype,L_=G$.toString,Z$=X$.hasOwnProperty,J$=L_.call(Object);function B_(e){if(!Il(e)||Ma(e)!=Y$)return!1;var t=Z0(e);if(t===null)return!0;var o=Z$.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&L_.call(o)==J$}function Q$(e,t,o){var r=-1,l=e.length;t<0&&(t=-t>l?0:l+t),o=o>l?l:o,o<0&&(o+=l),l=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(l);++ri))return!1;var d=n.get(e),u=n.get(t);if(d&&u)return d==t&&u==e;var p=-1,h=!0,v=o&NA?new hc:void 0;for(n.set(e,t),n.set(t,e);++p=t||R<0||p&&P>=n}function g(){var T=nh();if(_(T))return y(T);i=setTimeout(g,f(T))}function y(T){return i=void 0,h&&r?v(T):(r=l=void 0,a)}function w(){i!==void 0&&clearTimeout(i),d=0,r=c=l=i=void 0}function x(){return i===void 0?a:y(nh())}function $(){var T=nh(),R=_(T);if(r=arguments,l=this,c=T,R){if(i===void 0)return m(c);if(p)return clearTimeout(i),i=setTimeout(g,t),v(c)}return i===void 0&&(i=setTimeout(g,t)),a}return $.cancel=w,$.flush=x,$}function ah(e,t,o){(o!==void 0&&!nc(e[t],o)||o===void 0&&!(t in e))&&F0(e,t,o)}function y3(e){return Il(e)&&Ai(e)}function ih(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function kz(e){return Mi(e,uc(e))}function Cz(e,t,o,r,l,n,a){var i=ih(e,o),c=ih(t,o),d=a.get(c);if(d){ah(e,o,d);return}var u=n?n(i,c,o+"",e,t,a):void 0,p=u===void 0;if(p){var h=_r(c),v=!h&&ic(c),m=!h&&!v&&Y0(c);u=c,h||v||m?_r(i)?u=i:y3(i)?u=__(i):v?(p=!1,u=j_(c,!0)):m?(p=!1,u=o3(c,!0)):u=[]:B_(c)||ac(c)?(u=i,ac(i)?u=kz(i):(!wr(i)||V0(i))&&(u=r3(c))):p=!1}p&&(a.set(c,u),l(u,c,r,n,a),a.delete(c)),ah(e,o,u)}function x3(e,t,o,r,l){e!==t&&w3(t,function(n,a){if(l||(l=new fl),wr(n))Cz(e,t,a,o,x3,r,l);else{var i=r?r(ih(e,a),n,a+"",e,t,l):void 0;i===void 0&&(i=n),ah(e,a,i)}},uc)}function Sz(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function k3(e,t,o){var r=e==null?0:e.length;if(!r)return-1;var l=r-1;return y_(e,_3(t),l,!0)}function Ez(e,t){var o=-1,r=Ai(e)?Array(e.length):[];return _z(e,function(l,n,a){r[++o]=t(l,n,a)}),r}function Tz(e,t){var o=_r(e)?L0:Ez;return o(e,_3(t))}function $z(e,t){return fc(Tz(e,t),1)}var Mz=1/0;function Az(e){var t=e==null?0:e.length;return t?fc(e,Mz):[]}function Sd(e){for(var t=-1,o=e==null?0:e.length,r={};++t1),n}),Mi(e,Y_(e),o),r&&(o=Pi(o,Pz|Rz|Lz,Nz));for(var l=t.length;l--;)Oz(o,t[l]);return o});function S3(e,t,o,r){if(!wr(e))return e;t=Ii(t,e);for(var l=-1,n=t.length,a=n-1,i=e;i!=null&&++l=Uz){var d=Kz(e);if(d)return rh(d);a=!1,l=u3,c=new hc}else c=i;e:for(;++re===void 0,Co=e=>typeof e=="boolean",st=e=>typeof e=="number",Yr=e=>!e&&e!==0||Ke(e)&&e.length===0||xt(e)&&!Object.keys(e).length,Gr=e=>typeof Element>"u"?!1:e instanceof Element,Na=e=>jo(e),qz=e=>ut(e)?!Number.isNaN(Number(e)):!1,Ed=e=>e===window,Xn=e=>Nt?window.requestAnimationFrame(e):setTimeout(e,16),Pa=e=>Nt?window.cancelAnimationFrame(e):clearTimeout(e),ch=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Nl=e=>Ms(e),Ri=e=>Object.keys(e),Yz=e=>Object.entries(e),Td=(e,t,o)=>({get value(){return wo(e,t,o)},set value(r){Hz(e,t,r)}});class Gz extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Io(e,t){throw new Gz(`[${e}] ${t}`)}function cfe(e,t){}const E3=(e="")=>e.split(" ").filter(t=>!!t.trim()),Xr=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Zr=(e,t)=>{!e||!t.trim()||e.classList.add(...E3(t))},ar=(e,t)=>{!e||!t.trim()||e.classList.remove(...E3(t))},Zn=(e,t)=>{var o;if(!Nt||!e||!t)return"";let r=Fr(t);r==="float"&&(r="cssFloat");try{const l=e.style[r];if(l)return l;const n=(o=document.defaultView)==null?void 0:o.getComputedStyle(e,"");return n?n[r]:""}catch{return e.style[r]}};function mo(e,t="px"){if(!e)return"";if(st(e)||qz(e))return`${e}${t}`;if(ut(e))return e}const Xz=(e,t)=>{if(!Nt)return!1;const o={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],r=Zn(e,o);return["scroll","auto","overlay"].some(l=>r.includes(l))},uh=(e,t)=>{if(!Nt)return;let o=e;for(;o;){if([window,document,document.documentElement].includes(o))return window;if(Xz(o,t))return o;o=o.parentNode}return o};let $d;const T3=e=>{var t;if(!Nt)return 0;if($d!==void 0)return $d;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const l=document.createElement("div");l.style.width="100%",o.appendChild(l);const n=l.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),$d=r-n,$d};function $3(e,t){if(!Nt)return;if(!t){e.scrollTop=0;return}const o=[];let r=t.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)o.push(r),r=r.offsetParent;const l=t.offsetTop+o.reduce((c,d)=>c+d.offsetTop,0),n=l+t.offsetHeight,a=e.scrollTop,i=a+e.clientHeight;li&&(e.scrollTop=n-e.clientHeight)}function Zz(e,t,o,r,l){const n=Date.now();let a;const i=()=>{const d=Date.now()-n,u=wE(d>r?r:d,t,o,r);Ed(e)?e.scrollTo(window.pageXOffset,u):e.scrollTop=u,d{a&&Pa(a)}}const M3=(e,t)=>Ed(t)?e.ownerDocument.documentElement:t,A3=e=>Ed(e)?window.scrollY:e.scrollTop,Md=e=>{if(!Nt||e==="")return null;if(ut(e))try{return document.querySelector(e)}catch{return null}return e};/*! Element Plus Icons Vue v2.3.1 */var Jz=N({name:"AddLocation",__name:"add-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M544 384h96a32 32 0 1 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0z"})]))}}),Qz=Jz,eI=N({name:"Aim",__name:"aim",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"})]))}}),tI=eI,oI=N({name:"AlarmClock",__name:"alarm-clock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 832a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),E("path",{fill:"currentColor",d:"m292.288 824.576 55.424 32-48 83.136a32 32 0 1 1-55.424-32zm439.424 0-55.424 32 48 83.136a32 32 0 1 0 55.424-32zM512 512h160a32 32 0 1 1 0 64H480a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0zM90.496 312.256A160 160 0 0 1 312.32 90.496l-46.848 46.848a96 96 0 0 0-128 128L90.56 312.256zm835.264 0A160 160 0 0 0 704 90.496l46.848 46.848a96 96 0 0 1 128 128z"})]))}}),rI=oI,lI=N({name:"Apple",__name:"apple",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M599.872 203.776a189.44 189.44 0 0 1 64.384-4.672l2.624.128c31.168 1.024 51.2 4.096 79.488 16.32 37.632 16.128 74.496 45.056 111.488 89.344 96.384 115.264 82.752 372.8-34.752 521.728-7.68 9.728-32 41.6-30.72 39.936a426.624 426.624 0 0 1-30.08 35.776c-31.232 32.576-65.28 49.216-110.08 50.048-31.36.64-53.568-5.312-84.288-18.752l-6.528-2.88c-20.992-9.216-30.592-11.904-47.296-11.904-18.112 0-28.608 2.88-51.136 12.672l-6.464 2.816c-28.416 12.224-48.32 18.048-76.16 19.2-74.112 2.752-116.928-38.08-180.672-132.16-96.64-142.08-132.608-349.312-55.04-486.4 46.272-81.92 129.92-133.632 220.672-135.04 32.832-.576 60.288 6.848 99.648 22.72 27.136 10.88 34.752 13.76 37.376 14.272 16.256-20.16 27.776-36.992 34.56-50.24 13.568-26.304 27.2-59.968 40.704-100.8a32 32 0 1 1 60.8 20.224c-12.608 37.888-25.408 70.4-38.528 97.664zm-51.52 78.08c-14.528 17.792-31.808 37.376-51.904 58.816a32 32 0 1 1-46.72-43.776l12.288-13.248c-28.032-11.2-61.248-26.688-95.68-26.112-70.4 1.088-135.296 41.6-171.648 105.792C121.6 492.608 176 684.16 247.296 788.992c34.816 51.328 76.352 108.992 130.944 106.944 52.48-2.112 72.32-34.688 135.872-34.688 63.552 0 81.28 34.688 136.96 33.536 56.448-1.088 75.776-39.04 126.848-103.872 107.904-136.768 107.904-362.752 35.776-449.088-72.192-86.272-124.672-84.096-151.68-85.12-41.472-4.288-81.6 12.544-113.664 25.152z"})]))}}),nI=lI,aI=N({name:"ArrowDownBold",__name:"arrow-down-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"})]))}}),iI=aI,sI=N({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Pl=sI,cI=N({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}}),uI=cI,dI=N({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),fn=dI,pI=N({name:"ArrowRightBold",__name:"arrow-right-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"})]))}}),fI=pI,hI=N({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),ir=hI,vI=N({name:"ArrowUpBold",__name:"arrow-up-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"})]))}}),mI=vI,gI=N({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ad=gI,bI=N({name:"Avatar",__name:"avatar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),_I=bI,wI=N({name:"Back",__name:"back",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),z3=wI,yI=N({name:"Baseball",__name:"baseball",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),E("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896zM108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1736.64 1736.64 0 0 1-11.392-65.728z"})]))}}),xI=yI,kI=N({name:"Basketball",__name:"basketball",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M778.752 788.224a382.464 382.464 0 0 0 116.032-245.632 256.512 256.512 0 0 0-241.728-13.952 762.88 762.88 0 0 1 125.696 259.584zm-55.04 44.224a699.648 699.648 0 0 0-125.056-269.632 256.128 256.128 0 0 0-56.064 331.968 382.72 382.72 0 0 0 181.12-62.336m-254.08 61.248A320.128 320.128 0 0 1 557.76 513.6a715.84 715.84 0 0 0-48.192-48.128 320.128 320.128 0 0 1-379.264 88.384 382.4 382.4 0 0 0 110.144 229.696 382.4 382.4 0 0 0 229.184 110.08zM129.28 481.088a256.128 256.128 0 0 0 331.072-56.448 699.648 699.648 0 0 0-268.8-124.352 382.656 382.656 0 0 0-62.272 180.8m106.56-235.84a762.88 762.88 0 0 1 258.688 125.056 256.512 256.512 0 0 0-13.44-241.088A382.464 382.464 0 0 0 235.84 245.248zm318.08-114.944c40.576 89.536 37.76 193.92-8.448 281.344a779.84 779.84 0 0 1 66.176 66.112 320.832 320.832 0 0 1 282.112-8.128 382.4 382.4 0 0 0-110.144-229.12 382.4 382.4 0 0 0-229.632-110.208zM828.8 828.8a448 448 0 1 1-633.6-633.6 448 448 0 0 1 633.6 633.6"})]))}}),CI=kI,SI=N({name:"BellFilled",__name:"bell-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 832a128 128 0 0 1-256 0zm192-64H134.4a38.4 38.4 0 0 1 0-76.8H192V448c0-154.88 110.08-284.16 256.32-313.6a64 64 0 1 1 127.36 0A320.128 320.128 0 0 1 832 448v243.2h57.6a38.4 38.4 0 0 1 0 76.8z"})]))}}),EI=SI,TI=N({name:"Bell",__name:"bell",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),E("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),E("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),$I=TI,MI=N({name:"Bicycle",__name:"bicycle",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),E("path",{fill:"currentColor",d:"M288 672h320q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M768 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),E("path",{fill:"currentColor",d:"M480 192a32 32 0 0 1 0-64h160a32 32 0 0 1 31.04 24.256l96 384a32 32 0 0 1-62.08 15.488L615.04 192zM96 384a32 32 0 0 1 0-64h128a32 32 0 0 1 30.336 21.888l64 192a32 32 0 1 1-60.672 20.224L200.96 384z"}),E("path",{fill:"currentColor",d:"m373.376 599.808-42.752-47.616 320-288 42.752 47.616z"})]))}}),AI=MI,zI=N({name:"BottomLeft",__name:"bottom-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),E("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),II=zI,OI=N({name:"BottomRight",__name:"bottom-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 768a32 32 0 1 0 0 64h448a32 32 0 0 0 32-32V352a32 32 0 0 0-64 0v416z"}),E("path",{fill:"currentColor",d:"M777.344 822.656a32 32 0 0 0 45.312-45.312l-544-544a32 32 0 0 0-45.312 45.312z"})]))}}),NI=OI,PI=N({name:"Bottom",__name:"bottom",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),RI=PI,LI=N({name:"Bowl",__name:"bowl",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M714.432 704a351.744 351.744 0 0 0 148.16-256H161.408a351.744 351.744 0 0 0 148.16 256zM288 766.592A415.68 415.68 0 0 1 96 416a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32 415.68 415.68 0 0 1-192 350.592V832a64 64 0 0 1-64 64H352a64 64 0 0 1-64-64zM493.248 320h-90.496l254.4-254.4a32 32 0 1 1 45.248 45.248zm187.328 0h-128l269.696-155.712a32 32 0 0 1 32 55.424zM352 768v64h320v-64z"})]))}}),BI=LI,VI=N({name:"Box",__name:"box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M317.056 128 128 344.064V896h768V344.064L706.944 128zm-14.528-64h418.944a32 32 0 0 1 24.064 10.88l206.528 236.096A32 32 0 0 1 960 332.032V928a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V332.032a32 32 0 0 1 7.936-21.12L278.4 75.008A32 32 0 0 1 302.528 64z"}),E("path",{fill:"currentColor",d:"M64 320h896v64H64z"}),E("path",{fill:"currentColor",d:"M448 327.872V640h128V327.872L526.08 128h-28.16zM448 64h128l64 256v352a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V320z"})]))}}),DI=VI,HI=N({name:"Briefcase",__name:"briefcase",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 320V128h384v192h192v192H128V320zM128 576h768v320H128zm256-256h256.064V192H384z"})]))}}),FI=HI,jI=N({name:"BrushFilled",__name:"brush-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M608 704v160a96 96 0 0 1-192 0V704h-96a128 128 0 0 1-128-128h640a128 128 0 0 1-128 128zM192 512V128.064h640V512z"})]))}}),KI=jI,UI=N({name:"Brush",__name:"brush",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 448H128v192a64 64 0 0 0 64 64h192v192h256V704h192a64 64 0 0 0 64-64zm-770.752-64c0-47.552 5.248-90.24 15.552-128 14.72-54.016 42.496-107.392 83.2-160h417.28l-15.36 70.336L736 96h211.2c-24.832 42.88-41.92 96.256-51.2 160a663.872 663.872 0 0 0-6.144 128H960v256a128 128 0 0 1-128 128H704v160a32 32 0 0 1-32 32H352a32 32 0 0 1-32-32V768H192A128 128 0 0 1 64 640V384h61.248zm64 0h636.544c-2.048-45.824.256-91.584 6.848-137.216 4.48-30.848 10.688-59.776 18.688-86.784h-96.64l-221.12 141.248L561.92 160H256.512c-25.856 37.888-43.776 75.456-53.952 112.832-8.768 32.064-13.248 69.12-13.312 111.168z"})]))}}),WI=UI,qI=N({name:"Burger",__name:"burger",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 512a32 32 0 0 0-32 32v64a32 32 0 0 0 30.08 32H864a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32zm736-58.56A96 96 0 0 1 960 544v64a96 96 0 0 1-51.968 85.312L855.36 833.6a96 96 0 0 1-89.856 62.272H258.496A96 96 0 0 1 168.64 833.6l-52.608-140.224A96 96 0 0 1 64 608v-64a96 96 0 0 1 64-90.56V448a384 384 0 1 1 768 5.44M832 448a320 320 0 0 0-640 0zM512 704H188.352l40.192 107.136a32 32 0 0 0 29.952 20.736h507.008a32 32 0 0 0 29.952-20.736L835.648 704z"})]))}}),YI=qI,GI=N({name:"Calendar",__name:"calendar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),I3=GI,XI=N({name:"CameraFilled",__name:"camera-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),ZI=XI,JI=N({name:"Camera",__name:"camera",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 256H128v576h768zm-199.424-64-32.064-64h-304.96l-32 64zM96 192h160l46.336-92.608A64 64 0 0 1 359.552 64h304.96a64 64 0 0 1 57.216 35.328L768.192 192H928a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32m416 512a160 160 0 1 0 0-320 160 160 0 0 0 0 320m0 64a224 224 0 1 1 0-448 224 224 0 0 1 0 448"})]))}}),QI=JI,eO=N({name:"CaretBottom",__name:"caret-bottom",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),tO=eO,oO=N({name:"CaretLeft",__name:"caret-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M672 192 288 511.936 672 832z"})]))}}),rO=oO,lO=N({name:"CaretRight",__name:"caret-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),dh=lO,nO=N({name:"CaretTop",__name:"caret-top",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),O3=nO,aO=N({name:"Cellphone",__name:"cellphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h512a128 128 0 0 1 128 128v640a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V192A128 128 0 0 1 256 64m128 128h256a32 32 0 1 1 0 64H384a32 32 0 0 1 0-64m128 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}}),iO=aO,sO=N({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),E("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),cO=sO,uO=N({name:"ChatDotSquare",__name:"chat-dot-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),E("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}}),dO=uO,pO=N({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),E("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),fO=pO,hO=N({name:"ChatLineSquare",__name:"chat-line-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 826.88 273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),E("path",{fill:"currentColor",d:"M352 512h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m0-192h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}}),vO=hO,mO=N({name:"ChatRound",__name:"chat-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 130.048-43.392 23.424 11.392C382.4 849.984 444.352 864 512 864c223.744 0 384-159.872 384-352 0-192.832-159.104-352-384-352S128 319.168 128 512a341.12 341.12 0 0 0 69.248 204.288l21.632 28.8-44.16 110.528zm-45.248 82.56A32 32 0 0 1 89.6 896l56.512-141.248A405.12 405.12 0 0 1 64 512C64 299.904 235.648 96 512 96s448 203.904 448 416-173.44 416-448 416c-79.68 0-150.848-17.152-211.712-46.72l-170.88 56.96z"})]))}}),gO=mO,bO=N({name:"ChatSquare",__name:"chat-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"})]))}}),_O=bO,wO=N({name:"Check",__name:"check",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Li=wO,yO=N({name:"Checked",__name:"checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024zM384 192V96h256v96z"})]))}}),xO=yO,kO=N({name:"Cherry",__name:"cherry",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M261.056 449.6c13.824-69.696 34.88-128.96 63.36-177.728 23.744-40.832 61.12-88.64 112.256-143.872H320a32 32 0 0 1 0-64h384a32 32 0 1 1 0 64H554.752c14.912 39.168 41.344 86.592 79.552 141.76 47.36 68.48 84.8 106.752 106.304 114.304a224 224 0 1 1-84.992 14.784c-22.656-22.912-47.04-53.76-73.92-92.608-38.848-56.128-67.008-105.792-84.352-149.312-55.296 58.24-94.528 107.52-117.76 147.2-23.168 39.744-41.088 88.768-53.568 147.072a224.064 224.064 0 1 1-64.96-1.6zM288 832a160 160 0 1 0 0-320 160 160 0 0 0 0 320m448-64a160 160 0 1 0 0-320 160 160 0 0 0 0 320"})]))}}),CO=kO,SO=N({name:"Chicken",__name:"chicken",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M349.952 716.992 478.72 588.16a106.688 106.688 0 0 1-26.176-19.072 106.688 106.688 0 0 1-19.072-26.176L304.704 671.744c.768 3.072 1.472 6.144 2.048 9.216l2.048 31.936 31.872 1.984c3.136.64 6.208 1.28 9.28 2.112zm57.344 33.152a128 128 0 1 1-216.32 114.432l-1.92-32-32-1.92a128 128 0 1 1 114.432-216.32L416.64 469.248c-2.432-101.44 58.112-239.104 149.056-330.048 107.328-107.328 231.296-85.504 316.8 0 85.44 85.44 107.328 209.408 0 316.8-91.008 90.88-228.672 151.424-330.112 149.056L407.296 750.08zm90.496-226.304c49.536 49.536 233.344-7.04 339.392-113.088 78.208-78.208 63.232-163.072 0-226.304-63.168-63.232-148.032-78.208-226.24 0C504.896 290.496 448.32 474.368 497.792 523.84M244.864 708.928a64 64 0 1 0-59.84 59.84l56.32-3.52zm8.064 127.68a64 64 0 1 0 59.84-59.84l-56.32 3.52-3.52 56.32z"})]))}}),EO=SO,TO=N({name:"ChromeFilled",__name:"chrome-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M938.67 512.01c0-44.59-6.82-87.6-19.54-128H682.67a212.372 212.372 0 0 1 42.67 128c.06 38.71-10.45 76.7-30.42 109.87l-182.91 316.8c235.65-.01 426.66-191.02 426.66-426.67z"}),E("path",{fill:"currentColor",d:"M576.79 401.63a127.92 127.92 0 0 0-63.56-17.6c-22.36-.22-44.39 5.43-63.89 16.38s-35.79 26.82-47.25 46.02a128.005 128.005 0 0 0-2.16 127.44l1.24 2.13a127.906 127.906 0 0 0 46.36 46.61 127.907 127.907 0 0 0 63.38 17.44c22.29.2 44.24-5.43 63.68-16.33a127.94 127.94 0 0 0 47.16-45.79v-.01l1.11-1.92a127.984 127.984 0 0 0 .29-127.46 127.957 127.957 0 0 0-46.36-46.91"}),E("path",{fill:"currentColor",d:"M394.45 333.96A213.336 213.336 0 0 1 512 298.67h369.58A426.503 426.503 0 0 0 512 85.34a425.598 425.598 0 0 0-171.74 35.98 425.644 425.644 0 0 0-142.62 102.22l118.14 204.63a213.397 213.397 0 0 1 78.67-94.21m117.56 604.72H512zm-97.25-236.73a213.284 213.284 0 0 1-89.54-86.81L142.48 298.6c-36.35 62.81-57.13 135.68-57.13 213.42 0 203.81 142.93 374.22 333.95 416.55h.04l118.19-204.71a213.315 213.315 0 0 1-122.77-21.91z"})]))}}),$O=TO,MO=N({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),N3=MO,AO=N({name:"CircleCheck",__name:"circle-check",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),zd=AO,zO=N({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Id=zO,IO=N({name:"CircleClose",__name:"circle-close",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),hn=IO,OO=N({name:"CirclePlusFilled",__name:"circle-plus-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"})]))}}),NO=OO,PO=N({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),RO=PO,LO=N({name:"Clock",__name:"clock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),ph=LO,BO=N({name:"CloseBold",__name:"close-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}}),VO=BO,DO=N({name:"Close",__name:"close",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Jr=DO,HO=N({name:"Cloudy",__name:"cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M598.4 831.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 831.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 381.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"})]))}}),FO=HO,jO=N({name:"CoffeeCup",__name:"coffee-cup",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 192a192 192 0 1 1-8 383.808A256.128 256.128 0 0 1 512 768H320A256 256 0 0 1 64 512V160a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v256a128 128 0 1 0 0-256M96 832h640a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-640v320a192 192 0 0 0 192 192h192a192 192 0 0 0 192-192V192z"})]))}}),KO=jO,UO=N({name:"Coffee",__name:"coffee",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M822.592 192h14.272a32 32 0 0 1 31.616 26.752l21.312 128A32 32 0 0 1 858.24 384h-49.344l-39.04 546.304A32 32 0 0 1 737.92 960H285.824a32 32 0 0 1-32-29.696L214.912 384H165.76a32 32 0 0 1-31.552-37.248l21.312-128A32 32 0 0 1 187.136 192h14.016l-6.72-93.696A32 32 0 0 1 226.368 64h571.008a32 32 0 0 1 31.936 34.304zm-64.128 0 4.544-64H260.736l4.544 64h493.184m-548.16 128H820.48l-10.688-64H214.208l-10.688 64h6.784m68.736 64 36.544 512H708.16l36.544-512z"})]))}}),WO=UO,qO=N({name:"Coin",__name:"coin",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m161.92 580.736 29.888 58.88C171.328 659.776 160 681.728 160 704c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 615.808 928 657.664 928 704c0 129.728-188.544 224-416 224S96 833.728 96 704c0-46.592 24.32-88.576 65.92-123.264z"}),E("path",{fill:"currentColor",d:"m161.92 388.736 29.888 58.88C171.328 467.84 160 489.792 160 512c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 423.808 928 465.664 928 512c0 129.728-188.544 224-416 224S96 641.728 96 512c0-46.592 24.32-88.576 65.92-123.264z"}),E("path",{fill:"currentColor",d:"M512 544c-227.456 0-416-94.272-416-224S284.544 96 512 96s416 94.272 416 224-188.544 224-416 224m0-64c196.672 0 352-77.696 352-160S708.672 160 512 160s-352 77.696-352 160 155.328 160 352 160"})]))}}),YO=qO,GO=N({name:"ColdDrink",__name:"cold-drink",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 64a192 192 0 1 1-69.952 370.88L480 725.376V896h96a32 32 0 1 1 0 64H320a32 32 0 1 1 0-64h96V725.376L76.8 273.536a64 64 0 0 1-12.8-38.4v-10.688a32 32 0 0 1 32-32h71.808l-65.536-83.84a32 32 0 0 1 50.432-39.424l96.256 123.264h337.728A192.064 192.064 0 0 1 768 64M656.896 192.448H800a32 32 0 0 1 32 32v10.624a64 64 0 0 1-12.8 38.4l-80.448 107.2a128 128 0 1 0-81.92-188.16v-.064zm-357.888 64 129.472 165.76a32 32 0 0 1-50.432 39.36l-160.256-205.12H144l304 404.928 304-404.928z"})]))}}),XO=GO,ZO=N({name:"CollectionTag",__name:"collection-tag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 128v698.88l196.032-156.864a96 96 0 0 1 119.936 0L768 826.816V128zm-32-64h576a32 32 0 0 1 32 32v797.44a32 32 0 0 1-51.968 24.96L531.968 720a32 32 0 0 0-39.936 0L243.968 918.4A32 32 0 0 1 192 893.44V96a32 32 0 0 1 32-32"})]))}}),JO=ZO,QO=N({name:"Collection",__name:"collection",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),E("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),eN=QO,tN=N({name:"Comment",__name:"comment",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),oN=tN,rN=N({name:"Compass",__name:"compass",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"})]))}}),lN=rN,nN=N({name:"Connection",__name:"connection",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 384v64H448a128 128 0 0 0-128 128v128a128 128 0 0 0 128 128h320a128 128 0 0 0 128-128V576a128 128 0 0 0-64-110.848V394.88c74.56 26.368 128 97.472 128 181.056v128a192 192 0 0 1-192 192H448a192 192 0 0 1-192-192V576a192 192 0 0 1 192-192z"}),E("path",{fill:"currentColor",d:"M384 640v-64h192a128 128 0 0 0 128-128V320a128 128 0 0 0-128-128H256a128 128 0 0 0-128 128v128a128 128 0 0 0 64 110.848v70.272A192.064 192.064 0 0 1 64 448V320a192 192 0 0 1 192-192h320a192 192 0 0 1 192 192v128a192 192 0 0 1-192 192z"})]))}}),aN=nN,iN=N({name:"Coordinate",__name:"coordinate",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 512h64v320h-64z"}),E("path",{fill:"currentColor",d:"M192 896h640a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64m64-128h512a128 128 0 0 1 128 128v64H128v-64a128 128 0 0 1 128-128m256-256a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),sN=iN,cN=N({name:"CopyDocument",__name:"copy-document",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),E("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),uN=cN,dN=N({name:"Cpu",__name:"cpu",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32"})]))}}),pN=dN,fN=N({name:"CreditCard",__name:"credit-card",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 324.096c0-42.368-2.496-55.296-9.536-68.48a52.352 52.352 0 0 0-22.144-22.08c-13.12-7.04-26.048-9.536-68.416-9.536H228.096c-42.368 0-55.296 2.496-68.48 9.536a52.352 52.352 0 0 0-22.08 22.144c-7.04 13.12-9.536 26.048-9.536 68.416v375.808c0 42.368 2.496 55.296 9.536 68.48a52.352 52.352 0 0 0 22.144 22.08c13.12 7.04 26.048 9.536 68.416 9.536h567.808c42.368 0 55.296-2.496 68.48-9.536a52.352 52.352 0 0 0 22.08-22.144c7.04-13.12 9.536-26.048 9.536-68.416zm64 0v375.808c0 57.088-5.952 77.76-17.088 98.56-11.136 20.928-27.52 37.312-48.384 48.448-20.864 11.136-41.6 17.088-98.56 17.088H228.032c-57.088 0-77.76-5.952-98.56-17.088a116.288 116.288 0 0 1-48.448-48.384c-11.136-20.864-17.088-41.6-17.088-98.56V324.032c0-57.088 5.952-77.76 17.088-98.56 11.136-20.928 27.52-37.312 48.384-48.448 20.864-11.136 41.6-17.088 98.56-17.088H795.84c57.088 0 77.76 5.952 98.56 17.088 20.928 11.136 37.312 27.52 48.448 48.384 11.136 20.864 17.088 41.6 17.088 98.56z"}),E("path",{fill:"currentColor",d:"M64 320h896v64H64zm0 128h896v64H64zm128 192h256v64H192z"})]))}}),hN=fN,vN=N({name:"Crop",__name:"crop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768h672a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V96a32 32 0 0 1 64 0z"}),E("path",{fill:"currentColor",d:"M832 224v704a32 32 0 1 1-64 0V256H96a32 32 0 0 1 0-64h704a32 32 0 0 1 32 32"})]))}}),mN=vN,gN=N({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Ra=gN,bN=N({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),La=bN,_N=N({name:"DCaret",__name:"d-caret",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}}),wN=_N,yN=N({name:"DataAnalysis",__name:"data-analysis",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m665.216 768 110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32l110.848-192H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32zM832 192H192v512h640zM352 448a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0v-64a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0V416a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V352a32 32 0 0 1 32-32"})]))}}),xN=yN,kN=N({name:"DataBoard",__name:"data-board",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M32 128h960v64H32z"}),E("path",{fill:"currentColor",d:"M192 192v512h640V192zm-64-64h768v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),E("path",{fill:"currentColor",d:"M322.176 960H248.32l144.64-250.56 55.424 32zm453.888 0h-73.856L576 741.44l55.424-32z"})]))}}),CN=kN,SN=N({name:"DataLine",__name:"data-line",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"})]))}}),EN=SN,TN=N({name:"DeleteFilled",__name:"delete-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),$N=TN,MN=N({name:"DeleteLocation",__name:"delete-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M384 384h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),AN=MN,zN=N({name:"Delete",__name:"delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),P3=zN,IN=N({name:"Dessert",__name:"dessert",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 416v-48a144 144 0 0 1 168.64-141.888 224.128 224.128 0 0 1 430.72 0A144 144 0 0 1 896 368v48a384 384 0 0 1-352 382.72V896h-64v-97.28A384 384 0 0 1 128 416m287.104-32.064h193.792a143.808 143.808 0 0 1 58.88-132.736 160.064 160.064 0 0 0-311.552 0 143.808 143.808 0 0 1 58.88 132.8zm-72.896 0a72 72 0 1 0-140.48 0h140.48m339.584 0h140.416a72 72 0 1 0-140.48 0zM512 736a320 320 0 0 0 318.4-288.064H193.6A320 320 0 0 0 512 736M384 896.064h256a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64"})]))}}),ON=IN,NN=N({name:"Discount",__name:"discount",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 704h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0L224 318.336zm0 64v128h576V768zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),PN=NN,RN=N({name:"DishDot",__name:"dish-dot",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m384.064 274.56.064-50.688A128 128 0 0 1 512.128 96c70.528 0 127.68 57.152 127.68 127.68v50.752A448.192 448.192 0 0 1 955.392 768H68.544A448.192 448.192 0 0 1 384 274.56zM96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-128h768a384 384 0 1 0-768 0m447.808-448v-32.32a63.68 63.68 0 0 0-63.68-63.68 64 64 0 0 0-64 63.936V256z"})]))}}),LN=RN,BN=N({name:"Dish",__name:"dish",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 257.152V192h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64h-96v65.152A448 448 0 0 1 955.52 768H68.48A448 448 0 0 1 480 257.152M128 704h768a384 384 0 1 0-768 0M96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64"})]))}}),VN=BN,DN=N({name:"DocumentAdd",__name:"document-add",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z"})]))}}),HN=DN,FN=N({name:"DocumentChecked",__name:"document-checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m318.4 582.144 180.992-180.992L704.64 510.4 478.4 736.64 320 578.304l45.248-45.312z"})]))}}),jN=FN,KN=N({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),UN=KN,WN=N({name:"DocumentDelete",__name:"document-delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m308.992 546.304-90.496-90.624 45.248-45.248 90.56 90.496 90.496-90.432 45.248 45.248-90.496 90.56 90.496 90.496-45.248 45.248-90.496-90.496-90.56 90.496-45.248-45.248 90.496-90.496z"})]))}}),qN=WN,YN=N({name:"DocumentRemove",__name:"document-remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m192 512h320v64H352z"})]))}}),GN=YN,XN=N({name:"Document",__name:"document",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),R3=XN,ZN=N({name:"Download",__name:"download",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),JN=ZN,QN=N({name:"Drizzling",__name:"drizzling",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M288 800h64v64h-64zm192 0h64v64h-64zm-96 96h64v64h-64zm192 0h64v64h-64zm96-96h64v64h-64z"})]))}}),eP=QN,tP=N({name:"EditPen",__name:"edit-pen",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),oP=tP,rP=N({name:"Edit",__name:"edit",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),E("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),lP=rP,nP=N({name:"ElemeFilled",__name:"eleme-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 64h672c61.824 0 112 50.176 112 112v672a112 112 0 0 1-112 112H176A112 112 0 0 1 64 848V176c0-61.824 50.176-112 112-112m150.528 173.568c-152.896 99.968-196.544 304.064-97.408 456.96a330.688 330.688 0 0 0 456.96 96.64c9.216-5.888 17.6-11.776 25.152-18.56a18.24 18.24 0 0 0 4.224-24.32L700.352 724.8a47.552 47.552 0 0 0-65.536-14.272A234.56 234.56 0 0 1 310.592 641.6C240 533.248 271.104 387.968 379.456 316.48a234.304 234.304 0 0 1 276.352 15.168c1.664.832 2.56 2.56 3.392 4.224 5.888 8.384 3.328 19.328-5.12 25.216L456.832 489.6a47.552 47.552 0 0 0-14.336 65.472l16 24.384c5.888 8.384 16.768 10.88 25.216 5.056l308.224-199.936a19.584 19.584 0 0 0 6.72-23.488v-.896c-4.992-9.216-10.048-17.6-15.104-26.88-99.968-151.168-304.064-194.88-456.96-95.744zM786.88 504.704l-62.208 40.32c-8.32 5.888-10.88 16.768-4.992 25.216L760 632.32c5.888 8.448 16.768 11.008 25.152 5.12l31.104-20.16a55.36 55.36 0 0 0 16-76.48l-20.224-31.04a19.52 19.52 0 0 0-25.152-5.12z"})]))}}),aP=nP,iP=N({name:"Eleme",__name:"eleme",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M300.032 188.8c174.72-113.28 408-63.36 522.24 109.44 5.76 10.56 11.52 20.16 17.28 30.72v.96a22.4 22.4 0 0 1-7.68 26.88l-352.32 228.48c-9.6 6.72-22.08 3.84-28.8-5.76l-18.24-27.84a54.336 54.336 0 0 1 16.32-74.88l225.6-146.88c9.6-6.72 12.48-19.2 5.76-28.8-.96-1.92-1.92-3.84-3.84-4.8a267.84 267.84 0 0 0-315.84-17.28c-123.84 81.6-159.36 247.68-78.72 371.52a268.096 268.096 0 0 0 370.56 78.72 54.336 54.336 0 0 1 74.88 16.32l17.28 26.88c5.76 9.6 3.84 21.12-4.8 27.84-8.64 7.68-18.24 14.4-28.8 21.12a377.92 377.92 0 0 1-522.24-110.4c-113.28-174.72-63.36-408 111.36-522.24zm526.08 305.28a22.336 22.336 0 0 1 28.8 5.76l23.04 35.52a63.232 63.232 0 0 1-18.24 87.36l-35.52 23.04c-9.6 6.72-22.08 3.84-28.8-5.76l-46.08-71.04c-6.72-9.6-3.84-22.08 5.76-28.8l71.04-46.08z"})]))}}),sP=iP,cP=N({name:"ElementPlus",__name:"element-plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M839.7 734.7c0 33.3-17.9 41-17.9 41S519.7 949.8 499.2 960c-10.2 5.1-20.5 5.1-30.7 0 0 0-314.9-184.3-325.1-192-5.1-5.1-10.2-12.8-12.8-20.5V368.6c0-17.9 20.5-28.2 20.5-28.2L466 158.6c12.8-5.1 25.6-5.1 38.4 0 0 0 279 161.3 309.8 179.2 17.9 7.7 28.2 25.6 25.6 46.1-.1-5-.1 317.5-.1 350.8M714.2 371.2c-64-35.8-217.6-125.4-217.6-125.4-7.7-5.1-20.5-5.1-30.7 0L217.6 389.1s-17.9 10.2-17.9 23v297c0 5.1 5.1 12.8 7.7 17.9 7.7 5.1 256 148.5 256 148.5 7.7 5.1 17.9 5.1 25.6 0 15.4-7.7 250.9-145.9 250.9-145.9s12.8-5.1 12.8-30.7v-74.2l-276.5 169v-64c0-17.9 7.7-30.7 20.5-46.1L745 535c5.1-7.7 10.2-20.5 10.2-30.7v-66.6l-279 169v-69.1c0-15.4 5.1-30.7 17.9-38.4l220.1-128zM919 135.7c0-5.1-5.1-7.7-7.7-7.7h-58.9V66.6c0-5.1-5.1-5.1-10.2-5.1l-30.7 5.1c-5.1 0-5.1 2.6-5.1 5.1V128h-56.3c-5.1 0-5.1 5.1-7.7 5.1v38.4h69.1v64c0 5.1 5.1 5.1 10.2 5.1l30.7-5.1c5.1 0 5.1-2.6 5.1-5.1v-56.3h64l-2.5-38.4z"})]))}}),uP=cP,dP=N({name:"Expand",__name:"expand",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),pP=dP,fP=N({name:"Failed",__name:"failed",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m557.248 608 135.744-135.744-45.248-45.248-135.68 135.744-135.808-135.68-45.248 45.184L466.752 608l-135.68 135.68 45.184 45.312L512 653.248l135.744 135.744 45.248-45.248L557.312 608zM704 192h160v736H160V192h160v64h384zm-320 0V96h256v96z"})]))}}),hP=fP,vP=N({name:"Female",__name:"female",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 640a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M512 640q32 0 32 32v256q0 32-32 32t-32-32V672q0-32 32-32"}),E("path",{fill:"currentColor",d:"M352 800h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}}),mP=vP,gP=N({name:"Files",__name:"files",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384v448h768V384zm-32-64h832a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32m64-128h704v64H160zm96-128h512v64H256z"})]))}}),bP=gP,_P=N({name:"Film",__name:"film",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M320 288V128h64v352h256V128h64v160h160v64H704v128h160v64H704v128h160v64H704v160h-64V544H384v352h-64V736H128v-64h192V544H128v-64h192V352H128v-64z"})]))}}),wP=_P,yP=N({name:"Filter",__name:"filter",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z"})]))}}),xP=yP,kP=N({name:"Finished",__name:"finished",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),CP=kP,SP=N({name:"FirstAidKit",__name:"first-aid-kit",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 256a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M544 512h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0zM352 128v64h320v-64zm-32-64h384a32 32 0 0 1 32 32v128a32 32 0 0 1-32 32H320a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"})]))}}),EP=SP,TP=N({name:"Flag",__name:"flag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 128h608L736 384l160 256H288v320h-96V64h96z"})]))}}),$P=TP,MP=N({name:"Fold",__name:"fold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384 128 512l192 128z"})]))}}),AP=MP,zP=N({name:"FolderAdd",__name:"folder-add",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m384 416V416h64v128h128v64H544v128h-64V608H352v-64z"})]))}}),IP=zP,OP=N({name:"FolderChecked",__name:"folder-checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m414.08 502.144 180.992-180.992L736.32 494.4 510.08 720.64l-158.4-158.336 45.248-45.312z"})]))}}),NP=OP,PP=N({name:"FolderDelete",__name:"folder-delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m370.752 448-90.496-90.496 45.248-45.248L512 530.752l90.496-90.496 45.248 45.248L557.248 576l90.496 90.496-45.248 45.248L512 621.248l-90.496 90.496-45.248-45.248z"})]))}}),RP=PP,LP=N({name:"FolderOpened",__name:"folder-opened",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"})]))}}),BP=LP,VP=N({name:"FolderRemove",__name:"folder-remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m256 416h320v64H352z"})]))}}),DP=VP,HP=N({name:"Folder",__name:"folder",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"})]))}}),FP=HP,jP=N({name:"Food",__name:"food",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 352.576V352a288 288 0 0 1 491.072-204.224 192 192 0 0 1 274.24 204.48 64 64 0 0 1 57.216 74.24C921.6 600.512 850.048 710.656 736 756.992V800a96 96 0 0 1-96 96H384a96 96 0 0 1-96-96v-43.008c-114.048-46.336-185.6-156.48-214.528-330.496A64 64 0 0 1 128 352.64zm64-.576h64a160 160 0 0 1 320 0h64a224 224 0 0 0-448 0m128 0h192a96 96 0 0 0-192 0m439.424 0h68.544A128.256 128.256 0 0 0 704 192c-15.36 0-29.952 2.688-43.52 7.616 11.328 18.176 20.672 37.76 27.84 58.304A64.128 64.128 0 0 1 759.424 352M672 768H352v32a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32zm-342.528-64h365.056c101.504-32.64 165.76-124.928 192.896-288H136.576c27.136 163.072 91.392 255.36 192.896 288"})]))}}),KP=jP,UP=N({name:"Football",__name:"football",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-64a384 384 0 1 0 0-768 384 384 0 0 0 0 768"}),E("path",{fill:"currentColor",d:"M186.816 268.288c16-16.384 31.616-31.744 46.976-46.08 17.472 30.656 39.808 58.112 65.984 81.28l-32.512 56.448a385.984 385.984 0 0 1-80.448-91.648zm653.696-5.312a385.92 385.92 0 0 1-83.776 96.96l-32.512-56.384a322.923 322.923 0 0 0 68.48-85.76c15.552 14.08 31.488 29.12 47.808 45.184zM465.984 445.248l11.136-63.104a323.584 323.584 0 0 0 69.76 0l11.136 63.104a387.968 387.968 0 0 1-92.032 0m-62.72-12.8A381.824 381.824 0 0 1 320 396.544l32-55.424a319.885 319.885 0 0 0 62.464 27.712l-11.2 63.488zm300.8-35.84a381.824 381.824 0 0 1-83.328 35.84l-11.2-63.552A319.885 319.885 0 0 0 672 341.184l32 55.424zm-520.768 364.8a385.92 385.92 0 0 1 83.968-97.28l32.512 56.32c-26.88 23.936-49.856 52.352-67.52 84.032-16-13.44-32.32-27.712-48.96-43.072zm657.536.128a1442.759 1442.759 0 0 1-49.024 43.072 321.408 321.408 0 0 0-67.584-84.16l32.512-56.32c33.216 27.456 61.696 60.352 84.096 97.408zM465.92 578.752a387.968 387.968 0 0 1 92.032 0l-11.136 63.104a323.584 323.584 0 0 0-69.76 0zm-62.72 12.8 11.2 63.552a319.885 319.885 0 0 0-62.464 27.712L320 627.392a381.824 381.824 0 0 1 83.264-35.84zm300.8 35.84-32 55.424a318.272 318.272 0 0 0-62.528-27.712l11.2-63.488c29.44 8.64 57.28 20.736 83.264 35.776z"})]))}}),WP=UP,qP=N({name:"ForkSpoon",__name:"fork-spoon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 410.304V96a32 32 0 0 1 64 0v314.304a96 96 0 0 0 64-90.56V96a32 32 0 0 1 64 0v223.744a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.544a160 160 0 0 1-128-156.8V96a32 32 0 0 1 64 0v223.744a96 96 0 0 0 64 90.56zM672 572.48C581.184 552.128 512 446.848 512 320c0-141.44 85.952-256 192-256s192 114.56 192 256c0 126.848-69.184 232.128-160 252.48V928a32 32 0 1 1-64 0zM704 512c66.048 0 128-82.56 128-192s-61.952-192-128-192-128 82.56-128 192 61.952 192 128 192"})]))}}),YP=qP,GP=N({name:"Fries",__name:"fries",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M608 224v-64a32 32 0 0 0-64 0v336h26.88A64 64 0 0 0 608 484.096zm101.12 160A64 64 0 0 0 672 395.904V384h64V224a32 32 0 1 0-64 0v160zm74.88 0a92.928 92.928 0 0 1 91.328 110.08l-60.672 323.584A96 96 0 0 1 720.32 896H303.68a96 96 0 0 1-94.336-78.336L148.672 494.08A92.928 92.928 0 0 1 240 384h-16V224a96 96 0 0 1 188.608-25.28A95.744 95.744 0 0 1 480 197.44V160a96 96 0 0 1 188.608-25.28A96 96 0 0 1 800 224v160zM670.784 512a128 128 0 0 1-99.904 48H453.12a128 128 0 0 1-99.84-48H352v-1.536a128.128 128.128 0 0 1-9.984-14.976L314.88 448H240a28.928 28.928 0 0 0-28.48 34.304L241.088 640h541.824l29.568-157.696A28.928 28.928 0 0 0 784 448h-74.88l-27.136 47.488A132.405 132.405 0 0 1 672 510.464V512zM480 288a32 32 0 0 0-64 0v196.096A64 64 0 0 0 453.12 496H480zm-128 96V224a32 32 0 0 0-64 0v160zh-37.12A64 64 0 0 1 352 395.904zm-98.88 320 19.072 101.888A32 32 0 0 0 303.68 832h416.64a32 32 0 0 0 31.488-26.112L770.88 704z"})]))}}),XP=GP,ZP=N({name:"FullScreen",__name:"full-screen",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),L3=ZP,JP=N({name:"GobletFull",__name:"goblet-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 320h512c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320m503.936 64H264.064a256.128 256.128 0 0 0 495.872 0zM544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4"})]))}}),QP=JP,eR=N({name:"GobletSquareFull",__name:"goblet-square-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 270.912c10.048 6.72 22.464 14.912 28.992 18.624a220.16 220.16 0 0 0 114.752 30.72c30.592 0 49.408-9.472 91.072-41.152l.64-.448c52.928-40.32 82.368-55.04 132.288-54.656 55.552.448 99.584 20.8 142.72 57.408l1.536 1.28V128H256v142.912zm.96 76.288C266.368 482.176 346.88 575.872 512 576c157.44.064 237.952-85.056 253.248-209.984a952.32 952.32 0 0 1-40.192-35.712c-32.704-27.776-63.36-41.92-101.888-42.24-31.552-.256-50.624 9.28-93.12 41.6l-.576.448c-52.096 39.616-81.024 54.208-129.792 54.208-54.784 0-100.48-13.376-142.784-37.056zM480 638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96z"})]))}}),tR=eR,oR=N({name:"GobletSquare",__name:"goblet-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 638.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912M256 319.68c0 149.568 80 256.192 256 256.256C688.128 576 768 469.568 768 320V128H256z"})]))}}),rR=oR,lR=N({name:"Goblet",__name:"goblet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4M256 320a256 256 0 1 0 512 0c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320"})]))}}),nR=lR,aR=N({name:"GoldMedal",__name:"gold-medal",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m772.13 452.84 53.86-351.81c1.32-10.01-1.17-18.68-7.49-26.02S804.35 64 795.01 64H228.99v-.01h-.06c-9.33 0-17.15 3.67-23.49 11.01s-8.83 16.01-7.49 26.02l53.87 351.89C213.54 505.73 193.59 568.09 192 640c2 90.67 33.17 166.17 93.5 226.5S421.33 957.99 512 960c90.67-2 166.17-33.17 226.5-93.5 60.33-60.34 91.49-135.83 93.5-226.5-1.59-71.94-21.56-134.32-59.87-187.16zM640.01 128h117.02l-39.01 254.02c-20.75-10.64-40.74-19.73-59.94-27.28-5.92-3-11.95-5.8-18.08-8.41V128h.01zM576 128v198.76c-13.18-2.58-26.74-4.43-40.67-5.55-8.07-.8-15.85-1.2-23.33-1.2-10.54 0-21.09.66-31.64 1.96a359.844 359.844 0 0 0-32.36 4.79V128zm-192 0h.04v218.3c-6.22 2.66-12.34 5.5-18.36 8.56-19.13 7.54-39.02 16.6-59.66 27.16L267.01 128zm308.99 692.99c-48 48-108.33 73-180.99 75.01-72.66-2.01-132.99-27.01-180.99-75.01S258.01 712.66 256 640c2.01-72.66 27.01-132.99 75.01-180.99 19.67-19.67 41.41-35.47 65.22-47.41 38.33-15.04 71.15-23.92 98.44-26.65 5.07-.41 10.2-.7 15.39-.88.63-.01 1.28-.03 1.91-.03.66 0 1.35.03 2.02.04 5.11.17 10.15.46 15.13.86 27.4 2.71 60.37 11.65 98.91 26.79 23.71 11.93 45.36 27.69 64.96 47.29 48 48 73 108.33 75.01 180.99-2.01 72.65-27.01 132.98-75.01 180.98z"}),E("path",{fill:"currentColor",d:"M544 480H416v64h64v192h-64v64h192v-64h-64z"})]))}}),iR=aR,sR=N({name:"GoodsFilled",__name:"goods-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 352h640l64 544H128zm128 224h64V448h-64zm320 0h64V448h-64zM384 288h-64a192 192 0 1 1 384 0h-64a128 128 0 1 0-256 0"})]))}}),cR=sR,uR=N({name:"Goods",__name:"goods",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 288v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4h131.072a32 32 0 0 1 31.808 28.8l57.6 576a32 32 0 0 1-31.808 35.2H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320zm64 0h256v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4zm-64 64H217.92l-51.2 512h690.56l-51.264-512H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0z"})]))}}),dR=uR,pR=N({name:"Grape",__name:"grape",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 195.2a160 160 0 0 1 96 60.8 160 160 0 1 1 146.24 254.976 160 160 0 0 1-128 224 160 160 0 1 1-292.48 0 160 160 0 0 1-128-224A160 160 0 1 1 384 256a160 160 0 0 1 96-60.8V128h-64a32 32 0 0 1 0-64h192a32 32 0 0 1 0 64h-64zM512 448a96 96 0 1 0 0-192 96 96 0 0 0 0 192m-256 0a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),fR=pR,hR=N({name:"Grid",__name:"grid",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),vR=hR,mR=N({name:"Guide",__name:"guide",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),E("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),gR=mR,bR=N({name:"Handbag",__name:"handbag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M887.01 264.99c-6-5.99-13.67-8.99-23.01-8.99H704c-1.34-54.68-20.01-100.01-56-136s-81.32-54.66-136-56c-54.68 1.34-100.01 20.01-136 56s-54.66 81.32-56 136H160c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.67-8.99 23.01v640c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V288c0-9.35-2.99-17.02-8.99-23.01M421.5 165.5c24.32-24.34 54.49-36.84 90.5-37.5 35.99.68 66.16 13.18 90.5 37.5s36.84 54.49 37.5 90.5H384c.68-35.99 13.18-66.16 37.5-90.5M832 896H192V320h128v128h64V320h256v128h64V320h128z"})]))}}),_R=bR,wR=N({name:"Headset",__name:"headset",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 529.152V512a384 384 0 1 0-768 0v17.152A128 128 0 0 1 320 640v128a128 128 0 1 1-256 0V512a448 448 0 1 1 896 0v256a128 128 0 1 1-256 0V640a128 128 0 0 1 192-110.848M896 640a64 64 0 0 0-128 0v128a64 64 0 0 0 128 0zm-768 0v128a64 64 0 0 0 128 0V640a64 64 0 1 0-128 0"})]))}}),yR=wR,xR=N({name:"HelpFilled",__name:"help-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M926.784 480H701.312A192.512 192.512 0 0 0 544 322.688V97.216A416.064 416.064 0 0 1 926.784 480m0 64A416.064 416.064 0 0 1 544 926.784V701.312A192.512 192.512 0 0 0 701.312 544zM97.28 544h225.472A192.512 192.512 0 0 0 480 701.312v225.472A416.064 416.064 0 0 1 97.216 544zm0-64A416.064 416.064 0 0 1 480 97.216v225.472A192.512 192.512 0 0 0 322.688 480H97.216z"})]))}}),kR=xR,CR=N({name:"Help",__name:"help",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m759.936 805.248-90.944-91.008A254.912 254.912 0 0 1 512 768a254.912 254.912 0 0 1-156.992-53.76l-90.944 91.008A382.464 382.464 0 0 0 512 896c94.528 0 181.12-34.176 247.936-90.752m45.312-45.312A382.464 382.464 0 0 0 896 512c0-94.528-34.176-181.12-90.752-247.936l-91.008 90.944C747.904 398.4 768 452.864 768 512c0 59.136-20.096 113.6-53.76 156.992l91.008 90.944zm-45.312-541.184A382.464 382.464 0 0 0 512 128c-94.528 0-181.12 34.176-247.936 90.752l90.944 91.008A254.912 254.912 0 0 1 512 256c59.136 0 113.6 20.096 156.992 53.76l90.944-91.008zm-541.184 45.312A382.464 382.464 0 0 0 128 512c0 94.528 34.176 181.12 90.752 247.936l91.008-90.944A254.912 254.912 0 0 1 256 512c0-59.136 20.096-113.6 53.76-156.992zm417.28 394.496a194.56 194.56 0 0 0 22.528-22.528C686.912 602.56 704 559.232 704 512a191.232 191.232 0 0 0-67.968-146.56A191.296 191.296 0 0 0 512 320a191.232 191.232 0 0 0-146.56 67.968C337.088 421.44 320 464.768 320 512a191.232 191.232 0 0 0 67.968 146.56C421.44 686.912 464.768 704 512 704c47.296 0 90.56-17.088 124.032-45.44zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),SR=CR,ER=N({name:"Hide",__name:"hide",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),E("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),B3=ER,TR=N({name:"Histogram",__name:"histogram",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),$R=TR,MR=N({name:"HomeFilled",__name:"home-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),AR=MR,zR=N({name:"HotWater",__name:"hot-water",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.067 477.867h477.866V409.6H273.067zm0 68.266v51.2A187.733 187.733 0 0 0 460.8 785.067h102.4a187.733 187.733 0 0 0 187.733-187.734v-51.2H273.067zm-34.134-204.8h546.134a34.133 34.133 0 0 1 34.133 34.134v221.866a256 256 0 0 1-256 256H460.8a256 256 0 0 1-256-256V375.467a34.133 34.133 0 0 1 34.133-34.134zM512 34.133a34.133 34.133 0 0 1 34.133 34.134v170.666a34.133 34.133 0 0 1-68.266 0V68.267A34.133 34.133 0 0 1 512 34.133zM375.467 102.4a34.133 34.133 0 0 1 34.133 34.133v102.4a34.133 34.133 0 0 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.134-34.133m273.066 0a34.133 34.133 0 0 1 34.134 34.133v102.4a34.133 34.133 0 1 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.133-34.133M170.667 921.668h682.666a34.133 34.133 0 1 1 0 68.267H170.667a34.133 34.133 0 1 1 0-68.267z"})]))}}),IR=zR,OR=N({name:"House",__name:"house",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 413.952V896h640V413.952L512 147.328zM139.52 374.4l352-293.312a32 32 0 0 1 40.96 0l352 293.312A32 32 0 0 1 896 398.976V928a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V398.976a32 32 0 0 1 11.52-24.576"})]))}}),NR=OR,PR=N({name:"IceCreamRound",__name:"ice-cream-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m308.352 489.344 226.304 226.304a32 32 0 0 0 45.248 0L783.552 512A192 192 0 1 0 512 240.448L308.352 444.16a32 32 0 0 0 0 45.248zm135.744 226.304L308.352 851.392a96 96 0 0 1-135.744-135.744l135.744-135.744-45.248-45.248a96 96 0 0 1 0-135.808L466.752 195.2A256 256 0 0 1 828.8 557.248L625.152 760.96a96 96 0 0 1-135.808 0l-45.248-45.248zM398.848 670.4 353.6 625.152 217.856 760.896a32 32 0 0 0 45.248 45.248zm248.96-384.64a32 32 0 0 1 0 45.248L466.624 512a32 32 0 1 1-45.184-45.248l180.992-181.056a32 32 0 0 1 45.248 0zm90.496 90.496a32 32 0 0 1 0 45.248L557.248 602.496A32 32 0 1 1 512 557.248l180.992-180.992a32 32 0 0 1 45.312 0z"})]))}}),RR=PR,LR=N({name:"IceCreamSquare",__name:"ice-cream-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 640h256a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32H352a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32zm192 64v160a96 96 0 0 1-192 0V704h-64a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96h320a96 96 0 0 1 96 96v448a96 96 0 0 1-96 96zm-64 0h-64v160a32 32 0 1 0 64 0z"})]))}}),BR=LR,VR=N({name:"IceCream",__name:"ice-cream",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128.64 448a208 208 0 0 1 193.536-191.552 224 224 0 0 1 445.248 15.488A208.128 208.128 0 0 1 894.784 448H896L548.8 983.68a32 32 0 0 1-53.248.704L128 448zm64.256 0h286.208a144 144 0 0 0-286.208 0zm351.36 0h286.272a144 144 0 0 0-286.272 0zm-294.848 64 271.808 396.608L778.24 512H249.408zM511.68 352.64a207.872 207.872 0 0 1 189.184-96.192 160 160 0 0 0-314.752 5.632c52.608 12.992 97.28 46.08 125.568 90.56"})]))}}),DR=VR,HR=N({name:"IceDrink",__name:"ice-drink",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 448v128h239.68l16.064-128zm-64 0H256.256l16.064 128H448zm64-255.36V384h247.744A256.128 256.128 0 0 0 512 192.64m-64 8.064A256.448 256.448 0 0 0 264.256 384H448zm64-72.064A320.128 320.128 0 0 1 825.472 384H896a32 32 0 1 1 0 64h-64v1.92l-56.96 454.016A64 64 0 0 1 711.552 960H312.448a64 64 0 0 1-63.488-56.064L192 449.92V448h-64a32 32 0 0 1 0-64h70.528A320.384 320.384 0 0 1 448 135.04V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H544a32 32 0 0 0-32 32zM743.68 640H280.32l32.128 256h399.104z"})]))}}),FR=HR,jR=N({name:"IceTea",__name:"ice-tea",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M197.696 259.648a320.128 320.128 0 0 1 628.608 0A96 96 0 0 1 896 352v64a96 96 0 0 1-71.616 92.864l-49.408 395.072A64 64 0 0 1 711.488 960H312.512a64 64 0 0 1-63.488-56.064l-49.408-395.072A96 96 0 0 1 128 416v-64a96 96 0 0 1 69.696-92.352M264.064 256h495.872a256.128 256.128 0 0 0-495.872 0m495.424 256H264.512l48 384h398.976zM224 448h576a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32H224a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32m160 192h64v64h-64zm192 64h64v64h-64zm-128 64h64v64h-64zm64-192h64v64h-64z"})]))}}),KR=jR,UR=N({name:"InfoFilled",__name:"info-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Od=UR,WR=N({name:"Iphone",__name:"iphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),qR=WR,YR=N({name:"Key",__name:"key",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),GR=YR,XR=N({name:"KnifeFork",__name:"knife-fork",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 410.56V96a32 32 0 0 1 64 0v314.56A96 96 0 0 0 384 320V96a32 32 0 0 1 64 0v224a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.8A160 160 0 0 1 128 320V96a32 32 0 0 1 64 0v224a96 96 0 0 0 64 90.56m384-250.24V544h126.72c-3.328-78.72-12.928-147.968-28.608-207.744-14.336-54.528-46.848-113.344-98.112-175.872zM640 608v320a32 32 0 1 1-64 0V64h64c85.312 89.472 138.688 174.848 160 256 21.312 81.152 32 177.152 32 288z"})]))}}),ZR=XR,JR=N({name:"Lightning",__name:"lightning",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 671.36v64.128A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 736 734.016v-64.768a192 192 0 0 0 3.328-377.92l-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 91.968 70.464 167.36 160.256 175.232z"}),E("path",{fill:"currentColor",d:"M416 736a32 32 0 0 1-27.776-47.872l128-224a32 32 0 1 1 55.552 31.744L471.168 672H608a32 32 0 0 1 27.776 47.872l-128 224a32 32 0 1 1-55.68-31.744L552.96 736z"})]))}}),QR=JR,eL=N({name:"Link",__name:"link",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),tL=eL,oL=N({name:"List",__name:"list",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"})]))}}),rL=oL,lL=N({name:"Loading",__name:"loading",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),vn=lL,nL=N({name:"LocationFilled",__name:"location-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 928c23.936 0 117.504-68.352 192.064-153.152C803.456 661.888 864 535.808 864 416c0-189.632-155.84-320-352-320S160 226.368 160 416c0 120.32 60.544 246.4 159.936 359.232C394.432 859.84 488 928 512 928m0-435.2a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 140.8a204.8 204.8 0 1 1 0-409.6 204.8 204.8 0 0 1 0 409.6"})]))}}),aL=nL,iL=N({name:"LocationInformation",__name:"location-information",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}}),sL=iL,cL=N({name:"Location",__name:"location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}}),uL=cL,dL=N({name:"Lock",__name:"lock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),pL=dL,fL=N({name:"Lollipop",__name:"lollipop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M513.28 448a64 64 0 1 1 76.544 49.728A96 96 0 0 0 768 448h64a160 160 0 0 1-320 0zm-126.976-29.696a256 256 0 1 0 43.52-180.48A256 256 0 0 1 832 448h-64a192 192 0 0 0-381.696-29.696m105.664 249.472L285.696 874.048a96 96 0 0 1-135.68-135.744l206.208-206.272a320 320 0 1 1 135.744 135.744zm-54.464-36.032a321.92 321.92 0 0 1-45.248-45.248L195.2 783.552a32 32 0 1 0 45.248 45.248l197.056-197.12z"})]))}}),hL=fL,vL=N({name:"MagicStick",__name:"magic-stick",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64h64v192h-64zm0 576h64v192h-64zM160 480v-64h192v64zm576 0v-64h192v64zM249.856 199.04l45.248-45.184L430.848 289.6 385.6 334.848 249.856 199.104zM657.152 606.4l45.248-45.248 135.744 135.744-45.248 45.248zM114.048 923.2 68.8 877.952l316.8-316.8 45.248 45.248zM702.4 334.848 657.152 289.6l135.744-135.744 45.248 45.248z"})]))}}),mL=vL,gL=N({name:"Magnet",__name:"magnet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 320V192H704v320a192 192 0 1 1-384 0V192H192v128h128v64H192v128a320 320 0 0 0 640 0V384H704v-64zM640 512V128h256v384a384 384 0 1 1-768 0V128h256v384a128 128 0 1 0 256 0"})]))}}),bL=gL,_L=N({name:"Male",__name:"male",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M399.5 849.5a225 225 0 1 0 0-450 225 225 0 0 0 0 450m0 56.25a281.25 281.25 0 1 1 0-562.5 281.25 281.25 0 0 1 0 562.5m253.125-787.5h225q28.125 0 28.125 28.125T877.625 174.5h-225q-28.125 0-28.125-28.125t28.125-28.125"}),E("path",{fill:"currentColor",d:"M877.625 118.25q28.125 0 28.125 28.125v225q0 28.125-28.125 28.125T849.5 371.375v-225q0-28.125 28.125-28.125"}),E("path",{fill:"currentColor",d:"M604.813 458.9 565.1 419.131l292.613-292.668 39.825 39.824z"})]))}}),wL=_L,yL=N({name:"Management",__name:"management",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M576 128v288l96-96 96 96V128h128v768H320V128zm-448 0h128v768H128z"})]))}}),xL=yL,kL=N({name:"MapLocation",__name:"map-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),CL=kL,SL=N({name:"Medal",__name:"medal",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M576 128H448v200a286.72 286.72 0 0 1 64-8c19.52 0 40.832 2.688 64 8zm64 0v219.648c24.448 9.088 50.56 20.416 78.4 33.92L757.44 128zm-256 0H266.624l39.04 253.568c27.84-13.504 53.888-24.832 78.336-33.92V128zM229.312 64h565.376a32 32 0 0 1 31.616 36.864L768 480c-113.792-64-199.104-96-256-96-56.896 0-142.208 32-256 96l-58.304-379.136A32 32 0 0 1 229.312 64"})]))}}),EL=SL,TL=N({name:"Memo",__name:"memo",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),E("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),E("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),$L=TL,ML=N({name:"Menu",__name:"menu",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}}),AL=ML,zL=N({name:"MessageBox",__name:"message-box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 384h448v64H288zm96-128h256v64H384zM131.456 512H384v128h256V512h252.544L721.856 192H302.144zM896 576H704v128H320V576H128v256h768zM275.776 128h472.448a32 32 0 0 1 28.608 17.664l179.84 359.552A32 32 0 0 1 960 519.552V864a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V519.552a32 32 0 0 1 3.392-14.336l179.776-359.552A32 32 0 0 1 275.776 128z"})]))}}),IL=zL,OL=N({name:"Message",__name:"message",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),E("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}}),NL=OL,PL=N({name:"Mic",__name:"mic",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 704h160a64 64 0 0 0 64-64v-32h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-32a64 64 0 0 0-64-64H384a64 64 0 0 0-64 64v32h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v32a64 64 0 0 0 64 64zm64 64v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768h-96a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64h256a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128z"})]))}}),RL=PL,LL=N({name:"Microphone",__name:"microphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128a128 128 0 0 0-128 128v256a128 128 0 1 0 256 0V256a128 128 0 0 0-128-128m0-64a192 192 0 0 1 192 192v256a192 192 0 1 1-384 0V256A192 192 0 0 1 512 64m-32 832v-64a288 288 0 0 1-288-288v-32a32 32 0 0 1 64 0v32a224 224 0 0 0 224 224h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64z"})]))}}),BL=LL,VL=N({name:"MilkTea",__name:"milk-tea",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 128V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H512a32 32 0 0 0-32 32v32h320a96 96 0 0 1 11.712 191.296l-39.68 581.056A64 64 0 0 1 708.224 960H315.776a64 64 0 0 1-63.872-59.648l-39.616-581.056A96 96 0 0 1 224 128zM276.48 320l39.296 576h392.448l4.8-70.784a224.064 224.064 0 0 1 30.016-439.808L747.52 320zM224 256h576a32 32 0 1 0 0-64H224a32 32 0 0 0 0 64m493.44 503.872 21.12-309.12a160 160 0 0 0-21.12 309.12"})]))}}),DL=VL,HL=N({name:"Minus",__name:"minus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),V3=HL,FL=N({name:"Money",__name:"money",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),E("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.056 29.056 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),E("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),jL=FL,KL=N({name:"Monitor",__name:"monitor",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64z"})]))}}),UL=KL,WL=N({name:"MoonNight",__name:"moon-night",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 512a448 448 0 0 1 215.872-383.296A384 384 0 0 0 213.76 640h188.8A448.256 448.256 0 0 1 384 512M171.136 704a448 448 0 0 1 636.992-575.296A384 384 0 0 0 499.328 704h-328.32z"}),E("path",{fill:"currentColor",d:"M32 640h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m128 128h384a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m160 127.68 224 .256a32 32 0 0 1 32 32V928a32 32 0 0 1-32 32l-224-.384a32 32 0 0 1-32-32v-.064a32 32 0 0 1 32-32z"})]))}}),qL=WL,YL=N({name:"Moon",__name:"moon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M240.448 240.448a384 384 0 1 0 559.424 525.696 448 448 0 0 1-542.016-542.08 390.592 390.592 0 0 0-17.408 16.384zm181.056 362.048a384 384 0 0 0 525.632 16.384A448 448 0 1 1 405.056 76.8a384 384 0 0 0 16.448 525.696"})]))}}),GL=YL,XL=N({name:"MoreFilled",__name:"more-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),fh=XL,ZL=N({name:"More",__name:"more",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),D3=ZL,JL=N({name:"MostlyCloudy",__name:"mostly-cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M737.216 357.952 704 349.824l-11.776-32a192.064 192.064 0 0 0-367.424 23.04l-8.96 39.04-39.04 8.96A192.064 192.064 0 0 0 320 768h368a207.808 207.808 0 0 0 207.808-208 208.32 208.32 0 0 0-158.592-202.048m15.168-62.208A272.32 272.32 0 0 1 959.744 560a271.808 271.808 0 0 1-271.552 272H320a256 256 0 0 1-57.536-505.536 256.128 256.128 0 0 1 489.92-30.72"})]))}}),QL=JL,eB=N({name:"Mouse",__name:"mouse",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M438.144 256c-68.352 0-92.736 4.672-117.76 18.112-20.096 10.752-35.52 26.176-46.272 46.272C260.672 345.408 256 369.792 256 438.144v275.712c0 68.352 4.672 92.736 18.112 117.76 10.752 20.096 26.176 35.52 46.272 46.272C345.408 891.328 369.792 896 438.144 896h147.712c68.352 0 92.736-4.672 117.76-18.112 20.096-10.752 35.52-26.176 46.272-46.272C763.328 806.592 768 782.208 768 713.856V438.144c0-68.352-4.672-92.736-18.112-117.76a110.464 110.464 0 0 0-46.272-46.272C678.592 260.672 654.208 256 585.856 256zm0-64h147.712c85.568 0 116.608 8.96 147.904 25.6 31.36 16.768 55.872 41.344 72.576 72.64C823.104 321.536 832 352.576 832 438.08v275.84c0 85.504-8.96 116.544-25.6 147.84a174.464 174.464 0 0 1-72.64 72.576C702.464 951.104 671.424 960 585.92 960H438.08c-85.504 0-116.544-8.96-147.84-25.6a174.464 174.464 0 0 1-72.64-72.704c-16.768-31.296-25.664-62.336-25.664-147.84v-275.84c0-85.504 8.96-116.544 25.6-147.84a174.464 174.464 0 0 1 72.768-72.576c31.232-16.704 62.272-25.6 147.776-25.6z"}),E("path",{fill:"currentColor",d:"M512 320q32 0 32 32v128q0 32-32 32t-32-32V352q0-32 32-32m32-96a32 32 0 0 1-64 0v-64a32 32 0 0 0-32-32h-96a32 32 0 0 1 0-64h96a96 96 0 0 1 96 96z"})]))}}),tB=eB,oB=N({name:"Mug",__name:"mug",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M736 800V160H160v640a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64m64-544h63.552a96 96 0 0 1 96 96v224a96 96 0 0 1-96 96H800v128a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V128a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v288h63.552a32 32 0 0 0 32-32V352a32 32 0 0 0-32-32z"})]))}}),rB=oB,lB=N({name:"MuteNotification",__name:"mute-notification",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m241.216 832 63.616-64H768V448c0-42.368-10.24-82.304-28.48-117.504l46.912-47.232C815.36 331.392 832 387.84 832 448v320h96a32 32 0 1 1 0 64zm-90.24 0H96a32 32 0 1 1 0-64h96V448a320.128 320.128 0 0 1 256-313.6V128a64 64 0 1 1 128 0v6.4a319.552 319.552 0 0 1 171.648 97.088l-45.184 45.44A256 256 0 0 0 256 448v278.336L151.04 832zM448 896h128a64 64 0 0 1-128 0"}),E("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}}),nB=lB,aB=N({name:"Mute",__name:"mute",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m412.16 592.128-45.44 45.44A191.232 191.232 0 0 1 320 512V256a192 192 0 1 1 384 0v44.352l-64 64V256a128 128 0 1 0-256 0v256c0 30.336 10.56 58.24 28.16 80.128m51.968 38.592A128 128 0 0 0 640 512v-57.152l64-64V512a192 192 0 0 1-287.68 166.528zM314.88 779.968l46.144-46.08A222.976 222.976 0 0 0 480 768h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64h64v-64c-61.44 0-118.4-19.2-165.12-52.032M266.752 737.6A286.976 286.976 0 0 1 192 544v-32a32 32 0 0 1 64 0v32c0 56.832 21.184 108.8 56.064 148.288z"}),E("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}}),iB=aB,sB=N({name:"NoSmoking",__name:"no-smoking",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M440.256 576H256v128h56.256l-64 64H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32h280.256zm143.488 128H704V583.744L775.744 512H928a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H519.744zM768 576v128h128V576zm-29.696-207.552 45.248 45.248-497.856 497.856-45.248-45.248zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}}),cB=sB,uB=N({name:"Notebook",__name:"notebook",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),dB=uB,pB=N({name:"Notification",__name:"notification",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),E("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}}),fB=pB,hB=N({name:"Odometer",__name:"odometer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M192 512a320 320 0 1 1 640 0 32 32 0 1 1-64 0 256 256 0 1 0-512 0 32 32 0 0 1-64 0"}),E("path",{fill:"currentColor",d:"M570.432 627.84A96 96 0 1 1 509.568 608l60.992-187.776A32 32 0 1 1 631.424 440l-60.992 187.776zM502.08 734.464a32 32 0 1 0 19.84-60.928 32 32 0 0 0-19.84 60.928"})]))}}),vB=hB,mB=N({name:"OfficeBuilding",__name:"office-building",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v704h384V128zm-32-64h448a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M256 256h256v64H256zm0 192h256v64H256zm0 192h256v64H256zm384-128h128v64H640zm0 128h128v64H640zM64 832h896v64H64z"}),E("path",{fill:"currentColor",d:"M640 384v448h192V384zm-32-64h256a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H608a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32"})]))}}),gB=mB,bB=N({name:"Open",__name:"open",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),E("path",{fill:"currentColor",d:"M694.044 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}}),_B=bB,wB=N({name:"Operation",__name:"operation",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),yB=wB,xB=N({name:"Opportunity",__name:"opportunity",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 960v-64h192.064v64zm448-544a350.656 350.656 0 0 1-128.32 271.424C665.344 719.04 640 763.776 640 813.504V832H320v-14.336c0-48-19.392-95.36-57.216-124.992a351.552 351.552 0 0 1-128.448-344.256c25.344-136.448 133.888-248.128 269.76-276.48A352.384 352.384 0 0 1 832 416m-544 32c0-132.288 75.904-224 192-224v-64c-154.432 0-256 122.752-256 288z"})]))}}),kB=xB,CB=N({name:"Orange",__name:"orange",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 894.72a382.336 382.336 0 0 0 215.936-89.472L577.024 622.272c-10.24 6.016-21.248 10.688-33.024 13.696v258.688zm261.248-134.784A382.336 382.336 0 0 0 894.656 544H635.968c-3.008 11.776-7.68 22.848-13.696 33.024l182.976 182.912zM894.656 480a382.336 382.336 0 0 0-89.408-215.936L622.272 446.976c6.016 10.24 10.688 21.248 13.696 33.024h258.688zm-134.72-261.248A382.336 382.336 0 0 0 544 129.344v258.688c11.776 3.008 22.848 7.68 33.024 13.696zM480 129.344a382.336 382.336 0 0 0-215.936 89.408l182.912 182.976c10.24-6.016 21.248-10.688 33.024-13.696zm-261.248 134.72A382.336 382.336 0 0 0 129.344 480h258.688c3.008-11.776 7.68-22.848 13.696-33.024zM129.344 544a382.336 382.336 0 0 0 89.408 215.936l182.976-182.912A127.232 127.232 0 0 1 388.032 544zm134.72 261.248A382.336 382.336 0 0 0 480 894.656V635.968a127.232 127.232 0 0 1-33.024-13.696zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-384a64 64 0 1 0 0-128 64 64 0 0 0 0 128"})]))}}),SB=CB,EB=N({name:"Paperclip",__name:"paperclip",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744l294.144-294.208z"})]))}}),TB=EB,$B=N({name:"PartlyCloudy",__name:"partly-cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M598.4 895.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 895.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 445.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"}),E("path",{fill:"currentColor",d:"M139.84 501.888a256 256 0 1 1 417.856-277.12c-17.728 2.176-38.208 8.448-61.504 18.816A192 192 0 1 0 189.12 460.48a6003.84 6003.84 0 0 0-49.28 41.408z"})]))}}),MB=$B,AB=N({name:"Pear",__name:"pear",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M542.336 258.816a443.255 443.255 0 0 0-9.024 25.088 32 32 0 1 1-60.8-20.032l1.088-3.328a162.688 162.688 0 0 0-122.048 131.392l-17.088 102.72-20.736 15.36C256.192 552.704 224 610.88 224 672c0 120.576 126.4 224 288 224s288-103.424 288-224c0-61.12-32.192-119.296-89.728-161.92l-20.736-15.424-17.088-102.72a162.688 162.688 0 0 0-130.112-133.12zm-40.128-66.56c7.936-15.552 16.576-30.08 25.92-43.776 23.296-33.92 49.408-59.776 78.528-77.12a32 32 0 1 1 32.704 55.04c-20.544 12.224-40.064 31.552-58.432 58.304a316.608 316.608 0 0 0-9.792 15.104 226.688 226.688 0 0 1 164.48 181.568l12.8 77.248C819.456 511.36 864 587.392 864 672c0 159.04-157.568 288-352 288S160 831.04 160 672c0-84.608 44.608-160.64 115.584-213.376l12.8-77.248a226.624 226.624 0 0 1 213.76-189.184z"})]))}}),zB=AB,IB=N({name:"PhoneFilled",__name:"phone-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M199.232 125.568 90.624 379.008a32 32 0 0 0 6.784 35.2l512.384 512.384a32 32 0 0 0 35.2 6.784l253.44-108.608a32 32 0 0 0 10.048-52.032L769.6 633.92a32 32 0 0 0-36.928-5.952l-130.176 65.088-271.488-271.552 65.024-130.176a32 32 0 0 0-5.952-36.928L251.2 115.52a32 32 0 0 0-51.968 10.048z"})]))}}),OB=IB,NB=N({name:"Phone",__name:"phone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M79.36 432.256 591.744 944.64a32 32 0 0 0 35.2 6.784l253.44-108.544a32 32 0 0 0 9.984-52.032l-153.856-153.92a32 32 0 0 0-36.928-6.016l-69.888 34.944L358.08 394.24l35.008-69.888a32 32 0 0 0-5.952-36.928L233.152 133.568a32 32 0 0 0-52.032 10.048L72.512 397.056a32 32 0 0 0 6.784 35.2zm60.48-29.952 81.536-190.08L325.568 316.48l-24.64 49.216-20.608 41.216 32.576 32.64 271.552 271.552 32.64 32.64 41.216-20.672 49.28-24.576 104.192 104.128-190.08 81.472L139.84 402.304zM512 320v-64a256 256 0 0 1 256 256h-64a192 192 0 0 0-192-192m0-192V64a448 448 0 0 1 448 448h-64a384 384 0 0 0-384-384"})]))}}),PB=NB,RB=N({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),H3=RB,LB=N({name:"PictureRounded",__name:"picture-rounded",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128a384 384 0 1 0 0 768 384 384 0 0 0 0-768m0-64a448 448 0 1 1 0 896 448 448 0 0 1 0-896"}),E("path",{fill:"currentColor",d:"M640 288q64 0 64 64t-64 64q-64 0-64-64t64-64M214.656 790.656l-45.312-45.312 185.664-185.6a96 96 0 0 1 123.712-10.24l138.24 98.688a32 32 0 0 0 39.872-2.176L906.688 422.4l42.624 47.744L699.52 693.696a96 96 0 0 1-119.808 6.592l-138.24-98.752a32 32 0 0 0-41.152 3.456l-185.664 185.6z"})]))}}),BB=LB,VB=N({name:"Picture",__name:"picture",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),DB=VB,HB=N({name:"PieChart",__name:"pie-chart",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 68.48v64.832A384.128 384.128 0 0 0 512 896a384.128 384.128 0 0 0 378.688-320h64.768A448.128 448.128 0 0 1 64 512 448.128 448.128 0 0 1 448 68.48z"}),E("path",{fill:"currentColor",d:"M576 97.28V448h350.72A384.064 384.064 0 0 0 576 97.28zM512 64V33.152A448 448 0 0 1 990.848 512H512z"})]))}}),FB=HB,jB=N({name:"Place",__name:"place",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"}),E("path",{fill:"currentColor",d:"M512 512a32 32 0 0 1 32 32v256a32 32 0 1 1-64 0V544a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M384 649.088v64.96C269.76 732.352 192 771.904 192 800c0 37.696 139.904 96 320 96s320-58.304 320-96c0-28.16-77.76-67.648-192-85.952v-64.96C789.12 671.04 896 730.368 896 800c0 88.32-171.904 160-384 160s-384-71.68-384-160c0-69.696 106.88-128.96 256-150.912"})]))}}),KB=jB,UB=N({name:"Platform",__name:"platform",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 832v-64h128v64h192v64H256v-64zM128 704V128h768v576z"})]))}}),WB=UB,qB=N({name:"Plus",__name:"plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),hh=qB,YB=N({name:"Pointer",__name:"pointer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M511.552 128c-35.584 0-64.384 28.8-64.384 64.448v516.48L274.048 570.88a94.272 94.272 0 0 0-112.896-3.456 44.416 44.416 0 0 0-8.96 62.208L332.8 870.4A64 64 0 0 0 384 896h512V575.232a64 64 0 0 0-45.632-61.312l-205.952-61.76A96 96 0 0 1 576 360.192V192.448C576 156.8 547.2 128 511.552 128M359.04 556.8l24.128 19.2V192.448a128.448 128.448 0 1 1 256.832 0v167.744a32 32 0 0 0 22.784 30.656l206.016 61.76A128 128 0 0 1 960 575.232V896a64 64 0 0 1-64 64H384a128 128 0 0 1-102.4-51.2L101.056 668.032A108.416 108.416 0 0 1 128 512.512a158.272 158.272 0 0 1 185.984 8.32z"})]))}}),GB=YB,XB=N({name:"Position",__name:"position",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z"})]))}}),ZB=XB,JB=N({name:"Postcard",__name:"postcard",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),QB=JB,eV=N({name:"Pouring",__name:"pouring",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M224 800a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32"})]))}}),tV=eV,oV=N({name:"Present",__name:"present",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 896V640H192v-64h288V320H192v576zm64 0h288V320H544v256h288v64H544zM128 256h768v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),E("path",{fill:"currentColor",d:"M96 256h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M416 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M608 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),rV=oV,lV=N({name:"PriceTag",__name:"price-tag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),nV=lV,aV=N({name:"Printer",__name:"printer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 746.432 64 741.248 64 727.04V379.072c0-42.816 4.48-58.304 12.8-73.984 8.384-15.616 20.672-27.904 36.288-36.288 15.68-8.32 31.168-12.8 73.984-12.8H256V64h512v192h68.928c42.816 0 58.304 4.48 73.984 12.8 15.616 8.384 27.904 20.672 36.288 36.288 8.32 15.68 12.8 31.168 12.8 73.984v347.904c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H768v192H256zm64-192v320h384V576zm-64 128V512h512v192h128V379.072c0-29.376-1.408-36.48-5.248-43.776a23.296 23.296 0 0 0-10.048-10.048c-7.232-3.84-14.4-5.248-43.776-5.248H187.072c-29.376 0-36.48 1.408-43.776 5.248a23.296 23.296 0 0 0-10.048 10.048c-3.84 7.232-5.248 14.4-5.248 43.776V704zm64-448h384V128H320zm-64 128h64v64h-64zm128 0h64v64h-64z"})]))}}),iV=aV,sV=N({name:"Promotion",__name:"promotion",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),cV=sV,uV=N({name:"QuartzWatch",__name:"quartz-watch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M422.02 602.01v-.03c-6.68-5.99-14.35-8.83-23.01-8.51-8.67.32-16.17 3.66-22.5 10.02-6.33 6.36-9.5 13.7-9.5 22.02s3 15.82 8.99 22.5c8.68 8.68 19.02 11.35 31.01 8s19.49-10.85 22.5-22.5c3.01-11.65.51-22.15-7.49-31.49zM384 512c0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.67 8.99-23.01m6.53-82.49c11.65 3.01 22.15.51 31.49-7.49h.04c5.99-6.68 8.83-14.34 8.51-23.01-.32-8.67-3.66-16.16-10.02-22.5-6.36-6.33-13.7-9.5-22.02-9.5s-15.82 3-22.5 8.99c-8.68 8.69-11.35 19.02-8 31.01 3.35 11.99 10.85 19.49 22.5 22.5zm242.94 0c11.67-3.03 19.01-10.37 22.02-22.02 3.01-11.65.51-22.15-7.49-31.49h.01c-6.68-5.99-14.18-8.99-22.5-8.99s-15.66 3.16-22.02 9.5c-6.36 6.34-9.7 13.84-10.02 22.5-.32 8.66 2.52 16.33 8.51 23.01 9.32 8.02 19.82 10.52 31.49 7.49M512 640c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01s-3-17.02-8.99-23.01c-6-5.99-13.66-8.99-23.01-8.99m183.01-151.01c-6-5.99-13.66-8.99-23.01-8.99s-17.02 3-23.01 8.99c-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99s17.02-3 23.01-8.99c5.99-6 8.99-13.67 8.99-23.01 0-9.35-3-17.02-8.99-23.01"}),E("path",{fill:"currentColor",d:"M832 512c-2-90.67-33.17-166.17-93.5-226.5-20.43-20.42-42.6-37.49-66.5-51.23V64H352v170.26c-23.9 13.74-46.07 30.81-66.5 51.24-60.33 60.33-91.49 135.83-93.5 226.5 2 90.67 33.17 166.17 93.5 226.5 20.43 20.43 42.6 37.5 66.5 51.24V960h320V789.74c23.9-13.74 46.07-30.81 66.5-51.24 60.33-60.34 91.49-135.83 93.5-226.5M416 128h192v78.69c-29.85-9.03-61.85-13.93-96-14.69-34.15.75-66.15 5.65-96 14.68zm192 768H416v-78.68c29.85 9.03 61.85 13.93 96 14.68 34.15-.75 66.15-5.65 96-14.68zm-96-128c-72.66-2.01-132.99-27.01-180.99-75.01S258.01 584.66 256 512c2.01-72.66 27.01-132.99 75.01-180.99S439.34 258.01 512 256c72.66 2.01 132.99 27.01 180.99 75.01S765.99 439.34 768 512c-2.01 72.66-27.01 132.99-75.01 180.99S584.66 765.99 512 768"}),E("path",{fill:"currentColor",d:"M512 320c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01 0 9.35 3 17.02 8.99 23.01 6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01 0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99m112.99 273.5c-8.66-.32-16.33 2.52-23.01 8.51-7.98 9.32-10.48 19.82-7.49 31.49s10.49 19.17 22.5 22.5 22.35.66 31.01-8v.04c5.99-6.68 8.99-14.18 8.99-22.5s-3.16-15.66-9.5-22.02-13.84-9.7-22.5-10.02"})]))}}),dV=uV,pV=N({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),F3=pV,fV=N({name:"Rank",__name:"rank",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544H186.496z"})]))}}),hV=fV,vV=N({name:"ReadingLamp",__name:"reading-lamp",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 896h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m-44.672-768-99.52 448h608.384l-99.52-448zm-25.6-64h460.608a32 32 0 0 1 31.232 25.088l113.792 512A32 32 0 0 1 856.128 640H167.872a32 32 0 0 1-31.232-38.912l113.792-512A32 32 0 0 1 281.664 64z"}),E("path",{fill:"currentColor",d:"M672 576q32 0 32 32v128q0 32-32 32t-32-32V608q0-32 32-32m-192-.064h64V960h-64z"})]))}}),mV=vV,gV=N({name:"Reading",__name:"reading",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),E("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),bV=gV,_V=N({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),j3=_V,wV=N({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),K3=wV,yV=N({name:"Refresh",__name:"refresh",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),xV=yV,kV=N({name:"Refrigerator",__name:"refrigerator",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 448h512V160a32 32 0 0 0-32-32H288a32 32 0 0 0-32 32zm0 64v352a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V512zm32-448h448a96 96 0 0 1 96 96v704a96 96 0 0 1-96 96H288a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96m32 224h64v96h-64zm0 288h64v96h-64z"})]))}}),CV=kV,SV=N({name:"RemoveFilled",__name:"remove-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),EV=SV,TV=N({name:"Remove",__name:"remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),$V=TV,MV=N({name:"Right",__name:"right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312z"})]))}}),AV=MV,zV=N({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),U3=zV,IV=N({name:"School",__name:"school",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 128v704h576V128zm-32-64h640a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M64 832h896v64H64zm256-640h128v96H320z"}),E("path",{fill:"currentColor",d:"M384 832h256v-64a128 128 0 1 0-256 0zm128-256a192 192 0 0 1 192 192v128H320V768a192 192 0 0 1 192-192M320 384h128v96H320zm256-192h128v96H576zm0 192h128v96H576z"})]))}}),OV=IV,NV=N({name:"Scissor",__name:"scissor",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512.064 578.368-106.88 152.768a160 160 0 1 1-23.36-78.208L472.96 522.56 196.864 128.256a32 32 0 1 1 52.48-36.736l393.024 561.344a160 160 0 1 1-23.36 78.208l-106.88-152.704zm54.4-189.248 208.384-297.6a32 32 0 0 1 52.48 36.736l-221.76 316.672-39.04-55.808zm-376.32 425.856a96 96 0 1 0 110.144-157.248 96 96 0 0 0-110.08 157.248zm643.84 0a96 96 0 1 0-110.08-157.248 96 96 0 0 0 110.08 157.248"})]))}}),PV=NV,RV=N({name:"Search",__name:"search",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),W3=RV,LV=N({name:"Select",__name:"select",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04-316.8-316.8a64 64 0 0 1 0-90.496z"})]))}}),BV=LV,VV=N({name:"Sell",__name:"sell",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 483.84L768 698.496V928a32 32 0 1 1-64 0V698.496l-73.344 73.344a32 32 0 1 1-45.248-45.248l128-128a32 32 0 0 1 45.248 0l128 128a32 32 0 1 1-45.248 45.248z"})]))}}),DV=VV,HV=N({name:"SemiSelect",__name:"semi-select",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 448h768q64 0 64 64t-64 64H128q-64 0-64-64t64-64"})]))}}),FV=HV,jV=N({name:"Service",__name:"service",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M864 409.6a192 192 0 0 1-37.888 349.44A256.064 256.064 0 0 1 576 960h-96a32 32 0 1 1 0-64h96a192.064 192.064 0 0 0 181.12-128H736a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h32c10.368 0 20.544.832 30.528 2.432a288 288 0 0 0-573.056 0A193.235 193.235 0 0 1 256 384h32a32 32 0 0 1 32 32v320a32 32 0 0 1-32 32h-32a192 192 0 0 1-96-358.4 352 352 0 0 1 704 0M256 448a128 128 0 1 0 0 256zm640 128a128 128 0 0 0-128-128v256a128 128 0 0 0 128-128"})]))}}),KV=jV,UV=N({name:"SetUp",__name:"set-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 160a64 64 0 0 0-64 64v576a64 64 0 0 0 64 64h576a64 64 0 0 0 64-64V224a64 64 0 0 0-64-64zm0-64h576a128 128 0 0 1 128 128v576a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V224A128 128 0 0 1 224 96"}),E("path",{fill:"currentColor",d:"M384 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M480 320h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32m160 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M288 640h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),WV=UV,qV=N({name:"Setting",__name:"setting",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),YV=qV,GV=N({name:"Share",__name:"share",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"})]))}}),XV=GV,ZV=N({name:"Ship",__name:"ship",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 386.88V448h405.568a32 32 0 0 1 30.72 40.768l-76.48 267.968A192 192 0 0 1 687.168 896H336.832a192 192 0 0 1-184.64-139.264L75.648 488.768A32 32 0 0 1 106.368 448H448V117.888a32 32 0 0 1 47.36-28.096l13.888 7.616L512 96v2.88l231.68 126.4a32 32 0 0 1-2.048 57.216zm0-70.272 144.768-65.792L512 171.84zM512 512H148.864l18.24 64H856.96l18.24-64zM185.408 640l28.352 99.2A128 128 0 0 0 336.832 832h350.336a128 128 0 0 0 123.072-92.8l28.352-99.2H185.408"})]))}}),JV=ZV,QV=N({name:"Shop",__name:"shop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 704h64v192H256V704h64v64h384zm188.544-152.192C894.528 559.616 896 567.616 896 576a96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0c0-8.384 1.408-16.384 3.392-24.192L192 128h640z"})]))}}),eD=QV,tD=N({name:"ShoppingBag",__name:"shopping-bag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 320v96a32 32 0 0 1-32 32h-32V320H384v128h-32a32 32 0 0 1-32-32v-96H192v576h640V320zm-384-64a192 192 0 1 1 384 0h160a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32zm64 0h256a128 128 0 1 0-256 0"}),E("path",{fill:"currentColor",d:"M192 704h640v64H192z"})]))}}),oD=tD,rD=N({name:"ShoppingCartFull",__name:"shopping-cart-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"}),E("path",{fill:"currentColor",d:"M699.648 256 608 145.984 516.352 256h183.296zm-140.8-151.04a64 64 0 0 1 98.304 0L836.352 320H379.648l179.2-215.04"})]))}}),lD=rD,nD=N({name:"ShoppingCart",__name:"shopping-cart",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"})]))}}),aD=nD,iD=N({name:"ShoppingTrolley",__name:"shopping-trolley",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M368 833c-13.3 0-24.5 4.5-33.5 13.5S321 866.7 321 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S415 893.3 415 880s-4.5-24.5-13.5-33.5S381.3 833 368 833m439-193c7.4 0 13.8-2.2 19.5-6.5S836 623.3 838 616l112-448c2-10-.2-19.2-6.5-27.5S929 128 919 128H96c-9.3 0-17 3-23 9s-9 13.7-9 23 3 17 9 23 13.7 9 23 9h96v576h672c9.3 0 17-3 23-9s9-13.7 9-23-3-17-9-23-13.7-9-23-9H256v-64zM256 192h622l-96 384H256zm432 641c-13.3 0-24.5 4.5-33.5 13.5S641 866.7 641 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S735 893.3 735 880s-4.5-24.5-13.5-33.5S701.3 833 688 833"})]))}}),sD=iD,cD=N({name:"Smoking",__name:"smoking",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 576v128h640V576zm-32-64h704a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M704 576h64v128h-64zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}}),uD=cD,dD=N({name:"Soccer",__name:"soccer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M418.496 871.04 152.256 604.8c-16.512 94.016-2.368 178.624 42.944 224 44.928 44.928 129.344 58.752 223.296 42.24m72.32-18.176a573.056 573.056 0 0 0 224.832-137.216 573.12 573.12 0 0 0 137.216-224.832L533.888 171.84a578.56 578.56 0 0 0-227.52 138.496A567.68 567.68 0 0 0 170.432 532.48l320.384 320.384zM871.04 418.496c16.512-93.952 2.688-178.368-42.24-223.296-44.544-44.544-128.704-58.048-222.592-41.536zM149.952 874.048c-112.96-112.96-88.832-408.96 111.168-608.96C461.056 65.152 760.96 36.928 874.048 149.952c113.024 113.024 86.784 411.008-113.152 610.944-199.936 199.936-497.92 226.112-610.944 113.152m452.544-497.792 22.656-22.656a32 32 0 0 1 45.248 45.248l-22.656 22.656 45.248 45.248A32 32 0 1 1 647.744 512l-45.248-45.248L557.248 512l45.248 45.248a32 32 0 1 1-45.248 45.248L512 557.248l-45.248 45.248L512 647.744a32 32 0 1 1-45.248 45.248l-45.248-45.248-22.656 22.656a32 32 0 1 1-45.248-45.248l22.656-22.656-45.248-45.248A32 32 0 1 1 376.256 512l45.248 45.248L466.752 512l-45.248-45.248a32 32 0 1 1 45.248-45.248L512 466.752l45.248-45.248L512 376.256a32 32 0 0 1 45.248-45.248l45.248 45.248z"})]))}}),pD=dD,fD=N({name:"SoldOut",__name:"sold-out",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 476.16a32 32 0 1 1 45.248 45.184l-128 128a32 32 0 0 1-45.248 0l-128-128a32 32 0 1 1 45.248-45.248L704 837.504V608a32 32 0 1 1 64 0v229.504l73.408-73.408z"})]))}}),hD=fD,vD=N({name:"SortDown",__name:"sort-down",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),q3=vD,mD=N({name:"SortUp",__name:"sort-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),Y3=mD,gD=N({name:"Sort",__name:"sort",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0V141.248z"})]))}}),bD=gD,_D=N({name:"Stamp",__name:"stamp",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"})]))}}),wD=_D,yD=N({name:"StarFilled",__name:"star-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),vc=yD,xD=N({name:"Star",__name:"star",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),G3=xD,kD=N({name:"Stopwatch",__name:"stopwatch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M672 234.88c-39.168 174.464-80 298.624-122.688 372.48-64 110.848-202.624 30.848-138.624-80C453.376 453.44 540.48 355.968 672 234.816z"})]))}}),CD=kD,SD=N({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),vh=SD,ED=N({name:"Sugar",__name:"sugar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m801.728 349.184 4.48 4.48a128 128 0 0 1 0 180.992L534.656 806.144a128 128 0 0 1-181.056 0l-4.48-4.48-19.392 109.696a64 64 0 0 1-108.288 34.176L78.464 802.56a64 64 0 0 1 34.176-108.288l109.76-19.328-4.544-4.544a128 128 0 0 1 0-181.056l271.488-271.488a128 128 0 0 1 181.056 0l4.48 4.48 19.392-109.504a64 64 0 0 1 108.352-34.048l142.592 143.04a64 64 0 0 1-34.24 108.16l-109.248 19.2zm-548.8 198.72h447.168v2.24l60.8-60.8a63.808 63.808 0 0 0 18.752-44.416h-426.88l-89.664 89.728a64.064 64.064 0 0 0-10.24 13.248zm0 64c2.752 4.736 6.144 9.152 10.176 13.248l135.744 135.744a64 64 0 0 0 90.496 0L638.4 611.904zm490.048-230.976L625.152 263.104a64 64 0 0 0-90.496 0L416.768 380.928zM123.712 757.312l142.976 142.976 24.32-137.6a25.6 25.6 0 0 0-29.696-29.632l-137.6 24.256zm633.6-633.344-24.32 137.472a25.6 25.6 0 0 0 29.632 29.632l137.28-24.064-142.656-143.04z"})]))}}),TD=ED,$D=N({name:"SuitcaseLine",__name:"suitcase-line",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M922.5 229.5c-24.32-24.34-54.49-36.84-90.5-37.5H704v-64c-.68-17.98-7.02-32.98-19.01-44.99S658.01 64.66 640 64H384c-17.98.68-32.98 7.02-44.99 19.01S320.66 110 320 128v64H192c-35.99.68-66.16 13.18-90.5 37.5C77.16 253.82 64.66 283.99 64 320v448c.68 35.99 13.18 66.16 37.5 90.5s54.49 36.84 90.5 37.5h640c35.99-.68 66.16-13.18 90.5-37.5s36.84-54.49 37.5-90.5V320c-.68-35.99-13.18-66.16-37.5-90.5M384 128h256v64H384zM256 832h-64c-17.98-.68-32.98-7.02-44.99-19.01S128.66 786.01 128 768V448h128zm448 0H320V448h384zm192-64c-.68 17.98-7.02 32.98-19.01 44.99S850.01 831.34 832 832h-64V448h128zm0-384H128v-64c.69-17.98 7.02-32.98 19.01-44.99S173.99 256.66 192 256h640c17.98.69 32.98 7.02 44.99 19.01S895.34 301.99 896 320z"})]))}}),MD=$D,AD=N({name:"Suitcase",__name:"suitcase",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384h768v-64a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64zm0 64v320a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448zm64-256h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M384 128v64h256v-64zm0-64h256a64 64 0 0 1 64 64v64a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64v-64a64 64 0 0 1 64-64"})]))}}),zD=AD,ID=N({name:"Sunny",__name:"sunny",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 704a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m0-704a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 768a32 32 0 0 1 32 32v64a32 32 0 1 1-64 0v-64a32 32 0 0 1 32-32M195.2 195.2a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 1 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm543.104 543.104a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 0 1-45.248 45.248l-45.248-45.248a32 32 0 0 1 0-45.248M64 512a32 32 0 0 1 32-32h64a32 32 0 0 1 0 64H96a32 32 0 0 1-32-32m768 0a32 32 0 0 1 32-32h64a32 32 0 1 1 0 64h-64a32 32 0 0 1-32-32M195.2 828.8a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248L240.448 828.8a32 32 0 0 1-45.248 0zm543.104-543.104a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248l-45.248 45.248a32 32 0 0 1-45.248 0"})]))}}),OD=ID,ND=N({name:"Sunrise",__name:"sunrise",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M32 768h960a32 32 0 1 1 0 64H32a32 32 0 1 1 0-64m129.408-96a352 352 0 0 1 701.184 0h-64.32a288 288 0 0 0-572.544 0h-64.32zM512 128a32 32 0 0 1 32 32v96a32 32 0 0 1-64 0v-96a32 32 0 0 1 32-32m407.296 168.704a32 32 0 0 1 0 45.248l-67.84 67.84a32 32 0 1 1-45.248-45.248l67.84-67.84a32 32 0 0 1 45.248 0zm-814.592 0a32 32 0 0 1 45.248 0l67.84 67.84a32 32 0 1 1-45.248 45.248l-67.84-67.84a32 32 0 0 1 0-45.248"})]))}}),PD=ND,RD=N({name:"Sunset",__name:"sunset",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M82.56 640a448 448 0 1 1 858.88 0h-67.2a384 384 0 1 0-724.288 0zM32 704h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m256 128h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),LD=RD,BD=N({name:"SwitchButton",__name:"switch-button",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128z"}),E("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}}),VD=BD,DD=N({name:"SwitchFilled",__name:"switch-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M247.47 358.4v.04c.07 19.17 7.72 37.53 21.27 51.09s31.92 21.2 51.09 21.27c39.86 0 72.41-32.6 72.41-72.4s-32.6-72.36-72.41-72.36-72.36 32.55-72.36 72.36z"}),E("path",{fill:"currentColor",d:"M492.38 128H324.7c-52.16 0-102.19 20.73-139.08 57.61a196.655 196.655 0 0 0-57.61 139.08V698.7c-.01 25.84 5.08 51.42 14.96 75.29s24.36 45.56 42.63 63.83 39.95 32.76 63.82 42.65a196.67 196.67 0 0 0 75.28 14.98h167.68c3.03 0 5.46-2.43 5.46-5.42V133.42c.6-2.99-1.83-5.42-5.46-5.42zm-56.11 705.88H324.7c-17.76.13-35.36-3.33-51.75-10.18s-31.22-16.94-43.61-29.67c-25.3-25.35-39.81-59.1-39.81-95.32V324.69c-.13-17.75 3.33-35.35 10.17-51.74a131.695 131.695 0 0 1 29.64-43.62c25.39-25.3 59.14-39.81 95.36-39.81h111.57zm402.12-647.67a196.655 196.655 0 0 0-139.08-57.61H580.48c-3.03 0-4.82 2.43-4.82 4.82v757.16c-.6 2.99 1.79 5.42 5.42 5.42h118.23a196.69 196.69 0 0 0 139.08-57.61A196.655 196.655 0 0 0 896 699.31V325.29a196.69 196.69 0 0 0-57.61-139.08zm-111.3 441.92c-42.83 0-77.82-34.99-77.82-77.82s34.98-77.82 77.82-77.82c42.83 0 77.82 34.99 77.82 77.82s-34.99 77.82-77.82 77.82z"})]))}}),HD=DD,FD=N({name:"Switch",__name:"switch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344zM64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),jD=FD,KD=N({name:"TakeawayBox",__name:"takeaway-box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H192v448h640zM96 320h832V128H96zm800 64v480a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V384H64a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h896a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zM416 512h192a32 32 0 0 1 0 64H416a32 32 0 0 1 0-64"})]))}}),UD=KD,WD=N({name:"Ticket",__name:"ticket",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 832H64V640a128 128 0 1 0 0-256V192h576v160h64V192h256v192a128 128 0 1 0 0 256v192H704V672h-64zm0-416v192h64V416z"})]))}}),qD=WD,YD=N({name:"Tickets",__name:"tickets",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),GD=YD,XD=N({name:"Timer",__name:"timer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),E("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),ZD=XD,JD=N({name:"ToiletPaper",__name:"toilet-paper",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M595.2 128H320a192 192 0 0 0-192 192v576h384V352c0-90.496 32.448-171.2 83.2-224M736 64c123.712 0 224 128.96 224 288S859.712 640 736 640H576v320H64V320A256 256 0 0 1 320 64zM576 352v224h160c84.352 0 160-97.28 160-224s-75.648-224-160-224-160 97.28-160 224"}),E("path",{fill:"currentColor",d:"M736 448c-35.328 0-64-43.008-64-96s28.672-96 64-96 64 43.008 64 96-28.672 96-64 96"})]))}}),QD=JD,eH=N({name:"Tools",__name:"tools",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M764.416 254.72a351.68 351.68 0 0 1 86.336 149.184H960v192.064H850.752a351.68 351.68 0 0 1-86.336 149.312l54.72 94.72-166.272 96-54.592-94.72a352.64 352.64 0 0 1-172.48 0L371.136 936l-166.272-96 54.72-94.72a351.68 351.68 0 0 1-86.336-149.312H64v-192h109.248a351.68 351.68 0 0 1 86.336-149.312L204.8 160l166.208-96h.192l54.656 94.592a352.64 352.64 0 0 1 172.48 0L652.8 64h.128L819.2 160l-54.72 94.72zM704 499.968a192 192 0 1 0-384 0 192 192 0 0 0 384 0"})]))}}),tH=eH,oH=N({name:"TopLeft",__name:"top-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 256h416a32 32 0 1 0 0-64H224a32 32 0 0 0-32 32v448a32 32 0 0 0 64 0z"}),E("path",{fill:"currentColor",d:"M246.656 201.344a32 32 0 0 0-45.312 45.312l544 544a32 32 0 0 0 45.312-45.312l-544-544z"})]))}}),rH=oH,lH=N({name:"TopRight",__name:"top-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),E("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312l544-544z"})]))}}),nH=lH,aH=N({name:"Top",__name:"top",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),iH=aH,sH=N({name:"TrendCharts",__name:"trend-charts",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 896V128h768v768zm291.712-327.296 128 102.4 180.16-201.792-47.744-42.624-139.84 156.608-128-102.4-180.16 201.792 47.744 42.624 139.84-156.608zM816 352a48 48 0 1 0-96 0 48 48 0 0 0 96 0"})]))}}),cH=sH,uH=N({name:"TrophyBase",__name:"trophy-base",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M918.4 201.6c-6.4-6.4-12.8-9.6-22.4-9.6H768V96c0-9.6-3.2-16-9.6-22.4C752 67.2 745.6 64 736 64H288c-9.6 0-16 3.2-22.4 9.6C259.2 80 256 86.4 256 96v96H128c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 16-9.6 22.4 3.2 108.8 25.6 185.6 64 224 34.4 34.4 77.56 55.65 127.65 61.99 10.91 20.44 24.78 39.25 41.95 56.41 40.86 40.86 91 65.47 150.4 71.9V768h-96c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h256c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6h-96V637.26c59.4-7.71 109.54-30.01 150.4-70.86 17.2-17.2 31.51-36.06 42.81-56.55 48.93-6.51 90.02-27.7 126.79-61.85 38.4-38.4 60.8-112 64-224 0-6.4-3.2-16-9.6-22.4zM256 438.4c-19.2-6.4-35.2-19.2-51.2-35.2-22.4-22.4-35.2-70.4-41.6-147.2H256zm390.4 80C608 553.6 566.4 576 512 576s-99.2-19.2-134.4-57.6C342.4 480 320 438.4 320 384V128h384v256c0 54.4-19.2 99.2-57.6 134.4m172.8-115.2c-16 16-32 25.6-51.2 35.2V256h92.8c-6.4 76.8-19.2 124.8-41.6 147.2zM768 896H256c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h512c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6"})]))}}),dH=uH,pH=N({name:"Trophy",__name:"trophy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 896V702.08A256.256 256.256 0 0 1 264.064 512h-32.64a96 96 0 0 1-91.968-68.416L93.632 290.88a76.8 76.8 0 0 1 73.6-98.88H256V96a32 32 0 0 1 32-32h448a32 32 0 0 1 32 32v96h88.768a76.8 76.8 0 0 1 73.6 98.88L884.48 443.52A96 96 0 0 1 792.576 512h-32.64A256.256 256.256 0 0 1 544 702.08V896h128a32 32 0 1 1 0 64H352a32 32 0 1 1 0-64zm224-448V128H320v320a192 192 0 1 0 384 0m64 0h24.576a32 32 0 0 0 30.656-22.784l45.824-152.768A12.8 12.8 0 0 0 856.768 256H768zm-512 0V256h-88.768a12.8 12.8 0 0 0-12.288 16.448l45.824 152.768A32 32 0 0 0 231.424 448z"})]))}}),fH=pH,hH=N({name:"TurnOff",__name:"turn-off",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),E("path",{fill:"currentColor",d:"M329.956 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}}),vH=hH,mH=N({name:"Umbrella",__name:"umbrella",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 768a32 32 0 1 1 64 0 64 64 0 0 0 128 0V512H64a448 448 0 1 1 896 0H576v256a128 128 0 1 1-256 0m570.688-320a384.128 384.128 0 0 0-757.376 0z"})]))}}),gH=mH,bH=N({name:"Unlock",__name:"unlock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),_H=bH,wH=N({name:"UploadFilled",__name:"upload-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),yH=wH,xH=N({name:"Upload",__name:"upload",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"})]))}}),kH=xH,CH=N({name:"UserFilled",__name:"user-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}}),SH=CH,EH=N({name:"User",__name:"user",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),TH=EH,$H=N({name:"Van",__name:"van",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128.896 736H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v96h164.544a32 32 0 0 1 31.616 27.136l54.144 352A32 32 0 0 1 922.688 736h-91.52a144 144 0 1 1-286.272 0H415.104a144 144 0 1 1-286.272 0zm23.36-64a143.872 143.872 0 0 1 239.488 0H568.32c17.088-25.6 42.24-45.376 71.744-55.808V256H128v416zm655.488 0h77.632l-19.648-128H704v64.896A144 144 0 0 1 807.744 672m48.128-192-14.72-96H704v96h151.872M688 832a80 80 0 1 0 0-160 80 80 0 0 0 0 160m-416 0a80 80 0 1 0 0-160 80 80 0 0 0 0 160"})]))}}),MH=$H,AH=N({name:"VideoCameraFilled",__name:"video-camera-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m768 576 192-64v320l-192-64v96a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zM192 768v64h384v-64zm192-480a160 160 0 0 1 320 0 160 160 0 0 1-320 0m64 0a96 96 0 1 0 192.064-.064A96 96 0 0 0 448 288m-320 32a128 128 0 1 1 256.064.064A128 128 0 0 1 128 320m64 0a64 64 0 1 0 128 0 64 64 0 0 0-128 0"})]))}}),zH=AH,IH=N({name:"VideoCamera",__name:"video-camera",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 768V256H128v512zm64-416 192-96v512l-192-96v128a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 71.552v176.896l128 64V359.552zM192 320h192v64H192z"})]))}}),OH=IH,NH=N({name:"VideoPause",__name:"video-pause",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),PH=NH,RH=N({name:"VideoPlay",__name:"video-play",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),LH=RH,BH=N({name:"View",__name:"view",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),X3=BH,VH=N({name:"WalletFilled",__name:"wallet-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M688 512a112 112 0 1 0 0 224h208v160H128V352h768v160zm32 160h-32a48 48 0 0 1 0-96h32a48 48 0 0 1 0 96m-80-544 128 160H384z"})]))}}),DH=VH,HH=N({name:"Wallet",__name:"wallet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 288h-64V128H128v704h384v32a32 32 0 0 0 32 32H96a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32z"}),E("path",{fill:"currentColor",d:"M128 320v512h768V320zm-32-64h832a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M704 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}}),FH=HH,jH=N({name:"WarnTriangleFilled",__name:"warn-triangle-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M928.99 755.83 574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03M554.67 768h-85.33v-85.33h85.33zm0-426.67v298.66h-85.33V341.32z"})]))}}),KH=jH,UH=N({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),mc=UH,WH=N({name:"Warning",__name:"warning",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),qH=WH,YH=N({name:"Watch",__name:"watch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 768a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M480 352a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0V384a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M480 512h128q32 0 32 32t-32 32H480q-32 0-32-32t32-32m128-256V128H416v128h-64V64h320v192zM416 768v128h192V768h64v192H352V768z"})]))}}),GH=YH,XH=N({name:"Watermelon",__name:"watermelon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m683.072 600.32-43.648 162.816-61.824-16.512 53.248-198.528L576 493.248l-158.4 158.4-45.248-45.248 158.4-158.4-55.616-55.616-198.528 53.248-16.512-61.824 162.816-43.648L282.752 200A384 384 0 0 0 824 741.248zm231.552 141.056a448 448 0 1 1-632-632l632 632"})]))}}),ZH=XH,JH=N({name:"WindPower",__name:"wind-power",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 64q32 0 32 32v832q0 32-32 32t-32-32V96q0-32 32-32m416 354.624 128-11.584V168.96l-128-11.52v261.12zm-64 5.824V151.552L320 134.08V160h-64V64l616.704 56.064A96 96 0 0 1 960 215.68v144.64a96 96 0 0 1-87.296 95.616L256 512V224h64v217.92zm256-23.232 98.88-8.96A32 32 0 0 0 896 360.32V215.68a32 32 0 0 0-29.12-31.872l-98.88-8.96z"})]))}}),QH=JH,eF=N({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),mh=eF,tF=N({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),Z3=tF;const oF=Object.freeze(Object.defineProperty({__proto__:null,AddLocation:Qz,Aim:tI,AlarmClock:rI,Apple:nI,ArrowDown:Pl,ArrowDownBold:iI,ArrowLeft:fn,ArrowLeftBold:uI,ArrowRight:ir,ArrowRightBold:fI,ArrowUp:Ad,ArrowUpBold:mI,Avatar:_I,Back:z3,Baseball:xI,Basketball:CI,Bell:$I,BellFilled:EI,Bicycle:AI,Bottom:RI,BottomLeft:II,BottomRight:NI,Bowl:BI,Box:DI,Briefcase:FI,Brush:WI,BrushFilled:KI,Burger:YI,Calendar:I3,Camera:QI,CameraFilled:ZI,CaretBottom:tO,CaretLeft:rO,CaretRight:dh,CaretTop:O3,Cellphone:iO,ChatDotRound:cO,ChatDotSquare:dO,ChatLineRound:fO,ChatLineSquare:vO,ChatRound:gO,ChatSquare:_O,Check:Li,Checked:xO,Cherry:CO,Chicken:EO,ChromeFilled:$O,CircleCheck:zd,CircleCheckFilled:N3,CircleClose:hn,CircleCloseFilled:Id,CirclePlus:RO,CirclePlusFilled:NO,Clock:ph,Close:Jr,CloseBold:VO,Cloudy:FO,Coffee:WO,CoffeeCup:KO,Coin:YO,ColdDrink:XO,Collection:eN,CollectionTag:JO,Comment:oN,Compass:lN,Connection:aN,Coordinate:sN,CopyDocument:uN,Cpu:pN,CreditCard:hN,Crop:mN,DArrowLeft:Ra,DArrowRight:La,DCaret:wN,DataAnalysis:xN,DataBoard:CN,DataLine:EN,Delete:P3,DeleteFilled:$N,DeleteLocation:AN,Dessert:ON,Discount:PN,Dish:VN,DishDot:LN,Document:R3,DocumentAdd:HN,DocumentChecked:jN,DocumentCopy:UN,DocumentDelete:qN,DocumentRemove:GN,Download:JN,Drizzling:eP,Edit:lP,EditPen:oP,Eleme:sP,ElemeFilled:aP,ElementPlus:uP,Expand:pP,Failed:hP,Female:mP,Files:bP,Film:wP,Filter:xP,Finished:CP,FirstAidKit:EP,Flag:$P,Fold:AP,Folder:FP,FolderAdd:IP,FolderChecked:NP,FolderDelete:RP,FolderOpened:BP,FolderRemove:DP,Food:KP,Football:WP,ForkSpoon:YP,Fries:XP,FullScreen:L3,Goblet:nR,GobletFull:QP,GobletSquare:rR,GobletSquareFull:tR,GoldMedal:iR,Goods:dR,GoodsFilled:cR,Grape:fR,Grid:vR,Guide:gR,Handbag:_R,Headset:yR,Help:SR,HelpFilled:kR,Hide:B3,Histogram:$R,HomeFilled:AR,HotWater:IR,House:NR,IceCream:DR,IceCreamRound:RR,IceCreamSquare:BR,IceDrink:FR,IceTea:KR,InfoFilled:Od,Iphone:qR,Key:GR,KnifeFork:ZR,Lightning:QR,Link:tL,List:rL,Loading:vn,Location:uL,LocationFilled:aL,LocationInformation:sL,Lock:pL,Lollipop:hL,MagicStick:mL,Magnet:bL,Male:wL,Management:xL,MapLocation:CL,Medal:EL,Memo:$L,Menu:AL,Message:NL,MessageBox:IL,Mic:RL,Microphone:BL,MilkTea:DL,Minus:V3,Money:jL,Monitor:UL,Moon:GL,MoonNight:qL,More:D3,MoreFilled:fh,MostlyCloudy:QL,Mouse:tB,Mug:rB,Mute:iB,MuteNotification:nB,NoSmoking:cB,Notebook:dB,Notification:fB,Odometer:vB,OfficeBuilding:gB,Open:_B,Operation:yB,Opportunity:kB,Orange:SB,Paperclip:TB,PartlyCloudy:MB,Pear:zB,Phone:PB,PhoneFilled:OB,Picture:DB,PictureFilled:H3,PictureRounded:BB,PieChart:FB,Place:KB,Platform:WB,Plus:hh,Pointer:GB,Position:ZB,Postcard:QB,Pouring:tV,Present:rV,PriceTag:nV,Printer:iV,Promotion:cV,QuartzWatch:dV,QuestionFilled:F3,Rank:hV,Reading:bV,ReadingLamp:mV,Refresh:xV,RefreshLeft:j3,RefreshRight:K3,Refrigerator:CV,Remove:$V,RemoveFilled:EV,Right:AV,ScaleToOriginal:U3,School:OV,Scissor:PV,Search:W3,Select:BV,Sell:DV,SemiSelect:FV,Service:KV,SetUp:WV,Setting:YV,Share:XV,Ship:JV,Shop:eD,ShoppingBag:oD,ShoppingCart:aD,ShoppingCartFull:lD,ShoppingTrolley:sD,Smoking:uD,Soccer:pD,SoldOut:hD,Sort:bD,SortDown:q3,SortUp:Y3,Stamp:wD,Star:G3,StarFilled:vc,Stopwatch:CD,SuccessFilled:vh,Sugar:TD,Suitcase:zD,SuitcaseLine:MD,Sunny:OD,Sunrise:PD,Sunset:LD,Switch:jD,SwitchButton:VD,SwitchFilled:HD,TakeawayBox:UD,Ticket:qD,Tickets:GD,Timer:ZD,ToiletPaper:QD,Tools:tH,Top:iH,TopLeft:rH,TopRight:nH,TrendCharts:cH,Trophy:fH,TrophyBase:dH,TurnOff:vH,Umbrella:gH,Unlock:_H,Upload:kH,UploadFilled:yH,User:TH,UserFilled:SH,Van:MH,VideoCamera:OH,VideoCameraFilled:zH,VideoPause:PH,VideoPlay:LH,View:X3,Wallet:FH,WalletFilled:DH,WarnTriangleFilled:KH,Warning:qH,WarningFilled:mc,Watch:GH,Watermelon:ZH,WindPower:QH,ZoomIn:mh,ZoomOut:Z3},Symbol.toStringTag,{value:"Module"})),J3="__epPropKey",ue=e=>e,rF=e=>xt(e)&&!!e[J3],vl=(e,t)=>{if(!xt(e)||rF(e))return e;const{values:o,required:r,default:l,type:n,validator:a}=e,c={type:n,required:!!r,validator:o||a?d=>{let u=!1,p=[];if(o&&(p=Array.from(o),Pt(e,"default")&&p.push(l),u||(u=p.includes(d))),a&&(u||(u=a(d))),!u&&p.length>0){const h=[...new Set(p)].map(v=>JSON.stringify(v)).join(", ");y9(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(d)}.`)}return u}:void 0,[J3]:!0};return Pt(e,"default")&&(c.default=l),c},Pe=e=>Sd(Object.entries(e).map(([t,o])=>[t,vl(o,t)])),Xt=ue([String,Object,Function]),gh={Close:Jr},bh={Close:Jr,SuccessFilled:vh,InfoFilled:Od,WarningFilled:mc,CircleCloseFilled:Id},Jn={success:vh,warning:mc,error:Id,info:Od},_h={validating:vn,success:zd,error:hn},yt=(e,t)=>{if(e.install=o=>{for(const r of[e,...Object.values(t??{})])o.component(r.name,r)},t)for(const[o,r]of Object.entries(t))e[o]=r;return e},Q3=(e,t)=>(e.install=o=>{e._context=o._context,o.config.globalProperties[t]=e},e),lF=(e,t)=>(e.install=o=>{o.directive(t,e)},e),co=e=>(e.install=Wt,e),Nd=(...e)=>t=>{e.forEach(o=>{it(o)?o(t):o.value=t})},lt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},nF=["year","years","month","date","dates","week","datetime","datetimerange","daterange","monthrange"],wh=["sun","mon","tue","wed","thu","fri","sat"],St="update:modelValue",ro="change",yr="input",e6=Symbol("INSTALLED_KEY"),Rl=["","default","small","large"],t6=e=>["",...Rl].includes(e);var Qr=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Qr||{});function yh(e){return io(e)&&e.type===Qe}function aF(e){return io(e)&&e.type===Jo}function iF(e){return io(e)&&!yh(e)&&!aF(e)}const sF=e=>{if(!io(e))return{};const t=e.props||{},o=(io(e.type)?e.type.props:void 0)||{},r={};return Object.keys(o).forEach(l=>{Pt(o[l],"default")&&(r[l]=o[l].default)}),Object.keys(t).forEach(l=>{r[Fr(l)]=t[l]}),r},cF=e=>{if(!Ke(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},Qn=e=>{const t=Ke(e)?e:[e],o=[];return t.forEach(r=>{var l;Ke(r)?o.push(...Qn(r)):io(r)&&Ke(r.children)?o.push(...Qn(r.children)):(o.push(r),io(r)&&((l=r.component)!=null&&l.subTree)&&o.push(...Qn(r.component.subTree)))}),o},o6=e=>[...new Set(e)],Lr=e=>!e&&e!==0?[]:Array.isArray(e)?e:[e],xh=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),uo=e=>e;function uF(e){let t=0;const o=(...r)=>{t&&Pa(t),t=Xn(()=>{e(...r),t=0})};return o.cancel=()=>{Pa(t),t=0},o}const dF=["class","style"],pF=/^on[A-Z]/,kh=(e={})=>{const{excludeListeners:t=!1,excludeKeys:o}=e,r=C(()=>((o==null?void 0:o.value)||[]).concat(dF)),l=wt();return C(l?()=>{var n;return Sd(Object.entries((n=l.proxy)==null?void 0:n.$attrs).filter(([a])=>!r.value.includes(a)&&!(t&&pF.test(a))))}:()=>({}))},Lo=({from:e,replacement:t,scope:o,version:r,ref:l,type:n="API"},a)=>{Se(()=>s(a),i=>{},{immediate:!0})},r6=(e,t,o,r)=>{let l={offsetX:0,offsetY:0};const n=c=>{const d=c.clientX,u=c.clientY,{offsetX:p,offsetY:h}=l,v=e.value.getBoundingClientRect(),m=v.left,f=v.top,_=v.width,g=v.height,y=document.documentElement.clientWidth,w=document.documentElement.clientHeight,x=-m+p,$=-f+h,T=y-m-_+p,R=w-f-g+h,P=V=>{let B=p+V.clientX-d,j=h+V.clientY-u;r!=null&&r.value||(B=Math.min(Math.max(B,x),T),j=Math.min(Math.max(j,$),R)),l={offsetX:B,offsetY:j},e.value&&(e.value.style.transform=`translate(${mo(B)}, ${mo(j)})`)},L=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",L)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",L)},a=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",n)},i=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",n)};ft(()=>{Go(()=>{o.value?a():i()})}),to(()=>{i()})};var fF={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const hF=e=>(t,o)=>vF(t,o,s(e)),vF=(e,t,o)=>wo(o,e,e).replace(/\{(\w+)\}/g,(r,l)=>{var n;return`${(n=t==null?void 0:t[l])!=null?n:`{${l}}`}`}),mF=e=>{const t=C(()=>s(e).name),o=Zt(e)?e:D(e);return{lang:t,locale:o,t:hF(e)}},l6=Symbol("localeContextKey"),Rt=e=>{const t=e||Ge(l6,D());return mF(C(()=>t.value||fF))},gc="el",gF="is-",Ba=(e,t,o,r,l)=>{let n=`${e}-${t}`;return o&&(n+=`-${o}`),r&&(n+=`__${r}`),l&&(n+=`--${l}`),n},n6=Symbol("namespaceContextKey"),Ch=e=>{const t=e||(wt()?Ge(n6,D(gc)):D(gc));return C(()=>s(t)||gc)},ze=(e,t)=>{const o=Ch(t);return{namespace:o,b:(f="")=>Ba(o.value,e,f,"",""),e:f=>f?Ba(o.value,e,"",f,""):"",m:f=>f?Ba(o.value,e,"","",f):"",be:(f,_)=>f&&_?Ba(o.value,e,f,_,""):"",em:(f,_)=>f&&_?Ba(o.value,e,"",f,_):"",bm:(f,_)=>f&&_?Ba(o.value,e,f,"",_):"",bem:(f,_,g)=>f&&_&&g?Ba(o.value,e,f,_,g):"",is:(f,..._)=>{const g=_.length>=1?_[0]:!0;return f&&g?`${gF}${f}`:""},cssVar:f=>{const _={};for(const g in f)f[g]&&(_[`--${o.value}-${g}`]=f[g]);return _},cssVarName:f=>`--${o.value}-${f}`,cssVarBlock:f=>{const _={};for(const g in f)f[g]&&(_[`--${o.value}-${e}-${g}`]=f[g]);return _},cssVarBlockName:f=>`--${o.value}-${e}-${f}`}},Sh=(e,t={})=>{Zt(e)||Io("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||ze("popup"),r=C(()=>o.bm("parent","hidden"));if(!Nt||Xr(document.body,r.value))return;let l=0,n=!1,a="0";const i=()=>{setTimeout(()=>{ar(document==null?void 0:document.body,r.value),n&&document&&(document.body.style.width=a)},200)};Se(e,c=>{if(!c){i();return}n=!Xr(document.body,r.value),n&&(a=document.body.style.width),l=T3(o.namespace.value);const d=document.documentElement.clientHeight0&&(d||u==="scroll")&&n&&(document.body.style.width=`calc(100% - ${l}px)`),Zr(document.body,r.value)}),kf(()=>i())},bF=vl({type:ue(Boolean),default:null}),_F=vl({type:ue(Function)}),a6=e=>{const t=`update:${e}`,o=`onUpdate:${e}`,r=[t],l={[e]:bF,[o]:_F};return{useModelToggle:({indicator:a,toggleReason:i,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:u,onHide:p})=>{const h=wt(),{emit:v}=h,m=h.props,f=C(()=>it(m[o])),_=C(()=>m[e]===null),g=R=>{a.value!==!0&&(a.value=!0,i&&(i.value=R),it(u)&&u(R))},y=R=>{a.value!==!1&&(a.value=!1,i&&(i.value=R),it(p)&&p(R))},w=R=>{if(m.disabled===!0||it(d)&&!d())return;const P=f.value&&Nt;P&&v(t,!0),(_.value||!P)&&g(R)},x=R=>{if(m.disabled===!0||!Nt)return;const P=f.value&&Nt;P&&v(t,!1),(_.value||!P)&&y(R)},$=R=>{Co(R)&&(m.disabled&&R?f.value&&v(t,!1):a.value!==R&&(R?g():y()))},T=()=>{a.value?x():w()};return Se(()=>m[e],$),c&&h.appContext.config.globalProperties.$route!==void 0&&Se(()=>({...h.proxy.$route}),()=>{c.value&&a.value&&x()}),ft(()=>{$(m[e])}),{hide:x,show:w,toggle:T,hasUpdateHandler:f}},useModelToggleProps:l,useModelToggleEmits:r}};a6("modelValue");const i6=e=>{const t=wt();return C(()=>{var o,r;return(r=(o=t==null?void 0:t.proxy)==null?void 0:o.$props)==null?void 0:r[e]})};var Ar="top",el="bottom",tl="right",zr="left",Eh="auto",bc=[Ar,el,tl,zr],Bi="start",_c="end",wF="clippingParents",s6="viewport",wc="popper",yF="reference",c6=bc.reduce(function(e,t){return e.concat([t+"-"+Bi,t+"-"+_c])},[]),Va=[].concat(bc,[Eh]).reduce(function(e,t){return e.concat([t,t+"-"+Bi,t+"-"+_c])},[]),xF="beforeRead",kF="read",CF="afterRead",SF="beforeMain",EF="main",TF="afterMain",$F="beforeWrite",MF="write",AF="afterWrite",zF=[xF,kF,CF,SF,EF,TF,$F,MF,AF];function Ll(e){return e?(e.nodeName||"").toLowerCase():null}function ml(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Vi(e){var t=ml(e).Element;return e instanceof t||e instanceof Element}function ol(e){var t=ml(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Th(e){if(typeof ShadowRoot>"u")return!1;var t=ml(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function IF(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var r=t.styles[o]||{},l=t.attributes[o]||{},n=t.elements[o];!ol(n)||!Ll(n)||(Object.assign(n.style,r),Object.keys(l).forEach(function(a){var i=l[a];i===!1?n.removeAttribute(a):n.setAttribute(a,i===!0?"":i)}))})}function OF(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(r){var l=t.elements[r],n=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:o[r]),i=a.reduce(function(c,d){return c[d]="",c},{});!ol(l)||!Ll(l)||(Object.assign(l.style,i),Object.keys(n).forEach(function(c){l.removeAttribute(c)}))})}}var u6={name:"applyStyles",enabled:!0,phase:"write",fn:IF,effect:OF,requires:["computeStyles"]};function Bl(e){return e.split("-")[0]}var Da=Math.max,Pd=Math.min,Di=Math.round;function Hi(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),r=1,l=1;if(ol(e)&&t){var n=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Di(o.width)/a||1),n>0&&(l=Di(o.height)/n||1)}return{width:o.width/r,height:o.height/l,top:o.top/l,right:o.right/r,bottom:o.bottom/l,left:o.left/r,x:o.left/r,y:o.top/l}}function $h(e){var t=Hi(e),o=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function d6(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&Th(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mn(e){return ml(e).getComputedStyle(e)}function NF(e){return["table","td","th"].indexOf(Ll(e))>=0}function ea(e){return((Vi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rd(e){return Ll(e)==="html"?e:e.assignedSlot||e.parentNode||(Th(e)?e.host:null)||ea(e)}function p6(e){return!ol(e)||mn(e).position==="fixed"?null:e.offsetParent}function PF(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&ol(e)){var r=mn(e);if(r.position==="fixed")return null}var l=Rd(e);for(Th(l)&&(l=l.host);ol(l)&&["html","body"].indexOf(Ll(l))<0;){var n=mn(l);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||t&&n.willChange==="filter"||t&&n.filter&&n.filter!=="none")return l;l=l.parentNode}return null}function yc(e){for(var t=ml(e),o=p6(e);o&&NF(o)&&mn(o).position==="static";)o=p6(o);return o&&(Ll(o)==="html"||Ll(o)==="body"&&mn(o).position==="static")?t:o||PF(e)||t}function Mh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xc(e,t,o){return Da(e,Pd(t,o))}function RF(e,t,o){var r=xc(e,t,o);return r>o?o:r}function f6(){return{top:0,right:0,bottom:0,left:0}}function h6(e){return Object.assign({},f6(),e)}function v6(e,t){return t.reduce(function(o,r){return o[r]=e,o},{})}var LF=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,h6(typeof e!="number"?e:v6(e,bc))};function BF(e){var t,o=e.state,r=e.name,l=e.options,n=o.elements.arrow,a=o.modifiersData.popperOffsets,i=Bl(o.placement),c=Mh(i),d=[zr,tl].indexOf(i)>=0,u=d?"height":"width";if(!(!n||!a)){var p=LF(l.padding,o),h=$h(n),v=c==="y"?Ar:zr,m=c==="y"?el:tl,f=o.rects.reference[u]+o.rects.reference[c]-a[c]-o.rects.popper[u],_=a[c]-o.rects.reference[c],g=yc(n),y=g?c==="y"?g.clientHeight||0:g.clientWidth||0:0,w=f/2-_/2,x=p[v],$=y-h[u]-p[m],T=y/2-h[u]/2+w,R=xc(x,T,$),P=c;o.modifiersData[r]=(t={},t[P]=R,t.centerOffset=R-T,t)}}function VF(e){var t=e.state,o=e.options,r=o.element,l=r===void 0?"[data-popper-arrow]":r;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||!d6(t.elements.popper,l)||(t.elements.arrow=l))}var DF={name:"arrow",enabled:!0,phase:"main",fn:BF,effect:VF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fi(e){return e.split("-")[1]}var HF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FF(e){var t=e.x,o=e.y,r=window,l=r.devicePixelRatio||1;return{x:Di(t*l)/l||0,y:Di(o*l)/l||0}}function m6(e){var t,o=e.popper,r=e.popperRect,l=e.placement,n=e.variation,a=e.offsets,i=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,p=e.isFixed,h=a.x,v=h===void 0?0:h,m=a.y,f=m===void 0?0:m,_=typeof u=="function"?u({x:v,y:f}):{x:v,y:f};v=_.x,f=_.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=zr,x=Ar,$=window;if(d){var T=yc(o),R="clientHeight",P="clientWidth";if(T===ml(o)&&(T=ea(o),mn(T).position!=="static"&&i==="absolute"&&(R="scrollHeight",P="scrollWidth")),T=T,l===Ar||(l===zr||l===tl)&&n===_c){x=el;var L=p&&T===$&&$.visualViewport?$.visualViewport.height:T[R];f-=L-r.height,f*=c?1:-1}if(l===zr||(l===Ar||l===el)&&n===_c){w=tl;var V=p&&T===$&&$.visualViewport?$.visualViewport.width:T[P];v-=V-r.width,v*=c?1:-1}}var B=Object.assign({position:i},d&&HF),j=u===!0?FF({x:v,y:f}):{x:v,y:f};if(v=j.x,f=j.y,c){var te;return Object.assign({},B,(te={},te[x]=y?"0":"",te[w]=g?"0":"",te.transform=($.devicePixelRatio||1)<=1?"translate("+v+"px, "+f+"px)":"translate3d("+v+"px, "+f+"px, 0)",te))}return Object.assign({},B,(t={},t[x]=y?f+"px":"",t[w]=g?v+"px":"",t.transform="",t))}function jF(e){var t=e.state,o=e.options,r=o.gpuAcceleration,l=r===void 0?!0:r,n=o.adaptive,a=n===void 0?!0:n,i=o.roundOffsets,c=i===void 0?!0:i,d={placement:Bl(t.placement),variation:Fi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,m6(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,m6(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var g6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jF,data:{}},Ld={passive:!0};function KF(e){var t=e.state,o=e.instance,r=e.options,l=r.scroll,n=l===void 0?!0:l,a=r.resize,i=a===void 0?!0:a,c=ml(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&d.forEach(function(u){u.addEventListener("scroll",o.update,Ld)}),i&&c.addEventListener("resize",o.update,Ld),function(){n&&d.forEach(function(u){u.removeEventListener("scroll",o.update,Ld)}),i&&c.removeEventListener("resize",o.update,Ld)}}var b6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:KF,data:{}},UF={left:"right",right:"left",bottom:"top",top:"bottom"};function Bd(e){return e.replace(/left|right|bottom|top/g,function(t){return UF[t]})}var WF={start:"end",end:"start"};function _6(e){return e.replace(/start|end/g,function(t){return WF[t]})}function Ah(e){var t=ml(e),o=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:o,scrollTop:r}}function zh(e){return Hi(ea(e)).left+Ah(e).scrollLeft}function qF(e){var t=ml(e),o=ea(e),r=t.visualViewport,l=o.clientWidth,n=o.clientHeight,a=0,i=0;return r&&(l=r.width,n=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,i=r.offsetTop)),{width:l,height:n,x:a+zh(e),y:i}}function YF(e){var t,o=ea(e),r=Ah(e),l=(t=e.ownerDocument)==null?void 0:t.body,n=Da(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),a=Da(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),i=-r.scrollLeft+zh(e),c=-r.scrollTop;return mn(l||o).direction==="rtl"&&(i+=Da(o.clientWidth,l?l.clientWidth:0)-n),{width:n,height:a,x:i,y:c}}function Ih(e){var t=mn(e),o=t.overflow,r=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+l+r)}function w6(e){return["html","body","#document"].indexOf(Ll(e))>=0?e.ownerDocument.body:ol(e)&&Ih(e)?e:w6(Rd(e))}function kc(e,t){var o;t===void 0&&(t=[]);var r=w6(e),l=r===((o=e.ownerDocument)==null?void 0:o.body),n=ml(r),a=l?[n].concat(n.visualViewport||[],Ih(r)?r:[]):r,i=t.concat(a);return l?i:i.concat(kc(Rd(a)))}function Oh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function GF(e){var t=Hi(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function y6(e,t){return t===s6?Oh(qF(e)):Vi(t)?GF(t):Oh(YF(ea(e)))}function XF(e){var t=kc(Rd(e)),o=["absolute","fixed"].indexOf(mn(e).position)>=0,r=o&&ol(e)?yc(e):e;return Vi(r)?t.filter(function(l){return Vi(l)&&d6(l,r)&&Ll(l)!=="body"}):[]}function ZF(e,t,o){var r=t==="clippingParents"?XF(e):[].concat(t),l=[].concat(r,[o]),n=l[0],a=l.reduce(function(i,c){var d=y6(e,c);return i.top=Da(d.top,i.top),i.right=Pd(d.right,i.right),i.bottom=Pd(d.bottom,i.bottom),i.left=Da(d.left,i.left),i},y6(e,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function x6(e){var t=e.reference,o=e.element,r=e.placement,l=r?Bl(r):null,n=r?Fi(r):null,a=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2,c;switch(l){case Ar:c={x:a,y:t.y-o.height};break;case el:c={x:a,y:t.y+t.height};break;case tl:c={x:t.x+t.width,y:i};break;case zr:c={x:t.x-o.width,y:i};break;default:c={x:t.x,y:t.y}}var d=l?Mh(l):null;if(d!=null){var u=d==="y"?"height":"width";switch(n){case Bi:c[d]=c[d]-(t[u]/2-o[u]/2);break;case _c:c[d]=c[d]+(t[u]/2-o[u]/2);break}}return c}function Cc(e,t){t===void 0&&(t={});var o=t,r=o.placement,l=r===void 0?e.placement:r,n=o.boundary,a=n===void 0?wF:n,i=o.rootBoundary,c=i===void 0?s6:i,d=o.elementContext,u=d===void 0?wc:d,p=o.altBoundary,h=p===void 0?!1:p,v=o.padding,m=v===void 0?0:v,f=h6(typeof m!="number"?m:v6(m,bc)),_=u===wc?yF:wc,g=e.rects.popper,y=e.elements[h?_:u],w=ZF(Vi(y)?y:y.contextElement||ea(e.elements.popper),a,c),x=Hi(e.elements.reference),$=x6({reference:x,element:g,strategy:"absolute",placement:l}),T=Oh(Object.assign({},g,$)),R=u===wc?T:x,P={top:w.top-R.top+f.top,bottom:R.bottom-w.bottom+f.bottom,left:w.left-R.left+f.left,right:R.right-w.right+f.right},L=e.modifiersData.offset;if(u===wc&&L){var V=L[l];Object.keys(P).forEach(function(B){var j=[tl,el].indexOf(B)>=0?1:-1,te=[Ar,el].indexOf(B)>=0?"y":"x";P[B]+=V[te]*j})}return P}function JF(e,t){t===void 0&&(t={});var o=t,r=o.placement,l=o.boundary,n=o.rootBoundary,a=o.padding,i=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?Va:c,u=Fi(r),p=u?i?c6:c6.filter(function(m){return Fi(m)===u}):bc,h=p.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=p);var v=h.reduce(function(m,f){return m[f]=Cc(e,{placement:f,boundary:l,rootBoundary:n,padding:a})[Bl(f)],m},{});return Object.keys(v).sort(function(m,f){return v[m]-v[f]})}function QF(e){if(Bl(e)===Eh)return[];var t=Bd(e);return[_6(e),t,_6(t)]}function ej(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var l=o.mainAxis,n=l===void 0?!0:l,a=o.altAxis,i=a===void 0?!0:a,c=o.fallbackPlacements,d=o.padding,u=o.boundary,p=o.rootBoundary,h=o.altBoundary,v=o.flipVariations,m=v===void 0?!0:v,f=o.allowedAutoPlacements,_=t.options.placement,g=Bl(_),y=g===_,w=c||(y||!m?[Bd(_)]:QF(_)),x=[_].concat(w).reduce(function(Q,Me){return Q.concat(Bl(Me)===Eh?JF(t,{placement:Me,boundary:u,rootBoundary:p,padding:d,flipVariations:m,allowedAutoPlacements:f}):Me)},[]),$=t.rects.reference,T=t.rects.popper,R=new Map,P=!0,L=x[0],V=0;V=0,Z=J?"width":"height",H=Cc(t,{placement:B,boundary:u,rootBoundary:p,altBoundary:h,padding:d}),F=J?te?tl:zr:te?el:Ar;$[Z]>T[Z]&&(F=Bd(F));var K=Bd(F),I=[];if(n&&I.push(H[j]<=0),i&&I.push(H[F]<=0,H[K]<=0),I.every(function(Q){return Q})){L=B,P=!1;break}R.set(B,I)}if(P)for(var U=m?3:1,oe=function(Q){var Me=x.find(function(de){var _e=R.get(de);if(_e)return _e.slice(0,Q).every(function(me){return me})});if(Me)return L=Me,"break"},ne=U;ne>0;ne--){var ce=oe(ne);if(ce==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}var tj={name:"flip",enabled:!0,phase:"main",fn:ej,requiresIfExists:["offset"],data:{_skip:!1}};function k6(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function C6(e){return[Ar,tl,el,zr].some(function(t){return e[t]>=0})}function oj(e){var t=e.state,o=e.name,r=t.rects.reference,l=t.rects.popper,n=t.modifiersData.preventOverflow,a=Cc(t,{elementContext:"reference"}),i=Cc(t,{altBoundary:!0}),c=k6(a,r),d=k6(i,l,n),u=C6(c),p=C6(d);t.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}var rj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oj};function lj(e,t,o){var r=Bl(e),l=[zr,Ar].indexOf(r)>=0?-1:1,n=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,a=n[0],i=n[1];return a=a||0,i=(i||0)*l,[zr,tl].indexOf(r)>=0?{x:i,y:a}:{x:a,y:i}}function nj(e){var t=e.state,o=e.options,r=e.name,l=o.offset,n=l===void 0?[0,0]:l,a=Va.reduce(function(u,p){return u[p]=lj(p,t.rects,n),u},{}),i=a[t.placement],c=i.x,d=i.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}var aj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:nj};function ij(e){var t=e.state,o=e.name;t.modifiersData[o]=x6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var S6={name:"popperOffsets",enabled:!0,phase:"read",fn:ij,data:{}};function sj(e){return e==="x"?"y":"x"}function cj(e){var t=e.state,o=e.options,r=e.name,l=o.mainAxis,n=l===void 0?!0:l,a=o.altAxis,i=a===void 0?!1:a,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.padding,h=o.tether,v=h===void 0?!0:h,m=o.tetherOffset,f=m===void 0?0:m,_=Cc(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:u}),g=Bl(t.placement),y=Fi(t.placement),w=!y,x=Mh(g),$=sj(x),T=t.modifiersData.popperOffsets,R=t.rects.reference,P=t.rects.popper,L=typeof f=="function"?f(Object.assign({},t.rects,{placement:t.placement})):f,V=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(T){if(n){var te,J=x==="y"?Ar:zr,Z=x==="y"?el:tl,H=x==="y"?"height":"width",F=T[x],K=F+_[J],I=F-_[Z],U=v?-P[H]/2:0,oe=y===Bi?R[H]:P[H],ne=y===Bi?-P[H]:-R[H],ce=t.elements.arrow,Q=v&&ce?$h(ce):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:f6(),de=Me[J],_e=Me[Z],me=xc(0,R[H],Q[H]),Re=w?R[H]/2-U-me-de-V.mainAxis:oe-me-de-V.mainAxis,Ce=w?-R[H]/2+U+me+_e+V.mainAxis:ne+me+_e+V.mainAxis,Ee=t.elements.arrow&&yc(t.elements.arrow),De=Ee?x==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,ae=(te=B==null?void 0:B[x])!=null?te:0,pe=F+Re-ae-De,ke=F+Ce-ae,Oe=xc(v?Pd(K,pe):K,F,v?Da(I,ke):I);T[x]=Oe,j[x]=Oe-F}if(i){var we,Te=x==="x"?Ar:zr,Ne=x==="x"?el:tl,Ie=T[$],Ae=$==="y"?"height":"width",xe=Ie+_[Te],We=Ie-_[Ne],qe=[Ar,zr].indexOf(g)!==-1,ye=(we=B==null?void 0:B[$])!=null?we:0,Ye=qe?xe:Ie-R[Ae]-P[Ae]-ye+V.altAxis,tt=qe?Ie+R[Ae]+P[Ae]-ye-V.altAxis:We,pt=v&&qe?RF(Ye,Ie,tt):xc(v?Ye:xe,Ie,v?tt:We);T[$]=pt,j[$]=pt-Ie}t.modifiersData[r]=j}}var uj={name:"preventOverflow",enabled:!0,phase:"main",fn:cj,requiresIfExists:["offset"]};function dj(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pj(e){return e===ml(e)||!ol(e)?Ah(e):dj(e)}function fj(e){var t=e.getBoundingClientRect(),o=Di(t.width)/e.offsetWidth||1,r=Di(t.height)/e.offsetHeight||1;return o!==1||r!==1}function hj(e,t,o){o===void 0&&(o=!1);var r=ol(t),l=ol(t)&&fj(t),n=ea(t),a=Hi(e,l),i={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!o)&&((Ll(t)!=="body"||Ih(n))&&(i=pj(t)),ol(t)?(c=Hi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):n&&(c.x=zh(n))),{x:a.left+i.scrollLeft-c.x,y:a.top+i.scrollTop-c.y,width:a.width,height:a.height}}function vj(e){var t=new Map,o=new Set,r=[];e.forEach(function(n){t.set(n.name,n)});function l(n){o.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(i){if(!o.has(i)){var c=t.get(i);c&&l(c)}}),r.push(n)}return e.forEach(function(n){o.has(n.name)||l(n)}),r}function mj(e){var t=vj(e);return zF.reduce(function(o,r){return o.concat(t.filter(function(l){return l.phase===r}))},[])}function gj(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function bj(e){var t=e.reduce(function(o,r){var l=o[r.name];return o[r.name]=l?Object.assign({},l,r,{options:Object.assign({},l.options,r.options),data:Object.assign({},l.data,r.data)}):r,o},{});return Object.keys(t).map(function(o){return t[o]})}var E6={placement:"bottom",modifiers:[],strategy:"absolute"};function T6(){for(var e=arguments.length,t=new Array(e),o=0;o{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=kj(c);Object.assign(a.value,d)},requires:["computeStyles"]},l=C(()=>{const{onFirstUpdate:c,placement:d,strategy:u,modifiers:p}=s(o);return{onFirstUpdate:c,placement:d||"bottom",strategy:u||"absolute",modifiers:[...p||[],r,{name:"applyStyles",enabled:!1}]}}),n=lo(),a=D({styles:{popper:{position:s(l).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),i=()=>{n.value&&(n.value.destroy(),n.value=void 0)};return Se(l,c=>{const d=s(n);d&&d.setOptions(c)},{deep:!0}),Se([e,t],([c,d])=>{i(),!(!c||!d)&&(n.value=yj(c,d,s(l)))}),to(()=>{i()}),{state:C(()=>{var c;return{...((c=s(n))==null?void 0:c.state)||{}}}),styles:C(()=>s(a).styles),attributes:C(()=>s(a).attributes),update:()=>{var c;return(c=s(n))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=s(n))==null?void 0:c.forceUpdate()},instanceRef:C(()=>s(n))}};function kj(e){const t=Object.keys(e.elements),o=Sd(t.map(l=>[l,e.styles[l]||{}])),r=Sd(t.map(l=>[l,e.attributes[l]]));return{styles:o,attributes:r}}const Ph=e=>{if(!e)return{onClick:Wt,onMousedown:Wt,onMouseup:Wt};let t=!1,o=!1;return{onClick:a=>{t&&o&&e(a),t=o=!1},onMousedown:a=>{t=a.target===a.currentTarget},onMouseup:a=>{o=a.target===a.currentTarget}}},Cj=(e,t=0)=>{if(t===0)return e;const o=D(!1);let r=0;const l=()=>{r&&clearTimeout(r),r=window.setTimeout(()=>{o.value=e.value},t)};return ft(l),Se(()=>e.value,n=>{n?l():o.value=n}),o};function $6(){let e;const t=(r,l)=>{o(),e=window.setTimeout(r,l)},o=()=>window.clearTimeout(e);return rc(()=>o()),{registerTimeout:t,cancelTimeout:o}}const M6={prefix:Math.floor(Math.random()*1e4),current:0},Sj=Symbol("elIdInjection"),Rh=()=>wt()?Ge(Sj,M6):M6,Qo=e=>{const t=Rh(),o=Ch();return C(()=>s(e)||`${o.value}-id-${t.prefix}-${t.current++}`)};let ji=[];const A6=e=>{const t=e;t.key===lt.esc&&ji.forEach(o=>o(t))},Ej=e=>{ft(()=>{ji.length===0&&document.addEventListener("keydown",A6),Nt&&ji.push(e)}),to(()=>{ji=ji.filter(t=>t!==e),ji.length===0&&Nt&&document.removeEventListener("keydown",A6)})};let z6;const I6=()=>{const e=Ch(),t=Rh(),o=C(()=>`${e.value}-popper-container-${t.prefix}`),r=C(()=>`#${o.value}`);return{id:o,selector:r}},Tj=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},$j=()=>{const{id:e,selector:t}=I6();return Pu(()=>{Nt&&!z6&&!document.body.querySelector(t.value)&&(z6=Tj(e.value))}),{id:e,selector:t}},Mj=Pe({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Aj=({showAfter:e,hideAfter:t,autoClose:o,open:r,close:l})=>{const{registerTimeout:n}=$6(),{registerTimeout:a,cancelTimeout:i}=$6();return{onOpen:u=>{n(()=>{r(u);const p=s(o);st(p)&&p>0&&a(()=>{l(u)},p)},s(e))},onClose:u=>{i(),n(()=>{l(u)},s(t))}}},O6=Symbol("elForwardRef"),zj=e=>{zt(O6,{setForwardRef:o=>{e.value=o}})},Ij=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),N6={current:0},P6=D(0),R6=2e3,L6=Symbol("elZIndexContextKey"),B6=Symbol("zIndexContextKey"),Ki=e=>{const t=wt()?Ge(L6,N6):N6,o=e||(wt()?Ge(B6,void 0):void 0),r=C(()=>{const a=s(o);return st(a)?a:R6}),l=C(()=>r.value+P6.value),n=()=>(t.current++,P6.value=t.current,l.value);return!Nt&&Ge(L6),{initialZIndex:r,currentZIndex:l,nextZIndex:n}},Ui=Math.min,Ha=Math.max,Vd=Math.round,Dd=Math.floor,ta=e=>({x:e,y:e}),Oj={left:"right",right:"left",bottom:"top",top:"bottom"},Nj={start:"end",end:"start"};function Lh(e,t,o){return Ha(e,Ui(t,o))}function Sc(e,t){return typeof e=="function"?e(t):e}function Fa(e){return e.split("-")[0]}function Ec(e){return e.split("-")[1]}function V6(e){return e==="x"?"y":"x"}function Bh(e){return e==="y"?"height":"width"}function Wi(e){return["top","bottom"].includes(Fa(e))?"y":"x"}function Vh(e){return V6(Wi(e))}function Pj(e,t,o){o===void 0&&(o=!1);const r=Ec(e),l=Vh(e),n=Bh(l);let a=l==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=Hd(a)),[a,Hd(a)]}function Rj(e){const t=Hd(e);return[Dh(e),t,Dh(t)]}function Dh(e){return e.replace(/start|end/g,t=>Nj[t])}function Lj(e,t,o){const r=["left","right"],l=["right","left"],n=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?t?l:r:t?r:l;case"left":case"right":return t?n:a;default:return[]}}function Bj(e,t,o,r){const l=Ec(e);let n=Lj(Fa(e),o==="start",r);return l&&(n=n.map(a=>a+"-"+l),t&&(n=n.concat(n.map(Dh)))),n}function Hd(e){return e.replace(/left|right|bottom|top/g,t=>Oj[t])}function Vj(e){return{top:0,right:0,bottom:0,left:0,...e}}function D6(e){return typeof e!="number"?Vj(e):{top:e,right:e,bottom:e,left:e}}function Fd(e){const{x:t,y:o,width:r,height:l}=e;return{width:r,height:l,top:o,left:t,right:t+r,bottom:o+l,x:t,y:o}}function H6(e,t,o){let{reference:r,floating:l}=e;const n=Wi(t),a=Vh(t),i=Bh(a),c=Fa(t),d=n==="y",u=r.x+r.width/2-l.width/2,p=r.y+r.height/2-l.height/2,h=r[i]/2-l[i]/2;let v;switch(c){case"top":v={x:u,y:r.y-l.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-l.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ec(t)){case"start":v[a]-=h*(o&&d?-1:1);break;case"end":v[a]+=h*(o&&d?-1:1);break}return v}const Dj=async(e,t,o)=>{const{placement:r="bottom",strategy:l="absolute",middleware:n=[],platform:a}=o,i=n.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:l}),{x:u,y:p}=H6(d,r,c),h=r,v={},m=0;for(let f=0;f({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:l,rects:n,platform:a,elements:i,middlewareData:c}=t,{element:d,padding:u=0}=Sc(e,t)||{};if(d==null)return{};const p=D6(u),h={x:o,y:r},v=Vh(l),m=Bh(v),f=await a.getDimensions(d),_=v==="y",g=_?"top":"left",y=_?"bottom":"right",w=_?"clientHeight":"clientWidth",x=n.reference[m]+n.reference[v]-h[v]-n.floating[m],$=h[v]-n.reference[v],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let R=T?T[w]:0;(!R||!await(a.isElement==null?void 0:a.isElement(T)))&&(R=i.floating[w]||n.floating[m]);const P=x/2-$/2,L=R/2-f[m]/2-1,V=Ui(p[g],L),B=Ui(p[y],L),j=V,te=R-f[m]-B,J=R/2-f[m]/2+P,Z=Lh(j,J,te),H=!c.arrow&&Ec(l)!=null&&J!==Z&&n.reference[m]/2-(JJ<=0)){var B,j;const J=(((B=n.flip)==null?void 0:B.index)||0)+1,Z=R[J];if(Z)return{data:{index:J,overflows:V},reset:{placement:Z}};let H=(j=V.filter(F=>F.overflows[0]<=0).sort((F,K)=>F.overflows[1]-K.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(v){case"bestFit":{var te;const F=(te=V.filter(K=>{if(T){const I=Wi(K.placement);return I===y||I==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((K,I)=>K[1]-I[1])[0])==null?void 0:te[0];F&&(H=F);break}case"initialPlacement":H=i;break}if(l!==H)return{reset:{placement:H}}}return{}}}};async function jj(e,t){const{placement:o,platform:r,elements:l}=e,n=await(r.isRTL==null?void 0:r.isRTL(l.floating)),a=Fa(o),i=Ec(o),c=Wi(o)==="y",d=["left","top"].includes(a)?-1:1,u=n&&c?-1:1,p=Sc(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return i&&typeof m=="number"&&(v=i==="end"?m*-1:m),c?{x:v*u,y:h*d}:{x:h*d,y:v*u}}const Kj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:l,y:n,placement:a,middlewareData:i}=t,c=await jj(t,e);return a===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:l+c.x,y:n+c.y,data:{...c,placement:a}}}}},Uj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:l}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:i={fn:_=>{let{x:g,y}=_;return{x:g,y}}},...c}=Sc(e,t),d={x:o,y:r},u=await Hh(t,c),p=Wi(Fa(l)),h=V6(p);let v=d[h],m=d[p];if(n){const _=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=v+u[_],w=v-u[g];v=Lh(y,v,w)}if(a){const _=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=m+u[_],w=m-u[g];m=Lh(y,m,w)}const f=i.fn({...t,[h]:v,[p]:m});return{...f,data:{x:f.x-o,y:f.y-r}}}}};function qi(e){return F6(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gn(e){var t;return(t=(F6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F6(e){return e instanceof Node||e instanceof Br(e).Node}function Vl(e){return e instanceof Element||e instanceof Br(e).Element}function Dl(e){return e instanceof HTMLElement||e instanceof Br(e).HTMLElement}function j6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function Tc(e){const{overflow:t,overflowX:o,overflowY:r,display:l}=gl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!["inline","contents"].includes(l)}function Wj(e){return["table","td","th"].includes(qi(e))}function jd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fh(e){const t=jh(),o=gl(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function qj(e){let t=oa(e);for(;Dl(t)&&!Yi(t);){if(jd(t))return null;if(Fh(t))return t;t=oa(t)}return null}function jh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yi(e){return["html","body","#document"].includes(qi(e))}function gl(e){return Br(e).getComputedStyle(e)}function Kd(e){return Vl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oa(e){if(qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||j6(e)&&e.host||gn(e);return j6(t)?t.host:t}function K6(e){const t=oa(e);return Yi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dl(t)&&Tc(t)?t:K6(t)}function $c(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const l=K6(e),n=l===((r=e.ownerDocument)==null?void 0:r.body),a=Br(l);return n?t.concat(a,a.visualViewport||[],Tc(l)?l:[],a.frameElement&&o?$c(a.frameElement):[]):t.concat(l,$c(l,[],o))}function U6(e){const t=gl(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const l=Dl(e),n=l?e.offsetWidth:o,a=l?e.offsetHeight:r,i=Vd(o)!==n||Vd(r)!==a;return i&&(o=n,r=a),{width:o,height:r,$:i}}function Kh(e){return Vl(e)?e:e.contextElement}function Gi(e){const t=Kh(e);if(!Dl(t))return ta(1);const o=t.getBoundingClientRect(),{width:r,height:l,$:n}=U6(t);let a=(n?Vd(o.width):o.width)/r,i=(n?Vd(o.height):o.height)/l;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Yj=ta(0);function W6(e){const t=Br(e);return!jh()||!t.visualViewport?Yj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gj(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==Br(e)?!1:t}function ja(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const l=e.getBoundingClientRect(),n=Kh(e);let a=ta(1);t&&(r?Vl(r)&&(a=Gi(r)):a=Gi(e));const i=Gj(n,o,r)?W6(n):ta(0);let c=(l.left+i.x)/a.x,d=(l.top+i.y)/a.y,u=l.width/a.x,p=l.height/a.y;if(n){const h=Br(n),v=r&&Vl(r)?Br(r):r;let m=h,f=m.frameElement;for(;f&&r&&v!==m;){const _=Gi(f),g=f.getBoundingClientRect(),y=gl(f),w=g.left+(f.clientLeft+parseFloat(y.paddingLeft))*_.x,x=g.top+(f.clientTop+parseFloat(y.paddingTop))*_.y;c*=_.x,d*=_.y,u*=_.x,p*=_.y,c+=w,d+=x,m=Br(f),f=m.frameElement}}return Fd({width:u,height:p,x:c,y:d})}function Xj(e){let{elements:t,rect:o,offsetParent:r,strategy:l}=e;const n=l==="fixed",a=gn(r),i=t?jd(t.floating):!1;if(r===a||i&&n)return o;let c={scrollLeft:0,scrollTop:0},d=ta(1);const u=ta(0),p=Dl(r);if((p||!p&&!n)&&((qi(r)!=="body"||Tc(a))&&(c=Kd(r)),Dl(r))){const h=ja(r);d=Gi(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-c.scrollLeft*d.x+u.x,y:o.y*d.y-c.scrollTop*d.y+u.y}}function Zj(e){return Array.from(e.getClientRects())}function q6(e){return ja(gn(e)).left+Kd(e).scrollLeft}function Jj(e){const t=gn(e),o=Kd(e),r=e.ownerDocument.body,l=Ha(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=Ha(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+q6(e);const i=-o.scrollTop;return gl(r).direction==="rtl"&&(a+=Ha(t.clientWidth,r.clientWidth)-l),{width:l,height:n,x:a,y:i}}function Qj(e,t){const o=Br(e),r=gn(e),l=o.visualViewport;let n=r.clientWidth,a=r.clientHeight,i=0,c=0;if(l){n=l.width,a=l.height;const d=jh();(!d||d&&t==="fixed")&&(i=l.offsetLeft,c=l.offsetTop)}return{width:n,height:a,x:i,y:c}}function eK(e,t){const o=ja(e,!0,t==="fixed"),r=o.top+e.clientTop,l=o.left+e.clientLeft,n=Dl(e)?Gi(e):ta(1),a=e.clientWidth*n.x,i=e.clientHeight*n.y,c=l*n.x,d=r*n.y;return{width:a,height:i,x:c,y:d}}function Y6(e,t,o){let r;if(t==="viewport")r=Qj(e,o);else if(t==="document")r=Jj(gn(e));else if(Vl(t))r=eK(t,o);else{const l=W6(e);r={...t,x:t.x-l.x,y:t.y-l.y}}return Fd(r)}function G6(e,t){const o=oa(e);return o===t||!Vl(o)||Yi(o)?!1:gl(o).position==="fixed"||G6(o,t)}function tK(e,t){const o=t.get(e);if(o)return o;let r=$c(e,[],!1).filter(i=>Vl(i)&&qi(i)!=="body"),l=null;const n=gl(e).position==="fixed";let a=n?oa(e):e;for(;Vl(a)&&!Yi(a);){const i=gl(a),c=Fh(a);!c&&i.position==="fixed"&&(l=null),(n?!c&&!l:!c&&i.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||Tc(a)&&!c&&G6(e,a))?r=r.filter(u=>u!==a):l=i,a=oa(a)}return t.set(e,r),r}function oK(e){let{element:t,boundary:o,rootBoundary:r,strategy:l}=e;const a=[...o==="clippingAncestors"?jd(t)?[]:tK(t,this._c):[].concat(o),r],i=a[0],c=a.reduce((d,u)=>{const p=Y6(t,u,l);return d.top=Ha(p.top,d.top),d.right=Ui(p.right,d.right),d.bottom=Ui(p.bottom,d.bottom),d.left=Ha(p.left,d.left),d},Y6(t,i,l));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rK(e){const{width:t,height:o}=U6(e);return{width:t,height:o}}function lK(e,t,o){const r=Dl(t),l=gn(t),n=o==="fixed",a=ja(e,!0,n,t);let i={scrollLeft:0,scrollTop:0};const c=ta(0);if(r||!r&&!n)if((qi(t)!=="body"||Tc(l))&&(i=Kd(t)),r){const p=ja(t,!0,n,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else l&&(c.x=q6(l));const d=a.left+i.scrollLeft-c.x,u=a.top+i.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Uh(e){return gl(e).position==="static"}function X6(e,t){return!Dl(e)||gl(e).position==="fixed"?null:t?t(e):e.offsetParent}function Z6(e,t){const o=Br(e);if(jd(e))return o;if(!Dl(e)){let l=oa(e);for(;l&&!Yi(l);){if(Vl(l)&&!Uh(l))return l;l=oa(l)}return o}let r=X6(e,t);for(;r&&Wj(r)&&Uh(r);)r=X6(r,t);return r&&Yi(r)&&Uh(r)&&!Fh(r)?o:r||qj(e)||o}const nK=async function(e){const t=this.getOffsetParent||Z6,o=this.getDimensions,r=await o(e.floating);return{reference:lK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aK(e){return gl(e).direction==="rtl"}const iK={convertOffsetParentRelativeRectToViewportRelativeRect:Xj,getDocumentElement:gn,getClippingRect:oK,getOffsetParent:Z6,getElementRects:nK,getClientRects:Zj,getDimensions:rK,getScale:Gi,isElement:Vl,isRTL:aK};function sK(e,t){let o=null,r;const l=gn(e);function n(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),n();const{left:d,top:u,width:p,height:h}=e.getBoundingClientRect();if(i||t(),!p||!h)return;const v=Dd(u),m=Dd(l.clientWidth-(d+p)),f=Dd(l.clientHeight-(u+h)),_=Dd(d),y={rootMargin:-v+"px "+-m+"px "+-f+"px "+-_+"px",threshold:Ha(0,Ui(1,c))||1};let w=!0;function x($){const T=$[0].intersectionRatio;if(T!==c){if(!w)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(x,{...y,root:l.ownerDocument})}catch{o=new IntersectionObserver(x,y)}o.observe(e)}return a(!0),n}function cK(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Kh(e),u=l||n?[...d?$c(d):[],...$c(t)]:[];u.forEach(g=>{l&&g.addEventListener("scroll",o,{passive:!0}),n&&g.addEventListener("resize",o)});const p=d&&i?sK(d,o):null;let h=-1,v=null;a&&(v=new ResizeObserver(g=>{let[y]=g;y&&y.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),o()}),d&&!c&&v.observe(d),v.observe(t));let m,f=c?ja(e):null;c&&_();function _(){const g=ja(e);f&&(g.x!==f.x||g.y!==f.y||g.width!==f.width||g.height!==f.height)&&o(),f=g,m=requestAnimationFrame(_)}return o(),()=>{var g;u.forEach(y=>{l&&y.removeEventListener("scroll",o),n&&y.removeEventListener("resize",o)}),p==null||p(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const uK=Hh,J6=Kj,dK=Uj,pK=Fj,Q6=Hj,e4=(e,t,o)=>{const r=new Map,l={platform:iK,...o},n={...l.platform,_c:r};return Dj(e,t,{...l,platform:n})};Pe({});const fK=e=>{if(!Nt)return;if(!e)return e;const t=$r(e);return t||(Zt(e)?t:e)},hK=({middleware:e,placement:t,strategy:o})=>{const r=D(),l=D(),n=D(),a=D(),i=D({}),c={x:n,y:a,placement:t,strategy:o,middlewareData:i},d=async()=>{if(!Nt)return;const u=fK(r),p=$r(l);if(!u||!p)return;const h=await e4(u,p,{placement:s(t),strategy:s(o),middleware:s(e)});Ri(c).forEach(v=>{c[v].value=h[v]})};return ft(()=>{Go(()=>{d()})}),{...c,update:d,referenceRef:r,contentRef:l}},vK=({arrowRef:e,padding:t})=>({name:"arrow",options:{element:e,padding:t},fn(o){const r=s(e);return r?Q6({element:r,padding:t}).fn(o):{}}});function mK(e){const t=D();function o(){if(e.value==null)return;const{selectionStart:l,selectionEnd:n,value:a}=e.value;if(l==null||n==null)return;const i=a.slice(0,Math.max(0,l)),c=a.slice(Math.max(0,n));t.value={selectionStart:l,selectionEnd:n,value:a,beforeTxt:i,afterTxt:c}}function r(){if(e.value==null||t.value==null)return;const{value:l}=e.value,{beforeTxt:n,afterTxt:a,selectionStart:i}=t.value;if(n==null||a==null||i==null)return;let c=l.length;if(l.endsWith(a))c=l.length-a.length;else if(l.startsWith(n))c=n.length;else{const d=n[i-1],u=l.indexOf(d,i-1);u!==-1&&(c=u+1)}e.value.setSelectionRange(c,c)}return[o,r]}const gK=(e,t,o)=>Qn(e.subTree).filter(n=>{var a;return io(n)&&((a=n.type)==null?void 0:a.name)===t&&!!n.component}).map(n=>n.component.uid).map(n=>o[n]).filter(n=>!!n),Wh=(e,t)=>{const o={},r=lo([]);return{children:r,addChild:a=>{o[a.uid]=a,r.value=gK(e,t,o)},removeChild:a=>{delete o[a],r.value=r.value.filter(i=>i.uid!==a)}}},Oo=vl({type:String,values:Rl,required:!1}),t4=Symbol("size"),bK=()=>{const e=Ge(t4,{});return C(()=>s(e.size)||"")};function Ud(e,{afterFocus:t,beforeBlur:o,afterBlur:r}={}){const l=wt(),{emit:n}=l,a=lo(),i=D(!1),c=p=>{i.value||(i.value=!0,n("focus",p),t==null||t())},d=p=>{var h;it(o)&&o(p)||p.relatedTarget&&((h=a.value)!=null&&h.contains(p.relatedTarget))||(i.value=!1,n("blur",p),r==null||r())},u=()=>{var p;(p=e.value)==null||p.focus()};return Se(a,p=>{p&&p.setAttribute("tabindex","-1")}),oo(a,"click",u),{wrapperRef:a,isFocused:i,handleFocus:c,handleBlur:d}}const _K=["",void 0,null],wK=void 0,Xi=Pe({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>it(e)?!e():!e}}),Wd=(e,t)=>{let o=Mc();o.value||(o=D({}));const r=C(()=>e.emptyValues||o.value.emptyValues||_K),l=C(()=>it(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:it(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:t!==void 0?t:wK),n=a=>r.value.includes(a);return r.value.includes(l.value),{emptyValues:r,valueOnClear:l,isEmptyValue:n}},yK=Pe({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Zo=e=>Ol(yK,e),o4=Symbol(),qd=D();function Mc(e,t=void 0){const o=wt()?Ge(o4,qd):qd;return e?C(()=>{var r,l;return(l=(r=o.value)==null?void 0:r[e])!=null?l:t}):o}function Yd(e,t){const o=Mc(),r=ze(e,C(()=>{var i;return((i=o.value)==null?void 0:i.namespace)||gc})),l=Rt(C(()=>{var i;return(i=o.value)==null?void 0:i.locale})),n=Ki(C(()=>{var i;return((i=o.value)==null?void 0:i.zIndex)||R6})),a=C(()=>{var i;return s(t)||((i=o.value)==null?void 0:i.size)||""});return qh(C(()=>s(o)||{})),{ns:r,locale:l,zIndex:n,size:a}}const qh=(e,t,o=!1)=>{var r;const l=!!wt(),n=l?Mc():void 0,a=(r=t==null?void 0:t.provide)!=null?r:l?zt:void 0;if(!a)return;const i=C(()=>{const c=s(e);return n!=null&&n.value?xK(n.value,c):c});return a(o4,i),a(l6,C(()=>i.value.locale)),a(n6,C(()=>i.value.namespace)),a(B6,C(()=>i.value.zIndex)),a(t4,{size:C(()=>i.value.size||"")}),(o||!qd.value)&&(qd.value=i.value),i},xK=(e,t)=>{const o=[...new Set([...Ri(e),...Ri(t)])],r={};for(const l of o)r[l]=t[l]!==void 0?t[l]:e[l];return r},kK=Pe({a11y:{type:Boolean,default:!0},locale:{type:ue(Object)},size:Oo,button:{type:ue(Object)},experimentalFeatures:{type:ue(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:ue(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Xi}),Yh={},CK=yt(N({name:"ElConfigProvider",props:kK,setup(e,{slots:t}){Se(()=>e.message,r=>{Object.assign(Yh,r??{})},{immediate:!0,deep:!0});const o=qh(e);return()=>be(t,"default",{config:o==null?void 0:o.value})}})),SK="2.7.6",EK=(e=[])=>({version:SK,install:(o,r)=>{o[e6]||(o[e6]=!0,e.forEach(l=>o.use(l)),r&&qh(r,o,!0))}}),TK=Pe({zIndex:{type:ue([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),$K={scroll:({scrollTop:e,fixed:t})=>st(e)&&Co(t),[ro]:e=>Co(e)};var Le=(e,t)=>{const o=e.__vccOpts||e;for(const[r,l]of t)o[r]=l;return o};const r4="ElAffix",MK=N({...N({name:r4}),props:TK,emits:$K,setup(e,{expose:t,emit:o}){const r=e,l=ze("affix"),n=lo(),a=lo(),i=lo(),{height:c}=bE(),{height:d,width:u,top:p,bottom:h,update:v}=e_(a,{windowScroll:!1}),m=e_(n),f=D(!1),_=D(0),g=D(0),y=C(()=>({height:f.value?`${d.value}px`:"",width:f.value?`${u.value}px`:""})),w=C(()=>{if(!f.value)return{};const T=r.offset?mo(r.offset):0;return{height:`${d.value}px`,width:`${u.value}px`,top:r.position==="top"?T:"",bottom:r.position==="bottom"?T:"",transform:g.value?`translateY(${g.value}px)`:"",zIndex:r.zIndex}}),x=()=>{if(i.value)if(_.value=i.value instanceof Window?document.documentElement.scrollTop:i.value.scrollTop||0,r.position==="top")if(r.target){const T=m.bottom.value-r.offset-d.value;f.value=r.offset>p.value&&m.bottom.value>0,g.value=T<0?T:0}else f.value=r.offset>p.value;else if(r.target){const T=c.value-m.top.value-r.offset-d.value;f.value=c.value-r.offsetm.top.value,g.value=T<0?-T:0}else f.value=c.value-r.offset{v(),o("scroll",{scrollTop:_.value,fixed:f.value})};return Se(f,T=>o("change",T)),ft(()=>{var T;r.target?(n.value=(T=document.querySelector(r.target))!=null?T:void 0,n.value||Io(r4,`Target does not exist: ${r.target}`)):n.value=document.documentElement,i.value=uh(a.value,!0),v()}),oo(i,"scroll",$),Go(x),t({update:x,updateRoot:v}),(T,R)=>(b(),M("div",{ref_key:"root",ref:a,class:O(s(l).b()),style:Je(s(y))},[E("div",{class:O({[s(l).m("fixed")]:f.value}),style:Je(s(w))},[be(T.$slots,"default")],6)],6))}});var AK=Le(MK,[["__file","affix.vue"]]);const zK=yt(AK),IK=Pe({size:{type:ue([Number,String])},color:{type:String}}),OK=N({...N({name:"ElIcon",inheritAttrs:!1}),props:IK,setup(e){const t=e,o=ze("icon"),r=C(()=>{const{size:l,color:n}=t;return!l&&!n?{}:{fontSize:ko(l)?void 0:mo(l),"--color":n}});return(l,n)=>(b(),M("i",Mt({class:s(o).b(),style:s(r)},l.$attrs),[be(l.$slots,"default")],16))}});var NK=Le(OK,[["__file","icon.vue"]]);const Ze=yt(NK),PK=["light","dark"],RK=Pe({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Ri(Jn),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:PK,default:"light"}}),LK=N({...N({name:"ElAlert"}),props:RK,emits:{close:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,{Close:r}=bh,l=Do(),n=ze("alert"),a=D(!0),i=C(()=>Jn[o.type]),c=C(()=>[n.e("icon"),{[n.is("big")]:!!o.description||!!l.default}]),d=C(()=>({"with-description":o.description||l.default})),u=p=>{a.value=!1,t("close",p)};return(p,h)=>(b(),he(Mo,{name:s(n).b("fade"),persisted:""},{default:le(()=>[mt(E("div",{class:O([s(n).b(),s(n).m(p.type),s(n).is("center",p.center),s(n).is(p.effect)]),role:"alert"},[p.showIcon&&s(i)?(b(),he(s(Ze),{key:0,class:O(s(c))},{default:le(()=>[(b(),he(Et(s(i))))]),_:1},8,["class"])):se("v-if",!0),E("div",{class:O(s(n).e("content"))},[p.title||p.$slots.title?(b(),M("span",{key:0,class:O([s(n).e("title"),s(d)])},[be(p.$slots,"title",{},()=>[Ct($e(p.title),1)])],2)):se("v-if",!0),p.$slots.default||p.description?(b(),M("p",{key:1,class:O(s(n).e("description"))},[be(p.$slots,"default",{},()=>[Ct($e(p.description),1)])],2)):se("v-if",!0),p.closable?(b(),M(Qe,{key:2},[p.closeText?(b(),M("div",{key:0,class:O([s(n).e("close-btn"),s(n).is("customed")]),onClick:u},$e(p.closeText),3)):(b(),he(s(Ze),{key:1,class:O(s(n).e("close-btn")),onClick:u},{default:le(()=>[ee(s(r))]),_:1},8,["class"]))],64)):se("v-if",!0)],2)],2),[[Lt,a.value]])]),_:3},8,["name"]))}});var BK=Le(LK,[["__file","alert.vue"]]);const VK=yt(BK),Ka=Symbol("formContextKey"),Hl=Symbol("formItemContextKey"),So=(e,t={})=>{const o=D(void 0),r=t.prop?o:i6("size"),l=t.global?o:bK(),n=t.form?{size:void 0}:Ge(Ka,void 0),a=t.formItem?{size:void 0}:Ge(Hl,void 0);return C(()=>r.value||s(e)||(a==null?void 0:a.size)||(n==null?void 0:n.size)||l.value||"")},xr=e=>{const t=i6("disabled"),o=Ge(Ka,void 0);return C(()=>t.value||s(e)||(o==null?void 0:o.disabled)||!1)},sr=()=>{const e=Ge(Ka,void 0),t=Ge(Hl,void 0);return{form:e,formItem:t}},bl=(e,{formItemContext:t,disableIdGeneration:o,disableIdManagement:r})=>{o||(o=D(!1)),r||(r=D(!1));const l=D();let n;const a=C(()=>{var i;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((i=t.inputIds)==null?void 0:i.length)<=1)});return ft(()=>{n=Se([Yt(e,"id"),o],([i,c])=>{const d=i??(c?void 0:Qo().value);d!==l.value&&(t!=null&&t.removeInputId&&(l.value&&t.removeInputId(l.value),!(r!=null&&r.value)&&!c&&d&&t.addInputId(d)),l.value=d)},{immediate:!0})}),Rn(()=>{n&&n(),t!=null&&t.removeInputId&&l.value&&t.removeInputId(l.value)}),{isLabeledByFormItem:a,inputId:l}},DK=Pe({size:{type:String,values:Rl},disabled:Boolean}),HK=Pe({...DK,model:Object,rules:{type:ue(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),FK={validate:(e,t,o)=>(Ke(e)||ut(e))&&Co(t)&&ut(o)};function jK(){const e=D([]),t=C(()=>{if(!e.value.length)return"0";const n=Math.max(...e.value);return n?`${n}px`:""});function o(n){const a=e.value.indexOf(n);return a===-1&&t.value,a}function r(n,a){if(n&&a){const i=o(a);e.value.splice(i,1,n)}else n&&e.value.push(n)}function l(n){const a=o(n);a>-1&&e.value.splice(a,1)}return{autoLabelWidth:t,registerLabelWidth:r,deregisterLabelWidth:l}}const Gd=(e,t)=>{const o=Gn(t);return o.length>0?e.filter(r=>r.prop&&o.includes(r.prop)):e},KK=N({...N({name:"ElForm"}),props:HK,emits:FK,setup(e,{expose:t,emit:o}){const r=e,l=[],n=So(),a=ze("form"),i=C(()=>{const{labelPosition:w,inline:x}=r;return[a.b(),a.m(n.value||"default"),{[a.m(`label-${w}`)]:w,[a.m("inline")]:x}]}),c=w=>l.find(x=>x.prop===w),d=w=>{l.push(w)},u=w=>{w.prop&&l.splice(l.indexOf(w),1)},p=(w=[])=>{r.model&&Gd(l,w).forEach(x=>x.resetField())},h=(w=[])=>{Gd(l,w).forEach(x=>x.clearValidate())},v=C(()=>!!r.model),m=w=>{if(l.length===0)return[];const x=Gd(l,w);return x.length?x:[]},f=async w=>g(void 0,w),_=async(w=[])=>{if(!v.value)return!1;const x=m(w);if(x.length===0)return!0;let $={};for(const T of x)try{await T.validate("")}catch(R){$={...$,...R}}return Object.keys($).length===0?!0:Promise.reject($)},g=async(w=[],x)=>{const $=!it(x);try{const T=await _(w);return T===!0&&await(x==null?void 0:x(T)),T}catch(T){if(T instanceof Error)throw T;const R=T;return r.scrollToError&&y(Object.keys(R)[0]),await(x==null?void 0:x(!1,R)),$&&Promise.reject(R)}},y=w=>{var x;const $=Gd(l,w)[0];$&&((x=$.$el)==null||x.scrollIntoView(r.scrollIntoViewOptions))};return Se(()=>r.rules,()=>{r.validateOnRuleChange&&f().catch(w=>void 0)},{deep:!0}),zt(Ka,Dt({...Bo(r),emit:o,resetFields:p,clearValidate:h,validateField:g,getField:c,addField:d,removeField:u,...jK()})),t({validate:f,validateField:g,resetFields:p,clearValidate:h,scrollToField:y,fields:l}),(w,x)=>(b(),M("form",{class:O(s(i))},[be(w.$slots,"default")],2))}});var UK=Le(KK,[["__file","form.vue"]]);function WK(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l4={exports:{}},No=l4.exports={},Fl,jl;function Gh(){throw new Error("setTimeout has not been defined")}function Xh(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fl=setTimeout:Fl=Gh}catch{Fl=Gh}try{typeof clearTimeout=="function"?jl=clearTimeout:jl=Xh}catch{jl=Xh}})();function n4(e){if(Fl===setTimeout)return setTimeout(e,0);if((Fl===Gh||!Fl)&&setTimeout)return Fl=setTimeout,setTimeout(e,0);try{return Fl(e,0)}catch{try{return Fl.call(null,e,0)}catch{return Fl.call(this,e,0)}}}function qK(e){if(jl===clearTimeout)return clearTimeout(e);if((jl===Xh||!jl)&&clearTimeout)return jl=clearTimeout,clearTimeout(e);try{return jl(e)}catch{try{return jl.call(null,e)}catch{return jl.call(this,e)}}}var bn=[],Zi=!1,Ua,Xd=-1;function YK(){!Zi||!Ua||(Zi=!1,Ua.length?bn=Ua.concat(bn):Xd=-1,bn.length&&a4())}function a4(){if(!Zi){var e=n4(YK);Zi=!0;for(var t=bn.length;t;){for(Ua=bn,bn=[];++Xd1)for(var o=1;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zd(e,t,o){return QK()?Zd=Reflect.construct.bind():Zd=function(l,n,a){var i=[null];i.push.apply(i,n);var c=Function.bind.apply(l,i),d=new c;return a&&Ac(d,a.prototype),d},Zd.apply(null,arguments)}function eU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Jh(e){var t=typeof Map=="function"?new Map:void 0;return Jh=function(r){if(r===null||!eU(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,l)}function l(){return Zd(r,arguments,Zh(this).constructor)}return l.prototype=Object.create(r.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Ac(l,r)},Jh(e)}var tU=/%[sdj%]/g,oU=function(){};typeof XK<"u";function Qh(e){if(!e||!e.length)return null;var t={};return e.forEach(function(o){var r=o.field;t[r]=t[r]||[],t[r].push(o)}),t}function Vr(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r=n)return i;switch(i){case"%s":return String(o[l++]);case"%d":return Number(o[l++]);case"%j":try{return JSON.stringify(o[l++])}catch{return"[Circular]"}break;default:return i}});return a}return e}function rU(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ko(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||rU(t)&&typeof e=="string"&&!e)}function lU(e,t,o){var r=[],l=0,n=e.length;function a(i){r.push.apply(r,i||[]),l++,l===n&&o(r)}e.forEach(function(i){t(i,a)})}function s4(e,t,o){var r=0,l=e.length;function n(a){if(a&&a.length){o(a);return}var i=r;r=r+1,il)throw new RangeError('The value "'+Y+'" is invalid for option "size"');const S=new n(Y);return Object.setPrototypeOf(S,u.prototype),S}function u(Y,S,A){if(typeof Y=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(Y)}return p(Y,S,A)}u.poolSize=8192;function p(Y,S,A){if(typeof Y=="string")return f(Y,S);if(a.isView(Y))return g(Y);if(Y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y);if(ye(Y,a)||Y&&ye(Y.buffer,a)||typeof i<"u"&&(ye(Y,i)||Y&&ye(Y.buffer,i)))return y(Y,S,A);if(typeof Y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=Y.valueOf&&Y.valueOf();if(G!=null&&G!==Y)return u.from(G,S,A);const X=w(Y);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Y[Symbol.toPrimitive]=="function")return u.from(Y[Symbol.toPrimitive]("string"),S,A);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y)}u.from=function(Y,S,A){return p(Y,S,A)},Object.setPrototypeOf(u.prototype,n.prototype),Object.setPrototypeOf(u,n);function h(Y){if(typeof Y!="number")throw new TypeError('"size" argument must be of type number');if(Y<0)throw new RangeError('The value "'+Y+'" is invalid for option "size"')}function v(Y,S,A){return h(Y),Y<=0?d(Y):S!==void 0?typeof A=="string"?d(Y).fill(S,A):d(Y).fill(S):d(Y)}u.alloc=function(Y,S,A){return v(Y,S,A)};function m(Y){return h(Y),d(Y<0?0:x(Y)|0)}u.allocUnsafe=function(Y){return m(Y)},u.allocUnsafeSlow=function(Y){return m(Y)};function f(Y,S){if((typeof S!="string"||S==="")&&(S="utf8"),!u.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const A=T(Y,S)|0;let G=d(A);const X=G.write(Y,S);return X!==A&&(G=G.slice(0,X)),G}function _(Y){const S=Y.length<0?0:x(Y.length)|0,A=d(S);for(let G=0;G=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return Y|0}function $(Y){return+Y!=Y&&(Y=0),u.alloc(+Y)}u.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==u.prototype},u.compare=function(S,A){if(ye(S,n)&&(S=u.from(S,S.offset,S.byteLength)),ye(A,n)&&(A=u.from(A,A.offset,A.byteLength)),!u.isBuffer(S)||!u.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===A)return 0;let G=S.length,X=A.length;for(let re=0,ge=Math.min(G,X);reX.length?(u.isBuffer(ge)||(ge=u.from(ge)),ge.copy(X,re)):n.prototype.set.call(X,ge,re);else if(u.isBuffer(ge))ge.copy(X,re);else throw new TypeError('"list" argument must be an Array of Buffers');re+=ge.length}return X};function T(Y,S){if(u.isBuffer(Y))return Y.length;if(a.isView(Y)||ye(Y,a))return Y.byteLength;if(typeof Y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Y);const A=Y.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&A===0)return 0;let X=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":return Ie(Y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A*2;case"hex":return A>>>1;case"base64":return We(Y).length;default:if(X)return G?-1:Ie(Y).length;S=(""+S).toLowerCase(),X=!0}}u.byteLength=T;function L(Y,S,A){let G=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((A===void 0||A>this.length)&&(A=this.length),A<=0)||(A>>>=0,S>>>=0,A<=S))return"";for(Y||(Y="utf8");;)switch(Y){case"hex":return ne(this,S,A);case"utf8":case"utf-8":return j(this,S,A);case"ascii":return U(this,S,A);case"latin1":case"binary":return oe(this,S,A);case"base64":return H(this,S,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,S,A);default:if(G)throw new TypeError("Unknown encoding: "+Y);Y=(Y+"").toLowerCase(),G=!0}}u.prototype._isBuffer=!0;function P(Y,S,A){const G=Y[S];Y[S]=Y[A],Y[A]=G}u.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let A=0;AA&&(S+=" ... "),""},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(S,A,G,X,re){if(ye(S,n)&&(S=u.from(S,S.offset,S.byteLength)),!u.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(A===void 0&&(A=0),G===void 0&&(G=S?S.length:0),X===void 0&&(X=0),re===void 0&&(re=this.length),A<0||G>S.length||X<0||re>this.length)throw new RangeError("out of range index");if(X>=re&&A>=G)return 0;if(X>=re)return-1;if(A>=G)return 1;if(A>>>=0,G>>>=0,X>>>=0,re>>>=0,this===S)return 0;let ge=re-X,fe=G-A;const Fe=Math.min(ge,fe),at=this.slice(X,re),_t=S.slice(A,G);for(let At=0;At2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,Ye(A)&&(A=X?0:Y.length-1),A<0&&(A=Y.length+A),A>=Y.length){if(X)return-1;A=Y.length-1}else if(A<0)if(X)A=0;else return-1;if(typeof S=="string"&&(S=u.from(S,G)),u.isBuffer(S))return S.length===0?-1:V(Y,S,A,G,X);if(typeof S=="number")return S=S&255,typeof n.prototype.indexOf=="function"?X?n.prototype.indexOf.call(Y,S,A):n.prototype.lastIndexOf.call(Y,S,A):V(Y,[S],A,G,X);throw new TypeError("val must be string, number or Buffer")}function V(Y,S,A,G,X){let re=1,ge=Y.length,fe=S.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(Y.length<2||S.length<2)return-1;re=2,ge/=2,fe/=2,A/=2}function Fe(_t,At){return re===1?_t[At]:_t.readUInt16BE(At*re)}let at;if(X){let _t=-1;for(at=A;atge&&(A=ge-fe),at=A;at>=0;at--){let _t=!0;for(let At=0;AtX&&(G=X)):G=X;const re=S.length;G>re/2&&(G=re/2);let ge;for(ge=0;ge>>0,isFinite(G)?(G=G>>>0,X===void 0&&(X="utf8")):(X=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const re=this.length-A;if((G===void 0||G>re)&&(G=re),S.length>0&&(G<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");let ge=!1;for(;;)switch(X){case"hex":return B(this,S,A,G);case"utf8":case"utf-8":return F(this,S,A,G);case"ascii":case"latin1":case"binary":return Q(this,S,A,G);case"base64":return J(this,S,A,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,S,A,G);default:if(ge)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),ge=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(Y,S,A){return S===0&&A===Y.length?t.fromByteArray(Y):t.fromByteArray(Y.slice(S,A))}function j(Y,S,A){A=Math.min(Y.length,A);const G=[];let X=S;for(;X239?4:re>223?3:re>191?2:1;if(X+fe<=A){let Fe,at,_t,At;switch(fe){case 1:re<128&&(ge=re);break;case 2:Fe=Y[X+1],(Fe&192)===128&&(At=(re&31)<<6|Fe&63,At>127&&(ge=At));break;case 3:Fe=Y[X+1],at=Y[X+2],(Fe&192)===128&&(at&192)===128&&(At=(re&15)<<12|(Fe&63)<<6|at&63,At>2047&&(At<55296||At>57343)&&(ge=At));break;case 4:Fe=Y[X+1],at=Y[X+2],_t=Y[X+3],(Fe&192)===128&&(at&192)===128&&(_t&192)===128&&(At=(re&15)<<18|(Fe&63)<<12|(at&63)<<6|_t&63,At>65535&&At<1114112&&(ge=At))}}ge===null?(ge=65533,fe=1):ge>65535&&(ge-=65536,G.push(ge>>>10&1023|55296),ge=56320|ge&1023),G.push(ge),X+=fe}return I(G)}const K=4096;function I(Y){const S=Y.length;if(S<=K)return String.fromCharCode.apply(String,Y);let A="",G=0;for(;GG)&&(A=G);let X="";for(let re=S;reG&&(S=G),A<0?(A+=G,A<0&&(A=0)):A>G&&(A=G),AA)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(S,A,G){S=S>>>0,A=A>>>0,G||ee(S,A,this.length);let X=this[S],re=1,ge=0;for(;++ge>>0,A=A>>>0,G||ee(S,A,this.length);let X=this[S+--A],re=1;for(;A>0&&(re*=256);)X+=this[S+--A]*re;return X},u.prototype.readUint8=u.prototype.readUInt8=function(S,A){return S=S>>>0,A||ee(S,1,this.length),this[S]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(S,A){return S=S>>>0,A||ee(S,2,this.length),this[S]|this[S+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(S,A){return S=S>>>0,A||ee(S,2,this.length),this[S]<<8|this[S+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(S,A){return S=S>>>0,A||ee(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(S,A){return S=S>>>0,A||ee(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},u.prototype.readBigUInt64LE=pt(function(S){S=S>>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=A+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,re=this[++S]+this[++S]*2**8+this[++S]*2**16+G*2**24;return BigInt(X)+(BigInt(re)<>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=A*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],re=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+G;return(BigInt(X)<>>0,A=A>>>0,G||ee(S,A,this.length);let X=this[S],re=1,ge=0;for(;++ge=re&&(X-=Math.pow(2,8*A)),X},u.prototype.readIntBE=function(S,A,G){S=S>>>0,A=A>>>0,G||ee(S,A,this.length);let X=A,re=1,ge=this[S+--X];for(;X>0&&(re*=256);)ge+=this[S+--X]*re;return re*=128,ge>=re&&(ge-=Math.pow(2,8*A)),ge},u.prototype.readInt8=function(S,A){return S=S>>>0,A||ee(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},u.prototype.readInt16LE=function(S,A){S=S>>>0,A||ee(S,2,this.length);const G=this[S]|this[S+1]<<8;return G&32768?G|4294901760:G},u.prototype.readInt16BE=function(S,A){S=S>>>0,A||ee(S,2,this.length);const G=this[S+1]|this[S]<<8;return G&32768?G|4294901760:G},u.prototype.readInt32LE=function(S,A){return S=S>>>0,A||ee(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},u.prototype.readInt32BE=function(S,A){return S=S>>>0,A||ee(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},u.prototype.readBigInt64LE=pt(function(S){S=S>>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(G<<24);return(BigInt(X)<>>0,Oe(S,"offset");const A=this[S],G=this[S+7];(A===void 0||G===void 0)&&we(S,this.length-8);const X=(A<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(X)<>>0,A||ee(S,4,this.length),o.read(this,S,!0,23,4)},u.prototype.readFloatBE=function(S,A){return S=S>>>0,A||ee(S,4,this.length),o.read(this,S,!1,23,4)},u.prototype.readDoubleLE=function(S,A){return S=S>>>0,A||ee(S,8,this.length),o.read(this,S,!0,52,8)},u.prototype.readDoubleBE=function(S,A){return S=S>>>0,A||ee(S,8,this.length),o.read(this,S,!1,52,8)};function Me(Y,S,A,G,X,re){if(!u.isBuffer(Y))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>X||SY.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(S,A,G,X){if(S=+S,A=A>>>0,G=G>>>0,!X){const fe=Math.pow(2,8*G)-1;Me(this,S,A,G,fe,0)}let re=1,ge=0;for(this[A]=S&255;++ge>>0,G=G>>>0,!X){const fe=Math.pow(2,8*G)-1;Me(this,S,A,G,fe,0)}let re=G-1,ge=1;for(this[A+re]=S&255;--re>=0&&(ge*=256);)this[A+re]=S/ge&255;return A+G},u.prototype.writeUint8=u.prototype.writeUInt8=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,1,255,0),this[A]=S&255,A+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,65535,0),this[A]=S&255,this[A+1]=S>>>8,A+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,65535,0),this[A]=S>>>8,this[A+1]=S&255,A+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,4294967295,0),this[A+3]=S>>>24,this[A+2]=S>>>16,this[A+1]=S>>>8,this[A]=S&255,A+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,4294967295,0),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4};function de(Y,S,A,G,X){ke(S,G,X,Y,A,7);let re=Number(S&BigInt(4294967295));Y[A++]=re,re=re>>8,Y[A++]=re,re=re>>8,Y[A++]=re,re=re>>8,Y[A++]=re;let ge=Number(S>>BigInt(32)&BigInt(4294967295));return Y[A++]=ge,ge=ge>>8,Y[A++]=ge,ge=ge>>8,Y[A++]=ge,ge=ge>>8,Y[A++]=ge,A}function _e(Y,S,A,G,X){ke(S,G,X,Y,A,7);let re=Number(S&BigInt(4294967295));Y[A+7]=re,re=re>>8,Y[A+6]=re,re=re>>8,Y[A+5]=re,re=re>>8,Y[A+4]=re;let ge=Number(S>>BigInt(32)&BigInt(4294967295));return Y[A+3]=ge,ge=ge>>8,Y[A+2]=ge,ge=ge>>8,Y[A+1]=ge,ge=ge>>8,Y[A]=ge,A+8}u.prototype.writeBigUInt64LE=pt(function(S,A=0){return de(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=pt(function(S,A=0){return _e(this,S,A,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(S,A,G,X){if(S=+S,A=A>>>0,!X){const Fe=Math.pow(2,8*G-1);Me(this,S,A,G,Fe-1,-Fe)}let re=0,ge=1,fe=0;for(this[A]=S&255;++re>0)-fe&255;return A+G},u.prototype.writeIntBE=function(S,A,G,X){if(S=+S,A=A>>>0,!X){const Fe=Math.pow(2,8*G-1);Me(this,S,A,G,Fe-1,-Fe)}let re=G-1,ge=1,fe=0;for(this[A+re]=S&255;--re>=0&&(ge*=256);)S<0&&fe===0&&this[A+re+1]!==0&&(fe=1),this[A+re]=(S/ge>>0)-fe&255;return A+G},u.prototype.writeInt8=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,1,127,-128),S<0&&(S=255+S+1),this[A]=S&255,A+1},u.prototype.writeInt16LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,32767,-32768),this[A]=S&255,this[A+1]=S>>>8,A+2},u.prototype.writeInt16BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,2,32767,-32768),this[A]=S>>>8,this[A+1]=S&255,A+2},u.prototype.writeInt32LE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,2147483647,-2147483648),this[A]=S&255,this[A+1]=S>>>8,this[A+2]=S>>>16,this[A+3]=S>>>24,A+4},u.prototype.writeInt32BE=function(S,A,G){return S=+S,A=A>>>0,G||Me(this,S,A,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[A]=S>>>24,this[A+1]=S>>>16,this[A+2]=S>>>8,this[A+3]=S&255,A+4},u.prototype.writeBigInt64LE=pt(function(S,A=0){return de(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=pt(function(S,A=0){return _e(this,S,A,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function me(Y,S,A,G,X,re){if(A+G>Y.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function Re(Y,S,A,G,X){return S=+S,A=A>>>0,X||me(Y,S,A,4),o.write(Y,S,A,G,23,4),A+4}u.prototype.writeFloatLE=function(S,A,G){return Re(this,S,A,!0,G)},u.prototype.writeFloatBE=function(S,A,G){return Re(this,S,A,!1,G)};function Ce(Y,S,A,G,X){return S=+S,A=A>>>0,X||me(Y,S,A,8),o.write(Y,S,A,G,52,8),A+8}u.prototype.writeDoubleLE=function(S,A,G){return Ce(this,S,A,!0,G)},u.prototype.writeDoubleBE=function(S,A,G){return Ce(this,S,A,!1,G)},u.prototype.copy=function(S,A,G,X){if(!u.isBuffer(S))throw new TypeError("argument should be a Buffer");if(G||(G=0),!X&&X!==0&&(X=this.length),A>=S.length&&(A=S.length),A||(A=0),X>0&&X=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),S.length-A>>0,G=G===void 0?this.length:G>>>0,S||(S=0);let re;if(typeof S=="number")for(re=A;re2**32?X=ae(String(A)):typeof A=="bigint"&&(X=String(A),(A>BigInt(2)**BigInt(32)||A<-(BigInt(2)**BigInt(32)))&&(X=ae(X)),X+="n"),G+=` It must be ${S}. Received ${X}`,G},RangeError);function ae(Y){let S="",A=Y.length;const G=Y[0]==="-"?1:0;for(;A>=G+4;A-=3)S=`_${Y.slice(A-3,A)}${S}`;return`${Y.slice(0,A)}${S}`}function pe(Y,S,A){Oe(S,"offset"),(Y[S]===void 0||Y[S+A]===void 0)&&we(S,Y.length-(A+1))}function ke(Y,S,A,G,X,re){if(Y>A||Y= 0${ge} and < 2${ge} ** ${(re+1)*8}${ge}`:fe=`>= -(2${ge} ** ${(re+1)*8-1}${ge}) and < 2 ** ${(re+1)*8-1}${ge}`,new Ee.ERR_OUT_OF_RANGE("value",fe,Y)}pe(G,X,re)}function Oe(Y,S){if(typeof Y!="number")throw new Ee.ERR_INVALID_ARG_TYPE(S,"number",Y)}function we(Y,S,A){throw Math.floor(Y)!==Y?(Oe(Y,A),new Ee.ERR_OUT_OF_RANGE("offset","an integer",Y)):S<0?new Ee.ERR_BUFFER_OUT_OF_BOUNDS:new Ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,Y)}const Te=/[^+/0-9A-Za-z-_]/g;function Ne(Y){if(Y=Y.split("=")[0],Y=Y.trim().replace(Te,""),Y.length<2)return"";for(;Y.length%4!==0;)Y=Y+"=";return Y}function Ie(Y,S){S=S||1/0;let A;const G=Y.length;let X=null;const re=[];for(let ge=0;ge55295&&A<57344){if(!X){if(A>56319){(S-=3)>-1&&re.push(239,191,189);continue}else if(ge+1===G){(S-=3)>-1&&re.push(239,191,189);continue}X=A;continue}if(A<56320){(S-=3)>-1&&re.push(239,191,189),X=A;continue}A=(X-55296<<10|A-56320)+65536}else X&&(S-=3)>-1&&re.push(239,191,189);if(X=null,A<128){if((S-=1)<0)break;re.push(A)}else if(A<2048){if((S-=2)<0)break;re.push(A>>6|192,A&63|128)}else if(A<65536){if((S-=3)<0)break;re.push(A>>12|224,A>>6&63|128,A&63|128)}else if(A<1114112){if((S-=4)<0)break;re.push(A>>18|240,A>>12&63|128,A>>6&63|128,A&63|128)}else throw new Error("Invalid code point")}return re}function Ae(Y){const S=[];for(let A=0;A>8,X=A%256,re.push(X),re.push(G);return re}function We(Y){return t.toByteArray(Ne(Y))}function qe(Y,S,A,G){let X;for(X=0;X=S.length||X>=Y.length);++X)S[X+A]=Y[X];return X}function ye(Y,S){return Y instanceof S||Y!=null&&Y.constructor!=null&&Y.constructor.name!=null&&Y.constructor.name===S.name}function Ye(Y){return Y!==Y}const tt=function(){const Y="0123456789abcdef",S=new Array(256);for(let A=0;A<16;++A){const G=A*16;for(let X=0;X<16;++X)S[G+X]=Y[A]+Y[X]}return S}();function pt(Y){return typeof BigInt>"u"?dt:Y}function dt(){throw new Error("BigInt not supported")}})(db);const U7=db.Buffer;function jt(e,t,o,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),r&&(this.request=r),l&&(this.response=l)}Ue.inherits(jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const fb=jt.prototype,hb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{hb[e]={value:e}}),Object.defineProperties(jt,hb),Object.defineProperty(fb,"isAxiosError",{value:!0}),jt.from=(e,t,o,r,l,n)=>{const a=Object.create(fb);return Ue.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),jt.call(a,e.message,t,o,r,l),a.cause=e,a.name=e.name,n&&Object.assign(a,n),a};const W7=null;function v0(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function vb(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function mb(e,t,o){return e?e.concat(t).map(function(l,n){return l=vb(l),!o&&n?"["+l+"]":l}).join(o?".":""):t}function q7(e){return Ue.isArray(e)&&!e.some(v0)}const Y7=Ue.toFlatObject(Ue,{},null,function(t){return/^is[A-Z]/.test(t)});function nd(e,t,o){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=Ue.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,_){return!Ue.isUndefined(_[f])});const r=o.metaTokens,l=o.visitor||u,n=o.dots,a=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(l))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(Ue.isDate(m))return m.toISOString();if(!c&&Ue.isBlob(m))throw new jt("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(m)||Ue.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):U7.from(m):m}function u(m,f,_){let g=m;if(m&&!_&&typeof m=="object"){if(Ue.endsWith(f,"{}"))f=r?f:f.slice(0,-2),m=JSON.stringify(m);else if(Ue.isArray(m)&&q7(m)||(Ue.isFileList(m)||Ue.endsWith(f,"[]"))&&(g=Ue.toArray(m)))return f=vb(f),g.forEach(function(w,x){!(Ue.isUndefined(w)||w===null)&&t.append(a===!0?mb([f],x,n):a===null?f:f+"[]",d(w))}),!1}return v0(m)?!0:(t.append(mb(_,f,n),d(m)),!1)}const p=[],h=Object.assign(Y7,{defaultVisitor:u,convertValue:d,isVisitable:v0});function v(m,f){if(!Ue.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),Ue.forEach(m,function(g,y){(!(Ue.isUndefined(g)||g===null)&&l.call(t,g,Ue.isString(y)?y.trim():y,f,h))===!0&&v(g,f?f.concat(y):[y])}),p.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return v(e),t}function gb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function m0(e,t){this._pairs=[],e&&nd(e,this,t)}const bb=m0.prototype;bb.append=function(t,o){this._pairs.push([t,o])},bb.toString=function(t){const o=t?function(r){return t.call(this,r,gb)}:gb;return this._pairs.map(function(l){return o(l[0])+"="+o(l[1])},"").join("&")};function G7(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _b(e,t,o){if(!t)return e;const r=o&&o.encode||G7,l=o&&o.serialize;let n;if(l?n=l(t,o):n=Ue.isURLSearchParams(t)?t.toString():new m0(t,o).toString(r),n){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}class wb{constructor(){this.handlers=[]}use(t,o,r){return this.handlers.push({fulfilled:t,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},X7={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:m0,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},g0=typeof window<"u"&&typeof document<"u",Z7=(e=>g0&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),J7=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Q7=g0&&window.location.href||"http://localhost",dl={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:g0,hasStandardBrowserEnv:Z7,hasStandardBrowserWebWorkerEnv:J7,origin:Q7},Symbol.toStringTag,{value:"Module"})),...X7};function eS(e,t){return nd(e,new dl.classes.URLSearchParams,Object.assign({visitor:function(o,r,l,n){return dl.isNode&&Ue.isBuffer(o)?(this.append(r,o.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function tS(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function oS(e){const t={},o=Object.keys(e);let r;const l=o.length;let n;for(r=0;r=o.length;return a=!a&&Ue.isArray(l)?l.length:a,c?(Ue.hasOwnProp(l,a)?l[a]=[l[a],r]:l[a]=r,!i):((!l[a]||!Ue.isObject(l[a]))&&(l[a]=[]),t(o,r,l[a],n)&&Ue.isArray(l[a])&&(l[a]=oS(l[a])),!i)}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const o={};return Ue.forEachEntry(e,(r,l)=>{t(tS(r),l,o,0)}),o}return null}function rS(e,t,o){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(e)}const ec={transitional:yb,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const r=o.getContentType()||"",l=r.indexOf("application/json")>-1,n=Ue.isObject(t);if(n&&Ue.isHTMLForm(t)&&(t=new FormData(t)),Ue.isFormData(t))return l?JSON.stringify(xb(t)):t;if(Ue.isArrayBuffer(t)||Ue.isBuffer(t)||Ue.isStream(t)||Ue.isFile(t)||Ue.isBlob(t)||Ue.isReadableStream(t))return t;if(Ue.isArrayBufferView(t))return t.buffer;if(Ue.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return eS(t,this.formSerializer).toString();if((i=Ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return nd(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return n||l?(o.setContentType("application/json",!1),rS(t)):t}],transformResponse:[function(t){const o=this.transitional||ec.transitional,r=o&&o.forcedJSONParsing,l=this.responseType==="json";if(Ue.isResponse(t)||Ue.isReadableStream(t))return t;if(t&&Ue.isString(t)&&(r&&!this.responseType||l)){const a=!(o&&o.silentJSONParsing)&&l;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?jt.from(i,jt.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dl.classes.FormData,Blob:dl.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{ec.headers[e]={}});const lS=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nS=e=>{const t={};let o,r,l;return e&&e.split(` +`).forEach(function(a){l=a.indexOf(":"),o=a.substring(0,l).trim().toLowerCase(),r=a.substring(l+1).trim(),!(!o||t[o]&&lS[o])&&(o==="set-cookie"?t[o]?t[o].push(r):t[o]=[r]:t[o]=t[o]?t[o]+", "+r:r)}),t},kb=Symbol("internals");function tc(e){return e&&String(e).trim().toLowerCase()}function ad(e){return e===!1||e==null?e:Ue.isArray(e)?e.map(ad):String(e)}function aS(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(e);)t[r[1]]=r[2];return t}const iS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function b0(e,t,o,r,l){if(Ue.isFunction(r))return r.call(this,t,o);if(l&&(t=o),!!Ue.isString(t)){if(Ue.isString(r))return t.indexOf(r)!==-1;if(Ue.isRegExp(r))return r.test(t)}}function sS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,r)=>o.toUpperCase()+r)}function cS(e,t){const o=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+o,{value:function(l,n,a){return this[r].call(this,t,l,n,a)},configurable:!0})})}class Tr{constructor(t){t&&this.set(t)}set(t,o,r){const l=this;function n(i,c,d){const u=tc(c);if(!u)throw new Error("header name must be a non-empty string");const p=Ue.findKey(l,u);(!p||l[p]===void 0||d===!0||d===void 0&&l[p]!==!1)&&(l[p||c]=ad(i))}const a=(i,c)=>Ue.forEach(i,(d,u)=>n(d,u,c));if(Ue.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(Ue.isString(t)&&(t=t.trim())&&!iS(t))a(nS(t),o);else if(Ue.isHeaders(t))for(const[i,c]of t.entries())n(c,i,r);else t!=null&&n(o,t,r);return this}get(t,o){if(t=tc(t),t){const r=Ue.findKey(this,t);if(r){const l=this[r];if(!o)return l;if(o===!0)return aS(l);if(Ue.isFunction(o))return o.call(this,l,r);if(Ue.isRegExp(o))return o.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=tc(t),t){const r=Ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!o||b0(this,this[r],r,o)))}return!1}delete(t,o){const r=this;let l=!1;function n(a){if(a=tc(a),a){const i=Ue.findKey(r,a);i&&(!o||b0(r,r[i],i,o))&&(delete r[i],l=!0)}}return Ue.isArray(t)?t.forEach(n):n(t),l}clear(t){const o=Object.keys(this);let r=o.length,l=!1;for(;r--;){const n=o[r];(!t||b0(this,this[n],n,t,!0))&&(delete this[n],l=!0)}return l}normalize(t){const o=this,r={};return Ue.forEach(this,(l,n)=>{const a=Ue.findKey(r,n);if(a){o[a]=ad(l),delete o[n];return}const i=t?sS(n):String(n).trim();i!==n&&delete o[n],o[i]=ad(l),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return Ue.forEach(this,(r,l)=>{r!=null&&r!==!1&&(o[l]=t&&Ue.isArray(r)?r.join(", "):r)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const r=new this(t);return o.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[kb]=this[kb]={accessors:{}}).accessors,l=this.prototype;function n(a){const i=tc(a);r[i]||(cS(l,a),r[i]=!0)}return Ue.isArray(t)?t.forEach(n):n(t),this}}Tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ue.reduceDescriptors(Tr.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[o]=r}}}),Ue.freezeMethods(Tr);function _0(e,t){const o=this||ec,r=t||o,l=Tr.from(r.headers);let n=r.data;return Ue.forEach(e,function(i){n=i.call(o,n,l.normalize(),t?t.status:void 0)}),l.normalize(),n}function Cb(e){return!!(e&&e.__CANCEL__)}function Ti(e,t,o){jt.call(this,e??"canceled",jt.ERR_CANCELED,t,o),this.name="CanceledError"}Ue.inherits(Ti,jt,{__CANCEL__:!0});function Sb(e,t,o){const r=o.config.validateStatus;!o.status||!r||r(o.status)?e(o):t(new jt("Request failed with status code "+o.status,[jt.ERR_BAD_REQUEST,jt.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function uS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dS(e,t){e=e||10;const o=new Array(e),r=new Array(e);let l=0,n=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[n];a||(a=d),o[l]=c,r[l]=d;let p=n,h=0;for(;p!==l;)h+=o[p++],p=p%e;if(l=(l+1)%e,l===n&&(n=(n+1)%e),d-ar)return l&&(clearTimeout(l),l=null),o=i,e.apply(null,arguments);l||(l=setTimeout(()=>(l=null,o=Date.now(),e.apply(null,arguments)),r-(i-o)))}}const id=(e,t,o=3)=>{let r=0;const l=dS(50,250);return pS(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,c=a-r,d=l(c),u=a<=i;r=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&u?(i-a)/d:void 0,event:n,lengthComputable:i!=null};p[t?"download":"upload"]=!0,e(p)},o)},fS=dl.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let r;function l(n){let a=n;return t&&(o.setAttribute("href",a),a=o.href),o.setAttribute("href",a),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return r=l(window.location.href),function(a){const i=Ue.isString(a)?l(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),hS=dl.hasStandardBrowserEnv?{write(e,t,o,r,l,n){const a=[e+"="+encodeURIComponent(t)];Ue.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),Ue.isString(r)&&a.push("path="+r),Ue.isString(l)&&a.push("domain="+l),n===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Eb(e,t){return e&&!vS(t)?mS(e,t):t}const Tb=e=>e instanceof Tr?{...e}:e;function Ea(e,t){t=t||{};const o={};function r(d,u,p){return Ue.isPlainObject(d)&&Ue.isPlainObject(u)?Ue.merge.call({caseless:p},d,u):Ue.isPlainObject(u)?Ue.merge({},u):Ue.isArray(u)?u.slice():u}function l(d,u,p){if(Ue.isUndefined(u)){if(!Ue.isUndefined(d))return r(void 0,d,p)}else return r(d,u,p)}function n(d,u){if(!Ue.isUndefined(u))return r(void 0,u)}function a(d,u){if(Ue.isUndefined(u)){if(!Ue.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function i(d,u,p){if(p in t)return r(d,u);if(p in e)return r(void 0,d)}const c={url:n,method:n,data:n,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(d,u)=>l(Tb(d),Tb(u),!0)};return Ue.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=c[u]||l,h=p(e[u],t[u],u);Ue.isUndefined(h)&&p!==i||(o[u]=h)}),o}const $b=e=>{const t=Ea({},e);let{data:o,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:n,headers:a,auth:i}=t;t.headers=a=Tr.from(a),t.url=_b(Eb(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(Ue.isFormData(o)){if(dl.hasStandardBrowserEnv||dl.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[d,...u]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...u].join("; "))}}if(dl.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||r!==!1&&fS(t.url))){const d=l&&n&&hS.read(n);d&&a.set(l,d)}return t},gS=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,r){const l=$b(e);let n=l.data;const a=Tr.from(l.headers).normalize();let{responseType:i}=l,c;function d(){l.cancelToken&&l.cancelToken.unsubscribe(c),l.signal&&l.signal.removeEventListener("abort",c)}let u=new XMLHttpRequest;u.open(l.method.toUpperCase(),l.url,!0),u.timeout=l.timeout;function p(){if(!u)return;const v=Tr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),f={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:v,config:e,request:u};Sb(function(g){o(g),d()},function(g){r(g),d()},f),u=null}"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(r(new jt("Request aborted",jt.ECONNABORTED,l,u)),u=null)},u.onerror=function(){r(new jt("Network Error",jt.ERR_NETWORK,l,u)),u=null},u.ontimeout=function(){let m=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const f=l.transitional||yb;l.timeoutErrorMessage&&(m=l.timeoutErrorMessage),r(new jt(m,f.clarifyTimeoutError?jt.ETIMEDOUT:jt.ECONNABORTED,l,u)),u=null},n===void 0&&a.setContentType(null),"setRequestHeader"in u&&Ue.forEach(a.toJSON(),function(m,f){u.setRequestHeader(f,m)}),Ue.isUndefined(l.withCredentials)||(u.withCredentials=!!l.withCredentials),i&&i!=="json"&&(u.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&u.addEventListener("progress",id(l.onDownloadProgress,!0)),typeof l.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",id(l.onUploadProgress)),(l.cancelToken||l.signal)&&(c=v=>{u&&(r(!v||v.type?new Ti(null,e,u):v),u.abort(),u=null)},l.cancelToken&&l.cancelToken.subscribe(c),l.signal&&(l.signal.aborted?c():l.signal.addEventListener("abort",c)));const h=uS(l.url);if(h&&dl.protocols.indexOf(h)===-1){r(new jt("Unsupported protocol "+h+":",jt.ERR_BAD_REQUEST,e));return}u.send(n||null)})},bS=(e,t)=>{let o=new AbortController,r;const l=function(c){if(!r){r=!0,a();const d=c instanceof Error?c:this.reason;o.abort(d instanceof jt?d:new Ti(d instanceof Error?d.message:d))}};let n=t&&setTimeout(()=>{l(new jt(`timeout ${t} of ms exceeded`,jt.ETIMEDOUT))},t);const a=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",l):c.unsubscribe(l))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",l));const{signal:i}=o;return i.unsubscribe=a,[i,()=>{n&&clearTimeout(n),n=null}]},_S=function*(e,t){let o=e.byteLength;if(!t||o{const n=wS(e,t,l);let a=0;return new ReadableStream({type:"bytes",async pull(i){const{done:c,value:d}=await n.next();if(c){i.close(),r();return}let u=d.byteLength;o&&o(a+=u),i.enqueue(new Uint8Array(d))},cancel(i){return r(i),n.return()}},{highWaterMark:2})},Ab=(e,t)=>{const o=e!=null;return r=>setTimeout(()=>t({lengthComputable:o,total:e,loaded:r}))},sd=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zb=sd&&typeof ReadableStream=="function",w0=sd&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),yS=zb&&(()=>{let e=!1;const t=new Request(dl.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Ib=64*1024,y0=zb&&!!(()=>{try{return Ue.isReadableStream(new Response("").body)}catch{}})(),cd={stream:y0&&(e=>e.body)};sd&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!cd[t]&&(cd[t]=Ue.isFunction(e[t])?o=>o[t]():(o,r)=>{throw new jt(`Response type '${t}' is not supported`,jt.ERR_NOT_SUPPORT,r)})})})(new Response);const xS=async e=>{if(e==null)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Ue.isArrayBufferView(e))return e.byteLength;if(Ue.isURLSearchParams(e)&&(e=e+""),Ue.isString(e))return(await w0(e)).byteLength},kS=async(e,t)=>{const o=Ue.toFiniteNumber(e.getContentLength());return o??xS(t)},x0={http:W7,xhr:gS,fetch:sd&&(async e=>{let{url:t,method:o,data:r,signal:l,cancelToken:n,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:u,withCredentials:p="same-origin",fetchOptions:h}=$b(e);d=d?(d+"").toLowerCase():"text";let[v,m]=l||n||a?bS([l,n],a):[],f,_;const g=()=>{!f&&setTimeout(()=>{v&&v.unsubscribe()}),f=!0};let y;try{if(c&&yS&&o!=="get"&&o!=="head"&&(y=await kS(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),L;Ue.isFormData(r)&&(L=T.headers.get("content-type"))&&u.setContentType(L),T.body&&(r=Mb(T.body,Ib,Ab(y,id(c)),null,w0))}Ue.isString(p)||(p=p?"cors":"omit"),_=new Request(t,{...h,signal:v,method:o.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let w=await fetch(_);const x=y0&&(d==="stream"||d==="response");if(y0&&(i||x)){const T={};["status","statusText","headers"].forEach(P=>{T[P]=w[P]});const L=Ue.toFiniteNumber(w.headers.get("content-length"));w=new Response(Mb(w.body,Ib,i&&Ab(L,id(i,!0)),x&&g,w0),T)}d=d||"text";let $=await cd[Ue.findKey(cd,d)||"text"](w,e);return!x&&g(),m&&m(),await new Promise((T,L)=>{Sb(T,L,{data:$,headers:Tr.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:_})})}catch(w){throw g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new jt("Network Error",jt.ERR_NETWORK,e,_),{cause:w.cause||w}):jt.from(w,w&&w.code,e,_)}})};Ue.forEach(x0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ob=e=>`- ${e}`,CS=e=>Ue.isFunction(e)||e===null||e===!1,Nb={getAdapter:e=>{e=Ue.isArray(e)?e:[e];const{length:t}=e;let o,r;const l={};for(let n=0;n`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?n.length>1?`since : +`+n.map(Ob).join(` +`):" "+Ob(n[0]):"as no adapter specified";throw new jt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:x0};function k0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ti(null,e)}function Pb(e){return k0(e),e.headers=Tr.from(e.headers),e.data=_0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nb.getAdapter(e.adapter||ec.adapter)(e).then(function(r){return k0(e),r.data=_0.call(e,e.transformResponse,r),r.headers=Tr.from(r.headers),r},function(r){return Cb(r)||(k0(e),r&&r.response&&(r.response.data=_0.call(e,e.transformResponse,r.response),r.response.headers=Tr.from(r.response.headers))),Promise.reject(r)})}const Rb="1.7.2",C0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{C0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Lb={};C0.transitional=function(t,o,r){function l(n,a){return"[Axios v"+Rb+"] Transitional option '"+n+"'"+a+(r?". "+r:"")}return(n,a,i)=>{if(t===!1)throw new jt(l(a," has been removed"+(o?" in "+o:"")),jt.ERR_DEPRECATED);return o&&!Lb[a]&&(Lb[a]=!0,console.warn(l(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(n,a,i):!0}};function SS(e,t,o){if(typeof e!="object")throw new jt("options must be an object",jt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const n=r[l],a=t[n];if(a){const i=e[n],c=i===void 0||a(i,n,e);if(c!==!0)throw new jt("option "+n+" must be "+c,jt.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new jt("Unknown option "+n,jt.ERR_BAD_OPTION)}}const S0={assertOptions:SS,validators:C0},Wn=S0.validators;class Ta{constructor(t){this.defaults=t,this.interceptors={request:new wb,response:new wb}}async request(t,o){try{return await this._request(t,o)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;const n=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+n):r.stack=n}catch{}}throw r}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Ea(this.defaults,o);const{transitional:r,paramsSerializer:l,headers:n}=o;r!==void 0&&S0.assertOptions(r,{silentJSONParsing:Wn.transitional(Wn.boolean),forcedJSONParsing:Wn.transitional(Wn.boolean),clarifyTimeoutError:Wn.transitional(Wn.boolean)},!1),l!=null&&(Ue.isFunction(l)?o.paramsSerializer={serialize:l}:S0.assertOptions(l,{encode:Wn.function,serialize:Wn.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=n&&Ue.merge(n.common,n[o.method]);n&&Ue.forEach(["delete","get","head","post","put","patch","common"],m=>{delete n[m]}),o.headers=Tr.concat(a,n);const i=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(o)===!1||(c=c&&f.synchronous,i.unshift(f.fulfilled,f.rejected))});const d=[];this.interceptors.response.forEach(function(f){d.push(f.fulfilled,f.rejected)});let u,p=0,h;if(!c){const m=[Pb.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,d),h=m.length,u=Promise.resolve(o);p{if(!r._listeners)return;let n=r._listeners.length;for(;n-- >0;)r._listeners[n](l);r._listeners=null}),this.promise.then=l=>{let n;const a=new Promise(i=>{r.subscribe(i),n=i}).then(l);return a.cancel=function(){r.unsubscribe(n)},a},t(function(n,a,i){r.reason||(r.reason=new Ti(n,a,i),o(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new E0(function(l){t=l}),cancel:t}}}function ES(e){return function(o){return e.apply(null,o)}}function TS(e){return Ue.isObject(e)&&e.isAxiosError===!0}const T0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(T0).forEach(([e,t])=>{T0[t]=e});function Bb(e){const t=new Ta(e),o=tb(Ta.prototype.request,t);return Ue.extend(o,Ta.prototype,t,{allOwnKeys:!0}),Ue.extend(o,t,null,{allOwnKeys:!0}),o.create=function(l){return Bb(Ea(e,l))},o}const ho=Bb(ec);ho.Axios=Ta,ho.CanceledError=Ti,ho.CancelToken=E0,ho.isCancel=Cb,ho.VERSION=Rb,ho.toFormData=nd,ho.AxiosError=jt,ho.Cancel=ho.CanceledError,ho.all=function(t){return Promise.all(t)},ho.spread=ES,ho.isAxiosError=TS,ho.mergeConfig=Ea,ho.AxiosHeaders=Tr,ho.formToJSON=e=>xb(Ue.isHTMLForm(e)?new FormData(e):e),ho.getAdapter=Nb.getAdapter,ho.HttpStatusCode=T0,ho.default=ho;const $S={key:0},MS={key:0},AS={key:1},zS=N({__name:"ConfirmationProcess",props:{transactionHash:{type:String,required:!0}},setup(e){const t=e,o=Tt.get.order,r=Tt.get.network,l=Tt.get.receiver,n=D(1),a=D(!0),i=D(0),c=D(null),d=D(null),u=C(()=>Ft.apiUrl&&Ft.reminderEmail&&!c.value),p=async f=>{a.value=!1,c.value=f,i0(ht.pleaseWait),clearInterval(i.value),await ho.post("set-reminder-email",{email:f,hash:t.transactionHash}),Ys();const _=Zs.get("redirectUrls");_?window.location.href=_.reminderEmail||_.success:window.location.reload()},h=()=>{Er.fire({title:ht.importantInformation,html:ht.setReminderEmailMsg,showCancelButton:!0,confirmButtonText:ht.continue}).then(async f=>{if(f.isConfirmed){if(Ft.userEmail)return p(Ft.userEmail);const{value:_}=await Er.fire({title:ht.enterYourEmailAddress,input:"email",inputPlaceholder:ht.email,showCancelButton:!0,confirmButtonText:ht.save});_&&p(_)}})},v=Tt.transactionInstance(t.transactionHash),m=()=>{window.open(v.getUrl(),"_blank")};return ft(async()=>{s0(),await Vt.call("confirmationStarted",{order:o,network:r,transaction:v});let f;try{zo.log("Waiting for transaction");try{f=await v.wait(5e3),zo.log("Verifying transaction"),f=await v.verifyTransfer(eb.INCOMING,l,o.paymentAmount)}catch(y){f=Ci.FAILED,zo.error(y)}zo.log("Transaction status:",f),f==Ci.CONFIRMED&&Ho.get.blockConfirmationCount>0&&(f=await new Promise(y=>{i.value=setInterval(async()=>{d.value=await v.getBlockConfirmationCount(),d.value>=Ho.get.blockConfirmationCount&&(y(Ci.CONFIRMED),clearInterval(i.value))},5e3)}))}catch(y){f=Ci.FAILED,zo.error(y)}n.value=2;let _;Ft.createTransaction&&(_=await Tt.get.api.paymentFinished(f==Ci.CONFIRMED)),a.value=!1,Ys();const g=await Vt.call("confirmationCompleted",{order:o,status:f,network:r,transaction:v});if(Vt.check(g)&&!g.disablePopup&&typeof _<"u"){let y;_.success?y=G1(_.message):y=fo(_.message),y.then(()=>{i0(ht.redirecting),_.data.redirect=="reload"?window.location.reload():window.location.href=_.data.redirect})}}),(f,_)=>{const g=nt("cp-loading"),y=nt("el-col"),w=nt("el-button"),x=nt("el-row"),$=nt("cp-modal");return a.value?(b(),he($,{key:0,title:s(ht).waitingConfirmation},{default:le(()=>[te(g),te(x,{justify:"center",class:"text-center"},{default:le(()=>[n.value==1?(b(),M("div",$S,[te(y,{span:24,class:"margin-bottom"},{default:le(()=>[d.value!=null?(b(),M("div",MS,$e(s(ht).waitingBlockConfirmations)+" "+$e(d.value)+" / "+$e(s(Ho).get.blockConfirmationCount),1)):(b(),M("div",AS,$e(s(ht).waitingTransactionConfirmations),1))]),_:1}),c0()?se("",!0):(b(),he(y,{key:0,span:24},{default:le(()=>[te(w,{class:"margin-bottom button-colors",type:"primary",onClick:_[0]||(_[0]=T=>m())},{default:le(()=>[Ct($e(s(ht).openInExplorer),1)]),_:1})]),_:1})),u.value?(b(),he(w,{key:1,type:"info",class:"margin-bottom",onClick:_[1]||(_[1]=T=>h())},{default:le(()=>[Ct($e(s(ht).setReminderEmail),1)]),_:1})):se("",!0)])):(b(),he(y,{key:1,span:24,class:"margin-bottom"},{default:le(()=>[Ct($e(s(ht).paymentCompleting),1)]),_:1}))]),_:1})]),_:1},8,["title"])):se("",!0)}}}),IS={key:0},OS={key:2},NS=N({__name:"App",setup(e){const t=D(!1),o=D(!0),r=C(()=>Ho.get.networks.length==1),l=C(()=>{switch(Ft.mode){case"network":return r.value?!Tt.get.network:!0;case"currency":return!0;default:return!0}}),n=C(()=>i.value?Tt.get.network:Tt.get.network&&!Tt.get.transactionHash),a=C(()=>{switch(Ft.mode){case"network":return r.value?!0:!o.value;case"currency":return!1;default:return!0}}),i=C(()=>{switch(Ft.mode){case"network":return r.value;case"currency":return!1;default:return!1}}),c=()=>{Tt.isPaymentAmountUpdating||Tt.$reset()},d=u=>Object.keys(u).length===0;return zt("$init",async(u,p)=>{if(!p)return fo(ht.notFoundAnyCurrency);t.value=!0,Tt.setOrderParams({...Ho.get.order,paymentCurrency:p}),zo.log("isOrderAndInitAmountNotEqual",Tt.isOrderAndInitAmountNotEqual),Tt.isOrderAndInitAmountNotEqual&&Tt.setInit(null);const h=Tt.get.init,v=await Vt.call("init",{network:u,currency:p,init:h});if(zo.log("Init context",v),!Vt.check(v))return t.value=!1;v!=null&&v.init&&Tt.setInit(v.init);let m={success:!0};try{const f=async _=>{Ho.set("blockConfirmationCount",_.blockConfirmationCount);const g=Ft.providers[u.code],y=wi(u,["wsUrl"]),w=new g.Provider(y),x=Y1(u.wallets,g.browser.adapters);return d(x)?{success:!1,message:ht.notFoundAnyWallet.replace("{networkName}",u.name)}:(cC(g),dC(w),Tt.setInit(_),Tt.setNetwork(u),Tt.setReceiver(_.receiver),Tt.setOrderParams(_.order),{success:!0})};Tt.get.init?(zo.log("init","use exist init data"),m=await f(Tt.get.init)):(zo.log("init","get init data from api"),m=await f(await Tt.get.api.init(u)))}catch(f){zo.error(f),m={success:!1,message:f.message}}t.value=!1,m.success||fo(m.message??"").then(()=>{if(m.data){const f=m.data;f.redirect?window.location.href=f.redirect:f.redirect=="reload"&&window.location.reload()}})}),(u,p)=>{const h=nt("cp-modal"),v=nt("cp-loading"),m=nt("cp-container");return s(Ho).isAppStarted?(b(),he(m,{key:0},{default:le(()=>[l.value?(b(),M("div",IS,[s(Ft).mode=="network"?(b(),he(CC,{key:0})):s(Ft).mode=="currency"?(b(),he(zC,{key:1})):se("",!0)])):se("",!0),n.value?(b(),he(h,{key:1,onClose:p[1]||(p[1]=f=>c()),class:O(i.value?"disabled":"")},{default:le(()=>[a.value?(b(),he(DC,{key:0})):se("",!0),te(JC,{onStatusChanged:p[0]||(p[0]=f=>o.value=f)})]),_:1},8,["class"])):se("",!0),s(Tt).get.transactionHash?(b(),M("div",OS,[s(Tt).get.process==s(Xu).TRANSACTION?(b(),he(QC,{key:0,transactionHash:s(Tt).get.transactionHash},null,8,["transactionHash"])):s(Tt).get.process==s(Xu).CONFIRMATION?(b(),he(zS,{key:1,transactionHash:s(Tt).get.transactionHash},null,8,["transactionHash"])):se("",!0)])):se("",!0),t.value?(b(),he(h,{key:3,title:s(ht).loading},{default:le(()=>[te(v)]),_:1},8,["title"])):se("",!0)]),_:1})):se("",!0)}}});var ud={exports:{}};ud.exports,function(e,t){var o=200,r="__lodash_hash_undefined__",l=9007199254740991,n="[object Arguments]",a="[object Array]",i="[object Boolean]",c="[object Date]",d="[object Error]",u="[object Function]",p="[object GeneratorFunction]",h="[object Map]",v="[object Number]",m="[object Object]",f="[object Promise]",_="[object RegExp]",g="[object Set]",y="[object String]",w="[object Symbol]",x="[object WeakMap]",$="[object ArrayBuffer]",T="[object DataView]",L="[object Float32Array]",P="[object Float64Array]",R="[object Int8Array]",V="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",Q="[object Uint8ClampedArray]",J="[object Uint16Array]",Z="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,j=/\w*$/,K=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,U={};U[n]=U[a]=U[$]=U[T]=U[i]=U[c]=U[L]=U[P]=U[R]=U[V]=U[B]=U[h]=U[v]=U[m]=U[_]=U[g]=U[y]=U[w]=U[F]=U[Q]=U[J]=U[Z]=!0,U[d]=U[u]=U[x]=!1;var oe=typeof Ao=="object"&&Ao&&Ao.Object===Object&&Ao,ne=typeof self=="object"&&self&&self.Object===Object&&self,ce=oe||ne||Function("return this")(),ee=t&&!t.nodeType&&t,Me=ee&&!0&&e&&!e.nodeType&&e,de=Me&&Me.exports===ee;function _e(ie,Ve){return ie.set(Ve[0],Ve[1]),ie}function me(ie,Ve){return ie.add(Ve),ie}function Re(ie,Ve){for(var Xe=-1,$t=ie?ie.length:0;++Xe<$t&&Ve(ie[Xe],Xe,ie)!==!1;);return ie}function Ce(ie,Ve){for(var Xe=-1,$t=Ve.length,Yo=ie.length;++Xe<$t;)ie[Yo+Xe]=Ve[Xe];return ie}function Ee(ie,Ve,Xe,$t){for(var Yo=-1,mr=ie?ie.length:0;++Yo-1}function ao(ie,Ve){var Xe=this.__data__,$t=_s(Xe,ie);return $t<0?Xe.push([ie,Ve]):Xe[$t][1]=Ve,this}rr.prototype.clear=ua,rr.prototype.delete=He,rr.prototype.get=ot,rr.prototype.has=eo,rr.prototype.set=ao;function Po(ie){var Ve=-1,Xe=ie?ie.length:0;for(this.clear();++Ve-1&&ie%1==0&&ie-1&&ie%1==0&&ie<=l}function ws(ie){var Ve=typeof ie;return!!ie&&(Ve=="object"||Ve=="function")}function rf(ie){return!!ie&&typeof ie=="object"}function cu(ie){return ef(ie)?ou(ie):lm(ie)}function wm(){return[]}function da(){return!1}e.exports=Jp}(ud,ud.exports);var PS=ud.exports;const Vb=cl(PS);function RS({store:e}){const t=Vb(e.$state);e.$reset=()=>e.$patch(Vb(t))}const LS='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',BS=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Db=e=>Array.from(e.querySelectorAll(LS)).filter(t=>VS(t)&&BS(t)),VS=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},dd=function(e,t,...o){let r;t.includes("mouse")||t.includes("click")?r="MouseEvents":t.includes("key")?r="KeyboardEvent":r="HTMLEvents";const l=document.createEvent(r);return l.initEvent(t,...o),e.dispatchEvent(l),e},Hb=e=>!e.getAttribute("aria-owns"),Fb=(e,t,o)=>{const{parentNode:r}=e;if(!r)return null;const l=r.querySelectorAll(o),n=Array.prototype.indexOf.call(l,e);return l[n+t]||null},pd=e=>{e&&(e.focus(),!Hb(e)&&e.click())},vo=(e,t,{checkForDefaultPrevented:o=!0}={})=>l=>{const n=e==null?void 0:e(l);if(o===!1||!n)return t==null?void 0:t(l)},jb=e=>t=>t.pointerType==="mouse"?e(t):void 0;var DS=Object.defineProperty,HS=Object.defineProperties,FS=Object.getOwnPropertyDescriptors,Kb=Object.getOwnPropertySymbols,jS=Object.prototype.hasOwnProperty,KS=Object.prototype.propertyIsEnumerable,Ub=(e,t,o)=>t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,US=(e,t)=>{for(var o in t||(t={}))jS.call(t,o)&&Ub(e,o,t[o]);if(Kb)for(var o of Kb(t))KS.call(t,o)&&Ub(e,o,t[o]);return e},WS=(e,t)=>HS(e,FS(t));function Wb(e,t){var o;const r=lo();return Go(()=>{r.value=e()},WS(US({},t),{flush:(o=void 0)!=null?o:"sync"})),ui(r)}var qb;const Nt=typeof window<"u",qS=e=>typeof e<"u",$0=e=>typeof e=="function",YS=e=>typeof e=="string",$i=()=>{},M0=Nt&&((qb=window==null?void 0:window.navigator)==null?void 0:qb.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function qn(e){return typeof e=="function"?e():s(e)}function Yb(e,t){function o(...r){return new Promise((l,n)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(l).catch(n)})}return o}function GS(e,t={}){let o,r,l=$i;const n=i=>{clearTimeout(i),l(),l=$i};return i=>{const c=qn(e),d=qn(t.maxWait);return o&&n(o),c<=0||d!==void 0&&d<=0?(r&&(n(r),r=null),Promise.resolve(i())):new Promise((u,p)=>{l=t.rejectOnCancel?p:u,d&&!r&&(r=setTimeout(()=>{o&&n(o),r=null,u(i())},d)),o=setTimeout(()=>{r&&n(r),r=null,u(i())},c)})}}function XS(e,t=!0,o=!0,r=!1){let l=0,n,a=!0,i=$i,c;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=$i)};return p=>{const h=qn(e),v=Date.now()-l,m=()=>c=p();return d(),h<=0?(l=Date.now(),m()):(v>h&&(o||!a)?(l=Date.now(),m()):t&&(c=new Promise((f,_)=>{i=r?_:f,n=setTimeout(()=>{l=Date.now(),a=!0,f(m()),d()},Math.max(0,h-v))})),!o&&!n&&(n=setTimeout(()=>a=!0,h)),a=!1,c)}}function ZS(e){return e}function JS(e,t){let o,r,l;const n=D(!0),a=()=>{n.value=!0,l()};Se(e,a,{flush:"sync"});const i=$0(t)?t:t.get,c=$0(t)?void 0:t.set,d=ck((u,p)=>(r=u,l=p,{get(){return n.value&&(o=i(),n.value=!1),r(),o},set(h){c==null||c(h)}}));return Object.isExtensible(d)&&(d.trigger=a),d}function oc(e){return yf()?(xf(e),!0):!1}function QS(e,t=200,o={}){return Yb(GS(t,o),e)}function eE(e,t=200,o={}){const r=D(e.value),l=QS(()=>{r.value=e.value},t,o);return Se(e,()=>l()),r}function Gb(e,t=200,o=!1,r=!0,l=!1){return Yb(XS(t,o,r,l),e)}function A0(e,t=!0){wt()?ft(e):t?e():et(e)}function $a(e,t,o={}){const{immediate:r=!0}=o,l=D(!1);let n=null;function a(){n&&(clearTimeout(n),n=null)}function i(){l.value=!1,a()}function c(...d){a(),l.value=!0,n=setTimeout(()=>{l.value=!1,n=null,e(...d)},qn(t))}return r&&(l.value=!0,Nt&&c()),oc(i),{isPending:ui(l),start:c,stop:i}}function $r(e){var t;const o=qn(e);return(t=o==null?void 0:o.$el)!=null?t:o}const Yn=Nt?window:void 0,tE=Nt?window.document:void 0;function oo(...e){let t,o,r,l;if(YS(e[0])||Array.isArray(e[0])?([o,r,l]=e,t=Yn):[t,o,r,l]=e,!t)return $i;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const n=[],a=()=>{n.forEach(u=>u()),n.length=0},i=(u,p,h,v)=>(u.addEventListener(p,h,v),()=>u.removeEventListener(p,h,v)),c=Se(()=>[$r(t),qn(l)],([u,p])=>{a(),u&&n.push(...o.flatMap(h=>r.map(v=>i(u,h,v,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),a()};return oc(d),d}let Xb=!1;function z0(e,t,o={}){const{window:r=Yn,ignore:l=[],capture:n=!0,detectIframe:a=!1}=o;if(!r)return;M0&&!Xb&&(Xb=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",$i)));let i=!0;const c=h=>l.some(v=>{if(typeof v=="string")return Array.from(r.document.querySelectorAll(v)).some(m=>m===h.target||h.composedPath().includes(m));{const m=$r(v);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[oo(r,"click",h=>{const v=$r(e);if(!(!v||v===h.target||h.composedPath().includes(v))){if(h.detail===0&&(i=!c(h)),!i){i=!0;return}t(h)}},{passive:!0,capture:n}),oo(r,"pointerdown",h=>{const v=$r(e);v&&(i=!h.composedPath().includes(v)&&!c(h))},{passive:!0}),a&&oo(r,"blur",h=>{var v;const m=$r(e);((v=r.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&t(h)})].filter(Boolean);return()=>u.forEach(h=>h())}function oE(e={}){var t;const{window:o=Yn}=e,r=(t=e.document)!=null?t:o==null?void 0:o.document,l=JS(()=>null,()=>r==null?void 0:r.activeElement);return o&&(oo(o,"blur",n=>{n.relatedTarget===null&&l.trigger()},!0),oo(o,"focus",l.trigger,!0)),l}function Zb(e,t=!1){const o=D(),r=()=>o.value=!!e();return r(),A0(r,t),o}function rE(e){return JSON.parse(JSON.stringify(e))}const I0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Xl<"u"?Xl:typeof self<"u"?self:{},O0="__vueuse_ssr_handlers__";I0[O0]=I0[O0]||{},I0[O0];function lE(e,t,{window:o=Yn,initialValue:r=""}={}){const l=D(r),n=C(()=>{var a;return $r(t)||((a=o==null?void 0:o.document)==null?void 0:a.documentElement)});return Se([n,()=>qn(e)],([a,i])=>{var c;if(a&&o){const d=(c=o.getComputedStyle(a).getPropertyValue(i))==null?void 0:c.trim();l.value=d||r}},{immediate:!0}),Se(l,a=>{var i;(i=n.value)!=null&&i.style&&n.value.style.setProperty(qn(e),a)}),l}function nE({document:e=tE}={}){if(!e)return D("visible");const t=D(e.visibilityState);return oo(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var Jb=Object.getOwnPropertySymbols,aE=Object.prototype.hasOwnProperty,iE=Object.prototype.propertyIsEnumerable,sE=(e,t)=>{var o={};for(var r in e)aE.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Jb)for(var r of Jb(e))t.indexOf(r)<0&&iE.call(e,r)&&(o[r]=e[r]);return o};function so(e,t,o={}){const r=o,{window:l=Yn}=r,n=sE(r,["window"]);let a;const i=Zb(()=>l&&"ResizeObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=Se(()=>$r(e),p=>{c(),i.value&&l&&p&&(a=new ResizeObserver(t),a.observe(p,n))},{immediate:!0,flush:"post"}),u=()=>{c(),d()};return oc(u),{isSupported:i,stop:u}}function Qb(e,t={}){const{reset:o=!0,windowResize:r=!0,windowScroll:l=!0,immediate:n=!0}=t,a=D(0),i=D(0),c=D(0),d=D(0),u=D(0),p=D(0),h=D(0),v=D(0);function m(){const f=$r(e);if(!f){o&&(a.value=0,i.value=0,c.value=0,d.value=0,u.value=0,p.value=0,h.value=0,v.value=0);return}const _=f.getBoundingClientRect();a.value=_.height,i.value=_.bottom,c.value=_.left,d.value=_.right,u.value=_.top,p.value=_.width,h.value=_.x,v.value=_.y}return so(e,m),Se(()=>$r(e),f=>!f&&m()),l&&oo("scroll",m,{capture:!0,passive:!0}),r&&oo("resize",m,{passive:!0}),A0(()=>{n&&m()}),{height:a,bottom:i,left:c,right:d,top:u,width:p,x:h,y:v,update:m}}var e_=Object.getOwnPropertySymbols,cE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,dE=(e,t)=>{var o={};for(var r in e)cE.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&e_)for(var r of e_(e))t.indexOf(r)<0&&uE.call(e,r)&&(o[r]=e[r]);return o};function t_(e,t,o={}){const r=o,{window:l=Yn}=r,n=dE(r,["window"]);let a;const i=Zb(()=>l&&"MutationObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=Se(()=>$r(e),p=>{c(),i.value&&l&&p&&(a=new MutationObserver(t),a.observe(p,n))},{immediate:!0}),u=()=>{c(),d()};return oc(u),{isSupported:i,stop:u}}var o_;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(o_||(o_={}));var pE=Object.defineProperty,r_=Object.getOwnPropertySymbols,fE=Object.prototype.hasOwnProperty,hE=Object.prototype.propertyIsEnumerable,l_=(e,t,o)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vE=(e,t)=>{for(var o in t||(t={}))fE.call(t,o)&&l_(e,o,t[o]);if(r_)for(var o of r_(t))hE.call(t,o)&&l_(e,o,t[o]);return e};vE({linear:ZS},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function n_(e,t,o,r={}){var l,n,a;const{clone:i=!1,passive:c=!1,eventName:d,deep:u=!1,defaultValue:p}=r,h=wt(),v=o||(h==null?void 0:h.emit)||((l=h==null?void 0:h.$emit)==null?void 0:l.bind(h))||((a=(n=h==null?void 0:h.proxy)==null?void 0:n.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let m=d;t||(t="modelValue"),m=d||m||`update:${t.toString()}`;const f=g=>i?$0(i)?i(g):rE(g):g,_=()=>qS(e[t])?f(e[t]):p;if(c){const g=_(),y=D(g);return Se(()=>e[t],w=>y.value=f(w)),Se(y,w=>{(w!==e[t]||u)&&v(m,w)},{deep:u}),y}else return C({get(){return _()},set(g){v(m,g)}})}function mE({window:e=Yn}={}){if(!e)return D(!1);const t=D(e.document.hasFocus());return oo(e,"blur",()=>{t.value=!1}),oo(e,"focus",()=>{t.value=!0}),t}function gE(e={}){const{window:t=Yn,initialWidth:o=1/0,initialHeight:r=1/0,listenOrientation:l=!0,includeScrollbar:n=!0}=e,a=D(o),i=D(r),c=()=>{t&&(n?(a.value=t.innerWidth,i.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,i.value=t.document.documentElement.clientHeight))};return c(),A0(c),oo("resize",c,{passive:!0}),l&&oo("orientationchange",c,{passive:!0}),{width:a,height:i}}const a_=()=>Nt&&/firefox/i.test(window.navigator.userAgent),bE=(e,t)=>{if(!Nt||!e||!t)return!1;const o=e.getBoundingClientRect();let r;return t instanceof Element?r=t.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},o.topr.top&&o.right>r.left&&o.left{let t=0,o=e;for(;o;)t+=o.offsetTop,o=o.offsetParent;return t},N0=(e,t)=>Math.abs(i_(e)-i_(t)),P0=e=>{let t,o;return e.type==="touchend"?(o=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(o=e.touches[0].clientY,t=e.touches[0].clientX):(o=e.clientY,t=e.clientX),{clientX:t,clientY:o}};function _E(e,t,o,r){const l=o-t;return e/=r/2,e<1?l/2*e*e*e+t:l/2*((e-=2)*e*e+2)+t}var s_=typeof Xl=="object"&&Xl&&Xl.Object===Object&&Xl,wE=typeof self=="object"&&self&&self.Object===Object&&self,pl=s_||wE||Function("return this")(),qr=pl.Symbol,c_=Object.prototype,yE=c_.hasOwnProperty,xE=c_.toString,rc=qr?qr.toStringTag:void 0;function kE(e){var t=yE.call(e,rc),o=e[rc];try{e[rc]=void 0;var r=!0}catch{}var l=xE.call(e);return r&&(t?e[rc]=o:delete e[rc]),l}var CE=Object.prototype,SE=CE.toString;function EE(e){return SE.call(e)}var TE="[object Null]",$E="[object Undefined]",u_=qr?qr.toStringTag:void 0;function Ma(e){return e==null?e===void 0?$E:TE:u_&&u_ in Object(e)?kE(e):EE(e)}function Il(e){return e!=null&&typeof e=="object"}var ME="[object Symbol]";function fd(e){return typeof e=="symbol"||Il(e)&&Ma(e)==ME}function R0(e,t){for(var o=-1,r=e==null?0:e.length,l=Array(r);++o0){if(++t>=lT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function sT(e){return function(){return e}}var hd=function(){try{var e=za(Object,"defineProperty");return e({},"",{}),e}catch{}}(),cT=hd?function(e,t){return hd(e,"toString",{configurable:!0,enumerable:!1,value:sT(t),writable:!0})}:L0,__=iT(cT);function uT(e,t){for(var o=-1,r=e==null?0:e.length;++o-1}var vT=9007199254740991,mT=/^(?:0|[1-9]\d*)$/;function vd(e,t){var o=typeof e;return t=t??vT,!!t&&(o=="number"||o!="symbol"&&mT.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=_T}function Ai(e){return e!=null&&j0(e.length)&&!B0(e)}function wT(e,t,o){if(!wr(o))return!1;var r=typeof t;return(r=="number"?Ai(o)&&vd(t,o.length):r=="string"&&t in o)?lc(o[t],e):!1}function yT(e){return k_(function(t,o){var r=-1,l=o.length,n=l>1?o[l-1]:void 0,a=l>2?o[2]:void 0;for(n=e.length>3&&typeof n=="function"?(l--,n):void 0,a&&wT(o[0],o[1],a)&&(n=l<3?void 0:n,l=1),t=Object(t);++r-1}function z$(e,t){var o=this.__data__,r=md(o,e);return r<0?(++this.size,o.push([e,t])):o[r][1]=t,this}function dn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t0&&o(i)?t>1?pc(i,t-1,o,r,l):G0(l,i):r||(l[l.length]=i)}return l}function N_(e){var t=e==null?0:e.length;return t?pc(e,1):[]}function P_(e){return __(x_(e,void 0,N_),e+"")}var X0=I_(Object.getPrototypeOf,Object),q$="[object Object]",Y$=Function.prototype,G$=Object.prototype,R_=Y$.toString,X$=G$.hasOwnProperty,Z$=R_.call(Object);function L_(e){if(!Il(e)||Ma(e)!=q$)return!1;var t=X0(e);if(t===null)return!0;var o=X$.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&R_.call(o)==Z$}function J$(e,t,o){var r=-1,l=e.length;t<0&&(t=-t>l?0:l+t),o=o>l?l:o,o<0&&(o+=l),l=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(l);++ri))return!1;var d=n.get(e),u=n.get(t);if(d&&u)return d==t&&u==e;var p=-1,h=!0,v=o&OA?new fc:void 0;for(n.set(e,t),n.set(t,e);++p=t||L<0||p&&P>=n}function g(){var T=lh();if(_(T))return y(T);i=setTimeout(g,f(T))}function y(T){return i=void 0,h&&r?v(T):(r=l=void 0,a)}function w(){i!==void 0&&clearTimeout(i),d=0,r=c=l=i=void 0}function x(){return i===void 0?a:y(lh())}function $(){var T=lh(),L=_(T);if(r=arguments,l=this,c=T,L){if(i===void 0)return m(c);if(p)return clearTimeout(i),i=setTimeout(g,t),v(c)}return i===void 0&&(i=setTimeout(g,t)),a}return $.cancel=w,$.flush=x,$}function nh(e,t,o){(o!==void 0&&!lc(e[t],o)||o===void 0&&!(t in e))&&H0(e,t,o)}function w3(e){return Il(e)&&Ai(e)}function ah(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function xz(e){return Mi(e,cc(e))}function kz(e,t,o,r,l,n,a){var i=ah(e,o),c=ah(t,o),d=a.get(c);if(d){nh(e,o,d);return}var u=n?n(i,c,o+"",e,t,a):void 0,p=u===void 0;if(p){var h=_r(c),v=!h&&ac(c),m=!h&&!v&&q0(c);u=c,h||v||m?_r(i)?u=i:w3(i)?u=b_(i):v?(p=!1,u=F_(c,!0)):m?(p=!1,u=t3(c,!0)):u=[]:L_(c)||nc(c)?(u=i,nc(i)?u=xz(i):(!wr(i)||B0(i))&&(u=o3(c))):p=!1}p&&(a.set(c,u),l(u,c,r,n,a),a.delete(c)),nh(e,o,u)}function y3(e,t,o,r,l){e!==t&&_3(t,function(n,a){if(l||(l=new fl),wr(n))kz(e,t,a,o,y3,r,l);else{var i=r?r(ah(e,a),n,a+"",e,t,l):void 0;i===void 0&&(i=n),nh(e,a,i)}},cc)}function Cz(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function x3(e,t,o){var r=e==null?0:e.length;if(!r)return-1;var l=r-1;return w_(e,b3(t),l,!0)}function Sz(e,t){var o=-1,r=Ai(e)?Array(e.length):[];return bz(e,function(l,n,a){r[++o]=t(l,n,a)}),r}function Ez(e,t){var o=_r(e)?R0:Sz;return o(e,b3(t))}function Tz(e,t){return pc(Ez(e,t),1)}var $z=1/0;function Mz(e){var t=e==null?0:e.length;return t?pc(e,$z):[]}function Cd(e){for(var t=-1,o=e==null?0:e.length,r={};++t1),n}),Mi(e,q_(e),o),r&&(o=Pi(o,Nz|Pz|Rz,Oz));for(var l=t.length;l--;)Iz(o,t[l]);return o});function C3(e,t,o,r){if(!wr(e))return e;t=Ii(t,e);for(var l=-1,n=t.length,a=n-1,i=e;i!=null&&++l=Kz){var d=jz(e);if(d)return oh(d);a=!1,l=c3,c=new fc}else c=i;e:for(;++re===void 0,Co=e=>typeof e=="boolean",st=e=>typeof e=="number",Yr=e=>!e&&e!==0||Ke(e)&&e.length===0||xt(e)&&!Object.keys(e).length,Gr=e=>typeof Element>"u"?!1:e instanceof Element,Na=e=>jo(e),Wz=e=>ut(e)?!Number.isNaN(Number(e)):!1,Sd=e=>e===window,Xn=e=>Nt?window.requestAnimationFrame(e):setTimeout(e,16),Pa=e=>Nt?window.cancelAnimationFrame(e):clearTimeout(e),sh=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Nl=e=>Ms(e),Ri=e=>Object.keys(e),qz=e=>Object.entries(e),Ed=(e,t,o)=>({get value(){return wo(e,t,o)},set value(r){Dz(e,t,r)}});class Yz extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Io(e,t){throw new Yz(`[${e}] ${t}`)}function sfe(e,t){}const S3=(e="")=>e.split(" ").filter(t=>!!t.trim()),Xr=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Zr=(e,t)=>{!e||!t.trim()||e.classList.add(...S3(t))},ar=(e,t)=>{!e||!t.trim()||e.classList.remove(...S3(t))},Zn=(e,t)=>{var o;if(!Nt||!e||!t)return"";let r=Fr(t);r==="float"&&(r="cssFloat");try{const l=e.style[r];if(l)return l;const n=(o=document.defaultView)==null?void 0:o.getComputedStyle(e,"");return n?n[r]:""}catch{return e.style[r]}};function go(e,t="px"){if(!e)return"";if(st(e)||Wz(e))return`${e}${t}`;if(ut(e))return e}const Gz=(e,t)=>{if(!Nt)return!1;const o={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],r=Zn(e,o);return["scroll","auto","overlay"].some(l=>r.includes(l))},ch=(e,t)=>{if(!Nt)return;let o=e;for(;o;){if([window,document,document.documentElement].includes(o))return window;if(Gz(o,t))return o;o=o.parentNode}return o};let Td;const E3=e=>{var t;if(!Nt)return 0;if(Td!==void 0)return Td;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const l=document.createElement("div");l.style.width="100%",o.appendChild(l);const n=l.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),Td=r-n,Td};function T3(e,t){if(!Nt)return;if(!t){e.scrollTop=0;return}const o=[];let r=t.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)o.push(r),r=r.offsetParent;const l=t.offsetTop+o.reduce((c,d)=>c+d.offsetTop,0),n=l+t.offsetHeight,a=e.scrollTop,i=a+e.clientHeight;li&&(e.scrollTop=n-e.clientHeight)}function Xz(e,t,o,r,l){const n=Date.now();let a;const i=()=>{const d=Date.now()-n,u=_E(d>r?r:d,t,o,r);Sd(e)?e.scrollTo(window.pageXOffset,u):e.scrollTop=u,d{a&&Pa(a)}}const $3=(e,t)=>Sd(t)?e.ownerDocument.documentElement:t,M3=e=>Sd(e)?window.scrollY:e.scrollTop,$d=e=>{if(!Nt||e==="")return null;if(ut(e))try{return document.querySelector(e)}catch{return null}return e};/*! Element Plus Icons Vue v2.3.1 */var Zz=N({name:"AddLocation",__name:"add-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M544 384h96a32 32 0 1 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0z"})]))}}),Jz=Zz,Qz=N({name:"Aim",__name:"aim",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"})]))}}),eI=Qz,tI=N({name:"AlarmClock",__name:"alarm-clock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 832a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),E("path",{fill:"currentColor",d:"m292.288 824.576 55.424 32-48 83.136a32 32 0 1 1-55.424-32zm439.424 0-55.424 32 48 83.136a32 32 0 1 0 55.424-32zM512 512h160a32 32 0 1 1 0 64H480a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0zM90.496 312.256A160 160 0 0 1 312.32 90.496l-46.848 46.848a96 96 0 0 0-128 128L90.56 312.256zm835.264 0A160 160 0 0 0 704 90.496l46.848 46.848a96 96 0 0 1 128 128z"})]))}}),oI=tI,rI=N({name:"Apple",__name:"apple",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M599.872 203.776a189.44 189.44 0 0 1 64.384-4.672l2.624.128c31.168 1.024 51.2 4.096 79.488 16.32 37.632 16.128 74.496 45.056 111.488 89.344 96.384 115.264 82.752 372.8-34.752 521.728-7.68 9.728-32 41.6-30.72 39.936a426.624 426.624 0 0 1-30.08 35.776c-31.232 32.576-65.28 49.216-110.08 50.048-31.36.64-53.568-5.312-84.288-18.752l-6.528-2.88c-20.992-9.216-30.592-11.904-47.296-11.904-18.112 0-28.608 2.88-51.136 12.672l-6.464 2.816c-28.416 12.224-48.32 18.048-76.16 19.2-74.112 2.752-116.928-38.08-180.672-132.16-96.64-142.08-132.608-349.312-55.04-486.4 46.272-81.92 129.92-133.632 220.672-135.04 32.832-.576 60.288 6.848 99.648 22.72 27.136 10.88 34.752 13.76 37.376 14.272 16.256-20.16 27.776-36.992 34.56-50.24 13.568-26.304 27.2-59.968 40.704-100.8a32 32 0 1 1 60.8 20.224c-12.608 37.888-25.408 70.4-38.528 97.664zm-51.52 78.08c-14.528 17.792-31.808 37.376-51.904 58.816a32 32 0 1 1-46.72-43.776l12.288-13.248c-28.032-11.2-61.248-26.688-95.68-26.112-70.4 1.088-135.296 41.6-171.648 105.792C121.6 492.608 176 684.16 247.296 788.992c34.816 51.328 76.352 108.992 130.944 106.944 52.48-2.112 72.32-34.688 135.872-34.688 63.552 0 81.28 34.688 136.96 33.536 56.448-1.088 75.776-39.04 126.848-103.872 107.904-136.768 107.904-362.752 35.776-449.088-72.192-86.272-124.672-84.096-151.68-85.12-41.472-4.288-81.6 12.544-113.664 25.152z"})]))}}),lI=rI,nI=N({name:"ArrowDownBold",__name:"arrow-down-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"})]))}}),aI=nI,iI=N({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Pl=iI,sI=N({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}}),cI=sI,uI=N({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),fn=uI,dI=N({name:"ArrowRightBold",__name:"arrow-right-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"})]))}}),pI=dI,fI=N({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),ir=fI,hI=N({name:"ArrowUpBold",__name:"arrow-up-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"})]))}}),vI=hI,mI=N({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Md=mI,gI=N({name:"Avatar",__name:"avatar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),bI=gI,_I=N({name:"Back",__name:"back",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),A3=_I,wI=N({name:"Baseball",__name:"baseball",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),E("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896zM108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1736.64 1736.64 0 0 1-11.392-65.728z"})]))}}),yI=wI,xI=N({name:"Basketball",__name:"basketball",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M778.752 788.224a382.464 382.464 0 0 0 116.032-245.632 256.512 256.512 0 0 0-241.728-13.952 762.88 762.88 0 0 1 125.696 259.584zm-55.04 44.224a699.648 699.648 0 0 0-125.056-269.632 256.128 256.128 0 0 0-56.064 331.968 382.72 382.72 0 0 0 181.12-62.336m-254.08 61.248A320.128 320.128 0 0 1 557.76 513.6a715.84 715.84 0 0 0-48.192-48.128 320.128 320.128 0 0 1-379.264 88.384 382.4 382.4 0 0 0 110.144 229.696 382.4 382.4 0 0 0 229.184 110.08zM129.28 481.088a256.128 256.128 0 0 0 331.072-56.448 699.648 699.648 0 0 0-268.8-124.352 382.656 382.656 0 0 0-62.272 180.8m106.56-235.84a762.88 762.88 0 0 1 258.688 125.056 256.512 256.512 0 0 0-13.44-241.088A382.464 382.464 0 0 0 235.84 245.248zm318.08-114.944c40.576 89.536 37.76 193.92-8.448 281.344a779.84 779.84 0 0 1 66.176 66.112 320.832 320.832 0 0 1 282.112-8.128 382.4 382.4 0 0 0-110.144-229.12 382.4 382.4 0 0 0-229.632-110.208zM828.8 828.8a448 448 0 1 1-633.6-633.6 448 448 0 0 1 633.6 633.6"})]))}}),kI=xI,CI=N({name:"BellFilled",__name:"bell-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 832a128 128 0 0 1-256 0zm192-64H134.4a38.4 38.4 0 0 1 0-76.8H192V448c0-154.88 110.08-284.16 256.32-313.6a64 64 0 1 1 127.36 0A320.128 320.128 0 0 1 832 448v243.2h57.6a38.4 38.4 0 0 1 0 76.8z"})]))}}),SI=CI,EI=N({name:"Bell",__name:"bell",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),E("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),E("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),TI=EI,$I=N({name:"Bicycle",__name:"bicycle",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),E("path",{fill:"currentColor",d:"M288 672h320q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M768 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),E("path",{fill:"currentColor",d:"M480 192a32 32 0 0 1 0-64h160a32 32 0 0 1 31.04 24.256l96 384a32 32 0 0 1-62.08 15.488L615.04 192zM96 384a32 32 0 0 1 0-64h128a32 32 0 0 1 30.336 21.888l64 192a32 32 0 1 1-60.672 20.224L200.96 384z"}),E("path",{fill:"currentColor",d:"m373.376 599.808-42.752-47.616 320-288 42.752 47.616z"})]))}}),MI=$I,AI=N({name:"BottomLeft",__name:"bottom-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),E("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),zI=AI,II=N({name:"BottomRight",__name:"bottom-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 768a32 32 0 1 0 0 64h448a32 32 0 0 0 32-32V352a32 32 0 0 0-64 0v416z"}),E("path",{fill:"currentColor",d:"M777.344 822.656a32 32 0 0 0 45.312-45.312l-544-544a32 32 0 0 0-45.312 45.312z"})]))}}),OI=II,NI=N({name:"Bottom",__name:"bottom",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),PI=NI,RI=N({name:"Bowl",__name:"bowl",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M714.432 704a351.744 351.744 0 0 0 148.16-256H161.408a351.744 351.744 0 0 0 148.16 256zM288 766.592A415.68 415.68 0 0 1 96 416a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32 415.68 415.68 0 0 1-192 350.592V832a64 64 0 0 1-64 64H352a64 64 0 0 1-64-64zM493.248 320h-90.496l254.4-254.4a32 32 0 1 1 45.248 45.248zm187.328 0h-128l269.696-155.712a32 32 0 0 1 32 55.424zM352 768v64h320v-64z"})]))}}),LI=RI,BI=N({name:"Box",__name:"box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M317.056 128 128 344.064V896h768V344.064L706.944 128zm-14.528-64h418.944a32 32 0 0 1 24.064 10.88l206.528 236.096A32 32 0 0 1 960 332.032V928a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V332.032a32 32 0 0 1 7.936-21.12L278.4 75.008A32 32 0 0 1 302.528 64z"}),E("path",{fill:"currentColor",d:"M64 320h896v64H64z"}),E("path",{fill:"currentColor",d:"M448 327.872V640h128V327.872L526.08 128h-28.16zM448 64h128l64 256v352a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V320z"})]))}}),VI=BI,DI=N({name:"Briefcase",__name:"briefcase",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 320V128h384v192h192v192H128V320zM128 576h768v320H128zm256-256h256.064V192H384z"})]))}}),HI=DI,FI=N({name:"BrushFilled",__name:"brush-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M608 704v160a96 96 0 0 1-192 0V704h-96a128 128 0 0 1-128-128h640a128 128 0 0 1-128 128zM192 512V128.064h640V512z"})]))}}),jI=FI,KI=N({name:"Brush",__name:"brush",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 448H128v192a64 64 0 0 0 64 64h192v192h256V704h192a64 64 0 0 0 64-64zm-770.752-64c0-47.552 5.248-90.24 15.552-128 14.72-54.016 42.496-107.392 83.2-160h417.28l-15.36 70.336L736 96h211.2c-24.832 42.88-41.92 96.256-51.2 160a663.872 663.872 0 0 0-6.144 128H960v256a128 128 0 0 1-128 128H704v160a32 32 0 0 1-32 32H352a32 32 0 0 1-32-32V768H192A128 128 0 0 1 64 640V384h61.248zm64 0h636.544c-2.048-45.824.256-91.584 6.848-137.216 4.48-30.848 10.688-59.776 18.688-86.784h-96.64l-221.12 141.248L561.92 160H256.512c-25.856 37.888-43.776 75.456-53.952 112.832-8.768 32.064-13.248 69.12-13.312 111.168z"})]))}}),UI=KI,WI=N({name:"Burger",__name:"burger",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 512a32 32 0 0 0-32 32v64a32 32 0 0 0 30.08 32H864a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32zm736-58.56A96 96 0 0 1 960 544v64a96 96 0 0 1-51.968 85.312L855.36 833.6a96 96 0 0 1-89.856 62.272H258.496A96 96 0 0 1 168.64 833.6l-52.608-140.224A96 96 0 0 1 64 608v-64a96 96 0 0 1 64-90.56V448a384 384 0 1 1 768 5.44M832 448a320 320 0 0 0-640 0zM512 704H188.352l40.192 107.136a32 32 0 0 0 29.952 20.736h507.008a32 32 0 0 0 29.952-20.736L835.648 704z"})]))}}),qI=WI,YI=N({name:"Calendar",__name:"calendar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),z3=YI,GI=N({name:"CameraFilled",__name:"camera-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),XI=GI,ZI=N({name:"Camera",__name:"camera",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 256H128v576h768zm-199.424-64-32.064-64h-304.96l-32 64zM96 192h160l46.336-92.608A64 64 0 0 1 359.552 64h304.96a64 64 0 0 1 57.216 35.328L768.192 192H928a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32m416 512a160 160 0 1 0 0-320 160 160 0 0 0 0 320m0 64a224 224 0 1 1 0-448 224 224 0 0 1 0 448"})]))}}),JI=ZI,QI=N({name:"CaretBottom",__name:"caret-bottom",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),eO=QI,tO=N({name:"CaretLeft",__name:"caret-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M672 192 288 511.936 672 832z"})]))}}),oO=tO,rO=N({name:"CaretRight",__name:"caret-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),uh=rO,lO=N({name:"CaretTop",__name:"caret-top",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),I3=lO,nO=N({name:"Cellphone",__name:"cellphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h512a128 128 0 0 1 128 128v640a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V192A128 128 0 0 1 256 64m128 128h256a32 32 0 1 1 0 64H384a32 32 0 0 1 0-64m128 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}}),aO=nO,iO=N({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),E("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),sO=iO,cO=N({name:"ChatDotSquare",__name:"chat-dot-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),E("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}}),uO=cO,dO=N({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),E("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),pO=dO,fO=N({name:"ChatLineSquare",__name:"chat-line-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 826.88 273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),E("path",{fill:"currentColor",d:"M352 512h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m0-192h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}}),hO=fO,vO=N({name:"ChatRound",__name:"chat-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m174.72 855.68 130.048-43.392 23.424 11.392C382.4 849.984 444.352 864 512 864c223.744 0 384-159.872 384-352 0-192.832-159.104-352-384-352S128 319.168 128 512a341.12 341.12 0 0 0 69.248 204.288l21.632 28.8-44.16 110.528zm-45.248 82.56A32 32 0 0 1 89.6 896l56.512-141.248A405.12 405.12 0 0 1 64 512C64 299.904 235.648 96 512 96s448 203.904 448 416-173.44 416-448 416c-79.68 0-150.848-17.152-211.712-46.72l-170.88 56.96z"})]))}}),mO=vO,gO=N({name:"ChatSquare",__name:"chat-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"})]))}}),bO=gO,_O=N({name:"Check",__name:"check",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Li=_O,wO=N({name:"Checked",__name:"checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024zM384 192V96h256v96z"})]))}}),yO=wO,xO=N({name:"Cherry",__name:"cherry",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M261.056 449.6c13.824-69.696 34.88-128.96 63.36-177.728 23.744-40.832 61.12-88.64 112.256-143.872H320a32 32 0 0 1 0-64h384a32 32 0 1 1 0 64H554.752c14.912 39.168 41.344 86.592 79.552 141.76 47.36 68.48 84.8 106.752 106.304 114.304a224 224 0 1 1-84.992 14.784c-22.656-22.912-47.04-53.76-73.92-92.608-38.848-56.128-67.008-105.792-84.352-149.312-55.296 58.24-94.528 107.52-117.76 147.2-23.168 39.744-41.088 88.768-53.568 147.072a224.064 224.064 0 1 1-64.96-1.6zM288 832a160 160 0 1 0 0-320 160 160 0 0 0 0 320m448-64a160 160 0 1 0 0-320 160 160 0 0 0 0 320"})]))}}),kO=xO,CO=N({name:"Chicken",__name:"chicken",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M349.952 716.992 478.72 588.16a106.688 106.688 0 0 1-26.176-19.072 106.688 106.688 0 0 1-19.072-26.176L304.704 671.744c.768 3.072 1.472 6.144 2.048 9.216l2.048 31.936 31.872 1.984c3.136.64 6.208 1.28 9.28 2.112zm57.344 33.152a128 128 0 1 1-216.32 114.432l-1.92-32-32-1.92a128 128 0 1 1 114.432-216.32L416.64 469.248c-2.432-101.44 58.112-239.104 149.056-330.048 107.328-107.328 231.296-85.504 316.8 0 85.44 85.44 107.328 209.408 0 316.8-91.008 90.88-228.672 151.424-330.112 149.056L407.296 750.08zm90.496-226.304c49.536 49.536 233.344-7.04 339.392-113.088 78.208-78.208 63.232-163.072 0-226.304-63.168-63.232-148.032-78.208-226.24 0C504.896 290.496 448.32 474.368 497.792 523.84M244.864 708.928a64 64 0 1 0-59.84 59.84l56.32-3.52zm8.064 127.68a64 64 0 1 0 59.84-59.84l-56.32 3.52-3.52 56.32z"})]))}}),SO=CO,EO=N({name:"ChromeFilled",__name:"chrome-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M938.67 512.01c0-44.59-6.82-87.6-19.54-128H682.67a212.372 212.372 0 0 1 42.67 128c.06 38.71-10.45 76.7-30.42 109.87l-182.91 316.8c235.65-.01 426.66-191.02 426.66-426.67z"}),E("path",{fill:"currentColor",d:"M576.79 401.63a127.92 127.92 0 0 0-63.56-17.6c-22.36-.22-44.39 5.43-63.89 16.38s-35.79 26.82-47.25 46.02a128.005 128.005 0 0 0-2.16 127.44l1.24 2.13a127.906 127.906 0 0 0 46.36 46.61 127.907 127.907 0 0 0 63.38 17.44c22.29.2 44.24-5.43 63.68-16.33a127.94 127.94 0 0 0 47.16-45.79v-.01l1.11-1.92a127.984 127.984 0 0 0 .29-127.46 127.957 127.957 0 0 0-46.36-46.91"}),E("path",{fill:"currentColor",d:"M394.45 333.96A213.336 213.336 0 0 1 512 298.67h369.58A426.503 426.503 0 0 0 512 85.34a425.598 425.598 0 0 0-171.74 35.98 425.644 425.644 0 0 0-142.62 102.22l118.14 204.63a213.397 213.397 0 0 1 78.67-94.21m117.56 604.72H512zm-97.25-236.73a213.284 213.284 0 0 1-89.54-86.81L142.48 298.6c-36.35 62.81-57.13 135.68-57.13 213.42 0 203.81 142.93 374.22 333.95 416.55h.04l118.19-204.71a213.315 213.315 0 0 1-122.77-21.91z"})]))}}),TO=EO,$O=N({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),O3=$O,MO=N({name:"CircleCheck",__name:"circle-check",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Ad=MO,AO=N({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),zd=AO,zO=N({name:"CircleClose",__name:"circle-close",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),hn=zO,IO=N({name:"CirclePlusFilled",__name:"circle-plus-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"})]))}}),OO=IO,NO=N({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),PO=NO,RO=N({name:"Clock",__name:"clock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),dh=RO,LO=N({name:"CloseBold",__name:"close-bold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}}),BO=LO,VO=N({name:"Close",__name:"close",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Jr=VO,DO=N({name:"Cloudy",__name:"cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M598.4 831.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 831.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 381.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"})]))}}),HO=DO,FO=N({name:"CoffeeCup",__name:"coffee-cup",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 192a192 192 0 1 1-8 383.808A256.128 256.128 0 0 1 512 768H320A256 256 0 0 1 64 512V160a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v256a128 128 0 1 0 0-256M96 832h640a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-640v320a192 192 0 0 0 192 192h192a192 192 0 0 0 192-192V192z"})]))}}),jO=FO,KO=N({name:"Coffee",__name:"coffee",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M822.592 192h14.272a32 32 0 0 1 31.616 26.752l21.312 128A32 32 0 0 1 858.24 384h-49.344l-39.04 546.304A32 32 0 0 1 737.92 960H285.824a32 32 0 0 1-32-29.696L214.912 384H165.76a32 32 0 0 1-31.552-37.248l21.312-128A32 32 0 0 1 187.136 192h14.016l-6.72-93.696A32 32 0 0 1 226.368 64h571.008a32 32 0 0 1 31.936 34.304zm-64.128 0 4.544-64H260.736l4.544 64h493.184m-548.16 128H820.48l-10.688-64H214.208l-10.688 64h6.784m68.736 64 36.544 512H708.16l36.544-512z"})]))}}),UO=KO,WO=N({name:"Coin",__name:"coin",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m161.92 580.736 29.888 58.88C171.328 659.776 160 681.728 160 704c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 615.808 928 657.664 928 704c0 129.728-188.544 224-416 224S96 833.728 96 704c0-46.592 24.32-88.576 65.92-123.264z"}),E("path",{fill:"currentColor",d:"m161.92 388.736 29.888 58.88C171.328 467.84 160 489.792 160 512c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 423.808 928 465.664 928 512c0 129.728-188.544 224-416 224S96 641.728 96 512c0-46.592 24.32-88.576 65.92-123.264z"}),E("path",{fill:"currentColor",d:"M512 544c-227.456 0-416-94.272-416-224S284.544 96 512 96s416 94.272 416 224-188.544 224-416 224m0-64c196.672 0 352-77.696 352-160S708.672 160 512 160s-352 77.696-352 160 155.328 160 352 160"})]))}}),qO=WO,YO=N({name:"ColdDrink",__name:"cold-drink",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 64a192 192 0 1 1-69.952 370.88L480 725.376V896h96a32 32 0 1 1 0 64H320a32 32 0 1 1 0-64h96V725.376L76.8 273.536a64 64 0 0 1-12.8-38.4v-10.688a32 32 0 0 1 32-32h71.808l-65.536-83.84a32 32 0 0 1 50.432-39.424l96.256 123.264h337.728A192.064 192.064 0 0 1 768 64M656.896 192.448H800a32 32 0 0 1 32 32v10.624a64 64 0 0 1-12.8 38.4l-80.448 107.2a128 128 0 1 0-81.92-188.16v-.064zm-357.888 64 129.472 165.76a32 32 0 0 1-50.432 39.36l-160.256-205.12H144l304 404.928 304-404.928z"})]))}}),GO=YO,XO=N({name:"CollectionTag",__name:"collection-tag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 128v698.88l196.032-156.864a96 96 0 0 1 119.936 0L768 826.816V128zm-32-64h576a32 32 0 0 1 32 32v797.44a32 32 0 0 1-51.968 24.96L531.968 720a32 32 0 0 0-39.936 0L243.968 918.4A32 32 0 0 1 192 893.44V96a32 32 0 0 1 32-32"})]))}}),ZO=XO,JO=N({name:"Collection",__name:"collection",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),E("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),QO=JO,eN=N({name:"Comment",__name:"comment",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),tN=eN,oN=N({name:"Compass",__name:"compass",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"})]))}}),rN=oN,lN=N({name:"Connection",__name:"connection",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 384v64H448a128 128 0 0 0-128 128v128a128 128 0 0 0 128 128h320a128 128 0 0 0 128-128V576a128 128 0 0 0-64-110.848V394.88c74.56 26.368 128 97.472 128 181.056v128a192 192 0 0 1-192 192H448a192 192 0 0 1-192-192V576a192 192 0 0 1 192-192z"}),E("path",{fill:"currentColor",d:"M384 640v-64h192a128 128 0 0 0 128-128V320a128 128 0 0 0-128-128H256a128 128 0 0 0-128 128v128a128 128 0 0 0 64 110.848v70.272A192.064 192.064 0 0 1 64 448V320a192 192 0 0 1 192-192h320a192 192 0 0 1 192 192v128a192 192 0 0 1-192 192z"})]))}}),nN=lN,aN=N({name:"Coordinate",__name:"coordinate",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 512h64v320h-64z"}),E("path",{fill:"currentColor",d:"M192 896h640a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64m64-128h512a128 128 0 0 1 128 128v64H128v-64a128 128 0 0 1 128-128m256-256a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),iN=aN,sN=N({name:"CopyDocument",__name:"copy-document",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),E("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),cN=sN,uN=N({name:"Cpu",__name:"cpu",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32"})]))}}),dN=uN,pN=N({name:"CreditCard",__name:"credit-card",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 324.096c0-42.368-2.496-55.296-9.536-68.48a52.352 52.352 0 0 0-22.144-22.08c-13.12-7.04-26.048-9.536-68.416-9.536H228.096c-42.368 0-55.296 2.496-68.48 9.536a52.352 52.352 0 0 0-22.08 22.144c-7.04 13.12-9.536 26.048-9.536 68.416v375.808c0 42.368 2.496 55.296 9.536 68.48a52.352 52.352 0 0 0 22.144 22.08c13.12 7.04 26.048 9.536 68.416 9.536h567.808c42.368 0 55.296-2.496 68.48-9.536a52.352 52.352 0 0 0 22.08-22.144c7.04-13.12 9.536-26.048 9.536-68.416zm64 0v375.808c0 57.088-5.952 77.76-17.088 98.56-11.136 20.928-27.52 37.312-48.384 48.448-20.864 11.136-41.6 17.088-98.56 17.088H228.032c-57.088 0-77.76-5.952-98.56-17.088a116.288 116.288 0 0 1-48.448-48.384c-11.136-20.864-17.088-41.6-17.088-98.56V324.032c0-57.088 5.952-77.76 17.088-98.56 11.136-20.928 27.52-37.312 48.384-48.448 20.864-11.136 41.6-17.088 98.56-17.088H795.84c57.088 0 77.76 5.952 98.56 17.088 20.928 11.136 37.312 27.52 48.448 48.384 11.136 20.864 17.088 41.6 17.088 98.56z"}),E("path",{fill:"currentColor",d:"M64 320h896v64H64zm0 128h896v64H64zm128 192h256v64H192z"})]))}}),fN=pN,hN=N({name:"Crop",__name:"crop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768h672a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V96a32 32 0 0 1 64 0z"}),E("path",{fill:"currentColor",d:"M832 224v704a32 32 0 1 1-64 0V256H96a32 32 0 0 1 0-64h704a32 32 0 0 1 32 32"})]))}}),vN=hN,mN=N({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Ra=mN,gN=N({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),La=gN,bN=N({name:"DCaret",__name:"d-caret",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}}),_N=bN,wN=N({name:"DataAnalysis",__name:"data-analysis",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m665.216 768 110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32l110.848-192H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32zM832 192H192v512h640zM352 448a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0v-64a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0V416a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V352a32 32 0 0 1 32-32"})]))}}),yN=wN,xN=N({name:"DataBoard",__name:"data-board",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M32 128h960v64H32z"}),E("path",{fill:"currentColor",d:"M192 192v512h640V192zm-64-64h768v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),E("path",{fill:"currentColor",d:"M322.176 960H248.32l144.64-250.56 55.424 32zm453.888 0h-73.856L576 741.44l55.424-32z"})]))}}),kN=xN,CN=N({name:"DataLine",__name:"data-line",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"})]))}}),SN=CN,EN=N({name:"DeleteFilled",__name:"delete-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),TN=EN,$N=N({name:"DeleteLocation",__name:"delete-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M384 384h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),MN=$N,AN=N({name:"Delete",__name:"delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),N3=AN,zN=N({name:"Dessert",__name:"dessert",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 416v-48a144 144 0 0 1 168.64-141.888 224.128 224.128 0 0 1 430.72 0A144 144 0 0 1 896 368v48a384 384 0 0 1-352 382.72V896h-64v-97.28A384 384 0 0 1 128 416m287.104-32.064h193.792a143.808 143.808 0 0 1 58.88-132.736 160.064 160.064 0 0 0-311.552 0 143.808 143.808 0 0 1 58.88 132.8zm-72.896 0a72 72 0 1 0-140.48 0h140.48m339.584 0h140.416a72 72 0 1 0-140.48 0zM512 736a320 320 0 0 0 318.4-288.064H193.6A320 320 0 0 0 512 736M384 896.064h256a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64"})]))}}),IN=zN,ON=N({name:"Discount",__name:"discount",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 704h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0L224 318.336zm0 64v128h576V768zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),NN=ON,PN=N({name:"DishDot",__name:"dish-dot",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m384.064 274.56.064-50.688A128 128 0 0 1 512.128 96c70.528 0 127.68 57.152 127.68 127.68v50.752A448.192 448.192 0 0 1 955.392 768H68.544A448.192 448.192 0 0 1 384 274.56zM96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-128h768a384 384 0 1 0-768 0m447.808-448v-32.32a63.68 63.68 0 0 0-63.68-63.68 64 64 0 0 0-64 63.936V256z"})]))}}),RN=PN,LN=N({name:"Dish",__name:"dish",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 257.152V192h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64h-96v65.152A448 448 0 0 1 955.52 768H68.48A448 448 0 0 1 480 257.152M128 704h768a384 384 0 1 0-768 0M96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64"})]))}}),BN=LN,VN=N({name:"DocumentAdd",__name:"document-add",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z"})]))}}),DN=VN,HN=N({name:"DocumentChecked",__name:"document-checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m318.4 582.144 180.992-180.992L704.64 510.4 478.4 736.64 320 578.304l45.248-45.312z"})]))}}),FN=HN,jN=N({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),KN=jN,UN=N({name:"DocumentDelete",__name:"document-delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m308.992 546.304-90.496-90.624 45.248-45.248 90.56 90.496 90.496-90.432 45.248 45.248-90.496 90.56 90.496 90.496-45.248 45.248-90.496-90.496-90.56 90.496-45.248-45.248 90.496-90.496z"})]))}}),WN=UN,qN=N({name:"DocumentRemove",__name:"document-remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m192 512h320v64H352z"})]))}}),YN=qN,GN=N({name:"Document",__name:"document",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),P3=GN,XN=N({name:"Download",__name:"download",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),ZN=XN,JN=N({name:"Drizzling",__name:"drizzling",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M288 800h64v64h-64zm192 0h64v64h-64zm-96 96h64v64h-64zm192 0h64v64h-64zm96-96h64v64h-64z"})]))}}),QN=JN,eP=N({name:"EditPen",__name:"edit-pen",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),tP=eP,oP=N({name:"Edit",__name:"edit",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),E("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),rP=oP,lP=N({name:"ElemeFilled",__name:"eleme-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 64h672c61.824 0 112 50.176 112 112v672a112 112 0 0 1-112 112H176A112 112 0 0 1 64 848V176c0-61.824 50.176-112 112-112m150.528 173.568c-152.896 99.968-196.544 304.064-97.408 456.96a330.688 330.688 0 0 0 456.96 96.64c9.216-5.888 17.6-11.776 25.152-18.56a18.24 18.24 0 0 0 4.224-24.32L700.352 724.8a47.552 47.552 0 0 0-65.536-14.272A234.56 234.56 0 0 1 310.592 641.6C240 533.248 271.104 387.968 379.456 316.48a234.304 234.304 0 0 1 276.352 15.168c1.664.832 2.56 2.56 3.392 4.224 5.888 8.384 3.328 19.328-5.12 25.216L456.832 489.6a47.552 47.552 0 0 0-14.336 65.472l16 24.384c5.888 8.384 16.768 10.88 25.216 5.056l308.224-199.936a19.584 19.584 0 0 0 6.72-23.488v-.896c-4.992-9.216-10.048-17.6-15.104-26.88-99.968-151.168-304.064-194.88-456.96-95.744zM786.88 504.704l-62.208 40.32c-8.32 5.888-10.88 16.768-4.992 25.216L760 632.32c5.888 8.448 16.768 11.008 25.152 5.12l31.104-20.16a55.36 55.36 0 0 0 16-76.48l-20.224-31.04a19.52 19.52 0 0 0-25.152-5.12z"})]))}}),nP=lP,aP=N({name:"Eleme",__name:"eleme",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M300.032 188.8c174.72-113.28 408-63.36 522.24 109.44 5.76 10.56 11.52 20.16 17.28 30.72v.96a22.4 22.4 0 0 1-7.68 26.88l-352.32 228.48c-9.6 6.72-22.08 3.84-28.8-5.76l-18.24-27.84a54.336 54.336 0 0 1 16.32-74.88l225.6-146.88c9.6-6.72 12.48-19.2 5.76-28.8-.96-1.92-1.92-3.84-3.84-4.8a267.84 267.84 0 0 0-315.84-17.28c-123.84 81.6-159.36 247.68-78.72 371.52a268.096 268.096 0 0 0 370.56 78.72 54.336 54.336 0 0 1 74.88 16.32l17.28 26.88c5.76 9.6 3.84 21.12-4.8 27.84-8.64 7.68-18.24 14.4-28.8 21.12a377.92 377.92 0 0 1-522.24-110.4c-113.28-174.72-63.36-408 111.36-522.24zm526.08 305.28a22.336 22.336 0 0 1 28.8 5.76l23.04 35.52a63.232 63.232 0 0 1-18.24 87.36l-35.52 23.04c-9.6 6.72-22.08 3.84-28.8-5.76l-46.08-71.04c-6.72-9.6-3.84-22.08 5.76-28.8l71.04-46.08z"})]))}}),iP=aP,sP=N({name:"ElementPlus",__name:"element-plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M839.7 734.7c0 33.3-17.9 41-17.9 41S519.7 949.8 499.2 960c-10.2 5.1-20.5 5.1-30.7 0 0 0-314.9-184.3-325.1-192-5.1-5.1-10.2-12.8-12.8-20.5V368.6c0-17.9 20.5-28.2 20.5-28.2L466 158.6c12.8-5.1 25.6-5.1 38.4 0 0 0 279 161.3 309.8 179.2 17.9 7.7 28.2 25.6 25.6 46.1-.1-5-.1 317.5-.1 350.8M714.2 371.2c-64-35.8-217.6-125.4-217.6-125.4-7.7-5.1-20.5-5.1-30.7 0L217.6 389.1s-17.9 10.2-17.9 23v297c0 5.1 5.1 12.8 7.7 17.9 7.7 5.1 256 148.5 256 148.5 7.7 5.1 17.9 5.1 25.6 0 15.4-7.7 250.9-145.9 250.9-145.9s12.8-5.1 12.8-30.7v-74.2l-276.5 169v-64c0-17.9 7.7-30.7 20.5-46.1L745 535c5.1-7.7 10.2-20.5 10.2-30.7v-66.6l-279 169v-69.1c0-15.4 5.1-30.7 17.9-38.4l220.1-128zM919 135.7c0-5.1-5.1-7.7-7.7-7.7h-58.9V66.6c0-5.1-5.1-5.1-10.2-5.1l-30.7 5.1c-5.1 0-5.1 2.6-5.1 5.1V128h-56.3c-5.1 0-5.1 5.1-7.7 5.1v38.4h69.1v64c0 5.1 5.1 5.1 10.2 5.1l30.7-5.1c5.1 0 5.1-2.6 5.1-5.1v-56.3h64l-2.5-38.4z"})]))}}),cP=sP,uP=N({name:"Expand",__name:"expand",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),dP=uP,pP=N({name:"Failed",__name:"failed",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m557.248 608 135.744-135.744-45.248-45.248-135.68 135.744-135.808-135.68-45.248 45.184L466.752 608l-135.68 135.68 45.184 45.312L512 653.248l135.744 135.744 45.248-45.248L557.312 608zM704 192h160v736H160V192h160v64h384zm-320 0V96h256v96z"})]))}}),fP=pP,hP=N({name:"Female",__name:"female",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 640a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M512 640q32 0 32 32v256q0 32-32 32t-32-32V672q0-32 32-32"}),E("path",{fill:"currentColor",d:"M352 800h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}}),vP=hP,mP=N({name:"Files",__name:"files",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384v448h768V384zm-32-64h832a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32m64-128h704v64H160zm96-128h512v64H256z"})]))}}),gP=mP,bP=N({name:"Film",__name:"film",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M320 288V128h64v352h256V128h64v160h160v64H704v128h160v64H704v128h160v64H704v160h-64V544H384v352h-64V736H128v-64h192V544H128v-64h192V352H128v-64z"})]))}}),_P=bP,wP=N({name:"Filter",__name:"filter",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z"})]))}}),yP=wP,xP=N({name:"Finished",__name:"finished",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),kP=xP,CP=N({name:"FirstAidKit",__name:"first-aid-kit",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 256a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M544 512h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0zM352 128v64h320v-64zm-32-64h384a32 32 0 0 1 32 32v128a32 32 0 0 1-32 32H320a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"})]))}}),SP=CP,EP=N({name:"Flag",__name:"flag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 128h608L736 384l160 256H288v320h-96V64h96z"})]))}}),TP=EP,$P=N({name:"Fold",__name:"fold",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384 128 512l192 128z"})]))}}),MP=$P,AP=N({name:"FolderAdd",__name:"folder-add",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m384 416V416h64v128h128v64H544v128h-64V608H352v-64z"})]))}}),zP=AP,IP=N({name:"FolderChecked",__name:"folder-checked",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m414.08 502.144 180.992-180.992L736.32 494.4 510.08 720.64l-158.4-158.336 45.248-45.312z"})]))}}),OP=IP,NP=N({name:"FolderDelete",__name:"folder-delete",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m370.752 448-90.496-90.496 45.248-45.248L512 530.752l90.496-90.496 45.248 45.248L557.248 576l90.496 90.496-45.248 45.248L512 621.248l-90.496 90.496-45.248-45.248z"})]))}}),PP=NP,RP=N({name:"FolderOpened",__name:"folder-opened",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"})]))}}),LP=RP,BP=N({name:"FolderRemove",__name:"folder-remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m256 416h320v64H352z"})]))}}),VP=BP,DP=N({name:"Folder",__name:"folder",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"})]))}}),HP=DP,FP=N({name:"Food",__name:"food",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 352.576V352a288 288 0 0 1 491.072-204.224 192 192 0 0 1 274.24 204.48 64 64 0 0 1 57.216 74.24C921.6 600.512 850.048 710.656 736 756.992V800a96 96 0 0 1-96 96H384a96 96 0 0 1-96-96v-43.008c-114.048-46.336-185.6-156.48-214.528-330.496A64 64 0 0 1 128 352.64zm64-.576h64a160 160 0 0 1 320 0h64a224 224 0 0 0-448 0m128 0h192a96 96 0 0 0-192 0m439.424 0h68.544A128.256 128.256 0 0 0 704 192c-15.36 0-29.952 2.688-43.52 7.616 11.328 18.176 20.672 37.76 27.84 58.304A64.128 64.128 0 0 1 759.424 352M672 768H352v32a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32zm-342.528-64h365.056c101.504-32.64 165.76-124.928 192.896-288H136.576c27.136 163.072 91.392 255.36 192.896 288"})]))}}),jP=FP,KP=N({name:"Football",__name:"football",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-64a384 384 0 1 0 0-768 384 384 0 0 0 0 768"}),E("path",{fill:"currentColor",d:"M186.816 268.288c16-16.384 31.616-31.744 46.976-46.08 17.472 30.656 39.808 58.112 65.984 81.28l-32.512 56.448a385.984 385.984 0 0 1-80.448-91.648zm653.696-5.312a385.92 385.92 0 0 1-83.776 96.96l-32.512-56.384a322.923 322.923 0 0 0 68.48-85.76c15.552 14.08 31.488 29.12 47.808 45.184zM465.984 445.248l11.136-63.104a323.584 323.584 0 0 0 69.76 0l11.136 63.104a387.968 387.968 0 0 1-92.032 0m-62.72-12.8A381.824 381.824 0 0 1 320 396.544l32-55.424a319.885 319.885 0 0 0 62.464 27.712l-11.2 63.488zm300.8-35.84a381.824 381.824 0 0 1-83.328 35.84l-11.2-63.552A319.885 319.885 0 0 0 672 341.184l32 55.424zm-520.768 364.8a385.92 385.92 0 0 1 83.968-97.28l32.512 56.32c-26.88 23.936-49.856 52.352-67.52 84.032-16-13.44-32.32-27.712-48.96-43.072zm657.536.128a1442.759 1442.759 0 0 1-49.024 43.072 321.408 321.408 0 0 0-67.584-84.16l32.512-56.32c33.216 27.456 61.696 60.352 84.096 97.408zM465.92 578.752a387.968 387.968 0 0 1 92.032 0l-11.136 63.104a323.584 323.584 0 0 0-69.76 0zm-62.72 12.8 11.2 63.552a319.885 319.885 0 0 0-62.464 27.712L320 627.392a381.824 381.824 0 0 1 83.264-35.84zm300.8 35.84-32 55.424a318.272 318.272 0 0 0-62.528-27.712l11.2-63.488c29.44 8.64 57.28 20.736 83.264 35.776z"})]))}}),UP=KP,WP=N({name:"ForkSpoon",__name:"fork-spoon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 410.304V96a32 32 0 0 1 64 0v314.304a96 96 0 0 0 64-90.56V96a32 32 0 0 1 64 0v223.744a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.544a160 160 0 0 1-128-156.8V96a32 32 0 0 1 64 0v223.744a96 96 0 0 0 64 90.56zM672 572.48C581.184 552.128 512 446.848 512 320c0-141.44 85.952-256 192-256s192 114.56 192 256c0 126.848-69.184 232.128-160 252.48V928a32 32 0 1 1-64 0zM704 512c66.048 0 128-82.56 128-192s-61.952-192-128-192-128 82.56-128 192 61.952 192 128 192"})]))}}),qP=WP,YP=N({name:"Fries",__name:"fries",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M608 224v-64a32 32 0 0 0-64 0v336h26.88A64 64 0 0 0 608 484.096zm101.12 160A64 64 0 0 0 672 395.904V384h64V224a32 32 0 1 0-64 0v160zm74.88 0a92.928 92.928 0 0 1 91.328 110.08l-60.672 323.584A96 96 0 0 1 720.32 896H303.68a96 96 0 0 1-94.336-78.336L148.672 494.08A92.928 92.928 0 0 1 240 384h-16V224a96 96 0 0 1 188.608-25.28A95.744 95.744 0 0 1 480 197.44V160a96 96 0 0 1 188.608-25.28A96 96 0 0 1 800 224v160zM670.784 512a128 128 0 0 1-99.904 48H453.12a128 128 0 0 1-99.84-48H352v-1.536a128.128 128.128 0 0 1-9.984-14.976L314.88 448H240a28.928 28.928 0 0 0-28.48 34.304L241.088 640h541.824l29.568-157.696A28.928 28.928 0 0 0 784 448h-74.88l-27.136 47.488A132.405 132.405 0 0 1 672 510.464V512zM480 288a32 32 0 0 0-64 0v196.096A64 64 0 0 0 453.12 496H480zm-128 96V224a32 32 0 0 0-64 0v160zh-37.12A64 64 0 0 1 352 395.904zm-98.88 320 19.072 101.888A32 32 0 0 0 303.68 832h416.64a32 32 0 0 0 31.488-26.112L770.88 704z"})]))}}),GP=YP,XP=N({name:"FullScreen",__name:"full-screen",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),R3=XP,ZP=N({name:"GobletFull",__name:"goblet-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 320h512c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320m503.936 64H264.064a256.128 256.128 0 0 0 495.872 0zM544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4"})]))}}),JP=ZP,QP=N({name:"GobletSquareFull",__name:"goblet-square-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 270.912c10.048 6.72 22.464 14.912 28.992 18.624a220.16 220.16 0 0 0 114.752 30.72c30.592 0 49.408-9.472 91.072-41.152l.64-.448c52.928-40.32 82.368-55.04 132.288-54.656 55.552.448 99.584 20.8 142.72 57.408l1.536 1.28V128H256v142.912zm.96 76.288C266.368 482.176 346.88 575.872 512 576c157.44.064 237.952-85.056 253.248-209.984a952.32 952.32 0 0 1-40.192-35.712c-32.704-27.776-63.36-41.92-101.888-42.24-31.552-.256-50.624 9.28-93.12 41.6l-.576.448c-52.096 39.616-81.024 54.208-129.792 54.208-54.784 0-100.48-13.376-142.784-37.056zM480 638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96z"})]))}}),eR=QP,tR=N({name:"GobletSquare",__name:"goblet-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 638.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912M256 319.68c0 149.568 80 256.192 256 256.256C688.128 576 768 469.568 768 320V128H256z"})]))}}),oR=tR,rR=N({name:"Goblet",__name:"goblet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4M256 320a256 256 0 1 0 512 0c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320"})]))}}),lR=rR,nR=N({name:"GoldMedal",__name:"gold-medal",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m772.13 452.84 53.86-351.81c1.32-10.01-1.17-18.68-7.49-26.02S804.35 64 795.01 64H228.99v-.01h-.06c-9.33 0-17.15 3.67-23.49 11.01s-8.83 16.01-7.49 26.02l53.87 351.89C213.54 505.73 193.59 568.09 192 640c2 90.67 33.17 166.17 93.5 226.5S421.33 957.99 512 960c90.67-2 166.17-33.17 226.5-93.5 60.33-60.34 91.49-135.83 93.5-226.5-1.59-71.94-21.56-134.32-59.87-187.16zM640.01 128h117.02l-39.01 254.02c-20.75-10.64-40.74-19.73-59.94-27.28-5.92-3-11.95-5.8-18.08-8.41V128h.01zM576 128v198.76c-13.18-2.58-26.74-4.43-40.67-5.55-8.07-.8-15.85-1.2-23.33-1.2-10.54 0-21.09.66-31.64 1.96a359.844 359.844 0 0 0-32.36 4.79V128zm-192 0h.04v218.3c-6.22 2.66-12.34 5.5-18.36 8.56-19.13 7.54-39.02 16.6-59.66 27.16L267.01 128zm308.99 692.99c-48 48-108.33 73-180.99 75.01-72.66-2.01-132.99-27.01-180.99-75.01S258.01 712.66 256 640c2.01-72.66 27.01-132.99 75.01-180.99 19.67-19.67 41.41-35.47 65.22-47.41 38.33-15.04 71.15-23.92 98.44-26.65 5.07-.41 10.2-.7 15.39-.88.63-.01 1.28-.03 1.91-.03.66 0 1.35.03 2.02.04 5.11.17 10.15.46 15.13.86 27.4 2.71 60.37 11.65 98.91 26.79 23.71 11.93 45.36 27.69 64.96 47.29 48 48 73 108.33 75.01 180.99-2.01 72.65-27.01 132.98-75.01 180.98z"}),E("path",{fill:"currentColor",d:"M544 480H416v64h64v192h-64v64h192v-64h-64z"})]))}}),aR=nR,iR=N({name:"GoodsFilled",__name:"goods-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 352h640l64 544H128zm128 224h64V448h-64zm320 0h64V448h-64zM384 288h-64a192 192 0 1 1 384 0h-64a128 128 0 1 0-256 0"})]))}}),sR=iR,cR=N({name:"Goods",__name:"goods",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 288v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4h131.072a32 32 0 0 1 31.808 28.8l57.6 576a32 32 0 0 1-31.808 35.2H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320zm64 0h256v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4zm-64 64H217.92l-51.2 512h690.56l-51.264-512H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0z"})]))}}),uR=cR,dR=N({name:"Grape",__name:"grape",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 195.2a160 160 0 0 1 96 60.8 160 160 0 1 1 146.24 254.976 160 160 0 0 1-128 224 160 160 0 1 1-292.48 0 160 160 0 0 1-128-224A160 160 0 1 1 384 256a160 160 0 0 1 96-60.8V128h-64a32 32 0 0 1 0-64h192a32 32 0 0 1 0 64h-64zM512 448a96 96 0 1 0 0-192 96 96 0 0 0 0 192m-256 0a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),pR=dR,fR=N({name:"Grid",__name:"grid",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),hR=fR,vR=N({name:"Guide",__name:"guide",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),E("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),mR=vR,gR=N({name:"Handbag",__name:"handbag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M887.01 264.99c-6-5.99-13.67-8.99-23.01-8.99H704c-1.34-54.68-20.01-100.01-56-136s-81.32-54.66-136-56c-54.68 1.34-100.01 20.01-136 56s-54.66 81.32-56 136H160c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.67-8.99 23.01v640c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V288c0-9.35-2.99-17.02-8.99-23.01M421.5 165.5c24.32-24.34 54.49-36.84 90.5-37.5 35.99.68 66.16 13.18 90.5 37.5s36.84 54.49 37.5 90.5H384c.68-35.99 13.18-66.16 37.5-90.5M832 896H192V320h128v128h64V320h256v128h64V320h128z"})]))}}),bR=gR,_R=N({name:"Headset",__name:"headset",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M896 529.152V512a384 384 0 1 0-768 0v17.152A128 128 0 0 1 320 640v128a128 128 0 1 1-256 0V512a448 448 0 1 1 896 0v256a128 128 0 1 1-256 0V640a128 128 0 0 1 192-110.848M896 640a64 64 0 0 0-128 0v128a64 64 0 0 0 128 0zm-768 0v128a64 64 0 0 0 128 0V640a64 64 0 1 0-128 0"})]))}}),wR=_R,yR=N({name:"HelpFilled",__name:"help-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M926.784 480H701.312A192.512 192.512 0 0 0 544 322.688V97.216A416.064 416.064 0 0 1 926.784 480m0 64A416.064 416.064 0 0 1 544 926.784V701.312A192.512 192.512 0 0 0 701.312 544zM97.28 544h225.472A192.512 192.512 0 0 0 480 701.312v225.472A416.064 416.064 0 0 1 97.216 544zm0-64A416.064 416.064 0 0 1 480 97.216v225.472A192.512 192.512 0 0 0 322.688 480H97.216z"})]))}}),xR=yR,kR=N({name:"Help",__name:"help",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m759.936 805.248-90.944-91.008A254.912 254.912 0 0 1 512 768a254.912 254.912 0 0 1-156.992-53.76l-90.944 91.008A382.464 382.464 0 0 0 512 896c94.528 0 181.12-34.176 247.936-90.752m45.312-45.312A382.464 382.464 0 0 0 896 512c0-94.528-34.176-181.12-90.752-247.936l-91.008 90.944C747.904 398.4 768 452.864 768 512c0 59.136-20.096 113.6-53.76 156.992l91.008 90.944zm-45.312-541.184A382.464 382.464 0 0 0 512 128c-94.528 0-181.12 34.176-247.936 90.752l90.944 91.008A254.912 254.912 0 0 1 512 256c59.136 0 113.6 20.096 156.992 53.76l90.944-91.008zm-541.184 45.312A382.464 382.464 0 0 0 128 512c0 94.528 34.176 181.12 90.752 247.936l91.008-90.944A254.912 254.912 0 0 1 256 512c0-59.136 20.096-113.6 53.76-156.992zm417.28 394.496a194.56 194.56 0 0 0 22.528-22.528C686.912 602.56 704 559.232 704 512a191.232 191.232 0 0 0-67.968-146.56A191.296 191.296 0 0 0 512 320a191.232 191.232 0 0 0-146.56 67.968C337.088 421.44 320 464.768 320 512a191.232 191.232 0 0 0 67.968 146.56C421.44 686.912 464.768 704 512 704c47.296 0 90.56-17.088 124.032-45.44zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),CR=kR,SR=N({name:"Hide",__name:"hide",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),E("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),L3=SR,ER=N({name:"Histogram",__name:"histogram",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),TR=ER,$R=N({name:"HomeFilled",__name:"home-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),MR=$R,AR=N({name:"HotWater",__name:"hot-water",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M273.067 477.867h477.866V409.6H273.067zm0 68.266v51.2A187.733 187.733 0 0 0 460.8 785.067h102.4a187.733 187.733 0 0 0 187.733-187.734v-51.2H273.067zm-34.134-204.8h546.134a34.133 34.133 0 0 1 34.133 34.134v221.866a256 256 0 0 1-256 256H460.8a256 256 0 0 1-256-256V375.467a34.133 34.133 0 0 1 34.133-34.134zM512 34.133a34.133 34.133 0 0 1 34.133 34.134v170.666a34.133 34.133 0 0 1-68.266 0V68.267A34.133 34.133 0 0 1 512 34.133zM375.467 102.4a34.133 34.133 0 0 1 34.133 34.133v102.4a34.133 34.133 0 0 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.134-34.133m273.066 0a34.133 34.133 0 0 1 34.134 34.133v102.4a34.133 34.133 0 1 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.133-34.133M170.667 921.668h682.666a34.133 34.133 0 1 1 0 68.267H170.667a34.133 34.133 0 1 1 0-68.267z"})]))}}),zR=AR,IR=N({name:"House",__name:"house",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 413.952V896h640V413.952L512 147.328zM139.52 374.4l352-293.312a32 32 0 0 1 40.96 0l352 293.312A32 32 0 0 1 896 398.976V928a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V398.976a32 32 0 0 1 11.52-24.576"})]))}}),OR=IR,NR=N({name:"IceCreamRound",__name:"ice-cream-round",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m308.352 489.344 226.304 226.304a32 32 0 0 0 45.248 0L783.552 512A192 192 0 1 0 512 240.448L308.352 444.16a32 32 0 0 0 0 45.248zm135.744 226.304L308.352 851.392a96 96 0 0 1-135.744-135.744l135.744-135.744-45.248-45.248a96 96 0 0 1 0-135.808L466.752 195.2A256 256 0 0 1 828.8 557.248L625.152 760.96a96 96 0 0 1-135.808 0l-45.248-45.248zM398.848 670.4 353.6 625.152 217.856 760.896a32 32 0 0 0 45.248 45.248zm248.96-384.64a32 32 0 0 1 0 45.248L466.624 512a32 32 0 1 1-45.184-45.248l180.992-181.056a32 32 0 0 1 45.248 0zm90.496 90.496a32 32 0 0 1 0 45.248L557.248 602.496A32 32 0 1 1 512 557.248l180.992-180.992a32 32 0 0 1 45.312 0z"})]))}}),PR=NR,RR=N({name:"IceCreamSquare",__name:"ice-cream-square",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 640h256a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32H352a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32zm192 64v160a96 96 0 0 1-192 0V704h-64a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96h320a96 96 0 0 1 96 96v448a96 96 0 0 1-96 96zm-64 0h-64v160a32 32 0 1 0 64 0z"})]))}}),LR=RR,BR=N({name:"IceCream",__name:"ice-cream",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128.64 448a208 208 0 0 1 193.536-191.552 224 224 0 0 1 445.248 15.488A208.128 208.128 0 0 1 894.784 448H896L548.8 983.68a32 32 0 0 1-53.248.704L128 448zm64.256 0h286.208a144 144 0 0 0-286.208 0zm351.36 0h286.272a144 144 0 0 0-286.272 0zm-294.848 64 271.808 396.608L778.24 512H249.408zM511.68 352.64a207.872 207.872 0 0 1 189.184-96.192 160 160 0 0 0-314.752 5.632c52.608 12.992 97.28 46.08 125.568 90.56"})]))}}),VR=BR,DR=N({name:"IceDrink",__name:"ice-drink",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 448v128h239.68l16.064-128zm-64 0H256.256l16.064 128H448zm64-255.36V384h247.744A256.128 256.128 0 0 0 512 192.64m-64 8.064A256.448 256.448 0 0 0 264.256 384H448zm64-72.064A320.128 320.128 0 0 1 825.472 384H896a32 32 0 1 1 0 64h-64v1.92l-56.96 454.016A64 64 0 0 1 711.552 960H312.448a64 64 0 0 1-63.488-56.064L192 449.92V448h-64a32 32 0 0 1 0-64h70.528A320.384 320.384 0 0 1 448 135.04V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H544a32 32 0 0 0-32 32zM743.68 640H280.32l32.128 256h399.104z"})]))}}),HR=DR,FR=N({name:"IceTea",__name:"ice-tea",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M197.696 259.648a320.128 320.128 0 0 1 628.608 0A96 96 0 0 1 896 352v64a96 96 0 0 1-71.616 92.864l-49.408 395.072A64 64 0 0 1 711.488 960H312.512a64 64 0 0 1-63.488-56.064l-49.408-395.072A96 96 0 0 1 128 416v-64a96 96 0 0 1 69.696-92.352M264.064 256h495.872a256.128 256.128 0 0 0-495.872 0m495.424 256H264.512l48 384h398.976zM224 448h576a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32H224a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32m160 192h64v64h-64zm192 64h64v64h-64zm-128 64h64v64h-64zm64-192h64v64h-64z"})]))}}),jR=FR,KR=N({name:"InfoFilled",__name:"info-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Id=KR,UR=N({name:"Iphone",__name:"iphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),WR=UR,qR=N({name:"Key",__name:"key",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),YR=qR,GR=N({name:"KnifeFork",__name:"knife-fork",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 410.56V96a32 32 0 0 1 64 0v314.56A96 96 0 0 0 384 320V96a32 32 0 0 1 64 0v224a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.8A160 160 0 0 1 128 320V96a32 32 0 0 1 64 0v224a96 96 0 0 0 64 90.56m384-250.24V544h126.72c-3.328-78.72-12.928-147.968-28.608-207.744-14.336-54.528-46.848-113.344-98.112-175.872zM640 608v320a32 32 0 1 1-64 0V64h64c85.312 89.472 138.688 174.848 160 256 21.312 81.152 32 177.152 32 288z"})]))}}),XR=GR,ZR=N({name:"Lightning",__name:"lightning",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 671.36v64.128A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 736 734.016v-64.768a192 192 0 0 0 3.328-377.92l-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 91.968 70.464 167.36 160.256 175.232z"}),E("path",{fill:"currentColor",d:"M416 736a32 32 0 0 1-27.776-47.872l128-224a32 32 0 1 1 55.552 31.744L471.168 672H608a32 32 0 0 1 27.776 47.872l-128 224a32 32 0 1 1-55.68-31.744L552.96 736z"})]))}}),JR=ZR,QR=N({name:"Link",__name:"link",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),eL=QR,tL=N({name:"List",__name:"list",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"})]))}}),oL=tL,rL=N({name:"Loading",__name:"loading",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),vn=rL,lL=N({name:"LocationFilled",__name:"location-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 928c23.936 0 117.504-68.352 192.064-153.152C803.456 661.888 864 535.808 864 416c0-189.632-155.84-320-352-320S160 226.368 160 416c0 120.32 60.544 246.4 159.936 359.232C394.432 859.84 488 928 512 928m0-435.2a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 140.8a204.8 204.8 0 1 1 0-409.6 204.8 204.8 0 0 1 0 409.6"})]))}}),nL=lL,aL=N({name:"LocationInformation",__name:"location-information",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}}),iL=aL,sL=N({name:"Location",__name:"location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}}),cL=sL,uL=N({name:"Lock",__name:"lock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),dL=uL,pL=N({name:"Lollipop",__name:"lollipop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M513.28 448a64 64 0 1 1 76.544 49.728A96 96 0 0 0 768 448h64a160 160 0 0 1-320 0zm-126.976-29.696a256 256 0 1 0 43.52-180.48A256 256 0 0 1 832 448h-64a192 192 0 0 0-381.696-29.696m105.664 249.472L285.696 874.048a96 96 0 0 1-135.68-135.744l206.208-206.272a320 320 0 1 1 135.744 135.744zm-54.464-36.032a321.92 321.92 0 0 1-45.248-45.248L195.2 783.552a32 32 0 1 0 45.248 45.248l197.056-197.12z"})]))}}),fL=pL,hL=N({name:"MagicStick",__name:"magic-stick",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64h64v192h-64zm0 576h64v192h-64zM160 480v-64h192v64zm576 0v-64h192v64zM249.856 199.04l45.248-45.184L430.848 289.6 385.6 334.848 249.856 199.104zM657.152 606.4l45.248-45.248 135.744 135.744-45.248 45.248zM114.048 923.2 68.8 877.952l316.8-316.8 45.248 45.248zM702.4 334.848 657.152 289.6l135.744-135.744 45.248 45.248z"})]))}}),vL=hL,mL=N({name:"Magnet",__name:"magnet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 320V192H704v320a192 192 0 1 1-384 0V192H192v128h128v64H192v128a320 320 0 0 0 640 0V384H704v-64zM640 512V128h256v384a384 384 0 1 1-768 0V128h256v384a128 128 0 1 0 256 0"})]))}}),gL=mL,bL=N({name:"Male",__name:"male",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M399.5 849.5a225 225 0 1 0 0-450 225 225 0 0 0 0 450m0 56.25a281.25 281.25 0 1 1 0-562.5 281.25 281.25 0 0 1 0 562.5m253.125-787.5h225q28.125 0 28.125 28.125T877.625 174.5h-225q-28.125 0-28.125-28.125t28.125-28.125"}),E("path",{fill:"currentColor",d:"M877.625 118.25q28.125 0 28.125 28.125v225q0 28.125-28.125 28.125T849.5 371.375v-225q0-28.125 28.125-28.125"}),E("path",{fill:"currentColor",d:"M604.813 458.9 565.1 419.131l292.613-292.668 39.825 39.824z"})]))}}),_L=bL,wL=N({name:"Management",__name:"management",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M576 128v288l96-96 96 96V128h128v768H320V128zm-448 0h128v768H128z"})]))}}),yL=wL,xL=N({name:"MapLocation",__name:"map-location",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),kL=xL,CL=N({name:"Medal",__name:"medal",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M576 128H448v200a286.72 286.72 0 0 1 64-8c19.52 0 40.832 2.688 64 8zm64 0v219.648c24.448 9.088 50.56 20.416 78.4 33.92L757.44 128zm-256 0H266.624l39.04 253.568c27.84-13.504 53.888-24.832 78.336-33.92V128zM229.312 64h565.376a32 32 0 0 1 31.616 36.864L768 480c-113.792-64-199.104-96-256-96-56.896 0-142.208 32-256 96l-58.304-379.136A32 32 0 0 1 229.312 64"})]))}}),SL=CL,EL=N({name:"Memo",__name:"memo",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),E("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),E("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),TL=EL,$L=N({name:"Menu",__name:"menu",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}}),ML=$L,AL=N({name:"MessageBox",__name:"message-box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 384h448v64H288zm96-128h256v64H384zM131.456 512H384v128h256V512h252.544L721.856 192H302.144zM896 576H704v128H320V576H128v256h768zM275.776 128h472.448a32 32 0 0 1 28.608 17.664l179.84 359.552A32 32 0 0 1 960 519.552V864a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V519.552a32 32 0 0 1 3.392-14.336l179.776-359.552A32 32 0 0 1 275.776 128z"})]))}}),zL=AL,IL=N({name:"Message",__name:"message",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),E("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}}),OL=IL,NL=N({name:"Mic",__name:"mic",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 704h160a64 64 0 0 0 64-64v-32h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-32a64 64 0 0 0-64-64H384a64 64 0 0 0-64 64v32h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v32a64 64 0 0 0 64 64zm64 64v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768h-96a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64h256a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128z"})]))}}),PL=NL,RL=N({name:"Microphone",__name:"microphone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128a128 128 0 0 0-128 128v256a128 128 0 1 0 256 0V256a128 128 0 0 0-128-128m0-64a192 192 0 0 1 192 192v256a192 192 0 1 1-384 0V256A192 192 0 0 1 512 64m-32 832v-64a288 288 0 0 1-288-288v-32a32 32 0 0 1 64 0v32a224 224 0 0 0 224 224h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64z"})]))}}),LL=RL,BL=N({name:"MilkTea",__name:"milk-tea",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M416 128V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H512a32 32 0 0 0-32 32v32h320a96 96 0 0 1 11.712 191.296l-39.68 581.056A64 64 0 0 1 708.224 960H315.776a64 64 0 0 1-63.872-59.648l-39.616-581.056A96 96 0 0 1 224 128zM276.48 320l39.296 576h392.448l4.8-70.784a224.064 224.064 0 0 1 30.016-439.808L747.52 320zM224 256h576a32 32 0 1 0 0-64H224a32 32 0 0 0 0 64m493.44 503.872 21.12-309.12a160 160 0 0 0-21.12 309.12"})]))}}),VL=BL,DL=N({name:"Minus",__name:"minus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),B3=DL,HL=N({name:"Money",__name:"money",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),E("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.056 29.056 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),E("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),FL=HL,jL=N({name:"Monitor",__name:"monitor",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64z"})]))}}),KL=jL,UL=N({name:"MoonNight",__name:"moon-night",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 512a448 448 0 0 1 215.872-383.296A384 384 0 0 0 213.76 640h188.8A448.256 448.256 0 0 1 384 512M171.136 704a448 448 0 0 1 636.992-575.296A384 384 0 0 0 499.328 704h-328.32z"}),E("path",{fill:"currentColor",d:"M32 640h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m128 128h384a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m160 127.68 224 .256a32 32 0 0 1 32 32V928a32 32 0 0 1-32 32l-224-.384a32 32 0 0 1-32-32v-.064a32 32 0 0 1 32-32z"})]))}}),WL=UL,qL=N({name:"Moon",__name:"moon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M240.448 240.448a384 384 0 1 0 559.424 525.696 448 448 0 0 1-542.016-542.08 390.592 390.592 0 0 0-17.408 16.384zm181.056 362.048a384 384 0 0 0 525.632 16.384A448 448 0 1 1 405.056 76.8a384 384 0 0 0 16.448 525.696"})]))}}),YL=qL,GL=N({name:"MoreFilled",__name:"more-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),ph=GL,XL=N({name:"More",__name:"more",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),V3=XL,ZL=N({name:"MostlyCloudy",__name:"mostly-cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M737.216 357.952 704 349.824l-11.776-32a192.064 192.064 0 0 0-367.424 23.04l-8.96 39.04-39.04 8.96A192.064 192.064 0 0 0 320 768h368a207.808 207.808 0 0 0 207.808-208 208.32 208.32 0 0 0-158.592-202.048m15.168-62.208A272.32 272.32 0 0 1 959.744 560a271.808 271.808 0 0 1-271.552 272H320a256 256 0 0 1-57.536-505.536 256.128 256.128 0 0 1 489.92-30.72"})]))}}),JL=ZL,QL=N({name:"Mouse",__name:"mouse",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M438.144 256c-68.352 0-92.736 4.672-117.76 18.112-20.096 10.752-35.52 26.176-46.272 46.272C260.672 345.408 256 369.792 256 438.144v275.712c0 68.352 4.672 92.736 18.112 117.76 10.752 20.096 26.176 35.52 46.272 46.272C345.408 891.328 369.792 896 438.144 896h147.712c68.352 0 92.736-4.672 117.76-18.112 20.096-10.752 35.52-26.176 46.272-46.272C763.328 806.592 768 782.208 768 713.856V438.144c0-68.352-4.672-92.736-18.112-117.76a110.464 110.464 0 0 0-46.272-46.272C678.592 260.672 654.208 256 585.856 256zm0-64h147.712c85.568 0 116.608 8.96 147.904 25.6 31.36 16.768 55.872 41.344 72.576 72.64C823.104 321.536 832 352.576 832 438.08v275.84c0 85.504-8.96 116.544-25.6 147.84a174.464 174.464 0 0 1-72.64 72.576C702.464 951.104 671.424 960 585.92 960H438.08c-85.504 0-116.544-8.96-147.84-25.6a174.464 174.464 0 0 1-72.64-72.704c-16.768-31.296-25.664-62.336-25.664-147.84v-275.84c0-85.504 8.96-116.544 25.6-147.84a174.464 174.464 0 0 1 72.768-72.576c31.232-16.704 62.272-25.6 147.776-25.6z"}),E("path",{fill:"currentColor",d:"M512 320q32 0 32 32v128q0 32-32 32t-32-32V352q0-32 32-32m32-96a32 32 0 0 1-64 0v-64a32 32 0 0 0-32-32h-96a32 32 0 0 1 0-64h96a96 96 0 0 1 96 96z"})]))}}),eB=QL,tB=N({name:"Mug",__name:"mug",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M736 800V160H160v640a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64m64-544h63.552a96 96 0 0 1 96 96v224a96 96 0 0 1-96 96H800v128a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V128a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v288h63.552a32 32 0 0 0 32-32V352a32 32 0 0 0-32-32z"})]))}}),oB=tB,rB=N({name:"MuteNotification",__name:"mute-notification",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m241.216 832 63.616-64H768V448c0-42.368-10.24-82.304-28.48-117.504l46.912-47.232C815.36 331.392 832 387.84 832 448v320h96a32 32 0 1 1 0 64zm-90.24 0H96a32 32 0 1 1 0-64h96V448a320.128 320.128 0 0 1 256-313.6V128a64 64 0 1 1 128 0v6.4a319.552 319.552 0 0 1 171.648 97.088l-45.184 45.44A256 256 0 0 0 256 448v278.336L151.04 832zM448 896h128a64 64 0 0 1-128 0"}),E("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}}),lB=rB,nB=N({name:"Mute",__name:"mute",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m412.16 592.128-45.44 45.44A191.232 191.232 0 0 1 320 512V256a192 192 0 1 1 384 0v44.352l-64 64V256a128 128 0 1 0-256 0v256c0 30.336 10.56 58.24 28.16 80.128m51.968 38.592A128 128 0 0 0 640 512v-57.152l64-64V512a192 192 0 0 1-287.68 166.528zM314.88 779.968l46.144-46.08A222.976 222.976 0 0 0 480 768h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64h64v-64c-61.44 0-118.4-19.2-165.12-52.032M266.752 737.6A286.976 286.976 0 0 1 192 544v-32a32 32 0 0 1 64 0v32c0 56.832 21.184 108.8 56.064 148.288z"}),E("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}}),aB=nB,iB=N({name:"NoSmoking",__name:"no-smoking",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M440.256 576H256v128h56.256l-64 64H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32h280.256zm143.488 128H704V583.744L775.744 512H928a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H519.744zM768 576v128h128V576zm-29.696-207.552 45.248 45.248-497.856 497.856-45.248-45.248zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}}),sB=iB,cB=N({name:"Notebook",__name:"notebook",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),uB=cB,dB=N({name:"Notification",__name:"notification",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),E("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}}),pB=dB,fB=N({name:"Odometer",__name:"odometer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M192 512a320 320 0 1 1 640 0 32 32 0 1 1-64 0 256 256 0 1 0-512 0 32 32 0 0 1-64 0"}),E("path",{fill:"currentColor",d:"M570.432 627.84A96 96 0 1 1 509.568 608l60.992-187.776A32 32 0 1 1 631.424 440l-60.992 187.776zM502.08 734.464a32 32 0 1 0 19.84-60.928 32 32 0 0 0-19.84 60.928"})]))}}),hB=fB,vB=N({name:"OfficeBuilding",__name:"office-building",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v704h384V128zm-32-64h448a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M256 256h256v64H256zm0 192h256v64H256zm0 192h256v64H256zm384-128h128v64H640zm0 128h128v64H640zM64 832h896v64H64z"}),E("path",{fill:"currentColor",d:"M640 384v448h192V384zm-32-64h256a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H608a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32"})]))}}),mB=vB,gB=N({name:"Open",__name:"open",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),E("path",{fill:"currentColor",d:"M694.044 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}}),bB=gB,_B=N({name:"Operation",__name:"operation",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),wB=_B,yB=N({name:"Opportunity",__name:"opportunity",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 960v-64h192.064v64zm448-544a350.656 350.656 0 0 1-128.32 271.424C665.344 719.04 640 763.776 640 813.504V832H320v-14.336c0-48-19.392-95.36-57.216-124.992a351.552 351.552 0 0 1-128.448-344.256c25.344-136.448 133.888-248.128 269.76-276.48A352.384 352.384 0 0 1 832 416m-544 32c0-132.288 75.904-224 192-224v-64c-154.432 0-256 122.752-256 288z"})]))}}),xB=yB,kB=N({name:"Orange",__name:"orange",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 894.72a382.336 382.336 0 0 0 215.936-89.472L577.024 622.272c-10.24 6.016-21.248 10.688-33.024 13.696v258.688zm261.248-134.784A382.336 382.336 0 0 0 894.656 544H635.968c-3.008 11.776-7.68 22.848-13.696 33.024l182.976 182.912zM894.656 480a382.336 382.336 0 0 0-89.408-215.936L622.272 446.976c6.016 10.24 10.688 21.248 13.696 33.024h258.688zm-134.72-261.248A382.336 382.336 0 0 0 544 129.344v258.688c11.776 3.008 22.848 7.68 33.024 13.696zM480 129.344a382.336 382.336 0 0 0-215.936 89.408l182.912 182.976c10.24-6.016 21.248-10.688 33.024-13.696zm-261.248 134.72A382.336 382.336 0 0 0 129.344 480h258.688c3.008-11.776 7.68-22.848 13.696-33.024zM129.344 544a382.336 382.336 0 0 0 89.408 215.936l182.976-182.912A127.232 127.232 0 0 1 388.032 544zm134.72 261.248A382.336 382.336 0 0 0 480 894.656V635.968a127.232 127.232 0 0 1-33.024-13.696zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-384a64 64 0 1 0 0-128 64 64 0 0 0 0 128"})]))}}),CB=kB,SB=N({name:"Paperclip",__name:"paperclip",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744l294.144-294.208z"})]))}}),EB=SB,TB=N({name:"PartlyCloudy",__name:"partly-cloudy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M598.4 895.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 895.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 445.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"}),E("path",{fill:"currentColor",d:"M139.84 501.888a256 256 0 1 1 417.856-277.12c-17.728 2.176-38.208 8.448-61.504 18.816A192 192 0 1 0 189.12 460.48a6003.84 6003.84 0 0 0-49.28 41.408z"})]))}}),$B=TB,MB=N({name:"Pear",__name:"pear",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M542.336 258.816a443.255 443.255 0 0 0-9.024 25.088 32 32 0 1 1-60.8-20.032l1.088-3.328a162.688 162.688 0 0 0-122.048 131.392l-17.088 102.72-20.736 15.36C256.192 552.704 224 610.88 224 672c0 120.576 126.4 224 288 224s288-103.424 288-224c0-61.12-32.192-119.296-89.728-161.92l-20.736-15.424-17.088-102.72a162.688 162.688 0 0 0-130.112-133.12zm-40.128-66.56c7.936-15.552 16.576-30.08 25.92-43.776 23.296-33.92 49.408-59.776 78.528-77.12a32 32 0 1 1 32.704 55.04c-20.544 12.224-40.064 31.552-58.432 58.304a316.608 316.608 0 0 0-9.792 15.104 226.688 226.688 0 0 1 164.48 181.568l12.8 77.248C819.456 511.36 864 587.392 864 672c0 159.04-157.568 288-352 288S160 831.04 160 672c0-84.608 44.608-160.64 115.584-213.376l12.8-77.248a226.624 226.624 0 0 1 213.76-189.184z"})]))}}),AB=MB,zB=N({name:"PhoneFilled",__name:"phone-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M199.232 125.568 90.624 379.008a32 32 0 0 0 6.784 35.2l512.384 512.384a32 32 0 0 0 35.2 6.784l253.44-108.608a32 32 0 0 0 10.048-52.032L769.6 633.92a32 32 0 0 0-36.928-5.952l-130.176 65.088-271.488-271.552 65.024-130.176a32 32 0 0 0-5.952-36.928L251.2 115.52a32 32 0 0 0-51.968 10.048z"})]))}}),IB=zB,OB=N({name:"Phone",__name:"phone",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M79.36 432.256 591.744 944.64a32 32 0 0 0 35.2 6.784l253.44-108.544a32 32 0 0 0 9.984-52.032l-153.856-153.92a32 32 0 0 0-36.928-6.016l-69.888 34.944L358.08 394.24l35.008-69.888a32 32 0 0 0-5.952-36.928L233.152 133.568a32 32 0 0 0-52.032 10.048L72.512 397.056a32 32 0 0 0 6.784 35.2zm60.48-29.952 81.536-190.08L325.568 316.48l-24.64 49.216-20.608 41.216 32.576 32.64 271.552 271.552 32.64 32.64 41.216-20.672 49.28-24.576 104.192 104.128-190.08 81.472L139.84 402.304zM512 320v-64a256 256 0 0 1 256 256h-64a192 192 0 0 0-192-192m0-192V64a448 448 0 0 1 448 448h-64a384 384 0 0 0-384-384"})]))}}),NB=OB,PB=N({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),D3=PB,RB=N({name:"PictureRounded",__name:"picture-rounded",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 128a384 384 0 1 0 0 768 384 384 0 0 0 0-768m0-64a448 448 0 1 1 0 896 448 448 0 0 1 0-896"}),E("path",{fill:"currentColor",d:"M640 288q64 0 64 64t-64 64q-64 0-64-64t64-64M214.656 790.656l-45.312-45.312 185.664-185.6a96 96 0 0 1 123.712-10.24l138.24 98.688a32 32 0 0 0 39.872-2.176L906.688 422.4l42.624 47.744L699.52 693.696a96 96 0 0 1-119.808 6.592l-138.24-98.752a32 32 0 0 0-41.152 3.456l-185.664 185.6z"})]))}}),LB=RB,BB=N({name:"Picture",__name:"picture",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),VB=BB,DB=N({name:"PieChart",__name:"pie-chart",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 68.48v64.832A384.128 384.128 0 0 0 512 896a384.128 384.128 0 0 0 378.688-320h64.768A448.128 448.128 0 0 1 64 512 448.128 448.128 0 0 1 448 68.48z"}),E("path",{fill:"currentColor",d:"M576 97.28V448h350.72A384.064 384.064 0 0 0 576 97.28zM512 64V33.152A448 448 0 0 1 990.848 512H512z"})]))}}),HB=DB,FB=N({name:"Place",__name:"place",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"}),E("path",{fill:"currentColor",d:"M512 512a32 32 0 0 1 32 32v256a32 32 0 1 1-64 0V544a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M384 649.088v64.96C269.76 732.352 192 771.904 192 800c0 37.696 139.904 96 320 96s320-58.304 320-96c0-28.16-77.76-67.648-192-85.952v-64.96C789.12 671.04 896 730.368 896 800c0 88.32-171.904 160-384 160s-384-71.68-384-160c0-69.696 106.88-128.96 256-150.912"})]))}}),jB=FB,KB=N({name:"Platform",__name:"platform",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M448 832v-64h128v64h192v64H256v-64zM128 704V128h768v576z"})]))}}),UB=KB,WB=N({name:"Plus",__name:"plus",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),fh=WB,qB=N({name:"Pointer",__name:"pointer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M511.552 128c-35.584 0-64.384 28.8-64.384 64.448v516.48L274.048 570.88a94.272 94.272 0 0 0-112.896-3.456 44.416 44.416 0 0 0-8.96 62.208L332.8 870.4A64 64 0 0 0 384 896h512V575.232a64 64 0 0 0-45.632-61.312l-205.952-61.76A96 96 0 0 1 576 360.192V192.448C576 156.8 547.2 128 511.552 128M359.04 556.8l24.128 19.2V192.448a128.448 128.448 0 1 1 256.832 0v167.744a32 32 0 0 0 22.784 30.656l206.016 61.76A128 128 0 0 1 960 575.232V896a64 64 0 0 1-64 64H384a128 128 0 0 1-102.4-51.2L101.056 668.032A108.416 108.416 0 0 1 128 512.512a158.272 158.272 0 0 1 185.984 8.32z"})]))}}),YB=qB,GB=N({name:"Position",__name:"position",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z"})]))}}),XB=GB,ZB=N({name:"Postcard",__name:"postcard",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),JB=ZB,QB=N({name:"Pouring",__name:"pouring",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M224 800a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32"})]))}}),eV=QB,tV=N({name:"Present",__name:"present",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 896V640H192v-64h288V320H192v576zm64 0h288V320H544v256h288v64H544zM128 256h768v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),E("path",{fill:"currentColor",d:"M96 256h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32"}),E("path",{fill:"currentColor",d:"M416 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M608 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),oV=tV,rV=N({name:"PriceTag",__name:"price-tag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),E("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),lV=rV,nV=N({name:"Printer",__name:"printer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 768H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 746.432 64 741.248 64 727.04V379.072c0-42.816 4.48-58.304 12.8-73.984 8.384-15.616 20.672-27.904 36.288-36.288 15.68-8.32 31.168-12.8 73.984-12.8H256V64h512v192h68.928c42.816 0 58.304 4.48 73.984 12.8 15.616 8.384 27.904 20.672 36.288 36.288 8.32 15.68 12.8 31.168 12.8 73.984v347.904c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H768v192H256zm64-192v320h384V576zm-64 128V512h512v192h128V379.072c0-29.376-1.408-36.48-5.248-43.776a23.296 23.296 0 0 0-10.048-10.048c-7.232-3.84-14.4-5.248-43.776-5.248H187.072c-29.376 0-36.48 1.408-43.776 5.248a23.296 23.296 0 0 0-10.048 10.048c-3.84 7.232-5.248 14.4-5.248 43.776V704zm64-448h384V128H320zm-64 128h64v64h-64zm128 0h64v64h-64z"})]))}}),aV=nV,iV=N({name:"Promotion",__name:"promotion",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),sV=iV,cV=N({name:"QuartzWatch",__name:"quartz-watch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M422.02 602.01v-.03c-6.68-5.99-14.35-8.83-23.01-8.51-8.67.32-16.17 3.66-22.5 10.02-6.33 6.36-9.5 13.7-9.5 22.02s3 15.82 8.99 22.5c8.68 8.68 19.02 11.35 31.01 8s19.49-10.85 22.5-22.5c3.01-11.65.51-22.15-7.49-31.49zM384 512c0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.67 8.99-23.01m6.53-82.49c11.65 3.01 22.15.51 31.49-7.49h.04c5.99-6.68 8.83-14.34 8.51-23.01-.32-8.67-3.66-16.16-10.02-22.5-6.36-6.33-13.7-9.5-22.02-9.5s-15.82 3-22.5 8.99c-8.68 8.69-11.35 19.02-8 31.01 3.35 11.99 10.85 19.49 22.5 22.5zm242.94 0c11.67-3.03 19.01-10.37 22.02-22.02 3.01-11.65.51-22.15-7.49-31.49h.01c-6.68-5.99-14.18-8.99-22.5-8.99s-15.66 3.16-22.02 9.5c-6.36 6.34-9.7 13.84-10.02 22.5-.32 8.66 2.52 16.33 8.51 23.01 9.32 8.02 19.82 10.52 31.49 7.49M512 640c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01s-3-17.02-8.99-23.01c-6-5.99-13.66-8.99-23.01-8.99m183.01-151.01c-6-5.99-13.66-8.99-23.01-8.99s-17.02 3-23.01 8.99c-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99s17.02-3 23.01-8.99c5.99-6 8.99-13.67 8.99-23.01 0-9.35-3-17.02-8.99-23.01"}),E("path",{fill:"currentColor",d:"M832 512c-2-90.67-33.17-166.17-93.5-226.5-20.43-20.42-42.6-37.49-66.5-51.23V64H352v170.26c-23.9 13.74-46.07 30.81-66.5 51.24-60.33 60.33-91.49 135.83-93.5 226.5 2 90.67 33.17 166.17 93.5 226.5 20.43 20.43 42.6 37.5 66.5 51.24V960h320V789.74c23.9-13.74 46.07-30.81 66.5-51.24 60.33-60.34 91.49-135.83 93.5-226.5M416 128h192v78.69c-29.85-9.03-61.85-13.93-96-14.69-34.15.75-66.15 5.65-96 14.68zm192 768H416v-78.68c29.85 9.03 61.85 13.93 96 14.68 34.15-.75 66.15-5.65 96-14.68zm-96-128c-72.66-2.01-132.99-27.01-180.99-75.01S258.01 584.66 256 512c2.01-72.66 27.01-132.99 75.01-180.99S439.34 258.01 512 256c72.66 2.01 132.99 27.01 180.99 75.01S765.99 439.34 768 512c-2.01 72.66-27.01 132.99-75.01 180.99S584.66 765.99 512 768"}),E("path",{fill:"currentColor",d:"M512 320c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01 0 9.35 3 17.02 8.99 23.01 6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01 0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99m112.99 273.5c-8.66-.32-16.33 2.52-23.01 8.51-7.98 9.32-10.48 19.82-7.49 31.49s10.49 19.17 22.5 22.5 22.35.66 31.01-8v.04c5.99-6.68 8.99-14.18 8.99-22.5s-3.16-15.66-9.5-22.02-13.84-9.7-22.5-10.02"})]))}}),uV=cV,dV=N({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),H3=dV,pV=N({name:"Rank",__name:"rank",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544H186.496z"})]))}}),fV=pV,hV=N({name:"ReadingLamp",__name:"reading-lamp",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 896h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m-44.672-768-99.52 448h608.384l-99.52-448zm-25.6-64h460.608a32 32 0 0 1 31.232 25.088l113.792 512A32 32 0 0 1 856.128 640H167.872a32 32 0 0 1-31.232-38.912l113.792-512A32 32 0 0 1 281.664 64z"}),E("path",{fill:"currentColor",d:"M672 576q32 0 32 32v128q0 32-32 32t-32-32V608q0-32 32-32m-192-.064h64V960h-64z"})]))}}),vV=hV,mV=N({name:"Reading",__name:"reading",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),E("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),gV=mV,bV=N({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),F3=bV,_V=N({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),j3=_V,wV=N({name:"Refresh",__name:"refresh",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),yV=wV,xV=N({name:"Refrigerator",__name:"refrigerator",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 448h512V160a32 32 0 0 0-32-32H288a32 32 0 0 0-32 32zm0 64v352a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V512zm32-448h448a96 96 0 0 1 96 96v704a96 96 0 0 1-96 96H288a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96m32 224h64v96h-64zm0 288h64v96h-64z"})]))}}),kV=xV,CV=N({name:"RemoveFilled",__name:"remove-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),SV=CV,EV=N({name:"Remove",__name:"remove",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),TV=EV,$V=N({name:"Right",__name:"right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312z"})]))}}),MV=$V,AV=N({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),K3=AV,zV=N({name:"School",__name:"school",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 128v704h576V128zm-32-64h640a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M64 832h896v64H64zm256-640h128v96H320z"}),E("path",{fill:"currentColor",d:"M384 832h256v-64a128 128 0 1 0-256 0zm128-256a192 192 0 0 1 192 192v128H320V768a192 192 0 0 1 192-192M320 384h128v96H320zm256-192h128v96H576zm0 192h128v96H576z"})]))}}),IV=zV,OV=N({name:"Scissor",__name:"scissor",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512.064 578.368-106.88 152.768a160 160 0 1 1-23.36-78.208L472.96 522.56 196.864 128.256a32 32 0 1 1 52.48-36.736l393.024 561.344a160 160 0 1 1-23.36 78.208l-106.88-152.704zm54.4-189.248 208.384-297.6a32 32 0 0 1 52.48 36.736l-221.76 316.672-39.04-55.808zm-376.32 425.856a96 96 0 1 0 110.144-157.248 96 96 0 0 0-110.08 157.248zm643.84 0a96 96 0 1 0-110.08-157.248 96 96 0 0 0 110.08 157.248"})]))}}),NV=OV,PV=N({name:"Search",__name:"search",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),U3=PV,RV=N({name:"Select",__name:"select",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04-316.8-316.8a64 64 0 0 1 0-90.496z"})]))}}),LV=RV,BV=N({name:"Sell",__name:"sell",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 483.84L768 698.496V928a32 32 0 1 1-64 0V698.496l-73.344 73.344a32 32 0 1 1-45.248-45.248l128-128a32 32 0 0 1 45.248 0l128 128a32 32 0 1 1-45.248 45.248z"})]))}}),VV=BV,DV=N({name:"SemiSelect",__name:"semi-select",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 448h768q64 0 64 64t-64 64H128q-64 0-64-64t64-64"})]))}}),HV=DV,FV=N({name:"Service",__name:"service",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M864 409.6a192 192 0 0 1-37.888 349.44A256.064 256.064 0 0 1 576 960h-96a32 32 0 1 1 0-64h96a192.064 192.064 0 0 0 181.12-128H736a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h32c10.368 0 20.544.832 30.528 2.432a288 288 0 0 0-573.056 0A193.235 193.235 0 0 1 256 384h32a32 32 0 0 1 32 32v320a32 32 0 0 1-32 32h-32a192 192 0 0 1-96-358.4 352 352 0 0 1 704 0M256 448a128 128 0 1 0 0 256zm640 128a128 128 0 0 0-128-128v256a128 128 0 0 0 128-128"})]))}}),jV=FV,KV=N({name:"SetUp",__name:"set-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 160a64 64 0 0 0-64 64v576a64 64 0 0 0 64 64h576a64 64 0 0 0 64-64V224a64 64 0 0 0-64-64zm0-64h576a128 128 0 0 1 128 128v576a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V224A128 128 0 0 1 224 96"}),E("path",{fill:"currentColor",d:"M384 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M480 320h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32m160 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),E("path",{fill:"currentColor",d:"M288 640h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),UV=KV,WV=N({name:"Setting",__name:"setting",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),qV=WV,YV=N({name:"Share",__name:"share",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"})]))}}),GV=YV,XV=N({name:"Ship",__name:"ship",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 386.88V448h405.568a32 32 0 0 1 30.72 40.768l-76.48 267.968A192 192 0 0 1 687.168 896H336.832a192 192 0 0 1-184.64-139.264L75.648 488.768A32 32 0 0 1 106.368 448H448V117.888a32 32 0 0 1 47.36-28.096l13.888 7.616L512 96v2.88l231.68 126.4a32 32 0 0 1-2.048 57.216zm0-70.272 144.768-65.792L512 171.84zM512 512H148.864l18.24 64H856.96l18.24-64zM185.408 640l28.352 99.2A128 128 0 0 0 336.832 832h350.336a128 128 0 0 0 123.072-92.8l28.352-99.2H185.408"})]))}}),ZV=XV,JV=N({name:"Shop",__name:"shop",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 704h64v192H256V704h64v64h384zm188.544-152.192C894.528 559.616 896 567.616 896 576a96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0c0-8.384 1.408-16.384 3.392-24.192L192 128h640z"})]))}}),QV=JV,eD=N({name:"ShoppingBag",__name:"shopping-bag",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 320v96a32 32 0 0 1-32 32h-32V320H384v128h-32a32 32 0 0 1-32-32v-96H192v576h640V320zm-384-64a192 192 0 1 1 384 0h160a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32zm64 0h256a128 128 0 1 0-256 0"}),E("path",{fill:"currentColor",d:"M192 704h640v64H192z"})]))}}),tD=eD,oD=N({name:"ShoppingCartFull",__name:"shopping-cart-full",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"}),E("path",{fill:"currentColor",d:"M699.648 256 608 145.984 516.352 256h183.296zm-140.8-151.04a64 64 0 0 1 98.304 0L836.352 320H379.648l179.2-215.04"})]))}}),rD=oD,lD=N({name:"ShoppingCart",__name:"shopping-cart",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"})]))}}),nD=lD,aD=N({name:"ShoppingTrolley",__name:"shopping-trolley",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M368 833c-13.3 0-24.5 4.5-33.5 13.5S321 866.7 321 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S415 893.3 415 880s-4.5-24.5-13.5-33.5S381.3 833 368 833m439-193c7.4 0 13.8-2.2 19.5-6.5S836 623.3 838 616l112-448c2-10-.2-19.2-6.5-27.5S929 128 919 128H96c-9.3 0-17 3-23 9s-9 13.7-9 23 3 17 9 23 13.7 9 23 9h96v576h672c9.3 0 17-3 23-9s9-13.7 9-23-3-17-9-23-13.7-9-23-9H256v-64zM256 192h622l-96 384H256zm432 641c-13.3 0-24.5 4.5-33.5 13.5S641 866.7 641 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S735 893.3 735 880s-4.5-24.5-13.5-33.5S701.3 833 688 833"})]))}}),iD=aD,sD=N({name:"Smoking",__name:"smoking",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 576v128h640V576zm-32-64h704a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M704 576h64v128h-64zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}}),cD=sD,uD=N({name:"Soccer",__name:"soccer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M418.496 871.04 152.256 604.8c-16.512 94.016-2.368 178.624 42.944 224 44.928 44.928 129.344 58.752 223.296 42.24m72.32-18.176a573.056 573.056 0 0 0 224.832-137.216 573.12 573.12 0 0 0 137.216-224.832L533.888 171.84a578.56 578.56 0 0 0-227.52 138.496A567.68 567.68 0 0 0 170.432 532.48l320.384 320.384zM871.04 418.496c16.512-93.952 2.688-178.368-42.24-223.296-44.544-44.544-128.704-58.048-222.592-41.536zM149.952 874.048c-112.96-112.96-88.832-408.96 111.168-608.96C461.056 65.152 760.96 36.928 874.048 149.952c113.024 113.024 86.784 411.008-113.152 610.944-199.936 199.936-497.92 226.112-610.944 113.152m452.544-497.792 22.656-22.656a32 32 0 0 1 45.248 45.248l-22.656 22.656 45.248 45.248A32 32 0 1 1 647.744 512l-45.248-45.248L557.248 512l45.248 45.248a32 32 0 1 1-45.248 45.248L512 557.248l-45.248 45.248L512 647.744a32 32 0 1 1-45.248 45.248l-45.248-45.248-22.656 22.656a32 32 0 1 1-45.248-45.248l22.656-22.656-45.248-45.248A32 32 0 1 1 376.256 512l45.248 45.248L466.752 512l-45.248-45.248a32 32 0 1 1 45.248-45.248L512 466.752l45.248-45.248L512 376.256a32 32 0 0 1 45.248-45.248l45.248 45.248z"})]))}}),dD=uD,pD=N({name:"SoldOut",__name:"sold-out",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 476.16a32 32 0 1 1 45.248 45.184l-128 128a32 32 0 0 1-45.248 0l-128-128a32 32 0 1 1 45.248-45.248L704 837.504V608a32 32 0 1 1 64 0v229.504l73.408-73.408z"})]))}}),fD=pD,hD=N({name:"SortDown",__name:"sort-down",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),W3=hD,vD=N({name:"SortUp",__name:"sort-up",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),q3=vD,mD=N({name:"Sort",__name:"sort",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0V141.248z"})]))}}),gD=mD,bD=N({name:"Stamp",__name:"stamp",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"})]))}}),_D=bD,wD=N({name:"StarFilled",__name:"star-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),hc=wD,yD=N({name:"Star",__name:"star",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Y3=yD,xD=N({name:"Stopwatch",__name:"stopwatch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),E("path",{fill:"currentColor",d:"M672 234.88c-39.168 174.464-80 298.624-122.688 372.48-64 110.848-202.624 30.848-138.624-80C453.376 453.44 540.48 355.968 672 234.816z"})]))}}),kD=xD,CD=N({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),hh=CD,SD=N({name:"Sugar",__name:"sugar",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m801.728 349.184 4.48 4.48a128 128 0 0 1 0 180.992L534.656 806.144a128 128 0 0 1-181.056 0l-4.48-4.48-19.392 109.696a64 64 0 0 1-108.288 34.176L78.464 802.56a64 64 0 0 1 34.176-108.288l109.76-19.328-4.544-4.544a128 128 0 0 1 0-181.056l271.488-271.488a128 128 0 0 1 181.056 0l4.48 4.48 19.392-109.504a64 64 0 0 1 108.352-34.048l142.592 143.04a64 64 0 0 1-34.24 108.16l-109.248 19.2zm-548.8 198.72h447.168v2.24l60.8-60.8a63.808 63.808 0 0 0 18.752-44.416h-426.88l-89.664 89.728a64.064 64.064 0 0 0-10.24 13.248zm0 64c2.752 4.736 6.144 9.152 10.176 13.248l135.744 135.744a64 64 0 0 0 90.496 0L638.4 611.904zm490.048-230.976L625.152 263.104a64 64 0 0 0-90.496 0L416.768 380.928zM123.712 757.312l142.976 142.976 24.32-137.6a25.6 25.6 0 0 0-29.696-29.632l-137.6 24.256zm633.6-633.344-24.32 137.472a25.6 25.6 0 0 0 29.632 29.632l137.28-24.064-142.656-143.04z"})]))}}),ED=SD,TD=N({name:"SuitcaseLine",__name:"suitcase-line",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M922.5 229.5c-24.32-24.34-54.49-36.84-90.5-37.5H704v-64c-.68-17.98-7.02-32.98-19.01-44.99S658.01 64.66 640 64H384c-17.98.68-32.98 7.02-44.99 19.01S320.66 110 320 128v64H192c-35.99.68-66.16 13.18-90.5 37.5C77.16 253.82 64.66 283.99 64 320v448c.68 35.99 13.18 66.16 37.5 90.5s54.49 36.84 90.5 37.5h640c35.99-.68 66.16-13.18 90.5-37.5s36.84-54.49 37.5-90.5V320c-.68-35.99-13.18-66.16-37.5-90.5M384 128h256v64H384zM256 832h-64c-17.98-.68-32.98-7.02-44.99-19.01S128.66 786.01 128 768V448h128zm448 0H320V448h384zm192-64c-.68 17.98-7.02 32.98-19.01 44.99S850.01 831.34 832 832h-64V448h128zm0-384H128v-64c.69-17.98 7.02-32.98 19.01-44.99S173.99 256.66 192 256h640c17.98.69 32.98 7.02 44.99 19.01S895.34 301.99 896 320z"})]))}}),$D=TD,MD=N({name:"Suitcase",__name:"suitcase",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 384h768v-64a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64zm0 64v320a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448zm64-256h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),E("path",{fill:"currentColor",d:"M384 128v64h256v-64zm0-64h256a64 64 0 0 1 64 64v64a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64v-64a64 64 0 0 1 64-64"})]))}}),AD=MD,zD=N({name:"Sunny",__name:"sunny",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 704a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m0-704a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 768a32 32 0 0 1 32 32v64a32 32 0 1 1-64 0v-64a32 32 0 0 1 32-32M195.2 195.2a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 1 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm543.104 543.104a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 0 1-45.248 45.248l-45.248-45.248a32 32 0 0 1 0-45.248M64 512a32 32 0 0 1 32-32h64a32 32 0 0 1 0 64H96a32 32 0 0 1-32-32m768 0a32 32 0 0 1 32-32h64a32 32 0 1 1 0 64h-64a32 32 0 0 1-32-32M195.2 828.8a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248L240.448 828.8a32 32 0 0 1-45.248 0zm543.104-543.104a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248l-45.248 45.248a32 32 0 0 1-45.248 0"})]))}}),ID=zD,OD=N({name:"Sunrise",__name:"sunrise",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M32 768h960a32 32 0 1 1 0 64H32a32 32 0 1 1 0-64m129.408-96a352 352 0 0 1 701.184 0h-64.32a288 288 0 0 0-572.544 0h-64.32zM512 128a32 32 0 0 1 32 32v96a32 32 0 0 1-64 0v-96a32 32 0 0 1 32-32m407.296 168.704a32 32 0 0 1 0 45.248l-67.84 67.84a32 32 0 1 1-45.248-45.248l67.84-67.84a32 32 0 0 1 45.248 0zm-814.592 0a32 32 0 0 1 45.248 0l67.84 67.84a32 32 0 1 1-45.248 45.248l-67.84-67.84a32 32 0 0 1 0-45.248"})]))}}),ND=OD,PD=N({name:"Sunset",__name:"sunset",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M82.56 640a448 448 0 1 1 858.88 0h-67.2a384 384 0 1 0-724.288 0zM32 704h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m256 128h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),RD=PD,LD=N({name:"SwitchButton",__name:"switch-button",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128z"}),E("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}}),BD=LD,VD=N({name:"SwitchFilled",__name:"switch-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M247.47 358.4v.04c.07 19.17 7.72 37.53 21.27 51.09s31.92 21.2 51.09 21.27c39.86 0 72.41-32.6 72.41-72.4s-32.6-72.36-72.41-72.36-72.36 32.55-72.36 72.36z"}),E("path",{fill:"currentColor",d:"M492.38 128H324.7c-52.16 0-102.19 20.73-139.08 57.61a196.655 196.655 0 0 0-57.61 139.08V698.7c-.01 25.84 5.08 51.42 14.96 75.29s24.36 45.56 42.63 63.83 39.95 32.76 63.82 42.65a196.67 196.67 0 0 0 75.28 14.98h167.68c3.03 0 5.46-2.43 5.46-5.42V133.42c.6-2.99-1.83-5.42-5.46-5.42zm-56.11 705.88H324.7c-17.76.13-35.36-3.33-51.75-10.18s-31.22-16.94-43.61-29.67c-25.3-25.35-39.81-59.1-39.81-95.32V324.69c-.13-17.75 3.33-35.35 10.17-51.74a131.695 131.695 0 0 1 29.64-43.62c25.39-25.3 59.14-39.81 95.36-39.81h111.57zm402.12-647.67a196.655 196.655 0 0 0-139.08-57.61H580.48c-3.03 0-4.82 2.43-4.82 4.82v757.16c-.6 2.99 1.79 5.42 5.42 5.42h118.23a196.69 196.69 0 0 0 139.08-57.61A196.655 196.655 0 0 0 896 699.31V325.29a196.69 196.69 0 0 0-57.61-139.08zm-111.3 441.92c-42.83 0-77.82-34.99-77.82-77.82s34.98-77.82 77.82-77.82c42.83 0 77.82 34.99 77.82 77.82s-34.99 77.82-77.82 77.82z"})]))}}),DD=VD,HD=N({name:"Switch",__name:"switch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344zM64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),FD=HD,jD=N({name:"TakeawayBox",__name:"takeaway-box",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M832 384H192v448h640zM96 320h832V128H96zm800 64v480a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V384H64a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h896a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zM416 512h192a32 32 0 0 1 0 64H416a32 32 0 0 1 0-64"})]))}}),KD=jD,UD=N({name:"Ticket",__name:"ticket",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 832H64V640a128 128 0 1 0 0-256V192h576v160h64V192h256v192a128 128 0 1 0 0 256v192H704V672h-64zm0-416v192h64V416z"})]))}}),WD=UD,qD=N({name:"Tickets",__name:"tickets",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),YD=qD,GD=N({name:"Timer",__name:"timer",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),E("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),XD=GD,ZD=N({name:"ToiletPaper",__name:"toilet-paper",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M595.2 128H320a192 192 0 0 0-192 192v576h384V352c0-90.496 32.448-171.2 83.2-224M736 64c123.712 0 224 128.96 224 288S859.712 640 736 640H576v320H64V320A256 256 0 0 1 320 64zM576 352v224h160c84.352 0 160-97.28 160-224s-75.648-224-160-224-160 97.28-160 224"}),E("path",{fill:"currentColor",d:"M736 448c-35.328 0-64-43.008-64-96s28.672-96 64-96 64 43.008 64 96-28.672 96-64 96"})]))}}),JD=ZD,QD=N({name:"Tools",__name:"tools",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M764.416 254.72a351.68 351.68 0 0 1 86.336 149.184H960v192.064H850.752a351.68 351.68 0 0 1-86.336 149.312l54.72 94.72-166.272 96-54.592-94.72a352.64 352.64 0 0 1-172.48 0L371.136 936l-166.272-96 54.72-94.72a351.68 351.68 0 0 1-86.336-149.312H64v-192h109.248a351.68 351.68 0 0 1 86.336-149.312L204.8 160l166.208-96h.192l54.656 94.592a352.64 352.64 0 0 1 172.48 0L652.8 64h.128L819.2 160l-54.72 94.72zM704 499.968a192 192 0 1 0-384 0 192 192 0 0 0 384 0"})]))}}),eH=QD,tH=N({name:"TopLeft",__name:"top-left",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M256 256h416a32 32 0 1 0 0-64H224a32 32 0 0 0-32 32v448a32 32 0 0 0 64 0z"}),E("path",{fill:"currentColor",d:"M246.656 201.344a32 32 0 0 0-45.312 45.312l544 544a32 32 0 0 0 45.312-45.312l-544-544z"})]))}}),oH=tH,rH=N({name:"TopRight",__name:"top-right",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),E("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312l544-544z"})]))}}),lH=rH,nH=N({name:"Top",__name:"top",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),aH=nH,iH=N({name:"TrendCharts",__name:"trend-charts",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128 896V128h768v768zm291.712-327.296 128 102.4 180.16-201.792-47.744-42.624-139.84 156.608-128-102.4-180.16 201.792 47.744 42.624 139.84-156.608zM816 352a48 48 0 1 0-96 0 48 48 0 0 0 96 0"})]))}}),sH=iH,cH=N({name:"TrophyBase",__name:"trophy-base",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M918.4 201.6c-6.4-6.4-12.8-9.6-22.4-9.6H768V96c0-9.6-3.2-16-9.6-22.4C752 67.2 745.6 64 736 64H288c-9.6 0-16 3.2-22.4 9.6C259.2 80 256 86.4 256 96v96H128c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 16-9.6 22.4 3.2 108.8 25.6 185.6 64 224 34.4 34.4 77.56 55.65 127.65 61.99 10.91 20.44 24.78 39.25 41.95 56.41 40.86 40.86 91 65.47 150.4 71.9V768h-96c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h256c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6h-96V637.26c59.4-7.71 109.54-30.01 150.4-70.86 17.2-17.2 31.51-36.06 42.81-56.55 48.93-6.51 90.02-27.7 126.79-61.85 38.4-38.4 60.8-112 64-224 0-6.4-3.2-16-9.6-22.4zM256 438.4c-19.2-6.4-35.2-19.2-51.2-35.2-22.4-22.4-35.2-70.4-41.6-147.2H256zm390.4 80C608 553.6 566.4 576 512 576s-99.2-19.2-134.4-57.6C342.4 480 320 438.4 320 384V128h384v256c0 54.4-19.2 99.2-57.6 134.4m172.8-115.2c-16 16-32 25.6-51.2 35.2V256h92.8c-6.4 76.8-19.2 124.8-41.6 147.2zM768 896H256c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h512c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6"})]))}}),uH=cH,dH=N({name:"Trophy",__name:"trophy",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M480 896V702.08A256.256 256.256 0 0 1 264.064 512h-32.64a96 96 0 0 1-91.968-68.416L93.632 290.88a76.8 76.8 0 0 1 73.6-98.88H256V96a32 32 0 0 1 32-32h448a32 32 0 0 1 32 32v96h88.768a76.8 76.8 0 0 1 73.6 98.88L884.48 443.52A96 96 0 0 1 792.576 512h-32.64A256.256 256.256 0 0 1 544 702.08V896h128a32 32 0 1 1 0 64H352a32 32 0 1 1 0-64zm224-448V128H320v320a192 192 0 1 0 384 0m64 0h24.576a32 32 0 0 0 30.656-22.784l45.824-152.768A12.8 12.8 0 0 0 856.768 256H768zm-512 0V256h-88.768a12.8 12.8 0 0 0-12.288 16.448l45.824 152.768A32 32 0 0 0 231.424 448z"})]))}}),pH=dH,fH=N({name:"TurnOff",__name:"turn-off",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),E("path",{fill:"currentColor",d:"M329.956 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}}),hH=fH,vH=N({name:"Umbrella",__name:"umbrella",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M320 768a32 32 0 1 1 64 0 64 64 0 0 0 128 0V512H64a448 448 0 1 1 896 0H576v256a128 128 0 1 1-256 0m570.688-320a384.128 384.128 0 0 0-757.376 0z"})]))}}),mH=vH,gH=N({name:"Unlock",__name:"unlock",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),E("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}}),bH=gH,_H=N({name:"UploadFilled",__name:"upload-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),wH=_H,yH=N({name:"Upload",__name:"upload",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"})]))}}),xH=yH,kH=N({name:"UserFilled",__name:"user-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}}),CH=kH,SH=N({name:"User",__name:"user",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),EH=SH,TH=N({name:"Van",__name:"van",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M128.896 736H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v96h164.544a32 32 0 0 1 31.616 27.136l54.144 352A32 32 0 0 1 922.688 736h-91.52a144 144 0 1 1-286.272 0H415.104a144 144 0 1 1-286.272 0zm23.36-64a143.872 143.872 0 0 1 239.488 0H568.32c17.088-25.6 42.24-45.376 71.744-55.808V256H128v416zm655.488 0h77.632l-19.648-128H704v64.896A144 144 0 0 1 807.744 672m48.128-192-14.72-96H704v96h151.872M688 832a80 80 0 1 0 0-160 80 80 0 0 0 0 160m-416 0a80 80 0 1 0 0-160 80 80 0 0 0 0 160"})]))}}),$H=TH,MH=N({name:"VideoCameraFilled",__name:"video-camera-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m768 576 192-64v320l-192-64v96a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zM192 768v64h384v-64zm192-480a160 160 0 0 1 320 0 160 160 0 0 1-320 0m64 0a96 96 0 1 0 192.064-.064A96 96 0 0 0 448 288m-320 32a128 128 0 1 1 256.064.064A128 128 0 0 1 128 320m64 0a64 64 0 1 0 128 0 64 64 0 0 0-128 0"})]))}}),AH=MH,zH=N({name:"VideoCamera",__name:"video-camera",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M704 768V256H128v512zm64-416 192-96v512l-192-96v128a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 71.552v176.896l128 64V359.552zM192 320h192v64H192z"})]))}}),IH=zH,OH=N({name:"VideoPause",__name:"video-pause",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),NH=OH,PH=N({name:"VideoPlay",__name:"video-play",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),RH=PH,LH=N({name:"View",__name:"view",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),G3=LH,BH=N({name:"WalletFilled",__name:"wallet-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M688 512a112 112 0 1 0 0 224h208v160H128V352h768v160zm32 160h-32a48 48 0 0 1 0-96h32a48 48 0 0 1 0 96m-80-544 128 160H384z"})]))}}),VH=BH,DH=N({name:"Wallet",__name:"wallet",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M640 288h-64V128H128v704h384v32a32 32 0 0 0 32 32H96a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32z"}),E("path",{fill:"currentColor",d:"M128 320v512h768V320zm-32-64h832a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M704 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}}),HH=DH,FH=N({name:"WarnTriangleFilled",__name:"warn-triangle-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M928.99 755.83 574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03M554.67 768h-85.33v-85.33h85.33zm0-426.67v298.66h-85.33V341.32z"})]))}}),jH=FH,KH=N({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),vc=KH,UH=N({name:"Warning",__name:"warning",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),WH=UH,qH=N({name:"Watch",__name:"watch",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M512 768a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),E("path",{fill:"currentColor",d:"M480 352a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0V384a32 32 0 0 1 32-32"}),E("path",{fill:"currentColor",d:"M480 512h128q32 0 32 32t-32 32H480q-32 0-32-32t32-32m128-256V128H416v128h-64V64h320v192zM416 768v128h192V768h64v192H352V768z"})]))}}),YH=qH,GH=N({name:"Watermelon",__name:"watermelon",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m683.072 600.32-43.648 162.816-61.824-16.512 53.248-198.528L576 493.248l-158.4 158.4-45.248-45.248 158.4-158.4-55.616-55.616-198.528 53.248-16.512-61.824 162.816-43.648L282.752 200A384 384 0 0 0 824 741.248zm231.552 141.056a448 448 0 1 1-632-632l632 632"})]))}}),XH=GH,ZH=N({name:"WindPower",__name:"wind-power",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"M160 64q32 0 32 32v832q0 32-32 32t-32-32V96q0-32 32-32m416 354.624 128-11.584V168.96l-128-11.52v261.12zm-64 5.824V151.552L320 134.08V160h-64V64l616.704 56.064A96 96 0 0 1 960 215.68v144.64a96 96 0 0 1-87.296 95.616L256 512V224h64v217.92zm256-23.232 98.88-8.96A32 32 0 0 0 896 360.32V215.68a32 32 0 0 0-29.12-31.872l-98.88-8.96z"})]))}}),JH=ZH,QH=N({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),vh=QH,eF=N({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,o)=>(b(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[E("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),X3=eF;const tF=Object.freeze(Object.defineProperty({__proto__:null,AddLocation:Jz,Aim:eI,AlarmClock:oI,Apple:lI,ArrowDown:Pl,ArrowDownBold:aI,ArrowLeft:fn,ArrowLeftBold:cI,ArrowRight:ir,ArrowRightBold:pI,ArrowUp:Md,ArrowUpBold:vI,Avatar:bI,Back:A3,Baseball:yI,Basketball:kI,Bell:TI,BellFilled:SI,Bicycle:MI,Bottom:PI,BottomLeft:zI,BottomRight:OI,Bowl:LI,Box:VI,Briefcase:HI,Brush:UI,BrushFilled:jI,Burger:qI,Calendar:z3,Camera:JI,CameraFilled:XI,CaretBottom:eO,CaretLeft:oO,CaretRight:uh,CaretTop:I3,Cellphone:aO,ChatDotRound:sO,ChatDotSquare:uO,ChatLineRound:pO,ChatLineSquare:hO,ChatRound:mO,ChatSquare:bO,Check:Li,Checked:yO,Cherry:kO,Chicken:SO,ChromeFilled:TO,CircleCheck:Ad,CircleCheckFilled:O3,CircleClose:hn,CircleCloseFilled:zd,CirclePlus:PO,CirclePlusFilled:OO,Clock:dh,Close:Jr,CloseBold:BO,Cloudy:HO,Coffee:UO,CoffeeCup:jO,Coin:qO,ColdDrink:GO,Collection:QO,CollectionTag:ZO,Comment:tN,Compass:rN,Connection:nN,Coordinate:iN,CopyDocument:cN,Cpu:dN,CreditCard:fN,Crop:vN,DArrowLeft:Ra,DArrowRight:La,DCaret:_N,DataAnalysis:yN,DataBoard:kN,DataLine:SN,Delete:N3,DeleteFilled:TN,DeleteLocation:MN,Dessert:IN,Discount:NN,Dish:BN,DishDot:RN,Document:P3,DocumentAdd:DN,DocumentChecked:FN,DocumentCopy:KN,DocumentDelete:WN,DocumentRemove:YN,Download:ZN,Drizzling:QN,Edit:rP,EditPen:tP,Eleme:iP,ElemeFilled:nP,ElementPlus:cP,Expand:dP,Failed:fP,Female:vP,Files:gP,Film:_P,Filter:yP,Finished:kP,FirstAidKit:SP,Flag:TP,Fold:MP,Folder:HP,FolderAdd:zP,FolderChecked:OP,FolderDelete:PP,FolderOpened:LP,FolderRemove:VP,Food:jP,Football:UP,ForkSpoon:qP,Fries:GP,FullScreen:R3,Goblet:lR,GobletFull:JP,GobletSquare:oR,GobletSquareFull:eR,GoldMedal:aR,Goods:uR,GoodsFilled:sR,Grape:pR,Grid:hR,Guide:mR,Handbag:bR,Headset:wR,Help:CR,HelpFilled:xR,Hide:L3,Histogram:TR,HomeFilled:MR,HotWater:zR,House:OR,IceCream:VR,IceCreamRound:PR,IceCreamSquare:LR,IceDrink:HR,IceTea:jR,InfoFilled:Id,Iphone:WR,Key:YR,KnifeFork:XR,Lightning:JR,Link:eL,List:oL,Loading:vn,Location:cL,LocationFilled:nL,LocationInformation:iL,Lock:dL,Lollipop:fL,MagicStick:vL,Magnet:gL,Male:_L,Management:yL,MapLocation:kL,Medal:SL,Memo:TL,Menu:ML,Message:OL,MessageBox:zL,Mic:PL,Microphone:LL,MilkTea:VL,Minus:B3,Money:FL,Monitor:KL,Moon:YL,MoonNight:WL,More:V3,MoreFilled:ph,MostlyCloudy:JL,Mouse:eB,Mug:oB,Mute:aB,MuteNotification:lB,NoSmoking:sB,Notebook:uB,Notification:pB,Odometer:hB,OfficeBuilding:mB,Open:bB,Operation:wB,Opportunity:xB,Orange:CB,Paperclip:EB,PartlyCloudy:$B,Pear:AB,Phone:NB,PhoneFilled:IB,Picture:VB,PictureFilled:D3,PictureRounded:LB,PieChart:HB,Place:jB,Platform:UB,Plus:fh,Pointer:YB,Position:XB,Postcard:JB,Pouring:eV,Present:oV,PriceTag:lV,Printer:aV,Promotion:sV,QuartzWatch:uV,QuestionFilled:H3,Rank:fV,Reading:gV,ReadingLamp:vV,Refresh:yV,RefreshLeft:F3,RefreshRight:j3,Refrigerator:kV,Remove:TV,RemoveFilled:SV,Right:MV,ScaleToOriginal:K3,School:IV,Scissor:NV,Search:U3,Select:LV,Sell:VV,SemiSelect:HV,Service:jV,SetUp:UV,Setting:qV,Share:GV,Ship:ZV,Shop:QV,ShoppingBag:tD,ShoppingCart:nD,ShoppingCartFull:rD,ShoppingTrolley:iD,Smoking:cD,Soccer:dD,SoldOut:fD,Sort:gD,SortDown:W3,SortUp:q3,Stamp:_D,Star:Y3,StarFilled:hc,Stopwatch:kD,SuccessFilled:hh,Sugar:ED,Suitcase:AD,SuitcaseLine:$D,Sunny:ID,Sunrise:ND,Sunset:RD,Switch:FD,SwitchButton:BD,SwitchFilled:DD,TakeawayBox:KD,Ticket:WD,Tickets:YD,Timer:XD,ToiletPaper:JD,Tools:eH,Top:aH,TopLeft:oH,TopRight:lH,TrendCharts:sH,Trophy:pH,TrophyBase:uH,TurnOff:hH,Umbrella:mH,Unlock:bH,Upload:xH,UploadFilled:wH,User:EH,UserFilled:CH,Van:$H,VideoCamera:IH,VideoCameraFilled:AH,VideoPause:NH,VideoPlay:RH,View:G3,Wallet:HH,WalletFilled:VH,WarnTriangleFilled:jH,Warning:WH,WarningFilled:vc,Watch:YH,Watermelon:XH,WindPower:JH,ZoomIn:vh,ZoomOut:X3},Symbol.toStringTag,{value:"Module"})),Z3="__epPropKey",ue=e=>e,oF=e=>xt(e)&&!!e[Z3],vl=(e,t)=>{if(!xt(e)||oF(e))return e;const{values:o,required:r,default:l,type:n,validator:a}=e,c={type:n,required:!!r,validator:o||a?d=>{let u=!1,p=[];if(o&&(p=Array.from(o),Pt(e,"default")&&p.push(l),u||(u=p.includes(d))),a&&(u||(u=a(d))),!u&&p.length>0){const h=[...new Set(p)].map(v=>JSON.stringify(v)).join(", ");w9(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(d)}.`)}return u}:void 0,[Z3]:!0};return Pt(e,"default")&&(c.default=l),c},Pe=e=>Cd(Object.entries(e).map(([t,o])=>[t,vl(o,t)])),Xt=ue([String,Object,Function]),mh={Close:Jr},gh={Close:Jr,SuccessFilled:hh,InfoFilled:Id,WarningFilled:vc,CircleCloseFilled:zd},Jn={success:hh,warning:vc,error:zd,info:Id},bh={validating:vn,success:Ad,error:hn},yt=(e,t)=>{if(e.install=o=>{for(const r of[e,...Object.values(t??{})])o.component(r.name,r)},t)for(const[o,r]of Object.entries(t))e[o]=r;return e},J3=(e,t)=>(e.install=o=>{e._context=o._context,o.config.globalProperties[t]=e},e),rF=(e,t)=>(e.install=o=>{o.directive(t,e)},e),co=e=>(e.install=qt,e),Od=(...e)=>t=>{e.forEach(o=>{it(o)?o(t):o.value=t})},lt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},lF=["year","years","month","date","dates","week","datetime","datetimerange","daterange","monthrange"],_h=["sun","mon","tue","wed","thu","fri","sat"],St="update:modelValue",ro="change",yr="input",Q3=Symbol("INSTALLED_KEY"),Rl=["","default","small","large"],e6=e=>["",...Rl].includes(e);var Qr=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Qr||{});function wh(e){return io(e)&&e.type===Qe}function nF(e){return io(e)&&e.type===Jo}function aF(e){return io(e)&&!wh(e)&&!nF(e)}const iF=e=>{if(!io(e))return{};const t=e.props||{},o=(io(e.type)?e.type.props:void 0)||{},r={};return Object.keys(o).forEach(l=>{Pt(o[l],"default")&&(r[l]=o[l].default)}),Object.keys(t).forEach(l=>{r[Fr(l)]=t[l]}),r},sF=e=>{if(!Ke(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},Qn=e=>{const t=Ke(e)?e:[e],o=[];return t.forEach(r=>{var l;Ke(r)?o.push(...Qn(r)):io(r)&&Ke(r.children)?o.push(...Qn(r.children)):(o.push(r),io(r)&&((l=r.component)!=null&&l.subTree)&&o.push(...Qn(r.component.subTree)))}),o},t6=e=>[...new Set(e)],Lr=e=>!e&&e!==0?[]:Array.isArray(e)?e:[e],yh=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),uo=e=>e;function cF(e){let t=0;const o=(...r)=>{t&&Pa(t),t=Xn(()=>{e(...r),t=0})};return o.cancel=()=>{Pa(t),t=0},o}const uF=["class","style"],dF=/^on[A-Z]/,xh=(e={})=>{const{excludeListeners:t=!1,excludeKeys:o}=e,r=C(()=>((o==null?void 0:o.value)||[]).concat(uF)),l=wt();return C(l?()=>{var n;return Cd(Object.entries((n=l.proxy)==null?void 0:n.$attrs).filter(([a])=>!r.value.includes(a)&&!(t&&dF.test(a))))}:()=>({}))},Lo=({from:e,replacement:t,scope:o,version:r,ref:l,type:n="API"},a)=>{Se(()=>s(a),i=>{},{immediate:!0})},o6=(e,t,o,r)=>{let l={offsetX:0,offsetY:0};const n=c=>{const d=c.clientX,u=c.clientY,{offsetX:p,offsetY:h}=l,v=e.value.getBoundingClientRect(),m=v.left,f=v.top,_=v.width,g=v.height,y=document.documentElement.clientWidth,w=document.documentElement.clientHeight,x=-m+p,$=-f+h,T=y-m-_+p,L=w-f-g+h,P=V=>{let B=p+V.clientX-d,F=h+V.clientY-u;r!=null&&r.value||(B=Math.min(Math.max(B,x),T),F=Math.min(Math.max(F,$),L)),l={offsetX:B,offsetY:F},e.value&&(e.value.style.transform=`translate(${go(B)}, ${go(F)})`)},R=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",R)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",R)},a=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",n)},i=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",n)};ft(()=>{Go(()=>{o.value?a():i()})}),to(()=>{i()})};var pF={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const fF=e=>(t,o)=>hF(t,o,s(e)),hF=(e,t,o)=>wo(o,e,e).replace(/\{(\w+)\}/g,(r,l)=>{var n;return`${(n=t==null?void 0:t[l])!=null?n:`{${l}}`}`}),vF=e=>{const t=C(()=>s(e).name),o=Zt(e)?e:D(e);return{lang:t,locale:o,t:fF(e)}},r6=Symbol("localeContextKey"),Rt=e=>{const t=e||Ge(r6,D());return vF(C(()=>t.value||pF))},mc="el",mF="is-",Ba=(e,t,o,r,l)=>{let n=`${e}-${t}`;return o&&(n+=`-${o}`),r&&(n+=`__${r}`),l&&(n+=`--${l}`),n},l6=Symbol("namespaceContextKey"),kh=e=>{const t=e||(wt()?Ge(l6,D(mc)):D(mc));return C(()=>s(t)||mc)},ze=(e,t)=>{const o=kh(t);return{namespace:o,b:(f="")=>Ba(o.value,e,f,"",""),e:f=>f?Ba(o.value,e,"",f,""):"",m:f=>f?Ba(o.value,e,"","",f):"",be:(f,_)=>f&&_?Ba(o.value,e,f,_,""):"",em:(f,_)=>f&&_?Ba(o.value,e,"",f,_):"",bm:(f,_)=>f&&_?Ba(o.value,e,f,"",_):"",bem:(f,_,g)=>f&&_&&g?Ba(o.value,e,f,_,g):"",is:(f,..._)=>{const g=_.length>=1?_[0]:!0;return f&&g?`${mF}${f}`:""},cssVar:f=>{const _={};for(const g in f)f[g]&&(_[`--${o.value}-${g}`]=f[g]);return _},cssVarName:f=>`--${o.value}-${f}`,cssVarBlock:f=>{const _={};for(const g in f)f[g]&&(_[`--${o.value}-${e}-${g}`]=f[g]);return _},cssVarBlockName:f=>`--${o.value}-${e}-${f}`}},Ch=(e,t={})=>{Zt(e)||Io("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||ze("popup"),r=C(()=>o.bm("parent","hidden"));if(!Nt||Xr(document.body,r.value))return;let l=0,n=!1,a="0";const i=()=>{setTimeout(()=>{ar(document==null?void 0:document.body,r.value),n&&document&&(document.body.style.width=a)},200)};Se(e,c=>{if(!c){i();return}n=!Xr(document.body,r.value),n&&(a=document.body.style.width),l=E3(o.namespace.value);const d=document.documentElement.clientHeight0&&(d||u==="scroll")&&n&&(document.body.style.width=`calc(100% - ${l}px)`),Zr(document.body,r.value)}),xf(()=>i())},gF=vl({type:ue(Boolean),default:null}),bF=vl({type:ue(Function)}),n6=e=>{const t=`update:${e}`,o=`onUpdate:${e}`,r=[t],l={[e]:gF,[o]:bF};return{useModelToggle:({indicator:a,toggleReason:i,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:u,onHide:p})=>{const h=wt(),{emit:v}=h,m=h.props,f=C(()=>it(m[o])),_=C(()=>m[e]===null),g=L=>{a.value!==!0&&(a.value=!0,i&&(i.value=L),it(u)&&u(L))},y=L=>{a.value!==!1&&(a.value=!1,i&&(i.value=L),it(p)&&p(L))},w=L=>{if(m.disabled===!0||it(d)&&!d())return;const P=f.value&&Nt;P&&v(t,!0),(_.value||!P)&&g(L)},x=L=>{if(m.disabled===!0||!Nt)return;const P=f.value&&Nt;P&&v(t,!1),(_.value||!P)&&y(L)},$=L=>{Co(L)&&(m.disabled&&L?f.value&&v(t,!1):a.value!==L&&(L?g():y()))},T=()=>{a.value?x():w()};return Se(()=>m[e],$),c&&h.appContext.config.globalProperties.$route!==void 0&&Se(()=>({...h.proxy.$route}),()=>{c.value&&a.value&&x()}),ft(()=>{$(m[e])}),{hide:x,show:w,toggle:T,hasUpdateHandler:f}},useModelToggleProps:l,useModelToggleEmits:r}};n6("modelValue");const a6=e=>{const t=wt();return C(()=>{var o,r;return(r=(o=t==null?void 0:t.proxy)==null?void 0:o.$props)==null?void 0:r[e]})};var Ar="top",el="bottom",tl="right",zr="left",Sh="auto",gc=[Ar,el,tl,zr],Bi="start",bc="end",_F="clippingParents",i6="viewport",_c="popper",wF="reference",s6=gc.reduce(function(e,t){return e.concat([t+"-"+Bi,t+"-"+bc])},[]),Va=[].concat(gc,[Sh]).reduce(function(e,t){return e.concat([t,t+"-"+Bi,t+"-"+bc])},[]),yF="beforeRead",xF="read",kF="afterRead",CF="beforeMain",SF="main",EF="afterMain",TF="beforeWrite",$F="write",MF="afterWrite",AF=[yF,xF,kF,CF,SF,EF,TF,$F,MF];function Ll(e){return e?(e.nodeName||"").toLowerCase():null}function ml(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Vi(e){var t=ml(e).Element;return e instanceof t||e instanceof Element}function ol(e){var t=ml(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Eh(e){if(typeof ShadowRoot>"u")return!1;var t=ml(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zF(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var r=t.styles[o]||{},l=t.attributes[o]||{},n=t.elements[o];!ol(n)||!Ll(n)||(Object.assign(n.style,r),Object.keys(l).forEach(function(a){var i=l[a];i===!1?n.removeAttribute(a):n.setAttribute(a,i===!0?"":i)}))})}function IF(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(r){var l=t.elements[r],n=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:o[r]),i=a.reduce(function(c,d){return c[d]="",c},{});!ol(l)||!Ll(l)||(Object.assign(l.style,i),Object.keys(n).forEach(function(c){l.removeAttribute(c)}))})}}var c6={name:"applyStyles",enabled:!0,phase:"write",fn:zF,effect:IF,requires:["computeStyles"]};function Bl(e){return e.split("-")[0]}var Da=Math.max,Nd=Math.min,Di=Math.round;function Hi(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),r=1,l=1;if(ol(e)&&t){var n=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Di(o.width)/a||1),n>0&&(l=Di(o.height)/n||1)}return{width:o.width/r,height:o.height/l,top:o.top/l,right:o.right/r,bottom:o.bottom/l,left:o.left/r,x:o.left/r,y:o.top/l}}function Th(e){var t=Hi(e),o=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function u6(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&Eh(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mn(e){return ml(e).getComputedStyle(e)}function OF(e){return["table","td","th"].indexOf(Ll(e))>=0}function ea(e){return((Vi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pd(e){return Ll(e)==="html"?e:e.assignedSlot||e.parentNode||(Eh(e)?e.host:null)||ea(e)}function d6(e){return!ol(e)||mn(e).position==="fixed"?null:e.offsetParent}function NF(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&ol(e)){var r=mn(e);if(r.position==="fixed")return null}var l=Pd(e);for(Eh(l)&&(l=l.host);ol(l)&&["html","body"].indexOf(Ll(l))<0;){var n=mn(l);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||t&&n.willChange==="filter"||t&&n.filter&&n.filter!=="none")return l;l=l.parentNode}return null}function wc(e){for(var t=ml(e),o=d6(e);o&&OF(o)&&mn(o).position==="static";)o=d6(o);return o&&(Ll(o)==="html"||Ll(o)==="body"&&mn(o).position==="static")?t:o||NF(e)||t}function $h(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function yc(e,t,o){return Da(e,Nd(t,o))}function PF(e,t,o){var r=yc(e,t,o);return r>o?o:r}function p6(){return{top:0,right:0,bottom:0,left:0}}function f6(e){return Object.assign({},p6(),e)}function h6(e,t){return t.reduce(function(o,r){return o[r]=e,o},{})}var RF=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,f6(typeof e!="number"?e:h6(e,gc))};function LF(e){var t,o=e.state,r=e.name,l=e.options,n=o.elements.arrow,a=o.modifiersData.popperOffsets,i=Bl(o.placement),c=$h(i),d=[zr,tl].indexOf(i)>=0,u=d?"height":"width";if(!(!n||!a)){var p=RF(l.padding,o),h=Th(n),v=c==="y"?Ar:zr,m=c==="y"?el:tl,f=o.rects.reference[u]+o.rects.reference[c]-a[c]-o.rects.popper[u],_=a[c]-o.rects.reference[c],g=wc(n),y=g?c==="y"?g.clientHeight||0:g.clientWidth||0:0,w=f/2-_/2,x=p[v],$=y-h[u]-p[m],T=y/2-h[u]/2+w,L=yc(x,T,$),P=c;o.modifiersData[r]=(t={},t[P]=L,t.centerOffset=L-T,t)}}function BF(e){var t=e.state,o=e.options,r=o.element,l=r===void 0?"[data-popper-arrow]":r;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||!u6(t.elements.popper,l)||(t.elements.arrow=l))}var VF={name:"arrow",enabled:!0,phase:"main",fn:LF,effect:BF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fi(e){return e.split("-")[1]}var DF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function HF(e){var t=e.x,o=e.y,r=window,l=r.devicePixelRatio||1;return{x:Di(t*l)/l||0,y:Di(o*l)/l||0}}function v6(e){var t,o=e.popper,r=e.popperRect,l=e.placement,n=e.variation,a=e.offsets,i=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,p=e.isFixed,h=a.x,v=h===void 0?0:h,m=a.y,f=m===void 0?0:m,_=typeof u=="function"?u({x:v,y:f}):{x:v,y:f};v=_.x,f=_.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=zr,x=Ar,$=window;if(d){var T=wc(o),L="clientHeight",P="clientWidth";if(T===ml(o)&&(T=ea(o),mn(T).position!=="static"&&i==="absolute"&&(L="scrollHeight",P="scrollWidth")),T=T,l===Ar||(l===zr||l===tl)&&n===bc){x=el;var R=p&&T===$&&$.visualViewport?$.visualViewport.height:T[L];f-=R-r.height,f*=c?1:-1}if(l===zr||(l===Ar||l===el)&&n===bc){w=tl;var V=p&&T===$&&$.visualViewport?$.visualViewport.width:T[P];v-=V-r.width,v*=c?1:-1}}var B=Object.assign({position:i},d&&DF),F=u===!0?HF({x:v,y:f}):{x:v,y:f};if(v=F.x,f=F.y,c){var Q;return Object.assign({},B,(Q={},Q[x]=y?"0":"",Q[w]=g?"0":"",Q.transform=($.devicePixelRatio||1)<=1?"translate("+v+"px, "+f+"px)":"translate3d("+v+"px, "+f+"px, 0)",Q))}return Object.assign({},B,(t={},t[x]=y?f+"px":"",t[w]=g?v+"px":"",t.transform="",t))}function FF(e){var t=e.state,o=e.options,r=o.gpuAcceleration,l=r===void 0?!0:r,n=o.adaptive,a=n===void 0?!0:n,i=o.roundOffsets,c=i===void 0?!0:i,d={placement:Bl(t.placement),variation:Fi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,v6(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,v6(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var m6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:FF,data:{}},Rd={passive:!0};function jF(e){var t=e.state,o=e.instance,r=e.options,l=r.scroll,n=l===void 0?!0:l,a=r.resize,i=a===void 0?!0:a,c=ml(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&d.forEach(function(u){u.addEventListener("scroll",o.update,Rd)}),i&&c.addEventListener("resize",o.update,Rd),function(){n&&d.forEach(function(u){u.removeEventListener("scroll",o.update,Rd)}),i&&c.removeEventListener("resize",o.update,Rd)}}var g6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jF,data:{}},KF={left:"right",right:"left",bottom:"top",top:"bottom"};function Ld(e){return e.replace(/left|right|bottom|top/g,function(t){return KF[t]})}var UF={start:"end",end:"start"};function b6(e){return e.replace(/start|end/g,function(t){return UF[t]})}function Mh(e){var t=ml(e),o=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:o,scrollTop:r}}function Ah(e){return Hi(ea(e)).left+Mh(e).scrollLeft}function WF(e){var t=ml(e),o=ea(e),r=t.visualViewport,l=o.clientWidth,n=o.clientHeight,a=0,i=0;return r&&(l=r.width,n=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,i=r.offsetTop)),{width:l,height:n,x:a+Ah(e),y:i}}function qF(e){var t,o=ea(e),r=Mh(e),l=(t=e.ownerDocument)==null?void 0:t.body,n=Da(o.scrollWidth,o.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),a=Da(o.scrollHeight,o.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),i=-r.scrollLeft+Ah(e),c=-r.scrollTop;return mn(l||o).direction==="rtl"&&(i+=Da(o.clientWidth,l?l.clientWidth:0)-n),{width:n,height:a,x:i,y:c}}function zh(e){var t=mn(e),o=t.overflow,r=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+l+r)}function _6(e){return["html","body","#document"].indexOf(Ll(e))>=0?e.ownerDocument.body:ol(e)&&zh(e)?e:_6(Pd(e))}function xc(e,t){var o;t===void 0&&(t=[]);var r=_6(e),l=r===((o=e.ownerDocument)==null?void 0:o.body),n=ml(r),a=l?[n].concat(n.visualViewport||[],zh(r)?r:[]):r,i=t.concat(a);return l?i:i.concat(xc(Pd(a)))}function Ih(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function YF(e){var t=Hi(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function w6(e,t){return t===i6?Ih(WF(e)):Vi(t)?YF(t):Ih(qF(ea(e)))}function GF(e){var t=xc(Pd(e)),o=["absolute","fixed"].indexOf(mn(e).position)>=0,r=o&&ol(e)?wc(e):e;return Vi(r)?t.filter(function(l){return Vi(l)&&u6(l,r)&&Ll(l)!=="body"}):[]}function XF(e,t,o){var r=t==="clippingParents"?GF(e):[].concat(t),l=[].concat(r,[o]),n=l[0],a=l.reduce(function(i,c){var d=w6(e,c);return i.top=Da(d.top,i.top),i.right=Nd(d.right,i.right),i.bottom=Nd(d.bottom,i.bottom),i.left=Da(d.left,i.left),i},w6(e,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function y6(e){var t=e.reference,o=e.element,r=e.placement,l=r?Bl(r):null,n=r?Fi(r):null,a=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2,c;switch(l){case Ar:c={x:a,y:t.y-o.height};break;case el:c={x:a,y:t.y+t.height};break;case tl:c={x:t.x+t.width,y:i};break;case zr:c={x:t.x-o.width,y:i};break;default:c={x:t.x,y:t.y}}var d=l?$h(l):null;if(d!=null){var u=d==="y"?"height":"width";switch(n){case Bi:c[d]=c[d]-(t[u]/2-o[u]/2);break;case bc:c[d]=c[d]+(t[u]/2-o[u]/2);break}}return c}function kc(e,t){t===void 0&&(t={});var o=t,r=o.placement,l=r===void 0?e.placement:r,n=o.boundary,a=n===void 0?_F:n,i=o.rootBoundary,c=i===void 0?i6:i,d=o.elementContext,u=d===void 0?_c:d,p=o.altBoundary,h=p===void 0?!1:p,v=o.padding,m=v===void 0?0:v,f=f6(typeof m!="number"?m:h6(m,gc)),_=u===_c?wF:_c,g=e.rects.popper,y=e.elements[h?_:u],w=XF(Vi(y)?y:y.contextElement||ea(e.elements.popper),a,c),x=Hi(e.elements.reference),$=y6({reference:x,element:g,strategy:"absolute",placement:l}),T=Ih(Object.assign({},g,$)),L=u===_c?T:x,P={top:w.top-L.top+f.top,bottom:L.bottom-w.bottom+f.bottom,left:w.left-L.left+f.left,right:L.right-w.right+f.right},R=e.modifiersData.offset;if(u===_c&&R){var V=R[l];Object.keys(P).forEach(function(B){var F=[tl,el].indexOf(B)>=0?1:-1,Q=[Ar,el].indexOf(B)>=0?"y":"x";P[B]+=V[Q]*F})}return P}function ZF(e,t){t===void 0&&(t={});var o=t,r=o.placement,l=o.boundary,n=o.rootBoundary,a=o.padding,i=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?Va:c,u=Fi(r),p=u?i?s6:s6.filter(function(m){return Fi(m)===u}):gc,h=p.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=p);var v=h.reduce(function(m,f){return m[f]=kc(e,{placement:f,boundary:l,rootBoundary:n,padding:a})[Bl(f)],m},{});return Object.keys(v).sort(function(m,f){return v[m]-v[f]})}function JF(e){if(Bl(e)===Sh)return[];var t=Ld(e);return[b6(e),t,b6(t)]}function QF(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var l=o.mainAxis,n=l===void 0?!0:l,a=o.altAxis,i=a===void 0?!0:a,c=o.fallbackPlacements,d=o.padding,u=o.boundary,p=o.rootBoundary,h=o.altBoundary,v=o.flipVariations,m=v===void 0?!0:v,f=o.allowedAutoPlacements,_=t.options.placement,g=Bl(_),y=g===_,w=c||(y||!m?[Ld(_)]:JF(_)),x=[_].concat(w).reduce(function(ee,Me){return ee.concat(Bl(Me)===Sh?ZF(t,{placement:Me,boundary:u,rootBoundary:p,padding:d,flipVariations:m,allowedAutoPlacements:f}):Me)},[]),$=t.rects.reference,T=t.rects.popper,L=new Map,P=!0,R=x[0],V=0;V=0,Z=J?"width":"height",H=kc(t,{placement:B,boundary:u,rootBoundary:p,altBoundary:h,padding:d}),j=J?Q?tl:zr:Q?el:Ar;$[Z]>T[Z]&&(j=Ld(j));var K=Ld(j),I=[];if(n&&I.push(H[F]<=0),i&&I.push(H[j]<=0,H[K]<=0),I.every(function(ee){return ee})){R=B,P=!1;break}L.set(B,I)}if(P)for(var U=m?3:1,oe=function(ee){var Me=x.find(function(de){var _e=L.get(de);if(_e)return _e.slice(0,ee).every(function(me){return me})});if(Me)return R=Me,"break"},ne=U;ne>0;ne--){var ce=oe(ne);if(ce==="break")break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}}var ej={name:"flip",enabled:!0,phase:"main",fn:QF,requiresIfExists:["offset"],data:{_skip:!1}};function x6(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function k6(e){return[Ar,tl,el,zr].some(function(t){return e[t]>=0})}function tj(e){var t=e.state,o=e.name,r=t.rects.reference,l=t.rects.popper,n=t.modifiersData.preventOverflow,a=kc(t,{elementContext:"reference"}),i=kc(t,{altBoundary:!0}),c=x6(a,r),d=x6(i,l,n),u=k6(c),p=k6(d);t.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}var oj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tj};function rj(e,t,o){var r=Bl(e),l=[zr,Ar].indexOf(r)>=0?-1:1,n=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,a=n[0],i=n[1];return a=a||0,i=(i||0)*l,[zr,tl].indexOf(r)>=0?{x:i,y:a}:{x:a,y:i}}function lj(e){var t=e.state,o=e.options,r=e.name,l=o.offset,n=l===void 0?[0,0]:l,a=Va.reduce(function(u,p){return u[p]=rj(p,t.rects,n),u},{}),i=a[t.placement],c=i.x,d=i.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}var nj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lj};function aj(e){var t=e.state,o=e.name;t.modifiersData[o]=y6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var C6={name:"popperOffsets",enabled:!0,phase:"read",fn:aj,data:{}};function ij(e){return e==="x"?"y":"x"}function sj(e){var t=e.state,o=e.options,r=e.name,l=o.mainAxis,n=l===void 0?!0:l,a=o.altAxis,i=a===void 0?!1:a,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.padding,h=o.tether,v=h===void 0?!0:h,m=o.tetherOffset,f=m===void 0?0:m,_=kc(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:u}),g=Bl(t.placement),y=Fi(t.placement),w=!y,x=$h(g),$=ij(x),T=t.modifiersData.popperOffsets,L=t.rects.reference,P=t.rects.popper,R=typeof f=="function"?f(Object.assign({},t.rects,{placement:t.placement})):f,V=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(T){if(n){var Q,J=x==="y"?Ar:zr,Z=x==="y"?el:tl,H=x==="y"?"height":"width",j=T[x],K=j+_[J],I=j-_[Z],U=v?-P[H]/2:0,oe=y===Bi?L[H]:P[H],ne=y===Bi?-P[H]:-L[H],ce=t.elements.arrow,ee=v&&ce?Th(ce):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:p6(),de=Me[J],_e=Me[Z],me=yc(0,L[H],ee[H]),Re=w?L[H]/2-U-me-de-V.mainAxis:oe-me-de-V.mainAxis,Ce=w?-L[H]/2+U+me+_e+V.mainAxis:ne+me+_e+V.mainAxis,Ee=t.elements.arrow&&wc(t.elements.arrow),De=Ee?x==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,ae=(Q=B==null?void 0:B[x])!=null?Q:0,pe=j+Re-ae-De,ke=j+Ce-ae,Oe=yc(v?Nd(K,pe):K,j,v?Da(I,ke):I);T[x]=Oe,F[x]=Oe-j}if(i){var we,Te=x==="x"?Ar:zr,Ne=x==="x"?el:tl,Ie=T[$],Ae=$==="y"?"height":"width",xe=Ie+_[Te],We=Ie-_[Ne],qe=[Ar,zr].indexOf(g)!==-1,ye=(we=B==null?void 0:B[$])!=null?we:0,Ye=qe?xe:Ie-L[Ae]-P[Ae]-ye+V.altAxis,tt=qe?Ie+L[Ae]+P[Ae]-ye-V.altAxis:We,pt=v&&qe?PF(Ye,Ie,tt):yc(v?Ye:xe,Ie,v?tt:We);T[$]=pt,F[$]=pt-Ie}t.modifiersData[r]=F}}var cj={name:"preventOverflow",enabled:!0,phase:"main",fn:sj,requiresIfExists:["offset"]};function uj(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dj(e){return e===ml(e)||!ol(e)?Mh(e):uj(e)}function pj(e){var t=e.getBoundingClientRect(),o=Di(t.width)/e.offsetWidth||1,r=Di(t.height)/e.offsetHeight||1;return o!==1||r!==1}function fj(e,t,o){o===void 0&&(o=!1);var r=ol(t),l=ol(t)&&pj(t),n=ea(t),a=Hi(e,l),i={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!o)&&((Ll(t)!=="body"||zh(n))&&(i=dj(t)),ol(t)?(c=Hi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):n&&(c.x=Ah(n))),{x:a.left+i.scrollLeft-c.x,y:a.top+i.scrollTop-c.y,width:a.width,height:a.height}}function hj(e){var t=new Map,o=new Set,r=[];e.forEach(function(n){t.set(n.name,n)});function l(n){o.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(i){if(!o.has(i)){var c=t.get(i);c&&l(c)}}),r.push(n)}return e.forEach(function(n){o.has(n.name)||l(n)}),r}function vj(e){var t=hj(e);return AF.reduce(function(o,r){return o.concat(t.filter(function(l){return l.phase===r}))},[])}function mj(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function gj(e){var t=e.reduce(function(o,r){var l=o[r.name];return o[r.name]=l?Object.assign({},l,r,{options:Object.assign({},l.options,r.options),data:Object.assign({},l.data,r.data)}):r,o},{});return Object.keys(t).map(function(o){return t[o]})}var S6={placement:"bottom",modifiers:[],strategy:"absolute"};function E6(){for(var e=arguments.length,t=new Array(e),o=0;o{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=xj(c);Object.assign(a.value,d)},requires:["computeStyles"]},l=C(()=>{const{onFirstUpdate:c,placement:d,strategy:u,modifiers:p}=s(o);return{onFirstUpdate:c,placement:d||"bottom",strategy:u||"absolute",modifiers:[...p||[],r,{name:"applyStyles",enabled:!1}]}}),n=lo(),a=D({styles:{popper:{position:s(l).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),i=()=>{n.value&&(n.value.destroy(),n.value=void 0)};return Se(l,c=>{const d=s(n);d&&d.setOptions(c)},{deep:!0}),Se([e,t],([c,d])=>{i(),!(!c||!d)&&(n.value=wj(c,d,s(l)))}),to(()=>{i()}),{state:C(()=>{var c;return{...((c=s(n))==null?void 0:c.state)||{}}}),styles:C(()=>s(a).styles),attributes:C(()=>s(a).attributes),update:()=>{var c;return(c=s(n))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=s(n))==null?void 0:c.forceUpdate()},instanceRef:C(()=>s(n))}};function xj(e){const t=Object.keys(e.elements),o=Cd(t.map(l=>[l,e.styles[l]||{}])),r=Cd(t.map(l=>[l,e.attributes[l]]));return{styles:o,attributes:r}}const Nh=e=>{if(!e)return{onClick:qt,onMousedown:qt,onMouseup:qt};let t=!1,o=!1;return{onClick:a=>{t&&o&&e(a),t=o=!1},onMousedown:a=>{t=a.target===a.currentTarget},onMouseup:a=>{o=a.target===a.currentTarget}}},kj=(e,t=0)=>{if(t===0)return e;const o=D(!1);let r=0;const l=()=>{r&&clearTimeout(r),r=window.setTimeout(()=>{o.value=e.value},t)};return ft(l),Se(()=>e.value,n=>{n?l():o.value=n}),o};function T6(){let e;const t=(r,l)=>{o(),e=window.setTimeout(r,l)},o=()=>window.clearTimeout(e);return oc(()=>o()),{registerTimeout:t,cancelTimeout:o}}const $6={prefix:Math.floor(Math.random()*1e4),current:0},Cj=Symbol("elIdInjection"),Ph=()=>wt()?Ge(Cj,$6):$6,Qo=e=>{const t=Ph(),o=kh();return C(()=>s(e)||`${o.value}-id-${t.prefix}-${t.current++}`)};let ji=[];const M6=e=>{const t=e;t.key===lt.esc&&ji.forEach(o=>o(t))},Sj=e=>{ft(()=>{ji.length===0&&document.addEventListener("keydown",M6),Nt&&ji.push(e)}),to(()=>{ji=ji.filter(t=>t!==e),ji.length===0&&Nt&&document.removeEventListener("keydown",M6)})};let A6;const z6=()=>{const e=kh(),t=Ph(),o=C(()=>`${e.value}-popper-container-${t.prefix}`),r=C(()=>`#${o.value}`);return{id:o,selector:r}},Ej=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},Tj=()=>{const{id:e,selector:t}=z6();return Nu(()=>{Nt&&!A6&&!document.body.querySelector(t.value)&&(A6=Ej(e.value))}),{id:e,selector:t}},$j=Pe({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Mj=({showAfter:e,hideAfter:t,autoClose:o,open:r,close:l})=>{const{registerTimeout:n}=T6(),{registerTimeout:a,cancelTimeout:i}=T6();return{onOpen:u=>{n(()=>{r(u);const p=s(o);st(p)&&p>0&&a(()=>{l(u)},p)},s(e))},onClose:u=>{i(),n(()=>{l(u)},s(t))}}},I6=Symbol("elForwardRef"),Aj=e=>{zt(I6,{setForwardRef:o=>{e.value=o}})},zj=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),O6={current:0},N6=D(0),P6=2e3,R6=Symbol("elZIndexContextKey"),L6=Symbol("zIndexContextKey"),Ki=e=>{const t=wt()?Ge(R6,O6):O6,o=e||(wt()?Ge(L6,void 0):void 0),r=C(()=>{const a=s(o);return st(a)?a:P6}),l=C(()=>r.value+N6.value),n=()=>(t.current++,N6.value=t.current,l.value);return!Nt&&Ge(R6),{initialZIndex:r,currentZIndex:l,nextZIndex:n}},Ui=Math.min,Ha=Math.max,Bd=Math.round,Vd=Math.floor,ta=e=>({x:e,y:e}),Ij={left:"right",right:"left",bottom:"top",top:"bottom"},Oj={start:"end",end:"start"};function Rh(e,t,o){return Ha(e,Ui(t,o))}function Cc(e,t){return typeof e=="function"?e(t):e}function Fa(e){return e.split("-")[0]}function Sc(e){return e.split("-")[1]}function B6(e){return e==="x"?"y":"x"}function Lh(e){return e==="y"?"height":"width"}function Wi(e){return["top","bottom"].includes(Fa(e))?"y":"x"}function Bh(e){return B6(Wi(e))}function Nj(e,t,o){o===void 0&&(o=!1);const r=Sc(e),l=Bh(e),n=Lh(l);let a=l==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=Dd(a)),[a,Dd(a)]}function Pj(e){const t=Dd(e);return[Vh(e),t,Vh(t)]}function Vh(e){return e.replace(/start|end/g,t=>Oj[t])}function Rj(e,t,o){const r=["left","right"],l=["right","left"],n=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?t?l:r:t?r:l;case"left":case"right":return t?n:a;default:return[]}}function Lj(e,t,o,r){const l=Sc(e);let n=Rj(Fa(e),o==="start",r);return l&&(n=n.map(a=>a+"-"+l),t&&(n=n.concat(n.map(Vh)))),n}function Dd(e){return e.replace(/left|right|bottom|top/g,t=>Ij[t])}function Bj(e){return{top:0,right:0,bottom:0,left:0,...e}}function V6(e){return typeof e!="number"?Bj(e):{top:e,right:e,bottom:e,left:e}}function Hd(e){const{x:t,y:o,width:r,height:l}=e;return{width:r,height:l,top:o,left:t,right:t+r,bottom:o+l,x:t,y:o}}function D6(e,t,o){let{reference:r,floating:l}=e;const n=Wi(t),a=Bh(t),i=Lh(a),c=Fa(t),d=n==="y",u=r.x+r.width/2-l.width/2,p=r.y+r.height/2-l.height/2,h=r[i]/2-l[i]/2;let v;switch(c){case"top":v={x:u,y:r.y-l.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-l.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Sc(t)){case"start":v[a]-=h*(o&&d?-1:1);break;case"end":v[a]+=h*(o&&d?-1:1);break}return v}const Vj=async(e,t,o)=>{const{placement:r="bottom",strategy:l="absolute",middleware:n=[],platform:a}=o,i=n.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:l}),{x:u,y:p}=D6(d,r,c),h=r,v={},m=0;for(let f=0;f({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:l,rects:n,platform:a,elements:i,middlewareData:c}=t,{element:d,padding:u=0}=Cc(e,t)||{};if(d==null)return{};const p=V6(u),h={x:o,y:r},v=Bh(l),m=Lh(v),f=await a.getDimensions(d),_=v==="y",g=_?"top":"left",y=_?"bottom":"right",w=_?"clientHeight":"clientWidth",x=n.reference[m]+n.reference[v]-h[v]-n.floating[m],$=h[v]-n.reference[v],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let L=T?T[w]:0;(!L||!await(a.isElement==null?void 0:a.isElement(T)))&&(L=i.floating[w]||n.floating[m]);const P=x/2-$/2,R=L/2-f[m]/2-1,V=Ui(p[g],R),B=Ui(p[y],R),F=V,Q=L-f[m]-B,J=L/2-f[m]/2+P,Z=Rh(F,J,Q),H=!c.arrow&&Sc(l)!=null&&J!==Z&&n.reference[m]/2-(JJ<=0)){var B,F;const J=(((B=n.flip)==null?void 0:B.index)||0)+1,Z=L[J];if(Z)return{data:{index:J,overflows:V},reset:{placement:Z}};let H=(F=V.filter(j=>j.overflows[0]<=0).sort((j,K)=>j.overflows[1]-K.overflows[1])[0])==null?void 0:F.placement;if(!H)switch(v){case"bestFit":{var Q;const j=(Q=V.filter(K=>{if(T){const I=Wi(K.placement);return I===y||I==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((K,I)=>K[1]-I[1])[0])==null?void 0:Q[0];j&&(H=j);break}case"initialPlacement":H=i;break}if(l!==H)return{reset:{placement:H}}}return{}}}};async function Fj(e,t){const{placement:o,platform:r,elements:l}=e,n=await(r.isRTL==null?void 0:r.isRTL(l.floating)),a=Fa(o),i=Sc(o),c=Wi(o)==="y",d=["left","top"].includes(a)?-1:1,u=n&&c?-1:1,p=Cc(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return i&&typeof m=="number"&&(v=i==="end"?m*-1:m),c?{x:v*u,y:h*d}:{x:h*d,y:v*u}}const jj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:l,y:n,placement:a,middlewareData:i}=t,c=await Fj(t,e);return a===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:l+c.x,y:n+c.y,data:{...c,placement:a}}}}},Kj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:l}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:i={fn:_=>{let{x:g,y}=_;return{x:g,y}}},...c}=Cc(e,t),d={x:o,y:r},u=await Dh(t,c),p=Wi(Fa(l)),h=B6(p);let v=d[h],m=d[p];if(n){const _=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=v+u[_],w=v-u[g];v=Rh(y,v,w)}if(a){const _=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=m+u[_],w=m-u[g];m=Rh(y,m,w)}const f=i.fn({...t,[h]:v,[p]:m});return{...f,data:{x:f.x-o,y:f.y-r}}}}};function qi(e){return H6(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gn(e){var t;return(t=(H6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function H6(e){return e instanceof Node||e instanceof Br(e).Node}function Vl(e){return e instanceof Element||e instanceof Br(e).Element}function Dl(e){return e instanceof HTMLElement||e instanceof Br(e).HTMLElement}function F6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function Ec(e){const{overflow:t,overflowX:o,overflowY:r,display:l}=gl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!["inline","contents"].includes(l)}function Uj(e){return["table","td","th"].includes(qi(e))}function Fd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Hh(e){const t=Fh(),o=gl(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function Wj(e){let t=oa(e);for(;Dl(t)&&!Yi(t);){if(Fd(t))return null;if(Hh(t))return t;t=oa(t)}return null}function Fh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yi(e){return["html","body","#document"].includes(qi(e))}function gl(e){return Br(e).getComputedStyle(e)}function jd(e){return Vl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oa(e){if(qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F6(e)&&e.host||gn(e);return F6(t)?t.host:t}function j6(e){const t=oa(e);return Yi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dl(t)&&Ec(t)?t:j6(t)}function Tc(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const l=j6(e),n=l===((r=e.ownerDocument)==null?void 0:r.body),a=Br(l);return n?t.concat(a,a.visualViewport||[],Ec(l)?l:[],a.frameElement&&o?Tc(a.frameElement):[]):t.concat(l,Tc(l,[],o))}function K6(e){const t=gl(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const l=Dl(e),n=l?e.offsetWidth:o,a=l?e.offsetHeight:r,i=Bd(o)!==n||Bd(r)!==a;return i&&(o=n,r=a),{width:o,height:r,$:i}}function jh(e){return Vl(e)?e:e.contextElement}function Gi(e){const t=jh(e);if(!Dl(t))return ta(1);const o=t.getBoundingClientRect(),{width:r,height:l,$:n}=K6(t);let a=(n?Bd(o.width):o.width)/r,i=(n?Bd(o.height):o.height)/l;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const qj=ta(0);function U6(e){const t=Br(e);return!Fh()||!t.visualViewport?qj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yj(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==Br(e)?!1:t}function ja(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const l=e.getBoundingClientRect(),n=jh(e);let a=ta(1);t&&(r?Vl(r)&&(a=Gi(r)):a=Gi(e));const i=Yj(n,o,r)?U6(n):ta(0);let c=(l.left+i.x)/a.x,d=(l.top+i.y)/a.y,u=l.width/a.x,p=l.height/a.y;if(n){const h=Br(n),v=r&&Vl(r)?Br(r):r;let m=h,f=m.frameElement;for(;f&&r&&v!==m;){const _=Gi(f),g=f.getBoundingClientRect(),y=gl(f),w=g.left+(f.clientLeft+parseFloat(y.paddingLeft))*_.x,x=g.top+(f.clientTop+parseFloat(y.paddingTop))*_.y;c*=_.x,d*=_.y,u*=_.x,p*=_.y,c+=w,d+=x,m=Br(f),f=m.frameElement}}return Hd({width:u,height:p,x:c,y:d})}function Gj(e){let{elements:t,rect:o,offsetParent:r,strategy:l}=e;const n=l==="fixed",a=gn(r),i=t?Fd(t.floating):!1;if(r===a||i&&n)return o;let c={scrollLeft:0,scrollTop:0},d=ta(1);const u=ta(0),p=Dl(r);if((p||!p&&!n)&&((qi(r)!=="body"||Ec(a))&&(c=jd(r)),Dl(r))){const h=ja(r);d=Gi(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-c.scrollLeft*d.x+u.x,y:o.y*d.y-c.scrollTop*d.y+u.y}}function Xj(e){return Array.from(e.getClientRects())}function W6(e){return ja(gn(e)).left+jd(e).scrollLeft}function Zj(e){const t=gn(e),o=jd(e),r=e.ownerDocument.body,l=Ha(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=Ha(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+W6(e);const i=-o.scrollTop;return gl(r).direction==="rtl"&&(a+=Ha(t.clientWidth,r.clientWidth)-l),{width:l,height:n,x:a,y:i}}function Jj(e,t){const o=Br(e),r=gn(e),l=o.visualViewport;let n=r.clientWidth,a=r.clientHeight,i=0,c=0;if(l){n=l.width,a=l.height;const d=Fh();(!d||d&&t==="fixed")&&(i=l.offsetLeft,c=l.offsetTop)}return{width:n,height:a,x:i,y:c}}function Qj(e,t){const o=ja(e,!0,t==="fixed"),r=o.top+e.clientTop,l=o.left+e.clientLeft,n=Dl(e)?Gi(e):ta(1),a=e.clientWidth*n.x,i=e.clientHeight*n.y,c=l*n.x,d=r*n.y;return{width:a,height:i,x:c,y:d}}function q6(e,t,o){let r;if(t==="viewport")r=Jj(e,o);else if(t==="document")r=Zj(gn(e));else if(Vl(t))r=Qj(t,o);else{const l=U6(e);r={...t,x:t.x-l.x,y:t.y-l.y}}return Hd(r)}function Y6(e,t){const o=oa(e);return o===t||!Vl(o)||Yi(o)?!1:gl(o).position==="fixed"||Y6(o,t)}function eK(e,t){const o=t.get(e);if(o)return o;let r=Tc(e,[],!1).filter(i=>Vl(i)&&qi(i)!=="body"),l=null;const n=gl(e).position==="fixed";let a=n?oa(e):e;for(;Vl(a)&&!Yi(a);){const i=gl(a),c=Hh(a);!c&&i.position==="fixed"&&(l=null),(n?!c&&!l:!c&&i.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||Ec(a)&&!c&&Y6(e,a))?r=r.filter(u=>u!==a):l=i,a=oa(a)}return t.set(e,r),r}function tK(e){let{element:t,boundary:o,rootBoundary:r,strategy:l}=e;const a=[...o==="clippingAncestors"?Fd(t)?[]:eK(t,this._c):[].concat(o),r],i=a[0],c=a.reduce((d,u)=>{const p=q6(t,u,l);return d.top=Ha(p.top,d.top),d.right=Ui(p.right,d.right),d.bottom=Ui(p.bottom,d.bottom),d.left=Ha(p.left,d.left),d},q6(t,i,l));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function oK(e){const{width:t,height:o}=K6(e);return{width:t,height:o}}function rK(e,t,o){const r=Dl(t),l=gn(t),n=o==="fixed",a=ja(e,!0,n,t);let i={scrollLeft:0,scrollTop:0};const c=ta(0);if(r||!r&&!n)if((qi(t)!=="body"||Ec(l))&&(i=jd(t)),r){const p=ja(t,!0,n,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else l&&(c.x=W6(l));const d=a.left+i.scrollLeft-c.x,u=a.top+i.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Kh(e){return gl(e).position==="static"}function G6(e,t){return!Dl(e)||gl(e).position==="fixed"?null:t?t(e):e.offsetParent}function X6(e,t){const o=Br(e);if(Fd(e))return o;if(!Dl(e)){let l=oa(e);for(;l&&!Yi(l);){if(Vl(l)&&!Kh(l))return l;l=oa(l)}return o}let r=G6(e,t);for(;r&&Uj(r)&&Kh(r);)r=G6(r,t);return r&&Yi(r)&&Kh(r)&&!Hh(r)?o:r||Wj(e)||o}const lK=async function(e){const t=this.getOffsetParent||X6,o=this.getDimensions,r=await o(e.floating);return{reference:rK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nK(e){return gl(e).direction==="rtl"}const aK={convertOffsetParentRelativeRectToViewportRelativeRect:Gj,getDocumentElement:gn,getClippingRect:tK,getOffsetParent:X6,getElementRects:lK,getClientRects:Xj,getDimensions:oK,getScale:Gi,isElement:Vl,isRTL:nK};function iK(e,t){let o=null,r;const l=gn(e);function n(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),n();const{left:d,top:u,width:p,height:h}=e.getBoundingClientRect();if(i||t(),!p||!h)return;const v=Vd(u),m=Vd(l.clientWidth-(d+p)),f=Vd(l.clientHeight-(u+h)),_=Vd(d),y={rootMargin:-v+"px "+-m+"px "+-f+"px "+-_+"px",threshold:Ha(0,Ui(1,c))||1};let w=!0;function x($){const T=$[0].intersectionRatio;if(T!==c){if(!w)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(x,{...y,root:l.ownerDocument})}catch{o=new IntersectionObserver(x,y)}o.observe(e)}return a(!0),n}function sK(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=jh(e),u=l||n?[...d?Tc(d):[],...Tc(t)]:[];u.forEach(g=>{l&&g.addEventListener("scroll",o,{passive:!0}),n&&g.addEventListener("resize",o)});const p=d&&i?iK(d,o):null;let h=-1,v=null;a&&(v=new ResizeObserver(g=>{let[y]=g;y&&y.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=v)==null||w.observe(t)})),o()}),d&&!c&&v.observe(d),v.observe(t));let m,f=c?ja(e):null;c&&_();function _(){const g=ja(e);f&&(g.x!==f.x||g.y!==f.y||g.width!==f.width||g.height!==f.height)&&o(),f=g,m=requestAnimationFrame(_)}return o(),()=>{var g;u.forEach(y=>{l&&y.removeEventListener("scroll",o),n&&y.removeEventListener("resize",o)}),p==null||p(),(g=v)==null||g.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const cK=Dh,Z6=jj,uK=Kj,dK=Hj,J6=Dj,Q6=(e,t,o)=>{const r=new Map,l={platform:aK,...o},n={...l.platform,_c:r};return Vj(e,t,{...l,platform:n})};Pe({});const pK=e=>{if(!Nt)return;if(!e)return e;const t=$r(e);return t||(Zt(e)?t:e)},fK=({middleware:e,placement:t,strategy:o})=>{const r=D(),l=D(),n=D(),a=D(),i=D({}),c={x:n,y:a,placement:t,strategy:o,middlewareData:i},d=async()=>{if(!Nt)return;const u=pK(r),p=$r(l);if(!u||!p)return;const h=await Q6(u,p,{placement:s(t),strategy:s(o),middleware:s(e)});Ri(c).forEach(v=>{c[v].value=h[v]})};return ft(()=>{Go(()=>{d()})}),{...c,update:d,referenceRef:r,contentRef:l}},hK=({arrowRef:e,padding:t})=>({name:"arrow",options:{element:e,padding:t},fn(o){const r=s(e);return r?J6({element:r,padding:t}).fn(o):{}}});function vK(e){const t=D();function o(){if(e.value==null)return;const{selectionStart:l,selectionEnd:n,value:a}=e.value;if(l==null||n==null)return;const i=a.slice(0,Math.max(0,l)),c=a.slice(Math.max(0,n));t.value={selectionStart:l,selectionEnd:n,value:a,beforeTxt:i,afterTxt:c}}function r(){if(e.value==null||t.value==null)return;const{value:l}=e.value,{beforeTxt:n,afterTxt:a,selectionStart:i}=t.value;if(n==null||a==null||i==null)return;let c=l.length;if(l.endsWith(a))c=l.length-a.length;else if(l.startsWith(n))c=n.length;else{const d=n[i-1],u=l.indexOf(d,i-1);u!==-1&&(c=u+1)}e.value.setSelectionRange(c,c)}return[o,r]}const mK=(e,t,o)=>Qn(e.subTree).filter(n=>{var a;return io(n)&&((a=n.type)==null?void 0:a.name)===t&&!!n.component}).map(n=>n.component.uid).map(n=>o[n]).filter(n=>!!n),Uh=(e,t)=>{const o={},r=lo([]);return{children:r,addChild:a=>{o[a.uid]=a,r.value=mK(e,t,o)},removeChild:a=>{delete o[a],r.value=r.value.filter(i=>i.uid!==a)}}},Oo=vl({type:String,values:Rl,required:!1}),e4=Symbol("size"),gK=()=>{const e=Ge(e4,{});return C(()=>s(e.size)||"")};function Kd(e,{afterFocus:t,beforeBlur:o,afterBlur:r}={}){const l=wt(),{emit:n}=l,a=lo(),i=D(!1),c=p=>{i.value||(i.value=!0,n("focus",p),t==null||t())},d=p=>{var h;it(o)&&o(p)||p.relatedTarget&&((h=a.value)!=null&&h.contains(p.relatedTarget))||(i.value=!1,n("blur",p),r==null||r())},u=()=>{var p;(p=e.value)==null||p.focus()};return Se(a,p=>{p&&p.setAttribute("tabindex","-1")}),oo(a,"click",u),{wrapperRef:a,isFocused:i,handleFocus:c,handleBlur:d}}const bK=["",void 0,null],_K=void 0,Xi=Pe({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>it(e)?!e():!e}}),Ud=(e,t)=>{let o=$c();o.value||(o=D({}));const r=C(()=>e.emptyValues||o.value.emptyValues||bK),l=C(()=>it(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:it(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:t!==void 0?t:_K),n=a=>r.value.includes(a);return r.value.includes(l.value),{emptyValues:r,valueOnClear:l,isEmptyValue:n}},wK=Pe({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Zo=e=>Ol(wK,e),t4=Symbol(),Wd=D();function $c(e,t=void 0){const o=wt()?Ge(t4,Wd):Wd;return e?C(()=>{var r,l;return(l=(r=o.value)==null?void 0:r[e])!=null?l:t}):o}function qd(e,t){const o=$c(),r=ze(e,C(()=>{var i;return((i=o.value)==null?void 0:i.namespace)||mc})),l=Rt(C(()=>{var i;return(i=o.value)==null?void 0:i.locale})),n=Ki(C(()=>{var i;return((i=o.value)==null?void 0:i.zIndex)||P6})),a=C(()=>{var i;return s(t)||((i=o.value)==null?void 0:i.size)||""});return Wh(C(()=>s(o)||{})),{ns:r,locale:l,zIndex:n,size:a}}const Wh=(e,t,o=!1)=>{var r;const l=!!wt(),n=l?$c():void 0,a=(r=t==null?void 0:t.provide)!=null?r:l?zt:void 0;if(!a)return;const i=C(()=>{const c=s(e);return n!=null&&n.value?yK(n.value,c):c});return a(t4,i),a(r6,C(()=>i.value.locale)),a(l6,C(()=>i.value.namespace)),a(L6,C(()=>i.value.zIndex)),a(e4,{size:C(()=>i.value.size||"")}),(o||!Wd.value)&&(Wd.value=i.value),i},yK=(e,t)=>{const o=[...new Set([...Ri(e),...Ri(t)])],r={};for(const l of o)r[l]=t[l]!==void 0?t[l]:e[l];return r},xK=Pe({a11y:{type:Boolean,default:!0},locale:{type:ue(Object)},size:Oo,button:{type:ue(Object)},experimentalFeatures:{type:ue(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:ue(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Xi}),qh={},kK=yt(N({name:"ElConfigProvider",props:xK,setup(e,{slots:t}){Se(()=>e.message,r=>{Object.assign(qh,r??{})},{immediate:!0,deep:!0});const o=Wh(e);return()=>be(t,"default",{config:o==null?void 0:o.value})}})),CK="2.7.6",SK=(e=[])=>({version:CK,install:(o,r)=>{o[Q3]||(o[Q3]=!0,e.forEach(l=>o.use(l)),r&&Wh(r,o,!0))}}),EK=Pe({zIndex:{type:ue([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),TK={scroll:({scrollTop:e,fixed:t})=>st(e)&&Co(t),[ro]:e=>Co(e)};var Le=(e,t)=>{const o=e.__vccOpts||e;for(const[r,l]of t)o[r]=l;return o};const o4="ElAffix",$K=N({...N({name:o4}),props:EK,emits:TK,setup(e,{expose:t,emit:o}){const r=e,l=ze("affix"),n=lo(),a=lo(),i=lo(),{height:c}=gE(),{height:d,width:u,top:p,bottom:h,update:v}=Qb(a,{windowScroll:!1}),m=Qb(n),f=D(!1),_=D(0),g=D(0),y=C(()=>({height:f.value?`${d.value}px`:"",width:f.value?`${u.value}px`:""})),w=C(()=>{if(!f.value)return{};const T=r.offset?go(r.offset):0;return{height:`${d.value}px`,width:`${u.value}px`,top:r.position==="top"?T:"",bottom:r.position==="bottom"?T:"",transform:g.value?`translateY(${g.value}px)`:"",zIndex:r.zIndex}}),x=()=>{if(i.value)if(_.value=i.value instanceof Window?document.documentElement.scrollTop:i.value.scrollTop||0,r.position==="top")if(r.target){const T=m.bottom.value-r.offset-d.value;f.value=r.offset>p.value&&m.bottom.value>0,g.value=T<0?T:0}else f.value=r.offset>p.value;else if(r.target){const T=c.value-m.top.value-r.offset-d.value;f.value=c.value-r.offsetm.top.value,g.value=T<0?-T:0}else f.value=c.value-r.offset{v(),o("scroll",{scrollTop:_.value,fixed:f.value})};return Se(f,T=>o("change",T)),ft(()=>{var T;r.target?(n.value=(T=document.querySelector(r.target))!=null?T:void 0,n.value||Io(o4,`Target does not exist: ${r.target}`)):n.value=document.documentElement,i.value=ch(a.value,!0),v()}),oo(i,"scroll",$),Go(x),t({update:x,updateRoot:v}),(T,L)=>(b(),M("div",{ref_key:"root",ref:a,class:O(s(l).b()),style:Je(s(y))},[E("div",{class:O({[s(l).m("fixed")]:f.value}),style:Je(s(w))},[be(T.$slots,"default")],6)],6))}});var MK=Le($K,[["__file","affix.vue"]]);const AK=yt(MK),zK=Pe({size:{type:ue([Number,String])},color:{type:String}}),IK=N({...N({name:"ElIcon",inheritAttrs:!1}),props:zK,setup(e){const t=e,o=ze("icon"),r=C(()=>{const{size:l,color:n}=t;return!l&&!n?{}:{fontSize:ko(l)?void 0:go(l),"--color":n}});return(l,n)=>(b(),M("i",Mt({class:s(o).b(),style:s(r)},l.$attrs),[be(l.$slots,"default")],16))}});var OK=Le(IK,[["__file","icon.vue"]]);const Ze=yt(OK),NK=["light","dark"],PK=Pe({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Ri(Jn),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:NK,default:"light"}}),RK=N({...N({name:"ElAlert"}),props:PK,emits:{close:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,{Close:r}=gh,l=Do(),n=ze("alert"),a=D(!0),i=C(()=>Jn[o.type]),c=C(()=>[n.e("icon"),{[n.is("big")]:!!o.description||!!l.default}]),d=C(()=>({"with-description":o.description||l.default})),u=p=>{a.value=!1,t("close",p)};return(p,h)=>(b(),he(Mo,{name:s(n).b("fade"),persisted:""},{default:le(()=>[mt(E("div",{class:O([s(n).b(),s(n).m(p.type),s(n).is("center",p.center),s(n).is(p.effect)]),role:"alert"},[p.showIcon&&s(i)?(b(),he(s(Ze),{key:0,class:O(s(c))},{default:le(()=>[(b(),he(Et(s(i))))]),_:1},8,["class"])):se("v-if",!0),E("div",{class:O(s(n).e("content"))},[p.title||p.$slots.title?(b(),M("span",{key:0,class:O([s(n).e("title"),s(d)])},[be(p.$slots,"title",{},()=>[Ct($e(p.title),1)])],2)):se("v-if",!0),p.$slots.default||p.description?(b(),M("p",{key:1,class:O(s(n).e("description"))},[be(p.$slots,"default",{},()=>[Ct($e(p.description),1)])],2)):se("v-if",!0),p.closable?(b(),M(Qe,{key:2},[p.closeText?(b(),M("div",{key:0,class:O([s(n).e("close-btn"),s(n).is("customed")]),onClick:u},$e(p.closeText),3)):(b(),he(s(Ze),{key:1,class:O(s(n).e("close-btn")),onClick:u},{default:le(()=>[te(s(r))]),_:1},8,["class"]))],64)):se("v-if",!0)],2)],2),[[Lt,a.value]])]),_:3},8,["name"]))}});var LK=Le(RK,[["__file","alert.vue"]]);const BK=yt(LK),Ka=Symbol("formContextKey"),Hl=Symbol("formItemContextKey"),So=(e,t={})=>{const o=D(void 0),r=t.prop?o:a6("size"),l=t.global?o:gK(),n=t.form?{size:void 0}:Ge(Ka,void 0),a=t.formItem?{size:void 0}:Ge(Hl,void 0);return C(()=>r.value||s(e)||(a==null?void 0:a.size)||(n==null?void 0:n.size)||l.value||"")},xr=e=>{const t=a6("disabled"),o=Ge(Ka,void 0);return C(()=>t.value||s(e)||(o==null?void 0:o.disabled)||!1)},sr=()=>{const e=Ge(Ka,void 0),t=Ge(Hl,void 0);return{form:e,formItem:t}},bl=(e,{formItemContext:t,disableIdGeneration:o,disableIdManagement:r})=>{o||(o=D(!1)),r||(r=D(!1));const l=D();let n;const a=C(()=>{var i;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((i=t.inputIds)==null?void 0:i.length)<=1)});return ft(()=>{n=Se([Yt(e,"id"),o],([i,c])=>{const d=i??(c?void 0:Qo().value);d!==l.value&&(t!=null&&t.removeInputId&&(l.value&&t.removeInputId(l.value),!(r!=null&&r.value)&&!c&&d&&t.addInputId(d)),l.value=d)},{immediate:!0})}),Rn(()=>{n&&n(),t!=null&&t.removeInputId&&l.value&&t.removeInputId(l.value)}),{isLabeledByFormItem:a,inputId:l}},VK=Pe({size:{type:String,values:Rl},disabled:Boolean}),DK=Pe({...VK,model:Object,rules:{type:ue(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),HK={validate:(e,t,o)=>(Ke(e)||ut(e))&&Co(t)&&ut(o)};function FK(){const e=D([]),t=C(()=>{if(!e.value.length)return"0";const n=Math.max(...e.value);return n?`${n}px`:""});function o(n){const a=e.value.indexOf(n);return a===-1&&t.value,a}function r(n,a){if(n&&a){const i=o(a);e.value.splice(i,1,n)}else n&&e.value.push(n)}function l(n){const a=o(n);a>-1&&e.value.splice(a,1)}return{autoLabelWidth:t,registerLabelWidth:r,deregisterLabelWidth:l}}const Yd=(e,t)=>{const o=Gn(t);return o.length>0?e.filter(r=>r.prop&&o.includes(r.prop)):e},jK=N({...N({name:"ElForm"}),props:DK,emits:HK,setup(e,{expose:t,emit:o}){const r=e,l=[],n=So(),a=ze("form"),i=C(()=>{const{labelPosition:w,inline:x}=r;return[a.b(),a.m(n.value||"default"),{[a.m(`label-${w}`)]:w,[a.m("inline")]:x}]}),c=w=>l.find(x=>x.prop===w),d=w=>{l.push(w)},u=w=>{w.prop&&l.splice(l.indexOf(w),1)},p=(w=[])=>{r.model&&Yd(l,w).forEach(x=>x.resetField())},h=(w=[])=>{Yd(l,w).forEach(x=>x.clearValidate())},v=C(()=>!!r.model),m=w=>{if(l.length===0)return[];const x=Yd(l,w);return x.length?x:[]},f=async w=>g(void 0,w),_=async(w=[])=>{if(!v.value)return!1;const x=m(w);if(x.length===0)return!0;let $={};for(const T of x)try{await T.validate("")}catch(L){$={...$,...L}}return Object.keys($).length===0?!0:Promise.reject($)},g=async(w=[],x)=>{const $=!it(x);try{const T=await _(w);return T===!0&&await(x==null?void 0:x(T)),T}catch(T){if(T instanceof Error)throw T;const L=T;return r.scrollToError&&y(Object.keys(L)[0]),await(x==null?void 0:x(!1,L)),$&&Promise.reject(L)}},y=w=>{var x;const $=Yd(l,w)[0];$&&((x=$.$el)==null||x.scrollIntoView(r.scrollIntoViewOptions))};return Se(()=>r.rules,()=>{r.validateOnRuleChange&&f().catch(w=>void 0)},{deep:!0}),zt(Ka,Dt({...Bo(r),emit:o,resetFields:p,clearValidate:h,validateField:g,getField:c,addField:d,removeField:u,...FK()})),t({validate:f,validateField:g,resetFields:p,clearValidate:h,scrollToField:y,fields:l}),(w,x)=>(b(),M("form",{class:O(s(i))},[be(w.$slots,"default")],2))}});var KK=Le(jK,[["__file","form.vue"]]);function UK(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r4={exports:{}},No=r4.exports={},Fl,jl;function Yh(){throw new Error("setTimeout has not been defined")}function Gh(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fl=setTimeout:Fl=Yh}catch{Fl=Yh}try{typeof clearTimeout=="function"?jl=clearTimeout:jl=Gh}catch{jl=Gh}})();function l4(e){if(Fl===setTimeout)return setTimeout(e,0);if((Fl===Yh||!Fl)&&setTimeout)return Fl=setTimeout,setTimeout(e,0);try{return Fl(e,0)}catch{try{return Fl.call(null,e,0)}catch{return Fl.call(this,e,0)}}}function WK(e){if(jl===clearTimeout)return clearTimeout(e);if((jl===Gh||!jl)&&clearTimeout)return jl=clearTimeout,clearTimeout(e);try{return jl(e)}catch{try{return jl.call(null,e)}catch{return jl.call(this,e)}}}var bn=[],Zi=!1,Ua,Gd=-1;function qK(){!Zi||!Ua||(Zi=!1,Ua.length?bn=Ua.concat(bn):Gd=-1,bn.length&&n4())}function n4(){if(!Zi){var e=l4(qK);Zi=!0;for(var t=bn.length;t;){for(Ua=bn,bn=[];++Gd1)for(var o=1;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xd(e,t,o){return JK()?Xd=Reflect.construct.bind():Xd=function(l,n,a){var i=[null];i.push.apply(i,n);var c=Function.bind.apply(l,i),d=new c;return a&&Mc(d,a.prototype),d},Xd.apply(null,arguments)}function QK(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Zh(e){var t=typeof Map=="function"?new Map:void 0;return Zh=function(r){if(r===null||!QK(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,l)}function l(){return Xd(r,arguments,Xh(this).constructor)}return l.prototype=Object.create(r.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Mc(l,r)},Zh(e)}var eU=/%[sdj%]/g,tU=function(){};typeof GK<"u";function Jh(e){if(!e||!e.length)return null;var t={};return e.forEach(function(o){var r=o.field;t[r]=t[r]||[],t[r].push(o)}),t}function Vr(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r=n)return i;switch(i){case"%s":return String(o[l++]);case"%d":return Number(o[l++]);case"%j":try{return JSON.stringify(o[l++])}catch{return"[Circular]"}break;default:return i}});return a}return e}function oU(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ko(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||oU(t)&&typeof e=="string"&&!e)}function rU(e,t,o){var r=[],l=0,n=e.length;function a(i){r.push.apply(r,i||[]),l++,l===n&&o(r)}e.forEach(function(i){t(i,a)})}function i4(e,t,o){var r=0,l=e.length;function n(a){if(a&&a.length){o(a);return}var i=r;r=r+1,i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},zc={integer:function(t){return zc.number(t)&&parseInt(t,10)===t},float:function(t){return zc.number(t)&&!zc.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!zc.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(f4.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(uU())},hex:function(t){return typeof t=="string"&&!!t.match(f4.hex)}},dU=function(t,o,r,l,n){if(t.required&&o===void 0){p4(t,o,r,l,n);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=t.type;a.indexOf(i)>-1?zc[i](o)||l.push(Vr(n.messages.types[i],t.fullField,t.type)):i&&typeof o!==t.type&&l.push(Vr(n.messages.types[i],t.fullField,t.type))},pU=function(t,o,r,l,n){var a=typeof t.len=="number",i=typeof t.min=="number",c=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=o,p=null,h=typeof o=="number",v=typeof o=="string",m=Array.isArray(o);if(h?p="number":v?p="string":m&&(p="array"),!p)return!1;m&&(u=o.length),v&&(u=o.replace(d,"_").length),a?u!==t.len&&l.push(Vr(n.messages[p].len,t.fullField,t.len)):i&&!c&&ut.max?l.push(Vr(n.messages[p].max,t.fullField,t.max)):i&&c&&(ut.max)&&l.push(Vr(n.messages[p].range,t.fullField,t.min,t.max))},Ji="enum",fU=function(t,o,r,l,n){t[Ji]=Array.isArray(t[Ji])?t[Ji]:[],t[Ji].indexOf(o)===-1&&l.push(Vr(n.messages[Ji],t.fullField,t[Ji].join(", ")))},hU=function(t,o,r,l,n){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(o)||l.push(Vr(n.messages.pattern.mismatch,t.fullField,o,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(o)||l.push(Vr(n.messages.pattern.mismatch,t.fullField,o,t.pattern))}}},Jt={required:p4,whitespace:cU,type:dU,range:pU,enum:fU,pattern:hU},vU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"string")&&!t.required)return r();Jt.required(t,o,l,a,n,"string"),Ko(o,"string")||(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n),Jt.pattern(t,o,l,a,n),t.whitespace===!0&&Jt.whitespace(t,o,l,a,n))}r(a)},mU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},gU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(o===""&&(o=void 0),Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},bU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},_U=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),Ko(o)||Jt.type(t,o,l,a,n)}r(a)},wU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},yU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},xU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(o==null&&!t.required)return r();Jt.required(t,o,l,a,n,"array"),o!=null&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},kU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},CU="enum",SU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt[CU](t,o,l,a,n)}r(a)},EU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"string")&&!t.required)return r();Jt.required(t,o,l,a,n),Ko(o,"string")||Jt.pattern(t,o,l,a,n)}r(a)},TU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"date")&&!t.required)return r();if(Jt.required(t,o,l,a,n),!Ko(o,"date")){var c;o instanceof Date?c=o:c=new Date(o),Jt.type(t,c,l,a,n),c&&Jt.range(t,c.getTime(),l,a,n)}}r(a)},$U=function(t,o,r,l,n){var a=[],i=Array.isArray(o)?"array":typeof o;Jt.required(t,o,l,a,n,i),r(a)},ev=function(t,o,r,l,n){var a=t.type,i=[],c=t.required||!t.required&&l.hasOwnProperty(t.field);if(c){if(Ko(o,a)&&!t.required)return r();Jt.required(t,o,l,i,n,a),Ko(o,a)||Jt.type(t,o,l,i,n)}r(i)},MU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n)}r(a)},Ic={string:vU,method:mU,number:gU,boolean:bU,regexp:_U,integer:wU,float:yU,array:xU,object:kU,enum:SU,pattern:EU,date:TU,url:ev,hex:ev,email:ev,required:$U,any:MU};function tv(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ov=tv(),Oc=function(){function e(o){this.rules=null,this._messages=ov,this.define(o)}var t=e.prototype;return t.define=function(r){var l=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(n){var a=r[n];l.rules[n]=Array.isArray(a)?a:[a]})},t.messages=function(r){return r&&(this._messages=d4(tv(),r)),this._messages},t.validate=function(r,l,n){var a=this;l===void 0&&(l={}),n===void 0&&(n=function(){});var i=r,c=l,d=n;if(typeof c=="function"&&(d=c,c={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,i),Promise.resolve(i);function u(f){var _=[],g={};function y(x){if(Array.isArray(x)){var $;_=($=_).concat.apply($,x)}else _.push(x)}for(var w=0;w");const l=ze("form"),n=D(),a=D(0),i=()=>{var u;if((u=n.value)!=null&&u.firstElementChild){const p=window.getComputedStyle(n.value.firstElementChild).width;return Math.ceil(Number.parseFloat(p))}else return 0},c=(u="update")=>{et(()=>{t.default&&e.isAutoWidth&&(u==="update"?a.value=i():u==="remove"&&(o==null||o.deregisterLabelWidth(a.value)))})},d=()=>c("update");return ft(()=>{d()}),to(()=>{c("remove")}),rn(()=>d()),Se(a,(u,p)=>{e.updateAll&&(o==null||o.registerLabelWidth(u,p))}),so(C(()=>{var u,p;return(p=(u=n.value)==null?void 0:u.firstElementChild)!=null?p:null}),d),()=>{var u,p;if(!t)return null;const{isAutoWidth:h}=e;if(h){const v=o==null?void 0:o.autoLabelWidth,m=r==null?void 0:r.hasLabel,f={};if(m&&v&&v!=="auto"){const _=Math.max(0,Number.parseInt(v,10)-a.value),g=o.labelPosition==="left"?"marginRight":"marginLeft";_&&(f[g]=`${_}px`)}return ee("div",{ref:n,class:[l.be("item","label-wrap")],style:f},[(u=t.default)==null?void 0:u.call(t)])}else return ee(Qe,{ref:n},[(p=t.default)==null?void 0:p.call(t)])}}});const OU=["role","aria-labelledby"],NU=N({...N({name:"ElFormItem"}),props:zU,setup(e,{expose:t}){const o=e,r=Do(),l=Ge(Ka,void 0),n=Ge(Hl,void 0),a=So(void 0,{formItem:!1}),i=ze("form-item"),c=Qo().value,d=D([]),u=D(""),p=tE(u,100),h=D(""),v=D();let m,f=!1;const _=C(()=>{if((l==null?void 0:l.labelPosition)==="top")return{};const _e=mo(o.labelWidth||(l==null?void 0:l.labelWidth)||"");return _e?{width:_e}:{}}),g=C(()=>{if((l==null?void 0:l.labelPosition)==="top"||l!=null&&l.inline)return{};if(!o.label&&!o.labelWidth&&L)return{};const _e=mo(o.labelWidth||(l==null?void 0:l.labelWidth)||"");return!o.label&&!r.label?{marginLeft:_e}:{}}),y=C(()=>[i.b(),i.m(a.value),i.is("error",u.value==="error"),i.is("validating",u.value==="validating"),i.is("success",u.value==="success"),i.is("required",J.value||o.required),i.is("no-asterisk",l==null?void 0:l.hideRequiredAsterisk),(l==null?void 0:l.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[i.m("feedback")]:l==null?void 0:l.statusIcon}]),w=C(()=>Co(o.inlineMessage)?o.inlineMessage:(l==null?void 0:l.inlineMessage)||!1),x=C(()=>[i.e("error"),{[i.em("error","inline")]:w.value}]),$=C(()=>o.prop?ut(o.prop)?o.prop:o.prop.join("."):""),T=C(()=>!!(o.label||r.label)),R=C(()=>o.for||(d.value.length===1?d.value[0]:void 0)),P=C(()=>!R.value&&T.value),L=!!n,V=C(()=>{const _e=l==null?void 0:l.model;if(!(!_e||!o.prop))return Td(_e,o.prop).value}),B=C(()=>{const{required:_e}=o,me=[];o.rules&&me.push(...Gn(o.rules));const Re=l==null?void 0:l.rules;if(Re&&o.prop){const Ce=Td(Re,o.prop).value;Ce&&me.push(...Gn(Ce))}if(_e!==void 0){const Ce=me.map((Ee,De)=>[Ee,De]).filter(([Ee])=>Object.keys(Ee).includes("required"));if(Ce.length>0)for(const[Ee,De]of Ce)Ee.required!==_e&&(me[De]={...Ee,required:_e});else me.push({required:_e})}return me}),j=C(()=>B.value.length>0),te=_e=>B.value.filter(Re=>!Re.trigger||!_e?!0:Array.isArray(Re.trigger)?Re.trigger.includes(_e):Re.trigger===_e).map(({trigger:Re,...Ce})=>Ce),J=C(()=>B.value.some(_e=>_e.required)),Z=C(()=>{var _e;return p.value==="error"&&o.showMessage&&((_e=l==null?void 0:l.showMessage)!=null?_e:!0)}),H=C(()=>`${o.label||""}${(l==null?void 0:l.labelSuffix)||""}`),F=_e=>{u.value=_e},K=_e=>{var me,Re;const{errors:Ce,fields:Ee}=_e;(!Ce||!Ee)&&console.error(_e),F("error"),h.value=Ce?(Re=(me=Ce==null?void 0:Ce[0])==null?void 0:me.message)!=null?Re:`${o.prop} is required`:"",l==null||l.emit("validate",o.prop,!1,h.value)},I=()=>{F("success"),l==null||l.emit("validate",o.prop,!0,"")},U=async _e=>{const me=$.value;return new Oc({[me]:_e}).validate({[me]:V.value},{firstFields:!0}).then(()=>(I(),!0)).catch(Ce=>(K(Ce),Promise.reject(Ce)))},oe=async(_e,me)=>{if(f||!o.prop)return!1;const Re=it(me);if(!j.value)return me==null||me(!1),!1;const Ce=te(_e);return Ce.length===0?(me==null||me(!0),!0):(F("validating"),U(Ce).then(()=>(me==null||me(!0),!0)).catch(Ee=>{const{fields:De}=Ee;return me==null||me(!1,De),Re?!1:Promise.reject(De)}))},ne=()=>{F(""),h.value="",f=!1},ce=async()=>{const _e=l==null?void 0:l.model;if(!_e||!o.prop)return;const me=Td(_e,o.prop);f=!0,me.value=c3(m),await et(),ne(),f=!1},Q=_e=>{d.value.includes(_e)||d.value.push(_e)},Me=_e=>{d.value=d.value.filter(me=>me!==_e)};Se(()=>o.error,_e=>{h.value=_e||"",F(_e?"error":"")},{immediate:!0}),Se(()=>o.validateStatus,_e=>F(_e||""));const de=Dt({...Bo(o),$el:v,size:a,validateState:u,labelId:c,inputIds:d,isGroup:P,hasLabel:T,fieldValue:V,addInputId:Q,removeInputId:Me,resetField:ce,clearValidate:ne,validate:oe});return zt(Hl,de),ft(()=>{o.prop&&(l==null||l.addField(de),m=c3(V.value))}),to(()=>{l==null||l.removeField(de)}),t({size:a,validateMessage:h,validateState:u,validate:oe,clearValidate:ne,resetField:ce}),(_e,me)=>{var Re;return b(),M("div",{ref_key:"formItemRef",ref:v,class:O(s(y)),role:s(P)?"group":void 0,"aria-labelledby":s(P)?s(c):void 0},[ee(s(IU),{"is-auto-width":s(_).width==="auto","update-all":((Re=s(l))==null?void 0:Re.labelWidth)==="auto"},{default:le(()=>[s(T)?(b(),he(Et(s(R)?"label":"div"),{key:0,id:s(c),for:s(R),class:O(s(i).e("label")),style:Je(s(_))},{default:le(()=>[be(_e.$slots,"label",{label:s(H)},()=>[Ct($e(s(H)),1)])]),_:3},8,["id","for","class","style"])):se("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),E("div",{class:O(s(i).e("content")),style:Je(s(g))},[be(_e.$slots,"default"),ee(I1,{name:`${s(i).namespace.value}-zoom-in-top`},{default:le(()=>[s(Z)?be(_e.$slots,"error",{key:0,error:h.value},()=>[E("div",{class:O(s(x))},$e(h.value),3)]):se("v-if",!0)]),_:3},8,["name"])],6)],10,OU)}}});var v4=Le(NU,[["__file","form-item.vue"]]);const PU=yt(UK,{FormItem:v4}),RU=co(v4);let _l;const LU=` +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),n=new RegExp("(?:^"+o+"$)|(?:^"+l+"$)"),a=new RegExp("^"+o+"$"),i=new RegExp("^"+l+"$"),c=function(x){return x&&x.exact?n:new RegExp("(?:"+t(x)+o+t(x)+")|(?:"+t(x)+l+t(x)+")","g")};c.v4=function(w){return w&&w.exact?a:new RegExp(""+t(w)+o+t(w),"g")},c.v6=function(w){return w&&w.exact?i:new RegExp(""+t(w)+l+t(w),"g")};var d="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",p=c.v4().source,h=c.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",f="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",_="(?::\\d{2,5})?",g='(?:[/?#][^\\s"]*)?',y="(?:"+d+"|www\\.)"+u+"(?:localhost|"+p+"|"+h+"|"+v+m+f+")"+_+g;return Zd=new RegExp("(?:^"+y+"$)","i"),Zd},p4={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Ac={integer:function(t){return Ac.number(t)&&parseInt(t,10)===t},float:function(t){return Ac.number(t)&&!Ac.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Ac.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(p4.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(cU())},hex:function(t){return typeof t=="string"&&!!t.match(p4.hex)}},uU=function(t,o,r,l,n){if(t.required&&o===void 0){d4(t,o,r,l,n);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=t.type;a.indexOf(i)>-1?Ac[i](o)||l.push(Vr(n.messages.types[i],t.fullField,t.type)):i&&typeof o!==t.type&&l.push(Vr(n.messages.types[i],t.fullField,t.type))},dU=function(t,o,r,l,n){var a=typeof t.len=="number",i=typeof t.min=="number",c=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=o,p=null,h=typeof o=="number",v=typeof o=="string",m=Array.isArray(o);if(h?p="number":v?p="string":m&&(p="array"),!p)return!1;m&&(u=o.length),v&&(u=o.replace(d,"_").length),a?u!==t.len&&l.push(Vr(n.messages[p].len,t.fullField,t.len)):i&&!c&&ut.max?l.push(Vr(n.messages[p].max,t.fullField,t.max)):i&&c&&(ut.max)&&l.push(Vr(n.messages[p].range,t.fullField,t.min,t.max))},Ji="enum",pU=function(t,o,r,l,n){t[Ji]=Array.isArray(t[Ji])?t[Ji]:[],t[Ji].indexOf(o)===-1&&l.push(Vr(n.messages[Ji],t.fullField,t[Ji].join(", ")))},fU=function(t,o,r,l,n){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(o)||l.push(Vr(n.messages.pattern.mismatch,t.fullField,o,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(o)||l.push(Vr(n.messages.pattern.mismatch,t.fullField,o,t.pattern))}}},Jt={required:d4,whitespace:sU,type:uU,range:dU,enum:pU,pattern:fU},hU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"string")&&!t.required)return r();Jt.required(t,o,l,a,n,"string"),Ko(o,"string")||(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n),Jt.pattern(t,o,l,a,n),t.whitespace===!0&&Jt.whitespace(t,o,l,a,n))}r(a)},vU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},mU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(o===""&&(o=void 0),Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},gU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},bU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),Ko(o)||Jt.type(t,o,l,a,n)}r(a)},_U=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},wU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},yU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(o==null&&!t.required)return r();Jt.required(t,o,l,a,n,"array"),o!=null&&(Jt.type(t,o,l,a,n),Jt.range(t,o,l,a,n))}r(a)},xU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt.type(t,o,l,a,n)}r(a)},kU="enum",CU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n),o!==void 0&&Jt[kU](t,o,l,a,n)}r(a)},SU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"string")&&!t.required)return r();Jt.required(t,o,l,a,n),Ko(o,"string")||Jt.pattern(t,o,l,a,n)}r(a)},EU=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o,"date")&&!t.required)return r();if(Jt.required(t,o,l,a,n),!Ko(o,"date")){var c;o instanceof Date?c=o:c=new Date(o),Jt.type(t,c,l,a,n),c&&Jt.range(t,c.getTime(),l,a,n)}}r(a)},TU=function(t,o,r,l,n){var a=[],i=Array.isArray(o)?"array":typeof o;Jt.required(t,o,l,a,n,i),r(a)},Qh=function(t,o,r,l,n){var a=t.type,i=[],c=t.required||!t.required&&l.hasOwnProperty(t.field);if(c){if(Ko(o,a)&&!t.required)return r();Jt.required(t,o,l,i,n,a),Ko(o,a)||Jt.type(t,o,l,i,n)}r(i)},$U=function(t,o,r,l,n){var a=[],i=t.required||!t.required&&l.hasOwnProperty(t.field);if(i){if(Ko(o)&&!t.required)return r();Jt.required(t,o,l,a,n)}r(a)},zc={string:hU,method:vU,number:mU,boolean:gU,regexp:bU,integer:_U,float:wU,array:yU,object:xU,enum:CU,pattern:SU,date:EU,url:Qh,hex:Qh,email:Qh,required:TU,any:$U};function ev(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var tv=ev(),Ic=function(){function e(o){this.rules=null,this._messages=tv,this.define(o)}var t=e.prototype;return t.define=function(r){var l=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(n){var a=r[n];l.rules[n]=Array.isArray(a)?a:[a]})},t.messages=function(r){return r&&(this._messages=u4(ev(),r)),this._messages},t.validate=function(r,l,n){var a=this;l===void 0&&(l={}),n===void 0&&(n=function(){});var i=r,c=l,d=n;if(typeof c=="function"&&(d=c,c={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,i),Promise.resolve(i);function u(f){var _=[],g={};function y(x){if(Array.isArray(x)){var $;_=($=_).concat.apply($,x)}else _.push(x)}for(var w=0;w");const l=ze("form"),n=D(),a=D(0),i=()=>{var u;if((u=n.value)!=null&&u.firstElementChild){const p=window.getComputedStyle(n.value.firstElementChild).width;return Math.ceil(Number.parseFloat(p))}else return 0},c=(u="update")=>{et(()=>{t.default&&e.isAutoWidth&&(u==="update"?a.value=i():u==="remove"&&(o==null||o.deregisterLabelWidth(a.value)))})},d=()=>c("update");return ft(()=>{d()}),to(()=>{c("remove")}),rn(()=>d()),Se(a,(u,p)=>{e.updateAll&&(o==null||o.registerLabelWidth(u,p))}),so(C(()=>{var u,p;return(p=(u=n.value)==null?void 0:u.firstElementChild)!=null?p:null}),d),()=>{var u,p;if(!t)return null;const{isAutoWidth:h}=e;if(h){const v=o==null?void 0:o.autoLabelWidth,m=r==null?void 0:r.hasLabel,f={};if(m&&v&&v!=="auto"){const _=Math.max(0,Number.parseInt(v,10)-a.value),g=o.labelPosition==="left"?"marginRight":"marginLeft";_&&(f[g]=`${_}px`)}return te("div",{ref:n,class:[l.be("item","label-wrap")],style:f},[(u=t.default)==null?void 0:u.call(t)])}else return te(Qe,{ref:n},[(p=t.default)==null?void 0:p.call(t)])}}});const IU=["role","aria-labelledby"],OU=N({...N({name:"ElFormItem"}),props:AU,setup(e,{expose:t}){const o=e,r=Do(),l=Ge(Ka,void 0),n=Ge(Hl,void 0),a=So(void 0,{formItem:!1}),i=ze("form-item"),c=Qo().value,d=D([]),u=D(""),p=eE(u,100),h=D(""),v=D();let m,f=!1;const _=C(()=>{if((l==null?void 0:l.labelPosition)==="top")return{};const _e=go(o.labelWidth||(l==null?void 0:l.labelWidth)||"");return _e?{width:_e}:{}}),g=C(()=>{if((l==null?void 0:l.labelPosition)==="top"||l!=null&&l.inline)return{};if(!o.label&&!o.labelWidth&&R)return{};const _e=go(o.labelWidth||(l==null?void 0:l.labelWidth)||"");return!o.label&&!r.label?{marginLeft:_e}:{}}),y=C(()=>[i.b(),i.m(a.value),i.is("error",u.value==="error"),i.is("validating",u.value==="validating"),i.is("success",u.value==="success"),i.is("required",J.value||o.required),i.is("no-asterisk",l==null?void 0:l.hideRequiredAsterisk),(l==null?void 0:l.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[i.m("feedback")]:l==null?void 0:l.statusIcon}]),w=C(()=>Co(o.inlineMessage)?o.inlineMessage:(l==null?void 0:l.inlineMessage)||!1),x=C(()=>[i.e("error"),{[i.em("error","inline")]:w.value}]),$=C(()=>o.prop?ut(o.prop)?o.prop:o.prop.join("."):""),T=C(()=>!!(o.label||r.label)),L=C(()=>o.for||(d.value.length===1?d.value[0]:void 0)),P=C(()=>!L.value&&T.value),R=!!n,V=C(()=>{const _e=l==null?void 0:l.model;if(!(!_e||!o.prop))return Ed(_e,o.prop).value}),B=C(()=>{const{required:_e}=o,me=[];o.rules&&me.push(...Gn(o.rules));const Re=l==null?void 0:l.rules;if(Re&&o.prop){const Ce=Ed(Re,o.prop).value;Ce&&me.push(...Gn(Ce))}if(_e!==void 0){const Ce=me.map((Ee,De)=>[Ee,De]).filter(([Ee])=>Object.keys(Ee).includes("required"));if(Ce.length>0)for(const[Ee,De]of Ce)Ee.required!==_e&&(me[De]={...Ee,required:_e});else me.push({required:_e})}return me}),F=C(()=>B.value.length>0),Q=_e=>B.value.filter(Re=>!Re.trigger||!_e?!0:Array.isArray(Re.trigger)?Re.trigger.includes(_e):Re.trigger===_e).map(({trigger:Re,...Ce})=>Ce),J=C(()=>B.value.some(_e=>_e.required)),Z=C(()=>{var _e;return p.value==="error"&&o.showMessage&&((_e=l==null?void 0:l.showMessage)!=null?_e:!0)}),H=C(()=>`${o.label||""}${(l==null?void 0:l.labelSuffix)||""}`),j=_e=>{u.value=_e},K=_e=>{var me,Re;const{errors:Ce,fields:Ee}=_e;(!Ce||!Ee)&&console.error(_e),j("error"),h.value=Ce?(Re=(me=Ce==null?void 0:Ce[0])==null?void 0:me.message)!=null?Re:`${o.prop} is required`:"",l==null||l.emit("validate",o.prop,!1,h.value)},I=()=>{j("success"),l==null||l.emit("validate",o.prop,!0,"")},U=async _e=>{const me=$.value;return new Ic({[me]:_e}).validate({[me]:V.value},{firstFields:!0}).then(()=>(I(),!0)).catch(Ce=>(K(Ce),Promise.reject(Ce)))},oe=async(_e,me)=>{if(f||!o.prop)return!1;const Re=it(me);if(!F.value)return me==null||me(!1),!1;const Ce=Q(_e);return Ce.length===0?(me==null||me(!0),!0):(j("validating"),U(Ce).then(()=>(me==null||me(!0),!0)).catch(Ee=>{const{fields:De}=Ee;return me==null||me(!1,De),Re?!1:Promise.reject(De)}))},ne=()=>{j(""),h.value="",f=!1},ce=async()=>{const _e=l==null?void 0:l.model;if(!_e||!o.prop)return;const me=Ed(_e,o.prop);f=!0,me.value=s3(m),await et(),ne(),f=!1},ee=_e=>{d.value.includes(_e)||d.value.push(_e)},Me=_e=>{d.value=d.value.filter(me=>me!==_e)};Se(()=>o.error,_e=>{h.value=_e||"",j(_e?"error":"")},{immediate:!0}),Se(()=>o.validateStatus,_e=>j(_e||""));const de=Dt({...Bo(o),$el:v,size:a,validateState:u,labelId:c,inputIds:d,isGroup:P,hasLabel:T,fieldValue:V,addInputId:ee,removeInputId:Me,resetField:ce,clearValidate:ne,validate:oe});return zt(Hl,de),ft(()=>{o.prop&&(l==null||l.addField(de),m=s3(V.value))}),to(()=>{l==null||l.removeField(de)}),t({size:a,validateMessage:h,validateState:u,validate:oe,clearValidate:ne,resetField:ce}),(_e,me)=>{var Re;return b(),M("div",{ref_key:"formItemRef",ref:v,class:O(s(y)),role:s(P)?"group":void 0,"aria-labelledby":s(P)?s(c):void 0},[te(s(zU),{"is-auto-width":s(_).width==="auto","update-all":((Re=s(l))==null?void 0:Re.labelWidth)==="auto"},{default:le(()=>[s(T)?(b(),he(Et(s(L)?"label":"div"),{key:0,id:s(c),for:s(L),class:O(s(i).e("label")),style:Je(s(_))},{default:le(()=>[be(_e.$slots,"label",{label:s(H)},()=>[Ct($e(s(H)),1)])]),_:3},8,["id","for","class","style"])):se("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),E("div",{class:O(s(i).e("content")),style:Je(s(g))},[be(_e.$slots,"default"),te(z1,{name:`${s(i).namespace.value}-zoom-in-top`},{default:le(()=>[s(Z)?be(_e.$slots,"error",{key:0,error:h.value},()=>[E("div",{class:O(s(x))},$e(h.value),3)]):se("v-if",!0)]),_:3},8,["name"])],6)],10,IU)}}});var h4=Le(OU,[["__file","form-item.vue"]]);const NU=yt(KK,{FormItem:h4}),PU=co(h4);let _l;const RU=` height:0 !important; visibility:hidden !important; - ${i_()?"":"overflow:hidden !important;"} + ${a_()?"":"overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; -`,BU=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function VU(e){const t=window.getComputedStyle(e),o=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),l=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:BU.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:l,boxSizing:o}}function m4(e,t=1,o){var r;_l||(_l=document.createElement("textarea"),document.body.appendChild(_l));const{paddingSize:l,borderSize:n,boxSizing:a,contextStyle:i}=VU(e);_l.setAttribute("style",`${i};${LU}`),_l.value=e.value||e.placeholder||"";let c=_l.scrollHeight;const d={};a==="border-box"?c=c+n:a==="content-box"&&(c=c-l),_l.value="";const u=_l.scrollHeight-l;if(st(t)){let p=u*t;a==="border-box"&&(p=p+l+n),c=Math.max(p,c),d.minHeight=`${p}px`}if(st(o)){let p=u*o;a==="border-box"&&(p=p+l+n),c=Math.min(p,c)}return d.height=`${c}px`,(r=_l.parentNode)==null||r.removeChild(_l),_l=void 0,d}const DU=Pe({id:{type:String,default:void 0},size:Oo,disabled:Boolean,modelValue:{type:ue([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ue([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:Xt},prefixIcon:{type:Xt},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ue([Object,Array,String]),default:()=>uo({})},autofocus:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),HU={[St]:e=>ut(e),input:e=>ut(e),change:e=>ut(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},FU=["role"],jU=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],KU=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],UU=N({...N({name:"ElInput",inheritAttrs:!1}),props:DU,emits:HU,setup(e,{expose:t,emit:o}){const r=e,l=ya(),n=Do(),a=C(()=>{const ye={};return r.containerRole==="combobox"&&(ye["aria-haspopup"]=l["aria-haspopup"],ye["aria-owns"]=l["aria-owns"],ye["aria-expanded"]=l["aria-expanded"]),ye}),i=C(()=>[r.type==="textarea"?_.b():f.b(),f.m(v.value),f.is("disabled",m.value),f.is("exceed",Q.value),{[f.b("group")]:n.prepend||n.append,[f.m("prefix")]:n.prefix||r.prefixIcon,[f.m("suffix")]:n.suffix||r.suffixIcon||r.clearable||r.showPassword,[f.bm("suffix","password-clear")]:U.value&&oe.value,[f.b("hidden")]:r.type==="hidden"},l.class]),c=C(()=>[f.e("wrapper"),f.is("focus",V.value)]),d=kh({excludeKeys:C(()=>Object.keys(a.value))}),{form:u,formItem:p}=sr(),{inputId:h}=bl(r,{formItemContext:p}),v=So(),m=xr(),f=ze("input"),_=ze("textarea"),g=lo(),y=lo(),w=D(!1),x=D(!1),$=D(!1),T=D(),R=lo(r.inputStyle),P=C(()=>g.value||y.value),{wrapperRef:L,isFocused:V,handleFocus:B,handleBlur:j}=Ud(P,{afterBlur(){var ye;r.validateEvent&&((ye=p==null?void 0:p.validate)==null||ye.call(p,"blur").catch(Ye=>void 0))}}),te=C(()=>{var ye;return(ye=u==null?void 0:u.statusIcon)!=null?ye:!1}),J=C(()=>(p==null?void 0:p.validateState)||""),Z=C(()=>J.value&&_h[J.value]),H=C(()=>$.value?X3:B3),F=C(()=>[l.style]),K=C(()=>[r.inputStyle,R.value,{resize:r.resize}]),I=C(()=>jo(r.modelValue)?"":String(r.modelValue)),U=C(()=>r.clearable&&!m.value&&!r.readonly&&!!I.value&&(V.value||w.value)),oe=C(()=>r.showPassword&&!m.value&&!r.readonly&&!!I.value&&(!!I.value||V.value)),ne=C(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!m.value&&!r.readonly&&!r.showPassword),ce=C(()=>I.value.length),Q=C(()=>!!ne.value&&ce.value>Number(r.maxlength)),Me=C(()=>!!n.suffix||!!r.suffixIcon||U.value||r.showPassword||ne.value||!!J.value&&te.value),[de,_e]=mK(g);so(y,ye=>{if(Ce(),!ne.value||r.resize!=="both")return;const Ye=ye[0],{width:tt}=Ye.contentRect;T.value={right:`calc(100% - ${tt+15+6}px)`}});const me=()=>{const{type:ye,autosize:Ye}=r;if(!(!Nt||ye!=="textarea"||!y.value))if(Ye){const tt=xt(Ye)?Ye.minRows:void 0,pt=xt(Ye)?Ye.maxRows:void 0,dt=m4(y.value,tt,pt);R.value={overflowY:"hidden",...dt},et(()=>{y.value.offsetHeight,R.value=dt})}else R.value={minHeight:m4(y.value).minHeight}},Ce=(ye=>{let Ye=!1;return()=>{var tt;if(Ye||!r.autosize)return;((tt=y.value)==null?void 0:tt.offsetParent)===null||(ye(),Ye=!0)}})(me),Ee=()=>{const ye=P.value,Ye=r.formatter?r.formatter(I.value):I.value;!ye||ye.value===Ye||(ye.value=Ye)},De=async ye=>{de();let{value:Ye}=ye.target;if(r.formatter&&(Ye=r.parser?r.parser(Ye):Ye),!x.value){if(Ye===I.value){Ee();return}o(St,Ye),o("input",Ye),await et(),Ee(),_e()}},ae=ye=>{o("change",ye.target.value)},pe=ye=>{o("compositionstart",ye),x.value=!0},ke=ye=>{var Ye;o("compositionupdate",ye);const tt=(Ye=ye.target)==null?void 0:Ye.value,pt=tt[tt.length-1]||"";x.value=!xh(pt)},Oe=ye=>{o("compositionend",ye),x.value&&(x.value=!1,De(ye))},we=()=>{$.value=!$.value,Te()},Te=async()=>{var ye;await et(),(ye=P.value)==null||ye.focus()},Ne=()=>{var ye;return(ye=P.value)==null?void 0:ye.blur()},Ie=ye=>{w.value=!1,o("mouseleave",ye)},Ae=ye=>{w.value=!0,o("mouseenter",ye)},xe=ye=>{o("keydown",ye)},We=()=>{var ye;(ye=P.value)==null||ye.select()},qe=()=>{o(St,""),o("change",""),o("clear"),o("input","")};return Se(()=>r.modelValue,()=>{var ye;et(()=>me()),r.validateEvent&&((ye=p==null?void 0:p.validate)==null||ye.call(p,"change").catch(Ye=>void 0))}),Se(I,()=>Ee()),Se(()=>r.type,async()=>{await et(),Ee(),me()}),ft(()=>{!r.formatter&&r.parser,Ee(),et(me)}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-input",ref:"https://element-plus.org/en-US/component/input.html"},C(()=>!!r.label)),t({input:g,textarea:y,ref:P,textareaStyle:K,autosize:Yt(r,"autosize"),focus:Te,blur:Ne,select:We,clear:qe,resizeTextarea:me}),(ye,Ye)=>(b(),M("div",Mt(s(a),{class:[s(i),{[s(f).bm("group","append")]:ye.$slots.append,[s(f).bm("group","prepend")]:ye.$slots.prepend}],style:s(F),role:ye.containerRole,onMouseenter:Ae,onMouseleave:Ie}),[se(" input "),ye.type!=="textarea"?(b(),M(Qe,{key:0},[se(" prepend slot "),ye.$slots.prepend?(b(),M("div",{key:0,class:O(s(f).be("group","prepend"))},[be(ye.$slots,"prepend")],2)):se("v-if",!0),E("div",{ref_key:"wrapperRef",ref:L,class:O(s(c))},[se(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(b(),M("span",{key:0,class:O(s(f).e("prefix"))},[E("span",{class:O(s(f).e("prefix-inner"))},[be(ye.$slots,"prefix"),ye.prefixIcon?(b(),he(s(Ze),{key:0,class:O(s(f).e("icon"))},{default:le(()=>[(b(),he(Et(ye.prefixIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)):se("v-if",!0),E("input",Mt({id:s(h),ref_key:"input",ref:g,class:s(f).e("inner")},s(d),{minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?$.value?"text":"password":ye.type,disabled:s(m),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.label||ye.ariaLabel,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,onCompositionstart:pe,onCompositionupdate:ke,onCompositionend:Oe,onInput:De,onFocus:Ye[0]||(Ye[0]=(...tt)=>s(B)&&s(B)(...tt)),onBlur:Ye[1]||(Ye[1]=(...tt)=>s(j)&&s(j)(...tt)),onChange:ae,onKeydown:xe}),null,16,jU),se(" suffix slot "),s(Me)?(b(),M("span",{key:1,class:O(s(f).e("suffix"))},[E("span",{class:O(s(f).e("suffix-inner"))},[!s(U)||!s(oe)||!s(ne)?(b(),M(Qe,{key:0},[be(ye.$slots,"suffix"),ye.suffixIcon?(b(),he(s(Ze),{key:0,class:O(s(f).e("icon"))},{default:le(()=>[(b(),he(Et(ye.suffixIcon)))]),_:1},8,["class"])):se("v-if",!0)],64)):se("v-if",!0),s(U)?(b(),he(s(Ze),{key:1,class:O([s(f).e("icon"),s(f).e("clear")]),onMousedown:ct(s(Wt),["prevent"]),onClick:qe},{default:le(()=>[ee(s(hn))]),_:1},8,["class","onMousedown"])):se("v-if",!0),s(oe)?(b(),he(s(Ze),{key:2,class:O([s(f).e("icon"),s(f).e("password")]),onClick:we},{default:le(()=>[(b(),he(Et(s(H))))]),_:1},8,["class"])):se("v-if",!0),s(ne)?(b(),M("span",{key:3,class:O(s(f).e("count"))},[E("span",{class:O(s(f).e("count-inner"))},$e(s(ce))+" / "+$e(ye.maxlength),3)],2)):se("v-if",!0),s(J)&&s(Z)&&s(te)?(b(),he(s(Ze),{key:4,class:O([s(f).e("icon"),s(f).e("validateIcon"),s(f).is("loading",s(J)==="validating")])},{default:le(()=>[(b(),he(Et(s(Z))))]),_:1},8,["class"])):se("v-if",!0)],2)],2)):se("v-if",!0)],2),se(" append slot "),ye.$slots.append?(b(),M("div",{key:1,class:O(s(f).be("group","append"))},[be(ye.$slots,"append")],2)):se("v-if",!0)],64)):(b(),M(Qe,{key:1},[se(" textarea "),E("textarea",Mt({id:s(h),ref_key:"textarea",ref:y,class:[s(_).e("inner"),s(f).is("focus",s(V))]},s(d),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:s(m),readonly:ye.readonly,autocomplete:ye.autocomplete,style:s(K),"aria-label":ye.label||ye.ariaLabel,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,onCompositionstart:pe,onCompositionupdate:ke,onCompositionend:Oe,onInput:De,onFocus:Ye[2]||(Ye[2]=(...tt)=>s(B)&&s(B)(...tt)),onBlur:Ye[3]||(Ye[3]=(...tt)=>s(j)&&s(j)(...tt)),onChange:ae,onKeydown:xe}),null,16,KU),s(ne)?(b(),M("span",{key:0,style:Je(T.value),class:O(s(f).e("count"))},$e(s(ce))+" / "+$e(ye.maxlength),7)):se("v-if",!0)],64))],16,FU))}});var WU=Le(UU,[["__file","input.vue"]]);const cr=yt(WU),Qi=4,g4={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},qU=({move:e,size:t,bar:o})=>({[o.size]:t,transform:`translate${o.axis}(${e}%)`}),rv=Symbol("scrollbarContextKey"),YU=Pe({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),GU="Thumb";var b4=Le(N({__name:"thumb",props:YU,setup(e){const t=e,o=Ge(rv),r=ze("scrollbar");o||Io(GU,"can not inject scrollbar context");const l=D(),n=D(),a=D({}),i=D(!1);let c=!1,d=!1,u=Nt?document.onselectstart:null;const p=C(()=>g4[t.vertical?"vertical":"horizontal"]),h=C(()=>qU({size:t.size,move:t.move,bar:p.value})),v=C(()=>l.value[p.value.offset]**2/o.wrapElement[p.value.scrollSize]/t.ratio/n.value[p.value.offset]),m=T=>{var R;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(R=window.getSelection())==null||R.removeAllRanges(),_(T);const P=T.currentTarget;P&&(a.value[p.value.axis]=P[p.value.offset]-(T[p.value.client]-P.getBoundingClientRect()[p.value.direction]))},f=T=>{if(!n.value||!l.value||!o.wrapElement)return;const R=Math.abs(T.target.getBoundingClientRect()[p.value.direction]-T[p.value.client]),P=n.value[p.value.offset]/2,L=(R-P)*100*v.value/l.value[p.value.offset];o.wrapElement[p.value.scroll]=L*o.wrapElement[p.value.scrollSize]/100},_=T=>{T.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),u=document.onselectstart,document.onselectstart=()=>!1},g=T=>{if(!l.value||!n.value||c===!1)return;const R=a.value[p.value.axis];if(!R)return;const P=(l.value.getBoundingClientRect()[p.value.direction]-T[p.value.client])*-1,L=n.value[p.value.offset]-R,V=(P-L)*100*v.value/l.value[p.value.offset];o.wrapElement[p.value.scroll]=V*o.wrapElement[p.value.scrollSize]/100},y=()=>{c=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",y),$(),d&&(i.value=!1)},w=()=>{d=!1,i.value=!!t.size},x=()=>{d=!0,i.value=c};to(()=>{$(),document.removeEventListener("mouseup",y)});const $=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return oo(Yt(o,"scrollbarElement"),"mousemove",w),oo(Yt(o,"scrollbarElement"),"mouseleave",x),(T,R)=>(b(),he(Mo,{name:s(r).b("fade"),persisted:""},{default:le(()=>[mt(E("div",{ref_key:"instance",ref:l,class:O([s(r).e("bar"),s(r).is(s(p).key)]),onMousedown:f},[E("div",{ref_key:"thumb",ref:n,class:O(s(r).e("thumb")),style:Je(s(h)),onMousedown:m},null,38)],34),[[Lt,T.always||i.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const XU=Pe({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var ZU=Le(N({__name:"bar",props:XU,setup(e,{expose:t}){const o=e,r=Ge(rv),l=D(0),n=D(0),a=D(""),i=D(""),c=D(1),d=D(1);return t({handleScroll:h=>{if(h){const v=h.offsetHeight-Qi,m=h.offsetWidth-Qi;n.value=h.scrollTop*100/v*c.value,l.value=h.scrollLeft*100/m*d.value}},update:()=>{const h=r==null?void 0:r.wrapElement;if(!h)return;const v=h.offsetHeight-Qi,m=h.offsetWidth-Qi,f=v**2/h.scrollHeight,_=m**2/h.scrollWidth,g=Math.max(f,o.minSize),y=Math.max(_,o.minSize);c.value=f/(v-f)/(g/(v-g)),d.value=_/(m-_)/(y/(m-y)),i.value=g+Qi(b(),M(Qe,null,[ee(b4,{move:l.value,ratio:d.value,size:a.value,always:h.always},null,8,["move","ratio","size","always"]),ee(b4,{move:n.value,ratio:c.value,size:i.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const JU=Pe({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:ue([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,...Zo(["ariaLabel","ariaOrientation"])}),QU=N({...N({name:"ElScrollbar"}),props:JU,emits:{scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(st)},setup(e,{expose:t,emit:o}){const r=e,l=ze("scrollbar");let n,a;const i=D(),c=D(),d=D(),u=D(),p=C(()=>{const w={};return r.height&&(w.height=mo(r.height)),r.maxHeight&&(w.maxHeight=mo(r.maxHeight)),[r.wrapStyle,w]}),h=C(()=>[r.wrapClass,l.e("wrap"),{[l.em("wrap","hidden-default")]:!r.native}]),v=C(()=>[l.e("view"),r.viewClass]),m=()=>{var w;c.value&&((w=u.value)==null||w.handleScroll(c.value),o("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function f(w,x){xt(w)?c.value.scrollTo(w):st(w)&&st(x)&&c.value.scrollTo(w,x)}const _=w=>{st(w)&&(c.value.scrollTop=w)},g=w=>{st(w)&&(c.value.scrollLeft=w)},y=()=>{var w;(w=u.value)==null||w.update()};return Se(()=>r.noresize,w=>{w?(n==null||n(),a==null||a()):({stop:n}=so(d,y),a=oo("resize",y))},{immediate:!0}),Se(()=>[r.maxHeight,r.height],()=>{r.native||et(()=>{var w;y(),c.value&&((w=u.value)==null||w.handleScroll(c.value))})}),zt(rv,Dt({scrollbarElement:i,wrapElement:c})),ft(()=>{r.native||et(()=>{y()})}),rn(()=>y()),t({wrapRef:c,update:y,scrollTo:f,setScrollTop:_,setScrollLeft:g,handleScroll:m}),(w,x)=>(b(),M("div",{ref_key:"scrollbarRef",ref:i,class:O(s(l).b())},[E("div",{ref_key:"wrapRef",ref:c,class:O(s(h)),style:Je(s(p)),onScroll:m},[(b(),he(Et(w.tag),{id:w.id,ref_key:"resizeRef",ref:d,class:O(s(v)),style:Je(w.viewStyle),role:w.role,"aria-label":w.ariaLabel,"aria-orientation":w.ariaOrientation},{default:le(()=>[be(w.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),w.native?se("v-if",!0):(b(),he(ZU,{key:0,ref_key:"barRef",ref:u,always:w.always,"min-size":w.minSize},null,8,["always","min-size"]))],2))}});var eW=Le(QU,[["__file","scrollbar.vue"]]);const wn=yt(eW),lv=Symbol("popper"),_4=Symbol("popperContent"),w4=Pe({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),tW=N({...N({name:"ElPopper",inheritAttrs:!1}),props:w4,setup(e,{expose:t}){const o=e,r=D(),l=D(),n=D(),a=D(),i=C(()=>o.role),c={triggerRef:r,popperInstanceRef:l,contentRef:n,referenceRef:a,role:i};return t(c),zt(lv,c),(d,u)=>be(d.$slots,"default")}});var oW=Le(tW,[["__file","popper.vue"]]);const y4=Pe({arrowOffset:{type:Number,default:5}}),rW=N({...N({name:"ElPopperArrow",inheritAttrs:!1}),props:y4,setup(e,{expose:t}){const o=e,r=ze("popper"),{arrowOffset:l,arrowRef:n,arrowStyle:a}=Ge(_4,void 0);return Se(()=>o.arrowOffset,i=>{l.value=i}),to(()=>{n.value=void 0}),t({arrowRef:n}),(i,c)=>(b(),M("span",{ref_key:"arrowRef",ref:n,class:O(s(r).e("arrow")),style:Je(s(a)),"data-popper-arrow":""},null,6))}});var lW=Le(rW,[["__file","arrow.vue"]]);const x4=N({name:"ElOnlyChild",setup(e,{slots:t,attrs:o}){var r;const l=Ge(O6),n=Ij((r=l==null?void 0:l.setForwardRef)!=null?r:Wt);return()=>{var a;const i=(a=t.default)==null?void 0:a.call(t,o);if(!i||i.length>1)return null;const c=k4(i);return c?mt(nn(c,o),[[n]]):null}}});function k4(e){if(!e)return null;const t=e;for(const o of t){if(xt(o))switch(o.type){case Jo:continue;case vi:case"svg":return C4(o);case Qe:return k4(o.children);default:return o}return C4(o)}return null}function C4(e){const t=ze("only-child");return ee("span",{class:t.e("content")},[e])}const S4=Pe({virtualRef:{type:ue(Object)},virtualTriggering:Boolean,onMouseenter:{type:ue(Function)},onMouseleave:{type:ue(Function)},onClick:{type:ue(Function)},onKeydown:{type:ue(Function)},onFocus:{type:ue(Function)},onBlur:{type:ue(Function)},onContextmenu:{type:ue(Function)},id:String,open:Boolean}),nW=N({...N({name:"ElPopperTrigger",inheritAttrs:!1}),props:S4,setup(e,{expose:t}){const o=e,{role:r,triggerRef:l}=Ge(lv,void 0);zj(l);const n=C(()=>i.value?o.id:void 0),a=C(()=>{if(r&&r.value==="tooltip")return o.open&&o.id?o.id:void 0}),i=C(()=>{if(r&&r.value!=="tooltip")return r.value}),c=C(()=>i.value?`${o.open}`:void 0);let d;return ft(()=>{Se(()=>o.virtualRef,u=>{u&&(l.value=$r(u))},{immediate:!0}),Se(l,(u,p)=>{d==null||d(),d=void 0,Gr(u)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(h=>{var v;const m=o[h];m&&(u.addEventListener(h.slice(2).toLowerCase(),m),(v=p==null?void 0:p.removeEventListener)==null||v.call(p,h.slice(2).toLowerCase(),m))}),d=Se([n,a,i,c],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((v,m)=>{jo(h[m])?u.removeAttribute(v):u.setAttribute(v,h[m])})},{immediate:!0})),Gr(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>p.removeAttribute(h))},{immediate:!0})}),to(()=>{d==null||d(),d=void 0}),t({triggerRef:l}),(u,p)=>u.virtualTriggering?se("v-if",!0):(b(),he(s(x4),Mt({key:0},u.$attrs,{"aria-controls":s(n),"aria-describedby":s(a),"aria-expanded":s(c),"aria-haspopup":s(i)}),{default:le(()=>[be(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var aW=Le(nW,[["__file","trigger.vue"]]);const nv="focus-trap.focus-after-trapped",av="focus-trap.focus-after-released",iW="focus-trap.focusout-prevented",E4={cancelable:!0,bubbles:!1},sW={cancelable:!0,bubbles:!1},T4="focusAfterTrapped",$4="focusAfterReleased",iv=Symbol("elFocusTrap"),sv=D(),Qd=D(0),cv=D(0);let ep=0;const M4=e=>{const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const l=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||l?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t},A4=(e,t)=>{for(const o of e)if(!cW(o,t))return o},cW=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},uW=e=>{const t=M4(e),o=A4(t,e),r=A4(t.reverse(),e);return[o,r]},dW=e=>e instanceof HTMLInputElement&&"select"in e,ra=(e,t)=>{if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),cv.value=window.performance.now(),e!==o&&dW(e)&&t&&e.select()}};function z4(e,t){const o=[...e],r=e.indexOf(t);return r!==-1&&o.splice(r,1),o}const pW=()=>{let e=[];return{push:r=>{const l=e[0];l&&r!==l&&l.pause(),e=z4(e,r),e.unshift(r)},remove:r=>{var l,n;e=z4(e,r),(n=(l=e[0])==null?void 0:l.resume)==null||n.call(l)}}},fW=(e,t=!1)=>{const o=document.activeElement;for(const r of e)if(ra(r,t),document.activeElement!==o)return},I4=pW(),hW=()=>Qd.value>cv.value,tp=()=>{sv.value="pointer",Qd.value=window.performance.now()},O4=()=>{sv.value="keyboard",Qd.value=window.performance.now()},vW=()=>(ft(()=>{ep===0&&(document.addEventListener("mousedown",tp),document.addEventListener("touchstart",tp),document.addEventListener("keydown",O4)),ep++}),to(()=>{ep--,ep<=0&&(document.removeEventListener("mousedown",tp),document.removeEventListener("touchstart",tp),document.removeEventListener("keydown",O4))}),{focusReason:sv,lastUserFocusTimestamp:Qd,lastAutomatedFocusTimestamp:cv}),op=e=>new CustomEvent(iW,{...sW,detail:e}),mW=N({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[T4,$4,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const o=D();let r,l;const{focusReason:n}=vW();Ej(m=>{e.trapped&&!a.paused&&t("release-requested",m)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},i=m=>{if(!e.loop&&!e.trapped||a.paused)return;const{key:f,altKey:_,ctrlKey:g,metaKey:y,currentTarget:w,shiftKey:x}=m,{loop:$}=e,T=f===lt.tab&&!_&&!g&&!y,R=document.activeElement;if(T&&R){const P=w,[L,V]=uW(P);if(L&&V){if(!x&&R===V){const j=op({focusReason:n.value});t("focusout-prevented",j),j.defaultPrevented||(m.preventDefault(),$&&ra(L,!0))}else if(x&&[L,P].includes(R)){const j=op({focusReason:n.value});t("focusout-prevented",j),j.defaultPrevented||(m.preventDefault(),$&&ra(V,!0))}}else if(R===P){const j=op({focusReason:n.value});t("focusout-prevented",j),j.defaultPrevented||m.preventDefault()}}};zt(iv,{focusTrapRef:o,onKeydown:i}),Se(()=>e.focusTrapEl,m=>{m&&(o.value=m)},{immediate:!0}),Se([o],([m],[f])=>{m&&(m.addEventListener("keydown",i),m.addEventListener("focusin",u),m.addEventListener("focusout",p)),f&&(f.removeEventListener("keydown",i),f.removeEventListener("focusin",u),f.removeEventListener("focusout",p))});const c=m=>{t(T4,m)},d=m=>t($4,m),u=m=>{const f=s(o);if(!f)return;const _=m.target,g=m.relatedTarget,y=_&&f.contains(_);e.trapped||g&&f.contains(g)||(r=g),y&&t("focusin",m),!a.paused&&e.trapped&&(y?l=_:ra(l,!0))},p=m=>{const f=s(o);if(!(a.paused||!f))if(e.trapped){const _=m.relatedTarget;!jo(_)&&!f.contains(_)&&setTimeout(()=>{if(!a.paused&&e.trapped){const g=op({focusReason:n.value});t("focusout-prevented",g),g.defaultPrevented||ra(l,!0)}},0)}else{const _=m.target;_&&f.contains(_)||t("focusout",m)}};async function h(){await et();const m=s(o);if(m){I4.push(a);const f=m.contains(document.activeElement)?r:document.activeElement;if(r=f,!m.contains(f)){const g=new Event(nv,E4);m.addEventListener(nv,c),m.dispatchEvent(g),g.defaultPrevented||et(()=>{let y=e.focusStartEl;ut(y)||(ra(y),document.activeElement!==y&&(y="first")),y==="first"&&fW(M4(m),!0),(document.activeElement===f||y==="container")&&ra(m)})}}}function v(){const m=s(o);if(m){m.removeEventListener(nv,c);const f=new CustomEvent(av,{...E4,detail:{focusReason:n.value}});m.addEventListener(av,d),m.dispatchEvent(f),!f.defaultPrevented&&(n.value=="keyboard"||!hW()||m.contains(document.activeElement))&&ra(r??document.body),m.removeEventListener(av,d),I4.remove(a)}}return ft(()=>{e.trapped&&h(),Se(()=>e.trapped,m=>{m?h():v()})}),to(()=>{e.trapped&&v()}),{onKeydown:i}}});function gW(e,t,o,r,l,n){return be(e.$slots,"default",{handleKeydown:e.onKeydown})}var Nc=Le(mW,[["render",gW],["__file","focus-trap.vue"]]);const bW=["fixed","absolute"],_W=Pe({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ue(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Va,default:"bottom"},popperOptions:{type:ue(Object),default:()=>({})},strategy:{type:String,values:bW,default:"absolute"}}),N4=Pe({..._W,id:String,style:{type:ue([String,Array,Object])},className:{type:ue([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ue([String,Array,Object])},popperStyle:{type:ue([String,Array,Object])},referenceEl:{type:ue(Object)},triggerTargetEl:{type:ue(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Zo(["ariaLabel"])}),wW={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},yW=(e,t=[])=>{const{placement:o,strategy:r,popperOptions:l}=e,n={placement:o,strategy:r,...l,modifiers:[...kW(e),...t]};return CW(n,l==null?void 0:l.modifiers),n},xW=e=>{if(Nt)return $r(e)};function kW(e){const{offset:t,gpuAcceleration:o,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:o}}]}function CW(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const SW=0,EW=e=>{const{popperInstanceRef:t,contentRef:o,triggerRef:r,role:l}=Ge(lv,void 0),n=D(),a=D(),i=C(()=>({name:"eventListeners",enabled:!!e.visible})),c=C(()=>{var g;const y=s(n),w=(g=s(a))!=null?g:SW;return{name:"arrow",enabled:!C3(y),options:{element:y,padding:w}}}),d=C(()=>({onFirstUpdate:()=>{m()},...yW(e,[s(c),s(i)])})),u=C(()=>xW(e.referenceEl)||s(r)),{attributes:p,state:h,styles:v,update:m,forceUpdate:f,instanceRef:_}=xj(u,o,d);return Se(_,g=>t.value=g),ft(()=>{Se(()=>{var g;return(g=s(u))==null?void 0:g.getBoundingClientRect()},()=>{m()})}),{attributes:p,arrowRef:n,contentRef:o,instanceRef:_,state:h,styles:v,role:l,forceUpdate:f,update:m}},TW=(e,{attributes:t,styles:o,role:r})=>{const{nextZIndex:l}=Ki(),n=ze("popper"),a=C(()=>s(t).popper),i=D(st(e.zIndex)?e.zIndex:l()),c=C(()=>[n.b(),n.is("pure",e.pure),n.is(e.effect),e.popperClass]),d=C(()=>[{zIndex:s(i)},s(o).popper,e.popperStyle||{}]),u=C(()=>r.value==="dialog"?"false":void 0),p=C(()=>s(o).arrow||{});return{ariaModal:u,arrowStyle:p,contentAttrs:a,contentClass:c,contentStyle:d,contentZIndex:i,updateZIndex:()=>{i.value=st(e.zIndex)?e.zIndex:l()}}},$W=(e,t)=>{const o=D(!1),r=D();return{focusStartRef:r,trapped:o,onFocusAfterReleased:d=>{var u;((u=d.detail)==null?void 0:u.focusReason)!=="pointer"&&(r.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!o.value&&(d.target&&(r.value=d.target),o.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),o.value=!1)},onReleaseRequested:()=>{o.value=!1,t("close")}}},MW=N({...N({name:"ElPopperContent"}),props:N4,emits:wW,setup(e,{expose:t,emit:o}){const r=e,{focusStartRef:l,trapped:n,onFocusAfterReleased:a,onFocusAfterTrapped:i,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:u}=$W(r,o),{attributes:p,arrowRef:h,contentRef:v,styles:m,instanceRef:f,role:_,update:g}=EW(r),{ariaModal:y,arrowStyle:w,contentAttrs:x,contentClass:$,contentStyle:T,updateZIndex:R}=TW(r,{styles:m,attributes:p,role:_}),P=Ge(Hl,void 0),L=D();zt(_4,{arrowStyle:w,arrowRef:h,arrowOffset:L}),P&&zt(Hl,{...P,addInputId:Wt,removeInputId:Wt});let V;const B=(te=!0)=>{g(),te&&R()},j=()=>{B(!1),r.visible&&r.focusOnShow?n.value=!0:r.visible===!1&&(n.value=!1)};return ft(()=>{Se(()=>r.triggerTargetEl,(te,J)=>{V==null||V(),V=void 0;const Z=s(te||v.value),H=s(J||v.value);Gr(Z)&&(V=Se([_,()=>r.ariaLabel,y,()=>r.id],F=>{["role","aria-label","aria-modal","id"].forEach((K,I)=>{jo(F[I])?Z.removeAttribute(K):Z.setAttribute(K,F[I])})},{immediate:!0})),H!==Z&&Gr(H)&&["role","aria-label","aria-modal","id"].forEach(F=>{H.removeAttribute(F)})},{immediate:!0}),Se(()=>r.visible,j,{immediate:!0})}),to(()=>{V==null||V(),V=void 0}),t({popperContentRef:v,popperInstanceRef:f,updatePopper:B,contentStyle:T}),(te,J)=>(b(),M("div",Mt({ref_key:"contentRef",ref:v},s(x),{style:s(T),class:s($),tabindex:"-1",onMouseenter:J[0]||(J[0]=Z=>te.$emit("mouseenter",Z)),onMouseleave:J[1]||(J[1]=Z=>te.$emit("mouseleave",Z))}),[ee(s(Nc),{trapped:s(n),"trap-on-focus-in":!0,"focus-trap-el":s(v),"focus-start-el":s(l),onFocusAfterTrapped:s(i),onFocusAfterReleased:s(a),onFocusin:s(c),onFocusoutPrevented:s(d),onReleaseRequested:s(u)},{default:le(()=>[be(te.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var AW=Le(MW,[["__file","content.vue"]]);const P4=yt(oW),rp=Symbol("elTooltip"),Uo=Pe({...Mj,...N4,appendTo:{type:ue([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,visible:{type:ue(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Zo(["ariaLabel"])}),Pc=Pe({...S4,disabled:Boolean,trigger:{type:ue([String,Array]),default:"hover"},triggerKeys:{type:ue(Array),default:()=>[lt.enter,lt.space]}}),{useModelToggleProps:zW,useModelToggleEmits:IW,useModelToggle:OW}=a6("visible"),NW=Pe({...w4,...zW,...Uo,...Pc,...y4,showArrow:{type:Boolean,default:!0}}),PW=[...IW,"before-show","before-hide","show","hide","open","close"],RW=(e,t)=>Ke(e)?e.includes(t):e===t,es=(e,t,o)=>r=>{RW(s(e),t)&&o(r)},LW=N({...N({name:"ElTooltipTrigger"}),props:Pc,setup(e,{expose:t}){const o=e,r=ze("tooltip"),{controlled:l,id:n,open:a,onOpen:i,onClose:c,onToggle:d}=Ge(rp,void 0),u=D(null),p=()=>{if(s(l)||o.disabled)return!0},h=Yt(o,"trigger"),v=ho(p,es(h,"hover",i)),m=ho(p,es(h,"hover",c)),f=ho(p,es(h,"click",x=>{x.button===0&&d(x)})),_=ho(p,es(h,"focus",i)),g=ho(p,es(h,"focus",c)),y=ho(p,es(h,"contextmenu",x=>{x.preventDefault(),d(x)})),w=ho(p,x=>{const{code:$}=x;o.triggerKeys.includes($)&&(x.preventDefault(),d(x))});return t({triggerRef:u}),(x,$)=>(b(),he(s(aW),{id:s(n),"virtual-ref":x.virtualRef,open:s(a),"virtual-triggering":x.virtualTriggering,class:O(s(r).e("trigger")),onBlur:s(g),onClick:s(f),onContextmenu:s(y),onFocus:s(_),onMouseenter:s(v),onMouseleave:s(m),onKeydown:s(w)},{default:le(()=>[be(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var BW=Le(LW,[["__file","trigger.vue"]]);const VW=N({...N({name:"ElTooltipContent",inheritAttrs:!1}),props:Uo,setup(e,{expose:t}){const o=e,{selector:r}=I6(),l=ze("tooltip"),n=D(null),a=D(!1),{controlled:i,id:c,open:d,trigger:u,onClose:p,onOpen:h,onShow:v,onHide:m,onBeforeShow:f,onBeforeHide:_}=Ge(rp,void 0),g=C(()=>o.transition||`${l.namespace.value}-fade-in-linear`),y=C(()=>o.persistent);to(()=>{a.value=!0});const w=C(()=>s(y)?!0:s(d)),x=C(()=>o.disabled?!1:s(d)),$=C(()=>o.appendTo||r.value),T=C(()=>{var F;return(F=o.style)!=null?F:{}}),R=C(()=>!s(d)),P=()=>{m()},L=()=>{if(s(i))return!0},V=ho(L,()=>{o.enterable&&s(u)==="hover"&&h()}),B=ho(L,()=>{s(u)==="hover"&&p()}),j=()=>{var F,K;(K=(F=n.value)==null?void 0:F.updatePopper)==null||K.call(F),f==null||f()},te=()=>{_==null||_()},J=()=>{v(),H=I0(C(()=>{var F;return(F=n.value)==null?void 0:F.popperContentRef}),()=>{if(s(i))return;s(u)!=="hover"&&p()})},Z=()=>{o.virtualTriggering||p()};let H;return Se(()=>s(d),F=>{F||H==null||H()},{flush:"post"}),Se(()=>o.content,()=>{var F,K;(K=(F=n.value)==null?void 0:F.updatePopper)==null||K.call(F)}),t({contentRef:n}),(F,K)=>(b(),he(hi,{disabled:!F.teleported,to:s($)},[ee(Mo,{name:s(g),onAfterLeave:P,onBeforeEnter:j,onAfterEnter:J,onBeforeLeave:te},{default:le(()=>[s(w)?mt((b(),he(s(AW),Mt({key:0,id:s(c),ref_key:"contentRef",ref:n},F.$attrs,{"aria-label":F.ariaLabel,"aria-hidden":s(R),"boundaries-padding":F.boundariesPadding,"fallback-placements":F.fallbackPlacements,"gpu-acceleration":F.gpuAcceleration,offset:F.offset,placement:F.placement,"popper-options":F.popperOptions,strategy:F.strategy,effect:F.effect,enterable:F.enterable,pure:F.pure,"popper-class":F.popperClass,"popper-style":[F.popperStyle,s(T)],"reference-el":F.referenceEl,"trigger-target-el":F.triggerTargetEl,visible:s(x),"z-index":F.zIndex,onMouseenter:s(V),onMouseleave:s(B),onBlur:Z,onClose:s(p)}),{default:le(()=>[a.value?se("v-if",!0):be(F.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Lt,s(x)]]):se("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var DW=Le(VW,[["__file","content.vue"]]);const HW=["innerHTML"],FW={key:1},jW=N({...N({name:"ElTooltip"}),props:NW,emits:PW,setup(e,{expose:t,emit:o}){const r=e;$j();const l=Qo(),n=D(),a=D(),i=()=>{var g;const y=s(n);y&&((g=y.popperInstanceRef)==null||g.update())},c=D(!1),d=D(),{show:u,hide:p,hasUpdateHandler:h}=OW({indicator:c,toggleReason:d}),{onOpen:v,onClose:m}=Aj({showAfter:Yt(r,"showAfter"),hideAfter:Yt(r,"hideAfter"),autoClose:Yt(r,"autoClose"),open:u,close:p}),f=C(()=>Co(r.visible)&&!h.value);zt(rp,{controlled:f,id:l,open:ui(c),trigger:Yt(r,"trigger"),onOpen:g=>{v(g)},onClose:g=>{m(g)},onToggle:g=>{s(c)?m(g):v(g)},onShow:()=>{o("show",d.value)},onHide:()=>{o("hide",d.value)},onBeforeShow:()=>{o("before-show",d.value)},onBeforeHide:()=>{o("before-hide",d.value)},updatePopper:i}),Se(()=>r.disabled,g=>{g&&c.value&&(c.value=!1)});const _=g=>{var y,w;const x=(w=(y=a.value)==null?void 0:y.contentRef)==null?void 0:w.popperContentRef,$=(g==null?void 0:g.relatedTarget)||document.activeElement;return x&&x.contains($)};return jg(()=>c.value&&p()),t({popperRef:n,contentRef:a,isFocusInsideContent:_,updatePopper:i,onOpen:v,onClose:m,hide:p}),(g,y)=>(b(),he(s(P4),{ref_key:"popperRef",ref:n,role:g.role},{default:le(()=>[ee(BW,{disabled:g.disabled,trigger:g.trigger,"trigger-keys":g.triggerKeys,"virtual-ref":g.virtualRef,"virtual-triggering":g.virtualTriggering},{default:le(()=>[g.$slots.default?be(g.$slots,"default",{key:0}):se("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),ee(DW,{ref_key:"contentRef",ref:a,"aria-label":g.ariaLabel,"boundaries-padding":g.boundariesPadding,content:g.content,disabled:g.disabled,effect:g.effect,enterable:g.enterable,"fallback-placements":g.fallbackPlacements,"hide-after":g.hideAfter,"gpu-acceleration":g.gpuAcceleration,offset:g.offset,persistent:g.persistent,"popper-class":g.popperClass,"popper-style":g.popperStyle,placement:g.placement,"popper-options":g.popperOptions,pure:g.pure,"raw-content":g.rawContent,"reference-el":g.referenceEl,"trigger-target-el":g.triggerTargetEl,"show-after":g.showAfter,strategy:g.strategy,teleported:g.teleported,transition:g.transition,"virtual-triggering":g.virtualTriggering,"z-index":g.zIndex,"append-to":g.appendTo},{default:le(()=>[be(g.$slots,"content",{},()=>[g.rawContent?(b(),M("span",{key:0,innerHTML:g.content},null,8,HW)):(b(),M("span",FW,$e(g.content),1))]),g.showArrow?(b(),he(s(lW),{key:0,"arrow-offset":g.arrowOffset},null,8,["arrow-offset"])):se("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var KW=Le(jW,[["__file","tooltip.vue"]]);const ur=yt(KW),UW=Pe({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:ue(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:ue([Function,Array]),default:Wt},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:Uo.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...Zo(["ariaLabel"])}),WW={[St]:e=>ut(e),[yr]:e=>ut(e),[ro]:e=>ut(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>xt(e)},qW=["aria-expanded","aria-owns"],YW={key:0},GW=["id","aria-selected","onClick"],R4="ElAutocomplete",XW=N({...N({name:R4,inheritAttrs:!1}),props:UW,emits:WW,setup(e,{expose:t,emit:o}){const r=e,l=kh(),n=ya(),a=xr(),i=ze("autocomplete"),c=D(),d=D(),u=D(),p=D();let h=!1,v=!1;const m=D([]),f=D(-1),_=D(""),g=D(!1),y=D(!1),w=D(!1),x=Qo(),$=C(()=>n.style),T=C(()=>(m.value.length>0||w.value)&&g.value),R=C(()=>!r.hideLoading&&w.value),P=C(()=>c.value?Array.from(c.value.$el.querySelectorAll("input")):[]),L=()=>{T.value&&(_.value=`${c.value.$el.offsetWidth}px`)},V=()=>{f.value=-1},j=Mr(async de=>{if(y.value)return;const _e=me=>{w.value=!1,!y.value&&(Ke(me)?(m.value=me,f.value=r.highlightFirstItem?0:-1):Io(R4,"autocomplete suggestions must be an array"))};if(w.value=!0,Ke(r.fetchSuggestions))_e(r.fetchSuggestions);else{const me=await r.fetchSuggestions(de,_e);Ke(me)&&_e(me)}},r.debounce),te=de=>{const _e=!!de;if(o(yr,de),o(St,de),y.value=!1,g.value||(g.value=_e),!r.triggerOnFocus&&!de){y.value=!0,m.value=[];return}j(de)},J=de=>{var _e;a.value||(((_e=de.target)==null?void 0:_e.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},Z=de=>{o(ro,de)},H=de=>{v?v=!1:(g.value=!0,o("focus",de),r.triggerOnFocus&&!h&&j(String(r.modelValue)))},F=de=>{setTimeout(()=>{var _e;if((_e=u.value)!=null&&_e.isFocusInsideContent()){v=!0;return}g.value&&oe(),o("blur",de)})},K=()=>{g.value=!1,o(St,""),o("clear")},I=async()=>{T.value&&f.value>=0&&f.value{T.value&&(de.preventDefault(),de.stopPropagation(),oe())},oe=()=>{g.value=!1},ne=()=>{var de;(de=c.value)==null||de.focus()},ce=()=>{var de;(de=c.value)==null||de.blur()},Q=async de=>{o(yr,de[r.valueKey]),o(St,de[r.valueKey]),o("select",de),m.value=[],f.value=-1},Me=de=>{if(!T.value||w.value)return;if(de<0){f.value=-1;return}de>=m.value.length&&(de=m.value.length-1);const _e=d.value.querySelector(`.${i.be("suggestion","wrap")}`),Re=_e.querySelectorAll(`.${i.be("suggestion","list")} li`)[de],Ce=_e.scrollTop,{offsetTop:Ee,scrollHeight:De}=Re;Ee+De>Ce+_e.clientHeight&&(_e.scrollTop+=De),Ee{T.value&&oe()}),ft(()=>{c.value.ref.setAttribute("role","textbox"),c.value.ref.setAttribute("aria-autocomplete","list"),c.value.ref.setAttribute("aria-controls","id"),c.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${f.value}`),h=c.value.ref.hasAttribute("readonly")}),t({highlightedIndex:f,activated:g,loading:w,inputRef:c,popperRef:u,suggestions:m,handleSelect:Q,handleKeyEnter:I,focus:ne,blur:ce,close:oe,highlight:Me}),(de,_e)=>(b(),he(s(ur),{ref_key:"popperRef",ref:u,visible:s(T),placement:de.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[s(i).e("popper"),de.popperClass],teleported:de.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${s(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:L,onHide:V},{content:le(()=>[E("div",{ref_key:"regionRef",ref:d,class:O([s(i).b("suggestion"),s(i).is("loading",s(R))]),style:Je({[de.fitInputWidth?"width":"minWidth"]:_.value,outline:"none"}),role:"region"},[ee(s(wn),{id:s(x),tag:"ul","wrap-class":s(i).be("suggestion","wrap"),"view-class":s(i).be("suggestion","list"),role:"listbox"},{default:le(()=>[s(R)?(b(),M("li",YW,[be(de.$slots,"loading",{},()=>[ee(s(Ze),{class:O(s(i).is("loading"))},{default:le(()=>[ee(s(vn))]),_:1},8,["class"])])])):(b(!0),M(Qe,{key:1},It(m.value,(me,Re)=>(b(),M("li",{id:`${s(x)}-item-${Re}`,key:Re,class:O({highlighted:f.value===Re}),role:"option","aria-selected":f.value===Re,onClick:Ce=>Q(me)},[be(de.$slots,"default",{item:me},()=>[Ct($e(me[de.valueKey]),1)])],10,GW))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:le(()=>[E("div",{ref_key:"listboxRef",ref:p,class:O([s(i).b(),de.$attrs.class]),style:Je(s($)),role:"combobox","aria-haspopup":"listbox","aria-expanded":s(T),"aria-owns":s(x)},[ee(s(cr),Mt({ref_key:"inputRef",ref:c},s(l),{clearable:de.clearable,disabled:s(a),name:de.name,"model-value":de.modelValue,"aria-label":de.ariaLabel,onInput:te,onChange:Z,onFocus:H,onBlur:F,onClear:K,onKeydown:[_e[0]||(_e[0]=Gt(ct(me=>Me(f.value-1),["prevent"]),["up"])),_e[1]||(_e[1]=Gt(ct(me=>Me(f.value+1),["prevent"]),["down"])),Gt(I,["enter"]),Gt(oe,["tab"]),Gt(U,["esc"])],onMousedown:J}),ln({_:2},[de.$slots.prepend?{name:"prepend",fn:le(()=>[be(de.$slots,"prepend")])}:void 0,de.$slots.append?{name:"append",fn:le(()=>[be(de.$slots,"append")])}:void 0,de.$slots.prefix?{name:"prefix",fn:le(()=>[be(de.$slots,"prefix")])}:void 0,de.$slots.suffix?{name:"suffix",fn:le(()=>[be(de.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,qW)]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var ZW=Le(XW,[["__file","autocomplete.vue"]]);const JW=yt(ZW),QW=Pe({size:{type:[Number,String],values:Rl,default:"",validator:e=>st(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:Xt},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:ue(String),default:"cover"}}),eq={error:e=>e instanceof Event},tq=["src","alt","srcset"],oq=N({...N({name:"ElAvatar"}),props:QW,emits:eq,setup(e,{emit:t}){const o=e,r=ze("avatar"),l=D(!1),n=C(()=>{const{size:d,icon:u,shape:p}=o,h=[r.b()];return ut(d)&&h.push(r.m(d)),u&&h.push(r.m("icon")),p&&h.push(r.m(p)),h}),a=C(()=>{const{size:d}=o;return st(d)?r.cssVarBlock({size:mo(d)||""}):void 0}),i=C(()=>({objectFit:o.fit}));Se(()=>o.src,()=>l.value=!1);function c(d){l.value=!0,t("error",d)}return(d,u)=>(b(),M("span",{class:O(s(n)),style:Je(s(a))},[(d.src||d.srcSet)&&!l.value?(b(),M("img",{key:0,src:d.src,alt:d.alt,srcset:d.srcSet,style:Je(s(i)),onError:c},null,44,tq)):d.icon?(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(d.icon)))]),_:1})):be(d.$slots,"default",{key:2})],6))}});var rq=Le(oq,[["__file","avatar.vue"]]);const lq=yt(rq),nq={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},aq={click:e=>e instanceof MouseEvent},iq=(e,t,o)=>{const r=lo(),l=lo(),n=D(!1),a=()=>{r.value&&(n.value=r.value.scrollTop>=e.visibilityHeight)},i=d=>{var u;(u=r.value)==null||u.scrollTo({top:0,behavior:"smooth"}),t("click",d)},c=Xb(a,300,!0);return oo(l,"scroll",c),ft(()=>{var d;l.value=document,r.value=document.documentElement,e.target&&(r.value=(d=document.querySelector(e.target))!=null?d:void 0,r.value||Io(o,`target does not exist: ${e.target}`),l.value=r.value),a()}),{visible:n,handleClick:i}},L4="ElBacktop",sq=N({...N({name:L4}),props:nq,emits:aq,setup(e,{emit:t}){const o=e,r=ze("backtop"),{handleClick:l,visible:n}=iq(o,t,L4),a=C(()=>({right:`${o.right}px`,bottom:`${o.bottom}px`}));return(i,c)=>(b(),he(Mo,{name:`${s(r).namespace.value}-fade-in`},{default:le(()=>[s(n)?(b(),M("div",{key:0,style:Je(s(a)),class:O(s(r).b()),onClick:c[0]||(c[0]=ct((...d)=>s(l)&&s(l)(...d),["stop"]))},[be(i.$slots,"default",{},()=>[ee(s(Ze),{class:O(s(r).e("icon"))},{default:le(()=>[ee(s(O3))]),_:1},8,["class"])])],6)):se("v-if",!0)]),_:3},8,["name"]))}});var cq=Le(sq,[["__file","backtop.vue"]]);const uq=yt(cq),dq=Pe({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,dotStyle:{type:ue([String,Object,Array])},badgeStyle:{type:ue([String,Object,Array])},offset:{type:ue(Array),default:[0,0]},dotClass:{type:String},badgeClass:{type:String}}),pq=["textContent"],fq=N({...N({name:"ElBadge"}),props:dq,setup(e,{expose:t}){const o=e,r=ze("badge"),l=C(()=>o.isDot?"":st(o.value)&&st(o.max)?o.max{var a,i,c,d,u,p;return[{backgroundColor:o.color,marginRight:mo(-((i=(a=o.offset)==null?void 0:a[0])!=null?i:0)),marginTop:mo((d=(c=o.offset)==null?void 0:c[1])!=null?d:0)},(u=o.dotStyle)!=null?u:{},(p=o.badgeStyle)!=null?p:{}]});return Lo({from:"dot-style",replacement:"badge-style",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},C(()=>!!o.dotStyle)),Lo({from:"dot-class",replacement:"badge-class",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},C(()=>!!o.dotClass)),t({content:l}),(a,i)=>(b(),M("div",{class:O(s(r).b())},[be(a.$slots,"default"),ee(Mo,{name:`${s(r).namespace.value}-zoom-in-center`,persisted:""},{default:le(()=>[mt(E("sup",{class:O([s(r).e("content"),s(r).em("content",a.type),s(r).is("fixed",!!a.$slots.default),s(r).is("dot",a.isDot),a.dotClass,a.badgeClass]),style:Je(s(n)),textContent:$e(s(l))},null,14,pq),[[Lt,!a.hidden&&(s(l)||a.isDot)]])]),_:1},8,["name"])],2))}});var hq=Le(fq,[["__file","badge.vue"]]);const B4=yt(hq),V4=Symbol("breadcrumbKey"),vq=Pe({separator:{type:String,default:"/"},separatorIcon:{type:Xt}}),mq=["aria-label"],gq=N({...N({name:"ElBreadcrumb"}),props:vq,setup(e){const t=e,{t:o}=Rt(),r=ze("breadcrumb"),l=D();return zt(V4,t),ft(()=>{const n=l.value.querySelectorAll(`.${r.e("item")}`);n.length&&n[n.length-1].setAttribute("aria-current","page")}),(n,a)=>(b(),M("div",{ref_key:"breadcrumb",ref:l,class:O(s(r).b()),"aria-label":s(o)("el.breadcrumb.label"),role:"navigation"},[be(n.$slots,"default")],10,mq))}});var bq=Le(gq,[["__file","breadcrumb.vue"]]);const _q=Pe({to:{type:ue([String,Object]),default:""},replace:{type:Boolean,default:!1}}),wq=N({...N({name:"ElBreadcrumbItem"}),props:_q,setup(e){const t=e,o=wt(),r=Ge(V4,void 0),l=ze("breadcrumb"),n=o.appContext.config.globalProperties.$router,a=D(),i=()=>{!t.to||!n||(t.replace?n.replace(t.to):n.push(t.to))};return(c,d)=>{var u,p;return b(),M("span",{class:O(s(l).e("item"))},[E("span",{ref_key:"link",ref:a,class:O([s(l).e("inner"),s(l).is("link",!!c.to)]),role:"link",onClick:i},[be(c.$slots,"default")],2),(u=s(r))!=null&&u.separatorIcon?(b(),he(s(Ze),{key:0,class:O(s(l).e("separator"))},{default:le(()=>[(b(),he(Et(s(r).separatorIcon)))]),_:1},8,["class"])):(b(),M("span",{key:1,class:O(s(l).e("separator")),role:"presentation"},$e((p=s(r))==null?void 0:p.separator),3))],2)}}});var D4=Le(wq,[["__file","breadcrumb-item.vue"]]);const yq=yt(bq,{BreadcrumbItem:D4}),xq=co(D4),H4=Symbol("buttonGroupContextKey"),kq=(e,t)=>{Lo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},C(()=>e.type==="text"));const o=Ge(H4,void 0),r=Mc("button"),{form:l}=sr(),n=So(C(()=>o==null?void 0:o.size)),a=xr(),i=D(),c=Do(),d=C(()=>e.type||(o==null?void 0:o.type)||""),u=C(()=>{var m,f,_;return(_=(f=e.autoInsertSpace)!=null?f:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?_:!1}),p=C(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=C(()=>{var m;const f=(m=c.default)==null?void 0:m.call(c);if(u.value&&(f==null?void 0:f.length)===1){const _=f[0];if((_==null?void 0:_.type)===vi){const g=_.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(g.trim())}}return!1});return{_disabled:a,_size:n,_type:d,_ref:i,_props:p,shouldAddSpace:h,handleClick:m=>{e.nativeType==="reset"&&(l==null||l.resetFields()),t("click",m)}}},uv=["default","primary","success","warning","info","danger","text",""],dv=Pe({size:Oo,disabled:Boolean,type:{type:String,values:uv,default:""},icon:{type:Xt},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Xt,default:()=>vn},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:ue([String,Object]),default:"button"}}),Cq={click:e=>e instanceof MouseEvent};function er(e,t){Sq(e)&&(e="100%");var o=Eq(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function lp(e){return Math.min(1,Math.max(0,e))}function Sq(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Eq(e){return typeof e=="string"&&e.indexOf("%")!==-1}function F4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function np(e){return e<=1?"".concat(Number(e)*100,"%"):e}function qa(e){return e.length===1?"0"+e:String(e)}function Tq(e,t,o){return{r:er(e,255)*255,g:er(t,255)*255,b:er(o,255)*255}}function j4(e,t,o){e=er(e,255),t=er(t,255),o=er(o,255);var r=Math.max(e,t,o),l=Math.min(e,t,o),n=0,a=0,i=(r+l)/2;if(r===l)a=0,n=0;else{var c=r-l;switch(a=i>.5?c/(2-r-l):c/(r+l),r){case e:n=(t-o)/c+(t1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function $q(e,t,o){var r,l,n;if(e=er(e,360),t=er(t,100),o=er(o,100),t===0)l=o,n=o,r=o;else{var a=o<.5?o*(1+t):o+t-o*t,i=2*o-a;r=pv(i,a,e+1/3),l=pv(i,a,e),n=pv(i,a,e-1/3)}return{r:r*255,g:l*255,b:n*255}}function K4(e,t,o){e=er(e,255),t=er(t,255),o=er(o,255);var r=Math.max(e,t,o),l=Math.min(e,t,o),n=0,a=r,i=r-l,c=r===0?0:i/r;if(r===l)n=0;else{switch(r){case e:n=(t-o)/i+(t>16,g:(e&65280)>>8,b:e&255}}var fv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Oq(e){var t={r:0,g:0,b:0},o=1,r=null,l=null,n=null,a=!1,i=!1;return typeof e=="string"&&(e=Rq(e)),typeof e=="object"&&(yn(e.r)&&yn(e.g)&&yn(e.b)?(t=Tq(e.r,e.g,e.b),a=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):yn(e.h)&&yn(e.s)&&yn(e.v)?(r=np(e.s),l=np(e.v),t=Mq(e.h,r,l),a=!0,i="hsv"):yn(e.h)&&yn(e.s)&&yn(e.l)&&(r=np(e.s),n=np(e.l),t=$q(e.h,r,n),a=!0,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=F4(o),{ok:a,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}var Nq="[-\\+]?\\d+%?",Pq="[-\\+]?\\d*\\.\\d+%?",la="(?:".concat(Pq,")|(?:").concat(Nq,")"),hv="[\\s|\\(]+(".concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")\\s*\\)?"),vv="[\\s|\\(]+(".concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")\\s*\\)?"),wl={CSS_UNIT:new RegExp(la),rgb:new RegExp("rgb"+hv),rgba:new RegExp("rgba"+vv),hsl:new RegExp("hsl"+hv),hsla:new RegExp("hsla"+vv),hsv:new RegExp("hsv"+hv),hsva:new RegExp("hsva"+vv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Rq(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(fv[e])e=fv[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=wl.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=wl.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=wl.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=wl.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=wl.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=wl.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=wl.hex8.exec(e),o?{r:Dr(o[1]),g:Dr(o[2]),b:Dr(o[3]),a:W4(o[4]),format:t?"name":"hex8"}:(o=wl.hex6.exec(e),o?{r:Dr(o[1]),g:Dr(o[2]),b:Dr(o[3]),format:t?"name":"hex"}:(o=wl.hex4.exec(e),o?{r:Dr(o[1]+o[1]),g:Dr(o[2]+o[2]),b:Dr(o[3]+o[3]),a:W4(o[4]+o[4]),format:t?"name":"hex8"}:(o=wl.hex3.exec(e),o?{r:Dr(o[1]+o[1]),g:Dr(o[2]+o[2]),b:Dr(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function yn(e){return!!wl.CSS_UNIT.exec(String(e))}var q4=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Iq(t)),this.originalInput=t;var l=Oq(t);this.originalInput=t,this.r=l.r,this.g=l.g,this.b=l.b,this.a=l.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:l.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=l.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),o,r,l,n=t.r/255,a=t.g/255,i=t.b/255;return n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*r+.0722*l},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=F4(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=K4(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=K4(this.r,this.g,this.b),o=Math.round(t.h*360),r=Math.round(t.s*100),l=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(l,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=j4(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=j4(this.r,this.g,this.b),o=Math.round(t.h*360),r=Math.round(t.s*100),l=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(l,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),U4(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Aq(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(r,")"):"rgba(".concat(t,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(er(o,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(o){return Math.round(er(o,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+U4(this.r,this.g,this.b,!1),o=0,r=Object.entries(fv);o=0,n=!o&&l&&(t.startsWith("hex")||t==="name");return n?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l+=t/100,o.l=lp(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=lp(o.l),new e(o)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s-=t/100,o.s=lp(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=lp(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),r=(o.h+t)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var r=this.toRgb(),l=new e(t).toRgb(),n=o/100,a={r:(l.r-r.r)*n+r.r,g:(l.g-r.g)*n+r.g,b:(l.b-r.b)*n+r.b,a:(l.a-r.a)*n+r.a};return new e(a)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var r=this.toHsl(),l=360/o,n=[this];for(r.h=(r.h-(l*t>>1)+720)%360;--t;)r.h=(r.h+l)%360,n.push(new e(r));return n},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),r=o.h,l=o.s,n=o.v,a=[],i=1/t;t--;)a.push(new e({h:r,s:l,v:n})),n=(n+i)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),r=new e(t).toRgb(),l=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/l,g:(o.g*o.a+r.g*r.a*(1-o.a))/l,b:(o.b*o.a+r.b*r.a*(1-o.a))/l,a:l})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),r=o.h,l=[this],n=360/t,a=1;a{let r={};const l=e.color;if(l){const n=new q4(l),a=e.dark?n.tint(20).toString():na(n,20);if(e.plain)r=o.cssVarBlock({"bg-color":e.dark?na(n,90):n.tint(90).toString(),"text-color":l,"border-color":e.dark?na(n,50):n.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":l,"hover-border-color":l,"active-bg-color":a,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(r[o.cssVarBlockName("disabled-bg-color")]=e.dark?na(n,90):n.tint(90).toString(),r[o.cssVarBlockName("disabled-text-color")]=e.dark?na(n,50):n.tint(50).toString(),r[o.cssVarBlockName("disabled-border-color")]=e.dark?na(n,80):n.tint(80).toString());else{const i=e.dark?na(n,30):n.tint(30).toString(),c=n.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(r=o.cssVarBlock({"bg-color":l,"text-color":c,"border-color":l,"hover-bg-color":i,"hover-text-color":c,"hover-border-color":i,"active-bg-color":a,"active-border-color":a}),t.value){const d=e.dark?na(n,50):n.tint(50).toString();r[o.cssVarBlockName("disabled-bg-color")]=d,r[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,r[o.cssVarBlockName("disabled-border-color")]=d}}}return r})}const Bq=N({...N({name:"ElButton"}),props:dv,emits:Cq,setup(e,{expose:t,emit:o}){const r=e,l=Lq(r),n=ze("button"),{_ref:a,_size:i,_type:c,_disabled:d,_props:u,shouldAddSpace:p,handleClick:h}=kq(r,o),v=C(()=>[n.b(),n.m(c.value),n.m(i.value),n.is("disabled",d.value),n.is("loading",r.loading),n.is("plain",r.plain),n.is("round",r.round),n.is("circle",r.circle),n.is("text",r.text),n.is("link",r.link),n.is("has-bg",r.bg)]);return t({ref:a,size:i,type:c,disabled:d,shouldAddSpace:p}),(m,f)=>(b(),he(Et(m.tag),Mt({ref_key:"_ref",ref:a},s(u),{class:s(v),style:s(l),onClick:s(h)}),{default:le(()=>[m.loading?(b(),M(Qe,{key:0},[m.$slots.loading?be(m.$slots,"loading",{key:0}):(b(),he(s(Ze),{key:1,class:O(s(n).is("loading"))},{default:le(()=>[(b(),he(Et(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(b(),he(s(Ze),{key:1},{default:le(()=>[m.icon?(b(),he(Et(m.icon),{key:0})):be(m.$slots,"icon",{key:1})]),_:3})):se("v-if",!0),m.$slots.default?(b(),M("span",{key:2,class:O({[s(n).em("text","expand")]:s(p)})},[be(m.$slots,"default")],2)):se("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Vq=Le(Bq,[["__file","button.vue"]]);const Dq={size:dv.size,type:dv.type},Hq=N({...N({name:"ElButtonGroup"}),props:Dq,setup(e){const t=e;zt(H4,Dt({size:Yt(t,"size"),type:Yt(t,"type")}));const o=ze("button");return(r,l)=>(b(),M("div",{class:O(`${s(o).b("group")}`)},[be(r.$slots,"default")],2))}});var Y4=Le(Hq,[["__file","button-group.vue"]]);const Wo=yt(Vq,{ButtonGroup:Y4}),G4=co(Y4);var X4={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){var o=1e3,r=6e4,l=36e5,n="millisecond",a="second",i="minute",c="hour",d="day",u="week",p="month",h="quarter",v="year",m="date",f="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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(J){var Z=["th","st","nd","rd"],H=J%100;return"["+J+(Z[(H-20)%10]||Z[H]||Z[0])+"]"}},w=function(J,Z,H){var F=String(J);return!F||F.length>=Z?J:""+Array(Z+1-F.length).join(H)+J},x={s:w,z:function(J){var Z=-J.utcOffset(),H=Math.abs(Z),F=Math.floor(H/60),K=H%60;return(Z<=0?"+":"-")+w(F,2,"0")+":"+w(K,2,"0")},m:function J(Z,H){if(Z.date()1)return J(U[0])}else{var oe=Z.name;T[oe]=Z,K=oe}return!F&&K&&($=K),K||!F&&$},V=function(J,Z){if(P(J))return J.clone();var H=typeof Z=="object"?Z:{};return H.date=J,H.args=arguments,new j(H)},B=x;B.l=L,B.i=P,B.w=function(J,Z){return V(J,{locale:Z.$L,utc:Z.$u,x:Z.$x,$offset:Z.$offset})};var j=function(){function J(H){this.$L=L(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[R]=!0}var Z=J.prototype;return Z.parse=function(H){this.$d=function(F){var K=F.date,I=F.utc;if(K===null)return new Date(NaN);if(B.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var U=K.match(_);if(U){var oe=U[2]-1||0,ne=(U[7]||"0").substring(0,3);return I?new Date(Date.UTC(U[1],oe,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)):new Date(U[1],oe,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)}}return new Date(K)}(H),this.init()},Z.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},Z.$utils=function(){return B},Z.isValid=function(){return this.$d.toString()!==f},Z.isSame=function(H,F){var K=V(H);return this.startOf(F)<=K&&K<=this.endOf(F)},Z.isAfter=function(H,F){return V(H)68?1900:2e3)},d=function(f){return function(_){this[f]=+_}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(_){if(!_||_==="Z")return 0;var g=_.match(/([+-]|\d\d)/g),y=60*g[1]+(+g[2]||0);return y===0?0:g[0]==="+"?-y:y}(f)}],p=function(f){var _=i[f];return _&&(_.indexOf?_:_.s.concat(_.f))},h=function(f,_){var g,y=i.meridiem;if(y){for(var w=1;w<=24;w+=1)if(f.indexOf(y(w,0,_))>-1){g=w>12;break}}else g=f===(_?"pm":"PM");return g},v={A:[a,function(f){this.afternoon=h(f,!1)}],a:[a,function(f){this.afternoon=h(f,!0)}],S:[/\d/,function(f){this.milliseconds=100*+f}],SS:[l,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,d("seconds")],ss:[n,d("seconds")],m:[n,d("minutes")],mm:[n,d("minutes")],H:[n,d("hours")],h:[n,d("hours")],HH:[n,d("hours")],hh:[n,d("hours")],D:[n,d("day")],DD:[l,d("day")],Do:[a,function(f){var _=i.ordinal,g=f.match(/\d+/);if(this.day=g[0],_)for(var y=1;y<=31;y+=1)_(y).replace(/\[|\]/g,"")===f&&(this.day=y)}],M:[n,d("month")],MM:[l,d("month")],MMM:[a,function(f){var _=p("months"),g=(p("monthsShort")||_.map(function(y){return y.slice(0,3)})).indexOf(f)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(f){var _=p("months").indexOf(f)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(f){this.year=c(f)}],YYYY:[/\d{4}/,d("year")],Z:u,ZZ:u};function m(f){var _,g;_=f,g=i&&i.formats;for(var y=(f=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,V,B){var j=B&&B.toUpperCase();return V||g[B]||o[B]||g[j].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(te,J,Z){return J||Z.slice(1)})})).match(r),w=y.length,x=0;x-1)return new Date((F==="X"?1e3:1)*H);var I=m(F)(H),U=I.year,oe=I.month,ne=I.day,ce=I.hours,Q=I.minutes,Me=I.seconds,de=I.milliseconds,_e=I.zone,me=new Date,Re=ne||(U||oe?1:me.getDate()),Ce=U||me.getFullYear(),Ee=0;U&&!oe||(Ee=oe>0?oe-1:me.getMonth());var De=ce||0,ae=Q||0,pe=Me||0,ke=de||0;return _e?new Date(Date.UTC(Ce,Ee,Re,De,ae,pe,ke+60*_e.offset*1e3)):K?new Date(Date.UTC(Ce,Ee,Re,De,ae,pe,ke)):new Date(Ce,Ee,Re,De,ae,pe,ke)}catch{return new Date("")}}($,P,T),this.init(),j&&j!==!0&&(this.$L=this.locale(j).$L),B&&$!=this.format(P)&&(this.$d=new Date("")),i={}}else if(P instanceof Array)for(var te=P.length,J=1;J<=te;J+=1){R[1]=P[J-1];var Z=g.apply(this,R);if(Z.isValid()){this.$d=Z.$d,this.$L=Z.$L,this.init();break}J===te&&(this.$d=new Date(""))}else w.call(this,x)}}})})(Z4);var jq=Z4.exports;const mv=cl(jq),J4=["hours","minutes","seconds"],gv="HH:mm:ss",ts="YYYY-MM-DD",Kq={date:ts,dates:ts,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",datetime:`${ts} ${gv}`,monthrange:"YYYY-MM",daterange:ts,datetimerange:`${ts} ${gv}`},bv=(e,t)=>[e>0?e-1:void 0,e,eArray.from(Array.from({length:e}).keys()),Q4=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),ew=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),tw=function(e,t){const o=va(e),r=va(t);return o&&r?e.getTime()===t.getTime():!o&&!r?e===t:!1},ow=function(e,t){const o=Ke(e),r=Ke(t);return o&&r?e.length!==t.length?!1:e.every((l,n)=>tw(l,t[n])):!o&&!r?tw(e,t):!1},rw=function(e,t,o){const r=Yr(t)||t==="x"?kt(e).locale(o):kt(e,t).locale(o);return r.isValid()?r:void 0},lw=function(e,t,o){return Yr(t)?e:t==="x"?+e:kt(e).locale(o).format(t)},_v=(e,t)=>{var o;const r=[],l=t==null?void 0:t();for(let n=0;n({})},modelValue:{type:ue([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:ue([Date,Array])},defaultTime:{type:ue([Date,Array])},isRange:Boolean,...nw,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,label:{type:String,default:void 0},tabindex:{type:ue([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...Xi,...Zo(["ariaLabel"])}),Uq=["id","name","placeholder","value","disabled","readonly"],Wq=["id","name","placeholder","value","disabled","readonly"],qq=N({...N({name:"Picker"}),props:wv,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:o}){const r=e,l=ya(),{lang:n}=Rt(),a=ze("date"),i=ze("input"),c=ze("range"),{form:d,formItem:u}=sr(),p=Ge("ElPopperOptions",{}),{valueOnClear:h}=Wd(r,null),v=D(),m=D(),f=D(!1),_=D(!1),g=D(null);let y=!1,w=!1;const x=C(()=>[a.b("editor"),a.bm("editor",r.type),i.e("wrapper"),a.is("disabled",ce.value),a.is("active",f.value),c.b("editor"),Ne?c.bm("editor",Ne.value):"",l.class]),$=C(()=>[i.e("icon"),c.e("close-icon"),Ee.value?"":c.e("close-icon--hidden")]);Se(f,fe=>{fe?et(()=>{fe&&(g.value=r.modelValue)}):(xe.value=null,et(()=>{T(r.modelValue)}))});const T=(fe,Fe)=>{(Fe||!ow(fe,g.value))&&(o("change",fe),r.validateEvent&&(u==null||u.validate("change").catch(at=>void 0)))},R=fe=>{if(!ow(r.modelValue,fe)){let Fe;Ke(fe)?Fe=fe.map(at=>lw(at,r.valueFormat,n.value)):fe&&(Fe=lw(fe,r.valueFormat,n.value)),o("update:modelValue",fe&&Fe,n.value)}},P=fe=>{o("keydown",fe)},L=C(()=>{if(m.value){const fe=Te.value?m.value:m.value.$el;return Array.from(fe.querySelectorAll("input"))}return[]}),V=(fe,Fe,at)=>{const _t=L.value;_t.length&&(!at||at==="min"?(_t[0].setSelectionRange(fe,Fe),_t[0].focus()):at==="max"&&(_t[1].setSelectionRange(fe,Fe),_t[1].focus()))},B=()=>{I(!0,!0),et(()=>{w=!1})},j=(fe="",Fe=!1)=>{Fe||(w=!0),f.value=Fe;let at;Ke(fe)?at=fe.map(_t=>_t.toDate()):at=fe&&fe.toDate(),xe.value=null,R(at)},te=()=>{_.value=!0},J=()=>{o("visible-change",!0)},Z=fe=>{(fe==null?void 0:fe.key)===lt.esc&&I(!0,!0)},H=()=>{_.value=!1,f.value=!1,w=!1,o("visible-change",!1)},F=()=>{f.value=!0},K=()=>{f.value=!1},I=(fe=!0,Fe=!1)=>{w=Fe;const[at,_t]=s(L);let At=at;!fe&&Te.value&&(At=_t),At&&At.focus()},U=fe=>{r.readonly||ce.value||f.value||w||(f.value=!0,o("focus",fe))};let oe;const ne=fe=>{const Fe=async()=>{setTimeout(()=>{var at;oe===Fe&&(!((at=v.value)!=null&&at.isFocusInsideContent()&&!y)&&L.value.filter(_t=>_t.contains(document.activeElement)).length===0&&(We(),f.value=!1,o("blur",fe),r.validateEvent&&(u==null||u.validate("blur").catch(_t=>void 0))),y=!1)},0)};oe=Fe,Fe()},ce=C(()=>r.disabled||(d==null?void 0:d.disabled)),Q=C(()=>{let fe;if(ae.value?G.value.getDefaultValue&&(fe=G.value.getDefaultValue()):Ke(r.modelValue)?fe=r.modelValue.map(Fe=>rw(Fe,r.valueFormat,n.value)):fe=rw(r.modelValue,r.valueFormat,n.value),G.value.getRangeAvailableTime){const Fe=G.value.getRangeAvailableTime(fe);nr(Fe,fe)||(fe=Fe,R(Ke(fe)?fe.map(at=>at.toDate()):fe.toDate()))}return Ke(fe)&&fe.some(Fe=>!Fe)&&(fe=[]),fe}),Me=C(()=>{if(!G.value.panelReady)return"";const fe=ye(Q.value);return Ke(xe.value)?[xe.value[0]||fe&&fe[0]||"",xe.value[1]||fe&&fe[1]||""]:xe.value!==null?xe.value:!_e.value&&ae.value||!f.value&&ae.value?"":fe?me.value||Re.value?fe.join(", "):fe:""}),de=C(()=>r.type.includes("time")),_e=C(()=>r.type.startsWith("time")),me=C(()=>r.type==="dates"),Re=C(()=>r.type==="years"),Ce=C(()=>r.prefixIcon||(de.value?ph:I3)),Ee=D(!1),De=fe=>{r.readonly||ce.value||Ee.value&&(fe.stopPropagation(),B(),R(h.value),T(h.value,!0),Ee.value=!1,f.value=!1,G.value.handleClear&&G.value.handleClear())},ae=C(()=>{const{modelValue:fe}=r;return!fe||Ke(fe)&&!fe.filter(Boolean).length}),pe=async fe=>{var Fe;r.readonly||ce.value||(((Fe=fe.target)==null?void 0:Fe.tagName)!=="INPUT"||L.value.includes(document.activeElement))&&(f.value=!0)},ke=()=>{r.readonly||ce.value||!ae.value&&r.clearable&&(Ee.value=!0)},Oe=()=>{Ee.value=!1},we=fe=>{var Fe;r.readonly||ce.value||(((Fe=fe.touches[0].target)==null?void 0:Fe.tagName)!=="INPUT"||L.value.includes(document.activeElement))&&(f.value=!0)},Te=C(()=>r.type.includes("range")),Ne=So(),Ie=C(()=>{var fe,Fe;return(Fe=(fe=s(v))==null?void 0:fe.popperRef)==null?void 0:Fe.contentRef}),Ae=C(()=>{var fe;return s(Te)?s(m):(fe=s(m))==null?void 0:fe.$el});I0(Ae,fe=>{const Fe=s(Ie),at=s(Ae);Fe&&(fe.target===Fe||fe.composedPath().includes(Fe))||fe.target===at||fe.composedPath().includes(at)||(f.value=!1)});const xe=D(null),We=()=>{if(xe.value){const fe=qe(Me.value);fe&&Ye(fe)&&(R(Ke(fe)?fe.map(Fe=>Fe.toDate()):fe.toDate()),xe.value=null)}xe.value===""&&(R(h.value),T(h.value),xe.value=null)},qe=fe=>fe?G.value.parseUserInput(fe):null,ye=fe=>fe?G.value.formatToString(fe):null,Ye=fe=>G.value.isValidValue(fe),tt=async fe=>{if(r.readonly||ce.value)return;const{code:Fe}=fe;if(P(fe),Fe===lt.esc){f.value===!0&&(f.value=!1,fe.preventDefault(),fe.stopPropagation());return}if(Fe===lt.down&&(G.value.handleFocusPicker&&(fe.preventDefault(),fe.stopPropagation()),f.value===!1&&(f.value=!0,await et()),G.value.handleFocusPicker)){G.value.handleFocusPicker();return}if(Fe===lt.tab){y=!0;return}if(Fe===lt.enter||Fe===lt.numpadEnter){(xe.value===null||xe.value===""||Ye(qe(Me.value)))&&(We(),f.value=!1),fe.stopPropagation();return}if(xe.value){fe.stopPropagation();return}G.value.handleKeydownInput&&G.value.handleKeydownInput(fe)},pt=fe=>{xe.value=fe,f.value||(f.value=!0)},dt=fe=>{const Fe=fe.target;xe.value?xe.value=[Fe.value,xe.value[1]]:xe.value=[Fe.value,null]},Y=fe=>{const Fe=fe.target;xe.value?xe.value=[xe.value[0],Fe.value]:xe.value=[null,Fe.value]},S=()=>{var fe;const Fe=xe.value,at=qe(Fe&&Fe[0]),_t=s(Q);if(at&&at.isValid()){xe.value=[ye(at),((fe=Me.value)==null?void 0:fe[1])||null];const At=[at,_t&&(_t[1]||null)];Ye(At)&&(R(At),xe.value=null)}},A=()=>{var fe;const Fe=s(xe),at=qe(Fe&&Fe[1]),_t=s(Q);if(at&&at.isValid()){xe.value=[((fe=s(Me))==null?void 0:fe[0])||null,ye(at)];const At=[_t&&_t[0],at];Ye(At)&&(R(At),xe.value=null)}},G=D({}),X=fe=>{G.value[fe[0]]=fe[1],G.value.panelReady=!0},re=fe=>{o("calendar-change",fe)},ge=(fe,Fe,at)=>{o("panel-change",fe,Fe,at)};return zt("EP_PICKER_BASE",{props:r}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-time-picker",ref:"https://element-plus.org/en-US/component/time-picker.html"},C(()=>!!r.label)),t({focus:I,handleFocusInput:U,handleBlurInput:ne,handleOpen:F,handleClose:K,onPick:j}),(fe,Fe)=>(b(),he(s(ur),Mt({ref_key:"refPopper",ref:v,visible:f.value,effect:"light",pure:"",trigger:"click"},fe.$attrs,{role:"dialog",teleported:"",transition:`${s(a).namespace.value}-zoom-in-top`,"popper-class":[`${s(a).namespace.value}-picker__popper`,fe.popperClass],"popper-options":s(p),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:te,onShow:J,onHide:H}),{default:le(()=>[s(Te)?(b(),M("div",{key:1,ref_key:"inputRef",ref:m,class:O(s(x)),style:Je(fe.$attrs.style),onClick:U,onMouseenter:ke,onMouseleave:Oe,onTouchstartPassive:we,onKeydown:tt},[s(Ce)?(b(),he(s(Ze),{key:0,class:O([s(i).e("icon"),s(c).e("icon")]),onMousedown:ct(pe,["prevent"]),onTouchstartPassive:we},{default:le(()=>[(b(),he(Et(s(Ce))))]),_:1},8,["class","onMousedown"])):se("v-if",!0),E("input",{id:fe.id&&fe.id[0],autocomplete:"off",name:fe.name&&fe.name[0],placeholder:fe.startPlaceholder,value:s(Me)&&s(Me)[0],disabled:s(ce),readonly:!fe.editable||fe.readonly,class:O(s(c).b("input")),onMousedown:pe,onInput:dt,onChange:S,onFocus:U,onBlur:ne},null,42,Uq),be(fe.$slots,"range-separator",{},()=>[E("span",{class:O(s(c).b("separator"))},$e(fe.rangeSeparator),3)]),E("input",{id:fe.id&&fe.id[1],autocomplete:"off",name:fe.name&&fe.name[1],placeholder:fe.endPlaceholder,value:s(Me)&&s(Me)[1],disabled:s(ce),readonly:!fe.editable||fe.readonly,class:O(s(c).b("input")),onMousedown:pe,onFocus:U,onBlur:ne,onInput:Y,onChange:A},null,42,Wq),fe.clearIcon?(b(),he(s(Ze),{key:1,class:O(s($)),onClick:De},{default:le(()=>[(b(),he(Et(fe.clearIcon)))]),_:1},8,["class"])):se("v-if",!0)],38)):(b(),he(s(cr),{key:0,id:fe.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":s(Me),name:fe.name,size:s(Ne),disabled:s(ce),placeholder:fe.placeholder,class:O([s(a).b("editor"),s(a).bm("editor",fe.type),fe.$attrs.class]),style:Je(fe.$attrs.style),readonly:!fe.editable||fe.readonly||s(me)||s(Re)||fe.type==="week","aria-label":fe.label||fe.ariaLabel,tabindex:fe.tabindex,"validate-event":!1,onInput:pt,onFocus:U,onBlur:ne,onKeydown:tt,onChange:We,onMousedown:pe,onMouseenter:ke,onMouseleave:Oe,onTouchstartPassive:we,onClick:Fe[0]||(Fe[0]=ct(()=>{},["stop"]))},{prefix:le(()=>[s(Ce)?(b(),he(s(Ze),{key:0,class:O(s(i).e("icon")),onMousedown:ct(pe,["prevent"]),onTouchstartPassive:we},{default:le(()=>[(b(),he(Et(s(Ce))))]),_:1},8,["class","onMousedown"])):se("v-if",!0)]),suffix:le(()=>[Ee.value&&fe.clearIcon?(b(),he(s(Ze),{key:0,class:O(`${s(i).e("icon")} clear-icon`),onClick:ct(De,["stop"])},{default:le(()=>[(b(),he(Et(fe.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onKeydown"]))]),content:le(()=>[be(fe.$slots,"default",{visible:f.value,actualVisible:_.value,parsedValue:s(Q),format:fe.format,dateFormat:fe.dateFormat,timeFormat:fe.timeFormat,unlinkPanels:fe.unlinkPanels,type:fe.type,defaultValue:fe.defaultValue,onPick:j,onSelectRange:V,onSetPickerOption:X,onCalendarChange:re,onPanelChange:ge,onKeydown:Z,onMousedown:Fe[1]||(Fe[1]=ct(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var iw=Le(qq,[["__file","picker.vue"]]);const Yq=Pe({...aw,datetimeRole:String,parsedValue:{type:ue(Object)}}),sw=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:o})=>{const r=(a,i,c,d)=>{const u={hour:e,minute:t,second:o};let p=a;return["hour","minute","second"].forEach(h=>{if(u[h]){let v;const m=u[h];switch(h){case"minute":{v=m(p.hour(),i,d);break}case"second":{v=m(p.hour(),p.minute(),i,d);break}default:{v=m(i,d);break}}if(v!=null&&v.length&&!v.includes(p[h]())){const f=c?0:v.length-1;p=p[h](v[f])}}}),p},l={};return{timePickerOptions:l,getAvailableTime:r,onSetOption:([a,i])=>{l[a]=i}}},yv=e=>{const t=(r,l)=>r||l,o=r=>r!==!0;return e.map(t).filter(o)},cw=(e,t,o)=>({getHoursList:(a,i)=>_v(24,e&&(()=>e==null?void 0:e(a,i))),getMinutesList:(a,i,c)=>_v(60,t&&(()=>t==null?void 0:t(a,i,c))),getSecondsList:(a,i,c,d)=>_v(60,o&&(()=>o==null?void 0:o(a,i,c,d)))}),uw=(e,t,o)=>{const{getHoursList:r,getMinutesList:l,getSecondsList:n}=cw(e,t,o);return{getAvailableHours:(d,u)=>yv(r(d,u)),getAvailableMinutes:(d,u,p)=>yv(l(d,u,p)),getAvailableSeconds:(d,u,p,h)=>yv(n(d,u,p,h))}},dw=e=>{const t=D(e.parsedValue);return Se(()=>e.visible,o=>{o||(t.value=e.parsedValue)}),t},ia=new Map;let pw;Nt&&(document.addEventListener("mousedown",e=>pw=e),document.addEventListener("mouseup",e=>{for(const t of ia.values())for(const{documentHandler:o}of t)o(e,pw)}));function fw(e,t){let o=[];return Array.isArray(t.arg)?o=t.arg:Gr(t.arg)&&o.push(t.arg),function(r,l){const n=t.instance.popperRef,a=r.target,i=l==null?void 0:l.target,c=!t||!t.instance,d=!a||!i,u=e.contains(a)||e.contains(i),p=e===a,h=o.length&&o.some(m=>m==null?void 0:m.contains(a))||o.length&&o.includes(i),v=n&&(n.contains(a)||n.contains(i));c||d||u||p||h||v||t.value(r,l)}}const xn={beforeMount(e,t){ia.has(e)||ia.set(e,[]),ia.get(e).push({documentHandler:fw(e,t),bindingFn:t.value})},updated(e,t){ia.has(e)||ia.set(e,[]);const o=ia.get(e),r=o.findIndex(n=>n.bindingFn===t.oldValue),l={documentHandler:fw(e,t),bindingFn:t.value};r>=0?o.splice(r,1,l):o.push(l)},unmounted(e){ia.delete(e)}},Gq=100,Xq=600,ap={beforeMount(e,t){const o=t.value,{interval:r=Gq,delay:l=Xq}=it(o)?{}:o;let n,a;const i=()=>it(o)?o():o.handler(),c=()=>{a&&(clearTimeout(a),a=void 0),n&&(clearInterval(n),n=void 0)};e.addEventListener("mousedown",d=>{d.button===0&&(c(),i(),document.addEventListener("mouseup",()=>c(),{once:!0}),a=setTimeout(()=>{n=setInterval(()=>{i()},r)},l))})}},xv="_trap-focus-children",Ya=[],hw=e=>{if(Ya.length===0)return;const t=Ya[Ya.length-1][xv];if(t.length>0&&e.code===lt.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const o=e.shiftKey,r=e.target===t[0],l=e.target===t[t.length-1];r&&o&&(e.preventDefault(),t[t.length-1].focus()),l&&!o&&(e.preventDefault(),t[0].focus())}},Zq={beforeMount(e){e[xv]=Hb(e),Ya.push(e),Ya.length<=1&&document.addEventListener("keydown",hw)},updated(e){et(()=>{e[xv]=Hb(e)})},unmounted(){Ya.shift(),Ya.length===0&&document.removeEventListener("keydown",hw)}};var vw=!1,Ga,kv,Cv,ip,sp,mw,cp,Sv,Ev,Tv,gw,$v,Mv,bw,_w;function Ir(){if(!vw){vw=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if($v=/\b(iPhone|iP[ao]d)/.exec(e),Mv=/\b(iP[ao]d)/.exec(e),Tv=/Android/i.exec(e),bw=/FBAN\/\w+;/i.exec(e),_w=/Mobile/i.exec(e),gw=!!/Win64/.exec(e),t){Ga=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Ga&&document&&document.documentMode&&(Ga=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);mw=r?parseFloat(r[1])+4:Ga,kv=t[2]?parseFloat(t[2]):NaN,Cv=t[3]?parseFloat(t[3]):NaN,ip=t[4]?parseFloat(t[4]):NaN,ip?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),sp=t&&t[1]?parseFloat(t[1]):NaN):sp=NaN}else Ga=kv=Cv=sp=ip=NaN;if(o){if(o[1]){var l=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);cp=l?parseFloat(l[1].replace("_",".")):!0}else cp=!1;Sv=!!o[2],Ev=!!o[3]}else cp=Sv=Ev=!1}}var Av={ie:function(){return Ir()||Ga},ieCompatibilityMode:function(){return Ir()||mw>Ga},ie64:function(){return Av.ie()&&gw},firefox:function(){return Ir()||kv},opera:function(){return Ir()||Cv},webkit:function(){return Ir()||ip},safari:function(){return Av.webkit()},chrome:function(){return Ir()||sp},windows:function(){return Ir()||Sv},osx:function(){return Ir()||cp},linux:function(){return Ir()||Ev},iphone:function(){return Ir()||$v},mobile:function(){return Ir()||$v||Mv||Tv||_w},nativeApp:function(){return Ir()||bw},android:function(){return Ir()||Tv},ipad:function(){return Ir()||Mv}},Jq=Av,up=!!(typeof window<"u"&&window.document&&window.document.createElement),Qq={canUseDOM:up,canUseWorkers:typeof Worker<"u",canUseEventListeners:up&&!!(window.addEventListener||window.attachEvent),canUseViewport:up&&!!window.screen,isInWorker:!up},ww=Qq,yw;ww.canUseDOM&&(yw=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function eY(e,t){if(!ww.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var l=document.createElement("div");l.setAttribute(o,"return;"),r=typeof l[o]=="function"}return!r&&yw&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var tY=eY,xw=10,kw=40,Cw=800;function Sw(e){var t=0,o=0,r=0,l=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*xw,l=o*xw,"deltaY"in e&&(l=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||l)&&e.deltaMode&&(e.deltaMode==1?(r*=kw,l*=kw):(r*=Cw,l*=Cw)),r&&!t&&(t=r<1?-1:1),l&&!o&&(o=l<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:l}}Sw.getEventType=function(){return Jq.firefox()?"DOMMouseScroll":tY("wheel")?"wheel":"mousewheel"};var oY=Sw;/** +`,LU=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function BU(e){const t=window.getComputedStyle(e),o=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),l=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:LU.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:l,boxSizing:o}}function v4(e,t=1,o){var r;_l||(_l=document.createElement("textarea"),document.body.appendChild(_l));const{paddingSize:l,borderSize:n,boxSizing:a,contextStyle:i}=BU(e);_l.setAttribute("style",`${i};${RU}`),_l.value=e.value||e.placeholder||"";let c=_l.scrollHeight;const d={};a==="border-box"?c=c+n:a==="content-box"&&(c=c-l),_l.value="";const u=_l.scrollHeight-l;if(st(t)){let p=u*t;a==="border-box"&&(p=p+l+n),c=Math.max(p,c),d.minHeight=`${p}px`}if(st(o)){let p=u*o;a==="border-box"&&(p=p+l+n),c=Math.min(p,c)}return d.height=`${c}px`,(r=_l.parentNode)==null||r.removeChild(_l),_l=void 0,d}const VU=Pe({id:{type:String,default:void 0},size:Oo,disabled:Boolean,modelValue:{type:ue([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ue([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:Xt},prefixIcon:{type:Xt},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:ue([Object,Array,String]),default:()=>uo({})},autofocus:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),DU={[St]:e=>ut(e),input:e=>ut(e),change:e=>ut(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},HU=["role"],FU=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],jU=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],KU=N({...N({name:"ElInput",inheritAttrs:!1}),props:VU,emits:DU,setup(e,{expose:t,emit:o}){const r=e,l=ya(),n=Do(),a=C(()=>{const ye={};return r.containerRole==="combobox"&&(ye["aria-haspopup"]=l["aria-haspopup"],ye["aria-owns"]=l["aria-owns"],ye["aria-expanded"]=l["aria-expanded"]),ye}),i=C(()=>[r.type==="textarea"?_.b():f.b(),f.m(v.value),f.is("disabled",m.value),f.is("exceed",ee.value),{[f.b("group")]:n.prepend||n.append,[f.m("prefix")]:n.prefix||r.prefixIcon,[f.m("suffix")]:n.suffix||r.suffixIcon||r.clearable||r.showPassword,[f.bm("suffix","password-clear")]:U.value&&oe.value,[f.b("hidden")]:r.type==="hidden"},l.class]),c=C(()=>[f.e("wrapper"),f.is("focus",V.value)]),d=xh({excludeKeys:C(()=>Object.keys(a.value))}),{form:u,formItem:p}=sr(),{inputId:h}=bl(r,{formItemContext:p}),v=So(),m=xr(),f=ze("input"),_=ze("textarea"),g=lo(),y=lo(),w=D(!1),x=D(!1),$=D(!1),T=D(),L=lo(r.inputStyle),P=C(()=>g.value||y.value),{wrapperRef:R,isFocused:V,handleFocus:B,handleBlur:F}=Kd(P,{afterBlur(){var ye;r.validateEvent&&((ye=p==null?void 0:p.validate)==null||ye.call(p,"blur").catch(Ye=>void 0))}}),Q=C(()=>{var ye;return(ye=u==null?void 0:u.statusIcon)!=null?ye:!1}),J=C(()=>(p==null?void 0:p.validateState)||""),Z=C(()=>J.value&&bh[J.value]),H=C(()=>$.value?G3:L3),j=C(()=>[l.style]),K=C(()=>[r.inputStyle,L.value,{resize:r.resize}]),I=C(()=>jo(r.modelValue)?"":String(r.modelValue)),U=C(()=>r.clearable&&!m.value&&!r.readonly&&!!I.value&&(V.value||w.value)),oe=C(()=>r.showPassword&&!m.value&&!r.readonly&&!!I.value&&(!!I.value||V.value)),ne=C(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!m.value&&!r.readonly&&!r.showPassword),ce=C(()=>I.value.length),ee=C(()=>!!ne.value&&ce.value>Number(r.maxlength)),Me=C(()=>!!n.suffix||!!r.suffixIcon||U.value||r.showPassword||ne.value||!!J.value&&Q.value),[de,_e]=vK(g);so(y,ye=>{if(Ce(),!ne.value||r.resize!=="both")return;const Ye=ye[0],{width:tt}=Ye.contentRect;T.value={right:`calc(100% - ${tt+15+6}px)`}});const me=()=>{const{type:ye,autosize:Ye}=r;if(!(!Nt||ye!=="textarea"||!y.value))if(Ye){const tt=xt(Ye)?Ye.minRows:void 0,pt=xt(Ye)?Ye.maxRows:void 0,dt=v4(y.value,tt,pt);L.value={overflowY:"hidden",...dt},et(()=>{y.value.offsetHeight,L.value=dt})}else L.value={minHeight:v4(y.value).minHeight}},Ce=(ye=>{let Ye=!1;return()=>{var tt;if(Ye||!r.autosize)return;((tt=y.value)==null?void 0:tt.offsetParent)===null||(ye(),Ye=!0)}})(me),Ee=()=>{const ye=P.value,Ye=r.formatter?r.formatter(I.value):I.value;!ye||ye.value===Ye||(ye.value=Ye)},De=async ye=>{de();let{value:Ye}=ye.target;if(r.formatter&&(Ye=r.parser?r.parser(Ye):Ye),!x.value){if(Ye===I.value){Ee();return}o(St,Ye),o("input",Ye),await et(),Ee(),_e()}},ae=ye=>{o("change",ye.target.value)},pe=ye=>{o("compositionstart",ye),x.value=!0},ke=ye=>{var Ye;o("compositionupdate",ye);const tt=(Ye=ye.target)==null?void 0:Ye.value,pt=tt[tt.length-1]||"";x.value=!yh(pt)},Oe=ye=>{o("compositionend",ye),x.value&&(x.value=!1,De(ye))},we=()=>{$.value=!$.value,Te()},Te=async()=>{var ye;await et(),(ye=P.value)==null||ye.focus()},Ne=()=>{var ye;return(ye=P.value)==null?void 0:ye.blur()},Ie=ye=>{w.value=!1,o("mouseleave",ye)},Ae=ye=>{w.value=!0,o("mouseenter",ye)},xe=ye=>{o("keydown",ye)},We=()=>{var ye;(ye=P.value)==null||ye.select()},qe=()=>{o(St,""),o("change",""),o("clear"),o("input","")};return Se(()=>r.modelValue,()=>{var ye;et(()=>me()),r.validateEvent&&((ye=p==null?void 0:p.validate)==null||ye.call(p,"change").catch(Ye=>void 0))}),Se(I,()=>Ee()),Se(()=>r.type,async()=>{await et(),Ee(),me()}),ft(()=>{!r.formatter&&r.parser,Ee(),et(me)}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-input",ref:"https://element-plus.org/en-US/component/input.html"},C(()=>!!r.label)),t({input:g,textarea:y,ref:P,textareaStyle:K,autosize:Yt(r,"autosize"),focus:Te,blur:Ne,select:We,clear:qe,resizeTextarea:me}),(ye,Ye)=>(b(),M("div",Mt(s(a),{class:[s(i),{[s(f).bm("group","append")]:ye.$slots.append,[s(f).bm("group","prepend")]:ye.$slots.prepend}],style:s(j),role:ye.containerRole,onMouseenter:Ae,onMouseleave:Ie}),[se(" input "),ye.type!=="textarea"?(b(),M(Qe,{key:0},[se(" prepend slot "),ye.$slots.prepend?(b(),M("div",{key:0,class:O(s(f).be("group","prepend"))},[be(ye.$slots,"prepend")],2)):se("v-if",!0),E("div",{ref_key:"wrapperRef",ref:R,class:O(s(c))},[se(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(b(),M("span",{key:0,class:O(s(f).e("prefix"))},[E("span",{class:O(s(f).e("prefix-inner"))},[be(ye.$slots,"prefix"),ye.prefixIcon?(b(),he(s(Ze),{key:0,class:O(s(f).e("icon"))},{default:le(()=>[(b(),he(Et(ye.prefixIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)):se("v-if",!0),E("input",Mt({id:s(h),ref_key:"input",ref:g,class:s(f).e("inner")},s(d),{minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?$.value?"text":"password":ye.type,disabled:s(m),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.label||ye.ariaLabel,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,onCompositionstart:pe,onCompositionupdate:ke,onCompositionend:Oe,onInput:De,onFocus:Ye[0]||(Ye[0]=(...tt)=>s(B)&&s(B)(...tt)),onBlur:Ye[1]||(Ye[1]=(...tt)=>s(F)&&s(F)(...tt)),onChange:ae,onKeydown:xe}),null,16,FU),se(" suffix slot "),s(Me)?(b(),M("span",{key:1,class:O(s(f).e("suffix"))},[E("span",{class:O(s(f).e("suffix-inner"))},[!s(U)||!s(oe)||!s(ne)?(b(),M(Qe,{key:0},[be(ye.$slots,"suffix"),ye.suffixIcon?(b(),he(s(Ze),{key:0,class:O(s(f).e("icon"))},{default:le(()=>[(b(),he(Et(ye.suffixIcon)))]),_:1},8,["class"])):se("v-if",!0)],64)):se("v-if",!0),s(U)?(b(),he(s(Ze),{key:1,class:O([s(f).e("icon"),s(f).e("clear")]),onMousedown:ct(s(qt),["prevent"]),onClick:qe},{default:le(()=>[te(s(hn))]),_:1},8,["class","onMousedown"])):se("v-if",!0),s(oe)?(b(),he(s(Ze),{key:2,class:O([s(f).e("icon"),s(f).e("password")]),onClick:we},{default:le(()=>[(b(),he(Et(s(H))))]),_:1},8,["class"])):se("v-if",!0),s(ne)?(b(),M("span",{key:3,class:O(s(f).e("count"))},[E("span",{class:O(s(f).e("count-inner"))},$e(s(ce))+" / "+$e(ye.maxlength),3)],2)):se("v-if",!0),s(J)&&s(Z)&&s(Q)?(b(),he(s(Ze),{key:4,class:O([s(f).e("icon"),s(f).e("validateIcon"),s(f).is("loading",s(J)==="validating")])},{default:le(()=>[(b(),he(Et(s(Z))))]),_:1},8,["class"])):se("v-if",!0)],2)],2)):se("v-if",!0)],2),se(" append slot "),ye.$slots.append?(b(),M("div",{key:1,class:O(s(f).be("group","append"))},[be(ye.$slots,"append")],2)):se("v-if",!0)],64)):(b(),M(Qe,{key:1},[se(" textarea "),E("textarea",Mt({id:s(h),ref_key:"textarea",ref:y,class:[s(_).e("inner"),s(f).is("focus",s(V))]},s(d),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:s(m),readonly:ye.readonly,autocomplete:ye.autocomplete,style:s(K),"aria-label":ye.label||ye.ariaLabel,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,onCompositionstart:pe,onCompositionupdate:ke,onCompositionend:Oe,onInput:De,onFocus:Ye[2]||(Ye[2]=(...tt)=>s(B)&&s(B)(...tt)),onBlur:Ye[3]||(Ye[3]=(...tt)=>s(F)&&s(F)(...tt)),onChange:ae,onKeydown:xe}),null,16,jU),s(ne)?(b(),M("span",{key:0,style:Je(T.value),class:O(s(f).e("count"))},$e(s(ce))+" / "+$e(ye.maxlength),7)):se("v-if",!0)],64))],16,HU))}});var UU=Le(KU,[["__file","input.vue"]]);const cr=yt(UU),Qi=4,m4={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},WU=({move:e,size:t,bar:o})=>({[o.size]:t,transform:`translate${o.axis}(${e}%)`}),ov=Symbol("scrollbarContextKey"),qU=Pe({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),YU="Thumb";var g4=Le(N({__name:"thumb",props:qU,setup(e){const t=e,o=Ge(ov),r=ze("scrollbar");o||Io(YU,"can not inject scrollbar context");const l=D(),n=D(),a=D({}),i=D(!1);let c=!1,d=!1,u=Nt?document.onselectstart:null;const p=C(()=>m4[t.vertical?"vertical":"horizontal"]),h=C(()=>WU({size:t.size,move:t.move,bar:p.value})),v=C(()=>l.value[p.value.offset]**2/o.wrapElement[p.value.scrollSize]/t.ratio/n.value[p.value.offset]),m=T=>{var L;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(L=window.getSelection())==null||L.removeAllRanges(),_(T);const P=T.currentTarget;P&&(a.value[p.value.axis]=P[p.value.offset]-(T[p.value.client]-P.getBoundingClientRect()[p.value.direction]))},f=T=>{if(!n.value||!l.value||!o.wrapElement)return;const L=Math.abs(T.target.getBoundingClientRect()[p.value.direction]-T[p.value.client]),P=n.value[p.value.offset]/2,R=(L-P)*100*v.value/l.value[p.value.offset];o.wrapElement[p.value.scroll]=R*o.wrapElement[p.value.scrollSize]/100},_=T=>{T.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),u=document.onselectstart,document.onselectstart=()=>!1},g=T=>{if(!l.value||!n.value||c===!1)return;const L=a.value[p.value.axis];if(!L)return;const P=(l.value.getBoundingClientRect()[p.value.direction]-T[p.value.client])*-1,R=n.value[p.value.offset]-L,V=(P-R)*100*v.value/l.value[p.value.offset];o.wrapElement[p.value.scroll]=V*o.wrapElement[p.value.scrollSize]/100},y=()=>{c=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",y),$(),d&&(i.value=!1)},w=()=>{d=!1,i.value=!!t.size},x=()=>{d=!0,i.value=c};to(()=>{$(),document.removeEventListener("mouseup",y)});const $=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return oo(Yt(o,"scrollbarElement"),"mousemove",w),oo(Yt(o,"scrollbarElement"),"mouseleave",x),(T,L)=>(b(),he(Mo,{name:s(r).b("fade"),persisted:""},{default:le(()=>[mt(E("div",{ref_key:"instance",ref:l,class:O([s(r).e("bar"),s(r).is(s(p).key)]),onMousedown:f},[E("div",{ref_key:"thumb",ref:n,class:O(s(r).e("thumb")),style:Je(s(h)),onMousedown:m},null,38)],34),[[Lt,T.always||i.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const GU=Pe({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var XU=Le(N({__name:"bar",props:GU,setup(e,{expose:t}){const o=e,r=Ge(ov),l=D(0),n=D(0),a=D(""),i=D(""),c=D(1),d=D(1);return t({handleScroll:h=>{if(h){const v=h.offsetHeight-Qi,m=h.offsetWidth-Qi;n.value=h.scrollTop*100/v*c.value,l.value=h.scrollLeft*100/m*d.value}},update:()=>{const h=r==null?void 0:r.wrapElement;if(!h)return;const v=h.offsetHeight-Qi,m=h.offsetWidth-Qi,f=v**2/h.scrollHeight,_=m**2/h.scrollWidth,g=Math.max(f,o.minSize),y=Math.max(_,o.minSize);c.value=f/(v-f)/(g/(v-g)),d.value=_/(m-_)/(y/(m-y)),i.value=g+Qi(b(),M(Qe,null,[te(g4,{move:l.value,ratio:d.value,size:a.value,always:h.always},null,8,["move","ratio","size","always"]),te(g4,{move:n.value,ratio:c.value,size:i.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const ZU=Pe({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:ue([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,...Zo(["ariaLabel","ariaOrientation"])}),JU=N({...N({name:"ElScrollbar"}),props:ZU,emits:{scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(st)},setup(e,{expose:t,emit:o}){const r=e,l=ze("scrollbar");let n,a;const i=D(),c=D(),d=D(),u=D(),p=C(()=>{const w={};return r.height&&(w.height=go(r.height)),r.maxHeight&&(w.maxHeight=go(r.maxHeight)),[r.wrapStyle,w]}),h=C(()=>[r.wrapClass,l.e("wrap"),{[l.em("wrap","hidden-default")]:!r.native}]),v=C(()=>[l.e("view"),r.viewClass]),m=()=>{var w;c.value&&((w=u.value)==null||w.handleScroll(c.value),o("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function f(w,x){xt(w)?c.value.scrollTo(w):st(w)&&st(x)&&c.value.scrollTo(w,x)}const _=w=>{st(w)&&(c.value.scrollTop=w)},g=w=>{st(w)&&(c.value.scrollLeft=w)},y=()=>{var w;(w=u.value)==null||w.update()};return Se(()=>r.noresize,w=>{w?(n==null||n(),a==null||a()):({stop:n}=so(d,y),a=oo("resize",y))},{immediate:!0}),Se(()=>[r.maxHeight,r.height],()=>{r.native||et(()=>{var w;y(),c.value&&((w=u.value)==null||w.handleScroll(c.value))})}),zt(ov,Dt({scrollbarElement:i,wrapElement:c})),ft(()=>{r.native||et(()=>{y()})}),rn(()=>y()),t({wrapRef:c,update:y,scrollTo:f,setScrollTop:_,setScrollLeft:g,handleScroll:m}),(w,x)=>(b(),M("div",{ref_key:"scrollbarRef",ref:i,class:O(s(l).b())},[E("div",{ref_key:"wrapRef",ref:c,class:O(s(h)),style:Je(s(p)),onScroll:m},[(b(),he(Et(w.tag),{id:w.id,ref_key:"resizeRef",ref:d,class:O(s(v)),style:Je(w.viewStyle),role:w.role,"aria-label":w.ariaLabel,"aria-orientation":w.ariaOrientation},{default:le(()=>[be(w.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),w.native?se("v-if",!0):(b(),he(XU,{key:0,ref_key:"barRef",ref:u,always:w.always,"min-size":w.minSize},null,8,["always","min-size"]))],2))}});var QU=Le(JU,[["__file","scrollbar.vue"]]);const wn=yt(QU),rv=Symbol("popper"),b4=Symbol("popperContent"),_4=Pe({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),eW=N({...N({name:"ElPopper",inheritAttrs:!1}),props:_4,setup(e,{expose:t}){const o=e,r=D(),l=D(),n=D(),a=D(),i=C(()=>o.role),c={triggerRef:r,popperInstanceRef:l,contentRef:n,referenceRef:a,role:i};return t(c),zt(rv,c),(d,u)=>be(d.$slots,"default")}});var tW=Le(eW,[["__file","popper.vue"]]);const w4=Pe({arrowOffset:{type:Number,default:5}}),oW=N({...N({name:"ElPopperArrow",inheritAttrs:!1}),props:w4,setup(e,{expose:t}){const o=e,r=ze("popper"),{arrowOffset:l,arrowRef:n,arrowStyle:a}=Ge(b4,void 0);return Se(()=>o.arrowOffset,i=>{l.value=i}),to(()=>{n.value=void 0}),t({arrowRef:n}),(i,c)=>(b(),M("span",{ref_key:"arrowRef",ref:n,class:O(s(r).e("arrow")),style:Je(s(a)),"data-popper-arrow":""},null,6))}});var rW=Le(oW,[["__file","arrow.vue"]]);const y4=N({name:"ElOnlyChild",setup(e,{slots:t,attrs:o}){var r;const l=Ge(I6),n=zj((r=l==null?void 0:l.setForwardRef)!=null?r:qt);return()=>{var a;const i=(a=t.default)==null?void 0:a.call(t,o);if(!i||i.length>1)return null;const c=x4(i);return c?mt(nn(c,o),[[n]]):null}}});function x4(e){if(!e)return null;const t=e;for(const o of t){if(xt(o))switch(o.type){case Jo:continue;case vi:case"svg":return k4(o);case Qe:return x4(o.children);default:return o}return k4(o)}return null}function k4(e){const t=ze("only-child");return te("span",{class:t.e("content")},[e])}const C4=Pe({virtualRef:{type:ue(Object)},virtualTriggering:Boolean,onMouseenter:{type:ue(Function)},onMouseleave:{type:ue(Function)},onClick:{type:ue(Function)},onKeydown:{type:ue(Function)},onFocus:{type:ue(Function)},onBlur:{type:ue(Function)},onContextmenu:{type:ue(Function)},id:String,open:Boolean}),lW=N({...N({name:"ElPopperTrigger",inheritAttrs:!1}),props:C4,setup(e,{expose:t}){const o=e,{role:r,triggerRef:l}=Ge(rv,void 0);Aj(l);const n=C(()=>i.value?o.id:void 0),a=C(()=>{if(r&&r.value==="tooltip")return o.open&&o.id?o.id:void 0}),i=C(()=>{if(r&&r.value!=="tooltip")return r.value}),c=C(()=>i.value?`${o.open}`:void 0);let d;return ft(()=>{Se(()=>o.virtualRef,u=>{u&&(l.value=$r(u))},{immediate:!0}),Se(l,(u,p)=>{d==null||d(),d=void 0,Gr(u)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(h=>{var v;const m=o[h];m&&(u.addEventListener(h.slice(2).toLowerCase(),m),(v=p==null?void 0:p.removeEventListener)==null||v.call(p,h.slice(2).toLowerCase(),m))}),d=Se([n,a,i,c],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((v,m)=>{jo(h[m])?u.removeAttribute(v):u.setAttribute(v,h[m])})},{immediate:!0})),Gr(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>p.removeAttribute(h))},{immediate:!0})}),to(()=>{d==null||d(),d=void 0}),t({triggerRef:l}),(u,p)=>u.virtualTriggering?se("v-if",!0):(b(),he(s(y4),Mt({key:0},u.$attrs,{"aria-controls":s(n),"aria-describedby":s(a),"aria-expanded":s(c),"aria-haspopup":s(i)}),{default:le(()=>[be(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var nW=Le(lW,[["__file","trigger.vue"]]);const lv="focus-trap.focus-after-trapped",nv="focus-trap.focus-after-released",aW="focus-trap.focusout-prevented",S4={cancelable:!0,bubbles:!1},iW={cancelable:!0,bubbles:!1},E4="focusAfterTrapped",T4="focusAfterReleased",av=Symbol("elFocusTrap"),iv=D(),Jd=D(0),sv=D(0);let Qd=0;const $4=e=>{const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const l=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||l?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t},M4=(e,t)=>{for(const o of e)if(!sW(o,t))return o},sW=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},cW=e=>{const t=$4(e),o=M4(t,e),r=M4(t.reverse(),e);return[o,r]},uW=e=>e instanceof HTMLInputElement&&"select"in e,ra=(e,t)=>{if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),sv.value=window.performance.now(),e!==o&&uW(e)&&t&&e.select()}};function A4(e,t){const o=[...e],r=e.indexOf(t);return r!==-1&&o.splice(r,1),o}const dW=()=>{let e=[];return{push:r=>{const l=e[0];l&&r!==l&&l.pause(),e=A4(e,r),e.unshift(r)},remove:r=>{var l,n;e=A4(e,r),(n=(l=e[0])==null?void 0:l.resume)==null||n.call(l)}}},pW=(e,t=!1)=>{const o=document.activeElement;for(const r of e)if(ra(r,t),document.activeElement!==o)return},z4=dW(),fW=()=>Jd.value>sv.value,ep=()=>{iv.value="pointer",Jd.value=window.performance.now()},I4=()=>{iv.value="keyboard",Jd.value=window.performance.now()},hW=()=>(ft(()=>{Qd===0&&(document.addEventListener("mousedown",ep),document.addEventListener("touchstart",ep),document.addEventListener("keydown",I4)),Qd++}),to(()=>{Qd--,Qd<=0&&(document.removeEventListener("mousedown",ep),document.removeEventListener("touchstart",ep),document.removeEventListener("keydown",I4))}),{focusReason:iv,lastUserFocusTimestamp:Jd,lastAutomatedFocusTimestamp:sv}),tp=e=>new CustomEvent(aW,{...iW,detail:e}),vW=N({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[E4,T4,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const o=D();let r,l;const{focusReason:n}=hW();Sj(m=>{e.trapped&&!a.paused&&t("release-requested",m)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},i=m=>{if(!e.loop&&!e.trapped||a.paused)return;const{key:f,altKey:_,ctrlKey:g,metaKey:y,currentTarget:w,shiftKey:x}=m,{loop:$}=e,T=f===lt.tab&&!_&&!g&&!y,L=document.activeElement;if(T&&L){const P=w,[R,V]=cW(P);if(R&&V){if(!x&&L===V){const F=tp({focusReason:n.value});t("focusout-prevented",F),F.defaultPrevented||(m.preventDefault(),$&&ra(R,!0))}else if(x&&[R,P].includes(L)){const F=tp({focusReason:n.value});t("focusout-prevented",F),F.defaultPrevented||(m.preventDefault(),$&&ra(V,!0))}}else if(L===P){const F=tp({focusReason:n.value});t("focusout-prevented",F),F.defaultPrevented||m.preventDefault()}}};zt(av,{focusTrapRef:o,onKeydown:i}),Se(()=>e.focusTrapEl,m=>{m&&(o.value=m)},{immediate:!0}),Se([o],([m],[f])=>{m&&(m.addEventListener("keydown",i),m.addEventListener("focusin",u),m.addEventListener("focusout",p)),f&&(f.removeEventListener("keydown",i),f.removeEventListener("focusin",u),f.removeEventListener("focusout",p))});const c=m=>{t(E4,m)},d=m=>t(T4,m),u=m=>{const f=s(o);if(!f)return;const _=m.target,g=m.relatedTarget,y=_&&f.contains(_);e.trapped||g&&f.contains(g)||(r=g),y&&t("focusin",m),!a.paused&&e.trapped&&(y?l=_:ra(l,!0))},p=m=>{const f=s(o);if(!(a.paused||!f))if(e.trapped){const _=m.relatedTarget;!jo(_)&&!f.contains(_)&&setTimeout(()=>{if(!a.paused&&e.trapped){const g=tp({focusReason:n.value});t("focusout-prevented",g),g.defaultPrevented||ra(l,!0)}},0)}else{const _=m.target;_&&f.contains(_)||t("focusout",m)}};async function h(){await et();const m=s(o);if(m){z4.push(a);const f=m.contains(document.activeElement)?r:document.activeElement;if(r=f,!m.contains(f)){const g=new Event(lv,S4);m.addEventListener(lv,c),m.dispatchEvent(g),g.defaultPrevented||et(()=>{let y=e.focusStartEl;ut(y)||(ra(y),document.activeElement!==y&&(y="first")),y==="first"&&pW($4(m),!0),(document.activeElement===f||y==="container")&&ra(m)})}}}function v(){const m=s(o);if(m){m.removeEventListener(lv,c);const f=new CustomEvent(nv,{...S4,detail:{focusReason:n.value}});m.addEventListener(nv,d),m.dispatchEvent(f),!f.defaultPrevented&&(n.value=="keyboard"||!fW()||m.contains(document.activeElement))&&ra(r??document.body),m.removeEventListener(nv,d),z4.remove(a)}}return ft(()=>{e.trapped&&h(),Se(()=>e.trapped,m=>{m?h():v()})}),to(()=>{e.trapped&&v()}),{onKeydown:i}}});function mW(e,t,o,r,l,n){return be(e.$slots,"default",{handleKeydown:e.onKeydown})}var Oc=Le(vW,[["render",mW],["__file","focus-trap.vue"]]);const gW=["fixed","absolute"],bW=Pe({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ue(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Va,default:"bottom"},popperOptions:{type:ue(Object),default:()=>({})},strategy:{type:String,values:gW,default:"absolute"}}),O4=Pe({...bW,id:String,style:{type:ue([String,Array,Object])},className:{type:ue([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:ue([String,Array,Object])},popperStyle:{type:ue([String,Array,Object])},referenceEl:{type:ue(Object)},triggerTargetEl:{type:ue(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Zo(["ariaLabel"])}),_W={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},wW=(e,t=[])=>{const{placement:o,strategy:r,popperOptions:l}=e,n={placement:o,strategy:r,...l,modifiers:[...xW(e),...t]};return kW(n,l==null?void 0:l.modifiers),n},yW=e=>{if(Nt)return $r(e)};function xW(e){const{offset:t,gpuAcceleration:o,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:o}}]}function kW(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const CW=0,SW=e=>{const{popperInstanceRef:t,contentRef:o,triggerRef:r,role:l}=Ge(rv,void 0),n=D(),a=D(),i=C(()=>({name:"eventListeners",enabled:!!e.visible})),c=C(()=>{var g;const y=s(n),w=(g=s(a))!=null?g:CW;return{name:"arrow",enabled:!k3(y),options:{element:y,padding:w}}}),d=C(()=>({onFirstUpdate:()=>{m()},...wW(e,[s(c),s(i)])})),u=C(()=>yW(e.referenceEl)||s(r)),{attributes:p,state:h,styles:v,update:m,forceUpdate:f,instanceRef:_}=yj(u,o,d);return Se(_,g=>t.value=g),ft(()=>{Se(()=>{var g;return(g=s(u))==null?void 0:g.getBoundingClientRect()},()=>{m()})}),{attributes:p,arrowRef:n,contentRef:o,instanceRef:_,state:h,styles:v,role:l,forceUpdate:f,update:m}},EW=(e,{attributes:t,styles:o,role:r})=>{const{nextZIndex:l}=Ki(),n=ze("popper"),a=C(()=>s(t).popper),i=D(st(e.zIndex)?e.zIndex:l()),c=C(()=>[n.b(),n.is("pure",e.pure),n.is(e.effect),e.popperClass]),d=C(()=>[{zIndex:s(i)},s(o).popper,e.popperStyle||{}]),u=C(()=>r.value==="dialog"?"false":void 0),p=C(()=>s(o).arrow||{});return{ariaModal:u,arrowStyle:p,contentAttrs:a,contentClass:c,contentStyle:d,contentZIndex:i,updateZIndex:()=>{i.value=st(e.zIndex)?e.zIndex:l()}}},TW=(e,t)=>{const o=D(!1),r=D();return{focusStartRef:r,trapped:o,onFocusAfterReleased:d=>{var u;((u=d.detail)==null?void 0:u.focusReason)!=="pointer"&&(r.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!o.value&&(d.target&&(r.value=d.target),o.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),o.value=!1)},onReleaseRequested:()=>{o.value=!1,t("close")}}},$W=N({...N({name:"ElPopperContent"}),props:O4,emits:_W,setup(e,{expose:t,emit:o}){const r=e,{focusStartRef:l,trapped:n,onFocusAfterReleased:a,onFocusAfterTrapped:i,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:u}=TW(r,o),{attributes:p,arrowRef:h,contentRef:v,styles:m,instanceRef:f,role:_,update:g}=SW(r),{ariaModal:y,arrowStyle:w,contentAttrs:x,contentClass:$,contentStyle:T,updateZIndex:L}=EW(r,{styles:m,attributes:p,role:_}),P=Ge(Hl,void 0),R=D();zt(b4,{arrowStyle:w,arrowRef:h,arrowOffset:R}),P&&zt(Hl,{...P,addInputId:qt,removeInputId:qt});let V;const B=(Q=!0)=>{g(),Q&&L()},F=()=>{B(!1),r.visible&&r.focusOnShow?n.value=!0:r.visible===!1&&(n.value=!1)};return ft(()=>{Se(()=>r.triggerTargetEl,(Q,J)=>{V==null||V(),V=void 0;const Z=s(Q||v.value),H=s(J||v.value);Gr(Z)&&(V=Se([_,()=>r.ariaLabel,y,()=>r.id],j=>{["role","aria-label","aria-modal","id"].forEach((K,I)=>{jo(j[I])?Z.removeAttribute(K):Z.setAttribute(K,j[I])})},{immediate:!0})),H!==Z&&Gr(H)&&["role","aria-label","aria-modal","id"].forEach(j=>{H.removeAttribute(j)})},{immediate:!0}),Se(()=>r.visible,F,{immediate:!0})}),to(()=>{V==null||V(),V=void 0}),t({popperContentRef:v,popperInstanceRef:f,updatePopper:B,contentStyle:T}),(Q,J)=>(b(),M("div",Mt({ref_key:"contentRef",ref:v},s(x),{style:s(T),class:s($),tabindex:"-1",onMouseenter:J[0]||(J[0]=Z=>Q.$emit("mouseenter",Z)),onMouseleave:J[1]||(J[1]=Z=>Q.$emit("mouseleave",Z))}),[te(s(Oc),{trapped:s(n),"trap-on-focus-in":!0,"focus-trap-el":s(v),"focus-start-el":s(l),onFocusAfterTrapped:s(i),onFocusAfterReleased:s(a),onFocusin:s(c),onFocusoutPrevented:s(d),onReleaseRequested:s(u)},{default:le(()=>[be(Q.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var MW=Le($W,[["__file","content.vue"]]);const N4=yt(tW),op=Symbol("elTooltip"),Uo=Pe({...$j,...O4,appendTo:{type:ue([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,visible:{type:ue(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Zo(["ariaLabel"])}),Nc=Pe({...C4,disabled:Boolean,trigger:{type:ue([String,Array]),default:"hover"},triggerKeys:{type:ue(Array),default:()=>[lt.enter,lt.space]}}),{useModelToggleProps:AW,useModelToggleEmits:zW,useModelToggle:IW}=n6("visible"),OW=Pe({..._4,...AW,...Uo,...Nc,...w4,showArrow:{type:Boolean,default:!0}}),NW=[...zW,"before-show","before-hide","show","hide","open","close"],PW=(e,t)=>Ke(e)?e.includes(t):e===t,es=(e,t,o)=>r=>{PW(s(e),t)&&o(r)},RW=N({...N({name:"ElTooltipTrigger"}),props:Nc,setup(e,{expose:t}){const o=e,r=ze("tooltip"),{controlled:l,id:n,open:a,onOpen:i,onClose:c,onToggle:d}=Ge(op,void 0),u=D(null),p=()=>{if(s(l)||o.disabled)return!0},h=Yt(o,"trigger"),v=vo(p,es(h,"hover",i)),m=vo(p,es(h,"hover",c)),f=vo(p,es(h,"click",x=>{x.button===0&&d(x)})),_=vo(p,es(h,"focus",i)),g=vo(p,es(h,"focus",c)),y=vo(p,es(h,"contextmenu",x=>{x.preventDefault(),d(x)})),w=vo(p,x=>{const{code:$}=x;o.triggerKeys.includes($)&&(x.preventDefault(),d(x))});return t({triggerRef:u}),(x,$)=>(b(),he(s(nW),{id:s(n),"virtual-ref":x.virtualRef,open:s(a),"virtual-triggering":x.virtualTriggering,class:O(s(r).e("trigger")),onBlur:s(g),onClick:s(f),onContextmenu:s(y),onFocus:s(_),onMouseenter:s(v),onMouseleave:s(m),onKeydown:s(w)},{default:le(()=>[be(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var LW=Le(RW,[["__file","trigger.vue"]]);const BW=N({...N({name:"ElTooltipContent",inheritAttrs:!1}),props:Uo,setup(e,{expose:t}){const o=e,{selector:r}=z6(),l=ze("tooltip"),n=D(null),a=D(!1),{controlled:i,id:c,open:d,trigger:u,onClose:p,onOpen:h,onShow:v,onHide:m,onBeforeShow:f,onBeforeHide:_}=Ge(op,void 0),g=C(()=>o.transition||`${l.namespace.value}-fade-in-linear`),y=C(()=>o.persistent);to(()=>{a.value=!0});const w=C(()=>s(y)?!0:s(d)),x=C(()=>o.disabled?!1:s(d)),$=C(()=>o.appendTo||r.value),T=C(()=>{var j;return(j=o.style)!=null?j:{}}),L=C(()=>!s(d)),P=()=>{m()},R=()=>{if(s(i))return!0},V=vo(R,()=>{o.enterable&&s(u)==="hover"&&h()}),B=vo(R,()=>{s(u)==="hover"&&p()}),F=()=>{var j,K;(K=(j=n.value)==null?void 0:j.updatePopper)==null||K.call(j),f==null||f()},Q=()=>{_==null||_()},J=()=>{v(),H=z0(C(()=>{var j;return(j=n.value)==null?void 0:j.popperContentRef}),()=>{if(s(i))return;s(u)!=="hover"&&p()})},Z=()=>{o.virtualTriggering||p()};let H;return Se(()=>s(d),j=>{j||H==null||H()},{flush:"post"}),Se(()=>o.content,()=>{var j,K;(K=(j=n.value)==null?void 0:j.updatePopper)==null||K.call(j)}),t({contentRef:n}),(j,K)=>(b(),he(hi,{disabled:!j.teleported,to:s($)},[te(Mo,{name:s(g),onAfterLeave:P,onBeforeEnter:F,onAfterEnter:J,onBeforeLeave:Q},{default:le(()=>[s(w)?mt((b(),he(s(MW),Mt({key:0,id:s(c),ref_key:"contentRef",ref:n},j.$attrs,{"aria-label":j.ariaLabel,"aria-hidden":s(L),"boundaries-padding":j.boundariesPadding,"fallback-placements":j.fallbackPlacements,"gpu-acceleration":j.gpuAcceleration,offset:j.offset,placement:j.placement,"popper-options":j.popperOptions,strategy:j.strategy,effect:j.effect,enterable:j.enterable,pure:j.pure,"popper-class":j.popperClass,"popper-style":[j.popperStyle,s(T)],"reference-el":j.referenceEl,"trigger-target-el":j.triggerTargetEl,visible:s(x),"z-index":j.zIndex,onMouseenter:s(V),onMouseleave:s(B),onBlur:Z,onClose:s(p)}),{default:le(()=>[a.value?se("v-if",!0):be(j.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Lt,s(x)]]):se("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var VW=Le(BW,[["__file","content.vue"]]);const DW=["innerHTML"],HW={key:1},FW=N({...N({name:"ElTooltip"}),props:OW,emits:NW,setup(e,{expose:t,emit:o}){const r=e;Tj();const l=Qo(),n=D(),a=D(),i=()=>{var g;const y=s(n);y&&((g=y.popperInstanceRef)==null||g.update())},c=D(!1),d=D(),{show:u,hide:p,hasUpdateHandler:h}=IW({indicator:c,toggleReason:d}),{onOpen:v,onClose:m}=Mj({showAfter:Yt(r,"showAfter"),hideAfter:Yt(r,"hideAfter"),autoClose:Yt(r,"autoClose"),open:u,close:p}),f=C(()=>Co(r.visible)&&!h.value);zt(op,{controlled:f,id:l,open:ui(c),trigger:Yt(r,"trigger"),onOpen:g=>{v(g)},onClose:g=>{m(g)},onToggle:g=>{s(c)?m(g):v(g)},onShow:()=>{o("show",d.value)},onHide:()=>{o("hide",d.value)},onBeforeShow:()=>{o("before-show",d.value)},onBeforeHide:()=>{o("before-hide",d.value)},updatePopper:i}),Se(()=>r.disabled,g=>{g&&c.value&&(c.value=!1)});const _=g=>{var y,w;const x=(w=(y=a.value)==null?void 0:y.contentRef)==null?void 0:w.popperContentRef,$=(g==null?void 0:g.relatedTarget)||document.activeElement;return x&&x.contains($)};return Fg(()=>c.value&&p()),t({popperRef:n,contentRef:a,isFocusInsideContent:_,updatePopper:i,onOpen:v,onClose:m,hide:p}),(g,y)=>(b(),he(s(N4),{ref_key:"popperRef",ref:n,role:g.role},{default:le(()=>[te(LW,{disabled:g.disabled,trigger:g.trigger,"trigger-keys":g.triggerKeys,"virtual-ref":g.virtualRef,"virtual-triggering":g.virtualTriggering},{default:le(()=>[g.$slots.default?be(g.$slots,"default",{key:0}):se("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),te(VW,{ref_key:"contentRef",ref:a,"aria-label":g.ariaLabel,"boundaries-padding":g.boundariesPadding,content:g.content,disabled:g.disabled,effect:g.effect,enterable:g.enterable,"fallback-placements":g.fallbackPlacements,"hide-after":g.hideAfter,"gpu-acceleration":g.gpuAcceleration,offset:g.offset,persistent:g.persistent,"popper-class":g.popperClass,"popper-style":g.popperStyle,placement:g.placement,"popper-options":g.popperOptions,pure:g.pure,"raw-content":g.rawContent,"reference-el":g.referenceEl,"trigger-target-el":g.triggerTargetEl,"show-after":g.showAfter,strategy:g.strategy,teleported:g.teleported,transition:g.transition,"virtual-triggering":g.virtualTriggering,"z-index":g.zIndex,"append-to":g.appendTo},{default:le(()=>[be(g.$slots,"content",{},()=>[g.rawContent?(b(),M("span",{key:0,innerHTML:g.content},null,8,DW)):(b(),M("span",HW,$e(g.content),1))]),g.showArrow?(b(),he(s(rW),{key:0,"arrow-offset":g.arrowOffset},null,8,["arrow-offset"])):se("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var jW=Le(FW,[["__file","tooltip.vue"]]);const ur=yt(jW),KW=Pe({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:ue(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:ue([Function,Array]),default:qt},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:Uo.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...Zo(["ariaLabel"])}),UW={[St]:e=>ut(e),[yr]:e=>ut(e),[ro]:e=>ut(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>xt(e)},WW=["aria-expanded","aria-owns"],qW={key:0},YW=["id","aria-selected","onClick"],P4="ElAutocomplete",GW=N({...N({name:P4,inheritAttrs:!1}),props:KW,emits:UW,setup(e,{expose:t,emit:o}){const r=e,l=xh(),n=ya(),a=xr(),i=ze("autocomplete"),c=D(),d=D(),u=D(),p=D();let h=!1,v=!1;const m=D([]),f=D(-1),_=D(""),g=D(!1),y=D(!1),w=D(!1),x=Qo(),$=C(()=>n.style),T=C(()=>(m.value.length>0||w.value)&&g.value),L=C(()=>!r.hideLoading&&w.value),P=C(()=>c.value?Array.from(c.value.$el.querySelectorAll("input")):[]),R=()=>{T.value&&(_.value=`${c.value.$el.offsetWidth}px`)},V=()=>{f.value=-1},F=Mr(async de=>{if(y.value)return;const _e=me=>{w.value=!1,!y.value&&(Ke(me)?(m.value=me,f.value=r.highlightFirstItem?0:-1):Io(P4,"autocomplete suggestions must be an array"))};if(w.value=!0,Ke(r.fetchSuggestions))_e(r.fetchSuggestions);else{const me=await r.fetchSuggestions(de,_e);Ke(me)&&_e(me)}},r.debounce),Q=de=>{const _e=!!de;if(o(yr,de),o(St,de),y.value=!1,g.value||(g.value=_e),!r.triggerOnFocus&&!de){y.value=!0,m.value=[];return}F(de)},J=de=>{var _e;a.value||(((_e=de.target)==null?void 0:_e.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},Z=de=>{o(ro,de)},H=de=>{v?v=!1:(g.value=!0,o("focus",de),r.triggerOnFocus&&!h&&F(String(r.modelValue)))},j=de=>{setTimeout(()=>{var _e;if((_e=u.value)!=null&&_e.isFocusInsideContent()){v=!0;return}g.value&&oe(),o("blur",de)})},K=()=>{g.value=!1,o(St,""),o("clear")},I=async()=>{T.value&&f.value>=0&&f.value{T.value&&(de.preventDefault(),de.stopPropagation(),oe())},oe=()=>{g.value=!1},ne=()=>{var de;(de=c.value)==null||de.focus()},ce=()=>{var de;(de=c.value)==null||de.blur()},ee=async de=>{o(yr,de[r.valueKey]),o(St,de[r.valueKey]),o("select",de),m.value=[],f.value=-1},Me=de=>{if(!T.value||w.value)return;if(de<0){f.value=-1;return}de>=m.value.length&&(de=m.value.length-1);const _e=d.value.querySelector(`.${i.be("suggestion","wrap")}`),Re=_e.querySelectorAll(`.${i.be("suggestion","list")} li`)[de],Ce=_e.scrollTop,{offsetTop:Ee,scrollHeight:De}=Re;Ee+De>Ce+_e.clientHeight&&(_e.scrollTop+=De),Ee{T.value&&oe()}),ft(()=>{c.value.ref.setAttribute("role","textbox"),c.value.ref.setAttribute("aria-autocomplete","list"),c.value.ref.setAttribute("aria-controls","id"),c.value.ref.setAttribute("aria-activedescendant",`${x.value}-item-${f.value}`),h=c.value.ref.hasAttribute("readonly")}),t({highlightedIndex:f,activated:g,loading:w,inputRef:c,popperRef:u,suggestions:m,handleSelect:ee,handleKeyEnter:I,focus:ne,blur:ce,close:oe,highlight:Me}),(de,_e)=>(b(),he(s(ur),{ref_key:"popperRef",ref:u,visible:s(T),placement:de.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[s(i).e("popper"),de.popperClass],teleported:de.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${s(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:R,onHide:V},{content:le(()=>[E("div",{ref_key:"regionRef",ref:d,class:O([s(i).b("suggestion"),s(i).is("loading",s(L))]),style:Je({[de.fitInputWidth?"width":"minWidth"]:_.value,outline:"none"}),role:"region"},[te(s(wn),{id:s(x),tag:"ul","wrap-class":s(i).be("suggestion","wrap"),"view-class":s(i).be("suggestion","list"),role:"listbox"},{default:le(()=>[s(L)?(b(),M("li",qW,[be(de.$slots,"loading",{},()=>[te(s(Ze),{class:O(s(i).is("loading"))},{default:le(()=>[te(s(vn))]),_:1},8,["class"])])])):(b(!0),M(Qe,{key:1},It(m.value,(me,Re)=>(b(),M("li",{id:`${s(x)}-item-${Re}`,key:Re,class:O({highlighted:f.value===Re}),role:"option","aria-selected":f.value===Re,onClick:Ce=>ee(me)},[be(de.$slots,"default",{item:me},()=>[Ct($e(me[de.valueKey]),1)])],10,YW))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:le(()=>[E("div",{ref_key:"listboxRef",ref:p,class:O([s(i).b(),de.$attrs.class]),style:Je(s($)),role:"combobox","aria-haspopup":"listbox","aria-expanded":s(T),"aria-owns":s(x)},[te(s(cr),Mt({ref_key:"inputRef",ref:c},s(l),{clearable:de.clearable,disabled:s(a),name:de.name,"model-value":de.modelValue,"aria-label":de.ariaLabel,onInput:Q,onChange:Z,onFocus:H,onBlur:j,onClear:K,onKeydown:[_e[0]||(_e[0]=Gt(ct(me=>Me(f.value-1),["prevent"]),["up"])),_e[1]||(_e[1]=Gt(ct(me=>Me(f.value+1),["prevent"]),["down"])),Gt(I,["enter"]),Gt(oe,["tab"]),Gt(U,["esc"])],onMousedown:J}),ln({_:2},[de.$slots.prepend?{name:"prepend",fn:le(()=>[be(de.$slots,"prepend")])}:void 0,de.$slots.append?{name:"append",fn:le(()=>[be(de.$slots,"append")])}:void 0,de.$slots.prefix?{name:"prefix",fn:le(()=>[be(de.$slots,"prefix")])}:void 0,de.$slots.suffix?{name:"suffix",fn:le(()=>[be(de.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,WW)]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var XW=Le(GW,[["__file","autocomplete.vue"]]);const ZW=yt(XW),JW=Pe({size:{type:[Number,String],values:Rl,default:"",validator:e=>st(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:Xt},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:ue(String),default:"cover"}}),QW={error:e=>e instanceof Event},eq=["src","alt","srcset"],tq=N({...N({name:"ElAvatar"}),props:JW,emits:QW,setup(e,{emit:t}){const o=e,r=ze("avatar"),l=D(!1),n=C(()=>{const{size:d,icon:u,shape:p}=o,h=[r.b()];return ut(d)&&h.push(r.m(d)),u&&h.push(r.m("icon")),p&&h.push(r.m(p)),h}),a=C(()=>{const{size:d}=o;return st(d)?r.cssVarBlock({size:go(d)||""}):void 0}),i=C(()=>({objectFit:o.fit}));Se(()=>o.src,()=>l.value=!1);function c(d){l.value=!0,t("error",d)}return(d,u)=>(b(),M("span",{class:O(s(n)),style:Je(s(a))},[(d.src||d.srcSet)&&!l.value?(b(),M("img",{key:0,src:d.src,alt:d.alt,srcset:d.srcSet,style:Je(s(i)),onError:c},null,44,eq)):d.icon?(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(d.icon)))]),_:1})):be(d.$slots,"default",{key:2})],6))}});var oq=Le(tq,[["__file","avatar.vue"]]);const rq=yt(oq),lq={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},nq={click:e=>e instanceof MouseEvent},aq=(e,t,o)=>{const r=lo(),l=lo(),n=D(!1),a=()=>{r.value&&(n.value=r.value.scrollTop>=e.visibilityHeight)},i=d=>{var u;(u=r.value)==null||u.scrollTo({top:0,behavior:"smooth"}),t("click",d)},c=Gb(a,300,!0);return oo(l,"scroll",c),ft(()=>{var d;l.value=document,r.value=document.documentElement,e.target&&(r.value=(d=document.querySelector(e.target))!=null?d:void 0,r.value||Io(o,`target does not exist: ${e.target}`),l.value=r.value),a()}),{visible:n,handleClick:i}},R4="ElBacktop",iq=N({...N({name:R4}),props:lq,emits:nq,setup(e,{emit:t}){const o=e,r=ze("backtop"),{handleClick:l,visible:n}=aq(o,t,R4),a=C(()=>({right:`${o.right}px`,bottom:`${o.bottom}px`}));return(i,c)=>(b(),he(Mo,{name:`${s(r).namespace.value}-fade-in`},{default:le(()=>[s(n)?(b(),M("div",{key:0,style:Je(s(a)),class:O(s(r).b()),onClick:c[0]||(c[0]=ct((...d)=>s(l)&&s(l)(...d),["stop"]))},[be(i.$slots,"default",{},()=>[te(s(Ze),{class:O(s(r).e("icon"))},{default:le(()=>[te(s(I3))]),_:1},8,["class"])])],6)):se("v-if",!0)]),_:3},8,["name"]))}});var sq=Le(iq,[["__file","backtop.vue"]]);const cq=yt(sq),uq=Pe({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,dotStyle:{type:ue([String,Object,Array])},badgeStyle:{type:ue([String,Object,Array])},offset:{type:ue(Array),default:[0,0]},dotClass:{type:String},badgeClass:{type:String}}),dq=["textContent"],pq=N({...N({name:"ElBadge"}),props:uq,setup(e,{expose:t}){const o=e,r=ze("badge"),l=C(()=>o.isDot?"":st(o.value)&&st(o.max)?o.max{var a,i,c,d,u,p;return[{backgroundColor:o.color,marginRight:go(-((i=(a=o.offset)==null?void 0:a[0])!=null?i:0)),marginTop:go((d=(c=o.offset)==null?void 0:c[1])!=null?d:0)},(u=o.dotStyle)!=null?u:{},(p=o.badgeStyle)!=null?p:{}]});return Lo({from:"dot-style",replacement:"badge-style",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},C(()=>!!o.dotStyle)),Lo({from:"dot-class",replacement:"badge-class",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},C(()=>!!o.dotClass)),t({content:l}),(a,i)=>(b(),M("div",{class:O(s(r).b())},[be(a.$slots,"default"),te(Mo,{name:`${s(r).namespace.value}-zoom-in-center`,persisted:""},{default:le(()=>[mt(E("sup",{class:O([s(r).e("content"),s(r).em("content",a.type),s(r).is("fixed",!!a.$slots.default),s(r).is("dot",a.isDot),a.dotClass,a.badgeClass]),style:Je(s(n)),textContent:$e(s(l))},null,14,dq),[[Lt,!a.hidden&&(s(l)||a.isDot)]])]),_:1},8,["name"])],2))}});var fq=Le(pq,[["__file","badge.vue"]]);const L4=yt(fq),B4=Symbol("breadcrumbKey"),hq=Pe({separator:{type:String,default:"/"},separatorIcon:{type:Xt}}),vq=["aria-label"],mq=N({...N({name:"ElBreadcrumb"}),props:hq,setup(e){const t=e,{t:o}=Rt(),r=ze("breadcrumb"),l=D();return zt(B4,t),ft(()=>{const n=l.value.querySelectorAll(`.${r.e("item")}`);n.length&&n[n.length-1].setAttribute("aria-current","page")}),(n,a)=>(b(),M("div",{ref_key:"breadcrumb",ref:l,class:O(s(r).b()),"aria-label":s(o)("el.breadcrumb.label"),role:"navigation"},[be(n.$slots,"default")],10,vq))}});var gq=Le(mq,[["__file","breadcrumb.vue"]]);const bq=Pe({to:{type:ue([String,Object]),default:""},replace:{type:Boolean,default:!1}}),_q=N({...N({name:"ElBreadcrumbItem"}),props:bq,setup(e){const t=e,o=wt(),r=Ge(B4,void 0),l=ze("breadcrumb"),n=o.appContext.config.globalProperties.$router,a=D(),i=()=>{!t.to||!n||(t.replace?n.replace(t.to):n.push(t.to))};return(c,d)=>{var u,p;return b(),M("span",{class:O(s(l).e("item"))},[E("span",{ref_key:"link",ref:a,class:O([s(l).e("inner"),s(l).is("link",!!c.to)]),role:"link",onClick:i},[be(c.$slots,"default")],2),(u=s(r))!=null&&u.separatorIcon?(b(),he(s(Ze),{key:0,class:O(s(l).e("separator"))},{default:le(()=>[(b(),he(Et(s(r).separatorIcon)))]),_:1},8,["class"])):(b(),M("span",{key:1,class:O(s(l).e("separator")),role:"presentation"},$e((p=s(r))==null?void 0:p.separator),3))],2)}}});var V4=Le(_q,[["__file","breadcrumb-item.vue"]]);const wq=yt(gq,{BreadcrumbItem:V4}),yq=co(V4),D4=Symbol("buttonGroupContextKey"),xq=(e,t)=>{Lo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},C(()=>e.type==="text"));const o=Ge(D4,void 0),r=$c("button"),{form:l}=sr(),n=So(C(()=>o==null?void 0:o.size)),a=xr(),i=D(),c=Do(),d=C(()=>e.type||(o==null?void 0:o.type)||""),u=C(()=>{var m,f,_;return(_=(f=e.autoInsertSpace)!=null?f:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?_:!1}),p=C(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=C(()=>{var m;const f=(m=c.default)==null?void 0:m.call(c);if(u.value&&(f==null?void 0:f.length)===1){const _=f[0];if((_==null?void 0:_.type)===vi){const g=_.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(g.trim())}}return!1});return{_disabled:a,_size:n,_type:d,_ref:i,_props:p,shouldAddSpace:h,handleClick:m=>{e.nativeType==="reset"&&(l==null||l.resetFields()),t("click",m)}}},cv=["default","primary","success","warning","info","danger","text",""],uv=Pe({size:Oo,disabled:Boolean,type:{type:String,values:cv,default:""},icon:{type:Xt},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Xt,default:()=>vn},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:ue([String,Object]),default:"button"}}),kq={click:e=>e instanceof MouseEvent};function er(e,t){Cq(e)&&(e="100%");var o=Sq(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function rp(e){return Math.min(1,Math.max(0,e))}function Cq(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Sq(e){return typeof e=="string"&&e.indexOf("%")!==-1}function H4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function lp(e){return e<=1?"".concat(Number(e)*100,"%"):e}function qa(e){return e.length===1?"0"+e:String(e)}function Eq(e,t,o){return{r:er(e,255)*255,g:er(t,255)*255,b:er(o,255)*255}}function F4(e,t,o){e=er(e,255),t=er(t,255),o=er(o,255);var r=Math.max(e,t,o),l=Math.min(e,t,o),n=0,a=0,i=(r+l)/2;if(r===l)a=0,n=0;else{var c=r-l;switch(a=i>.5?c/(2-r-l):c/(r+l),r){case e:n=(t-o)/c+(t1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function Tq(e,t,o){var r,l,n;if(e=er(e,360),t=er(t,100),o=er(o,100),t===0)l=o,n=o,r=o;else{var a=o<.5?o*(1+t):o+t-o*t,i=2*o-a;r=dv(i,a,e+1/3),l=dv(i,a,e),n=dv(i,a,e-1/3)}return{r:r*255,g:l*255,b:n*255}}function j4(e,t,o){e=er(e,255),t=er(t,255),o=er(o,255);var r=Math.max(e,t,o),l=Math.min(e,t,o),n=0,a=r,i=r-l,c=r===0?0:i/r;if(r===l)n=0;else{switch(r){case e:n=(t-o)/i+(t>16,g:(e&65280)>>8,b:e&255}}var pv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Iq(e){var t={r:0,g:0,b:0},o=1,r=null,l=null,n=null,a=!1,i=!1;return typeof e=="string"&&(e=Pq(e)),typeof e=="object"&&(yn(e.r)&&yn(e.g)&&yn(e.b)?(t=Eq(e.r,e.g,e.b),a=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):yn(e.h)&&yn(e.s)&&yn(e.v)?(r=lp(e.s),l=lp(e.v),t=$q(e.h,r,l),a=!0,i="hsv"):yn(e.h)&&yn(e.s)&&yn(e.l)&&(r=lp(e.s),n=lp(e.l),t=Tq(e.h,r,n),a=!0,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=H4(o),{ok:a,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}var Oq="[-\\+]?\\d+%?",Nq="[-\\+]?\\d*\\.\\d+%?",la="(?:".concat(Nq,")|(?:").concat(Oq,")"),fv="[\\s|\\(]+(".concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")\\s*\\)?"),hv="[\\s|\\(]+(".concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")[,|\\s]+(").concat(la,")\\s*\\)?"),wl={CSS_UNIT:new RegExp(la),rgb:new RegExp("rgb"+fv),rgba:new RegExp("rgba"+hv),hsl:new RegExp("hsl"+fv),hsla:new RegExp("hsla"+hv),hsv:new RegExp("hsv"+fv),hsva:new RegExp("hsva"+hv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Pq(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(pv[e])e=pv[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=wl.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=wl.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=wl.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=wl.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=wl.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=wl.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=wl.hex8.exec(e),o?{r:Dr(o[1]),g:Dr(o[2]),b:Dr(o[3]),a:U4(o[4]),format:t?"name":"hex8"}:(o=wl.hex6.exec(e),o?{r:Dr(o[1]),g:Dr(o[2]),b:Dr(o[3]),format:t?"name":"hex"}:(o=wl.hex4.exec(e),o?{r:Dr(o[1]+o[1]),g:Dr(o[2]+o[2]),b:Dr(o[3]+o[3]),a:U4(o[4]+o[4]),format:t?"name":"hex8"}:(o=wl.hex3.exec(e),o?{r:Dr(o[1]+o[1]),g:Dr(o[2]+o[2]),b:Dr(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function yn(e){return!!wl.CSS_UNIT.exec(String(e))}var W4=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=zq(t)),this.originalInput=t;var l=Iq(t);this.originalInput=t,this.r=l.r,this.g=l.g,this.b=l.b,this.a=l.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:l.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=l.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),o,r,l,n=t.r/255,a=t.g/255,i=t.b/255;return n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*r+.0722*l},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=H4(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=j4(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=j4(this.r,this.g,this.b),o=Math.round(t.h*360),r=Math.round(t.s*100),l=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(l,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=F4(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=F4(this.r,this.g,this.b),o=Math.round(t.h*360),r=Math.round(t.s*100),l=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(l,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(l,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),K4(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Mq(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(r,")"):"rgba(".concat(t,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(er(o,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(o){return Math.round(er(o,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+K4(this.r,this.g,this.b,!1),o=0,r=Object.entries(pv);o=0,n=!o&&l&&(t.startsWith("hex")||t==="name");return n?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l+=t/100,o.l=rp(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=rp(o.l),new e(o)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s-=t/100,o.s=rp(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=rp(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),r=(o.h+t)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var r=this.toRgb(),l=new e(t).toRgb(),n=o/100,a={r:(l.r-r.r)*n+r.r,g:(l.g-r.g)*n+r.g,b:(l.b-r.b)*n+r.b,a:(l.a-r.a)*n+r.a};return new e(a)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var r=this.toHsl(),l=360/o,n=[this];for(r.h=(r.h-(l*t>>1)+720)%360;--t;)r.h=(r.h+l)%360,n.push(new e(r));return n},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),r=o.h,l=o.s,n=o.v,a=[],i=1/t;t--;)a.push(new e({h:r,s:l,v:n})),n=(n+i)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),r=new e(t).toRgb(),l=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/l,g:(o.g*o.a+r.g*r.a*(1-o.a))/l,b:(o.b*o.a+r.b*r.a*(1-o.a))/l,a:l})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),r=o.h,l=[this],n=360/t,a=1;a{let r={};const l=e.color;if(l){const n=new W4(l),a=e.dark?n.tint(20).toString():na(n,20);if(e.plain)r=o.cssVarBlock({"bg-color":e.dark?na(n,90):n.tint(90).toString(),"text-color":l,"border-color":e.dark?na(n,50):n.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":l,"hover-border-color":l,"active-bg-color":a,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(r[o.cssVarBlockName("disabled-bg-color")]=e.dark?na(n,90):n.tint(90).toString(),r[o.cssVarBlockName("disabled-text-color")]=e.dark?na(n,50):n.tint(50).toString(),r[o.cssVarBlockName("disabled-border-color")]=e.dark?na(n,80):n.tint(80).toString());else{const i=e.dark?na(n,30):n.tint(30).toString(),c=n.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(r=o.cssVarBlock({"bg-color":l,"text-color":c,"border-color":l,"hover-bg-color":i,"hover-text-color":c,"hover-border-color":i,"active-bg-color":a,"active-border-color":a}),t.value){const d=e.dark?na(n,50):n.tint(50).toString();r[o.cssVarBlockName("disabled-bg-color")]=d,r[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,r[o.cssVarBlockName("disabled-border-color")]=d}}}return r})}const Lq=N({...N({name:"ElButton"}),props:uv,emits:kq,setup(e,{expose:t,emit:o}){const r=e,l=Rq(r),n=ze("button"),{_ref:a,_size:i,_type:c,_disabled:d,_props:u,shouldAddSpace:p,handleClick:h}=xq(r,o),v=C(()=>[n.b(),n.m(c.value),n.m(i.value),n.is("disabled",d.value),n.is("loading",r.loading),n.is("plain",r.plain),n.is("round",r.round),n.is("circle",r.circle),n.is("text",r.text),n.is("link",r.link),n.is("has-bg",r.bg)]);return t({ref:a,size:i,type:c,disabled:d,shouldAddSpace:p}),(m,f)=>(b(),he(Et(m.tag),Mt({ref_key:"_ref",ref:a},s(u),{class:s(v),style:s(l),onClick:s(h)}),{default:le(()=>[m.loading?(b(),M(Qe,{key:0},[m.$slots.loading?be(m.$slots,"loading",{key:0}):(b(),he(s(Ze),{key:1,class:O(s(n).is("loading"))},{default:le(()=>[(b(),he(Et(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(b(),he(s(Ze),{key:1},{default:le(()=>[m.icon?(b(),he(Et(m.icon),{key:0})):be(m.$slots,"icon",{key:1})]),_:3})):se("v-if",!0),m.$slots.default?(b(),M("span",{key:2,class:O({[s(n).em("text","expand")]:s(p)})},[be(m.$slots,"default")],2)):se("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Bq=Le(Lq,[["__file","button.vue"]]);const Vq={size:uv.size,type:uv.type},Dq=N({...N({name:"ElButtonGroup"}),props:Vq,setup(e){const t=e;zt(D4,Dt({size:Yt(t,"size"),type:Yt(t,"type")}));const o=ze("button");return(r,l)=>(b(),M("div",{class:O(`${s(o).b("group")}`)},[be(r.$slots,"default")],2))}});var q4=Le(Dq,[["__file","button-group.vue"]]);const Wo=yt(Bq,{ButtonGroup:q4}),Y4=co(q4);var G4={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){var o=1e3,r=6e4,l=36e5,n="millisecond",a="second",i="minute",c="hour",d="day",u="week",p="month",h="quarter",v="year",m="date",f="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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(J){var Z=["th","st","nd","rd"],H=J%100;return"["+J+(Z[(H-20)%10]||Z[H]||Z[0])+"]"}},w=function(J,Z,H){var j=String(J);return!j||j.length>=Z?J:""+Array(Z+1-j.length).join(H)+J},x={s:w,z:function(J){var Z=-J.utcOffset(),H=Math.abs(Z),j=Math.floor(H/60),K=H%60;return(Z<=0?"+":"-")+w(j,2,"0")+":"+w(K,2,"0")},m:function J(Z,H){if(Z.date()1)return J(U[0])}else{var oe=Z.name;T[oe]=Z,K=oe}return!j&&K&&($=K),K||!j&&$},V=function(J,Z){if(P(J))return J.clone();var H=typeof Z=="object"?Z:{};return H.date=J,H.args=arguments,new F(H)},B=x;B.l=R,B.i=P,B.w=function(J,Z){return V(J,{locale:Z.$L,utc:Z.$u,x:Z.$x,$offset:Z.$offset})};var F=function(){function J(H){this.$L=R(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[L]=!0}var Z=J.prototype;return Z.parse=function(H){this.$d=function(j){var K=j.date,I=j.utc;if(K===null)return new Date(NaN);if(B.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var U=K.match(_);if(U){var oe=U[2]-1||0,ne=(U[7]||"0").substring(0,3);return I?new Date(Date.UTC(U[1],oe,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)):new Date(U[1],oe,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)}}return new Date(K)}(H),this.init()},Z.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},Z.$utils=function(){return B},Z.isValid=function(){return this.$d.toString()!==f},Z.isSame=function(H,j){var K=V(H);return this.startOf(j)<=K&&K<=this.endOf(j)},Z.isAfter=function(H,j){return V(H)68?1900:2e3)},d=function(f){return function(_){this[f]=+_}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(_){if(!_||_==="Z")return 0;var g=_.match(/([+-]|\d\d)/g),y=60*g[1]+(+g[2]||0);return y===0?0:g[0]==="+"?-y:y}(f)}],p=function(f){var _=i[f];return _&&(_.indexOf?_:_.s.concat(_.f))},h=function(f,_){var g,y=i.meridiem;if(y){for(var w=1;w<=24;w+=1)if(f.indexOf(y(w,0,_))>-1){g=w>12;break}}else g=f===(_?"pm":"PM");return g},v={A:[a,function(f){this.afternoon=h(f,!1)}],a:[a,function(f){this.afternoon=h(f,!0)}],S:[/\d/,function(f){this.milliseconds=100*+f}],SS:[l,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,d("seconds")],ss:[n,d("seconds")],m:[n,d("minutes")],mm:[n,d("minutes")],H:[n,d("hours")],h:[n,d("hours")],HH:[n,d("hours")],hh:[n,d("hours")],D:[n,d("day")],DD:[l,d("day")],Do:[a,function(f){var _=i.ordinal,g=f.match(/\d+/);if(this.day=g[0],_)for(var y=1;y<=31;y+=1)_(y).replace(/\[|\]/g,"")===f&&(this.day=y)}],M:[n,d("month")],MM:[l,d("month")],MMM:[a,function(f){var _=p("months"),g=(p("monthsShort")||_.map(function(y){return y.slice(0,3)})).indexOf(f)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(f){var _=p("months").indexOf(f)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(f){this.year=c(f)}],YYYY:[/\d{4}/,d("year")],Z:u,ZZ:u};function m(f){var _,g;_=f,g=i&&i.formats;for(var y=(f=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(R,V,B){var F=B&&B.toUpperCase();return V||g[B]||o[B]||g[F].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Q,J,Z){return J||Z.slice(1)})})).match(r),w=y.length,x=0;x-1)return new Date((j==="X"?1e3:1)*H);var I=m(j)(H),U=I.year,oe=I.month,ne=I.day,ce=I.hours,ee=I.minutes,Me=I.seconds,de=I.milliseconds,_e=I.zone,me=new Date,Re=ne||(U||oe?1:me.getDate()),Ce=U||me.getFullYear(),Ee=0;U&&!oe||(Ee=oe>0?oe-1:me.getMonth());var De=ce||0,ae=ee||0,pe=Me||0,ke=de||0;return _e?new Date(Date.UTC(Ce,Ee,Re,De,ae,pe,ke+60*_e.offset*1e3)):K?new Date(Date.UTC(Ce,Ee,Re,De,ae,pe,ke)):new Date(Ce,Ee,Re,De,ae,pe,ke)}catch{return new Date("")}}($,P,T),this.init(),F&&F!==!0&&(this.$L=this.locale(F).$L),B&&$!=this.format(P)&&(this.$d=new Date("")),i={}}else if(P instanceof Array)for(var Q=P.length,J=1;J<=Q;J+=1){L[1]=P[J-1];var Z=g.apply(this,L);if(Z.isValid()){this.$d=Z.$d,this.$L=Z.$L,this.init();break}J===Q&&(this.$d=new Date(""))}else w.call(this,x)}}})})(X4);var Fq=X4.exports;const vv=cl(Fq),Z4=["hours","minutes","seconds"],mv="HH:mm:ss",ts="YYYY-MM-DD",jq={date:ts,dates:ts,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",datetime:`${ts} ${mv}`,monthrange:"YYYY-MM",daterange:ts,datetimerange:`${ts} ${mv}`},gv=(e,t)=>[e>0?e-1:void 0,e,eArray.from(Array.from({length:e}).keys()),J4=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),Q4=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),ew=function(e,t){const o=va(e),r=va(t);return o&&r?e.getTime()===t.getTime():!o&&!r?e===t:!1},tw=function(e,t){const o=Ke(e),r=Ke(t);return o&&r?e.length!==t.length?!1:e.every((l,n)=>ew(l,t[n])):!o&&!r?ew(e,t):!1},ow=function(e,t,o){const r=Yr(t)||t==="x"?kt(e).locale(o):kt(e,t).locale(o);return r.isValid()?r:void 0},rw=function(e,t,o){return Yr(t)?e:t==="x"?+e:kt(e).locale(o).format(t)},bv=(e,t)=>{var o;const r=[],l=t==null?void 0:t();for(let n=0;n({})},modelValue:{type:ue([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:ue([Date,Array])},defaultTime:{type:ue([Date,Array])},isRange:Boolean,...lw,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,label:{type:String,default:void 0},tabindex:{type:ue([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...Xi,...Zo(["ariaLabel"])}),Kq=["id","name","placeholder","value","disabled","readonly"],Uq=["id","name","placeholder","value","disabled","readonly"],Wq=N({...N({name:"Picker"}),props:_v,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:o}){const r=e,l=ya(),{lang:n}=Rt(),a=ze("date"),i=ze("input"),c=ze("range"),{form:d,formItem:u}=sr(),p=Ge("ElPopperOptions",{}),{valueOnClear:h}=Ud(r,null),v=D(),m=D(),f=D(!1),_=D(!1),g=D(null);let y=!1,w=!1;const x=C(()=>[a.b("editor"),a.bm("editor",r.type),i.e("wrapper"),a.is("disabled",ce.value),a.is("active",f.value),c.b("editor"),Ne?c.bm("editor",Ne.value):"",l.class]),$=C(()=>[i.e("icon"),c.e("close-icon"),Ee.value?"":c.e("close-icon--hidden")]);Se(f,fe=>{fe?et(()=>{fe&&(g.value=r.modelValue)}):(xe.value=null,et(()=>{T(r.modelValue)}))});const T=(fe,Fe)=>{(Fe||!tw(fe,g.value))&&(o("change",fe),r.validateEvent&&(u==null||u.validate("change").catch(at=>void 0)))},L=fe=>{if(!tw(r.modelValue,fe)){let Fe;Ke(fe)?Fe=fe.map(at=>rw(at,r.valueFormat,n.value)):fe&&(Fe=rw(fe,r.valueFormat,n.value)),o("update:modelValue",fe&&Fe,n.value)}},P=fe=>{o("keydown",fe)},R=C(()=>{if(m.value){const fe=Te.value?m.value:m.value.$el;return Array.from(fe.querySelectorAll("input"))}return[]}),V=(fe,Fe,at)=>{const _t=R.value;_t.length&&(!at||at==="min"?(_t[0].setSelectionRange(fe,Fe),_t[0].focus()):at==="max"&&(_t[1].setSelectionRange(fe,Fe),_t[1].focus()))},B=()=>{I(!0,!0),et(()=>{w=!1})},F=(fe="",Fe=!1)=>{Fe||(w=!0),f.value=Fe;let at;Ke(fe)?at=fe.map(_t=>_t.toDate()):at=fe&&fe.toDate(),xe.value=null,L(at)},Q=()=>{_.value=!0},J=()=>{o("visible-change",!0)},Z=fe=>{(fe==null?void 0:fe.key)===lt.esc&&I(!0,!0)},H=()=>{_.value=!1,f.value=!1,w=!1,o("visible-change",!1)},j=()=>{f.value=!0},K=()=>{f.value=!1},I=(fe=!0,Fe=!1)=>{w=Fe;const[at,_t]=s(R);let At=at;!fe&&Te.value&&(At=_t),At&&At.focus()},U=fe=>{r.readonly||ce.value||f.value||w||(f.value=!0,o("focus",fe))};let oe;const ne=fe=>{const Fe=async()=>{setTimeout(()=>{var at;oe===Fe&&(!((at=v.value)!=null&&at.isFocusInsideContent()&&!y)&&R.value.filter(_t=>_t.contains(document.activeElement)).length===0&&(We(),f.value=!1,o("blur",fe),r.validateEvent&&(u==null||u.validate("blur").catch(_t=>void 0))),y=!1)},0)};oe=Fe,Fe()},ce=C(()=>r.disabled||(d==null?void 0:d.disabled)),ee=C(()=>{let fe;if(ae.value?G.value.getDefaultValue&&(fe=G.value.getDefaultValue()):Ke(r.modelValue)?fe=r.modelValue.map(Fe=>ow(Fe,r.valueFormat,n.value)):fe=ow(r.modelValue,r.valueFormat,n.value),G.value.getRangeAvailableTime){const Fe=G.value.getRangeAvailableTime(fe);nr(Fe,fe)||(fe=Fe,L(Ke(fe)?fe.map(at=>at.toDate()):fe.toDate()))}return Ke(fe)&&fe.some(Fe=>!Fe)&&(fe=[]),fe}),Me=C(()=>{if(!G.value.panelReady)return"";const fe=ye(ee.value);return Ke(xe.value)?[xe.value[0]||fe&&fe[0]||"",xe.value[1]||fe&&fe[1]||""]:xe.value!==null?xe.value:!_e.value&&ae.value||!f.value&&ae.value?"":fe?me.value||Re.value?fe.join(", "):fe:""}),de=C(()=>r.type.includes("time")),_e=C(()=>r.type.startsWith("time")),me=C(()=>r.type==="dates"),Re=C(()=>r.type==="years"),Ce=C(()=>r.prefixIcon||(de.value?dh:z3)),Ee=D(!1),De=fe=>{r.readonly||ce.value||Ee.value&&(fe.stopPropagation(),B(),L(h.value),T(h.value,!0),Ee.value=!1,f.value=!1,G.value.handleClear&&G.value.handleClear())},ae=C(()=>{const{modelValue:fe}=r;return!fe||Ke(fe)&&!fe.filter(Boolean).length}),pe=async fe=>{var Fe;r.readonly||ce.value||(((Fe=fe.target)==null?void 0:Fe.tagName)!=="INPUT"||R.value.includes(document.activeElement))&&(f.value=!0)},ke=()=>{r.readonly||ce.value||!ae.value&&r.clearable&&(Ee.value=!0)},Oe=()=>{Ee.value=!1},we=fe=>{var Fe;r.readonly||ce.value||(((Fe=fe.touches[0].target)==null?void 0:Fe.tagName)!=="INPUT"||R.value.includes(document.activeElement))&&(f.value=!0)},Te=C(()=>r.type.includes("range")),Ne=So(),Ie=C(()=>{var fe,Fe;return(Fe=(fe=s(v))==null?void 0:fe.popperRef)==null?void 0:Fe.contentRef}),Ae=C(()=>{var fe;return s(Te)?s(m):(fe=s(m))==null?void 0:fe.$el});z0(Ae,fe=>{const Fe=s(Ie),at=s(Ae);Fe&&(fe.target===Fe||fe.composedPath().includes(Fe))||fe.target===at||fe.composedPath().includes(at)||(f.value=!1)});const xe=D(null),We=()=>{if(xe.value){const fe=qe(Me.value);fe&&Ye(fe)&&(L(Ke(fe)?fe.map(Fe=>Fe.toDate()):fe.toDate()),xe.value=null)}xe.value===""&&(L(h.value),T(h.value),xe.value=null)},qe=fe=>fe?G.value.parseUserInput(fe):null,ye=fe=>fe?G.value.formatToString(fe):null,Ye=fe=>G.value.isValidValue(fe),tt=async fe=>{if(r.readonly||ce.value)return;const{code:Fe}=fe;if(P(fe),Fe===lt.esc){f.value===!0&&(f.value=!1,fe.preventDefault(),fe.stopPropagation());return}if(Fe===lt.down&&(G.value.handleFocusPicker&&(fe.preventDefault(),fe.stopPropagation()),f.value===!1&&(f.value=!0,await et()),G.value.handleFocusPicker)){G.value.handleFocusPicker();return}if(Fe===lt.tab){y=!0;return}if(Fe===lt.enter||Fe===lt.numpadEnter){(xe.value===null||xe.value===""||Ye(qe(Me.value)))&&(We(),f.value=!1),fe.stopPropagation();return}if(xe.value){fe.stopPropagation();return}G.value.handleKeydownInput&&G.value.handleKeydownInput(fe)},pt=fe=>{xe.value=fe,f.value||(f.value=!0)},dt=fe=>{const Fe=fe.target;xe.value?xe.value=[Fe.value,xe.value[1]]:xe.value=[Fe.value,null]},Y=fe=>{const Fe=fe.target;xe.value?xe.value=[xe.value[0],Fe.value]:xe.value=[null,Fe.value]},S=()=>{var fe;const Fe=xe.value,at=qe(Fe&&Fe[0]),_t=s(ee);if(at&&at.isValid()){xe.value=[ye(at),((fe=Me.value)==null?void 0:fe[1])||null];const At=[at,_t&&(_t[1]||null)];Ye(At)&&(L(At),xe.value=null)}},A=()=>{var fe;const Fe=s(xe),at=qe(Fe&&Fe[1]),_t=s(ee);if(at&&at.isValid()){xe.value=[((fe=s(Me))==null?void 0:fe[0])||null,ye(at)];const At=[_t&&_t[0],at];Ye(At)&&(L(At),xe.value=null)}},G=D({}),X=fe=>{G.value[fe[0]]=fe[1],G.value.panelReady=!0},re=fe=>{o("calendar-change",fe)},ge=(fe,Fe,at)=>{o("panel-change",fe,Fe,at)};return zt("EP_PICKER_BASE",{props:r}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-time-picker",ref:"https://element-plus.org/en-US/component/time-picker.html"},C(()=>!!r.label)),t({focus:I,handleFocusInput:U,handleBlurInput:ne,handleOpen:j,handleClose:K,onPick:F}),(fe,Fe)=>(b(),he(s(ur),Mt({ref_key:"refPopper",ref:v,visible:f.value,effect:"light",pure:"",trigger:"click"},fe.$attrs,{role:"dialog",teleported:"",transition:`${s(a).namespace.value}-zoom-in-top`,"popper-class":[`${s(a).namespace.value}-picker__popper`,fe.popperClass],"popper-options":s(p),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Q,onShow:J,onHide:H}),{default:le(()=>[s(Te)?(b(),M("div",{key:1,ref_key:"inputRef",ref:m,class:O(s(x)),style:Je(fe.$attrs.style),onClick:U,onMouseenter:ke,onMouseleave:Oe,onTouchstartPassive:we,onKeydown:tt},[s(Ce)?(b(),he(s(Ze),{key:0,class:O([s(i).e("icon"),s(c).e("icon")]),onMousedown:ct(pe,["prevent"]),onTouchstartPassive:we},{default:le(()=>[(b(),he(Et(s(Ce))))]),_:1},8,["class","onMousedown"])):se("v-if",!0),E("input",{id:fe.id&&fe.id[0],autocomplete:"off",name:fe.name&&fe.name[0],placeholder:fe.startPlaceholder,value:s(Me)&&s(Me)[0],disabled:s(ce),readonly:!fe.editable||fe.readonly,class:O(s(c).b("input")),onMousedown:pe,onInput:dt,onChange:S,onFocus:U,onBlur:ne},null,42,Kq),be(fe.$slots,"range-separator",{},()=>[E("span",{class:O(s(c).b("separator"))},$e(fe.rangeSeparator),3)]),E("input",{id:fe.id&&fe.id[1],autocomplete:"off",name:fe.name&&fe.name[1],placeholder:fe.endPlaceholder,value:s(Me)&&s(Me)[1],disabled:s(ce),readonly:!fe.editable||fe.readonly,class:O(s(c).b("input")),onMousedown:pe,onFocus:U,onBlur:ne,onInput:Y,onChange:A},null,42,Uq),fe.clearIcon?(b(),he(s(Ze),{key:1,class:O(s($)),onClick:De},{default:le(()=>[(b(),he(Et(fe.clearIcon)))]),_:1},8,["class"])):se("v-if",!0)],38)):(b(),he(s(cr),{key:0,id:fe.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":s(Me),name:fe.name,size:s(Ne),disabled:s(ce),placeholder:fe.placeholder,class:O([s(a).b("editor"),s(a).bm("editor",fe.type),fe.$attrs.class]),style:Je(fe.$attrs.style),readonly:!fe.editable||fe.readonly||s(me)||s(Re)||fe.type==="week","aria-label":fe.label||fe.ariaLabel,tabindex:fe.tabindex,"validate-event":!1,onInput:pt,onFocus:U,onBlur:ne,onKeydown:tt,onChange:We,onMousedown:pe,onMouseenter:ke,onMouseleave:Oe,onTouchstartPassive:we,onClick:Fe[0]||(Fe[0]=ct(()=>{},["stop"]))},{prefix:le(()=>[s(Ce)?(b(),he(s(Ze),{key:0,class:O(s(i).e("icon")),onMousedown:ct(pe,["prevent"]),onTouchstartPassive:we},{default:le(()=>[(b(),he(Et(s(Ce))))]),_:1},8,["class","onMousedown"])):se("v-if",!0)]),suffix:le(()=>[Ee.value&&fe.clearIcon?(b(),he(s(Ze),{key:0,class:O(`${s(i).e("icon")} clear-icon`),onClick:ct(De,["stop"])},{default:le(()=>[(b(),he(Et(fe.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onKeydown"]))]),content:le(()=>[be(fe.$slots,"default",{visible:f.value,actualVisible:_.value,parsedValue:s(ee),format:fe.format,dateFormat:fe.dateFormat,timeFormat:fe.timeFormat,unlinkPanels:fe.unlinkPanels,type:fe.type,defaultValue:fe.defaultValue,onPick:F,onSelectRange:V,onSetPickerOption:X,onCalendarChange:re,onPanelChange:ge,onKeydown:Z,onMousedown:Fe[1]||(Fe[1]=ct(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var aw=Le(Wq,[["__file","picker.vue"]]);const qq=Pe({...nw,datetimeRole:String,parsedValue:{type:ue(Object)}}),iw=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:o})=>{const r=(a,i,c,d)=>{const u={hour:e,minute:t,second:o};let p=a;return["hour","minute","second"].forEach(h=>{if(u[h]){let v;const m=u[h];switch(h){case"minute":{v=m(p.hour(),i,d);break}case"second":{v=m(p.hour(),p.minute(),i,d);break}default:{v=m(i,d);break}}if(v!=null&&v.length&&!v.includes(p[h]())){const f=c?0:v.length-1;p=p[h](v[f])}}}),p},l={};return{timePickerOptions:l,getAvailableTime:r,onSetOption:([a,i])=>{l[a]=i}}},wv=e=>{const t=(r,l)=>r||l,o=r=>r!==!0;return e.map(t).filter(o)},sw=(e,t,o)=>({getHoursList:(a,i)=>bv(24,e&&(()=>e==null?void 0:e(a,i))),getMinutesList:(a,i,c)=>bv(60,t&&(()=>t==null?void 0:t(a,i,c))),getSecondsList:(a,i,c,d)=>bv(60,o&&(()=>o==null?void 0:o(a,i,c,d)))}),cw=(e,t,o)=>{const{getHoursList:r,getMinutesList:l,getSecondsList:n}=sw(e,t,o);return{getAvailableHours:(d,u)=>wv(r(d,u)),getAvailableMinutes:(d,u,p)=>wv(l(d,u,p)),getAvailableSeconds:(d,u,p,h)=>wv(n(d,u,p,h))}},uw=e=>{const t=D(e.parsedValue);return Se(()=>e.visible,o=>{o||(t.value=e.parsedValue)}),t},ia=new Map;let dw;Nt&&(document.addEventListener("mousedown",e=>dw=e),document.addEventListener("mouseup",e=>{for(const t of ia.values())for(const{documentHandler:o}of t)o(e,dw)}));function pw(e,t){let o=[];return Array.isArray(t.arg)?o=t.arg:Gr(t.arg)&&o.push(t.arg),function(r,l){const n=t.instance.popperRef,a=r.target,i=l==null?void 0:l.target,c=!t||!t.instance,d=!a||!i,u=e.contains(a)||e.contains(i),p=e===a,h=o.length&&o.some(m=>m==null?void 0:m.contains(a))||o.length&&o.includes(i),v=n&&(n.contains(a)||n.contains(i));c||d||u||p||h||v||t.value(r,l)}}const xn={beforeMount(e,t){ia.has(e)||ia.set(e,[]),ia.get(e).push({documentHandler:pw(e,t),bindingFn:t.value})},updated(e,t){ia.has(e)||ia.set(e,[]);const o=ia.get(e),r=o.findIndex(n=>n.bindingFn===t.oldValue),l={documentHandler:pw(e,t),bindingFn:t.value};r>=0?o.splice(r,1,l):o.push(l)},unmounted(e){ia.delete(e)}},Yq=100,Gq=600,np={beforeMount(e,t){const o=t.value,{interval:r=Yq,delay:l=Gq}=it(o)?{}:o;let n,a;const i=()=>it(o)?o():o.handler(),c=()=>{a&&(clearTimeout(a),a=void 0),n&&(clearInterval(n),n=void 0)};e.addEventListener("mousedown",d=>{d.button===0&&(c(),i(),document.addEventListener("mouseup",()=>c(),{once:!0}),a=setTimeout(()=>{n=setInterval(()=>{i()},r)},l))})}},yv="_trap-focus-children",Ya=[],fw=e=>{if(Ya.length===0)return;const t=Ya[Ya.length-1][yv];if(t.length>0&&e.code===lt.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const o=e.shiftKey,r=e.target===t[0],l=e.target===t[t.length-1];r&&o&&(e.preventDefault(),t[t.length-1].focus()),l&&!o&&(e.preventDefault(),t[0].focus())}},Xq={beforeMount(e){e[yv]=Db(e),Ya.push(e),Ya.length<=1&&document.addEventListener("keydown",fw)},updated(e){et(()=>{e[yv]=Db(e)})},unmounted(){Ya.shift(),Ya.length===0&&document.removeEventListener("keydown",fw)}};var hw=!1,Ga,xv,kv,ap,ip,vw,sp,Cv,Sv,Ev,mw,Tv,$v,gw,bw;function Ir(){if(!hw){hw=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Tv=/\b(iPhone|iP[ao]d)/.exec(e),$v=/\b(iP[ao]d)/.exec(e),Ev=/Android/i.exec(e),gw=/FBAN\/\w+;/i.exec(e),bw=/Mobile/i.exec(e),mw=!!/Win64/.exec(e),t){Ga=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Ga&&document&&document.documentMode&&(Ga=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);vw=r?parseFloat(r[1])+4:Ga,xv=t[2]?parseFloat(t[2]):NaN,kv=t[3]?parseFloat(t[3]):NaN,ap=t[4]?parseFloat(t[4]):NaN,ap?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),ip=t&&t[1]?parseFloat(t[1]):NaN):ip=NaN}else Ga=xv=kv=ip=ap=NaN;if(o){if(o[1]){var l=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);sp=l?parseFloat(l[1].replace("_",".")):!0}else sp=!1;Cv=!!o[2],Sv=!!o[3]}else sp=Cv=Sv=!1}}var Mv={ie:function(){return Ir()||Ga},ieCompatibilityMode:function(){return Ir()||vw>Ga},ie64:function(){return Mv.ie()&&mw},firefox:function(){return Ir()||xv},opera:function(){return Ir()||kv},webkit:function(){return Ir()||ap},safari:function(){return Mv.webkit()},chrome:function(){return Ir()||ip},windows:function(){return Ir()||Cv},osx:function(){return Ir()||sp},linux:function(){return Ir()||Sv},iphone:function(){return Ir()||Tv},mobile:function(){return Ir()||Tv||$v||Ev||bw},nativeApp:function(){return Ir()||gw},android:function(){return Ir()||Ev},ipad:function(){return Ir()||$v}},Zq=Mv,cp=!!(typeof window<"u"&&window.document&&window.document.createElement),Jq={canUseDOM:cp,canUseWorkers:typeof Worker<"u",canUseEventListeners:cp&&!!(window.addEventListener||window.attachEvent),canUseViewport:cp&&!!window.screen,isInWorker:!cp},_w=Jq,ww;_w.canUseDOM&&(ww=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Qq(e,t){if(!_w.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var l=document.createElement("div");l.setAttribute(o,"return;"),r=typeof l[o]=="function"}return!r&&ww&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var eY=Qq,yw=10,xw=40,kw=800;function Cw(e){var t=0,o=0,r=0,l=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*yw,l=o*yw,"deltaY"in e&&(l=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||l)&&e.deltaMode&&(e.deltaMode==1?(r*=xw,l*=xw):(r*=kw,l*=kw)),r&&!t&&(t=r<1?-1:1),l&&!o&&(o=l<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:l}}Cw.getEventType=function(){return Zq.firefox()?"DOMMouseScroll":eY("wheel")?"wheel":"mousewheel"};var tY=Cw;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, @@ -132,18 +132,18 @@ https://sweetalert2.github.io/#ajax-request`),Ipe(q),typeof q.title=="string"&&( * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT -*/const rY=function(e,t){if(e&&e.addEventListener){const o=function(r){const l=oY(r);t&&Reflect.apply(t,this,[r,l])};e.addEventListener("wheel",o,{passive:!0})}},lY={beforeMount(e,t){rY(e,t.value)}},nY=Pe({role:{type:String,required:!0},spinnerDate:{type:ue(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:ue(String),default:""},...nw}),aY=["onClick"],iY=["onMouseenter"];var zv=Le(N({__name:"basic-time-spinner",props:nY,emits:["change","select-range","set-option"],setup(e,{emit:t}){const o=e,r=ze("time"),{getHoursList:l,getMinutesList:n,getSecondsList:a}=cw(o.disabledHours,o.disabledMinutes,o.disabledSeconds);let i=!1;const c=D(),d=D(),u=D(),p=D(),h={hours:d,minutes:u,seconds:p},v=C(()=>o.showSeconds?J4:J4.slice(0,2)),m=C(()=>{const{spinnerDate:I}=o,U=I.hour(),oe=I.minute(),ne=I.second();return{hours:U,minutes:oe,seconds:ne}}),f=C(()=>{const{hours:I,minutes:U}=s(m);return{hours:l(o.role),minutes:n(I,o.role),seconds:a(I,U,o.role)}}),_=C(()=>{const{hours:I,minutes:U,seconds:oe}=s(m);return{hours:bv(I,23),minutes:bv(U,59),seconds:bv(oe,59)}}),g=Mr(I=>{i=!1,x(I)},200),y=I=>{if(!!!o.amPmMode)return"";const oe=o.amPmMode==="A";let ne=I<12?" am":" pm";return oe&&(ne=ne.toUpperCase()),ne},w=I=>{let U;switch(I){case"hours":U=[0,2];break;case"minutes":U=[3,5];break;case"seconds":U=[6,8];break}const[oe,ne]=U;t("select-range",oe,ne),c.value=I},x=I=>{R(I,s(m)[I])},$=()=>{x("hours"),x("minutes"),x("seconds")},T=I=>I.querySelector(`.${r.namespace.value}-scrollbar__wrap`),R=(I,U)=>{if(o.arrowControl)return;const oe=s(h[I]);oe&&oe.$el&&(T(oe.$el).scrollTop=Math.max(0,U*P(I)))},P=I=>{const U=s(h[I]),oe=U==null?void 0:U.$el.querySelector("li");return oe&&Number.parseFloat(Zn(oe,"height"))||0},L=()=>{B(1)},V=()=>{B(-1)},B=I=>{c.value||w("hours");const U=c.value,oe=s(m)[U],ne=c.value==="hours"?24:60,ce=j(U,oe,I,ne);te(U,ce),R(U,ce),et(()=>w(U))},j=(I,U,oe,ne)=>{let ce=(U+oe+ne)%ne;const Q=s(f)[I];for(;Q[ce]&&ce!==U;)ce=(ce+oe+ne)%ne;return ce},te=(I,U)=>{if(s(f)[I][U])return;const{hours:ce,minutes:Q,seconds:Me}=s(m);let de;switch(I){case"hours":de=o.spinnerDate.hour(U).minute(Q).second(Me);break;case"minutes":de=o.spinnerDate.hour(ce).minute(U).second(Me);break;case"seconds":de=o.spinnerDate.hour(ce).minute(Q).second(U);break}t("change",de)},J=(I,{value:U,disabled:oe})=>{oe||(te(I,U),w(I),R(I,U))},Z=I=>{i=!0,g(I);const U=Math.min(Math.round((T(s(h[I]).$el).scrollTop-(H(I)*.5-10)/P(I)+3)/P(I)),I==="hours"?23:59);te(I,U)},H=I=>s(h[I]).$el.offsetHeight,F=()=>{const I=U=>{const oe=s(h[U]);oe&&oe.$el&&(T(oe.$el).onscroll=()=>{Z(U)})};I("hours"),I("minutes"),I("seconds")};ft(()=>{et(()=>{!o.arrowControl&&F(),$(),o.role==="start"&&w("hours")})});const K=(I,U)=>{h[U].value=I};return t("set-option",[`${o.role}_scrollDown`,B]),t("set-option",[`${o.role}_emitSelectRange`,w]),Se(()=>o.spinnerDate,()=>{i||$()}),(I,U)=>(b(),M("div",{class:O([s(r).b("spinner"),{"has-seconds":I.showSeconds}])},[I.arrowControl?se("v-if",!0):(b(!0),M(Qe,{key:0},It(s(v),oe=>(b(),he(s(wn),{key:oe,ref_for:!0,ref:ne=>K(ne,oe),class:O(s(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":s(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ne=>w(oe),onMousemove:ne=>x(oe)},{default:le(()=>[(b(!0),M(Qe,null,It(s(f)[oe],(ne,ce)=>(b(),M("li",{key:ce,class:O([s(r).be("spinner","item"),s(r).is("active",ce===s(m)[oe]),s(r).is("disabled",ne)]),onClick:Q=>J(oe,{value:ce,disabled:ne})},[oe==="hours"?(b(),M(Qe,{key:0},[Ct($e(("0"+(I.amPmMode?ce%12||12:ce)).slice(-2))+$e(y(ce)),1)],64)):(b(),M(Qe,{key:1},[Ct($e(("0"+ce).slice(-2)),1)],64))],10,aY))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),I.arrowControl?(b(!0),M(Qe,{key:1},It(s(v),oe=>(b(),M("div",{key:oe,class:O([s(r).be("spinner","wrapper"),s(r).is("arrow")]),onMouseenter:ne=>w(oe)},[mt((b(),he(s(Ze),{class:O(["arrow-up",s(r).be("spinner","arrow")])},{default:le(()=>[ee(s(Ad))]),_:1},8,["class"])),[[s(ap),V]]),mt((b(),he(s(Ze),{class:O(["arrow-down",s(r).be("spinner","arrow")])},{default:le(()=>[ee(s(Pl))]),_:1},8,["class"])),[[s(ap),L]]),E("ul",{class:O(s(r).be("spinner","list"))},[(b(!0),M(Qe,null,It(s(_)[oe],(ne,ce)=>(b(),M("li",{key:ce,class:O([s(r).be("spinner","item"),s(r).is("active",ne===s(m)[oe]),s(r).is("disabled",s(f)[oe][ne])])},[typeof ne=="number"?(b(),M(Qe,{key:0},[oe==="hours"?(b(),M(Qe,{key:0},[Ct($e(("0"+(I.amPmMode?ne%12||12:ne)).slice(-2))+$e(y(ne)),1)],64)):(b(),M(Qe,{key:1},[Ct($e(("0"+ne).slice(-2)),1)],64))],64)):se("v-if",!0)],2))),128))],2)],42,iY))),128)):se("v-if",!0)],2))}}),[["__file","basic-time-spinner.vue"]]),dp=Le(N({__name:"panel-time-pick",props:Yq,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const o=e,r=Ge("EP_PICKER_BASE"),{arrowControl:l,disabledHours:n,disabledMinutes:a,disabledSeconds:i,defaultValue:c}=r.props,{getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:p}=uw(n,a,i),h=ze("time"),{t:v,lang:m}=Rt(),f=D([0,2]),_=dw(o),g=C(()=>ko(o.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),y=C(()=>o.format.includes("ss")),w=C(()=>o.format.includes("A")?"A":o.format.includes("a")?"a":""),x=K=>{const I=kt(K).locale(m.value),U=J(I);return I.isSame(U)},$=()=>{t("pick",_.value,!1)},T=(K=!1,I=!1)=>{I||t("pick",o.parsedValue,K)},R=K=>{if(!o.visible)return;const I=J(K).millisecond(0);t("pick",I,!0)},P=(K,I)=>{t("select-range",K,I),f.value=[K,I]},L=K=>{const I=[0,3].concat(y.value?[6]:[]),U=["hours","minutes"].concat(y.value?["seconds"]:[]),ne=(I.indexOf(f.value[0])+K+I.length)%I.length;B.start_emitSelectRange(U[ne])},V=K=>{const I=K.code,{left:U,right:oe,up:ne,down:ce}=lt;if([U,oe].includes(I)){L(I===U?-1:1),K.preventDefault();return}if([ne,ce].includes(I)){const Q=I===ne?-1:1;B.start_scrollDown(Q),K.preventDefault();return}},{timePickerOptions:B,onSetOption:j,getAvailableTime:te}=sw({getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:p}),J=K=>te(K,o.datetimeRole||"",!0),Z=K=>K?kt(K,o.format).locale(m.value):null,H=K=>K?K.format(o.format):null,F=()=>kt(c).locale(m.value);return t("set-picker-option",["isValidValue",x]),t("set-picker-option",["formatToString",H]),t("set-picker-option",["parseUserInput",Z]),t("set-picker-option",["handleKeydownInput",V]),t("set-picker-option",["getRangeAvailableTime",J]),t("set-picker-option",["getDefaultValue",F]),(K,I)=>(b(),he(Mo,{name:s(g)},{default:le(()=>[K.actualVisible||K.visible?(b(),M("div",{key:0,class:O(s(h).b("panel"))},[E("div",{class:O([s(h).be("panel","content"),{"has-seconds":s(y)}])},[ee(zv,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":s(l),"show-seconds":s(y),"am-pm-mode":s(w),"spinner-date":K.parsedValue,"disabled-hours":s(n),"disabled-minutes":s(a),"disabled-seconds":s(i),onChange:R,onSetOption:s(j),onSelectRange:P},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),E("div",{class:O(s(h).be("panel","footer"))},[E("button",{type:"button",class:O([s(h).be("panel","btn"),"cancel"]),onClick:$},$e(s(v)("el.datepicker.cancel")),3),E("button",{type:"button",class:O([s(h).be("panel","btn"),"confirm"]),onClick:I[0]||(I[0]=U=>T())},$e(s(v)("el.datepicker.confirm")),3)],2)],2)):se("v-if",!0)]),_:1},8,["name"]))}}),[["__file","panel-time-pick.vue"]]);const sY=Pe({...aw,parsedValue:{type:ue(Array)}}),cY=["disabled"];var uY=Le(N({__name:"panel-time-range",props:sY,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const o=e,r=(Ee,De)=>{const ae=[];for(let pe=Ee;pe<=De;pe++)ae.push(pe);return ae},{t:l,lang:n}=Rt(),a=ze("time"),i=ze("picker"),c=Ge("EP_PICKER_BASE"),{arrowControl:d,disabledHours:u,disabledMinutes:p,disabledSeconds:h,defaultValue:v}=c.props,m=C(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",d),x.value?"has-seconds":""]),f=C(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",d),x.value?"has-seconds":""]),_=C(()=>o.parsedValue[0]),g=C(()=>o.parsedValue[1]),y=dw(o),w=()=>{t("pick",y.value,!1)},x=C(()=>o.format.includes("ss")),$=C(()=>o.format.includes("A")?"A":o.format.includes("a")?"a":""),T=(Ee=!1)=>{t("pick",[_.value,g.value],Ee)},R=Ee=>{V(Ee.millisecond(0),g.value)},P=Ee=>{V(_.value,Ee.millisecond(0))},L=Ee=>{const De=Ee.map(pe=>kt(pe).locale(n.value)),ae=oe(De);return De[0].isSame(ae[0])&&De[1].isSame(ae[1])},V=(Ee,De)=>{t("pick",[Ee,De],!0)},B=C(()=>_.value>g.value),j=D([0,2]),te=(Ee,De)=>{t("select-range",Ee,De,"min"),j.value=[Ee,De]},J=C(()=>x.value?11:8),Z=(Ee,De)=>{t("select-range",Ee,De,"max");const ae=s(J);j.value=[Ee+ae,De+ae]},H=Ee=>{const De=x.value?[0,3,6,11,14,17]:[0,3,8,11],ae=["hours","minutes"].concat(x.value?["seconds"]:[]),ke=(De.indexOf(j.value[0])+Ee+De.length)%De.length,Oe=De.length/2;ke{const De=Ee.code,{left:ae,right:pe,up:ke,down:Oe}=lt;if([ae,pe].includes(De)){H(De===ae?-1:1),Ee.preventDefault();return}if([ke,Oe].includes(De)){const we=De===ke?-1:1,Te=j.value[0]{const ae=u?u(Ee):[],pe=Ee==="start",Oe=(De||(pe?g.value:_.value)).hour(),we=pe?r(Oe+1,23):r(0,Oe-1);return sh(ae,we)},I=(Ee,De,ae)=>{const pe=p?p(Ee,De):[],ke=De==="start",Oe=ae||(ke?g.value:_.value),we=Oe.hour();if(Ee!==we)return pe;const Te=Oe.minute(),Ne=ke?r(Te+1,59):r(0,Te-1);return sh(pe,Ne)},U=(Ee,De,ae,pe)=>{const ke=h?h(Ee,De,ae):[],Oe=ae==="start",we=pe||(Oe?g.value:_.value),Te=we.hour(),Ne=we.minute();if(Ee!==Te||De!==Ne)return ke;const Ie=we.second(),Ae=Oe?r(Ie+1,59):r(0,Ie-1);return sh(ke,Ae)},oe=([Ee,De])=>[de(Ee,"start",!0,De),de(De,"end",!1,Ee)],{getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:Q}=uw(K,I,U),{timePickerOptions:Me,getAvailableTime:de,onSetOption:_e}=sw({getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:Q}),me=Ee=>Ee?Ke(Ee)?Ee.map(De=>kt(De,o.format).locale(n.value)):kt(Ee,o.format).locale(n.value):null,Re=Ee=>Ee?Ke(Ee)?Ee.map(De=>De.format(o.format)):Ee.format(o.format):null,Ce=()=>{if(Ke(v))return v.map(De=>kt(De).locale(n.value));const Ee=kt(v).locale(n.value);return[Ee,Ee.add(60,"m")]};return t("set-picker-option",["formatToString",Re]),t("set-picker-option",["parseUserInput",me]),t("set-picker-option",["isValidValue",L]),t("set-picker-option",["handleKeydownInput",F]),t("set-picker-option",["getDefaultValue",Ce]),t("set-picker-option",["getRangeAvailableTime",oe]),(Ee,De)=>Ee.actualVisible?(b(),M("div",{key:0,class:O([s(a).b("range-picker"),s(i).b("panel")])},[E("div",{class:O(s(a).be("range-picker","content"))},[E("div",{class:O(s(a).be("range-picker","cell"))},[E("div",{class:O(s(a).be("range-picker","header"))},$e(s(l)("el.datepicker.startTime")),3),E("div",{class:O(s(m))},[ee(zv,{ref:"minSpinner",role:"start","show-seconds":s(x),"am-pm-mode":s($),"arrow-control":s(d),"spinner-date":s(_),"disabled-hours":K,"disabled-minutes":I,"disabled-seconds":U,onChange:R,onSetOption:s(_e),onSelectRange:te},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),E("div",{class:O(s(a).be("range-picker","cell"))},[E("div",{class:O(s(a).be("range-picker","header"))},$e(s(l)("el.datepicker.endTime")),3),E("div",{class:O(s(f))},[ee(zv,{ref:"maxSpinner",role:"end","show-seconds":s(x),"am-pm-mode":s($),"arrow-control":s(d),"spinner-date":s(g),"disabled-hours":K,"disabled-minutes":I,"disabled-seconds":U,onChange:P,onSetOption:s(_e),onSelectRange:Z},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),E("div",{class:O(s(a).be("panel","footer"))},[E("button",{type:"button",class:O([s(a).be("panel","btn"),"cancel"]),onClick:De[0]||(De[0]=ae=>w())},$e(s(l)("el.datepicker.cancel")),3),E("button",{type:"button",class:O([s(a).be("panel","btn"),"confirm"]),disabled:s(B),onClick:De[1]||(De[1]=ae=>T())},$e(s(l)("el.datepicker.confirm")),11,cY)],2)],2)):se("v-if",!0)}}),[["__file","panel-time-range.vue"]]);kt.extend(mv);var dY=N({name:"ElTimePicker",install:null,props:{...wv,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,t){const o=D(),[r,l]=e.isRange?["timerange",uY]:["time",dp],n=a=>t.emit("update:modelValue",a);return zt("ElPopperOptions",e.popperOptions),t.expose({focus:a=>{var i;(i=o.value)==null||i.handleFocusInput(a)},blur:a=>{var i;(i=o.value)==null||i.handleBlurInput(a)},handleOpen:()=>{var a;(a=o.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=o.value)==null||a.handleClose()}}),()=>{var a;const i=(a=e.format)!=null?a:gv;return ee(iw,Mt(e,{ref:o,type:r,format:i,"onUpdate:modelValue":n}),{default:c=>ee(l,c,null)})}}});const pp=dY;pp.install=e=>{e.component(pp.name,pp)};const pY=pp,fY=(e,t)=>{const o=e.subtract(1,"month").endOf("month").date();return aa(t).map((r,l)=>o-(t-l-1))},hY=e=>{const t=e.daysInMonth();return aa(t).map((o,r)=>r+1)},vY=e=>aa(e.length/7).map(t=>{const o=t*7;return e.slice(o,o+7)}),mY=Pe({selectedDay:{type:ue(Object)},range:{type:ue(Array)},date:{type:ue(Object),required:!0},hideHeader:{type:Boolean}}),gY={pick:e=>xt(e)};var Ew={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r,l){var n=r.prototype,a=function(p){return p&&(p.indexOf?p:p.s)},i=function(p,h,v,m,f){var _=p.name?p:p.$locale(),g=a(_[h]),y=a(_[v]),w=g||y.map(function($){return $.slice(0,m)});if(!f)return w;var x=_.weekStart;return w.map(function($,T){return w[(T+(x||0))%7]})},c=function(){return l.Ls[l.locale()]},d=function(p,h){return p.formats[h]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,f,_){return f||_.slice(1)})}(p.formats[h.toUpperCase()])},u=function(){var p=this;return{months:function(h){return h?h.format("MMMM"):i(p,"months")},monthsShort:function(h){return h?h.format("MMM"):i(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(p,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(p,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return d(p.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};n.localeData=function(){return u.bind(this)()},l.localeData=function(){var p=c();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return d(p,h)},meridiem:p.meridiem,ordinal:p.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(p){return i(c(),"weekdays",null,null,p)},l.weekdaysShort=function(p){return i(c(),"weekdaysShort","weekdays",3,p)},l.weekdaysMin=function(p){return i(c(),"weekdaysMin","weekdays",2,p)}}})})(Ew);var bY=Ew.exports;const Tw=cl(bY),_Y=(e,t)=>{kt.extend(Tw);const o=kt.localeData().firstDayOfWeek(),{t:r,lang:l}=Rt(),n=kt().locale(l.value),a=C(()=>!!e.range&&!!e.range.length),i=C(()=>{let h=[];if(a.value){const[v,m]=e.range,f=aa(m.date()-v.date()+1).map(y=>({text:v.date()+y,type:"current"}));let _=f.length%7;_=_===0?0:7-_;const g=aa(_).map((y,w)=>({text:w+1,type:"next"}));h=f.concat(g)}else{const v=e.date.startOf("month").day(),m=fY(e.date,(v-o+7)%7).map(y=>({text:y,type:"prev"})),f=hY(e.date).map(y=>({text:y,type:"current"}));h=[...m,...f];const _=7-(h.length%7||7),g=aa(_).map((y,w)=>({text:w+1,type:"next"}));h=h.concat(g)}return vY(h)}),c=C(()=>{const h=o;return h===0?wh.map(v=>r(`el.datepicker.weeks.${v}`)):wh.slice(h).concat(wh.slice(0,h)).map(v=>r(`el.datepicker.weeks.${v}`))}),d=(h,v)=>{switch(v){case"prev":return e.date.startOf("month").subtract(1,"month").date(h);case"next":return e.date.startOf("month").add(1,"month").date(h);case"current":return e.date.date(h)}};return{now:n,isInRange:a,rows:i,weekDays:c,getFormattedDate:d,handlePickDay:({text:h,type:v})=>{const m=d(h,v);t("pick",m)},getSlotData:({text:h,type:v})=>{const m=d(h,v);return{isSelected:m.isSame(e.selectedDay),type:`${v}-month`,day:m.format("YYYY-MM-DD"),date:m.toDate()}}}},wY={key:0},yY=["onClick"],xY=N({...N({name:"DateTable"}),props:mY,emits:gY,setup(e,{expose:t,emit:o}){const r=e,{isInRange:l,now:n,rows:a,weekDays:i,getFormattedDate:c,handlePickDay:d,getSlotData:u}=_Y(r,o),p=ze("calendar-table"),h=ze("calendar-day"),v=({text:m,type:f})=>{const _=[f];if(f==="current"){const g=c(m,f);g.isSame(r.selectedDay,"day")&&_.push(h.is("selected")),g.isSame(n,"day")&&_.push(h.is("today"))}return _};return t({getFormattedDate:c}),(m,f)=>(b(),M("table",{class:O([s(p).b(),s(p).is("range",s(l))]),cellspacing:"0",cellpadding:"0"},[m.hideHeader?se("v-if",!0):(b(),M("thead",wY,[(b(!0),M(Qe,null,It(s(i),_=>(b(),M("th",{key:_},$e(_),1))),128))])),E("tbody",null,[(b(!0),M(Qe,null,It(s(a),(_,g)=>(b(),M("tr",{key:g,class:O({[s(p).e("row")]:!0,[s(p).em("row","hide-border")]:g===0&&m.hideHeader})},[(b(!0),M(Qe,null,It(_,(y,w)=>(b(),M("td",{key:w,class:O(v(y)),onClick:x=>s(d)(y)},[E("div",{class:O(s(h).b())},[be(m.$slots,"date-cell",{data:s(u)(y)},()=>[E("span",null,$e(y.text),1)])],2)],10,yY))),128))],2))),128))])],2))}});var $w=Le(xY,[["__file","date-table.vue"]]);const kY=(e,t)=>{const o=e.endOf("month"),r=t.startOf("month"),n=o.isSame(r,"week")?r.add(1,"week"):r;return[[e,o],[n.startOf("week"),t]]},CY=(e,t)=>{const o=e.endOf("month"),r=e.add(1,"month").startOf("month"),l=o.isSame(r,"week")?r.add(1,"week"):r,n=l.endOf("month"),a=t.startOf("month"),i=n.isSame(a,"week")?a.add(1,"week"):a;return[[e,o],[l.startOf("week"),n],[i.startOf("week"),t]]},SY=(e,t,o)=>{const{lang:r}=Rt(),l=D(),n=kt().locale(r.value),a=C({get(){return e.modelValue?c.value:l.value},set(_){if(!_)return;l.value=_;const g=_.toDate();t(yr,g),t(St,g)}}),i=C(()=>{if(!e.range)return[];const _=e.range.map(w=>kt(w).locale(r.value)),[g,y]=_;return g.isAfter(y)?[]:g.isSame(y,"month")?v(g,y):g.add(1,"month").month()!==y.month()?[]:v(g,y)}),c=C(()=>e.modelValue?kt(e.modelValue).locale(r.value):a.value||(i.value.length?i.value[0][0]:n)),d=C(()=>c.value.subtract(1,"month").date(1)),u=C(()=>c.value.add(1,"month").date(1)),p=C(()=>c.value.subtract(1,"year").date(1)),h=C(()=>c.value.add(1,"year").date(1)),v=(_,g)=>{const y=_.startOf("week"),w=g.endOf("week"),x=y.get("month"),$=w.get("month");return x===$?[[y,w]]:(x+1)%12===$?kY(y,w):x+2===$||(x+1)%11===$?CY(y,w):[]},m=_=>{a.value=_};return{calculateValidatedDateRange:v,date:c,realSelectedDay:a,pickDay:m,selectDate:_=>{const y={"prev-month":d.value,"next-month":u.value,"prev-year":p.value,"next-year":h.value,today:n}[_];y.isSame(c.value,"day")||m(y)},validatedRange:i}},EY=e=>Ke(e)&&e.length===2&&e.every(t=>va(t)),TY=Pe({modelValue:{type:Date},range:{type:ue(Array),validator:EY}}),$Y={[St]:e=>va(e),[yr]:e=>va(e)},MY=N({...N({name:"ElCalendar"}),props:TY,emits:$Y,setup(e,{expose:t,emit:o}){const r=e,l=ze("calendar"),{calculateValidatedDateRange:n,date:a,pickDay:i,realSelectedDay:c,selectDate:d,validatedRange:u}=SY(r,o),{t:p}=Rt(),h=C(()=>{const v=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${p("el.datepicker.year")} ${p(v)}`});return t({selectedDay:c,pickDay:i,selectDate:d,calculateValidatedDateRange:n}),(v,m)=>(b(),M("div",{class:O(s(l).b())},[E("div",{class:O(s(l).e("header"))},[be(v.$slots,"header",{date:s(h)},()=>[E("div",{class:O(s(l).e("title"))},$e(s(h)),3),s(u).length===0?(b(),M("div",{key:0,class:O(s(l).e("button-group"))},[ee(s(G4),null,{default:le(()=>[ee(s(Wo),{size:"small",onClick:m[0]||(m[0]=f=>s(d)("prev-month"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.prevMonth")),1)]),_:1}),ee(s(Wo),{size:"small",onClick:m[1]||(m[1]=f=>s(d)("today"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.today")),1)]),_:1}),ee(s(Wo),{size:"small",onClick:m[2]||(m[2]=f=>s(d)("next-month"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.nextMonth")),1)]),_:1})]),_:1})],2)):se("v-if",!0)])],2),s(u).length===0?(b(),M("div",{key:0,class:O(s(l).e("body"))},[ee($w,{date:s(a),"selected-day":s(c),onPick:s(i)},ln({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:le(f=>[be(v.$slots,"date-cell",Zl(mi(f)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(b(),M("div",{key:1,class:O(s(l).e("body"))},[(b(!0),M(Qe,null,It(s(u),(f,_)=>(b(),he($w,{key:_,date:f[0],"selected-day":s(c),range:f,"hide-header":_!==0,onPick:s(i)},ln({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:le(g=>[be(v.$slots,"date-cell",Zl(mi(g)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var AY=Le(MY,[["__file","calendar.vue"]]);const zY=yt(AY),IY=Pe({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:ue([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),OY=N({...N({name:"ElCard"}),props:IY,setup(e){const t=ze("card");return(o,r)=>(b(),M("div",{class:O([s(t).b(),s(t).is(`${o.shadow}-shadow`)])},[o.$slots.header||o.header?(b(),M("div",{key:0,class:O(s(t).e("header"))},[be(o.$slots,"header",{},()=>[Ct($e(o.header),1)])],2)):se("v-if",!0),E("div",{class:O([s(t).e("body"),o.bodyClass]),style:Je(o.bodyStyle)},[be(o.$slots,"default")],6),o.$slots.footer||o.footer?(b(),M("div",{key:1,class:O(s(t).e("footer"))},[be(o.$slots,"footer",{},()=>[Ct($e(o.footer),1)])],2)):se("v-if",!0)],2))}});var NY=Le(OY,[["__file","card.vue"]]);const PY=yt(NY),RY=Pe({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:{type:Boolean,default:!1}}),LY={change:(e,t)=>[e,t].every(st)},Mw=Symbol("carouselContextKey"),Aw=300,BY=(e,t,o)=>{const{children:r,addChild:l,removeChild:n}=Wh(wt(),"ElCarouselItem"),a=Do(),i=D(-1),c=D(null),d=D(!1),u=D(),p=D(0),h=D(!0),v=D(!0),m=D(!1),f=C(()=>e.arrow!=="never"&&!s(y)),_=C(()=>r.value.some(de=>de.props.label.toString().length>0)),g=C(()=>e.type==="card"),y=C(()=>e.direction==="vertical"),w=C(()=>e.height!=="auto"?{height:e.height}:{height:`${p.value}px`,overflow:"hidden"}),x=Oa(de=>{V(de)},Aw,{trailing:!0}),$=Oa(de=>{I(de)},Aw),T=de=>h.value?i.value<=1?de<=1:de>1:!0;function R(){c.value&&(clearInterval(c.value),c.value=null)}function P(){e.interval<=0||!e.autoplay||c.value||(c.value=setInterval(()=>L(),e.interval))}const L=()=>{v.value||(m.value=!0),v.value=!1,i.valueCe.props.name===de);Re.length>0&&(de=r.value.indexOf(Re[0]))}if(de=Number(de),Number.isNaN(de)||de!==Math.floor(de))return;const _e=r.value.length,me=i.value;de<0?i.value=e.loop?_e-1:0:de>=_e?i.value=e.loop?0:_e-1:i.value=de,me===i.value&&B(me),ne()}function B(de){r.value.forEach((_e,me)=>{_e.translateItem(me,i.value,de)})}function j(de,_e){var me,Re,Ce,Ee;const De=s(r),ae=De.length;if(ae===0||!de.states.inStage)return!1;const pe=_e+1,ke=_e-1,Oe=ae-1,we=De[Oe].states.active,Te=De[0].states.active,Ne=(Re=(me=De[pe])==null?void 0:me.states)==null?void 0:Re.active,Ie=(Ee=(Ce=De[ke])==null?void 0:Ce.states)==null?void 0:Ee.active;return _e===Oe&&Te||Ne?"left":_e===0&&we||Ie?"right":!1}function te(){d.value=!0,e.pauseOnHover&&R()}function J(){d.value=!1,P()}function Z(){m.value=!1}function H(de){s(y)||r.value.forEach((_e,me)=>{de===j(_e,me)&&(_e.states.hover=!0)})}function F(){s(y)||r.value.forEach(de=>{de.states.hover=!1})}function K(de){de!==i.value&&(v.value||(m.value=!0)),i.value=de}function I(de){e.trigger==="hover"&&de!==i.value&&(i.value=de,v.value||(m.value=!0))}function U(){V(i.value-1)}function oe(){V(i.value+1)}function ne(){R(),e.pauseOnHover||P()}function ce(de){e.height==="auto"&&(p.value=de)}function Q(){var de;const _e=(de=a.default)==null?void 0:de.call(a);if(!_e)return null;const me=Qn(_e),Re="ElCarouselItem",Ce=me.filter(Ee=>io(Ee)&&Ee.type.name===Re);return(Ce==null?void 0:Ce.length)===2&&e.loop&&!g.value?(h.value=!0,Ce):(h.value=!1,null)}Se(()=>i.value,(de,_e)=>{B(_e),h.value&&(de=de%2,_e=_e%2),_e>-1&&t("change",de,_e)}),Se(()=>e.autoplay,de=>{de?P():R()}),Se(()=>e.loop,()=>{V(i.value)}),Se(()=>e.interval,()=>{ne()});const Me=lo();return ft(()=>{Se(()=>r.value,()=>{r.value.length>0&&V(e.initialIndex)},{immediate:!0}),Me.value=so(u.value,()=>{B()}),P()}),to(()=>{R(),u.value&&Me.value&&Me.value.stop()}),zt(Mw,{root:u,isCardType:g,isVertical:y,items:r,loop:e.loop,addItem:l,removeItem:n,setActiveItem:V,setContainerHeight:ce}),{root:u,activeIndex:i,arrowDisplay:f,hasLabel:_,hover:d,isCardType:g,isTransitioning:m,items:r,isVertical:y,containerStyle:w,isItemsTwoLength:h,handleButtonEnter:H,handleTransitionEnd:Z,handleButtonLeave:F,handleIndicatorClick:K,handleMouseEnter:te,handleMouseLeave:J,setActiveItem:V,prev:U,next:oe,PlaceholderItem:Q,isTwoLengthShow:T,throttledArrowClick:x,throttledIndicatorHover:$}},VY=["aria-label"],DY=["aria-label"],HY=["onMouseenter","onClick"],FY=["aria-label"],jY={key:0},KY={key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},UY=[E("defs",null,[E("filter",{id:"elCarouselHorizontal"},[E("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),E("filter",{id:"elCarouselVertical"},[E("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])],-1)],WY=N({...N({name:"ElCarousel"}),props:RY,emits:LY,setup(e,{expose:t,emit:o}){const r=e,{root:l,activeIndex:n,arrowDisplay:a,hasLabel:i,hover:c,isCardType:d,items:u,isVertical:p,containerStyle:h,handleButtonEnter:v,handleButtonLeave:m,isTransitioning:f,handleIndicatorClick:_,handleMouseEnter:g,handleMouseLeave:y,handleTransitionEnd:w,setActiveItem:x,prev:$,next:T,PlaceholderItem:R,isTwoLengthShow:P,throttledArrowClick:L,throttledIndicatorHover:V}=BY(r,o),B=ze("carousel"),{t:j}=Rt(),te=C(()=>{const H=[B.b(),B.m(r.direction)];return s(d)&&H.push(B.m("card")),H}),J=C(()=>{const H=[B.e("container")];return r.motionBlur&&s(f)&&H.push(s(p)?`${B.namespace.value}-transitioning-vertical`:`${B.namespace.value}-transitioning`),H}),Z=C(()=>{const H=[B.e("indicators"),B.em("indicators",r.direction)];return s(i)&&H.push(B.em("indicators","labels")),r.indicatorPosition==="outside"&&H.push(B.em("indicators","outside")),s(p)&&H.push(B.em("indicators","right")),H});return t({setActiveItem:x,prev:$,next:T}),(H,F)=>(b(),M("div",{ref_key:"root",ref:l,class:O(s(te)),onMouseenter:F[7]||(F[7]=ct((...K)=>s(g)&&s(g)(...K),["stop"])),onMouseleave:F[8]||(F[8]=ct((...K)=>s(y)&&s(y)(...K),["stop"]))},[s(a)?(b(),he(Mo,{key:0,name:"carousel-arrow-left",persisted:""},{default:le(()=>[mt(E("button",{type:"button",class:O([s(B).e("arrow"),s(B).em("arrow","left")]),"aria-label":s(j)("el.carousel.leftArrow"),onMouseenter:F[0]||(F[0]=K=>s(v)("left")),onMouseleave:F[1]||(F[1]=(...K)=>s(m)&&s(m)(...K)),onClick:F[2]||(F[2]=ct(K=>s(L)(s(n)-1),["stop"]))},[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1})],42,VY),[[Lt,(H.arrow==="always"||s(c))&&(r.loop||s(n)>0)]])]),_:1})):se("v-if",!0),s(a)?(b(),he(Mo,{key:1,name:"carousel-arrow-right",persisted:""},{default:le(()=>[mt(E("button",{type:"button",class:O([s(B).e("arrow"),s(B).em("arrow","right")]),"aria-label":s(j)("el.carousel.rightArrow"),onMouseenter:F[3]||(F[3]=K=>s(v)("right")),onMouseleave:F[4]||(F[4]=(...K)=>s(m)&&s(m)(...K)),onClick:F[5]||(F[5]=ct(K=>s(L)(s(n)+1),["stop"]))},[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})],42,DY),[[Lt,(H.arrow==="always"||s(c))&&(r.loop||s(n)s(w)&&s(w)(...K))},[ee(s(R)),be(H.$slots,"default")],38),H.indicatorPosition!=="none"?(b(),M("ul",{key:2,class:O(s(Z))},[(b(!0),M(Qe,null,It(s(u),(K,I)=>mt((b(),M("li",{key:I,class:O([s(B).e("indicator"),s(B).em("indicator",H.direction),s(B).is("active",I===s(n))]),onMouseenter:U=>s(V)(I),onClick:ct(U=>s(_)(I),["stop"])},[E("button",{class:O(s(B).e("button")),"aria-label":s(j)("el.carousel.indicator",{index:I+1})},[s(i)?(b(),M("span",jY,$e(K.props.label),1)):se("v-if",!0)],10,FY)],42,HY)),[[Lt,s(P)(I)]])),128))],2)):se("v-if",!0),r.motionBlur?(b(),M("svg",KY,UY)):se("v-if",!0)],34))}});var qY=Le(WY,[["__file","carousel.vue"]]);const YY=Pe({name:{type:String,default:""},label:{type:[String,Number],default:""}}),GY=(e,t)=>{const o=Ge(Mw),r=wt(),l=.83,n=D(),a=D(!1),i=D(0),c=D(1),d=D(!1),u=D(!1),p=D(!1),h=D(!1),{isCardType:v,isVertical:m}=o;function f(x,$,T){const R=T-1,P=$-1,L=$+1,V=T/2;return $===0&&x===R?-1:$===R&&x===0?T:x=V?T+1:x>L&&x-$>=V?-2:x}function _(x,$){var T,R;const P=s(m)?((T=o.root.value)==null?void 0:T.offsetHeight)||0:((R=o.root.value)==null?void 0:R.offsetWidth)||0;return p.value?P*((2-l)*(x-$)+1)/4:x<$?-(1+l)*P/4:(3+l)*P/4}function g(x,$,T){const R=o.root.value;return R?((T?R.offsetHeight:R.offsetWidth)||0)*(x-$):0}const y=(x,$,T)=>{var R;const P=s(v),L=(R=o.items.value.length)!=null?R:Number.NaN,V=x===$;!P&&!ko(T)&&(h.value=V||x===T),!V&&L>2&&o.loop&&(x=f(x,$,L));const B=s(m);d.value=V,P?(p.value=Math.round(Math.abs(x-$))<=1,i.value=_(x,$),c.value=s(d)?1:l):i.value=g(x,$,B),u.value=!0,V&&n.value&&o.setContainerHeight(n.value.offsetHeight)};function w(){if(o&&s(v)){const x=o.items.value.findIndex(({uid:$})=>$===r.uid);o.setActiveItem(x)}}return ft(()=>{o.addItem({props:e,states:Dt({hover:a,translate:i,scale:c,active:d,ready:u,inStage:p,animating:h}),uid:r.uid,translateItem:y})}),Rn(()=>{o.removeItem(r.uid)}),{carouselItemRef:n,active:d,animating:h,hover:a,inStage:p,isVertical:m,translate:i,isCardType:v,scale:c,ready:u,handleItemClick:w}},XY=N({...N({name:"ElCarouselItem"}),props:YY,setup(e){const t=e,o=ze("carousel"),{carouselItemRef:r,active:l,animating:n,hover:a,inStage:i,isVertical:c,translate:d,isCardType:u,scale:p,ready:h,handleItemClick:v}=GY(t),m=C(()=>[o.e("item"),o.is("active",l.value),o.is("in-stage",i.value),o.is("hover",a.value),o.is("animating",n.value),{[o.em("item","card")]:u.value,[o.em("item","card-vertical")]:u.value&&c.value}]),f=C(()=>{const g=`${`translate${s(c)?"Y":"X"}`}(${s(d)}px)`,y=`scale(${s(p)})`;return{transform:[g,y].join(" ")}});return(_,g)=>mt((b(),M("div",{ref_key:"carouselItemRef",ref:r,class:O(s(m)),style:Je(s(f)),onClick:g[0]||(g[0]=(...y)=>s(v)&&s(v)(...y))},[s(u)?mt((b(),M("div",{key:0,class:O(s(o).e("mask"))},null,2)),[[Lt,!s(l)]]):se("v-if",!0),be(_.$slots,"default")],6)),[[Lt,s(h)]])}});var zw=Le(XY,[["__file","carousel-item.vue"]]);const ZY=yt(qY,{CarouselItem:zw}),JY=co(zw),Iw={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Oo,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Zo(["ariaControls"])},Ow={[St]:e=>ut(e)||st(e)||Co(e),change:e=>ut(e)||st(e)||Co(e)},os=Symbol("checkboxGroupContextKey"),QY=({model:e,isChecked:t})=>{const o=Ge(os,void 0),r=C(()=>{var n,a;const i=(n=o==null?void 0:o.max)==null?void 0:n.value,c=(a=o==null?void 0:o.min)==null?void 0:a.value;return!ko(i)&&e.value.length>=i&&!t.value||!ko(c)&&e.value.length<=c&&t.value});return{isDisabled:xr(C(()=>(o==null?void 0:o.disabled.value)||r.value)),isLimitDisabled:r}},eG=(e,{model:t,isLimitExceeded:o,hasOwnLabel:r,isDisabled:l,isLabeledByFormItem:n})=>{const a=Ge(os,void 0),{formItem:i}=sr(),{emit:c}=wt();function d(m){var f,_,g,y;return[!0,e.trueValue,e.trueLabel].includes(m)?(_=(f=e.trueValue)!=null?f:e.trueLabel)!=null?_:!0:(y=(g=e.falseValue)!=null?g:e.falseLabel)!=null?y:!1}function u(m,f){c("change",d(m),f)}function p(m){if(o.value)return;const f=m.target;c("change",d(f.checked),m)}async function h(m){o.value||!r.value&&!l.value&&n.value&&(m.composedPath().some(g=>g.tagName==="LABEL")||(t.value=d([!1,e.falseValue,e.falseLabel].includes(t.value)),await et(),u(t.value,m)))}const v=C(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return Se(()=>e.modelValue,()=>{v.value&&(i==null||i.validate("change").catch(m=>void 0))}),{handleChange:p,onClickRoot:h}},tG=e=>{const t=D(!1),{emit:o}=wt(),r=Ge(os,void 0),l=C(()=>ko(r)===!1),n=D(!1),a=C({get(){var i,c;return l.value?(i=r==null?void 0:r.modelValue)==null?void 0:i.value:(c=e.modelValue)!=null?c:t.value},set(i){var c,d;l.value&&Ke(i)?(n.value=((c=r==null?void 0:r.max)==null?void 0:c.value)!==void 0&&i.length>(r==null?void 0:r.max.value)&&i.length>a.value.length,n.value===!1&&((d=r==null?void 0:r.changeEvent)==null||d.call(r,i))):(o(St,i),t.value=i)}});return{model:a,isGroup:l,isLimitExceeded:n}},oG=(e,t,{model:o})=>{const r=Ge(os,void 0),l=D(!1),n=C(()=>Na(e.value)?e.label:e.value),a=C(()=>{const u=o.value;return Co(u)?u:Ke(u)?xt(n.value)?u.map(jt).some(p=>nr(p,n.value)):u.map(jt).includes(n.value):u!=null?u===e.trueValue||u===e.trueLabel:!!u}),i=So(C(()=>{var u;return(u=r==null?void 0:r.size)==null?void 0:u.value}),{prop:!0}),c=So(C(()=>{var u;return(u=r==null?void 0:r.size)==null?void 0:u.value})),d=C(()=>!!t.default||!Na(n.value));return{checkboxButtonSize:i,isChecked:a,isFocused:l,checkboxSize:c,hasOwnLabel:d,actualValue:n}},Nw=(e,t)=>{const{formItem:o}=sr(),{model:r,isGroup:l,isLimitExceeded:n}=tG(e),{isFocused:a,isChecked:i,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:u,actualValue:p}=oG(e,t,{model:r}),{isDisabled:h}=QY({model:r,isChecked:i}),{inputId:v,isLabeledByFormItem:m}=bl(e,{formItemContext:o,disableIdGeneration:u,disableIdManagement:l}),{handleChange:f,onClickRoot:_}=eG(e,{model:r,isLimitExceeded:n,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:m});return(()=>{function y(){var w,x;Ke(r.value)&&!r.value.includes(p.value)?r.value.push(p.value):r.value=(x=(w=e.trueValue)!=null?w:e.trueLabel)!=null?x:!0}e.checked&&y()})(),Lo({from:"controls",replacement:"aria-controls",version:"2.8.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.controls)),Lo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>l.value&&Na(e.value))),Lo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.trueLabel)),Lo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.falseLabel)),{inputId:v,isLabeledByFormItem:m,isChecked:i,isDisabled:h,isFocused:a,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:u,model:r,actualValue:p,handleChange:f,onClickRoot:_}},rG=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],lG=["id","indeterminate","disabled","value","name","tabindex"],nG=N({...N({name:"ElCheckbox"}),props:Iw,emits:Ow,setup(e){const t=e,o=Do(),{inputId:r,isLabeledByFormItem:l,isChecked:n,isDisabled:a,isFocused:i,checkboxSize:c,hasOwnLabel:d,model:u,actualValue:p,handleChange:h,onClickRoot:v}=Nw(t,o),m=ze("checkbox"),f=C(()=>[m.b(),m.m(c.value),m.is("disabled",a.value),m.is("bordered",t.border),m.is("checked",n.value)]),_=C(()=>[m.e("input"),m.is("disabled",a.value),m.is("checked",n.value),m.is("indeterminate",t.indeterminate),m.is("focus",i.value)]);return(g,y)=>(b(),he(Et(!s(d)&&s(l)?"span":"label"),{class:O(s(f)),"aria-controls":g.indeterminate?g.controls||g.ariaControls:null,onClick:s(v)},{default:le(()=>{var w,x;return[E("span",{class:O(s(_))},[g.trueValue||g.falseValue||g.trueLabel||g.falseLabel?mt((b(),M("input",{key:0,id:s(r),"onUpdate:modelValue":y[0]||(y[0]=$=>Zt(u)?u.value=$:null),class:O(s(m).e("original")),type:"checkbox",indeterminate:g.indeterminate,name:g.name,tabindex:g.tabindex,disabled:s(a),"true-value":(w=g.trueValue)!=null?w:g.trueLabel,"false-value":(x=g.falseValue)!=null?x:g.falseLabel,onChange:y[1]||(y[1]=(...$)=>s(h)&&s(h)(...$)),onFocus:y[2]||(y[2]=$=>i.value=!0),onBlur:y[3]||(y[3]=$=>i.value=!1),onClick:y[4]||(y[4]=ct(()=>{},["stop"]))},null,42,rG)),[[Gu,s(u)]]):mt((b(),M("input",{key:1,id:s(r),"onUpdate:modelValue":y[5]||(y[5]=$=>Zt(u)?u.value=$:null),class:O(s(m).e("original")),type:"checkbox",indeterminate:g.indeterminate,disabled:s(a),value:s(p),name:g.name,tabindex:g.tabindex,onChange:y[6]||(y[6]=(...$)=>s(h)&&s(h)(...$)),onFocus:y[7]||(y[7]=$=>i.value=!0),onBlur:y[8]||(y[8]=$=>i.value=!1),onClick:y[9]||(y[9]=ct(()=>{},["stop"]))},null,42,lG)),[[Gu,s(u)]]),E("span",{class:O(s(m).e("inner"))},null,2)],2),s(d)?(b(),M("span",{key:0,class:O(s(m).e("label"))},[be(g.$slots,"default"),g.$slots.default?se("v-if",!0):(b(),M(Qe,{key:0},[Ct($e(g.label),1)],64))],2)):se("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var aG=Le(nG,[["__file","checkbox.vue"]]);const iG=["name","tabindex","disabled","true-value","false-value"],sG=["name","tabindex","disabled","value"],cG=N({...N({name:"ElCheckboxButton"}),props:Iw,emits:Ow,setup(e){const t=e,o=Do(),{isFocused:r,isChecked:l,isDisabled:n,checkboxButtonSize:a,model:i,actualValue:c,handleChange:d}=Nw(t,o),u=Ge(os,void 0),p=ze("checkbox"),h=C(()=>{var m,f,_,g;const y=(f=(m=u==null?void 0:u.fill)==null?void 0:m.value)!=null?f:"";return{backgroundColor:y,borderColor:y,color:(g=(_=u==null?void 0:u.textColor)==null?void 0:_.value)!=null?g:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),v=C(()=>[p.b("button"),p.bm("button",a.value),p.is("disabled",n.value),p.is("checked",l.value),p.is("focus",r.value)]);return(m,f)=>{var _,g;return b(),M("label",{class:O(s(v))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?mt((b(),M("input",{key:0,"onUpdate:modelValue":f[0]||(f[0]=y=>Zt(i)?i.value=y:null),class:O(s(p).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:s(n),"true-value":(_=m.trueValue)!=null?_:m.trueLabel,"false-value":(g=m.falseValue)!=null?g:m.falseLabel,onChange:f[1]||(f[1]=(...y)=>s(d)&&s(d)(...y)),onFocus:f[2]||(f[2]=y=>r.value=!0),onBlur:f[3]||(f[3]=y=>r.value=!1),onClick:f[4]||(f[4]=ct(()=>{},["stop"]))},null,42,iG)),[[Gu,s(i)]]):mt((b(),M("input",{key:1,"onUpdate:modelValue":f[5]||(f[5]=y=>Zt(i)?i.value=y:null),class:O(s(p).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:s(n),value:s(c),onChange:f[6]||(f[6]=(...y)=>s(d)&&s(d)(...y)),onFocus:f[7]||(f[7]=y=>r.value=!0),onBlur:f[8]||(f[8]=y=>r.value=!1),onClick:f[9]||(f[9]=ct(()=>{},["stop"]))},null,42,sG)),[[Gu,s(i)]]),m.$slots.default||m.label?(b(),M("span",{key:2,class:O(s(p).be("button","inner")),style:Je(s(l)?s(h):void 0)},[be(m.$slots,"default",{},()=>[Ct($e(m.label),1)])],6)):se("v-if",!0)],2)}}});var Pw=Le(cG,[["__file","checkbox-button.vue"]]);const uG=Pe({modelValue:{type:ue(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Oo,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),dG={[St]:e=>Ke(e),change:e=>Ke(e)},pG=N({...N({name:"ElCheckboxGroup"}),props:uG,emits:dG,setup(e,{emit:t}){const o=e,r=ze("checkbox"),{formItem:l}=sr(),{inputId:n,isLabeledByFormItem:a}=bl(o,{formItemContext:l}),i=async d=>{t(St,d),await et(),t("change",d)},c=C({get(){return o.modelValue},set(d){i(d)}});return zt(os,{...Ol(Bo(o),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:i}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-checkbox-group",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!o.label)),Se(()=>o.modelValue,()=>{o.validateEvent&&(l==null||l.validate("change").catch(d=>void 0))}),(d,u)=>{var p;return b(),he(Et(d.tag),{id:s(n),class:O(s(r).b("group")),role:"group","aria-label":s(a)?void 0:d.label||d.ariaLabel||"checkbox-group","aria-labelledby":s(a)?(p=s(l))==null?void 0:p.labelId:void 0},{default:le(()=>[be(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Rw=Le(pG,[["__file","checkbox-group.vue"]]);const rl=yt(aG,{CheckboxButton:Pw,CheckboxGroup:Rw}),fG=co(Pw),Lw=co(Rw),Bw=Pe({modelValue:{type:[String,Number,Boolean],default:void 0},size:Oo,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),hG=Pe({...Bw,border:Boolean}),Vw={[St]:e=>ut(e)||st(e)||Co(e),[ro]:e=>ut(e)||st(e)||Co(e)},Dw=Symbol("radioGroupKey"),Hw=(e,t)=>{const o=D(),r=Ge(Dw,void 0),l=C(()=>!!r),n=C(()=>Na(e.value)?e.label:e.value),a=C({get(){return l.value?r.modelValue:e.modelValue},set(p){l.value?r.changeEvent(p):t&&t(St,p),o.value.checked=e.modelValue===n.value}}),i=So(C(()=>r==null?void 0:r.size)),c=xr(C(()=>r==null?void 0:r.disabled)),d=D(!1),u=C(()=>c.value||l.value&&a.value!==n.value?-1:0);return Lo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},C(()=>l.value&&Na(e.value))),{radioRef:o,isGroup:l,radioGroup:r,focus:d,size:i,disabled:c,tabIndex:u,modelValue:a,actualValue:n}},vG=["value","name","disabled"],mG=N({...N({name:"ElRadio"}),props:hG,emits:Vw,setup(e,{emit:t}){const o=e,r=ze("radio"),{radioRef:l,radioGroup:n,focus:a,size:i,disabled:c,modelValue:d,actualValue:u}=Hw(o,t);function p(){et(()=>t("change",d.value))}return(h,v)=>{var m;return b(),M("label",{class:O([s(r).b(),s(r).is("disabled",s(c)),s(r).is("focus",s(a)),s(r).is("bordered",h.border),s(r).is("checked",s(d)===s(u)),s(r).m(s(i))])},[E("span",{class:O([s(r).e("input"),s(r).is("disabled",s(c)),s(r).is("checked",s(d)===s(u))])},[mt(E("input",{ref_key:"radioRef",ref:l,"onUpdate:modelValue":v[0]||(v[0]=f=>Zt(d)?d.value=f:null),class:O(s(r).e("original")),value:s(u),name:h.name||((m=s(n))==null?void 0:m.name),disabled:s(c),type:"radio",onFocus:v[1]||(v[1]=f=>a.value=!0),onBlur:v[2]||(v[2]=f=>a.value=!1),onChange:p,onClick:v[3]||(v[3]=ct(()=>{},["stop"]))},null,42,vG),[[P1,s(d)]]),E("span",{class:O(s(r).e("inner"))},null,2)],2),E("span",{class:O(s(r).e("label")),onKeydown:v[4]||(v[4]=ct(()=>{},["stop"]))},[be(h.$slots,"default",{},()=>[Ct($e(h.label),1)])],34)],2)}}});var gG=Le(mG,[["__file","radio.vue"]]);const bG=Pe({...Bw}),_G=["value","name","disabled"],wG=N({...N({name:"ElRadioButton"}),props:bG,setup(e){const t=e,o=ze("radio"),{radioRef:r,focus:l,size:n,disabled:a,modelValue:i,radioGroup:c,actualValue:d}=Hw(t),u=C(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(p,h)=>{var v;return b(),M("label",{class:O([s(o).b("button"),s(o).is("active",s(i)===s(d)),s(o).is("disabled",s(a)),s(o).is("focus",s(l)),s(o).bm("button",s(n))])},[mt(E("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":h[0]||(h[0]=m=>Zt(i)?i.value=m:null),class:O(s(o).be("button","original-radio")),value:s(d),type:"radio",name:p.name||((v=s(c))==null?void 0:v.name),disabled:s(a),onFocus:h[1]||(h[1]=m=>l.value=!0),onBlur:h[2]||(h[2]=m=>l.value=!1),onClick:h[3]||(h[3]=ct(()=>{},["stop"]))},null,42,_G),[[P1,s(i)]]),E("span",{class:O(s(o).be("button","inner")),style:Je(s(i)===s(d)?s(u):{}),onKeydown:h[4]||(h[4]=ct(()=>{},["stop"]))},[be(p.$slots,"default",{},()=>[Ct($e(p.label),1)])],38)],2)}}});var Fw=Le(wG,[["__file","radio-button.vue"]]);const yG=Pe({id:{type:String,default:void 0},size:Oo,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),xG=Vw,kG=["id","aria-label","aria-labelledby"],CG=N({...N({name:"ElRadioGroup"}),props:yG,emits:xG,setup(e,{emit:t}){const o=e,r=ze("radio"),l=Qo(),n=D(),{formItem:a}=sr(),{inputId:i,isLabeledByFormItem:c}=bl(o,{formItemContext:a}),d=p=>{t(St,p),et(()=>t("change",p))};ft(()=>{const p=n.value.querySelectorAll("[type=radio]"),h=p[0];!Array.from(p).some(v=>v.checked)&&h&&(h.tabIndex=0)});const u=C(()=>o.name||l.value);return zt(Dw,Dt({...Bo(o),changeEvent:d,name:u})),Se(()=>o.modelValue,()=>{o.validateEvent&&(a==null||a.validate("change").catch(p=>void 0))}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-radio-group",ref:"https://element-plus.org/en-US/component/radio.html"},C(()=>!!o.label)),(p,h)=>(b(),M("div",{id:s(i),ref_key:"radioGroupRef",ref:n,class:O(s(r).b("group")),role:"radiogroup","aria-label":s(c)?void 0:p.label||p.ariaLabel||"radio-group","aria-labelledby":s(c)?s(a).labelId:void 0},[be(p.$slots,"default")],10,kG))}});var jw=Le(CG,[["__file","radio-group.vue"]]);const Kw=yt(gG,{RadioButton:Fw,RadioGroup:jw}),SG=co(jw),EG=co(Fw);var TG=N({name:"NodeContent",setup(){return{ns:ze("cascader-node")}},render(){const{ns:e}=this,{node:t,panel:o}=this.$parent,{data:r,label:l}=t,{renderLabelFn:n}=o;return rt("span",{class:e.e("label")},n?n({node:t,data:r}):l)}});const Iv=Symbol(),$G=N({name:"ElCascaderNode",components:{ElCheckbox:rl,ElRadio:Kw,NodeContent:TG,ElIcon:Ze,Check:Li,Loading:vn,ArrowRight:ir},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const o=Ge(Iv),r=ze("cascader-node"),l=C(()=>o.isHoverMenu),n=C(()=>o.config.multiple),a=C(()=>o.config.checkStrictly),i=C(()=>{var T;return(T=o.checkedNodes[0])==null?void 0:T.uid}),c=C(()=>e.node.isDisabled),d=C(()=>e.node.isLeaf),u=C(()=>a.value&&!d.value||!c.value),p=C(()=>v(o.expandingNode)),h=C(()=>a.value&&o.checkedNodes.some(v)),v=T=>{var R;const{level:P,uid:L}=e.node;return((R=T==null?void 0:T.pathNodes[P-1])==null?void 0:R.uid)===L},m=()=>{p.value||o.expandNode(e.node)},f=T=>{const{node:R}=e;T!==R.checked&&o.handleCheckChange(R,T)},_=()=>{o.lazyLoad(e.node,()=>{d.value||m()})},g=T=>{l.value&&(y(),!d.value&&t("expand",T))},y=()=>{const{node:T}=e;!u.value||T.loading||(T.loaded?m():_())},w=()=>{l.value&&!d.value||(d.value&&!c.value&&!a.value&&!n.value?$(!0):y())},x=T=>{a.value?(f(T),e.node.loaded&&m()):$(T)},$=T=>{e.node.loaded?(f(T),!a.value&&m()):_()};return{panel:o,isHoverMenu:l,multiple:n,checkStrictly:a,checkedNodeId:i,isDisabled:c,isLeaf:d,expandable:u,inExpandingPath:p,inCheckedPath:h,ns:r,handleHoverExpand:g,handleExpand:y,handleClick:w,handleCheck:$,handleSelectCheck:x}}}),MG=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"],AG=E("span",null,null,-1);function zG(e,t,o,r,l,n){const a=nt("el-checkbox"),i=nt("el-radio"),c=nt("check"),d=nt("el-icon"),u=nt("node-content"),p=nt("loading"),h=nt("arrow-right");return b(),M("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:O([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:t[2]||(t[2]=(...v)=>e.handleHoverExpand&&e.handleHoverExpand(...v)),onFocus:t[3]||(t[3]=(...v)=>e.handleHoverExpand&&e.handleHoverExpand(...v)),onClick:t[4]||(t[4]=(...v)=>e.handleClick&&e.handleClick(...v))},[se(" prefix "),e.multiple?(b(),he(a,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:t[0]||(t[0]=ct(()=>{},["stop"])),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onUpdate:modelValue"])):e.checkStrictly?(b(),he(i,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:t[1]||(t[1]=ct(()=>{},["stop"]))},{default:le(()=>[se(` +*/const oY=function(e,t){if(e&&e.addEventListener){const o=function(r){const l=tY(r);t&&Reflect.apply(t,this,[r,l])};e.addEventListener("wheel",o,{passive:!0})}},rY={beforeMount(e,t){oY(e,t.value)}},lY=Pe({role:{type:String,required:!0},spinnerDate:{type:ue(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:ue(String),default:""},...lw}),nY=["onClick"],aY=["onMouseenter"];var Av=Le(N({__name:"basic-time-spinner",props:lY,emits:["change","select-range","set-option"],setup(e,{emit:t}){const o=e,r=ze("time"),{getHoursList:l,getMinutesList:n,getSecondsList:a}=sw(o.disabledHours,o.disabledMinutes,o.disabledSeconds);let i=!1;const c=D(),d=D(),u=D(),p=D(),h={hours:d,minutes:u,seconds:p},v=C(()=>o.showSeconds?Z4:Z4.slice(0,2)),m=C(()=>{const{spinnerDate:I}=o,U=I.hour(),oe=I.minute(),ne=I.second();return{hours:U,minutes:oe,seconds:ne}}),f=C(()=>{const{hours:I,minutes:U}=s(m);return{hours:l(o.role),minutes:n(I,o.role),seconds:a(I,U,o.role)}}),_=C(()=>{const{hours:I,minutes:U,seconds:oe}=s(m);return{hours:gv(I,23),minutes:gv(U,59),seconds:gv(oe,59)}}),g=Mr(I=>{i=!1,x(I)},200),y=I=>{if(!!!o.amPmMode)return"";const oe=o.amPmMode==="A";let ne=I<12?" am":" pm";return oe&&(ne=ne.toUpperCase()),ne},w=I=>{let U;switch(I){case"hours":U=[0,2];break;case"minutes":U=[3,5];break;case"seconds":U=[6,8];break}const[oe,ne]=U;t("select-range",oe,ne),c.value=I},x=I=>{L(I,s(m)[I])},$=()=>{x("hours"),x("minutes"),x("seconds")},T=I=>I.querySelector(`.${r.namespace.value}-scrollbar__wrap`),L=(I,U)=>{if(o.arrowControl)return;const oe=s(h[I]);oe&&oe.$el&&(T(oe.$el).scrollTop=Math.max(0,U*P(I)))},P=I=>{const U=s(h[I]),oe=U==null?void 0:U.$el.querySelector("li");return oe&&Number.parseFloat(Zn(oe,"height"))||0},R=()=>{B(1)},V=()=>{B(-1)},B=I=>{c.value||w("hours");const U=c.value,oe=s(m)[U],ne=c.value==="hours"?24:60,ce=F(U,oe,I,ne);Q(U,ce),L(U,ce),et(()=>w(U))},F=(I,U,oe,ne)=>{let ce=(U+oe+ne)%ne;const ee=s(f)[I];for(;ee[ce]&&ce!==U;)ce=(ce+oe+ne)%ne;return ce},Q=(I,U)=>{if(s(f)[I][U])return;const{hours:ce,minutes:ee,seconds:Me}=s(m);let de;switch(I){case"hours":de=o.spinnerDate.hour(U).minute(ee).second(Me);break;case"minutes":de=o.spinnerDate.hour(ce).minute(U).second(Me);break;case"seconds":de=o.spinnerDate.hour(ce).minute(ee).second(U);break}t("change",de)},J=(I,{value:U,disabled:oe})=>{oe||(Q(I,U),w(I),L(I,U))},Z=I=>{i=!0,g(I);const U=Math.min(Math.round((T(s(h[I]).$el).scrollTop-(H(I)*.5-10)/P(I)+3)/P(I)),I==="hours"?23:59);Q(I,U)},H=I=>s(h[I]).$el.offsetHeight,j=()=>{const I=U=>{const oe=s(h[U]);oe&&oe.$el&&(T(oe.$el).onscroll=()=>{Z(U)})};I("hours"),I("minutes"),I("seconds")};ft(()=>{et(()=>{!o.arrowControl&&j(),$(),o.role==="start"&&w("hours")})});const K=(I,U)=>{h[U].value=I};return t("set-option",[`${o.role}_scrollDown`,B]),t("set-option",[`${o.role}_emitSelectRange`,w]),Se(()=>o.spinnerDate,()=>{i||$()}),(I,U)=>(b(),M("div",{class:O([s(r).b("spinner"),{"has-seconds":I.showSeconds}])},[I.arrowControl?se("v-if",!0):(b(!0),M(Qe,{key:0},It(s(v),oe=>(b(),he(s(wn),{key:oe,ref_for:!0,ref:ne=>K(ne,oe),class:O(s(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":s(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ne=>w(oe),onMousemove:ne=>x(oe)},{default:le(()=>[(b(!0),M(Qe,null,It(s(f)[oe],(ne,ce)=>(b(),M("li",{key:ce,class:O([s(r).be("spinner","item"),s(r).is("active",ce===s(m)[oe]),s(r).is("disabled",ne)]),onClick:ee=>J(oe,{value:ce,disabled:ne})},[oe==="hours"?(b(),M(Qe,{key:0},[Ct($e(("0"+(I.amPmMode?ce%12||12:ce)).slice(-2))+$e(y(ce)),1)],64)):(b(),M(Qe,{key:1},[Ct($e(("0"+ce).slice(-2)),1)],64))],10,nY))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),I.arrowControl?(b(!0),M(Qe,{key:1},It(s(v),oe=>(b(),M("div",{key:oe,class:O([s(r).be("spinner","wrapper"),s(r).is("arrow")]),onMouseenter:ne=>w(oe)},[mt((b(),he(s(Ze),{class:O(["arrow-up",s(r).be("spinner","arrow")])},{default:le(()=>[te(s(Md))]),_:1},8,["class"])),[[s(np),V]]),mt((b(),he(s(Ze),{class:O(["arrow-down",s(r).be("spinner","arrow")])},{default:le(()=>[te(s(Pl))]),_:1},8,["class"])),[[s(np),R]]),E("ul",{class:O(s(r).be("spinner","list"))},[(b(!0),M(Qe,null,It(s(_)[oe],(ne,ce)=>(b(),M("li",{key:ce,class:O([s(r).be("spinner","item"),s(r).is("active",ne===s(m)[oe]),s(r).is("disabled",s(f)[oe][ne])])},[typeof ne=="number"?(b(),M(Qe,{key:0},[oe==="hours"?(b(),M(Qe,{key:0},[Ct($e(("0"+(I.amPmMode?ne%12||12:ne)).slice(-2))+$e(y(ne)),1)],64)):(b(),M(Qe,{key:1},[Ct($e(("0"+ne).slice(-2)),1)],64))],64)):se("v-if",!0)],2))),128))],2)],42,aY))),128)):se("v-if",!0)],2))}}),[["__file","basic-time-spinner.vue"]]),up=Le(N({__name:"panel-time-pick",props:qq,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const o=e,r=Ge("EP_PICKER_BASE"),{arrowControl:l,disabledHours:n,disabledMinutes:a,disabledSeconds:i,defaultValue:c}=r.props,{getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:p}=cw(n,a,i),h=ze("time"),{t:v,lang:m}=Rt(),f=D([0,2]),_=uw(o),g=C(()=>ko(o.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),y=C(()=>o.format.includes("ss")),w=C(()=>o.format.includes("A")?"A":o.format.includes("a")?"a":""),x=K=>{const I=kt(K).locale(m.value),U=J(I);return I.isSame(U)},$=()=>{t("pick",_.value,!1)},T=(K=!1,I=!1)=>{I||t("pick",o.parsedValue,K)},L=K=>{if(!o.visible)return;const I=J(K).millisecond(0);t("pick",I,!0)},P=(K,I)=>{t("select-range",K,I),f.value=[K,I]},R=K=>{const I=[0,3].concat(y.value?[6]:[]),U=["hours","minutes"].concat(y.value?["seconds"]:[]),ne=(I.indexOf(f.value[0])+K+I.length)%I.length;B.start_emitSelectRange(U[ne])},V=K=>{const I=K.code,{left:U,right:oe,up:ne,down:ce}=lt;if([U,oe].includes(I)){R(I===U?-1:1),K.preventDefault();return}if([ne,ce].includes(I)){const ee=I===ne?-1:1;B.start_scrollDown(ee),K.preventDefault();return}},{timePickerOptions:B,onSetOption:F,getAvailableTime:Q}=iw({getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:p}),J=K=>Q(K,o.datetimeRole||"",!0),Z=K=>K?kt(K,o.format).locale(m.value):null,H=K=>K?K.format(o.format):null,j=()=>kt(c).locale(m.value);return t("set-picker-option",["isValidValue",x]),t("set-picker-option",["formatToString",H]),t("set-picker-option",["parseUserInput",Z]),t("set-picker-option",["handleKeydownInput",V]),t("set-picker-option",["getRangeAvailableTime",J]),t("set-picker-option",["getDefaultValue",j]),(K,I)=>(b(),he(Mo,{name:s(g)},{default:le(()=>[K.actualVisible||K.visible?(b(),M("div",{key:0,class:O(s(h).b("panel"))},[E("div",{class:O([s(h).be("panel","content"),{"has-seconds":s(y)}])},[te(Av,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":s(l),"show-seconds":s(y),"am-pm-mode":s(w),"spinner-date":K.parsedValue,"disabled-hours":s(n),"disabled-minutes":s(a),"disabled-seconds":s(i),onChange:L,onSetOption:s(F),onSelectRange:P},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),E("div",{class:O(s(h).be("panel","footer"))},[E("button",{type:"button",class:O([s(h).be("panel","btn"),"cancel"]),onClick:$},$e(s(v)("el.datepicker.cancel")),3),E("button",{type:"button",class:O([s(h).be("panel","btn"),"confirm"]),onClick:I[0]||(I[0]=U=>T())},$e(s(v)("el.datepicker.confirm")),3)],2)],2)):se("v-if",!0)]),_:1},8,["name"]))}}),[["__file","panel-time-pick.vue"]]);const iY=Pe({...nw,parsedValue:{type:ue(Array)}}),sY=["disabled"];var cY=Le(N({__name:"panel-time-range",props:iY,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const o=e,r=(Ee,De)=>{const ae=[];for(let pe=Ee;pe<=De;pe++)ae.push(pe);return ae},{t:l,lang:n}=Rt(),a=ze("time"),i=ze("picker"),c=Ge("EP_PICKER_BASE"),{arrowControl:d,disabledHours:u,disabledMinutes:p,disabledSeconds:h,defaultValue:v}=c.props,m=C(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",d),x.value?"has-seconds":""]),f=C(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",d),x.value?"has-seconds":""]),_=C(()=>o.parsedValue[0]),g=C(()=>o.parsedValue[1]),y=uw(o),w=()=>{t("pick",y.value,!1)},x=C(()=>o.format.includes("ss")),$=C(()=>o.format.includes("A")?"A":o.format.includes("a")?"a":""),T=(Ee=!1)=>{t("pick",[_.value,g.value],Ee)},L=Ee=>{V(Ee.millisecond(0),g.value)},P=Ee=>{V(_.value,Ee.millisecond(0))},R=Ee=>{const De=Ee.map(pe=>kt(pe).locale(n.value)),ae=oe(De);return De[0].isSame(ae[0])&&De[1].isSame(ae[1])},V=(Ee,De)=>{t("pick",[Ee,De],!0)},B=C(()=>_.value>g.value),F=D([0,2]),Q=(Ee,De)=>{t("select-range",Ee,De,"min"),F.value=[Ee,De]},J=C(()=>x.value?11:8),Z=(Ee,De)=>{t("select-range",Ee,De,"max");const ae=s(J);F.value=[Ee+ae,De+ae]},H=Ee=>{const De=x.value?[0,3,6,11,14,17]:[0,3,8,11],ae=["hours","minutes"].concat(x.value?["seconds"]:[]),ke=(De.indexOf(F.value[0])+Ee+De.length)%De.length,Oe=De.length/2;ke{const De=Ee.code,{left:ae,right:pe,up:ke,down:Oe}=lt;if([ae,pe].includes(De)){H(De===ae?-1:1),Ee.preventDefault();return}if([ke,Oe].includes(De)){const we=De===ke?-1:1,Te=F.value[0]{const ae=u?u(Ee):[],pe=Ee==="start",Oe=(De||(pe?g.value:_.value)).hour(),we=pe?r(Oe+1,23):r(0,Oe-1);return ih(ae,we)},I=(Ee,De,ae)=>{const pe=p?p(Ee,De):[],ke=De==="start",Oe=ae||(ke?g.value:_.value),we=Oe.hour();if(Ee!==we)return pe;const Te=Oe.minute(),Ne=ke?r(Te+1,59):r(0,Te-1);return ih(pe,Ne)},U=(Ee,De,ae,pe)=>{const ke=h?h(Ee,De,ae):[],Oe=ae==="start",we=pe||(Oe?g.value:_.value),Te=we.hour(),Ne=we.minute();if(Ee!==Te||De!==Ne)return ke;const Ie=we.second(),Ae=Oe?r(Ie+1,59):r(0,Ie-1);return ih(ke,Ae)},oe=([Ee,De])=>[de(Ee,"start",!0,De),de(De,"end",!1,Ee)],{getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:ee}=cw(K,I,U),{timePickerOptions:Me,getAvailableTime:de,onSetOption:_e}=iw({getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:ee}),me=Ee=>Ee?Ke(Ee)?Ee.map(De=>kt(De,o.format).locale(n.value)):kt(Ee,o.format).locale(n.value):null,Re=Ee=>Ee?Ke(Ee)?Ee.map(De=>De.format(o.format)):Ee.format(o.format):null,Ce=()=>{if(Ke(v))return v.map(De=>kt(De).locale(n.value));const Ee=kt(v).locale(n.value);return[Ee,Ee.add(60,"m")]};return t("set-picker-option",["formatToString",Re]),t("set-picker-option",["parseUserInput",me]),t("set-picker-option",["isValidValue",R]),t("set-picker-option",["handleKeydownInput",j]),t("set-picker-option",["getDefaultValue",Ce]),t("set-picker-option",["getRangeAvailableTime",oe]),(Ee,De)=>Ee.actualVisible?(b(),M("div",{key:0,class:O([s(a).b("range-picker"),s(i).b("panel")])},[E("div",{class:O(s(a).be("range-picker","content"))},[E("div",{class:O(s(a).be("range-picker","cell"))},[E("div",{class:O(s(a).be("range-picker","header"))},$e(s(l)("el.datepicker.startTime")),3),E("div",{class:O(s(m))},[te(Av,{ref:"minSpinner",role:"start","show-seconds":s(x),"am-pm-mode":s($),"arrow-control":s(d),"spinner-date":s(_),"disabled-hours":K,"disabled-minutes":I,"disabled-seconds":U,onChange:L,onSetOption:s(_e),onSelectRange:Q},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),E("div",{class:O(s(a).be("range-picker","cell"))},[E("div",{class:O(s(a).be("range-picker","header"))},$e(s(l)("el.datepicker.endTime")),3),E("div",{class:O(s(f))},[te(Av,{ref:"maxSpinner",role:"end","show-seconds":s(x),"am-pm-mode":s($),"arrow-control":s(d),"spinner-date":s(g),"disabled-hours":K,"disabled-minutes":I,"disabled-seconds":U,onChange:P,onSetOption:s(_e),onSelectRange:Z},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),E("div",{class:O(s(a).be("panel","footer"))},[E("button",{type:"button",class:O([s(a).be("panel","btn"),"cancel"]),onClick:De[0]||(De[0]=ae=>w())},$e(s(l)("el.datepicker.cancel")),3),E("button",{type:"button",class:O([s(a).be("panel","btn"),"confirm"]),disabled:s(B),onClick:De[1]||(De[1]=ae=>T())},$e(s(l)("el.datepicker.confirm")),11,sY)],2)],2)):se("v-if",!0)}}),[["__file","panel-time-range.vue"]]);kt.extend(vv);var uY=N({name:"ElTimePicker",install:null,props:{..._v,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,t){const o=D(),[r,l]=e.isRange?["timerange",cY]:["time",up],n=a=>t.emit("update:modelValue",a);return zt("ElPopperOptions",e.popperOptions),t.expose({focus:a=>{var i;(i=o.value)==null||i.handleFocusInput(a)},blur:a=>{var i;(i=o.value)==null||i.handleBlurInput(a)},handleOpen:()=>{var a;(a=o.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=o.value)==null||a.handleClose()}}),()=>{var a;const i=(a=e.format)!=null?a:mv;return te(aw,Mt(e,{ref:o,type:r,format:i,"onUpdate:modelValue":n}),{default:c=>te(l,c,null)})}}});const dp=uY;dp.install=e=>{e.component(dp.name,dp)};const dY=dp,pY=(e,t)=>{const o=e.subtract(1,"month").endOf("month").date();return aa(t).map((r,l)=>o-(t-l-1))},fY=e=>{const t=e.daysInMonth();return aa(t).map((o,r)=>r+1)},hY=e=>aa(e.length/7).map(t=>{const o=t*7;return e.slice(o,o+7)}),vY=Pe({selectedDay:{type:ue(Object)},range:{type:ue(Array)},date:{type:ue(Object),required:!0},hideHeader:{type:Boolean}}),mY={pick:e=>xt(e)};var Sw={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r,l){var n=r.prototype,a=function(p){return p&&(p.indexOf?p:p.s)},i=function(p,h,v,m,f){var _=p.name?p:p.$locale(),g=a(_[h]),y=a(_[v]),w=g||y.map(function($){return $.slice(0,m)});if(!f)return w;var x=_.weekStart;return w.map(function($,T){return w[(T+(x||0))%7]})},c=function(){return l.Ls[l.locale()]},d=function(p,h){return p.formats[h]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,f,_){return f||_.slice(1)})}(p.formats[h.toUpperCase()])},u=function(){var p=this;return{months:function(h){return h?h.format("MMMM"):i(p,"months")},monthsShort:function(h){return h?h.format("MMM"):i(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(p,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(p,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return d(p.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};n.localeData=function(){return u.bind(this)()},l.localeData=function(){var p=c();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return d(p,h)},meridiem:p.meridiem,ordinal:p.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(p){return i(c(),"weekdays",null,null,p)},l.weekdaysShort=function(p){return i(c(),"weekdaysShort","weekdays",3,p)},l.weekdaysMin=function(p){return i(c(),"weekdaysMin","weekdays",2,p)}}})})(Sw);var gY=Sw.exports;const Ew=cl(gY),bY=(e,t)=>{kt.extend(Ew);const o=kt.localeData().firstDayOfWeek(),{t:r,lang:l}=Rt(),n=kt().locale(l.value),a=C(()=>!!e.range&&!!e.range.length),i=C(()=>{let h=[];if(a.value){const[v,m]=e.range,f=aa(m.date()-v.date()+1).map(y=>({text:v.date()+y,type:"current"}));let _=f.length%7;_=_===0?0:7-_;const g=aa(_).map((y,w)=>({text:w+1,type:"next"}));h=f.concat(g)}else{const v=e.date.startOf("month").day(),m=pY(e.date,(v-o+7)%7).map(y=>({text:y,type:"prev"})),f=fY(e.date).map(y=>({text:y,type:"current"}));h=[...m,...f];const _=7-(h.length%7||7),g=aa(_).map((y,w)=>({text:w+1,type:"next"}));h=h.concat(g)}return hY(h)}),c=C(()=>{const h=o;return h===0?_h.map(v=>r(`el.datepicker.weeks.${v}`)):_h.slice(h).concat(_h.slice(0,h)).map(v=>r(`el.datepicker.weeks.${v}`))}),d=(h,v)=>{switch(v){case"prev":return e.date.startOf("month").subtract(1,"month").date(h);case"next":return e.date.startOf("month").add(1,"month").date(h);case"current":return e.date.date(h)}};return{now:n,isInRange:a,rows:i,weekDays:c,getFormattedDate:d,handlePickDay:({text:h,type:v})=>{const m=d(h,v);t("pick",m)},getSlotData:({text:h,type:v})=>{const m=d(h,v);return{isSelected:m.isSame(e.selectedDay),type:`${v}-month`,day:m.format("YYYY-MM-DD"),date:m.toDate()}}}},_Y={key:0},wY=["onClick"],yY=N({...N({name:"DateTable"}),props:vY,emits:mY,setup(e,{expose:t,emit:o}){const r=e,{isInRange:l,now:n,rows:a,weekDays:i,getFormattedDate:c,handlePickDay:d,getSlotData:u}=bY(r,o),p=ze("calendar-table"),h=ze("calendar-day"),v=({text:m,type:f})=>{const _=[f];if(f==="current"){const g=c(m,f);g.isSame(r.selectedDay,"day")&&_.push(h.is("selected")),g.isSame(n,"day")&&_.push(h.is("today"))}return _};return t({getFormattedDate:c}),(m,f)=>(b(),M("table",{class:O([s(p).b(),s(p).is("range",s(l))]),cellspacing:"0",cellpadding:"0"},[m.hideHeader?se("v-if",!0):(b(),M("thead",_Y,[(b(!0),M(Qe,null,It(s(i),_=>(b(),M("th",{key:_},$e(_),1))),128))])),E("tbody",null,[(b(!0),M(Qe,null,It(s(a),(_,g)=>(b(),M("tr",{key:g,class:O({[s(p).e("row")]:!0,[s(p).em("row","hide-border")]:g===0&&m.hideHeader})},[(b(!0),M(Qe,null,It(_,(y,w)=>(b(),M("td",{key:w,class:O(v(y)),onClick:x=>s(d)(y)},[E("div",{class:O(s(h).b())},[be(m.$slots,"date-cell",{data:s(u)(y)},()=>[E("span",null,$e(y.text),1)])],2)],10,wY))),128))],2))),128))])],2))}});var Tw=Le(yY,[["__file","date-table.vue"]]);const xY=(e,t)=>{const o=e.endOf("month"),r=t.startOf("month"),n=o.isSame(r,"week")?r.add(1,"week"):r;return[[e,o],[n.startOf("week"),t]]},kY=(e,t)=>{const o=e.endOf("month"),r=e.add(1,"month").startOf("month"),l=o.isSame(r,"week")?r.add(1,"week"):r,n=l.endOf("month"),a=t.startOf("month"),i=n.isSame(a,"week")?a.add(1,"week"):a;return[[e,o],[l.startOf("week"),n],[i.startOf("week"),t]]},CY=(e,t,o)=>{const{lang:r}=Rt(),l=D(),n=kt().locale(r.value),a=C({get(){return e.modelValue?c.value:l.value},set(_){if(!_)return;l.value=_;const g=_.toDate();t(yr,g),t(St,g)}}),i=C(()=>{if(!e.range)return[];const _=e.range.map(w=>kt(w).locale(r.value)),[g,y]=_;return g.isAfter(y)?[]:g.isSame(y,"month")?v(g,y):g.add(1,"month").month()!==y.month()?[]:v(g,y)}),c=C(()=>e.modelValue?kt(e.modelValue).locale(r.value):a.value||(i.value.length?i.value[0][0]:n)),d=C(()=>c.value.subtract(1,"month").date(1)),u=C(()=>c.value.add(1,"month").date(1)),p=C(()=>c.value.subtract(1,"year").date(1)),h=C(()=>c.value.add(1,"year").date(1)),v=(_,g)=>{const y=_.startOf("week"),w=g.endOf("week"),x=y.get("month"),$=w.get("month");return x===$?[[y,w]]:(x+1)%12===$?xY(y,w):x+2===$||(x+1)%11===$?kY(y,w):[]},m=_=>{a.value=_};return{calculateValidatedDateRange:v,date:c,realSelectedDay:a,pickDay:m,selectDate:_=>{const y={"prev-month":d.value,"next-month":u.value,"prev-year":p.value,"next-year":h.value,today:n}[_];y.isSame(c.value,"day")||m(y)},validatedRange:i}},SY=e=>Ke(e)&&e.length===2&&e.every(t=>va(t)),EY=Pe({modelValue:{type:Date},range:{type:ue(Array),validator:SY}}),TY={[St]:e=>va(e),[yr]:e=>va(e)},$Y=N({...N({name:"ElCalendar"}),props:EY,emits:TY,setup(e,{expose:t,emit:o}){const r=e,l=ze("calendar"),{calculateValidatedDateRange:n,date:a,pickDay:i,realSelectedDay:c,selectDate:d,validatedRange:u}=CY(r,o),{t:p}=Rt(),h=C(()=>{const v=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${p("el.datepicker.year")} ${p(v)}`});return t({selectedDay:c,pickDay:i,selectDate:d,calculateValidatedDateRange:n}),(v,m)=>(b(),M("div",{class:O(s(l).b())},[E("div",{class:O(s(l).e("header"))},[be(v.$slots,"header",{date:s(h)},()=>[E("div",{class:O(s(l).e("title"))},$e(s(h)),3),s(u).length===0?(b(),M("div",{key:0,class:O(s(l).e("button-group"))},[te(s(Y4),null,{default:le(()=>[te(s(Wo),{size:"small",onClick:m[0]||(m[0]=f=>s(d)("prev-month"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.prevMonth")),1)]),_:1}),te(s(Wo),{size:"small",onClick:m[1]||(m[1]=f=>s(d)("today"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.today")),1)]),_:1}),te(s(Wo),{size:"small",onClick:m[2]||(m[2]=f=>s(d)("next-month"))},{default:le(()=>[Ct($e(s(p)("el.datepicker.nextMonth")),1)]),_:1})]),_:1})],2)):se("v-if",!0)])],2),s(u).length===0?(b(),M("div",{key:0,class:O(s(l).e("body"))},[te(Tw,{date:s(a),"selected-day":s(c),onPick:s(i)},ln({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:le(f=>[be(v.$slots,"date-cell",Zl(mi(f)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(b(),M("div",{key:1,class:O(s(l).e("body"))},[(b(!0),M(Qe,null,It(s(u),(f,_)=>(b(),he(Tw,{key:_,date:f[0],"selected-day":s(c),range:f,"hide-header":_!==0,onPick:s(i)},ln({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:le(g=>[be(v.$slots,"date-cell",Zl(mi(g)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var MY=Le($Y,[["__file","calendar.vue"]]);const AY=yt(MY),zY=Pe({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:ue([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),IY=N({...N({name:"ElCard"}),props:zY,setup(e){const t=ze("card");return(o,r)=>(b(),M("div",{class:O([s(t).b(),s(t).is(`${o.shadow}-shadow`)])},[o.$slots.header||o.header?(b(),M("div",{key:0,class:O(s(t).e("header"))},[be(o.$slots,"header",{},()=>[Ct($e(o.header),1)])],2)):se("v-if",!0),E("div",{class:O([s(t).e("body"),o.bodyClass]),style:Je(o.bodyStyle)},[be(o.$slots,"default")],6),o.$slots.footer||o.footer?(b(),M("div",{key:1,class:O(s(t).e("footer"))},[be(o.$slots,"footer",{},()=>[Ct($e(o.footer),1)])],2)):se("v-if",!0)],2))}});var OY=Le(IY,[["__file","card.vue"]]);const NY=yt(OY),PY=Pe({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:{type:Boolean,default:!1}}),RY={change:(e,t)=>[e,t].every(st)},$w=Symbol("carouselContextKey"),Mw=300,LY=(e,t,o)=>{const{children:r,addChild:l,removeChild:n}=Uh(wt(),"ElCarouselItem"),a=Do(),i=D(-1),c=D(null),d=D(!1),u=D(),p=D(0),h=D(!0),v=D(!0),m=D(!1),f=C(()=>e.arrow!=="never"&&!s(y)),_=C(()=>r.value.some(de=>de.props.label.toString().length>0)),g=C(()=>e.type==="card"),y=C(()=>e.direction==="vertical"),w=C(()=>e.height!=="auto"?{height:e.height}:{height:`${p.value}px`,overflow:"hidden"}),x=Oa(de=>{V(de)},Mw,{trailing:!0}),$=Oa(de=>{I(de)},Mw),T=de=>h.value?i.value<=1?de<=1:de>1:!0;function L(){c.value&&(clearInterval(c.value),c.value=null)}function P(){e.interval<=0||!e.autoplay||c.value||(c.value=setInterval(()=>R(),e.interval))}const R=()=>{v.value||(m.value=!0),v.value=!1,i.valueCe.props.name===de);Re.length>0&&(de=r.value.indexOf(Re[0]))}if(de=Number(de),Number.isNaN(de)||de!==Math.floor(de))return;const _e=r.value.length,me=i.value;de<0?i.value=e.loop?_e-1:0:de>=_e?i.value=e.loop?0:_e-1:i.value=de,me===i.value&&B(me),ne()}function B(de){r.value.forEach((_e,me)=>{_e.translateItem(me,i.value,de)})}function F(de,_e){var me,Re,Ce,Ee;const De=s(r),ae=De.length;if(ae===0||!de.states.inStage)return!1;const pe=_e+1,ke=_e-1,Oe=ae-1,we=De[Oe].states.active,Te=De[0].states.active,Ne=(Re=(me=De[pe])==null?void 0:me.states)==null?void 0:Re.active,Ie=(Ee=(Ce=De[ke])==null?void 0:Ce.states)==null?void 0:Ee.active;return _e===Oe&&Te||Ne?"left":_e===0&&we||Ie?"right":!1}function Q(){d.value=!0,e.pauseOnHover&&L()}function J(){d.value=!1,P()}function Z(){m.value=!1}function H(de){s(y)||r.value.forEach((_e,me)=>{de===F(_e,me)&&(_e.states.hover=!0)})}function j(){s(y)||r.value.forEach(de=>{de.states.hover=!1})}function K(de){de!==i.value&&(v.value||(m.value=!0)),i.value=de}function I(de){e.trigger==="hover"&&de!==i.value&&(i.value=de,v.value||(m.value=!0))}function U(){V(i.value-1)}function oe(){V(i.value+1)}function ne(){L(),e.pauseOnHover||P()}function ce(de){e.height==="auto"&&(p.value=de)}function ee(){var de;const _e=(de=a.default)==null?void 0:de.call(a);if(!_e)return null;const me=Qn(_e),Re="ElCarouselItem",Ce=me.filter(Ee=>io(Ee)&&Ee.type.name===Re);return(Ce==null?void 0:Ce.length)===2&&e.loop&&!g.value?(h.value=!0,Ce):(h.value=!1,null)}Se(()=>i.value,(de,_e)=>{B(_e),h.value&&(de=de%2,_e=_e%2),_e>-1&&t("change",de,_e)}),Se(()=>e.autoplay,de=>{de?P():L()}),Se(()=>e.loop,()=>{V(i.value)}),Se(()=>e.interval,()=>{ne()});const Me=lo();return ft(()=>{Se(()=>r.value,()=>{r.value.length>0&&V(e.initialIndex)},{immediate:!0}),Me.value=so(u.value,()=>{B()}),P()}),to(()=>{L(),u.value&&Me.value&&Me.value.stop()}),zt($w,{root:u,isCardType:g,isVertical:y,items:r,loop:e.loop,addItem:l,removeItem:n,setActiveItem:V,setContainerHeight:ce}),{root:u,activeIndex:i,arrowDisplay:f,hasLabel:_,hover:d,isCardType:g,isTransitioning:m,items:r,isVertical:y,containerStyle:w,isItemsTwoLength:h,handleButtonEnter:H,handleTransitionEnd:Z,handleButtonLeave:j,handleIndicatorClick:K,handleMouseEnter:Q,handleMouseLeave:J,setActiveItem:V,prev:U,next:oe,PlaceholderItem:ee,isTwoLengthShow:T,throttledArrowClick:x,throttledIndicatorHover:$}},BY=["aria-label"],VY=["aria-label"],DY=["onMouseenter","onClick"],HY=["aria-label"],FY={key:0},jY={key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},KY=[E("defs",null,[E("filter",{id:"elCarouselHorizontal"},[E("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),E("filter",{id:"elCarouselVertical"},[E("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])],-1)],UY=N({...N({name:"ElCarousel"}),props:PY,emits:RY,setup(e,{expose:t,emit:o}){const r=e,{root:l,activeIndex:n,arrowDisplay:a,hasLabel:i,hover:c,isCardType:d,items:u,isVertical:p,containerStyle:h,handleButtonEnter:v,handleButtonLeave:m,isTransitioning:f,handleIndicatorClick:_,handleMouseEnter:g,handleMouseLeave:y,handleTransitionEnd:w,setActiveItem:x,prev:$,next:T,PlaceholderItem:L,isTwoLengthShow:P,throttledArrowClick:R,throttledIndicatorHover:V}=LY(r,o),B=ze("carousel"),{t:F}=Rt(),Q=C(()=>{const H=[B.b(),B.m(r.direction)];return s(d)&&H.push(B.m("card")),H}),J=C(()=>{const H=[B.e("container")];return r.motionBlur&&s(f)&&H.push(s(p)?`${B.namespace.value}-transitioning-vertical`:`${B.namespace.value}-transitioning`),H}),Z=C(()=>{const H=[B.e("indicators"),B.em("indicators",r.direction)];return s(i)&&H.push(B.em("indicators","labels")),r.indicatorPosition==="outside"&&H.push(B.em("indicators","outside")),s(p)&&H.push(B.em("indicators","right")),H});return t({setActiveItem:x,prev:$,next:T}),(H,j)=>(b(),M("div",{ref_key:"root",ref:l,class:O(s(Q)),onMouseenter:j[7]||(j[7]=ct((...K)=>s(g)&&s(g)(...K),["stop"])),onMouseleave:j[8]||(j[8]=ct((...K)=>s(y)&&s(y)(...K),["stop"]))},[s(a)?(b(),he(Mo,{key:0,name:"carousel-arrow-left",persisted:""},{default:le(()=>[mt(E("button",{type:"button",class:O([s(B).e("arrow"),s(B).em("arrow","left")]),"aria-label":s(F)("el.carousel.leftArrow"),onMouseenter:j[0]||(j[0]=K=>s(v)("left")),onMouseleave:j[1]||(j[1]=(...K)=>s(m)&&s(m)(...K)),onClick:j[2]||(j[2]=ct(K=>s(R)(s(n)-1),["stop"]))},[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1})],42,BY),[[Lt,(H.arrow==="always"||s(c))&&(r.loop||s(n)>0)]])]),_:1})):se("v-if",!0),s(a)?(b(),he(Mo,{key:1,name:"carousel-arrow-right",persisted:""},{default:le(()=>[mt(E("button",{type:"button",class:O([s(B).e("arrow"),s(B).em("arrow","right")]),"aria-label":s(F)("el.carousel.rightArrow"),onMouseenter:j[3]||(j[3]=K=>s(v)("right")),onMouseleave:j[4]||(j[4]=(...K)=>s(m)&&s(m)(...K)),onClick:j[5]||(j[5]=ct(K=>s(R)(s(n)+1),["stop"]))},[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})],42,VY),[[Lt,(H.arrow==="always"||s(c))&&(r.loop||s(n)s(w)&&s(w)(...K))},[te(s(L)),be(H.$slots,"default")],38),H.indicatorPosition!=="none"?(b(),M("ul",{key:2,class:O(s(Z))},[(b(!0),M(Qe,null,It(s(u),(K,I)=>mt((b(),M("li",{key:I,class:O([s(B).e("indicator"),s(B).em("indicator",H.direction),s(B).is("active",I===s(n))]),onMouseenter:U=>s(V)(I),onClick:ct(U=>s(_)(I),["stop"])},[E("button",{class:O(s(B).e("button")),"aria-label":s(F)("el.carousel.indicator",{index:I+1})},[s(i)?(b(),M("span",FY,$e(K.props.label),1)):se("v-if",!0)],10,HY)],42,DY)),[[Lt,s(P)(I)]])),128))],2)):se("v-if",!0),r.motionBlur?(b(),M("svg",jY,KY)):se("v-if",!0)],34))}});var WY=Le(UY,[["__file","carousel.vue"]]);const qY=Pe({name:{type:String,default:""},label:{type:[String,Number],default:""}}),YY=(e,t)=>{const o=Ge($w),r=wt(),l=.83,n=D(),a=D(!1),i=D(0),c=D(1),d=D(!1),u=D(!1),p=D(!1),h=D(!1),{isCardType:v,isVertical:m}=o;function f(x,$,T){const L=T-1,P=$-1,R=$+1,V=T/2;return $===0&&x===L?-1:$===L&&x===0?T:x=V?T+1:x>R&&x-$>=V?-2:x}function _(x,$){var T,L;const P=s(m)?((T=o.root.value)==null?void 0:T.offsetHeight)||0:((L=o.root.value)==null?void 0:L.offsetWidth)||0;return p.value?P*((2-l)*(x-$)+1)/4:x<$?-(1+l)*P/4:(3+l)*P/4}function g(x,$,T){const L=o.root.value;return L?((T?L.offsetHeight:L.offsetWidth)||0)*(x-$):0}const y=(x,$,T)=>{var L;const P=s(v),R=(L=o.items.value.length)!=null?L:Number.NaN,V=x===$;!P&&!ko(T)&&(h.value=V||x===T),!V&&R>2&&o.loop&&(x=f(x,$,R));const B=s(m);d.value=V,P?(p.value=Math.round(Math.abs(x-$))<=1,i.value=_(x,$),c.value=s(d)?1:l):i.value=g(x,$,B),u.value=!0,V&&n.value&&o.setContainerHeight(n.value.offsetHeight)};function w(){if(o&&s(v)){const x=o.items.value.findIndex(({uid:$})=>$===r.uid);o.setActiveItem(x)}}return ft(()=>{o.addItem({props:e,states:Dt({hover:a,translate:i,scale:c,active:d,ready:u,inStage:p,animating:h}),uid:r.uid,translateItem:y})}),Rn(()=>{o.removeItem(r.uid)}),{carouselItemRef:n,active:d,animating:h,hover:a,inStage:p,isVertical:m,translate:i,isCardType:v,scale:c,ready:u,handleItemClick:w}},GY=N({...N({name:"ElCarouselItem"}),props:qY,setup(e){const t=e,o=ze("carousel"),{carouselItemRef:r,active:l,animating:n,hover:a,inStage:i,isVertical:c,translate:d,isCardType:u,scale:p,ready:h,handleItemClick:v}=YY(t),m=C(()=>[o.e("item"),o.is("active",l.value),o.is("in-stage",i.value),o.is("hover",a.value),o.is("animating",n.value),{[o.em("item","card")]:u.value,[o.em("item","card-vertical")]:u.value&&c.value}]),f=C(()=>{const g=`${`translate${s(c)?"Y":"X"}`}(${s(d)}px)`,y=`scale(${s(p)})`;return{transform:[g,y].join(" ")}});return(_,g)=>mt((b(),M("div",{ref_key:"carouselItemRef",ref:r,class:O(s(m)),style:Je(s(f)),onClick:g[0]||(g[0]=(...y)=>s(v)&&s(v)(...y))},[s(u)?mt((b(),M("div",{key:0,class:O(s(o).e("mask"))},null,2)),[[Lt,!s(l)]]):se("v-if",!0),be(_.$slots,"default")],6)),[[Lt,s(h)]])}});var Aw=Le(GY,[["__file","carousel-item.vue"]]);const XY=yt(WY,{CarouselItem:Aw}),ZY=co(Aw),zw={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Oo,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Zo(["ariaControls"])},Iw={[St]:e=>ut(e)||st(e)||Co(e),change:e=>ut(e)||st(e)||Co(e)},os=Symbol("checkboxGroupContextKey"),JY=({model:e,isChecked:t})=>{const o=Ge(os,void 0),r=C(()=>{var n,a;const i=(n=o==null?void 0:o.max)==null?void 0:n.value,c=(a=o==null?void 0:o.min)==null?void 0:a.value;return!ko(i)&&e.value.length>=i&&!t.value||!ko(c)&&e.value.length<=c&&t.value});return{isDisabled:xr(C(()=>(o==null?void 0:o.disabled.value)||r.value)),isLimitDisabled:r}},QY=(e,{model:t,isLimitExceeded:o,hasOwnLabel:r,isDisabled:l,isLabeledByFormItem:n})=>{const a=Ge(os,void 0),{formItem:i}=sr(),{emit:c}=wt();function d(m){var f,_,g,y;return[!0,e.trueValue,e.trueLabel].includes(m)?(_=(f=e.trueValue)!=null?f:e.trueLabel)!=null?_:!0:(y=(g=e.falseValue)!=null?g:e.falseLabel)!=null?y:!1}function u(m,f){c("change",d(m),f)}function p(m){if(o.value)return;const f=m.target;c("change",d(f.checked),m)}async function h(m){o.value||!r.value&&!l.value&&n.value&&(m.composedPath().some(g=>g.tagName==="LABEL")||(t.value=d([!1,e.falseValue,e.falseLabel].includes(t.value)),await et(),u(t.value,m)))}const v=C(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return Se(()=>e.modelValue,()=>{v.value&&(i==null||i.validate("change").catch(m=>void 0))}),{handleChange:p,onClickRoot:h}},eG=e=>{const t=D(!1),{emit:o}=wt(),r=Ge(os,void 0),l=C(()=>ko(r)===!1),n=D(!1),a=C({get(){var i,c;return l.value?(i=r==null?void 0:r.modelValue)==null?void 0:i.value:(c=e.modelValue)!=null?c:t.value},set(i){var c,d;l.value&&Ke(i)?(n.value=((c=r==null?void 0:r.max)==null?void 0:c.value)!==void 0&&i.length>(r==null?void 0:r.max.value)&&i.length>a.value.length,n.value===!1&&((d=r==null?void 0:r.changeEvent)==null||d.call(r,i))):(o(St,i),t.value=i)}});return{model:a,isGroup:l,isLimitExceeded:n}},tG=(e,t,{model:o})=>{const r=Ge(os,void 0),l=D(!1),n=C(()=>Na(e.value)?e.label:e.value),a=C(()=>{const u=o.value;return Co(u)?u:Ke(u)?xt(n.value)?u.map(Kt).some(p=>nr(p,n.value)):u.map(Kt).includes(n.value):u!=null?u===e.trueValue||u===e.trueLabel:!!u}),i=So(C(()=>{var u;return(u=r==null?void 0:r.size)==null?void 0:u.value}),{prop:!0}),c=So(C(()=>{var u;return(u=r==null?void 0:r.size)==null?void 0:u.value})),d=C(()=>!!t.default||!Na(n.value));return{checkboxButtonSize:i,isChecked:a,isFocused:l,checkboxSize:c,hasOwnLabel:d,actualValue:n}},Ow=(e,t)=>{const{formItem:o}=sr(),{model:r,isGroup:l,isLimitExceeded:n}=eG(e),{isFocused:a,isChecked:i,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:u,actualValue:p}=tG(e,t,{model:r}),{isDisabled:h}=JY({model:r,isChecked:i}),{inputId:v,isLabeledByFormItem:m}=bl(e,{formItemContext:o,disableIdGeneration:u,disableIdManagement:l}),{handleChange:f,onClickRoot:_}=QY(e,{model:r,isLimitExceeded:n,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:m});return(()=>{function y(){var w,x;Ke(r.value)&&!r.value.includes(p.value)?r.value.push(p.value):r.value=(x=(w=e.trueValue)!=null?w:e.trueLabel)!=null?x:!0}e.checked&&y()})(),Lo({from:"controls",replacement:"aria-controls",version:"2.8.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.controls)),Lo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>l.value&&Na(e.value))),Lo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.trueLabel)),Lo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!e.falseLabel)),{inputId:v,isLabeledByFormItem:m,isChecked:i,isDisabled:h,isFocused:a,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:u,model:r,actualValue:p,handleChange:f,onClickRoot:_}},oG=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],rG=["id","indeterminate","disabled","value","name","tabindex"],lG=N({...N({name:"ElCheckbox"}),props:zw,emits:Iw,setup(e){const t=e,o=Do(),{inputId:r,isLabeledByFormItem:l,isChecked:n,isDisabled:a,isFocused:i,checkboxSize:c,hasOwnLabel:d,model:u,actualValue:p,handleChange:h,onClickRoot:v}=Ow(t,o),m=ze("checkbox"),f=C(()=>[m.b(),m.m(c.value),m.is("disabled",a.value),m.is("bordered",t.border),m.is("checked",n.value)]),_=C(()=>[m.e("input"),m.is("disabled",a.value),m.is("checked",n.value),m.is("indeterminate",t.indeterminate),m.is("focus",i.value)]);return(g,y)=>(b(),he(Et(!s(d)&&s(l)?"span":"label"),{class:O(s(f)),"aria-controls":g.indeterminate?g.controls||g.ariaControls:null,onClick:s(v)},{default:le(()=>{var w,x;return[E("span",{class:O(s(_))},[g.trueValue||g.falseValue||g.trueLabel||g.falseLabel?mt((b(),M("input",{key:0,id:s(r),"onUpdate:modelValue":y[0]||(y[0]=$=>Zt(u)?u.value=$:null),class:O(s(m).e("original")),type:"checkbox",indeterminate:g.indeterminate,name:g.name,tabindex:g.tabindex,disabled:s(a),"true-value":(w=g.trueValue)!=null?w:g.trueLabel,"false-value":(x=g.falseValue)!=null?x:g.falseLabel,onChange:y[1]||(y[1]=(...$)=>s(h)&&s(h)(...$)),onFocus:y[2]||(y[2]=$=>i.value=!0),onBlur:y[3]||(y[3]=$=>i.value=!1),onClick:y[4]||(y[4]=ct(()=>{},["stop"]))},null,42,oG)),[[Yu,s(u)]]):mt((b(),M("input",{key:1,id:s(r),"onUpdate:modelValue":y[5]||(y[5]=$=>Zt(u)?u.value=$:null),class:O(s(m).e("original")),type:"checkbox",indeterminate:g.indeterminate,disabled:s(a),value:s(p),name:g.name,tabindex:g.tabindex,onChange:y[6]||(y[6]=(...$)=>s(h)&&s(h)(...$)),onFocus:y[7]||(y[7]=$=>i.value=!0),onBlur:y[8]||(y[8]=$=>i.value=!1),onClick:y[9]||(y[9]=ct(()=>{},["stop"]))},null,42,rG)),[[Yu,s(u)]]),E("span",{class:O(s(m).e("inner"))},null,2)],2),s(d)?(b(),M("span",{key:0,class:O(s(m).e("label"))},[be(g.$slots,"default"),g.$slots.default?se("v-if",!0):(b(),M(Qe,{key:0},[Ct($e(g.label),1)],64))],2)):se("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var nG=Le(lG,[["__file","checkbox.vue"]]);const aG=["name","tabindex","disabled","true-value","false-value"],iG=["name","tabindex","disabled","value"],sG=N({...N({name:"ElCheckboxButton"}),props:zw,emits:Iw,setup(e){const t=e,o=Do(),{isFocused:r,isChecked:l,isDisabled:n,checkboxButtonSize:a,model:i,actualValue:c,handleChange:d}=Ow(t,o),u=Ge(os,void 0),p=ze("checkbox"),h=C(()=>{var m,f,_,g;const y=(f=(m=u==null?void 0:u.fill)==null?void 0:m.value)!=null?f:"";return{backgroundColor:y,borderColor:y,color:(g=(_=u==null?void 0:u.textColor)==null?void 0:_.value)!=null?g:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),v=C(()=>[p.b("button"),p.bm("button",a.value),p.is("disabled",n.value),p.is("checked",l.value),p.is("focus",r.value)]);return(m,f)=>{var _,g;return b(),M("label",{class:O(s(v))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?mt((b(),M("input",{key:0,"onUpdate:modelValue":f[0]||(f[0]=y=>Zt(i)?i.value=y:null),class:O(s(p).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:s(n),"true-value":(_=m.trueValue)!=null?_:m.trueLabel,"false-value":(g=m.falseValue)!=null?g:m.falseLabel,onChange:f[1]||(f[1]=(...y)=>s(d)&&s(d)(...y)),onFocus:f[2]||(f[2]=y=>r.value=!0),onBlur:f[3]||(f[3]=y=>r.value=!1),onClick:f[4]||(f[4]=ct(()=>{},["stop"]))},null,42,aG)),[[Yu,s(i)]]):mt((b(),M("input",{key:1,"onUpdate:modelValue":f[5]||(f[5]=y=>Zt(i)?i.value=y:null),class:O(s(p).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:s(n),value:s(c),onChange:f[6]||(f[6]=(...y)=>s(d)&&s(d)(...y)),onFocus:f[7]||(f[7]=y=>r.value=!0),onBlur:f[8]||(f[8]=y=>r.value=!1),onClick:f[9]||(f[9]=ct(()=>{},["stop"]))},null,42,iG)),[[Yu,s(i)]]),m.$slots.default||m.label?(b(),M("span",{key:2,class:O(s(p).be("button","inner")),style:Je(s(l)?s(h):void 0)},[be(m.$slots,"default",{},()=>[Ct($e(m.label),1)])],6)):se("v-if",!0)],2)}}});var Nw=Le(sG,[["__file","checkbox-button.vue"]]);const cG=Pe({modelValue:{type:ue(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Oo,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),uG={[St]:e=>Ke(e),change:e=>Ke(e)},dG=N({...N({name:"ElCheckboxGroup"}),props:cG,emits:uG,setup(e,{emit:t}){const o=e,r=ze("checkbox"),{formItem:l}=sr(),{inputId:n,isLabeledByFormItem:a}=bl(o,{formItemContext:l}),i=async d=>{t(St,d),await et(),t("change",d)},c=C({get(){return o.modelValue},set(d){i(d)}});return zt(os,{...Ol(Bo(o),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:i}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-checkbox-group",ref:"https://element-plus.org/en-US/component/checkbox.html"},C(()=>!!o.label)),Se(()=>o.modelValue,()=>{o.validateEvent&&(l==null||l.validate("change").catch(d=>void 0))}),(d,u)=>{var p;return b(),he(Et(d.tag),{id:s(n),class:O(s(r).b("group")),role:"group","aria-label":s(a)?void 0:d.label||d.ariaLabel||"checkbox-group","aria-labelledby":s(a)?(p=s(l))==null?void 0:p.labelId:void 0},{default:le(()=>[be(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Pw=Le(dG,[["__file","checkbox-group.vue"]]);const rl=yt(nG,{CheckboxButton:Nw,CheckboxGroup:Pw}),pG=co(Nw),Rw=co(Pw),Lw=Pe({modelValue:{type:[String,Number,Boolean],default:void 0},size:Oo,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),fG=Pe({...Lw,border:Boolean}),Bw={[St]:e=>ut(e)||st(e)||Co(e),[ro]:e=>ut(e)||st(e)||Co(e)},Vw=Symbol("radioGroupKey"),Dw=(e,t)=>{const o=D(),r=Ge(Vw,void 0),l=C(()=>!!r),n=C(()=>Na(e.value)?e.label:e.value),a=C({get(){return l.value?r.modelValue:e.modelValue},set(p){l.value?r.changeEvent(p):t&&t(St,p),o.value.checked=e.modelValue===n.value}}),i=So(C(()=>r==null?void 0:r.size)),c=xr(C(()=>r==null?void 0:r.disabled)),d=D(!1),u=C(()=>c.value||l.value&&a.value!==n.value?-1:0);return Lo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},C(()=>l.value&&Na(e.value))),{radioRef:o,isGroup:l,radioGroup:r,focus:d,size:i,disabled:c,tabIndex:u,modelValue:a,actualValue:n}},hG=["value","name","disabled"],vG=N({...N({name:"ElRadio"}),props:fG,emits:Bw,setup(e,{emit:t}){const o=e,r=ze("radio"),{radioRef:l,radioGroup:n,focus:a,size:i,disabled:c,modelValue:d,actualValue:u}=Dw(o,t);function p(){et(()=>t("change",d.value))}return(h,v)=>{var m;return b(),M("label",{class:O([s(r).b(),s(r).is("disabled",s(c)),s(r).is("focus",s(a)),s(r).is("bordered",h.border),s(r).is("checked",s(d)===s(u)),s(r).m(s(i))])},[E("span",{class:O([s(r).e("input"),s(r).is("disabled",s(c)),s(r).is("checked",s(d)===s(u))])},[mt(E("input",{ref_key:"radioRef",ref:l,"onUpdate:modelValue":v[0]||(v[0]=f=>Zt(d)?d.value=f:null),class:O(s(r).e("original")),value:s(u),name:h.name||((m=s(n))==null?void 0:m.name),disabled:s(c),type:"radio",onFocus:v[1]||(v[1]=f=>a.value=!0),onBlur:v[2]||(v[2]=f=>a.value=!1),onChange:p,onClick:v[3]||(v[3]=ct(()=>{},["stop"]))},null,42,hG),[[N1,s(d)]]),E("span",{class:O(s(r).e("inner"))},null,2)],2),E("span",{class:O(s(r).e("label")),onKeydown:v[4]||(v[4]=ct(()=>{},["stop"]))},[be(h.$slots,"default",{},()=>[Ct($e(h.label),1)])],34)],2)}}});var mG=Le(vG,[["__file","radio.vue"]]);const gG=Pe({...Lw}),bG=["value","name","disabled"],_G=N({...N({name:"ElRadioButton"}),props:gG,setup(e){const t=e,o=ze("radio"),{radioRef:r,focus:l,size:n,disabled:a,modelValue:i,radioGroup:c,actualValue:d}=Dw(t),u=C(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(p,h)=>{var v;return b(),M("label",{class:O([s(o).b("button"),s(o).is("active",s(i)===s(d)),s(o).is("disabled",s(a)),s(o).is("focus",s(l)),s(o).bm("button",s(n))])},[mt(E("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":h[0]||(h[0]=m=>Zt(i)?i.value=m:null),class:O(s(o).be("button","original-radio")),value:s(d),type:"radio",name:p.name||((v=s(c))==null?void 0:v.name),disabled:s(a),onFocus:h[1]||(h[1]=m=>l.value=!0),onBlur:h[2]||(h[2]=m=>l.value=!1),onClick:h[3]||(h[3]=ct(()=>{},["stop"]))},null,42,bG),[[N1,s(i)]]),E("span",{class:O(s(o).be("button","inner")),style:Je(s(i)===s(d)?s(u):{}),onKeydown:h[4]||(h[4]=ct(()=>{},["stop"]))},[be(p.$slots,"default",{},()=>[Ct($e(p.label),1)])],38)],2)}}});var Hw=Le(_G,[["__file","radio-button.vue"]]);const wG=Pe({id:{type:String,default:void 0},size:Oo,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),yG=Bw,xG=["id","aria-label","aria-labelledby"],kG=N({...N({name:"ElRadioGroup"}),props:wG,emits:yG,setup(e,{emit:t}){const o=e,r=ze("radio"),l=Qo(),n=D(),{formItem:a}=sr(),{inputId:i,isLabeledByFormItem:c}=bl(o,{formItemContext:a}),d=p=>{t(St,p),et(()=>t("change",p))};ft(()=>{const p=n.value.querySelectorAll("[type=radio]"),h=p[0];!Array.from(p).some(v=>v.checked)&&h&&(h.tabIndex=0)});const u=C(()=>o.name||l.value);return zt(Vw,Dt({...Bo(o),changeEvent:d,name:u})),Se(()=>o.modelValue,()=>{o.validateEvent&&(a==null||a.validate("change").catch(p=>void 0))}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-radio-group",ref:"https://element-plus.org/en-US/component/radio.html"},C(()=>!!o.label)),(p,h)=>(b(),M("div",{id:s(i),ref_key:"radioGroupRef",ref:n,class:O(s(r).b("group")),role:"radiogroup","aria-label":s(c)?void 0:p.label||p.ariaLabel||"radio-group","aria-labelledby":s(c)?s(a).labelId:void 0},[be(p.$slots,"default")],10,xG))}});var Fw=Le(kG,[["__file","radio-group.vue"]]);const jw=yt(mG,{RadioButton:Hw,RadioGroup:Fw}),CG=co(Fw),SG=co(Hw);var EG=N({name:"NodeContent",setup(){return{ns:ze("cascader-node")}},render(){const{ns:e}=this,{node:t,panel:o}=this.$parent,{data:r,label:l}=t,{renderLabelFn:n}=o;return rt("span",{class:e.e("label")},n?n({node:t,data:r}):l)}});const zv=Symbol(),TG=N({name:"ElCascaderNode",components:{ElCheckbox:rl,ElRadio:jw,NodeContent:EG,ElIcon:Ze,Check:Li,Loading:vn,ArrowRight:ir},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const o=Ge(zv),r=ze("cascader-node"),l=C(()=>o.isHoverMenu),n=C(()=>o.config.multiple),a=C(()=>o.config.checkStrictly),i=C(()=>{var T;return(T=o.checkedNodes[0])==null?void 0:T.uid}),c=C(()=>e.node.isDisabled),d=C(()=>e.node.isLeaf),u=C(()=>a.value&&!d.value||!c.value),p=C(()=>v(o.expandingNode)),h=C(()=>a.value&&o.checkedNodes.some(v)),v=T=>{var L;const{level:P,uid:R}=e.node;return((L=T==null?void 0:T.pathNodes[P-1])==null?void 0:L.uid)===R},m=()=>{p.value||o.expandNode(e.node)},f=T=>{const{node:L}=e;T!==L.checked&&o.handleCheckChange(L,T)},_=()=>{o.lazyLoad(e.node,()=>{d.value||m()})},g=T=>{l.value&&(y(),!d.value&&t("expand",T))},y=()=>{const{node:T}=e;!u.value||T.loading||(T.loaded?m():_())},w=()=>{l.value&&!d.value||(d.value&&!c.value&&!a.value&&!n.value?$(!0):y())},x=T=>{a.value?(f(T),e.node.loaded&&m()):$(T)},$=T=>{e.node.loaded?(f(T),!a.value&&m()):_()};return{panel:o,isHoverMenu:l,multiple:n,checkStrictly:a,checkedNodeId:i,isDisabled:c,isLeaf:d,expandable:u,inExpandingPath:p,inCheckedPath:h,ns:r,handleHoverExpand:g,handleExpand:y,handleClick:w,handleCheck:$,handleSelectCheck:x}}}),$G=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"],MG=E("span",null,null,-1);function AG(e,t,o,r,l,n){const a=nt("el-checkbox"),i=nt("el-radio"),c=nt("check"),d=nt("el-icon"),u=nt("node-content"),p=nt("loading"),h=nt("arrow-right");return b(),M("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:O([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:t[2]||(t[2]=(...v)=>e.handleHoverExpand&&e.handleHoverExpand(...v)),onFocus:t[3]||(t[3]=(...v)=>e.handleHoverExpand&&e.handleHoverExpand(...v)),onClick:t[4]||(t[4]=(...v)=>e.handleClick&&e.handleClick(...v))},[se(" prefix "),e.multiple?(b(),he(a,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:t[0]||(t[0]=ct(()=>{},["stop"])),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onUpdate:modelValue"])):e.checkStrictly?(b(),he(i,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:t[1]||(t[1]=ct(()=>{},["stop"]))},{default:le(()=>[se(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 - `),AG]),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(b(),he(d,{key:2,class:O(e.ns.e("prefix"))},{default:le(()=>[ee(c)]),_:1},8,["class"])):se("v-if",!0),se(" content "),ee(u),se(" postfix "),e.isLeaf?se("v-if",!0):(b(),M(Qe,{key:3},[e.node.loading?(b(),he(d,{key:0,class:O([e.ns.is("loading"),e.ns.e("postfix")])},{default:le(()=>[ee(p)]),_:1},8,["class"])):(b(),he(d,{key:1,class:O(["arrow-right",e.ns.e("postfix")])},{default:le(()=>[ee(h)]),_:1},8,["class"]))],64))],42,MG)}var IG=Le($G,[["render",zG],["__file","node.vue"]]);const OG=N({name:"ElCascaderMenu",components:{Loading:vn,ElIcon:Ze,ElScrollbar:wn,ElCascaderNode:IG},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=wt(),o=ze("cascader-menu"),{t:r}=Rt(),l=Qo();let n=null,a=null;const i=Ge(Iv),c=D(null),d=C(()=>!e.nodes.length),u=C(()=>!i.initialLoaded),p=C(()=>`${l.value}-${e.index}`),h=_=>{n=_.target},v=_=>{if(!(!i.isHoverMenu||!n||!c.value))if(n.contains(_.target)){m();const g=t.vnode.el,{left:y}=g.getBoundingClientRect(),{offsetWidth:w,offsetHeight:x}=g,$=_.clientX-y,T=n.offsetTop,R=T+n.offsetHeight;c.value.innerHTML=` + `),MG]),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(b(),he(d,{key:2,class:O(e.ns.e("prefix"))},{default:le(()=>[te(c)]),_:1},8,["class"])):se("v-if",!0),se(" content "),te(u),se(" postfix "),e.isLeaf?se("v-if",!0):(b(),M(Qe,{key:3},[e.node.loading?(b(),he(d,{key:0,class:O([e.ns.is("loading"),e.ns.e("postfix")])},{default:le(()=>[te(p)]),_:1},8,["class"])):(b(),he(d,{key:1,class:O(["arrow-right",e.ns.e("postfix")])},{default:le(()=>[te(h)]),_:1},8,["class"]))],64))],42,$G)}var zG=Le(TG,[["render",AG],["__file","node.vue"]]);const IG=N({name:"ElCascaderMenu",components:{Loading:vn,ElIcon:Ze,ElScrollbar:wn,ElCascaderNode:zG},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=wt(),o=ze("cascader-menu"),{t:r}=Rt(),l=Qo();let n=null,a=null;const i=Ge(zv),c=D(null),d=C(()=>!e.nodes.length),u=C(()=>!i.initialLoaded),p=C(()=>`${l.value}-${e.index}`),h=_=>{n=_.target},v=_=>{if(!(!i.isHoverMenu||!n||!c.value))if(n.contains(_.target)){m();const g=t.vnode.el,{left:y}=g.getBoundingClientRect(),{offsetWidth:w,offsetHeight:x}=g,$=_.clientX-y,T=n.offsetTop,L=T+n.offsetHeight;c.value.innerHTML=` - - `}else a||(a=window.setTimeout(f,i.config.hoverThreshold))},m=()=>{a&&(clearTimeout(a),a=null)},f=()=>{c.value&&(c.value.innerHTML="",m())};return{ns:o,panel:i,hoverZone:c,isEmpty:d,isLoading:u,menuId:p,t:r,handleExpand:h,handleMouseMove:v,clearHoverZone:f}}});function NG(e,t,o,r,l,n){const a=nt("el-cascader-node"),i=nt("loading"),c=nt("el-icon"),d=nt("el-scrollbar");return b(),he(d,{key:e.menuId,tag:"ul",role:"menu",class:O(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:le(()=>{var u;return[(b(!0),M(Qe,null,It(e.nodes,p=>(b(),he(a,{key:p.uid,node:p,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(b(),M("div",{key:0,class:O(e.ns.e("empty-text"))},[ee(c,{size:"14",class:O(e.ns.is("loading"))},{default:le(()=>[ee(i)]),_:1},8,["class"]),Ct(" "+$e(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(b(),M("div",{key:1,class:O(e.ns.e("empty-text"))},$e(e.t("el.cascader.noData")),3)):(u=e.panel)!=null&&u.isHoverMenu?(b(),M("svg",{key:2,ref:"hoverZone",class:O(e.ns.e("hover-zone"))},null,2)):se("v-if",!0)]}),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var PG=Le(OG,[["render",NG],["__file","menu.vue"]]);let RG=0;const LG=e=>{const t=[e];let{parent:o}=e;for(;o;)t.unshift(o),o=o.parent;return t};let Ov=class Em{constructor(t,o,r,l=!1){this.data=t,this.config=o,this.parent=r,this.root=l,this.uid=RG++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:n,label:a,children:i}=o,c=t[i],d=LG(this);this.level=l?0:r?r.level+1:1,this.value=t[n],this.label=t[a],this.pathNodes=d,this.pathValues=d.map(u=>u.value),this.pathLabels=d.map(u=>u.label),this.childrenData=c,this.children=(c||[]).map(u=>new Em(u,o,this)),this.loaded=!o.lazy||this.isLeaf||!Yr(c)}get isDisabled(){const{data:t,parent:o,config:r}=this,{disabled:l,checkStrictly:n}=r;return(it(l)?l(t,this):!!t[l])||!n&&(o==null?void 0:o.isDisabled)}get isLeaf(){const{data:t,config:o,childrenData:r,loaded:l}=this,{lazy:n,leaf:a}=o,i=it(a)?a(t,this):t[a];return ko(i)?n&&!l?!1:!(Array.isArray(r)&&r.length):!!i}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:o,children:r}=this,l=new Em(t,this.config,this);return Array.isArray(o)?o.push(t):this.childrenData=[t],r.push(l),l}calcText(t,o){const r=t?this.pathLabels.join(o):this.label;return this.text=r,r}broadcast(t,...o){const r=`onParent${Nl(t)}`;this.children.forEach(l=>{l&&(l.broadcast(t,...o),l[r]&&l[r](...o))})}emit(t,...o){const{parent:r}=this,l=`onChild${Nl(t)}`;r&&(r[l]&&r[l](...o),r.emit(t,...o))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,o=t.filter(l=>!l.isDisabled),r=o.length?o.every(l=>l.checked):!1;this.setCheckState(r)}setCheckState(t){const o=this.children.length,r=this.children.reduce((l,n)=>{const a=n.checked?1:n.indeterminate?.5:0;return l+a},0);this.checked=this.loaded&&this.children.filter(l=>!l.isDisabled).every(l=>l.loaded&&l.checked)&&t,this.indeterminate=this.loaded&&r!==o&&r>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:o,multiple:r}=this.config;o||!r?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check"))}};const Nv=(e,t)=>e.reduce((o,r)=>(r.isLeaf?o.push(r):(!t&&o.push(r),o=o.concat(Nv(r.children,t))),o),[]);class Uw{constructor(t,o){this.config=o;const r=(t||[]).map(l=>new Ov(l,this.config));this.nodes=r,this.allNodes=Nv(r,!1),this.leafNodes=Nv(r,!0)}getNodes(){return this.nodes}getFlattedNodes(t){return t?this.leafNodes:this.allNodes}appendNode(t,o){const r=o?o.appendChild(t):new Ov(t,this.config);o||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(t,o){t.forEach(r=>this.appendNode(r,o))}getNodeByValue(t,o=!1){return!t&&t!==0?null:this.getFlattedNodes(o).find(l=>nr(l.value,t)||nr(l.pathValues,t))||null}getSameNode(t){return t&&this.getFlattedNodes(!1).find(({value:r,level:l})=>nr(t.value,r)&&t.level===l)||null}}const Ww=Pe({modelValue:{type:ue([Number,String,Array])},options:{type:ue(Array),default:()=>[]},props:{type:ue(Object),default:()=>({})}}),BG={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:Wt,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},VG=e=>C(()=>({...BG,...e.props})),qw=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},DG=e=>{if(!e)return;const t=e.querySelector("input");t?t.click():Fb(e)&&e.click()},HG=(e,t)=>{const o=t.slice(0),r=o.map(n=>n.uid),l=e.reduce((n,a)=>{const i=r.indexOf(a.uid);return i>-1&&(n.push(a),o.splice(i,1),r.splice(i,1)),n},[]);return l.push(...o),l},FG=N({name:"ElCascaderPanel",components:{ElCascaderMenu:PG},props:{...Ww,border:{type:Boolean,default:!0},renderLabel:Function},emits:[St,ro,"close","expand-change"],setup(e,{emit:t,slots:o}){let r=!1;const l=ze("cascader"),n=VG(e);let a=null;const i=D(!0),c=D([]),d=D(null),u=D([]),p=D(null),h=D([]),v=C(()=>n.value.expandTrigger==="hover"),m=C(()=>e.renderLabel||o.default),f=()=>{const{options:j}=e,te=n.value;r=!1,a=new Uw(j,te),u.value=[a.getNodes()],te.lazy&&Yr(e.options)?(i.value=!1,_(void 0,J=>{J&&(a=new Uw(J,te),u.value=[a.getNodes()]),i.value=!0,P(!1,!0)})):P(!1,!0)},_=(j,te)=>{const J=n.value;j=j||new Ov({},J,void 0,!0),j.loading=!0;const Z=H=>{const F=j,K=F.root?null:F;H&&(a==null||a.appendNodes(H,K)),F.loading=!1,F.loaded=!0,F.childrenData=F.childrenData||[],te&&te(H)};J.lazyLoad(j,Z)},g=(j,te)=>{var J;const{level:Z}=j,H=u.value.slice(0,Z);let F;j.isLeaf?F=j.pathNodes[Z-2]:(F=j,H.push(j.children)),((J=p.value)==null?void 0:J.uid)!==(F==null?void 0:F.uid)&&(p.value=j,u.value=H,!te&&t("expand-change",(j==null?void 0:j.pathValues)||[]))},y=(j,te,J=!0)=>{const{checkStrictly:Z,multiple:H}=n.value,F=h.value[0];r=!0,!H&&(F==null||F.doCheck(!1)),j.doCheck(te),R(),J&&!H&&!Z&&t("close"),!J&&!H&&!Z&&w(j)},w=j=>{j&&(j=j.parent,w(j),j&&g(j))},x=j=>a==null?void 0:a.getFlattedNodes(j),$=j=>{var te;return(te=x(j))==null?void 0:te.filter(J=>J.checked!==!1)},T=()=>{h.value.forEach(j=>j.doCheck(!1)),R(),u.value=u.value.slice(0,1),p.value=null,t("expand-change",[])},R=()=>{var j;const{checkStrictly:te,multiple:J}=n.value,Z=h.value,H=$(!te),F=HG(Z,H),K=F.map(I=>I.valueByOption);h.value=F,d.value=J?K:(j=K[0])!=null?j:null},P=(j=!1,te=!1)=>{const{modelValue:J}=e,{lazy:Z,multiple:H,checkStrictly:F}=n.value,K=!F;if(!(!i.value||r||!te&&nr(J,d.value)))if(Z&&!j){const U=o6(Az(Lr(J))).map(oe=>a==null?void 0:a.getNodeByValue(oe)).filter(oe=>!!oe&&!oe.loaded&&!oe.loading);U.length?U.forEach(oe=>{_(oe,()=>P(!1,te))}):P(!0,te)}else{const I=H?Lr(J):[J],U=o6(I.map(oe=>a==null?void 0:a.getNodeByValue(oe,K)));L(U,te),d.value=xd(J)}},L=(j,te=!0)=>{const{checkStrictly:J}=n.value,Z=h.value,H=j.filter(I=>!!I&&(J||I.isLeaf)),F=a==null?void 0:a.getSameNode(p.value),K=te&&F||H[0];K?K.pathNodes.forEach(I=>g(I,!0)):p.value=null,Z.forEach(I=>I.doCheck(!1)),Dt(H).forEach(I=>I.doCheck(!0)),h.value=H,et(V)},V=()=>{Nt&&c.value.forEach(j=>{const te=j==null?void 0:j.$el;if(te){const J=te.querySelector(`.${l.namespace.value}-scrollbar__wrap`),Z=te.querySelector(`.${l.b("node")}.${l.is("active")}`)||te.querySelector(`.${l.b("node")}.in-active-path`);$3(J,Z)}})},B=j=>{const te=j.target,{code:J}=j;switch(J){case lt.up:case lt.down:{j.preventDefault();const Z=J===lt.up?-1:1;fd(jb(te,Z,`.${l.b("node")}[tabindex="-1"]`));break}case lt.left:{j.preventDefault();const Z=c.value[qw(te)-1],H=Z==null?void 0:Z.$el.querySelector(`.${l.b("node")}[aria-expanded="true"]`);fd(H);break}case lt.right:{j.preventDefault();const Z=c.value[qw(te)+1],H=Z==null?void 0:Z.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`);fd(H);break}case lt.enter:DG(te);break}};return zt(Iv,Dt({config:n,expandingNode:p,checkedNodes:h,isHoverMenu:v,initialLoaded:i,renderLabelFn:m,lazyLoad:_,expandNode:g,handleCheckChange:y})),Se([n,()=>e.options],f,{deep:!0,immediate:!0}),Se(()=>e.modelValue,()=>{r=!1,P()},{deep:!0}),Se(()=>d.value,j=>{nr(j,e.modelValue)||(t(St,j),t(ro,j))}),_g(()=>c.value=[]),ft(()=>!Yr(e.modelValue)&&P()),{ns:l,menuList:c,menus:u,checkedNodes:h,handleKeyDown:B,handleCheckChange:y,getFlattedNodes:x,getCheckedNodes:$,clearCheckedNodes:T,calculateCheckedValue:R,scrollToExpandingNode:V}}});function jG(e,t,o,r,l,n){const a=nt("el-cascader-menu");return b(),M("div",{class:O([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:t[0]||(t[0]=(...i)=>e.handleKeyDown&&e.handleKeyDown(...i))},[(b(!0),M(Qe,null,It(e.menus,(i,c)=>(b(),he(a,{key:c,ref_for:!0,ref:d=>e.menuList[c]=d,index:c,nodes:[...i]},null,8,["index","nodes"]))),128))],34)}var fp=Le(FG,[["render",jG],["__file","index.vue"]]);fp.install=e=>{e.component(fp.name,fp)};const Yw=fp,KG=Yw,hp=Pe({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Rl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),UG=N({...N({name:"ElTag"}),props:hp,emits:{close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,r=So(),l=ze("tag"),n=C(()=>{const{type:c,hit:d,effect:u,closable:p,round:h}=o;return[l.b(),l.is("closable",p),l.m(c||"primary"),l.m(r.value),l.m(u),l.is("hit",d),l.is("round",h)]}),a=c=>{t("close",c)},i=c=>{t("click",c)};return(c,d)=>c.disableTransitions?(b(),M("span",{key:0,class:O(s(n)),style:Je({backgroundColor:c.color}),onClick:i},[E("span",{class:O(s(l).e("content"))},[be(c.$slots,"default")],2),c.closable?(b(),he(s(Ze),{key:0,class:O(s(l).e("close")),onClick:ct(a,["stop"])},{default:le(()=>[ee(s(Jr))]),_:1},8,["class","onClick"])):se("v-if",!0)],6)):(b(),he(Mo,{key:1,name:`${s(l).namespace.value}-zoom-in-center`,appear:""},{default:le(()=>[E("span",{class:O(s(n)),style:Je({backgroundColor:c.color}),onClick:i},[E("span",{class:O(s(l).e("content"))},[be(c.$slots,"default")],2),c.closable?(b(),he(s(Ze),{key:0,class:O(s(l).e("close")),onClick:ct(a,["stop"])},{default:le(()=>[ee(s(Jr))]),_:1},8,["class","onClick"])):se("v-if",!0)],6)]),_:3},8,["name"]))}});var WG=Le(UG,[["__file","tag.vue"]]);const Rc=yt(WG),qG=Pe({...Ww,size:Oo,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:ue(Function),default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:ue(Function),default:()=>!0},popperClass:{type:String,default:""},teleported:Uo.teleported,tagType:{...hp.type,default:"info"},validateEvent:{type:Boolean,default:!0},...Xi}),YG={[St]:e=>!0,[ro]:e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,visibleChange:e=>Co(e),expandChange:e=>!!e,removeTag:e=>!!e},GG={key:0},XG=["placeholder","onKeydown"],ZG=["onClick"],JG=N({...N({name:"ElCascader"}),props:qG,emits:YG,setup(e,{expose:t,emit:o}){const r=e,l={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:X})=>{const{modifiersData:re,placement:ge}=X;["right","left","bottom","top"].includes(ge)||(re.arrow.x=35)},requires:["arrow"]}]},n=ya();let a=0,i=0;const c=ze("cascader"),d=ze("input"),{t:u}=Rt(),{form:p,formItem:h}=sr(),{valueOnClear:v}=Wd(r),m=D(null),f=D(null),_=D(null),g=D(null),y=D(null),w=D(!1),x=D(!1),$=D(!1),T=D(!1),R=D(""),P=D(""),L=D([]),V=D([]),B=D([]),j=D(!1),te=C(()=>n.style),J=C(()=>r.disabled||(p==null?void 0:p.disabled)),Z=C(()=>r.placeholder||u("el.cascader.placeholder")),H=C(()=>P.value||L.value.length>0||j.value?"":Z.value),F=So(),K=C(()=>["small"].includes(F.value)?"small":"default"),I=C(()=>!!r.props.multiple),U=C(()=>!r.filterable||I.value),oe=C(()=>I.value?P.value:R.value),ne=C(()=>{var X;return((X=g.value)==null?void 0:X.checkedNodes)||[]}),ce=C(()=>!r.clearable||J.value||$.value||!x.value?!1:!!ne.value.length),Q=C(()=>{const{showAllLevels:X,separator:re}=r,ge=ne.value;return ge.length?I.value?"":ge[0].calcText(X,re):""}),Me=C(()=>(h==null?void 0:h.validateState)||""),de=C({get(){return xd(r.modelValue)},set(X){const re=X||v.value;o(St,re),o(ro,re),r.validateEvent&&(h==null||h.validate("change").catch(ge=>void 0))}}),_e=C(()=>[c.b(),c.m(F.value),c.is("disabled",J.value),n.class]),me=C(()=>[d.e("icon"),"icon-arrow-down",c.is("reverse",w.value)]),Re=C(()=>c.is("focus",w.value||T.value)),Ce=C(()=>{var X,re;return(re=(X=m.value)==null?void 0:X.popperRef)==null?void 0:re.contentRef}),Ee=X=>{var re,ge,fe;J.value||(X=X??!w.value,X!==w.value&&(w.value=X,(ge=(re=f.value)==null?void 0:re.input)==null||ge.setAttribute("aria-expanded",`${X}`),X?(De(),et((fe=g.value)==null?void 0:fe.scrollToExpandingNode)):r.filterable&&ye(),o("visibleChange",X)))},De=()=>{et(()=>{var X;(X=m.value)==null||X.updatePopper()})},ae=()=>{$.value=!1},pe=X=>{const{showAllLevels:re,separator:ge}=r;return{node:X,key:X.uid,text:X.calcText(re,ge),hitState:!1,closable:!J.value&&!X.isDisabled,isCollapseTag:!1}},ke=X=>{var re;const ge=X.node;ge.doCheck(!1),(re=g.value)==null||re.calculateCheckedValue(),o("removeTag",ge.valueByOption)},Oe=()=>{if(!I.value)return;const X=ne.value,re=[],ge=[];if(X.forEach(fe=>ge.push(pe(fe))),V.value=ge,X.length){X.slice(0,r.maxCollapseTags).forEach(at=>re.push(pe(at)));const fe=X.slice(r.maxCollapseTags),Fe=fe.length;Fe&&(r.collapseTags?re.push({key:-1,text:`+ ${Fe}`,closable:!1,isCollapseTag:!0}):fe.forEach(at=>re.push(pe(at))))}L.value=re},we=()=>{var X,re;const{filterMethod:ge,showAllLevels:fe,separator:Fe}=r,at=(re=(X=g.value)==null?void 0:X.getFlattedNodes(!r.props.checkStrictly))==null?void 0:re.filter(_t=>_t.isDisabled?!1:(_t.calcText(fe,Fe),ge(_t,oe.value)));I.value&&(L.value.forEach(_t=>{_t.hitState=!1}),V.value.forEach(_t=>{_t.hitState=!1})),$.value=!0,B.value=at,De()},Te=()=>{var X;let re;$.value&&y.value?re=y.value.$el.querySelector(`.${c.e("suggestion-item")}`):re=(X=g.value)==null?void 0:X.$el.querySelector(`.${c.b("node")}[tabindex="-1"]`),re&&(re.focus(),!$.value&&re.click())},Ne=()=>{var X,re;const ge=(X=f.value)==null?void 0:X.input,fe=_.value,Fe=(re=y.value)==null?void 0:re.$el;if(!(!Nt||!ge)){if(Fe){const at=Fe.querySelector(`.${c.e("suggestion-list")}`);at.style.minWidth=`${ge.offsetWidth}px`}if(fe){const{offsetHeight:at}=fe,_t=L.value.length>0?`${Math.max(at+6,a)}px`:`${a}px`;ge.style.height=_t,De()}}},Ie=X=>{var re;return(re=g.value)==null?void 0:re.getCheckedNodes(X)},Ae=X=>{De(),o("expandChange",X)},xe=X=>{var re;const ge=(re=X.target)==null?void 0:re.value;if(X.type==="compositionend")j.value=!1,et(()=>A(ge));else{const fe=ge[ge.length-1]||"";j.value=!xh(fe)}},We=X=>{if(!j.value)switch(X.code){case lt.enter:Ee();break;case lt.down:Ee(!0),et(Te),X.preventDefault();break;case lt.esc:w.value===!0&&(X.preventDefault(),X.stopPropagation(),Ee(!1));break;case lt.tab:Ee(!1);break}},qe=()=>{var X;(X=g.value)==null||X.clearCheckedNodes(),!w.value&&r.filterable&&ye(),Ee(!1)},ye=()=>{const{value:X}=Q;R.value=X,P.value=X},Ye=X=>{var re,ge;const{checked:fe}=X;I.value?(re=g.value)==null||re.handleCheckChange(X,!fe,!1):(!fe&&((ge=g.value)==null||ge.handleCheckChange(X,!0,!1)),Ee(!1))},tt=X=>{const re=X.target,{code:ge}=X;switch(ge){case lt.up:case lt.down:{const fe=ge===lt.up?-1:1;fd(jb(re,fe,`.${c.e("suggestion-item")}[tabindex="-1"]`));break}case lt.enter:re.click();break}},pt=()=>{const X=L.value,re=X[X.length-1];i=P.value?0:i+1,!(!re||!i||r.collapseTags&&X.length>1)&&(re.hitState?ke(re):re.hitState=!0)},dt=X=>{const re=X.target,ge=c.e("search-input");re.className===ge&&(T.value=!0),o("focus",X)},Y=X=>{T.value=!1,o("blur",X)},S=Mr(()=>{const{value:X}=oe;if(!X)return;const re=r.beforeFilter(X);Es(re)?re.then(we).catch(()=>{}):re!==!1?we():ae()},r.debounce),A=(X,re)=>{!w.value&&Ee(!0),!(re!=null&&re.isComposing)&&(X?S():ae())},G=X=>Number.parseFloat(nE(d.cssVarName("input-height"),X).value)-2;return Se($,De),Se([ne,J],Oe),Se(L,()=>{et(()=>Ne())}),Se(F,async()=>{await et();const X=f.value.input;a=G(X)||a,Ne()}),Se(Q,ye,{immediate:!0}),ft(()=>{const X=f.value.input,re=G(X);a=X.offsetHeight||re,so(X,Ne)}),t({getCheckedNodes:Ie,cascaderPanelRef:g,togglePopperVisible:Ee,contentRef:Ce}),(X,re)=>(b(),he(s(ur),{ref_key:"tooltipRef",ref:m,visible:w.value,teleported:X.teleported,"popper-class":[s(c).e("dropdown"),X.popperClass],"popper-options":l,"fallback-placements":["bottom-start","bottom","top-start","top","right","left"],"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:"bottom-start",transition:`${s(c).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:"",onHide:ae},{default:le(()=>[mt((b(),M("div",{class:O(s(_e)),style:Je(s(te)),onClick:re[5]||(re[5]=()=>Ee(s(U)?void 0:!0)),onKeydown:We,onMouseenter:re[6]||(re[6]=ge=>x.value=!0),onMouseleave:re[7]||(re[7]=ge=>x.value=!1)},[ee(s(cr),{ref_key:"input",ref:f,modelValue:R.value,"onUpdate:modelValue":re[1]||(re[1]=ge=>R.value=ge),placeholder:s(H),readonly:s(U),disabled:s(J),"validate-event":!1,size:s(F),class:O(s(Re)),tabindex:s(I)&&X.filterable&&!s(J)?-1:void 0,onCompositionstart:xe,onCompositionupdate:xe,onCompositionend:xe,onFocus:dt,onBlur:Y,onInput:A},{suffix:le(()=>[s(ce)?(b(),he(s(Ze),{key:"clear",class:O([s(d).e("icon"),"icon-circle-close"]),onClick:ct(qe,["stop"])},{default:le(()=>[ee(s(hn))]),_:1},8,["class","onClick"])):(b(),he(s(Ze),{key:"arrow-down",class:O(s(me)),onClick:re[0]||(re[0]=ct(ge=>Ee(),["stop"]))},{default:le(()=>[ee(s(Pl))]),_:1},8,["class"]))]),_:1},8,["modelValue","placeholder","readonly","disabled","size","class","tabindex"]),s(I)?(b(),M("div",{key:0,ref_key:"tagWrapper",ref:_,class:O([s(c).e("tags"),s(c).is("validate",!!s(Me))])},[(b(!0),M(Qe,null,It(L.value,ge=>(b(),he(s(Rc),{key:ge.key,type:X.tagType,size:s(K),hit:ge.hitState,closable:ge.closable,"disable-transitions":"",onClose:fe=>ke(ge)},{default:le(()=>[ge.isCollapseTag===!1?(b(),M("span",GG,$e(ge.text),1)):(b(),he(s(ur),{key:1,disabled:w.value||!X.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:le(()=>[E("span",null,$e(ge.text),1)]),content:le(()=>[E("div",{class:O(s(c).e("collapse-tags"))},[(b(!0),M(Qe,null,It(V.value.slice(X.maxCollapseTags),(fe,Fe)=>(b(),M("div",{key:Fe,class:O(s(c).e("collapse-tag"))},[(b(),he(s(Rc),{key:fe.key,class:"in-tooltip",type:X.tagType,size:s(K),hit:fe.hitState,closable:fe.closable,"disable-transitions":"",onClose:at=>ke(fe)},{default:le(()=>[E("span",null,$e(fe.text),1)]),_:2},1032,["type","size","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","hit","closable","onClose"]))),128)),X.filterable&&!s(J)?mt((b(),M("input",{key:0,"onUpdate:modelValue":re[2]||(re[2]=ge=>P.value=ge),type:"text",class:O(s(c).e("search-input")),placeholder:s(Q)?"":s(Z),onInput:re[3]||(re[3]=ge=>A(P.value,ge)),onClick:re[4]||(re[4]=ct(ge=>Ee(!0),["stop"])),onKeydown:Gt(pt,["delete"]),onCompositionstart:xe,onCompositionupdate:xe,onCompositionend:xe,onFocus:dt,onBlur:Y},null,42,XG)),[[l0,P.value]]):se("v-if",!0)],2)):se("v-if",!0)],38)),[[s(xn),()=>Ee(!1),s(Ce)]])]),content:le(()=>[mt(ee(s(Yw),{ref_key:"cascaderPanelRef",ref:g,modelValue:s(de),"onUpdate:modelValue":re[8]||(re[8]=ge=>Zt(de)?de.value=ge:null),options:X.options,props:r.props,border:!1,"render-label":X.$slots.default,onExpandChange:Ae,onClose:re[9]||(re[9]=ge=>X.$nextTick(()=>Ee(!1)))},null,8,["modelValue","options","props","render-label"]),[[Lt,!$.value]]),X.filterable?mt((b(),he(s(wn),{key:0,ref_key:"suggestionPanel",ref:y,tag:"ul",class:O(s(c).e("suggestion-panel")),"view-class":s(c).e("suggestion-list"),onKeydown:tt},{default:le(()=>[B.value.length?(b(!0),M(Qe,{key:0},It(B.value,ge=>(b(),M("li",{key:ge.uid,class:O([s(c).e("suggestion-item"),s(c).is("checked",ge.checked)]),tabindex:-1,onClick:fe=>Ye(ge)},[E("span",null,$e(ge.text),1),ge.checked?(b(),he(s(Ze),{key:0},{default:le(()=>[ee(s(Li))]),_:1})):se("v-if",!0)],10,ZG))),128)):be(X.$slots,"empty",{key:1},()=>[E("li",{class:O(s(c).e("empty-text"))},$e(s(u)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Lt,$.value]]):se("v-if",!0)]),_:3},8,["visible","teleported","popper-class","transition"]))}});var vp=Le(JG,[["__file","cascader.vue"]]);vp.install=e=>{e.component(vp.name,vp)};const QG=vp,eX=Pe({checked:{type:Boolean,default:!1},type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),tX={"update:checked":e=>Co(e),[ro]:e=>Co(e)},oX=N({...N({name:"ElCheckTag"}),props:eX,emits:tX,setup(e,{emit:t}){const o=e,r=ze("check-tag"),l=C(()=>[r.b(),r.is("checked",o.checked),r.m(o.type||"primary")]),n=()=>{const a=!o.checked;t(ro,a),t("update:checked",a)};return(a,i)=>(b(),M("span",{class:O(s(l)),onClick:n},[be(a.$slots,"default")],2))}});var rX=Le(oX,[["__file","check-tag.vue"]]);const lX=yt(rX),Gw=Symbol("rowContextKey"),nX=Pe({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),aX=N({...N({name:"ElRow"}),props:nX,setup(e){const t=e,o=ze("row"),r=C(()=>t.gutter);zt(Gw,{gutter:r});const l=C(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),n=C(()=>[o.b(),o.is(`justify-${t.justify}`,t.justify!=="start"),o.is(`align-${t.align}`,!!t.align)]);return(a,i)=>(b(),he(Et(a.tag),{class:O(s(n)),style:Je(s(l))},{default:le(()=>[be(a.$slots,"default")]),_:3},8,["class","style"]))}});var iX=Le(aX,[["__file","row.vue"]]);const sX=yt(iX),cX=Pe({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:ue([Number,Object]),default:()=>uo({})},sm:{type:ue([Number,Object]),default:()=>uo({})},md:{type:ue([Number,Object]),default:()=>uo({})},lg:{type:ue([Number,Object]),default:()=>uo({})},xl:{type:ue([Number,Object]),default:()=>uo({})}}),uX=N({...N({name:"ElCol"}),props:cX,setup(e){const t=e,{gutter:o}=Ge(Gw,{gutter:C(()=>0)}),r=ze("col"),l=C(()=>{const a={};return o.value&&(a.paddingLeft=a.paddingRight=`${o.value/2}px`),a}),n=C(()=>{const a=[];return["span","offset","pull","push"].forEach(d=>{const u=t[d];st(u)&&(d==="span"?a.push(r.b(`${t[d]}`)):u>0&&a.push(r.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{st(t[d])?a.push(r.b(`${d}-${t[d]}`)):xt(t[d])&&Object.entries(t[d]).forEach(([u,p])=>{a.push(u!=="span"?r.b(`${d}-${u}-${p}`):r.b(`${d}-${p}`))})}),o.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,i)=>(b(),he(Et(a.tag),{class:O(s(n)),style:Je(s(l))},{default:le(()=>[be(a.$slots,"default")]),_:3},8,["class","style"]))}});var dX=Le(uX,[["__file","col.vue"]]);const pX=yt(dX),Xw=e=>st(e)||ut(e)||Ke(e),fX=Pe({accordion:Boolean,modelValue:{type:ue([Array,String,Number]),default:()=>uo([])}}),hX={[St]:Xw,[ro]:Xw},Zw=Symbol("collapseContextKey"),vX=(e,t)=>{const o=D(Gn(e.modelValue)),r=n=>{o.value=n;const a=e.accordion?o.value[0]:o.value;t(St,a),t(ro,a)},l=n=>{if(e.accordion)r([o.value[0]===n?"":n]);else{const a=[...o.value],i=a.indexOf(n);i>-1?a.splice(i,1):a.push(n),r(a)}};return Se(()=>e.modelValue,()=>o.value=Gn(e.modelValue),{deep:!0}),zt(Zw,{activeNames:o,handleItemClick:l}),{activeNames:o,setActiveNames:r}},mX=()=>{const e=ze("collapse");return{rootKls:C(()=>e.b())}},gX=N({...N({name:"ElCollapse"}),props:fX,emits:hX,setup(e,{expose:t,emit:o}){const r=e,{activeNames:l,setActiveNames:n}=vX(r,o),{rootKls:a}=mX();return t({activeNames:l,setActiveNames:n}),(i,c)=>(b(),M("div",{class:O(s(a))},[be(i.$slots,"default")],2))}});var bX=Le(gX,[["__file","collapse.vue"]]);const _X=N({...N({name:"ElCollapseTransition"}),setup(e){const t=ze("collapse-transition"),o=l=>{l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom},r={beforeEnter(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.style.height&&(l.dataset.elExistsHeight=l.style.height),l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0},enter(l){requestAnimationFrame(()=>{l.dataset.oldOverflow=l.style.overflow,l.dataset.elExistsHeight?l.style.maxHeight=l.dataset.elExistsHeight:l.scrollHeight!==0?l.style.maxHeight=`${l.scrollHeight}px`:l.style.maxHeight=0,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom,l.style.overflow="hidden"})},afterEnter(l){l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow},enterCancelled(l){o(l)},beforeLeave(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.dataset.oldOverflow=l.style.overflow,l.style.maxHeight=`${l.scrollHeight}px`,l.style.overflow="hidden"},leave(l){l.scrollHeight!==0&&(l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0)},afterLeave(l){o(l)},leaveCancelled(l){o(l)}};return(l,n)=>(b(),he(Mo,Mt({name:s(t).b()},Nk(r)),{default:le(()=>[be(l.$slots,"default")]),_:3},16,["name"]))}});var mp=Le(_X,[["__file","collapse-transition.vue"]]);mp.install=e=>{e.component(mp.name,mp)};const gp=mp,wX=gp,yX=Pe({title:{type:String,default:""},name:{type:ue([String,Number]),default:void 0},disabled:Boolean}),xX=e=>{const t=Ge(Zw),{namespace:o}=ze("collapse"),r=D(!1),l=D(!1),n=Rh(),a=C(()=>n.current++),i=C(()=>{var h;return(h=e.name)!=null?h:`${o.value}-id-${n.prefix}-${s(a)}`}),c=C(()=>t==null?void 0:t.activeNames.value.includes(s(i)));return{focusing:r,id:a,isActive:c,handleFocus:()=>{setTimeout(()=>{l.value?l.value=!1:r.value=!0},50)},handleHeaderClick:()=>{e.disabled||(t==null||t.handleItemClick(s(i)),r.value=!1,l.value=!0)},handleEnterClick:()=>{t==null||t.handleItemClick(s(i))}}},kX=(e,{focusing:t,isActive:o,id:r})=>{const l=ze("collapse"),n=C(()=>[l.b("item"),l.is("active",s(o)),l.is("disabled",e.disabled)]),a=C(()=>[l.be("item","header"),l.is("active",s(o)),{focusing:s(t)&&!e.disabled}]),i=C(()=>[l.be("item","arrow"),l.is("active",s(o))]),c=C(()=>l.be("item","wrap")),d=C(()=>l.be("item","content")),u=C(()=>l.b(`content-${s(r)}`)),p=C(()=>l.b(`head-${s(r)}`));return{arrowKls:i,headKls:a,rootKls:n,itemWrapperKls:c,itemContentKls:d,scopedContentId:u,scopedHeadId:p}},CX=["id","aria-expanded","aria-controls","aria-describedby","tabindex"],SX=["id","aria-hidden","aria-labelledby"],EX=N({...N({name:"ElCollapseItem"}),props:yX,setup(e,{expose:t}){const o=e,{focusing:r,id:l,isActive:n,handleFocus:a,handleHeaderClick:i,handleEnterClick:c}=xX(o),{arrowKls:d,headKls:u,rootKls:p,itemWrapperKls:h,itemContentKls:v,scopedContentId:m,scopedHeadId:f}=kX(o,{focusing:r,isActive:n,id:l});return t({isActive:n}),(_,g)=>(b(),M("div",{class:O(s(p))},[E("button",{id:s(f),class:O(s(u)),"aria-expanded":s(n),"aria-controls":s(m),"aria-describedby":s(m),tabindex:_.disabled?-1:0,type:"button",onClick:g[0]||(g[0]=(...y)=>s(i)&&s(i)(...y)),onKeydown:g[1]||(g[1]=Gt(ct((...y)=>s(c)&&s(c)(...y),["stop","prevent"]),["space","enter"])),onFocus:g[2]||(g[2]=(...y)=>s(a)&&s(a)(...y)),onBlur:g[3]||(g[3]=y=>r.value=!1)},[be(_.$slots,"title",{},()=>[Ct($e(_.title),1)]),ee(s(Ze),{class:O(s(d))},{default:le(()=>[ee(s(ir))]),_:1},8,["class"])],42,CX),ee(s(gp),null,{default:le(()=>[mt(E("div",{id:s(m),role:"region",class:O(s(h)),"aria-hidden":!s(n),"aria-labelledby":s(f)},[E("div",{class:O(s(v))},[be(_.$slots,"default")],2)],10,SX),[[Lt,s(n)]])]),_:3})],2))}});var Jw=Le(EX,[["__file","collapse-item.vue"]]);const TX=yt(bX,{CollapseItem:Jw}),$X=co(Jw),MX=Pe({color:{type:ue(Object),required:!0},vertical:{type:Boolean,default:!1}});let Pv=!1;function Lc(e,t){if(!Nt)return;const o=function(n){var a;(a=t.drag)==null||a.call(t,n)},r=function(n){var a;document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,Pv=!1,(a=t.end)==null||a.call(t,n)},l=function(n){var a;Pv||(n.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),document.addEventListener("touchmove",o),document.addEventListener("touchend",r),Pv=!0,(a=t.start)==null||a.call(t,n))};e.addEventListener("mousedown",l),e.addEventListener("touchstart",l)}const AX=e=>{const t=wt(),o=lo(),r=lo();function l(a){a.target!==o.value&&n(a)}function n(a){if(!r.value||!o.value)return;const c=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:u}=R0(a);if(e.vertical){let p=u-c.top;p=Math.max(o.value.offsetHeight/2,p),p=Math.min(p,c.height-o.value.offsetHeight/2),e.color.set("alpha",Math.round((p-o.value.offsetHeight/2)/(c.height-o.value.offsetHeight)*100))}else{let p=d-c.left;p=Math.max(o.value.offsetWidth/2,p),p=Math.min(p,c.width-o.value.offsetWidth/2),e.color.set("alpha",Math.round((p-o.value.offsetWidth/2)/(c.width-o.value.offsetWidth)*100))}}return{thumb:o,bar:r,handleDrag:n,handleClick:l}},zX=(e,{bar:t,thumb:o,handleDrag:r})=>{const l=wt(),n=ze("color-alpha-slider"),a=D(0),i=D(0),c=D();function d(){if(!o.value||e.vertical)return 0;const y=l.vnode.el,w=e.color.get("alpha");return y?Math.round(w*(y.offsetWidth-o.value.offsetWidth/2)/100):0}function u(){if(!o.value)return 0;const y=l.vnode.el;if(!e.vertical)return 0;const w=e.color.get("alpha");return y?Math.round(w*(y.offsetHeight-o.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:y,g:w,b:x}=e.color.toRgb();return`linear-gradient(to right, rgba(${y}, ${w}, ${x}, 0) 0%, rgba(${y}, ${w}, ${x}, 1) 100%)`}return""}function h(){a.value=d(),i.value=u(),c.value=p()}ft(()=>{if(!t.value||!o.value)return;const y={drag:w=>{r(w)},end:w=>{r(w)}};Lc(t.value,y),Lc(o.value,y),h()}),Se(()=>e.color.get("alpha"),()=>h()),Se(()=>e.color.value,()=>h());const v=C(()=>[n.b(),n.is("vertical",e.vertical)]),m=C(()=>n.e("bar")),f=C(()=>n.e("thumb")),_=C(()=>({background:c.value})),g=C(()=>({left:mo(a.value),top:mo(i.value)}));return{rootKls:v,barKls:m,barStyle:_,thumbKls:f,thumbStyle:g,update:h}},IX=N({...N({name:"ElColorAlphaSlider"}),props:MX,setup(e,{expose:t}){const o=e,{bar:r,thumb:l,handleDrag:n,handleClick:a}=AX(o),{rootKls:i,barKls:c,barStyle:d,thumbKls:u,thumbStyle:p,update:h}=zX(o,{bar:r,thumb:l,handleDrag:n});return t({update:h,bar:r,thumb:l}),(v,m)=>(b(),M("div",{class:O(s(i))},[E("div",{ref_key:"bar",ref:r,class:O(s(c)),style:Je(s(d)),onClick:m[0]||(m[0]=(...f)=>s(a)&&s(a)(...f))},null,6),E("div",{ref_key:"thumb",ref:l,class:O(s(u)),style:Je(s(p))},null,6)],2))}});var OX=Le(IX,[["__file","alpha-slider.vue"]]);const NX=N({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=ze("color-hue-slider"),o=wt(),r=D(),l=D(),n=D(0),a=D(0),i=C(()=>e.color.get("hue"));Se(()=>i.value,()=>{h()});function c(v){v.target!==r.value&&d(v)}function d(v){if(!l.value||!r.value)return;const f=o.vnode.el.getBoundingClientRect(),{clientX:_,clientY:g}=R0(v);let y;if(e.vertical){let w=g-f.top;w=Math.min(w,f.height-r.value.offsetHeight/2),w=Math.max(r.value.offsetHeight/2,w),y=Math.round((w-r.value.offsetHeight/2)/(f.height-r.value.offsetHeight)*360)}else{let w=_-f.left;w=Math.min(w,f.width-r.value.offsetWidth/2),w=Math.max(r.value.offsetWidth/2,w),y=Math.round((w-r.value.offsetWidth/2)/(f.width-r.value.offsetWidth)*360)}e.color.set("hue",y)}function u(){if(!r.value)return 0;const v=o.vnode.el;if(e.vertical)return 0;const m=e.color.get("hue");return v?Math.round(m*(v.offsetWidth-r.value.offsetWidth/2)/360):0}function p(){if(!r.value)return 0;const v=o.vnode.el;if(!e.vertical)return 0;const m=e.color.get("hue");return v?Math.round(m*(v.offsetHeight-r.value.offsetHeight/2)/360):0}function h(){n.value=u(),a.value=p()}return ft(()=>{if(!l.value||!r.value)return;const v={drag:m=>{d(m)},end:m=>{d(m)}};Lc(l.value,v),Lc(r.value,v),h()}),{bar:l,thumb:r,thumbLeft:n,thumbTop:a,hueValue:i,handleClick:c,update:h,ns:t}}});function PX(e,t,o,r,l,n){return b(),M("div",{class:O([e.ns.b(),e.ns.is("vertical",e.vertical)])},[E("div",{ref:"bar",class:O(e.ns.e("bar")),onClick:t[0]||(t[0]=(...a)=>e.handleClick&&e.handleClick(...a))},null,2),E("div",{ref:"thumb",class:O(e.ns.e("thumb")),style:Je({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var RX=Le(NX,[["render",PX],["__file","hue-slider.vue"]]);const LX=Pe({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Oo,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},teleported:Uo.teleported,predefine:{type:ue(Array)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),BX={[St]:e=>ut(e)||jo(e),[ro]:e=>ut(e)||jo(e),activeChange:e=>ut(e)||jo(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},Qw=Symbol("colorPickerContextKey"),ey=function(e,t,o){return[e,t*o/((e=(2-t)*o)<1?e:2-e)||0,e/2]},VX=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},DX=function(e){return typeof e=="string"&&e.includes("%")},rs=function(e,t){VX(e)&&(e="100%");const o=DX(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),o&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},ty={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},bp=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),o=e%16;return`${ty[t]||t}${ty[o]||o}`},oy=function({r:e,g:t,b:o}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+o)?"":`#${bp(e)}${bp(t)}${bp(o)}`},Rv={A:10,B:11,C:12,D:13,E:14,F:15},Xa=function(e){return e.length===2?(Rv[e[0].toUpperCase()]||+e[0])*16+(Rv[e[1].toUpperCase()]||+e[1]):Rv[e[1].toUpperCase()]||+e[1]},HX=function(e,t,o){t=t/100,o=o/100;let r=t;const l=Math.max(o,.01);o*=2,t*=o<=1?o:2-o,r*=l<=1?l:2-l;const n=(o+t)/2,a=o===0?2*r/(l+r):2*t/(o+t);return{h:e,s:a*100,v:n*100}},ry=(e,t,o)=>{e=rs(e,255),t=rs(t,255),o=rs(o,255);const r=Math.max(e,t,o),l=Math.min(e,t,o);let n;const a=r,i=r-l,c=r===0?0:i/r;if(r===l)n=0;else{switch(r){case e:{n=(t-o)/i+(t{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,l)),this._value=Math.max(0,Math.min(100,n)),this.doOnChange()};if(t.includes("hsl")){const r=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:l,s:n,v:a}=HX(r[0],r[1],r[2]);o(l,n,a)}}else if(t.includes("hsv")){const r=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3&&o(r[0],r[1],r[2])}else if(t.includes("rgb")){const r=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:l,s:n,v:a}=ry(r[0],r[1],r[2]);o(l,n,a)}}else if(t.includes("#")){const r=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let l,n,a;r.length===3?(l=Xa(r[0]+r[0]),n=Xa(r[1]+r[1]),a=Xa(r[2]+r[2])):(r.length===6||r.length===8)&&(l=Xa(r.slice(0,2)),n=Xa(r.slice(2,4)),a=Xa(r.slice(4,6))),r.length===8?this._alpha=Xa(r.slice(6))/255*100:(r.length===3||r.length===6)&&(this._alpha=100);const{h:i,s:c,v:d}=ry(l,n,a);o(i,c,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:o,_value:r,_alpha:l,format:n}=this;if(this.enableAlpha)switch(n){case"hsl":{const a=ey(t,o/100,r/100);this.value=`hsla(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(o)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${oy(Bc(t,o,r))}${bp(l*255/100)}`;break}default:{const{r:a,g:i,b:c}=Bc(t,o,r);this.value=`rgba(${a}, ${i}, ${c}, ${this.get("alpha")/100})`}}else switch(n){case"hsl":{const a=ey(t,o/100,r/100);this.value=`hsl(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(o)}%, ${Math.round(r)}%)`;break}case"rgb":{const{r:a,g:i,b:c}=Bc(t,o,r);this.value=`rgb(${a}, ${i}, ${c})`;break}default:this.value=oy(Bc(t,o,r))}}}const FX=N({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(e){const t=ze("color-predefine"),{currentColor:o}=Ge(Qw),r=D(n(e.colors,e.color));Se(()=>o.value,a=>{const i=new Vc;i.fromString(a),r.value.forEach(c=>{c.selected=i.compare(c)})}),Go(()=>{r.value=n(e.colors,e.color)});function l(a){e.color.fromString(e.colors[a])}function n(a,i){return a.map(c=>{const d=new Vc;return d.enableAlpha=e.enableAlpha,d.format="rgba",d.fromString(c),d.selected=d.value===i.value,d})}return{rgbaColors:r,handleSelect:l,ns:t}}}),jX=["onClick"];function KX(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.b())},[E("div",{class:O(e.ns.e("colors"))},[(b(!0),M(Qe,null,It(e.rgbaColors,(a,i)=>(b(),M("div",{key:e.colors[i],class:O([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:c=>e.handleSelect(i)},[E("div",{style:Je({backgroundColor:a.value})},null,4)],10,jX))),128))],2)],2)}var UX=Le(FX,[["render",KX],["__file","predefine.vue"]]);const WX=N({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=ze("color-svpanel"),o=wt(),r=D(0),l=D(0),n=D("hsl(0, 100%, 50%)"),a=C(()=>{const d=e.color.get("hue"),u=e.color.get("value");return{hue:d,value:u}});function i(){const d=e.color.get("saturation"),u=e.color.get("value"),p=o.vnode.el,{clientWidth:h,clientHeight:v}=p;l.value=d*h/100,r.value=(100-u)*v/100,n.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function c(d){const p=o.vnode.el.getBoundingClientRect(),{clientX:h,clientY:v}=R0(d);let m=h-p.left,f=v-p.top;m=Math.max(0,m),m=Math.min(m,p.width),f=Math.max(0,f),f=Math.min(f,p.height),l.value=m,r.value=f,e.color.set({saturation:m/p.width*100,value:100-f/p.height*100})}return Se(()=>a.value,()=>{i()}),ft(()=>{Lc(o.vnode.el,{drag:d=>{c(d)},end:d=>{c(d)}}),i()}),{cursorTop:r,cursorLeft:l,background:n,colorValue:a,handleDrag:c,update:i,ns:t}}}),qX=[E("div",null,null,-1)];function YX(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.b()),style:Je({backgroundColor:e.background})},[E("div",{class:O(e.ns.e("white"))},null,2),E("div",{class:O(e.ns.e("black"))},null,2),E("div",{class:O(e.ns.e("cursor")),style:Je({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},qX,6)],6)}var GX=Le(WX,[["render",YX],["__file","sv-panel.vue"]]);const XX=["onKeydown"],ZX=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],JX=N({...N({name:"ElColorPicker"}),props:LX,emits:BX,setup(e,{expose:t,emit:o}){const r=e,{t:l}=Rt(),n=ze("color"),{formItem:a}=sr(),i=So(),c=xr(),{inputId:d,isLabeledByFormItem:u}=bl(r,{formItemContext:a}),p=D(),h=D(),v=D(),m=D(),f=D(),_=D(),{isFocused:g,handleFocus:y,handleBlur:w}=Ud(f,{beforeBlur(Ce){var Ee;return(Ee=m.value)==null?void 0:Ee.isFocusInsideContent(Ce)},afterBlur(){H(!1),U()}}),x=Ce=>{if(c.value)return Re();y(Ce)};let $=!0;const T=Dt(new Vc({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),R=D(!1),P=D(!1),L=D(""),V=C(()=>!r.modelValue&&!P.value?"transparent":Z(T,r.showAlpha)),B=C(()=>!r.modelValue&&!P.value?"":T.value),j=C(()=>u.value?void 0:r.label||r.ariaLabel||l("el.colorpicker.defaultLabel"));Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-color-picker",ref:"https://element-plus.org/en-US/component/color-picker.html"},C(()=>!!r.label));const te=C(()=>u.value?a==null?void 0:a.labelId:void 0),J=C(()=>[n.b("picker"),n.is("disabled",c.value),n.bm("picker",i.value),n.is("focused",g.value)]);function Z(Ce,Ee){if(!(Ce instanceof Vc))throw new TypeError("color should be instance of _color Class");const{r:De,g:ae,b:pe}=Ce.toRgb();return Ee?`rgba(${De}, ${ae}, ${pe}, ${Ce.get("alpha")/100})`:`rgb(${De}, ${ae}, ${pe})`}function H(Ce){R.value=Ce}const F=Mr(H,100,{leading:!0});function K(){c.value||H(!0)}function I(){F(!1),U()}function U(){et(()=>{r.modelValue?T.fromString(r.modelValue):(T.value="",et(()=>{P.value=!1}))})}function oe(){c.value||F(!R.value)}function ne(){T.fromString(L.value)}function ce(){const Ce=T.value;o(St,Ce),o("change",Ce),r.validateEvent&&(a==null||a.validate("change").catch(Ee=>void 0)),F(!1),et(()=>{const Ee=new Vc({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});T.compare(Ee)||U()})}function Q(){F(!1),o(St,null),o("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(Ce=>void 0)),U()}function Me(Ce){if(R.value&&(I(),g.value)){const Ee=new FocusEvent("focus",Ce);w(Ee)}}function de(Ce){Ce.preventDefault(),Ce.stopPropagation(),H(!1),U()}function _e(Ce){switch(Ce.code){case lt.enter:case lt.space:Ce.preventDefault(),Ce.stopPropagation(),K(),_.value.focus();break;case lt.esc:de(Ce);break}}function me(){f.value.focus()}function Re(){f.value.blur()}return ft(()=>{r.modelValue&&(L.value=B.value)}),Se(()=>r.modelValue,Ce=>{Ce?Ce&&Ce!==T.value&&($=!1,T.fromString(Ce)):P.value=!1}),Se(()=>B.value,Ce=>{L.value=Ce,$&&o("activeChange",Ce),$=!0}),Se(()=>T.value,()=>{!r.modelValue&&!P.value&&(P.value=!0)}),Se(()=>R.value,()=>{et(()=>{var Ce,Ee,De;(Ce=p.value)==null||Ce.update(),(Ee=h.value)==null||Ee.update(),(De=v.value)==null||De.update()})}),zt(Qw,{currentColor:B}),t({color:T,show:K,hide:I,focus:me,blur:Re}),(Ce,Ee)=>(b(),he(s(ur),{ref_key:"popper",ref:m,visible:R.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[s(n).be("picker","panel"),s(n).b("dropdown"),Ce.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:Ce.teleported,transition:`${s(n).namespace.value}-zoom-in-top`,persistent:"",onHide:Ee[2]||(Ee[2]=De=>H(!1))},{content:le(()=>[mt((b(),M("div",{onKeydown:Gt(de,["esc"])},[E("div",{class:O(s(n).be("dropdown","main-wrapper"))},[ee(RX,{ref_key:"hue",ref:p,class:"hue-slider",color:s(T),vertical:""},null,8,["color"]),ee(GX,{ref_key:"sv",ref:h,color:s(T)},null,8,["color"])],2),Ce.showAlpha?(b(),he(OX,{key:0,ref_key:"alpha",ref:v,color:s(T)},null,8,["color"])):se("v-if",!0),Ce.predefine?(b(),he(UX,{key:1,ref:"predefine","enable-alpha":Ce.showAlpha,color:s(T),colors:Ce.predefine},null,8,["enable-alpha","color","colors"])):se("v-if",!0),E("div",{class:O(s(n).be("dropdown","btns"))},[E("span",{class:O(s(n).be("dropdown","value"))},[ee(s(cr),{ref_key:"inputRef",ref:_,modelValue:L.value,"onUpdate:modelValue":Ee[0]||(Ee[0]=De=>L.value=De),"validate-event":!1,size:"small",onKeyup:Gt(ne,["enter"]),onBlur:ne},null,8,["modelValue","onKeyup"])],2),ee(s(Wo),{class:O(s(n).be("dropdown","link-btn")),text:"",size:"small",onClick:Q},{default:le(()=>[Ct($e(s(l)("el.colorpicker.clear")),1)]),_:1},8,["class"]),ee(s(Wo),{plain:"",size:"small",class:O(s(n).be("dropdown","btn")),onClick:ce},{default:le(()=>[Ct($e(s(l)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,XX)),[[s(xn),Me]])]),default:le(()=>[E("div",Mt({id:s(d),ref_key:"triggerRef",ref:f},Ce.$attrs,{class:s(J),role:"button","aria-label":s(j),"aria-labelledby":s(te),"aria-description":s(l)("el.colorpicker.description",{color:Ce.modelValue||""}),"aria-disabled":s(c),tabindex:s(c)?-1:Ce.tabindex,onKeydown:_e,onFocus:x,onBlur:Ee[1]||(Ee[1]=(...De)=>s(w)&&s(w)(...De))}),[s(c)?(b(),M("div",{key:0,class:O(s(n).be("picker","mask"))},null,2)):se("v-if",!0),E("div",{class:O(s(n).be("picker","trigger")),onClick:oe},[E("span",{class:O([s(n).be("picker","color"),s(n).is("alpha",Ce.showAlpha)])},[E("span",{class:O(s(n).be("picker","color-inner")),style:Je({backgroundColor:s(V)})},[mt(ee(s(Ze),{class:O([s(n).be("picker","icon"),s(n).is("icon-arrow-down")])},{default:le(()=>[ee(s(Pl))]),_:1},8,["class"]),[[Lt,Ce.modelValue||P.value]]),mt(ee(s(Ze),{class:O([s(n).be("picker","empty"),s(n).is("icon-close")])},{default:le(()=>[ee(s(Jr))]),_:1},8,["class"]),[[Lt,!Ce.modelValue&&!P.value]])],6)],2)],2)],16,ZX)]),_:1},8,["visible","popper-class","teleported","transition"]))}});var QX=Le(JX,[["__file","color-picker.vue"]]);const eZ=yt(QX),tZ=N({...N({name:"ElContainer"}),props:{direction:{type:String}},setup(e){const t=e,o=Do(),r=ze("container"),l=C(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:o&&o.default?o.default().some(a=>{const i=a.type.name;return i==="ElHeader"||i==="ElFooter"}):!1);return(n,a)=>(b(),M("section",{class:O([s(r).b(),s(r).is("vertical",s(l))])},[be(n.$slots,"default")],2))}});var oZ=Le(tZ,[["__file","container.vue"]]);const rZ=N({...N({name:"ElAside"}),props:{width:{type:String,default:null}},setup(e){const t=e,o=ze("aside"),r=C(()=>t.width?o.cssVarBlock({width:t.width}):{});return(l,n)=>(b(),M("aside",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ly=Le(rZ,[["__file","aside.vue"]]);const lZ=N({...N({name:"ElFooter"}),props:{height:{type:String,default:null}},setup(e){const t=e,o=ze("footer"),r=C(()=>t.height?o.cssVarBlock({height:t.height}):{});return(l,n)=>(b(),M("footer",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ny=Le(lZ,[["__file","footer.vue"]]);const nZ=N({...N({name:"ElHeader"}),props:{height:{type:String,default:null}},setup(e){const t=e,o=ze("header"),r=C(()=>t.height?o.cssVarBlock({height:t.height}):{});return(l,n)=>(b(),M("header",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ay=Le(nZ,[["__file","header.vue"]]);const aZ=N({...N({name:"ElMain"}),setup(e){const t=ze("main");return(o,r)=>(b(),M("main",{class:O(s(t).b())},[be(o.$slots,"default")],2))}});var iy=Le(aZ,[["__file","main.vue"]]);const iZ=yt(oZ,{Aside:ly,Footer:ny,Header:ay,Main:iy}),sZ=co(ly),cZ=co(ny),uZ=co(ay),dZ=co(iy);var sy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){var l=r.prototype,n=l.format;l.format=function(a){var i=this,c=this.$locale();if(!this.isValid())return n.bind(this)(a);var d=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return c.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return c.ordinal(i.week(),"W");case"w":case"ww":return d.s(i.week(),p==="w"?1:2,"0");case"W":case"WW":return d.s(i.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return d.s(String(i.$H===0?24:i.$H),p==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return p}});return n.bind(this)(u)}}})})(sy);var pZ=sy.exports;const fZ=cl(pZ);var cy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){var o="week",r="year";return function(l,n,a){var i=n.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=a(this).startOf(r).add(1,r).date(d),p=a(this).endOf(o);if(u.isBefore(p))return 1}var h=a(this).startOf(r).date(d).startOf(o).subtract(1,"millisecond"),v=this.diff(h,o,!0);return v<0?a(this).startOf("week").week():Math.ceil(v)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(cy);var hZ=cy.exports;const vZ=cl(hZ);var uy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.weekYear=function(){var l=this.month(),n=this.week(),a=this.year();return n===1&&l===11?a+1:l===0&&n>=52?a-1:a}}})})(uy);var mZ=uy.exports;const gZ=cl(mZ);var dy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r,l){r.prototype.dayOfYear=function(n){var a=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return n==null?a:this.add(n-a,"day")}}})})(dy);var bZ=dy.exports;const _Z=cl(bZ);var py={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.isSameOrAfter=function(l,n){return this.isSame(l,n)||this.isAfter(l,n)}}})})(py);var wZ=py.exports;const yZ=cl(wZ);var fy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.isSameOrBefore=function(l,n){return this.isSame(l,n)||this.isBefore(l,n)}}})})(fy);var xZ=fy.exports;const kZ=cl(xZ),Lv=Symbol(),CZ=Pe({...wv,type:{type:ue(String),default:"date"}}),SZ=["date","dates","year","years","month","week","range"],Bv=Pe({disabledDate:{type:ue(Function)},date:{type:ue(Object),required:!0},minDate:{type:ue(Object)},maxDate:{type:ue(Object)},parsedValue:{type:ue([Object,Array])},rangeState:{type:ue(Object),default:()=>({endDate:null,selecting:!1})}}),hy=Pe({type:{type:ue(String),required:!0,values:nF},dateFormat:String,timeFormat:String}),vy=Pe({unlinkPanels:Boolean,parsedValue:{type:ue(Array)}}),Vv=e=>({type:String,values:SZ,default:e}),EZ=Pe({...hy,parsedValue:{type:ue([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),TZ=Pe({...Bv,cellClassName:{type:ue(Function)},showWeekNumber:Boolean,selectionMode:Vv("date")}),$Z=["changerange","pick","select"],Dv=e=>{if(!Ke(e))return!1;const[t,o]=e;return kt.isDayjs(t)&&kt.isDayjs(o)&&t.isSameOrBefore(o)},my=(e,{lang:t,unit:o,unlinkPanels:r})=>{let l;if(Ke(e)){let[n,a]=e.map(i=>kt(i).locale(t));return r||(a=n.add(1,o)),[n,a]}else e?l=kt(e):l=kt();return l=l.locale(t),[l,l.add(1,o)]},MZ=(e,t,{columnIndexOffset:o,startDate:r,nextEndDate:l,now:n,unit:a,relativeDateGetter:i,setCellMetadata:c,setRowMetadata:d})=>{for(let u=0;u["normal","today"].includes(e),AZ=(e,t)=>{const{lang:o}=Rt(),r=D(),l=D(),n=D(),a=D(),i=D([[],[],[],[],[],[]]);let c=!1;const d=e.date.$locale().weekStart||7,u=e.date.locale("en").localeData().weekdaysShort().map(I=>I.toLowerCase()),p=C(()=>d>3?7-d:-d),h=C(()=>{const I=e.date.startOf("month");return I.subtract(I.day()||7,"day")}),v=C(()=>u.concat(u).slice(d,d+7)),m=C(()=>P_(s(x)).some(I=>I.isCurrent)),f=C(()=>{const I=e.date.startOf("month"),U=I.day()||7,oe=I.daysInMonth(),ne=I.subtract(1,"month").daysInMonth();return{startOfMonthDay:U,dateCountOfMonth:oe,dateCountOfLastMonth:ne}}),_=C(()=>e.selectionMode==="dates"?Lr(e.parsedValue):[]),g=(I,{count:U,rowIndex:oe,columnIndex:ne})=>{const{startOfMonthDay:ce,dateCountOfMonth:Q,dateCountOfLastMonth:Me}=s(f),de=s(p);if(oe>=0&&oe<=1){const _e=ce+de<0?7+ce+de:ce+de;if(ne+oe*7>=_e)return I.text=U,!0;I.text=Me-(_e-ne%7)+1+oe*7,I.type="prev-month"}else return U<=Q?I.text=U:(I.text=U-Q,I.type="next-month"),!0;return!1},y=(I,{columnIndex:U,rowIndex:oe},ne)=>{const{disabledDate:ce,cellClassName:Q}=e,Me=s(_),de=g(I,{count:ne,rowIndex:oe,columnIndex:U}),_e=I.dayjs.toDate();return I.selected=Me.find(me=>me.isSame(I.dayjs,"day")),I.isSelected=!!I.selected,I.isCurrent=T(I),I.disabled=ce==null?void 0:ce(_e),I.customClass=Q==null?void 0:Q(_e),de},w=I=>{if(e.selectionMode==="week"){const[U,oe]=e.showWeekNumber?[1,7]:[0,6],ne=K(I[U+1]);I[U].inRange=ne,I[U].start=ne,I[oe].inRange=ne,I[oe].end=ne}},x=C(()=>{const{minDate:I,maxDate:U,rangeState:oe,showWeekNumber:ne}=e,ce=s(p),Q=s(i),Me="day";let de=1;if(ne)for(let _e=0;_e<6;_e++)Q[_e][0]||(Q[_e][0]={type:"week",text:s(h).add(_e*7+1,Me).week()});return MZ({row:6,column:7},Q,{startDate:I,columnIndexOffset:ne?1:0,nextEndDate:oe.endDate||U||oe.selecting&&I||null,now:kt().locale(s(o)).startOf(Me),unit:Me,relativeDateGetter:_e=>s(h).add(_e-ce,Me),setCellMetadata:(..._e)=>{y(..._e,de)&&(de+=1)},setRowMetadata:w}),Q});Se(()=>e.date,async()=>{var I;(I=s(r))!=null&&I.contains(document.activeElement)&&(await et(),await $())});const $=async()=>{var I;return(I=s(l))==null?void 0:I.focus()},T=I=>e.selectionMode==="date"&&Hv(I.type)&&R(I,e.parsedValue),R=(I,U)=>U?kt(U).locale(s(o)).isSame(e.date.date(Number(I.text)),"day"):!1,P=(I,U)=>{const oe=I*7+(U-(e.showWeekNumber?1:0))-s(p);return s(h).add(oe,"day")},L=I=>{var U;if(!e.rangeState.selecting)return;let oe=I.target;if(oe.tagName==="SPAN"&&(oe=(U=oe.parentNode)==null?void 0:U.parentNode),oe.tagName==="DIV"&&(oe=oe.parentNode),oe.tagName!=="TD")return;const ne=oe.parentNode.rowIndex-1,ce=oe.cellIndex;s(x)[ne][ce].disabled||(ne!==s(n)||ce!==s(a))&&(n.value=ne,a.value=ce,t("changerange",{selecting:!0,endDate:P(ne,ce)}))},V=I=>!s(m)&&(I==null?void 0:I.text)===1&&I.type==="normal"||I.isCurrent,B=I=>{c||s(m)||e.selectionMode!=="date"||F(I,!0)},j=I=>{I.target.closest("td")&&(c=!0)},te=I=>{I.target.closest("td")&&(c=!1)},J=I=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:I,maxDate:null}),t("select",!0)):(I>=e.minDate?t("pick",{minDate:e.minDate,maxDate:I}):t("pick",{minDate:I,maxDate:e.minDate}),t("select",!1))},Z=I=>{const U=I.week(),oe=`${I.year()}w${U}`;t("pick",{year:I.year(),week:U,value:oe,date:I.startOf("week")})},H=(I,U)=>{const oe=U?Lr(e.parsedValue).filter(ne=>(ne==null?void 0:ne.valueOf())!==I.valueOf()):Lr(e.parsedValue).concat([I]);t("pick",oe)},F=(I,U=!1)=>{const oe=I.target.closest("td");if(!oe)return;const ne=oe.parentNode.rowIndex-1,ce=oe.cellIndex,Q=s(x)[ne][ce];if(Q.disabled||Q.type==="week")return;const Me=P(ne,ce);switch(e.selectionMode){case"range":{J(Me);break}case"date":{t("pick",Me,U);break}case"week":{Z(Me);break}case"dates":{H(Me,!!Q.selected);break}}},K=I=>{if(e.selectionMode!=="week")return!1;let U=e.date.startOf("day");if(I.type==="prev-month"&&(U=U.subtract(1,"month")),I.type==="next-month"&&(U=U.add(1,"month")),U=U.date(Number.parseInt(I.text,10)),e.parsedValue&&!Array.isArray(e.parsedValue)){const oe=(e.parsedValue.day()-d+7)%7-1;return e.parsedValue.subtract(oe,"day").isSame(U,"day")}return!1};return{WEEKS:v,rows:x,tbodyRef:r,currentCellRef:l,focus:$,isCurrent:T,isWeekActive:K,isSelectedCell:V,handlePickDate:F,handleMouseUp:te,handleMouseDown:j,handleMouseMove:L,handleFocus:B}},zZ=(e,{isCurrent:t,isWeekActive:o})=>{const r=ze("date-table"),{t:l}=Rt(),n=C(()=>[r.b(),{"is-week-mode":e.selectionMode==="week"}]),a=C(()=>l("el.datepicker.dateTablePrompt")),i=C(()=>l("el.datepicker.week"));return{tableKls:n,tableLabel:a,weekLabel:i,getCellClasses:u=>{const p=[];return Hv(u.type)&&!u.disabled?(p.push("available"),u.type==="today"&&p.push("today")):p.push(u.type),t(u)&&p.push("current"),u.inRange&&(Hv(u.type)||e.selectionMode==="week")&&(p.push("in-range"),u.start&&p.push("start-date"),u.end&&p.push("end-date")),u.disabled&&p.push("disabled"),u.selected&&p.push("selected"),u.customClass&&p.push(u.customClass),p.join(" ")},getRowKls:u=>[r.e("row"),{current:o(u)}],t:l}},IZ=Pe({cell:{type:ue(Object)}});var OZ=N({name:"ElDatePickerCell",props:IZ,setup(e){const t=ze("date-table-cell"),{slots:o}=Ge(Lv);return()=>{const{cell:r}=e;return be(o,"default",{...r},()=>[ee("div",{class:t.b()},[ee("span",{class:t.e("text")},[r==null?void 0:r.text])])])}}});const NZ=["aria-label"],PZ={key:0,scope:"col"},RZ=["aria-label"],LZ=["aria-current","aria-selected","tabindex"];var Fv=Le(N({__name:"basic-date-table",props:TZ,emits:$Z,setup(e,{expose:t,emit:o}){const r=e,{WEEKS:l,rows:n,tbodyRef:a,currentCellRef:i,focus:c,isCurrent:d,isWeekActive:u,isSelectedCell:p,handlePickDate:h,handleMouseUp:v,handleMouseDown:m,handleMouseMove:f,handleFocus:_}=AZ(r,o),{tableLabel:g,tableKls:y,weekLabel:w,getCellClasses:x,getRowKls:$,t:T}=zZ(r,{isCurrent:d,isWeekActive:u});return t({focus:c}),(R,P)=>(b(),M("table",{"aria-label":s(g),class:O(s(y)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:P[1]||(P[1]=(...L)=>s(h)&&s(h)(...L)),onMousemove:P[2]||(P[2]=(...L)=>s(f)&&s(f)(...L)),onMousedown:P[3]||(P[3]=ct((...L)=>s(m)&&s(m)(...L),["prevent"])),onMouseup:P[4]||(P[4]=(...L)=>s(v)&&s(v)(...L))},[E("tbody",{ref_key:"tbodyRef",ref:a},[E("tr",null,[R.showWeekNumber?(b(),M("th",PZ,$e(s(w)),1)):se("v-if",!0),(b(!0),M(Qe,null,It(s(l),(L,V)=>(b(),M("th",{key:V,"aria-label":s(T)("el.datepicker.weeksFull."+L),scope:"col"},$e(s(T)("el.datepicker.weeks."+L)),9,RZ))),128))]),(b(!0),M(Qe,null,It(s(n),(L,V)=>(b(),M("tr",{key:V,class:O(s($)(L[1]))},[(b(!0),M(Qe,null,It(L,(B,j)=>(b(),M("td",{key:`${V}.${j}`,ref_for:!0,ref:te=>s(p)(B)&&(i.value=te),class:O(s(x)(B)),"aria-current":B.isCurrent?"date":void 0,"aria-selected":B.isCurrent,tabindex:s(p)(B)?0:-1,onFocus:P[0]||(P[0]=(...te)=>s(_)&&s(_)(...te))},[ee(s(OZ),{cell:B},null,8,["cell"])],42,LZ))),128))],2))),128))],512)],42,NZ))}}),[["__file","basic-date-table.vue"]]);const BZ=Pe({...Bv,selectionMode:Vv("month")}),VZ=["aria-label"],DZ=["aria-selected","aria-label","tabindex","onKeydown"],HZ={class:"cell"};var jv=Le(N({__name:"basic-month-table",props:BZ,emits:["changerange","pick","select"],setup(e,{expose:t,emit:o}){const r=e,l=(x,$,T)=>{const R=kt().locale(T).startOf("month").month($).year(x),P=R.daysInMonth();return aa(P).map(L=>R.add(L,"day").toDate())},n=ze("month-table"),{t:a,lang:i}=Rt(),c=D(),d=D(),u=D(r.date.locale("en").localeData().monthsShort().map(x=>x.toLowerCase())),p=D([[],[],[]]),h=D(),v=D(),m=C(()=>{var x,$;const T=p.value,R=kt().locale(i.value).startOf("month");for(let P=0;P<3;P++){const L=T[P];for(let V=0;V<4;V++){const B=L[V]||(L[V]={row:P,column:V,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});B.type="normal";const j=P*4+V,te=r.date.startOf("year").month(j),J=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;B.inRange=!!(r.minDate&&te.isSameOrAfter(r.minDate,"month")&&J&&te.isSameOrBefore(J,"month"))||!!(r.minDate&&te.isSameOrBefore(r.minDate,"month")&&J&&te.isSameOrAfter(J,"month")),(x=r.minDate)!=null&&x.isSameOrAfter(J)?(B.start=!!(J&&te.isSame(J,"month")),B.end=r.minDate&&te.isSame(r.minDate,"month")):(B.start=!!(r.minDate&&te.isSame(r.minDate,"month")),B.end=!!(J&&te.isSame(J,"month"))),R.isSame(te)&&(B.type="today"),B.text=j,B.disabled=(($=r.disabledDate)==null?void 0:$.call(r,te.toDate()))||!1}}return T}),f=()=>{var x;(x=d.value)==null||x.focus()},_=x=>{const $={},T=r.date.year(),R=new Date,P=x.text;return $.disabled=r.disabledDate?l(T,P,i.value).every(r.disabledDate):!1,$.current=Lr(r.parsedValue).findIndex(L=>kt.isDayjs(L)&&L.year()===T&&L.month()===P)>=0,$.today=R.getFullYear()===T&&R.getMonth()===P,x.inRange&&($["in-range"]=!0,x.start&&($["start-date"]=!0),x.end&&($["end-date"]=!0)),$},g=x=>{const $=r.date.year(),T=x.text;return Lr(r.date).findIndex(R=>R.year()===$&&R.month()===T)>=0},y=x=>{var $;if(!r.rangeState.selecting)return;let T=x.target;if(T.tagName==="SPAN"&&(T=($=T.parentNode)==null?void 0:$.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const R=T.parentNode.rowIndex,P=T.cellIndex;m.value[R][P].disabled||(R!==h.value||P!==v.value)&&(h.value=R,v.value=P,o("changerange",{selecting:!0,endDate:r.date.startOf("year").month(R*4+P)}))},w=x=>{var $;const T=($=x.target)==null?void 0:$.closest("td");if((T==null?void 0:T.tagName)!=="TD"||Xr(T,"disabled"))return;const R=T.cellIndex,L=T.parentNode.rowIndex*4+R,V=r.date.startOf("year").month(L);r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&V>=r.minDate?o("pick",{minDate:r.minDate,maxDate:V}):o("pick",{minDate:V,maxDate:r.minDate}),o("select",!1)):(o("pick",{minDate:V,maxDate:null}),o("select",!0)):o("pick",L)};return Se(()=>r.date,async()=>{var x,$;(x=c.value)!=null&&x.contains(document.activeElement)&&(await et(),($=d.value)==null||$.focus())}),t({focus:f}),(x,$)=>(b(),M("table",{role:"grid","aria-label":s(a)("el.datepicker.monthTablePrompt"),class:O(s(n).b()),onClick:w,onMousemove:y},[E("tbody",{ref_key:"tbodyRef",ref:c},[(b(!0),M(Qe,null,It(s(m),(T,R)=>(b(),M("tr",{key:R},[(b(!0),M(Qe,null,It(T,(P,L)=>(b(),M("td",{key:L,ref_for:!0,ref:V=>g(P)&&(d.value=V),class:O(_(P)),"aria-selected":`${g(P)}`,"aria-label":s(a)(`el.datepicker.month${+P.text+1}`),tabindex:g(P)?0:-1,onKeydown:[Gt(ct(w,["prevent","stop"]),["space"]),Gt(ct(w,["prevent","stop"]),["enter"])]},[E("div",null,[E("span",HZ,$e(s(a)("el.datepicker.months."+u.value[P.text])),1)])],42,DZ))),128))]))),128))],512)],42,VZ))}}),[["__file","basic-month-table.vue"]]);const{date:FZ,disabledDate:jZ,parsedValue:KZ}=Bv,UZ=Pe({date:FZ,disabledDate:jZ,parsedValue:KZ,selectionMode:Vv("year")}),WZ=["aria-label"],qZ=["aria-selected","tabindex","onKeydown"],YZ={class:"cell"},GZ={key:1};var XZ=Le(N({__name:"basic-year-table",props:UZ,emits:["pick"],setup(e,{expose:t,emit:o}){const r=e,l=(f,_)=>{const g=kt(String(f)).locale(_).startOf("year"),w=g.endOf("year").dayOfYear();return aa(w).map(x=>g.add(x,"day").toDate())},n=ze("year-table"),{t:a,lang:i}=Rt(),c=D(),d=D(),u=C(()=>Math.floor(r.date.year()/10)*10),p=()=>{var f;(f=d.value)==null||f.focus()},h=f=>{const _={},g=kt().locale(i.value);return _.disabled=r.disabledDate?l(f,i.value).every(r.disabledDate):!1,_.current=Lr(r.parsedValue).findIndex(y=>y.year()===f)>=0,_.today=g.year()===f,_},v=f=>f===u.value&&r.date.year()u.value+9||Lr(r.date).findIndex(_=>_.year()===f)>=0||Lr(r.parsedValue).findIndex(_=>(_==null?void 0:_.year())===f)>=0,m=f=>{const g=f.target.closest("td");if(g&&g.textContent){if(Xr(g,"disabled"))return;const y=g.textContent||g.innerText;if(r.selectionMode==="years"){if(f.type==="keydown"){o("pick",Lr(r.parsedValue),!1);return}const w=Xr(g,"current")?Lr(r.parsedValue).filter(x=>(x==null?void 0:x.year())!==Number(y)):Lr(r.parsedValue).concat([kt(y)]);o("pick",w)}else o("pick",Number(y))}};return Se(()=>r.date,async()=>{var f,_;(f=c.value)!=null&&f.contains(document.activeElement)&&(await et(),(_=d.value)==null||_.focus())}),t({focus:p}),(f,_)=>(b(),M("table",{role:"grid","aria-label":s(a)("el.datepicker.yearTablePrompt"),class:O(s(n).b()),onClick:m},[E("tbody",{ref_key:"tbodyRef",ref:c},[(b(),M(Qe,null,It(3,(g,y)=>E("tr",{key:y},[(b(),M(Qe,null,It(4,(w,x)=>(b(),M(Qe,{key:y+"_"+x},[y*4+x<10?(b(),M("td",{key:0,ref_for:!0,ref:$=>v(s(u)+y*4+x)&&(d.value=$),class:O(["available",h(s(u)+y*4+x)]),"aria-selected":`${v(s(u)+y*4+x)}`,tabindex:v(s(u)+y*4+x)?0:-1,onKeydown:[Gt(ct(m,["prevent","stop"]),["space"]),Gt(ct(m,["prevent","stop"]),["enter"])]},[E("div",null,[E("span",YZ,$e(s(u)+y*4+x),1)])],42,qZ)):(b(),M("td",GZ))],64))),64))])),64))],512)],10,WZ))}}),[["__file","basic-year-table.vue"]]);const ZZ=["onClick"],JZ=["aria-label"],QZ=["aria-label"],eJ=["aria-label"],tJ=["aria-label"];var oJ=Le(N({__name:"panel-date-pick",props:EZ,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const o=e,r=(S,A,G)=>!0,l=ze("picker-panel"),n=ze("date-picker"),a=ya(),i=Do(),{t:c,lang:d}=Rt(),u=Ge("EP_PICKER_BASE"),p=Ge(rp),{shortcuts:h,disabledDate:v,cellClassName:m,defaultTime:f}=u.props,_=Yt(u.props,"defaultValue"),g=D(),y=D(kt().locale(d.value)),w=D(!1);let x=!1;const $=C(()=>kt(f).locale(d.value)),T=C(()=>y.value.month()),R=C(()=>y.value.year()),P=D([]),L=D(null),V=D(null),B=S=>P.value.length>0?r(S,P.value,o.format||"HH:mm:ss"):!0,j=S=>f&&!pe.value&&!w.value&&!x?$.value.year(S.year()).month(S.month()).date(S.date()):de.value?S.millisecond(0):S.startOf("day"),te=(S,...A)=>{if(!S)t("pick",S,...A);else if(Ke(S)){const G=S.map(j);t("pick",G,...A)}else t("pick",j(S),...A);L.value=null,V.value=null,w.value=!1,x=!1},J=async(S,A)=>{if(U.value==="date"){S=S;let G=o.parsedValue?o.parsedValue.year(S.year()).month(S.month()).date(S.date()):S;B(G)||(G=P.value[0][0].year(S.year()).month(S.month()).date(S.date())),y.value=G,te(G,de.value||A),o.type==="datetime"&&(await et(),tt())}else U.value==="week"?te(S.date):U.value==="dates"&&te(S,!0)},Z=S=>{const A=S?"add":"subtract";y.value=y.value[A](1,"month"),Y("month")},H=S=>{const A=y.value,G=S?"add":"subtract";y.value=F.value==="year"?A[G](10,"year"):A[G](1,"year"),Y("year")},F=D("date"),K=C(()=>{const S=c("el.datepicker.year");if(F.value==="year"){const A=Math.floor(R.value/10)*10;return S?`${A} ${S} - ${A+9} ${S}`:`${A} - ${A+9}`}return`${R.value} ${S}`}),I=S=>{const A=it(S.value)?S.value():S.value;if(A){x=!0,te(kt(A).locale(d.value));return}S.onClick&&S.onClick({attrs:a,slots:i,emit:t})},U=C(()=>{const{type:S}=o;return["week","month","year","years","dates"].includes(S)?S:"date"}),oe=C(()=>U.value==="date"?F.value:U.value),ne=C(()=>!!h.length),ce=async S=>{y.value=y.value.startOf("month").month(S),U.value==="month"?te(y.value,!1):(F.value="date",["month","year","date","week"].includes(U.value)&&(te(y.value,!0),await et(),tt())),Y("month")},Q=async(S,A)=>{U.value==="year"?(y.value=y.value.startOf("year").year(S),te(y.value,!1)):U.value==="years"?te(S,A??!0):(y.value=y.value.year(S),F.value="month",["month","year","date","week"].includes(U.value)&&(te(y.value,!0),await et(),tt())),Y("year")},Me=async S=>{F.value=S,await et(),tt()},de=C(()=>o.type==="datetime"||o.type==="datetimerange"),_e=C(()=>{const S=de.value||U.value==="dates",A=U.value==="years",G=F.value==="date",X=F.value==="year";return S&&G||A&&X}),me=C(()=>v?o.parsedValue?Ke(o.parsedValue)?v(o.parsedValue[0].toDate()):v(o.parsedValue.toDate()):!0:!1),Re=()=>{if(U.value==="dates"||U.value==="years")te(o.parsedValue);else{let S=o.parsedValue;if(!S){const A=kt(f).locale(d.value),G=Ye();S=A.year(G.year()).month(G.month()).date(G.date())}y.value=S,te(S)}},Ce=C(()=>v?v(kt().locale(d.value).toDate()):!1),Ee=()=>{const A=kt().locale(d.value).toDate();w.value=!0,(!v||!v(A))&&B(A)&&(y.value=kt().locale(d.value),te(y.value))},De=C(()=>o.timeFormat||ew(o.format)),ae=C(()=>o.dateFormat||Q4(o.format)),pe=C(()=>{if(V.value)return V.value;if(!(!o.parsedValue&&!_.value))return(o.parsedValue||y.value).format(De.value)}),ke=C(()=>{if(L.value)return L.value;if(!(!o.parsedValue&&!_.value))return(o.parsedValue||y.value).format(ae.value)}),Oe=D(!1),we=()=>{Oe.value=!0},Te=()=>{Oe.value=!1},Ne=S=>({hour:S.hour(),minute:S.minute(),second:S.second(),year:S.year(),month:S.month(),date:S.date()}),Ie=(S,A,G)=>{const{hour:X,minute:re,second:ge}=Ne(S),fe=o.parsedValue?o.parsedValue.hour(X).minute(re).second(ge):S;y.value=fe,te(y.value,!0),G||(Oe.value=A)},Ae=S=>{const A=kt(S,De.value).locale(d.value);if(A.isValid()&&B(A)){const{year:G,month:X,date:re}=Ne(y.value);y.value=A.year(G).month(X).date(re),V.value=null,Oe.value=!1,te(y.value,!0)}},xe=S=>{const A=kt(S,ae.value).locale(d.value);if(A.isValid()){if(v&&v(A.toDate()))return;const{hour:G,minute:X,second:re}=Ne(y.value);y.value=A.hour(G).minute(X).second(re),L.value=null,te(y.value,!0)}},We=S=>kt.isDayjs(S)&&S.isValid()&&(v?!v(S.toDate()):!0),qe=S=>Ke(S)?S.map(A=>A.format(o.format)):S.format(o.format),ye=S=>kt(S,o.format).locale(d.value),Ye=()=>{const S=kt(_.value).locale(d.value);if(!_.value){const A=$.value;return kt().hour(A.hour()).minute(A.minute()).second(A.second()).locale(d.value)}return S},tt=async()=>{var S;["week","month","year","date"].includes(U.value)&&((S=g.value)==null||S.focus(),U.value==="week"&&dt(lt.down))},pt=S=>{const{code:A}=S;[lt.up,lt.down,lt.left,lt.right,lt.home,lt.end,lt.pageUp,lt.pageDown].includes(A)&&(dt(A),S.stopPropagation(),S.preventDefault()),[lt.enter,lt.space,lt.numpadEnter].includes(A)&&L.value===null&&V.value===null&&(S.preventDefault(),te(y.value,!1))},dt=S=>{var A;const{up:G,down:X,left:re,right:ge,home:fe,end:Fe,pageUp:at,pageDown:_t}=lt,At={year:{[G]:-4,[X]:4,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setFullYear(bt.getFullYear()+Qt)},month:{[G]:-4,[X]:4,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setMonth(bt.getMonth()+Qt)},week:{[G]:-1,[X]:1,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setDate(bt.getDate()+Qt*7)},date:{[G]:-7,[X]:7,[re]:-1,[ge]:1,[fe]:bt=>-bt.getDay(),[Fe]:bt=>-bt.getDay()+6,[at]:bt=>-new Date(bt.getFullYear(),bt.getMonth(),0).getDate(),[_t]:bt=>new Date(bt.getFullYear(),bt.getMonth()+1,0).getDate(),offset:(bt,Qt)=>bt.setDate(bt.getDate()+Qt)}},no=y.value.toDate();for(;Math.abs(y.value.diff(no,"year",!0))<1;){const bt=At[oe.value];if(!bt)return;if(bt.offset(no,it(bt[S])?bt[S](no):(A=bt[S])!=null?A:0),v&&v(no))break;const Qt=kt(no).locale(d.value);y.value=Qt,t("pick",Qt,!0);break}},Y=S=>{t("panel-change",y.value.toDate(),S,F.value)};return Se(()=>U.value,S=>{if(["month","year"].includes(S)){F.value=S;return}else if(S==="years"){F.value="year";return}F.value="date"},{immediate:!0}),Se(()=>F.value,()=>{p==null||p.updatePopper()}),Se(()=>_.value,S=>{S&&(y.value=Ye())},{immediate:!0}),Se(()=>o.parsedValue,S=>{if(S){if(U.value==="dates"||U.value==="years"||Array.isArray(S))return;y.value=S}else y.value=Ye()},{immediate:!0}),t("set-picker-option",["isValidValue",We]),t("set-picker-option",["formatToString",qe]),t("set-picker-option",["parseUserInput",ye]),t("set-picker-option",["handleFocusPicker",tt]),(S,A)=>(b(),M("div",{class:O([s(l).b(),s(n).b(),{"has-sidebar":S.$slots.sidebar||s(ne),"has-time":s(de)}])},[E("div",{class:O(s(l).e("body-wrapper"))},[be(S.$slots,"sidebar",{class:O(s(l).e("sidebar"))}),s(ne)?(b(),M("div",{key:0,class:O(s(l).e("sidebar"))},[(b(!0),M(Qe,null,It(s(h),(G,X)=>(b(),M("button",{key:X,type:"button",class:O(s(l).e("shortcut")),onClick:re=>I(G)},$e(G.text),11,ZZ))),128))],2)):se("v-if",!0),E("div",{class:O(s(l).e("body"))},[s(de)?(b(),M("div",{key:0,class:O(s(n).e("time-header"))},[E("span",{class:O(s(n).e("editor-wrap"))},[ee(s(cr),{placeholder:s(c)("el.datepicker.selectDate"),"model-value":s(ke),size:"small","validate-event":!1,onInput:A[0]||(A[0]=G=>L.value=G),onChange:xe},null,8,["placeholder","model-value"])],2),mt((b(),M("span",{class:O(s(n).e("editor-wrap"))},[ee(s(cr),{placeholder:s(c)("el.datepicker.selectTime"),"model-value":s(pe),size:"small","validate-event":!1,onFocus:we,onInput:A[1]||(A[1]=G=>V.value=G),onChange:Ae},null,8,["placeholder","model-value"]),ee(s(dp),{visible:Oe.value,format:s(De),"parsed-value":y.value,onPick:Ie},null,8,["visible","format","parsed-value"])],2)),[[s(xn),Te]])],2)):se("v-if",!0),mt(E("div",{class:O([s(n).e("header"),(F.value==="year"||F.value==="month")&&s(n).e("header--bordered")])},[E("span",{class:O(s(n).e("prev-btn"))},[E("button",{type:"button","aria-label":s(c)("el.datepicker.prevYear"),class:O(["d-arrow-left",s(l).e("icon-btn")]),onClick:A[2]||(A[2]=G=>H(!1))},[ee(s(Ze),null,{default:le(()=>[ee(s(Ra))]),_:1})],10,JZ),mt(E("button",{type:"button","aria-label":s(c)("el.datepicker.prevMonth"),class:O([s(l).e("icon-btn"),"arrow-left"]),onClick:A[3]||(A[3]=G=>Z(!1))},[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1})],10,QZ),[[Lt,F.value==="date"]])],2),E("span",{role:"button",class:O(s(n).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:A[4]||(A[4]=Gt(G=>Me("year"),["enter"])),onClick:A[5]||(A[5]=G=>Me("year"))},$e(s(K)),35),mt(E("span",{role:"button","aria-live":"polite",tabindex:"0",class:O([s(n).e("header-label"),{active:F.value==="month"}]),onKeydown:A[6]||(A[6]=Gt(G=>Me("month"),["enter"])),onClick:A[7]||(A[7]=G=>Me("month"))},$e(s(c)(`el.datepicker.month${s(T)+1}`)),35),[[Lt,F.value==="date"]]),E("span",{class:O(s(n).e("next-btn"))},[mt(E("button",{type:"button","aria-label":s(c)("el.datepicker.nextMonth"),class:O([s(l).e("icon-btn"),"arrow-right"]),onClick:A[8]||(A[8]=G=>Z(!0))},[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})],10,eJ),[[Lt,F.value==="date"]]),E("button",{type:"button","aria-label":s(c)("el.datepicker.nextYear"),class:O([s(l).e("icon-btn"),"d-arrow-right"]),onClick:A[9]||(A[9]=G=>H(!0))},[ee(s(Ze),null,{default:le(()=>[ee(s(La))]),_:1})],10,tJ)],2)],2),[[Lt,F.value!=="time"]]),E("div",{class:O(s(l).e("content")),onKeydown:pt},[F.value==="date"?(b(),he(Fv,{key:0,ref_key:"currentViewRef",ref:g,"selection-mode":s(U),date:y.value,"parsed-value":S.parsedValue,"disabled-date":s(v),"cell-class-name":s(m),onPick:J},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):se("v-if",!0),F.value==="year"?(b(),he(XZ,{key:1,ref_key:"currentViewRef",ref:g,"selection-mode":s(U),date:y.value,"disabled-date":s(v),"parsed-value":S.parsedValue,onPick:Q},null,8,["selection-mode","date","disabled-date","parsed-value"])):se("v-if",!0),F.value==="month"?(b(),he(jv,{key:2,ref_key:"currentViewRef",ref:g,date:y.value,"parsed-value":S.parsedValue,"disabled-date":s(v),onPick:ce},null,8,["date","parsed-value","disabled-date"])):se("v-if",!0)],34)],2)],2),mt(E("div",{class:O(s(l).e("footer"))},[mt(ee(s(Wo),{text:"",size:"small",class:O(s(l).e("link-btn")),disabled:s(Ce),onClick:Ee},{default:le(()=>[Ct($e(s(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Lt,s(U)!=="dates"&&s(U)!=="years"]]),ee(s(Wo),{plain:"",size:"small",class:O(s(l).e("link-btn")),disabled:s(me),onClick:Re},{default:le(()=>[Ct($e(s(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Lt,s(_e)]])],2))}}),[["__file","panel-date-pick.vue"]]);const rJ=Pe({...hy,...vy}),lJ=e=>{const{emit:t}=wt(),o=ya(),r=Do();return n=>{const a=it(n.value)?n.value():n.value;if(a){t("pick",[kt(a[0]).locale(e.value),kt(a[1]).locale(e.value)]);return}n.onClick&&n.onClick({attrs:o,slots:r,emit:t})}},gy=(e,{defaultValue:t,leftDate:o,rightDate:r,unit:l,onParsedValueChanged:n})=>{const{emit:a}=wt(),{pickerNs:i}=Ge(Lv),c=ze("date-range-picker"),{t:d,lang:u}=Rt(),p=lJ(u),h=D(),v=D(),m=D({endDate:null,selecting:!1}),f=w=>{m.value=w},_=(w=!1)=>{const x=s(h),$=s(v);Dv([x,$])&&a("pick",[x,$],w)},g=w=>{m.value.selecting=w,w||(m.value.endDate=null)},y=()=>{const[w,x]=my(s(t),{lang:s(u),unit:l,unlinkPanels:e.unlinkPanels});h.value=void 0,v.value=void 0,o.value=w,r.value=x};return Se(t,w=>{w&&y()},{immediate:!0}),Se(()=>e.parsedValue,w=>{if(Ke(w)&&w.length===2){const[x,$]=w;h.value=x,o.value=x,v.value=$,n(s(h),s(v))}else y()},{immediate:!0}),{minDate:h,maxDate:v,rangeState:m,lang:u,ppNs:i,drpNs:c,handleChangeRange:f,handleRangeConfirm:_,handleShortcutClick:p,onSelect:g,t:d}},nJ=["onClick"],aJ=["aria-label"],iJ=["aria-label"],sJ=["disabled","aria-label"],cJ=["disabled","aria-label"],uJ=["disabled","aria-label"],dJ=["disabled","aria-label"],pJ=["aria-label"],fJ=["aria-label"],_p="month";var hJ=Le(N({__name:"panel-date-range",props:rJ,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const o=e,r=Ge("EP_PICKER_BASE"),{disabledDate:l,cellClassName:n,defaultTime:a,clearable:i}=r.props,c=Yt(r.props,"format"),d=Yt(r.props,"shortcuts"),u=Yt(r.props,"defaultValue"),{lang:p}=Rt(),h=D(kt().locale(p.value)),v=D(kt().locale(p.value).add(1,_p)),{minDate:m,maxDate:f,rangeState:_,ppNs:g,drpNs:y,handleChangeRange:w,handleRangeConfirm:x,handleShortcutClick:$,onSelect:T,t:R}=gy(o,{defaultValue:u,leftDate:h,rightDate:v,unit:_p,onParsedValueChanged:A}),P=D({min:null,max:null}),L=D({min:null,max:null}),V=C(()=>`${h.value.year()} ${R("el.datepicker.year")} ${R(`el.datepicker.month${h.value.month()+1}`)}`),B=C(()=>`${v.value.year()} ${R("el.datepicker.year")} ${R(`el.datepicker.month${v.value.month()+1}`)}`),j=C(()=>h.value.year()),te=C(()=>h.value.month()),J=C(()=>v.value.year()),Z=C(()=>v.value.month()),H=C(()=>!!d.value.length),F=C(()=>P.value.min!==null?P.value.min:m.value?m.value.format(ne.value):""),K=C(()=>P.value.max!==null?P.value.max:f.value||m.value?(f.value||m.value).format(ne.value):""),I=C(()=>L.value.min!==null?L.value.min:m.value?m.value.format(oe.value):""),U=C(()=>L.value.max!==null?L.value.max:f.value||m.value?(f.value||m.value).format(oe.value):""),oe=C(()=>o.timeFormat||ew(c.value)),ne=C(()=>o.dateFormat||Q4(c.value)),ce=G=>Dv(G)&&(l?!l(G[0].toDate())&&!l(G[1].toDate()):!0),Q=()=>{h.value=h.value.subtract(1,"year"),o.unlinkPanels||(v.value=h.value.add(1,"month")),De("year")},Me=()=>{h.value=h.value.subtract(1,"month"),o.unlinkPanels||(v.value=h.value.add(1,"month")),De("month")},de=()=>{o.unlinkPanels?v.value=v.value.add(1,"year"):(h.value=h.value.add(1,"year"),v.value=h.value.add(1,"month")),De("year")},_e=()=>{o.unlinkPanels?v.value=v.value.add(1,"month"):(h.value=h.value.add(1,"month"),v.value=h.value.add(1,"month")),De("month")},me=()=>{h.value=h.value.add(1,"year"),De("year")},Re=()=>{h.value=h.value.add(1,"month"),De("month")},Ce=()=>{v.value=v.value.subtract(1,"year"),De("year")},Ee=()=>{v.value=v.value.subtract(1,"month"),De("month")},De=G=>{t("panel-change",[h.value.toDate(),v.value.toDate()],G)},ae=C(()=>{const G=(te.value+1)%12,X=te.value+1>=12?1:0;return o.unlinkPanels&&new Date(j.value+X,G)o.unlinkPanels&&J.value*12+Z.value-(j.value*12+te.value+1)>=12),ke=C(()=>!(m.value&&f.value&&!_.value.selecting&&Dv([m.value,f.value]))),Oe=C(()=>o.type==="datetime"||o.type==="datetimerange"),we=(G,X)=>{if(G)return a?kt(a[X]||a).locale(p.value).year(G.year()).month(G.month()).date(G.date()):G},Te=(G,X=!0)=>{const re=G.minDate,ge=G.maxDate,fe=we(re,0),Fe=we(ge,1);f.value===Fe&&m.value===fe||(t("calendar-change",[re.toDate(),ge&&ge.toDate()]),f.value=Fe,m.value=fe,!(!X||Oe.value)&&x())},Ne=D(!1),Ie=D(!1),Ae=()=>{Ne.value=!1},xe=()=>{Ie.value=!1},We=(G,X)=>{P.value[X]=G;const re=kt(G,ne.value).locale(p.value);if(re.isValid()){if(l&&l(re.toDate()))return;X==="min"?(h.value=re,m.value=(m.value||h.value).year(re.year()).month(re.month()).date(re.date()),!o.unlinkPanels&&(!f.value||f.value.isBefore(m.value))&&(v.value=re.add(1,"month"),f.value=m.value.add(1,"month"))):(v.value=re,f.value=(f.value||v.value).year(re.year()).month(re.month()).date(re.date()),!o.unlinkPanels&&(!m.value||m.value.isAfter(f.value))&&(h.value=re.subtract(1,"month"),m.value=f.value.subtract(1,"month")))}},qe=(G,X)=>{P.value[X]=null},ye=(G,X)=>{L.value[X]=G;const re=kt(G,oe.value).locale(p.value);re.isValid()&&(X==="min"?(Ne.value=!0,m.value=(m.value||h.value).hour(re.hour()).minute(re.minute()).second(re.second())):(Ie.value=!0,f.value=(f.value||v.value).hour(re.hour()).minute(re.minute()).second(re.second()),v.value=f.value))},Ye=(G,X)=>{L.value[X]=null,X==="min"?(h.value=m.value,Ne.value=!1,(!f.value||f.value.isBefore(m.value))&&(f.value=m.value)):(v.value=f.value,Ie.value=!1,f.value&&f.value.isBefore(m.value)&&(m.value=f.value))},tt=(G,X,re)=>{L.value.min||(G&&(h.value=G,m.value=(m.value||h.value).hour(G.hour()).minute(G.minute()).second(G.second())),re||(Ne.value=X),(!f.value||f.value.isBefore(m.value))&&(f.value=m.value,v.value=G))},pt=(G,X,re)=>{L.value.max||(G&&(v.value=G,f.value=(f.value||v.value).hour(G.hour()).minute(G.minute()).second(G.second())),re||(Ie.value=X),f.value&&f.value.isBefore(m.value)&&(m.value=f.value))},dt=()=>{h.value=my(s(u),{lang:s(p),unit:"month",unlinkPanels:o.unlinkPanels})[0],v.value=h.value.add(1,"month"),f.value=void 0,m.value=void 0,t("pick",null)},Y=G=>Ke(G)?G.map(X=>X.format(c.value)):G.format(c.value),S=G=>Ke(G)?G.map(X=>kt(X,c.value).locale(p.value)):kt(G,c.value).locale(p.value);function A(G,X){if(o.unlinkPanels&&X){const re=(G==null?void 0:G.year())||0,ge=(G==null?void 0:G.month())||0,fe=X.year(),Fe=X.month();v.value=re===fe&&ge===Fe?X.add(1,_p):X}else v.value=h.value.add(1,_p),X&&(v.value=v.value.hour(X.hour()).minute(X.minute()).second(X.second()))}return t("set-picker-option",["isValidValue",ce]),t("set-picker-option",["parseUserInput",S]),t("set-picker-option",["formatToString",Y]),t("set-picker-option",["handleClear",dt]),(G,X)=>(b(),M("div",{class:O([s(g).b(),s(y).b(),{"has-sidebar":G.$slots.sidebar||s(H),"has-time":s(Oe)}])},[E("div",{class:O(s(g).e("body-wrapper"))},[be(G.$slots,"sidebar",{class:O(s(g).e("sidebar"))}),s(H)?(b(),M("div",{key:0,class:O(s(g).e("sidebar"))},[(b(!0),M(Qe,null,It(s(d),(re,ge)=>(b(),M("button",{key:ge,type:"button",class:O(s(g).e("shortcut")),onClick:fe=>s($)(re)},$e(re.text),11,nJ))),128))],2)):se("v-if",!0),E("div",{class:O(s(g).e("body"))},[s(Oe)?(b(),M("div",{key:0,class:O(s(y).e("time-header"))},[E("span",{class:O(s(y).e("editors-wrap"))},[E("span",{class:O(s(y).e("time-picker-wrap"))},[ee(s(cr),{size:"small",disabled:s(_).selecting,placeholder:s(R)("el.datepicker.startDate"),class:O(s(y).e("editor")),"model-value":s(F),"validate-event":!1,onInput:X[0]||(X[0]=re=>We(re,"min")),onChange:X[1]||(X[1]=re=>qe(re,"min"))},null,8,["disabled","placeholder","class","model-value"])],2),mt((b(),M("span",{class:O(s(y).e("time-picker-wrap"))},[ee(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(R)("el.datepicker.startTime"),"model-value":s(I),"validate-event":!1,onFocus:X[2]||(X[2]=re=>Ne.value=!0),onInput:X[3]||(X[3]=re=>ye(re,"min")),onChange:X[4]||(X[4]=re=>Ye(re,"min"))},null,8,["class","disabled","placeholder","model-value"]),ee(s(dp),{visible:Ne.value,format:s(oe),"datetime-role":"start","parsed-value":h.value,onPick:tt},null,8,["visible","format","parsed-value"])],2)),[[s(xn),Ae]])],2),E("span",null,[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})]),E("span",{class:O([s(y).e("editors-wrap"),"is-right"])},[E("span",{class:O(s(y).e("time-picker-wrap"))},[ee(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(R)("el.datepicker.endDate"),"model-value":s(K),readonly:!s(m),"validate-event":!1,onInput:X[5]||(X[5]=re=>We(re,"max")),onChange:X[6]||(X[6]=re=>qe(re,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),mt((b(),M("span",{class:O(s(y).e("time-picker-wrap"))},[ee(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(R)("el.datepicker.endTime"),"model-value":s(U),readonly:!s(m),"validate-event":!1,onFocus:X[7]||(X[7]=re=>s(m)&&(Ie.value=!0)),onInput:X[8]||(X[8]=re=>ye(re,"max")),onChange:X[9]||(X[9]=re=>Ye(re,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),ee(s(dp),{"datetime-role":"end",visible:Ie.value,format:s(oe),"parsed-value":v.value,onPick:pt},null,8,["visible","format","parsed-value"])],2)),[[s(xn),xe]])],2)],2)):se("v-if",!0),E("div",{class:O([[s(g).e("content"),s(y).e("content")],"is-left"])},[E("div",{class:O(s(y).e("header"))},[E("button",{type:"button",class:O([s(g).e("icon-btn"),"d-arrow-left"]),"aria-label":s(R)("el.datepicker.prevYear"),onClick:Q},[ee(s(Ze),null,{default:le(()=>[ee(s(Ra))]),_:1})],10,aJ),E("button",{type:"button",class:O([s(g).e("icon-btn"),"arrow-left"]),"aria-label":s(R)("el.datepicker.prevMonth"),onClick:Me},[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1})],10,iJ),G.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(pe),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(pe)}],"d-arrow-right"]),"aria-label":s(R)("el.datepicker.nextYear"),onClick:me},[ee(s(Ze),null,{default:le(()=>[ee(s(La))]),_:1})],10,sJ)):se("v-if",!0),G.unlinkPanels?(b(),M("button",{key:1,type:"button",disabled:!s(ae),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(ae)}],"arrow-right"]),"aria-label":s(R)("el.datepicker.nextMonth"),onClick:Re},[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})],10,cJ)):se("v-if",!0),E("div",null,$e(s(V)),1)],2),ee(Fv,{"selection-mode":"range",date:h.value,"min-date":s(m),"max-date":s(f),"range-state":s(_),"disabled-date":s(l),"cell-class-name":s(n),onChangerange:s(w),onPick:Te,onSelect:s(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),E("div",{class:O([[s(g).e("content"),s(y).e("content")],"is-right"])},[E("div",{class:O(s(y).e("header"))},[G.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(pe),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(pe)}],"d-arrow-left"]),"aria-label":s(R)("el.datepicker.prevYear"),onClick:Ce},[ee(s(Ze),null,{default:le(()=>[ee(s(Ra))]),_:1})],10,uJ)):se("v-if",!0),G.unlinkPanels?(b(),M("button",{key:1,type:"button",disabled:!s(ae),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(ae)}],"arrow-left"]),"aria-label":s(R)("el.datepicker.prevMonth"),onClick:Ee},[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1})],10,dJ)):se("v-if",!0),E("button",{type:"button","aria-label":s(R)("el.datepicker.nextYear"),class:O([s(g).e("icon-btn"),"d-arrow-right"]),onClick:de},[ee(s(Ze),null,{default:le(()=>[ee(s(La))]),_:1})],10,pJ),E("button",{type:"button",class:O([s(g).e("icon-btn"),"arrow-right"]),"aria-label":s(R)("el.datepicker.nextMonth"),onClick:_e},[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})],10,fJ),E("div",null,$e(s(B)),1)],2),ee(Fv,{"selection-mode":"range",date:v.value,"min-date":s(m),"max-date":s(f),"range-state":s(_),"disabled-date":s(l),"cell-class-name":s(n),onChangerange:s(w),onPick:Te,onSelect:s(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),s(Oe)?(b(),M("div",{key:0,class:O(s(g).e("footer"))},[s(i)?(b(),he(s(Wo),{key:0,text:"",size:"small",class:O(s(g).e("link-btn")),onClick:dt},{default:le(()=>[Ct($e(s(R)("el.datepicker.clear")),1)]),_:1},8,["class"])):se("v-if",!0),ee(s(Wo),{plain:"",size:"small",class:O(s(g).e("link-btn")),disabled:s(ke),onClick:X[10]||(X[10]=re=>s(x)(!1))},{default:le(()=>[Ct($e(s(R)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):se("v-if",!0)],2))}}),[["__file","panel-date-range.vue"]]);const vJ=Pe({...vy}),mJ=["pick","set-picker-option","calendar-change"],gJ=({unlinkPanels:e,leftDate:t,rightDate:o})=>{const{t:r}=Rt(),l=()=>{t.value=t.value.subtract(1,"year"),e.value||(o.value=o.value.subtract(1,"year"))},n=()=>{e.value||(t.value=t.value.add(1,"year")),o.value=o.value.add(1,"year")},a=()=>{t.value=t.value.add(1,"year")},i=()=>{o.value=o.value.subtract(1,"year")},c=C(()=>`${t.value.year()} ${r("el.datepicker.year")}`),d=C(()=>`${o.value.year()} ${r("el.datepicker.year")}`),u=C(()=>t.value.year()),p=C(()=>o.value.year()===t.value.year()?t.value.year()+1:o.value.year());return{leftPrevYear:l,rightNextYear:n,leftNextYear:a,rightPrevYear:i,leftLabel:c,rightLabel:d,leftYear:u,rightYear:p}},bJ=["onClick"],_J=["disabled"],wJ=["disabled"],wp="year",yJ=N({...N({name:"DatePickerMonthRange"}),props:vJ,emits:mJ,setup(e,{emit:t}){const o=e,{lang:r}=Rt(),l=Ge("EP_PICKER_BASE"),{shortcuts:n,disabledDate:a}=l.props,i=Yt(l.props,"format"),c=Yt(l.props,"defaultValue"),d=D(kt().locale(r.value)),u=D(kt().locale(r.value).add(1,wp)),{minDate:p,maxDate:h,rangeState:v,ppNs:m,drpNs:f,handleChangeRange:_,handleRangeConfirm:g,handleShortcutClick:y,onSelect:w}=gy(o,{defaultValue:c,leftDate:d,rightDate:u,unit:wp,onParsedValueChanged:H}),x=C(()=>!!n.length),{leftPrevYear:$,rightNextYear:T,leftNextYear:R,rightPrevYear:P,leftLabel:L,rightLabel:V,leftYear:B,rightYear:j}=gJ({unlinkPanels:Yt(o,"unlinkPanels"),leftDate:d,rightDate:u}),te=C(()=>o.unlinkPanels&&j.value>B.value+1),J=(F,K=!0)=>{const I=F.minDate,U=F.maxDate;h.value===U&&p.value===I||(t("calendar-change",[I.toDate(),U&&U.toDate()]),h.value=U,p.value=I,K&&g())},Z=F=>F.map(K=>K.format(i.value));function H(F,K){if(o.unlinkPanels&&K){const I=(F==null?void 0:F.year())||0,U=K.year();u.value=I===U?K.add(1,wp):K}else u.value=d.value.add(1,wp)}return t("set-picker-option",["formatToString",Z]),(F,K)=>(b(),M("div",{class:O([s(m).b(),s(f).b(),{"has-sidebar":!!F.$slots.sidebar||s(x)}])},[E("div",{class:O(s(m).e("body-wrapper"))},[be(F.$slots,"sidebar",{class:O(s(m).e("sidebar"))}),s(x)?(b(),M("div",{key:0,class:O(s(m).e("sidebar"))},[(b(!0),M(Qe,null,It(s(n),(I,U)=>(b(),M("button",{key:U,type:"button",class:O(s(m).e("shortcut")),onClick:oe=>s(y)(I)},$e(I.text),11,bJ))),128))],2)):se("v-if",!0),E("div",{class:O(s(m).e("body"))},[E("div",{class:O([[s(m).e("content"),s(f).e("content")],"is-left"])},[E("div",{class:O(s(f).e("header"))},[E("button",{type:"button",class:O([s(m).e("icon-btn"),"d-arrow-left"]),onClick:K[0]||(K[0]=(...I)=>s($)&&s($)(...I))},[ee(s(Ze),null,{default:le(()=>[ee(s(Ra))]),_:1})],2),F.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(te),class:O([[s(m).e("icon-btn"),{[s(m).is("disabled")]:!s(te)}],"d-arrow-right"]),onClick:K[1]||(K[1]=(...I)=>s(R)&&s(R)(...I))},[ee(s(Ze),null,{default:le(()=>[ee(s(La))]),_:1})],10,_J)):se("v-if",!0),E("div",null,$e(s(L)),1)],2),ee(jv,{"selection-mode":"range",date:d.value,"min-date":s(p),"max-date":s(h),"range-state":s(v),"disabled-date":s(a),onChangerange:s(_),onPick:J,onSelect:s(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),E("div",{class:O([[s(m).e("content"),s(f).e("content")],"is-right"])},[E("div",{class:O(s(f).e("header"))},[F.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(te),class:O([[s(m).e("icon-btn"),{"is-disabled":!s(te)}],"d-arrow-left"]),onClick:K[2]||(K[2]=(...I)=>s(P)&&s(P)(...I))},[ee(s(Ze),null,{default:le(()=>[ee(s(Ra))]),_:1})],10,wJ)):se("v-if",!0),E("button",{type:"button",class:O([s(m).e("icon-btn"),"d-arrow-right"]),onClick:K[3]||(K[3]=(...I)=>s(T)&&s(T)(...I))},[ee(s(Ze),null,{default:le(()=>[ee(s(La))]),_:1})],2),E("div",null,$e(s(V)),1)],2),ee(jv,{"selection-mode":"range",date:u.value,"min-date":s(p),"max-date":s(h),"range-state":s(v),"disabled-date":s(a),onChangerange:s(_),onPick:J,onSelect:s(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var xJ=Le(yJ,[["__file","panel-month-range.vue"]]);const kJ=function(e){switch(e){case"daterange":case"datetimerange":return hJ;case"monthrange":return xJ;default:return oJ}};kt.extend(Tw),kt.extend(fZ),kt.extend(mv),kt.extend(vZ),kt.extend(gZ),kt.extend(_Z),kt.extend(yZ),kt.extend(kZ);var CJ=N({name:"ElDatePicker",install:null,props:CZ,emits:["update:modelValue"],setup(e,{expose:t,emit:o,slots:r}){const l=ze("picker-panel");zt("ElPopperOptions",Dt(Yt(e,"popperOptions"))),zt(Lv,{slots:r,pickerNs:l});const n=D();t({focus:(c=!0)=>{var d;(d=n.value)==null||d.focus(c)},handleOpen:()=>{var c;(c=n.value)==null||c.handleOpen()},handleClose:()=>{var c;(c=n.value)==null||c.handleClose()}});const i=c=>{o("update:modelValue",c)};return()=>{var c;const d=(c=e.format)!=null?c:Kq[e.type]||ts,u=kJ(e.type);return ee(iw,Mt(e,{format:d,type:e.type,ref:n,"onUpdate:modelValue":i}),{default:p=>ee(u,p,null),"range-separator":r["range-separator"]})}}});const yp=CJ;yp.install=e=>{e.component(yp.name,yp)};const SJ=yp,Kv=Symbol("elDescriptions");var Dc=N({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:Ge(Kv,{})}},render(){var e,t,o,r,l,n,a;const i=sF(this.cell),c=(((e=this.cell)==null?void 0:e.dirs)||[]).map($=>{const{dir:T,arg:R,modifiers:P,value:L}=$;return[T,L,R,P]}),{border:d,direction:u}=this.descriptions,p=u==="vertical",h=((r=(o=(t=this.cell)==null?void 0:t.children)==null?void 0:o.label)==null?void 0:r.call(o))||i.label,v=(a=(n=(l=this.cell)==null?void 0:l.children)==null?void 0:n.default)==null?void 0:a.call(n),m=i.span,f=i.align?`is-${i.align}`:"",_=i.labelAlign?`is-${i.labelAlign}`:f,g=i.className,y=i.labelClassName,w={width:mo(i.width),minWidth:mo(i.minWidth)},x=ze("descriptions");switch(this.type){case"label":return mt(rt(this.tag,{style:w,class:[x.e("cell"),x.e("label"),x.is("bordered-label",d),x.is("vertical-label",p),_,y],colSpan:p?m:1},h),c);case"content":return mt(rt(this.tag,{style:w,class:[x.e("cell"),x.e("content"),x.is("bordered-content",d),x.is("vertical-content",p),f,g],colSpan:p?m:m*2-1},v),c);default:return mt(rt("td",{style:w,class:[x.e("cell"),f],colSpan:m},[jo(h)?void 0:rt("span",{class:[x.e("label"),y]},h),rt("span",{class:[x.e("content"),g]},v)]),c)}}});const EJ=Pe({row:{type:ue(Array),default:()=>[]}}),TJ={key:1},$J=N({...N({name:"ElDescriptionsRow"}),props:EJ,setup(e){const t=Ge(Kv,{});return(o,r)=>s(t).direction==="vertical"?(b(),M(Qe,{key:0},[E("tr",null,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),he(s(Dc),{key:`tr1-${n}`,cell:l,tag:"th",type:"label"},null,8,["cell"]))),128))]),E("tr",null,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),he(s(Dc),{key:`tr2-${n}`,cell:l,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(b(),M("tr",TJ,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),M(Qe,{key:`tr3-${n}`},[s(t).border?(b(),M(Qe,{key:0},[ee(s(Dc),{cell:l,tag:"td",type:"label"},null,8,["cell"]),ee(s(Dc),{cell:l,tag:"td",type:"content"},null,8,["cell"])],64)):(b(),he(s(Dc),{key:1,cell:l,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var MJ=Le($J,[["__file","descriptions-row.vue"]]);const AJ=Pe({border:{type:Boolean,default:!1},column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Oo,title:{type:String,default:""},extra:{type:String,default:""}}),zJ=N({...N({name:"ElDescriptions"}),props:AJ,setup(e){const t=e,o=ze("descriptions"),r=So(),l=Do();zt(Kv,t);const n=C(()=>[o.b(),o.m(r.value)]),a=(c,d,u,p=!1)=>(c.props||(c.props={}),d>u&&(c.props.span=u),p&&(c.props.span=d),c),i=()=>{if(!l.default)return[];const c=Qn(l.default()).filter(v=>{var m;return((m=v==null?void 0:v.type)==null?void 0:m.name)==="ElDescriptionsItem"}),d=[];let u=[],p=t.column,h=0;return c.forEach((v,m)=>{var f;const _=((f=v.props)==null?void 0:f.span)||1;if(mp?p:_),m===c.length-1){const g=t.column-h%t.column;u.push(a(v,g,p,!0)),d.push(u);return}_(b(),M("div",{class:O(s(n))},[c.title||c.extra||c.$slots.title||c.$slots.extra?(b(),M("div",{key:0,class:O(s(o).e("header"))},[E("div",{class:O(s(o).e("title"))},[be(c.$slots,"title",{},()=>[Ct($e(c.title),1)])],2),E("div",{class:O(s(o).e("extra"))},[be(c.$slots,"extra",{},()=>[Ct($e(c.extra),1)])],2)],2)):se("v-if",!0),E("div",{class:O(s(o).e("body"))},[E("table",{class:O([s(o).e("table"),s(o).is("bordered",c.border)])},[E("tbody",null,[(b(!0),M(Qe,null,It(i(),(u,p)=>(b(),he(MJ,{key:p,row:u},null,8,["row"]))),128))])],2)],2)],2))}});var IJ=Le(zJ,[["__file","description.vue"]]);const OJ=Pe({label:{type:String,default:""},span:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),by=N({name:"ElDescriptionsItem",props:OJ}),NJ=yt(IJ,{DescriptionsItem:by}),PJ=co(by),RJ=Pe({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:ue([String,Array,Object])},zIndex:{type:ue([String,Number])}}),LJ={click:e=>e instanceof MouseEvent},BJ="overlay";var VJ=N({name:"ElOverlay",props:RJ,emits:LJ,setup(e,{slots:t,emit:o}){const r=ze(BJ),l=c=>{o("click",c)},{onClick:n,onMousedown:a,onMouseup:i}=Ph(e.customMaskEvent?void 0:l);return()=>e.mask?ee("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:n,onMousedown:a,onMouseup:i},[be(t,"default")],Qr.STYLE|Qr.CLASS|Qr.PROPS,["onClick","onMouseup","onMousedown"]):rt("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[be(t,"default")])}});const Uv=VJ,_y=Symbol("dialogInjectionKey"),wy=Pe({center:Boolean,alignCenter:Boolean,closeIcon:{type:Xt},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),DJ={close:()=>!0},HJ=["aria-level"],FJ=["aria-label"],jJ=["id"],KJ=N({...N({name:"ElDialogContent"}),props:wy,emits:DJ,setup(e){const t=e,{t:o}=Rt(),{Close:r}=gh,{dialogRef:l,headerRef:n,bodyId:a,ns:i,style:c}=Ge(_y),{focusTrapRef:d}=Ge(iv),u=C(()=>[i.b(),i.is("fullscreen",t.fullscreen),i.is("draggable",t.draggable),i.is("align-center",t.alignCenter),{[i.m("center")]:t.center}]),p=Nd(d,l),h=C(()=>t.draggable),v=C(()=>t.overflow);return r6(l,n,h,v),(m,f)=>(b(),M("div",{ref:s(p),class:O(s(u)),style:Je(s(c)),tabindex:"-1"},[E("header",{ref_key:"headerRef",ref:n,class:O([s(i).e("header"),{"show-close":m.showClose}])},[be(m.$slots,"header",{},()=>[E("span",{role:"heading","aria-level":m.ariaLevel,class:O(s(i).e("title"))},$e(m.title),11,HJ)]),m.showClose?(b(),M("button",{key:0,"aria-label":s(o)("el.dialog.close"),class:O(s(i).e("headerbtn")),type:"button",onClick:f[0]||(f[0]=_=>m.$emit("close"))},[ee(s(Ze),{class:O(s(i).e("close"))},{default:le(()=>[(b(),he(Et(m.closeIcon||s(r))))]),_:1},8,["class"])],10,FJ)):se("v-if",!0)],2),E("div",{id:s(a),class:O(s(i).e("body"))},[be(m.$slots,"default")],10,jJ),m.$slots.footer?(b(),M("footer",{key:0,class:O(s(i).e("footer"))},[be(m.$slots,"footer")],2)):se("v-if",!0)],6))}});var UJ=Le(KJ,[["__file","dialog-content.vue"]]);const yy=Pe({...wy,appendToBody:Boolean,appendTo:{type:ue(String),default:"body"},beforeClose:{type:ue(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),xy={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[St]:e=>Co(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},ky=(e,t)=>{var o;const l=wt().emit,{nextZIndex:n}=Ki();let a="";const i=Qo(),c=Qo(),d=D(!1),u=D(!1),p=D(!1),h=D((o=e.zIndex)!=null?o:n());let v,m;const f=Mc("namespace",gc),_=C(()=>{const Z={},H=`--${f.value}-dialog`;return e.fullscreen||(e.top&&(Z[`${H}-margin-top`]=e.top),e.width&&(Z[`${H}-width`]=mo(e.width))),Z}),g=C(()=>e.alignCenter?{display:"flex"}:{});function y(){l("opened")}function w(){l("closed"),l(St,!1),e.destroyOnClose&&(p.value=!1)}function x(){l("close")}function $(){m==null||m(),v==null||v(),e.openDelay&&e.openDelay>0?{stop:v}=$a(()=>L(),e.openDelay):L()}function T(){v==null||v(),m==null||m(),e.closeDelay&&e.closeDelay>0?{stop:m}=$a(()=>V(),e.closeDelay):V()}function R(){function Z(H){H||(u.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(Z):T()}function P(){e.closeOnClickModal&&R()}function L(){Nt&&(d.value=!0)}function V(){d.value=!1}function B(){l("openAutoFocus")}function j(){l("closeAutoFocus")}function te(Z){var H;((H=Z.detail)==null?void 0:H.focusReason)==="pointer"&&Z.preventDefault()}e.lockScroll&&Sh(d);function J(){e.closeOnPressEscape&&R()}return Se(()=>e.modelValue,Z=>{Z?(u.value=!1,$(),p.value=!0,h.value=C3(e.zIndex)?n():h.value++,et(()=>{l("open"),t.value&&(t.value.scrollTop=0)})):d.value&&T()}),Se(()=>e.fullscreen,Z=>{t.value&&(Z?(a=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=a)}),ft(()=>{e.modelValue&&(d.value=!0,p.value=!0,$())}),{afterEnter:y,afterLeave:w,beforeLeave:x,handleClose:R,onModalClick:P,close:T,doClose:V,onOpenAutoFocus:B,onCloseAutoFocus:j,onCloseRequested:J,onFocusoutPrevented:te,titleId:i,bodyId:c,closed:u,style:_,overlayDialogStyle:g,rendered:p,visible:d,zIndex:h}},WJ=["aria-label","aria-labelledby","aria-describedby"],qJ=N({...N({name:"ElDialog",inheritAttrs:!1}),props:yy,emits:xy,setup(e,{expose:t}){const o=e,r=Do();Lo({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},C(()=>!!r.title));const l=ze("dialog"),n=D(),a=D(),i=D(),{visible:c,titleId:d,bodyId:u,style:p,overlayDialogStyle:h,rendered:v,zIndex:m,afterEnter:f,afterLeave:_,beforeLeave:g,handleClose:y,onModalClick:w,onOpenAutoFocus:x,onCloseAutoFocus:$,onCloseRequested:T,onFocusoutPrevented:R}=ky(o,n);zt(_y,{dialogRef:n,headerRef:a,bodyId:u,ns:l,rendered:v,style:p});const P=Ph(w),L=C(()=>o.draggable&&!o.fullscreen);return t({visible:c,dialogContentRef:i}),(V,B)=>(b(),he(hi,{to:V.appendTo,disabled:V.appendTo!=="body"?!1:!V.appendToBody},[ee(Mo,{name:"dialog-fade",onAfterEnter:s(f),onAfterLeave:s(_),onBeforeLeave:s(g),persisted:""},{default:le(()=>[mt(ee(s(Uv),{"custom-mask-event":"",mask:V.modal,"overlay-class":V.modalClass,"z-index":s(m)},{default:le(()=>[E("div",{role:"dialog","aria-modal":"true","aria-label":V.title||void 0,"aria-labelledby":V.title?void 0:s(d),"aria-describedby":s(u),class:O(`${s(l).namespace.value}-overlay-dialog`),style:Je(s(h)),onClick:B[0]||(B[0]=(...j)=>s(P).onClick&&s(P).onClick(...j)),onMousedown:B[1]||(B[1]=(...j)=>s(P).onMousedown&&s(P).onMousedown(...j)),onMouseup:B[2]||(B[2]=(...j)=>s(P).onMouseup&&s(P).onMouseup(...j))},[ee(s(Nc),{loop:"",trapped:s(c),"focus-start-el":"container",onFocusAfterTrapped:s(x),onFocusAfterReleased:s($),onFocusoutPrevented:s(R),onReleaseRequested:s(T)},{default:le(()=>[s(v)?(b(),he(UJ,Mt({key:0,ref_key:"dialogContentRef",ref:i},V.$attrs,{center:V.center,"align-center":V.alignCenter,"close-icon":V.closeIcon,draggable:s(L),overflow:V.overflow,fullscreen:V.fullscreen,"show-close":V.showClose,title:V.title,"aria-level":V.headerAriaLevel,onClose:s(y)}),ln({header:le(()=>[V.$slots.title?be(V.$slots,"title",{key:1}):be(V.$slots,"header",{key:0,close:s(y),titleId:s(d),titleClass:s(l).e("title")})]),default:le(()=>[be(V.$slots,"default")]),_:2},[V.$slots.footer?{name:"footer",fn:le(()=>[be(V.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):se("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,WJ)]),_:3},8,["mask","overlay-class","z-index"]),[[Lt,s(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var YJ=Le(qJ,[["__file","dialog.vue"]]);const GJ=yt(YJ),XJ=Pe({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:ue(String),default:"solid"}}),ZJ=N({...N({name:"ElDivider"}),props:XJ,setup(e){const t=e,o=ze("divider"),r=C(()=>o.cssVar({"border-style":t.borderStyle}));return(l,n)=>(b(),M("div",{class:O([s(o).b(),s(o).m(l.direction)]),style:Je(s(r)),role:"separator"},[l.$slots.default&&l.direction!=="vertical"?(b(),M("div",{key:0,class:O([s(o).e("text"),s(o).is(l.contentPosition)])},[be(l.$slots,"default")],2)):se("v-if",!0)],6))}});var JJ=Le(ZJ,[["__file","divider.vue"]]);const Cy=yt(JJ),QJ=Pe({...yy,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),eQ=xy,tQ=["aria-label","aria-labelledby","aria-describedby"],oQ=["id","aria-level"],rQ=["aria-label"],lQ=["id"],nQ=N({...N({name:"ElDrawer",inheritAttrs:!1}),props:QJ,emits:eQ,setup(e,{expose:t}){const o=e,r=Do();Lo({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},C(()=>!!r.title));const l=D(),n=D(),a=ze("drawer"),{t:i}=Rt(),{afterEnter:c,afterLeave:d,beforeLeave:u,visible:p,rendered:h,titleId:v,bodyId:m,zIndex:f,onModalClick:_,onOpenAutoFocus:g,onCloseAutoFocus:y,onFocusoutPrevented:w,onCloseRequested:x,handleClose:$}=ky(o,l),T=C(()=>o.direction==="rtl"||o.direction==="ltr"),R=C(()=>mo(o.size));return t({handleClose:$,afterEnter:c,afterLeave:d}),(P,L)=>(b(),he(hi,{to:"body",disabled:!P.appendToBody},[ee(Mo,{name:s(a).b("fade"),onAfterEnter:s(c),onAfterLeave:s(d),onBeforeLeave:s(u),persisted:""},{default:le(()=>[mt(ee(s(Uv),{mask:P.modal,"overlay-class":P.modalClass,"z-index":s(f),onClick:s(_)},{default:le(()=>[ee(s(Nc),{loop:"",trapped:s(p),"focus-trap-el":l.value,"focus-start-el":n.value,onFocusAfterTrapped:s(g),onFocusAfterReleased:s(y),onFocusoutPrevented:s(w),onReleaseRequested:s(x)},{default:le(()=>[E("div",Mt({ref_key:"drawerRef",ref:l,"aria-modal":"true","aria-label":P.title||void 0,"aria-labelledby":P.title?void 0:s(v),"aria-describedby":s(m)},P.$attrs,{class:[s(a).b(),P.direction,s(p)&&"open"],style:s(T)?"width: "+s(R):"height: "+s(R),role:"dialog",onClick:L[1]||(L[1]=ct(()=>{},["stop"]))}),[E("span",{ref_key:"focusStartRef",ref:n,class:O(s(a).e("sr-focus")),tabindex:"-1"},null,2),P.withHeader?(b(),M("header",{key:0,class:O(s(a).e("header"))},[P.$slots.title?be(P.$slots,"title",{key:1},()=>[se(" DEPRECATED SLOT ")]):be(P.$slots,"header",{key:0,close:s($),titleId:s(v),titleClass:s(a).e("title")},()=>[P.$slots.title?se("v-if",!0):(b(),M("span",{key:0,id:s(v),role:"heading","aria-level":P.headerAriaLevel,class:O(s(a).e("title"))},$e(P.title),11,oQ))]),P.showClose?(b(),M("button",{key:2,"aria-label":s(i)("el.drawer.close"),class:O(s(a).e("close-btn")),type:"button",onClick:L[0]||(L[0]=(...V)=>s($)&&s($)(...V))},[ee(s(Ze),{class:O(s(a).e("close"))},{default:le(()=>[ee(s(Jr))]),_:1},8,["class"])],10,rQ)):se("v-if",!0)],2)):se("v-if",!0),s(h)?(b(),M("div",{key:1,id:s(m),class:O(s(a).e("body"))},[be(P.$slots,"default")],10,lQ)):se("v-if",!0),P.$slots.footer?(b(),M("div",{key:2,class:O(s(a).e("footer"))},[be(P.$slots,"footer")],2)):se("v-if",!0)],16,tQ)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Lt,s(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var aQ=Le(nQ,[["__file","drawer.vue"]]);const iQ=yt(aQ),sQ=N({inheritAttrs:!1});function cQ(e,t,o,r,l,n){return be(e.$slots,"default")}var uQ=Le(sQ,[["render",cQ],["__file","collection.vue"]]);const dQ=N({name:"ElCollectionItem",inheritAttrs:!1});function pQ(e,t,o,r,l,n){return be(e.$slots,"default")}var fQ=Le(dQ,[["render",pQ],["__file","collection-item.vue"]]);const Sy="data-el-collection-item",Ey=e=>{const t=`El${e}Collection`,o=`${t}Item`,r=Symbol(t),l=Symbol(o),n={...uQ,name:t,setup(){const i=D(null),c=new Map;zt(r,{itemMap:c,getItems:()=>{const u=s(i);if(!u)return[];const p=Array.from(u.querySelectorAll(`[${Sy}]`));return[...c.values()].sort((v,m)=>p.indexOf(v.ref)-p.indexOf(m.ref))},collectionRef:i})}},a={...fQ,name:o,setup(i,{attrs:c}){const d=D(null),u=Ge(r,void 0);zt(l,{collectionItemRef:d}),ft(()=>{const p=s(d);p&&u.itemMap.set(p,{ref:p,...c})}),to(()=>{const p=s(d);u.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:l,ElCollection:n,ElCollectionItem:a}},hQ=Pe({style:{type:ue([String,Array,Object])},currentTabId:{type:ue(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:ue(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:vQ,ElCollectionItem:mQ,COLLECTION_INJECTION_KEY:Wv,COLLECTION_ITEM_INJECTION_KEY:gQ}=Ey("RovingFocusGroup"),qv=Symbol("elRovingFocusGroup"),Ty=Symbol("elRovingFocusGroupItem"),bQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},_Q=(e,t)=>e,wQ=(e,t,o)=>{const r=_Q(e.key);return bQ[r]},yQ=(e,t)=>e.map((o,r)=>e[(r+t)%e.length]),Yv=e=>{const{activeElement:t}=document;for(const o of e)if(o===t||(o.focus(),t!==document.activeElement))return},$y="currentTabIdChange",My="rovingFocusGroup.entryFocus",xQ={bubbles:!1,cancelable:!0},kQ=N({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:hQ,emits:[$y,"entryFocus"],setup(e,{emit:t}){var o;const r=D((o=e.currentTabId||e.defaultCurrentTabId)!=null?o:null),l=D(!1),n=D(!1),a=D(null),{getItems:i}=Ge(Wv,void 0),c=C(()=>[{outline:"none"},e.style]),d=f=>{t($y,f)},u=()=>{l.value=!0},p=ho(f=>{var _;(_=e.onMousedown)==null||_.call(e,f)},()=>{n.value=!0}),h=ho(f=>{var _;(_=e.onFocus)==null||_.call(e,f)},f=>{const _=!s(n),{target:g,currentTarget:y}=f;if(g===y&&_&&!s(l)){const w=new Event(My,xQ);if(y==null||y.dispatchEvent(w),!w.defaultPrevented){const x=i().filter(L=>L.focusable),$=x.find(L=>L.active),T=x.find(L=>L.id===s(r)),P=[$,T,...x].filter(Boolean).map(L=>L.ref);Yv(P)}}n.value=!1}),v=ho(f=>{var _;(_=e.onBlur)==null||_.call(e,f)},()=>{l.value=!1}),m=(...f)=>{t("entryFocus",...f)};zt(qv,{currentTabbedId:ui(r),loop:Yt(e,"loop"),tabIndex:C(()=>s(l)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:c,orientation:Yt(e,"orientation"),dir:Yt(e,"dir"),onItemFocus:d,onItemShiftTab:u,onBlur:v,onFocus:h,onMousedown:p}),Se(()=>e.currentTabId,f=>{r.value=f??null}),oo(a,My,m)}});function CQ(e,t,o,r,l,n){return be(e.$slots,"default")}var SQ=Le(kQ,[["render",CQ],["__file","roving-focus-group-impl.vue"]]);const EQ=N({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:vQ,ElRovingFocusGroupImpl:SQ}});function TQ(e,t,o,r,l,n){const a=nt("el-roving-focus-group-impl"),i=nt("el-focus-group-collection");return b(),he(i,null,{default:le(()=>[ee(a,Zl(mi(e.$attrs)),{default:le(()=>[be(e.$slots,"default")]),_:3},16)]),_:3})}var $Q=Le(EQ,[["render",TQ],["__file","roving-focus-group.vue"]]);const MQ=N({components:{ElRovingFocusCollectionItem:mQ},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:o,loop:r,onItemFocus:l,onItemShiftTab:n}=Ge(qv,void 0),{getItems:a}=Ge(Wv,void 0),i=Qo(),c=D(null),d=ho(v=>{t("mousedown",v)},v=>{e.focusable?l(s(i)):v.preventDefault()}),u=ho(v=>{t("focus",v)},()=>{l(s(i))}),p=ho(v=>{t("keydown",v)},v=>{const{key:m,shiftKey:f,target:_,currentTarget:g}=v;if(m===lt.tab&&f){n();return}if(_!==g)return;const y=wQ(v);if(y){v.preventDefault();let x=a().filter($=>$.focusable).map($=>$.ref);switch(y){case"last":{x.reverse();break}case"prev":case"next":{y==="prev"&&x.reverse();const $=x.indexOf(g);x=r.value?yQ(x,$+1):x.slice($+1);break}}et(()=>{Yv(x)})}}),h=C(()=>o.value===s(i));return zt(Ty,{rovingFocusGroupItemRef:c,tabIndex:C(()=>s(h)?0:-1),handleMousedown:d,handleFocus:u,handleKeydown:p}),{id:i,handleKeydown:p,handleFocus:u,handleMousedown:d}}});function AQ(e,t,o,r,l,n){const a=nt("el-roving-focus-collection-item");return b(),he(a,{id:e.id,focusable:e.focusable,active:e.active},{default:le(()=>[be(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var zQ=Le(MQ,[["render",AQ],["__file","roving-focus-item.vue"]]);const xp=Pe({trigger:Pc.trigger,effect:{...Uo.effect,default:"light"},type:{type:ue(String)},placement:{type:ue(String),default:"bottom"},popperOptions:{type:ue(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:ue([Number,String]),default:0},maxHeight:{type:ue([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:ue(Object)},teleported:Uo.teleported}),Ay=Pe({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Xt}}),IQ=Pe({onKeydown:{type:ue(Function)}}),OQ=[lt.down,lt.pageDown,lt.home],zy=[lt.up,lt.pageUp,lt.end],NQ=[...OQ,...zy],{ElCollection:PQ,ElCollectionItem:RQ,COLLECTION_INJECTION_KEY:LQ,COLLECTION_ITEM_INJECTION_KEY:BQ}=Ey("Dropdown"),kp=Symbol("elDropdown"),{ButtonGroup:VQ}=Wo,DQ=N({name:"ElDropdown",components:{ElButton:Wo,ElButtonGroup:VQ,ElScrollbar:wn,ElDropdownCollection:PQ,ElTooltip:ur,ElRovingFocusGroup:$Q,ElOnlyChild:x4,ElIcon:Ze,ArrowDown:Pl},props:xp,emits:["visible-change","click","command"],setup(e,{emit:t}){const o=wt(),r=ze("dropdown"),{t:l}=Rt(),n=D(),a=D(),i=D(null),c=D(null),d=D(null),u=D(null),p=D(!1),h=[lt.enter,lt.space,lt.down],v=C(()=>({maxHeight:mo(e.maxHeight)})),m=C(()=>[r.m($.value)]),f=C(()=>Gn(e.trigger)),_=Qo().value,g=C(()=>e.id||_);Se([n,f],([F,K],[I])=>{var U,oe,ne;(U=I==null?void 0:I.$el)!=null&&U.removeEventListener&&I.$el.removeEventListener("pointerenter",R),(oe=F==null?void 0:F.$el)!=null&&oe.removeEventListener&&F.$el.removeEventListener("pointerenter",R),(ne=F==null?void 0:F.$el)!=null&&ne.addEventListener&&K.includes("hover")&&F.$el.addEventListener("pointerenter",R)},{immediate:!0}),to(()=>{var F,K;(K=(F=n.value)==null?void 0:F.$el)!=null&&K.removeEventListener&&n.value.$el.removeEventListener("pointerenter",R)});function y(){w()}function w(){var F;(F=i.value)==null||F.onClose()}function x(){var F;(F=i.value)==null||F.onOpen()}const $=So();function T(...F){t("command",...F)}function R(){var F,K;(K=(F=n.value)==null?void 0:F.$el)==null||K.focus()}function P(){}function L(){const F=s(c);f.value.includes("hover")&&(F==null||F.focus()),u.value=null}function V(F){u.value=F}function B(F){p.value||(F.preventDefault(),F.stopImmediatePropagation())}function j(){t("visible-change",!0)}function te(F){(F==null?void 0:F.type)==="keydown"&&c.value.focus()}function J(){t("visible-change",!1)}return zt(kp,{contentRef:c,role:C(()=>e.role),triggerId:g,isUsingKeyboard:p,onItemEnter:P,onItemLeave:L}),zt("elDropdown",{instance:o,dropdownSize:$,handleClick:y,commandHandler:T,trigger:Yt(e,"trigger"),hideOnClick:Yt(e,"hideOnClick")}),{t:l,ns:r,scrollbar:d,wrapStyle:v,dropdownTriggerKls:m,dropdownSize:$,triggerId:g,triggerKeys:h,currentTabId:u,handleCurrentTabIdChange:V,handlerMainButtonClick:F=>{t("click",F)},handleEntryFocus:B,handleClose:w,handleOpen:x,handleBeforeShowTooltip:j,handleShowTooltip:te,handleBeforeHideTooltip:J,onFocusAfterTrapped:F=>{var K,I;F.preventDefault(),(I=(K=c.value)==null?void 0:K.focus)==null||I.call(K,{preventScroll:!0})},popperRef:i,contentRef:c,triggeringElementRef:n,referenceElementRef:a}}});function HQ(e,t,o,r,l,n){var a;const i=nt("el-dropdown-collection"),c=nt("el-roving-focus-group"),d=nt("el-scrollbar"),u=nt("el-only-child"),p=nt("el-tooltip"),h=nt("el-button"),v=nt("arrow-down"),m=nt("el-icon"),f=nt("el-button-group");return b(),M("div",{class:O([e.ns.b(),e.ns.is("disabled",e.disabled)])},[ee(p,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},ln({content:le(()=>[ee(d,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:le(()=>[ee(c,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:le(()=>[ee(i,null,{default:le(()=>[be(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:le(()=>[ee(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:le(()=>[be(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(b(),he(f,{key:0},{default:le(()=>[ee(h,Mt({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:le(()=>[be(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),ee(h,Mt({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:le(()=>[ee(m,{class:O(e.ns.e("icon"))},{default:le(()=>[ee(v)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):se("v-if",!0)],2)}var FQ=Le(DQ,[["render",HQ],["__file","dropdown.vue"]]);const jQ=N({name:"DropdownItemImpl",components:{ElIcon:Ze},props:Ay,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const o=ze("dropdown"),{role:r}=Ge(kp,void 0),{collectionItemRef:l}=Ge(BQ,void 0),{collectionItemRef:n}=Ge(gQ,void 0),{rovingFocusGroupItemRef:a,tabIndex:i,handleFocus:c,handleKeydown:d,handleMousedown:u}=Ge(Ty,void 0),p=Nd(l,n,a),h=C(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),v=ho(m=>{const{code:f}=m;if(f===lt.enter||f===lt.space)return m.preventDefault(),m.stopImmediatePropagation(),t("clickimpl",m),!0},d);return{ns:o,itemRef:p,dataset:{[Sy]:""},role:h,tabIndex:i,handleFocus:c,handleKeydown:v,handleMousedown:u}}}),KQ=["aria-disabled","tabindex","role"];function UQ(e,t,o,r,l,n){const a=nt("el-icon");return b(),M(Qe,null,[e.divided?(b(),M("li",Mt({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):se("v-if",!0),E("li",Mt({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t[0]||(t[0]=i=>e.$emit("clickimpl",i)),onFocus:t[1]||(t[1]=(...i)=>e.handleFocus&&e.handleFocus(...i)),onKeydown:t[2]||(t[2]=ct((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:t[3]||(t[3]=(...i)=>e.handleMousedown&&e.handleMousedown(...i)),onPointermove:t[4]||(t[4]=i=>e.$emit("pointermove",i)),onPointerleave:t[5]||(t[5]=i=>e.$emit("pointerleave",i))}),[e.icon?(b(),he(a,{key:0},{default:le(()=>[(b(),he(Et(e.icon)))]),_:1})):se("v-if",!0),be(e.$slots,"default")],16,KQ)],64)}var WQ=Le(jQ,[["render",UQ],["__file","dropdown-item-impl.vue"]]);const Iy=()=>{const e=Ge("elDropdown",{}),t=C(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},qQ=N({name:"ElDropdownItem",components:{ElDropdownCollectionItem:RQ,ElRovingFocusItem:zQ,ElDropdownItemImpl:WQ},inheritAttrs:!1,props:Ay,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:o}){const{elDropdown:r}=Iy(),l=wt(),n=D(null),a=C(()=>{var v,m;return(m=(v=s(n))==null?void 0:v.textContent)!=null?m:""}),{onItemEnter:i,onItemLeave:c}=Ge(kp,void 0),d=ho(v=>(t("pointermove",v),v.defaultPrevented),Kb(v=>{if(e.disabled){c(v);return}const m=v.currentTarget;m===document.activeElement||m.contains(document.activeElement)||(i(v),v.defaultPrevented||m==null||m.focus())})),u=ho(v=>(t("pointerleave",v),v.defaultPrevented),Kb(v=>{c(v)})),p=ho(v=>{if(!e.disabled)return t("click",v),v.type!=="keydown"&&v.defaultPrevented},v=>{var m,f,_;if(e.disabled){v.stopImmediatePropagation();return}(m=r==null?void 0:r.hideOnClick)!=null&&m.value&&((f=r.handleClick)==null||f.call(r)),(_=r.commandHandler)==null||_.call(r,e.command,l,v)}),h=C(()=>({...e,...o}));return{handleClick:p,handlePointerMove:d,handlePointerLeave:u,textContent:a,propsAndAttrs:h}}});function YQ(e,t,o,r,l,n){var a;const i=nt("el-dropdown-item-impl"),c=nt("el-roving-focus-item"),d=nt("el-dropdown-collection-item");return b(),he(d,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:le(()=>[ee(c,{focusable:!e.disabled},{default:le(()=>[ee(i,Mt(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:le(()=>[be(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var Oy=Le(qQ,[["render",YQ],["__file","dropdown-item.vue"]]);const GQ=N({name:"ElDropdownMenu",props:IQ,setup(e){const t=ze("dropdown"),{_elDropdownSize:o}=Iy(),r=o.value,{focusTrapRef:l,onKeydown:n}=Ge(iv,void 0),{contentRef:a,role:i,triggerId:c}=Ge(kp,void 0),{collectionRef:d,getItems:u}=Ge(LQ,void 0),{rovingFocusGroupRef:p,rovingFocusGroupRootStyle:h,tabIndex:v,onBlur:m,onFocus:f,onMousedown:_}=Ge(qv,void 0),{collectionRef:g}=Ge(Wv,void 0),y=C(()=>[t.b("menu"),t.bm("menu",r==null?void 0:r.value)]),w=Nd(a,d,l,p,g),x=ho(T=>{var R;(R=e.onKeydown)==null||R.call(e,T)},T=>{const{currentTarget:R,code:P,target:L}=T;if(R.contains(L),lt.tab===P&&T.stopImmediatePropagation(),T.preventDefault(),L!==s(a)||!NQ.includes(P))return;const B=u().filter(j=>!j.disabled).map(j=>j.ref);zy.includes(P)&&B.reverse(),Yv(B)});return{size:r,rovingFocusGroupRootStyle:h,tabIndex:v,dropdownKls:y,role:i,triggerId:c,dropdownListWrapperRef:w,handleKeydown:T=>{x(T),n(T)},onBlur:m,onFocus:f,onMousedown:_}}}),XQ=["role","aria-labelledby"];function ZQ(e,t,o,r,l,n){return b(),M("ul",{ref:e.dropdownListWrapperRef,class:O(e.dropdownKls),style:Je(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:t[0]||(t[0]=(...a)=>e.onBlur&&e.onBlur(...a)),onFocus:t[1]||(t[1]=(...a)=>e.onFocus&&e.onFocus(...a)),onKeydown:t[2]||(t[2]=ct((...a)=>e.handleKeydown&&e.handleKeydown(...a),["self"])),onMousedown:t[3]||(t[3]=ct((...a)=>e.onMousedown&&e.onMousedown(...a),["self"]))},[be(e.$slots,"default")],46,XQ)}var Ny=Le(GQ,[["render",ZQ],["__file","dropdown-menu.vue"]]);const JQ=yt(FQ,{DropdownItem:Oy,DropdownMenu:Ny}),QQ=co(Oy),eee=co(Ny),tee={viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},oee=["id"],ree=["stop-color"],lee=["stop-color"],nee=["id"],aee=["stop-color"],iee=["stop-color"],see=["id"],cee={id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},uee={id:"B-type",transform:"translate(-1268.000000, -535.000000)"},dee={id:"Group-2",transform:"translate(1268.000000, 535.000000)"},pee=["fill"],fee=["fill"],hee={id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},vee=["fill"],mee=["fill"],gee=["fill"],bee=["fill"],_ee=["fill"],wee={id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},yee=["fill","xlink:href"],xee=["fill","mask"],kee=["fill"],Cee=N({...N({name:"ImgEmpty"}),setup(e){const t=ze("empty"),o=Qo();return(r,l)=>(b(),M("svg",tee,[E("defs",null,[E("linearGradient",{id:`linearGradient-1-${s(o)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,ree),E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,lee)],8,oee),E("linearGradient",{id:`linearGradient-2-${s(o)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,aee),E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,iee)],8,nee),E("rect",{id:`path-3-${s(o)}`,x:"0",y:"0",width:"17",height:"36"},null,8,see)]),E("g",cee,[E("g",uee,[E("g",dee,[E("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${s(t).cssVarBlockName("fill-color-3")})`},null,8,pee),E("polygon",{id:"Rectangle-Copy-14",fill:`var(${s(t).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,fee),E("g",hee,[E("polygon",{id:"Rectangle-Copy-10",fill:`var(${s(t).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,vee),E("polygon",{id:"Rectangle-Copy-11",fill:`var(${s(t).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,mee),E("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${s(o)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,gee),E("polygon",{id:"Rectangle-Copy-13",fill:`var(${s(t).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,bee)]),E("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${s(o)})`,x:"13",y:"45",width:"40",height:"36"},null,8,_ee),E("g",wee,[E("use",{id:"Mask",fill:`var(${s(t).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${s(o)}`},null,8,yee),E("polygon",{id:"Rectangle-Copy",fill:`var(${s(t).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${s(o)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,xee)]),E("polygon",{id:"Rectangle-Copy-18",fill:`var(${s(t).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,kee)])])])]))}});var See=Le(Cee,[["__file","img-empty.vue"]]);const Eee=Pe({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),Tee=["src"],$ee={key:1},Mee=N({...N({name:"ElEmpty"}),props:Eee,setup(e){const t=e,{t:o}=Rt(),r=ze("empty"),l=C(()=>t.description||o("el.table.emptyText")),n=C(()=>({width:mo(t.imageSize)}));return(a,i)=>(b(),M("div",{class:O(s(r).b())},[E("div",{class:O(s(r).e("image")),style:Je(s(n))},[a.image?(b(),M("img",{key:0,src:a.image,ondragstart:"return false"},null,8,Tee)):be(a.$slots,"image",{key:1},()=>[ee(See)])],6),E("div",{class:O(s(r).e("description"))},[a.$slots.description?be(a.$slots,"description",{key:0}):(b(),M("p",$ee,$e(s(l)),1))],2),a.$slots.default?(b(),M("div",{key:0,class:O(s(r).e("bottom"))},[be(a.$slots,"default")],2)):se("v-if",!0)],2))}});var Aee=Le(Mee,[["__file","empty.vue"]]);const Py=yt(Aee),zee=Pe({urlList:{type:ue(Array),default:()=>uo([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:ue(String)}}),Iee={close:()=>!0,switch:e=>st(e),rotate:e=>st(e)},Oee=["src","crossorigin"],Nee=N({...N({name:"ElImageViewer"}),props:zee,emits:Iee,setup(e,{expose:t,emit:o}){var r;const l=e,n={CONTAIN:{name:"contain",icon:Nn(L3)},ORIGINAL:{name:"original",icon:Nn(U3)}},{t:a}=Rt(),i=ze("image-viewer"),{nextZIndex:c}=Ki(),d=D(),u=D([]),p=yf(),h=D(!0),v=D(l.initialIndex),m=lo(n.CONTAIN),f=D({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),_=D((r=l.zIndex)!=null?r:c()),g=C(()=>{const{urlList:U}=l;return U.length<=1}),y=C(()=>v.value===0),w=C(()=>v.value===l.urlList.length-1),x=C(()=>l.urlList[v.value]),$=C(()=>[i.e("btn"),i.e("prev"),i.is("disabled",!l.infinite&&y.value)]),T=C(()=>[i.e("btn"),i.e("next"),i.is("disabled",!l.infinite&&w.value)]),R=C(()=>{const{scale:U,deg:oe,offsetX:ne,offsetY:ce,enableTransition:Q}=f.value;let Me=ne/U,de=ce/U;switch(oe%360){case 90:case-270:[Me,de]=[de,-Me];break;case 180:case-180:[Me,de]=[-Me,-de];break;case 270:case-90:[Me,de]=[-de,Me];break}const _e={transform:`scale(${U}) rotate(${oe}deg) translate(${Me}px, ${de}px)`,transition:Q?"transform .3s":""};return m.value.name===n.CONTAIN.name&&(_e.maxWidth=_e.maxHeight="100%"),_e});function P(){V(),o("close")}function L(){const U=Oa(ne=>{switch(ne.code){case lt.esc:l.closeOnPressEscape&&P();break;case lt.space:Z();break;case lt.left:F();break;case lt.up:I("zoomIn");break;case lt.right:K();break;case lt.down:I("zoomOut");break}}),oe=Oa(ne=>{const ce=ne.deltaY||ne.deltaX;I(ce<0?"zoomIn":"zoomOut",{zoomRate:l.zoomRate,enableTransition:!1})});p.run(()=>{oo(document,"keydown",U),oo(document,"wheel",oe)})}function V(){p.stop()}function B(){h.value=!1}function j(U){h.value=!1,U.target.alt=a("el.image.error")}function te(U){if(h.value||U.button!==0||!d.value)return;f.value.enableTransition=!1;const{offsetX:oe,offsetY:ne}=f.value,ce=U.pageX,Q=U.pageY,Me=Oa(_e=>{f.value={...f.value,offsetX:oe+_e.pageX-ce,offsetY:ne+_e.pageY-Q}}),de=oo(document,"mousemove",Me);oo(document,"mouseup",()=>{de()}),U.preventDefault()}function J(){f.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Z(){if(h.value)return;const U=Ri(n),oe=Object.values(n),ne=m.value.name,Q=(oe.findIndex(Me=>Me.name===ne)+1)%U.length;m.value=n[U[Q]],J()}function H(U){const oe=l.urlList.length;v.value=(U+oe)%oe}function F(){y.value&&!l.infinite||H(v.value-1)}function K(){w.value&&!l.infinite||H(v.value+1)}function I(U,oe={}){if(h.value)return;const{minScale:ne,maxScale:ce}=l,{zoomRate:Q,rotateDeg:Me,enableTransition:de}={zoomRate:l.zoomRate,rotateDeg:90,enableTransition:!0,...oe};switch(U){case"zoomOut":f.value.scale>ne&&(f.value.scale=Number.parseFloat((f.value.scale/Q).toFixed(3)));break;case"zoomIn":f.value.scale{et(()=>{const U=u.value[0];U!=null&&U.complete||(h.value=!0)})}),Se(v,U=>{J(),o("switch",U)}),ft(()=>{var U,oe;L(),(oe=(U=d.value)==null?void 0:U.focus)==null||oe.call(U)}),t({setActiveItem:H}),(U,oe)=>(b(),he(hi,{to:"body",disabled:!U.teleported},[ee(Mo,{name:"viewer-fade",appear:""},{default:le(()=>[E("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:O(s(i).e("wrapper")),style:Je({zIndex:_.value})},[E("div",{class:O(s(i).e("mask")),onClick:oe[0]||(oe[0]=ct(ne=>U.hideOnClickModal&&P(),["self"]))},null,2),se(" CLOSE "),E("span",{class:O([s(i).e("btn"),s(i).e("close")]),onClick:P},[ee(s(Ze),null,{default:le(()=>[ee(s(Jr))]),_:1})],2),se(" ARROW "),s(g)?se("v-if",!0):(b(),M(Qe,{key:0},[E("span",{class:O(s($)),onClick:F},[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1})],2),E("span",{class:O(s(T)),onClick:K},[ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})],2)],64)),se(" ACTIONS "),E("div",{class:O([s(i).e("btn"),s(i).e("actions")])},[E("div",{class:O(s(i).e("actions__inner"))},[ee(s(Ze),{onClick:oe[1]||(oe[1]=ne=>I("zoomOut"))},{default:le(()=>[ee(s(Z3))]),_:1}),ee(s(Ze),{onClick:oe[2]||(oe[2]=ne=>I("zoomIn"))},{default:le(()=>[ee(s(mh))]),_:1}),E("i",{class:O(s(i).e("actions__divider"))},null,2),ee(s(Ze),{onClick:Z},{default:le(()=>[(b(),he(Et(s(m).icon)))]),_:1}),E("i",{class:O(s(i).e("actions__divider"))},null,2),ee(s(Ze),{onClick:oe[3]||(oe[3]=ne=>I("anticlockwise"))},{default:le(()=>[ee(s(j3))]),_:1}),ee(s(Ze),{onClick:oe[4]||(oe[4]=ne=>I("clockwise"))},{default:le(()=>[ee(s(K3))]),_:1})],2)],2),se(" CANVAS "),E("div",{class:O(s(i).e("canvas"))},[(b(!0),M(Qe,null,It(U.urlList,(ne,ce)=>mt((b(),M("img",{ref_for:!0,ref:Q=>u.value[ce]=Q,key:ne,src:ne,style:Je(s(R)),class:O(s(i).e("img")),crossorigin:U.crossorigin,onLoad:B,onError:j,onMousedown:te},null,46,Oee)),[[Lt,ce===v.value]])),128))],2),be(U.$slots,"default")],6)]),_:3})],8,["disabled"]))}});var Pee=Le(Nee,[["__file","image-viewer.vue"]]);const Ry=yt(Pee),Ree=Pe({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:ue([String,Object])},previewSrcList:{type:ue(Array),default:()=>uo([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:ue(String)}}),Lee={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>st(e),close:()=>!0,show:()=>!0},Bee=["src","loading","crossorigin"],Vee={key:0},Dee=N({...N({name:"ElImage",inheritAttrs:!1}),props:Ree,emits:Lee,setup(e,{emit:t}){const o=e;let r="";const{t:l}=Rt(),n=ze("image"),a=ya(),i=kh(),c=D(),d=D(!1),u=D(!0),p=D(!1),h=D(),v=D(),m=Nt&&"loading"in HTMLImageElement.prototype;let f,_;const g=C(()=>[n.e("inner"),x.value&&n.e("preview"),u.value&&n.is("loading")]),y=C(()=>a.style),w=C(()=>{const{fit:K}=o;return Nt&&K?{objectFit:K}:{}}),x=C(()=>{const{previewSrcList:K}=o;return Array.isArray(K)&&K.length>0}),$=C(()=>{const{previewSrcList:K,initialIndex:I}=o;let U=I;return I>K.length-1&&(U=0),U}),T=C(()=>o.loading==="eager"?!1:!m&&o.loading==="lazy"||o.lazy),R=()=>{Nt&&(u.value=!0,d.value=!1,c.value=o.src)};function P(K){u.value=!1,d.value=!1,t("load",K)}function L(K){u.value=!1,d.value=!0,t("error",K)}function V(){_E(h.value,v.value)&&(R(),te())}const B=Xb(V,200,!0);async function j(){var K;if(!Nt)return;await et();const{scrollContainer:I}=o;Gr(I)?v.value=I:ut(I)&&I!==""?v.value=(K=document.querySelector(I))!=null?K:void 0:h.value&&(v.value=uh(h.value)),v.value&&(f=oo(v,"scroll",B),setTimeout(()=>V(),100))}function te(){!Nt||!v.value||!B||(f==null||f(),v.value=void 0)}function J(K){if(K.ctrlKey){if(K.deltaY<0)return K.preventDefault(),!1;if(K.deltaY>0)return K.preventDefault(),!1}}function Z(){x.value&&(_=oo("wheel",J,{passive:!1}),r=document.body.style.overflow,document.body.style.overflow="hidden",p.value=!0,t("show"))}function H(){_==null||_(),document.body.style.overflow=r,p.value=!1,t("close")}function F(K){t("switch",K)}return Se(()=>o.src,()=>{T.value?(u.value=!0,d.value=!1,te(),j()):R()}),ft(()=>{T.value?j():R()}),(K,I)=>(b(),M("div",{ref_key:"container",ref:h,class:O([s(n).b(),K.$attrs.class]),style:Je(s(y))},[d.value?be(K.$slots,"error",{key:0},()=>[E("div",{class:O(s(n).e("error"))},$e(s(l)("el.image.error")),3)]):(b(),M(Qe,{key:1},[c.value!==void 0?(b(),M("img",Mt({key:0},s(i),{src:c.value,loading:K.loading,style:s(w),class:s(g),crossorigin:K.crossorigin,onClick:Z,onLoad:P,onError:L}),null,16,Bee)):se("v-if",!0),u.value?(b(),M("div",{key:1,class:O(s(n).e("wrapper"))},[be(K.$slots,"placeholder",{},()=>[E("div",{class:O(s(n).e("placeholder"))},null,2)])],2)):se("v-if",!0)],64)),s(x)?(b(),M(Qe,{key:2},[p.value?(b(),he(s(Ry),{key:0,"z-index":K.zIndex,"initial-index":s($),infinite:K.infinite,"zoom-rate":K.zoomRate,"min-scale":K.minScale,"max-scale":K.maxScale,"url-list":K.previewSrcList,"hide-on-click-modal":K.hideOnClickModal,teleported:K.previewTeleported,"close-on-press-escape":K.closeOnPressEscape,onClose:H,onSwitch:F},{default:le(()=>[K.$slots.viewer?(b(),M("div",Vee,[be(K.$slots,"viewer")])):se("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","hide-on-click-modal","teleported","close-on-press-escape"])):se("v-if",!0)],64)):se("v-if",!0)],6))}});var Hee=Le(Dee,[["__file","image.vue"]]);const Fee=yt(Hee),jee=Pe({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Oo,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||st(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),Kee={[ro]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[yr]:e=>st(e)||jo(e),[St]:e=>st(e)||jo(e)},Uee=["aria-label","onKeydown"],Wee=["aria-label","onKeydown"],qee=N({...N({name:"ElInputNumber"}),props:jee,emits:Kee,setup(e,{expose:t,emit:o}){const r=e,{t:l}=Rt(),n=ze("input-number"),a=D(),i=Dt({currentValue:r.modelValue,userInput:null}),{formItem:c}=sr(),d=C(()=>st(r.modelValue)&&r.modelValue<=r.min),u=C(()=>st(r.modelValue)&&r.modelValue>=r.max),p=C(()=>{const Z=g(r.step);return ko(r.precision)?Math.max(g(r.modelValue),Z):(Z>r.precision,r.precision)}),h=C(()=>r.controls&&r.controlsPosition==="right"),v=So(),m=xr(),f=C(()=>{if(i.userInput!==null)return i.userInput;let Z=i.currentValue;if(jo(Z))return"";if(st(Z)){if(Number.isNaN(Z))return"";ko(r.precision)||(Z=Z.toFixed(r.precision))}return Z}),_=(Z,H)=>{if(ko(H)&&(H=p.value),H===0)return Math.round(Z);let F=String(Z);const K=F.indexOf(".");if(K===-1||!F.replace(".","").split("")[K+H])return Z;const oe=F.length;return F.charAt(oe-1)==="5"&&(F=`${F.slice(0,Math.max(0,oe-1))}6`),Number.parseFloat(Number(F).toFixed(H))},g=Z=>{if(jo(Z))return 0;const H=Z.toString(),F=H.indexOf(".");let K=0;return F!==-1&&(K=H.length-F-1),K},y=(Z,H=1)=>st(Z)?_(Z+r.step*H):i.currentValue,w=()=>{if(r.readonly||m.value||u.value)return;const Z=Number(f.value)||0,H=y(Z);T(H),o(yr,i.currentValue),te()},x=()=>{if(r.readonly||m.value||d.value)return;const Z=Number(f.value)||0,H=y(Z,-1);T(H),o(yr,i.currentValue),te()},$=(Z,H)=>{const{max:F,min:K,step:I,precision:U,stepStrictly:oe,valueOnClear:ne}=r;FF||ceF?F:K,H&&o(St,ce)),ce},T=(Z,H=!0)=>{var F;const K=i.currentValue,I=$(Z);if(!H){o(St,I);return}K===I&&Z||(i.userInput=null,o(St,I),K!==I&&o(ro,I,K),r.validateEvent&&((F=c==null?void 0:c.validate)==null||F.call(c,"change").catch(U=>void 0)),i.currentValue=I)},R=Z=>{i.userInput=Z;const H=Z===""?null:Number(Z);o(yr,H),T(H,!1)},P=Z=>{const H=Z!==""?Number(Z):"";(st(H)&&!Number.isNaN(H)||Z==="")&&T(H),te(),i.userInput=null},L=()=>{var Z,H;(H=(Z=a.value)==null?void 0:Z.focus)==null||H.call(Z)},V=()=>{var Z,H;(H=(Z=a.value)==null?void 0:Z.blur)==null||H.call(Z)},B=Z=>{o("focus",Z)},j=Z=>{var H;i.userInput=null,o("blur",Z),r.validateEvent&&((H=c==null?void 0:c.validate)==null||H.call(c,"blur").catch(F=>void 0))},te=()=>{i.currentValue!==r.modelValue&&(i.currentValue=r.modelValue)},J=Z=>{document.activeElement===Z.target&&Z.preventDefault()};return Se(()=>r.modelValue,(Z,H)=>{const F=$(Z,!0);i.userInput===null&&F!==H&&(i.currentValue=F)},{immediate:!0}),ft(()=>{var Z;const{min:H,max:F,modelValue:K}=r,I=(Z=a.value)==null?void 0:Z.input;if(I.setAttribute("role","spinbutton"),Number.isFinite(F)?I.setAttribute("aria-valuemax",String(F)):I.removeAttribute("aria-valuemax"),Number.isFinite(H)?I.setAttribute("aria-valuemin",String(H)):I.removeAttribute("aria-valuemin"),I.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),I.setAttribute("aria-disabled",String(m.value)),!st(K)&&K!=null){let U=Number(K);Number.isNaN(U)&&(U=null),o(St,U)}I.addEventListener("wheel",J,{passive:!1})}),rn(()=>{var Z,H;const F=(Z=a.value)==null?void 0:Z.input;F==null||F.setAttribute("aria-valuenow",`${(H=i.currentValue)!=null?H:""}`)}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-input-number",ref:"https://element-plus.org/en-US/component/input-number.html"},C(()=>!!r.label)),t({focus:L,blur:V}),(Z,H)=>(b(),M("div",{class:O([s(n).b(),s(n).m(s(v)),s(n).is("disabled",s(m)),s(n).is("without-controls",!Z.controls),s(n).is("controls-right",s(h))]),onDragstart:H[0]||(H[0]=ct(()=>{},["prevent"]))},[Z.controls?mt((b(),M("span",{key:0,role:"button","aria-label":s(l)("el.inputNumber.decrease"),class:O([s(n).e("decrease"),s(n).is("disabled",s(d))]),onKeydown:Gt(x,["enter"])},[be(Z.$slots,"decrease-icon",{},()=>[ee(s(Ze),null,{default:le(()=>[s(h)?(b(),he(s(Pl),{key:0})):(b(),he(s(V3),{key:1}))]),_:1})])],42,Uee)),[[s(ap),x]]):se("v-if",!0),Z.controls?mt((b(),M("span",{key:1,role:"button","aria-label":s(l)("el.inputNumber.increase"),class:O([s(n).e("increase"),s(n).is("disabled",s(u))]),onKeydown:Gt(w,["enter"])},[be(Z.$slots,"increase-icon",{},()=>[ee(s(Ze),null,{default:le(()=>[s(h)?(b(),he(s(Ad),{key:0})):(b(),he(s(hh),{key:1}))]),_:1})])],42,Wee)),[[s(ap),w]]):se("v-if",!0),ee(s(cr),{id:Z.id,ref_key:"input",ref:a,type:"number",step:Z.step,"model-value":s(f),placeholder:Z.placeholder,readonly:Z.readonly,disabled:s(m),size:s(v),max:Z.max,min:Z.min,name:Z.name,"aria-label":Z.label||Z.ariaLabel,"validate-event":!1,onKeydown:[Gt(ct(w,["prevent"]),["up"]),Gt(ct(x,["prevent"]),["down"])],onBlur:j,onFocus:B,onInput:R,onChange:P},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],34))}});var Yee=Le(qee,[["__file","input-number.vue"]]);const Ly=yt(Yee),Gee=Pe({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Xt}}),Xee={click:e=>e instanceof MouseEvent},Zee=["href","target"],Jee=N({...N({name:"ElLink"}),props:Gee,emits:Xee,setup(e,{emit:t}){const o=e,r=ze("link"),l=C(()=>[r.b(),r.m(o.type),r.is("disabled",o.disabled),r.is("underline",o.underline&&!o.disabled)]);function n(a){o.disabled||t("click",a)}return(a,i)=>(b(),M("a",{class:O(s(l)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:n},[a.icon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et(a.icon)))]),_:1})):se("v-if",!0),a.$slots.default?(b(),M("span",{key:1,class:O(s(r).e("inner"))},[be(a.$slots,"default")],2)):se("v-if",!0),a.$slots.icon?be(a.$slots,"icon",{key:2}):se("v-if",!0)],10,Zee))}});var Qee=Le(Jee,[["__file","link.vue"]]);const ete=yt(Qee);let tte=class{constructor(t,o){this.parent=t,this.domNode=o,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,o=>{o.addEventListener("keydown",r=>{let l=!1;switch(r.code){case lt.down:{this.gotoSubIndex(this.subIndex+1),l=!0;break}case lt.up:{this.gotoSubIndex(this.subIndex-1),l=!0;break}case lt.tab:{pd(t,"mouseleave");break}case lt.enter:case lt.space:{l=!0,r.currentTarget.click();break}}return l&&(r.preventDefault(),r.stopPropagation()),!1})})}},ote=class{constructor(t,o){this.domNode=t,this.submenu=null,this.submenu=null,this.init(o)}init(t){this.domNode.setAttribute("tabindex","0");const o=this.domNode.querySelector(`.${t}-menu`);o&&(this.submenu=new tte(this,o)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let o=!1;switch(t.code){case lt.down:{pd(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),o=!0;break}case lt.up:{pd(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),o=!0;break}case lt.tab:{pd(t.currentTarget,"mouseleave");break}case lt.enter:case lt.space:{o=!0,t.currentTarget.click();break}}o&&t.preventDefault()})}},rte=class{constructor(t,o){this.domNode=t,this.init(o)}init(t){const o=this.domNode.childNodes;Array.from(o).forEach(r=>{r.nodeType===1&&new ote(r,t)})}};const lte=N({name:"ElMenuCollapseTransition",setup(){const e=ze("menu");return{listeners:{onBeforeEnter:o=>o.style.opacity="0.2",onEnter(o,r){Zr(o,`${e.namespace.value}-opacity-transition`),o.style.opacity="1",r()},onAfterEnter(o){ar(o,`${e.namespace.value}-opacity-transition`),o.style.opacity=""},onBeforeLeave(o){o.dataset||(o.dataset={}),Xr(o,e.m("collapse"))?(ar(o,e.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),Zr(o,e.m("collapse"))):(Zr(o,e.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),ar(o,e.m("collapse"))),o.style.width=`${o.scrollWidth}px`,o.style.overflow="hidden"},onLeave(o){Zr(o,"horizontal-collapse-transition"),o.style.width=`${o.dataset.scrollWidth}px`}}}}});function nte(e,t,o,r,l,n){return b(),he(Mo,Mt({mode:"out-in"},e.listeners),{default:le(()=>[be(e.$slots,"default")]),_:3},16)}var ate=Le(lte,[["render",nte],["__file","menu-collapse-transition.vue"]]);function By(e,t){const o=C(()=>{let l=e.parent;const n=[t.value];for(;l.type.name!=="ElMenu";)l.props.index&&n.unshift(l.props.index),l=l.parent;return n});return{parentMenu:C(()=>{let l=e.parent;for(;l&&!["ElMenu","ElSubMenu"].includes(l.type.name);)l=l.parent;return l}),indexPath:o}}function ite(e){return C(()=>{const o=e.backgroundColor;return o?new q4(o).shade(20).toString():""})}const Vy=(e,t)=>{const o=ze("menu");return C(()=>o.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":ite(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},ste=Pe({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Xt},expandOpenIcon:{type:Xt},collapseCloseIcon:{type:Xt},collapseOpenIcon:{type:Xt}}),Gv="ElSubMenu";var Xv=N({name:Gv,props:ste,setup(e,{slots:t,expose:o}){const r=wt(),{indexPath:l,parentMenu:n}=By(r,C(()=>e.index)),a=ze("menu"),i=ze("sub-menu"),c=Ge("rootMenu");c||Io(Gv,"can not inject root menu");const d=Ge(`subMenu:${n.value.uid}`);d||Io(Gv,"can not inject sub menu");const u=D({}),p=D({});let h;const v=D(!1),m=D(),f=D(null),_=C(()=>P.value==="horizontal"&&y.value?"bottom-start":"right-start"),g=C(()=>P.value==="horizontal"&&y.value||P.value==="vertical"&&!c.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?T.value?e.expandOpenIcon:e.expandCloseIcon:Pl:e.collapseCloseIcon&&e.collapseOpenIcon?T.value?e.collapseOpenIcon:e.collapseCloseIcon:ir),y=C(()=>d.level===0),w=C(()=>{const U=e.teleported;return U===void 0?y.value:U}),x=C(()=>c.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),$=C(()=>P.value==="horizontal"&&y.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),T=C(()=>c.openedMenus.includes(e.index)),R=C(()=>{let U=!1;return Object.values(u.value).forEach(oe=>{oe.active&&(U=!0)}),Object.values(p.value).forEach(oe=>{oe.active&&(U=!0)}),U}),P=C(()=>c.props.mode),L=Dt({index:e.index,indexPath:l,active:R}),V=Vy(c.props,d.level+1),B=C(()=>{var U;return(U=e.popperOffset)!=null?U:c.props.popperOffset}),j=C(()=>{var U;return(U=e.popperClass)!=null?U:c.props.popperClass}),te=C(()=>{var U;return(U=e.showTimeout)!=null?U:c.props.showTimeout}),J=C(()=>{var U;return(U=e.hideTimeout)!=null?U:c.props.hideTimeout}),Z=()=>{var U,oe,ne;return(ne=(oe=(U=f.value)==null?void 0:U.popperRef)==null?void 0:oe.popperInstanceRef)==null?void 0:ne.destroy()},H=U=>{U||Z()},F=()=>{c.props.menuTrigger==="hover"&&c.props.mode==="horizontal"||c.props.collapse&&c.props.mode==="vertical"||e.disabled||c.handleSubMenuClick({index:e.index,indexPath:l.value,active:R.value})},K=(U,oe=te.value)=>{var ne;if(U.type!=="focus"){if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"||e.disabled){d.mouseInChild.value=!0;return}d.mouseInChild.value=!0,h==null||h(),{stop:h}=$a(()=>{c.openMenu(e.index,l.value)},oe),w.value&&((ne=n.value.vnode.el)==null||ne.dispatchEvent(new MouseEvent("mouseenter")))}},I=(U=!1)=>{var oe;if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"){d.mouseInChild.value=!1;return}h==null||h(),d.mouseInChild.value=!1,{stop:h}=$a(()=>!v.value&&c.closeMenu(e.index,l.value),J.value),w.value&&U&&((oe=d.handleMouseleave)==null||oe.call(d,!0))};Se(()=>c.props.collapse,U=>H(!!U));{const U=ne=>{p.value[ne.index]=ne},oe=ne=>{delete p.value[ne.index]};zt(`subMenu:${r.uid}`,{addSubMenu:U,removeSubMenu:oe,handleMouseleave:I,mouseInChild:v,level:d.level+1})}return o({opened:T}),ft(()=>{c.addSubMenu(L),d.addSubMenu(L)}),to(()=>{d.removeSubMenu(L),c.removeSubMenu(L)}),()=>{var U;const oe=[(U=t.title)==null?void 0:U.call(t),rt(Ze,{class:i.e("icon-arrow"),style:{transform:T.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&c.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>ut(g.value)?rt(r.appContext.components[g.value]):rt(g.value)})],ne=c.isMenuPopup?rt(ur,{ref:f,visible:T.value,effect:"light",pure:!0,offset:B.value,showArrow:!1,persistent:!0,popperClass:j.value,placement:_.value,teleported:w.value,fallbackPlacements:$.value,transition:x.value,gpuAcceleration:!1},{content:()=>{var ce;return rt("div",{class:[a.m(P.value),a.m("popup-container"),j.value],onMouseenter:Q=>K(Q,100),onMouseleave:()=>I(!0),onFocus:Q=>K(Q,100)},[rt("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${_.value}`)],style:V.value},[(ce=t.default)==null?void 0:ce.call(t)])])},default:()=>rt("div",{class:i.e("title"),onClick:F},oe)}):rt(Qe,{},[rt("div",{class:i.e("title"),ref:m,onClick:F},oe),rt(gp,{},{default:()=>{var ce;return mt(rt("ul",{role:"menu",class:[a.b(),a.m("inline")],style:V.value},[(ce=t.default)==null?void 0:ce.call(t)]),[[Lt,T.value]])}})]);return rt("li",{class:[i.b(),i.is("active",R.value),i.is("opened",T.value),i.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:T.value,onMouseenter:K,onMouseleave:()=>I(),onFocus:K},[ne])}}});const cte=Pe({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ue(Array),default:()=>uo([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:Xt,default:()=>D3},popperEffect:{type:String,values:["dark","light"],default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),Zv=e=>Array.isArray(e)&&e.every(t=>ut(t));var ute=N({name:"ElMenu",props:cte,emits:{close:(e,t)=>ut(e)&&Zv(t),open:(e,t)=>ut(e)&&Zv(t),select:(e,t,o,r)=>ut(e)&&Zv(t)&&xt(o)&&(r===void 0||r instanceof Promise)},setup(e,{emit:t,slots:o,expose:r}){const l=wt(),n=l.appContext.config.globalProperties.$router,a=D(),i=ze("menu"),c=ze("sub-menu"),d=D(-1),u=D(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),p=D(e.defaultActive),h=D({}),v=D({}),m=C(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),f=()=>{const J=p.value&&h.value[p.value];if(!J||e.mode==="horizontal"||e.collapse)return;J.indexPath.forEach(H=>{const F=v.value[H];F&&_(H,F.indexPath)})},_=(J,Z)=>{u.value.includes(J)||(e.uniqueOpened&&(u.value=u.value.filter(H=>Z.includes(H))),u.value.push(J),t("open",J,Z))},g=J=>{const Z=u.value.indexOf(J);Z!==-1&&u.value.splice(Z,1)},y=(J,Z)=>{g(J),t("close",J,Z)},w=({index:J,indexPath:Z})=>{u.value.includes(J)?y(J,Z):_(J,Z)},x=J=>{(e.mode==="horizontal"||e.collapse)&&(u.value=[]);const{index:Z,indexPath:H}=J;if(!(jo(Z)||jo(H)))if(e.router&&n){const F=J.route||Z,K=n.push(F).then(I=>(I||(p.value=Z),I));t("select",Z,H,{index:Z,indexPath:H,route:F},K)}else p.value=Z,t("select",Z,H,{index:Z,indexPath:H})},$=J=>{const Z=h.value,H=Z[J]||p.value&&Z[p.value]||Z[e.defaultActive];H?p.value=H.index:p.value=J},T=J=>{const Z=getComputedStyle(J),H=Number.parseInt(Z.marginLeft,10),F=Number.parseInt(Z.marginRight,10);return J.offsetWidth+H+F||0},R=()=>{var J,Z;if(!a.value)return-1;const H=Array.from((Z=(J=a.value)==null?void 0:J.childNodes)!=null?Z:[]).filter(Q=>Q.nodeName!=="#comment"&&(Q.nodeName!=="#text"||Q.nodeValue)),F=64,K=getComputedStyle(a.value),I=Number.parseInt(K.paddingLeft,10),U=Number.parseInt(K.paddingRight,10),oe=a.value.clientWidth-I-U;let ne=0,ce=0;return H.forEach((Q,Me)=>{ne+=T(Q),ne<=oe-F&&(ce=Me+1)}),ce===H.length?-1:ce},P=J=>v.value[J].indexPath,L=(J,Z=33.34)=>{let H;return()=>{H&&clearTimeout(H),H=setTimeout(()=>{J()},Z)}};let V=!0;const B=()=>{if(d.value===R())return;const J=()=>{d.value=-1,et(()=>{d.value=R()})};V?J():L(J)(),V=!1};Se(()=>e.defaultActive,J=>{h.value[J]||(p.value=""),$(J)}),Se(()=>e.collapse,J=>{J&&(u.value=[])}),Se(h.value,f);let j;Go(()=>{e.mode==="horizontal"&&e.ellipsis?j=so(a,B).stop:j==null||j()});const te=D(!1);{const J=K=>{v.value[K.index]=K},Z=K=>{delete v.value[K.index]};zt("rootMenu",Dt({props:e,openedMenus:u,items:h,subMenus:v,activeIndex:p,isMenuPopup:m,addMenuItem:K=>{h.value[K.index]=K},removeMenuItem:K=>{delete h.value[K.index]},addSubMenu:J,removeSubMenu:Z,openMenu:_,closeMenu:y,handleMenuItemClick:x,handleSubMenuClick:w})),zt(`subMenu:${l.uid}`,{addSubMenu:J,removeSubMenu:Z,mouseInChild:te,level:0})}return ft(()=>{e.mode==="horizontal"&&new rte(l.vnode.el,i.namespace.value)}),r({open:Z=>{const{indexPath:H}=v.value[Z];H.forEach(F=>_(F,H))},close:g,handleResize:B}),()=>{var J,Z;let H=(Z=(J=o.default)==null?void 0:J.call(o))!=null?Z:[];const F=[];if(e.mode==="horizontal"&&a.value){const oe=Qn(H),ne=d.value===-1?oe:oe.slice(0,d.value),ce=d.value===-1?[]:oe.slice(d.value);ce!=null&&ce.length&&e.ellipsis&&(H=ne,F.push(rt(Xv,{index:"sub-menu-more",class:c.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>rt(Ze,{class:c.e("icon-more")},{default:()=>rt(e.ellipsisIcon)}),default:()=>ce})))}const K=Vy(e,0),I=e.closeOnClickOutside?[[xn,()=>{u.value.length&&(te.value||(u.value.forEach(oe=>t("close",oe,P(oe))),u.value=[]))}]]:[],U=mt(rt("ul",{key:String(e.collapse),role:"menubar",ref:a,style:K.value,class:{[i.b()]:!0,[i.m(e.mode)]:!0,[i.m("collapse")]:e.collapse}},[...H,...F]),I);return e.collapseTransition&&e.mode==="vertical"?rt(ate,()=>U):U}}});const dte=Pe({index:{type:ue([String,null]),default:null},route:{type:ue([String,Object])},disabled:Boolean}),pte={click:e=>ut(e.index)&&Array.isArray(e.indexPath)},Jv="ElMenuItem",fte=N({name:Jv,components:{ElTooltip:ur},props:dte,emits:pte,setup(e,{emit:t}){const o=wt(),r=Ge("rootMenu"),l=ze("menu"),n=ze("menu-item");r||Io(Jv,"can not inject root menu");const{parentMenu:a,indexPath:i}=By(o,Yt(e,"index")),c=Ge(`subMenu:${a.value.uid}`);c||Io(Jv,"can not inject sub menu");const d=C(()=>e.index===r.activeIndex),u=Dt({index:e.index,indexPath:i,active:d}),p=()=>{e.disabled||(r.handleMenuItemClick({index:e.index,indexPath:i.value,route:e.route}),t("click",u))};return ft(()=>{c.addSubMenu(u),r.addMenuItem(u)}),to(()=>{c.removeSubMenu(u),r.removeMenuItem(u)}),{parentMenu:a,rootMenu:r,active:d,nsMenu:l,nsMenuItem:n,handleClick:p}}});function hte(e,t,o,r,l,n){const a=nt("el-tooltip");return b(),M("li",{class:O([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(b(),he(a,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:le(()=>[be(e.$slots,"title")]),default:le(()=>[E("div",{class:O(e.nsMenu.be("tooltip","trigger"))},[be(e.$slots,"default")],2)]),_:3},8,["effect"])):(b(),M(Qe,{key:1},[be(e.$slots,"default"),be(e.$slots,"title")],64))],2)}var Dy=Le(fte,[["render",hte],["__file","menu-item.vue"]]);const vte=N({name:"ElMenuItemGroup",props:{title:String},setup(){return{ns:ze("menu-item-group")}}});function mte(e,t,o,r,l,n){return b(),M("li",{class:O(e.ns.b())},[E("div",{class:O(e.ns.e("title"))},[e.$slots.title?be(e.$slots,"title",{key:1}):(b(),M(Qe,{key:0},[Ct($e(e.title),1)],64))],2),E("ul",null,[be(e.$slots,"default")])],2)}var Hy=Le(vte,[["render",mte],["__file","menu-item-group.vue"]]);const gte=yt(ute,{MenuItem:Dy,MenuItemGroup:Hy,SubMenu:Xv}),bte=co(Dy),_te=co(Hy),wte=co(Xv),yte=Pe({icon:{type:Xt,default:()=>z3},title:String,content:{type:String,default:""}}),xte={back:()=>!0},kte=["aria-label"],Cte=N({...N({name:"ElPageHeader"}),props:yte,emits:xte,setup(e,{emit:t}){const o=Do(),{t:r}=Rt(),l=ze("page-header"),n=C(()=>[l.b(),{[l.m("has-breadcrumb")]:!!o.breadcrumb,[l.m("has-extra")]:!!o.extra,[l.is("contentful")]:!!o.default}]);function a(){t("back")}return(i,c)=>(b(),M("div",{class:O(s(n))},[i.$slots.breadcrumb?(b(),M("div",{key:0,class:O(s(l).e("breadcrumb"))},[be(i.$slots,"breadcrumb")],2)):se("v-if",!0),E("div",{class:O(s(l).e("header"))},[E("div",{class:O(s(l).e("left"))},[E("div",{class:O(s(l).e("back")),role:"button",tabindex:"0",onClick:a},[i.icon||i.$slots.icon?(b(),M("div",{key:0,"aria-label":i.title||s(r)("el.pageHeader.title"),class:O(s(l).e("icon"))},[be(i.$slots,"icon",{},()=>[i.icon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et(i.icon)))]),_:1})):se("v-if",!0)])],10,kte)):se("v-if",!0),E("div",{class:O(s(l).e("title"))},[be(i.$slots,"title",{},()=>[Ct($e(i.title||s(r)("el.pageHeader.title")),1)])],2)],2),ee(s(Cy),{direction:"vertical"}),E("div",{class:O(s(l).e("content"))},[be(i.$slots,"content",{},()=>[Ct($e(i.content),1)])],2)],2),i.$slots.extra?(b(),M("div",{key:0,class:O(s(l).e("extra"))},[be(i.$slots,"extra")],2)):se("v-if",!0)],2),i.$slots.default?(b(),M("div",{key:1,class:O(s(l).e("main"))},[be(i.$slots,"default")],2)):se("v-if",!0)],2))}});var Ste=Le(Cte,[["__file","page-header.vue"]]);const Ete=yt(Ste),Fy=Symbol("elPaginationKey"),Tte=Pe({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Xt}}),$te={click:e=>e instanceof MouseEvent},Mte=["disabled","aria-label","aria-disabled"],Ate={key:0},zte=N({...N({name:"ElPaginationPrev"}),props:Tte,emits:$te,setup(e){const t=e,{t:o}=Rt(),r=C(()=>t.disabled||t.currentPage<=1);return(l,n)=>(b(),M("button",{type:"button",class:"btn-prev",disabled:s(r),"aria-label":l.prevText||s(o)("el.pagination.prev"),"aria-disabled":s(r),onClick:n[0]||(n[0]=a=>l.$emit("click",a))},[l.prevText?(b(),M("span",Ate,$e(l.prevText),1)):(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(l.prevIcon)))]),_:1}))],8,Mte))}});var Ite=Le(zte,[["__file","prev.vue"]]);const Ote=Pe({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Xt}}),Nte=["disabled","aria-label","aria-disabled"],Pte={key:0},Rte=N({...N({name:"ElPaginationNext"}),props:Ote,emits:["click"],setup(e){const t=e,{t:o}=Rt(),r=C(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(l,n)=>(b(),M("button",{type:"button",class:"btn-next",disabled:s(r),"aria-label":l.nextText||s(o)("el.pagination.next"),"aria-disabled":s(r),onClick:n[0]||(n[0]=a=>l.$emit("click",a))},[l.nextText?(b(),M("span",Pte,$e(l.nextText),1)):(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(l.nextIcon)))]),_:1}))],8,Nte))}});var Lte=Le(Rte,[["__file","next.vue"]]);const jy=Symbol("ElSelectGroup"),ls=Symbol("ElSelect");function Bte(e,t){const o=Ge(ls),r=Ge(jy,{disabled:!1}),l=C(()=>o.props.multiple?u(o.props.modelValue,e.value):u([o.props.modelValue],e.value)),n=C(()=>{if(o.props.multiple){const v=o.props.modelValue||[];return!l.value&&v.length>=o.props.multipleLimit&&o.props.multipleLimit>0}else return!1}),a=C(()=>e.label||(xt(e.value)?"":e.value)),i=C(()=>e.value||e.label||""),c=C(()=>e.disabled||t.groupDisabled||n.value),d=wt(),u=(v=[],m)=>{if(xt(e.value)){const f=o.props.valueKey;return v&&v.some(_=>jt(wo(_,f))===wo(m,f))}else return v&&v.includes(m)},p=()=>{!e.disabled&&!r.disabled&&(o.states.hoveringIndex=o.optionsArray.indexOf(d.proxy))},h=v=>{const m=new RegExp(ch(v),"i");t.visible=m.test(a.value)||e.created};return Se(()=>a.value,()=>{!e.created&&!o.props.remote&&o.setSelected()}),Se(()=>e.value,(v,m)=>{const{remote:f,valueKey:_}=o.props;if(nr(v,m)||(o.onOptionDestroy(m,d.proxy),o.onOptionCreate(d.proxy)),!e.created&&!f){if(_&&xt(v)&&xt(m)&&v[_]===m[_])return;o.setSelected()}}),Se(()=>r.disabled,()=>{t.groupDisabled=r.disabled},{immediate:!0}),{select:o,currentLabel:a,currentValue:i,itemSelected:l,isDisabled:c,hoverItem:p,updateOption:h}}const Vte=N({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=ze("select"),o=Qo(),r=C(()=>[t.be("dropdown","item"),t.is("disabled",s(i)),t.is("selected",s(a)),t.is("hovering",s(h))]),l=Dt({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:n,itemSelected:a,isDisabled:i,select:c,hoverItem:d,updateOption:u}=Bte(e,l),{visible:p,hover:h}=Bo(l),v=wt().proxy;c.onOptionCreate(v),to(()=>{const f=v.value,{selected:_}=c.states,y=(c.props.multiple?_:[_]).some(w=>w.value===v.value);et(()=>{c.states.cachedOptions.get(f)===v&&!y&&c.states.cachedOptions.delete(f)}),c.onOptionDestroy(f,v)});function m(){e.disabled!==!0&&l.groupDisabled!==!0&&c.handleOptionSelect(v)}return{ns:t,id:o,containerKls:r,currentLabel:n,itemSelected:a,isDisabled:i,select:c,hoverItem:d,updateOption:u,visible:p,hover:h,selectOptionClick:m,states:l}}}),Dte=["id","aria-disabled","aria-selected"];function Hte(e,t,o,r,l,n){return mt((b(),M("li",{id:e.id,class:O(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=ct((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[be(e.$slots,"default",{},()=>[E("span",null,$e(e.currentLabel),1)])],42,Dte)),[[Lt,e.visible]])}var Qv=Le(Vte,[["render",Hte],["__file","option.vue"]]);const Fte=N({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Ge(ls),t=ze("select"),o=C(()=>e.props.popperClass),r=C(()=>e.props.multiple),l=C(()=>e.props.fitInputWidth),n=D("");function a(){var i;n.value=`${(i=e.selectRef)==null?void 0:i.offsetWidth}px`}return ft(()=>{a(),so(e.selectRef,a)}),{ns:t,minWidth:n,popperClass:o,isMultiple:r,isFitInputWidth:l}}});function jte(e,t,o,r,l,n){return b(),M("div",{class:O([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Je({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(b(),M("div",{key:0,class:O(e.ns.be("dropdown","header"))},[be(e.$slots,"header")],2)):se("v-if",!0),be(e.$slots,"default"),e.$slots.footer?(b(),M("div",{key:1,class:O(e.ns.be("dropdown","footer"))},[be(e.$slots,"footer")],2)):se("v-if",!0)],6)}var Kte=Le(Fte,[["render",jte],["__file","select-dropdown.vue"]]);function Ky(e){const t=D(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:n=>{const a=n.target.value,i=a[a.length-1]||"";t.value=!xh(i)},handleCompositionEnd:n=>{t.value&&(t.value=!1,it(e)&&e(n))}}}const Ute=11,Wte=(e,t)=>{const{t:o}=Rt(),r=Qo(),l=ze("select"),n=ze("input"),a=Dt({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),i=D(null),c=D(null),d=D(null),u=D(null),p=D(null),h=D(null),v=D(null),m=D(null),f=D(null),_=D(null),g=D(null),y=D(null),{wrapperRef:w,isFocused:x,handleFocus:$,handleBlur:T}=Ud(p,{afterFocus(){e.automaticDropdown&&!R.value&&(R.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(He){var ot,eo;return((ot=d.value)==null?void 0:ot.isFocusInsideContent(He))||((eo=u.value)==null?void 0:eo.isFocusInsideContent(He))},afterBlur(){R.value=!1,a.menuVisibleOnFocus=!1}}),R=D(!1),P=D(),{form:L,formItem:V}=sr(),{inputId:B}=bl(e,{formItemContext:V}),{valueOnClear:j,isEmptyValue:te}=Wd(e),J=C(()=>e.disabled||(L==null?void 0:L.disabled)),Z=C(()=>e.multiple?Ke(e.modelValue)&&e.modelValue.length>0:!te(e.modelValue)),H=C(()=>e.clearable&&!J.value&&a.inputHovering&&Z.value),F=C(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),K=C(()=>l.is("reverse",F.value&&R.value)),I=C(()=>(V==null?void 0:V.validateState)||""),U=C(()=>_h[I.value]),oe=C(()=>e.remote?300:0),ne=C(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!a.inputValue&&a.options.size===0?!1:e.filterable&&a.inputValue&&a.options.size>0&&ce.value===0?e.noMatchText||o("el.select.noMatch"):a.options.size===0?e.noDataText||o("el.select.noData"):null),ce=C(()=>Q.value.filter(He=>He.visible).length),Q=C(()=>{const He=Array.from(a.options.values()),ot=[];return a.optionValues.forEach(eo=>{const ao=He.findIndex(Po=>Po.value===eo);ao>-1&&ot.push(He[ao])}),ot.length>=He.length?ot:He}),Me=C(()=>Array.from(a.cachedOptions.values())),de=C(()=>{const He=Q.value.filter(ot=>!ot.created).some(ot=>ot.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!He}),_e=()=>{e.filterable&&it(e.filterMethod)||e.filterable&&e.remote&&it(e.remoteMethod)||Q.value.forEach(He=>{var ot;(ot=He.updateOption)==null||ot.call(He,a.inputValue)})},me=So(),Re=C(()=>["small"].includes(me.value)?"small":"default"),Ce=C({get(){return R.value&&ne.value!==!1},set(He){R.value=He}}),Ee=C(()=>Ke(e.modelValue)?e.modelValue.length===0&&!a.inputValue:e.filterable?!a.inputValue:!0),De=C(()=>{var He;const ot=(He=e.placeholder)!=null?He:o("el.select.placeholder");return e.multiple||!Z.value?ot:a.selectedLabel}),ae=C(()=>A0?null:"mouseenter");Se(()=>e.modelValue,(He,ot)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",pe("")),Oe(),!nr(He,ot)&&e.validateEvent&&(V==null||V.validate("change").catch(eo=>void 0))},{flush:"post",deep:!0}),Se(()=>R.value,He=>{He?pe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",He)}),Se(()=>a.options.entries(),()=>{var He;if(!Nt)return;const ot=((He=i.value)==null?void 0:He.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!ko(e.modelValue)||!Array.from(ot).includes(document.activeElement))&&Oe(),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value&&ke()},{flush:"post"}),Se(()=>a.hoveringIndex,He=>{st(He)&&He>-1?P.value=Q.value[He]||{}:P.value={},Q.value.forEach(ot=>{ot.hover=P.value===ot})}),Go(()=>{a.isBeforeHide||_e()});const pe=He=>{a.previousQuery!==He&&(a.previousQuery=He,e.filterable&&it(e.filterMethod)?e.filterMethod(He):e.filterable&&e.remote&&it(e.remoteMethod)&&e.remoteMethod(He),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value?et(ke):et(Te))},ke=()=>{const He=Q.value.filter(ao=>ao.visible&&!ao.disabled&&!ao.states.groupDisabled),ot=He.find(ao=>ao.created),eo=He[0];a.hoveringIndex=G(Q.value,ot||eo)},Oe=()=>{if(e.multiple)a.selectedLabel="";else{const ot=we(e.modelValue);a.selectedLabel=ot.currentLabel,a.selected=ot;return}const He=[];Ke(e.modelValue)&&e.modelValue.forEach(ot=>{He.push(we(ot))}),a.selected=He},we=He=>{let ot;const eo=mu(He).toLowerCase()==="object",ao=mu(He).toLowerCase()==="null",Po=mu(He).toLowerCase()==="undefined";for(let fr=a.cachedOptions.size-1;fr>=0;fr--){const hr=Me.value[fr];if(eo?wo(hr.value,e.valueKey)===wo(He,e.valueKey):hr.value===He){ot={value:He,currentLabel:hr.currentLabel,get isDisabled(){return hr.isDisabled}};break}}if(ot)return ot;const Pr=eo?He.label:!ao&&!Po?He:"";return{value:He,currentLabel:Pr}},Te=()=>{e.multiple?a.hoveringIndex=Q.value.findIndex(He=>a.selected.some(ot=>Or(ot)===Or(He))):a.hoveringIndex=Q.value.findIndex(He=>Or(He)===Or(a.selected))},Ne=()=>{a.selectionWidth=c.value.getBoundingClientRect().width},Ie=()=>{a.calculatorWidth=h.value.getBoundingClientRect().width},Ae=()=>{a.collapseItemWidth=g.value.getBoundingClientRect().width},xe=()=>{var He,ot;(ot=(He=d.value)==null?void 0:He.updatePopper)==null||ot.call(He)},We=()=>{var He,ot;(ot=(He=u.value)==null?void 0:He.updatePopper)==null||ot.call(He)},qe=()=>{a.inputValue.length>0&&!R.value&&(R.value=!0),pe(a.inputValue)},ye=He=>{if(a.inputValue=He.target.value,e.remote)Ye();else return qe()},Ye=Mr(()=>{qe()},oe.value),tt=He=>{nr(e.modelValue,He)||t(ro,He)},pt=He=>k3(He,ot=>!a.disabledOptions.has(ot)),dt=He=>{if(e.multiple&&He.code!==lt.delete&&He.target.value.length<=0){const ot=e.modelValue.slice(),eo=pt(ot);if(eo<0)return;const ao=ot[eo];ot.splice(eo,1),t(St,ot),tt(ot),t("remove-tag",ao)}},Y=(He,ot)=>{const eo=a.selected.indexOf(ot);if(eo>-1&&!J.value){const ao=e.modelValue.slice();ao.splice(eo,1),t(St,ao),tt(ao),t("remove-tag",ot.value)}He.stopPropagation(),no()},S=He=>{He.stopPropagation();const ot=e.multiple?[]:j.value;if(e.multiple)for(const eo of a.selected)eo.isDisabled&&ot.push(eo.value);t(St,ot),tt(ot),a.hoveringIndex=-1,R.value=!1,t("clear"),no()},A=He=>{if(e.multiple){const ot=(e.modelValue||[]).slice(),eo=G(ot,He.value);eo>-1?ot.splice(eo,1):(e.multipleLimit<=0||ot.length{X(He)})},G=(He=[],ot)=>{if(!xt(ot))return He.indexOf(ot);const eo=e.valueKey;let ao=-1;return He.some((Po,Pr)=>jt(wo(Po,eo))===wo(ot,eo)?(ao=Pr,!0):!1),ao},X=He=>{var ot,eo,ao,Po,Pr;const Wl=Ke(He)?He[0]:He;let fr=null;if(Wl!=null&&Wl.value){const hr=Q.value.filter(ql=>ql.value===Wl.value);hr.length>0&&(fr=hr[0].$el)}if(d.value&&fr){const hr=(Po=(ao=(eo=(ot=d.value)==null?void 0:ot.popperRef)==null?void 0:eo.contentRef)==null?void 0:ao.querySelector)==null?void 0:Po.call(ao,`.${l.be("dropdown","wrap")}`);hr&&$3(hr,fr)}(Pr=y.value)==null||Pr.handleScroll()},re=He=>{a.options.set(He.value,He),a.cachedOptions.set(He.value,He),He.disabled&&a.disabledOptions.set(He.value,He)},ge=(He,ot)=>{a.options.get(He)===ot&&a.options.delete(He)},{handleCompositionStart:fe,handleCompositionUpdate:Fe,handleCompositionEnd:at}=Ky(He=>ye(He)),_t=C(()=>{var He,ot;return(ot=(He=d.value)==null?void 0:He.popperRef)==null?void 0:ot.contentRef}),At=()=>{a.isBeforeHide=!1,et(()=>X(a.selected))},no=()=>{var He;(He=p.value)==null||He.focus()},bt=()=>{Sn()},Qt=He=>{S(He)},Sn=He=>{if(R.value=!1,x.value){const ot=new FocusEvent("focus",He);et(()=>T(ot))}},qo=()=>{a.inputValue.length>0?a.inputValue="":R.value=!1},xl=()=>{J.value||(A0&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:R.value=!R.value)},kl=()=>{R.value?Q.value[a.hoveringIndex]&&A(Q.value[a.hoveringIndex]):xl()},Or=He=>xt(He.value)?wo(He.value,e.valueKey):He.value,Bt=C(()=>Q.value.filter(He=>He.visible).every(He=>He.disabled)),pr=C(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),or=C(()=>e.multiple?e.collapseTags?a.selected.slice(e.maxCollapseTags):[]:[]),Nr=He=>{if(!R.value){R.value=!0;return}if(!(a.options.size===0||ce.value===0)&&!Bt.value){He==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):He==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const ot=Q.value[a.hoveringIndex];(ot.disabled===!0||ot.states.groupDisabled===!0||!ot.visible)&&Nr(He),et(()=>X(P.value))}},yo=()=>{if(!c.value)return 0;const He=window.getComputedStyle(c.value);return Number.parseFloat(He.gap||"6px")},Eo=C(()=>{const He=yo();return{maxWidth:`${g.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-He:a.selectionWidth}px`}}),rr=C(()=>({maxWidth:`${a.selectionWidth}px`})),ua=C(()=>({width:`${Math.max(a.calculatorWidth,Ute)}px`}));return e.multiple&&!Ke(e.modelValue)&&t(St,[]),!e.multiple&&Ke(e.modelValue)&&t(St,""),so(c,Ne),so(h,Ie),so(f,xe),so(w,xe),so(_,We),so(g,Ae),ft(()=>{Oe()}),{inputId:B,contentId:r,nsSelect:l,nsInput:n,states:a,isFocused:x,expanded:R,optionsArray:Q,hoverOption:P,selectSize:me,filteredOptionsCount:ce,resetCalculatorWidth:Ie,updateTooltip:xe,updateTagTooltip:We,debouncedOnInputChange:Ye,onInput:ye,deletePrevTag:dt,deleteTag:Y,deleteSelected:S,handleOptionSelect:A,scrollToOption:X,hasModelValue:Z,shouldShowPlaceholder:Ee,currentPlaceholder:De,mouseEnterEventName:ae,showClose:H,iconComponent:F,iconReverse:K,validateState:I,validateIcon:U,showNewOption:de,updateOptions:_e,collapseTagSize:Re,setSelected:Oe,selectDisabled:J,emptyText:ne,handleCompositionStart:fe,handleCompositionUpdate:Fe,handleCompositionEnd:at,onOptionCreate:re,onOptionDestroy:ge,handleMenuEnter:At,handleFocus:$,focus:no,blur:bt,handleBlur:T,handleClearClick:Qt,handleClickOutside:Sn,handleEsc:qo,toggleMenu:xl,selectOption:kl,getValueKey:Or,navigateOptions:Nr,dropdownMenuVisible:Ce,showTagList:pr,collapseTagList:or,tagStyle:Eo,collapseTagStyle:rr,inputStyle:ua,popperRef:_t,inputRef:p,tooltipRef:d,tagTooltipRef:u,calculatorRef:h,prefixRef:v,suffixRef:m,selectRef:i,wrapperRef:w,selectionRef:c,scrollbarRef:y,menuRef:f,tagMenuRef:_,collapseItemRef:g}};var qte=N({name:"ElOptions",setup(e,{slots:t}){const o=Ge(ls);let r=[];return()=>{var l,n;const a=(l=t.default)==null?void 0:l.call(t),i=[];function c(d){Ke(d)&&d.forEach(u=>{var p,h,v,m;const f=(p=(u==null?void 0:u.type)||{})==null?void 0:p.name;f==="ElOptionGroup"?c(!ut(u.children)&&!Ke(u.children)&&it((h=u.children)==null?void 0:h.default)?(v=u.children)==null?void 0:v.default():u.children):f==="ElOption"?i.push((m=u.props)==null?void 0:m.value):Ke(u.children)&&c(u.children)})}return a.length&&c((n=a[0])==null?void 0:n.children),nr(i,r)||(r=i,o&&(o.states.optionValues=i)),a}}});const Yte=Pe({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Oo,effect:{type:ue(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:ue(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Uo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Xt,default:hn},fitInputWidth:Boolean,suffixIcon:{type:Xt,default:Pl},tagType:{...hp.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:ue(String),values:Va,default:"bottom-start"},fallbackPlacements:{type:ue(Array),default:["bottom-start","top-start","right","left"]},...Xi,...Zo(["ariaLabel"])}),Uy="ElSelect",Gte=N({name:Uy,componentName:Uy,components:{ElInput:cr,ElSelectMenu:Kte,ElOption:Qv,ElOptions:qte,ElTag:Rc,ElScrollbar:wn,ElTooltip:ur,ElIcon:Ze},directives:{ClickOutside:xn},props:Yte,emits:[St,ro,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=Wte(e,t);return zt(ls,Dt({props:e,states:o.states,optionsArray:o.optionsArray,handleOptionSelect:o.handleOptionSelect,onOptionCreate:o.onOptionCreate,onOptionDestroy:o.onOptionDestroy,selectRef:o.selectRef,setSelected:o.setSelected})),{...o}}}),Xte=["id","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Zte=["textContent"],Jte={key:1};function Qte(e,t,o,r,l,n){const a=nt("el-tag"),i=nt("el-tooltip"),c=nt("el-icon"),d=nt("el-option"),u=nt("el-options"),p=nt("el-scrollbar"),h=nt("el-select-menu"),v=Ou("click-outside");return mt((b(),M("div",{ref:"selectRef",class:O([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[As(e.mouseEnterEventName)]:t[16]||(t[16]=m=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=m=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=ct((...m)=>e.toggleMenu&&e.toggleMenu(...m),["prevent","stop"]))},[ee(i,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=m=>e.states.isBeforeHide=!1)},{default:le(()=>{var m;return[E("div",{ref:"wrapperRef",class:O([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(b(),M("div",{key:0,ref:"prefixRef",class:O(e.nsSelect.e("prefix"))},[be(e.$slots,"prefix")],2)):se("v-if",!0),E("div",{ref:"selectionRef",class:O([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?be(e.$slots,"tag",{key:0},()=>[(b(!0),M(Qe,null,It(e.showTagList,f=>(b(),M("div",{key:e.getValueKey(f),class:O(e.nsSelect.e("selected-item"))},[ee(a,{closable:!e.selectDisabled&&!f.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.tagStyle),onClose:_=>e.deleteTag(_,f)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:f.currentLabel,value:f.value},()=>[Ct($e(f.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(b(),he(i,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:le(()=>[E("div",{ref:"collapseItemRef",class:O(e.nsSelect.e("selected-item"))},[ee(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.collapseTagStyle)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))}," + "+$e(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:le(()=>[E("div",{ref:"tagMenuRef",class:O(e.nsSelect.e("selection"))},[(b(!0),M(Qe,null,It(e.collapseTagList,f=>(b(),M("div",{key:e.getValueKey(f),class:O(e.nsSelect.e("selected-item"))},[ee(a,{class:"in-tooltip",closable:!e.selectDisabled&&!f.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:_=>e.deleteTag(_,f)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:f.currentLabel,value:f.value},()=>[Ct($e(f.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):se("v-if",!0)]):se("v-if",!0),e.selectDisabled?se("v-if",!0):(b(),M("div",{key:1,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[mt(E("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=f=>e.states.inputValue=f),type:"text",name:e.name,class:O([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Je(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...f)=>e.handleFocus&&e.handleFocus(...f)),onBlur:t[2]||(t[2]=(...f)=>e.handleBlur&&e.handleBlur(...f)),onKeydown:[t[3]||(t[3]=Gt(ct(f=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=Gt(ct(f=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=Gt(ct((...f)=>e.handleEsc&&e.handleEsc(...f),["stop","prevent"]),["esc"])),t[6]||(t[6]=Gt(ct((...f)=>e.selectOption&&e.selectOption(...f),["stop","prevent"]),["enter"])),t[7]||(t[7]=Gt(ct((...f)=>e.deletePrevTag&&e.deletePrevTag(...f),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...f)=>e.handleCompositionStart&&e.handleCompositionStart(...f)),onCompositionupdate:t[9]||(t[9]=(...f)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...f)),onCompositionend:t[10]||(t[10]=(...f)=>e.handleCompositionEnd&&e.handleCompositionEnd(...f)),onInput:t[11]||(t[11]=(...f)=>e.onInput&&e.onInput(...f)),onClick:t[12]||(t[12]=ct((...f)=>e.toggleMenu&&e.toggleMenu(...f),["stop"]))},null,46,Xte),[[l0,e.states.inputValue]]),e.filterable?(b(),M("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:O(e.nsSelect.e("input-calculator")),textContent:$e(e.states.inputValue)},null,10,Zte)):se("v-if",!0)],2)),e.shouldShowPlaceholder?(b(),M("div",{key:2,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?be(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[E("span",null,$e(e.currentPlaceholder),1)]):(b(),M("span",Jte,$e(e.currentPlaceholder),1))],2)):se("v-if",!0)],2),E("div",{ref:"suffixRef",class:O(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(b(),he(c,{key:0,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),e.showClose&&e.clearIcon?(b(),he(c,{key:1,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:le(()=>[(b(),he(Et(e.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.validateState&&e.validateIcon?(b(),he(c,{key:2,class:O([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:le(()=>[(b(),he(Et(e.validateIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)]}),content:le(()=>[ee(h,{ref:"menuRef"},{default:le(()=>[e.$slots.header?(b(),M("div",{key:0,class:O(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=ct(()=>{},["stop"]))},[be(e.$slots,"header")],2)):se("v-if",!0),mt(ee(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:O([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:le(()=>[e.showNewOption?(b(),he(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):se("v-if",!0),ee(u,null,{default:le(()=>[be(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Lt,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(b(),M("div",{key:1,class:O(e.nsSelect.be("dropdown","loading"))},[be(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(b(),M("div",{key:2,class:O(e.nsSelect.be("dropdown","empty"))},[be(e.$slots,"empty",{},()=>[E("span",null,$e(e.emptyText),1)])],2)):se("v-if",!0),e.$slots.footer?(b(),M("div",{key:3,class:O(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=ct(()=>{},["stop"]))},[be(e.$slots,"footer")],2)):se("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],16)),[[v,e.handleClickOutside,e.popperRef]])}var eoe=Le(Gte,[["render",Qte],["__file","select.vue"]]);const toe=N({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=ze("select"),o=D(null),r=wt(),l=D([]);zt(jy,Dt({...Bo(e)}));const n=C(()=>l.value.some(d=>d.visible===!0)),a=d=>{var u,p;return((u=d.type)==null?void 0:u.name)==="ElOption"&&!!((p=d.component)!=null&&p.proxy)},i=d=>{const u=Gn(d),p=[];return u.forEach(h=>{var v,m;a(h)?p.push(h.component.proxy):(v=h.children)!=null&&v.length?p.push(...i(h.children)):(m=h.component)!=null&&m.subTree&&p.push(...i(h.component.subTree))}),p},c=()=>{l.value=i(r.subTree)};return ft(()=>{c()}),o_(o,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:o,visible:n,ns:t}}});function ooe(e,t,o,r,l,n){return mt((b(),M("ul",{ref:"groupRef",class:O(e.ns.be("group","wrap"))},[E("li",{class:O(e.ns.be("group","title"))},$e(e.label),3),E("li",null,[E("ul",{class:O(e.ns.b("group"))},[be(e.$slots,"default")],2)])],2)),[[Lt,e.visible]])}var Wy=Le(toe,[["render",ooe],["__file","option-group.vue"]]);const Za=yt(eoe,{Option:Qv,OptionGroup:Wy}),Cp=co(Qv),roe=co(Wy),e2=()=>Ge(Fy,{}),loe=Pe({pageSize:{type:Number,required:!0},pageSizes:{type:ue(Array),default:()=>uo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Rl}}),noe=N({...N({name:"ElPaginationSizes"}),props:loe,emits:["page-size-change"],setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("pagination"),n=e2(),a=D(o.pageSize);Se(()=>o.pageSizes,(d,u)=>{if(!nr(d,u)&&Array.isArray(d)){const p=d.includes(o.pageSize)?o.pageSize:o.pageSizes[0];t("page-size-change",p)}}),Se(()=>o.pageSize,d=>{a.value=d});const i=C(()=>o.pageSizes);function c(d){var u;d!==a.value&&(a.value=d,(u=n.handleSizeChange)==null||u.call(n,Number(d)))}return(d,u)=>(b(),M("span",{class:O(s(l).e("sizes"))},[ee(s(Za),{"model-value":a.value,disabled:d.disabled,"popper-class":d.popperClass,size:d.size,teleported:d.teleported,"validate-event":!1,onChange:c},{default:le(()=>[(b(!0),M(Qe,null,It(s(i),p=>(b(),he(s(Cp),{key:p,value:p,label:p+s(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var aoe=Le(noe,[["__file","sizes.vue"]]);const ioe=Pe({size:{type:String,values:Rl}}),soe=["disabled"],coe=N({...N({name:"ElPaginationJumper"}),props:ioe,setup(e){const{t}=Rt(),o=ze("pagination"),{pageCount:r,disabled:l,currentPage:n,changeEvent:a}=e2(),i=D(),c=C(()=>{var p;return(p=i.value)!=null?p:n==null?void 0:n.value});function d(p){i.value=p?+p:""}function u(p){p=Math.trunc(+p),a==null||a(p),i.value=void 0}return(p,h)=>(b(),M("span",{class:O(s(o).e("jump")),disabled:s(l)},[E("span",{class:O([s(o).e("goto")])},$e(s(t)("el.pagination.goto")),3),ee(s(cr),{size:p.size,class:O([s(o).e("editor"),s(o).is("in-pagination")]),min:1,max:s(r),disabled:s(l),"model-value":s(c),"validate-event":!1,"aria-label":s(t)("el.pagination.page"),type:"number","onUpdate:modelValue":d,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),E("span",{class:O([s(o).e("classifier")])},$e(s(t)("el.pagination.pageClassifier")),3)],10,soe))}});var uoe=Le(coe,[["__file","jumper.vue"]]);const doe=Pe({total:{type:Number,default:1e3}}),poe=["disabled"],foe=N({...N({name:"ElPaginationTotal"}),props:doe,setup(e){const{t}=Rt(),o=ze("pagination"),{disabled:r}=e2();return(l,n)=>(b(),M("span",{class:O(s(o).e("total")),disabled:s(r)},$e(s(t)("el.pagination.total",{total:l.total})),11,poe))}});var hoe=Le(foe,[["__file","total.vue"]]);const voe=Pe({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),moe=["onKeyup"],goe=["aria-current","aria-label","tabindex"],boe=["tabindex","aria-label"],_oe=["aria-current","aria-label","tabindex"],woe=["tabindex","aria-label"],yoe=["aria-current","aria-label","tabindex"],xoe=N({...N({name:"ElPaginationPager"}),props:voe,emits:["change"],setup(e,{emit:t}){const o=e,r=ze("pager"),l=ze("icon"),{t:n}=Rt(),a=D(!1),i=D(!1),c=D(!1),d=D(!1),u=D(!1),p=D(!1),h=C(()=>{const x=o.pagerCount,$=(x-1)/2,T=Number(o.currentPage),R=Number(o.pageCount);let P=!1,L=!1;R>x&&(T>x-$&&(P=!0),T["more","btn-quickprev",l.b(),r.is("disabled",o.disabled)]),m=C(()=>["more","btn-quicknext",l.b(),r.is("disabled",o.disabled)]),f=C(()=>o.disabled?-1:0);Go(()=>{const x=(o.pagerCount-1)/2;a.value=!1,i.value=!1,o.pageCount>o.pagerCount&&(o.currentPage>o.pagerCount-x&&(a.value=!0),o.currentPageR&&(T=R)),T!==P&&t("change",T)}return(x,$)=>(b(),M("ul",{class:O(s(r).b()),onClick:w,onKeyup:Gt(y,["enter"])},[x.pageCount>0?(b(),M("li",{key:0,class:O([[s(r).is("active",x.currentPage===1),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===1,"aria-label":s(n)("el.pagination.currentPage",{pager:1}),tabindex:s(f)}," 1 ",10,goe)):se("v-if",!0),a.value?(b(),M("li",{key:1,class:O(s(v)),tabindex:s(f),"aria-label":s(n)("el.pagination.prevPages",{pager:x.pagerCount-2}),onMouseenter:$[0]||($[0]=T=>_(!0)),onMouseleave:$[1]||($[1]=T=>c.value=!1),onFocus:$[2]||($[2]=T=>g(!0)),onBlur:$[3]||($[3]=T=>u.value=!1)},[(c.value||u.value)&&!x.disabled?(b(),he(s(Ra),{key:0})):(b(),he(s(fh),{key:1}))],42,boe)):se("v-if",!0),(b(!0),M(Qe,null,It(s(h),T=>(b(),M("li",{key:T,class:O([[s(r).is("active",x.currentPage===T),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===T,"aria-label":s(n)("el.pagination.currentPage",{pager:T}),tabindex:s(f)},$e(T),11,_oe))),128)),i.value?(b(),M("li",{key:2,class:O(s(m)),tabindex:s(f),"aria-label":s(n)("el.pagination.nextPages",{pager:x.pagerCount-2}),onMouseenter:$[4]||($[4]=T=>_()),onMouseleave:$[5]||($[5]=T=>d.value=!1),onFocus:$[6]||($[6]=T=>g()),onBlur:$[7]||($[7]=T=>p.value=!1)},[(d.value||p.value)&&!x.disabled?(b(),he(s(La),{key:0})):(b(),he(s(fh),{key:1}))],42,woe)):se("v-if",!0),x.pageCount>1?(b(),M("li",{key:3,class:O([[s(r).is("active",x.currentPage===x.pageCount),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===x.pageCount,"aria-label":s(n)("el.pagination.currentPage",{pager:x.pageCount}),tabindex:s(f)},$e(x.pageCount),11,yoe)):se("v-if",!0)],42,moe))}});var koe=Le(xoe,[["__file","pager.vue"]]);const kr=e=>typeof e!="number",Coe=Pe({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>st(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:ue(Array),default:()=>uo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Xt,default:()=>fn},nextText:{type:String,default:""},nextIcon:{type:Xt,default:()=>ir},teleported:{type:Boolean,default:!0},small:Boolean,size:Oo,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),Soe={"update:current-page":e=>st(e),"update:page-size":e=>st(e),"size-change":e=>st(e),change:(e,t)=>st(e)&&st(t),"current-change":e=>st(e),"prev-click":e=>st(e),"next-click":e=>st(e)},qy="ElPagination";var Eoe=N({name:qy,props:Coe,emits:Soe,setup(e,{emit:t,slots:o}){const{t:r}=Rt(),l=ze("pagination"),n=wt().vnode.props||{},a=C(()=>e.small?"small":e==null?void 0:e.size);Lo({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},C(()=>!!e.small));const i="onUpdate:currentPage"in n||"onUpdate:current-page"in n||"onCurrentChange"in n,c="onUpdate:pageSize"in n||"onUpdate:page-size"in n||"onSizeChange"in n,d=C(()=>{if(kr(e.total)&&kr(e.pageCount)||!kr(e.currentPage)&&!i)return!1;if(e.layout.includes("sizes")){if(kr(e.pageCount)){if(!kr(e.total)&&!kr(e.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),u=D(kr(e.defaultPageSize)?10:e.defaultPageSize),p=D(kr(e.defaultCurrentPage)?1:e.defaultCurrentPage),h=C({get(){return kr(e.pageSize)?u.value:e.pageSize},set(x){kr(e.pageSize)&&(u.value=x),c&&(t("update:page-size",x),t("size-change",x))}}),v=C(()=>{let x=0;return kr(e.pageCount)?kr(e.total)||(x=Math.max(1,Math.ceil(e.total/h.value))):x=e.pageCount,x}),m=C({get(){return kr(e.currentPage)?p.value:e.currentPage},set(x){let $=x;x<1?$=1:x>v.value&&($=v.value),kr(e.currentPage)&&(p.value=$),i&&(t("update:current-page",$),t("current-change",$))}});Se(v,x=>{m.value>x&&(m.value=x)}),Se([m,h],x=>{t("change",...x)},{flush:"post"});function f(x){m.value=x}function _(x){h.value=x;const $=v.value;m.value>$&&(m.value=$)}function g(){e.disabled||(m.value-=1,t("prev-click",m.value))}function y(){e.disabled||(m.value+=1,t("next-click",m.value))}function w(x,$){x&&(x.props||(x.props={}),x.props.class=[x.props.class,$].join(" "))}return zt(Fy,{pageCount:v,disabled:C(()=>e.disabled),currentPage:m,changeEvent:f,handleSizeChange:_}),()=>{var x,$;if(!d.value)return r("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&v.value<=1)return null;const T=[],R=[],P=rt("div",{class:l.e("rightwrapper")},R),L={prev:rt(Ite,{disabled:e.disabled,currentPage:m.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:g}),jumper:rt(uoe,{size:a.value}),pager:rt(koe,{currentPage:m.value,pageCount:v.value,pagerCount:e.pagerCount,onChange:f,disabled:e.disabled}),next:rt(Lte,{disabled:e.disabled,currentPage:m.value,pageCount:v.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:y}),sizes:rt(aoe,{pageSize:h.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:a.value}),slot:($=(x=o==null?void 0:o.default)==null?void 0:x.call(o))!=null?$:null,total:rt(hoe,{total:kr(e.total)?0:e.total})},V=e.layout.split(",").map(j=>j.trim());let B=!1;return V.forEach(j=>{if(j==="->"){B=!0;return}B?R.push(L[j]):T.push(L[j])}),w(T[0],l.is("first")),w(T[T.length-1],l.is("last")),B&&R.length>0&&(w(R[0],l.is("first")),w(R[R.length-1],l.is("last")),T.push(P)),rt("div",{class:[l.b(),l.is("background",e.background),l.m(a.value)]},T)}}});const Toe=yt(Eoe),$oe=Pe({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:uv,default:"primary"},cancelButtonType:{type:String,values:uv,default:"text"},icon:{type:Xt,default:()=>F3},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:Uo.teleported,persistent:Uo.persistent,width:{type:[String,Number],default:150}}),Moe=N({...N({name:"ElPopconfirm"}),props:$oe,emits:{confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("popconfirm"),n=D(),a=()=>{var h,v;(v=(h=n.value)==null?void 0:h.onClose)==null||v.call(h)},i=C(()=>({width:mo(o.width)})),c=h=>{t("confirm",h),a()},d=h=>{t("cancel",h),a()},u=C(()=>o.confirmButtonText||r("el.popconfirm.confirmButtonText")),p=C(()=>o.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(h,v)=>(b(),he(s(ur),Mt({ref_key:"tooltipRef",ref:n,trigger:"click",effect:"light"},h.$attrs,{"popper-class":`${s(l).namespace.value}-popover`,"popper-style":s(i),teleported:h.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":h.hideAfter,persistent:h.persistent}),{content:le(()=>[E("div",{class:O(s(l).b())},[E("div",{class:O(s(l).e("main"))},[!h.hideIcon&&h.icon?(b(),he(s(Ze),{key:0,class:O(s(l).e("icon")),style:Je({color:h.iconColor})},{default:le(()=>[(b(),he(Et(h.icon)))]),_:1},8,["class","style"])):se("v-if",!0),Ct(" "+$e(h.title),1)],2),E("div",{class:O(s(l).e("action"))},[ee(s(Wo),{size:"small",type:h.cancelButtonType==="text"?"":h.cancelButtonType,text:h.cancelButtonType==="text",onClick:d},{default:le(()=>[Ct($e(s(p)),1)]),_:1},8,["type","text"]),ee(s(Wo),{size:"small",type:h.confirmButtonType==="text"?"":h.confirmButtonType,text:h.confirmButtonType==="text",onClick:c},{default:le(()=>[Ct($e(s(u)),1)]),_:1},8,["type","text"])],2)],2)]),default:le(()=>[h.$slots.reference?be(h.$slots,"reference",{key:0}):se("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var Aoe=Le(Moe,[["__file","popconfirm.vue"]]);const zoe=yt(Aoe),Ioe=Pe({trigger:Pc.trigger,placement:xp.placement,disabled:Pc.disabled,visible:Uo.visible,transition:Uo.transition,popperOptions:xp.popperOptions,tabindex:xp.tabindex,content:Uo.content,popperStyle:Uo.popperStyle,popperClass:Uo.popperClass,enterable:{...Uo.enterable,default:!0},effect:{...Uo.effect,default:"light"},teleported:Uo.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Ooe={"update:visible":e=>Co(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Noe="onUpdate:visible",Poe=N({...N({name:"ElPopover"}),props:Ioe,emits:Ooe,setup(e,{expose:t,emit:o}){const r=e,l=C(()=>r[Noe]),n=ze("popover"),a=D(),i=C(()=>{var _;return(_=s(a))==null?void 0:_.popperRef}),c=C(()=>[{width:mo(r.width)},r.popperStyle]),d=C(()=>[n.b(),r.popperClass,{[n.m("plain")]:!!r.content}]),u=C(()=>r.transition===`${n.namespace.value}-fade-in-linear`),p=()=>{var _;(_=a.value)==null||_.hide()},h=()=>{o("before-enter")},v=()=>{o("before-leave")},m=()=>{o("after-enter")},f=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:i,hide:p}),(_,g)=>(b(),he(s(ur),Mt({ref_key:"tooltipRef",ref:a},_.$attrs,{trigger:_.trigger,placement:_.placement,disabled:_.disabled,visible:_.visible,transition:_.transition,"popper-options":_.popperOptions,tabindex:_.tabindex,content:_.content,offset:_.offset,"show-after":_.showAfter,"hide-after":_.hideAfter,"auto-close":_.autoClose,"show-arrow":_.showArrow,"aria-label":_.title,effect:_.effect,enterable:_.enterable,"popper-class":s(d),"popper-style":s(c),teleported:_.teleported,persistent:_.persistent,"gpu-acceleration":s(u),"onUpdate:visible":s(l),onBeforeShow:h,onBeforeHide:v,onShow:m,onHide:f}),{content:le(()=>[_.title?(b(),M("div",{key:0,class:O(s(n).e("title")),role:"title"},$e(_.title),3)):se("v-if",!0),be(_.$slots,"default",{},()=>[Ct($e(_.content),1)])]),default:le(()=>[_.$slots.reference?be(_.$slots,"reference",{key:0}):se("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Roe=Le(Poe,[["__file","popover.vue"]]);const Yy=(e,t)=>{const o=t.arg||t.value,r=o==null?void 0:o.popperRef;r&&(r.triggerRef=e)};var Loe={mounted(e,t){Yy(e,t)},updated(e,t){Yy(e,t)}};const Gy=lF(Loe,"popover"),Boe=yt(Roe,{directive:Gy}),Voe=Pe({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:ue(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:ue([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:ue(Function),default:e=>`${e}%`}}),Doe=["aria-valuenow"],Hoe={viewBox:"0 0 100 100"},Foe=["d","stroke","stroke-linecap","stroke-width"],joe=["d","stroke","opacity","stroke-linecap","stroke-width"],Koe={key:0},Uoe=N({...N({name:"ElProgress"}),props:Voe,setup(e){const t=e,o={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=ze("progress"),l=C(()=>{const w={width:`${t.percentage}%`,animationDuration:`${t.duration}s`},x=y(t.percentage);return x.includes("gradient")?w.background=x:w.backgroundColor=x,w}),n=C(()=>(t.strokeWidth/t.width*100).toFixed(1)),a=C(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(n.value)/2}`,10):0),i=C(()=>{const w=a.value,x=t.type==="dashboard";return` + + `}else a||(a=window.setTimeout(f,i.config.hoverThreshold))},m=()=>{a&&(clearTimeout(a),a=null)},f=()=>{c.value&&(c.value.innerHTML="",m())};return{ns:o,panel:i,hoverZone:c,isEmpty:d,isLoading:u,menuId:p,t:r,handleExpand:h,handleMouseMove:v,clearHoverZone:f}}});function OG(e,t,o,r,l,n){const a=nt("el-cascader-node"),i=nt("loading"),c=nt("el-icon"),d=nt("el-scrollbar");return b(),he(d,{key:e.menuId,tag:"ul",role:"menu",class:O(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:le(()=>{var u;return[(b(!0),M(Qe,null,It(e.nodes,p=>(b(),he(a,{key:p.uid,node:p,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(b(),M("div",{key:0,class:O(e.ns.e("empty-text"))},[te(c,{size:"14",class:O(e.ns.is("loading"))},{default:le(()=>[te(i)]),_:1},8,["class"]),Ct(" "+$e(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(b(),M("div",{key:1,class:O(e.ns.e("empty-text"))},$e(e.t("el.cascader.noData")),3)):(u=e.panel)!=null&&u.isHoverMenu?(b(),M("svg",{key:2,ref:"hoverZone",class:O(e.ns.e("hover-zone"))},null,2)):se("v-if",!0)]}),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var NG=Le(IG,[["render",OG],["__file","menu.vue"]]);let PG=0;const RG=e=>{const t=[e];let{parent:o}=e;for(;o;)t.unshift(o),o=o.parent;return t};let Iv=class Sm{constructor(t,o,r,l=!1){this.data=t,this.config=o,this.parent=r,this.root=l,this.uid=PG++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:n,label:a,children:i}=o,c=t[i],d=RG(this);this.level=l?0:r?r.level+1:1,this.value=t[n],this.label=t[a],this.pathNodes=d,this.pathValues=d.map(u=>u.value),this.pathLabels=d.map(u=>u.label),this.childrenData=c,this.children=(c||[]).map(u=>new Sm(u,o,this)),this.loaded=!o.lazy||this.isLeaf||!Yr(c)}get isDisabled(){const{data:t,parent:o,config:r}=this,{disabled:l,checkStrictly:n}=r;return(it(l)?l(t,this):!!t[l])||!n&&(o==null?void 0:o.isDisabled)}get isLeaf(){const{data:t,config:o,childrenData:r,loaded:l}=this,{lazy:n,leaf:a}=o,i=it(a)?a(t,this):t[a];return ko(i)?n&&!l?!1:!(Array.isArray(r)&&r.length):!!i}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:o,children:r}=this,l=new Sm(t,this.config,this);return Array.isArray(o)?o.push(t):this.childrenData=[t],r.push(l),l}calcText(t,o){const r=t?this.pathLabels.join(o):this.label;return this.text=r,r}broadcast(t,...o){const r=`onParent${Nl(t)}`;this.children.forEach(l=>{l&&(l.broadcast(t,...o),l[r]&&l[r](...o))})}emit(t,...o){const{parent:r}=this,l=`onChild${Nl(t)}`;r&&(r[l]&&r[l](...o),r.emit(t,...o))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,o=t.filter(l=>!l.isDisabled),r=o.length?o.every(l=>l.checked):!1;this.setCheckState(r)}setCheckState(t){const o=this.children.length,r=this.children.reduce((l,n)=>{const a=n.checked?1:n.indeterminate?.5:0;return l+a},0);this.checked=this.loaded&&this.children.filter(l=>!l.isDisabled).every(l=>l.loaded&&l.checked)&&t,this.indeterminate=this.loaded&&r!==o&&r>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:o,multiple:r}=this.config;o||!r?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check"))}};const Ov=(e,t)=>e.reduce((o,r)=>(r.isLeaf?o.push(r):(!t&&o.push(r),o=o.concat(Ov(r.children,t))),o),[]);class Kw{constructor(t,o){this.config=o;const r=(t||[]).map(l=>new Iv(l,this.config));this.nodes=r,this.allNodes=Ov(r,!1),this.leafNodes=Ov(r,!0)}getNodes(){return this.nodes}getFlattedNodes(t){return t?this.leafNodes:this.allNodes}appendNode(t,o){const r=o?o.appendChild(t):new Iv(t,this.config);o||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(t,o){t.forEach(r=>this.appendNode(r,o))}getNodeByValue(t,o=!1){return!t&&t!==0?null:this.getFlattedNodes(o).find(l=>nr(l.value,t)||nr(l.pathValues,t))||null}getSameNode(t){return t&&this.getFlattedNodes(!1).find(({value:r,level:l})=>nr(t.value,r)&&t.level===l)||null}}const Uw=Pe({modelValue:{type:ue([Number,String,Array])},options:{type:ue(Array),default:()=>[]},props:{type:ue(Object),default:()=>({})}}),LG={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:qt,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},BG=e=>C(()=>({...LG,...e.props})),Ww=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},VG=e=>{if(!e)return;const t=e.querySelector("input");t?t.click():Hb(e)&&e.click()},DG=(e,t)=>{const o=t.slice(0),r=o.map(n=>n.uid),l=e.reduce((n,a)=>{const i=r.indexOf(a.uid);return i>-1&&(n.push(a),o.splice(i,1),r.splice(i,1)),n},[]);return l.push(...o),l},HG=N({name:"ElCascaderPanel",components:{ElCascaderMenu:NG},props:{...Uw,border:{type:Boolean,default:!0},renderLabel:Function},emits:[St,ro,"close","expand-change"],setup(e,{emit:t,slots:o}){let r=!1;const l=ze("cascader"),n=BG(e);let a=null;const i=D(!0),c=D([]),d=D(null),u=D([]),p=D(null),h=D([]),v=C(()=>n.value.expandTrigger==="hover"),m=C(()=>e.renderLabel||o.default),f=()=>{const{options:F}=e,Q=n.value;r=!1,a=new Kw(F,Q),u.value=[a.getNodes()],Q.lazy&&Yr(e.options)?(i.value=!1,_(void 0,J=>{J&&(a=new Kw(J,Q),u.value=[a.getNodes()]),i.value=!0,P(!1,!0)})):P(!1,!0)},_=(F,Q)=>{const J=n.value;F=F||new Iv({},J,void 0,!0),F.loading=!0;const Z=H=>{const j=F,K=j.root?null:j;H&&(a==null||a.appendNodes(H,K)),j.loading=!1,j.loaded=!0,j.childrenData=j.childrenData||[],Q&&Q(H)};J.lazyLoad(F,Z)},g=(F,Q)=>{var J;const{level:Z}=F,H=u.value.slice(0,Z);let j;F.isLeaf?j=F.pathNodes[Z-2]:(j=F,H.push(F.children)),((J=p.value)==null?void 0:J.uid)!==(j==null?void 0:j.uid)&&(p.value=F,u.value=H,!Q&&t("expand-change",(F==null?void 0:F.pathValues)||[]))},y=(F,Q,J=!0)=>{const{checkStrictly:Z,multiple:H}=n.value,j=h.value[0];r=!0,!H&&(j==null||j.doCheck(!1)),F.doCheck(Q),L(),J&&!H&&!Z&&t("close"),!J&&!H&&!Z&&w(F)},w=F=>{F&&(F=F.parent,w(F),F&&g(F))},x=F=>a==null?void 0:a.getFlattedNodes(F),$=F=>{var Q;return(Q=x(F))==null?void 0:Q.filter(J=>J.checked!==!1)},T=()=>{h.value.forEach(F=>F.doCheck(!1)),L(),u.value=u.value.slice(0,1),p.value=null,t("expand-change",[])},L=()=>{var F;const{checkStrictly:Q,multiple:J}=n.value,Z=h.value,H=$(!Q),j=DG(Z,H),K=j.map(I=>I.valueByOption);h.value=j,d.value=J?K:(F=K[0])!=null?F:null},P=(F=!1,Q=!1)=>{const{modelValue:J}=e,{lazy:Z,multiple:H,checkStrictly:j}=n.value,K=!j;if(!(!i.value||r||!Q&&nr(J,d.value)))if(Z&&!F){const U=t6(Mz(Lr(J))).map(oe=>a==null?void 0:a.getNodeByValue(oe)).filter(oe=>!!oe&&!oe.loaded&&!oe.loading);U.length?U.forEach(oe=>{_(oe,()=>P(!1,Q))}):P(!0,Q)}else{const I=H?Lr(J):[J],U=t6(I.map(oe=>a==null?void 0:a.getNodeByValue(oe,K)));R(U,Q),d.value=yd(J)}},R=(F,Q=!0)=>{const{checkStrictly:J}=n.value,Z=h.value,H=F.filter(I=>!!I&&(J||I.isLeaf)),j=a==null?void 0:a.getSameNode(p.value),K=Q&&j||H[0];K?K.pathNodes.forEach(I=>g(I,!0)):p.value=null,Z.forEach(I=>I.doCheck(!1)),Dt(H).forEach(I=>I.doCheck(!0)),h.value=H,et(V)},V=()=>{Nt&&c.value.forEach(F=>{const Q=F==null?void 0:F.$el;if(Q){const J=Q.querySelector(`.${l.namespace.value}-scrollbar__wrap`),Z=Q.querySelector(`.${l.b("node")}.${l.is("active")}`)||Q.querySelector(`.${l.b("node")}.in-active-path`);T3(J,Z)}})},B=F=>{const Q=F.target,{code:J}=F;switch(J){case lt.up:case lt.down:{F.preventDefault();const Z=J===lt.up?-1:1;pd(Fb(Q,Z,`.${l.b("node")}[tabindex="-1"]`));break}case lt.left:{F.preventDefault();const Z=c.value[Ww(Q)-1],H=Z==null?void 0:Z.$el.querySelector(`.${l.b("node")}[aria-expanded="true"]`);pd(H);break}case lt.right:{F.preventDefault();const Z=c.value[Ww(Q)+1],H=Z==null?void 0:Z.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`);pd(H);break}case lt.enter:VG(Q);break}};return zt(zv,Dt({config:n,expandingNode:p,checkedNodes:h,isHoverMenu:v,initialLoaded:i,renderLabelFn:m,lazyLoad:_,expandNode:g,handleCheckChange:y})),Se([n,()=>e.options],f,{deep:!0,immediate:!0}),Se(()=>e.modelValue,()=>{r=!1,P()},{deep:!0}),Se(()=>d.value,F=>{nr(F,e.modelValue)||(t(St,F),t(ro,F))}),bg(()=>c.value=[]),ft(()=>!Yr(e.modelValue)&&P()),{ns:l,menuList:c,menus:u,checkedNodes:h,handleKeyDown:B,handleCheckChange:y,getFlattedNodes:x,getCheckedNodes:$,clearCheckedNodes:T,calculateCheckedValue:L,scrollToExpandingNode:V}}});function FG(e,t,o,r,l,n){const a=nt("el-cascader-menu");return b(),M("div",{class:O([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:t[0]||(t[0]=(...i)=>e.handleKeyDown&&e.handleKeyDown(...i))},[(b(!0),M(Qe,null,It(e.menus,(i,c)=>(b(),he(a,{key:c,ref_for:!0,ref:d=>e.menuList[c]=d,index:c,nodes:[...i]},null,8,["index","nodes"]))),128))],34)}var pp=Le(HG,[["render",FG],["__file","index.vue"]]);pp.install=e=>{e.component(pp.name,pp)};const qw=pp,jG=qw,fp=Pe({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Rl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),KG=N({...N({name:"ElTag"}),props:fp,emits:{close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,r=So(),l=ze("tag"),n=C(()=>{const{type:c,hit:d,effect:u,closable:p,round:h}=o;return[l.b(),l.is("closable",p),l.m(c||"primary"),l.m(r.value),l.m(u),l.is("hit",d),l.is("round",h)]}),a=c=>{t("close",c)},i=c=>{t("click",c)};return(c,d)=>c.disableTransitions?(b(),M("span",{key:0,class:O(s(n)),style:Je({backgroundColor:c.color}),onClick:i},[E("span",{class:O(s(l).e("content"))},[be(c.$slots,"default")],2),c.closable?(b(),he(s(Ze),{key:0,class:O(s(l).e("close")),onClick:ct(a,["stop"])},{default:le(()=>[te(s(Jr))]),_:1},8,["class","onClick"])):se("v-if",!0)],6)):(b(),he(Mo,{key:1,name:`${s(l).namespace.value}-zoom-in-center`,appear:""},{default:le(()=>[E("span",{class:O(s(n)),style:Je({backgroundColor:c.color}),onClick:i},[E("span",{class:O(s(l).e("content"))},[be(c.$slots,"default")],2),c.closable?(b(),he(s(Ze),{key:0,class:O(s(l).e("close")),onClick:ct(a,["stop"])},{default:le(()=>[te(s(Jr))]),_:1},8,["class","onClick"])):se("v-if",!0)],6)]),_:3},8,["name"]))}});var UG=Le(KG,[["__file","tag.vue"]]);const Pc=yt(UG),WG=Pe({...Uw,size:Oo,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:ue(Function),default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:ue(Function),default:()=>!0},popperClass:{type:String,default:""},teleported:Uo.teleported,tagType:{...fp.type,default:"info"},validateEvent:{type:Boolean,default:!0},...Xi}),qG={[St]:e=>!0,[ro]:e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,visibleChange:e=>Co(e),expandChange:e=>!!e,removeTag:e=>!!e},YG={key:0},GG=["placeholder","onKeydown"],XG=["onClick"],ZG=N({...N({name:"ElCascader"}),props:WG,emits:qG,setup(e,{expose:t,emit:o}){const r=e,l={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:X})=>{const{modifiersData:re,placement:ge}=X;["right","left","bottom","top"].includes(ge)||(re.arrow.x=35)},requires:["arrow"]}]},n=ya();let a=0,i=0;const c=ze("cascader"),d=ze("input"),{t:u}=Rt(),{form:p,formItem:h}=sr(),{valueOnClear:v}=Ud(r),m=D(null),f=D(null),_=D(null),g=D(null),y=D(null),w=D(!1),x=D(!1),$=D(!1),T=D(!1),L=D(""),P=D(""),R=D([]),V=D([]),B=D([]),F=D(!1),Q=C(()=>n.style),J=C(()=>r.disabled||(p==null?void 0:p.disabled)),Z=C(()=>r.placeholder||u("el.cascader.placeholder")),H=C(()=>P.value||R.value.length>0||F.value?"":Z.value),j=So(),K=C(()=>["small"].includes(j.value)?"small":"default"),I=C(()=>!!r.props.multiple),U=C(()=>!r.filterable||I.value),oe=C(()=>I.value?P.value:L.value),ne=C(()=>{var X;return((X=g.value)==null?void 0:X.checkedNodes)||[]}),ce=C(()=>!r.clearable||J.value||$.value||!x.value?!1:!!ne.value.length),ee=C(()=>{const{showAllLevels:X,separator:re}=r,ge=ne.value;return ge.length?I.value?"":ge[0].calcText(X,re):""}),Me=C(()=>(h==null?void 0:h.validateState)||""),de=C({get(){return yd(r.modelValue)},set(X){const re=X||v.value;o(St,re),o(ro,re),r.validateEvent&&(h==null||h.validate("change").catch(ge=>void 0))}}),_e=C(()=>[c.b(),c.m(j.value),c.is("disabled",J.value),n.class]),me=C(()=>[d.e("icon"),"icon-arrow-down",c.is("reverse",w.value)]),Re=C(()=>c.is("focus",w.value||T.value)),Ce=C(()=>{var X,re;return(re=(X=m.value)==null?void 0:X.popperRef)==null?void 0:re.contentRef}),Ee=X=>{var re,ge,fe;J.value||(X=X??!w.value,X!==w.value&&(w.value=X,(ge=(re=f.value)==null?void 0:re.input)==null||ge.setAttribute("aria-expanded",`${X}`),X?(De(),et((fe=g.value)==null?void 0:fe.scrollToExpandingNode)):r.filterable&&ye(),o("visibleChange",X)))},De=()=>{et(()=>{var X;(X=m.value)==null||X.updatePopper()})},ae=()=>{$.value=!1},pe=X=>{const{showAllLevels:re,separator:ge}=r;return{node:X,key:X.uid,text:X.calcText(re,ge),hitState:!1,closable:!J.value&&!X.isDisabled,isCollapseTag:!1}},ke=X=>{var re;const ge=X.node;ge.doCheck(!1),(re=g.value)==null||re.calculateCheckedValue(),o("removeTag",ge.valueByOption)},Oe=()=>{if(!I.value)return;const X=ne.value,re=[],ge=[];if(X.forEach(fe=>ge.push(pe(fe))),V.value=ge,X.length){X.slice(0,r.maxCollapseTags).forEach(at=>re.push(pe(at)));const fe=X.slice(r.maxCollapseTags),Fe=fe.length;Fe&&(r.collapseTags?re.push({key:-1,text:`+ ${Fe}`,closable:!1,isCollapseTag:!0}):fe.forEach(at=>re.push(pe(at))))}R.value=re},we=()=>{var X,re;const{filterMethod:ge,showAllLevels:fe,separator:Fe}=r,at=(re=(X=g.value)==null?void 0:X.getFlattedNodes(!r.props.checkStrictly))==null?void 0:re.filter(_t=>_t.isDisabled?!1:(_t.calcText(fe,Fe),ge(_t,oe.value)));I.value&&(R.value.forEach(_t=>{_t.hitState=!1}),V.value.forEach(_t=>{_t.hitState=!1})),$.value=!0,B.value=at,De()},Te=()=>{var X;let re;$.value&&y.value?re=y.value.$el.querySelector(`.${c.e("suggestion-item")}`):re=(X=g.value)==null?void 0:X.$el.querySelector(`.${c.b("node")}[tabindex="-1"]`),re&&(re.focus(),!$.value&&re.click())},Ne=()=>{var X,re;const ge=(X=f.value)==null?void 0:X.input,fe=_.value,Fe=(re=y.value)==null?void 0:re.$el;if(!(!Nt||!ge)){if(Fe){const at=Fe.querySelector(`.${c.e("suggestion-list")}`);at.style.minWidth=`${ge.offsetWidth}px`}if(fe){const{offsetHeight:at}=fe,_t=R.value.length>0?`${Math.max(at+6,a)}px`:`${a}px`;ge.style.height=_t,De()}}},Ie=X=>{var re;return(re=g.value)==null?void 0:re.getCheckedNodes(X)},Ae=X=>{De(),o("expandChange",X)},xe=X=>{var re;const ge=(re=X.target)==null?void 0:re.value;if(X.type==="compositionend")F.value=!1,et(()=>A(ge));else{const fe=ge[ge.length-1]||"";F.value=!yh(fe)}},We=X=>{if(!F.value)switch(X.code){case lt.enter:Ee();break;case lt.down:Ee(!0),et(Te),X.preventDefault();break;case lt.esc:w.value===!0&&(X.preventDefault(),X.stopPropagation(),Ee(!1));break;case lt.tab:Ee(!1);break}},qe=()=>{var X;(X=g.value)==null||X.clearCheckedNodes(),!w.value&&r.filterable&&ye(),Ee(!1)},ye=()=>{const{value:X}=ee;L.value=X,P.value=X},Ye=X=>{var re,ge;const{checked:fe}=X;I.value?(re=g.value)==null||re.handleCheckChange(X,!fe,!1):(!fe&&((ge=g.value)==null||ge.handleCheckChange(X,!0,!1)),Ee(!1))},tt=X=>{const re=X.target,{code:ge}=X;switch(ge){case lt.up:case lt.down:{const fe=ge===lt.up?-1:1;pd(Fb(re,fe,`.${c.e("suggestion-item")}[tabindex="-1"]`));break}case lt.enter:re.click();break}},pt=()=>{const X=R.value,re=X[X.length-1];i=P.value?0:i+1,!(!re||!i||r.collapseTags&&X.length>1)&&(re.hitState?ke(re):re.hitState=!0)},dt=X=>{const re=X.target,ge=c.e("search-input");re.className===ge&&(T.value=!0),o("focus",X)},Y=X=>{T.value=!1,o("blur",X)},S=Mr(()=>{const{value:X}=oe;if(!X)return;const re=r.beforeFilter(X);Es(re)?re.then(we).catch(()=>{}):re!==!1?we():ae()},r.debounce),A=(X,re)=>{!w.value&&Ee(!0),!(re!=null&&re.isComposing)&&(X?S():ae())},G=X=>Number.parseFloat(lE(d.cssVarName("input-height"),X).value)-2;return Se($,De),Se([ne,J],Oe),Se(R,()=>{et(()=>Ne())}),Se(j,async()=>{await et();const X=f.value.input;a=G(X)||a,Ne()}),Se(ee,ye,{immediate:!0}),ft(()=>{const X=f.value.input,re=G(X);a=X.offsetHeight||re,so(X,Ne)}),t({getCheckedNodes:Ie,cascaderPanelRef:g,togglePopperVisible:Ee,contentRef:Ce}),(X,re)=>(b(),he(s(ur),{ref_key:"tooltipRef",ref:m,visible:w.value,teleported:X.teleported,"popper-class":[s(c).e("dropdown"),X.popperClass],"popper-options":l,"fallback-placements":["bottom-start","bottom","top-start","top","right","left"],"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:"bottom-start",transition:`${s(c).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:"",onHide:ae},{default:le(()=>[mt((b(),M("div",{class:O(s(_e)),style:Je(s(Q)),onClick:re[5]||(re[5]=()=>Ee(s(U)?void 0:!0)),onKeydown:We,onMouseenter:re[6]||(re[6]=ge=>x.value=!0),onMouseleave:re[7]||(re[7]=ge=>x.value=!1)},[te(s(cr),{ref_key:"input",ref:f,modelValue:L.value,"onUpdate:modelValue":re[1]||(re[1]=ge=>L.value=ge),placeholder:s(H),readonly:s(U),disabled:s(J),"validate-event":!1,size:s(j),class:O(s(Re)),tabindex:s(I)&&X.filterable&&!s(J)?-1:void 0,onCompositionstart:xe,onCompositionupdate:xe,onCompositionend:xe,onFocus:dt,onBlur:Y,onInput:A},{suffix:le(()=>[s(ce)?(b(),he(s(Ze),{key:"clear",class:O([s(d).e("icon"),"icon-circle-close"]),onClick:ct(qe,["stop"])},{default:le(()=>[te(s(hn))]),_:1},8,["class","onClick"])):(b(),he(s(Ze),{key:"arrow-down",class:O(s(me)),onClick:re[0]||(re[0]=ct(ge=>Ee(),["stop"]))},{default:le(()=>[te(s(Pl))]),_:1},8,["class"]))]),_:1},8,["modelValue","placeholder","readonly","disabled","size","class","tabindex"]),s(I)?(b(),M("div",{key:0,ref_key:"tagWrapper",ref:_,class:O([s(c).e("tags"),s(c).is("validate",!!s(Me))])},[(b(!0),M(Qe,null,It(R.value,ge=>(b(),he(s(Pc),{key:ge.key,type:X.tagType,size:s(K),hit:ge.hitState,closable:ge.closable,"disable-transitions":"",onClose:fe=>ke(ge)},{default:le(()=>[ge.isCollapseTag===!1?(b(),M("span",YG,$e(ge.text),1)):(b(),he(s(ur),{key:1,disabled:w.value||!X.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:le(()=>[E("span",null,$e(ge.text),1)]),content:le(()=>[E("div",{class:O(s(c).e("collapse-tags"))},[(b(!0),M(Qe,null,It(V.value.slice(X.maxCollapseTags),(fe,Fe)=>(b(),M("div",{key:Fe,class:O(s(c).e("collapse-tag"))},[(b(),he(s(Pc),{key:fe.key,class:"in-tooltip",type:X.tagType,size:s(K),hit:fe.hitState,closable:fe.closable,"disable-transitions":"",onClose:at=>ke(fe)},{default:le(()=>[E("span",null,$e(fe.text),1)]),_:2},1032,["type","size","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","hit","closable","onClose"]))),128)),X.filterable&&!s(J)?mt((b(),M("input",{key:0,"onUpdate:modelValue":re[2]||(re[2]=ge=>P.value=ge),type:"text",class:O(s(c).e("search-input")),placeholder:s(ee)?"":s(Z),onInput:re[3]||(re[3]=ge=>A(P.value,ge)),onClick:re[4]||(re[4]=ct(ge=>Ee(!0),["stop"])),onKeydown:Gt(pt,["delete"]),onCompositionstart:xe,onCompositionupdate:xe,onCompositionend:xe,onFocus:dt,onBlur:Y},null,42,GG)),[[r0,P.value]]):se("v-if",!0)],2)):se("v-if",!0)],38)),[[s(xn),()=>Ee(!1),s(Ce)]])]),content:le(()=>[mt(te(s(qw),{ref_key:"cascaderPanelRef",ref:g,modelValue:s(de),"onUpdate:modelValue":re[8]||(re[8]=ge=>Zt(de)?de.value=ge:null),options:X.options,props:r.props,border:!1,"render-label":X.$slots.default,onExpandChange:Ae,onClose:re[9]||(re[9]=ge=>X.$nextTick(()=>Ee(!1)))},null,8,["modelValue","options","props","render-label"]),[[Lt,!$.value]]),X.filterable?mt((b(),he(s(wn),{key:0,ref_key:"suggestionPanel",ref:y,tag:"ul",class:O(s(c).e("suggestion-panel")),"view-class":s(c).e("suggestion-list"),onKeydown:tt},{default:le(()=>[B.value.length?(b(!0),M(Qe,{key:0},It(B.value,ge=>(b(),M("li",{key:ge.uid,class:O([s(c).e("suggestion-item"),s(c).is("checked",ge.checked)]),tabindex:-1,onClick:fe=>Ye(ge)},[E("span",null,$e(ge.text),1),ge.checked?(b(),he(s(Ze),{key:0},{default:le(()=>[te(s(Li))]),_:1})):se("v-if",!0)],10,XG))),128)):be(X.$slots,"empty",{key:1},()=>[E("li",{class:O(s(c).e("empty-text"))},$e(s(u)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Lt,$.value]]):se("v-if",!0)]),_:3},8,["visible","teleported","popper-class","transition"]))}});var hp=Le(ZG,[["__file","cascader.vue"]]);hp.install=e=>{e.component(hp.name,hp)};const JG=hp,QG=Pe({checked:{type:Boolean,default:!1},type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),eX={"update:checked":e=>Co(e),[ro]:e=>Co(e)},tX=N({...N({name:"ElCheckTag"}),props:QG,emits:eX,setup(e,{emit:t}){const o=e,r=ze("check-tag"),l=C(()=>[r.b(),r.is("checked",o.checked),r.m(o.type||"primary")]),n=()=>{const a=!o.checked;t(ro,a),t("update:checked",a)};return(a,i)=>(b(),M("span",{class:O(s(l)),onClick:n},[be(a.$slots,"default")],2))}});var oX=Le(tX,[["__file","check-tag.vue"]]);const rX=yt(oX),Yw=Symbol("rowContextKey"),lX=Pe({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),nX=N({...N({name:"ElRow"}),props:lX,setup(e){const t=e,o=ze("row"),r=C(()=>t.gutter);zt(Yw,{gutter:r});const l=C(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),n=C(()=>[o.b(),o.is(`justify-${t.justify}`,t.justify!=="start"),o.is(`align-${t.align}`,!!t.align)]);return(a,i)=>(b(),he(Et(a.tag),{class:O(s(n)),style:Je(s(l))},{default:le(()=>[be(a.$slots,"default")]),_:3},8,["class","style"]))}});var aX=Le(nX,[["__file","row.vue"]]);const iX=yt(aX),sX=Pe({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:ue([Number,Object]),default:()=>uo({})},sm:{type:ue([Number,Object]),default:()=>uo({})},md:{type:ue([Number,Object]),default:()=>uo({})},lg:{type:ue([Number,Object]),default:()=>uo({})},xl:{type:ue([Number,Object]),default:()=>uo({})}}),cX=N({...N({name:"ElCol"}),props:sX,setup(e){const t=e,{gutter:o}=Ge(Yw,{gutter:C(()=>0)}),r=ze("col"),l=C(()=>{const a={};return o.value&&(a.paddingLeft=a.paddingRight=`${o.value/2}px`),a}),n=C(()=>{const a=[];return["span","offset","pull","push"].forEach(d=>{const u=t[d];st(u)&&(d==="span"?a.push(r.b(`${t[d]}`)):u>0&&a.push(r.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{st(t[d])?a.push(r.b(`${d}-${t[d]}`)):xt(t[d])&&Object.entries(t[d]).forEach(([u,p])=>{a.push(u!=="span"?r.b(`${d}-${u}-${p}`):r.b(`${d}-${p}`))})}),o.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,i)=>(b(),he(Et(a.tag),{class:O(s(n)),style:Je(s(l))},{default:le(()=>[be(a.$slots,"default")]),_:3},8,["class","style"]))}});var uX=Le(cX,[["__file","col.vue"]]);const dX=yt(uX),Gw=e=>st(e)||ut(e)||Ke(e),pX=Pe({accordion:Boolean,modelValue:{type:ue([Array,String,Number]),default:()=>uo([])}}),fX={[St]:Gw,[ro]:Gw},Xw=Symbol("collapseContextKey"),hX=(e,t)=>{const o=D(Gn(e.modelValue)),r=n=>{o.value=n;const a=e.accordion?o.value[0]:o.value;t(St,a),t(ro,a)},l=n=>{if(e.accordion)r([o.value[0]===n?"":n]);else{const a=[...o.value],i=a.indexOf(n);i>-1?a.splice(i,1):a.push(n),r(a)}};return Se(()=>e.modelValue,()=>o.value=Gn(e.modelValue),{deep:!0}),zt(Xw,{activeNames:o,handleItemClick:l}),{activeNames:o,setActiveNames:r}},vX=()=>{const e=ze("collapse");return{rootKls:C(()=>e.b())}},mX=N({...N({name:"ElCollapse"}),props:pX,emits:fX,setup(e,{expose:t,emit:o}){const r=e,{activeNames:l,setActiveNames:n}=hX(r,o),{rootKls:a}=vX();return t({activeNames:l,setActiveNames:n}),(i,c)=>(b(),M("div",{class:O(s(a))},[be(i.$slots,"default")],2))}});var gX=Le(mX,[["__file","collapse.vue"]]);const bX=N({...N({name:"ElCollapseTransition"}),setup(e){const t=ze("collapse-transition"),o=l=>{l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom},r={beforeEnter(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.style.height&&(l.dataset.elExistsHeight=l.style.height),l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0},enter(l){requestAnimationFrame(()=>{l.dataset.oldOverflow=l.style.overflow,l.dataset.elExistsHeight?l.style.maxHeight=l.dataset.elExistsHeight:l.scrollHeight!==0?l.style.maxHeight=`${l.scrollHeight}px`:l.style.maxHeight=0,l.style.paddingTop=l.dataset.oldPaddingTop,l.style.paddingBottom=l.dataset.oldPaddingBottom,l.style.overflow="hidden"})},afterEnter(l){l.style.maxHeight="",l.style.overflow=l.dataset.oldOverflow},enterCancelled(l){o(l)},beforeLeave(l){l.dataset||(l.dataset={}),l.dataset.oldPaddingTop=l.style.paddingTop,l.dataset.oldPaddingBottom=l.style.paddingBottom,l.dataset.oldOverflow=l.style.overflow,l.style.maxHeight=`${l.scrollHeight}px`,l.style.overflow="hidden"},leave(l){l.scrollHeight!==0&&(l.style.maxHeight=0,l.style.paddingTop=0,l.style.paddingBottom=0)},afterLeave(l){o(l)},leaveCancelled(l){o(l)}};return(l,n)=>(b(),he(Mo,Mt({name:s(t).b()},Ok(r)),{default:le(()=>[be(l.$slots,"default")]),_:3},16,["name"]))}});var vp=Le(bX,[["__file","collapse-transition.vue"]]);vp.install=e=>{e.component(vp.name,vp)};const mp=vp,_X=mp,wX=Pe({title:{type:String,default:""},name:{type:ue([String,Number]),default:void 0},disabled:Boolean}),yX=e=>{const t=Ge(Xw),{namespace:o}=ze("collapse"),r=D(!1),l=D(!1),n=Ph(),a=C(()=>n.current++),i=C(()=>{var h;return(h=e.name)!=null?h:`${o.value}-id-${n.prefix}-${s(a)}`}),c=C(()=>t==null?void 0:t.activeNames.value.includes(s(i)));return{focusing:r,id:a,isActive:c,handleFocus:()=>{setTimeout(()=>{l.value?l.value=!1:r.value=!0},50)},handleHeaderClick:()=>{e.disabled||(t==null||t.handleItemClick(s(i)),r.value=!1,l.value=!0)},handleEnterClick:()=>{t==null||t.handleItemClick(s(i))}}},xX=(e,{focusing:t,isActive:o,id:r})=>{const l=ze("collapse"),n=C(()=>[l.b("item"),l.is("active",s(o)),l.is("disabled",e.disabled)]),a=C(()=>[l.be("item","header"),l.is("active",s(o)),{focusing:s(t)&&!e.disabled}]),i=C(()=>[l.be("item","arrow"),l.is("active",s(o))]),c=C(()=>l.be("item","wrap")),d=C(()=>l.be("item","content")),u=C(()=>l.b(`content-${s(r)}`)),p=C(()=>l.b(`head-${s(r)}`));return{arrowKls:i,headKls:a,rootKls:n,itemWrapperKls:c,itemContentKls:d,scopedContentId:u,scopedHeadId:p}},kX=["id","aria-expanded","aria-controls","aria-describedby","tabindex"],CX=["id","aria-hidden","aria-labelledby"],SX=N({...N({name:"ElCollapseItem"}),props:wX,setup(e,{expose:t}){const o=e,{focusing:r,id:l,isActive:n,handleFocus:a,handleHeaderClick:i,handleEnterClick:c}=yX(o),{arrowKls:d,headKls:u,rootKls:p,itemWrapperKls:h,itemContentKls:v,scopedContentId:m,scopedHeadId:f}=xX(o,{focusing:r,isActive:n,id:l});return t({isActive:n}),(_,g)=>(b(),M("div",{class:O(s(p))},[E("button",{id:s(f),class:O(s(u)),"aria-expanded":s(n),"aria-controls":s(m),"aria-describedby":s(m),tabindex:_.disabled?-1:0,type:"button",onClick:g[0]||(g[0]=(...y)=>s(i)&&s(i)(...y)),onKeydown:g[1]||(g[1]=Gt(ct((...y)=>s(c)&&s(c)(...y),["stop","prevent"]),["space","enter"])),onFocus:g[2]||(g[2]=(...y)=>s(a)&&s(a)(...y)),onBlur:g[3]||(g[3]=y=>r.value=!1)},[be(_.$slots,"title",{},()=>[Ct($e(_.title),1)]),te(s(Ze),{class:O(s(d))},{default:le(()=>[te(s(ir))]),_:1},8,["class"])],42,kX),te(s(mp),null,{default:le(()=>[mt(E("div",{id:s(m),role:"region",class:O(s(h)),"aria-hidden":!s(n),"aria-labelledby":s(f)},[E("div",{class:O(s(v))},[be(_.$slots,"default")],2)],10,CX),[[Lt,s(n)]])]),_:3})],2))}});var Zw=Le(SX,[["__file","collapse-item.vue"]]);const EX=yt(gX,{CollapseItem:Zw}),TX=co(Zw),$X=Pe({color:{type:ue(Object),required:!0},vertical:{type:Boolean,default:!1}});let Nv=!1;function Rc(e,t){if(!Nt)return;const o=function(n){var a;(a=t.drag)==null||a.call(t,n)},r=function(n){var a;document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,Nv=!1,(a=t.end)==null||a.call(t,n)},l=function(n){var a;Nv||(n.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),document.addEventListener("touchmove",o),document.addEventListener("touchend",r),Nv=!0,(a=t.start)==null||a.call(t,n))};e.addEventListener("mousedown",l),e.addEventListener("touchstart",l)}const MX=e=>{const t=wt(),o=lo(),r=lo();function l(a){a.target!==o.value&&n(a)}function n(a){if(!r.value||!o.value)return;const c=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:u}=P0(a);if(e.vertical){let p=u-c.top;p=Math.max(o.value.offsetHeight/2,p),p=Math.min(p,c.height-o.value.offsetHeight/2),e.color.set("alpha",Math.round((p-o.value.offsetHeight/2)/(c.height-o.value.offsetHeight)*100))}else{let p=d-c.left;p=Math.max(o.value.offsetWidth/2,p),p=Math.min(p,c.width-o.value.offsetWidth/2),e.color.set("alpha",Math.round((p-o.value.offsetWidth/2)/(c.width-o.value.offsetWidth)*100))}}return{thumb:o,bar:r,handleDrag:n,handleClick:l}},AX=(e,{bar:t,thumb:o,handleDrag:r})=>{const l=wt(),n=ze("color-alpha-slider"),a=D(0),i=D(0),c=D();function d(){if(!o.value||e.vertical)return 0;const y=l.vnode.el,w=e.color.get("alpha");return y?Math.round(w*(y.offsetWidth-o.value.offsetWidth/2)/100):0}function u(){if(!o.value)return 0;const y=l.vnode.el;if(!e.vertical)return 0;const w=e.color.get("alpha");return y?Math.round(w*(y.offsetHeight-o.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:y,g:w,b:x}=e.color.toRgb();return`linear-gradient(to right, rgba(${y}, ${w}, ${x}, 0) 0%, rgba(${y}, ${w}, ${x}, 1) 100%)`}return""}function h(){a.value=d(),i.value=u(),c.value=p()}ft(()=>{if(!t.value||!o.value)return;const y={drag:w=>{r(w)},end:w=>{r(w)}};Rc(t.value,y),Rc(o.value,y),h()}),Se(()=>e.color.get("alpha"),()=>h()),Se(()=>e.color.value,()=>h());const v=C(()=>[n.b(),n.is("vertical",e.vertical)]),m=C(()=>n.e("bar")),f=C(()=>n.e("thumb")),_=C(()=>({background:c.value})),g=C(()=>({left:go(a.value),top:go(i.value)}));return{rootKls:v,barKls:m,barStyle:_,thumbKls:f,thumbStyle:g,update:h}},zX=N({...N({name:"ElColorAlphaSlider"}),props:$X,setup(e,{expose:t}){const o=e,{bar:r,thumb:l,handleDrag:n,handleClick:a}=MX(o),{rootKls:i,barKls:c,barStyle:d,thumbKls:u,thumbStyle:p,update:h}=AX(o,{bar:r,thumb:l,handleDrag:n});return t({update:h,bar:r,thumb:l}),(v,m)=>(b(),M("div",{class:O(s(i))},[E("div",{ref_key:"bar",ref:r,class:O(s(c)),style:Je(s(d)),onClick:m[0]||(m[0]=(...f)=>s(a)&&s(a)(...f))},null,6),E("div",{ref_key:"thumb",ref:l,class:O(s(u)),style:Je(s(p))},null,6)],2))}});var IX=Le(zX,[["__file","alpha-slider.vue"]]);const OX=N({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=ze("color-hue-slider"),o=wt(),r=D(),l=D(),n=D(0),a=D(0),i=C(()=>e.color.get("hue"));Se(()=>i.value,()=>{h()});function c(v){v.target!==r.value&&d(v)}function d(v){if(!l.value||!r.value)return;const f=o.vnode.el.getBoundingClientRect(),{clientX:_,clientY:g}=P0(v);let y;if(e.vertical){let w=g-f.top;w=Math.min(w,f.height-r.value.offsetHeight/2),w=Math.max(r.value.offsetHeight/2,w),y=Math.round((w-r.value.offsetHeight/2)/(f.height-r.value.offsetHeight)*360)}else{let w=_-f.left;w=Math.min(w,f.width-r.value.offsetWidth/2),w=Math.max(r.value.offsetWidth/2,w),y=Math.round((w-r.value.offsetWidth/2)/(f.width-r.value.offsetWidth)*360)}e.color.set("hue",y)}function u(){if(!r.value)return 0;const v=o.vnode.el;if(e.vertical)return 0;const m=e.color.get("hue");return v?Math.round(m*(v.offsetWidth-r.value.offsetWidth/2)/360):0}function p(){if(!r.value)return 0;const v=o.vnode.el;if(!e.vertical)return 0;const m=e.color.get("hue");return v?Math.round(m*(v.offsetHeight-r.value.offsetHeight/2)/360):0}function h(){n.value=u(),a.value=p()}return ft(()=>{if(!l.value||!r.value)return;const v={drag:m=>{d(m)},end:m=>{d(m)}};Rc(l.value,v),Rc(r.value,v),h()}),{bar:l,thumb:r,thumbLeft:n,thumbTop:a,hueValue:i,handleClick:c,update:h,ns:t}}});function NX(e,t,o,r,l,n){return b(),M("div",{class:O([e.ns.b(),e.ns.is("vertical",e.vertical)])},[E("div",{ref:"bar",class:O(e.ns.e("bar")),onClick:t[0]||(t[0]=(...a)=>e.handleClick&&e.handleClick(...a))},null,2),E("div",{ref:"thumb",class:O(e.ns.e("thumb")),style:Je({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var PX=Le(OX,[["render",NX],["__file","hue-slider.vue"]]);const RX=Pe({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Oo,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},teleported:Uo.teleported,predefine:{type:ue(Array)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),LX={[St]:e=>ut(e)||jo(e),[ro]:e=>ut(e)||jo(e),activeChange:e=>ut(e)||jo(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},Jw=Symbol("colorPickerContextKey"),Qw=function(e,t,o){return[e,t*o/((e=(2-t)*o)<1?e:2-e)||0,e/2]},BX=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},VX=function(e){return typeof e=="string"&&e.includes("%")},rs=function(e,t){BX(e)&&(e="100%");const o=VX(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),o&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},ey={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},gp=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),o=e%16;return`${ey[t]||t}${ey[o]||o}`},ty=function({r:e,g:t,b:o}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+o)?"":`#${gp(e)}${gp(t)}${gp(o)}`},Pv={A:10,B:11,C:12,D:13,E:14,F:15},Xa=function(e){return e.length===2?(Pv[e[0].toUpperCase()]||+e[0])*16+(Pv[e[1].toUpperCase()]||+e[1]):Pv[e[1].toUpperCase()]||+e[1]},DX=function(e,t,o){t=t/100,o=o/100;let r=t;const l=Math.max(o,.01);o*=2,t*=o<=1?o:2-o,r*=l<=1?l:2-l;const n=(o+t)/2,a=o===0?2*r/(l+r):2*t/(o+t);return{h:e,s:a*100,v:n*100}},oy=(e,t,o)=>{e=rs(e,255),t=rs(t,255),o=rs(o,255);const r=Math.max(e,t,o),l=Math.min(e,t,o);let n;const a=r,i=r-l,c=r===0?0:i/r;if(r===l)n=0;else{switch(r){case e:{n=(t-o)/i+(t{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,l)),this._value=Math.max(0,Math.min(100,n)),this.doOnChange()};if(t.includes("hsl")){const r=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:l,s:n,v:a}=DX(r[0],r[1],r[2]);o(l,n,a)}}else if(t.includes("hsv")){const r=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3&&o(r[0],r[1],r[2])}else if(t.includes("rgb")){const r=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(l=>l!=="").map((l,n)=>n>2?Number.parseFloat(l):Number.parseInt(l,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:l,s:n,v:a}=oy(r[0],r[1],r[2]);o(l,n,a)}}else if(t.includes("#")){const r=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let l,n,a;r.length===3?(l=Xa(r[0]+r[0]),n=Xa(r[1]+r[1]),a=Xa(r[2]+r[2])):(r.length===6||r.length===8)&&(l=Xa(r.slice(0,2)),n=Xa(r.slice(2,4)),a=Xa(r.slice(4,6))),r.length===8?this._alpha=Xa(r.slice(6))/255*100:(r.length===3||r.length===6)&&(this._alpha=100);const{h:i,s:c,v:d}=oy(l,n,a);o(i,c,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:o,_value:r,_alpha:l,format:n}=this;if(this.enableAlpha)switch(n){case"hsl":{const a=Qw(t,o/100,r/100);this.value=`hsla(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(o)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${ty(Lc(t,o,r))}${gp(l*255/100)}`;break}default:{const{r:a,g:i,b:c}=Lc(t,o,r);this.value=`rgba(${a}, ${i}, ${c}, ${this.get("alpha")/100})`}}else switch(n){case"hsl":{const a=Qw(t,o/100,r/100);this.value=`hsl(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(o)}%, ${Math.round(r)}%)`;break}case"rgb":{const{r:a,g:i,b:c}=Lc(t,o,r);this.value=`rgb(${a}, ${i}, ${c})`;break}default:this.value=ty(Lc(t,o,r))}}}const HX=N({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(e){const t=ze("color-predefine"),{currentColor:o}=Ge(Jw),r=D(n(e.colors,e.color));Se(()=>o.value,a=>{const i=new Bc;i.fromString(a),r.value.forEach(c=>{c.selected=i.compare(c)})}),Go(()=>{r.value=n(e.colors,e.color)});function l(a){e.color.fromString(e.colors[a])}function n(a,i){return a.map(c=>{const d=new Bc;return d.enableAlpha=e.enableAlpha,d.format="rgba",d.fromString(c),d.selected=d.value===i.value,d})}return{rgbaColors:r,handleSelect:l,ns:t}}}),FX=["onClick"];function jX(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.b())},[E("div",{class:O(e.ns.e("colors"))},[(b(!0),M(Qe,null,It(e.rgbaColors,(a,i)=>(b(),M("div",{key:e.colors[i],class:O([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:c=>e.handleSelect(i)},[E("div",{style:Je({backgroundColor:a.value})},null,4)],10,FX))),128))],2)],2)}var KX=Le(HX,[["render",jX],["__file","predefine.vue"]]);const UX=N({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=ze("color-svpanel"),o=wt(),r=D(0),l=D(0),n=D("hsl(0, 100%, 50%)"),a=C(()=>{const d=e.color.get("hue"),u=e.color.get("value");return{hue:d,value:u}});function i(){const d=e.color.get("saturation"),u=e.color.get("value"),p=o.vnode.el,{clientWidth:h,clientHeight:v}=p;l.value=d*h/100,r.value=(100-u)*v/100,n.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function c(d){const p=o.vnode.el.getBoundingClientRect(),{clientX:h,clientY:v}=P0(d);let m=h-p.left,f=v-p.top;m=Math.max(0,m),m=Math.min(m,p.width),f=Math.max(0,f),f=Math.min(f,p.height),l.value=m,r.value=f,e.color.set({saturation:m/p.width*100,value:100-f/p.height*100})}return Se(()=>a.value,()=>{i()}),ft(()=>{Rc(o.vnode.el,{drag:d=>{c(d)},end:d=>{c(d)}}),i()}),{cursorTop:r,cursorLeft:l,background:n,colorValue:a,handleDrag:c,update:i,ns:t}}}),WX=[E("div",null,null,-1)];function qX(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.b()),style:Je({backgroundColor:e.background})},[E("div",{class:O(e.ns.e("white"))},null,2),E("div",{class:O(e.ns.e("black"))},null,2),E("div",{class:O(e.ns.e("cursor")),style:Je({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},WX,6)],6)}var YX=Le(UX,[["render",qX],["__file","sv-panel.vue"]]);const GX=["onKeydown"],XX=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],ZX=N({...N({name:"ElColorPicker"}),props:RX,emits:LX,setup(e,{expose:t,emit:o}){const r=e,{t:l}=Rt(),n=ze("color"),{formItem:a}=sr(),i=So(),c=xr(),{inputId:d,isLabeledByFormItem:u}=bl(r,{formItemContext:a}),p=D(),h=D(),v=D(),m=D(),f=D(),_=D(),{isFocused:g,handleFocus:y,handleBlur:w}=Kd(f,{beforeBlur(Ce){var Ee;return(Ee=m.value)==null?void 0:Ee.isFocusInsideContent(Ce)},afterBlur(){H(!1),U()}}),x=Ce=>{if(c.value)return Re();y(Ce)};let $=!0;const T=Dt(new Bc({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),L=D(!1),P=D(!1),R=D(""),V=C(()=>!r.modelValue&&!P.value?"transparent":Z(T,r.showAlpha)),B=C(()=>!r.modelValue&&!P.value?"":T.value),F=C(()=>u.value?void 0:r.label||r.ariaLabel||l("el.colorpicker.defaultLabel"));Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-color-picker",ref:"https://element-plus.org/en-US/component/color-picker.html"},C(()=>!!r.label));const Q=C(()=>u.value?a==null?void 0:a.labelId:void 0),J=C(()=>[n.b("picker"),n.is("disabled",c.value),n.bm("picker",i.value),n.is("focused",g.value)]);function Z(Ce,Ee){if(!(Ce instanceof Bc))throw new TypeError("color should be instance of _color Class");const{r:De,g:ae,b:pe}=Ce.toRgb();return Ee?`rgba(${De}, ${ae}, ${pe}, ${Ce.get("alpha")/100})`:`rgb(${De}, ${ae}, ${pe})`}function H(Ce){L.value=Ce}const j=Mr(H,100,{leading:!0});function K(){c.value||H(!0)}function I(){j(!1),U()}function U(){et(()=>{r.modelValue?T.fromString(r.modelValue):(T.value="",et(()=>{P.value=!1}))})}function oe(){c.value||j(!L.value)}function ne(){T.fromString(R.value)}function ce(){const Ce=T.value;o(St,Ce),o("change",Ce),r.validateEvent&&(a==null||a.validate("change").catch(Ee=>void 0)),j(!1),et(()=>{const Ee=new Bc({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});T.compare(Ee)||U()})}function ee(){j(!1),o(St,null),o("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(Ce=>void 0)),U()}function Me(Ce){if(L.value&&(I(),g.value)){const Ee=new FocusEvent("focus",Ce);w(Ee)}}function de(Ce){Ce.preventDefault(),Ce.stopPropagation(),H(!1),U()}function _e(Ce){switch(Ce.code){case lt.enter:case lt.space:Ce.preventDefault(),Ce.stopPropagation(),K(),_.value.focus();break;case lt.esc:de(Ce);break}}function me(){f.value.focus()}function Re(){f.value.blur()}return ft(()=>{r.modelValue&&(R.value=B.value)}),Se(()=>r.modelValue,Ce=>{Ce?Ce&&Ce!==T.value&&($=!1,T.fromString(Ce)):P.value=!1}),Se(()=>B.value,Ce=>{R.value=Ce,$&&o("activeChange",Ce),$=!0}),Se(()=>T.value,()=>{!r.modelValue&&!P.value&&(P.value=!0)}),Se(()=>L.value,()=>{et(()=>{var Ce,Ee,De;(Ce=p.value)==null||Ce.update(),(Ee=h.value)==null||Ee.update(),(De=v.value)==null||De.update()})}),zt(Jw,{currentColor:B}),t({color:T,show:K,hide:I,focus:me,blur:Re}),(Ce,Ee)=>(b(),he(s(ur),{ref_key:"popper",ref:m,visible:L.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[s(n).be("picker","panel"),s(n).b("dropdown"),Ce.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:Ce.teleported,transition:`${s(n).namespace.value}-zoom-in-top`,persistent:"",onHide:Ee[2]||(Ee[2]=De=>H(!1))},{content:le(()=>[mt((b(),M("div",{onKeydown:Gt(de,["esc"])},[E("div",{class:O(s(n).be("dropdown","main-wrapper"))},[te(PX,{ref_key:"hue",ref:p,class:"hue-slider",color:s(T),vertical:""},null,8,["color"]),te(YX,{ref_key:"sv",ref:h,color:s(T)},null,8,["color"])],2),Ce.showAlpha?(b(),he(IX,{key:0,ref_key:"alpha",ref:v,color:s(T)},null,8,["color"])):se("v-if",!0),Ce.predefine?(b(),he(KX,{key:1,ref:"predefine","enable-alpha":Ce.showAlpha,color:s(T),colors:Ce.predefine},null,8,["enable-alpha","color","colors"])):se("v-if",!0),E("div",{class:O(s(n).be("dropdown","btns"))},[E("span",{class:O(s(n).be("dropdown","value"))},[te(s(cr),{ref_key:"inputRef",ref:_,modelValue:R.value,"onUpdate:modelValue":Ee[0]||(Ee[0]=De=>R.value=De),"validate-event":!1,size:"small",onKeyup:Gt(ne,["enter"]),onBlur:ne},null,8,["modelValue","onKeyup"])],2),te(s(Wo),{class:O(s(n).be("dropdown","link-btn")),text:"",size:"small",onClick:ee},{default:le(()=>[Ct($e(s(l)("el.colorpicker.clear")),1)]),_:1},8,["class"]),te(s(Wo),{plain:"",size:"small",class:O(s(n).be("dropdown","btn")),onClick:ce},{default:le(()=>[Ct($e(s(l)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,GX)),[[s(xn),Me]])]),default:le(()=>[E("div",Mt({id:s(d),ref_key:"triggerRef",ref:f},Ce.$attrs,{class:s(J),role:"button","aria-label":s(F),"aria-labelledby":s(Q),"aria-description":s(l)("el.colorpicker.description",{color:Ce.modelValue||""}),"aria-disabled":s(c),tabindex:s(c)?-1:Ce.tabindex,onKeydown:_e,onFocus:x,onBlur:Ee[1]||(Ee[1]=(...De)=>s(w)&&s(w)(...De))}),[s(c)?(b(),M("div",{key:0,class:O(s(n).be("picker","mask"))},null,2)):se("v-if",!0),E("div",{class:O(s(n).be("picker","trigger")),onClick:oe},[E("span",{class:O([s(n).be("picker","color"),s(n).is("alpha",Ce.showAlpha)])},[E("span",{class:O(s(n).be("picker","color-inner")),style:Je({backgroundColor:s(V)})},[mt(te(s(Ze),{class:O([s(n).be("picker","icon"),s(n).is("icon-arrow-down")])},{default:le(()=>[te(s(Pl))]),_:1},8,["class"]),[[Lt,Ce.modelValue||P.value]]),mt(te(s(Ze),{class:O([s(n).be("picker","empty"),s(n).is("icon-close")])},{default:le(()=>[te(s(Jr))]),_:1},8,["class"]),[[Lt,!Ce.modelValue&&!P.value]])],6)],2)],2)],16,XX)]),_:1},8,["visible","popper-class","teleported","transition"]))}});var JX=Le(ZX,[["__file","color-picker.vue"]]);const QX=yt(JX),eZ=N({...N({name:"ElContainer"}),props:{direction:{type:String}},setup(e){const t=e,o=Do(),r=ze("container"),l=C(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:o&&o.default?o.default().some(a=>{const i=a.type.name;return i==="ElHeader"||i==="ElFooter"}):!1);return(n,a)=>(b(),M("section",{class:O([s(r).b(),s(r).is("vertical",s(l))])},[be(n.$slots,"default")],2))}});var tZ=Le(eZ,[["__file","container.vue"]]);const oZ=N({...N({name:"ElAside"}),props:{width:{type:String,default:null}},setup(e){const t=e,o=ze("aside"),r=C(()=>t.width?o.cssVarBlock({width:t.width}):{});return(l,n)=>(b(),M("aside",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ry=Le(oZ,[["__file","aside.vue"]]);const rZ=N({...N({name:"ElFooter"}),props:{height:{type:String,default:null}},setup(e){const t=e,o=ze("footer"),r=C(()=>t.height?o.cssVarBlock({height:t.height}):{});return(l,n)=>(b(),M("footer",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ly=Le(rZ,[["__file","footer.vue"]]);const lZ=N({...N({name:"ElHeader"}),props:{height:{type:String,default:null}},setup(e){const t=e,o=ze("header"),r=C(()=>t.height?o.cssVarBlock({height:t.height}):{});return(l,n)=>(b(),M("header",{class:O(s(o).b()),style:Je(s(r))},[be(l.$slots,"default")],6))}});var ny=Le(lZ,[["__file","header.vue"]]);const nZ=N({...N({name:"ElMain"}),setup(e){const t=ze("main");return(o,r)=>(b(),M("main",{class:O(s(t).b())},[be(o.$slots,"default")],2))}});var ay=Le(nZ,[["__file","main.vue"]]);const aZ=yt(tZ,{Aside:ry,Footer:ly,Header:ny,Main:ay}),iZ=co(ry),sZ=co(ly),cZ=co(ny),uZ=co(ay);var iy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){var l=r.prototype,n=l.format;l.format=function(a){var i=this,c=this.$locale();if(!this.isValid())return n.bind(this)(a);var d=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return c.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return c.ordinal(i.week(),"W");case"w":case"ww":return d.s(i.week(),p==="w"?1:2,"0");case"W":case"WW":return d.s(i.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return d.s(String(i.$H===0?24:i.$H),p==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return p}});return n.bind(this)(u)}}})})(iy);var dZ=iy.exports;const pZ=cl(dZ);var sy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){var o="week",r="year";return function(l,n,a){var i=n.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=a(this).startOf(r).add(1,r).date(d),p=a(this).endOf(o);if(u.isBefore(p))return 1}var h=a(this).startOf(r).date(d).startOf(o).subtract(1,"millisecond"),v=this.diff(h,o,!0);return v<0?a(this).startOf("week").week():Math.ceil(v)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(sy);var fZ=sy.exports;const hZ=cl(fZ);var cy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.weekYear=function(){var l=this.month(),n=this.week(),a=this.year();return n===1&&l===11?a+1:l===0&&n>=52?a-1:a}}})})(cy);var vZ=cy.exports;const mZ=cl(vZ);var uy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r,l){r.prototype.dayOfYear=function(n){var a=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return n==null?a:this.add(n-a,"day")}}})})(uy);var gZ=uy.exports;const bZ=cl(gZ);var dy={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.isSameOrAfter=function(l,n){return this.isSame(l,n)||this.isAfter(l,n)}}})})(dy);var _Z=dy.exports;const wZ=cl(_Z);var py={exports:{}};(function(e,t){(function(o,r){e.exports=r()})(Ao,function(){return function(o,r){r.prototype.isSameOrBefore=function(l,n){return this.isSame(l,n)||this.isBefore(l,n)}}})})(py);var yZ=py.exports;const xZ=cl(yZ),Rv=Symbol(),kZ=Pe({..._v,type:{type:ue(String),default:"date"}}),CZ=["date","dates","year","years","month","week","range"],Lv=Pe({disabledDate:{type:ue(Function)},date:{type:ue(Object),required:!0},minDate:{type:ue(Object)},maxDate:{type:ue(Object)},parsedValue:{type:ue([Object,Array])},rangeState:{type:ue(Object),default:()=>({endDate:null,selecting:!1})}}),fy=Pe({type:{type:ue(String),required:!0,values:lF},dateFormat:String,timeFormat:String}),hy=Pe({unlinkPanels:Boolean,parsedValue:{type:ue(Array)}}),Bv=e=>({type:String,values:CZ,default:e}),SZ=Pe({...fy,parsedValue:{type:ue([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),EZ=Pe({...Lv,cellClassName:{type:ue(Function)},showWeekNumber:Boolean,selectionMode:Bv("date")}),TZ=["changerange","pick","select"],Vv=e=>{if(!Ke(e))return!1;const[t,o]=e;return kt.isDayjs(t)&&kt.isDayjs(o)&&t.isSameOrBefore(o)},vy=(e,{lang:t,unit:o,unlinkPanels:r})=>{let l;if(Ke(e)){let[n,a]=e.map(i=>kt(i).locale(t));return r||(a=n.add(1,o)),[n,a]}else e?l=kt(e):l=kt();return l=l.locale(t),[l,l.add(1,o)]},$Z=(e,t,{columnIndexOffset:o,startDate:r,nextEndDate:l,now:n,unit:a,relativeDateGetter:i,setCellMetadata:c,setRowMetadata:d})=>{for(let u=0;u["normal","today"].includes(e),MZ=(e,t)=>{const{lang:o}=Rt(),r=D(),l=D(),n=D(),a=D(),i=D([[],[],[],[],[],[]]);let c=!1;const d=e.date.$locale().weekStart||7,u=e.date.locale("en").localeData().weekdaysShort().map(I=>I.toLowerCase()),p=C(()=>d>3?7-d:-d),h=C(()=>{const I=e.date.startOf("month");return I.subtract(I.day()||7,"day")}),v=C(()=>u.concat(u).slice(d,d+7)),m=C(()=>N_(s(x)).some(I=>I.isCurrent)),f=C(()=>{const I=e.date.startOf("month"),U=I.day()||7,oe=I.daysInMonth(),ne=I.subtract(1,"month").daysInMonth();return{startOfMonthDay:U,dateCountOfMonth:oe,dateCountOfLastMonth:ne}}),_=C(()=>e.selectionMode==="dates"?Lr(e.parsedValue):[]),g=(I,{count:U,rowIndex:oe,columnIndex:ne})=>{const{startOfMonthDay:ce,dateCountOfMonth:ee,dateCountOfLastMonth:Me}=s(f),de=s(p);if(oe>=0&&oe<=1){const _e=ce+de<0?7+ce+de:ce+de;if(ne+oe*7>=_e)return I.text=U,!0;I.text=Me-(_e-ne%7)+1+oe*7,I.type="prev-month"}else return U<=ee?I.text=U:(I.text=U-ee,I.type="next-month"),!0;return!1},y=(I,{columnIndex:U,rowIndex:oe},ne)=>{const{disabledDate:ce,cellClassName:ee}=e,Me=s(_),de=g(I,{count:ne,rowIndex:oe,columnIndex:U}),_e=I.dayjs.toDate();return I.selected=Me.find(me=>me.isSame(I.dayjs,"day")),I.isSelected=!!I.selected,I.isCurrent=T(I),I.disabled=ce==null?void 0:ce(_e),I.customClass=ee==null?void 0:ee(_e),de},w=I=>{if(e.selectionMode==="week"){const[U,oe]=e.showWeekNumber?[1,7]:[0,6],ne=K(I[U+1]);I[U].inRange=ne,I[U].start=ne,I[oe].inRange=ne,I[oe].end=ne}},x=C(()=>{const{minDate:I,maxDate:U,rangeState:oe,showWeekNumber:ne}=e,ce=s(p),ee=s(i),Me="day";let de=1;if(ne)for(let _e=0;_e<6;_e++)ee[_e][0]||(ee[_e][0]={type:"week",text:s(h).add(_e*7+1,Me).week()});return $Z({row:6,column:7},ee,{startDate:I,columnIndexOffset:ne?1:0,nextEndDate:oe.endDate||U||oe.selecting&&I||null,now:kt().locale(s(o)).startOf(Me),unit:Me,relativeDateGetter:_e=>s(h).add(_e-ce,Me),setCellMetadata:(..._e)=>{y(..._e,de)&&(de+=1)},setRowMetadata:w}),ee});Se(()=>e.date,async()=>{var I;(I=s(r))!=null&&I.contains(document.activeElement)&&(await et(),await $())});const $=async()=>{var I;return(I=s(l))==null?void 0:I.focus()},T=I=>e.selectionMode==="date"&&Dv(I.type)&&L(I,e.parsedValue),L=(I,U)=>U?kt(U).locale(s(o)).isSame(e.date.date(Number(I.text)),"day"):!1,P=(I,U)=>{const oe=I*7+(U-(e.showWeekNumber?1:0))-s(p);return s(h).add(oe,"day")},R=I=>{var U;if(!e.rangeState.selecting)return;let oe=I.target;if(oe.tagName==="SPAN"&&(oe=(U=oe.parentNode)==null?void 0:U.parentNode),oe.tagName==="DIV"&&(oe=oe.parentNode),oe.tagName!=="TD")return;const ne=oe.parentNode.rowIndex-1,ce=oe.cellIndex;s(x)[ne][ce].disabled||(ne!==s(n)||ce!==s(a))&&(n.value=ne,a.value=ce,t("changerange",{selecting:!0,endDate:P(ne,ce)}))},V=I=>!s(m)&&(I==null?void 0:I.text)===1&&I.type==="normal"||I.isCurrent,B=I=>{c||s(m)||e.selectionMode!=="date"||j(I,!0)},F=I=>{I.target.closest("td")&&(c=!0)},Q=I=>{I.target.closest("td")&&(c=!1)},J=I=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:I,maxDate:null}),t("select",!0)):(I>=e.minDate?t("pick",{minDate:e.minDate,maxDate:I}):t("pick",{minDate:I,maxDate:e.minDate}),t("select",!1))},Z=I=>{const U=I.week(),oe=`${I.year()}w${U}`;t("pick",{year:I.year(),week:U,value:oe,date:I.startOf("week")})},H=(I,U)=>{const oe=U?Lr(e.parsedValue).filter(ne=>(ne==null?void 0:ne.valueOf())!==I.valueOf()):Lr(e.parsedValue).concat([I]);t("pick",oe)},j=(I,U=!1)=>{const oe=I.target.closest("td");if(!oe)return;const ne=oe.parentNode.rowIndex-1,ce=oe.cellIndex,ee=s(x)[ne][ce];if(ee.disabled||ee.type==="week")return;const Me=P(ne,ce);switch(e.selectionMode){case"range":{J(Me);break}case"date":{t("pick",Me,U);break}case"week":{Z(Me);break}case"dates":{H(Me,!!ee.selected);break}}},K=I=>{if(e.selectionMode!=="week")return!1;let U=e.date.startOf("day");if(I.type==="prev-month"&&(U=U.subtract(1,"month")),I.type==="next-month"&&(U=U.add(1,"month")),U=U.date(Number.parseInt(I.text,10)),e.parsedValue&&!Array.isArray(e.parsedValue)){const oe=(e.parsedValue.day()-d+7)%7-1;return e.parsedValue.subtract(oe,"day").isSame(U,"day")}return!1};return{WEEKS:v,rows:x,tbodyRef:r,currentCellRef:l,focus:$,isCurrent:T,isWeekActive:K,isSelectedCell:V,handlePickDate:j,handleMouseUp:Q,handleMouseDown:F,handleMouseMove:R,handleFocus:B}},AZ=(e,{isCurrent:t,isWeekActive:o})=>{const r=ze("date-table"),{t:l}=Rt(),n=C(()=>[r.b(),{"is-week-mode":e.selectionMode==="week"}]),a=C(()=>l("el.datepicker.dateTablePrompt")),i=C(()=>l("el.datepicker.week"));return{tableKls:n,tableLabel:a,weekLabel:i,getCellClasses:u=>{const p=[];return Dv(u.type)&&!u.disabled?(p.push("available"),u.type==="today"&&p.push("today")):p.push(u.type),t(u)&&p.push("current"),u.inRange&&(Dv(u.type)||e.selectionMode==="week")&&(p.push("in-range"),u.start&&p.push("start-date"),u.end&&p.push("end-date")),u.disabled&&p.push("disabled"),u.selected&&p.push("selected"),u.customClass&&p.push(u.customClass),p.join(" ")},getRowKls:u=>[r.e("row"),{current:o(u)}],t:l}},zZ=Pe({cell:{type:ue(Object)}});var IZ=N({name:"ElDatePickerCell",props:zZ,setup(e){const t=ze("date-table-cell"),{slots:o}=Ge(Rv);return()=>{const{cell:r}=e;return be(o,"default",{...r},()=>[te("div",{class:t.b()},[te("span",{class:t.e("text")},[r==null?void 0:r.text])])])}}});const OZ=["aria-label"],NZ={key:0,scope:"col"},PZ=["aria-label"],RZ=["aria-current","aria-selected","tabindex"];var Hv=Le(N({__name:"basic-date-table",props:EZ,emits:TZ,setup(e,{expose:t,emit:o}){const r=e,{WEEKS:l,rows:n,tbodyRef:a,currentCellRef:i,focus:c,isCurrent:d,isWeekActive:u,isSelectedCell:p,handlePickDate:h,handleMouseUp:v,handleMouseDown:m,handleMouseMove:f,handleFocus:_}=MZ(r,o),{tableLabel:g,tableKls:y,weekLabel:w,getCellClasses:x,getRowKls:$,t:T}=AZ(r,{isCurrent:d,isWeekActive:u});return t({focus:c}),(L,P)=>(b(),M("table",{"aria-label":s(g),class:O(s(y)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:P[1]||(P[1]=(...R)=>s(h)&&s(h)(...R)),onMousemove:P[2]||(P[2]=(...R)=>s(f)&&s(f)(...R)),onMousedown:P[3]||(P[3]=ct((...R)=>s(m)&&s(m)(...R),["prevent"])),onMouseup:P[4]||(P[4]=(...R)=>s(v)&&s(v)(...R))},[E("tbody",{ref_key:"tbodyRef",ref:a},[E("tr",null,[L.showWeekNumber?(b(),M("th",NZ,$e(s(w)),1)):se("v-if",!0),(b(!0),M(Qe,null,It(s(l),(R,V)=>(b(),M("th",{key:V,"aria-label":s(T)("el.datepicker.weeksFull."+R),scope:"col"},$e(s(T)("el.datepicker.weeks."+R)),9,PZ))),128))]),(b(!0),M(Qe,null,It(s(n),(R,V)=>(b(),M("tr",{key:V,class:O(s($)(R[1]))},[(b(!0),M(Qe,null,It(R,(B,F)=>(b(),M("td",{key:`${V}.${F}`,ref_for:!0,ref:Q=>s(p)(B)&&(i.value=Q),class:O(s(x)(B)),"aria-current":B.isCurrent?"date":void 0,"aria-selected":B.isCurrent,tabindex:s(p)(B)?0:-1,onFocus:P[0]||(P[0]=(...Q)=>s(_)&&s(_)(...Q))},[te(s(IZ),{cell:B},null,8,["cell"])],42,RZ))),128))],2))),128))],512)],42,OZ))}}),[["__file","basic-date-table.vue"]]);const LZ=Pe({...Lv,selectionMode:Bv("month")}),BZ=["aria-label"],VZ=["aria-selected","aria-label","tabindex","onKeydown"],DZ={class:"cell"};var Fv=Le(N({__name:"basic-month-table",props:LZ,emits:["changerange","pick","select"],setup(e,{expose:t,emit:o}){const r=e,l=(x,$,T)=>{const L=kt().locale(T).startOf("month").month($).year(x),P=L.daysInMonth();return aa(P).map(R=>L.add(R,"day").toDate())},n=ze("month-table"),{t:a,lang:i}=Rt(),c=D(),d=D(),u=D(r.date.locale("en").localeData().monthsShort().map(x=>x.toLowerCase())),p=D([[],[],[]]),h=D(),v=D(),m=C(()=>{var x,$;const T=p.value,L=kt().locale(i.value).startOf("month");for(let P=0;P<3;P++){const R=T[P];for(let V=0;V<4;V++){const B=R[V]||(R[V]={row:P,column:V,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});B.type="normal";const F=P*4+V,Q=r.date.startOf("year").month(F),J=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;B.inRange=!!(r.minDate&&Q.isSameOrAfter(r.minDate,"month")&&J&&Q.isSameOrBefore(J,"month"))||!!(r.minDate&&Q.isSameOrBefore(r.minDate,"month")&&J&&Q.isSameOrAfter(J,"month")),(x=r.minDate)!=null&&x.isSameOrAfter(J)?(B.start=!!(J&&Q.isSame(J,"month")),B.end=r.minDate&&Q.isSame(r.minDate,"month")):(B.start=!!(r.minDate&&Q.isSame(r.minDate,"month")),B.end=!!(J&&Q.isSame(J,"month"))),L.isSame(Q)&&(B.type="today"),B.text=F,B.disabled=(($=r.disabledDate)==null?void 0:$.call(r,Q.toDate()))||!1}}return T}),f=()=>{var x;(x=d.value)==null||x.focus()},_=x=>{const $={},T=r.date.year(),L=new Date,P=x.text;return $.disabled=r.disabledDate?l(T,P,i.value).every(r.disabledDate):!1,$.current=Lr(r.parsedValue).findIndex(R=>kt.isDayjs(R)&&R.year()===T&&R.month()===P)>=0,$.today=L.getFullYear()===T&&L.getMonth()===P,x.inRange&&($["in-range"]=!0,x.start&&($["start-date"]=!0),x.end&&($["end-date"]=!0)),$},g=x=>{const $=r.date.year(),T=x.text;return Lr(r.date).findIndex(L=>L.year()===$&&L.month()===T)>=0},y=x=>{var $;if(!r.rangeState.selecting)return;let T=x.target;if(T.tagName==="SPAN"&&(T=($=T.parentNode)==null?void 0:$.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const L=T.parentNode.rowIndex,P=T.cellIndex;m.value[L][P].disabled||(L!==h.value||P!==v.value)&&(h.value=L,v.value=P,o("changerange",{selecting:!0,endDate:r.date.startOf("year").month(L*4+P)}))},w=x=>{var $;const T=($=x.target)==null?void 0:$.closest("td");if((T==null?void 0:T.tagName)!=="TD"||Xr(T,"disabled"))return;const L=T.cellIndex,R=T.parentNode.rowIndex*4+L,V=r.date.startOf("year").month(R);r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&V>=r.minDate?o("pick",{minDate:r.minDate,maxDate:V}):o("pick",{minDate:V,maxDate:r.minDate}),o("select",!1)):(o("pick",{minDate:V,maxDate:null}),o("select",!0)):o("pick",R)};return Se(()=>r.date,async()=>{var x,$;(x=c.value)!=null&&x.contains(document.activeElement)&&(await et(),($=d.value)==null||$.focus())}),t({focus:f}),(x,$)=>(b(),M("table",{role:"grid","aria-label":s(a)("el.datepicker.monthTablePrompt"),class:O(s(n).b()),onClick:w,onMousemove:y},[E("tbody",{ref_key:"tbodyRef",ref:c},[(b(!0),M(Qe,null,It(s(m),(T,L)=>(b(),M("tr",{key:L},[(b(!0),M(Qe,null,It(T,(P,R)=>(b(),M("td",{key:R,ref_for:!0,ref:V=>g(P)&&(d.value=V),class:O(_(P)),"aria-selected":`${g(P)}`,"aria-label":s(a)(`el.datepicker.month${+P.text+1}`),tabindex:g(P)?0:-1,onKeydown:[Gt(ct(w,["prevent","stop"]),["space"]),Gt(ct(w,["prevent","stop"]),["enter"])]},[E("div",null,[E("span",DZ,$e(s(a)("el.datepicker.months."+u.value[P.text])),1)])],42,VZ))),128))]))),128))],512)],42,BZ))}}),[["__file","basic-month-table.vue"]]);const{date:HZ,disabledDate:FZ,parsedValue:jZ}=Lv,KZ=Pe({date:HZ,disabledDate:FZ,parsedValue:jZ,selectionMode:Bv("year")}),UZ=["aria-label"],WZ=["aria-selected","tabindex","onKeydown"],qZ={class:"cell"},YZ={key:1};var GZ=Le(N({__name:"basic-year-table",props:KZ,emits:["pick"],setup(e,{expose:t,emit:o}){const r=e,l=(f,_)=>{const g=kt(String(f)).locale(_).startOf("year"),w=g.endOf("year").dayOfYear();return aa(w).map(x=>g.add(x,"day").toDate())},n=ze("year-table"),{t:a,lang:i}=Rt(),c=D(),d=D(),u=C(()=>Math.floor(r.date.year()/10)*10),p=()=>{var f;(f=d.value)==null||f.focus()},h=f=>{const _={},g=kt().locale(i.value);return _.disabled=r.disabledDate?l(f,i.value).every(r.disabledDate):!1,_.current=Lr(r.parsedValue).findIndex(y=>y.year()===f)>=0,_.today=g.year()===f,_},v=f=>f===u.value&&r.date.year()u.value+9||Lr(r.date).findIndex(_=>_.year()===f)>=0||Lr(r.parsedValue).findIndex(_=>(_==null?void 0:_.year())===f)>=0,m=f=>{const g=f.target.closest("td");if(g&&g.textContent){if(Xr(g,"disabled"))return;const y=g.textContent||g.innerText;if(r.selectionMode==="years"){if(f.type==="keydown"){o("pick",Lr(r.parsedValue),!1);return}const w=Xr(g,"current")?Lr(r.parsedValue).filter(x=>(x==null?void 0:x.year())!==Number(y)):Lr(r.parsedValue).concat([kt(y)]);o("pick",w)}else o("pick",Number(y))}};return Se(()=>r.date,async()=>{var f,_;(f=c.value)!=null&&f.contains(document.activeElement)&&(await et(),(_=d.value)==null||_.focus())}),t({focus:p}),(f,_)=>(b(),M("table",{role:"grid","aria-label":s(a)("el.datepicker.yearTablePrompt"),class:O(s(n).b()),onClick:m},[E("tbody",{ref_key:"tbodyRef",ref:c},[(b(),M(Qe,null,It(3,(g,y)=>E("tr",{key:y},[(b(),M(Qe,null,It(4,(w,x)=>(b(),M(Qe,{key:y+"_"+x},[y*4+x<10?(b(),M("td",{key:0,ref_for:!0,ref:$=>v(s(u)+y*4+x)&&(d.value=$),class:O(["available",h(s(u)+y*4+x)]),"aria-selected":`${v(s(u)+y*4+x)}`,tabindex:v(s(u)+y*4+x)?0:-1,onKeydown:[Gt(ct(m,["prevent","stop"]),["space"]),Gt(ct(m,["prevent","stop"]),["enter"])]},[E("div",null,[E("span",qZ,$e(s(u)+y*4+x),1)])],42,WZ)):(b(),M("td",YZ))],64))),64))])),64))],512)],10,UZ))}}),[["__file","basic-year-table.vue"]]);const XZ=["onClick"],ZZ=["aria-label"],JZ=["aria-label"],QZ=["aria-label"],eJ=["aria-label"];var tJ=Le(N({__name:"panel-date-pick",props:SZ,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const o=e,r=(S,A,G)=>!0,l=ze("picker-panel"),n=ze("date-picker"),a=ya(),i=Do(),{t:c,lang:d}=Rt(),u=Ge("EP_PICKER_BASE"),p=Ge(op),{shortcuts:h,disabledDate:v,cellClassName:m,defaultTime:f}=u.props,_=Yt(u.props,"defaultValue"),g=D(),y=D(kt().locale(d.value)),w=D(!1);let x=!1;const $=C(()=>kt(f).locale(d.value)),T=C(()=>y.value.month()),L=C(()=>y.value.year()),P=D([]),R=D(null),V=D(null),B=S=>P.value.length>0?r(S,P.value,o.format||"HH:mm:ss"):!0,F=S=>f&&!pe.value&&!w.value&&!x?$.value.year(S.year()).month(S.month()).date(S.date()):de.value?S.millisecond(0):S.startOf("day"),Q=(S,...A)=>{if(!S)t("pick",S,...A);else if(Ke(S)){const G=S.map(F);t("pick",G,...A)}else t("pick",F(S),...A);R.value=null,V.value=null,w.value=!1,x=!1},J=async(S,A)=>{if(U.value==="date"){S=S;let G=o.parsedValue?o.parsedValue.year(S.year()).month(S.month()).date(S.date()):S;B(G)||(G=P.value[0][0].year(S.year()).month(S.month()).date(S.date())),y.value=G,Q(G,de.value||A),o.type==="datetime"&&(await et(),tt())}else U.value==="week"?Q(S.date):U.value==="dates"&&Q(S,!0)},Z=S=>{const A=S?"add":"subtract";y.value=y.value[A](1,"month"),Y("month")},H=S=>{const A=y.value,G=S?"add":"subtract";y.value=j.value==="year"?A[G](10,"year"):A[G](1,"year"),Y("year")},j=D("date"),K=C(()=>{const S=c("el.datepicker.year");if(j.value==="year"){const A=Math.floor(L.value/10)*10;return S?`${A} ${S} - ${A+9} ${S}`:`${A} - ${A+9}`}return`${L.value} ${S}`}),I=S=>{const A=it(S.value)?S.value():S.value;if(A){x=!0,Q(kt(A).locale(d.value));return}S.onClick&&S.onClick({attrs:a,slots:i,emit:t})},U=C(()=>{const{type:S}=o;return["week","month","year","years","dates"].includes(S)?S:"date"}),oe=C(()=>U.value==="date"?j.value:U.value),ne=C(()=>!!h.length),ce=async S=>{y.value=y.value.startOf("month").month(S),U.value==="month"?Q(y.value,!1):(j.value="date",["month","year","date","week"].includes(U.value)&&(Q(y.value,!0),await et(),tt())),Y("month")},ee=async(S,A)=>{U.value==="year"?(y.value=y.value.startOf("year").year(S),Q(y.value,!1)):U.value==="years"?Q(S,A??!0):(y.value=y.value.year(S),j.value="month",["month","year","date","week"].includes(U.value)&&(Q(y.value,!0),await et(),tt())),Y("year")},Me=async S=>{j.value=S,await et(),tt()},de=C(()=>o.type==="datetime"||o.type==="datetimerange"),_e=C(()=>{const S=de.value||U.value==="dates",A=U.value==="years",G=j.value==="date",X=j.value==="year";return S&&G||A&&X}),me=C(()=>v?o.parsedValue?Ke(o.parsedValue)?v(o.parsedValue[0].toDate()):v(o.parsedValue.toDate()):!0:!1),Re=()=>{if(U.value==="dates"||U.value==="years")Q(o.parsedValue);else{let S=o.parsedValue;if(!S){const A=kt(f).locale(d.value),G=Ye();S=A.year(G.year()).month(G.month()).date(G.date())}y.value=S,Q(S)}},Ce=C(()=>v?v(kt().locale(d.value).toDate()):!1),Ee=()=>{const A=kt().locale(d.value).toDate();w.value=!0,(!v||!v(A))&&B(A)&&(y.value=kt().locale(d.value),Q(y.value))},De=C(()=>o.timeFormat||Q4(o.format)),ae=C(()=>o.dateFormat||J4(o.format)),pe=C(()=>{if(V.value)return V.value;if(!(!o.parsedValue&&!_.value))return(o.parsedValue||y.value).format(De.value)}),ke=C(()=>{if(R.value)return R.value;if(!(!o.parsedValue&&!_.value))return(o.parsedValue||y.value).format(ae.value)}),Oe=D(!1),we=()=>{Oe.value=!0},Te=()=>{Oe.value=!1},Ne=S=>({hour:S.hour(),minute:S.minute(),second:S.second(),year:S.year(),month:S.month(),date:S.date()}),Ie=(S,A,G)=>{const{hour:X,minute:re,second:ge}=Ne(S),fe=o.parsedValue?o.parsedValue.hour(X).minute(re).second(ge):S;y.value=fe,Q(y.value,!0),G||(Oe.value=A)},Ae=S=>{const A=kt(S,De.value).locale(d.value);if(A.isValid()&&B(A)){const{year:G,month:X,date:re}=Ne(y.value);y.value=A.year(G).month(X).date(re),V.value=null,Oe.value=!1,Q(y.value,!0)}},xe=S=>{const A=kt(S,ae.value).locale(d.value);if(A.isValid()){if(v&&v(A.toDate()))return;const{hour:G,minute:X,second:re}=Ne(y.value);y.value=A.hour(G).minute(X).second(re),R.value=null,Q(y.value,!0)}},We=S=>kt.isDayjs(S)&&S.isValid()&&(v?!v(S.toDate()):!0),qe=S=>Ke(S)?S.map(A=>A.format(o.format)):S.format(o.format),ye=S=>kt(S,o.format).locale(d.value),Ye=()=>{const S=kt(_.value).locale(d.value);if(!_.value){const A=$.value;return kt().hour(A.hour()).minute(A.minute()).second(A.second()).locale(d.value)}return S},tt=async()=>{var S;["week","month","year","date"].includes(U.value)&&((S=g.value)==null||S.focus(),U.value==="week"&&dt(lt.down))},pt=S=>{const{code:A}=S;[lt.up,lt.down,lt.left,lt.right,lt.home,lt.end,lt.pageUp,lt.pageDown].includes(A)&&(dt(A),S.stopPropagation(),S.preventDefault()),[lt.enter,lt.space,lt.numpadEnter].includes(A)&&R.value===null&&V.value===null&&(S.preventDefault(),Q(y.value,!1))},dt=S=>{var A;const{up:G,down:X,left:re,right:ge,home:fe,end:Fe,pageUp:at,pageDown:_t}=lt,At={year:{[G]:-4,[X]:4,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setFullYear(bt.getFullYear()+Qt)},month:{[G]:-4,[X]:4,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setMonth(bt.getMonth()+Qt)},week:{[G]:-1,[X]:1,[re]:-1,[ge]:1,offset:(bt,Qt)=>bt.setDate(bt.getDate()+Qt*7)},date:{[G]:-7,[X]:7,[re]:-1,[ge]:1,[fe]:bt=>-bt.getDay(),[Fe]:bt=>-bt.getDay()+6,[at]:bt=>-new Date(bt.getFullYear(),bt.getMonth(),0).getDate(),[_t]:bt=>new Date(bt.getFullYear(),bt.getMonth()+1,0).getDate(),offset:(bt,Qt)=>bt.setDate(bt.getDate()+Qt)}},no=y.value.toDate();for(;Math.abs(y.value.diff(no,"year",!0))<1;){const bt=At[oe.value];if(!bt)return;if(bt.offset(no,it(bt[S])?bt[S](no):(A=bt[S])!=null?A:0),v&&v(no))break;const Qt=kt(no).locale(d.value);y.value=Qt,t("pick",Qt,!0);break}},Y=S=>{t("panel-change",y.value.toDate(),S,j.value)};return Se(()=>U.value,S=>{if(["month","year"].includes(S)){j.value=S;return}else if(S==="years"){j.value="year";return}j.value="date"},{immediate:!0}),Se(()=>j.value,()=>{p==null||p.updatePopper()}),Se(()=>_.value,S=>{S&&(y.value=Ye())},{immediate:!0}),Se(()=>o.parsedValue,S=>{if(S){if(U.value==="dates"||U.value==="years"||Array.isArray(S))return;y.value=S}else y.value=Ye()},{immediate:!0}),t("set-picker-option",["isValidValue",We]),t("set-picker-option",["formatToString",qe]),t("set-picker-option",["parseUserInput",ye]),t("set-picker-option",["handleFocusPicker",tt]),(S,A)=>(b(),M("div",{class:O([s(l).b(),s(n).b(),{"has-sidebar":S.$slots.sidebar||s(ne),"has-time":s(de)}])},[E("div",{class:O(s(l).e("body-wrapper"))},[be(S.$slots,"sidebar",{class:O(s(l).e("sidebar"))}),s(ne)?(b(),M("div",{key:0,class:O(s(l).e("sidebar"))},[(b(!0),M(Qe,null,It(s(h),(G,X)=>(b(),M("button",{key:X,type:"button",class:O(s(l).e("shortcut")),onClick:re=>I(G)},$e(G.text),11,XZ))),128))],2)):se("v-if",!0),E("div",{class:O(s(l).e("body"))},[s(de)?(b(),M("div",{key:0,class:O(s(n).e("time-header"))},[E("span",{class:O(s(n).e("editor-wrap"))},[te(s(cr),{placeholder:s(c)("el.datepicker.selectDate"),"model-value":s(ke),size:"small","validate-event":!1,onInput:A[0]||(A[0]=G=>R.value=G),onChange:xe},null,8,["placeholder","model-value"])],2),mt((b(),M("span",{class:O(s(n).e("editor-wrap"))},[te(s(cr),{placeholder:s(c)("el.datepicker.selectTime"),"model-value":s(pe),size:"small","validate-event":!1,onFocus:we,onInput:A[1]||(A[1]=G=>V.value=G),onChange:Ae},null,8,["placeholder","model-value"]),te(s(up),{visible:Oe.value,format:s(De),"parsed-value":y.value,onPick:Ie},null,8,["visible","format","parsed-value"])],2)),[[s(xn),Te]])],2)):se("v-if",!0),mt(E("div",{class:O([s(n).e("header"),(j.value==="year"||j.value==="month")&&s(n).e("header--bordered")])},[E("span",{class:O(s(n).e("prev-btn"))},[E("button",{type:"button","aria-label":s(c)("el.datepicker.prevYear"),class:O(["d-arrow-left",s(l).e("icon-btn")]),onClick:A[2]||(A[2]=G=>H(!1))},[te(s(Ze),null,{default:le(()=>[te(s(Ra))]),_:1})],10,ZZ),mt(E("button",{type:"button","aria-label":s(c)("el.datepicker.prevMonth"),class:O([s(l).e("icon-btn"),"arrow-left"]),onClick:A[3]||(A[3]=G=>Z(!1))},[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1})],10,JZ),[[Lt,j.value==="date"]])],2),E("span",{role:"button",class:O(s(n).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:A[4]||(A[4]=Gt(G=>Me("year"),["enter"])),onClick:A[5]||(A[5]=G=>Me("year"))},$e(s(K)),35),mt(E("span",{role:"button","aria-live":"polite",tabindex:"0",class:O([s(n).e("header-label"),{active:j.value==="month"}]),onKeydown:A[6]||(A[6]=Gt(G=>Me("month"),["enter"])),onClick:A[7]||(A[7]=G=>Me("month"))},$e(s(c)(`el.datepicker.month${s(T)+1}`)),35),[[Lt,j.value==="date"]]),E("span",{class:O(s(n).e("next-btn"))},[mt(E("button",{type:"button","aria-label":s(c)("el.datepicker.nextMonth"),class:O([s(l).e("icon-btn"),"arrow-right"]),onClick:A[8]||(A[8]=G=>Z(!0))},[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})],10,QZ),[[Lt,j.value==="date"]]),E("button",{type:"button","aria-label":s(c)("el.datepicker.nextYear"),class:O([s(l).e("icon-btn"),"d-arrow-right"]),onClick:A[9]||(A[9]=G=>H(!0))},[te(s(Ze),null,{default:le(()=>[te(s(La))]),_:1})],10,eJ)],2)],2),[[Lt,j.value!=="time"]]),E("div",{class:O(s(l).e("content")),onKeydown:pt},[j.value==="date"?(b(),he(Hv,{key:0,ref_key:"currentViewRef",ref:g,"selection-mode":s(U),date:y.value,"parsed-value":S.parsedValue,"disabled-date":s(v),"cell-class-name":s(m),onPick:J},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):se("v-if",!0),j.value==="year"?(b(),he(GZ,{key:1,ref_key:"currentViewRef",ref:g,"selection-mode":s(U),date:y.value,"disabled-date":s(v),"parsed-value":S.parsedValue,onPick:ee},null,8,["selection-mode","date","disabled-date","parsed-value"])):se("v-if",!0),j.value==="month"?(b(),he(Fv,{key:2,ref_key:"currentViewRef",ref:g,date:y.value,"parsed-value":S.parsedValue,"disabled-date":s(v),onPick:ce},null,8,["date","parsed-value","disabled-date"])):se("v-if",!0)],34)],2)],2),mt(E("div",{class:O(s(l).e("footer"))},[mt(te(s(Wo),{text:"",size:"small",class:O(s(l).e("link-btn")),disabled:s(Ce),onClick:Ee},{default:le(()=>[Ct($e(s(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Lt,s(U)!=="dates"&&s(U)!=="years"]]),te(s(Wo),{plain:"",size:"small",class:O(s(l).e("link-btn")),disabled:s(me),onClick:Re},{default:le(()=>[Ct($e(s(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Lt,s(_e)]])],2))}}),[["__file","panel-date-pick.vue"]]);const oJ=Pe({...fy,...hy}),rJ=e=>{const{emit:t}=wt(),o=ya(),r=Do();return n=>{const a=it(n.value)?n.value():n.value;if(a){t("pick",[kt(a[0]).locale(e.value),kt(a[1]).locale(e.value)]);return}n.onClick&&n.onClick({attrs:o,slots:r,emit:t})}},my=(e,{defaultValue:t,leftDate:o,rightDate:r,unit:l,onParsedValueChanged:n})=>{const{emit:a}=wt(),{pickerNs:i}=Ge(Rv),c=ze("date-range-picker"),{t:d,lang:u}=Rt(),p=rJ(u),h=D(),v=D(),m=D({endDate:null,selecting:!1}),f=w=>{m.value=w},_=(w=!1)=>{const x=s(h),$=s(v);Vv([x,$])&&a("pick",[x,$],w)},g=w=>{m.value.selecting=w,w||(m.value.endDate=null)},y=()=>{const[w,x]=vy(s(t),{lang:s(u),unit:l,unlinkPanels:e.unlinkPanels});h.value=void 0,v.value=void 0,o.value=w,r.value=x};return Se(t,w=>{w&&y()},{immediate:!0}),Se(()=>e.parsedValue,w=>{if(Ke(w)&&w.length===2){const[x,$]=w;h.value=x,o.value=x,v.value=$,n(s(h),s(v))}else y()},{immediate:!0}),{minDate:h,maxDate:v,rangeState:m,lang:u,ppNs:i,drpNs:c,handleChangeRange:f,handleRangeConfirm:_,handleShortcutClick:p,onSelect:g,t:d}},lJ=["onClick"],nJ=["aria-label"],aJ=["aria-label"],iJ=["disabled","aria-label"],sJ=["disabled","aria-label"],cJ=["disabled","aria-label"],uJ=["disabled","aria-label"],dJ=["aria-label"],pJ=["aria-label"],bp="month";var fJ=Le(N({__name:"panel-date-range",props:oJ,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const o=e,r=Ge("EP_PICKER_BASE"),{disabledDate:l,cellClassName:n,defaultTime:a,clearable:i}=r.props,c=Yt(r.props,"format"),d=Yt(r.props,"shortcuts"),u=Yt(r.props,"defaultValue"),{lang:p}=Rt(),h=D(kt().locale(p.value)),v=D(kt().locale(p.value).add(1,bp)),{minDate:m,maxDate:f,rangeState:_,ppNs:g,drpNs:y,handleChangeRange:w,handleRangeConfirm:x,handleShortcutClick:$,onSelect:T,t:L}=my(o,{defaultValue:u,leftDate:h,rightDate:v,unit:bp,onParsedValueChanged:A}),P=D({min:null,max:null}),R=D({min:null,max:null}),V=C(()=>`${h.value.year()} ${L("el.datepicker.year")} ${L(`el.datepicker.month${h.value.month()+1}`)}`),B=C(()=>`${v.value.year()} ${L("el.datepicker.year")} ${L(`el.datepicker.month${v.value.month()+1}`)}`),F=C(()=>h.value.year()),Q=C(()=>h.value.month()),J=C(()=>v.value.year()),Z=C(()=>v.value.month()),H=C(()=>!!d.value.length),j=C(()=>P.value.min!==null?P.value.min:m.value?m.value.format(ne.value):""),K=C(()=>P.value.max!==null?P.value.max:f.value||m.value?(f.value||m.value).format(ne.value):""),I=C(()=>R.value.min!==null?R.value.min:m.value?m.value.format(oe.value):""),U=C(()=>R.value.max!==null?R.value.max:f.value||m.value?(f.value||m.value).format(oe.value):""),oe=C(()=>o.timeFormat||Q4(c.value)),ne=C(()=>o.dateFormat||J4(c.value)),ce=G=>Vv(G)&&(l?!l(G[0].toDate())&&!l(G[1].toDate()):!0),ee=()=>{h.value=h.value.subtract(1,"year"),o.unlinkPanels||(v.value=h.value.add(1,"month")),De("year")},Me=()=>{h.value=h.value.subtract(1,"month"),o.unlinkPanels||(v.value=h.value.add(1,"month")),De("month")},de=()=>{o.unlinkPanels?v.value=v.value.add(1,"year"):(h.value=h.value.add(1,"year"),v.value=h.value.add(1,"month")),De("year")},_e=()=>{o.unlinkPanels?v.value=v.value.add(1,"month"):(h.value=h.value.add(1,"month"),v.value=h.value.add(1,"month")),De("month")},me=()=>{h.value=h.value.add(1,"year"),De("year")},Re=()=>{h.value=h.value.add(1,"month"),De("month")},Ce=()=>{v.value=v.value.subtract(1,"year"),De("year")},Ee=()=>{v.value=v.value.subtract(1,"month"),De("month")},De=G=>{t("panel-change",[h.value.toDate(),v.value.toDate()],G)},ae=C(()=>{const G=(Q.value+1)%12,X=Q.value+1>=12?1:0;return o.unlinkPanels&&new Date(F.value+X,G)o.unlinkPanels&&J.value*12+Z.value-(F.value*12+Q.value+1)>=12),ke=C(()=>!(m.value&&f.value&&!_.value.selecting&&Vv([m.value,f.value]))),Oe=C(()=>o.type==="datetime"||o.type==="datetimerange"),we=(G,X)=>{if(G)return a?kt(a[X]||a).locale(p.value).year(G.year()).month(G.month()).date(G.date()):G},Te=(G,X=!0)=>{const re=G.minDate,ge=G.maxDate,fe=we(re,0),Fe=we(ge,1);f.value===Fe&&m.value===fe||(t("calendar-change",[re.toDate(),ge&&ge.toDate()]),f.value=Fe,m.value=fe,!(!X||Oe.value)&&x())},Ne=D(!1),Ie=D(!1),Ae=()=>{Ne.value=!1},xe=()=>{Ie.value=!1},We=(G,X)=>{P.value[X]=G;const re=kt(G,ne.value).locale(p.value);if(re.isValid()){if(l&&l(re.toDate()))return;X==="min"?(h.value=re,m.value=(m.value||h.value).year(re.year()).month(re.month()).date(re.date()),!o.unlinkPanels&&(!f.value||f.value.isBefore(m.value))&&(v.value=re.add(1,"month"),f.value=m.value.add(1,"month"))):(v.value=re,f.value=(f.value||v.value).year(re.year()).month(re.month()).date(re.date()),!o.unlinkPanels&&(!m.value||m.value.isAfter(f.value))&&(h.value=re.subtract(1,"month"),m.value=f.value.subtract(1,"month")))}},qe=(G,X)=>{P.value[X]=null},ye=(G,X)=>{R.value[X]=G;const re=kt(G,oe.value).locale(p.value);re.isValid()&&(X==="min"?(Ne.value=!0,m.value=(m.value||h.value).hour(re.hour()).minute(re.minute()).second(re.second())):(Ie.value=!0,f.value=(f.value||v.value).hour(re.hour()).minute(re.minute()).second(re.second()),v.value=f.value))},Ye=(G,X)=>{R.value[X]=null,X==="min"?(h.value=m.value,Ne.value=!1,(!f.value||f.value.isBefore(m.value))&&(f.value=m.value)):(v.value=f.value,Ie.value=!1,f.value&&f.value.isBefore(m.value)&&(m.value=f.value))},tt=(G,X,re)=>{R.value.min||(G&&(h.value=G,m.value=(m.value||h.value).hour(G.hour()).minute(G.minute()).second(G.second())),re||(Ne.value=X),(!f.value||f.value.isBefore(m.value))&&(f.value=m.value,v.value=G))},pt=(G,X,re)=>{R.value.max||(G&&(v.value=G,f.value=(f.value||v.value).hour(G.hour()).minute(G.minute()).second(G.second())),re||(Ie.value=X),f.value&&f.value.isBefore(m.value)&&(m.value=f.value))},dt=()=>{h.value=vy(s(u),{lang:s(p),unit:"month",unlinkPanels:o.unlinkPanels})[0],v.value=h.value.add(1,"month"),f.value=void 0,m.value=void 0,t("pick",null)},Y=G=>Ke(G)?G.map(X=>X.format(c.value)):G.format(c.value),S=G=>Ke(G)?G.map(X=>kt(X,c.value).locale(p.value)):kt(G,c.value).locale(p.value);function A(G,X){if(o.unlinkPanels&&X){const re=(G==null?void 0:G.year())||0,ge=(G==null?void 0:G.month())||0,fe=X.year(),Fe=X.month();v.value=re===fe&&ge===Fe?X.add(1,bp):X}else v.value=h.value.add(1,bp),X&&(v.value=v.value.hour(X.hour()).minute(X.minute()).second(X.second()))}return t("set-picker-option",["isValidValue",ce]),t("set-picker-option",["parseUserInput",S]),t("set-picker-option",["formatToString",Y]),t("set-picker-option",["handleClear",dt]),(G,X)=>(b(),M("div",{class:O([s(g).b(),s(y).b(),{"has-sidebar":G.$slots.sidebar||s(H),"has-time":s(Oe)}])},[E("div",{class:O(s(g).e("body-wrapper"))},[be(G.$slots,"sidebar",{class:O(s(g).e("sidebar"))}),s(H)?(b(),M("div",{key:0,class:O(s(g).e("sidebar"))},[(b(!0),M(Qe,null,It(s(d),(re,ge)=>(b(),M("button",{key:ge,type:"button",class:O(s(g).e("shortcut")),onClick:fe=>s($)(re)},$e(re.text),11,lJ))),128))],2)):se("v-if",!0),E("div",{class:O(s(g).e("body"))},[s(Oe)?(b(),M("div",{key:0,class:O(s(y).e("time-header"))},[E("span",{class:O(s(y).e("editors-wrap"))},[E("span",{class:O(s(y).e("time-picker-wrap"))},[te(s(cr),{size:"small",disabled:s(_).selecting,placeholder:s(L)("el.datepicker.startDate"),class:O(s(y).e("editor")),"model-value":s(j),"validate-event":!1,onInput:X[0]||(X[0]=re=>We(re,"min")),onChange:X[1]||(X[1]=re=>qe(re,"min"))},null,8,["disabled","placeholder","class","model-value"])],2),mt((b(),M("span",{class:O(s(y).e("time-picker-wrap"))},[te(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(L)("el.datepicker.startTime"),"model-value":s(I),"validate-event":!1,onFocus:X[2]||(X[2]=re=>Ne.value=!0),onInput:X[3]||(X[3]=re=>ye(re,"min")),onChange:X[4]||(X[4]=re=>Ye(re,"min"))},null,8,["class","disabled","placeholder","model-value"]),te(s(up),{visible:Ne.value,format:s(oe),"datetime-role":"start","parsed-value":h.value,onPick:tt},null,8,["visible","format","parsed-value"])],2)),[[s(xn),Ae]])],2),E("span",null,[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})]),E("span",{class:O([s(y).e("editors-wrap"),"is-right"])},[E("span",{class:O(s(y).e("time-picker-wrap"))},[te(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(L)("el.datepicker.endDate"),"model-value":s(K),readonly:!s(m),"validate-event":!1,onInput:X[5]||(X[5]=re=>We(re,"max")),onChange:X[6]||(X[6]=re=>qe(re,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),mt((b(),M("span",{class:O(s(y).e("time-picker-wrap"))},[te(s(cr),{size:"small",class:O(s(y).e("editor")),disabled:s(_).selecting,placeholder:s(L)("el.datepicker.endTime"),"model-value":s(U),readonly:!s(m),"validate-event":!1,onFocus:X[7]||(X[7]=re=>s(m)&&(Ie.value=!0)),onInput:X[8]||(X[8]=re=>ye(re,"max")),onChange:X[9]||(X[9]=re=>Ye(re,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),te(s(up),{"datetime-role":"end",visible:Ie.value,format:s(oe),"parsed-value":v.value,onPick:pt},null,8,["visible","format","parsed-value"])],2)),[[s(xn),xe]])],2)],2)):se("v-if",!0),E("div",{class:O([[s(g).e("content"),s(y).e("content")],"is-left"])},[E("div",{class:O(s(y).e("header"))},[E("button",{type:"button",class:O([s(g).e("icon-btn"),"d-arrow-left"]),"aria-label":s(L)("el.datepicker.prevYear"),onClick:ee},[te(s(Ze),null,{default:le(()=>[te(s(Ra))]),_:1})],10,nJ),E("button",{type:"button",class:O([s(g).e("icon-btn"),"arrow-left"]),"aria-label":s(L)("el.datepicker.prevMonth"),onClick:Me},[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1})],10,aJ),G.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(pe),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(pe)}],"d-arrow-right"]),"aria-label":s(L)("el.datepicker.nextYear"),onClick:me},[te(s(Ze),null,{default:le(()=>[te(s(La))]),_:1})],10,iJ)):se("v-if",!0),G.unlinkPanels?(b(),M("button",{key:1,type:"button",disabled:!s(ae),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(ae)}],"arrow-right"]),"aria-label":s(L)("el.datepicker.nextMonth"),onClick:Re},[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})],10,sJ)):se("v-if",!0),E("div",null,$e(s(V)),1)],2),te(Hv,{"selection-mode":"range",date:h.value,"min-date":s(m),"max-date":s(f),"range-state":s(_),"disabled-date":s(l),"cell-class-name":s(n),onChangerange:s(w),onPick:Te,onSelect:s(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),E("div",{class:O([[s(g).e("content"),s(y).e("content")],"is-right"])},[E("div",{class:O(s(y).e("header"))},[G.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(pe),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(pe)}],"d-arrow-left"]),"aria-label":s(L)("el.datepicker.prevYear"),onClick:Ce},[te(s(Ze),null,{default:le(()=>[te(s(Ra))]),_:1})],10,cJ)):se("v-if",!0),G.unlinkPanels?(b(),M("button",{key:1,type:"button",disabled:!s(ae),class:O([[s(g).e("icon-btn"),{"is-disabled":!s(ae)}],"arrow-left"]),"aria-label":s(L)("el.datepicker.prevMonth"),onClick:Ee},[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1})],10,uJ)):se("v-if",!0),E("button",{type:"button","aria-label":s(L)("el.datepicker.nextYear"),class:O([s(g).e("icon-btn"),"d-arrow-right"]),onClick:de},[te(s(Ze),null,{default:le(()=>[te(s(La))]),_:1})],10,dJ),E("button",{type:"button",class:O([s(g).e("icon-btn"),"arrow-right"]),"aria-label":s(L)("el.datepicker.nextMonth"),onClick:_e},[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})],10,pJ),E("div",null,$e(s(B)),1)],2),te(Hv,{"selection-mode":"range",date:v.value,"min-date":s(m),"max-date":s(f),"range-state":s(_),"disabled-date":s(l),"cell-class-name":s(n),onChangerange:s(w),onPick:Te,onSelect:s(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),s(Oe)?(b(),M("div",{key:0,class:O(s(g).e("footer"))},[s(i)?(b(),he(s(Wo),{key:0,text:"",size:"small",class:O(s(g).e("link-btn")),onClick:dt},{default:le(()=>[Ct($e(s(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):se("v-if",!0),te(s(Wo),{plain:"",size:"small",class:O(s(g).e("link-btn")),disabled:s(ke),onClick:X[10]||(X[10]=re=>s(x)(!1))},{default:le(()=>[Ct($e(s(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):se("v-if",!0)],2))}}),[["__file","panel-date-range.vue"]]);const hJ=Pe({...hy}),vJ=["pick","set-picker-option","calendar-change"],mJ=({unlinkPanels:e,leftDate:t,rightDate:o})=>{const{t:r}=Rt(),l=()=>{t.value=t.value.subtract(1,"year"),e.value||(o.value=o.value.subtract(1,"year"))},n=()=>{e.value||(t.value=t.value.add(1,"year")),o.value=o.value.add(1,"year")},a=()=>{t.value=t.value.add(1,"year")},i=()=>{o.value=o.value.subtract(1,"year")},c=C(()=>`${t.value.year()} ${r("el.datepicker.year")}`),d=C(()=>`${o.value.year()} ${r("el.datepicker.year")}`),u=C(()=>t.value.year()),p=C(()=>o.value.year()===t.value.year()?t.value.year()+1:o.value.year());return{leftPrevYear:l,rightNextYear:n,leftNextYear:a,rightPrevYear:i,leftLabel:c,rightLabel:d,leftYear:u,rightYear:p}},gJ=["onClick"],bJ=["disabled"],_J=["disabled"],_p="year",wJ=N({...N({name:"DatePickerMonthRange"}),props:hJ,emits:vJ,setup(e,{emit:t}){const o=e,{lang:r}=Rt(),l=Ge("EP_PICKER_BASE"),{shortcuts:n,disabledDate:a}=l.props,i=Yt(l.props,"format"),c=Yt(l.props,"defaultValue"),d=D(kt().locale(r.value)),u=D(kt().locale(r.value).add(1,_p)),{minDate:p,maxDate:h,rangeState:v,ppNs:m,drpNs:f,handleChangeRange:_,handleRangeConfirm:g,handleShortcutClick:y,onSelect:w}=my(o,{defaultValue:c,leftDate:d,rightDate:u,unit:_p,onParsedValueChanged:H}),x=C(()=>!!n.length),{leftPrevYear:$,rightNextYear:T,leftNextYear:L,rightPrevYear:P,leftLabel:R,rightLabel:V,leftYear:B,rightYear:F}=mJ({unlinkPanels:Yt(o,"unlinkPanels"),leftDate:d,rightDate:u}),Q=C(()=>o.unlinkPanels&&F.value>B.value+1),J=(j,K=!0)=>{const I=j.minDate,U=j.maxDate;h.value===U&&p.value===I||(t("calendar-change",[I.toDate(),U&&U.toDate()]),h.value=U,p.value=I,K&&g())},Z=j=>j.map(K=>K.format(i.value));function H(j,K){if(o.unlinkPanels&&K){const I=(j==null?void 0:j.year())||0,U=K.year();u.value=I===U?K.add(1,_p):K}else u.value=d.value.add(1,_p)}return t("set-picker-option",["formatToString",Z]),(j,K)=>(b(),M("div",{class:O([s(m).b(),s(f).b(),{"has-sidebar":!!j.$slots.sidebar||s(x)}])},[E("div",{class:O(s(m).e("body-wrapper"))},[be(j.$slots,"sidebar",{class:O(s(m).e("sidebar"))}),s(x)?(b(),M("div",{key:0,class:O(s(m).e("sidebar"))},[(b(!0),M(Qe,null,It(s(n),(I,U)=>(b(),M("button",{key:U,type:"button",class:O(s(m).e("shortcut")),onClick:oe=>s(y)(I)},$e(I.text),11,gJ))),128))],2)):se("v-if",!0),E("div",{class:O(s(m).e("body"))},[E("div",{class:O([[s(m).e("content"),s(f).e("content")],"is-left"])},[E("div",{class:O(s(f).e("header"))},[E("button",{type:"button",class:O([s(m).e("icon-btn"),"d-arrow-left"]),onClick:K[0]||(K[0]=(...I)=>s($)&&s($)(...I))},[te(s(Ze),null,{default:le(()=>[te(s(Ra))]),_:1})],2),j.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(Q),class:O([[s(m).e("icon-btn"),{[s(m).is("disabled")]:!s(Q)}],"d-arrow-right"]),onClick:K[1]||(K[1]=(...I)=>s(L)&&s(L)(...I))},[te(s(Ze),null,{default:le(()=>[te(s(La))]),_:1})],10,bJ)):se("v-if",!0),E("div",null,$e(s(R)),1)],2),te(Fv,{"selection-mode":"range",date:d.value,"min-date":s(p),"max-date":s(h),"range-state":s(v),"disabled-date":s(a),onChangerange:s(_),onPick:J,onSelect:s(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),E("div",{class:O([[s(m).e("content"),s(f).e("content")],"is-right"])},[E("div",{class:O(s(f).e("header"))},[j.unlinkPanels?(b(),M("button",{key:0,type:"button",disabled:!s(Q),class:O([[s(m).e("icon-btn"),{"is-disabled":!s(Q)}],"d-arrow-left"]),onClick:K[2]||(K[2]=(...I)=>s(P)&&s(P)(...I))},[te(s(Ze),null,{default:le(()=>[te(s(Ra))]),_:1})],10,_J)):se("v-if",!0),E("button",{type:"button",class:O([s(m).e("icon-btn"),"d-arrow-right"]),onClick:K[3]||(K[3]=(...I)=>s(T)&&s(T)(...I))},[te(s(Ze),null,{default:le(()=>[te(s(La))]),_:1})],2),E("div",null,$e(s(V)),1)],2),te(Fv,{"selection-mode":"range",date:u.value,"min-date":s(p),"max-date":s(h),"range-state":s(v),"disabled-date":s(a),onChangerange:s(_),onPick:J,onSelect:s(w)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var yJ=Le(wJ,[["__file","panel-month-range.vue"]]);const xJ=function(e){switch(e){case"daterange":case"datetimerange":return fJ;case"monthrange":return yJ;default:return tJ}};kt.extend(Ew),kt.extend(pZ),kt.extend(vv),kt.extend(hZ),kt.extend(mZ),kt.extend(bZ),kt.extend(wZ),kt.extend(xZ);var kJ=N({name:"ElDatePicker",install:null,props:kZ,emits:["update:modelValue"],setup(e,{expose:t,emit:o,slots:r}){const l=ze("picker-panel");zt("ElPopperOptions",Dt(Yt(e,"popperOptions"))),zt(Rv,{slots:r,pickerNs:l});const n=D();t({focus:(c=!0)=>{var d;(d=n.value)==null||d.focus(c)},handleOpen:()=>{var c;(c=n.value)==null||c.handleOpen()},handleClose:()=>{var c;(c=n.value)==null||c.handleClose()}});const i=c=>{o("update:modelValue",c)};return()=>{var c;const d=(c=e.format)!=null?c:jq[e.type]||ts,u=xJ(e.type);return te(aw,Mt(e,{format:d,type:e.type,ref:n,"onUpdate:modelValue":i}),{default:p=>te(u,p,null),"range-separator":r["range-separator"]})}}});const wp=kJ;wp.install=e=>{e.component(wp.name,wp)};const CJ=wp,jv=Symbol("elDescriptions");var Vc=N({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:Ge(jv,{})}},render(){var e,t,o,r,l,n,a;const i=iF(this.cell),c=(((e=this.cell)==null?void 0:e.dirs)||[]).map($=>{const{dir:T,arg:L,modifiers:P,value:R}=$;return[T,R,L,P]}),{border:d,direction:u}=this.descriptions,p=u==="vertical",h=((r=(o=(t=this.cell)==null?void 0:t.children)==null?void 0:o.label)==null?void 0:r.call(o))||i.label,v=(a=(n=(l=this.cell)==null?void 0:l.children)==null?void 0:n.default)==null?void 0:a.call(n),m=i.span,f=i.align?`is-${i.align}`:"",_=i.labelAlign?`is-${i.labelAlign}`:f,g=i.className,y=i.labelClassName,w={width:go(i.width),minWidth:go(i.minWidth)},x=ze("descriptions");switch(this.type){case"label":return mt(rt(this.tag,{style:w,class:[x.e("cell"),x.e("label"),x.is("bordered-label",d),x.is("vertical-label",p),_,y],colSpan:p?m:1},h),c);case"content":return mt(rt(this.tag,{style:w,class:[x.e("cell"),x.e("content"),x.is("bordered-content",d),x.is("vertical-content",p),f,g],colSpan:p?m:m*2-1},v),c);default:return mt(rt("td",{style:w,class:[x.e("cell"),f],colSpan:m},[jo(h)?void 0:rt("span",{class:[x.e("label"),y]},h),rt("span",{class:[x.e("content"),g]},v)]),c)}}});const SJ=Pe({row:{type:ue(Array),default:()=>[]}}),EJ={key:1},TJ=N({...N({name:"ElDescriptionsRow"}),props:SJ,setup(e){const t=Ge(jv,{});return(o,r)=>s(t).direction==="vertical"?(b(),M(Qe,{key:0},[E("tr",null,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),he(s(Vc),{key:`tr1-${n}`,cell:l,tag:"th",type:"label"},null,8,["cell"]))),128))]),E("tr",null,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),he(s(Vc),{key:`tr2-${n}`,cell:l,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(b(),M("tr",EJ,[(b(!0),M(Qe,null,It(o.row,(l,n)=>(b(),M(Qe,{key:`tr3-${n}`},[s(t).border?(b(),M(Qe,{key:0},[te(s(Vc),{cell:l,tag:"td",type:"label"},null,8,["cell"]),te(s(Vc),{cell:l,tag:"td",type:"content"},null,8,["cell"])],64)):(b(),he(s(Vc),{key:1,cell:l,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var $J=Le(TJ,[["__file","descriptions-row.vue"]]);const MJ=Pe({border:{type:Boolean,default:!1},column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Oo,title:{type:String,default:""},extra:{type:String,default:""}}),AJ=N({...N({name:"ElDescriptions"}),props:MJ,setup(e){const t=e,o=ze("descriptions"),r=So(),l=Do();zt(jv,t);const n=C(()=>[o.b(),o.m(r.value)]),a=(c,d,u,p=!1)=>(c.props||(c.props={}),d>u&&(c.props.span=u),p&&(c.props.span=d),c),i=()=>{if(!l.default)return[];const c=Qn(l.default()).filter(v=>{var m;return((m=v==null?void 0:v.type)==null?void 0:m.name)==="ElDescriptionsItem"}),d=[];let u=[],p=t.column,h=0;return c.forEach((v,m)=>{var f;const _=((f=v.props)==null?void 0:f.span)||1;if(mp?p:_),m===c.length-1){const g=t.column-h%t.column;u.push(a(v,g,p,!0)),d.push(u);return}_(b(),M("div",{class:O(s(n))},[c.title||c.extra||c.$slots.title||c.$slots.extra?(b(),M("div",{key:0,class:O(s(o).e("header"))},[E("div",{class:O(s(o).e("title"))},[be(c.$slots,"title",{},()=>[Ct($e(c.title),1)])],2),E("div",{class:O(s(o).e("extra"))},[be(c.$slots,"extra",{},()=>[Ct($e(c.extra),1)])],2)],2)):se("v-if",!0),E("div",{class:O(s(o).e("body"))},[E("table",{class:O([s(o).e("table"),s(o).is("bordered",c.border)])},[E("tbody",null,[(b(!0),M(Qe,null,It(i(),(u,p)=>(b(),he($J,{key:p,row:u},null,8,["row"]))),128))])],2)],2)],2))}});var zJ=Le(AJ,[["__file","description.vue"]]);const IJ=Pe({label:{type:String,default:""},span:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),gy=N({name:"ElDescriptionsItem",props:IJ}),OJ=yt(zJ,{DescriptionsItem:gy}),NJ=co(gy),PJ=Pe({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:ue([String,Array,Object])},zIndex:{type:ue([String,Number])}}),RJ={click:e=>e instanceof MouseEvent},LJ="overlay";var BJ=N({name:"ElOverlay",props:PJ,emits:RJ,setup(e,{slots:t,emit:o}){const r=ze(LJ),l=c=>{o("click",c)},{onClick:n,onMousedown:a,onMouseup:i}=Nh(e.customMaskEvent?void 0:l);return()=>e.mask?te("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:n,onMousedown:a,onMouseup:i},[be(t,"default")],Qr.STYLE|Qr.CLASS|Qr.PROPS,["onClick","onMouseup","onMousedown"]):rt("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[be(t,"default")])}});const Kv=BJ,by=Symbol("dialogInjectionKey"),_y=Pe({center:Boolean,alignCenter:Boolean,closeIcon:{type:Xt},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),VJ={close:()=>!0},DJ=["aria-level"],HJ=["aria-label"],FJ=["id"],jJ=N({...N({name:"ElDialogContent"}),props:_y,emits:VJ,setup(e){const t=e,{t:o}=Rt(),{Close:r}=mh,{dialogRef:l,headerRef:n,bodyId:a,ns:i,style:c}=Ge(by),{focusTrapRef:d}=Ge(av),u=C(()=>[i.b(),i.is("fullscreen",t.fullscreen),i.is("draggable",t.draggable),i.is("align-center",t.alignCenter),{[i.m("center")]:t.center}]),p=Od(d,l),h=C(()=>t.draggable),v=C(()=>t.overflow);return o6(l,n,h,v),(m,f)=>(b(),M("div",{ref:s(p),class:O(s(u)),style:Je(s(c)),tabindex:"-1"},[E("header",{ref_key:"headerRef",ref:n,class:O([s(i).e("header"),{"show-close":m.showClose}])},[be(m.$slots,"header",{},()=>[E("span",{role:"heading","aria-level":m.ariaLevel,class:O(s(i).e("title"))},$e(m.title),11,DJ)]),m.showClose?(b(),M("button",{key:0,"aria-label":s(o)("el.dialog.close"),class:O(s(i).e("headerbtn")),type:"button",onClick:f[0]||(f[0]=_=>m.$emit("close"))},[te(s(Ze),{class:O(s(i).e("close"))},{default:le(()=>[(b(),he(Et(m.closeIcon||s(r))))]),_:1},8,["class"])],10,HJ)):se("v-if",!0)],2),E("div",{id:s(a),class:O(s(i).e("body"))},[be(m.$slots,"default")],10,FJ),m.$slots.footer?(b(),M("footer",{key:0,class:O(s(i).e("footer"))},[be(m.$slots,"footer")],2)):se("v-if",!0)],6))}});var KJ=Le(jJ,[["__file","dialog-content.vue"]]);const wy=Pe({..._y,appendToBody:Boolean,appendTo:{type:ue(String),default:"body"},beforeClose:{type:ue(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),yy={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[St]:e=>Co(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},xy=(e,t)=>{var o;const l=wt().emit,{nextZIndex:n}=Ki();let a="";const i=Qo(),c=Qo(),d=D(!1),u=D(!1),p=D(!1),h=D((o=e.zIndex)!=null?o:n());let v,m;const f=$c("namespace",mc),_=C(()=>{const Z={},H=`--${f.value}-dialog`;return e.fullscreen||(e.top&&(Z[`${H}-margin-top`]=e.top),e.width&&(Z[`${H}-width`]=go(e.width))),Z}),g=C(()=>e.alignCenter?{display:"flex"}:{});function y(){l("opened")}function w(){l("closed"),l(St,!1),e.destroyOnClose&&(p.value=!1)}function x(){l("close")}function $(){m==null||m(),v==null||v(),e.openDelay&&e.openDelay>0?{stop:v}=$a(()=>R(),e.openDelay):R()}function T(){v==null||v(),m==null||m(),e.closeDelay&&e.closeDelay>0?{stop:m}=$a(()=>V(),e.closeDelay):V()}function L(){function Z(H){H||(u.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(Z):T()}function P(){e.closeOnClickModal&&L()}function R(){Nt&&(d.value=!0)}function V(){d.value=!1}function B(){l("openAutoFocus")}function F(){l("closeAutoFocus")}function Q(Z){var H;((H=Z.detail)==null?void 0:H.focusReason)==="pointer"&&Z.preventDefault()}e.lockScroll&&Ch(d);function J(){e.closeOnPressEscape&&L()}return Se(()=>e.modelValue,Z=>{Z?(u.value=!1,$(),p.value=!0,h.value=k3(e.zIndex)?n():h.value++,et(()=>{l("open"),t.value&&(t.value.scrollTop=0)})):d.value&&T()}),Se(()=>e.fullscreen,Z=>{t.value&&(Z?(a=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=a)}),ft(()=>{e.modelValue&&(d.value=!0,p.value=!0,$())}),{afterEnter:y,afterLeave:w,beforeLeave:x,handleClose:L,onModalClick:P,close:T,doClose:V,onOpenAutoFocus:B,onCloseAutoFocus:F,onCloseRequested:J,onFocusoutPrevented:Q,titleId:i,bodyId:c,closed:u,style:_,overlayDialogStyle:g,rendered:p,visible:d,zIndex:h}},UJ=["aria-label","aria-labelledby","aria-describedby"],WJ=N({...N({name:"ElDialog",inheritAttrs:!1}),props:wy,emits:yy,setup(e,{expose:t}){const o=e,r=Do();Lo({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},C(()=>!!r.title));const l=ze("dialog"),n=D(),a=D(),i=D(),{visible:c,titleId:d,bodyId:u,style:p,overlayDialogStyle:h,rendered:v,zIndex:m,afterEnter:f,afterLeave:_,beforeLeave:g,handleClose:y,onModalClick:w,onOpenAutoFocus:x,onCloseAutoFocus:$,onCloseRequested:T,onFocusoutPrevented:L}=xy(o,n);zt(by,{dialogRef:n,headerRef:a,bodyId:u,ns:l,rendered:v,style:p});const P=Nh(w),R=C(()=>o.draggable&&!o.fullscreen);return t({visible:c,dialogContentRef:i}),(V,B)=>(b(),he(hi,{to:V.appendTo,disabled:V.appendTo!=="body"?!1:!V.appendToBody},[te(Mo,{name:"dialog-fade",onAfterEnter:s(f),onAfterLeave:s(_),onBeforeLeave:s(g),persisted:""},{default:le(()=>[mt(te(s(Kv),{"custom-mask-event":"",mask:V.modal,"overlay-class":V.modalClass,"z-index":s(m)},{default:le(()=>[E("div",{role:"dialog","aria-modal":"true","aria-label":V.title||void 0,"aria-labelledby":V.title?void 0:s(d),"aria-describedby":s(u),class:O(`${s(l).namespace.value}-overlay-dialog`),style:Je(s(h)),onClick:B[0]||(B[0]=(...F)=>s(P).onClick&&s(P).onClick(...F)),onMousedown:B[1]||(B[1]=(...F)=>s(P).onMousedown&&s(P).onMousedown(...F)),onMouseup:B[2]||(B[2]=(...F)=>s(P).onMouseup&&s(P).onMouseup(...F))},[te(s(Oc),{loop:"",trapped:s(c),"focus-start-el":"container",onFocusAfterTrapped:s(x),onFocusAfterReleased:s($),onFocusoutPrevented:s(L),onReleaseRequested:s(T)},{default:le(()=>[s(v)?(b(),he(KJ,Mt({key:0,ref_key:"dialogContentRef",ref:i},V.$attrs,{center:V.center,"align-center":V.alignCenter,"close-icon":V.closeIcon,draggable:s(R),overflow:V.overflow,fullscreen:V.fullscreen,"show-close":V.showClose,title:V.title,"aria-level":V.headerAriaLevel,onClose:s(y)}),ln({header:le(()=>[V.$slots.title?be(V.$slots,"title",{key:1}):be(V.$slots,"header",{key:0,close:s(y),titleId:s(d),titleClass:s(l).e("title")})]),default:le(()=>[be(V.$slots,"default")]),_:2},[V.$slots.footer?{name:"footer",fn:le(()=>[be(V.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):se("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,UJ)]),_:3},8,["mask","overlay-class","z-index"]),[[Lt,s(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var qJ=Le(WJ,[["__file","dialog.vue"]]);const YJ=yt(qJ),GJ=Pe({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:ue(String),default:"solid"}}),XJ=N({...N({name:"ElDivider"}),props:GJ,setup(e){const t=e,o=ze("divider"),r=C(()=>o.cssVar({"border-style":t.borderStyle}));return(l,n)=>(b(),M("div",{class:O([s(o).b(),s(o).m(l.direction)]),style:Je(s(r)),role:"separator"},[l.$slots.default&&l.direction!=="vertical"?(b(),M("div",{key:0,class:O([s(o).e("text"),s(o).is(l.contentPosition)])},[be(l.$slots,"default")],2)):se("v-if",!0)],6))}});var ZJ=Le(XJ,[["__file","divider.vue"]]);const ky=yt(ZJ),JJ=Pe({...wy,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),QJ=yy,eQ=["aria-label","aria-labelledby","aria-describedby"],tQ=["id","aria-level"],oQ=["aria-label"],rQ=["id"],lQ=N({...N({name:"ElDrawer",inheritAttrs:!1}),props:JJ,emits:QJ,setup(e,{expose:t}){const o=e,r=Do();Lo({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},C(()=>!!r.title));const l=D(),n=D(),a=ze("drawer"),{t:i}=Rt(),{afterEnter:c,afterLeave:d,beforeLeave:u,visible:p,rendered:h,titleId:v,bodyId:m,zIndex:f,onModalClick:_,onOpenAutoFocus:g,onCloseAutoFocus:y,onFocusoutPrevented:w,onCloseRequested:x,handleClose:$}=xy(o,l),T=C(()=>o.direction==="rtl"||o.direction==="ltr"),L=C(()=>go(o.size));return t({handleClose:$,afterEnter:c,afterLeave:d}),(P,R)=>(b(),he(hi,{to:"body",disabled:!P.appendToBody},[te(Mo,{name:s(a).b("fade"),onAfterEnter:s(c),onAfterLeave:s(d),onBeforeLeave:s(u),persisted:""},{default:le(()=>[mt(te(s(Kv),{mask:P.modal,"overlay-class":P.modalClass,"z-index":s(f),onClick:s(_)},{default:le(()=>[te(s(Oc),{loop:"",trapped:s(p),"focus-trap-el":l.value,"focus-start-el":n.value,onFocusAfterTrapped:s(g),onFocusAfterReleased:s(y),onFocusoutPrevented:s(w),onReleaseRequested:s(x)},{default:le(()=>[E("div",Mt({ref_key:"drawerRef",ref:l,"aria-modal":"true","aria-label":P.title||void 0,"aria-labelledby":P.title?void 0:s(v),"aria-describedby":s(m)},P.$attrs,{class:[s(a).b(),P.direction,s(p)&&"open"],style:s(T)?"width: "+s(L):"height: "+s(L),role:"dialog",onClick:R[1]||(R[1]=ct(()=>{},["stop"]))}),[E("span",{ref_key:"focusStartRef",ref:n,class:O(s(a).e("sr-focus")),tabindex:"-1"},null,2),P.withHeader?(b(),M("header",{key:0,class:O(s(a).e("header"))},[P.$slots.title?be(P.$slots,"title",{key:1},()=>[se(" DEPRECATED SLOT ")]):be(P.$slots,"header",{key:0,close:s($),titleId:s(v),titleClass:s(a).e("title")},()=>[P.$slots.title?se("v-if",!0):(b(),M("span",{key:0,id:s(v),role:"heading","aria-level":P.headerAriaLevel,class:O(s(a).e("title"))},$e(P.title),11,tQ))]),P.showClose?(b(),M("button",{key:2,"aria-label":s(i)("el.drawer.close"),class:O(s(a).e("close-btn")),type:"button",onClick:R[0]||(R[0]=(...V)=>s($)&&s($)(...V))},[te(s(Ze),{class:O(s(a).e("close"))},{default:le(()=>[te(s(Jr))]),_:1},8,["class"])],10,oQ)):se("v-if",!0)],2)):se("v-if",!0),s(h)?(b(),M("div",{key:1,id:s(m),class:O(s(a).e("body"))},[be(P.$slots,"default")],10,rQ)):se("v-if",!0),P.$slots.footer?(b(),M("div",{key:2,class:O(s(a).e("footer"))},[be(P.$slots,"footer")],2)):se("v-if",!0)],16,eQ)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Lt,s(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var nQ=Le(lQ,[["__file","drawer.vue"]]);const aQ=yt(nQ),iQ=N({inheritAttrs:!1});function sQ(e,t,o,r,l,n){return be(e.$slots,"default")}var cQ=Le(iQ,[["render",sQ],["__file","collection.vue"]]);const uQ=N({name:"ElCollectionItem",inheritAttrs:!1});function dQ(e,t,o,r,l,n){return be(e.$slots,"default")}var pQ=Le(uQ,[["render",dQ],["__file","collection-item.vue"]]);const Cy="data-el-collection-item",Sy=e=>{const t=`El${e}Collection`,o=`${t}Item`,r=Symbol(t),l=Symbol(o),n={...cQ,name:t,setup(){const i=D(null),c=new Map;zt(r,{itemMap:c,getItems:()=>{const u=s(i);if(!u)return[];const p=Array.from(u.querySelectorAll(`[${Cy}]`));return[...c.values()].sort((v,m)=>p.indexOf(v.ref)-p.indexOf(m.ref))},collectionRef:i})}},a={...pQ,name:o,setup(i,{attrs:c}){const d=D(null),u=Ge(r,void 0);zt(l,{collectionItemRef:d}),ft(()=>{const p=s(d);p&&u.itemMap.set(p,{ref:p,...c})}),to(()=>{const p=s(d);u.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:l,ElCollection:n,ElCollectionItem:a}},fQ=Pe({style:{type:ue([String,Array,Object])},currentTabId:{type:ue(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:ue(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:hQ,ElCollectionItem:vQ,COLLECTION_INJECTION_KEY:Uv,COLLECTION_ITEM_INJECTION_KEY:mQ}=Sy("RovingFocusGroup"),Wv=Symbol("elRovingFocusGroup"),Ey=Symbol("elRovingFocusGroupItem"),gQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},bQ=(e,t)=>e,_Q=(e,t,o)=>{const r=bQ(e.key);return gQ[r]},wQ=(e,t)=>e.map((o,r)=>e[(r+t)%e.length]),qv=e=>{const{activeElement:t}=document;for(const o of e)if(o===t||(o.focus(),t!==document.activeElement))return},Ty="currentTabIdChange",$y="rovingFocusGroup.entryFocus",yQ={bubbles:!1,cancelable:!0},xQ=N({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:fQ,emits:[Ty,"entryFocus"],setup(e,{emit:t}){var o;const r=D((o=e.currentTabId||e.defaultCurrentTabId)!=null?o:null),l=D(!1),n=D(!1),a=D(null),{getItems:i}=Ge(Uv,void 0),c=C(()=>[{outline:"none"},e.style]),d=f=>{t(Ty,f)},u=()=>{l.value=!0},p=vo(f=>{var _;(_=e.onMousedown)==null||_.call(e,f)},()=>{n.value=!0}),h=vo(f=>{var _;(_=e.onFocus)==null||_.call(e,f)},f=>{const _=!s(n),{target:g,currentTarget:y}=f;if(g===y&&_&&!s(l)){const w=new Event($y,yQ);if(y==null||y.dispatchEvent(w),!w.defaultPrevented){const x=i().filter(R=>R.focusable),$=x.find(R=>R.active),T=x.find(R=>R.id===s(r)),P=[$,T,...x].filter(Boolean).map(R=>R.ref);qv(P)}}n.value=!1}),v=vo(f=>{var _;(_=e.onBlur)==null||_.call(e,f)},()=>{l.value=!1}),m=(...f)=>{t("entryFocus",...f)};zt(Wv,{currentTabbedId:ui(r),loop:Yt(e,"loop"),tabIndex:C(()=>s(l)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:c,orientation:Yt(e,"orientation"),dir:Yt(e,"dir"),onItemFocus:d,onItemShiftTab:u,onBlur:v,onFocus:h,onMousedown:p}),Se(()=>e.currentTabId,f=>{r.value=f??null}),oo(a,$y,m)}});function kQ(e,t,o,r,l,n){return be(e.$slots,"default")}var CQ=Le(xQ,[["render",kQ],["__file","roving-focus-group-impl.vue"]]);const SQ=N({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:hQ,ElRovingFocusGroupImpl:CQ}});function EQ(e,t,o,r,l,n){const a=nt("el-roving-focus-group-impl"),i=nt("el-focus-group-collection");return b(),he(i,null,{default:le(()=>[te(a,Zl(mi(e.$attrs)),{default:le(()=>[be(e.$slots,"default")]),_:3},16)]),_:3})}var TQ=Le(SQ,[["render",EQ],["__file","roving-focus-group.vue"]]);const $Q=N({components:{ElRovingFocusCollectionItem:vQ},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:o,loop:r,onItemFocus:l,onItemShiftTab:n}=Ge(Wv,void 0),{getItems:a}=Ge(Uv,void 0),i=Qo(),c=D(null),d=vo(v=>{t("mousedown",v)},v=>{e.focusable?l(s(i)):v.preventDefault()}),u=vo(v=>{t("focus",v)},()=>{l(s(i))}),p=vo(v=>{t("keydown",v)},v=>{const{key:m,shiftKey:f,target:_,currentTarget:g}=v;if(m===lt.tab&&f){n();return}if(_!==g)return;const y=_Q(v);if(y){v.preventDefault();let x=a().filter($=>$.focusable).map($=>$.ref);switch(y){case"last":{x.reverse();break}case"prev":case"next":{y==="prev"&&x.reverse();const $=x.indexOf(g);x=r.value?wQ(x,$+1):x.slice($+1);break}}et(()=>{qv(x)})}}),h=C(()=>o.value===s(i));return zt(Ey,{rovingFocusGroupItemRef:c,tabIndex:C(()=>s(h)?0:-1),handleMousedown:d,handleFocus:u,handleKeydown:p}),{id:i,handleKeydown:p,handleFocus:u,handleMousedown:d}}});function MQ(e,t,o,r,l,n){const a=nt("el-roving-focus-collection-item");return b(),he(a,{id:e.id,focusable:e.focusable,active:e.active},{default:le(()=>[be(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var AQ=Le($Q,[["render",MQ],["__file","roving-focus-item.vue"]]);const yp=Pe({trigger:Nc.trigger,effect:{...Uo.effect,default:"light"},type:{type:ue(String)},placement:{type:ue(String),default:"bottom"},popperOptions:{type:ue(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:ue([Number,String]),default:0},maxHeight:{type:ue([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:ue(Object)},teleported:Uo.teleported}),My=Pe({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Xt}}),zQ=Pe({onKeydown:{type:ue(Function)}}),IQ=[lt.down,lt.pageDown,lt.home],Ay=[lt.up,lt.pageUp,lt.end],OQ=[...IQ,...Ay],{ElCollection:NQ,ElCollectionItem:PQ,COLLECTION_INJECTION_KEY:RQ,COLLECTION_ITEM_INJECTION_KEY:LQ}=Sy("Dropdown"),xp=Symbol("elDropdown"),{ButtonGroup:BQ}=Wo,VQ=N({name:"ElDropdown",components:{ElButton:Wo,ElButtonGroup:BQ,ElScrollbar:wn,ElDropdownCollection:NQ,ElTooltip:ur,ElRovingFocusGroup:TQ,ElOnlyChild:y4,ElIcon:Ze,ArrowDown:Pl},props:yp,emits:["visible-change","click","command"],setup(e,{emit:t}){const o=wt(),r=ze("dropdown"),{t:l}=Rt(),n=D(),a=D(),i=D(null),c=D(null),d=D(null),u=D(null),p=D(!1),h=[lt.enter,lt.space,lt.down],v=C(()=>({maxHeight:go(e.maxHeight)})),m=C(()=>[r.m($.value)]),f=C(()=>Gn(e.trigger)),_=Qo().value,g=C(()=>e.id||_);Se([n,f],([j,K],[I])=>{var U,oe,ne;(U=I==null?void 0:I.$el)!=null&&U.removeEventListener&&I.$el.removeEventListener("pointerenter",L),(oe=j==null?void 0:j.$el)!=null&&oe.removeEventListener&&j.$el.removeEventListener("pointerenter",L),(ne=j==null?void 0:j.$el)!=null&&ne.addEventListener&&K.includes("hover")&&j.$el.addEventListener("pointerenter",L)},{immediate:!0}),to(()=>{var j,K;(K=(j=n.value)==null?void 0:j.$el)!=null&&K.removeEventListener&&n.value.$el.removeEventListener("pointerenter",L)});function y(){w()}function w(){var j;(j=i.value)==null||j.onClose()}function x(){var j;(j=i.value)==null||j.onOpen()}const $=So();function T(...j){t("command",...j)}function L(){var j,K;(K=(j=n.value)==null?void 0:j.$el)==null||K.focus()}function P(){}function R(){const j=s(c);f.value.includes("hover")&&(j==null||j.focus()),u.value=null}function V(j){u.value=j}function B(j){p.value||(j.preventDefault(),j.stopImmediatePropagation())}function F(){t("visible-change",!0)}function Q(j){(j==null?void 0:j.type)==="keydown"&&c.value.focus()}function J(){t("visible-change",!1)}return zt(xp,{contentRef:c,role:C(()=>e.role),triggerId:g,isUsingKeyboard:p,onItemEnter:P,onItemLeave:R}),zt("elDropdown",{instance:o,dropdownSize:$,handleClick:y,commandHandler:T,trigger:Yt(e,"trigger"),hideOnClick:Yt(e,"hideOnClick")}),{t:l,ns:r,scrollbar:d,wrapStyle:v,dropdownTriggerKls:m,dropdownSize:$,triggerId:g,triggerKeys:h,currentTabId:u,handleCurrentTabIdChange:V,handlerMainButtonClick:j=>{t("click",j)},handleEntryFocus:B,handleClose:w,handleOpen:x,handleBeforeShowTooltip:F,handleShowTooltip:Q,handleBeforeHideTooltip:J,onFocusAfterTrapped:j=>{var K,I;j.preventDefault(),(I=(K=c.value)==null?void 0:K.focus)==null||I.call(K,{preventScroll:!0})},popperRef:i,contentRef:c,triggeringElementRef:n,referenceElementRef:a}}});function DQ(e,t,o,r,l,n){var a;const i=nt("el-dropdown-collection"),c=nt("el-roving-focus-group"),d=nt("el-scrollbar"),u=nt("el-only-child"),p=nt("el-tooltip"),h=nt("el-button"),v=nt("arrow-down"),m=nt("el-icon"),f=nt("el-button-group");return b(),M("div",{class:O([e.ns.b(),e.ns.is("disabled",e.disabled)])},[te(p,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},ln({content:le(()=>[te(d,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:le(()=>[te(c,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:le(()=>[te(i,null,{default:le(()=>[be(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:le(()=>[te(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:le(()=>[be(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(b(),he(f,{key:0},{default:le(()=>[te(h,Mt({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:le(()=>[be(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),te(h,Mt({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:le(()=>[te(m,{class:O(e.ns.e("icon"))},{default:le(()=>[te(v)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):se("v-if",!0)],2)}var HQ=Le(VQ,[["render",DQ],["__file","dropdown.vue"]]);const FQ=N({name:"DropdownItemImpl",components:{ElIcon:Ze},props:My,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const o=ze("dropdown"),{role:r}=Ge(xp,void 0),{collectionItemRef:l}=Ge(LQ,void 0),{collectionItemRef:n}=Ge(mQ,void 0),{rovingFocusGroupItemRef:a,tabIndex:i,handleFocus:c,handleKeydown:d,handleMousedown:u}=Ge(Ey,void 0),p=Od(l,n,a),h=C(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),v=vo(m=>{const{code:f}=m;if(f===lt.enter||f===lt.space)return m.preventDefault(),m.stopImmediatePropagation(),t("clickimpl",m),!0},d);return{ns:o,itemRef:p,dataset:{[Cy]:""},role:h,tabIndex:i,handleFocus:c,handleKeydown:v,handleMousedown:u}}}),jQ=["aria-disabled","tabindex","role"];function KQ(e,t,o,r,l,n){const a=nt("el-icon");return b(),M(Qe,null,[e.divided?(b(),M("li",Mt({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):se("v-if",!0),E("li",Mt({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t[0]||(t[0]=i=>e.$emit("clickimpl",i)),onFocus:t[1]||(t[1]=(...i)=>e.handleFocus&&e.handleFocus(...i)),onKeydown:t[2]||(t[2]=ct((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:t[3]||(t[3]=(...i)=>e.handleMousedown&&e.handleMousedown(...i)),onPointermove:t[4]||(t[4]=i=>e.$emit("pointermove",i)),onPointerleave:t[5]||(t[5]=i=>e.$emit("pointerleave",i))}),[e.icon?(b(),he(a,{key:0},{default:le(()=>[(b(),he(Et(e.icon)))]),_:1})):se("v-if",!0),be(e.$slots,"default")],16,jQ)],64)}var UQ=Le(FQ,[["render",KQ],["__file","dropdown-item-impl.vue"]]);const zy=()=>{const e=Ge("elDropdown",{}),t=C(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},WQ=N({name:"ElDropdownItem",components:{ElDropdownCollectionItem:PQ,ElRovingFocusItem:AQ,ElDropdownItemImpl:UQ},inheritAttrs:!1,props:My,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:o}){const{elDropdown:r}=zy(),l=wt(),n=D(null),a=C(()=>{var v,m;return(m=(v=s(n))==null?void 0:v.textContent)!=null?m:""}),{onItemEnter:i,onItemLeave:c}=Ge(xp,void 0),d=vo(v=>(t("pointermove",v),v.defaultPrevented),jb(v=>{if(e.disabled){c(v);return}const m=v.currentTarget;m===document.activeElement||m.contains(document.activeElement)||(i(v),v.defaultPrevented||m==null||m.focus())})),u=vo(v=>(t("pointerleave",v),v.defaultPrevented),jb(v=>{c(v)})),p=vo(v=>{if(!e.disabled)return t("click",v),v.type!=="keydown"&&v.defaultPrevented},v=>{var m,f,_;if(e.disabled){v.stopImmediatePropagation();return}(m=r==null?void 0:r.hideOnClick)!=null&&m.value&&((f=r.handleClick)==null||f.call(r)),(_=r.commandHandler)==null||_.call(r,e.command,l,v)}),h=C(()=>({...e,...o}));return{handleClick:p,handlePointerMove:d,handlePointerLeave:u,textContent:a,propsAndAttrs:h}}});function qQ(e,t,o,r,l,n){var a;const i=nt("el-dropdown-item-impl"),c=nt("el-roving-focus-item"),d=nt("el-dropdown-collection-item");return b(),he(d,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:le(()=>[te(c,{focusable:!e.disabled},{default:le(()=>[te(i,Mt(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:le(()=>[be(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var Iy=Le(WQ,[["render",qQ],["__file","dropdown-item.vue"]]);const YQ=N({name:"ElDropdownMenu",props:zQ,setup(e){const t=ze("dropdown"),{_elDropdownSize:o}=zy(),r=o.value,{focusTrapRef:l,onKeydown:n}=Ge(av,void 0),{contentRef:a,role:i,triggerId:c}=Ge(xp,void 0),{collectionRef:d,getItems:u}=Ge(RQ,void 0),{rovingFocusGroupRef:p,rovingFocusGroupRootStyle:h,tabIndex:v,onBlur:m,onFocus:f,onMousedown:_}=Ge(Wv,void 0),{collectionRef:g}=Ge(Uv,void 0),y=C(()=>[t.b("menu"),t.bm("menu",r==null?void 0:r.value)]),w=Od(a,d,l,p,g),x=vo(T=>{var L;(L=e.onKeydown)==null||L.call(e,T)},T=>{const{currentTarget:L,code:P,target:R}=T;if(L.contains(R),lt.tab===P&&T.stopImmediatePropagation(),T.preventDefault(),R!==s(a)||!OQ.includes(P))return;const B=u().filter(F=>!F.disabled).map(F=>F.ref);Ay.includes(P)&&B.reverse(),qv(B)});return{size:r,rovingFocusGroupRootStyle:h,tabIndex:v,dropdownKls:y,role:i,triggerId:c,dropdownListWrapperRef:w,handleKeydown:T=>{x(T),n(T)},onBlur:m,onFocus:f,onMousedown:_}}}),GQ=["role","aria-labelledby"];function XQ(e,t,o,r,l,n){return b(),M("ul",{ref:e.dropdownListWrapperRef,class:O(e.dropdownKls),style:Je(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:t[0]||(t[0]=(...a)=>e.onBlur&&e.onBlur(...a)),onFocus:t[1]||(t[1]=(...a)=>e.onFocus&&e.onFocus(...a)),onKeydown:t[2]||(t[2]=ct((...a)=>e.handleKeydown&&e.handleKeydown(...a),["self"])),onMousedown:t[3]||(t[3]=ct((...a)=>e.onMousedown&&e.onMousedown(...a),["self"]))},[be(e.$slots,"default")],46,GQ)}var Oy=Le(YQ,[["render",XQ],["__file","dropdown-menu.vue"]]);const ZQ=yt(HQ,{DropdownItem:Iy,DropdownMenu:Oy}),JQ=co(Iy),QQ=co(Oy),eee={viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},tee=["id"],oee=["stop-color"],ree=["stop-color"],lee=["id"],nee=["stop-color"],aee=["stop-color"],iee=["id"],see={id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},cee={id:"B-type",transform:"translate(-1268.000000, -535.000000)"},uee={id:"Group-2",transform:"translate(1268.000000, 535.000000)"},dee=["fill"],pee=["fill"],fee={id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},hee=["fill"],vee=["fill"],mee=["fill"],gee=["fill"],bee=["fill"],_ee={id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},wee=["fill","xlink:href"],yee=["fill","mask"],xee=["fill"],kee=N({...N({name:"ImgEmpty"}),setup(e){const t=ze("empty"),o=Qo();return(r,l)=>(b(),M("svg",eee,[E("defs",null,[E("linearGradient",{id:`linearGradient-1-${s(o)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,oee),E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,ree)],8,tee),E("linearGradient",{id:`linearGradient-2-${s(o)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,nee),E("stop",{"stop-color":`var(${s(t).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,aee)],8,lee),E("rect",{id:`path-3-${s(o)}`,x:"0",y:"0",width:"17",height:"36"},null,8,iee)]),E("g",see,[E("g",cee,[E("g",uee,[E("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${s(t).cssVarBlockName("fill-color-3")})`},null,8,dee),E("polygon",{id:"Rectangle-Copy-14",fill:`var(${s(t).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,pee),E("g",fee,[E("polygon",{id:"Rectangle-Copy-10",fill:`var(${s(t).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,hee),E("polygon",{id:"Rectangle-Copy-11",fill:`var(${s(t).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,vee),E("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${s(o)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,mee),E("polygon",{id:"Rectangle-Copy-13",fill:`var(${s(t).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,gee)]),E("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${s(o)})`,x:"13",y:"45",width:"40",height:"36"},null,8,bee),E("g",_ee,[E("use",{id:"Mask",fill:`var(${s(t).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${s(o)}`},null,8,wee),E("polygon",{id:"Rectangle-Copy",fill:`var(${s(t).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${s(o)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,yee)]),E("polygon",{id:"Rectangle-Copy-18",fill:`var(${s(t).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,xee)])])])]))}});var Cee=Le(kee,[["__file","img-empty.vue"]]);const See=Pe({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),Eee=["src"],Tee={key:1},$ee=N({...N({name:"ElEmpty"}),props:See,setup(e){const t=e,{t:o}=Rt(),r=ze("empty"),l=C(()=>t.description||o("el.table.emptyText")),n=C(()=>({width:go(t.imageSize)}));return(a,i)=>(b(),M("div",{class:O(s(r).b())},[E("div",{class:O(s(r).e("image")),style:Je(s(n))},[a.image?(b(),M("img",{key:0,src:a.image,ondragstart:"return false"},null,8,Eee)):be(a.$slots,"image",{key:1},()=>[te(Cee)])],6),E("div",{class:O(s(r).e("description"))},[a.$slots.description?be(a.$slots,"description",{key:0}):(b(),M("p",Tee,$e(s(l)),1))],2),a.$slots.default?(b(),M("div",{key:0,class:O(s(r).e("bottom"))},[be(a.$slots,"default")],2)):se("v-if",!0)],2))}});var Mee=Le($ee,[["__file","empty.vue"]]);const Ny=yt(Mee),Aee=Pe({urlList:{type:ue(Array),default:()=>uo([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:ue(String)}}),zee={close:()=>!0,switch:e=>st(e),rotate:e=>st(e)},Iee=["src","crossorigin"],Oee=N({...N({name:"ElImageViewer"}),props:Aee,emits:zee,setup(e,{expose:t,emit:o}){var r;const l=e,n={CONTAIN:{name:"contain",icon:Nn(R3)},ORIGINAL:{name:"original",icon:Nn(K3)}},{t:a}=Rt(),i=ze("image-viewer"),{nextZIndex:c}=Ki(),d=D(),u=D([]),p=wf(),h=D(!0),v=D(l.initialIndex),m=lo(n.CONTAIN),f=D({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),_=D((r=l.zIndex)!=null?r:c()),g=C(()=>{const{urlList:U}=l;return U.length<=1}),y=C(()=>v.value===0),w=C(()=>v.value===l.urlList.length-1),x=C(()=>l.urlList[v.value]),$=C(()=>[i.e("btn"),i.e("prev"),i.is("disabled",!l.infinite&&y.value)]),T=C(()=>[i.e("btn"),i.e("next"),i.is("disabled",!l.infinite&&w.value)]),L=C(()=>{const{scale:U,deg:oe,offsetX:ne,offsetY:ce,enableTransition:ee}=f.value;let Me=ne/U,de=ce/U;switch(oe%360){case 90:case-270:[Me,de]=[de,-Me];break;case 180:case-180:[Me,de]=[-Me,-de];break;case 270:case-90:[Me,de]=[-de,Me];break}const _e={transform:`scale(${U}) rotate(${oe}deg) translate(${Me}px, ${de}px)`,transition:ee?"transform .3s":""};return m.value.name===n.CONTAIN.name&&(_e.maxWidth=_e.maxHeight="100%"),_e});function P(){V(),o("close")}function R(){const U=Oa(ne=>{switch(ne.code){case lt.esc:l.closeOnPressEscape&&P();break;case lt.space:Z();break;case lt.left:j();break;case lt.up:I("zoomIn");break;case lt.right:K();break;case lt.down:I("zoomOut");break}}),oe=Oa(ne=>{const ce=ne.deltaY||ne.deltaX;I(ce<0?"zoomIn":"zoomOut",{zoomRate:l.zoomRate,enableTransition:!1})});p.run(()=>{oo(document,"keydown",U),oo(document,"wheel",oe)})}function V(){p.stop()}function B(){h.value=!1}function F(U){h.value=!1,U.target.alt=a("el.image.error")}function Q(U){if(h.value||U.button!==0||!d.value)return;f.value.enableTransition=!1;const{offsetX:oe,offsetY:ne}=f.value,ce=U.pageX,ee=U.pageY,Me=Oa(_e=>{f.value={...f.value,offsetX:oe+_e.pageX-ce,offsetY:ne+_e.pageY-ee}}),de=oo(document,"mousemove",Me);oo(document,"mouseup",()=>{de()}),U.preventDefault()}function J(){f.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Z(){if(h.value)return;const U=Ri(n),oe=Object.values(n),ne=m.value.name,ee=(oe.findIndex(Me=>Me.name===ne)+1)%U.length;m.value=n[U[ee]],J()}function H(U){const oe=l.urlList.length;v.value=(U+oe)%oe}function j(){y.value&&!l.infinite||H(v.value-1)}function K(){w.value&&!l.infinite||H(v.value+1)}function I(U,oe={}){if(h.value)return;const{minScale:ne,maxScale:ce}=l,{zoomRate:ee,rotateDeg:Me,enableTransition:de}={zoomRate:l.zoomRate,rotateDeg:90,enableTransition:!0,...oe};switch(U){case"zoomOut":f.value.scale>ne&&(f.value.scale=Number.parseFloat((f.value.scale/ee).toFixed(3)));break;case"zoomIn":f.value.scale{et(()=>{const U=u.value[0];U!=null&&U.complete||(h.value=!0)})}),Se(v,U=>{J(),o("switch",U)}),ft(()=>{var U,oe;R(),(oe=(U=d.value)==null?void 0:U.focus)==null||oe.call(U)}),t({setActiveItem:H}),(U,oe)=>(b(),he(hi,{to:"body",disabled:!U.teleported},[te(Mo,{name:"viewer-fade",appear:""},{default:le(()=>[E("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:O(s(i).e("wrapper")),style:Je({zIndex:_.value})},[E("div",{class:O(s(i).e("mask")),onClick:oe[0]||(oe[0]=ct(ne=>U.hideOnClickModal&&P(),["self"]))},null,2),se(" CLOSE "),E("span",{class:O([s(i).e("btn"),s(i).e("close")]),onClick:P},[te(s(Ze),null,{default:le(()=>[te(s(Jr))]),_:1})],2),se(" ARROW "),s(g)?se("v-if",!0):(b(),M(Qe,{key:0},[E("span",{class:O(s($)),onClick:j},[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1})],2),E("span",{class:O(s(T)),onClick:K},[te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})],2)],64)),se(" ACTIONS "),E("div",{class:O([s(i).e("btn"),s(i).e("actions")])},[E("div",{class:O(s(i).e("actions__inner"))},[te(s(Ze),{onClick:oe[1]||(oe[1]=ne=>I("zoomOut"))},{default:le(()=>[te(s(X3))]),_:1}),te(s(Ze),{onClick:oe[2]||(oe[2]=ne=>I("zoomIn"))},{default:le(()=>[te(s(vh))]),_:1}),E("i",{class:O(s(i).e("actions__divider"))},null,2),te(s(Ze),{onClick:Z},{default:le(()=>[(b(),he(Et(s(m).icon)))]),_:1}),E("i",{class:O(s(i).e("actions__divider"))},null,2),te(s(Ze),{onClick:oe[3]||(oe[3]=ne=>I("anticlockwise"))},{default:le(()=>[te(s(F3))]),_:1}),te(s(Ze),{onClick:oe[4]||(oe[4]=ne=>I("clockwise"))},{default:le(()=>[te(s(j3))]),_:1})],2)],2),se(" CANVAS "),E("div",{class:O(s(i).e("canvas"))},[(b(!0),M(Qe,null,It(U.urlList,(ne,ce)=>mt((b(),M("img",{ref_for:!0,ref:ee=>u.value[ce]=ee,key:ne,src:ne,style:Je(s(L)),class:O(s(i).e("img")),crossorigin:U.crossorigin,onLoad:B,onError:F,onMousedown:Q},null,46,Iee)),[[Lt,ce===v.value]])),128))],2),be(U.$slots,"default")],6)]),_:3})],8,["disabled"]))}});var Nee=Le(Oee,[["__file","image-viewer.vue"]]);const Py=yt(Nee),Pee=Pe({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:ue([String,Object])},previewSrcList:{type:ue(Array),default:()=>uo([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:ue(String)}}),Ree={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>st(e),close:()=>!0,show:()=>!0},Lee=["src","loading","crossorigin"],Bee={key:0},Vee=N({...N({name:"ElImage",inheritAttrs:!1}),props:Pee,emits:Ree,setup(e,{emit:t}){const o=e;let r="";const{t:l}=Rt(),n=ze("image"),a=ya(),i=xh(),c=D(),d=D(!1),u=D(!0),p=D(!1),h=D(),v=D(),m=Nt&&"loading"in HTMLImageElement.prototype;let f,_;const g=C(()=>[n.e("inner"),x.value&&n.e("preview"),u.value&&n.is("loading")]),y=C(()=>a.style),w=C(()=>{const{fit:K}=o;return Nt&&K?{objectFit:K}:{}}),x=C(()=>{const{previewSrcList:K}=o;return Array.isArray(K)&&K.length>0}),$=C(()=>{const{previewSrcList:K,initialIndex:I}=o;let U=I;return I>K.length-1&&(U=0),U}),T=C(()=>o.loading==="eager"?!1:!m&&o.loading==="lazy"||o.lazy),L=()=>{Nt&&(u.value=!0,d.value=!1,c.value=o.src)};function P(K){u.value=!1,d.value=!1,t("load",K)}function R(K){u.value=!1,d.value=!0,t("error",K)}function V(){bE(h.value,v.value)&&(L(),Q())}const B=Gb(V,200,!0);async function F(){var K;if(!Nt)return;await et();const{scrollContainer:I}=o;Gr(I)?v.value=I:ut(I)&&I!==""?v.value=(K=document.querySelector(I))!=null?K:void 0:h.value&&(v.value=ch(h.value)),v.value&&(f=oo(v,"scroll",B),setTimeout(()=>V(),100))}function Q(){!Nt||!v.value||!B||(f==null||f(),v.value=void 0)}function J(K){if(K.ctrlKey){if(K.deltaY<0)return K.preventDefault(),!1;if(K.deltaY>0)return K.preventDefault(),!1}}function Z(){x.value&&(_=oo("wheel",J,{passive:!1}),r=document.body.style.overflow,document.body.style.overflow="hidden",p.value=!0,t("show"))}function H(){_==null||_(),document.body.style.overflow=r,p.value=!1,t("close")}function j(K){t("switch",K)}return Se(()=>o.src,()=>{T.value?(u.value=!0,d.value=!1,Q(),F()):L()}),ft(()=>{T.value?F():L()}),(K,I)=>(b(),M("div",{ref_key:"container",ref:h,class:O([s(n).b(),K.$attrs.class]),style:Je(s(y))},[d.value?be(K.$slots,"error",{key:0},()=>[E("div",{class:O(s(n).e("error"))},$e(s(l)("el.image.error")),3)]):(b(),M(Qe,{key:1},[c.value!==void 0?(b(),M("img",Mt({key:0},s(i),{src:c.value,loading:K.loading,style:s(w),class:s(g),crossorigin:K.crossorigin,onClick:Z,onLoad:P,onError:R}),null,16,Lee)):se("v-if",!0),u.value?(b(),M("div",{key:1,class:O(s(n).e("wrapper"))},[be(K.$slots,"placeholder",{},()=>[E("div",{class:O(s(n).e("placeholder"))},null,2)])],2)):se("v-if",!0)],64)),s(x)?(b(),M(Qe,{key:2},[p.value?(b(),he(s(Py),{key:0,"z-index":K.zIndex,"initial-index":s($),infinite:K.infinite,"zoom-rate":K.zoomRate,"min-scale":K.minScale,"max-scale":K.maxScale,"url-list":K.previewSrcList,"hide-on-click-modal":K.hideOnClickModal,teleported:K.previewTeleported,"close-on-press-escape":K.closeOnPressEscape,onClose:H,onSwitch:j},{default:le(()=>[K.$slots.viewer?(b(),M("div",Bee,[be(K.$slots,"viewer")])):se("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","hide-on-click-modal","teleported","close-on-press-escape"])):se("v-if",!0)],64)):se("v-if",!0)],6))}});var Dee=Le(Vee,[["__file","image.vue"]]);const Hee=yt(Dee),Fee=Pe({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Oo,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||st(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),jee={[ro]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[yr]:e=>st(e)||jo(e),[St]:e=>st(e)||jo(e)},Kee=["aria-label","onKeydown"],Uee=["aria-label","onKeydown"],Wee=N({...N({name:"ElInputNumber"}),props:Fee,emits:jee,setup(e,{expose:t,emit:o}){const r=e,{t:l}=Rt(),n=ze("input-number"),a=D(),i=Dt({currentValue:r.modelValue,userInput:null}),{formItem:c}=sr(),d=C(()=>st(r.modelValue)&&r.modelValue<=r.min),u=C(()=>st(r.modelValue)&&r.modelValue>=r.max),p=C(()=>{const Z=g(r.step);return ko(r.precision)?Math.max(g(r.modelValue),Z):(Z>r.precision,r.precision)}),h=C(()=>r.controls&&r.controlsPosition==="right"),v=So(),m=xr(),f=C(()=>{if(i.userInput!==null)return i.userInput;let Z=i.currentValue;if(jo(Z))return"";if(st(Z)){if(Number.isNaN(Z))return"";ko(r.precision)||(Z=Z.toFixed(r.precision))}return Z}),_=(Z,H)=>{if(ko(H)&&(H=p.value),H===0)return Math.round(Z);let j=String(Z);const K=j.indexOf(".");if(K===-1||!j.replace(".","").split("")[K+H])return Z;const oe=j.length;return j.charAt(oe-1)==="5"&&(j=`${j.slice(0,Math.max(0,oe-1))}6`),Number.parseFloat(Number(j).toFixed(H))},g=Z=>{if(jo(Z))return 0;const H=Z.toString(),j=H.indexOf(".");let K=0;return j!==-1&&(K=H.length-j-1),K},y=(Z,H=1)=>st(Z)?_(Z+r.step*H):i.currentValue,w=()=>{if(r.readonly||m.value||u.value)return;const Z=Number(f.value)||0,H=y(Z);T(H),o(yr,i.currentValue),Q()},x=()=>{if(r.readonly||m.value||d.value)return;const Z=Number(f.value)||0,H=y(Z,-1);T(H),o(yr,i.currentValue),Q()},$=(Z,H)=>{const{max:j,min:K,step:I,precision:U,stepStrictly:oe,valueOnClear:ne}=r;jj||cej?j:K,H&&o(St,ce)),ce},T=(Z,H=!0)=>{var j;const K=i.currentValue,I=$(Z);if(!H){o(St,I);return}K===I&&Z||(i.userInput=null,o(St,I),K!==I&&o(ro,I,K),r.validateEvent&&((j=c==null?void 0:c.validate)==null||j.call(c,"change").catch(U=>void 0)),i.currentValue=I)},L=Z=>{i.userInput=Z;const H=Z===""?null:Number(Z);o(yr,H),T(H,!1)},P=Z=>{const H=Z!==""?Number(Z):"";(st(H)&&!Number.isNaN(H)||Z==="")&&T(H),Q(),i.userInput=null},R=()=>{var Z,H;(H=(Z=a.value)==null?void 0:Z.focus)==null||H.call(Z)},V=()=>{var Z,H;(H=(Z=a.value)==null?void 0:Z.blur)==null||H.call(Z)},B=Z=>{o("focus",Z)},F=Z=>{var H;i.userInput=null,o("blur",Z),r.validateEvent&&((H=c==null?void 0:c.validate)==null||H.call(c,"blur").catch(j=>void 0))},Q=()=>{i.currentValue!==r.modelValue&&(i.currentValue=r.modelValue)},J=Z=>{document.activeElement===Z.target&&Z.preventDefault()};return Se(()=>r.modelValue,(Z,H)=>{const j=$(Z,!0);i.userInput===null&&j!==H&&(i.currentValue=j)},{immediate:!0}),ft(()=>{var Z;const{min:H,max:j,modelValue:K}=r,I=(Z=a.value)==null?void 0:Z.input;if(I.setAttribute("role","spinbutton"),Number.isFinite(j)?I.setAttribute("aria-valuemax",String(j)):I.removeAttribute("aria-valuemax"),Number.isFinite(H)?I.setAttribute("aria-valuemin",String(H)):I.removeAttribute("aria-valuemin"),I.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),I.setAttribute("aria-disabled",String(m.value)),!st(K)&&K!=null){let U=Number(K);Number.isNaN(U)&&(U=null),o(St,U)}I.addEventListener("wheel",J,{passive:!1})}),rn(()=>{var Z,H;const j=(Z=a.value)==null?void 0:Z.input;j==null||j.setAttribute("aria-valuenow",`${(H=i.currentValue)!=null?H:""}`)}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-input-number",ref:"https://element-plus.org/en-US/component/input-number.html"},C(()=>!!r.label)),t({focus:R,blur:V}),(Z,H)=>(b(),M("div",{class:O([s(n).b(),s(n).m(s(v)),s(n).is("disabled",s(m)),s(n).is("without-controls",!Z.controls),s(n).is("controls-right",s(h))]),onDragstart:H[0]||(H[0]=ct(()=>{},["prevent"]))},[Z.controls?mt((b(),M("span",{key:0,role:"button","aria-label":s(l)("el.inputNumber.decrease"),class:O([s(n).e("decrease"),s(n).is("disabled",s(d))]),onKeydown:Gt(x,["enter"])},[be(Z.$slots,"decrease-icon",{},()=>[te(s(Ze),null,{default:le(()=>[s(h)?(b(),he(s(Pl),{key:0})):(b(),he(s(B3),{key:1}))]),_:1})])],42,Kee)),[[s(np),x]]):se("v-if",!0),Z.controls?mt((b(),M("span",{key:1,role:"button","aria-label":s(l)("el.inputNumber.increase"),class:O([s(n).e("increase"),s(n).is("disabled",s(u))]),onKeydown:Gt(w,["enter"])},[be(Z.$slots,"increase-icon",{},()=>[te(s(Ze),null,{default:le(()=>[s(h)?(b(),he(s(Md),{key:0})):(b(),he(s(fh),{key:1}))]),_:1})])],42,Uee)),[[s(np),w]]):se("v-if",!0),te(s(cr),{id:Z.id,ref_key:"input",ref:a,type:"number",step:Z.step,"model-value":s(f),placeholder:Z.placeholder,readonly:Z.readonly,disabled:s(m),size:s(v),max:Z.max,min:Z.min,name:Z.name,"aria-label":Z.label||Z.ariaLabel,"validate-event":!1,onKeydown:[Gt(ct(w,["prevent"]),["up"]),Gt(ct(x,["prevent"]),["down"])],onBlur:F,onFocus:B,onInput:L,onChange:P},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],34))}});var qee=Le(Wee,[["__file","input-number.vue"]]);const Ry=yt(qee),Yee=Pe({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Xt}}),Gee={click:e=>e instanceof MouseEvent},Xee=["href","target"],Zee=N({...N({name:"ElLink"}),props:Yee,emits:Gee,setup(e,{emit:t}){const o=e,r=ze("link"),l=C(()=>[r.b(),r.m(o.type),r.is("disabled",o.disabled),r.is("underline",o.underline&&!o.disabled)]);function n(a){o.disabled||t("click",a)}return(a,i)=>(b(),M("a",{class:O(s(l)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:n},[a.icon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et(a.icon)))]),_:1})):se("v-if",!0),a.$slots.default?(b(),M("span",{key:1,class:O(s(r).e("inner"))},[be(a.$slots,"default")],2)):se("v-if",!0),a.$slots.icon?be(a.$slots,"icon",{key:2}):se("v-if",!0)],10,Xee))}});var Jee=Le(Zee,[["__file","link.vue"]]);const Qee=yt(Jee);let ete=class{constructor(t,o){this.parent=t,this.domNode=o,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,o=>{o.addEventListener("keydown",r=>{let l=!1;switch(r.code){case lt.down:{this.gotoSubIndex(this.subIndex+1),l=!0;break}case lt.up:{this.gotoSubIndex(this.subIndex-1),l=!0;break}case lt.tab:{dd(t,"mouseleave");break}case lt.enter:case lt.space:{l=!0,r.currentTarget.click();break}}return l&&(r.preventDefault(),r.stopPropagation()),!1})})}},tte=class{constructor(t,o){this.domNode=t,this.submenu=null,this.submenu=null,this.init(o)}init(t){this.domNode.setAttribute("tabindex","0");const o=this.domNode.querySelector(`.${t}-menu`);o&&(this.submenu=new ete(this,o)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let o=!1;switch(t.code){case lt.down:{dd(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),o=!0;break}case lt.up:{dd(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),o=!0;break}case lt.tab:{dd(t.currentTarget,"mouseleave");break}case lt.enter:case lt.space:{o=!0,t.currentTarget.click();break}}o&&t.preventDefault()})}},ote=class{constructor(t,o){this.domNode=t,this.init(o)}init(t){const o=this.domNode.childNodes;Array.from(o).forEach(r=>{r.nodeType===1&&new tte(r,t)})}};const rte=N({name:"ElMenuCollapseTransition",setup(){const e=ze("menu");return{listeners:{onBeforeEnter:o=>o.style.opacity="0.2",onEnter(o,r){Zr(o,`${e.namespace.value}-opacity-transition`),o.style.opacity="1",r()},onAfterEnter(o){ar(o,`${e.namespace.value}-opacity-transition`),o.style.opacity=""},onBeforeLeave(o){o.dataset||(o.dataset={}),Xr(o,e.m("collapse"))?(ar(o,e.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),Zr(o,e.m("collapse"))):(Zr(o,e.m("collapse")),o.dataset.oldOverflow=o.style.overflow,o.dataset.scrollWidth=o.clientWidth.toString(),ar(o,e.m("collapse"))),o.style.width=`${o.scrollWidth}px`,o.style.overflow="hidden"},onLeave(o){Zr(o,"horizontal-collapse-transition"),o.style.width=`${o.dataset.scrollWidth}px`}}}}});function lte(e,t,o,r,l,n){return b(),he(Mo,Mt({mode:"out-in"},e.listeners),{default:le(()=>[be(e.$slots,"default")]),_:3},16)}var nte=Le(rte,[["render",lte],["__file","menu-collapse-transition.vue"]]);function Ly(e,t){const o=C(()=>{let l=e.parent;const n=[t.value];for(;l.type.name!=="ElMenu";)l.props.index&&n.unshift(l.props.index),l=l.parent;return n});return{parentMenu:C(()=>{let l=e.parent;for(;l&&!["ElMenu","ElSubMenu"].includes(l.type.name);)l=l.parent;return l}),indexPath:o}}function ate(e){return C(()=>{const o=e.backgroundColor;return o?new W4(o).shade(20).toString():""})}const By=(e,t)=>{const o=ze("menu");return C(()=>o.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":ate(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},ite=Pe({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Xt},expandOpenIcon:{type:Xt},collapseCloseIcon:{type:Xt},collapseOpenIcon:{type:Xt}}),Yv="ElSubMenu";var Gv=N({name:Yv,props:ite,setup(e,{slots:t,expose:o}){const r=wt(),{indexPath:l,parentMenu:n}=Ly(r,C(()=>e.index)),a=ze("menu"),i=ze("sub-menu"),c=Ge("rootMenu");c||Io(Yv,"can not inject root menu");const d=Ge(`subMenu:${n.value.uid}`);d||Io(Yv,"can not inject sub menu");const u=D({}),p=D({});let h;const v=D(!1),m=D(),f=D(null),_=C(()=>P.value==="horizontal"&&y.value?"bottom-start":"right-start"),g=C(()=>P.value==="horizontal"&&y.value||P.value==="vertical"&&!c.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?T.value?e.expandOpenIcon:e.expandCloseIcon:Pl:e.collapseCloseIcon&&e.collapseOpenIcon?T.value?e.collapseOpenIcon:e.collapseCloseIcon:ir),y=C(()=>d.level===0),w=C(()=>{const U=e.teleported;return U===void 0?y.value:U}),x=C(()=>c.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),$=C(()=>P.value==="horizontal"&&y.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),T=C(()=>c.openedMenus.includes(e.index)),L=C(()=>{let U=!1;return Object.values(u.value).forEach(oe=>{oe.active&&(U=!0)}),Object.values(p.value).forEach(oe=>{oe.active&&(U=!0)}),U}),P=C(()=>c.props.mode),R=Dt({index:e.index,indexPath:l,active:L}),V=By(c.props,d.level+1),B=C(()=>{var U;return(U=e.popperOffset)!=null?U:c.props.popperOffset}),F=C(()=>{var U;return(U=e.popperClass)!=null?U:c.props.popperClass}),Q=C(()=>{var U;return(U=e.showTimeout)!=null?U:c.props.showTimeout}),J=C(()=>{var U;return(U=e.hideTimeout)!=null?U:c.props.hideTimeout}),Z=()=>{var U,oe,ne;return(ne=(oe=(U=f.value)==null?void 0:U.popperRef)==null?void 0:oe.popperInstanceRef)==null?void 0:ne.destroy()},H=U=>{U||Z()},j=()=>{c.props.menuTrigger==="hover"&&c.props.mode==="horizontal"||c.props.collapse&&c.props.mode==="vertical"||e.disabled||c.handleSubMenuClick({index:e.index,indexPath:l.value,active:L.value})},K=(U,oe=Q.value)=>{var ne;if(U.type!=="focus"){if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"||e.disabled){d.mouseInChild.value=!0;return}d.mouseInChild.value=!0,h==null||h(),{stop:h}=$a(()=>{c.openMenu(e.index,l.value)},oe),w.value&&((ne=n.value.vnode.el)==null||ne.dispatchEvent(new MouseEvent("mouseenter")))}},I=(U=!1)=>{var oe;if(c.props.menuTrigger==="click"&&c.props.mode==="horizontal"||!c.props.collapse&&c.props.mode==="vertical"){d.mouseInChild.value=!1;return}h==null||h(),d.mouseInChild.value=!1,{stop:h}=$a(()=>!v.value&&c.closeMenu(e.index,l.value),J.value),w.value&&U&&((oe=d.handleMouseleave)==null||oe.call(d,!0))};Se(()=>c.props.collapse,U=>H(!!U));{const U=ne=>{p.value[ne.index]=ne},oe=ne=>{delete p.value[ne.index]};zt(`subMenu:${r.uid}`,{addSubMenu:U,removeSubMenu:oe,handleMouseleave:I,mouseInChild:v,level:d.level+1})}return o({opened:T}),ft(()=>{c.addSubMenu(R),d.addSubMenu(R)}),to(()=>{d.removeSubMenu(R),c.removeSubMenu(R)}),()=>{var U;const oe=[(U=t.title)==null?void 0:U.call(t),rt(Ze,{class:i.e("icon-arrow"),style:{transform:T.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&c.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>ut(g.value)?rt(r.appContext.components[g.value]):rt(g.value)})],ne=c.isMenuPopup?rt(ur,{ref:f,visible:T.value,effect:"light",pure:!0,offset:B.value,showArrow:!1,persistent:!0,popperClass:F.value,placement:_.value,teleported:w.value,fallbackPlacements:$.value,transition:x.value,gpuAcceleration:!1},{content:()=>{var ce;return rt("div",{class:[a.m(P.value),a.m("popup-container"),F.value],onMouseenter:ee=>K(ee,100),onMouseleave:()=>I(!0),onFocus:ee=>K(ee,100)},[rt("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${_.value}`)],style:V.value},[(ce=t.default)==null?void 0:ce.call(t)])])},default:()=>rt("div",{class:i.e("title"),onClick:j},oe)}):rt(Qe,{},[rt("div",{class:i.e("title"),ref:m,onClick:j},oe),rt(mp,{},{default:()=>{var ce;return mt(rt("ul",{role:"menu",class:[a.b(),a.m("inline")],style:V.value},[(ce=t.default)==null?void 0:ce.call(t)]),[[Lt,T.value]])}})]);return rt("li",{class:[i.b(),i.is("active",L.value),i.is("opened",T.value),i.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:T.value,onMouseenter:K,onMouseleave:()=>I(),onFocus:K},[ne])}}});const ste=Pe({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:ue(Array),default:()=>uo([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:Xt,default:()=>V3},popperEffect:{type:String,values:["dark","light"],default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),Xv=e=>Array.isArray(e)&&e.every(t=>ut(t));var cte=N({name:"ElMenu",props:ste,emits:{close:(e,t)=>ut(e)&&Xv(t),open:(e,t)=>ut(e)&&Xv(t),select:(e,t,o,r)=>ut(e)&&Xv(t)&&xt(o)&&(r===void 0||r instanceof Promise)},setup(e,{emit:t,slots:o,expose:r}){const l=wt(),n=l.appContext.config.globalProperties.$router,a=D(),i=ze("menu"),c=ze("sub-menu"),d=D(-1),u=D(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),p=D(e.defaultActive),h=D({}),v=D({}),m=C(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),f=()=>{const J=p.value&&h.value[p.value];if(!J||e.mode==="horizontal"||e.collapse)return;J.indexPath.forEach(H=>{const j=v.value[H];j&&_(H,j.indexPath)})},_=(J,Z)=>{u.value.includes(J)||(e.uniqueOpened&&(u.value=u.value.filter(H=>Z.includes(H))),u.value.push(J),t("open",J,Z))},g=J=>{const Z=u.value.indexOf(J);Z!==-1&&u.value.splice(Z,1)},y=(J,Z)=>{g(J),t("close",J,Z)},w=({index:J,indexPath:Z})=>{u.value.includes(J)?y(J,Z):_(J,Z)},x=J=>{(e.mode==="horizontal"||e.collapse)&&(u.value=[]);const{index:Z,indexPath:H}=J;if(!(jo(Z)||jo(H)))if(e.router&&n){const j=J.route||Z,K=n.push(j).then(I=>(I||(p.value=Z),I));t("select",Z,H,{index:Z,indexPath:H,route:j},K)}else p.value=Z,t("select",Z,H,{index:Z,indexPath:H})},$=J=>{const Z=h.value,H=Z[J]||p.value&&Z[p.value]||Z[e.defaultActive];H?p.value=H.index:p.value=J},T=J=>{const Z=getComputedStyle(J),H=Number.parseInt(Z.marginLeft,10),j=Number.parseInt(Z.marginRight,10);return J.offsetWidth+H+j||0},L=()=>{var J,Z;if(!a.value)return-1;const H=Array.from((Z=(J=a.value)==null?void 0:J.childNodes)!=null?Z:[]).filter(ee=>ee.nodeName!=="#comment"&&(ee.nodeName!=="#text"||ee.nodeValue)),j=64,K=getComputedStyle(a.value),I=Number.parseInt(K.paddingLeft,10),U=Number.parseInt(K.paddingRight,10),oe=a.value.clientWidth-I-U;let ne=0,ce=0;return H.forEach((ee,Me)=>{ne+=T(ee),ne<=oe-j&&(ce=Me+1)}),ce===H.length?-1:ce},P=J=>v.value[J].indexPath,R=(J,Z=33.34)=>{let H;return()=>{H&&clearTimeout(H),H=setTimeout(()=>{J()},Z)}};let V=!0;const B=()=>{if(d.value===L())return;const J=()=>{d.value=-1,et(()=>{d.value=L()})};V?J():R(J)(),V=!1};Se(()=>e.defaultActive,J=>{h.value[J]||(p.value=""),$(J)}),Se(()=>e.collapse,J=>{J&&(u.value=[])}),Se(h.value,f);let F;Go(()=>{e.mode==="horizontal"&&e.ellipsis?F=so(a,B).stop:F==null||F()});const Q=D(!1);{const J=K=>{v.value[K.index]=K},Z=K=>{delete v.value[K.index]};zt("rootMenu",Dt({props:e,openedMenus:u,items:h,subMenus:v,activeIndex:p,isMenuPopup:m,addMenuItem:K=>{h.value[K.index]=K},removeMenuItem:K=>{delete h.value[K.index]},addSubMenu:J,removeSubMenu:Z,openMenu:_,closeMenu:y,handleMenuItemClick:x,handleSubMenuClick:w})),zt(`subMenu:${l.uid}`,{addSubMenu:J,removeSubMenu:Z,mouseInChild:Q,level:0})}return ft(()=>{e.mode==="horizontal"&&new ote(l.vnode.el,i.namespace.value)}),r({open:Z=>{const{indexPath:H}=v.value[Z];H.forEach(j=>_(j,H))},close:g,handleResize:B}),()=>{var J,Z;let H=(Z=(J=o.default)==null?void 0:J.call(o))!=null?Z:[];const j=[];if(e.mode==="horizontal"&&a.value){const oe=Qn(H),ne=d.value===-1?oe:oe.slice(0,d.value),ce=d.value===-1?[]:oe.slice(d.value);ce!=null&&ce.length&&e.ellipsis&&(H=ne,j.push(rt(Gv,{index:"sub-menu-more",class:c.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>rt(Ze,{class:c.e("icon-more")},{default:()=>rt(e.ellipsisIcon)}),default:()=>ce})))}const K=By(e,0),I=e.closeOnClickOutside?[[xn,()=>{u.value.length&&(Q.value||(u.value.forEach(oe=>t("close",oe,P(oe))),u.value=[]))}]]:[],U=mt(rt("ul",{key:String(e.collapse),role:"menubar",ref:a,style:K.value,class:{[i.b()]:!0,[i.m(e.mode)]:!0,[i.m("collapse")]:e.collapse}},[...H,...j]),I);return e.collapseTransition&&e.mode==="vertical"?rt(nte,()=>U):U}}});const ute=Pe({index:{type:ue([String,null]),default:null},route:{type:ue([String,Object])},disabled:Boolean}),dte={click:e=>ut(e.index)&&Array.isArray(e.indexPath)},Zv="ElMenuItem",pte=N({name:Zv,components:{ElTooltip:ur},props:ute,emits:dte,setup(e,{emit:t}){const o=wt(),r=Ge("rootMenu"),l=ze("menu"),n=ze("menu-item");r||Io(Zv,"can not inject root menu");const{parentMenu:a,indexPath:i}=Ly(o,Yt(e,"index")),c=Ge(`subMenu:${a.value.uid}`);c||Io(Zv,"can not inject sub menu");const d=C(()=>e.index===r.activeIndex),u=Dt({index:e.index,indexPath:i,active:d}),p=()=>{e.disabled||(r.handleMenuItemClick({index:e.index,indexPath:i.value,route:e.route}),t("click",u))};return ft(()=>{c.addSubMenu(u),r.addMenuItem(u)}),to(()=>{c.removeSubMenu(u),r.removeMenuItem(u)}),{parentMenu:a,rootMenu:r,active:d,nsMenu:l,nsMenuItem:n,handleClick:p}}});function fte(e,t,o,r,l,n){const a=nt("el-tooltip");return b(),M("li",{class:O([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:t[0]||(t[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(b(),he(a,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:le(()=>[be(e.$slots,"title")]),default:le(()=>[E("div",{class:O(e.nsMenu.be("tooltip","trigger"))},[be(e.$slots,"default")],2)]),_:3},8,["effect"])):(b(),M(Qe,{key:1},[be(e.$slots,"default"),be(e.$slots,"title")],64))],2)}var Vy=Le(pte,[["render",fte],["__file","menu-item.vue"]]);const hte=N({name:"ElMenuItemGroup",props:{title:String},setup(){return{ns:ze("menu-item-group")}}});function vte(e,t,o,r,l,n){return b(),M("li",{class:O(e.ns.b())},[E("div",{class:O(e.ns.e("title"))},[e.$slots.title?be(e.$slots,"title",{key:1}):(b(),M(Qe,{key:0},[Ct($e(e.title),1)],64))],2),E("ul",null,[be(e.$slots,"default")])],2)}var Dy=Le(hte,[["render",vte],["__file","menu-item-group.vue"]]);const mte=yt(cte,{MenuItem:Vy,MenuItemGroup:Dy,SubMenu:Gv}),gte=co(Vy),bte=co(Dy),_te=co(Gv),wte=Pe({icon:{type:Xt,default:()=>A3},title:String,content:{type:String,default:""}}),yte={back:()=>!0},xte=["aria-label"],kte=N({...N({name:"ElPageHeader"}),props:wte,emits:yte,setup(e,{emit:t}){const o=Do(),{t:r}=Rt(),l=ze("page-header"),n=C(()=>[l.b(),{[l.m("has-breadcrumb")]:!!o.breadcrumb,[l.m("has-extra")]:!!o.extra,[l.is("contentful")]:!!o.default}]);function a(){t("back")}return(i,c)=>(b(),M("div",{class:O(s(n))},[i.$slots.breadcrumb?(b(),M("div",{key:0,class:O(s(l).e("breadcrumb"))},[be(i.$slots,"breadcrumb")],2)):se("v-if",!0),E("div",{class:O(s(l).e("header"))},[E("div",{class:O(s(l).e("left"))},[E("div",{class:O(s(l).e("back")),role:"button",tabindex:"0",onClick:a},[i.icon||i.$slots.icon?(b(),M("div",{key:0,"aria-label":i.title||s(r)("el.pageHeader.title"),class:O(s(l).e("icon"))},[be(i.$slots,"icon",{},()=>[i.icon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et(i.icon)))]),_:1})):se("v-if",!0)])],10,xte)):se("v-if",!0),E("div",{class:O(s(l).e("title"))},[be(i.$slots,"title",{},()=>[Ct($e(i.title||s(r)("el.pageHeader.title")),1)])],2)],2),te(s(ky),{direction:"vertical"}),E("div",{class:O(s(l).e("content"))},[be(i.$slots,"content",{},()=>[Ct($e(i.content),1)])],2)],2),i.$slots.extra?(b(),M("div",{key:0,class:O(s(l).e("extra"))},[be(i.$slots,"extra")],2)):se("v-if",!0)],2),i.$slots.default?(b(),M("div",{key:1,class:O(s(l).e("main"))},[be(i.$slots,"default")],2)):se("v-if",!0)],2))}});var Cte=Le(kte,[["__file","page-header.vue"]]);const Ste=yt(Cte),Hy=Symbol("elPaginationKey"),Ete=Pe({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Xt}}),Tte={click:e=>e instanceof MouseEvent},$te=["disabled","aria-label","aria-disabled"],Mte={key:0},Ate=N({...N({name:"ElPaginationPrev"}),props:Ete,emits:Tte,setup(e){const t=e,{t:o}=Rt(),r=C(()=>t.disabled||t.currentPage<=1);return(l,n)=>(b(),M("button",{type:"button",class:"btn-prev",disabled:s(r),"aria-label":l.prevText||s(o)("el.pagination.prev"),"aria-disabled":s(r),onClick:n[0]||(n[0]=a=>l.$emit("click",a))},[l.prevText?(b(),M("span",Mte,$e(l.prevText),1)):(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(l.prevIcon)))]),_:1}))],8,$te))}});var zte=Le(Ate,[["__file","prev.vue"]]);const Ite=Pe({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Xt}}),Ote=["disabled","aria-label","aria-disabled"],Nte={key:0},Pte=N({...N({name:"ElPaginationNext"}),props:Ite,emits:["click"],setup(e){const t=e,{t:o}=Rt(),r=C(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(l,n)=>(b(),M("button",{type:"button",class:"btn-next",disabled:s(r),"aria-label":l.nextText||s(o)("el.pagination.next"),"aria-disabled":s(r),onClick:n[0]||(n[0]=a=>l.$emit("click",a))},[l.nextText?(b(),M("span",Nte,$e(l.nextText),1)):(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(l.nextIcon)))]),_:1}))],8,Ote))}});var Rte=Le(Pte,[["__file","next.vue"]]);const Fy=Symbol("ElSelectGroup"),ls=Symbol("ElSelect");function Lte(e,t){const o=Ge(ls),r=Ge(Fy,{disabled:!1}),l=C(()=>o.props.multiple?u(o.props.modelValue,e.value):u([o.props.modelValue],e.value)),n=C(()=>{if(o.props.multiple){const v=o.props.modelValue||[];return!l.value&&v.length>=o.props.multipleLimit&&o.props.multipleLimit>0}else return!1}),a=C(()=>e.label||(xt(e.value)?"":e.value)),i=C(()=>e.value||e.label||""),c=C(()=>e.disabled||t.groupDisabled||n.value),d=wt(),u=(v=[],m)=>{if(xt(e.value)){const f=o.props.valueKey;return v&&v.some(_=>Kt(wo(_,f))===wo(m,f))}else return v&&v.includes(m)},p=()=>{!e.disabled&&!r.disabled&&(o.states.hoveringIndex=o.optionsArray.indexOf(d.proxy))},h=v=>{const m=new RegExp(sh(v),"i");t.visible=m.test(a.value)||e.created};return Se(()=>a.value,()=>{!e.created&&!o.props.remote&&o.setSelected()}),Se(()=>e.value,(v,m)=>{const{remote:f,valueKey:_}=o.props;if(nr(v,m)||(o.onOptionDestroy(m,d.proxy),o.onOptionCreate(d.proxy)),!e.created&&!f){if(_&&xt(v)&&xt(m)&&v[_]===m[_])return;o.setSelected()}}),Se(()=>r.disabled,()=>{t.groupDisabled=r.disabled},{immediate:!0}),{select:o,currentLabel:a,currentValue:i,itemSelected:l,isDisabled:c,hoverItem:p,updateOption:h}}const Bte=N({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=ze("select"),o=Qo(),r=C(()=>[t.be("dropdown","item"),t.is("disabled",s(i)),t.is("selected",s(a)),t.is("hovering",s(h))]),l=Dt({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:n,itemSelected:a,isDisabled:i,select:c,hoverItem:d,updateOption:u}=Lte(e,l),{visible:p,hover:h}=Bo(l),v=wt().proxy;c.onOptionCreate(v),to(()=>{const f=v.value,{selected:_}=c.states,y=(c.props.multiple?_:[_]).some(w=>w.value===v.value);et(()=>{c.states.cachedOptions.get(f)===v&&!y&&c.states.cachedOptions.delete(f)}),c.onOptionDestroy(f,v)});function m(){e.disabled!==!0&&l.groupDisabled!==!0&&c.handleOptionSelect(v)}return{ns:t,id:o,containerKls:r,currentLabel:n,itemSelected:a,isDisabled:i,select:c,hoverItem:d,updateOption:u,visible:p,hover:h,selectOptionClick:m,states:l}}}),Vte=["id","aria-disabled","aria-selected"];function Dte(e,t,o,r,l,n){return mt((b(),M("li",{id:e.id,class:O(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=ct((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[be(e.$slots,"default",{},()=>[E("span",null,$e(e.currentLabel),1)])],42,Vte)),[[Lt,e.visible]])}var Jv=Le(Bte,[["render",Dte],["__file","option.vue"]]);const Hte=N({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Ge(ls),t=ze("select"),o=C(()=>e.props.popperClass),r=C(()=>e.props.multiple),l=C(()=>e.props.fitInputWidth),n=D("");function a(){var i;n.value=`${(i=e.selectRef)==null?void 0:i.offsetWidth}px`}return ft(()=>{a(),so(e.selectRef,a)}),{ns:t,minWidth:n,popperClass:o,isMultiple:r,isFitInputWidth:l}}});function Fte(e,t,o,r,l,n){return b(),M("div",{class:O([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Je({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(b(),M("div",{key:0,class:O(e.ns.be("dropdown","header"))},[be(e.$slots,"header")],2)):se("v-if",!0),be(e.$slots,"default"),e.$slots.footer?(b(),M("div",{key:1,class:O(e.ns.be("dropdown","footer"))},[be(e.$slots,"footer")],2)):se("v-if",!0)],6)}var jte=Le(Hte,[["render",Fte],["__file","select-dropdown.vue"]]);function jy(e){const t=D(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:n=>{const a=n.target.value,i=a[a.length-1]||"";t.value=!yh(i)},handleCompositionEnd:n=>{t.value&&(t.value=!1,it(e)&&e(n))}}}const Kte=11,Ute=(e,t)=>{const{t:o}=Rt(),r=Qo(),l=ze("select"),n=ze("input"),a=Dt({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),i=D(null),c=D(null),d=D(null),u=D(null),p=D(null),h=D(null),v=D(null),m=D(null),f=D(null),_=D(null),g=D(null),y=D(null),{wrapperRef:w,isFocused:x,handleFocus:$,handleBlur:T}=Kd(p,{afterFocus(){e.automaticDropdown&&!L.value&&(L.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(He){var ot,eo;return((ot=d.value)==null?void 0:ot.isFocusInsideContent(He))||((eo=u.value)==null?void 0:eo.isFocusInsideContent(He))},afterBlur(){L.value=!1,a.menuVisibleOnFocus=!1}}),L=D(!1),P=D(),{form:R,formItem:V}=sr(),{inputId:B}=bl(e,{formItemContext:V}),{valueOnClear:F,isEmptyValue:Q}=Ud(e),J=C(()=>e.disabled||(R==null?void 0:R.disabled)),Z=C(()=>e.multiple?Ke(e.modelValue)&&e.modelValue.length>0:!Q(e.modelValue)),H=C(()=>e.clearable&&!J.value&&a.inputHovering&&Z.value),j=C(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),K=C(()=>l.is("reverse",j.value&&L.value)),I=C(()=>(V==null?void 0:V.validateState)||""),U=C(()=>bh[I.value]),oe=C(()=>e.remote?300:0),ne=C(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!a.inputValue&&a.options.size===0?!1:e.filterable&&a.inputValue&&a.options.size>0&&ce.value===0?e.noMatchText||o("el.select.noMatch"):a.options.size===0?e.noDataText||o("el.select.noData"):null),ce=C(()=>ee.value.filter(He=>He.visible).length),ee=C(()=>{const He=Array.from(a.options.values()),ot=[];return a.optionValues.forEach(eo=>{const ao=He.findIndex(Po=>Po.value===eo);ao>-1&&ot.push(He[ao])}),ot.length>=He.length?ot:He}),Me=C(()=>Array.from(a.cachedOptions.values())),de=C(()=>{const He=ee.value.filter(ot=>!ot.created).some(ot=>ot.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!He}),_e=()=>{e.filterable&&it(e.filterMethod)||e.filterable&&e.remote&&it(e.remoteMethod)||ee.value.forEach(He=>{var ot;(ot=He.updateOption)==null||ot.call(He,a.inputValue)})},me=So(),Re=C(()=>["small"].includes(me.value)?"small":"default"),Ce=C({get(){return L.value&&ne.value!==!1},set(He){L.value=He}}),Ee=C(()=>Ke(e.modelValue)?e.modelValue.length===0&&!a.inputValue:e.filterable?!a.inputValue:!0),De=C(()=>{var He;const ot=(He=e.placeholder)!=null?He:o("el.select.placeholder");return e.multiple||!Z.value?ot:a.selectedLabel}),ae=C(()=>M0?null:"mouseenter");Se(()=>e.modelValue,(He,ot)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",pe("")),Oe(),!nr(He,ot)&&e.validateEvent&&(V==null||V.validate("change").catch(eo=>void 0))},{flush:"post",deep:!0}),Se(()=>L.value,He=>{He?pe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",He)}),Se(()=>a.options.entries(),()=>{var He;if(!Nt)return;const ot=((He=i.value)==null?void 0:He.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!ko(e.modelValue)||!Array.from(ot).includes(document.activeElement))&&Oe(),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value&&ke()},{flush:"post"}),Se(()=>a.hoveringIndex,He=>{st(He)&&He>-1?P.value=ee.value[He]||{}:P.value={},ee.value.forEach(ot=>{ot.hover=P.value===ot})}),Go(()=>{a.isBeforeHide||_e()});const pe=He=>{a.previousQuery!==He&&(a.previousQuery=He,e.filterable&&it(e.filterMethod)?e.filterMethod(He):e.filterable&&e.remote&&it(e.remoteMethod)&&e.remoteMethod(He),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value?et(ke):et(Te))},ke=()=>{const He=ee.value.filter(ao=>ao.visible&&!ao.disabled&&!ao.states.groupDisabled),ot=He.find(ao=>ao.created),eo=He[0];a.hoveringIndex=G(ee.value,ot||eo)},Oe=()=>{if(e.multiple)a.selectedLabel="";else{const ot=we(e.modelValue);a.selectedLabel=ot.currentLabel,a.selected=ot;return}const He=[];Ke(e.modelValue)&&e.modelValue.forEach(ot=>{He.push(we(ot))}),a.selected=He},we=He=>{let ot;const eo=vu(He).toLowerCase()==="object",ao=vu(He).toLowerCase()==="null",Po=vu(He).toLowerCase()==="undefined";for(let fr=a.cachedOptions.size-1;fr>=0;fr--){const hr=Me.value[fr];if(eo?wo(hr.value,e.valueKey)===wo(He,e.valueKey):hr.value===He){ot={value:He,currentLabel:hr.currentLabel,get isDisabled(){return hr.isDisabled}};break}}if(ot)return ot;const Pr=eo?He.label:!ao&&!Po?He:"";return{value:He,currentLabel:Pr}},Te=()=>{e.multiple?a.hoveringIndex=ee.value.findIndex(He=>a.selected.some(ot=>Or(ot)===Or(He))):a.hoveringIndex=ee.value.findIndex(He=>Or(He)===Or(a.selected))},Ne=()=>{a.selectionWidth=c.value.getBoundingClientRect().width},Ie=()=>{a.calculatorWidth=h.value.getBoundingClientRect().width},Ae=()=>{a.collapseItemWidth=g.value.getBoundingClientRect().width},xe=()=>{var He,ot;(ot=(He=d.value)==null?void 0:He.updatePopper)==null||ot.call(He)},We=()=>{var He,ot;(ot=(He=u.value)==null?void 0:He.updatePopper)==null||ot.call(He)},qe=()=>{a.inputValue.length>0&&!L.value&&(L.value=!0),pe(a.inputValue)},ye=He=>{if(a.inputValue=He.target.value,e.remote)Ye();else return qe()},Ye=Mr(()=>{qe()},oe.value),tt=He=>{nr(e.modelValue,He)||t(ro,He)},pt=He=>x3(He,ot=>!a.disabledOptions.has(ot)),dt=He=>{if(e.multiple&&He.code!==lt.delete&&He.target.value.length<=0){const ot=e.modelValue.slice(),eo=pt(ot);if(eo<0)return;const ao=ot[eo];ot.splice(eo,1),t(St,ot),tt(ot),t("remove-tag",ao)}},Y=(He,ot)=>{const eo=a.selected.indexOf(ot);if(eo>-1&&!J.value){const ao=e.modelValue.slice();ao.splice(eo,1),t(St,ao),tt(ao),t("remove-tag",ot.value)}He.stopPropagation(),no()},S=He=>{He.stopPropagation();const ot=e.multiple?[]:F.value;if(e.multiple)for(const eo of a.selected)eo.isDisabled&&ot.push(eo.value);t(St,ot),tt(ot),a.hoveringIndex=-1,L.value=!1,t("clear"),no()},A=He=>{if(e.multiple){const ot=(e.modelValue||[]).slice(),eo=G(ot,He.value);eo>-1?ot.splice(eo,1):(e.multipleLimit<=0||ot.length{X(He)})},G=(He=[],ot)=>{if(!xt(ot))return He.indexOf(ot);const eo=e.valueKey;let ao=-1;return He.some((Po,Pr)=>Kt(wo(Po,eo))===wo(ot,eo)?(ao=Pr,!0):!1),ao},X=He=>{var ot,eo,ao,Po,Pr;const Wl=Ke(He)?He[0]:He;let fr=null;if(Wl!=null&&Wl.value){const hr=ee.value.filter(ql=>ql.value===Wl.value);hr.length>0&&(fr=hr[0].$el)}if(d.value&&fr){const hr=(Po=(ao=(eo=(ot=d.value)==null?void 0:ot.popperRef)==null?void 0:eo.contentRef)==null?void 0:ao.querySelector)==null?void 0:Po.call(ao,`.${l.be("dropdown","wrap")}`);hr&&T3(hr,fr)}(Pr=y.value)==null||Pr.handleScroll()},re=He=>{a.options.set(He.value,He),a.cachedOptions.set(He.value,He),He.disabled&&a.disabledOptions.set(He.value,He)},ge=(He,ot)=>{a.options.get(He)===ot&&a.options.delete(He)},{handleCompositionStart:fe,handleCompositionUpdate:Fe,handleCompositionEnd:at}=jy(He=>ye(He)),_t=C(()=>{var He,ot;return(ot=(He=d.value)==null?void 0:He.popperRef)==null?void 0:ot.contentRef}),At=()=>{a.isBeforeHide=!1,et(()=>X(a.selected))},no=()=>{var He;(He=p.value)==null||He.focus()},bt=()=>{Sn()},Qt=He=>{S(He)},Sn=He=>{if(L.value=!1,x.value){const ot=new FocusEvent("focus",He);et(()=>T(ot))}},qo=()=>{a.inputValue.length>0?a.inputValue="":L.value=!1},xl=()=>{J.value||(M0&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:L.value=!L.value)},kl=()=>{L.value?ee.value[a.hoveringIndex]&&A(ee.value[a.hoveringIndex]):xl()},Or=He=>xt(He.value)?wo(He.value,e.valueKey):He.value,Bt=C(()=>ee.value.filter(He=>He.visible).every(He=>He.disabled)),pr=C(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),or=C(()=>e.multiple?e.collapseTags?a.selected.slice(e.maxCollapseTags):[]:[]),Nr=He=>{if(!L.value){L.value=!0;return}if(!(a.options.size===0||ce.value===0)&&!Bt.value){He==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):He==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const ot=ee.value[a.hoveringIndex];(ot.disabled===!0||ot.states.groupDisabled===!0||!ot.visible)&&Nr(He),et(()=>X(P.value))}},yo=()=>{if(!c.value)return 0;const He=window.getComputedStyle(c.value);return Number.parseFloat(He.gap||"6px")},Eo=C(()=>{const He=yo();return{maxWidth:`${g.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-He:a.selectionWidth}px`}}),rr=C(()=>({maxWidth:`${a.selectionWidth}px`})),ua=C(()=>({width:`${Math.max(a.calculatorWidth,Kte)}px`}));return e.multiple&&!Ke(e.modelValue)&&t(St,[]),!e.multiple&&Ke(e.modelValue)&&t(St,""),so(c,Ne),so(h,Ie),so(f,xe),so(w,xe),so(_,We),so(g,Ae),ft(()=>{Oe()}),{inputId:B,contentId:r,nsSelect:l,nsInput:n,states:a,isFocused:x,expanded:L,optionsArray:ee,hoverOption:P,selectSize:me,filteredOptionsCount:ce,resetCalculatorWidth:Ie,updateTooltip:xe,updateTagTooltip:We,debouncedOnInputChange:Ye,onInput:ye,deletePrevTag:dt,deleteTag:Y,deleteSelected:S,handleOptionSelect:A,scrollToOption:X,hasModelValue:Z,shouldShowPlaceholder:Ee,currentPlaceholder:De,mouseEnterEventName:ae,showClose:H,iconComponent:j,iconReverse:K,validateState:I,validateIcon:U,showNewOption:de,updateOptions:_e,collapseTagSize:Re,setSelected:Oe,selectDisabled:J,emptyText:ne,handleCompositionStart:fe,handleCompositionUpdate:Fe,handleCompositionEnd:at,onOptionCreate:re,onOptionDestroy:ge,handleMenuEnter:At,handleFocus:$,focus:no,blur:bt,handleBlur:T,handleClearClick:Qt,handleClickOutside:Sn,handleEsc:qo,toggleMenu:xl,selectOption:kl,getValueKey:Or,navigateOptions:Nr,dropdownMenuVisible:Ce,showTagList:pr,collapseTagList:or,tagStyle:Eo,collapseTagStyle:rr,inputStyle:ua,popperRef:_t,inputRef:p,tooltipRef:d,tagTooltipRef:u,calculatorRef:h,prefixRef:v,suffixRef:m,selectRef:i,wrapperRef:w,selectionRef:c,scrollbarRef:y,menuRef:f,tagMenuRef:_,collapseItemRef:g}};var Wte=N({name:"ElOptions",setup(e,{slots:t}){const o=Ge(ls);let r=[];return()=>{var l,n;const a=(l=t.default)==null?void 0:l.call(t),i=[];function c(d){Ke(d)&&d.forEach(u=>{var p,h,v,m;const f=(p=(u==null?void 0:u.type)||{})==null?void 0:p.name;f==="ElOptionGroup"?c(!ut(u.children)&&!Ke(u.children)&&it((h=u.children)==null?void 0:h.default)?(v=u.children)==null?void 0:v.default():u.children):f==="ElOption"?i.push((m=u.props)==null?void 0:m.value):Ke(u.children)&&c(u.children)})}return a.length&&c((n=a[0])==null?void 0:n.children),nr(i,r)||(r=i,o&&(o.states.optionValues=i)),a}}});const qte=Pe({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Oo,effect:{type:ue(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:ue(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Uo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Xt,default:hn},fitInputWidth:Boolean,suffixIcon:{type:Xt,default:Pl},tagType:{...fp.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:ue(String),values:Va,default:"bottom-start"},fallbackPlacements:{type:ue(Array),default:["bottom-start","top-start","right","left"]},...Xi,...Zo(["ariaLabel"])}),Ky="ElSelect",Yte=N({name:Ky,componentName:Ky,components:{ElInput:cr,ElSelectMenu:jte,ElOption:Jv,ElOptions:Wte,ElTag:Pc,ElScrollbar:wn,ElTooltip:ur,ElIcon:Ze},directives:{ClickOutside:xn},props:qte,emits:[St,ro,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=Ute(e,t);return zt(ls,Dt({props:e,states:o.states,optionsArray:o.optionsArray,handleOptionSelect:o.handleOptionSelect,onOptionCreate:o.onOptionCreate,onOptionDestroy:o.onOptionDestroy,selectRef:o.selectRef,setSelected:o.setSelected})),{...o}}}),Gte=["id","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Xte=["textContent"],Zte={key:1};function Jte(e,t,o,r,l,n){const a=nt("el-tag"),i=nt("el-tooltip"),c=nt("el-icon"),d=nt("el-option"),u=nt("el-options"),p=nt("el-scrollbar"),h=nt("el-select-menu"),v=Iu("click-outside");return mt((b(),M("div",{ref:"selectRef",class:O([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[As(e.mouseEnterEventName)]:t[16]||(t[16]=m=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=m=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=ct((...m)=>e.toggleMenu&&e.toggleMenu(...m),["prevent","stop"]))},[te(i,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=m=>e.states.isBeforeHide=!1)},{default:le(()=>{var m;return[E("div",{ref:"wrapperRef",class:O([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(b(),M("div",{key:0,ref:"prefixRef",class:O(e.nsSelect.e("prefix"))},[be(e.$slots,"prefix")],2)):se("v-if",!0),E("div",{ref:"selectionRef",class:O([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?be(e.$slots,"tag",{key:0},()=>[(b(!0),M(Qe,null,It(e.showTagList,f=>(b(),M("div",{key:e.getValueKey(f),class:O(e.nsSelect.e("selected-item"))},[te(a,{closable:!e.selectDisabled&&!f.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.tagStyle),onClose:_=>e.deleteTag(_,f)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:f.currentLabel,value:f.value},()=>[Ct($e(f.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(b(),he(i,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:le(()=>[E("div",{ref:"collapseItemRef",class:O(e.nsSelect.e("selected-item"))},[te(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.collapseTagStyle)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))}," + "+$e(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:le(()=>[E("div",{ref:"tagMenuRef",class:O(e.nsSelect.e("selection"))},[(b(!0),M(Qe,null,It(e.collapseTagList,f=>(b(),M("div",{key:e.getValueKey(f),class:O(e.nsSelect.e("selected-item"))},[te(a,{class:"in-tooltip",closable:!e.selectDisabled&&!f.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:_=>e.deleteTag(_,f)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:f.currentLabel,value:f.value},()=>[Ct($e(f.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):se("v-if",!0)]):se("v-if",!0),e.selectDisabled?se("v-if",!0):(b(),M("div",{key:1,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[mt(E("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=f=>e.states.inputValue=f),type:"text",name:e.name,class:O([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Je(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...f)=>e.handleFocus&&e.handleFocus(...f)),onBlur:t[2]||(t[2]=(...f)=>e.handleBlur&&e.handleBlur(...f)),onKeydown:[t[3]||(t[3]=Gt(ct(f=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=Gt(ct(f=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=Gt(ct((...f)=>e.handleEsc&&e.handleEsc(...f),["stop","prevent"]),["esc"])),t[6]||(t[6]=Gt(ct((...f)=>e.selectOption&&e.selectOption(...f),["stop","prevent"]),["enter"])),t[7]||(t[7]=Gt(ct((...f)=>e.deletePrevTag&&e.deletePrevTag(...f),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...f)=>e.handleCompositionStart&&e.handleCompositionStart(...f)),onCompositionupdate:t[9]||(t[9]=(...f)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...f)),onCompositionend:t[10]||(t[10]=(...f)=>e.handleCompositionEnd&&e.handleCompositionEnd(...f)),onInput:t[11]||(t[11]=(...f)=>e.onInput&&e.onInput(...f)),onClick:t[12]||(t[12]=ct((...f)=>e.toggleMenu&&e.toggleMenu(...f),["stop"]))},null,46,Gte),[[r0,e.states.inputValue]]),e.filterable?(b(),M("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:O(e.nsSelect.e("input-calculator")),textContent:$e(e.states.inputValue)},null,10,Xte)):se("v-if",!0)],2)),e.shouldShowPlaceholder?(b(),M("div",{key:2,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?be(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[E("span",null,$e(e.currentPlaceholder),1)]):(b(),M("span",Zte,$e(e.currentPlaceholder),1))],2)):se("v-if",!0)],2),E("div",{ref:"suffixRef",class:O(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(b(),he(c,{key:0,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),e.showClose&&e.clearIcon?(b(),he(c,{key:1,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:le(()=>[(b(),he(Et(e.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.validateState&&e.validateIcon?(b(),he(c,{key:2,class:O([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:le(()=>[(b(),he(Et(e.validateIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)]}),content:le(()=>[te(h,{ref:"menuRef"},{default:le(()=>[e.$slots.header?(b(),M("div",{key:0,class:O(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=ct(()=>{},["stop"]))},[be(e.$slots,"header")],2)):se("v-if",!0),mt(te(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:O([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:le(()=>[e.showNewOption?(b(),he(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):se("v-if",!0),te(u,null,{default:le(()=>[be(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Lt,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(b(),M("div",{key:1,class:O(e.nsSelect.be("dropdown","loading"))},[be(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(b(),M("div",{key:2,class:O(e.nsSelect.be("dropdown","empty"))},[be(e.$slots,"empty",{},()=>[E("span",null,$e(e.emptyText),1)])],2)):se("v-if",!0),e.$slots.footer?(b(),M("div",{key:3,class:O(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=ct(()=>{},["stop"]))},[be(e.$slots,"footer")],2)):se("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],16)),[[v,e.handleClickOutside,e.popperRef]])}var Qte=Le(Yte,[["render",Jte],["__file","select.vue"]]);const eoe=N({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=ze("select"),o=D(null),r=wt(),l=D([]);zt(Fy,Dt({...Bo(e)}));const n=C(()=>l.value.some(d=>d.visible===!0)),a=d=>{var u,p;return((u=d.type)==null?void 0:u.name)==="ElOption"&&!!((p=d.component)!=null&&p.proxy)},i=d=>{const u=Gn(d),p=[];return u.forEach(h=>{var v,m;a(h)?p.push(h.component.proxy):(v=h.children)!=null&&v.length?p.push(...i(h.children)):(m=h.component)!=null&&m.subTree&&p.push(...i(h.component.subTree))}),p},c=()=>{l.value=i(r.subTree)};return ft(()=>{c()}),t_(o,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:o,visible:n,ns:t}}});function toe(e,t,o,r,l,n){return mt((b(),M("ul",{ref:"groupRef",class:O(e.ns.be("group","wrap"))},[E("li",{class:O(e.ns.be("group","title"))},$e(e.label),3),E("li",null,[E("ul",{class:O(e.ns.b("group"))},[be(e.$slots,"default")],2)])],2)),[[Lt,e.visible]])}var Uy=Le(eoe,[["render",toe],["__file","option-group.vue"]]);const Za=yt(Qte,{Option:Jv,OptionGroup:Uy}),kp=co(Jv),ooe=co(Uy),Qv=()=>Ge(Hy,{}),roe=Pe({pageSize:{type:Number,required:!0},pageSizes:{type:ue(Array),default:()=>uo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Rl}}),loe=N({...N({name:"ElPaginationSizes"}),props:roe,emits:["page-size-change"],setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("pagination"),n=Qv(),a=D(o.pageSize);Se(()=>o.pageSizes,(d,u)=>{if(!nr(d,u)&&Array.isArray(d)){const p=d.includes(o.pageSize)?o.pageSize:o.pageSizes[0];t("page-size-change",p)}}),Se(()=>o.pageSize,d=>{a.value=d});const i=C(()=>o.pageSizes);function c(d){var u;d!==a.value&&(a.value=d,(u=n.handleSizeChange)==null||u.call(n,Number(d)))}return(d,u)=>(b(),M("span",{class:O(s(l).e("sizes"))},[te(s(Za),{"model-value":a.value,disabled:d.disabled,"popper-class":d.popperClass,size:d.size,teleported:d.teleported,"validate-event":!1,onChange:c},{default:le(()=>[(b(!0),M(Qe,null,It(s(i),p=>(b(),he(s(kp),{key:p,value:p,label:p+s(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var noe=Le(loe,[["__file","sizes.vue"]]);const aoe=Pe({size:{type:String,values:Rl}}),ioe=["disabled"],soe=N({...N({name:"ElPaginationJumper"}),props:aoe,setup(e){const{t}=Rt(),o=ze("pagination"),{pageCount:r,disabled:l,currentPage:n,changeEvent:a}=Qv(),i=D(),c=C(()=>{var p;return(p=i.value)!=null?p:n==null?void 0:n.value});function d(p){i.value=p?+p:""}function u(p){p=Math.trunc(+p),a==null||a(p),i.value=void 0}return(p,h)=>(b(),M("span",{class:O(s(o).e("jump")),disabled:s(l)},[E("span",{class:O([s(o).e("goto")])},$e(s(t)("el.pagination.goto")),3),te(s(cr),{size:p.size,class:O([s(o).e("editor"),s(o).is("in-pagination")]),min:1,max:s(r),disabled:s(l),"model-value":s(c),"validate-event":!1,"aria-label":s(t)("el.pagination.page"),type:"number","onUpdate:modelValue":d,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),E("span",{class:O([s(o).e("classifier")])},$e(s(t)("el.pagination.pageClassifier")),3)],10,ioe))}});var coe=Le(soe,[["__file","jumper.vue"]]);const uoe=Pe({total:{type:Number,default:1e3}}),doe=["disabled"],poe=N({...N({name:"ElPaginationTotal"}),props:uoe,setup(e){const{t}=Rt(),o=ze("pagination"),{disabled:r}=Qv();return(l,n)=>(b(),M("span",{class:O(s(o).e("total")),disabled:s(r)},$e(s(t)("el.pagination.total",{total:l.total})),11,doe))}});var foe=Le(poe,[["__file","total.vue"]]);const hoe=Pe({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),voe=["onKeyup"],moe=["aria-current","aria-label","tabindex"],goe=["tabindex","aria-label"],boe=["aria-current","aria-label","tabindex"],_oe=["tabindex","aria-label"],woe=["aria-current","aria-label","tabindex"],yoe=N({...N({name:"ElPaginationPager"}),props:hoe,emits:["change"],setup(e,{emit:t}){const o=e,r=ze("pager"),l=ze("icon"),{t:n}=Rt(),a=D(!1),i=D(!1),c=D(!1),d=D(!1),u=D(!1),p=D(!1),h=C(()=>{const x=o.pagerCount,$=(x-1)/2,T=Number(o.currentPage),L=Number(o.pageCount);let P=!1,R=!1;L>x&&(T>x-$&&(P=!0),T["more","btn-quickprev",l.b(),r.is("disabled",o.disabled)]),m=C(()=>["more","btn-quicknext",l.b(),r.is("disabled",o.disabled)]),f=C(()=>o.disabled?-1:0);Go(()=>{const x=(o.pagerCount-1)/2;a.value=!1,i.value=!1,o.pageCount>o.pagerCount&&(o.currentPage>o.pagerCount-x&&(a.value=!0),o.currentPageL&&(T=L)),T!==P&&t("change",T)}return(x,$)=>(b(),M("ul",{class:O(s(r).b()),onClick:w,onKeyup:Gt(y,["enter"])},[x.pageCount>0?(b(),M("li",{key:0,class:O([[s(r).is("active",x.currentPage===1),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===1,"aria-label":s(n)("el.pagination.currentPage",{pager:1}),tabindex:s(f)}," 1 ",10,moe)):se("v-if",!0),a.value?(b(),M("li",{key:1,class:O(s(v)),tabindex:s(f),"aria-label":s(n)("el.pagination.prevPages",{pager:x.pagerCount-2}),onMouseenter:$[0]||($[0]=T=>_(!0)),onMouseleave:$[1]||($[1]=T=>c.value=!1),onFocus:$[2]||($[2]=T=>g(!0)),onBlur:$[3]||($[3]=T=>u.value=!1)},[(c.value||u.value)&&!x.disabled?(b(),he(s(Ra),{key:0})):(b(),he(s(ph),{key:1}))],42,goe)):se("v-if",!0),(b(!0),M(Qe,null,It(s(h),T=>(b(),M("li",{key:T,class:O([[s(r).is("active",x.currentPage===T),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===T,"aria-label":s(n)("el.pagination.currentPage",{pager:T}),tabindex:s(f)},$e(T),11,boe))),128)),i.value?(b(),M("li",{key:2,class:O(s(m)),tabindex:s(f),"aria-label":s(n)("el.pagination.nextPages",{pager:x.pagerCount-2}),onMouseenter:$[4]||($[4]=T=>_()),onMouseleave:$[5]||($[5]=T=>d.value=!1),onFocus:$[6]||($[6]=T=>g()),onBlur:$[7]||($[7]=T=>p.value=!1)},[(d.value||p.value)&&!x.disabled?(b(),he(s(La),{key:0})):(b(),he(s(ph),{key:1}))],42,_oe)):se("v-if",!0),x.pageCount>1?(b(),M("li",{key:3,class:O([[s(r).is("active",x.currentPage===x.pageCount),s(r).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===x.pageCount,"aria-label":s(n)("el.pagination.currentPage",{pager:x.pageCount}),tabindex:s(f)},$e(x.pageCount),11,woe)):se("v-if",!0)],42,voe))}});var xoe=Le(yoe,[["__file","pager.vue"]]);const kr=e=>typeof e!="number",koe=Pe({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>st(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:ue(Array),default:()=>uo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Xt,default:()=>fn},nextText:{type:String,default:""},nextIcon:{type:Xt,default:()=>ir},teleported:{type:Boolean,default:!0},small:Boolean,size:Oo,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),Coe={"update:current-page":e=>st(e),"update:page-size":e=>st(e),"size-change":e=>st(e),change:(e,t)=>st(e)&&st(t),"current-change":e=>st(e),"prev-click":e=>st(e),"next-click":e=>st(e)},Wy="ElPagination";var Soe=N({name:Wy,props:koe,emits:Coe,setup(e,{emit:t,slots:o}){const{t:r}=Rt(),l=ze("pagination"),n=wt().vnode.props||{},a=C(()=>e.small?"small":e==null?void 0:e.size);Lo({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},C(()=>!!e.small));const i="onUpdate:currentPage"in n||"onUpdate:current-page"in n||"onCurrentChange"in n,c="onUpdate:pageSize"in n||"onUpdate:page-size"in n||"onSizeChange"in n,d=C(()=>{if(kr(e.total)&&kr(e.pageCount)||!kr(e.currentPage)&&!i)return!1;if(e.layout.includes("sizes")){if(kr(e.pageCount)){if(!kr(e.total)&&!kr(e.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),u=D(kr(e.defaultPageSize)?10:e.defaultPageSize),p=D(kr(e.defaultCurrentPage)?1:e.defaultCurrentPage),h=C({get(){return kr(e.pageSize)?u.value:e.pageSize},set(x){kr(e.pageSize)&&(u.value=x),c&&(t("update:page-size",x),t("size-change",x))}}),v=C(()=>{let x=0;return kr(e.pageCount)?kr(e.total)||(x=Math.max(1,Math.ceil(e.total/h.value))):x=e.pageCount,x}),m=C({get(){return kr(e.currentPage)?p.value:e.currentPage},set(x){let $=x;x<1?$=1:x>v.value&&($=v.value),kr(e.currentPage)&&(p.value=$),i&&(t("update:current-page",$),t("current-change",$))}});Se(v,x=>{m.value>x&&(m.value=x)}),Se([m,h],x=>{t("change",...x)},{flush:"post"});function f(x){m.value=x}function _(x){h.value=x;const $=v.value;m.value>$&&(m.value=$)}function g(){e.disabled||(m.value-=1,t("prev-click",m.value))}function y(){e.disabled||(m.value+=1,t("next-click",m.value))}function w(x,$){x&&(x.props||(x.props={}),x.props.class=[x.props.class,$].join(" "))}return zt(Hy,{pageCount:v,disabled:C(()=>e.disabled),currentPage:m,changeEvent:f,handleSizeChange:_}),()=>{var x,$;if(!d.value)return r("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&v.value<=1)return null;const T=[],L=[],P=rt("div",{class:l.e("rightwrapper")},L),R={prev:rt(zte,{disabled:e.disabled,currentPage:m.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:g}),jumper:rt(coe,{size:a.value}),pager:rt(xoe,{currentPage:m.value,pageCount:v.value,pagerCount:e.pagerCount,onChange:f,disabled:e.disabled}),next:rt(Rte,{disabled:e.disabled,currentPage:m.value,pageCount:v.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:y}),sizes:rt(noe,{pageSize:h.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:a.value}),slot:($=(x=o==null?void 0:o.default)==null?void 0:x.call(o))!=null?$:null,total:rt(foe,{total:kr(e.total)?0:e.total})},V=e.layout.split(",").map(F=>F.trim());let B=!1;return V.forEach(F=>{if(F==="->"){B=!0;return}B?L.push(R[F]):T.push(R[F])}),w(T[0],l.is("first")),w(T[T.length-1],l.is("last")),B&&L.length>0&&(w(L[0],l.is("first")),w(L[L.length-1],l.is("last")),T.push(P)),rt("div",{class:[l.b(),l.is("background",e.background),l.m(a.value)]},T)}}});const Eoe=yt(Soe),Toe=Pe({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:cv,default:"primary"},cancelButtonType:{type:String,values:cv,default:"text"},icon:{type:Xt,default:()=>H3},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:Uo.teleported,persistent:Uo.persistent,width:{type:[String,Number],default:150}}),$oe=N({...N({name:"ElPopconfirm"}),props:Toe,emits:{confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("popconfirm"),n=D(),a=()=>{var h,v;(v=(h=n.value)==null?void 0:h.onClose)==null||v.call(h)},i=C(()=>({width:go(o.width)})),c=h=>{t("confirm",h),a()},d=h=>{t("cancel",h),a()},u=C(()=>o.confirmButtonText||r("el.popconfirm.confirmButtonText")),p=C(()=>o.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(h,v)=>(b(),he(s(ur),Mt({ref_key:"tooltipRef",ref:n,trigger:"click",effect:"light"},h.$attrs,{"popper-class":`${s(l).namespace.value}-popover`,"popper-style":s(i),teleported:h.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":h.hideAfter,persistent:h.persistent}),{content:le(()=>[E("div",{class:O(s(l).b())},[E("div",{class:O(s(l).e("main"))},[!h.hideIcon&&h.icon?(b(),he(s(Ze),{key:0,class:O(s(l).e("icon")),style:Je({color:h.iconColor})},{default:le(()=>[(b(),he(Et(h.icon)))]),_:1},8,["class","style"])):se("v-if",!0),Ct(" "+$e(h.title),1)],2),E("div",{class:O(s(l).e("action"))},[te(s(Wo),{size:"small",type:h.cancelButtonType==="text"?"":h.cancelButtonType,text:h.cancelButtonType==="text",onClick:d},{default:le(()=>[Ct($e(s(p)),1)]),_:1},8,["type","text"]),te(s(Wo),{size:"small",type:h.confirmButtonType==="text"?"":h.confirmButtonType,text:h.confirmButtonType==="text",onClick:c},{default:le(()=>[Ct($e(s(u)),1)]),_:1},8,["type","text"])],2)],2)]),default:le(()=>[h.$slots.reference?be(h.$slots,"reference",{key:0}):se("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var Moe=Le($oe,[["__file","popconfirm.vue"]]);const Aoe=yt(Moe),zoe=Pe({trigger:Nc.trigger,placement:yp.placement,disabled:Nc.disabled,visible:Uo.visible,transition:Uo.transition,popperOptions:yp.popperOptions,tabindex:yp.tabindex,content:Uo.content,popperStyle:Uo.popperStyle,popperClass:Uo.popperClass,enterable:{...Uo.enterable,default:!0},effect:{...Uo.effect,default:"light"},teleported:Uo.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Ioe={"update:visible":e=>Co(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Ooe="onUpdate:visible",Noe=N({...N({name:"ElPopover"}),props:zoe,emits:Ioe,setup(e,{expose:t,emit:o}){const r=e,l=C(()=>r[Ooe]),n=ze("popover"),a=D(),i=C(()=>{var _;return(_=s(a))==null?void 0:_.popperRef}),c=C(()=>[{width:go(r.width)},r.popperStyle]),d=C(()=>[n.b(),r.popperClass,{[n.m("plain")]:!!r.content}]),u=C(()=>r.transition===`${n.namespace.value}-fade-in-linear`),p=()=>{var _;(_=a.value)==null||_.hide()},h=()=>{o("before-enter")},v=()=>{o("before-leave")},m=()=>{o("after-enter")},f=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:i,hide:p}),(_,g)=>(b(),he(s(ur),Mt({ref_key:"tooltipRef",ref:a},_.$attrs,{trigger:_.trigger,placement:_.placement,disabled:_.disabled,visible:_.visible,transition:_.transition,"popper-options":_.popperOptions,tabindex:_.tabindex,content:_.content,offset:_.offset,"show-after":_.showAfter,"hide-after":_.hideAfter,"auto-close":_.autoClose,"show-arrow":_.showArrow,"aria-label":_.title,effect:_.effect,enterable:_.enterable,"popper-class":s(d),"popper-style":s(c),teleported:_.teleported,persistent:_.persistent,"gpu-acceleration":s(u),"onUpdate:visible":s(l),onBeforeShow:h,onBeforeHide:v,onShow:m,onHide:f}),{content:le(()=>[_.title?(b(),M("div",{key:0,class:O(s(n).e("title")),role:"title"},$e(_.title),3)):se("v-if",!0),be(_.$slots,"default",{},()=>[Ct($e(_.content),1)])]),default:le(()=>[_.$slots.reference?be(_.$slots,"reference",{key:0}):se("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var Poe=Le(Noe,[["__file","popover.vue"]]);const qy=(e,t)=>{const o=t.arg||t.value,r=o==null?void 0:o.popperRef;r&&(r.triggerRef=e)};var Roe={mounted(e,t){qy(e,t)},updated(e,t){qy(e,t)}};const Yy=rF(Roe,"popover"),Loe=yt(Poe,{directive:Yy}),Boe=Pe({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:ue(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:ue([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:ue(Function),default:e=>`${e}%`}}),Voe=["aria-valuenow"],Doe={viewBox:"0 0 100 100"},Hoe=["d","stroke","stroke-linecap","stroke-width"],Foe=["d","stroke","opacity","stroke-linecap","stroke-width"],joe={key:0},Koe=N({...N({name:"ElProgress"}),props:Boe,setup(e){const t=e,o={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=ze("progress"),l=C(()=>{const w={width:`${t.percentage}%`,animationDuration:`${t.duration}s`},x=y(t.percentage);return x.includes("gradient")?w.background=x:w.backgroundColor=x,w}),n=C(()=>(t.strokeWidth/t.width*100).toFixed(1)),a=C(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(n.value)/2}`,10):0),i=C(()=>{const w=a.value,x=t.type==="dashboard";return` M 50 50 m 0 ${x?"":"-"}${w} a ${w} ${w} 0 1 1 0 ${x?"-":""}${w*2} a ${w} ${w} 0 1 1 0 ${x?"":"-"}${w*2} - `}),c=C(()=>2*Math.PI*a.value),d=C(()=>t.type==="dashboard"?.75:1),u=C(()=>`${-1*c.value*(1-d.value)/2}px`),p=C(()=>({strokeDasharray:`${c.value*d.value}px, ${c.value}px`,strokeDashoffset:u.value})),h=C(()=>({strokeDasharray:`${c.value*d.value*(t.percentage/100)}px, ${c.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),v=C(()=>{let w;return t.color?w=y(t.percentage):w=o[t.status]||o.default,w}),m=C(()=>t.status==="warning"?mc:t.type==="line"?t.status==="success"?zd:hn:t.status==="success"?Li:Jr),f=C(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),_=C(()=>t.format(t.percentage));function g(w){const x=100/w.length;return w.map((T,R)=>ut(T)?{color:T,percentage:(R+1)*x}:T).sort((T,R)=>T.percentage-R.percentage)}const y=w=>{var x;const{color:$}=t;if(it($))return $(w);if(ut($))return $;{const T=g($);for(const R of T)if(R.percentage>w)return R.color;return(x=T[T.length-1])==null?void 0:x.color}};return(w,x)=>(b(),M("div",{class:O([s(r).b(),s(r).m(w.type),s(r).is(w.status),{[s(r).m("without-text")]:!w.showText,[s(r).m("text-inside")]:w.textInside}]),role:"progressbar","aria-valuenow":w.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[w.type==="line"?(b(),M("div",{key:0,class:O(s(r).b("bar"))},[E("div",{class:O(s(r).be("bar","outer")),style:Je({height:`${w.strokeWidth}px`})},[E("div",{class:O([s(r).be("bar","inner"),{[s(r).bem("bar","inner","indeterminate")]:w.indeterminate},{[s(r).bem("bar","inner","striped")]:w.striped},{[s(r).bem("bar","inner","striped-flow")]:w.stripedFlow}]),style:Je(s(l))},[(w.showText||w.$slots.default)&&w.textInside?(b(),M("div",{key:0,class:O(s(r).be("bar","innerText"))},[be(w.$slots,"default",{percentage:w.percentage},()=>[E("span",null,$e(s(_)),1)])],2)):se("v-if",!0)],6)],6)],2)):(b(),M("div",{key:1,class:O(s(r).b("circle")),style:Je({height:`${w.width}px`,width:`${w.width}px`})},[(b(),M("svg",Hoe,[E("path",{class:O(s(r).be("circle","track")),d:s(i),stroke:`var(${s(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":w.strokeLinecap,"stroke-width":s(n),fill:"none",style:Je(s(p))},null,14,Foe),E("path",{class:O(s(r).be("circle","path")),d:s(i),stroke:s(v),fill:"none",opacity:w.percentage?1:0,"stroke-linecap":w.strokeLinecap,"stroke-width":s(n),style:Je(s(h))},null,14,joe)]))],6)),(w.showText||w.$slots.default)&&!w.textInside?(b(),M("div",{key:2,class:O(s(r).e("text")),style:Je({fontSize:`${s(f)}px`})},[be(w.$slots,"default",{percentage:w.percentage},()=>[w.status?(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(s(m))))]),_:1})):(b(),M("span",Koe,$e(s(_)),1))])],6)):se("v-if",!0)],10,Doe))}});var Woe=Le(Uoe,[["__file","progress.vue"]]);const Xy=yt(Woe),qoe=Pe({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:ue([Array,Object]),default:()=>uo(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:ue([Array,Object]),default:()=>[vc,vc,vc]},voidIcon:{type:Xt,default:()=>G3},disabledVoidIcon:{type:Xt,default:()=>vc},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:ue(Array),default:()=>uo(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Oo,label:{type:String,default:void 0},clearable:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),Yoe={[ro]:e=>st(e),[St]:e=>st(e)},Goe=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],Xoe=["onMousemove","onClick"],Zoe=N({...N({name:"ElRate"}),props:qoe,emits:Yoe,setup(e,{expose:t,emit:o}){const r=e;function l(H,F){const K=oe=>xt(oe),I=Object.keys(F).map(oe=>+oe).filter(oe=>{const ne=F[oe];return(K(ne)?ne.excluded:!1)?Hoe-ne),U=F[I[0]];return K(U)&&U.value||U}const n=Ge(Ka,void 0),a=Ge(Hl,void 0),i=So(),c=ze("rate"),{inputId:d,isLabeledByFormItem:u}=bl(r,{formItemContext:a}),p=D(r.modelValue),h=D(-1),v=D(!0),m=C(()=>[c.b(),c.m(i.value)]),f=C(()=>r.disabled||(n==null?void 0:n.disabled)),_=C(()=>c.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":x.value})),g=C(()=>{let H="";return r.showScore?H=r.scoreTemplate.replace(/\{\s*value\s*\}/,f.value?`${r.modelValue}`:`${p.value}`):r.showText&&(H=r.texts[Math.ceil(p.value)-1]),H}),y=C(()=>r.modelValue*100-Math.floor(r.modelValue)*100),w=C(()=>Ke(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),x=C(()=>{const H=l(p.value,w.value);return xt(H)?"":H}),$=C(()=>{let H="";return f.value?H=`${y.value}%`:r.allowHalf&&(H="50%"),{color:x.value,width:H}}),T=C(()=>{let H=Ke(r.icons)?[...r.icons]:{...r.icons};return H=Nn(H),Ke(H)?{[r.lowThreshold]:H[0],[r.highThreshold]:{value:H[1],excluded:!0},[r.max]:H[2]}:H}),R=C(()=>l(r.modelValue,T.value)),P=C(()=>f.value?ut(r.disabledVoidIcon)?r.disabledVoidIcon:Nn(r.disabledVoidIcon):ut(r.voidIcon)?r.voidIcon:Nn(r.voidIcon)),L=C(()=>l(p.value,T.value));function V(H){const F=f.value&&y.value>0&&H-1r.modelValue,K=r.allowHalf&&v.value&&H-.5<=p.value&&H>p.value;return F||K}function B(H){r.clearable&&H===r.modelValue&&(H=0),o(St,H),r.modelValue!==H&&o("change",H)}function j(H){f.value||(r.allowHalf&&v.value?B(p.value):B(H))}function te(H){if(f.value)return;let F=p.value;const K=H.code;return K===lt.up||K===lt.right?(r.allowHalf?F+=.5:F+=1,H.stopPropagation(),H.preventDefault()):(K===lt.left||K===lt.down)&&(r.allowHalf?F-=.5:F-=1,H.stopPropagation(),H.preventDefault()),F=F<0?0:F,F=F>r.max?r.max:F,o(St,F),o("change",F),F}function J(H,F){if(!f.value){if(r.allowHalf&&F){let K=F.target;Xr(K,c.e("item"))&&(K=K.querySelector(`.${c.e("icon")}`)),(K.clientWidth===0||Xr(K,c.e("decimal")))&&(K=K.parentNode),v.value=F.offsetX*2<=K.clientWidth,p.value=v.value?H-.5:H}else p.value=H;h.value=H}}function Z(){f.value||(r.allowHalf&&(v.value=r.modelValue!==Math.floor(r.modelValue)),p.value=r.modelValue,h.value=-1)}return Se(()=>r.modelValue,H=>{p.value=H,v.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||o(St,0),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-rate",ref:"https://element-plus.org/en-US/component/rate.html"},C(()=>!!r.label)),t({setCurrentValue:J,resetCurrentValue:Z}),(H,F)=>{var K;return b(),M("div",{id:s(d),class:O([s(m),s(c).is("disabled",s(f))]),role:"slider","aria-label":s(u)?void 0:H.label||H.ariaLabel||"rating","aria-labelledby":s(u)?(K=s(a))==null?void 0:K.labelId:void 0,"aria-valuenow":p.value,"aria-valuetext":s(g)||void 0,"aria-valuemin":"0","aria-valuemax":H.max,tabindex:"0",style:Je(s(_)),onKeydown:te},[(b(!0),M(Qe,null,It(H.max,(I,U)=>(b(),M("span",{key:U,class:O(s(c).e("item")),onMousemove:oe=>J(I,oe),onMouseleave:Z,onClick:oe=>j(I)},[ee(s(Ze),{class:O([s(c).e("icon"),{hover:h.value===I},s(c).is("active",I<=p.value)])},{default:le(()=>[V(I)?se("v-if",!0):(b(),M(Qe,{key:0},[mt((b(),he(Et(s(L)),null,null,512)),[[Lt,I<=p.value]]),mt((b(),he(Et(s(P)),null,null,512)),[[Lt,!(I<=p.value)]])],64)),V(I)?(b(),M(Qe,{key:1},[(b(),he(Et(s(P)),{class:O([s(c).em("decimal","box")])},null,8,["class"])),ee(s(Ze),{style:Je(s($)),class:O([s(c).e("icon"),s(c).e("decimal")])},{default:le(()=>[(b(),he(Et(s(R))))]),_:1},8,["style","class"])],64)):se("v-if",!0)]),_:2},1032,["class"])],42,Xoe))),128)),H.showText||H.showScore?(b(),M("span",{key:0,class:O(s(c).e("text")),style:Je({color:H.textColor})},$e(s(g)),7)):se("v-if",!0)],46,Goe)}}});var Joe=Le(Zoe,[["__file","rate.vue"]]);const Qoe=yt(Joe),ns={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Zy={[ns.success]:N3,[ns.warning]:mc,[ns.error]:Id,[ns.info]:Od},ere=Pe({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),tre=N({...N({name:"ElResult"}),props:ere,setup(e){const t=e,o=ze("result"),r=C(()=>{const l=t.icon,n=l&&ns[l]?ns[l]:"icon-info",a=Zy[n]||Zy["icon-info"];return{class:n,component:a}});return(l,n)=>(b(),M("div",{class:O(s(o).b())},[E("div",{class:O(s(o).e("icon"))},[be(l.$slots,"icon",{},()=>[s(r).component?(b(),he(Et(s(r).component),{key:0,class:O(s(r).class)},null,8,["class"])):se("v-if",!0)])],2),l.title||l.$slots.title?(b(),M("div",{key:0,class:O(s(o).e("title"))},[be(l.$slots,"title",{},()=>[E("p",null,$e(l.title),1)])],2)):se("v-if",!0),l.subTitle||l.$slots["sub-title"]?(b(),M("div",{key:1,class:O(s(o).e("subtitle"))},[be(l.$slots,"sub-title",{},()=>[E("p",null,$e(l.subTitle),1)])],2)):se("v-if",!0),l.$slots.extra?(b(),M("div",{key:2,class:O(s(o).e("extra"))},[be(l.$slots,"extra")],2)):se("v-if",!0)],2))}});var ore=Le(tre,[["__file","result.vue"]]);const rre=yt(ore);var Jy=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function lre(e,t){return!!(e===t||Jy(e)&&Jy(t))}function nre(e,t){if(e.length!==t.length)return!1;for(var o=0;o{const t=wt().proxy.$props;return C(()=>{const o=(r,l,n)=>({});return t.perfMode?_d(o):are(o)})},t2=50,Sp="itemRendered",Ep="scroll",as="forward",Tp="backward",ll="auto",$p="smart",Hc="start",Kl="center",Fc="end",is="horizontal",o2="vertical",ire="ltr",ss="rtl",jc="negative",r2="positive-ascending",l2="positive-descending",sre={[is]:"left",[o2]:"top"},cre=20,ure={[is]:"deltaX",[o2]:"deltaY"},dre=({atEndEdge:e,atStartEdge:t,layout:o},r)=>{let l,n=0;const a=c=>c<0&&t.value||c>0&&e.value;return{hasReachedEdge:a,onWheel:c=>{Pa(l);const d=c[ure[o.value]];a(n)&&a(n+d)||(n+=d,i_()||c.preventDefault(),l=Xn(()=>{r(n),n=0}))}}},n2=vl({type:ue([Number,Function]),required:!0}),a2=vl({type:Number}),i2=vl({type:Number,default:2}),pre=vl({type:String,values:["ltr","rtl"],default:"ltr"}),s2=vl({type:Number,default:0}),Mp=vl({type:Number,required:!0}),e8=vl({type:String,values:["horizontal","vertical"],default:o2}),t8=Pe({className:{type:String,default:""},containerElement:{type:ue([String,Object]),default:"div"},data:{type:ue(Array),default:()=>uo([])},direction:pre,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:ue([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),o8=Pe({cache:i2,estimatedItemSize:a2,layout:e8,initScrollOffset:s2,total:Mp,itemSize:n2,...t8}),c2={type:Number,default:6},r8={type:Number,default:0},l8={type:Number,default:2},Ja=Pe({columnCache:i2,columnWidth:n2,estimatedColumnWidth:a2,estimatedRowHeight:a2,initScrollLeft:s2,initScrollTop:s2,itemKey:{type:ue(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:i2,rowHeight:n2,totalColumn:Mp,totalRow:Mp,hScrollbarSize:c2,vScrollbarSize:c2,scrollbarStartGap:r8,scrollbarEndGap:l8,role:String,...t8}),n8=Pe({alwaysOn:Boolean,class:String,layout:e8,total:Mp,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:c2,startGap:r8,endGap:l8,visible:Boolean}),Qa=(e,t)=>ee===ire||e===ss||e===is,a8=e=>e===ss;let cs=null;function Ap(e=!1){if(cs===null||e){const t=document.createElement("div"),o=t.style;o.width="50px",o.height="50px",o.overflow="scroll",o.direction="rtl";const r=document.createElement("div"),l=r.style;return l.width="100px",l.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?cs=l2:(t.scrollLeft=1,t.scrollLeft===0?cs=jc:cs=r2),document.body.removeChild(t),cs}return cs}function fre({move:e,size:t,bar:o},r){const l={},n=`translate${o.axis}(${e}px)`;return l[o.size]=t,l.transform=n,l.msTransform=n,l.webkitTransform=n,r==="horizontal"?l.height="100%":l.width="100%",l}const u2=N({name:"ElVirtualScrollBar",props:n8,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const o=C(()=>e.startGap+e.endGap),r=ze("virtual-scrollbar"),l=ze("scrollbar"),n=D(),a=D();let i=null,c=null;const d=Dt({isDragging:!1,traveled:0}),u=C(()=>g4[e.layout]),p=C(()=>e.clientSize-s(o)),h=C(()=>({position:"absolute",width:`${is===e.layout?p.value:e.scrollbarSize}px`,height:`${is===e.layout?e.scrollbarSize:p.value}px`,[sre[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),v=C(()=>{const T=e.ratio,R=e.clientSize;if(T>=100)return Number.POSITIVE_INFINITY;if(T>=50)return T*R/100;const P=R/3;return Math.floor(Math.min(Math.max(T*R,cre),P))}),m=C(()=>{if(!Number.isFinite(v.value))return{display:"none"};const T=`${v.value}px`;return fre({bar:u.value,size:T,move:d.traveled},e.layout)}),f=C(()=>Math.floor(e.clientSize-v.value-s(o))),_=()=>{window.addEventListener("mousemove",x),window.addEventListener("mouseup",w);const T=s(a);T&&(c=document.onselectstart,document.onselectstart=()=>!1,T.addEventListener("touchmove",x),T.addEventListener("touchend",w))},g=()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",w),document.onselectstart=c,c=null;const T=s(a);T&&(T.removeEventListener("touchmove",x),T.removeEventListener("touchend",w))},y=T=>{T.stopImmediatePropagation(),!(T.ctrlKey||[1,2].includes(T.button))&&(d.isDragging=!0,d[u.value.axis]=T.currentTarget[u.value.offset]-(T[u.value.client]-T.currentTarget.getBoundingClientRect()[u.value.direction]),t("start-move"),_())},w=()=>{d.isDragging=!1,d[u.value.axis]=0,t("stop-move"),g()},x=T=>{const{isDragging:R}=d;if(!R||!a.value||!n.value)return;const P=d[u.value.axis];if(!P)return;Pa(i);const L=(n.value.getBoundingClientRect()[u.value.direction]-T[u.value.client])*-1,V=a.value[u.value.offset]-P,B=L-V;i=Xn(()=>{d.traveled=Math.max(e.startGap,Math.min(B,f.value)),t("scroll",B,f.value)})},$=T=>{const R=Math.abs(T.target.getBoundingClientRect()[u.value.direction]-T[u.value.client]),P=a.value[u.value.offset]/2,L=R-P;d.traveled=Math.max(0,Math.min(L,f.value)),t("scroll",L,f.value)};return Se(()=>e.scrollFrom,T=>{d.isDragging||(d.traveled=Math.ceil(T*f.value))}),to(()=>{g()}),()=>rt("div",{role:"presentation",ref:n,class:[r.b(),e.class,(e.alwaysOn||d.isDragging)&&"always-on"],style:h.value,onMousedown:ct($,["stop","prevent"]),onTouchstartPrevent:y},rt("div",{ref:a,class:l.e("thumb"),style:m.value,onMousedown:y},[]))}}),i8=({name:e,getOffset:t,getItemSize:o,getItemOffset:r,getEstimatedTotalSize:l,getStartIndexForOffset:n,getStopIndexForStartIndex:a,initCache:i,clearCache:c,validateProps:d})=>N({name:e??"ElVirtualList",props:o8,emits:[Sp,Ep],setup(u,{emit:p,expose:h}){d(u);const v=wt(),m=ze("vl"),f=D(i(u,v)),_=Qy(),g=D(),y=D(),w=D(),x=D({isScrolling:!1,scrollDir:"forward",scrollOffset:st(u.initScrollOffset)?u.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:u.scrollbarAlwaysOn}),$=C(()=>{const{total:ce,cache:Q}=u,{isScrolling:Me,scrollDir:de,scrollOffset:_e}=s(x);if(ce===0)return[0,0,0,0];const me=n(u,_e,s(f)),Re=a(u,me,_e,s(f)),Ce=!Me||de===Tp?Math.max(1,Q):1,Ee=!Me||de===as?Math.max(1,Q):1;return[Math.max(0,me-Ce),Math.max(0,Math.min(ce-1,Re+Ee)),me,Re]}),T=C(()=>l(u,s(f))),R=C(()=>Kc(u.layout)),P=C(()=>[{position:"relative",[`overflow-${R.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:u.direction,height:st(u.height)?`${u.height}px`:u.height,width:st(u.width)?`${u.width}px`:u.width},u.style]),L=C(()=>{const ce=s(T),Q=s(R);return{height:Q?"100%":`${ce}px`,pointerEvents:s(x).isScrolling?"none":void 0,width:Q?`${ce}px`:"100%"}}),V=C(()=>R.value?u.width:u.height),{onWheel:B}=dre({atStartEdge:C(()=>x.value.scrollOffset<=0),atEndEdge:C(()=>x.value.scrollOffset>=T.value),layout:C(()=>u.layout)},ce=>{var Q,Me;(Me=(Q=w.value).onMouseUp)==null||Me.call(Q),F(Math.min(x.value.scrollOffset+ce,T.value-V.value))}),j=()=>{const{total:ce}=u;if(ce>0){const[_e,me,Re,Ce]=s($);p(Sp,_e,me,Re,Ce)}const{scrollDir:Q,scrollOffset:Me,updateRequested:de}=s(x);p(Ep,Q,Me,de)},te=ce=>{const{clientHeight:Q,scrollHeight:Me,scrollTop:de}=ce.currentTarget,_e=s(x);if(_e.scrollOffset===de)return;const me=Math.max(0,Math.min(de,Me-Q));x.value={..._e,isScrolling:!0,scrollDir:Qa(_e.scrollOffset,me),scrollOffset:me,updateRequested:!1},et(U)},J=ce=>{const{clientWidth:Q,scrollLeft:Me,scrollWidth:de}=ce.currentTarget,_e=s(x);if(_e.scrollOffset===Me)return;const{direction:me}=u;let Re=Me;if(me===ss)switch(Ap()){case jc:{Re=-Me;break}case l2:{Re=de-Q-Me;break}}Re=Math.max(0,Math.min(Re,de-Q)),x.value={..._e,isScrolling:!0,scrollDir:Qa(_e.scrollOffset,Re),scrollOffset:Re,updateRequested:!1},et(U)},Z=ce=>{s(R)?J(ce):te(ce),j()},H=(ce,Q)=>{const Me=(T.value-V.value)/Q*ce;F(Math.min(T.value-V.value,Me))},F=ce=>{ce=Math.max(ce,0),ce!==s(x).scrollOffset&&(x.value={...s(x),scrollOffset:ce,scrollDir:Qa(s(x).scrollOffset,ce),updateRequested:!0},et(U))},K=(ce,Q=ll)=>{const{scrollOffset:Me}=s(x);ce=Math.max(0,Math.min(ce,u.total-1)),F(t(u,ce,Q,Me,s(f)))},I=ce=>{const{direction:Q,itemSize:Me,layout:de}=u,_e=_.value(c&&Me,c&&de,c&&Q);let me;if(Pt(_e,String(ce)))me=_e[ce];else{const Re=r(u,ce,s(f)),Ce=o(u,ce,s(f)),Ee=s(R),De=Q===ss,ae=Ee?Re:0;_e[ce]=me={position:"absolute",left:De?void 0:`${ae}px`,right:De?`${ae}px`:void 0,top:Ee?0:`${Re}px`,height:Ee?"100%":`${Ce}px`,width:Ee?`${Ce}px`:"100%"}}return me},U=()=>{x.value.isScrolling=!1,et(()=>{_.value(-1,null,null)})},oe=()=>{const ce=g.value;ce&&(ce.scrollTop=0)};ft(()=>{if(!Nt)return;const{initScrollOffset:ce}=u,Q=s(g);st(ce)&&Q&&(s(R)?Q.scrollLeft=ce:Q.scrollTop=ce),j()}),rn(()=>{const{direction:ce,layout:Q}=u,{scrollOffset:Me,updateRequested:de}=s(x),_e=s(g);if(de&&_e)if(Q===is)if(ce===ss)switch(Ap()){case jc:{_e.scrollLeft=-Me;break}case r2:{_e.scrollLeft=Me;break}default:{const{clientWidth:me,scrollWidth:Re}=_e;_e.scrollLeft=Re-me-Me;break}}else _e.scrollLeft=Me;else _e.scrollTop=Me});const ne={ns:m,clientSize:V,estimatedTotalSize:T,windowStyle:P,windowRef:g,innerRef:y,innerStyle:L,itemsToRender:$,scrollbarRef:w,states:x,getItemStyle:I,onScroll:Z,onScrollbarScroll:H,onWheel:B,scrollTo:F,scrollToItem:K,resetScrollTop:oe};return h({windowRef:g,innerRef:y,getItemStyleCache:_,scrollTo:F,scrollToItem:K,resetScrollTop:oe,states:x}),ne},render(u){var p;const{$slots:h,className:v,clientSize:m,containerElement:f,data:_,getItemStyle:g,innerElement:y,itemsToRender:w,innerStyle:x,layout:$,total:T,onScroll:R,onScrollbarScroll:P,onWheel:L,states:V,useIsScrolling:B,windowStyle:j,ns:te}=u,[J,Z]=w,H=Et(f),F=Et(y),K=[];if(T>0)for(let ne=J;ne<=Z;ne++)K.push((p=h.default)==null?void 0:p.call(h,{data:_,key:ne,index:ne,isScrolling:B?V.isScrolling:void 0,style:g(ne)}));const I=[rt(F,{style:x,ref:"innerRef"},ut(F)?K:{default:()=>K})],U=rt(u2,{ref:"scrollbarRef",clientSize:m,layout:$,onScroll:P,ratio:m*100/this.estimatedTotalSize,scrollFrom:V.scrollOffset/(this.estimatedTotalSize-m),total:T}),oe=rt(H,{class:[te.e("window"),v],style:j,onScroll:R,onWheel:L,ref:"windowRef",key:0},ut(H)?[I]:{default:()=>[I]});return rt("div",{key:0,class:[te.e("wrapper"),V.scrollbarAlwaysOn?"always-on":""]},[oe,U])}}),s8=i8({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:o,layout:r,width:l},n,a,i)=>{const c=Kc(r)?l:e,d=Math.max(0,t*o-c),u=Math.min(d,n*o),p=Math.max(0,(n+1)*o-c);switch(a===$p&&(i>=p-c&&i<=u+c?a=ll:a=Kl),a){case Hc:return u;case Fc:return p;case Kl:{const h=Math.round(p+(u-p)/2);return hd+Math.floor(c/2)?d:h}case ll:default:return i>=p&&i<=u?i:iMath.max(0,Math.min(e-1,Math.floor(o/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:o,layout:r,width:l},n,a)=>{const i=n*o,c=Kc(r)?l:e,d=Math.ceil((c+a-i)/o);return Math.max(0,Math.min(t-1,n+d-1))},initCache(){},clearCache:!0,validateProps(){}}),us=(e,t,o)=>{const{itemSize:r}=e,{items:l,lastVisitedIndex:n}=o;if(t>n){let a=0;if(n>=0){const i=l[n];a=i.offset+i.size}for(let i=n+1;i<=t;i++){const c=r(i);l[i]={offset:a,size:c},a+=c}o.lastVisitedIndex=t}return l[t]},hre=(e,t,o)=>{const{items:r,lastVisitedIndex:l}=t;return(l>0?r[l].offset:0)>=o?c8(e,t,0,l,o):vre(e,t,Math.max(0,l),o)},c8=(e,t,o,r,l)=>{for(;o<=r;){const n=o+Math.floor((r-o)/2),a=us(e,n,t).offset;if(a===l)return n;al&&(r=n-1)}return Math.max(0,o-1)},vre=(e,t,o,r)=>{const{total:l}=e;let n=1;for(;o{let l=0;if(r>=e&&(r=e-1),r>=0){const i=t[r];l=i.offset+i.size}const a=(e-r-1)*o;return l+a},mre=i8({name:"ElDynamicSizeList",getItemOffset:(e,t,o)=>us(e,t,o).offset,getItemSize:(e,t,{items:o})=>o[t].size,getEstimatedTotalSize:u8,getOffset:(e,t,o,r,l)=>{const{height:n,layout:a,width:i}=e,c=Kc(a)?i:n,d=us(e,t,l),u=u8(e,l),p=Math.max(0,Math.min(u-c,d.offset)),h=Math.max(0,d.offset-c+d.size);switch(o===$p&&(r>=h-c&&r<=p+c?o=ll:o=Kl),o){case Hc:return p;case Fc:return h;case Kl:return Math.round(h+(p-h)/2);case ll:default:return r>=h&&r<=p?r:rhre(e,o,t),getStopIndexForStartIndex:(e,t,o,r)=>{const{height:l,total:n,layout:a,width:i}=e,c=Kc(a)?i:l,d=us(e,t,r),u=o+c;let p=d.offset+d.size,h=t;for(;h{var n,a;o.lastVisitedIndex=Math.min(o.lastVisitedIndex,r-1),(n=t.exposed)==null||n.getItemStyleCache(-1),l&&((a=t.proxy)==null||a.$forceUpdate())},o},clearCache:!1,validateProps:({itemSize:e})=>{}}),gre=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:o,atYStartEdge:r},l)=>{let n=null,a=0,i=0;const c=(u,p)=>{const h=u<=0&&t.value||u>=0&&e.value,v=p<=0&&r.value||p>=0&&o.value;return h&&v};return{hasReachedEdge:c,onWheel:u=>{Pa(n);let p=u.deltaX,h=u.deltaY;Math.abs(p)>Math.abs(h)?h=0:p=0,u.shiftKey&&h!==0&&(p=h,h=0),!(c(a,i)&&c(a+p,i+h))&&(a+=p,i+=h,u.preventDefault(),n=Xn(()=>{l(a,i),a=0,i=0}))}}},d8=({name:e,clearCache:t,getColumnPosition:o,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:l,getEstimatedTotalHeight:n,getEstimatedTotalWidth:a,getColumnOffset:i,getRowOffset:c,getRowPosition:d,getRowStartIndexForOffset:u,getRowStopIndexForStartIndex:p,initCache:h,injectToInstance:v,validateProps:m})=>N({name:e??"ElVirtualList",props:Ja,emits:[Sp,Ep],setup(f,{emit:_,expose:g,slots:y}){const w=ze("vl");m(f);const x=wt(),$=D(h(f,x));v==null||v(x,$);const T=D(),R=D(),P=D(),L=D(null),V=D({isScrolling:!1,scrollLeft:st(f.initScrollLeft)?f.initScrollLeft:0,scrollTop:st(f.initScrollTop)?f.initScrollTop:0,updateRequested:!1,xAxisScrollDir:as,yAxisScrollDir:as}),B=Qy(),j=C(()=>Number.parseInt(`${f.height}`,10)),te=C(()=>Number.parseInt(`${f.width}`,10)),J=C(()=>{const{totalColumn:we,totalRow:Te,columnCache:Ne}=f,{isScrolling:Ie,xAxisScrollDir:Ae,scrollLeft:xe}=s(V);if(we===0||Te===0)return[0,0,0,0];const We=r(f,xe,s($)),qe=l(f,We,xe,s($)),ye=!Ie||Ae===Tp?Math.max(1,Ne):1,Ye=!Ie||Ae===as?Math.max(1,Ne):1;return[Math.max(0,We-ye),Math.max(0,Math.min(we-1,qe+Ye)),We,qe]}),Z=C(()=>{const{totalColumn:we,totalRow:Te,rowCache:Ne}=f,{isScrolling:Ie,yAxisScrollDir:Ae,scrollTop:xe}=s(V);if(we===0||Te===0)return[0,0,0,0];const We=u(f,xe,s($)),qe=p(f,We,xe,s($)),ye=!Ie||Ae===Tp?Math.max(1,Ne):1,Ye=!Ie||Ae===as?Math.max(1,Ne):1;return[Math.max(0,We-ye),Math.max(0,Math.min(Te-1,qe+Ye)),We,qe]}),H=C(()=>n(f,s($))),F=C(()=>a(f,s($))),K=C(()=>{var we;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:f.direction,height:st(f.height)?`${f.height}px`:f.height,width:st(f.width)?`${f.width}px`:f.width},(we=f.style)!=null?we:{}]}),I=C(()=>{const we=`${s(F)}px`;return{height:`${s(H)}px`,pointerEvents:s(V).isScrolling?"none":void 0,width:we}}),U=()=>{const{totalColumn:we,totalRow:Te}=f;if(we>0&&Te>0){const[qe,ye,Ye,tt]=s(J),[pt,dt,Y,S]=s(Z);_(Sp,{columnCacheStart:qe,columnCacheEnd:ye,rowCacheStart:pt,rowCacheEnd:dt,columnVisibleStart:Ye,columnVisibleEnd:tt,rowVisibleStart:Y,rowVisibleEnd:S})}const{scrollLeft:Ne,scrollTop:Ie,updateRequested:Ae,xAxisScrollDir:xe,yAxisScrollDir:We}=s(V);_(Ep,{xAxisScrollDir:xe,scrollLeft:Ne,yAxisScrollDir:We,scrollTop:Ie,updateRequested:Ae})},oe=we=>{const{clientHeight:Te,clientWidth:Ne,scrollHeight:Ie,scrollLeft:Ae,scrollTop:xe,scrollWidth:We}=we.currentTarget,qe=s(V);if(qe.scrollTop===xe&&qe.scrollLeft===Ae)return;let ye=Ae;if(a8(f.direction))switch(Ap()){case jc:ye=-Ae;break;case l2:ye=We-Ne-Ae;break}V.value={...qe,isScrolling:!0,scrollLeft:ye,scrollTop:Math.max(0,Math.min(xe,Ie-Te)),updateRequested:!0,xAxisScrollDir:Qa(qe.scrollLeft,ye),yAxisScrollDir:Qa(qe.scrollTop,xe)},et(()=>me()),Re(),U()},ne=(we,Te)=>{const Ne=s(j),Ie=(H.value-Ne)/Te*we;Me({scrollTop:Math.min(H.value-Ne,Ie)})},ce=(we,Te)=>{const Ne=s(te),Ie=(F.value-Ne)/Te*we;Me({scrollLeft:Math.min(F.value-Ne,Ie)})},{onWheel:Q}=gre({atXStartEdge:C(()=>V.value.scrollLeft<=0),atXEndEdge:C(()=>V.value.scrollLeft>=F.value-s(te)),atYStartEdge:C(()=>V.value.scrollTop<=0),atYEndEdge:C(()=>V.value.scrollTop>=H.value-s(j))},(we,Te)=>{var Ne,Ie,Ae,xe;(Ie=(Ne=R.value)==null?void 0:Ne.onMouseUp)==null||Ie.call(Ne),(xe=(Ae=P.value)==null?void 0:Ae.onMouseUp)==null||xe.call(Ae);const We=s(te),qe=s(j);Me({scrollLeft:Math.min(V.value.scrollLeft+we,F.value-We),scrollTop:Math.min(V.value.scrollTop+Te,H.value-qe)})}),Me=({scrollLeft:we=V.value.scrollLeft,scrollTop:Te=V.value.scrollTop})=>{we=Math.max(we,0),Te=Math.max(Te,0);const Ne=s(V);Te===Ne.scrollTop&&we===Ne.scrollLeft||(V.value={...Ne,xAxisScrollDir:Qa(Ne.scrollLeft,we),yAxisScrollDir:Qa(Ne.scrollTop,Te),scrollLeft:we,scrollTop:Te,updateRequested:!0},et(()=>me()),Re(),U())},de=(we=0,Te=0,Ne=ll)=>{const Ie=s(V);Te=Math.max(0,Math.min(Te,f.totalColumn-1)),we=Math.max(0,Math.min(we,f.totalRow-1));const Ae=T3(w.namespace.value),xe=s($),We=n(f,xe),qe=a(f,xe);Me({scrollLeft:i(f,Te,Ne,Ie.scrollLeft,xe,qe>f.width?Ae:0),scrollTop:c(f,we,Ne,Ie.scrollTop,xe,We>f.height?Ae:0)})},_e=(we,Te)=>{const{columnWidth:Ne,direction:Ie,rowHeight:Ae}=f,xe=B.value(t&&Ne,t&&Ae,t&&Ie),We=`${we},${Te}`;if(Pt(xe,We))return xe[We];{const[,qe]=o(f,Te,s($)),ye=s($),Ye=a8(Ie),[tt,pt]=d(f,we,ye),[dt]=o(f,Te,ye);return xe[We]={position:"absolute",left:Ye?void 0:`${qe}px`,right:Ye?`${qe}px`:void 0,top:`${pt}px`,height:`${tt}px`,width:`${dt}px`},xe[We]}},me=()=>{V.value.isScrolling=!1,et(()=>{B.value(-1,null,null)})};ft(()=>{if(!Nt)return;const{initScrollLeft:we,initScrollTop:Te}=f,Ne=s(T);Ne&&(st(we)&&(Ne.scrollLeft=we),st(Te)&&(Ne.scrollTop=Te)),U()});const Re=()=>{const{direction:we}=f,{scrollLeft:Te,scrollTop:Ne,updateRequested:Ie}=s(V),Ae=s(T);if(Ie&&Ae){if(we===ss)switch(Ap()){case jc:{Ae.scrollLeft=-Te;break}case r2:{Ae.scrollLeft=Te;break}default:{const{clientWidth:xe,scrollWidth:We}=Ae;Ae.scrollLeft=We-xe-Te;break}}else Ae.scrollLeft=Math.max(0,Te);Ae.scrollTop=Math.max(0,Ne)}},{resetAfterColumnIndex:Ce,resetAfterRowIndex:Ee,resetAfter:De}=x.proxy;g({windowRef:T,innerRef:L,getItemStyleCache:B,scrollTo:Me,scrollToItem:de,states:V,resetAfterColumnIndex:Ce,resetAfterRowIndex:Ee,resetAfter:De});const ae=()=>{const{scrollbarAlwaysOn:we,scrollbarStartGap:Te,scrollbarEndGap:Ne,totalColumn:Ie,totalRow:Ae}=f,xe=s(te),We=s(j),qe=s(F),ye=s(H),{scrollLeft:Ye,scrollTop:tt}=s(V),pt=rt(u2,{ref:R,alwaysOn:we,startGap:Te,endGap:Ne,class:w.e("horizontal"),clientSize:xe,layout:"horizontal",onScroll:ce,ratio:xe*100/qe,scrollFrom:Ye/(qe-xe),total:Ae,visible:!0}),dt=rt(u2,{ref:P,alwaysOn:we,startGap:Te,endGap:Ne,class:w.e("vertical"),clientSize:We,layout:"vertical",onScroll:ne,ratio:We*100/ye,scrollFrom:tt/(ye-We),total:Ie,visible:!0});return{horizontalScrollbar:pt,verticalScrollbar:dt}},pe=()=>{var we;const[Te,Ne]=s(J),[Ie,Ae]=s(Z),{data:xe,totalColumn:We,totalRow:qe,useIsScrolling:ye,itemKey:Ye}=f,tt=[];if(qe>0&&We>0)for(let pt=Ie;pt<=Ae;pt++)for(let dt=Te;dt<=Ne;dt++)tt.push((we=y.default)==null?void 0:we.call(y,{columnIndex:dt,data:xe,key:Ye({columnIndex:dt,data:xe,rowIndex:pt}),isScrolling:ye?s(V).isScrolling:void 0,style:_e(pt,dt),rowIndex:pt}));return tt},ke=()=>{const we=Et(f.innerElement),Te=pe();return[rt(we,{style:s(I),ref:L},ut(we)?Te:{default:()=>Te})]};return()=>{const we=Et(f.containerElement),{horizontalScrollbar:Te,verticalScrollbar:Ne}=ae(),Ie=ke();return rt("div",{key:0,class:w.e("wrapper"),role:f.role},[rt(we,{class:f.className,style:s(K),onScroll:oe,onWheel:Q,ref:T},ut(we)?Ie:{default:()=>Ie}),Te,Ne])}}}),bre=d8({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:o},r,l,n,a,i)=>{o=Number(o);const c=Math.max(0,e*t-o),d=Math.min(c,r*t),u=Math.max(0,r*t-o+i+t);switch(l==="smart"&&(n>=u-o&&n<=d+o?l=ll:l=Kl),l){case Hc:return d;case Fc:return u;case Kl:{const p=Math.round(u+(d-u)/2);return pc+Math.floor(o/2)?c:p}case ll:default:return n>=u&&n<=d?n:u>d||n{t=Number(t);const c=Math.max(0,o*e-t),d=Math.min(c,r*e),u=Math.max(0,r*e-t+i+e);switch(l===$p&&(n>=u-t&&n<=d+t?l=ll:l=Kl),l){case Hc:return d;case Fc:return u;case Kl:{const p=Math.round(u+(d-u)/2);return pc+Math.floor(t/2)?c:p}case ll:default:return n>=u&&n<=d?n:u>d||nMath.max(0,Math.min(t-1,Math.floor(o/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:o},r,l)=>{const n=r*e,a=Math.ceil((o+l-n)/e);return Math.max(0,Math.min(t-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},o)=>Math.max(0,Math.min(t-1,Math.floor(o/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:o},r,l)=>{const n=r*e,a=Math.ceil((o+l-n)/e);return Math.max(0,Math.min(t-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),{max:zp,min:p8,floor:f8}=Math,_re={column:"columnWidth",row:"rowHeight"},d2={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},kn=(e,t,o,r)=>{const[l,n,a]=[o[r],e[_re[r]],o[d2[r]]];if(t>a){let i=0;if(a>=0){const c=l[a];i=c.offset+c.size}for(let c=a+1;c<=t;c++){const d=n(c);l[c]={offset:i,size:d},i+=d}o[d2[r]]=t}return l[t]},h8=(e,t,o,r,l,n)=>{for(;o<=r;){const a=o+f8((r-o)/2),i=kn(e,a,t,n).offset;if(i===l)return a;i{const n=l==="column"?e.totalColumn:e.totalRow;let a=1;for(;o{const[l,n]=[t[r],t[d2[r]]];return(n>0?l[n].offset:0)>=o?h8(e,t,0,n,o,r):wre(e,t,zp(0,n),o,r)},m8=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:o,row:r})=>{let l=0;if(o>=e&&(o=e-1),o>=0){const i=r[o];l=i.offset+i.size}const a=(e-o-1)*t;return l+a},g8=({totalColumn:e},{column:t,estimatedColumnWidth:o,lastVisitedColumnIndex:r})=>{let l=0;if(r>e&&(r=e-1),r>=0){const i=t[r];l=i.offset+i.size}const a=(e-r-1)*o;return l+a},yre={column:g8,row:m8},b8=(e,t,o,r,l,n,a)=>{const[i,c]=[n==="row"?e.height:e.width,yre[n]],d=kn(e,t,l,n),u=c(e,l),p=zp(0,p8(u-i,d.offset)),h=zp(0,d.offset-i+a+d.size);switch(o===$p&&(r>=h-i&&r<=p+i?o=ll:o=Kl),o){case Hc:return p;case Fc:return h;case Kl:return Math.round(h+(p-h)/2);case ll:default:return r>=h&&r<=p?r:h>p||r{const r=kn(e,t,o,"column");return[r.size,r.offset]},getRowPosition:(e,t,o)=>{const r=kn(e,t,o,"row");return[r.size,r.offset]},getColumnOffset:(e,t,o,r,l,n)=>b8(e,t,o,r,l,"column",n),getRowOffset:(e,t,o,r,l,n)=>b8(e,t,o,r,l,"row",n),getColumnStartIndexForOffset:(e,t,o)=>v8(e,o,t,"column"),getColumnStopIndexForStartIndex:(e,t,o,r)=>{const l=kn(e,t,r,"column"),n=o+e.width;let a=l.offset+l.size,i=t;for(;iv8(e,o,t,"row"),getRowStopIndexForStartIndex:(e,t,o,r)=>{const{totalRow:l,height:n}=e,a=kn(e,t,r,"row"),i=o+n;let c=a.size+a.offset,d=t;for(;d{const o=({columnIndex:n,rowIndex:a},i)=>{var c,d;i=ko(i)?!0:i,st(n)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,n-1)),st(a)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,a-1)),(c=e.exposed)==null||c.getItemStyleCache.value(-1,null,null),i&&((d=e.proxy)==null||d.$forceUpdate())},r=(n,a)=>{o({columnIndex:n},a)},l=(n,a)=>{o({rowIndex:n},a)};Object.assign(e.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:l,resetAfter:o})},initCache:({estimatedColumnWidth:e=t2,estimatedRowHeight:t=t2})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),kre=N({props:{item:{type:Object,required:!0},style:Object,height:Number},setup(){return{ns:ze("select")}}});function Cre(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.be("group","title")),style:Je([e.style,{lineHeight:`${e.height}px`}])},$e(e.item.label),7)}var Sre=Le(kre,[["render",Cre],["__file","group-item.vue"]]);function Ere(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}const _8={label:"label",value:"value",disabled:"disabled",options:"options"};function Ip(e){const t=C(()=>({..._8,...e.props}));return{aliasProps:t,getLabel:a=>wo(a,t.value.label),getValue:a=>wo(a,t.value.value),getDisabled:a=>wo(a,t.value.disabled),getOptions:a=>wo(a,t.value.options)}}const Tre=Pe({allowCreate:Boolean,autocomplete:{type:ue(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Xt,default:hn},effect:{type:ue(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:ue([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:ue(Array),required:!0},placeholder:{type:String},teleported:Uo.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:ue(Object),default:()=>({})},remote:Boolean,size:Oo,props:{type:ue(Object),default:()=>_8},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},placement:{type:ue(String),values:Va,default:"bottom-start"},fallbackPlacements:{type:ue(Array),default:["bottom-start","top-start","right","left"]},tagType:{...hp.type,default:"info"},...Xi,...Zo(["ariaLabel"])}),$re=Pe({data:Array,disabled:Boolean,hovering:Boolean,item:{type:ue(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),p2=Symbol("ElSelectV2Injection"),Mre=N({props:$re,emits:["select","hover"],setup(e,{emit:t}){const o=Ge(p2),r=ze("select"),{hoverItem:l,selectOptionClick:n}=Ere(e,{emit:t}),{getLabel:a}=Ip(o.props);return{ns:r,hoverItem:l,selectOptionClick:n,getLabel:a}}}),Are=["aria-selected"];function zre(e,t,o,r,l,n){return b(),M("li",{"aria-selected":e.selected,style:Je(e.style),class:O([e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]),onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=ct((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[be(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[E("span",null,$e(e.getLabel(e.item)),1)])],46,Are)}var Ire=Le(Mre,[["render",zre],["__file","option-item.vue"]]),Ore=N({name:"ElSelectDropdown",props:{loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number},setup(e,{slots:t,expose:o}){const r=Ge(p2),l=ze("select"),{getLabel:n,getValue:a,getDisabled:i}=Ip(r.props),c=D([]),d=D(),u=C(()=>e.data.length);Se(()=>u.value,()=>{var B,j;(j=(B=r.tooltipRef.value).updatePopper)==null||j.call(B)});const p=C(()=>ko(r.props.estimatedOptionHeight)),h=C(()=>p.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:B=>c.value[B]}),v=(B=[],j)=>{const{props:{valueKey:te}}=r;return xt(j)?B&&B.some(J=>jt(wo(J,te))===wo(j,te)):B.includes(j)},m=(B,j)=>{if(xt(j)){const{valueKey:te}=r.props;return wo(B,te)===wo(j,te)}else return B===j},f=(B,j)=>r.props.multiple?v(B,a(j)):m(B,a(j)),_=(B,j)=>{const{disabled:te,multiple:J,multipleLimit:Z}=r.props;return te||!j&&(J?Z>0&&B.length>=Z:!1)},g=B=>e.hoveringIndex===B;o({listRef:d,isSized:p,isItemDisabled:_,isItemHovering:g,isItemSelected:f,scrollToItem:B=>{const j=d.value;j&&j.scrollToItem(B)},resetScrollTop:()=>{const B=d.value;B&&B.resetScrollTop()}});const x=B=>{const{index:j,data:te,style:J}=B,Z=s(p),{itemSize:H,estimatedSize:F}=s(h),{modelValue:K}=r.props,{onSelect:I,onHover:U}=r,oe=te[j];if(oe.type==="Group")return ee(Sre,{item:oe,style:J,height:Z?H:F},null);const ne=f(K,oe),ce=_(K,ne),Q=g(j);return ee(Ire,Mt(B,{selected:ne,disabled:i(oe)||ce,created:!!oe.created,hovering:Q,item:oe,onSelect:I,onHover:U}),{default:Me=>{var de;return((de=t.default)==null?void 0:de.call(t,Me))||ee("span",null,[n(oe)])}})},{onKeyboardNavigate:$,onKeyboardSelect:T}=r,R=()=>{$("forward")},P=()=>{$("backward")},L=()=>{r.expanded=!1},V=B=>{const{code:j}=B,{tab:te,esc:J,down:Z,up:H,enter:F}=lt;switch(j!==te&&(B.preventDefault(),B.stopPropagation()),j){case te:case J:{L();break}case Z:{R();break}case H:{P();break}case F:{T();break}}};return()=>{var B,j,te,J;const{data:Z,width:H}=e,{height:F,multiple:K,scrollbarAlwaysOn:I}=r.props,U=s(p)?s8:mre;return ee("div",{class:[l.b("dropdown"),l.is("multiple",K)],style:{width:`${H}px`}},[(B=t.header)==null?void 0:B.call(t),((j=t.loading)==null?void 0:j.call(t))||((te=t.empty)==null?void 0:te.call(t))||ee(U,Mt({ref:d},s(h),{className:l.be("dropdown","list"),scrollbarAlwaysOn:I,data:Z,height:F,width:H,total:Z.length,onKeydown:V}),{default:oe=>ee(x,oe,null)}),(J=t.footer)==null?void 0:J.call(t)])}}});function Nre(e,t){const{aliasProps:o,getLabel:r,getValue:l}=Ip(e),n=D(0),a=D(null),i=C(()=>e.allowCreate&&e.filterable);function c(v){const m=f=>r(f)===v;return e.options&&e.options.some(m)||t.createdOptions.some(m)}function d(v){i.value&&(e.multiple&&v.created?n.value++:a.value=v)}function u(v){if(i.value)if(v&&v.length>0){if(c(v))return;const m={[o.value.value]:v,[o.value.label]:v,created:!0,[o.value.disabled]:!1};t.createdOptions.length>=n.value?t.createdOptions[n.value]=m:t.createdOptions.push(m)}else if(e.multiple)t.createdOptions.length=n.value;else{const m=a.value;t.createdOptions.length=0,m&&m.created&&t.createdOptions.push(m)}}function p(v){if(!i.value||!v||!v.created||v.created&&e.reserveKeyword&&t.inputValue===r(v))return;const m=t.createdOptions.findIndex(f=>l(f)===l(v));~m&&(t.createdOptions.splice(m,1),n.value--)}function h(){i.value&&(t.createdOptions.length=0,n.value=0)}return{createNewOption:u,removeNewOption:p,selectNewOption:d,clearAllNewOption:h}}const Pre=11,Rre=(e,t)=>{const{t:o}=Rt(),r=ze("select"),l=ze("input"),{form:n,formItem:a}=sr(),{inputId:i}=bl(e,{formItemContext:a}),{aliasProps:c,getLabel:d,getValue:u,getDisabled:p,getOptions:h}=Ip(e),{valueOnClear:v,isEmptyValue:m}=Wd(e),f=Dt({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),_=D(-1),g=D(null),y=D(null),w=D(null),x=D(null),$=D(null),T=D(null),R=D(null),P=D(null),L=D(null),V=D(null),B=D(null),{wrapperRef:j,isFocused:te,handleFocus:J,handleBlur:Z}=Ud($,{afterFocus(){e.automaticDropdown&&!K.value&&(K.value=!0,f.menuVisibleOnFocus=!0)},beforeBlur(Be){var vt,Ot;return((vt=w.value)==null?void 0:vt.isFocusInsideContent(Be))||((Ot=x.value)==null?void 0:Ot.isFocusInsideContent(Be))},afterBlur(){K.value=!1,f.menuVisibleOnFocus=!1}}),H=D([]),F=D([]),K=D(!1),I=C(()=>e.disabled||(n==null?void 0:n.disabled)),U=C(()=>{const Be=F.value.length*e.itemHeight;return Be>e.height?e.height:Be}),oe=C(()=>e.multiple?Ke(e.modelValue)&&e.modelValue.length>0:!m(e.modelValue)),ne=C(()=>e.clearable&&!I.value&&f.inputHovering&&oe.value),ce=C(()=>e.remote&&e.filterable?"":Pl),Q=C(()=>ce.value&&r.is("reverse",K.value)),Me=C(()=>(a==null?void 0:a.validateState)||""),de=C(()=>_h[Me.value]),_e=C(()=>e.remote?300:0),me=C(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!f.inputValue&&H.value.length===0?!1:e.filterable&&f.inputValue&&H.value.length>0&&F.value.length===0?e.noMatchText||o("el.select.noMatch"):H.value.length===0?e.noDataText||o("el.select.noData"):null),Re=Be=>{const vt=Ot=>{if(e.filterable&&it(e.filterMethod)||e.filterable&&e.remote&&it(e.remoteMethod))return!0;const Ut=new RegExp(ch(Be),"i");return Be?Ut.test(d(Ot)||""):!0};return e.loading?[]:[...f.createdOptions,...e.options].reduce((Ot,Ut)=>{const vr=h(Ut);if(Ke(vr)){const Hr=vr.filter(vt);Hr.length>0&&Ot.push({label:d(Ut),type:"Group"},...Hr)}else(e.remote||vt(Ut))&&Ot.push(Ut);return Ot},[])},Ce=()=>{H.value=Re(""),F.value=Re(f.inputValue)},Ee=C(()=>{const Be=new Map;return H.value.forEach((vt,Ot)=>{Be.set(bt(u(vt)),{option:vt,index:Ot})}),Be}),De=C(()=>{const Be=new Map;return F.value.forEach((vt,Ot)=>{Be.set(bt(u(vt)),{option:vt,index:Ot})}),Be}),ae=C(()=>F.value.every(Be=>p(Be))),pe=So(),ke=C(()=>pe.value==="small"?"small":"default"),Oe=()=>{var Be;_.value=((Be=g.value)==null?void 0:Be.offsetWidth)||200},we=()=>{if(!y.value)return 0;const Be=window.getComputedStyle(y.value);return Number.parseFloat(Be.gap||"6px")},Te=C(()=>{const Be=we();return{maxWidth:`${B.value&&e.maxCollapseTags===1?f.selectionWidth-f.collapseItemWidth-Be:f.selectionWidth}px`}}),Ne=C(()=>({maxWidth:`${f.selectionWidth}px`})),Ie=C(()=>({width:`${Math.max(f.calculatorWidth,Pre)}px`})),Ae=C(()=>Ke(e.modelValue)?e.modelValue.length===0&&!f.inputValue:e.filterable?!f.inputValue:!0),xe=C(()=>{var Be;const vt=(Be=e.placeholder)!=null?Be:o("el.select.placeholder");return e.multiple||!oe.value?vt:f.selectedLabel}),We=C(()=>{var Be,vt;return(vt=(Be=w.value)==null?void 0:Be.popperRef)==null?void 0:vt.contentRef}),qe=C(()=>{if(e.multiple){const Be=e.modelValue.length;if(e.modelValue.length>0&&De.value.has(e.modelValue[Be-1])){const{index:vt}=De.value.get(e.modelValue[Be-1]);return vt}}else if(e.modelValue&&De.value.has(e.modelValue)){const{index:Be}=De.value.get(e.modelValue);return Be}return-1}),ye=C({get(){return K.value&&me.value!==!1},set(Be){K.value=Be}}),Ye=C(()=>e.multiple?e.collapseTags?f.cachedOptions.slice(0,e.maxCollapseTags):f.cachedOptions:[]),tt=C(()=>e.multiple?e.collapseTags?f.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:pt,removeNewOption:dt,selectNewOption:Y,clearAllNewOption:S}=Nre(e,f),{handleCompositionStart:A,handleCompositionUpdate:G,handleCompositionEnd:X}=Ky(Be=>Po(Be)),re=()=>{I.value||(f.menuVisibleOnFocus?f.menuVisibleOnFocus=!1:K.value=!K.value)},ge=()=>{f.inputValue.length>0&&!K.value&&(K.value=!0),pt(f.inputValue),Fe(f.inputValue)},fe=Mr(ge,_e.value),Fe=Be=>{f.previousQuery!==Be&&(f.previousQuery=Be,e.filterable&&it(e.filterMethod)?e.filterMethod(Be):e.filterable&&e.remote&&it(e.remoteMethod)&&e.remoteMethod(Be),e.defaultFirstOption&&(e.filterable||e.remote)&&F.value.length?et(at):et(ao))},at=()=>{const Be=F.value.filter(Ut=>!Ut.disabled&&Ut.type!=="Group"),vt=Be.find(Ut=>Ut.created),Ot=Be[0];f.hoveringIndex=no(F.value,vt||Ot)},_t=Be=>{nr(e.modelValue,Be)||t(ro,Be)},At=Be=>{t(St,Be),_t(Be),f.previousValue=e.multiple?String(Be):Be},no=(Be=[],vt)=>{if(!xt(vt))return Be.indexOf(vt);const Ot=e.valueKey;let Ut=-1;return Be.some((vr,Hr)=>wo(vr,Ot)===wo(vt,Ot)?(Ut=Hr,!0):!1),Ut},bt=Be=>xt(Be)?wo(Be,e.valueKey):Be,Qt=()=>{Oe()},Sn=()=>{f.selectionWidth=y.value.getBoundingClientRect().width},qo=()=>{f.calculatorWidth=T.value.getBoundingClientRect().width},xl=()=>{f.collapseItemWidth=B.value.getBoundingClientRect().width},kl=()=>{var Be,vt;(vt=(Be=w.value)==null?void 0:Be.updatePopper)==null||vt.call(Be)},Or=()=>{var Be,vt;(vt=(Be=x.value)==null?void 0:Be.updatePopper)==null||vt.call(Be)},Bt=Be=>{if(e.multiple){let vt=e.modelValue.slice();const Ot=no(vt,u(Be));Ot>-1?(vt=[...vt.slice(0,Ot),...vt.slice(Ot+1)],f.cachedOptions.splice(Ot,1),dt(Be)):(e.multipleLimit<=0||vt.length{let Ot=e.modelValue.slice();const Ut=no(Ot,u(vt));Ut>-1&&!I.value&&(Ot=[...e.modelValue.slice(0,Ut),...e.modelValue.slice(Ut+1)],f.cachedOptions.splice(Ut,1),At(Ot),t("remove-tag",u(vt)),dt(vt)),Be.stopPropagation(),or()},or=()=>{var Be;(Be=$.value)==null||Be.focus()},Nr=()=>{var Be;(Be=$.value)==null||Be.blur()},yo=()=>{f.inputValue.length>0?f.inputValue="":K.value=!1},Eo=Be=>k3(Be,vt=>!f.cachedOptions.some(Ot=>u(Ot)===vt&&p(Ot))),rr=Be=>{if(e.multiple&&Be.code!==lt.delete&&f.inputValue.length===0){Be.preventDefault();const vt=e.modelValue.slice(),Ot=Eo(vt);if(Ot<0)return;const Ut=vt[Ot];vt.splice(Ot,1);const vr=f.cachedOptions[Ot];f.cachedOptions.splice(Ot,1),dt(vr),At(vt),t("remove-tag",Ut)}},ua=()=>{let Be;Ke(e.modelValue)?Be=[]:Be=v.value,e.multiple?f.cachedOptions=[]:f.selectedLabel="",K.value=!1,At(Be),t("clear"),S(),or()},He=(Be,vt=void 0)=>{const Ot=F.value;if(!["forward","backward"].includes(Be)||I.value||Ot.length<=0||ae.value)return;if(!K.value)return re();vt===void 0&&(vt=f.hoveringIndex);let Ut=-1;Be==="forward"?(Ut=vt+1,Ut>=Ot.length&&(Ut=0)):Be==="backward"&&(Ut=vt-1,(Ut<0||Ut>=Ot.length)&&(Ut=Ot.length-1));const vr=Ot[Ut];if(p(vr)||vr.type==="Group")return He(Be,Ut);f.hoveringIndex=Ut,fr(Ut)},ot=()=>{if(K.value)~f.hoveringIndex&&F.value[f.hoveringIndex]&&Bt(F.value[f.hoveringIndex]);else return re()},eo=Be=>{f.hoveringIndex=Be},ao=()=>{e.multiple?f.hoveringIndex=F.value.findIndex(Be=>e.modelValue.some(vt=>bt(vt)===bt(Be))):f.hoveringIndex=F.value.findIndex(Be=>bt(Be)===bt(e.modelValue))},Po=Be=>{if(f.inputValue=Be.target.value,e.remote)fe();else return ge()},Pr=Be=>{if(K.value=!1,te.value){const vt=new FocusEvent("focus",Be);Z(vt)}},Wl=()=>(f.isBeforeHide=!1,et(()=>{~qe.value&&fr(f.hoveringIndex)})),fr=Be=>{L.value.scrollToItem(Be)},hr=Be=>{const vt=bt(Be);if(Ee.value.has(vt)){const{option:Ot}=Ee.value.get(vt);return Ot}return{[c.value.value]:Be,[c.value.label]:Be}},ql=()=>{if(e.multiple)if(e.modelValue.length>0){f.cachedOptions.length=0,f.previousValue=e.modelValue.toString();for(const Be of e.modelValue){const vt=hr(Be);f.cachedOptions.push(vt)}}else f.cachedOptions=[],f.previousValue=void 0;else if(oe.value){f.previousValue=e.modelValue;const Be=F.value,vt=Be.findIndex(Ot=>bt(u(Ot))===bt(e.modelValue));~vt?f.selectedLabel=d(Be[vt]):f.selectedLabel=bt(e.modelValue)}else f.selectedLabel="",f.previousValue=void 0;S(),Oe()};return Se(K,Be=>{Be?Fe(""):(f.inputValue="",f.previousQuery=null,f.isBeforeHide=!0,pt("")),t("visible-change",Be)}),Se(()=>e.modelValue,(Be,vt)=>{var Ot;(!Be||e.multiple&&Be.toString()!==f.previousValue||!e.multiple&&bt(Be)!==bt(f.previousValue))&&ql(),!nr(Be,vt)&&e.validateEvent&&((Ot=a==null?void 0:a.validate)==null||Ot.call(a,"change").catch(Ut=>void 0))},{deep:!0}),Se(()=>e.options,()=>{const Be=$.value;(!Be||Be&&document.activeElement!==Be)&&ql()},{deep:!0,flush:"post"}),Se(()=>F.value,()=>L.value&&et(L.value.resetScrollTop)),Go(()=>{f.isBeforeHide||Ce()}),Go(()=>{const{valueKey:Be,options:vt}=e,Ot=new Map;for(const Ut of vt){const vr=u(Ut);let Hr=vr;if(xt(Hr)&&(Hr=wo(vr,Be)),Ot.get(Hr))break;Ot.set(Hr,!0)}}),ft(()=>{ql()}),so(g,Qt),so(y,Sn),so(T,qo),so(L,kl),so(j,kl),so(V,Or),so(B,xl),{inputId:i,collapseTagSize:ke,currentPlaceholder:xe,expanded:K,emptyText:me,popupHeight:U,debounce:_e,allOptions:H,filteredOptions:F,iconComponent:ce,iconReverse:Q,tagStyle:Te,collapseTagStyle:Ne,inputStyle:Ie,popperSize:_,dropdownMenuVisible:ye,hasModelValue:oe,shouldShowPlaceholder:Ae,selectDisabled:I,selectSize:pe,showClearBtn:ne,states:f,isFocused:te,nsSelect:r,nsInput:l,calculatorRef:T,inputRef:$,menuRef:L,tagMenuRef:V,tooltipRef:w,tagTooltipRef:x,selectRef:g,wrapperRef:j,selectionRef:y,prefixRef:R,suffixRef:P,collapseItemRef:B,popperRef:We,validateState:Me,validateIcon:de,showTagList:Ye,collapseTagList:tt,debouncedOnInputChange:fe,deleteTag:pr,getLabel:d,getValue:u,getDisabled:p,getValueKey:bt,handleBlur:Z,handleClear:ua,handleClickOutside:Pr,handleDel:rr,handleEsc:yo,handleFocus:J,focus:or,blur:Nr,handleMenuEnter:Wl,handleResize:Qt,resetSelectionWidth:Sn,resetCalculatorWidth:qo,updateTooltip:kl,updateTagTooltip:Or,updateOptions:Ce,toggleMenu:re,scrollTo:fr,onInput:Po,onKeyboardNavigate:He,onKeyboardSelect:ot,onSelect:Bt,onHover:eo,handleCompositionStart:A,handleCompositionEnd:X,handleCompositionUpdate:G}},Lre=N({name:"ElSelectV2",components:{ElSelectMenu:Ore,ElTag:Rc,ElTooltip:ur,ElIcon:Ze},directives:{ClickOutside:xn},props:Tre,emits:[St,ro,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=C(()=>{const{modelValue:l,multiple:n}=e,a=n?[]:void 0;return Ke(l)?n?l:a:n?a:l}),r=Rre(Dt({...Bo(e),modelValue:o}),t);return zt(p2,{props:Dt({...Bo(e),height:r.popupHeight,modelValue:o}),tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect}),{...r,modelValue:o}}}),Bre=["id","autocomplete","aria-expanded","aria-label","disabled","readonly","name"],Vre=["textContent"],Dre={key:1};function Hre(e,t,o,r,l,n){const a=nt("el-tag"),i=nt("el-tooltip"),c=nt("el-icon"),d=nt("el-select-menu"),u=Ou("click-outside");return mt((b(),M("div",{ref:"selectRef",class:O([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=p=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=p=>e.states.inputHovering=!1)},[ee(i,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=p=>e.states.isBeforeHide=!1)},{default:le(()=>[E("div",{ref:"wrapperRef",class:O([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[13]||(t[13]=ct((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent","stop"]))},[e.$slots.prefix?(b(),M("div",{key:0,ref:"prefixRef",class:O(e.nsSelect.e("prefix"))},[be(e.$slots,"prefix")],2)):se("v-if",!0),E("div",{ref:"selectionRef",class:O([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?be(e.$slots,"tag",{key:0},()=>[(b(!0),M(Qe,null,It(e.showTagList,p=>(b(),M("div",{key:e.getValueKey(e.getValue(p)),class:O(e.nsSelect.e("selected-item"))},[ee(a,{closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.tagStyle),onClose:h=>e.deleteTag(h,p)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Ct($e(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.modelValue.length>e.maxCollapseTags?(b(),he(i,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:le(()=>[E("div",{ref:"collapseItemRef",class:O(e.nsSelect.e("selected-item"))},[ee(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,style:Je(e.collapseTagStyle),"disable-transitions":""},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))}," + "+$e(e.modelValue.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:le(()=>[E("div",{ref:"tagMenuRef",class:O(e.nsSelect.e("selection"))},[(b(!0),M(Qe,null,It(e.collapseTagList,p=>(b(),M("div",{key:e.getValueKey(e.getValue(p)),class:O(e.nsSelect.e("selected-item"))},[ee(a,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:h=>e.deleteTag(h,p)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Ct($e(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):se("v-if",!0)]):se("v-if",!0),e.selectDisabled?se("v-if",!0):(b(),M("div",{key:1,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[mt(E("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=p=>e.states.inputValue=p),style:Je(e.inputStyle),autocomplete:e.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:O([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onFocus:t[1]||(t[1]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[2]||(t[2]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[3]||(t[3]=(...p)=>e.onInput&&e.onInput(...p)),onCompositionstart:t[4]||(t[4]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[5]||(t[5]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[6]||(t[6]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[7]||(t[7]=Gt(ct(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[8]||(t[8]=Gt(ct(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[9]||(t[9]=Gt(ct((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[10]||(t[10]=Gt(ct((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[11]||(t[11]=Gt(ct((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))],onClick:t[12]||(t[12]=ct((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"]))},null,46,Bre),[[l0,e.states.inputValue]]),e.filterable?(b(),M("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:O(e.nsSelect.e("input-calculator")),textContent:$e(e.states.inputValue)},null,10,Vre)):se("v-if",!0)],2)),e.shouldShowPlaceholder?(b(),M("div",{key:2,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?be(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[E("span",null,$e(e.currentPlaceholder),1)]):(b(),M("span",Dre,$e(e.currentPlaceholder),1))],2)):se("v-if",!0)],2),E("div",{ref:"suffixRef",class:O(e.nsSelect.e("suffix"))},[e.iconComponent?mt((b(),he(c,{key:0,class:O([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])),[[Lt,!e.showClearBtn]]):se("v-if",!0),e.showClearBtn&&e.clearIcon?(b(),he(c,{key:1,class:O([e.nsSelect.e("caret"),e.nsInput.e("icon")]),onClick:ct(e.handleClear,["prevent","stop"])},{default:le(()=>[(b(),he(Et(e.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.validateState&&e.validateIcon?(b(),he(c,{key:2,class:O([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:le(()=>[(b(),he(Et(e.validateIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)]),content:le(()=>[ee(d,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},ln({default:le(p=>[be(e.$slots,"default",Zl(mi(p)))]),_:2},[e.$slots.header?{name:"header",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","header"))},[be(e.$slots,"header")],2)])}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","loading"))},[be(e.$slots,"loading")],2)])}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","empty"))},[be(e.$slots,"empty",{},()=>[E("span",null,$e(e.emptyText),1)])],2)])}:void 0,e.$slots.footer?{name:"footer",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","footer"))},[be(e.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","onBeforeShow"])],34)),[[u,e.handleClickOutside,e.popperRef]])}var Op=Le(Lre,[["render",Hre],["__file","select.vue"]]);Op.install=e=>{e.component(Op.name,Op)};const Fre=Op,jre=Pe({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),Kre=Pe({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Ure=N({...N({name:"ElSkeletonItem"}),props:Kre,setup(e){const t=ze("skeleton");return(o,r)=>(b(),M("div",{class:O([s(t).e("item"),s(t).e(o.variant)])},[o.variant==="image"?(b(),he(s(H3),{key:0})):se("v-if",!0)],2))}});var Np=Le(Ure,[["__file","skeleton-item.vue"]]);const Wre=N({...N({name:"ElSkeleton"}),props:jre,setup(e,{expose:t}){const o=e,r=ze("skeleton"),l=Cj(Yt(o,"loading"),o.throttle);return t({uiLoading:l}),(n,a)=>s(l)?(b(),M("div",Mt({key:0,class:[s(r).b(),s(r).is("animated",n.animated)]},n.$attrs),[(b(!0),M(Qe,null,It(n.count,i=>(b(),M(Qe,{key:i},[n.loading?be(n.$slots,"template",{key:i},()=>[ee(Np,{class:O(s(r).is("first")),variant:"p"},null,8,["class"]),(b(!0),M(Qe,null,It(n.rows,c=>(b(),he(Np,{key:c,class:O([s(r).e("paragraph"),s(r).is("last",c===n.rows&&n.rows>1)]),variant:"p"},null,8,["class"]))),128))]):se("v-if",!0)],64))),128))],16)):be(n.$slots,"default",Zl(Mt({key:1},n.$attrs)))}});var qre=Le(Wre,[["__file","skeleton.vue"]]);const Yre=yt(qre,{SkeletonItem:Np}),Gre=co(Np),w8=Symbol("sliderContextKey"),Xre=Pe({modelValue:{type:ue([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Oo,inputSize:Oo,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ue(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},label:{type:String,default:void 0},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ue(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Va,default:"top"},marks:{type:ue(Object)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),f2=e=>st(e)||Ke(e)&&e.every(st),Zre={[St]:f2,[yr]:f2,[ro]:f2},Jre=(e,t,o)=>{const r=D();return ft(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),oo(window,"resize",o),await et(),o()}),{sliderWrapper:r}},Qre=e=>C(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((o,r)=>o-r).filter(o=>o<=e.max&&o>=e.min).map(o=>({point:o,position:(o-e.min)*100/(e.max-e.min),mark:e.marks[o]})):[]),ele=(e,t,o)=>{const{form:r,formItem:l}=sr(),n=lo(),a=D(),i=D(),c={firstButton:a,secondButton:i},d=C(()=>e.disabled||(r==null?void 0:r.disabled)||!1),u=C(()=>Math.min(t.firstValue,t.secondValue)),p=C(()=>Math.max(t.firstValue,t.secondValue)),h=C(()=>e.range?`${100*(p.value-u.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),v=C(()=>e.range?`${100*(u.value-e.min)/(e.max-e.min)}%`:"0%"),m=C(()=>e.vertical?{height:e.height}:{}),f=C(()=>e.vertical?{height:h.value,bottom:v.value}:{width:h.value,left:v.value}),_=()=>{n.value&&(t.sliderSize=n.value[`client${e.vertical?"Height":"Width"}`])},g=B=>{const j=e.min+B*(e.max-e.min)/100;if(!e.range)return a;let te;return Math.abs(u.value-j)t.secondValue?"firstButton":"secondButton",c[te]},y=B=>{const j=g(B);return j.value.setPosition(B),j},w=B=>{t.firstValue=B,$(e.range?[u.value,p.value]:B)},x=B=>{t.secondValue=B,e.range&&$([u.value,p.value])},$=B=>{o(St,B),o(yr,B)},T=async()=>{await et(),o(ro,e.range?[u.value,p.value]:e.modelValue)},R=B=>{var j,te,J,Z,H,F;if(d.value||t.dragging)return;_();let K=0;if(e.vertical){const I=(J=(te=(j=B.touches)==null?void 0:j.item(0))==null?void 0:te.clientY)!=null?J:B.clientY;K=(n.value.getBoundingClientRect().bottom-I)/t.sliderSize*100}else{const I=(F=(H=(Z=B.touches)==null?void 0:Z.item(0))==null?void 0:H.clientX)!=null?F:B.clientX,U=n.value.getBoundingClientRect().left;K=(I-U)/t.sliderSize*100}if(!(K<0||K>100))return y(K)};return{elFormItem:l,slider:n,firstButton:a,secondButton:i,sliderDisabled:d,minValue:u,maxValue:p,runwayStyle:m,barStyle:f,resetSize:_,setPosition:y,emitChange:T,onSliderWrapperPrevent:B=>{var j,te;((j=c.firstButton.value)!=null&&j.dragging||(te=c.secondButton.value)!=null&&te.dragging)&&B.preventDefault()},onSliderClick:B=>{R(B)&&T()},onSliderDown:async B=>{const j=R(B);j&&(await et(),j.value.onButtonDown(B))},setFirstValue:w,setSecondValue:x}},{left:tle,down:ole,right:rle,up:lle,home:nle,end:ale,pageUp:ile,pageDown:sle}=lt,cle=(e,t,o)=>{const r=D(),l=D(!1),n=C(()=>t.value instanceof Function),a=C(()=>n.value&&t.value(e.modelValue)||e.modelValue),i=Mr(()=>{o.value&&(l.value=!0)},50),c=Mr(()=>{o.value&&(l.value=!1)},50);return{tooltip:r,tooltipVisible:l,formatValue:a,displayTooltip:i,hideTooltip:c}},ule=(e,t,o)=>{const{disabled:r,min:l,max:n,step:a,showTooltip:i,precision:c,sliderSize:d,formatTooltip:u,emitChange:p,resetSize:h,updateDragging:v}=Ge(w8),{tooltip:m,tooltipVisible:f,formatValue:_,displayTooltip:g,hideTooltip:y}=cle(e,u,i),w=D(),x=C(()=>`${(e.modelValue-l.value)/(n.value-l.value)*100}%`),$=C(()=>e.vertical?{bottom:x.value}:{left:x.value}),T=()=>{t.hovering=!0,g()},R=()=>{t.hovering=!1,t.dragging||y()},P=ne=>{r.value||(ne.preventDefault(),K(ne),window.addEventListener("mousemove",I),window.addEventListener("touchmove",I),window.addEventListener("mouseup",U),window.addEventListener("touchend",U),window.addEventListener("contextmenu",U),w.value.focus())},L=ne=>{r.value||(t.newPosition=Number.parseFloat(x.value)+ne/(n.value-l.value)*100,oe(t.newPosition),p())},V=()=>{L(-a.value)},B=()=>{L(a.value)},j=()=>{L(-a.value*4)},te=()=>{L(a.value*4)},J=()=>{r.value||(oe(0),p())},Z=()=>{r.value||(oe(100),p())},H=ne=>{let ce=!0;[tle,ole].includes(ne.key)?V():[rle,lle].includes(ne.key)?B():ne.key===nle?J():ne.key===ale?Z():ne.key===sle?j():ne.key===ile?te():ce=!1,ce&&ne.preventDefault()},F=ne=>{let ce,Q;return ne.type.startsWith("touch")?(Q=ne.touches[0].clientY,ce=ne.touches[0].clientX):(Q=ne.clientY,ce=ne.clientX),{clientX:ce,clientY:Q}},K=ne=>{t.dragging=!0,t.isClick=!0;const{clientX:ce,clientY:Q}=F(ne);e.vertical?t.startY=Q:t.startX=ce,t.startPosition=Number.parseFloat(x.value),t.newPosition=t.startPosition},I=ne=>{if(t.dragging){t.isClick=!1,g(),h();let ce;const{clientX:Q,clientY:Me}=F(ne);e.vertical?(t.currentY=Me,ce=(t.startY-t.currentY)/d.value*100):(t.currentX=Q,ce=(t.currentX-t.startX)/d.value*100),t.newPosition=t.startPosition+ce,oe(t.newPosition)}},U=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||y(),t.isClick||oe(t.newPosition),p()},0),window.removeEventListener("mousemove",I),window.removeEventListener("touchmove",I),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),window.removeEventListener("contextmenu",U))},oe=async ne=>{if(ne===null||Number.isNaN(+ne))return;ne<0?ne=0:ne>100&&(ne=100);const ce=100/((n.value-l.value)/a.value);let Me=Math.round(ne/ce)*ce*(n.value-l.value)*.01+l.value;Me=Number.parseFloat(Me.toFixed(c.value)),Me!==e.modelValue&&o(St,Me),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await et(),t.dragging&&g(),m.value.updatePopper()};return Se(()=>t.dragging,ne=>{v(ne)}),{disabled:r,button:w,tooltip:m,tooltipVisible:f,showTooltip:i,wrapperStyle:$,formatValue:_,handleMouseEnter:T,handleMouseLeave:R,onButtonDown:P,onKeyDown:H,setPosition:oe}},dle=(e,t,o,r)=>({stops:C(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const a=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),c=Array.from({length:a-1}).map((d,u)=>(u+1)*i);return e.range?c.filter(d=>d<100*(o.value-e.min)/(e.max-e.min)||d>100*(r.value-e.min)/(e.max-e.min)):c.filter(d=>d>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:a=>e.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),ple=(e,t,o,r,l,n)=>{const a=d=>{l(St,d),l(yr,d)},i=()=>e.range?![o.value,r.value].every((d,u)=>d===t.oldValue[u]):e.modelValue!==t.oldValue,c=()=>{var d,u;e.min>e.max&&Io("Slider","min should not be greater than max.");const p=e.modelValue;e.range&&Array.isArray(p)?p[1]e.max?a([e.max,e.max]):p[0]e.max?a([p[0],e.max]):(t.firstValue=p[0],t.secondValue=p[1],i()&&(e.validateEvent&&((d=n==null?void 0:n.validate)==null||d.call(n,"change").catch(h=>void 0)),t.oldValue=p.slice())):!e.range&&typeof p=="number"&&!Number.isNaN(p)&&(pe.max?a(e.max):(t.firstValue=p,i()&&(e.validateEvent&&((u=n==null?void 0:n.validate)==null||u.call(n,"change").catch(h=>void 0)),t.oldValue=p)))};c(),Se(()=>t.dragging,d=>{d||c()}),Se(()=>e.modelValue,(d,u)=>{t.dragging||Array.isArray(d)&&Array.isArray(u)&&d.every((p,h)=>p===u[h])&&t.firstValue===d[0]&&t.secondValue===d[1]||c()},{deep:!0}),Se(()=>[e.min,e.max],()=>{c()})},fle=Pe({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Va,default:"top"}}),hle={[St]:e=>st(e)},vle=["tabindex"],mle=N({...N({name:"ElSliderButton"}),props:fle,emits:hle,setup(e,{expose:t,emit:o}){const r=e,l=ze("slider"),n=Dt({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:i,tooltip:c,showTooltip:d,tooltipVisible:u,wrapperStyle:p,formatValue:h,handleMouseEnter:v,handleMouseLeave:m,onButtonDown:f,onKeyDown:_,setPosition:g}=ule(r,n,o),{hovering:y,dragging:w}=Bo(n);return t({onButtonDown:f,onKeyDown:_,setPosition:g,hovering:y,dragging:w}),(x,$)=>(b(),M("div",{ref_key:"button",ref:i,class:O([s(l).e("button-wrapper"),{hover:s(y),dragging:s(w)}]),style:Je(s(p)),tabindex:s(a)?-1:0,onMouseenter:$[0]||($[0]=(...T)=>s(v)&&s(v)(...T)),onMouseleave:$[1]||($[1]=(...T)=>s(m)&&s(m)(...T)),onMousedown:$[2]||($[2]=(...T)=>s(f)&&s(f)(...T)),onTouchstart:$[3]||($[3]=(...T)=>s(f)&&s(f)(...T)),onFocus:$[4]||($[4]=(...T)=>s(v)&&s(v)(...T)),onBlur:$[5]||($[5]=(...T)=>s(m)&&s(m)(...T)),onKeydown:$[6]||($[6]=(...T)=>s(_)&&s(_)(...T))},[ee(s(ur),{ref_key:"tooltip",ref:c,visible:s(u),placement:x.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":x.tooltipClass,disabled:!s(d),persistent:""},{content:le(()=>[E("span",null,$e(s(h)),1)]),default:le(()=>[E("div",{class:O([s(l).e("button"),{hover:s(y),dragging:s(w)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,vle))}});var y8=Le(mle,[["__file","button.vue"]]);const gle=Pe({mark:{type:ue([String,Object]),default:void 0}});var ble=N({name:"ElSliderMarker",props:gle,setup(e){const t=ze("slider"),o=C(()=>ut(e.mark)?e.mark:e.mark.label),r=C(()=>ut(e.mark)?void 0:e.mark.style);return()=>rt("div",{class:t.e("marks-text"),style:r.value},o.value)}});const _le=["id","role","aria-label","aria-labelledby"],wle={key:1},yle=N({...N({name:"ElSlider"}),props:Xre,emits:Zre,setup(e,{expose:t,emit:o}){const r=e,l=ze("slider"),{t:n}=Rt(),a=Dt({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:c,firstButton:d,secondButton:u,sliderDisabled:p,minValue:h,maxValue:v,runwayStyle:m,barStyle:f,resetSize:_,emitChange:g,onSliderWrapperPrevent:y,onSliderClick:w,onSliderDown:x,setFirstValue:$,setSecondValue:T}=ele(r,a,o),{stops:R,getStopStyle:P}=dle(r,a,h,v),{inputId:L,isLabeledByFormItem:V}=bl(r,{formItemContext:i}),B=So(),j=C(()=>r.inputSize||B.value),te=C(()=>r.label||r.ariaLabel||n("el.slider.defaultLabel",{min:r.min,max:r.max})),J=C(()=>r.range?r.rangeStartLabel||n("el.slider.defaultRangeStartLabel"):te.value),Z=C(()=>r.formatValueText?r.formatValueText(ne.value):`${ne.value}`),H=C(()=>r.rangeEndLabel||n("el.slider.defaultRangeEndLabel")),F=C(()=>r.formatValueText?r.formatValueText(ce.value):`${ce.value}`),K=C(()=>[l.b(),l.m(B.value),l.is("vertical",r.vertical),{[l.m("with-input")]:r.showInput}]),I=Qre(r);ple(r,a,h,v,o,i);const U=C(()=>{const de=[r.min,r.max,r.step].map(_e=>{const me=`${_e}`.split(".")[1];return me?me.length:0});return Math.max.apply(null,de)}),{sliderWrapper:oe}=Jre(r,a,_),{firstValue:ne,secondValue:ce,sliderSize:Q}=Bo(a),Me=de=>{a.dragging=de};return zt(w8,{...Bo(r),sliderSize:Q,disabled:p,precision:U,emitChange:g,resetSize:_,updateDragging:Me}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-slider",ref:"https://element-plus.org/en-US/component/slider.html"},C(()=>!!r.label)),t({onSliderClick:w}),(de,_e)=>{var me,Re;return b(),M("div",{id:de.range?s(L):void 0,ref_key:"sliderWrapper",ref:oe,class:O(s(K)),role:de.range?"group":void 0,"aria-label":de.range&&!s(V)?s(te):void 0,"aria-labelledby":de.range&&s(V)?(me=s(i))==null?void 0:me.labelId:void 0,onTouchstart:_e[2]||(_e[2]=(...Ce)=>s(y)&&s(y)(...Ce)),onTouchmove:_e[3]||(_e[3]=(...Ce)=>s(y)&&s(y)(...Ce))},[E("div",{ref_key:"slider",ref:c,class:O([s(l).e("runway"),{"show-input":de.showInput&&!de.range},s(l).is("disabled",s(p))]),style:Je(s(m)),onMousedown:_e[0]||(_e[0]=(...Ce)=>s(x)&&s(x)(...Ce)),onTouchstart:_e[1]||(_e[1]=(...Ce)=>s(x)&&s(x)(...Ce))},[E("div",{class:O(s(l).e("bar")),style:Je(s(f))},null,6),ee(y8,{id:de.range?void 0:s(L),ref_key:"firstButton",ref:d,"model-value":s(ne),vertical:de.vertical,"tooltip-class":de.tooltipClass,placement:de.placement,role:"slider","aria-label":de.range||!s(V)?s(J):void 0,"aria-labelledby":!de.range&&s(V)?(Re=s(i))==null?void 0:Re.labelId:void 0,"aria-valuemin":de.min,"aria-valuemax":de.range?s(ce):de.max,"aria-valuenow":s(ne),"aria-valuetext":s(Z),"aria-orientation":de.vertical?"vertical":"horizontal","aria-disabled":s(p),"onUpdate:modelValue":s($)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),de.range?(b(),he(y8,{key:0,ref_key:"secondButton",ref:u,"model-value":s(ce),vertical:de.vertical,"tooltip-class":de.tooltipClass,placement:de.placement,role:"slider","aria-label":s(H),"aria-valuemin":s(ne),"aria-valuemax":de.max,"aria-valuenow":s(ce),"aria-valuetext":s(F),"aria-orientation":de.vertical?"vertical":"horizontal","aria-disabled":s(p),"onUpdate:modelValue":s(T)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):se("v-if",!0),de.showStops?(b(),M("div",wle,[(b(!0),M(Qe,null,It(s(R),(Ce,Ee)=>(b(),M("div",{key:Ee,class:O(s(l).e("stop")),style:Je(s(P)(Ce))},null,6))),128))])):se("v-if",!0),s(I).length>0?(b(),M(Qe,{key:2},[E("div",null,[(b(!0),M(Qe,null,It(s(I),(Ce,Ee)=>(b(),M("div",{key:Ee,style:Je(s(P)(Ce.position)),class:O([s(l).e("stop"),s(l).e("marks-stop")])},null,6))),128))]),E("div",{class:O(s(l).e("marks"))},[(b(!0),M(Qe,null,It(s(I),(Ce,Ee)=>(b(),he(s(ble),{key:Ee,mark:Ce.mark,style:Je(s(P)(Ce.position))},null,8,["mark","style"]))),128))],2)],64)):se("v-if",!0)],38),de.showInput&&!de.range?(b(),he(s(Ly),{key:0,ref:"input","model-value":s(ne),class:O(s(l).e("input")),step:de.step,disabled:s(p),controls:de.showInputControls,min:de.min,max:de.max,debounce:de.debounce,size:s(j),"onUpdate:modelValue":s($),onChange:s(g)},null,8,["model-value","class","step","disabled","controls","min","max","debounce","size","onUpdate:modelValue","onChange"])):se("v-if",!0)],42,_le)}}});var xle=Le(yle,[["__file","slider.vue"]]);const kle=yt(xle),Cle=Pe({prefixCls:{type:String}}),x8=N({name:"ElSpaceItem",props:Cle,setup(e,{slots:t}){const o=ze("space"),r=C(()=>`${e.prefixCls||o.b()}__item`);return()=>rt("div",{class:r.value},be(t,"default"))}}),k8={small:8,default:12,large:16};function Sle(e){const t=ze("space"),o=C(()=>[t.b(),t.m(e.direction),e.class]),r=D(0),l=D(0),n=C(()=>{const i=e.wrap||e.fill?{flexWrap:"wrap"}:{},c={alignItems:e.alignment},d={rowGap:`${l.value}px`,columnGap:`${r.value}px`};return[i,c,d,e.style]}),a=C(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return Go(()=>{const{size:i="small",wrap:c,direction:d,fill:u}=e;if(Ke(i)){const[p=0,h=0]=i;r.value=p,l.value=h}else{let p;st(i)?p=i:p=k8[i||"small"]||k8.small,(c||u)&&d==="horizontal"?r.value=l.value=p:d==="horizontal"?(r.value=p,l.value=0):(l.value=p,r.value=0)}}),{classes:o,containerStyle:n,itemStyle:a}}const Ele=Pe({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:ue([String,Object,Array]),default:""},style:{type:ue([String,Array,Object]),default:""},alignment:{type:ue(String),default:"center"},prefixCls:{type:String},spacer:{type:ue([Object,String,Number,Array]),default:null,validator:e=>io(e)||st(e)||ut(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Rl,validator:e=>st(e)||Ke(e)&&e.length===2&&e.every(st)}}),Tle=yt(N({name:"ElSpace",props:Ele,setup(e,{slots:t}){const{classes:o,containerStyle:r,itemStyle:l}=Sle(e);function n(a,i="",c=[]){const{prefixCls:d}=e;return a.forEach((u,p)=>{yh(u)?Ke(u.children)&&u.children.forEach((h,v)=>{yh(h)&&Ke(h.children)?n(h.children,`${i+v}-`,c):c.push(ee(x8,{style:l.value,prefixCls:d,key:`nested-${i+v}`},{default:()=>[h]},Qr.PROPS|Qr.STYLE,["style","prefixCls"]))}):iF(u)&&c.push(ee(x8,{style:l.value,prefixCls:d,key:`LoopKey${i+p}`},{default:()=>[u]},Qr.PROPS|Qr.STYLE,["style","prefixCls"]))}),c}return()=>{var a;const{spacer:i,direction:c}=e,d=be(t,"default",{key:0},()=>[]);if(((a=d.children)!=null?a:[]).length===0)return null;if(Ke(d.children)){let u=n(d.children);if(i){const p=u.length-1;u=u.reduce((h,v,m)=>{const f=[...h,v];return m!==p&&f.push(ee("span",{style:[l.value,c==="vertical"?"width: 100%":null],key:m},[io(i)?i:Ct(i,Qr.TEXT)],Qr.STYLE)),f},[])}return ee("div",{class:o.value,style:r.value},u,Qr.STYLE|Qr.CLASS)}return d.children}}})),$le=Pe({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:ue([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:ue([String,Object,Array])}}),Mle=N({...N({name:"ElStatistic"}),props:$le,setup(e,{expose:t}){const o=e,r=ze("statistic"),l=C(()=>{const{value:n,formatter:a,precision:i,decimalSeparator:c,groupSeparator:d}=o;if(it(a))return a(n);if(!st(n))return n;let[u,p=""]=String(n).split(".");return p=p.padEnd(i,"0").slice(0,i>0?i:0),u=u.replace(/\B(?=(\d{3})+(?!\d))/g,d),[u,p].join(p?c:"")});return t({displayValue:l}),(n,a)=>(b(),M("div",{class:O(s(r).b())},[n.$slots.title||n.title?(b(),M("div",{key:0,class:O(s(r).e("head"))},[be(n.$slots,"title",{},()=>[Ct($e(n.title),1)])],2)):se("v-if",!0),E("div",{class:O(s(r).e("content"))},[n.$slots.prefix||n.prefix?(b(),M("div",{key:0,class:O(s(r).e("prefix"))},[be(n.$slots,"prefix",{},()=>[E("span",null,$e(n.prefix),1)])],2)):se("v-if",!0),E("span",{class:O(s(r).e("number")),style:Je(n.valueStyle)},$e(s(l)),7),n.$slots.suffix||n.suffix?(b(),M("div",{key:1,class:O(s(r).e("suffix"))},[be(n.$slots,"suffix",{},()=>[E("span",null,$e(n.suffix),1)])],2)):se("v-if",!0)],2)],2))}});var Ale=Le(Mle,[["__file","statistic.vue"]]);const C8=yt(Ale),zle=Pe({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:ue([Number,Object]),default:0},valueStyle:{type:ue([String,Object,Array])}}),Ile={finish:()=>!0,[ro]:e=>st(e)},Ole=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],S8=e=>st(e)?new Date(e).getTime():e.valueOf(),E8=(e,t)=>{let o=e;const r=/\[([^\]]*)]/g;return Ole.reduce((n,[a,i])=>{const c=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(c.test(n)){const d=Math.floor(o/i);return o-=d*i,n.replace(c,u=>String(d).padStart(u.length,"0"))}return n},t).replace(r,"$1")},Nle=N({...N({name:"ElCountdown"}),props:zle,emits:Ile,setup(e,{expose:t,emit:o}){const r=e;let l;const n=D(S8(r.value)-Date.now()),a=C(()=>E8(n.value,r.format)),i=u=>E8(u,r.format),c=()=>{l&&(Pa(l),l=void 0)},d=()=>{const u=S8(r.value),p=()=>{let h=u-Date.now();o("change",h),h<=0?(h=0,c(),o("finish")):l=Xn(p),n.value=h};l=Xn(p)};return Se(()=>[r.value,r.format],()=>{c(),d()},{immediate:!0}),to(()=>{c()}),t({displayValue:a}),(u,p)=>(b(),he(s(C8),{value:n.value,title:u.title,prefix:u.prefix,suffix:u.suffix,"value-style":u.valueStyle,formatter:i},ln({_:2},[It(u.$slots,(h,v)=>({name:v,fn:le(()=>[be(u.$slots,v)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var Ple=Le(Nle,[["__file","countdown.vue"]]);const Rle=yt(Ple),Lle=Pe({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),Ble={[ro]:(e,t)=>[e,t].every(st)},Vle=N({...N({name:"ElSteps"}),props:Lle,emits:Ble,setup(e,{emit:t}){const o=e,r=ze("steps"),{children:l,addChild:n,removeChild:a}=Wh(wt(),"ElStep");return Se(l,()=>{l.value.forEach((i,c)=>{i.setIndex(c)})}),zt("ElSteps",{props:o,steps:l,addStep:n,removeStep:a}),Se(()=>o.active,(i,c)=>{t(ro,i,c)}),(i,c)=>(b(),M("div",{class:O([s(r).b(),s(r).m(i.simple?"simple":i.direction)])},[be(i.$slots,"default")],2))}});var Dle=Le(Vle,[["__file","steps.vue"]]);const Hle=Pe({title:{type:String,default:""},icon:{type:Xt},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),Fle=N({...N({name:"ElStep"}),props:Hle,setup(e){const t=e,o=ze("step"),r=D(-1),l=D({}),n=D(""),a=Ge("ElSteps"),i=wt();ft(()=>{Se([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([T])=>{x(T)},{immediate:!0})}),to(()=>{a.removeStep($.uid)});const c=C(()=>t.status||n.value),d=C(()=>{const T=a.steps.value[r.value-1];return T?T.currentStatus:"wait"}),u=C(()=>a.props.alignCenter),p=C(()=>a.props.direction==="vertical"),h=C(()=>a.props.simple),v=C(()=>a.steps.value.length),m=C(()=>{var T;return((T=a.steps.value[v.value-1])==null?void 0:T.uid)===(i==null?void 0:i.uid)}),f=C(()=>h.value?"":a.props.space),_=C(()=>[o.b(),o.is(h.value?"simple":a.props.direction),o.is("flex",m.value&&!f.value&&!u.value),o.is("center",u.value&&!p.value&&!h.value)]),g=C(()=>{const T={flexBasis:st(f.value)?`${f.value}px`:f.value?f.value:`${100/(v.value-(u.value?0:1))}%`};return p.value||m.value&&(T.maxWidth=`${100/v.value}%`),T}),y=T=>{r.value=T},w=T=>{const R=T==="wait",P={transitionDelay:`${R?"-":""}${150*r.value}ms`},L=T===a.props.processStatus||R?0:100;P.borderWidth=L&&!h.value?"1px":0,P[a.props.direction==="vertical"?"height":"width"]=`${L}%`,l.value=P},x=T=>{T>r.value?n.value=a.props.finishStatus:T===r.value&&d.value!=="error"?n.value=a.props.processStatus:n.value="wait";const R=a.steps.value[r.value-1];R&&R.calcProgress(n.value)},$=Dt({uid:i.uid,currentStatus:c,setIndex:y,calcProgress:w});return a.addStep($),(T,R)=>(b(),M("div",{style:Je(s(g)),class:O(s(_))},[se(" icon & line "),E("div",{class:O([s(o).e("head"),s(o).is(s(c))])},[s(h)?se("v-if",!0):(b(),M("div",{key:0,class:O(s(o).e("line"))},[E("i",{class:O(s(o).e("line-inner")),style:Je(l.value)},null,6)],2)),E("div",{class:O([s(o).e("icon"),s(o).is(T.icon||T.$slots.icon?"icon":"text")])},[be(T.$slots,"icon",{},()=>[T.icon?(b(),he(s(Ze),{key:0,class:O(s(o).e("icon-inner"))},{default:le(()=>[(b(),he(Et(T.icon)))]),_:1},8,["class"])):s(c)==="success"?(b(),he(s(Ze),{key:1,class:O([s(o).e("icon-inner"),s(o).is("status")])},{default:le(()=>[ee(s(Li))]),_:1},8,["class"])):s(c)==="error"?(b(),he(s(Ze),{key:2,class:O([s(o).e("icon-inner"),s(o).is("status")])},{default:le(()=>[ee(s(Jr))]),_:1},8,["class"])):s(h)?se("v-if",!0):(b(),M("div",{key:3,class:O(s(o).e("icon-inner"))},$e(r.value+1),3))])],2)],2),se(" title & description "),E("div",{class:O(s(o).e("main"))},[E("div",{class:O([s(o).e("title"),s(o).is(s(c))])},[be(T.$slots,"title",{},()=>[Ct($e(T.title),1)])],2),s(h)?(b(),M("div",{key:0,class:O(s(o).e("arrow"))},null,2)):(b(),M("div",{key:1,class:O([s(o).e("description"),s(o).is(s(c))])},[be(T.$slots,"description",{},()=>[Ct($e(T.description),1)])],2))],2)],6))}});var T8=Le(Fle,[["__file","item.vue"]]);const jle=yt(Dle,{Step:T8}),Kle=co(T8),Ule=Pe({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:t6},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},inactiveActionIcon:{type:Xt},activeActionIcon:{type:Xt},activeIcon:{type:Xt},inactiveIcon:{type:Xt},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:ue(Function)},id:String,tabindex:{type:[String,Number]},label:{type:String,default:void 0},...Zo(["ariaLabel"])}),Wle={[St]:e=>Co(e)||ut(e)||st(e),[ro]:e=>Co(e)||ut(e)||st(e),[yr]:e=>Co(e)||ut(e)||st(e)},qle=["onClick"],Yle=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"],Gle=["aria-hidden"],Xle=["aria-hidden"],Zle=["aria-hidden"],$8="ElSwitch",Jle=N({...N({name:$8}),props:Ule,emits:Wle,setup(e,{expose:t,emit:o}){const r=e,{formItem:l}=sr(),n=So(),a=ze("switch"),{inputId:i}=bl(r,{formItemContext:l}),c=xr(C(()=>r.loading)),d=D(r.modelValue!==!1),u=D(),p=D(),h=C(()=>[a.b(),a.m(n.value),a.is("disabled",c.value),a.is("checked",g.value)]),v=C(()=>[a.e("label"),a.em("label","left"),a.is("active",!g.value)]),m=C(()=>[a.e("label"),a.em("label","right"),a.is("active",g.value)]),f=C(()=>({width:mo(r.width)}));Se(()=>r.modelValue,()=>{d.value=!0});const _=C(()=>d.value?r.modelValue:!1),g=C(()=>_.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(_.value)||(o(St,r.inactiveValue),o(ro,r.inactiveValue),o(yr,r.inactiveValue)),Se(g,$=>{var T;u.value.checked=$,r.validateEvent&&((T=l==null?void 0:l.validate)==null||T.call(l,"change").catch(R=>void 0))});const y=()=>{const $=g.value?r.inactiveValue:r.activeValue;o(St,$),o(ro,$),o(yr,$),et(()=>{u.value.checked=g.value})},w=()=>{if(c.value)return;const{beforeChange:$}=r;if(!$){y();return}const T=$();[Es(T),Co(T)].includes(!0)||Io($8,"beforeChange must return type `Promise` or `boolean`"),Es(T)?T.then(P=>{P&&y()}).catch(P=>{}):T&&y()},x=()=>{var $,T;(T=($=u.value)==null?void 0:$.focus)==null||T.call($)};return ft(()=>{u.value.checked=g.value}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-switch",ref:"https://element-plus.org/en-US/component/switch.html"},C(()=>!!r.label)),t({focus:x,checked:g}),($,T)=>(b(),M("div",{class:O(s(h)),onClick:ct(w,["prevent"])},[E("input",{id:s(i),ref_key:"input",ref:u,class:O(s(a).e("input")),type:"checkbox",role:"switch","aria-checked":s(g),"aria-disabled":s(c),"aria-label":$.label||$.ariaLabel,name:$.name,"true-value":$.activeValue,"false-value":$.inactiveValue,disabled:s(c),tabindex:$.tabindex,onChange:y,onKeydown:Gt(w,["enter"])},null,42,Yle),!$.inlinePrompt&&($.inactiveIcon||$.inactiveText)?(b(),M("span",{key:0,class:O(s(v))},[$.inactiveIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.inactiveIcon)))]),_:1})):se("v-if",!0),!$.inactiveIcon&&$.inactiveText?(b(),M("span",{key:1,"aria-hidden":s(g)},$e($.inactiveText),9,Gle)):se("v-if",!0)],2)):se("v-if",!0),E("span",{ref_key:"core",ref:p,class:O(s(a).e("core")),style:Je(s(f))},[$.inlinePrompt?(b(),M("div",{key:0,class:O(s(a).e("inner"))},[$.activeIcon||$.inactiveIcon?(b(),he(s(Ze),{key:0,class:O(s(a).is("icon"))},{default:le(()=>[(b(),he(Et(s(g)?$.activeIcon:$.inactiveIcon)))]),_:1},8,["class"])):$.activeText||$.inactiveText?(b(),M("span",{key:1,class:O(s(a).is("text")),"aria-hidden":!s(g)},$e(s(g)?$.activeText:$.inactiveText),11,Xle)):se("v-if",!0)],2)):se("v-if",!0),E("div",{class:O(s(a).e("action"))},[$.loading?(b(),he(s(Ze),{key:0,class:O(s(a).is("loading"))},{default:le(()=>[ee(s(vn))]),_:1},8,["class"])):s(g)?be($.$slots,"active-action",{key:1},()=>[$.activeActionIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.activeActionIcon)))]),_:1})):se("v-if",!0)]):s(g)?se("v-if",!0):be($.$slots,"inactive-action",{key:2},()=>[$.inactiveActionIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.inactiveActionIcon)))]),_:1})):se("v-if",!0)])],2)],6),!$.inlinePrompt&&($.activeIcon||$.activeText)?(b(),M("span",{key:1,class:O(s(m))},[$.activeIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.activeIcon)))]),_:1})):se("v-if",!0),!$.activeIcon&&$.activeText?(b(),M("span",{key:1,"aria-hidden":!s(g)},$e($.activeText),9,Zle)):se("v-if",!0)],2)):se("v-if",!0)],10,qle))}});var Qle=Le(Jle,[["__file","switch.vue"]]);const ene=yt(Qle),h2=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},tne=function(e,t,o,r,l){if(!t&&!r&&(!l||Array.isArray(l)&&!l.length))return e;typeof o=="string"?o=o==="descending"?-1:1:o=o&&o<0?-1:1;const n=r?null:function(i,c){return l?(Array.isArray(l)||(l=[l]),l.map(d=>typeof d=="string"?wo(i,d):d(i,c,e))):(t!=="$key"&&xt(i)&&"$value"in i&&(i=i.$value),[xt(i)?wo(i,t):i])},a=function(i,c){if(r)return r(i.value,c.value);for(let d=0,u=i.key.length;dc.key[d])return 1}return 0};return e.map((i,c)=>({value:i,index:c,key:n?n(i,c):null})).sort((i,c)=>{let d=a(i,c);return d||(d=i.index-c.index),d*+o}).map(i=>i.value)},M8=function(e,t){let o=null;return e.columns.forEach(r=>{r.id===t&&(o=r)}),o},one=function(e,t){let o=null;for(let r=0;r{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const o=t.split(".");let r=e;for(const l of o)r=r[l];return`${r}`}else if(typeof t=="function")return t.call(null,e)},ei=function(e,t){const o={};return(e||[]).forEach((r,l)=>{o[tr(r,t)]={row:r,index:l}}),o};function rne(e,t){const o={};let r;for(r in e)o[r]=e[r];for(r in t)if(Pt(t,r)){const l=t[r];typeof l<"u"&&(o[r]=l)}return o}function v2(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function z8(e){return e===""||e!==void 0&&(e=v2(e),Number.isNaN(e)&&(e=80)),e}function lne(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function nne(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...r)=>t(o(...r)))}function Uc(e,t,o){let r=!1;const l=e.indexOf(t),n=l!==-1,a=i=>{i==="add"?e.push(t):e.splice(l,1),r=!0,Ke(t.children)&&t.children.forEach(c=>{Uc(e,c,o??!n)})};return Co(o)?o&&!n?a("add"):!o&&n&&a("remove"):a(n?"remove":"add"),r}function ane(e,t,o="children",r="hasChildren"){const l=a=>!(Array.isArray(a)&&a.length);function n(a,i,c){t(a,i,c),i.forEach(d=>{if(d[r]){t(d,null,c+1);return}const u=d[o];l(u)||n(d,u,c+1)})}e.forEach(a=>{if(a[r]){t(a,null,0);return}const i=a[o];l(i)||n(a,i,0)})}let nl=null;function ine(e,t,o,r){if((nl==null?void 0:nl.trigger)===o)return;nl==null||nl();const l=r==null?void 0:r.refs.tableWrapper,n=l==null?void 0:l.dataset.prefix,a={strategy:"fixed",...e.popperOptions},i=ee(ur,{content:t,virtualTriggering:!0,virtualRef:o,appendTo:l,placement:"top",transition:"none",offset:0,hideAfter:0,...e,popperOptions:a,onHide:()=>{nl==null||nl()}});i.appContext={...r.appContext,...r};const c=document.createElement("div");jn(i,c),i.component.exposed.onOpen();const d=l==null?void 0:l.querySelector(`.${n}-scrollbar__wrap`);nl=()=>{jn(null,c),d==null||d.removeEventListener("scroll",nl),nl=null},nl.trigger=o,d==null||d.addEventListener("scroll",nl)}function I8(e){return e.children?$z(e.children,I8):[e]}function O8(e,t){return e+t.colSpan}const N8=(e,t,o,r)=>{let l=0,n=e;const a=o.states.columns.value;if(r){const c=I8(r[e]);l=a.slice(0,a.indexOf(c[0])).reduce(O8,0),n=l+c.reduce(O8,0)-1}else l=e;let i;switch(t){case"left":n=a.length-o.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:n=a.length-o.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:l,after:n}:{}},m2=(e,t,o,r,l,n=0)=>{const a=[],{direction:i,start:c,after:d}=N8(t,o,r,l);if(i){const u=i==="left";a.push(`${e}-fixed-column--${i}`),u&&d+n===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!u&&c-n===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function P8(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const g2=(e,t,o,r)=>{const{direction:l,start:n=0,after:a=0}=N8(e,t,o,r);if(!l)return;const i={},c=l==="left",d=o.states.columns.value;return c?i.left=d.slice(0,n).reduce(P8,0):i.right=d.slice(a+1).reverse().reduce(P8,0),i},ds=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function sne(e){const t=wt(),o=D(!1),r=D([]);return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(o.value)r.value=c.slice();else if(d){const u=ei(r.value,d);r.value=c.reduce((p,h)=>{const v=tr(h,d);return u[v]&&p.push(h),p},[])}else r.value=[]},toggleRowExpansion:(c,d)=>{Uc(r.value,c,d)&&t.emit("expand-change",c,r.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],u=e.rowKey.value,p=ei(d,u);r.value=c.reduce((h,v)=>{const m=p[v];return m&&h.push(m.row),h},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!ei(r.value,d)[tr(c,d)]:r.value.includes(c)},states:{expandRows:r,defaultExpandAll:o}}}function cne(e){const t=wt(),o=D(null),r=D(null),l=d=>{t.store.assertRowKey(),o.value=d,a(d)},n=()=>{o.value=null},a=d=>{const{data:u,rowKey:p}=e;let h=null;p.value&&(h=(s(u)||[]).find(v=>tr(v,p.value)===d)),r.value=h,t.emit("current-change",r.value,null)};return{setCurrentRowKey:l,restoreCurrentRowKey:n,setCurrentRowByKey:a,updateCurrentRow:d=>{const u=r.value;if(d&&d!==u){r.value=d,t.emit("current-change",r.value,u);return}!d&&u&&(r.value=null,t.emit("current-change",null,u))},updateCurrentRowData:()=>{const d=e.rowKey.value,u=e.data.value||[],p=r.value;if(!u.includes(p)&&p){if(d){const h=tr(p,d);a(h)}else r.value=null;r.value===null&&t.emit("current-change",null,p)}else o.value&&(a(o.value),n())},states:{_currentRowKey:o,currentRow:r}}}function une(e){const t=D([]),o=D({}),r=D(16),l=D(!1),n=D({}),a=D("hasChildren"),i=D("children"),c=wt(),d=C(()=>{if(!e.rowKey.value)return{};const g=e.data.value||[];return p(g)}),u=C(()=>{const g=e.rowKey.value,y=Object.keys(n.value),w={};return y.length&&y.forEach(x=>{if(n.value[x].length){const $={children:[]};n.value[x].forEach(T=>{const R=tr(T,g);$.children.push(R),T[a.value]&&!w[R]&&(w[R]={children:[]})}),w[x]=$}}),w}),p=g=>{const y=e.rowKey.value,w={};return ane(g,(x,$,T)=>{const R=tr(x,y);Array.isArray($)?w[R]={children:$.map(P=>tr(P,y)),level:T}:l.value&&(w[R]={children:[],lazy:!0,level:T})},i.value,a.value),w},h=(g=!1,y=(w=>(w=c.store)==null?void 0:w.states.defaultExpandAll.value)())=>{var w;const x=d.value,$=u.value,T=Object.keys(x),R={};if(T.length){const P=s(o),L=[],V=(j,te)=>{if(g)return t.value?y||t.value.includes(te):!!(y||j!=null&&j.expanded);{const J=y||t.value&&t.value.includes(te);return!!(j!=null&&j.expanded||J)}};T.forEach(j=>{const te=P[j],J={...x[j]};if(J.expanded=V(te,j),J.lazy){const{loaded:Z=!1,loading:H=!1}=te||{};J.loaded=!!Z,J.loading=!!H,L.push(j)}R[j]=J});const B=Object.keys($);l.value&&B.length&&L.length&&B.forEach(j=>{const te=P[j],J=$[j].children;if(L.includes(j)){if(R[j].children.length!==0)throw new Error("[ElTable]children must be an empty array.");R[j].children=J}else{const{loaded:Z=!1,loading:H=!1}=te||{};R[j]={lazy:!0,loaded:!!Z,loading:!!H,expanded:V(te,j),children:J,level:""}}})}o.value=R,(w=c.store)==null||w.updateTableScrollY()};Se(()=>t.value,()=>{h(!0)}),Se(()=>d.value,()=>{h()}),Se(()=>u.value,()=>{h()});const v=g=>{t.value=g,h()},m=(g,y)=>{c.store.assertRowKey();const w=e.rowKey.value,x=tr(g,w),$=x&&o.value[x];if(x&&$&&"expanded"in $){const T=$.expanded;y=typeof y>"u"?!$.expanded:y,o.value[x].expanded=y,T!==y&&c.emit("expand-change",g,y),c.store.updateTableScrollY()}},f=g=>{c.store.assertRowKey();const y=e.rowKey.value,w=tr(g,y),x=o.value[w];l.value&&x&&"loaded"in x&&!x.loaded?_(g,w,x):m(g,void 0)},_=(g,y,w)=>{const{load:x}=c.props;x&&!o.value[y].loaded&&(o.value[y].loading=!0,x(g,w,$=>{if(!Array.isArray($))throw new TypeError("[ElTable] data must be an array");o.value[y].loading=!1,o.value[y].loaded=!0,o.value[y].expanded=!0,$.length&&(n.value[y]=$),c.emit("expand-change",g,!0)}))};return{loadData:_,loadOrToggle:f,toggleTreeExpansion:m,updateTreeExpandKeys:v,updateTreeData:h,normalize:p,states:{expandRowKeys:t,treeData:o,indent:r,lazy:l,lazyTreeNodeMap:n,lazyColumnIdentifier:a,childrenColumnName:i}}}const dne=(e,t)=>{const o=t.sortingColumn;return!o||typeof o.sortable=="string"?e:tne(e,t.sortProp,t.sortOrder,o.sortMethod,o.sortBy)},Pp=e=>{const t=[];return e.forEach(o=>{o.children&&o.children.length>0?t.push.apply(t,Pp(o.children)):t.push(o)}),t};function pne(){var e;const t=wt(),{size:o}=Bo((e=t.proxy)==null?void 0:e.$props),r=D(null),l=D([]),n=D([]),a=D(!1),i=D([]),c=D([]),d=D([]),u=D([]),p=D([]),h=D([]),v=D([]),m=D([]),f=[],_=D(0),g=D(0),y=D(0),w=D(!1),x=D([]),$=D(!1),T=D(!1),R=D(null),P=D({}),L=D(null),V=D(null),B=D(null),j=D(null),te=D(null);Se(l,()=>t.state&&F(!1),{deep:!0});const J=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},Z=Y=>{var S;(S=Y.children)==null||S.forEach(A=>{A.fixed=Y.fixed,Z(A)})},H=()=>{i.value.forEach(X=>{Z(X)}),u.value=i.value.filter(X=>X.fixed===!0||X.fixed==="left"),p.value=i.value.filter(X=>X.fixed==="right"),u.value.length>0&&i.value[0]&&i.value[0].type==="selection"&&!i.value[0].fixed&&(i.value[0].fixed=!0,u.value.unshift(i.value[0]));const Y=i.value.filter(X=>!X.fixed);c.value=[].concat(u.value).concat(Y).concat(p.value);const S=Pp(Y),A=Pp(u.value),G=Pp(p.value);_.value=S.length,g.value=A.length,y.value=G.length,d.value=[].concat(A).concat(S).concat(G),a.value=u.value.length>0||p.value.length>0},F=(Y,S=!1)=>{Y&&H(),S?t.state.doLayout():t.state.debouncedUpdateLayout()},K=Y=>x.value.includes(Y),I=()=>{w.value=!1;const Y=x.value;x.value=[],Y.length&&t.emit("selection-change",[])},U=()=>{let Y;if(r.value){Y=[];const S=ei(x.value,r.value),A=ei(l.value,r.value);for(const G in S)Pt(S,G)&&!A[G]&&Y.push(S[G].row)}else Y=x.value.filter(S=>!l.value.includes(S));if(Y.length){const S=x.value.filter(A=>!Y.includes(A));x.value=S,t.emit("selection-change",S.slice())}},oe=()=>(x.value||[]).slice(),ne=(Y,S=void 0,A=!0)=>{if(Uc(x.value,Y,S)){const X=(x.value||[]).slice();A&&t.emit("select",X,Y),t.emit("selection-change",X)}},ce=()=>{var Y,S;const A=T.value?!w.value:!(w.value||x.value.length);w.value=A;let G=!1,X=0;const re=(S=(Y=t==null?void 0:t.store)==null?void 0:Y.states)==null?void 0:S.rowKey.value;l.value.forEach((ge,fe)=>{const Fe=fe+X;R.value?R.value.call(null,ge,Fe)&&Uc(x.value,ge,A)&&(G=!0):Uc(x.value,ge,A)&&(G=!0),X+=de(tr(ge,re))}),G&&t.emit("selection-change",x.value?x.value.slice():[]),t.emit("select-all",(x.value||[]).slice())},Q=()=>{const Y=ei(x.value,r.value);l.value.forEach(S=>{const A=tr(S,r.value),G=Y[A];G&&(x.value[G.index]=S)})},Me=()=>{var Y,S,A;if(((Y=l.value)==null?void 0:Y.length)===0){w.value=!1;return}let G;r.value&&(G=ei(x.value,r.value));const X=function(Fe){return G?!!G[tr(Fe,r.value)]:x.value.includes(Fe)};let re=!0,ge=0,fe=0;for(let Fe=0,at=(l.value||[]).length;Fe{var S;if(!t||!t.store)return 0;const{treeData:A}=t.store.states;let G=0;const X=(S=A.value[Y])==null?void 0:S.children;return X&&(G+=X.length,X.forEach(re=>{G+=de(re)})),G},_e=(Y,S)=>{Array.isArray(Y)||(Y=[Y]);const A={};return Y.forEach(G=>{P.value[G.id]=S,A[G.columnKey||G.id]=S}),A},me=(Y,S,A)=>{V.value&&V.value!==Y&&(V.value.order=null),V.value=Y,B.value=S,j.value=A},Re=()=>{let Y=s(n);Object.keys(P.value).forEach(S=>{const A=P.value[S];if(!A||A.length===0)return;const G=M8({columns:d.value},S);G&&G.filterMethod&&(Y=Y.filter(X=>A.some(re=>G.filterMethod.call(null,re,X,G))))}),L.value=Y},Ce=()=>{l.value=dne(L.value,{sortingColumn:V.value,sortProp:B.value,sortOrder:j.value})},Ee=(Y=void 0)=>{Y&&Y.filter||Re(),Ce()},De=Y=>{const{tableHeaderRef:S}=t.refs;if(!S)return;const A=Object.assign({},S.filterPanels),G=Object.keys(A);if(G.length)if(typeof Y=="string"&&(Y=[Y]),Array.isArray(Y)){const X=Y.map(re=>one({columns:d.value},re));G.forEach(re=>{const ge=X.find(fe=>fe.id===re);ge&&(ge.filteredValue=[])}),t.store.commit("filterChange",{column:X,values:[],silent:!0,multi:!0})}else G.forEach(X=>{const re=d.value.find(ge=>ge.id===X);re&&(re.filteredValue=[])}),P.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},ae=()=>{V.value&&(me(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:pe,toggleRowExpansion:ke,updateExpandRows:Oe,states:we,isRowExpanded:Te}=sne({data:l,rowKey:r}),{updateTreeExpandKeys:Ne,toggleTreeExpansion:Ie,updateTreeData:Ae,loadOrToggle:xe,states:We}=une({data:l,rowKey:r}),{updateCurrentRowData:qe,updateCurrentRow:ye,setCurrentRowKey:Ye,states:tt}=cne({data:l,rowKey:r});return{assertRowKey:J,updateColumns:H,scheduleLayout:F,isSelected:K,clearSelection:I,cleanSelection:U,getSelectionRows:oe,toggleRowSelection:ne,_toggleAllSelection:ce,toggleAllSelection:null,updateSelectionByRowKey:Q,updateAllSelected:Me,updateFilters:_e,updateCurrentRow:ye,updateSort:me,execFilter:Re,execSort:Ce,execQuery:Ee,clearFilter:De,clearSort:ae,toggleRowExpansion:ke,setExpandRowKeysAdapter:Y=>{pe(Y),Ne(Y)},setCurrentRowKey:Ye,toggleRowExpansionAdapter:(Y,S)=>{d.value.some(({type:G})=>G==="expand")?ke(Y,S):Ie(Y,S)},isRowExpanded:Te,updateExpandRows:Oe,updateCurrentRowData:qe,loadOrToggle:xe,updateTreeData:Ae,states:{tableSize:o,rowKey:r,data:l,_data:n,isComplex:a,_columns:i,originColumns:c,columns:d,fixedColumns:u,rightFixedColumns:p,leafColumns:h,fixedLeafColumns:v,rightFixedLeafColumns:m,updateOrderFns:f,leafColumnsLength:_,fixedLeafColumnsLength:g,rightFixedLeafColumnsLength:y,isAllSelected:w,selection:x,reserveSelection:$,selectOnIndeterminate:T,selectable:R,filters:P,filteredData:L,sortingColumn:V,sortProp:B,sortOrder:j,hoverRow:te,...we,...We,...tt}}}function b2(e,t){return e.map(o=>{var r;return o.id===t.id?t:((r=o.children)!=null&&r.length&&(o.children=b2(o.children,t)),o)})}function _2(e){e.forEach(t=>{var o,r;t.no=(o=t.getColumnIndex)==null?void 0:o.call(t),(r=t.children)!=null&&r.length&&_2(t.children)}),e.sort((t,o)=>t.no-o.no)}function fne(){const e=wt(),t=pne();return{ns:ze("table"),...t,mutations:{setData(a,i){const c=s(a._data)!==i;a.data.value=i,a._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),s(a.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(a,i,c,d){const u=s(a._columns);let p=[];c?(c&&!c.children&&(c.children=[]),c.children.push(i),p=b2(u,c)):(u.push(i),p=u),_2(p),a._columns.value=p,a.updateOrderFns.push(d),i.type==="selection"&&(a.selectable.value=i.selectable,a.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(a,i){var c;((c=i.getColumnIndex)==null?void 0:c.call(i))!==i.no&&(_2(a._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(a,i,c,d){const u=s(a._columns)||[];if(c)c.children.splice(c.children.findIndex(h=>h.id===i.id),1),et(()=>{var h;((h=c.children)==null?void 0:h.length)===0&&delete c.children}),a._columns.value=b2(u,c);else{const h=u.indexOf(i);h>-1&&(u.splice(h,1),a._columns.value=u)}const p=a.updateOrderFns.indexOf(d);p>-1&&a.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(a,i){const{prop:c,order:d,init:u}=i;if(c){const p=s(a.columns).find(h=>h.property===c);p&&(p.order=d,e.store.updateSort(p,c,d),e.store.commit("changeSortCondition",{init:u}))}},changeSortCondition(a,i){const{sortingColumn:c,sortProp:d,sortOrder:u}=a,p=s(c),h=s(d),v=s(u);v===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const m={filter:!0};e.store.execQuery(m),(!i||!(i.silent||i.init))&&e.emit("sort-change",{column:p,prop:h,order:v}),e.store.updateTableScrollY()},filterChange(a,i){const{column:c,values:d,silent:u}=i,p=e.store.updateFilters(c,d);e.store.execQuery(),u||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(a,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(a,i){a.hoverRow.value=i},setCurrentRow(a,i){e.store.updateCurrentRow(i)}},commit:function(a,...i){const c=e.store.mutations;if(c[a])c[a].apply(e,[e.store.states].concat(i));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){et(()=>e.layout.updateScrollY.apply(e.layout))}}}const Wc={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function hne(e,t){if(!e)throw new Error("Table is required.");const o=fne();return o.toggleAllSelection=Mr(o._toggleAllSelection,10),Object.keys(Wc).forEach(r=>{R8(L8(t,r),r,o)}),vne(o,t),o}function vne(e,t){Object.keys(Wc).forEach(o=>{Se(()=>L8(t,o),r=>{R8(r,o,e)})})}function R8(e,t,o){let r=e,l=Wc[t];typeof Wc[t]=="object"&&(l=l.key,r=r||Wc[t].default),o.states[l].value=r}function L8(e,t){if(t.includes(".")){const o=t.split(".");let r=e;return o.forEach(l=>{r=r[l]}),r}else return e[t]}class mne{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=D(null),this.scrollX=D(!1),this.scrollY=D(!1),this.bodyWidth=D(null),this.fixedWidth=D(null),this.rightFixedWidth=D(null),this.gutterWidth=0;for(const o in t)Pt(t,o)&&(Zt(this[o])?this[o].value=t[o]:this[o]=t[o]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const o=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(o!=null&&o.wrapRef)){let r=!0;const l=this.scrollY.value;return r=o.wrapRef.scrollHeight>o.wrapRef.clientHeight,this.scrollY.value=r,l!==r}return!1}setHeight(t,o="height"){if(!Nt)return;const r=this.table.vnode.el;if(t=lne(t),this.height.value=Number(t),!r&&(t||t===0))return et(()=>this.setHeight(t,o));typeof t=="number"?(r.style[o]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(r.style[o]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?t.push.apply(t,r.columns):t.push(r)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let o=t;for(;o.tagName!=="DIV";){if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}updateColumnsWidth(){if(!Nt)return;const t=this.fit,o=this.table.vnode.el.clientWidth;let r=0;const l=this.getFlattenColumns(),n=l.filter(c=>typeof c.width!="number");if(l.forEach(c=>{typeof c.width=="number"&&c.realWidth&&(c.realWidth=null)}),n.length>0&&t){if(l.forEach(c=>{r+=Number(c.width||c.minWidth||80)}),r<=o){this.scrollX.value=!1;const c=o-r;if(n.length===1)n[0].realWidth=Number(n[0].minWidth||80)+c;else{const d=n.reduce((h,v)=>h+Number(v.minWidth||80),0),u=c/d;let p=0;n.forEach((h,v)=>{if(v===0)return;const m=Math.floor(Number(h.minWidth||80)*u);p+=m,h.realWidth=Number(h.minWidth||80)+m}),n[0].realWidth=Number(n[0].minWidth||80)+c-p}}else this.scrollX.value=!0,n.forEach(c=>{c.realWidth=Number(c.minWidth)});this.bodyWidth.value=Math.max(r,o),this.table.state.resizeState.value.width=this.bodyWidth.value}else l.forEach(c=>{!c.width&&!c.minWidth?c.realWidth=80:c.realWidth=Number(c.width||c.minWidth),r+=c.realWidth}),this.scrollX.value=r>o,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let c=0;a.forEach(d=>{c+=Number(d.realWidth||d.width)}),this.fixedWidth.value=c}const i=this.store.states.rightFixedColumns.value;if(i.length>0){let c=0;i.forEach(d=>{c+=Number(d.realWidth||d.width)}),this.rightFixedWidth.value=c}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const o=this.observers.indexOf(t);o!==-1&&this.observers.splice(o,1)}notifyObservers(t){this.observers.forEach(r=>{var l,n;switch(t){case"columns":(l=r.state)==null||l.onColumnsChange(this);break;case"scrollable":(n=r.state)==null||n.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:gne}=rl,bne=N({name:"ElTableFilterPanel",components:{ElCheckbox:rl,ElCheckboxGroup:gne,ElScrollbar:wn,ElTooltip:ur,ElIcon:Ze,ArrowDown:Pl,ArrowUp:Ad},directives:{ClickOutside:xn},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=wt(),{t:o}=Rt(),r=ze("table-filter"),l=t==null?void 0:t.parent;l.filterPanels.value[e.column.id]||(l.filterPanels.value[e.column.id]=t);const n=D(!1),a=D(null),i=C(()=>e.column&&e.column.filters),c=C(()=>e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),d=C({get:()=>{var $;return((($=e.column)==null?void 0:$.filteredValue)||[])[0]},set:$=>{u.value&&(typeof $<"u"&&$!==null?u.value.splice(0,1,$):u.value.splice(0,1))}}),u=C({get(){return e.column?e.column.filteredValue||[]:[]},set($){e.column&&e.upDataColumn("filteredValue",$)}}),p=C(()=>e.column?e.column.filterMultiple:!0),h=$=>$.value===d.value,v=()=>{n.value=!1},m=$=>{$.stopPropagation(),n.value=!n.value},f=()=>{n.value=!1},_=()=>{w(u.value),v()},g=()=>{u.value=[],w(u.value),v()},y=$=>{d.value=$,w(typeof $<"u"&&$!==null?u.value:[]),v()},w=$=>{e.store.commit("filterChange",{column:e.column,values:$}),e.store.updateAllSelected()};Se(n,$=>{e.column&&e.upDataColumn("filterOpened",$)},{immediate:!0});const x=C(()=>{var $,T;return(T=($=a.value)==null?void 0:$.popperRef)==null?void 0:T.contentRef});return{tooltipVisible:n,multiple:p,filterClassName:c,filteredValue:u,filterValue:d,filters:i,handleConfirm:_,handleReset:g,handleSelect:y,isActive:h,t:o,ns:r,showFilterPanel:m,hideFilterPanel:f,popperPaneRef:x,tooltip:a}}}),_ne={key:0},wne=["disabled"],yne=["label","onClick"];function xne(e,t,o,r,l,n){const a=nt("el-checkbox"),i=nt("el-checkbox-group"),c=nt("el-scrollbar"),d=nt("arrow-up"),u=nt("arrow-down"),p=nt("el-icon"),h=nt("el-tooltip"),v=Ou("click-outside");return b(),he(h,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:le(()=>[e.multiple?(b(),M("div",_ne,[E("div",{class:O(e.ns.e("content"))},[ee(c,{"wrap-class":e.ns.e("wrap")},{default:le(()=>[ee(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=m=>e.filteredValue=m),class:O(e.ns.e("checkbox-group"))},{default:le(()=>[(b(!0),M(Qe,null,It(e.filters,m=>(b(),he(a,{key:m.value,value:m.value},{default:le(()=>[Ct($e(m.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),E("div",{class:O(e.ns.e("bottom"))},[E("button",{class:O({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...m)=>e.handleConfirm&&e.handleConfirm(...m))},$e(e.t("el.table.confirmFilter")),11,wne),E("button",{type:"button",onClick:t[2]||(t[2]=(...m)=>e.handleReset&&e.handleReset(...m))},$e(e.t("el.table.resetFilter")),1)],2)])):(b(),M("ul",{key:1,class:O(e.ns.e("list"))},[E("li",{class:O([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=m=>e.handleSelect(null))},$e(e.t("el.table.clearFilter")),3),(b(!0),M(Qe,null,It(e.filters,m=>(b(),M("li",{key:m.value,class:O([e.ns.e("list-item"),e.ns.is("active",e.isActive(m))]),label:m.value,onClick:f=>e.handleSelect(m.value)},$e(m.text),11,yne))),128))],2))]),default:le(()=>[mt((b(),M("span",{class:O([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...m)=>e.showFilterPanel&&e.showFilterPanel(...m))},[ee(p,null,{default:le(()=>[e.column.filterOpened?(b(),he(d,{key:0})):(b(),he(u,{key:1}))]),_:1})],2)),[[v,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var kne=Le(bne,[["render",xne],["__file","filter-panel.vue"]]);function B8(e){const t=wt();Pu(()=>{o.value.addObserver(t)}),ft(()=>{r(o.value),l(o.value)}),rn(()=>{r(o.value),l(o.value)}),Rn(()=>{o.value.removeObserver(t)});const o=C(()=>{const n=e.layout;if(!n)throw new Error("Can not find table layout.");return n}),r=n=>{var a;const i=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!i.length)return;const c=n.getFlattenColumns(),d={};c.forEach(u=>{d[u.id]=u});for(let u=0,p=i.length;u{var a,i;const c=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,p=c.length;u{f.stopPropagation()},n=(f,_)=>{!_.filters&&_.sortable?m(f,_,!1):_.filterable&&!_.sortable&&l(f),r==null||r.emit("header-click",_,f)},a=(f,_)=>{r==null||r.emit("header-contextmenu",_,f)},i=D(null),c=D(!1),d=D({}),u=(f,_)=>{if(Nt&&!(_.children&&_.children.length>0)&&i.value&&e.border){c.value=!0;const g=r;t("set-drag-visible",!0);const w=(g==null?void 0:g.vnode.el).getBoundingClientRect().left,x=o.vnode.el.querySelector(`th.${_.id}`),$=x.getBoundingClientRect(),T=$.left-w+30;Zr(x,"noclick"),d.value={startMouseLeft:f.clientX,startLeft:$.right-w,startColumnLeft:$.left-w,tableLeft:w};const R=g==null?void 0:g.refs.resizeProxy;R.style.left=`${d.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const P=V=>{const B=V.clientX-d.value.startMouseLeft,j=d.value.startLeft+B;R.style.left=`${Math.max(T,j)}px`},L=()=>{if(c.value){const{startColumnLeft:V,startLeft:B}=d.value,te=Number.parseInt(R.style.left,10)-V;_.width=_.realWidth=te,g==null||g.emit("header-dragend",_.width,B-V,_,f),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",c.value=!1,i.value=null,d.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",L),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ar(x,"noclick")},0)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",L)}},p=(f,_)=>{if(_.children&&_.children.length>0)return;const g=f.target;if(!Gr(g))return;const y=g==null?void 0:g.closest("th");if(!(!_||!_.resizable)&&!c.value&&e.border){const w=y.getBoundingClientRect(),x=document.body.style;w.width>12&&w.right-f.pageX<8?(x.cursor="col-resize",Xr(y,"is-sortable")&&(y.style.cursor="col-resize"),i.value=_):c.value||(x.cursor="",Xr(y,"is-sortable")&&(y.style.cursor="pointer"),i.value=null)}},h=()=>{Nt&&(document.body.style.cursor="")},v=({order:f,sortOrders:_})=>{if(f==="")return _[0];const g=_.indexOf(f||null);return _[g>_.length-2?0:g+1]},m=(f,_,g)=>{var y;f.stopPropagation();const w=_.order===g?null:g||v(_),x=(y=f.target)==null?void 0:y.closest("th");if(x&&Xr(x,"noclick")){ar(x,"noclick");return}if(!_.sortable)return;const $=e.store.states;let T=$.sortProp.value,R;const P=$.sortingColumn.value;(P!==_||P===_&&P.order===null)&&(P&&(P.order=null),$.sortingColumn.value=_,T=_.property),w?R=_.order=w:R=_.order=null,$.sortProp.value=T,$.sortOrder.value=R,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:n,handleHeaderContextMenu:a,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:m,handleFilterClick:l}}function Sne(e){const t=Ge(Ul),o=ze("table");return{getHeaderRowStyle:i=>{const c=t==null?void 0:t.props.headerRowStyle;return typeof c=="function"?c.call(null,{rowIndex:i}):c},getHeaderRowClass:i=>{const c=[],d=t==null?void 0:t.props.headerRowClassName;return typeof d=="string"?c.push(d):typeof d=="function"&&c.push(d.call(null,{rowIndex:i})),c.join(" ")},getHeaderCellStyle:(i,c,d,u)=>{var p;let h=(p=t==null?void 0:t.props.headerCellStyle)!=null?p:{};typeof h=="function"&&(h=h.call(null,{rowIndex:i,columnIndex:c,row:d,column:u}));const v=g2(c,u.fixed,e.store,d);return ds(v,"left"),ds(v,"right"),Object.assign({},h,v)},getHeaderCellClass:(i,c,d,u)=>{const p=m2(o.b(),c,u.fixed,e.store,d),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...p];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const v=t==null?void 0:t.props.headerCellClassName;return typeof v=="string"?h.push(v):typeof v=="function"&&h.push(v.call(null,{rowIndex:i,columnIndex:c,row:d,column:u})),h.push(o.e("cell")),h.filter(m=>!!m).join(" ")}}}const V8=e=>{const t=[];return e.forEach(o=>{o.children?(t.push(o),t.push.apply(t,V8(o.children))):t.push(o)}),t},D8=e=>{let t=1;const o=(n,a)=>{if(a&&(n.level=a.level+1,t{o(c,n),i+=c.colSpan}),n.colSpan=i}else n.colSpan=1};e.forEach(n=>{n.level=1,o(n,void 0)});const r=[];for(let n=0;n{n.children?(n.rowSpan=1,n.children.forEach(a=>a.isSubColumn=!0)):n.rowSpan=t-n.level+1,r[n.level-1].push(n)}),r};function Ene(e){const t=Ge(Ul),o=C(()=>D8(e.store.states.originColumns.value));return{isGroup:C(()=>{const n=o.value.length>1;return n&&t&&(t.state.isGroup.value=!0),n}),toggleAllSelection:n=>{n.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:o}}var Tne=N({name:"ElTableHeader",components:{ElCheckbox:rl},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const o=wt(),r=Ge(Ul),l=ze("table"),n=D({}),{onColumnsChange:a,onScrollableChange:i}=B8(r);ft(async()=>{await et(),await et();const{prop:T,order:R}=e.defaultSort;r==null||r.store.commit("sort",{prop:T,order:R,init:!0})});const{handleHeaderClick:c,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:v,handleFilterClick:m}=Cne(e,t),{getHeaderRowStyle:f,getHeaderRowClass:_,getHeaderCellStyle:g,getHeaderCellClass:y}=Sne(e),{isGroup:w,toggleAllSelection:x,columnRows:$}=Ene(e);return o.state={onColumnsChange:a,onScrollableChange:i},o.filterPanels=n,{ns:l,filterPanels:n,onColumnsChange:a,onScrollableChange:i,columnRows:$,getHeaderRowClass:_,getHeaderRowStyle:f,getHeaderCellClass:y,getHeaderCellStyle:g,handleHeaderClick:c,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:v,handleFilterClick:m,isGroup:w,toggleAllSelection:x}},render(){const{ns:e,isGroup:t,columnRows:o,getHeaderCellStyle:r,getHeaderCellClass:l,getHeaderRowClass:n,getHeaderRowStyle:a,handleHeaderClick:i,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:u,handleSortClick:p,handleMouseOut:h,store:v,$parent:m}=this;let f=1;return rt("thead",{class:{[e.is("group")]:t}},o.map((_,g)=>rt("tr",{class:n(g),key:g,style:a(g)},_.map((y,w)=>(y.rowSpan>f&&(f=y.rowSpan),rt("th",{class:l(g,w,_,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:r(g,w,_,y),onClick:x=>{x.currentTarget.classList.contains("noclick")||i(x,y)},onContextmenu:x=>c(x,y),onMousedown:x=>d(x,y),onMousemove:x=>u(x,y),onMouseout:h},[rt("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:w,store:v,_self:m}):y.label,y.sortable&&rt("span",{onClick:x=>p(x,y),class:"caret-wrapper"},[rt("i",{onClick:x=>p(x,y,"ascending"),class:"sort-caret ascending"}),rt("i",{onClick:x=>p(x,y,"descending"),class:"sort-caret descending"})]),y.filterable&&rt(kne,{store:v,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(x,$)=>{y[x]=$}})])]))))))}});function w2(e,t,o=.01){return e-t>o}function $ne(e){const t=Ge(Ul),o=D(""),r=D(rt("div")),l=(m,f,_)=>{var g;const y=t,w=h2(m);let x;const $=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;w&&(x=A8({columns:e.store.states.columns.value},w,$),x&&(y==null||y.emit(`cell-${_}`,f,x,w,m))),y==null||y.emit(`row-${_}`,f,x,m)},n=(m,f)=>{l(m,f,"dblclick")},a=(m,f)=>{e.store.commit("setCurrentRow",f),l(m,f,"click")},i=(m,f)=>{l(m,f,"contextmenu")},c=Mr(m=>{e.store.commit("setHoverRow",m)},30),d=Mr(()=>{e.store.commit("setHoverRow",null)},30),u=m=>{const f=window.getComputedStyle(m,null),_=Number.parseInt(f.paddingLeft,10)||0,g=Number.parseInt(f.paddingRight,10)||0,y=Number.parseInt(f.paddingTop,10)||0,w=Number.parseInt(f.paddingBottom,10)||0;return{left:_,right:g,top:y,bottom:w}},p=(m,f,_)=>{let g=f.target.parentNode;for(;m>1&&(g=g==null?void 0:g.nextSibling,!(!g||g.nodeName!=="TR"));)_(g,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:n,handleClick:a,handleContextMenu:i,handleMouseEnter:c,handleMouseLeave:d,handleCellMouseEnter:(m,f,_)=>{var g;const y=t,w=h2(m),x=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;if(w){const I=A8({columns:e.store.states.columns.value},w,x);w.rowSpan>1&&p(w.rowSpan,m,Zr);const U=y.hoverState={cell:w,column:I,row:f};y==null||y.emit("cell-mouse-enter",U.row,U.column,U.cell,m)}if(!_)return;const $=m.target.querySelector(".cell");if(!(Xr($,`${x}-tooltip`)&&$.childNodes.length))return;const T=document.createRange();T.setStart($,0),T.setEnd($,$.childNodes.length);let{width:R,height:P}=T.getBoundingClientRect();const L=R-Math.floor(R),{width:V,height:B}=$.getBoundingClientRect();L<.001&&(R=Math.floor(R)),P-Math.floor(P)<.001&&(P=Math.floor(P));const{top:te,left:J,right:Z,bottom:H}=u($),F=J+Z,K=te+H;(w2(R+F,V)||w2(P+K,B)||w2($.scrollWidth,V))&&ine(_,w.innerText||w.textContent,w,y)},handleCellMouseLeave:m=>{const f=h2(m);if(!f)return;f.rowSpan>1&&p(f.rowSpan,m,ar);const _=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",_==null?void 0:_.row,_==null?void 0:_.column,_==null?void 0:_.cell,m)},tooltipContent:o,tooltipTrigger:r}}function Mne(e){const t=Ge(Ul),o=ze("table");return{getRowStyle:(d,u)=>{const p=t==null?void 0:t.props.rowStyle;return typeof p=="function"?p.call(null,{row:d,rowIndex:u}):p||null},getRowClass:(d,u)=>{const p=[o.e("row")];t!=null&&t.props.highlightCurrentRow&&d===e.store.states.currentRow.value&&p.push("current-row"),e.stripe&&u%2===1&&p.push(o.em("row","striped"));const h=t==null?void 0:t.props.rowClassName;return typeof h=="string"?p.push(h):typeof h=="function"&&p.push(h.call(null,{row:d,rowIndex:u})),p},getCellStyle:(d,u,p,h)=>{const v=t==null?void 0:t.props.cellStyle;let m=v??{};typeof v=="function"&&(m=v.call(null,{rowIndex:d,columnIndex:u,row:p,column:h}));const f=g2(u,e==null?void 0:e.fixed,e.store);return ds(f,"left"),ds(f,"right"),Object.assign({},m,f)},getCellClass:(d,u,p,h,v)=>{const m=m2(o.b(),u,e==null?void 0:e.fixed,e.store,void 0,v),f=[h.id,h.align,h.className,...m],_=t==null?void 0:t.props.cellClassName;return typeof _=="string"?f.push(_):typeof _=="function"&&f.push(_.call(null,{rowIndex:d,columnIndex:u,row:p,column:h})),f.push(o.e("cell")),f.filter(g=>!!g).join(" ")},getSpan:(d,u,p,h)=>{let v=1,m=1;const f=t==null?void 0:t.props.spanMethod;if(typeof f=="function"){const _=f({row:d,column:u,rowIndex:p,columnIndex:h});Array.isArray(_)?(v=_[0],m=_[1]):typeof _=="object"&&(v=_.rowspan,m=_.colspan)}return{rowspan:v,colspan:m}},getColspanRealWidth:(d,u,p)=>{if(u<1)return d[p].realWidth;const h=d.map(({realWidth:v,width:m})=>v||m).slice(p,p+u);return Number(h.reduce((v,m)=>Number(v)+Number(m),-1))}}}function Ane(e){const t=Ge(Ul),o=ze("table"),{handleDoubleClick:r,handleClick:l,handleContextMenu:n,handleMouseEnter:a,handleMouseLeave:i,handleCellMouseEnter:c,handleCellMouseLeave:d,tooltipContent:u,tooltipTrigger:p}=$ne(e),{getRowStyle:h,getRowClass:v,getCellStyle:m,getCellClass:f,getSpan:_,getColspanRealWidth:g}=Mne(e),y=C(()=>e.store.states.columns.value.findIndex(({type:R})=>R==="default")),w=(R,P)=>{const L=t.props.rowKey;return L?tr(R,L):P},x=(R,P,L,V=!1)=>{const{tooltipEffect:B,tooltipOptions:j,store:te}=e,{indent:J,columns:Z}=te.states,H=v(R,P);let F=!0;return L&&(H.push(o.em("row",`level-${L.level}`)),F=L.display),rt("tr",{style:[F?null:{display:"none"},h(R,P)],class:H,key:w(R,P),onDblclick:I=>r(I,R),onClick:I=>l(I,R),onContextmenu:I=>n(I,R),onMouseenter:()=>a(P),onMouseleave:i},Z.value.map((I,U)=>{const{rowspan:oe,colspan:ne}=_(R,I,P,U);if(!oe||!ne)return null;const ce=Object.assign({},I);ce.realWidth=g(Z.value,ne,U);const Q={store:e.store,_self:e.context||t,column:ce,row:R,$index:P,cellIndex:U,expanded:V};U===y.value&&L&&(Q.treeNode={indent:L.level*J.value,level:L.level},typeof L.expanded=="boolean"&&(Q.treeNode.expanded=L.expanded,"loading"in L&&(Q.treeNode.loading=L.loading),"noLazyChildren"in L&&(Q.treeNode.noLazyChildren=L.noLazyChildren)));const Me=`${w(R,P)},${U}`,de=ce.columnKey||ce.rawColumnKey||"",_e=$(U,I,Q),me=I.showOverflowTooltip&&Iz({effect:B},j,I.showOverflowTooltip);return rt("td",{style:m(P,U,R,I),class:f(P,U,R,I,ne-1),key:`${de}${Me}`,rowspan:oe,colspan:ne,onMouseenter:Re=>c(Re,R,me),onMouseleave:d},[_e])}))},$=(R,P,L)=>P.renderCell(L);return{wrappedRowRender:(R,P)=>{const L=e.store,{isRowExpanded:V,assertRowKey:B}=L,{treeData:j,lazyTreeNodeMap:te,childrenColumnName:J,rowKey:Z}=L.states,H=L.states.columns.value;if(H.some(({type:K})=>K==="expand")){const K=V(R),I=x(R,P,void 0,K),U=t.renderExpanded;return K?U?[[I,rt("tr",{key:`expanded-row__${I.key}`},[rt("td",{colspan:H.length,class:`${o.e("cell")} ${o.e("expanded-cell")}`},[U({row:R,$index:P,store:L,expanded:K})])])]]:(console.error("[Element Error]renderExpanded is required."),I):[[I]]}else if(Object.keys(j.value).length){B();const K=tr(R,Z.value);let I=j.value[K],U=null;I&&(U={expanded:I.expanded,level:I.level,display:!0},typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(U.noLazyChildren=!(I.children&&I.children.length)),U.loading=I.loading));const oe=[x(R,P,U)];if(I){let ne=0;const ce=(Me,de)=>{Me&&Me.length&&de&&Me.forEach(_e=>{const me={display:de.display&&de.expanded,level:de.level+1,expanded:!1,noLazyChildren:!1,loading:!1},Re=tr(_e,Z.value);if(Re==null)throw new Error("For nested data item, row-key is required.");if(I={...j.value[Re]},I&&(me.expanded=I.expanded,I.level=I.level||me.level,I.display=!!(I.expanded&&me.display),typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(me.noLazyChildren=!(I.children&&I.children.length)),me.loading=I.loading)),ne++,oe.push(x(_e,P+ne,me)),I){const Ce=te.value[Re]||_e[J.value];ce(Ce,I)}})};I.display=!0;const Q=te.value[K]||R[J.value];ce(Q,I)}return oe}else return x(R,P,void 0)},tooltipContent:u,tooltipTrigger:p}}var zne=N({name:"ElTableBody",props:{store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean},setup(e){const t=wt(),o=Ge(Ul),r=ze("table"),{wrappedRowRender:l,tooltipContent:n,tooltipTrigger:a}=Ane(e),{onColumnsChange:i,onScrollableChange:c}=B8(o),d=[];return Se(e.store.states.hoverRow,(u,p)=>{var h;const v=t==null?void 0:t.vnode.el,m=Array.from((v==null?void 0:v.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${r.e("row")}`));let f=u;const _=(h=m[f])==null?void 0:h.childNodes;if(_!=null&&_.length){let g=0;Array.from(_).reduce((w,x,$)=>{var T,R;return((T=_[$])==null?void 0:T.colSpan)>1&&(g=(R=_[$])==null?void 0:R.colSpan),x.nodeName!=="TD"&&g===0&&w.push($),g>0&&g--,w},[]).forEach(w=>{var x;for(f=u;f>0;){const $=(x=m[f-1])==null?void 0:x.childNodes;if($[w]&&$[w].nodeName==="TD"&&$[w].rowSpan>1){Zr($[w],"hover-cell"),d.push($[w]);break}f--}})}else d.forEach(g=>ar(g,"hover-cell")),d.length=0;!e.store.states.isComplex.value||!Nt||Xn(()=>{const g=m[p],y=m[u];g&&!g.classList.contains("hover-fixed-row")&&ar(g,"hover-row"),y&&Zr(y,"hover-row")})}),Rn(()=>{var u;(u=nl)==null||u()}),{ns:r,onColumnsChange:i,onScrollableChange:c,wrappedRowRender:l,tooltipContent:n,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this,o=t.states.data.value||[];return rt("tbody",{tabIndex:-1},[o.reduce((r,l)=>r.concat(e(l,r.length)),[])])}});function Ine(){const e=Ge(Ul),t=e==null?void 0:e.store,o=C(()=>t.states.fixedLeafColumnsLength.value),r=C(()=>t.states.rightFixedColumns.value.length),l=C(()=>t.states.columns.value.length),n=C(()=>t.states.fixedColumns.value.length),a=C(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:o,rightFixedLeafCount:r,columnsCount:l,leftFixedCount:n,rightFixedCount:a,columns:t.states.columns}}function One(e){const{columns:t}=Ine(),o=ze("table");return{getCellClasses:(n,a)=>{const i=n[a],c=[o.e("cell"),i.id,i.align,i.labelClassName,...m2(o.b(),a,i.fixed,e.store)];return i.className&&c.push(i.className),i.children||c.push(o.is("leaf")),c},getCellStyles:(n,a)=>{const i=g2(a,n.fixed,e.store);return ds(i,"left"),ds(i,"right"),i},columns:t}}var Nne=N({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:o,columns:r}=One(e);return{ns:ze("table"),getCellClasses:t,getCellStyles:o,columns:r}},render(){const{columns:e,getCellStyles:t,getCellClasses:o,summaryMethod:r,sumText:l}=this,n=this.store.states.data.value;let a=[];return r?a=r({columns:e,data:n}):e.forEach((i,c)=>{if(c===0){a[c]=l;return}const d=n.map(v=>Number(v[i.property])),u=[];let p=!0;d.forEach(v=>{if(!Number.isNaN(+v)){p=!1;const m=`${v}`.split(".")[1];u.push(m?m.length:0)}});const h=Math.max.apply(null,u);p?a[c]="":a[c]=d.reduce((v,m)=>{const f=Number(m);return Number.isNaN(+f)?v:Number.parseFloat((v+m).toFixed(Math.min(h,20)))},0)}),rt(rt("tfoot",[rt("tr",{},[...e.map((i,c)=>rt("td",{key:c,colspan:i.colSpan,rowspan:i.rowSpan,class:o(e,c),style:t(i,c)},[rt("div",{class:["cell",i.labelClassName]},[a[c]])]))])]))}});function Pne(e){return{setCurrentRow:u=>{e.commit("setCurrentRow",u)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(u,p)=>{e.toggleRowSelection(u,p,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:u=>{e.clearFilter(u)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(u,p)=>{e.toggleRowExpansionAdapter(u,p)},clearSort:()=>{e.clearSort()},sort:(u,p)=>{e.commit("sort",{prop:u,order:p})}}}function Rne(e,t,o,r){const l=D(!1),n=D(null),a=D(!1),i=I=>{a.value=I},c=D({width:null,height:null,headerHeight:null}),d=D(!1),u={display:"inline-block",verticalAlign:"middle"},p=D(),h=D(0),v=D(0),m=D(0),f=D(0),_=D(0);Go(()=>{t.setHeight(e.height)}),Go(()=>{t.setMaxHeight(e.maxHeight)}),Se(()=>[e.currentRowKey,o.states.rowKey],([I,U])=>{!s(U)||!s(I)||o.setCurrentRowKey(`${I}`)},{immediate:!0}),Se(()=>e.data,I=>{r.store.commit("setData",I)},{immediate:!0,deep:!0}),Go(()=>{e.expandRowKeys&&o.setExpandRowKeysAdapter(e.expandRowKeys)});const g=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},y=(I,U)=>{const{pixelX:oe,pixelY:ne}=U;Math.abs(oe)>=Math.abs(ne)&&(r.refs.bodyWrapper.scrollLeft+=U.pixelX/5)},w=C(()=>e.height||e.maxHeight||o.states.fixedColumns.value.length>0||o.states.rightFixedColumns.value.length>0),x=C(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),$=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(L)};ft(async()=>{await et(),o.updateColumns(),V(),requestAnimationFrame($);const I=r.vnode.el,U=r.refs.headerWrapper;e.flexible&&I&&I.parentElement&&(I.parentElement.style.minWidth="0"),c.value={width:p.value=I.offsetWidth,height:I.offsetHeight,headerHeight:e.showHeader&&U?U.offsetHeight:null},o.states.columns.value.forEach(oe=>{oe.filteredValue&&oe.filteredValue.length&&r.store.commit("filterChange",{column:oe,values:oe.filteredValue,silent:!0})}),r.$ready=!0});const T=(I,U)=>{if(!I)return;const oe=Array.from(I.classList).filter(ne=>!ne.startsWith("is-scrolling-"));oe.push(t.scrollX.value?U:"is-scrolling-none"),I.className=oe.join(" ")},R=I=>{const{tableWrapper:U}=r.refs;T(U,I)},P=I=>{const{tableWrapper:U}=r.refs;return!!(U&&U.classList.contains(I))},L=function(){if(!r.refs.scrollBarRef)return;if(!t.scrollX.value){const de="is-scrolling-none";P(de)||R(de);return}const I=r.refs.scrollBarRef.wrapRef;if(!I)return;const{scrollLeft:U,offsetWidth:oe,scrollWidth:ne}=I,{headerWrapper:ce,footerWrapper:Q}=r.refs;ce&&(ce.scrollLeft=U),Q&&(Q.scrollLeft=U);const Me=ne-oe-1;U>=Me?R("is-scrolling-right"):R(U===0?"is-scrolling-left":"is-scrolling-middle")},V=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&oo(r.refs.scrollBarRef.wrapRef,"scroll",L,{passive:!0}),e.fit?so(r.vnode.el,B):oo(window,"resize",B),so(r.refs.bodyWrapper,()=>{var I,U;B(),(U=(I=r.refs)==null?void 0:I.scrollBarRef)==null||U.update()}))},B=()=>{var I,U,oe,ne;const ce=r.vnode.el;if(!r.$ready||!ce)return;let Q=!1;const{width:Me,height:de,headerHeight:_e}=c.value,me=p.value=ce.offsetWidth;Me!==me&&(Q=!0);const Re=ce.offsetHeight;(e.height||w.value)&&de!==Re&&(Q=!0);const Ce=e.tableLayout==="fixed"?r.refs.headerWrapper:(I=r.refs.tableHeaderRef)==null?void 0:I.$el;e.showHeader&&(Ce==null?void 0:Ce.offsetHeight)!==_e&&(Q=!0),h.value=((U=r.refs.tableWrapper)==null?void 0:U.scrollHeight)||0,m.value=(Ce==null?void 0:Ce.scrollHeight)||0,f.value=((oe=r.refs.footerWrapper)==null?void 0:oe.offsetHeight)||0,_.value=((ne=r.refs.appendWrapper)==null?void 0:ne.offsetHeight)||0,v.value=h.value-m.value-f.value-_.value,Q&&(c.value={width:me,height:Re,headerHeight:e.showHeader&&(Ce==null?void 0:Ce.offsetHeight)||0},$())},j=So(),te=C(()=>{const{bodyWidth:I,scrollY:U,gutterWidth:oe}=t;return I.value?`${I.value-(U.value?oe:0)}px`:""}),J=C(()=>e.maxHeight?"fixed":e.tableLayout),Z=C(()=>{if(e.data&&e.data.length)return null;let I="100%";e.height&&v.value&&(I=`${v.value}px`);const U=p.value;return{width:U?`${U}px`:"",height:I}}),H=C(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),F=C(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+f.value}px)`}:{maxHeight:`${e.maxHeight-m.value-f.value}px`}:{});return{isHidden:l,renderExpanded:n,setDragVisible:i,isGroup:d,handleMouseLeave:g,handleHeaderFooterMousewheel:y,tableSize:j,emptyBlockStyle:Z,handleFixedMousewheel:(I,U)=>{const oe=r.refs.bodyWrapper;if(Math.abs(U.spinY)>0){const ne=oe.scrollTop;U.pixelY<0&&ne!==0&&I.preventDefault(),U.pixelY>0&&oe.scrollHeight-oe.clientHeight>ne&&I.preventDefault(),oe.scrollTop+=Math.ceil(U.pixelY/5)}else oe.scrollLeft+=Math.ceil(U.pixelX/5)},resizeProxyVisible:a,bodyWidth:te,resizeState:c,doLayout:$,tableBodyStyles:x,tableLayout:J,scrollbarViewStyle:u,tableInnerStyle:H,scrollbarStyle:F}}function Lne(e){const t=D(),o=()=>{const l=e.vnode.el.querySelector(".hidden-columns"),n={childList:!0,subtree:!0},a=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{a.forEach(i=>i())}),t.value.observe(l,n)};ft(()=>{o()}),Rn(()=>{var r;(r=t.value)==null||r.disconnect()})}var Bne={data:{type:Array,default:()=>[]},size:Oo,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object]};function H8(e){const t=e.tableLayout==="auto";let o=e.columns||[];t&&o.every(l=>l.width===void 0)&&(o=[]);const r=l=>{const n={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?n.style={width:`${l.width}px`}:n.name=l.id,n};return rt("colgroup",{},o.map(l=>rt("col",r(l))))}H8.props=["columns","tableLayout"];const Vne=()=>{const e=D(),t=(n,a)=>{const i=e.value;i&&i.scrollTo(n,a)},o=(n,a)=>{const i=e.value;i&&st(a)&&["Top","Left"].includes(n)&&i[`setScroll${n}`](a)};return{scrollBarRef:e,scrollTo:t,setScrollTop:n=>o("Top",n),setScrollLeft:n=>o("Left",n)}};let Dne=1;const Hne=N({name:"ElTable",directives:{Mousewheel:lY},components:{TableHeader:Tne,TableBody:zne,TableFooter:Nne,ElScrollbar:wn,hColgroup:H8},props:Bne,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Rt(),o=ze("table"),r=wt();zt(Ul,r);const l=hne(r,e);r.store=l;const n=new mne({store:r.store,table:r,fit:e.fit,showHeader:e.showHeader});r.layout=n;const a=C(()=>(l.states.data.value||[]).length===0),{setCurrentRow:i,getSelectionRows:c,toggleRowSelection:d,clearSelection:u,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:v,clearSort:m,sort:f}=Pne(l),{isHidden:_,renderExpanded:g,setDragVisible:y,isGroup:w,handleMouseLeave:x,handleHeaderFooterMousewheel:$,tableSize:T,emptyBlockStyle:R,handleFixedMousewheel:P,resizeProxyVisible:L,bodyWidth:V,resizeState:B,doLayout:j,tableBodyStyles:te,tableLayout:J,scrollbarViewStyle:Z,tableInnerStyle:H,scrollbarStyle:F}=Rne(e,n,l,r),{scrollBarRef:K,scrollTo:I,setScrollLeft:U,setScrollTop:oe}=Vne(),ne=Mr(j,50),ce=`${o.namespace.value}-table_${Dne++}`;r.tableId=ce,r.state={isGroup:w,resizeState:B,doLayout:j,debouncedUpdateLayout:ne};const Q=C(()=>e.sumText||t("el.table.sumText")),Me=C(()=>e.emptyText||t("el.table.emptyText")),de=C(()=>D8(l.states.originColumns.value)[0]);return Lne(r),{ns:o,layout:n,store:l,columns:de,handleHeaderFooterMousewheel:$,handleMouseLeave:x,tableId:ce,tableSize:T,isHidden:_,isEmpty:a,renderExpanded:g,resizeProxyVisible:L,resizeState:B,isGroup:w,bodyWidth:V,tableBodyStyles:te,emptyBlockStyle:R,debouncedUpdateLayout:ne,handleFixedMousewheel:P,setCurrentRow:i,getSelectionRows:c,toggleRowSelection:d,clearSelection:u,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:v,clearSort:m,doLayout:j,sort:f,t,setDragVisible:y,context:r,computedSumText:Q,computedEmptyText:Me,tableLayout:J,scrollbarViewStyle:Z,tableInnerStyle:H,scrollbarStyle:F,scrollBarRef:K,scrollTo:I,setScrollLeft:U,setScrollTop:oe}}}),Fne=["data-prefix"],jne={ref:"hiddenColumns",class:"hidden-columns"};function Kne(e,t,o,r,l,n){const a=nt("hColgroup"),i=nt("table-header"),c=nt("table-body"),d=nt("table-footer"),u=nt("el-scrollbar"),p=Ou("mousewheel");return b(),M("div",{ref:"tableWrapper",class:O([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Je(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...h)=>e.handleMouseLeave&&e.handleMouseLeave(...h))},[E("div",{class:O(e.ns.e("inner-wrapper")),style:Je(e.tableInnerStyle)},[E("div",jne,[be(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?mt((b(),M("div",{key:0,ref:"headerWrapper",class:O(e.ns.e("header-wrapper"))},[E("table",{ref:"tableHeader",class:O(e.ns.e("header")),style:Je(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[ee(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ee(i,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[p,e.handleHeaderFooterMousewheel]]):se("v-if",!0),E("div",{ref:"bodyWrapper",class:O(e.ns.e("body-wrapper"))},[ee(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:le(()=>[E("table",{ref:"tableBody",class:O(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Je({width:e.bodyWidth,tableLayout:e.tableLayout})},[ee(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(b(),he(i,{key:0,ref:"tableHeaderRef",class:O(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):se("v-if",!0),ee(c,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(b(),he(d,{key:1,class:O(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):se("v-if",!0)],6),e.isEmpty?(b(),M("div",{key:0,ref:"emptyBlock",style:Je(e.emptyBlockStyle),class:O(e.ns.e("empty-block"))},[E("span",{class:O(e.ns.e("empty-text"))},[be(e.$slots,"empty",{},()=>[Ct($e(e.computedEmptyText),1)])],2)],6)):se("v-if",!0),e.$slots.append?(b(),M("div",{key:1,ref:"appendWrapper",class:O(e.ns.e("append-wrapper"))},[be(e.$slots,"append")],2)):se("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?mt((b(),M("div",{key:1,ref:"footerWrapper",class:O(e.ns.e("footer-wrapper"))},[E("table",{class:O(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Je(e.tableBodyStyles)},[ee(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),ee(d,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Lt,!e.isEmpty],[p,e.handleHeaderFooterMousewheel]]):se("v-if",!0),e.border||e.isGroup?(b(),M("div",{key:2,class:O(e.ns.e("border-left-patch"))},null,2)):se("v-if",!0)],6),mt(E("div",{ref:"resizeProxy",class:O(e.ns.e("column-resize-proxy"))},null,2),[[Lt,e.resizeProxyVisible]])],46,Fne)}var Une=Le(Hne,[["render",Kne],["__file","table.vue"]]);const Wne={selection:"table-column--selection",expand:"table__expand-column"},qne={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Yne=e=>Wne[e]||"",Gne={selection:{renderHeader({store:e,column:t}){function o(){return e.states.data.value&&e.states.data.value.length===0}return rt(rl,{disabled:o(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:o,$index:r}){return rt(rl,{disabled:t.selectable?!t.selectable.call(null,e,r):!1,size:o.states.tableSize.value,onChange:()=>{o.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:o.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let o=t+1;const r=e.index;return typeof r=="number"?o=t+r:typeof r=="function"&&(o=r(t)),rt("div",{},[o])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:o}){const{ns:r}=t,l=[r.e("expand-icon")];return o&&l.push(r.em("expand-icon","expanded")),rt("div",{class:l,onClick:function(a){a.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[rt(Ze,null,{default:()=>[rt(ir)]})]})},sortable:!1,resizable:!1}};function Xne({row:e,column:t,$index:o}){var r;const l=t.property,n=l&&Td(e,l).value;return t&&t.formatter?t.formatter(e,t,n,o):((r=n==null?void 0:n.toString)==null?void 0:r.call(n))||""}function Zne({row:e,treeNode:t,store:o},r=!1){const{ns:l}=o;if(!t)return r?[rt("span",{class:l.e("placeholder")})]:null;const n=[],a=function(i){i.stopPropagation(),!t.loading&&o.loadOrToggle(e)};if(t.indent&&n.push(rt("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const i=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let c=ir;t.loading&&(c=vn),n.push(rt("div",{class:i,onClick:a},{default:()=>[rt(Ze,{class:{[l.is("loading")]:t.loading}},{default:()=>[rt(c)]})]}))}else n.push(rt("span",{class:l.e("placeholder")}));return n}function F8(e,t){return e.reduce((o,r)=>(o[r]=r,o),t)}function Jne(e,t){const o=wt();return{registerComplexWatchers:()=>{const n=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},i=F8(n,a);Object.keys(i).forEach(c=>{const d=a[c];Pt(t,d)&&Se(()=>t[d],u=>{let p=u;d==="width"&&c==="realWidth"&&(p=v2(u)),d==="minWidth"&&c==="realMinWidth"&&(p=z8(u)),o.columnConfig.value[d]=p,o.columnConfig.value[c]=p;const h=d==="fixed";e.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const n=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},i=F8(n,a);Object.keys(i).forEach(c=>{const d=a[c];Pt(t,d)&&Se(()=>t[d],u=>{o.columnConfig.value[c]=u})})}}}function Qne(e,t,o){const r=wt(),l=D(""),n=D(!1),a=D(),i=D(),c=ze("table");Go(()=>{a.value=e.align?`is-${e.align}`:null,a.value}),Go(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:a.value,i.value});const d=C(()=>{let x=r.vnode.vParent||r.parent;for(;x&&!x.tableId&&!x.columnId;)x=x.vnode.vParent||x.parent;return x}),u=C(()=>{const{store:x}=r.parent;if(!x)return!1;const{treeData:$}=x.states,T=$.value;return T&&Object.keys(T).length>0}),p=D(v2(e.width)),h=D(z8(e.minWidth)),v=x=>(p.value&&(x.width=p.value),h.value&&(x.minWidth=h.value),!p.value&&h.value&&(x.width=void 0),x.minWidth||(x.minWidth=80),x.realWidth=Number(x.width===void 0?x.minWidth:x.width),x),m=x=>{const $=x.type,T=Gne[$]||{};Object.keys(T).forEach(P=>{const L=T[P];P!=="className"&&L!==void 0&&(x[P]=L)});const R=Yne($);if(R){const P=`${s(c.namespace)}-${R}`;x.className=x.className?`${x.className} ${P}`:P}return x},f=x=>{Array.isArray(x)?x.forEach(T=>$(T)):$(x);function $(T){var R;((R=T==null?void 0:T.type)==null?void 0:R.name)==="ElTableColumn"&&(T.vParent=r)}};return{columnId:l,realAlign:a,isSubColumn:n,realHeaderAlign:i,columnOrTableParent:d,setColumnWidth:v,setColumnForcedProps:m,setColumnRenders:x=>{e.renderHeader||x.type!=="selection"&&(x.renderHeader=T=>(r.columnConfig.value.label,be(t,"header",T,()=>[x.label])));let $=x.renderCell;return x.type==="expand"?(x.renderCell=T=>rt("div",{class:"cell"},[$(T)]),o.value.renderExpanded=T=>t.default?t.default(T):t.default):($=$||Xne,x.renderCell=T=>{let R=null;if(t.default){const te=t.default(T);R=te.some(J=>J.type!==Jo)?te:$(T)}else R=$(T);const{columns:P}=o.value.store.states,L=P.value.findIndex(te=>te.type==="default"),V=u.value&&T.cellIndex===L,B=Zne(T,V),j={class:"cell",style:{}};return x.showOverflowTooltip&&(j.class=`${j.class} ${s(c.namespace)}-tooltip`,j.style={width:`${(T.column.realWidth||Number(T.column.width))-1}px`}),f(R),rt("div",j,[B,R])}),x},getPropsData:(...x)=>x.reduce(($,T)=>(Array.isArray(T)&&T.forEach(R=>{$[R]=e[R]}),$),{}),getColumnElIndex:(x,$)=>Array.prototype.indexOf.call(x,$),updateColumnOrder:()=>{o.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var eae={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let tae=1;var j8=N({name:"ElTableColumn",components:{ElCheckbox:rl},props:eae,setup(e,{slots:t}){const o=wt(),r=D({}),l=C(()=>{let w=o.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:n,registerComplexWatchers:a}=Jne(l,e),{columnId:i,isSubColumn:c,realHeaderAlign:d,columnOrTableParent:u,setColumnWidth:p,setColumnForcedProps:h,setColumnRenders:v,getPropsData:m,getColumnElIndex:f,realAlign:_,updateColumnOrder:g}=Qne(e,t,l),y=u.value;i.value=`${y.tableId||y.columnId}_column_${tae++}`,Pu(()=>{c.value=l.value!==y;const w=e.type||"default",x=e.sortable===""?!0:e.sortable,$=ko(e.showOverflowTooltip)?y.props.showOverflowTooltip:e.showOverflowTooltip,T={...qne[w],id:i.value,type:w,property:e.prop||e.property,align:_,headerAlign:d,showOverflowTooltip:$,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:e.index,rawColumnKey:o.vnode.key};let B=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);B=rne(T,B),B=nne(v,p,h)(B),r.value=B,n(),a()}),ft(()=>{var w;const x=u.value,$=c.value?x.vnode.el.children:(w=x.refs.hiddenColumns)==null?void 0:w.children,T=()=>f($||[],o.vnode.el);r.value.getColumnIndex=T,T()>-1&&l.value.store.commit("insertColumn",r.value,c.value?x.columnConfig.value:null,g)}),to(()=>{r.value.getColumnIndex()>-1&&l.value.store.commit("removeColumn",r.value,c.value?y.columnConfig.value:null,g)}),o.columnId=i.value,o.columnConfig=r},render(){var e,t,o;try{const r=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),l=[];if(Array.isArray(r))for(const a of r)((o=a.type)==null?void 0:o.name)==="ElTableColumn"||a.shapeFlag&2?l.push(a):a.type===Qe&&Array.isArray(a.children)&&a.children.forEach(i=>{(i==null?void 0:i.patchFlag)!==1024&&!ut(i==null?void 0:i.children)&&l.push(i)});return rt("div",l)}catch{return rt("div",[])}}});const oae=yt(Une,{TableColumn:j8}),rae=co(j8);var qc=(e=>(e.ASC="asc",e.DESC="desc",e))(qc||{}),Yc=(e=>(e.CENTER="center",e.RIGHT="right",e))(Yc||{}),K8=(e=>(e.LEFT="left",e.RIGHT="right",e))(K8||{});const y2={asc:"desc",desc:"asc"},Gc=Symbol("placeholder"),lae=(e,t,o)=>{var r;const l={flexGrow:0,flexShrink:0,...o?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};o||(l.flexShrink=1);const n={...(r=e.style)!=null?r:{},...l,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(n.maxWidth=e.maxWidth),e.minWidth&&(n.minWidth=e.minWidth)),n};function nae(e,t,o){const r=C(()=>s(t).filter(f=>!f.hidden)),l=C(()=>s(r).filter(f=>f.fixed==="left"||f.fixed===!0)),n=C(()=>s(r).filter(f=>f.fixed==="right")),a=C(()=>s(r).filter(f=>!f.fixed)),i=C(()=>{const f=[];return s(l).forEach(_=>{f.push({..._,placeholderSign:Gc})}),s(a).forEach(_=>{f.push(_)}),s(n).forEach(_=>{f.push({..._,placeholderSign:Gc})}),f}),c=C(()=>s(l).length||s(n).length),d=C(()=>s(t).reduce((_,g)=>(_[g.key]=lae(g,s(o),e.fixed),_),{})),u=C(()=>s(r).reduce((f,_)=>f+_.width,0)),p=f=>s(t).find(_=>_.key===f),h=f=>s(d)[f],v=(f,_)=>{f.width=_};function m(f){var _;const{key:g}=f.currentTarget.dataset;if(!g)return;const{sortState:y,sortBy:w}=e;let x=qc.ASC;xt(y)?x=y2[y[g]]:x=y2[w.order],(_=e.onColumnSort)==null||_.call(e,{column:p(g),key:g,order:x})}return{columns:t,columnsStyles:d,columnsTotalWidth:u,fixedColumnsOnLeft:l,fixedColumnsOnRight:n,hasFixedColumns:c,mainColumns:i,normalColumns:a,visibleColumns:r,getColumn:p,getColumnStyle:h,updateColumnWidth:v,onColumnSorted:m}}const aae=(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,onMaybeEndReached:l})=>{const n=D({scrollLeft:0,scrollTop:0});function a(v){var m,f,_;const{scrollTop:g}=v;(m=t.value)==null||m.scrollTo(v),(f=o.value)==null||f.scrollToTop(g),(_=r.value)==null||_.scrollToTop(g)}function i(v){n.value=v,a(v)}function c(v){n.value.scrollTop=v,a(s(n))}function d(v){var m,f;n.value.scrollLeft=v,(f=(m=t.value)==null?void 0:m.scrollTo)==null||f.call(m,s(n))}function u(v){var m;i(v),(m=e.onScroll)==null||m.call(e,v)}function p({scrollTop:v}){const{scrollTop:m}=s(n);v!==m&&c(v)}function h(v,m="auto"){var f;(f=t.value)==null||f.scrollToRow(v,m)}return Se(()=>s(n).scrollTop,(v,m)=>{v>m&&l()}),{scrollPos:n,scrollTo:i,scrollToLeft:d,scrollToTop:c,scrollToRow:h,onScroll:u,onVerticalScroll:p}},iae=(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,tableInstance:l,ns:n,isScrolling:a})=>{const i=wt(),{emit:c}=i,d=lo(!1),u=D(e.defaultExpandedRowKeys||[]),p=D(-1),h=lo(null),v=D({}),m=D({}),f=lo({}),_=lo({}),g=lo({}),y=C(()=>st(e.estimatedRowHeight));function w(V){var B;(B=e.onRowsRendered)==null||B.call(e,V),V.rowCacheEnd>s(p)&&(p.value=V.rowCacheEnd)}function x({hovered:V,rowKey:B}){if(a.value)return;l.vnode.el.querySelectorAll(`[rowkey="${String(B)}"]`).forEach(J=>{V?J.classList.add(n.is("hovered")):J.classList.remove(n.is("hovered"))})}function $({expanded:V,rowData:B,rowIndex:j,rowKey:te}){var J,Z;const H=[...s(u)],F=H.indexOf(te);V?F===-1&&H.push(te):F>-1&&H.splice(F,1),u.value=H,c("update:expandedRowKeys",H),(J=e.onRowExpand)==null||J.call(e,{expanded:V,rowData:B,rowIndex:j,rowKey:te}),(Z=e.onExpandedRowsChange)==null||Z.call(e,H)}const T=Mr(()=>{var V,B,j,te;d.value=!0,v.value={...s(v),...s(m)},R(s(h),!1),m.value={},h.value=null,(V=t.value)==null||V.forceUpdate(),(B=o.value)==null||B.forceUpdate(),(j=r.value)==null||j.forceUpdate(),(te=i.proxy)==null||te.$forceUpdate(),d.value=!1},0);function R(V,B=!1){s(y)&&[t,o,r].forEach(j=>{const te=s(j);te&&te.resetAfterRowIndex(V,B)})}function P(V,B,j){const te=s(h);(te===null||te>j)&&(h.value=j),m.value[V]=B}function L({rowKey:V,height:B,rowIndex:j},te){te?te===K8.RIGHT?g.value[V]=B:f.value[V]=B:_.value[V]=B;const J=Math.max(...[f,g,_].map(Z=>Z.value[V]||0));s(v)[V]!==J&&(P(V,J,j),T())}return{expandedRowKeys:u,lastRenderedRowIndex:p,isDynamic:y,isResetting:d,rowHeights:v,resetAfterIndex:R,onRowExpanded:$,onRowHovered:x,onRowsRendered:w,onRowHeightChange:L}},sae=(e,{expandedRowKeys:t,lastRenderedRowIndex:o,resetAfterIndex:r})=>{const l=D({}),n=C(()=>{const i={},{data:c,rowKey:d}=e,u=s(t);if(!u||!u.length)return c;const p=[],h=new Set;u.forEach(m=>h.add(m));let v=c.slice();for(v.forEach(m=>i[m[d]]=0);v.length>0;){const m=v.shift();p.push(m),h.has(m[d])&&Array.isArray(m.children)&&m.children.length>0&&(v=[...m.children,...v],m.children.forEach(f=>i[f[d]]=i[m[d]]+1))}return l.value=i,p}),a=C(()=>{const{data:i,expandColumnKey:c}=e;return c?s(n):i});return Se(a,(i,c)=>{i!==c&&(o.value=-1,r(0,!0))}),{data:a,depthMap:l}},cae=(e,t)=>e+t,Rp=e=>Ke(e)?e.reduce(cae,0):e,ti=(e,t,o={})=>it(e)?e(t):e??o,sa=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=mo(e[t])}),e),U8=e=>io(e)?t=>rt(e,t):e,uae=(e,{columnsTotalWidth:t,data:o,fixedColumnsOnLeft:r,fixedColumnsOnRight:l})=>{const n=C(()=>{const{fixed:w,width:x,vScrollbarSize:$}=e,T=x-$;return w?Math.max(Math.round(s(t)),T):T}),a=C(()=>s(n)+e.vScrollbarSize),i=C(()=>{const{height:w=0,maxHeight:x=0,footerHeight:$,hScrollbarSize:T}=e;if(x>0){const R=s(m),P=s(c),V=s(v)+R+P+T;return Math.min(V,x-$)}return w-$}),c=C(()=>{const{rowHeight:w,estimatedRowHeight:x}=e,$=s(o);return st(x)?$.length*x:$.length*w}),d=C(()=>{const{maxHeight:w}=e,x=s(i);if(st(w)&&w>0)return x;const $=s(c)+s(v)+s(m);return Math.min(x,$)}),u=w=>w.width,p=C(()=>Rp(s(r).map(u))),h=C(()=>Rp(s(l).map(u))),v=C(()=>Rp(e.headerHeight)),m=C(()=>{var w;return(((w=e.fixedData)==null?void 0:w.length)||0)*e.rowHeight}),f=C(()=>s(i)-s(v)-s(m)),_=C(()=>{const{style:w={},height:x,width:$}=e;return sa({...w,height:x,width:$})}),g=C(()=>sa({height:e.footerHeight})),y=C(()=>({top:mo(s(v)),bottom:mo(e.footerHeight),width:mo(e.width)}));return{bodyWidth:n,fixedTableHeight:d,mainTableHeight:i,leftTableWidth:p,rightTableWidth:h,headerWidth:a,rowsHeight:c,windowHeight:f,footerHeight:g,emptyStyle:y,rootStyle:_,headerHeight:v}},dae=e=>{const t=D(),o=D(0),r=D(0);let l;return ft(()=>{l=so(t,([n])=>{const{width:a,height:i}=n.contentRect,{paddingLeft:c,paddingRight:d,paddingTop:u,paddingBottom:p}=getComputedStyle(n.target),h=Number.parseInt(c)||0,v=Number.parseInt(d)||0,m=Number.parseInt(u)||0,f=Number.parseInt(p)||0;o.value=a-h-v,r.value=i-m-f}).stop}),to(()=>{l==null||l()}),Se([o,r],([n,a])=>{var i;(i=e.onResize)==null||i.call(e,{width:n,height:a})}),{sizer:t,width:o,height:r}};function pae(e){const t=D(),o=D(),r=D(),{columns:l,columnsStyles:n,columnsTotalWidth:a,fixedColumnsOnLeft:i,fixedColumnsOnRight:c,hasFixedColumns:d,mainColumns:u,onColumnSorted:p}=nae(e,Yt(e,"columns"),Yt(e,"fixed")),{scrollTo:h,scrollToLeft:v,scrollToTop:m,scrollToRow:f,onScroll:_,onVerticalScroll:g,scrollPos:y}=aae(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,onMaybeEndReached:ae}),w=ze("table-v2"),x=wt(),$=lo(!1),{expandedRowKeys:T,lastRenderedRowIndex:R,isDynamic:P,isResetting:L,rowHeights:V,resetAfterIndex:B,onRowExpanded:j,onRowHeightChange:te,onRowHovered:J,onRowsRendered:Z}=iae(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,tableInstance:x,ns:w,isScrolling:$}),{data:H,depthMap:F}=sae(e,{expandedRowKeys:T,lastRenderedRowIndex:R,resetAfterIndex:B}),{bodyWidth:K,fixedTableHeight:I,mainTableHeight:U,leftTableWidth:oe,rightTableWidth:ne,headerWidth:ce,rowsHeight:Q,windowHeight:Me,footerHeight:de,emptyStyle:_e,rootStyle:me,headerHeight:Re}=uae(e,{columnsTotalWidth:a,data:H,fixedColumnsOnLeft:i,fixedColumnsOnRight:c}),Ce=D(),Ee=C(()=>{const pe=s(H).length===0;return Ke(e.fixedData)?e.fixedData.length===0&&pe:pe});function De(pe){const{estimatedRowHeight:ke,rowHeight:Oe,rowKey:we}=e;return ke?s(V)[s(H)[pe][we]]||ke:Oe}function ae(){const{onEndReached:pe}=e;if(!pe)return;const{scrollTop:ke}=s(y),Oe=s(Q),we=s(Me),Te=Oe-(ke+we)+e.hScrollbarSize;s(R)>=0&&Oe===ke+s(U)-s(Re)&&pe(Te)}return Se(()=>e.expandedRowKeys,pe=>T.value=pe,{deep:!0}),{columns:l,containerRef:Ce,mainTableRef:t,leftTableRef:o,rightTableRef:r,isDynamic:P,isResetting:L,isScrolling:$,hasFixedColumns:d,columnsStyles:n,columnsTotalWidth:a,data:H,expandedRowKeys:T,depthMap:F,fixedColumnsOnLeft:i,fixedColumnsOnRight:c,mainColumns:u,bodyWidth:K,emptyStyle:_e,rootStyle:me,headerWidth:ce,footerHeight:de,mainTableHeight:U,fixedTableHeight:I,leftTableWidth:oe,rightTableWidth:ne,showEmpty:Ee,getRowHeight:De,onColumnSorted:p,onRowHovered:J,onRowExpanded:j,onRowsRendered:Z,onRowHeightChange:te,scrollTo:h,scrollToLeft:v,scrollToTop:m,scrollToRow:f,onScroll:_,onVerticalScroll:g}}const x2=Symbol("tableV2"),W8=String,Xc={type:ue(Array),required:!0},k2={type:ue(Array)},q8={...k2,required:!0},fae=String,Y8={type:ue(Array),default:()=>uo([])},oi={type:Number,required:!0},G8={type:ue([String,Number,Symbol]),default:"id"},X8={type:ue(Object)},ri=Pe({class:String,columns:Xc,columnsStyles:{type:ue(Object),required:!0},depth:Number,expandColumnKey:fae,estimatedRowHeight:{...Ja.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:ue(Function)},onRowHover:{type:ue(Function)},onRowHeightChange:{type:ue(Function)},rowData:{type:ue(Object),required:!0},rowEventHandlers:{type:ue(Object)},rowIndex:{type:Number,required:!0},rowKey:G8,style:{type:ue(Object)}}),C2={type:Number,required:!0},S2=Pe({class:String,columns:Xc,fixedHeaderData:{type:ue(Array)},headerData:{type:ue(Array),required:!0},headerHeight:{type:ue([Number,Array]),default:50},rowWidth:C2,rowHeight:{type:Number,default:50},height:C2,width:C2}),Lp=Pe({columns:Xc,data:q8,fixedData:k2,estimatedRowHeight:ri.estimatedRowHeight,width:oi,height:oi,headerWidth:oi,headerHeight:S2.headerHeight,bodyWidth:oi,rowHeight:oi,cache:o8.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:Ja.scrollbarAlwaysOn,scrollbarStartGap:Ja.scrollbarStartGap,scrollbarEndGap:Ja.scrollbarEndGap,class:W8,style:X8,containerStyle:X8,getRowHeight:{type:ue(Function),required:!0},rowKey:ri.rowKey,onRowsRendered:{type:ue(Function)},onScroll:{type:ue(Function)}}),hae=Pe({cache:Lp.cache,estimatedRowHeight:ri.estimatedRowHeight,rowKey:G8,headerClass:{type:ue([String,Function])},headerProps:{type:ue([Object,Function])},headerCellProps:{type:ue([Object,Function])},headerHeight:S2.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:ue([String,Function])},rowProps:{type:ue([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:ue([Object,Function])},columns:Xc,data:q8,dataGetter:{type:ue(Function)},fixedData:k2,expandColumnKey:ri.expandColumnKey,expandedRowKeys:Y8,defaultExpandedRowKeys:Y8,class:W8,fixed:Boolean,style:{type:ue(Object)},width:oi,height:oi,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:Ja.hScrollbarSize,vScrollbarSize:Ja.vScrollbarSize,scrollbarAlwaysOn:n8.alwaysOn,sortBy:{type:ue(Object),default:()=>({})},sortState:{type:ue(Object),default:void 0},onColumnSort:{type:ue(Function)},onExpandedRowsChange:{type:ue(Function)},onEndReached:{type:ue(Function)},onRowExpand:ri.onRowExpand,onScroll:Lp.onScroll,onRowsRendered:Lp.onRowsRendered,rowEventHandlers:ri.rowEventHandlers}),E2=(e,{slots:t})=>{var o;const{cellData:r,style:l}=e,n=((o=r==null?void 0:r.toString)==null?void 0:o.call(r))||"",a=be(t,"default",e,()=>[n]);return ee("div",{class:e.class,title:n,style:l},[a])};E2.displayName="ElTableV2Cell",E2.inheritAttrs=!1;const T2=(e,{slots:t})=>be(t,"default",e,()=>{var o,r;return[ee("div",{class:e.class,title:(o=e.column)==null?void 0:o.title},[(r=e.column)==null?void 0:r.title])]});T2.displayName="ElTableV2HeaderCell",T2.inheritAttrs=!1;const vae=Pe({class:String,columns:Xc,columnsStyles:{type:ue(Object),required:!0},headerIndex:Number,style:{type:ue(Object)}}),mae=N({name:"ElTableV2HeaderRow",props:vae,setup(e,{slots:t}){return()=>{const{columns:o,columnsStyles:r,headerIndex:l,style:n}=e;let a=o.map((i,c)=>t.cell({columns:o,column:i,columnIndex:c,headerIndex:l,style:r[i.key]}));return t.header&&(a=t.header({cells:a.map(i=>Ke(i)&&i.length===1?i[0]:i),columns:o,headerIndex:l})),ee("div",{class:e.class,style:n,role:"row"},[a])}}}),gae=N({name:"ElTableV2Header",props:S2,setup(e,{slots:t,expose:o}){const r=ze("table-v2"),l=D(),n=C(()=>sa({width:e.width,height:e.height})),a=C(()=>sa({width:e.rowWidth,height:e.height})),i=C(()=>Gn(s(e.headerHeight))),c=p=>{const h=s(l);et(()=>{h!=null&&h.scroll&&h.scroll({left:p})})},d=()=>{const p=r.e("fixed-header-row"),{columns:h,fixedHeaderData:v,rowHeight:m}=e;return v==null?void 0:v.map((f,_)=>{var g;const y=sa({height:m,width:"100%"});return(g=t.fixed)==null?void 0:g.call(t,{class:p,columns:h,rowData:f,rowIndex:-(_+1),style:y})})},u=()=>{const p=r.e("dynamic-header-row"),{columns:h}=e;return s(i).map((v,m)=>{var f;const _=sa({width:"100%",height:v});return(f=t.dynamic)==null?void 0:f.call(t,{class:p,columns:h,headerIndex:m,style:_})})};return o({scrollToLeft:c}),()=>{if(!(e.height<=0))return ee("div",{ref:l,class:e.class,style:s(n),role:"rowgroup"},[ee("div",{style:s(a),class:r.e("header")},[u(),d()])])}}}),bae=e=>{const{isScrolling:t}=Ge(x2),o=D(!1),r=D(),l=C(()=>st(e.estimatedRowHeight)&&e.rowIndex>=0),n=(c=!1)=>{const d=s(r);if(!d)return;const{columns:u,onRowHeightChange:p,rowKey:h,rowIndex:v,style:m}=e,{height:f}=d.getBoundingClientRect();o.value=!0,et(()=>{if(c||f!==Number.parseInt(m.height)){const _=u[0],g=(_==null?void 0:_.placeholderSign)===Gc;p==null||p({rowKey:h,height:f,rowIndex:v},_&&!g&&_.fixed)}})},a=C(()=>{const{rowData:c,rowIndex:d,rowKey:u,onRowHover:p}=e,h=e.rowEventHandlers||{},v={};return Object.entries(h).forEach(([m,f])=>{it(f)&&(v[m]=_=>{f({event:_,rowData:c,rowIndex:d,rowKey:u})})}),p&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:f})=>{const _=v[m];v[m]=g=>{p({event:g,hovered:f,rowData:c,rowIndex:d,rowKey:u}),_==null||_(g)}}),v}),i=c=>{const{onRowExpand:d,rowData:u,rowIndex:p,rowKey:h}=e;d==null||d({expanded:c,rowData:u,rowIndex:p,rowKey:h})};return ft(()=>{s(l)&&n(!0)}),{isScrolling:t,measurable:l,measured:o,rowRef:r,eventHandlers:a,onExpand:i}},_ae=N({name:"ElTableV2TableRow",props:ri,setup(e,{expose:t,slots:o,attrs:r}){const{eventHandlers:l,isScrolling:n,measurable:a,measured:i,rowRef:c,onExpand:d}=bae(e);return t({onExpand:d}),()=>{const{columns:u,columnsStyles:p,expandColumnKey:h,depth:v,rowData:m,rowIndex:f,style:_}=e;let g=u.map((y,w)=>{const x=Ke(m.children)&&m.children.length>0&&y.key===h;return o.cell({column:y,columns:u,columnIndex:w,depth:v,style:p[y.key],rowData:m,rowIndex:f,isScrolling:s(n),expandIconProps:x?{rowData:m,rowIndex:f,onExpand:d}:void 0})});if(o.row&&(g=o.row({cells:g.map(y=>Ke(y)&&y.length===1?y[0]:y),style:_,columns:u,depth:v,rowData:m,rowIndex:f,isScrolling:s(n)})),s(a)){const{height:y,...w}=_||{},x=s(i);return ee("div",Mt({ref:c,class:e.class,style:x?_:w,role:"row"},r,s(l)),[g])}return ee("div",Mt(r,{ref:c,class:e.class,style:_,role:"row"},s(l)),[g])}}}),wae=e=>{const{sortOrder:t}=e;return ee(Ze,{size:14,class:e.class},{default:()=>[t===qc.ASC?ee(Y3,null,null):ee(q3,null,null)]})},yae=e=>{const{expanded:t,expandable:o,onExpand:r,style:l,size:n}=e,a={onClick:o?()=>r(!t):void 0,class:e.class};return ee(Ze,Mt(a,{size:n,style:l}),{default:()=>[ee(ir,null,null)]})},xae="ElTableV2Grid",kae=e=>{const t=D(),o=D(),r=C(()=>{const{data:f,rowHeight:_,estimatedRowHeight:g}=e;if(!g)return f.length*_}),l=C(()=>{const{fixedData:f,rowHeight:_}=e;return((f==null?void 0:f.length)||0)*_}),n=C(()=>Rp(e.headerHeight)),a=C(()=>{const{height:f}=e;return Math.max(0,f-s(n)-s(l))}),i=C(()=>s(n)+s(l)>0),c=({data:f,rowIndex:_})=>f[_][e.rowKey];function d({rowCacheStart:f,rowCacheEnd:_,rowVisibleStart:g,rowVisibleEnd:y}){var w;(w=e.onRowsRendered)==null||w.call(e,{rowCacheStart:f,rowCacheEnd:_,rowVisibleStart:g,rowVisibleEnd:y})}function u(f,_){var g;(g=o.value)==null||g.resetAfterRowIndex(f,_)}function p(f,_){const g=s(t),y=s(o);xt(f)?(g==null||g.scrollToLeft(f.scrollLeft),y==null||y.scrollTo(f)):(g==null||g.scrollToLeft(f),y==null||y.scrollTo({scrollLeft:f,scrollTop:_}))}function h(f){var _;(_=s(o))==null||_.scrollTo({scrollTop:f})}function v(f,_){var g;(g=s(o))==null||g.scrollToItem(f,1,_)}function m(){var f,_;(f=s(o))==null||f.$forceUpdate(),(_=s(t))==null||_.$forceUpdate()}return{bodyRef:o,forceUpdate:m,fixedRowHeight:l,gridHeight:a,hasHeader:i,headerHeight:n,headerRef:t,totalHeight:r,itemKey:c,onItemRendered:d,resetAfterRowIndex:u,scrollTo:p,scrollToTop:h,scrollToRow:v}},$2=N({name:xae,props:Lp,setup(e,{slots:t,expose:o}){const{ns:r}=Ge(x2),{bodyRef:l,fixedRowHeight:n,gridHeight:a,hasHeader:i,headerRef:c,headerHeight:d,totalHeight:u,forceUpdate:p,itemKey:h,onItemRendered:v,resetAfterRowIndex:m,scrollTo:f,scrollToTop:_,scrollToRow:g}=kae(e);o({forceUpdate:p,totalHeight:u,scrollTo:f,scrollToTop:_,scrollToRow:g,resetAfterRowIndex:m});const y=()=>e.bodyWidth;return()=>{const{cache:w,columns:x,data:$,fixedData:T,useIsScrolling:R,scrollbarAlwaysOn:P,scrollbarEndGap:L,scrollbarStartGap:V,style:B,rowHeight:j,bodyWidth:te,estimatedRowHeight:J,headerWidth:Z,height:H,width:F,getRowHeight:K,onScroll:I}=e,U=st(J),oe=U?xre:bre,ne=s(d);return ee("div",{role:"table",class:[r.e("table"),e.class],style:B},[ee(oe,{ref:l,data:$,useIsScrolling:R,itemKey:h,columnCache:0,columnWidth:U?y:te,totalColumn:1,totalRow:$.length,rowCache:w,rowHeight:U?K:j,width:F,height:s(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:V,scrollbarEndGap:L,scrollbarAlwaysOn:P,onScroll:I,onItemRendered:v,perfMode:!1},{default:ce=>{var Q;const Me=$[ce.rowIndex];return(Q=t.row)==null?void 0:Q.call(t,{...ce,columns:x,rowData:Me})}}),s(i)&&ee(gae,{ref:c,class:r.e("header-wrapper"),columns:x,headerData:$,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:Z,rowHeight:j,width:F,height:Math.min(ne+s(n),H)},{dynamic:t.header,fixed:t.row})])}}});function Cae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Sae=(e,{slots:t})=>{const{mainTableRef:o,...r}=e;return ee($2,Mt({ref:o},r),Cae(t)?t:{default:()=>[t]})};function Eae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Tae=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:o,...r}=e;return ee($2,Mt({ref:o},r),Eae(t)?t:{default:()=>[t]})};function $ae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Mae=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:o,...r}=e;return ee($2,Mt({ref:o},r),$ae(t)?t:{default:()=>[t]})};function Aae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const zae=(e,{slots:t})=>{const{columns:o,columnsStyles:r,depthMap:l,expandColumnKey:n,expandedRowKeys:a,estimatedRowHeight:i,hasFixedColumns:c,rowData:d,rowIndex:u,style:p,isScrolling:h,rowProps:v,rowClass:m,rowKey:f,rowEventHandlers:_,ns:g,onRowHovered:y,onRowExpanded:w}=e,x=ti(m,{columns:o,rowData:d,rowIndex:u},""),$=ti(v,{columns:o,rowData:d,rowIndex:u}),T=d[f],R=l[T]||0,P=!!n,L=u<0,V=[g.e("row"),x,{[g.e(`row-depth-${R}`)]:P&&u>=0,[g.is("expanded")]:P&&a.includes(T),[g.is("fixed")]:!R&&L,[g.is("customized")]:!!t.row}],B=c?y:void 0,j={...$,columns:o,columnsStyles:r,class:V,depth:R,expandColumnKey:n,estimatedRowHeight:L?void 0:i,isScrolling:h,rowIndex:u,rowData:d,rowKey:T,rowEventHandlers:_,style:p};return ee(_ae,Mt(j,{onRowExpand:w,onMouseenter:Z=>{B==null||B({hovered:!0,rowKey:T,event:Z,rowData:d,rowIndex:u})},onMouseleave:Z=>{B==null||B({hovered:!1,rowKey:T,event:Z,rowData:d,rowIndex:u})},rowkey:T}),Aae(t)?t:{default:()=>[t]})},M2=({columns:e,column:t,columnIndex:o,depth:r,expandIconProps:l,isScrolling:n,rowData:a,rowIndex:i,style:c,expandedRowKeys:d,ns:u,cellProps:p,expandColumnKey:h,indentSize:v,iconSize:m,rowKey:f},{slots:_})=>{const g=sa(c);if(t.placeholderSign===Gc)return ee("div",{class:u.em("row-cell","placeholder"),style:g},null);const{cellRenderer:y,dataKey:w,dataGetter:x}=t,$=it(x)?x({columns:e,column:t,columnIndex:o,rowData:a,rowIndex:i}):wo(a,w??""),T=ti(p,{cellData:$,columns:e,column:t,columnIndex:o,rowIndex:i,rowData:a}),R={class:u.e("cell-text"),columns:e,column:t,columnIndex:o,cellData:$,isScrolling:n,rowData:a,rowIndex:i},P=U8(y),L=P?P(R):be(_,"default",R,()=>[ee(E2,R,null)]),V=[u.e("row-cell"),t.class,t.align===Yc.CENTER&&u.is("align-center"),t.align===Yc.RIGHT&&u.is("align-right")],B=i>=0&&h&&t.key===h,j=i>=0&&d.includes(a[f]);let te;const J=`margin-inline-start: ${r*v}px;`;return B&&(xt(l)?te=ee(yae,Mt(l,{class:[u.e("expand-icon"),u.is("expanded",j)],size:m,expanded:j,style:J,expandable:!0}),null):te=ee("div",{style:[J,`width: ${m}px; height: ${m}px;`].join(" ")},null)),ee("div",Mt({class:V,style:g},T,{role:"cell"}),[te,L])};M2.inheritAttrs=!1;function Iae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Oae=({columns:e,columnsStyles:t,headerIndex:o,style:r,headerClass:l,headerProps:n,ns:a},{slots:i})=>{const c={columns:e,headerIndex:o},d=[a.e("header-row"),ti(l,c,""),{[a.is("customized")]:!!i.header}],u={...ti(n,c),columnsStyles:t,class:d,columns:e,headerIndex:o,style:r};return ee(mae,u,Iae(i)?i:{default:()=>[i]})},Z8=(e,{slots:t})=>{const{column:o,ns:r,style:l,onColumnSorted:n}=e,a=sa(l);if(o.placeholderSign===Gc)return ee("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:i,headerClass:c,sortable:d}=o,u={...e,class:r.e("header-cell-text")},p=U8(i),h=p?p(u):be(t,"default",u,()=>[ee(T2,u,null)]),{sortBy:v,sortState:m,headerCellProps:f}=e;let _,g;if(m){const x=m[o.key];_=!!y2[x],g=_?x:qc.ASC}else _=o.key===v.key,g=_?v.order:qc.ASC;const y=[r.e("header-cell"),ti(c,e,""),o.align===Yc.CENTER&&r.is("align-center"),o.align===Yc.RIGHT&&r.is("align-right"),d&&r.is("sortable")],w={...ti(f,e),onClick:o.sortable?n:void 0,class:y,style:a,"data-key":o.key};return ee("div",Mt(w,{role:"columnheader"}),[h,d&&ee(wae,{class:[r.e("sort-icon"),_&&r.is("sorting")],sortOrder:g},null)])},J8=(e,{slots:t})=>{var o;return ee("div",{class:e.class,style:e.style},[(o=t.default)==null?void 0:o.call(t)])};J8.displayName="ElTableV2Footer";const Q8=(e,{slots:t})=>{const o=be(t,"default",{},()=>[ee(Py,null,null)]);return ee("div",{class:e.class,style:e.style},[o])};Q8.displayName="ElTableV2Empty";const ex=(e,{slots:t})=>{var o;return ee("div",{class:e.class,style:e.style},[(o=t.default)==null?void 0:o.call(t)])};ex.displayName="ElTableV2Overlay";function Zc(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Nae=N({name:"ElTableV2",props:hae,setup(e,{slots:t,expose:o}){const r=ze("table-v2"),{columnsStyles:l,fixedColumnsOnLeft:n,fixedColumnsOnRight:a,mainColumns:i,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:u,rightTableWidth:p,data:h,depthMap:v,expandedRowKeys:m,hasFixedColumns:f,mainTableRef:_,leftTableRef:g,rightTableRef:y,isDynamic:w,isResetting:x,isScrolling:$,bodyWidth:T,emptyStyle:R,rootStyle:P,headerWidth:L,footerHeight:V,showEmpty:B,scrollTo:j,scrollToLeft:te,scrollToTop:J,scrollToRow:Z,getRowHeight:H,onColumnSorted:F,onRowHeightChange:K,onRowHovered:I,onRowExpanded:U,onRowsRendered:oe,onScroll:ne,onVerticalScroll:ce}=pae(e);return o({scrollTo:j,scrollToLeft:te,scrollToTop:J,scrollToRow:Z}),zt(x2,{ns:r,isResetting:x,isScrolling:$}),()=>{const{cache:Q,cellProps:Me,estimatedRowHeight:de,expandColumnKey:_e,fixedData:me,headerHeight:Re,headerClass:Ce,headerProps:Ee,headerCellProps:De,sortBy:ae,sortState:pe,rowHeight:ke,rowClass:Oe,rowEventHandlers:we,rowKey:Te,rowProps:Ne,scrollbarAlwaysOn:Ie,indentSize:Ae,iconSize:xe,useIsScrolling:We,vScrollbarSize:qe,width:ye}=e,Ye=s(h),tt={cache:Q,class:r.e("main"),columns:s(i),data:Ye,fixedData:me,estimatedRowHeight:de,bodyWidth:s(T)+qe,headerHeight:Re,headerWidth:s(L),height:s(c),mainTableRef:_,rowKey:Te,rowHeight:ke,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,useIsScrolling:We,width:ye,getRowHeight:H,onRowsRendered:oe,onScroll:ne},pt=s(u),dt=s(d),Y={cache:Q,class:r.e("left"),columns:s(n),data:Ye,estimatedRowHeight:de,leftTableRef:g,rowHeight:ke,bodyWidth:pt,headerWidth:pt,headerHeight:Re,height:dt,rowKey:Te,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,useIsScrolling:We,width:pt,getRowHeight:H,onScroll:ce},A=s(p)+qe,G={cache:Q,class:r.e("right"),columns:s(a),data:Ye,estimatedRowHeight:de,rightTableRef:y,rowHeight:ke,bodyWidth:A,headerWidth:A,headerHeight:Re,height:dt,rowKey:Te,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,width:A,style:`--${s(r.namespace)}-table-scrollbar-size: ${qe}px`,useIsScrolling:We,getRowHeight:H,onScroll:ce},X=s(l),re={ns:r,depthMap:s(v),columnsStyles:X,expandColumnKey:_e,expandedRowKeys:s(m),estimatedRowHeight:de,hasFixedColumns:s(f),rowProps:Ne,rowClass:Oe,rowKey:Te,rowEventHandlers:we,onRowHovered:I,onRowExpanded:U,onRowHeightChange:K},ge={cellProps:Me,expandColumnKey:_e,indentSize:Ae,iconSize:xe,rowKey:Te,expandedRowKeys:s(m),ns:r},fe={ns:r,headerClass:Ce,headerProps:Ee,columnsStyles:X},Fe={ns:r,sortBy:ae,sortState:pe,headerCellProps:De,onColumnSorted:F},at={row:no=>ee(zae,Mt(no,re),{row:t.row,cell:bt=>{let Qt;return t.cell?ee(M2,Mt(bt,ge,{style:X[bt.column.key]}),Zc(Qt=t.cell(bt))?Qt:{default:()=>[Qt]}):ee(M2,Mt(bt,ge,{style:X[bt.column.key]}),null)}}),header:no=>ee(Oae,Mt(no,fe),{header:t.header,cell:bt=>{let Qt;return t["header-cell"]?ee(Z8,Mt(bt,Fe,{style:X[bt.column.key]}),Zc(Qt=t["header-cell"](bt))?Qt:{default:()=>[Qt]}):ee(Z8,Mt(bt,Fe,{style:X[bt.column.key]}),null)}})},_t=[e.class,r.b(),r.e("root"),{[r.is("dynamic")]:s(w)}],At={class:r.e("footer"),style:s(V)};return ee("div",{class:_t,style:s(P)},[ee(Sae,tt,Zc(at)?at:{default:()=>[at]}),ee(Tae,Y,Zc(at)?at:{default:()=>[at]}),ee(Mae,G,Zc(at)?at:{default:()=>[at]}),t.footer&&ee(J8,At,{default:t.footer}),s(B)&&ee(Q8,{class:r.e("empty"),style:s(R)},{default:t.empty}),t.overlay&&ee(ex,{class:r.e("overlay")},{default:t.overlay})])}}}),Pae=Pe({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:ue(Function)}}),Rae=N({name:"ElAutoResizer",props:Pae,setup(e,{slots:t}){const o=ze("auto-resizer"),{height:r,width:l,sizer:n}=dae(e),a={width:"100%",height:"100%"};return()=>{var i;return ee("div",{ref:n,class:o.b(),style:a},[(i=t.default)==null?void 0:i.call(t,{height:r.value,width:l.value})])}}}),Lae=yt(Nae),Bae=yt(Rae),Bp=Symbol("tabsRootContextKey"),Vae=Pe({tabs:{type:ue(Array),default:()=>uo([])}}),tx="ElTabBar",Dae=N({...N({name:tx}),props:Vae,setup(e,{expose:t}){const o=e,r=wt(),l=Ge(Bp);l||Io(tx,"");const n=ze("tabs"),a=D(),i=D(),c=()=>{let u=0,p=0;const h=["top","bottom"].includes(l.props.tabPosition)?"width":"height",v=h==="width"?"x":"y",m=v==="x"?"left":"top";return o.tabs.every(f=>{var _,g;const y=(g=(_=r.parent)==null?void 0:_.refs)==null?void 0:g[`tab-${f.uid}`];if(!y)return!1;if(!f.active)return!0;u=y[`offset${Nl(m)}`],p=y[`client${Nl(h)}`];const w=window.getComputedStyle(y);return h==="width"&&(o.tabs.length>1&&(p-=Number.parseFloat(w.paddingLeft)+Number.parseFloat(w.paddingRight)),u+=Number.parseFloat(w.paddingLeft)),!1}),{[h]:`${p}px`,transform:`translate${Nl(v)}(${u}px)`}},d=()=>i.value=c();return Se(()=>o.tabs,async()=>{await et(),d()},{immediate:!0}),so(a,()=>d()),t({ref:a,update:d}),(u,p)=>(b(),M("div",{ref_key:"barRef",ref:a,class:O([s(n).e("active-bar"),s(n).is(s(l).props.tabPosition)]),style:Je(i.value)},null,6))}});var Hae=Le(Dae,[["__file","tab-bar.vue"]]);const Fae=Pe({panes:{type:ue(Array),default:()=>uo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),jae={tabClick:(e,t,o)=>o instanceof Event,tabRemove:(e,t)=>t instanceof Event},ox="ElTabNav",Kae=N({name:ox,props:Fae,emits:jae,setup(e,{expose:t,emit:o}){const r=wt(),l=Ge(Bp);l||Io(ox,"");const n=ze("tabs"),a=aE(),i=gE(),c=D(),d=D(),u=D(),p=D(),h=D(!1),v=D(0),m=D(!1),f=D(!0),_=C(()=>["top","bottom"].includes(l.props.tabPosition)?"width":"height"),g=C(()=>({transform:`translate${_.value==="width"?"X":"Y"}(-${v.value}px)`})),y=()=>{if(!c.value)return;const L=c.value[`offset${Nl(_.value)}`],V=v.value;if(!V)return;const B=V>L?V-L:0;v.value=B},w=()=>{if(!c.value||!d.value)return;const L=d.value[`offset${Nl(_.value)}`],V=c.value[`offset${Nl(_.value)}`],B=v.value;if(L-B<=V)return;const j=L-B>V*2?B+V:L-V;v.value=j},x=async()=>{const L=d.value;if(!h.value||!u.value||!c.value||!L)return;await et();const V=u.value.querySelector(".is-active");if(!V)return;const B=c.value,j=["top","bottom"].includes(l.props.tabPosition),te=V.getBoundingClientRect(),J=B.getBoundingClientRect(),Z=j?L.offsetWidth-J.width:L.offsetHeight-J.height,H=v.value;let F=H;j?(te.leftJ.right&&(F=H+te.right-J.right)):(te.topJ.bottom&&(F=H+(te.bottom-J.bottom))),F=Math.max(F,0),v.value=Math.min(F,Z)},$=()=>{var L;if(!d.value||!c.value)return;e.stretch&&((L=p.value)==null||L.update());const V=d.value[`offset${Nl(_.value)}`],B=c.value[`offset${Nl(_.value)}`],j=v.value;B0&&(v.value=0))},T=L=>{const V=L.code,{up:B,down:j,left:te,right:J}=lt;if(![B,j,te,J].includes(V))return;const Z=Array.from(L.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),H=Z.indexOf(L.target);let F;V===te||V===B?H===0?F=Z.length-1:F=H-1:H{f.value&&(m.value=!0)},P=()=>m.value=!1;return Se(a,L=>{L==="hidden"?f.value=!1:L==="visible"&&setTimeout(()=>f.value=!0,50)}),Se(i,L=>{L?setTimeout(()=>f.value=!0,50):f.value=!1}),so(u,$),ft(()=>setTimeout(()=>x(),0)),rn(()=>$()),t({scrollToActiveTab:x,removeFocus:P}),Se(()=>e.panes,()=>r.update(),{flush:"post",deep:!0}),()=>{const L=h.value?[ee("span",{class:[n.e("nav-prev"),n.is("disabled",!h.value.prev)],onClick:y},[ee(Ze,null,{default:()=>[ee(fn,null,null)]})]),ee("span",{class:[n.e("nav-next"),n.is("disabled",!h.value.next)],onClick:w},[ee(Ze,null,{default:()=>[ee(ir,null,null)]})])]:null,V=e.panes.map((B,j)=>{var te,J,Z,H;const F=B.uid,K=B.props.disabled,I=(J=(te=B.props.name)!=null?te:B.index)!=null?J:`${j}`,U=!K&&(B.isClosable||e.editable);B.index=`${j}`;const oe=U?ee(Ze,{class:"is-icon-close",onClick:Q=>o("tabRemove",B,Q)},{default:()=>[ee(Jr,null,null)]}):null,ne=((H=(Z=B.slots).label)==null?void 0:H.call(Z))||B.props.label,ce=!K&&B.active?0:-1;return ee("div",{ref:`tab-${F}`,class:[n.e("item"),n.is(l.props.tabPosition),n.is("active",B.active),n.is("disabled",K),n.is("closable",U),n.is("focus",m.value)],id:`tab-${I}`,key:`tab-${F}`,"aria-controls":`pane-${I}`,role:"tab","aria-selected":B.active,tabindex:ce,onFocus:()=>R(),onBlur:()=>P(),onClick:Q=>{P(),o("tabClick",B,I,Q)},onKeydown:Q=>{U&&(Q.code===lt.delete||Q.code===lt.backspace)&&o("tabRemove",B,Q)}},[ne,oe])});return ee("div",{ref:u,class:[n.e("nav-wrap"),n.is("scrollable",!!h.value),n.is(l.props.tabPosition)]},[L,ee("div",{class:n.e("nav-scroll"),ref:c},[ee("div",{class:[n.e("nav"),n.is(l.props.tabPosition),n.is("stretch",e.stretch&&["top","bottom"].includes(l.props.tabPosition))],ref:d,style:g.value,role:"tablist",onKeydown:T},[e.type?null:ee(Hae,{ref:p,tabs:[...e.panes]},null),V])])])}}}),Uae=Pe({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:ue(Function),default:()=>!0},stretch:Boolean}),A2=e=>ut(e)||st(e),Wae={[St]:e=>A2(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>A2(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>A2(e),tabAdd:()=>!0},qae=N({name:"ElTabs",props:Uae,emits:Wae,setup(e,{emit:t,slots:o,expose:r}){var l;const n=ze("tabs"),{children:a,addChild:i,removeChild:c}=Wh(wt(),"ElTabPane"),d=D(),u=D((l=e.modelValue)!=null?l:"0"),p=async(f,_=!1)=>{var g,y,w;if(!(u.value===f||ko(f)))try{await((g=e.beforeLeave)==null?void 0:g.call(e,f,u.value))!==!1&&(u.value=f,_&&(t(St,f),t("tabChange",f)),(w=(y=d.value)==null?void 0:y.removeFocus)==null||w.call(y))}catch{}},h=(f,_,g)=>{f.props.disabled||(p(_,!0),t("tabClick",f,g))},v=(f,_)=>{f.props.disabled||ko(f.props.name)||(_.stopPropagation(),t("edit",f.props.name,"remove"),t("tabRemove",f.props.name))},m=()=>{t("edit",void 0,"add"),t("tabAdd")};return Se(()=>e.modelValue,f=>p(f)),Se(u,async()=>{var f;await et(),(f=d.value)==null||f.scrollToActiveTab()}),zt(Bp,{props:e,currentName:u,registerPane:i,unregisterPane:c}),r({currentName:u}),()=>{const f=o["add-icon"],_=e.editable||e.addable?ee("span",{class:n.e("new-tab"),tabindex:"0",onClick:m,onKeydown:w=>{w.code===lt.enter&&m()}},[f?be(o,"add-icon"):ee(Ze,{class:n.is("icon-plus")},{default:()=>[ee(hh,null,null)]})]):null,g=ee("div",{class:[n.e("header"),n.is(e.tabPosition)]},[_,ee(Kae,{ref:d,currentName:u.value,editable:e.editable,type:e.type,panes:a.value,stretch:e.stretch,onTabClick:h,onTabRemove:v},null)]),y=ee("div",{class:n.e("content")},[be(o,"default")]);return ee("div",{class:[n.b(),n.m(e.tabPosition),{[n.m("card")]:e.type==="card",[n.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[g,y]:[y,g]])}}}),Yae=Pe({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Gae=["id","aria-hidden","aria-labelledby"],rx="ElTabPane",Xae=N({...N({name:rx}),props:Yae,setup(e){const t=e,o=wt(),r=Do(),l=Ge(Bp);l||Io(rx,"usage: ");const n=ze("tab-pane"),a=D(),i=C(()=>t.closable||l.props.closable),c=qb(()=>{var v;return l.currentName.value===((v=t.name)!=null?v:a.value)}),d=D(c.value),u=C(()=>{var v;return(v=t.name)!=null?v:a.value}),p=qb(()=>!t.lazy||d.value||c.value);Se(c,v=>{v&&(d.value=!0)});const h=Dt({uid:o.uid,slots:r,props:t,paneName:u,active:c,index:a,isClosable:i});return ft(()=>{l.registerPane(h)}),Rn(()=>{l.unregisterPane(h.uid)}),(v,m)=>s(p)?mt((b(),M("div",{key:0,id:`pane-${s(u)}`,class:O(s(n).b()),role:"tabpanel","aria-hidden":!s(c),"aria-labelledby":`tab-${s(u)}`},[be(v.$slots,"default")],10,Gae)),[[Lt,s(c)]]):se("v-if",!0)}});var lx=Le(Xae,[["__file","tab-pane.vue"]]);const Zae=yt(qae,{TabPane:lx}),Jae=co(lx),Qae=Pe({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Rl,default:""},truncated:{type:Boolean},lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),eie=N({...N({name:"ElText"}),props:Qae,setup(e){const t=e,o=So(),r=ze("text"),l=C(()=>[r.b(),r.m(t.type),r.m(o.value),r.is("truncated",t.truncated),r.is("line-clamp",!ko(t.lineClamp))]);return(n,a)=>(b(),he(Et(n.tag),{class:O(s(l)),style:Je({"-webkit-line-clamp":n.lineClamp})},{default:le(()=>[be(n.$slots,"default")]),_:3},8,["class","style"]))}});var tie=Le(eie,[["__file","text.vue"]]);const oie=yt(tie),rie=Pe({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:Oo,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:ue([String,Object]),default:()=>ph},clearIcon:{type:ue([String,Object]),default:()=>hn},...Xi}),Cn=e=>{const t=(e||"").split(":");if(t.length>=2){let o=Number.parseInt(t[0],10);const r=Number.parseInt(t[1],10),l=e.toUpperCase();return l.includes("AM")&&o===12?o=0:l.includes("PM")&&o!==12&&(o+=12),{hours:o,minutes:r}}return null},z2=(e,t)=>{const o=Cn(e);if(!o)return-1;const r=Cn(t);if(!r)return-1;const l=o.minutes+o.hours*60,n=r.minutes+r.hours*60;return l===n?0:l>n?1:-1},nx=e=>`${e}`.padStart(2,"0"),ps=e=>`${nx(e.hours)}:${nx(e.minutes)}`,lie=(e,t)=>{const o=Cn(e);if(!o)return"";const r=Cn(t);if(!r)return"";const l={hours:o.hours,minutes:o.minutes};return l.minutes+=r.minutes,l.hours+=r.hours,l.hours+=Math.floor(l.minutes/60),l.minutes=l.minutes%60,ps(l)},nie=N({...N({name:"ElTimeSelect"}),props:rie,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const o=e;kt.extend(mv);const{Option:r}=Za,l=ze("input"),n=D(),a=xr(),{lang:i}=Rt(),c=C(()=>o.modelValue),d=C(()=>{const g=Cn(o.start);return g?ps(g):null}),u=C(()=>{const g=Cn(o.end);return g?ps(g):null}),p=C(()=>{const g=Cn(o.step);return g?ps(g):null}),h=C(()=>{const g=Cn(o.minTime||"");return g?ps(g):null}),v=C(()=>{const g=Cn(o.maxTime||"");return g?ps(g):null}),m=C(()=>{const g=[];if(o.start&&o.end&&o.step){let y=d.value,w;for(;y&&u.value&&z2(y,u.value)<=0;)w=kt(y,"HH:mm").locale(i.value).format(o.format),g.push({value:w,disabled:z2(y,h.value||"-1:-1")<=0||z2(y,v.value||"100:100")>=0}),y=lie(y,p.value)}return g});return t({blur:()=>{var g,y;(y=(g=n.value)==null?void 0:g.blur)==null||y.call(g)},focus:()=>{var g,y;(y=(g=n.value)==null?void 0:g.focus)==null||y.call(g)}}),(g,y)=>(b(),he(s(Za),{ref_key:"select",ref:n,"model-value":s(c),disabled:s(a),clearable:g.clearable,"clear-icon":g.clearIcon,size:g.size,effect:g.effect,placeholder:g.placeholder,"default-first-option":"",filterable:g.editable,"empty-values":g.emptyValues,"value-on-clear":g.valueOnClear,"onUpdate:modelValue":y[0]||(y[0]=w=>g.$emit("update:modelValue",w)),onChange:y[1]||(y[1]=w=>g.$emit("change",w)),onBlur:y[2]||(y[2]=w=>g.$emit("blur",w)),onFocus:y[3]||(y[3]=w=>g.$emit("focus",w))},{prefix:le(()=>[g.prefixIcon?(b(),he(s(Ze),{key:0,class:O(s(l).e("prefix-icon"))},{default:le(()=>[(b(),he(Et(g.prefixIcon)))]),_:1},8,["class"])):se("v-if",!0)]),default:le(()=>[(b(!0),M(Qe,null,It(s(m),w=>(b(),he(s(r),{key:w.value,label:w.value,value:w.value,disabled:w.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear"]))}});var Vp=Le(nie,[["__file","time-select.vue"]]);Vp.install=e=>{e.component(Vp.name,Vp)};const aie=Vp,iie=N({name:"ElTimeline",setup(e,{slots:t}){const o=ze("timeline");return zt("timeline",t),()=>rt("ul",{class:[o.b()]},[be(t,"default")])}}),sie=Pe({timestamp:{type:String,default:""},hideTimestamp:{type:Boolean,default:!1},center:{type:Boolean,default:!1},placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Xt},hollow:{type:Boolean,default:!1}}),cie=N({...N({name:"ElTimelineItem"}),props:sie,setup(e){const t=e,o=ze("timeline-item"),r=C(()=>[o.e("node"),o.em("node",t.size||""),o.em("node",t.type||""),o.is("hollow",t.hollow)]);return(l,n)=>(b(),M("li",{class:O([s(o).b(),{[s(o).e("center")]:l.center}])},[E("div",{class:O(s(o).e("tail"))},null,2),l.$slots.dot?se("v-if",!0):(b(),M("div",{key:0,class:O(s(r)),style:Je({backgroundColor:l.color})},[l.icon?(b(),he(s(Ze),{key:0,class:O(s(o).e("icon"))},{default:le(()=>[(b(),he(Et(l.icon)))]),_:1},8,["class"])):se("v-if",!0)],6)),l.$slots.dot?(b(),M("div",{key:1,class:O(s(o).e("dot"))},[be(l.$slots,"dot")],2)):se("v-if",!0),E("div",{class:O(s(o).e("wrapper"))},[!l.hideTimestamp&&l.placement==="top"?(b(),M("div",{key:0,class:O([s(o).e("timestamp"),s(o).is("top")])},$e(l.timestamp),3)):se("v-if",!0),E("div",{class:O(s(o).e("content"))},[be(l.$slots,"default")],2),!l.hideTimestamp&&l.placement==="bottom"?(b(),M("div",{key:1,class:O([s(o).e("timestamp"),s(o).is("bottom")])},$e(l.timestamp),3)):se("v-if",!0)],2)],2))}});var ax=Le(cie,[["__file","timeline-item.vue"]]);const uie=yt(iie,{TimelineItem:ax}),die=co(ax),ix=Pe({nowrap:Boolean});var sx=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(sx||{});const pie=Object.values(sx),I2=Pe({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:ue(Object),default:null}}),fie=Pe({side:{type:ue(String),values:pie,required:!0}}),hie=["absolute","fixed"],vie=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],O2=Pe({arrowPadding:{type:ue(Number),default:5},effect:{type:String,default:""},contentClass:String,placement:{type:ue(String),values:vie,default:"bottom"},reference:{type:ue(Object),default:null},offset:{type:Number,default:8},strategy:{type:ue(String),values:hie,default:"absolute"},showArrow:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),N2=Pe({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:ue(Function)},"onUpdate:open":{type:ue(Function)}}),fs={type:ue(Function)},P2=Pe({onBlur:fs,onClick:fs,onFocus:fs,onMouseDown:fs,onMouseEnter:fs,onMouseLeave:fs}),mie=Pe({...N2,...I2,...P2,...O2,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:ue(Object),default:null},teleported:Boolean,to:{type:ue(String),default:"body"}}),Dp=Symbol("tooltipV2"),cx=Symbol("tooltipV2Content"),R2="tooltip_v2.open",gie=N({...N({name:"ElTooltipV2Root"}),props:N2,setup(e,{expose:t}){const o=e,r=D(o.defaultOpen),l=D(null),n=C({get:()=>Na(o.open)?r.value:o.open,set:_=>{var g;r.value=_,(g=o["onUpdate:open"])==null||g.call(o,_)}}),a=C(()=>st(o.delayDuration)&&o.delayDuration>0),{start:i,stop:c}=$a(()=>{n.value=!0},C(()=>o.delayDuration),{immediate:!1}),d=ze("tooltip-v2"),u=Qo(),p=()=>{c(),n.value=!0},h=()=>{s(a)?i():p()},v=p,m=()=>{c(),n.value=!1};return Se(n,_=>{var g;_&&(document.dispatchEvent(new CustomEvent(R2)),v()),(g=o.onOpenChange)==null||g.call(o,_)}),ft(()=>{document.addEventListener(R2,m)}),to(()=>{c(),document.removeEventListener(R2,m)}),zt(Dp,{contentId:u,triggerRef:l,ns:d,onClose:m,onDelayOpen:h,onOpen:v}),t({onOpen:v,onClose:m}),(_,g)=>be(_.$slots,"default",{open:s(n)})}});var bie=Le(gie,[["__file","root.vue"]]);const _ie=N({...N({name:"ElTooltipV2Arrow"}),props:{...I2,...fie},setup(e){const t=e,{ns:o}=Ge(Dp),{arrowRef:r}=Ge(cx),l=C(()=>{const{style:n,width:a,height:i}=t,c=o.namespace.value;return{[`--${c}-tooltip-v2-arrow-width`]:`${a}px`,[`--${c}-tooltip-v2-arrow-height`]:`${i}px`,[`--${c}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${c}-tooltip-v2-arrow-cover-width`]:a/2-1,...n||{}}});return(n,a)=>(b(),M("span",{ref_key:"arrowRef",ref:r,style:Je(s(l)),class:O(s(o).e("arrow"))},null,6))}});var ux=Le(_ie,[["__file","arrow.vue"]]);const wie=Pe({style:{type:ue([String,Object,Array]),default:()=>({})}}),yie=N({...N({name:"ElVisuallyHidden"}),props:wie,setup(e){const t=e,o=C(()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,l)=>(b(),M("span",Mt(r.$attrs,{style:s(o)}),[be(r.$slots,"default")],16))}});var xie=Le(yie,[["__file","visual-hidden.vue"]]);const kie=["data-side"],Cie=N({...N({name:"ElTooltipV2Content"}),props:{...O2,...ix},setup(e){const t=e,{triggerRef:o,contentId:r}=Ge(Dp),l=D(t.placement),n=D(t.strategy),a=D(null),{referenceRef:i,contentRef:c,middlewareData:d,x:u,y:p,update:h}=hK({placement:l,strategy:n,middleware:C(()=>{const w=[J6(t.offset)];return t.showArrow&&w.push(vK({arrowRef:a})),w})}),v=Ki().nextZIndex(),m=ze("tooltip-v2"),f=C(()=>l.value.split("-")[0]),_=C(()=>({position:s(n),top:`${s(p)||0}px`,left:`${s(u)||0}px`,zIndex:v})),g=C(()=>{if(!t.showArrow)return{};const{arrow:w}=s(d);return{[`--${m.namespace.value}-tooltip-v2-arrow-x`]:`${w==null?void 0:w.x}px`||"",[`--${m.namespace.value}-tooltip-v2-arrow-y`]:`${w==null?void 0:w.y}px`||""}}),y=C(()=>[m.e("content"),m.is("dark",t.effect==="dark"),m.is(s(n)),t.contentClass]);return Se(a,()=>h()),Se(()=>t.placement,w=>l.value=w),ft(()=>{Se(()=>t.reference||o.value,w=>{i.value=w||void 0},{immediate:!0})}),zt(cx,{arrowRef:a}),(w,x)=>(b(),M("div",{ref_key:"contentRef",ref:c,style:Je(s(_)),"data-tooltip-v2-root":""},[w.nowrap?se("v-if",!0):(b(),M("div",{key:0,"data-side":s(f),class:O(s(y))},[be(w.$slots,"default",{contentStyle:s(_),contentClass:s(y)}),ee(s(xie),{id:s(r),role:"tooltip"},{default:le(()=>[w.ariaLabel?(b(),M(Qe,{key:0},[Ct($e(w.ariaLabel),1)],64)):be(w.$slots,"default",{key:1})]),_:3},8,["id"]),be(w.$slots,"arrow",{style:Je(s(g)),side:s(f)})],10,kie))],4))}});var dx=Le(Cie,[["__file","content.vue"]]);const Sie=Pe({setRef:{type:ue(Function),required:!0},onlyChild:Boolean});var Eie=N({props:Sie,setup(e,{slots:t}){const o=D(),r=Nd(o,l=>{l?e.setRef(l.nextElementSibling):e.setRef(null)});return()=>{var l;const[n]=((l=t.default)==null?void 0:l.call(t))||[],a=e.onlyChild?cF(n.children):n.children;return ee(Qe,{ref:r},[a])}}});const Tie=N({...N({name:"ElTooltipV2Trigger"}),props:{...ix,...P2},setup(e){const t=e,{onClose:o,onOpen:r,onDelayOpen:l,triggerRef:n,contentId:a}=Ge(Dp);let i=!1;const c=y=>{n.value=y},d=()=>{i=!1},u=ho(t.onMouseEnter,l),p=ho(t.onMouseLeave,o),h=ho(t.onMouseDown,()=>{o(),i=!0,document.addEventListener("mouseup",d,{once:!0})}),v=ho(t.onFocus,()=>{i||r()}),m=ho(t.onBlur,o),f=ho(t.onClick,y=>{y.detail===0&&o()}),_={blur:m,click:f,focus:v,mousedown:h,mouseenter:u,mouseleave:p},g=(y,w,x)=>{y&&Object.entries(w).forEach(([$,T])=>{y[x]($,T)})};return Se(n,(y,w)=>{g(y,_,"addEventListener"),g(w,_,"removeEventListener"),y&&y.setAttribute("aria-describedby",a.value)}),to(()=>{g(n.value,_,"removeEventListener"),document.removeEventListener("mouseup",d)}),(y,w)=>y.nowrap?(b(),he(s(Eie),{key:0,"set-ref":c,"only-child":""},{default:le(()=>[be(y.$slots,"default")]),_:3})):(b(),M("button",Mt({key:1,ref_key:"triggerRef",ref:n},y.$attrs),[be(y.$slots,"default")],16))}});var $ie=Le(Tie,[["__file","trigger.vue"]]);const Mie=N({...N({name:"ElTooltipV2"}),props:mie,setup(e){const o=Bo(e),r=Dt(Ol(o,Object.keys(I2))),l=Dt(Ol(o,Object.keys(O2))),n=Dt(Ol(o,Object.keys(N2))),a=Dt(Ol(o,Object.keys(P2)));return(i,c)=>(b(),he(bie,Zl(mi(n)),{default:le(({open:d})=>[ee($ie,Mt(a,{nowrap:""}),{default:le(()=>[be(i.$slots,"trigger")]),_:3},16),(b(),he(hi,{to:i.to,disabled:!i.teleported},[i.fullTransition?(b(),he(Mo,Zl(Mt({key:0},i.transitionProps)),{default:le(()=>[i.alwaysOn||d?(b(),he(dx,Zl(Mt({key:0},l)),{arrow:le(({style:u,side:p})=>[i.showArrow?(b(),he(ux,Mt({key:0},r,{style:u,side:p}),null,16,["style","side"])):se("v-if",!0)]),default:le(()=>[be(i.$slots,"default")]),_:3},16)):se("v-if",!0)]),_:2},1040)):(b(),M(Qe,{key:1},[i.alwaysOn||d?(b(),he(dx,Zl(Mt({key:0},l)),{arrow:le(({style:u,side:p})=>[i.showArrow?(b(),he(ux,Mt({key:0},r,{style:u,side:p}),null,16,["style","side"])):se("v-if",!0)]),default:le(()=>[be(i.$slots,"default")]),_:3},16)):se("v-if",!0)],64))],8,["to","disabled"]))]),_:3},16))}});var Aie=Le(Mie,[["__file","tooltip.vue"]]);const zie=yt(Aie),px="left-check-change",fx="right-check-change",hs=Pe({data:{type:ue(Array),default:()=>[]},titles:{type:ue(Array),default:()=>[]},buttonTexts:{type:ue(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:ue(Function)},leftDefaultChecked:{type:ue(Array),default:()=>[]},rightDefaultChecked:{type:ue(Array),default:()=>[]},renderContent:{type:ue(Function)},modelValue:{type:ue(Array),default:()=>[]},format:{type:ue(Object),default:()=>({})},filterable:Boolean,props:{type:ue(Object),default:()=>uo({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),L2=(e,t)=>[e,t].every(Ke)||Ke(e)&&jo(t),Iie={[ro]:(e,t,o)=>[e,o].every(Ke)&&["left","right"].includes(t),[St]:e=>Ke(e),[px]:L2,[fx]:L2},B2="checked-change",Oie=Pe({data:hs.data,optionRender:{type:ue(Function)},placeholder:String,title:String,filterable:Boolean,format:hs.format,filterMethod:hs.filterMethod,defaultChecked:hs.leftDefaultChecked,props:hs.props}),Nie={[B2]:L2},Jc=e=>{const t={label:"label",key:"key",disabled:"disabled"};return C(()=>({...t,...e.props}))},Pie=(e,t,o)=>{const r=Jc(e),l=C(()=>e.data.filter(u=>it(e.filterMethod)?e.filterMethod(t.query,u):String(u[r.value.label]||u[r.value.key]).toLowerCase().includes(t.query.toLowerCase()))),n=C(()=>l.value.filter(u=>!u[r.value.disabled])),a=C(()=>{const u=t.checked.length,p=e.data.length,{noChecked:h,hasChecked:v}=e.format;return h&&v?u>0?v.replace(/\${checked}/g,u.toString()).replace(/\${total}/g,p.toString()):h.replace(/\${total}/g,p.toString()):`${u}/${p}`}),i=C(()=>{const u=t.checked.length;return u>0&&u{const u=n.value.map(p=>p[r.value.key]);t.allChecked=u.length>0&&u.every(p=>t.checked.includes(p))},d=u=>{t.checked=u?n.value.map(p=>p[r.value.key]):[]};return Se(()=>t.checked,(u,p)=>{if(c(),t.checkChangeByUser){const h=u.concat(p).filter(v=>!u.includes(v)||!p.includes(v));o(B2,u,h)}else o(B2,u),t.checkChangeByUser=!0}),Se(n,()=>{c()}),Se(()=>e.data,()=>{const u=[],p=l.value.map(h=>h[r.value.key]);t.checked.forEach(h=>{p.includes(h)&&u.push(h)}),t.checkChangeByUser=!1,t.checked=u}),Se(()=>e.defaultChecked,(u,p)=>{if(p&&u.length===p.length&&u.every(m=>p.includes(m)))return;const h=[],v=n.value.map(m=>m[r.value.key]);u.forEach(m=>{v.includes(m)&&h.push(m)}),t.checkChangeByUser=!1,t.checked=h},{immediate:!0}),{filteredData:l,checkableData:n,checkedSummary:a,isIndeterminate:i,updateAllChecked:c,handleAllCheckedChange:d}},Rie=(e,t)=>({onSourceCheckedChange:(l,n)=>{e.leftChecked=l,n&&t(px,l,n)},onTargetCheckedChange:(l,n)=>{e.rightChecked=l,n&&t(fx,l,n)}}),Lie=e=>{const t=Jc(e),o=C(()=>e.data.reduce((n,a)=>(n[a[t.value.key]]=a)&&n,{})),r=C(()=>e.data.filter(n=>!e.modelValue.includes(n[t.value.key]))),l=C(()=>e.targetOrder==="original"?e.data.filter(n=>e.modelValue.includes(n[t.value.key])):e.modelValue.reduce((n,a)=>{const i=o.value[a];return i&&n.push(i),n},[]));return{sourceData:r,targetData:l}},Bie=(e,t,o)=>{const r=Jc(e),l=(i,c,d)=>{o(St,i),o(ro,i,c,d)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(c=>{const d=i.indexOf(c);d>-1&&i.splice(d,1)}),l(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const c=e.data.filter(d=>{const u=d[r.value.key];return t.leftChecked.includes(u)&&!e.modelValue.includes(u)}).map(d=>d[r.value.key]);i=e.targetOrder==="unshift"?c.concat(i):i.concat(c),e.targetOrder==="original"&&(i=e.data.filter(d=>i.includes(d[r.value.key])).map(d=>d[r.value.key])),l(i,"right",t.leftChecked)}}},Vie=N({...N({name:"ElTransferPanel"}),props:Oie,emits:Nie,setup(e,{expose:t,emit:o}){const r=e,l=Do(),n=({option:w})=>w,{t:a}=Rt(),i=ze("transfer"),c=Dt({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Jc(r),{filteredData:u,checkedSummary:p,isIndeterminate:h,handleAllCheckedChange:v}=Pie(r,c,o),m=C(()=>!Yr(c.query)&&Yr(u.value)),f=C(()=>!Yr(l.default()[0].children)),{checked:_,allChecked:g,query:y}=Bo(c);return t({query:y}),(w,x)=>(b(),M("div",{class:O(s(i).b("panel"))},[E("p",{class:O(s(i).be("panel","header"))},[ee(s(rl),{modelValue:s(g),"onUpdate:modelValue":x[0]||(x[0]=$=>Zt(g)?g.value=$:null),indeterminate:s(h),"validate-event":!1,onChange:s(v)},{default:le(()=>[Ct($e(w.title)+" ",1),E("span",null,$e(s(p)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),E("div",{class:O([s(i).be("panel","body"),s(i).is("with-footer",s(f))])},[w.filterable?(b(),he(s(cr),{key:0,modelValue:s(y),"onUpdate:modelValue":x[1]||(x[1]=$=>Zt(y)?y.value=$:null),class:O(s(i).be("panel","filter")),size:"default",placeholder:w.placeholder,"prefix-icon":s(W3),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):se("v-if",!0),mt(ee(s(Lw),{modelValue:s(_),"onUpdate:modelValue":x[2]||(x[2]=$=>Zt(_)?_.value=$:null),"validate-event":!1,class:O([s(i).is("filterable",w.filterable),s(i).be("panel","list")])},{default:le(()=>[(b(!0),M(Qe,null,It(s(u),$=>(b(),he(s(rl),{key:$[s(d).key],class:O(s(i).be("panel","item")),value:$[s(d).key],disabled:$[s(d).disabled],"validate-event":!1},{default:le(()=>{var T;return[ee(n,{option:(T=w.optionRender)==null?void 0:T.call(w,$)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[Lt,!s(m)&&!s(Yr)(w.data)]]),mt(E("p",{class:O(s(i).be("panel","empty"))},$e(s(m)?s(a)("el.transfer.noMatch"):s(a)("el.transfer.noData")),3),[[Lt,s(m)||s(Yr)(w.data)]])],2),s(f)?(b(),M("p",{key:0,class:O(s(i).be("panel","footer"))},[be(w.$slots,"default")],2)):se("v-if",!0)],2))}});var hx=Le(Vie,[["__file","transfer-panel.vue"]]);const Die={key:0},Hie={key:0},Fie=N({...N({name:"ElTransfer"}),props:hs,emits:Iie,setup(e,{expose:t,emit:o}){const r=e,l=Do(),{t:n}=Rt(),a=ze("transfer"),{formItem:i}=sr(),c=Dt({leftChecked:[],rightChecked:[]}),d=Jc(r),{sourceData:u,targetData:p}=Lie(r),{onSourceCheckedChange:h,onTargetCheckedChange:v}=Rie(c,o),{addToLeft:m,addToRight:f}=Bie(r,c,o),_=D(),g=D(),y=P=>{switch(P){case"left":_.value.query="";break;case"right":g.value.query="";break}},w=C(()=>r.buttonTexts.length===2),x=C(()=>r.titles[0]||n("el.transfer.titles.0")),$=C(()=>r.titles[1]||n("el.transfer.titles.1")),T=C(()=>r.filterPlaceholder||n("el.transfer.filterPlaceholder"));Se(()=>r.modelValue,()=>{var P;r.validateEvent&&((P=i==null?void 0:i.validate)==null||P.call(i,"change").catch(L=>void 0))});const R=C(()=>P=>r.renderContent?r.renderContent(rt,P):l.default?l.default({option:P}):rt("span",P[d.value.label]||P[d.value.key]));return t({clearQuery:y,leftPanel:_,rightPanel:g}),(P,L)=>(b(),M("div",{class:O(s(a).b())},[ee(hx,{ref_key:"leftPanel",ref:_,data:s(u),"option-render":s(R),placeholder:s(T),title:s(x),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,"default-checked":P.leftDefaultChecked,props:r.props,onCheckedChange:s(h)},{default:le(()=>[be(P.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),E("div",{class:O(s(a).e("buttons"))},[ee(s(Wo),{type:"primary",class:O([s(a).e("button"),s(a).is("with-texts",s(w))]),disabled:s(Yr)(c.rightChecked),onClick:s(m)},{default:le(()=>[ee(s(Ze),null,{default:le(()=>[ee(s(fn))]),_:1}),s(ko)(P.buttonTexts[0])?se("v-if",!0):(b(),M("span",Die,$e(P.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),ee(s(Wo),{type:"primary",class:O([s(a).e("button"),s(a).is("with-texts",s(w))]),disabled:s(Yr)(c.leftChecked),onClick:s(f)},{default:le(()=>[s(ko)(P.buttonTexts[1])?se("v-if",!0):(b(),M("span",Hie,$e(P.buttonTexts[1]),1)),ee(s(Ze),null,{default:le(()=>[ee(s(ir))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),ee(hx,{ref_key:"rightPanel",ref:g,data:s(p),"option-render":s(R),placeholder:s(T),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,title:s($),"default-checked":P.rightDefaultChecked,props:r.props,onCheckedChange:s(v)},{default:le(()=>[be(P.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var jie=Le(Fie,[["__file","transfer.vue"]]);const Kie=yt(jie),vs="$treeNodeId",vx=function(e,t){!t||t[vs]||Object.defineProperty(t,vs,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},V2=function(e,t){return e?t[e]:t[vs]},D2=(e,t,o)=>{const r=e.value.currentNode;o();const l=e.value.currentNode;r!==l&&t("current-change",l?l.data:null,l)},H2=e=>{let t=!0,o=!0,r=!0;for(let l=0,n=e.length;l"u"){const n=r[t];return n===void 0?"":n}};let Uie=0,F2=class hf{constructor(t){this.id=Uie++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const o in t)Pt(t,o)&&(this[o]=t[o]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const o=t.props;if(o&&typeof o.isLeaf<"u"){const n=Hp(this,"isLeaf");typeof n=="boolean"&&(this.isLeafByUser=n)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||vx(this,this.data),!this.data)return;const r=t.defaultExpandedKeys,l=t.key;l&&r&&r.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||vx(this,t),this.data=t,this.childNodes=[];let o;this.level===0&&Array.isArray(this.data)?o=this.data:o=Hp(this,"children")||[];for(let r=0,l=o.length;r-1)return t.childNodes[o+1]}return null}get previousSibling(){const t=this.parent;if(t){const o=t.childNodes.indexOf(this);if(o>-1)return o>0?t.childNodes[o-1]:null}return null}contains(t,o=!0){return(this.childNodes||[]).some(r=>r===t||o&&r.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,o,r){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof hf)){if(!r){const l=this.getChildren(!0);l.includes(t.data)||(typeof o>"u"||o<0?l.push(t.data):l.splice(o,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Dt(new hf(t)),t instanceof hf&&t.initialize()}t.level=this.level+1,typeof o>"u"||o<0?this.childNodes.push(t):this.childNodes.splice(o,0,t),this.updateLeafState()}insertBefore(t,o){let r;o&&(r=this.childNodes.indexOf(o)),this.insertChild(t,r)}insertAfter(t,o){let r;o&&(r=this.childNodes.indexOf(o),r!==-1&&(r+=1)),this.insertChild(t,r)}removeChild(t){const o=this.getChildren()||[],r=o.indexOf(t.data);r>-1&&o.splice(r,1);const l=this.childNodes.indexOf(t);l>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(l,1)),this.updateLeafState()}removeChildByData(t){let o=null;for(let r=0;r{if(o){let l=this.parent;for(;l.level>0;)l.expanded=!0,l=l.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(l=>{l.canFocus=!0})};this.shouldLoadData()?this.loadData(l=>{Array.isArray(l)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Qc(this),r())}):r()}doCreateChildren(t,o={}){t.forEach(r=>{this.insertChild(Object.assign({data:r},o),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,o,r,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:i}=H2(this.childNodes);!this.isLeaf&&!a&&i&&(this.checked=!1,t=!1);const c=()=>{if(o){const d=this.childNodes;for(let h=0,v=d.length;h{c(),Qc(this)},{checked:t!==!1});return}else c()}const n=this.parent;!n||n.level===0||r||Qc(n)}getChildren(t=!1){if(this.level===0)return this.data;const o=this.data;if(!o)return null;const r=this.store.props;let l="children";return r&&(l=r.children||"children"),o[l]===void 0&&(o[l]=null),t&&!o[l]&&(o[l]=[]),o[l]}updateChildren(){const t=this.getChildren()||[],o=this.childNodes.map(n=>n.data),r={},l=[];t.forEach((n,a)=>{const i=n[vs];!!i&&o.findIndex(d=>d[vs]===i)>=0?r[i]={index:a,data:n}:l.push({index:a,data:n})}),this.store.lazy||o.forEach(n=>{r[n[vs]]||this.removeChildByData(n)}),l.forEach(({index:n,data:a})=>{this.insertChild({data:a},n)}),this.updateLeafState()}loadData(t,o={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(o).length)){this.loading=!0;const r=n=>{this.childNodes=[],this.doCreateChildren(n,o),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,n)},l=()=>{this.loading=!1};this.store.load(this,r,l)}else t&&t.call(this)}eachNode(t){const o=[this];for(;o.length;){const r=o.shift();o.unshift(...r.childNodes),t(r)}}reInitChecked(){this.store.checkStrictly||Qc(this)}};class Wie{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const o in t)Pt(t,o)&&(this[o]=t[o]);this.nodesMap={}}initialize(){if(this.root=new F2({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,o=>{this.root.doCreateChildren(o),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const o=this.filterNodeMethod,r=this.lazy,l=function(n){const a=n.root?n.root.childNodes:n.childNodes;if(a.forEach(i=>{i.visible=o.call(i,t,i.data,i),l(i)}),!n.visible&&a.length){let i=!0;i=!a.some(c=>c.visible),n.root?n.root.visible=i===!1:n.visible=i===!1}t&&n.visible&&!n.isLeaf&&(!r||n.loaded)&&n.expand()};l(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof F2)return t;const o=xt(t)?V2(this.key,t):t;return this.nodesMap[o]||null}insertBefore(t,o){const r=this.getNode(o);r.parent.insertBefore({data:t},r)}insertAfter(t,o){const r=this.getNode(o);r.parent.insertAfter({data:t},r)}remove(t){const o=this.getNode(t);o&&o.parent&&(o===this.currentNode&&(this.currentNode=null),o.parent.removeChild(o))}append(t,o){const r=Na(o)?this.root:this.getNode(o);r&&r.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],o=this.nodesMap;t.forEach(r=>{const l=o[r];l&&l.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const o=this.key;!t||!t.data||(o?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,o=!1){const r=[],l=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{(i.checked||o&&i.indeterminate)&&(!t||t&&i.isLeaf)&&r.push(i.data),l(i)})};return l(this),r}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(o=>(o||{})[this.key])}getHalfCheckedNodes(){const t=[],o=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(n=>{n.indeterminate&&t.push(n.data),o(n)})};return o(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],o=this.nodesMap;for(const r in o)Pt(o,r)&&t.push(o[r]);return t}updateChildren(t,o){const r=this.nodesMap[t];if(!r)return;const l=r.childNodes;for(let n=l.length-1;n>=0;n--){const a=l[n];this.remove(a.data)}for(let n=0,a=o.length;nc.level-d.level),n=Object.create(null),a=Object.keys(r);l.forEach(c=>c.setChecked(!1,!1));const i=c=>{c.childNodes.forEach(d=>{var u;n[d.data[t]]=!0,(u=d.childNodes)!=null&&u.length&&i(d)})};for(let c=0,d=l.length;c{_.isLeaf||_.setChecked(!1,!1),v(_)})};v(u)}}}setCheckedNodes(t,o=!1){const r=this.key,l={};t.forEach(n=>{l[(n||{})[r]]=!0}),this._setCheckedKeys(r,o,l)}setCheckedKeys(t,o=!1){this.defaultCheckedKeys=t;const r=this.key,l={};t.forEach(n=>{l[n]=!0}),this._setCheckedKeys(r,o,l)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(o=>{const r=this.getNode(o);r&&r.expand(null,this.autoExpandParent)})}setChecked(t,o,r){const l=this.getNode(t);l&&l.setChecked(!!o,r)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const o=this.currentNode;o&&(o.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,o=!0){const r=t[this.key],l=this.nodesMap[r];this.setCurrentNode(l),o&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,o=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(t);r&&(this.setCurrentNode(r),o&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}var qie=Le(N({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=ze("tree"),o=Ge("NodeInstance"),r=Ge("RootTree");return()=>{const l=e.node,{data:n,store:a}=l;return e.renderContent?e.renderContent(rt,{_self:o,node:l,data:n,store:a}):be(r.ctx.slots,"default",{node:l,data:n},()=>[rt("span",{class:t.be("node","label")},[l.label])])}}}),[["__file","tree-node-content.vue"]]);function mx(e){const t=Ge("TreeNodeMap",null),o={treeNodeExpand:r=>{e.node!==r&&e.node.collapse()},children:[]};return t&&t.children.push(o),zt("TreeNodeMap",o),{broadcastExpanded:r=>{if(e.accordion)for(const l of o.children)l.treeNodeExpand(r)}}}const gx=Symbol("dragEvents");function Yie({props:e,ctx:t,el$:o,dropIndicator$:r,store:l}){const n=ze("tree"),a=D({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return zt(gx,{treeNodeDragStart:({event:u,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return u.preventDefault(),!1;u.dataTransfer.effectAllowed="move";try{u.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=p,t.emit("node-drag-start",p.node,u)},treeNodeDragOver:({event:u,treeNode:p})=>{const h=p,v=a.value.dropNode;v&&v.node.id!==h.node.id&&ar(v.$el,n.is("drop-inner"));const m=a.value.draggingNode;if(!m||!h)return;let f=!0,_=!0,g=!0,y=!0;typeof e.allowDrop=="function"&&(f=e.allowDrop(m.node,h.node,"prev"),y=_=e.allowDrop(m.node,h.node,"inner"),g=e.allowDrop(m.node,h.node,"next")),u.dataTransfer.dropEffect=_||f||g?"move":"none",(f||_||g)&&(v==null?void 0:v.node.id)!==h.node.id&&(v&&t.emit("node-drag-leave",m.node,v.node,u),t.emit("node-drag-enter",m.node,h.node,u)),f||_||g?a.value.dropNode=h:a.value.dropNode=null,h.node.nextSibling===m.node&&(g=!1),h.node.previousSibling===m.node&&(f=!1),h.node.contains(m.node,!1)&&(_=!1),(m.node===h.node||m.node.contains(h.node))&&(f=!1,_=!1,g=!1);const w=h.$el.querySelector(`.${n.be("node","content")}`).getBoundingClientRect(),x=o.value.getBoundingClientRect();let $;const T=f?_?.25:g?.45:1:-1,R=g?_?.75:f?.55:0:1;let P=-9999;const L=u.clientY-w.top;Lw.height*R?$="after":_?$="inner":$="none";const V=h.$el.querySelector(`.${n.be("node","expand-icon")}`).getBoundingClientRect(),B=r.value;$==="before"?P=V.top-x.top:$==="after"&&(P=V.bottom-x.top),B.style.top=`${P}px`,B.style.left=`${V.right-x.left}px`,$==="inner"?Zr(h.$el,n.is("drop-inner")):ar(h.$el,n.is("drop-inner")),a.value.showDropIndicator=$==="before"||$==="after",a.value.allowDrop=a.value.showDropIndicator||y,a.value.dropType=$,t.emit("node-drag-over",m.node,h.node,u)},treeNodeDragEnd:u=>{const{draggingNode:p,dropType:h,dropNode:v}=a.value;if(u.preventDefault(),u.dataTransfer.dropEffect="move",p&&v){const m={data:p.node.data};h!=="none"&&p.node.remove(),h==="before"?v.node.parent.insertBefore(m,v.node):h==="after"?v.node.parent.insertAfter(m,v.node):h==="inner"&&v.node.insertChild(m),h!=="none"&&(l.value.registerNode(m),l.value.key&&p.node.eachNode(f=>{var _;(_=l.value.nodesMap[f.data[l.value.key]])==null||_.setChecked(f.checked,!l.value.checkStrictly)})),ar(v.$el,n.is("drop-inner")),t.emit("node-drag-end",p.node,v.node,h,u),h!=="none"&&t.emit("node-drop",p.node,v.node,h,u)}p&&!v&&t.emit("node-drag-end",p.node,null,h,u),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const Gie=N({name:"ElTreeNode",components:{ElCollapseTransition:gp,ElCheckbox:rl,NodeContent:qie,ElIcon:Ze,Loading:vn},props:{node:{type:F2,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const o=ze("tree"),{broadcastExpanded:r}=mx(e),l=Ge("RootTree"),n=D(!1),a=D(!1),i=D(null),c=D(null),d=D(null),u=Ge(gx),p=wt();zt("NodeInstance",p),e.node.expanded&&(n.value=!0,a.value=!0);const h=l.props.props.children||"children";Se(()=>{const L=e.node.data[h];return L&&[...L]},()=>{e.node.updateChildren()}),Se(()=>e.node.indeterminate,L=>{f(e.node.checked,L)}),Se(()=>e.node.checked,L=>{f(L,e.node.indeterminate)}),Se(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),Se(()=>e.node.expanded,L=>{et(()=>n.value=L),L&&(a.value=!0)});const v=L=>V2(l.props.nodeKey,L.data),m=L=>{const V=e.props.class;if(!V)return{};let B;if(it(V)){const{data:j}=L;B=V(j,L)}else B=V;return ut(B)?{[B]:!0}:B},f=(L,V)=>{(i.value!==L||c.value!==V)&&l.ctx.emit("check-change",e.node.data,L,V),i.value=L,c.value=V},_=L=>{D2(l.store,l.ctx.emit,()=>l.store.value.setCurrentNode(e.node)),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),l.props.checkOnClickNode&&!e.node.disabled&&w(null,{target:{checked:!e.node.checked}}),l.ctx.emit("node-click",e.node.data,e.node,p,L)},g=L=>{l.instance.vnode.props.onNodeContextmenu&&(L.stopPropagation(),L.preventDefault()),l.ctx.emit("node-contextmenu",L,e.node.data,e.node,p)},y=()=>{e.node.isLeaf||(n.value?(l.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},w=(L,V)=>{e.node.setChecked(V.target.checked,!l.props.checkStrictly),et(()=>{const B=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:B.getCheckedNodes(),checkedKeys:B.getCheckedKeys(),halfCheckedNodes:B.getHalfCheckedNodes(),halfCheckedKeys:B.getHalfCheckedKeys()})})};return{ns:o,node$:d,tree:l,expanded:n,childNodeRendered:a,oldChecked:i,oldIndeterminate:c,getNodeKey:v,getNodeClass:m,handleSelectChange:f,handleClick:_,handleContextMenu:g,handleExpandIconClick:y,handleCheckChange:w,handleChildNodeExpand:(L,V,B)=>{r(V),l.ctx.emit("node-expand",L,V,B)},handleDragStart:L=>{l.props.draggable&&u.treeNodeDragStart({event:L,treeNode:e})},handleDragOver:L=>{L.preventDefault(),l.props.draggable&&u.treeNodeDragOver({event:L,treeNode:{$el:d.value,node:e.node}})},handleDrop:L=>{L.preventDefault()},handleDragEnd:L=>{l.props.draggable&&u.treeNodeDragEnd(L)},CaretRight:dh}}}),Xie=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],Zie=["aria-expanded"];function Jie(e,t,o,r,l,n){const a=nt("el-icon"),i=nt("el-checkbox"),c=nt("loading"),d=nt("node-content"),u=nt("el-tree-node"),p=nt("el-collapse-transition");return mt((b(),M("div",{ref:"node$",class:O([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=ct((...h)=>e.handleClick&&e.handleClick(...h),["stop"])),onContextmenu:t[2]||(t[2]=(...h)=>e.handleContextMenu&&e.handleContextMenu(...h)),onDragstart:t[3]||(t[3]=ct((...h)=>e.handleDragStart&&e.handleDragStart(...h),["stop"])),onDragover:t[4]||(t[4]=ct((...h)=>e.handleDragOver&&e.handleDragOver(...h),["stop"])),onDragend:t[5]||(t[5]=ct((...h)=>e.handleDragEnd&&e.handleDragEnd(...h),["stop"])),onDrop:t[6]||(t[6]=ct((...h)=>e.handleDrop&&e.handleDrop(...h),["stop"]))},[E("div",{class:O(e.ns.be("node","content")),style:Je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(b(),he(a,{key:0,class:O([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:ct(e.handleExpandIconClick,["stop"])},{default:le(()=>[(b(),he(Et(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.showCheckbox?(b(),he(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=ct(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):se("v-if",!0),e.node.loading?(b(),he(a,{key:2,class:O([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:le(()=>[ee(c)]),_:1},8,["class"])):se("v-if",!0),ee(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),ee(p,null,{default:le(()=>[!e.renderAfterExpand||e.childNodeRendered?mt((b(),M("div",{key:0,class:O(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(b(!0),M(Qe,null,It(e.node.childNodes,h=>(b(),he(u,{key:e.getNodeKey(h),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:h,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,Zie)),[[Lt,e.expanded]]):se("v-if",!0)]),_:1})],42,Xie)),[[Lt,e.node.visible]])}var Qie=Le(Gie,[["render",Jie],["__file","tree-node.vue"]]);function ese({el$:e},t){const o=ze("tree"),r=lo([]),l=lo([]);ft(()=>{a()}),rn(()=>{r.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),l.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),Se(l,i=>{i.forEach(c=>{c.setAttribute("tabindex","-1")})}),oo(e,"keydown",i=>{const c=i.target;if(!c.className.includes(o.b("node")))return;const d=i.code;r.value=Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`));const u=r.value.indexOf(c);let p;if([lt.up,lt.down].includes(d)){if(i.preventDefault(),d===lt.up){p=u===-1?0:u!==0?u-1:r.value.length-1;const v=p;for(;!t.value.getNode(r.value[p].dataset.key).canFocus;){if(p--,p===v){p=-1;break}p<0&&(p=r.value.length-1)}}else{p=u===-1?0:u=r.value.length&&(p=0)}}p!==-1&&r.value[p].focus()}[lt.left,lt.right].includes(d)&&(i.preventDefault(),c.click());const h=c.querySelector('[type="checkbox"]');[lt.enter,lt.space].includes(d)&&h&&(i.preventDefault(),h.click())});const a=()=>{var i;r.value=Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)),l.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const c=e.value.querySelectorAll(`.${o.is("checked")}[role=treeitem]`);if(c.length){c[0].setAttribute("tabindex","0");return}(i=r.value[0])==null||i.setAttribute("tabindex","0")}}const tse=N({name:"ElTree",components:{ElTreeNode:Qie},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Xt}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:o}=Rt(),r=ze("tree"),l=Ge(ls,null),n=D(new Wie({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));n.value.initialize();const a=D(n.value.root),i=D(null),c=D(null),d=D(null),{broadcastExpanded:u}=mx(e),{dragState:p}=Yie({props:e,ctx:t,el$:c,dropIndicator$:d,store:n});ese({el$:c},n);const h=C(()=>{const{childNodes:K}=a.value,I=l?l.hasFilteredOptions!==0:!1;return(!K||K.length===0||K.every(({visible:U})=>!U))&&!I});Se(()=>e.currentNodeKey,K=>{n.value.setCurrentNodeKey(K)}),Se(()=>e.defaultCheckedKeys,K=>{n.value.setDefaultCheckedKey(K)}),Se(()=>e.defaultExpandedKeys,K=>{n.value.setDefaultExpandedKeys(K)}),Se(()=>e.data,K=>{n.value.setData(K)},{deep:!0}),Se(()=>e.checkStrictly,K=>{n.value.checkStrictly=K});const v=K=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");n.value.filter(K)},m=K=>V2(e.nodeKey,K.data),f=K=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const I=n.value.getNode(K);if(!I)return[];const U=[I.data];let oe=I.parent;for(;oe&&oe!==a.value;)U.push(oe.data),oe=oe.parent;return U.reverse()},_=(K,I)=>n.value.getCheckedNodes(K,I),g=K=>n.value.getCheckedKeys(K),y=()=>{const K=n.value.getCurrentNode();return K?K.data:null},w=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const K=y();return K?K[e.nodeKey]:null},x=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");n.value.setCheckedNodes(K,I)},$=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");n.value.setCheckedKeys(K,I)},T=(K,I,U)=>{n.value.setChecked(K,I,U)},R=()=>n.value.getHalfCheckedNodes(),P=()=>n.value.getHalfCheckedKeys(),L=(K,I=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");D2(n,t.emit,()=>n.value.setUserCurrentNode(K,I))},V=(K,I=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");D2(n,t.emit,()=>n.value.setCurrentNodeKey(K,I))},B=K=>n.value.getNode(K),j=K=>{n.value.remove(K)},te=(K,I)=>{n.value.append(K,I)},J=(K,I)=>{n.value.insertBefore(K,I)},Z=(K,I)=>{n.value.insertAfter(K,I)},H=(K,I,U)=>{u(I),t.emit("node-expand",K,I,U)},F=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");n.value.updateChildren(K,I)};return zt("RootTree",{ctx:t,props:e,store:n,root:a,currentNode:i,instance:wt()}),zt(Hl,void 0),{ns:r,store:n,root:a,currentNode:i,dragState:p,el$:c,dropIndicator$:d,isEmpty:h,filter:v,getNodeKey:m,getNodePath:f,getCheckedNodes:_,getCheckedKeys:g,getCurrentNode:y,getCurrentKey:w,setCheckedNodes:x,setCheckedKeys:$,setChecked:T,getHalfCheckedNodes:R,getHalfCheckedKeys:P,setCurrentNode:L,setCurrentKey:V,t:o,getNode:B,remove:j,append:te,insertBefore:J,insertAfter:Z,handleNodeExpand:H,updateKeyChildren:F}}});function ose(e,t,o,r,l,n){const a=nt("el-tree-node");return b(),M("div",{ref:"el$",class:O([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(b(!0),M(Qe,null,It(e.root.childNodes,i=>(b(),he(a,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(b(),M("div",{key:0,class:O(e.ns.e("empty-block"))},[be(e.$slots,"empty",{},()=>{var i;return[E("span",{class:O(e.ns.e("empty-text"))},$e((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):se("v-if",!0),mt(E("div",{ref:"dropIndicator$",class:O(e.ns.e("drop-indicator"))},null,2),[[Lt,e.dragState.showDropIndicator]])],2)}var Fp=Le(tse,[["render",ose],["__file","tree.vue"]]);Fp.install=e=>{e.component(Fp.name,Fp)};const jp=Fp,rse=jp,lse=(e,{attrs:t,emit:o},{select:r,tree:l,key:n})=>{const a=ze("tree-select");return Se(()=>e.data,()=>{e.filterable&&et(()=>{var c,d;(d=l.value)==null||d.filter((c=r.value)==null?void 0:c.states.inputValue)})},{flush:"post"}),{...Ol(Bo(e),Object.keys(Za.props)),...t,"onUpdate:modelValue":c=>o(St,c),valueKey:n,popperClass:C(()=>{const c=[a.e("popper")];return e.popperClass&&c.push(e.popperClass),c.join(" ")}),filterMethod:(c="")=>{var d;e.filterMethod?e.filterMethod(c):e.remoteMethod?e.remoteMethod(c):(d=l.value)==null||d.filter(c)}}},nse=N({extends:Cp,setup(e,t){const o=Cp.setup(e,t);delete o.selectOptionClick;const r=wt().proxy;return et(()=>{o.select.states.cachedOptions.get(r.value)||o.select.onOptionCreate(r)}),o},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function j2(e){return e||e===0}function K2(e){return Array.isArray(e)&&e.length}function eu(e){return Array.isArray(e)?e:j2(e)?[e]:[]}function Kp(e,t,o,r,l){for(let n=0;n{Se(()=>e.modelValue,()=>{e.showCheckbox&&et(()=>{const p=n.value;p&&!nr(p.getCheckedKeys(),eu(e.modelValue))&&p.setCheckedKeys(eu(e.modelValue))})},{immediate:!0,deep:!0});const i=C(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),c=(p,h)=>{var v;const m=i.value[p];return it(m)?m(h,(v=n.value)==null?void 0:v.getNode(c("value",h))):h[m]},d=eu(e.modelValue).map(p=>Kp(e.data||[],h=>c("value",h)===p,h=>c("children",h),(h,v,m,f)=>f&&c("value",f))).filter(p=>j2(p)),u=C(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const p=[];return U2(e.data.concat(e.cacheData),h=>{const v=c("value",h);p.push({value:v,currentLabel:c("label",h),isDisabled:c("disabled",h)})},h=>c("children",h)),p});return{...Ol(Bo(e),Object.keys(jp.props)),...t,nodeKey:a,expandOnClickNode:C(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:C(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(d):d),renderContent:(p,{node:h,data:v,store:m})=>p(nse,{value:c("value",v),label:c("label",v),disabled:c("disabled",v)},e.renderContent?()=>e.renderContent(p,{node:h,data:v,store:m}):o.default?()=>o.default({node:h,data:v,store:m}):void 0),filterNodeMethod:(p,h,v)=>e.filterNodeMethod?e.filterNodeMethod(p,h,v):p?new RegExp(ch(p),"i").test(c("label",h)||""):!0,onNodeClick:(p,h,v)=>{var m,f,_,g;if((m=t.onNodeClick)==null||m.call(t,p,h,v),!(e.showCheckbox&&e.checkOnClickNode)){if(!e.showCheckbox&&(e.checkStrictly||h.isLeaf)){if(!c("disabled",p)){const y=(f=l.value)==null?void 0:f.states.options.get(c("value",p));(_=l.value)==null||_.handleOptionSelect(y)}}else e.expandOnClickNode&&v.proxy.handleExpandIconClick();(g=l.value)==null||g.focus()}},onCheck:(p,h)=>{var v;if(!e.showCheckbox)return;const m=c("value",p),f={};U2([n.value.store.root],w=>f[w.key]=w,w=>w.childNodes);const _=h.checkedKeys,g=e.multiple?eu(e.modelValue).filter(w=>!(w in f)&&!_.includes(w)):[],y=g.concat(_);if(e.checkStrictly)r(St,e.multiple?y:y.includes(m)?m:void 0);else if(e.multiple)r(St,g.concat(n.value.getCheckedKeys(!0)));else{const w=Kp([p],T=>!K2(c("children",T))&&!c("disabled",T),T=>c("children",T)),x=w?c("value",w):void 0,$=j2(e.modelValue)&&!!Kp([p],T=>c("value",T)===e.modelValue,T=>c("children",T));r(St,x===e.modelValue||$?void 0:x)}et(()=>{var w;const x=eu(e.modelValue);n.value.setCheckedKeys(x),(w=t.onCheck)==null||w.call(t,p,{checkedKeys:n.value.getCheckedKeys(),checkedNodes:n.value.getCheckedNodes(),halfCheckedKeys:n.value.getHalfCheckedKeys(),halfCheckedNodes:n.value.getHalfCheckedNodes()})}),(v=l.value)==null||v.focus()},cacheOptions:u}};var ise=N({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Ge(ls);return Se(()=>e.data,()=>{var o;e.data.forEach(l=>{t.states.cachedOptions.has(l.value)||t.states.cachedOptions.set(l.value,l)});const r=((o=t.selectRef)==null?void 0:o.querySelectorAll("input"))||[];Array.from(r).includes(document.activeElement)||t.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const sse=N({name:"ElTreeSelect",inheritAttrs:!1,props:{...Za.props,...jp.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:o,expose:r}=t,l=D(),n=D(),a=C(()=>e.nodeKey||e.valueKey||"value"),i=lse(e,t,{select:l,tree:n,key:a}),{cacheOptions:c,...d}=ase(e,t,{select:l,tree:n,key:a}),u=Dt({});return r(u),ft(()=>{Object.assign(u,{...Ol(n.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Ol(l.value,["focus","blur"])})}),()=>rt(Za,Dt({...i,ref:p=>l.value=p}),{...o,default:()=>[rt(ise,{data:c.value}),rt(jp,Dt({...d,ref:p=>n.value=p}))]})}});var Up=Le(sse,[["__file","tree-select.vue"]]);Up.install=e=>{e.component(Up.name,Up)};const cse=Up,W2=Symbol(),use={key:-1,level:-1,data:{}};var tu=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e))(tu||{}),q2=(e=>(e.ADD="add",e.DELETE="delete",e))(q2||{});const bx={type:Number,default:26},dse=Pe({data:{type:ue(Array),default:()=>uo([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:ue(Object),default:()=>uo({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:ue(Array),default:()=>uo([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:ue(Array),default:()=>uo([])},indent:{type:Number,default:16},itemSize:bx,icon:{type:Xt},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:ue([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:ue(Function)},perfMode:{type:Boolean,default:!0}}),pse=Pe({node:{type:ue(Object),default:()=>uo(use)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:bx}),fse=Pe({node:{type:ue(Object),required:!0}}),_x="node-click",wx="node-expand",yx="node-collapse",xx="current-change",kx="check",Cx="check-change",Sx="node-contextmenu",hse={[_x]:(e,t,o)=>e&&t&&o,[wx]:(e,t)=>e&&t,[yx]:(e,t)=>e&&t,[xx]:(e,t)=>e&&t,[kx]:(e,t)=>e&&t,[Cx]:(e,t)=>e&&typeof t=="boolean",[Sx]:(e,t,o)=>e&&t&&o},vse={click:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&typeof t=="boolean"};function mse(e,t){const o=D(new Set),r=D(new Set),{emit:l}=wt();Se([()=>t.value,()=>e.defaultCheckedKeys],()=>et(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const n=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:w,maxLevel:x}=t.value,$=o.value,T=new Set;for(let R=x-1;R>=1;--R){const P=w.get(R);P&&P.forEach(L=>{const V=L.children;if(V){let B=!0,j=!1;for(const te of V){const J=te.key;if($.has(J))j=!0;else if(T.has(J)){B=!1,j=!0;break}else B=!1}B?$.add(L.key):j?(T.add(L.key),$.delete(L.key)):($.delete(L.key),T.delete(L.key))}})}r.value=T},a=w=>o.value.has(w.key),i=w=>r.value.has(w.key),c=(w,x,$=!0)=>{const T=o.value,R=(P,L)=>{T[L?q2.ADD:q2.DELETE](P.key);const V=P.children;!e.checkStrictly&&V&&V.forEach(B=>{B.disabled||R(B,L)})};R(w,x),n(),$&&d(w,x)},d=(w,x)=>{const{checkedNodes:$,checkedKeys:T}=m(),{halfCheckedNodes:R,halfCheckedKeys:P}=f();l(kx,w.data,{checkedKeys:T,checkedNodes:$,halfCheckedKeys:P,halfCheckedNodes:R}),l(Cx,w.data,x)};function u(w=!1){return m(w).checkedKeys}function p(w=!1){return m(w).checkedNodes}function h(){return f().halfCheckedKeys}function v(){return f().halfCheckedNodes}function m(w=!1){const x=[],$=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:T}=t.value;o.value.forEach(R=>{const P=T.get(R);P&&(!w||w&&P.isLeaf)&&($.push(R),x.push(P.data))})}return{checkedKeys:$,checkedNodes:x}}function f(){const w=[],x=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:$}=t.value;r.value.forEach(T=>{const R=$.get(T);R&&(x.push(T),w.push(R.data))})}return{halfCheckedNodes:w,halfCheckedKeys:x}}function _(w){o.value.clear(),r.value.clear(),et(()=>{y(w)})}function g(w,x){if(t!=null&&t.value&&e.showCheckbox){const $=t.value.treeNodeMap.get(w);$&&c($,x,!1)}}function y(w){if(t!=null&&t.value){const{treeNodeMap:x}=t.value;if(e.showCheckbox&&x&&w)for(const $ of w){const T=x.get($);T&&!a(T)&&c(T,!0,!1)}}}return{updateCheckedKeys:n,toggleCheckbox:c,isChecked:a,isIndeterminate:i,getCheckedKeys:u,getCheckedNodes:p,getHalfCheckedKeys:h,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:_}}function gse(e,t){const o=D(new Set([])),r=D(new Set([])),l=C(()=>it(e.filterMethod));function n(i){var c;if(!l.value)return;const d=new Set,u=r.value,p=o.value,h=[],v=((c=t.value)==null?void 0:c.treeNodes)||[],m=e.filterMethod;p.clear();function f(_){_.forEach(g=>{h.push(g),m!=null&&m(i,g.data)?h.forEach(w=>{d.add(w.key)}):g.isLeaf&&p.add(g.key);const y=g.children;if(y&&f(y),!g.isLeaf){if(!d.has(g.key))p.add(g.key);else if(y){let w=!0;for(const x of y)if(!p.has(x.key)){w=!1;break}w?u.add(g.key):u.delete(g.key)}}h.pop()})}return f(v),d}function a(i){return r.value.has(i.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:o,doFilter:n,isForceHiddenExpandIcon:a}}function bse(e,t){const o=D(new Set(e.defaultExpandedKeys)),r=D(),l=lo();Se(()=>e.currentNodeKey,me=>{r.value=me},{immediate:!0}),Se(()=>e.data,me=>{de(me)},{immediate:!0});const{isIndeterminate:n,isChecked:a,toggleCheckbox:i,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:u,getHalfCheckedNodes:p,setChecked:h,setCheckedKeys:v}=mse(e,l),{doFilter:m,hiddenNodeKeySet:f,isForceHiddenExpandIcon:_}=gse(e,l),g=C(()=>{var me;return((me=e.props)==null?void 0:me.value)||tu.KEY}),y=C(()=>{var me;return((me=e.props)==null?void 0:me.children)||tu.CHILDREN}),w=C(()=>{var me;return((me=e.props)==null?void 0:me.disabled)||tu.DISABLED}),x=C(()=>{var me;return((me=e.props)==null?void 0:me.label)||tu.LABEL}),$=C(()=>{const me=o.value,Re=f.value,Ce=[],Ee=l.value&&l.value.treeNodes||[];function De(){const ae=[];for(let pe=Ee.length-1;pe>=0;--pe)ae.push(Ee[pe]);for(;ae.length;){const pe=ae.pop();if(pe&&(Re.has(pe.key)||Ce.push(pe),me.has(pe.key))){const ke=pe.children;if(ke){const Oe=ke.length;for(let we=Oe-1;we>=0;--we)ae.push(ke[we])}}}}return De(),Ce}),T=C(()=>$.value.length>0);function R(me){const Re=new Map,Ce=new Map;let Ee=1;function De(pe,ke=1,Oe=void 0){var we;const Te=[];for(const Ne of pe){const Ie=V(Ne),Ae={level:ke,key:Ie,data:Ne};Ae.label=j(Ne),Ae.parent=Oe;const xe=L(Ne);Ae.disabled=B(Ne),Ae.isLeaf=!xe||xe.length===0,xe&&xe.length&&(Ae.children=De(xe,ke+1,Ae)),Te.push(Ae),Re.set(Ie,Ae),Ce.has(ke)||Ce.set(ke,[]),(we=Ce.get(ke))==null||we.push(Ae)}return ke>Ee&&(Ee=ke),Te}const ae=De(me);return{treeNodeMap:Re,levelTreeNodeMap:Ce,maxLevel:Ee,treeNodes:ae}}function P(me){const Re=m(me);Re&&(o.value=Re)}function L(me){return me[y.value]}function V(me){return me?me[g.value]:""}function B(me){return me[w.value]}function j(me){return me[x.value]}function te(me){o.value.has(me.key)?I(me):K(me)}function J(me){o.value=new Set(me)}function Z(me,Re){t(_x,me.data,me,Re),H(me),e.expandOnClickNode&&te(me),e.showCheckbox&&e.checkOnClickNode&&!me.disabled&&i(me,!a(me),!0)}function H(me){ne(me)||(r.value=me.key,t(xx,me.data,me))}function F(me,Re){i(me,Re)}function K(me){const Re=o.value;if(l.value&&e.accordion){const{treeNodeMap:Ce}=l.value;Re.forEach(Ee=>{const De=Ce.get(Ee);me&&me.level===(De==null?void 0:De.level)&&Re.delete(Ee)})}Re.add(me.key),t(wx,me.data,me)}function I(me){o.value.delete(me.key),t(yx,me.data,me)}function U(me){return o.value.has(me.key)}function oe(me){return!!me.disabled}function ne(me){const Re=r.value;return Re!==void 0&&Re===me.key}function ce(){var me,Re;if(r.value)return(Re=(me=l.value)==null?void 0:me.treeNodeMap.get(r.value))==null?void 0:Re.data}function Q(){return r.value}function Me(me){r.value=me}function de(me){et(()=>l.value=R(me))}function _e(me){var Re;const Ce=xt(me)?V(me):me;return(Re=l.value)==null?void 0:Re.treeNodeMap.get(Ce)}return{tree:l,flattenTree:$,isNotEmpty:T,getKey:V,getChildren:L,toggleExpand:te,toggleCheckbox:i,isExpanded:U,isChecked:a,isIndeterminate:n,isDisabled:oe,isCurrent:ne,isForceHiddenExpandIcon:_,handleNodeClick:Z,handleNodeCheck:F,getCurrentNode:ce,getCurrentKey:Q,setCurrentKey:Me,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:u,getHalfCheckedNodes:p,setChecked:h,setCheckedKeys:v,filter:P,setData:de,getNode:_e,expandNode:K,collapseNode:I,setExpandedKeys:J}}var _se=N({name:"ElTreeNodeContent",props:fse,setup(e){const t=Ge(W2),o=ze("tree");return()=>{const r=e.node,{data:l}=r;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:r,data:l}):rt("span",{class:o.be("node","label")},[r==null?void 0:r.label])}}});const wse=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],yse=N({...N({name:"ElTreeNode"}),props:pse,emits:vse,setup(e,{emit:t}){const o=e,r=Ge(W2),l=ze("tree"),n=C(()=>{var p;return(p=r==null?void 0:r.props.indent)!=null?p:16}),a=C(()=>{var p;return(p=r==null?void 0:r.props.icon)!=null?p:dh}),i=p=>{t("click",o.node,p)},c=()=>{t("toggle",o.node)},d=p=>{t("check",o.node,p)},u=p=>{var h,v,m,f;(m=(v=(h=r==null?void 0:r.instance)==null?void 0:h.vnode)==null?void 0:v.props)!=null&&m.onNodeContextmenu&&(p.stopPropagation(),p.preventDefault()),r==null||r.ctx.emit(Sx,p,(f=o.node)==null?void 0:f.data,o.node)};return(p,h)=>{var v,m,f;return b(),M("div",{ref:"node$",class:O([s(l).b("node"),s(l).is("expanded",p.expanded),s(l).is("current",p.current),s(l).is("focusable",!p.disabled),s(l).is("checked",!p.disabled&&p.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":p.expanded,"aria-disabled":p.disabled,"aria-checked":p.checked,"data-key":(v=p.node)==null?void 0:v.key,onClick:ct(i,["stop"]),onContextmenu:u},[E("div",{class:O(s(l).be("node","content")),style:Je({paddingLeft:`${(p.node.level-1)*s(n)}px`,height:p.itemSize+"px"})},[s(a)?(b(),he(s(Ze),{key:0,class:O([s(l).is("leaf",!!((m=p.node)!=null&&m.isLeaf)),s(l).is("hidden",p.hiddenExpandIcon),{expanded:!((f=p.node)!=null&&f.isLeaf)&&p.expanded},s(l).be("node","expand-icon")]),onClick:ct(c,["stop"])},{default:le(()=>[(b(),he(Et(s(a))))]),_:1},8,["class","onClick"])):se("v-if",!0),p.showCheckbox?(b(),he(s(rl),{key:1,"model-value":p.checked,indeterminate:p.indeterminate,disabled:p.disabled,onChange:d,onClick:h[0]||(h[0]=ct(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):se("v-if",!0),ee(s(_se),{node:p.node},null,8,["node"])],6)],42,wse)}}});var xse=Le(yse,[["__file","tree-node.vue"]]);const kse=N({...N({name:"ElTreeV2"}),props:dse,emits:hse,setup(e,{expose:t,emit:o}){const r=e,l=Do(),n=C(()=>r.itemSize);zt(W2,{ctx:{emit:o,slots:l},props:r,instance:wt()}),zt(Hl,void 0);const{t:a}=Rt(),i=ze("tree"),{flattenTree:c,isNotEmpty:d,toggleExpand:u,isExpanded:p,isIndeterminate:h,isChecked:v,isDisabled:m,isCurrent:f,isForceHiddenExpandIcon:_,handleNodeClick:g,handleNodeCheck:y,toggleCheckbox:w,getCurrentNode:x,getCurrentKey:$,setCurrentKey:T,getCheckedKeys:R,getCheckedNodes:P,getHalfCheckedKeys:L,getHalfCheckedNodes:V,setChecked:B,setCheckedKeys:j,filter:te,setData:J,getNode:Z,expandNode:H,collapseNode:F,setExpandedKeys:K}=bse(r,o);return t({toggleCheckbox:w,getCurrentNode:x,getCurrentKey:$,setCurrentKey:T,getCheckedKeys:R,getCheckedNodes:P,getHalfCheckedKeys:L,getHalfCheckedNodes:V,setChecked:B,setCheckedKeys:j,filter:te,setData:J,getNode:Z,expandNode:H,collapseNode:F,setExpandedKeys:K}),(I,U)=>{var oe;return b(),M("div",{class:O([s(i).b(),{[s(i).m("highlight-current")]:I.highlightCurrent}]),role:"tree"},[s(d)?(b(),he(s(s8),{key:0,"class-name":s(i).b("virtual-list"),data:s(c),total:s(c).length,height:I.height,"item-size":s(n),"perf-mode":I.perfMode},{default:le(({data:ne,index:ce,style:Q})=>[(b(),he(xse,{key:ne[ce].key,style:Je(Q),node:ne[ce],expanded:s(p)(ne[ce]),"show-checkbox":I.showCheckbox,checked:s(v)(ne[ce]),indeterminate:s(h)(ne[ce]),"item-size":s(n),disabled:s(m)(ne[ce]),current:s(f)(ne[ce]),"hidden-expand-icon":s(_)(ne[ce]),onClick:s(g),onToggle:s(u),onCheck:s(y)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(b(),M("div",{key:1,class:O(s(i).e("empty-block"))},[E("span",{class:O(s(i).e("empty-text"))},$e((oe=I.emptyText)!=null?oe:s(a)("el.tree.emptyText")),3)],2))],2)}}});var Cse=Le(kse,[["__file","tree.vue"]]);const Sse=yt(Cse),Ex=Symbol("uploadContextKey"),Ese="ElUpload";class Tse extends Error{constructor(t,o,r,l){super(t),this.name="UploadAjaxError",this.status=o,this.method=r,this.url=l}}function Tx(e,t,o){let r;return o.response?r=`${o.response.error||o.response}`:o.responseText?r=`${o.responseText}`:r=`fail to ${t.method} ${e} ${o.status}`,new Tse(r,o.status,t.method,e)}function $se(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const Mse=e=>{typeof XMLHttpRequest>"u"&&Io(Ese,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,o=e.action;t.upload&&t.upload.addEventListener("progress",n=>{const a=n;a.percent=n.total>0?n.loaded/n.total*100:0,e.onProgress(a)});const r=new FormData;if(e.data)for(const[n,a]of Object.entries(e.data))Ke(a)&&a.length?r.append(n,...a):r.append(n,a);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Tx(o,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Tx(o,e,t));e.onSuccess($se(t))}),t.open(e.method,o,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const l=e.headers||{};if(l instanceof Headers)l.forEach((n,a)=>t.setRequestHeader(a,n));else for(const[n,a]of Object.entries(l))jo(a)||t.setRequestHeader(n,String(a));return t.send(r),t},$x=["text","picture","picture-card"];let Ase=1;const Y2=()=>Date.now()+Ase++,Mx=Pe({action:{type:String,default:"#"},headers:{type:ue(Object)},method:{type:String,default:"post"},data:{type:ue([Object,Function,Promise]),default:()=>uo({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:ue(Array),default:()=>uo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:$x,default:"text"},httpRequest:{type:ue(Function),default:Mse},disabled:Boolean,limit:Number}),zse=Pe({...Mx,beforeUpload:{type:ue(Function),default:Wt},beforeRemove:{type:ue(Function)},onRemove:{type:ue(Function),default:Wt},onChange:{type:ue(Function),default:Wt},onPreview:{type:ue(Function),default:Wt},onSuccess:{type:ue(Function),default:Wt},onProgress:{type:ue(Function),default:Wt},onError:{type:ue(Function),default:Wt},onExceed:{type:ue(Function),default:Wt},crossorigin:{type:ue(String)}}),Ise=Pe({files:{type:ue(Array),default:()=>uo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:ue(Function),default:Wt},listType:{type:String,values:$x,default:"text"},crossorigin:{type:ue(String)}}),Ose={remove:e=>!!e},Nse=["onKeydown"],Pse=["src","crossorigin"],Rse=["onClick"],Lse=["title"],Bse=["onClick"],Vse=["onClick"],Dse=N({...N({name:"ElUploadList"}),props:Ise,emits:Ose,setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("upload"),n=ze("icon"),a=ze("list"),i=xr(),c=D(!1),d=C(()=>[l.b("list"),l.bm("list",o.listType),l.is("disabled",o.disabled)]),u=p=>{t("remove",p)};return(p,h)=>(b(),he(I1,{tag:"ul",class:O(s(d)),name:s(a).b()},{default:le(()=>[(b(!0),M(Qe,null,It(p.files,v=>(b(),M("li",{key:v.uid||v.name,class:O([s(l).be("list","item"),s(l).is(v.status),{focusing:c.value}]),tabindex:"0",onKeydown:Gt(m=>!s(i)&&u(v),["delete"]),onFocus:h[0]||(h[0]=m=>c.value=!0),onBlur:h[1]||(h[1]=m=>c.value=!1),onClick:h[2]||(h[2]=m=>c.value=!1)},[be(p.$slots,"default",{file:v},()=>[p.listType==="picture"||v.status!=="uploading"&&p.listType==="picture-card"?(b(),M("img",{key:0,class:O(s(l).be("list","item-thumbnail")),src:v.url,crossorigin:p.crossorigin,alt:""},null,10,Pse)):se("v-if",!0),v.status==="uploading"||p.listType!=="picture-card"?(b(),M("div",{key:1,class:O(s(l).be("list","item-info"))},[E("a",{class:O(s(l).be("list","item-name")),onClick:ct(m=>p.handlePreview(v),["prevent"])},[ee(s(Ze),{class:O(s(n).m("document"))},{default:le(()=>[ee(s(R3))]),_:1},8,["class"]),E("span",{class:O(s(l).be("list","item-file-name")),title:v.name},$e(v.name),11,Lse)],10,Rse),v.status==="uploading"?(b(),he(s(Xy),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:Je(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):se("v-if",!0)],2)):se("v-if",!0),E("label",{class:O(s(l).be("list","item-status-label"))},[p.listType==="text"?(b(),he(s(Ze),{key:0,class:O([s(n).m("upload-success"),s(n).m("circle-check")])},{default:le(()=>[ee(s(zd))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(b(),he(s(Ze),{key:1,class:O([s(n).m("upload-success"),s(n).m("check")])},{default:le(()=>[ee(s(Li))]),_:1},8,["class"])):se("v-if",!0)],2),s(i)?se("v-if",!0):(b(),he(s(Ze),{key:2,class:O(s(n).m("close")),onClick:m=>u(v)},{default:le(()=>[ee(s(Jr))]),_:2},1032,["class","onClick"])),se(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),se(" This is a bug which needs to be fixed "),se(" TODO: Fix the incorrect navigation interaction "),s(i)?se("v-if",!0):(b(),M("i",{key:3,class:O(s(n).m("close-tip"))},$e(s(r)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(b(),M("span",{key:4,class:O(s(l).be("list","item-actions"))},[E("span",{class:O(s(l).be("list","item-preview")),onClick:m=>p.handlePreview(v)},[ee(s(Ze),{class:O(s(n).m("zoom-in"))},{default:le(()=>[ee(s(mh))]),_:1},8,["class"])],10,Bse),s(i)?se("v-if",!0):(b(),M("span",{key:0,class:O(s(l).be("list","item-delete")),onClick:m=>u(v)},[ee(s(Ze),{class:O(s(n).m("delete"))},{default:le(()=>[ee(s(P3))]),_:1},8,["class"])],10,Vse))],2)):se("v-if",!0)])],42,Nse))),128)),be(p.$slots,"append")]),_:3},8,["class","name"]))}});var Ax=Le(Dse,[["__file","upload-list.vue"]]);const Hse=Pe({disabled:{type:Boolean,default:!1}}),Fse={file:e=>Ke(e)},jse=["onDrop","onDragover"],zx="ElUploadDrag",Kse=N({...N({name:zx}),props:Hse,emits:Fse,setup(e,{emit:t}){Ge(Ex)||Io(zx,"usage: ");const r=ze("upload"),l=D(!1),n=xr(),a=c=>{if(n.value)return;l.value=!1,c.stopPropagation();const d=Array.from(c.dataTransfer.files);t("file",d)},i=()=>{n.value||(l.value=!0)};return(c,d)=>(b(),M("div",{class:O([s(r).b("dragger"),s(r).is("dragover",l.value)]),onDrop:ct(a,["prevent"]),onDragover:ct(i,["prevent"]),onDragleave:d[0]||(d[0]=ct(u=>l.value=!1,["prevent"]))},[be(c.$slots,"default")],42,jse))}});var Use=Le(Kse,[["__file","upload-dragger.vue"]]);const Wse=Pe({...Mx,beforeUpload:{type:ue(Function),default:Wt},onRemove:{type:ue(Function),default:Wt},onStart:{type:ue(Function),default:Wt},onSuccess:{type:ue(Function),default:Wt},onProgress:{type:ue(Function),default:Wt},onError:{type:ue(Function),default:Wt},onExceed:{type:ue(Function),default:Wt}}),qse=["onKeydown"],Yse=["name","multiple","accept"],Gse=N({...N({name:"ElUploadContent",inheritAttrs:!1}),props:Wse,setup(e,{expose:t}){const o=e,r=ze("upload"),l=xr(),n=lo({}),a=lo(),i=f=>{if(f.length===0)return;const{autoUpload:_,limit:g,fileList:y,multiple:w,onStart:x,onExceed:$}=o;if(g&&y.length+f.length>g){$(f,y);return}w||(f=f.slice(0,1));for(const T of f){const R=T;R.uid=Y2(),x(R),_&&c(R)}},c=async f=>{if(a.value.value="",!o.beforeUpload)return u(f);let _,g={};try{const w=o.data,x=o.beforeUpload(f);g=gu(o.data)?xd(o.data):o.data,_=await x,gu(o.data)&&nr(w,g)&&(g=xd(o.data))}catch{_=!1}if(_===!1){o.onRemove(f);return}let y=f;_ instanceof Blob&&(_ instanceof File?y=_:y=new File([_],f.name,{type:f.type})),u(Object.assign(y,{uid:f.uid}),g)},d=async(f,_)=>it(f)?f(_):f,u=async(f,_)=>{const{headers:g,data:y,method:w,withCredentials:x,name:$,action:T,onProgress:R,onSuccess:P,onError:L,httpRequest:V}=o;try{_=await d(_??y,f)}catch{o.onRemove(f);return}const{uid:B}=f,j={headers:g||{},withCredentials:x,file:f,data:_,method:w,filename:$,action:T,onProgress:J=>{R(J,f)},onSuccess:J=>{P(J,f),delete n.value[B]},onError:J=>{L(J,f),delete n.value[B]}},te=V(j);n.value[B]=te,te instanceof Promise&&te.then(j.onSuccess,j.onError)},p=f=>{const _=f.target.files;_&&i(Array.from(_))},h=()=>{l.value||(a.value.value="",a.value.click())},v=()=>{h()};return t({abort:f=>{Yz(n.value).filter(f?([g])=>String(f.uid)===g:()=>!0).forEach(([g,y])=>{y instanceof XMLHttpRequest&&y.abort(),delete n.value[g]})},upload:c}),(f,_)=>(b(),M("div",{class:O([s(r).b(),s(r).m(f.listType),s(r).is("drag",f.drag)]),tabindex:"0",onClick:h,onKeydown:Gt(ct(v,["self"]),["enter","space"])},[f.drag?(b(),he(Use,{key:0,disabled:s(l),onFile:i},{default:le(()=>[be(f.$slots,"default")]),_:3},8,["disabled"])):be(f.$slots,"default",{key:1}),E("input",{ref_key:"inputRef",ref:a,class:O(s(r).e("input")),name:f.name,multiple:f.multiple,accept:f.accept,type:"file",onChange:p,onClick:_[0]||(_[0]=ct(()=>{},["stop"]))},null,42,Yse)],42,qse))}});var Ix=Le(Gse,[["__file","upload-content.vue"]]);const Ox="ElUpload",Nx=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},Xse=(e,t)=>{const o=a_(e,"fileList",void 0,{passive:!0}),r=h=>o.value.find(v=>v.uid===h.uid);function l(h){var v;(v=t.value)==null||v.abort(h)}function n(h=["ready","uploading","success","fail"]){o.value=o.value.filter(v=>!h.includes(v.status))}const a=(h,v)=>{const m=r(v);m&&(console.error(h),m.status="fail",o.value.splice(o.value.indexOf(m),1),e.onError(h,m,o.value),e.onChange(m,o.value))},i=(h,v)=>{const m=r(v);m&&(e.onProgress(h,m,o.value),m.status="uploading",m.percentage=Math.round(h.percent))},c=(h,v)=>{const m=r(v);m&&(m.status="success",m.response=h,e.onSuccess(h,m,o.value),e.onChange(m,o.value))},d=h=>{jo(h.uid)&&(h.uid=Y2());const v={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(e.listType==="picture-card"||e.listType==="picture")try{v.url=URL.createObjectURL(h)}catch(m){m.message,e.onError(m,v,o.value)}o.value=[...o.value,v],e.onChange(v,o.value)},u=async h=>{const v=h instanceof File?r(h):h;v||Io(Ox,"file to be removed not found");const m=f=>{l(f);const _=o.value;_.splice(_.indexOf(f),1),e.onRemove(f,_),Nx(f)};e.beforeRemove?await e.beforeRemove(v,o.value)!==!1&&m(v):m(v)};function p(){o.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var v;return h&&((v=t.value)==null?void 0:v.upload(h))})}return Se(()=>e.listType,h=>{h!=="picture-card"&&h!=="picture"||(o.value=o.value.map(v=>{const{raw:m,url:f}=v;if(!f&&m)try{v.url=URL.createObjectURL(m)}catch(_){e.onError(_,v,o.value)}return v}))}),Se(o,h=>{for(const v of h)v.uid||(v.uid=Y2()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:o,abort:l,clearFiles:n,handleError:a,handleProgress:i,handleStart:d,handleSuccess:c,handleRemove:u,submit:p,revokeFileObjectURL:Nx}},Zse=N({...N({name:"ElUpload"}),props:zse,setup(e,{expose:t}){const o=e,r=xr(),l=lo(),{abort:n,submit:a,clearFiles:i,uploadFiles:c,handleStart:d,handleError:u,handleRemove:p,handleSuccess:h,handleProgress:v,revokeFileObjectURL:m}=Xse(o,l),f=C(()=>o.listType==="picture-card"),_=C(()=>({...o,fileList:c.value,onStart:d,onProgress:v,onSuccess:h,onError:u,onRemove:p}));return to(()=>{c.value.forEach(m)}),zt(Ex,{accept:Yt(o,"accept")}),t({abort:n,submit:a,clearFiles:i,handleStart:d,handleRemove:p}),(g,y)=>(b(),M("div",null,[s(f)&&g.showFileList?(b(),he(Ax,{key:0,disabled:s(r),"list-type":g.listType,files:s(c),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:s(p)},ln({append:le(()=>[ee(Ix,Mt({ref_key:"uploadRef",ref:l},s(_)),{default:le(()=>[g.$slots.trigger?be(g.$slots,"trigger",{key:0}):se("v-if",!0),!g.$slots.trigger&&g.$slots.default?be(g.$slots,"default",{key:1}):se("v-if",!0)]),_:3},16)]),_:2},[g.$slots.file?{name:"default",fn:le(({file:w})=>[be(g.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):se("v-if",!0),!s(f)||s(f)&&!g.showFileList?(b(),he(Ix,Mt({key:1,ref_key:"uploadRef",ref:l},s(_)),{default:le(()=>[g.$slots.trigger?be(g.$slots,"trigger",{key:0}):se("v-if",!0),!g.$slots.trigger&&g.$slots.default?be(g.$slots,"default",{key:1}):se("v-if",!0)]),_:3},16)):se("v-if",!0),g.$slots.trigger?be(g.$slots,"default",{key:2}):se("v-if",!0),be(g.$slots,"tip"),!s(f)&&g.showFileList?(b(),he(Ax,{key:3,disabled:s(r),"list-type":g.listType,files:s(c),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:s(p)},ln({_:2},[g.$slots.file?{name:"default",fn:le(({file:w})=>[be(g.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):se("v-if",!0)]))}});var Jse=Le(Zse,[["__file","upload.vue"]]);const Qse=yt(Jse),ece=Pe({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:ue([String,Array]),default:"Element Plus"},font:{type:ue(Object)},gap:{type:ue(Array),default:()=>[100,100]},offset:{type:ue(Array)}});function tce(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function oce(e){return Object.keys(e).map(t=>`${tce(t)}: ${e[t]};`).join(" ")}function rce(){return window.devicePixelRatio||1}const lce=(e,t)=>{let o=!1;return e.removedNodes.length&&t&&(o=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(o=!0),o},Px=3;function G2(e,t,o=1){const r=document.createElement("canvas"),l=r.getContext("2d"),n=e*o,a=t*o;return r.setAttribute("width",`${n}px`),r.setAttribute("height",`${a}px`),l.save(),[l,r,n,a]}function nce(){function e(t,o,r,l,n,a,i,c){const[d,u,p,h]=G2(l,n,r);if(t instanceof HTMLImageElement)d.drawImage(t,0,0,p,h);else{const{color:oe,fontSize:ne,fontStyle:ce,fontWeight:Q,fontFamily:Me,textAlign:de,textBaseline:_e}=a,me=Number(ne)*r;d.font=`${ce} normal ${Q} ${me}px/${n}px ${Me}`,d.fillStyle=oe,d.textAlign=de,d.textBaseline=_e;const Re=Array.isArray(t)?t:[t];Re==null||Re.forEach((Ce,Ee)=>{d.fillText(Ce??"",p/2,Ee*(me+Px*r))})}const v=Math.PI/180*Number(o),m=Math.max(l,n),[f,_,g]=G2(m,m,r);f.translate(g/2,g/2),f.rotate(v),p>0&&h>0&&f.drawImage(u,-p/2,-h/2);function y(oe,ne){const ce=oe*Math.cos(v)-ne*Math.sin(v),Q=oe*Math.sin(v)+ne*Math.cos(v);return[ce,Q]}let w=0,x=0,$=0,T=0;const R=p/2,P=h/2;[[0-R,0-P],[0+R,0-P],[0+R,0+P],[0-R,0+P]].forEach(([oe,ne])=>{const[ce,Q]=y(oe,ne);w=Math.min(w,ce),x=Math.max(x,ce),$=Math.min($,Q),T=Math.max(T,Q)});const V=w+g/2,B=$+g/2,j=x-w,te=T-$,J=i*r,Z=c*r,H=(j+J)*2,F=te+Z,[K,I]=G2(H,F);function U(oe=0,ne=0){K.drawImage(_,V,B,j,te,oe,ne,j,te)}return U(),U(j+J,-te/2-Z/2),U(j+J,+te/2+Z/2),[I.toDataURL(),H/r,F/r]}return e}const ace=N({...N({name:"ElWatermark"}),props:ece,setup(e){const t=e,o={position:"relative"},r=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.color)!=null?B:"rgba(0,0,0,.15)"}),l=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontSize)!=null?B:16}),n=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontWeight)!=null?B:"normal"}),a=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontStyle)!=null?B:"normal"}),i=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontFamily)!=null?B:"sans-serif"}),c=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.textAlign)!=null?B:"center"}),d=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.textBaseline)!=null?B:"hanging"}),u=C(()=>t.gap[0]),p=C(()=>t.gap[1]),h=C(()=>u.value/2),v=C(()=>p.value/2),m=C(()=>{var V,B;return(B=(V=t.offset)==null?void 0:V[0])!=null?B:h.value}),f=C(()=>{var V,B;return(B=(V=t.offset)==null?void 0:V[1])!=null?B:v.value}),_=()=>{const V={zIndex:t.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let B=m.value-h.value,j=f.value-v.value;return B>0&&(V.left=`${B}px`,V.width=`calc(100% - ${B}px)`,B=0),j>0&&(V.top=`${j}px`,V.height=`calc(100% - ${j}px)`,j=0),V.backgroundPosition=`${B}px ${j}px`,V},g=lo(null),y=lo(),w=D(!1),x=()=>{y.value&&(y.value.remove(),y.value=void 0)},$=(V,B)=>{var j;g.value&&y.value&&(w.value=!0,y.value.setAttribute("style",oce({..._(),backgroundImage:`url('${V}')`,backgroundSize:`${Math.floor(B)}px`})),(j=g.value)==null||j.append(y.value),setTimeout(()=>{w.value=!1}))},T=V=>{let B=120,j=64;const te=t.image,J=t.content,Z=t.width,H=t.height;if(!te&&V.measureText){V.font=`${Number(l.value)}px ${i.value}`;const F=Array.isArray(J)?J:[J],K=F.map(I=>{const U=V.measureText(I);return[U.width,U.fontBoundingBoxAscent!==void 0?U.fontBoundingBoxAscent+U.fontBoundingBoxDescent:U.actualBoundingBoxAscent+U.actualBoundingBoxDescent]});B=Math.ceil(Math.max(...K.map(I=>I[0]))),j=Math.ceil(Math.max(...K.map(I=>I[1])))*F.length+(F.length-1)*Px}return[Z??B,H??j]},R=nce(),P=()=>{const B=document.createElement("canvas").getContext("2d"),j=t.image,te=t.content,J=t.rotate;if(B){y.value||(y.value=document.createElement("div"));const Z=rce(),[H,F]=T(B),K=I=>{const[U,oe]=R(I||"",J,Z,H,F,{color:r.value,fontSize:l.value,fontStyle:a.value,fontWeight:n.value,fontFamily:i.value,textAlign:c.value,textBaseline:d.value},u.value,p.value);$(U,oe)};if(j){const I=new Image;I.onload=()=>{K(I)},I.onerror=()=>{K(te)},I.crossOrigin="anonymous",I.referrerPolicy="no-referrer",I.src=j}else K(te)}};return ft(()=>{P()}),Se(()=>t,()=>{P()},{deep:!0,flush:"post"}),to(()=>{x()}),o_(g,V=>{w.value||V.forEach(B=>{lce(B,y.value)&&(x(),P())})},{attributes:!0,subtree:!0,childList:!0}),(V,B)=>(b(),M("div",{ref_key:"containerRef",ref:g,style:Je([o])},[be(V.$slots,"default")],4))}});var ice=Le(ace,[["__file","watermark.vue"]]);const sce=yt(ice),cce=Pe({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:ue(Object)},targetAreaClickable:{type:Boolean,default:!0}}),uce=(e,t,o,r,l)=>{const n=D(null),a=()=>{let p;return ut(e.value)?p=document.querySelector(e.value):it(e.value)?p=e.value():p=e.value,p},i=()=>{const p=a();if(!p||!t.value){n.value=null;return}!dce(p)&&t.value&&p.scrollIntoView(l.value);const{left:h,top:v,width:m,height:f}=p.getBoundingClientRect();n.value={left:h,top:v,width:m,height:f,radius:0}};ft(()=>{Se([t,e],()=>{i()},{immediate:!0}),window.addEventListener("resize",i)}),to(()=>{window.removeEventListener("resize",i)});const c=p=>{var h;return(h=Ke(o.value.offset)?o.value.offset[p]:o.value.offset)!=null?h:6},d=C(()=>{var p;if(!n.value)return n.value;const h=c(0),v=c(1),m=((p=o.value)==null?void 0:p.radius)||2;return{left:n.value.left-h,top:n.value.top-v,width:n.value.width+h*2,height:n.value.height+v*2,radius:m}}),u=C(()=>{const p=a();return!r.value||!p||!window.DOMRect?p||void 0:{getBoundingClientRect(){var h,v,m,f;return window.DOMRect.fromRect({width:((h=d.value)==null?void 0:h.width)||0,height:((v=d.value)==null?void 0:v.height)||0,x:((m=d.value)==null?void 0:m.left)||0,y:((f=d.value)==null?void 0:f.top)||0})}}});return{mergedPosInfo:d,triggerTarget:u}},Wp=Symbol("ElTour");function dce(e){const t=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,{top:r,right:l,bottom:n,left:a}=e.getBoundingClientRect();return r>=0&&a>=0&&l<=t&&n<=o}const pce=(e,t,o,r,l,n,a,i)=>{const c=D(),d=D(),u=D({}),p={x:c,y:d,placement:r,strategy:l,middlewareData:u},h=C(()=>{const g=[J6(s(n)),pK(),dK(),fce()];return s(i)&&s(o)&&g.push(Q6({element:s(o)})),g}),v=async()=>{if(!Nt)return;const g=s(e),y=s(t);if(!g||!y)return;const w=await e4(g,y,{placement:s(r),strategy:s(l),middleware:s(h)});Ri(p).forEach(x=>{p[x].value=w[x]})},m=C(()=>{if(!s(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:s(a)};const{overflow:g}=s(u);return{position:s(l),zIndex:s(a),top:s(d)!=null?`${s(d)}px`:"",left:s(c)!=null?`${s(c)}px`:"",maxWidth:g!=null&&g.maxWidth?`${g==null?void 0:g.maxWidth}px`:""}}),f=C(()=>{if(!s(i))return{};const{arrow:g}=s(u);return{left:(g==null?void 0:g.x)!=null?`${g==null?void 0:g.x}px`:"",top:(g==null?void 0:g.y)!=null?`${g==null?void 0:g.y}px`:""}});let _;return ft(()=>{const g=s(e),y=s(t);g&&y&&(_=cK(g,y,v)),Go(()=>{v()})}),to(()=>{_&&_()}),{update:v,contentStyle:m,arrowStyle:f}},fce=()=>({name:"overflow",async fn(e){const t=await uK(e);let o=0;return t.left>0&&(o=t.left),t.right>0&&(o=t.right),{data:{maxWidth:e.rects.floating.width-o}}}}),hce={style:{width:"100%",height:"100%"}},vce=["d"],mce=N({...N({name:"ElTourMask",inheritAttrs:!1}),props:cce,setup(e){const t=e,{ns:o}=Ge(Wp),r=C(()=>{var i,c;return(c=(i=t.pos)==null?void 0:i.radius)!=null?c:2}),l=C(()=>{const i=r.value,c=`a${i},${i} 0 0 1`;return{topRight:`${c} ${i},${i}`,bottomRight:`${c} ${-i},${i}`,bottomLeft:`${c} ${-i},${-i}`,topLeft:`${c} ${i},${-i}`}}),n=C(()=>{const i=window.innerWidth,c=window.innerHeight,d=l.value,u=`M${i},0 L0,0 L0,${c} L${i},${c} L${i},0 Z`,p=r.value;return t.pos?`${u} M${t.pos.left+p},${t.pos.top} h${t.pos.width-p*2} ${d.topRight} v${t.pos.height-p*2} ${d.bottomRight} h${-t.pos.width+p*2} ${d.bottomLeft} v${-t.pos.height+p*2} ${d.topLeft} z`:u}),a=C(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Sh(Yt(t,"visible"),{ns:o}),(i,c)=>i.visible?(b(),M("div",Mt({key:0,class:s(o).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:i.zIndex,pointerEvents:i.pos&&i.targetAreaClickable?"none":"auto"}},i.$attrs),[(b(),M("svg",hce,[E("path",{class:O(s(o).e("hollow")),style:Je(s(a)),d:s(n)},null,14,vce)]))],16)):se("v-if",!0)}});var gce=Le(mce,[["__file","mask.vue"]]);const bce=["absolute","fixed"],_ce=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],X2=Pe({placement:{type:ue(String),values:_ce,default:"bottom"},reference:{type:ue(Object),default:null},strategy:{type:ue(String),values:bce,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),wce={close:()=>!0},yce=["data-side"],xce=N({...N({name:"ElTourContent"}),props:X2,emits:wce,setup(e,{emit:t}){const o=e,r=D(o.placement),l=D(o.strategy),n=D(null),a=D(null);Se(()=>o.placement,()=>{r.value=o.placement});const{contentStyle:i,arrowStyle:c}=pce(Yt(o,"reference"),n,a,r,l,Yt(o,"offset"),Yt(o,"zIndex"),Yt(o,"showArrow")),d=C(()=>r.value.split("-")[0]),{ns:u}=Ge(Wp),p=()=>{t("close")},h=v=>{v.detail.focusReason==="pointer"&&v.preventDefault()};return(v,m)=>(b(),M("div",{ref_key:"contentRef",ref:n,style:Je(s(i)),class:O(s(u).e("content")),"data-side":s(d),tabindex:"-1"},[ee(s(Nc),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":n.value||void 0,onReleaseRequested:p,onFocusoutPrevented:h},{default:le(()=>[be(v.$slots,"default")]),_:3},8,["focus-trap-el"]),v.showArrow?(b(),M("span",{key:0,ref_key:"arrowRef",ref:a,style:Je(s(c)),class:O(s(u).e("arrow"))},null,6)):se("v-if",!0)],14,yce))}});var kce=Le(xce,[["__file","content.vue"]]),Cce=N({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:o}){let r=0;return()=>{var l,n;const a=(l=t.default)==null?void 0:l.call(t),i=[];let c=0;function d(u){Ke(u)&&u.forEach(p=>{var h;((h=(p==null?void 0:p.type)||{})==null?void 0:h.name)==="ElTourStep"&&(i.push(p),c+=1)})}return a.length&&d(Qn((n=a[0])==null?void 0:n.children)),r!==c&&(r=c,o("update-total",c)),i.length?i[e.current]:null}}});const Sce=Pe({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Xt},placement:X2.placement,contentStyle:{type:ue([Object])},mask:{type:ue([Boolean,Object]),default:!0},gap:{type:ue(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:ue([Boolean,Object]),default:()=>({block:"center"})},type:{type:ue(String)},appendTo:{type:ue([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),Ece={[St]:e=>Co(e),"update:current":e=>st(e),close:e=>st(e),finish:()=>!0,change:e=>st(e)},Tce=N({...N({name:"ElTour"}),props:Sce,emits:Ece,setup(e,{emit:t}){const o=e,r=ze("tour"),l=D(0),n=D(),a=a_(o,"current",t,{passive:!0}),i=C(()=>{var L;return(L=n.value)==null?void 0:L.target}),c=C(()=>[r.b(),_.value==="primary"?r.m("primary"):""]),d=C(()=>{var L;return((L=n.value)==null?void 0:L.placement)||o.placement}),u=C(()=>{var L,V;return(V=(L=n.value)==null?void 0:L.contentStyle)!=null?V:o.contentStyle}),p=C(()=>{var L,V;return(V=(L=n.value)==null?void 0:L.mask)!=null?V:o.mask}),h=C(()=>!!p.value&&o.modelValue),v=C(()=>Co(p.value)?void 0:p.value),m=C(()=>{var L,V;return!!i.value&&((V=(L=n.value)==null?void 0:L.showArrow)!=null?V:o.showArrow)}),f=C(()=>{var L,V;return(V=(L=n.value)==null?void 0:L.scrollIntoViewOptions)!=null?V:o.scrollIntoViewOptions}),_=C(()=>{var L,V;return(V=(L=n.value)==null?void 0:L.type)!=null?V:o.type}),{nextZIndex:g}=Ki(),y=g(),w=C(()=>{var L;return(L=o.zIndex)!=null?L:y}),{mergedPosInfo:x,triggerTarget:$}=uce(i,Yt(o,"modelValue"),Yt(o,"gap"),p,f);Se(()=>o.modelValue,L=>{L||(a.value=0)});const T=()=>{o.closeOnPressEscape&&(t("update:modelValue",!1),t("close",a.value))},R=L=>{l.value=L},P=Do();return zt(Wp,{currentStep:n,current:a,total:l,showClose:Yt(o,"showClose"),closeIcon:Yt(o,"closeIcon"),mergedType:_,ns:r,slots:P,updateModelValue(L){t("update:modelValue",L)},onClose(){t("close",a.value)},onFinish(){t("finish")},onChange(){t("change",a.value)}}),(L,V)=>{var B,j;return b(),M(Qe,null,[(b(),he(hi,{to:L.appendTo},[E("div",Mt({class:s(c)},L.$attrs),[ee(gce,{visible:s(h),fill:(B=s(v))==null?void 0:B.color,style:Je((j=s(v))==null?void 0:j.style),pos:s(x),"z-index":s(w),"target-area-clickable":L.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),L.modelValue?(b(),he(kce,{key:s(a),reference:s($),placement:s(d),"show-arrow":s(m),"z-index":s(w),style:Je(s(u)),onClose:T},{default:le(()=>[ee(s(Cce),{current:s(a),onUpdateTotal:R},{default:le(()=>[be(L.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):se("v-if",!0)],16)],8,["to"])),se(" just for IDE "),se("v-if",!0)],64)}}});var $ce=Le(Tce,[["__file","tour.vue"]]);const Mce=Pe({target:{type:ue([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Xt},showArrow:{type:Boolean,default:void 0},placement:X2.placement,mask:{type:ue([Boolean,Object]),default:void 0},contentStyle:{type:ue([Object])},prevButtonProps:{type:ue(Object)},nextButtonProps:{type:ue(Object)},scrollIntoViewOptions:{type:ue([Boolean,Object]),default:void 0},type:{type:ue(String)}}),Ace=N({...N({name:"ElTourStep"}),props:Mce,emits:{close:()=>!0},setup(e,{emit:t}){const o=e,{Close:r}=gh,{t:l}=Rt(),{currentStep:n,current:a,total:i,showClose:c,closeIcon:d,mergedType:u,ns:p,slots:h,updateModelValue:v,onClose:m,onFinish:f,onChange:_}=Ge(Wp);Se(o,P=>{n.value=P},{immediate:!0});const g=C(()=>{var P;return(P=o.showClose)!=null?P:c.value}),y=C(()=>{var P,L;return(L=(P=o.closeIcon)!=null?P:d.value)!=null?L:r}),w=P=>{if(P)return Bz(P,["children","onClick"])},x=()=>{var P,L;a.value-=1,(P=o.prevButtonProps)!=null&&P.onClick&&((L=o.prevButtonProps)==null||L.onClick()),_()},$=()=>{var P;a.value>=i.value-1?T():a.value+=1,(P=o.nextButtonProps)!=null&&P.onClick&&o.nextButtonProps.onClick(),_()},T=()=>{R(),f()},R=()=>{v(!1),m(),t("close")};return(P,L)=>(b(),M(Qe,null,[s(g)?(b(),M("button",{key:0,"aria-label":"Close",class:O(s(p).e("closebtn")),type:"button",onClick:R},[ee(s(Ze),{class:O(s(p).e("close"))},{default:le(()=>[(b(),he(Et(s(y))))]),_:1},8,["class"])],2)):se("v-if",!0),E("header",{class:O([s(p).e("header"),{"show-close":s(c)}])},[be(P.$slots,"header",{},()=>[E("span",{role:"heading",class:O(s(p).e("title"))},$e(P.title),3)])],2),E("div",{class:O(s(p).e("body"))},[be(P.$slots,"default",{},()=>[E("span",null,$e(P.description),1)])],2),E("footer",{class:O(s(p).e("footer"))},[E("div",{class:O(s(p).b("indicators"))},[s(h).indicators?(b(),he(Et(s(h).indicators),{key:0,current:s(a),total:s(i)},null,8,["current","total"])):(b(!0),M(Qe,{key:1},It(s(i),(V,B)=>(b(),M("span",{key:V,class:O([s(p).b("indicator"),B===s(a)?"is-active":""])},null,2))),128))],2),E("div",{class:O(s(p).b("buttons"))},[s(a)>0?(b(),he(s(Wo),Mt({key:0,size:"small",type:s(u)},w(P.prevButtonProps),{onClick:x}),{default:le(()=>{var V,B;return[Ct($e((B=(V=P.prevButtonProps)==null?void 0:V.children)!=null?B:s(l)("el.tour.previous")),1)]}),_:1},16,["type"])):se("v-if",!0),s(a)<=s(i)-1?(b(),he(s(Wo),Mt({key:1,size:"small",type:s(u)==="primary"?"default":"primary"},w(P.nextButtonProps),{onClick:$}),{default:le(()=>{var V,B;return[Ct($e((B=(V=P.nextButtonProps)==null?void 0:V.children)!=null?B:s(a)===s(i)-1?s(l)("el.tour.finish"):s(l)("el.tour.next")),1)]}),_:1},16,["type"])):se("v-if",!0)],2)],2)],64))}});var Rx=Le(Ace,[["__file","step.vue"]]);const zce=yt($ce,{TourStep:Rx}),Ice=co(Rx),Oce=Pe({container:{type:ue([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:ue(String),default:"default"},direction:{type:ue(String),default:"vertical"}}),Nce={change:e=>ut(e),click:(e,t)=>e instanceof MouseEvent&&(ut(t)||ko(t))},Lx=Symbol("anchor"),Pce=N({...N({name:"ElAnchor"}),props:Oce,emits:Nce,setup(e,{expose:t,emit:o}){const r=e,l=D(""),n=D(null),a=D(null),i=D(),c={};let d=!1,u=0;const p=ze("anchor"),h=C(()=>[p.b(),r.type==="underline"?p.m("underline"):"",p.m(r.direction)]),v=P=>{c[P.href]=P.el},m=P=>{delete c[P]},f=P=>{l.value!==P&&(l.value=P,o("change",P))};let _=null;const g=P=>{if(!i.value)return;const L=Md(P);if(!L)return;_&&_(),d=!0;const V=M3(L,i.value),B=P0(L,V),j=V.scrollHeight-V.clientHeight,te=Math.min(B-r.offset,j);_=Zz(i.value,u,te,r.duration,()=>{setTimeout(()=>{d=!1},20)})},y=P=>{P&&(f(P),g(P))},w=(P,L)=>{o("click",P,L),y(L)},x=uF(()=>{i.value&&(u=A3(i.value));const P=$();d||ko(P)||f(P)}),$=()=>{if(!i.value)return;const P=A3(i.value),L=[];for(const V of Object.keys(c)){const B=Md(V);if(!B)continue;const j=M3(B,i.value),te=P0(B,j);L.push({top:te-r.offset-r.bound,href:V})}L.sort((V,B)=>V.top-B.top);for(let V=0;VP))return B.href}},T=()=>{const P=Md(r.container);!P||Ed(P)?i.value=window:i.value=P};oo(i,"scroll",x);const R=C(()=>{if(!n.value||!a.value||!l.value)return{};const P=c[l.value];if(!P)return{};const L=n.value.getBoundingClientRect(),V=a.value.getBoundingClientRect(),B=P.getBoundingClientRect();return r.direction==="horizontal"?{left:`${B.left-L.left}px`,width:`${B.width}px`,opacity:1}:{top:`${B.top-L.top+(B.height-V.height)/2}px`,opacity:1}});return ft(()=>{T();const P=decodeURIComponent(window.location.hash);Md(P)?y(P):x()}),Se(()=>r.container,()=>{T()}),zt(Lx,{ns:p,direction:r.direction,currentAnchor:l,addLink:v,removeLink:m,handleClick:w}),t({scrollTo:y}),(P,L)=>(b(),M("div",{ref_key:"anchorRef",ref:n,class:O(s(h))},[P.marker?(b(),M("div",{key:0,ref_key:"markerRef",ref:a,class:O(s(p).e("marker")),style:Je(s(R))},null,6)):se("v-if",!0),E("div",{class:O(s(p).e("list"))},[be(P.$slots,"default")],2)],2))}});var Rce=Le(Pce,[["__file","anchor.vue"]]);const Lce=Pe({title:String,href:String}),Bce=["href"],Vce=N({...N({name:"ElAnchorLink"}),props:Lce,setup(e){const t=e,o=D(null),{ns:r,direction:l,currentAnchor:n,addLink:a,removeLink:i,handleClick:c}=Ge(Lx),d=C(()=>[r.e("link"),r.is("active",n.value===t.href)]),u=p=>{c(p,t.href)};return Se(()=>t.href,(p,h)=>{et(()=>{h&&i(h),p&&a({href:p,el:o.value})})}),ft(()=>{const{href:p}=t;p&&a({href:p,el:o.value})}),to(()=>{const{href:p}=t;p&&i(p)}),(p,h)=>(b(),M("div",{class:O(s(r).e("item"))},[E("a",{ref_key:"linkRef",ref:o,class:O(s(d)),href:p.href,onClick:u},[be(p.$slots,"default",{},()=>[Ct($e(p.title),1)])],10,Bce),p.$slots["sub-link"]&&s(l)==="vertical"?(b(),M("div",{key:0,class:O(s(r).e("list"))},[be(p.$slots,"sub-link")],2)):se("v-if",!0)],2))}});var Bx=Le(Vce,[["__file","anchor-link.vue"]]);const Dce=yt(Rce,{AnchorLink:Bx}),Hce=co(Bx),Fce=Pe({options:{type:ue(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:Oo,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...Zo(["ariaLabel"])}),jce={[St]:e=>ut(e)||st(e),[ro]:e=>ut(e)||st(e)},Kce=["id","aria-label","aria-labelledby"],Uce=["name","disabled","checked","onChange"],Wce=N({...N({name:"ElSegmented"}),props:Fce,emits:jce,setup(e,{emit:t}){const o=e,r=ze("segmented"),l=Qo(),n=So(),a=xr(),{formItem:i}=sr(),{inputId:c,isLabeledByFormItem:d}=bl(o,{formItemContext:i}),u=D(null),p=rE(),h=Dt({isInit:!1,width:0,translateX:0,disabled:!1,focusVisible:!1}),v=L=>{const V=m(L);t(St,V),t(ro,V)},m=L=>xt(L)?L.value:L,f=L=>xt(L)?L.label:L,_=L=>!!(a.value||xt(L)&&L.disabled),g=L=>o.modelValue===m(L),y=L=>o.options.find(V=>m(V)===L),w=L=>[r.e("item"),r.is("selected",g(L)),r.is("disabled",_(L))],x=()=>{if(!u.value)return;const L=u.value.querySelector(".is-selected"),V=u.value.querySelector(".is-selected input");if(!L||!V){h.width=0,h.translateX=0,h.disabled=!1,h.focusVisible=!1;return}const B=L.getBoundingClientRect();h.isInit=!0,h.width=B.width,h.translateX=L.offsetLeft,h.disabled=_(y(o.modelValue));try{h.focusVisible=V.matches(":focus-visible")}catch{}},$=C(()=>[r.b(),r.m(n.value),r.is("block",o.block)]),T=C(()=>({width:`${h.width}px`,transform:`translateX(${h.translateX}px)`,display:h.isInit?"block":"none"})),R=C(()=>[r.e("item-selected"),r.is("disabled",h.disabled),r.is("focus-visible",h.focusVisible)]),P=C(()=>o.name||l.value);return so(u,x),Se(p,x),Se(()=>o.modelValue,()=>{var L;x(),o.validateEvent&&((L=i==null?void 0:i.validate)==null||L.call(i,"change").catch(V=>void 0))},{flush:"post"}),(L,V)=>(b(),M("div",{id:s(c),ref_key:"segmentedRef",ref:u,class:O(s($)),role:"radiogroup","aria-label":s(d)?void 0:L.ariaLabel||"segmented","aria-labelledby":s(d)?s(i).labelId:void 0},[E("div",{class:O(s(r).e("group"))},[E("div",{style:Je(s(T)),class:O(s(R))},null,6),(b(!0),M(Qe,null,It(L.options,(B,j)=>(b(),M("label",{key:j,class:O(w(B))},[E("input",{class:O(s(r).e("item-input")),type:"radio",name:s(P),disabled:_(B),checked:g(B),onChange:te=>v(B)},null,42,Uce),E("div",{class:O(s(r).e("item-label"))},[be(L.$slots,"default",{item:B},()=>[Ct($e(f(B)),1)])],2)],2))),128))],2)],10,Kce))}});var qce=Le(Wce,[["__file","segmented.vue"]]);const Yce=yt(qce);var Gce=[zK,VK,JW,Bae,lq,uq,B4,yq,xq,Wo,G4,zY,PY,ZY,JY,QG,KG,lX,rl,fG,Lw,pX,TX,$X,wX,eZ,CK,iZ,sZ,cZ,uZ,dZ,SJ,NJ,PJ,GJ,Cy,iQ,JQ,QQ,eee,Py,PU,RU,Ze,Fee,Ry,cr,Ly,ete,gte,bte,_te,wte,Ete,Toe,zoe,Boe,P4,Xy,Kw,EG,SG,Qoe,rre,sX,wn,Za,Cp,roe,Fre,Yre,Gre,kle,Tle,C8,Rle,jle,Kle,ene,oae,rae,Lae,Zae,Jae,Rc,oie,pY,aie,uie,die,ur,zie,Kie,rse,cse,Sse,Qse,sce,zce,Ice,Dce,Hce,Yce];const al="ElInfiniteScroll",Xce=50,Zce={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Z2=(e,t)=>Object.entries(Zce).reduce((o,[r,l])=>{var n,a;const{type:i,default:c}=l,d=e.getAttribute(`infinite-scroll-${r}`);let u=(a=(n=t[d])!=null?n:d)!=null?a:c;return u=u==="false"?!1:u,u=i(u),o[r]=Number.isNaN(u)?c:u,o},{}),Vx=e=>{const{observer:t}=e[al];t&&(t.disconnect(),delete e[al].observer)},Jce=(e,t)=>{const{container:o,containerEl:r,instance:l,observer:n,lastScrollTop:a}=e[al],{disabled:i,distance:c}=Z2(e,l),{clientHeight:d,scrollHeight:u,scrollTop:p}=r,h=p-a;if(e[al].lastScrollTop=p,n||i||h<0)return;let v=!1;if(o===e)v=u-(d+p)<=c;else{const{clientTop:m,scrollHeight:f}=e,_=P0(e,r);v=p+d>=_+m+f-c}v&&t.call(l)};function J2(e,t){const{containerEl:o,instance:r}=e[al],{disabled:l}=Z2(e,r);l||o.clientHeight===0||(o.scrollHeight<=o.clientHeight?t.call(r):Vx(e))}const Q2={async mounted(e,t){const{instance:o,value:r}=t;it(r)||Io(al,"'v-infinite-scroll' binding value must be a function"),await et();const{delay:l,immediate:n}=Z2(e,o),a=uh(e,!0),i=a===window?document.documentElement:a,c=Oa(Jce.bind(null,e,r),l);if(a){if(e[al]={instance:o,container:a,containerEl:i,delay:l,cb:r,onScroll:c,lastScrollTop:i.scrollTop},n){const d=new MutationObserver(Oa(J2.bind(null,e,r),Xce));e[al].observer=d,d.observe(e,{childList:!0,subtree:!0}),J2(e,r)}a.addEventListener("scroll",c)}},unmounted(e){if(!e[al])return;const{container:t,onScroll:o}=e[al];t==null||t.removeEventListener("scroll",o),Vx(e)},async updated(e){if(!e[al])await et();else{const{containerEl:t,cb:o,observer:r}=e[al];t.clientHeight&&r&&J2(e,o)}}};Q2.install=e=>{e.directive("InfiniteScroll",Q2)};const Qce=Q2;function eue(e){let t;const o=D(!1),r=Dt({...e,originalPosition:"",originalOverflow:"",visible:!1});function l(h){r.text=h}function n(){const h=r.parent,v=p.ns;if(!h.vLoadingAddClassList){let m=h.getAttribute("loading-number");m=Number.parseInt(m)-1,m?h.setAttribute("loading-number",m.toString()):(ar(h,v.bm("parent","relative")),h.removeAttribute("loading-number")),ar(h,v.bm("parent","hidden"))}a(),u.unmount()}function a(){var h,v;(v=(h=p.$el)==null?void 0:h.parentNode)==null||v.removeChild(p.$el)}function i(){var h;e.beforeClose&&!e.beforeClose()||(o.value=!0,clearTimeout(t),t=window.setTimeout(c,400),r.visible=!1,(h=e.closed)==null||h.call(e))}function c(){if(!o.value)return;const h=r.parent;o.value=!1,h.vLoadingAddClassList=void 0,n()}const u=D1(N({name:"ElLoading",setup(h,{expose:v}){const{ns:m,zIndex:f}=Yd("loading");return v({ns:m,zIndex:f}),()=>{const _=r.spinner||r.svg,g=rt("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",..._?{innerHTML:_}:{}},[rt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),y=r.text?rt("p",{class:m.b("text")},[r.text]):void 0;return rt(Mo,{name:m.b("fade"),onAfterLeave:c},{default:le(()=>[mt(ee("div",{style:{backgroundColor:r.background||""},class:[m.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[rt("div",{class:m.b("spinner")},[g,y])]),[[Lt,r.visible]])])})}}})),p=u.mount(document.createElement("div"));return{...Bo(r),setText:l,removeElLoadingChild:a,close:i,handleAfterLeave:c,vm:p,get $el(){return p.$el}}}let qp;const em=function(e={}){if(!Nt)return;const t=tue(e);if(t.fullscreen&&qp)return qp;const o=eue({...t,closed:()=>{var l;(l=t.closed)==null||l.call(t),t.fullscreen&&(qp=void 0)}});oue(t,t.parent,o),Dx(t,t.parent,o),t.parent.vLoadingAddClassList=()=>Dx(t,t.parent,o);let r=t.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",t.parent.setAttribute("loading-number",r),t.parent.appendChild(o.$el),et(()=>o.visible.value=t.visible),t.fullscreen&&(qp=o),o},tue=e=>{var t,o,r,l;let n;return ut(e.target)?n=(t=document.querySelector(e.target))!=null?t:document.body:n=e.target||document.body,{parent:n===document.body||e.body?document.body:n,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:n===document.body&&((o=e.fullscreen)!=null?o:!0),lock:(r=e.lock)!=null?r:!1,customClass:e.customClass||"",visible:(l=e.visible)!=null?l:!0,target:n}},oue=async(e,t,o)=>{const{nextZIndex:r}=o.vm.zIndex||o.vm._.exposed.zIndex,l={};if(e.fullscreen)o.originalPosition.value=Zn(document.body,"position"),o.originalOverflow.value=Zn(document.body,"overflow"),l.zIndex=r();else if(e.parent===document.body){o.originalPosition.value=Zn(document.body,"position"),await et();for(const n of["top","left"]){const a=n==="top"?"scrollTop":"scrollLeft";l[n]=`${e.target.getBoundingClientRect()[n]+document.body[a]+document.documentElement[a]-Number.parseInt(Zn(document.body,`margin-${n}`),10)}px`}for(const n of["height","width"])l[n]=`${e.target.getBoundingClientRect()[n]}px`}else o.originalPosition.value=Zn(t,"position");for(const[n,a]of Object.entries(l))o.$el.style[n]=a},Dx=(e,t,o)=>{const r=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?ar(t,r.bm("parent","relative")):Zr(t,r.bm("parent","relative")),e.fullscreen&&e.lock?Zr(t,r.bm("parent","hidden")):ar(t,r.bm("parent","hidden"))},Yp=Symbol("ElLoading"),Hx=(e,t)=>{var o,r,l,n;const a=t.instance,i=h=>xt(t.value)?t.value[h]:void 0,c=h=>{const v=ut(h)&&(a==null?void 0:a[h])||h;return v&&D(v)},d=h=>c(i(h)||e.getAttribute(`element-loading-${An(h)}`)),u=(o=i("fullscreen"))!=null?o:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:u,target:(r=i("target"))!=null?r:u?void 0:e,body:(l=i("body"))!=null?l:t.modifiers.body,lock:(n=i("lock"))!=null?n:t.modifiers.lock};e[Yp]={options:p,instance:em(p)}},rue=(e,t)=>{for(const o of Object.keys(t))Zt(t[o])&&(t[o].value=e[o])},Fx={mounted(e,t){t.value&&Hx(e,t)},updated(e,t){const o=e[Yp];t.oldValue!==t.value&&(t.value&&!t.oldValue?Hx(e,t):t.value&&t.oldValue?xt(t.value)&&rue(t.value,o.options):o==null||o.instance.close())},unmounted(e){var t;(t=e[Yp])==null||t.instance.close(),e[Yp]=null}},lue={install(e){e.directive("loading",Fx),e.config.globalProperties.$loading=em},directive:Fx,service:em},jx=["success","info","warning","error"],dr=uo({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Nt?document.body:void 0}),nue=Pe({customClass:{type:String,default:dr.customClass},center:{type:Boolean,default:dr.center},dangerouslyUseHTMLString:{type:Boolean,default:dr.dangerouslyUseHTMLString},duration:{type:Number,default:dr.duration},icon:{type:Xt,default:dr.icon},id:{type:String,default:dr.id},message:{type:ue([String,Object,Function]),default:dr.message},onClose:{type:ue(Function),default:dr.onClose},showClose:{type:Boolean,default:dr.showClose},type:{type:String,values:jx,default:dr.type},plain:{type:Boolean,default:dr.plain},offset:{type:Number,default:dr.offset},zIndex:{type:Number,default:dr.zIndex},grouping:{type:Boolean,default:dr.grouping},repeatNum:{type:Number,default:dr.repeatNum}}),aue={destroy:()=>!0},yl=og([]),iue=e=>{const t=yl.findIndex(l=>l.id===e),o=yl[t];let r;return t>0&&(r=yl[t-1]),{current:o,prev:r}},sue=e=>{const{prev:t}=iue(e);return t?t.vm.exposed.bottom.value:0},cue=(e,t)=>yl.findIndex(r=>r.id===e)>0?16:t,uue=["id"],due=["innerHTML"],pue=N({...N({name:"ElMessage"}),props:nue,emits:aue,setup(e,{expose:t}){const o=e,{Close:r}=bh,{ns:l,zIndex:n}=Yd("message"),{currentZIndex:a,nextZIndex:i}=n,c=D(),d=D(!1),u=D(0);let p;const h=C(()=>o.type?o.type==="error"?"danger":o.type:"info"),v=C(()=>{const R=o.type;return{[l.bm("icon",R)]:R&&Jn[R]}}),m=C(()=>o.icon||Jn[o.type]||""),f=C(()=>sue(o.id)),_=C(()=>cue(o.id,o.offset)+f.value),g=C(()=>u.value+_.value),y=C(()=>({top:`${_.value}px`,zIndex:a.value}));function w(){o.duration!==0&&({stop:p}=$a(()=>{$()},o.duration))}function x(){p==null||p()}function $(){d.value=!1}function T({code:R}){R===lt.esc&&$()}return ft(()=>{w(),i(),d.value=!0}),Se(()=>o.repeatNum,()=>{x(),w()}),oo(document,"keydown",T),so(c,()=>{u.value=c.value.getBoundingClientRect().height}),t({visible:d,bottom:g,close:$}),(R,P)=>(b(),he(Mo,{name:s(l).b("fade"),onBeforeLeave:R.onClose,onAfterLeave:P[0]||(P[0]=L=>R.$emit("destroy")),persisted:""},{default:le(()=>[mt(E("div",{id:R.id,ref_key:"messageRef",ref:c,class:O([s(l).b(),{[s(l).m(R.type)]:R.type},s(l).is("center",R.center),s(l).is("closable",R.showClose),s(l).is("plain",R.plain),R.customClass]),style:Je(s(y)),role:"alert",onMouseenter:x,onMouseleave:w},[R.repeatNum>1?(b(),he(s(B4),{key:0,value:R.repeatNum,type:s(h),class:O(s(l).e("badge"))},null,8,["value","type","class"])):se("v-if",!0),s(m)?(b(),he(s(Ze),{key:1,class:O([s(l).e("icon"),s(v)])},{default:le(()=>[(b(),he(Et(s(m))))]),_:1},8,["class"])):se("v-if",!0),be(R.$slots,"default",{},()=>[R.dangerouslyUseHTMLString?(b(),M(Qe,{key:1},[se(" Caution here, message could've been compromised, never use user's input as message "),E("p",{class:O(s(l).e("content")),innerHTML:R.message},null,10,due)],2112)):(b(),M("p",{key:0,class:O(s(l).e("content"))},$e(R.message),3))]),R.showClose?(b(),he(s(Ze),{key:2,class:O(s(l).e("closeBtn")),onClick:ct($,["stop"])},{default:le(()=>[ee(s(r))]),_:1},8,["class","onClick"])):se("v-if",!0)],46,uue),[[Lt,d.value]])]),_:3},8,["name","onBeforeLeave"]))}});var fue=Le(pue,[["__file","message.vue"]]);let hue=1;const Kx=e=>{const t=!e||ut(e)||io(e)||it(e)?{message:e}:e,o={...dr,...t};if(!o.appendTo)o.appendTo=document.body;else if(ut(o.appendTo)){let r=document.querySelector(o.appendTo);Gr(r)||(r=document.body),o.appendTo=r}return o},vue=e=>{const t=yl.indexOf(e);if(t===-1)return;yl.splice(t,1);const{handler:o}=e;o.close()},mue=({appendTo:e,...t},o)=>{const r=`message_${hue++}`,l=t.onClose,n=document.createElement("div"),a={...t,id:r,onClose:()=>{l==null||l(),vue(u)},onDestroy:()=>{jn(null,n)}},i=ee(fue,a,it(a.message)||io(a.message)?{default:it(a.message)?a.message:()=>a.message}:null);i.appContext=o||ms._context,jn(i,n),e.appendChild(n.firstElementChild);const c=i.component,u={id:r,vnode:i,vm:c,handler:{close:()=>{c.exposed.visible.value=!1}},props:i.component.props};return u},ms=(e={},t)=>{if(!Nt)return{close:()=>{}};if(st(Yh.max)&&yl.length>=Yh.max)return{close:()=>{}};const o=Kx(e);if(o.grouping&&yl.length){const l=yl.find(({vnode:n})=>{var a;return((a=n.props)==null?void 0:a.message)===o.message});if(l)return l.props.repeatNum+=1,l.props.type=o.type,l.handler}const r=mue(o,t);return yl.push(r),r.handler};jx.forEach(e=>{ms[e]=(t={},o)=>{const r=Kx(t);return ms({...r,type:e},o)}});function gue(e){for(const t of yl)(!e||e===t.props.type)&&t.handler.close()}ms.closeAll=gue,ms._context=null;const bue=Q3(ms,"$message"),_ue=N({name:"ElMessageBox",directives:{TrapFocus:Zq},components:{ElButton:Wo,ElFocusTrap:Nc,ElInput:cr,ElOverlay:Uv,ElIcon:Ze,...bh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:t6},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:o,zIndex:r,ns:l,size:n}=Yd("message-box",C(()=>e.buttonSize)),{t:a}=o,{nextZIndex:i}=r,c=D(!1),d=Dt({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),u=C(()=>{const H=d.type;return{[l.bm("icon",H)]:H&&Jn[H]}}),p=Qo(),h=Qo(),v=C(()=>d.icon||Jn[d.type]||""),m=C(()=>!!d.message),f=D(),_=D(),g=D(),y=D(),w=D(),x=C(()=>d.confirmButtonClass);Se(()=>d.inputValue,async H=>{await et(),e.boxType==="prompt"&&H!==null&&j()},{immediate:!0}),Se(()=>c.value,H=>{var F,K;H&&(e.boxType!=="prompt"&&(d.autofocus?g.value=(K=(F=w.value)==null?void 0:F.$el)!=null?K:f.value:g.value=f.value),d.zIndex=i()),e.boxType==="prompt"&&(H?et().then(()=>{var I;y.value&&y.value.$el&&(d.autofocus?g.value=(I=te())!=null?I:f.value:g.value=f.value)}):(d.editorErrorMessage="",d.validateError=!1))});const $=C(()=>e.draggable),T=C(()=>e.overflow);r6(f,_,$,T),ft(async()=>{await et(),e.closeOnHashChange&&window.addEventListener("hashchange",R)}),to(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",R)});function R(){c.value&&(c.value=!1,et(()=>{d.action&&t("action",d.action)}))}const P=()=>{e.closeOnClickModal&&B(d.distinguishCancelAndClose?"close":"cancel")},L=Ph(P),V=H=>{if(d.inputType!=="textarea")return H.preventDefault(),B("confirm")},B=H=>{var F;e.boxType==="prompt"&&H==="confirm"&&!j()||(d.action=H,d.beforeClose?(F=d.beforeClose)==null||F.call(d,H,d,R):R())},j=()=>{if(e.boxType==="prompt"){const H=d.inputPattern;if(H&&!H.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||a("el.messagebox.error"),d.validateError=!0,!1;const F=d.inputValidator;if(typeof F=="function"){const K=F(d.inputValue);if(K===!1)return d.editorErrorMessage=d.inputErrorMessage||a("el.messagebox.error"),d.validateError=!0,!1;if(typeof K=="string")return d.editorErrorMessage=K,d.validateError=!0,!1}}return d.editorErrorMessage="",d.validateError=!1,!0},te=()=>{const H=y.value.$refs;return H.input||H.textarea},J=()=>{B("close")},Z=()=>{e.closeOnPressEscape&&J()};return e.lockScroll&&Sh(c),{...Bo(d),ns:l,overlayEvent:L,visible:c,hasMessage:m,typeClass:u,contentId:p,inputId:h,btnSize:n,iconComponent:v,confirmButtonClasses:x,rootRef:f,focusStartRef:g,headerRef:_,inputRef:y,confirmRef:w,doClose:R,handleClose:J,onCloseRequested:Z,handleWrapperClick:P,handleInputEnter:V,handleAction:B,t:a}}}),wue=["aria-label","aria-describedby"],yue=["aria-label"],xue=["id"];function kue(e,t,o,r,l,n){const a=nt("el-icon"),i=nt("close"),c=nt("el-input"),d=nt("el-button"),u=nt("el-focus-trap"),p=nt("el-overlay");return b(),he(Mo,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=h=>e.$emit("vanish")),persisted:""},{default:le(()=>[mt(ee(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:le(()=>[E("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:O(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...h)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...h)),onMousedown:t[9]||(t[9]=(...h)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...h)),onMouseup:t[10]||(t[10]=(...h)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...h))},[ee(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:le(()=>[E("div",{ref:"rootRef",class:O([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=ct(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(b(),M("div",{key:0,ref:"headerRef",class:O([e.ns.e("header"),{"show-close":e.showClose}])},[E("div",{class:O(e.ns.e("title"))},[e.iconComponent&&e.center?(b(),he(a,{key:0,class:O([e.ns.e("status"),e.typeClass])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),E("span",null,$e(e.title),1)],2),e.showClose?(b(),M("button",{key:0,type:"button",class:O(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=h=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Gt(ct(h=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[ee(a,{class:O(e.ns.e("close"))},{default:le(()=>[ee(i)]),_:1},8,["class"])],42,yue)):se("v-if",!0)],2)):se("v-if",!0),E("div",{id:e.contentId,class:O(e.ns.e("content"))},[E("div",{class:O(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(b(),he(a,{key:0,class:O([e.ns.e("status"),e.typeClass])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),e.hasMessage?(b(),M("div",{key:1,class:O(e.ns.e("message"))},[be(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(b(),he(Et(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(b(),he(Et(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:le(()=>[Ct($e(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):se("v-if",!0)],2),mt(E("div",{class:O(e.ns.e("input"))},[ee(c,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=h=>e.inputValue=h),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:O({invalid:e.validateError}),onKeydown:Gt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),E("div",{class:O(e.ns.e("errormsg")),style:Je({visibility:e.editorErrorMessage?"visible":"hidden"})},$e(e.editorErrorMessage),7)],2),[[Lt,e.showInput]])],10,xue),E("div",{class:O(e.ns.e("btns"))},[e.showCancelButton?(b(),he(d,{key:0,loading:e.cancelButtonLoading,class:O([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=h=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Gt(ct(h=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:le(()=>[Ct($e(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):se("v-if",!0),mt(ee(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:O([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=h=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Gt(ct(h=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:le(()=>[Ct($e(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[Lt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,wue)]),_:3},8,["z-index","overlay-class","mask"]),[[Lt,e.visible]])]),_:3})}var Cue=Le(_ue,[["render",kue],["__file","index.vue"]]);const ou=new Map,Sue=e=>{let t=document.body;return e.appendTo&&(ut(e.appendTo)&&(t=document.querySelector(e.appendTo)),Gr(e.appendTo)&&(t=e.appendTo),Gr(t)||(t=document.body)),t},Eue=(e,t,o=null)=>{const r=ee(Cue,e,it(e.message)||io(e.message)?{default:it(e.message)?e.message:()=>e.message}:null);return r.appContext=o,jn(r,t),Sue(e).appendChild(t.firstElementChild),r.component},Tue=()=>document.createElement("div"),$ue=(e,t)=>{const o=Tue();e.onVanish=()=>{jn(null,o),ou.delete(l)},e.onAction=n=>{const a=ou.get(l);let i;e.showInput?i={value:l.inputValue,action:n}:i=n,e.callback?e.callback(i,r.proxy):n==="cancel"||n==="close"?e.distinguishCancelAndClose&&n!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(i)};const r=Eue(e,o,t),l=r.proxy;for(const n in e)Pt(e,n)&&!Pt(l.$props,n)&&(l[n]=e[n]);return l.visible=!0,l};function gs(e,t=null){if(!Nt)return Promise.reject();let o;return ut(e)||io(e)?e={message:e}:o=e.callback,new Promise((r,l)=>{const n=$ue(e,t??gs._context);ou.set(n,{options:e,callback:o,resolve:r,reject:l})})}const Mue=["alert","confirm","prompt"],Aue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Mue.forEach(e=>{gs[e]=zue(e)});function zue(e){return(t,o,r,l)=>{let n="";return xt(o)?(r=o,n=""):ko(o)?n="":n=o,gs(Object.assign({title:n,message:t,type:"",...Aue[e]},r,{boxType:e}),l)}}gs.close=()=>{ou.forEach((e,t)=>{t.doClose()}),ou.clear()},gs._context=null;const ca=gs;ca.install=e=>{ca._context=e._context,e.config.globalProperties.$msgbox=ca,e.config.globalProperties.$messageBox=ca,e.config.globalProperties.$alert=ca.alert,e.config.globalProperties.$confirm=ca.confirm,e.config.globalProperties.$prompt=ca.prompt};const Iue=ca,Ux=["success","info","warning","error"],Oue=Pe({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Xt},id:{type:String,default:""},message:{type:ue([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:ue(Function),default:()=>{}},onClose:{type:ue(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...Ux,""],default:""},zIndex:Number}),Nue={destroy:()=>!0},Pue=["id"],Rue=["textContent"],Lue={key:0},Bue=["innerHTML"],Vue=N({...N({name:"ElNotification"}),props:Oue,emits:Nue,setup(e,{expose:t}){const o=e,{ns:r,zIndex:l}=Yd("notification"),{nextZIndex:n,currentZIndex:a}=l,{Close:i}=gh,c=D(!1);let d;const u=C(()=>{const w=o.type;return w&&Jn[o.type]?r.m(w):""}),p=C(()=>o.type&&Jn[o.type]||o.icon),h=C(()=>o.position.endsWith("right")?"right":"left"),v=C(()=>o.position.startsWith("top")?"top":"bottom"),m=C(()=>{var w;return{[v.value]:`${o.offset}px`,zIndex:(w=o.zIndex)!=null?w:a.value}});function f(){o.duration>0&&({stop:d}=$a(()=>{c.value&&g()},o.duration))}function _(){d==null||d()}function g(){c.value=!1}function y({code:w}){w===lt.delete||w===lt.backspace?_():w===lt.esc?c.value&&g():f()}return ft(()=>{f(),n(),c.value=!0}),oo(document,"keydown",y),t({visible:c,close:g}),(w,x)=>(b(),he(Mo,{name:s(r).b("fade"),onBeforeLeave:w.onClose,onAfterLeave:x[1]||(x[1]=$=>w.$emit("destroy")),persisted:""},{default:le(()=>[mt(E("div",{id:w.id,class:O([s(r).b(),w.customClass,s(h)]),style:Je(s(m)),role:"alert",onMouseenter:_,onMouseleave:f,onClick:x[0]||(x[0]=(...$)=>w.onClick&&w.onClick(...$))},[s(p)?(b(),he(s(Ze),{key:0,class:O([s(r).e("icon"),s(u)])},{default:le(()=>[(b(),he(Et(s(p))))]),_:1},8,["class"])):se("v-if",!0),E("div",{class:O(s(r).e("group"))},[E("h2",{class:O(s(r).e("title")),textContent:$e(w.title)},null,10,Rue),mt(E("div",{class:O(s(r).e("content")),style:Je(w.title?void 0:{margin:0})},[be(w.$slots,"default",{},()=>[w.dangerouslyUseHTMLString?(b(),M(Qe,{key:1},[se(" Caution here, message could've been compromised, never use user's input as message "),E("p",{innerHTML:w.message},null,8,Bue)],2112)):(b(),M("p",Lue,$e(w.message),1))])],6),[[Lt,w.message]]),w.showClose?(b(),he(s(Ze),{key:0,class:O(s(r).e("closeBtn")),onClick:ct(g,["stop"])},{default:le(()=>[ee(s(i))]),_:1},8,["class","onClick"])):se("v-if",!0)],2)],46,Pue),[[Lt,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var Due=Le(Vue,[["__file","notification.vue"]]);const Gp={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},tm=16;let Hue=1;const bs=function(e={},t=null){if(!Nt)return{close:()=>{}};(typeof e=="string"||io(e))&&(e={message:e});const o=e.position||"top-right";let r=e.offset||0;Gp[o].forEach(({vm:u})=>{var p;r+=(((p=u.el)==null?void 0:p.offsetHeight)||0)+tm}),r+=tm;const l=`notification_${Hue++}`,n=e.onClose,a={...e,offset:r,id:l,onClose:()=>{Fue(l,o,n)}};let i=document.body;Gr(e.appendTo)?i=e.appendTo:ut(e.appendTo)&&(i=document.querySelector(e.appendTo)),Gr(i)||(i=document.body);const c=document.createElement("div"),d=ee(Due,a,io(a.message)?{default:()=>a.message}:null);return d.appContext=t??bs._context,d.props.onDestroy=()=>{jn(null,c)},jn(d,c),Gp[o].push({vm:d}),i.appendChild(c.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};Ux.forEach(e=>{bs[e]=(t={})=>((typeof t=="string"||io(t))&&(t={message:t}),bs({...t,type:e}))});function Fue(e,t,o){const r=Gp[t],l=r.findIndex(({vm:d})=>{var u;return((u=d.component)==null?void 0:u.props.id)===e});if(l===-1)return;const{vm:n}=r[l];if(!n)return;o==null||o(n);const a=n.el.offsetHeight,i=t.split("-")[0];r.splice(l,1);const c=r.length;if(!(c<1))for(let d=l;d{t.component.exposed.visible.value=!1})}bs.closeAll=jue,bs._context=null;const Kue=Q3(bs,"$notify");var Uue=[Qce,lue,bue,Iue,Kue,Gy],Wue=EK([...Gce,...Uue]);const que={class:"list"},Yue={key:0,class:"title"},Gue=["onClick"],Xue={key:1,class:"no-found"},Zue=N({__name:"CpList",props:{listClass:{type:String,default:""},itemClass:{type:String,default:""},noFoundMsg:{type:String,default:""},search:{type:Boolean,default:!0},title:{type:String,default:""},list:{type:Array,default:()=>[]}},emits:["handleClick"],setup(e,{expose:t,emit:o}){const r=D(""),l=D(null),n=e,a=o,i=u=>{a("handleClick",u)},c=C(()=>r.value&&r.value?n.list.filter(u=>JSON.stringify(u).toLowerCase().includes(r.value.toLowerCase())):n.list),d=C(()=>n.list.length<5?90*n.list.length:400);return t({listContent:l}),(u,p)=>{const h=nt("Search"),v=nt("el-icon"),m=nt("el-input");return b(),M("div",que,[e.title?(b(),M("div",Yue,$e(e.title),1)):se("",!0),n.search?(b(),he(m,{key:1,placeholder:s(ht).search,modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=f=>r.value=f),clearable:"",onClear:p[1]||(p[1]=f=>r.value="")},{prepend:le(()=>[ee(v,{size:25},{default:le(()=>[ee(h)]),_:1})]),_:1},8,["placeholder","modelValue"])):se("",!0),E("ul",{ref_key:"listContent",ref:l,class:O(e.listClass),style:Je(`min-height: ${d.value}px`)},[c.value.length?(b(),M("div",{key:0,style:Je(`min-height: ${d.value}px`)},[(b(!0),M(Qe,null,It(c.value,(f,_)=>(b(),M("li",{key:_,class:O(e.itemClass),onClick:g=>i(f)},[be(u.$slots,"default",{item:f})],10,Gue))),128))],4)):(b(),M("div",Xue,$e(e.noFoundMsg),1))],6)])}}}),Jue={class:"content"},Que={key:0,class:"title"},ede={class:"inner"},tde=N({__name:"CpModal",props:{title:{type:String,required:!1,default:""},class:{type:String,required:!1,default:""},show:{type:Boolean,required:!1,default:!0}},emits:["close"],setup(e,{emit:t}){const o=D(null),r=t,l=e,n=C(()=>{let a=l.show?"active":"";return l.class&&(a+=" "+l.class),a});return ft(()=>{o.value&&o.value.addEventListener("click",a=>{o.value==a.target&&r("close")})}),(a,i)=>(b(),M("div",{ref_key:"modal",ref:o,class:O(["modal",n.value])},[E("div",Jue,[e.title?(b(),M("div",Que,$e(e.title),1)):se("",!0),E("div",ede,[be(a.$slots,"default")])])],2))}}),ode=(e,t)=>{const o=e.__vccOpts||e;for(const[r,l]of t)o[r]=l;return o},rde={},lde={class:"loading"},nde=[u9('',1)];function ade(e,t){return b(),M("div",lde,nde)}const ide=ode(rde,[["render",ade]]),sde={class:"inner"},cde=["href"],ude=N({__name:"CpContainer",setup(e){const t=D(null);zt("container",t);const o=D(null),r=C(()=>{let i=qt.modal?"modal":"";return Ho.get.modal&&(i+=" active"),i});ft(()=>{o.value&&o.value.addEventListener("click",i=>{o.value==i.target&&Ho.set("modal",!1)})});const l=atob("Q3J5cHRvUGF5"),n=atob("UG93ZXJlZCBieQ=="),a=atob("aHR0cHM6Ly9iZXljYW5wcmVzcy5jb20vY3J5cHRvcGF5P3V0bV9zb3VyY2U9cHJvX3BsdWdpbiZ1dG1fbWVkaXVtPXBvd2VyZWRfYnk=");return(i,c)=>(b(),M("div",{ref_key:"app",ref:o,class:O(["app",r.value])},[E("div",{class:O(["container","theme-"+s(qt).theme.mode]),ref_key:"container",ref:t},[E("div",sde,[be(i.$slots,"default")]),E("div",null,[E("span",null,$e(s(n)),1),E("a",{href:s(a),target:"_blank"},$e(s(l)),9,cde)])],2)],2))}});class dde{constructor(t){ff(this,"store");ff(this,"stableCoins",["USDT","USDC","DAI","BUSD","UST","TUSD"]);this.store=t}useDiscount(t){const o=this.store.payment.get.order.paymentCurrency.symbol,r=qt.discountRates[o];return parseFloat((t-t*r/100).toFixed(6))}async currencyConverter(){const t=this.store.payment.get.order.amount,o=this.store.payment.get.order.currency,r=this.store.payment.get.order.paymentCurrency.symbol;if((o.toLocaleUpperCase()=="USD"||r.toLocaleUpperCase()=="USD")&&(this.stableCoins.includes(o.toLocaleUpperCase())||this.stableCoins.includes(r.toLocaleUpperCase())))return this.useDiscount(t);let l="https://min-api.cryptocompare.com/data/price";l=l+"?fsym="+o+"&tsyms="+r;const n=await fetch(l).then(a=>a.json());return n[r.toUpperCase()]?this.useDiscount(parseFloat(String(t*n[r.toUpperCase()]))):0}findReceiverFromAddresses(t){const o=qt.addresses;if(!o)return bo("No addresses found in config").then(()=>{window.location.reload()}),"";const r=String((t==null?void 0:t.id)||(t==null?void 0:t.hexId));return o[r]??o[String(t==null?void 0:t.code)]}async init(t){const o=this.store.payment.get.order.amount,r=this.store.payment.get.order.currency,l=this.findReceiverFromAddresses(t),n=this.store.payment.get.order.paymentCurrency,a=await this.currencyConverter();return Promise.resolve({order:{amount:o,currency:r,paymentAmount:a,paymentCurrency:n},receiver:l,blockConfirmationCount:10})}createTransaction(){return Promise.resolve({success:!0,data:null,message:""})}paymentFinished(t){return Promise.resolve({success:t,data:null,message:""})}}class pde{constructor(t){ff(this,"store");this.store=t}async init(t){return await fo.get("init",{params:{order:this.store.payment.get.order,network:wi(t)}}).then(async function(o){const r=o.data.data;return o.data.success&&r.redirect?r.redirect=="reload"?window.location.reload():window.location.href=r.redirect:r}).catch(function(o){return o.response&&o.response.data||o})}async createTransaction(t){const o=this.store.payment.get.order,r=this.store.payment.get.network,l=o.paymentCurrency;return l.symbol==(r==null?void 0:r.nativeCurrency.symbol)?l.decimals=r==null?void 0:r.nativeCurrency.decimals:l.address&&(l.decimals=await new Un.assets.Token(l.address).getDecimals()),this.store.payment.setOrderParams({paymentCurrency:l}),await fo.post("create-transaction",{order:o,hash:t.getId(),dynamicData:Js.getAll(),network:wi(r)}).then(n=>n.data).catch(n=>{let a=n.response.data||null;return a||(a={data:null,success:!1,message:n.message}),a})}async paymentFinished(t){const o=this.store.payment.get.order,r=this.store.payment.get.network,l=this.store.payment.get.transactionHash;return await fo.post("payment-finished",{hash:l,order:o,status:t,dynamicData:Js.getAll(),network:wi(r)}).then(async n=>n.data).catch(async n=>{let a=n.response.data||null;return a||(a={data:null,success:!1,message:n.message}),a})}async currencyConverter(){return await new Promise(t=>{fo.get("/currency-converter",{params:{order:this.store.payment.get.order,network:wi(this.store.payment.get.network)}}).then(o=>{o.data.success?t(o.data.data):t(0)}).catch(()=>{t(0)})})}}const fde=[{id:1,hexId:"0x1",name:"Ethereum",code:"evmchains",rpcUrl:"https://ethereum-rpc.publicnode.com",explorerUrl:"https://etherscan.io/",nativeCurrency:{symbol:"ETH",decimals:18},currencies:[{symbol:"ETH"},{symbol:"USDT",address:"0xdac17f958d2ee523a2206206994597c13d831ec7"},{symbol:"USDC",address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},{symbol:"BUSD",address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53"}]},{id:56,hexId:"0x38",name:"BNB Smart Chain",code:"evmchains",rpcUrl:"https://bsc-rpc.publicnode.com",explorerUrl:"https://bscscan.com/",nativeCurrency:{symbol:"BNB",decimals:18},currencies:[{symbol:"BNB"},{symbol:"BUSD",address:"0xe9e7cea3dedca5984780bafc599bd69add087d56"},{symbol:"USDT",address:"0x55d398326f99059ff775485246999027b3197955"},{symbol:"USDC",address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"}]},{id:43114,hexId:"0xa86a",name:"Avalanche C-Chain",code:"evmchains",rpcUrl:"https://api.avax.network/ext/bc/C/rpc",explorerUrl:"https://cchain.explorer.avax.network/",nativeCurrency:{symbol:"AVAX",decimals:18},currencies:[{symbol:"AVAX"},{symbol:"USDT",address:"0xde3a24028580884448a5397872046a019649b084"}]},{id:137,hexId:"0x89",name:"Polygon",code:"evmchains",rpcUrl:"https://polygon-rpc.com/",explorerUrl:"https://polygonscan.com/",nativeCurrency:{symbol:"MATIC",decimals:18},currencies:[{symbol:"MATIC"},{symbol:"USDT",address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"}]},{id:250,hexId:"0xfa",name:"Fantom",code:"evmchains",rpcUrl:"https://rpc.fantom.network",explorerUrl:"https://ftmscan.com/",nativeCurrency:{symbol:"FTM",decimals:18},currencies:[{symbol:"FTM"}]}],hde=[{id:11155111,hexId:"0xaa36a7",mainnetId:1,code:"evmchains",name:"Ethereum Sepolia Testnet",rpcUrl:"https://sepolia.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",explorerUrl:"https://sepolia.etherscan.io/",nativeCurrency:{symbol:"ETH",decimals:18},currencies:[{symbol:"ETH"},{symbol:"USDT",address:"0x419Fe9f14Ff3aA22e46ff1d03a73EdF3b70A62ED"},{symbol:"USDC",address:"0x13fA158A117b93C27c55b8216806294a0aE88b6D"}]},{id:97,hexId:"0x61",mainnetId:56,code:"evmchains",name:"BNB Smart Chain Testnet",rpcUrl:"https://bsc-testnet.publicnode.com",explorerUrl:"https://testnet.bscscan.com/",nativeCurrency:{symbol:"BNB",decimals:18},currencies:[{symbol:"BNB"},{symbol:"BUSD",address:"0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"},{symbol:"USDT",address:"0xba6670261a05b8504e8ab9c45d97a8ed42573822"}]},{id:43113,hexId:"0xa869",mainnetId:43114,code:"evmchains",name:"Avalanche FUJI C-Chain Testnet",rpcUrl:"https://api.avax-test.network/ext/bc/C/rpc",explorerUrl:"https://cchain.explorer.avax-test.network",nativeCurrency:{symbol:"AVAX",decimals:18},currencies:[{symbol:"AVAX"},{symbol:"USDT",address:"0xFe143522938e253e5Feef14DB0732e9d96221D72"}]},{id:80002,hexId:"0x13882",mainnetId:137,code:"evmchains",name:"Polygon Amoy Testnet",rpcUrl:"https://rpc-amoy.polygon.technology",explorerUrl:"https://www.oklink.com/amoy",nativeCurrency:{symbol:"MATIC",decimals:18},currencies:[{symbol:"MATIC"},{symbol:"USDT",address:"0xa02f6adc7926efebbd59fd43a84f4e0c0c91e832"}]},{id:4002,hexId:"0xfa2",mainnetId:250,code:"evmchains",name:"Fantom Testnet",rpcUrl:"https://rpc.testnet.fantom.network/",explorerUrl:"https://testnet.ftmscan.com/",nativeCurrency:{symbol:"FTM",decimals:18},currencies:[{symbol:"FTM"}]}];window.cplSwal=Er,window.cplHelpers=Q1,window.cplTyping=ha;let Wx=!1;window.InitCryptoPayLite=(e,t)=>{var d;if(t=ha(t),Wx)throw new Error("CryptoPay Lite already initialized");xi(),Wx=!0,(d=document.querySelector("body"))==null||d.classList.add("cpl-theme-"+t.theme.mode),fo.defaults.baseURL=t.apiUrl??"./test-data/fake-api";const o={events:Vt,helpers:Q1,dynamicData:Js},r=rC();r.use(LS);const l=D1(PS);l.component("cp-list",Zue),l.component("cp-modal",tde),l.component("cp-loading",ide),l.component("cp-container",ude);for(const[u,p]of Object.entries(oF))l.component(u,p);l.use(r),l.use(Wue);const n={};Object.values(mC).forEach(u=>{const p=u();n[p.$id]=p}),vC(t),hC(n);const a=document.createElement("div");l.mount(a);const i=()=>new Promise(u=>{const p=Object.values(n);p.forEach(async(h,v)=>{await h.$reset(),v===p.length-1&&u(!0)})}),c=(u,p={})=>{if(typeof u!="object")throw new Error("Order must be object");if(typeof p!="object")throw new Error("Params must be object");if(!u.amount)throw new Error("Order amount is required");if(!u.currency)throw new Error("Order currency is required");if(typeof u.currency!="string")throw new Error("Order currency must be string");if(typeof u.amount!="number")throw new Error("Order amount must be number");o!=null&&o.start&&delete o.start,fo.defaults.params={params:p,cp_addon:t.addon};const h=(t.testnet?hde:fde).filter(x=>(x.wallets=t.wallets,t.networks.includes(x.id)));if(n.config.set("order",un(u)),n.config.set("networks",un(h)),t.init&&n.payment.setInit(un(t.init)),t.apiUrl)n.payment.setAPI(new pde(n));else{if(!t.addresses)throw new Error("Addresses must be defined in config");n.payment.setAPI(new dde(n))}const v=document.getElementById(e);let m;v!=null&&v.shadowRoot?m=v.shadowRoot:m=v==null?void 0:v.attachShadow({mode:"open"});const f=new CSSStyleSheet,_=t.theme.style[t.theme.mode],g=` + `}),c=C(()=>2*Math.PI*a.value),d=C(()=>t.type==="dashboard"?.75:1),u=C(()=>`${-1*c.value*(1-d.value)/2}px`),p=C(()=>({strokeDasharray:`${c.value*d.value}px, ${c.value}px`,strokeDashoffset:u.value})),h=C(()=>({strokeDasharray:`${c.value*d.value*(t.percentage/100)}px, ${c.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),v=C(()=>{let w;return t.color?w=y(t.percentage):w=o[t.status]||o.default,w}),m=C(()=>t.status==="warning"?vc:t.type==="line"?t.status==="success"?Ad:hn:t.status==="success"?Li:Jr),f=C(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),_=C(()=>t.format(t.percentage));function g(w){const x=100/w.length;return w.map((T,L)=>ut(T)?{color:T,percentage:(L+1)*x}:T).sort((T,L)=>T.percentage-L.percentage)}const y=w=>{var x;const{color:$}=t;if(it($))return $(w);if(ut($))return $;{const T=g($);for(const L of T)if(L.percentage>w)return L.color;return(x=T[T.length-1])==null?void 0:x.color}};return(w,x)=>(b(),M("div",{class:O([s(r).b(),s(r).m(w.type),s(r).is(w.status),{[s(r).m("without-text")]:!w.showText,[s(r).m("text-inside")]:w.textInside}]),role:"progressbar","aria-valuenow":w.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[w.type==="line"?(b(),M("div",{key:0,class:O(s(r).b("bar"))},[E("div",{class:O(s(r).be("bar","outer")),style:Je({height:`${w.strokeWidth}px`})},[E("div",{class:O([s(r).be("bar","inner"),{[s(r).bem("bar","inner","indeterminate")]:w.indeterminate},{[s(r).bem("bar","inner","striped")]:w.striped},{[s(r).bem("bar","inner","striped-flow")]:w.stripedFlow}]),style:Je(s(l))},[(w.showText||w.$slots.default)&&w.textInside?(b(),M("div",{key:0,class:O(s(r).be("bar","innerText"))},[be(w.$slots,"default",{percentage:w.percentage},()=>[E("span",null,$e(s(_)),1)])],2)):se("v-if",!0)],6)],6)],2)):(b(),M("div",{key:1,class:O(s(r).b("circle")),style:Je({height:`${w.width}px`,width:`${w.width}px`})},[(b(),M("svg",Doe,[E("path",{class:O(s(r).be("circle","track")),d:s(i),stroke:`var(${s(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":w.strokeLinecap,"stroke-width":s(n),fill:"none",style:Je(s(p))},null,14,Hoe),E("path",{class:O(s(r).be("circle","path")),d:s(i),stroke:s(v),fill:"none",opacity:w.percentage?1:0,"stroke-linecap":w.strokeLinecap,"stroke-width":s(n),style:Je(s(h))},null,14,Foe)]))],6)),(w.showText||w.$slots.default)&&!w.textInside?(b(),M("div",{key:2,class:O(s(r).e("text")),style:Je({fontSize:`${s(f)}px`})},[be(w.$slots,"default",{percentage:w.percentage},()=>[w.status?(b(),he(s(Ze),{key:1},{default:le(()=>[(b(),he(Et(s(m))))]),_:1})):(b(),M("span",joe,$e(s(_)),1))])],6)):se("v-if",!0)],10,Voe))}});var Uoe=Le(Koe,[["__file","progress.vue"]]);const Gy=yt(Uoe),Woe=Pe({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:ue([Array,Object]),default:()=>uo(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:ue([Array,Object]),default:()=>[hc,hc,hc]},voidIcon:{type:Xt,default:()=>Y3},disabledVoidIcon:{type:Xt,default:()=>hc},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:ue(Array),default:()=>uo(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Oo,label:{type:String,default:void 0},clearable:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),qoe={[ro]:e=>st(e),[St]:e=>st(e)},Yoe=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],Goe=["onMousemove","onClick"],Xoe=N({...N({name:"ElRate"}),props:Woe,emits:qoe,setup(e,{expose:t,emit:o}){const r=e;function l(H,j){const K=oe=>xt(oe),I=Object.keys(j).map(oe=>+oe).filter(oe=>{const ne=j[oe];return(K(ne)?ne.excluded:!1)?Hoe-ne),U=j[I[0]];return K(U)&&U.value||U}const n=Ge(Ka,void 0),a=Ge(Hl,void 0),i=So(),c=ze("rate"),{inputId:d,isLabeledByFormItem:u}=bl(r,{formItemContext:a}),p=D(r.modelValue),h=D(-1),v=D(!0),m=C(()=>[c.b(),c.m(i.value)]),f=C(()=>r.disabled||(n==null?void 0:n.disabled)),_=C(()=>c.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":x.value})),g=C(()=>{let H="";return r.showScore?H=r.scoreTemplate.replace(/\{\s*value\s*\}/,f.value?`${r.modelValue}`:`${p.value}`):r.showText&&(H=r.texts[Math.ceil(p.value)-1]),H}),y=C(()=>r.modelValue*100-Math.floor(r.modelValue)*100),w=C(()=>Ke(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),x=C(()=>{const H=l(p.value,w.value);return xt(H)?"":H}),$=C(()=>{let H="";return f.value?H=`${y.value}%`:r.allowHalf&&(H="50%"),{color:x.value,width:H}}),T=C(()=>{let H=Ke(r.icons)?[...r.icons]:{...r.icons};return H=Nn(H),Ke(H)?{[r.lowThreshold]:H[0],[r.highThreshold]:{value:H[1],excluded:!0},[r.max]:H[2]}:H}),L=C(()=>l(r.modelValue,T.value)),P=C(()=>f.value?ut(r.disabledVoidIcon)?r.disabledVoidIcon:Nn(r.disabledVoidIcon):ut(r.voidIcon)?r.voidIcon:Nn(r.voidIcon)),R=C(()=>l(p.value,T.value));function V(H){const j=f.value&&y.value>0&&H-1r.modelValue,K=r.allowHalf&&v.value&&H-.5<=p.value&&H>p.value;return j||K}function B(H){r.clearable&&H===r.modelValue&&(H=0),o(St,H),r.modelValue!==H&&o("change",H)}function F(H){f.value||(r.allowHalf&&v.value?B(p.value):B(H))}function Q(H){if(f.value)return;let j=p.value;const K=H.code;return K===lt.up||K===lt.right?(r.allowHalf?j+=.5:j+=1,H.stopPropagation(),H.preventDefault()):(K===lt.left||K===lt.down)&&(r.allowHalf?j-=.5:j-=1,H.stopPropagation(),H.preventDefault()),j=j<0?0:j,j=j>r.max?r.max:j,o(St,j),o("change",j),j}function J(H,j){if(!f.value){if(r.allowHalf&&j){let K=j.target;Xr(K,c.e("item"))&&(K=K.querySelector(`.${c.e("icon")}`)),(K.clientWidth===0||Xr(K,c.e("decimal")))&&(K=K.parentNode),v.value=j.offsetX*2<=K.clientWidth,p.value=v.value?H-.5:H}else p.value=H;h.value=H}}function Z(){f.value||(r.allowHalf&&(v.value=r.modelValue!==Math.floor(r.modelValue)),p.value=r.modelValue,h.value=-1)}return Se(()=>r.modelValue,H=>{p.value=H,v.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||o(St,0),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-rate",ref:"https://element-plus.org/en-US/component/rate.html"},C(()=>!!r.label)),t({setCurrentValue:J,resetCurrentValue:Z}),(H,j)=>{var K;return b(),M("div",{id:s(d),class:O([s(m),s(c).is("disabled",s(f))]),role:"slider","aria-label":s(u)?void 0:H.label||H.ariaLabel||"rating","aria-labelledby":s(u)?(K=s(a))==null?void 0:K.labelId:void 0,"aria-valuenow":p.value,"aria-valuetext":s(g)||void 0,"aria-valuemin":"0","aria-valuemax":H.max,tabindex:"0",style:Je(s(_)),onKeydown:Q},[(b(!0),M(Qe,null,It(H.max,(I,U)=>(b(),M("span",{key:U,class:O(s(c).e("item")),onMousemove:oe=>J(I,oe),onMouseleave:Z,onClick:oe=>F(I)},[te(s(Ze),{class:O([s(c).e("icon"),{hover:h.value===I},s(c).is("active",I<=p.value)])},{default:le(()=>[V(I)?se("v-if",!0):(b(),M(Qe,{key:0},[mt((b(),he(Et(s(R)),null,null,512)),[[Lt,I<=p.value]]),mt((b(),he(Et(s(P)),null,null,512)),[[Lt,!(I<=p.value)]])],64)),V(I)?(b(),M(Qe,{key:1},[(b(),he(Et(s(P)),{class:O([s(c).em("decimal","box")])},null,8,["class"])),te(s(Ze),{style:Je(s($)),class:O([s(c).e("icon"),s(c).e("decimal")])},{default:le(()=>[(b(),he(Et(s(L))))]),_:1},8,["style","class"])],64)):se("v-if",!0)]),_:2},1032,["class"])],42,Goe))),128)),H.showText||H.showScore?(b(),M("span",{key:0,class:O(s(c).e("text")),style:Je({color:H.textColor})},$e(s(g)),7)):se("v-if",!0)],46,Yoe)}}});var Zoe=Le(Xoe,[["__file","rate.vue"]]);const Joe=yt(Zoe),ns={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Xy={[ns.success]:O3,[ns.warning]:vc,[ns.error]:zd,[ns.info]:Id},Qoe=Pe({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),ere=N({...N({name:"ElResult"}),props:Qoe,setup(e){const t=e,o=ze("result"),r=C(()=>{const l=t.icon,n=l&&ns[l]?ns[l]:"icon-info",a=Xy[n]||Xy["icon-info"];return{class:n,component:a}});return(l,n)=>(b(),M("div",{class:O(s(o).b())},[E("div",{class:O(s(o).e("icon"))},[be(l.$slots,"icon",{},()=>[s(r).component?(b(),he(Et(s(r).component),{key:0,class:O(s(r).class)},null,8,["class"])):se("v-if",!0)])],2),l.title||l.$slots.title?(b(),M("div",{key:0,class:O(s(o).e("title"))},[be(l.$slots,"title",{},()=>[E("p",null,$e(l.title),1)])],2)):se("v-if",!0),l.subTitle||l.$slots["sub-title"]?(b(),M("div",{key:1,class:O(s(o).e("subtitle"))},[be(l.$slots,"sub-title",{},()=>[E("p",null,$e(l.subTitle),1)])],2)):se("v-if",!0),l.$slots.extra?(b(),M("div",{key:2,class:O(s(o).e("extra"))},[be(l.$slots,"extra")],2)):se("v-if",!0)],2))}});var tre=Le(ere,[["__file","result.vue"]]);const ore=yt(tre);var Zy=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function rre(e,t){return!!(e===t||Zy(e)&&Zy(t))}function lre(e,t){if(e.length!==t.length)return!1;for(var o=0;o{const t=wt().proxy.$props;return C(()=>{const o=(r,l,n)=>({});return t.perfMode?bd(o):nre(o)})},e2=50,Cp="itemRendered",Sp="scroll",as="forward",Ep="backward",ll="auto",Tp="smart",Dc="start",Kl="center",Hc="end",is="horizontal",t2="vertical",are="ltr",ss="rtl",Fc="negative",o2="positive-ascending",r2="positive-descending",ire={[is]:"left",[t2]:"top"},sre=20,cre={[is]:"deltaX",[t2]:"deltaY"},ure=({atEndEdge:e,atStartEdge:t,layout:o},r)=>{let l,n=0;const a=c=>c<0&&t.value||c>0&&e.value;return{hasReachedEdge:a,onWheel:c=>{Pa(l);const d=c[cre[o.value]];a(n)&&a(n+d)||(n+=d,a_()||c.preventDefault(),l=Xn(()=>{r(n),n=0}))}}},l2=vl({type:ue([Number,Function]),required:!0}),n2=vl({type:Number}),a2=vl({type:Number,default:2}),dre=vl({type:String,values:["ltr","rtl"],default:"ltr"}),i2=vl({type:Number,default:0}),$p=vl({type:Number,required:!0}),Qy=vl({type:String,values:["horizontal","vertical"],default:t2}),e8=Pe({className:{type:String,default:""},containerElement:{type:ue([String,Object]),default:"div"},data:{type:ue(Array),default:()=>uo([])},direction:dre,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:ue([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),t8=Pe({cache:a2,estimatedItemSize:n2,layout:Qy,initScrollOffset:i2,total:$p,itemSize:l2,...e8}),s2={type:Number,default:6},o8={type:Number,default:0},r8={type:Number,default:2},Ja=Pe({columnCache:a2,columnWidth:l2,estimatedColumnWidth:n2,estimatedRowHeight:n2,initScrollLeft:i2,initScrollTop:i2,itemKey:{type:ue(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:a2,rowHeight:l2,totalColumn:$p,totalRow:$p,hScrollbarSize:s2,vScrollbarSize:s2,scrollbarStartGap:o8,scrollbarEndGap:r8,role:String,...e8}),l8=Pe({alwaysOn:Boolean,class:String,layout:Qy,total:$p,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:s2,startGap:o8,endGap:r8,visible:Boolean}),Qa=(e,t)=>ee===are||e===ss||e===is,n8=e=>e===ss;let cs=null;function Mp(e=!1){if(cs===null||e){const t=document.createElement("div"),o=t.style;o.width="50px",o.height="50px",o.overflow="scroll",o.direction="rtl";const r=document.createElement("div"),l=r.style;return l.width="100px",l.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?cs=r2:(t.scrollLeft=1,t.scrollLeft===0?cs=Fc:cs=o2),document.body.removeChild(t),cs}return cs}function pre({move:e,size:t,bar:o},r){const l={},n=`translate${o.axis}(${e}px)`;return l[o.size]=t,l.transform=n,l.msTransform=n,l.webkitTransform=n,r==="horizontal"?l.height="100%":l.width="100%",l}const c2=N({name:"ElVirtualScrollBar",props:l8,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const o=C(()=>e.startGap+e.endGap),r=ze("virtual-scrollbar"),l=ze("scrollbar"),n=D(),a=D();let i=null,c=null;const d=Dt({isDragging:!1,traveled:0}),u=C(()=>m4[e.layout]),p=C(()=>e.clientSize-s(o)),h=C(()=>({position:"absolute",width:`${is===e.layout?p.value:e.scrollbarSize}px`,height:`${is===e.layout?e.scrollbarSize:p.value}px`,[ire[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),v=C(()=>{const T=e.ratio,L=e.clientSize;if(T>=100)return Number.POSITIVE_INFINITY;if(T>=50)return T*L/100;const P=L/3;return Math.floor(Math.min(Math.max(T*L,sre),P))}),m=C(()=>{if(!Number.isFinite(v.value))return{display:"none"};const T=`${v.value}px`;return pre({bar:u.value,size:T,move:d.traveled},e.layout)}),f=C(()=>Math.floor(e.clientSize-v.value-s(o))),_=()=>{window.addEventListener("mousemove",x),window.addEventListener("mouseup",w);const T=s(a);T&&(c=document.onselectstart,document.onselectstart=()=>!1,T.addEventListener("touchmove",x),T.addEventListener("touchend",w))},g=()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",w),document.onselectstart=c,c=null;const T=s(a);T&&(T.removeEventListener("touchmove",x),T.removeEventListener("touchend",w))},y=T=>{T.stopImmediatePropagation(),!(T.ctrlKey||[1,2].includes(T.button))&&(d.isDragging=!0,d[u.value.axis]=T.currentTarget[u.value.offset]-(T[u.value.client]-T.currentTarget.getBoundingClientRect()[u.value.direction]),t("start-move"),_())},w=()=>{d.isDragging=!1,d[u.value.axis]=0,t("stop-move"),g()},x=T=>{const{isDragging:L}=d;if(!L||!a.value||!n.value)return;const P=d[u.value.axis];if(!P)return;Pa(i);const R=(n.value.getBoundingClientRect()[u.value.direction]-T[u.value.client])*-1,V=a.value[u.value.offset]-P,B=R-V;i=Xn(()=>{d.traveled=Math.max(e.startGap,Math.min(B,f.value)),t("scroll",B,f.value)})},$=T=>{const L=Math.abs(T.target.getBoundingClientRect()[u.value.direction]-T[u.value.client]),P=a.value[u.value.offset]/2,R=L-P;d.traveled=Math.max(0,Math.min(R,f.value)),t("scroll",R,f.value)};return Se(()=>e.scrollFrom,T=>{d.isDragging||(d.traveled=Math.ceil(T*f.value))}),to(()=>{g()}),()=>rt("div",{role:"presentation",ref:n,class:[r.b(),e.class,(e.alwaysOn||d.isDragging)&&"always-on"],style:h.value,onMousedown:ct($,["stop","prevent"]),onTouchstartPrevent:y},rt("div",{ref:a,class:l.e("thumb"),style:m.value,onMousedown:y},[]))}}),a8=({name:e,getOffset:t,getItemSize:o,getItemOffset:r,getEstimatedTotalSize:l,getStartIndexForOffset:n,getStopIndexForStartIndex:a,initCache:i,clearCache:c,validateProps:d})=>N({name:e??"ElVirtualList",props:t8,emits:[Cp,Sp],setup(u,{emit:p,expose:h}){d(u);const v=wt(),m=ze("vl"),f=D(i(u,v)),_=Jy(),g=D(),y=D(),w=D(),x=D({isScrolling:!1,scrollDir:"forward",scrollOffset:st(u.initScrollOffset)?u.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:u.scrollbarAlwaysOn}),$=C(()=>{const{total:ce,cache:ee}=u,{isScrolling:Me,scrollDir:de,scrollOffset:_e}=s(x);if(ce===0)return[0,0,0,0];const me=n(u,_e,s(f)),Re=a(u,me,_e,s(f)),Ce=!Me||de===Ep?Math.max(1,ee):1,Ee=!Me||de===as?Math.max(1,ee):1;return[Math.max(0,me-Ce),Math.max(0,Math.min(ce-1,Re+Ee)),me,Re]}),T=C(()=>l(u,s(f))),L=C(()=>jc(u.layout)),P=C(()=>[{position:"relative",[`overflow-${L.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:u.direction,height:st(u.height)?`${u.height}px`:u.height,width:st(u.width)?`${u.width}px`:u.width},u.style]),R=C(()=>{const ce=s(T),ee=s(L);return{height:ee?"100%":`${ce}px`,pointerEvents:s(x).isScrolling?"none":void 0,width:ee?`${ce}px`:"100%"}}),V=C(()=>L.value?u.width:u.height),{onWheel:B}=ure({atStartEdge:C(()=>x.value.scrollOffset<=0),atEndEdge:C(()=>x.value.scrollOffset>=T.value),layout:C(()=>u.layout)},ce=>{var ee,Me;(Me=(ee=w.value).onMouseUp)==null||Me.call(ee),j(Math.min(x.value.scrollOffset+ce,T.value-V.value))}),F=()=>{const{total:ce}=u;if(ce>0){const[_e,me,Re,Ce]=s($);p(Cp,_e,me,Re,Ce)}const{scrollDir:ee,scrollOffset:Me,updateRequested:de}=s(x);p(Sp,ee,Me,de)},Q=ce=>{const{clientHeight:ee,scrollHeight:Me,scrollTop:de}=ce.currentTarget,_e=s(x);if(_e.scrollOffset===de)return;const me=Math.max(0,Math.min(de,Me-ee));x.value={..._e,isScrolling:!0,scrollDir:Qa(_e.scrollOffset,me),scrollOffset:me,updateRequested:!1},et(U)},J=ce=>{const{clientWidth:ee,scrollLeft:Me,scrollWidth:de}=ce.currentTarget,_e=s(x);if(_e.scrollOffset===Me)return;const{direction:me}=u;let Re=Me;if(me===ss)switch(Mp()){case Fc:{Re=-Me;break}case r2:{Re=de-ee-Me;break}}Re=Math.max(0,Math.min(Re,de-ee)),x.value={..._e,isScrolling:!0,scrollDir:Qa(_e.scrollOffset,Re),scrollOffset:Re,updateRequested:!1},et(U)},Z=ce=>{s(L)?J(ce):Q(ce),F()},H=(ce,ee)=>{const Me=(T.value-V.value)/ee*ce;j(Math.min(T.value-V.value,Me))},j=ce=>{ce=Math.max(ce,0),ce!==s(x).scrollOffset&&(x.value={...s(x),scrollOffset:ce,scrollDir:Qa(s(x).scrollOffset,ce),updateRequested:!0},et(U))},K=(ce,ee=ll)=>{const{scrollOffset:Me}=s(x);ce=Math.max(0,Math.min(ce,u.total-1)),j(t(u,ce,ee,Me,s(f)))},I=ce=>{const{direction:ee,itemSize:Me,layout:de}=u,_e=_.value(c&&Me,c&&de,c&&ee);let me;if(Pt(_e,String(ce)))me=_e[ce];else{const Re=r(u,ce,s(f)),Ce=o(u,ce,s(f)),Ee=s(L),De=ee===ss,ae=Ee?Re:0;_e[ce]=me={position:"absolute",left:De?void 0:`${ae}px`,right:De?`${ae}px`:void 0,top:Ee?0:`${Re}px`,height:Ee?"100%":`${Ce}px`,width:Ee?`${Ce}px`:"100%"}}return me},U=()=>{x.value.isScrolling=!1,et(()=>{_.value(-1,null,null)})},oe=()=>{const ce=g.value;ce&&(ce.scrollTop=0)};ft(()=>{if(!Nt)return;const{initScrollOffset:ce}=u,ee=s(g);st(ce)&&ee&&(s(L)?ee.scrollLeft=ce:ee.scrollTop=ce),F()}),rn(()=>{const{direction:ce,layout:ee}=u,{scrollOffset:Me,updateRequested:de}=s(x),_e=s(g);if(de&&_e)if(ee===is)if(ce===ss)switch(Mp()){case Fc:{_e.scrollLeft=-Me;break}case o2:{_e.scrollLeft=Me;break}default:{const{clientWidth:me,scrollWidth:Re}=_e;_e.scrollLeft=Re-me-Me;break}}else _e.scrollLeft=Me;else _e.scrollTop=Me});const ne={ns:m,clientSize:V,estimatedTotalSize:T,windowStyle:P,windowRef:g,innerRef:y,innerStyle:R,itemsToRender:$,scrollbarRef:w,states:x,getItemStyle:I,onScroll:Z,onScrollbarScroll:H,onWheel:B,scrollTo:j,scrollToItem:K,resetScrollTop:oe};return h({windowRef:g,innerRef:y,getItemStyleCache:_,scrollTo:j,scrollToItem:K,resetScrollTop:oe,states:x}),ne},render(u){var p;const{$slots:h,className:v,clientSize:m,containerElement:f,data:_,getItemStyle:g,innerElement:y,itemsToRender:w,innerStyle:x,layout:$,total:T,onScroll:L,onScrollbarScroll:P,onWheel:R,states:V,useIsScrolling:B,windowStyle:F,ns:Q}=u,[J,Z]=w,H=Et(f),j=Et(y),K=[];if(T>0)for(let ne=J;ne<=Z;ne++)K.push((p=h.default)==null?void 0:p.call(h,{data:_,key:ne,index:ne,isScrolling:B?V.isScrolling:void 0,style:g(ne)}));const I=[rt(j,{style:x,ref:"innerRef"},ut(j)?K:{default:()=>K})],U=rt(c2,{ref:"scrollbarRef",clientSize:m,layout:$,onScroll:P,ratio:m*100/this.estimatedTotalSize,scrollFrom:V.scrollOffset/(this.estimatedTotalSize-m),total:T}),oe=rt(H,{class:[Q.e("window"),v],style:F,onScroll:L,onWheel:R,ref:"windowRef",key:0},ut(H)?[I]:{default:()=>[I]});return rt("div",{key:0,class:[Q.e("wrapper"),V.scrollbarAlwaysOn?"always-on":""]},[oe,U])}}),i8=a8({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:o,layout:r,width:l},n,a,i)=>{const c=jc(r)?l:e,d=Math.max(0,t*o-c),u=Math.min(d,n*o),p=Math.max(0,(n+1)*o-c);switch(a===Tp&&(i>=p-c&&i<=u+c?a=ll:a=Kl),a){case Dc:return u;case Hc:return p;case Kl:{const h=Math.round(p+(u-p)/2);return hd+Math.floor(c/2)?d:h}case ll:default:return i>=p&&i<=u?i:iMath.max(0,Math.min(e-1,Math.floor(o/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:o,layout:r,width:l},n,a)=>{const i=n*o,c=jc(r)?l:e,d=Math.ceil((c+a-i)/o);return Math.max(0,Math.min(t-1,n+d-1))},initCache(){},clearCache:!0,validateProps(){}}),us=(e,t,o)=>{const{itemSize:r}=e,{items:l,lastVisitedIndex:n}=o;if(t>n){let a=0;if(n>=0){const i=l[n];a=i.offset+i.size}for(let i=n+1;i<=t;i++){const c=r(i);l[i]={offset:a,size:c},a+=c}o.lastVisitedIndex=t}return l[t]},fre=(e,t,o)=>{const{items:r,lastVisitedIndex:l}=t;return(l>0?r[l].offset:0)>=o?s8(e,t,0,l,o):hre(e,t,Math.max(0,l),o)},s8=(e,t,o,r,l)=>{for(;o<=r;){const n=o+Math.floor((r-o)/2),a=us(e,n,t).offset;if(a===l)return n;al&&(r=n-1)}return Math.max(0,o-1)},hre=(e,t,o,r)=>{const{total:l}=e;let n=1;for(;o{let l=0;if(r>=e&&(r=e-1),r>=0){const i=t[r];l=i.offset+i.size}const a=(e-r-1)*o;return l+a},vre=a8({name:"ElDynamicSizeList",getItemOffset:(e,t,o)=>us(e,t,o).offset,getItemSize:(e,t,{items:o})=>o[t].size,getEstimatedTotalSize:c8,getOffset:(e,t,o,r,l)=>{const{height:n,layout:a,width:i}=e,c=jc(a)?i:n,d=us(e,t,l),u=c8(e,l),p=Math.max(0,Math.min(u-c,d.offset)),h=Math.max(0,d.offset-c+d.size);switch(o===Tp&&(r>=h-c&&r<=p+c?o=ll:o=Kl),o){case Dc:return p;case Hc:return h;case Kl:return Math.round(h+(p-h)/2);case ll:default:return r>=h&&r<=p?r:rfre(e,o,t),getStopIndexForStartIndex:(e,t,o,r)=>{const{height:l,total:n,layout:a,width:i}=e,c=jc(a)?i:l,d=us(e,t,r),u=o+c;let p=d.offset+d.size,h=t;for(;h{var n,a;o.lastVisitedIndex=Math.min(o.lastVisitedIndex,r-1),(n=t.exposed)==null||n.getItemStyleCache(-1),l&&((a=t.proxy)==null||a.$forceUpdate())},o},clearCache:!1,validateProps:({itemSize:e})=>{}}),mre=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:o,atYStartEdge:r},l)=>{let n=null,a=0,i=0;const c=(u,p)=>{const h=u<=0&&t.value||u>=0&&e.value,v=p<=0&&r.value||p>=0&&o.value;return h&&v};return{hasReachedEdge:c,onWheel:u=>{Pa(n);let p=u.deltaX,h=u.deltaY;Math.abs(p)>Math.abs(h)?h=0:p=0,u.shiftKey&&h!==0&&(p=h,h=0),!(c(a,i)&&c(a+p,i+h))&&(a+=p,i+=h,u.preventDefault(),n=Xn(()=>{l(a,i),a=0,i=0}))}}},u8=({name:e,clearCache:t,getColumnPosition:o,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:l,getEstimatedTotalHeight:n,getEstimatedTotalWidth:a,getColumnOffset:i,getRowOffset:c,getRowPosition:d,getRowStartIndexForOffset:u,getRowStopIndexForStartIndex:p,initCache:h,injectToInstance:v,validateProps:m})=>N({name:e??"ElVirtualList",props:Ja,emits:[Cp,Sp],setup(f,{emit:_,expose:g,slots:y}){const w=ze("vl");m(f);const x=wt(),$=D(h(f,x));v==null||v(x,$);const T=D(),L=D(),P=D(),R=D(null),V=D({isScrolling:!1,scrollLeft:st(f.initScrollLeft)?f.initScrollLeft:0,scrollTop:st(f.initScrollTop)?f.initScrollTop:0,updateRequested:!1,xAxisScrollDir:as,yAxisScrollDir:as}),B=Jy(),F=C(()=>Number.parseInt(`${f.height}`,10)),Q=C(()=>Number.parseInt(`${f.width}`,10)),J=C(()=>{const{totalColumn:we,totalRow:Te,columnCache:Ne}=f,{isScrolling:Ie,xAxisScrollDir:Ae,scrollLeft:xe}=s(V);if(we===0||Te===0)return[0,0,0,0];const We=r(f,xe,s($)),qe=l(f,We,xe,s($)),ye=!Ie||Ae===Ep?Math.max(1,Ne):1,Ye=!Ie||Ae===as?Math.max(1,Ne):1;return[Math.max(0,We-ye),Math.max(0,Math.min(we-1,qe+Ye)),We,qe]}),Z=C(()=>{const{totalColumn:we,totalRow:Te,rowCache:Ne}=f,{isScrolling:Ie,yAxisScrollDir:Ae,scrollTop:xe}=s(V);if(we===0||Te===0)return[0,0,0,0];const We=u(f,xe,s($)),qe=p(f,We,xe,s($)),ye=!Ie||Ae===Ep?Math.max(1,Ne):1,Ye=!Ie||Ae===as?Math.max(1,Ne):1;return[Math.max(0,We-ye),Math.max(0,Math.min(Te-1,qe+Ye)),We,qe]}),H=C(()=>n(f,s($))),j=C(()=>a(f,s($))),K=C(()=>{var we;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:f.direction,height:st(f.height)?`${f.height}px`:f.height,width:st(f.width)?`${f.width}px`:f.width},(we=f.style)!=null?we:{}]}),I=C(()=>{const we=`${s(j)}px`;return{height:`${s(H)}px`,pointerEvents:s(V).isScrolling?"none":void 0,width:we}}),U=()=>{const{totalColumn:we,totalRow:Te}=f;if(we>0&&Te>0){const[qe,ye,Ye,tt]=s(J),[pt,dt,Y,S]=s(Z);_(Cp,{columnCacheStart:qe,columnCacheEnd:ye,rowCacheStart:pt,rowCacheEnd:dt,columnVisibleStart:Ye,columnVisibleEnd:tt,rowVisibleStart:Y,rowVisibleEnd:S})}const{scrollLeft:Ne,scrollTop:Ie,updateRequested:Ae,xAxisScrollDir:xe,yAxisScrollDir:We}=s(V);_(Sp,{xAxisScrollDir:xe,scrollLeft:Ne,yAxisScrollDir:We,scrollTop:Ie,updateRequested:Ae})},oe=we=>{const{clientHeight:Te,clientWidth:Ne,scrollHeight:Ie,scrollLeft:Ae,scrollTop:xe,scrollWidth:We}=we.currentTarget,qe=s(V);if(qe.scrollTop===xe&&qe.scrollLeft===Ae)return;let ye=Ae;if(n8(f.direction))switch(Mp()){case Fc:ye=-Ae;break;case r2:ye=We-Ne-Ae;break}V.value={...qe,isScrolling:!0,scrollLeft:ye,scrollTop:Math.max(0,Math.min(xe,Ie-Te)),updateRequested:!0,xAxisScrollDir:Qa(qe.scrollLeft,ye),yAxisScrollDir:Qa(qe.scrollTop,xe)},et(()=>me()),Re(),U()},ne=(we,Te)=>{const Ne=s(F),Ie=(H.value-Ne)/Te*we;Me({scrollTop:Math.min(H.value-Ne,Ie)})},ce=(we,Te)=>{const Ne=s(Q),Ie=(j.value-Ne)/Te*we;Me({scrollLeft:Math.min(j.value-Ne,Ie)})},{onWheel:ee}=mre({atXStartEdge:C(()=>V.value.scrollLeft<=0),atXEndEdge:C(()=>V.value.scrollLeft>=j.value-s(Q)),atYStartEdge:C(()=>V.value.scrollTop<=0),atYEndEdge:C(()=>V.value.scrollTop>=H.value-s(F))},(we,Te)=>{var Ne,Ie,Ae,xe;(Ie=(Ne=L.value)==null?void 0:Ne.onMouseUp)==null||Ie.call(Ne),(xe=(Ae=P.value)==null?void 0:Ae.onMouseUp)==null||xe.call(Ae);const We=s(Q),qe=s(F);Me({scrollLeft:Math.min(V.value.scrollLeft+we,j.value-We),scrollTop:Math.min(V.value.scrollTop+Te,H.value-qe)})}),Me=({scrollLeft:we=V.value.scrollLeft,scrollTop:Te=V.value.scrollTop})=>{we=Math.max(we,0),Te=Math.max(Te,0);const Ne=s(V);Te===Ne.scrollTop&&we===Ne.scrollLeft||(V.value={...Ne,xAxisScrollDir:Qa(Ne.scrollLeft,we),yAxisScrollDir:Qa(Ne.scrollTop,Te),scrollLeft:we,scrollTop:Te,updateRequested:!0},et(()=>me()),Re(),U())},de=(we=0,Te=0,Ne=ll)=>{const Ie=s(V);Te=Math.max(0,Math.min(Te,f.totalColumn-1)),we=Math.max(0,Math.min(we,f.totalRow-1));const Ae=E3(w.namespace.value),xe=s($),We=n(f,xe),qe=a(f,xe);Me({scrollLeft:i(f,Te,Ne,Ie.scrollLeft,xe,qe>f.width?Ae:0),scrollTop:c(f,we,Ne,Ie.scrollTop,xe,We>f.height?Ae:0)})},_e=(we,Te)=>{const{columnWidth:Ne,direction:Ie,rowHeight:Ae}=f,xe=B.value(t&&Ne,t&&Ae,t&&Ie),We=`${we},${Te}`;if(Pt(xe,We))return xe[We];{const[,qe]=o(f,Te,s($)),ye=s($),Ye=n8(Ie),[tt,pt]=d(f,we,ye),[dt]=o(f,Te,ye);return xe[We]={position:"absolute",left:Ye?void 0:`${qe}px`,right:Ye?`${qe}px`:void 0,top:`${pt}px`,height:`${tt}px`,width:`${dt}px`},xe[We]}},me=()=>{V.value.isScrolling=!1,et(()=>{B.value(-1,null,null)})};ft(()=>{if(!Nt)return;const{initScrollLeft:we,initScrollTop:Te}=f,Ne=s(T);Ne&&(st(we)&&(Ne.scrollLeft=we),st(Te)&&(Ne.scrollTop=Te)),U()});const Re=()=>{const{direction:we}=f,{scrollLeft:Te,scrollTop:Ne,updateRequested:Ie}=s(V),Ae=s(T);if(Ie&&Ae){if(we===ss)switch(Mp()){case Fc:{Ae.scrollLeft=-Te;break}case o2:{Ae.scrollLeft=Te;break}default:{const{clientWidth:xe,scrollWidth:We}=Ae;Ae.scrollLeft=We-xe-Te;break}}else Ae.scrollLeft=Math.max(0,Te);Ae.scrollTop=Math.max(0,Ne)}},{resetAfterColumnIndex:Ce,resetAfterRowIndex:Ee,resetAfter:De}=x.proxy;g({windowRef:T,innerRef:R,getItemStyleCache:B,scrollTo:Me,scrollToItem:de,states:V,resetAfterColumnIndex:Ce,resetAfterRowIndex:Ee,resetAfter:De});const ae=()=>{const{scrollbarAlwaysOn:we,scrollbarStartGap:Te,scrollbarEndGap:Ne,totalColumn:Ie,totalRow:Ae}=f,xe=s(Q),We=s(F),qe=s(j),ye=s(H),{scrollLeft:Ye,scrollTop:tt}=s(V),pt=rt(c2,{ref:L,alwaysOn:we,startGap:Te,endGap:Ne,class:w.e("horizontal"),clientSize:xe,layout:"horizontal",onScroll:ce,ratio:xe*100/qe,scrollFrom:Ye/(qe-xe),total:Ae,visible:!0}),dt=rt(c2,{ref:P,alwaysOn:we,startGap:Te,endGap:Ne,class:w.e("vertical"),clientSize:We,layout:"vertical",onScroll:ne,ratio:We*100/ye,scrollFrom:tt/(ye-We),total:Ie,visible:!0});return{horizontalScrollbar:pt,verticalScrollbar:dt}},pe=()=>{var we;const[Te,Ne]=s(J),[Ie,Ae]=s(Z),{data:xe,totalColumn:We,totalRow:qe,useIsScrolling:ye,itemKey:Ye}=f,tt=[];if(qe>0&&We>0)for(let pt=Ie;pt<=Ae;pt++)for(let dt=Te;dt<=Ne;dt++)tt.push((we=y.default)==null?void 0:we.call(y,{columnIndex:dt,data:xe,key:Ye({columnIndex:dt,data:xe,rowIndex:pt}),isScrolling:ye?s(V).isScrolling:void 0,style:_e(pt,dt),rowIndex:pt}));return tt},ke=()=>{const we=Et(f.innerElement),Te=pe();return[rt(we,{style:s(I),ref:R},ut(we)?Te:{default:()=>Te})]};return()=>{const we=Et(f.containerElement),{horizontalScrollbar:Te,verticalScrollbar:Ne}=ae(),Ie=ke();return rt("div",{key:0,class:w.e("wrapper"),role:f.role},[rt(we,{class:f.className,style:s(K),onScroll:oe,onWheel:ee,ref:T},ut(we)?Ie:{default:()=>Ie}),Te,Ne])}}}),gre=u8({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:o},r,l,n,a,i)=>{o=Number(o);const c=Math.max(0,e*t-o),d=Math.min(c,r*t),u=Math.max(0,r*t-o+i+t);switch(l==="smart"&&(n>=u-o&&n<=d+o?l=ll:l=Kl),l){case Dc:return d;case Hc:return u;case Kl:{const p=Math.round(u+(d-u)/2);return pc+Math.floor(o/2)?c:p}case ll:default:return n>=u&&n<=d?n:u>d||n{t=Number(t);const c=Math.max(0,o*e-t),d=Math.min(c,r*e),u=Math.max(0,r*e-t+i+e);switch(l===Tp&&(n>=u-t&&n<=d+t?l=ll:l=Kl),l){case Dc:return d;case Hc:return u;case Kl:{const p=Math.round(u+(d-u)/2);return pc+Math.floor(t/2)?c:p}case ll:default:return n>=u&&n<=d?n:u>d||nMath.max(0,Math.min(t-1,Math.floor(o/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:o},r,l)=>{const n=r*e,a=Math.ceil((o+l-n)/e);return Math.max(0,Math.min(t-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},o)=>Math.max(0,Math.min(t-1,Math.floor(o/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:o},r,l)=>{const n=r*e,a=Math.ceil((o+l-n)/e);return Math.max(0,Math.min(t-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),{max:Ap,min:d8,floor:p8}=Math,bre={column:"columnWidth",row:"rowHeight"},u2={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},kn=(e,t,o,r)=>{const[l,n,a]=[o[r],e[bre[r]],o[u2[r]]];if(t>a){let i=0;if(a>=0){const c=l[a];i=c.offset+c.size}for(let c=a+1;c<=t;c++){const d=n(c);l[c]={offset:i,size:d},i+=d}o[u2[r]]=t}return l[t]},f8=(e,t,o,r,l,n)=>{for(;o<=r;){const a=o+p8((r-o)/2),i=kn(e,a,t,n).offset;if(i===l)return a;i{const n=l==="column"?e.totalColumn:e.totalRow;let a=1;for(;o{const[l,n]=[t[r],t[u2[r]]];return(n>0?l[n].offset:0)>=o?f8(e,t,0,n,o,r):_re(e,t,Ap(0,n),o,r)},v8=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:o,row:r})=>{let l=0;if(o>=e&&(o=e-1),o>=0){const i=r[o];l=i.offset+i.size}const a=(e-o-1)*t;return l+a},m8=({totalColumn:e},{column:t,estimatedColumnWidth:o,lastVisitedColumnIndex:r})=>{let l=0;if(r>e&&(r=e-1),r>=0){const i=t[r];l=i.offset+i.size}const a=(e-r-1)*o;return l+a},wre={column:m8,row:v8},g8=(e,t,o,r,l,n,a)=>{const[i,c]=[n==="row"?e.height:e.width,wre[n]],d=kn(e,t,l,n),u=c(e,l),p=Ap(0,d8(u-i,d.offset)),h=Ap(0,d.offset-i+a+d.size);switch(o===Tp&&(r>=h-i&&r<=p+i?o=ll:o=Kl),o){case Dc:return p;case Hc:return h;case Kl:return Math.round(h+(p-h)/2);case ll:default:return r>=h&&r<=p?r:h>p||r{const r=kn(e,t,o,"column");return[r.size,r.offset]},getRowPosition:(e,t,o)=>{const r=kn(e,t,o,"row");return[r.size,r.offset]},getColumnOffset:(e,t,o,r,l,n)=>g8(e,t,o,r,l,"column",n),getRowOffset:(e,t,o,r,l,n)=>g8(e,t,o,r,l,"row",n),getColumnStartIndexForOffset:(e,t,o)=>h8(e,o,t,"column"),getColumnStopIndexForStartIndex:(e,t,o,r)=>{const l=kn(e,t,r,"column"),n=o+e.width;let a=l.offset+l.size,i=t;for(;ih8(e,o,t,"row"),getRowStopIndexForStartIndex:(e,t,o,r)=>{const{totalRow:l,height:n}=e,a=kn(e,t,r,"row"),i=o+n;let c=a.size+a.offset,d=t;for(;d{const o=({columnIndex:n,rowIndex:a},i)=>{var c,d;i=ko(i)?!0:i,st(n)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,n-1)),st(a)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,a-1)),(c=e.exposed)==null||c.getItemStyleCache.value(-1,null,null),i&&((d=e.proxy)==null||d.$forceUpdate())},r=(n,a)=>{o({columnIndex:n},a)},l=(n,a)=>{o({rowIndex:n},a)};Object.assign(e.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:l,resetAfter:o})},initCache:({estimatedColumnWidth:e=e2,estimatedRowHeight:t=e2})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),xre=N({props:{item:{type:Object,required:!0},style:Object,height:Number},setup(){return{ns:ze("select")}}});function kre(e,t,o,r,l,n){return b(),M("div",{class:O(e.ns.be("group","title")),style:Je([e.style,{lineHeight:`${e.height}px`}])},$e(e.item.label),7)}var Cre=Le(xre,[["render",kre],["__file","group-item.vue"]]);function Sre(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}const b8={label:"label",value:"value",disabled:"disabled",options:"options"};function zp(e){const t=C(()=>({...b8,...e.props}));return{aliasProps:t,getLabel:a=>wo(a,t.value.label),getValue:a=>wo(a,t.value.value),getDisabled:a=>wo(a,t.value.disabled),getOptions:a=>wo(a,t.value.options)}}const Ere=Pe({allowCreate:Boolean,autocomplete:{type:ue(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Xt,default:hn},effect:{type:ue(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:ue([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:ue(Array),required:!0},placeholder:{type:String},teleported:Uo.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:ue(Object),default:()=>({})},remote:Boolean,size:Oo,props:{type:ue(Object),default:()=>b8},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},placement:{type:ue(String),values:Va,default:"bottom-start"},fallbackPlacements:{type:ue(Array),default:["bottom-start","top-start","right","left"]},tagType:{...fp.type,default:"info"},...Xi,...Zo(["ariaLabel"])}),Tre=Pe({data:Array,disabled:Boolean,hovering:Boolean,item:{type:ue(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),d2=Symbol("ElSelectV2Injection"),$re=N({props:Tre,emits:["select","hover"],setup(e,{emit:t}){const o=Ge(d2),r=ze("select"),{hoverItem:l,selectOptionClick:n}=Sre(e,{emit:t}),{getLabel:a}=zp(o.props);return{ns:r,hoverItem:l,selectOptionClick:n,getLabel:a}}}),Mre=["aria-selected"];function Are(e,t,o,r,l,n){return b(),M("li",{"aria-selected":e.selected,style:Je(e.style),class:O([e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]),onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=ct((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[be(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[E("span",null,$e(e.getLabel(e.item)),1)])],46,Mre)}var zre=Le($re,[["render",Are],["__file","option-item.vue"]]),Ire=N({name:"ElSelectDropdown",props:{loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number},setup(e,{slots:t,expose:o}){const r=Ge(d2),l=ze("select"),{getLabel:n,getValue:a,getDisabled:i}=zp(r.props),c=D([]),d=D(),u=C(()=>e.data.length);Se(()=>u.value,()=>{var B,F;(F=(B=r.tooltipRef.value).updatePopper)==null||F.call(B)});const p=C(()=>ko(r.props.estimatedOptionHeight)),h=C(()=>p.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:B=>c.value[B]}),v=(B=[],F)=>{const{props:{valueKey:Q}}=r;return xt(F)?B&&B.some(J=>Kt(wo(J,Q))===wo(F,Q)):B.includes(F)},m=(B,F)=>{if(xt(F)){const{valueKey:Q}=r.props;return wo(B,Q)===wo(F,Q)}else return B===F},f=(B,F)=>r.props.multiple?v(B,a(F)):m(B,a(F)),_=(B,F)=>{const{disabled:Q,multiple:J,multipleLimit:Z}=r.props;return Q||!F&&(J?Z>0&&B.length>=Z:!1)},g=B=>e.hoveringIndex===B;o({listRef:d,isSized:p,isItemDisabled:_,isItemHovering:g,isItemSelected:f,scrollToItem:B=>{const F=d.value;F&&F.scrollToItem(B)},resetScrollTop:()=>{const B=d.value;B&&B.resetScrollTop()}});const x=B=>{const{index:F,data:Q,style:J}=B,Z=s(p),{itemSize:H,estimatedSize:j}=s(h),{modelValue:K}=r.props,{onSelect:I,onHover:U}=r,oe=Q[F];if(oe.type==="Group")return te(Cre,{item:oe,style:J,height:Z?H:j},null);const ne=f(K,oe),ce=_(K,ne),ee=g(F);return te(zre,Mt(B,{selected:ne,disabled:i(oe)||ce,created:!!oe.created,hovering:ee,item:oe,onSelect:I,onHover:U}),{default:Me=>{var de;return((de=t.default)==null?void 0:de.call(t,Me))||te("span",null,[n(oe)])}})},{onKeyboardNavigate:$,onKeyboardSelect:T}=r,L=()=>{$("forward")},P=()=>{$("backward")},R=()=>{r.expanded=!1},V=B=>{const{code:F}=B,{tab:Q,esc:J,down:Z,up:H,enter:j}=lt;switch(F!==Q&&(B.preventDefault(),B.stopPropagation()),F){case Q:case J:{R();break}case Z:{L();break}case H:{P();break}case j:{T();break}}};return()=>{var B,F,Q,J;const{data:Z,width:H}=e,{height:j,multiple:K,scrollbarAlwaysOn:I}=r.props,U=s(p)?i8:vre;return te("div",{class:[l.b("dropdown"),l.is("multiple",K)],style:{width:`${H}px`}},[(B=t.header)==null?void 0:B.call(t),((F=t.loading)==null?void 0:F.call(t))||((Q=t.empty)==null?void 0:Q.call(t))||te(U,Mt({ref:d},s(h),{className:l.be("dropdown","list"),scrollbarAlwaysOn:I,data:Z,height:j,width:H,total:Z.length,onKeydown:V}),{default:oe=>te(x,oe,null)}),(J=t.footer)==null?void 0:J.call(t)])}}});function Ore(e,t){const{aliasProps:o,getLabel:r,getValue:l}=zp(e),n=D(0),a=D(null),i=C(()=>e.allowCreate&&e.filterable);function c(v){const m=f=>r(f)===v;return e.options&&e.options.some(m)||t.createdOptions.some(m)}function d(v){i.value&&(e.multiple&&v.created?n.value++:a.value=v)}function u(v){if(i.value)if(v&&v.length>0){if(c(v))return;const m={[o.value.value]:v,[o.value.label]:v,created:!0,[o.value.disabled]:!1};t.createdOptions.length>=n.value?t.createdOptions[n.value]=m:t.createdOptions.push(m)}else if(e.multiple)t.createdOptions.length=n.value;else{const m=a.value;t.createdOptions.length=0,m&&m.created&&t.createdOptions.push(m)}}function p(v){if(!i.value||!v||!v.created||v.created&&e.reserveKeyword&&t.inputValue===r(v))return;const m=t.createdOptions.findIndex(f=>l(f)===l(v));~m&&(t.createdOptions.splice(m,1),n.value--)}function h(){i.value&&(t.createdOptions.length=0,n.value=0)}return{createNewOption:u,removeNewOption:p,selectNewOption:d,clearAllNewOption:h}}const Nre=11,Pre=(e,t)=>{const{t:o}=Rt(),r=ze("select"),l=ze("input"),{form:n,formItem:a}=sr(),{inputId:i}=bl(e,{formItemContext:a}),{aliasProps:c,getLabel:d,getValue:u,getDisabled:p,getOptions:h}=zp(e),{valueOnClear:v,isEmptyValue:m}=Ud(e),f=Dt({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),_=D(-1),g=D(null),y=D(null),w=D(null),x=D(null),$=D(null),T=D(null),L=D(null),P=D(null),R=D(null),V=D(null),B=D(null),{wrapperRef:F,isFocused:Q,handleFocus:J,handleBlur:Z}=Kd($,{afterFocus(){e.automaticDropdown&&!K.value&&(K.value=!0,f.menuVisibleOnFocus=!0)},beforeBlur(Be){var vt,Ot;return((vt=w.value)==null?void 0:vt.isFocusInsideContent(Be))||((Ot=x.value)==null?void 0:Ot.isFocusInsideContent(Be))},afterBlur(){K.value=!1,f.menuVisibleOnFocus=!1}}),H=D([]),j=D([]),K=D(!1),I=C(()=>e.disabled||(n==null?void 0:n.disabled)),U=C(()=>{const Be=j.value.length*e.itemHeight;return Be>e.height?e.height:Be}),oe=C(()=>e.multiple?Ke(e.modelValue)&&e.modelValue.length>0:!m(e.modelValue)),ne=C(()=>e.clearable&&!I.value&&f.inputHovering&&oe.value),ce=C(()=>e.remote&&e.filterable?"":Pl),ee=C(()=>ce.value&&r.is("reverse",K.value)),Me=C(()=>(a==null?void 0:a.validateState)||""),de=C(()=>bh[Me.value]),_e=C(()=>e.remote?300:0),me=C(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!f.inputValue&&H.value.length===0?!1:e.filterable&&f.inputValue&&H.value.length>0&&j.value.length===0?e.noMatchText||o("el.select.noMatch"):H.value.length===0?e.noDataText||o("el.select.noData"):null),Re=Be=>{const vt=Ot=>{if(e.filterable&&it(e.filterMethod)||e.filterable&&e.remote&&it(e.remoteMethod))return!0;const Wt=new RegExp(sh(Be),"i");return Be?Wt.test(d(Ot)||""):!0};return e.loading?[]:[...f.createdOptions,...e.options].reduce((Ot,Wt)=>{const vr=h(Wt);if(Ke(vr)){const Hr=vr.filter(vt);Hr.length>0&&Ot.push({label:d(Wt),type:"Group"},...Hr)}else(e.remote||vt(Wt))&&Ot.push(Wt);return Ot},[])},Ce=()=>{H.value=Re(""),j.value=Re(f.inputValue)},Ee=C(()=>{const Be=new Map;return H.value.forEach((vt,Ot)=>{Be.set(bt(u(vt)),{option:vt,index:Ot})}),Be}),De=C(()=>{const Be=new Map;return j.value.forEach((vt,Ot)=>{Be.set(bt(u(vt)),{option:vt,index:Ot})}),Be}),ae=C(()=>j.value.every(Be=>p(Be))),pe=So(),ke=C(()=>pe.value==="small"?"small":"default"),Oe=()=>{var Be;_.value=((Be=g.value)==null?void 0:Be.offsetWidth)||200},we=()=>{if(!y.value)return 0;const Be=window.getComputedStyle(y.value);return Number.parseFloat(Be.gap||"6px")},Te=C(()=>{const Be=we();return{maxWidth:`${B.value&&e.maxCollapseTags===1?f.selectionWidth-f.collapseItemWidth-Be:f.selectionWidth}px`}}),Ne=C(()=>({maxWidth:`${f.selectionWidth}px`})),Ie=C(()=>({width:`${Math.max(f.calculatorWidth,Nre)}px`})),Ae=C(()=>Ke(e.modelValue)?e.modelValue.length===0&&!f.inputValue:e.filterable?!f.inputValue:!0),xe=C(()=>{var Be;const vt=(Be=e.placeholder)!=null?Be:o("el.select.placeholder");return e.multiple||!oe.value?vt:f.selectedLabel}),We=C(()=>{var Be,vt;return(vt=(Be=w.value)==null?void 0:Be.popperRef)==null?void 0:vt.contentRef}),qe=C(()=>{if(e.multiple){const Be=e.modelValue.length;if(e.modelValue.length>0&&De.value.has(e.modelValue[Be-1])){const{index:vt}=De.value.get(e.modelValue[Be-1]);return vt}}else if(e.modelValue&&De.value.has(e.modelValue)){const{index:Be}=De.value.get(e.modelValue);return Be}return-1}),ye=C({get(){return K.value&&me.value!==!1},set(Be){K.value=Be}}),Ye=C(()=>e.multiple?e.collapseTags?f.cachedOptions.slice(0,e.maxCollapseTags):f.cachedOptions:[]),tt=C(()=>e.multiple?e.collapseTags?f.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:pt,removeNewOption:dt,selectNewOption:Y,clearAllNewOption:S}=Ore(e,f),{handleCompositionStart:A,handleCompositionUpdate:G,handleCompositionEnd:X}=jy(Be=>Po(Be)),re=()=>{I.value||(f.menuVisibleOnFocus?f.menuVisibleOnFocus=!1:K.value=!K.value)},ge=()=>{f.inputValue.length>0&&!K.value&&(K.value=!0),pt(f.inputValue),Fe(f.inputValue)},fe=Mr(ge,_e.value),Fe=Be=>{f.previousQuery!==Be&&(f.previousQuery=Be,e.filterable&&it(e.filterMethod)?e.filterMethod(Be):e.filterable&&e.remote&&it(e.remoteMethod)&&e.remoteMethod(Be),e.defaultFirstOption&&(e.filterable||e.remote)&&j.value.length?et(at):et(ao))},at=()=>{const Be=j.value.filter(Wt=>!Wt.disabled&&Wt.type!=="Group"),vt=Be.find(Wt=>Wt.created),Ot=Be[0];f.hoveringIndex=no(j.value,vt||Ot)},_t=Be=>{nr(e.modelValue,Be)||t(ro,Be)},At=Be=>{t(St,Be),_t(Be),f.previousValue=e.multiple?String(Be):Be},no=(Be=[],vt)=>{if(!xt(vt))return Be.indexOf(vt);const Ot=e.valueKey;let Wt=-1;return Be.some((vr,Hr)=>wo(vr,Ot)===wo(vt,Ot)?(Wt=Hr,!0):!1),Wt},bt=Be=>xt(Be)?wo(Be,e.valueKey):Be,Qt=()=>{Oe()},Sn=()=>{f.selectionWidth=y.value.getBoundingClientRect().width},qo=()=>{f.calculatorWidth=T.value.getBoundingClientRect().width},xl=()=>{f.collapseItemWidth=B.value.getBoundingClientRect().width},kl=()=>{var Be,vt;(vt=(Be=w.value)==null?void 0:Be.updatePopper)==null||vt.call(Be)},Or=()=>{var Be,vt;(vt=(Be=x.value)==null?void 0:Be.updatePopper)==null||vt.call(Be)},Bt=Be=>{if(e.multiple){let vt=e.modelValue.slice();const Ot=no(vt,u(Be));Ot>-1?(vt=[...vt.slice(0,Ot),...vt.slice(Ot+1)],f.cachedOptions.splice(Ot,1),dt(Be)):(e.multipleLimit<=0||vt.length{let Ot=e.modelValue.slice();const Wt=no(Ot,u(vt));Wt>-1&&!I.value&&(Ot=[...e.modelValue.slice(0,Wt),...e.modelValue.slice(Wt+1)],f.cachedOptions.splice(Wt,1),At(Ot),t("remove-tag",u(vt)),dt(vt)),Be.stopPropagation(),or()},or=()=>{var Be;(Be=$.value)==null||Be.focus()},Nr=()=>{var Be;(Be=$.value)==null||Be.blur()},yo=()=>{f.inputValue.length>0?f.inputValue="":K.value=!1},Eo=Be=>x3(Be,vt=>!f.cachedOptions.some(Ot=>u(Ot)===vt&&p(Ot))),rr=Be=>{if(e.multiple&&Be.code!==lt.delete&&f.inputValue.length===0){Be.preventDefault();const vt=e.modelValue.slice(),Ot=Eo(vt);if(Ot<0)return;const Wt=vt[Ot];vt.splice(Ot,1);const vr=f.cachedOptions[Ot];f.cachedOptions.splice(Ot,1),dt(vr),At(vt),t("remove-tag",Wt)}},ua=()=>{let Be;Ke(e.modelValue)?Be=[]:Be=v.value,e.multiple?f.cachedOptions=[]:f.selectedLabel="",K.value=!1,At(Be),t("clear"),S(),or()},He=(Be,vt=void 0)=>{const Ot=j.value;if(!["forward","backward"].includes(Be)||I.value||Ot.length<=0||ae.value)return;if(!K.value)return re();vt===void 0&&(vt=f.hoveringIndex);let Wt=-1;Be==="forward"?(Wt=vt+1,Wt>=Ot.length&&(Wt=0)):Be==="backward"&&(Wt=vt-1,(Wt<0||Wt>=Ot.length)&&(Wt=Ot.length-1));const vr=Ot[Wt];if(p(vr)||vr.type==="Group")return He(Be,Wt);f.hoveringIndex=Wt,fr(Wt)},ot=()=>{if(K.value)~f.hoveringIndex&&j.value[f.hoveringIndex]&&Bt(j.value[f.hoveringIndex]);else return re()},eo=Be=>{f.hoveringIndex=Be},ao=()=>{e.multiple?f.hoveringIndex=j.value.findIndex(Be=>e.modelValue.some(vt=>bt(vt)===bt(Be))):f.hoveringIndex=j.value.findIndex(Be=>bt(Be)===bt(e.modelValue))},Po=Be=>{if(f.inputValue=Be.target.value,e.remote)fe();else return ge()},Pr=Be=>{if(K.value=!1,Q.value){const vt=new FocusEvent("focus",Be);Z(vt)}},Wl=()=>(f.isBeforeHide=!1,et(()=>{~qe.value&&fr(f.hoveringIndex)})),fr=Be=>{R.value.scrollToItem(Be)},hr=Be=>{const vt=bt(Be);if(Ee.value.has(vt)){const{option:Ot}=Ee.value.get(vt);return Ot}return{[c.value.value]:Be,[c.value.label]:Be}},ql=()=>{if(e.multiple)if(e.modelValue.length>0){f.cachedOptions.length=0,f.previousValue=e.modelValue.toString();for(const Be of e.modelValue){const vt=hr(Be);f.cachedOptions.push(vt)}}else f.cachedOptions=[],f.previousValue=void 0;else if(oe.value){f.previousValue=e.modelValue;const Be=j.value,vt=Be.findIndex(Ot=>bt(u(Ot))===bt(e.modelValue));~vt?f.selectedLabel=d(Be[vt]):f.selectedLabel=bt(e.modelValue)}else f.selectedLabel="",f.previousValue=void 0;S(),Oe()};return Se(K,Be=>{Be?Fe(""):(f.inputValue="",f.previousQuery=null,f.isBeforeHide=!0,pt("")),t("visible-change",Be)}),Se(()=>e.modelValue,(Be,vt)=>{var Ot;(!Be||e.multiple&&Be.toString()!==f.previousValue||!e.multiple&&bt(Be)!==bt(f.previousValue))&&ql(),!nr(Be,vt)&&e.validateEvent&&((Ot=a==null?void 0:a.validate)==null||Ot.call(a,"change").catch(Wt=>void 0))},{deep:!0}),Se(()=>e.options,()=>{const Be=$.value;(!Be||Be&&document.activeElement!==Be)&&ql()},{deep:!0,flush:"post"}),Se(()=>j.value,()=>R.value&&et(R.value.resetScrollTop)),Go(()=>{f.isBeforeHide||Ce()}),Go(()=>{const{valueKey:Be,options:vt}=e,Ot=new Map;for(const Wt of vt){const vr=u(Wt);let Hr=vr;if(xt(Hr)&&(Hr=wo(vr,Be)),Ot.get(Hr))break;Ot.set(Hr,!0)}}),ft(()=>{ql()}),so(g,Qt),so(y,Sn),so(T,qo),so(R,kl),so(F,kl),so(V,Or),so(B,xl),{inputId:i,collapseTagSize:ke,currentPlaceholder:xe,expanded:K,emptyText:me,popupHeight:U,debounce:_e,allOptions:H,filteredOptions:j,iconComponent:ce,iconReverse:ee,tagStyle:Te,collapseTagStyle:Ne,inputStyle:Ie,popperSize:_,dropdownMenuVisible:ye,hasModelValue:oe,shouldShowPlaceholder:Ae,selectDisabled:I,selectSize:pe,showClearBtn:ne,states:f,isFocused:Q,nsSelect:r,nsInput:l,calculatorRef:T,inputRef:$,menuRef:R,tagMenuRef:V,tooltipRef:w,tagTooltipRef:x,selectRef:g,wrapperRef:F,selectionRef:y,prefixRef:L,suffixRef:P,collapseItemRef:B,popperRef:We,validateState:Me,validateIcon:de,showTagList:Ye,collapseTagList:tt,debouncedOnInputChange:fe,deleteTag:pr,getLabel:d,getValue:u,getDisabled:p,getValueKey:bt,handleBlur:Z,handleClear:ua,handleClickOutside:Pr,handleDel:rr,handleEsc:yo,handleFocus:J,focus:or,blur:Nr,handleMenuEnter:Wl,handleResize:Qt,resetSelectionWidth:Sn,resetCalculatorWidth:qo,updateTooltip:kl,updateTagTooltip:Or,updateOptions:Ce,toggleMenu:re,scrollTo:fr,onInput:Po,onKeyboardNavigate:He,onKeyboardSelect:ot,onSelect:Bt,onHover:eo,handleCompositionStart:A,handleCompositionEnd:X,handleCompositionUpdate:G}},Rre=N({name:"ElSelectV2",components:{ElSelectMenu:Ire,ElTag:Pc,ElTooltip:ur,ElIcon:Ze},directives:{ClickOutside:xn},props:Ere,emits:[St,ro,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=C(()=>{const{modelValue:l,multiple:n}=e,a=n?[]:void 0;return Ke(l)?n?l:a:n?a:l}),r=Pre(Dt({...Bo(e),modelValue:o}),t);return zt(d2,{props:Dt({...Bo(e),height:r.popupHeight,modelValue:o}),tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect}),{...r,modelValue:o}}}),Lre=["id","autocomplete","aria-expanded","aria-label","disabled","readonly","name"],Bre=["textContent"],Vre={key:1};function Dre(e,t,o,r,l,n){const a=nt("el-tag"),i=nt("el-tooltip"),c=nt("el-icon"),d=nt("el-select-menu"),u=Iu("click-outside");return mt((b(),M("div",{ref:"selectRef",class:O([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=p=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=p=>e.states.inputHovering=!1)},[te(i,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=p=>e.states.isBeforeHide=!1)},{default:le(()=>[E("div",{ref:"wrapperRef",class:O([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[13]||(t[13]=ct((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent","stop"]))},[e.$slots.prefix?(b(),M("div",{key:0,ref:"prefixRef",class:O(e.nsSelect.e("prefix"))},[be(e.$slots,"prefix")],2)):se("v-if",!0),E("div",{ref:"selectionRef",class:O([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?be(e.$slots,"tag",{key:0},()=>[(b(!0),M(Qe,null,It(e.showTagList,p=>(b(),M("div",{key:e.getValueKey(e.getValue(p)),class:O(e.nsSelect.e("selected-item"))},[te(a,{closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Je(e.tagStyle),onClose:h=>e.deleteTag(h,p)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Ct($e(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.modelValue.length>e.maxCollapseTags?(b(),he(i,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:le(()=>[E("div",{ref:"collapseItemRef",class:O(e.nsSelect.e("selected-item"))},[te(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,style:Je(e.collapseTagStyle),"disable-transitions":""},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))}," + "+$e(e.modelValue.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:le(()=>[E("div",{ref:"tagMenuRef",class:O(e.nsSelect.e("selection"))},[(b(!0),M(Qe,null,It(e.collapseTagList,p=>(b(),M("div",{key:e.getValueKey(e.getValue(p)),class:O(e.nsSelect.e("selected-item"))},[te(a,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:h=>e.deleteTag(h,p)},{default:le(()=>[E("span",{class:O(e.nsSelect.e("tags-text"))},[be(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Ct($e(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):se("v-if",!0)]):se("v-if",!0),e.selectDisabled?se("v-if",!0):(b(),M("div",{key:1,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[mt(E("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=p=>e.states.inputValue=p),style:Je(e.inputStyle),autocomplete:e.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:O([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onFocus:t[1]||(t[1]=(...p)=>e.handleFocus&&e.handleFocus(...p)),onBlur:t[2]||(t[2]=(...p)=>e.handleBlur&&e.handleBlur(...p)),onInput:t[3]||(t[3]=(...p)=>e.onInput&&e.onInput(...p)),onCompositionstart:t[4]||(t[4]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[5]||(t[5]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[6]||(t[6]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[7]||(t[7]=Gt(ct(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[8]||(t[8]=Gt(ct(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[9]||(t[9]=Gt(ct((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[10]||(t[10]=Gt(ct((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[11]||(t[11]=Gt(ct((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))],onClick:t[12]||(t[12]=ct((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"]))},null,46,Lre),[[r0,e.states.inputValue]]),e.filterable?(b(),M("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:O(e.nsSelect.e("input-calculator")),textContent:$e(e.states.inputValue)},null,10,Bre)):se("v-if",!0)],2)),e.shouldShowPlaceholder?(b(),M("div",{key:2,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?be(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[E("span",null,$e(e.currentPlaceholder),1)]):(b(),M("span",Vre,$e(e.currentPlaceholder),1))],2)):se("v-if",!0)],2),E("div",{ref:"suffixRef",class:O(e.nsSelect.e("suffix"))},[e.iconComponent?mt((b(),he(c,{key:0,class:O([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])),[[Lt,!e.showClearBtn]]):se("v-if",!0),e.showClearBtn&&e.clearIcon?(b(),he(c,{key:1,class:O([e.nsSelect.e("caret"),e.nsInput.e("icon")]),onClick:ct(e.handleClear,["prevent","stop"])},{default:le(()=>[(b(),he(Et(e.clearIcon)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.validateState&&e.validateIcon?(b(),he(c,{key:2,class:O([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:le(()=>[(b(),he(Et(e.validateIcon)))]),_:1},8,["class"])):se("v-if",!0)],2)],2)]),content:le(()=>[te(d,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},ln({default:le(p=>[be(e.$slots,"default",Zl(mi(p)))]),_:2},[e.$slots.header?{name:"header",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","header"))},[be(e.$slots,"header")],2)])}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","loading"))},[be(e.$slots,"loading")],2)])}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","empty"))},[be(e.$slots,"empty",{},()=>[E("span",null,$e(e.emptyText),1)])],2)])}:void 0,e.$slots.footer?{name:"footer",fn:le(()=>[E("div",{class:O(e.nsSelect.be("dropdown","footer"))},[be(e.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","onBeforeShow"])],34)),[[u,e.handleClickOutside,e.popperRef]])}var Ip=Le(Rre,[["render",Dre],["__file","select.vue"]]);Ip.install=e=>{e.component(Ip.name,Ip)};const Hre=Ip,Fre=Pe({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),jre=Pe({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Kre=N({...N({name:"ElSkeletonItem"}),props:jre,setup(e){const t=ze("skeleton");return(o,r)=>(b(),M("div",{class:O([s(t).e("item"),s(t).e(o.variant)])},[o.variant==="image"?(b(),he(s(D3),{key:0})):se("v-if",!0)],2))}});var Op=Le(Kre,[["__file","skeleton-item.vue"]]);const Ure=N({...N({name:"ElSkeleton"}),props:Fre,setup(e,{expose:t}){const o=e,r=ze("skeleton"),l=kj(Yt(o,"loading"),o.throttle);return t({uiLoading:l}),(n,a)=>s(l)?(b(),M("div",Mt({key:0,class:[s(r).b(),s(r).is("animated",n.animated)]},n.$attrs),[(b(!0),M(Qe,null,It(n.count,i=>(b(),M(Qe,{key:i},[n.loading?be(n.$slots,"template",{key:i},()=>[te(Op,{class:O(s(r).is("first")),variant:"p"},null,8,["class"]),(b(!0),M(Qe,null,It(n.rows,c=>(b(),he(Op,{key:c,class:O([s(r).e("paragraph"),s(r).is("last",c===n.rows&&n.rows>1)]),variant:"p"},null,8,["class"]))),128))]):se("v-if",!0)],64))),128))],16)):be(n.$slots,"default",Zl(Mt({key:1},n.$attrs)))}});var Wre=Le(Ure,[["__file","skeleton.vue"]]);const qre=yt(Wre,{SkeletonItem:Op}),Yre=co(Op),_8=Symbol("sliderContextKey"),Gre=Pe({modelValue:{type:ue([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Oo,inputSize:Oo,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ue(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},label:{type:String,default:void 0},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ue(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Va,default:"top"},marks:{type:ue(Object)},validateEvent:{type:Boolean,default:!0},...Zo(["ariaLabel"])}),p2=e=>st(e)||Ke(e)&&e.every(st),Xre={[St]:p2,[yr]:p2,[ro]:p2},Zre=(e,t,o)=>{const r=D();return ft(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),oo(window,"resize",o),await et(),o()}),{sliderWrapper:r}},Jre=e=>C(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((o,r)=>o-r).filter(o=>o<=e.max&&o>=e.min).map(o=>({point:o,position:(o-e.min)*100/(e.max-e.min),mark:e.marks[o]})):[]),Qre=(e,t,o)=>{const{form:r,formItem:l}=sr(),n=lo(),a=D(),i=D(),c={firstButton:a,secondButton:i},d=C(()=>e.disabled||(r==null?void 0:r.disabled)||!1),u=C(()=>Math.min(t.firstValue,t.secondValue)),p=C(()=>Math.max(t.firstValue,t.secondValue)),h=C(()=>e.range?`${100*(p.value-u.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),v=C(()=>e.range?`${100*(u.value-e.min)/(e.max-e.min)}%`:"0%"),m=C(()=>e.vertical?{height:e.height}:{}),f=C(()=>e.vertical?{height:h.value,bottom:v.value}:{width:h.value,left:v.value}),_=()=>{n.value&&(t.sliderSize=n.value[`client${e.vertical?"Height":"Width"}`])},g=B=>{const F=e.min+B*(e.max-e.min)/100;if(!e.range)return a;let Q;return Math.abs(u.value-F)t.secondValue?"firstButton":"secondButton",c[Q]},y=B=>{const F=g(B);return F.value.setPosition(B),F},w=B=>{t.firstValue=B,$(e.range?[u.value,p.value]:B)},x=B=>{t.secondValue=B,e.range&&$([u.value,p.value])},$=B=>{o(St,B),o(yr,B)},T=async()=>{await et(),o(ro,e.range?[u.value,p.value]:e.modelValue)},L=B=>{var F,Q,J,Z,H,j;if(d.value||t.dragging)return;_();let K=0;if(e.vertical){const I=(J=(Q=(F=B.touches)==null?void 0:F.item(0))==null?void 0:Q.clientY)!=null?J:B.clientY;K=(n.value.getBoundingClientRect().bottom-I)/t.sliderSize*100}else{const I=(j=(H=(Z=B.touches)==null?void 0:Z.item(0))==null?void 0:H.clientX)!=null?j:B.clientX,U=n.value.getBoundingClientRect().left;K=(I-U)/t.sliderSize*100}if(!(K<0||K>100))return y(K)};return{elFormItem:l,slider:n,firstButton:a,secondButton:i,sliderDisabled:d,minValue:u,maxValue:p,runwayStyle:m,barStyle:f,resetSize:_,setPosition:y,emitChange:T,onSliderWrapperPrevent:B=>{var F,Q;((F=c.firstButton.value)!=null&&F.dragging||(Q=c.secondButton.value)!=null&&Q.dragging)&&B.preventDefault()},onSliderClick:B=>{L(B)&&T()},onSliderDown:async B=>{const F=L(B);F&&(await et(),F.value.onButtonDown(B))},setFirstValue:w,setSecondValue:x}},{left:ele,down:tle,right:ole,up:rle,home:lle,end:nle,pageUp:ale,pageDown:ile}=lt,sle=(e,t,o)=>{const r=D(),l=D(!1),n=C(()=>t.value instanceof Function),a=C(()=>n.value&&t.value(e.modelValue)||e.modelValue),i=Mr(()=>{o.value&&(l.value=!0)},50),c=Mr(()=>{o.value&&(l.value=!1)},50);return{tooltip:r,tooltipVisible:l,formatValue:a,displayTooltip:i,hideTooltip:c}},cle=(e,t,o)=>{const{disabled:r,min:l,max:n,step:a,showTooltip:i,precision:c,sliderSize:d,formatTooltip:u,emitChange:p,resetSize:h,updateDragging:v}=Ge(_8),{tooltip:m,tooltipVisible:f,formatValue:_,displayTooltip:g,hideTooltip:y}=sle(e,u,i),w=D(),x=C(()=>`${(e.modelValue-l.value)/(n.value-l.value)*100}%`),$=C(()=>e.vertical?{bottom:x.value}:{left:x.value}),T=()=>{t.hovering=!0,g()},L=()=>{t.hovering=!1,t.dragging||y()},P=ne=>{r.value||(ne.preventDefault(),K(ne),window.addEventListener("mousemove",I),window.addEventListener("touchmove",I),window.addEventListener("mouseup",U),window.addEventListener("touchend",U),window.addEventListener("contextmenu",U),w.value.focus())},R=ne=>{r.value||(t.newPosition=Number.parseFloat(x.value)+ne/(n.value-l.value)*100,oe(t.newPosition),p())},V=()=>{R(-a.value)},B=()=>{R(a.value)},F=()=>{R(-a.value*4)},Q=()=>{R(a.value*4)},J=()=>{r.value||(oe(0),p())},Z=()=>{r.value||(oe(100),p())},H=ne=>{let ce=!0;[ele,tle].includes(ne.key)?V():[ole,rle].includes(ne.key)?B():ne.key===lle?J():ne.key===nle?Z():ne.key===ile?F():ne.key===ale?Q():ce=!1,ce&&ne.preventDefault()},j=ne=>{let ce,ee;return ne.type.startsWith("touch")?(ee=ne.touches[0].clientY,ce=ne.touches[0].clientX):(ee=ne.clientY,ce=ne.clientX),{clientX:ce,clientY:ee}},K=ne=>{t.dragging=!0,t.isClick=!0;const{clientX:ce,clientY:ee}=j(ne);e.vertical?t.startY=ee:t.startX=ce,t.startPosition=Number.parseFloat(x.value),t.newPosition=t.startPosition},I=ne=>{if(t.dragging){t.isClick=!1,g(),h();let ce;const{clientX:ee,clientY:Me}=j(ne);e.vertical?(t.currentY=Me,ce=(t.startY-t.currentY)/d.value*100):(t.currentX=ee,ce=(t.currentX-t.startX)/d.value*100),t.newPosition=t.startPosition+ce,oe(t.newPosition)}},U=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||y(),t.isClick||oe(t.newPosition),p()},0),window.removeEventListener("mousemove",I),window.removeEventListener("touchmove",I),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),window.removeEventListener("contextmenu",U))},oe=async ne=>{if(ne===null||Number.isNaN(+ne))return;ne<0?ne=0:ne>100&&(ne=100);const ce=100/((n.value-l.value)/a.value);let Me=Math.round(ne/ce)*ce*(n.value-l.value)*.01+l.value;Me=Number.parseFloat(Me.toFixed(c.value)),Me!==e.modelValue&&o(St,Me),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await et(),t.dragging&&g(),m.value.updatePopper()};return Se(()=>t.dragging,ne=>{v(ne)}),{disabled:r,button:w,tooltip:m,tooltipVisible:f,showTooltip:i,wrapperStyle:$,formatValue:_,handleMouseEnter:T,handleMouseLeave:L,onButtonDown:P,onKeyDown:H,setPosition:oe}},ule=(e,t,o,r)=>({stops:C(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const a=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),c=Array.from({length:a-1}).map((d,u)=>(u+1)*i);return e.range?c.filter(d=>d<100*(o.value-e.min)/(e.max-e.min)||d>100*(r.value-e.min)/(e.max-e.min)):c.filter(d=>d>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:a=>e.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),dle=(e,t,o,r,l,n)=>{const a=d=>{l(St,d),l(yr,d)},i=()=>e.range?![o.value,r.value].every((d,u)=>d===t.oldValue[u]):e.modelValue!==t.oldValue,c=()=>{var d,u;e.min>e.max&&Io("Slider","min should not be greater than max.");const p=e.modelValue;e.range&&Array.isArray(p)?p[1]e.max?a([e.max,e.max]):p[0]e.max?a([p[0],e.max]):(t.firstValue=p[0],t.secondValue=p[1],i()&&(e.validateEvent&&((d=n==null?void 0:n.validate)==null||d.call(n,"change").catch(h=>void 0)),t.oldValue=p.slice())):!e.range&&typeof p=="number"&&!Number.isNaN(p)&&(pe.max?a(e.max):(t.firstValue=p,i()&&(e.validateEvent&&((u=n==null?void 0:n.validate)==null||u.call(n,"change").catch(h=>void 0)),t.oldValue=p)))};c(),Se(()=>t.dragging,d=>{d||c()}),Se(()=>e.modelValue,(d,u)=>{t.dragging||Array.isArray(d)&&Array.isArray(u)&&d.every((p,h)=>p===u[h])&&t.firstValue===d[0]&&t.secondValue===d[1]||c()},{deep:!0}),Se(()=>[e.min,e.max],()=>{c()})},ple=Pe({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Va,default:"top"}}),fle={[St]:e=>st(e)},hle=["tabindex"],vle=N({...N({name:"ElSliderButton"}),props:ple,emits:fle,setup(e,{expose:t,emit:o}){const r=e,l=ze("slider"),n=Dt({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:i,tooltip:c,showTooltip:d,tooltipVisible:u,wrapperStyle:p,formatValue:h,handleMouseEnter:v,handleMouseLeave:m,onButtonDown:f,onKeyDown:_,setPosition:g}=cle(r,n,o),{hovering:y,dragging:w}=Bo(n);return t({onButtonDown:f,onKeyDown:_,setPosition:g,hovering:y,dragging:w}),(x,$)=>(b(),M("div",{ref_key:"button",ref:i,class:O([s(l).e("button-wrapper"),{hover:s(y),dragging:s(w)}]),style:Je(s(p)),tabindex:s(a)?-1:0,onMouseenter:$[0]||($[0]=(...T)=>s(v)&&s(v)(...T)),onMouseleave:$[1]||($[1]=(...T)=>s(m)&&s(m)(...T)),onMousedown:$[2]||($[2]=(...T)=>s(f)&&s(f)(...T)),onTouchstart:$[3]||($[3]=(...T)=>s(f)&&s(f)(...T)),onFocus:$[4]||($[4]=(...T)=>s(v)&&s(v)(...T)),onBlur:$[5]||($[5]=(...T)=>s(m)&&s(m)(...T)),onKeydown:$[6]||($[6]=(...T)=>s(_)&&s(_)(...T))},[te(s(ur),{ref_key:"tooltip",ref:c,visible:s(u),placement:x.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":x.tooltipClass,disabled:!s(d),persistent:""},{content:le(()=>[E("span",null,$e(s(h)),1)]),default:le(()=>[E("div",{class:O([s(l).e("button"),{hover:s(y),dragging:s(w)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,hle))}});var w8=Le(vle,[["__file","button.vue"]]);const mle=Pe({mark:{type:ue([String,Object]),default:void 0}});var gle=N({name:"ElSliderMarker",props:mle,setup(e){const t=ze("slider"),o=C(()=>ut(e.mark)?e.mark:e.mark.label),r=C(()=>ut(e.mark)?void 0:e.mark.style);return()=>rt("div",{class:t.e("marks-text"),style:r.value},o.value)}});const ble=["id","role","aria-label","aria-labelledby"],_le={key:1},wle=N({...N({name:"ElSlider"}),props:Gre,emits:Xre,setup(e,{expose:t,emit:o}){const r=e,l=ze("slider"),{t:n}=Rt(),a=Dt({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:c,firstButton:d,secondButton:u,sliderDisabled:p,minValue:h,maxValue:v,runwayStyle:m,barStyle:f,resetSize:_,emitChange:g,onSliderWrapperPrevent:y,onSliderClick:w,onSliderDown:x,setFirstValue:$,setSecondValue:T}=Qre(r,a,o),{stops:L,getStopStyle:P}=ule(r,a,h,v),{inputId:R,isLabeledByFormItem:V}=bl(r,{formItemContext:i}),B=So(),F=C(()=>r.inputSize||B.value),Q=C(()=>r.label||r.ariaLabel||n("el.slider.defaultLabel",{min:r.min,max:r.max})),J=C(()=>r.range?r.rangeStartLabel||n("el.slider.defaultRangeStartLabel"):Q.value),Z=C(()=>r.formatValueText?r.formatValueText(ne.value):`${ne.value}`),H=C(()=>r.rangeEndLabel||n("el.slider.defaultRangeEndLabel")),j=C(()=>r.formatValueText?r.formatValueText(ce.value):`${ce.value}`),K=C(()=>[l.b(),l.m(B.value),l.is("vertical",r.vertical),{[l.m("with-input")]:r.showInput}]),I=Jre(r);dle(r,a,h,v,o,i);const U=C(()=>{const de=[r.min,r.max,r.step].map(_e=>{const me=`${_e}`.split(".")[1];return me?me.length:0});return Math.max.apply(null,de)}),{sliderWrapper:oe}=Zre(r,a,_),{firstValue:ne,secondValue:ce,sliderSize:ee}=Bo(a),Me=de=>{a.dragging=de};return zt(_8,{...Bo(r),sliderSize:ee,disabled:p,precision:U,emitChange:g,resetSize:_,updateDragging:Me}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-slider",ref:"https://element-plus.org/en-US/component/slider.html"},C(()=>!!r.label)),t({onSliderClick:w}),(de,_e)=>{var me,Re;return b(),M("div",{id:de.range?s(R):void 0,ref_key:"sliderWrapper",ref:oe,class:O(s(K)),role:de.range?"group":void 0,"aria-label":de.range&&!s(V)?s(Q):void 0,"aria-labelledby":de.range&&s(V)?(me=s(i))==null?void 0:me.labelId:void 0,onTouchstart:_e[2]||(_e[2]=(...Ce)=>s(y)&&s(y)(...Ce)),onTouchmove:_e[3]||(_e[3]=(...Ce)=>s(y)&&s(y)(...Ce))},[E("div",{ref_key:"slider",ref:c,class:O([s(l).e("runway"),{"show-input":de.showInput&&!de.range},s(l).is("disabled",s(p))]),style:Je(s(m)),onMousedown:_e[0]||(_e[0]=(...Ce)=>s(x)&&s(x)(...Ce)),onTouchstart:_e[1]||(_e[1]=(...Ce)=>s(x)&&s(x)(...Ce))},[E("div",{class:O(s(l).e("bar")),style:Je(s(f))},null,6),te(w8,{id:de.range?void 0:s(R),ref_key:"firstButton",ref:d,"model-value":s(ne),vertical:de.vertical,"tooltip-class":de.tooltipClass,placement:de.placement,role:"slider","aria-label":de.range||!s(V)?s(J):void 0,"aria-labelledby":!de.range&&s(V)?(Re=s(i))==null?void 0:Re.labelId:void 0,"aria-valuemin":de.min,"aria-valuemax":de.range?s(ce):de.max,"aria-valuenow":s(ne),"aria-valuetext":s(Z),"aria-orientation":de.vertical?"vertical":"horizontal","aria-disabled":s(p),"onUpdate:modelValue":s($)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),de.range?(b(),he(w8,{key:0,ref_key:"secondButton",ref:u,"model-value":s(ce),vertical:de.vertical,"tooltip-class":de.tooltipClass,placement:de.placement,role:"slider","aria-label":s(H),"aria-valuemin":s(ne),"aria-valuemax":de.max,"aria-valuenow":s(ce),"aria-valuetext":s(j),"aria-orientation":de.vertical?"vertical":"horizontal","aria-disabled":s(p),"onUpdate:modelValue":s(T)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):se("v-if",!0),de.showStops?(b(),M("div",_le,[(b(!0),M(Qe,null,It(s(L),(Ce,Ee)=>(b(),M("div",{key:Ee,class:O(s(l).e("stop")),style:Je(s(P)(Ce))},null,6))),128))])):se("v-if",!0),s(I).length>0?(b(),M(Qe,{key:2},[E("div",null,[(b(!0),M(Qe,null,It(s(I),(Ce,Ee)=>(b(),M("div",{key:Ee,style:Je(s(P)(Ce.position)),class:O([s(l).e("stop"),s(l).e("marks-stop")])},null,6))),128))]),E("div",{class:O(s(l).e("marks"))},[(b(!0),M(Qe,null,It(s(I),(Ce,Ee)=>(b(),he(s(gle),{key:Ee,mark:Ce.mark,style:Je(s(P)(Ce.position))},null,8,["mark","style"]))),128))],2)],64)):se("v-if",!0)],38),de.showInput&&!de.range?(b(),he(s(Ry),{key:0,ref:"input","model-value":s(ne),class:O(s(l).e("input")),step:de.step,disabled:s(p),controls:de.showInputControls,min:de.min,max:de.max,debounce:de.debounce,size:s(F),"onUpdate:modelValue":s($),onChange:s(g)},null,8,["model-value","class","step","disabled","controls","min","max","debounce","size","onUpdate:modelValue","onChange"])):se("v-if",!0)],42,ble)}}});var yle=Le(wle,[["__file","slider.vue"]]);const xle=yt(yle),kle=Pe({prefixCls:{type:String}}),y8=N({name:"ElSpaceItem",props:kle,setup(e,{slots:t}){const o=ze("space"),r=C(()=>`${e.prefixCls||o.b()}__item`);return()=>rt("div",{class:r.value},be(t,"default"))}}),x8={small:8,default:12,large:16};function Cle(e){const t=ze("space"),o=C(()=>[t.b(),t.m(e.direction),e.class]),r=D(0),l=D(0),n=C(()=>{const i=e.wrap||e.fill?{flexWrap:"wrap"}:{},c={alignItems:e.alignment},d={rowGap:`${l.value}px`,columnGap:`${r.value}px`};return[i,c,d,e.style]}),a=C(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return Go(()=>{const{size:i="small",wrap:c,direction:d,fill:u}=e;if(Ke(i)){const[p=0,h=0]=i;r.value=p,l.value=h}else{let p;st(i)?p=i:p=x8[i||"small"]||x8.small,(c||u)&&d==="horizontal"?r.value=l.value=p:d==="horizontal"?(r.value=p,l.value=0):(l.value=p,r.value=0)}}),{classes:o,containerStyle:n,itemStyle:a}}const Sle=Pe({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:ue([String,Object,Array]),default:""},style:{type:ue([String,Array,Object]),default:""},alignment:{type:ue(String),default:"center"},prefixCls:{type:String},spacer:{type:ue([Object,String,Number,Array]),default:null,validator:e=>io(e)||st(e)||ut(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Rl,validator:e=>st(e)||Ke(e)&&e.length===2&&e.every(st)}}),Ele=yt(N({name:"ElSpace",props:Sle,setup(e,{slots:t}){const{classes:o,containerStyle:r,itemStyle:l}=Cle(e);function n(a,i="",c=[]){const{prefixCls:d}=e;return a.forEach((u,p)=>{wh(u)?Ke(u.children)&&u.children.forEach((h,v)=>{wh(h)&&Ke(h.children)?n(h.children,`${i+v}-`,c):c.push(te(y8,{style:l.value,prefixCls:d,key:`nested-${i+v}`},{default:()=>[h]},Qr.PROPS|Qr.STYLE,["style","prefixCls"]))}):aF(u)&&c.push(te(y8,{style:l.value,prefixCls:d,key:`LoopKey${i+p}`},{default:()=>[u]},Qr.PROPS|Qr.STYLE,["style","prefixCls"]))}),c}return()=>{var a;const{spacer:i,direction:c}=e,d=be(t,"default",{key:0},()=>[]);if(((a=d.children)!=null?a:[]).length===0)return null;if(Ke(d.children)){let u=n(d.children);if(i){const p=u.length-1;u=u.reduce((h,v,m)=>{const f=[...h,v];return m!==p&&f.push(te("span",{style:[l.value,c==="vertical"?"width: 100%":null],key:m},[io(i)?i:Ct(i,Qr.TEXT)],Qr.STYLE)),f},[])}return te("div",{class:o.value,style:r.value},u,Qr.STYLE|Qr.CLASS)}return d.children}}})),Tle=Pe({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:ue([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:ue([String,Object,Array])}}),$le=N({...N({name:"ElStatistic"}),props:Tle,setup(e,{expose:t}){const o=e,r=ze("statistic"),l=C(()=>{const{value:n,formatter:a,precision:i,decimalSeparator:c,groupSeparator:d}=o;if(it(a))return a(n);if(!st(n))return n;let[u,p=""]=String(n).split(".");return p=p.padEnd(i,"0").slice(0,i>0?i:0),u=u.replace(/\B(?=(\d{3})+(?!\d))/g,d),[u,p].join(p?c:"")});return t({displayValue:l}),(n,a)=>(b(),M("div",{class:O(s(r).b())},[n.$slots.title||n.title?(b(),M("div",{key:0,class:O(s(r).e("head"))},[be(n.$slots,"title",{},()=>[Ct($e(n.title),1)])],2)):se("v-if",!0),E("div",{class:O(s(r).e("content"))},[n.$slots.prefix||n.prefix?(b(),M("div",{key:0,class:O(s(r).e("prefix"))},[be(n.$slots,"prefix",{},()=>[E("span",null,$e(n.prefix),1)])],2)):se("v-if",!0),E("span",{class:O(s(r).e("number")),style:Je(n.valueStyle)},$e(s(l)),7),n.$slots.suffix||n.suffix?(b(),M("div",{key:1,class:O(s(r).e("suffix"))},[be(n.$slots,"suffix",{},()=>[E("span",null,$e(n.suffix),1)])],2)):se("v-if",!0)],2)],2))}});var Mle=Le($le,[["__file","statistic.vue"]]);const k8=yt(Mle),Ale=Pe({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:ue([Number,Object]),default:0},valueStyle:{type:ue([String,Object,Array])}}),zle={finish:()=>!0,[ro]:e=>st(e)},Ile=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],C8=e=>st(e)?new Date(e).getTime():e.valueOf(),S8=(e,t)=>{let o=e;const r=/\[([^\]]*)]/g;return Ile.reduce((n,[a,i])=>{const c=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(c.test(n)){const d=Math.floor(o/i);return o-=d*i,n.replace(c,u=>String(d).padStart(u.length,"0"))}return n},t).replace(r,"$1")},Ole=N({...N({name:"ElCountdown"}),props:Ale,emits:zle,setup(e,{expose:t,emit:o}){const r=e;let l;const n=D(C8(r.value)-Date.now()),a=C(()=>S8(n.value,r.format)),i=u=>S8(u,r.format),c=()=>{l&&(Pa(l),l=void 0)},d=()=>{const u=C8(r.value),p=()=>{let h=u-Date.now();o("change",h),h<=0?(h=0,c(),o("finish")):l=Xn(p),n.value=h};l=Xn(p)};return Se(()=>[r.value,r.format],()=>{c(),d()},{immediate:!0}),to(()=>{c()}),t({displayValue:a}),(u,p)=>(b(),he(s(k8),{value:n.value,title:u.title,prefix:u.prefix,suffix:u.suffix,"value-style":u.valueStyle,formatter:i},ln({_:2},[It(u.$slots,(h,v)=>({name:v,fn:le(()=>[be(u.$slots,v)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var Nle=Le(Ole,[["__file","countdown.vue"]]);const Ple=yt(Nle),Rle=Pe({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),Lle={[ro]:(e,t)=>[e,t].every(st)},Ble=N({...N({name:"ElSteps"}),props:Rle,emits:Lle,setup(e,{emit:t}){const o=e,r=ze("steps"),{children:l,addChild:n,removeChild:a}=Uh(wt(),"ElStep");return Se(l,()=>{l.value.forEach((i,c)=>{i.setIndex(c)})}),zt("ElSteps",{props:o,steps:l,addStep:n,removeStep:a}),Se(()=>o.active,(i,c)=>{t(ro,i,c)}),(i,c)=>(b(),M("div",{class:O([s(r).b(),s(r).m(i.simple?"simple":i.direction)])},[be(i.$slots,"default")],2))}});var Vle=Le(Ble,[["__file","steps.vue"]]);const Dle=Pe({title:{type:String,default:""},icon:{type:Xt},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),Hle=N({...N({name:"ElStep"}),props:Dle,setup(e){const t=e,o=ze("step"),r=D(-1),l=D({}),n=D(""),a=Ge("ElSteps"),i=wt();ft(()=>{Se([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([T])=>{x(T)},{immediate:!0})}),to(()=>{a.removeStep($.uid)});const c=C(()=>t.status||n.value),d=C(()=>{const T=a.steps.value[r.value-1];return T?T.currentStatus:"wait"}),u=C(()=>a.props.alignCenter),p=C(()=>a.props.direction==="vertical"),h=C(()=>a.props.simple),v=C(()=>a.steps.value.length),m=C(()=>{var T;return((T=a.steps.value[v.value-1])==null?void 0:T.uid)===(i==null?void 0:i.uid)}),f=C(()=>h.value?"":a.props.space),_=C(()=>[o.b(),o.is(h.value?"simple":a.props.direction),o.is("flex",m.value&&!f.value&&!u.value),o.is("center",u.value&&!p.value&&!h.value)]),g=C(()=>{const T={flexBasis:st(f.value)?`${f.value}px`:f.value?f.value:`${100/(v.value-(u.value?0:1))}%`};return p.value||m.value&&(T.maxWidth=`${100/v.value}%`),T}),y=T=>{r.value=T},w=T=>{const L=T==="wait",P={transitionDelay:`${L?"-":""}${150*r.value}ms`},R=T===a.props.processStatus||L?0:100;P.borderWidth=R&&!h.value?"1px":0,P[a.props.direction==="vertical"?"height":"width"]=`${R}%`,l.value=P},x=T=>{T>r.value?n.value=a.props.finishStatus:T===r.value&&d.value!=="error"?n.value=a.props.processStatus:n.value="wait";const L=a.steps.value[r.value-1];L&&L.calcProgress(n.value)},$=Dt({uid:i.uid,currentStatus:c,setIndex:y,calcProgress:w});return a.addStep($),(T,L)=>(b(),M("div",{style:Je(s(g)),class:O(s(_))},[se(" icon & line "),E("div",{class:O([s(o).e("head"),s(o).is(s(c))])},[s(h)?se("v-if",!0):(b(),M("div",{key:0,class:O(s(o).e("line"))},[E("i",{class:O(s(o).e("line-inner")),style:Je(l.value)},null,6)],2)),E("div",{class:O([s(o).e("icon"),s(o).is(T.icon||T.$slots.icon?"icon":"text")])},[be(T.$slots,"icon",{},()=>[T.icon?(b(),he(s(Ze),{key:0,class:O(s(o).e("icon-inner"))},{default:le(()=>[(b(),he(Et(T.icon)))]),_:1},8,["class"])):s(c)==="success"?(b(),he(s(Ze),{key:1,class:O([s(o).e("icon-inner"),s(o).is("status")])},{default:le(()=>[te(s(Li))]),_:1},8,["class"])):s(c)==="error"?(b(),he(s(Ze),{key:2,class:O([s(o).e("icon-inner"),s(o).is("status")])},{default:le(()=>[te(s(Jr))]),_:1},8,["class"])):s(h)?se("v-if",!0):(b(),M("div",{key:3,class:O(s(o).e("icon-inner"))},$e(r.value+1),3))])],2)],2),se(" title & description "),E("div",{class:O(s(o).e("main"))},[E("div",{class:O([s(o).e("title"),s(o).is(s(c))])},[be(T.$slots,"title",{},()=>[Ct($e(T.title),1)])],2),s(h)?(b(),M("div",{key:0,class:O(s(o).e("arrow"))},null,2)):(b(),M("div",{key:1,class:O([s(o).e("description"),s(o).is(s(c))])},[be(T.$slots,"description",{},()=>[Ct($e(T.description),1)])],2))],2)],6))}});var E8=Le(Hle,[["__file","item.vue"]]);const Fle=yt(Vle,{Step:E8}),jle=co(E8),Kle=Pe({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:e6},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},inactiveActionIcon:{type:Xt},activeActionIcon:{type:Xt},activeIcon:{type:Xt},inactiveIcon:{type:Xt},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:ue(Function)},id:String,tabindex:{type:[String,Number]},label:{type:String,default:void 0},...Zo(["ariaLabel"])}),Ule={[St]:e=>Co(e)||ut(e)||st(e),[ro]:e=>Co(e)||ut(e)||st(e),[yr]:e=>Co(e)||ut(e)||st(e)},Wle=["onClick"],qle=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"],Yle=["aria-hidden"],Gle=["aria-hidden"],Xle=["aria-hidden"],T8="ElSwitch",Zle=N({...N({name:T8}),props:Kle,emits:Ule,setup(e,{expose:t,emit:o}){const r=e,{formItem:l}=sr(),n=So(),a=ze("switch"),{inputId:i}=bl(r,{formItemContext:l}),c=xr(C(()=>r.loading)),d=D(r.modelValue!==!1),u=D(),p=D(),h=C(()=>[a.b(),a.m(n.value),a.is("disabled",c.value),a.is("checked",g.value)]),v=C(()=>[a.e("label"),a.em("label","left"),a.is("active",!g.value)]),m=C(()=>[a.e("label"),a.em("label","right"),a.is("active",g.value)]),f=C(()=>({width:go(r.width)}));Se(()=>r.modelValue,()=>{d.value=!0});const _=C(()=>d.value?r.modelValue:!1),g=C(()=>_.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(_.value)||(o(St,r.inactiveValue),o(ro,r.inactiveValue),o(yr,r.inactiveValue)),Se(g,$=>{var T;u.value.checked=$,r.validateEvent&&((T=l==null?void 0:l.validate)==null||T.call(l,"change").catch(L=>void 0))});const y=()=>{const $=g.value?r.inactiveValue:r.activeValue;o(St,$),o(ro,$),o(yr,$),et(()=>{u.value.checked=g.value})},w=()=>{if(c.value)return;const{beforeChange:$}=r;if(!$){y();return}const T=$();[Es(T),Co(T)].includes(!0)||Io(T8,"beforeChange must return type `Promise` or `boolean`"),Es(T)?T.then(P=>{P&&y()}).catch(P=>{}):T&&y()},x=()=>{var $,T;(T=($=u.value)==null?void 0:$.focus)==null||T.call($)};return ft(()=>{u.value.checked=g.value}),Lo({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-switch",ref:"https://element-plus.org/en-US/component/switch.html"},C(()=>!!r.label)),t({focus:x,checked:g}),($,T)=>(b(),M("div",{class:O(s(h)),onClick:ct(w,["prevent"])},[E("input",{id:s(i),ref_key:"input",ref:u,class:O(s(a).e("input")),type:"checkbox",role:"switch","aria-checked":s(g),"aria-disabled":s(c),"aria-label":$.label||$.ariaLabel,name:$.name,"true-value":$.activeValue,"false-value":$.inactiveValue,disabled:s(c),tabindex:$.tabindex,onChange:y,onKeydown:Gt(w,["enter"])},null,42,qle),!$.inlinePrompt&&($.inactiveIcon||$.inactiveText)?(b(),M("span",{key:0,class:O(s(v))},[$.inactiveIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.inactiveIcon)))]),_:1})):se("v-if",!0),!$.inactiveIcon&&$.inactiveText?(b(),M("span",{key:1,"aria-hidden":s(g)},$e($.inactiveText),9,Yle)):se("v-if",!0)],2)):se("v-if",!0),E("span",{ref_key:"core",ref:p,class:O(s(a).e("core")),style:Je(s(f))},[$.inlinePrompt?(b(),M("div",{key:0,class:O(s(a).e("inner"))},[$.activeIcon||$.inactiveIcon?(b(),he(s(Ze),{key:0,class:O(s(a).is("icon"))},{default:le(()=>[(b(),he(Et(s(g)?$.activeIcon:$.inactiveIcon)))]),_:1},8,["class"])):$.activeText||$.inactiveText?(b(),M("span",{key:1,class:O(s(a).is("text")),"aria-hidden":!s(g)},$e(s(g)?$.activeText:$.inactiveText),11,Gle)):se("v-if",!0)],2)):se("v-if",!0),E("div",{class:O(s(a).e("action"))},[$.loading?(b(),he(s(Ze),{key:0,class:O(s(a).is("loading"))},{default:le(()=>[te(s(vn))]),_:1},8,["class"])):s(g)?be($.$slots,"active-action",{key:1},()=>[$.activeActionIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.activeActionIcon)))]),_:1})):se("v-if",!0)]):s(g)?se("v-if",!0):be($.$slots,"inactive-action",{key:2},()=>[$.inactiveActionIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.inactiveActionIcon)))]),_:1})):se("v-if",!0)])],2)],6),!$.inlinePrompt&&($.activeIcon||$.activeText)?(b(),M("span",{key:1,class:O(s(m))},[$.activeIcon?(b(),he(s(Ze),{key:0},{default:le(()=>[(b(),he(Et($.activeIcon)))]),_:1})):se("v-if",!0),!$.activeIcon&&$.activeText?(b(),M("span",{key:1,"aria-hidden":!s(g)},$e($.activeText),9,Xle)):se("v-if",!0)],2)):se("v-if",!0)],10,Wle))}});var Jle=Le(Zle,[["__file","switch.vue"]]);const Qle=yt(Jle),f2=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},ene=function(e,t,o,r,l){if(!t&&!r&&(!l||Array.isArray(l)&&!l.length))return e;typeof o=="string"?o=o==="descending"?-1:1:o=o&&o<0?-1:1;const n=r?null:function(i,c){return l?(Array.isArray(l)||(l=[l]),l.map(d=>typeof d=="string"?wo(i,d):d(i,c,e))):(t!=="$key"&&xt(i)&&"$value"in i&&(i=i.$value),[xt(i)?wo(i,t):i])},a=function(i,c){if(r)return r(i.value,c.value);for(let d=0,u=i.key.length;dc.key[d])return 1}return 0};return e.map((i,c)=>({value:i,index:c,key:n?n(i,c):null})).sort((i,c)=>{let d=a(i,c);return d||(d=i.index-c.index),d*+o}).map(i=>i.value)},$8=function(e,t){let o=null;return e.columns.forEach(r=>{r.id===t&&(o=r)}),o},tne=function(e,t){let o=null;for(let r=0;r{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const o=t.split(".");let r=e;for(const l of o)r=r[l];return`${r}`}else if(typeof t=="function")return t.call(null,e)},ei=function(e,t){const o={};return(e||[]).forEach((r,l)=>{o[tr(r,t)]={row:r,index:l}}),o};function one(e,t){const o={};let r;for(r in e)o[r]=e[r];for(r in t)if(Pt(t,r)){const l=t[r];typeof l<"u"&&(o[r]=l)}return o}function h2(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function A8(e){return e===""||e!==void 0&&(e=h2(e),Number.isNaN(e)&&(e=80)),e}function rne(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function lne(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...r)=>t(o(...r)))}function Kc(e,t,o){let r=!1;const l=e.indexOf(t),n=l!==-1,a=i=>{i==="add"?e.push(t):e.splice(l,1),r=!0,Ke(t.children)&&t.children.forEach(c=>{Kc(e,c,o??!n)})};return Co(o)?o&&!n?a("add"):!o&&n&&a("remove"):a(n?"remove":"add"),r}function nne(e,t,o="children",r="hasChildren"){const l=a=>!(Array.isArray(a)&&a.length);function n(a,i,c){t(a,i,c),i.forEach(d=>{if(d[r]){t(d,null,c+1);return}const u=d[o];l(u)||n(d,u,c+1)})}e.forEach(a=>{if(a[r]){t(a,null,0);return}const i=a[o];l(i)||n(a,i,0)})}let nl=null;function ane(e,t,o,r){if((nl==null?void 0:nl.trigger)===o)return;nl==null||nl();const l=r==null?void 0:r.refs.tableWrapper,n=l==null?void 0:l.dataset.prefix,a={strategy:"fixed",...e.popperOptions},i=te(ur,{content:t,virtualTriggering:!0,virtualRef:o,appendTo:l,placement:"top",transition:"none",offset:0,hideAfter:0,...e,popperOptions:a,onHide:()=>{nl==null||nl()}});i.appContext={...r.appContext,...r};const c=document.createElement("div");jn(i,c),i.component.exposed.onOpen();const d=l==null?void 0:l.querySelector(`.${n}-scrollbar__wrap`);nl=()=>{jn(null,c),d==null||d.removeEventListener("scroll",nl),nl=null},nl.trigger=o,d==null||d.addEventListener("scroll",nl)}function z8(e){return e.children?Tz(e.children,z8):[e]}function I8(e,t){return e+t.colSpan}const O8=(e,t,o,r)=>{let l=0,n=e;const a=o.states.columns.value;if(r){const c=z8(r[e]);l=a.slice(0,a.indexOf(c[0])).reduce(I8,0),n=l+c.reduce(I8,0)-1}else l=e;let i;switch(t){case"left":n=a.length-o.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:n=a.length-o.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:l,after:n}:{}},v2=(e,t,o,r,l,n=0)=>{const a=[],{direction:i,start:c,after:d}=O8(t,o,r,l);if(i){const u=i==="left";a.push(`${e}-fixed-column--${i}`),u&&d+n===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!u&&c-n===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function N8(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const m2=(e,t,o,r)=>{const{direction:l,start:n=0,after:a=0}=O8(e,t,o,r);if(!l)return;const i={},c=l==="left",d=o.states.columns.value;return c?i.left=d.slice(0,n).reduce(N8,0):i.right=d.slice(a+1).reverse().reduce(N8,0),i},ds=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function ine(e){const t=wt(),o=D(!1),r=D([]);return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(o.value)r.value=c.slice();else if(d){const u=ei(r.value,d);r.value=c.reduce((p,h)=>{const v=tr(h,d);return u[v]&&p.push(h),p},[])}else r.value=[]},toggleRowExpansion:(c,d)=>{Kc(r.value,c,d)&&t.emit("expand-change",c,r.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],u=e.rowKey.value,p=ei(d,u);r.value=c.reduce((h,v)=>{const m=p[v];return m&&h.push(m.row),h},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!ei(r.value,d)[tr(c,d)]:r.value.includes(c)},states:{expandRows:r,defaultExpandAll:o}}}function sne(e){const t=wt(),o=D(null),r=D(null),l=d=>{t.store.assertRowKey(),o.value=d,a(d)},n=()=>{o.value=null},a=d=>{const{data:u,rowKey:p}=e;let h=null;p.value&&(h=(s(u)||[]).find(v=>tr(v,p.value)===d)),r.value=h,t.emit("current-change",r.value,null)};return{setCurrentRowKey:l,restoreCurrentRowKey:n,setCurrentRowByKey:a,updateCurrentRow:d=>{const u=r.value;if(d&&d!==u){r.value=d,t.emit("current-change",r.value,u);return}!d&&u&&(r.value=null,t.emit("current-change",null,u))},updateCurrentRowData:()=>{const d=e.rowKey.value,u=e.data.value||[],p=r.value;if(!u.includes(p)&&p){if(d){const h=tr(p,d);a(h)}else r.value=null;r.value===null&&t.emit("current-change",null,p)}else o.value&&(a(o.value),n())},states:{_currentRowKey:o,currentRow:r}}}function cne(e){const t=D([]),o=D({}),r=D(16),l=D(!1),n=D({}),a=D("hasChildren"),i=D("children"),c=wt(),d=C(()=>{if(!e.rowKey.value)return{};const g=e.data.value||[];return p(g)}),u=C(()=>{const g=e.rowKey.value,y=Object.keys(n.value),w={};return y.length&&y.forEach(x=>{if(n.value[x].length){const $={children:[]};n.value[x].forEach(T=>{const L=tr(T,g);$.children.push(L),T[a.value]&&!w[L]&&(w[L]={children:[]})}),w[x]=$}}),w}),p=g=>{const y=e.rowKey.value,w={};return nne(g,(x,$,T)=>{const L=tr(x,y);Array.isArray($)?w[L]={children:$.map(P=>tr(P,y)),level:T}:l.value&&(w[L]={children:[],lazy:!0,level:T})},i.value,a.value),w},h=(g=!1,y=(w=>(w=c.store)==null?void 0:w.states.defaultExpandAll.value)())=>{var w;const x=d.value,$=u.value,T=Object.keys(x),L={};if(T.length){const P=s(o),R=[],V=(F,Q)=>{if(g)return t.value?y||t.value.includes(Q):!!(y||F!=null&&F.expanded);{const J=y||t.value&&t.value.includes(Q);return!!(F!=null&&F.expanded||J)}};T.forEach(F=>{const Q=P[F],J={...x[F]};if(J.expanded=V(Q,F),J.lazy){const{loaded:Z=!1,loading:H=!1}=Q||{};J.loaded=!!Z,J.loading=!!H,R.push(F)}L[F]=J});const B=Object.keys($);l.value&&B.length&&R.length&&B.forEach(F=>{const Q=P[F],J=$[F].children;if(R.includes(F)){if(L[F].children.length!==0)throw new Error("[ElTable]children must be an empty array.");L[F].children=J}else{const{loaded:Z=!1,loading:H=!1}=Q||{};L[F]={lazy:!0,loaded:!!Z,loading:!!H,expanded:V(Q,F),children:J,level:""}}})}o.value=L,(w=c.store)==null||w.updateTableScrollY()};Se(()=>t.value,()=>{h(!0)}),Se(()=>d.value,()=>{h()}),Se(()=>u.value,()=>{h()});const v=g=>{t.value=g,h()},m=(g,y)=>{c.store.assertRowKey();const w=e.rowKey.value,x=tr(g,w),$=x&&o.value[x];if(x&&$&&"expanded"in $){const T=$.expanded;y=typeof y>"u"?!$.expanded:y,o.value[x].expanded=y,T!==y&&c.emit("expand-change",g,y),c.store.updateTableScrollY()}},f=g=>{c.store.assertRowKey();const y=e.rowKey.value,w=tr(g,y),x=o.value[w];l.value&&x&&"loaded"in x&&!x.loaded?_(g,w,x):m(g,void 0)},_=(g,y,w)=>{const{load:x}=c.props;x&&!o.value[y].loaded&&(o.value[y].loading=!0,x(g,w,$=>{if(!Array.isArray($))throw new TypeError("[ElTable] data must be an array");o.value[y].loading=!1,o.value[y].loaded=!0,o.value[y].expanded=!0,$.length&&(n.value[y]=$),c.emit("expand-change",g,!0)}))};return{loadData:_,loadOrToggle:f,toggleTreeExpansion:m,updateTreeExpandKeys:v,updateTreeData:h,normalize:p,states:{expandRowKeys:t,treeData:o,indent:r,lazy:l,lazyTreeNodeMap:n,lazyColumnIdentifier:a,childrenColumnName:i}}}const une=(e,t)=>{const o=t.sortingColumn;return!o||typeof o.sortable=="string"?e:ene(e,t.sortProp,t.sortOrder,o.sortMethod,o.sortBy)},Np=e=>{const t=[];return e.forEach(o=>{o.children&&o.children.length>0?t.push.apply(t,Np(o.children)):t.push(o)}),t};function dne(){var e;const t=wt(),{size:o}=Bo((e=t.proxy)==null?void 0:e.$props),r=D(null),l=D([]),n=D([]),a=D(!1),i=D([]),c=D([]),d=D([]),u=D([]),p=D([]),h=D([]),v=D([]),m=D([]),f=[],_=D(0),g=D(0),y=D(0),w=D(!1),x=D([]),$=D(!1),T=D(!1),L=D(null),P=D({}),R=D(null),V=D(null),B=D(null),F=D(null),Q=D(null);Se(l,()=>t.state&&j(!1),{deep:!0});const J=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},Z=Y=>{var S;(S=Y.children)==null||S.forEach(A=>{A.fixed=Y.fixed,Z(A)})},H=()=>{i.value.forEach(X=>{Z(X)}),u.value=i.value.filter(X=>X.fixed===!0||X.fixed==="left"),p.value=i.value.filter(X=>X.fixed==="right"),u.value.length>0&&i.value[0]&&i.value[0].type==="selection"&&!i.value[0].fixed&&(i.value[0].fixed=!0,u.value.unshift(i.value[0]));const Y=i.value.filter(X=>!X.fixed);c.value=[].concat(u.value).concat(Y).concat(p.value);const S=Np(Y),A=Np(u.value),G=Np(p.value);_.value=S.length,g.value=A.length,y.value=G.length,d.value=[].concat(A).concat(S).concat(G),a.value=u.value.length>0||p.value.length>0},j=(Y,S=!1)=>{Y&&H(),S?t.state.doLayout():t.state.debouncedUpdateLayout()},K=Y=>x.value.includes(Y),I=()=>{w.value=!1;const Y=x.value;x.value=[],Y.length&&t.emit("selection-change",[])},U=()=>{let Y;if(r.value){Y=[];const S=ei(x.value,r.value),A=ei(l.value,r.value);for(const G in S)Pt(S,G)&&!A[G]&&Y.push(S[G].row)}else Y=x.value.filter(S=>!l.value.includes(S));if(Y.length){const S=x.value.filter(A=>!Y.includes(A));x.value=S,t.emit("selection-change",S.slice())}},oe=()=>(x.value||[]).slice(),ne=(Y,S=void 0,A=!0)=>{if(Kc(x.value,Y,S)){const X=(x.value||[]).slice();A&&t.emit("select",X,Y),t.emit("selection-change",X)}},ce=()=>{var Y,S;const A=T.value?!w.value:!(w.value||x.value.length);w.value=A;let G=!1,X=0;const re=(S=(Y=t==null?void 0:t.store)==null?void 0:Y.states)==null?void 0:S.rowKey.value;l.value.forEach((ge,fe)=>{const Fe=fe+X;L.value?L.value.call(null,ge,Fe)&&Kc(x.value,ge,A)&&(G=!0):Kc(x.value,ge,A)&&(G=!0),X+=de(tr(ge,re))}),G&&t.emit("selection-change",x.value?x.value.slice():[]),t.emit("select-all",(x.value||[]).slice())},ee=()=>{const Y=ei(x.value,r.value);l.value.forEach(S=>{const A=tr(S,r.value),G=Y[A];G&&(x.value[G.index]=S)})},Me=()=>{var Y,S,A;if(((Y=l.value)==null?void 0:Y.length)===0){w.value=!1;return}let G;r.value&&(G=ei(x.value,r.value));const X=function(Fe){return G?!!G[tr(Fe,r.value)]:x.value.includes(Fe)};let re=!0,ge=0,fe=0;for(let Fe=0,at=(l.value||[]).length;Fe{var S;if(!t||!t.store)return 0;const{treeData:A}=t.store.states;let G=0;const X=(S=A.value[Y])==null?void 0:S.children;return X&&(G+=X.length,X.forEach(re=>{G+=de(re)})),G},_e=(Y,S)=>{Array.isArray(Y)||(Y=[Y]);const A={};return Y.forEach(G=>{P.value[G.id]=S,A[G.columnKey||G.id]=S}),A},me=(Y,S,A)=>{V.value&&V.value!==Y&&(V.value.order=null),V.value=Y,B.value=S,F.value=A},Re=()=>{let Y=s(n);Object.keys(P.value).forEach(S=>{const A=P.value[S];if(!A||A.length===0)return;const G=$8({columns:d.value},S);G&&G.filterMethod&&(Y=Y.filter(X=>A.some(re=>G.filterMethod.call(null,re,X,G))))}),R.value=Y},Ce=()=>{l.value=une(R.value,{sortingColumn:V.value,sortProp:B.value,sortOrder:F.value})},Ee=(Y=void 0)=>{Y&&Y.filter||Re(),Ce()},De=Y=>{const{tableHeaderRef:S}=t.refs;if(!S)return;const A=Object.assign({},S.filterPanels),G=Object.keys(A);if(G.length)if(typeof Y=="string"&&(Y=[Y]),Array.isArray(Y)){const X=Y.map(re=>tne({columns:d.value},re));G.forEach(re=>{const ge=X.find(fe=>fe.id===re);ge&&(ge.filteredValue=[])}),t.store.commit("filterChange",{column:X,values:[],silent:!0,multi:!0})}else G.forEach(X=>{const re=d.value.find(ge=>ge.id===X);re&&(re.filteredValue=[])}),P.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},ae=()=>{V.value&&(me(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:pe,toggleRowExpansion:ke,updateExpandRows:Oe,states:we,isRowExpanded:Te}=ine({data:l,rowKey:r}),{updateTreeExpandKeys:Ne,toggleTreeExpansion:Ie,updateTreeData:Ae,loadOrToggle:xe,states:We}=cne({data:l,rowKey:r}),{updateCurrentRowData:qe,updateCurrentRow:ye,setCurrentRowKey:Ye,states:tt}=sne({data:l,rowKey:r});return{assertRowKey:J,updateColumns:H,scheduleLayout:j,isSelected:K,clearSelection:I,cleanSelection:U,getSelectionRows:oe,toggleRowSelection:ne,_toggleAllSelection:ce,toggleAllSelection:null,updateSelectionByRowKey:ee,updateAllSelected:Me,updateFilters:_e,updateCurrentRow:ye,updateSort:me,execFilter:Re,execSort:Ce,execQuery:Ee,clearFilter:De,clearSort:ae,toggleRowExpansion:ke,setExpandRowKeysAdapter:Y=>{pe(Y),Ne(Y)},setCurrentRowKey:Ye,toggleRowExpansionAdapter:(Y,S)=>{d.value.some(({type:G})=>G==="expand")?ke(Y,S):Ie(Y,S)},isRowExpanded:Te,updateExpandRows:Oe,updateCurrentRowData:qe,loadOrToggle:xe,updateTreeData:Ae,states:{tableSize:o,rowKey:r,data:l,_data:n,isComplex:a,_columns:i,originColumns:c,columns:d,fixedColumns:u,rightFixedColumns:p,leafColumns:h,fixedLeafColumns:v,rightFixedLeafColumns:m,updateOrderFns:f,leafColumnsLength:_,fixedLeafColumnsLength:g,rightFixedLeafColumnsLength:y,isAllSelected:w,selection:x,reserveSelection:$,selectOnIndeterminate:T,selectable:L,filters:P,filteredData:R,sortingColumn:V,sortProp:B,sortOrder:F,hoverRow:Q,...we,...We,...tt}}}function g2(e,t){return e.map(o=>{var r;return o.id===t.id?t:((r=o.children)!=null&&r.length&&(o.children=g2(o.children,t)),o)})}function b2(e){e.forEach(t=>{var o,r;t.no=(o=t.getColumnIndex)==null?void 0:o.call(t),(r=t.children)!=null&&r.length&&b2(t.children)}),e.sort((t,o)=>t.no-o.no)}function pne(){const e=wt(),t=dne();return{ns:ze("table"),...t,mutations:{setData(a,i){const c=s(a._data)!==i;a.data.value=i,a._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),s(a.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(a,i,c,d){const u=s(a._columns);let p=[];c?(c&&!c.children&&(c.children=[]),c.children.push(i),p=g2(u,c)):(u.push(i),p=u),b2(p),a._columns.value=p,a.updateOrderFns.push(d),i.type==="selection"&&(a.selectable.value=i.selectable,a.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(a,i){var c;((c=i.getColumnIndex)==null?void 0:c.call(i))!==i.no&&(b2(a._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(a,i,c,d){const u=s(a._columns)||[];if(c)c.children.splice(c.children.findIndex(h=>h.id===i.id),1),et(()=>{var h;((h=c.children)==null?void 0:h.length)===0&&delete c.children}),a._columns.value=g2(u,c);else{const h=u.indexOf(i);h>-1&&(u.splice(h,1),a._columns.value=u)}const p=a.updateOrderFns.indexOf(d);p>-1&&a.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(a,i){const{prop:c,order:d,init:u}=i;if(c){const p=s(a.columns).find(h=>h.property===c);p&&(p.order=d,e.store.updateSort(p,c,d),e.store.commit("changeSortCondition",{init:u}))}},changeSortCondition(a,i){const{sortingColumn:c,sortProp:d,sortOrder:u}=a,p=s(c),h=s(d),v=s(u);v===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const m={filter:!0};e.store.execQuery(m),(!i||!(i.silent||i.init))&&e.emit("sort-change",{column:p,prop:h,order:v}),e.store.updateTableScrollY()},filterChange(a,i){const{column:c,values:d,silent:u}=i,p=e.store.updateFilters(c,d);e.store.execQuery(),u||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(a,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(a,i){a.hoverRow.value=i},setCurrentRow(a,i){e.store.updateCurrentRow(i)}},commit:function(a,...i){const c=e.store.mutations;if(c[a])c[a].apply(e,[e.store.states].concat(i));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){et(()=>e.layout.updateScrollY.apply(e.layout))}}}const Uc={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function fne(e,t){if(!e)throw new Error("Table is required.");const o=pne();return o.toggleAllSelection=Mr(o._toggleAllSelection,10),Object.keys(Uc).forEach(r=>{P8(R8(t,r),r,o)}),hne(o,t),o}function hne(e,t){Object.keys(Uc).forEach(o=>{Se(()=>R8(t,o),r=>{P8(r,o,e)})})}function P8(e,t,o){let r=e,l=Uc[t];typeof Uc[t]=="object"&&(l=l.key,r=r||Uc[t].default),o.states[l].value=r}function R8(e,t){if(t.includes(".")){const o=t.split(".");let r=e;return o.forEach(l=>{r=r[l]}),r}else return e[t]}class vne{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=D(null),this.scrollX=D(!1),this.scrollY=D(!1),this.bodyWidth=D(null),this.fixedWidth=D(null),this.rightFixedWidth=D(null),this.gutterWidth=0;for(const o in t)Pt(t,o)&&(Zt(this[o])?this[o].value=t[o]:this[o]=t[o]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const o=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(o!=null&&o.wrapRef)){let r=!0;const l=this.scrollY.value;return r=o.wrapRef.scrollHeight>o.wrapRef.clientHeight,this.scrollY.value=r,l!==r}return!1}setHeight(t,o="height"){if(!Nt)return;const r=this.table.vnode.el;if(t=rne(t),this.height.value=Number(t),!r&&(t||t===0))return et(()=>this.setHeight(t,o));typeof t=="number"?(r.style[o]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(r.style[o]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?t.push.apply(t,r.columns):t.push(r)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let o=t;for(;o.tagName!=="DIV";){if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}updateColumnsWidth(){if(!Nt)return;const t=this.fit,o=this.table.vnode.el.clientWidth;let r=0;const l=this.getFlattenColumns(),n=l.filter(c=>typeof c.width!="number");if(l.forEach(c=>{typeof c.width=="number"&&c.realWidth&&(c.realWidth=null)}),n.length>0&&t){if(l.forEach(c=>{r+=Number(c.width||c.minWidth||80)}),r<=o){this.scrollX.value=!1;const c=o-r;if(n.length===1)n[0].realWidth=Number(n[0].minWidth||80)+c;else{const d=n.reduce((h,v)=>h+Number(v.minWidth||80),0),u=c/d;let p=0;n.forEach((h,v)=>{if(v===0)return;const m=Math.floor(Number(h.minWidth||80)*u);p+=m,h.realWidth=Number(h.minWidth||80)+m}),n[0].realWidth=Number(n[0].minWidth||80)+c-p}}else this.scrollX.value=!0,n.forEach(c=>{c.realWidth=Number(c.minWidth)});this.bodyWidth.value=Math.max(r,o),this.table.state.resizeState.value.width=this.bodyWidth.value}else l.forEach(c=>{!c.width&&!c.minWidth?c.realWidth=80:c.realWidth=Number(c.width||c.minWidth),r+=c.realWidth}),this.scrollX.value=r>o,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let c=0;a.forEach(d=>{c+=Number(d.realWidth||d.width)}),this.fixedWidth.value=c}const i=this.store.states.rightFixedColumns.value;if(i.length>0){let c=0;i.forEach(d=>{c+=Number(d.realWidth||d.width)}),this.rightFixedWidth.value=c}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const o=this.observers.indexOf(t);o!==-1&&this.observers.splice(o,1)}notifyObservers(t){this.observers.forEach(r=>{var l,n;switch(t){case"columns":(l=r.state)==null||l.onColumnsChange(this);break;case"scrollable":(n=r.state)==null||n.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:mne}=rl,gne=N({name:"ElTableFilterPanel",components:{ElCheckbox:rl,ElCheckboxGroup:mne,ElScrollbar:wn,ElTooltip:ur,ElIcon:Ze,ArrowDown:Pl,ArrowUp:Md},directives:{ClickOutside:xn},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=wt(),{t:o}=Rt(),r=ze("table-filter"),l=t==null?void 0:t.parent;l.filterPanels.value[e.column.id]||(l.filterPanels.value[e.column.id]=t);const n=D(!1),a=D(null),i=C(()=>e.column&&e.column.filters),c=C(()=>e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),d=C({get:()=>{var $;return((($=e.column)==null?void 0:$.filteredValue)||[])[0]},set:$=>{u.value&&(typeof $<"u"&&$!==null?u.value.splice(0,1,$):u.value.splice(0,1))}}),u=C({get(){return e.column?e.column.filteredValue||[]:[]},set($){e.column&&e.upDataColumn("filteredValue",$)}}),p=C(()=>e.column?e.column.filterMultiple:!0),h=$=>$.value===d.value,v=()=>{n.value=!1},m=$=>{$.stopPropagation(),n.value=!n.value},f=()=>{n.value=!1},_=()=>{w(u.value),v()},g=()=>{u.value=[],w(u.value),v()},y=$=>{d.value=$,w(typeof $<"u"&&$!==null?u.value:[]),v()},w=$=>{e.store.commit("filterChange",{column:e.column,values:$}),e.store.updateAllSelected()};Se(n,$=>{e.column&&e.upDataColumn("filterOpened",$)},{immediate:!0});const x=C(()=>{var $,T;return(T=($=a.value)==null?void 0:$.popperRef)==null?void 0:T.contentRef});return{tooltipVisible:n,multiple:p,filterClassName:c,filteredValue:u,filterValue:d,filters:i,handleConfirm:_,handleReset:g,handleSelect:y,isActive:h,t:o,ns:r,showFilterPanel:m,hideFilterPanel:f,popperPaneRef:x,tooltip:a}}}),bne={key:0},_ne=["disabled"],wne=["label","onClick"];function yne(e,t,o,r,l,n){const a=nt("el-checkbox"),i=nt("el-checkbox-group"),c=nt("el-scrollbar"),d=nt("arrow-up"),u=nt("arrow-down"),p=nt("el-icon"),h=nt("el-tooltip"),v=Iu("click-outside");return b(),he(h,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:le(()=>[e.multiple?(b(),M("div",bne,[E("div",{class:O(e.ns.e("content"))},[te(c,{"wrap-class":e.ns.e("wrap")},{default:le(()=>[te(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=m=>e.filteredValue=m),class:O(e.ns.e("checkbox-group"))},{default:le(()=>[(b(!0),M(Qe,null,It(e.filters,m=>(b(),he(a,{key:m.value,value:m.value},{default:le(()=>[Ct($e(m.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),E("div",{class:O(e.ns.e("bottom"))},[E("button",{class:O({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...m)=>e.handleConfirm&&e.handleConfirm(...m))},$e(e.t("el.table.confirmFilter")),11,_ne),E("button",{type:"button",onClick:t[2]||(t[2]=(...m)=>e.handleReset&&e.handleReset(...m))},$e(e.t("el.table.resetFilter")),1)],2)])):(b(),M("ul",{key:1,class:O(e.ns.e("list"))},[E("li",{class:O([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=m=>e.handleSelect(null))},$e(e.t("el.table.clearFilter")),3),(b(!0),M(Qe,null,It(e.filters,m=>(b(),M("li",{key:m.value,class:O([e.ns.e("list-item"),e.ns.is("active",e.isActive(m))]),label:m.value,onClick:f=>e.handleSelect(m.value)},$e(m.text),11,wne))),128))],2))]),default:le(()=>[mt((b(),M("span",{class:O([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...m)=>e.showFilterPanel&&e.showFilterPanel(...m))},[te(p,null,{default:le(()=>[e.column.filterOpened?(b(),he(d,{key:0})):(b(),he(u,{key:1}))]),_:1})],2)),[[v,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var xne=Le(gne,[["render",yne],["__file","filter-panel.vue"]]);function L8(e){const t=wt();Nu(()=>{o.value.addObserver(t)}),ft(()=>{r(o.value),l(o.value)}),rn(()=>{r(o.value),l(o.value)}),Rn(()=>{o.value.removeObserver(t)});const o=C(()=>{const n=e.layout;if(!n)throw new Error("Can not find table layout.");return n}),r=n=>{var a;const i=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!i.length)return;const c=n.getFlattenColumns(),d={};c.forEach(u=>{d[u.id]=u});for(let u=0,p=i.length;u{var a,i;const c=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,p=c.length;u{f.stopPropagation()},n=(f,_)=>{!_.filters&&_.sortable?m(f,_,!1):_.filterable&&!_.sortable&&l(f),r==null||r.emit("header-click",_,f)},a=(f,_)=>{r==null||r.emit("header-contextmenu",_,f)},i=D(null),c=D(!1),d=D({}),u=(f,_)=>{if(Nt&&!(_.children&&_.children.length>0)&&i.value&&e.border){c.value=!0;const g=r;t("set-drag-visible",!0);const w=(g==null?void 0:g.vnode.el).getBoundingClientRect().left,x=o.vnode.el.querySelector(`th.${_.id}`),$=x.getBoundingClientRect(),T=$.left-w+30;Zr(x,"noclick"),d.value={startMouseLeft:f.clientX,startLeft:$.right-w,startColumnLeft:$.left-w,tableLeft:w};const L=g==null?void 0:g.refs.resizeProxy;L.style.left=`${d.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const P=V=>{const B=V.clientX-d.value.startMouseLeft,F=d.value.startLeft+B;L.style.left=`${Math.max(T,F)}px`},R=()=>{if(c.value){const{startColumnLeft:V,startLeft:B}=d.value,Q=Number.parseInt(L.style.left,10)-V;_.width=_.realWidth=Q,g==null||g.emit("header-dragend",_.width,B-V,_,f),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",c.value=!1,i.value=null,d.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",R),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ar(x,"noclick")},0)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",R)}},p=(f,_)=>{if(_.children&&_.children.length>0)return;const g=f.target;if(!Gr(g))return;const y=g==null?void 0:g.closest("th");if(!(!_||!_.resizable)&&!c.value&&e.border){const w=y.getBoundingClientRect(),x=document.body.style;w.width>12&&w.right-f.pageX<8?(x.cursor="col-resize",Xr(y,"is-sortable")&&(y.style.cursor="col-resize"),i.value=_):c.value||(x.cursor="",Xr(y,"is-sortable")&&(y.style.cursor="pointer"),i.value=null)}},h=()=>{Nt&&(document.body.style.cursor="")},v=({order:f,sortOrders:_})=>{if(f==="")return _[0];const g=_.indexOf(f||null);return _[g>_.length-2?0:g+1]},m=(f,_,g)=>{var y;f.stopPropagation();const w=_.order===g?null:g||v(_),x=(y=f.target)==null?void 0:y.closest("th");if(x&&Xr(x,"noclick")){ar(x,"noclick");return}if(!_.sortable)return;const $=e.store.states;let T=$.sortProp.value,L;const P=$.sortingColumn.value;(P!==_||P===_&&P.order===null)&&(P&&(P.order=null),$.sortingColumn.value=_,T=_.property),w?L=_.order=w:L=_.order=null,$.sortProp.value=T,$.sortOrder.value=L,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:n,handleHeaderContextMenu:a,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:m,handleFilterClick:l}}function Cne(e){const t=Ge(Ul),o=ze("table");return{getHeaderRowStyle:i=>{const c=t==null?void 0:t.props.headerRowStyle;return typeof c=="function"?c.call(null,{rowIndex:i}):c},getHeaderRowClass:i=>{const c=[],d=t==null?void 0:t.props.headerRowClassName;return typeof d=="string"?c.push(d):typeof d=="function"&&c.push(d.call(null,{rowIndex:i})),c.join(" ")},getHeaderCellStyle:(i,c,d,u)=>{var p;let h=(p=t==null?void 0:t.props.headerCellStyle)!=null?p:{};typeof h=="function"&&(h=h.call(null,{rowIndex:i,columnIndex:c,row:d,column:u}));const v=m2(c,u.fixed,e.store,d);return ds(v,"left"),ds(v,"right"),Object.assign({},h,v)},getHeaderCellClass:(i,c,d,u)=>{const p=v2(o.b(),c,u.fixed,e.store,d),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...p];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const v=t==null?void 0:t.props.headerCellClassName;return typeof v=="string"?h.push(v):typeof v=="function"&&h.push(v.call(null,{rowIndex:i,columnIndex:c,row:d,column:u})),h.push(o.e("cell")),h.filter(m=>!!m).join(" ")}}}const B8=e=>{const t=[];return e.forEach(o=>{o.children?(t.push(o),t.push.apply(t,B8(o.children))):t.push(o)}),t},V8=e=>{let t=1;const o=(n,a)=>{if(a&&(n.level=a.level+1,t{o(c,n),i+=c.colSpan}),n.colSpan=i}else n.colSpan=1};e.forEach(n=>{n.level=1,o(n,void 0)});const r=[];for(let n=0;n{n.children?(n.rowSpan=1,n.children.forEach(a=>a.isSubColumn=!0)):n.rowSpan=t-n.level+1,r[n.level-1].push(n)}),r};function Sne(e){const t=Ge(Ul),o=C(()=>V8(e.store.states.originColumns.value));return{isGroup:C(()=>{const n=o.value.length>1;return n&&t&&(t.state.isGroup.value=!0),n}),toggleAllSelection:n=>{n.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:o}}var Ene=N({name:"ElTableHeader",components:{ElCheckbox:rl},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const o=wt(),r=Ge(Ul),l=ze("table"),n=D({}),{onColumnsChange:a,onScrollableChange:i}=L8(r);ft(async()=>{await et(),await et();const{prop:T,order:L}=e.defaultSort;r==null||r.store.commit("sort",{prop:T,order:L,init:!0})});const{handleHeaderClick:c,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:v,handleFilterClick:m}=kne(e,t),{getHeaderRowStyle:f,getHeaderRowClass:_,getHeaderCellStyle:g,getHeaderCellClass:y}=Cne(e),{isGroup:w,toggleAllSelection:x,columnRows:$}=Sne(e);return o.state={onColumnsChange:a,onScrollableChange:i},o.filterPanels=n,{ns:l,filterPanels:n,onColumnsChange:a,onScrollableChange:i,columnRows:$,getHeaderRowClass:_,getHeaderRowStyle:f,getHeaderCellClass:y,getHeaderCellStyle:g,handleHeaderClick:c,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:p,handleMouseOut:h,handleSortClick:v,handleFilterClick:m,isGroup:w,toggleAllSelection:x}},render(){const{ns:e,isGroup:t,columnRows:o,getHeaderCellStyle:r,getHeaderCellClass:l,getHeaderRowClass:n,getHeaderRowStyle:a,handleHeaderClick:i,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:u,handleSortClick:p,handleMouseOut:h,store:v,$parent:m}=this;let f=1;return rt("thead",{class:{[e.is("group")]:t}},o.map((_,g)=>rt("tr",{class:n(g),key:g,style:a(g)},_.map((y,w)=>(y.rowSpan>f&&(f=y.rowSpan),rt("th",{class:l(g,w,_,y),colspan:y.colSpan,key:`${y.id}-thead`,rowspan:y.rowSpan,style:r(g,w,_,y),onClick:x=>{x.currentTarget.classList.contains("noclick")||i(x,y)},onContextmenu:x=>c(x,y),onMousedown:x=>d(x,y),onMousemove:x=>u(x,y),onMouseout:h},[rt("div",{class:["cell",y.filteredValue&&y.filteredValue.length>0?"highlight":""]},[y.renderHeader?y.renderHeader({column:y,$index:w,store:v,_self:m}):y.label,y.sortable&&rt("span",{onClick:x=>p(x,y),class:"caret-wrapper"},[rt("i",{onClick:x=>p(x,y,"ascending"),class:"sort-caret ascending"}),rt("i",{onClick:x=>p(x,y,"descending"),class:"sort-caret descending"})]),y.filterable&&rt(xne,{store:v,placement:y.filterPlacement||"bottom-start",column:y,upDataColumn:(x,$)=>{y[x]=$}})])]))))))}});function _2(e,t,o=.01){return e-t>o}function Tne(e){const t=Ge(Ul),o=D(""),r=D(rt("div")),l=(m,f,_)=>{var g;const y=t,w=f2(m);let x;const $=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;w&&(x=M8({columns:e.store.states.columns.value},w,$),x&&(y==null||y.emit(`cell-${_}`,f,x,w,m))),y==null||y.emit(`row-${_}`,f,x,m)},n=(m,f)=>{l(m,f,"dblclick")},a=(m,f)=>{e.store.commit("setCurrentRow",f),l(m,f,"click")},i=(m,f)=>{l(m,f,"contextmenu")},c=Mr(m=>{e.store.commit("setHoverRow",m)},30),d=Mr(()=>{e.store.commit("setHoverRow",null)},30),u=m=>{const f=window.getComputedStyle(m,null),_=Number.parseInt(f.paddingLeft,10)||0,g=Number.parseInt(f.paddingRight,10)||0,y=Number.parseInt(f.paddingTop,10)||0,w=Number.parseInt(f.paddingBottom,10)||0;return{left:_,right:g,top:y,bottom:w}},p=(m,f,_)=>{let g=f.target.parentNode;for(;m>1&&(g=g==null?void 0:g.nextSibling,!(!g||g.nodeName!=="TR"));)_(g,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:n,handleClick:a,handleContextMenu:i,handleMouseEnter:c,handleMouseLeave:d,handleCellMouseEnter:(m,f,_)=>{var g;const y=t,w=f2(m),x=(g=y==null?void 0:y.vnode.el)==null?void 0:g.dataset.prefix;if(w){const I=M8({columns:e.store.states.columns.value},w,x);w.rowSpan>1&&p(w.rowSpan,m,Zr);const U=y.hoverState={cell:w,column:I,row:f};y==null||y.emit("cell-mouse-enter",U.row,U.column,U.cell,m)}if(!_)return;const $=m.target.querySelector(".cell");if(!(Xr($,`${x}-tooltip`)&&$.childNodes.length))return;const T=document.createRange();T.setStart($,0),T.setEnd($,$.childNodes.length);let{width:L,height:P}=T.getBoundingClientRect();const R=L-Math.floor(L),{width:V,height:B}=$.getBoundingClientRect();R<.001&&(L=Math.floor(L)),P-Math.floor(P)<.001&&(P=Math.floor(P));const{top:Q,left:J,right:Z,bottom:H}=u($),j=J+Z,K=Q+H;(_2(L+j,V)||_2(P+K,B)||_2($.scrollWidth,V))&&ane(_,w.innerText||w.textContent,w,y)},handleCellMouseLeave:m=>{const f=f2(m);if(!f)return;f.rowSpan>1&&p(f.rowSpan,m,ar);const _=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",_==null?void 0:_.row,_==null?void 0:_.column,_==null?void 0:_.cell,m)},tooltipContent:o,tooltipTrigger:r}}function $ne(e){const t=Ge(Ul),o=ze("table");return{getRowStyle:(d,u)=>{const p=t==null?void 0:t.props.rowStyle;return typeof p=="function"?p.call(null,{row:d,rowIndex:u}):p||null},getRowClass:(d,u)=>{const p=[o.e("row")];t!=null&&t.props.highlightCurrentRow&&d===e.store.states.currentRow.value&&p.push("current-row"),e.stripe&&u%2===1&&p.push(o.em("row","striped"));const h=t==null?void 0:t.props.rowClassName;return typeof h=="string"?p.push(h):typeof h=="function"&&p.push(h.call(null,{row:d,rowIndex:u})),p},getCellStyle:(d,u,p,h)=>{const v=t==null?void 0:t.props.cellStyle;let m=v??{};typeof v=="function"&&(m=v.call(null,{rowIndex:d,columnIndex:u,row:p,column:h}));const f=m2(u,e==null?void 0:e.fixed,e.store);return ds(f,"left"),ds(f,"right"),Object.assign({},m,f)},getCellClass:(d,u,p,h,v)=>{const m=v2(o.b(),u,e==null?void 0:e.fixed,e.store,void 0,v),f=[h.id,h.align,h.className,...m],_=t==null?void 0:t.props.cellClassName;return typeof _=="string"?f.push(_):typeof _=="function"&&f.push(_.call(null,{rowIndex:d,columnIndex:u,row:p,column:h})),f.push(o.e("cell")),f.filter(g=>!!g).join(" ")},getSpan:(d,u,p,h)=>{let v=1,m=1;const f=t==null?void 0:t.props.spanMethod;if(typeof f=="function"){const _=f({row:d,column:u,rowIndex:p,columnIndex:h});Array.isArray(_)?(v=_[0],m=_[1]):typeof _=="object"&&(v=_.rowspan,m=_.colspan)}return{rowspan:v,colspan:m}},getColspanRealWidth:(d,u,p)=>{if(u<1)return d[p].realWidth;const h=d.map(({realWidth:v,width:m})=>v||m).slice(p,p+u);return Number(h.reduce((v,m)=>Number(v)+Number(m),-1))}}}function Mne(e){const t=Ge(Ul),o=ze("table"),{handleDoubleClick:r,handleClick:l,handleContextMenu:n,handleMouseEnter:a,handleMouseLeave:i,handleCellMouseEnter:c,handleCellMouseLeave:d,tooltipContent:u,tooltipTrigger:p}=Tne(e),{getRowStyle:h,getRowClass:v,getCellStyle:m,getCellClass:f,getSpan:_,getColspanRealWidth:g}=$ne(e),y=C(()=>e.store.states.columns.value.findIndex(({type:L})=>L==="default")),w=(L,P)=>{const R=t.props.rowKey;return R?tr(L,R):P},x=(L,P,R,V=!1)=>{const{tooltipEffect:B,tooltipOptions:F,store:Q}=e,{indent:J,columns:Z}=Q.states,H=v(L,P);let j=!0;return R&&(H.push(o.em("row",`level-${R.level}`)),j=R.display),rt("tr",{style:[j?null:{display:"none"},h(L,P)],class:H,key:w(L,P),onDblclick:I=>r(I,L),onClick:I=>l(I,L),onContextmenu:I=>n(I,L),onMouseenter:()=>a(P),onMouseleave:i},Z.value.map((I,U)=>{const{rowspan:oe,colspan:ne}=_(L,I,P,U);if(!oe||!ne)return null;const ce=Object.assign({},I);ce.realWidth=g(Z.value,ne,U);const ee={store:e.store,_self:e.context||t,column:ce,row:L,$index:P,cellIndex:U,expanded:V};U===y.value&&R&&(ee.treeNode={indent:R.level*J.value,level:R.level},typeof R.expanded=="boolean"&&(ee.treeNode.expanded=R.expanded,"loading"in R&&(ee.treeNode.loading=R.loading),"noLazyChildren"in R&&(ee.treeNode.noLazyChildren=R.noLazyChildren)));const Me=`${w(L,P)},${U}`,de=ce.columnKey||ce.rawColumnKey||"",_e=$(U,I,ee),me=I.showOverflowTooltip&&zz({effect:B},F,I.showOverflowTooltip);return rt("td",{style:m(P,U,L,I),class:f(P,U,L,I,ne-1),key:`${de}${Me}`,rowspan:oe,colspan:ne,onMouseenter:Re=>c(Re,L,me),onMouseleave:d},[_e])}))},$=(L,P,R)=>P.renderCell(R);return{wrappedRowRender:(L,P)=>{const R=e.store,{isRowExpanded:V,assertRowKey:B}=R,{treeData:F,lazyTreeNodeMap:Q,childrenColumnName:J,rowKey:Z}=R.states,H=R.states.columns.value;if(H.some(({type:K})=>K==="expand")){const K=V(L),I=x(L,P,void 0,K),U=t.renderExpanded;return K?U?[[I,rt("tr",{key:`expanded-row__${I.key}`},[rt("td",{colspan:H.length,class:`${o.e("cell")} ${o.e("expanded-cell")}`},[U({row:L,$index:P,store:R,expanded:K})])])]]:(console.error("[Element Error]renderExpanded is required."),I):[[I]]}else if(Object.keys(F.value).length){B();const K=tr(L,Z.value);let I=F.value[K],U=null;I&&(U={expanded:I.expanded,level:I.level,display:!0},typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(U.noLazyChildren=!(I.children&&I.children.length)),U.loading=I.loading));const oe=[x(L,P,U)];if(I){let ne=0;const ce=(Me,de)=>{Me&&Me.length&&de&&Me.forEach(_e=>{const me={display:de.display&&de.expanded,level:de.level+1,expanded:!1,noLazyChildren:!1,loading:!1},Re=tr(_e,Z.value);if(Re==null)throw new Error("For nested data item, row-key is required.");if(I={...F.value[Re]},I&&(me.expanded=I.expanded,I.level=I.level||me.level,I.display=!!(I.expanded&&me.display),typeof I.lazy=="boolean"&&(typeof I.loaded=="boolean"&&I.loaded&&(me.noLazyChildren=!(I.children&&I.children.length)),me.loading=I.loading)),ne++,oe.push(x(_e,P+ne,me)),I){const Ce=Q.value[Re]||_e[J.value];ce(Ce,I)}})};I.display=!0;const ee=Q.value[K]||L[J.value];ce(ee,I)}return oe}else return x(L,P,void 0)},tooltipContent:u,tooltipTrigger:p}}var Ane=N({name:"ElTableBody",props:{store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean},setup(e){const t=wt(),o=Ge(Ul),r=ze("table"),{wrappedRowRender:l,tooltipContent:n,tooltipTrigger:a}=Mne(e),{onColumnsChange:i,onScrollableChange:c}=L8(o),d=[];return Se(e.store.states.hoverRow,(u,p)=>{var h;const v=t==null?void 0:t.vnode.el,m=Array.from((v==null?void 0:v.children)||[]).filter(g=>g==null?void 0:g.classList.contains(`${r.e("row")}`));let f=u;const _=(h=m[f])==null?void 0:h.childNodes;if(_!=null&&_.length){let g=0;Array.from(_).reduce((w,x,$)=>{var T,L;return((T=_[$])==null?void 0:T.colSpan)>1&&(g=(L=_[$])==null?void 0:L.colSpan),x.nodeName!=="TD"&&g===0&&w.push($),g>0&&g--,w},[]).forEach(w=>{var x;for(f=u;f>0;){const $=(x=m[f-1])==null?void 0:x.childNodes;if($[w]&&$[w].nodeName==="TD"&&$[w].rowSpan>1){Zr($[w],"hover-cell"),d.push($[w]);break}f--}})}else d.forEach(g=>ar(g,"hover-cell")),d.length=0;!e.store.states.isComplex.value||!Nt||Xn(()=>{const g=m[p],y=m[u];g&&!g.classList.contains("hover-fixed-row")&&ar(g,"hover-row"),y&&Zr(y,"hover-row")})}),Rn(()=>{var u;(u=nl)==null||u()}),{ns:r,onColumnsChange:i,onScrollableChange:c,wrappedRowRender:l,tooltipContent:n,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this,o=t.states.data.value||[];return rt("tbody",{tabIndex:-1},[o.reduce((r,l)=>r.concat(e(l,r.length)),[])])}});function zne(){const e=Ge(Ul),t=e==null?void 0:e.store,o=C(()=>t.states.fixedLeafColumnsLength.value),r=C(()=>t.states.rightFixedColumns.value.length),l=C(()=>t.states.columns.value.length),n=C(()=>t.states.fixedColumns.value.length),a=C(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:o,rightFixedLeafCount:r,columnsCount:l,leftFixedCount:n,rightFixedCount:a,columns:t.states.columns}}function Ine(e){const{columns:t}=zne(),o=ze("table");return{getCellClasses:(n,a)=>{const i=n[a],c=[o.e("cell"),i.id,i.align,i.labelClassName,...v2(o.b(),a,i.fixed,e.store)];return i.className&&c.push(i.className),i.children||c.push(o.is("leaf")),c},getCellStyles:(n,a)=>{const i=m2(a,n.fixed,e.store);return ds(i,"left"),ds(i,"right"),i},columns:t}}var One=N({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:o,columns:r}=Ine(e);return{ns:ze("table"),getCellClasses:t,getCellStyles:o,columns:r}},render(){const{columns:e,getCellStyles:t,getCellClasses:o,summaryMethod:r,sumText:l}=this,n=this.store.states.data.value;let a=[];return r?a=r({columns:e,data:n}):e.forEach((i,c)=>{if(c===0){a[c]=l;return}const d=n.map(v=>Number(v[i.property])),u=[];let p=!0;d.forEach(v=>{if(!Number.isNaN(+v)){p=!1;const m=`${v}`.split(".")[1];u.push(m?m.length:0)}});const h=Math.max.apply(null,u);p?a[c]="":a[c]=d.reduce((v,m)=>{const f=Number(m);return Number.isNaN(+f)?v:Number.parseFloat((v+m).toFixed(Math.min(h,20)))},0)}),rt(rt("tfoot",[rt("tr",{},[...e.map((i,c)=>rt("td",{key:c,colspan:i.colSpan,rowspan:i.rowSpan,class:o(e,c),style:t(i,c)},[rt("div",{class:["cell",i.labelClassName]},[a[c]])]))])]))}});function Nne(e){return{setCurrentRow:u=>{e.commit("setCurrentRow",u)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(u,p)=>{e.toggleRowSelection(u,p,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:u=>{e.clearFilter(u)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(u,p)=>{e.toggleRowExpansionAdapter(u,p)},clearSort:()=>{e.clearSort()},sort:(u,p)=>{e.commit("sort",{prop:u,order:p})}}}function Pne(e,t,o,r){const l=D(!1),n=D(null),a=D(!1),i=I=>{a.value=I},c=D({width:null,height:null,headerHeight:null}),d=D(!1),u={display:"inline-block",verticalAlign:"middle"},p=D(),h=D(0),v=D(0),m=D(0),f=D(0),_=D(0);Go(()=>{t.setHeight(e.height)}),Go(()=>{t.setMaxHeight(e.maxHeight)}),Se(()=>[e.currentRowKey,o.states.rowKey],([I,U])=>{!s(U)||!s(I)||o.setCurrentRowKey(`${I}`)},{immediate:!0}),Se(()=>e.data,I=>{r.store.commit("setData",I)},{immediate:!0,deep:!0}),Go(()=>{e.expandRowKeys&&o.setExpandRowKeysAdapter(e.expandRowKeys)});const g=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},y=(I,U)=>{const{pixelX:oe,pixelY:ne}=U;Math.abs(oe)>=Math.abs(ne)&&(r.refs.bodyWrapper.scrollLeft+=U.pixelX/5)},w=C(()=>e.height||e.maxHeight||o.states.fixedColumns.value.length>0||o.states.rightFixedColumns.value.length>0),x=C(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),$=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(R)};ft(async()=>{await et(),o.updateColumns(),V(),requestAnimationFrame($);const I=r.vnode.el,U=r.refs.headerWrapper;e.flexible&&I&&I.parentElement&&(I.parentElement.style.minWidth="0"),c.value={width:p.value=I.offsetWidth,height:I.offsetHeight,headerHeight:e.showHeader&&U?U.offsetHeight:null},o.states.columns.value.forEach(oe=>{oe.filteredValue&&oe.filteredValue.length&&r.store.commit("filterChange",{column:oe,values:oe.filteredValue,silent:!0})}),r.$ready=!0});const T=(I,U)=>{if(!I)return;const oe=Array.from(I.classList).filter(ne=>!ne.startsWith("is-scrolling-"));oe.push(t.scrollX.value?U:"is-scrolling-none"),I.className=oe.join(" ")},L=I=>{const{tableWrapper:U}=r.refs;T(U,I)},P=I=>{const{tableWrapper:U}=r.refs;return!!(U&&U.classList.contains(I))},R=function(){if(!r.refs.scrollBarRef)return;if(!t.scrollX.value){const de="is-scrolling-none";P(de)||L(de);return}const I=r.refs.scrollBarRef.wrapRef;if(!I)return;const{scrollLeft:U,offsetWidth:oe,scrollWidth:ne}=I,{headerWrapper:ce,footerWrapper:ee}=r.refs;ce&&(ce.scrollLeft=U),ee&&(ee.scrollLeft=U);const Me=ne-oe-1;U>=Me?L("is-scrolling-right"):L(U===0?"is-scrolling-left":"is-scrolling-middle")},V=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&oo(r.refs.scrollBarRef.wrapRef,"scroll",R,{passive:!0}),e.fit?so(r.vnode.el,B):oo(window,"resize",B),so(r.refs.bodyWrapper,()=>{var I,U;B(),(U=(I=r.refs)==null?void 0:I.scrollBarRef)==null||U.update()}))},B=()=>{var I,U,oe,ne;const ce=r.vnode.el;if(!r.$ready||!ce)return;let ee=!1;const{width:Me,height:de,headerHeight:_e}=c.value,me=p.value=ce.offsetWidth;Me!==me&&(ee=!0);const Re=ce.offsetHeight;(e.height||w.value)&&de!==Re&&(ee=!0);const Ce=e.tableLayout==="fixed"?r.refs.headerWrapper:(I=r.refs.tableHeaderRef)==null?void 0:I.$el;e.showHeader&&(Ce==null?void 0:Ce.offsetHeight)!==_e&&(ee=!0),h.value=((U=r.refs.tableWrapper)==null?void 0:U.scrollHeight)||0,m.value=(Ce==null?void 0:Ce.scrollHeight)||0,f.value=((oe=r.refs.footerWrapper)==null?void 0:oe.offsetHeight)||0,_.value=((ne=r.refs.appendWrapper)==null?void 0:ne.offsetHeight)||0,v.value=h.value-m.value-f.value-_.value,ee&&(c.value={width:me,height:Re,headerHeight:e.showHeader&&(Ce==null?void 0:Ce.offsetHeight)||0},$())},F=So(),Q=C(()=>{const{bodyWidth:I,scrollY:U,gutterWidth:oe}=t;return I.value?`${I.value-(U.value?oe:0)}px`:""}),J=C(()=>e.maxHeight?"fixed":e.tableLayout),Z=C(()=>{if(e.data&&e.data.length)return null;let I="100%";e.height&&v.value&&(I=`${v.value}px`);const U=p.value;return{width:U?`${U}px`:"",height:I}}),H=C(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),j=C(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+f.value}px)`}:{maxHeight:`${e.maxHeight-m.value-f.value}px`}:{});return{isHidden:l,renderExpanded:n,setDragVisible:i,isGroup:d,handleMouseLeave:g,handleHeaderFooterMousewheel:y,tableSize:F,emptyBlockStyle:Z,handleFixedMousewheel:(I,U)=>{const oe=r.refs.bodyWrapper;if(Math.abs(U.spinY)>0){const ne=oe.scrollTop;U.pixelY<0&&ne!==0&&I.preventDefault(),U.pixelY>0&&oe.scrollHeight-oe.clientHeight>ne&&I.preventDefault(),oe.scrollTop+=Math.ceil(U.pixelY/5)}else oe.scrollLeft+=Math.ceil(U.pixelX/5)},resizeProxyVisible:a,bodyWidth:Q,resizeState:c,doLayout:$,tableBodyStyles:x,tableLayout:J,scrollbarViewStyle:u,tableInnerStyle:H,scrollbarStyle:j}}function Rne(e){const t=D(),o=()=>{const l=e.vnode.el.querySelector(".hidden-columns"),n={childList:!0,subtree:!0},a=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{a.forEach(i=>i())}),t.value.observe(l,n)};ft(()=>{o()}),Rn(()=>{var r;(r=t.value)==null||r.disconnect()})}var Lne={data:{type:Array,default:()=>[]},size:Oo,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object]};function D8(e){const t=e.tableLayout==="auto";let o=e.columns||[];t&&o.every(l=>l.width===void 0)&&(o=[]);const r=l=>{const n={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?n.style={width:`${l.width}px`}:n.name=l.id,n};return rt("colgroup",{},o.map(l=>rt("col",r(l))))}D8.props=["columns","tableLayout"];const Bne=()=>{const e=D(),t=(n,a)=>{const i=e.value;i&&i.scrollTo(n,a)},o=(n,a)=>{const i=e.value;i&&st(a)&&["Top","Left"].includes(n)&&i[`setScroll${n}`](a)};return{scrollBarRef:e,scrollTo:t,setScrollTop:n=>o("Top",n),setScrollLeft:n=>o("Left",n)}};let Vne=1;const Dne=N({name:"ElTable",directives:{Mousewheel:rY},components:{TableHeader:Ene,TableBody:Ane,TableFooter:One,ElScrollbar:wn,hColgroup:D8},props:Lne,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Rt(),o=ze("table"),r=wt();zt(Ul,r);const l=fne(r,e);r.store=l;const n=new vne({store:r.store,table:r,fit:e.fit,showHeader:e.showHeader});r.layout=n;const a=C(()=>(l.states.data.value||[]).length===0),{setCurrentRow:i,getSelectionRows:c,toggleRowSelection:d,clearSelection:u,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:v,clearSort:m,sort:f}=Nne(l),{isHidden:_,renderExpanded:g,setDragVisible:y,isGroup:w,handleMouseLeave:x,handleHeaderFooterMousewheel:$,tableSize:T,emptyBlockStyle:L,handleFixedMousewheel:P,resizeProxyVisible:R,bodyWidth:V,resizeState:B,doLayout:F,tableBodyStyles:Q,tableLayout:J,scrollbarViewStyle:Z,tableInnerStyle:H,scrollbarStyle:j}=Pne(e,n,l,r),{scrollBarRef:K,scrollTo:I,setScrollLeft:U,setScrollTop:oe}=Bne(),ne=Mr(F,50),ce=`${o.namespace.value}-table_${Vne++}`;r.tableId=ce,r.state={isGroup:w,resizeState:B,doLayout:F,debouncedUpdateLayout:ne};const ee=C(()=>e.sumText||t("el.table.sumText")),Me=C(()=>e.emptyText||t("el.table.emptyText")),de=C(()=>V8(l.states.originColumns.value)[0]);return Rne(r),{ns:o,layout:n,store:l,columns:de,handleHeaderFooterMousewheel:$,handleMouseLeave:x,tableId:ce,tableSize:T,isHidden:_,isEmpty:a,renderExpanded:g,resizeProxyVisible:R,resizeState:B,isGroup:w,bodyWidth:V,tableBodyStyles:Q,emptyBlockStyle:L,debouncedUpdateLayout:ne,handleFixedMousewheel:P,setCurrentRow:i,getSelectionRows:c,toggleRowSelection:d,clearSelection:u,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:v,clearSort:m,doLayout:F,sort:f,t,setDragVisible:y,context:r,computedSumText:ee,computedEmptyText:Me,tableLayout:J,scrollbarViewStyle:Z,tableInnerStyle:H,scrollbarStyle:j,scrollBarRef:K,scrollTo:I,setScrollLeft:U,setScrollTop:oe}}}),Hne=["data-prefix"],Fne={ref:"hiddenColumns",class:"hidden-columns"};function jne(e,t,o,r,l,n){const a=nt("hColgroup"),i=nt("table-header"),c=nt("table-body"),d=nt("table-footer"),u=nt("el-scrollbar"),p=Iu("mousewheel");return b(),M("div",{ref:"tableWrapper",class:O([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Je(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...h)=>e.handleMouseLeave&&e.handleMouseLeave(...h))},[E("div",{class:O(e.ns.e("inner-wrapper")),style:Je(e.tableInnerStyle)},[E("div",Fne,[be(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?mt((b(),M("div",{key:0,ref:"headerWrapper",class:O(e.ns.e("header-wrapper"))},[E("table",{ref:"tableHeader",class:O(e.ns.e("header")),style:Je(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[te(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),te(i,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[p,e.handleHeaderFooterMousewheel]]):se("v-if",!0),E("div",{ref:"bodyWrapper",class:O(e.ns.e("body-wrapper"))},[te(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:le(()=>[E("table",{ref:"tableBody",class:O(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Je({width:e.bodyWidth,tableLayout:e.tableLayout})},[te(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(b(),he(i,{key:0,ref:"tableHeaderRef",class:O(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):se("v-if",!0),te(c,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(b(),he(d,{key:1,class:O(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):se("v-if",!0)],6),e.isEmpty?(b(),M("div",{key:0,ref:"emptyBlock",style:Je(e.emptyBlockStyle),class:O(e.ns.e("empty-block"))},[E("span",{class:O(e.ns.e("empty-text"))},[be(e.$slots,"empty",{},()=>[Ct($e(e.computedEmptyText),1)])],2)],6)):se("v-if",!0),e.$slots.append?(b(),M("div",{key:1,ref:"appendWrapper",class:O(e.ns.e("append-wrapper"))},[be(e.$slots,"append")],2)):se("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?mt((b(),M("div",{key:1,ref:"footerWrapper",class:O(e.ns.e("footer-wrapper"))},[E("table",{class:O(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Je(e.tableBodyStyles)},[te(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),te(d,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Lt,!e.isEmpty],[p,e.handleHeaderFooterMousewheel]]):se("v-if",!0),e.border||e.isGroup?(b(),M("div",{key:2,class:O(e.ns.e("border-left-patch"))},null,2)):se("v-if",!0)],6),mt(E("div",{ref:"resizeProxy",class:O(e.ns.e("column-resize-proxy"))},null,2),[[Lt,e.resizeProxyVisible]])],46,Hne)}var Kne=Le(Dne,[["render",jne],["__file","table.vue"]]);const Une={selection:"table-column--selection",expand:"table__expand-column"},Wne={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},qne=e=>Une[e]||"",Yne={selection:{renderHeader({store:e,column:t}){function o(){return e.states.data.value&&e.states.data.value.length===0}return rt(rl,{disabled:o(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:o,$index:r}){return rt(rl,{disabled:t.selectable?!t.selectable.call(null,e,r):!1,size:o.states.tableSize.value,onChange:()=>{o.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:o.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let o=t+1;const r=e.index;return typeof r=="number"?o=t+r:typeof r=="function"&&(o=r(t)),rt("div",{},[o])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:o}){const{ns:r}=t,l=[r.e("expand-icon")];return o&&l.push(r.em("expand-icon","expanded")),rt("div",{class:l,onClick:function(a){a.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[rt(Ze,null,{default:()=>[rt(ir)]})]})},sortable:!1,resizable:!1}};function Gne({row:e,column:t,$index:o}){var r;const l=t.property,n=l&&Ed(e,l).value;return t&&t.formatter?t.formatter(e,t,n,o):((r=n==null?void 0:n.toString)==null?void 0:r.call(n))||""}function Xne({row:e,treeNode:t,store:o},r=!1){const{ns:l}=o;if(!t)return r?[rt("span",{class:l.e("placeholder")})]:null;const n=[],a=function(i){i.stopPropagation(),!t.loading&&o.loadOrToggle(e)};if(t.indent&&n.push(rt("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const i=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let c=ir;t.loading&&(c=vn),n.push(rt("div",{class:i,onClick:a},{default:()=>[rt(Ze,{class:{[l.is("loading")]:t.loading}},{default:()=>[rt(c)]})]}))}else n.push(rt("span",{class:l.e("placeholder")}));return n}function H8(e,t){return e.reduce((o,r)=>(o[r]=r,o),t)}function Zne(e,t){const o=wt();return{registerComplexWatchers:()=>{const n=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},i=H8(n,a);Object.keys(i).forEach(c=>{const d=a[c];Pt(t,d)&&Se(()=>t[d],u=>{let p=u;d==="width"&&c==="realWidth"&&(p=h2(u)),d==="minWidth"&&c==="realMinWidth"&&(p=A8(u)),o.columnConfig.value[d]=p,o.columnConfig.value[c]=p;const h=d==="fixed";e.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const n=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},i=H8(n,a);Object.keys(i).forEach(c=>{const d=a[c];Pt(t,d)&&Se(()=>t[d],u=>{o.columnConfig.value[c]=u})})}}}function Jne(e,t,o){const r=wt(),l=D(""),n=D(!1),a=D(),i=D(),c=ze("table");Go(()=>{a.value=e.align?`is-${e.align}`:null,a.value}),Go(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:a.value,i.value});const d=C(()=>{let x=r.vnode.vParent||r.parent;for(;x&&!x.tableId&&!x.columnId;)x=x.vnode.vParent||x.parent;return x}),u=C(()=>{const{store:x}=r.parent;if(!x)return!1;const{treeData:$}=x.states,T=$.value;return T&&Object.keys(T).length>0}),p=D(h2(e.width)),h=D(A8(e.minWidth)),v=x=>(p.value&&(x.width=p.value),h.value&&(x.minWidth=h.value),!p.value&&h.value&&(x.width=void 0),x.minWidth||(x.minWidth=80),x.realWidth=Number(x.width===void 0?x.minWidth:x.width),x),m=x=>{const $=x.type,T=Yne[$]||{};Object.keys(T).forEach(P=>{const R=T[P];P!=="className"&&R!==void 0&&(x[P]=R)});const L=qne($);if(L){const P=`${s(c.namespace)}-${L}`;x.className=x.className?`${x.className} ${P}`:P}return x},f=x=>{Array.isArray(x)?x.forEach(T=>$(T)):$(x);function $(T){var L;((L=T==null?void 0:T.type)==null?void 0:L.name)==="ElTableColumn"&&(T.vParent=r)}};return{columnId:l,realAlign:a,isSubColumn:n,realHeaderAlign:i,columnOrTableParent:d,setColumnWidth:v,setColumnForcedProps:m,setColumnRenders:x=>{e.renderHeader||x.type!=="selection"&&(x.renderHeader=T=>(r.columnConfig.value.label,be(t,"header",T,()=>[x.label])));let $=x.renderCell;return x.type==="expand"?(x.renderCell=T=>rt("div",{class:"cell"},[$(T)]),o.value.renderExpanded=T=>t.default?t.default(T):t.default):($=$||Gne,x.renderCell=T=>{let L=null;if(t.default){const Q=t.default(T);L=Q.some(J=>J.type!==Jo)?Q:$(T)}else L=$(T);const{columns:P}=o.value.store.states,R=P.value.findIndex(Q=>Q.type==="default"),V=u.value&&T.cellIndex===R,B=Xne(T,V),F={class:"cell",style:{}};return x.showOverflowTooltip&&(F.class=`${F.class} ${s(c.namespace)}-tooltip`,F.style={width:`${(T.column.realWidth||Number(T.column.width))-1}px`}),f(L),rt("div",F,[B,L])}),x},getPropsData:(...x)=>x.reduce(($,T)=>(Array.isArray(T)&&T.forEach(L=>{$[L]=e[L]}),$),{}),getColumnElIndex:(x,$)=>Array.prototype.indexOf.call(x,$),updateColumnOrder:()=>{o.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var Qne={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let eae=1;var F8=N({name:"ElTableColumn",components:{ElCheckbox:rl},props:Qne,setup(e,{slots:t}){const o=wt(),r=D({}),l=C(()=>{let w=o.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:n,registerComplexWatchers:a}=Zne(l,e),{columnId:i,isSubColumn:c,realHeaderAlign:d,columnOrTableParent:u,setColumnWidth:p,setColumnForcedProps:h,setColumnRenders:v,getPropsData:m,getColumnElIndex:f,realAlign:_,updateColumnOrder:g}=Jne(e,t,l),y=u.value;i.value=`${y.tableId||y.columnId}_column_${eae++}`,Nu(()=>{c.value=l.value!==y;const w=e.type||"default",x=e.sortable===""?!0:e.sortable,$=ko(e.showOverflowTooltip)?y.props.showOverflowTooltip:e.showOverflowTooltip,T={...Wne[w],id:i.value,type:w,property:e.prop||e.property,align:_,headerAlign:d,showOverflowTooltip:$,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:e.index,rawColumnKey:o.vnode.key};let B=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);B=one(T,B),B=lne(v,p,h)(B),r.value=B,n(),a()}),ft(()=>{var w;const x=u.value,$=c.value?x.vnode.el.children:(w=x.refs.hiddenColumns)==null?void 0:w.children,T=()=>f($||[],o.vnode.el);r.value.getColumnIndex=T,T()>-1&&l.value.store.commit("insertColumn",r.value,c.value?x.columnConfig.value:null,g)}),to(()=>{r.value.getColumnIndex()>-1&&l.value.store.commit("removeColumn",r.value,c.value?y.columnConfig.value:null,g)}),o.columnId=i.value,o.columnConfig=r},render(){var e,t,o;try{const r=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),l=[];if(Array.isArray(r))for(const a of r)((o=a.type)==null?void 0:o.name)==="ElTableColumn"||a.shapeFlag&2?l.push(a):a.type===Qe&&Array.isArray(a.children)&&a.children.forEach(i=>{(i==null?void 0:i.patchFlag)!==1024&&!ut(i==null?void 0:i.children)&&l.push(i)});return rt("div",l)}catch{return rt("div",[])}}});const tae=yt(Kne,{TableColumn:F8}),oae=co(F8);var Wc=(e=>(e.ASC="asc",e.DESC="desc",e))(Wc||{}),qc=(e=>(e.CENTER="center",e.RIGHT="right",e))(qc||{}),j8=(e=>(e.LEFT="left",e.RIGHT="right",e))(j8||{});const w2={asc:"desc",desc:"asc"},Yc=Symbol("placeholder"),rae=(e,t,o)=>{var r;const l={flexGrow:0,flexShrink:0,...o?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};o||(l.flexShrink=1);const n={...(r=e.style)!=null?r:{},...l,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(n.maxWidth=e.maxWidth),e.minWidth&&(n.minWidth=e.minWidth)),n};function lae(e,t,o){const r=C(()=>s(t).filter(f=>!f.hidden)),l=C(()=>s(r).filter(f=>f.fixed==="left"||f.fixed===!0)),n=C(()=>s(r).filter(f=>f.fixed==="right")),a=C(()=>s(r).filter(f=>!f.fixed)),i=C(()=>{const f=[];return s(l).forEach(_=>{f.push({..._,placeholderSign:Yc})}),s(a).forEach(_=>{f.push(_)}),s(n).forEach(_=>{f.push({..._,placeholderSign:Yc})}),f}),c=C(()=>s(l).length||s(n).length),d=C(()=>s(t).reduce((_,g)=>(_[g.key]=rae(g,s(o),e.fixed),_),{})),u=C(()=>s(r).reduce((f,_)=>f+_.width,0)),p=f=>s(t).find(_=>_.key===f),h=f=>s(d)[f],v=(f,_)=>{f.width=_};function m(f){var _;const{key:g}=f.currentTarget.dataset;if(!g)return;const{sortState:y,sortBy:w}=e;let x=Wc.ASC;xt(y)?x=w2[y[g]]:x=w2[w.order],(_=e.onColumnSort)==null||_.call(e,{column:p(g),key:g,order:x})}return{columns:t,columnsStyles:d,columnsTotalWidth:u,fixedColumnsOnLeft:l,fixedColumnsOnRight:n,hasFixedColumns:c,mainColumns:i,normalColumns:a,visibleColumns:r,getColumn:p,getColumnStyle:h,updateColumnWidth:v,onColumnSorted:m}}const nae=(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,onMaybeEndReached:l})=>{const n=D({scrollLeft:0,scrollTop:0});function a(v){var m,f,_;const{scrollTop:g}=v;(m=t.value)==null||m.scrollTo(v),(f=o.value)==null||f.scrollToTop(g),(_=r.value)==null||_.scrollToTop(g)}function i(v){n.value=v,a(v)}function c(v){n.value.scrollTop=v,a(s(n))}function d(v){var m,f;n.value.scrollLeft=v,(f=(m=t.value)==null?void 0:m.scrollTo)==null||f.call(m,s(n))}function u(v){var m;i(v),(m=e.onScroll)==null||m.call(e,v)}function p({scrollTop:v}){const{scrollTop:m}=s(n);v!==m&&c(v)}function h(v,m="auto"){var f;(f=t.value)==null||f.scrollToRow(v,m)}return Se(()=>s(n).scrollTop,(v,m)=>{v>m&&l()}),{scrollPos:n,scrollTo:i,scrollToLeft:d,scrollToTop:c,scrollToRow:h,onScroll:u,onVerticalScroll:p}},aae=(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,tableInstance:l,ns:n,isScrolling:a})=>{const i=wt(),{emit:c}=i,d=lo(!1),u=D(e.defaultExpandedRowKeys||[]),p=D(-1),h=lo(null),v=D({}),m=D({}),f=lo({}),_=lo({}),g=lo({}),y=C(()=>st(e.estimatedRowHeight));function w(V){var B;(B=e.onRowsRendered)==null||B.call(e,V),V.rowCacheEnd>s(p)&&(p.value=V.rowCacheEnd)}function x({hovered:V,rowKey:B}){if(a.value)return;l.vnode.el.querySelectorAll(`[rowkey="${String(B)}"]`).forEach(J=>{V?J.classList.add(n.is("hovered")):J.classList.remove(n.is("hovered"))})}function $({expanded:V,rowData:B,rowIndex:F,rowKey:Q}){var J,Z;const H=[...s(u)],j=H.indexOf(Q);V?j===-1&&H.push(Q):j>-1&&H.splice(j,1),u.value=H,c("update:expandedRowKeys",H),(J=e.onRowExpand)==null||J.call(e,{expanded:V,rowData:B,rowIndex:F,rowKey:Q}),(Z=e.onExpandedRowsChange)==null||Z.call(e,H)}const T=Mr(()=>{var V,B,F,Q;d.value=!0,v.value={...s(v),...s(m)},L(s(h),!1),m.value={},h.value=null,(V=t.value)==null||V.forceUpdate(),(B=o.value)==null||B.forceUpdate(),(F=r.value)==null||F.forceUpdate(),(Q=i.proxy)==null||Q.$forceUpdate(),d.value=!1},0);function L(V,B=!1){s(y)&&[t,o,r].forEach(F=>{const Q=s(F);Q&&Q.resetAfterRowIndex(V,B)})}function P(V,B,F){const Q=s(h);(Q===null||Q>F)&&(h.value=F),m.value[V]=B}function R({rowKey:V,height:B,rowIndex:F},Q){Q?Q===j8.RIGHT?g.value[V]=B:f.value[V]=B:_.value[V]=B;const J=Math.max(...[f,g,_].map(Z=>Z.value[V]||0));s(v)[V]!==J&&(P(V,J,F),T())}return{expandedRowKeys:u,lastRenderedRowIndex:p,isDynamic:y,isResetting:d,rowHeights:v,resetAfterIndex:L,onRowExpanded:$,onRowHovered:x,onRowsRendered:w,onRowHeightChange:R}},iae=(e,{expandedRowKeys:t,lastRenderedRowIndex:o,resetAfterIndex:r})=>{const l=D({}),n=C(()=>{const i={},{data:c,rowKey:d}=e,u=s(t);if(!u||!u.length)return c;const p=[],h=new Set;u.forEach(m=>h.add(m));let v=c.slice();for(v.forEach(m=>i[m[d]]=0);v.length>0;){const m=v.shift();p.push(m),h.has(m[d])&&Array.isArray(m.children)&&m.children.length>0&&(v=[...m.children,...v],m.children.forEach(f=>i[f[d]]=i[m[d]]+1))}return l.value=i,p}),a=C(()=>{const{data:i,expandColumnKey:c}=e;return c?s(n):i});return Se(a,(i,c)=>{i!==c&&(o.value=-1,r(0,!0))}),{data:a,depthMap:l}},sae=(e,t)=>e+t,Pp=e=>Ke(e)?e.reduce(sae,0):e,ti=(e,t,o={})=>it(e)?e(t):e??o,sa=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=go(e[t])}),e),K8=e=>io(e)?t=>rt(e,t):e,cae=(e,{columnsTotalWidth:t,data:o,fixedColumnsOnLeft:r,fixedColumnsOnRight:l})=>{const n=C(()=>{const{fixed:w,width:x,vScrollbarSize:$}=e,T=x-$;return w?Math.max(Math.round(s(t)),T):T}),a=C(()=>s(n)+e.vScrollbarSize),i=C(()=>{const{height:w=0,maxHeight:x=0,footerHeight:$,hScrollbarSize:T}=e;if(x>0){const L=s(m),P=s(c),V=s(v)+L+P+T;return Math.min(V,x-$)}return w-$}),c=C(()=>{const{rowHeight:w,estimatedRowHeight:x}=e,$=s(o);return st(x)?$.length*x:$.length*w}),d=C(()=>{const{maxHeight:w}=e,x=s(i);if(st(w)&&w>0)return x;const $=s(c)+s(v)+s(m);return Math.min(x,$)}),u=w=>w.width,p=C(()=>Pp(s(r).map(u))),h=C(()=>Pp(s(l).map(u))),v=C(()=>Pp(e.headerHeight)),m=C(()=>{var w;return(((w=e.fixedData)==null?void 0:w.length)||0)*e.rowHeight}),f=C(()=>s(i)-s(v)-s(m)),_=C(()=>{const{style:w={},height:x,width:$}=e;return sa({...w,height:x,width:$})}),g=C(()=>sa({height:e.footerHeight})),y=C(()=>({top:go(s(v)),bottom:go(e.footerHeight),width:go(e.width)}));return{bodyWidth:n,fixedTableHeight:d,mainTableHeight:i,leftTableWidth:p,rightTableWidth:h,headerWidth:a,rowsHeight:c,windowHeight:f,footerHeight:g,emptyStyle:y,rootStyle:_,headerHeight:v}},uae=e=>{const t=D(),o=D(0),r=D(0);let l;return ft(()=>{l=so(t,([n])=>{const{width:a,height:i}=n.contentRect,{paddingLeft:c,paddingRight:d,paddingTop:u,paddingBottom:p}=getComputedStyle(n.target),h=Number.parseInt(c)||0,v=Number.parseInt(d)||0,m=Number.parseInt(u)||0,f=Number.parseInt(p)||0;o.value=a-h-v,r.value=i-m-f}).stop}),to(()=>{l==null||l()}),Se([o,r],([n,a])=>{var i;(i=e.onResize)==null||i.call(e,{width:n,height:a})}),{sizer:t,width:o,height:r}};function dae(e){const t=D(),o=D(),r=D(),{columns:l,columnsStyles:n,columnsTotalWidth:a,fixedColumnsOnLeft:i,fixedColumnsOnRight:c,hasFixedColumns:d,mainColumns:u,onColumnSorted:p}=lae(e,Yt(e,"columns"),Yt(e,"fixed")),{scrollTo:h,scrollToLeft:v,scrollToTop:m,scrollToRow:f,onScroll:_,onVerticalScroll:g,scrollPos:y}=nae(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,onMaybeEndReached:ae}),w=ze("table-v2"),x=wt(),$=lo(!1),{expandedRowKeys:T,lastRenderedRowIndex:L,isDynamic:P,isResetting:R,rowHeights:V,resetAfterIndex:B,onRowExpanded:F,onRowHeightChange:Q,onRowHovered:J,onRowsRendered:Z}=aae(e,{mainTableRef:t,leftTableRef:o,rightTableRef:r,tableInstance:x,ns:w,isScrolling:$}),{data:H,depthMap:j}=iae(e,{expandedRowKeys:T,lastRenderedRowIndex:L,resetAfterIndex:B}),{bodyWidth:K,fixedTableHeight:I,mainTableHeight:U,leftTableWidth:oe,rightTableWidth:ne,headerWidth:ce,rowsHeight:ee,windowHeight:Me,footerHeight:de,emptyStyle:_e,rootStyle:me,headerHeight:Re}=cae(e,{columnsTotalWidth:a,data:H,fixedColumnsOnLeft:i,fixedColumnsOnRight:c}),Ce=D(),Ee=C(()=>{const pe=s(H).length===0;return Ke(e.fixedData)?e.fixedData.length===0&&pe:pe});function De(pe){const{estimatedRowHeight:ke,rowHeight:Oe,rowKey:we}=e;return ke?s(V)[s(H)[pe][we]]||ke:Oe}function ae(){const{onEndReached:pe}=e;if(!pe)return;const{scrollTop:ke}=s(y),Oe=s(ee),we=s(Me),Te=Oe-(ke+we)+e.hScrollbarSize;s(L)>=0&&Oe===ke+s(U)-s(Re)&&pe(Te)}return Se(()=>e.expandedRowKeys,pe=>T.value=pe,{deep:!0}),{columns:l,containerRef:Ce,mainTableRef:t,leftTableRef:o,rightTableRef:r,isDynamic:P,isResetting:R,isScrolling:$,hasFixedColumns:d,columnsStyles:n,columnsTotalWidth:a,data:H,expandedRowKeys:T,depthMap:j,fixedColumnsOnLeft:i,fixedColumnsOnRight:c,mainColumns:u,bodyWidth:K,emptyStyle:_e,rootStyle:me,headerWidth:ce,footerHeight:de,mainTableHeight:U,fixedTableHeight:I,leftTableWidth:oe,rightTableWidth:ne,showEmpty:Ee,getRowHeight:De,onColumnSorted:p,onRowHovered:J,onRowExpanded:F,onRowsRendered:Z,onRowHeightChange:Q,scrollTo:h,scrollToLeft:v,scrollToTop:m,scrollToRow:f,onScroll:_,onVerticalScroll:g}}const y2=Symbol("tableV2"),U8=String,Gc={type:ue(Array),required:!0},x2={type:ue(Array)},W8={...x2,required:!0},pae=String,q8={type:ue(Array),default:()=>uo([])},oi={type:Number,required:!0},Y8={type:ue([String,Number,Symbol]),default:"id"},G8={type:ue(Object)},ri=Pe({class:String,columns:Gc,columnsStyles:{type:ue(Object),required:!0},depth:Number,expandColumnKey:pae,estimatedRowHeight:{...Ja.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:ue(Function)},onRowHover:{type:ue(Function)},onRowHeightChange:{type:ue(Function)},rowData:{type:ue(Object),required:!0},rowEventHandlers:{type:ue(Object)},rowIndex:{type:Number,required:!0},rowKey:Y8,style:{type:ue(Object)}}),k2={type:Number,required:!0},C2=Pe({class:String,columns:Gc,fixedHeaderData:{type:ue(Array)},headerData:{type:ue(Array),required:!0},headerHeight:{type:ue([Number,Array]),default:50},rowWidth:k2,rowHeight:{type:Number,default:50},height:k2,width:k2}),Rp=Pe({columns:Gc,data:W8,fixedData:x2,estimatedRowHeight:ri.estimatedRowHeight,width:oi,height:oi,headerWidth:oi,headerHeight:C2.headerHeight,bodyWidth:oi,rowHeight:oi,cache:t8.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:Ja.scrollbarAlwaysOn,scrollbarStartGap:Ja.scrollbarStartGap,scrollbarEndGap:Ja.scrollbarEndGap,class:U8,style:G8,containerStyle:G8,getRowHeight:{type:ue(Function),required:!0},rowKey:ri.rowKey,onRowsRendered:{type:ue(Function)},onScroll:{type:ue(Function)}}),fae=Pe({cache:Rp.cache,estimatedRowHeight:ri.estimatedRowHeight,rowKey:Y8,headerClass:{type:ue([String,Function])},headerProps:{type:ue([Object,Function])},headerCellProps:{type:ue([Object,Function])},headerHeight:C2.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:ue([String,Function])},rowProps:{type:ue([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:ue([Object,Function])},columns:Gc,data:W8,dataGetter:{type:ue(Function)},fixedData:x2,expandColumnKey:ri.expandColumnKey,expandedRowKeys:q8,defaultExpandedRowKeys:q8,class:U8,fixed:Boolean,style:{type:ue(Object)},width:oi,height:oi,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:Ja.hScrollbarSize,vScrollbarSize:Ja.vScrollbarSize,scrollbarAlwaysOn:l8.alwaysOn,sortBy:{type:ue(Object),default:()=>({})},sortState:{type:ue(Object),default:void 0},onColumnSort:{type:ue(Function)},onExpandedRowsChange:{type:ue(Function)},onEndReached:{type:ue(Function)},onRowExpand:ri.onRowExpand,onScroll:Rp.onScroll,onRowsRendered:Rp.onRowsRendered,rowEventHandlers:ri.rowEventHandlers}),S2=(e,{slots:t})=>{var o;const{cellData:r,style:l}=e,n=((o=r==null?void 0:r.toString)==null?void 0:o.call(r))||"",a=be(t,"default",e,()=>[n]);return te("div",{class:e.class,title:n,style:l},[a])};S2.displayName="ElTableV2Cell",S2.inheritAttrs=!1;const E2=(e,{slots:t})=>be(t,"default",e,()=>{var o,r;return[te("div",{class:e.class,title:(o=e.column)==null?void 0:o.title},[(r=e.column)==null?void 0:r.title])]});E2.displayName="ElTableV2HeaderCell",E2.inheritAttrs=!1;const hae=Pe({class:String,columns:Gc,columnsStyles:{type:ue(Object),required:!0},headerIndex:Number,style:{type:ue(Object)}}),vae=N({name:"ElTableV2HeaderRow",props:hae,setup(e,{slots:t}){return()=>{const{columns:o,columnsStyles:r,headerIndex:l,style:n}=e;let a=o.map((i,c)=>t.cell({columns:o,column:i,columnIndex:c,headerIndex:l,style:r[i.key]}));return t.header&&(a=t.header({cells:a.map(i=>Ke(i)&&i.length===1?i[0]:i),columns:o,headerIndex:l})),te("div",{class:e.class,style:n,role:"row"},[a])}}}),mae=N({name:"ElTableV2Header",props:C2,setup(e,{slots:t,expose:o}){const r=ze("table-v2"),l=D(),n=C(()=>sa({width:e.width,height:e.height})),a=C(()=>sa({width:e.rowWidth,height:e.height})),i=C(()=>Gn(s(e.headerHeight))),c=p=>{const h=s(l);et(()=>{h!=null&&h.scroll&&h.scroll({left:p})})},d=()=>{const p=r.e("fixed-header-row"),{columns:h,fixedHeaderData:v,rowHeight:m}=e;return v==null?void 0:v.map((f,_)=>{var g;const y=sa({height:m,width:"100%"});return(g=t.fixed)==null?void 0:g.call(t,{class:p,columns:h,rowData:f,rowIndex:-(_+1),style:y})})},u=()=>{const p=r.e("dynamic-header-row"),{columns:h}=e;return s(i).map((v,m)=>{var f;const _=sa({width:"100%",height:v});return(f=t.dynamic)==null?void 0:f.call(t,{class:p,columns:h,headerIndex:m,style:_})})};return o({scrollToLeft:c}),()=>{if(!(e.height<=0))return te("div",{ref:l,class:e.class,style:s(n),role:"rowgroup"},[te("div",{style:s(a),class:r.e("header")},[u(),d()])])}}}),gae=e=>{const{isScrolling:t}=Ge(y2),o=D(!1),r=D(),l=C(()=>st(e.estimatedRowHeight)&&e.rowIndex>=0),n=(c=!1)=>{const d=s(r);if(!d)return;const{columns:u,onRowHeightChange:p,rowKey:h,rowIndex:v,style:m}=e,{height:f}=d.getBoundingClientRect();o.value=!0,et(()=>{if(c||f!==Number.parseInt(m.height)){const _=u[0],g=(_==null?void 0:_.placeholderSign)===Yc;p==null||p({rowKey:h,height:f,rowIndex:v},_&&!g&&_.fixed)}})},a=C(()=>{const{rowData:c,rowIndex:d,rowKey:u,onRowHover:p}=e,h=e.rowEventHandlers||{},v={};return Object.entries(h).forEach(([m,f])=>{it(f)&&(v[m]=_=>{f({event:_,rowData:c,rowIndex:d,rowKey:u})})}),p&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:f})=>{const _=v[m];v[m]=g=>{p({event:g,hovered:f,rowData:c,rowIndex:d,rowKey:u}),_==null||_(g)}}),v}),i=c=>{const{onRowExpand:d,rowData:u,rowIndex:p,rowKey:h}=e;d==null||d({expanded:c,rowData:u,rowIndex:p,rowKey:h})};return ft(()=>{s(l)&&n(!0)}),{isScrolling:t,measurable:l,measured:o,rowRef:r,eventHandlers:a,onExpand:i}},bae=N({name:"ElTableV2TableRow",props:ri,setup(e,{expose:t,slots:o,attrs:r}){const{eventHandlers:l,isScrolling:n,measurable:a,measured:i,rowRef:c,onExpand:d}=gae(e);return t({onExpand:d}),()=>{const{columns:u,columnsStyles:p,expandColumnKey:h,depth:v,rowData:m,rowIndex:f,style:_}=e;let g=u.map((y,w)=>{const x=Ke(m.children)&&m.children.length>0&&y.key===h;return o.cell({column:y,columns:u,columnIndex:w,depth:v,style:p[y.key],rowData:m,rowIndex:f,isScrolling:s(n),expandIconProps:x?{rowData:m,rowIndex:f,onExpand:d}:void 0})});if(o.row&&(g=o.row({cells:g.map(y=>Ke(y)&&y.length===1?y[0]:y),style:_,columns:u,depth:v,rowData:m,rowIndex:f,isScrolling:s(n)})),s(a)){const{height:y,...w}=_||{},x=s(i);return te("div",Mt({ref:c,class:e.class,style:x?_:w,role:"row"},r,s(l)),[g])}return te("div",Mt(r,{ref:c,class:e.class,style:_,role:"row"},s(l)),[g])}}}),_ae=e=>{const{sortOrder:t}=e;return te(Ze,{size:14,class:e.class},{default:()=>[t===Wc.ASC?te(q3,null,null):te(W3,null,null)]})},wae=e=>{const{expanded:t,expandable:o,onExpand:r,style:l,size:n}=e,a={onClick:o?()=>r(!t):void 0,class:e.class};return te(Ze,Mt(a,{size:n,style:l}),{default:()=>[te(ir,null,null)]})},yae="ElTableV2Grid",xae=e=>{const t=D(),o=D(),r=C(()=>{const{data:f,rowHeight:_,estimatedRowHeight:g}=e;if(!g)return f.length*_}),l=C(()=>{const{fixedData:f,rowHeight:_}=e;return((f==null?void 0:f.length)||0)*_}),n=C(()=>Pp(e.headerHeight)),a=C(()=>{const{height:f}=e;return Math.max(0,f-s(n)-s(l))}),i=C(()=>s(n)+s(l)>0),c=({data:f,rowIndex:_})=>f[_][e.rowKey];function d({rowCacheStart:f,rowCacheEnd:_,rowVisibleStart:g,rowVisibleEnd:y}){var w;(w=e.onRowsRendered)==null||w.call(e,{rowCacheStart:f,rowCacheEnd:_,rowVisibleStart:g,rowVisibleEnd:y})}function u(f,_){var g;(g=o.value)==null||g.resetAfterRowIndex(f,_)}function p(f,_){const g=s(t),y=s(o);xt(f)?(g==null||g.scrollToLeft(f.scrollLeft),y==null||y.scrollTo(f)):(g==null||g.scrollToLeft(f),y==null||y.scrollTo({scrollLeft:f,scrollTop:_}))}function h(f){var _;(_=s(o))==null||_.scrollTo({scrollTop:f})}function v(f,_){var g;(g=s(o))==null||g.scrollToItem(f,1,_)}function m(){var f,_;(f=s(o))==null||f.$forceUpdate(),(_=s(t))==null||_.$forceUpdate()}return{bodyRef:o,forceUpdate:m,fixedRowHeight:l,gridHeight:a,hasHeader:i,headerHeight:n,headerRef:t,totalHeight:r,itemKey:c,onItemRendered:d,resetAfterRowIndex:u,scrollTo:p,scrollToTop:h,scrollToRow:v}},T2=N({name:yae,props:Rp,setup(e,{slots:t,expose:o}){const{ns:r}=Ge(y2),{bodyRef:l,fixedRowHeight:n,gridHeight:a,hasHeader:i,headerRef:c,headerHeight:d,totalHeight:u,forceUpdate:p,itemKey:h,onItemRendered:v,resetAfterRowIndex:m,scrollTo:f,scrollToTop:_,scrollToRow:g}=xae(e);o({forceUpdate:p,totalHeight:u,scrollTo:f,scrollToTop:_,scrollToRow:g,resetAfterRowIndex:m});const y=()=>e.bodyWidth;return()=>{const{cache:w,columns:x,data:$,fixedData:T,useIsScrolling:L,scrollbarAlwaysOn:P,scrollbarEndGap:R,scrollbarStartGap:V,style:B,rowHeight:F,bodyWidth:Q,estimatedRowHeight:J,headerWidth:Z,height:H,width:j,getRowHeight:K,onScroll:I}=e,U=st(J),oe=U?yre:gre,ne=s(d);return te("div",{role:"table",class:[r.e("table"),e.class],style:B},[te(oe,{ref:l,data:$,useIsScrolling:L,itemKey:h,columnCache:0,columnWidth:U?y:Q,totalColumn:1,totalRow:$.length,rowCache:w,rowHeight:U?K:F,width:j,height:s(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:V,scrollbarEndGap:R,scrollbarAlwaysOn:P,onScroll:I,onItemRendered:v,perfMode:!1},{default:ce=>{var ee;const Me=$[ce.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...ce,columns:x,rowData:Me})}}),s(i)&&te(mae,{ref:c,class:r.e("header-wrapper"),columns:x,headerData:$,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:Z,rowHeight:F,width:j,height:Math.min(ne+s(n),H)},{dynamic:t.header,fixed:t.row})])}}});function kae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Cae=(e,{slots:t})=>{const{mainTableRef:o,...r}=e;return te(T2,Mt({ref:o},r),kae(t)?t:{default:()=>[t]})};function Sae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Eae=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:o,...r}=e;return te(T2,Mt({ref:o},r),Sae(t)?t:{default:()=>[t]})};function Tae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const $ae=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:o,...r}=e;return te(T2,Mt({ref:o},r),Tae(t)?t:{default:()=>[t]})};function Mae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Aae=(e,{slots:t})=>{const{columns:o,columnsStyles:r,depthMap:l,expandColumnKey:n,expandedRowKeys:a,estimatedRowHeight:i,hasFixedColumns:c,rowData:d,rowIndex:u,style:p,isScrolling:h,rowProps:v,rowClass:m,rowKey:f,rowEventHandlers:_,ns:g,onRowHovered:y,onRowExpanded:w}=e,x=ti(m,{columns:o,rowData:d,rowIndex:u},""),$=ti(v,{columns:o,rowData:d,rowIndex:u}),T=d[f],L=l[T]||0,P=!!n,R=u<0,V=[g.e("row"),x,{[g.e(`row-depth-${L}`)]:P&&u>=0,[g.is("expanded")]:P&&a.includes(T),[g.is("fixed")]:!L&&R,[g.is("customized")]:!!t.row}],B=c?y:void 0,F={...$,columns:o,columnsStyles:r,class:V,depth:L,expandColumnKey:n,estimatedRowHeight:R?void 0:i,isScrolling:h,rowIndex:u,rowData:d,rowKey:T,rowEventHandlers:_,style:p};return te(bae,Mt(F,{onRowExpand:w,onMouseenter:Z=>{B==null||B({hovered:!0,rowKey:T,event:Z,rowData:d,rowIndex:u})},onMouseleave:Z=>{B==null||B({hovered:!1,rowKey:T,event:Z,rowData:d,rowIndex:u})},rowkey:T}),Mae(t)?t:{default:()=>[t]})},$2=({columns:e,column:t,columnIndex:o,depth:r,expandIconProps:l,isScrolling:n,rowData:a,rowIndex:i,style:c,expandedRowKeys:d,ns:u,cellProps:p,expandColumnKey:h,indentSize:v,iconSize:m,rowKey:f},{slots:_})=>{const g=sa(c);if(t.placeholderSign===Yc)return te("div",{class:u.em("row-cell","placeholder"),style:g},null);const{cellRenderer:y,dataKey:w,dataGetter:x}=t,$=it(x)?x({columns:e,column:t,columnIndex:o,rowData:a,rowIndex:i}):wo(a,w??""),T=ti(p,{cellData:$,columns:e,column:t,columnIndex:o,rowIndex:i,rowData:a}),L={class:u.e("cell-text"),columns:e,column:t,columnIndex:o,cellData:$,isScrolling:n,rowData:a,rowIndex:i},P=K8(y),R=P?P(L):be(_,"default",L,()=>[te(S2,L,null)]),V=[u.e("row-cell"),t.class,t.align===qc.CENTER&&u.is("align-center"),t.align===qc.RIGHT&&u.is("align-right")],B=i>=0&&h&&t.key===h,F=i>=0&&d.includes(a[f]);let Q;const J=`margin-inline-start: ${r*v}px;`;return B&&(xt(l)?Q=te(wae,Mt(l,{class:[u.e("expand-icon"),u.is("expanded",F)],size:m,expanded:F,style:J,expandable:!0}),null):Q=te("div",{style:[J,`width: ${m}px; height: ${m}px;`].join(" ")},null)),te("div",Mt({class:V,style:g},T,{role:"cell"}),[Q,R])};$2.inheritAttrs=!1;function zae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Iae=({columns:e,columnsStyles:t,headerIndex:o,style:r,headerClass:l,headerProps:n,ns:a},{slots:i})=>{const c={columns:e,headerIndex:o},d=[a.e("header-row"),ti(l,c,""),{[a.is("customized")]:!!i.header}],u={...ti(n,c),columnsStyles:t,class:d,columns:e,headerIndex:o,style:r};return te(vae,u,zae(i)?i:{default:()=>[i]})},X8=(e,{slots:t})=>{const{column:o,ns:r,style:l,onColumnSorted:n}=e,a=sa(l);if(o.placeholderSign===Yc)return te("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:i,headerClass:c,sortable:d}=o,u={...e,class:r.e("header-cell-text")},p=K8(i),h=p?p(u):be(t,"default",u,()=>[te(E2,u,null)]),{sortBy:v,sortState:m,headerCellProps:f}=e;let _,g;if(m){const x=m[o.key];_=!!w2[x],g=_?x:Wc.ASC}else _=o.key===v.key,g=_?v.order:Wc.ASC;const y=[r.e("header-cell"),ti(c,e,""),o.align===qc.CENTER&&r.is("align-center"),o.align===qc.RIGHT&&r.is("align-right"),d&&r.is("sortable")],w={...ti(f,e),onClick:o.sortable?n:void 0,class:y,style:a,"data-key":o.key};return te("div",Mt(w,{role:"columnheader"}),[h,d&&te(_ae,{class:[r.e("sort-icon"),_&&r.is("sorting")],sortOrder:g},null)])},Z8=(e,{slots:t})=>{var o;return te("div",{class:e.class,style:e.style},[(o=t.default)==null?void 0:o.call(t)])};Z8.displayName="ElTableV2Footer";const J8=(e,{slots:t})=>{const o=be(t,"default",{},()=>[te(Ny,null,null)]);return te("div",{class:e.class,style:e.style},[o])};J8.displayName="ElTableV2Empty";const Q8=(e,{slots:t})=>{var o;return te("div",{class:e.class,style:e.style},[(o=t.default)==null?void 0:o.call(t)])};Q8.displayName="ElTableV2Overlay";function Xc(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!io(e)}const Oae=N({name:"ElTableV2",props:fae,setup(e,{slots:t,expose:o}){const r=ze("table-v2"),{columnsStyles:l,fixedColumnsOnLeft:n,fixedColumnsOnRight:a,mainColumns:i,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:u,rightTableWidth:p,data:h,depthMap:v,expandedRowKeys:m,hasFixedColumns:f,mainTableRef:_,leftTableRef:g,rightTableRef:y,isDynamic:w,isResetting:x,isScrolling:$,bodyWidth:T,emptyStyle:L,rootStyle:P,headerWidth:R,footerHeight:V,showEmpty:B,scrollTo:F,scrollToLeft:Q,scrollToTop:J,scrollToRow:Z,getRowHeight:H,onColumnSorted:j,onRowHeightChange:K,onRowHovered:I,onRowExpanded:U,onRowsRendered:oe,onScroll:ne,onVerticalScroll:ce}=dae(e);return o({scrollTo:F,scrollToLeft:Q,scrollToTop:J,scrollToRow:Z}),zt(y2,{ns:r,isResetting:x,isScrolling:$}),()=>{const{cache:ee,cellProps:Me,estimatedRowHeight:de,expandColumnKey:_e,fixedData:me,headerHeight:Re,headerClass:Ce,headerProps:Ee,headerCellProps:De,sortBy:ae,sortState:pe,rowHeight:ke,rowClass:Oe,rowEventHandlers:we,rowKey:Te,rowProps:Ne,scrollbarAlwaysOn:Ie,indentSize:Ae,iconSize:xe,useIsScrolling:We,vScrollbarSize:qe,width:ye}=e,Ye=s(h),tt={cache:ee,class:r.e("main"),columns:s(i),data:Ye,fixedData:me,estimatedRowHeight:de,bodyWidth:s(T)+qe,headerHeight:Re,headerWidth:s(R),height:s(c),mainTableRef:_,rowKey:Te,rowHeight:ke,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,useIsScrolling:We,width:ye,getRowHeight:H,onRowsRendered:oe,onScroll:ne},pt=s(u),dt=s(d),Y={cache:ee,class:r.e("left"),columns:s(n),data:Ye,estimatedRowHeight:de,leftTableRef:g,rowHeight:ke,bodyWidth:pt,headerWidth:pt,headerHeight:Re,height:dt,rowKey:Te,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,useIsScrolling:We,width:pt,getRowHeight:H,onScroll:ce},A=s(p)+qe,G={cache:ee,class:r.e("right"),columns:s(a),data:Ye,estimatedRowHeight:de,rightTableRef:y,rowHeight:ke,bodyWidth:A,headerWidth:A,headerHeight:Re,height:dt,rowKey:Te,scrollbarAlwaysOn:Ie,scrollbarStartGap:2,scrollbarEndGap:qe,width:A,style:`--${s(r.namespace)}-table-scrollbar-size: ${qe}px`,useIsScrolling:We,getRowHeight:H,onScroll:ce},X=s(l),re={ns:r,depthMap:s(v),columnsStyles:X,expandColumnKey:_e,expandedRowKeys:s(m),estimatedRowHeight:de,hasFixedColumns:s(f),rowProps:Ne,rowClass:Oe,rowKey:Te,rowEventHandlers:we,onRowHovered:I,onRowExpanded:U,onRowHeightChange:K},ge={cellProps:Me,expandColumnKey:_e,indentSize:Ae,iconSize:xe,rowKey:Te,expandedRowKeys:s(m),ns:r},fe={ns:r,headerClass:Ce,headerProps:Ee,columnsStyles:X},Fe={ns:r,sortBy:ae,sortState:pe,headerCellProps:De,onColumnSorted:j},at={row:no=>te(Aae,Mt(no,re),{row:t.row,cell:bt=>{let Qt;return t.cell?te($2,Mt(bt,ge,{style:X[bt.column.key]}),Xc(Qt=t.cell(bt))?Qt:{default:()=>[Qt]}):te($2,Mt(bt,ge,{style:X[bt.column.key]}),null)}}),header:no=>te(Iae,Mt(no,fe),{header:t.header,cell:bt=>{let Qt;return t["header-cell"]?te(X8,Mt(bt,Fe,{style:X[bt.column.key]}),Xc(Qt=t["header-cell"](bt))?Qt:{default:()=>[Qt]}):te(X8,Mt(bt,Fe,{style:X[bt.column.key]}),null)}})},_t=[e.class,r.b(),r.e("root"),{[r.is("dynamic")]:s(w)}],At={class:r.e("footer"),style:s(V)};return te("div",{class:_t,style:s(P)},[te(Cae,tt,Xc(at)?at:{default:()=>[at]}),te(Eae,Y,Xc(at)?at:{default:()=>[at]}),te($ae,G,Xc(at)?at:{default:()=>[at]}),t.footer&&te(Z8,At,{default:t.footer}),s(B)&&te(J8,{class:r.e("empty"),style:s(L)},{default:t.empty}),t.overlay&&te(Q8,{class:r.e("overlay")},{default:t.overlay})])}}}),Nae=Pe({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:ue(Function)}}),Pae=N({name:"ElAutoResizer",props:Nae,setup(e,{slots:t}){const o=ze("auto-resizer"),{height:r,width:l,sizer:n}=uae(e),a={width:"100%",height:"100%"};return()=>{var i;return te("div",{ref:n,class:o.b(),style:a},[(i=t.default)==null?void 0:i.call(t,{height:r.value,width:l.value})])}}}),Rae=yt(Oae),Lae=yt(Pae),Lp=Symbol("tabsRootContextKey"),Bae=Pe({tabs:{type:ue(Array),default:()=>uo([])}}),ex="ElTabBar",Vae=N({...N({name:ex}),props:Bae,setup(e,{expose:t}){const o=e,r=wt(),l=Ge(Lp);l||Io(ex,"");const n=ze("tabs"),a=D(),i=D(),c=()=>{let u=0,p=0;const h=["top","bottom"].includes(l.props.tabPosition)?"width":"height",v=h==="width"?"x":"y",m=v==="x"?"left":"top";return o.tabs.every(f=>{var _,g;const y=(g=(_=r.parent)==null?void 0:_.refs)==null?void 0:g[`tab-${f.uid}`];if(!y)return!1;if(!f.active)return!0;u=y[`offset${Nl(m)}`],p=y[`client${Nl(h)}`];const w=window.getComputedStyle(y);return h==="width"&&(o.tabs.length>1&&(p-=Number.parseFloat(w.paddingLeft)+Number.parseFloat(w.paddingRight)),u+=Number.parseFloat(w.paddingLeft)),!1}),{[h]:`${p}px`,transform:`translate${Nl(v)}(${u}px)`}},d=()=>i.value=c();return Se(()=>o.tabs,async()=>{await et(),d()},{immediate:!0}),so(a,()=>d()),t({ref:a,update:d}),(u,p)=>(b(),M("div",{ref_key:"barRef",ref:a,class:O([s(n).e("active-bar"),s(n).is(s(l).props.tabPosition)]),style:Je(i.value)},null,6))}});var Dae=Le(Vae,[["__file","tab-bar.vue"]]);const Hae=Pe({panes:{type:ue(Array),default:()=>uo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),Fae={tabClick:(e,t,o)=>o instanceof Event,tabRemove:(e,t)=>t instanceof Event},tx="ElTabNav",jae=N({name:tx,props:Hae,emits:Fae,setup(e,{expose:t,emit:o}){const r=wt(),l=Ge(Lp);l||Io(tx,"");const n=ze("tabs"),a=nE(),i=mE(),c=D(),d=D(),u=D(),p=D(),h=D(!1),v=D(0),m=D(!1),f=D(!0),_=C(()=>["top","bottom"].includes(l.props.tabPosition)?"width":"height"),g=C(()=>({transform:`translate${_.value==="width"?"X":"Y"}(-${v.value}px)`})),y=()=>{if(!c.value)return;const R=c.value[`offset${Nl(_.value)}`],V=v.value;if(!V)return;const B=V>R?V-R:0;v.value=B},w=()=>{if(!c.value||!d.value)return;const R=d.value[`offset${Nl(_.value)}`],V=c.value[`offset${Nl(_.value)}`],B=v.value;if(R-B<=V)return;const F=R-B>V*2?B+V:R-V;v.value=F},x=async()=>{const R=d.value;if(!h.value||!u.value||!c.value||!R)return;await et();const V=u.value.querySelector(".is-active");if(!V)return;const B=c.value,F=["top","bottom"].includes(l.props.tabPosition),Q=V.getBoundingClientRect(),J=B.getBoundingClientRect(),Z=F?R.offsetWidth-J.width:R.offsetHeight-J.height,H=v.value;let j=H;F?(Q.leftJ.right&&(j=H+Q.right-J.right)):(Q.topJ.bottom&&(j=H+(Q.bottom-J.bottom))),j=Math.max(j,0),v.value=Math.min(j,Z)},$=()=>{var R;if(!d.value||!c.value)return;e.stretch&&((R=p.value)==null||R.update());const V=d.value[`offset${Nl(_.value)}`],B=c.value[`offset${Nl(_.value)}`],F=v.value;B0&&(v.value=0))},T=R=>{const V=R.code,{up:B,down:F,left:Q,right:J}=lt;if(![B,F,Q,J].includes(V))return;const Z=Array.from(R.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),H=Z.indexOf(R.target);let j;V===Q||V===B?H===0?j=Z.length-1:j=H-1:H{f.value&&(m.value=!0)},P=()=>m.value=!1;return Se(a,R=>{R==="hidden"?f.value=!1:R==="visible"&&setTimeout(()=>f.value=!0,50)}),Se(i,R=>{R?setTimeout(()=>f.value=!0,50):f.value=!1}),so(u,$),ft(()=>setTimeout(()=>x(),0)),rn(()=>$()),t({scrollToActiveTab:x,removeFocus:P}),Se(()=>e.panes,()=>r.update(),{flush:"post",deep:!0}),()=>{const R=h.value?[te("span",{class:[n.e("nav-prev"),n.is("disabled",!h.value.prev)],onClick:y},[te(Ze,null,{default:()=>[te(fn,null,null)]})]),te("span",{class:[n.e("nav-next"),n.is("disabled",!h.value.next)],onClick:w},[te(Ze,null,{default:()=>[te(ir,null,null)]})])]:null,V=e.panes.map((B,F)=>{var Q,J,Z,H;const j=B.uid,K=B.props.disabled,I=(J=(Q=B.props.name)!=null?Q:B.index)!=null?J:`${F}`,U=!K&&(B.isClosable||e.editable);B.index=`${F}`;const oe=U?te(Ze,{class:"is-icon-close",onClick:ee=>o("tabRemove",B,ee)},{default:()=>[te(Jr,null,null)]}):null,ne=((H=(Z=B.slots).label)==null?void 0:H.call(Z))||B.props.label,ce=!K&&B.active?0:-1;return te("div",{ref:`tab-${j}`,class:[n.e("item"),n.is(l.props.tabPosition),n.is("active",B.active),n.is("disabled",K),n.is("closable",U),n.is("focus",m.value)],id:`tab-${I}`,key:`tab-${j}`,"aria-controls":`pane-${I}`,role:"tab","aria-selected":B.active,tabindex:ce,onFocus:()=>L(),onBlur:()=>P(),onClick:ee=>{P(),o("tabClick",B,I,ee)},onKeydown:ee=>{U&&(ee.code===lt.delete||ee.code===lt.backspace)&&o("tabRemove",B,ee)}},[ne,oe])});return te("div",{ref:u,class:[n.e("nav-wrap"),n.is("scrollable",!!h.value),n.is(l.props.tabPosition)]},[R,te("div",{class:n.e("nav-scroll"),ref:c},[te("div",{class:[n.e("nav"),n.is(l.props.tabPosition),n.is("stretch",e.stretch&&["top","bottom"].includes(l.props.tabPosition))],ref:d,style:g.value,role:"tablist",onKeydown:T},[e.type?null:te(Dae,{ref:p,tabs:[...e.panes]},null),V])])])}}}),Kae=Pe({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:ue(Function),default:()=>!0},stretch:Boolean}),M2=e=>ut(e)||st(e),Uae={[St]:e=>M2(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>M2(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>M2(e),tabAdd:()=>!0},Wae=N({name:"ElTabs",props:Kae,emits:Uae,setup(e,{emit:t,slots:o,expose:r}){var l;const n=ze("tabs"),{children:a,addChild:i,removeChild:c}=Uh(wt(),"ElTabPane"),d=D(),u=D((l=e.modelValue)!=null?l:"0"),p=async(f,_=!1)=>{var g,y,w;if(!(u.value===f||ko(f)))try{await((g=e.beforeLeave)==null?void 0:g.call(e,f,u.value))!==!1&&(u.value=f,_&&(t(St,f),t("tabChange",f)),(w=(y=d.value)==null?void 0:y.removeFocus)==null||w.call(y))}catch{}},h=(f,_,g)=>{f.props.disabled||(p(_,!0),t("tabClick",f,g))},v=(f,_)=>{f.props.disabled||ko(f.props.name)||(_.stopPropagation(),t("edit",f.props.name,"remove"),t("tabRemove",f.props.name))},m=()=>{t("edit",void 0,"add"),t("tabAdd")};return Se(()=>e.modelValue,f=>p(f)),Se(u,async()=>{var f;await et(),(f=d.value)==null||f.scrollToActiveTab()}),zt(Lp,{props:e,currentName:u,registerPane:i,unregisterPane:c}),r({currentName:u}),()=>{const f=o["add-icon"],_=e.editable||e.addable?te("span",{class:n.e("new-tab"),tabindex:"0",onClick:m,onKeydown:w=>{w.code===lt.enter&&m()}},[f?be(o,"add-icon"):te(Ze,{class:n.is("icon-plus")},{default:()=>[te(fh,null,null)]})]):null,g=te("div",{class:[n.e("header"),n.is(e.tabPosition)]},[_,te(jae,{ref:d,currentName:u.value,editable:e.editable,type:e.type,panes:a.value,stretch:e.stretch,onTabClick:h,onTabRemove:v},null)]),y=te("div",{class:n.e("content")},[be(o,"default")]);return te("div",{class:[n.b(),n.m(e.tabPosition),{[n.m("card")]:e.type==="card",[n.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[g,y]:[y,g]])}}}),qae=Pe({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Yae=["id","aria-hidden","aria-labelledby"],ox="ElTabPane",Gae=N({...N({name:ox}),props:qae,setup(e){const t=e,o=wt(),r=Do(),l=Ge(Lp);l||Io(ox,"usage: ");const n=ze("tab-pane"),a=D(),i=C(()=>t.closable||l.props.closable),c=Wb(()=>{var v;return l.currentName.value===((v=t.name)!=null?v:a.value)}),d=D(c.value),u=C(()=>{var v;return(v=t.name)!=null?v:a.value}),p=Wb(()=>!t.lazy||d.value||c.value);Se(c,v=>{v&&(d.value=!0)});const h=Dt({uid:o.uid,slots:r,props:t,paneName:u,active:c,index:a,isClosable:i});return ft(()=>{l.registerPane(h)}),Rn(()=>{l.unregisterPane(h.uid)}),(v,m)=>s(p)?mt((b(),M("div",{key:0,id:`pane-${s(u)}`,class:O(s(n).b()),role:"tabpanel","aria-hidden":!s(c),"aria-labelledby":`tab-${s(u)}`},[be(v.$slots,"default")],10,Yae)),[[Lt,s(c)]]):se("v-if",!0)}});var rx=Le(Gae,[["__file","tab-pane.vue"]]);const Xae=yt(Wae,{TabPane:rx}),Zae=co(rx),Jae=Pe({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Rl,default:""},truncated:{type:Boolean},lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),Qae=N({...N({name:"ElText"}),props:Jae,setup(e){const t=e,o=So(),r=ze("text"),l=C(()=>[r.b(),r.m(t.type),r.m(o.value),r.is("truncated",t.truncated),r.is("line-clamp",!ko(t.lineClamp))]);return(n,a)=>(b(),he(Et(n.tag),{class:O(s(l)),style:Je({"-webkit-line-clamp":n.lineClamp})},{default:le(()=>[be(n.$slots,"default")]),_:3},8,["class","style"]))}});var eie=Le(Qae,[["__file","text.vue"]]);const tie=yt(eie),oie=Pe({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:Oo,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:ue([String,Object]),default:()=>dh},clearIcon:{type:ue([String,Object]),default:()=>hn},...Xi}),Cn=e=>{const t=(e||"").split(":");if(t.length>=2){let o=Number.parseInt(t[0],10);const r=Number.parseInt(t[1],10),l=e.toUpperCase();return l.includes("AM")&&o===12?o=0:l.includes("PM")&&o!==12&&(o+=12),{hours:o,minutes:r}}return null},A2=(e,t)=>{const o=Cn(e);if(!o)return-1;const r=Cn(t);if(!r)return-1;const l=o.minutes+o.hours*60,n=r.minutes+r.hours*60;return l===n?0:l>n?1:-1},lx=e=>`${e}`.padStart(2,"0"),ps=e=>`${lx(e.hours)}:${lx(e.minutes)}`,rie=(e,t)=>{const o=Cn(e);if(!o)return"";const r=Cn(t);if(!r)return"";const l={hours:o.hours,minutes:o.minutes};return l.minutes+=r.minutes,l.hours+=r.hours,l.hours+=Math.floor(l.minutes/60),l.minutes=l.minutes%60,ps(l)},lie=N({...N({name:"ElTimeSelect"}),props:oie,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const o=e;kt.extend(vv);const{Option:r}=Za,l=ze("input"),n=D(),a=xr(),{lang:i}=Rt(),c=C(()=>o.modelValue),d=C(()=>{const g=Cn(o.start);return g?ps(g):null}),u=C(()=>{const g=Cn(o.end);return g?ps(g):null}),p=C(()=>{const g=Cn(o.step);return g?ps(g):null}),h=C(()=>{const g=Cn(o.minTime||"");return g?ps(g):null}),v=C(()=>{const g=Cn(o.maxTime||"");return g?ps(g):null}),m=C(()=>{const g=[];if(o.start&&o.end&&o.step){let y=d.value,w;for(;y&&u.value&&A2(y,u.value)<=0;)w=kt(y,"HH:mm").locale(i.value).format(o.format),g.push({value:w,disabled:A2(y,h.value||"-1:-1")<=0||A2(y,v.value||"100:100")>=0}),y=rie(y,p.value)}return g});return t({blur:()=>{var g,y;(y=(g=n.value)==null?void 0:g.blur)==null||y.call(g)},focus:()=>{var g,y;(y=(g=n.value)==null?void 0:g.focus)==null||y.call(g)}}),(g,y)=>(b(),he(s(Za),{ref_key:"select",ref:n,"model-value":s(c),disabled:s(a),clearable:g.clearable,"clear-icon":g.clearIcon,size:g.size,effect:g.effect,placeholder:g.placeholder,"default-first-option":"",filterable:g.editable,"empty-values":g.emptyValues,"value-on-clear":g.valueOnClear,"onUpdate:modelValue":y[0]||(y[0]=w=>g.$emit("update:modelValue",w)),onChange:y[1]||(y[1]=w=>g.$emit("change",w)),onBlur:y[2]||(y[2]=w=>g.$emit("blur",w)),onFocus:y[3]||(y[3]=w=>g.$emit("focus",w))},{prefix:le(()=>[g.prefixIcon?(b(),he(s(Ze),{key:0,class:O(s(l).e("prefix-icon"))},{default:le(()=>[(b(),he(Et(g.prefixIcon)))]),_:1},8,["class"])):se("v-if",!0)]),default:le(()=>[(b(!0),M(Qe,null,It(s(m),w=>(b(),he(s(r),{key:w.value,label:w.value,value:w.value,disabled:w.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear"]))}});var Bp=Le(lie,[["__file","time-select.vue"]]);Bp.install=e=>{e.component(Bp.name,Bp)};const nie=Bp,aie=N({name:"ElTimeline",setup(e,{slots:t}){const o=ze("timeline");return zt("timeline",t),()=>rt("ul",{class:[o.b()]},[be(t,"default")])}}),iie=Pe({timestamp:{type:String,default:""},hideTimestamp:{type:Boolean,default:!1},center:{type:Boolean,default:!1},placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Xt},hollow:{type:Boolean,default:!1}}),sie=N({...N({name:"ElTimelineItem"}),props:iie,setup(e){const t=e,o=ze("timeline-item"),r=C(()=>[o.e("node"),o.em("node",t.size||""),o.em("node",t.type||""),o.is("hollow",t.hollow)]);return(l,n)=>(b(),M("li",{class:O([s(o).b(),{[s(o).e("center")]:l.center}])},[E("div",{class:O(s(o).e("tail"))},null,2),l.$slots.dot?se("v-if",!0):(b(),M("div",{key:0,class:O(s(r)),style:Je({backgroundColor:l.color})},[l.icon?(b(),he(s(Ze),{key:0,class:O(s(o).e("icon"))},{default:le(()=>[(b(),he(Et(l.icon)))]),_:1},8,["class"])):se("v-if",!0)],6)),l.$slots.dot?(b(),M("div",{key:1,class:O(s(o).e("dot"))},[be(l.$slots,"dot")],2)):se("v-if",!0),E("div",{class:O(s(o).e("wrapper"))},[!l.hideTimestamp&&l.placement==="top"?(b(),M("div",{key:0,class:O([s(o).e("timestamp"),s(o).is("top")])},$e(l.timestamp),3)):se("v-if",!0),E("div",{class:O(s(o).e("content"))},[be(l.$slots,"default")],2),!l.hideTimestamp&&l.placement==="bottom"?(b(),M("div",{key:1,class:O([s(o).e("timestamp"),s(o).is("bottom")])},$e(l.timestamp),3)):se("v-if",!0)],2)],2))}});var nx=Le(sie,[["__file","timeline-item.vue"]]);const cie=yt(aie,{TimelineItem:nx}),uie=co(nx),ax=Pe({nowrap:Boolean});var ix=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(ix||{});const die=Object.values(ix),z2=Pe({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:ue(Object),default:null}}),pie=Pe({side:{type:ue(String),values:die,required:!0}}),fie=["absolute","fixed"],hie=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],I2=Pe({arrowPadding:{type:ue(Number),default:5},effect:{type:String,default:""},contentClass:String,placement:{type:ue(String),values:hie,default:"bottom"},reference:{type:ue(Object),default:null},offset:{type:Number,default:8},strategy:{type:ue(String),values:fie,default:"absolute"},showArrow:{type:Boolean,default:!1},...Zo(["ariaLabel"])}),O2=Pe({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:ue(Function)},"onUpdate:open":{type:ue(Function)}}),fs={type:ue(Function)},N2=Pe({onBlur:fs,onClick:fs,onFocus:fs,onMouseDown:fs,onMouseEnter:fs,onMouseLeave:fs}),vie=Pe({...O2,...z2,...N2,...I2,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:ue(Object),default:null},teleported:Boolean,to:{type:ue(String),default:"body"}}),Vp=Symbol("tooltipV2"),sx=Symbol("tooltipV2Content"),P2="tooltip_v2.open",mie=N({...N({name:"ElTooltipV2Root"}),props:O2,setup(e,{expose:t}){const o=e,r=D(o.defaultOpen),l=D(null),n=C({get:()=>Na(o.open)?r.value:o.open,set:_=>{var g;r.value=_,(g=o["onUpdate:open"])==null||g.call(o,_)}}),a=C(()=>st(o.delayDuration)&&o.delayDuration>0),{start:i,stop:c}=$a(()=>{n.value=!0},C(()=>o.delayDuration),{immediate:!1}),d=ze("tooltip-v2"),u=Qo(),p=()=>{c(),n.value=!0},h=()=>{s(a)?i():p()},v=p,m=()=>{c(),n.value=!1};return Se(n,_=>{var g;_&&(document.dispatchEvent(new CustomEvent(P2)),v()),(g=o.onOpenChange)==null||g.call(o,_)}),ft(()=>{document.addEventListener(P2,m)}),to(()=>{c(),document.removeEventListener(P2,m)}),zt(Vp,{contentId:u,triggerRef:l,ns:d,onClose:m,onDelayOpen:h,onOpen:v}),t({onOpen:v,onClose:m}),(_,g)=>be(_.$slots,"default",{open:s(n)})}});var gie=Le(mie,[["__file","root.vue"]]);const bie=N({...N({name:"ElTooltipV2Arrow"}),props:{...z2,...pie},setup(e){const t=e,{ns:o}=Ge(Vp),{arrowRef:r}=Ge(sx),l=C(()=>{const{style:n,width:a,height:i}=t,c=o.namespace.value;return{[`--${c}-tooltip-v2-arrow-width`]:`${a}px`,[`--${c}-tooltip-v2-arrow-height`]:`${i}px`,[`--${c}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${c}-tooltip-v2-arrow-cover-width`]:a/2-1,...n||{}}});return(n,a)=>(b(),M("span",{ref_key:"arrowRef",ref:r,style:Je(s(l)),class:O(s(o).e("arrow"))},null,6))}});var cx=Le(bie,[["__file","arrow.vue"]]);const _ie=Pe({style:{type:ue([String,Object,Array]),default:()=>({})}}),wie=N({...N({name:"ElVisuallyHidden"}),props:_ie,setup(e){const t=e,o=C(()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,l)=>(b(),M("span",Mt(r.$attrs,{style:s(o)}),[be(r.$slots,"default")],16))}});var yie=Le(wie,[["__file","visual-hidden.vue"]]);const xie=["data-side"],kie=N({...N({name:"ElTooltipV2Content"}),props:{...I2,...ax},setup(e){const t=e,{triggerRef:o,contentId:r}=Ge(Vp),l=D(t.placement),n=D(t.strategy),a=D(null),{referenceRef:i,contentRef:c,middlewareData:d,x:u,y:p,update:h}=fK({placement:l,strategy:n,middleware:C(()=>{const w=[Z6(t.offset)];return t.showArrow&&w.push(hK({arrowRef:a})),w})}),v=Ki().nextZIndex(),m=ze("tooltip-v2"),f=C(()=>l.value.split("-")[0]),_=C(()=>({position:s(n),top:`${s(p)||0}px`,left:`${s(u)||0}px`,zIndex:v})),g=C(()=>{if(!t.showArrow)return{};const{arrow:w}=s(d);return{[`--${m.namespace.value}-tooltip-v2-arrow-x`]:`${w==null?void 0:w.x}px`||"",[`--${m.namespace.value}-tooltip-v2-arrow-y`]:`${w==null?void 0:w.y}px`||""}}),y=C(()=>[m.e("content"),m.is("dark",t.effect==="dark"),m.is(s(n)),t.contentClass]);return Se(a,()=>h()),Se(()=>t.placement,w=>l.value=w),ft(()=>{Se(()=>t.reference||o.value,w=>{i.value=w||void 0},{immediate:!0})}),zt(sx,{arrowRef:a}),(w,x)=>(b(),M("div",{ref_key:"contentRef",ref:c,style:Je(s(_)),"data-tooltip-v2-root":""},[w.nowrap?se("v-if",!0):(b(),M("div",{key:0,"data-side":s(f),class:O(s(y))},[be(w.$slots,"default",{contentStyle:s(_),contentClass:s(y)}),te(s(yie),{id:s(r),role:"tooltip"},{default:le(()=>[w.ariaLabel?(b(),M(Qe,{key:0},[Ct($e(w.ariaLabel),1)],64)):be(w.$slots,"default",{key:1})]),_:3},8,["id"]),be(w.$slots,"arrow",{style:Je(s(g)),side:s(f)})],10,xie))],4))}});var ux=Le(kie,[["__file","content.vue"]]);const Cie=Pe({setRef:{type:ue(Function),required:!0},onlyChild:Boolean});var Sie=N({props:Cie,setup(e,{slots:t}){const o=D(),r=Od(o,l=>{l?e.setRef(l.nextElementSibling):e.setRef(null)});return()=>{var l;const[n]=((l=t.default)==null?void 0:l.call(t))||[],a=e.onlyChild?sF(n.children):n.children;return te(Qe,{ref:r},[a])}}});const Eie=N({...N({name:"ElTooltipV2Trigger"}),props:{...ax,...N2},setup(e){const t=e,{onClose:o,onOpen:r,onDelayOpen:l,triggerRef:n,contentId:a}=Ge(Vp);let i=!1;const c=y=>{n.value=y},d=()=>{i=!1},u=vo(t.onMouseEnter,l),p=vo(t.onMouseLeave,o),h=vo(t.onMouseDown,()=>{o(),i=!0,document.addEventListener("mouseup",d,{once:!0})}),v=vo(t.onFocus,()=>{i||r()}),m=vo(t.onBlur,o),f=vo(t.onClick,y=>{y.detail===0&&o()}),_={blur:m,click:f,focus:v,mousedown:h,mouseenter:u,mouseleave:p},g=(y,w,x)=>{y&&Object.entries(w).forEach(([$,T])=>{y[x]($,T)})};return Se(n,(y,w)=>{g(y,_,"addEventListener"),g(w,_,"removeEventListener"),y&&y.setAttribute("aria-describedby",a.value)}),to(()=>{g(n.value,_,"removeEventListener"),document.removeEventListener("mouseup",d)}),(y,w)=>y.nowrap?(b(),he(s(Sie),{key:0,"set-ref":c,"only-child":""},{default:le(()=>[be(y.$slots,"default")]),_:3})):(b(),M("button",Mt({key:1,ref_key:"triggerRef",ref:n},y.$attrs),[be(y.$slots,"default")],16))}});var Tie=Le(Eie,[["__file","trigger.vue"]]);const $ie=N({...N({name:"ElTooltipV2"}),props:vie,setup(e){const o=Bo(e),r=Dt(Ol(o,Object.keys(z2))),l=Dt(Ol(o,Object.keys(I2))),n=Dt(Ol(o,Object.keys(O2))),a=Dt(Ol(o,Object.keys(N2)));return(i,c)=>(b(),he(gie,Zl(mi(n)),{default:le(({open:d})=>[te(Tie,Mt(a,{nowrap:""}),{default:le(()=>[be(i.$slots,"trigger")]),_:3},16),(b(),he(hi,{to:i.to,disabled:!i.teleported},[i.fullTransition?(b(),he(Mo,Zl(Mt({key:0},i.transitionProps)),{default:le(()=>[i.alwaysOn||d?(b(),he(ux,Zl(Mt({key:0},l)),{arrow:le(({style:u,side:p})=>[i.showArrow?(b(),he(cx,Mt({key:0},r,{style:u,side:p}),null,16,["style","side"])):se("v-if",!0)]),default:le(()=>[be(i.$slots,"default")]),_:3},16)):se("v-if",!0)]),_:2},1040)):(b(),M(Qe,{key:1},[i.alwaysOn||d?(b(),he(ux,Zl(Mt({key:0},l)),{arrow:le(({style:u,side:p})=>[i.showArrow?(b(),he(cx,Mt({key:0},r,{style:u,side:p}),null,16,["style","side"])):se("v-if",!0)]),default:le(()=>[be(i.$slots,"default")]),_:3},16)):se("v-if",!0)],64))],8,["to","disabled"]))]),_:3},16))}});var Mie=Le($ie,[["__file","tooltip.vue"]]);const Aie=yt(Mie),dx="left-check-change",px="right-check-change",hs=Pe({data:{type:ue(Array),default:()=>[]},titles:{type:ue(Array),default:()=>[]},buttonTexts:{type:ue(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:ue(Function)},leftDefaultChecked:{type:ue(Array),default:()=>[]},rightDefaultChecked:{type:ue(Array),default:()=>[]},renderContent:{type:ue(Function)},modelValue:{type:ue(Array),default:()=>[]},format:{type:ue(Object),default:()=>({})},filterable:Boolean,props:{type:ue(Object),default:()=>uo({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),R2=(e,t)=>[e,t].every(Ke)||Ke(e)&&jo(t),zie={[ro]:(e,t,o)=>[e,o].every(Ke)&&["left","right"].includes(t),[St]:e=>Ke(e),[dx]:R2,[px]:R2},L2="checked-change",Iie=Pe({data:hs.data,optionRender:{type:ue(Function)},placeholder:String,title:String,filterable:Boolean,format:hs.format,filterMethod:hs.filterMethod,defaultChecked:hs.leftDefaultChecked,props:hs.props}),Oie={[L2]:R2},Zc=e=>{const t={label:"label",key:"key",disabled:"disabled"};return C(()=>({...t,...e.props}))},Nie=(e,t,o)=>{const r=Zc(e),l=C(()=>e.data.filter(u=>it(e.filterMethod)?e.filterMethod(t.query,u):String(u[r.value.label]||u[r.value.key]).toLowerCase().includes(t.query.toLowerCase()))),n=C(()=>l.value.filter(u=>!u[r.value.disabled])),a=C(()=>{const u=t.checked.length,p=e.data.length,{noChecked:h,hasChecked:v}=e.format;return h&&v?u>0?v.replace(/\${checked}/g,u.toString()).replace(/\${total}/g,p.toString()):h.replace(/\${total}/g,p.toString()):`${u}/${p}`}),i=C(()=>{const u=t.checked.length;return u>0&&u{const u=n.value.map(p=>p[r.value.key]);t.allChecked=u.length>0&&u.every(p=>t.checked.includes(p))},d=u=>{t.checked=u?n.value.map(p=>p[r.value.key]):[]};return Se(()=>t.checked,(u,p)=>{if(c(),t.checkChangeByUser){const h=u.concat(p).filter(v=>!u.includes(v)||!p.includes(v));o(L2,u,h)}else o(L2,u),t.checkChangeByUser=!0}),Se(n,()=>{c()}),Se(()=>e.data,()=>{const u=[],p=l.value.map(h=>h[r.value.key]);t.checked.forEach(h=>{p.includes(h)&&u.push(h)}),t.checkChangeByUser=!1,t.checked=u}),Se(()=>e.defaultChecked,(u,p)=>{if(p&&u.length===p.length&&u.every(m=>p.includes(m)))return;const h=[],v=n.value.map(m=>m[r.value.key]);u.forEach(m=>{v.includes(m)&&h.push(m)}),t.checkChangeByUser=!1,t.checked=h},{immediate:!0}),{filteredData:l,checkableData:n,checkedSummary:a,isIndeterminate:i,updateAllChecked:c,handleAllCheckedChange:d}},Pie=(e,t)=>({onSourceCheckedChange:(l,n)=>{e.leftChecked=l,n&&t(dx,l,n)},onTargetCheckedChange:(l,n)=>{e.rightChecked=l,n&&t(px,l,n)}}),Rie=e=>{const t=Zc(e),o=C(()=>e.data.reduce((n,a)=>(n[a[t.value.key]]=a)&&n,{})),r=C(()=>e.data.filter(n=>!e.modelValue.includes(n[t.value.key]))),l=C(()=>e.targetOrder==="original"?e.data.filter(n=>e.modelValue.includes(n[t.value.key])):e.modelValue.reduce((n,a)=>{const i=o.value[a];return i&&n.push(i),n},[]));return{sourceData:r,targetData:l}},Lie=(e,t,o)=>{const r=Zc(e),l=(i,c,d)=>{o(St,i),o(ro,i,c,d)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(c=>{const d=i.indexOf(c);d>-1&&i.splice(d,1)}),l(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const c=e.data.filter(d=>{const u=d[r.value.key];return t.leftChecked.includes(u)&&!e.modelValue.includes(u)}).map(d=>d[r.value.key]);i=e.targetOrder==="unshift"?c.concat(i):i.concat(c),e.targetOrder==="original"&&(i=e.data.filter(d=>i.includes(d[r.value.key])).map(d=>d[r.value.key])),l(i,"right",t.leftChecked)}}},Bie=N({...N({name:"ElTransferPanel"}),props:Iie,emits:Oie,setup(e,{expose:t,emit:o}){const r=e,l=Do(),n=({option:w})=>w,{t:a}=Rt(),i=ze("transfer"),c=Dt({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Zc(r),{filteredData:u,checkedSummary:p,isIndeterminate:h,handleAllCheckedChange:v}=Nie(r,c,o),m=C(()=>!Yr(c.query)&&Yr(u.value)),f=C(()=>!Yr(l.default()[0].children)),{checked:_,allChecked:g,query:y}=Bo(c);return t({query:y}),(w,x)=>(b(),M("div",{class:O(s(i).b("panel"))},[E("p",{class:O(s(i).be("panel","header"))},[te(s(rl),{modelValue:s(g),"onUpdate:modelValue":x[0]||(x[0]=$=>Zt(g)?g.value=$:null),indeterminate:s(h),"validate-event":!1,onChange:s(v)},{default:le(()=>[Ct($e(w.title)+" ",1),E("span",null,$e(s(p)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),E("div",{class:O([s(i).be("panel","body"),s(i).is("with-footer",s(f))])},[w.filterable?(b(),he(s(cr),{key:0,modelValue:s(y),"onUpdate:modelValue":x[1]||(x[1]=$=>Zt(y)?y.value=$:null),class:O(s(i).be("panel","filter")),size:"default",placeholder:w.placeholder,"prefix-icon":s(U3),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):se("v-if",!0),mt(te(s(Rw),{modelValue:s(_),"onUpdate:modelValue":x[2]||(x[2]=$=>Zt(_)?_.value=$:null),"validate-event":!1,class:O([s(i).is("filterable",w.filterable),s(i).be("panel","list")])},{default:le(()=>[(b(!0),M(Qe,null,It(s(u),$=>(b(),he(s(rl),{key:$[s(d).key],class:O(s(i).be("panel","item")),value:$[s(d).key],disabled:$[s(d).disabled],"validate-event":!1},{default:le(()=>{var T;return[te(n,{option:(T=w.optionRender)==null?void 0:T.call(w,$)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[Lt,!s(m)&&!s(Yr)(w.data)]]),mt(E("p",{class:O(s(i).be("panel","empty"))},$e(s(m)?s(a)("el.transfer.noMatch"):s(a)("el.transfer.noData")),3),[[Lt,s(m)||s(Yr)(w.data)]])],2),s(f)?(b(),M("p",{key:0,class:O(s(i).be("panel","footer"))},[be(w.$slots,"default")],2)):se("v-if",!0)],2))}});var fx=Le(Bie,[["__file","transfer-panel.vue"]]);const Vie={key:0},Die={key:0},Hie=N({...N({name:"ElTransfer"}),props:hs,emits:zie,setup(e,{expose:t,emit:o}){const r=e,l=Do(),{t:n}=Rt(),a=ze("transfer"),{formItem:i}=sr(),c=Dt({leftChecked:[],rightChecked:[]}),d=Zc(r),{sourceData:u,targetData:p}=Rie(r),{onSourceCheckedChange:h,onTargetCheckedChange:v}=Pie(c,o),{addToLeft:m,addToRight:f}=Lie(r,c,o),_=D(),g=D(),y=P=>{switch(P){case"left":_.value.query="";break;case"right":g.value.query="";break}},w=C(()=>r.buttonTexts.length===2),x=C(()=>r.titles[0]||n("el.transfer.titles.0")),$=C(()=>r.titles[1]||n("el.transfer.titles.1")),T=C(()=>r.filterPlaceholder||n("el.transfer.filterPlaceholder"));Se(()=>r.modelValue,()=>{var P;r.validateEvent&&((P=i==null?void 0:i.validate)==null||P.call(i,"change").catch(R=>void 0))});const L=C(()=>P=>r.renderContent?r.renderContent(rt,P):l.default?l.default({option:P}):rt("span",P[d.value.label]||P[d.value.key]));return t({clearQuery:y,leftPanel:_,rightPanel:g}),(P,R)=>(b(),M("div",{class:O(s(a).b())},[te(fx,{ref_key:"leftPanel",ref:_,data:s(u),"option-render":s(L),placeholder:s(T),title:s(x),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,"default-checked":P.leftDefaultChecked,props:r.props,onCheckedChange:s(h)},{default:le(()=>[be(P.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),E("div",{class:O(s(a).e("buttons"))},[te(s(Wo),{type:"primary",class:O([s(a).e("button"),s(a).is("with-texts",s(w))]),disabled:s(Yr)(c.rightChecked),onClick:s(m)},{default:le(()=>[te(s(Ze),null,{default:le(()=>[te(s(fn))]),_:1}),s(ko)(P.buttonTexts[0])?se("v-if",!0):(b(),M("span",Vie,$e(P.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),te(s(Wo),{type:"primary",class:O([s(a).e("button"),s(a).is("with-texts",s(w))]),disabled:s(Yr)(c.leftChecked),onClick:s(f)},{default:le(()=>[s(ko)(P.buttonTexts[1])?se("v-if",!0):(b(),M("span",Die,$e(P.buttonTexts[1]),1)),te(s(Ze),null,{default:le(()=>[te(s(ir))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),te(fx,{ref_key:"rightPanel",ref:g,data:s(p),"option-render":s(L),placeholder:s(T),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,title:s($),"default-checked":P.rightDefaultChecked,props:r.props,onCheckedChange:s(v)},{default:le(()=>[be(P.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var Fie=Le(Hie,[["__file","transfer.vue"]]);const jie=yt(Fie),vs="$treeNodeId",hx=function(e,t){!t||t[vs]||Object.defineProperty(t,vs,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},B2=function(e,t){return e?t[e]:t[vs]},V2=(e,t,o)=>{const r=e.value.currentNode;o();const l=e.value.currentNode;r!==l&&t("current-change",l?l.data:null,l)},D2=e=>{let t=!0,o=!0,r=!0;for(let l=0,n=e.length;l"u"){const n=r[t];return n===void 0?"":n}};let Kie=0,H2=class ff{constructor(t){this.id=Kie++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const o in t)Pt(t,o)&&(this[o]=t[o]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const o=t.props;if(o&&typeof o.isLeaf<"u"){const n=Dp(this,"isLeaf");typeof n=="boolean"&&(this.isLeafByUser=n)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||hx(this,this.data),!this.data)return;const r=t.defaultExpandedKeys,l=t.key;l&&r&&r.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||hx(this,t),this.data=t,this.childNodes=[];let o;this.level===0&&Array.isArray(this.data)?o=this.data:o=Dp(this,"children")||[];for(let r=0,l=o.length;r-1)return t.childNodes[o+1]}return null}get previousSibling(){const t=this.parent;if(t){const o=t.childNodes.indexOf(this);if(o>-1)return o>0?t.childNodes[o-1]:null}return null}contains(t,o=!0){return(this.childNodes||[]).some(r=>r===t||o&&r.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,o,r){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof ff)){if(!r){const l=this.getChildren(!0);l.includes(t.data)||(typeof o>"u"||o<0?l.push(t.data):l.splice(o,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Dt(new ff(t)),t instanceof ff&&t.initialize()}t.level=this.level+1,typeof o>"u"||o<0?this.childNodes.push(t):this.childNodes.splice(o,0,t),this.updateLeafState()}insertBefore(t,o){let r;o&&(r=this.childNodes.indexOf(o)),this.insertChild(t,r)}insertAfter(t,o){let r;o&&(r=this.childNodes.indexOf(o),r!==-1&&(r+=1)),this.insertChild(t,r)}removeChild(t){const o=this.getChildren()||[],r=o.indexOf(t.data);r>-1&&o.splice(r,1);const l=this.childNodes.indexOf(t);l>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(l,1)),this.updateLeafState()}removeChildByData(t){let o=null;for(let r=0;r{if(o){let l=this.parent;for(;l.level>0;)l.expanded=!0,l=l.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(l=>{l.canFocus=!0})};this.shouldLoadData()?this.loadData(l=>{Array.isArray(l)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Jc(this),r())}):r()}doCreateChildren(t,o={}){t.forEach(r=>{this.insertChild(Object.assign({data:r},o),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,o,r,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:i}=D2(this.childNodes);!this.isLeaf&&!a&&i&&(this.checked=!1,t=!1);const c=()=>{if(o){const d=this.childNodes;for(let h=0,v=d.length;h{c(),Jc(this)},{checked:t!==!1});return}else c()}const n=this.parent;!n||n.level===0||r||Jc(n)}getChildren(t=!1){if(this.level===0)return this.data;const o=this.data;if(!o)return null;const r=this.store.props;let l="children";return r&&(l=r.children||"children"),o[l]===void 0&&(o[l]=null),t&&!o[l]&&(o[l]=[]),o[l]}updateChildren(){const t=this.getChildren()||[],o=this.childNodes.map(n=>n.data),r={},l=[];t.forEach((n,a)=>{const i=n[vs];!!i&&o.findIndex(d=>d[vs]===i)>=0?r[i]={index:a,data:n}:l.push({index:a,data:n})}),this.store.lazy||o.forEach(n=>{r[n[vs]]||this.removeChildByData(n)}),l.forEach(({index:n,data:a})=>{this.insertChild({data:a},n)}),this.updateLeafState()}loadData(t,o={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(o).length)){this.loading=!0;const r=n=>{this.childNodes=[],this.doCreateChildren(n,o),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,n)},l=()=>{this.loading=!1};this.store.load(this,r,l)}else t&&t.call(this)}eachNode(t){const o=[this];for(;o.length;){const r=o.shift();o.unshift(...r.childNodes),t(r)}}reInitChecked(){this.store.checkStrictly||Jc(this)}};class Uie{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const o in t)Pt(t,o)&&(this[o]=t[o]);this.nodesMap={}}initialize(){if(this.root=new H2({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,o=>{this.root.doCreateChildren(o),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const o=this.filterNodeMethod,r=this.lazy,l=function(n){const a=n.root?n.root.childNodes:n.childNodes;if(a.forEach(i=>{i.visible=o.call(i,t,i.data,i),l(i)}),!n.visible&&a.length){let i=!0;i=!a.some(c=>c.visible),n.root?n.root.visible=i===!1:n.visible=i===!1}t&&n.visible&&!n.isLeaf&&(!r||n.loaded)&&n.expand()};l(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof H2)return t;const o=xt(t)?B2(this.key,t):t;return this.nodesMap[o]||null}insertBefore(t,o){const r=this.getNode(o);r.parent.insertBefore({data:t},r)}insertAfter(t,o){const r=this.getNode(o);r.parent.insertAfter({data:t},r)}remove(t){const o=this.getNode(t);o&&o.parent&&(o===this.currentNode&&(this.currentNode=null),o.parent.removeChild(o))}append(t,o){const r=Na(o)?this.root:this.getNode(o);r&&r.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],o=this.nodesMap;t.forEach(r=>{const l=o[r];l&&l.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const o=this.key;!t||!t.data||(o?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,o=!1){const r=[],l=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{(i.checked||o&&i.indeterminate)&&(!t||t&&i.isLeaf)&&r.push(i.data),l(i)})};return l(this),r}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(o=>(o||{})[this.key])}getHalfCheckedNodes(){const t=[],o=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(n=>{n.indeterminate&&t.push(n.data),o(n)})};return o(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],o=this.nodesMap;for(const r in o)Pt(o,r)&&t.push(o[r]);return t}updateChildren(t,o){const r=this.nodesMap[t];if(!r)return;const l=r.childNodes;for(let n=l.length-1;n>=0;n--){const a=l[n];this.remove(a.data)}for(let n=0,a=o.length;nc.level-d.level),n=Object.create(null),a=Object.keys(r);l.forEach(c=>c.setChecked(!1,!1));const i=c=>{c.childNodes.forEach(d=>{var u;n[d.data[t]]=!0,(u=d.childNodes)!=null&&u.length&&i(d)})};for(let c=0,d=l.length;c{_.isLeaf||_.setChecked(!1,!1),v(_)})};v(u)}}}setCheckedNodes(t,o=!1){const r=this.key,l={};t.forEach(n=>{l[(n||{})[r]]=!0}),this._setCheckedKeys(r,o,l)}setCheckedKeys(t,o=!1){this.defaultCheckedKeys=t;const r=this.key,l={};t.forEach(n=>{l[n]=!0}),this._setCheckedKeys(r,o,l)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(o=>{const r=this.getNode(o);r&&r.expand(null,this.autoExpandParent)})}setChecked(t,o,r){const l=this.getNode(t);l&&l.setChecked(!!o,r)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const o=this.currentNode;o&&(o.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,o=!0){const r=t[this.key],l=this.nodesMap[r];this.setCurrentNode(l),o&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,o=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(t);r&&(this.setCurrentNode(r),o&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}var Wie=Le(N({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=ze("tree"),o=Ge("NodeInstance"),r=Ge("RootTree");return()=>{const l=e.node,{data:n,store:a}=l;return e.renderContent?e.renderContent(rt,{_self:o,node:l,data:n,store:a}):be(r.ctx.slots,"default",{node:l,data:n},()=>[rt("span",{class:t.be("node","label")},[l.label])])}}}),[["__file","tree-node-content.vue"]]);function vx(e){const t=Ge("TreeNodeMap",null),o={treeNodeExpand:r=>{e.node!==r&&e.node.collapse()},children:[]};return t&&t.children.push(o),zt("TreeNodeMap",o),{broadcastExpanded:r=>{if(e.accordion)for(const l of o.children)l.treeNodeExpand(r)}}}const mx=Symbol("dragEvents");function qie({props:e,ctx:t,el$:o,dropIndicator$:r,store:l}){const n=ze("tree"),a=D({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return zt(mx,{treeNodeDragStart:({event:u,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return u.preventDefault(),!1;u.dataTransfer.effectAllowed="move";try{u.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=p,t.emit("node-drag-start",p.node,u)},treeNodeDragOver:({event:u,treeNode:p})=>{const h=p,v=a.value.dropNode;v&&v.node.id!==h.node.id&&ar(v.$el,n.is("drop-inner"));const m=a.value.draggingNode;if(!m||!h)return;let f=!0,_=!0,g=!0,y=!0;typeof e.allowDrop=="function"&&(f=e.allowDrop(m.node,h.node,"prev"),y=_=e.allowDrop(m.node,h.node,"inner"),g=e.allowDrop(m.node,h.node,"next")),u.dataTransfer.dropEffect=_||f||g?"move":"none",(f||_||g)&&(v==null?void 0:v.node.id)!==h.node.id&&(v&&t.emit("node-drag-leave",m.node,v.node,u),t.emit("node-drag-enter",m.node,h.node,u)),f||_||g?a.value.dropNode=h:a.value.dropNode=null,h.node.nextSibling===m.node&&(g=!1),h.node.previousSibling===m.node&&(f=!1),h.node.contains(m.node,!1)&&(_=!1),(m.node===h.node||m.node.contains(h.node))&&(f=!1,_=!1,g=!1);const w=h.$el.querySelector(`.${n.be("node","content")}`).getBoundingClientRect(),x=o.value.getBoundingClientRect();let $;const T=f?_?.25:g?.45:1:-1,L=g?_?.75:f?.55:0:1;let P=-9999;const R=u.clientY-w.top;Rw.height*L?$="after":_?$="inner":$="none";const V=h.$el.querySelector(`.${n.be("node","expand-icon")}`).getBoundingClientRect(),B=r.value;$==="before"?P=V.top-x.top:$==="after"&&(P=V.bottom-x.top),B.style.top=`${P}px`,B.style.left=`${V.right-x.left}px`,$==="inner"?Zr(h.$el,n.is("drop-inner")):ar(h.$el,n.is("drop-inner")),a.value.showDropIndicator=$==="before"||$==="after",a.value.allowDrop=a.value.showDropIndicator||y,a.value.dropType=$,t.emit("node-drag-over",m.node,h.node,u)},treeNodeDragEnd:u=>{const{draggingNode:p,dropType:h,dropNode:v}=a.value;if(u.preventDefault(),u.dataTransfer.dropEffect="move",p&&v){const m={data:p.node.data};h!=="none"&&p.node.remove(),h==="before"?v.node.parent.insertBefore(m,v.node):h==="after"?v.node.parent.insertAfter(m,v.node):h==="inner"&&v.node.insertChild(m),h!=="none"&&(l.value.registerNode(m),l.value.key&&p.node.eachNode(f=>{var _;(_=l.value.nodesMap[f.data[l.value.key]])==null||_.setChecked(f.checked,!l.value.checkStrictly)})),ar(v.$el,n.is("drop-inner")),t.emit("node-drag-end",p.node,v.node,h,u),h!=="none"&&t.emit("node-drop",p.node,v.node,h,u)}p&&!v&&t.emit("node-drag-end",p.node,null,h,u),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const Yie=N({name:"ElTreeNode",components:{ElCollapseTransition:mp,ElCheckbox:rl,NodeContent:Wie,ElIcon:Ze,Loading:vn},props:{node:{type:H2,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const o=ze("tree"),{broadcastExpanded:r}=vx(e),l=Ge("RootTree"),n=D(!1),a=D(!1),i=D(null),c=D(null),d=D(null),u=Ge(mx),p=wt();zt("NodeInstance",p),e.node.expanded&&(n.value=!0,a.value=!0);const h=l.props.props.children||"children";Se(()=>{const R=e.node.data[h];return R&&[...R]},()=>{e.node.updateChildren()}),Se(()=>e.node.indeterminate,R=>{f(e.node.checked,R)}),Se(()=>e.node.checked,R=>{f(R,e.node.indeterminate)}),Se(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),Se(()=>e.node.expanded,R=>{et(()=>n.value=R),R&&(a.value=!0)});const v=R=>B2(l.props.nodeKey,R.data),m=R=>{const V=e.props.class;if(!V)return{};let B;if(it(V)){const{data:F}=R;B=V(F,R)}else B=V;return ut(B)?{[B]:!0}:B},f=(R,V)=>{(i.value!==R||c.value!==V)&&l.ctx.emit("check-change",e.node.data,R,V),i.value=R,c.value=V},_=R=>{V2(l.store,l.ctx.emit,()=>l.store.value.setCurrentNode(e.node)),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),l.props.checkOnClickNode&&!e.node.disabled&&w(null,{target:{checked:!e.node.checked}}),l.ctx.emit("node-click",e.node.data,e.node,p,R)},g=R=>{l.instance.vnode.props.onNodeContextmenu&&(R.stopPropagation(),R.preventDefault()),l.ctx.emit("node-contextmenu",R,e.node.data,e.node,p)},y=()=>{e.node.isLeaf||(n.value?(l.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},w=(R,V)=>{e.node.setChecked(V.target.checked,!l.props.checkStrictly),et(()=>{const B=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:B.getCheckedNodes(),checkedKeys:B.getCheckedKeys(),halfCheckedNodes:B.getHalfCheckedNodes(),halfCheckedKeys:B.getHalfCheckedKeys()})})};return{ns:o,node$:d,tree:l,expanded:n,childNodeRendered:a,oldChecked:i,oldIndeterminate:c,getNodeKey:v,getNodeClass:m,handleSelectChange:f,handleClick:_,handleContextMenu:g,handleExpandIconClick:y,handleCheckChange:w,handleChildNodeExpand:(R,V,B)=>{r(V),l.ctx.emit("node-expand",R,V,B)},handleDragStart:R=>{l.props.draggable&&u.treeNodeDragStart({event:R,treeNode:e})},handleDragOver:R=>{R.preventDefault(),l.props.draggable&&u.treeNodeDragOver({event:R,treeNode:{$el:d.value,node:e.node}})},handleDrop:R=>{R.preventDefault()},handleDragEnd:R=>{l.props.draggable&&u.treeNodeDragEnd(R)},CaretRight:uh}}}),Gie=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],Xie=["aria-expanded"];function Zie(e,t,o,r,l,n){const a=nt("el-icon"),i=nt("el-checkbox"),c=nt("loading"),d=nt("node-content"),u=nt("el-tree-node"),p=nt("el-collapse-transition");return mt((b(),M("div",{ref:"node$",class:O([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=ct((...h)=>e.handleClick&&e.handleClick(...h),["stop"])),onContextmenu:t[2]||(t[2]=(...h)=>e.handleContextMenu&&e.handleContextMenu(...h)),onDragstart:t[3]||(t[3]=ct((...h)=>e.handleDragStart&&e.handleDragStart(...h),["stop"])),onDragover:t[4]||(t[4]=ct((...h)=>e.handleDragOver&&e.handleDragOver(...h),["stop"])),onDragend:t[5]||(t[5]=ct((...h)=>e.handleDragEnd&&e.handleDragEnd(...h),["stop"])),onDrop:t[6]||(t[6]=ct((...h)=>e.handleDrop&&e.handleDrop(...h),["stop"]))},[E("div",{class:O(e.ns.be("node","content")),style:Je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(b(),he(a,{key:0,class:O([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:ct(e.handleExpandIconClick,["stop"])},{default:le(()=>[(b(),he(Et(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):se("v-if",!0),e.showCheckbox?(b(),he(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=ct(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):se("v-if",!0),e.node.loading?(b(),he(a,{key:2,class:O([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:le(()=>[te(c)]),_:1},8,["class"])):se("v-if",!0),te(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),te(p,null,{default:le(()=>[!e.renderAfterExpand||e.childNodeRendered?mt((b(),M("div",{key:0,class:O(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(b(!0),M(Qe,null,It(e.node.childNodes,h=>(b(),he(u,{key:e.getNodeKey(h),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:h,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,Xie)),[[Lt,e.expanded]]):se("v-if",!0)]),_:1})],42,Gie)),[[Lt,e.node.visible]])}var Jie=Le(Yie,[["render",Zie],["__file","tree-node.vue"]]);function Qie({el$:e},t){const o=ze("tree"),r=lo([]),l=lo([]);ft(()=>{a()}),rn(()=>{r.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),l.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),Se(l,i=>{i.forEach(c=>{c.setAttribute("tabindex","-1")})}),oo(e,"keydown",i=>{const c=i.target;if(!c.className.includes(o.b("node")))return;const d=i.code;r.value=Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`));const u=r.value.indexOf(c);let p;if([lt.up,lt.down].includes(d)){if(i.preventDefault(),d===lt.up){p=u===-1?0:u!==0?u-1:r.value.length-1;const v=p;for(;!t.value.getNode(r.value[p].dataset.key).canFocus;){if(p--,p===v){p=-1;break}p<0&&(p=r.value.length-1)}}else{p=u===-1?0:u=r.value.length&&(p=0)}}p!==-1&&r.value[p].focus()}[lt.left,lt.right].includes(d)&&(i.preventDefault(),c.click());const h=c.querySelector('[type="checkbox"]');[lt.enter,lt.space].includes(d)&&h&&(i.preventDefault(),h.click())});const a=()=>{var i;r.value=Array.from(e.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)),l.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const c=e.value.querySelectorAll(`.${o.is("checked")}[role=treeitem]`);if(c.length){c[0].setAttribute("tabindex","0");return}(i=r.value[0])==null||i.setAttribute("tabindex","0")}}const ese=N({name:"ElTree",components:{ElTreeNode:Jie},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Xt}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:o}=Rt(),r=ze("tree"),l=Ge(ls,null),n=D(new Uie({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));n.value.initialize();const a=D(n.value.root),i=D(null),c=D(null),d=D(null),{broadcastExpanded:u}=vx(e),{dragState:p}=qie({props:e,ctx:t,el$:c,dropIndicator$:d,store:n});Qie({el$:c},n);const h=C(()=>{const{childNodes:K}=a.value,I=l?l.hasFilteredOptions!==0:!1;return(!K||K.length===0||K.every(({visible:U})=>!U))&&!I});Se(()=>e.currentNodeKey,K=>{n.value.setCurrentNodeKey(K)}),Se(()=>e.defaultCheckedKeys,K=>{n.value.setDefaultCheckedKey(K)}),Se(()=>e.defaultExpandedKeys,K=>{n.value.setDefaultExpandedKeys(K)}),Se(()=>e.data,K=>{n.value.setData(K)},{deep:!0}),Se(()=>e.checkStrictly,K=>{n.value.checkStrictly=K});const v=K=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");n.value.filter(K)},m=K=>B2(e.nodeKey,K.data),f=K=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const I=n.value.getNode(K);if(!I)return[];const U=[I.data];let oe=I.parent;for(;oe&&oe!==a.value;)U.push(oe.data),oe=oe.parent;return U.reverse()},_=(K,I)=>n.value.getCheckedNodes(K,I),g=K=>n.value.getCheckedKeys(K),y=()=>{const K=n.value.getCurrentNode();return K?K.data:null},w=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const K=y();return K?K[e.nodeKey]:null},x=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");n.value.setCheckedNodes(K,I)},$=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");n.value.setCheckedKeys(K,I)},T=(K,I,U)=>{n.value.setChecked(K,I,U)},L=()=>n.value.getHalfCheckedNodes(),P=()=>n.value.getHalfCheckedKeys(),R=(K,I=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");V2(n,t.emit,()=>n.value.setUserCurrentNode(K,I))},V=(K,I=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");V2(n,t.emit,()=>n.value.setCurrentNodeKey(K,I))},B=K=>n.value.getNode(K),F=K=>{n.value.remove(K)},Q=(K,I)=>{n.value.append(K,I)},J=(K,I)=>{n.value.insertBefore(K,I)},Z=(K,I)=>{n.value.insertAfter(K,I)},H=(K,I,U)=>{u(I),t.emit("node-expand",K,I,U)},j=(K,I)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");n.value.updateChildren(K,I)};return zt("RootTree",{ctx:t,props:e,store:n,root:a,currentNode:i,instance:wt()}),zt(Hl,void 0),{ns:r,store:n,root:a,currentNode:i,dragState:p,el$:c,dropIndicator$:d,isEmpty:h,filter:v,getNodeKey:m,getNodePath:f,getCheckedNodes:_,getCheckedKeys:g,getCurrentNode:y,getCurrentKey:w,setCheckedNodes:x,setCheckedKeys:$,setChecked:T,getHalfCheckedNodes:L,getHalfCheckedKeys:P,setCurrentNode:R,setCurrentKey:V,t:o,getNode:B,remove:F,append:Q,insertBefore:J,insertAfter:Z,handleNodeExpand:H,updateKeyChildren:j}}});function tse(e,t,o,r,l,n){const a=nt("el-tree-node");return b(),M("div",{ref:"el$",class:O([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(b(!0),M(Qe,null,It(e.root.childNodes,i=>(b(),he(a,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(b(),M("div",{key:0,class:O(e.ns.e("empty-block"))},[be(e.$slots,"empty",{},()=>{var i;return[E("span",{class:O(e.ns.e("empty-text"))},$e((i=e.emptyText)!=null?i:e.t("el.tree.emptyText")),3)]})],2)):se("v-if",!0),mt(E("div",{ref:"dropIndicator$",class:O(e.ns.e("drop-indicator"))},null,2),[[Lt,e.dragState.showDropIndicator]])],2)}var Hp=Le(ese,[["render",tse],["__file","tree.vue"]]);Hp.install=e=>{e.component(Hp.name,Hp)};const Fp=Hp,ose=Fp,rse=(e,{attrs:t,emit:o},{select:r,tree:l,key:n})=>{const a=ze("tree-select");return Se(()=>e.data,()=>{e.filterable&&et(()=>{var c,d;(d=l.value)==null||d.filter((c=r.value)==null?void 0:c.states.inputValue)})},{flush:"post"}),{...Ol(Bo(e),Object.keys(Za.props)),...t,"onUpdate:modelValue":c=>o(St,c),valueKey:n,popperClass:C(()=>{const c=[a.e("popper")];return e.popperClass&&c.push(e.popperClass),c.join(" ")}),filterMethod:(c="")=>{var d;e.filterMethod?e.filterMethod(c):e.remoteMethod?e.remoteMethod(c):(d=l.value)==null||d.filter(c)}}},lse=N({extends:kp,setup(e,t){const o=kp.setup(e,t);delete o.selectOptionClick;const r=wt().proxy;return et(()=>{o.select.states.cachedOptions.get(r.value)||o.select.onOptionCreate(r)}),o},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function F2(e){return e||e===0}function j2(e){return Array.isArray(e)&&e.length}function Qc(e){return Array.isArray(e)?e:F2(e)?[e]:[]}function jp(e,t,o,r,l){for(let n=0;n{Se(()=>e.modelValue,()=>{e.showCheckbox&&et(()=>{const p=n.value;p&&!nr(p.getCheckedKeys(),Qc(e.modelValue))&&p.setCheckedKeys(Qc(e.modelValue))})},{immediate:!0,deep:!0});const i=C(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),c=(p,h)=>{var v;const m=i.value[p];return it(m)?m(h,(v=n.value)==null?void 0:v.getNode(c("value",h))):h[m]},d=Qc(e.modelValue).map(p=>jp(e.data||[],h=>c("value",h)===p,h=>c("children",h),(h,v,m,f)=>f&&c("value",f))).filter(p=>F2(p)),u=C(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const p=[];return K2(e.data.concat(e.cacheData),h=>{const v=c("value",h);p.push({value:v,currentLabel:c("label",h),isDisabled:c("disabled",h)})},h=>c("children",h)),p});return{...Ol(Bo(e),Object.keys(Fp.props)),...t,nodeKey:a,expandOnClickNode:C(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:C(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(d):d),renderContent:(p,{node:h,data:v,store:m})=>p(lse,{value:c("value",v),label:c("label",v),disabled:c("disabled",v)},e.renderContent?()=>e.renderContent(p,{node:h,data:v,store:m}):o.default?()=>o.default({node:h,data:v,store:m}):void 0),filterNodeMethod:(p,h,v)=>e.filterNodeMethod?e.filterNodeMethod(p,h,v):p?new RegExp(sh(p),"i").test(c("label",h)||""):!0,onNodeClick:(p,h,v)=>{var m,f,_,g;if((m=t.onNodeClick)==null||m.call(t,p,h,v),!(e.showCheckbox&&e.checkOnClickNode)){if(!e.showCheckbox&&(e.checkStrictly||h.isLeaf)){if(!c("disabled",p)){const y=(f=l.value)==null?void 0:f.states.options.get(c("value",p));(_=l.value)==null||_.handleOptionSelect(y)}}else e.expandOnClickNode&&v.proxy.handleExpandIconClick();(g=l.value)==null||g.focus()}},onCheck:(p,h)=>{var v;if(!e.showCheckbox)return;const m=c("value",p),f={};K2([n.value.store.root],w=>f[w.key]=w,w=>w.childNodes);const _=h.checkedKeys,g=e.multiple?Qc(e.modelValue).filter(w=>!(w in f)&&!_.includes(w)):[],y=g.concat(_);if(e.checkStrictly)r(St,e.multiple?y:y.includes(m)?m:void 0);else if(e.multiple)r(St,g.concat(n.value.getCheckedKeys(!0)));else{const w=jp([p],T=>!j2(c("children",T))&&!c("disabled",T),T=>c("children",T)),x=w?c("value",w):void 0,$=F2(e.modelValue)&&!!jp([p],T=>c("value",T)===e.modelValue,T=>c("children",T));r(St,x===e.modelValue||$?void 0:x)}et(()=>{var w;const x=Qc(e.modelValue);n.value.setCheckedKeys(x),(w=t.onCheck)==null||w.call(t,p,{checkedKeys:n.value.getCheckedKeys(),checkedNodes:n.value.getCheckedNodes(),halfCheckedKeys:n.value.getHalfCheckedKeys(),halfCheckedNodes:n.value.getHalfCheckedNodes()})}),(v=l.value)==null||v.focus()},cacheOptions:u}};var ase=N({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Ge(ls);return Se(()=>e.data,()=>{var o;e.data.forEach(l=>{t.states.cachedOptions.has(l.value)||t.states.cachedOptions.set(l.value,l)});const r=((o=t.selectRef)==null?void 0:o.querySelectorAll("input"))||[];Array.from(r).includes(document.activeElement)||t.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const ise=N({name:"ElTreeSelect",inheritAttrs:!1,props:{...Za.props,...Fp.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:o,expose:r}=t,l=D(),n=D(),a=C(()=>e.nodeKey||e.valueKey||"value"),i=rse(e,t,{select:l,tree:n,key:a}),{cacheOptions:c,...d}=nse(e,t,{select:l,tree:n,key:a}),u=Dt({});return r(u),ft(()=>{Object.assign(u,{...Ol(n.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Ol(l.value,["focus","blur"])})}),()=>rt(Za,Dt({...i,ref:p=>l.value=p}),{...o,default:()=>[rt(ase,{data:c.value}),rt(Fp,Dt({...d,ref:p=>n.value=p}))]})}});var Kp=Le(ise,[["__file","tree-select.vue"]]);Kp.install=e=>{e.component(Kp.name,Kp)};const sse=Kp,U2=Symbol(),cse={key:-1,level:-1,data:{}};var eu=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e))(eu||{}),W2=(e=>(e.ADD="add",e.DELETE="delete",e))(W2||{});const gx={type:Number,default:26},use=Pe({data:{type:ue(Array),default:()=>uo([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:ue(Object),default:()=>uo({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:ue(Array),default:()=>uo([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:ue(Array),default:()=>uo([])},indent:{type:Number,default:16},itemSize:gx,icon:{type:Xt},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:ue([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:ue(Function)},perfMode:{type:Boolean,default:!0}}),dse=Pe({node:{type:ue(Object),default:()=>uo(cse)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:gx}),pse=Pe({node:{type:ue(Object),required:!0}}),bx="node-click",_x="node-expand",wx="node-collapse",yx="current-change",xx="check",kx="check-change",Cx="node-contextmenu",fse={[bx]:(e,t,o)=>e&&t&&o,[_x]:(e,t)=>e&&t,[wx]:(e,t)=>e&&t,[yx]:(e,t)=>e&&t,[xx]:(e,t)=>e&&t,[kx]:(e,t)=>e&&typeof t=="boolean",[Cx]:(e,t,o)=>e&&t&&o},hse={click:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&typeof t=="boolean"};function vse(e,t){const o=D(new Set),r=D(new Set),{emit:l}=wt();Se([()=>t.value,()=>e.defaultCheckedKeys],()=>et(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const n=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:w,maxLevel:x}=t.value,$=o.value,T=new Set;for(let L=x-1;L>=1;--L){const P=w.get(L);P&&P.forEach(R=>{const V=R.children;if(V){let B=!0,F=!1;for(const Q of V){const J=Q.key;if($.has(J))F=!0;else if(T.has(J)){B=!1,F=!0;break}else B=!1}B?$.add(R.key):F?(T.add(R.key),$.delete(R.key)):($.delete(R.key),T.delete(R.key))}})}r.value=T},a=w=>o.value.has(w.key),i=w=>r.value.has(w.key),c=(w,x,$=!0)=>{const T=o.value,L=(P,R)=>{T[R?W2.ADD:W2.DELETE](P.key);const V=P.children;!e.checkStrictly&&V&&V.forEach(B=>{B.disabled||L(B,R)})};L(w,x),n(),$&&d(w,x)},d=(w,x)=>{const{checkedNodes:$,checkedKeys:T}=m(),{halfCheckedNodes:L,halfCheckedKeys:P}=f();l(xx,w.data,{checkedKeys:T,checkedNodes:$,halfCheckedKeys:P,halfCheckedNodes:L}),l(kx,w.data,x)};function u(w=!1){return m(w).checkedKeys}function p(w=!1){return m(w).checkedNodes}function h(){return f().halfCheckedKeys}function v(){return f().halfCheckedNodes}function m(w=!1){const x=[],$=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:T}=t.value;o.value.forEach(L=>{const P=T.get(L);P&&(!w||w&&P.isLeaf)&&($.push(L),x.push(P.data))})}return{checkedKeys:$,checkedNodes:x}}function f(){const w=[],x=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:$}=t.value;r.value.forEach(T=>{const L=$.get(T);L&&(x.push(T),w.push(L.data))})}return{halfCheckedNodes:w,halfCheckedKeys:x}}function _(w){o.value.clear(),r.value.clear(),et(()=>{y(w)})}function g(w,x){if(t!=null&&t.value&&e.showCheckbox){const $=t.value.treeNodeMap.get(w);$&&c($,x,!1)}}function y(w){if(t!=null&&t.value){const{treeNodeMap:x}=t.value;if(e.showCheckbox&&x&&w)for(const $ of w){const T=x.get($);T&&!a(T)&&c(T,!0,!1)}}}return{updateCheckedKeys:n,toggleCheckbox:c,isChecked:a,isIndeterminate:i,getCheckedKeys:u,getCheckedNodes:p,getHalfCheckedKeys:h,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:_}}function mse(e,t){const o=D(new Set([])),r=D(new Set([])),l=C(()=>it(e.filterMethod));function n(i){var c;if(!l.value)return;const d=new Set,u=r.value,p=o.value,h=[],v=((c=t.value)==null?void 0:c.treeNodes)||[],m=e.filterMethod;p.clear();function f(_){_.forEach(g=>{h.push(g),m!=null&&m(i,g.data)?h.forEach(w=>{d.add(w.key)}):g.isLeaf&&p.add(g.key);const y=g.children;if(y&&f(y),!g.isLeaf){if(!d.has(g.key))p.add(g.key);else if(y){let w=!0;for(const x of y)if(!p.has(x.key)){w=!1;break}w?u.add(g.key):u.delete(g.key)}}h.pop()})}return f(v),d}function a(i){return r.value.has(i.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:o,doFilter:n,isForceHiddenExpandIcon:a}}function gse(e,t){const o=D(new Set(e.defaultExpandedKeys)),r=D(),l=lo();Se(()=>e.currentNodeKey,me=>{r.value=me},{immediate:!0}),Se(()=>e.data,me=>{de(me)},{immediate:!0});const{isIndeterminate:n,isChecked:a,toggleCheckbox:i,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:u,getHalfCheckedNodes:p,setChecked:h,setCheckedKeys:v}=vse(e,l),{doFilter:m,hiddenNodeKeySet:f,isForceHiddenExpandIcon:_}=mse(e,l),g=C(()=>{var me;return((me=e.props)==null?void 0:me.value)||eu.KEY}),y=C(()=>{var me;return((me=e.props)==null?void 0:me.children)||eu.CHILDREN}),w=C(()=>{var me;return((me=e.props)==null?void 0:me.disabled)||eu.DISABLED}),x=C(()=>{var me;return((me=e.props)==null?void 0:me.label)||eu.LABEL}),$=C(()=>{const me=o.value,Re=f.value,Ce=[],Ee=l.value&&l.value.treeNodes||[];function De(){const ae=[];for(let pe=Ee.length-1;pe>=0;--pe)ae.push(Ee[pe]);for(;ae.length;){const pe=ae.pop();if(pe&&(Re.has(pe.key)||Ce.push(pe),me.has(pe.key))){const ke=pe.children;if(ke){const Oe=ke.length;for(let we=Oe-1;we>=0;--we)ae.push(ke[we])}}}}return De(),Ce}),T=C(()=>$.value.length>0);function L(me){const Re=new Map,Ce=new Map;let Ee=1;function De(pe,ke=1,Oe=void 0){var we;const Te=[];for(const Ne of pe){const Ie=V(Ne),Ae={level:ke,key:Ie,data:Ne};Ae.label=F(Ne),Ae.parent=Oe;const xe=R(Ne);Ae.disabled=B(Ne),Ae.isLeaf=!xe||xe.length===0,xe&&xe.length&&(Ae.children=De(xe,ke+1,Ae)),Te.push(Ae),Re.set(Ie,Ae),Ce.has(ke)||Ce.set(ke,[]),(we=Ce.get(ke))==null||we.push(Ae)}return ke>Ee&&(Ee=ke),Te}const ae=De(me);return{treeNodeMap:Re,levelTreeNodeMap:Ce,maxLevel:Ee,treeNodes:ae}}function P(me){const Re=m(me);Re&&(o.value=Re)}function R(me){return me[y.value]}function V(me){return me?me[g.value]:""}function B(me){return me[w.value]}function F(me){return me[x.value]}function Q(me){o.value.has(me.key)?I(me):K(me)}function J(me){o.value=new Set(me)}function Z(me,Re){t(bx,me.data,me,Re),H(me),e.expandOnClickNode&&Q(me),e.showCheckbox&&e.checkOnClickNode&&!me.disabled&&i(me,!a(me),!0)}function H(me){ne(me)||(r.value=me.key,t(yx,me.data,me))}function j(me,Re){i(me,Re)}function K(me){const Re=o.value;if(l.value&&e.accordion){const{treeNodeMap:Ce}=l.value;Re.forEach(Ee=>{const De=Ce.get(Ee);me&&me.level===(De==null?void 0:De.level)&&Re.delete(Ee)})}Re.add(me.key),t(_x,me.data,me)}function I(me){o.value.delete(me.key),t(wx,me.data,me)}function U(me){return o.value.has(me.key)}function oe(me){return!!me.disabled}function ne(me){const Re=r.value;return Re!==void 0&&Re===me.key}function ce(){var me,Re;if(r.value)return(Re=(me=l.value)==null?void 0:me.treeNodeMap.get(r.value))==null?void 0:Re.data}function ee(){return r.value}function Me(me){r.value=me}function de(me){et(()=>l.value=L(me))}function _e(me){var Re;const Ce=xt(me)?V(me):me;return(Re=l.value)==null?void 0:Re.treeNodeMap.get(Ce)}return{tree:l,flattenTree:$,isNotEmpty:T,getKey:V,getChildren:R,toggleExpand:Q,toggleCheckbox:i,isExpanded:U,isChecked:a,isIndeterminate:n,isDisabled:oe,isCurrent:ne,isForceHiddenExpandIcon:_,handleNodeClick:Z,handleNodeCheck:j,getCurrentNode:ce,getCurrentKey:ee,setCurrentKey:Me,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:u,getHalfCheckedNodes:p,setChecked:h,setCheckedKeys:v,filter:P,setData:de,getNode:_e,expandNode:K,collapseNode:I,setExpandedKeys:J}}var bse=N({name:"ElTreeNodeContent",props:pse,setup(e){const t=Ge(U2),o=ze("tree");return()=>{const r=e.node,{data:l}=r;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:r,data:l}):rt("span",{class:o.be("node","label")},[r==null?void 0:r.label])}}});const _se=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],wse=N({...N({name:"ElTreeNode"}),props:dse,emits:hse,setup(e,{emit:t}){const o=e,r=Ge(U2),l=ze("tree"),n=C(()=>{var p;return(p=r==null?void 0:r.props.indent)!=null?p:16}),a=C(()=>{var p;return(p=r==null?void 0:r.props.icon)!=null?p:uh}),i=p=>{t("click",o.node,p)},c=()=>{t("toggle",o.node)},d=p=>{t("check",o.node,p)},u=p=>{var h,v,m,f;(m=(v=(h=r==null?void 0:r.instance)==null?void 0:h.vnode)==null?void 0:v.props)!=null&&m.onNodeContextmenu&&(p.stopPropagation(),p.preventDefault()),r==null||r.ctx.emit(Cx,p,(f=o.node)==null?void 0:f.data,o.node)};return(p,h)=>{var v,m,f;return b(),M("div",{ref:"node$",class:O([s(l).b("node"),s(l).is("expanded",p.expanded),s(l).is("current",p.current),s(l).is("focusable",!p.disabled),s(l).is("checked",!p.disabled&&p.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":p.expanded,"aria-disabled":p.disabled,"aria-checked":p.checked,"data-key":(v=p.node)==null?void 0:v.key,onClick:ct(i,["stop"]),onContextmenu:u},[E("div",{class:O(s(l).be("node","content")),style:Je({paddingLeft:`${(p.node.level-1)*s(n)}px`,height:p.itemSize+"px"})},[s(a)?(b(),he(s(Ze),{key:0,class:O([s(l).is("leaf",!!((m=p.node)!=null&&m.isLeaf)),s(l).is("hidden",p.hiddenExpandIcon),{expanded:!((f=p.node)!=null&&f.isLeaf)&&p.expanded},s(l).be("node","expand-icon")]),onClick:ct(c,["stop"])},{default:le(()=>[(b(),he(Et(s(a))))]),_:1},8,["class","onClick"])):se("v-if",!0),p.showCheckbox?(b(),he(s(rl),{key:1,"model-value":p.checked,indeterminate:p.indeterminate,disabled:p.disabled,onChange:d,onClick:h[0]||(h[0]=ct(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):se("v-if",!0),te(s(bse),{node:p.node},null,8,["node"])],6)],42,_se)}}});var yse=Le(wse,[["__file","tree-node.vue"]]);const xse=N({...N({name:"ElTreeV2"}),props:use,emits:fse,setup(e,{expose:t,emit:o}){const r=e,l=Do(),n=C(()=>r.itemSize);zt(U2,{ctx:{emit:o,slots:l},props:r,instance:wt()}),zt(Hl,void 0);const{t:a}=Rt(),i=ze("tree"),{flattenTree:c,isNotEmpty:d,toggleExpand:u,isExpanded:p,isIndeterminate:h,isChecked:v,isDisabled:m,isCurrent:f,isForceHiddenExpandIcon:_,handleNodeClick:g,handleNodeCheck:y,toggleCheckbox:w,getCurrentNode:x,getCurrentKey:$,setCurrentKey:T,getCheckedKeys:L,getCheckedNodes:P,getHalfCheckedKeys:R,getHalfCheckedNodes:V,setChecked:B,setCheckedKeys:F,filter:Q,setData:J,getNode:Z,expandNode:H,collapseNode:j,setExpandedKeys:K}=gse(r,o);return t({toggleCheckbox:w,getCurrentNode:x,getCurrentKey:$,setCurrentKey:T,getCheckedKeys:L,getCheckedNodes:P,getHalfCheckedKeys:R,getHalfCheckedNodes:V,setChecked:B,setCheckedKeys:F,filter:Q,setData:J,getNode:Z,expandNode:H,collapseNode:j,setExpandedKeys:K}),(I,U)=>{var oe;return b(),M("div",{class:O([s(i).b(),{[s(i).m("highlight-current")]:I.highlightCurrent}]),role:"tree"},[s(d)?(b(),he(s(i8),{key:0,"class-name":s(i).b("virtual-list"),data:s(c),total:s(c).length,height:I.height,"item-size":s(n),"perf-mode":I.perfMode},{default:le(({data:ne,index:ce,style:ee})=>[(b(),he(yse,{key:ne[ce].key,style:Je(ee),node:ne[ce],expanded:s(p)(ne[ce]),"show-checkbox":I.showCheckbox,checked:s(v)(ne[ce]),indeterminate:s(h)(ne[ce]),"item-size":s(n),disabled:s(m)(ne[ce]),current:s(f)(ne[ce]),"hidden-expand-icon":s(_)(ne[ce]),onClick:s(g),onToggle:s(u),onCheck:s(y)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(b(),M("div",{key:1,class:O(s(i).e("empty-block"))},[E("span",{class:O(s(i).e("empty-text"))},$e((oe=I.emptyText)!=null?oe:s(a)("el.tree.emptyText")),3)],2))],2)}}});var kse=Le(xse,[["__file","tree.vue"]]);const Cse=yt(kse),Sx=Symbol("uploadContextKey"),Sse="ElUpload";class Ese extends Error{constructor(t,o,r,l){super(t),this.name="UploadAjaxError",this.status=o,this.method=r,this.url=l}}function Ex(e,t,o){let r;return o.response?r=`${o.response.error||o.response}`:o.responseText?r=`${o.responseText}`:r=`fail to ${t.method} ${e} ${o.status}`,new Ese(r,o.status,t.method,e)}function Tse(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const $se=e=>{typeof XMLHttpRequest>"u"&&Io(Sse,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,o=e.action;t.upload&&t.upload.addEventListener("progress",n=>{const a=n;a.percent=n.total>0?n.loaded/n.total*100:0,e.onProgress(a)});const r=new FormData;if(e.data)for(const[n,a]of Object.entries(e.data))Ke(a)&&a.length?r.append(n,...a):r.append(n,a);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(Ex(o,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(Ex(o,e,t));e.onSuccess(Tse(t))}),t.open(e.method,o,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const l=e.headers||{};if(l instanceof Headers)l.forEach((n,a)=>t.setRequestHeader(a,n));else for(const[n,a]of Object.entries(l))jo(a)||t.setRequestHeader(n,String(a));return t.send(r),t},Tx=["text","picture","picture-card"];let Mse=1;const q2=()=>Date.now()+Mse++,$x=Pe({action:{type:String,default:"#"},headers:{type:ue(Object)},method:{type:String,default:"post"},data:{type:ue([Object,Function,Promise]),default:()=>uo({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:ue(Array),default:()=>uo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Tx,default:"text"},httpRequest:{type:ue(Function),default:$se},disabled:Boolean,limit:Number}),Ase=Pe({...$x,beforeUpload:{type:ue(Function),default:qt},beforeRemove:{type:ue(Function)},onRemove:{type:ue(Function),default:qt},onChange:{type:ue(Function),default:qt},onPreview:{type:ue(Function),default:qt},onSuccess:{type:ue(Function),default:qt},onProgress:{type:ue(Function),default:qt},onError:{type:ue(Function),default:qt},onExceed:{type:ue(Function),default:qt},crossorigin:{type:ue(String)}}),zse=Pe({files:{type:ue(Array),default:()=>uo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:ue(Function),default:qt},listType:{type:String,values:Tx,default:"text"},crossorigin:{type:ue(String)}}),Ise={remove:e=>!!e},Ose=["onKeydown"],Nse=["src","crossorigin"],Pse=["onClick"],Rse=["title"],Lse=["onClick"],Bse=["onClick"],Vse=N({...N({name:"ElUploadList"}),props:zse,emits:Ise,setup(e,{emit:t}){const o=e,{t:r}=Rt(),l=ze("upload"),n=ze("icon"),a=ze("list"),i=xr(),c=D(!1),d=C(()=>[l.b("list"),l.bm("list",o.listType),l.is("disabled",o.disabled)]),u=p=>{t("remove",p)};return(p,h)=>(b(),he(z1,{tag:"ul",class:O(s(d)),name:s(a).b()},{default:le(()=>[(b(!0),M(Qe,null,It(p.files,v=>(b(),M("li",{key:v.uid||v.name,class:O([s(l).be("list","item"),s(l).is(v.status),{focusing:c.value}]),tabindex:"0",onKeydown:Gt(m=>!s(i)&&u(v),["delete"]),onFocus:h[0]||(h[0]=m=>c.value=!0),onBlur:h[1]||(h[1]=m=>c.value=!1),onClick:h[2]||(h[2]=m=>c.value=!1)},[be(p.$slots,"default",{file:v},()=>[p.listType==="picture"||v.status!=="uploading"&&p.listType==="picture-card"?(b(),M("img",{key:0,class:O(s(l).be("list","item-thumbnail")),src:v.url,crossorigin:p.crossorigin,alt:""},null,10,Nse)):se("v-if",!0),v.status==="uploading"||p.listType!=="picture-card"?(b(),M("div",{key:1,class:O(s(l).be("list","item-info"))},[E("a",{class:O(s(l).be("list","item-name")),onClick:ct(m=>p.handlePreview(v),["prevent"])},[te(s(Ze),{class:O(s(n).m("document"))},{default:le(()=>[te(s(P3))]),_:1},8,["class"]),E("span",{class:O(s(l).be("list","item-file-name")),title:v.name},$e(v.name),11,Rse)],10,Pse),v.status==="uploading"?(b(),he(s(Gy),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:Je(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):se("v-if",!0)],2)):se("v-if",!0),E("label",{class:O(s(l).be("list","item-status-label"))},[p.listType==="text"?(b(),he(s(Ze),{key:0,class:O([s(n).m("upload-success"),s(n).m("circle-check")])},{default:le(()=>[te(s(Ad))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(b(),he(s(Ze),{key:1,class:O([s(n).m("upload-success"),s(n).m("check")])},{default:le(()=>[te(s(Li))]),_:1},8,["class"])):se("v-if",!0)],2),s(i)?se("v-if",!0):(b(),he(s(Ze),{key:2,class:O(s(n).m("close")),onClick:m=>u(v)},{default:le(()=>[te(s(Jr))]),_:2},1032,["class","onClick"])),se(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),se(" This is a bug which needs to be fixed "),se(" TODO: Fix the incorrect navigation interaction "),s(i)?se("v-if",!0):(b(),M("i",{key:3,class:O(s(n).m("close-tip"))},$e(s(r)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(b(),M("span",{key:4,class:O(s(l).be("list","item-actions"))},[E("span",{class:O(s(l).be("list","item-preview")),onClick:m=>p.handlePreview(v)},[te(s(Ze),{class:O(s(n).m("zoom-in"))},{default:le(()=>[te(s(vh))]),_:1},8,["class"])],10,Lse),s(i)?se("v-if",!0):(b(),M("span",{key:0,class:O(s(l).be("list","item-delete")),onClick:m=>u(v)},[te(s(Ze),{class:O(s(n).m("delete"))},{default:le(()=>[te(s(N3))]),_:1},8,["class"])],10,Bse))],2)):se("v-if",!0)])],42,Ose))),128)),be(p.$slots,"append")]),_:3},8,["class","name"]))}});var Mx=Le(Vse,[["__file","upload-list.vue"]]);const Dse=Pe({disabled:{type:Boolean,default:!1}}),Hse={file:e=>Ke(e)},Fse=["onDrop","onDragover"],Ax="ElUploadDrag",jse=N({...N({name:Ax}),props:Dse,emits:Hse,setup(e,{emit:t}){Ge(Sx)||Io(Ax,"usage: ");const r=ze("upload"),l=D(!1),n=xr(),a=c=>{if(n.value)return;l.value=!1,c.stopPropagation();const d=Array.from(c.dataTransfer.files);t("file",d)},i=()=>{n.value||(l.value=!0)};return(c,d)=>(b(),M("div",{class:O([s(r).b("dragger"),s(r).is("dragover",l.value)]),onDrop:ct(a,["prevent"]),onDragover:ct(i,["prevent"]),onDragleave:d[0]||(d[0]=ct(u=>l.value=!1,["prevent"]))},[be(c.$slots,"default")],42,Fse))}});var Kse=Le(jse,[["__file","upload-dragger.vue"]]);const Use=Pe({...$x,beforeUpload:{type:ue(Function),default:qt},onRemove:{type:ue(Function),default:qt},onStart:{type:ue(Function),default:qt},onSuccess:{type:ue(Function),default:qt},onProgress:{type:ue(Function),default:qt},onError:{type:ue(Function),default:qt},onExceed:{type:ue(Function),default:qt}}),Wse=["onKeydown"],qse=["name","multiple","accept"],Yse=N({...N({name:"ElUploadContent",inheritAttrs:!1}),props:Use,setup(e,{expose:t}){const o=e,r=ze("upload"),l=xr(),n=lo({}),a=lo(),i=f=>{if(f.length===0)return;const{autoUpload:_,limit:g,fileList:y,multiple:w,onStart:x,onExceed:$}=o;if(g&&y.length+f.length>g){$(f,y);return}w||(f=f.slice(0,1));for(const T of f){const L=T;L.uid=q2(),x(L),_&&c(L)}},c=async f=>{if(a.value.value="",!o.beforeUpload)return u(f);let _,g={};try{const w=o.data,x=o.beforeUpload(f);g=mu(o.data)?yd(o.data):o.data,_=await x,mu(o.data)&&nr(w,g)&&(g=yd(o.data))}catch{_=!1}if(_===!1){o.onRemove(f);return}let y=f;_ instanceof Blob&&(_ instanceof File?y=_:y=new File([_],f.name,{type:f.type})),u(Object.assign(y,{uid:f.uid}),g)},d=async(f,_)=>it(f)?f(_):f,u=async(f,_)=>{const{headers:g,data:y,method:w,withCredentials:x,name:$,action:T,onProgress:L,onSuccess:P,onError:R,httpRequest:V}=o;try{_=await d(_??y,f)}catch{o.onRemove(f);return}const{uid:B}=f,F={headers:g||{},withCredentials:x,file:f,data:_,method:w,filename:$,action:T,onProgress:J=>{L(J,f)},onSuccess:J=>{P(J,f),delete n.value[B]},onError:J=>{R(J,f),delete n.value[B]}},Q=V(F);n.value[B]=Q,Q instanceof Promise&&Q.then(F.onSuccess,F.onError)},p=f=>{const _=f.target.files;_&&i(Array.from(_))},h=()=>{l.value||(a.value.value="",a.value.click())},v=()=>{h()};return t({abort:f=>{qz(n.value).filter(f?([g])=>String(f.uid)===g:()=>!0).forEach(([g,y])=>{y instanceof XMLHttpRequest&&y.abort(),delete n.value[g]})},upload:c}),(f,_)=>(b(),M("div",{class:O([s(r).b(),s(r).m(f.listType),s(r).is("drag",f.drag)]),tabindex:"0",onClick:h,onKeydown:Gt(ct(v,["self"]),["enter","space"])},[f.drag?(b(),he(Kse,{key:0,disabled:s(l),onFile:i},{default:le(()=>[be(f.$slots,"default")]),_:3},8,["disabled"])):be(f.$slots,"default",{key:1}),E("input",{ref_key:"inputRef",ref:a,class:O(s(r).e("input")),name:f.name,multiple:f.multiple,accept:f.accept,type:"file",onChange:p,onClick:_[0]||(_[0]=ct(()=>{},["stop"]))},null,42,qse)],42,Wse))}});var zx=Le(Yse,[["__file","upload-content.vue"]]);const Ix="ElUpload",Ox=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},Gse=(e,t)=>{const o=n_(e,"fileList",void 0,{passive:!0}),r=h=>o.value.find(v=>v.uid===h.uid);function l(h){var v;(v=t.value)==null||v.abort(h)}function n(h=["ready","uploading","success","fail"]){o.value=o.value.filter(v=>!h.includes(v.status))}const a=(h,v)=>{const m=r(v);m&&(console.error(h),m.status="fail",o.value.splice(o.value.indexOf(m),1),e.onError(h,m,o.value),e.onChange(m,o.value))},i=(h,v)=>{const m=r(v);m&&(e.onProgress(h,m,o.value),m.status="uploading",m.percentage=Math.round(h.percent))},c=(h,v)=>{const m=r(v);m&&(m.status="success",m.response=h,e.onSuccess(h,m,o.value),e.onChange(m,o.value))},d=h=>{jo(h.uid)&&(h.uid=q2());const v={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(e.listType==="picture-card"||e.listType==="picture")try{v.url=URL.createObjectURL(h)}catch(m){m.message,e.onError(m,v,o.value)}o.value=[...o.value,v],e.onChange(v,o.value)},u=async h=>{const v=h instanceof File?r(h):h;v||Io(Ix,"file to be removed not found");const m=f=>{l(f);const _=o.value;_.splice(_.indexOf(f),1),e.onRemove(f,_),Ox(f)};e.beforeRemove?await e.beforeRemove(v,o.value)!==!1&&m(v):m(v)};function p(){o.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var v;return h&&((v=t.value)==null?void 0:v.upload(h))})}return Se(()=>e.listType,h=>{h!=="picture-card"&&h!=="picture"||(o.value=o.value.map(v=>{const{raw:m,url:f}=v;if(!f&&m)try{v.url=URL.createObjectURL(m)}catch(_){e.onError(_,v,o.value)}return v}))}),Se(o,h=>{for(const v of h)v.uid||(v.uid=q2()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:o,abort:l,clearFiles:n,handleError:a,handleProgress:i,handleStart:d,handleSuccess:c,handleRemove:u,submit:p,revokeFileObjectURL:Ox}},Xse=N({...N({name:"ElUpload"}),props:Ase,setup(e,{expose:t}){const o=e,r=xr(),l=lo(),{abort:n,submit:a,clearFiles:i,uploadFiles:c,handleStart:d,handleError:u,handleRemove:p,handleSuccess:h,handleProgress:v,revokeFileObjectURL:m}=Gse(o,l),f=C(()=>o.listType==="picture-card"),_=C(()=>({...o,fileList:c.value,onStart:d,onProgress:v,onSuccess:h,onError:u,onRemove:p}));return to(()=>{c.value.forEach(m)}),zt(Sx,{accept:Yt(o,"accept")}),t({abort:n,submit:a,clearFiles:i,handleStart:d,handleRemove:p}),(g,y)=>(b(),M("div",null,[s(f)&&g.showFileList?(b(),he(Mx,{key:0,disabled:s(r),"list-type":g.listType,files:s(c),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:s(p)},ln({append:le(()=>[te(zx,Mt({ref_key:"uploadRef",ref:l},s(_)),{default:le(()=>[g.$slots.trigger?be(g.$slots,"trigger",{key:0}):se("v-if",!0),!g.$slots.trigger&&g.$slots.default?be(g.$slots,"default",{key:1}):se("v-if",!0)]),_:3},16)]),_:2},[g.$slots.file?{name:"default",fn:le(({file:w})=>[be(g.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):se("v-if",!0),!s(f)||s(f)&&!g.showFileList?(b(),he(zx,Mt({key:1,ref_key:"uploadRef",ref:l},s(_)),{default:le(()=>[g.$slots.trigger?be(g.$slots,"trigger",{key:0}):se("v-if",!0),!g.$slots.trigger&&g.$slots.default?be(g.$slots,"default",{key:1}):se("v-if",!0)]),_:3},16)):se("v-if",!0),g.$slots.trigger?be(g.$slots,"default",{key:2}):se("v-if",!0),be(g.$slots,"tip"),!s(f)&&g.showFileList?(b(),he(Mx,{key:3,disabled:s(r),"list-type":g.listType,files:s(c),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:s(p)},ln({_:2},[g.$slots.file?{name:"default",fn:le(({file:w})=>[be(g.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):se("v-if",!0)]))}});var Zse=Le(Xse,[["__file","upload.vue"]]);const Jse=yt(Zse),Qse=Pe({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:ue([String,Array]),default:"Element Plus"},font:{type:ue(Object)},gap:{type:ue(Array),default:()=>[100,100]},offset:{type:ue(Array)}});function ece(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function tce(e){return Object.keys(e).map(t=>`${ece(t)}: ${e[t]};`).join(" ")}function oce(){return window.devicePixelRatio||1}const rce=(e,t)=>{let o=!1;return e.removedNodes.length&&t&&(o=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(o=!0),o},Nx=3;function Y2(e,t,o=1){const r=document.createElement("canvas"),l=r.getContext("2d"),n=e*o,a=t*o;return r.setAttribute("width",`${n}px`),r.setAttribute("height",`${a}px`),l.save(),[l,r,n,a]}function lce(){function e(t,o,r,l,n,a,i,c){const[d,u,p,h]=Y2(l,n,r);if(t instanceof HTMLImageElement)d.drawImage(t,0,0,p,h);else{const{color:oe,fontSize:ne,fontStyle:ce,fontWeight:ee,fontFamily:Me,textAlign:de,textBaseline:_e}=a,me=Number(ne)*r;d.font=`${ce} normal ${ee} ${me}px/${n}px ${Me}`,d.fillStyle=oe,d.textAlign=de,d.textBaseline=_e;const Re=Array.isArray(t)?t:[t];Re==null||Re.forEach((Ce,Ee)=>{d.fillText(Ce??"",p/2,Ee*(me+Nx*r))})}const v=Math.PI/180*Number(o),m=Math.max(l,n),[f,_,g]=Y2(m,m,r);f.translate(g/2,g/2),f.rotate(v),p>0&&h>0&&f.drawImage(u,-p/2,-h/2);function y(oe,ne){const ce=oe*Math.cos(v)-ne*Math.sin(v),ee=oe*Math.sin(v)+ne*Math.cos(v);return[ce,ee]}let w=0,x=0,$=0,T=0;const L=p/2,P=h/2;[[0-L,0-P],[0+L,0-P],[0+L,0+P],[0-L,0+P]].forEach(([oe,ne])=>{const[ce,ee]=y(oe,ne);w=Math.min(w,ce),x=Math.max(x,ce),$=Math.min($,ee),T=Math.max(T,ee)});const V=w+g/2,B=$+g/2,F=x-w,Q=T-$,J=i*r,Z=c*r,H=(F+J)*2,j=Q+Z,[K,I]=Y2(H,j);function U(oe=0,ne=0){K.drawImage(_,V,B,F,Q,oe,ne,F,Q)}return U(),U(F+J,-Q/2-Z/2),U(F+J,+Q/2+Z/2),[I.toDataURL(),H/r,j/r]}return e}const nce=N({...N({name:"ElWatermark"}),props:Qse,setup(e){const t=e,o={position:"relative"},r=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.color)!=null?B:"rgba(0,0,0,.15)"}),l=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontSize)!=null?B:16}),n=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontWeight)!=null?B:"normal"}),a=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontStyle)!=null?B:"normal"}),i=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.fontFamily)!=null?B:"sans-serif"}),c=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.textAlign)!=null?B:"center"}),d=C(()=>{var V,B;return(B=(V=t.font)==null?void 0:V.textBaseline)!=null?B:"hanging"}),u=C(()=>t.gap[0]),p=C(()=>t.gap[1]),h=C(()=>u.value/2),v=C(()=>p.value/2),m=C(()=>{var V,B;return(B=(V=t.offset)==null?void 0:V[0])!=null?B:h.value}),f=C(()=>{var V,B;return(B=(V=t.offset)==null?void 0:V[1])!=null?B:v.value}),_=()=>{const V={zIndex:t.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let B=m.value-h.value,F=f.value-v.value;return B>0&&(V.left=`${B}px`,V.width=`calc(100% - ${B}px)`,B=0),F>0&&(V.top=`${F}px`,V.height=`calc(100% - ${F}px)`,F=0),V.backgroundPosition=`${B}px ${F}px`,V},g=lo(null),y=lo(),w=D(!1),x=()=>{y.value&&(y.value.remove(),y.value=void 0)},$=(V,B)=>{var F;g.value&&y.value&&(w.value=!0,y.value.setAttribute("style",tce({..._(),backgroundImage:`url('${V}')`,backgroundSize:`${Math.floor(B)}px`})),(F=g.value)==null||F.append(y.value),setTimeout(()=>{w.value=!1}))},T=V=>{let B=120,F=64;const Q=t.image,J=t.content,Z=t.width,H=t.height;if(!Q&&V.measureText){V.font=`${Number(l.value)}px ${i.value}`;const j=Array.isArray(J)?J:[J],K=j.map(I=>{const U=V.measureText(I);return[U.width,U.fontBoundingBoxAscent!==void 0?U.fontBoundingBoxAscent+U.fontBoundingBoxDescent:U.actualBoundingBoxAscent+U.actualBoundingBoxDescent]});B=Math.ceil(Math.max(...K.map(I=>I[0]))),F=Math.ceil(Math.max(...K.map(I=>I[1])))*j.length+(j.length-1)*Nx}return[Z??B,H??F]},L=lce(),P=()=>{const B=document.createElement("canvas").getContext("2d"),F=t.image,Q=t.content,J=t.rotate;if(B){y.value||(y.value=document.createElement("div"));const Z=oce(),[H,j]=T(B),K=I=>{const[U,oe]=L(I||"",J,Z,H,j,{color:r.value,fontSize:l.value,fontStyle:a.value,fontWeight:n.value,fontFamily:i.value,textAlign:c.value,textBaseline:d.value},u.value,p.value);$(U,oe)};if(F){const I=new Image;I.onload=()=>{K(I)},I.onerror=()=>{K(Q)},I.crossOrigin="anonymous",I.referrerPolicy="no-referrer",I.src=F}else K(Q)}};return ft(()=>{P()}),Se(()=>t,()=>{P()},{deep:!0,flush:"post"}),to(()=>{x()}),t_(g,V=>{w.value||V.forEach(B=>{rce(B,y.value)&&(x(),P())})},{attributes:!0,subtree:!0,childList:!0}),(V,B)=>(b(),M("div",{ref_key:"containerRef",ref:g,style:Je([o])},[be(V.$slots,"default")],4))}});var ace=Le(nce,[["__file","watermark.vue"]]);const ice=yt(ace),sce=Pe({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:ue(Object)},targetAreaClickable:{type:Boolean,default:!0}}),cce=(e,t,o,r,l)=>{const n=D(null),a=()=>{let p;return ut(e.value)?p=document.querySelector(e.value):it(e.value)?p=e.value():p=e.value,p},i=()=>{const p=a();if(!p||!t.value){n.value=null;return}!uce(p)&&t.value&&p.scrollIntoView(l.value);const{left:h,top:v,width:m,height:f}=p.getBoundingClientRect();n.value={left:h,top:v,width:m,height:f,radius:0}};ft(()=>{Se([t,e],()=>{i()},{immediate:!0}),window.addEventListener("resize",i)}),to(()=>{window.removeEventListener("resize",i)});const c=p=>{var h;return(h=Ke(o.value.offset)?o.value.offset[p]:o.value.offset)!=null?h:6},d=C(()=>{var p;if(!n.value)return n.value;const h=c(0),v=c(1),m=((p=o.value)==null?void 0:p.radius)||2;return{left:n.value.left-h,top:n.value.top-v,width:n.value.width+h*2,height:n.value.height+v*2,radius:m}}),u=C(()=>{const p=a();return!r.value||!p||!window.DOMRect?p||void 0:{getBoundingClientRect(){var h,v,m,f;return window.DOMRect.fromRect({width:((h=d.value)==null?void 0:h.width)||0,height:((v=d.value)==null?void 0:v.height)||0,x:((m=d.value)==null?void 0:m.left)||0,y:((f=d.value)==null?void 0:f.top)||0})}}});return{mergedPosInfo:d,triggerTarget:u}},Up=Symbol("ElTour");function uce(e){const t=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,{top:r,right:l,bottom:n,left:a}=e.getBoundingClientRect();return r>=0&&a>=0&&l<=t&&n<=o}const dce=(e,t,o,r,l,n,a,i)=>{const c=D(),d=D(),u=D({}),p={x:c,y:d,placement:r,strategy:l,middlewareData:u},h=C(()=>{const g=[Z6(s(n)),dK(),uK(),pce()];return s(i)&&s(o)&&g.push(J6({element:s(o)})),g}),v=async()=>{if(!Nt)return;const g=s(e),y=s(t);if(!g||!y)return;const w=await Q6(g,y,{placement:s(r),strategy:s(l),middleware:s(h)});Ri(p).forEach(x=>{p[x].value=w[x]})},m=C(()=>{if(!s(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:s(a)};const{overflow:g}=s(u);return{position:s(l),zIndex:s(a),top:s(d)!=null?`${s(d)}px`:"",left:s(c)!=null?`${s(c)}px`:"",maxWidth:g!=null&&g.maxWidth?`${g==null?void 0:g.maxWidth}px`:""}}),f=C(()=>{if(!s(i))return{};const{arrow:g}=s(u);return{left:(g==null?void 0:g.x)!=null?`${g==null?void 0:g.x}px`:"",top:(g==null?void 0:g.y)!=null?`${g==null?void 0:g.y}px`:""}});let _;return ft(()=>{const g=s(e),y=s(t);g&&y&&(_=sK(g,y,v)),Go(()=>{v()})}),to(()=>{_&&_()}),{update:v,contentStyle:m,arrowStyle:f}},pce=()=>({name:"overflow",async fn(e){const t=await cK(e);let o=0;return t.left>0&&(o=t.left),t.right>0&&(o=t.right),{data:{maxWidth:e.rects.floating.width-o}}}}),fce={style:{width:"100%",height:"100%"}},hce=["d"],vce=N({...N({name:"ElTourMask",inheritAttrs:!1}),props:sce,setup(e){const t=e,{ns:o}=Ge(Up),r=C(()=>{var i,c;return(c=(i=t.pos)==null?void 0:i.radius)!=null?c:2}),l=C(()=>{const i=r.value,c=`a${i},${i} 0 0 1`;return{topRight:`${c} ${i},${i}`,bottomRight:`${c} ${-i},${i}`,bottomLeft:`${c} ${-i},${-i}`,topLeft:`${c} ${i},${-i}`}}),n=C(()=>{const i=window.innerWidth,c=window.innerHeight,d=l.value,u=`M${i},0 L0,0 L0,${c} L${i},${c} L${i},0 Z`,p=r.value;return t.pos?`${u} M${t.pos.left+p},${t.pos.top} h${t.pos.width-p*2} ${d.topRight} v${t.pos.height-p*2} ${d.bottomRight} h${-t.pos.width+p*2} ${d.bottomLeft} v${-t.pos.height+p*2} ${d.topLeft} z`:u}),a=C(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Ch(Yt(t,"visible"),{ns:o}),(i,c)=>i.visible?(b(),M("div",Mt({key:0,class:s(o).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:i.zIndex,pointerEvents:i.pos&&i.targetAreaClickable?"none":"auto"}},i.$attrs),[(b(),M("svg",fce,[E("path",{class:O(s(o).e("hollow")),style:Je(s(a)),d:s(n)},null,14,hce)]))],16)):se("v-if",!0)}});var mce=Le(vce,[["__file","mask.vue"]]);const gce=["absolute","fixed"],bce=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],G2=Pe({placement:{type:ue(String),values:bce,default:"bottom"},reference:{type:ue(Object),default:null},strategy:{type:ue(String),values:gce,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),_ce={close:()=>!0},wce=["data-side"],yce=N({...N({name:"ElTourContent"}),props:G2,emits:_ce,setup(e,{emit:t}){const o=e,r=D(o.placement),l=D(o.strategy),n=D(null),a=D(null);Se(()=>o.placement,()=>{r.value=o.placement});const{contentStyle:i,arrowStyle:c}=dce(Yt(o,"reference"),n,a,r,l,Yt(o,"offset"),Yt(o,"zIndex"),Yt(o,"showArrow")),d=C(()=>r.value.split("-")[0]),{ns:u}=Ge(Up),p=()=>{t("close")},h=v=>{v.detail.focusReason==="pointer"&&v.preventDefault()};return(v,m)=>(b(),M("div",{ref_key:"contentRef",ref:n,style:Je(s(i)),class:O(s(u).e("content")),"data-side":s(d),tabindex:"-1"},[te(s(Oc),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":n.value||void 0,onReleaseRequested:p,onFocusoutPrevented:h},{default:le(()=>[be(v.$slots,"default")]),_:3},8,["focus-trap-el"]),v.showArrow?(b(),M("span",{key:0,ref_key:"arrowRef",ref:a,style:Je(s(c)),class:O(s(u).e("arrow"))},null,6)):se("v-if",!0)],14,wce))}});var xce=Le(yce,[["__file","content.vue"]]),kce=N({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:o}){let r=0;return()=>{var l,n;const a=(l=t.default)==null?void 0:l.call(t),i=[];let c=0;function d(u){Ke(u)&&u.forEach(p=>{var h;((h=(p==null?void 0:p.type)||{})==null?void 0:h.name)==="ElTourStep"&&(i.push(p),c+=1)})}return a.length&&d(Qn((n=a[0])==null?void 0:n.children)),r!==c&&(r=c,o("update-total",c)),i.length?i[e.current]:null}}});const Cce=Pe({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Xt},placement:G2.placement,contentStyle:{type:ue([Object])},mask:{type:ue([Boolean,Object]),default:!0},gap:{type:ue(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:ue([Boolean,Object]),default:()=>({block:"center"})},type:{type:ue(String)},appendTo:{type:ue([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),Sce={[St]:e=>Co(e),"update:current":e=>st(e),close:e=>st(e),finish:()=>!0,change:e=>st(e)},Ece=N({...N({name:"ElTour"}),props:Cce,emits:Sce,setup(e,{emit:t}){const o=e,r=ze("tour"),l=D(0),n=D(),a=n_(o,"current",t,{passive:!0}),i=C(()=>{var R;return(R=n.value)==null?void 0:R.target}),c=C(()=>[r.b(),_.value==="primary"?r.m("primary"):""]),d=C(()=>{var R;return((R=n.value)==null?void 0:R.placement)||o.placement}),u=C(()=>{var R,V;return(V=(R=n.value)==null?void 0:R.contentStyle)!=null?V:o.contentStyle}),p=C(()=>{var R,V;return(V=(R=n.value)==null?void 0:R.mask)!=null?V:o.mask}),h=C(()=>!!p.value&&o.modelValue),v=C(()=>Co(p.value)?void 0:p.value),m=C(()=>{var R,V;return!!i.value&&((V=(R=n.value)==null?void 0:R.showArrow)!=null?V:o.showArrow)}),f=C(()=>{var R,V;return(V=(R=n.value)==null?void 0:R.scrollIntoViewOptions)!=null?V:o.scrollIntoViewOptions}),_=C(()=>{var R,V;return(V=(R=n.value)==null?void 0:R.type)!=null?V:o.type}),{nextZIndex:g}=Ki(),y=g(),w=C(()=>{var R;return(R=o.zIndex)!=null?R:y}),{mergedPosInfo:x,triggerTarget:$}=cce(i,Yt(o,"modelValue"),Yt(o,"gap"),p,f);Se(()=>o.modelValue,R=>{R||(a.value=0)});const T=()=>{o.closeOnPressEscape&&(t("update:modelValue",!1),t("close",a.value))},L=R=>{l.value=R},P=Do();return zt(Up,{currentStep:n,current:a,total:l,showClose:Yt(o,"showClose"),closeIcon:Yt(o,"closeIcon"),mergedType:_,ns:r,slots:P,updateModelValue(R){t("update:modelValue",R)},onClose(){t("close",a.value)},onFinish(){t("finish")},onChange(){t("change",a.value)}}),(R,V)=>{var B,F;return b(),M(Qe,null,[(b(),he(hi,{to:R.appendTo},[E("div",Mt({class:s(c)},R.$attrs),[te(mce,{visible:s(h),fill:(B=s(v))==null?void 0:B.color,style:Je((F=s(v))==null?void 0:F.style),pos:s(x),"z-index":s(w),"target-area-clickable":R.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),R.modelValue?(b(),he(xce,{key:s(a),reference:s($),placement:s(d),"show-arrow":s(m),"z-index":s(w),style:Je(s(u)),onClose:T},{default:le(()=>[te(s(kce),{current:s(a),onUpdateTotal:L},{default:le(()=>[be(R.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):se("v-if",!0)],16)],8,["to"])),se(" just for IDE "),se("v-if",!0)],64)}}});var Tce=Le(Ece,[["__file","tour.vue"]]);const $ce=Pe({target:{type:ue([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Xt},showArrow:{type:Boolean,default:void 0},placement:G2.placement,mask:{type:ue([Boolean,Object]),default:void 0},contentStyle:{type:ue([Object])},prevButtonProps:{type:ue(Object)},nextButtonProps:{type:ue(Object)},scrollIntoViewOptions:{type:ue([Boolean,Object]),default:void 0},type:{type:ue(String)}}),Mce=N({...N({name:"ElTourStep"}),props:$ce,emits:{close:()=>!0},setup(e,{emit:t}){const o=e,{Close:r}=mh,{t:l}=Rt(),{currentStep:n,current:a,total:i,showClose:c,closeIcon:d,mergedType:u,ns:p,slots:h,updateModelValue:v,onClose:m,onFinish:f,onChange:_}=Ge(Up);Se(o,P=>{n.value=P},{immediate:!0});const g=C(()=>{var P;return(P=o.showClose)!=null?P:c.value}),y=C(()=>{var P,R;return(R=(P=o.closeIcon)!=null?P:d.value)!=null?R:r}),w=P=>{if(P)return Lz(P,["children","onClick"])},x=()=>{var P,R;a.value-=1,(P=o.prevButtonProps)!=null&&P.onClick&&((R=o.prevButtonProps)==null||R.onClick()),_()},$=()=>{var P;a.value>=i.value-1?T():a.value+=1,(P=o.nextButtonProps)!=null&&P.onClick&&o.nextButtonProps.onClick(),_()},T=()=>{L(),f()},L=()=>{v(!1),m(),t("close")};return(P,R)=>(b(),M(Qe,null,[s(g)?(b(),M("button",{key:0,"aria-label":"Close",class:O(s(p).e("closebtn")),type:"button",onClick:L},[te(s(Ze),{class:O(s(p).e("close"))},{default:le(()=>[(b(),he(Et(s(y))))]),_:1},8,["class"])],2)):se("v-if",!0),E("header",{class:O([s(p).e("header"),{"show-close":s(c)}])},[be(P.$slots,"header",{},()=>[E("span",{role:"heading",class:O(s(p).e("title"))},$e(P.title),3)])],2),E("div",{class:O(s(p).e("body"))},[be(P.$slots,"default",{},()=>[E("span",null,$e(P.description),1)])],2),E("footer",{class:O(s(p).e("footer"))},[E("div",{class:O(s(p).b("indicators"))},[s(h).indicators?(b(),he(Et(s(h).indicators),{key:0,current:s(a),total:s(i)},null,8,["current","total"])):(b(!0),M(Qe,{key:1},It(s(i),(V,B)=>(b(),M("span",{key:V,class:O([s(p).b("indicator"),B===s(a)?"is-active":""])},null,2))),128))],2),E("div",{class:O(s(p).b("buttons"))},[s(a)>0?(b(),he(s(Wo),Mt({key:0,size:"small",type:s(u)},w(P.prevButtonProps),{onClick:x}),{default:le(()=>{var V,B;return[Ct($e((B=(V=P.prevButtonProps)==null?void 0:V.children)!=null?B:s(l)("el.tour.previous")),1)]}),_:1},16,["type"])):se("v-if",!0),s(a)<=s(i)-1?(b(),he(s(Wo),Mt({key:1,size:"small",type:s(u)==="primary"?"default":"primary"},w(P.nextButtonProps),{onClick:$}),{default:le(()=>{var V,B;return[Ct($e((B=(V=P.nextButtonProps)==null?void 0:V.children)!=null?B:s(a)===s(i)-1?s(l)("el.tour.finish"):s(l)("el.tour.next")),1)]}),_:1},16,["type"])):se("v-if",!0)],2)],2)],64))}});var Px=Le(Mce,[["__file","step.vue"]]);const Ace=yt(Tce,{TourStep:Px}),zce=co(Px),Ice=Pe({container:{type:ue([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:ue(String),default:"default"},direction:{type:ue(String),default:"vertical"}}),Oce={change:e=>ut(e),click:(e,t)=>e instanceof MouseEvent&&(ut(t)||ko(t))},Rx=Symbol("anchor"),Nce=N({...N({name:"ElAnchor"}),props:Ice,emits:Oce,setup(e,{expose:t,emit:o}){const r=e,l=D(""),n=D(null),a=D(null),i=D(),c={};let d=!1,u=0;const p=ze("anchor"),h=C(()=>[p.b(),r.type==="underline"?p.m("underline"):"",p.m(r.direction)]),v=P=>{c[P.href]=P.el},m=P=>{delete c[P]},f=P=>{l.value!==P&&(l.value=P,o("change",P))};let _=null;const g=P=>{if(!i.value)return;const R=$d(P);if(!R)return;_&&_(),d=!0;const V=$3(R,i.value),B=N0(R,V),F=V.scrollHeight-V.clientHeight,Q=Math.min(B-r.offset,F);_=Xz(i.value,u,Q,r.duration,()=>{setTimeout(()=>{d=!1},20)})},y=P=>{P&&(f(P),g(P))},w=(P,R)=>{o("click",P,R),y(R)},x=cF(()=>{i.value&&(u=M3(i.value));const P=$();d||ko(P)||f(P)}),$=()=>{if(!i.value)return;const P=M3(i.value),R=[];for(const V of Object.keys(c)){const B=$d(V);if(!B)continue;const F=$3(B,i.value),Q=N0(B,F);R.push({top:Q-r.offset-r.bound,href:V})}R.sort((V,B)=>V.top-B.top);for(let V=0;VP))return B.href}},T=()=>{const P=$d(r.container);!P||Sd(P)?i.value=window:i.value=P};oo(i,"scroll",x);const L=C(()=>{if(!n.value||!a.value||!l.value)return{};const P=c[l.value];if(!P)return{};const R=n.value.getBoundingClientRect(),V=a.value.getBoundingClientRect(),B=P.getBoundingClientRect();return r.direction==="horizontal"?{left:`${B.left-R.left}px`,width:`${B.width}px`,opacity:1}:{top:`${B.top-R.top+(B.height-V.height)/2}px`,opacity:1}});return ft(()=>{T();const P=decodeURIComponent(window.location.hash);$d(P)?y(P):x()}),Se(()=>r.container,()=>{T()}),zt(Rx,{ns:p,direction:r.direction,currentAnchor:l,addLink:v,removeLink:m,handleClick:w}),t({scrollTo:y}),(P,R)=>(b(),M("div",{ref_key:"anchorRef",ref:n,class:O(s(h))},[P.marker?(b(),M("div",{key:0,ref_key:"markerRef",ref:a,class:O(s(p).e("marker")),style:Je(s(L))},null,6)):se("v-if",!0),E("div",{class:O(s(p).e("list"))},[be(P.$slots,"default")],2)],2))}});var Pce=Le(Nce,[["__file","anchor.vue"]]);const Rce=Pe({title:String,href:String}),Lce=["href"],Bce=N({...N({name:"ElAnchorLink"}),props:Rce,setup(e){const t=e,o=D(null),{ns:r,direction:l,currentAnchor:n,addLink:a,removeLink:i,handleClick:c}=Ge(Rx),d=C(()=>[r.e("link"),r.is("active",n.value===t.href)]),u=p=>{c(p,t.href)};return Se(()=>t.href,(p,h)=>{et(()=>{h&&i(h),p&&a({href:p,el:o.value})})}),ft(()=>{const{href:p}=t;p&&a({href:p,el:o.value})}),to(()=>{const{href:p}=t;p&&i(p)}),(p,h)=>(b(),M("div",{class:O(s(r).e("item"))},[E("a",{ref_key:"linkRef",ref:o,class:O(s(d)),href:p.href,onClick:u},[be(p.$slots,"default",{},()=>[Ct($e(p.title),1)])],10,Lce),p.$slots["sub-link"]&&s(l)==="vertical"?(b(),M("div",{key:0,class:O(s(r).e("list"))},[be(p.$slots,"sub-link")],2)):se("v-if",!0)],2))}});var Lx=Le(Bce,[["__file","anchor-link.vue"]]);const Vce=yt(Pce,{AnchorLink:Lx}),Dce=co(Lx),Hce=Pe({options:{type:ue(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:Oo,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...Zo(["ariaLabel"])}),Fce={[St]:e=>ut(e)||st(e),[ro]:e=>ut(e)||st(e)},jce=["id","aria-label","aria-labelledby"],Kce=["name","disabled","checked","onChange"],Uce=N({...N({name:"ElSegmented"}),props:Hce,emits:Fce,setup(e,{emit:t}){const o=e,r=ze("segmented"),l=Qo(),n=So(),a=xr(),{formItem:i}=sr(),{inputId:c,isLabeledByFormItem:d}=bl(o,{formItemContext:i}),u=D(null),p=oE(),h=Dt({isInit:!1,width:0,translateX:0,disabled:!1,focusVisible:!1}),v=R=>{const V=m(R);t(St,V),t(ro,V)},m=R=>xt(R)?R.value:R,f=R=>xt(R)?R.label:R,_=R=>!!(a.value||xt(R)&&R.disabled),g=R=>o.modelValue===m(R),y=R=>o.options.find(V=>m(V)===R),w=R=>[r.e("item"),r.is("selected",g(R)),r.is("disabled",_(R))],x=()=>{if(!u.value)return;const R=u.value.querySelector(".is-selected"),V=u.value.querySelector(".is-selected input");if(!R||!V){h.width=0,h.translateX=0,h.disabled=!1,h.focusVisible=!1;return}const B=R.getBoundingClientRect();h.isInit=!0,h.width=B.width,h.translateX=R.offsetLeft,h.disabled=_(y(o.modelValue));try{h.focusVisible=V.matches(":focus-visible")}catch{}},$=C(()=>[r.b(),r.m(n.value),r.is("block",o.block)]),T=C(()=>({width:`${h.width}px`,transform:`translateX(${h.translateX}px)`,display:h.isInit?"block":"none"})),L=C(()=>[r.e("item-selected"),r.is("disabled",h.disabled),r.is("focus-visible",h.focusVisible)]),P=C(()=>o.name||l.value);return so(u,x),Se(p,x),Se(()=>o.modelValue,()=>{var R;x(),o.validateEvent&&((R=i==null?void 0:i.validate)==null||R.call(i,"change").catch(V=>void 0))},{flush:"post"}),(R,V)=>(b(),M("div",{id:s(c),ref_key:"segmentedRef",ref:u,class:O(s($)),role:"radiogroup","aria-label":s(d)?void 0:R.ariaLabel||"segmented","aria-labelledby":s(d)?s(i).labelId:void 0},[E("div",{class:O(s(r).e("group"))},[E("div",{style:Je(s(T)),class:O(s(L))},null,6),(b(!0),M(Qe,null,It(R.options,(B,F)=>(b(),M("label",{key:F,class:O(w(B))},[E("input",{class:O(s(r).e("item-input")),type:"radio",name:s(P),disabled:_(B),checked:g(B),onChange:Q=>v(B)},null,42,Kce),E("div",{class:O(s(r).e("item-label"))},[be(R.$slots,"default",{item:B},()=>[Ct($e(f(B)),1)])],2)],2))),128))],2)],10,jce))}});var Wce=Le(Uce,[["__file","segmented.vue"]]);const qce=yt(Wce);var Yce=[AK,BK,ZW,Lae,rq,cq,L4,wq,yq,Wo,Y4,AY,NY,XY,ZY,JG,jG,rX,rl,pG,Rw,dX,EX,TX,_X,QX,kK,aZ,iZ,sZ,cZ,uZ,CJ,OJ,NJ,YJ,ky,aQ,ZQ,JQ,QQ,Ny,NU,PU,Ze,Hee,Py,cr,Ry,Qee,mte,gte,bte,_te,Ste,Eoe,Aoe,Loe,N4,Gy,jw,SG,CG,Joe,ore,iX,wn,Za,kp,ooe,Hre,qre,Yre,xle,Ele,k8,Ple,Fle,jle,Qle,tae,oae,Rae,Xae,Zae,Pc,tie,dY,nie,cie,uie,ur,Aie,jie,ose,sse,Cse,Jse,ice,Ace,zce,Vce,Dce,qce];const al="ElInfiniteScroll",Gce=50,Xce={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},X2=(e,t)=>Object.entries(Xce).reduce((o,[r,l])=>{var n,a;const{type:i,default:c}=l,d=e.getAttribute(`infinite-scroll-${r}`);let u=(a=(n=t[d])!=null?n:d)!=null?a:c;return u=u==="false"?!1:u,u=i(u),o[r]=Number.isNaN(u)?c:u,o},{}),Bx=e=>{const{observer:t}=e[al];t&&(t.disconnect(),delete e[al].observer)},Zce=(e,t)=>{const{container:o,containerEl:r,instance:l,observer:n,lastScrollTop:a}=e[al],{disabled:i,distance:c}=X2(e,l),{clientHeight:d,scrollHeight:u,scrollTop:p}=r,h=p-a;if(e[al].lastScrollTop=p,n||i||h<0)return;let v=!1;if(o===e)v=u-(d+p)<=c;else{const{clientTop:m,scrollHeight:f}=e,_=N0(e,r);v=p+d>=_+m+f-c}v&&t.call(l)};function Z2(e,t){const{containerEl:o,instance:r}=e[al],{disabled:l}=X2(e,r);l||o.clientHeight===0||(o.scrollHeight<=o.clientHeight?t.call(r):Bx(e))}const J2={async mounted(e,t){const{instance:o,value:r}=t;it(r)||Io(al,"'v-infinite-scroll' binding value must be a function"),await et();const{delay:l,immediate:n}=X2(e,o),a=ch(e,!0),i=a===window?document.documentElement:a,c=Oa(Zce.bind(null,e,r),l);if(a){if(e[al]={instance:o,container:a,containerEl:i,delay:l,cb:r,onScroll:c,lastScrollTop:i.scrollTop},n){const d=new MutationObserver(Oa(Z2.bind(null,e,r),Gce));e[al].observer=d,d.observe(e,{childList:!0,subtree:!0}),Z2(e,r)}a.addEventListener("scroll",c)}},unmounted(e){if(!e[al])return;const{container:t,onScroll:o}=e[al];t==null||t.removeEventListener("scroll",o),Bx(e)},async updated(e){if(!e[al])await et();else{const{containerEl:t,cb:o,observer:r}=e[al];t.clientHeight&&r&&Z2(e,o)}}};J2.install=e=>{e.directive("InfiniteScroll",J2)};const Jce=J2;function Qce(e){let t;const o=D(!1),r=Dt({...e,originalPosition:"",originalOverflow:"",visible:!1});function l(h){r.text=h}function n(){const h=r.parent,v=p.ns;if(!h.vLoadingAddClassList){let m=h.getAttribute("loading-number");m=Number.parseInt(m)-1,m?h.setAttribute("loading-number",m.toString()):(ar(h,v.bm("parent","relative")),h.removeAttribute("loading-number")),ar(h,v.bm("parent","hidden"))}a(),u.unmount()}function a(){var h,v;(v=(h=p.$el)==null?void 0:h.parentNode)==null||v.removeChild(p.$el)}function i(){var h;e.beforeClose&&!e.beforeClose()||(o.value=!0,clearTimeout(t),t=window.setTimeout(c,400),r.visible=!1,(h=e.closed)==null||h.call(e))}function c(){if(!o.value)return;const h=r.parent;o.value=!1,h.vLoadingAddClassList=void 0,n()}const u=V1(N({name:"ElLoading",setup(h,{expose:v}){const{ns:m,zIndex:f}=qd("loading");return v({ns:m,zIndex:f}),()=>{const _=r.spinner||r.svg,g=rt("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",..._?{innerHTML:_}:{}},[rt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),y=r.text?rt("p",{class:m.b("text")},[r.text]):void 0;return rt(Mo,{name:m.b("fade"),onAfterLeave:c},{default:le(()=>[mt(te("div",{style:{backgroundColor:r.background||""},class:[m.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[rt("div",{class:m.b("spinner")},[g,y])]),[[Lt,r.visible]])])})}}})),p=u.mount(document.createElement("div"));return{...Bo(r),setText:l,removeElLoadingChild:a,close:i,handleAfterLeave:c,vm:p,get $el(){return p.$el}}}let Wp;const Q2=function(e={}){if(!Nt)return;const t=eue(e);if(t.fullscreen&&Wp)return Wp;const o=Qce({...t,closed:()=>{var l;(l=t.closed)==null||l.call(t),t.fullscreen&&(Wp=void 0)}});tue(t,t.parent,o),Vx(t,t.parent,o),t.parent.vLoadingAddClassList=()=>Vx(t,t.parent,o);let r=t.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",t.parent.setAttribute("loading-number",r),t.parent.appendChild(o.$el),et(()=>o.visible.value=t.visible),t.fullscreen&&(Wp=o),o},eue=e=>{var t,o,r,l;let n;return ut(e.target)?n=(t=document.querySelector(e.target))!=null?t:document.body:n=e.target||document.body,{parent:n===document.body||e.body?document.body:n,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:n===document.body&&((o=e.fullscreen)!=null?o:!0),lock:(r=e.lock)!=null?r:!1,customClass:e.customClass||"",visible:(l=e.visible)!=null?l:!0,target:n}},tue=async(e,t,o)=>{const{nextZIndex:r}=o.vm.zIndex||o.vm._.exposed.zIndex,l={};if(e.fullscreen)o.originalPosition.value=Zn(document.body,"position"),o.originalOverflow.value=Zn(document.body,"overflow"),l.zIndex=r();else if(e.parent===document.body){o.originalPosition.value=Zn(document.body,"position"),await et();for(const n of["top","left"]){const a=n==="top"?"scrollTop":"scrollLeft";l[n]=`${e.target.getBoundingClientRect()[n]+document.body[a]+document.documentElement[a]-Number.parseInt(Zn(document.body,`margin-${n}`),10)}px`}for(const n of["height","width"])l[n]=`${e.target.getBoundingClientRect()[n]}px`}else o.originalPosition.value=Zn(t,"position");for(const[n,a]of Object.entries(l))o.$el.style[n]=a},Vx=(e,t,o)=>{const r=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?ar(t,r.bm("parent","relative")):Zr(t,r.bm("parent","relative")),e.fullscreen&&e.lock?Zr(t,r.bm("parent","hidden")):ar(t,r.bm("parent","hidden"))},qp=Symbol("ElLoading"),Dx=(e,t)=>{var o,r,l,n;const a=t.instance,i=h=>xt(t.value)?t.value[h]:void 0,c=h=>{const v=ut(h)&&(a==null?void 0:a[h])||h;return v&&D(v)},d=h=>c(i(h)||e.getAttribute(`element-loading-${An(h)}`)),u=(o=i("fullscreen"))!=null?o:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:u,target:(r=i("target"))!=null?r:u?void 0:e,body:(l=i("body"))!=null?l:t.modifiers.body,lock:(n=i("lock"))!=null?n:t.modifiers.lock};e[qp]={options:p,instance:Q2(p)}},oue=(e,t)=>{for(const o of Object.keys(t))Zt(t[o])&&(t[o].value=e[o])},Hx={mounted(e,t){t.value&&Dx(e,t)},updated(e,t){const o=e[qp];t.oldValue!==t.value&&(t.value&&!t.oldValue?Dx(e,t):t.value&&t.oldValue?xt(t.value)&&oue(t.value,o.options):o==null||o.instance.close())},unmounted(e){var t;(t=e[qp])==null||t.instance.close(),e[qp]=null}},rue={install(e){e.directive("loading",Hx),e.config.globalProperties.$loading=Q2},directive:Hx,service:Q2},Fx=["success","info","warning","error"],dr=uo({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Nt?document.body:void 0}),lue=Pe({customClass:{type:String,default:dr.customClass},center:{type:Boolean,default:dr.center},dangerouslyUseHTMLString:{type:Boolean,default:dr.dangerouslyUseHTMLString},duration:{type:Number,default:dr.duration},icon:{type:Xt,default:dr.icon},id:{type:String,default:dr.id},message:{type:ue([String,Object,Function]),default:dr.message},onClose:{type:ue(Function),default:dr.onClose},showClose:{type:Boolean,default:dr.showClose},type:{type:String,values:Fx,default:dr.type},plain:{type:Boolean,default:dr.plain},offset:{type:Number,default:dr.offset},zIndex:{type:Number,default:dr.zIndex},grouping:{type:Boolean,default:dr.grouping},repeatNum:{type:Number,default:dr.repeatNum}}),nue={destroy:()=>!0},yl=tg([]),aue=e=>{const t=yl.findIndex(l=>l.id===e),o=yl[t];let r;return t>0&&(r=yl[t-1]),{current:o,prev:r}},iue=e=>{const{prev:t}=aue(e);return t?t.vm.exposed.bottom.value:0},sue=(e,t)=>yl.findIndex(r=>r.id===e)>0?16:t,cue=["id"],uue=["innerHTML"],due=N({...N({name:"ElMessage"}),props:lue,emits:nue,setup(e,{expose:t}){const o=e,{Close:r}=gh,{ns:l,zIndex:n}=qd("message"),{currentZIndex:a,nextZIndex:i}=n,c=D(),d=D(!1),u=D(0);let p;const h=C(()=>o.type?o.type==="error"?"danger":o.type:"info"),v=C(()=>{const L=o.type;return{[l.bm("icon",L)]:L&&Jn[L]}}),m=C(()=>o.icon||Jn[o.type]||""),f=C(()=>iue(o.id)),_=C(()=>sue(o.id,o.offset)+f.value),g=C(()=>u.value+_.value),y=C(()=>({top:`${_.value}px`,zIndex:a.value}));function w(){o.duration!==0&&({stop:p}=$a(()=>{$()},o.duration))}function x(){p==null||p()}function $(){d.value=!1}function T({code:L}){L===lt.esc&&$()}return ft(()=>{w(),i(),d.value=!0}),Se(()=>o.repeatNum,()=>{x(),w()}),oo(document,"keydown",T),so(c,()=>{u.value=c.value.getBoundingClientRect().height}),t({visible:d,bottom:g,close:$}),(L,P)=>(b(),he(Mo,{name:s(l).b("fade"),onBeforeLeave:L.onClose,onAfterLeave:P[0]||(P[0]=R=>L.$emit("destroy")),persisted:""},{default:le(()=>[mt(E("div",{id:L.id,ref_key:"messageRef",ref:c,class:O([s(l).b(),{[s(l).m(L.type)]:L.type},s(l).is("center",L.center),s(l).is("closable",L.showClose),s(l).is("plain",L.plain),L.customClass]),style:Je(s(y)),role:"alert",onMouseenter:x,onMouseleave:w},[L.repeatNum>1?(b(),he(s(L4),{key:0,value:L.repeatNum,type:s(h),class:O(s(l).e("badge"))},null,8,["value","type","class"])):se("v-if",!0),s(m)?(b(),he(s(Ze),{key:1,class:O([s(l).e("icon"),s(v)])},{default:le(()=>[(b(),he(Et(s(m))))]),_:1},8,["class"])):se("v-if",!0),be(L.$slots,"default",{},()=>[L.dangerouslyUseHTMLString?(b(),M(Qe,{key:1},[se(" Caution here, message could've been compromised, never use user's input as message "),E("p",{class:O(s(l).e("content")),innerHTML:L.message},null,10,uue)],2112)):(b(),M("p",{key:0,class:O(s(l).e("content"))},$e(L.message),3))]),L.showClose?(b(),he(s(Ze),{key:2,class:O(s(l).e("closeBtn")),onClick:ct($,["stop"])},{default:le(()=>[te(s(r))]),_:1},8,["class","onClick"])):se("v-if",!0)],46,cue),[[Lt,d.value]])]),_:3},8,["name","onBeforeLeave"]))}});var pue=Le(due,[["__file","message.vue"]]);let fue=1;const jx=e=>{const t=!e||ut(e)||io(e)||it(e)?{message:e}:e,o={...dr,...t};if(!o.appendTo)o.appendTo=document.body;else if(ut(o.appendTo)){let r=document.querySelector(o.appendTo);Gr(r)||(r=document.body),o.appendTo=r}return o},hue=e=>{const t=yl.indexOf(e);if(t===-1)return;yl.splice(t,1);const{handler:o}=e;o.close()},vue=({appendTo:e,...t},o)=>{const r=`message_${fue++}`,l=t.onClose,n=document.createElement("div"),a={...t,id:r,onClose:()=>{l==null||l(),hue(u)},onDestroy:()=>{jn(null,n)}},i=te(pue,a,it(a.message)||io(a.message)?{default:it(a.message)?a.message:()=>a.message}:null);i.appContext=o||ms._context,jn(i,n),e.appendChild(n.firstElementChild);const c=i.component,u={id:r,vnode:i,vm:c,handler:{close:()=>{c.exposed.visible.value=!1}},props:i.component.props};return u},ms=(e={},t)=>{if(!Nt)return{close:()=>{}};if(st(qh.max)&&yl.length>=qh.max)return{close:()=>{}};const o=jx(e);if(o.grouping&&yl.length){const l=yl.find(({vnode:n})=>{var a;return((a=n.props)==null?void 0:a.message)===o.message});if(l)return l.props.repeatNum+=1,l.props.type=o.type,l.handler}const r=vue(o,t);return yl.push(r),r.handler};Fx.forEach(e=>{ms[e]=(t={},o)=>{const r=jx(t);return ms({...r,type:e},o)}});function mue(e){for(const t of yl)(!e||e===t.props.type)&&t.handler.close()}ms.closeAll=mue,ms._context=null;const gue=J3(ms,"$message"),bue=N({name:"ElMessageBox",directives:{TrapFocus:Xq},components:{ElButton:Wo,ElFocusTrap:Oc,ElInput:cr,ElOverlay:Kv,ElIcon:Ze,...gh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:e6},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:o,zIndex:r,ns:l,size:n}=qd("message-box",C(()=>e.buttonSize)),{t:a}=o,{nextZIndex:i}=r,c=D(!1),d=Dt({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),u=C(()=>{const H=d.type;return{[l.bm("icon",H)]:H&&Jn[H]}}),p=Qo(),h=Qo(),v=C(()=>d.icon||Jn[d.type]||""),m=C(()=>!!d.message),f=D(),_=D(),g=D(),y=D(),w=D(),x=C(()=>d.confirmButtonClass);Se(()=>d.inputValue,async H=>{await et(),e.boxType==="prompt"&&H!==null&&F()},{immediate:!0}),Se(()=>c.value,H=>{var j,K;H&&(e.boxType!=="prompt"&&(d.autofocus?g.value=(K=(j=w.value)==null?void 0:j.$el)!=null?K:f.value:g.value=f.value),d.zIndex=i()),e.boxType==="prompt"&&(H?et().then(()=>{var I;y.value&&y.value.$el&&(d.autofocus?g.value=(I=Q())!=null?I:f.value:g.value=f.value)}):(d.editorErrorMessage="",d.validateError=!1))});const $=C(()=>e.draggable),T=C(()=>e.overflow);o6(f,_,$,T),ft(async()=>{await et(),e.closeOnHashChange&&window.addEventListener("hashchange",L)}),to(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",L)});function L(){c.value&&(c.value=!1,et(()=>{d.action&&t("action",d.action)}))}const P=()=>{e.closeOnClickModal&&B(d.distinguishCancelAndClose?"close":"cancel")},R=Nh(P),V=H=>{if(d.inputType!=="textarea")return H.preventDefault(),B("confirm")},B=H=>{var j;e.boxType==="prompt"&&H==="confirm"&&!F()||(d.action=H,d.beforeClose?(j=d.beforeClose)==null||j.call(d,H,d,L):L())},F=()=>{if(e.boxType==="prompt"){const H=d.inputPattern;if(H&&!H.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||a("el.messagebox.error"),d.validateError=!0,!1;const j=d.inputValidator;if(typeof j=="function"){const K=j(d.inputValue);if(K===!1)return d.editorErrorMessage=d.inputErrorMessage||a("el.messagebox.error"),d.validateError=!0,!1;if(typeof K=="string")return d.editorErrorMessage=K,d.validateError=!0,!1}}return d.editorErrorMessage="",d.validateError=!1,!0},Q=()=>{const H=y.value.$refs;return H.input||H.textarea},J=()=>{B("close")},Z=()=>{e.closeOnPressEscape&&J()};return e.lockScroll&&Ch(c),{...Bo(d),ns:l,overlayEvent:R,visible:c,hasMessage:m,typeClass:u,contentId:p,inputId:h,btnSize:n,iconComponent:v,confirmButtonClasses:x,rootRef:f,focusStartRef:g,headerRef:_,inputRef:y,confirmRef:w,doClose:L,handleClose:J,onCloseRequested:Z,handleWrapperClick:P,handleInputEnter:V,handleAction:B,t:a}}}),_ue=["aria-label","aria-describedby"],wue=["aria-label"],yue=["id"];function xue(e,t,o,r,l,n){const a=nt("el-icon"),i=nt("close"),c=nt("el-input"),d=nt("el-button"),u=nt("el-focus-trap"),p=nt("el-overlay");return b(),he(Mo,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=h=>e.$emit("vanish")),persisted:""},{default:le(()=>[mt(te(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:le(()=>[E("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:O(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...h)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...h)),onMousedown:t[9]||(t[9]=(...h)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...h)),onMouseup:t[10]||(t[10]=(...h)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...h))},[te(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:le(()=>[E("div",{ref:"rootRef",class:O([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=ct(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(b(),M("div",{key:0,ref:"headerRef",class:O([e.ns.e("header"),{"show-close":e.showClose}])},[E("div",{class:O(e.ns.e("title"))},[e.iconComponent&&e.center?(b(),he(a,{key:0,class:O([e.ns.e("status"),e.typeClass])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),E("span",null,$e(e.title),1)],2),e.showClose?(b(),M("button",{key:0,type:"button",class:O(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=h=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Gt(ct(h=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[te(a,{class:O(e.ns.e("close"))},{default:le(()=>[te(i)]),_:1},8,["class"])],42,wue)):se("v-if",!0)],2)):se("v-if",!0),E("div",{id:e.contentId,class:O(e.ns.e("content"))},[E("div",{class:O(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(b(),he(a,{key:0,class:O([e.ns.e("status"),e.typeClass])},{default:le(()=>[(b(),he(Et(e.iconComponent)))]),_:1},8,["class"])):se("v-if",!0),e.hasMessage?(b(),M("div",{key:1,class:O(e.ns.e("message"))},[be(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(b(),he(Et(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(b(),he(Et(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:le(()=>[Ct($e(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):se("v-if",!0)],2),mt(E("div",{class:O(e.ns.e("input"))},[te(c,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=h=>e.inputValue=h),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:O({invalid:e.validateError}),onKeydown:Gt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),E("div",{class:O(e.ns.e("errormsg")),style:Je({visibility:e.editorErrorMessage?"visible":"hidden"})},$e(e.editorErrorMessage),7)],2),[[Lt,e.showInput]])],10,yue),E("div",{class:O(e.ns.e("btns"))},[e.showCancelButton?(b(),he(d,{key:0,loading:e.cancelButtonLoading,class:O([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=h=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Gt(ct(h=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:le(()=>[Ct($e(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):se("v-if",!0),mt(te(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:O([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=h=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Gt(ct(h=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:le(()=>[Ct($e(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[Lt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,_ue)]),_:3},8,["z-index","overlay-class","mask"]),[[Lt,e.visible]])]),_:3})}var kue=Le(bue,[["render",xue],["__file","index.vue"]]);const tu=new Map,Cue=e=>{let t=document.body;return e.appendTo&&(ut(e.appendTo)&&(t=document.querySelector(e.appendTo)),Gr(e.appendTo)&&(t=e.appendTo),Gr(t)||(t=document.body)),t},Sue=(e,t,o=null)=>{const r=te(kue,e,it(e.message)||io(e.message)?{default:it(e.message)?e.message:()=>e.message}:null);return r.appContext=o,jn(r,t),Cue(e).appendChild(t.firstElementChild),r.component},Eue=()=>document.createElement("div"),Tue=(e,t)=>{const o=Eue();e.onVanish=()=>{jn(null,o),tu.delete(l)},e.onAction=n=>{const a=tu.get(l);let i;e.showInput?i={value:l.inputValue,action:n}:i=n,e.callback?e.callback(i,r.proxy):n==="cancel"||n==="close"?e.distinguishCancelAndClose&&n!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(i)};const r=Sue(e,o,t),l=r.proxy;for(const n in e)Pt(e,n)&&!Pt(l.$props,n)&&(l[n]=e[n]);return l.visible=!0,l};function gs(e,t=null){if(!Nt)return Promise.reject();let o;return ut(e)||io(e)?e={message:e}:o=e.callback,new Promise((r,l)=>{const n=Tue(e,t??gs._context);tu.set(n,{options:e,callback:o,resolve:r,reject:l})})}const $ue=["alert","confirm","prompt"],Mue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};$ue.forEach(e=>{gs[e]=Aue(e)});function Aue(e){return(t,o,r,l)=>{let n="";return xt(o)?(r=o,n=""):ko(o)?n="":n=o,gs(Object.assign({title:n,message:t,type:"",...Mue[e]},r,{boxType:e}),l)}}gs.close=()=>{tu.forEach((e,t)=>{t.doClose()}),tu.clear()},gs._context=null;const ca=gs;ca.install=e=>{ca._context=e._context,e.config.globalProperties.$msgbox=ca,e.config.globalProperties.$messageBox=ca,e.config.globalProperties.$alert=ca.alert,e.config.globalProperties.$confirm=ca.confirm,e.config.globalProperties.$prompt=ca.prompt};const zue=ca,Kx=["success","info","warning","error"],Iue=Pe({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Xt},id:{type:String,default:""},message:{type:ue([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:ue(Function),default:()=>{}},onClose:{type:ue(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...Kx,""],default:""},zIndex:Number}),Oue={destroy:()=>!0},Nue=["id"],Pue=["textContent"],Rue={key:0},Lue=["innerHTML"],Bue=N({...N({name:"ElNotification"}),props:Iue,emits:Oue,setup(e,{expose:t}){const o=e,{ns:r,zIndex:l}=qd("notification"),{nextZIndex:n,currentZIndex:a}=l,{Close:i}=mh,c=D(!1);let d;const u=C(()=>{const w=o.type;return w&&Jn[o.type]?r.m(w):""}),p=C(()=>o.type&&Jn[o.type]||o.icon),h=C(()=>o.position.endsWith("right")?"right":"left"),v=C(()=>o.position.startsWith("top")?"top":"bottom"),m=C(()=>{var w;return{[v.value]:`${o.offset}px`,zIndex:(w=o.zIndex)!=null?w:a.value}});function f(){o.duration>0&&({stop:d}=$a(()=>{c.value&&g()},o.duration))}function _(){d==null||d()}function g(){c.value=!1}function y({code:w}){w===lt.delete||w===lt.backspace?_():w===lt.esc?c.value&&g():f()}return ft(()=>{f(),n(),c.value=!0}),oo(document,"keydown",y),t({visible:c,close:g}),(w,x)=>(b(),he(Mo,{name:s(r).b("fade"),onBeforeLeave:w.onClose,onAfterLeave:x[1]||(x[1]=$=>w.$emit("destroy")),persisted:""},{default:le(()=>[mt(E("div",{id:w.id,class:O([s(r).b(),w.customClass,s(h)]),style:Je(s(m)),role:"alert",onMouseenter:_,onMouseleave:f,onClick:x[0]||(x[0]=(...$)=>w.onClick&&w.onClick(...$))},[s(p)?(b(),he(s(Ze),{key:0,class:O([s(r).e("icon"),s(u)])},{default:le(()=>[(b(),he(Et(s(p))))]),_:1},8,["class"])):se("v-if",!0),E("div",{class:O(s(r).e("group"))},[E("h2",{class:O(s(r).e("title")),textContent:$e(w.title)},null,10,Pue),mt(E("div",{class:O(s(r).e("content")),style:Je(w.title?void 0:{margin:0})},[be(w.$slots,"default",{},()=>[w.dangerouslyUseHTMLString?(b(),M(Qe,{key:1},[se(" Caution here, message could've been compromised, never use user's input as message "),E("p",{innerHTML:w.message},null,8,Lue)],2112)):(b(),M("p",Rue,$e(w.message),1))])],6),[[Lt,w.message]]),w.showClose?(b(),he(s(Ze),{key:0,class:O(s(r).e("closeBtn")),onClick:ct(g,["stop"])},{default:le(()=>[te(s(i))]),_:1},8,["class","onClick"])):se("v-if",!0)],2)],46,Nue),[[Lt,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});var Vue=Le(Bue,[["__file","notification.vue"]]);const Yp={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},em=16;let Due=1;const bs=function(e={},t=null){if(!Nt)return{close:()=>{}};(typeof e=="string"||io(e))&&(e={message:e});const o=e.position||"top-right";let r=e.offset||0;Yp[o].forEach(({vm:u})=>{var p;r+=(((p=u.el)==null?void 0:p.offsetHeight)||0)+em}),r+=em;const l=`notification_${Due++}`,n=e.onClose,a={...e,offset:r,id:l,onClose:()=>{Hue(l,o,n)}};let i=document.body;Gr(e.appendTo)?i=e.appendTo:ut(e.appendTo)&&(i=document.querySelector(e.appendTo)),Gr(i)||(i=document.body);const c=document.createElement("div"),d=te(Vue,a,io(a.message)?{default:()=>a.message}:null);return d.appContext=t??bs._context,d.props.onDestroy=()=>{jn(null,c)},jn(d,c),Yp[o].push({vm:d}),i.appendChild(c.firstElementChild),{close:()=>{d.component.exposed.visible.value=!1}}};Kx.forEach(e=>{bs[e]=(t={})=>((typeof t=="string"||io(t))&&(t={message:t}),bs({...t,type:e}))});function Hue(e,t,o){const r=Yp[t],l=r.findIndex(({vm:d})=>{var u;return((u=d.component)==null?void 0:u.props.id)===e});if(l===-1)return;const{vm:n}=r[l];if(!n)return;o==null||o(n);const a=n.el.offsetHeight,i=t.split("-")[0];r.splice(l,1);const c=r.length;if(!(c<1))for(let d=l;d{t.component.exposed.visible.value=!1})}bs.closeAll=Fue,bs._context=null;const jue=J3(bs,"$notify");var Kue=[Jce,rue,gue,zue,jue,Yy],Uue=SK([...Yce,...Kue]);const Wue={class:"list"},que={key:0,class:"title"},Yue=["onClick"],Gue={key:1,class:"no-found"},Xue=N({__name:"CpList",props:{listClass:{type:String,default:""},itemClass:{type:String,default:""},noFoundMsg:{type:String,default:""},search:{type:Boolean,default:!0},title:{type:String,default:""},list:{type:Array,default:()=>[]}},emits:["handleClick"],setup(e,{expose:t,emit:o}){const r=D(""),l=D(null),n=e,a=o,i=u=>{a("handleClick",u)},c=C(()=>r.value&&r.value?n.list.filter(u=>JSON.stringify(u).toLowerCase().includes(r.value.toLowerCase())):n.list),d=C(()=>n.list.length<5?90*n.list.length:400);return t({listContent:l}),(u,p)=>{const h=nt("Search"),v=nt("el-icon"),m=nt("el-input");return b(),M("div",Wue,[e.title?(b(),M("div",que,$e(e.title),1)):se("",!0),n.search?(b(),he(m,{key:1,placeholder:s(ht).search,modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=f=>r.value=f),clearable:"",onClear:p[1]||(p[1]=f=>r.value="")},{prepend:le(()=>[te(v,{size:25},{default:le(()=>[te(h)]),_:1})]),_:1},8,["placeholder","modelValue"])):se("",!0),E("ul",{ref_key:"listContent",ref:l,class:O(e.listClass),style:Je(`min-height: ${d.value}px`)},[c.value.length?(b(),M("div",{key:0,style:Je(`min-height: ${d.value}px`)},[(b(!0),M(Qe,null,It(c.value,(f,_)=>(b(),M("li",{key:_,class:O(e.itemClass),onClick:g=>i(f)},[be(u.$slots,"default",{item:f})],10,Yue))),128))],4)):(b(),M("div",Gue,$e(e.noFoundMsg),1))],6)])}}}),Zue={class:"content"},Jue={key:0,class:"title"},Que={class:"inner"},ede=N({__name:"CpModal",props:{title:{type:String,required:!1,default:""},class:{type:String,required:!1,default:""},show:{type:Boolean,required:!1,default:!0}},emits:["close"],setup(e,{emit:t}){const o=D(null),r=t,l=e,n=C(()=>{let a=l.show?"active":"";return l.class&&(a+=" "+l.class),a});return ft(()=>{o.value&&o.value.addEventListener("click",a=>{o.value==a.target&&r("close")})}),(a,i)=>(b(),M("div",{ref_key:"modal",ref:o,class:O(["modal",n.value])},[E("div",Zue,[e.title?(b(),M("div",Jue,$e(e.title),1)):se("",!0),E("div",Que,[be(a.$slots,"default")])])],2))}}),tde=(e,t)=>{const o=e.__vccOpts||e;for(const[r,l]of t)o[r]=l;return o},ode={},rde={class:"loading"},lde=[c9('',1)];function nde(e,t){return b(),M("div",rde,lde)}const ade=tde(ode,[["render",nde]]),ide={class:"inner"},sde=["href"],cde=N({__name:"CpContainer",setup(e){const t=D(null);zt("container",t);const o=D(null),r=C(()=>{let i=Ft.modal?"modal":"";return Ho.get.modal&&(i+=" active"),i});ft(()=>{o.value&&o.value.addEventListener("click",i=>{o.value==i.target&&Ho.set("modal",!1)})});const l=atob("Q3J5cHRvUGF5"),n=atob("UG93ZXJlZCBieQ=="),a=atob("aHR0cHM6Ly9iZXljYW5wcmVzcy5jb20vY3J5cHRvcGF5P3V0bV9zb3VyY2U9cHJvX3BsdWdpbiZ1dG1fbWVkaXVtPXBvd2VyZWRfYnk=");return(i,c)=>(b(),M("div",{ref_key:"app",ref:o,class:O(["app",r.value])},[E("div",{class:O(["container","theme-"+s(Ft).theme.mode]),ref_key:"container",ref:t},[E("div",ide,[be(i.$slots,"default")]),E("div",null,[E("span",null,$e(s(n)),1),E("a",{href:s(a),target:"_blank"},$e(s(l)),9,sde)])],2)],2))}});class ude{constructor(t){pf(this,"store");pf(this,"stableCoins",["USDT","USDC","DAI","BUSD","UST","TUSD"]);this.store=t}useDiscount(t){const o=this.store.payment.get.order.paymentCurrency.symbol,r=Ft.discountRates[o];return parseFloat((t-t*r/100).toFixed(6))}async currencyConverter(){const t=this.store.payment.get.order.amount,o=this.store.payment.get.order.currency,r=this.store.payment.get.order.paymentCurrency.symbol;if((o.toLocaleUpperCase()=="USD"||r.toLocaleUpperCase()=="USD")&&(this.stableCoins.includes(o.toLocaleUpperCase())||this.stableCoins.includes(r.toLocaleUpperCase())))return this.useDiscount(t);let l="https://min-api.cryptocompare.com/data/price";l=l+"?fsym="+o+"&tsyms="+r;const n=await fetch(l).then(a=>a.json());return n[r.toUpperCase()]?this.useDiscount(parseFloat(String(t*n[r.toUpperCase()]))):0}findReceiverFromAddresses(t){const o=Ft.addresses;if(!o)return fo("No addresses found in config").then(()=>{window.location.reload()}),"";const r=String((t==null?void 0:t.id)||(t==null?void 0:t.hexId));return o[r]??o[String(t==null?void 0:t.code)]}async init(t){const o=this.store.payment.get.order.amount,r=this.store.payment.get.order.currency,l=this.findReceiverFromAddresses(t),n=this.store.payment.get.order.paymentCurrency,a=await this.currencyConverter();return Promise.resolve({order:{amount:o,currency:r,paymentAmount:a,paymentCurrency:n},receiver:l,blockConfirmationCount:10})}createTransaction(){return Promise.resolve({success:!0,data:null,message:""})}paymentFinished(t){return Promise.resolve({success:t,data:null,message:""})}}class dde{constructor(t){pf(this,"store");this.store=t}async init(t){return await ho.get("init",{params:{order:this.store.payment.get.order,network:wi(t)}}).then(async function(o){const r=o.data.data;return o.data.success&&r.redirect?r.redirect=="reload"?window.location.reload():window.location.href=r.redirect:r}).catch(function(o){return o.response&&o.response.data||o})}async createTransaction(t){const o=this.store.payment.get.order,r=this.store.payment.get.network,l=o.paymentCurrency;return l.symbol==(r==null?void 0:r.nativeCurrency.symbol)?l.decimals=r==null?void 0:r.nativeCurrency.decimals:l.address&&(l.decimals=await new Un.assets.Token(l.address).getDecimals()),this.store.payment.setOrderParams({paymentCurrency:l}),await ho.post("create-transaction",{order:o,hash:t.getId(),dynamicData:Zs.getAll(),network:wi(r)}).then(n=>n.data).catch(n=>{let a=n.response.data||null;return a||(a={data:null,success:!1,message:n.message}),a})}async paymentFinished(t){const o=this.store.payment.get.order,r=this.store.payment.get.network,l=this.store.payment.get.transactionHash;return await ho.post("payment-finished",{hash:l,order:o,status:t,dynamicData:Zs.getAll(),network:wi(r)}).then(async n=>n.data).catch(async n=>{let a=n.response.data||null;return a||(a={data:null,success:!1,message:n.message}),a})}async currencyConverter(){return await new Promise(t=>{ho.get("/currency-converter",{params:{order:this.store.payment.get.order,network:wi(this.store.payment.get.network)}}).then(o=>{o.data.success?t(o.data.data):t(0)}).catch(()=>{t(0)})})}}const pde=[{id:1,hexId:"0x1",name:"Ethereum",code:"evmchains",rpcUrl:"https://ethereum-rpc.publicnode.com",explorerUrl:"https://etherscan.io/",nativeCurrency:{symbol:"ETH",decimals:18},currencies:[{symbol:"ETH"},{symbol:"USDT",address:"0xdac17f958d2ee523a2206206994597c13d831ec7"},{symbol:"USDC",address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},{symbol:"DAI",address:"0x6b175474e89094c44da98b954eedeac495271d0f"}]},{id:56,hexId:"0x38",name:"BNB Smart Chain",code:"evmchains",rpcUrl:"https://bsc-rpc.publicnode.com",explorerUrl:"https://bscscan.com/",nativeCurrency:{symbol:"BNB",decimals:18},currencies:[{symbol:"BNB"},{symbol:"USDT",address:"0x55d398326f99059ff775485246999027b3197955"},{symbol:"USDC",address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"},{symbol:"DAI",address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"}]},{id:43114,hexId:"0xa86a",name:"Avalanche C-Chain",code:"evmchains",rpcUrl:"https://api.avax.network/ext/bc/C/rpc",explorerUrl:"https://cchain.explorer.avax.network/",nativeCurrency:{symbol:"AVAX",decimals:18},currencies:[{symbol:"AVAX"},{symbol:"USDT",address:"0xde3a24028580884448a5397872046a019649b084"},{symbol:"USDC",address:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"},{symbol:"DAI",address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70"}]},{id:137,hexId:"0x89",name:"Polygon",code:"evmchains",rpcUrl:"https://polygon-rpc.com/",explorerUrl:"https://polygonscan.com/",nativeCurrency:{symbol:"POL",decimals:18},currencies:[{symbol:"POL"},{symbol:"USDT",address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},{symbol:"USDC",address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{symbol:"DAI",address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}]},{id:250,hexId:"0xfa",name:"Fantom",code:"evmchains",rpcUrl:"https://rpc.fantom.network",explorerUrl:"https://ftmscan.com/",nativeCurrency:{symbol:"FTM",decimals:18},currencies:[{symbol:"FTM"},{symbol:"DAI",address:"0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E"}]}],fde=[{id:11155111,hexId:"0xaa36a7",mainnetId:1,code:"evmchains",name:"Ethereum Sepolia Testnet",rpcUrl:"https://sepolia.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",explorerUrl:"https://sepolia.etherscan.io/",nativeCurrency:{symbol:"ETH",decimals:18},currencies:[{symbol:"ETH"},{symbol:"USDT",address:"0x419Fe9f14Ff3aA22e46ff1d03a73EdF3b70A62ED"},{symbol:"USDC",address:"0x13fA158A117b93C27c55b8216806294a0aE88b6D"}]},{id:97,hexId:"0x61",mainnetId:56,code:"evmchains",name:"BNB Smart Chain Testnet",rpcUrl:"https://bsc-testnet.publicnode.com",explorerUrl:"https://testnet.bscscan.com/",nativeCurrency:{symbol:"BNB",decimals:18},currencies:[{symbol:"BNB"},{symbol:"USDT",address:"0xba6670261a05b8504e8ab9c45d97a8ed42573822"}]},{id:43113,hexId:"0xa869",mainnetId:43114,code:"evmchains",name:"Avalanche FUJI C-Chain Testnet",rpcUrl:"https://api.avax-test.network/ext/bc/C/rpc",explorerUrl:"https://cchain.explorer.avax-test.network",nativeCurrency:{symbol:"AVAX",decimals:18},currencies:[{symbol:"AVAX"},{symbol:"USDT",address:"0xFe143522938e253e5Feef14DB0732e9d96221D72"}]},{id:80002,hexId:"0x13882",mainnetId:137,code:"evmchains",name:"Polygon Amoy Testnet",rpcUrl:"https://rpc-amoy.polygon.technology",explorerUrl:"https://www.oklink.com/amoy",nativeCurrency:{symbol:"POL",decimals:18},currencies:[{symbol:"POL"},{symbol:"USDT",address:"0xa02f6adc7926efebbd59fd43a84f4e0c0c91e832"}]},{id:4002,hexId:"0xfa2",mainnetId:250,code:"evmchains",name:"Fantom Testnet",rpcUrl:"https://rpc.testnet.fantom.network/",explorerUrl:"https://testnet.ftmscan.com/",nativeCurrency:{symbol:"FTM",decimals:18},currencies:[{symbol:"FTM"}]}];window.cplSwal=Er,window.cplHelpers=J1,window.cplTyping=ha;let Ux=!1;window.InitCryptoPayLite=(e,t)=>{var d;if(t=ha(t),Ux)throw new Error("CryptoPay Lite already initialized");xi(),Ux=!0,(d=document.querySelector("body"))==null||d.classList.add("cpl-theme-"+t.theme.mode),ho.defaults.baseURL=t.apiUrl??"./test-data/fake-api";const o={events:Vt,helpers:J1,dynamicData:Zs},r=oC();r.use(RS);const l=V1(NS);l.component("cp-list",Xue),l.component("cp-modal",ede),l.component("cp-loading",ade),l.component("cp-container",cde);for(const[u,p]of Object.entries(tF))l.component(u,p);l.use(r),l.use(Uue);const n={};Object.values(vC).forEach(u=>{const p=u();n[p.$id]=p}),hC(t),fC(n);const a=document.createElement("div");l.mount(a);const i=()=>new Promise(u=>{const p=Object.values(n);p.forEach(async(h,v)=>{await h.$reset(),v===p.length-1&&u(!0)})}),c=(u,p={})=>{if(typeof u!="object")throw new Error("Order must be object");if(typeof p!="object")throw new Error("Params must be object");if(!u.amount)throw new Error("Order amount is required");if(!u.currency)throw new Error("Order currency is required");if(typeof u.currency!="string")throw new Error("Order currency must be string");if(typeof u.amount!="number")throw new Error("Order amount must be number");o!=null&&o.start&&delete o.start,ho.defaults.params={params:p,cp_addon:t.addon};const h=(t.testnet?fde:pde).filter(x=>(x.wallets=t.wallets,t.networks.includes(x.id)));if(n.config.set("order",un(u)),n.config.set("networks",un(h)),t.init&&n.payment.setInit(un(t.init)),t.apiUrl)n.payment.setAPI(new dde(n));else{if(!t.addresses)throw new Error("Addresses must be defined in config");n.payment.setAPI(new ude(n))}const v=document.getElementById(e);let m;v!=null&&v.shadowRoot?m=v.shadowRoot:m=v==null?void 0:v.attachShadow({mode:"open"});const f=new CSSStyleSheet,_=t.theme.style[t.theme.mode],g=` :host { --text-color: ${_.text}; --border-color: ${_.border}; @@ -158,4 +158,4 @@ https://sweetalert2.github.io/#ajax-request`),Ipe(q),typeof q.title=="string"&&( --button-background-color: ${_.button.background}; --button-hover-background-color: ${_.button.hoverBackground}; } - `,y=E5+Gl(T5);return f.replace(y+g+S5),m==null||m.adoptedStyleSheets.push(f),m!=null&&(m.innerHTML="",m.appendChild(a),n.config.set("started",!0)),{store:n,reStart:async(x,$={})=>{await i(),c(x,$)}}};return o.start=c,t.modal&&(o.modal={open:()=>{Vt.call("modalOpened"),n.config.set("modal",!0)},close:()=>{Vt.call("modalClosed"),n.config.set("modal",!1)}}),o}}); + `,y=S5+Gl(E5);return f.replace(y+g+C5),m==null||m.adoptedStyleSheets.push(f),m!=null&&(m.innerHTML="",m.appendChild(a),n.config.set("started",!0)),{store:n,reStart:async(x,$={})=>{await i(),c(x,$)}}};return o.start=c,t.modal&&(o.modal={open:()=>{Vt.call("modalOpened"),n.config.set("modal",!0)},close:()=>{Vt.call("modalClosed"),n.config.set("modal",!1)}}),o}}); diff --git a/assets/js/evm-chains-provider.js b/assets/js/evm-chains-provider.js index b0e425c..4d98d9c 100644 --- a/assets/js/evm-chains-provider.js +++ b/assets/js/evm-chains-provider.js @@ -1,37 +1,54 @@ -var wot=Object.defineProperty;var vot=(Kr,wn,vn)=>wn in Kr?wot(Kr,wn,{enumerable:!0,configurable:!0,writable:!0,value:vn}):Kr[wn]=vn;var Ee=(Kr,wn,vn)=>(vot(Kr,typeof wn!="symbol"?wn+"":wn,vn),vn),WG=(Kr,wn,vn)=>{if(!wn.has(Kr))throw TypeError("Cannot "+vn)};var oe=(Kr,wn,vn)=>(WG(Kr,wn,"read from private field"),vn?vn.call(Kr):wn.get(Kr)),Ne=(Kr,wn,vn)=>{if(wn.has(Kr))throw TypeError("Cannot add the same private member more than once");wn instanceof WeakSet?wn.add(Kr):wn.set(Kr,vn)},me=(Kr,wn,vn,Jn)=>(WG(Kr,wn,"write to private field"),Jn?Jn.call(Kr,vn):wn.set(Kr,vn),vn),S5=(Kr,wn,vn,Jn)=>({set _(kr){me(Kr,wn,kr,vn)},get _(){return oe(Kr,wn,Jn)}}),rt=(Kr,wn,vn)=>(WG(Kr,wn,"access private method"),vn);(function(Kr,wn){typeof exports=="object"&&typeof module<"u"?wn(exports):typeof define=="function"&&define.amd?define(["exports"],wn):(Kr=typeof globalThis<"u"?globalThis:Kr||self,wn((Kr.MultipleChain=Kr.MultipleChain||{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TIMEOUT",r.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",r.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",r.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",r.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",r.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",r.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",r.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",r.INVALID_AMOUNT="INVALID_AMOUNT",r.INVALID_ADDRESS="INVALID_ADDRESS",r.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",r.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",r.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",r.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",r.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",r.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",r.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",r.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",r.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",r.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",r.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",r.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",r.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",r.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",r.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",r.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",r.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",r))(kr||{}),Po=(r=>(r.BROWSER="BROWSER",r.MOBILE="MOBILE",r.DESKTOP="DESKTOP",r.UNIVERSAL="UNIVERSAL",r))(Po||{});const lK={[vn.GENERAL]:"generalProcess",[vn.CONTRACT]:"contractProcess",[vn.COIN]:"coinProcess",[vn.TOKEN]:"tokenProcess",[vn.NFT]:"nftProcess"},Tge=Object.freeze(Object.defineProperty({__proto__:null,AssetDirectionEnum:wn,ErrorTypeEnum:kr,TransactionListenerProcessIndex:lK,TransactionStatusEnum:Jn,TransactionTypeEnum:vn,WalletPlatformEnum:Po},Symbol.toStringTag,{value:"Module"})),dr=globalThis||void 0||self;function uK(r,e){return function(){return r.apply(e,arguments)}}const{toString:Rge}=Object.prototype,{getPrototypeOf:dR}=Object,y_=(r=>e=>{const t=Rge.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ph=r=>(r=r.toLowerCase(),e=>y_(e)===r),x_=r=>e=>typeof e===r,{isArray:yw}=Array,R5=x_("undefined");function kge(r){return r!==null&&!R5(r)&&r.constructor!==null&&!R5(r.constructor)&&El(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const hK=Ph("ArrayBuffer");function Mge(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&hK(r.buffer),e}const Nge=x_("string"),El=x_("function"),fK=x_("number"),__=r=>r!==null&&typeof r=="object",Pge=r=>r===!0||r===!1,E_=r=>{if(y_(r)!=="object")return!1;const e=dR(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Oge=Ph("Date"),Dge=Ph("File"),$ge=Ph("Blob"),Bge=Ph("FileList"),Lge=r=>__(r)&&El(r.pipe),Uge=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||El(r.append)&&((e=y_(r))==="formdata"||e==="object"&&El(r.toString)&&r.toString()==="[object FormData]"))},Fge=Ph("URLSearchParams"),jge=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function k5(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),yw(r))for(n=0,i=r.length;n0;)if(i=t[n],e===i.toLowerCase())return i;return null}const pK=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:dr)(),gK=r=>!R5(r)&&r!==pK;function pR(){const{caseless:r}=gK(this)&&this||{},e={},t=(n,i)=>{const s=r&&dK(e,i)||i;E_(e[s])&&E_(n)?e[s]=pR(e[s],n):E_(n)?e[s]=pR({},n):yw(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n(k5(e,(i,s)=>{t&&El(i)?r[s]=uK(i,t):r[s]=i},{allOwnKeys:n}),r),Hge=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),qge=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},Wge=(r,e,t,n)=>{let i,s,o;const a={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)o=i[s],(!n||n(o,r,e))&&!a[o]&&(e[o]=r[o],a[o]=!0);r=t!==!1&&dR(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},Vge=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},Gge=r=>{if(!r)return null;if(yw(r))return r;let e=r.length;if(!fK(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},Kge=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&dR(Uint8Array)),Zge=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},Jge=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},Yge=Ph("HTMLFormElement"),Qge=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),mK=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Xge=Ph("RegExp"),bK=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};k5(t,(i,s)=>{let o;(o=e(i,s,r))!==!1&&(n[s]=o||i)}),Object.defineProperties(r,n)},eme=r=>{bK(r,(e,t)=>{if(El(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(El(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},tme=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return yw(r)?n(r):n(String(r).split(e)),t},rme=()=>{},nme=(r,e)=>(r=+r,Number.isFinite(r)?r:e),gR="abcdefghijklmnopqrstuvwxyz",wK="0123456789",vK={DIGIT:wK,ALPHA:gR,ALPHA_DIGIT:gR+gR.toUpperCase()+wK},ime=(r=16,e=vK.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function sme(r){return!!(r&&El(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const ome=r=>{const e=new Array(10),t=(n,i)=>{if(__(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=yw(n)?[]:{};return k5(n,(o,a)=>{const l=t(o,i+1);!R5(l)&&(s[a]=l)}),e[i]=void 0,s}}return n};return t(r,0)},ame=Ph("AsyncFunction"),nt={isArray:yw,isArrayBuffer:hK,isBuffer:kge,isFormData:Uge,isArrayBufferView:Mge,isString:Nge,isNumber:fK,isBoolean:Pge,isObject:__,isPlainObject:E_,isUndefined:R5,isDate:Oge,isFile:Dge,isBlob:$ge,isRegExp:Xge,isFunction:El,isStream:Lge,isURLSearchParams:Fge,isTypedArray:Kge,isFileList:Bge,forEach:k5,merge:pR,extend:zge,trim:jge,stripBOM:Hge,inherits:qge,toFlatObject:Wge,kindOf:y_,kindOfTest:Ph,endsWith:Vge,toArray:Gge,forEachEntry:Zge,matchAll:Jge,isHTMLForm:Yge,hasOwnProperty:mK,hasOwnProp:mK,reduceDescriptors:bK,freezeMethods:eme,toObjectSet:tme,toCamelCase:Qge,noop:rme,toFiniteNumber:nme,findKey:dK,global:pK,isContextDefined:gK,ALPHABET:vK,generateString:ime,isSpecCompliantForm:sme,toJSONObject:ome,isAsyncFn:ame,isThenable:r=>r&&(__(r)||El(r))&&El(r.then)&&El(r.catch)};var Hs={},A_={};A_.byteLength=ume,A_.toByteArray=fme,A_.fromByteArray=gme;for(var Oh=[],Al=[],cme=typeof Uint8Array<"u"?Uint8Array:Array,mR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xw=0,lme=mR.length;xw0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function ume(r){var e=yK(r),t=e[0],n=e[1];return(t+n)*3/4-n}function hme(r,e,t){return(e+t)*3/4-t}function fme(r){var e,t=yK(r),n=t[0],i=t[1],s=new cme(hme(r,n,i)),o=0,a=i>0?n-4:n,l;for(l=0;l>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Al[r.charCodeAt(l)]<<2|Al[r.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=Al[r.charCodeAt(l)]<<10|Al[r.charCodeAt(l+1)]<<4|Al[r.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function dme(r){return Oh[r>>18&63]+Oh[r>>12&63]+Oh[r>>6&63]+Oh[r&63]}function pme(r,e,t){for(var n,i=[],s=e;sa?a:o+s));return n===1?(e=r[t-1],i.push(Oh[e>>2]+Oh[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(Oh[e>>10]+Oh[e>>4&63]+Oh[e<<2&63]+"=")),i.join("")}var bR={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */bR.read=function(r,e,t,n,i){var s,o,a=i*8-n-1,l=(1<>1,h=-7,p=t?i-1:0,g=t?-1:1,w=r[e+p];for(p+=g,s=w&(1<<-h)-1,w>>=-h,h+=a;h>0;s=s*256+r[e+p],p+=g,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+r[e+p],p+=g,h-=8);if(s===0)s=1-u;else{if(s===l)return o?NaN:(w?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(w?-1:1)*o*Math.pow(2,s-n)},bR.write=function(r,e,t,n,i,s){var o,a,l,u=s*8-i-1,h=(1<>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,y=n?1:-1,C=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+p>=1?e+=g/l:e+=g*Math.pow(2,1-p),e*l>=2&&(o++,l/=2),o+p>=h?(a=0,o=h):o+p>=1?(a=(e*l-1)*Math.pow(2,i),o=o+p):(a=e*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;r[t+w]=a&255,w+=y,a/=256,i-=8);for(o=o<0;r[t+w]=o&255,w+=y,o/=256,u-=8);r[t+w-y]|=C*128};/*! +(function(qr,yn){typeof exports=="object"&&typeof module<"u"?yn(exports):typeof define=="function"&&define.amd?define(["exports"],yn):(qr=typeof globalThis<"u"?globalThis:qr||self,yn((qr.MultipleChain=qr.MultipleChain||{},qr.MultipleChain.EvmChains={})))})(this,function(qr){"use strict";var Agt=Object.defineProperty;var Eve=qr=>{throw TypeError(qr)};var Sgt=(qr,yn,En)=>yn in qr?Agt(qr,yn,{enumerable:!0,configurable:!0,writable:!0,value:En}):qr[yn]=En;var Ae=(qr,yn,En)=>Sgt(qr,typeof yn!="symbol"?yn+"":yn,En),pJ=(qr,yn,En)=>yn.has(qr)||Eve("Cannot "+En);var se=(qr,yn,En)=>(pJ(qr,yn,"read from private field"),En?En.call(qr):yn.get(qr)),$e=(qr,yn,En)=>yn.has(qr)?Eve("Cannot add the same private member more than once"):yn instanceof WeakSet?yn.add(qr):yn.set(qr,En),ge=(qr,yn,En,Yn)=>(pJ(qr,yn,"write to private field"),Yn?Yn.call(qr,En):yn.set(qr,En),En),nt=(qr,yn,En)=>(pJ(qr,yn,"access private method"),En);var P4=(qr,yn,En,Yn)=>({set _(Or){ge(qr,yn,Or,En)},get _(){return se(qr,yn,Yn)}});var O5,w2,_m,N5,D5,kf,K0,$5,B5,Fa,bl,Z0,y2,x2,_2,uh,Rf,Em,E2,EE,Q7,X7,e9,vl,L5,C2,Mf,yi,Xo,ti,uw,Yp,mJ,gJ,bJ,vJ,U5,J0,A2,j5,zR,Uc,wl,S2,I2,Am,T2,wJ,Ave,z5,H5,q5,k2,Fc,Y0,fh,R2,dh,W5,V5,G5,K5,Z5,J5,Y5,Q5,X5,e4,t4,M2,Sm,X0,Im,r4,HR,Pu,t9,ep,n4,$R,Ive,so,Pf,r9,yJ,i4,qR,Tm,O4,hh,ph,mh,Po,gh,WR,VR,tp,n9,km,s4,i9,s9,uve,Rm,O2,Mm,N4,UR,Tve,N2,o9,c9,o4,c4,Pm,rp,Du,Om,bh,u4,GR,D2,$2,Nm,f4,np,FR,d4,ip,h4,p4,Dm,$u,jR,kve,Oo,$m,No,m4,yl,B2,Bm,sp,l9,Bu,g4,b4,hn,$l,xJ,_J,CE,EJ,AE,KR,v4,ZR,ec,vh,L2,Lm,U2,w4,Um,CJ,AJ,F2,j2,y4,ap,wh,Of,Lu,jc,u9,SJ,Fm,x4,fve,_4,yh,f9,jm,z2,zm,d9,H2,E4,Hm,q2,Nf,zc,op,C4,Hc,Rve,IJ,Mve,Pve,TJ,qm,W2,A4,S4,I4,h9,V2,p9,kJ,m9,RJ,G2,SE,g9,xh,MJ,b9,dve,hve,pve,mve,gve,bve,vve,wve,yve,xve,_ve;var yn=(r=>(r.INCOMING="INCOMING",r.OUTGOING="OUTGOING",r))(yn||{}),En=(r=>(r.GENERAL="GENERAL",r.CONTRACT="CONTRACT",r.COIN="COIN",r.TOKEN="TOKEN",r.NFT="NFT",r))(En||{}),Yn=(r=>(r.FAILED="FAILED",r.PENDING="PENDING",r.CONFIRMED="CONFIRMED",r))(Yn||{}),Or=(r=>(r.RPC_TIMEOUT="RPC_TIMEOUT",r.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",r.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",r.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",r.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",r.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",r.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",r.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",r.INVALID_AMOUNT="INVALID_AMOUNT",r.INVALID_ADDRESS="INVALID_ADDRESS",r.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",r.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",r.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",r.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",r.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",r.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",r.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",r.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",r.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",r.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",r.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",r.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",r.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",r.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",r.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",r.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",r.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",r))(Or||{}),za=(r=>(r.BROWSER="BROWSER",r.MOBILE="MOBILE",r.DESKTOP="DESKTOP",r.UNIVERSAL="UNIVERSAL",r))(za||{});const PJ={[En.GENERAL]:"generalProcess",[En.CONTRACT]:"contractProcess",[En.COIN]:"coinProcess",[En.TOKEN]:"tokenProcess",[En.NFT]:"nftProcess"},qve=Object.freeze(Object.defineProperty({__proto__:null,AssetDirectionEnum:yn,ErrorTypeEnum:Or,TransactionListenerProcessIndex:PJ,TransactionStatusEnum:Yn,TransactionTypeEnum:En,WalletPlatformEnum:za},Symbol.toStringTag,{value:"Module"})),sr=globalThis||void 0||self;function OJ(r,e){return function(){return r.apply(e,arguments)}}const{toString:Wve}=Object.prototype,{getPrototypeOf:JR}=Object,IE=(r=>e=>{const t=Wve.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Qf=r=>(r=r.toLowerCase(),e=>IE(e)===r),TE=r=>e=>typeof e===r,{isArray:fw}=Array,D4=TE("undefined");function Vve(r){return r!==null&&!D4(r)&&r.constructor!==null&&!D4(r.constructor)&&Bl(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const NJ=Qf("ArrayBuffer");function Gve(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&NJ(r.buffer),e}const Kve=TE("string"),Bl=TE("function"),DJ=TE("number"),kE=r=>r!==null&&typeof r=="object",Zve=r=>r===!0||r===!1,RE=r=>{if(IE(r)!=="object")return!1;const e=JR(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Jve=Qf("Date"),Yve=Qf("File"),Qve=Qf("Blob"),Xve=Qf("FileList"),ewe=r=>kE(r)&&Bl(r.pipe),twe=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Bl(r.append)&&((e=IE(r))==="formdata"||e==="object"&&Bl(r.toString)&&r.toString()==="[object FormData]"))},rwe=Qf("URLSearchParams"),nwe=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $4(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),fw(r))for(n=0,i=r.length;n0;)if(i=t[n],e===i.toLowerCase())return i;return null}const BJ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:sr,LJ=r=>!D4(r)&&r!==BJ;function YR(){const{caseless:r}=LJ(this)&&this||{},e={},t=(n,i)=>{const s=r&&$J(e,i)||i;RE(e[s])&&RE(n)?e[s]=YR(e[s],n):RE(n)?e[s]=YR({},n):fw(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n($4(e,(i,s)=>{t&&Bl(i)?r[s]=OJ(i,t):r[s]=i},{allOwnKeys:n}),r),swe=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),awe=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},owe=(r,e,t,n)=>{let i,s,a;const o={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,e))&&!o[a]&&(e[a]=r[a],o[a]=!0);r=t!==!1&&JR(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},cwe=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},lwe=r=>{if(!r)return null;if(fw(r))return r;let e=r.length;if(!DJ(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},uwe=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&JR(Uint8Array)),fwe=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},dwe=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},hwe=Qf("HTMLFormElement"),pwe=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),UJ=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),mwe=Qf("RegExp"),FJ=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};$4(t,(i,s)=>{let a;(a=e(i,s,r))!==!1&&(n[s]=a||i)}),Object.defineProperties(r,n)},gwe=r=>{FJ(r,(e,t)=>{if(Bl(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(Bl(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},bwe=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return fw(r)?n(r):n(String(r).split(e)),t},vwe=()=>{},wwe=(r,e)=>(r=+r,Number.isFinite(r)?r:e),QR="abcdefghijklmnopqrstuvwxyz",jJ="0123456789",zJ={DIGIT:jJ,ALPHA:QR,ALPHA_DIGIT:QR+QR.toUpperCase()+jJ},ywe=(r=16,e=zJ.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function xwe(r){return!!(r&&Bl(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const _we=r=>{const e=new Array(10),t=(n,i)=>{if(kE(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=fw(n)?[]:{};return $4(n,(a,o)=>{const l=t(a,i+1);!D4(l)&&(s[o]=l)}),e[i]=void 0,s}}return n};return t(r,0)},Ewe=Qf("AsyncFunction"),ct={isArray:fw,isArrayBuffer:NJ,isBuffer:Vve,isFormData:twe,isArrayBufferView:Gve,isString:Kve,isNumber:DJ,isBoolean:Zve,isObject:kE,isPlainObject:RE,isUndefined:D4,isDate:Jve,isFile:Yve,isBlob:Qve,isRegExp:mwe,isFunction:Bl,isStream:ewe,isURLSearchParams:rwe,isTypedArray:uwe,isFileList:Xve,forEach:$4,merge:YR,extend:iwe,trim:nwe,stripBOM:swe,inherits:awe,toFlatObject:owe,kindOf:IE,kindOfTest:Qf,endsWith:cwe,toArray:lwe,forEachEntry:fwe,matchAll:dwe,isHTMLForm:hwe,hasOwnProperty:UJ,hasOwnProp:UJ,reduceDescriptors:FJ,freezeMethods:gwe,toObjectSet:bwe,toCamelCase:pwe,noop:vwe,toFiniteNumber:wwe,findKey:$J,global:BJ,isContextDefined:LJ,ALPHABET:zJ,generateString:ywe,isSpecCompliantForm:xwe,toJSONObject:_we,isAsyncFn:Ewe,isThenable:r=>r&&(kE(r)||Bl(r))&&Bl(r.then)&&Bl(r.catch)};var Ks={},ME={};ME.byteLength=Swe,ME.toByteArray=Twe,ME.fromByteArray=Mwe;for(var Xf=[],Ll=[],Cwe=typeof Uint8Array<"u"?Uint8Array:Array,XR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dw=0,Awe=XR.length;dw0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function Swe(r){var e=HJ(r),t=e[0],n=e[1];return(t+n)*3/4-n}function Iwe(r,e,t){return(e+t)*3/4-t}function Twe(r){var e,t=HJ(r),n=t[0],i=t[1],s=new Cwe(Iwe(r,n,i)),a=0,o=i>0?n-4:n,l;for(l=0;l>16&255,s[a++]=e>>8&255,s[a++]=e&255;return i===2&&(e=Ll[r.charCodeAt(l)]<<2|Ll[r.charCodeAt(l+1)]>>4,s[a++]=e&255),i===1&&(e=Ll[r.charCodeAt(l)]<<10|Ll[r.charCodeAt(l+1)]<<4|Ll[r.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function kwe(r){return Xf[r>>18&63]+Xf[r>>12&63]+Xf[r>>6&63]+Xf[r&63]}function Rwe(r,e,t){for(var n,i=[],s=e;so?o:a+s));return n===1?(e=r[t-1],i.push(Xf[e>>2]+Xf[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(Xf[e>>10]+Xf[e>>4&63]+Xf[e<<2&63]+"=")),i.join("")}var eM={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */eM.read=function(r,e,t,n,i){var s,a,o=i*8-n-1,l=(1<>1,f=-7,h=t?i-1:0,m=t?-1:1,b=r[e+h];for(h+=m,s=b&(1<<-f)-1,b>>=-f,f+=o;f>0;s=s*256+r[e+h],h+=m,f-=8);for(a=s&(1<<-f)-1,s>>=-f,f+=n;f>0;a=a*256+r[e+h],h+=m,f-=8);if(s===0)s=1-u;else{if(s===l)return a?NaN:(b?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-u}return(b?-1:1)*a*Math.pow(2,s-n)},eM.write=function(r,e,t,n,i,s){var a,o,l,u=s*8-i-1,f=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:s-1,v=n?1:-1,C=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?e+=m/l:e+=m*Math.pow(2,1-h),e*l>=2&&(a++,l/=2),a+h>=f?(o=0,a=f):a+h>=1?(o=(e*l-1)*Math.pow(2,i),a=a+h):(o=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;r[t+b]=o&255,b+=v,o/=256,i-=8);for(a=a<0;r[t+b]=a&255,b+=v,a/=256,u-=8);r[t+b-v]|=C*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(r){const e=A_,t=bR,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=h,r.SlowBuffer=z,r.INSPECT_MAX_BYTES=50;const i=2147483647;r.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;h.TYPED_ARRAY_SUPPORT=l(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const se=new s(1),J={foo:function(){return 42}};return Object.setPrototypeOf(J,s.prototype),Object.setPrototypeOf(se,J),se.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function u(se){if(se>i)throw new RangeError('The value "'+se+'" is invalid for option "size"');const J=new s(se);return Object.setPrototypeOf(J,h.prototype),J}function h(se,J,X){if(typeof se=="number"){if(typeof J=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(se)}return p(se,J,X)}h.poolSize=8192;function p(se,J,X){if(typeof se=="string")return C(se,J);if(o.isView(se))return k(se);if(se==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se);if(Ve(se,o)||se&&Ve(se.buffer,o)||typeof a<"u"&&(Ve(se,a)||se&&Ve(se.buffer,a)))return N(se,J,X);if(typeof se=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ue=se.valueOf&&se.valueOf();if(ue!=null&&ue!==se)return h.from(ue,J,X);const we=O(se);if(we)return we;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof se[Symbol.toPrimitive]=="function")return h.from(se[Symbol.toPrimitive]("string"),J,X);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se)}h.from=function(se,J,X){return p(se,J,X)},Object.setPrototypeOf(h.prototype,s.prototype),Object.setPrototypeOf(h,s);function g(se){if(typeof se!="number")throw new TypeError('"size" argument must be of type number');if(se<0)throw new RangeError('The value "'+se+'" is invalid for option "size"')}function w(se,J,X){return g(se),se<=0?u(se):J!==void 0?typeof X=="string"?u(se).fill(J,X):u(se).fill(J):u(se)}h.alloc=function(se,J,X){return w(se,J,X)};function y(se){return g(se),u(se<0?0:B(se)|0)}h.allocUnsafe=function(se){return y(se)},h.allocUnsafeSlow=function(se){return y(se)};function C(se,J){if((typeof J!="string"||J==="")&&(J="utf8"),!h.isEncoding(J))throw new TypeError("Unknown encoding: "+J);const X=G(se,J)|0;let ue=u(X);const we=ue.write(se,J);return we!==X&&(ue=ue.slice(0,we)),ue}function T(se){const J=se.length<0?0:B(se.length)|0,X=u(J);for(let ue=0;ue=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return se|0}function z(se){return+se!=se&&(se=0),h.alloc(+se)}h.isBuffer=function(J){return J!=null&&J._isBuffer===!0&&J!==h.prototype},h.compare=function(J,X){if(Ve(J,s)&&(J=h.from(J,J.offset,J.byteLength)),Ve(X,s)&&(X=h.from(X,X.offset,X.byteLength)),!h.isBuffer(J)||!h.isBuffer(X))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(J===X)return 0;let ue=J.length,we=X.length;for(let ye=0,Ie=Math.min(ue,we);yewe.length?(h.isBuffer(Ie)||(Ie=h.from(Ie)),Ie.copy(we,ye)):s.prototype.set.call(we,Ie,ye);else if(h.isBuffer(Ie))Ie.copy(we,ye);else throw new TypeError('"list" argument must be an Array of Buffers');ye+=Ie.length}return we};function G(se,J){if(h.isBuffer(se))return se.length;if(o.isView(se)||Ve(se,o))return se.byteLength;if(typeof se!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof se);const X=se.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&X===0)return 0;let we=!1;for(;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return je(se).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return ze(se).length;default:if(we)return ue?-1:je(se).length;J=(""+J).toLowerCase(),we=!0}}h.byteLength=G;function $(se,J,X){let ue=!1;if((J===void 0||J<0)&&(J=0),J>this.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0,J>>>=0,X<=J))return"";for(se||(se="utf8");;)switch(se){case"hex":return _(this,J,X);case"utf8":case"utf-8":return A(this,J,X);case"ascii":return S(this,J,X);case"latin1":case"binary":return E(this,J,X);case"base64":return x(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,J,X);default:if(ue)throw new TypeError("Unknown encoding: "+se);se=(se+"").toLowerCase(),ue=!0}}h.prototype._isBuffer=!0;function D(se,J,X){const ue=se[J];se[J]=se[X],se[X]=ue}h.prototype.swap16=function(){const J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let X=0;XX&&(J+=" ... "),""},n&&(h.prototype[n]=h.prototype.inspect),h.prototype.compare=function(J,X,ue,we,ye){if(Ve(J,s)&&(J=h.from(J,J.offset,J.byteLength)),!h.isBuffer(J))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof J);if(X===void 0&&(X=0),ue===void 0&&(ue=J?J.length:0),we===void 0&&(we=0),ye===void 0&&(ye=this.length),X<0||ue>J.length||we<0||ye>this.length)throw new RangeError("out of range index");if(we>=ye&&X>=ue)return 0;if(we>=ye)return-1;if(X>=ue)return 1;if(X>>>=0,ue>>>=0,we>>>=0,ye>>>=0,this===J)return 0;let Ie=ye-we,it=ue-X;const ot=Math.min(Ie,it),tt=this.slice(we,ye),It=J.slice(X,ue);for(let st=0;st2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,He(X)&&(X=we?0:se.length-1),X<0&&(X=se.length+X),X>=se.length){if(we)return-1;X=se.length-1}else if(X<0)if(we)X=0;else return-1;if(typeof J=="string"&&(J=h.from(J,ue)),h.isBuffer(J))return J.length===0?-1:Q(se,J,X,ue,we);if(typeof J=="number")return J=J&255,typeof s.prototype.indexOf=="function"?we?s.prototype.indexOf.call(se,J,X):s.prototype.lastIndexOf.call(se,J,X):Q(se,[J],X,ue,we);throw new TypeError("val must be string, number or Buffer")}function Q(se,J,X,ue,we){let ye=1,Ie=se.length,it=J.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(se.length<2||J.length<2)return-1;ye=2,Ie/=2,it/=2,X/=2}function ot(It,st){return ye===1?It[st]:It.readUInt16BE(st*ye)}let tt;if(we){let It=-1;for(tt=X;ttIe&&(X=Ie-it),tt=X;tt>=0;tt--){let It=!0;for(let st=0;stwe&&(ue=we)):ue=we;const ye=J.length;ue>ye/2&&(ue=ye/2);let Ie;for(Ie=0;Ie>>0,isFinite(ue)?(ue=ue>>>0,we===void 0&&(we="utf8")):(we=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ye=this.length-X;if((ue===void 0||ue>ye)&&(ue=ye),J.length>0&&(ue<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let Ie=!1;for(;;)switch(we){case"hex":return F(this,J,X,ue);case"utf8":case"utf-8":return M(this,J,X,ue);case"ascii":case"latin1":case"binary":return b(this,J,X,ue);case"base64":return d(this,J,X,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,J,X,ue);default:if(Ie)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Ie=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(se,J,X){return J===0&&X===se.length?e.fromByteArray(se):e.fromByteArray(se.slice(J,X))}function A(se,J,X){X=Math.min(se.length,X);const ue=[];let we=J;for(;we239?4:ye>223?3:ye>191?2:1;if(we+it<=X){let ot,tt,It,st;switch(it){case 1:ye<128&&(Ie=ye);break;case 2:ot=se[we+1],(ot&192)===128&&(st=(ye&31)<<6|ot&63,st>127&&(Ie=st));break;case 3:ot=se[we+1],tt=se[we+2],(ot&192)===128&&(tt&192)===128&&(st=(ye&15)<<12|(ot&63)<<6|tt&63,st>2047&&(st<55296||st>57343)&&(Ie=st));break;case 4:ot=se[we+1],tt=se[we+2],It=se[we+3],(ot&192)===128&&(tt&192)===128&&(It&192)===128&&(st=(ye&15)<<18|(ot&63)<<12|(tt&63)<<6|It&63,st>65535&&st<1114112&&(Ie=st))}}Ie===null?(Ie=65533,it=1):Ie>65535&&(Ie-=65536,ue.push(Ie>>>10&1023|55296),Ie=56320|Ie&1023),ue.push(Ie),we+=it}return R(ue)}const I=4096;function R(se){const J=se.length;if(J<=I)return String.fromCharCode.apply(String,se);let X="",ue=0;for(;ueue)&&(X=ue);let we="";for(let ye=J;yeue&&(J=ue),X<0?(X+=ue,X<0&&(X=0)):X>ue&&(X=ue),XX)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(J,X,ue){J=J>>>0,X=X>>>0,ue||ie(J,X,this.length);let we=this[J],ye=1,Ie=0;for(;++Ie>>0,X=X>>>0,ue||ie(J,X,this.length);let we=this[J+--X],ye=1;for(;X>0&&(ye*=256);)we+=this[J+--X]*ye;return we},h.prototype.readUint8=h.prototype.readUInt8=function(J,X){return J=J>>>0,X||ie(J,1,this.length),this[J]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(J,X){return J=J>>>0,X||ie(J,2,this.length),this[J]|this[J+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(J,X){return J=J>>>0,X||ie(J,2,this.length),this[J]<<8|this[J+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(J,X){return J=J>>>0,X||ie(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(J,X){return J=J>>>0,X||ie(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},h.prototype.readBigUInt64LE=Ge(function(J){J=J>>>0,Me(J,"offset");const X=this[J],ue=this[J+7];(X===void 0||ue===void 0)&&ke(J,this.length-8);const we=X+this[++J]*2**8+this[++J]*2**16+this[++J]*2**24,ye=this[++J]+this[++J]*2**8+this[++J]*2**16+ue*2**24;return BigInt(we)+(BigInt(ye)<>>0,Me(J,"offset");const X=this[J],ue=this[J+7];(X===void 0||ue===void 0)&&ke(J,this.length-8);const we=X*2**24+this[++J]*2**16+this[++J]*2**8+this[++J],ye=this[++J]*2**24+this[++J]*2**16+this[++J]*2**8+ue;return(BigInt(we)<>>0,X=X>>>0,ue||ie(J,X,this.length);let we=this[J],ye=1,Ie=0;for(;++Ie=ye&&(we-=Math.pow(2,8*X)),we},h.prototype.readIntBE=function(J,X,ue){J=J>>>0,X=X>>>0,ue||ie(J,X,this.length);let we=X,ye=1,Ie=this[J+--we];for(;we>0&&(ye*=256);)Ie+=this[J+--we]*ye;return ye*=128,Ie>=ye&&(Ie-=Math.pow(2,8*X)),Ie},h.prototype.readInt8=function(J,X){return J=J>>>0,X||ie(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},h.prototype.readInt16LE=function(J,X){J=J>>>0,X||ie(J,2,this.length);const ue=this[J]|this[J+1]<<8;return ue&32768?ue|4294901760:ue},h.prototype.readInt16BE=function(J,X){J=J>>>0,X||ie(J,2,this.length);const ue=this[J+1]|this[J]<<8;return ue&32768?ue|4294901760:ue},h.prototype.readInt32LE=function(J,X){return J=J>>>0,X||ie(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},h.prototype.readInt32BE=function(J,X){return J=J>>>0,X||ie(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},h.prototype.readBigInt64LE=Ge(function(J){J=J>>>0,Me(J,"offset");const X=this[J],ue=this[J+7];(X===void 0||ue===void 0)&&ke(J,this.length-8);const we=this[J+4]+this[J+5]*2**8+this[J+6]*2**16+(ue<<24);return(BigInt(we)<>>0,Me(J,"offset");const X=this[J],ue=this[J+7];(X===void 0||ue===void 0)&&ke(J,this.length-8);const we=(X<<24)+this[++J]*2**16+this[++J]*2**8+this[++J];return(BigInt(we)<>>0,X||ie(J,4,this.length),t.read(this,J,!0,23,4)},h.prototype.readFloatBE=function(J,X){return J=J>>>0,X||ie(J,4,this.length),t.read(this,J,!1,23,4)},h.prototype.readDoubleLE=function(J,X){return J=J>>>0,X||ie(J,8,this.length),t.read(this,J,!0,52,8)},h.prototype.readDoubleBE=function(J,X){return J=J>>>0,X||ie(J,8,this.length),t.read(this,J,!1,52,8)};function q(se,J,X,ue,we,ye){if(!h.isBuffer(se))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>we||Jse.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(J,X,ue,we){if(J=+J,X=X>>>0,ue=ue>>>0,!we){const it=Math.pow(2,8*ue)-1;q(this,J,X,ue,it,0)}let ye=1,Ie=0;for(this[X]=J&255;++Ie>>0,ue=ue>>>0,!we){const it=Math.pow(2,8*ue)-1;q(this,J,X,ue,it,0)}let ye=ue-1,Ie=1;for(this[X+ye]=J&255;--ye>=0&&(Ie*=256);)this[X+ye]=J/Ie&255;return X+ue},h.prototype.writeUint8=h.prototype.writeUInt8=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,1,255,0),this[X]=J&255,X+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,2,65535,0),this[X]=J&255,this[X+1]=J>>>8,X+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,2,65535,0),this[X]=J>>>8,this[X+1]=J&255,X+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,4,4294967295,0),this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255,X+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,4,4294967295,0),this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255,X+4};function Y(se,J,X,ue,we){Se(J,ue,we,se,X,7);let ye=Number(J&BigInt(4294967295));se[X++]=ye,ye=ye>>8,se[X++]=ye,ye=ye>>8,se[X++]=ye,ye=ye>>8,se[X++]=ye;let Ie=Number(J>>BigInt(32)&BigInt(4294967295));return se[X++]=Ie,Ie=Ie>>8,se[X++]=Ie,Ie=Ie>>8,se[X++]=Ie,Ie=Ie>>8,se[X++]=Ie,X}function K(se,J,X,ue,we){Se(J,ue,we,se,X,7);let ye=Number(J&BigInt(4294967295));se[X+7]=ye,ye=ye>>8,se[X+6]=ye,ye=ye>>8,se[X+5]=ye,ye=ye>>8,se[X+4]=ye;let Ie=Number(J>>BigInt(32)&BigInt(4294967295));return se[X+3]=Ie,Ie=Ie>>8,se[X+2]=Ie,Ie=Ie>>8,se[X+1]=Ie,Ie=Ie>>8,se[X]=Ie,X+8}h.prototype.writeBigUInt64LE=Ge(function(J,X=0){return Y(this,J,X,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ge(function(J,X=0){return K(this,J,X,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(J,X,ue,we){if(J=+J,X=X>>>0,!we){const ot=Math.pow(2,8*ue-1);q(this,J,X,ue,ot-1,-ot)}let ye=0,Ie=1,it=0;for(this[X]=J&255;++ye>0)-it&255;return X+ue},h.prototype.writeIntBE=function(J,X,ue,we){if(J=+J,X=X>>>0,!we){const ot=Math.pow(2,8*ue-1);q(this,J,X,ue,ot-1,-ot)}let ye=ue-1,Ie=1,it=0;for(this[X+ye]=J&255;--ye>=0&&(Ie*=256);)J<0&&it===0&&this[X+ye+1]!==0&&(it=1),this[X+ye]=(J/Ie>>0)-it&255;return X+ue},h.prototype.writeInt8=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,1,127,-128),J<0&&(J=255+J+1),this[X]=J&255,X+1},h.prototype.writeInt16LE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,2,32767,-32768),this[X]=J&255,this[X+1]=J>>>8,X+2},h.prototype.writeInt16BE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,2,32767,-32768),this[X]=J>>>8,this[X+1]=J&255,X+2},h.prototype.writeInt32LE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,4,2147483647,-2147483648),this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24,X+4},h.prototype.writeInt32BE=function(J,X,ue){return J=+J,X=X>>>0,ue||q(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255,X+4},h.prototype.writeBigInt64LE=Ge(function(J,X=0){return Y(this,J,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ge(function(J,X=0){return K(this,J,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(se,J,X,ue,we,ye){if(X+ue>se.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function re(se,J,X,ue,we){return J=+J,X=X>>>0,we||te(se,J,X,4),t.write(se,J,X,ue,23,4),X+4}h.prototype.writeFloatLE=function(J,X,ue){return re(this,J,X,!0,ue)},h.prototype.writeFloatBE=function(J,X,ue){return re(this,J,X,!1,ue)};function H(se,J,X,ue,we){return J=+J,X=X>>>0,we||te(se,J,X,8),t.write(se,J,X,ue,52,8),X+8}h.prototype.writeDoubleLE=function(J,X,ue){return H(this,J,X,!0,ue)},h.prototype.writeDoubleBE=function(J,X,ue){return H(this,J,X,!1,ue)},h.prototype.copy=function(J,X,ue,we){if(!h.isBuffer(J))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!we&&we!==0&&(we=this.length),X>=J.length&&(X=J.length),X||(X=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),J.length-X>>0,ue=ue===void 0?this.length:ue>>>0,J||(J=0);let ye;if(typeof J=="number")for(ye=X;ye2**32?we=le(String(X)):typeof X=="bigint"&&(we=String(X),(X>BigInt(2)**BigInt(32)||X<-(BigInt(2)**BigInt(32)))&&(we=le(we)),we+="n"),ue+=` It must be ${J}. Received ${we}`,ue},RangeError);function le(se){let J="",X=se.length;const ue=se[0]==="-"?1:0;for(;X>=ue+4;X-=3)J=`_${se.slice(X-3,X)}${J}`;return`${se.slice(0,X)}${J}`}function de(se,J,X){Me(J,"offset"),(se[J]===void 0||se[J+X]===void 0)&&ke(J,se.length-(X+1))}function Se(se,J,X,ue,we,ye){if(se>X||se3?J===0||J===BigInt(0)?it=`>= 0${Ie} and < 2${Ie} ** ${(ye+1)*8}${Ie}`:it=`>= -(2${Ie} ** ${(ye+1)*8-1}${Ie}) and < 2 ** ${(ye+1)*8-1}${Ie}`:it=`>= ${J}${Ie} and <= ${X}${Ie}`,new U.ERR_OUT_OF_RANGE("value",it,se)}de(ue,we,ye)}function Me(se,J){if(typeof se!="number")throw new U.ERR_INVALID_ARG_TYPE(J,"number",se)}function ke(se,J,X){throw Math.floor(se)!==se?(Me(se,X),new U.ERR_OUT_OF_RANGE(X||"offset","an integer",se)):J<0?new U.ERR_BUFFER_OUT_OF_BOUNDS:new U.ERR_OUT_OF_RANGE(X||"offset",`>= ${X?1:0} and <= ${J}`,se)}const Ke=/[^+/0-9A-Za-z-_]/g;function Re(se){if(se=se.split("=")[0],se=se.trim().replace(Ke,""),se.length<2)return"";for(;se.length%4!==0;)se=se+"=";return se}function je(se,J){J=J||1/0;let X;const ue=se.length;let we=null;const ye=[];for(let Ie=0;Ie55295&&X<57344){if(!we){if(X>56319){(J-=3)>-1&&ye.push(239,191,189);continue}else if(Ie+1===ue){(J-=3)>-1&&ye.push(239,191,189);continue}we=X;continue}if(X<56320){(J-=3)>-1&&ye.push(239,191,189),we=X;continue}X=(we-55296<<10|X-56320)+65536}else we&&(J-=3)>-1&&ye.push(239,191,189);if(we=null,X<128){if((J-=1)<0)break;ye.push(X)}else if(X<2048){if((J-=2)<0)break;ye.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;ye.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;ye.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ye}function De(se){const J=[];for(let X=0;X>8,we=X%256,ye.push(we),ye.push(ue);return ye}function ze(se){return e.toByteArray(Re(se))}function qe(se,J,X,ue){let we;for(we=0;we=J.length||we>=se.length);++we)J[we+X]=se[we];return we}function Ve(se,J){return se instanceof J||se!=null&&se.constructor!=null&&se.constructor.name!=null&&se.constructor.name===J.name}function He(se){return se!==se}const Be=function(){const se="0123456789abcdef",J=new Array(256);for(let X=0;X<16;++X){const ue=X*16;for(let we=0;we<16;++we)J[ue+we]=se[X]+se[we]}return J}();function Ge(se){return typeof BigInt>"u"?Xe:se}function Xe(){throw new Error("BigInt not supported")}})(Hs);const Dt=Hs.Buffer,mme=Hs.Blob,bme=Hs.BlobOptions,xK=Hs.Buffer,wme=Hs.File,vme=Hs.FileOptions,yme=Hs.INSPECT_MAX_BYTES,xme=Hs.SlowBuffer,_me=Hs.TranscodeEncoding,Eme=Hs.atob,Ame=Hs.btoa,Cme=Hs.constants,Sme=Hs.isAscii,Ime=Hs.isUtf8,Tme=Hs.kMaxLength,Rme=Hs.kStringMaxLength,kme=Hs.resolveObjectURL,Mme=Hs.transcode,Nme=Object.freeze(Object.defineProperty({__proto__:null,Blob:mme,BlobOptions:bme,Buffer:xK,File:wme,FileOptions:vme,INSPECT_MAX_BYTES:yme,SlowBuffer:xme,TranscodeEncoding:_me,atob:Eme,btoa:Ame,constants:Cme,default:Dt,isAscii:Sme,isUtf8:Ime,kMaxLength:Tme,kStringMaxLength:Rme,resolveObjectURL:kme,transcode:Mme},Symbol.toStringTag,{value:"Module"}));function _n(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i)}nt.inherits(_n,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:nt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const _K=_n.prototype,EK={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{EK[r]={value:r}}),Object.defineProperties(_n,EK),Object.defineProperty(_K,"isAxiosError",{value:!0}),_n.from=(r,e,t,n,i,s)=>{const o=Object.create(_K);return nt.toFlatObject(r,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),_n.call(o,r.message,e,t,n,i),o.cause=r,o.name=r.name,s&&Object.assign(o,s),o};const Pme=null;function wR(r){return nt.isPlainObject(r)||nt.isArray(r)}function AK(r){return nt.endsWith(r,"[]")?r.slice(0,-2):r}function CK(r,e,t){return r?r.concat(e).map(function(i,s){return i=AK(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function Ome(r){return nt.isArray(r)&&!r.some(wR)}const Dme=nt.toFlatObject(nt,{},null,function(e){return/^is[A-Z]/.test(e)});function C_(r,e,t){if(!nt.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=nt.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,T){return!nt.isUndefined(T[C])});const n=t.metaTokens,i=t.visitor||h,s=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&nt.isSpecCompliantForm(e);if(!nt.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(nt.isDate(y))return y.toISOString();if(!l&&nt.isBlob(y))throw new _n("Blob is not supported. Use a Buffer instead.");return nt.isArrayBuffer(y)||nt.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Dt.from(y):y}function h(y,C,T){let k=y;if(y&&!T&&typeof y=="object"){if(nt.endsWith(C,"{}"))C=n?C:C.slice(0,-2),y=JSON.stringify(y);else if(nt.isArray(y)&&Ome(y)||(nt.isFileList(y)||nt.endsWith(C,"[]"))&&(k=nt.toArray(y)))return C=AK(C),k.forEach(function(O,B){!(nt.isUndefined(O)||O===null)&&e.append(o===!0?CK([C],B,s):o===null?C:C+"[]",u(O))}),!1}return wR(y)?!0:(e.append(CK(T,C,s),u(y)),!1)}const p=[],g=Object.assign(Dme,{defaultVisitor:h,convertValue:u,isVisitable:wR});function w(y,C){if(!nt.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+C.join("."));p.push(y),nt.forEach(y,function(k,N){(!(nt.isUndefined(k)||k===null)&&i.call(e,k,nt.isString(N)?N.trim():N,C,g))===!0&&w(k,C?C.concat(N):[N])}),p.pop()}}if(!nt.isObject(r))throw new TypeError("data must be an object");return w(r),e}function SK(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function vR(r,e){this._pairs=[],r&&C_(r,this,e)}const IK=vR.prototype;IK.append=function(e,t){this._pairs.push([e,t])},IK.toString=function(e){const t=e?function(n){return e.call(this,n,SK)}:SK;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function $me(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function TK(r,e,t){if(!e)return r;const n=t&&t.encode||$me,i=t&&t.serialize;let s;if(i?s=i(e,t):s=nt.isURLSearchParams(e)?e.toString():new vR(e,t).toString(n),s){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class Bme{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){nt.forEach(this.handlers,function(n){n!==null&&e(n)})}}const RK=Bme,kK={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lme={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:vR,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},MK=typeof window<"u"&&typeof document<"u",Ume=(r=>MK&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),Fme=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Dh={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:MK,hasStandardBrowserEnv:Ume,hasStandardBrowserWebWorkerEnv:Fme},Symbol.toStringTag,{value:"Module"})),...Lme};function jme(r,e){return C_(r,new Dh.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return Dh.isNode&&nt.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function zme(r){return nt.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hme(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n=t.length;return o=!o&&nt.isArray(i)?i.length:o,l?(nt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!nt.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],s)&&nt.isArray(i[o])&&(i[o]=Hme(i[o])),!a)}if(nt.isFormData(r)&&nt.isFunction(r.entries)){const t={};return nt.forEachEntry(r,(n,i)=>{e(zme(n),i,t,0)}),t}return null}function qme(r,e,t){if(nt.isString(r))try{return(e||JSON.parse)(r),nt.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const yR={transitional:kK,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=nt.isObject(e);if(s&&nt.isHTMLForm(e)&&(e=new FormData(e)),nt.isFormData(e))return i?JSON.stringify(NK(e)):e;if(nt.isArrayBuffer(e)||nt.isBuffer(e)||nt.isStream(e)||nt.isFile(e)||nt.isBlob(e))return e;if(nt.isArrayBufferView(e))return e.buffer;if(nt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jme(e,this.formSerializer).toString();if((a=nt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return C_(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),qme(e)):e}],transformResponse:[function(e){const t=this.transitional||yR.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(e&&nt.isString(e)&&(n&&!this.responseType||i)){const o=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?_n.from(a,_n.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dh.classes.FormData,Blob:Dh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};nt.forEach(["delete","get","head","post","put","patch"],r=>{yR.headers[r]={}});const xR=yR,Wme=nt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Vme=r=>{const e={};let t,n,i;return r&&r.split(` -`).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!t||e[t]&&Wme[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},PK=Symbol("internals");function M5(r){return r&&String(r).trim().toLowerCase()}function S_(r){return r===!1||r==null?r:nt.isArray(r)?r.map(S_):String(r)}function Gme(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const Kme=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function _R(r,e,t,n,i){if(nt.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!nt.isString(e)){if(nt.isString(n))return e.indexOf(n)!==-1;if(nt.isRegExp(n))return n.test(e)}}function Zme(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Jme(r,e){const t=nt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}class I_{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(a,l,u){const h=M5(l);if(!h)throw new Error("header name must be a non-empty string");const p=nt.findKey(i,h);(!p||i[p]===void 0||u===!0||u===void 0&&i[p]!==!1)&&(i[p||l]=S_(a))}const o=(a,l)=>nt.forEach(a,(u,h)=>s(u,h,l));return nt.isPlainObject(e)||e instanceof this.constructor?o(e,t):nt.isString(e)&&(e=e.trim())&&!Kme(e)?o(Vme(e),t):e!=null&&s(t,e,n),this}get(e,t){if(e=M5(e),e){const n=nt.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return Gme(i);if(nt.isFunction(t))return t.call(this,i,n);if(nt.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=M5(e),e){const n=nt.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||_R(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(o){if(o=M5(o),o){const a=nt.findKey(n,o);a&&(!t||_R(n,n[a],a,t))&&(delete n[a],i=!0)}}return nt.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];(!e||_R(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return nt.forEach(this,(i,s)=>{const o=nt.findKey(n,s);if(o){t[o]=S_(i),delete t[s];return}const a=e?Zme(s):String(s).trim();a!==s&&delete t[s],t[a]=S_(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return nt.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&nt.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[PK]=this[PK]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=M5(o);n[a]||(Jme(i,o),n[a]=!0)}return nt.isArray(e)?e.forEach(s):s(e),this}}I_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),nt.reduceDescriptors(I_.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}}),nt.freezeMethods(I_);const nd=I_;function ER(r,e){const t=this||xR,n=e||t,i=nd.from(n.headers);let s=n.data;return nt.forEach(r,function(a){s=a.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function OK(r){return!!(r&&r.__CANCEL__)}function N5(r,e,t){_n.call(this,r??"canceled",_n.ERR_CANCELED,e,t),this.name="CanceledError"}nt.inherits(N5,_n,{__CANCEL__:!0});function Yme(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new _n("Request failed with status code "+t.status,[_n.ERR_BAD_REQUEST,_n.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Qme=Dh.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const o=[r+"="+encodeURIComponent(e)];nt.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),nt.isString(n)&&o.push("path="+n),nt.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xme(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function e2e(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function DK(r,e){return r&&!Xme(e)?e2e(r,e):e}const t2e=Dh.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(s){let o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(o){const a=nt.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function r2e(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function n2e(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),h=n[s];o||(o=u),t[i]=l,n[i]=u;let p=s,g=0;for(;p!==i;)g+=t[p++],p=p%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),u-o{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-t,l=n(a),u=s<=o;t=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&u?(o-s)/l:void 0,event:i};h[e?"download":"upload"]=!0,r(h)}}const AR={http:Pme,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(t,n){let i=r.data;const s=nd.from(r.headers).normalize();let{responseType:o,withXSRFToken:a}=r,l;function u(){r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let h;if(nt.isFormData(i)){if(Dh.hasStandardBrowserEnv||Dh.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((h=s.getContentType())!==!1){const[C,...T]=h?h.split(";").map(k=>k.trim()).filter(Boolean):[];s.setContentType([C||"multipart/form-data",...T].join("; "))}}let p=new XMLHttpRequest;if(r.auth){const C=r.auth.username||"",T=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.set("Authorization","Basic "+btoa(C+":"+T))}const g=DK(r.baseURL,r.url);p.open(r.method.toUpperCase(),TK(g,r.params,r.paramsSerializer),!0),p.timeout=r.timeout;function w(){if(!p)return;const C=nd.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),k={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:C,config:r,request:p};Yme(function(O){t(O),u()},function(O){n(O),u()},k),p=null}if("onloadend"in p?p.onloadend=w:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(w)},p.onabort=function(){p&&(n(new _n("Request aborted",_n.ECONNABORTED,r,p)),p=null)},p.onerror=function(){n(new _n("Network Error",_n.ERR_NETWORK,r,p)),p=null},p.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const k=r.transitional||kK;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),n(new _n(T,k.clarifyTimeoutError?_n.ETIMEDOUT:_n.ECONNABORTED,r,p)),p=null},Dh.hasStandardBrowserEnv&&(a&&nt.isFunction(a)&&(a=a(r)),a||a!==!1&&t2e(g))){const C=r.xsrfHeaderName&&r.xsrfCookieName&&Qme.read(r.xsrfCookieName);C&&s.set(r.xsrfHeaderName,C)}i===void 0&&s.setContentType(null),"setRequestHeader"in p&&nt.forEach(s.toJSON(),function(T,k){p.setRequestHeader(k,T)}),nt.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),o&&o!=="json"&&(p.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&p.addEventListener("progress",$K(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",$K(r.onUploadProgress)),(r.cancelToken||r.signal)&&(l=C=>{p&&(n(!C||C.type?new N5(null,r,p):C),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const y=r2e(g);if(y&&Dh.protocols.indexOf(y)===-1){n(new _n("Unsupported protocol "+y+":",_n.ERR_BAD_REQUEST,r));return}p.send(i||null)})}};nt.forEach(AR,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const BK=r=>`- ${r}`,i2e=r=>nt.isFunction(r)||r===null||r===!1,LK={getAdapter:r=>{r=nt.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : -`+s.map(BK).join(` -`):" "+BK(s[0]):"as no adapter specified";throw new _n("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:AR};function CR(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new N5(null,r)}function UK(r){return CR(r),r.headers=nd.from(r.headers),r.data=ER.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),LK.getAdapter(r.adapter||xR.adapter)(r).then(function(n){return CR(r),n.data=ER.call(r,r.transformResponse,n),n.headers=nd.from(n.headers),n},function(n){return OK(n)||(CR(r),n&&n.response&&(n.response.data=ER.call(r,r.transformResponse,n.response),n.response.headers=nd.from(n.response.headers))),Promise.reject(n)})}const FK=r=>r instanceof nd?{...r}:r;function _w(r,e){e=e||{};const t={};function n(u,h,p){return nt.isPlainObject(u)&&nt.isPlainObject(h)?nt.merge.call({caseless:p},u,h):nt.isPlainObject(h)?nt.merge({},h):nt.isArray(h)?h.slice():h}function i(u,h,p){if(nt.isUndefined(h)){if(!nt.isUndefined(u))return n(void 0,u,p)}else return n(u,h,p)}function s(u,h){if(!nt.isUndefined(h))return n(void 0,h)}function o(u,h){if(nt.isUndefined(h)){if(!nt.isUndefined(u))return n(void 0,u)}else return n(void 0,h)}function a(u,h,p){if(p in e)return n(u,h);if(p in r)return n(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,h)=>i(FK(u),FK(h),!0)};return nt.forEach(Object.keys(Object.assign({},r,e)),function(h){const p=l[h]||i,g=p(r[h],e[h],h);nt.isUndefined(g)&&p!==a||(t[h]=g)}),t}const jK="1.6.8",SR={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{SR[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const zK={};SR.transitional=function(e,t,n){function i(s,o){return"[Axios v"+jK+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(e===!1)throw new _n(i(o," has been removed"+(t?" in "+t:"")),_n.ERR_DEPRECATED);return t&&!zK[o]&&(zK[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,a):!0}};function s2e(r,e,t){if(typeof r!="object")throw new _n("options must be an object",_n.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],o=e[s];if(o){const a=r[s],l=a===void 0||o(a,s,r);if(l!==!0)throw new _n("option "+s+" must be "+l,_n.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _n("Unknown option "+s,_n.ERR_BAD_OPTION)}}const IR={assertOptions:s2e,validators:SR},wp=IR.validators;class T_{constructor(e){this.defaults=e,this.interceptors={request:new RK,response:new RK}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+s):n.stack=s}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=_w(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&IR.assertOptions(n,{silentJSONParsing:wp.transitional(wp.boolean),forcedJSONParsing:wp.transitional(wp.boolean),clarifyTimeoutError:wp.transitional(wp.boolean)},!1),i!=null&&(nt.isFunction(i)?t.paramsSerializer={serialize:i}:IR.assertOptions(i,{encode:wp.function,serialize:wp.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&nt.merge(s.common,s[t.method]);s&&nt.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),t.headers=nd.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(t)===!1||(l=l&&C.synchronous,a.unshift(C.fulfilled,C.rejected))});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let h,p=0,g;if(!l){const y=[UK.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),g=y.length,h=Promise.resolve(t);p{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,a){n.reason||(n.reason=new N5(s,o,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new TR(function(i){e=i}),cancel:e}}}const o2e=TR;function a2e(r){return function(t){return r.apply(null,t)}}function c2e(r){return nt.isObject(r)&&r.isAxiosError===!0}const RR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(RR).forEach(([r,e])=>{RR[e]=r});const l2e=RR;function HK(r){const e=new R_(r),t=uK(R_.prototype.request,e);return nt.extend(t,R_.prototype,e,{allOwnKeys:!0}),nt.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return HK(_w(r,i))},t}const Ds=HK(xR);Ds.Axios=R_,Ds.CanceledError=N5,Ds.CancelToken=o2e,Ds.isCancel=OK,Ds.VERSION=jK,Ds.toFormData=C_,Ds.AxiosError=_n,Ds.Cancel=Ds.CanceledError,Ds.all=function(e){return Promise.all(e)},Ds.spread=a2e,Ds.isAxiosError=c2e,Ds.mergeConfig=_w,Ds.AxiosHeaders=nd,Ds.formToJSON=r=>NK(nt.isHTMLForm(r)?new FormData(r):r),Ds.getAdapter=LK.getAdapter,Ds.HttpStatusCode=l2e,Ds.default=Ds;const u2e=Ds;function P5(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function h2e(r){if(typeof r!="boolean")throw new Error(`Expected boolean, not ${r}`)}function f2e(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function kR(r,...e){if(!f2e(r))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function d2e(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");P5(r.outputLen),P5(r.blockLen)}function MR(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function qK(r,e){kR(r);const t=e.outputLen;if(r.length>WK&k_)}:{h:Number(r>>WK&k_)|0,l:Number(r&k_)|0}}function g2e(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;ir<>>32-t,b2e=(r,e,t)=>e<>>32-t,w2e=(r,e,t)=>e<>>64-t,v2e=(r,e,t)=>r<>>64-t;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const y2e=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4));function x2e(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function VK(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function GK(r){if(typeof r=="string"&&(r=VK(r)),!x2e(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}let _2e=class{clone(){return this._cloneInto()}};function E2e(r){const e=n=>r().update(GK(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}const[KK,ZK,JK]=[[],[],[]],A2e=BigInt(0),O5=BigInt(1),C2e=BigInt(2),S2e=BigInt(7),I2e=BigInt(256),T2e=BigInt(113);for(let r=0,e=O5,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],KK.push(2*(5*n+t)),ZK.push((r+1)*(r+2)/2%64);let i=A2e;for(let s=0;s<7;s++)e=(e<>S2e)*T2e)%I2e,e&C2e&&(i^=O5<<(O5<t>32?w2e(r,e,t):m2e(r,e,t),QK=(r,e,t)=>t>32?v2e(r,e,t):b2e(r,e,t);function M2e(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)t[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=t[l],h=t[l+1],p=YK(u,h,1)^t[a],g=QK(u,h,1)^t[a+1];for(let w=0;w<50;w+=10)r[o+w]^=p,r[o+w+1]^=g}let i=r[2],s=r[3];for(let o=0;o<24;o++){const a=ZK[o],l=YK(i,s,a),u=QK(i,s,a),h=KK[o];i=r[h],s=r[h+1],r[h]=l,r[h+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=r[o+a];for(let a=0;a<10;a++)r[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}r[0]^=R2e[n],r[1]^=k2e[n]}t.fill(0)}let XK=class extends _2e{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,P5(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=y2e(this.state)}keccak(){M2e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){MR(this);const{blockLen:t,state:n}=this;e=GK(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return P5(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(qK(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new XK(t,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const M_=(r,e,t)=>E2e(()=>new XK(e,r,t)),N2e=M_(1,144,224/8),eZ=M_(1,136,256/8),P2e=M_(1,104,384/8),O2e=M_(1,72,512/8);NR.bool,NR.bytes;function N_(r){return e=>(NR.bytes(e),r(e))}(()=>{const r=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:e&&!r?e("crypto"):void 0,web:r}})(),N_(N2e);const D2e=(()=>{const r=N_(eZ);return r.create=eZ.create,r})();N_(P2e),N_(O2e);const $2e=4001,B2e=4100,L2e=4200,U2e=4900,F2e=4901,j2e=1002,z2e=1003,H2e=1006,q2e=1100,W2e=1200,P_=-32700,O_=-32600,D_=-32601,$_=-32602,B_=-32603,L_=-32e3,U_=-32001,F_=-32002,j_=-32003,z_=-32004,H_=-32005,q_=-32006;class D5 extends Error{constructor(e,t){super(e),this.innerError=t,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(e,t=!1){if(e==null)return"undefined";const n=JSON.stringify(e,(i,s)=>typeof s=="bigint"?s.toString():s);return t&&["bigint","string"].includes(typeof e)?n.replace(/['\\"]+/g,""):n}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}}class PR extends D5{constructor(e,t){super(`Invalid value given "${D5.convertToString(e,!0)}". Error: ${t}.`),this.name=this.constructor.name}}class OR extends PR{constructor(e){super(e,"can not parse as byte data"),this.code=j2e}}class V2e extends PR{constructor(e){super(e,"can not parse as number data"),this.code=z2e}}class G2e extends PR{constructor(e){super(e,"can not be converted to hex"),this.code=H2e}}const K2e="An Rpc error has occured with a code of *code*",Cl={[P_]:{message:"Parse error",description:"Invalid JSON"},[O_]:{message:"Invalid request",description:"JSON is not a valid request object "},[D_]:{message:"Method not found",description:"Method does not exist "},[$_]:{message:"Invalid params",description:"Invalid method parameters"},[B_]:{message:"Internal error",description:"Internal JSON-RPC error"},[L_]:{message:"Invalid input",description:"Missing or invalid parameters"},[U_]:{message:"Resource not found",description:"Requested resource not found"},[F_]:{message:"Resource unavailable",description:"Requested resource not available"},[j_]:{message:"Transaction rejected",description:"Transaction creation failed"},[z_]:{message:"Method not supported",description:"Method is not implemented"},[H_]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[q_]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[$2e]:{name:"User Rejected Request",message:"The user rejected the request."},[B2e]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[L2e]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[U2e]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[F2e]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class Sl extends D5{constructor(e,t){super(t??K2e.replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class Z2e extends Sl{constructor(e){super(e,Cl[P_].message),this.code=P_}}class J2e extends Sl{constructor(e){super(e,Cl[O_].message),this.code=O_}}class Y2e extends Sl{constructor(e){super(e,Cl[D_].message),this.code=D_}}class Q2e extends Sl{constructor(e){super(e,Cl[$_].message),this.code=$_}}class X2e extends Sl{constructor(e){super(e,Cl[B_].message),this.code=B_}}class ebe extends Sl{constructor(e){super(e,Cl[L_].message),this.code=L_}}class tbe extends Sl{constructor(e){super(e,Cl[z_].message),this.code=z_}}class rbe extends Sl{constructor(e){super(e,Cl[F_].message),this.code=F_}}class nbe extends Sl{constructor(e){super(e,Cl[U_].message),this.code=U_}}class ibe extends Sl{constructor(e){super(e,Cl[q_].message),this.code=q_}}class sbe extends Sl{constructor(e){super(e,Cl[j_].message),this.code=j_}}class obe extends Sl{constructor(e){super(e,Cl[H_].message),this.code=H_}}const Il=new Map;Il.set(P_,{error:Z2e}),Il.set(O_,{error:J2e}),Il.set(D_,{error:Y2e}),Il.set($_,{error:Q2e}),Il.set(B_,{error:X2e}),Il.set(L_,{error:ebe}),Il.set(z_,{error:tbe}),Il.set(F_,{error:rbe}),Il.set(j_,{error:sbe}),Il.set(U_,{error:nbe}),Il.set(q_,{error:ibe}),Il.set(H_,{error:obe});class abe extends D5{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=W2e}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}var Pn;(function(r){r.assertEqual=i=>i;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},r.getValidEnumValues=i=>{const s=r.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return r.objectValues(o)},r.objectValues=i=>r.objectKeys(i).map(function(s){return i[s]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},r.find=(i,s)=>{for(const o of i)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=n,r.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Pn||(Pn={}));var DR;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(DR||(DR={}));const ir=Pn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vp=r=>{switch(typeof r){case"undefined":return ir.undefined;case"string":return ir.string;case"number":return isNaN(r)?ir.nan:ir.number;case"boolean":return ir.boolean;case"function":return ir.function;case"bigint":return ir.bigint;case"symbol":return ir.symbol;case"object":return Array.isArray(r)?ir.array:r===null?ir.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?ir.promise:typeof Map<"u"&&r instanceof Map?ir.map:typeof Set<"u"&&r instanceof Set?ir.set:typeof Date<"u"&&r instanceof Date?ir.date:ir.object;default:return ir.unknown}},Rt=Pn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cbe=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Au extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let a=n,l=0;for(;lt.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Au.create=r=>new Au(r);const $5=(r,e)=>{let t;switch(r.code){case Rt.invalid_type:r.received===ir.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case Rt.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Pn.jsonStringifyReplacer)}`;break;case Rt.unrecognized_keys:t=`Unrecognized key(s) in object: ${Pn.joinValues(r.keys,", ")}`;break;case Rt.invalid_union:t="Invalid input";break;case Rt.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Pn.joinValues(r.options)}`;break;case Rt.invalid_enum_value:t=`Invalid enum value. Expected ${Pn.joinValues(r.options)}, received '${r.received}'`;break;case Rt.invalid_arguments:t="Invalid function arguments";break;case Rt.invalid_return_type:t="Invalid function return type";break;case Rt.invalid_date:t="Invalid date";break;case Rt.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Pn.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case Rt.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case Rt.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case Rt.custom:t="Invalid input";break;case Rt.invalid_intersection_types:t="Intersection results could not be merged";break;case Rt.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case Rt.not_finite:t="Number must be finite";break;default:t=e.defaultError,Pn.assertNever(r)}return{message:t}};let tZ=$5;function lbe(r){tZ=r}function W_(){return tZ}const V_=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,s=[...t,...i.path||[]],o={...i,path:s};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},ube=[];function sr(r,e){const t=V_({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,W_(),$5].filter(n=>!!n)});r.common.issues.push(t)}class oa{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Lr;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t)n.push({key:await i.key,value:await i.value});return oa.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Lr;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const Lr=Object.freeze({status:"aborted"}),rZ=r=>({status:"dirty",value:r}),Ca=r=>({status:"valid",value:r}),$R=r=>r.status==="aborted",BR=r=>r.status==="dirty",B5=r=>r.status==="valid",G_=r=>typeof Promise<"u"&&r instanceof Promise;var Ar;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ar||(Ar={}));class $h{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const nZ=(r,e)=>{if(B5(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Au(r.common.issues);return this._error=t,this._error}}};function Vr(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n??a.defaultError}:{message:t??a.defaultError},description:i}}class Qr{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return vp(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:vp(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new oa,ctx:{common:e.parent.common,data:e.data,parsedType:vp(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(G_(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vp(e)},s=this._parseSync({data:e,path:i.path,parent:i});return nZ(i,s)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vp(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(G_(i)?i:Promise.resolve(i));return nZ(n,s)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:Rt.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Iu({schema:this,typeName:Mr.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return sd.create(this,this._def)}nullable(){return fg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Su.create(this,this._def)}promise(){return Sw.create(this,this._def)}or(e){return j5.create([this,e],this._def)}and(e){return z5.create(this,e,this._def)}transform(e){return new Iu({...Vr(this._def),schema:this,typeName:Mr.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new G5({...Vr(this._def),innerType:this,defaultValue:t,typeName:Mr.ZodDefault})}brand(){return new sZ({typeName:Mr.ZodBranded,type:this,...Vr(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new X_({...Vr(this._def),innerType:this,catchValue:t,typeName:Mr.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return K5.create(this,e)}readonly(){return tE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hbe=/^c[^\s-]{8,}$/i,fbe=/^[a-z][a-z0-9]*$/,dbe=/^[0-9A-HJKMNP-TV-Z]{26}$/,pbe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gbe=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mbe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let LR;const bbe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,wbe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,vbe=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function ybe(r,e){return!!((e==="v4"||!e)&&bbe.test(r)||(e==="v6"||!e)&&wbe.test(r))}class Cu extends Qr{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ir.string){const s=this._getOrReturnCtx(e);return sr(s,{code:Rt.invalid_type,expected:ir.string,received:s.parsedType}),Lr}const n=new oa;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.lengths.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:Rt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.lengthe.test(i),{validation:t,code:Rt.invalid_string,...Ar.errToObj(n)})}_addCheck(e){return new Cu({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ar.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ar.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ar.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ar.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ar.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ar.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ar.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ar.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...Ar.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ar.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Ar.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ar.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ar.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ar.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ar.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ar.errToObj(t)})}nonempty(e){return this.min(1,Ar.errToObj(e))}trim(){return new Cu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Cu({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Cu({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Cu({checks:[],typeName:Mr.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Vr(r)})};function xbe(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,s=parseInt(r.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class yp extends Qr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ir.number){const s=this._getOrReturnCtx(e);return sr(s,{code:Rt.invalid_type,expected:ir.number,received:s.parsedType}),Lr}let n;const i=new oa;for(const s of this._def.checks)s.kind==="int"?Pn.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?xbe(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.not_finite,message:s.message}),i.dirty()):Pn.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ar.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ar.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ar.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ar.toString(t))}setLimit(e,t,n,i){return new yp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ar.toString(i)}]})}_addCheck(e){return new yp({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ar.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ar.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ar.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ar.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ar.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ar.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ar.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ar.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ar.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Pn.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew yp({checks:[],typeName:Mr.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Vr(r)});class xp extends Qr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ir.bigint){const s=this._getOrReturnCtx(e);return sr(s,{code:Rt.invalid_type,expected:ir.bigint,received:s.parsedType}),Lr}let n;const i=new oa;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),sr(n,{code:Rt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Pn.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ar.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ar.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ar.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ar.toString(t))}setLimit(e,t,n,i){return new xp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ar.toString(i)}]})}_addCheck(e){return new xp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ar.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ar.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ar.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ar.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ar.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new xp({checks:[],typeName:Mr.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Vr(r)})};class L5 extends Qr{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==ir.boolean){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.boolean,received:n.parsedType}),Lr}return Ca(e.data)}}L5.create=r=>new L5({typeName:Mr.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Vr(r)});class lg extends Qr{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ir.date){const s=this._getOrReturnCtx(e);return sr(s,{code:Rt.invalid_type,expected:ir.date,received:s.parsedType}),Lr}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return sr(s,{code:Rt.invalid_date}),Lr}const n=new oa;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()s.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:Rt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Pn.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new lg({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ar.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ar.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew lg({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Mr.ZodDate,...Vr(r)});class K_ extends Qr{_parse(e){if(this._getType(e)!==ir.symbol){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.symbol,received:n.parsedType}),Lr}return Ca(e.data)}}K_.create=r=>new K_({typeName:Mr.ZodSymbol,...Vr(r)});class U5 extends Qr{_parse(e){if(this._getType(e)!==ir.undefined){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.undefined,received:n.parsedType}),Lr}return Ca(e.data)}}U5.create=r=>new U5({typeName:Mr.ZodUndefined,...Vr(r)});class F5 extends Qr{_parse(e){if(this._getType(e)!==ir.null){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.null,received:n.parsedType}),Lr}return Ca(e.data)}}F5.create=r=>new F5({typeName:Mr.ZodNull,...Vr(r)});class Ew extends Qr{constructor(){super(...arguments),this._any=!0}_parse(e){return Ca(e.data)}}Ew.create=r=>new Ew({typeName:Mr.ZodAny,...Vr(r)});class ug extends Qr{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ca(e.data)}}ug.create=r=>new ug({typeName:Mr.ZodUnknown,...Vr(r)});class id extends Qr{_parse(e){const t=this._getOrReturnCtx(e);return sr(t,{code:Rt.invalid_type,expected:ir.never,received:t.parsedType}),Lr}}id.create=r=>new id({typeName:Mr.ZodNever,...Vr(r)});class Z_ extends Qr{_parse(e){if(this._getType(e)!==ir.undefined){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.void,received:n.parsedType}),Lr}return Ca(e.data)}}Z_.create=r=>new Z_({typeName:Mr.ZodVoid,...Vr(r)});class Su extends Qr{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==ir.array)return sr(t,{code:Rt.invalid_type,expected:ir.array,received:t.parsedType}),Lr;if(i.exactLength!==null){const o=t.data.length>i.exactLength.value,a=t.data.lengthi.maxLength.value&&(sr(t,{code:Rt.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>i.type._parseAsync(new $h(t,o,t.path,a)))).then(o=>oa.mergeArray(n,o));const s=[...t.data].map((o,a)=>i.type._parseSync(new $h(t,o,t.path,a)));return oa.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new Su({...this._def,minLength:{value:e,message:Ar.toString(t)}})}max(e,t){return new Su({...this._def,maxLength:{value:e,message:Ar.toString(t)}})}length(e,t){return new Su({...this._def,exactLength:{value:e,message:Ar.toString(t)}})}nonempty(e){return this.min(1,e)}}Su.create=(r,e)=>new Su({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Mr.ZodArray,...Vr(e)});function Aw(r){if(r instanceof Qi){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=sd.create(Aw(n))}return new Qi({...r._def,shape:()=>e})}else return r instanceof Su?new Su({...r._def,type:Aw(r.element)}):r instanceof sd?sd.create(Aw(r.unwrap())):r instanceof fg?fg.create(Aw(r.unwrap())):r instanceof Bh?Bh.create(r.items.map(e=>Aw(e))):r}class Qi extends Qr{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Pn.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ir.object){const u=this._getOrReturnCtx(e);return sr(u,{code:Rt.invalid_type,expected:ir.object,received:u.parsedType}),Lr}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof id&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const h=s[u],p=i.data[u];l.push({key:{status:"valid",value:u},value:h._parse(new $h(i,p,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof id){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of a)l.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(u==="strict")a.length>0&&(sr(i,{code:Rt.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of a){const p=i.data[h];l.push({key:{status:"valid",value:h},value:u._parse(new $h(i,p,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of l){const p=await h.key;u.push({key:p,value:await h.value,alwaysSet:h.alwaysSet})}return u}).then(u=>oa.mergeObjectSync(n,u)):oa.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return Ar.errToObj,new Qi({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(a=Ar.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Qi({...this._def,unknownKeys:"strip"})}passthrough(){return new Qi({...this._def,unknownKeys:"passthrough"})}extend(e){return new Qi({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Qi({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Mr.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Qi({...this._def,catchall:e})}pick(e){const t={};return Pn.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Qi({...this._def,shape:()=>t})}omit(e){const t={};return Pn.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Qi({...this._def,shape:()=>t})}deepPartial(){return Aw(this)}partial(e){const t={};return Pn.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new Qi({...this._def,shape:()=>t})}required(e){const t={};return Pn.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof sd;)s=s._def.innerType;t[n]=s}}),new Qi({...this._def,shape:()=>t})}keyof(){return iZ(Pn.objectKeys(this.shape))}}Qi.create=(r,e)=>new Qi({shape:()=>r,unknownKeys:"strip",catchall:id.create(),typeName:Mr.ZodObject,...Vr(e)}),Qi.strictCreate=(r,e)=>new Qi({shape:()=>r,unknownKeys:"strict",catchall:id.create(),typeName:Mr.ZodObject,...Vr(e)}),Qi.lazycreate=(r,e)=>new Qi({shape:r,unknownKeys:"strip",catchall:id.create(),typeName:Mr.ZodObject,...Vr(e)});class j5 extends Qr{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new Au(a.ctx.common.issues));return sr(t,{code:Rt.invalid_union,unionErrors:o}),Lr}if(t.common.async)return Promise.all(n.map(async s=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const u={...t,common:{...t.common,issues:[]},parent:null},h=l._parseSync({data:t.data,path:t.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new Au(l));return sr(t,{code:Rt.invalid_union,unionErrors:a}),Lr}}get options(){return this._def.options}}j5.create=(r,e)=>new j5({options:r,typeName:Mr.ZodUnion,...Vr(e)});const J_=r=>r instanceof q5?J_(r.schema):r instanceof Iu?J_(r.innerType()):r instanceof W5?[r.value]:r instanceof _p?r.options:r instanceof V5?Object.keys(r.enum):r instanceof G5?J_(r._def.innerType):r instanceof U5?[void 0]:r instanceof F5?[null]:null;class Y_ extends Qr{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ir.object)return sr(t,{code:Rt.invalid_type,expected:ir.object,received:t.parsedType}),Lr;const n=this.discriminator,i=t.data[n],s=this.optionsMap.get(i);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(sr(t,{code:Rt.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Lr)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const s of t){const o=J_(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Y_({typeName:Mr.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Vr(n)})}}function UR(r,e){const t=vp(r),n=vp(e);if(r===e)return{valid:!0,data:r};if(t===ir.object&&n===ir.object){const i=Pn.objectKeys(e),s=Pn.objectKeys(r).filter(a=>i.indexOf(a)!==-1),o={...r,...e};for(const a of s){const l=UR(r[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(t===ir.array&&n===ir.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let s=0;s{if($R(s)||$R(o))return Lr;const a=UR(s.value,o.value);return a.valid?((BR(s)||BR(o))&&t.dirty(),{status:t.value,value:a.data}):(sr(n,{code:Rt.invalid_intersection_types}),Lr)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}z5.create=(r,e,t)=>new z5({left:r,right:e,typeName:Mr.ZodIntersection,...Vr(t)});class Bh extends Qr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ir.array)return sr(n,{code:Rt.invalid_type,expected:ir.array,received:n.parsedType}),Lr;if(n.data.lengththis._def.items.length&&(sr(n,{code:Rt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new $h(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>oa.mergeArray(t,o)):oa.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new Bh({...this._def,rest:e})}}Bh.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bh({items:r,typeName:Mr.ZodTuple,rest:null,...Vr(e)})};class H5 extends Qr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ir.object)return sr(n,{code:Rt.invalid_type,expected:ir.object,received:n.parsedType}),Lr;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new $h(n,a,n.path,a)),value:o._parse(new $h(n,n.data[a],n.path,a))});return n.common.async?oa.mergeObjectAsync(t,i):oa.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Qr?new H5({keyType:e,valueType:t,typeName:Mr.ZodRecord,...Vr(n)}):new H5({keyType:Cu.create(),valueType:e,typeName:Mr.ZodRecord,...Vr(t)})}}class Q_ extends Qr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ir.map)return sr(n,{code:Rt.invalid_type,expected:ir.map,received:n.parsedType}),Lr;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:i._parse(new $h(n,a,n.path,[u,"key"])),value:s._parse(new $h(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,h=await l.value;if(u.status==="aborted"||h.status==="aborted")return Lr;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),a.set(u.value,h.value)}return{status:t.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,h=l.value;if(u.status==="aborted"||h.status==="aborted")return Lr;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),a.set(u.value,h.value)}return{status:t.value,value:a}}}}Q_.create=(r,e,t)=>new Q_({valueType:e,keyType:r,typeName:Mr.ZodMap,...Vr(t)});class hg extends Qr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ir.set)return sr(n,{code:Rt.invalid_type,expected:ir.set,received:n.parsedType}),Lr;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(sr(n,{code:Rt.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const s=this._def.valueType;function o(l){const u=new Set;for(const h of l){if(h.status==="aborted")return Lr;h.status==="dirty"&&t.dirty(),u.add(h.value)}return{status:t.value,value:u}}const a=[...n.data.values()].map((l,u)=>s._parse(new $h(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,t){return new hg({...this._def,minSize:{value:e,message:Ar.toString(t)}})}max(e,t){return new hg({...this._def,maxSize:{value:e,message:Ar.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}hg.create=(r,e)=>new hg({valueType:r,minSize:null,maxSize:null,typeName:Mr.ZodSet,...Vr(e)});class Cw extends Qr{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ir.function)return sr(t,{code:Rt.invalid_type,expected:ir.function,received:t.parsedType}),Lr;function n(a,l){return V_({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,W_(),$5].filter(u=>!!u),issueData:{code:Rt.invalid_arguments,argumentsError:l}})}function i(a,l){return V_({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,W_(),$5].filter(u=>!!u),issueData:{code:Rt.invalid_return_type,returnTypeError:l}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Sw){const a=this;return Ca(async function(...l){const u=new Au([]),h=await a._def.args.parseAsync(l,s).catch(w=>{throw u.addIssue(n(l,w)),u}),p=await Reflect.apply(o,this,h);return await a._def.returns._def.type.parseAsync(p,s).catch(w=>{throw u.addIssue(i(p,w)),u})})}else{const a=this;return Ca(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Au([n(l,u.error)]);const h=Reflect.apply(o,this,u.data),p=a._def.returns.safeParse(h,s);if(!p.success)throw new Au([i(h,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Cw({...this._def,args:Bh.create(e).rest(ug.create())})}returns(e){return new Cw({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Cw({args:e||Bh.create([]).rest(ug.create()),returns:t||ug.create(),typeName:Mr.ZodFunction,...Vr(n)})}}class q5 extends Qr{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}q5.create=(r,e)=>new q5({getter:r,typeName:Mr.ZodLazy,...Vr(e)});class W5 extends Qr{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return sr(t,{received:t.data,code:Rt.invalid_literal,expected:this._def.value}),Lr}return{status:"valid",value:e.data}}get value(){return this._def.value}}W5.create=(r,e)=>new W5({value:r,typeName:Mr.ZodLiteral,...Vr(e)});function iZ(r,e){return new _p({values:r,typeName:Mr.ZodEnum,...Vr(e)})}class _p extends Qr{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return sr(t,{expected:Pn.joinValues(n),received:t.parsedType,code:Rt.invalid_type}),Lr}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return sr(t,{received:t.data,code:Rt.invalid_enum_value,options:n}),Lr}return Ca(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return _p.create(e)}exclude(e){return _p.create(this.options.filter(t=>!e.includes(t)))}}_p.create=iZ;class V5 extends Qr{_parse(e){const t=Pn.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ir.string&&n.parsedType!==ir.number){const i=Pn.objectValues(t);return sr(n,{expected:Pn.joinValues(i),received:n.parsedType,code:Rt.invalid_type}),Lr}if(t.indexOf(e.data)===-1){const i=Pn.objectValues(t);return sr(n,{received:n.data,code:Rt.invalid_enum_value,options:i}),Lr}return Ca(e.data)}get enum(){return this._def.values}}V5.create=(r,e)=>new V5({values:r,typeName:Mr.ZodNativeEnum,...Vr(e)});class Sw extends Qr{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ir.promise&&t.common.async===!1)return sr(t,{code:Rt.invalid_type,expected:ir.promise,received:t.parsedType}),Lr;const n=t.parsedType===ir.promise?t.data:Promise.resolve(t.data);return Ca(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Sw.create=(r,e)=>new Sw({type:r,typeName:Mr.ZodPromise,...Vr(e)});class Iu extends Qr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Mr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{sr(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Lr:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Lr:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!B5(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>B5(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:t.value,value:a})):o);Pn.assertNever(i)}}Iu.create=(r,e,t)=>new Iu({schema:r,typeName:Mr.ZodEffects,effect:e,...Vr(t)}),Iu.createWithPreprocess=(r,e,t)=>new Iu({schema:e,effect:{type:"preprocess",transform:r},typeName:Mr.ZodEffects,...Vr(t)});class sd extends Qr{_parse(e){return this._getType(e)===ir.undefined?Ca(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}sd.create=(r,e)=>new sd({innerType:r,typeName:Mr.ZodOptional,...Vr(e)});class fg extends Qr{_parse(e){return this._getType(e)===ir.null?Ca(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fg.create=(r,e)=>new fg({innerType:r,typeName:Mr.ZodNullable,...Vr(e)});class G5 extends Qr{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===ir.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}G5.create=(r,e)=>new G5({innerType:r,typeName:Mr.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Vr(e)});class X_ extends Qr{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return G_(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Au(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Au(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}X_.create=(r,e)=>new X_({innerType:r,typeName:Mr.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Vr(e)});class eE extends Qr{_parse(e){if(this._getType(e)!==ir.nan){const n=this._getOrReturnCtx(e);return sr(n,{code:Rt.invalid_type,expected:ir.nan,received:n.parsedType}),Lr}return{status:"valid",value:e.data}}}eE.create=r=>new eE({typeName:Mr.ZodNaN,...Vr(r)});const _be=Symbol("zod_brand");class sZ extends Qr{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class K5 extends Qr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Lr:s.status==="dirty"?(t.dirty(),rZ(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Lr:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new K5({in:e,out:t,typeName:Mr.ZodPipeline})}}class tE extends Qr{_parse(e){const t=this._def.innerType._parse(e);return B5(t)&&(t.value=Object.freeze(t.value)),t}}tE.create=(r,e)=>new tE({innerType:r,typeName:Mr.ZodReadonly,...Vr(e)});const oZ=(r,e={},t)=>r?Ew.create().superRefine((n,i)=>{var s,o;if(!r(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:l})}}):Ew.create(),Ebe={object:Qi.lazycreate};var Mr;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Mr||(Mr={}));const Abe=(r,e={message:`Input not instance of ${r.name}`})=>oZ(t=>t instanceof r,e),aZ=Cu.create,cZ=yp.create,Cbe=eE.create,Sbe=xp.create,lZ=L5.create,Ibe=lg.create,Tbe=K_.create,Rbe=U5.create,kbe=F5.create,Mbe=Ew.create,Nbe=ug.create,Pbe=id.create,Obe=Z_.create,Dbe=Su.create,$be=Qi.create,Bbe=Qi.strictCreate,Lbe=j5.create,Ube=Y_.create,Fbe=z5.create,jbe=Bh.create,zbe=H5.create,Hbe=Q_.create,qbe=hg.create,Wbe=Cw.create,Vbe=q5.create,Gbe=W5.create,Kbe=_p.create,Zbe=V5.create,Jbe=Sw.create,uZ=Iu.create,Ybe=sd.create,Qbe=fg.create,Xbe=Iu.createWithPreprocess,ewe=K5.create;var ge=Object.freeze({__proto__:null,defaultErrorMap:$5,setErrorMap:lbe,getErrorMap:W_,makeIssue:V_,EMPTY_PATH:ube,addIssueToContext:sr,ParseStatus:oa,INVALID:Lr,DIRTY:rZ,OK:Ca,isAborted:$R,isDirty:BR,isValid:B5,isAsync:G_,get util(){return Pn},get objectUtil(){return DR},ZodParsedType:ir,getParsedType:vp,ZodType:Qr,ZodString:Cu,ZodNumber:yp,ZodBigInt:xp,ZodBoolean:L5,ZodDate:lg,ZodSymbol:K_,ZodUndefined:U5,ZodNull:F5,ZodAny:Ew,ZodUnknown:ug,ZodNever:id,ZodVoid:Z_,ZodArray:Su,ZodObject:Qi,ZodUnion:j5,ZodDiscriminatedUnion:Y_,ZodIntersection:z5,ZodTuple:Bh,ZodRecord:H5,ZodMap:Q_,ZodSet:hg,ZodFunction:Cw,ZodLazy:q5,ZodLiteral:W5,ZodEnum:_p,ZodNativeEnum:V5,ZodPromise:Sw,ZodEffects:Iu,ZodTransformer:Iu,ZodOptional:sd,ZodNullable:fg,ZodDefault:G5,ZodCatch:X_,ZodNaN:eE,BRAND:_be,ZodBranded:sZ,ZodPipeline:K5,ZodReadonly:tE,custom:oZ,Schema:Qr,ZodSchema:Qr,late:Ebe,get ZodFirstPartyTypeKind(){return Mr},coerce:{string:r=>Cu.create({...r,coerce:!0}),number:r=>yp.create({...r,coerce:!0}),boolean:r=>L5.create({...r,coerce:!0}),bigint:r=>xp.create({...r,coerce:!0}),date:r=>lg.create({...r,coerce:!0})},any:Mbe,array:Dbe,bigint:Sbe,boolean:lZ,date:Ibe,discriminatedUnion:Ube,effect:uZ,enum:Kbe,function:Wbe,instanceof:Abe,intersection:Fbe,lazy:Vbe,literal:Gbe,map:Hbe,nan:Cbe,nativeEnum:Zbe,never:Pbe,null:kbe,nullable:Qbe,number:cZ,object:$be,oboolean:()=>lZ().optional(),onumber:()=>cZ().optional(),optional:Ybe,ostring:()=>aZ().optional(),pipeline:ewe,preprocess:Xbe,promise:Jbe,record:zbe,set:qbe,strictObject:Bbe,string:aZ,symbol:Tbe,transformer:uZ,tuple:jbe,undefined:Rbe,union:Lbe,unknown:Nbe,void:Obe,NEVER:Lr,ZodIssueCode:Rt,quotelessJson:cbe,ZodError:Au});const twe=r=>r.message?r.message:"unspecified error";class rE extends D5{constructor(e){super(),this.code=q2e,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]: + */(function(r){const e=ME,t=eM,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=f,r.SlowBuffer=j,r.INSPECT_MAX_BYTES=50;const i=2147483647;r.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:o}=globalThis;f.TYPED_ARRAY_SUPPORT=l(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const ne=new s(1),Y={foo:function(){return 42}};return Object.setPrototypeOf(Y,s.prototype),Object.setPrototypeOf(ne,Y),ne.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function u(ne){if(ne>i)throw new RangeError('The value "'+ne+'" is invalid for option "size"');const Y=new s(ne);return Object.setPrototypeOf(Y,f.prototype),Y}function f(ne,Y,X){if(typeof ne=="number"){if(typeof Y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(ne)}return h(ne,Y,X)}f.poolSize=8192;function h(ne,Y,X){if(typeof ne=="string")return C(ne,Y);if(a.isView(ne))return k(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ne);if(Ge(ne,a)||ne&&Ge(ne.buffer,a)||typeof o<"u"&&(Ge(ne,o)||ne&&Ge(ne.buffer,o)))return P(ne,Y,X);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ue=ne.valueOf&&ne.valueOf();if(ue!=null&&ue!==ne)return f.from(ue,Y,X);const we=N(ne);if(we)return we;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return f.from(ne[Symbol.toPrimitive]("string"),Y,X);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ne)}f.from=function(ne,Y,X){return h(ne,Y,X)},Object.setPrototypeOf(f.prototype,s.prototype),Object.setPrototypeOf(f,s);function m(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function b(ne,Y,X){return m(ne),ne<=0?u(ne):Y!==void 0?typeof X=="string"?u(ne).fill(Y,X):u(ne).fill(Y):u(ne)}f.alloc=function(ne,Y,X){return b(ne,Y,X)};function v(ne){return m(ne),u(ne<0?0:$(ne)|0)}f.allocUnsafe=function(ne){return v(ne)},f.allocUnsafeSlow=function(ne){return v(ne)};function C(ne,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!f.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);const X=G(ne,Y)|0;let ue=u(X);const we=ue.write(ne,Y);return we!==X&&(ue=ue.slice(0,we)),ue}function R(ne){const Y=ne.length<0?0:$(ne.length)|0,X=u(Y);for(let ue=0;ue=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return ne|0}function j(ne){return+ne!=ne&&(ne=0),f.alloc(+ne)}f.isBuffer=function(Y){return Y!=null&&Y._isBuffer===!0&&Y!==f.prototype},f.compare=function(Y,X){if(Ge(Y,s)&&(Y=f.from(Y,Y.offset,Y.byteLength)),Ge(X,s)&&(X=f.from(X,X.offset,X.byteLength)),!f.isBuffer(Y)||!f.isBuffer(X))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Y===X)return 0;let ue=Y.length,we=X.length;for(let Ce=0,Te=Math.min(ue,we);Cewe.length?(f.isBuffer(Te)||(Te=f.from(Te)),Te.copy(we,Ce)):s.prototype.set.call(we,Te,Ce);else if(f.isBuffer(Te))Te.copy(we,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=Te.length}return we};function G(ne,Y){if(f.isBuffer(ne))return ne.length;if(a.isView(ne)||Ge(ne,a))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ne);const X=ne.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&X===0)return 0;let we=!1;for(;;)switch(Y){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return Qe(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Xe(ne).length;default:if(we)return ue?-1:Qe(ne).length;Y=(""+Y).toLowerCase(),we=!0}}f.byteLength=G;function U(ne,Y,X){let ue=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0,Y>>>=0,X<=Y))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return A(this,Y,X);case"utf8":case"utf-8":return S(this,Y,X);case"ascii":return E(this,Y,X);case"latin1":case"binary":return M(this,Y,X);case"base64":return _(this,Y,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Y,X);default:if(ue)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),ue=!0}}f.prototype._isBuffer=!0;function L(ne,Y,X){const ue=ne[Y];ne[Y]=ne[X],ne[X]=ue}f.prototype.swap16=function(){const Y=this.length;if(Y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let X=0;XX&&(Y+=" ... "),""},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(Y,X,ue,we,Ce){if(Ge(Y,s)&&(Y=f.from(Y,Y.offset,Y.byteLength)),!f.isBuffer(Y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Y);if(X===void 0&&(X=0),ue===void 0&&(ue=Y?Y.length:0),we===void 0&&(we=0),Ce===void 0&&(Ce=this.length),X<0||ue>Y.length||we<0||Ce>this.length)throw new RangeError("out of range index");if(we>=Ce&&X>=ue)return 0;if(we>=Ce)return-1;if(X>=ue)return 1;if(X>>>=0,ue>>>=0,we>>>=0,Ce>>>=0,this===Y)return 0;let Te=Ce-we,lt=ue-X;const Ct=Math.min(Te,lt),We=this.slice(we,Ce),At=Y.slice(X,ue);for(let xt=0;xt2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,et(X)&&(X=we?0:ne.length-1),X<0&&(X=ne.length+X),X>=ne.length){if(we)return-1;X=ne.length-1}else if(X<0)if(we)X=0;else return-1;if(typeof Y=="string"&&(Y=f.from(Y,ue)),f.isBuffer(Y))return Y.length===0?-1:te(ne,Y,X,ue,we);if(typeof Y=="number")return Y=Y&255,typeof s.prototype.indexOf=="function"?we?s.prototype.indexOf.call(ne,Y,X):s.prototype.lastIndexOf.call(ne,Y,X):te(ne,[Y],X,ue,we);throw new TypeError("val must be string, number or Buffer")}function te(ne,Y,X,ue,we){let Ce=1,Te=ne.length,lt=Y.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(ne.length<2||Y.length<2)return-1;Ce=2,Te/=2,lt/=2,X/=2}function Ct(At,xt){return Ce===1?At[xt]:At.readUInt16BE(xt*Ce)}let We;if(we){let At=-1;for(We=X;WeTe&&(X=Te-lt),We=X;We>=0;We--){let At=!0;for(let xt=0;xtwe&&(ue=we)):ue=we;const Ce=Y.length;ue>Ce/2&&(ue=Ce/2);let Te;for(Te=0;Te>>0,isFinite(ue)?(ue=ue>>>0,we===void 0&&(we="utf8")):(we=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ce=this.length-X;if((ue===void 0||ue>Ce)&&(ue=Ce),Y.length>0&&(ue<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let Te=!1;for(;;)switch(we){case"hex":return D(this,Y,X,ue);case"utf8":case"utf-8":return x(this,Y,X,ue);case"ascii":case"latin1":case"binary":return y(this,Y,X,ue);case"base64":return p(this,Y,X,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,Y,X,ue);default:if(Te)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Te=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(ne,Y,X){return Y===0&&X===ne.length?e.fromByteArray(ne):e.fromByteArray(ne.slice(Y,X))}function S(ne,Y,X){X=Math.min(ne.length,X);const ue=[];let we=Y;for(;we239?4:Ce>223?3:Ce>191?2:1;if(we+lt<=X){let Ct,We,At,xt;switch(lt){case 1:Ce<128&&(Te=Ce);break;case 2:Ct=ne[we+1],(Ct&192)===128&&(xt=(Ce&31)<<6|Ct&63,xt>127&&(Te=xt));break;case 3:Ct=ne[we+1],We=ne[we+2],(Ct&192)===128&&(We&192)===128&&(xt=(Ce&15)<<12|(Ct&63)<<6|We&63,xt>2047&&(xt<55296||xt>57343)&&(Te=xt));break;case 4:Ct=ne[we+1],We=ne[we+2],At=ne[we+3],(Ct&192)===128&&(We&192)===128&&(At&192)===128&&(xt=(Ce&15)<<18|(Ct&63)<<12|(We&63)<<6|At&63,xt>65535&&xt<1114112&&(Te=xt))}}Te===null?(Te=65533,lt=1):Te>65535&&(Te-=65536,ue.push(Te>>>10&1023|55296),Te=56320|Te&1023),ue.push(Te),we+=lt}return I(ue)}const T=4096;function I(ne){const Y=ne.length;if(Y<=T)return String.fromCharCode.apply(String,ne);let X="",ue=0;for(;ueue)&&(X=ue);let we="";for(let Ce=Y;Ceue&&(Y=ue),X<0?(X+=ue,X<0&&(X=0)):X>ue&&(X=ue),XX)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(Y,X,ue){Y=Y>>>0,X=X>>>0,ue||ae(Y,X,this.length);let we=this[Y],Ce=1,Te=0;for(;++Te>>0,X=X>>>0,ue||ae(Y,X,this.length);let we=this[Y+--X],Ce=1;for(;X>0&&(Ce*=256);)we+=this[Y+--X]*Ce;return we},f.prototype.readUint8=f.prototype.readUInt8=function(Y,X){return Y=Y>>>0,X||ae(Y,1,this.length),this[Y]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(Y,X){return Y=Y>>>0,X||ae(Y,2,this.length),this[Y]|this[Y+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(Y,X){return Y=Y>>>0,X||ae(Y,2,this.length),this[Y]<<8|this[Y+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(Y,X){return Y=Y>>>0,X||ae(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+this[Y+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(Y,X){return Y=Y>>>0,X||ae(Y,4,this.length),this[Y]*16777216+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},f.prototype.readBigUInt64LE=Ke(function(Y){Y=Y>>>0,Me(Y,"offset");const X=this[Y],ue=this[Y+7];(X===void 0||ue===void 0)&&Oe(Y,this.length-8);const we=X+this[++Y]*2**8+this[++Y]*2**16+this[++Y]*2**24,Ce=this[++Y]+this[++Y]*2**8+this[++Y]*2**16+ue*2**24;return BigInt(we)+(BigInt(Ce)<>>0,Me(Y,"offset");const X=this[Y],ue=this[Y+7];(X===void 0||ue===void 0)&&Oe(Y,this.length-8);const we=X*2**24+this[++Y]*2**16+this[++Y]*2**8+this[++Y],Ce=this[++Y]*2**24+this[++Y]*2**16+this[++Y]*2**8+ue;return(BigInt(we)<>>0,X=X>>>0,ue||ae(Y,X,this.length);let we=this[Y],Ce=1,Te=0;for(;++Te=Ce&&(we-=Math.pow(2,8*X)),we},f.prototype.readIntBE=function(Y,X,ue){Y=Y>>>0,X=X>>>0,ue||ae(Y,X,this.length);let we=X,Ce=1,Te=this[Y+--we];for(;we>0&&(Ce*=256);)Te+=this[Y+--we]*Ce;return Ce*=128,Te>=Ce&&(Te-=Math.pow(2,8*X)),Te},f.prototype.readInt8=function(Y,X){return Y=Y>>>0,X||ae(Y,1,this.length),this[Y]&128?(255-this[Y]+1)*-1:this[Y]},f.prototype.readInt16LE=function(Y,X){Y=Y>>>0,X||ae(Y,2,this.length);const ue=this[Y]|this[Y+1]<<8;return ue&32768?ue|4294901760:ue},f.prototype.readInt16BE=function(Y,X){Y=Y>>>0,X||ae(Y,2,this.length);const ue=this[Y+1]|this[Y]<<8;return ue&32768?ue|4294901760:ue},f.prototype.readInt32LE=function(Y,X){return Y=Y>>>0,X||ae(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},f.prototype.readInt32BE=function(Y,X){return Y=Y>>>0,X||ae(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},f.prototype.readBigInt64LE=Ke(function(Y){Y=Y>>>0,Me(Y,"offset");const X=this[Y],ue=this[Y+7];(X===void 0||ue===void 0)&&Oe(Y,this.length-8);const we=this[Y+4]+this[Y+5]*2**8+this[Y+6]*2**16+(ue<<24);return(BigInt(we)<>>0,Me(Y,"offset");const X=this[Y],ue=this[Y+7];(X===void 0||ue===void 0)&&Oe(Y,this.length-8);const we=(X<<24)+this[++Y]*2**16+this[++Y]*2**8+this[++Y];return(BigInt(we)<>>0,X||ae(Y,4,this.length),t.read(this,Y,!0,23,4)},f.prototype.readFloatBE=function(Y,X){return Y=Y>>>0,X||ae(Y,4,this.length),t.read(this,Y,!1,23,4)},f.prototype.readDoubleLE=function(Y,X){return Y=Y>>>0,X||ae(Y,8,this.length),t.read(this,Y,!0,52,8)},f.prototype.readDoubleBE=function(Y,X){return Y=Y>>>0,X||ae(Y,8,this.length),t.read(this,Y,!1,52,8)};function W(ne,Y,X,ue,we,Ce){if(!f.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>we||Yne.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(Y,X,ue,we){if(Y=+Y,X=X>>>0,ue=ue>>>0,!we){const lt=Math.pow(2,8*ue)-1;W(this,Y,X,ue,lt,0)}let Ce=1,Te=0;for(this[X]=Y&255;++Te>>0,ue=ue>>>0,!we){const lt=Math.pow(2,8*ue)-1;W(this,Y,X,ue,lt,0)}let Ce=ue-1,Te=1;for(this[X+Ce]=Y&255;--Ce>=0&&(Te*=256);)this[X+Ce]=Y/Te&255;return X+ue},f.prototype.writeUint8=f.prototype.writeUInt8=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,1,255,0),this[X]=Y&255,X+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,2,65535,0),this[X]=Y&255,this[X+1]=Y>>>8,X+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,2,65535,0),this[X]=Y>>>8,this[X+1]=Y&255,X+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,4,4294967295,0),this[X+3]=Y>>>24,this[X+2]=Y>>>16,this[X+1]=Y>>>8,this[X]=Y&255,X+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,4,4294967295,0),this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255,X+4};function Z(ne,Y,X,ue,we){Ee(Y,ue,we,ne,X,7);let Ce=Number(Y&BigInt(4294967295));ne[X++]=Ce,Ce=Ce>>8,ne[X++]=Ce,Ce=Ce>>8,ne[X++]=Ce,Ce=Ce>>8,ne[X++]=Ce;let Te=Number(Y>>BigInt(32)&BigInt(4294967295));return ne[X++]=Te,Te=Te>>8,ne[X++]=Te,Te=Te>>8,ne[X++]=Te,Te=Te>>8,ne[X++]=Te,X}function K(ne,Y,X,ue,we){Ee(Y,ue,we,ne,X,7);let Ce=Number(Y&BigInt(4294967295));ne[X+7]=Ce,Ce=Ce>>8,ne[X+6]=Ce,Ce=Ce>>8,ne[X+5]=Ce,Ce=Ce>>8,ne[X+4]=Ce;let Te=Number(Y>>BigInt(32)&BigInt(4294967295));return ne[X+3]=Te,Te=Te>>8,ne[X+2]=Te,Te=Te>>8,ne[X+1]=Te,Te=Te>>8,ne[X]=Te,X+8}f.prototype.writeBigUInt64LE=Ke(function(Y,X=0){return Z(this,Y,X,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Ke(function(Y,X=0){return K(this,Y,X,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(Y,X,ue,we){if(Y=+Y,X=X>>>0,!we){const Ct=Math.pow(2,8*ue-1);W(this,Y,X,ue,Ct-1,-Ct)}let Ce=0,Te=1,lt=0;for(this[X]=Y&255;++Ce>0)-lt&255;return X+ue},f.prototype.writeIntBE=function(Y,X,ue,we){if(Y=+Y,X=X>>>0,!we){const Ct=Math.pow(2,8*ue-1);W(this,Y,X,ue,Ct-1,-Ct)}let Ce=ue-1,Te=1,lt=0;for(this[X+Ce]=Y&255;--Ce>=0&&(Te*=256);)Y<0&<===0&&this[X+Ce+1]!==0&&(lt=1),this[X+Ce]=(Y/Te>>0)-lt&255;return X+ue},f.prototype.writeInt8=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,1,127,-128),Y<0&&(Y=255+Y+1),this[X]=Y&255,X+1},f.prototype.writeInt16LE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,2,32767,-32768),this[X]=Y&255,this[X+1]=Y>>>8,X+2},f.prototype.writeInt16BE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,2,32767,-32768),this[X]=Y>>>8,this[X+1]=Y&255,X+2},f.prototype.writeInt32LE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,4,2147483647,-2147483648),this[X]=Y&255,this[X+1]=Y>>>8,this[X+2]=Y>>>16,this[X+3]=Y>>>24,X+4},f.prototype.writeInt32BE=function(Y,X,ue){return Y=+Y,X=X>>>0,ue||W(this,Y,X,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255,X+4},f.prototype.writeBigInt64LE=Ke(function(Y,X=0){return Z(this,Y,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Ke(function(Y,X=0){return K(this,Y,X,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ee(ne,Y,X,ue,we,Ce){if(X+ue>ne.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function re(ne,Y,X,ue,we){return Y=+Y,X=X>>>0,we||ee(ne,Y,X,4),t.write(ne,Y,X,ue,23,4),X+4}f.prototype.writeFloatLE=function(Y,X,ue){return re(this,Y,X,!0,ue)},f.prototype.writeFloatBE=function(Y,X,ue){return re(this,Y,X,!1,ue)};function H(ne,Y,X,ue,we){return Y=+Y,X=X>>>0,we||ee(ne,Y,X,8),t.write(ne,Y,X,ue,52,8),X+8}f.prototype.writeDoubleLE=function(Y,X,ue){return H(this,Y,X,!0,ue)},f.prototype.writeDoubleBE=function(Y,X,ue){return H(this,Y,X,!1,ue)},f.prototype.copy=function(Y,X,ue,we){if(!f.isBuffer(Y))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!we&&we!==0&&(we=this.length),X>=Y.length&&(X=Y.length),X||(X=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),Y.length-X>>0,ue=ue===void 0?this.length:ue>>>0,Y||(Y=0);let Ce;if(typeof Y=="number")for(Ce=X;Ce2**32?we=fe(String(X)):typeof X=="bigint"&&(we=String(X),(X>BigInt(2)**BigInt(32)||X<-(BigInt(2)**BigInt(32)))&&(we=fe(we)),we+="n"),ue+=` It must be ${Y}. Received ${we}`,ue},RangeError);function fe(ne){let Y="",X=ne.length;const ue=ne[0]==="-"?1:0;for(;X>=ue+4;X-=3)Y=`_${ne.slice(X-3,X)}${Y}`;return`${ne.slice(0,X)}${Y}`}function pe(ne,Y,X){Me(Y,"offset"),(ne[Y]===void 0||ne[Y+X]===void 0)&&Oe(Y,ne.length-(X+1))}function Ee(ne,Y,X,ue,we,Ce){if(ne>X||ne= 0${Te} and < 2${Te} ** ${(Ce+1)*8}${Te}`:lt=`>= -(2${Te} ** ${(Ce+1)*8-1}${Te}) and < 2 ** ${(Ce+1)*8-1}${Te}`,new F.ERR_OUT_OF_RANGE("value",lt,ne)}pe(ue,we,Ce)}function Me(ne,Y){if(typeof ne!="number")throw new F.ERR_INVALID_ARG_TYPE(Y,"number",ne)}function Oe(ne,Y,X){throw Math.floor(ne)!==ne?(Me(ne,X),new F.ERR_OUT_OF_RANGE("offset","an integer",ne)):Y<0?new F.ERR_BUFFER_OUT_OF_BOUNDS:new F.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Y}`,ne)}const je=/[^+/0-9A-Za-z-_]/g;function Re(ne){if(ne=ne.split("=")[0],ne=ne.trim().replace(je,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function Qe(ne,Y){Y=Y||1/0;let X;const ue=ne.length;let we=null;const Ce=[];for(let Te=0;Te55295&&X<57344){if(!we){if(X>56319){(Y-=3)>-1&&Ce.push(239,191,189);continue}else if(Te+1===ue){(Y-=3)>-1&&Ce.push(239,191,189);continue}we=X;continue}if(X<56320){(Y-=3)>-1&&Ce.push(239,191,189),we=X;continue}X=(we-55296<<10|X-56320)+65536}else we&&(Y-=3)>-1&&Ce.push(239,191,189);if(we=null,X<128){if((Y-=1)<0)break;Ce.push(X)}else if(X<2048){if((Y-=2)<0)break;Ce.push(X>>6|192,X&63|128)}else if(X<65536){if((Y-=3)<0)break;Ce.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Y-=4)<0)break;Ce.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return Ce}function Ne(ne){const Y=[];for(let X=0;X>8,we=X%256,Ce.push(we),Ce.push(ue);return Ce}function Xe(ne){return e.toByteArray(Re(ne))}function Le(ne,Y,X,ue){let we;for(we=0;we=Y.length||we>=ne.length);++we)Y[we+X]=ne[we];return we}function Ge(ne,Y){return ne instanceof Y||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===Y.name}function et(ne){return ne!==ne}const Be=function(){const ne="0123456789abcdef",Y=new Array(256);for(let X=0;X<16;++X){const ue=X*16;for(let we=0;we<16;++we)Y[ue+we]=ne[X]+ne[we]}return Y}();function Ke(ne){return typeof BigInt>"u"?pt:ne}function pt(){throw new Error("BigInt not supported")}})(Ks);const It=Ks.Buffer,Pwe=Ks.Blob,Owe=Ks.BlobOptions,qJ=Ks.Buffer,Nwe=Ks.File,Dwe=Ks.FileOptions,$we=Ks.INSPECT_MAX_BYTES,Bwe=Ks.SlowBuffer,Lwe=Ks.TranscodeEncoding,Uwe=Ks.atob,Fwe=Ks.btoa,jwe=Ks.constants,zwe=Ks.isAscii,Hwe=Ks.isUtf8,qwe=Ks.kMaxLength,Wwe=Ks.kStringMaxLength,Vwe=Ks.resolveObjectURL,Gwe=Ks.transcode,Kwe=Object.freeze(Object.defineProperty({__proto__:null,Blob:Pwe,BlobOptions:Owe,Buffer:qJ,File:Nwe,FileOptions:Dwe,INSPECT_MAX_BYTES:$we,SlowBuffer:Bwe,TranscodeEncoding:Lwe,atob:Uwe,btoa:Fwe,constants:jwe,default:It,isAscii:zwe,isUtf8:Hwe,kMaxLength:qwe,kStringMaxLength:Wwe,resolveObjectURL:Vwe,transcode:Gwe},Symbol.toStringTag,{value:"Module"}));function Cn(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i)}ct.inherits(Cn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ct.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const WJ=Cn.prototype,VJ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{VJ[r]={value:r}}),Object.defineProperties(Cn,VJ),Object.defineProperty(WJ,"isAxiosError",{value:!0}),Cn.from=(r,e,t,n,i,s)=>{const a=Object.create(WJ);return ct.toFlatObject(r,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Cn.call(a,r.message,e,t,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const Zwe=null;function tM(r){return ct.isPlainObject(r)||ct.isArray(r)}function GJ(r){return ct.endsWith(r,"[]")?r.slice(0,-2):r}function KJ(r,e,t){return r?r.concat(e).map(function(i,s){return i=GJ(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function Jwe(r){return ct.isArray(r)&&!r.some(tM)}const Ywe=ct.toFlatObject(ct,{},null,function(e){return/^is[A-Z]/.test(e)});function PE(r,e,t){if(!ct.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ct.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,R){return!ct.isUndefined(R[C])});const n=t.metaTokens,i=t.visitor||f,s=t.dots,a=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&ct.isSpecCompliantForm(e);if(!ct.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(ct.isDate(v))return v.toISOString();if(!l&&ct.isBlob(v))throw new Cn("Blob is not supported. Use a Buffer instead.");return ct.isArrayBuffer(v)||ct.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):It.from(v):v}function f(v,C,R){let k=v;if(v&&!R&&typeof v=="object"){if(ct.endsWith(C,"{}"))C=n?C:C.slice(0,-2),v=JSON.stringify(v);else if(ct.isArray(v)&&Jwe(v)||(ct.isFileList(v)||ct.endsWith(C,"[]"))&&(k=ct.toArray(v)))return C=GJ(C),k.forEach(function(N,$){!(ct.isUndefined(N)||N===null)&&e.append(a===!0?KJ([C],$,s):a===null?C:C+"[]",u(N))}),!1}return tM(v)?!0:(e.append(KJ(R,C,s),u(v)),!1)}const h=[],m=Object.assign(Ywe,{defaultVisitor:f,convertValue:u,isVisitable:tM});function b(v,C){if(!ct.isUndefined(v)){if(h.indexOf(v)!==-1)throw Error("Circular reference detected in "+C.join("."));h.push(v),ct.forEach(v,function(k,P){(!(ct.isUndefined(k)||k===null)&&i.call(e,k,ct.isString(P)?P.trim():P,C,m))===!0&&b(k,C?C.concat(P):[P])}),h.pop()}}if(!ct.isObject(r))throw new TypeError("data must be an object");return b(r),e}function ZJ(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function rM(r,e){this._pairs=[],r&&PE(r,this,e)}const JJ=rM.prototype;JJ.append=function(e,t){this._pairs.push([e,t])},JJ.toString=function(e){const t=e?function(n){return e.call(this,n,ZJ)}:ZJ;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function Qwe(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function YJ(r,e,t){if(!e)return r;const n=t&&t.encode||Qwe,i=t&&t.serialize;let s;if(i?s=i(e,t):s=ct.isURLSearchParams(e)?e.toString():new rM(e,t).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class QJ{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ct.forEach(this.handlers,function(n){n!==null&&e(n)})}}const XJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xwe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:rM,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},eY=typeof window<"u"&&typeof document<"u",e3e=(r=>eY&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),t3e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ed={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:eY,hasStandardBrowserEnv:e3e,hasStandardBrowserWebWorkerEnv:t3e},Symbol.toStringTag,{value:"Module"})),...Xwe};function r3e(r,e){return PE(r,new ed.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return ed.isNode&&ct.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function n3e(r){return ct.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function i3e(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n=t.length;return a=!a&&ct.isArray(i)?i.length:a,l?(ct.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):((!i[a]||!ct.isObject(i[a]))&&(i[a]=[]),e(t,n,i[a],s)&&ct.isArray(i[a])&&(i[a]=i3e(i[a])),!o)}if(ct.isFormData(r)&&ct.isFunction(r.entries)){const t={};return ct.forEachEntry(r,(n,i)=>{e(n3e(n),i,t,0)}),t}return null}function s3e(r,e,t){if(ct.isString(r))try{return(e||JSON.parse)(r),ct.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(r)}const B4={transitional:XJ,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=ct.isObject(e);if(s&&ct.isHTMLForm(e)&&(e=new FormData(e)),ct.isFormData(e))return i?JSON.stringify(tY(e)):e;if(ct.isArrayBuffer(e)||ct.isBuffer(e)||ct.isStream(e)||ct.isFile(e)||ct.isBlob(e))return e;if(ct.isArrayBufferView(e))return e.buffer;if(ct.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return r3e(e,this.formSerializer).toString();if((o=ct.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return PE(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),s3e(e)):e}],transformResponse:[function(e){const t=this.transitional||B4.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(e&&ct.isString(e)&&(n&&!this.responseType||i)){const a=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?Cn.from(o,Cn.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ed.classes.FormData,Blob:ed.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ct.forEach(["delete","get","head","post","put","patch"],r=>{B4.headers[r]={}});const a3e=ct.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),o3e=r=>{const e={};let t,n,i;return r&&r.split(` +`).forEach(function(a){i=a.indexOf(":"),t=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!t||e[t]&&a3e[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},rY=Symbol("internals");function L4(r){return r&&String(r).trim().toLowerCase()}function OE(r){return r===!1||r==null?r:ct.isArray(r)?r.map(OE):String(r)}function c3e(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const l3e=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function nM(r,e,t,n,i){if(ct.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!ct.isString(e)){if(ct.isString(n))return e.indexOf(n)!==-1;if(ct.isRegExp(n))return n.test(e)}}function u3e(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function f3e(r,e){const t=ct.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}class Ul{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(o,l,u){const f=L4(l);if(!f)throw new Error("header name must be a non-empty string");const h=ct.findKey(i,f);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||l]=OE(o))}const a=(o,l)=>ct.forEach(o,(u,f)=>s(u,f,l));return ct.isPlainObject(e)||e instanceof this.constructor?a(e,t):ct.isString(e)&&(e=e.trim())&&!l3e(e)?a(o3e(e),t):e!=null&&s(t,e,n),this}get(e,t){if(e=L4(e),e){const n=ct.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return c3e(i);if(ct.isFunction(t))return t.call(this,i,n);if(ct.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=L4(e),e){const n=ct.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||nM(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(a){if(a=L4(a),a){const o=ct.findKey(n,a);o&&(!t||nM(n,n[o],o,t))&&(delete n[o],i=!0)}}return ct.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];(!e||nM(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return ct.forEach(this,(i,s)=>{const a=ct.findKey(n,s);if(a){t[a]=OE(i),delete t[s];return}const o=e?u3e(s):String(s).trim();o!==s&&delete t[s],t[o]=OE(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ct.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&ct.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[rY]=this[rY]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=L4(a);n[o]||(f3e(i,a),n[o]=!0)}return ct.isArray(e)?e.forEach(s):s(e),this}}Ul.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ct.reduceDescriptors(Ul.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}}),ct.freezeMethods(Ul);function iM(r,e){const t=this||B4,n=e||t,i=Ul.from(n.headers);let s=n.data;return ct.forEach(r,function(o){s=o.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function nY(r){return!!(r&&r.__CANCEL__)}function U4(r,e,t){Cn.call(this,r??"canceled",Cn.ERR_CANCELED,e,t),this.name="CanceledError"}ct.inherits(U4,Cn,{__CANCEL__:!0});function d3e(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Cn("Request failed with status code "+t.status,[Cn.ERR_BAD_REQUEST,Cn.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const h3e=ed.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const a=[r+"="+encodeURIComponent(e)];ct.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),ct.isString(n)&&a.push("path="+n),ct.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function p3e(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function m3e(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function iY(r,e){return r&&!p3e(e)?m3e(r,e):e}const g3e=ed.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(s){let a=s;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(a){const o=ct.isString(a)?i(a):a;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}();function b3e(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function v3e(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),f=n[s];a||(a=u),t[i]=l,n[i]=u;let h=s,m=0;for(;h!==i;)m+=t[h++],h=h%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),u-a{const s=i.loaded,a=i.lengthComputable?i.total:void 0,o=s-t,l=n(o),u=s<=a;t=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:o,rate:l||void 0,estimated:l&&a&&u?(a-s)/l:void 0,event:i};f[e?"download":"upload"]=!0,r(f)}}const sM={http:Zwe,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(t,n){let i=r.data;const s=Ul.from(r.headers).normalize();let{responseType:a,withXSRFToken:o}=r,l;function u(){r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let f;if(ct.isFormData(i)){if(ed.hasStandardBrowserEnv||ed.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((f=s.getContentType())!==!1){const[C,...R]=f?f.split(";").map(k=>k.trim()).filter(Boolean):[];s.setContentType([C||"multipart/form-data",...R].join("; "))}}let h=new XMLHttpRequest;if(r.auth){const C=r.auth.username||"",R=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.set("Authorization","Basic "+btoa(C+":"+R))}const m=iY(r.baseURL,r.url);h.open(r.method.toUpperCase(),YJ(m,r.params,r.paramsSerializer),!0),h.timeout=r.timeout;function b(){if(!h)return;const C=Ul.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:r,request:h};d3e(function(N){t(N),u()},function(N){n(N),u()},k),h=null}if("onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b)},h.onabort=function(){h&&(n(new Cn("Request aborted",Cn.ECONNABORTED,r,h)),h=null)},h.onerror=function(){n(new Cn("Network Error",Cn.ERR_NETWORK,r,h)),h=null},h.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const k=r.transitional||XJ;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),n(new Cn(R,k.clarifyTimeoutError?Cn.ETIMEDOUT:Cn.ECONNABORTED,r,h)),h=null},ed.hasStandardBrowserEnv&&(o&&ct.isFunction(o)&&(o=o(r)),o||o!==!1&&g3e(m))){const C=r.xsrfHeaderName&&r.xsrfCookieName&&h3e.read(r.xsrfCookieName);C&&s.set(r.xsrfHeaderName,C)}i===void 0&&s.setContentType(null),"setRequestHeader"in h&&ct.forEach(s.toJSON(),function(R,k){h.setRequestHeader(k,R)}),ct.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),a&&a!=="json"&&(h.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&h.addEventListener("progress",sY(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",sY(r.onUploadProgress)),(r.cancelToken||r.signal)&&(l=C=>{h&&(n(!C||C.type?new U4(null,r,h):C),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const v=b3e(m);if(v&&ed.protocols.indexOf(v)===-1){n(new Cn("Unsupported protocol "+v+":",Cn.ERR_BAD_REQUEST,r));return}h.send(i||null)})}};ct.forEach(sM,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const aY=r=>`- ${r}`,w3e=r=>ct.isFunction(r)||r===null||r===!1,oY={getAdapter:r=>{r=ct.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since : +`+s.map(aY).join(` +`):" "+aY(s[0]):"as no adapter specified";throw new Cn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:sM};function aM(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new U4(null,r)}function cY(r){return aM(r),r.headers=Ul.from(r.headers),r.data=iM.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),oY.getAdapter(r.adapter||B4.adapter)(r).then(function(n){return aM(r),n.data=iM.call(r,r.transformResponse,n),n.headers=Ul.from(n.headers),n},function(n){return nY(n)||(aM(r),n&&n.response&&(n.response.data=iM.call(r,r.transformResponse,n.response),n.response.headers=Ul.from(n.response.headers))),Promise.reject(n)})}const lY=r=>r instanceof Ul?{...r}:r;function hw(r,e){e=e||{};const t={};function n(u,f,h){return ct.isPlainObject(u)&&ct.isPlainObject(f)?ct.merge.call({caseless:h},u,f):ct.isPlainObject(f)?ct.merge({},f):ct.isArray(f)?f.slice():f}function i(u,f,h){if(ct.isUndefined(f)){if(!ct.isUndefined(u))return n(void 0,u,h)}else return n(u,f,h)}function s(u,f){if(!ct.isUndefined(f))return n(void 0,f)}function a(u,f){if(ct.isUndefined(f)){if(!ct.isUndefined(u))return n(void 0,u)}else return n(void 0,f)}function o(u,f,h){if(h in e)return n(u,f);if(h in r)return n(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(u,f)=>i(lY(u),lY(f),!0)};return ct.forEach(Object.keys(Object.assign({},r,e)),function(f){const h=l[f]||i,m=h(r[f],e[f],f);ct.isUndefined(m)&&h!==o||(t[f]=m)}),t}const uY="1.6.8",oM={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{oM[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const fY={};oM.transitional=function(e,t,n){function i(s,a){return"[Axios v"+uY+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(e===!1)throw new Cn(i(a," has been removed"+(t?" in "+t:"")),Cn.ERR_DEPRECATED);return t&&!fY[a]&&(fY[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,a,o):!0}};function y3e(r,e,t){if(typeof r!="object")throw new Cn("options must be an object",Cn.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const o=r[s],l=o===void 0||a(o,s,r);if(l!==!0)throw new Cn("option "+s+" must be "+l,Cn.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Cn("Unknown option "+s,Cn.ERR_BAD_OPTION)}}const cM={assertOptions:y3e,validators:oM},Qp=cM.validators;class Km{constructor(e){this.defaults=e,this.interceptors={request:new QJ,response:new QJ}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+s):n.stack=s}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=hw(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&cM.assertOptions(n,{silentJSONParsing:Qp.transitional(Qp.boolean),forcedJSONParsing:Qp.transitional(Qp.boolean),clarifyTimeoutError:Qp.transitional(Qp.boolean)},!1),i!=null&&(ct.isFunction(i)?t.paramsSerializer={serialize:i}:cM.assertOptions(i,{encode:Qp.function,serialize:Qp.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&ct.merge(s.common,s[t.method]);s&&ct.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),t.headers=Ul.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(t)===!1||(l=l&&C.synchronous,o.unshift(C.fulfilled,C.rejected))});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let f,h=0,m;if(!l){const v=[cY.bind(this),void 0];for(v.unshift.apply(v,o),v.push.apply(v,u),m=v.length,f=Promise.resolve(t);h{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(s,a,o){n.reason||(n.reason=new U4(s,a,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new lM(function(i){e=i}),cancel:e}}}function x3e(r){return function(t){return r.apply(null,t)}}function _3e(r){return ct.isObject(r)&&r.isAxiosError===!0}const uM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uM).forEach(([r,e])=>{uM[e]=r});function dY(r){const e=new Km(r),t=OJ(Km.prototype.request,e);return ct.extend(t,Km.prototype,e,{allOwnKeys:!0}),ct.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return dY(hw(r,i))},t}const js=dY(B4);js.Axios=Km,js.CanceledError=U4,js.CancelToken=lM,js.isCancel=nY,js.VERSION=uY,js.toFormData=PE,js.AxiosError=Cn,js.Cancel=js.CanceledError,js.all=function(e){return Promise.all(e)},js.spread=x3e,js.isAxiosError=_3e,js.mergeConfig=hw,js.AxiosHeaders=Ul,js.formToJSON=r=>tY(ct.isHTMLForm(r)?new FormData(r):r),js.getAdapter=oY.getAdapter,js.HttpStatusCode=uM,js.default=js;function F4(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function E3e(r){if(typeof r!="boolean")throw new Error(`Expected boolean, not ${r}`)}function C3e(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function fM(r,...e){if(!C3e(r))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function A3e(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");F4(r.outputLen),F4(r.blockLen)}function dM(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function hY(r,e){fM(r);const t=e.outputLen;if(r.length>pY&NE)}:{h:Number(r>>pY&NE)|0,l:Number(r&NE)|0}}function T3e(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;ir<>>32-t,R3e=(r,e,t)=>e<>>32-t,M3e=(r,e,t)=>e<>>64-t,P3e=(r,e,t)=>r<>>64-t;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const O3e=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4));function N3e(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function mY(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function gY(r){if(typeof r=="string"&&(r=mY(r)),!N3e(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}let D3e=class{clone(){return this._cloneInto()}};function $3e(r){const e=n=>r().update(gY(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}const[bY,vY,wY]=[[],[],[]],B3e=BigInt(0),j4=BigInt(1),L3e=BigInt(2),U3e=BigInt(7),F3e=BigInt(256),j3e=BigInt(113);for(let r=0,e=j4,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],bY.push(2*(5*n+t)),vY.push((r+1)*(r+2)/2%64);let i=B3e;for(let s=0;s<7;s++)e=(e<>U3e)*j3e)%F3e,e&L3e&&(i^=j4<<(j4<t>32?M3e(r,e,t):k3e(r,e,t),xY=(r,e,t)=>t>32?P3e(r,e,t):R3e(r,e,t);function q3e(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)t[a]=r[a]^r[a+10]^r[a+20]^r[a+30]^r[a+40];for(let a=0;a<10;a+=2){const o=(a+8)%10,l=(a+2)%10,u=t[l],f=t[l+1],h=yY(u,f,1)^t[o],m=xY(u,f,1)^t[o+1];for(let b=0;b<50;b+=10)r[a+b]^=h,r[a+b+1]^=m}let i=r[2],s=r[3];for(let a=0;a<24;a++){const o=vY[a],l=yY(i,s,o),u=xY(i,s,o),f=bY[a];i=r[f],s=r[f+1],r[f]=l,r[f+1]=u}for(let a=0;a<50;a+=10){for(let o=0;o<10;o++)t[o]=r[a+o];for(let o=0;o<10;o++)r[a+o]^=~t[(o+2)%10]&t[(o+4)%10]}r[0]^=z3e[n],r[1]^=H3e[n]}t.fill(0)}let W3e=class Cve extends D3e{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,F4(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=O3e(this.state)}keccak(){q3e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){dM(this);const{blockLen:t,state:n}=this;e=gY(e);const i=e.length;for(let s=0;s=n&&this.keccak();const a=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return F4(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(hY(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new Cve(t,n,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const _Y=((r,e,t)=>$3e(()=>new W3e(e,r,t)))(1,136,256/8);function V3e(r){return e=>(S3e.bytes(e),r(e))}(()=>{const r=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:e&&!r?e("crypto"):void 0,web:r}})();const G3e=(()=>{const r=V3e(_Y);return r.create=_Y.create,r})(),K3e=4001,Z3e=4100,J3e=4200,Y3e=4900,Q3e=4901,X3e=1002,eye=1003,tye=1006,rye=1100,nye=1200,DE=-32700,$E=-32600,BE=-32601,LE=-32602,UE=-32603,FE=-32e3,jE=-32001,zE=-32002,HE=-32003,qE=-32004,WE=-32005,VE=-32006;class z4 extends Error{constructor(e,t){super(e),this.innerError=t,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(e,t=!1){if(e==null)return"undefined";const n=JSON.stringify(e,(i,s)=>typeof s=="bigint"?s.toString():s);return t&&["bigint","string"].includes(typeof e)?n.replace(/['\\"]+/g,""):n}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}}class hM extends z4{constructor(e,t){super(`Invalid value given "${z4.convertToString(e,!0)}". Error: ${t}.`),this.name=this.constructor.name}}class pM extends hM{constructor(e){super(e,"can not parse as byte data"),this.code=X3e}}class iye extends hM{constructor(e){super(e,"can not parse as number data"),this.code=eye}}class sye extends hM{constructor(e){super(e,"can not be converted to hex"),this.code=tye}}const aye="An Rpc error has occured with a code of *code*",Fl={[DE]:{message:"Parse error",description:"Invalid JSON"},[$E]:{message:"Invalid request",description:"JSON is not a valid request object "},[BE]:{message:"Method not found",description:"Method does not exist "},[LE]:{message:"Invalid params",description:"Invalid method parameters"},[UE]:{message:"Internal error",description:"Internal JSON-RPC error"},[FE]:{message:"Invalid input",description:"Missing or invalid parameters"},[jE]:{message:"Resource not found",description:"Requested resource not found"},[zE]:{message:"Resource unavailable",description:"Requested resource not available"},[HE]:{message:"Transaction rejected",description:"Transaction creation failed"},[qE]:{message:"Method not supported",description:"Method is not implemented"},[WE]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[VE]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[K3e]:{name:"User Rejected Request",message:"The user rejected the request."},[Z3e]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[J3e]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[Y3e]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[Q3e]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class jl extends z4{constructor(e,t){super(t??aye.replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class oye extends jl{constructor(e){super(e,Fl[DE].message),this.code=DE}}class cye extends jl{constructor(e){super(e,Fl[$E].message),this.code=$E}}class lye extends jl{constructor(e){super(e,Fl[BE].message),this.code=BE}}class uye extends jl{constructor(e){super(e,Fl[LE].message),this.code=LE}}class fye extends jl{constructor(e){super(e,Fl[UE].message),this.code=UE}}class dye extends jl{constructor(e){super(e,Fl[FE].message),this.code=FE}}class hye extends jl{constructor(e){super(e,Fl[qE].message),this.code=qE}}class pye extends jl{constructor(e){super(e,Fl[zE].message),this.code=zE}}class mye extends jl{constructor(e){super(e,Fl[jE].message),this.code=jE}}class gye extends jl{constructor(e){super(e,Fl[VE].message),this.code=VE}}class bye extends jl{constructor(e){super(e,Fl[HE].message),this.code=HE}}class vye extends jl{constructor(e){super(e,Fl[WE].message),this.code=WE}}const zl=new Map;zl.set(DE,{error:oye}),zl.set($E,{error:cye}),zl.set(BE,{error:lye}),zl.set(LE,{error:uye}),zl.set(UE,{error:fye}),zl.set(FE,{error:dye}),zl.set(qE,{error:hye}),zl.set(zE,{error:pye}),zl.set(HE,{error:bye}),zl.set(jE,{error:mye}),zl.set(VE,{error:gye}),zl.set(WE,{error:vye});class wye extends z4{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=nye}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}var Dn;(function(r){r.assertEqual=i=>i;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},r.getValidEnumValues=i=>{const s=r.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return r.objectValues(a)},r.objectValues=i=>r.objectKeys(i).map(function(s){return i[s]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},r.find=(i,s)=>{for(const a of i)if(s(a))return a},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}r.joinValues=n,r.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Dn||(Dn={}));var mM;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(mM||(mM={}));const ar=Dn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xp=r=>{switch(typeof r){case"undefined":return ar.undefined;case"string":return ar.string;case"number":return isNaN(r)?ar.nan:ar.number;case"boolean":return ar.boolean;case"function":return ar.function;case"bigint":return ar.bigint;case"symbol":return ar.symbol;case"object":return Array.isArray(r)?ar.array:r===null?ar.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?ar.promise:typeof Map<"u"&&r instanceof Map?ar.map:typeof Set<"u"&&r instanceof Set?ar.set:typeof Date<"u"&&r instanceof Date?ar.date:ar.object;default:return ar.unknown}},St=Dn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yye=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class zu extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let o=n,l=0;for(;lt.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}zu.create=r=>new zu(r);const H4=(r,e)=>{let t;switch(r.code){case St.invalid_type:r.received===ar.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case St.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Dn.jsonStringifyReplacer)}`;break;case St.unrecognized_keys:t=`Unrecognized key(s) in object: ${Dn.joinValues(r.keys,", ")}`;break;case St.invalid_union:t="Invalid input";break;case St.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Dn.joinValues(r.options)}`;break;case St.invalid_enum_value:t=`Invalid enum value. Expected ${Dn.joinValues(r.options)}, received '${r.received}'`;break;case St.invalid_arguments:t="Invalid function arguments";break;case St.invalid_return_type:t="Invalid function return type";break;case St.invalid_date:t="Invalid date";break;case St.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Dn.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case St.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case St.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case St.custom:t="Invalid input";break;case St.invalid_intersection_types:t="Intersection results could not be merged";break;case St.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case St.not_finite:t="Number must be finite";break;default:t=e.defaultError,Dn.assertNever(r)}return{message:t}};let EY=H4;function xye(r){EY=r}function GE(){return EY}const KE=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,s=[...t,...i.path||[]],a={...i,path:s};let o="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)o=u(a,{data:e,defaultError:o}).message;return{...i,path:s,message:i.message||o}},_ye=[];function or(r,e){const t=KE({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,GE(),H4].filter(n=>!!n)});r.common.issues.push(t)}class bo{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return zr;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t)n.push({key:await i.key,value:await i.value});return bo.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return zr;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}}const zr=Object.freeze({status:"aborted"}),CY=r=>({status:"dirty",value:r}),Do=r=>({status:"valid",value:r}),gM=r=>r.status==="aborted",bM=r=>r.status==="dirty",q4=r=>r.status==="valid",ZE=r=>typeof Promise<"u"&&r instanceof Promise;var Ir;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ir||(Ir={}));class td{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const AY=(r,e)=>{if(q4(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new zu(r.common.issues);return this._error=t,this._error}}};function Yr(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:n??o.defaultError}:{message:t??o.defaultError},description:i}}class rn{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Xp(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Xp(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bo,ctx:{common:e.parent.common,data:e.data,parsedType:Xp(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ZE(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xp(e)},s=this._parseSync({data:e,path:i.path,parent:i});return AY(i,s)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xp(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(ZE(i)?i:Promise.resolve(i));return AY(n,s)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:St.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Wu({schema:this,typeName:Nr.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return kh.create(this,this._def)}nullable(){return Qm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qu.create(this,this._def)}promise(){return bw.create(this,this._def)}or(e){return K4.create([this,e],this._def)}and(e){return Z4.create(this,e,this._def)}transform(e){return new Wu({...Yr(this._def),schema:this,typeName:Nr.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new e6({...Yr(this._def),innerType:this,defaultValue:t,typeName:Nr.ZodDefault})}brand(){return new IY({typeName:Nr.ZodBranded,type:this,...Yr(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new tC({...Yr(this._def),innerType:this,catchValue:t,typeName:Nr.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return t6.create(this,e)}readonly(){return nC.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Eye=/^c[^\s-]{8,}$/i,Cye=/^[a-z][a-z0-9]*$/,Aye=/^[0-9A-HJKMNP-TV-Z]{26}$/,Sye=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Iye=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Tye="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vM;const kye=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Rye=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Mye=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Pye(r,e){return!!((e==="v4"||!e)&&kye.test(r)||(e==="v6"||!e)&&Rye.test(r))}class Hu extends rn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ar.string){const s=this._getOrReturnCtx(e);return or(s,{code:St.invalid_type,expected:ar.string,received:s.parsedType}),zr}const n=new bo;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.lengths.value&&(i=this._getOrReturnCtx(e,i),or(i,{code:St.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.lengthe.test(i),{validation:t,code:St.invalid_string,...Ir.errToObj(n)})}_addCheck(e){return new Hu({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ir.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ir.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ir.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ir.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ir.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ir.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ir.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ir.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...Ir.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ir.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Ir.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ir.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ir.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ir.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ir.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ir.errToObj(t)})}nonempty(e){return this.min(1,Ir.errToObj(e))}trim(){return new Hu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hu({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hu({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Hu({checks:[],typeName:Nr.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Yr(r)})};function Oye(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,s=parseInt(r.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class e1 extends rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ar.number){const s=this._getOrReturnCtx(e);return or(s,{code:St.invalid_type,expected:ar.number,received:s.parsedType}),zr}let n;const i=new bo;for(const s of this._def.checks)s.kind==="int"?Dn.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),or(n,{code:St.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),or(n,{code:St.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Oye(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),or(n,{code:St.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),or(n,{code:St.not_finite,message:s.message}),i.dirty()):Dn.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ir.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ir.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ir.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ir.toString(t))}setLimit(e,t,n,i){return new e1({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ir.toString(i)}]})}_addCheck(e){return new e1({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ir.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ir.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ir.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ir.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ir.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ir.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ir.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ir.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ir.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Dn.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew e1({checks:[],typeName:Nr.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Yr(r)});class t1 extends rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ar.bigint){const s=this._getOrReturnCtx(e);return or(s,{code:St.invalid_type,expected:ar.bigint,received:s.parsedType}),zr}let n;const i=new bo;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),or(n,{code:St.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),or(n,{code:St.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Dn.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ir.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ir.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ir.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ir.toString(t))}setLimit(e,t,n,i){return new t1({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ir.toString(i)}]})}_addCheck(e){return new t1({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ir.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ir.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ir.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ir.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ir.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new t1({checks:[],typeName:Nr.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Yr(r)})};class W4 extends rn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ar.boolean){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.boolean,received:n.parsedType}),zr}return Do(e.data)}}W4.create=r=>new W4({typeName:Nr.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Yr(r)});class Zm extends rn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ar.date){const s=this._getOrReturnCtx(e);return or(s,{code:St.invalid_type,expected:ar.date,received:s.parsedType}),zr}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return or(s,{code:St.invalid_date}),zr}const n=new bo;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()s.value&&(i=this._getOrReturnCtx(e,i),or(i,{code:St.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Dn.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Zm({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ir.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ir.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Zm({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Nr.ZodDate,...Yr(r)});class JE extends rn{_parse(e){if(this._getType(e)!==ar.symbol){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.symbol,received:n.parsedType}),zr}return Do(e.data)}}JE.create=r=>new JE({typeName:Nr.ZodSymbol,...Yr(r)});class V4 extends rn{_parse(e){if(this._getType(e)!==ar.undefined){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.undefined,received:n.parsedType}),zr}return Do(e.data)}}V4.create=r=>new V4({typeName:Nr.ZodUndefined,...Yr(r)});class G4 extends rn{_parse(e){if(this._getType(e)!==ar.null){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.null,received:n.parsedType}),zr}return Do(e.data)}}G4.create=r=>new G4({typeName:Nr.ZodNull,...Yr(r)});class pw extends rn{constructor(){super(...arguments),this._any=!0}_parse(e){return Do(e.data)}}pw.create=r=>new pw({typeName:Nr.ZodAny,...Yr(r)});class Jm extends rn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Do(e.data)}}Jm.create=r=>new Jm({typeName:Nr.ZodUnknown,...Yr(r)});class Th extends rn{_parse(e){const t=this._getOrReturnCtx(e);return or(t,{code:St.invalid_type,expected:ar.never,received:t.parsedType}),zr}}Th.create=r=>new Th({typeName:Nr.ZodNever,...Yr(r)});class YE extends rn{_parse(e){if(this._getType(e)!==ar.undefined){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.void,received:n.parsedType}),zr}return Do(e.data)}}YE.create=r=>new YE({typeName:Nr.ZodVoid,...Yr(r)});class qu extends rn{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==ar.array)return or(t,{code:St.invalid_type,expected:ar.array,received:t.parsedType}),zr;if(i.exactLength!==null){const a=t.data.length>i.exactLength.value,o=t.data.lengthi.maxLength.value&&(or(t,{code:St.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,o)=>i.type._parseAsync(new td(t,a,t.path,o)))).then(a=>bo.mergeArray(n,a));const s=[...t.data].map((a,o)=>i.type._parseSync(new td(t,a,t.path,o)));return bo.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new qu({...this._def,minLength:{value:e,message:Ir.toString(t)}})}max(e,t){return new qu({...this._def,maxLength:{value:e,message:Ir.toString(t)}})}length(e,t){return new qu({...this._def,exactLength:{value:e,message:Ir.toString(t)}})}nonempty(e){return this.min(1,e)}}qu.create=(r,e)=>new qu({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Nr.ZodArray,...Yr(e)});function mw(r){if(r instanceof ts){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=kh.create(mw(n))}return new ts({...r._def,shape:()=>e})}else return r instanceof qu?new qu({...r._def,type:mw(r.element)}):r instanceof kh?kh.create(mw(r.unwrap())):r instanceof Qm?Qm.create(mw(r.unwrap())):r instanceof rd?rd.create(r.items.map(e=>mw(e))):r}class ts extends rn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Dn.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ar.object){const u=this._getOrReturnCtx(e);return or(u,{code:St.invalid_type,expected:ar.object,received:u.parsedType}),zr}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Th&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||o.push(u);const l=[];for(const u of a){const f=s[u],h=i.data[u];l.push({key:{status:"valid",value:u},value:f._parse(new td(i,h,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Th){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of o)l.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(u==="strict")o.length>0&&(or(i,{code:St.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of o){const h=i.data[f];l.push({key:{status:"valid",value:f},value:u._parse(new td(i,h,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of l){const h=await f.key;u.push({key:h,value:await f.value,alwaysSet:f.alwaysSet})}return u}).then(u=>bo.mergeObjectSync(n,u)):bo.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return Ir.errToObj,new ts({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,t,n).message)!==null&&a!==void 0?a:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=Ir.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new ts({...this._def,unknownKeys:"strip"})}passthrough(){return new ts({...this._def,unknownKeys:"passthrough"})}extend(e){return new ts({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ts({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Nr.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ts({...this._def,catchall:e})}pick(e){const t={};return Dn.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new ts({...this._def,shape:()=>t})}omit(e){const t={};return Dn.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new ts({...this._def,shape:()=>t})}deepPartial(){return mw(this)}partial(e){const t={};return Dn.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new ts({...this._def,shape:()=>t})}required(e){const t={};return Dn.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof kh;)s=s._def.innerType;t[n]=s}}),new ts({...this._def,shape:()=>t})}keyof(){return SY(Dn.objectKeys(this.shape))}}ts.create=(r,e)=>new ts({shape:()=>r,unknownKeys:"strip",catchall:Th.create(),typeName:Nr.ZodObject,...Yr(e)}),ts.strictCreate=(r,e)=>new ts({shape:()=>r,unknownKeys:"strict",catchall:Th.create(),typeName:Nr.ZodObject,...Yr(e)}),ts.lazycreate=(r,e)=>new ts({shape:r,unknownKeys:"strip",catchall:Th.create(),typeName:Nr.ZodObject,...Yr(e)});class K4 extends rn{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new zu(o.ctx.common.issues));return or(t,{code:St.invalid_union,unionErrors:a}),zr}if(t.common.async)return Promise.all(n.map(async s=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of n){const u={...t,common:{...t.common,issues:[]},parent:null},f=l._parseSync({data:t.data,path:t.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new zu(l));return or(t,{code:St.invalid_union,unionErrors:o}),zr}}get options(){return this._def.options}}K4.create=(r,e)=>new K4({options:r,typeName:Nr.ZodUnion,...Yr(e)});const QE=r=>r instanceof Y4?QE(r.schema):r instanceof Wu?QE(r.innerType()):r instanceof Q4?[r.value]:r instanceof r1?r.options:r instanceof X4?Object.keys(r.enum):r instanceof e6?QE(r._def.innerType):r instanceof V4?[void 0]:r instanceof G4?[null]:null;class XE extends rn{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ar.object)return or(t,{code:St.invalid_type,expected:ar.object,received:t.parsedType}),zr;const n=this.discriminator,i=t.data[n],s=this.optionsMap.get(i);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(or(t,{code:St.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),zr)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const s of t){const a=QE(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new XE({typeName:Nr.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Yr(n)})}}function wM(r,e){const t=Xp(r),n=Xp(e);if(r===e)return{valid:!0,data:r};if(t===ar.object&&n===ar.object){const i=Dn.objectKeys(e),s=Dn.objectKeys(r).filter(o=>i.indexOf(o)!==-1),a={...r,...e};for(const o of s){const l=wM(r[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(t===ar.array&&n===ar.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let s=0;s{if(gM(s)||gM(a))return zr;const o=wM(s.value,a.value);return o.valid?((bM(s)||bM(a))&&t.dirty(),{status:t.value,value:o.data}):(or(n,{code:St.invalid_intersection_types}),zr)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Z4.create=(r,e,t)=>new Z4({left:r,right:e,typeName:Nr.ZodIntersection,...Yr(t)});class rd extends rn{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ar.array)return or(n,{code:St.invalid_type,expected:ar.array,received:n.parsedType}),zr;if(n.data.lengththis._def.items.length&&(or(n,{code:St.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new td(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>bo.mergeArray(t,a)):bo.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new rd({...this._def,rest:e})}}rd.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new rd({items:r,typeName:Nr.ZodTuple,rest:null,...Yr(e)})};class J4 extends rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ar.object)return or(n,{code:St.invalid_type,expected:ar.object,received:n.parsedType}),zr;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in n.data)i.push({key:s._parse(new td(n,o,n.path,o)),value:a._parse(new td(n,n.data[o],n.path,o))});return n.common.async?bo.mergeObjectAsync(t,i):bo.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof rn?new J4({keyType:e,valueType:t,typeName:Nr.ZodRecord,...Yr(n)}):new J4({keyType:Hu.create(),valueType:e,typeName:Nr.ZodRecord,...Yr(t)})}}class eC extends rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ar.map)return or(n,{code:St.invalid_type,expected:ar.map,received:n.parsedType}),zr;const i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,l],u)=>({key:i._parse(new td(n,o,n.path,[u,"key"])),value:s._parse(new td(n,l,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,f=await l.value;if(u.status==="aborted"||f.status==="aborted")return zr;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of a){const u=l.key,f=l.value;if(u.status==="aborted"||f.status==="aborted")return zr;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}}}}eC.create=(r,e,t)=>new eC({valueType:e,keyType:r,typeName:Nr.ZodMap,...Yr(t)});class Ym extends rn{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==ar.set)return or(n,{code:St.invalid_type,expected:ar.set,received:n.parsedType}),zr;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(or(n,{code:St.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const s=this._def.valueType;function a(l){const u=new Set;for(const f of l){if(f.status==="aborted")return zr;f.status==="dirty"&&t.dirty(),u.add(f.value)}return{status:t.value,value:u}}const o=[...n.data.values()].map((l,u)=>s._parse(new td(n,l,n.path,u)));return n.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,t){return new Ym({...this._def,minSize:{value:e,message:Ir.toString(t)}})}max(e,t){return new Ym({...this._def,maxSize:{value:e,message:Ir.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ym.create=(r,e)=>new Ym({valueType:r,minSize:null,maxSize:null,typeName:Nr.ZodSet,...Yr(e)});class gw extends rn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ar.function)return or(t,{code:St.invalid_type,expected:ar.function,received:t.parsedType}),zr;function n(o,l){return KE({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,GE(),H4].filter(u=>!!u),issueData:{code:St.invalid_arguments,argumentsError:l}})}function i(o,l){return KE({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,GE(),H4].filter(u=>!!u),issueData:{code:St.invalid_return_type,returnTypeError:l}})}const s={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof bw){const o=this;return Do(async function(...l){const u=new zu([]),f=await o._def.args.parseAsync(l,s).catch(b=>{throw u.addIssue(n(l,b)),u}),h=await Reflect.apply(a,this,f);return await o._def.returns._def.type.parseAsync(h,s).catch(b=>{throw u.addIssue(i(h,b)),u})})}else{const o=this;return Do(function(...l){const u=o._def.args.safeParse(l,s);if(!u.success)throw new zu([n(l,u.error)]);const f=Reflect.apply(a,this,u.data),h=o._def.returns.safeParse(f,s);if(!h.success)throw new zu([i(f,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new gw({...this._def,args:rd.create(e).rest(Jm.create())})}returns(e){return new gw({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new gw({args:e||rd.create([]).rest(Jm.create()),returns:t||Jm.create(),typeName:Nr.ZodFunction,...Yr(n)})}}class Y4 extends rn{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Y4.create=(r,e)=>new Y4({getter:r,typeName:Nr.ZodLazy,...Yr(e)});class Q4 extends rn{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return or(t,{received:t.data,code:St.invalid_literal,expected:this._def.value}),zr}return{status:"valid",value:e.data}}get value(){return this._def.value}}Q4.create=(r,e)=>new Q4({value:r,typeName:Nr.ZodLiteral,...Yr(e)});function SY(r,e){return new r1({values:r,typeName:Nr.ZodEnum,...Yr(e)})}class r1 extends rn{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return or(t,{expected:Dn.joinValues(n),received:t.parsedType,code:St.invalid_type}),zr}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return or(t,{received:t.data,code:St.invalid_enum_value,options:n}),zr}return Do(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return r1.create(e)}exclude(e){return r1.create(this.options.filter(t=>!e.includes(t)))}}r1.create=SY;class X4 extends rn{_parse(e){const t=Dn.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ar.string&&n.parsedType!==ar.number){const i=Dn.objectValues(t);return or(n,{expected:Dn.joinValues(i),received:n.parsedType,code:St.invalid_type}),zr}if(t.indexOf(e.data)===-1){const i=Dn.objectValues(t);return or(n,{received:n.data,code:St.invalid_enum_value,options:i}),zr}return Do(e.data)}get enum(){return this._def.values}}X4.create=(r,e)=>new X4({values:r,typeName:Nr.ZodNativeEnum,...Yr(e)});class bw extends rn{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ar.promise&&t.common.async===!1)return or(t,{code:St.invalid_type,expected:ar.promise,received:t.parsedType}),zr;const n=t.parsedType===ar.promise?t.data:Promise.resolve(t.data);return Do(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}bw.create=(r,e)=>new bw({type:r,typeName:Nr.ZodPromise,...Yr(e)});class Wu extends rn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Nr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{or(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?zr:(o.status==="dirty"&&t.dirty(),a(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?zr:(o.status==="dirty"&&t.dirty(),a(o.value).then(()=>({status:t.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!q4(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>q4(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:t.value,value:o})):a);Dn.assertNever(i)}}Wu.create=(r,e,t)=>new Wu({schema:r,typeName:Nr.ZodEffects,effect:e,...Yr(t)}),Wu.createWithPreprocess=(r,e,t)=>new Wu({schema:e,effect:{type:"preprocess",transform:r},typeName:Nr.ZodEffects,...Yr(t)});class kh extends rn{_parse(e){return this._getType(e)===ar.undefined?Do(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kh.create=(r,e)=>new kh({innerType:r,typeName:Nr.ZodOptional,...Yr(e)});class Qm extends rn{_parse(e){return this._getType(e)===ar.null?Do(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qm.create=(r,e)=>new Qm({innerType:r,typeName:Nr.ZodNullable,...Yr(e)});class e6 extends rn{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===ar.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}e6.create=(r,e)=>new e6({innerType:r,typeName:Nr.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Yr(e)});class tC extends rn{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ZE(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new zu(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zu(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}tC.create=(r,e)=>new tC({innerType:r,typeName:Nr.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Yr(e)});class rC extends rn{_parse(e){if(this._getType(e)!==ar.nan){const n=this._getOrReturnCtx(e);return or(n,{code:St.invalid_type,expected:ar.nan,received:n.parsedType}),zr}return{status:"valid",value:e.data}}}rC.create=r=>new rC({typeName:Nr.ZodNaN,...Yr(r)});const Nye=Symbol("zod_brand");class IY extends rn{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class t6 extends rn{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?zr:s.status==="dirty"?(t.dirty(),CY(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?zr:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new t6({in:e,out:t,typeName:Nr.ZodPipeline})}}class nC extends rn{_parse(e){const t=this._def.innerType._parse(e);return q4(t)&&(t.value=Object.freeze(t.value)),t}}nC.create=(r,e)=>new nC({innerType:r,typeName:Nr.ZodReadonly,...Yr(e)});const TY=(r,e={},t)=>r?pw.create().superRefine((n,i)=>{var s,a;if(!r(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:t)!==null&&a!==void 0?a:!0,u=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...u,fatal:l})}}):pw.create(),Dye={object:ts.lazycreate};var Nr;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Nr||(Nr={}));const $ye=(r,e={message:`Input not instance of ${r.name}`})=>TY(t=>t instanceof r,e),kY=Hu.create,RY=e1.create,Bye=rC.create,Lye=t1.create,MY=W4.create,Uye=Zm.create,Fye=JE.create,jye=V4.create,zye=G4.create,Hye=pw.create,qye=Jm.create,Wye=Th.create,Vye=YE.create,Gye=qu.create,Kye=ts.create,Zye=ts.strictCreate,Jye=K4.create,Yye=XE.create,Qye=Z4.create,Xye=rd.create,e5e=J4.create,t5e=eC.create,r5e=Ym.create,n5e=gw.create,i5e=Y4.create,s5e=Q4.create,a5e=r1.create,o5e=X4.create,c5e=bw.create,PY=Wu.create,l5e=kh.create,u5e=Qm.create,f5e=Wu.createWithPreprocess,d5e=t6.create;var be=Object.freeze({__proto__:null,defaultErrorMap:H4,setErrorMap:xye,getErrorMap:GE,makeIssue:KE,EMPTY_PATH:_ye,addIssueToContext:or,ParseStatus:bo,INVALID:zr,DIRTY:CY,OK:Do,isAborted:gM,isDirty:bM,isValid:q4,isAsync:ZE,get util(){return Dn},get objectUtil(){return mM},ZodParsedType:ar,getParsedType:Xp,ZodType:rn,ZodString:Hu,ZodNumber:e1,ZodBigInt:t1,ZodBoolean:W4,ZodDate:Zm,ZodSymbol:JE,ZodUndefined:V4,ZodNull:G4,ZodAny:pw,ZodUnknown:Jm,ZodNever:Th,ZodVoid:YE,ZodArray:qu,ZodObject:ts,ZodUnion:K4,ZodDiscriminatedUnion:XE,ZodIntersection:Z4,ZodTuple:rd,ZodRecord:J4,ZodMap:eC,ZodSet:Ym,ZodFunction:gw,ZodLazy:Y4,ZodLiteral:Q4,ZodEnum:r1,ZodNativeEnum:X4,ZodPromise:bw,ZodEffects:Wu,ZodTransformer:Wu,ZodOptional:kh,ZodNullable:Qm,ZodDefault:e6,ZodCatch:tC,ZodNaN:rC,BRAND:Nye,ZodBranded:IY,ZodPipeline:t6,ZodReadonly:nC,custom:TY,Schema:rn,ZodSchema:rn,late:Dye,get ZodFirstPartyTypeKind(){return Nr},coerce:{string:r=>Hu.create({...r,coerce:!0}),number:r=>e1.create({...r,coerce:!0}),boolean:r=>W4.create({...r,coerce:!0}),bigint:r=>t1.create({...r,coerce:!0}),date:r=>Zm.create({...r,coerce:!0})},any:Hye,array:Gye,bigint:Lye,boolean:MY,date:Uye,discriminatedUnion:Yye,effect:PY,enum:a5e,function:n5e,instanceof:$ye,intersection:Qye,lazy:i5e,literal:s5e,map:t5e,nan:Bye,nativeEnum:o5e,never:Wye,null:zye,nullable:u5e,number:RY,object:Kye,oboolean:()=>MY().optional(),onumber:()=>RY().optional(),optional:l5e,ostring:()=>kY().optional(),pipeline:d5e,preprocess:f5e,promise:c5e,record:e5e,set:r5e,strictObject:Zye,string:kY,symbol:Fye,transformer:PY,tuple:Xye,undefined:jye,union:Jye,unknown:qye,void:Vye,NEVER:zr,ZodIssueCode:St,quotelessJson:yye,ZodError:zu});const h5e=r=>r.message?r.message:"unspecified error";class iC extends z4{constructor(e){super(),this.code=rye,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]: ${this._compileErrors().join(` -`)}`}_compileErrors(){return this.errors.map(twe)}}const rwe=["bool","int","uint","bytes","string","address","tuple"],hZ=r=>typeof r=="object"&&"type"in r&&"name"in r,nwe=r=>typeof r=="string",ic=r=>typeof r=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(r),fZ=r=>typeof r=="number"||typeof r=="bigint"||typeof r=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(r),iwe=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],dg=r=>{let e=r.replace(/ /,""),t,n=!1,i=[];if(r.includes("[")&&(e=e.slice(0,e.indexOf("[")),i=[...r.matchAll(/(?:\[(\d*)\])/g)].map(s=>parseInt(s[1],10)).map(s=>Number.isNaN(s)?-1:s),n=i.length>0),rwe.includes(e))return{baseType:e,isArray:n,baseTypeSize:t,arraySizes:i};if(e.startsWith("int"))t=parseInt(e.substring(3),10),e="int";else if(e.startsWith("uint"))t=parseInt(r.substring(4),10),e="uint";else if(e.startsWith("bytes"))t=parseInt(e.substring(5),10),e="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};return{baseType:e,isArray:n,baseTypeSize:t,arraySizes:i}},FR=(r,e={})=>{if(Object.keys(e).includes("type"))throw new rE([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:r},instancePath:"",schemaPath:""}]);const{baseType:n,baseTypeSize:i}=dg(r);if(!n&&!iwe.includes(r))throw new rE([{keyword:"eth",message:`Eth data type "${r}" is not valid`,params:{eth:r},instancePath:"",schemaPath:""}]);if(n){if(n==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${n}${i??""}`,required:!0}}return r?{format:r,required:!0}:{}},nE=(r,e="/0")=>{const t={type:"array",items:[],maxItems:r.length,minItems:r.length};for(const[n,i]of r.entries()){let s,o,a=[];hZ(i)?(s=i.type,o=i.name,a=i.components):typeof i=="string"?(s=i,o=`${e}/${n}`):Array.isArray(i)&&(i[0]&&typeof i[0]=="string"&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(s=i[0],o=`${e}/${n}`,a=i[1]):(s="tuple",o=`${e}/${n}`,a=i));const{baseType:l,isArray:u,arraySizes:h}=dg(s);let p,g=t;for(let w=h.length-1;w>0;w-=1)p={type:"array",$id:o,items:[],maxItems:h[w],minItems:h[w]},h[w]<0&&(delete p.maxItems,delete p.minItems),Array.isArray(g.items)?g.items.length===0?g.items=[p]:g.items.push(p):g.items=[g.items,p],g=p;if(l==="tuple"&&!u){const w=nE(a,o);w.$id=o,g.items.push(w)}else if(l==="tuple"&&u){const w=h[0],y=Object.assign({type:"array",$id:o,items:nE(a,o)},w>=0&&{minItems:w,maxItems:w});g.items.push(y)}else if(u){const w=h[0],y=Object.assign({type:"array",$id:o,items:FR(s)},w>=0&&{minItems:w,maxItems:w});g.items.push(y)}else Array.isArray(g.items)?g.items.push(Object.assign({$id:o},FR(s))):g.items.push(Object.assign({$id:o},FR(s)));g=t}return t},dZ=r=>nE(r),jR=(r,e)=>e===1?r:jR(r[0],e-1),iE=(r,e,t)=>{const n=[];for(const[i,s]of r.entries()){let o,a,l=[];hZ(s)?(o=s.type,a=s.name,l=s.components):typeof s=="string"?o=s:Array.isArray(s)&&(s[1]&&Array.isArray(s[1])?(o=s[0],l=s[1]):(o="tuple",l=s));const{baseType:u,isArray:h,arraySizes:p}=dg(o),g=Array.isArray(e)?e[i]:e[a];if(u==="tuple"&&!h)n.push(iE(l,g,t));else if(u==="tuple"&&h){const w=[];for(const y of g)if(p.length>1){const C=jR(y,p.length-1),T=[];for(const k of C)T.push(iE(l,k,t));w.push(T)}else w.push(iE(l,y,t));n.push(w)}else n.push(g)}return t=t??[],t.push(...n),t},swe=r=>{if(r>=48&&r<=57)return r-48;if(r>=65&&r<=70)return r-55;if(r>=97&&r<=102)return r-87;throw new Error(`Invalid code point: ${r}`)},zR=r=>{if(!ic(r))throw new Error("Invalid hex string");const[e,t]=r.startsWith("-")?[!0,r.slice(1)]:[!1,r],n=BigInt(t);return n>Number.MAX_SAFE_INTEGER?e?-n:n:n{if((typeof r=="number"||typeof r=="bigint")&&r<0)return`-0x${r.toString(16).slice(1)}`;if((typeof r=="number"||typeof r=="bigint")&&r>=0)return`0x${r.toString(16)}`;if(typeof r=="string"&&ic(r)){const[e,t]=r.startsWith("-")?[!0,r.slice(1)]:[!1,r],n=t.split(/^(-)?0(x|X)/).slice(-1)[0];return`${e?"-":""}0x${n.replace(/^0+/,"").toLowerCase()}`}if(typeof r=="string"&&!ic(r))return sE(BigInt(r));throw new V2e(r)},owe=(r,e,t="0")=>{if(typeof r=="string"&&!ic(r))return r.padStart(e,t);const n=typeof r=="string"&&ic(r)?r:sE(r),[i,s]=n.startsWith("-")?["-0x",n.slice(3)]:["0x",n.slice(2)];return`${i}${s.padStart(e,t)}`};function HR(r){let e="0x";for(const t of r){const n=t.toString(16);e+=n.length===1?`0${n}`:n}return e}const od={zero:48,nine:57,A:65,F:70,a:97,f:102};function pZ(r){if(r>=od.zero&&r<=od.nine)return r-od.zero;if(r>=od.A&&r<=od.F)return r-(od.A-10);if(r>=od.a&&r<=od.f)return r-(od.a-10)}function qR(r){let e=0;if(r.startsWith("0")&&(r[1]==="x"||r[1]==="X")&&(e=2),r.length%2!==0)throw new OR(`hex string has odd length: ${r}`);const t=(r.length-e)/2,n=new Uint8Array(t);for(let i=0,s=e;i{var e;return r instanceof Uint8Array||((e=r==null?void 0:r.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"},mZ=(r,e={abiType:"bytes"})=>{if(typeof r!="string"&&!Array.isArray(r)&&!WR(r)||typeof r=="string"&&ic(r)&&r.startsWith("-")||typeof r=="string"&&!ic(r))return!1;let t;if(typeof r=="string"){if(r.length%2!==0)return!1;t=qR(r)}else if(Array.isArray(r)){if(r.some(n=>n<0||n>255||!Number.isInteger(n)))return!1;t=new Uint8Array(r)}else t=r;if(e!=null&&e.abiType){const{baseTypeSize:n}=dg(e.abiType);return n?t.length===n:!0}return e!=null&&e.size?t.length===(e==null?void 0:e.size):!0},cwe=r=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(r))return!1;const e=r.slice(2),t=VK(e.toLowerCase()),n=HR(D2e(gZ(t))).slice(2);for(let i=0;i<40;i+=1)if(parseInt(n[i],16)>7&&e[i].toUpperCase()!==e[i]||parseInt(n[i],16)<=7&&e[i].toLowerCase()!==e[i])return!1;return!0},oE=(r,e=!0)=>{if(typeof r!="string"&&!WR(r))return!1;let t;return WR(r)?t=HR(r):typeof r=="string"&&!ic(r)?t=r.toLowerCase().startsWith("0x")?r:`0x${r}`:t=r,/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:e?cwe(t):!0:!1};var aE;(function(r){r.NUMBER="NUMBER_NUMBER",r.HEX="NUMBER_HEX",r.STR="NUMBER_STR",r.BIGINT="NUMBER_BIGINT"})(aE||(aE={}));var cE;(function(r){r.HEX="BYTES_HEX",r.UINT8ARRAY="BYTES_UINT8ARRAY"})(cE||(cE={})),aE.BIGINT,cE.HEX,aE.HEX,cE.HEX;var VR;(function(r){r.EARLIEST="earliest",r.LATEST="latest",r.PENDING="pending",r.SAFE="safe",r.FINALIZED="finalized"})(VR||(VR={}));var bZ;(function(r){r.chainstart="chainstart",r.frontier="frontier",r.homestead="homestead",r.dao="dao",r.tangerineWhistle="tangerineWhistle",r.spuriousDragon="spuriousDragon",r.byzantium="byzantium",r.constantinople="constantinople",r.petersburg="petersburg",r.istanbul="istanbul",r.muirGlacier="muirGlacier",r.berlin="berlin",r.london="london",r.altair="altair",r.arrowGlacier="arrowGlacier",r.grayGlacier="grayGlacier",r.bellatrix="bellatrix",r.merge="merge",r.capella="capella",r.shanghai="shanghai"})(bZ||(bZ={})),globalThis&&globalThis.__awaiter;const GR=(r,e)=>{let t=r;for(let n=1;n{if(!["number","string","bigint"].includes(typeof r)||typeof r=="string"&&r.length===0)return!1;let t;if(e!=null&&e.abiType){const{baseTypeSize:i}=dg(e.abiType);i&&(t=i)}else e.bitSize&&(t=e.bitSize);const n=GR(BigInt(2),BigInt(t??256))-BigInt(1);try{const i=typeof r=="string"&&ic(r)?BigInt(zR(r)):BigInt(r);return i>=0&&i<=n}catch{return!1}},J5=(r,e={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof r)||typeof r=="number"&&r>Number.MAX_SAFE_INTEGER)return!1;let t;if(e!=null&&e.abiType){const{baseTypeSize:s,baseType:o}=dg(e.abiType);if(o!=="int")return!1;s&&(t=s)}else e.bitSize&&(t=e.bitSize);const n=GR(BigInt(2),BigInt((t??256)-1)),i=BigInt(-1)*GR(BigInt(2),BigInt((t??256)-1));try{const s=typeof r=="string"&&ic(r)?BigInt(zR(r)):BigInt(r);return s>=i&&s<=n}catch{return!1}},lwe=r=>!!(J5(r)||typeof r=="string"&&/[0-9.]/.test(r)&&r.indexOf(".")===r.lastIndexOf(".")||typeof r=="number"),wZ=r=>Z5(r),vZ=r=>Object.values(VR).includes(r),KR=r=>vZ(r)||wZ(r),uwe=r=>typeof r!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(r)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(r)||/^(0x)?[0-9A-F]{512}$/.test(r)),hwe=r=>["number","string","boolean"].includes(typeof r)?typeof r=="boolean"?!0:typeof r=="string"&&!ic(r)?r==="1"||r==="0":typeof r=="string"&&ic(r)?r==="0x1"||r==="0x0":r===1||r===0:!1,Iw=r=>r==null,yZ=r=>typeof r!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(r)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(r)||/^(0x)?[0-9A-F]{64}$/.test(r)),fwe=r=>{const e=["fromBlock","toBlock","address","topics","blockHash"];if(Iw(r)||typeof r!="object"||!Object.keys(r).every(t=>e.includes(t))||!Iw(r.fromBlock)&&!KR(r.fromBlock)||!Iw(r.toBlock)&&!KR(r.toBlock))return!1;if(!Iw(r.address)){if(Array.isArray(r.address)){if(!r.address.every(t=>oE(t)))return!1}else if(!oE(r.address))return!1}return!(!Iw(r.topics)&&!r.topics.every(t=>Iw(t)?!0:Array.isArray(t)?t.every(n=>yZ(n)):!!yZ(t)))},pg={address:r=>oE(r),bloom:r=>uwe(r),blockNumber:r=>wZ(r),blockTag:r=>vZ(r),blockNumberOrTag:r=>KR(r),bool:r=>hwe(r),bytes:r=>mZ(r),filter:r=>fwe(r),hex:r=>ic(r),uint:r=>Z5(r),int:r=>J5(r),number:r=>lwe(r),string:r=>nwe(r)};for(let r=8;r<=256;r+=8)pg[`int${r}`]=e=>J5(e,{bitSize:r}),pg[`uint${r}`]=e=>Z5(e,{bitSize:r});for(let r=1;r<=32;r+=1)pg[`bytes${r}`]=e=>mZ(e,{size:r});pg.bytes256=pg.bytes;const Y5=r=>{if((!(r!=null&&r.type)||(r==null?void 0:r.type)==="object")&&(r!=null&&r.properties)){const e={};for(const t of Object.keys(r.properties)){const n=Y5(r.properties[t]);n&&(e[t]=n)}return Array.isArray(r.required)?ge.object(e).partial().required(r.required.reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:!0}),{})):ge.object(e).partial()}if((r==null?void 0:r.type)==="array"&&(r!=null&&r.items)){if(Array.isArray(r.items)&&r.items.length>1&&r.maxItems!==void 0&&new Set(r.items.map(n=>n.$id)).size===r.items.length){const n=[];for(const i of r.items){const s=Y5(i);s&&n.push(s)}return ge.tuple(n)}const e=Array.isArray(r.items)?r.items[0]:r.items;let t=ge.array(Y5(e));return t=r.minItems!==void 0?t.min(r.minItems):t,t=r.maxItems!==void 0?t.max(r.maxItems):t,t}if(r.oneOf&&Array.isArray(r.oneOf))return ge.union(r.oneOf.map(e=>Y5(e)));if(r!=null&&r.format){if(!pg[r.format])throw new abe(r.format);return ge.any().refine(pg[r.format],e=>({params:{value:e,format:r.format}}))}return r!=null&&r.type&&(r==null?void 0:r.type)!=="object"&&typeof ge[String(r.type)]=="function"?ge[String(r.type)]():ge.object({data:ge.any()}).partial()};class Tw{static factory(){return Tw.validatorInstance||(Tw.validatorInstance=new Tw),Tw.validatorInstance}validate(e,t,n){var i,s;const a=Y5(e).safeParse(t);if(!a.success){const l=this.convertErrors((s=(i=a.error)===null||i===void 0?void 0:i.issues)!==null&&s!==void 0?s:[]);if(l){if(n!=null&&n.silent)return l;throw new rE(l)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map(t=>{var n;let i,s,o,a;a=t.path.join("/");const l=String(t.path[t.path.length-1]),u=t.path.join("/");if(t.code===Rt.too_big)s="maxItems",a=`${u}/maxItems`,o={limit:t.maximum},i=`must NOT have more than ${t.maximum} items`;else if(t.code===Rt.too_small)s="minItems",a=`${u}/minItems`,o={limit:t.minimum},i=`must NOT have fewer than ${t.minimum} items`;else if(t.code===Rt.custom){const{value:h,format:p}=(n=t.params)!==null&&n!==void 0?n:{};typeof h>"u"?i=`value at "/${a}" is required`:i=`value "${typeof h=="object"?JSON.stringify(h):h}" at "/${a}" must pass "${p}" validation`,o={value:h}}return{keyword:s??l,instancePath:u?`/${u}`:"",schemaPath:a?`#${a}`:"#",params:o??{value:t.message},message:i??t.message}})}}class dwe{constructor(){this._validator=Tw.factory()}validateJSONSchema(e,t,n){return this._validator.validate(e,t,n)}validate(e,t,n={silent:!1}){var i,s;const o=dZ(e);if(!(Array.isArray(o.items)&&((i=o.items)===null||i===void 0?void 0:i.length)===0&&t.length===0)){if(Array.isArray(o.items)&&((s=o.items)===null||s===void 0?void 0:s.length)===0&&t.length!==0)throw new rE([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:t}]);return this._validator.validate(o,t,n)}}}const ZR=new dwe;function pwe(r){var e;return r instanceof Uint8Array||((e=r==null?void 0:r.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"}BigInt(0),BigInt(1),BigInt(1e3),BigInt(1e3),BigInt(1e3),BigInt(1e3),BigInt(1e6),BigInt(1e6),BigInt(1e6),BigInt(1e6),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e12),BigInt(1e12),BigInt(1e12),BigInt(1e15),BigInt(1e15),BigInt(1e15),BigInt("1000000000000000000"),BigInt("1000000000000000000000"),BigInt("1000000000000000000000"),BigInt("1000000000000000000000000"),BigInt("1000000000000000000000000000"),BigInt("1000000000000000000000000000000");const gwe=r=>{if(ZR.validate(["bytes"],[r]),pwe(r))return r;if(Array.isArray(r))return new Uint8Array(r);if(typeof r=="string")return qR(r);throw new OR(r)},{uint8ArrayToHexString:mwe}=awe,bwe=r=>mwe(gwe(r)),lE=(r,e)=>{typeof r!="bigint"&&ZR.validate(["int"],[r]);let t=sE(r);return e&&(!t.startsWith("-")&&t.length%2===1?t="0x0".concat(t.slice(2)):t.length%2===0&&t.startsWith("-")&&(t="-0x0".concat(t.slice(3)))),t},xZ=r=>{ZR.validate(["string"],[r]);let e=r.replace(/^(?:\u0000)/,"");return e=e.replace(/(?:\u0000)$/,""),bwe(new TextEncoder().encode(e))},JR=(r,e)=>{if(typeof r=="string"&&oE(r))return e?"address":`0x${r.toLowerCase().replace(/^0x/i,"")}`;if(typeof r=="boolean")return e?"bool":r?"0x01":"0x00";if(typeof r=="number")return e?r<0?"int256":"uint256":lE(r);if(typeof r=="bigint")return e?"bigint":lE(r);if(typeof r=="object"&&r)return e?"string":xZ(JSON.stringify(r));if(typeof r=="string"){if(r.startsWith("-0x")||r.startsWith("-0X"))return e?"int256":lE(r);if(ic(r))return e?"bytes":r;if(fZ(r)&&!J5(r)&&!Z5(r))return e?"bytes":`0x${r}`;if(fZ(r)&&!J5(r)&&Z5(r))return e?"uint":lE(r);if(!Number.isFinite(r))return e?"string":xZ(r)}throw new G2e(r)};var ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wwe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function ad(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(e,i);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var YR={},vwe={get exports(){return YR},set exports(r){YR=r}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(l,u,h){this.fn=l,this.context=u,this.once=h||!1}function s(l,u,h,p,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var w=new i(h,p||l,g),y=t?t+u:u;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],w]:l._events[y].push(w):(l._events[y]=w,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],h,p;if(this._eventsCount===0)return u;for(p in h=this._events)e.call(h,p)&&u.push(t?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},a.prototype.listeners=function(u){var h=t?t+u:u,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,w=p.length,y=new Array(w);gp?I.c=I.e=null:D.e=10;d/=10,b++);b>p?I.c=I.e=null:(I.e=b,I.c=[D]);return}A=String(D)}else{if(!xwe.test(A=String(D)))return n(I,A,m);I.s=A.charCodeAt(0)==45?(A=A.slice(1),-1):1}(b=A.indexOf("."))>-1&&(A=A.replace(".","")),(d=A.search(/e/i))>0?(b<0&&(b=d),b+=+A.slice(d+1),A=A.substring(0,d)):b<0&&(b=A.length)}else{if(Xi(V,2,T.length,"Base"),V==10&&k)return I=new N(D),G(I,o+I.e+1,a);if(A=String(D),m=typeof D=="number"){if(D*0!=0)return n(I,A,m,V);if(I.s=1/D<0?(A=A.slice(1),-1):1,N.DEBUG&&A.replace(/^0\.0*|\./,"").length>15)throw Error(EZ+D)}else I.s=A.charCodeAt(0)===45?(A=A.slice(1),-1):1;for(Q=T.slice(0,V),b=d=0,x=A.length;db){b=x;continue}}else if(!M&&(A==A.toUpperCase()&&(A=A.toLowerCase())||A==A.toLowerCase()&&(A=A.toUpperCase()))){M=!0,d=-1,b=0;continue}return n(I,String(D),m,V)}m=!1,A=t(A,V,10,I.s),(b=A.indexOf("."))>-1?A=A.replace(".",""):b=A.length}for(d=0;A.charCodeAt(d)===48;d++);for(x=A.length;A.charCodeAt(--x)===48;);if(A=A.slice(d,++x)){if(x-=d,m&&N.DEBUG&&x>15&&(D>XR||D!==Tl(D)))throw Error(EZ+I.s*D);if((b=b-d-1)>p)I.c=I.e=null;else if(b=-co&&M<=co&&M===Tl(M)){if(F[0]===0){if(M===0&&F.length===1)return!0;break e}if(V=(M+1)%jr,V<1&&(V+=jr),String(F[0]).length==V){for(V=0;V=Tu||Q!==Tl(Q))break e;if(Q!==0)return!0}}}else if(F===null&&M===null&&(b===null||b===1||b===-1))return!0;throw Error(sc+"Invalid BigNumber: "+D)},N.maximum=N.max=function(){return B(arguments,-1)},N.minimum=N.min=function(){return B(arguments,1)},N.random=function(){var D=9007199254740992,V=Math.random()*D&2097151?function(){return Tl(Math.random()*D)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(Q){var F,M,b,d,m,x=0,A=[],I=new N(s);if(Q==null?Q=o:Xi(Q,0,co),d=QR(Q/jr),g)if(crypto.getRandomValues){for(F=crypto.getRandomValues(new Uint32Array(d*=2));x>>11),m>=9e15?(M=crypto.getRandomValues(new Uint32Array(2)),F[x]=M[0],F[x+1]=M[1]):(A.push(m%1e14),x+=2);x=d/2}else if(crypto.randomBytes){for(F=crypto.randomBytes(d*=7);x=9e15?crypto.randomBytes(7).copy(F,x):(A.push(m%1e14),x+=7);x=d/7}else throw g=!1,Error(sc+"crypto unavailable");if(!g)for(;x=10;m/=10,x++);xM-1&&(m[d+1]==null&&(m[d+1]=0),m[d+1]+=m[d]/M|0,m[d]%=M)}return m.reverse()}return function(Q,F,M,b,d){var m,x,A,I,R,S,E,_,L=Q.indexOf("."),ie=o,q=a;for(L>=0&&(I=y,y=0,Q=Q.replace(".",""),_=new N(F),S=_.pow(Q.length-L),y=I,_.c=V(cd(kl(S.c),S.e,"0"),10,M,D),_.e=_.c.length),E=V(Q,F,M,d?(m=T,D):(m=D,T)),A=I=E.length;E[--I]==0;E.pop());if(!E[0])return m.charAt(0);if(L<0?--A:(S.c=E,S.e=A,S.s=b,S=e(S,_,ie,q,M),E=S.c,R=S.r,A=S.e),x=A+ie+1,L=E[x],I=M/2,R=R||x<0||E[x+1]!=null,R=q<4?(L!=null||R)&&(q==0||q==(S.s<0?3:2)):L>I||L==I&&(q==4||R||q==6&&E[x-1]&1||q==(S.s<0?8:7)),x<1||!E[0])Q=R?cd(m.charAt(1),-ie,m.charAt(0)):m.charAt(0);else{if(E.length=x,R)for(--M;++E[--x]>M;)E[x]=0,x||(++A,E=[1].concat(E));for(I=E.length;!E[--I];);for(L=0,Q="";L<=I;Q+=m.charAt(E[L++]));Q=cd(Q,A,m.charAt(0))}return Q}}(),e=function(){function D(F,M,b){var d,m,x,A,I=0,R=F.length,S=M%Ep,E=M/Ep|0;for(F=F.slice();R--;)x=F[R]%Ep,A=F[R]/Ep|0,d=E*x+A*S,m=S*x+d%Ep*Ep+I,I=(m/b|0)+(d/Ep|0)+E*A,F[R]=m%b;return I&&(F=[I].concat(F)),F}function V(F,M,b,d){var m,x;if(b!=d)x=b>d?1:-1;else for(m=x=0;mM[m]?1:-1;break}return x}function Q(F,M,b,d){for(var m=0;b--;)F[b]-=m,m=F[b]1;F.splice(0,1));}return function(F,M,b,d,m){var x,A,I,R,S,E,_,L,ie,q,Y,K,te,re,H,U,W,le=F.s==M.s?1:-1,de=F.c,Se=M.c;if(!de||!de[0]||!Se||!Se[0])return new N(!F.s||!M.s||(de?Se&&de[0]==Se[0]:!Se)?NaN:de&&de[0]==0||!Se?le*0:le/0);for(L=new N(le),ie=L.c=[],A=F.e-M.e,le=b+A+1,m||(m=Tu,A=Rl(F.e/jr)-Rl(M.e/jr),le=le/jr|0),I=0;Se[I]==(de[I]||0);I++);if(Se[I]>(de[I]||0)&&A--,le<0)ie.push(1),R=!0;else{for(re=de.length,U=Se.length,I=0,le+=2,S=Tl(m/(Se[0]+1)),S>1&&(Se=D(Se,S,m),de=D(de,S,m),U=Se.length,re=de.length),te=U,q=de.slice(0,U),Y=q.length;Y=m/2&&H++;do{if(S=0,x=V(Se,q,U,Y),x<0){if(K=q[0],U!=Y&&(K=K*m+(q[1]||0)),S=Tl(K/H),S>1)for(S>=m&&(S=m-1),E=D(Se,S,m),_=E.length,Y=q.length;V(E,q,_,Y)==1;)S--,Q(E,U<_?W:Se,_,m),_=E.length,x=1;else S==0&&(x=S=1),E=Se.slice(),_=E.length;if(_=10;le/=10,I++);G(L,b+(L.e=I+A*jr-1)+1,d,R)}else L.e=A,L.r=+R;return L}}();function O(D,V,Q,F){var M,b,d,m,x;if(Q==null?Q=a:Xi(Q,0,8),!D.c)return D.toString();if(M=D.c[0],d=D.e,V==null)x=kl(D.c),x=F==1||F==2&&(d<=l||d>=u)?hE(x,d):cd(x,d,"0");else if(D=G(new N(D),V,Q),b=D.e,x=kl(D.c),m=x.length,F==1||F==2&&(V<=b||b<=l)){for(;mm){if(--V>0)for(x+=".";V--;x+="0");}else if(V+=b-m,V>0)for(b+1==m&&(x+=".");V--;x+="0");return D.s<0&&M?"-"+x:x}function B(D,V){for(var Q,F,M=1,b=new N(D[0]);M=10;M/=10,F++);return(Q=F+Q*jr-1)>p?D.c=D.e=null:Q=10;m/=10,M++);if(b=V-M,b<0)b+=jr,d=V,x=R[A=0],I=Tl(x/S[M-d-1]%10);else if(A=QR((b+1)/jr),A>=R.length)if(F){for(;R.length<=A;R.push(0));x=I=0,M=1,b%=jr,d=b-jr+1}else break e;else{for(x=m=R[A],M=1;m>=10;m/=10,M++);b%=jr,d=b-jr+M,I=d<0?0:Tl(x/S[M-d-1]%10)}if(F=F||V<0||R[A+1]!=null||(d<0?x:x%S[M-d-1]),F=Q<4?(I||F)&&(Q==0||Q==(D.s<0?3:2)):I>5||I==5&&(Q==4||F||Q==6&&(b>0?d>0?x/S[M-d]:0:R[A-1])%10&1||Q==(D.s<0?8:7)),V<1||!R[0])return R.length=0,F?(V-=D.e+1,R[0]=S[(jr-V%jr)%jr],D.e=-V||0):R[0]=D.e=0,D;if(b==0?(R.length=A,m=1,A--):(R.length=A+1,m=S[jr-b],R[A]=d>0?Tl(x/S[M-d]%S[d])*m:0),F)for(;;)if(A==0){for(b=1,d=R[0];d>=10;d/=10,b++);for(d=R[0]+=m,m=1;d>=10;d/=10,m++);b!=m&&(D.e++,R[0]==Tu&&(R[0]=1));break}else{if(R[A]+=m,R[A]!=Tu)break;R[A--]=0,m=1}for(b=R.length;R[--b]===0;R.pop());}D.e>p?D.c=D.e=null:D.e=u?hE(V,Q):cd(V,Q,"0"),D.s<0?"-"+V:V)}return i.absoluteValue=i.abs=function(){var D=new N(this);return D.s<0&&(D.s=1),D},i.comparedTo=function(D,V){return gg(this,new N(D,V))},i.decimalPlaces=i.dp=function(D,V){var Q,F,M,b=this;if(D!=null)return Xi(D,0,co),V==null?V=a:Xi(V,0,8),G(new N(b),D+b.e+1,V);if(!(Q=b.c))return null;if(F=((M=Q.length-1)-Rl(this.e/jr))*jr,M=Q[M])for(;M%10==0;M/=10,F--);return F<0&&(F=0),F},i.dividedBy=i.div=function(D,V){return e(this,new N(D,V),o,a)},i.dividedToIntegerBy=i.idiv=function(D,V){return e(this,new N(D,V),0,1)},i.exponentiatedBy=i.pow=function(D,V){var Q,F,M,b,d,m,x,A,I,R=this;if(D=new N(D),D.c&&!D.isInteger())throw Error(sc+"Exponent not an integer: "+$(D));if(V!=null&&(V=new N(V)),m=D.e>14,!R.c||!R.c[0]||R.c[0]==1&&!R.e&&R.c.length==1||!D.c||!D.c[0])return I=new N(Math.pow(+$(R),m?D.s*(2-uE(D)):+$(D))),V?I.mod(V):I;if(x=D.s<0,V){if(V.c?!V.c[0]:!V.s)return new N(NaN);F=!x&&R.isInteger()&&V.isInteger(),F&&(R=R.mod(V))}else{if(D.e>9&&(R.e>0||R.e<-1||(R.e==0?R.c[0]>1||m&&R.c[1]>=24e7:R.c[0]<8e13||m&&R.c[0]<=9999975e7)))return b=R.s<0&&uE(D)?-0:0,R.e>-1&&(b=1/b),new N(x?1/b:b);y&&(b=QR(y/jr+2))}for(m?(Q=new N(.5),x&&(D.s=1),A=uE(D)):(M=Math.abs(+$(D)),A=M%2),I=new N(s);;){if(A){if(I=I.times(R),!I.c)break;b?I.c.length>b&&(I.c.length=b):F&&(I=I.mod(V))}if(M){if(M=Tl(M/2),M===0)break;A=M%2}else if(D=D.times(Q),G(D,D.e+1,1),D.e>14)A=uE(D);else{if(M=+$(D),M===0)break;A=M%2}R=R.times(R),b?R.c&&R.c.length>b&&(R.c.length=b):F&&(R=R.mod(V))}return F?I:(x&&(I=s.div(I)),V?I.mod(V):b?G(I,y,a,d):I)},i.integerValue=function(D){var V=new N(this);return D==null?D=a:Xi(D,0,8),G(V,V.e+1,D)},i.isEqualTo=i.eq=function(D,V){return gg(this,new N(D,V))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(D,V){return gg(this,new N(D,V))>0},i.isGreaterThanOrEqualTo=i.gte=function(D,V){return(V=gg(this,new N(D,V)))===1||V===0},i.isInteger=function(){return!!this.c&&Rl(this.e/jr)>this.c.length-2},i.isLessThan=i.lt=function(D,V){return gg(this,new N(D,V))<0},i.isLessThanOrEqualTo=i.lte=function(D,V){return(V=gg(this,new N(D,V)))===-1||V===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(D,V){var Q,F,M,b,d=this,m=d.s;if(D=new N(D,V),V=D.s,!m||!V)return new N(NaN);if(m!=V)return D.s=-V,d.plus(D);var x=d.e/jr,A=D.e/jr,I=d.c,R=D.c;if(!x||!A){if(!I||!R)return I?(D.s=-V,D):new N(R?d:NaN);if(!I[0]||!R[0])return R[0]?(D.s=-V,D):new N(I[0]?d:a==3?-0:0)}if(x=Rl(x),A=Rl(A),I=I.slice(),m=x-A){for((b=m<0)?(m=-m,M=I):(A=x,M=R),M.reverse(),V=m;V--;M.push(0));M.reverse()}else for(F=(b=(m=I.length)<(V=R.length))?m:V,m=V=0;V0)for(;V--;I[Q++]=0);for(V=Tu-1;F>m;){if(I[--F]=0;){for(Q=0,S=K[M]%ie,E=K[M]/ie|0,d=x,b=M+d;b>M;)A=Y[--d]%ie,I=Y[d]/ie|0,m=E*A+I*S,A=S*A+m%ie*ie+_[b]+Q,Q=(A/L|0)+(m/ie|0)+E*I,_[b--]=A%L;_[b]=Q}return Q?++F:_.splice(0,1),z(D,_,F)},i.negated=function(){var D=new N(this);return D.s=-D.s||null,D},i.plus=function(D,V){var Q,F=this,M=F.s;if(D=new N(D,V),V=D.s,!M||!V)return new N(NaN);if(M!=V)return D.s=-V,F.minus(D);var b=F.e/jr,d=D.e/jr,m=F.c,x=D.c;if(!b||!d){if(!m||!x)return new N(M/0);if(!m[0]||!x[0])return x[0]?D:new N(m[0]?F:M*0)}if(b=Rl(b),d=Rl(d),m=m.slice(),M=b-d){for(M>0?(d=b,Q=x):(M=-M,Q=m),Q.reverse();M--;Q.push(0));Q.reverse()}for(M=m.length,V=x.length,M-V<0&&(Q=x,x=m,m=Q,V=M),M=0;V;)M=(m[--V]=m[V]+x[V]+M)/Tu|0,m[V]=Tu===m[V]?0:m[V]%Tu;return M&&(m=[M].concat(m),++d),z(D,m,d)},i.precision=i.sd=function(D,V){var Q,F,M,b=this;if(D!=null&&D!==!!D)return Xi(D,1,co),V==null?V=a:Xi(V,0,8),G(new N(b),D,V);if(!(Q=b.c))return null;if(M=Q.length-1,F=M*jr+1,M=Q[M]){for(;M%10==0;M/=10,F--);for(M=Q[0];M>=10;M/=10,F++);}return D&&b.e+1>F&&(F=b.e+1),F},i.shiftedBy=function(D){return Xi(D,-XR,XR),this.times("1e"+D)},i.squareRoot=i.sqrt=function(){var D,V,Q,F,M,b=this,d=b.c,m=b.s,x=b.e,A=o+4,I=new N("0.5");if(m!==1||!d||!d[0])return new N(!m||m<0&&(!d||d[0])?NaN:d?b:1/0);if(m=Math.sqrt(+$(b)),m==0||m==1/0?(V=kl(d),(V.length+x)%2==0&&(V+="0"),m=Math.sqrt(+V),x=Rl((x+1)/2)-(x<0||x%2),m==1/0?V="5e"+x:(V=m.toExponential(),V=V.slice(0,V.indexOf("e")+1)+x),Q=new N(V)):Q=new N(m+""),Q.c[0]){for(x=Q.e,m=x+A,m<3&&(m=0);;)if(M=Q,Q=I.times(M.plus(e(b,M,A,1))),kl(M.c).slice(0,m)===(V=kl(Q.c)).slice(0,m))if(Q.e0&&_>0){for(b=_%m||m,I=E.substr(0,b);b<_;b+=m)I+=A+E.substr(b,m);x>0&&(I+=A+E.slice(b)),S&&(I="-"+I)}F=R?I+(Q.decimalSeparator||"")+((x=+Q.fractionGroupSize)?R.replace(new RegExp("\\d{"+x+"}\\B","g"),"$&"+(Q.fractionGroupSeparator||"")):R):I}return(Q.prefix||"")+F+(Q.suffix||"")},i.toFraction=function(D){var V,Q,F,M,b,d,m,x,A,I,R,S,E=this,_=E.c;if(D!=null&&(m=new N(D),!m.isInteger()&&(m.c||m.s!==1)||m.lt(s)))throw Error(sc+"Argument "+(m.isInteger()?"out of range: ":"not an integer: ")+$(m));if(!_)return new N(E);for(V=new N(s),A=Q=new N(s),F=x=new N(s),S=kl(_),b=V.e=S.length-E.e-1,V.c[0]=ek[(d=b%jr)<0?jr+d:d],D=!D||m.comparedTo(V)>0?b>0?V:A:m,d=p,p=1/0,m=new N(S),x.c[0]=0;I=e(m,V,0,1),M=Q.plus(I.times(F)),M.comparedTo(D)!=1;)Q=F,F=M,A=x.plus(I.times(M=A)),x=M,V=m.minus(I.times(M=V)),m=M;return M=e(D.minus(Q),F,0,1),x=x.plus(M.times(A)),Q=Q.plus(M.times(F)),x.s=A.s=E.s,b=b*2,R=e(A,F,b,a).minus(E).abs().comparedTo(e(x,Q,b,a).minus(E).abs())<1?[A,F]:[x,Q],p=d,R},i.toNumber=function(){return+$(this)},i.toPrecision=function(D,V){return D!=null&&Xi(D,1,co),O(this,D,V,2)},i.toString=function(D){var V,Q=this,F=Q.s,M=Q.e;return M===null?F?(V="Infinity",F<0&&(V="-"+V)):V="NaN":(D==null?V=M<=l||M>=u?hE(kl(Q.c),M):cd(kl(Q.c),M,"0"):D===10&&k?(Q=G(new N(Q),o+M+1,a),V=cd(kl(Q.c),Q.e,"0")):(Xi(D,2,T.length,"Base"),V=t(cd(kl(Q.c),M,"0"),10,D,F,!0)),F<0&&Q.c[0]&&(V="-"+V)),V},i.valueOf=i.toJSON=function(){return $(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,r!=null&&N.set(r),N}function Rl(r){var e=r|0;return r>0||r===e?e:e-1}function kl(r){for(var e,t,n=1,i=r.length,s=r[0]+"";nu^t?1:-1;for(a=(l=i.length)<(u=s.length)?l:u,o=0;os[o]^t?1:-1;return l==u?0:l>u^t?1:-1}function Xi(r,e,t,n){if(rt||r!==Tl(r))throw Error(sc+(n||"Argument")+(typeof r=="number"?rt?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function uE(r){var e=r.c.length-1;return Rl(r.e/jr)==e&&r.c[e]%2!=0}function hE(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function cd(r,e,t){var n,i;if(e<0){for(i=t+".";++e;i+=t);r=i+r}else if(n=r.length,++e>n){for(i=t,e-=n;--e;i+=t);r+=i}else e{const t="1"+"0".repeat(e),n=new es(r.toString(10),10);return JR(n.times(t).toString(16))},ld=(r,e)=>{const t="1"+"0".repeat(e),n=new es(r.toString(),10);return parseFloat(n.dividedBy(t).toString())},Ewe=r=>{typeof r=="string"&&(r=new Uint8Array(Dt.from(r)));const e=[];let t=BigInt("0x"+Dt.from(r).toString("hex"));for(;t>BigInt(0);){const n=Number(t%BigInt(58));e.unshift(tk[n]),t=t/BigInt(58)}for(let n=0;n{let e=BigInt(0);for(let i=0;iDt.from(r).toString("utf8"),Swe=r=>Dt.from(r,"utf8"),Iwe=r=>!isNaN(Number(r)),CZ=async r=>{await new Promise(e=>setTimeout(e,r))},X5=(r,e)=>JSON.stringify(r)===JSON.stringify(e),Twe=r=>{const[e,t]=r.toExponential().split("e").map(i=>parseFloat(i));let n=(e*Math.pow(10,t)).toString();return n=parseFloat(n).toString(),n},rk=async r=>await new Promise((e,t)=>{let n;typeof window<"u"?n=new WebSocket(r):n=new _we.WebSocket(r),n.onopen=()=>{e(!0),n.close()},n.onerror=i=>{t(new Error(i.message)),n.close()}}),Rwe=Object.freeze(Object.defineProperty({__proto__:null,base58Decode:Awe,base58Encode:Ewe,bufferToString:Cwe,checkWebSocket:rk,hexToNumber:ld,isMobile:()=>typeof window>"u"?!1:function(r){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(r.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),isNumeric:Iwe,isWebview:()=>{if(typeof window>"u")return!1;const r=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||r.userAgent.match(/WebView/i))return!0;const e=r.standalone,t=r.userAgent.toLowerCase(),n=/safari/.test(t);return/iphone|ipod|ipad/.test(t)?!e&&!n:t.includes("wv")},math:{add:(r,e,t=18)=>parseFloat(new es(r).plus(new es(e)).toFixed(t)),sub:(r,e,t=18)=>parseFloat(new es(r).minus(new es(e)).toFixed(t)),mul:(r,e,t=18)=>parseFloat(new es(r).times(new es(e)).toFixed(t)),div:(r,e,t=18)=>parseFloat(new es(r).div(new es(e)).toFixed(t)),pow:(r,e,t=18)=>parseFloat(new es(r).pow(e).toFixed(t)),sqrt:(r,e=18)=>parseFloat(new es(r).sqrt().toFixed(e)),abs:(r,e=18)=>parseFloat(new es(r).absoluteValue().toFixed(e)),ceil:(r,e=18)=>parseFloat(new es(r).integerValue(es.ROUND_CEIL).toFixed(e)),floor:(r,e=18)=>parseFloat(new es(r).integerValue(es.ROUND_FLOOR).toFixed(e)),round:(r,e=18)=>parseFloat(new es(r).integerValue(es.ROUND_HALF_UP).toFixed(e))},numberToHex:Q5,objectsEqual:X5,sleep:CZ,stringToBuffer:Swe,toHex:JR,toReadableString:Twe},Symbol.toStringTag,{value:"Module"})),fE="6.11.1";function kwe(r,e,t){const n=e.split("|").map(s=>s.trim());for(let s=0;sPromise.resolve(r[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})}function er(r,e,t){for(let n in e){let i=e[n];const s=t?t[n]:null;s&&kwe(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function Rw(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(Rw).join(", ")+" ]";if(r instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let n=0;n>4],t+=e[r[n]&15];return t}if(typeof r=="object"&&typeof r.toJSON=="function")return Rw(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"number":return r.toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{ "+e.map(t=>`${Rw(t)}: ${Rw(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function $s(r,e){return r&&r.code===e}function e4(r){return $s(r,"CALL_EXCEPTION")}function Wi(r,e,t){let n=r;{const s=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${Rw(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];s.push(o+"="+Rw(a))}}s.push(`code=${e}`),s.push(`version=${fE}`),s.length&&(r+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(r);break;default:i=new Error(r)}return er(i,{code:e}),t&&Object.assign(i,t),i.shortMessage==null&&er(i,{shortMessage:n}),i}function Ue(r,e,t,n){if(!r)throw Wi(e,t,n)}function xe(r,e,t,n){Ue(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function dE(r,e,t){t==null&&(t=""),t&&(t=": "+t),Ue(r>=e,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:r,expectedCount:e}),Ue(r<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:r,expectedCount:e})}const Mwe=["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const t=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(t!==n)throw new Error("broken")}r.push(e)}catch{}return r},[]);function pE(r){Ue(Mwe.indexOf(r)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:r}})}function Lh(r,e,t){if(t==null&&(t=""),r!==e){let n=t,i="new";t&&(n+=".",i+=" "+t),Ue(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function SZ(r,e,t){if(r instanceof Uint8Array)return t?new Uint8Array(r):r;if(typeof r=="string"&&r.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((r.length-2)/2);let i=2;for(let s=0;s>4]+IZ[i&15]}return t}function Sn(r){return"0x"+r.map(e=>St(e).substring(2)).join("")}function ud(r){return ui(r,!0)?(r.length-2)/2:$t(r).length}function hi(r,e,t){const n=$t(r);return t!=null&&t>n.length&&Ue(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),St(n.slice(e??0,t??n.length))}function TZ(r){let e=St(r).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function RZ(r,e,t){const n=$t(r);Ue(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),t?i.set(n,e-n.length):i.set(n,0),St(i)}function Oo(r,e){return RZ(r,e,!0)}function t4(r,e){return RZ(r,e,!1)}const mE=BigInt(0),Ru=BigInt(1),kw=9007199254740991;function Mw(r,e){const t=Nw(r,"value"),n=BigInt(Ir(e,"width"));if(Ue(t>>n===mE,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Ru){const i=(Ru<=-kw&&r<=kw,"overflow",e||"value",r),BigInt(r);case"string":try{if(r==="")throw new Error("empty string");return r[0]==="-"&&r[1]!=="-"?-BigInt(r.substring(1)):BigInt(r)}catch(t){xe(!1,`invalid BigNumberish string: ${t.message}`,e||"value",r)}}xe(!1,"invalid BigNumberish value",e||"value",r)}function Nw(r,e){const t=cr(r,e);return Ue(t>=mE,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}const kZ="0123456789abcdef";function mg(r){if(r instanceof Uint8Array){let e="0x0";for(const t of r)e+=kZ[t>>4],e+=kZ[t&15];return BigInt(e)}return cr(r)}function Ir(r,e){switch(typeof r){case"bigint":return xe(r>=-kw&&r<=kw,"overflow",e||"value",r),Number(r);case"number":return xe(Number.isInteger(r),"underflow",e||"value",r),xe(r>=-kw&&r<=kw,"overflow",e||"value",r),r;case"string":try{if(r==="")throw new Error("empty string");return Ir(BigInt(r),e)}catch(t){xe(!1,`invalid numeric string: ${t.message}`,e||"value",r)}}xe(!1,"invalid numeric value",e||"value",r)}function nk(r){return Ir(mg(r))}function ku(r,e){let n=Nw(r,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Ir(e,"width");for(Ue(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:r});n.length>6===2;o++)s++;return s}return r==="OVERRUN"?t.length-e-1:0}function Dwe(r,e,t,n,i){return r==="OVERLONG"?(xe(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),MZ(r,e,t))}const ck=Object.freeze({error:Owe,ignore:MZ,replace:Dwe});function NZ(r,e){e==null&&(e=ck.error);const t=$t(r,"bytes"),n=[];let i=0;for(;i>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,t,n):i+=e("BAD_PREFIX",i-1,t,n);continue}if(i-1+o>=t.length){i+=e("OVERRUN",i-1,t,n);continue}let l=s&(1<<8-o-1)-1;for(let u=0;u1114111){i+=e("OUT_OF_RANGE",i-1-o,t,n,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-o,t,n,l);continue}if(l<=a){i+=e("OVERLONG",i-1-o,t,n,l);continue}n.push(l)}}return n}function Bs(r,e){xe(typeof r=="string","invalid string value","str",r),e!=null&&(pE(e),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);xe(n>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return new Uint8Array(t)}function $we(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function dd(r,e){return $we(NZ(r,e))}function PZ(r,e){return NZ(Bs(r,e))}function OZ(r){async function e(t,n){const i=t.url.split(":")[0].toLowerCase();Ue(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),Ue(i==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s;if(n){const p=new AbortController;s=p.signal,n.addListener(()=>{p.abort()})}const o={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s},a=await fetch(t.url,o),l={};a.headers.forEach((p,g)=>{l[g.toLowerCase()]=p});const u=await a.arrayBuffer(),h=u==null?null:new Uint8Array(u);return{statusCode:a.status,statusMessage:a.statusText,headers:l,body:h}}return e}const Bwe=12,Lwe=250;let DZ=OZ();const Uwe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Fwe=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let lk=!1;async function $Z(r,e){try{const t=r.match(Uwe);if(!t)throw new Error("invalid data");return new Uh(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?ok(t[3]):jwe(t[3]))}catch{return new Uh(599,"BAD REQUEST (invalid data: URI)",{},null,new Do(r))}}function BZ(r){async function e(t,n){try{const i=t.match(Fwe);if(!i)throw new Error("invalid link");return new Do(`${r}${i[2]}`)}catch{return new Uh(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Do(t))}}return e}const xE={data:$Z,ipfs:BZ("https://gateway.ipfs.io/ipfs/")},LZ=new WeakMap;class uk{constructor(e){Ne(this,S2,void 0);Ne(this,L1,void 0);me(this,S2,[]),me(this,L1,!1),LZ.set(e,()=>{if(!oe(this,L1)){me(this,L1,!0);for(const t of oe(this,S2))setTimeout(()=>{t()},0);me(this,S2,[])}})}addListener(e){Ue(!oe(this,L1),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),oe(this,S2).push(e)}get cancelled(){return oe(this,L1)}checkSignal(){Ue(!this.cancelled,"cancelled","CANCELLED",{})}}S2=new WeakMap,L1=new WeakMap;function _E(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}const ZT=class{constructor(e){Ne(this,k2);Ne(this,T3,void 0);Ne(this,R3,void 0);Ne(this,uh,void 0);Ne(this,d0,void 0);Ne(this,k3,void 0);Ne(this,M3,void 0);Ne(this,Mo,void 0);Ne(this,il,void 0);Ne(this,p0,void 0);Ne(this,I2,void 0);Ne(this,T2,void 0);Ne(this,R2,void 0);Ne(this,Hf,void 0);Ne(this,g0,void 0);Ne(this,U1,void 0);me(this,M3,String(e)),me(this,T3,!1),me(this,R3,!0),me(this,uh,{}),me(this,d0,""),me(this,k3,3e5),me(this,g0,{slotInterval:Lwe,maxAttempts:Bwe}),me(this,U1,null)}get url(){return oe(this,M3)}set url(e){me(this,M3,String(e))}get body(){return oe(this,Mo)==null?null:new Uint8Array(oe(this,Mo))}set body(e){if(e==null)me(this,Mo,void 0),me(this,il,void 0);else if(typeof e=="string")me(this,Mo,Bs(e)),me(this,il,"text/plain");else if(e instanceof Uint8Array)me(this,Mo,e),me(this,il,"application/octet-stream");else if(typeof e=="object")me(this,Mo,Bs(JSON.stringify(e))),me(this,il,"application/json");else throw new Error("invalid body")}hasBody(){return oe(this,Mo)!=null}get method(){return oe(this,d0)?oe(this,d0):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),me(this,d0,String(e).toUpperCase())}get headers(){const e=Object.assign({},oe(this,uh));return oe(this,p0)&&(e.authorization=`Basic ${ak(Bs(oe(this,p0)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&oe(this,il)&&(e["content-type"]=oe(this,il)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){oe(this,uh)[String(e).toLowerCase()]=String(t)}clearHeaders(){me(this,uh,{})}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),me(this,k3,e)}get preflightFunc(){return oe(this,I2)||null}set preflightFunc(e){me(this,I2,e)}get processFunc(){return oe(this,T2)||null}set processFunc(e){me(this,T2,e)}get retryFunc(){return oe(this,R2)||null}set retryFunc(e){me(this,R2,e)}get getUrlFunc(){return oe(this,U1)||DZ}set getUrlFunc(e){me(this,U1,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(oe(this,g0).slotInterval=e.slotInterval),e.maxAttempts!=null&&(oe(this,g0).maxAttempts=e.maxAttempts)}send(){return Ue(oe(this,Hf)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),me(this,Hf,new uk(this)),rt(this,k2,m_).call(this,0,UZ()+this.timeout,0,this,new Uh(0,"",{},null,this))}cancel(){Ue(oe(this,Hf)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=LZ.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Ue(this.method==="GET"&&(t!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new ZT(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,me(i,uh,Object.assign({},oe(this,uh))),oe(this,Mo)&&me(i,Mo,new Uint8Array(oe(this,Mo))),me(i,il,oe(this,il)),i}clone(){const e=new ZT(this.url);return me(e,d0,oe(this,d0)),oe(this,Mo)&&me(e,Mo,oe(this,Mo)),me(e,il,oe(this,il)),me(e,uh,Object.assign({},oe(this,uh))),me(e,p0,oe(this,p0)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),me(e,I2,oe(this,I2)),me(e,T2,oe(this,T2)),me(e,R2,oe(this,R2)),me(e,U1,oe(this,U1)),e}static lockConfig(){lk=!0}static getGateway(e){return xE[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(lk)throw new Error("gateways locked");xE[e]=t}static registerGetUrl(e){if(lk)throw new Error("gateways locked");DZ=e}static createGetUrlFunc(e){return OZ()}static createDataGateway(){return $Z}static createIpfsGatewayFunc(e){return BZ(e)}};let Do=ZT;T3=new WeakMap,R3=new WeakMap,uh=new WeakMap,d0=new WeakMap,k3=new WeakMap,M3=new WeakMap,Mo=new WeakMap,il=new WeakMap,p0=new WeakMap,I2=new WeakMap,T2=new WeakMap,R2=new WeakMap,Hf=new WeakMap,g0=new WeakMap,U1=new WeakMap,k2=new WeakSet,m_=async function(e,t,n,i,s){var h,p,g;if(e>=oe(this,g0).maxAttempts)return s.makeServerError("exceeded maximum retry limit");Ue(UZ()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await zwe(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in xE){const w=await xE[a](o.url,_E(oe(i,Hf)));if(w instanceof Uh){let y=w;if(this.processFunc){_E(oe(i,Hf));try{y=await this.processFunc(o,y)}catch(C){(C.throttle==null||typeof C.stall!="number")&&y.makeServerError("error in post-processing function",C).assertOk()}}return y}o=w}this.preflightFunc&&(o=await this.preflightFunc(o));const l=await this.getUrlFunc(o,_E(oe(i,Hf)));let u=new Uh(l.statusCode,l.statusMessage,l.headers,l.body,i);if(u.statusCode===301||u.statusCode===302){try{const w=u.headers.location||"";return rt(h=o.redirect(w),k2,m_).call(h,e+1,t,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,u,e))){const w=u.headers["retry-after"];let y=oe(this,g0).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof w=="string"&&w.match(/^[1-9][0-9]*$/)&&(y=parseInt(w)),rt(p=o.clone(),k2,m_).call(p,e+1,t,y,i,u)}if(this.processFunc){_E(oe(i,Hf));try{u=await this.processFunc(o,u)}catch(w){(w.throttle==null||typeof w.stall!="number")&&u.makeServerError("error in post-processing function",w).assertOk();let y=oe(this,g0).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return w.stall>=0&&(y=w.stall),rt(g=o.clone(),k2,m_).call(g,e+1,t,y,i,u)}}return u};const oj=class{constructor(e,t,n,i,s){Ne(this,Mx,void 0);Ne(this,Nx,void 0);Ne(this,Px,void 0);Ne(this,sl,void 0);Ne(this,N3,void 0);Ne(this,M2,void 0);me(this,Mx,e),me(this,Nx,t),me(this,Px,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),me(this,sl,i==null?null:new Uint8Array(i)),me(this,N3,s||null),me(this,M2,{message:""})}toString(){return``}get statusCode(){return oe(this,Mx)}get statusMessage(){return oe(this,Nx)}get headers(){return Object.assign({},oe(this,Px))}get body(){return oe(this,sl)==null?null:new Uint8Array(oe(this,sl))}get bodyText(){try{return oe(this,sl)==null?"":dd(oe(this,sl))}catch{Ue(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Ue(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw er(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return oe(this,sl)!=null}get request(){return oe(this,N3)}ok(){return oe(this,M2).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=oe(this,M2);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{oe(this,sl)&&(i=dd(oe(this,sl)))}catch{}Ue(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};let Uh=oj;Mx=new WeakMap,Nx=new WeakMap,Px=new WeakMap,sl=new WeakMap,N3=new WeakMap,M2=new WeakMap;function UZ(){return new Date().getTime()}function jwe(r){return Bs(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function zwe(r){return new Promise(e=>setTimeout(e,r))}const Hwe=BigInt(-1),Mu=BigInt(0),Pw=BigInt(1),qwe=BigInt(5),Ow={};let Dw="0000";for(;Dw.length<80;)Dw+=Dw;function bg(r){let e=Dw;for(;e.length=-i&&rMu?r=Mw(hd(r,n),n):r=-Mw(hd(-r,n),n)}else{const i=Pw<=0&&rs[a]==null?u:(xe(typeof s[a]===l,"invalid fixed format ("+a+" not "+l+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),t=o("width","number",t),n=o("decimals","number",n)}xe(t%8===0,"invalid FixedNumber width (not byte aligned)","format.width",t),xe(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(t)+"x"+String(n);return{signed:e,width:t,decimals:n,name:i}}function Wwe(r,e){let t="";r0?n*=bg(i):i<0&&(t*=bg(-i)),tn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=oe(this,mi);return oe(this,mi)Mu&&(e+=oe(this,Va)-Pw),e=oe(this,mi)/oe(this,Va)*oe(this,Va),rt(this,fh,bp).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=qwe*bg(t-1);let i=this.value+n;const s=bg(t);return i=i/s*s,n4(i,oe(this,hh),"round"),new F1(Ow,i,oe(this,hh))}isZero(){return oe(this,mi)===Mu}isNegative(){return oe(this,mi)0){const l=bg(a);Ue(o%l===Mu,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=l}else a<0&&(o*=bg(-a));return n4(o,s,"fromValue"),new F1(Ow,o,s)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);xe(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=hk(t);let s=n[2]||"0",o=n[3]||"";for(;o.length{Ue(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[e]>=248){const n=r[e]-247;t(e+1+n);const i=FZ(r,e+1,n);return t(e+1+n+i),jZ(r,e,e+1+n,n+i)}else if(r[e]>=192){const n=r[e]-192;return t(e+1+n),jZ(r,e,e+1,n)}else if(r[e]>=184){const n=r[e]-183;t(e+1+n);const i=FZ(r,e+1,n);t(e+1+n+i);const s=St(r.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(r[e]>=128){const n=r[e]-128;t(e+1+n);const i=St(r.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:Vwe(r[e])}}function Bw(r){const e=$t(r,"data"),t=zZ(e,0);return xe(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function HZ(r){const e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function qZ(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(qZ(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=HZ(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call($t(r,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=HZ(e.length);return t.unshift(183+t.length),t.concat(e)}const WZ="0123456789abcdef";function Ap(r){let e="0x";for(const t of qZ(r))e+=WZ[t>>4],e+=WZ[t&15];return e}const VZ=["wei","kwei","mwei","gwei","szabo","finney","ether"];function EE(r,e){let t=18;if(typeof e=="string"){const n=VZ.indexOf(e);xe(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Ir(e,"unit"));return $w.fromValue(r,t,{decimals:t,width:512}).toString()}function AE(r,e){xe(typeof r=="string","value must be a string","value",r);let t=18;if(typeof e=="string"){const n=VZ.indexOf(e);xe(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Ir(e,"unit"));return $w.fromString(r,{decimals:t,width:512}).value}function fk(r){return EE(r,18)}function GZ(r){return AE(r,18)}function dk(r){const e=$t(r,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=St(e);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")}const Sa=32,pk=new Uint8Array(Sa),Gwe=["then"],CE={};function i4(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}const Lx=class extends Array{constructor(...t){const n=t[0];let i=t[1],s=(t[2]||[]).slice(),o=!0;n!==CE&&(i=t,s=[],o=!1);super(i.length);Ne(this,j1,void 0);i.forEach((l,u)=>{this[u]=l});const a=s.reduce((l,u)=>(typeof u=="string"&&l.set(u,(l.get(u)||0)+1),l),new Map);if(me(this,j1,Object.freeze(i.map((l,u)=>{const h=s[u];return h!=null&&a.get(h)===1?h:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(l,u,h)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const g=Ir(u,"%index");if(g<0||g>=this.length)throw new RangeError("out of result range");const w=l[g];return w instanceof Error&&i4(`index ${g}`,w),w}if(Gwe.indexOf(u)>=0)return Reflect.get(l,u,h);const p=l[u];if(p instanceof Function)return function(...g){return p.apply(this===h?l:this,g)};if(!(u in l))return l.getValue.apply(this===h?l:this,[u])}return Reflect.get(l,u,h)}})}toArray(){const t=[];return this.forEach((n,i)=>{n instanceof Error&&i4(`index ${i}`,n),t.push(n)}),t}toObject(){return oe(this,j1).reduce((t,n,i)=>(Ue(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in t||(t[n]=this.getValue(n)),t),{})}slice(t,n){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=[],s=[];for(let o=t;o{oe(this,b0)[e]=ZZ(t)}}}b0=new WeakMap,N2=new WeakMap,P3=new WeakSet,oR=function(e){return oe(this,b0).push(e),me(this,N2,oe(this,N2)+e.length),e.length};const aj=class{constructor(e,t,n){Ne(this,Ux);Ne(this,JT);Ee(this,"allowLoose");Ne(this,Ac,void 0);Ne(this,ol,void 0);Ne(this,P2,void 0);Ne(this,O2,void 0);Ne(this,z1,void 0);er(this,{allowLoose:!!t}),me(this,Ac,Ws(e)),me(this,P2,0),me(this,O2,null),me(this,z1,n??1024),me(this,ol,0)}get data(){return St(oe(this,Ac))}get dataLength(){return oe(this,Ac).length}get consumed(){return oe(this,ol)}get bytes(){return new Uint8Array(oe(this,Ac))}subReader(e){const t=new aj(oe(this,Ac).slice(oe(this,ol)+e),this.allowLoose,oe(this,z1));return me(t,O2,this),t}readBytes(e,t){let n=rt(this,JT,vge).call(this,0,e,!!t);return rt(this,Ux,JG).call(this,e),me(this,ol,oe(this,ol)+n.length),n.slice(0,e)}readValue(){return mg(this.readBytes(Sa))}readIndex(){return nk(this.readBytes(Sa))}};let mk=aj;Ac=new WeakMap,ol=new WeakMap,P2=new WeakMap,O2=new WeakMap,z1=new WeakMap,Ux=new WeakSet,JG=function(e){var t;if(oe(this,O2))return rt(t=oe(this,O2),Ux,JG).call(t,e);me(this,P2,oe(this,P2)+e),Ue(oe(this,z1)<1||oe(this,P2)<=oe(this,z1)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${oe(this,z1)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Ws(oe(this,Ac)),offset:oe(this,ol),length:e,info:{bytesRead:oe(this,P2),dataLength:this.dataLength}})},JT=new WeakSet,vge=function(e,t,n){let i=Math.ceil(t/Sa)*Sa;return oe(this,ol)+i>oe(this,Ac).length&&(this.allowLoose&&n&&oe(this,ol)+t<=oe(this,Ac).length?i=t:Ue(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Ws(oe(this,Ac)),length:oe(this,Ac).length,offset:oe(this,ol)+i})),oe(this,Ac).slice(oe(this,ol),oe(this,ol)+i)};function Rc(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function bk(r,...e){if(!(r instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function JZ(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Rc(r.outputLen),Rc(r.blockLen)}function Uw(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function YZ(r,e){bk(r);const t=e.outputLen;if(r.lengthr instanceof Uint8Array,SE=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),IE=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),Fh=(r,e)=>r<<32-e|r>>>e;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const Kwe=async()=>{};async function XZ(r,e,t){let n=Date.now();for(let i=0;i=0&&sn+i.length,0));let t=0;return r.forEach(n=>{if(!QZ(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}let vk=class{clone(){return this._cloneInto()}};const Ywe={}.toString;function eJ(r,e){if(e!==void 0&&Ywe.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(r,e)}function TE(r){const e=n=>r().update(Fw(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function Qwe(r=32){if(wk&&typeof wk.getRandomValues=="function")return wk.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}let tJ=class extends vk{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,JZ(e);const n=Fw(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;onew tJ(r,e).update(t).digest();RE.create=(r,e)=>new tJ(r,e);function Xwe(r,e,t,n){JZ(r);const i=eJ({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:a}=i;if(Rc(s),Rc(o),Rc(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=Fw(e),u=Fw(t),h=new Uint8Array(o),p=RE.create(r,l),g=p._cloneInto().update(u);return{c:s,dkLen:o,asyncTick:a,DK:h,PRF:p,PRFSalt:g}}function eve(r,e,t,n,i){return r.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),t}function yk(r,e,t,n){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:l}=Xwe(r,e,t,n);let u;const h=new Uint8Array(4),p=IE(h),g=new Uint8Array(a.outputLen);for(let w=1,y=0;y>i&s),a=Number(t&s),l=n?4:0,u=n?0:4;r.setUint32(e+l,o,n),r.setUint32(e+u,a,n)}class xk extends vk{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=IE(this.buffer)}update(e){Uw(this);const{view:t,buffer:n,blockLen:i}=this;e=Fw(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let p=o;ph.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;pr&e^~r&t,nve=(r,e,t)=>r&e^r&t^e&t,ive=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Cp=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Sp=new Uint32Array(64);class sve extends xk{constructor(){super(64,32,8,!1),this.A=Cp[0]|0,this.B=Cp[1]|0,this.C=Cp[2]|0,this.D=Cp[3]|0,this.E=Cp[4]|0,this.F=Cp[5]|0,this.G=Cp[6]|0,this.H=Cp[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:o,G:a,H:l}=this;return[e,t,n,i,s,o,a,l]}set(e,t,n,i,s,o,a,l){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=l|0}process(e,t){for(let p=0;p<16;p++,t+=4)Sp[p]=e.getUint32(t,!1);for(let p=16;p<64;p++){const g=Sp[p-15],w=Sp[p-2],y=Fh(g,7)^Fh(g,18)^g>>>3,C=Fh(w,17)^Fh(w,19)^w>>>10;Sp[p]=C+Sp[p-7]+y+Sp[p-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:l,G:u,H:h}=this;for(let p=0;p<64;p++){const g=Fh(a,6)^Fh(a,11)^Fh(a,25),w=h+g+rve(a,l,u)+ive[p]+Sp[p]|0,C=(Fh(n,2)^Fh(n,13)^Fh(n,22))+nve(n,i,s)|0;h=u,u=l,l=a,a=o+w|0,o=s,s=i,i=n,n=w+C|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(n,i,s,o,a,l,u,h)}roundClean(){Sp.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const jw=TE(()=>new sve),kE=BigInt(2**32-1),_k=BigInt(32);function rJ(r,e=!1){return e?{h:Number(r&kE),l:Number(r>>_k&kE)}:{h:Number(r>>_k&kE)|0,l:Number(r&kE)|0}}function nJ(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;iBigInt(r>>>0)<<_k|BigInt(e>>>0),ave=(r,e,t)=>r>>>t,cve=(r,e,t)=>r<<32-t|e>>>t,lve=(r,e,t)=>r>>>t|e<<32-t,uve=(r,e,t)=>r<<32-t|e>>>t,hve=(r,e,t)=>r<<64-t|e>>>t-32,fve=(r,e,t)=>r>>>t-32|e<<64-t,dve=(r,e)=>e,pve=(r,e)=>r,iJ=(r,e,t)=>r<>>32-t,sJ=(r,e,t)=>e<>>32-t,oJ=(r,e,t)=>e<>>64-t,aJ=(r,e,t)=>r<>>64-t;function gve(r,e,t,n){const i=(e>>>0)+(n>>>0);return{h:r+t+(i/2**32|0)|0,l:i|0}}const Xr={fromBig:rJ,split:nJ,toBig:ove,shrSH:ave,shrSL:cve,rotrSH:lve,rotrSL:uve,rotrBH:hve,rotrBL:fve,rotr32H:dve,rotr32L:pve,rotlSH:iJ,rotlSL:sJ,rotlBH:oJ,rotlBL:aJ,add:gve,add3L:(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),add3H:(r,e,t,n)=>e+t+n+(r/2**32|0)|0,add4L:(r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),add4H:(r,e,t,n,i)=>e+t+n+i+(r/2**32|0)|0,add5H:(r,e,t,n,i,s)=>e+t+n+i+s+(r/2**32|0)|0,add5L:(r,e,t,n,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0)},[mve,bve]=(()=>Xr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))))(),Ip=new Uint32Array(80),Tp=new Uint32Array(80);let wve=class extends xk{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:l,Eh:u,El:h,Fh:p,Fl:g,Gh:w,Gl:y,Hh:C,Hl:T}=this;return[e,t,n,i,s,o,a,l,u,h,p,g,w,y,C,T]}set(e,t,n,i,s,o,a,l,u,h,p,g,w,y,C,T){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=h|0,this.Fh=p|0,this.Fl=g|0,this.Gh=w|0,this.Gl=y|0,this.Hh=C|0,this.Hl=T|0}process(e,t){for(let O=0;O<16;O++,t+=4)Ip[O]=e.getUint32(t),Tp[O]=e.getUint32(t+=4);for(let O=16;O<80;O++){const B=Ip[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Cl|0,a|0,l|0),{h:u,l:h}=Xr.add(this.Dh|0,this.Dl|0,u|0,h|0),{h:p,l:g}=Xr.add(this.Eh|0,this.El|0,p|0,g|0),{h:w,l:y}=Xr.add(this.Fh|0,this.Fl|0,w|0,y|0),{h:C,l:T}=Xr.add(this.Gh|0,this.Gl|0,C|0,T|0),{h:k,l:N}=Xr.add(this.Hh|0,this.Hl|0,k|0,N|0),this.set(n,i,s,o,a,l,u,h,p,g,w,y,C,T,k,N)}roundClean(){Ip.fill(0),Tp.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const Ek=TE(()=>new wve);function vve(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof dr<"u")return dr;throw new Error("unable to locate global object")}const cJ=vve(),lJ=cJ.crypto||cJ.msCrypto;function uJ(r){switch(r){case"sha256":return jw.create();case"sha512":return Ek.create()}xe(!1,"invalid hashing algorithm name","algorithm",r)}function yve(r,e){const t={sha256:jw,sha512:Ek}[r];return xe(t!=null,"invalid hmac algorithm","algorithm",r),RE.create(t,e)}function xve(r,e,t,n,i){const s={sha256:jw,sha512:Ek}[i];return xe(s!=null,"invalid pbkdf2 algorithm","algorithm",i),yk(s,r,e,{c:t,dkLen:n})}function _ve(r){Ue(lJ!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),xe(Number.isInteger(r)&&r>0&&r<=1024,"invalid length","length",r);const e=new Uint8Array(r);return lJ.getRandomValues(e),e}let hJ=!1;const fJ=function(r,e,t){return yve(r,e).update(t).digest()};let dJ=fJ;function gd(r,e,t){const n=$t(e,"key"),i=$t(t,"data");return St(dJ(r,n,i))}gd._=fJ,gd.lock=function(){hJ=!0},gd.register=function(r){if(hJ)throw new Error("computeHmac is locked");dJ=r},Object.freeze(gd);const[pJ,gJ,mJ]=[[],[],[]],Eve=BigInt(0),s4=BigInt(1),Ave=BigInt(2),Cve=BigInt(7),Sve=BigInt(256),Ive=BigInt(113);for(let r=0,e=s4,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],pJ.push(2*(5*n+t)),gJ.push((r+1)*(r+2)/2%64);let i=Eve;for(let s=0;s<7;s++)e=(e<>Cve)*Ive)%Sve,e&Ave&&(i^=s4<<(s4<t>32?oJ(r,e,t):iJ(r,e,t),wJ=(r,e,t)=>t>32?aJ(r,e,t):sJ(r,e,t);function kve(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)t[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=t[l],h=t[l+1],p=bJ(u,h,1)^t[a],g=wJ(u,h,1)^t[a+1];for(let w=0;w<50;w+=10)r[o+w]^=p,r[o+w+1]^=g}let i=r[2],s=r[3];for(let o=0;o<24;o++){const a=gJ[o],l=bJ(i,s,a),u=wJ(i,s,a),h=pJ[o];i=r[h],s=r[h+1],r[h]=l,r[h+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=r[o+a];for(let a=0;a<10;a++)r[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}r[0]^=Tve[n],r[1]^=Rve[n]}t.fill(0)}let vJ=class extends vk{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Rc(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=SE(this.state)}keccak(){kve(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Uw(this);const{blockLen:t,state:n}=this;e=Fw(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Rc(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(YZ(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new vJ(t,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Mve=((r,e,t)=>TE(()=>new vJ(e,r,t)))(1,136,256/8);let yJ=!1;const xJ=function(r){return Mve(r)};let _J=xJ;function On(r){const e=$t(r,"data");return St(_J(e))}On._=xJ,On.lock=function(){yJ=!0},On.register=function(r){if(yJ)throw new TypeError("keccak256 is locked");_J=r},Object.freeze(On);const Nve=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),EJ=Uint8Array.from({length:16},(r,e)=>e),Pve=EJ.map(r=>(9*r+5)%16);let Ak=[EJ],Ck=[Pve];for(let r=0;r<4;r++)for(let e of[Ak,Ck])e.push(e[r].map(t=>Nve[t]));const AJ=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(r=>new Uint8Array(r)),Ove=Ak.map((r,e)=>r.map(t=>AJ[e][t])),Dve=Ck.map((r,e)=>r.map(t=>AJ[e][t])),$ve=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Bve=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),ME=(r,e)=>r<>>32-e;function CJ(r,e,t,n){return r===0?e^t^n:r===1?e&t|~e&n:r===2?(e|~t)^n:r===3?e&n|t&~n:e^(t|~n)}const NE=new Uint32Array(16);class Lve extends xk{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:i,h4:s}=this;return[e,t,n,i,s]}set(e,t,n,i,s){this.h0=e|0,this.h1=t|0,this.h2=n|0,this.h3=i|0,this.h4=s|0}process(e,t){for(let w=0;w<16;w++,t+=4)NE[w]=e.getUint32(t,!0);let n=this.h0|0,i=n,s=this.h1|0,o=s,a=this.h2|0,l=a,u=this.h3|0,h=u,p=this.h4|0,g=p;for(let w=0;w<5;w++){const y=4-w,C=$ve[w],T=Bve[w],k=Ak[w],N=Ck[w],O=Ove[w],B=Dve[w];for(let z=0;z<16;z++){const G=ME(n+CJ(w,s,a,u)+NE[k[z]]+C,O[z])+p|0;n=p,p=u,u=ME(a,10)|0,a=s,s=G}for(let z=0;z<16;z++){const G=ME(i+CJ(y,o,l,h)+NE[N[z]]+T,B[z])+g|0;i=g,g=h,h=ME(l,10)|0,l=o,o=G}}this.set(this.h1+a+h|0,this.h2+u+g|0,this.h3+p+i|0,this.h4+n+o|0,this.h0+s+l|0)}roundClean(){NE.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Uve=TE(()=>new Lve);let SJ=!1;const IJ=function(r){return Uve(r)};let TJ=IJ;function md(r){const e=$t(r,"data");return St(TJ(e))}md._=IJ,md.lock=function(){SJ=!0},md.register=function(r){if(SJ)throw new TypeError("ripemd160 is locked");TJ=r},Object.freeze(md);let RJ=!1;const kJ=function(r,e,t,n,i){return xve(r,e,t,n,i)};let MJ=kJ;function Nu(r,e,t,n,i){const s=$t(r,"password"),o=$t(e,"salt");return St(MJ(s,o,t,n,i))}Nu._=kJ,Nu.lock=function(){RJ=!0},Nu.register=function(r){if(RJ)throw new Error("pbkdf2 is locked");MJ=r},Object.freeze(Nu);let NJ=!1;const PJ=function(r){return new Uint8Array(_ve(r))};let OJ=PJ;function kc(r){return OJ(r)}kc._=PJ,kc.lock=function(){NJ=!0},kc.register=function(r){if(NJ)throw new Error("randomBytes is locked");OJ=r},Object.freeze(kc);const Dn=(r,e)=>r<>>32-e;function DJ(r,e,t,n,i,s){let o=r[e++]^t[n++],a=r[e++]^t[n++],l=r[e++]^t[n++],u=r[e++]^t[n++],h=r[e++]^t[n++],p=r[e++]^t[n++],g=r[e++]^t[n++],w=r[e++]^t[n++],y=r[e++]^t[n++],C=r[e++]^t[n++],T=r[e++]^t[n++],k=r[e++]^t[n++],N=r[e++]^t[n++],O=r[e++]^t[n++],B=r[e++]^t[n++],z=r[e++]^t[n++],G=o,$=a,D=l,V=u,Q=h,F=p,M=g,b=w,d=y,m=C,x=T,A=k,I=N,R=O,S=B,E=z;for(let _=0;_<8;_+=2)Q^=Dn(G+I|0,7),d^=Dn(Q+G|0,9),I^=Dn(d+Q|0,13),G^=Dn(I+d|0,18),m^=Dn(F+$|0,7),R^=Dn(m+F|0,9),$^=Dn(R+m|0,13),F^=Dn($+R|0,18),S^=Dn(x+M|0,7),D^=Dn(S+x|0,9),M^=Dn(D+S|0,13),x^=Dn(M+D|0,18),V^=Dn(E+A|0,7),b^=Dn(V+E|0,9),A^=Dn(b+V|0,13),E^=Dn(A+b|0,18),$^=Dn(G+V|0,7),D^=Dn($+G|0,9),V^=Dn(D+$|0,13),G^=Dn(V+D|0,18),M^=Dn(F+Q|0,7),b^=Dn(M+F|0,9),Q^=Dn(b+M|0,13),F^=Dn(Q+b|0,18),A^=Dn(x+m|0,7),d^=Dn(A+x|0,9),m^=Dn(d+A|0,13),x^=Dn(m+d|0,18),I^=Dn(E+S|0,7),R^=Dn(I+E|0,9),S^=Dn(R+I|0,13),E^=Dn(S+R|0,18);i[s++]=o+G|0,i[s++]=a+$|0,i[s++]=l+D|0,i[s++]=u+V|0,i[s++]=h+Q|0,i[s++]=p+F|0,i[s++]=g+M|0,i[s++]=w+b|0,i[s++]=y+d|0,i[s++]=C+m|0,i[s++]=T+x|0,i[s++]=k+A|0,i[s++]=N+I|0,i[s++]=O+R|0,i[s++]=B+S|0,i[s++]=z+E|0}function zw(r,e,t,n,i){let s=n+0,o=n+16*i;for(let a=0;a<16;a++)t[o+a]=r[e+(2*i-1)*16+a];for(let a=0;a0&&(o+=16),DJ(t,s,r,e+=16,t,o)}function $J(r,e,t){const n=eJ({dkLen:32,asyncTick:10,maxmem:1073742848},t),{N:i,r:s,p:o,dkLen:a,asyncTick:l,maxmem:u,onProgress:h}=n;if(Rc(i),Rc(s),Rc(o),Rc(a),Rc(l),Rc(u),h!==void 0&&typeof h!="function")throw new Error("progressCb should be function");const p=128*s,g=p/4;if(i<=1||i&i-1||i>=2**(p/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/p)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const w=p*(i+o);if(w>u)throw new Error(`Scrypt: parameters too large, ${w} (128 * r * (N + p)) > ${u} (maxmem)`);const y=yk(jw,r,e,{c:1,dkLen:p*o}),C=SE(y),T=SE(new Uint8Array(p*i)),k=SE(new Uint8Array(p));let N=()=>{};if(h){const O=2*i*o,B=Math.max(Math.floor(O/1e4),1);let z=0;N=()=>{z++,h&&(!(z%B)||z===O)&&h(z/O)}}return{N:i,r:s,p:o,dkLen:a,blockSize32:g,V:T,B32:C,B:y,tmp:k,blockMixCb:N,asyncTick:l}}function BJ(r,e,t,n,i){const s=yk(jw,r,t,{c:1,dkLen:e});return t.fill(0),n.fill(0),i.fill(0),s}function Fve(r,e,t){const{N:n,r:i,p:s,dkLen:o,blockSize32:a,V:l,B32:u,B:h,tmp:p,blockMixCb:g}=$J(r,e,t);for(let w=0;w{zw(l,T,l,T+=a,i),g()}),zw(l,(n-1)*a,u,C,i),g(),await XZ(n,w,()=>{const k=u[C+a-16]%n;for(let N=0;Nr instanceof Uint8Array,Hve=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function qw(r){if(!OE(r))throw new Error("Uint8Array expected");let e="";for(let t=0;tn+i.length,0));let t=0;return r.forEach(n=>{if(!OE(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function Wve(r,e){if(r.length!==e.length)return!1;for(let t=0;tJJ;r>>=PE,e+=1);return e}function Kve(r,e){return r>>BigInt(e)&PE}const Zve=(r,e,t)=>r|(t?PE:JJ)<(zve<new Uint8Array(r),QJ=r=>Uint8Array.from(r);function XJ(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=kk(r),i=kk(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...p)=>t(i,n,...p),l=(p=kk())=>{i=a(QJ([0]),p),n=a(),p.length!==0&&(i=a(QJ([1]),p),n=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const g=[];for(;p{o(),l(p);let w;for(;!(w=g(u()));)l();return o(),w}}const Jve={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function a4(r,e,t={}){const n=(i,s,o)=>{const a=Jve[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const l=r[i];if(!(o&&l===void 0)&&!a(l,r))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(t))n(i,s,!0);return r}const Yve=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Kve,bitLen:Gve,bitMask:Rk,bitSet:Zve,bytesToHex:qw,bytesToNumberBE:wg,bytesToNumberLE:Ik,concatBytes:o4,createHmacDrbg:XJ,ensureBytes:Pu,equalBytes:Wve,hexToBytes:Ww,hexToNumber:Sk,numberToBytesBE:Vw,numberToBytesLE:Tk,numberToHexUnpadded:YJ,numberToVarBytesBE:qve,utf8ToBytes:Vve,validateObject:a4},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const lo=BigInt(0),gs=BigInt(1),vg=BigInt(2),Qve=BigInt(3),Mk=BigInt(4),eY=BigInt(5),tY=BigInt(8);BigInt(9),BigInt(16);function oc(r,e){const t=r%e;return t>=lo?t:e+t}function Xve(r,e,t){if(t<=lo||e 0");if(t===gs)return lo;let n=gs;for(;e>lo;)e&gs&&(n=n*r%t),r=r*r%t,e>>=gs;return n}function Ml(r,e,t){let n=r;for(;e-- >lo;)n*=n,n%=t;return n}function Nk(r,e){if(r===lo||e<=lo)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=oc(r,e),n=e,i=lo,s=gs;for(;t!==lo;){const a=n/t,l=n%t,u=i-s*a;n=t,t=l,i=s,s=u}if(n!==gs)throw new Error("invert: does not exist");return oc(i,e)}function eye(r){const e=(r-gs)/vg;let t,n,i;for(t=r-gs,n=0;t%vg===lo;t/=vg,n++);for(i=vg;i(n[i]="function",n),e);return a4(r,t)}function iye(r,e,t){if(t 0");if(t===lo)return r.ONE;if(t===gs)return e;let n=r.ONE,i=e;for(;t>lo;)t&gs&&(n=r.mul(n,i)),i=r.sqr(i),t>>=gs;return n}function sye(r,e){const t=new Array(e.length),n=e.reduce((s,o,a)=>r.is0(o)?s:(t[a]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,a)=>r.is0(o)?s:(t[a]=r.mul(s,t[a]),r.mul(s,o)),i),t}function rY(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function oye(r,e,t=!1,n={}){if(r<=lo)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=rY(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=tye(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:Rk(i),ZERO:lo,ONE:gs,create:l=>oc(l,r),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return lo<=l&&ll===lo,isOdd:l=>(l&gs)===gs,neg:l=>oc(-l,r),eql:(l,u)=>l===u,sqr:l=>oc(l*l,r),add:(l,u)=>oc(l+u,r),sub:(l,u)=>oc(l-u,r),mul:(l,u)=>oc(l*u,r),pow:(l,u)=>iye(a,l,u),div:(l,u)=>oc(l*Nk(u,r),r),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>Nk(l,r),sqrt:n.sqrt||(l=>o(a,l)),invertBatch:l=>sye(a,l),cmov:(l,u,h)=>h?u:l,toBytes:l=>t?Tk(l,s):Vw(l,s),fromBytes:l=>{if(l.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${l.length}`);return t?Ik(l):wg(l)}});return Object.freeze(a)}function nY(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const e=r.toString(2).length;return Math.ceil(e/8)}function iY(r){const e=nY(r);return e+Math.ceil(e/2)}function aye(r,e,t=!1){const n=r.length,i=nY(e),s=iY(e);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?wg(r):Ik(r),a=oc(o,e-gs)+gs;return t?Tk(a,i):Vw(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cye=BigInt(0),Pk=BigInt(1);function lye(r,e){const t=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:t,unsafeLadder(i,s){let o=r.ZERO,a=i;for(;s>cye;)s&Pk&&(o=o.add(a)),a=a.double(),s>>=Pk;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),l=[];let u=i,h=u;for(let p=0;p>=w,T>l&&(T-=g,o+=Pk);const k=C,N=C+Math.abs(T)-1,O=y%2!==0,B=T<0;T===0?h=h.add(t(O,s[k])):u=u.add(t(B,s[N]))}return{p:u,f:h}},wNAFCached(i,s,o,a){const l=i._WINDOW_SIZE||1;let u=s.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&s.set(i,a(u))),this.wNAF(l,u,o)}}}function sY(r){return nye(r.Fp),a4(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...rY(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function uye(r){const e=sY(r);a4(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:hye,hexToBytes:fye}=Yve,yg={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=yg;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");const t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:hye(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=yg,t=typeof r=="string"?fye(r):r;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=yg._parseInt(t.subarray(2)),{d:o,l:a}=yg._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){const e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,t=u=>{const h=u.toString(16);return h.length&1?`0${h}`:h},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,a=t(s),l=t(o);return`30${t(o+s+4)}02${l}${i}02${a}${n}`}},vd=BigInt(0),Nl=BigInt(1);BigInt(2);const oY=BigInt(3);BigInt(4);function dye(r){const e=uye(r),{Fp:t}=e,n=e.toBytes||((y,C,T)=>{const k=C.toAffine();return o4(Uint8Array.from([4]),t.toBytes(k.x),t.toBytes(k.y))}),i=e.fromBytes||(y=>{const C=y.subarray(1),T=t.fromBytes(C.subarray(0,t.BYTES)),k=t.fromBytes(C.subarray(t.BYTES,2*t.BYTES));return{x:T,y:k}});function s(y){const{a:C,b:T}=e,k=t.sqr(y),N=t.mul(k,y);return t.add(t.add(N,t.mul(y,C)),T)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(y){return typeof y=="bigint"&&vdt.eql(O,t.ZERO);return N(T)&&N(k)?p.ZERO:new p(T,k,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const T=t.invertBatch(C.map(k=>k.pz));return C.map((k,N)=>k.toAffine(T[N])).map(p.fromAffine)}static fromHex(C){const T=p.fromAffine(i(Pu("pointHex",C)));return T.assertValidity(),T}static fromPrivateKey(C){return p.BASE.multiply(l(C))}_setWindowSize(C){this._WINDOW_SIZE=C,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:C,y:T}=this.toAffine();if(!t.isValid(C)||!t.isValid(T))throw new Error("bad point: x or y not FE");const k=t.sqr(T),N=s(C);if(!t.eql(k,N))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:C}=this.toAffine();if(t.isOdd)return!t.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){h(C);const{px:T,py:k,pz:N}=this,{px:O,py:B,pz:z}=C,G=t.eql(t.mul(T,z),t.mul(O,N)),$=t.eql(t.mul(k,z),t.mul(B,N));return G&&$}negate(){return new p(this.px,t.neg(this.py),this.pz)}double(){const{a:C,b:T}=e,k=t.mul(T,oY),{px:N,py:O,pz:B}=this;let z=t.ZERO,G=t.ZERO,$=t.ZERO,D=t.mul(N,N),V=t.mul(O,O),Q=t.mul(B,B),F=t.mul(N,O);return F=t.add(F,F),$=t.mul(N,B),$=t.add($,$),z=t.mul(C,$),G=t.mul(k,Q),G=t.add(z,G),z=t.sub(V,G),G=t.add(V,G),G=t.mul(z,G),z=t.mul(F,z),$=t.mul(k,$),Q=t.mul(C,Q),F=t.sub(D,Q),F=t.mul(C,F),F=t.add(F,$),$=t.add(D,D),D=t.add($,D),D=t.add(D,Q),D=t.mul(D,F),G=t.add(G,D),Q=t.mul(O,B),Q=t.add(Q,Q),D=t.mul(Q,F),z=t.sub(z,D),$=t.mul(Q,V),$=t.add($,$),$=t.add($,$),new p(z,G,$)}add(C){h(C);const{px:T,py:k,pz:N}=this,{px:O,py:B,pz:z}=C;let G=t.ZERO,$=t.ZERO,D=t.ZERO;const V=e.a,Q=t.mul(e.b,oY);let F=t.mul(T,O),M=t.mul(k,B),b=t.mul(N,z),d=t.add(T,k),m=t.add(O,B);d=t.mul(d,m),m=t.add(F,M),d=t.sub(d,m),m=t.add(T,N);let x=t.add(O,z);return m=t.mul(m,x),x=t.add(F,b),m=t.sub(m,x),x=t.add(k,N),G=t.add(B,z),x=t.mul(x,G),G=t.add(M,b),x=t.sub(x,G),D=t.mul(V,m),G=t.mul(Q,b),D=t.add(G,D),G=t.sub(M,D),D=t.add(M,D),$=t.mul(G,D),M=t.add(F,F),M=t.add(M,F),b=t.mul(V,b),m=t.mul(Q,m),M=t.add(M,b),b=t.sub(F,b),b=t.mul(V,b),m=t.add(m,b),F=t.mul(M,m),$=t.add($,F),F=t.mul(x,m),G=t.mul(d,G),G=t.sub(G,F),F=t.mul(d,M),D=t.mul(x,D),D=t.add(D,F),new p(G,$,D)}subtract(C){return this.add(C.negate())}is0(){return this.equals(p.ZERO)}wNAF(C){return w.wNAFCached(this,u,C,T=>{const k=t.invertBatch(T.map(N=>N.pz));return T.map((N,O)=>N.toAffine(k[O])).map(p.fromAffine)})}multiplyUnsafe(C){const T=p.ZERO;if(C===vd)return T;if(a(C),C===Nl)return this;const{endo:k}=e;if(!k)return w.unsafeLadder(this,C);let{k1neg:N,k1:O,k2neg:B,k2:z}=k.splitScalar(C),G=T,$=T,D=this;for(;O>vd||z>vd;)O&Nl&&(G=G.add(D)),z&Nl&&($=$.add(D)),D=D.double(),O>>=Nl,z>>=Nl;return N&&(G=G.negate()),B&&($=$.negate()),$=new p(t.mul($.px,k.beta),$.py,$.pz),G.add($)}multiply(C){a(C);let T=C,k,N;const{endo:O}=e;if(O){const{k1neg:B,k1:z,k2neg:G,k2:$}=O.splitScalar(T);let{p:D,f:V}=this.wNAF(z),{p:Q,f:F}=this.wNAF($);D=w.constTimeNegate(B,D),Q=w.constTimeNegate(G,Q),Q=new p(t.mul(Q.px,O.beta),Q.py,Q.pz),k=D.add(Q),N=V.add(F)}else{const{p:B,f:z}=this.wNAF(T);k=B,N=z}return p.normalizeZ([k,N])[0]}multiplyAndAddUnsafe(C,T,k){const N=p.BASE,O=(z,G)=>G===vd||G===Nl||!z.equals(N)?z.multiplyUnsafe(G):z.multiply(G),B=O(this,T).add(O(C,k));return B.is0()?void 0:B}toAffine(C){const{px:T,py:k,pz:N}=this,O=this.is0();C==null&&(C=O?t.ONE:t.inv(N));const B=t.mul(T,C),z=t.mul(k,C),G=t.mul(N,C);if(O)return{x:t.ZERO,y:t.ZERO};if(!t.eql(G,t.ONE))throw new Error("invZ was invalid");return{x:B,y:z}}isTorsionFree(){const{h:C,isTorsionFree:T}=e;if(C===Nl)return!0;if(T)return T(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:T}=e;return C===Nl?this:T?T(p,this):this.multiplyUnsafe(e.h)}toRawBytes(C=!0){return this.assertValidity(),n(p,this,C)}toHex(C=!0){return qw(this.toRawBytes(C))}}p.BASE=new p(e.Gx,e.Gy,t.ONE),p.ZERO=new p(t.ZERO,t.ONE,t.ZERO);const g=e.nBitLength,w=lye(p,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:p,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:o}}function pye(r){const e=sY(r);return a4(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function gye(r){const e=pye(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(m){return vdqw(Vw(m,e.nByteLength));function y(m){const x=n>>Nl;return m>x}function C(m){return y(m)?a(-m):m}const T=(m,x,A)=>wg(m.slice(x,A));class k{constructor(x,A,I){this.r=x,this.s=A,this.recovery=I,this.assertValidity()}static fromCompact(x){const A=e.nByteLength;return x=Pu("compactSignature",x,A*2),new k(T(x,0,A),T(x,A,2*A))}static fromDER(x){const{r:A,s:I}=yg.toSig(Pu("DER",x));return new k(A,I)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(x){return new k(this.r,this.s,x)}recoverPublicKey(x){const{r:A,s:I,recovery:R}=this,S=$(Pu("msgHash",x));if(R==null||![0,1,2,3].includes(R))throw new Error("recovery id invalid");const E=R===2||R===3?A+e.n:A;if(E>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const _=R&1?"03":"02",L=u.fromHex(_+w(E)),ie=l(E),q=a(-S*ie),Y=a(I*ie),K=u.BASE.multiplyAndAddUnsafe(L,q,Y);if(!K)throw new Error("point at infinify");return K.assertValidity(),K}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new k(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Ww(this.toDERHex())}toDERHex(){return yg.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ww(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const N={isValidPrivateKey(m){try{return h(m),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const m=iY(e.n);return aye(e.randomBytes(m),e.n)},precompute(m=8,x=u.BASE){return x._setWindowSize(m),x.multiply(BigInt(3)),x}};function O(m,x=!0){return u.fromPrivateKey(m).toRawBytes(x)}function B(m){const x=m instanceof Uint8Array,A=typeof m=="string",I=(x||A)&&m.length;return x?I===i||I===s:A?I===2*i||I===2*s:m instanceof u}function z(m,x,A=!0){if(B(m))throw new Error("first arg must be private key");if(!B(x))throw new Error("second arg must be public key");return u.fromHex(x).multiply(h(m)).toRawBytes(A)}const G=e.bits2int||function(m){const x=wg(m),A=m.length*8-e.nBitLength;return A>0?x>>BigInt(A):x},$=e.bits2int_modN||function(m){return a(G(m))},D=Rk(e.nBitLength);function V(m){if(typeof m!="bigint")throw new Error("bigint expected");if(!(vd<=m&&mre in A))throw new Error("sign() legacy options not supported");const{hash:I,randomBytes:R}=e;let{lowS:S,prehash:E,extraEntropy:_}=A;S==null&&(S=!0),m=Pu("msgHash",m),E&&(m=Pu("prehashed msgHash",I(m)));const L=$(m),ie=h(x),q=[V(ie),V(L)];if(_!=null){const re=_===!0?R(t.BYTES):_;q.push(Pu("extraEntropy",re))}const Y=o4(...q),K=L;function te(re){const H=G(re);if(!g(H))return;const U=l(H),W=u.BASE.multiply(H).toAffine(),le=a(W.x);if(le===vd)return;const de=a(U*a(K+le*ie));if(de===vd)return;let Se=(W.x===le?0:2)|Number(W.y&Nl),Me=de;return S&&y(de)&&(Me=C(de),Se^=1),new k(le,Me,Se)}return{seed:Y,k2sig:te}}const F={lowS:e.lowS,prehash:!1},M={lowS:e.lowS,prehash:!1};function b(m,x,A=F){const{seed:I,k2sig:R}=Q(m,x,A),S=e;return XJ(S.hash.outputLen,S.nByteLength,S.hmac)(I,R)}u.BASE._setWindowSize(8);function d(m,x,A,I=M){var W;const R=m;if(x=Pu("msgHash",x),A=Pu("publicKey",A),"strict"in I)throw new Error("options.strict was renamed to lowS");const{lowS:S,prehash:E}=I;let _,L;try{if(typeof R=="string"||R instanceof Uint8Array)try{_=k.fromDER(R)}catch(le){if(!(le instanceof yg.Err))throw le;_=k.fromCompact(R)}else if(typeof R=="object"&&typeof R.r=="bigint"&&typeof R.s=="bigint"){const{r:le,s:de}=R;_=new k(le,de)}else throw new Error("PARSE");L=u.fromHex(A)}catch(le){if(le.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(S&&_.hasHighS())return!1;E&&(x=e.hash(x));const{r:ie,s:q}=_,Y=$(x),K=l(q),te=a(Y*K),re=a(ie*K),H=(W=u.BASE.multiplyAndAddUnsafe(L,te,re))==null?void 0:W.toAffine();return H?a(H.x)===ie:!1}return{CURVE:e,getPublicKey:O,getSharedSecret:z,sign:b,verify:d,ProjectivePoint:u,Signature:k,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mye(r){return{hash:r,hmac:(e,...t)=>RE(r,e,Jwe(...t)),randomBytes:Qwe}}function bye(r,e){const t=n=>gye({...r,...mye(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const aY=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),cY=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),wye=BigInt(1),Ok=BigInt(2),lY=(r,e)=>(r+e/Ok)/e;function vye(r){const e=aY,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),l=BigInt(88),u=r*r*r%e,h=u*u*r%e,p=Ml(h,t,e)*h%e,g=Ml(p,t,e)*h%e,w=Ml(g,Ok,e)*u%e,y=Ml(w,i,e)*w%e,C=Ml(y,s,e)*y%e,T=Ml(C,a,e)*C%e,k=Ml(T,l,e)*T%e,N=Ml(k,a,e)*C%e,O=Ml(N,t,e)*h%e,B=Ml(O,o,e)*y%e,z=Ml(B,n,e)*u%e,G=Ml(z,Ok,e);if(!Dk.eql(Dk.sqr(G),r))throw new Error("Cannot find square root");return G}const Dk=oye(aY,void 0,void 0,{sqrt:vye}),Rp=bye({a:BigInt(0),b:BigInt(7),Fp:Dk,n:cY,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=cY,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-wye*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=lY(s*r,e),l=lY(-n*r,e);let u=oc(r-a*t-l*i,e),h=oc(-a*n-l*s,e);const p=u>o,g=h>o;if(p&&(u=e-u),g&&(h=e-h),u>o||h>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:p,k1:u,k2neg:g,k2:h}}}},jw);BigInt(0),Rp.ProjectivePoint;const xg="0x0000000000000000000000000000000000000000",DE="0x0000000000000000000000000000000000000000000000000000000000000000",uY=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),hY=BigInt("1000000000000000000"),fY=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),dY=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),pY=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),gY="Ξ",$k=`Ethereum Signed Message: -`,mY=BigInt(0),bY=BigInt(1),wY=BigInt(2),vY=BigInt(27),yY=BigInt(28),$E=BigInt(35),Gw={};function xY(r){return Oo(Vs(r),32)}const dh=class{constructor(e,t,n,i){Ne(this,O3,void 0);Ne(this,D3,void 0);Ne(this,$3,void 0);Ne(this,D2,void 0);Lh(e,Gw,"Signature"),me(this,O3,t),me(this,D3,n),me(this,$3,i),me(this,D2,null)}get r(){return oe(this,O3)}set r(e){xe(ud(e)===32,"invalid r","value",e),me(this,O3,St(e))}get s(){return oe(this,D3)}set s(e){xe(ud(e)===32,"invalid s","value",e);const t=St(e);xe(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),me(this,D3,t)}get v(){return oe(this,$3)}set v(e){const t=Ir(e,"value");xe(t===27||t===28,"invalid v","v",e),me(this,$3,t)}get networkV(){return oe(this,D2)}get legacyChainId(){const e=this.networkV;return e==null?null:dh.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=$t(this.s);return this.yParity&&(e[0]|=128),St(e)}get compactSerialized(){return Sn([this.r,this.yParityAndS])}get serialized(){return Sn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new dh(Gw,this.r,this.s,this.v);return this.networkV&&me(e,D2,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=cr(e,"v");return t==vY||t==yY?mY:(xe(t>=$E,"invalid EIP-155 v","v",e),(t-$E)/wY)}static getChainIdV(e,t){return cr(e)*wY+BigInt(35+t-27)}static getNormalizedV(e){const t=cr(e);return t===mY||t===vY?27:t===bY||t===yY?28:(xe(t>=$E,"invalid v","v",e),t&bY?27:28)}static from(e){function t(u,h){xe(u,h,"signature",e)}if(e==null)return new dh(Gw,DE,DE,27);if(typeof e=="string"){const u=$t(e,"signature");if(u.length===64){const h=St(u.slice(0,32)),p=u.slice(32,64),g=p[0]&128?28:27;return p[0]&=127,new dh(Gw,h,St(p),g)}if(u.length===65){const h=St(u.slice(0,32)),p=u.slice(32,64);t((p[0]&128)===0,"non-canonical s");const g=dh.getNormalizedV(u[64]);return new dh(Gw,h,St(p),g)}t(!1,"invalid raw signature length")}if(e instanceof dh)return e.clone();const n=e.r;t(n!=null,"missing r");const i=xY(n),s=function(u,h){if(u!=null)return xY(u);if(h!=null){t(ui(h,32),"invalid yParityAndS");const p=$t(h);return p[0]&=127,St(p)}t(!1,"missing s")}(e.s,e.yParityAndS);t(($t(s)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(u,h,p){if(u!=null){const g=cr(u);return{networkV:g>=$E?g:void 0,v:dh.getNormalizedV(g)}}if(h!=null)return t(ui(h,32),"invalid yParityAndS"),{v:$t(h)[0]&128?28:27};if(p!=null){switch(Ir(p,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new dh(Gw,i,s,a);return o&&me(l,D2,o),t(e.yParity==null||Ir(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),t(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}};let Mc=dh;O3=new WeakMap,D3=new WeakMap,$3=new WeakMap,D2=new WeakMap;const $2=class{constructor(e){Ne(this,w0,void 0);xe(ud(e)===32,"invalid private key","privateKey","[REDACTED]"),me(this,w0,St(e))}get privateKey(){return oe(this,w0)}get publicKey(){return $2.computePublicKey(oe(this,w0))}get compressedPublicKey(){return $2.computePublicKey(oe(this,w0),!0)}sign(e){xe(ud(e)===32,"invalid digest length","digest",e);const t=Rp.sign(Ws(e),Ws(oe(this,w0)),{lowS:!0});return Mc.from({r:ku(t.r,32),s:ku(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=$2.computePublicKey(e);return St(Rp.getSharedSecret(Ws(oe(this,w0)),$t(t),!1))}static computePublicKey(e,t){let n=$t(e,"key");if(n.length===32){const s=Rp.getPublicKey(n,!!t);return St(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=Rp.ProjectivePoint.fromHex(n);return St(i.toRawBytes(t))}static recoverPublicKey(e,t){xe(ud(e)===32,"invalid digest length","digest",e);const n=Mc.from(t);let i=Rp.Signature.fromCompact(Ws(Sn([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(Ws(e));return xe(s!=null,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,n){const i=Rp.ProjectivePoint.fromHex($2.computePublicKey(e).substring(2)),s=Rp.ProjectivePoint.fromHex($2.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}};let Pl=$2;w0=new WeakMap;function _Y(){gd.lock(),On.lock(),Nu.lock(),kc.lock(),md.lock(),bd.lock(),wd.lock(),Ia.lock(),Hw.lock(),kc.lock()}const yye=BigInt(0),xye=BigInt(36);function EY(r){r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=$t(On(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Bk={};for(let r=0;r<10;r++)Bk[String(r)]=String(r);for(let r=0;r<26;r++)Bk[String.fromCharCode(65+r)]=String(10+r);const AY=15;function CY(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>Bk[n]).join("");for(;e.length>=AY;){let n=e.substring(0,AY);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const _ye=function(){const r={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function Eye(r){r=r.toLowerCase();let e=yye;for(let t=0;te.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return oe(this,B2)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return oe(this,B2)===!0?-1:oe(this,B2)===!1?this.value.length:null}static from(e,t){return new v0(yd,e,t)}static uint8(e){return or(e,8)}static uint16(e){return or(e,16)}static uint24(e){return or(e,24)}static uint32(e){return or(e,32)}static uint40(e){return or(e,40)}static uint48(e){return or(e,48)}static uint56(e){return or(e,56)}static uint64(e){return or(e,64)}static uint72(e){return or(e,72)}static uint80(e){return or(e,80)}static uint88(e){return or(e,88)}static uint96(e){return or(e,96)}static uint104(e){return or(e,104)}static uint112(e){return or(e,112)}static uint120(e){return or(e,120)}static uint128(e){return or(e,128)}static uint136(e){return or(e,136)}static uint144(e){return or(e,144)}static uint152(e){return or(e,152)}static uint160(e){return or(e,160)}static uint168(e){return or(e,168)}static uint176(e){return or(e,176)}static uint184(e){return or(e,184)}static uint192(e){return or(e,192)}static uint200(e){return or(e,200)}static uint208(e){return or(e,208)}static uint216(e){return or(e,216)}static uint224(e){return or(e,224)}static uint232(e){return or(e,232)}static uint240(e){return or(e,240)}static uint248(e){return or(e,248)}static uint256(e){return or(e,256)}static uint(e){return or(e,256)}static int8(e){return or(e,-8)}static int16(e){return or(e,-16)}static int24(e){return or(e,-24)}static int32(e){return or(e,-32)}static int40(e){return or(e,-40)}static int48(e){return or(e,-48)}static int56(e){return or(e,-56)}static int64(e){return or(e,-64)}static int72(e){return or(e,-72)}static int80(e){return or(e,-80)}static int88(e){return or(e,-88)}static int96(e){return or(e,-96)}static int104(e){return or(e,-104)}static int112(e){return or(e,-112)}static int120(e){return or(e,-120)}static int128(e){return or(e,-128)}static int136(e){return or(e,-136)}static int144(e){return or(e,-144)}static int152(e){return or(e,-152)}static int160(e){return or(e,-160)}static int168(e){return or(e,-168)}static int176(e){return or(e,-176)}static int184(e){return or(e,-184)}static int192(e){return or(e,-192)}static int200(e){return or(e,-200)}static int208(e){return or(e,-208)}static int216(e){return or(e,-216)}static int224(e){return or(e,-224)}static int232(e){return or(e,-232)}static int240(e){return or(e,-240)}static int248(e){return or(e,-248)}static int256(e){return or(e,-256)}static int(e){return or(e,-256)}static bytes1(e){return $n(e,1)}static bytes2(e){return $n(e,2)}static bytes3(e){return $n(e,3)}static bytes4(e){return $n(e,4)}static bytes5(e){return $n(e,5)}static bytes6(e){return $n(e,6)}static bytes7(e){return $n(e,7)}static bytes8(e){return $n(e,8)}static bytes9(e){return $n(e,9)}static bytes10(e){return $n(e,10)}static bytes11(e){return $n(e,11)}static bytes12(e){return $n(e,12)}static bytes13(e){return $n(e,13)}static bytes14(e){return $n(e,14)}static bytes15(e){return $n(e,15)}static bytes16(e){return $n(e,16)}static bytes17(e){return $n(e,17)}static bytes18(e){return $n(e,18)}static bytes19(e){return $n(e,19)}static bytes20(e){return $n(e,20)}static bytes21(e){return $n(e,21)}static bytes22(e){return $n(e,22)}static bytes23(e){return $n(e,23)}static bytes24(e){return $n(e,24)}static bytes25(e){return $n(e,25)}static bytes26(e){return $n(e,26)}static bytes27(e){return $n(e,27)}static bytes28(e){return $n(e,28)}static bytes29(e){return $n(e,29)}static bytes30(e){return $n(e,30)}static bytes31(e){return $n(e,31)}static bytes32(e){return $n(e,32)}static address(e){return new v0(yd,"address",e)}static bool(e){return new v0(yd,"bool",!!e)}static bytes(e){return new v0(yd,"bytes",e)}static string(e){return new v0(yd,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new v0(yd,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===RY}static dereference(e,t){if(v0.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};let uo=v0;B2=new WeakMap;class Aye extends pd{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=uo.dereference(t,"string");try{n=zr(n)}catch(i){return this._throwError(i.message,t)}return e.writeValue(n)}decode(e){return zr(ku(e.readValue(),20))}}class Cye extends pd{constructor(t){super(t.name,t.type,"_",t.dynamic);Ee(this,"coder");this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,n){return this.coder.encode(t,n)}decode(t){return this.coder.decode(t)}}function kY(r,e,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(u=>{const h=u.localName;return Ue(h,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:t}),Ue(!l[h],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:t}),l[h]=!0,t[h]})}else xe(!1,"invalid tuple value","tuple",t);xe(e.length===n.length,"types/value length mismatch","tuple",t);let i=new gk,s=new gk,o=[];e.forEach((l,u)=>{let h=n[u];if(l.dynamic){let p=s.length;l.encode(s,h);let g=i.writeUpdatableValue();o.push(w=>{g(w+p)})}else l.encode(i,h)}),o.forEach(l=>{l(i.length)});let a=r.appendWriter(i);return a+=r.appendWriter(s),a}function MY(r,e){let t=[],n=[],i=r.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=r.readIndex(),l=i.subReader(a);try{o=s.decode(l)}catch(u){if($s(u,"BUFFER_OVERRUN"))throw u;o=u,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(r)}catch(a){if($s(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");t.push(o),n.push(s.localName||null)}),Lw.fromItems(t,n)}class Sye extends pd{constructor(t,n,i){const s=t.type+"["+(n>=0?n:"")+"]",o=n===-1||t.dynamic;super("array",s,i,o);Ee(this,"coder");Ee(this,"length");er(this,{coder:t,length:n})}defaultValue(){const t=this.coder.defaultValue(),n=[];for(let i=0;io||i<-(o+Pye))&&this._throwError("value out-of-bounds",n),i=r4(i,8*Sa)}else(ihd(s,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(i)}decode(t){let n=hd(t.readValue(),this.size*8);return this.signed&&(n=Mw(n,this.size*8)),n}}class $ye extends NY{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Bs(uo.dereference(t,"string")))}decode(e){return dd(super.decode(e))}}class UE extends pd{constructor(t,n){let i=!1;const s=[];t.forEach(a=>{a.dynamic&&(i=!0),s.push(a.type)});const o="tuple("+s.join(",")+")";super("tuple",o,n,i);Ee(this,"coders");er(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(i=>{t.push(i.defaultValue())});const n=this.coders.reduce((i,s)=>{const o=s.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,s)=>{let o=i.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[s]))}),Object.freeze(t)}encode(t,n){const i=uo.dereference(n,"tuple");return kY(t,this.coders,i)}decode(t){return MY(t,this.coders)}}function Nc(r){return On(Bs(r))}var Bye="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhz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AtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const PY=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),OY=4;function Lye(r){let e=0;function t(){return r[e++]<<8|r[e++]}let n=t(),i=1,s=[0,1];for(let z=1;z>--l&1}const p=31,g=2**p,w=g>>>1,y=w>>1,C=g-1;let T=0;for(let z=0;z1;){let Q=G+$>>>1;z>>1|h(),D=D<<1^w,V=(V^w)<<1|w|1;N=D,O=1+V-D}let B=n-4;return k.map(z=>{switch(z-B){case 3:return B+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return B+256+(r[a++]<<8|r[a++]);case 1:return B+r[a++];default:return z-1}})}function Uye(r){let e=0;return()=>r[e++]}function DY(r){return Uye(Lye(Fye(r)))}function Fye(r){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let t=r.length,n=new Uint8Array(6*t>>3);for(let i=0,s=0,o=0,a=0;i=8&&(n[s++]=a>>(o-=8));return n}function jye(r){return r&1?~r>>1:r>>1}function zye(r,e){let t=Array(r);for(let n=0,i=0;n{let e=c4(r);if(e.length)return e})}function BY(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(Hye(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(qye(t,r))}return e.flat()}function l4(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function LY(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function Hye(r,e){let t=1+e(),n=e(),i=l4(e);return LY(i.length,1+r,e).flatMap((o,a)=>{let[l,...u]=o;return Array(i[a]).fill().map((h,p)=>{let g=p*n;return[l+p*t,u.map(w=>w+g)]})})}function qye(r,e){let t=1+e();return LY(t,1+r,e).map(i=>[i[0],i.slice(1)])}function Wye(r){let e=[],t=c4(r);return i(n([]),[]),e;function n(s){let o=r(),a=l4(()=>{let l=c4(r).map(u=>t[u]);if(l.length)return n(l)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,l){if(!(s&4&&l===a[a.length-1])){s&2&&(l=a[a.length-1]),s&1&&e.push(a);for(let u of o)for(let h of u.Q)i(u,[...a,h],l)}}}function Vye(r){return r.toString(16).toUpperCase().padStart(2,"0")}function UY(r){return`{${Vye(r)}}`}function Gye(r){let e=[];for(let t=0,n=r.length;t>24&255}function zY(r){return r&16777215}let Uk,HY,Fk,qE;function t3e(){let r=DY(Zye);Uk=new Map($Y(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),HY=new Set(c4(r)),Fk=new Map,qE=new Map;for(let[e,t]of BY(r)){if(!HY.has(e)&&t.length==2){let[n,i]=t,s=qE.get(n);s||(s=new Map,qE.set(n,s)),s.set(i,e)}Fk.set(e,t.reverse())}}function qY(r){return r>=u4&&r=FE&&r=jE&&ezE&&e0&&i(zE+u)}else{let o=Fk.get(s);o?t.push(...o):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=h4(e[0]);for(let o=1;o0&&i>=o)o==0?(e.push(n,...t),t.length=0,n=a):t.push(a),i=o;else{let l=r3e(n,a);l>=0?n=l:i==0&&o==0?(e.push(n),n=a):(t.push(a),i=o)}}return n>=0&&e.push(n,...t),e}function VY(r){return WY(r).map(zY)}function i3e(r){return n3e(WY(r))}const GY=45,KY=".",ZY=65039,JY=1,WE=r=>Array.from(r);function f4(r,e){return r.P.has(e)||r.Q.has(e)}class s3e extends Array{get is_emoji(){return!0}}let jk,YY,_g,zk,QY,Jw,Hk,Yw,Eg,XY,qk;function Wk(){if(jk)return;let r=DY(Bye);const e=()=>c4(r),t=()=>new Set(e()),n=(h,p)=>p.forEach(g=>h.add(g));jk=new Map(BY(r)),YY=t(),_g=e(),zk=new Set(e().map(h=>_g[h])),_g=new Set(_g),QY=t(),t();let i=$Y(r),s=r();const o=()=>{let h=new Set;return e().forEach(p=>n(h,i[p])),n(h,e()),h};Jw=l4(h=>{let p=l4(r).map(g=>g+96);if(p.length){let g=h>=s;p[0]-=32,p=Kw(p),g&&(p=`Restricted[${p}]`);let w=o(),y=o(),C=!r();return{N:p,P:w,Q:y,M:C,R:g}}}),Hk=t(),Yw=new Map;let a=e().concat(WE(Hk)).sort((h,p)=>h-p);a.forEach((h,p)=>{let g=r(),w=a[p]=g?a[p-g]:{V:[],M:new Map};w.V.push(h),Hk.has(h)||Yw.set(h,w)});for(let{V:h,M:p}of new Set(Yw.values())){let g=[];for(let y of h){let C=Jw.filter(k=>f4(k,y)),T=g.find(({G:k})=>C.some(N=>k.has(N)));T||(T={G:new Set,V:[]},g.push(T)),T.V.push(y),n(T.G,C)}let w=g.flatMap(y=>WE(y.G));for(let{G:y,V:C}of g){let T=new Set(w.filter(k=>!y.has(k)));for(let k of C)p.set(k,T)}}Eg=new Set;let l=new Set;const u=h=>Eg.has(h)?l.add(h):Eg.add(h);for(let h of Jw){for(let p of h.P)u(p);for(let p of h.Q)u(p)}for(let h of Eg)!Yw.has(h)&&!l.has(h)&&Yw.set(h,JY);n(Eg,VY(Eg)),XY=Wye(r).map(h=>s3e.from(h)).sort(Kye),qk=new Map;for(let h of XY){let p=[qk];for(let g of h){let w=p.map(y=>{let C=y.get(g);return C||(C=new Map,y.set(g,C)),C});g===ZY?p.push(...w):p=w}for(let g of p)g.V=h}}function Vk(r){return(eQ(r)?"":`${Gk(VE([r]))} `)+UY(r)}function Gk(r){return`"${r}"‎`}function o3e(r){if(r.length>=4&&r[2]==GY&&r[3]==GY)throw new Error(`invalid label extension: "${Kw(r.slice(0,4))}"`)}function a3e(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function c3e(r){let e=r[0],t=PY.get(e);if(t)throw d4(`leading ${t}`);let n=r.length,i=-1;for(let s=1;se&&(e>>=1,r=[...r.slice(0,e),8230,...r.slice(-e)]);let i=0,s=r.length;for(let o=0;o{let s=Gye(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=m3e(s,e,t),l=a.length,u;if(!l)throw new Error("empty label");let h=o.output=a.flat();if(a3e(h),!(o.emoji=l>1||a[0].is_emoji)&&h.every(g=>g<128))o3e(h),u="ASCII";else{let g=a.flatMap(w=>w.is_emoji?[]:w);if(!g.length)u="Emoji";else{if(_g.has(h[0]))throw d4("leading combining mark");for(let C=1;Co.has(a)):WE(o),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>f4(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function d3e(r){let e=Jw;for(let t of r){let n=e.filter(i=>f4(i,t));if(!n.length)throw Jw.some(i=>f4(i,t))?rQ(e[0],t):tQ(t);if(e=n,n.length==1)break}return e}function p3e(r){return r.map(({input:e,error:t,output:n})=>{if(t){let i=t.message;throw new Error(r.length==1?i:`Invalid label ${Gk(VE(e,63))}: ${i}`)}return Kw(n)}).join(KY)}function tQ(r){return new Error(`disallowed character: ${Vk(r)}`)}function rQ(r,e){let t=Vk(e),n=Jw.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function d4(r){return new Error(`illegal placement: ${r}`)}function g3e(r,e){for(let t of e)if(!f4(r,t))throw rQ(r,t);if(r.M){let t=VY(e);for(let n=1,i=t.length;nOY)throw new Error(`excessive non-spacing marks: ${Gk(VE(t.slice(n-1,s)))} (${s-n}/${OY})`);n=s}}}function m3e(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=w3e(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let o=r.pop();if(Eg.has(o))i.push(o);else{let a=jk.get(o);if(a)i.push(...a);else if(!YY.has(o))throw tQ(o)}}}return i.length&&n.push(e(i)),n}function b3e(r){return r.filter(e=>e!=ZY)}function w3e(r,e){let t=qk,n,i=r.length;for(;i&&(t=t.get(r[--i]),!!t);){let{V:s}=t;s&&(n=s,e&&e.push(...r.slice(i).reverse()),r.length=i)}return n}const nQ=new Uint8Array(32);nQ.fill(0);function iQ(r){return xe(r.length!==0,"invalid ENS name; empty component","comp",r),r}function Kk(r){const e=Bs(Zk(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i{xe(n.length<=t,`label ${JSON.stringify(r)} exceeds ${t} bytes`,"name",r);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function Yk(r,e){return{address:zr(r),storageKeys:e.map((t,n)=>(xe(ui(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function jh(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(xe(t.length===2,"invalid slot set",`value[${n}]`,t),Yk(t[0],t[1])):(xe(t!=null&&typeof t=="object","invalid address-slot set","value",r),Yk(t.address,t.storageKeys)));xe(r!=null&&typeof r=="object","invalid access list","value",r);const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,s)=>(i[s]=!0,i),{});return Yk(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Ag(r){let e;return typeof r=="string"?e=Pl.computePublicKey(r,!1):e=r.publicKey,zr(On("0x"+e.substring(4)).substring(26))}function g4(r,e){return Ag(Pl.recoverPublicKey(r,e))}const ho=BigInt(0),v3e=BigInt(2),y3e=BigInt(27),x3e=BigInt(28),_3e=BigInt(35),E3e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function GE(r){return r==="0x"?null:zr(r)}function Qk(r,e){try{return jh(r)}catch(t){xe(!1,t.message,e,r)}}function m4(r,e){return r==="0x"?0:Ir(r,e)}function ms(r,e){if(r==="0x")return ho;const t=cr(r,e);return xe(t<=E3e,"value exceeds uint size",e,t),t}function Mi(r,e){const t=cr(r,"value"),n=Vs(t);return xe(n.length<=32,"value too large",`tx.${e}`,t),n}function Xk(r){return jh(r).map(e=>[e.address,e.storageKeys])}function A3e(r,e){xe(Array.isArray(r),`invalid ${e}`,"value",r);for(let t=0;t=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=oe(this,L2)!=null||oe(this,U2);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Ue(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Ue(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Ue(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):t?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Pc.from(this)}toJSON(){const e=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Pc;if(typeof e=="string"){const n=$t(e);if(n[0]>=127)return Pc.from(C3e(n));switch(n[0]){case 1:return Pc.from(I3e(n));case 2:return Pc.from(S3e(n));case 3:return Pc.from(T3e(n))}Ue(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new Pc;return e.type!=null&&(t.type=e.type),e.to!=null&&(t.to=e.to),e.nonce!=null&&(t.nonce=e.nonce),e.gasLimit!=null&&(t.gasLimit=e.gasLimit),e.gasPrice!=null&&(t.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(t.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(t.data=e.data),e.value!=null&&(t.value=e.value),e.chainId!=null&&(t.chainId=e.chainId),e.signature!=null&&(t.signature=Mc.from(e.signature)),e.accessList!=null&&(t.accessList=e.accessList),e.blobVersionedHashes!=null&&(t.blobVersionedHashes=e.blobVersionedHashes),e.hash!=null&&(xe(t.isSigned(),"unsigned transaction cannot define hash","tx",e),xe(t.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(xe(t.isSigned(),"unsigned transaction cannot define from","tx",e),xe(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}},qf=new WeakMap,B3=new WeakMap,L3=new WeakMap,U3=new WeakMap,F3=new WeakMap,j3=new WeakMap,z3=new WeakMap,H3=new WeakMap,q3=new WeakMap,W3=new WeakMap,V3=new WeakMap,G3=new WeakMap,L2=new WeakMap,U2=new WeakMap,rge);function KE(r){return typeof r=="string"&&(r=Bs(r)),On(Sn([Bs($k),Bs(String(r.length)),r]))}function uQ(r,e){const t=KE(r);return g4(t,e)}const R3e=new RegExp("^bytes([0-9]+)$"),k3e=new RegExp("^(u?int)([0-9]*)$"),M3e=new RegExp("^(.*)\\[([0-9]*)\\]$");function hQ(r,e,t){switch(r){case"address":return $t(t?Oo(e,32):zr(e));case"string":return Bs(e);case"bytes":return $t(e);case"bool":return e=e?"0x01":"0x00",$t(t?Oo(e,32):e)}let n=r.match(k3e);if(n){let i=n[1]==="int",s=parseInt(n[2]||"256");return xe((!n[2]||n[2]===String(s))&&s%8===0&&s!==0&&s<=256,"invalid number type","type",r),t&&(s=256),i&&(e=r4(e,s)),$t(Oo(Vs(e),s/8))}if(n=r.match(R3e),n){const i=parseInt(n[1]);return xe(String(i)===n[1]&&i!==0&&i<=32,"invalid bytes type","type",r),xe(ud(e)===i,`invalid value for ${r}`,"value",e),t?$t(t4(e,32)):e}if(n=r.match(M3e),n&&Array.isArray(e)){const i=n[1],s=parseInt(n[2]||String(e.length));xe(s===e.length,`invalid array length for ${r}`,"value",e);const o=[];return e.forEach(function(a){o.push(hQ(i,a,!0))}),$t(Sn(o))}xe(!1,"invalid type","type",r)}function ZE(r,e){xe(r.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const t=[];return r.forEach(function(n,i){t.push(hQ(n,e[i]))}),St(Sn(t))}function fQ(r,e){return On(ZE(r,e))}function dQ(r,e){return Ia(ZE(r,e))}const pQ=new Uint8Array(32);pQ.fill(0);const N3e=BigInt(-1),gQ=BigInt(0),mQ=BigInt(1),P3e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function O3e(r){const e=$t(r),t=e.length%32;return t?Sn([e,pQ.slice(t)]):St(e)}const D3e=ku(mQ,32),$3e=ku(gQ,32),bQ={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},tM=["name","version","chainId","verifyingContract","salt"];function wQ(r){return function(e){return xe(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const B3e={name:wQ("name"),version:wQ("version"),chainId:function(r){const e=cr(r,"domain.chainId");return xe(e>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(e)?Number(e):fd(e)},verifyingContract:function(r){try{return zr(r).toLowerCase()}catch{}xe(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const e=$t(r,"domain.salt");return xe(e.length===32,'invalid domain value "salt"',"domain.salt",r),St(e)}};function rM(r){{const e=r.match(/^(u?)int(\d+)$/);if(e){const t=e[1]==="",n=parseInt(e[2]);xe(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",r);const i=hd(P3e,t?n-1:n),s=t?(i+mQ)*N3e:gQ;return function(o){const a=cr(o,"value");return xe(a>=s&&a<=i,`value out-of-bounds for ${r}`,"value",a),ku(t?r4(a,256):a,32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return xe(t!==0&&t<=32&&e[1]===String(t),"invalid bytes width","type",r),function(n){const i=$t(n);return xe(i.length===t,`invalid length for ${r}`,"value",n),O3e(n)}}}switch(r){case"address":return function(e){return Oo(zr(e),32)};case"bool":return function(e){return e?D3e:$3e};case"bytes":return function(e){return On(e)};case"string":return function(e){return Nc(e)}}return null}function vQ(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function JE(r){const e=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:r}}const gu=class{constructor(e){Ne(this,YT);Ee(this,"primaryType");Ne(this,Fx,void 0);Ne(this,y0,void 0);Ne(this,K3,void 0);me(this,y0,new Map),me(this,K3,new Map);const t=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(l=>{s[l]=e[l].map(({name:u,type:h})=>{let{base:p,index:g}=JE(h);return p==="int"&&!e.int&&(p="int256"),p==="uint"&&!e.uint&&(p="uint256"),{name:u,type:p+(g||"")}}),t.set(l,new Set),n.set(l,[]),i.set(l,new Set)}),me(this,Fx,JSON.stringify(s));for(const l in s){const u=new Set;for(const h of s[l]){xe(!u.has(h.name),`duplicate variable name ${JSON.stringify(h.name)} in ${JSON.stringify(l)}`,"types",e),u.add(h.name);const p=JE(h.type).base;xe(p!==l,`circular type reference to ${JSON.stringify(p)}`,"types",e),!rM(p)&&(xe(n.has(p),`unknown type ${JSON.stringify(p)}`,"types",e),n.get(p).push(l),t.get(l).add(p))}}const o=Array.from(n.keys()).filter(l=>n.get(l).length===0);xe(o.length!==0,"missing primary type","types",e),xe(o.length===1,`ambiguous primary types or unused types: ${o.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),er(this,{primaryType:o[0]});function a(l,u){xe(!u.has(l),`circular type reference to ${JSON.stringify(l)}`,"types",e),u.add(l);for(const h of t.get(l))if(n.has(h)){a(h,u);for(const p of u)i.get(p).add(h)}u.delete(l)}a(this.primaryType,new Set);for(const[l,u]of i){const h=Array.from(u);h.sort(),oe(this,y0).set(l,vQ(l,s[l])+h.map(p=>vQ(p,s[p])).join(""))}}get types(){return JSON.parse(oe(this,Fx))}getEncoder(e){let t=oe(this,K3).get(e);return t||(t=rt(this,YT,yge).call(this,e),oe(this,K3).set(e,t)),t}encodeType(e){const t=oe(this,y0).get(e);return xe(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return On(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(rM(e))return n(e,t);const i=JE(e).array;if(i)return xe(i.count===-1||i.count===t.length,`array length mismatch; expected length ${i.count}`,"value",t),t.map(o=>this._visit(i.prefix,o,n));const s=this.types[e];if(s)return s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,t[a],n),o),{});xe(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new gu(e)}static getPrimaryType(e){return gu.from(e).primaryType}static hashStruct(e,t,n){return gu.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(e[n]==null)continue;const i=bQ[n];xe(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>tM.indexOf(n.name)-tM.indexOf(i.name)),gu.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return Sn(["0x1901",gu.hashDomain(e),gu.from(t).hash(n)])}static hash(e,t,n){return On(gu.encode(e,t,n))}static async resolveNames(e,t,n,i){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const s={};e.verifyingContract&&!ui(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=gu.from(t);o.visit(n,(a,l)=>(a==="address"&&!ui(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}}static getPayload(e,t,n){gu.hashDomain(e);const i={},s=[];tM.forEach(l=>{const u=e[l];u!=null&&(i[l]=B3e[l](u),s.push({name:l,type:bQ[l]}))});const o=gu.from(t);t=o.types;const a=Object.assign({},t);return xe(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,u)=>{if(l.match(/^bytes(\d*)/))return St($t(u));if(l.match(/^u?int/))return cr(u).toString();switch(l){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return xe(typeof u=="string","invalid string","value",u),u}xe(!1,"unsupported type","type",l)})}}};let xd=gu;Fx=new WeakMap,y0=new WeakMap,K3=new WeakMap,YT=new WeakSet,yge=function(e){{const i=rM(e);if(i)return i}const t=JE(e).array;if(t){const i=t.prefix,s=this.getEncoder(i);return o=>{xe(t.count===-1||t.count===o.length,`array length mismatch; expected length ${t.count}`,"value",o);let a=o.map(s);return oe(this,y0).has(i)&&(a=a.map(On)),On(Sn(a))}}const n=this.types[e];if(n){const i=Nc(oe(this,y0).get(e));return s=>{const o=n.map(({name:a,type:l})=>{const u=this.getEncoder(l)(s[a]);return oe(this,y0).has(l)?On(u):u});return o.unshift(i),Sn(o)}}xe(!1,`unknown type: ${e}`,"type",e)};function yQ(r,e,t,n){return g4(xd.hash(r,e,t),n)}function Ta(r){const e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}const L3e=Ta("external public payable override".split(" ")),xQ="constant external internal payable private public pure view override",U3e=Ta(xQ.split(" ")),_Q="constructor error event fallback function receive struct",EQ=Ta(_Q.split(" ")),AQ="calldata memory storage payable indexed",F3e=Ta(AQ.split(" ")),j3e=[_Q,AQ,"tuple returns",xQ].join(" "),z3e=Ta(j3e.split(" ")),H3e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},q3e=new RegExp("^(\\s*)"),W3e=new RegExp("^([0-9]+)"),V3e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),CQ=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),SQ=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),QT=class{constructor(e){Ne(this,jx);Ne(this,Ko,void 0);Ne(this,ph,void 0);me(this,Ko,0),me(this,ph,e.slice())}get offset(){return oe(this,Ko)}get length(){return oe(this,ph).length-oe(this,Ko)}clone(){return new QT(oe(this,ph))}reset(){me(this,Ko,0)}popKeyword(e){const t=this.peek();if(t.type!=="KEYWORD"||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=rt(this,jx,YG).call(this,oe(this,Ko)+1,e.match+1);return me(this,Ko,e.match+1),t}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=[];for(;oe(this,Ko)=oe(this,ph).length)throw new Error("out-of-bounds");return oe(this,ph)[oe(this,Ko)]}peekKeyword(e){const t=this.peekType("KEYWORD");return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return S5(this,Ko)._++,e}toString(){const e=[];for(let t=oe(this,Ko);t`}};let Ou=QT;Ko=new WeakMap,ph=new WeakMap,jx=new WeakSet,YG=function(e=0,t=0){return new QT(oe(this,ph).slice(e,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};function kp(r){const e=[],t=o=>{const a=s0&&e[e.length-1].type==="NUMBER"){const p=e.pop().text;h=p+h,e[e.length-1].value=Ir(p)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=h}continue}if(a=o.match(V3e),a){if(l.text=a[1],s+=l.text.length,z3e.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(SQ)){l.type="TYPE";continue}l.type="ID";continue}if(a=o.match(W3e),a){l.text=a[1],l.type="NUMBER",s+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new Ou(e.map(o=>Object.freeze(o)))}function IQ(r,e){let t=[];for(const n in e.keys())r.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function YE(r,e){if(e.peekKeyword(EQ)){const t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function _d(r,e){const t=new Set;for(;;){const n=r.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(r.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function TQ(r){let e=_d(r,U3e);return IQ(e,Ta("constant payable nonpayable".split(" "))),IQ(e,Ta("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Ed(r,e){return r.popParams().map(t=>Ks.from(t,e))}function RQ(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return cr(r.pop().text);throw new Error("invalid gas")}return null}function Cg(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}const G3e=new RegExp(/^(.*)\[([0-9]*)\]$/);function kQ(r){const e=r.match(SQ);if(xe(e,"invalid type","type",r),r==="uint")return"uint256";if(r==="int")return"int256";if(e[2]){const t=parseInt(e[2]);xe(t!==0&&t<=32,"invalid bytes length","type",r)}else if(e[3]){const t=parseInt(e[3]);xe(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",r)}return r}const ts={},ac=Symbol.for("_ethers_internal"),MQ="_ParamTypeInternal",NQ="_ErrorInternal",PQ="_EventInternal",OQ="_ConstructorInternal",DQ="_FallbackInternal",$Q="_FunctionInternal",BQ="_StructInternal",mu=class{constructor(e,t,n,i,s,o,a,l){Ne(this,Z3);Ee(this,"name");Ee(this,"type");Ee(this,"baseType");Ee(this,"indexed");Ee(this,"components");Ee(this,"arrayLength");Ee(this,"arrayChildren");if(Lh(e,ts,"ParamType"),Object.defineProperty(this,ac,{value:MQ}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||l==null)throw new Error("")}else if(a!=null||l!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");er(this,{name:t,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":t+=this.type,e!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),e==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,t))}return t(this.type,e)}async walkAsync(e,t){const n=[],i=[e];return rt(this,Z3,aR).call(this,n,e,t,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,t){if(mu.isParamType(e))return e;if(typeof e=="string")try{return mu.from(kp(e),t)}catch{xe(!1,"invalid param type","obj",e)}else if(e instanceof Ou){let a="",l="",u=null;_d(e,Ta(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",u=e.popParams().map(C=>mu.from(C)),a=`tuple(${u.map(C=>C.format()).join(",")})`):(a=kQ(e.popType("TYPE")),l=a);let h=null,p=null;for(;e.length&&e.peekType("BRACKET");){const C=e.pop();h=new mu(ts,"",a,l,null,u,p,h),p=C.value,a+=C.text,l="array",u=null}let g=null;if(_d(e,F3e).has("indexed")){if(!t)throw new Error("");g=!0}const y=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new mu(ts,y,a,l,g,u,p,h)}const n=e.name;xe(!n||typeof n=="string"&&n.match(CQ),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(xe(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(G3e);if(o){const a=parseInt(o[2]||"-1"),l=mu.from({type:o[1],components:e.components});return new mu(ts,n||"",s,"array",i,null,a,l)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const a=e.components!=null?e.components.map(u=>mu.from(u)):null;return new mu(ts,n||"",s,"tuple",i,a,null,null)}return s=kQ(e.type),new mu(ts,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[ac]===MQ}};let Ks=mu;Z3=new WeakSet,aR=function(e,t,n,i){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=t.slice();a.forEach((l,u)=>{var h;rt(h=o,Z3,aR).call(h,e,l,n,p=>{a[u]=p})}),i(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(t))a=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");a=o.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in t))throw new Error(`missing value for component ${l.name}`);return t[l.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((l,u)=>{var h;rt(h=o[u],Z3,aR).call(h,e,l,n,p=>{a[u]=p})}),i(a);return}const s=n(this.type,t);s.then?e.push(async function(){i(await s)}()):i(s)};class Ad{constructor(e,t,n){Ee(this,"type");Ee(this,"inputs");Lh(e,ts,"Fragment"),n=Object.freeze(n.slice()),er(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{Ad.from(JSON.parse(e))}catch{}return Ad.from(kp(e))}if(e instanceof Ou)switch(e.peekKeyword(EQ)){case"constructor":return Du.from(e);case"error":return aa.from(e);case"event":return Ol.from(e);case"fallback":case"receive":return $u.from(e);case"function":return Dl.from(e);case"struct":return Cd.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Du.from(e);case"error":return aa.from(e);case"event":return Ol.from(e);case"fallback":case"receive":return $u.from(e);case"function":return Dl.from(e);case"struct":return Cd.from(e)}Ue(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}xe(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Du.isFragment(e)}static isError(e){return aa.isFragment(e)}static isEvent(e){return Ol.isFragment(e)}static isFunction(e){return Dl.isFragment(e)}static isStruct(e){return Cd.isFragment(e)}}class Qw extends Ad{constructor(t,n,i,s){super(t,n,s);Ee(this,"name");xe(typeof i=="string"&&i.match(CQ),"invalid identifier","name",i),s=Object.freeze(s.slice()),er(this,{name:i})}}function b4(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}class aa extends Qw{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,ac,{value:NQ})}get selector(){return Nc(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const t=[];return e!=="sighash"&&t.push("error"),t.push(this.name+b4(e,this.inputs)),t.join(" ")}static from(e){if(aa.isFragment(e))return e;if(typeof e=="string")return aa.from(kp(e));if(e instanceof Ou){const t=YE("error",e),n=Ed(e);return Cg(e),new aa(ts,t,n)}return new aa(ts,e.name,e.inputs?e.inputs.map(Ks.from):[])}static isFragment(e){return e&&e[ac]===NQ}}class Ol extends Qw{constructor(t,n,i,s){super(t,"event",n,i);Ee(this,"anonymous");Object.defineProperty(this,ac,{value:PQ}),er(this,{anonymous:s})}get topicHash(){return Nc(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("event"),n.push(this.name+b4(t,this.inputs)),t!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(t,n){return n=(n||[]).map(s=>Ks.from(s)),new Ol(ts,t,n,!1).topicHash}static from(t){if(Ol.isFragment(t))return t;if(typeof t=="string")try{return Ol.from(kp(t))}catch{xe(!1,"invalid event fragment","obj",t)}else if(t instanceof Ou){const n=YE("event",t),i=Ed(t,!0),s=!!_d(t,Ta(["anonymous"])).has("anonymous");return Cg(t),new Ol(ts,n,i,s)}return new Ol(ts,t.name,t.inputs?t.inputs.map(n=>Ks.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[ac]===PQ}}class Du extends Ad{constructor(t,n,i,s,o){super(t,n,i);Ee(this,"payable");Ee(this,"gas");Object.defineProperty(this,ac,{value:OQ}),er(this,{payable:s,gas:o})}format(t){if(Ue(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[`constructor${b4(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(Du.isFragment(t))return t;if(typeof t=="string")try{return Du.from(kp(t))}catch{xe(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof Ou){_d(t,Ta(["constructor"]));const n=Ed(t),i=!!_d(t,L3e).has("payable"),s=RQ(t);return Cg(t),new Du(ts,"constructor",n,i,s)}return new Du(ts,"constructor",t.inputs?t.inputs.map(Ks.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[ac]===OQ}}class $u extends Ad{constructor(t,n,i){super(t,"fallback",n);Ee(this,"payable");Object.defineProperty(this,ac,{value:DQ}),er(this,{payable:i})}format(t){const n=this.inputs.length===0?"receive":"fallback";if(t==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(t){if($u.isFragment(t))return t;if(typeof t=="string")try{return $u.from(kp(t))}catch{xe(!1,"invalid fallback fragment","obj",t)}else if(t instanceof Ou){const n=t.toString(),i=t.peekKeyword(Ta(["fallback","receive"]));if(xe(i,"type must be fallback or receive","obj",n),t.popKeyword(Ta(["fallback","receive"]))==="receive"){const l=Ed(t);return xe(l.length===0,"receive cannot have arguments","obj.inputs",l),_d(t,Ta(["payable"])),Cg(t),new $u(ts,[],!0)}let o=Ed(t);o.length?xe(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(l=>l.format("minimal")).join(", ")):o=[Ks.from("bytes")];const a=TQ(t);if(xe(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),_d(t,Ta(["returns"])).has("returns")){const l=Ed(t);xe(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(u=>u.format("minimal")).join(", "))}return Cg(t),new $u(ts,o,a==="payable")}if(t.type==="receive")return new $u(ts,[],!0);if(t.type==="fallback"){const n=[Ks.from("bytes")],i=t.stateMutability==="payable";return new $u(ts,n,i)}xe(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[ac]===DQ}}class Dl extends Qw{constructor(t,n,i,s,o,a){super(t,"function",n,s);Ee(this,"constant");Ee(this,"outputs");Ee(this,"stateMutability");Ee(this,"payable");Ee(this,"gas");Object.defineProperty(this,ac,{value:$Q}),o=Object.freeze(o.slice()),er(this,{constant:i==="view"||i==="pure",gas:a,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return Nc(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t))),outputs:this.outputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("function"),n.push(this.name+b4(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(b4(t,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(t,n){return n=(n||[]).map(s=>Ks.from(s)),new Dl(ts,t,"view",n,[],null).selector}static from(t){if(Dl.isFragment(t))return t;if(typeof t=="string")try{return Dl.from(kp(t))}catch{xe(!1,"invalid function fragment","obj",t)}else if(t instanceof Ou){const i=YE("function",t),s=Ed(t),o=TQ(t);let a=[];_d(t,Ta(["returns"])).has("returns")&&(a=Ed(t));const l=RQ(t);return Cg(t),new Dl(ts,i,o,s,a,l)}let n=t.stateMutability;return n==null&&(n="payable",typeof t.constant=="boolean"?(n="view",t.constant||(n="payable",typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable")),new Dl(ts,t.name,n,t.inputs?t.inputs.map(Ks.from):[],t.outputs?t.outputs.map(Ks.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[ac]===$Q}}class Cd extends Qw{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,ac,{value:BQ})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Cd.from(kp(e))}catch{xe(!1,"invalid struct fragment","obj",e)}else if(e instanceof Ou){const t=YE("struct",e),n=Ed(e);return Cg(e),new Cd(ts,t,n)}return new Cd(ts,e.name,e.inputs?e.inputs.map(Ks.from):[])}static isFragment(e){return e&&e[ac]===BQ}}const Bu=new Map;Bu.set(0,"GENERIC_PANIC"),Bu.set(1,"ASSERT_FALSE"),Bu.set(17,"OVERFLOW"),Bu.set(18,"DIVIDE_BY_ZERO"),Bu.set(33,"ENUM_RANGE_ERROR"),Bu.set(34,"BAD_STORAGE_DATA"),Bu.set(49,"STACK_UNDERFLOW"),Bu.set(50,"ARRAY_RANGE_ERROR"),Bu.set(65,"OUT_OF_MEMORY"),Bu.set(81,"UNINITIALIZED_FUNCTION_CALL");const K3e=new RegExp(/^bytes([0-9]*)$/),Z3e=new RegExp(/^(u?int)([0-9]*)$/);let nM=null,LQ=1024;function J3e(r,e,t,n){let i="missing revert data",s=null;const o=null;let a=null;if(t){i="execution reverted";const u=$t(t);if(t=St(t),u.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(St(u.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],u.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(St(u.slice(0,4))==="0x4e487b71")try{const h=Number(n.decode(["uint256"],u.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[h]},s=`Panic due to ${Bu.get(h)||"UNKNOWN"}(${h})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?zr(e.to):null,data:e.data||"0x"};return e.from&&(l.from=zr(e.from)),Wi(i,"CALL_EXCEPTION",{action:r,data:t,reason:s,transaction:l,invocation:o,revert:a})}const XT=class{constructor(){Ne(this,H1)}getDefaultValue(e){const t=e.map(i=>rt(this,H1,I5).call(this,Ks.from(i)));return new UE(t,"_").defaultValue()}encode(e,t){dE(t.length,e.length,"types/values length mismatch");const n=e.map(o=>rt(this,H1,I5).call(this,Ks.from(o))),i=new UE(n,"_"),s=new gk;return i.encode(s,t),s.data}decode(e,t,n){const i=e.map(o=>rt(this,H1,I5).call(this,Ks.from(o)));return new UE(i,"_").decode(new mk(t,n,LQ))}static _setDefaultMaxInflation(e){xe(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),LQ=e}static defaultAbiCoder(){return nM==null&&(nM=new XT),nM}static getBuiltinCallException(e,t,n){return J3e(e,t,n,XT.defaultAbiCoder())}};let Mp=XT;H1=new WeakSet,I5=function(e){if(e.isArray())return new Sye(rt(this,H1,I5).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new UE(e.components.map(n=>rt(this,H1,I5).call(this,n)),e.name);switch(e.baseType){case"address":return new Aye(e.name);case"bool":return new Iye(e.name);case"string":return new $ye(e.name);case"bytes":return new Tye(e.name);case"":return new Mye(e.name)}let t=e.type.match(Z3e);if(t){let n=parseInt(t[2]||"256");return xe(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new Dye(n/8,t[1]==="int",e.name)}if(t=e.type.match(K3e),t){let n=parseInt(t[1]);return xe(n!==0&&n<=32,"invalid bytes length","param",e),new Rye(n,e.name)}xe(!1,"invalid type","type",e.type)};function UQ(r){const e=Bs(r);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return t4(e,32)}function FQ(r){const e=$t(r,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return dd(e.slice(0,t))}class iM{constructor(e,t,n){Ee(this,"fragment");Ee(this,"name");Ee(this,"signature");Ee(this,"topic");Ee(this,"args");const i=e.name,s=e.format();er(this,{fragment:e,name:i,signature:s,topic:t,args:n})}}class sM{constructor(e,t,n,i){Ee(this,"fragment");Ee(this,"name");Ee(this,"args");Ee(this,"signature");Ee(this,"selector");Ee(this,"value");const s=e.name,o=e.format();er(this,{fragment:e,name:s,args:n,signature:o,selector:t,value:i})}}class oM{constructor(e,t,n){Ee(this,"fragment");Ee(this,"name");Ee(this,"args");Ee(this,"signature");Ee(this,"selector");const i=e.name,s=e.format();er(this,{fragment:e,name:i,args:n,signature:s,selector:t})}}class QE{constructor(e){Ee(this,"hash");Ee(this,"_isIndexed");er(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const jQ={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},zQ={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r=>`reverted with reason string ${JSON.stringify(r)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r=>{let e="unknown panic code";return r>=0&&r<=255&&jQ[r.toString()]&&(e=jQ[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}},Q3=class{constructor(e){Ne(this,J3);Ne(this,Y3);Ee(this,"fragments");Ee(this,"deploy");Ee(this,"fallback");Ee(this,"receive");Ne(this,Wf,void 0);Ne(this,Vf,void 0);Ne(this,Gf,void 0);Ne(this,_a,void 0);let t=[];typeof e=="string"?t=JSON.parse(e):t=e,me(this,Gf,new Map),me(this,Wf,new Map),me(this,Vf,new Map);const n=[];for(const o of t)try{n.push(Ad.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}er(this,{fragments:Object.freeze(n)});let i=null,s=!1;me(this,_a,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let l;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}er(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(xe(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":l=oe(this,Gf);break;case"event":l=oe(this,Vf);break;case"error":l=oe(this,Wf);break;default:return}const u=o.format();l.has(u)||l.set(u,o)}),this.deploy||er(this,{deploy:Du.from("constructor()")}),er(this,{fallback:i,receive:s})}format(e){const t=e?"minimal":"full";return this.fragments.map(i=>i.format(t))}formatJson(){const e=this.fragments.map(t=>t.format("json"));return JSON.stringify(e.map(t=>JSON.parse(t)))}getAbiCoder(){return Mp.defaultAbiCoder()}getFunctionName(e){const t=rt(this,J3,cR).call(this,e,null,!1);return xe(t,"no matching function","key",e),t.name}hasFunction(e){return!!rt(this,J3,cR).call(this,e,null,!1)}getFunction(e,t){return rt(this,J3,cR).call(this,e,t||null,!0)}forEachFunction(e){const t=Array.from(oe(this,Gf).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const s=i.map(o=>JSON.stringify(o.format())).join(", ");xe(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=aa.from(e).format(),e==="Error(string)")return aa.from("error Error(string)");if(e==="Panic(uint256)")return aa.from("error Panic(uint256)");const n=oe(this,Wf).get(e);return n||null}forEachError(e){const t=Array.from(oe(this,Wf).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;ns.type==="string"?Nc(o):s.type==="bytes"?On(St(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=ku(o):s.type.match(/^bytes/)?o=t4(o,32):s.type==="address"&&oe(this,_a).encode(["address"],[o]),Oo(St(o),32));for(t.forEach((s,o)=>{const a=e.inputs[o];if(!a.indexed){xe(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?xe(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e=="string"){const o=this.getEvent(e);xe(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),xe(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((o,a)=>{const l=t[a];if(o.indexed)if(o.type==="string")n.push(Nc(l));else if(o.type==="bytes")n.push(On(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(oe(this,_a).encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:oe(this,_a).encode(i,s),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"){const w=this.getEvent(e);xe(w,"unknown event","eventFragment",e),e=w}if(n!=null&&!e.anonymous){const w=e.topicHash;xe(ui(n[0],32)&&n[0].toLowerCase()===w,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],o=[];e.inputs.forEach((w,y)=>{w.indexed?w.type==="string"||w.type==="bytes"||w.baseType==="tuple"||w.baseType==="array"?(i.push(Ks.from({type:"bytes32",name:w.name})),o.push(!0)):(i.push(w),o.push(!1)):(s.push(w),o.push(!1))});const a=n!=null?oe(this,_a).decode(i,Sn(n)):null,l=oe(this,_a).decode(s,t,!0),u=[],h=[];let p=0,g=0;return e.inputs.forEach((w,y)=>{let C=null;if(w.indexed)if(a==null)C=new QE(null);else if(o[y])C=new QE(a[g++]);else try{C=a[g++]}catch(T){C=T}else try{C=l[p++]}catch(T){C=T}u.push(C),h.push(w.name||null)}),Lw.fromItems(u,h)}parseTransaction(e){const t=$t(e.data,"tx.data"),n=cr(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(St(t.slice(0,4)));if(!i)return null;const s=oe(this,_a).decode(i.inputs,t.slice(4));return new sM(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new iM(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=St(e),n=this.getError(hi(t,0,4));if(!n)return null;const i=oe(this,_a).decode(n.inputs,hi(t,4));return new oM(n,n.selector,i)}static from(e){return e instanceof Q3?e:typeof e=="string"?new Q3(JSON.parse(e)):typeof e.format=="function"?new Q3(e.format("json")):new Q3(e)}};let Sg=Q3;Wf=new WeakMap,Vf=new WeakMap,Gf=new WeakMap,_a=new WeakMap,J3=new WeakSet,cR=function(e,t,n){if(ui(e)){const s=e.toLowerCase();for(const o of oe(this,Gf).values())if(s===o.selector)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of oe(this,Gf))o.split("(")[0]===e&&s.push(a);if(t){const o=t.length>0?t[t.length-1]:null;let a=t.length,l=!0;uo.isTyped(o)&&o.type==="overrides"&&(l=!1,a--);for(let u=s.length-1;u>=0;u--){const h=s[u].inputs.length;h!==a&&(!l||h!==a-1)&&s.splice(u,1)}for(let u=s.length-1;u>=0;u--){const h=s[u].inputs;for(let p=0;p=h.length){if(t[p].type==="overrides")continue;s.splice(u,1);break}if(t[p].type!==h[p].baseType){s.splice(u,1);break}}}}if(s.length===1&&t&&t.length!==s[0].inputs.length){const o=t[t.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");xe(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return s[0]}const i=oe(this,Gf).get(Dl.from(e).format());return i||null},Y3=new WeakSet,lR=function(e,t,n){if(ui(e)){const s=e.toLowerCase();for(const o of oe(this,Vf).values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of oe(this,Vf))o.split("(")[0]===e&&s.push(a);if(t){for(let o=s.length-1;o>=0;o--)s[o].inputs.length=0;o--){const a=s[o].inputs;for(let l=0;l1&&n){const o=s.map(a=>JSON.stringify(a.format())).join(", ");xe(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return s[0]}const i=oe(this,Vf).get(Ol.from(e).format());return i||null};const HQ=BigInt(0);function w4(r){return r??null}function bs(r){return r==null?null:r.toString()}class XE{constructor(e,t,n){Ee(this,"gasPrice");Ee(this,"maxFeePerGas");Ee(this,"maxPriorityFeePerGas");er(this,{gasPrice:w4(e),maxFeePerGas:w4(t),maxPriorityFeePerGas:w4(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:bs(e),maxFeePerGas:bs(t),maxPriorityFeePerGas:bs(n)}}}function Xw(r){const e={};r.to&&(e.to=r.to),r.from&&(e.from=r.from),r.data&&(e.data=St(r.data));const t="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of t)!(i in r)||r[i]==null||(e[i]=cr(r[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in r)||r[i]==null||(e[i]=Ir(r[i],`request.${i}`));return r.accessList&&(e.accessList=jh(r.accessList)),"blockTag"in r&&(e.blockTag=r.blockTag),"enableCcipRead"in r&&(e.enableCcipRead=!!r.enableCcipRead),"customData"in r&&(e.customData=r.customData),e}class aM{constructor(e,t){Ee(this,"provider");Ee(this,"number");Ee(this,"hash");Ee(this,"timestamp");Ee(this,"parentHash");Ee(this,"parentBeaconBlockRoot");Ee(this,"nonce");Ee(this,"difficulty");Ee(this,"gasLimit");Ee(this,"gasUsed");Ee(this,"stateRoot");Ee(this,"receiptsRoot");Ee(this,"blobGasUsed");Ee(this,"excessBlobGas");Ee(this,"miner");Ee(this,"extraData");Ee(this,"baseFeePerGas");Ne(this,x0,void 0);me(this,x0,e.transactions.map(n=>typeof n!="string"?new Tg(n,t):n)),er(this,{provider:t,hash:w4(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,extraData:e.extraData,baseFeePerGas:w4(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return oe(this,x0).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=oe(this,x0).slice();return e.length===0?[]:(Ue(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,nonce:l,number:u,parentHash:h,parentBeaconBlockRoot:p,stateRoot:g,receiptsRoot:w,timestamp:y,transactions:C}=this;return{_type:"Block",baseFeePerGas:bs(e),difficulty:bs(t),extraData:n,gasLimit:bs(i),gasUsed:bs(s),blobGasUsed:bs(this.blobGasUsed),excessBlobGas:bs(this.excessBlobGas),hash:o,miner:a,nonce:l,number:u,parentHash:h,timestamp:y,parentBeaconBlockRoot:p,stateRoot:g,receiptsRoot:w,transactions:C}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew Ig(i,t))));let n=HQ;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),er(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return oe(this,zx)}toJSON(){const{to:e,from:t,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:l,logs:u,status:h,root:p}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:bs(this.cumulativeGasUsed),from:t,gasPrice:bs(this.gasPrice),blobGasUsed:bs(this.blobGasUsed),blobGasPrice:bs(this.blobGasPrice),gasUsed:bs(this.gasUsed),hash:i,index:s,logs:u,logsBloom:l,root:p,status:h,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:g,nonce:w}=await qs({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(w{if(g==null||g.status!==0)return g;Ue(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:g.to,from:g.from,data:""},receipt:g})},h=await this.provider.getTransactionReceipt(this.hash);if(n===0)return u(h);if(h){if(await h.confirmations()>=n)return u(h)}else if(await l(),n===0)return null;return await new Promise((g,w)=>{const y=[],C=()=>{y.forEach(k=>k())};if(y.push(()=>{a=!0}),i>0){const k=setTimeout(()=>{C(),w(Wi("wait for transaction timeout","TIMEOUT"))},i);y.push(()=>{clearTimeout(k)})}const T=async k=>{if(await k.confirmations()>=n){C();try{g(u(k))}catch(N){w(N)}}};if(y.push(()=>{this.provider.off(this.hash,T)}),this.provider.on(this.hash,T),s>=0){const k=async()=>{try{await l()}catch(N){if($s(N,"TRANSACTION_REPLACED")){C(),w(N);return}}a||this.provider.once("block",k)};y.push(()=>{this.provider.off("block",k)}),this.provider.once("block",k)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Ue(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),WQ(this)}reorderedEvent(e){return Ue(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ue(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),qQ(this,e)}replaceableTransaction(e){xe(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new cj(this,this.provider);return me(t,q1,e),t}};let Tg=cj;q1=new WeakMap;function Y3e(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function qQ(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function WQ(r){return{orphan:"drop-transaction",tx:r}}function Q3e(r){return{orphan:"drop-log",log:{transactionHash:r.transactionHash,blockHash:r.blockHash,blockNumber:r.blockNumber,address:r.address,data:r.data,topics:Object.freeze(r.topics.slice()),index:r.index}}}class v4 extends Ig{constructor(t,n,i){super(t,t.provider);Ee(this,"interface");Ee(this,"fragment");Ee(this,"args");const s=n.decodeEventLog(i,t.data,t.topics);er(this,{args:s,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class tA extends Ig{constructor(t,n){super(t,t.provider);Ee(this,"error");er(this,{error:n})}}class cM extends eA{constructor(t,n,i){super(i,n);Ne(this,X3,void 0);me(this,X3,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?oe(this,X3).getEvent(t.topics[0]):null;if(n)try{return new v4(t,oe(this,X3),n)}catch(i){return new tA(t,i)}return t})}}X3=new WeakMap;class y4 extends Tg{constructor(t,n,i){super(i,n);Ne(this,Hx,void 0);me(this,Hx,t)}async wait(t,n){const i=await super.wait(t,n);return i==null?null:new cM(oe(this,Hx),this.provider,i)}}Hx=new WeakMap;class rA extends yE{constructor(t,n,i,s){super(t,n,i);Ee(this,"log");er(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class lM extends rA{constructor(e,t,n,i,s){super(e,t,n,new v4(s,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);er(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const VQ=BigInt(0);function GQ(r){return r&&typeof r.call=="function"}function KQ(r){return r&&typeof r.estimateGas=="function"}function nA(r){return r&&typeof r.resolveName=="function"}function ZQ(r){return r&&typeof r.sendTransaction=="function"}function JQ(r){if(r!=null){if(nA(r))return r;if(r.provider)return r.provider}}class X3e{constructor(e,t,n){Ne(this,qx,void 0);Ee(this,"fragment");if(er(this,{fragment:t}),t.inputs.lengthn[l]==null?null:a.walkAsync(n[l],(h,p)=>h==="address"?Array.isArray(p)?Promise.all(p.map(g=>Gs(g,s))):Gs(p,s):p)));return e.interface.encodeFilterTopics(t,o)}())}getTopicFilter(){return oe(this,qx)}}qx=new WeakMap;function Rg(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function kg(r){return r==null?null:r.provider||null}async function uM(r,e){const t=uo.dereference(r,"overrides");xe(typeof t=="object","invalid overrides parameter","overrides",r);const n=Xw(t);return xe(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),xe(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function YQ(r,e,t){const n=Rg(r,"resolveName"),i=nA(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(t[o],(a,l)=>(l=uo.dereference(l,a),a==="address"?Gs(l,i):l))))}function e5e(r){const e=async function(o){const a=await uM(o,["data"]);a.to=await r.getAddress(),a.from&&(a.from=await Gs(a.from,JQ(r.runner)));const l=r.interface,u=cr(a.value||VQ,"overrides.value")===VQ,h=(a.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!h&&!u&&xe(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),xe(l.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data);const p=l.receive||l.fallback&&l.fallback.payable;return xe(p||u,"cannot send value to non-payable fallback","overrides.value",a.value),xe(l.fallback||h,"cannot send data to receive-only contract","overrides.data",a.data),a},t=async function(o){const a=Rg(r.runner,"call");Ue(GQ(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(o);try{return await a.call(l)}catch(u){throw e4(u)&&u.data?r.interface.makeError(u.data,l):u}},n=async function(o){const a=r.runner;Ue(ZQ(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await a.sendTransaction(await e(o)),u=kg(r.runner);return new y4(r.interface,u,l)},i=async function(o){const a=Rg(r.runner,"estimateGas");return Ue(KQ(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return er(s,{_contract:r,estimateGas:i,populateTransaction:e,send:n,staticCall:t}),s}function t5e(r,e){const t=function(...u){const h=r.interface.getFunction(e,u);return Ue(h,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:u}}),h},n=async function(...u){const h=t(...u);let p={};if(h.inputs.length+1===u.length&&(p=await uM(u.pop()),p.from&&(p.from=await Gs(p.from,JQ(r.runner)))),h.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const g=await YQ(r.runner,h.inputs,u);return Object.assign({},p,await qs({to:r.getAddress(),data:r.interface.encodeFunctionData(h,g)}))},i=async function(...u){const h=await a(...u);return h.length===1?h[0]:h},s=async function(...u){const h=r.runner;Ue(ZQ(h),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const p=await h.sendTransaction(await n(...u)),g=kg(r.runner);return new y4(r.interface,g,p)},o=async function(...u){const h=Rg(r.runner,"estimateGas");return Ue(KQ(h),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await h.estimateGas(await n(...u))},a=async function(...u){const h=Rg(r.runner,"call");Ue(GQ(h),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const p=await n(...u);let g="0x";try{g=await h.call(p)}catch(y){throw e4(y)&&y.data?r.interface.makeError(y.data,p):y}const w=t(...u);return r.interface.decodeFunctionResult(w,g)},l=async(...u)=>t(...u).constant?await i(...u):await s(...u);return er(l,{name:r.interface.getFunctionName(e),_contract:r,_key:e,getFragment:t,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const u=r.interface.getFunction(e);return Ue(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),l}function r5e(r,e){const t=function(...i){const s=r.interface.getEvent(e,i);return Ue(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new X3e(r,t(...i),i)};return er(n,{name:r.interface.getEventName(e),_contract:r,_key:e,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=r.interface.getEvent(e);return Ue(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const iA=Symbol.for("_ethersInternal_contract"),QQ=new WeakMap;function n5e(r,e){QQ.set(r[iA],e)}function Oc(r){return QQ.get(r[iA])}function i5e(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function hM(r,e){let t,n=null;if(Array.isArray(e)){const s=function(o){if(ui(o,32))return o;const a=r.interface.getEvent(o);return xe(a,"unknown fragment","name",o),a.topicHash};t=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?t=[null]:typeof e=="string"?ui(e,32)?t=[e]:(n=r.interface.getEvent(e),xe(n,"unknown fragment","event",e),t=[n.topicHash]):i5e(e)?t=await e.getTopicFilter():"fragment"in e?(n=e.fragment,t=[n.topicHash]):xe(!1,"unknown event name","event",e);t=t.map(s=>{if(s==null)return null;if(Array.isArray(s)){const o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});const i=t.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:t}}async function x4(r,e){const{subs:t}=Oc(r);return t.get((await hM(r,e)).tag)||null}async function XQ(r,e,t){const n=kg(r.runner);Ue(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await hM(r,t),{addr:a,subs:l}=Oc(r);let u=l.get(s);if(!u){const p={address:a||r,topics:o},g=T=>{let k=i;if(k==null)try{k=r.interface.getEvent(T.topics[0])}catch{}if(k){const N=k,O=i?r.interface.decodeEventLog(i,T.data,T.topics):[];dM(r,t,O,B=>new lM(r,B,t,N,T))}else dM(r,t,[],N=>new rA(r,N,t,T))};let w=[];u={tag:s,listeners:[],start:()=>{w.length||w.push(n.on(p,g))},stop:async()=>{if(w.length==0)return;let T=w;w=[],await Promise.all(T),n.off(p,g)}},l.set(s,u)}return u}let fM=Promise.resolve();async function s5e(r,e,t,n){await fM;const i=await x4(r,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{const l=Array.from(t);n&&l.push(n(a?null:o));try{o.call(r,...l)}catch{}return!a}),i.listeners.length===0&&(i.stop(),Oc(r).subs.delete(i.tag)),s>0}async function dM(r,e,t,n){try{await fM}catch{}const i=s5e(r,e,t,n);return fM=i,await i}const sA=["then"],Wx=class{constructor(e,t,n,i){Ee(this,"target");Ee(this,"interface");Ee(this,"runner");Ee(this,"filters");Ee(this,bot);Ee(this,"fallback");xe(typeof e=="string"||LE(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=Sg.from(t);er(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,iA,{value:{}});let o,a=null,l=null;if(i){const p=kg(n);l=new y4(this.interface,p,i)}let u=new Map;if(typeof e=="string")if(ui(e))a=e,o=Promise.resolve(e);else{const p=Rg(n,"resolveName");if(!nA(p))throw Wi("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=p.resolveName(e).then(g=>{if(g==null)throw Wi("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Oc(this).addr=g,g})}else o=e.getAddress().then(p=>{if(p==null)throw new Error("TODO");return Oc(this).addr=p,p});n5e(this,{addrPromise:o,addr:a,deployTx:l,subs:u});const h=new Proxy({},{get:(p,g,w)=>{if(typeof g=="symbol"||sA.indexOf(g)>=0)return Reflect.get(p,g,w);try{return this.getEvent(g)}catch(y){if(!$s(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(p,g)=>sA.indexOf(g)>=0?Reflect.has(p,g):Reflect.has(p,g)||this.interface.hasEvent(String(g))});return er(this,{filters:h}),er(this,{fallback:s.receive||s.fallback?e5e(this):null}),new Proxy(this,{get:(p,g,w)=>{if(typeof g=="symbol"||g in p||sA.indexOf(g)>=0)return Reflect.get(p,g,w);try{return p.getFunction(g)}catch(y){if(!$s(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(p,g)=>typeof g=="symbol"||g in p||sA.indexOf(g)>=0?Reflect.has(p,g):p.interface.hasFunction(g)})}connect(e){return new Wx(this.target,this.interface,e)}attach(e){return new Wx(e,this.interface,this.runner)}async getAddress(){return await Oc(this).addrPromise}async getDeployedCode(){const e=kg(this.runner);Ue(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=kg(this.runner);return Ue(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(a){s(a)}};o()})}deploymentTransaction(){return Oc(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),t5e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),r5e(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){t==null&&(t=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=Oc(this),o=i||await s,{fragment:a,topics:l}=await hM(this,e),u={address:o,topics:l,fromBlock:t,toBlock:n},h=kg(this.runner);return Ue(h,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await h.getLogs(u)).map(p=>{let g=a;if(g==null)try{g=this.interface.getEvent(p.topics[0])}catch{}if(g)try{return new v4(p,this.interface,g)}catch(w){return new tA(p,w)}return new Ig(p,h)})}async on(e,t){const n=await XQ(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await XQ(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await dM(this,e,t,null)}async listenerCount(e){if(e){const i=await x4(this,e);return i?i.listeners.length:0}const{subs:t}=Oc(this);let n=0;for(const{listeners:i}of t.values())n+=i.length;return n}async listeners(e){if(e){const i=await x4(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:t}=Oc(this);let n=[];for(const{listeners:i}of t.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,t){const n=await x4(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(t==null||n.listeners.length===0)&&(n.stop(),Oc(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await x4(this,e);if(!t)return this;t.stop(),Oc(this).subs.delete(t.tag)}else{const{subs:t}=Oc(this);for(const{tag:n,stop:i}of t.values())i(),t.delete(n)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends Wx{constructor(i,s=null){super(i,e,s)}}return t}static from(e,t,n){return n==null&&(n=null),new this(e,t,n)}};let Mg=Wx;bot=iA;function o5e(){return Mg}let Sd=class extends o5e(){};class _4{constructor(e,t,n){Ee(this,"interface");Ee(this,"bytecode");Ee(this,"runner");const i=Sg.from(e);t instanceof Uint8Array||(typeof t=="object"&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=St($t(t)),er(this,{bytecode:t,interface:i,runner:n||null})}attach(e){return new Mg(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(t=await uM(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await YQ(this.runner,n.inputs,e),s=Sn([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},t,{data:s})}async deploy(...e){const t=await this.getDeployTransaction(...e);Ue(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(t),i=BE(n);return new Mg(i,this.interface,this.runner,n)}connect(e){return new _4(this.interface,this.bytecode,e)}static fromSolidity(e,t){xe(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}}function pM(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):xe(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class gM{constructor(e){Ee(this,"name");er(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const eX=new RegExp("^(ipfs)://(.*)$","i"),tX=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),eX,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],Vx=class{constructor(e,t,n){Ne(this,V1);Ee(this,"provider");Ee(this,"address");Ee(this,"name");Ne(this,W1,void 0);Ne(this,F2,void 0);er(this,{provider:e,address:t,name:n}),me(this,W1,null),me(this,F2,new Sd(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return oe(this,W1)==null&&me(this,W1,(async()=>{try{return await oe(this,F2).supportsInterface("0x9061b923")}catch(e){if($s(e,"CALL_EXCEPTION"))return!1;throw me(this,W1,null),e}})()),await oe(this,W1)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await rt(this,V1,T5).call(this,"addr(bytes32)");return s==null||s===xg?null:s}catch(s){if($s(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const o=await rt(this,V1,T5).call(this,"addr(bytes32,uint)",[s]);if(ui(o,20))return zr(o)}let t=null;for(const s of this.provider.plugins)if(s instanceof gM&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;const n=await rt(this,V1,T5).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await t.decodeAddress(e,n);if(i!=null)return i;Ue(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await rt(this,V1,T5).call(this,"text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){const e=await rt(this,V1,T5).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const i=t[1]==="e3010170"?"ipfs":"ipns",s=parseInt(t[4],16);if(t[5].length===s*2)return`${i}://${vE("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Ue(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(t==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let n=0;n{if(e&&t==null)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>r(n))}}function E4(r,e){return t=>{const n={};for(const i in r){let s=i;if(e&&i in e&&!(s in t)){for(const o of e[i])if(o in t){s=o;break}}try{const o=r[i](t[s]);o!==void 0&&(n[i]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";Ue(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:t})}}return n}}function a5e(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}xe(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function ev(r){return xe(ui(r,!0),"invalid data","value",r),r}function ca(r){return xe(ui(r,32),"invalid hash","value",r),r}const c5e=E4({address:zr,blockHash:ca,blockNumber:Ir,data:ev,index:Ir,removed:In(a5e,!1),topics:oA(ca),transactionHash:ca,transactionIndex:Ir},{index:["logIndex"]});function l5e(r){return c5e(r)}const u5e=E4({hash:In(ca),parentHash:ca,parentBeaconBlockRoot:In(ca,null),number:Ir,timestamp:Ir,nonce:In(ev),difficulty:cr,gasLimit:cr,gasUsed:cr,stateRoot:In(ca,null),receiptsRoot:In(ca,null),blobGasUsed:In(cr,null),excessBlobGas:In(cr,null),miner:In(zr),extraData:ev,baseFeePerGas:In(cr)});function h5e(r){const e=u5e(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:nX(t)),e}const f5e=E4({transactionIndex:Ir,blockNumber:Ir,transactionHash:ca,address:zr,topics:oA(ca),data:ev,index:Ir,blockHash:ca},{index:["logIndex"]});function d5e(r){return f5e(r)}const p5e=E4({to:In(zr,null),from:In(zr,null),contractAddress:In(zr,null),index:Ir,root:In(St),gasUsed:cr,blobGasUsed:In(cr,null),logsBloom:In(ev),blockHash:ca,hash:ca,logs:oA(d5e),blockNumber:Ir,cumulativeGasUsed:cr,effectiveGasPrice:In(cr),blobGasPrice:In(cr,null),status:In(Ir),type:In(Ir,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function g5e(r){return p5e(r)}function nX(r){r.to&&cr(r.to)===rX&&(r.to="0x0000000000000000000000000000000000000000");const e=E4({hash:ca,index:In(Ir,void 0),type:t=>t==="0x"||t==null?0:Ir(t),accessList:In(jh,null),blobVersionedHashes:In(oA(ca,!0),null),blockHash:In(ca,null),blockNumber:In(Ir,null),transactionIndex:In(Ir,null),from:zr,gasPrice:In(cr),maxPriorityFeePerGas:In(cr),maxFeePerGas:In(cr),maxFeePerBlobGas:In(cr,null),gasLimit:cr,to:In(zr,null),value:cr,nonce:Ir,data:ev,creates:In(zr,null),chainId:In(cr,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=BE(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=Mc.from(r.signature):e.signature=Mc.from(r),e.chainId==null){const t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&cr(e.blockHash)===rX&&(e.blockHash=null),e}const m5e="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Id{constructor(e){Ee(this,"name");er(this,{name:e})}clone(){return new Id(this.name)}}class tv extends Id{constructor(t,n){t==null&&(t=0);super(`org.ethers.network.plugins.GasCost#${t||0}`);Ee(this,"effectiveBlock");Ee(this,"txBase");Ee(this,"txCreate");Ee(this,"txDataZero");Ee(this,"txDataNonzero");Ee(this,"txAccessListStorageKey");Ee(this,"txAccessListAddress");const i={effectiveBlock:t};function s(o,a){let l=(n||{})[o];l==null&&(l=a),xe(typeof l=="number",`invalud value for ${o}`,"costs",n),i[o]=l}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),er(this,i)}clone(){return new tv(this.effectiveBlock,this)}}class rv extends Id{constructor(t,n){super("org.ethers.plugins.network.Ens");Ee(this,"address");Ee(this,"targetNetwork");er(this,{address:t||m5e,targetNetwork:n??1})}clone(){return new rv(this.address,this.targetNetwork)}}const lj=class extends Id{constructor(t){super("org.ethers.plugins.network.FeeData");Ne(this,j2,void 0);me(this,j2,t)}get feeDataFunc(){return oe(this,j2)}async getFeeData(t){return await oe(this,j2).call(this,t)}clone(){return new lj(oe(this,j2))}};let aA=lj;j2=new WeakMap;class mM extends Id{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Ne(this,Gx,void 0);Ne(this,Kx,void 0);me(this,Gx,t),me(this,Kx,n)}get url(){return oe(this,Gx)}get processFunc(){return oe(this,Kx)}clone(){return this}}Gx=new WeakMap,Kx=new WeakMap;const bM=new Map,r5=class{constructor(e,t){Ne(this,e5,void 0);Ne(this,t5,void 0);Ne(this,G1,void 0);me(this,e5,e),me(this,t5,cr(t)),me(this,G1,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return oe(this,e5)}set name(e){me(this,e5,e)}get chainId(){return oe(this,t5)}set chainId(e){me(this,t5,cr(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===cr(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===cr(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===cr(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(oe(this,G1).values())}attachPlugin(e){if(oe(this,G1).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return oe(this,G1).set(e.name,e.clone()),this}getPlugin(e){return oe(this,G1).get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){const e=new r5(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new tv;let n=t.txBase;if(e.to==null&&(n+=t.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function sX(r){return new mM(r,async(e,t,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,o]=await Promise.all([n.send(),e()]);i=s;const a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:iX(a.maxFee,9),maxPriorityFeePerGas:iX(a.maxPriorityFee,9)}}catch(s){Ue(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let oX=!1;function b5e(){if(oX)return;oX=!0;function r(e,t,n){const i=function(){const s=new ws(e,t);return n.ensNetwork!=null&&s.attachPlugin(new rv(null,n.ensNetwork)),s.attachPlugin(new tv),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};ws.register(e,i),ws.register(t,i),n.altNames&&n.altNames.forEach(s=>{ws.register(s,i)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("matic",137,{ensNetwork:1,plugins:[sX("https://gasstation.polygon.technology/v2")]}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[sX("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function wM(r){return JSON.parse(JSON.stringify(r))}class w5e{constructor(e){Ne(this,n5);Ne(this,_0,void 0);Ne(this,bu,void 0);Ne(this,K1,void 0);Ne(this,Kf,void 0);me(this,_0,e),me(this,bu,null),me(this,K1,4e3),me(this,Kf,-2)}get pollingInterval(){return oe(this,K1)}set pollingInterval(e){me(this,K1,e)}start(){oe(this,bu)||(me(this,bu,oe(this,_0)._setTimeout(rt(this,n5,uR).bind(this),oe(this,K1))),rt(this,n5,uR).call(this))}stop(){oe(this,bu)&&(oe(this,_0)._clearTimeout(oe(this,bu)),me(this,bu,null))}pause(e){this.stop(),e&&me(this,Kf,-2)}resume(){this.start()}}_0=new WeakMap,bu=new WeakMap,K1=new WeakMap,Kf=new WeakMap,n5=new WeakSet,uR=async function(){try{const e=await oe(this,_0).getBlockNumber();if(oe(this,Kf)===-2){me(this,Kf,e);return}if(e!==oe(this,Kf)){for(let t=oe(this,Kf)+1;t<=e;t++){if(oe(this,bu)==null)return;await oe(this,_0).emit("block",t)}me(this,Kf,e)}}catch{}oe(this,bu)!=null&&me(this,bu,oe(this,_0)._setTimeout(rt(this,n5,uR).bind(this),oe(this,K1)))};class vM{constructor(e){Ne(this,z2,void 0);Ne(this,H2,void 0);Ne(this,Z1,void 0);me(this,z2,e),me(this,Z1,!1),me(this,H2,t=>{this._poll(t,oe(this,z2))})}async _poll(e,t){throw new Error("sub-classes must override this")}start(){oe(this,Z1)||(me(this,Z1,!0),oe(this,H2).call(this,-2),oe(this,z2).on("block",oe(this,H2)))}stop(){oe(this,Z1)&&(me(this,Z1,!1),oe(this,z2).off("block",oe(this,H2)))}pause(e){this.stop()}resume(){this.start()}}z2=new WeakMap,H2=new WeakMap,Z1=new WeakMap;class v5e extends vM{constructor(t,n){super(t);Ne(this,i5,void 0);Ne(this,E0,void 0);me(this,i5,n),me(this,E0,-2)}pause(t){t&&me(this,E0,-2),super.pause(t)}async _poll(t,n){const i=await n.getBlock(oe(this,i5));i!=null&&(oe(this,E0)===-2?me(this,E0,i.number):i.number>oe(this,E0)&&(n.emit(oe(this,i5),i.number),me(this,E0,i.number)))}}i5=new WeakMap,E0=new WeakMap;class y5e extends vM{constructor(t,n){super(t);Ne(this,tR,void 0);me(this,tR,wM(n))}async _poll(t,n){throw new Error("@TODO")}}tR=new WeakMap;class x5e extends vM{constructor(t,n){super(t);Ne(this,s5,void 0);me(this,s5,n)}async _poll(t,n){const i=await n.getTransactionReceipt(oe(this,s5));i&&n.emit(oe(this,s5),i)}}s5=new WeakMap;class yM{constructor(e,t){Ne(this,rR);Ne(this,A0,void 0);Ne(this,o5,void 0);Ne(this,a5,void 0);Ne(this,J1,void 0);Ne(this,wu,void 0);me(this,A0,e),me(this,o5,wM(t)),me(this,a5,rt(this,rR,_ge).bind(this)),me(this,J1,!1),me(this,wu,-2)}start(){oe(this,J1)||(me(this,J1,!0),oe(this,wu)===-2&&oe(this,A0).getBlockNumber().then(e=>{me(this,wu,e)}),oe(this,A0).on("block",oe(this,a5)))}stop(){oe(this,J1)&&(me(this,J1,!1),oe(this,A0).off("block",oe(this,a5)))}pause(e){this.stop(),e&&me(this,wu,-2)}resume(){this.start()}}A0=new WeakMap,o5=new WeakMap,a5=new WeakMap,J1=new WeakMap,wu=new WeakMap,rR=new WeakSet,_ge=async function(e){if(oe(this,wu)===-2)return;const t=wM(oe(this,o5));t.fromBlock=oe(this,wu)+1,t.toBlock=e;const n=await oe(this,A0).getLogs(t);if(n.length===0){oe(this,wu){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}class nv{constructor(e){Ee(this,"name");er(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function A5e(r){return JSON.parse(JSON.stringify(r))}function xM(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function _M(r,e){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(ui(r,32)){const t=r.toLowerCase();return{type:"transaction",tag:lA("tx",{hash:t}),hash:t}}if(r.orphan){const t=r;return{type:"orphan",tag:lA("orphan",t),filter:A5e(t)}}if(r.address||r.topics){const t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?xM(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(t.address){const i=[],s=[],o=a=>{ui(a)?i.push(a):s.push((async()=>{i.push(await Gs(a,e))})())};Array.isArray(t.address)?t.address.forEach(o):o(t.address),s.length&&await Promise.all(s),n.address=xM(i.map(a=>a.toLowerCase()))}return{filter:n,tag:lA("event",n),type:"event"}}xe(!1,"unknown ProviderEvent","event",r)}function EM(){return new Date().getTime()}const C5e={cacheTimeout:250,pollingInterval:4e3};class iv{constructor(e,t){Ne(this,Ga);Ne(this,Jx);Ne(this,Yx);Ne(this,W2);Ne(this,Qx);Ne(this,V2);Ne(this,h5);Ne(this,Ea,void 0);Ne(this,Y1,void 0);Ne(this,Aa,void 0);Ne(this,c5,void 0);Ne(this,al,void 0);Ne(this,q2,void 0);Ne(this,Q1,void 0);Ne(this,C0,void 0);Ne(this,Zx,void 0);Ne(this,vu,void 0);Ne(this,l5,void 0);Ne(this,u5,void 0);if(me(this,u5,Object.assign({},C5e,t||{})),e==="any")me(this,q2,!0),me(this,al,null);else if(e){const n=ws.from(e);me(this,q2,!1),me(this,al,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else me(this,q2,!1),me(this,al,null);me(this,C0,-1),me(this,Q1,new Map),me(this,Ea,new Map),me(this,Y1,new Map),me(this,Aa,null),me(this,c5,!1),me(this,Zx,1),me(this,vu,new Map),me(this,l5,!1)}get pollingInterval(){return oe(this,u5).pollingInterval}get provider(){return this}get plugins(){return Array.from(oe(this,Y1).values())}attachPlugin(e){if(oe(this,Y1).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return oe(this,Y1).set(e.name,e.connect(this)),this}getPlugin(e){return oe(this,Y1).get(e)||null}get disableCcipRead(){return oe(this,l5)}set disableCcipRead(e){me(this,l5,!!e)}async ccipReadFetch(e,t,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=t.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${p}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:p}}),o.push(p)}Ue(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,t){return new aM(h5e(e),this)}_wrapLog(e,t){return new Ig(l5e(e),this)}_wrapTransactionReceipt(e,t){return new eA(g5e(e),this)}_wrapTransactionResponse(e,t){return new Tg(nX(e),this)}_detectNetwork(){Ue(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Ue(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Ir(await rt(this,Ga,_l).call(this,{method:"getBlockNumber"}),"%response");return oe(this,C0)>=0&&me(this,C0,e),e}_getAddress(e){return Gs(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(ui(e))return ui(e,32)?e:fd(e);if(typeof e=="bigint"&&(e=Ir(e,"blockTag")),typeof e=="number")return e>=0?fd(e):oe(this,C0)>=0?fd(oe(this,C0)+e):this.getBlockNumber().then(t=>fd(t+e));xe(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const t=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?xM(l.map(u=>u.toLowerCase())):l.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(l,u,h)=>{let p;switch(l.length){case 0:break;case 1:p=l[0];break;default:l.sort(),p=l}if(n&&(u!=null||h!=null))throw new Error("invalid filter");const g={};return p&&(g.address=p),t.length&&(g.topics=t),u&&(g.fromBlock=u),h&&(g.toBlock=h),n&&(g.blockHash=n),g};let s=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)s.push(this._getAddress(l));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(l=>typeof l!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(l=>i(l[0],l[1],l[2])):i(s,o,a)}_getTransactionRequest(e){const t=Xw(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;const s=Gs(t[i],this);cA(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){const i=this._getBlockTag(t.blockTag);cA(i)?n.push(async function(){t.blockTag=await i}()):t.blockTag=i}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(oe(this,al)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw oe(this,al)===i&&me(this,al,null),s}})();return me(this,al,i),(await i).clone()}const e=oe(this,al),[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(oe(this,q2)?(this.emit("network",n,t),oe(this,al)===e&&me(this,al,Promise.resolve(n))):Ue(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:i,gasPrice:s,priorityFee:o}=await qs({_block:rt(this,Qx,eK).call(this,"latest",!1),gasPrice:(async()=>{try{const h=await rt(this,Ga,_l).call(this,{method:"getGasPrice"});return cr(h,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const h=await rt(this,Ga,_l).call(this,{method:"getPriorityFee"});return cr(h,"%response")}catch{}return null})()});let a=null,l=null;const u=this._wrapBlock(i,e);return u&&u.baseFeePerGas&&(l=o??BigInt("1000000000"),a=u.baseFeePerGas*_5e+l),new XE(s,a,l)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Do(n.url),s=await n.processFunc(t,this,i);return new XE(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return cA(t)&&(t=await t),cr(await rt(this,Ga,_l).call(this,{method:"estimateGas",transaction:t}),"%response")}async call(e){const{tx:t,blockTag:n}=await qs({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await rt(this,Yx,XG).call(this,rt(this,Jx,QG).call(this,t,n,e.enableCcipRead?0:-1))}async getBalance(e,t){return cr(await rt(this,W2,b_).call(this,{method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return Ir(await rt(this,W2,b_).call(this,{method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return St(await rt(this,W2,b_).call(this,{method:"getCode"},e,t))}async getStorage(e,t,n){const i=cr(t,"position");return St(await rt(this,W2,b_).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:i}=await qs({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=Pc.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(t)}async getBlock(e,t){const{network:n,params:i}=await qs({network:this.getNetwork(),params:rt(this,Qx,eK).call(this,e,!!t)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:t,params:n}=await qs({network:this.getNetwork(),params:rt(this,Ga,_l).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await qs({network:this.getNetwork(),params:rt(this,Ga,_l).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await rt(this,Ga,_l).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await qs({network:this.getNetwork(),result:rt(this,Ga,_l).call(this,{method:"getTransactionResult",hash:e})});return t==null?null:St(t)}async getLogs(e){let t=this._getFilter(e);cA(t)&&(t=await t);const{network:n,params:i}=await qs({network:this.getNetwork(),params:rt(this,Ga,_l).call(this,{method:"getLogs",filter:t})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){Ue(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await Ng.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=zr(e);const t=p4(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await Ng.getEnsAddress(this),s=await new Sd(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===xg)return null;const a=await new Sd(s,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(a)!==e?null:a}catch(n){if($s(n,"BAD_DATA")&&n.value==="0x"||$s(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const i=t??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null;const l=async u=>{try{const h=await this.getTransactionReceipt(e);if(h!=null&&u-h.blockNumber+1>=i){s(h),a&&(clearTimeout(a),a=null);return}}catch(h){console.log("EEE",h)}this.once("block",l)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",l),o(Wi("timeout","TIMEOUT",{reason:"timeout"})))},n)),l(await this.getBlockNumber())})}async waitForBlock(e){Ue(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=oe(this,vu).get(e);t&&(t.timer&&clearTimeout(t.timer),oe(this,vu).delete(e))}_setTimeout(e,t){t==null&&(t=0);const n=S5(this,Zx)._++,i=()=>{oe(this,vu).delete(n),e()};if(this.paused)oe(this,vu).set(n,{timer:null,func:i,time:t});else{const s=setTimeout(i,t);oe(this,vu).set(n,{timer:s,func:i,time:EM()})}return n}_forEachSubscriber(e){for(const t of oe(this,Ea).values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new nv(e.type);case"block":{const t=new w5e(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new v5e(this,e.type);case"event":return new yM(this,e.filter);case"transaction":return new x5e(this,e.hash);case"orphan":return new y5e(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of oe(this,Ea).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),oe(this,Aa)!=null&&t.pause(oe(this,Aa));break}}async on(e,t){const n=await rt(this,h5,hR).call(this,e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,oe(this,Aa)!=null&&n.subscriber.pause(oe(this,Aa))),this}async once(e,t){const n=await rt(this,h5,hR).call(this,e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,oe(this,Aa)!=null&&n.subscriber.pause(oe(this,Aa))),this}async emit(e,...t){const n=await rt(this,V2,w_).call(this,e,t);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{const a=new yE(this,o?null:s,e);try{s.call(this,...t,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),oe(this,Ea).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await rt(this,V2,w_).call(this,e);return n?n.listeners.length:0}let t=0;for(const{listeners:n}of oe(this,Ea).values())t+=n.length;return t}async listeners(e){if(e){const n=await rt(this,V2,w_).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let t=[];for(const{listeners:n}of oe(this,Ea).values())t=t.concat(n.map(({listener:i})=>i));return t}async off(e,t){const n=await rt(this,V2,w_).call(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),oe(this,Ea).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:i}=await rt(this,h5,hR).call(this,e);n&&i.stop(),oe(this,Ea).delete(t)}else for(const[t,{started:n,subscriber:i}]of oe(this,Ea))n&&i.stop(),oe(this,Ea).delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return oe(this,c5)}destroy(){this.removeAllListeners();for(const e of oe(this,vu).keys())this._clearTimeout(e);me(this,c5,!0)}get paused(){return oe(this,Aa)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(me(this,C0,-1),oe(this,Aa)!=null){if(oe(this,Aa)==!!e)return;Ue(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(e)),me(this,Aa,!!e);for(const t of oe(this,vu).values())t.timer&&clearTimeout(t.timer),t.time=EM()-t.time}resume(){if(oe(this,Aa)!=null){this._forEachSubscriber(e=>e.resume()),me(this,Aa,null);for(const e of oe(this,vu).values()){let t=e.time;t<0&&(t=0),e.time=EM(),setTimeout(e.func,t)}}}}Ea=new WeakMap,Y1=new WeakMap,Aa=new WeakMap,c5=new WeakMap,al=new WeakMap,q2=new WeakMap,Q1=new WeakMap,C0=new WeakMap,Zx=new WeakMap,vu=new WeakMap,l5=new WeakMap,u5=new WeakMap,Ga=new WeakSet,_l=async function(e){const t=oe(this,u5).cacheTimeout;if(t<0)return await this._perform(e);const n=lA(e.method,e);let i=oe(this,Q1).get(n);return i||(i=this._perform(e),oe(this,Q1).set(n,i),setTimeout(()=>{oe(this,Q1).get(n)===i&&oe(this,Q1).delete(n)},t)),await i},Jx=new WeakSet,QG=async function(e,t,n){Ue(n=0&&t==="latest"&&i.to!=null&&hi(s.data,0,4)==="0x556f1830"){const o=s.data,a=await Gs(i.to,this);let l;try{l=k5e(hi(s.data,4))}catch(p){Ue(!1,p.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}Ue(l.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const u=await this.ccipReadFetch(i,l.calldata,l.urls);Ue(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:l.errorArgs}});const h={to:a,data:Sn([l.selector,R5e([u,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:h});try{const p=await rt(this,Jx,QG).call(this,h,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},h),result:p}),p}catch(p){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},h),error:p}),p}}throw s}},Yx=new WeakSet,XG=async function(e){const{value:t}=await qs({network:this.getNetwork(),value:e});return t},W2=new WeakSet,b_=async function(e,t,n){let i=this._getAddress(t),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await rt(this,Yx,XG).call(this,rt(this,Ga,_l).call(this,Object.assign(e,{address:i,blockTag:s})))},Qx=new WeakSet,eK=async function(e,t){if(ui(e,32))return await rt(this,Ga,_l).call(this,{method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await rt(this,Ga,_l).call(this,{method:"getBlock",blockTag:n,includeTransactions:t})},V2=new WeakSet,w_=async function(e,t){let n=await _M(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await _M({orphan:"drop-log",log:t[0]},this)),oe(this,Ea).get(n.tag)||null},h5=new WeakSet,hR=async function(e){const t=await _M(e,this),n=t.tag;let i=oe(this,Ea).get(n);return i||(i={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},oe(this,Ea).set(n,i)),i};function S5e(r,e){try{const t=AM(r,e);if(t)return dd(t)}catch{}return null}function AM(r,e){if(r==="0x")return null;try{const t=Ir(hi(r,e,e+32)),n=Ir(hi(r,t,t+32));return hi(r,t+32,t+32+n)}catch{}return null}function aX(r){const e=Vs(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function I5e(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}const T5e=new Uint8Array([]);function R5e(r){const e=[];let t=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=hi(r,0,32);Ue(hi(t,0,12)===hi(cX,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=hi(t,12);try{const n=[],i=Ir(hi(r,32,64)),s=Ir(hi(r,i,i+32)),o=hi(r,i+32);for(let a=0;ae[n]),e}function sv(r,e){if(r.provider)return r.provider;Ue(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function lX(r,e){let t=Xw(e);if(t.to!=null&&(t.to=Gs(t.to,r)),t.from!=null){const n=t.from;t.from=Promise.all([r.getAddress(),Gs(n,r)]).then(([i,s])=>(xe(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else t.from=r.getAddress();return await qs(t)}class ov{constructor(e){Ee(this,"provider");er(this,{provider:e||null})}async getNonce(e){return sv(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await lX(this,e)}async populateTransaction(e){const t=sv(this,"populateTransaction"),n=await lX(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=cr(n.chainId);xe(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?xe(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&xe(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await t.getFeeData();Ue(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await t.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(Ue(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):Ue(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await qs(n)}async estimateGas(e){return sv(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return sv(this,"call").call(await this.populateCall(e))}async resolveName(e){return await sv(this,"resolveName").resolveName(e)}async sendTransaction(e){const t=sv(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=Pc.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}}const uj=class extends ov{constructor(t,n){super(n);Ne(this,f5);Ee(this,"address");er(this,{address:t})}async getAddress(){return this.address}connect(t){return new uj(this.address,t)}async signTransaction(t){rt(this,f5,fR).call(this,"transactions","signTransaction")}async signMessage(t){rt(this,f5,fR).call(this,"messages","signMessage")}async signTypedData(t,n,i){rt(this,f5,fR).call(this,"typed-data","signTypedData")}};let A4=uj;f5=new WeakSet,fR=function(t,n){Ue(!1,`VoidSigner cannot sign ${t}`,"UNSUPPORTED_OPERATION",{operation:n})};const uX=new Set;function Np(r){uX.has(r)||(uX.add(r),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function M5e(r){return JSON.parse(JSON.stringify(r))}class hX{constructor(e){Ne(this,Xx);Ne(this,e7);Ne(this,Cc,void 0);Ne(this,Zf,void 0);Ne(this,G2,void 0);Ne(this,X1,void 0);Ne(this,K2,void 0);Ne(this,d5,void 0);me(this,Cc,e),me(this,Zf,null),me(this,G2,rt(this,Xx,tK).bind(this)),me(this,X1,!1),me(this,K2,null),me(this,d5,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){oe(this,X1)||(me(this,X1,!0),rt(this,Xx,tK).call(this,-2))}stop(){oe(this,X1)&&(me(this,X1,!1),me(this,d5,!0),rt(this,e7,rK).call(this),oe(this,Cc).off("block",oe(this,G2)))}pause(e){e&&rt(this,e7,rK).call(this),oe(this,Cc).off("block",oe(this,G2))}resume(){this.start()}}Cc=new WeakMap,Zf=new WeakMap,G2=new WeakMap,X1=new WeakMap,K2=new WeakMap,d5=new WeakMap,Xx=new WeakSet,tK=async function(e){try{oe(this,Zf)==null&&me(this,Zf,this._subscribe(oe(this,Cc)));let t=null;try{t=await oe(this,Zf)}catch(s){if(!$s(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){me(this,Zf,null),oe(this,Cc)._recoverSubscriber(this,this._recover(oe(this,Cc)));return}const n=await oe(this,Cc).getNetwork();if(oe(this,K2)||me(this,K2,n),oe(this,K2).chainId!==n.chainId)throw new Error("chaid changed");if(oe(this,d5))return;const i=await oe(this,Cc).send("eth_getFilterChanges",[t]);await this._emitResults(oe(this,Cc),i)}catch(t){console.log("@TODO",t)}oe(this,Cc).once("block",oe(this,G2))},e7=new WeakSet,rK=function(){const e=oe(this,Zf);e&&(me(this,Zf,null),e.then(t=>{oe(this,Cc).send("eth_uninstallFilter",[t])}))};class N5e extends hX{constructor(t,n){super(t);Ne(this,Z2,void 0);me(this,Z2,M5e(n))}_recover(t){return new yM(t,oe(this,Z2))}async _subscribe(t){return await t.send("eth_newFilter",[oe(this,Z2)])}async _emitResults(t,n){for(const i of n)t.emit(oe(this,Z2),t._wrapLog(i,t._network))}}Z2=new WeakMap;class P5e extends hX{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const O5e="bigint,boolean,function,number,string,symbol".split(/,/g);function uA(r){if(r==null||O5e.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(uA);if(typeof r=="object")return Object.keys(r).reduce((e,t)=>(e[t]=r[t],e),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function D5e(r){return new Promise(e=>{setTimeout(e,r)})}function av(r){return r&&r.toLowerCase()}function fX(r){return r&&typeof r.pollingInterval=="number"}const $5e={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Pg extends ov{constructor(t,n){super(t);Ee(this,"address");n=zr(n),er(this,{address:n})}connect(t){Ue(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const n=uA(t),i=[];if(n.from){const o=n.from;i.push((async()=>{const a=await Gs(o,this.provider);xe(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;i.push((async()=>{n.to=await Gs(o,this.provider)})())}i.length&&await Promise.all(i);const s=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(t){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(t);return await new Promise((s,o)=>{const a=[1e3,100];let l=0;const u=async()=>{try{const h=await this.provider.getTransaction(i);if(h!=null){s(h.replaceableTransaction(n));return}}catch(h){if($s(h,"CANCELLED")||$s(h,"BAD_DATA")||$s(h,"NETWORK_ERROR")){h.info==null&&(h.info={}),h.info.sendTransactionHash=i,o(h);return}if($s(h,"INVALID_ARGUMENT")&&(l++,h.info==null&&(h.info={}),h.info.sendTransactionHash=i,l>10)){o(h);return}this.provider.emit("error",Wi("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:h}))}this.provider._setTimeout(()=>{u()},a.pop()||4e3)};u()})}async signTransaction(t){const n=uA(t);if(n.from){const s=await Gs(n.from,this.provider);xe(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=s}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(t){const n=typeof t=="string"?Bs(t):t;return await this.provider.send("personal_sign",[St(n),this.address.toLowerCase()])}async signTypedData(t,n,i){const s=uA(i),o=await xd.resolveNames(t,n,s,async a=>{const l=await Gs(a);return xe(l!=null,"TypedData does not support null address","value",a),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(xd.getPayload(o.domain,n,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const n=typeof t=="string"?Bs(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),St(n)])}}class hA extends iv{constructor(t,n){super(t,n);Ne(this,t7);Ne(this,J2,void 0);Ne(this,p5,void 0);Ne(this,S0,void 0);Ne(this,Jf,void 0);Ne(this,gh,void 0);Ne(this,yu,void 0);Ne(this,Sc,void 0);me(this,p5,1),me(this,J2,Object.assign({},$5e,n||{})),me(this,S0,[]),me(this,Jf,null),me(this,yu,null),me(this,Sc,null);{let s=null;const o=new Promise(a=>{s=a});me(this,gh,{promise:o,resolve:s})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(xe(!i||t!=="any","staticNetwork cannot be used on special network 'any'","options",n),i&&t!=null&&me(this,yu,ws.from(t))):i&&(xe(t==null||i.matches(t),"staticNetwork MUST match network object","options",n),me(this,yu,i))}_getOption(t){return oe(this,J2)[t]}get _network(){return Ue(oe(this,yu),"network is not available yet","NETWORK_ERROR"),oe(this,yu)}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&cr(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(t);return n!=null?await this.send(n.method,n.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(oe(this,yu))return oe(this,yu)}else return t;return oe(this,Sc)?await oe(this,Sc):this.ready?(me(this,Sc,(async()=>{try{const n=ws.from(cr(await this.send("eth_chainId",[])));return me(this,Sc,null),n}catch(n){throw me(this,Sc,null),n}})()),await oe(this,Sc)):(me(this,Sc,(async()=>{const n={id:S5(this,p5)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0],me(this,Sc,null)}catch(s){throw me(this,Sc,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return ws.from(cr(i.result));throw this.getRpcError(n,i)})()),await oe(this,Sc))}_start(){oe(this,gh)==null||oe(this,gh).resolve==null||(oe(this,gh).resolve(),me(this,gh,null),(async()=>{for(;oe(this,yu)==null&&!this.destroyed;)try{me(this,yu,await this._detectNetwork())}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Wi("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await D5e(1e3)}rt(this,t7,nK).call(this)})())}async _waitUntilReady(){if(oe(this,gh)!=null)return await oe(this,gh).promise}_getSubscriber(t){return t.type==="pending"?new P5e(this):t.type==="event"?this._getOption("polling")?new yM(this,t.filter):new N5e(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new nv("orphan"):super._getSubscriber(t)}get ready(){return oe(this,gh)==null}getRpcTransaction(t){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(t[i]==null)return;let s=i;i==="gasLimit"&&(s="gas"),n[s]=fd(cr(t[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{t[i]!=null&&(n[i]=St(t[i]))}),t.accessList&&(n.accessList=jh(t.accessList)),n}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[av(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[av(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[av(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[av(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(av):t.filter.address=av(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,n){const{method:i}=t,{error:s}=n;if(i==="eth_estimateGas"&&s.message){const l=s.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return Wi("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:s}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=CM(s),u=Mp.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",t.params[0],l?l.data:null);return u.info={error:s,payload:t},u}const o=JSON.stringify(B5e(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return Wi("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:t,error:s}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Wi("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:s}});if(o.match(/nonce/i)&&o.match(/too low/i))return Wi("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:s}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Wi("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:s}});if(o.match(/only replay-protected/i))return Wi("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:s}}})}let a=!!o.match(/the method .* does not exist/i);return a||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(a=!0),a?Wi("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:s,payload:t}}):Wi("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:t})}send(t,n){if(this.destroyed)return Promise.reject(Wi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const i=S5(this,p5)._++,s=new Promise((o,a)=>{oe(this,S0).push({resolve:o,reject:a,payload:{method:t,params:n,id:i,jsonrpc:"2.0"}})});return rt(this,t7,nK).call(this),s}async getSigner(t){t==null&&(t=0);const n=this.send("eth_accounts",[]);if(typeof t=="number"){const s=await n;if(t>=s.length)throw new Error("no such account");return new Pg(this,s[t])}const{accounts:i}=await qs({network:this.getNetwork(),accounts:n});t=zr(t);for(const s of i)if(zr(s)===t)return new Pg(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Pg(this,n))}destroy(){oe(this,Jf)&&(clearTimeout(oe(this,Jf)),me(this,Jf,null));for(const{payload:t,reject:n}of oe(this,S0))n(Wi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));me(this,S0,[]),super.destroy()}}J2=new WeakMap,p5=new WeakMap,S0=new WeakMap,Jf=new WeakMap,gh=new WeakMap,yu=new WeakMap,Sc=new WeakMap,t7=new WeakSet,nK=function(){if(oe(this,Jf))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");me(this,Jf,setTimeout(()=>{me(this,Jf,null);const n=oe(this,S0);for(me(this,S0,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==oe(this,J2).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>oe(this,J2).batchMaxSize){n.unshift(i.pop());break}(async()=>{const s=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:s});try{const o=await this._send(s);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:l,payload:u}of i){if(this.destroyed){l(Wi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const h=o.filter(p=>p.id===u.id)[0];if(h==null){const p=Wi("missing response for request","BAD_DATA",{value:o,info:{payload:u}});this.emit("error",p),l(p);continue}if("error"in h){l(this.getRpcError(u,h));continue}a(h.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of i)a(o)}})()}},t))};class dX extends hA{constructor(t,n){super(t,n);Ne(this,eg,void 0);me(this,eg,4e3)}_getSubscriber(t){const n=super._getSubscriber(t);return fX(n)&&(n.pollingInterval=oe(this,eg)),n}get pollingInterval(){return oe(this,eg)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");me(this,eg,t),this._forEachSubscriber(n=>{fX(n)&&(n.pollingInterval=oe(this,eg))})}}eg=new WeakMap;let $l=(nge=class extends dX{constructor(t,n,i){t==null&&(t="http://localhost:8545");super(n,i);Ne(this,g5,void 0);typeof t=="string"?me(this,g5,new Do(t)):me(this,g5,t.clone())}_getConnection(){return oe(this,g5).clone()}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){const n=this._getConnection();n.body=JSON.stringify(t),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let s=i.bodyJson;return Array.isArray(s)||(s=[s]),s}},g5=new WeakMap,nge);function CM(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&ui(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const e in r){const t=CM(r[e]);if(t)return t}return null}if(typeof r=="string")try{return CM(JSON.parse(r))}catch{}return null}function SM(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(const t in r)SM(r[t],e);if(typeof r=="string")try{return SM(JSON.parse(r),e)}catch{}}}function B5e(r){const e=[];return SM(r,e),e}const fA="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function L5e(r){switch(r){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}xe(!1,"unsupported network","network",r)}class cv extends $l{constructor(t,n){t==null&&(t="mainnet");const i=ws.from(t);n==null&&(n=fA);const s={polling:!0,staticNetwork:i},o=cv.getRequest(i,n);super(o,i,s);Ee(this,"apiKey");er(this,{apiKey:n})}_getProvider(t){try{return new cv(t,this.apiKey)}catch{}return super._getProvider(t)}static getRequest(t,n){n==null&&(n=fA);const i=new Do(`https://${L5e(t.name)}/${n}`);return i.allowGzip=!0,n===fA&&(i.retryFunc=async(s,o,a)=>(Np("AnkrProvider"),!0)),i}getRpcError(t,n){return t.method==="eth_sendRawTransaction"&&n&&n.error&&n.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(n.error.message="replacement transaction underpriced"),super.getRpcError(t,n)}isCommunityResource(){return this.apiKey===fA}}const dA="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function U5e(r){switch(r){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}xe(!1,"unsupported network","network",r)}class lv extends $l{constructor(t,n){t==null&&(t="mainnet");const i=ws.from(t);n==null&&(n=dA);const s=lv.getRequest(i,n);super(s,i,{staticNetwork:i});Ee(this,"apiKey");er(this,{apiKey:n})}_getProvider(t){try{return new lv(t,this.apiKey)}catch{}return super._getProvider(t)}async _perform(t){if(t.method==="getTransactionResult"){const{trace:n,tx:i}=await qs({trace:this.send("trace_transaction",[t.hash]),tx:this.getTransaction(t.hash)});if(n==null||i==null)return null;let s,o=!1;try{s=n[0].result.output,o=n[0].error==="Reverted"}catch{}if(s)return Ue(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:s,reason:null,transaction:i,invocation:null,revert:null}),s;Ue(!1,"could not parse trace result","BAD_DATA",{value:n})}return await super._perform(t)}isCommunityResource(){return this.apiKey===dA}static getRequest(t,n){n==null&&(n=dA);const i=new Do(`https://${U5e(t.name)}/v2/${n}`);return i.allowGzip=!0,n===dA&&(i.retryFunc=async(s,o,a)=>(Np("alchemy"),!0)),i}}class IM extends $l{constructor(e){e==null&&(e="mainnet");const t=ws.from(e);xe(t.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}const pX=2e3;function F5e(r){return r&&typeof r.then=="function"}const gX="org.ethers.plugins.provider.Etherscan";class pA extends Id{constructor(t){super(gX);Ee(this,"baseUrl");er(this,{baseUrl:t})}clone(){return new pA(this.baseUrl)}}const j5e=["enableCcipRead"];let z5e=1;class TM extends iv{constructor(t,n){const i=n??null;super();Ee(this,"network");Ee(this,"apiKey");Ne(this,m5,void 0);const s=ws.from(t);me(this,m5,s.getPlugin(gX)),er(this,{apiKey:i,network:s}),this.getBaseUrl()}getBaseUrl(){if(oe(this,m5))return oe(this,m5).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}xe(!1,"unsupported network","network",this.network)}getUrl(t,n){const i=Object.keys(n).reduce((o,a)=>{const l=n[a];return l!=null&&(o+=`&${a}=${l}`),o},""),s=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${t}${i}${s}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(t,n){return n.module=t,n.apikey=this.apiKey,n}async detectNetwork(){return this.network}async fetch(t,n,i){const s=z5e++,o=i?this.getPostUrl():this.getUrl(t,n),a=i?this.getPostData(t,n):null;this.emit("debug",{action:"sendRequest",id:s,url:o,payload:a});const l=new Do(o);l.setThrottleParams({slotInterval:1e3}),l.retryFunc=(p,g,w)=>(this.isCommunityResource()&&Np("Etherscan"),Promise.resolve(!0)),l.processFunc=async(p,g)=>{const w=g.hasBody()?JSON.parse(dd(g.body)):{},y=(typeof w.result=="string"?w.result:"").toLowerCase().indexOf("rate limit")>=0;return t==="proxy"?w&&w.status==0&&w.message=="NOTOK"&&y&&(this.emit("debug",{action:"receiveError",id:s,reason:"proxy-NOTOK",error:w}),g.throwThrottleError(w.result,pX)):y&&(this.emit("debug",{action:"receiveError",id:s,reason:"null result",error:w.result}),g.throwThrottleError(w.result,pX)),g},a&&(l.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),l.body=Object.keys(a).map(p=>`${p}=${a[p]}`).join("&"));const u=await l.send();try{u.assertOk()}catch(p){this.emit("debug",{action:"receiveError",id:s,error:p,reason:"assertOk"}),Ue(!1,"response error","SERVER_ERROR",{request:l,response:u})}u.hasBody()||(this.emit("debug",{action:"receiveError",id:s,error:"missing body",reason:"null body"}),Ue(!1,"missing response","SERVER_ERROR",{request:l,response:u}));const h=JSON.parse(dd(u.body));return t==="proxy"?(h.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:s,result:h,reason:"invalid JSON-RPC"}),Ue(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:l,response:u,info:{result:h}})),h.error&&(this.emit("debug",{action:"receiveError",id:s,result:h,reason:"JSON-RPC error"}),Ue(!1,"error response","SERVER_ERROR",{request:l,response:u,info:{result:h}})),this.emit("debug",{action:"receiveRequest",id:s,result:h}),h.result):h.status==0&&(h.message==="No records found"||h.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:s,result:h}),h.result):((h.status!=1||typeof h.message=="string"&&!h.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:s,result:h}),Ue(!1,"error response","SERVER_ERROR",{request:l,response:u,info:{result:h}})),this.emit("debug",{action:"receiveRequest",id:s,result:h}),h.result)}_getTransactionPostData(t){const n={};for(let i in t){if(j5e.indexOf(i)>=0||t[i]==null)continue;let s=t[i];i==="type"&&s===0||i==="blockTag"&&s==="latest"||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[i]?s=fd(s):i==="accessList"?s="["+jh(s).map(o=>`{address:"${o.address}",storageKeys:["${o.storageKeys.join('","')}"]}`).join(",")+"]":s=St(s),n[i]=s)}return n}_checkError(t,n,i){let s="";if($s(n,"SERVER_ERROR")){try{s=n.info.result.error.message}catch{}if(!s)try{s=n.info.message}catch{}}if(t.method==="estimateGas"&&!s.match(/revert/i)&&s.match(/insufficient funds/i)&&Ue(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.transaction}),(t.method==="call"||t.method==="estimateGas")&&s.match(/execution reverted/i)){let o="";try{o=n.info.result.error.data}catch{}const a=Mp.getBuiltinCallException(t.method,t.transaction,o);throw a.info={request:t,error:n},a}if(s&&t.method==="broadcastTransaction"){const o=Pc.from(t.signedTransaction);s.match(/replacement/i)&&s.match(/underpriced/i)&&Ue(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:o}),s.match(/insufficient funds/)&&Ue(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:o}),s.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ue(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:o})}throw n}async _detectNetwork(){return this.network}async _perform(t){switch(t.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(n=>this._checkError(t,n,t.signedTransaction));case"getBlock":if("blockTag"in t)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});Ue(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.hash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const n=this._getTransactionPostData(t.transaction);n.module="proxy",n.action="eth_call";try{return await this.fetch("proxy",n,!0)}catch(i){return this._checkError(t,i,t.transaction)}}case"estimateGas":{const n=this._getTransactionPostData(t.transaction);n.module="proxy",n.action="eth_estimateGas";try{return await this.fetch("proxy",n,!0)}catch(i){return this._checkError(t,i,t.transaction)}}}return super._perform(t)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(t){let n=this._getAddress(t);F5e(n)&&(n=await n);try{const i=await this.fetch("contract",{action:"getabi",address:n}),s=JSON.parse(i);return new Sd(n,s,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}m5=new WeakMap;function H5e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof dr<"u")return dr;throw new Error("unable to locate global object")}const q5e=H5e().WebSocket;class C4{constructor(e,t){Ne(this,I0,void 0);Ne(this,r7,void 0);Ne(this,tg,void 0);Ne(this,Y2,void 0);Ne(this,rg,void 0);me(this,I0,e),me(this,r7,JSON.stringify(t)),me(this,tg,null),me(this,Y2,null),me(this,rg,null)}get filter(){return JSON.parse(oe(this,r7))}start(){me(this,tg,oe(this,I0).send("eth_subscribe",this.filter).then(e=>(oe(this,I0)._register(e,this),e)))}stop(){oe(this,tg).then(e=>{oe(this,I0).send("eth_unsubscribe",[e])}),me(this,tg,null)}pause(e){Ue(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),me(this,Y2,!!e)}resume(){me(this,Y2,null)}_handleMessage(e){if(oe(this,tg)!=null&&oe(this,Y2)===null){let t=oe(this,rg);t==null?t=this._emit(oe(this,I0),e):t=t.then(async()=>{await this._emit(oe(this,I0),e)}),me(this,rg,t.then(()=>{oe(this,rg)===t&&me(this,rg,null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}I0=new WeakMap,r7=new WeakMap,tg=new WeakMap,Y2=new WeakMap,rg=new WeakMap;class RM extends C4{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class kM extends C4{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}class MM extends C4{constructor(t,n){super(t,["logs",n]);Ne(this,n7,void 0);me(this,n7,JSON.stringify(n))}get logFilter(){return JSON.parse(oe(this,n7))}async _emit(t,n){t.emit(this.logFilter,t._wrapLog(n,t._network))}}n7=new WeakMap;class NM extends hA{constructor(t,n){const i=Object.assign({},n??{});xe(i.batchMaxCount==null||i.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),i.batchMaxCount=1,i.staticNetwork==null&&(i.staticNetwork=!0);super(t,i);Ne(this,Q2,void 0);Ne(this,b5,void 0);Ne(this,ng,void 0);me(this,Q2,new Map),me(this,b5,new Map),me(this,ng,new Map)}_getSubscriber(t){switch(t.type){case"close":return new nv("close");case"block":return new RM(this);case"pending":return new kM(this);case"event":return new MM(this,t.filter);case"orphan":if(t.filter.orphan==="drop-log")return new nv("drop-log")}return super._getSubscriber(t)}_register(t,n){oe(this,b5).set(t,n);const i=oe(this,ng).get(t);if(i){for(const s of i)n._handleMessage(s);oe(this,ng).delete(t)}}async _send(t){xe(!Array.isArray(t),"WebSocket does not support batch send","payload",t);const n=new Promise((i,s)=>{oe(this,Q2).set(t.id,{payload:t,resolve:i,reject:s})});return await this._waitUntilReady(),await this._write(JSON.stringify(t)),[await n]}async _processMessage(t){const n=JSON.parse(t);if(n&&typeof n=="object"&&"id"in n){const i=oe(this,Q2).get(n.id);if(i==null){this.emit("error",Wi("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}oe(this,Q2).delete(n.id),i.resolve(n)}else if(n&&n.method==="eth_subscription"){const i=n.params.subscription,s=oe(this,b5).get(i);if(s)s._handleMessage(n.params.result);else{let o=oe(this,ng).get(i);o==null&&(o=[],oe(this,ng).set(i,o)),o.push(n.params.result)}}else{this.emit("error",Wi("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(t){throw new Error("sub-classes must override this")}}Q2=new WeakMap,b5=new WeakMap,ng=new WeakMap;class S4 extends NM{constructor(t,n,i){super(n,i);Ne(this,X2,void 0);Ne(this,mh,void 0);typeof t=="string"?(me(this,X2,()=>new q5e(t)),me(this,mh,oe(this,X2).call(this))):typeof t=="function"?(me(this,X2,t),me(this,mh,t())):(me(this,X2,null),me(this,mh,t)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(s){console.log("failed to start WebsocketProvider",s)}},this.websocket.onmessage=s=>{this._processMessage(s.data)}}get websocket(){if(oe(this,mh)==null)throw new Error("websocket closed");return oe(this,mh)}async _write(t){this.websocket.send(t)}async destroy(){oe(this,mh)!=null&&(oe(this,mh).close(),me(this,mh,null)),super.destroy()}}X2=new WeakMap,mh=new WeakMap;const I4="84842078b09946638c03157f83405213";function W5e(r){switch(r){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}xe(!1,"unsupported network","network",r)}class PM extends S4{constructor(t,n){const i=new Pp(t,n),s=i._getConnection();Ue(!s.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const o=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,t);Ee(this,"projectId");Ee(this,"projectSecret");er(this,{projectId:i.projectId,projectSecret:i.projectSecret})}isCommunityResource(){return this.projectId===I4}}class Pp extends $l{constructor(t,n,i){t==null&&(t="mainnet");const s=ws.from(t);n==null&&(n=I4),i==null&&(i=null);const o=Pp.getRequest(s,n,i);super(o,s,{staticNetwork:s});Ee(this,"projectId");Ee(this,"projectSecret");er(this,{projectId:n,projectSecret:i})}_getProvider(t){try{return new Pp(t,this.projectId,this.projectSecret)}catch{}return super._getProvider(t)}isCommunityResource(){return this.projectId===I4}static getWebSocketProvider(t,n){return new PM(t,n)}static getRequest(t,n,i){n==null&&(n=I4),i==null&&(i=null);const s=new Do(`https://${W5e(t.name)}/v3/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===I4&&(s.retryFunc=async(o,a,l)=>(Np("InfuraProvider"),!0)),s}}const gA="919b412a057b5e9c9b6dce193c5a60242d6efadb";function V5e(r){switch(r){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}xe(!1,"unsupported network","network",r)}class uv extends $l{constructor(t,n){t==null&&(t="mainnet");const i=ws.from(t);n==null&&(n=gA);const s=uv.getRequest(i,n);super(s,i,{staticNetwork:i});Ee(this,"token");er(this,{token:n})}_getProvider(t){try{return new uv(t,this.token)}catch{}return super._getProvider(t)}isCommunityResource(){return this.token===gA}static getRequest(t,n){n==null&&(n=gA);const i=new Do(`https://${V5e(t.name)}/${n}`);return i.allowGzip=!0,n===gA&&(i.retryFunc=async(s,o,a)=>(Np("QuickNodeProvider"),!0)),i}}const G5e=BigInt("1"),K5e=BigInt("2");function Z5e(r){for(let e=r.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1)),n=r[e];r[e]=r[t],r[t]=n}}function J5e(r){return new Promise(e=>{setTimeout(e,r)})}function OM(){return new Date().getTime()}function DM(r){return JSON.stringify(r,(e,t)=>typeof t=="bigint"?{type:"bigint",value:t.toString()}:t)}const mX={stallTimeout:400,priority:1,weight:1},bX={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function Y5e(r,e){for(;(r.blockNumber<0||r.blockNumber{try{const t=await r.provider.getBlockNumber();t>r.blockNumber&&(r.blockNumber=t)}catch(t){r.blockNumber=-2,r._lastFatalError=t,r._lastFatalErrorTimestamp=OM()}r._updateNumber=null})()),await r._updateNumber,r.outOfSync++,!r._lastFatalError););}function T4(r){if(r==null)return"null";if(Array.isArray(r))return"["+r.map(T4).join(",")+"]";if(typeof r=="object"&&typeof r.toJSON=="function")return T4(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":case"number":return BigInt(r).toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{"+e.map(t=>`${JSON.stringify(t)}:${T4(r[t])}`).join(",")+"}"}}throw console.log("Could not serialize",r),new Error("Hmm...")}function $M(r){if("error"in r){const t=r.error;return{tag:T4(t),value:t}}const e=r.result;return{tag:T4(e),value:e}}function mA(r,e){const t=new Map;for(const{value:i,tag:s,weight:o}of e){const a=t.get(s)||{value:i,weight:0};a.weight+=o,t.set(s,a)}let n=null;for(const i of t.values())i.weight>=r&&(!n||i.weight>n.weight)&&(n=i);if(n)return n.value}function BM(r,e){let t=0;const n=new Map;let i=null;const s=[];for(const{value:a,tag:l,weight:u}of e)if(a instanceof Error){const h=n.get(l)||{value:a,weight:0};h.weight+=u,n.set(l,h),(i==null||h.weight>i.weight)&&(i=h)}else s.push(BigInt(a)),t+=u;if(t=r?i.value:void 0;s.sort((a,l)=>aa?1:0);const o=Math.floor(s.length/2);return s.length%2?s[o]:(s[o-1]+s[o]+G5e)/K5e}function LM(r,e){const t=mA(r,e);if(t!==void 0)return t;for(const n of e)if(n.value)return n.value}function Q5e(r,e){if(r===1)return Ir(BM(r,e),"%internal");const t=new Map,n=(o,a)=>{const l=t.get(o)||{result:o,weight:0};l.weight+=a,t.set(o,l)};for(const{weight:o,value:a}of e){const l=Ir(a);n(l-1,o),n(l,o),n(l+1,o)}let i=0,s;for(const{weight:o,result:a}of t.values())o>=r&&(o>i||s!=null&&o===i&&a>s)&&(i=o,s=a);return s}class UM extends iv{constructor(t,n,i){super(n,i);Ne(this,nR);Ne(this,i7);Ne(this,iR);Ne(this,sR);Ne(this,s7);Ee(this,"quorum");Ee(this,"eventQuorum");Ee(this,"eventWorkers");Ne(this,Ic,void 0);Ne(this,T0,void 0);Ne(this,w5,void 0);me(this,Ic,t.map(s=>s instanceof iv?Object.assign({provider:s},mX,bX):Object.assign({},mX,s,bX))),me(this,T0,-2),me(this,w5,null),i&&i.quorum!=null?this.quorum=i.quorum:this.quorum=Math.ceil(oe(this,Ic).reduce((s,o)=>(s+=o.weight,s),0)/2),this.eventQuorum=1,this.eventWorkers=1,xe(this.quorum<=oe(this,Ic).reduce((s,o)=>s+o.weight,0),"quorum exceed provider wieght","quorum",this.quorum)}get providerConfigs(){return oe(this,Ic).map(t=>{const n=Object.assign({},t);for(const i in n)i[0]==="_"&&delete n[i];return n})}async _detectNetwork(){return ws.from(cr(await this._perform({method:"chainId"})))}async _translatePerform(t,n){switch(n.method){case"broadcastTransaction":return await t.broadcastTransaction(n.signedTransaction);case"call":return await t.call(Object.assign({},n.transaction,{blockTag:n.blockTag}));case"chainId":return(await t.getNetwork()).chainId;case"estimateGas":return await t.estimateGas(n.transaction);case"getBalance":return await t.getBalance(n.address,n.blockTag);case"getBlock":{const i="blockHash"in n?n.blockHash:n.blockTag;return await t.getBlock(i,n.includeTransactions)}case"getBlockNumber":return await t.getBlockNumber();case"getCode":return await t.getCode(n.address,n.blockTag);case"getGasPrice":return(await t.getFeeData()).gasPrice;case"getPriorityFee":return(await t.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await t.getLogs(n.filter);case"getStorage":return await t.getStorage(n.address,n.position,n.blockTag);case"getTransaction":return await t.getTransaction(n.hash);case"getTransactionCount":return await t.getTransactionCount(n.address,n.blockTag);case"getTransactionReceipt":return await t.getTransactionReceipt(n.hash);case"getTransactionResult":return await t.getTransactionResult(n.hash)}}async _perform(t){if(t.method==="broadcastTransaction"){const o=oe(this,Ic).map(u=>null),a=oe(this,Ic).map(async({provider:u,weight:h},p)=>{try{const g=await u._perform(t);o[p]=Object.assign($M({result:g}),{weight:h})}catch(g){o[p]=Object.assign($M({error:g}),{weight:h})}});for(;;){const u=o.filter(g=>g!=null);for(const{value:g}of u)if(!(g instanceof Error))return g;const h=mA(this.quorum,o.filter(g=>g!=null));if($s(h,"INSUFFICIENT_FUNDS"))throw h;const p=a.filter((g,w)=>o[w]==null);if(p.length===0)break;await Promise.race(p)}const l=LM(this.quorum,o);if(Ue(l!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:o.map(DM)}}),l instanceof Error)throw l;return l}await rt(this,iR,Age).call(this);const n=new Set;let i=0;for(;;){const o=rt(this,i7,iK).call(this,n,t);if(o==null||(i+=o.config.weight,i>=this.quorum))break}const s=await rt(this,s7,sK).call(this,n,t);for(const o of n)o.perform&&o.result==null&&o.config.lateResponses++;return s}async destroy(){for(const{provider:t}of oe(this,Ic))t.destroy();super.destroy()}}Ic=new WeakMap,T0=new WeakMap,w5=new WeakMap,nR=new WeakSet,Ege=function(t){const n=Array.from(t).map(s=>s.config),i=oe(this,Ic).slice();Z5e(i),i.sort((s,o)=>s.priority-o.priority);for(const s of i)if(!s._lastFatalError&&n.indexOf(s)===-1)return s;return null},i7=new WeakSet,iK=function(t,n){const i=rt(this,nR,Ege).call(this,t);if(i==null)return null;const s={config:i,result:null,didBump:!1,perform:null,staller:null},o=OM();return s.perform=(async()=>{try{i.requests++;const l=await this._translatePerform(i.provider,n);s.result={result:l}}catch(l){i.errorResponses++,s.result={error:l}}const a=OM()-o;i._totalTime+=a,i.rollingDuration=.95*i.rollingDuration+.05*a,s.perform=null})(),s.staller=(async()=>{await J5e(i.stallTimeout),s.staller=null})(),t.add(s),s},iR=new WeakSet,Age=async function(){let t=oe(this,w5);if(!t){const n=[];oe(this,Ic).forEach(i=>{n.push((async()=>{await Y5e(i,0),i._lastFatalError||(i._network=await i.provider.getNetwork())})())}),me(this,w5,t=(async()=>{await Promise.all(n);let i=null;for(const s of oe(this,Ic)){if(s._lastFatalError)continue;const o=s._network;i==null?i=o.chainId:o.chainId!==i&&Ue(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await t},sR=new WeakSet,Cge=async function(t,n){const i=[];for(const s of t)if(s.result!=null){const{tag:o,value:a}=$M(s.result);i.push({tag:o,value:a,weight:s.config.weight})}if(!(i.reduce((s,o)=>s+o.weight,0)!o._lastFatalError).map(o=>({value:o.blockNumber,tag:Ir(o.blockNumber).toString(),weight:o.weight}))))));const s=Q5e(this.quorum,i);return s===void 0?void 0:(s>oe(this,T0)&&me(this,T0,s),oe(this,T0))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return BM(this.quorum,i);case"getBlock":return"blockTag"in n&&n.blockTag==="pending"?LM(this.quorum,i):mA(this.quorum,i);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return mA(this.quorum,i);case"broadcastTransaction":return LM(this.quorum,i)}Ue(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${DM(n.method)})`})}},s7=new WeakSet,sK=async function(t,n){if(t.size===0)throw new Error("no runners?!");const i=[];let s=0;for(const a of t){if(a.perform&&i.push(a.perform),a.staller){i.push(a.staller);continue}a.didBump||(a.didBump=!0,s++)}const o=await rt(this,sR,Cge).call(this,t,n);if(o!==void 0){if(o instanceof Error)throw o;return o}for(let a=0;a0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:n,results:Array.from(t).map(a=>DM(a.result))}}),await Promise.race(i),await rt(this,s7,sK).call(this,t,n)};function X5e(r){return r&&typeof r.send=="function"&&typeof r.close=="function"}const e4e="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function wX(r,e){e==null&&(e={});const t=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof r=="string"&&r.match(/^https?:/))return new $l(r);if(typeof r=="string"&&r.match(/^wss?:/)||X5e(r))return new S4(r);let n=null;try{n=ws.from(r)}catch{}const i=[];if(t("publicPolygon")&&n&&n.name==="matic"&&i.push(new $l("https://polygon-rpc.com/",n,{staticNetwork:n})),t("alchemy"))try{i.push(new lv(r,e.alchemy))}catch{}if(t("ankr")&&e.ankr!=null)try{i.push(new cv(r,e.ankr))}catch{}if(t("cloudflare"))try{i.push(new IM(r))}catch{}if(t("etherscan"))try{i.push(new TM(r,e.etherscan))}catch{}if(t("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),i.push(new Pp(r,o,a))}catch{}if(t("quicknode"))try{let o=e.quicknode;i.push(new uv(r,o))}catch{}if(Ue(i.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),i.length===1)return i[0];let s=Math.floor(i.length/2);return s>2&&(s=2),n&&e4e.indexOf(n.name)!==-1&&(s=1),e&&e.quorum&&(s=e.quorum),new UM(i,void 0,{quorum:s})}const hj=class extends ov{constructor(t){super(t.provider);Ee(this,"signer");Ne(this,ig,void 0);Ne(this,eb,void 0);er(this,{signer:t}),me(this,ig,null),me(this,eb,0)}async getAddress(){return this.signer.getAddress()}connect(t){return new hj(this.signer.connect(t))}async getNonce(t){if(t==="pending"){oe(this,ig)==null&&me(this,ig,super.getNonce("pending"));const n=oe(this,eb);return await oe(this,ig)+n}return super.getNonce(t)}increment(){S5(this,eb)._++}reset(){me(this,eb,0),me(this,ig,null)}async sendTransaction(t){const n=this.getNonce("pending");return this.increment(),t=await this.signer.populateTransaction(t),t.nonce=await n,await this.signer.sendTransaction(t)}signTransaction(t){return this.signer.signTransaction(t)}signMessage(t){return this.signer.signMessage(t)}signTypedData(t,n,i){return this.signer.signTypedData(t,n,i)}};let bA=hj;ig=new WeakMap,eb=new WeakMap;class wA extends dX{constructor(t,n){xe(t&&t.request,"invalid EIP-1193 provider","ethereum",t);super(n,{batchMaxCount:1});Ne(this,v5,void 0);me(this,v5,async(i,s)=>{const o={method:i,params:s};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const a=await t.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:a}),a}catch(a){const l=new Error(a.message);throw l.code=a.code,l.data=a.data,l.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){xe(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const n=await oe(this,v5).call(this,t.method,t.params||[]);return[{id:t.id,result:n}]}catch(n){return[{id:t.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(t,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(t,n)}async hasSigner(t){t==null&&(t=0);const n=await this.send("eth_accounts",[]);return typeof t=="number"?n.length>t:(t=t.toLowerCase(),n.filter(i=>i.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await oe(this,v5).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(t)}}v5=new WeakMap;const vA="62e1ad51b37b8e00394bda3b";function t4e(r){switch(r){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}xe(!1,"unsupported network","network",r)}class R4 extends $l{constructor(t,n,i){t==null&&(t="mainnet");const s=ws.from(t);n==null&&(n=vA),i==null&&(i=null);const o={staticNetwork:s},a=R4.getRequest(s,n,i);super(a,s,o);Ee(this,"applicationId");Ee(this,"applicationSecret");er(this,{applicationId:n,applicationSecret:i})}_getProvider(t){try{return new R4(t,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(t)}static getRequest(t,n,i){n==null&&(n=vA);const s=new Do(`https://${t4e(t.name)}/v1/lb/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===vA&&(s.retryFunc=async(o,a,l)=>(Np("PocketProvider"),!0)),s}isCommunityResource(){return this.applicationId===vA}}const vX=void 0,fj=class extends ov{constructor(t,n){super(n);Ee(this,"address");Ne(this,y5,void 0);xe(t&&typeof t.sign=="function","invalid private key","privateKey","[ REDACTED ]"),me(this,y5,t);const i=Ag(this.signingKey.publicKey);er(this,{address:i})}get signingKey(){return oe(this,y5)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(t){return new fj(oe(this,y5),t)}async signTransaction(t){const{to:n,from:i}=await qs({to:t.to?Gs(t.to,this.provider):void 0,from:t.from?Gs(t.from,this.provider):void 0});n!=null&&(t.to=n),i!=null&&(t.from=i),t.from!=null&&(xe(zr(t.from)===this.address,"transaction from address mismatch","tx.from",t.from),delete t.from);const s=Pc.from(t);return s.signature=this.signingKey.sign(s.unsignedHash),s.serialized}async signMessage(t){return this.signMessageSync(t)}signMessageSync(t){return this.signingKey.sign(KE(t)).serialized}async signTypedData(t,n,i){const s=await xd.resolveNames(t,n,i,async o=>{Ue(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const a=await this.provider.resolveName(o);return Ue(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),a});return this.signingKey.sign(xd.hash(s.domain,n,s.value)).serialized}};let hv=fj;y5=new WeakMap;const yA=" !#$%&'()*+,-./<=>?@[]^_`{|}~",r4e=/^[a-z]*$/i;function yX(r,e){let t=97;return r.reduce((n,i)=>(i===e?t++:i.match(r4e)?n.push(String.fromCharCode(t)+i):(t=97,n.push(i)),n),[])}function n4e(r,e){for(let i=yA.length-1;i>=0;i--)r=r.split(yA[i]).join(e.substring(2*i,2*i+2));const t=[],n=r.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,s,o,a)=>{if(o)for(let l=parseInt(o);l>=0;l--)t.push(";");else t.push(s.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return yX(yX(t,";"),":")}function xX(r){return xe(r[0]==="0","unsupported auwl data","data",r),n4e(r.substring(1+2*yA.length),r.substring(1,1+2*yA.length))}class FM{constructor(e){Ee(this,"locale");er(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class xA extends FM{constructor(t,n,i){super(t);Ne(this,a7);Ne(this,x5,void 0);Ne(this,o7,void 0);Ne(this,tb,void 0);me(this,x5,n),me(this,o7,i),me(this,tb,null)}get _data(){return oe(this,x5)}_decodeWords(){return xX(oe(this,x5))}getWord(t){const n=rt(this,a7,oK).call(this);return xe(t>=0&&ttypeof r=="object"&&"type"in r&&"name"in r,m5e=r=>typeof r=="string",fc=r=>typeof r=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(r),NY=r=>typeof r=="number"||typeof r=="bigint"||typeof r=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(r),g5e=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],Xm=r=>{let e=r.replace(/ /,""),t,n=!1,i=[];if(r.includes("[")&&(e=e.slice(0,e.indexOf("[")),i=[...r.matchAll(/(?:\[(\d*)\])/g)].map(s=>parseInt(s[1],10)).map(s=>Number.isNaN(s)?-1:s),n=i.length>0),p5e.includes(e))return{baseType:e,isArray:n,baseTypeSize:t,arraySizes:i};if(e.startsWith("int"))t=parseInt(e.substring(3),10),e="int";else if(e.startsWith("uint"))t=parseInt(r.substring(4),10),e="uint";else if(e.startsWith("bytes"))t=parseInt(e.substring(5),10),e="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};return{baseType:e,isArray:n,baseTypeSize:t,arraySizes:i}},yM=(r,e={})=>{if(Object.keys(e).includes("type"))throw new iC([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:r},instancePath:"",schemaPath:""}]);const{baseType:n,baseTypeSize:i}=Xm(r);if(!n&&!g5e.includes(r))throw new iC([{keyword:"eth",message:`Eth data type "${r}" is not valid`,params:{eth:r},instancePath:"",schemaPath:""}]);if(n){if(n==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${n}${i??""}`,required:!0}}return r?{format:r,required:!0}:{}},sC=(r,e="/0")=>{const t={type:"array",items:[],maxItems:r.length,minItems:r.length};for(const[n,i]of r.entries()){let s,a,o=[];OY(i)?(s=i.type,a=i.name,o=i.components):typeof i=="string"?(s=i,a=`${e}/${n}`):Array.isArray(i)&&(i[0]&&typeof i[0]=="string"&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(s=i[0],a=`${e}/${n}`,o=i[1]):(s="tuple",a=`${e}/${n}`,o=i));const{baseType:l,isArray:u,arraySizes:f}=Xm(s);let h,m=t;for(let b=f.length-1;b>0;b-=1)h={type:"array",$id:a,items:[],maxItems:f[b],minItems:f[b]},f[b]<0&&(delete h.maxItems,delete h.minItems),Array.isArray(m.items)?m.items.length===0?m.items=[h]:m.items.push(h):m.items=[m.items,h],m=h;if(l==="tuple"&&!u){const b=sC(o,a);b.$id=a,m.items.push(b)}else if(l==="tuple"&&u){const b=f[0],v=Object.assign({type:"array",$id:a,items:sC(o,a)},b>=0&&{minItems:b,maxItems:b});m.items.push(v)}else if(u){const b=f[0],v=Object.assign({type:"array",$id:a,items:yM(s)},b>=0&&{minItems:b,maxItems:b});m.items.push(v)}else Array.isArray(m.items)?m.items.push(Object.assign({$id:a},yM(s))):m.items.push(Object.assign({$id:a},yM(s)));m=t}return t},DY=r=>sC(r),xM=(r,e)=>e===1?r:xM(r[0],e-1),aC=(r,e,t)=>{const n=[];for(const[i,s]of r.entries()){let a,o,l=[];OY(s)?(a=s.type,o=s.name,l=s.components):typeof s=="string"?a=s:Array.isArray(s)&&(s[1]&&Array.isArray(s[1])?(a=s[0],l=s[1]):(a="tuple",l=s));const{baseType:u,isArray:f,arraySizes:h}=Xm(a),m=Array.isArray(e)?e[i]:e[o];if(u==="tuple"&&!f)n.push(aC(l,m,t));else if(u==="tuple"&&f){const b=[];for(const v of m)if(h.length>1){const C=xM(v,h.length-1),R=[];for(const k of C)R.push(aC(l,k,t));b.push(R)}else b.push(aC(l,v,t));n.push(b)}else n.push(m)}return t=t??[],t.push(...n),t},b5e=r=>{if(r>=48&&r<=57)return r-48;if(r>=65&&r<=70)return r-55;if(r>=97&&r<=102)return r-87;throw new Error(`Invalid code point: ${r}`)},_M=r=>{if(!fc(r))throw new Error("Invalid hex string");const[e,t]=r.startsWith("-")?[!0,r.slice(1)]:[!1,r],n=BigInt(t);return n>Number.MAX_SAFE_INTEGER?e?-n:n:n{if((typeof r=="number"||typeof r=="bigint")&&r<0)return`-0x${r.toString(16).slice(1)}`;if((typeof r=="number"||typeof r=="bigint")&&r>=0)return`0x${r.toString(16)}`;if(typeof r=="string"&&fc(r)){const[e,t]=r.startsWith("-")?[!0,r.slice(1)]:[!1,r],n=t.split(/^(-)?0(x|X)/).slice(-1)[0];return`${e?"-":""}0x${n.replace(/^0+/,"").toLowerCase()}`}if(typeof r=="string"&&!fc(r))return oC(BigInt(r));throw new iye(r)},v5e=(r,e,t="0")=>{if(typeof r=="string"&&!fc(r))return r.padStart(e,t);const n=typeof r=="string"&&fc(r)?r:oC(r),[i,s]=n.startsWith("-")?["-0x",n.slice(3)]:["0x",n.slice(2)];return`${i}${s.padStart(e,t)}`};function EM(r){let e="0x";for(const t of r){const n=t.toString(16);e+=n.length===1?`0${n}`:n}return e}const Rh={zero:48,nine:57,A:65,F:70,a:97,f:102};function $Y(r){if(r>=Rh.zero&&r<=Rh.nine)return r-Rh.zero;if(r>=Rh.A&&r<=Rh.F)return r-(Rh.A-10);if(r>=Rh.a&&r<=Rh.f)return r-(Rh.a-10)}function CM(r){let e=0;if(r.startsWith("0")&&(r[1]==="x"||r[1]==="X")&&(e=2),r.length%2!==0)throw new pM(`hex string has odd length: ${r}`);const t=(r.length-e)/2,n=new Uint8Array(t);for(let i=0,s=e;i{var e;return r instanceof Uint8Array||((e=r==null?void 0:r.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"},LY=(r,e={abiType:"bytes"})=>{if(typeof r!="string"&&!Array.isArray(r)&&!AM(r)||typeof r=="string"&&fc(r)&&r.startsWith("-")||typeof r=="string"&&!fc(r))return!1;let t;if(typeof r=="string"){if(r.length%2!==0)return!1;t=CM(r)}else if(Array.isArray(r)){if(r.some(n=>n<0||n>255||!Number.isInteger(n)))return!1;t=new Uint8Array(r)}else t=r;if(e!=null&&e.abiType){const{baseTypeSize:n}=Xm(e.abiType);return n?t.length===n:!0}return e!=null&&e.size?t.length===(e==null?void 0:e.size):!0},y5e=r=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(r))return!1;const e=r.slice(2),t=mY(e.toLowerCase()),n=EM(G3e(BY(t))).slice(2);for(let i=0;i<40;i+=1)if(parseInt(n[i],16)>7&&e[i].toUpperCase()!==e[i]||parseInt(n[i],16)<=7&&e[i].toLowerCase()!==e[i])return!1;return!0},cC=(r,e=!0)=>{if(typeof r!="string"&&!AM(r))return!1;let t;return AM(r)?t=EM(r):typeof r=="string"&&!fc(r)?t=r.toLowerCase().startsWith("0x")?r:`0x${r}`:t=r,/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:e?y5e(t):!0:!1};var lC;(function(r){r.NUMBER="NUMBER_NUMBER",r.HEX="NUMBER_HEX",r.STR="NUMBER_STR",r.BIGINT="NUMBER_BIGINT"})(lC||(lC={}));var uC;(function(r){r.HEX="BYTES_HEX",r.UINT8ARRAY="BYTES_UINT8ARRAY"})(uC||(uC={})),lC.BIGINT,uC.HEX,lC.HEX,uC.HEX;var SM;(function(r){r.EARLIEST="earliest",r.LATEST="latest",r.PENDING="pending",r.SAFE="safe",r.FINALIZED="finalized"})(SM||(SM={}));var UY;(function(r){r.chainstart="chainstart",r.frontier="frontier",r.homestead="homestead",r.dao="dao",r.tangerineWhistle="tangerineWhistle",r.spuriousDragon="spuriousDragon",r.byzantium="byzantium",r.constantinople="constantinople",r.petersburg="petersburg",r.istanbul="istanbul",r.muirGlacier="muirGlacier",r.berlin="berlin",r.london="london",r.altair="altair",r.arrowGlacier="arrowGlacier",r.grayGlacier="grayGlacier",r.bellatrix="bellatrix",r.merge="merge",r.capella="capella",r.shanghai="shanghai"})(UY||(UY={}));const IM=(r,e)=>{let t=r;for(let n=1;n{if(!["number","string","bigint"].includes(typeof r)||typeof r=="string"&&r.length===0)return!1;let t;if(e!=null&&e.abiType){const{baseTypeSize:i}=Xm(e.abiType);i&&(t=i)}else e.bitSize&&(t=e.bitSize);const n=IM(BigInt(2),BigInt(t??256))-BigInt(1);try{const i=typeof r=="string"&&fc(r)?BigInt(_M(r)):BigInt(r);return i>=0&&i<=n}catch{return!1}},n6=(r,e={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof r)||typeof r=="number"&&r>Number.MAX_SAFE_INTEGER)return!1;let t;if(e!=null&&e.abiType){const{baseTypeSize:s,baseType:a}=Xm(e.abiType);if(a!=="int")return!1;s&&(t=s)}else e.bitSize&&(t=e.bitSize);const n=IM(BigInt(2),BigInt((t??256)-1)),i=BigInt(-1)*IM(BigInt(2),BigInt((t??256)-1));try{const s=typeof r=="string"&&fc(r)?BigInt(_M(r)):BigInt(r);return s>=i&&s<=n}catch{return!1}},x5e=r=>!!(n6(r)||typeof r=="string"&&/[0-9.]/.test(r)&&r.indexOf(".")===r.lastIndexOf(".")||typeof r=="number"),FY=r=>r6(r),jY=r=>Object.values(SM).includes(r),TM=r=>jY(r)||FY(r),_5e=r=>typeof r!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(r)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(r)||/^(0x)?[0-9A-F]{512}$/.test(r)),E5e=r=>["number","string","boolean"].includes(typeof r)?typeof r=="boolean"?!0:typeof r=="string"&&!fc(r)?r==="1"||r==="0":typeof r=="string"&&fc(r)?r==="0x1"||r==="0x0":r===1||r===0:!1,vw=r=>r==null,zY=r=>typeof r!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(r)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(r)||/^(0x)?[0-9A-F]{64}$/.test(r)),C5e=r=>{const e=["fromBlock","toBlock","address","topics","blockHash"];if(vw(r)||typeof r!="object"||!Object.keys(r).every(t=>e.includes(t))||!vw(r.fromBlock)&&!TM(r.fromBlock)||!vw(r.toBlock)&&!TM(r.toBlock))return!1;if(!vw(r.address)){if(Array.isArray(r.address)){if(!r.address.every(t=>cC(t)))return!1}else if(!cC(r.address))return!1}return!(!vw(r.topics)&&!r.topics.every(t=>vw(t)?!0:Array.isArray(t)?t.every(n=>zY(n)):!!zY(t)))},eg={address:r=>cC(r),bloom:r=>_5e(r),blockNumber:r=>FY(r),blockTag:r=>jY(r),blockNumberOrTag:r=>TM(r),bool:r=>E5e(r),bytes:r=>LY(r),filter:r=>C5e(r),hex:r=>fc(r),uint:r=>r6(r),int:r=>n6(r),number:r=>x5e(r),string:r=>m5e(r)};for(let r=8;r<=256;r+=8)eg[`int${r}`]=e=>n6(e,{bitSize:r}),eg[`uint${r}`]=e=>r6(e,{bitSize:r});for(let r=1;r<=32;r+=1)eg[`bytes${r}`]=e=>LY(e,{size:r});eg.bytes256=eg.bytes;const i6=r=>{if((!(r!=null&&r.type)||(r==null?void 0:r.type)==="object")&&(r!=null&&r.properties)){const e={};for(const t of Object.keys(r.properties)){const n=i6(r.properties[t]);n&&(e[t]=n)}return Array.isArray(r.required)?be.object(e).partial().required(r.required.reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:!0}),{})):be.object(e).partial()}if((r==null?void 0:r.type)==="array"&&(r!=null&&r.items)){if(Array.isArray(r.items)&&r.items.length>1&&r.maxItems!==void 0&&new Set(r.items.map(n=>n.$id)).size===r.items.length){const n=[];for(const i of r.items){const s=i6(i);s&&n.push(s)}return be.tuple(n)}const e=Array.isArray(r.items)?r.items[0]:r.items;let t=be.array(i6(e));return t=r.minItems!==void 0?t.min(r.minItems):t,t=r.maxItems!==void 0?t.max(r.maxItems):t,t}if(r.oneOf&&Array.isArray(r.oneOf))return be.union(r.oneOf.map(e=>i6(e)));if(r!=null&&r.format){if(!eg[r.format])throw new wye(r.format);return be.any().refine(eg[r.format],e=>({params:{value:e,format:r.format}}))}return r!=null&&r.type&&(r==null?void 0:r.type)!=="object"&&typeof be[String(r.type)]=="function"?be[String(r.type)]():be.object({data:be.any()}).partial()};class ww{static factory(){return ww.validatorInstance||(ww.validatorInstance=new ww),ww.validatorInstance}validate(e,t,n){var i,s;const o=i6(e).safeParse(t);if(!o.success){const l=this.convertErrors((s=(i=o.error)===null||i===void 0?void 0:i.issues)!==null&&s!==void 0?s:[]);if(l){if(n!=null&&n.silent)return l;throw new iC(l)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map(t=>{var n;let i,s,a,o;o=t.path.join("/");const l=String(t.path[t.path.length-1]),u=t.path.join("/");if(t.code===St.too_big)s="maxItems",o=`${u}/maxItems`,a={limit:t.maximum},i=`must NOT have more than ${t.maximum} items`;else if(t.code===St.too_small)s="minItems",o=`${u}/minItems`,a={limit:t.minimum},i=`must NOT have fewer than ${t.minimum} items`;else if(t.code===St.custom){const{value:f,format:h}=(n=t.params)!==null&&n!==void 0?n:{};typeof f>"u"?i=`value at "/${o}" is required`:i=`value "${typeof f=="object"?JSON.stringify(f):f}" at "/${o}" must pass "${h}" validation`,a={value:f}}return{keyword:s??l,instancePath:u?`/${u}`:"",schemaPath:o?`#${o}`:"#",params:a??{value:t.message},message:i??t.message}})}}class A5e{constructor(){this._validator=ww.factory()}validateJSONSchema(e,t,n){return this._validator.validate(e,t,n)}validate(e,t,n={silent:!1}){var i,s;const a=DY(e);if(!(Array.isArray(a.items)&&((i=a.items)===null||i===void 0?void 0:i.length)===0&&t.length===0)){if(Array.isArray(a.items)&&((s=a.items)===null||s===void 0?void 0:s.length)===0&&t.length!==0)throw new iC([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:t}]);return this._validator.validate(a,t,n)}}}const kM=new A5e;function S5e(r){var e;return r instanceof Uint8Array||((e=r==null?void 0:r.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"}BigInt(0),BigInt(1),BigInt(1e3),BigInt(1e3),BigInt(1e3),BigInt(1e3),BigInt(1e6),BigInt(1e6),BigInt(1e6),BigInt(1e6),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e9),BigInt(1e12),BigInt(1e12),BigInt(1e12),BigInt(1e15),BigInt(1e15),BigInt(1e15),BigInt("1000000000000000000"),BigInt("1000000000000000000000"),BigInt("1000000000000000000000"),BigInt("1000000000000000000000000"),BigInt("1000000000000000000000000000"),BigInt("1000000000000000000000000000000");const I5e=r=>{if(kM.validate(["bytes"],[r]),S5e(r))return r;if(Array.isArray(r))return new Uint8Array(r);if(typeof r=="string")return CM(r);throw new pM(r)},{uint8ArrayToHexString:T5e}=w5e,k5e=r=>T5e(I5e(r)),fC=(r,e)=>{typeof r!="bigint"&&kM.validate(["int"],[r]);let t=oC(r);return e&&(!t.startsWith("-")&&t.length%2===1?t="0x0".concat(t.slice(2)):t.length%2===0&&t.startsWith("-")&&(t="-0x0".concat(t.slice(3)))),t},HY=r=>{kM.validate(["string"],[r]);let e=r.replace(/^(?:\u0000)/,"");return e=e.replace(/(?:\u0000)$/,""),k5e(new TextEncoder().encode(e))},RM=(r,e)=>{if(typeof r=="string"&&cC(r))return e?"address":`0x${r.toLowerCase().replace(/^0x/i,"")}`;if(typeof r=="boolean")return e?"bool":r?"0x01":"0x00";if(typeof r=="number")return e?r<0?"int256":"uint256":fC(r);if(typeof r=="bigint")return e?"bigint":fC(r);if(typeof r=="object"&&r)return e?"string":HY(JSON.stringify(r));if(typeof r=="string"){if(r.startsWith("-0x")||r.startsWith("-0X"))return e?"int256":fC(r);if(fc(r))return e?"bytes":r;if(NY(r)&&!n6(r)&&!r6(r))return e?"bytes":`0x${r}`;if(NY(r)&&!n6(r)&&r6(r))return e?"uint":fC(r);if(!Number.isFinite(r))return e?"string":HY(r)}throw new sye(r)};var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Mh(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var qY={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(l,u,f){this.fn=l,this.context=u,this.once=f||!1}function s(l,u,f,h,m){if(typeof f!="function")throw new TypeError("The listener must be a function");var b=new i(f,h||l,m),v=t?t+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],b]:l._events[v].push(b):(l._events[v]=b,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],f,h;if(this._eventsCount===0)return u;for(h in f=this._events)e.call(f,h)&&u.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},o.prototype.listeners=function(u){var f=t?t+u:u,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,b=h.length,v=new Array(b);mh?T.c=T.e=null:L.e=10;p/=10,y++);y>h?T.c=T.e=null:(T.e=y,T.c=[L]);return}S=String(L)}else{if(!M5e.test(S=String(L)))return n(T,S,g);T.s=S.charCodeAt(0)==45?(S=S.slice(1),-1):1}(y=S.indexOf("."))>-1&&(S=S.replace(".","")),(p=S.search(/e/i))>0?(y<0&&(y=p),y+=+S.slice(p+1),S=S.substring(0,p)):y<0&&(y=S.length)}else{if(rs(V,2,R.length,"Base"),V==10&&k)return T=new P(L),G(T,a+T.e+1,o);if(S=String(L),g=typeof L=="number"){if(L*0!=0)return n(T,S,g,V);if(T.s=1/L<0?(S=S.slice(1),-1):1,P.DEBUG&&S.replace(/^0\.0*|\./,"").length>15)throw Error(WY+L)}else T.s=S.charCodeAt(0)===45?(S=S.slice(1),-1):1;for(te=R.slice(0,V),y=p=0,_=S.length;p<_;p++)if(te.indexOf(D=S.charAt(p))<0){if(D=="."){if(p>y){y=_;continue}}else if(!x&&(S==S.toUpperCase()&&(S=S.toLowerCase())||S==S.toLowerCase()&&(S=S.toUpperCase()))){x=!0,p=-1,y=0;continue}return n(T,String(L),g,V)}g=!1,S=t(S,V,10,T.s),(y=S.indexOf("."))>-1?S=S.replace(".",""):y=S.length}for(p=0;S.charCodeAt(p)===48;p++);for(_=S.length;S.charCodeAt(--_)===48;);if(S=S.slice(p,++_)){if(_-=p,g&&P.DEBUG&&_>15&&(L>PM||L!==Hl(L)))throw Error(WY+T.s*L);if((y=y-p-1)>h)T.c=T.e=null;else if(y=-ma&&x<=ma&&x===Hl(x)){if(D[0]===0){if(x===0&&D.length===1)return!0;break e}if(V=(x+1)%Wr,V<1&&(V+=Wr),String(D[0]).length==V){for(V=0;V=Gu||te!==Hl(te))break e;if(te!==0)return!0}}}else if(D===null&&x===null&&(y===null||y===1||y===-1))return!0;throw Error(dc+"Invalid BigNumber: "+L)},P.maximum=P.max=function(){return $(arguments,-1)},P.minimum=P.min=function(){return $(arguments,1)},P.random=function(){var L=9007199254740992,V=Math.random()*L&2097151?function(){return Hl(Math.random()*L)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(te){var D,x,y,p,g,_=0,S=[],T=new P(s);if(te==null?te=a:rs(te,0,ma),p=MM(te/Wr),m)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(p*=2));_>>11),g>=9e15?(x=crypto.getRandomValues(new Uint32Array(2)),D[_]=x[0],D[_+1]=x[1]):(S.push(g%1e14),_+=2);_=p/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(p*=7);_=9e15?crypto.randomBytes(7).copy(D,_):(S.push(g%1e14),_+=7);_=p/7}else throw m=!1,Error(dc+"crypto unavailable");if(!m)for(;_=10;g/=10,_++);_x-1&&(g[p+1]==null&&(g[p+1]=0),g[p+1]+=g[p]/x|0,g[p]%=x)}return g.reverse()}return function(te,D,x,y,p){var g,_,S,T,I,E,M,A,B=te.indexOf("."),ae=a,W=o;for(B>=0&&(T=v,v=0,te=te.replace(".",""),A=new P(D),E=A.pow(te.length-B),v=T,A.c=V(Ph(Wl(E.c),E.e,"0"),10,x,L),A.e=A.c.length),M=V(te,D,x,p?(g=R,L):(g=L,R)),S=T=M.length;M[--T]==0;M.pop());if(!M[0])return g.charAt(0);if(B<0?--S:(E.c=M,E.e=S,E.s=y,E=e(E,A,ae,W,x),M=E.c,I=E.r,S=E.e),_=S+ae+1,B=M[_],T=x/2,I=I||_<0||M[_+1]!=null,I=W<4?(B!=null||I)&&(W==0||W==(E.s<0?3:2)):B>T||B==T&&(W==4||I||W==6&&M[_-1]&1||W==(E.s<0?8:7)),_<1||!M[0])te=I?Ph(g.charAt(1),-ae,g.charAt(0)):g.charAt(0);else{if(M.length=_,I)for(--x;++M[--_]>x;)M[_]=0,_||(++S,M=[1].concat(M));for(T=M.length;!M[--T];);for(B=0,te="";B<=T;te+=g.charAt(M[B++]));te=Ph(te,S,g.charAt(0))}return te}}(),e=function(){function L(D,x,y){var p,g,_,S,T=0,I=D.length,E=x%n1,M=x/n1|0;for(D=D.slice();I--;)_=D[I]%n1,S=D[I]/n1|0,p=M*_+S*E,g=E*_+p%n1*n1+T,T=(g/y|0)+(p/n1|0)+M*S,D[I]=g%y;return T&&(D=[T].concat(D)),D}function V(D,x,y,p){var g,_;if(y!=p)_=y>p?1:-1;else for(g=_=0;gx[g]?1:-1;break}return _}function te(D,x,y,p){for(var g=0;y--;)D[y]-=g,g=D[y]1;D.splice(0,1));}return function(D,x,y,p,g){var _,S,T,I,E,M,A,B,ae,W,Z,K,ee,re,H,F,q,fe=D.s==x.s?1:-1,pe=D.c,Ee=x.c;if(!pe||!pe[0]||!Ee||!Ee[0])return new P(!D.s||!x.s||(pe?Ee&&pe[0]==Ee[0]:!Ee)?NaN:pe&&pe[0]==0||!Ee?fe*0:fe/0);for(B=new P(fe),ae=B.c=[],S=D.e-x.e,fe=y+S+1,g||(g=Gu,S=ql(D.e/Wr)-ql(x.e/Wr),fe=fe/Wr|0),T=0;Ee[T]==(pe[T]||0);T++);if(Ee[T]>(pe[T]||0)&&S--,fe<0)ae.push(1),I=!0;else{for(re=pe.length,F=Ee.length,T=0,fe+=2,E=Hl(g/(Ee[0]+1)),E>1&&(Ee=L(Ee,E,g),pe=L(pe,E,g),F=Ee.length,re=pe.length),ee=F,W=pe.slice(0,F),Z=W.length;Z=g/2&&H++;do{if(E=0,_=V(Ee,W,F,Z),_<0){if(K=W[0],F!=Z&&(K=K*g+(W[1]||0)),E=Hl(K/H),E>1)for(E>=g&&(E=g-1),M=L(Ee,E,g),A=M.length,Z=W.length;V(M,W,A,Z)==1;)E--,te(M,F=10;fe/=10,T++);G(B,y+(B.e=T+S*Wr-1)+1,p,I)}else B.e=S,B.r=+I;return B}}();function N(L,V,te,D){var x,y,p,g,_;if(te==null?te=o:rs(te,0,8),!L.c)return L.toString();if(x=L.c[0],p=L.e,V==null)_=Wl(L.c),_=D==1||D==2&&(p<=l||p>=u)?hC(_,p):Ph(_,p,"0");else if(L=G(new P(L),V,te),y=L.e,_=Wl(L.c),g=_.length,D==1||D==2&&(V<=y||y<=l)){for(;gg){if(--V>0)for(_+=".";V--;_+="0");}else if(V+=y-g,V>0)for(y+1==g&&(_+=".");V--;_+="0");return L.s<0&&x?"-"+_:_}function $(L,V){for(var te,D,x=1,y=new P(L[0]);x=10;x/=10,D++);return(te=D+te*Wr-1)>h?L.c=L.e=null:te=10;g/=10,x++);if(y=V-x,y<0)y+=Wr,p=V,_=I[S=0],T=Hl(_/E[x-p-1]%10);else if(S=MM((y+1)/Wr),S>=I.length)if(D){for(;I.length<=S;I.push(0));_=T=0,x=1,y%=Wr,p=y-Wr+1}else break e;else{for(_=g=I[S],x=1;g>=10;g/=10,x++);y%=Wr,p=y-Wr+x,T=p<0?0:Hl(_/E[x-p-1]%10)}if(D=D||V<0||I[S+1]!=null||(p<0?_:_%E[x-p-1]),D=te<4?(T||D)&&(te==0||te==(L.s<0?3:2)):T>5||T==5&&(te==4||D||te==6&&(y>0?p>0?_/E[x-p]:0:I[S-1])%10&1||te==(L.s<0?8:7)),V<1||!I[0])return I.length=0,D?(V-=L.e+1,I[0]=E[(Wr-V%Wr)%Wr],L.e=-V||0):I[0]=L.e=0,L;if(y==0?(I.length=S,g=1,S--):(I.length=S+1,g=E[Wr-y],I[S]=p>0?Hl(_/E[x-p]%E[p])*g:0),D)for(;;)if(S==0){for(y=1,p=I[0];p>=10;p/=10,y++);for(p=I[0]+=g,g=1;p>=10;p/=10,g++);y!=g&&(L.e++,I[0]==Gu&&(I[0]=1));break}else{if(I[S]+=g,I[S]!=Gu)break;I[S--]=0,g=1}for(y=I.length;I[--y]===0;I.pop());}L.e>h?L.c=L.e=null:L.e=u?hC(V,te):Ph(V,te,"0"),L.s<0?"-"+V:V)}return i.absoluteValue=i.abs=function(){var L=new P(this);return L.s<0&&(L.s=1),L},i.comparedTo=function(L,V){return tg(this,new P(L,V))},i.decimalPlaces=i.dp=function(L,V){var te,D,x,y=this;if(L!=null)return rs(L,0,ma),V==null?V=o:rs(V,0,8),G(new P(y),L+y.e+1,V);if(!(te=y.c))return null;if(D=((x=te.length-1)-ql(this.e/Wr))*Wr,x=te[x])for(;x%10==0;x/=10,D--);return D<0&&(D=0),D},i.dividedBy=i.div=function(L,V){return e(this,new P(L,V),a,o)},i.dividedToIntegerBy=i.idiv=function(L,V){return e(this,new P(L,V),0,1)},i.exponentiatedBy=i.pow=function(L,V){var te,D,x,y,p,g,_,S,T,I=this;if(L=new P(L),L.c&&!L.isInteger())throw Error(dc+"Exponent not an integer: "+U(L));if(V!=null&&(V=new P(V)),g=L.e>14,!I.c||!I.c[0]||I.c[0]==1&&!I.e&&I.c.length==1||!L.c||!L.c[0])return T=new P(Math.pow(+U(I),g?L.s*(2-dC(L)):+U(L))),V?T.mod(V):T;if(_=L.s<0,V){if(V.c?!V.c[0]:!V.s)return new P(NaN);D=!_&&I.isInteger()&&V.isInteger(),D&&(I=I.mod(V))}else{if(L.e>9&&(I.e>0||I.e<-1||(I.e==0?I.c[0]>1||g&&I.c[1]>=24e7:I.c[0]<8e13||g&&I.c[0]<=9999975e7)))return y=I.s<0&&dC(L)?-0:0,I.e>-1&&(y=1/y),new P(_?1/y:y);v&&(y=MM(v/Wr+2))}for(g?(te=new P(.5),_&&(L.s=1),S=dC(L)):(x=Math.abs(+U(L)),S=x%2),T=new P(s);;){if(S){if(T=T.times(I),!T.c)break;y?T.c.length>y&&(T.c.length=y):D&&(T=T.mod(V))}if(x){if(x=Hl(x/2),x===0)break;S=x%2}else if(L=L.times(te),G(L,L.e+1,1),L.e>14)S=dC(L);else{if(x=+U(L),x===0)break;S=x%2}I=I.times(I),y?I.c&&I.c.length>y&&(I.c.length=y):D&&(I=I.mod(V))}return D?T:(_&&(T=s.div(T)),V?T.mod(V):y?G(T,v,o,p):T)},i.integerValue=function(L){var V=new P(this);return L==null?L=o:rs(L,0,8),G(V,V.e+1,L)},i.isEqualTo=i.eq=function(L,V){return tg(this,new P(L,V))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(L,V){return tg(this,new P(L,V))>0},i.isGreaterThanOrEqualTo=i.gte=function(L,V){return(V=tg(this,new P(L,V)))===1||V===0},i.isInteger=function(){return!!this.c&&ql(this.e/Wr)>this.c.length-2},i.isLessThan=i.lt=function(L,V){return tg(this,new P(L,V))<0},i.isLessThanOrEqualTo=i.lte=function(L,V){return(V=tg(this,new P(L,V)))===-1||V===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(L,V){var te,D,x,y,p=this,g=p.s;if(L=new P(L,V),V=L.s,!g||!V)return new P(NaN);if(g!=V)return L.s=-V,p.plus(L);var _=p.e/Wr,S=L.e/Wr,T=p.c,I=L.c;if(!_||!S){if(!T||!I)return T?(L.s=-V,L):new P(I?p:NaN);if(!T[0]||!I[0])return I[0]?(L.s=-V,L):new P(T[0]?p:o==3?-0:0)}if(_=ql(_),S=ql(S),T=T.slice(),g=_-S){for((y=g<0)?(g=-g,x=T):(S=_,x=I),x.reverse(),V=g;V--;x.push(0));x.reverse()}else for(D=(y=(g=T.length)<(V=I.length))?g:V,g=V=0;V0)for(;V--;T[te++]=0);for(V=Gu-1;D>g;){if(T[--D]=0;){for(te=0,E=K[x]%ae,M=K[x]/ae|0,p=_,y=x+p;y>x;)S=Z[--p]%ae,T=Z[p]/ae|0,g=M*S+T*E,S=E*S+g%ae*ae+A[y]+te,te=(S/B|0)+(g/ae|0)+M*T,A[y--]=S%B;A[y]=te}return te?++D:A.splice(0,1),j(L,A,D)},i.negated=function(){var L=new P(this);return L.s=-L.s||null,L},i.plus=function(L,V){var te,D=this,x=D.s;if(L=new P(L,V),V=L.s,!x||!V)return new P(NaN);if(x!=V)return L.s=-V,D.minus(L);var y=D.e/Wr,p=L.e/Wr,g=D.c,_=L.c;if(!y||!p){if(!g||!_)return new P(x/0);if(!g[0]||!_[0])return _[0]?L:new P(g[0]?D:x*0)}if(y=ql(y),p=ql(p),g=g.slice(),x=y-p){for(x>0?(p=y,te=_):(x=-x,te=g),te.reverse();x--;te.push(0));te.reverse()}for(x=g.length,V=_.length,x-V<0&&(te=_,_=g,g=te,V=x),x=0;V;)x=(g[--V]=g[V]+_[V]+x)/Gu|0,g[V]=Gu===g[V]?0:g[V]%Gu;return x&&(g=[x].concat(g),++p),j(L,g,p)},i.precision=i.sd=function(L,V){var te,D,x,y=this;if(L!=null&&L!==!!L)return rs(L,1,ma),V==null?V=o:rs(V,0,8),G(new P(y),L,V);if(!(te=y.c))return null;if(x=te.length-1,D=x*Wr+1,x=te[x]){for(;x%10==0;x/=10,D--);for(x=te[0];x>=10;x/=10,D++);}return L&&y.e+1>D&&(D=y.e+1),D},i.shiftedBy=function(L){return rs(L,-PM,PM),this.times("1e"+L)},i.squareRoot=i.sqrt=function(){var L,V,te,D,x,y=this,p=y.c,g=y.s,_=y.e,S=a+4,T=new P("0.5");if(g!==1||!p||!p[0])return new P(!g||g<0&&(!p||p[0])?NaN:p?y:1/0);if(g=Math.sqrt(+U(y)),g==0||g==1/0?(V=Wl(p),(V.length+_)%2==0&&(V+="0"),g=Math.sqrt(+V),_=ql((_+1)/2)-(_<0||_%2),g==1/0?V="5e"+_:(V=g.toExponential(),V=V.slice(0,V.indexOf("e")+1)+_),te=new P(V)):te=new P(g+""),te.c[0]){for(_=te.e,g=_+S,g<3&&(g=0);;)if(x=te,te=T.times(x.plus(e(y,x,S,1))),Wl(x.c).slice(0,g)===(V=Wl(te.c)).slice(0,g))if(te.e<_&&--g,V=V.slice(g-3,g+1),V=="9999"||!D&&V=="4999"){if(!D&&(G(x,x.e+a+2,0),x.times(x).eq(y))){te=x;break}S+=4,g+=4,D=1}else{(!+V||!+V.slice(1)&&V.charAt(0)=="5")&&(G(te,te.e+a+2,1),L=!te.times(te).eq(y));break}}return G(te,te.e+a+1,o,L)},i.toExponential=function(L,V){return L!=null&&(rs(L,0,ma),L++),N(this,L,V,1)},i.toFixed=function(L,V){return L!=null&&(rs(L,0,ma),L=L+this.e+1),N(this,L,V)},i.toFormat=function(L,V,te){var D,x=this;if(te==null)L!=null&&V&&typeof V=="object"?(te=V,V=null):L&&typeof L=="object"?(te=L,L=V=null):te=C;else if(typeof te!="object")throw Error(dc+"Argument not an object: "+te);if(D=x.toFixed(L,V),x.c){var y,p=D.split("."),g=+te.groupSize,_=+te.secondaryGroupSize,S=te.groupSeparator||"",T=p[0],I=p[1],E=x.s<0,M=E?T.slice(1):T,A=M.length;if(_&&(y=g,g=_,_=y,A-=y),g>0&&A>0){for(y=A%g||g,T=M.substr(0,y);y0&&(T+=S+M.slice(y)),E&&(T="-"+T)}D=I?T+(te.decimalSeparator||"")+((_=+te.fractionGroupSize)?I.replace(new RegExp("\\d{"+_+"}\\B","g"),"$&"+(te.fractionGroupSeparator||"")):I):T}return(te.prefix||"")+D+(te.suffix||"")},i.toFraction=function(L){var V,te,D,x,y,p,g,_,S,T,I,E,M=this,A=M.c;if(L!=null&&(g=new P(L),!g.isInteger()&&(g.c||g.s!==1)||g.lt(s)))throw Error(dc+"Argument "+(g.isInteger()?"out of range: ":"not an integer: ")+U(g));if(!A)return new P(M);for(V=new P(s),S=te=new P(s),D=_=new P(s),E=Wl(A),y=V.e=E.length-M.e-1,V.c[0]=OM[(p=y%Wr)<0?Wr+p:p],L=!L||g.comparedTo(V)>0?y>0?V:S:g,p=h,h=1/0,g=new P(E),_.c[0]=0;T=e(g,V,0,1),x=te.plus(T.times(D)),x.comparedTo(L)!=1;)te=D,D=x,S=_.plus(T.times(x=S)),_=x,V=g.minus(T.times(x=V)),g=x;return x=e(L.minus(te),D,0,1),_=_.plus(x.times(S)),te=te.plus(x.times(D)),_.s=S.s=M.s,y=y*2,I=e(S,D,y,o).minus(M).abs().comparedTo(e(_,te,y,o).minus(M).abs())<1?[S,D]:[_,te],h=p,I},i.toNumber=function(){return+U(this)},i.toPrecision=function(L,V){return L!=null&&rs(L,1,ma),N(this,L,V,2)},i.toString=function(L){var V,te=this,D=te.s,x=te.e;return x===null?D?(V="Infinity",D<0&&(V="-"+V)):V="NaN":(L==null?V=x<=l||x>=u?hC(Wl(te.c),x):Ph(Wl(te.c),x,"0"):L===10&&k?(te=G(new P(te),a+x+1,o),V=Ph(Wl(te.c),te.e,"0")):(rs(L,2,R.length,"Base"),V=t(Ph(Wl(te.c),x,"0"),10,L,D,!0)),D<0&&te.c[0]&&(V="-"+V)),V},i.valueOf=i.toJSON=function(){return U(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,r!=null&&P.set(r),P}function ql(r){var e=r|0;return r>0||r===e?e:e-1}function Wl(r){for(var e,t,n=1,i=r.length,s=r[0]+"";nu^t?1:-1;for(o=(l=i.length)<(u=s.length)?l:u,a=0;as[a]^t?1:-1;return l==u?0:l>u^t?1:-1}function rs(r,e,t,n){if(rt||r!==Hl(r))throw Error(dc+(n||"Argument")+(typeof r=="number"?rt?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function dC(r){var e=r.c.length-1;return ql(r.e/Wr)==e&&r.c[e]%2!=0}function hC(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function Ph(r,e,t){var n,i;if(e<0){for(i=t+".";++e;i+=t);r=i+r}else if(n=r.length,++e>n){for(i=t,e-=n;--e;i+=t);r+=i}else e{const t="1"+"0".repeat(e),n=new ns(r.toString(10),10);return RM(n.times(t).toString(16))},Oh=(r,e)=>{const t="1"+"0".repeat(e),n=new ns(r.toString(),10);return parseFloat(n.dividedBy(t).toString())},O5e=r=>{typeof r=="string"&&(r=new Uint8Array(It.from(r)));const e=[];let t=BigInt("0x"+It.from(r).toString("hex"));for(;t>BigInt(0);){const n=Number(t%BigInt(58));e.unshift(NM[n]),t=t/BigInt(58)}for(let n=0;n{let e=BigInt(0);for(let i=0;iIt.from(r).toString("utf8"),$5e=r=>It.from(r,"utf8"),B5e=r=>!isNaN(Number(r)),GY=async r=>{await new Promise(e=>setTimeout(e,r))},a6=(r,e)=>JSON.stringify(r)===JSON.stringify(e),L5e=r=>{const[e,t]=r.toExponential().split("e").map(i=>parseFloat(i));let n=(e*Math.pow(10,t)).toString();return n=parseFloat(n).toString(),n},DM=async r=>await new Promise((e,t)=>{let n;typeof window<"u"?n=new WebSocket(r):n=new P5e.WebSocket(r),n.onopen=()=>{e(!0),n.close()},n.onerror=i=>{t(new Error(i.message)),n.close()}}),U5e=Object.freeze(Object.defineProperty({__proto__:null,base58Decode:N5e,base58Encode:O5e,bufferToString:D5e,checkWebSocket:DM,hexToNumber:Oh,isMobile:()=>typeof window>"u"?!1:function(r){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(r.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),isNumeric:B5e,isWebview:()=>{if(typeof window>"u")return!1;const r=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||r.userAgent.match(/WebView/i))return!0;const e=r.standalone,t=r.userAgent.toLowerCase(),n=/safari/.test(t);return/iphone|ipod|ipad/.test(t)?!e&&!n:t.includes("wv")},math:{add:(r,e,t=18)=>parseFloat(new ns(r).plus(new ns(e)).toFixed(t)),sub:(r,e,t=18)=>parseFloat(new ns(r).minus(new ns(e)).toFixed(t)),mul:(r,e,t=18)=>parseFloat(new ns(r).times(new ns(e)).toFixed(t)),div:(r,e,t=18)=>parseFloat(new ns(r).div(new ns(e)).toFixed(t)),pow:(r,e,t=18)=>parseFloat(new ns(r).pow(e).toFixed(t)),sqrt:(r,e=18)=>parseFloat(new ns(r).sqrt().toFixed(e)),abs:(r,e=18)=>parseFloat(new ns(r).absoluteValue().toFixed(e)),ceil:(r,e=18)=>parseFloat(new ns(r).integerValue(ns.ROUND_CEIL).toFixed(e)),floor:(r,e=18)=>parseFloat(new ns(r).integerValue(ns.ROUND_FLOOR).toFixed(e)),round:(r,e=18)=>parseFloat(new ns(r).integerValue(ns.ROUND_HALF_UP).toFixed(e))},numberToHex:s6,objectsEqual:a6,sleep:GY,stringToBuffer:$5e,toHex:RM,toReadableString:L5e},Symbol.toStringTag,{value:"Module"})),pC="6.13.4";function F5e(r,e,t){const n=e.split("|").map(s=>s.trim());for(let s=0;sPromise.resolve(r[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})}function er(r,e,t){for(let n in e){let i=e[n];const s=t?t[n]:null;s&&F5e(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function yw(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(yw).join(", ")+" ]";if(r instanceof Uint8Array){const e="0123456789abcdef";let t="0x";for(let n=0;n>4],t+=e[r[n]&15];return t}if(typeof r=="object"&&typeof r.toJSON=="function")return yw(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"number":return r.toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{ "+e.map(t=>`${yw(t)}: ${yw(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function xs(r,e){return r&&r.code===e}function o6(r){return xs(r,"CALL_EXCEPTION")}function Oi(r,e,t){let n=r;{const s=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${yw(t)}`);for(const a in t){if(a==="shortMessage")continue;const o=t[a];s.push(a+"="+yw(o))}}s.push(`code=${e}`),s.push(`version=${pC}`),s.length&&(r+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(r);break;default:i=new Error(r)}return er(i,{code:e}),t&&Object.assign(i,t),i.shortMessage==null&&er(i,{shortMessage:n}),i}function ze(r,e,t,n){if(!r)throw Oi(e,t,n)}function xe(r,e,t,n){ze(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function mC(r,e,t){t==null&&(t=""),t&&(t=": "+t),ze(r>=e,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:r,expectedCount:e}),ze(r<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:r,expectedCount:e})}const j5e=["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");r.push(e)}catch{}return r},[]);function gC(r){ze(j5e.indexOf(r)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:r}})}function nd(r,e,t){if(t==null&&(t=""),r!==e){let n=t,i="new";t&&(n+=".",i+=" "+t),ze(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function KY(r,e,t){if(r instanceof Uint8Array)return t?new Uint8Array(r):r;if(typeof r=="string"&&r.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((r.length-2)/2);let i=2;for(let s=0;s>4]+ZY[i&15]}return t}function An(r){return"0x"+r.map(e=>bt(e).substring(2)).join("")}function Nh(r){return pi(r,!0)?(r.length-2)/2:Pt(r).length}function mi(r,e,t){const n=Pt(r);return t!=null&&t>n.length&&ze(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),bt(n.slice(e??0,t??n.length))}function JY(r){let e=bt(r).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function YY(r,e,t){const n=Pt(r);ze(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),t?i.set(n,e-n.length):i.set(n,0),bt(i)}function Ha(r,e){return YY(r,e,!0)}function c6(r,e){return YY(r,e,!1)}const bC=BigInt(0),Ku=BigInt(1),_w=9007199254740991;function Ew(r,e){const t=Cw(r,"value"),n=BigInt(Rr(e,"width"));if(ze(t>>n===bC,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Ku){const i=(Ku<=-_w&&r<=_w,"overflow",e||"value",r),BigInt(r);case"string":try{if(r==="")throw new Error("empty string");return r[0]==="-"&&r[1]!=="-"?-BigInt(r.substring(1)):BigInt(r)}catch(t){xe(!1,`invalid BigNumberish string: ${t.message}`,e||"value",r)}}xe(!1,"invalid BigNumberish value",e||"value",r)}function Cw(r,e){const t=ur(r,e);return ze(t>=bC,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}const QY="0123456789abcdef";function rg(r){if(r instanceof Uint8Array){let e="0x0";for(const t of r)e+=QY[t>>4],e+=QY[t&15];return BigInt(e)}return ur(r)}function Rr(r,e){switch(typeof r){case"bigint":return xe(r>=-_w&&r<=_w,"overflow",e||"value",r),Number(r);case"number":return xe(Number.isInteger(r),"underflow",e||"value",r),xe(r>=-_w&&r<=_w,"overflow",e||"value",r),r;case"string":try{if(r==="")throw new Error("empty string");return Rr(BigInt(r),e)}catch(t){xe(!1,`invalid numeric string: ${t.message}`,e||"value",r)}}xe(!1,"invalid numeric value",e||"value",r)}function $M(r){return Rr(rg(r))}function Zu(r,e){let n=Cw(r,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Rr(e,"width");for(ze(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:r});n.length>6===2;a++)s++;return s}return r==="OVERRUN"?t.length-e-1:0}function W5e(r,e,t,n,i){return r==="OVERLONG"?(xe(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),XY(r,e,t))}const jM=Object.freeze({error:q5e,ignore:XY,replace:W5e});function eQ(r,e){e==null&&(e=jM.error);const t=Pt(r,"bytes"),n=[];let i=0;for(;i>7)){n.push(s);continue}let a=null,o=null;if((s&224)===192)a=1,o=127;else if((s&240)===224)a=2,o=2047;else if((s&248)===240)a=3,o=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,t,n):i+=e("BAD_PREFIX",i-1,t,n);continue}if(i-1+a>=t.length){i+=e("OVERRUN",i-1,t,n);continue}let l=s&(1<<8-a-1)-1;for(let u=0;u1114111){i+=e("OUT_OF_RANGE",i-1-a,t,n,l);continue}if(l>=55296&&l<=57343){i+=e("UTF16_SURROGATE",i-1-a,t,n,l);continue}if(l<=o){i+=e("OVERLONG",i-1-a,t,n,l);continue}n.push(l)}}return n}function zs(r,e){xe(typeof r=="string","invalid string value","str",r),e!=null&&(gC(e),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);xe(n>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return new Uint8Array(t)}function V5e(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Bh(r,e){return V5e(eQ(r,e))}function tQ(r,e){return eQ(zs(r,e))}function rQ(r){async function e(t,n){ze(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();ze(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ze(i==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const a=new AbortController,o=setTimeout(()=>{s=Oi("request timeout","TIMEOUT"),a.abort()},t.timeout);n&&n.addListener(()=>{s=Oi("request cancelled","CANCELLED"),a.abort()});const l={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:a.signal};let u;try{u=await fetch(t.url,l)}catch(b){throw clearTimeout(o),s||b}clearTimeout(o);const f={};u.headers.forEach((b,v)=>{f[v.toLowerCase()]=b});const h=await u.arrayBuffer(),m=h==null?null:new Uint8Array(h);return{statusCode:u.status,statusMessage:u.statusText,headers:f,body:m}}return e}const G5e=12,K5e=250;let nQ=rQ();const Z5e=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),J5e=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let zM=!1;async function iQ(r,e){try{const t=r.match(Z5e);if(!t)throw new Error("invalid data");return new id(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?UM(t[3]):Y5e(t[3]))}catch{return new id(599,"BAD REQUEST (invalid data: URI)",{},null,new ga(r))}}function sQ(r){async function e(t,n){try{const i=t.match(J5e);if(!i)throw new Error("invalid link");return new ga(`${r}${i[2]}`)}catch{return new id(599,"BAD REQUEST (invalid IPFS URI)",{},null,new ga(t))}}return e}const _C={data:iQ,ipfs:sQ("https://gateway.ipfs.io/ipfs/")},aQ=new WeakMap;class HM{constructor(e){$e(this,w2);$e(this,_m);ge(this,w2,[]),ge(this,_m,!1),aQ.set(e,()=>{if(!se(this,_m)){ge(this,_m,!0);for(const t of se(this,w2))setTimeout(()=>{t()},0);ge(this,w2,[])}})}addListener(e){ze(!se(this,_m),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),se(this,w2).push(e)}get cancelled(){return se(this,_m)}checkSignal(){ze(!this.cancelled,"cancelled","CANCELLED",{})}}w2=new WeakMap,_m=new WeakMap;function EC(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}const DR=class DR{constructor(e){$e(this,E2);$e(this,N5);$e(this,D5);$e(this,kf);$e(this,K0);$e(this,$5);$e(this,B5);$e(this,Fa);$e(this,bl);$e(this,Z0);$e(this,y2);$e(this,x2);$e(this,_2);$e(this,uh);$e(this,Rf);$e(this,Em);ge(this,B5,String(e)),ge(this,N5,!1),ge(this,D5,!0),ge(this,kf,{}),ge(this,K0,""),ge(this,$5,3e5),ge(this,Rf,{slotInterval:K5e,maxAttempts:G5e}),ge(this,Em,null)}get url(){return se(this,B5)}set url(e){ge(this,B5,String(e))}get body(){return se(this,Fa)==null?null:new Uint8Array(se(this,Fa))}set body(e){if(e==null)ge(this,Fa,void 0),ge(this,bl,void 0);else if(typeof e=="string")ge(this,Fa,zs(e)),ge(this,bl,"text/plain");else if(e instanceof Uint8Array)ge(this,Fa,e),ge(this,bl,"application/octet-stream");else if(typeof e=="object")ge(this,Fa,zs(JSON.stringify(e))),ge(this,bl,"application/json");else throw new Error("invalid body")}hasBody(){return se(this,Fa)!=null}get method(){return se(this,K0)?se(this,K0):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),ge(this,K0,String(e).toUpperCase())}get headers(){const e=Object.assign({},se(this,kf));return se(this,Z0)&&(e.authorization=`Basic ${FM(zs(se(this,Z0)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&se(this,bl)&&(e["content-type"]=se(this,bl)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){se(this,kf)[String(e).toLowerCase()]=String(t)}clearHeaders(){ge(this,kf,{})}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),ge(this,$5,e)}get preflightFunc(){return se(this,y2)||null}set preflightFunc(e){ge(this,y2,e)}get processFunc(){return se(this,x2)||null}set processFunc(e){ge(this,x2,e)}get retryFunc(){return se(this,_2)||null}set retryFunc(e){ge(this,_2,e)}get getUrlFunc(){return se(this,Em)||nQ}set getUrlFunc(e){ge(this,Em,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(se(this,Rf).slotInterval=e.slotInterval),e.maxAttempts!=null&&(se(this,Rf).maxAttempts=e.maxAttempts)}send(){return ze(se(this,uh)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),ge(this,uh,new HM(this)),nt(this,E2,EE).call(this,0,oQ()+this.timeout,0,this,new id(0,"",{},null,this))}cancel(){ze(se(this,uh)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=aQ.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();ze(this.method==="GET"&&(t!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new DR(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,ge(i,kf,Object.assign({},se(this,kf))),se(this,Fa)&&ge(i,Fa,new Uint8Array(se(this,Fa))),ge(i,bl,se(this,bl)),i}clone(){const e=new DR(this.url);return ge(e,K0,se(this,K0)),se(this,Fa)&&ge(e,Fa,se(this,Fa)),ge(e,bl,se(this,bl)),ge(e,kf,Object.assign({},se(this,kf))),ge(e,Z0,se(this,Z0)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),ge(e,y2,se(this,y2)),ge(e,x2,se(this,x2)),ge(e,_2,se(this,_2)),ge(e,Rf,Object.assign({},se(this,Rf))),ge(e,Em,se(this,Em)),e}static lockConfig(){zM=!0}static getGateway(e){return _C[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(zM)throw new Error("gateways locked");_C[e]=t}static registerGetUrl(e){if(zM)throw new Error("gateways locked");nQ=e}static createGetUrlFunc(e){return rQ()}static createDataGateway(){return iQ}static createIpfsGatewayFunc(e){return sQ(e)}};N5=new WeakMap,D5=new WeakMap,kf=new WeakMap,K0=new WeakMap,$5=new WeakMap,B5=new WeakMap,Fa=new WeakMap,bl=new WeakMap,Z0=new WeakMap,y2=new WeakMap,x2=new WeakMap,_2=new WeakMap,uh=new WeakMap,Rf=new WeakMap,Em=new WeakMap,E2=new WeakSet,EE=async function(e,t,n,i,s){var f,h,m;if(e>=se(this,Rf).maxAttempts)return s.makeServerError("exceeded maximum retry limit");ze(oQ()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Q5e(n);let a=this.clone();const o=(a.url.split(":")[0]||"").toLowerCase();if(o in _C){const b=await _C[o](a.url,EC(se(i,uh)));if(b instanceof id){let v=b;if(this.processFunc){EC(se(i,uh));try{v=await this.processFunc(a,v)}catch(C){(C.throttle==null||typeof C.stall!="number")&&v.makeServerError("error in post-processing function",C).assertOk()}}return v}a=b}this.preflightFunc&&(a=await this.preflightFunc(a));const l=await this.getUrlFunc(a,EC(se(i,uh)));let u=new id(l.statusCode,l.statusMessage,l.headers,l.body,i);if(u.statusCode===301||u.statusCode===302){try{const b=u.headers.location||"";return nt(f=a.redirect(b),E2,EE).call(f,e+1,t,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,u,e))){const b=u.headers["retry-after"];let v=se(this,Rf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof b=="string"&&b.match(/^[1-9][0-9]*$/)&&(v=parseInt(b)),nt(h=a.clone(),E2,EE).call(h,e+1,t,v,i,u)}if(this.processFunc){EC(se(i,uh));try{u=await this.processFunc(a,u)}catch(b){(b.throttle==null||typeof b.stall!="number")&&u.makeServerError("error in post-processing function",b).assertOk();let v=se(this,Rf).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return b.stall>=0&&(v=b.stall),nt(m=a.clone(),E2,EE).call(m,e+1,t,v,i,u)}}return u};let ga=DR;const RH=class RH{constructor(e,t,n,i,s){$e(this,Q7);$e(this,X7);$e(this,e9);$e(this,vl);$e(this,L5);$e(this,C2);ge(this,Q7,e),ge(this,X7,t),ge(this,e9,Object.keys(n).reduce((a,o)=>(a[o.toLowerCase()]=String(n[o]),a),{})),ge(this,vl,i==null?null:new Uint8Array(i)),ge(this,L5,s||null),ge(this,C2,{message:""})}toString(){return``}get statusCode(){return se(this,Q7)}get statusMessage(){return se(this,X7)}get headers(){return Object.assign({},se(this,e9))}get body(){return se(this,vl)==null?null:new Uint8Array(se(this,vl))}get bodyText(){try{return se(this,vl)==null?"":Bh(se(this,vl))}catch{ze(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ze(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw er(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return se(this,vl)!=null}get request(){return se(this,L5)}ok(){return se(this,C2).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=se(this,C2);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{se(this,vl)&&(i=Bh(se(this,vl)))}catch{}ze(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Q7=new WeakMap,X7=new WeakMap,e9=new WeakMap,vl=new WeakMap,L5=new WeakMap,C2=new WeakMap;let id=RH;function oQ(){return new Date().getTime()}function Y5e(r){return zs(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Q5e(r){return new Promise(e=>setTimeout(e,r))}const X5e=BigInt(-1),Ju=BigInt(0),Aw=BigInt(1),e4e=BigInt(5),Sw={};let Iw="0000";for(;Iw.length<80;)Iw+=Iw;function ng(r){let e=Iw;for(;e.length=-i&&rJu?r=Ew(Dh(r,n),n):r=-Ew(Dh(-r,n),n)}else{const i=Aw<=0&&rs[o]==null?u:(xe(typeof s[o]===l,"invalid fixed format ("+o+" not "+l+")","format."+o,s[o]),s[o]);e=a("signed","boolean",e),t=a("width","number",t),n=a("decimals","number",n)}xe(t%8===0,"invalid FixedNumber width (not byte aligned)","format.width",t),xe(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(t)+"x"+String(n);return{signed:e,width:t,decimals:n,name:i}}function t4e(r,e){let t="";r0?n*=ng(i):i<0&&(t*=ng(-i)),tn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=se(this,yi);return se(this,yi)Ju&&(e+=se(this,Xo)-Aw),e=se(this,yi)/se(this,Xo)*se(this,Xo),nt(this,ti,Yp).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=e4e*ng(t-1);let i=this.value+n;const s=ng(t);return i=i/s*s,u6(i,se(this,Mf),"round"),new Cm(Sw,i,se(this,Mf))}isZero(){return se(this,yi)===Ju}isNegative(){return se(this,yi)0){const l=ng(o);ze(a%l===Ju,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),a/=l}else o<0&&(a*=ng(-o));return u6(a,s,"fromValue"),new Cm(Sw,a,s)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);xe(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=qM(t);let s=n[2]||"0",a=n[3]||"";for(;a.length{ze(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[e]>=248){const n=r[e]-247;t(e+1+n);const i=cQ(r,e+1,n);return t(e+1+n+i),lQ(r,e,e+1+n,n+i)}else if(r[e]>=192){const n=r[e]-192;return t(e+1+n),lQ(r,e,e+1,n)}else if(r[e]>=184){const n=r[e]-183;t(e+1+n);const i=cQ(r,e+1,n);t(e+1+n+i);const s=bt(r.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(r[e]>=128){const n=r[e]-128;t(e+1+n);const i=bt(r.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:r4e(r[e])}}function kw(r){const e=Pt(r,"data"),t=uQ(e,0);return xe(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function fQ(r){const e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function dQ(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(dQ(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=fQ(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(Pt(r,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=fQ(e.length);return t.unshift(183+t.length),t.concat(e)}const hQ="0123456789abcdef";function Lh(r){let e="0x";for(const t of dQ(r))e+=hQ[t>>4],e+=hQ[t&15];return e}const pQ=["wei","kwei","mwei","gwei","szabo","finney","ether"];function CC(r,e){let t=18;if(typeof e=="string"){const n=pQ.indexOf(e);xe(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Rr(e,"unit"));return Tw.fromValue(r,t,{decimals:t,width:512}).toString()}function AC(r,e){xe(typeof r=="string","value must be a string","value",r);let t=18;if(typeof e=="string"){const n=pQ.indexOf(e);xe(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Rr(e,"unit"));return Tw.fromString(r,{decimals:t,width:512}).value}function WM(r){return CC(r,18)}function mQ(r){return AC(r,18)}function VM(r){const e=Pt(r,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=bt(e);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")}const $o=32,GM=new Uint8Array($o),n4e=["then"],SC={},gQ=new WeakMap;function ig(r){return gQ.get(r)}function bQ(r,e){gQ.set(r,e)}function f6(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}function KM(r,e,t){return r.indexOf(null)>=0?e.map((n,i)=>n instanceof i1?KM(ig(n),n,t):n):r.reduce((n,i,s)=>{let a=e.getValue(i);return i in n||(t&&a instanceof i1&&(a=KM(ig(a),a,t)),n[i]=a),n},{})}const F5=class F5 extends Array{constructor(...t){const n=t[0];let i=t[1],s=(t[2]||[]).slice(),a=!0;n!==SC&&(i=t,s=[],a=!1);super(i.length);$e(this,U5);i.forEach((u,f)=>{this[f]=u});const o=s.reduce((u,f)=>(typeof f=="string"&&u.set(f,(u.get(f)||0)+1),u),new Map);if(bQ(this,Object.freeze(i.map((u,f)=>{const h=s[f];return h!=null&&o.get(h)===1?h:null}))),ge(this,U5,[]),se(this,U5)==null&&se(this,U5),!a)return;Object.freeze(this);const l=new Proxy(this,{get:(u,f,h)=>{if(typeof f=="string"){if(f.match(/^[0-9]+$/)){const b=Rr(f,"%index");if(b<0||b>=this.length)throw new RangeError("out of result range");const v=u[b];return v instanceof Error&&f6(`index ${b}`,v),v}if(n4e.indexOf(f)>=0)return Reflect.get(u,f,h);const m=u[f];if(m instanceof Function)return function(...b){return m.apply(this===h?u:this,b)};if(!(f in u))return u.getValue.apply(this===h?u:this,[f])}return Reflect.get(u,f,h)}});return bQ(l,ig(this)),l}toArray(t){const n=[];return this.forEach((i,s)=>{i instanceof Error&&f6(`index ${s}`,i),t&&i instanceof F5&&(i=i.toArray(t)),n.push(i)}),n}toObject(t){const n=ig(this);return n.reduce((i,s,a)=>(ze(s!=null,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),KM(n,this,t)),{})}slice(t,n){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=ig(this),s=[],a=[];for(let o=t;o{se(this,J0)[e]=wQ(t)}}}J0=new WeakMap,A2=new WeakMap,j5=new WeakSet,zR=function(e){return se(this,J0).push(e),ge(this,A2,se(this,A2)+e.length),e.length};const MH=class MH{constructor(e,t,n){$e(this,T2);Ae(this,"allowLoose");$e(this,Uc);$e(this,wl);$e(this,S2);$e(this,I2);$e(this,Am);er(this,{allowLoose:!!t}),ge(this,Uc,Js(e)),ge(this,S2,0),ge(this,I2,null),ge(this,Am,n??1024),ge(this,wl,0)}get data(){return bt(se(this,Uc))}get dataLength(){return se(this,Uc).length}get consumed(){return se(this,wl)}get bytes(){return new Uint8Array(se(this,Uc))}subReader(e){const t=new MH(se(this,Uc).slice(se(this,wl)+e),this.allowLoose,se(this,Am));return ge(t,I2,this),t}readBytes(e,t){let n=nt(this,T2,Ave).call(this,0,e,!!t);return nt(this,T2,wJ).call(this,e),ge(this,wl,se(this,wl)+n.length),n.slice(0,e)}readValue(){return rg(this.readBytes($o))}readIndex(){return $M(this.readBytes($o))}};Uc=new WeakMap,wl=new WeakMap,S2=new WeakMap,I2=new WeakMap,Am=new WeakMap,T2=new WeakSet,wJ=function(e){var t;if(se(this,I2))return nt(t=se(this,I2),T2,wJ).call(t,e);ge(this,S2,se(this,S2)+e),ze(se(this,Am)<1||se(this,S2)<=se(this,Am)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${se(this,Am)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Js(se(this,Uc)),offset:se(this,wl),length:e,info:{bytesRead:se(this,S2),dataLength:this.dataLength}})},Ave=function(e,t,n){let i=Math.ceil(t/$o)*$o;return se(this,wl)+i>se(this,Uc).length&&(this.allowLoose&&n&&se(this,wl)+t<=se(this,Uc).length?i=t:ze(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Js(se(this,Uc)),length:se(this,Uc).length,offset:se(this,wl)+i})),se(this,Uc).slice(se(this,wl),se(this,wl)+i)};let JM=MH;function Wc(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function YM(r,...e){if(!(r instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function yQ(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Wc(r.outputLen),Wc(r.blockLen)}function Rw(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function xQ(r,e){YM(r);const t=e.outputLen;if(r.lengthr instanceof Uint8Array,IC=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),TC=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),sd=(r,e)=>r<<32-e|r>>>e;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const i4e=async()=>{};async function EQ(r,e,t){let n=Date.now();for(let i=0;i=0&&sn+i.length,0));let t=0;return r.forEach(n=>{if(!_Q(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}let XM=class{clone(){return this._cloneInto()}};const o4e={}.toString;function CQ(r,e){if(e!==void 0&&o4e.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(r,e)}function kC(r){const e=n=>r().update(Mw(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function c4e(r=32){if(QM&&typeof QM.getRandomValues=="function")return QM.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}let AQ=class extends XM{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,yQ(e);const n=Mw(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let a=0;anew AQ(r,e).update(t).digest();RC.create=(r,e)=>new AQ(r,e);function l4e(r,e,t,n){yQ(r);const i=CQ({dkLen:32,asyncTick:10},n),{c:s,dkLen:a,asyncTick:o}=i;if(Wc(s),Wc(a),Wc(o),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=Mw(e),u=Mw(t),f=new Uint8Array(a),h=RC.create(r,l),m=h._cloneInto().update(u);return{c:s,dkLen:a,asyncTick:o,DK:f,PRF:h,PRFSalt:m}}function u4e(r,e,t,n,i){return r.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),t}function eP(r,e,t,n){const{c:i,dkLen:s,DK:a,PRF:o,PRFSalt:l}=l4e(r,e,t,n);let u;const f=new Uint8Array(4),h=TC(f),m=new Uint8Array(o.outputLen);for(let b=1,v=0;v>i&s),o=Number(t&s),l=n?4:0,u=n?0:4;r.setUint32(e+l,a,n),r.setUint32(e+u,o,n)}class tP extends XM{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=TC(this.buffer)}update(e){Rw(this);const{view:t,buffer:n,blockLen:i}=this;e=Mw(e);const s=e.length;for(let a=0;ai-a&&(this.process(n,0),a=0);for(let h=a;hf.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;hr&e^~r&t,h4e=(r,e,t)=>r&e^r&t^e&t,p4e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a1=new Uint32Array(64);let m4e=class extends tP{constructor(){super(64,32,8,!1),this.A=s1[0]|0,this.B=s1[1]|0,this.C=s1[2]|0,this.D=s1[3]|0,this.E=s1[4]|0,this.F=s1[5]|0,this.G=s1[6]|0,this.H=s1[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:a,G:o,H:l}=this;return[e,t,n,i,s,a,o,l]}set(e,t,n,i,s,a,o,l){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=a|0,this.G=o|0,this.H=l|0}process(e,t){for(let h=0;h<16;h++,t+=4)a1[h]=e.getUint32(t,!1);for(let h=16;h<64;h++){const m=a1[h-15],b=a1[h-2],v=sd(m,7)^sd(m,18)^m>>>3,C=sd(b,17)^sd(b,19)^b>>>10;a1[h]=C+a1[h-7]+v+a1[h-16]|0}let{A:n,B:i,C:s,D:a,E:o,F:l,G:u,H:f}=this;for(let h=0;h<64;h++){const m=sd(o,6)^sd(o,11)^sd(o,25),b=f+m+d4e(o,l,u)+p4e[h]+a1[h]|0,C=(sd(n,2)^sd(n,13)^sd(n,22))+h4e(n,i,s)|0;f=u,u=l,l=o,o=a+b|0,a=s,s=i,i=n,n=b+C|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,a=a+this.D|0,o=o+this.E|0,l=l+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,s,a,o,l,u,f)}roundClean(){a1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Pw=kC(()=>new m4e),MC=BigInt(2**32-1),rP=BigInt(32);function SQ(r,e=!1){return e?{h:Number(r&MC),l:Number(r>>rP&MC)}:{h:Number(r>>rP&MC)|0,l:Number(r&MC)|0}}function IQ(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;iBigInt(r>>>0)<>>0),b4e=(r,e,t)=>r>>>t,v4e=(r,e,t)=>r<<32-t|e>>>t,w4e=(r,e,t)=>r>>>t|e<<32-t,y4e=(r,e,t)=>r<<32-t|e>>>t,x4e=(r,e,t)=>r<<64-t|e>>>t-32,_4e=(r,e,t)=>r>>>t-32|e<<64-t,E4e=(r,e)=>e,C4e=(r,e)=>r,TQ=(r,e,t)=>r<>>32-t,kQ=(r,e,t)=>e<>>32-t,RQ=(r,e,t)=>e<>>64-t,MQ=(r,e,t)=>r<>>64-t;function A4e(r,e,t,n){const i=(e>>>0)+(n>>>0);return{h:r+t+(i/2**32|0)|0,l:i|0}}const nn={fromBig:SQ,split:IQ,toBig:g4e,shrSH:b4e,shrSL:v4e,rotrSH:w4e,rotrSL:y4e,rotrBH:x4e,rotrBL:_4e,rotr32H:E4e,rotr32L:C4e,rotlSH:TQ,rotlSL:kQ,rotlBH:RQ,rotlBL:MQ,add:A4e,add3L:(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),add3H:(r,e,t,n)=>e+t+n+(r/2**32|0)|0,add4L:(r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),add4H:(r,e,t,n,i)=>e+t+n+i+(r/2**32|0)|0,add5H:(r,e,t,n,i,s)=>e+t+n+i+s+(r/2**32|0)|0,add5L:(r,e,t,n,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0)},[S4e,I4e]=nn.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),o1=new Uint32Array(80),c1=new Uint32Array(80);let T4e=class extends tP{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:i,Ch:s,Cl:a,Dh:o,Dl:l,Eh:u,El:f,Fh:h,Fl:m,Gh:b,Gl:v,Hh:C,Hl:R}=this;return[e,t,n,i,s,a,o,l,u,f,h,m,b,v,C,R]}set(e,t,n,i,s,a,o,l,u,f,h,m,b,v,C,R){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=a|0,this.Dh=o|0,this.Dl=l|0,this.Eh=u|0,this.El=f|0,this.Fh=h|0,this.Fl=m|0,this.Gh=b|0,this.Gl=v|0,this.Hh=C|0,this.Hl=R|0}process(e,t){for(let N=0;N<16;N++,t+=4)o1[N]=e.getUint32(t),c1[N]=e.getUint32(t+=4);for(let N=16;N<80;N++){const $=o1[N-15]|0,j=c1[N-15]|0,G=nn.rotrSH($,j,1)^nn.rotrSH($,j,8)^nn.shrSH($,j,7),U=nn.rotrSL($,j,1)^nn.rotrSL($,j,8)^nn.shrSL($,j,7),L=o1[N-2]|0,V=c1[N-2]|0,te=nn.rotrSH(L,V,19)^nn.rotrBH(L,V,61)^nn.shrSH(L,V,6),D=nn.rotrSL(L,V,19)^nn.rotrBL(L,V,61)^nn.shrSL(L,V,6),x=nn.add4L(U,D,c1[N-7],c1[N-16]),y=nn.add4H(x,G,te,o1[N-7],o1[N-16]);o1[N]=y|0,c1[N]=x|0}let{Ah:n,Al:i,Bh:s,Bl:a,Ch:o,Cl:l,Dh:u,Dl:f,Eh:h,El:m,Fh:b,Fl:v,Gh:C,Gl:R,Hh:k,Hl:P}=this;for(let N=0;N<80;N++){const $=nn.rotrSH(h,m,14)^nn.rotrSH(h,m,18)^nn.rotrBH(h,m,41),j=nn.rotrSL(h,m,14)^nn.rotrSL(h,m,18)^nn.rotrBL(h,m,41),G=h&b^~h&C,U=m&v^~m&R,L=nn.add5L(P,j,U,I4e[N],c1[N]),V=nn.add5H(L,k,$,G,S4e[N],o1[N]),te=L|0,D=nn.rotrSH(n,i,28)^nn.rotrBH(n,i,34)^nn.rotrBH(n,i,39),x=nn.rotrSL(n,i,28)^nn.rotrBL(n,i,34)^nn.rotrBL(n,i,39),y=n&s^n&o^s&o,p=i&a^i&l^a&l;k=C|0,P=R|0,C=b|0,R=v|0,b=h|0,v=m|0,{h,l:m}=nn.add(u|0,f|0,V|0,te|0),u=o|0,f=l|0,o=s|0,l=a|0,s=n|0,a=i|0;const g=nn.add3L(te,x,p);n=nn.add3H(g,V,D,y),i=g|0}({h:n,l:i}=nn.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:a}=nn.add(this.Bh|0,this.Bl|0,s|0,a|0),{h:o,l}=nn.add(this.Ch|0,this.Cl|0,o|0,l|0),{h:u,l:f}=nn.add(this.Dh|0,this.Dl|0,u|0,f|0),{h,l:m}=nn.add(this.Eh|0,this.El|0,h|0,m|0),{h:b,l:v}=nn.add(this.Fh|0,this.Fl|0,b|0,v|0),{h:C,l:R}=nn.add(this.Gh|0,this.Gl|0,C|0,R|0),{h:k,l:P}=nn.add(this.Hh|0,this.Hl|0,k|0,P|0),this.set(n,i,s,a,o,l,u,f,h,m,b,v,C,R,k,P)}roundClean(){o1.fill(0),c1.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const nP=kC(()=>new T4e);function k4e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof sr<"u")return sr;throw new Error("unable to locate global object")}const PQ=k4e(),OQ=PQ.crypto||PQ.msCrypto;function NQ(r){switch(r){case"sha256":return Pw.create();case"sha512":return nP.create()}xe(!1,"invalid hashing algorithm name","algorithm",r)}function R4e(r,e){const t={sha256:Pw,sha512:nP}[r];return xe(t!=null,"invalid hmac algorithm","algorithm",r),RC.create(t,e)}function M4e(r,e,t,n,i){const s={sha256:Pw,sha512:nP}[i];return xe(s!=null,"invalid pbkdf2 algorithm","algorithm",i),eP(s,r,e,{c:t,dkLen:n})}function P4e(r){ze(OQ!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),xe(Number.isInteger(r)&&r>0&&r<=1024,"invalid length","length",r);const e=new Uint8Array(r);return OQ.getRandomValues(e),e}let DQ=!1;const $Q=function(r,e,t){return R4e(r,e).update(t).digest()};let BQ=$Q;function Fh(r,e,t){const n=Pt(e,"key"),i=Pt(t,"data");return bt(BQ(r,n,i))}Fh._=$Q,Fh.lock=function(){DQ=!0},Fh.register=function(r){if(DQ)throw new Error("computeHmac is locked");BQ=r},Object.freeze(Fh);const[LQ,UQ,FQ]=[[],[],[]],O4e=BigInt(0),d6=BigInt(1),N4e=BigInt(2),D4e=BigInt(7),$4e=BigInt(256),B4e=BigInt(113);for(let r=0,e=d6,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],LQ.push(2*(5*n+t)),UQ.push((r+1)*(r+2)/2%64);let i=O4e;for(let s=0;s<7;s++)e=(e<>D4e)*B4e)%$4e,e&N4e&&(i^=d6<<(d6<t>32?RQ(r,e,t):TQ(r,e,t),zQ=(r,e,t)=>t>32?MQ(r,e,t):kQ(r,e,t);function F4e(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)t[a]=r[a]^r[a+10]^r[a+20]^r[a+30]^r[a+40];for(let a=0;a<10;a+=2){const o=(a+8)%10,l=(a+2)%10,u=t[l],f=t[l+1],h=jQ(u,f,1)^t[o],m=zQ(u,f,1)^t[o+1];for(let b=0;b<50;b+=10)r[a+b]^=h,r[a+b+1]^=m}let i=r[2],s=r[3];for(let a=0;a<24;a++){const o=UQ[a],l=jQ(i,s,o),u=zQ(i,s,o),f=LQ[a];i=r[f],s=r[f+1],r[f]=l,r[f+1]=u}for(let a=0;a<50;a+=10){for(let o=0;o<10;o++)t[o]=r[a+o];for(let o=0;o<10;o++)r[a+o]^=~t[(o+2)%10]&t[(o+4)%10]}r[0]^=L4e[n],r[1]^=U4e[n]}t.fill(0)}let j4e=class Sve extends XM{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Wc(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=IC(this.state)}keccak(){F4e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Rw(this);const{blockLen:t,state:n}=this;e=Mw(e);const i=e.length;for(let s=0;s=n&&this.keccak();const a=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Wc(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(xQ(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new Sve(t,n,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const z4e=((r,e,t)=>kC(()=>new j4e(e,r,t)))(1,136,256/8);let HQ=!1;const qQ=function(r){return z4e(r)};let WQ=qQ;function gi(r){const e=Pt(r,"data");return bt(WQ(e))}gi._=qQ,gi.lock=function(){HQ=!0},gi.register=function(r){if(HQ)throw new TypeError("keccak256 is locked");WQ=r},Object.freeze(gi);const H4e=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),VQ=Uint8Array.from({length:16},(r,e)=>e),q4e=VQ.map(r=>(9*r+5)%16);let iP=[VQ],sP=[q4e];for(let r=0;r<4;r++)for(let e of[iP,sP])e.push(e[r].map(t=>H4e[t]));const GQ=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(r=>new Uint8Array(r)),W4e=iP.map((r,e)=>r.map(t=>GQ[e][t])),V4e=sP.map((r,e)=>r.map(t=>GQ[e][t])),G4e=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),K4e=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),PC=(r,e)=>r<>>32-e;function KQ(r,e,t,n){return r===0?e^t^n:r===1?e&t|~e&n:r===2?(e|~t)^n:r===3?e&n|t&~n:e^(t|~n)}const OC=new Uint32Array(16);let Z4e=class extends tP{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:n,h3:i,h4:s}=this;return[e,t,n,i,s]}set(e,t,n,i,s){this.h0=e|0,this.h1=t|0,this.h2=n|0,this.h3=i|0,this.h4=s|0}process(e,t){for(let b=0;b<16;b++,t+=4)OC[b]=e.getUint32(t,!0);let n=this.h0|0,i=n,s=this.h1|0,a=s,o=this.h2|0,l=o,u=this.h3|0,f=u,h=this.h4|0,m=h;for(let b=0;b<5;b++){const v=4-b,C=G4e[b],R=K4e[b],k=iP[b],P=sP[b],N=W4e[b],$=V4e[b];for(let j=0;j<16;j++){const G=PC(n+KQ(b,s,o,u)+OC[k[j]]+C,N[j])+h|0;n=h,h=u,u=PC(o,10)|0,o=s,s=G}for(let j=0;j<16;j++){const G=PC(i+KQ(v,a,l,f)+OC[P[j]]+R,$[j])+m|0;i=m,m=f,f=PC(l,10)|0,l=a,a=G}}this.set(this.h1+o+f|0,this.h2+u+m|0,this.h3+h+i|0,this.h4+n+a|0,this.h0+s+l|0)}roundClean(){OC.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};const J4e=kC(()=>new Z4e);let ZQ=!1;const JQ=function(r){return J4e(r)};let YQ=JQ;function jh(r){const e=Pt(r,"data");return bt(YQ(e))}jh._=JQ,jh.lock=function(){ZQ=!0},jh.register=function(r){if(ZQ)throw new TypeError("ripemd160 is locked");YQ=r},Object.freeze(jh);let QQ=!1;const XQ=function(r,e,t,n,i){return M4e(r,e,t,n,i)};let eX=XQ;function Yu(r,e,t,n,i){const s=Pt(r,"password"),a=Pt(e,"salt");return bt(eX(s,a,t,n,i))}Yu._=XQ,Yu.lock=function(){QQ=!0},Yu.register=function(r){if(QQ)throw new Error("pbkdf2 is locked");eX=r},Object.freeze(Yu);let tX=!1;const rX=function(r){return new Uint8Array(P4e(r))};let nX=rX;function Vc(r){return nX(r)}Vc._=rX,Vc.lock=function(){tX=!0},Vc.register=function(r){if(tX)throw new Error("randomBytes is locked");nX=r},Object.freeze(Vc);const $n=(r,e)=>r<>>32-e;function iX(r,e,t,n,i,s){let a=r[e++]^t[n++],o=r[e++]^t[n++],l=r[e++]^t[n++],u=r[e++]^t[n++],f=r[e++]^t[n++],h=r[e++]^t[n++],m=r[e++]^t[n++],b=r[e++]^t[n++],v=r[e++]^t[n++],C=r[e++]^t[n++],R=r[e++]^t[n++],k=r[e++]^t[n++],P=r[e++]^t[n++],N=r[e++]^t[n++],$=r[e++]^t[n++],j=r[e++]^t[n++],G=a,U=o,L=l,V=u,te=f,D=h,x=m,y=b,p=v,g=C,_=R,S=k,T=P,I=N,E=$,M=j;for(let A=0;A<8;A+=2)te^=$n(G+T|0,7),p^=$n(te+G|0,9),T^=$n(p+te|0,13),G^=$n(T+p|0,18),g^=$n(D+U|0,7),I^=$n(g+D|0,9),U^=$n(I+g|0,13),D^=$n(U+I|0,18),E^=$n(_+x|0,7),L^=$n(E+_|0,9),x^=$n(L+E|0,13),_^=$n(x+L|0,18),V^=$n(M+S|0,7),y^=$n(V+M|0,9),S^=$n(y+V|0,13),M^=$n(S+y|0,18),U^=$n(G+V|0,7),L^=$n(U+G|0,9),V^=$n(L+U|0,13),G^=$n(V+L|0,18),x^=$n(D+te|0,7),y^=$n(x+D|0,9),te^=$n(y+x|0,13),D^=$n(te+y|0,18),S^=$n(_+g|0,7),p^=$n(S+_|0,9),g^=$n(p+S|0,13),_^=$n(g+p|0,18),T^=$n(M+E|0,7),I^=$n(T+M|0,9),E^=$n(I+T|0,13),M^=$n(E+I|0,18);i[s++]=a+G|0,i[s++]=o+U|0,i[s++]=l+L|0,i[s++]=u+V|0,i[s++]=f+te|0,i[s++]=h+D|0,i[s++]=m+x|0,i[s++]=b+y|0,i[s++]=v+p|0,i[s++]=C+g|0,i[s++]=R+_|0,i[s++]=k+S|0,i[s++]=P+T|0,i[s++]=N+I|0,i[s++]=$+E|0,i[s++]=j+M|0}function Ow(r,e,t,n,i){let s=n+0,a=n+16*i;for(let o=0;o<16;o++)t[a+o]=r[e+(2*i-1)*16+o];for(let o=0;o0&&(a+=16),iX(t,s,r,e+=16,t,a)}function sX(r,e,t){const n=CQ({dkLen:32,asyncTick:10,maxmem:1073742848},t),{N:i,r:s,p:a,dkLen:o,asyncTick:l,maxmem:u,onProgress:f}=n;if(Wc(i),Wc(s),Wc(a),Wc(o),Wc(l),Wc(u),f!==void 0&&typeof f!="function")throw new Error("progressCb should be function");const h=128*s,m=h/4;if(i<=1||i&i-1||i>=2**(h/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(a<0||a>(2**32-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(o<0||o>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const b=h*(i+a);if(b>u)throw new Error(`Scrypt: parameters too large, ${b} (128 * r * (N + p)) > ${u} (maxmem)`);const v=eP(Pw,r,e,{c:1,dkLen:h*a}),C=IC(v),R=IC(new Uint8Array(h*i)),k=IC(new Uint8Array(h));let P=()=>{};if(f){const N=2*i*a,$=Math.max(Math.floor(N/1e4),1);let j=0;P=()=>{j++,f&&(!(j%$)||j===N)&&f(j/N)}}return{N:i,r:s,p:a,dkLen:o,blockSize32:m,V:R,B32:C,B:v,tmp:k,blockMixCb:P,asyncTick:l}}function aX(r,e,t,n,i){const s=eP(Pw,r,t,{c:1,dkLen:e});return t.fill(0),n.fill(0),i.fill(0),s}function Y4e(r,e,t){const{N:n,r:i,p:s,dkLen:a,blockSize32:o,V:l,B32:u,B:f,tmp:h,blockMixCb:m}=sX(r,e,t);for(let b=0;b{Ow(l,R,l,R+=o,i),m()}),Ow(l,(n-1)*o,u,C,i),m(),await EQ(n,b,()=>{const k=u[C+o-16]%n;for(let P=0;Pr instanceof Uint8Array,e6e=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Dw(r){if(!DC(r))throw new Error("Uint8Array expected");let e="";for(let t=0;tn+i.length,0));let t=0;return r.forEach(n=>{if(!DC(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function r6e(r,e){if(r.length!==e.length)return!1;for(let t=0;twX;r>>=NC,e+=1);return e}function s6e(r,e){return r>>BigInt(e)&NC}const a6e=(r,e,t)=>r|(t?NC:wX)<(X4e<new Uint8Array(r),xX=r=>Uint8Array.from(r);function _X(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=uP(r),i=uP(r),s=0;const a=()=>{n.fill(1),i.fill(0),s=0},o=(...h)=>t(i,n,...h),l=(h=uP())=>{i=o(xX([0]),h),n=o(),h.length!==0&&(i=o(xX([1]),h),n=o())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let h=0;const m=[];for(;h{a(),l(h);let b;for(;!(b=m(u()));)l();return a(),b}}const o6e={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function p6(r,e,t={}){const n=(i,s,a)=>{const o=o6e[s];if(typeof o!="function")throw new Error(`Invalid validator "${s}", expected function`);const l=r[i];if(!(a&&l===void 0)&&!o(l,r))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(t))n(i,s,!0);return r}const c6e=Object.freeze(Object.defineProperty({__proto__:null,bitGet:s6e,bitLen:i6e,bitMask:lP,bitSet:a6e,bytesToHex:Dw,bytesToNumberBE:sg,bytesToNumberLE:oP,concatBytes:h6,createHmacDrbg:_X,ensureBytes:Qu,equalBytes:r6e,hexToBytes:$w,hexToNumber:aP,numberToBytesBE:Bw,numberToBytesLE:cP,numberToHexUnpadded:yX,numberToVarBytesBE:t6e,utf8ToBytes:n6e,validateObject:p6},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ba=BigInt(0),_s=BigInt(1),ag=BigInt(2),l6e=BigInt(3),fP=BigInt(4),EX=BigInt(5),CX=BigInt(8);BigInt(9),BigInt(16);function hc(r,e){const t=r%e;return t>=ba?t:e+t}function u6e(r,e,t){if(t<=ba||e 0");if(t===_s)return ba;let n=_s;for(;e>ba;)e&_s&&(n=n*r%t),r=r*r%t,e>>=_s;return n}function Vl(r,e,t){let n=r;for(;e-- >ba;)n*=n,n%=t;return n}function dP(r,e){if(r===ba||e<=ba)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=hc(r,e),n=e,i=ba,s=_s;for(;t!==ba;){const o=n/t,l=n%t,u=i-s*o;n=t,t=l,i=s,s=u}if(n!==_s)throw new Error("invert: does not exist");return hc(i,e)}function f6e(r){const e=(r-_s)/ag;let t,n,i;for(t=r-_s,n=0;t%ag===ba;t/=ag,n++);for(i=ag;i(n[i]="function",n),e);return p6(r,t)}function m6e(r,e,t){if(t 0");if(t===ba)return r.ONE;if(t===_s)return e;let n=r.ONE,i=e;for(;t>ba;)t&_s&&(n=r.mul(n,i)),i=r.sqr(i),t>>=_s;return n}function g6e(r,e){const t=new Array(e.length),n=e.reduce((s,a,o)=>r.is0(a)?s:(t[o]=s,r.mul(s,a)),r.ONE),i=r.inv(n);return e.reduceRight((s,a,o)=>r.is0(a)?s:(t[o]=r.mul(s,t[o]),r.mul(s,a)),i),t}function AX(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function b6e(r,e,t=!1,n={}){if(r<=ba)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=AX(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=d6e(r),o=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:lP(i),ZERO:ba,ONE:_s,create:l=>hc(l,r),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return ba<=l&&ll===ba,isOdd:l=>(l&_s)===_s,neg:l=>hc(-l,r),eql:(l,u)=>l===u,sqr:l=>hc(l*l,r),add:(l,u)=>hc(l+u,r),sub:(l,u)=>hc(l-u,r),mul:(l,u)=>hc(l*u,r),pow:(l,u)=>m6e(o,l,u),div:(l,u)=>hc(l*dP(u,r),r),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>dP(l,r),sqrt:n.sqrt||(l=>a(o,l)),invertBatch:l=>g6e(o,l),cmov:(l,u,f)=>f?u:l,toBytes:l=>t?cP(l,s):Bw(l,s),fromBytes:l=>{if(l.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${l.length}`);return t?oP(l):sg(l)}});return Object.freeze(o)}function SX(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const e=r.toString(2).length;return Math.ceil(e/8)}function IX(r){const e=SX(r);return e+Math.ceil(e/2)}function v6e(r,e,t=!1){const n=r.length,i=SX(e),s=IX(e);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=t?sg(r):oP(r),o=hc(a,e-_s)+_s;return t?cP(o,i):Bw(o,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const w6e=BigInt(0),hP=BigInt(1);function y6e(r,e){const t=(i,s)=>{const a=s.negate();return i?a:s},n=i=>{const s=Math.ceil(e/i)+1,a=2**(i-1);return{windows:s,windowSize:a}};return{constTimeNegate:t,unsafeLadder(i,s){let a=r.ZERO,o=i;for(;s>w6e;)s&hP&&(a=a.add(o)),o=o.double(),s>>=hP;return a},precomputeWindow(i,s){const{windows:a,windowSize:o}=n(s),l=[];let u=i,f=u;for(let h=0;h>=b,R>l&&(R-=m,a+=hP);const k=C,P=C+Math.abs(R)-1,N=v%2!==0,$=R<0;R===0?f=f.add(t(N,s[k])):u=u.add(t($,s[P]))}return{p:u,f}},wNAFCached(i,s,a,o){const l=i._WINDOW_SIZE||1;let u=s.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&s.set(i,o(u))),this.wNAF(l,u,a)}}}function TX(r){return p6e(r.Fp),p6(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...AX(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function x6e(r){const e=TX(r);p6(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:_6e,hexToBytes:E6e}=c6e,og={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=og;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");const t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:_6e(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=og,t=typeof r=="string"?E6e(r):r;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=og._parseInt(t.subarray(2)),{d:a,l:o}=og._parseInt(s);if(o.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(r){const e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,t=u=>{const f=u.toString(16);return f.length&1?`0${f}`:f},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,a=i.length/2,o=t(s),l=t(a);return`30${t(a+s+4)}02${l}${i}02${o}${n}`}},qh=BigInt(0),Gl=BigInt(1);BigInt(2);const kX=BigInt(3);BigInt(4);function C6e(r){const e=x6e(r),{Fp:t}=e,n=e.toBytes||((v,C,R)=>{const k=C.toAffine();return h6(Uint8Array.from([4]),t.toBytes(k.x),t.toBytes(k.y))}),i=e.fromBytes||(v=>{const C=v.subarray(1),R=t.fromBytes(C.subarray(0,t.BYTES)),k=t.fromBytes(C.subarray(t.BYTES,2*t.BYTES));return{x:R,y:k}});function s(v){const{a:C,b:R}=e,k=t.sqr(v),P=t.mul(k,v);return t.add(t.add(P,t.mul(v,C)),R)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function a(v){return typeof v=="bigint"&&qht.eql(N,t.ZERO);return P(R)&&P(k)?h.ZERO:new h(R,k,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const R=t.invertBatch(C.map(k=>k.pz));return C.map((k,P)=>k.toAffine(R[P])).map(h.fromAffine)}static fromHex(C){const R=h.fromAffine(i(Qu("pointHex",C)));return R.assertValidity(),R}static fromPrivateKey(C){return h.BASE.multiply(l(C))}_setWindowSize(C){this._WINDOW_SIZE=C,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:C,y:R}=this.toAffine();if(!t.isValid(C)||!t.isValid(R))throw new Error("bad point: x or y not FE");const k=t.sqr(R),P=s(C);if(!t.eql(k,P))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:C}=this.toAffine();if(t.isOdd)return!t.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){f(C);const{px:R,py:k,pz:P}=this,{px:N,py:$,pz:j}=C,G=t.eql(t.mul(R,j),t.mul(N,P)),U=t.eql(t.mul(k,j),t.mul($,P));return G&&U}negate(){return new h(this.px,t.neg(this.py),this.pz)}double(){const{a:C,b:R}=e,k=t.mul(R,kX),{px:P,py:N,pz:$}=this;let j=t.ZERO,G=t.ZERO,U=t.ZERO,L=t.mul(P,P),V=t.mul(N,N),te=t.mul($,$),D=t.mul(P,N);return D=t.add(D,D),U=t.mul(P,$),U=t.add(U,U),j=t.mul(C,U),G=t.mul(k,te),G=t.add(j,G),j=t.sub(V,G),G=t.add(V,G),G=t.mul(j,G),j=t.mul(D,j),U=t.mul(k,U),te=t.mul(C,te),D=t.sub(L,te),D=t.mul(C,D),D=t.add(D,U),U=t.add(L,L),L=t.add(U,L),L=t.add(L,te),L=t.mul(L,D),G=t.add(G,L),te=t.mul(N,$),te=t.add(te,te),L=t.mul(te,D),j=t.sub(j,L),U=t.mul(te,V),U=t.add(U,U),U=t.add(U,U),new h(j,G,U)}add(C){f(C);const{px:R,py:k,pz:P}=this,{px:N,py:$,pz:j}=C;let G=t.ZERO,U=t.ZERO,L=t.ZERO;const V=e.a,te=t.mul(e.b,kX);let D=t.mul(R,N),x=t.mul(k,$),y=t.mul(P,j),p=t.add(R,k),g=t.add(N,$);p=t.mul(p,g),g=t.add(D,x),p=t.sub(p,g),g=t.add(R,P);let _=t.add(N,j);return g=t.mul(g,_),_=t.add(D,y),g=t.sub(g,_),_=t.add(k,P),G=t.add($,j),_=t.mul(_,G),G=t.add(x,y),_=t.sub(_,G),L=t.mul(V,g),G=t.mul(te,y),L=t.add(G,L),G=t.sub(x,L),L=t.add(x,L),U=t.mul(G,L),x=t.add(D,D),x=t.add(x,D),y=t.mul(V,y),g=t.mul(te,g),x=t.add(x,y),y=t.sub(D,y),y=t.mul(V,y),g=t.add(g,y),D=t.mul(x,g),U=t.add(U,D),D=t.mul(_,g),G=t.mul(p,G),G=t.sub(G,D),D=t.mul(p,x),L=t.mul(_,L),L=t.add(L,D),new h(G,U,L)}subtract(C){return this.add(C.negate())}is0(){return this.equals(h.ZERO)}wNAF(C){return b.wNAFCached(this,u,C,R=>{const k=t.invertBatch(R.map(P=>P.pz));return R.map((P,N)=>P.toAffine(k[N])).map(h.fromAffine)})}multiplyUnsafe(C){const R=h.ZERO;if(C===qh)return R;if(o(C),C===Gl)return this;const{endo:k}=e;if(!k)return b.unsafeLadder(this,C);let{k1neg:P,k1:N,k2neg:$,k2:j}=k.splitScalar(C),G=R,U=R,L=this;for(;N>qh||j>qh;)N&Gl&&(G=G.add(L)),j&Gl&&(U=U.add(L)),L=L.double(),N>>=Gl,j>>=Gl;return P&&(G=G.negate()),$&&(U=U.negate()),U=new h(t.mul(U.px,k.beta),U.py,U.pz),G.add(U)}multiply(C){o(C);let R=C,k,P;const{endo:N}=e;if(N){const{k1neg:$,k1:j,k2neg:G,k2:U}=N.splitScalar(R);let{p:L,f:V}=this.wNAF(j),{p:te,f:D}=this.wNAF(U);L=b.constTimeNegate($,L),te=b.constTimeNegate(G,te),te=new h(t.mul(te.px,N.beta),te.py,te.pz),k=L.add(te),P=V.add(D)}else{const{p:$,f:j}=this.wNAF(R);k=$,P=j}return h.normalizeZ([k,P])[0]}multiplyAndAddUnsafe(C,R,k){const P=h.BASE,N=(j,G)=>G===qh||G===Gl||!j.equals(P)?j.multiplyUnsafe(G):j.multiply(G),$=N(this,R).add(N(C,k));return $.is0()?void 0:$}toAffine(C){const{px:R,py:k,pz:P}=this,N=this.is0();C==null&&(C=N?t.ONE:t.inv(P));const $=t.mul(R,C),j=t.mul(k,C),G=t.mul(P,C);if(N)return{x:t.ZERO,y:t.ZERO};if(!t.eql(G,t.ONE))throw new Error("invZ was invalid");return{x:$,y:j}}isTorsionFree(){const{h:C,isTorsionFree:R}=e;if(C===Gl)return!0;if(R)return R(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:R}=e;return C===Gl?this:R?R(h,this):this.multiplyUnsafe(e.h)}toRawBytes(C=!0){return this.assertValidity(),n(h,this,C)}toHex(C=!0){return Dw(this.toRawBytes(C))}}h.BASE=new h(e.Gx,e.Gy,t.ONE),h.ZERO=new h(t.ZERO,t.ONE,t.ZERO);const m=e.nBitLength,b=y6e(h,e.endo?Math.ceil(m/2):m);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:a}}function A6e(r){const e=TX(r);return p6(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function S6e(r){const e=A6e(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function a(g){return qhDw(Bw(g,e.nByteLength));function v(g){const _=n>>Gl;return g>_}function C(g){return v(g)?o(-g):g}const R=(g,_,S)=>sg(g.slice(_,S));class k{constructor(_,S,T){this.r=_,this.s=S,this.recovery=T,this.assertValidity()}static fromCompact(_){const S=e.nByteLength;return _=Qu("compactSignature",_,S*2),new k(R(_,0,S),R(_,S,2*S))}static fromDER(_){const{r:S,s:T}=og.toSig(Qu("DER",_));return new k(S,T)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(_){return new k(this.r,this.s,_)}recoverPublicKey(_){const{r:S,s:T,recovery:I}=this,E=U(Qu("msgHash",_));if(I==null||![0,1,2,3].includes(I))throw new Error("recovery id invalid");const M=I===2||I===3?S+e.n:S;if(M>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const A=I&1?"03":"02",B=u.fromHex(A+b(M)),ae=l(M),W=o(-E*ae),Z=o(T*ae),K=u.BASE.multiplyAndAddUnsafe(B,W,Z);if(!K)throw new Error("point at infinify");return K.assertValidity(),K}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new k(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return $w(this.toDERHex())}toDERHex(){return og.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return $w(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const P={isValidPrivateKey(g){try{return f(g),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const g=IX(e.n);return v6e(e.randomBytes(g),e.n)},precompute(g=8,_=u.BASE){return _._setWindowSize(g),_.multiply(BigInt(3)),_}};function N(g,_=!0){return u.fromPrivateKey(g).toRawBytes(_)}function $(g){const _=g instanceof Uint8Array,S=typeof g=="string",T=(_||S)&&g.length;return _?T===i||T===s:S?T===2*i||T===2*s:g instanceof u}function j(g,_,S=!0){if($(g))throw new Error("first arg must be private key");if(!$(_))throw new Error("second arg must be public key");return u.fromHex(_).multiply(f(g)).toRawBytes(S)}const G=e.bits2int||function(g){const _=sg(g),S=g.length*8-e.nBitLength;return S>0?_>>BigInt(S):_},U=e.bits2int_modN||function(g){return o(G(g))},L=lP(e.nBitLength);function V(g){if(typeof g!="bigint")throw new Error("bigint expected");if(!(qh<=g&&gre in S))throw new Error("sign() legacy options not supported");const{hash:T,randomBytes:I}=e;let{lowS:E,prehash:M,extraEntropy:A}=S;E==null&&(E=!0),g=Qu("msgHash",g),M&&(g=Qu("prehashed msgHash",T(g)));const B=U(g),ae=f(_),W=[V(ae),V(B)];if(A!=null){const re=A===!0?I(t.BYTES):A;W.push(Qu("extraEntropy",re))}const Z=h6(...W),K=B;function ee(re){const H=G(re);if(!m(H))return;const F=l(H),q=u.BASE.multiply(H).toAffine(),fe=o(q.x);if(fe===qh)return;const pe=o(F*o(K+fe*ae));if(pe===qh)return;let Ee=(q.x===fe?0:2)|Number(q.y&Gl),Me=pe;return E&&v(pe)&&(Me=C(pe),Ee^=1),new k(fe,Me,Ee)}return{seed:Z,k2sig:ee}}const D={lowS:e.lowS,prehash:!1},x={lowS:e.lowS,prehash:!1};function y(g,_,S=D){const{seed:T,k2sig:I}=te(g,_,S),E=e;return _X(E.hash.outputLen,E.nByteLength,E.hmac)(T,I)}u.BASE._setWindowSize(8);function p(g,_,S,T=x){var q;const I=g;if(_=Qu("msgHash",_),S=Qu("publicKey",S),"strict"in T)throw new Error("options.strict was renamed to lowS");const{lowS:E,prehash:M}=T;let A,B;try{if(typeof I=="string"||I instanceof Uint8Array)try{A=k.fromDER(I)}catch(fe){if(!(fe instanceof og.Err))throw fe;A=k.fromCompact(I)}else if(typeof I=="object"&&typeof I.r=="bigint"&&typeof I.s=="bigint"){const{r:fe,s:pe}=I;A=new k(fe,pe)}else throw new Error("PARSE");B=u.fromHex(S)}catch(fe){if(fe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(E&&A.hasHighS())return!1;M&&(_=e.hash(_));const{r:ae,s:W}=A,Z=U(_),K=l(W),ee=o(Z*K),re=o(ae*K),H=(q=u.BASE.multiplyAndAddUnsafe(B,ee,re))==null?void 0:q.toAffine();return H?o(H.x)===ae:!1}return{CURVE:e,getPublicKey:N,getSharedSecret:j,sign:y,verify:p,ProjectivePoint:u,Signature:k,utils:P}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function I6e(r){return{hash:r,hmac:(e,...t)=>RC(r,e,a4e(...t)),randomBytes:c4e}}function T6e(r,e){const t=n=>S6e({...r,...I6e(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const RX=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),MX=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),k6e=BigInt(1),pP=BigInt(2),PX=(r,e)=>(r+e/pP)/e;function R6e(r){const e=RX,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),o=BigInt(44),l=BigInt(88),u=r*r*r%e,f=u*u*r%e,h=Vl(f,t,e)*f%e,m=Vl(h,t,e)*f%e,b=Vl(m,pP,e)*u%e,v=Vl(b,i,e)*b%e,C=Vl(v,s,e)*v%e,R=Vl(C,o,e)*C%e,k=Vl(R,l,e)*R%e,P=Vl(k,o,e)*C%e,N=Vl(P,t,e)*f%e,$=Vl(N,a,e)*v%e,j=Vl($,n,e)*u%e,G=Vl(j,pP,e);if(!mP.eql(mP.sqr(G),r))throw new Error("Cannot find square root");return G}const mP=b6e(RX,void 0,void 0,{sqrt:R6e}),l1=T6e({a:BigInt(0),b:BigInt(7),Fp:mP,n:MX,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=MX,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-k6e*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,a=BigInt("0x100000000000000000000000000000000"),o=PX(s*r,e),l=PX(-n*r,e);let u=hc(r-o*t-l*i,e),f=hc(-o*n-l*s,e);const h=u>a,m=f>a;if(h&&(u=e-u),m&&(f=e-f),u>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:h,k1:u,k2neg:m,k2:f}}}},Pw);BigInt(0),l1.ProjectivePoint;const cg="0x0000000000000000000000000000000000000000",$C="0x0000000000000000000000000000000000000000000000000000000000000000",OX=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),NX=BigInt("1000000000000000000"),DX=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),$X=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),BX=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),LX="Ξ",gP=`Ethereum Signed Message: +`,UX=BigInt(0),FX=BigInt(1),jX=BigInt(2),zX=BigInt(27),HX=BigInt(28),BC=BigInt(35),Lw={};function qX(r){return Ha(Ys(r),32)}let Xu=(Fc=class{constructor(e,t,n,i){$e(this,z5);$e(this,H5);$e(this,q5);$e(this,k2);nd(e,Lw,"Signature"),ge(this,z5,t),ge(this,H5,n),ge(this,q5,i),ge(this,k2,null)}get r(){return se(this,z5)}set r(e){xe(Nh(e)===32,"invalid r","value",e),ge(this,z5,bt(e))}get s(){return se(this,H5)}set s(e){xe(Nh(e)===32,"invalid s","value",e);const t=bt(e);xe(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),ge(this,H5,t)}get v(){return se(this,q5)}set v(e){const t=Rr(e,"value");xe(t===27||t===28,"invalid v","v",e),ge(this,q5,t)}get networkV(){return se(this,k2)}get legacyChainId(){const e=this.networkV;return e==null?null:Fc.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Pt(this.s);return this.yParity&&(e[0]|=128),bt(e)}get compactSerialized(){return An([this.r,this.yParityAndS])}get serialized(){return An([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Fc(Lw,this.r,this.s,this.v);return this.networkV&&ge(e,k2,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=ur(e,"v");return t==zX||t==HX?UX:(xe(t>=BC,"invalid EIP-155 v","v",e),(t-BC)/jX)}static getChainIdV(e,t){return ur(e)*jX+BigInt(35+t-27)}static getNormalizedV(e){const t=ur(e);return t===UX||t===zX?27:t===FX||t===HX?28:(xe(t>=BC,"invalid v","v",e),t&FX?27:28)}static from(e){function t(u,f){xe(u,f,"signature",e)}if(e==null)return new Fc(Lw,$C,$C,27);if(typeof e=="string"){const u=Pt(e,"signature");if(u.length===64){const f=bt(u.slice(0,32)),h=u.slice(32,64),m=h[0]&128?28:27;return h[0]&=127,new Fc(Lw,f,bt(h),m)}if(u.length===65){const f=bt(u.slice(0,32)),h=u.slice(32,64);t((h[0]&128)===0,"non-canonical s");const m=Fc.getNormalizedV(u[64]);return new Fc(Lw,f,bt(h),m)}t(!1,"invalid raw signature length")}if(e instanceof Fc)return e.clone();const n=e.r;t(n!=null,"missing r");const i=qX(n),s=function(u,f){if(u!=null)return qX(u);if(f!=null){t(pi(f,32),"invalid yParityAndS");const h=Pt(f);return h[0]&=127,bt(h)}t(!1,"missing s")}(e.s,e.yParityAndS);t((Pt(s)[0]&128)==0,"non-canonical s");const{networkV:a,v:o}=function(u,f,h){if(u!=null){const m=ur(u);return{networkV:m>=BC?m:void 0,v:Fc.getNormalizedV(m)}}if(f!=null)return t(pi(f,32),"invalid yParityAndS"),{v:Pt(f)[0]&128?28:27};if(h!=null){switch(Rr(h,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),l=new Fc(Lw,i,s,o);return a&&ge(l,k2,a),t(e.yParity==null||Rr(e.yParity,"sig.yParity")===l.yParity,"yParity mismatch"),t(e.yParityAndS==null||e.yParityAndS===l.yParityAndS,"yParityAndS mismatch"),l}},z5=new WeakMap,H5=new WeakMap,q5=new WeakMap,k2=new WeakMap,Fc),ad=(fh=class{constructor(e){$e(this,Y0);xe(Nh(e)===32,"invalid private key","privateKey","[REDACTED]"),ge(this,Y0,bt(e))}get privateKey(){return se(this,Y0)}get publicKey(){return fh.computePublicKey(se(this,Y0))}get compressedPublicKey(){return fh.computePublicKey(se(this,Y0),!0)}sign(e){xe(Nh(e)===32,"invalid digest length","digest",e);const t=l1.sign(Js(e),Js(se(this,Y0)),{lowS:!0});return Xu.from({r:Zu(t.r,32),s:Zu(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=fh.computePublicKey(e);return bt(l1.getSharedSecret(Js(se(this,Y0)),Pt(t),!1))}static computePublicKey(e,t){let n=Pt(e,"key");if(n.length===32){const s=l1.getPublicKey(n,!!t);return bt(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=l1.ProjectivePoint.fromHex(n);return bt(i.toRawBytes(t))}static recoverPublicKey(e,t){xe(Nh(e)===32,"invalid digest length","digest",e);const n=Xu.from(t);let i=l1.Signature.fromCompact(Js(An([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(Js(e));return xe(s!=null,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,n){const i=l1.ProjectivePoint.fromHex(fh.computePublicKey(e).substring(2)),s=l1.ProjectivePoint.fromHex(fh.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}},Y0=new WeakMap,fh);function WX(){Fh.lock(),gi.lock(),Yu.lock(),Vc.lock(),jh.lock(),zh.lock(),Hh.lock(),vo.lock(),Nw.lock(),Vc.lock()}const M6e=BigInt(0),P6e=BigInt(36);function VX(r){r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Pt(gi(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const bP={};for(let r=0;r<10;r++)bP[String(r)]=String(r);for(let r=0;r<26;r++)bP[String.fromCharCode(65+r)]=String(10+r);const GX=15;function KX(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>bP[n]).join("");for(;e.length>=GX;){let n=e.substring(0,GX);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}const O6e=function(){const r={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function N6e(r){r=r.toLowerCase();let e=M6e;for(let t=0;te.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return se(this,R2)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return se(this,R2)===!0?-1:se(this,R2)===!1?this.value.length:null}static from(e,t){return new Q0(Wh,e,t)}static uint8(e){return cr(e,8)}static uint16(e){return cr(e,16)}static uint24(e){return cr(e,24)}static uint32(e){return cr(e,32)}static uint40(e){return cr(e,40)}static uint48(e){return cr(e,48)}static uint56(e){return cr(e,56)}static uint64(e){return cr(e,64)}static uint72(e){return cr(e,72)}static uint80(e){return cr(e,80)}static uint88(e){return cr(e,88)}static uint96(e){return cr(e,96)}static uint104(e){return cr(e,104)}static uint112(e){return cr(e,112)}static uint120(e){return cr(e,120)}static uint128(e){return cr(e,128)}static uint136(e){return cr(e,136)}static uint144(e){return cr(e,144)}static uint152(e){return cr(e,152)}static uint160(e){return cr(e,160)}static uint168(e){return cr(e,168)}static uint176(e){return cr(e,176)}static uint184(e){return cr(e,184)}static uint192(e){return cr(e,192)}static uint200(e){return cr(e,200)}static uint208(e){return cr(e,208)}static uint216(e){return cr(e,216)}static uint224(e){return cr(e,224)}static uint232(e){return cr(e,232)}static uint240(e){return cr(e,240)}static uint248(e){return cr(e,248)}static uint256(e){return cr(e,256)}static uint(e){return cr(e,256)}static int8(e){return cr(e,-8)}static int16(e){return cr(e,-16)}static int24(e){return cr(e,-24)}static int32(e){return cr(e,-32)}static int40(e){return cr(e,-40)}static int48(e){return cr(e,-48)}static int56(e){return cr(e,-56)}static int64(e){return cr(e,-64)}static int72(e){return cr(e,-72)}static int80(e){return cr(e,-80)}static int88(e){return cr(e,-88)}static int96(e){return cr(e,-96)}static int104(e){return cr(e,-104)}static int112(e){return cr(e,-112)}static int120(e){return cr(e,-120)}static int128(e){return cr(e,-128)}static int136(e){return cr(e,-136)}static int144(e){return cr(e,-144)}static int152(e){return cr(e,-152)}static int160(e){return cr(e,-160)}static int168(e){return cr(e,-168)}static int176(e){return cr(e,-176)}static int184(e){return cr(e,-184)}static int192(e){return cr(e,-192)}static int200(e){return cr(e,-200)}static int208(e){return cr(e,-208)}static int216(e){return cr(e,-216)}static int224(e){return cr(e,-224)}static int232(e){return cr(e,-232)}static int240(e){return cr(e,-240)}static int248(e){return cr(e,-248)}static int256(e){return cr(e,-256)}static int(e){return cr(e,-256)}static bytes1(e){return Bn(e,1)}static bytes2(e){return Bn(e,2)}static bytes3(e){return Bn(e,3)}static bytes4(e){return Bn(e,4)}static bytes5(e){return Bn(e,5)}static bytes6(e){return Bn(e,6)}static bytes7(e){return Bn(e,7)}static bytes8(e){return Bn(e,8)}static bytes9(e){return Bn(e,9)}static bytes10(e){return Bn(e,10)}static bytes11(e){return Bn(e,11)}static bytes12(e){return Bn(e,12)}static bytes13(e){return Bn(e,13)}static bytes14(e){return Bn(e,14)}static bytes15(e){return Bn(e,15)}static bytes16(e){return Bn(e,16)}static bytes17(e){return Bn(e,17)}static bytes18(e){return Bn(e,18)}static bytes19(e){return Bn(e,19)}static bytes20(e){return Bn(e,20)}static bytes21(e){return Bn(e,21)}static bytes22(e){return Bn(e,22)}static bytes23(e){return Bn(e,23)}static bytes24(e){return Bn(e,24)}static bytes25(e){return Bn(e,25)}static bytes26(e){return Bn(e,26)}static bytes27(e){return Bn(e,27)}static bytes28(e){return Bn(e,28)}static bytes29(e){return Bn(e,29)}static bytes30(e){return Bn(e,30)}static bytes31(e){return Bn(e,31)}static bytes32(e){return Bn(e,32)}static address(e){return new Q0(Wh,"address",e)}static bool(e){return new Q0(Wh,"bool",!!e)}static bytes(e){return new Q0(Wh,"bytes",e)}static string(e){return new Q0(Wh,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Q0(Wh,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===QX}static dereference(e,t){if(Q0.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};R2=new WeakMap;let va=Q0;class D6e extends Uh{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=va.dereference(t,"string");try{n=Vr(n)}catch(i){return this._throwError(i.message,t)}return e.writeValue(n)}decode(e){return Vr(Zu(e.readValue(),20))}}class $6e extends Uh{constructor(t){super(t.name,t.type,"_",t.dynamic);Ae(this,"coder");this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,n){return this.coder.encode(t,n)}decode(t){return this.coder.decode(t)}}function XX(r,e,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let l={};n=e.map(u=>{const f=u.localName;return ze(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:t}),ze(!l[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:t}),l[f]=!0,t[f]})}else xe(!1,"invalid tuple value","tuple",t);xe(e.length===n.length,"types/value length mismatch","tuple",t);let i=new ZM,s=new ZM,a=[];e.forEach((l,u)=>{let f=n[u];if(l.dynamic){let h=s.length;l.encode(s,f);let m=i.writeUpdatableValue();a.push(b=>{m(b+h)})}else l.encode(i,f)}),a.forEach(l=>{l(i.length)});let o=r.appendWriter(i);return o+=r.appendWriter(s),o}function eee(r,e){let t=[],n=[],i=r.subReader(0);return e.forEach(s=>{let a=null;if(s.dynamic){let o=r.readIndex(),l=i.subReader(o);try{a=s.decode(l)}catch(u){if(xs(u,"BUFFER_OVERRUN"))throw u;a=u,a.baseType=s.name,a.name=s.localName,a.type=s.type}}else try{a=s.decode(r)}catch(o){if(xs(o,"BUFFER_OVERRUN"))throw o;a=o,a.baseType=s.name,a.name=s.localName,a.type=s.type}if(a==null)throw new Error("investigate");t.push(a),n.push(s.localName||null)}),i1.fromItems(t,n)}class B6e extends Uh{constructor(t,n,i){const s=t.type+"["+(n>=0?n:"")+"]",a=n===-1||t.dynamic;super("array",s,i,a);Ae(this,"coder");Ae(this,"length");er(this,{coder:t,length:n})}defaultValue(){const t=this.coder.defaultValue(),n=[];for(let i=0;ia||i<-(a+q6e))&&this._throwError("value out-of-bounds",n),i=l6(i,8*$o)}else(iDh(s,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(i)}decode(t){let n=Dh(t.readValue(),this.size*8);return this.signed&&(n=Ew(n,this.size*8)),n}}class G6e extends tee{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,zs(va.dereference(t,"string")))}decode(e){return Bh(super.decode(e))}}class FC extends Uh{constructor(t,n){let i=!1;const s=[];t.forEach(o=>{o.dynamic&&(i=!0),s.push(o.type)});const a="tuple("+s.join(",")+")";super("tuple",a,n,i);Ae(this,"coders");er(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(i=>{t.push(i.defaultValue())});const n=this.coders.reduce((i,s)=>{const a=s.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});return this.coders.forEach((i,s)=>{let a=i.localName;!a||n[a]!==1||(a==="length"&&(a="_length"),t[a]==null&&(t[a]=t[s]))}),Object.freeze(t)}encode(t,n){const i=va.dereference(n,"tuple");return XX(t,this.coders,i)}decode(t){return eee(t,this.coders)}}function Gc(r){return gi(zs(r))}var K6e="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAj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12539,"middle dot"]]),nee=4;function Z6e(r){let e=0;function t(){return r[e++]<<8|r[e++]}let n=t(),i=1,s=[0,1];for(let j=1;j>--l&1}const h=31,m=2**h,b=m>>>1,v=b>>1,C=m-1;let R=0;for(let j=0;j1;){let te=G+U>>>1;j>>1|f(),L=L<<1^b,V=(V^b)<<1|b|1;P=L,N=1+V-L}let $=n-4;return k.map(j=>{switch(j-$){case 3:return $+65792+(r[o++]<<16|r[o++]<<8|r[o++]);case 2:return $+256+(r[o++]<<8|r[o++]);case 1:return $+r[o++];default:return j-1}})}function J6e(r){let e=0;return()=>r[e++]}function iee(r){return J6e(Z6e(Y6e(r)))}function Y6e(r){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let t=r.length,n=new Uint8Array(6*t>>3);for(let i=0,s=0,a=0,o=0;i=8&&(n[s++]=o>>(a-=8));return n}function Q6e(r){return r&1?~r>>1:r>>1}function X6e(r,e){let t=Array(r);for(let n=0,i=0;n{let e=m6(r);if(e.length)return e})}function aee(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(e8e(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(t8e(t,r))}return e.flat()}function g6(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function oee(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;in[a].push(s));return n}function e8e(r,e){let t=1+e(),n=e(),i=g6(e);return oee(i.length,1+r,e).flatMap((a,o)=>{let[l,...u]=a;return Array(i[o]).fill().map((f,h)=>{let m=h*n;return[l+h*t,u.map(b=>b+m)]})})}function t8e(r,e){let t=1+e();return oee(t,1+r,e).map(i=>[i[0],i.slice(1)])}function r8e(r){let e=[],t=m6(r);return i(n([]),[]),e;function n(s){let a=r(),o=g6(()=>{let l=m6(r).map(u=>t[u]);if(l.length)return n(l)});return{S:a,B:o,Q:s}}function i({S:s,B:a},o,l){if(!(s&4&&l===o[o.length-1])){s&2&&(l=o[o.length-1]),s&1&&e.push(o);for(let u of a)for(let f of u.Q)i(u,[...o,f],l)}}}function n8e(r){return r.toString(16).toUpperCase().padStart(2,"0")}function cee(r){return`{${n8e(r)}}`}function i8e(r){let e=[];for(let t=0,n=r.length;t>24&255}function fee(r){return r&16777215}let wP,dee,yP,WC;function d8e(){let r=iee(a8e);wP=new Map(see(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),dee=new Set(m6(r)),yP=new Map,WC=new Map;for(let[e,t]of aee(r)){if(!dee.has(e)&&t.length==2){let[n,i]=t,s=WC.get(n);s||(s=new Map,WC.set(n,s)),s.set(i,e)}yP.set(e,t.reverse())}}function hee(r){return r>=b6&&r=jC&&r=zC&&eHC&&e0&&i(HC+u)}else{let a=yP.get(s);a?t.push(...a):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=v6(e[0]);for(let a=1;a0&&i>=a)a==0?(e.push(n,...t),t.length=0,n=o):t.push(o),i=a;else{let l=h8e(n,o);l>=0?n=l:i==0&&a==0?(e.push(n),n=o):(t.push(o),i=a)}}return n>=0&&e.push(n,...t),e}function mee(r){return pee(r).map(fee)}function m8e(r){return p8e(pee(r))}const gee=45,bee=".",vee=65039,wee=1,VC=r=>Array.from(r);function w6(r,e){return r.P.has(e)||r.Q.has(e)}class g8e extends Array{get is_emoji(){return!0}}let xP,yee,lg,_P,xee,jw,EP,zw,ug,_ee,CP;function AP(){if(xP)return;let r=iee(K6e);const e=()=>m6(r),t=()=>new Set(e()),n=(f,h)=>h.forEach(m=>f.add(m));xP=new Map(aee(r)),yee=t(),lg=e(),_P=new Set(e().map(f=>lg[f])),lg=new Set(lg),xee=t(),t();let i=see(r),s=r();const a=()=>{let f=new Set;return e().forEach(h=>n(f,i[h])),n(f,e()),f};jw=g6(f=>{let h=g6(r).map(m=>m+96);if(h.length){let m=f>=s;h[0]-=32,h=Uw(h),m&&(h=`Restricted[${h}]`);let b=a(),v=a(),C=!r();return{N:h,P:b,Q:v,M:C,R:m}}}),EP=t(),zw=new Map;let o=e().concat(VC(EP)).sort((f,h)=>f-h);o.forEach((f,h)=>{let m=r(),b=o[h]=m?o[h-m]:{V:[],M:new Map};b.V.push(f),EP.has(f)||zw.set(f,b)});for(let{V:f,M:h}of new Set(zw.values())){let m=[];for(let v of f){let C=jw.filter(k=>w6(k,v)),R=m.find(({G:k})=>C.some(P=>k.has(P)));R||(R={G:new Set,V:[]},m.push(R)),R.V.push(v),n(R.G,C)}let b=m.flatMap(v=>VC(v.G));for(let{G:v,V:C}of m){let R=new Set(b.filter(k=>!v.has(k)));for(let k of C)h.set(k,R)}}ug=new Set;let l=new Set;const u=f=>ug.has(f)?l.add(f):ug.add(f);for(let f of jw){for(let h of f.P)u(h);for(let h of f.Q)u(h)}for(let f of ug)!zw.has(f)&&!l.has(f)&&zw.set(f,wee);n(ug,mee(ug)),_ee=r8e(r).map(f=>g8e.from(f)).sort(s8e),CP=new Map;for(let f of _ee){let h=[CP];for(let m of f){let b=h.map(v=>{let C=v.get(m);return C||(C=new Map,v.set(m,C)),C});m===vee?h.push(...b):h=b}for(let m of h)m.V=f}}function SP(r){return(Eee(r)?"":`${IP(GC([r]))} `)+cee(r)}function IP(r){return`"${r}"‎`}function b8e(r){if(r.length>=4&&r[2]==gee&&r[3]==gee)throw new Error(`invalid label extension: "${Uw(r.slice(0,4))}"`)}function v8e(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function w8e(r){let e=r[0],t=ree.get(e);if(t)throw y6(`leading ${t}`);let n=r.length,i=-1;for(let s=1;se&&(e>>=1,r=[...r.slice(0,e),8230,...r.slice(-e)]);let i=0,s=r.length;for(let a=0;a{let s=i8e(i),a={input:s,offset:n};n+=s.length+1;try{let o=a.tokens=I8e(s,e,t),l=o.length,u;if(!l)throw new Error("empty label");let f=a.output=o.flat();if(v8e(f),!(a.emoji=l>1||o[0].is_emoji)&&f.every(m=>m<128))b8e(f),u="ASCII";else{let m=o.flatMap(b=>b.is_emoji?[]:b);if(!m.length)u="Emoji";else{if(lg.has(f[0]))throw y6("leading combining mark");for(let C=1;Ca.has(o)):VC(a),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>w6(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function C8e(r){let e=jw;for(let t of r){let n=e.filter(i=>w6(i,t));if(!n.length)throw jw.some(i=>w6(i,t))?Aee(e[0],t):Cee(t);if(e=n,n.length==1)break}return e}function A8e(r){return r.map(({input:e,error:t,output:n})=>{if(t){let i=t.message;throw new Error(r.length==1?i:`Invalid label ${IP(GC(e,63))}: ${i}`)}return Uw(n)}).join(bee)}function Cee(r){return new Error(`disallowed character: ${SP(r)}`)}function Aee(r,e){let t=SP(e),n=jw.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function y6(r){return new Error(`illegal placement: ${r}`)}function S8e(r,e){for(let t of e)if(!w6(r,t))throw Aee(r,t);if(r.M){let t=mee(e);for(let n=1,i=t.length;nnee)throw new Error(`excessive non-spacing marks: ${IP(GC(t.slice(n-1,s)))} (${s-n}/${nee})`);n=s}}}function I8e(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=k8e(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let a=r.pop();if(ug.has(a))i.push(a);else{let o=xP.get(a);if(o)i.push(...o);else if(!yee.has(a))throw Cee(a)}}}return i.length&&n.push(e(i)),n}function T8e(r){return r.filter(e=>e!=vee)}function k8e(r,e){let t=CP,n,i=r.length;for(;i&&(t=t.get(r[--i]),!!t);){let{V:s}=t;s&&(n=s,r.length=i)}return n}const See=new Uint8Array(32);See.fill(0);function Iee(r){return xe(r.length!==0,"invalid ENS name; empty component","comp",r),r}function TP(r){const e=zs(kP(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i{xe(n.length<=t,`label ${JSON.stringify(r)} exceeds ${t} bytes`,"name",r);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function MP(r,e){return{address:Vr(r),storageKeys:e.map((t,n)=>(xe(pi(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function od(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(xe(t.length===2,"invalid slot set",`value[${n}]`,t),MP(t[0],t[1])):(xe(t!=null&&typeof t=="object","invalid address-slot set","value",r),MP(t.address,t.storageKeys)));xe(r!=null&&typeof r=="object","invalid access list","value",r);const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,s)=>(i[s]=!0,i),{});return MP(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function fg(r){let e;return typeof r=="string"?e=ad.computePublicKey(r,!1):e=r.publicKey,Vr(gi("0x"+e.substring(4)).substring(26))}function _6(r,e){return fg(ad.recoverPublicKey(r,e))}const wa=BigInt(0),R8e=BigInt(2),M8e=BigInt(27),P8e=BigInt(28),O8e=BigInt(35),N8e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),PP=4096*32;function kee(r,e){let t=r.toString(16);for(;t.length<2;)t="0"+t;return t+=vo(e).substring(4),"0x"+t}function KC(r){return r==="0x"?null:Vr(r)}function OP(r,e){try{return od(r)}catch(t){xe(!1,t.message,e,r)}}function E6(r,e){return r==="0x"?0:Rr(r,e)}function Es(r,e){if(r==="0x")return wa;const t=ur(r,e);return xe(t<=N8e,"value exceeds uint size",e,t),t}function Li(r,e){const t=ur(r,"value"),n=Ys(t);return xe(n.length<=32,"value too large",`tx.${e}`,t),n}function NP(r){return od(r).map(e=>[e.address,e.storageKeys])}function D8e(r,e){xe(Array.isArray(r),`invalid ${e}`,"value",r);for(let t=0;ti.data),t.map(i=>i.commitment),t.map(i=>i.proof)])]):An(["0x03",Lh(n)])}let Hw=(Pu=class{constructor(){$e(this,r4);$e(this,dh);$e(this,W5);$e(this,V5);$e(this,G5);$e(this,K5);$e(this,Z5);$e(this,J5);$e(this,Y5);$e(this,Q5);$e(this,X5);$e(this,e4);$e(this,t4);$e(this,M2);$e(this,Sm);$e(this,X0);$e(this,Im);ge(this,dh,null),ge(this,W5,null),ge(this,G5,0),ge(this,K5,wa),ge(this,Z5,null),ge(this,J5,null),ge(this,Y5,null),ge(this,V5,"0x"),ge(this,Q5,wa),ge(this,X5,wa),ge(this,e4,null),ge(this,t4,null),ge(this,M2,null),ge(this,Sm,null),ge(this,Im,null),ge(this,X0,null)}get type(){return se(this,dh)}set type(e){switch(e){case null:ge(this,dh,null);break;case 0:case"legacy":ge(this,dh,0);break;case 1:case"berlin":case"eip-2930":ge(this,dh,1);break;case 2:case"london":case"eip-1559":ge(this,dh,2);break;case 3:case"cancun":case"eip-4844":ge(this,dh,3);break;default:xe(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=se(this,W5);return e==null&&this.type===3?cg:e}set to(e){ge(this,W5,e==null?null:Vr(e))}get nonce(){return se(this,G5)}set nonce(e){ge(this,G5,Rr(e,"value"))}get gasLimit(){return se(this,K5)}set gasLimit(e){ge(this,K5,ur(e))}get gasPrice(){const e=se(this,Z5);return e==null&&(this.type===0||this.type===1)?wa:e}set gasPrice(e){ge(this,Z5,e==null?null:ur(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=se(this,J5);return e??(this.type===2||this.type===3?wa:null)}set maxPriorityFeePerGas(e){ge(this,J5,e==null?null:ur(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=se(this,Y5);return e??(this.type===2||this.type===3?wa:null)}set maxFeePerGas(e){ge(this,Y5,e==null?null:ur(e,"maxFeePerGas"))}get data(){return se(this,V5)}set data(e){ge(this,V5,bt(e))}get value(){return se(this,Q5)}set value(e){ge(this,Q5,ur(e,"value"))}get chainId(){return se(this,X5)}set chainId(e){ge(this,X5,ur(e))}get signature(){return se(this,e4)||null}set signature(e){ge(this,e4,e==null?null:Xu.from(e))}get accessList(){const e=se(this,t4)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){ge(this,t4,e==null?null:od(e))}get maxFeePerBlobGas(){const e=se(this,M2);return e==null&&this.type===3?wa:e}set maxFeePerBlobGas(e){ge(this,M2,e==null?null:ur(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=se(this,Sm);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){xe(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;tObject.assign({},e))}set blobs(e){if(e==null){ge(this,Im,null);return}const t=[],n=[];for(let i=0;i=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=se(this,M2)!=null||se(this,Sm);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ze(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ze(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ze(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):t?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Pu.from(this)}toJSON(){const e=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Pu;if(typeof e=="string"){const n=Pt(e);if(n[0]>=127)return Pu.from($8e(n));switch(n[0]){case 1:return Pu.from(F8e(n));case 2:return Pu.from(L8e(n));case 3:return Pu.from(z8e(n))}ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new Pu;return e.type!=null&&(t.type=e.type),e.to!=null&&(t.to=e.to),e.nonce!=null&&(t.nonce=e.nonce),e.gasLimit!=null&&(t.gasLimit=e.gasLimit),e.gasPrice!=null&&(t.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(t.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(t.data=e.data),e.value!=null&&(t.value=e.value),e.chainId!=null&&(t.chainId=e.chainId),e.signature!=null&&(t.signature=Xu.from(e.signature)),e.accessList!=null&&(t.accessList=e.accessList),e.blobVersionedHashes!=null&&(t.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(t.kzg=e.kzg),e.blobs!=null&&(t.blobs=e.blobs),e.hash!=null&&(xe(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),xe(t.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(xe(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),xe(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}},dh=new WeakMap,W5=new WeakMap,V5=new WeakMap,G5=new WeakMap,K5=new WeakMap,Z5=new WeakMap,J5=new WeakMap,Y5=new WeakMap,Q5=new WeakMap,X5=new WeakMap,e4=new WeakMap,t4=new WeakMap,M2=new WeakMap,Sm=new WeakMap,X0=new WeakMap,Im=new WeakMap,r4=new WeakSet,HR=function(e,t){ze(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return B8e(this,n);case 1:return j8e(this,n);case 2:return U8e(this,n);case 3:return H8e(this,n,t?this.blobs:null)}ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})},Pu);function ZC(r){return typeof r=="string"&&(r=zs(r)),gi(An([zs(gP),zs(String(r.length)),r]))}function Ree(r,e){const t=ZC(r);return _6(t,e)}const q8e=new RegExp("^bytes([0-9]+)$"),W8e=new RegExp("^(u?int)([0-9]*)$"),V8e=new RegExp("^(.*)\\[([0-9]*)\\]$");function Mee(r,e,t){switch(r){case"address":return Pt(t?Ha(e,32):Vr(e));case"string":return zs(e);case"bytes":return Pt(e);case"bool":return e=e?"0x01":"0x00",Pt(t?Ha(e,32):e)}let n=r.match(W8e);if(n){let i=n[1]==="int",s=parseInt(n[2]||"256");return xe((!n[2]||n[2]===String(s))&&s%8===0&&s!==0&&s<=256,"invalid number type","type",r),t&&(s=256),i&&(e=l6(e,s)),Pt(Ha(Ys(e),s/8))}if(n=r.match(q8e),n){const i=parseInt(n[1]);return xe(String(i)===n[1]&&i!==0&&i<=32,"invalid bytes type","type",r),xe(Nh(e)===i,`invalid value for ${r}`,"value",e),t?Pt(c6(e,32)):e}if(n=r.match(V8e),n&&Array.isArray(e)){const i=n[1],s=parseInt(n[2]||String(e.length));xe(s===e.length,`invalid array length for ${r}`,"value",e);const a=[];return e.forEach(function(o){a.push(Mee(i,o,!0))}),Pt(An(a))}xe(!1,"invalid type","type",r)}function JC(r,e){xe(r.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const t=[];return r.forEach(function(n,i){t.push(Mee(n,e[i]))}),bt(An(t))}function Pee(r,e){return gi(JC(r,e))}function Oee(r,e){return vo(JC(r,e))}const Nee=new Uint8Array(32);Nee.fill(0);const G8e=BigInt(-1),Dee=BigInt(0),$ee=BigInt(1),K8e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Z8e(r){const e=Pt(r),t=e.length%32;return t?An([e,Nee.slice(t)]):bt(e)}const J8e=Zu($ee,32),Y8e=Zu(Dee,32),Bee={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$P=["name","version","chainId","verifyingContract","salt"];function Lee(r){return function(e){return xe(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const Q8e={name:Lee("name"),version:Lee("version"),chainId:function(r){const e=ur(r,"domain.chainId");return xe(e>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(e)?Number(e):$h(e)},verifyingContract:function(r){try{return Vr(r).toLowerCase()}catch{}xe(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const e=Pt(r,"domain.salt");return xe(e.length===32,'invalid domain value "salt"',"domain.salt",r),bt(e)}};function BP(r){{const e=r.match(/^(u?)int(\d+)$/);if(e){const t=e[1]==="",n=parseInt(e[2]);xe(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",r);const i=Dh(K8e,t?n-1:n),s=t?(i+$ee)*G8e:Dee;return function(a){const o=ur(a,"value");return xe(o>=s&&o<=i,`value out-of-bounds for ${r}`,"value",o),Zu(t?l6(o,256):o,32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return xe(t!==0&&t<=32&&e[1]===String(t),"invalid bytes width","type",r),function(n){const i=Pt(n);return xe(i.length===t,`invalid length for ${r}`,"value",n),Z8e(n)}}}switch(r){case"address":return function(e){return Ha(Vr(e),32)};case"bool":return function(e){return e?J8e:Y8e};case"bytes":return function(e){return gi(e)};case"string":return function(e){return Gc(e)}}return null}function Uee(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function YC(r){const e=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:r}}const Ou=class Ou{constructor(e){$e(this,$R);Ae(this,"primaryType");$e(this,t9);$e(this,ep);$e(this,n4);ge(this,ep,new Map),ge(this,n4,new Map);const t=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(l=>{s[l]=e[l].map(({name:u,type:f})=>{let{base:h,index:m}=YC(f);return h==="int"&&!e.int&&(h="int256"),h==="uint"&&!e.uint&&(h="uint256"),{name:u,type:h+(m||"")}}),t.set(l,new Set),n.set(l,[]),i.set(l,new Set)}),ge(this,t9,JSON.stringify(s));for(const l in s){const u=new Set;for(const f of s[l]){xe(!u.has(f.name),`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(l)}`,"types",e),u.add(f.name);const h=YC(f.type).base;xe(h!==l,`circular type reference to ${JSON.stringify(h)}`,"types",e),!BP(h)&&(xe(n.has(h),`unknown type ${JSON.stringify(h)}`,"types",e),n.get(h).push(l),t.get(l).add(h))}}const a=Array.from(n.keys()).filter(l=>n.get(l).length===0);xe(a.length!==0,"missing primary type","types",e),xe(a.length===1,`ambiguous primary types or unused types: ${a.map(l=>JSON.stringify(l)).join(", ")}`,"types",e),er(this,{primaryType:a[0]});function o(l,u){xe(!u.has(l),`circular type reference to ${JSON.stringify(l)}`,"types",e),u.add(l);for(const f of t.get(l))if(n.has(f)){o(f,u);for(const h of u)i.get(h).add(f)}u.delete(l)}o(this.primaryType,new Set);for(const[l,u]of i){const f=Array.from(u);f.sort(),se(this,ep).set(l,Uee(l,s[l])+f.map(h=>Uee(h,s[h])).join(""))}}get types(){return JSON.parse(se(this,t9))}getEncoder(e){let t=se(this,n4).get(e);return t||(t=nt(this,$R,Ive).call(this,e),se(this,n4).set(e,t)),t}encodeType(e){const t=se(this,ep).get(e);return xe(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gi(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(BP(e))return n(e,t);const i=YC(e).array;if(i)return xe(i.count===-1||i.count===t.length,`array length mismatch; expected length ${i.count}`,"value",t),t.map(a=>this._visit(i.prefix,a,n));const s=this.types[e];if(s)return s.reduce((a,{name:o,type:l})=>(a[o]=this._visit(l,t[o],n),a),{});xe(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Ou(e)}static getPrimaryType(e){return Ou.from(e).primaryType}static hashStruct(e,t,n){return Ou.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(e[n]==null)continue;const i=Bee[n];xe(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>$P.indexOf(n.name)-$P.indexOf(i.name)),Ou.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return An(["0x1901",Ou.hashDomain(e),Ou.from(t).hash(n)])}static hash(e,t,n){return gi(Ou.encode(e,t,n))}static async resolveNames(e,t,n,i){e=Object.assign({},e);for(const o in e)e[o]==null&&delete e[o];const s={};e.verifyingContract&&!pi(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const a=Ou.from(t);a.visit(n,(o,l)=>(o==="address"&&!pi(l,20)&&(s[l]="0x"),l));for(const o in s)s[o]=await i(o);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=a.visit(n,(o,l)=>o==="address"&&s[l]?s[l]:l),{domain:e,value:n}}static getPayload(e,t,n){Ou.hashDomain(e);const i={},s=[];$P.forEach(l=>{const u=e[l];u!=null&&(i[l]=Q8e[l](u),s.push({name:l,type:Bee[l]}))});const a=Ou.from(t);t=a.types;const o=Object.assign({},t);return xe(o.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),o.EIP712Domain=s,a.encode(n),{types:o,domain:i,primaryType:a.primaryType,message:a.visit(n,(l,u)=>{if(l.match(/^bytes(\d*)/))return bt(Pt(u));if(l.match(/^u?int/))return ur(u).toString();switch(l){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return xe(typeof u=="string","invalid string","value",u),u}xe(!1,"unsupported type","type",l)})}}};t9=new WeakMap,ep=new WeakMap,n4=new WeakMap,$R=new WeakSet,Ive=function(e){{const i=BP(e);if(i)return i}const t=YC(e).array;if(t){const i=t.prefix,s=this.getEncoder(i);return a=>{xe(t.count===-1||t.count===a.length,`array length mismatch; expected length ${t.count}`,"value",a);let o=a.map(s);return se(this,ep).has(i)&&(o=o.map(gi)),gi(An(o))}}const n=this.types[e];if(n){const i=Gc(se(this,ep).get(e));return s=>{const a=n.map(({name:o,type:l})=>{const u=this.getEncoder(l)(s[o]);return se(this,ep).has(l)?gi(u):u});return a.unshift(i),An(a)}}xe(!1,`unknown type: ${e}`,"type",e)};let Vh=Ou;function Fee(r,e,t,n){return _6(Vh.hash(r,e,t),n)}function Bo(r){const e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}const X8e=Bo("external public payable override".split(" ")),jee="constant external internal payable private public pure view override",exe=Bo(jee.split(" ")),zee="constructor error event fallback function receive struct",Hee=Bo(zee.split(" ")),qee="calldata memory storage payable indexed",txe=Bo(qee.split(" ")),rxe=[zee,qee,"tuple returns",jee].join(" "),nxe=Bo(rxe.split(" ")),ixe={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},sxe=new RegExp("^(\\s*)"),axe=new RegExp("^([0-9]+)"),oxe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Wee=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Vee=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),BR=class BR{constructor(e){$e(this,r9);$e(this,so);$e(this,Pf);ge(this,so,0),ge(this,Pf,e.slice())}get offset(){return se(this,so)}get length(){return se(this,Pf).length-se(this,so)}clone(){return new BR(se(this,Pf))}reset(){ge(this,so,0)}popKeyword(e){const t=this.peek();if(t.type!=="KEYWORD"||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=nt(this,r9,yJ).call(this,se(this,so)+1,e.match+1);return ge(this,so,e.match+1),t}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const t=[];for(;se(this,so)=se(this,Pf).length)throw new Error("out-of-bounds");return se(this,Pf)[se(this,so)]}peekKeyword(e){const t=this.peekType("KEYWORD");return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return P4(this,so)._++,e}toString(){const e=[];for(let t=se(this,so);t`}};so=new WeakMap,Pf=new WeakMap,r9=new WeakSet,yJ=function(e=0,t=0){return new BR(se(this,Pf).slice(e,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let ef=BR;function u1(r){const e=[],t=a=>{const o=s0&&e[e.length-1].type==="NUMBER"){const h=e.pop().text;f=h+f,e[e.length-1].value=Rr(h)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=f}continue}if(o=a.match(oxe),o){if(l.text=o[1],s+=l.text.length,nxe.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(Vee)){l.type="TYPE";continue}l.type="ID";continue}if(o=a.match(axe),o){l.text=o[1],l.type="NUMBER",s+=l.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`)}return new ef(e.map(a=>Object.freeze(a)))}function Gee(r,e){let t=[];for(const n in e.keys())r.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function QC(r,e){if(e.peekKeyword(Hee)){const t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function Gh(r,e){const t=new Set;for(;;){const n=r.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(r.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function Kee(r){let e=Gh(r,exe);return Gee(e,Bo("constant payable nonpayable".split(" "))),Gee(e,Bo("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Kh(r,e){return r.popParams().map(t=>Xs.from(t,e))}function Zee(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return ur(r.pop().text);throw new Error("invalid gas")}return null}function dg(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}const cxe=new RegExp(/^(.*)\[([0-9]*)\]$/);function Jee(r){const e=r.match(Vee);if(xe(e,"invalid type","type",r),r==="uint")return"uint256";if(r==="int")return"int256";if(e[2]){const t=parseInt(e[2]);xe(t!==0&&t<=32,"invalid bytes length","type",r)}else if(e[3]){const t=parseInt(e[3]);xe(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",r)}return r}const is={},pc=Symbol.for("_ethers_internal"),Yee="_ParamTypeInternal",Qee="_ErrorInternal",Xee="_EventInternal",ete="_ConstructorInternal",tte="_FallbackInternal",rte="_FunctionInternal",nte="_StructInternal",Nu=class Nu{constructor(e,t,n,i,s,a,o,l){$e(this,i4);Ae(this,"name");Ae(this,"type");Ae(this,"baseType");Ae(this,"indexed");Ae(this,"components");Ae(this,"arrayLength");Ae(this,"arrayChildren");if(nd(e,is,"ParamType"),Object.defineProperty(this,pc,{value:Yee}),a&&(a=Object.freeze(a.slice())),i==="array"){if(o==null||l==null)throw new Error("")}else if(o!=null||l!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");er(this,{name:t,type:n,baseType:i,indexed:s,components:a,arrayLength:o,arrayChildren:l})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":t+=this.type,e!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),e==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,t))}return t(this.type,e)}async walkAsync(e,t){const n=[],i=[e];return nt(this,i4,qR).call(this,n,e,t,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,t){if(Nu.isParamType(e))return e;if(typeof e=="string")try{return Nu.from(u1(e),t)}catch{xe(!1,"invalid param type","obj",e)}else if(e instanceof ef){let o="",l="",u=null;Gh(e,Bo(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(l="tuple",u=e.popParams().map(C=>Nu.from(C)),o=`tuple(${u.map(C=>C.format()).join(",")})`):(o=Jee(e.popType("TYPE")),l=o);let f=null,h=null;for(;e.length&&e.peekType("BRACKET");){const C=e.pop();f=new Nu(is,"",o,l,null,u,h,f),h=C.value,o+=C.text,l="array",u=null}let m=null;if(Gh(e,txe).has("indexed")){if(!t)throw new Error("");m=!0}const v=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Nu(is,v,o,l,m,u,h,f)}const n=e.name;xe(!n||typeof n=="string"&&n.match(Wee),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(xe(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,a=s.match(cxe);if(a){const o=parseInt(a[2]||"-1"),l=Nu.from({type:a[1],components:e.components});return new Nu(is,n||"",s,"array",i,null,o,l)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const o=e.components!=null?e.components.map(u=>Nu.from(u)):null;return new Nu(is,n||"",s,"tuple",i,o,null,null)}return s=Jee(e.type),new Nu(is,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[pc]===Yee}};i4=new WeakSet,qR=function(e,t,n,i){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,o=t.slice();o.forEach((l,u)=>{var f;nt(f=a,i4,qR).call(f,e,l,n,h=>{o[u]=h})}),i(o);return}if(this.isTuple()){const a=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");o=a.map(l=>{if(!l.name)throw new Error("cannot use object value with unnamed components");if(!(l.name in t))throw new Error(`missing value for component ${l.name}`);return t[l.name]})}if(o.length!==this.components.length)throw new Error("array is wrong length");o.forEach((l,u)=>{var f;nt(f=a[u],i4,qR).call(f,e,l,n,h=>{o[u]=h})}),i(o);return}const s=n(this.type,t);s.then?e.push(async function(){i(await s)}()):i(s)};let Xs=Nu;class Zh{constructor(e,t,n){Ae(this,"type");Ae(this,"inputs");nd(e,is,"Fragment"),n=Object.freeze(n.slice()),er(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{Zh.from(JSON.parse(e))}catch{}return Zh.from(u1(e))}if(e instanceof ef)switch(e.peekKeyword(Hee)){case"constructor":return tf.from(e);case"error":return wo.from(e);case"event":return Kl.from(e);case"fallback":case"receive":return rf.from(e);case"function":return Zl.from(e);case"struct":return Jh.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return tf.from(e);case"error":return wo.from(e);case"event":return Kl.from(e);case"fallback":case"receive":return rf.from(e);case"function":return Zl.from(e);case"struct":return Jh.from(e)}ze(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}xe(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return tf.isFragment(e)}static isError(e){return wo.isFragment(e)}static isEvent(e){return Kl.isFragment(e)}static isFunction(e){return Zl.isFragment(e)}static isStruct(e){return Jh.isFragment(e)}}class qw extends Zh{constructor(t,n,i,s){super(t,n,s);Ae(this,"name");xe(typeof i=="string"&&i.match(Wee),"invalid identifier","name",i),s=Object.freeze(s.slice()),er(this,{name:i})}}function C6(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}class wo extends qw{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,pc,{value:Qee})}get selector(){return Gc(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const t=[];return e!=="sighash"&&t.push("error"),t.push(this.name+C6(e,this.inputs)),t.join(" ")}static from(e){if(wo.isFragment(e))return e;if(typeof e=="string")return wo.from(u1(e));if(e instanceof ef){const t=QC("error",e),n=Kh(e);return dg(e),new wo(is,t,n)}return new wo(is,e.name,e.inputs?e.inputs.map(Xs.from):[])}static isFragment(e){return e&&e[pc]===Qee}}class Kl extends qw{constructor(t,n,i,s){super(t,"event",n,i);Ae(this,"anonymous");Object.defineProperty(this,pc,{value:Xee}),er(this,{anonymous:s})}get topicHash(){return Gc(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("event"),n.push(this.name+C6(t,this.inputs)),t!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(t,n){return n=(n||[]).map(s=>Xs.from(s)),new Kl(is,t,n,!1).topicHash}static from(t){if(Kl.isFragment(t))return t;if(typeof t=="string")try{return Kl.from(u1(t))}catch{xe(!1,"invalid event fragment","obj",t)}else if(t instanceof ef){const n=QC("event",t),i=Kh(t,!0),s=!!Gh(t,Bo(["anonymous"])).has("anonymous");return dg(t),new Kl(is,n,i,s)}return new Kl(is,t.name,t.inputs?t.inputs.map(n=>Xs.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[pc]===Xee}}class tf extends Zh{constructor(t,n,i,s,a){super(t,n,i);Ae(this,"payable");Ae(this,"gas");Object.defineProperty(this,pc,{value:ete}),er(this,{payable:s,gas:a})}format(t){if(ze(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t)))});const n=[`constructor${C6(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(tf.isFragment(t))return t;if(typeof t=="string")try{return tf.from(u1(t))}catch{xe(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof ef){Gh(t,Bo(["constructor"]));const n=Kh(t),i=!!Gh(t,X8e).has("payable"),s=Zee(t);return dg(t),new tf(is,"constructor",n,i,s)}return new tf(is,"constructor",t.inputs?t.inputs.map(Xs.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[pc]===ete}}class rf extends Zh{constructor(t,n,i){super(t,"fallback",n);Ae(this,"payable");Object.defineProperty(this,pc,{value:tte}),er(this,{payable:i})}format(t){const n=this.inputs.length===0?"receive":"fallback";if(t==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(t){if(rf.isFragment(t))return t;if(typeof t=="string")try{return rf.from(u1(t))}catch{xe(!1,"invalid fallback fragment","obj",t)}else if(t instanceof ef){const n=t.toString(),i=t.peekKeyword(Bo(["fallback","receive"]));if(xe(i,"type must be fallback or receive","obj",n),t.popKeyword(Bo(["fallback","receive"]))==="receive"){const l=Kh(t);return xe(l.length===0,"receive cannot have arguments","obj.inputs",l),Gh(t,Bo(["payable"])),dg(t),new rf(is,[],!0)}let a=Kh(t);a.length?xe(a.length===1&&a[0].type==="bytes","invalid fallback inputs","obj.inputs",a.map(l=>l.format("minimal")).join(", ")):a=[Xs.from("bytes")];const o=Kee(t);if(xe(o==="nonpayable"||o==="payable","fallback cannot be constants","obj.stateMutability",o),Gh(t,Bo(["returns"])).has("returns")){const l=Kh(t);xe(l.length===1&&l[0].type==="bytes","invalid fallback outputs","obj.outputs",l.map(u=>u.format("minimal")).join(", "))}return dg(t),new rf(is,a,o==="payable")}if(t.type==="receive")return new rf(is,[],!0);if(t.type==="fallback"){const n=[Xs.from("bytes")],i=t.stateMutability==="payable";return new rf(is,n,i)}xe(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[pc]===tte}}class Zl extends qw{constructor(t,n,i,s,a,o){super(t,"function",n,s);Ae(this,"constant");Ae(this,"outputs");Ae(this,"stateMutability");Ae(this,"payable");Ae(this,"gas");Object.defineProperty(this,pc,{value:rte}),a=Object.freeze(a.slice()),er(this,{constant:i==="view"||i==="pure",gas:o,outputs:a,payable:i==="payable",stateMutability:i})}get selector(){return Gc(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(t))),outputs:this.outputs.map(i=>JSON.parse(i.format(t)))});const n=[];return t!=="sighash"&&n.push("function"),n.push(this.name+C6(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(C6(t,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(t,n){return n=(n||[]).map(s=>Xs.from(s)),new Zl(is,t,"view",n,[],null).selector}static from(t){if(Zl.isFragment(t))return t;if(typeof t=="string")try{return Zl.from(u1(t))}catch{xe(!1,"invalid function fragment","obj",t)}else if(t instanceof ef){const i=QC("function",t),s=Kh(t),a=Kee(t);let o=[];Gh(t,Bo(["returns"])).has("returns")&&(o=Kh(t));const l=Zee(t);return dg(t),new Zl(is,i,a,s,o,l)}let n=t.stateMutability;return n==null&&(n="payable",typeof t.constant=="boolean"?(n="view",t.constant||(n="payable",typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable")),new Zl(is,t.name,n,t.inputs?t.inputs.map(Xs.from):[],t.outputs?t.outputs.map(Xs.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[pc]===rte}}class Jh extends qw{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,pc,{value:nte})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Jh.from(u1(e))}catch{xe(!1,"invalid struct fragment","obj",e)}else if(e instanceof ef){const t=QC("struct",e),n=Kh(e);return dg(e),new Jh(is,t,n)}return new Jh(is,e.name,e.inputs?e.inputs.map(Xs.from):[])}static isFragment(e){return e&&e[pc]===nte}}const nf=new Map;nf.set(0,"GENERIC_PANIC"),nf.set(1,"ASSERT_FALSE"),nf.set(17,"OVERFLOW"),nf.set(18,"DIVIDE_BY_ZERO"),nf.set(33,"ENUM_RANGE_ERROR"),nf.set(34,"BAD_STORAGE_DATA"),nf.set(49,"STACK_UNDERFLOW"),nf.set(50,"ARRAY_RANGE_ERROR"),nf.set(65,"OUT_OF_MEMORY"),nf.set(81,"UNINITIALIZED_FUNCTION_CALL");const lxe=new RegExp(/^bytes([0-9]*)$/),uxe=new RegExp(/^(u?int)([0-9]*)$/);let LP=null,ite=1024;function fxe(r,e,t,n){let i="missing revert data",s=null;const a=null;let o=null;if(t){i="execution reverted";const u=Pt(t);if(t=bt(t),u.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(bt(u.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],u.slice(4))[0],o={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(bt(u.slice(0,4))==="0x4e487b71")try{const f=Number(n.decode(["uint256"],u.slice(4))[0]);o={signature:"Panic(uint256)",name:"Panic",args:[f]},s=`Panic due to ${nf.get(f)||"UNKNOWN"}(${f})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const l={to:e.to?Vr(e.to):null,data:e.data||"0x"};return e.from&&(l.from=Vr(e.from)),Oi(i,"CALL_EXCEPTION",{action:r,data:t,reason:s,transaction:l,invocation:a,revert:o})}const LR=class LR{constructor(){$e(this,Tm)}getDefaultValue(e){const t=e.map(i=>nt(this,Tm,O4).call(this,Xs.from(i)));return new FC(t,"_").defaultValue()}encode(e,t){mC(t.length,e.length,"types/values length mismatch");const n=e.map(a=>nt(this,Tm,O4).call(this,Xs.from(a))),i=new FC(n,"_"),s=new ZM;return i.encode(s,t),s.data}decode(e,t,n){const i=e.map(a=>nt(this,Tm,O4).call(this,Xs.from(a)));return new FC(i,"_").decode(new JM(t,n,ite))}static _setDefaultMaxInflation(e){xe(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),ite=e}static defaultAbiCoder(){return LP==null&&(LP=new LR),LP}static getBuiltinCallException(e,t,n){return fxe(e,t,n,LR.defaultAbiCoder())}};Tm=new WeakSet,O4=function(e){if(e.isArray())return new B6e(nt(this,Tm,O4).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new FC(e.components.map(n=>nt(this,Tm,O4).call(this,n)),e.name);switch(e.baseType){case"address":return new D6e(e.name);case"bool":return new L6e(e.name);case"string":return new G6e(e.name);case"bytes":return new U6e(e.name);case"":return new z6e(e.name)}let t=e.type.match(uxe);if(t){let n=parseInt(t[2]||"256");return xe(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new V6e(n/8,t[1]==="int",e.name)}if(t=e.type.match(lxe),t){let n=parseInt(t[1]);return xe(n!==0&&n<=32,"invalid bytes length","param",e),new F6e(n,e.name)}xe(!1,"invalid type","type",e.type)};let f1=LR;function ste(r){const e=zs(r);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return c6(e,32)}function ate(r){const e=Pt(r,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return Bh(e.slice(0,t))}class UP{constructor(e,t,n){Ae(this,"fragment");Ae(this,"name");Ae(this,"signature");Ae(this,"topic");Ae(this,"args");const i=e.name,s=e.format();er(this,{fragment:e,name:i,signature:s,topic:t,args:n})}}class FP{constructor(e,t,n,i){Ae(this,"fragment");Ae(this,"name");Ae(this,"args");Ae(this,"signature");Ae(this,"selector");Ae(this,"value");const s=e.name,a=e.format();er(this,{fragment:e,name:s,args:n,signature:a,selector:t,value:i})}}class jP{constructor(e,t,n){Ae(this,"fragment");Ae(this,"name");Ae(this,"args");Ae(this,"signature");Ae(this,"selector");const i=e.name,s=e.format();er(this,{fragment:e,name:i,args:n,signature:s,selector:t})}}class XC{constructor(e){Ae(this,"hash");Ae(this,"_isIndexed");er(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const ote={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},cte={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r=>`reverted with reason string ${JSON.stringify(r)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r=>{let e="unknown panic code";return r>=0&&r<=255&&ote[r.toString()]&&(e=ote[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}},P2=class P2{constructor(e){$e(this,gh);Ae(this,"fragments");Ae(this,"deploy");Ae(this,"fallback");Ae(this,"receive");$e(this,hh);$e(this,ph);$e(this,mh);$e(this,Po);let t=[];typeof e=="string"?t=JSON.parse(e):t=e,ge(this,mh,new Map),ge(this,hh,new Map),ge(this,ph,new Map);const n=[];for(const a of t)try{n.push(Zh.from(a))}catch(o){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,o.message)}er(this,{fragments:Object.freeze(n)});let i=null,s=!1;ge(this,Po,this.getAbiCoder()),this.fragments.forEach((a,o)=>{let l;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}er(this,{deploy:a});return;case"fallback":a.inputs.length===0?s=!0:(xe(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${o}]`,a),i=a,s=i.payable);return;case"function":l=se(this,mh);break;case"event":l=se(this,ph);break;case"error":l=se(this,hh);break;default:return}const u=a.format();l.has(u)||l.set(u,a)}),this.deploy||er(this,{deploy:tf.from("constructor()")}),er(this,{fallback:i,receive:s})}format(e){const t=e?"minimal":"full";return this.fragments.map(i=>i.format(t))}formatJson(){const e=this.fragments.map(t=>t.format("json"));return JSON.stringify(e.map(t=>JSON.parse(t)))}getAbiCoder(){return f1.defaultAbiCoder()}getFunctionName(e){const t=nt(this,gh,WR).call(this,e,null,!1);return xe(t,"no matching function","key",e),t.name}hasFunction(e){return!!nt(this,gh,WR).call(this,e,null,!1)}getFunction(e,t){return nt(this,gh,WR).call(this,e,t||null,!0)}forEachFunction(e){const t=Array.from(se(this,mh).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;nn.localeCompare(i));for(let n=0;n1){const s=i.map(a=>JSON.stringify(a.format())).join(", ");xe(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=wo.from(e).format(),e==="Error(string)")return wo.from("error Error(string)");if(e==="Panic(uint256)")return wo.from("error Panic(uint256)");const n=se(this,hh).get(e);return n||null}forEachError(e){const t=Array.from(se(this,hh).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;ns.type==="string"?Gc(a):s.type==="bytes"?gi(bt(a)):(s.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":s.type.match(/^u?int/)?a=Zu(a):s.type.match(/^bytes/)?a=c6(a,32):s.type==="address"&&se(this,Po).encode(["address"],[a]),Ha(bt(a),32));for(t.forEach((s,a)=>{const o=e.inputs[a];if(!o.indexed){xe(s==null,"cannot filter non-indexed parameters; must be null","contract."+o.name,s);return}s==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?xe(!1,"filtering with tuples or arrays not supported","contract."+o.name,s):Array.isArray(s)?n.push(s.map(l=>i(o,l))):n.push(i(o,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e=="string"){const a=this.getEvent(e);xe(a,"unknown event","eventFragment",e),e=a}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),xe(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((a,o)=>{const l=t[o];if(a.indexed)if(a.type==="string")n.push(Gc(l));else if(a.type==="bytes")n.push(gi(l));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(se(this,Po).encode([a.type],[l]))}else i.push(a),s.push(l)}),{data:se(this,Po).encode(i,s),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"){const b=this.getEvent(e);xe(b,"unknown event","eventFragment",e),e=b}if(n!=null&&!e.anonymous){const b=e.topicHash;xe(pi(n[0],32)&&n[0].toLowerCase()===b,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],a=[];e.inputs.forEach((b,v)=>{b.indexed?b.type==="string"||b.type==="bytes"||b.baseType==="tuple"||b.baseType==="array"?(i.push(Xs.from({type:"bytes32",name:b.name})),a.push(!0)):(i.push(b),a.push(!1)):(s.push(b),a.push(!1))});const o=n!=null?se(this,Po).decode(i,An(n)):null,l=se(this,Po).decode(s,t,!0),u=[],f=[];let h=0,m=0;return e.inputs.forEach((b,v)=>{let C=null;if(b.indexed)if(o==null)C=new XC(null);else if(a[v])C=new XC(o[m++]);else try{C=o[m++]}catch(R){C=R}else try{C=l[h++]}catch(R){C=R}u.push(C),f.push(b.name||null)}),i1.fromItems(u,f)}parseTransaction(e){const t=Pt(e.data,"tx.data"),n=ur(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(bt(t.slice(0,4)));if(!i)return null;const s=se(this,Po).decode(i.inputs,t.slice(4));return new FP(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new UP(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=bt(e),n=this.getError(mi(t,0,4));if(!n)return null;const i=se(this,Po).decode(n.inputs,mi(t,4));return new jP(n,n.selector,i)}static from(e){return e instanceof P2?e:typeof e=="string"?new P2(JSON.parse(e)):typeof e.formatJson=="function"?new P2(e.formatJson()):typeof e.format=="function"?new P2(e.format("json")):new P2(e)}};hh=new WeakMap,ph=new WeakMap,mh=new WeakMap,Po=new WeakMap,gh=new WeakSet,WR=function(e,t,n){if(pi(e)){const s=e.toLowerCase();for(const a of se(this,mh).values())if(s===a.selector)return a;return null}if(e.indexOf("(")===-1){const s=[];for(const[a,o]of se(this,mh))a.split("(")[0]===e&&s.push(o);if(t){const a=t.length>0?t[t.length-1]:null;let o=t.length,l=!0;va.isTyped(a)&&a.type==="overrides"&&(l=!1,o--);for(let u=s.length-1;u>=0;u--){const f=s[u].inputs.length;f!==o&&(!l||f!==o-1)&&s.splice(u,1)}for(let u=s.length-1;u>=0;u--){const f=s[u].inputs;for(let h=0;h=f.length){if(t[h].type==="overrides")continue;s.splice(u,1);break}if(t[h].type!==f[h].baseType){s.splice(u,1);break}}}}if(s.length===1&&t&&t.length!==s[0].inputs.length){const a=t[t.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){const a=s.map(o=>JSON.stringify(o.format())).join(", ");xe(!1,`ambiguous function description (i.e. matches ${a})`,"key",e)}return s[0]}const i=se(this,mh).get(Zl.from(e).format());return i||null},VR=function(e,t,n){if(pi(e)){const s=e.toLowerCase();for(const a of se(this,ph).values())if(s===a.topicHash)return a;return null}if(e.indexOf("(")===-1){const s=[];for(const[a,o]of se(this,ph))a.split("(")[0]===e&&s.push(o);if(t){for(let a=s.length-1;a>=0;a--)s[a].inputs.length=0;a--){const o=s[a].inputs;for(let l=0;l1&&n){const a=s.map(o=>JSON.stringify(o.format())).join(", ");xe(!1,`ambiguous event description (i.e. matches ${a})`,"key",e)}return s[0]}const i=se(this,ph).get(Kl.from(e).format());return i||null};let hg=P2;const lte=BigInt(0);function Ww(r){return r??null}function Cs(r){return r==null?null:r.toString()}class eA{constructor(e,t,n){Ae(this,"gasPrice");Ae(this,"maxFeePerGas");Ae(this,"maxPriorityFeePerGas");er(this,{gasPrice:Ww(e),maxFeePerGas:Ww(t),maxPriorityFeePerGas:Ww(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Cs(e),maxFeePerGas:Cs(t),maxPriorityFeePerGas:Cs(n)}}}function pg(r){const e={};r.to&&(e.to=r.to),r.from&&(e.from=r.from),r.data&&(e.data=bt(r.data));const t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of t)!(i in r)||r[i]==null||(e[i]=ur(r[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in r)||r[i]==null||(e[i]=Rr(r[i],`request.${i}`));return r.accessList&&(e.accessList=od(r.accessList)),"blockTag"in r&&(e.blockTag=r.blockTag),"enableCcipRead"in r&&(e.enableCcipRead=!!r.enableCcipRead),"customData"in r&&(e.customData=r.customData),"blobVersionedHashes"in r&&r.blobVersionedHashes&&(e.blobVersionedHashes=r.blobVersionedHashes.slice()),"kzg"in r&&(e.kzg=r.kzg),"blobs"in r&&r.blobs&&(e.blobs=r.blobs.map(i=>xw(i)?bt(i):Object.assign({},i))),e}class zP{constructor(e,t){Ae(this,"provider");Ae(this,"number");Ae(this,"hash");Ae(this,"timestamp");Ae(this,"parentHash");Ae(this,"parentBeaconBlockRoot");Ae(this,"nonce");Ae(this,"difficulty");Ae(this,"gasLimit");Ae(this,"gasUsed");Ae(this,"stateRoot");Ae(this,"receiptsRoot");Ae(this,"blobGasUsed");Ae(this,"excessBlobGas");Ae(this,"miner");Ae(this,"prevRandao");Ae(this,"extraData");Ae(this,"baseFeePerGas");$e(this,tp);ge(this,tp,e.transactions.map(n=>typeof n!="string"?new gg(n,t):n)),er(this,{provider:t,hash:Ww(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Ww(e.prevRandao),extraData:e.extraData,baseFeePerGas:Ww(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return se(this,tp).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=se(this,tp).slice();return e.length===0?[]:(ze(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:i,gasUsed:s,hash:a,miner:o,prevRandao:l,nonce:u,number:f,parentHash:h,parentBeaconBlockRoot:m,stateRoot:b,receiptsRoot:v,timestamp:C,transactions:R}=this;return{_type:"Block",baseFeePerGas:Cs(e),difficulty:Cs(t),extraData:n,gasLimit:Cs(i),gasUsed:Cs(s),blobGasUsed:Cs(this.blobGasUsed),excessBlobGas:Cs(this.excessBlobGas),hash:a,miner:o,prevRandao:l,nonce:u,number:f,parentHash:h,timestamp:C,parentBeaconBlockRoot:m,stateRoot:b,receiptsRoot:v,transactions:R}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>enew mg(i,t))));let n=lte;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),er(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return se(this,n9)}toJSON(){const{to:e,from:t,contractAddress:n,hash:i,index:s,blockHash:a,blockNumber:o,logsBloom:l,logs:u,status:f,root:h}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:o,contractAddress:n,cumulativeGasUsed:Cs(this.cumulativeGasUsed),from:t,gasPrice:Cs(this.gasPrice),blobGasUsed:Cs(this.blobGasUsed),blobGasPrice:Cs(this.blobGasPrice),gasUsed:Cs(this.gasUsed),hash:i,index:s,logs:u,logsBloom:l,root:h,status:f,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(o)return null;const{blockNumber:m,nonce:b}=await Zs({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(b{if(m==null||m.status!==0)return m;ze(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:m.to,from:m.from,data:""},receipt:m})},f=await this.provider.getTransactionReceipt(this.hash);if(n===0)return u(f);if(f){if(await f.confirmations()>=n)return u(f)}else if(await l(),n===0)return null;return await new Promise((m,b)=>{const v=[],C=()=>{v.forEach(k=>k())};if(v.push(()=>{o=!0}),i>0){const k=setTimeout(()=>{C(),b(Oi("wait for transaction timeout","TIMEOUT"))},i);v.push(()=>{clearTimeout(k)})}const R=async k=>{if(await k.confirmations()>=n){C();try{m(u(k))}catch(P){b(P)}}};if(v.push(()=>{this.provider.off(this.hash,R)}),this.provider.on(this.hash,R),s>=0){const k=async()=>{try{await l()}catch(P){if(xs(P,"TRANSACTION_REPLACED")){C(),b(P);return}}o||this.provider.once("block",k)};v.push(()=>{this.provider.off("block",k)}),this.provider.once("block",k)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),fte(this)}reorderedEvent(e){return ze(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ze(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ute(this,e)}replaceableTransaction(e){xe(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new PH(this,this.provider);return ge(t,km,e),t}};km=new WeakMap;let gg=PH;function dxe(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function ute(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function fte(r){return{orphan:"drop-transaction",tx:r}}function hxe(r){return{orphan:"drop-log",log:{transactionHash:r.transactionHash,blockHash:r.blockHash,blockNumber:r.blockNumber,address:r.address,data:r.data,topics:Object.freeze(r.topics.slice()),index:r.index}}}class A6 extends mg{constructor(t,n,i){super(t,t.provider);Ae(this,"interface");Ae(this,"fragment");Ae(this,"args");const s=n.decodeEventLog(i,t.data,t.topics);er(this,{args:s,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class rA extends mg{constructor(t,n){super(t,t.provider);Ae(this,"error");er(this,{error:n})}}class HP extends tA{constructor(t,n,i){super(i,n);$e(this,s4);ge(this,s4,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?se(this,s4).getEvent(t.topics[0]):null;if(n)try{return new A6(t,se(this,s4),n)}catch(i){return new rA(t,i)}return t})}}s4=new WeakMap;class S6 extends gg{constructor(t,n,i){super(i,n);$e(this,i9);ge(this,i9,t)}async wait(t,n){const i=await super.wait(t,n);return i==null?null:new HP(se(this,i9),this.provider,i)}}i9=new WeakMap;class nA extends xC{constructor(t,n,i,s){super(t,n,i);Ae(this,"log");er(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class qP extends nA{constructor(e,t,n,i,s){super(e,t,n,new A6(s,e.interface,i));const a=e.interface.decodeEventLog(i,this.log.data,this.log.topics);er(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const dte=BigInt(0);function hte(r){return r&&typeof r.call=="function"}function pte(r){return r&&typeof r.estimateGas=="function"}function iA(r){return r&&typeof r.resolveName=="function"}function mte(r){return r&&typeof r.sendTransaction=="function"}function gte(r){if(r!=null){if(iA(r))return r;if(r.provider)return r.provider}}class pxe{constructor(e,t,n){$e(this,s9);Ae(this,"fragment");if(er(this,{fragment:t}),t.inputs.lengthn[l]==null?null:o.walkAsync(n[l],(f,h)=>f==="address"?Array.isArray(h)?Promise.all(h.map(m=>Qs(m,s))):Qs(h,s):h)));return e.interface.encodeFilterTopics(t,a)}())}getTopicFilter(){return se(this,s9)}}s9=new WeakMap;function bg(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function vg(r){return r==null?null:r.provider||null}async function WP(r,e){const t=va.dereference(r,"overrides");xe(typeof t=="object","invalid overrides parameter","overrides",r);const n=pg(t);return xe(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),xe(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function bte(r,e,t){const n=bg(r,"resolveName"),i=iA(n)?n:null;return await Promise.all(e.map((s,a)=>s.walkAsync(t[a],(o,l)=>(l=va.dereference(l,o),o==="address"?Qs(l,i):l))))}function mxe(r){const e=async function(a){const o=await WP(a,["data"]);o.to=await r.getAddress(),o.from&&(o.from=await Qs(o.from,gte(r.runner)));const l=r.interface,u=ur(o.value||dte,"overrides.value")===dte,f=(o.data||"0x")==="0x";l.fallback&&!l.fallback.payable&&l.receive&&!f&&!u&&xe(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),xe(l.fallback||f,"cannot send data to receive-only contract","overrides.data",o.data);const h=l.receive||l.fallback&&l.fallback.payable;return xe(h||u,"cannot send value to non-payable fallback","overrides.value",o.value),xe(l.fallback||f,"cannot send data to receive-only contract","overrides.data",o.data),o},t=async function(a){const o=bg(r.runner,"call");ze(hte(o),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const l=await e(a);try{return await o.call(l)}catch(u){throw o6(u)&&u.data?r.interface.makeError(u.data,l):u}},n=async function(a){const o=r.runner;ze(mte(o),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const l=await o.sendTransaction(await e(a)),u=vg(r.runner);return new S6(r.interface,u,l)},i=async function(a){const o=bg(r.runner,"estimateGas");return ze(pte(o),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await o.estimateGas(await e(a))},s=async a=>await n(a);return er(s,{_contract:r,estimateGas:i,populateTransaction:e,send:n,staticCall:t}),s}function gxe(r,e){const t=function(...u){const f=r.interface.getFunction(e,u);return ze(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:u}}),f},n=async function(...u){const f=t(...u);let h={};if(f.inputs.length+1===u.length&&(h=await WP(u.pop()),h.from&&(h.from=await Qs(h.from,gte(r.runner)))),f.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const m=await bte(r.runner,f.inputs,u);return Object.assign({},h,await Zs({to:r.getAddress(),data:r.interface.encodeFunctionData(f,m)}))},i=async function(...u){const f=await o(...u);return f.length===1?f[0]:f},s=async function(...u){const f=r.runner;ze(mte(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const h=await f.sendTransaction(await n(...u)),m=vg(r.runner);return new S6(r.interface,m,h)},a=async function(...u){const f=bg(r.runner,"estimateGas");return ze(pte(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await n(...u))},o=async function(...u){const f=bg(r.runner,"call");ze(hte(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const h=await n(...u);let m="0x";try{m=await f.call(h)}catch(v){throw o6(v)&&v.data?r.interface.makeError(v.data,h):v}const b=t(...u);return r.interface.decodeFunctionResult(b,m)},l=async(...u)=>t(...u).constant?await i(...u):await s(...u);return er(l,{name:r.interface.getFunctionName(e),_contract:r,_key:e,getFragment:t,estimateGas:a,populateTransaction:n,send:s,staticCall:i,staticCallResult:o}),Object.defineProperty(l,"fragment",{configurable:!1,enumerable:!0,get:()=>{const u=r.interface.getFunction(e);return ze(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),l}function bxe(r,e){const t=function(...i){const s=r.interface.getEvent(e,i);return ze(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new pxe(r,t(...i),i)};return er(n,{name:r.interface.getEventName(e),_contract:r,_key:e,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=r.interface.getEvent(e);return ze(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const sA=Symbol.for("_ethersInternal_contract"),vte=new WeakMap;function vxe(r,e){vte.set(r[sA],e)}function Kc(r){return vte.get(r[sA])}function wxe(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function VP(r,e){let t,n=null;if(Array.isArray(e)){const s=function(a){if(pi(a,32))return a;const o=r.interface.getEvent(a);return xe(o,"unknown fragment","name",a),o.topicHash};t=e.map(a=>a==null?null:Array.isArray(a)?a.map(s):s(a))}else e==="*"?t=[null]:typeof e=="string"?pi(e,32)?t=[e]:(n=r.interface.getEvent(e),xe(n,"unknown fragment","event",e),t=[n.topicHash]):wxe(e)?t=await e.getTopicFilter():"fragment"in e?(n=e.fragment,t=[n.topicHash]):xe(!1,"unknown event name","event",e);t=t.map(s=>{if(s==null)return null;if(Array.isArray(s)){const a=Array.from(new Set(s.map(o=>o.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return s.toLowerCase()});const i=t.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:t}}async function I6(r,e){const{subs:t}=Kc(r);return t.get((await VP(r,e)).tag)||null}async function wte(r,e,t){const n=vg(r.runner);ze(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:a}=await VP(r,t),{addr:o,subs:l}=Kc(r);let u=l.get(s);if(!u){const h={address:o||r,topics:a},m=R=>{let k=i;if(k==null)try{k=r.interface.getEvent(R.topics[0])}catch{}if(k){const P=k,N=i?r.interface.decodeEventLog(i,R.data,R.topics):[];KP(r,t,N,$=>new qP(r,$,t,P,R))}else KP(r,t,[],P=>new nA(r,P,t,R))};let b=[];u={tag:s,listeners:[],start:()=>{b.length||b.push(n.on(h,m))},stop:async()=>{if(b.length==0)return;let R=b;b=[],await Promise.all(R),n.off(h,m)}},l.set(s,u)}return u}let GP=Promise.resolve();async function yxe(r,e,t,n){await GP;const i=await I6(r,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:o})=>{const l=Array.from(t);n&&l.push(n(o?null:a));try{a.call(r,...l)}catch{}return!o}),i.listeners.length===0&&(i.stop(),Kc(r).subs.delete(i.tag)),s>0}async function KP(r,e,t,n){try{await GP}catch{}const i=yxe(r,e,t,n);return GP=i,await i}const aA=["then"];uve=sA;const a9=class a9{constructor(e,t,n,i){Ae(this,"target");Ae(this,"interface");Ae(this,"runner");Ae(this,"filters");Ae(this,uve);Ae(this,"fallback");xe(typeof e=="string"||UC(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=hg.from(t);er(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,sA,{value:{}});let a,o=null,l=null;if(i){const h=vg(n);l=new S6(this.interface,h,i)}let u=new Map;if(typeof e=="string")if(pi(e))o=e,a=Promise.resolve(e);else{const h=bg(n,"resolveName");if(!iA(h))throw Oi("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=h.resolveName(e).then(m=>{if(m==null)throw Oi("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Kc(this).addr=m,m})}else a=e.getAddress().then(h=>{if(h==null)throw new Error("TODO");return Kc(this).addr=h,h});vxe(this,{addrPromise:a,addr:o,deployTx:l,subs:u});const f=new Proxy({},{get:(h,m,b)=>{if(typeof m=="symbol"||aA.indexOf(m)>=0)return Reflect.get(h,m,b);try{return this.getEvent(m)}catch(v){if(!xs(v,"INVALID_ARGUMENT")||v.argument!=="key")throw v}},has:(h,m)=>aA.indexOf(m)>=0?Reflect.has(h,m):Reflect.has(h,m)||this.interface.hasEvent(String(m))});return er(this,{filters:f}),er(this,{fallback:s.receive||s.fallback?mxe(this):null}),new Proxy(this,{get:(h,m,b)=>{if(typeof m=="symbol"||m in h||aA.indexOf(m)>=0)return Reflect.get(h,m,b);try{return h.getFunction(m)}catch(v){if(!xs(v,"INVALID_ARGUMENT")||v.argument!=="key")throw v}},has:(h,m)=>typeof m=="symbol"||m in h||aA.indexOf(m)>=0?Reflect.has(h,m):h.interface.hasFunction(m)})}connect(e){return new a9(this.target,this.interface,e)}attach(e){return new a9(e,this.interface,this.runner)}async getAddress(){return await Kc(this).addrPromise}async getDeployedCode(){const e=vg(this.runner);ze(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=vg(this.runner);return ze(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",a)}catch(o){s(o)}};a()})}deploymentTransaction(){return Kc(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),gxe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),bxe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){t==null&&(t=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=Kc(this),a=i||await s,{fragment:o,topics:l}=await VP(this,e),u={address:a,topics:l,fromBlock:t,toBlock:n},f=vg(this.runner);return ze(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(u)).map(h=>{let m=o;if(m==null)try{m=this.interface.getEvent(h.topics[0])}catch{}if(m)try{return new A6(h,this.interface,m)}catch(b){return new rA(h,b)}return new mg(h,f)})}async on(e,t){const n=await wte(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await wte(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await KP(this,e,t,null)}async listenerCount(e){if(e){const i=await I6(this,e);return i?i.listeners.length:0}const{subs:t}=Kc(this);let n=0;for(const{listeners:i}of t.values())n+=i.length;return n}async listeners(e){if(e){const i=await I6(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:t}=Kc(this);let n=[];for(const{listeners:i}of t.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,t){const n=await I6(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(t==null||n.listeners.length===0)&&(n.stop(),Kc(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await I6(this,e);if(!t)return this;t.stop(),Kc(this).subs.delete(t.tag)}else{const{subs:t}=Kc(this);for(const{tag:n,stop:i}of t.values())i(),t.delete(n)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends a9{constructor(i,s=null){super(i,e,s)}}return t}static from(e,t,n){return n==null&&(n=null),new this(e,t,n)}};let wg=a9;function xxe(){return wg}let Yh=class extends xxe(){};class T6{constructor(e,t,n){Ae(this,"interface");Ae(this,"bytecode");Ae(this,"runner");const i=hg.from(e);t instanceof Uint8Array||(typeof t=="object"&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=bt(Pt(t)),er(this,{bytecode:t,interface:i,runner:n||null})}attach(e){return new wg(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(t=await WP(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await bte(this.runner,n.inputs,e),s=An([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},t,{data:s})}async deploy(...e){const t=await this.getDeployTransaction(...e);ze(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(t),i=LC(n);return new wg(i,this.interface,this.runner,n)}connect(e){return new T6(this.interface,this.bytecode,e)}static fromSolidity(e,t){xe(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}}function ZP(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):xe(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class JP{constructor(e){Ae(this,"name");er(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const yte=new RegExp("^(ipfs)://(.*)$","i"),xte=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),yte,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],a4=class a4{constructor(e,t,n){$e(this,Mm);Ae(this,"provider");Ae(this,"address");Ae(this,"name");$e(this,Rm);$e(this,O2);er(this,{provider:e,address:t,name:n}),ge(this,Rm,null),ge(this,O2,new Yh(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return se(this,Rm)==null&&ge(this,Rm,(async()=>{try{return await se(this,O2).supportsInterface("0x9061b923")}catch(e){if(xs(e,"CALL_EXCEPTION"))return!1;throw ge(this,Rm,null),e}})()),await se(this,Rm)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await nt(this,Mm,N4).call(this,"addr(bytes32)");return s==null||s===cg?null:s}catch(s){if(xs(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const a=await nt(this,Mm,N4).call(this,"addr(bytes32,uint)",[s]);if(pi(a,20))return Vr(a)}let t=null;for(const s of this.provider.plugins)if(s instanceof JP&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;const n=await nt(this,Mm,N4).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await t.decodeAddress(e,n);if(i!=null)return i;ze(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await nt(this,Mm,N4).call(this,"text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){const e=await nt(this,Mm,N4).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const i=t[1]==="e3010170"?"ipfs":"ipns",s=parseInt(t[4],16);if(t[5].length===s*2)return`${i}://${yC("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;ze(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(t==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let n=0;n{if(e&&t==null)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>r(n))}}function k6(r,e){return t=>{const n={};for(const i in r){let s=i;if(e&&i in e&&!(s in t)){for(const a of e[i])if(a in t){s=a;break}}try{const a=r[i](t[s]);a!==void 0&&(n[i]=a)}catch(a){const o=a instanceof Error?a.message:"not-an-error";ze(!1,`invalid value for value.${i} (${o})`,"BAD_DATA",{value:t})}}return n}}function _xe(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}xe(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function Gw(r){return xe(pi(r,!0),"invalid data","value",r),r}function qa(r){return xe(pi(r,32),"invalid hash","value",r),r}const Exe=k6({address:Vr,blockHash:qa,blockNumber:Rr,data:Gw,index:Rr,removed:Sn(_xe,!1),topics:oA(qa),transactionHash:qa,transactionIndex:Rr},{index:["logIndex"]});function Cxe(r){return Exe(r)}const Axe=k6({hash:Sn(qa),parentHash:qa,parentBeaconBlockRoot:Sn(qa,null),number:Rr,timestamp:Rr,nonce:Sn(Gw),difficulty:ur,gasLimit:ur,gasUsed:ur,stateRoot:Sn(qa,null),receiptsRoot:Sn(qa,null),blobGasUsed:Sn(ur,null),excessBlobGas:Sn(ur,null),miner:Sn(Vr),prevRandao:Sn(qa,null),extraData:Gw,baseFeePerGas:Sn(ur)},{prevRandao:["mixHash"]});function Sxe(r){const e=Axe(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:Ete(t)),e}const Ixe=k6({transactionIndex:Rr,blockNumber:Rr,transactionHash:qa,address:Vr,topics:oA(qa),data:Gw,index:Rr,blockHash:qa},{index:["logIndex"]});function Txe(r){return Ixe(r)}const kxe=k6({to:Sn(Vr,null),from:Sn(Vr,null),contractAddress:Sn(Vr,null),index:Rr,root:Sn(bt),gasUsed:ur,blobGasUsed:Sn(ur,null),logsBloom:Sn(Gw),blockHash:qa,hash:qa,logs:oA(Txe),blockNumber:Rr,cumulativeGasUsed:ur,effectiveGasPrice:Sn(ur),blobGasPrice:Sn(ur,null),status:Sn(Rr),type:Sn(Rr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Rxe(r){return kxe(r)}function Ete(r){r.to&&ur(r.to)===_te&&(r.to="0x0000000000000000000000000000000000000000");const e=k6({hash:qa,index:Sn(Rr,void 0),type:t=>t==="0x"||t==null?0:Rr(t),accessList:Sn(od,null),blobVersionedHashes:Sn(oA(qa,!0),null),blockHash:Sn(qa,null),blockNumber:Sn(Rr,null),transactionIndex:Sn(Rr,null),from:Vr,gasPrice:Sn(ur),maxPriorityFeePerGas:Sn(ur),maxFeePerGas:Sn(ur),maxFeePerBlobGas:Sn(ur,null),gasLimit:ur,to:Sn(Vr,null),value:ur,nonce:Rr,data:Gw,creates:Sn(Vr,null),chainId:Sn(ur,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=LC(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=Xu.from(r.signature):e.signature=Xu.from(r),e.chainId==null){const t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&ur(e.blockHash)===_te&&(e.blockHash=null),e}const Mxe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Qh{constructor(e){Ae(this,"name");er(this,{name:e})}clone(){return new Qh(this.name)}}class Kw extends Qh{constructor(t,n){t==null&&(t=0);super(`org.ethers.network.plugins.GasCost#${t||0}`);Ae(this,"effectiveBlock");Ae(this,"txBase");Ae(this,"txCreate");Ae(this,"txDataZero");Ae(this,"txDataNonzero");Ae(this,"txAccessListStorageKey");Ae(this,"txAccessListAddress");const i={effectiveBlock:t};function s(a,o){let l=(n||{})[a];l==null&&(l=o),xe(typeof l=="number",`invalud value for ${a}`,"costs",n),i[a]=l}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),er(this,i)}clone(){return new Kw(this.effectiveBlock,this)}}class Zw extends Qh{constructor(t,n){super("org.ethers.plugins.network.Ens");Ae(this,"address");Ae(this,"targetNetwork");er(this,{address:t||Mxe,targetNetwork:n??1})}clone(){return new Zw(this.address,this.targetNetwork)}}const OH=class OH extends Qh{constructor(t){super("org.ethers.plugins.network.FeeData");$e(this,N2);ge(this,N2,t)}get feeDataFunc(){return se(this,N2)}async getFeeData(t){return await se(this,N2).call(this,t)}clone(){return new OH(se(this,N2))}};N2=new WeakMap;let cA=OH;class YP extends Qh{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");$e(this,o9);$e(this,c9);ge(this,o9,t),ge(this,c9,n)}get url(){return se(this,o9)}get processFunc(){return se(this,c9)}clone(){return this}}o9=new WeakMap,c9=new WeakMap;const QP=new Map,l4=class l4{constructor(e,t){$e(this,o4);$e(this,c4);$e(this,Pm);ge(this,o4,e),ge(this,c4,ur(t)),ge(this,Pm,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return se(this,o4)}set name(e){ge(this,o4,e)}get chainId(){return se(this,c4)}set chainId(e){ge(this,c4,ur(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ur(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ur(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ur(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(se(this,Pm).values())}attachPlugin(e){if(se(this,Pm).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return se(this,Pm).set(e.name,e.clone()),this}getPlugin(e){return se(this,Pm).get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){const e=new l4(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new Kw;let n=t.txBase;if(e.to==null&&(n+=t.txCreate),e.data)for(let i=2;i9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function Ate(r){return new YP(r,async(e,t,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,a]=await Promise.all([n.send(),e()]);i=s;const o=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:Cte(o.maxFee,9),maxPriorityFeePerGas:Cte(o.maxPriorityFee,9)}}catch(s){ze(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let Ste=!1;function Pxe(){if(Ste)return;Ste=!0;function r(e,t,n){const i=function(){const s=new ps(e,t);return n.ensNetwork!=null&&s.attachPlugin(new Zw(null,n.ensNetwork)),s.attachPlugin(new Kw),(n.plugins||[]).forEach(a=>{s.attachPlugin(a)}),s};ps.register(e,i),ps.register(t,i),n.altNames&&n.altNames.forEach(s=>{ps.register(s,i)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[Ate("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Ate("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function XP(r){return JSON.parse(JSON.stringify(r))}class Oxe{constructor(e){$e(this,u4);$e(this,rp);$e(this,Du);$e(this,Om);$e(this,bh);ge(this,rp,e),ge(this,Du,null),ge(this,Om,4e3),ge(this,bh,-2)}get pollingInterval(){return se(this,Om)}set pollingInterval(e){ge(this,Om,e)}start(){se(this,Du)||(ge(this,Du,se(this,rp)._setTimeout(nt(this,u4,GR).bind(this),se(this,Om))),nt(this,u4,GR).call(this))}stop(){se(this,Du)&&(se(this,rp)._clearTimeout(se(this,Du)),ge(this,Du,null))}pause(e){this.stop(),e&&ge(this,bh,-2)}resume(){this.start()}}rp=new WeakMap,Du=new WeakMap,Om=new WeakMap,bh=new WeakMap,u4=new WeakSet,GR=async function(){try{const e=await se(this,rp).getBlockNumber();if(se(this,bh)===-2){ge(this,bh,e);return}if(e!==se(this,bh)){for(let t=se(this,bh)+1;t<=e;t++){if(se(this,Du)==null)return;await se(this,rp).emit("block",t)}ge(this,bh,e)}}catch{}se(this,Du)!=null&&ge(this,Du,se(this,rp)._setTimeout(nt(this,u4,GR).bind(this),se(this,Om)))};class eO{constructor(e){$e(this,D2);$e(this,$2);$e(this,Nm);ge(this,D2,e),ge(this,Nm,!1),ge(this,$2,t=>{this._poll(t,se(this,D2))})}async _poll(e,t){throw new Error("sub-classes must override this")}start(){se(this,Nm)||(ge(this,Nm,!0),se(this,$2).call(this,-2),se(this,D2).on("block",se(this,$2)))}stop(){se(this,Nm)&&(ge(this,Nm,!1),se(this,D2).off("block",se(this,$2)))}pause(e){this.stop()}resume(){this.start()}}D2=new WeakMap,$2=new WeakMap,Nm=new WeakMap;class Nxe extends eO{constructor(t,n){super(t);$e(this,f4);$e(this,np);ge(this,f4,n),ge(this,np,-2)}pause(t){t&&ge(this,np,-2),super.pause(t)}async _poll(t,n){const i=await n.getBlock(se(this,f4));i!=null&&(se(this,np)===-2?ge(this,np,i.number):i.number>se(this,np)&&(n.emit(se(this,f4),i.number),ge(this,np,i.number)))}}f4=new WeakMap,np=new WeakMap;class Dxe extends eO{constructor(t,n){super(t);$e(this,FR);ge(this,FR,XP(n))}async _poll(t,n){throw new Error("@TODO")}}FR=new WeakMap;class $xe extends eO{constructor(t,n){super(t);$e(this,d4);ge(this,d4,n)}async _poll(t,n){const i=await n.getTransactionReceipt(se(this,d4));i&&n.emit(se(this,d4),i)}}d4=new WeakMap;class tO{constructor(e,t){$e(this,jR);$e(this,ip);$e(this,h4);$e(this,p4);$e(this,Dm);$e(this,$u);ge(this,ip,e),ge(this,h4,XP(t)),ge(this,p4,nt(this,jR,kve).bind(this)),ge(this,Dm,!1),ge(this,$u,-2)}start(){se(this,Dm)||(ge(this,Dm,!0),se(this,$u)===-2&&se(this,ip).getBlockNumber().then(e=>{ge(this,$u,e)}),se(this,ip).on("block",se(this,p4)))}stop(){se(this,Dm)&&(ge(this,Dm,!1),se(this,ip).off("block",se(this,p4)))}pause(e){this.stop(),e&&ge(this,$u,-2)}resume(){this.start()}}ip=new WeakMap,h4=new WeakMap,p4=new WeakMap,Dm=new WeakMap,$u=new WeakMap,jR=new WeakSet,kve=async function(e){if(se(this,$u)===-2)return;const t=XP(se(this,h4));t.fromBlock=se(this,$u)+1,t.toBlock=e;const n=await se(this,ip).getLogs(t);if(n.length===0){se(this,$u){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,a)=>(s[a]=n[a],s),{})}return n})}class Jw{constructor(e){Ae(this,"name");er(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function Uxe(r){return JSON.parse(JSON.stringify(r))}function rO(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function nO(r,e){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(pi(r,32)){const t=r.toLowerCase();return{type:"transaction",tag:uA("tx",{hash:t}),hash:t}}if(r.orphan){const t=r;return{type:"orphan",tag:uA("orphan",t),filter:Uxe(t)}}if(r.address||r.topics){const t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?rO(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(t.address){const i=[],s=[],a=o=>{pi(o)?i.push(o):s.push((async()=>{i.push(await Qs(o,e))})())};Array.isArray(t.address)?t.address.forEach(a):a(t.address),s.length&&await Promise.all(s),n.address=rO(i.map(o=>o.toLowerCase()))}return{filter:n,tag:uA("event",n),type:"event"}}xe(!1,"unknown ProviderEvent","event",r)}function iO(){return new Date().getTime()}const Fxe={cacheTimeout:250,pollingInterval:4e3};class Yw{constructor(e,t){$e(this,hn);$e(this,Oo);$e(this,$m);$e(this,No);$e(this,m4);$e(this,yl);$e(this,B2);$e(this,Bm);$e(this,sp);$e(this,l9);$e(this,Bu);$e(this,g4);$e(this,b4);if(ge(this,b4,Object.assign({},Fxe,t||{})),e==="any")ge(this,B2,!0),ge(this,yl,null);else if(e){const n=ps.from(e);ge(this,B2,!1),ge(this,yl,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else ge(this,B2,!1),ge(this,yl,null);ge(this,sp,-1),ge(this,Bm,new Map),ge(this,Oo,new Map),ge(this,$m,new Map),ge(this,No,null),ge(this,m4,!1),ge(this,l9,1),ge(this,Bu,new Map),ge(this,g4,!1)}get pollingInterval(){return se(this,b4).pollingInterval}get provider(){return this}get plugins(){return Array.from(se(this,$m).values())}attachPlugin(e){if(se(this,$m).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return se(this,$m).set(e.name,e.connect(this)),this}getPlugin(e){return se(this,$m).get(e)||null}get disableCcipRead(){return se(this,g4)}set disableCcipRead(e){ge(this,g4,!!e)}async ccipReadFetch(e,t,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=t.toLowerCase(),a=[];for(let o=0;o=500,`response not found during CCIP fetch: ${h}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:l,errorMessage:h}}),a.push(h)}ze(!1,`error encountered during CCIP fetch: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:a}})}_wrapBlock(e,t){return new zP(Sxe(e),this)}_wrapLog(e,t){return new mg(Cxe(e),this)}_wrapTransactionReceipt(e,t){return new tA(Rxe(e),this)}_wrapTransactionResponse(e,t){return new gg(Ete(e),this)}_detectNetwork(){ze(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){ze(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Rr(await nt(this,hn,$l).call(this,{method:"getBlockNumber"}),"%response");return se(this,sp)>=0&&ge(this,sp,e),e}_getAddress(e){return Qs(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(pi(e))return pi(e,32)?e:$h(e);if(typeof e=="bigint"&&(e=Rr(e,"blockTag")),typeof e=="number")return e>=0?$h(e):se(this,sp)>=0?$h(se(this,sp)+e):this.getBlockNumber().then(t=>$h(t+e));xe(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const t=(e.topics||[]).map(l=>l==null?null:Array.isArray(l)?rO(l.map(u=>u.toLowerCase())):l.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(l,u,f)=>{let h;switch(l.length){case 0:break;case 1:h=l[0];break;default:l.sort(),h=l}if(n&&(u!=null||f!=null))throw new Error("invalid filter");const m={};return h&&(m.address=h),t.length&&(m.topics=t),u&&(m.fromBlock=u),f&&(m.toBlock=f),n&&(m.blockHash=n),m};let s=[];if(e.address)if(Array.isArray(e.address))for(const l of e.address)s.push(this._getAddress(l));else s.push(this._getAddress(e.address));let a;"fromBlock"in e&&(a=this._getBlockTag(e.fromBlock));let o;return"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),s.filter(l=>typeof l!="string").length||a!=null&&typeof a!="string"||o!=null&&typeof o!="string"?Promise.all([Promise.all(s),a,o]).then(l=>i(l[0],l[1],l[2])):i(s,a,o)}_getTransactionRequest(e){const t=pg(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;const s=Qs(t[i],this);lA(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){const i=this._getBlockTag(t.blockTag);lA(i)?n.push(async function(){t.blockTag=await i}()):t.blockTag=i}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(se(this,yl)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw se(this,yl)===i&&ge(this,yl,null),s}})();return ge(this,yl,i),(await i).clone()}const e=se(this,yl),[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(se(this,B2)?(this.emit("network",n,t),se(this,yl)===e&&ge(this,yl,Promise.resolve(n))):ze(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:i,gasPrice:s,priorityFee:a}=await Zs({_block:nt(this,hn,EJ).call(this,"latest",!1),gasPrice:(async()=>{try{const f=await nt(this,hn,$l).call(this,{method:"getGasPrice"});return ur(f,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const f=await nt(this,hn,$l).call(this,{method:"getPriorityFee"});return ur(f,"%response")}catch{}return null})()});let o=null,l=null;const u=this._wrapBlock(i,e);return u&&u.baseFeePerGas&&(l=a??BigInt("1000000000"),o=u.baseFeePerGas*Bxe+l),new eA(s,o,l)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new ga(n.url),s=await n.processFunc(t,this,i);return new eA(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return lA(t)&&(t=await t),ur(await nt(this,hn,$l).call(this,{method:"estimateGas",transaction:t}),"%response")}async call(e){const{tx:t,blockTag:n}=await Zs({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await nt(this,hn,_J).call(this,nt(this,hn,xJ).call(this,t,n,e.enableCcipRead?0:-1))}async getBalance(e,t){return ur(await nt(this,hn,CE).call(this,{method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return Rr(await nt(this,hn,CE).call(this,{method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return bt(await nt(this,hn,CE).call(this,{method:"getCode"},e,t))}async getStorage(e,t,n){const i=ur(t,"position");return bt(await nt(this,hn,CE).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:i}=await Zs({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=Hw.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(t)}async getBlock(e,t){const{network:n,params:i}=await Zs({network:this.getNetwork(),params:nt(this,hn,EJ).call(this,e,!!t)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:t,params:n}=await Zs({network:this.getNetwork(),params:nt(this,hn,$l).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await Zs({network:this.getNetwork(),params:nt(this,hn,$l).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await nt(this,hn,$l).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await Zs({network:this.getNetwork(),result:nt(this,hn,$l).call(this,{method:"getTransactionResult",hash:e})});return t==null?null:bt(t)}async getLogs(e){let t=this._getFilter(e);lA(t)&&(t=await t);const{network:n,params:i}=await Zs({network:this.getNetwork(),params:nt(this,hn,$l).call(this,{method:"getLogs",filter:t})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){ze(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await Vw.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=Vr(e);const t=x6(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await Vw.getEnsAddress(this),s=await new Yh(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===cg)return null;const o=await new Yh(s,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(o)!==e?null:o}catch(n){if(xs(n,"BAD_DATA")&&n.value==="0x"||xs(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const i=t??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,a)=>{let o=null;const l=async u=>{try{const f=await this.getTransactionReceipt(e);if(f!=null&&u-f.blockNumber+1>=i){s(f),o&&(clearTimeout(o),o=null);return}}catch(f){console.log("EEE",f)}this.once("block",l)};n!=null&&(o=setTimeout(()=>{o!=null&&(o=null,this.off("block",l),a(Oi("timeout","TIMEOUT",{reason:"timeout"})))},n)),l(await this.getBlockNumber())})}async waitForBlock(e){ze(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=se(this,Bu).get(e);t&&(t.timer&&clearTimeout(t.timer),se(this,Bu).delete(e))}_setTimeout(e,t){t==null&&(t=0);const n=P4(this,l9)._++,i=()=>{se(this,Bu).delete(n),e()};if(this.paused)se(this,Bu).set(n,{timer:null,func:i,time:t});else{const s=setTimeout(i,t);se(this,Bu).set(n,{timer:s,func:i,time:iO()})}return n}_forEachSubscriber(e){for(const t of se(this,Oo).values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Jw(e.type);case"block":{const t=new Oxe(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new Nxe(this,e.type);case"event":return new tO(this,e.filter);case"transaction":return new $xe(this,e.hash);case"orphan":return new Dxe(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of se(this,Oo).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),se(this,No)!=null&&t.pause(se(this,No));break}}async on(e,t){const n=await nt(this,hn,KR).call(this,e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,se(this,No)!=null&&n.subscriber.pause(se(this,No))),this}async once(e,t){const n=await nt(this,hn,KR).call(this,e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,se(this,No)!=null&&n.subscriber.pause(se(this,No))),this}async emit(e,...t){const n=await nt(this,hn,AE).call(this,e,t);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:a})=>{const o=new xC(this,a?null:s,e);try{s.call(this,...t,o)}catch{}return!a}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),se(this,Oo).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await nt(this,hn,AE).call(this,e);return n?n.listeners.length:0}let t=0;for(const{listeners:n}of se(this,Oo).values())t+=n.length;return t}async listeners(e){if(e){const n=await nt(this,hn,AE).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let t=[];for(const{listeners:n}of se(this,Oo).values())t=t.concat(n.map(({listener:i})=>i));return t}async off(e,t){const n=await nt(this,hn,AE).call(this,e);if(!n)return this;if(t){const i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),se(this,Oo).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:i}=await nt(this,hn,KR).call(this,e);n&&i.stop(),se(this,Oo).delete(t)}else for(const[t,{started:n,subscriber:i}]of se(this,Oo))n&&i.stop(),se(this,Oo).delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return se(this,m4)}destroy(){this.removeAllListeners();for(const e of se(this,Bu).keys())this._clearTimeout(e);ge(this,m4,!0)}get paused(){return se(this,No)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(ge(this,sp,-1),se(this,No)!=null){if(se(this,No)==!!e)return;ze(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(e)),ge(this,No,!!e);for(const t of se(this,Bu).values())t.timer&&clearTimeout(t.timer),t.time=iO()-t.time}resume(){if(se(this,No)!=null){this._forEachSubscriber(e=>e.resume()),ge(this,No,null);for(const e of se(this,Bu).values()){let t=e.time;t<0&&(t=0),e.time=iO(),setTimeout(e.func,t)}}}}Oo=new WeakMap,$m=new WeakMap,No=new WeakMap,m4=new WeakMap,yl=new WeakMap,B2=new WeakMap,Bm=new WeakMap,sp=new WeakMap,l9=new WeakMap,Bu=new WeakMap,g4=new WeakMap,b4=new WeakMap,hn=new WeakSet,$l=async function(e){const t=se(this,b4).cacheTimeout;if(t<0)return await this._perform(e);const n=uA(e.method,e);let i=se(this,Bm).get(n);return i||(i=this._perform(e),se(this,Bm).set(n,i),setTimeout(()=>{se(this,Bm).get(n)===i&&se(this,Bm).delete(n)},t)),await i},xJ=async function(e,t,n){ze(n=0&&t==="latest"&&i.to!=null&&mi(s.data,0,4)==="0x556f1830"){const a=s.data,o=await Qs(i.to,this);let l;try{l=Wxe(mi(s.data,4))}catch(h){ze(!1,h.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}ze(l.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:l.errorArgs}});const u=await this.ccipReadFetch(i,l.calldata,l.urls);ze(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:l.errorArgs}});const f={to:o,data:An([l.selector,qxe([u,l.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const h=await nt(this,hn,xJ).call(this,f,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:h}),h}catch(h){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:h}),h}}throw s}},_J=async function(e){const{value:t}=await Zs({network:this.getNetwork(),value:e});return t},CE=async function(e,t,n){let i=this._getAddress(t),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await nt(this,hn,_J).call(this,nt(this,hn,$l).call(this,Object.assign(e,{address:i,blockTag:s})))},EJ=async function(e,t){if(pi(e,32))return await nt(this,hn,$l).call(this,{method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await nt(this,hn,$l).call(this,{method:"getBlock",blockTag:n,includeTransactions:t})},AE=async function(e,t){let n=await nO(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await nO({orphan:"drop-log",log:t[0]},this)),se(this,Oo).get(n.tag)||null},KR=async function(e){const t=await nO(e,this),n=t.tag;let i=se(this,Oo).get(n);return i||(i={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},se(this,Oo).set(n,i)),i};function jxe(r,e){try{const t=sO(r,e);if(t)return Bh(t)}catch{}return null}function sO(r,e){if(r==="0x")return null;try{const t=Rr(mi(r,e,e+32)),n=Rr(mi(r,t,t+32));return mi(r,t+32,t+32+n)}catch{}return null}function Ite(r){const e=Ys(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function zxe(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}const Hxe=new Uint8Array([]);function qxe(r){const e=[];let t=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=mi(r,0,32);ze(mi(t,0,12)===mi(Tte,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=mi(t,12);try{const n=[],i=Rr(mi(r,32,64)),s=Rr(mi(r,i,i+32)),a=mi(r,i+32);for(let o=0;oe[n]),e}function Qw(r,e){if(r.provider)return r.provider;ze(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function kte(r,e){let t=pg(e);if(t.to!=null&&(t.to=Qs(t.to,r)),t.from!=null){const n=t.from;t.from=Promise.all([r.getAddress(),Qs(n,r)]).then(([i,s])=>(xe(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else t.from=r.getAddress();return await Zs(t)}class Xw{constructor(e){Ae(this,"provider");er(this,{provider:e||null})}async getNonce(e){return Qw(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await kte(this,e)}async populateTransaction(e){const t=Qw(this,"populateTransaction"),n=await kte(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const a=ur(n.chainId);xe(a===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?xe(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&xe(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const a=await t.getFeeData();ze(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=a.gasPrice)}else{const a=await t.getFeeData();if(n.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const o=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=o,n.maxPriorityFeePerGas=o}else n.maxFeePerGas==null&&(n.maxFeePerGas=a.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(ze(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=a.gasPrice),n.type=0):ze(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=a.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Zs(n)}async estimateGas(e){return Qw(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Qw(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Qw(this,"resolveName").resolveName(e)}async sendTransaction(e){const t=Qw(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=Hw.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}}const NH=class NH extends Xw{constructor(t,n){super(n);$e(this,v4);Ae(this,"address");er(this,{address:t})}async getAddress(){return this.address}connect(t){return new NH(this.address,t)}async signTransaction(t){nt(this,v4,ZR).call(this,"transactions","signTransaction")}async signMessage(t){nt(this,v4,ZR).call(this,"messages","signMessage")}async signTypedData(t,n,i){nt(this,v4,ZR).call(this,"typed-data","signTypedData")}};v4=new WeakSet,ZR=function(t,n){ze(!1,`VoidSigner cannot sign ${t}`,"UNSUPPORTED_OPERATION",{operation:n})};let R6=NH;const Rte=new Set;function Xh(r){Rte.has(r)||(Rte.add(r),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function Vxe(r){return JSON.parse(JSON.stringify(r))}class Mte{constructor(e){$e(this,Um);$e(this,ec);$e(this,vh);$e(this,L2);$e(this,Lm);$e(this,U2);$e(this,w4);ge(this,ec,e),ge(this,vh,null),ge(this,L2,nt(this,Um,CJ).bind(this)),ge(this,Lm,!1),ge(this,U2,null),ge(this,w4,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){se(this,Lm)||(ge(this,Lm,!0),nt(this,Um,CJ).call(this,-2))}stop(){se(this,Lm)&&(ge(this,Lm,!1),ge(this,w4,!0),nt(this,Um,AJ).call(this),se(this,ec).off("block",se(this,L2)))}pause(e){e&&nt(this,Um,AJ).call(this),se(this,ec).off("block",se(this,L2))}resume(){this.start()}}ec=new WeakMap,vh=new WeakMap,L2=new WeakMap,Lm=new WeakMap,U2=new WeakMap,w4=new WeakMap,Um=new WeakSet,CJ=async function(e){try{se(this,vh)==null&&ge(this,vh,this._subscribe(se(this,ec)));let t=null;try{t=await se(this,vh)}catch(s){if(!xs(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){ge(this,vh,null),se(this,ec)._recoverSubscriber(this,this._recover(se(this,ec)));return}const n=await se(this,ec).getNetwork();if(se(this,U2)||ge(this,U2,n),se(this,U2).chainId!==n.chainId)throw new Error("chaid changed");if(se(this,w4))return;const i=await se(this,ec).send("eth_getFilterChanges",[t]);await this._emitResults(se(this,ec),i)}catch(t){console.log("@TODO",t)}se(this,ec).once("block",se(this,L2))},AJ=function(){const e=se(this,vh);e&&(ge(this,vh,null),e.then(t=>{se(this,ec).destroyed||se(this,ec).send("eth_uninstallFilter",[t])}))};class Gxe extends Mte{constructor(t,n){super(t);$e(this,F2);ge(this,F2,Vxe(n))}_recover(t){return new tO(t,se(this,F2))}async _subscribe(t){return await t.send("eth_newFilter",[se(this,F2)])}async _emitResults(t,n){for(const i of n)t.emit(se(this,F2),t._wrapLog(i,t._network))}}F2=new WeakMap;class Kxe extends Mte{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const Zxe="bigint,boolean,function,number,string,symbol".split(/,/g);function fA(r){if(r==null||Zxe.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(fA);if(typeof r=="object")return Object.keys(r).reduce((e,t)=>(e[t]=r[t],e),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function Jxe(r){return new Promise(e=>{setTimeout(e,r)})}function e3(r){return r&&r.toLowerCase()}function Pte(r){return r&&typeof r.pollingInterval=="number"}const Ote={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class yg extends Xw{constructor(t,n){super(t);Ae(this,"address");n=Vr(n),er(this,{address:n})}connect(t){ze(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const n=fA(t),i=[];if(n.from){const a=n.from;i.push((async()=>{const o=await Qs(a,this.provider);xe(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=o})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const a=n.to;i.push((async()=>{n.to=await Qs(a,this.provider)})())}i.length&&await Promise.all(i);const s=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(t){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(t);return await new Promise((s,a)=>{const o=[1e3,100];let l=0;const u=async()=>{try{const f=await this.provider.getTransaction(i);if(f!=null){s(f.replaceableTransaction(n));return}}catch(f){if(xs(f,"CANCELLED")||xs(f,"BAD_DATA")||xs(f,"NETWORK_ERROR")||xs(f,"UNSUPPORTED_OPERATION")){f.info==null&&(f.info={}),f.info.sendTransactionHash=i,a(f);return}if(xs(f,"INVALID_ARGUMENT")&&(l++,f.info==null&&(f.info={}),f.info.sendTransactionHash=i,l>10)){a(f);return}this.provider.emit("error",Oi("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:f}))}this.provider._setTimeout(()=>{u()},o.pop()||4e3)};u()})}async signTransaction(t){const n=fA(t);if(n.from){const s=await Qs(n.from,this.provider);xe(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=s}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(t){const n=typeof t=="string"?zs(t):t;return await this.provider.send("personal_sign",[bt(n),this.address.toLowerCase()])}async signTypedData(t,n,i){const s=fA(i),a=await Vh.resolveNames(t,n,s,async o=>{const l=await Qs(o);return xe(l!=null,"TypedData does not support null address","value",o),l});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Vh.getPayload(a.domain,n,a.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const n=typeof t=="string"?zs(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),bt(n)])}}class dA extends Yw{constructor(t,n){super(t,n);$e(this,u9);$e(this,j2);$e(this,y4);$e(this,ap);$e(this,wh);$e(this,Of);$e(this,Lu);$e(this,jc);ge(this,y4,1),ge(this,j2,Object.assign({},Ote,n||{})),ge(this,ap,[]),ge(this,wh,null),ge(this,Lu,null),ge(this,jc,null);{let s=null;const a=new Promise(o=>{s=o});ge(this,Of,{promise:a,resolve:s})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(xe(!i||t!=="any","staticNetwork cannot be used on special network 'any'","options",n),i&&t!=null&&ge(this,Lu,ps.from(t))):i&&(xe(t==null||i.matches(t),"staticNetwork MUST match network object","options",n),ge(this,Lu,i))}_getOption(t){return se(this,j2)[t]}get _network(){return ze(se(this,Lu),"network is not available yet","NETWORK_ERROR"),se(this,Lu)}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let i=t.transaction;if(i&&i.type!=null&&ur(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(t);return n!=null?await this.send(n.method,n.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(se(this,Lu))return se(this,Lu)}else return t;return se(this,jc)?await se(this,jc):this.ready?(ge(this,jc,(async()=>{try{const n=ps.from(ur(await this.send("eth_chainId",[])));return ge(this,jc,null),n}catch(n){throw ge(this,jc,null),n}})()),await se(this,jc)):(ge(this,jc,(async()=>{const n={id:P4(this,y4)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0],ge(this,jc,null)}catch(s){throw ge(this,jc,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return ps.from(ur(i.result));throw this.getRpcError(n,i)})()),await se(this,jc))}_start(){se(this,Of)==null||se(this,Of).resolve==null||(se(this,Of).resolve(),ge(this,Of,null),(async()=>{for(;se(this,Lu)==null&&!this.destroyed;)try{ge(this,Lu,await this._detectNetwork())}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Oi("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await Jxe(1e3)}nt(this,u9,SJ).call(this)})())}async _waitUntilReady(){if(se(this,Of)!=null)return await se(this,Of).promise}_getSubscriber(t){return t.type==="pending"?new Kxe(this):t.type==="event"?this._getOption("polling")?new tO(this,t.filter):new Gxe(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new Jw("orphan"):super._getSubscriber(t)}get ready(){return se(this,Of)==null}getRpcTransaction(t){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(t[i]==null)return;let s=i;i==="gasLimit"&&(s="gas"),n[s]=$h(ur(t[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{t[i]!=null&&(n[i]=bt(t[i]))}),t.accessList&&(n.accessList=od(t.accessList)),t.blobVersionedHashes&&(n.blobVersionedHashes=t.blobVersionedHashes.map(i=>i.toLowerCase())),n}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[e3(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[e3(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[e3(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[e3(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(e3):t.filter.address=e3(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,n){const{method:i}=t,{error:s}=n;if(i==="eth_estimateGas"&&s.message){const l=s.message;if(!l.match(/revert/i)&&l.match(/insufficient funds/i))return Oi("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:s}})}if(i==="eth_call"||i==="eth_estimateGas"){const l=aO(s),u=f1.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",t.params[0],l?l.data:null);return u.info={error:s,payload:t},u}const a=JSON.stringify(Yxe(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return Oi("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:t,error:s}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const l=t.params[0];if(a.match(/insufficient funds|base fee exceeds gas limit/i))return Oi("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:l,info:{error:s}});if(a.match(/nonce/i)&&a.match(/too low/i))return Oi("nonce has already been used","NONCE_EXPIRED",{transaction:l,info:{error:s}});if(a.match(/replacement transaction/i)&&a.match(/underpriced/i))return Oi("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:l,info:{error:s}});if(a.match(/only replay-protected/i))return Oi("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:l,info:{error:s}}})}let o=!!a.match(/the method .* does not exist/i);return o||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(o=!0),o?Oi("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:s,payload:t}}):Oi("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:t})}send(t,n){if(this.destroyed)return Promise.reject(Oi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const i=P4(this,y4)._++,s=new Promise((a,o)=>{se(this,ap).push({resolve:a,reject:o,payload:{method:t,params:n,id:i,jsonrpc:"2.0"}})});return nt(this,u9,SJ).call(this),s}async getSigner(t){t==null&&(t=0);const n=this.send("eth_accounts",[]);if(typeof t=="number"){const s=await n;if(t>=s.length)throw new Error("no such account");return new yg(this,s[t])}const{accounts:i}=await Zs({network:this.getNetwork(),accounts:n});t=Vr(t);for(const s of i)if(Vr(s)===t)return new yg(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new yg(this,n))}destroy(){se(this,wh)&&(clearTimeout(se(this,wh)),ge(this,wh,null));for(const{payload:t,reject:n}of se(this,ap))n(Oi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));ge(this,ap,[]),super.destroy()}}j2=new WeakMap,y4=new WeakMap,ap=new WeakMap,wh=new WeakMap,Of=new WeakMap,Lu=new WeakMap,jc=new WeakMap,u9=new WeakSet,SJ=function(){if(se(this,wh))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");ge(this,wh,setTimeout(()=>{ge(this,wh,null);const n=se(this,ap);for(ge(this,ap,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==se(this,j2).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(a=>a.payload)).length>se(this,j2).batchMaxSize){n.unshift(i.pop());break}(async()=>{const s=i.length===1?i[0].payload:i.map(a=>a.payload);this.emit("debug",{action:"sendRpcPayload",payload:s});try{const a=await this._send(s);this.emit("debug",{action:"receiveRpcResult",result:a});for(const{resolve:o,reject:l,payload:u}of i){if(this.destroyed){l(Oi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const f=a.filter(h=>h.id===u.id)[0];if(f==null){const h=Oi("missing response for request","BAD_DATA",{value:a,info:{payload:u}});this.emit("error",h),l(h);continue}if("error"in f){l(this.getRpcError(u,f));continue}o(f.result)}}catch(a){this.emit("debug",{action:"receiveRpcError",error:a});for(const{reject:o}of i)o(a)}})()}},t))};class Nte extends dA{constructor(t,n){super(t,n);$e(this,Fm);let i=this._getOption("pollingInterval");i==null&&(i=Ote.pollingInterval),ge(this,Fm,i)}_getSubscriber(t){const n=super._getSubscriber(t);return Pte(n)&&(n.pollingInterval=se(this,Fm)),n}get pollingInterval(){return se(this,Fm)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");ge(this,Fm,t),this._forEachSubscriber(n=>{Pte(n)&&(n.pollingInterval=se(this,Fm))})}}Fm=new WeakMap;let mc=(fve=class extends Nte{constructor(t,n,i){t==null&&(t="http://localhost:8545");super(n,i);$e(this,x4);typeof t=="string"?ge(this,x4,new ga(t)):ge(this,x4,t.clone())}_getConnection(){return se(this,x4).clone()}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){const n=this._getConnection();n.body=JSON.stringify(t),n.setHeader("content-type","application/json");const i=await n.send();i.assertOk();let s=i.bodyJson;return Array.isArray(s)||(s=[s]),s}},x4=new WeakMap,fve);function aO(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&pi(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const e in r){const t=aO(r[e]);if(t)return t}return null}if(typeof r=="string")try{return aO(JSON.parse(r))}catch{}return null}function oO(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(const t in r)oO(r[t],e);if(typeof r=="string")try{return oO(JSON.parse(r),e)}catch{}}}function Yxe(r){const e=[];return oO(r,e),e}const hA="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Qxe(r){switch(r){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}xe(!1,"unsupported network","network",r)}class t3 extends mc{constructor(t,n){t==null&&(t="mainnet");const i=ps.from(t);n==null&&(n=hA);const s={polling:!0,staticNetwork:i},a=t3.getRequest(i,n);super(a,i,s);Ae(this,"apiKey");er(this,{apiKey:n})}_getProvider(t){try{return new t3(t,this.apiKey)}catch{}return super._getProvider(t)}static getRequest(t,n){n==null&&(n=hA);const i=new ga(`https://${Qxe(t.name)}/${n}`);return i.allowGzip=!0,n===hA&&(i.retryFunc=async(s,a,o)=>(Xh("AnkrProvider"),!0)),i}getRpcError(t,n){return t.method==="eth_sendRawTransaction"&&n&&n.error&&n.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(n.error.message="replacement transaction underpriced"),super.getRpcError(t,n)}isCommunityResource(){return this.apiKey===hA}}const pA="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function Xxe(r){switch(r){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}xe(!1,"unsupported network","network",r)}class r3 extends mc{constructor(t,n){t==null&&(t="mainnet");const i=ps.from(t);n==null&&(n=pA);const s=r3.getRequest(i,n);super(s,i,{staticNetwork:i});Ae(this,"apiKey");er(this,{apiKey:n})}_getProvider(t){try{return new r3(t,this.apiKey)}catch{}return super._getProvider(t)}async _perform(t){if(t.method==="getTransactionResult"){const{trace:n,tx:i}=await Zs({trace:this.send("trace_transaction",[t.hash]),tx:this.getTransaction(t.hash)});if(n==null||i==null)return null;let s,a=!1;try{s=n[0].result.output,a=n[0].error==="Reverted"}catch{}if(s)return ze(!a,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:s,reason:null,transaction:i,invocation:null,revert:null}),s;ze(!1,"could not parse trace result","BAD_DATA",{value:n})}return await super._perform(t)}isCommunityResource(){return this.apiKey===pA}static getRequest(t,n){n==null&&(n=pA);const i=new ga(`https://${Xxe(t.name)}/v2/${n}`);return i.allowGzip=!0,n===pA&&(i.retryFunc=async(s,a,o)=>(Xh("alchemy"),!0)),i}}function mA(r){switch(r){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}xe(!1,"unsupported network","network",r)}function e7e(r){switch(r){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}xe(!1,"unsupported network","network",r)}class n3 extends mc{constructor(t,n){t==null&&(t="mainnet");const i=ps.from(t);n==null&&(n=mA(i.name));const s=n3.getRequest(i,n);super(s,i,{staticNetwork:i});Ae(this,"apiKey");er(this,{apiKey:n})}_getProvider(t){try{return new n3(t,this.apiKey)}catch{}return super._getProvider(t)}isCommunityResource(){return this.apiKey===mA(this._network.name)}static getRequest(t,n){n==null&&(n=mA(t.name));const i=new ga(`https://${e7e(t.name)}/${n}`);return i.allowGzip=!0,n===mA(t.name)&&(i.retryFunc=async(s,a,o)=>(Xh("ChainstackProvider"),!0)),i}}class cO extends mc{constructor(e){e==null&&(e="mainnet");const t=ps.from(e);xe(t.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}const Dte=2e3;function t7e(r){return r&&typeof r.then=="function"}const $te="org.ethers.plugins.provider.Etherscan";class gA extends Qh{constructor(t){super($te);Ae(this,"baseUrl");er(this,{baseUrl:t})}clone(){return new gA(this.baseUrl)}}const r7e=["enableCcipRead"];let n7e=1;class lO extends Yw{constructor(t,n){const i=n??null;super();Ae(this,"network");Ae(this,"apiKey");$e(this,_4);const s=ps.from(t);ge(this,_4,s.getPlugin($te)),er(this,{apiKey:i,network:s}),this.getBaseUrl()}getBaseUrl(){if(se(this,_4))return se(this,_4).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}xe(!1,"unsupported network","network",this.network)}getUrl(t,n){const i=Object.keys(n).reduce((a,o)=>{const l=n[o];return l!=null&&(a+=`&${o}=${l}`),a},""),s=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${t}${i}${s}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(t,n){return n.module=t,n.apikey=this.apiKey,n}async detectNetwork(){return this.network}async fetch(t,n,i){const s=n7e++,a=i?this.getPostUrl():this.getUrl(t,n),o=i?this.getPostData(t,n):null;this.emit("debug",{action:"sendRequest",id:s,url:a,payload:o});const l=new ga(a);l.setThrottleParams({slotInterval:1e3}),l.retryFunc=(h,m,b)=>(this.isCommunityResource()&&Xh("Etherscan"),Promise.resolve(!0)),l.processFunc=async(h,m)=>{const b=m.hasBody()?JSON.parse(Bh(m.body)):{},v=(typeof b.result=="string"?b.result:"").toLowerCase().indexOf("rate limit")>=0;return t==="proxy"?b&&b.status==0&&b.message=="NOTOK"&&v&&(this.emit("debug",{action:"receiveError",id:s,reason:"proxy-NOTOK",error:b}),m.throwThrottleError(b.result,Dte)):v&&(this.emit("debug",{action:"receiveError",id:s,reason:"null result",error:b.result}),m.throwThrottleError(b.result,Dte)),m},o&&(l.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),l.body=Object.keys(o).map(h=>`${h}=${o[h]}`).join("&"));const u=await l.send();try{u.assertOk()}catch(h){this.emit("debug",{action:"receiveError",id:s,error:h,reason:"assertOk"}),ze(!1,"response error","SERVER_ERROR",{request:l,response:u})}u.hasBody()||(this.emit("debug",{action:"receiveError",id:s,error:"missing body",reason:"null body"}),ze(!1,"missing response","SERVER_ERROR",{request:l,response:u}));const f=JSON.parse(Bh(u.body));return t==="proxy"?(f.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:s,result:f,reason:"invalid JSON-RPC"}),ze(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:l,response:u,info:{result:f}})),f.error&&(this.emit("debug",{action:"receiveError",id:s,result:f,reason:"JSON-RPC error"}),ze(!1,"error response","SERVER_ERROR",{request:l,response:u,info:{result:f}})),this.emit("debug",{action:"receiveRequest",id:s,result:f}),f.result):f.status==0&&(f.message==="No records found"||f.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:s,result:f}),f.result):((f.status!=1||typeof f.message=="string"&&!f.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:s,result:f}),ze(!1,"error response","SERVER_ERROR",{request:l,response:u,info:{result:f}})),this.emit("debug",{action:"receiveRequest",id:s,result:f}),f.result)}_getTransactionPostData(t){const n={};for(let i in t){if(r7e.indexOf(i)>=0||t[i]==null)continue;let s=t[i];if(!(i==="type"&&s===0)&&!(i==="blockTag"&&s==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[i])s=$h(s);else if(i==="accessList")s="["+od(s).map(a=>`{address:"${a.address}",storageKeys:["${a.storageKeys.join('","')}"]}`).join(",")+"]";else if(i==="blobVersionedHashes"){if(s.length===0)continue;ze(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:t}})}else s=bt(s);n[i]=s}}return n}_checkError(t,n,i){let s="";if(xs(n,"SERVER_ERROR")){try{s=n.info.result.error.message}catch{}if(!s)try{s=n.info.message}catch{}}if(t.method==="estimateGas"&&!s.match(/revert/i)&&s.match(/insufficient funds/i)&&ze(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.transaction}),(t.method==="call"||t.method==="estimateGas")&&s.match(/execution reverted/i)){let a="";try{a=n.info.result.error.data}catch{}const o=f1.getBuiltinCallException(t.method,t.transaction,a);throw o.info={request:t,error:n},o}if(s&&t.method==="broadcastTransaction"){const a=Hw.from(t.signedTransaction);s.match(/replacement/i)&&s.match(/underpriced/i)&&ze(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a}),s.match(/insufficient funds/)&&ze(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a}),s.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ze(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:a})}throw n}async _detectNetwork(){return this.network}async _perform(t){switch(t.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(n=>this._checkError(t,n,t.signedTransaction));case"getBlock":if("blockTag"in t)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});ze(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.hash});case"call":{if(t.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const n=this._getTransactionPostData(t.transaction);n.module="proxy",n.action="eth_call";try{return await this.fetch("proxy",n,!0)}catch(i){return this._checkError(t,i,t.transaction)}}case"estimateGas":{const n=this._getTransactionPostData(t.transaction);n.module="proxy",n.action="eth_estimateGas";try{return await this.fetch("proxy",n,!0)}catch(i){return this._checkError(t,i,t.transaction)}}}return super._perform(t)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(t){let n=this._getAddress(t);t7e(n)&&(n=await n);try{const i=await this.fetch("contract",{action:"getabi",address:n}),s=JSON.parse(i);return new Yh(n,s,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}_4=new WeakMap;function i7e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof sr<"u")return sr;throw new Error("unable to locate global object")}const s7e=i7e().WebSocket;class M6{constructor(e,t){$e(this,yh);$e(this,f9);$e(this,jm);$e(this,z2);$e(this,zm);ge(this,yh,e),ge(this,f9,JSON.stringify(t)),ge(this,jm,null),ge(this,z2,null),ge(this,zm,null)}get filter(){return JSON.parse(se(this,f9))}start(){ge(this,jm,se(this,yh).send("eth_subscribe",this.filter).then(e=>(se(this,yh)._register(e,this),e)))}stop(){se(this,jm).then(e=>{se(this,yh).destroyed||se(this,yh).send("eth_unsubscribe",[e])}),ge(this,jm,null)}pause(e){ze(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),ge(this,z2,!!e)}resume(){ge(this,z2,null)}_handleMessage(e){if(se(this,jm)!=null&&se(this,z2)===null){let t=se(this,zm);t==null?t=this._emit(se(this,yh),e):t=t.then(async()=>{await this._emit(se(this,yh),e)}),ge(this,zm,t.then(()=>{se(this,zm)===t&&ge(this,zm,null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}yh=new WeakMap,f9=new WeakMap,jm=new WeakMap,z2=new WeakMap,zm=new WeakMap;class uO extends M6{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class fO extends M6{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}class dO extends M6{constructor(t,n){super(t,["logs",n]);$e(this,d9);ge(this,d9,JSON.stringify(n))}get logFilter(){return JSON.parse(se(this,d9))}async _emit(t,n){t.emit(this.logFilter,t._wrapLog(n,t._network))}}d9=new WeakMap;class hO extends dA{constructor(t,n){const i=Object.assign({},n??{});xe(i.batchMaxCount==null||i.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),i.batchMaxCount=1,i.staticNetwork==null&&(i.staticNetwork=!0);super(t,i);$e(this,H2);$e(this,E4);$e(this,Hm);ge(this,H2,new Map),ge(this,E4,new Map),ge(this,Hm,new Map)}_getSubscriber(t){switch(t.type){case"close":return new Jw("close");case"block":return new uO(this);case"pending":return new fO(this);case"event":return new dO(this,t.filter);case"orphan":if(t.filter.orphan==="drop-log")return new Jw("drop-log")}return super._getSubscriber(t)}_register(t,n){se(this,E4).set(t,n);const i=se(this,Hm).get(t);if(i){for(const s of i)n._handleMessage(s);se(this,Hm).delete(t)}}async _send(t){xe(!Array.isArray(t),"WebSocket does not support batch send","payload",t);const n=new Promise((i,s)=>{se(this,H2).set(t.id,{payload:t,resolve:i,reject:s})});return await this._waitUntilReady(),await this._write(JSON.stringify(t)),[await n]}async _processMessage(t){const n=JSON.parse(t);if(n&&typeof n=="object"&&"id"in n){const i=se(this,H2).get(n.id);if(i==null){this.emit("error",Oi("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}se(this,H2).delete(n.id),i.resolve(n)}else if(n&&n.method==="eth_subscription"){const i=n.params.subscription,s=se(this,E4).get(i);if(s)s._handleMessage(n.params.result);else{let a=se(this,Hm).get(i);a==null&&(a=[],se(this,Hm).set(i,a)),a.push(n.params.result)}}else{this.emit("error",Oi("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(t){throw new Error("sub-classes must override this")}}H2=new WeakMap,E4=new WeakMap,Hm=new WeakMap;class P6 extends hO{constructor(t,n,i){super(n,i);$e(this,q2);$e(this,Nf);typeof t=="string"?(ge(this,q2,()=>new s7e(t)),ge(this,Nf,se(this,q2).call(this))):typeof t=="function"?(ge(this,q2,t),ge(this,Nf,t())):(ge(this,q2,null),ge(this,Nf,t)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(s){console.log("failed to start WebsocketProvider",s)}},this.websocket.onmessage=s=>{this._processMessage(s.data)}}get websocket(){if(se(this,Nf)==null)throw new Error("websocket closed");return se(this,Nf)}async _write(t){this.websocket.send(t)}async destroy(){se(this,Nf)!=null&&(se(this,Nf).close(),ge(this,Nf,null)),super.destroy()}}q2=new WeakMap,Nf=new WeakMap;const O6="84842078b09946638c03157f83405213";function a7e(r){switch(r){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}xe(!1,"unsupported network","network",r)}class pO extends P6{constructor(t,n){const i=new d1(t,n),s=i._getConnection();ze(!s.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const a=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,i._network);Ae(this,"projectId");Ae(this,"projectSecret");er(this,{projectId:i.projectId,projectSecret:i.projectSecret})}isCommunityResource(){return this.projectId===O6}}class d1 extends mc{constructor(t,n,i){t==null&&(t="mainnet");const s=ps.from(t);n==null&&(n=O6),i==null&&(i=null);const a=d1.getRequest(s,n,i);super(a,s,{staticNetwork:s});Ae(this,"projectId");Ae(this,"projectSecret");er(this,{projectId:n,projectSecret:i})}_getProvider(t){try{return new d1(t,this.projectId,this.projectSecret)}catch{}return super._getProvider(t)}isCommunityResource(){return this.projectId===O6}static getWebSocketProvider(t,n){return new pO(t,n)}static getRequest(t,n,i){n==null&&(n=O6),i==null&&(i=null);const s=new ga(`https://${a7e(t.name)}/v3/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===O6&&(s.retryFunc=async(a,o,l)=>(Xh("InfuraProvider"),!0)),s}}const bA="919b412a057b5e9c9b6dce193c5a60242d6efadb";function o7e(r){switch(r){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}xe(!1,"unsupported network","network",r)}class i3 extends mc{constructor(t,n){t==null&&(t="mainnet");const i=ps.from(t);n==null&&(n=bA);const s=i3.getRequest(i,n);super(s,i,{staticNetwork:i});Ae(this,"token");er(this,{token:n})}_getProvider(t){try{return new i3(t,this.token)}catch{}return super._getProvider(t)}isCommunityResource(){return this.token===bA}static getRequest(t,n){n==null&&(n=bA);const i=new ga(`https://${o7e(t.name)}/${n}`);return i.allowGzip=!0,n===bA&&(i.retryFunc=async(s,a,o)=>(Xh("QuickNodeProvider"),!0)),i}}const c7e=BigInt("1"),l7e=BigInt("2");function u7e(r){for(let e=r.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1)),n=r[e];r[e]=r[t],r[t]=n}}function f7e(r){return new Promise(e=>{setTimeout(e,r)})}function mO(){return new Date().getTime()}function gO(r){return JSON.stringify(r,(e,t)=>typeof t=="bigint"?{type:"bigint",value:t.toString()}:t)}const Bte={stallTimeout:400,priority:1,weight:1},Lte={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function d7e(r,e){for(;(r.blockNumber<0||r.blockNumber{try{const t=await r.provider.getBlockNumber();t>r.blockNumber&&(r.blockNumber=t)}catch(t){r.blockNumber=-2,r._lastFatalError=t,r._lastFatalErrorTimestamp=mO()}r._updateNumber=null})()),await r._updateNumber,r.outOfSync++,!r._lastFatalError););}function N6(r){if(r==null)return"null";if(Array.isArray(r))return"["+r.map(N6).join(",")+"]";if(typeof r=="object"&&typeof r.toJSON=="function")return N6(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":case"number":return BigInt(r).toString();case"string":return JSON.stringify(r);case"object":{const e=Object.keys(r);return e.sort(),"{"+e.map(t=>`${JSON.stringify(t)}:${N6(r[t])}`).join(",")+"}"}}throw console.log("Could not serialize",r),new Error("Hmm...")}function bO(r){if("error"in r){const t=r.error;return{tag:N6(t),value:t}}const e=r.result;return{tag:N6(e),value:e}}function vA(r,e){const t=new Map;for(const{value:i,tag:s,weight:a}of e){const o=t.get(s)||{value:i,weight:0};o.weight+=a,t.set(s,o)}let n=null;for(const i of t.values())i.weight>=r&&(!n||i.weight>n.weight)&&(n=i);if(n)return n.value}function vO(r,e){let t=0;const n=new Map;let i=null;const s=[];for(const{value:o,tag:l,weight:u}of e)if(o instanceof Error){const f=n.get(l)||{value:o,weight:0};f.weight+=u,n.set(l,f),(i==null||f.weight>i.weight)&&(i=f)}else s.push(BigInt(o)),t+=u;if(t=r?i.value:void 0;s.sort((o,l)=>oo?1:0);const a=Math.floor(s.length/2);return s.length%2?s[a]:(s[a-1]+s[a]+c7e)/l7e}function wO(r,e){const t=vA(r,e);if(t!==void 0)return t;for(const n of e)if(n.value)return n.value}function h7e(r,e){if(r===1)return Rr(vO(r,e),"%internal");const t=new Map,n=(a,o)=>{const l=t.get(a)||{result:a,weight:0};l.weight+=o,t.set(a,l)};for(const{weight:a,value:o}of e){const l=Rr(o);n(l-1,a),n(l,a),n(l+1,a)}let i=0,s;for(const{weight:a,result:o}of t.values())a>=r&&(a>i||s!=null&&a===i&&o>s)&&(i=a,s=o);return s}class yO extends Yw{constructor(t,n,i){super(n,i);$e(this,Hc);Ae(this,"quorum");Ae(this,"eventQuorum");Ae(this,"eventWorkers");$e(this,zc);$e(this,op);$e(this,C4);ge(this,zc,t.map(s=>s instanceof Yw?Object.assign({provider:s},Bte,Lte):Object.assign({},Bte,s,Lte))),ge(this,op,-2),ge(this,C4,null),i&&i.quorum!=null?this.quorum=i.quorum:this.quorum=Math.ceil(se(this,zc).reduce((s,a)=>(s+=a.weight,s),0)/2),this.eventQuorum=1,this.eventWorkers=1,xe(this.quorum<=se(this,zc).reduce((s,a)=>s+a.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return se(this,zc).map(t=>{const n=Object.assign({},t);for(const i in n)i[0]==="_"&&delete n[i];return n})}async _detectNetwork(){return ps.from(ur(await this._perform({method:"chainId"})))}async _translatePerform(t,n){switch(n.method){case"broadcastTransaction":return await t.broadcastTransaction(n.signedTransaction);case"call":return await t.call(Object.assign({},n.transaction,{blockTag:n.blockTag}));case"chainId":return(await t.getNetwork()).chainId;case"estimateGas":return await t.estimateGas(n.transaction);case"getBalance":return await t.getBalance(n.address,n.blockTag);case"getBlock":{const i="blockHash"in n?n.blockHash:n.blockTag;return await t.getBlock(i,n.includeTransactions)}case"getBlockNumber":return await t.getBlockNumber();case"getCode":return await t.getCode(n.address,n.blockTag);case"getGasPrice":return(await t.getFeeData()).gasPrice;case"getPriorityFee":return(await t.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await t.getLogs(n.filter);case"getStorage":return await t.getStorage(n.address,n.position,n.blockTag);case"getTransaction":return await t.getTransaction(n.hash);case"getTransactionCount":return await t.getTransactionCount(n.address,n.blockTag);case"getTransactionReceipt":return await t.getTransactionReceipt(n.hash);case"getTransactionResult":return await t.getTransactionResult(n.hash)}}async _perform(t){if(t.method==="broadcastTransaction"){const a=se(this,zc).map(u=>null),o=se(this,zc).map(async({provider:u,weight:f},h)=>{try{const m=await u._perform(t);a[h]=Object.assign(bO({result:m}),{weight:f})}catch(m){a[h]=Object.assign(bO({error:m}),{weight:f})}});for(;;){const u=a.filter(m=>m!=null);for(const{value:m}of u)if(!(m instanceof Error))return m;const f=vA(this.quorum,a.filter(m=>m!=null));if(xs(f,"INSUFFICIENT_FUNDS"))throw f;const h=o.filter((m,b)=>a[b]==null);if(h.length===0)break;await Promise.race(h)}const l=wO(this.quorum,a);if(ze(l!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:a.map(gO)}}),l instanceof Error)throw l;return l}await nt(this,Hc,Mve).call(this);const n=new Set;let i=0;for(;;){const a=nt(this,Hc,IJ).call(this,n,t);if(a==null||(i+=a.config.weight,i>=this.quorum))break}const s=await nt(this,Hc,TJ).call(this,n,t);for(const a of n)a.perform&&a.result==null&&a.config.lateResponses++;return s}async destroy(){for(const{provider:t}of se(this,zc))t.destroy();super.destroy()}}zc=new WeakMap,op=new WeakMap,C4=new WeakMap,Hc=new WeakSet,Rve=function(t){const n=Array.from(t).map(s=>s.config),i=se(this,zc).slice();u7e(i),i.sort((s,a)=>s.priority-a.priority);for(const s of i)if(!s._lastFatalError&&n.indexOf(s)===-1)return s;return null},IJ=function(t,n){const i=nt(this,Hc,Rve).call(this,t);if(i==null)return null;const s={config:i,result:null,didBump:!1,perform:null,staller:null},a=mO();return s.perform=(async()=>{try{i.requests++;const l=await this._translatePerform(i.provider,n);s.result={result:l}}catch(l){i.errorResponses++,s.result={error:l}}const o=mO()-a;i._totalTime+=o,i.rollingDuration=.95*i.rollingDuration+.05*o,s.perform=null})(),s.staller=(async()=>{await f7e(i.stallTimeout),s.staller=null})(),t.add(s),s},Mve=async function(){let t=se(this,C4);if(!t){const n=[];se(this,zc).forEach(i=>{n.push((async()=>{await d7e(i,0),i._lastFatalError||(i._network=await i.provider.getNetwork())})())}),ge(this,C4,t=(async()=>{await Promise.all(n);let i=null;for(const s of se(this,zc)){if(s._lastFatalError)continue;const a=s._network;i==null?i=a.chainId:a.chainId!==i&&ze(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await t},Pve=async function(t,n){const i=[];for(const s of t)if(s.result!=null){const{tag:a,value:o}=bO(s.result);i.push({tag:a,value:o,weight:s.config.weight})}if(!(i.reduce((s,a)=>s+a.weight,0)!a._lastFatalError).map(a=>({value:a.blockNumber,tag:Rr(a.blockNumber).toString(),weight:a.weight}))))));const s=h7e(this.quorum,i);return s===void 0?void 0:(s>se(this,op)&&ge(this,op,s),se(this,op))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return vO(this.quorum,i);case"getBlock":return"blockTag"in n&&n.blockTag==="pending"?wO(this.quorum,i):vA(this.quorum,i);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return vA(this.quorum,i);case"broadcastTransaction":return wO(this.quorum,i)}ze(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${gO(n.method)})`})}},TJ=async function(t,n){if(t.size===0)throw new Error("no runners?!");const i=[];let s=0;for(const o of t){if(o.perform&&i.push(o.perform),o.staller){i.push(o.staller);continue}o.didBump||(o.didBump=!0,s++)}const a=await nt(this,Hc,Pve).call(this,t,n);if(a!==void 0){if(a instanceof Error)throw a;return a}for(let o=0;o0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:n,results:Array.from(t).map(o=>gO(o.result))}}),await Promise.race(i),await nt(this,Hc,TJ).call(this,t,n)};function p7e(r){return r&&typeof r.send=="function"&&typeof r.close=="function"}const m7e="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function Ute(r,e){e==null&&(e={});const t=a=>e[a]==="-"?!1:typeof e.exclusive=="string"?a===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(a)!==-1:!0;if(typeof r=="string"&&r.match(/^https?:/))return new mc(r);if(typeof r=="string"&&r.match(/^wss?:/)||p7e(r))return new P6(r);let n=null;try{n=ps.from(r)}catch{}const i=[];if(t("publicPolygon")&&n&&(n.name==="matic"?i.push(new mc("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&i.push(new mc("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),t("alchemy"))try{i.push(new r3(r,e.alchemy))}catch{}if(t("ankr")&&e.ankr!=null)try{i.push(new t3(r,e.ankr))}catch{}if(t("chainstack"))try{i.push(new n3(r,e.chainstack))}catch{}if(t("cloudflare"))try{i.push(new cO(r))}catch{}if(t("etherscan"))try{i.push(new lO(r,e.etherscan))}catch{}if(t("infura"))try{let a=e.infura,o;typeof a=="object"&&(o=a.projectSecret,a=a.projectId),i.push(new d1(r,a,o))}catch{}if(t("quicknode"))try{let a=e.quicknode;i.push(new i3(r,a))}catch{}if(ze(i.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),i.length===1)return i[0];let s=Math.floor(i.length/2);return s>2&&(s=2),n&&m7e.indexOf(n.name)!==-1&&(s=1),e&&e.quorum&&(s=e.quorum),new yO(i,void 0,{quorum:s})}const DH=class DH extends Xw{constructor(t){super(t.provider);Ae(this,"signer");$e(this,qm);$e(this,W2);er(this,{signer:t}),ge(this,qm,null),ge(this,W2,0)}async getAddress(){return this.signer.getAddress()}connect(t){return new DH(this.signer.connect(t))}async getNonce(t){if(t==="pending"){se(this,qm)==null&&ge(this,qm,super.getNonce("pending"));const n=se(this,W2);return await se(this,qm)+n}return super.getNonce(t)}increment(){P4(this,W2)._++}reset(){ge(this,W2,0),ge(this,qm,null)}async sendTransaction(t){const n=this.getNonce("pending");return this.increment(),t=await this.signer.populateTransaction(t),t.nonce=await n,await this.signer.sendTransaction(t)}signTransaction(t){return this.signer.signTransaction(t)}signMessage(t){return this.signer.signMessage(t)}signTypedData(t,n,i){return this.signer.signTypedData(t,n,i)}};qm=new WeakMap,W2=new WeakMap;let wA=DH;class yA extends Nte{constructor(t,n,i){const s=Object.assign({},i??{},{batchMaxCount:1});xe(t&&t.request,"invalid EIP-1193 provider","ethereum",t);super(n,s);$e(this,A4);ge(this,A4,async(a,o)=>{const l={method:a,params:o};this.emit("debug",{action:"sendEip1193Request",payload:l});try{const u=await t.request(l);return this.emit("debug",{action:"receiveEip1193Result",result:u}),u}catch(u){const f=new Error(u.message);throw f.code=u.code,f.data=u.data,f.payload=l,this.emit("debug",{action:"receiveEip1193Error",error:f}),f}})}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){xe(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const n=await se(this,A4).call(this,t.method,t.params||[]);return[{id:t.id,result:n}]}catch(n){return[{id:t.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(t,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(t,n)}async hasSigner(t){t==null&&(t=0);const n=await this.send("eth_accounts",[]);return typeof t=="number"?n.length>t:(t=t.toLowerCase(),n.filter(i=>i.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await se(this,A4).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(t)}}A4=new WeakMap;const xA="62e1ad51b37b8e00394bda3b";function g7e(r){switch(r){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}xe(!1,"unsupported network","network",r)}class D6 extends mc{constructor(t,n,i){t==null&&(t="mainnet");const s=ps.from(t);n==null&&(n=xA),i==null&&(i=null);const a={staticNetwork:s},o=D6.getRequest(s,n,i);super(o,s,a);Ae(this,"applicationId");Ae(this,"applicationSecret");er(this,{applicationId:n,applicationSecret:i})}_getProvider(t){try{return new D6(t,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(t)}static getRequest(t,n,i){n==null&&(n=xA);const s=new ga(`https://${g7e(t.name)}/v1/lb/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===xA&&(s.retryFunc=async(a,o,l)=>(Xh("PocketProvider"),!0)),s}isCommunityResource(){return this.applicationId===xA}}const Fte=void 0,$H=class $H extends Xw{constructor(t,n){super(n);Ae(this,"address");$e(this,S4);xe(t&&typeof t.sign=="function","invalid private key","privateKey","[ REDACTED ]"),ge(this,S4,t);const i=fg(this.signingKey.publicKey);er(this,{address:i})}get signingKey(){return se(this,S4)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(t){return new $H(se(this,S4),t)}async signTransaction(t){t=pg(t);const{to:n,from:i}=await Zs({to:t.to?Qs(t.to,this.provider):void 0,from:t.from?Qs(t.from,this.provider):void 0});n!=null&&(t.to=n),i!=null&&(t.from=i),t.from!=null&&(xe(Vr(t.from)===this.address,"transaction from address mismatch","tx.from",t.from),delete t.from);const s=Hw.from(t);return s.signature=this.signingKey.sign(s.unsignedHash),s.serialized}async signMessage(t){return this.signMessageSync(t)}signMessageSync(t){return this.signingKey.sign(ZC(t)).serialized}async signTypedData(t,n,i){const s=await Vh.resolveNames(t,n,i,async a=>{ze(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:a}});const o=await this.provider.resolveName(a);return ze(o!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:a}),o});return this.signingKey.sign(Vh.hash(s.domain,n,s.value)).serialized}};S4=new WeakMap;let s3=$H;const _A=" !#$%&'()*+,-./<=>?@[]^_`{|}~",b7e=/^[a-z]*$/i;function jte(r,e){let t=97;return r.reduce((n,i)=>(i===e?t++:i.match(b7e)?n.push(String.fromCharCode(t)+i):(t=97,n.push(i)),n),[])}function v7e(r,e){for(let i=_A.length-1;i>=0;i--)r=r.split(_A[i]).join(e.substring(2*i,2*i+2));const t=[],n=r.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,s,a,o)=>{if(a)for(let l=parseInt(a);l>=0;l--)t.push(";");else t.push(s.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return jte(jte(t,";"),":")}function zte(r){return xe(r[0]==="0","unsupported auwl data","data",r),v7e(r.substring(1+2*_A.length),r.substring(1,1+2*_A.length))}class xO{constructor(e){Ae(this,"locale");er(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class EA extends xO{constructor(t,n,i){super(t);$e(this,p9);$e(this,I4);$e(this,h9);$e(this,V2);ge(this,I4,n),ge(this,h9,i),ge(this,V2,null)}get _data(){return se(this,I4)}_decodeWords(){return zte(se(this,I4))}getWord(t){const n=nt(this,p9,kJ).call(this);return xe(t>=0&&t=12&&t.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*t.length/8));let i=0;for(let u=0;u=0,`invalid mnemonic word at index ${u}`,"mnemonic","[ REDACTED ]");for(let p=0;p<11;p++)h&1<<10-p&&(n[i>>3]|=1<<7-i%8),i++}const s=32*t.length/3,o=t.length/3,a=_X(o),l=$t(Ia(n.slice(0,s/8)))[0]&a;return xe(l===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),St(n.slice(0,s/8))}function HM(r,e){xe(r.length%4===0&&r.length>=16&&r.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=zh.wordlist());const t=[0];let n=11;for(let o=0;o8?(t[t.length-1]<<=8,t[t.length-1]|=r[o],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=r[o]>>8-n,t.push(r[o]&o4e(8-n)),n+=3);const i=r.length/4,s=parseInt(Ia(r).substring(2,4),16)&_X(i);return t[t.length-1]<<=i,t[t.length-1]|=s>>8-i,e.join(t.map(o=>e.getWord(o)))}const qM={};class Op{constructor(e,t,n,i,s){Ee(this,"phrase");Ee(this,"password");Ee(this,"wordlist");Ee(this,"entropy");i==null&&(i=""),s==null&&(s=zh.wordlist()),Lh(e,qM,"Mnemonic"),er(this,{phrase:n,password:i,wordlist:s,entropy:t})}computeSeed(){const e=Bs("mnemonic"+this.password,"NFKD");return Nu(Bs(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,n){const i=zM(e,n);return e=HM($t(i),n),new Op(qM,i,e,t,n)}static fromEntropy(e,t,n){const i=$t(e,"entropy"),s=HM(i,n);return new Op(qM,St(i),s,t,n)}static entropyToPhrase(e,t){const n=$t(e,"entropy");return HM(n,t)}static phraseToEntropy(e,t){return zM(e,t)}static isValidMnemonic(e,t){try{return zM(e,t),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var $o=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},WM=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},_A,Bl,Hh;const a4e={16:10,24:12,32:14},c4e=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Ll=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],EA=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],l4e=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],u4e=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],h4e=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],f4e=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],d4e=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],p4e=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],g4e=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m4e=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],b4e=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w4e=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],v4e=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],y4e=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function VM(r){const e=[];for(let t=0;t>2,$o(this,Hh,"f")[o][h%4]=s[h],$o(this,Bl,"f")[t-o][h%4]=s[h];let a=0,l=i,u;for(;l>16&255]<<24^Ll[u>>8&255]<<16^Ll[u&255]<<8^Ll[u>>24&255]^c4e[a]<<24,a+=1,i!=8)for(let w=1;w>8&255]<<8^Ll[u>>16&255]<<16^Ll[u>>24&255]<<24;for(let w=i/2+1;w>2,g=l%4,$o(this,Hh,"f")[p][g]=s[h],$o(this,Bl,"f")[t-p][g]=s[h++],l++}for(let h=1;h>24&255]^w4e[u>>16&255]^v4e[u>>8&255]^y4e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=$o(this,Hh,"f").length-1,n=[0,0,0,0];let i=VM(e);for(let a=0;a<4;a++)i[a]^=$o(this,Hh,"f")[0][a];for(let a=1;a>24&255]^u4e[i[(l+1)%4]>>16&255]^h4e[i[(l+2)%4]>>8&255]^f4e[i[(l+3)%4]&255]^$o(this,Hh,"f")[a][l];i=n.slice()}const s=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=$o(this,Hh,"f")[t][a],s[4*a]=(Ll[i[a]>>24&255]^o>>24)&255,s[4*a+1]=(Ll[i[(a+1)%4]>>16&255]^o>>16)&255,s[4*a+2]=(Ll[i[(a+2)%4]>>8&255]^o>>8)&255,s[4*a+3]=(Ll[i[(a+3)%4]&255]^o)&255;return s}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=$o(this,Bl,"f").length-1,n=[0,0,0,0];let i=VM(e);for(let a=0;a<4;a++)i[a]^=$o(this,Bl,"f")[0][a];for(let a=1;a>24&255]^p4e[i[(l+3)%4]>>16&255]^g4e[i[(l+2)%4]>>8&255]^m4e[i[(l+1)%4]&255]^$o(this,Bl,"f")[a][l];i=n.slice()}const s=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=$o(this,Bl,"f")[t][a],s[4*a]=(EA[i[a]>>24&255]^o>>24)&255,s[4*a+1]=(EA[i[(a+3)%4]>>16&255]^o>>16)&255,s[4*a+2]=(EA[i[(a+2)%4]>>8&255]^o>>8)&255,s[4*a+3]=(EA[i[(a+1)%4]&255]^o)&255;return s}}_A=new WeakMap,Bl=new WeakMap,Hh=new WeakMap;class EX{constructor(e,t,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new GM(t)},name:{enumerable:!0,value:e}})}}var AA=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},fv=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},k4,Td;class KM extends EX{constructor(e,t){if(super("ECC",e,KM),k4.set(this,void 0),Td.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");AA(this,k4,new Uint8Array(t),"f")}else AA(this,k4,new Uint8Array(16),"f");AA(this,Td,this.iv,"f")}get iv(){return new Uint8Array(fv(this,k4,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)Ul(this,Fl,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");Ul(this,Fl,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(Ul(this,Fl,"f")[e]===255)Ul(this,Fl,"f")[e]=0;else{Ul(this,Fl,"f")[e]++;break}}encrypt(e){var t,n;const i=new Uint8Array(e);for(let s=0;s16)throw new TypeError("PKCS#7 padding byte out of range");const t=r.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),xe(i>0&&s>0,"invalid kdf","kdf",e);const o=vs(r,"crypto.kdfparams.dklen:int!");return xe(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:t,N:n,r:i,p:s,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const t=vs(r,"crypto.kdfparams.salt:data!"),n=vs(r,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();xe(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const s=vs(r,"crypto.kdfparams.c:int!"),o=vs(r,"crypto.kdfparams.dklen:int!");return xe(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:s,dkLen:o,algorithm:i}}}xe(!1,"unsupported key-derivation function","kdf",e)}function ZM(r,e){const t=JSON.parse(r),n=P4(e),i=SX(t);if(i.name==="pbkdf2"){const{salt:p,count:g,dkLen:w,algorithm:y}=i,C=Nu(n,p,g,w,y);return SA(t,C)}Ue(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:s,N:o,r:a,p:l,dkLen:u}=i,h=wd(n,s,o,a,l,u);return SA(t,h)}function IX(r){return new Promise(e=>{setTimeout(()=>{e()},r)})}async function JM(r,e,t){const n=JSON.parse(r),i=P4(e),s=SX(n);if(s.name==="pbkdf2"){t&&(t(0),await IX(0));const{salt:g,count:w,dkLen:y,algorithm:C}=s,T=Nu(i,g,w,y,C);return t&&(t(1),await IX(0)),SA(n,T)}Ue(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:o,N:a,r:l,p:u,dkLen:h}=s,p=await bd(i,o,a,l,u,h,t);return SA(n,p)}function TX(r){const e=r.salt!=null?$t(r.salt,"options.salt"):kc(32);let t=1<<17,n=8,i=1;return r.scrypt&&(r.scrypt.N&&(t=r.scrypt.N),r.scrypt.r&&(n=r.scrypt.r),r.scrypt.p&&(i=r.scrypt.p)),xe(typeof t=="number"&&t>0&&Number.isSafeInteger(t)&&(BigInt(t)&BigInt(t-1))===BigInt(0),"invalid scrypt N parameter","options.N",t),xe(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),xe(typeof i=="number"&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:e,N:t,r:n,p:i}}function RX(r,e,t,n){const i=$t(t.privateKey,"privateKey"),s=n.iv!=null?$t(n.iv,"options.iv"):kc(16);xe(s.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?$t(n.uuid,"options.uuid"):kc(16);xe(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const a=r.slice(0,16),l=r.slice(16,32),u=new pv(a,s),h=$t(u.encrypt(i)),p=On(Sn([l,h])),g={address:t.address.substring(2).toLowerCase(),id:dk(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:St(s).substring(2)},ciphertext:St(h).substring(2),kdf:"scrypt",kdfparams:{salt:St(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:p.substring(2)}};if(t.mnemonic){const w=n.client!=null?n.client:`ethers/${fE}`,y=t.mnemonic.path||CX,C=t.mnemonic.locale||"en",T=r.slice(32,64),k=$t(t.mnemonic.entropy,"account.mnemonic.entropy"),N=kc(16),O=new pv(T,N),B=$t(O.encrypt(k)),z=new Date,$="UTC--"+(z.getUTCFullYear()+"-"+N4(z.getUTCMonth()+1,2)+"-"+N4(z.getUTCDate(),2)+"T"+N4(z.getUTCHours(),2)+"-"+N4(z.getUTCMinutes(),2)+"-"+N4(z.getUTCSeconds(),2)+".0Z")+"--"+g.address;g["x-ethers"]={client:w,gethFilename:$,path:y,locale:C,mnemonicCounter:St(N).substring(2),mnemonicCiphertext:St(B).substring(2),version:"0.1"}}return JSON.stringify(g)}function IA(r,e,t){t==null&&(t={});const n=P4(e),i=TX(t),s=wd(n,i.salt,i.N,i.r,i.p,64);return RX($t(s),i,r,t)}async function TA(r,e,t){t==null&&(t={});const n=P4(e),i=TX(t),s=await bd(n,i.salt,i.N,i.r,i.p,64,t.progressCallback);return RX($t(s),i,r,t)}const O4="m/44'/60'/0'/0/0",E4e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),qh=2147483648,A4e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),C4e="0123456789abcdef";function RA(r,e){let t="";for(;r;)t=C4e[r%16]+t,r=Math.trunc(r/16);for(;t.length=0;o-=8)i[33+(o>>3)]=r>>24-o&255;const s=$t(gd("sha512",e,i));return{IL:s.slice(0,32),IR:s.slice(32)}}function MX(r,e){const t=e.split("/");xe(t.length>0,"invalid path","path",e),t[0]==="m"&&(xe(r.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${r.depth}`,"path",e),t.shift());let n=r;for(let i=0;i=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const s=$t(gd("sha512",E4e,i)),o=new Pl(St(s.slice(0,32)));return new Yf(Wh,o,"0x00000000",St(s.slice(32)),"m",0,0,n,null)},Ne(Dp,rb);class Dg extends A4{constructor(t,n,i,s,o,a,l,u,h){super(n,h);Ee(this,"publicKey");Ee(this,"fingerprint");Ee(this,"parentFingerprint");Ee(this,"chainCode");Ee(this,"path");Ee(this,"index");Ee(this,"depth");Lh(t,Wh,"HDNodeVoidWallet"),er(this,{publicKey:i});const p=hi(md(Ia(i)),0,4);er(this,{publicKey:i,fingerprint:p,parentFingerprint:s,chainCode:o,path:a,index:l,depth:u})}connect(t){return new Dg(Wh,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,t)}get extendedKey(){return Ue(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),YM(Sn(["0x0488B21E",RA(this.depth,1),this.parentFingerprint,RA(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(t){const n=Ir(t,"index");xe(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~qh),n&qh&&(i+="'"));const{IR:s,IL:o}=kX(n,this.chainCode,this.publicKey,null),a=Pl.addPoints(o,this.publicKey,!0),l=Ag(a);return new Dg(Wh,l,a,this.fingerprint,St(s),i,n,this.depth+1,this.provider)}derivePath(t){return MX(this,t)}}function NX(r){const e=Ir(r,"index");return xe(e>=0&&e=0&&e{setTimeout(()=>{e()},r)})}let $g=(dj=class extends hv{constructor(e,t){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new Pl(e):e;super(n,t)}connect(e){return new $g(this.signingKey,e)}async encrypt(e,t){const n={address:this.address,privateKey:this.privateKey};return await TA(n,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return IA(t,e)}static async fromEncryptedJson(e,t,n){var s;let i=null;return CA(e)?i=await JM(e,t,n):kA(e)&&(n&&(n(0),await OX(0)),i=MA(e,t),n&&(n(1),await OX(0))),rt(s=$g,l7,cK).call(s,i)}static fromEncryptedJsonSync(e,t){var i;let n=null;return CA(e)?n=ZM(e,t):kA(e)?n=MA(e,t):xe(!1,"invalid JSON wallet","json","[ REDACTED ]"),rt(i=$g,l7,cK).call(i,n)}static createRandom(e){const t=Dp.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const n=Dp.fromPhrase(e);return t?n.connect(t):n}},l7=new WeakSet,cK=function(e){if(xe(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=Op.fromEntropy(e.mnemonic.entropy),i=Dp.fromMnemonic(n,e.mnemonic.path);if(i.address===e.address&&i.privateKey===e.privateKey)return i;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new $g(e.privateKey);return xe(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t},Ne(dj,l7),dj);const S4e=")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";function I4e(r,e){const t=(1<=r;){const l=i>>s-r;i&=(1<{const i=n.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);xe(i!==null,"internal error parsing accents","accents",e);let s=0;const o=I4e(parseInt(i[3]),i[4]),a=parseInt(i[2]),l=new RegExp(`([${i[1]}])`,"g");t=t.replace(l,(u,h)=>(--o[s]===0&&(h=String.fromCharCode(h.charCodeAt(0),a),s++),h))}),t.split(",")}class DX extends xA{constructor(t,n,i,s){super(t,n,s);Ne(this,u7,void 0);me(this,u7,i)}get _accent(){return oe(this,u7)}_decodeWords(){return T4e(this._data,this._accent)}}u7=new WeakMap;const $X={en:zh.wordlist()},R4e=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Mp,AbstractProvider:iv,AbstractSigner:ov,AlchemyProvider:lv,AnkrProvider:cv,BaseContract:Mg,BaseWallet:hv,Block:aM,BrowserProvider:wA,CloudflareProvider:IM,ConstructorFragment:Du,Contract:Sd,ContractEventPayload:lM,ContractFactory:_4,ContractTransactionReceipt:cM,ContractTransactionResponse:y4,ContractUnknownEventPayload:rA,EnsPlugin:rv,EnsResolver:Ng,ErrorDescription:oM,ErrorFragment:aa,EtherSymbol:gY,EtherscanPlugin:pA,EtherscanProvider:TM,EventFragment:Ol,EventLog:v4,EventPayload:yE,FallbackFragment:$u,FallbackProvider:UM,FeeData:XE,FeeDataNetworkPlugin:aA,FetchCancelSignal:uk,FetchRequest:Do,FetchResponse:Uh,FetchUrlFeeDataNetworkPlugin:mM,FixedNumber:$w,Fragment:Ad,FunctionFragment:Dl,GasCostPlugin:tv,HDNodeVoidWallet:Dg,HDNodeWallet:Dp,Indexed:QE,InfuraProvider:Pp,InfuraWebSocketProvider:PM,Interface:Sg,IpcSocketProvider:vX,JsonRpcApiProvider:hA,JsonRpcProvider:$l,JsonRpcSigner:Pg,LangEn:zh,Log:Ig,LogDescription:iM,MaxInt256:pY,MaxUint256:fY,MessagePrefix:$k,MinInt256:dY,Mnemonic:Op,MulticoinProviderPlugin:gM,N:uY,NamedFragment:Qw,Network:ws,NetworkPlugin:Id,NonceManager:bA,ParamType:Ks,PocketProvider:R4,QuickNodeProvider:uv,Result:Lw,Signature:Mc,SigningKey:Pl,SocketBlockSubscriber:RM,SocketEventSubscriber:MM,SocketPendingSubscriber:kM,SocketProvider:NM,SocketSubscriber:C4,StructFragment:Cd,Transaction:Pc,TransactionDescription:sM,TransactionReceipt:eA,TransactionResponse:Tg,Typed:uo,TypedDataEncoder:xd,UndecodedEventLog:tA,UnmanagedSubscriber:nv,Utf8ErrorFuncs:ck,VoidSigner:A4,Wallet:$g,WebSocketProvider:S4,WeiPerEther:hY,Wordlist:FM,WordlistOwl:xA,WordlistOwlA:DX,ZeroAddress:xg,ZeroHash:DE,accessListify:jh,assert:Ue,assertArgument:xe,assertArgumentCount:dE,assertNormalize:pE,assertPrivate:Lh,checkResultErrors:KZ,computeAddress:Ag,computeHmac:gd,concat:Sn,copyRequest:Xw,dataLength:ud,dataSlice:hi,decodeBase58:sk,decodeBase64:ok,decodeBytes32String:FQ,decodeRlp:Bw,decryptCrowdsaleJson:MA,decryptKeystoreJson:JM,decryptKeystoreJsonSync:ZM,defaultPath:O4,defineProperties:er,dnsEncode:Jk,encodeBase58:vE,encodeBase64:ak,encodeBytes32String:UQ,encodeRlp:Ap,encryptKeystoreJson:TA,encryptKeystoreJsonSync:IA,ensNormalize:Zk,ethers:Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Mp,AbstractProvider:iv,AbstractSigner:ov,AlchemyProvider:lv,AnkrProvider:cv,BaseContract:Mg,BaseWallet:hv,Block:aM,BrowserProvider:wA,CloudflareProvider:IM,ConstructorFragment:Du,Contract:Sd,ContractEventPayload:lM,ContractFactory:_4,ContractTransactionReceipt:cM,ContractTransactionResponse:y4,ContractUnknownEventPayload:rA,EnsPlugin:rv,EnsResolver:Ng,ErrorDescription:oM,ErrorFragment:aa,EtherSymbol:gY,EtherscanPlugin:pA,EtherscanProvider:TM,EventFragment:Ol,EventLog:v4,EventPayload:yE,FallbackFragment:$u,FallbackProvider:UM,FeeData:XE,FeeDataNetworkPlugin:aA,FetchCancelSignal:uk,FetchRequest:Do,FetchResponse:Uh,FetchUrlFeeDataNetworkPlugin:mM,FixedNumber:$w,Fragment:Ad,FunctionFragment:Dl,GasCostPlugin:tv,HDNodeVoidWallet:Dg,HDNodeWallet:Dp,Indexed:QE,InfuraProvider:Pp,InfuraWebSocketProvider:PM,Interface:Sg,IpcSocketProvider:vX,JsonRpcApiProvider:hA,JsonRpcProvider:$l,JsonRpcSigner:Pg,LangEn:zh,Log:Ig,LogDescription:iM,MaxInt256:pY,MaxUint256:fY,MessagePrefix:$k,MinInt256:dY,Mnemonic:Op,MulticoinProviderPlugin:gM,N:uY,NamedFragment:Qw,Network:ws,NetworkPlugin:Id,NonceManager:bA,ParamType:Ks,PocketProvider:R4,QuickNodeProvider:uv,Result:Lw,Signature:Mc,SigningKey:Pl,SocketBlockSubscriber:RM,SocketEventSubscriber:MM,SocketPendingSubscriber:kM,SocketProvider:NM,SocketSubscriber:C4,StructFragment:Cd,Transaction:Pc,TransactionDescription:sM,TransactionReceipt:eA,TransactionResponse:Tg,Typed:uo,TypedDataEncoder:xd,UndecodedEventLog:tA,UnmanagedSubscriber:nv,Utf8ErrorFuncs:ck,VoidSigner:A4,Wallet:$g,WebSocketProvider:S4,WeiPerEther:hY,Wordlist:FM,WordlistOwl:xA,WordlistOwlA:DX,ZeroAddress:xg,ZeroHash:DE,accessListify:jh,assert:Ue,assertArgument:xe,assertArgumentCount:dE,assertNormalize:pE,assertPrivate:Lh,checkResultErrors:KZ,computeAddress:Ag,computeHmac:gd,concat:Sn,copyRequest:Xw,dataLength:ud,dataSlice:hi,decodeBase58:sk,decodeBase64:ok,decodeBytes32String:FQ,decodeRlp:Bw,decryptCrowdsaleJson:MA,decryptKeystoreJson:JM,decryptKeystoreJsonSync:ZM,defaultPath:O4,defineProperties:er,dnsEncode:Jk,encodeBase58:vE,encodeBase64:ak,encodeBytes32String:UQ,encodeRlp:Ap,encryptKeystoreJson:TA,encryptKeystoreJsonSync:IA,ensNormalize:Zk,formatEther:fk,formatUnits:EE,fromTwos:Mw,getAccountPath:NX,getAddress:zr,getBigInt:cr,getBytes:$t,getBytesCopy:Ws,getCreate2Address:IY,getCreateAddress:BE,getDefaultProvider:wX,getIcapAddress:SY,getIndexedAccountPath:PX,getNumber:Ir,getUint:Nw,hashMessage:KE,hexlify:St,id:Nc,isAddress:TY,isAddressable:LE,isBytesLike:gE,isCallException:e4,isCrowdsaleJson:kA,isError:$s,isHexString:ui,isKeystoreJson:CA,isValidName:sQ,keccak256:On,lock:_Y,makeError:Wi,mask:hd,namehash:p4,parseEther:GZ,parseUnits:AE,pbkdf2:Nu,randomBytes:kc,recoverAddress:g4,resolveAddress:Gs,resolveProperties:qs,ripemd160:md,scrypt:bd,scryptSync:wd,sha256:Ia,sha512:Hw,showThrottleMessage:Np,solidityPacked:ZE,solidityPackedKeccak256:fQ,solidityPackedSha256:dQ,stripZerosLeft:TZ,toBeArray:Vs,toBeHex:ku,toBigInt:mg,toNumber:nk,toQuantity:fd,toTwos:r4,toUtf8Bytes:Bs,toUtf8CodePoints:PZ,toUtf8String:dd,uuidV4:dk,verifyMessage:uQ,verifyTypedData:yQ,version:fE,wordlists:$X,zeroPadBytes:t4,zeroPadValue:Oo},Symbol.toStringTag,{value:"Module"})),formatEther:fk,formatUnits:EE,fromTwos:Mw,getAccountPath:NX,getAddress:zr,getBigInt:cr,getBytes:$t,getBytesCopy:Ws,getCreate2Address:IY,getCreateAddress:BE,getDefaultProvider:wX,getIcapAddress:SY,getIndexedAccountPath:PX,getNumber:Ir,getUint:Nw,hashMessage:KE,hexlify:St,id:Nc,isAddress:TY,isAddressable:LE,isBytesLike:gE,isCallException:e4,isCrowdsaleJson:kA,isError:$s,isHexString:ui,isKeystoreJson:CA,isValidName:sQ,keccak256:On,lock:_Y,makeError:Wi,mask:hd,namehash:p4,parseEther:GZ,parseUnits:AE,pbkdf2:Nu,randomBytes:kc,recoverAddress:g4,resolveAddress:Gs,resolveProperties:qs,ripemd160:md,scrypt:bd,scryptSync:wd,sha256:Ia,sha512:Hw,showThrottleMessage:Np,solidityPacked:ZE,solidityPackedKeccak256:fQ,solidityPackedSha256:dQ,stripZerosLeft:TZ,toBeArray:Vs,toBeHex:ku,toBigInt:mg,toNumber:nk,toQuantity:fd,toTwos:r4,toUtf8Bytes:Bs,toUtf8CodePoints:PZ,toUtf8String:dd,uuidV4:dk,verifyMessage:uQ,verifyTypedData:yQ,version:fE,wordlists:$X,zeroPadBytes:t4,zeroPadValue:Oo},Symbol.toStringTag,{value:"Module"}));class k4e{constructor(e){Ee(this,"network");Ee(this,"jsonRpcProvider");Ee(this,"webSocketProvider");this.network=e,this.jsonRpcProvider=new $l(e.rpcUrl)}get jsonRpc(){return this.jsonRpcProvider}get webSocket(){return this.webSocketProvider}async connectWebSocket(){return await new Promise((e,t)=>{if(this.network.wsUrl===void 0)t(new Error(kr.WS_URL_NOT_DEFINED));else{const n=this.network.wsUrl;rk(n).then(i=>{i instanceof Error?t(i):e(this.webSocketProvider=new S4(n))}).catch(t)}})}contract(e,t,n){return new Sd(e,t,n)}wallet(e,t){return new $g(e,t??this.jsonRpc)}contractFactory(e,t,n){return new _4(e,t,n)}async getByteCode(e){try{return await this.jsonRpc.getCode(e)}catch(t){if(t.code==="UNCONFIGURED_NAME")return await CZ(1e3),await this.getByteCode(e);throw t}}async getEstimateGas(e){return Number(await this.jsonRpcProvider.estimateGas(e))}async getGasPrice(){return(await this.jsonRpc.send("eth_gasPrice",[])).toString()}async getNonce(e){return await this.jsonRpcProvider.getTransactionCount(e)}async getBlock(e,t){return await this.jsonRpcProvider.getBlock(e,t)}async getBlockNumber(){return await this.jsonRpcProvider.getBlockNumber()}async getTransaction(e){return await this.jsonRpcProvider.getTransaction(e)}async getTransactionReceipt(e){return await this.jsonRpcProvider.getTransactionReceipt(e)}async getLastTransactions(e,t=0){var h;const n=[],i=[],s=[],o=await this.getBlock("pending"),a=(o==null?void 0:o.number)??await this.getBlockNumber();for(let p=a;p>a-t;p--){const g=await this.getBlock(p,!0);g!==null&&i.push(g)}const l=await Promise.all(i);for(const p of l)for(const g of p.transactions)n.push(this.getTransaction(g));const u=await Promise.all(n);for(const p of u)((p==null?void 0:p.from.toLowerCase())===e.toLowerCase()||((h=p==null?void 0:p.to)==null?void 0:h.toLowerCase())===e.toLowerCase())&&s.push(p);return s}async getLastTransaction(e,t=0){var s;const n=await this.getBlock("pending"),i=(n==null?void 0:n.number)??await this.getBlockNumber();for(let o=i;o>i-t;o--){const a=await this.getBlock(o,!0);if(a!==null)for(const l of a.transactions){const u=await this.getTransaction(l);if((u==null?void 0:u.from.toLowerCase())===e.toLowerCase()||((s=u==null?void 0:u.to)==null?void 0:s.toLowerCase())===e.toLowerCase())return u}}return null}async getBalance(e){return await this.jsonRpcProvider.getBalance(e)}}const sg=class{constructor(e){Ee(this,"network");Ee(this,"ethers");this.update(e)}static get instance(){if(sg._instance===void 0)throw new Error(kr.PROVIDER_IS_NOT_INITIALIZED);return sg._instance}static initialize(e){if(sg._instance!==void 0)throw new Error(kr.PROVIDER_IS_ALREADY_INITIALIZED);sg._instance=new sg(e)}async checkRpcConnection(e){try{const t=await u2e.post(e??this.network.rpcUrl,{jsonrpc:"2.0",method:"eth_blockNumber",params:[],id:1});return t.status!==200?new Error(t.statusText+": "+JSON.stringify(t.data)):!0}catch(t){return t}}async checkWsConnection(e){try{const t=await rk(e??this.network.wsUrl??"");return t instanceof Error?t:!0}catch(t){return t}}update(e){this.network=e,sg._instance=this,this.ethers=new k4e(e)}isTestnet(){var e;return((e=this.network)==null?void 0:e.testnet)??!1}};let Vh=sg;Ee(Vh,"_instance");const QM=(r,e)=>{console.error("MultipleChain EVM Wallet Error:",r);const t=String(r.message??"");return t==="Not supported chainId"||t.includes("chain ID")||t.includes("networkConfigurationId")||t.includes("The Provider is not connected to the requested chain.")?e(new Error(kr.UNACCEPTED_CHAIN)):r.code===4001||r.error==="Rejected by user"||t==="cancelled"||t==="User canceled"||t==="user reject this request"||t==="User rejected the transaction"||t==="An unexpected error occurred"||t==="User disapproved requested chains"?e(new Error(kr.WALLET_REQUEST_REJECTED)):t.includes("User")||t.includes("Rejected")||t.includes("cancelled")||t.includes("canceled")||t.includes("rejected")||t.includes("disapproved requested chains")?e(new Error(kr.WALLET_REQUEST_REJECTED)):t.includes("Invalid RPC URL")?e(new Error(kr.RPC_REQUEST_ERROR)):r.code===-32e3||t.includes("timeout")||t.includes("request timed out")?e(new Error(kr.RPC_TIMEOUT)):r.code===-32603||r.code===-32602?e(new Error(kr.TRANSACTION_CREATION_FAILED)):r.code===-32601?e(new Error(kr.RPC_REQUEST_ERROR)):r.code===-32002||r.message==="Already processing eth_requestAccounts. Please wait."?e(new Error(kr.WALLET_ALREADY_PROCESSING)):r.message==="User closed modal"?e(new Error(kr.CLOSED_WALLETCONNECT_MODAL)):r.message==="transaction underpriced"?e(new Error(kr.TRANSACTION_CREATION_FAILED)):e(r)};class M4e{constructor(e,t){Ee(this,"adapter");Ee(this,"walletProvider");Ee(this,"networkProvider");this.adapter=e,this.networkProvider=t??Vh.instance}async request(e){const t=await this.walletProvider.request(e);if((t==null?void 0:t.error)!==void 0){const n=t.error;throw n.code===-32e3?new Error(kr.RPC_TIMEOUT):new Error(n.message)}return t}getId(){return this.adapter.id}getName(){return this.adapter.name}getIcon(){return this.adapter.icon}getPlatforms(){return this.adapter.platforms}getDownloadLink(){return this.adapter.downloadLink}createDeepLink(e,t){return this.adapter.createDeepLink===void 0?null:this.adapter.createDeepLink(e,t)}async connect(e){return await new Promise((t,n)=>{this.adapter.connect(this.networkProvider,e).then(async i=>{this.walletProvider=i;const s=await this.getChainId();if(this.networkProvider.network.id!==s){n(kr.UNACCEPTED_CHAIN);return}t(await this.getAddress())}).catch(i=>{QM(i,o=>{o.message===kr.WALLET_REQUEST_REJECTED?n(new Error(kr.WALLET_CONNECT_REJECTED)):n(o)})})})}async isDetected(){return await this.adapter.isDetected()}async isConnected(){return await this.adapter.isConnected()}async getChainId(){const e=await this.request({method:"eth_chainId"});return typeof e=="number"?e:parseInt(e,16)}async getAddress(){return(await this.walletProvider.request({method:"eth_accounts"}))[0]}async signMessage(e){const t=await this.getAddress();return await new Promise((n,i)=>{this.walletProvider.request({method:"personal_sign",params:[e,t]}).then(s=>{n(s)}).catch(s=>{QM(s,i)})})}async sendTransaction(e){return await new Promise((t,n)=>{const i=e.getRawData();i.gas=JR(i.gasLimit),delete i.chainId,delete i.nonce,delete i.gasLimit,delete i.gasPrice,this.walletProvider.request({method:"eth_sendTransaction",params:[i]}).then(s=>{t(s)}).catch(s=>{QM(s,n)})})}on(e,t){var n,i;((i=(n=this.adapter)==null?void 0:n.provider)==null?void 0:i.on)!==void 0?this.adapter.provider.on(e,t):this.walletProvider.on(e,t)}}var N4e={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}},P4e={id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0},O4e={id:42170,name:"Arbitrum Nova",network:"arbitrum-nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{blast:{http:["https://arbitrum-nova.public.blastapi.io"],webSocket:["wss://arbitrum-nova.public.blastapi.io"]},default:{http:["https://nova.arbitrum.io/rpc"]},public:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://nova.arbiscan.io"},blockScout:{name:"BlockScout",url:"https://nova-explorer.arbitrum.io/"},default:{name:"Arbiscan",url:"https://nova.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}},D4e={id:1313161554,name:"Aurora",network:"aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{infura:{http:["https://aurora-mainnet.infura.io/v3"]},default:{http:["https://mainnet.aurora.dev"]},public:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{etherscan:{name:"Aurorascan",url:"https://aurorascan.dev"},default:{name:"Aurorascan",url:"https://aurorascan.dev"}}},$4e={id:1313161555,name:"Aurora Testnet",network:"aurora-testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{infura:{http:["https://aurora-testnet.infura.io/v3"]},default:{http:["https://testnet.aurora.dev"]},public:{http:["https://testnet.aurora.dev"]}},blockExplorers:{etherscan:{name:"Aurorascan",url:"https://testnet.aurorascan.dev"},default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev"}},testnet:!0},B4e={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}},L4e={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0},U4e={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Base",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},F4e={id:84531,network:"base-goerli",name:"Base Goerli",nativeCurrency:{name:"Base Goerli",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]},public:{http:["https://goerli.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://goerli.basescan.org"},default:{name:"Basescan",url:"https://goerli.basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988}},testnet:!0},j4e={id:641230,name:"Bear Network Chain Mainnet",network:"BearNetworkChainMainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{public:{http:["https://brnkc-mainnet.bearnetwork.net"]},default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net"}}},z4e={id:751230,name:"Bear Network Chain Testnet",network:"BearNetworkChainTestnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{public:{http:["https://brnkc-test.bearnetwork.net"]},default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net"}},testnet:!0},H4e={id:288,name:"Boba Network",network:"boba",nativeCurrency:{decimals:18,name:"Boba",symbol:"BOBA"},rpcUrls:{default:{http:["https://mainnet.boba.network"]},public:{http:["https://mainnet.boba.network"]}},blockExplorers:{etherscan:{name:"BOBAScan",url:"https://bobascan.com"},default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}},q4e={id:1039,name:"Bronos",network:"bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]},public:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}},W4e={id:1038,name:"Bronos Testnet",network:"bronos-testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]},public:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0},V4e={id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}},G4e={id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.binance.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.binance.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0},K4e={id:4999,name:"BlackFort Exchange Network",network:"bxn",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]},public:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network"}}},Z4e={id:4777,name:"BlackFort Exchange Network Testnet",network:"bxnTestnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]},public:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network"}}},J4e={id:7700,name:"Canto",network:"canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]},public:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}},Y4e={id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},Q4e={id:44787,name:"Alfajores",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001}},testnet:!0},X4e={id:17323,name:"Cannoli",network:"celo-cannoli",nativeCurrency:{decimals:18,name:"CELO",symbol:"C-CELO"},rpcUrls:{default:{http:["https://forno.cannoli.celo-testnet.org"]},public:{http:["https://forno.cannoli.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/cannoli"}},contracts:{multicall3:{address:"0x5Acb0aa8BF4E8Ff0d882Ee187140713C12BF9718",blockCreated:87429}},testnet:!0},e6e={id:61,name:"Ethereum Classic",network:"classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]},public:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}},t6e={id:1030,name:"Conflux eSpace",network:"cfx-espace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.org"]},public:{http:["https://evm.confluxrpc.org"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}},r6e={id:25,name:"Cronos Mainnet",network:"cronos",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]},public:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronoscan",url:"https://cronoscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}},n6e={id:338,name:"Cronos Testnet",network:"cronos-testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]},public:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0},i6e={id:3737,network:"crossbell",name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]},public:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io"}},contracts:{multicall3:{address:"0xBB9759009cDaC82774EfC84D94cD9F7440f75Fcf",blockCreated:23499787}}},s6e={id:53935,name:"DFK Chain",network:"dfk",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]},public:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{etherscan:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"},default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}}},o6e={id:2e3,name:"Dogechain",network:"dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]},public:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{etherscan:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog"},default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog"}}},a6e={id:2021,name:"Edgeware EdgeEVM Mainnet",network:"edgeware",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]},public:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{etherscan:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live"},default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}},c6e={id:2022,name:"Beresheet BereEVM Testnet",network:"edgewareTestnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]},public:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{etherscan:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live"},default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live"}}},l6e={id:42262,name:"Oasis Emerald",network:"emerald",nativeCurrency:{decimals:18,name:"Oasis ROSE",symbol:"ROSE"},rpcUrls:{default:{http:["https://emerald.oasis.dev"],webSocket:["wss://emerald.oasis.dev/ws"]},public:{http:["https://emerald.oasis.dev"],webSocket:["wss://emerald.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.emerald.oasis.dev"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1481392}}},u6e={id:17777,name:"EOS EVM",network:"eos",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]},public:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{etherscan:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com"},default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}},h6e={id:15557,name:"EOS EVM Testnet",network:"eos",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]},public:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{etherscan:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com"},default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0},f6e={id:9001,name:"Evmos",network:"evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]},public:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}},d6e={id:9e3,name:"Evmos Testnet",network:"evmos-testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]},public:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}},p6e={id:1994,name:"Ekta",network:"ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{public:{http:["https://main.ekta.io"]},default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io"}}},g6e={id:1004,name:"Ekta Testnet",network:"ekta-testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{public:{http:["https://test.ekta.io:8545"]},default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io"}},testnet:!0},m6e={id:246,name:"Energy Web Chain",network:"ewc",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]},public:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"Energy Web Chain Explorer",url:"https://explorer.energyweb.org"}},contracts:{ensRegistry:{address:"0x0A6d64413c07E10E890220BBE1c49170080C6Ca0"}}},b6e={id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}},w6e={id:4002,name:"Fantom Testnet",network:"fantom-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]},public:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://testnet.ftmscan.com"},default:{name:"FTMScan",url:"https://testnet.ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}},v6e={id:12306,name:"Fibo Chain",network:"fibochain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]},public:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}},y6e={id:314,name:"Filecoin Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},x6e={id:314159,name:"Filecoin Calibration",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},_6e={id:3141,name:"Filecoin Hyperspace",network:"filecoin-hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]},public:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"},filscan:{name:"Filscan",url:"https://hyperspace.filscan.io"}}},E6e={id:14,name:"Flare Mainnet",network:"flare-mainnet",nativeCurrency:{decimals:18,name:"flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]},public:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network"}}},A6e={id:114,name:"Coston2",network:"coston2",nativeCurrency:{decimals:18,name:"coston2flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]},public:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network"}},testnet:!0},C6e={id:31337,name:"Foundry",network:"foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}},S6e={id:122,name:"Fuse",network:"fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]},public:{http:["https://fuse-mainnet.chainstacklabs.com"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io"}}},I6e={id:123,name:"Fuse Sparknet",network:"fuse",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]},public:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io"}}},T6e={id:4689,name:"IoTeX",network:"iotex",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]},public:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}}},R6e={id:4690,name:"IoTeX Testnet",network:"iotex-testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]},public:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}}},k6e={id:1663,name:"Horizen Gobi Testnet",network:"gobi",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{public:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]},default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0},M6e={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},N6e={id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"]},public:{http:["https://rpc.gnosischain.com"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}},P6e={id:10200,name:"Gnosis Chiado",network:"chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"]},public:{http:["https://rpc.chiadochain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net"}}},O6e={id:31337,name:"Hardhat",network:"hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}},D6e={id:16666e5,name:"Harmony One",network:"harmony",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{public:{http:["https://rpc.ankr.com/harmony"]},default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}},$6e={id:11235,name:"HAQQ Mainnet",network:"haqq-mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]},public:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network"}}},B6e={id:54211,name:"HAQQ Testedge 2",network:"haqq-testedge-2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]},public:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network"}}},L6e={id:8217,name:"Klaytn",network:"klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://cypress.fautor.app/archive"]},public:{http:["https://cypress.fautor.app/archive"]}},blockExplorers:{etherscan:{name:"KlaytnScope",url:"https://scope.klaytn.com"},default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}}},U6e={id:59144,name:"Linea Mainnet",network:"linea-mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-mainnet.infura.io/v3"],webSocket:["wss://linea-mainnet.infura.io/ws/v3"]},default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.linea.build"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1},F6e={id:59140,name:"Linea Goerli Testnet",network:"linea-testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.goerli.linea.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0},j6e={id:1337,name:"Localhost",network:"localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}},z6e={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},H6e={id:5e3,name:"Mantle",network:"mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]},public:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{etherscan:{name:"Mantle Explorer",url:"https://explorer.mantle.xyz"},default:{name:"Mantle Explorer",url:"https://explorer.mantle.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}},q6e={id:5001,name:"Mantle Testnet",network:"mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]},public:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{etherscan:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz"},default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz"}},testnet:!0},W6e={id:1088,name:"Metis",network:"andromeda",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://andromeda.metis.io/?owner=1088"]},public:{http:["https://andromeda.metis.io/?owner=1088"]}},blockExplorers:{default:{name:"Andromeda Explorer",url:"https://andromeda-explorer.metis.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}},V6e={id:599,name:"Metis Goerli",network:"metis-goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]},public:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}},G6e={id:7518,network:"MEVerse",name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]},public:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}},K6e={id:4759,network:"MEVerse Testnet",name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]},public:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0},Z6e={id:919,name:"Mode Testnet",network:"mode-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]},public:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network"}},testnet:!0},J6e={id:1287,name:"Moonbase Alpha",network:"moonbase-alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]},public:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonbase.moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0},Y6e={id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1},Q6e={id:1285,name:"Moonriver",network:"moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{public:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]},default:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonriver.moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1},X6e={id:245022926,network:"neonDevnet",name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]},public:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0},e8e={id:4242,name:"Nexi",network:"nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]},public:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{etherscan:{name:"NexiScan",url:"https://www.nexiscan.com"},default:{name:"NexiScan",url:"https://www.nexiscan.com"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}},t8e={id:240,name:"Nexilix Smart Chain",network:"nexilix",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]},public:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{etherscan:{name:"NexilixScan",url:"https://scan.nexilix.com"},default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}},r8e={id:248,name:"Oasys",network:"oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]},public:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games"}}},n8e={id:66,name:"OKC",network:"okc",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]},public:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}},i8e={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},s8e={id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},o8e={id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},a8e={id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://matic-mumbai.chainstacklabs.com"]},public:{http:["https://matic-mumbai.chainstacklabs.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0},c8e={id:1442,name:"Polygon zkEVM Testnet",network:"polygon-zkevm-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]},public:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://explorer.public.zkevm-test.net"},default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}},l8e={id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}},u8e={id:369,network:"pulsechain",name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]},public:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},h8e={id:943,network:"pulsechainV4",name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]},public:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},f8e={id:35441,name:"Q Mainnet",network:"q-mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]},public:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org"}}},d8e={id:35443,name:"Q Testnet",network:"q-testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]},public:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org"}},testnet:!0},p8e={id:570,name:"Rollux Mainnet",network:"rollux",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]},public:{http:["https://rollux.public-rpc.com"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}},g8e={id:57e3,name:"Rollux Testnet",network:"rollux-testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]},public:{http:["https://rpc-tanenbaum.rollux.com/"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}},m8e={id:2020,name:"Ronin",network:"ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]},public:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}},b8e={id:2021,name:"Saigon Testnet",network:"saigon",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]},public:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-explorer.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0},w8e={id:534351,name:"Scroll Sepolia",network:"scroll-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"],webSocket:["wss://sepolia-rpc.scroll.io/ws"]},public:{http:["https://sepolia-rpc.scroll.io"],webSocket:["wss://sepolia-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.scroll.io"}},testnet:!0},v8e={id:534353,name:"Scroll Testnet",network:"scroll-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc.scroll.io/l2"],webSocket:["wss://alpha-rpc.scroll.io/l2/ws"]},public:{http:["https://alpha-rpc.scroll.io/l2"],webSocket:["wss://alpha-rpc.scroll.io/l2/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.scroll.io"}},testnet:!0},y8e={id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{decimals:18,name:"Oasis ROSE",symbol:"ROSE"},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]},public:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}},x8e={id:23295,name:"Oasis Sapphire Testnet",network:"sapphireTestnet",nativeCurrency:{decimals:18,name:"Oasis TEST",symbol:"TEST"},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]},public:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}}},_8e={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},E8e={id:391845894,name:"SKALE | Block Brawlers",network:"skale-brawl",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]},public:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}},A8e={id:1564830818,name:"SKALE | Calypso NFT Hub",network:"skale-calypso",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]},public:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}},C8e={id:344106930,name:"SKALE | Calypso NFT Hub Testnet",network:"skale-calypso-testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-utter-unripe-menkar"]},public:{http:["https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-utter-unripe-menkar"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2131424}},testnet:!0},S8e={id:1351057110,name:"SKALE | Chaos Testnet",network:"skale-chaos-testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-fast-active-bellatrix"]},public:{http:["https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-fast-active-bellatrix"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1192202}},testnet:!0},I8e={id:1026062157,name:"SKALE | CryptoBlades",network:"skale-cryptoblades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]},public:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}},T8e={id:2046399126,name:"SKALE | Crypto Colosseum",network:"skale-crypto-coloseeum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]},public:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}},R8e={id:2046399126,name:"SKALE | Europa Liquidity Hub",network:"skale-europa",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]},public:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}},k8e={id:476158412,name:"SKALE | Europa Liquidity Hub Testnet",network:"skale-europa-testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-legal-crazy-castor"]},public:{http:["https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-legal-crazy-castor"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2071911}},testnet:!0},M8e={id:2139927552,name:"SKALE | Exorde",network:"skale-exorde",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]},public:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}},N8e={id:1273227453,name:"SKALE | Human Protocol",network:"skale-human-protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]},public:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}},P8e={id:1482601649,name:"SKALE | Nebula Gaming Hub",network:"skale-nebula",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]},public:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}},O8e={id:503129905,name:"SKALE | Nebula Gaming Hub Testnet",network:"skale-nebula-testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird"]},public:{http:["https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2205882}},testnet:!0},D8e={id:278611351,name:"SKALE | Razor Network",network:"skale-razor",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]},public:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}},$8e={id:1350216234,name:"SKALE | Titan Community Hub",network:"skale-titan",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]},public:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}},B8e={id:1517929550,name:"SKALE | Titan Community Hub Testnet",network:"skale-titan-testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-aware-chief-gianfar"]},public:{http:["https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar"],webSocket:["wss://staging-v3.skalenodes.com/v1/ws/staging-aware-chief-gianfar"]}},blockExplorers:{blockscout:{name:"SKALE Explorer",url:"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com"},default:{name:"SKALE Explorer",url:"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2085155}},testnet:!0},L8e={id:19,name:"Songbird Mainnet",network:"songbird-mainnet",nativeCurrency:{decimals:18,name:"songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]},public:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network"}}},U8e={id:16,name:"Coston",network:"coston",nativeCurrency:{decimals:18,name:"costonflare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]},public:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network"}},testnet:!0},F8e={id:8082,name:"Shardeum Sphinx",network:"shmSphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]},public:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0},j8e={id:57,name:"Syscoin Mainnet",network:"syscoin",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]},public:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}},z8e={id:5700,name:"Syscoin Tanenbaum Testnet",network:"syscoin-testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]},public:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}},H8e={id:841,name:"Taraxa Mainnet",network:"taraxa",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]},public:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}},q8e={id:167005,name:"Taiko (Alpha-3 Testnet)",network:"taiko-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]},public:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}},W8e={id:842,name:"Taraxa Testnet",network:"taraxa-testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]},public:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0},V8e={id:40,name:"Telos",network:"telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://mainnet.telos.net/evm"]},public:{http:["https://mainnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}},G8e={id:41,name:"Telos",network:"telosTestnet",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://testnet.telos.net/evm"]},public:{http:["https://testnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0},K8e={id:997,name:"5ireChain Thunder Testnet",network:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.5ire.network"]},public:{http:["https://rpc-testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Explorer",url:"https://explorer.5ire.network"}},testnet:!0},Z8e={id:73799,name:"Volta Chain",network:"volta",nativeCurrency:{name:"VT",symbol:"VT",decimals:18},rpcUrls:{default:{http:["https://volta-rpc.energyweb.org"]},public:{http:["https://volta-rpc.energyweb.org"]}},blockExplorers:{default:{name:"Volta Explorer",url:"https://volta-explorer.energyweb.org"}},contracts:{ensRegistry:{address:"0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac"}}},J8e={id:888,name:"Wanchain",network:"wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]},public:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{etherscan:{name:"WanScan",url:"https://wanscan.org"},default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}},Y8e={id:999,name:"Wanchain Testnet",network:"wanchainTestnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]},public:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{etherscan:{name:"WanScanTest",url:"https://wanscan.org"},default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0},Q8e={id:50,name:"XinFin Network",network:"xdc",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xinfin.network"]},public:{http:["https://rpc.xinfin.network"]}},blockExplorers:{xinfin:{name:"XinFin",url:"https://explorer.xinfin.network"},default:{name:"Blocksscan",url:"https://xdc.blocksscan.io"}}},X8e={id:51,name:"Apothem Network",network:"xdc-testnet",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]},public:{http:["https://erpc.apothem.network"]}},blockExplorers:{xinfin:{name:"XinFin",url:"https://explorer.apothem.network"},default:{name:"Blocksscan",url:"https://apothem.blocksscan.io"}}},exe={id:1337803,network:"zhejiang",name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]},public:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{beaconchain:{name:"Etherscan",url:"https://zhejiang.beaconcha.in"},blockscout:{name:"Blockscout",url:"https://blockscout.com/eth/zhejiang-testnet"},default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0},txe={id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]},public:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}},rxe={id:280,name:"zkSync Era Testnet",network:"zksync-era-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.era.zksync.dev"],webSocket:["wss://testnet.era.zksync.dev/ws"]},public:{http:["https://testnet.era.zksync.dev"],webSocket:["wss://testnet.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://goerli.explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0},nxe={id:7001,name:"ZetaChain Athens Testnet",network:"zetachain-athens-testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{public:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]},default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},blockExplorers:{default:{name:"ZetaScan",url:"https://athens3.explorer.zetachain.com"}},testnet:!0},ixe={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882}}},sxe={id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123}},testnet:!0};const BX=Object.freeze(Object.defineProperty({__proto__:null,arbitrum:N4e,arbitrumGoerli:P4e,arbitrumNova:O4e,aurora:D4e,auroraTestnet:$4e,avalanche:B4e,avalancheFuji:L4e,base:U4e,baseGoerli:F4e,bearNetworkChainMainnet:j4e,bearNetworkChainTestnet:z4e,boba:H4e,bronos:q4e,bronosTestnet:W4e,bsc:V4e,bscTestnet:G4e,bxn:K4e,bxnTestnet:Z4e,canto:J4e,celo:Y4e,celoAlfajores:Q4e,celoCannoli:X4e,classic:e6e,confluxESpace:t6e,cronos:r6e,cronosTestnet:n6e,crossbell:i6e,dfk:s6e,dogechain:o6e,edgeware:a6e,edgewareTestnet:c6e,ekta:p6e,ektaTestnet:g6e,emerald:l6e,eos:u6e,eosTestnet:h6e,evmos:f6e,evmosTestnet:d6e,ewc:m6e,fantom:b6e,fantomTestnet:w6e,fibo:v6e,filecoin:y6e,filecoinCalibration:x6e,filecoinHyperspace:_6e,flare:E6e,flareTestnet:A6e,foundry:C6e,fuse:S6e,fuseSparknet:I6e,gnosis:N6e,gnosisChiado:P6e,gobi:k6e,goerli:M6e,haqqMainnet:$6e,haqqTestedge2:B6e,hardhat:O6e,harmonyOne:D6e,iotex:T6e,iotexTestnet:R6e,klaytn:L6e,linea:U6e,lineaTestnet:F6e,localhost:j6e,mainnet:z6e,mantle:H6e,mantleTestnet:q6e,metis:W6e,metisGoerli:V6e,mev:G6e,mevTestnet:K6e,modeTestnet:Z6e,moonbaseAlpha:J6e,moonbeam:Y6e,moonriver:Q6e,neonDevnet:X6e,nexi:e8e,nexilix:t8e,oasys:r8e,okc:n8e,optimism:i8e,optimismGoerli:s8e,polygon:o8e,polygonMumbai:a8e,polygonZkEvm:l8e,polygonZkEvmTestnet:c8e,pulsechain:u8e,pulsechainV4:h8e,qMainnet:f8e,qTestnet:d8e,rollux:p8e,rolluxTestnet:g8e,ronin:m8e,saigon:b8e,sapphire:y8e,sapphireTestnet:x8e,scrollSepolia:w8e,scrollTestnet:v8e,sepolia:_8e,shardeumSphinx:F8e,skaleBlockBrawlers:E8e,skaleCalypso:A8e,skaleCalypsoTestnet:C8e,skaleChaosTestnet:S8e,skaleCryptoBlades:I8e,skaleCryptoColosseum:T8e,skaleEuropa:R8e,skaleEuropaTestnet:k8e,skaleExorde:M8e,skaleHumanProtocol:N8e,skaleNebula:P8e,skaleNebulaTestnet:O8e,skaleRazor:D8e,skaleTitan:$8e,skaleTitanTestnet:B8e,songbird:L8e,songbirdTestnet:U8e,syscoin:j8e,syscoinTestnet:z8e,taikoTestnetSepolia:q8e,taraxa:H8e,taraxaTestnet:W8e,telos:V8e,telosTestnet:G8e,thunderTestnet:K8e,volta:Z8e,wanchain:J8e,wanchainTestnet:Y8e,xdc:Q8e,xdcTestnet:X8e,zetachainAthensTestnet:nxe,zhejiang:exe,zkSync:txe,zkSyncTestnet:rxe,zora:ixe,zoraTestnet:sxe},Symbol.toStringTag,{value:"Module"})),Lu={};for(const r of Object.keys(BX)){const e=BX[r];let t="";((ige=e.rpcUrls)==null?void 0:ige.infura)!==void 0?t=e.rpcUrls.infura.http[0]:((sge=e.rpcUrls)==null?void 0:sge.alchemy)!==void 0&&(t=e.rpcUrls.alchemy.http[0]);const n={id:e.id,name:e.name,testnet:e.testnet??!1,nativeCurrency:e.nativeCurrency,hexId:"0x"+Number(e.id).toString(16),explorerUrl:((oge=e.blockExplorers)==null?void 0:oge.default.url)??"",rpcUrl:((age=e.rpcUrls)==null?void 0:age.default.http[0])??t};((cge=e.rpcUrls)==null?void 0:cge.default.webSocket)!==void 0&&(n.wsUrl=e.rpcUrls.default.webSocket[0]),((uge=(lge=e.rpcUrls)==null?void 0:lge.infura)==null?void 0:uge.webSocket)!==void 0&&n.wsUrl===void 0&&(n.wsUrl=e.rpcUrls.infura.webSocket[0]),((fge=(hge=e.rpcUrls)==null?void 0:hge.alchemy)==null?void 0:fge.webSocket)!==void 0&&n.wsUrl===void 0&&(n.wsUrl=e.rpcUrls.alchemy.webSocket[0]),n.wsUrl===void 0&&delete n.wsUrl,Lu[r==="mainnet"?"ethereum":r]=n}const NA={add:(r,e)=>{Lu[r]=e},getAll:()=>Object.values(Lu),findById:r=>Object.values(Lu).find(e=>e.id===r),findByKey:r=>Lu[r],findByName:r=>Object.values(Lu).find(e=>{var t;return(t=e.name)==null?void 0:t.includes(r)}),findByHexId:r=>Object.values(Lu).find(e=>e.hexId===r),findBySymbol:r=>Object.values(Lu).find(e=>e.nativeCurrency.symbol===r),getTestnets:()=>Object.values(Lu).filter(r=>r.testnet??!1),getMainnets:()=>Object.values(Lu).filter(r=>!(r.testnet??!1)),...Lu},gv=async(r,e)=>{const t=e==null?void 0:e.network,n=async l=>{const u=await r.request(l);if((u==null?void 0:u.error)!==void 0){const h=u.error;throw h.code===-32e3?new Error(kr.RPC_TIMEOUT):new Error(h.message)}return u},i=async l=>await new Promise((u,h)=>{try{n({method:"wallet_addEthereumChain",params:[{chainId:l.hexId,chainName:l.name,rpcUrls:[l.rpcUrl],nativeCurrency:l.nativeCurrency,blockExplorerUrls:[l.explorerUrl]}]}).then(()=>{u(!0)}).catch(p=>{h(p)})}catch(p){h(p)}}),s=async l=>await new Promise((u,h)=>{const p=`0x${l.id.toString(16)}`;n({method:"wallet_switchEthereumChain",params:[{chainId:p}]}).then(()=>{u(!0)}).catch(g=>{if(g.code===4902||String(g.message).includes("wallet_addEthereumChain")){const w=NA.findById(l.id);if(w===void 0){u(!0);return}i(w).then(()=>{u(!0)}).catch(y=>{h(y)})}else h(g)})}),o=async()=>parseInt(await n({method:"eth_chainId"}),16);return await(async()=>await new Promise((l,u)=>{if(t===void 0){l(!0);return}try{(async()=>{await o()!==t.id?s(t).then(()=>{setTimeout(()=>{l(!0)},1e3)}).catch(p=>{u(p)}):l(!0)})()}catch(h){u(h)}}))()},$p={metaMask:"data:image/svg+xml,%3Csvg%20fill%3D%22none%22%20height%3D%2233%22%20viewBox%3D%220%200%2035%2033%22%20width%3D%2235%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%22.25%22%3E%3Cpath%20d%3D%22m32.9582%201-13.1341%209.7183%202.4424-5.72731z%22%20fill%3D%22%23e17726%22%20stroke%3D%22%23e17726%22%2F%3E%3Cg%20fill%3D%22%23e27625%22%20stroke%3D%22%23e27625%22%3E%3Cpath%20d%3D%22m2.66296%201%2013.01714%209.809-2.3254-5.81802z%22%2F%3E%3Cpath%20d%3D%22m28.2295%2023.5335-3.4947%205.3386%207.4829%202.0603%202.1436-7.2823z%22%2F%3E%3Cpath%20d%3D%22m1.27281%2023.6501%202.13055%207.2823%207.46994-2.0603-3.48166-5.3386z%22%2F%3E%3Cpath%20d%3D%22m10.4706%2014.5149-2.0786%203.1358%207.405.3369-.2469-7.969z%22%2F%3E%3Cpath%20d%3D%22m25.1505%2014.5149-5.1575-4.58704-.1688%208.05974%207.4049-.3369z%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721%204.4819-2.1639-3.8583-3.0062z%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082%204.4689%202.1639-.6105-5.1701z%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m24.7348%2028.8721-4.469-2.1639.3638%202.9025-.039%201.231z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m10.8732%2028.8721%204.1572%201.9696-.026-1.231.3508-2.9025z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m15.1084%2021.7842-3.7155-1.0884%202.6243-1.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m20.5126%2021.7842%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721.6495-5.3386-4.13117.1167z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m24.0982%2023.5335.6366%205.3386%203.4946-5.2219z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m27.2291%2017.6507-7.405.3369.6885%203.7966%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958%202.6242-1.2051%201.0913%202.2935.6885-3.7966-7.40495-.3369z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m8.392%2017.6507%203.1049%206.0513-.1039-3.0062z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m24.2412%2020.6958-.1169%203.0062%203.1049-6.0513z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m15.797%2017.9876-.6886%203.7967.8704%204.4833.1949-5.9087z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m19.8242%2017.9876-.3638%202.3584.1819%205.9216.8704-4.4833z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m20.5127%2021.7842-.8704%204.4834.6236.4406%203.8584-3.0062.1169-3.0062z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958.104%203.0062%203.8583%203.0062.6236-.4406-.8704-4.4834z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m20.5906%2030.8417.039-1.231-.3378-.2851h-4.9626l-.3248.2851.026%201.231-4.1572-1.9696%201.4551%201.1921%202.9489%202.0344h5.0536l2.962-2.0344%201.442-1.1921z%22%20fill%3D%22%23c0ac9d%22%20stroke%3D%22%23c0ac9d%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082-.6236-.4406h-3.6635l-.6236.4406-.3508%202.9025.3248-.2851h4.9626l.3378.2851z%22%20fill%3D%22%23161616%22%20stroke%3D%22%23161616%22%2F%3E%3Cpath%20d%3D%22m33.5168%2011.3532%201.1043-5.36447-1.6629-4.98873-12.6923%209.3944%204.8846%204.1205%206.8983%202.0085%201.52-1.7752-.6626-.4795%201.0523-.9588-.8054-.622%201.0523-.8034z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m1%205.98873%201.11724%205.36447-.71451.5313%201.06527.8034-.80545.622%201.05228.9588-.66255.4795%201.51997%201.7752%206.89835-2.0085%204.8846-4.1205-12.69233-9.3944z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m32.0489%2016.5234-6.8983-2.0085%202.0786%203.1358-3.1049%206.0513%204.1052-.0519h6.1318z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m10.4705%2014.5149-6.89828%202.0085-2.29944%207.1267h6.11883l4.10519.0519-3.10487-6.0513z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m19.8241%2017.9876.4417-7.5932%202.0007-5.4034h-8.9119l2.0006%205.4034.4417%207.5932.1689%202.3842.013%205.8958h3.6635l.013-5.8958z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",walletConnect:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIgaWQ9IkxheWVyXzEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAzODcuNiAyMzcuNiIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9IldhbGxldENvbm5lY3RfMDAwMDAwNzM3MD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Zz4K"},oxe={id:"phantom",name:"Phantom",icon:$p.phantom,provider:(dge=window==null?void 0:window.phantom)==null?void 0:dge.ethereum,downloadLink:"https://phantom.app/",platforms:[Po.BROWSER,Po.MOBILE],isDetected:()=>{var r;return Boolean((r=window==null?void 0:window.phantom)==null?void 0:r.ethereum)},createDeepLink:r=>`https://phantom.app/ul/browse/${r}?ref=${r}`,isConnected:async()=>{var r,e;return Boolean((await((e=(r=window==null?void 0:window.phantom)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length)},connect:async()=>await new Promise((r,e)=>{var n;const t=(n=window==null?void 0:window.phantom)==null?void 0:n.ethereum;try{t==null||t.request({method:"eth_requestAccounts"}).then(()=>{r(t)}).catch(i=>{e(i)})}catch(i){e(i)}})},axe={id:"metamask",name:"MetaMask",icon:$p.metaMask,downloadLink:"https://metamask.io/download/",provider:window.ethereum,platforms:[Po.BROWSER,Po.MOBILE],isDetected:()=>{var r;return Boolean((r=window==null?void 0:window.ethereum)==null?void 0:r.isMetaMask)},createDeepLink:r=>`https://metamask.app.link/dapp/${r}`,isConnected:async()=>Boolean((await(window==null?void 0:window.ethereum).request({method:"eth_accounts"})).length),connect:async r=>await new Promise((e,t)=>{const n=window==null?void 0:window.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{gv(n,r).then(()=>{e(n)}).catch(i=>{t(i)})}).catch(i=>{t(i)})}catch(i){t(i)}})};class XM{constructor(e,t,n){Ee(this,"address");Ee(this,"cachedMethods",{});Ee(this,"ABI");Ee(this,"ethersContract");Ee(this,"provider");Ee(this,"ethers");this.ABI=n??[],this.address=e,this.provider=t??Vh.instance,this.ethers=this.provider.ethers,this.ethersContract=this.ethers.contract(e,this.ABI,this.ethers.jsonRpc)}getAddress(){return this.address}async callMethod(e,...t){return this.ethersContract[e](...t)}async callMethodWithCache(e,...t){return this.cachedMethods[e]!==void 0?this.cachedMethods[e]:this.cachedMethods[e]=await this.callMethod(e,...t)}async getMethodData(e,...t){return this.ethersContract.interface.encodeFunctionData(e,t)}async getMethodEstimateGas(e,t,...n){return Number(await this.ethersContract[e].estimateGas(...n,{from:t}))}async createTransactionData(e,t,...n){const[i,s,o,a]=await Promise.all([this.provider.ethers.getGasPrice(),this.provider.ethers.getNonce(t),this.getMethodData(e,...n),this.getMethodEstimateGas(e,t,...n)]);return{from:t,data:o,nonce:s,gasPrice:i,gasLimit:a,value:"0x0",to:this.getAddress(),chainId:this.provider.network.id}}}const LX=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"delegator",type:"address"},{indexed:!0,internalType:"address",name:"fromDelegate",type:"address"},{indexed:!0,internalType:"address",name:"toDelegate",type:"address"}],name:"DelegateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"delegate",type:"address"},{indexed:!1,internalType:"uint256",name:"previousBalance",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newBalance",type:"uint256"}],name:"DelegateVotesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"delegatee",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"delegatee",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"delegateBySig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"delegates",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPastTotalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPastVotes",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getVotes",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}];class Bg{constructor(e,t){Ee(this,"rawData");Ee(this,"signedData");Ee(this,"wallet");Ee(this,"provider");this.rawData=e,this.provider=t??Vh.instance}async sign(e){try{return this.wallet=this.provider.ethers.wallet(e),this.signedData=await this.wallet.signTransaction(this.rawData),this}catch(t){const n=t;throw n!=null&&n.shortMessage.includes("transaction from address mismatch")?new Error(kr.INVALID_PRIVATE_KEY):t}}async send(){return await this.provider.ethers.jsonRpc.send("eth_sendRawTransaction",[this.signedData])}getRawData(){return this.rawData}getSignedData(){return this.signedData}}class UX extends XM{constructor(e,t,n){super(e,t,n??LX)}async getName(){return await this.callMethodWithCache("name")}async getSymbol(){return await this.callMethodWithCache("symbol")}async getBalance(e){return Number(await this.callMethod("balanceOf",e))}async getOwner(e){return await this.callMethod("ownerOf",e)}async getTokenURI(e){return await this.callMethodWithCache("tokenURI",e)}async getApproved(e){const t=await this.callMethod("getApproved",e);return t==="0x0000000000000000000000000000000000000000"?null:t}async transfer(e,t,n){return await this.transferFrom(e,e,t,n)}async transferFrom(e,t,n,i){if(await this.getBalance(t)<=0)throw new Error(kr.INSUFFICIENT_BALANCE);if(await this.getOwner(i)!==t)throw new Error(kr.UNAUTHORIZED_ADDRESS);if(e!==t&&await this.getApproved(i)!==e)throw new Error(kr.UNAUTHORIZED_ADDRESS);return new Bg(await this.createTransactionData("transferFrom",e,t,n,i))}async approve(e,t,n){if(await this.getBalance(e)<=0)throw new Error(kr.INSUFFICIENT_BALANCE);if(await this.getOwner(n)!==e)throw new Error(kr.UNAUTHORIZED_ADDRESS);return new Bg(await this.createTransactionData("approve",e,t,n))}}class cxe{constructor(e){Ee(this,"provider");this.provider=e??Vh.instance}getName(){return this.provider.network.nativeCurrency.name??this.provider.network.nativeCurrency.symbol}getSymbol(){return this.provider.network.nativeCurrency.symbol}getDecimals(){return this.provider.network.nativeCurrency.decimals}async getBalance(e){const t=await this.provider.ethers.getBalance(e);return ld(t.toString(),this.getDecimals())}async transfer(e,t,n){if(n<0)throw new Error(kr.INVALID_AMOUNT);if(n>await this.getBalance(e))throw new Error(kr.INSUFFICIENT_BALANCE);const i=Q5(n,this.getDecimals()),s={data:"0x",to:t,from:e,value:i,chainId:this.provider.network.id},[o,a,l]=await Promise.all([this.provider.ethers.getGasPrice(),this.provider.ethers.getNonce(e),this.provider.ethers.getEstimateGas(s)]);return s.nonce=a,s.gasPrice=o,s.gasLimit=l,new Bg(s)}}const FX=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_from",type:"address"},{indexed:!0,name:"_to",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_owner",type:"address"},{indexed:!0,name:"_spender",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Approval",type:"event"}];class jX extends XM{constructor(e,t,n){super(e,t,n??FX)}async getName(){return await this.callMethodWithCache("name")}async getSymbol(){return await this.callMethodWithCache("symbol")}async getDecimals(){return Number(await this.callMethodWithCache("decimals"))}async getBalance(e){const[t,n]=await Promise.all([this.getDecimals(),this.callMethod("balanceOf",e)]);return ld(n,t)}async getTotalSupply(){const[e,t]=await Promise.all([this.getDecimals(),this.callMethod("totalSupply")]);return ld(t,e)}async getAllowance(e,t){const[n,i]=await Promise.all([this.getDecimals(),await this.callMethod("allowance",e,t)]);return ld(i,n)}async transfer(e,t,n){if(n<=0)throw new Error(kr.INVALID_AMOUNT);const i=await this.getBalance(e);if(n>i)throw new Error(kr.INSUFFICIENT_BALANCE);const s=Q5(n,await this.getDecimals());return new Bg(await this.createTransactionData("transfer",e,t,s))}async transferFrom(e,t,n,i){if(i<0)throw new Error(kr.INVALID_AMOUNT);const s=await this.getBalance(t);if(i>s)throw new Error(kr.INSUFFICIENT_BALANCE);const o=await this.getAllowance(t,e);if(o===0)throw new Error(kr.UNAUTHORIZED_ADDRESS);if(i>o)throw new Error(kr.INVALID_AMOUNT);const a=Q5(i,await this.getDecimals());return new Bg(await this.createTransactionData("transferFrom",e,t,n,a))}async approve(e,t,n){if(n<0)throw new Error(kr.INVALID_AMOUNT);const i=await this.getBalance(e);if(n>i)throw new Error(kr.INSUFFICIENT_BALANCE);const s=Q5(n,await this.getDecimals());return new Bg(await this.createTransactionData("approve",e,t,s))}}const lxe=Object.freeze(Object.defineProperty({__proto__:null,Coin:cxe,Contract:XM,NFT:UX,Token:jX},Symbol.toStringTag,{value:"Module"})),uxe={[vn.TOKEN]:["0xa9059cbb","0x095ea7b3","0x23b872dd"],[vn.NFT]:["0x23b872dd","0x095ea7b3","0x42842e0e","0xb88d4fde","0xf242432a","0x2eb2c2d6","0x29535c7e"]};class PA{constructor(e,t){Ee(this,"id");Ee(this,"provider");Ee(this,"ethers");Ee(this,"data");this.id=e,this.provider=t??Vh.instance,this.ethers=this.provider.ethers}async getData(){var e,t;if(((e=this.data)==null?void 0:e.response)!==void 0&&((t=this.data)==null?void 0:t.receipt)!==null)return this.data;try{const n=await this.ethers.getTransaction(this.id);if(n===null)return null;const i=await this.ethers.getTransactionReceipt(this.id);return this.data={response:n,receipt:i}}catch(n){throw n instanceof Error&&String(n.message).includes("timeout")?new Error(kr.RPC_TIMEOUT):new Error(kr.RPC_REQUEST_ERROR)}}async wait(e=4e3){return await new Promise((t,n)=>{const i=async()=>{try{const s=await this.getStatus();if(s!==Jn.PENDING){t(s);return}setTimeout(i,e)}catch{n(Jn.FAILED)}};i()})}getId(){return this.id}async getType(){const e=await this.getData();if(e===null)return vn.GENERAL;if(await this.provider.ethers.getByteCode(e.response.to??"")==="0x"||e.response.data==="0x")return vn.COIN;if(Object.entries(uxe).find(([i,s])=>s.includes(e.response.data.slice(0,10)))!==void 0){const i=new UX(e.response.to??"");try{return await i.getApproved(1),vn.NFT}catch{return vn.TOKEN}}return vn.CONTRACT}getUrl(){let e=this.provider.network.explorerUrl;return e+=e.endsWith("/")?"":"/",e+="tx/"+this.id,e}async getSigner(){const e=await this.getData();return(e==null?void 0:e.response.from)??""}async getFee(){var t,n;const e=await this.getData();return((t=e==null?void 0:e.response)==null?void 0:t.gasPrice)===void 0||((n=e==null?void 0:e.receipt)==null?void 0:n.gasUsed)===void 0?0:ld(((e==null?void 0:e.response.gasPrice)*(e==null?void 0:e.receipt.gasUsed)).toString(),this.provider.network.nativeCurrency.decimals)}async getBlockNumber(){const e=await this.getData();return(e==null?void 0:e.response.blockNumber)??0}async getBlockTimestamp(){const e=await this.getBlockNumber(),t=await this.ethers.getBlock(e);return(t==null?void 0:t.timestamp)??0}async getBlockConfirmationCount(){const e=await this.getBlockNumber(),n=await this.ethers.getBlockNumber()-e;return n<0?0:n}async getStatus(){const e=await this.getData();return(e==null?void 0:e.response.blockNumber)!==null&&(e==null?void 0:e.receipt)!==null?(e==null?void 0:e.receipt.status)===1?Jn.CONFIRMED:Jn.FAILED:Jn.PENDING}}class OA extends PA{constructor(t,n,i){super(t,n);Ee(this,"ABI");this.ABI=i??[]}async getAddress(){const t=await this.getData();return(t==null?void 0:t.response.to)??""}async decodeData(t){if(t===void 0){const n=await this.getData();if(n===null)return null;t=n.response}return new Sg(this.ABI).parseTransaction({data:t.data??"",value:t.value??0})}}class zX extends OA{constructor(e,t,n){super(e,t,n??LX)}async getReceiver(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[1]:e.args[0]}async getSender(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[0]:await this.getSigner()}async getNftId(){var e;return Number(((e=await this.decodeData())==null?void 0:e.args[2])??0)}async verifyTransfer(e,t,n){if(await this.getStatus()===Jn.PENDING)return Jn.PENDING;if(await this.getNftId()!==n)return Jn.FAILED;if(e===wn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Jn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Jn.FAILED;return Jn.CONFIRMED}}class HX extends PA{async getReceiver(){const e=await this.getData();return(e==null?void 0:e.response.to)??""}async getSender(){return await this.getSigner()}async getAmount(){const e=await this.getData(),{decimals:t}=this.provider.network.nativeCurrency;return ld(((e==null?void 0:e.response.value)??0).toString(),t)}async verifyTransfer(e,t,n){if(await this.getStatus()===Jn.PENDING)return Jn.PENDING;if(await this.getAmount()!==n)return Jn.FAILED;if(e===wn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Jn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Jn.FAILED;return Jn.CONFIRMED}}class qX extends OA{constructor(e,t,n){super(e,t,n??FX)}async getReceiver(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[1]:e.args[0]}async getSender(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[0]:await this.getSigner()}async getAmount(){const e=new jX(await this.getAddress()),t=await this.decodeData();return t===null?0:t.name==="transferFrom"?ld(t.args[2].toString(),await e.getDecimals()):ld(t.args[1].toString(),await e.getDecimals())}async verifyTransfer(e,t,n){if(await this.getStatus()===Jn.PENDING)return Jn.PENDING;if(await this.getAmount()!==n)return Jn.FAILED;if(e===wn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Jn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Jn.FAILED;return Jn.CONFIRMED}}const hxe=Object.freeze(Object.defineProperty({__proto__:null,CoinTransaction:HX,ContractTransaction:OA,NftTransaction:zX,TokenTransaction:qX,Transaction:PA},Symbol.toStringTag,{value:"Module"}));class fxe{constructor(e,t,n){Ee(this,"type");Ee(this,"provider");Ee(this,"status",!1);Ee(this,"ethers");Ee(this,"jsonRpc");Ee(this,"webSocket");Ee(this,"callbacks",[]);Ee(this,"dynamicStop",()=>{});Ee(this,"triggeredTransactions",[]);Ee(this,"filter");this.type=e,this.filter=t??{},this.provider=n??Vh.instance,this.ethers=this.provider.ethers,this.jsonRpc=this.provider.ethers.jsonRpc}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[lK[this.type]]())}getStatus(){return this.status}async on(e){if(this.webSocket===void 0){const t=await this.provider.ethers.connectWebSocket();if(typeof t=="string")throw new Error(kr.WS_CONNECTION_FAILED);this.webSocket=t}return this.start(),this.callbacks.push(e),!0}trigger(e){this.triggeredTransactions.includes(e.id)||(this.triggeredTransactions.push(e.id),this.callbacks.forEach(t=>{t(e)}))}generalProcess(){const e=async t=>{var n;if(((n=this.filter)==null?void 0:n.signer)!==void 0){const i=await this.ethers.getTransaction(t);if((i==null?void 0:i.from.toLowerCase())!==this.filter.signer.toLowerCase())return}this.trigger(new PA(t))};this.webSocket.on("pending",e),this.dynamicStop=()=>{this.webSocket.off("pending",e)}}contractProcess(){const e=this.filter;let t;e.address===void 0?t="pending":t={address:e.address};const n=s=>{if(s===null)return!1;const o={},a={};return e.signer!==void 0&&(o.signer=e.signer.toLowerCase(),a.signer=s.from.toLowerCase()),!!X5(o,a)},i=async s=>{let o;if(typeof s=="string"){if(o=await this.ethers.getTransaction(s),!n(o)||await this.ethers.getByteCode((o==null?void 0:o.to)??"")==="0x")return}else o=await this.ethers.getTransaction(s.transactionHash);n(o)&&this.trigger(new OA(o.hash))};this.webSocket.on(t,i),this.dynamicStop=()=>{this.webSocket.off(t,i)}}coinProcess(){const e=this.filter;if(e.signer!==void 0&&e.sender!==void 0&&e.signer!==e.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");const t=async n=>{var h;const i=await this.ethers.getTransaction(n);if(i===null)return;const s=e.sender??e.signer,o={},a={};if(s!==void 0&&(o.sender=s.toLowerCase(),a.sender=i.from.toLowerCase()),e.receiver!==void 0&&(o.receiver=e.receiver.toLowerCase(),a.receiver=(h=i.to)==null?void 0:h.toLowerCase()),!X5(o,a)||await this.ethers.getByteCode((i==null?void 0:i.to)??"")!=="0x")return;const u=new HX(n);e.amount!==void 0&&(await u.wait(),await u.getAmount()!==e.amount)||this.trigger(u)};this.webSocket.on("pending",t),this.dynamicStop=()=>{this.webSocket.off("pending",t)}}tokenProcess(){const e=this.filter,t={address:e.address,topics:[Nc("Transfer(address,address,uint256)"),e.sender!==void 0?Oo(e.sender,32):null,e.receiver!==void 0?Oo(e.receiver,32):null]},n=async i=>{const s=new qX(i.transactionHash),o=await s.getData();if(o===null)return;const a=await s.decodeData(o.response);if(a===null||a.name!=="transfer"&&a.name!=="transferFrom")return;const l={},u={};e.signer!==void 0&&(l.signer=e.signer.toLowerCase(),u.signer=o.response.from.toLowerCase()),X5(l,u)&&(e.amount!==void 0&&(await s.wait(),await s.getAmount()!==e.amount)||this.trigger(s))};this.webSocket.on(t,n),this.dynamicStop=()=>{this.webSocket.off(t,n)}}nftProcess(){const e=this.filter,t={address:e.address,topics:[Nc("Transfer(address,address,uint256)"),e.sender!==void 0?Oo(e.sender,32):null,e.receiver!==void 0?Oo(e.receiver,32):null,e.nftId!==void 0?Oo(`0x0${e.nftId.toString(16)}`,32):null]},n=async i=>{const s=new zX(i.transactionHash),o=await s.getData();if(o===null)return;const a=await s.decodeData(o.response);if(a===null||a.name!=="transferFrom")return;const l={},u={};e.signer!==void 0&&(l.signer=e.signer.toLowerCase(),u.signer=o.response.from.toLowerCase()),X5(l,u)&&this.trigger(s)};this.webSocket.on(t,n),this.dynamicStop=()=>{this.webSocket.off(t,n)}}}const dxe=Object.freeze(Object.defineProperty({__proto__:null,TransactionListener:fxe,TransactionSigner:Bg},Symbol.toStringTag,{value:"Module"})),pxe=Symbol(),WX=Object.getPrototypeOf,eN=new WeakMap,gxe=r=>r&&(eN.has(r)?eN.get(r):WX(r)===Object.prototype||WX(r)===Array.prototype),mxe=r=>gxe(r)&&r[pxe]||null,VX=(r,e=!0)=>{eN.set(r,e)},tN=r=>typeof r=="object"&&r!==null,Bp=new WeakMap,D4=new WeakSet,bxe=(r=Object.is,e=(u,h)=>new Proxy(u,h),t=u=>tN(u)&&!D4.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},i=new WeakMap,s=(u,h,p=n)=>{const g=i.get(u);if((g==null?void 0:g[0])===h)return g[1];const w=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return VX(w,!0),i.set(u,[h,w]),Reflect.ownKeys(u).forEach(y=>{if(Object.getOwnPropertyDescriptor(w,y))return;const C=Reflect.get(u,y),T={value:C,enumerable:!0,configurable:!0};if(D4.has(C))VX(C,!1);else if(C instanceof Promise)delete T.value,T.get=()=>p(C);else if(Bp.has(C)){const[k,N]=Bp.get(C);T.value=s(k,N(),p)}Object.defineProperty(w,y,T)}),Object.preventExtensions(w)},o=new WeakMap,a=[1,1],l=u=>{if(!tN(u))throw new Error("object required");const h=o.get(u);if(h)return h;let p=a[0];const g=new Set,w=(V,Q=++a[0])=>{p!==Q&&(p=Q,g.forEach(F=>F(V,Q)))};let y=a[1];const C=(V=++a[1])=>(y!==V&&!g.size&&(y=V,k.forEach(([Q])=>{const F=Q[1](V);F>p&&(p=F)})),p),T=V=>(Q,F)=>{const M=[...Q];M[1]=[V,...M[1]],w(M,F)},k=new Map,N=(V,Q)=>{if(g.size){const F=Q[3](T(V));k.set(V,[Q,F])}else k.set(V,[Q])},O=V=>{var Q;const F=k.get(V);F&&(k.delete(V),(Q=F[1])==null||Q.call(F))},B=V=>(g.add(V),g.size===1&&k.forEach(([F,M],b)=>{const d=F[3](T(b));k.set(b,[F,d])}),()=>{g.delete(V),g.size===0&&k.forEach(([F,M],b)=>{M&&(M(),k.set(b,[F]))})}),z=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),$=e(z,{deleteProperty(V,Q){const F=Reflect.get(V,Q);O(Q);const M=Reflect.deleteProperty(V,Q);return M&&w(["delete",[Q],F]),M},set(V,Q,F,M){const b=Reflect.has(V,Q),d=Reflect.get(V,Q,M);if(b&&(r(d,F)||o.has(F)&&r(d,o.get(F))))return!0;O(Q),tN(F)&&(F=mxe(F)||F);let m=F;if(F instanceof Promise)F.then(x=>{F.status="fulfilled",F.value=x,w(["resolve",[Q],x])}).catch(x=>{F.status="rejected",F.reason=x,w(["reject",[Q],x])});else{!Bp.has(F)&&t(F)&&(m=l(F));const x=!D4.has(m)&&Bp.get(m);x&&N(Q,x)}return Reflect.set(V,Q,m,M),w(["set",[Q],F,d]),!0}});o.set(u,$);const D=[z,C,s,B];return Bp.set($,D),Reflect.ownKeys(u).forEach(V=>{const Q=Object.getOwnPropertyDescriptor(u,V);"value"in Q&&($[V]=u[V],delete Q.value,delete Q.writable),Object.defineProperty(z,V,Q)}),$})=>[l,Bp,D4,r,e,t,n,i,s,o,a],[wxe]=bxe();function vi(r={}){return wxe(r)}function hs(r,e,t){const n=Bp.get(r);let i;const s=[],o=n[3];let a=!1;const u=o(h=>{if(s.push(h),t){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,u()}}function rN(r,e){const t=Bp.get(r),[n,i,s]=t;return s(n,i(),e)}function Lp(r){return D4.add(r),r}function Ra(r,e,t,n){let i=r[e];return hs(r,()=>{const s=r[e];Object.is(i,s)||t(i=s)},n)}const nN="https://secure.walletconnect.com",GX=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],Ls={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:nN,SECURE_SITE_DASHBOARD:`${nN}/dashboard`,SECURE_SITE_FAVICON:`${nN}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1},tr={isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(r,e=""){return r==null?void 0:r.id.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){const r=window.navigator.userAgent.toLowerCase();return tr.isMobile()&&r.includes("android")},isIos(){const r=window.navigator.userAgent.toLowerCase();return tr.isMobile()&&(r.includes("iphone")||r.includes("ipad"))},isClient(){return typeof window<"u"},isPairingExpired(r){return r?r-Date.now()<=Ls.TEN_SEC_MS:!0},isAllowedRetry(r){return Date.now()-r>=Ls.ONE_SEC_MS},copyToClopboard(r){navigator.clipboard.writeText(r)},getPairingExpiry(){return Date.now()+Ls.FOUR_MINUTES_MS},getPlainAddress(r){return r.split(":")[2]},async wait(r){return new Promise(e=>{setTimeout(e,r)})},debounce(r,e=500){let t;return(...n)=>{function i(){r(...n)}t&&clearTimeout(t),t=setTimeout(i,e)}},isHttpUrl(r){return r.startsWith("http://")||r.startsWith("https://")},formatNativeUrl(r,e){if(tr.isHttpUrl(r))return this.formatUniversalUrl(r,e);let t=r;t.includes("://")||(t=r.replaceAll("/","").replaceAll(":",""),t=`${t}://`),t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},formatUniversalUrl(r,e){if(!tr.isHttpUrl(r))return this.formatNativeUrl(r,e);let t=r;t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},openHref(r,e,t){window.open(r,e,t||"noreferrer noopener")},async preloadImage(r){const e=new Promise((t,n)=>{const i=new Image;i.onload=t,i.onerror=n,i.crossOrigin="anonymous",i.src=r});return Promise.race([e,tr.wait(2e3)])},formatBalance(r,e){var n;let t;if(r==="0")t="0.000";else if(typeof r=="string"){const i=Number(r);i&&(t=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return t?`${t} ${e??""}`:`0.000 ${e??""}`},formatBalance2(r,e){var n;let t;if(r==="0")t="0";else if(typeof r=="string"){const i=Number(r);i&&(t=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:t??"0",rest:t==="0"?"000":"",symbol:e}},isRestrictedRegion(){try{const{timeZone:r}=new Intl.DateTimeFormat().resolvedOptions(),e=r.toUpperCase();return Ls.RESTRICTED_TIMEZONES.includes(e)}catch{return!1}},getApiUrl(){return tr.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com"},getBlockchainApiUrl(){return tr.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"},getAnalyticsUrl(){return tr.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com"},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,r=>{const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})},parseError(r){var e,t;return typeof r=="string"?r:typeof((t=(e=r==null?void 0:r.issues)==null?void 0:e[0])==null?void 0:t.message)=="string"?r.issues[0].message:r instanceof Error?r.message:"Unknown error"},sortRequestedNetworks(r,e=[]){const t={};return e&&r&&(r.forEach((n,i)=>{t[n]=i}),e.sort((n,i)=>{const s=t[n.id],o=t[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(r){let e=0;for(const t of r)e+=t.value??0;return e},formatTokenBalance(r){const e=r.toFixed(2),[t,n]=e.split(".");return{dollars:t,pennies:n}},isAddress(r){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)||/^(?:0x)?[0-9A-F]{40}$/iu.test(r))return!0}else return!1;return!1}};class iN{constructor({baseUrl:e}){this.baseUrl=e}async get({headers:e,signal:t,...n}){const i=this.createUrl(n);return(await fetch(i,{method:"GET",headers:e,signal:t,cache:"no-cache"})).json()}async getBlob({headers:e,signal:t,...n}){const i=this.createUrl(n);return(await fetch(i,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:t}){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),n}}const Bo=vi({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),hr={state:Bo,subscribeKey(r,e){return Ra(Bo,r,e)},setProjectId(r){Bo.projectId=r},setAllWallets(r){Bo.allWallets=r},setIncludeWalletIds(r){Bo.includeWalletIds=r},setExcludeWalletIds(r){Bo.excludeWalletIds=r},setFeaturedWalletIds(r){Bo.featuredWalletIds=r},setTokens(r){Bo.tokens=r},setTermsConditionsUrl(r){Bo.termsConditionsUrl=r},setPrivacyPolicyUrl(r){Bo.privacyPolicyUrl=r},setCustomWallets(r){Bo.customWallets=r},setIsSiweEnabled(r){Bo.isSiweEnabled=r},setEnableAnalytics(r){Bo.enableAnalytics=r},setSdkVersion(r){Bo.sdkVersion=r},setMetadata(r){Bo.metadata=r},setOnrampEnabled(r){Bo.enableOnramp=r},setWalletFeaturesEnabled(r){Bo.enableWalletFeatures=r}},vxe={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},yxe=tr.getBlockchainApiUrl(),jl=new iN({baseUrl:yxe}),ka={fetchIdentity({address:r}){return jl.get({path:`/v1/identity/${r}`,params:{projectId:hr.state.projectId}})},fetchTransactions({account:r,projectId:e,cursor:t,onramp:n,signal:i}){const s=t?{cursor:t}:{};return jl.get({path:`/v1/account/${r}/history?projectId=${e}${n?`&onramp=${n}`:""}`,params:s,signal:i})},fetchConvertTokens({projectId:r,chainId:e}){return jl.get({path:`/v1/convert/tokens?projectId=${r}&chainId=${e}`})},fetchTokenPrice({projectId:r,addresses:e}){return jl.post({path:"/v1/fungible/price",body:{projectId:r,currency:"usd",addresses:e},headers:{"Content-Type":"application/json"}})},fetchConvertAllowance({projectId:r,tokenAddress:e,userAddress:t}){const{sdkType:n,sdkVersion:i}=hr.state;return jl.get({path:`/v1/convert/allowance?projectId=${r}&tokenAddress=${e}&userAddress=${t}`,headers:{"Content-Type":"application/json","x-sdk-type":n,"x-sdk-version":i}})},fetchGasPrice({projectId:r,chainId:e}){const{sdkType:t,sdkVersion:n}=hr.state;return jl.get({path:`/v1/convert/gas-price?projectId=${r}&chainId=${e}`,headers:{"Content-Type":"application/json","x-sdk-type":t,"x-sdk-version":n}})},generateConvertCalldata({amount:r,from:e,projectId:t,to:n,userAddress:i}){return jl.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:r,eip155:{slippage:Ls.CONVERT_SLIPPAGE_TOLERANCE},from:e,projectId:t,to:n,userAddress:i}})},generateApproveCalldata({from:r,projectId:e,to:t,userAddress:n}){const{sdkType:i,sdkVersion:s}=hr.state;return jl.get({path:`/v1/convert/build-approve?projectId=${e}&userAddress=${n}&from=${r}&to=${t}`,headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":s}})},async getBalance(r,e){const{sdkType:t,sdkVersion:n}=hr.state;return jl.get({path:`/v1/account/${r}/balance`,headers:{"x-sdk-type":t,"x-sdk-version":n},params:{currency:"usd",projectId:hr.state.projectId,chainId:e}})},async generateOnRampURL({destinationWallets:r,partnerUserId:e,defaultNetwork:t,purchaseAmount:n,paymentAmount:i}){return(await jl.post({path:`/v1/generators/onrampurl?projectId=${hr.state.projectId}`,body:{destinationWallets:r,defaultNetwork:t,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url},async getOnrampOptions(){try{return await jl.get({path:`/v1/onramp/options?projectId=${hr.state.projectId}`})}catch{return vxe}},async getOnrampQuote({purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}){try{return await jl.post({path:`/v1/onramp/quote?projectId=${hr.state.projectId}`,body:{purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}})}catch{return{coinbaseFee:{amount:t,currency:e.id},networkFee:{amount:t,currency:e.id},paymentSubtotal:{amount:t,currency:e.id},paymentTotal:{amount:t,currency:e.id},purchaseAmount:{amount:t,currency:e.id},quoteId:"mocked-quote-id"}}}},Rd=vi({message:"",variant:"success",open:!1}),dn={state:Rd,subscribeKey(r,e){return Ra(Rd,r,e)},showSuccess(r){Rd.message=r,Rd.variant="success",Rd.open=!0},showError(r){const e=tr.parseError(r);Rd.message=e,Rd.variant="error",Rd.open=!0},hide(){Rd.open=!1}};function xxe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var KX={exports:{}},ys=KX.exports={},Gh,Kh;function sN(){throw new Error("setTimeout has not been defined")}function oN(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Gh=setTimeout:Gh=sN}catch{Gh=sN}try{typeof clearTimeout=="function"?Kh=clearTimeout:Kh=oN}catch{Kh=oN}})();function ZX(r){if(Gh===setTimeout)return setTimeout(r,0);if((Gh===sN||!Gh)&&setTimeout)return Gh=setTimeout,setTimeout(r,0);try{return Gh(r,0)}catch{try{return Gh.call(null,r,0)}catch{return Gh.call(this,r,0)}}}function _xe(r){if(Kh===clearTimeout)return clearTimeout(r);if((Kh===oN||!Kh)&&clearTimeout)return Kh=clearTimeout,clearTimeout(r);try{return Kh(r)}catch{try{return Kh.call(null,r)}catch{return Kh.call(this,r)}}}var kd=[],mv=!1,Lg,DA=-1;function Exe(){!mv||!Lg||(mv=!1,Lg.length?kd=Lg.concat(kd):DA=-1,kd.length&&JX())}function JX(){if(!mv){var r=ZX(Exe);mv=!0;for(var e=kd.length;e;){for(Lg=kd,kd=[];++DA1)for(var t=1;tn.id===r.id)||(e.unshift(r),e.length>2&&e.pop(),localStorage.setItem(QX,JSON.stringify(e)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const r=localStorage.getItem(QX);return r?JSON.parse(r):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(r){try{localStorage.setItem(XX,r)}catch{console.info("Unable to set Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(XX)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(r){try{localStorage.setItem(eee,r)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(eee)}catch{console.info("Unable to get Connected Connector")}}},Cxe=tr.getAnalyticsUrl(),Sxe=new iN({baseUrl:Cxe}),Ixe=["MODAL_CREATED"],bv=vi({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),yr={state:bv,subscribe(r){return hs(bv,()=>r(bv))},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=hr.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},async _sendAnalyticsEvent(r){try{if(Ixe.includes(r.data.event)||typeof window>"u")return;await Sxe.post({path:"/e",headers:yr._getApiHeaders(),body:{eventId:tr.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:r.timestamp,props:r.data}})}catch{}},sendEvent(r){bv.timestamp=Date.now(),bv.data=r,hr.state.enableAnalytics&&yr._sendAnalyticsEvent(bv)}},Vi=vi({transactions:[],coinbaseTransactions:{},transactionsByYear:{},loading:!1,empty:!1,next:void 0}),la={state:Vi,subscribe(r){return hs(Vi,()=>r(Vi))},async fetchTransactions(r,e){const{projectId:t}=hr.state;if(!t||!r)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");Vi.loading=!0;try{const n=await ka.fetchTransactions({account:r,projectId:t,cursor:Vi.next,onramp:e}),i=this.filterSpamTransactions(n.data),s=[...Vi.transactions,...i];Vi.loading=!1,e==="coinbase"?Vi.coinbaseTransactions=this.groupTransactionsByYearAndMonth(Vi.coinbaseTransactions,n.data):(Vi.transactions=s,Vi.transactionsByYear=this.groupTransactionsByYearAndMonth(Vi.transactionsByYear,i)),Vi.empty=s.length===0,Vi.next=n.next?n.next:void 0}catch{yr.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:r,projectId:t,cursor:Vi.next}}),dn.showError("Failed to fetch transactions"),Vi.loading=!1,Vi.empty=!0,Vi.next=void 0}},groupTransactionsByYearAndMonth(r={},e=[]){const t=r;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=t[i]??{},l=(o[s]??[]).filter(u=>u.id!==n.id);t[i]={...o,[s]:[...l,n].sort((u,h)=>new Date(h.metadata.minedAt).getTime()-new Date(u.metadata.minedAt).getTime())}}),t},filterSpamTransactions(r){return r.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},clearCursor(){Vi.next=void 0},resetTransactions(){Vi.transactions=[],Vi.transactionsByYear={},Vi.loading=!1,Vi.empty=!1,Vi.next=void 0}},fo=vi({wcError:!1,buffering:!1}),Ur={state:fo,subscribeKey(r,e){return Ra(fo,r,e)},_getClient(){if(!fo._client)throw new Error("ConnectionController client not set");return fo._client},setClient(r){fo._client=Lp(r)},connectWalletConnect(){fo.wcPromise=this._getClient().connectWalletConnect(r=>{fo.wcUri=r,fo.wcPairingExpiry=tr.getPairingExpiry()}),xs.setConnectedConnector("WALLET_CONNECT")},async connectExternal(r){var e,t;await((t=(e=this._getClient()).connectExternal)==null?void 0:t.call(e,r)),xs.setConnectedConnector(r.type)},async signMessage(r){return this._getClient().signMessage(r)},parseUnits(r,e){return this._getClient().parseUnits(r,e)},formatUnits(r,e){return this._getClient().formatUnits(r,e)},async sendTransaction(r){return this._getClient().sendTransaction(r)},async estimateGas(r){return this._getClient().estimateGas(r)},checkInstalled(r){var e,t;return(t=(e=this._getClient()).checkInstalled)==null?void 0:t.call(e,r)},resetWcConnection(){fo.wcUri=void 0,fo.wcPairingExpiry=void 0,fo.wcPromise=void 0,fo.wcLinking=void 0,fo.recentWallet=void 0,la.resetTransactions(),xs.deleteWalletConnectDeepLink()},setWcLinking(r){fo.wcLinking=r},setWcError(r){fo.wcError=r,fo.buffering=!1},setRecentWallet(r){fo.recentWallet=r},setBuffering(r){fo.buffering=r},async disconnect(){await this._getClient().disconnect(),this.resetWcConnection()}},$4=vi({loading:!1,open:!1,selectedNetworkId:void 0}),Ug={state:$4,subscribe(r){return hs($4,()=>r($4))},set(r){Object.assign($4,{...$4,...r})}};var cN={},Txe={get exports(){return cN},set exports(r){cN=r}};(function(r,e){(function(t,n){r.exports=n()})(ct,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",h="week",p="month",g="quarter",w="year",y="date",C="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|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,N={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(d){var m=["th","st","nd","rd"],x=d%100;return"["+d+(m[(x-20)%10]||m[x]||m[0])+"]"}},O=function(d,m,x){var A=String(d);return!A||A.length>=m?d:""+Array(m+1-A.length).join(x)+d},B={s:O,z:function(d){var m=-d.utcOffset(),x=Math.abs(m),A=Math.floor(x/60),I=x%60;return(m<=0?"+":"-")+O(A,2,"0")+":"+O(I,2,"0")},m:function d(m,x){if(m.date()1)return d(S[0])}else{var E=m.name;G[E]=m,I=E}return!A&&I&&(z=I),I||!A&&z},Q=function(d,m){if(D(d))return d.clone();var x=typeof m=="object"?m:{};return x.date=d,x.args=arguments,new M(x)},F=B;F.l=V,F.i=D,F.w=function(d,m){return Q(d,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var M=function(){function d(x){this.$L=V(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[$]=!0}var m=d.prototype;return m.parse=function(x){this.$d=function(A){var I=A.date,R=A.utc;if(I===null)return new Date(NaN);if(F.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var S=I.match(T);if(S){var E=S[2]-1||0,_=(S[7]||"0").substring(0,3);return R?new Date(Date.UTC(S[1],E,S[3]||1,S[4]||0,S[5]||0,S[6]||0,_)):new Date(S[1],E,S[3]||1,S[4]||0,S[5]||0,S[6]||0,_)}}return new Date(I)}(x),this.init()},m.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},m.$utils=function(){return F},m.isValid=function(){return this.$d.toString()!==C},m.isSame=function(x,A){var I=Q(x);return this.startOf(A)<=I&&I<=this.endOf(A)},m.isAfter=function(x,A){return Q(x)0,G<=z.r||!z.r){G<=1&&B>0&&(z=N[B-1]);var $=k[z.l];w&&(G=w(""+G)),C=typeof $=="string"?$.replace("%d",G):$(G,h,z.l,T);break}}if(h)return C;var D=T?k.future:k.past;return typeof D=="function"?D(C):D.replace("%s",C)},s.to=function(u,h){return a(u,h,this,!0)},s.from=function(u,h){return a(u,h,this)};var l=function(u){return u.$u?i.utc():i()};s.toNow=function(u){return this.to(l(this),u)},s.fromNow=function(u){return this.from(l(this),u)}}})})(Mxe);const Nxe=uN;wv.extend(Nxe),wv.extend(kxe),wv.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%s sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}});const hN={getYear(r=new Date().toISOString()){return wv(r).year()},getRelativeDateFromNow(r){return wv(r).fromNow(!0)},formatDate(r,e="DD MMM"){return wv(r).format(e)}},vv={caipNetworkIdToNumber(r){return r?Number(r.split(":")[1]):void 0}},Lo={bigNumber(r){return new es(r)},multiply(r,e){if(r===void 0||e===void 0)return es(0);const t=new es(r),n=new es(e);return t.multipliedBy(n)}},fi=vi({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),lr={state:fi,subscribe(r){return hs(fi,()=>r(fi))},subscribeKey(r,e){return Ra(fi,r,e)},_getClient(){if(!fi._client)throw new Error("NetworkController client not set");return fi._client},setClient(r){fi._client=Lp(r)},setCaipNetwork(r){fi.caipNetwork=r,Ug.set({selectedNetworkId:r==null?void 0:r.id}),this.state.allowUnsupportedChain||this.checkIfSupportedNetwork()},setDefaultCaipNetwork(r){fi.caipNetwork=r,Ug.set({selectedNetworkId:r==null?void 0:r.id}),fi.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(r){fi.requestedCaipNetworks=r},setAllowUnsupportedChain(r){fi.allowUnsupportedChain=r},setSmartAccountEnabledNetworks(r){fi.smartAccountEnabledNetworks=r},getRequestedCaipNetworks(){const{approvedCaipNetworkIds:r,requestedCaipNetworks:e}=fi,t=r,n=e;return tr.sortRequestedNetworks(t,n)},async getApprovedCaipNetworksData(){const r=await this._getClient().getApprovedCaipNetworksData();fi.supportsAllNetworks=r.supportsAllNetworks,fi.approvedCaipNetworkIds=r.approvedCaipNetworkIds},async switchActiveNetwork(r){await this._getClient().switchCaipNetwork(r),fi.caipNetwork=r,r&&yr.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:r.id}})},checkIfSupportedNetwork(){var r;fi.isUnsupportedChain=!((r=fi.requestedCaipNetworks)!=null&&r.some(e=>{var t;return e.id===((t=fi.caipNetwork)==null?void 0:t.id)})),fi.isUnsupportedChain&&this.showUnsupportedChainUI()},checkIfSmartAccountEnabled(){var e,t;const r=vv.caipNetworkIdToNumber((e=fi.caipNetwork)==null?void 0:e.id);return r?Boolean((t=fi.smartAccountEnabledNetworks)==null?void 0:t.includes(r)):!1},resetNetwork(){fi.isDefaultCaipNetwork||(fi.caipNetwork=void 0),fi.approvedCaipNetworkIds=void 0,fi.supportsAllNetworks=!0,fi.smartAccountEnabledNetworks=[]},showUnsupportedChainUI(){setTimeout(()=>{Zr.open({view:"UnsupportedChain"})},300)}},B4={async getTokenList(){var t;return(await ka.fetchConvertTokens({chainId:(t=lr.state.caipNetwork)==null?void 0:t.id,projectId:hr.state.projectId})).tokens.map(n=>({...n,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0}))},async fetchGasPrice(){const r=hr.state.projectId,e=lr.state.caipNetwork;return e?await ka.fetchGasPrice({projectId:r,chainId:e.id}):null},async fetchConvertAllowance({tokenAddress:r,userAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n}){const i=hr.state.projectId,s=await ka.fetchConvertAllowance({projectId:i,tokenAddress:r,userAddress:e});if(s!=null&&s.allowance&&t&&n){const o=Ur.parseUnits(t,n);return BigInt(s.allowance)>=o}return!1},async getMyTokensWithBalance(){const r=zt.state.address,e=lr.state.caipNetwork;if(!r||!e)return[];const n=(await ka.getBalance(r,e.id)).balances;return this.mapBalancesToConvertTokens(n)},mapBalancesToConvertTokens(r){return r.map(e=>{var t;return{symbol:e.symbol,name:e.name,address:e!=null&&e.address?e.address:`${(t=lr.state.caipNetwork)==null?void 0:t.id}:${Ls.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1,quantity:e.quantity,price:e.price,value:e.value}})}},Ni=vi({view:"Connect",history:["Connect"],transactionStack:[]}),et={state:Ni,subscribeKey(r,e){return Ra(Ni,r,e)},pushTransactionStack(r){Ni.transactionStack.push(r)},popTransactionStack(r){var t,n;const e=Ni.transactionStack.pop();e&&(r?(this.goBack(),(t=e==null?void 0:e.onCancel)==null||t.call(e)):(e.goBack?this.goBack():e.view&&this.reset(e.view),(n=e==null?void 0:e.onSuccess)==null||n.call(e)))},push(r,e){r!==Ni.view&&(Ni.view=r,Ni.history.push(r),Ni.data=e)},reset(r){Ni.view=r,Ni.history=[r]},replace(r,e){Ni.history.length>1&&Ni.history.at(-1)!==r&&(Ni.view=r,Ni.history[Ni.history.length-1]=r,Ni.data=e)},goBack(){if(Ni.history.length>1){Ni.history.pop();const[r]=Ni.history.slice(-1);r&&(Ni.view=r)}},goBackToIndex(r){if(Ni.history.length>1){Ni.history=Ni.history.slice(0,r+1);const[e]=Ni.history.slice(-1);e&&(Ni.view=e)}}},Pxe=15e4,Ct=vi({initialized:!1,loading:!1,loadingPrices:!1,approvalTransaction:void 0,convertTransaction:void 0,transactionError:void 0,transactionLoading:!1,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",inputError:void 0,slippage:Ls.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:BigInt(0),gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0}),pr={state:Ct,subscribe(r){return hs(Ct,()=>r(Ct))},subscribeKey(r,e){return Ra(Ct,r,e)},getParams(){var t,n,i,s,o;const{address:r}=zt.state,e=`${(t=lr.state.caipNetwork)==null?void 0:t.id}:${Ls.NATIVE_TOKEN_ADDRESS}`;if(!r)throw new Error("No address found to swap the tokens from.");return{networkAddress:e,fromAddress:r,fromCaipAddress:zt.state.caipAddress,sourceTokenAddress:(n=Ct.sourceToken)==null?void 0:n.address,toTokenAddress:(i=Ct.toToken)==null?void 0:i.address,toTokenAmount:Ct.toTokenAmount,toTokenDecimals:(s=Ct.toToken)==null?void 0:s.decimals,sourceTokenAmount:Ct.sourceTokenAmount,sourceTokenDecimals:(o=Ct.sourceToken)==null?void 0:o.decimals}},setLoading(r){Ct.loading=r},setSourceToken(r){r&&(Ct.sourceToken=r,this.setTokenValues(r.address,"sourceToken"))},setSourceTokenAmount(r){const{sourceTokenAddress:e}=this.getParams();Ct.sourceTokenAmount=r,e&&this.setTokenValues(e,"sourceToken")},setToToken(r){const{sourceTokenAddress:e,sourceTokenAmount:t}=this.getParams();if(!r){Ct.toTokenAmount="0",Ct.toTokenPriceInUSD=0;return}Ct.toToken=r,this.setTokenValues(r.address,"toToken"),e&&t&&this.makeChecks()},setToTokenAmount(r){const{toTokenAddress:e}=this.getParams();Ct.toTokenAmount=r,e&&this.setTokenValues(e,"toToken")},async setTokenValues(r,e){let t=Ct.tokensPriceMap[r]||0;t||(t=await this.getAddressPrice(r)),e==="sourceToken"?Ct.sourceTokenPriceInUSD=t:e==="toToken"&&(Ct.toTokenPriceInUSD=t)},switchTokens(){const r=Ct.toToken?{...Ct.toToken}:void 0,e=Ct.sourceToken?{...Ct.sourceToken}:void 0;this.setSourceToken(r),this.setToToken(e),this.setSourceTokenAmount(Ct.toTokenAmount||"0"),pr.convertTokens()},resetTokens(){Ct.tokens=void 0,Ct.popularTokens=void 0,Ct.myTokensWithBalance=void 0,Ct.initialized=!1},resetValues(){var t;const{networkAddress:r}=this.getParams(),e=(t=Ct.tokens)==null?void 0:t.find(n=>n.address===r);this.setSourceToken(e),Ct.sourceTokenPriceInUSD=Ct.tokensPriceMap[r]||0,Ct.sourceTokenAmount="0",this.setToToken(void 0),Ct.gasPriceInUSD=0},clearError(){Ct.transactionError=void 0},async initializeState(){Ct.initialized||(await this.fetchTokens(),Ct.initialized=!0)},async fetchTokens(){var t;const{networkAddress:r}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();const e=(t=Ct.tokens)==null?void 0:t.find(n=>n.address===r);e&&this.setSourceToken(e)},async getTokenList(){const r=await B4.getTokenList();Ct.tokens=r,Ct.popularTokens=r.sort((e,t)=>e.symbolt.symbol?1:0).filter(e=>!!Ls.POPULAR_TOKENS.includes(e.symbol),{}),Ct.suggestedTokens=r.filter(e=>!!Ls.SUGGESTED_TOKENS.includes(e.symbol),{})},async getAddressPrice(r){var l,u;const e=Ct.tokensPriceMap[r];if(e)return e;const n=(await ka.fetchTokenPrice({projectId:hr.state.projectId,addresses:[r]})).fungibles||[],i=[...Ct.tokens||[],...Ct.myTokensWithBalance||[]],s=(l=i==null?void 0:i.find(h=>h.address===r))==null?void 0:l.symbol,o=((u=n.find(h=>h.symbol===s))==null?void 0:u.price)||"0",a=parseFloat(o);return Ct.tokensPriceMap[r]=a,a},async getNetworkTokenPrice(){var i;const{networkAddress:r}=this.getParams(),t=(i=(await ka.fetchTokenPrice({projectId:hr.state.projectId,addresses:[r]})).fungibles)==null?void 0:i[0],n=(t==null?void 0:t.price)||"0";Ct.tokensPriceMap[r]=parseFloat(n),Ct.networkPrice=n},async getMyTokensWithBalance(){const r=await B4.getMyTokensWithBalance();r&&(await this.getInitialGasPrice(),this.setBalances(r))},setBalances(r){const{networkAddress:e}=this.getParams(),t=r.find(n=>n.address===e);r.forEach(n=>{Ct.tokensPriceMap[n.address]=n.price||0}),Ct.myTokensWithBalance=r,Ct.networkBalanceInUSD=t?Lo.multiply(t.quantity.numeric,t.price).toString():"0"},async getInitialGasPrice(){const r=await B4.fetchGasPrice();if(!r)return;const e=r.instant,t=BigInt(e),n=BigInt(Pxe),i=this.calculateGasPriceInUSD(n,t);Ct.gasPriceInUSD=i},async refreshConvertValues(){const{fromAddress:r,toTokenDecimals:e,toTokenAddress:t}=this.getParams();if(r&&t&&e&&!Ct.loading){const n=await this.getTransaction();this.setTransactionDetails(n)}},calculateGasPriceInEther(r,e){const t=e*r;return Number(t)/1e18},calculateGasPriceInUSD(r,e){const t=this.calculateGasPriceInEther(r,e);return Lo.bigNumber(Ct.networkPrice).multipliedBy(t).toNumber()},calculatePriceImpact(r,e){const t=Ct.sourceTokenAmount,n=Ct.sourceTokenPriceInUSD,i=Ct.toTokenPriceInUSD;return Lo.bigNumber(t).multipliedBy(n).plus(e).dividedBy(r).minus(i).dividedBy(i).multipliedBy(100).toNumber()},calculateMaxSlippage(){const r=Lo.bigNumber(Ct.slippage).dividedBy(100);return Lo.multiply(Ct.sourceTokenAmount,r).toNumber()},async convertTokens(){const{sourceTokenAddress:r,toTokenAddress:e}=this.getParams();!r||!e||await this.makeChecks()},async makeChecks(){const{toTokenDecimals:r,toTokenAddress:e}=this.getParams();if(!r||!e)return;Ct.loading=!0;const t=await this.getTransaction();this.setTransactionDetails(t),Ct.loading=!1},async getTransaction(){const{fromCaipAddress:r,sourceTokenAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n}=this.getParams();if(!r||!e||!t||parseFloat(t)===0||!n)return;const i=await B4.fetchConvertAllowance({userAddress:r,tokenAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n});let s;return i?(Ct.approvalTransaction=void 0,s=await this.createConvert(),Ct.convertTransaction=s):(Ct.convertTransaction=void 0,s=await this.createTokenAllowance(),Ct.approvalTransaction=s),s},getToAmount(){const{sourceTokenDecimals:r}=this.getParams(),t=10**(r||18);return(Ct.sourceTokenPriceInUSD&&Ct.toTokenPriceInUSD&&Ct.sourceTokenAmount?Lo.bigNumber(Ct.sourceTokenAmount).multipliedBy(Ct.sourceTokenPriceInUSD).dividedBy(Ct.toTokenPriceInUSD):Lo.bigNumber(0)).multipliedBy(t).toString()},async createTokenAllowance(){const{fromCaipAddress:r,fromAddress:e,sourceTokenAddress:t,toTokenAddress:n}=this.getParams();if(!r||!n)return;if(!t)throw new Error(">>> createTokenAllowance - No source token address found.");const i=await ka.generateApproveCalldata({projectId:hr.state.projectId,from:t,to:n,userAddress:r}),s=await Ur.estimateGas({address:e,to:tr.getPlainAddress(i.tx.to),data:i.tx.data}),o=this.getToAmount();return{data:i.tx.data,to:tr.getPlainAddress(i.tx.from),gas:s,gasPrice:BigInt(i.tx.eip155.gasPrice),value:BigInt(i.tx.value),toAmount:o}},async sendTransactionForApproval(r){const{fromAddress:e}=this.getParams();Ct.transactionLoading=!0,et.pushTransactionStack({view:null,goBack:!0});try{await Ur.sendTransaction({address:e,to:r.to,data:r.data,value:BigInt(r.value),gasPrice:BigInt(r.gasPrice)}),Ct.approvalTransaction=void 0,Ct.transactionLoading=!1,this.makeChecks()}catch(t){const n=t;Ct.transactionError=n==null?void 0:n.shortMessage,Ct.transactionLoading=!1}},async createConvert(){const{networkAddress:r,fromCaipAddress:e,sourceTokenAddress:t,sourceTokenDecimals:n,sourceTokenAmount:i,toTokenAddress:s}=this.getParams();if(!(!e||!i||!t||!s||!n))try{const o=Ur.parseUnits(i,n).toString(),a=await ka.generateConvertCalldata({projectId:hr.state.projectId,userAddress:e,from:t,to:s,amount:o}),l=t===r,u=this.getToAmount(),h=BigInt(a.tx.eip155.gas),p=BigInt(a.tx.eip155.gasPrice),g={data:a.tx.data,to:tr.getPlainAddress(a.tx.to),gas:h,gasPrice:p,value:BigInt(l?o:"0"),toAmount:u};return Ct.gasPriceInUSD=this.calculateGasPriceInUSD(h,p),g}catch{return}},async sendTransactionForConvert(r){if(!r)return;const{fromAddress:e}=this.getParams();Ct.transactionLoading=!0,et.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){pr.resetValues()}});try{const t=await Ur.sendTransaction({address:e,to:r.to,data:r.data,gas:r.gas,gasPrice:BigInt(r.gasPrice),value:r.value});return Ct.transactionLoading=!1,setTimeout(()=>{this.resetValues(),this.getMyTokensWithBalance()},1e3),t}catch(t){const n=t;Ct.transactionError=n==null?void 0:n.shortMessage,Ct.transactionLoading=!1,dn.showError((n==null?void 0:n.shortMessage)||"Transaction error");return}},getToTokenValues(r,e){const{toTokenAddress:t}=this.getParams();if(!t)return{toTokenAmount:"0",toTokenPriceInUSD:0};const n=Lo.bigNumber(r).dividedBy(10**e).toFixed(20),i=Ct.tokensPriceMap[t]||"0",s=Lo.bigNumber(i).toNumber();return{toTokenAmount:n,toTokenPriceInUSD:s}},isInsufficientNetworkTokenForGas(){return Lo.bigNumber(Lo.bigNumber(Ct.gasPriceInUSD||"0")).isGreaterThan(Ct.networkBalanceInUSD)},setTransactionDetails(r){const{toTokenAddress:e,toTokenDecimals:t}=this.getParams();if(!r||!e||!t)return;this.isInsufficientNetworkTokenForGas()?Ct.inputError="Insufficient balance":Ct.inputError=void 0;const{toTokenAmount:i,toTokenPriceInUSD:s}=this.getToTokenValues(r.toAmount,t);Ct.toTokenAmount=i,Ct.toTokenPriceInUSD=s,Ct.gasPriceInUSD=this.calculateGasPriceInUSD(r.gas,r.gasPrice),Ct.priceImpact=this.calculatePriceImpact(Ct.toTokenAmount,Ct.gasPriceInUSD),Ct.maxSlippage=this.calculateMaxSlippage()}},Bn=vi({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1}),zt={state:Bn,subscribe(r){return hs(Bn,()=>r(Bn))},subscribeKey(r,e){return Ra(Bn,r,e)},setIsConnected(r){Bn.isConnected=r},setCaipAddress(r){Bn.caipAddress=r,Bn.address=r?tr.getPlainAddress(r):void 0},setBalance(r,e){Bn.balance=r,Bn.balanceSymbol=e},setProfileName(r){Bn.profileName=r},setProfileImage(r){Bn.profileImage=r},setAddressExplorerUrl(r){Bn.addressExplorerUrl=r},setSmartAccountDeployed(r){Bn.smartAccountDeployed=r},setCurrentTab(r){Bn.currentTab=r},setTokenBalance(r){r&&(Bn.tokenBalance=Lp(r))},setConnectedWalletInfo(r){Bn.connectedWalletInfo=r},setPreferredAccountType(r){Bn.preferredAccountType=r},async fetchTokenBalance(){try{if(Bn.address){const r=await ka.getBalance(Bn.address);this.setTokenBalance(r.balances),pr.setBalances(B4.mapBalancesToConvertTokens(r.balances))}}catch{dn.showError("Failed to fetch token balance")}},resetAccount(){Bn.isConnected=!1,Bn.smartAccountDeployed=!1,Bn.currentTab=0,Bn.caipAddress=void 0,Bn.address=void 0,Bn.balance=void 0,Bn.balanceSymbol=void 0,Bn.profileName=void 0,Bn.profileImage=void 0,Bn.addressExplorerUrl=void 0,Bn.tokenBalance=[],Bn.connectedWalletInfo=void 0,Bn.preferredAccountType=void 0}},Uu=vi({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),po={state:Uu,subscribeNetworkImages(r){return hs(Uu.networkImages,()=>r(Uu.networkImages))},subscribeKey(r,e){return Ra(Uu,r,e)},subscribe(r){return hs(Uu,()=>r(Uu))},setWalletImage(r,e){Uu.walletImages[r]=e},setNetworkImage(r,e){Uu.networkImages[r]=e},setConnectorImage(r,e){Uu.connectorImages[r]=e},setTokenImage(r,e){Uu.tokenImages[r]=e},setCurrencyImage(r,e){Uu.currencyImages[r]=e}},Fg=vi({themeMode:"dark",themeVariables:{}}),Zs={state:Fg,subscribe(r){return hs(Fg,()=>r(Fg))},setThemeMode(r){Fg.themeMode=r;try{const e=Ln.getEmailConnector();e&&e.provider.syncTheme({themeMode:Zs.getSnapshot().themeMode})}catch{console.info("Unable to sync theme to email connector")}},setThemeVariables(r){Fg.themeVariables={...Fg.themeVariables,...r};try{const e=Ln.getEmailConnector();e&&e.provider.syncTheme({themeVariables:Zs.getSnapshot().themeVariables})}catch{console.info("Unable to sync theme to email connector")}},getSnapshot(){return rN(Fg)}},Up=vi({connectors:[]}),Ln={state:Up,subscribeKey(r,e){return Ra(Up,r,e)},setConnectors(r){Up.connectors=r.map(e=>Lp(e))},addConnector(r){var e,t;if(Up.connectors.push(Lp(r)),r.id==="w3mEmail"){const n=r,i=rN(hr.state);(t=(e=n==null?void 0:n.provider)==null?void 0:e.syncDappData)==null||t.call(e,{metadata:i.metadata,sdkVersion:i.sdkVersion,projectId:i.projectId}),n.provider.syncTheme({themeMode:Zs.getSnapshot().themeMode,themeVariables:Zs.getSnapshot().themeVariables})}},getEmailConnector(){return Up.connectors.find(r=>r.type==="EMAIL")},getAnnouncedConnectorRdns(){return Up.connectors.filter(r=>r.type==="ANNOUNCED").map(r=>{var e;return(e=r.info)==null?void 0:e.rdns})},getConnectors(){return Up.connectors},getConnector(r,e){return Up.connectors.find(t=>{var n;return t.explorerId===r||((n=t.info)==null?void 0:n.rdns)===e})}},Oxe=tr.getApiUrl(),Ma=new iN({baseUrl:Oxe}),Dxe="40",tee="4",Uo=vi({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1}),Nr={state:Uo,subscribeKey(r,e){return Ra(Uo,r,e)},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=hr.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},async _fetchWalletImage(r){const e=`${Ma.baseUrl}/getWalletImage/${r}`,t=await Ma.getBlob({path:e,headers:Nr._getApiHeaders()});po.setWalletImage(r,URL.createObjectURL(t))},async _fetchNetworkImage(r){const e=`${Ma.baseUrl}/public/getAssetImage/${r}`,t=await Ma.getBlob({path:e,headers:Nr._getApiHeaders()});po.setNetworkImage(r,URL.createObjectURL(t))},async _fetchConnectorImage(r){const e=`${Ma.baseUrl}/public/getAssetImage/${r}`,t=await Ma.getBlob({path:e,headers:Nr._getApiHeaders()});po.setConnectorImage(r,URL.createObjectURL(t))},async _fetchCurrencyImage(r){const e=`${Ma.baseUrl}/public/getCurrencyImage/${r}`,t=await Ma.getBlob({path:e,headers:Nr._getApiHeaders()});po.setCurrencyImage(r,URL.createObjectURL(t))},async _fetchTokenImage(r){const e=`${Ma.baseUrl}/public/getTokenImage/${r}`,t=await Ma.getBlob({path:e,headers:Nr._getApiHeaders()});po.setTokenImage(r,URL.createObjectURL(t))},async fetchNetworkImages(){const{requestedCaipNetworks:r}=lr.state,e=r==null?void 0:r.map(({imageId:t})=>t).filter(Boolean);e&&await Promise.allSettled(e.map(t=>Nr._fetchNetworkImage(t)))},async fetchConnectorImages(){const{connectors:r}=Ln.state,e=r.map(({imageId:t})=>t).filter(Boolean);await Promise.allSettled(e.map(t=>Nr._fetchConnectorImage(t)))},async fetchCurrencyImages(r=[]){await Promise.allSettled(r.map(e=>Nr._fetchCurrencyImage(e)))},async fetchTokenImages(r=[]){await Promise.allSettled(r.map(e=>Nr._fetchTokenImage(e)))},async fetchFeaturedWallets(){const{featuredWalletIds:r}=hr.state;if(r!=null&&r.length){const{data:e}=await Ma.get({path:"/getWallets",headers:Nr._getApiHeaders(),params:{page:"1",entries:r!=null&&r.length?String(r.length):tee,include:r==null?void 0:r.join(",")}});e.sort((n,i)=>r.indexOf(n.id)-r.indexOf(i.id));const t=e.map(n=>n.image_id).filter(Boolean);await Promise.allSettled(t.map(n=>Nr._fetchWalletImage(n))),Uo.featured=e}},async fetchRecommendedWallets(){var u;const{includeWalletIds:r,excludeWalletIds:e,featuredWalletIds:t}=hr.state,n=[...e??[],...t??[]].filter(Boolean),{data:i,count:s}=await Ma.get({path:"/getWallets",headers:Nr._getApiHeaders(),params:{page:"1",chains:(u=lr.state.caipNetwork)==null?void 0:u.id,entries:tee,include:r==null?void 0:r.join(","),exclude:n==null?void 0:n.join(",")}}),o=xs.getRecentWallets(),a=i.map(h=>h.image_id).filter(Boolean),l=o.map(h=>h.image_id).filter(Boolean);await Promise.allSettled([...a,...l].map(h=>Nr._fetchWalletImage(h))),Uo.recommended=i,Uo.count=s??0},async fetchWallets({page:r}){var l;const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:n}=hr.state,i=[...Uo.recommended.map(({id:u})=>u),...t??[],...n??[]].filter(Boolean),{data:s,count:o}=await Ma.get({path:"/getWallets",headers:Nr._getApiHeaders(),params:{page:String(r),entries:Dxe,chains:(l=lr.state.caipNetwork)==null?void 0:l.id,include:e==null?void 0:e.join(","),exclude:i.join(",")}}),a=s.map(u=>u.image_id).filter(Boolean);await Promise.allSettled([...a.map(u=>Nr._fetchWalletImage(u)),tr.wait(300)]),Uo.wallets=[...Uo.wallets,...s],Uo.count=o>Uo.count?o:Uo.count,Uo.page=r},async searchWallet({search:r}){var s;const{includeWalletIds:e,excludeWalletIds:t}=hr.state;Uo.search=[];const{data:n}=await Ma.get({path:"/getWallets",headers:Nr._getApiHeaders(),params:{page:"1",entries:"100",search:r,chains:(s=lr.state.caipNetwork)==null?void 0:s.id,include:e==null?void 0:e.join(","),exclude:t==null?void 0:t.join(",")}}),i=n.map(o=>o.image_id).filter(Boolean);await Promise.allSettled([...i.map(o=>Nr._fetchWalletImage(o)),tr.wait(300)]),Uo.search=n},async reFetchWallets(){Uo.page=1,Uo.wallets=[],await Nr.fetchFeaturedWallets(),await Nr.fetchRecommendedWallets()},prefetch(){const r=[Nr.fetchFeaturedWallets(),Nr.fetchRecommendedWallets(),Nr.fetchNetworkImages(),Nr.fetchConnectorImages()];hr.state.enableAnalytics===void 0&&r.push(Nr.fetchAnalyticsConfig()),Uo.prefetchPromise=Promise.race([Promise.allSettled(r),tr.wait(3e3)])},async fetchAnalyticsConfig(){const{isAnalyticsEnabled:r}=await Ma.get({path:"/getAnalyticsConfig",headers:Nr._getApiHeaders()});hr.setEnableAnalytics(r)}},jg=vi({loading:!1,open:!1}),Zr={state:jg,subscribe(r){return hs(jg,()=>r(jg))},subscribeKey(r,e){return Ra(jg,r,e)},async open(r){await Nr.state.prefetchPromise;const e=zt.state.isConnected;r!=null&&r.view?et.reset(r.view):e?et.reset("Account"):et.reset("Connect"),jg.open=!0,Ug.set({open:!0}),yr.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:e}})},close(){const r=zt.state.isConnected;jg.open=!1,Ug.set({open:!1}),yr.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:r}})},setLoading(r){jg.loading=r,Ug.set({loading:r})}},L4={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},fN={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},jn=vi({providers:GX,selectedProvider:null,error:null,purchaseCurrency:L4,paymentCurrency:fN,purchaseCurrencies:[L4],paymentCurrencies:[],quotesLoading:!1}),zn={state:jn,subscribe(r){return hs(jn,()=>r(jn))},subscribeKey(r,e){return Ra(jn,r,e)},setSelectedProvider(r){jn.selectedProvider=r},setPurchaseCurrency(r){jn.purchaseCurrency=r},setPaymentCurrency(r){jn.paymentCurrency=r},setPurchaseAmount(r){this.state.purchaseAmount=r},setPaymentAmount(r){this.state.paymentAmount=r},async getAvailableCurrencies(){const r=await ka.getOnrampOptions();jn.purchaseCurrencies=r.purchaseCurrencies,jn.paymentCurrencies=r.paymentCurrencies,jn.paymentCurrency=r.paymentCurrencies[0]||fN,jn.purchaseCurrency=r.purchaseCurrencies[0]||L4,await Nr.fetchCurrencyImages(r.paymentCurrencies.map(e=>e.id)),await Nr.fetchTokenImages(r.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var r,e;jn.quotesLoading=!0;try{const t=await ka.getOnrampQuote({purchaseCurrency:jn.purchaseCurrency,paymentCurrency:jn.paymentCurrency,amount:((r=jn.paymentAmount)==null?void 0:r.toString())||"0",network:(e=jn.purchaseCurrency)==null?void 0:e.symbol});return jn.quotesLoading=!1,jn.purchaseAmount=Number(t.purchaseAmount.amount),t}catch(t){return jn.error=t.message,jn.quotesLoading=!1,null}finally{jn.quotesLoading=!1}},resetState(){jn.providers=GX,jn.selectedProvider=null,jn.error=null,jn.purchaseCurrency=L4,jn.paymentCurrency=fN,jn.purchaseCurrencies=[L4],jn.paymentCurrencies=[],jn.paymentAmount=void 0,jn.purchaseAmount=void 0,jn.quotesLoading=!1}},cc=vi({}),Na={state:cc,subscribe(r){return hs(cc,()=>r(cc))},subscribeKey(r,e){return Ra(cc,r,e)},setToken(r){r&&(cc.token=Lp(r))},setTokenAmount(r){cc.sendTokenAmount=r},setReceiverAddress(r){cc.receiverAddress=r},setReceiverProfileImageUrl(r){cc.receiverProfileImageUrl=r},setReceiverProfileName(r){cc.receiverProfileName=r},resetSend(){cc.token=void 0,cc.sendTokenAmount=void 0,cc.receiverAddress=void 0,cc.receiverProfileImageUrl=void 0,cc.receiverProfileName=void 0}},Yn={getWalletImage(r){if(r!=null&&r.image_url)return r==null?void 0:r.image_url;if(r!=null&&r.image_id)return po.state.walletImages[r.image_id]},getNetworkImage(r){if(r!=null&&r.imageUrl)return r==null?void 0:r.imageUrl;if(r!=null&&r.imageId)return po.state.networkImages[r.imageId]},getConnectorImage(r){if(r!=null&&r.imageUrl)return r.imageUrl;if(r!=null&&r.imageId)return po.state.connectorImages[r.imageId]}},$A={goBackOrCloseModal(){et.state.history.length>1?et.goBack():Zr.close()},navigateAfterNetworkSwitch(){const{history:r}=et.state,e=r.findIndex(t=>t==="Networks");e>=1?et.goBackToIndex(e-1):Zr.close()}};/** +`)!==se(this,h9))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);ge(this,V2,t)}return se(this,V2)};const w7e="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:C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*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO",y7e="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let _O=null;class cd extends EA{constructor(){super("en",w7e,y7e)}static wordlist(){return _O==null&&(_O=new cd),_O}}function Hte(r){return(1<=12&&t.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*t.length/8));let i=0;for(let u=0;u=0,`invalid mnemonic word at index ${u}`,"mnemonic","[ REDACTED ]");for(let h=0;h<11;h++)f&1<<10-h&&(n[i>>3]|=1<<7-i%8),i++}const s=32*t.length/3,a=t.length/3,o=Hte(a),l=Pt(vo(n.slice(0,s/8)))[0]&o;return xe(l===(n[n.length-1]&o),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),bt(n.slice(0,s/8))}function CO(r,e){xe(r.length%4===0&&r.length>=16&&r.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=cd.wordlist());const t=[0];let n=11;for(let a=0;a8?(t[t.length-1]<<=8,t[t.length-1]|=r[a],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=r[a]>>8-n,t.push(r[a]&x7e(8-n)),n+=3);const i=r.length/4,s=parseInt(vo(r).substring(2,4),16)&Hte(i);return t[t.length-1]<<=i,t[t.length-1]|=s>>8-i,e.join(t.map(a=>e.getWord(a)))}const AO={};class h1{constructor(e,t,n,i,s){Ae(this,"phrase");Ae(this,"password");Ae(this,"wordlist");Ae(this,"entropy");i==null&&(i=""),s==null&&(s=cd.wordlist()),nd(e,AO,"Mnemonic"),er(this,{phrase:n,password:i,wordlist:s,entropy:t})}computeSeed(){const e=zs("mnemonic"+this.password,"NFKD");return Yu(zs(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,n){const i=EO(e,n);return e=CO(Pt(i),n),new h1(AO,i,e,t,n)}static fromEntropy(e,t,n){const i=Pt(e,"entropy"),s=CO(i,n);return new h1(AO,bt(i),s,t,n)}static entropyToPhrase(e,t){const n=Pt(e,"entropy");return CO(n,t)}static phraseToEntropy(e,t){return EO(e,t)}static isValidMnemonic(e,t){try{return EO(e,t),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var Wa=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},SO=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},CA,Jl,ld;const _7e={16:10,24:12,32:14},E7e=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Yl=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],AA=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],C7e=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],A7e=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],S7e=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],I7e=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T7e=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],k7e=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],R7e=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],M7e=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],P7e=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],O7e=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],N7e=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],D7e=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function IO(r){const e=[];for(let t=0;t>2,Wa(this,ld,"f")[a][f%4]=s[f],Wa(this,Jl,"f")[t-a][f%4]=s[f];let o=0,l=i,u;for(;l>16&255]<<24^Yl[u>>8&255]<<16^Yl[u&255]<<8^Yl[u>>24&255]^E7e[o]<<24,o+=1,i!=8)for(let b=1;b>8&255]<<8^Yl[u>>16&255]<<16^Yl[u>>24&255]<<24;for(let b=i/2+1;b>2,m=l%4,Wa(this,ld,"f")[h][m]=s[f],Wa(this,Jl,"f")[t-h][m]=s[f++],l++}for(let f=1;f>24&255]^O7e[u>>16&255]^N7e[u>>8&255]^D7e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=Wa(this,ld,"f").length-1,n=[0,0,0,0];let i=IO(e);for(let o=0;o<4;o++)i[o]^=Wa(this,ld,"f")[0][o];for(let o=1;o>24&255]^A7e[i[(l+1)%4]>>16&255]^S7e[i[(l+2)%4]>>8&255]^I7e[i[(l+3)%4]&255]^Wa(this,ld,"f")[o][l];i=n.slice()}const s=new Uint8Array(16);let a=0;for(let o=0;o<4;o++)a=Wa(this,ld,"f")[t][o],s[4*o]=(Yl[i[o]>>24&255]^a>>24)&255,s[4*o+1]=(Yl[i[(o+1)%4]>>16&255]^a>>16)&255,s[4*o+2]=(Yl[i[(o+2)%4]>>8&255]^a>>8)&255,s[4*o+3]=(Yl[i[(o+3)%4]&255]^a)&255;return s}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=Wa(this,Jl,"f").length-1,n=[0,0,0,0];let i=IO(e);for(let o=0;o<4;o++)i[o]^=Wa(this,Jl,"f")[0][o];for(let o=1;o>24&255]^k7e[i[(l+3)%4]>>16&255]^R7e[i[(l+2)%4]>>8&255]^M7e[i[(l+1)%4]&255]^Wa(this,Jl,"f")[o][l];i=n.slice()}const s=new Uint8Array(16);let a=0;for(let o=0;o<4;o++)a=Wa(this,Jl,"f")[t][o],s[4*o]=(AA[i[o]>>24&255]^a>>24)&255,s[4*o+1]=(AA[i[(o+3)%4]>>16&255]^a>>16)&255,s[4*o+2]=(AA[i[(o+2)%4]>>8&255]^a>>8)&255,s[4*o+3]=(AA[i[(o+1)%4]&255]^a)&255;return s}}CA=new WeakMap,Jl=new WeakMap,ld=new WeakMap;class qte{constructor(e,t,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new TO(t)},name:{enumerable:!0,value:e}})}}var SA=function(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t},a3=function(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)},$6,e0;class kO extends qte{constructor(e,t){if(super("ECC",e,kO),$6.set(this,void 0),e0.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");SA(this,$6,new Uint8Array(t),"f")}else SA(this,$6,new Uint8Array(16),"f");SA(this,e0,this.iv,"f")}get iv(){return new Uint8Array(a3(this,$6,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)Ql(this,Xl,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");Ql(this,Xl,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(Ql(this,Xl,"f")[e]===255)Ql(this,Xl,"f")[e]=0;else{Ql(this,Xl,"f")[e]++;break}}encrypt(e){var t,n;const i=new Uint8Array(e);for(let s=0;s16)throw new TypeError("PKCS#7 padding byte out of range");const t=r.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),xe(i>0&&s>0,"invalid kdf","kdf",e);const a=As(r,"crypto.kdfparams.dklen:int!");return xe(a===32,"invalid kdf.dklen","kdf.dflen",a),{name:"scrypt",salt:t,N:n,r:i,p:s,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const t=As(r,"crypto.kdfparams.salt:data!"),n=As(r,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();xe(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const s=As(r,"crypto.kdfparams.c:int!"),a=As(r,"crypto.kdfparams.dklen:int!");return xe(a===32,"invalid kdf.dklen","kdf.dklen",a),{name:"pbkdf2",salt:t,count:s,dkLen:a,algorithm:i}}}xe(!1,"unsupported key-derivation function","kdf",e)}function RO(r,e){const t=JSON.parse(r),n=U6(e),i=Gte(t);if(i.name==="pbkdf2"){const{salt:h,count:m,dkLen:b,algorithm:v}=i,C=Yu(n,h,m,b,v);return TA(t,C)}ze(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:s,N:a,r:o,p:l,dkLen:u}=i,f=Hh(n,s,a,o,l,u);return TA(t,f)}function Kte(r){return new Promise(e=>{setTimeout(()=>{e()},r)})}async function MO(r,e,t){const n=JSON.parse(r),i=U6(e),s=Gte(n);if(s.name==="pbkdf2"){t&&(t(0),await Kte(0));const{salt:m,count:b,dkLen:v,algorithm:C}=s,R=Yu(i,m,b,v,C);return t&&(t(1),await Kte(0)),TA(n,R)}ze(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:a,N:o,r:l,p:u,dkLen:f}=s,h=await zh(i,a,o,l,u,f,t);return TA(n,h)}function Zte(r){const e=r.salt!=null?Pt(r.salt,"options.salt"):Vc(32);let t=1<<17,n=8,i=1;return r.scrypt&&(r.scrypt.N&&(t=r.scrypt.N),r.scrypt.r&&(n=r.scrypt.r),r.scrypt.p&&(i=r.scrypt.p)),xe(typeof t=="number"&&t>0&&Number.isSafeInteger(t)&&(BigInt(t)&BigInt(t-1))===BigInt(0),"invalid scrypt N parameter","options.N",t),xe(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),xe(typeof i=="number"&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:e,N:t,r:n,p:i}}function Jte(r,e,t,n){const i=Pt(t.privateKey,"privateKey"),s=n.iv!=null?Pt(n.iv,"options.iv"):Vc(16);xe(s.length===16,"invalid options.iv length","options.iv",n.iv);const a=n.uuid!=null?Pt(n.uuid,"options.uuid"):Vc(16);xe(a.length===16,"invalid options.uuid length","options.uuid",n.iv);const o=r.slice(0,16),l=r.slice(16,32),u=new c3(o,s),f=Pt(u.encrypt(i)),h=gi(An([l,f])),m={address:t.address.substring(2).toLowerCase(),id:VM(a),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:bt(s).substring(2)},ciphertext:bt(f).substring(2),kdf:"scrypt",kdfparams:{salt:bt(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:h.substring(2)}};if(t.mnemonic){const b=n.client!=null?n.client:`ethers/${pC}`,v=t.mnemonic.path||Vte,C=t.mnemonic.locale||"en",R=r.slice(32,64),k=Pt(t.mnemonic.entropy,"account.mnemonic.entropy"),P=Vc(16),N=new c3(R,P),$=Pt(N.encrypt(k)),j=new Date,U="UTC--"+(j.getUTCFullYear()+"-"+L6(j.getUTCMonth()+1,2)+"-"+L6(j.getUTCDate(),2)+"T"+L6(j.getUTCHours(),2)+"-"+L6(j.getUTCMinutes(),2)+"-"+L6(j.getUTCSeconds(),2)+".0Z")+"--"+m.address;m["x-ethers"]={client:b,gethFilename:U,path:v,locale:C,mnemonicCounter:bt(P).substring(2),mnemonicCiphertext:bt($).substring(2),version:"0.1"}}return JSON.stringify(m)}function kA(r,e,t){t==null&&(t={});const n=U6(e),i=Zte(t),s=Hh(n,i.salt,i.N,i.r,i.p,64);return Jte(Pt(s),i,r,t)}async function RA(r,e,t){t==null&&(t={});const n=U6(e),i=Zte(t),s=await zh(n,i.salt,i.N,i.r,i.p,64,t.progressCallback);return Jte(Pt(s),i,r,t)}const F6="m/44'/60'/0'/0/0",L7e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),ud=2147483648,U7e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),F7e="0123456789abcdef";function MA(r,e){let t="";for(;r;)t=F7e[r%16]+t,r=Math.trunc(r/16);for(;t.length=0;a-=8)i[33+(a>>3)]=r>>24-a&255;const s=Pt(Fh("sha512",e,i));return{IL:s.slice(0,32),IR:s.slice(32)}}function Qte(r,e){const t=e.split("/");xe(t.length>0,"invalid path","path",e),t[0]==="m"&&(xe(r.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${r.depth}`,"path",e),t.shift());let n=r;for(let i=0;i=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const s=Pt(Fh("sha512",L7e,i)),a=new ad(bt(s.slice(0,32)));return new Df(fd,a,"0x00000000",bt(s.slice(32)),"m",0,0,n,null)},$e(Df,G2);let _g=Df;class Eg extends R6{constructor(t,n,i,s,a,o,l,u,f){super(n,f);Ae(this,"publicKey");Ae(this,"fingerprint");Ae(this,"parentFingerprint");Ae(this,"chainCode");Ae(this,"path");Ae(this,"index");Ae(this,"depth");nd(t,fd,"HDNodeVoidWallet"),er(this,{publicKey:i});const h=mi(jh(vo(i)),0,4);er(this,{publicKey:i,fingerprint:h,parentFingerprint:s,chainCode:a,path:o,index:l,depth:u})}connect(t){return new Eg(fd,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,t)}get extendedKey(){return ze(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),PO(An(["0x0488B21E",MA(this.depth,1),this.parentFingerprint,MA(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(t){const n=Rr(t,"index");xe(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~ud),n&ud&&(i+="'"));const{IR:s,IL:a}=Yte(n,this.chainCode,this.publicKey,null),o=ad.addPoints(a,this.publicKey,!0),l=fg(o);return new Eg(fd,l,o,this.fingerprint,bt(s),i,n,this.depth+1,this.provider)}derivePath(t){return Qte(this,t)}}function Xte(r){const e=Rr(r,"index");return xe(e>=0&&e=0&&e{setTimeout(()=>{e()},r)})}let OO=(xh=class extends s3{constructor(e,t){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new ad(e):e;super(n,t)}connect(e){return new xh(this.signingKey,e)}async encrypt(e,t){const n={address:this.address,privateKey:this.privateKey};return await RA(n,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return kA(t,e)}static async fromEncryptedJson(e,t,n){var s;let i=null;return IA(e)?i=await MO(e,t,n):PA(e)&&(n&&(n(0),await tre(0)),i=OA(e,t),n&&(n(1),await tre(0))),nt(s=xh,g9,MJ).call(s,i)}static fromEncryptedJsonSync(e,t){var i;let n=null;return IA(e)?n=RO(e,t):PA(e)?n=OA(e,t):xe(!1,"invalid JSON wallet","json","[ REDACTED ]"),nt(i=xh,g9,MJ).call(i,n)}static createRandom(e){const t=_g.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const n=_g.fromPhrase(e);return t?n.connect(t):n}},g9=new WeakSet,MJ=function(e){if(xe(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=h1.fromEntropy(e.mnemonic.entropy),i=_g.fromMnemonic(n,e.mnemonic.path);if(i.address===e.address&&i.privateKey===e.privateKey)return i;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new xh(e.privateKey);return xe(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t},$e(xh,g9),xh);const j7e=")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";function z7e(r,e){const t=(1<=r;){const l=i>>s-r;i&=(1<{const i=n.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);xe(i!==null,"internal error parsing accents","accents",e);let s=0;const a=z7e(parseInt(i[3]),i[4]),o=parseInt(i[2]),l=new RegExp(`([${i[1]}])`,"g");t=t.replace(l,(u,f)=>(--a[s]===0&&(f=String.fromCharCode(f.charCodeAt(0),o),s++),f))}),t.split(",")}class rre extends EA{constructor(t,n,i,s){super(t,n,s);$e(this,b9);ge(this,b9,i)}get _accent(){return se(this,b9)}_decodeWords(){return H7e(this._data,this._accent)}}b9=new WeakMap;const nre={en:cd.wordlist()},q7e=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:f1,AbstractProvider:Yw,AbstractSigner:Xw,AlchemyProvider:r3,AnkrProvider:t3,BaseContract:wg,BaseWallet:s3,Block:zP,BrowserProvider:yA,ChainstackProvider:n3,CloudflareProvider:cO,ConstructorFragment:tf,Contract:Yh,ContractEventPayload:qP,ContractFactory:T6,ContractTransactionReceipt:HP,ContractTransactionResponse:S6,ContractUnknownEventPayload:nA,EnsPlugin:Zw,EnsResolver:Vw,ErrorDescription:jP,ErrorFragment:wo,EtherSymbol:LX,EtherscanPlugin:gA,EtherscanProvider:lO,EventFragment:Kl,EventLog:A6,EventPayload:xC,FallbackFragment:rf,FallbackProvider:yO,FeeData:eA,FeeDataNetworkPlugin:cA,FetchCancelSignal:HM,FetchRequest:ga,FetchResponse:id,FetchUrlFeeDataNetworkPlugin:YP,FixedNumber:Tw,Fragment:Zh,FunctionFragment:Zl,GasCostPlugin:Kw,HDNodeVoidWallet:Eg,HDNodeWallet:_g,Indexed:XC,InfuraProvider:d1,InfuraWebSocketProvider:pO,Interface:hg,IpcSocketProvider:Fte,JsonRpcApiProvider:dA,JsonRpcProvider:mc,JsonRpcSigner:yg,LangEn:cd,Log:mg,LogDescription:UP,MaxInt256:BX,MaxUint256:DX,MessagePrefix:gP,MinInt256:$X,Mnemonic:h1,MulticoinProviderPlugin:JP,N:OX,NamedFragment:qw,Network:ps,NetworkPlugin:Qh,NonceManager:wA,ParamType:Xs,PocketProvider:D6,QuickNodeProvider:i3,Result:i1,Signature:Xu,SigningKey:ad,SocketBlockSubscriber:uO,SocketEventSubscriber:dO,SocketPendingSubscriber:fO,SocketProvider:hO,SocketSubscriber:M6,StructFragment:Jh,Transaction:Hw,TransactionDescription:FP,TransactionReceipt:tA,TransactionResponse:gg,Typed:va,TypedDataEncoder:Vh,UndecodedEventLog:rA,UnmanagedSubscriber:Jw,Utf8ErrorFuncs:jM,VoidSigner:R6,Wallet:OO,WebSocketProvider:P6,WeiPerEther:NX,Wordlist:xO,WordlistOwl:EA,WordlistOwlA:rre,ZeroAddress:cg,ZeroHash:$C,accessListify:od,assert:ze,assertArgument:xe,assertArgumentCount:mC,assertNormalize:gC,assertPrivate:nd,checkResultErrors:vQ,computeAddress:fg,computeHmac:Fh,concat:An,copyRequest:pg,dataLength:Nh,dataSlice:mi,decodeBase58:LM,decodeBase64:UM,decodeBytes32String:ate,decodeRlp:kw,decryptCrowdsaleJson:OA,decryptKeystoreJson:MO,decryptKeystoreJsonSync:RO,defaultPath:F6,defineProperties:er,dnsEncode:RP,encodeBase58:yC,encodeBase64:FM,encodeBytes32String:ste,encodeRlp:Lh,encryptKeystoreJson:RA,encryptKeystoreJsonSync:kA,ensNormalize:kP,ethers:Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:f1,AbstractProvider:Yw,AbstractSigner:Xw,AlchemyProvider:r3,AnkrProvider:t3,BaseContract:wg,BaseWallet:s3,Block:zP,BrowserProvider:yA,ChainstackProvider:n3,CloudflareProvider:cO,ConstructorFragment:tf,Contract:Yh,ContractEventPayload:qP,ContractFactory:T6,ContractTransactionReceipt:HP,ContractTransactionResponse:S6,ContractUnknownEventPayload:nA,EnsPlugin:Zw,EnsResolver:Vw,ErrorDescription:jP,ErrorFragment:wo,EtherSymbol:LX,EtherscanPlugin:gA,EtherscanProvider:lO,EventFragment:Kl,EventLog:A6,EventPayload:xC,FallbackFragment:rf,FallbackProvider:yO,FeeData:eA,FeeDataNetworkPlugin:cA,FetchCancelSignal:HM,FetchRequest:ga,FetchResponse:id,FetchUrlFeeDataNetworkPlugin:YP,FixedNumber:Tw,Fragment:Zh,FunctionFragment:Zl,GasCostPlugin:Kw,HDNodeVoidWallet:Eg,HDNodeWallet:_g,Indexed:XC,InfuraProvider:d1,InfuraWebSocketProvider:pO,Interface:hg,IpcSocketProvider:Fte,JsonRpcApiProvider:dA,JsonRpcProvider:mc,JsonRpcSigner:yg,LangEn:cd,Log:mg,LogDescription:UP,MaxInt256:BX,MaxUint256:DX,MessagePrefix:gP,MinInt256:$X,Mnemonic:h1,MulticoinProviderPlugin:JP,N:OX,NamedFragment:qw,Network:ps,NetworkPlugin:Qh,NonceManager:wA,ParamType:Xs,PocketProvider:D6,QuickNodeProvider:i3,Result:i1,Signature:Xu,SigningKey:ad,SocketBlockSubscriber:uO,SocketEventSubscriber:dO,SocketPendingSubscriber:fO,SocketProvider:hO,SocketSubscriber:M6,StructFragment:Jh,Transaction:Hw,TransactionDescription:FP,TransactionReceipt:tA,TransactionResponse:gg,Typed:va,TypedDataEncoder:Vh,UndecodedEventLog:rA,UnmanagedSubscriber:Jw,Utf8ErrorFuncs:jM,VoidSigner:R6,Wallet:OO,WebSocketProvider:P6,WeiPerEther:NX,Wordlist:xO,WordlistOwl:EA,WordlistOwlA:rre,ZeroAddress:cg,ZeroHash:$C,accessListify:od,assert:ze,assertArgument:xe,assertArgumentCount:mC,assertNormalize:gC,assertPrivate:nd,checkResultErrors:vQ,computeAddress:fg,computeHmac:Fh,concat:An,copyRequest:pg,dataLength:Nh,dataSlice:mi,decodeBase58:LM,decodeBase64:UM,decodeBytes32String:ate,decodeRlp:kw,decryptCrowdsaleJson:OA,decryptKeystoreJson:MO,decryptKeystoreJsonSync:RO,defaultPath:F6,defineProperties:er,dnsEncode:RP,encodeBase58:yC,encodeBase64:FM,encodeBytes32String:ste,encodeRlp:Lh,encryptKeystoreJson:RA,encryptKeystoreJsonSync:kA,ensNormalize:kP,formatEther:WM,formatUnits:CC,fromTwos:Ew,getAccountPath:Xte,getAddress:Vr,getBigInt:ur,getBytes:Pt,getBytesCopy:Js,getCreate2Address:JX,getCreateAddress:LC,getDefaultProvider:Ute,getIcapAddress:ZX,getIndexedAccountPath:ere,getNumber:Rr,getUint:Cw,hashMessage:ZC,hexlify:bt,id:Gc,isAddress:YX,isAddressable:UC,isBytesLike:xw,isCallException:o6,isCrowdsaleJson:PA,isError:xs,isHexString:pi,isKeystoreJson:IA,isValidName:Tee,keccak256:gi,lock:WX,makeError:Oi,mask:Dh,namehash:x6,parseEther:mQ,parseUnits:AC,pbkdf2:Yu,randomBytes:Vc,recoverAddress:_6,resolveAddress:Qs,resolveProperties:Zs,ripemd160:jh,scrypt:zh,scryptSync:Hh,sha256:vo,sha512:Nw,showThrottleMessage:Xh,solidityPacked:JC,solidityPackedKeccak256:Pee,solidityPackedSha256:Oee,stripZerosLeft:JY,toBeArray:Ys,toBeHex:Zu,toBigInt:rg,toNumber:$M,toQuantity:$h,toTwos:l6,toUtf8Bytes:zs,toUtf8CodePoints:tQ,toUtf8String:Bh,uuidV4:VM,verifyMessage:Ree,verifyTypedData:Fee,version:pC,wordlists:nre,zeroPadBytes:c6,zeroPadValue:Ha},Symbol.toStringTag,{value:"Module"})),formatEther:WM,formatUnits:CC,fromTwos:Ew,getAccountPath:Xte,getAddress:Vr,getBigInt:ur,getBytes:Pt,getBytesCopy:Js,getCreate2Address:JX,getCreateAddress:LC,getDefaultProvider:Ute,getIcapAddress:ZX,getIndexedAccountPath:ere,getNumber:Rr,getUint:Cw,hashMessage:ZC,hexlify:bt,id:Gc,isAddress:YX,isAddressable:UC,isBytesLike:xw,isCallException:o6,isCrowdsaleJson:PA,isError:xs,isHexString:pi,isKeystoreJson:IA,isValidName:Tee,keccak256:gi,lock:WX,makeError:Oi,mask:Dh,namehash:x6,parseEther:mQ,parseUnits:AC,pbkdf2:Yu,randomBytes:Vc,recoverAddress:_6,resolveAddress:Qs,resolveProperties:Zs,ripemd160:jh,scrypt:zh,scryptSync:Hh,sha256:vo,sha512:Nw,showThrottleMessage:Xh,solidityPacked:JC,solidityPackedKeccak256:Pee,solidityPackedSha256:Oee,stripZerosLeft:JY,toBeArray:Ys,toBeHex:Zu,toBigInt:rg,toNumber:$M,toQuantity:$h,toTwos:l6,toUtf8Bytes:zs,toUtf8CodePoints:tQ,toUtf8String:Bh,uuidV4:VM,verifyMessage:Ree,verifyTypedData:Fee,version:pC,wordlists:nre,zeroPadBytes:c6,zeroPadValue:Ha},Symbol.toStringTag,{value:"Module"}));class W7e{constructor(e){Ae(this,"network");Ae(this,"jsonRpcProvider");Ae(this,"webSocketProvider");this.network=e,this.jsonRpcProvider=new mc(e.rpcUrl)}get jsonRpc(){return this.jsonRpcProvider}get webSocket(){return this.webSocketProvider}async connectWebSocket(){return await new Promise((e,t)=>{if(this.network.wsUrl===void 0)t(new Error(Or.WS_URL_NOT_DEFINED));else{const n=this.network.wsUrl;DM(n).then(i=>{i instanceof Error?t(i):e(this.webSocketProvider=new P6(n))}).catch(t)}})}contract(e,t,n){return new Yh(e,t,n)}wallet(e,t){return new OO(e,t??this.jsonRpc)}contractFactory(e,t,n){return new T6(e,t,n)}async getByteCode(e){try{return await this.jsonRpc.getCode(e)}catch(t){if(t.code==="UNCONFIGURED_NAME")return await GY(1e3),await this.getByteCode(e);throw t}}async getEstimateGas(e){return Number(await this.jsonRpcProvider.estimateGas(e))}async getGasPrice(){return(await this.jsonRpc.send("eth_gasPrice",[])).toString()}async getNonce(e){return await this.jsonRpcProvider.getTransactionCount(e)}async getBlock(e,t){return await this.jsonRpcProvider.getBlock(e,t)}async getBlockNumber(){return await this.jsonRpcProvider.getBlockNumber()}async getTransaction(e){return await this.jsonRpcProvider.getTransaction(e)}async getTransactionReceipt(e){return await this.jsonRpcProvider.getTransactionReceipt(e)}async getLastTransactions(e,t=0){var f;const n=[],i=[],s=[],a=await this.getBlock("pending"),o=(a==null?void 0:a.number)??await this.getBlockNumber();for(let h=o;h>o-t;h--){const m=await this.getBlock(h,!0);m!==null&&i.push(m)}const l=await Promise.all(i);for(const h of l)for(const m of h.transactions)n.push(this.getTransaction(m));const u=await Promise.all(n);for(const h of u)((h==null?void 0:h.from.toLowerCase())===e.toLowerCase()||((f=h==null?void 0:h.to)==null?void 0:f.toLowerCase())===e.toLowerCase())&&s.push(h);return s}async getLastTransaction(e,t=0){var s;const n=await this.getBlock("pending"),i=(n==null?void 0:n.number)??await this.getBlockNumber();for(let a=i;a>i-t;a--){const o=await this.getBlock(a,!0);if(o!==null)for(const l of o.transactions){const u=await this.getTransaction(l);if((u==null?void 0:u.from.toLowerCase())===e.toLowerCase()||((s=u==null?void 0:u.to)==null?void 0:s.toLowerCase())===e.toLowerCase())return u}}return null}async getBalance(e){return await this.jsonRpcProvider.getBalance(e)}}const cp=class cp{constructor(e){Ae(this,"network");Ae(this,"ethers");this.update(e)}static get instance(){if(cp._instance===void 0)throw new Error(Or.PROVIDER_IS_NOT_INITIALIZED);return cp._instance}static initialize(e){if(cp._instance!==void 0)throw new Error(Or.PROVIDER_IS_ALREADY_INITIALIZED);cp._instance=new cp(e)}async checkRpcConnection(e){try{const t=await js.post(e??this.network.rpcUrl,{jsonrpc:"2.0",method:"eth_blockNumber",params:[],id:1});return t.status!==200?new Error(t.statusText+": "+JSON.stringify(t.data)):!0}catch(t){return t}}async checkWsConnection(e){try{const t=await DM(e??this.network.wsUrl??"");return t instanceof Error?t:!0}catch(t){return t}}update(e){this.network=e,cp._instance=this,this.ethers=new W7e(e)}isTestnet(){var e;return((e=this.network)==null?void 0:e.testnet)??!1}};Ae(cp,"_instance");let t0=cp;const NO=(r,e)=>{console.error("MultipleChain EVM Wallet Error:",r);const t=String(r.message??"");return t==="Not supported chainId"||t.includes("chain ID")||t.includes("networkConfigurationId")||t.includes("The Provider is not connected to the requested chain.")?e(new Error(Or.UNACCEPTED_CHAIN)):r.code===4001||r.error==="Rejected by user"||t==="cancelled"||t==="User canceled"||t==="user reject this request"||t==="User rejected the transaction"||t==="An unexpected error occurred"||t==="User disapproved requested chains"?e(new Error(Or.WALLET_REQUEST_REJECTED)):t.includes("User")||t.includes("Rejected")||t.includes("cancelled")||t.includes("canceled")||t.includes("rejected")||t.includes("disapproved requested chains")?e(new Error(Or.WALLET_REQUEST_REJECTED)):t.includes("Invalid RPC URL")?e(new Error(Or.RPC_REQUEST_ERROR)):r.code===-32e3||t.includes("timeout")||t.includes("request timed out")?e(new Error(Or.RPC_TIMEOUT)):r.code===-32603||r.code===-32602?e(new Error(Or.TRANSACTION_CREATION_FAILED)):r.code===-32601?e(new Error(Or.RPC_REQUEST_ERROR)):r.code===-32002||r.message==="Already processing eth_requestAccounts. Please wait."?e(new Error(Or.WALLET_ALREADY_PROCESSING)):r.message==="User closed modal"?e(new Error(Or.CLOSED_WALLETCONNECT_MODAL)):r.message==="transaction underpriced"?e(new Error(Or.TRANSACTION_CREATION_FAILED)):e(r)};class V7e{constructor(e,t){Ae(this,"adapter");Ae(this,"walletProvider");Ae(this,"networkProvider");this.adapter=e,this.networkProvider=t??t0.instance}async request(e){const t=await this.walletProvider.request(e);if((t==null?void 0:t.error)!==void 0){const n=t.error;throw n.code===-32e3?new Error(Or.RPC_TIMEOUT):new Error(n.message)}return t}getId(){return this.adapter.id}getName(){return this.adapter.name}getIcon(){return this.adapter.icon}getPlatforms(){return this.adapter.platforms}getDownloadLink(){return this.adapter.downloadLink}createDeepLink(e,t){return this.adapter.createDeepLink===void 0?null:this.adapter.createDeepLink(e,t)}async connect(e){return await new Promise((t,n)=>{this.adapter.connect(this.networkProvider,e).then(async i=>{this.walletProvider=i;const s=await this.getChainId();if(this.networkProvider.network.id!==s){n(Or.UNACCEPTED_CHAIN);return}t(await this.getAddress())}).catch(i=>{NO(i,a=>{a.message===Or.WALLET_REQUEST_REJECTED?n(new Error(Or.WALLET_CONNECT_REJECTED)):n(a)})})})}async isDetected(){return await this.adapter.isDetected()}async isConnected(){return await this.adapter.isConnected()}async getChainId(){const e=await this.request({method:"eth_chainId"});return typeof e=="number"?e:parseInt(e,16)}async getAddress(){return(await this.walletProvider.request({method:"eth_accounts"}))[0]}async signMessage(e){const t=await this.getAddress();return await new Promise((n,i)=>{this.walletProvider.request({method:"personal_sign",params:[e,t]}).then(s=>{n(s)}).catch(s=>{NO(s,i)})})}async sendTransaction(e){return await new Promise((t,n)=>{const i=e.getRawData();i.gas=RM(i.gasLimit),delete i.chainId,delete i.nonce,delete i.gasLimit,delete i.gasPrice,this.walletProvider.request({method:"eth_sendTransaction",params:[i]}).then(s=>{t(s)}).catch(s=>{NO(s,n)})})}on(e,t){typeof this.walletProvider.on=="function"&&this.walletProvider.on(e,t)}}function oe(r){return{formatters:void 0,fees:void 0,serializers:void 0,...r}}const ire="2.21.43";let j6={getDocsUrl:({docsBaseUrl:r,docsPath:e="",docsSlug:t})=>e?`${r??"https://viem.sh"}${e}${t?`#${t}`:""}`:void 0,version:`viem@${ire}`};class Dr extends Error{constructor(e,t={}){var o;const n=(()=>{var l;return t.cause instanceof Dr?t.cause.details:(l=t.cause)!=null&&l.message?t.cause.message:t.details})(),i=t.cause instanceof Dr&&t.cause.docsPath||t.docsPath,s=(o=j6.getDocsUrl)==null?void 0:o.call(j6,{...t,docsPath:i}),a=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...j6.version?[`Version: ${j6.version}`]:[]].join(` +`);super(a,t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=ire}walk(e){return sre(this,e)}}function sre(r,e){return e!=null&&e(r)?r:r&&typeof r=="object"&&"cause"in r&&r.cause!==void 0?sre(r.cause,e):e?null:r}class G7e extends Dr{constructor({max:e,min:t,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class K7e extends Dr{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function z6(r,{strict:e=!0}={}){return!r||typeof r!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}function l3(r){return z6(r,{strict:!1})?Math.ceil((r.length-2)/2):r.length}function u3(r,{dir:e="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,n=0;for(let i=0;it*2)throw new are({size:Math.ceil(n.length/2),targetSize:t,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](t*2,"0")}`}function Y7e(r,{dir:e,size:t=32}={}){if(t===null)return r;if(r.length>t)throw new are({size:r.length,targetSize:t,type:"bytes"});const n=new Uint8Array(t);for(let i=0;ie.toString(16).padStart(2,"0"));function _r(r,e={}){return typeof r=="number"||typeof r=="bigint"?gc(r,e):typeof r=="string"?t9e(r,e):typeof r=="boolean"?X7e(r,e):r0(r,e)}function X7e(r,e={}){const t=`0x${Number(r)}`;return typeof e.size=="number"?(f3(t,{size:e.size}),Cg(t,{size:e.size})):t}function r0(r,e={}){let t="";for(let i=0;is||i=n0.zero&&r<=n0.nine)return r-n0.zero;if(r>=n0.A&&r<=n0.F)return r-(n0.A-10);if(r>=n0.a&&r<=n0.f)return r-(n0.a-10)}function dd(r,e={}){let t=r;e.size&&(f3(t,{size:e.size}),t=Cg(t,{dir:"right",size:e.size}));let n=t.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let a=0,o=0;ae)throw new K7e({givenSize:l3(r),maxSize:e})}function Ss(r,e={}){const{signed:t}=e;e.size&&f3(r,{size:e.size});const n=BigInt(r);if(!t)return n;const i=(r.length-2)/2,s=(1n<({exclude:t,format:i=>{const s=e(i);if(t)for(const a of t)delete s[a];return{...s,...n(i)}},type:r})}const lre={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function DA(r){const e={...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,chainId:r.chainId?q6(r.chainId):void 0,gas:r.gas?BigInt(r.gas):void 0,gasPrice:r.gasPrice?BigInt(r.gasPrice):void 0,maxFeePerBlobGas:r.maxFeePerBlobGas?BigInt(r.maxFeePerBlobGas):void 0,maxFeePerGas:r.maxFeePerGas?BigInt(r.maxFeePerGas):void 0,maxPriorityFeePerGas:r.maxPriorityFeePerGas?BigInt(r.maxPriorityFeePerGas):void 0,nonce:r.nonce?q6(r.nonce):void 0,to:r.to?r.to:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,type:r.type?lre[r.type]:void 0,typeHex:r.type?r.type:void 0,value:r.value?BigInt(r.value):void 0,v:r.v?BigInt(r.v):void 0};return r.authorizationList&&(e.authorizationList=s9e(r.authorizationList)),e.yParity=(()=>{if(r.yParity)return Number(r.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}const DO=NA("transaction",DA);function s9e(r){return r.map(e=>({contractAddress:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function a9e(r){var t;const e=(t=r.transactions)==null?void 0:t.map(n=>typeof n=="string"?n:DA(n));return{...r,baseFeePerGas:r.baseFeePerGas?BigInt(r.baseFeePerGas):null,blobGasUsed:r.blobGasUsed?BigInt(r.blobGasUsed):void 0,difficulty:r.difficulty?BigInt(r.difficulty):void 0,excessBlobGas:r.excessBlobGas?BigInt(r.excessBlobGas):void 0,gasLimit:r.gasLimit?BigInt(r.gasLimit):void 0,gasUsed:r.gasUsed?BigInt(r.gasUsed):void 0,hash:r.hash?r.hash:null,logsBloom:r.logsBloom?r.logsBloom:null,nonce:r.nonce?r.nonce:null,number:r.number?BigInt(r.number):null,size:r.size?BigInt(r.size):void 0,timestamp:r.timestamp?BigInt(r.timestamp):void 0,transactions:e,totalDifficulty:r.totalDifficulty?BigInt(r.totalDifficulty):null}}const $O=NA("block",a9e);function ure(r,{args:e,eventName:t}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...t?{args:e,eventName:t}:{}}}const o9e={"0x0":"reverted","0x1":"success"};function c9e(r){const e={...r,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,contractAddress:r.contractAddress?r.contractAddress:null,cumulativeGasUsed:r.cumulativeGasUsed?BigInt(r.cumulativeGasUsed):null,effectiveGasPrice:r.effectiveGasPrice?BigInt(r.effectiveGasPrice):null,gasUsed:r.gasUsed?BigInt(r.gasUsed):null,logs:r.logs?r.logs.map(t=>ure(t)):null,to:r.to?r.to:null,transactionIndex:r.transactionIndex?q6(r.transactionIndex):null,status:r.status?o9e[r.status]:null,type:r.type?lre[r.type]||r.type:null};return r.blobGasPrice&&(e.blobGasPrice=BigInt(r.blobGasPrice)),r.blobGasUsed&&(e.blobGasUsed=BigInt(r.blobGasUsed)),e}const fre=NA("transactionReceipt",c9e),l9e={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function dre(r){const e={};return typeof r.authorizationList<"u"&&(e.authorizationList=u9e(r.authorizationList)),typeof r.accessList<"u"&&(e.accessList=r.accessList),typeof r.blobVersionedHashes<"u"&&(e.blobVersionedHashes=r.blobVersionedHashes),typeof r.blobs<"u"&&(typeof r.blobs[0]!="string"?e.blobs=r.blobs.map(t=>r0(t)):e.blobs=r.blobs),typeof r.data<"u"&&(e.data=r.data),typeof r.from<"u"&&(e.from=r.from),typeof r.gas<"u"&&(e.gas=gc(r.gas)),typeof r.gasPrice<"u"&&(e.gasPrice=gc(r.gasPrice)),typeof r.maxFeePerBlobGas<"u"&&(e.maxFeePerBlobGas=gc(r.maxFeePerBlobGas)),typeof r.maxFeePerGas<"u"&&(e.maxFeePerGas=gc(r.maxFeePerGas)),typeof r.maxPriorityFeePerGas<"u"&&(e.maxPriorityFeePerGas=gc(r.maxPriorityFeePerGas)),typeof r.nonce<"u"&&(e.nonce=gc(r.nonce)),typeof r.to<"u"&&(e.to=r.to),typeof r.type<"u"&&(e.type=l9e[r.type]),typeof r.value<"u"&&(e.value=gc(r.value)),e}const hre=NA("transactionRequest",dre);function u9e(r){return r.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:gc(e.chainId),nonce:gc(e.nonce),...typeof e.yParity<"u"?{yParity:gc(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:gc(e.v)}:{}}))}const f9e=2n**16n-1n,W6=2n**256n-1n,BO=50000n,pre=f9e*32n,mre={block:$O({format(r){var t;const e=(t=r.transactions)==null?void 0:t.map(n=>{var s;if(typeof n=="string")return n;const i=(s=mre.transaction)==null?void 0:s.format(n);return i.typeHex==="0x71"?i.type="eip712":i.typeHex==="0xff"&&(i.type="priority"),i});return{l1BatchNumber:r.l1BatchNumber?Ss(r.l1BatchNumber):null,l1BatchTimestamp:r.l1BatchTimestamp?Ss(r.l1BatchTimestamp):null,transactions:e}}}),transaction:DO({format(r){const e={};return r.type==="0x71"?e.type="eip712":r.type==="0xff"&&(e.type="priority"),{...e,l1BatchNumber:r.l1BatchNumber?Ss(r.l1BatchNumber):null,l1BatchTxIndex:r.l1BatchTxIndex?Ss(r.l1BatchTxIndex):null}}}),transactionReceipt:fre({format(r){return{l1BatchNumber:r.l1BatchNumber?Ss(r.l1BatchNumber):null,l1BatchTxIndex:r.l1BatchTxIndex?Ss(r.l1BatchTxIndex):null,logs:r.logs.map(e=>({...ure(e),l1BatchNumber:e.l1BatchNumber?Ss(e.l1BatchNumber):null,transactionLogIndex:q6(e.transactionLogIndex),logType:e.logType})),l2ToL1Logs:r.l2ToL1Logs.map(e=>({blockNumber:Ss(e.blockHash),blockHash:e.blockHash,l1BatchNumber:Ss(e.l1BatchNumber),transactionIndex:Ss(e.transactionIndex),shardId:Ss(e.shardId),isService:e.isService,sender:e.sender,key:e.key,value:e.value,transactionHash:e.transactionHash,logIndex:Ss(e.logIndex)}))}}}),transactionRequest:hre({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(r){return r.gasPerPubdata||r.paymaster&&r.paymasterInput||r.factoryDeps||r.customSignature?{eip712Meta:{...r.gasPerPubdata?{gasPerPubdata:_r(r.gasPerPubdata)}:{gasPerPubdata:_r(BO)},...r.paymaster&&r.paymasterInput?{paymasterParams:{paymaster:r.paymaster,paymasterInput:Array.from(dd(r.paymasterInput))}}:{},...r.factoryDeps?{factoryDeps:r.factoryDeps.map(e=>Array.from(dd(e)))}:{},...r.customSignature?{customSignature:Array.from(dd(r.customSignature))}:{}},type:"0x71"}:{}}})};function Ag(r){return`0x${r.reduce((e,t)=>e+t.replace("0x",""),"")}`}class gre extends Dr{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class d9e extends Dr{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class h9e extends Dr{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const p9e={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new h9e({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(r){if(r<0||r>this.bytes.length-1)throw new d9e({length:this.bytes.length,position:r})},decrementPosition(r){if(r<0)throw new gre({offset:r});const e=this.position-r;this.assertPosition(e),this.position=e},getReadCount(r){return this.positionReadCount.get(r||this.position)||0},incrementPosition(r){if(r<0)throw new gre({offset:r});const e=this.position+r;this.assertPosition(e),this.position=e},inspectByte(r){const e=r??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(r,e){const t=e??this.position;return this.assertPosition(t+r-1),this.bytes.subarray(t,t+r)},inspectUint8(r){const e=r??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(r){const e=r??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(r){const e=r??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(r){const e=r??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(r){this.assertPosition(this.position),this.bytes[this.position]=r,this.position++},pushBytes(r){this.assertPosition(this.position+r.length-1),this.bytes.set(r,this.position),this.position+=r.length},pushUint8(r){this.assertPosition(this.position),this.bytes[this.position]=r,this.position++},pushUint16(r){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,r),this.position+=2},pushUint24(r){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,r>>8),this.dataView.setUint8(this.position+2,r&255),this.position+=3},pushUint32(r){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,r),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const r=this.inspectByte();return this.position++,r},readBytes(r,e){this.assertReadLimit(),this._touch();const t=this.inspectBytes(r);return this.position+=e??r,t},readUint8(){this.assertReadLimit(),this._touch();const r=this.inspectUint8();return this.position+=1,r},readUint16(){this.assertReadLimit(),this._touch();const r=this.inspectUint16();return this.position+=2,r},readUint24(){this.assertReadLimit(),this._touch();const r=this.inspectUint24();return this.position+=3,r},readUint32(){this.assertReadLimit(),this._touch();const r=this.inspectUint32();return this.position+=4,r},get remaining(){return this.bytes.length-this.position},setPosition(r){const e=this.position;return this.assertPosition(r),this.position=r,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const r=this.getReadCount();this.positionReadCount.set(this.position,r+1),r>0&&this.recursiveReadCount++}};function bre(r,{recursiveReadLimit:e=8192}={}){const t=Object.create(p9e);return t.bytes=r,t.dataView=new DataView(r.buffer,r.byteOffset,r.byteLength),t.positionReadCount=new Map,t.recursiveReadLimit=e,t}function i0(r,e="hex"){const t=vre(r),n=bre(new Uint8Array(t.length));return t.encode(n),e==="hex"?r0(n.bytes):n.bytes}function vre(r){return Array.isArray(r)?m9e(r.map(e=>vre(e))):g9e(r)}function m9e(r){const e=r.reduce((i,s)=>i+s.length,0),t=wre(e);return{length:e<=55?1+e:1+t+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+t),t===1?i.pushUint8(e):t===2?i.pushUint16(e):t===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:s}of r)s(i)}}}function g9e(r){const e=typeof r=="string"?dd(r):r,t=wre(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+t+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+t),t===1?i.pushUint8(e.length):t===2?i.pushUint16(e.length):t===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function wre(r){if(r<2**8)return 1;if(r<2**16)return 2;if(r<2**24)return 3;if(r<2**32)return 4;throw new Dr("Length is too large.")}const b9e={gwei:9,wei:18},v9e={ether:-9,wei:9};function yre(r,e){let t=r.toString();const n=t.startsWith("-");n&&(t=t.slice(1)),t=t.padStart(e,"0");let[i,s]=[t.slice(0,t.length-e),t.slice(t.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}function w9e(r,e="wei"){return yre(r,b9e[e])}function Sg(r,e="wei"){return yre(r,v9e[e])}function xre(r){const e=Object.entries(r).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),t=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(t+1)} ${i}`).join(` +`)}class y9e extends Dr{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`),{name:"FeeConflictError"})}}class x9e extends Dr{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class _9e extends Dr{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",xre(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class E9e extends Dr{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function _re(r){const{kzg:e}=r,t=r.to??(typeof r.blobs[0]=="string"?"hex":"bytes"),n=typeof r.blobs[0]=="string"?r.blobs.map(s=>dd(s)):r.blobs,i=[];for(const s of n)i.push(Uint8Array.from(e.blobToKzgCommitment(s)));return t==="bytes"?i:i.map(s=>r0(s))}function Ere(r){const{kzg:e}=r,t=r.to??(typeof r.blobs[0]=="string"?"hex":"bytes"),n=typeof r.blobs[0]=="string"?r.blobs.map(a=>dd(a)):r.blobs,i=typeof r.commitments[0]=="string"?r.commitments.map(a=>dd(a)):r.commitments,s=[];for(let a=0;ar0(a))}function Cre(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`positive integer expected, not ${r}`)}function C9e(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function LO(r,...e){if(!C9e(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${r.length}`)}function $A(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Are(r,e){LO(r);const t=e.outputLen;if(r.lengthnew Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),UO=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),hd=(r,e)=>r<<32-e|r>>>e,Sre=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,S9e=r=>r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255;function Ire(r){for(let e=0;er().update(FO(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function T9e(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);const i=BigInt(32),s=BigInt(4294967295),a=Number(t>>i&s),o=Number(t&s),l=n?4:0,u=n?0:4;r.setUint32(e+l,a,n),r.setUint32(e+u,o,n)}const k9e=(r,e,t)=>r&e^~r&t,R9e=(r,e,t)=>r&e^r&t^e&t;class M9e extends Tre{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=UO(this.buffer)}update(e){$A(this);const{view:t,buffer:n,blockLen:i}=this;e=FO(e);const s=e.length;for(let a=0;ai-a&&(this.process(n,0),a=0);for(let h=a;hf.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h>>3,C=hd(b,17)^hd(b,19)^b>>>10;m1[h]=C+m1[h-7]+v+m1[h-16]|0}let{A:n,B:i,C:s,D:a,E:o,F:l,G:u,H:f}=this;for(let h=0;h<64;h++){const m=hd(o,6)^hd(o,11)^hd(o,25),b=f+m+k9e(o,l,u)+P9e[h]+m1[h]|0,C=(hd(n,2)^hd(n,13)^hd(n,22))+R9e(n,i,s)|0;f=u,u=l,l=o,o=a+b|0,a=s,s=i,i=n,n=b+C|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,a=a+this.D|0,o=o+this.E|0,l=l+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,s,a,o,l,u,f)}roundClean(){m1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const N9e=kre(()=>new O9e);function Rre(r,e){const t=e||"hex",n=N9e(z6(r,{strict:!1})?H6(r):r);return t==="bytes"?n:_r(n)}function D9e(r){const{commitment:e,version:t=1}=r,n=r.to??(typeof e=="string"?"hex":"bytes"),i=Rre(e,"bytes");return i.set([t],0),n==="bytes"?i:r0(i)}function $9e(r){const{commitments:e,version:t}=r,n=r.to??(typeof e[0]=="string"?"hex":"bytes"),i=[];for(const s of e)i.push(D9e({commitment:s,to:n,version:t}));return i}const Mre=6,Pre=32,jO=4096,Ore=Pre*jO,Nre=Ore*Mre-1-1*jO*Mre,Dre=1;class B9e extends Dr{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class $re extends Dr{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class L9e extends Dr{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class U9e extends Dr{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${Dre}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}function F9e(r){const e=r.to??(typeof r.data=="string"?"hex":"bytes"),t=typeof r.data=="string"?dd(r.data):r.data,n=l3(t);if(!n)throw new $re;if(n>Nre)throw new B9e({maxSize:Nre,size:n});const i=[];let s=!0,a=0;for(;s;){const o=bre(new Uint8Array(Ore));let l=0;for(;lo.bytes):i.map(o=>r0(o.bytes))}function j9e(r){const{data:e,kzg:t,to:n}=r,i=r.blobs??F9e({data:e,to:n}),s=r.commitments??_re({blobs:i,kzg:t,to:n}),a=r.proofs??Ere({blobs:i,commitments:s,kzg:t,to:n}),o=[];for(let l=0;lthis.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const BA=BigInt(2**32-1),Ure=BigInt(32);function H9e(r,e=!1){return e?{h:Number(r&BA),l:Number(r>>Ure&BA)}:{h:Number(r>>Ure&BA)|0,l:Number(r&BA)|0}}function q9e(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;ir<>>32-t,V9e=(r,e,t)=>e<>>32-t,G9e=(r,e,t)=>e<>>64-t,K9e=(r,e,t)=>r<>>64-t,Fre=[],jre=[],zre=[],Z9e=BigInt(0),V6=BigInt(1),J9e=BigInt(2),Y9e=BigInt(7),Q9e=BigInt(256),X9e=BigInt(113);for(let r=0,e=V6,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],Fre.push(2*(5*n+t)),jre.push((r+1)*(r+2)/2%64);let i=Z9e;for(let s=0;s<7;s++)e=(e<>Y9e)*X9e)%Q9e,e&J9e&&(i^=V6<<(V6<t>32?G9e(r,e,t):W9e(r,e,t),qre=(r,e,t)=>t>32?K9e(r,e,t):V9e(r,e,t);function r_e(r,e=24){const t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)t[a]=r[a]^r[a+10]^r[a+20]^r[a+30]^r[a+40];for(let a=0;a<10;a+=2){const o=(a+8)%10,l=(a+2)%10,u=t[l],f=t[l+1],h=Hre(u,f,1)^t[o],m=qre(u,f,1)^t[o+1];for(let b=0;b<50;b+=10)r[a+b]^=h,r[a+b+1]^=m}let i=r[2],s=r[3];for(let a=0;a<24;a++){const o=jre[a],l=Hre(i,s,o),u=qre(i,s,o),f=Fre[a];i=r[f],s=r[f+1],r[f]=l,r[f+1]=u}for(let a=0;a<50;a+=10){for(let o=0;o<10;o++)t[o]=r[a+o];for(let o=0;o<10;o++)r[a+o]^=~t[(o+2)%10]&t[(o+4)%10]}r[0]^=e_e[n],r[1]^=t_e[n]}t.fill(0)}let n_e=class Ove extends Tre{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Cre(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=A9e(this.state)}keccak(){Sre||Ire(this.state32),r_e(this.state32,this.rounds),Sre||Ire(this.state32),this.posOut=0,this.pos=0}update(e){$A(this);const{blockLen:t,state:n}=this;e=FO(e);const i=e.length;for(let s=0;s=n&&this.keccak();const a=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Cre(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Are(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:a}=this;return e||(e=new Ove(t,n,i,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const i_e=((r,e,t)=>kre(()=>new n_e(e,r,t)))(1,136,256/8);function s_e(r,e){return i_e(z6(r,{strict:!1})?H6(r):r)}const JO=new Lre(8192);function a_e(r,e){if(JO.has(`${r}.${e}`))return JO.get(`${r}.${e}`);const t=r.substring(2).toLowerCase(),n=s_e(cre(t)),i=t.split("");for(let a=0;a<40;a+=2)n[a>>1]>>4>=8&&i[a]&&(i[a]=i[a].toUpperCase()),(n[a>>1]&15)>=8&&i[a+1]&&(i[a+1]=i[a+1].toUpperCase());const s=`0x${i.join("")}`;return JO.set(`${r}.${e}`,s),s}const o_e=/^0x[a-fA-F0-9]{40}$/,YO=new Lre(8192);function bc(r,e){const{strict:t=!0}=e??{},n=`${r}.${t}`;if(YO.has(n))return YO.get(n);const i=o_e.test(r)?r.toLowerCase()===r?!0:t?a_e(r)===r:!0:!1;return YO.set(n,i),i}function c_e(r,e,t,{strict:n}={}){return z6(r,{strict:!1})?u_e(r,e,t,{strict:n}):l_e(r,e,t,{strict:n})}function Wre(r,e,t){if(l3(r)!==t-e)throw new Z7e({offset:t,position:"end",size:l3(r)})}function l_e(r,e,t,{strict:n}={}){const i=r.slice(e,t);return n&&Wre(i,e,t),i}function u_e(r,e,t,{strict:n}={}){const i=`0x${r.replace("0x","").slice(e*2,t*2)}`;return n&&Wre(i,e,t),i}function f_e(r){const{authorizationList:e}=r;if(e)for(const t of e){const{contractAddress:n,chainId:i}=t;if(!bc(n))throw new Zc({address:n});if(i<0)throw new d3({chainId:i})}QO(r)}function d_e(r){const{blobVersionedHashes:e}=r;if(e){if(e.length===0)throw new $re;for(const t of e){const n=l3(t),i=q6(c_e(t,0,1));if(n!==32)throw new L9e({hash:t,size:n});if(i!==Dre)throw new U9e({hash:t,version:i})}}QO(r)}function QO(r){const{chainId:e,maxPriorityFeePerGas:t,maxFeePerGas:n,to:i}=r;if(e<=0)throw new d3({chainId:e});if(i&&!bc(i))throw new Zc({address:i});if(n&&n>W6)throw new g1({maxFeePerGas:n});if(t&&n&&t>n)throw new p3({maxFeePerGas:n,maxPriorityFeePerGas:t})}function h_e(r){const{chainId:e,maxPriorityFeePerGas:t,gasPrice:n,maxFeePerGas:i,to:s}=r;if(e<=0)throw new d3({chainId:e});if(s&&!bc(s))throw new Zc({address:s});if(t||i)throw new Dr("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>W6)throw new g1({maxFeePerGas:n})}function p_e(r){const{chainId:e,maxPriorityFeePerGas:t,gasPrice:n,maxFeePerGas:i,to:s}=r;if(s&&!bc(s))throw new Zc({address:s});if(typeof e<"u"&&e<=0)throw new d3({chainId:e});if(t||i)throw new Dr("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>W6)throw new g1({maxFeePerGas:n})}function m_e(r){if(r.type)return r.type;if(typeof r.authorizationList<"u")return"eip7702";if(typeof r.blobs<"u"||typeof r.blobVersionedHashes<"u"||typeof r.maxFeePerBlobGas<"u"||typeof r.sidecars<"u")return"eip4844";if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")return"eip1559";if(typeof r.gasPrice<"u")return typeof r.accessList<"u"?"eip2930":"legacy";throw new _9e({transaction:r})}function G6(r){if(!r||r.length===0)return[];const e=[];for(let t=0;t"u"||typeof b>"u")){const N=typeof r.blobs[0]=="string"?r.blobs:r.blobs.map(G=>r0(G)),$=r.kzg,j=_re({blobs:N,kzg:$});if(typeof m>"u"&&(m=$9e({commitments:j})),typeof b>"u"){const G=Ere({blobs:N,commitments:j,kzg:$});b=j9e({blobs:N,commitments:j,proofs:G})}}const v=G6(f),C=[_r(t),i?_r(i):"0x",u?_r(u):"0x",l?_r(l):"0x",n?_r(n):"0x",s??"0x",a?_r(a):"0x",h??"0x",v,o?_r(o):"0x",m??[],...m3(r,e)],R=[],k=[],P=[];if(b)for(let N=0;N{if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);if(t>0)return BigInt(t*2)+BigInt(35n+e.v-27n);const b=27n+(e.v===27n?0n:1n);if(e.v!==b)throw new x9e({v:e.v});return b})(),h=u3(e.r),m=u3(e.s);u=[...u,_r(f),h==="0x00"?"0x":h,m==="0x00"?"0x":m]}else t>0&&(u=[...u,_r(t),"0x","0x"]);return i0(u)}function m3(r,e){const t=e??r,{v:n,yParity:i}=t;if(typeof t.r>"u")return[];if(typeof t.s>"u")return[];if(typeof n>"u"&&typeof i>"u")return[];const s=u3(t.r),a=u3(t.s);return[typeof i=="number"?i?_r(1):"0x":n===0n?"0x":n===1n?_r(1):n===27n?"0x":_r(1),s==="0x00"?"0x":s,a==="0x00"?"0x":a]}class x_e extends Dr{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(` +`),{name:"InvalidEip712TransactionError"})}}function Gre(r){return!!(r.type==="eip712"||"customSignature"in r&&r.customSignature||"paymaster"in r&&r.paymaster||"paymasterInput"in r&&r.paymasterInput||"gasPerPubdata"in r&&typeof r.gasPerPubdata=="bigint"||"factoryDeps"in r&&r.factoryDeps)}function Kre(r){const{chainId:e,to:t,from:n,paymaster:i,paymasterInput:s}=r;if(!Gre(r))throw new x_e;if(!e||e<=0)throw new d3({chainId:e});if(t&&!bc(t))throw new Zc({address:t});if(n&&!bc(n))throw new Zc({address:n});if(i&&!bc(i))throw new Zc({address:i});if(i&&!s)throw new Dr("`paymasterInput` must be provided when `paymaster` is defined");if(!i&&s)throw new Dr("`paymaster` must be provided when `paymasterInput` is defined")}function __e(r,e){return Gre(r)?C_e(r):Vre(r,e)}const E_e={transaction:__e};function C_e(r){const{chainId:e,gas:t,nonce:n,to:i,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:l,customSignature:u,factoryDeps:f,paymaster:h,paymasterInput:m,gasPerPubdata:b,data:v}=r;Kre(r);const C=[n?_r(n):"0x",l?_r(l):"0x",o?_r(o):"0x",t?_r(t):"0x",i??"0x",a?_r(a):"0x",v??"0x0",_r(e),_r(""),_r(""),_r(e),s??"0x",_r(b||BO),f??[],u??"0x",h&&m?[h,m]:[]];return Ag(["0x71",i0(C)])}class A_e extends Dr{constructor({givenLength:e,maxBytecodeSize:t}){super(`Bytecode cannot be longer than ${t} bytes. Given length: ${e}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class S_e extends Dr{constructor({givenLengthInWords:e}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${e}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class I_e extends Dr{constructor({givenLength:e}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${e}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function T_e(r){const e=H6(r);if(e.length%32!==0)throw new I_e({givenLength:e.length});if(e.length>pre)throw new A_e({givenLength:e.length,maxBytecodeSize:pre});const t=Rre(e),n=H6(t),i=e.length/32;if(i%2===0)throw new S_e({givenLengthInWords:i});const s=H6(i),a=Cg(s,{size:2}),o=new Uint8Array([1,0]);return n.set(o,0),n.set(a,2),n}const k_e=r=>{Kre(r);const e=R_e(r);return{domain:{name:"zkSync",version:"2",chainId:r.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:e}};function R_e(r){const{gas:e,nonce:t,to:n,from:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:o,factoryDeps:l,paymaster:u,paymasterInput:f,gasPerPubdata:h,data:m}=r;return{txType:113n,from:BigInt(i),to:n?BigInt(n):0n,gasLimit:e??0n,gasPerPubdataByteLimit:h??BO,maxFeePerGas:a??0n,maxPriorityFeePerGas:o??0n,paymaster:u?BigInt(u):0n,nonce:t?BigInt(t):0n,value:s??0n,data:m||"0x0",factoryDeps:(l==null?void 0:l.map(b=>_r(T_e(b))))??[],paymasterInput:f||"0x"}}const b1={formatters:mre,serializers:E_e,custom:{getEip712Domain:k_e}},M_e=oe({...b1,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Abstract Block Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),P_e=oe({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),O_e=oe({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),N_e=oe({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),D_e=oe({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),$_e=oe({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),Zre={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},XO={block:$O({format(r){var t;return{transactions:(t=r.transactions)==null?void 0:t.map(n=>{if(typeof n=="string")return n;const i=DA(n);return i.typeHex==="0x7e"&&(i.isSystemTx=n.isSystemTx,i.mint=n.mint?Ss(n.mint):void 0,i.sourceHash=n.sourceHash,i.type="deposit"),i}),stateRoot:r.stateRoot}}}),transaction:DO({format(r){const e={};return r.type==="0x7e"&&(e.isSystemTx=r.isSystemTx,e.mint=r.mint?Ss(r.mint):void 0,e.sourceHash=r.sourceHash,e.type="deposit"),e}}),transactionReceipt:fre({format(r){return{l1GasPrice:r.l1GasPrice?Ss(r.l1GasPrice):null,l1GasUsed:r.l1GasUsed?Ss(r.l1GasUsed):null,l1Fee:r.l1Fee?Ss(r.l1Fee):null,l1FeeScalar:r.l1FeeScalar?Number(r.l1FeeScalar):null}}})};function Jre(r,e){return U_e(r)?L_e(r):Vre(r,e)}const B_e={transaction:Jre};function L_e(r){F_e(r);const{sourceHash:e,data:t,from:n,gas:i,isSystemTx:s,mint:a,to:o,value:l}=r,u=[e,n,o??"0x",a?_r(a):"0x",l?_r(l):"0x",i?_r(i):"0x",s?"0x1":"0x",t??"0x"];return Ag(["0x7e",i0(u)])}function U_e(r){return r.type==="deposit"||typeof r.sourceHash<"u"}function F_e(r){const{from:e,to:t}=r;if(e&&!bc(e))throw new Zc({address:e});if(t&&!bc(t))throw new Zc({address:t})}const Jt={contracts:Zre,formatters:XO,serializers:B_e},LA=1,j_e=oe({...Jt,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[LA]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[LA]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[LA]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:LA}),UA=11155111,z_e=oe({...Jt,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[UA]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[UA]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[UA]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:UA}),H_e=oe({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),q_e=oe({id:33139,name:"Ape Chain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),W_e=oe({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),V_e=oe({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),G_e=oe({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),K_e=oe({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),Z_e=oe({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),J_e=oe({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),Y_e=oe({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),Q_e=oe({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),X_e=oe({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),eEe=oe({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),tEe=oe({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),rEe=oe({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),nEe=oe({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),iEe=oe({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),sEe=oe({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),aEe=oe({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),oEe=oe({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),cEe=oe({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),lEe=oe({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),uEe=oe({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},sourceId:8453}),fEe=oe({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},testnet:!0,sourceId:168587773}),dEe=oe({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),K6=1,hEe=oe({...Jt,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[K6]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[K6]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[K6]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[K6]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:K6}),FA=5,pEe=oe({...Jt,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[FA]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[FA]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[FA]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:FA}),Z6=11155111,mEe=oe({...Jt,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[Z6]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Z6]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Z6]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Z6]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:Z6}),gEe=oe({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),bEe=oe({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),vEe=oe({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),wEe=oe({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),yEe=oe({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),xEe=oe({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269}},rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),_Ee=oe({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),EEe=oe({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),CEe=oe({id:96,name:"Bitkub",nativeCurrency:{name:"Bitkub",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),AEe=oe({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),SEe=oe({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}}}),IEe=oe({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},testnet:!0}),TEe=oe({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),kEe=oe({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),REe=oe({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),MEe=oe({id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:1}),PEe=oe({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:11155111}),eN=1,OEe=oe({...Jt,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...Jt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[eN]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[eN]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:eN}),NEe=oe({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),DEe=oe({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),tN=11155111,$Ee=oe({...Jt,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...Jt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[tN]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[tN]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:tN}),BEe=oe({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Botanix",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://poa-node.botanixlabs.dev"]}},blockExplorers:{default:{name:"blockscout",url:"https://blockscout.botanixlabs.dev",apiUrl:"https://blockscout.botanixlabs.dev"}},testnet:!0}),LEe=oe({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),UEe=oe({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),FEe=oe({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),jEe=oe({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),zEe=oe({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),HEe=oe({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),qEe=oe({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),WEe=oe({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),VEe=oe({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),GEe=oe({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),KEe=oe({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),ZEe=oe({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),JEe=oe({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),YEe=oe({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),QEe=oe({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),XEe={estimateFeesPerGas:async r=>{var i;if(!((i=r.request)!=null&&i.feeCurrency))return null;const[e,t]=await Promise.all([eCe(r.client,r.request.feeCurrency),tCe(r.client,r.request.feeCurrency)]);return{maxFeePerGas:r.multiply(e)+t,maxPriorityFeePerGas:t}}};async function eCe(r,e){const t=await r.request({method:"eth_gasPrice",params:[e]});return BigInt(t)}async function tCe(r,e){const t=await r.request({method:"eth_maxPriorityFeePerGas",params:[e]});return BigInt(t)}function Yre(r){return r===0||r===0n||r===void 0||r===null||r==="0"||r===""||typeof r=="string"&&(u3(r).toLowerCase()==="0x"||u3(r).toLowerCase()==="0x00")}function J6(r){return!Yre(r)}function rCe(r){return typeof r.maxFeePerGas<"u"&&typeof r.maxPriorityFeePerGas<"u"}function Qre(r){return r.type==="cip64"?!0:rCe(r)&&J6(r.feeCurrency)}const nCe={block:$O({format(r){var t;return{transactions:(t=r.transactions)==null?void 0:t.map(n=>typeof n=="string"?n:{...DA(n),...n.gatewayFee?{gatewayFee:Ss(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency}),...r.randomness?{randomness:r.randomness}:{}}}}),transaction:DO({format(r){if(r.type==="0x7e")return{isSystemTx:r.isSystemTx,mint:r.mint?Ss(r.mint):void 0,sourceHash:r.sourceHash,type:"deposit"};const e={feeCurrency:r.feeCurrency};return r.type==="0x7b"?e.type="cip64":(r.type==="0x7c"&&(e.type="cip42"),e.gatewayFee=r.gatewayFee?Ss(r.gatewayFee):null,e.gatewayFeeRecipient=r.gatewayFeeRecipient),e}}),transactionRequest:hre({format(r){const e={};return r.feeCurrency&&(e.feeCurrency=r.feeCurrency),Qre(r)&&(e.type="0x7b"),e}})};function iCe(r,e){return Qre(r)?aCe(r,e):Jre(r,e)}const sCe={transaction:iCe};function aCe(r,e){cCe(r);const{chainId:t,gas:n,nonce:i,to:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:l,accessList:u,feeCurrency:f,data:h}=r,m=[_r(t),i?_r(i):"0x",l?_r(l):"0x",o?_r(o):"0x",n?_r(n):"0x",s??"0x",a?_r(a):"0x",h??"0x",G6(u),f,...m3(r,e)];return Ag(["0x7b",i0(m)])}const oCe=W6;function cCe(r){const{chainId:e,maxPriorityFeePerGas:t,gasPrice:n,maxFeePerGas:i,to:s,feeCurrency:a}=r;if(e<=0)throw new d3({chainId:e});if(s&&!bc(s))throw new Zc({address:s});if(n)throw new Dr("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(J6(i)&&i>oCe)throw new g1({maxFeePerGas:i});if(J6(t)&&J6(i)&&t>i)throw new p3({maxFeePerGas:i,maxPriorityFeePerGas:t});if(J6(a)&&!bc(a))throw new Dr("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(Yre(a))throw new Dr("`feeCurrency` must be provided for CIP-64 transactions.")}const rN={contracts:Zre,formatters:nCe,serializers:sCe,fees:XEe},lCe=oe({...rN,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),jA=17e3,uCe=oe({...rN,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...rN.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[jA]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[jA]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[jA]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[jA]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),fCe=oe({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),dCe=oe({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),hCe=oe({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),pCe=oe({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),mCe=oe({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),gCe=oe({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),bCe=oe({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),vCe=oe({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),wCe=oe({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),yCe=oe({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),xCe=oe({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),_Ce=oe({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}}}),ECe=oe({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),CCe=oe({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),ACe=oe({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),SCe=oe({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),ICe=oe({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),TCe=oe({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),kCe=oe({...Jt,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...Jt.contracts}}),RCe=oe({...Jt,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...Jt.contracts}}),MCe=oe({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),PCe=oe({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),OCe=oe({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),NCe=oe({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),DCe=oe({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),$Ce=oe({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),BCe=oe({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),LCe=oe({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),UCe=oe({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),FCe=oe({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),jCe=oe({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),zCe=oe({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),HCe=oe({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),qCe=oe({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),WCe=oe({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),VCe=oe({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),GCe=oe({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),KCe=oe({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),ZCe=oe({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),JCe=oe({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),YCe=oe({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),QCe=oe({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),XCe=oe({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),eAe=oe({...Jt,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),tAe=oe({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),rAe=oe({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),nAe=oe({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),iAe=oe({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),sAe=oe({id:42793,name:"Etherlink",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),aAe=oe({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),oAe=oe({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),cAe=oe({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),lAe=oe({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),uAe=oe({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),fAe=oe({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),dAe=oe({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}},testnet:!0}),hAe=oe({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),pAe=oe({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),mAe=oe({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),gAe=oe({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),bAe=oe({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"Flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),vAe=oe({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),wAe=oe({id:747,name:"FlowEVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://flowdiver.io"}}}),yAe=oe({id:646,name:"FlowEVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),xAe=oe({id:545,name:"FlowEVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://testnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}}}),_Ae=oe({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}}}),EAe=oe({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},testnet:!0}),CAe=oe({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},testnet:!0}),AAe=oe({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),SAe=oe({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),zA=1,IAe=oe({...Jt,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[zA]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[zA]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[zA]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:zA}),HA=17e3,TAe=oe({...Jt,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[HA]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[HA]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[HA]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:HA}),kAe=oe({...Jt,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...Jt.contracts},sourceId:1}),RAe=oe({...Jt,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),MAe=oe({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),PAe=oe({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),OAe=oe({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),NAe=oe({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),qA=17e3,DAe=oe({...Jt,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:qA,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[qA]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[qA]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[qA]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),$Ae=oe({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),BAe=oe({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),LAe=oe({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),UAe=oe({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),FAe=oe({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),jAe=oe({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),zAe=oe({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),HAe=oe({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),qAe=oe({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),WAe=oe({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),VAe=oe({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"testGURU",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},testnet:!0}),GAe=oe({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),KAe=oe({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),ZAe=oe({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),JAe=oe({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),YAe=oe({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),QAe=oe({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://hashkeychain-testnet.alt.technology"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkeychain-testnet-explorer.alt.technology"}}}),XAe=oe({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),eSe=oe({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),tSe=oe({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),rSe=oe({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),nSe=oe({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),iSe=oe({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),sSe=oe({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),aSe=oe({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),oSe=oe({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),cSe=oe({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),lSe=oe({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),WA=11155111,uSe=oe({...Jt,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...Jt.contracts,disputeGameFactory:{[WA]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[WA]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[WA]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:WA}),fSe=oe({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),dSe=oe({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),hSe=oe({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),pSe=oe({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),mSe=oe({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),gSe=oe({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),bSe=oe({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),vSe=oe({id:1802203764,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),wSe=oe({id:920637907288165,name:"Kakarot Starknet Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),ySe=oe({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),xSe=oe({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),_Se=oe({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),ESe=oe({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),CSe=oe({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),ASe=oe({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),SSe=oe({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),ISe=oe({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),TSe=oe({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),kSe=oe({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),RSe=oe({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},testnet:!1}),MSe=oe({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},testnet:!0}),PSe=oe({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),OSe=oe({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),NSe=oe({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),DSe=oe({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},testnet:!0}),$Se=oe({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},testnet:!1});function nN(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}class BSe extends Dr{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}function Xre(r){return r.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n} +`,"")}function LSe(r){return r.reduce((e,{address:t,...n})=>{let i=`${e} ${t}: +`;return n.nonce&&(i+=` nonce: ${n.nonce} +`),n.balance&&(i+=` balance: ${n.balance} +`),n.code&&(i+=` code: ${n.code} +`),n.state&&(i+=` state: +`,i+=Xre(n.state)),n.stateDiff&&(i+=` stateDiff: +`,i+=Xre(n.stateDiff)),i},` State Override: +`).slice(0,-1)}class USe extends Dr{constructor(e,{account:t,docsPath:n,chain:i,data:s,gas:a,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:f,to:h,value:m,stateOverride:b}){var R;const v=t?nN(t):void 0;let C=xre({from:v==null?void 0:v.address,to:h,value:typeof m<"u"&&`${w9e(m)} ${((R=i==null?void 0:i.nativeCurrency)==null?void 0:R.symbol)||"ETH"}`,data:s,gas:a,gasPrice:typeof o<"u"&&`${Sg(o)} gwei`,maxFeePerGas:typeof l<"u"&&`${Sg(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Sg(u)} gwei`,nonce:f});b&&(C+=` +${LSe(b)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",C].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function FSe(r,e){const t=(r.details||"").toLowerCase(),n=r instanceof Dr?r.walk(i=>(i==null?void 0:i.code)===h3.code):r;return n instanceof Dr?new h3({cause:r,message:n.details}):h3.nodeMessage.test(t)?new h3({cause:r,message:r.details}):g1.nodeMessage.test(t)?new g1({cause:r,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):zO.nodeMessage.test(t)?new zO({cause:r,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):HO.nodeMessage.test(t)?new HO({cause:r,nonce:e==null?void 0:e.nonce}):qO.nodeMessage.test(t)?new qO({cause:r,nonce:e==null?void 0:e.nonce}):WO.nodeMessage.test(t)?new WO({cause:r,nonce:e==null?void 0:e.nonce}):VO.nodeMessage.test(t)?new VO({cause:r}):GO.nodeMessage.test(t)?new GO({cause:r,gas:e==null?void 0:e.gas}):KO.nodeMessage.test(t)?new KO({cause:r,gas:e==null?void 0:e.gas}):ZO.nodeMessage.test(t)?new ZO({cause:r}):p3.nodeMessage.test(t)?new p3({cause:r,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new Bre({cause:r})}function jSe(r,{docsPath:e,...t}){const n=(()=>{const i=FSe(r,t);return i instanceof Bre?r:i})();return new USe(n,{docsPath:e,...t})}function zSe(r,{format:e}){if(!e)return{};const t={};function n(s){const a=Object.keys(s);for(const o of a)o in r&&(t[o]=r[o]),s[o]&&typeof s[o]=="object"&&!Array.isArray(s[o])&&n(s[o])}const i=e(r||{});return n(i),t}function HSe(r){const{account:e,gasPrice:t,maxFeePerGas:n,maxPriorityFeePerGas:i,to:s}=r,a=e?nN(e):void 0;if(a&&!bc(a.address))throw new Zc({address:a.address});if(s&&!bc(s))throw new Zc({address:s});if(typeof t<"u"&&(typeof n<"u"||typeof i<"u"))throw new y9e;if(n&&n>W6)throw new g1({maxFeePerGas:n});if(i&&n&&i>n)throw new p3({maxFeePerGas:n,maxPriorityFeePerGas:i})}async function qSe(r,e){var i,s,a;const{account:t=r.account}=e;if(!t)throw new BSe;const n=nN(t);try{const{accessList:o,blockNumber:l,blockTag:u,data:f,gas:h,gasPrice:m,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:C,to:R,value:k,...P}=e,$=(l?gc(l):void 0)||u;HSe(e);const j=(a=(s=(i=r.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:a.format,U=(j||dre)({...zSe(P,{format:j}),from:n==null?void 0:n.address,accessList:o,data:f,gas:h,gasPrice:m,maxFeePerGas:b,maxPriorityFeePerGas:v,nonce:C,to:R,value:k}),{baseFeePerGas:L,gasLimit:V,priorityFeePerGas:te}=await r.request({method:"linea_estimateGas",params:$?[U,$]:[U]});return{baseFeePerGas:BigInt(L),gasLimit:BigInt(V),priorityFeePerGas:BigInt(te)}}catch(o){throw jSe(o,{...e,account:n,chain:r.chain})}}const ene={fees:{estimateFeesPerGas:tne,async maxPriorityFeePerGas({block:r,client:e,request:t}){const n=await tne({block:r,client:e,multiply:i=>i,request:t,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function tne({client:r,multiply:e,request:t,type:n}){try{const i=await qSe(r,{...t,account:t==null?void 0:t.account}),{priorityFeePerGas:s}=i,o=e(BigInt(i.baseFeePerGas))+s;return n==="legacy"?{gasPrice:o}:{maxFeePerGas:o,maxPriorityFeePerGas:s}}catch{return null}}const WSe=oe({...ene,id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),VSe=oe({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),GSe=oe({...ene,id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),KSe=oe({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),VA=1,ZSe=oe({...Jt,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[VA]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[VA]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[VA]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:VA}),GA=11155111,JSe=oe({...Jt,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[GA]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[GA]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[GA]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:GA}),YSe=oe({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),QSe=oe({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),XSe=oe({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),eIe=oe({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),tIe=oe({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),rIe=oe({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),nIe=oe({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),iIe=oe({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),sIe=oe({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),aIe=oe({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),oIe=oe({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),cIe=oe({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),lIe=oe({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),uIe=oe({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),fIe=oe({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),dIe=oe({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),hIe=oe({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),pIe=oe({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),mIe=oe({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),gIe=oe({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),bIe=oe({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),vIe=oe({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),KA=1,wIe=oe({...Jt,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[KA]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[KA]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[KA]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:KA}),yIe=oe({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),xIe=oe({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),_Ie=oe({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://andromeda.metis.io/?owner=1088"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),EIe=oe({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),CIe=oe({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),AIe=oe({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),SIe=oe({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),IIe=oe({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),ZA=1,TIe=oe({...Jt,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[ZA]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[ZA]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[ZA]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:ZA}),JA=11155111,kIe=oe({...Jt,id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[JA]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[JA]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[JA]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:JA}),RIe=oe({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),MIe=oe({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),PIe=oe({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),OIe=oe({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),NIe=oe({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},testnet:!1}),DIe=oe({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),$Ie=oe({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),BIe=oe({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),LIe=oe({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),UIe=oe({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),FIe=oe({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),jIe=oe({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),zIe=oe({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),HIe=oe({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),qIe=oe({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),WIe=oe({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),VIe=oe({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),YA=56,GIe=oe({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[YA]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[YA]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[YA]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:YA}),QA=97,KIe=oe({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{...Jt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[QA]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[QA]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[QA]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:QA}),Y6=1,ZIe=oe({...Jt,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[Y6]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Y6]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Y6]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Y6]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:Y6}),XA=5,JIe=oe({...Jt,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[XA]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[XA]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[XA]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:XA}),Q6=11155111,YIe=oe({...Jt,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[Q6]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[Q6]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[Q6]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[Q6]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:Q6}),QIe=oe({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),XIe=oe({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),eTe=oe({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),tTe=oe({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),rTe=oe({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),nTe=oe({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),iTe=oe({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),eS=1,sTe=oe({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[eS]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[eS]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[eS]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:XO,sourceId:eS}),tS=11155111,aTe=oe({id:58008,network:"pgn-testnet",name:"PGN ",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[tS]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[tS]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[tS]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:XO,sourceId:tS,testnet:!0}),oTe=oe({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),cTe=oe({...b1,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),lTe=oe({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),uTe=oe({id:161221135,name:"Plume Testnet",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},testnet:!0,sourceId:11155111}),fTe=oe({id:137,name:"Polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),dTe=oe({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api-amoy.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),hTe=oe({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),pTe=oe({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),mTe=oe({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),gTe=oe({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),bTe=oe({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),vTe=oe({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),wTe=oe({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),yTe=oe({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),xTe=oe({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),_Te=oe({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://real.drpc.org"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),ETe=oe({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Ethernal",url:"https://explorer.testnet.redbelly.network",apiUrl:"https://ethernal.fly.dev/api"}},testnet:!0}),rS=1,CTe=oe({...Jt,name:"Redstone",id:690,sourceId:rS,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[rS]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[rS]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[rS]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),ATe=oe({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),STe=oe({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),ITe=oe({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),TTe=oe({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),kTe=oe({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),RTe=oe({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),MTe=oe({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),PTe=oe({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}},testnet:!0}),nS=1,OTe=oe({...Jt,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[nS]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[nS]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[nS]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:nS}),iS=11155111,NTe=oe({...Jt,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[iS]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[iS]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[iS]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:iS}),DTe=oe({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),$Te=oe({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),BTe=oe({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},testnet:!1}),LTe=oe({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),UTe=oe({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}},testnet:!0}),FTe=oe({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),jTe=oe({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),zTe=oe({id:534352,name:"Scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),HTe=oe({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),qTe=oe({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),WTe=oe({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),VTe=oe({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),GTe=oe({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),sS=1,KTe=oe({...Jt,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[sS]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[sS]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[sS]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:sS}),ZTe=oe({...Jt,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),JTe=oe({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),YTe=oe({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),QTe=oe({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),XTe=oe({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),eke=oe({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),tke=oe({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),rke=oe({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),nke=oe({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),ike=oe({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),ske=oe({id:1564830818,name:"SKALE | Calypso NFT Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),ake=oe({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),oke=oe({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),cke=oe({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),lke=oe({id:2046399126,name:"SKALE | Europa Liquidity Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),uke=oe({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),fke=oe({id:2139927552,name:"SKALE | Exorde",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),dke=oe({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),hke=oe({id:1482601649,name:"SKALE | Nebula Gaming Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),pke=oe({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),mke=oe({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),gke=oe({id:1350216234,name:"SKALE | Titan Community Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),bke=oe({id:1020352220,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),vke=oe({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),X6=1,wke=oe({...Jt,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[X6]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[X6]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[X6]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[X6]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:X6}),e8=11155111,yke=oe({...Jt,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[e8]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[e8]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[e8]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[e8]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:e8}),t8=11155111,xke=oe({...Jt,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...Jt.contracts,disputeGameFactory:{[t8]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[t8]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[t8]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[t8]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:t8}),_ke=oe({id:19,name:"Songbird Canary-Network",nativeCurrency:{decimals:18,name:"Songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}}}),Eke=oe({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),Cke=oe({...b1,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),Ake=oe({...b1,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),Ske=oe({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),Ike=oe({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),Tke=oe({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),kke=oe({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),Rke=oe({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),Mke=oe({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},testnet:!1}),Pke=oe({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),Oke=oe({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io "]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),Nke=oe({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),Dke=oe({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),$ke=oe({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),Bke=oe({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://taikoscan.io",apiUrl:"https://api.taikoscan.io/api"}},contracts:{multicall3:{address:"0xcb2436774C3e191c85056d248EF4260ce5f27A9D"}}}),Lke=oe({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}},testnet:!0}),Uke=oe({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),Fke=oe({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),jke=oe({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),zke=oe({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),Hke=oe({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),qke=oe({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),Wke=oe({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://mainnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),Vke=oe({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://testnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0}),Gke=oe({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),Kke=oe({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),Zke=oe({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),Jke=oe({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),Yke=oe({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),Qke=oe({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://viewblock.io/thundercore"}},testnet:!1}),Xke=oe({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Explorer",url:"https://explorer.5ire.network"}},testnet:!0}),eRe=oe({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),tRe=oe({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),rRe=oe({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),nRe=oe({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),iRe=oe({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),sRe=oe({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),aS=11155111,aRe=oe({...Jt,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[aS]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[aS]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[aS]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:aS}),oRe=oe({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),cRe=oe({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),lRe=oe({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),uRe=oe({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),fRe=oe({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),dRe=oe({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},testnet:!1}),hRe=oe({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),pRe=oe({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),mRe=oe({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),gRe=oe({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),bRe=oe({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),vRe=oe({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),wRe=oe({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),yRe=oe({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),xRe=oe({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),r8=1,_Re=oe({...Jt,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[r8]:{address:"0x0E90dCAFBC242D2C861A20Bb20EC8E7182965a52"}},l2OutputOracle:{[r8]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[r8]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[r8]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:r8}),n8=11155111,ERe=oe({...Jt,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]},public:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[n8]:{address:"0x8cF97Ee616C986a070F5020d973b456D0120C253"}},l2OutputOracle:{[n8]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[n8]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[n8]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:n8}),CRe=oe({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),ARe=oe({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),SRe=oe({id:50,name:"XinFin Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),IRe=oe({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),TRe=oe({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),rne=oe({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),kRe=oe({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),RRe=oe({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),MRe=oe({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),PRe=oe({id:8408,name:"Zenchain Testnet",nativeCurrency:{decimals:18,name:"ZCX",symbol:"ZCX"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),ORe=oe({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),NRe=oe({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://explorer.zetachain.com"}},testnet:!1}),DRe=oe({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://athens.explorer.zetachain.com"}},testnet:!0}),$Re=oe({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),BRe=oe({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),LRe=oe({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),URe=oe({id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://zircuit1-mainnet.p2pify.com","https://zircuit1-mainnet.liquify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!1}),FRe=oe({id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287}},testnet:!0}),jRe=oe({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),zRe=oe({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),HRe=oe({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),qRe=oe({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),nne=oe({...b1,id:324,name:"ZKsync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),ine=oe({...b1,id:260,name:"ZKsync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),sne=oe({...b1,id:270,name:"ZKsync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),ane=oe({...b1,id:300,name:"ZKsync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),oS=1,WRe=oe({...Jt,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[oS]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[oS]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[oS]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:oS}),cS=11155111,VRe=oe({...Jt,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...Jt.contracts,l2OutputOracle:{[cS]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[cS]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[cS]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:cS,testnet:!0}),one=5,GRe=oe({...Jt,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...Jt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[one]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:one,testnet:!0}),cne=Object.freeze(Object.defineProperty({__proto__:null,abstractTestnet:M_e,acala:P_e,acria:O_e,aioz:N_e,alienx:D_e,alienxHalTestnet:$_e,ancient8:j_e,ancient8Sepolia:z_e,anvil:H_e,apeChain:q_e,apexTestnet:W_e,arbitrum:V_e,arbitrumGoerli:G_e,arbitrumNova:K_e,arbitrumSepolia:Z_e,areonNetwork:J_e,areonNetworkTestnet:Y_e,artelaTestnet:Q_e,assetChain:X_e,assetChainTestnet:eEe,astar:tEe,astarZkEVM:rEe,astarZkyoto:nEe,atletaOlympia:iEe,aurora:sEe,auroraTestnet:aEe,auroria:oEe,avalanche:cEe,avalancheFuji:lEe,b3:uEe,b3Sepolia:fEe,bahamut:dEe,base:hEe,baseGoerli:pEe,baseSepolia:mEe,beam:gEe,beamTestnet:bEe,bearNetworkChainMainnet:vEe,bearNetworkChainTestnet:wEe,berachainTestnet:yEe,berachainTestnetbArtio:xEe,bevmMainnet:_Ee,bifrost:EEe,bitTorrent:kEe,bitTorrentTestnet:REe,bitkub:CEe,bitkubTestnet:AEe,bitlayer:SEe,bitlayerTestnet:IEe,bitrock:TEe,blast:MEe,blastSepolia:PEe,bob:OEe,bobSepolia:$Ee,boba:NEe,bobaSepolia:DEe,botanixTestnet:BEe,bounceBit:LEe,bounceBitTestnet:UEe,bronos:FEe,bronosTestnet:jEe,bsc:zEe,bscGreenfield:HEe,bscTestnet:qEe,bsquared:WEe,bsquaredTestnet:VEe,btr:GEe,btrTestnet:KEe,bxn:ZEe,bxnTestnet:JEe,cannon:YEe,canto:QEe,celo:lCe,celoAlfajores:uCe,chang:fCe,chiliz:dCe,chips:hCe,classic:pCe,coinex:mCe,confluxESpace:gCe,confluxESpaceTestnet:bCe,coreDao:vCe,crab:wCe,cronos:yCe,cronosTestnet:xCe,cronoszkEVM:_Ce,cronoszkEVMTestnet:ECe,crossbell:CCe,curtis:ACe,cyber:SCe,cyberTestnet:ICe,darwinia:TCe,dchain:kCe,dchainTestnet:RCe,defichainEvm:MCe,defichainEvmTestnet:PCe,degen:OCe,dfk:NCe,diode:DCe,dodochainTestnet:$Ce,dogechain:BCe,dosChain:LCe,dosChainTestnet:UCe,dreyerxMainnet:FCe,dreyerxTestnet:jCe,dustboyIoT:zCe,dymension:HCe,edgeless:qCe,edgelessTestnet:WCe,edgeware:VCe,edgewareTestnet:GCe,ekta:KCe,ektaTestnet:ZCe,elastos:JCe,elastosTestnet:YCe,electroneum:QCe,electroneumTestnet:XCe,elysiumTestnet:eAe,enuls:tAe,eon:rAe,eos:nAe,eosTestnet:iAe,etherlink:sAe,etherlinkTestnet:aAe,evmos:oAe,evmosTestnet:cAe,excelonMainnet:lAe,fantom:uAe,fantomSonicTestnet:fAe,fantomTestnet:dAe,fibo:hAe,filecoin:pAe,filecoinCalibration:mAe,filecoinHyperspace:gAe,flare:bAe,flareTestnet:vAe,flowMainnet:wAe,flowPreviewnet:yAe,flowTestnet:xAe,fluence:_Ae,fluenceStage:EAe,fluenceTestnet:CAe,forma:AAe,foundry:SAe,fraxtal:IAe,fraxtalTestnet:TAe,funkiMainnet:kAe,funkiSepolia:RAe,fuse:MAe,fuseSparknet:PAe,fusion:OAe,fusionTestnet:NAe,garnet:DAe,genesys:$Ae,glideL1Protocol:BAe,glideL2Protocol:LAe,gnosis:UAe,gnosisChiado:FAe,goChain:zAe,gobi:jAe,godwoken:HAe,goerli:qAe,gravity:WAe,guruTestnet:VAe,ham:GAe,haqqMainnet:KAe,haqqTestedge2:ZAe,hardhat:JAe,harmonyOne:YAe,hashkeyTestnet:QAe,hedera:XAe,hederaPreviewnet:eSe,hederaTestnet:tSe,hela:rSe,hemiSepolia:nSe,holesky:iSe,hychain:sSe,hychainTestnet:aSe,immutableZkEvm:oSe,immutableZkEvmTestnet:cSe,inEVM:lSe,inkSepolia:uSe,iota:fSe,iotaTestnet:dSe,iotex:hSe,iotexTestnet:pSe,jbc:mSe,jbcTestnet:gSe,kaia:SSe,kairos:ISe,kakarotSepolia:vSe,kakarotStarknetSepolia:wSe,kardiaChain:ySe,karura:bSe,kava:xSe,kavaTestnet:_Se,kcc:ESe,kinto:CSe,klaytn:ASe,klaytnBaobab:TSe,koi:kSe,kroma:RSe,kromaSepolia:MSe,l3x:PSe,l3xTestnet:OSe,lavita:NSe,lightlinkPegasus:DSe,lightlinkPhoenix:$Se,linea:WSe,lineaGoerli:VSe,lineaSepolia:GSe,lineaTestnet:KSe,lisk:ZSe,liskSepolia:JSe,localhost:YSe,loop:QSe,lukso:XSe,luksoTestnet:eIe,lycan:tIe,lyra:rIe,mainnet:nIe,mandala:iIe,manta:sIe,mantaSepoliaTestnet:aIe,mantaTestnet:oIe,mantle:cIe,mantleSepoliaTestnet:lIe,mantleTestnet:uIe,mapProtocol:fIe,matchain:dIe,matchainTestnet:hIe,mekong:pIe,meld:mIe,merlin:gIe,metachain:bIe,metachainIstanbul:vIe,metalL2:wIe,meter:yIe,meterTestnet:xIe,metis:_Ie,metisGoerli:EIe,mev:CIe,mevTestnet:AIe,mint:SIe,mintSepoliaTestnet:IIe,mode:TIe,modeTestnet:kIe,moonbaseAlpha:RIe,moonbeam:MIe,moonbeamDev:PIe,moonriver:OIe,morph:NIe,morphHolesky:DIe,morphSepolia:$Ie,nautilus:BIe,neonDevnet:LIe,neonMainnet:UIe,nexi:FIe,nexilix:jIe,oasisTestnet:zIe,oasys:HIe,odysseyTestnet:qIe,okc:WIe,oortMainnetDev:VIe,opBNB:GIe,opBNBTestnet:KIe,optimism:ZIe,optimismGoerli:JIe,optimismSepolia:YIe,optopia:QIe,optopiaTestnet:XIe,orderly:eTe,orderlySepolia:tTe,otimDevnet:rTe,palm:nTe,palmTestnet:iTe,pgn:sTe,pgnTestnet:aTe,phoenix:oTe,playfiAlbireo:cTe,plinga:lTe,plumeTestnet:uTe,polygon:fTe,polygonAmoy:dTe,polygonMumbai:hTe,polygonZkEvm:pTe,polygonZkEvmCardona:mTe,polygonZkEvmTestnet:gTe,pulsechain:bTe,pulsechainV4:vTe,qMainnet:yTe,qTestnet:xTe,ql1:wTe,real:_Te,redbellyTestnet:ETe,redstone:CTe,reyaNetwork:ATe,rollux:STe,rolluxTestnet:ITe,ronin:TTe,root:kTe,rootPorcini:RTe,rootstock:MTe,rootstockTestnet:PTe,rss3:OTe,rss3Sepolia:NTe,saakuru:DTe,saigon:$Te,sanko:BTe,sapphire:LTe,sapphireTestnet:UTe,satoshiVM:FTe,satoshiVMTestnet:jTe,scroll:zTe,scrollSepolia:HTe,sei:qTe,seiDevnet:WTe,seiTestnet:VTe,sepolia:GTe,shape:KTe,shapeSepolia:ZTe,shardeumSphinx:JTe,shibarium:YTe,shibariumTestnet:QTe,shiden:XTe,shimmer:eke,shimmerTestnet:tke,silicon:rke,siliconSepolia:nke,skaleBlockBrawlers:ike,skaleCalypso:ske,skaleCalypsoTestnet:ake,skaleCryptoBlades:oke,skaleCryptoColosseum:cke,skaleEuropa:lke,skaleEuropaTestnet:uke,skaleExorde:fke,skaleHumanProtocol:dke,skaleNebula:hke,skaleNebulaTestnet:pke,skaleRazor:mke,skaleTitan:gke,skaleTitanTestnet:bke,sketchpad:vke,snax:wke,snaxTestnet:yke,soneiumMinato:xke,songbird:_ke,songbirdTestnet:Eke,sophon:Cke,sophonTestnet:Ake,spicy:Ske,step:Ike,storyTestnet:Tke,stratis:kke,superlumio:Rke,superposition:Mke,swan:Pke,swanProximaTestnet:Oke,swanSaturnTestnet:Nke,syscoin:Dke,syscoinTestnet:$ke,taiko:Bke,taikoHekla:Lke,taikoJolnir:Uke,taikoKatla:Fke,taikoTestnetSepolia:jke,taraxa:zke,taraxaTestnet:Hke,telcoinTestnet:qke,telos:Wke,telosTestnet:Vke,tenet:Gke,thaiChain:Kke,that:Zke,theta:Jke,thetaTestnet:Yke,thunderCore:Qke,thunderTestnet:Xke,tiktrixTestnet:eRe,tomb:tRe,tron:rRe,ubiq:nRe,ultron:iRe,ultronTestnet:sRe,unichainSepolia:aRe,unique:oRe,uniqueOpal:cRe,uniqueQuartz:lRe,unreal:uRe,vechain:fRe,velas:dRe,viction:hRe,victionTestnet:pRe,vision:mRe,visionTestnet:gRe,wanchain:bRe,wanchainTestnet:vRe,weaveVMAlphanet:wRe,wemix:yRe,wemixTestnet:xRe,worldchain:_Re,worldchainSepolia:ERe,x1Testnet:rne,xLayer:TRe,xLayerTestnet:rne,xai:CRe,xaiTestnet:ARe,xdc:SRe,xdcTestnet:IRe,xrSepolia:kRe,yooldoVerse:RRe,yooldoVerseTestnet:MRe,zenchainTestnet:PRe,zeniq:ORe,zetachain:NRe,zetachainAthensTestnet:DRe,zhejiang:$Re,zilliqa:BRe,zilliqaTestnet:LRe,zircuit:URe,zircuitTestnet:FRe,zkFair:jRe,zkFairTestnet:zRe,zkLinkNova:HRe,zkLinkNovaSepoliaTestnet:qRe,zkSync:nne,zkSyncInMemoryNode:ine,zkSyncLocalNode:sne,zkSyncSepoliaTestnet:ane,zksync:nne,zksyncInMemoryNode:ine,zksyncLocalNode:sne,zksyncSepoliaTestnet:ane,zora:WRe,zoraSepolia:VRe,zoraTestnet:GRe},Symbol.toStringTag,{value:"Module"})),sf={};for(const r of Object.keys(cne)){const e=cne[r];if(e.id===void 0)continue;let t="";((dve=e.rpcUrls)==null?void 0:dve.infura)!==void 0?t=e.rpcUrls.infura.http[0]:((hve=e.rpcUrls)==null?void 0:hve.alchemy)!==void 0&&(t=e.rpcUrls.alchemy.http[0]);const n={id:e.id,name:e.name,testnet:e.testnet??!1,nativeCurrency:e.nativeCurrency,hexId:"0x"+Number(e.id).toString(16),explorerUrl:((pve=e.blockExplorers)==null?void 0:pve.default.url)??"",rpcUrl:((mve=e.rpcUrls)==null?void 0:mve.default.http[0])??t};((gve=e.rpcUrls)==null?void 0:gve.default.webSocket)!==void 0&&(n.wsUrl=e.rpcUrls.default.webSocket[0]),((vve=(bve=e.rpcUrls)==null?void 0:bve.infura)==null?void 0:vve.webSocket)!==void 0&&n.wsUrl===void 0&&(n.wsUrl=e.rpcUrls.infura.webSocket[0]),((yve=(wve=e.rpcUrls)==null?void 0:wve.alchemy)==null?void 0:yve.webSocket)!==void 0&&n.wsUrl===void 0&&(n.wsUrl=e.rpcUrls.alchemy.webSocket[0]),n.wsUrl===void 0&&delete n.wsUrl,sf[r==="mainnet"?"ethereum":r]=n}const lS={add:(r,e)=>{sf[r]=e},getAll:()=>Object.values(sf),findById:r=>Object.values(sf).find(e=>e.id===r),findByKey:r=>sf[r],findByName:r=>Object.values(sf).find(e=>{var t;return(t=e.name)==null?void 0:t.includes(r)}),findByHexId:r=>Object.values(sf).find(e=>e.hexId===r),findBySymbol:r=>Object.values(sf).find(e=>e.nativeCurrency.symbol===r),getTestnets:()=>Object.values(sf).filter(r=>r.testnet??!1),getMainnets:()=>Object.values(sf).filter(r=>!(r.testnet??!1)),...sf},g3=async(r,e)=>{const t=e==null?void 0:e.network,n=async l=>{const u=await r.request(l);if((u==null?void 0:u.error)!==void 0){const f=u.error;throw f.code===-32e3?new Error(Or.RPC_TIMEOUT):new Error(f.message)}return u},i=async l=>await new Promise((u,f)=>{try{n({method:"wallet_addEthereumChain",params:[{chainId:l.hexId,chainName:l.name,rpcUrls:[l.rpcUrl],nativeCurrency:l.nativeCurrency,blockExplorerUrls:[l.explorerUrl]}]}).then(()=>{u(!0)}).catch(h=>{f(h)})}catch(h){f(h)}}),s=async l=>await new Promise((u,f)=>{const h=`0x${l.id.toString(16)}`;n({method:"wallet_switchEthereumChain",params:[{chainId:h}]}).then(()=>{u(!0)}).catch(m=>{if(m.code===4902||String(m.message).includes("wallet_addEthereumChain")){const b=lS.findById(l.id);if(b===void 0){u(!0);return}i(b).then(()=>{u(!0)}).catch(v=>{f(v)})}else{if((typeof m=="object"?m:{}).message.includes("wallet_switchEthereumChain")===!0)return;f(m)}})}),a=async()=>parseInt(await n({method:"eth_chainId"}),16);return await(async()=>await new Promise((l,u)=>{if(t===void 0){l(!0);return}try{(async()=>{await a()!==t.id?s(t).then(()=>{setTimeout(()=>{l(!0)},1e3)}).catch(h=>{u(h)}):l(!0)})()}catch(f){u(f)}}))()},v1={metaMask:"data:image/svg+xml,%3Csvg%20fill%3D%22none%22%20height%3D%2233%22%20viewBox%3D%220%200%2035%2033%22%20width%3D%2235%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%22.25%22%3E%3Cpath%20d%3D%22m32.9582%201-13.1341%209.7183%202.4424-5.72731z%22%20fill%3D%22%23e17726%22%20stroke%3D%22%23e17726%22%2F%3E%3Cg%20fill%3D%22%23e27625%22%20stroke%3D%22%23e27625%22%3E%3Cpath%20d%3D%22m2.66296%201%2013.01714%209.809-2.3254-5.81802z%22%2F%3E%3Cpath%20d%3D%22m28.2295%2023.5335-3.4947%205.3386%207.4829%202.0603%202.1436-7.2823z%22%2F%3E%3Cpath%20d%3D%22m1.27281%2023.6501%202.13055%207.2823%207.46994-2.0603-3.48166-5.3386z%22%2F%3E%3Cpath%20d%3D%22m10.4706%2014.5149-2.0786%203.1358%207.405.3369-.2469-7.969z%22%2F%3E%3Cpath%20d%3D%22m25.1505%2014.5149-5.1575-4.58704-.1688%208.05974%207.4049-.3369z%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721%204.4819-2.1639-3.8583-3.0062z%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082%204.4689%202.1639-.6105-5.1701z%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m24.7348%2028.8721-4.469-2.1639.3638%202.9025-.039%201.231z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m10.8732%2028.8721%204.1572%201.9696-.026-1.231.3508-2.9025z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m15.1084%2021.7842-3.7155-1.0884%202.6243-1.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m20.5126%2021.7842%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721.6495-5.3386-4.13117.1167z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m24.0982%2023.5335.6366%205.3386%203.4946-5.2219z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m27.2291%2017.6507-7.405.3369.6885%203.7966%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958%202.6242-1.2051%201.0913%202.2935.6885-3.7966-7.40495-.3369z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m8.392%2017.6507%203.1049%206.0513-.1039-3.0062z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m24.2412%2020.6958-.1169%203.0062%203.1049-6.0513z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m15.797%2017.9876-.6886%203.7967.8704%204.4833.1949-5.9087z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m19.8242%2017.9876-.3638%202.3584.1819%205.9216.8704-4.4833z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m20.5127%2021.7842-.8704%204.4834.6236.4406%203.8584-3.0062.1169-3.0062z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958.104%203.0062%203.8583%203.0062.6236-.4406-.8704-4.4834z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m20.5906%2030.8417.039-1.231-.3378-.2851h-4.9626l-.3248.2851.026%201.231-4.1572-1.9696%201.4551%201.1921%202.9489%202.0344h5.0536l2.962-2.0344%201.442-1.1921z%22%20fill%3D%22%23c0ac9d%22%20stroke%3D%22%23c0ac9d%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082-.6236-.4406h-3.6635l-.6236.4406-.3508%202.9025.3248-.2851h4.9626l.3378.2851z%22%20fill%3D%22%23161616%22%20stroke%3D%22%23161616%22%2F%3E%3Cpath%20d%3D%22m33.5168%2011.3532%201.1043-5.36447-1.6629-4.98873-12.6923%209.3944%204.8846%204.1205%206.8983%202.0085%201.52-1.7752-.6626-.4795%201.0523-.9588-.8054-.622%201.0523-.8034z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m1%205.98873%201.11724%205.36447-.71451.5313%201.06527.8034-.80545.622%201.05228.9588-.66255.4795%201.51997%201.7752%206.89835-2.0085%204.8846-4.1205-12.69233-9.3944z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m32.0489%2016.5234-6.8983-2.0085%202.0786%203.1358-3.1049%206.0513%204.1052-.0519h6.1318z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m10.4705%2014.5149-6.89828%202.0085-2.29944%207.1267h6.11883l4.10519.0519-3.10487-6.0513z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m19.8241%2017.9876.4417-7.5932%202.0007-5.4034h-8.9119l2.0006%205.4034.4417%207.5932.1689%202.3842.013%205.8958h3.6635l.013-5.8958z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",walletConnect:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIgaWQ9IkxheWVyXzEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHZpZXdC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yOTAiPgo8cmVjdCB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K"},KRe={id:"phantom",name:"Phantom",icon:v1.phantom,downloadLink:"https://phantom.app/",platforms:[za.BROWSER,za.MOBILE],isDetected:()=>{var r;return!!((r=window==null?void 0:window.phantom)!=null&&r.ethereum)},createDeepLink:r=>`https://phantom.app/ul/browse/${r}?ref=${r}`,isConnected:async()=>{var r,e;return!!(await((e=(r=window==null?void 0:window.phantom)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length},connect:async()=>await new Promise((r,e)=>{var n;const t=(n=window==null?void 0:window.phantom)==null?void 0:n.ethereum;try{t==null||t.request({method:"eth_requestAccounts"}).then(()=>{r(t)}).catch(i=>{e(i)})}catch(i){e(i)}})},ZRe={id:"metamask",name:"MetaMask",icon:v1.metaMask,downloadLink:"https://metamask.io/download/",platforms:[za.BROWSER,za.MOBILE],isDetected:()=>{var r;return!!((r=window==null?void 0:window.ethereum)!=null&&r.isMetaMask)},createDeepLink:r=>`https://metamask.app.link/dapp/${r}`,isConnected:async()=>!!(await(window==null?void 0:window.ethereum).request({method:"eth_accounts"})).length,connect:async r=>await new Promise((e,t)=>{const n=window==null?void 0:window.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{g3(n,r).then(()=>{e(n)}).catch(i=>{t(i)})}).catch(i=>{t(i)})}catch(i){t(i)}})},JRe={id:"okxwallet",name:"OkxWallet",icon:v1.okxWallet,downloadLink:"https://www.okx.com/download",platforms:[za.BROWSER,za.MOBILE],createDeepLink:r=>`okx://wallet/dapp/details?dappUrl=${r}`,isDetected:()=>!!(window!=null&&window.okxwallet),isConnected:async()=>{var r;return!!(await((r=window==null?void 0:window.okxwallet)==null?void 0:r.request({method:"eth_accounts"}))).length},connect:async r=>await new Promise((e,t)=>{const n=window==null?void 0:window.okxwallet;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{g3(n,r).then(()=>{e(n)}).catch(i=>{t(i)})}).catch(i=>{t(i)})}catch(i){t(i)}})},YRe={id:"xdefiwallet",name:"XdefiWallet",icon:v1.xdefiWallet,downloadLink:"https://www.xdefi.io/",platforms:[za.BROWSER],isDetected:()=>{var r;return!!((r=window==null?void 0:window.xfi)!=null&&r.ethereum)},isConnected:async()=>{var r,e;return!!(await((e=(r=window==null?void 0:window.xfi)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length},connect:async r=>await new Promise((e,t)=>{var i;const n=(i=window==null?void 0:window.xfi)==null?void 0:i.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{g3(n,r).then(()=>{e(n)}).catch(s=>{t(s)})}).catch(s=>{t(s)})}catch(s){t(s)}})},QRe={id:"trustwallet",name:"TrustWallet",icon:v1.trustWallet,downloadLink:"https://trustwallet.com/download",platforms:[za.BROWSER,za.MOBILE],isDetected:()=>{var r;return!!(((r=window==null?void 0:window.ethereum)==null?void 0:r.isTrust)??(window==null?void 0:window.trustwallet))},isConnected:async()=>{var e;const r=(e=window==null?void 0:window.ethereum)!=null&&e.isTrust?window.ethereum:window.trustwallet;return!!(await(r==null?void 0:r.request({method:"eth_accounts"}))).length},connect:async r=>await new Promise((e,t)=>{var n;try{const i=(n=window==null?void 0:window.ethereum)!=null&&n.isTrust?window.ethereum:window.trustwallet;i==null||i.request({method:"eth_requestAccounts"}).then(()=>{var s;if(((s=window==null?void 0:window.ethereum)==null?void 0:s.isTrust)!==void 0&&(r==null?void 0:r.isTestnet())===!0){e(i);return}g3(i,r).then(()=>{e(i)}).catch(a=>{t(a)})}).catch(s=>{t(s)})}catch(i){t(i)}})};class iN{constructor(e,t,n){Ae(this,"address");Ae(this,"cachedMethods",{});Ae(this,"ABI");Ae(this,"ethersContract");Ae(this,"provider");Ae(this,"ethers");this.ABI=n??[],this.address=e,this.provider=t??t0.instance,this.ethers=this.provider.ethers,this.ethersContract=this.ethers.contract(e,this.ABI,this.ethers.jsonRpc)}getAddress(){return this.address}async callMethod(e,...t){return this.ethersContract[e](...t)}async callMethodWithCache(e,...t){return this.cachedMethods[e]!==void 0?this.cachedMethods[e]:this.cachedMethods[e]=await this.callMethod(e,...t)}async getMethodData(e,...t){return this.ethersContract.interface.encodeFunctionData(e,t)}async getMethodEstimateGas(e,t,...n){return Number(await this.ethersContract[e].estimateGas(...n,{from:t}))}async createTransactionData(e,t,...n){const[i,s,a,o]=await Promise.all([this.provider.ethers.getGasPrice(),this.provider.ethers.getNonce(t),this.getMethodData(e,...n),this.getMethodEstimateGas(e,t,...n)]);return{from:t,data:a,nonce:s,gasPrice:i,gasLimit:o,value:"0x0",to:this.getAddress(),chainId:this.provider.network.id}}}const lne=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"delegator",type:"address"},{indexed:!0,internalType:"address",name:"fromDelegate",type:"address"},{indexed:!0,internalType:"address",name:"toDelegate",type:"address"}],name:"DelegateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"delegate",type:"address"},{indexed:!1,internalType:"uint256",name:"previousBalance",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newBalance",type:"uint256"}],name:"DelegateVotesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"delegatee",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"delegatee",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"delegateBySig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"delegates",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPastTotalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPastVotes",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getVotes",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}];class Ig{constructor(e,t){Ae(this,"rawData");Ae(this,"signedData");Ae(this,"wallet");Ae(this,"provider");this.rawData=e,this.provider=t??t0.instance}async sign(e){try{return this.wallet=this.provider.ethers.wallet(e),this.signedData=await this.wallet.signTransaction(this.rawData),this}catch(t){const n=t;throw n!=null&&n.shortMessage.includes("transaction from address mismatch")?new Error(Or.INVALID_PRIVATE_KEY):t}}async send(){return await this.provider.ethers.jsonRpc.send("eth_sendRawTransaction",[this.signedData])}getRawData(){return this.rawData}getSignedData(){return this.signedData}}class une extends iN{constructor(e,t,n){super(e,t,n??lne)}async getName(){return await this.callMethodWithCache("name")}async getSymbol(){return await this.callMethodWithCache("symbol")}async getBalance(e){return Number(await this.callMethod("balanceOf",e))}async getOwner(e){return await this.callMethod("ownerOf",e)}async getTokenURI(e){return await this.callMethodWithCache("tokenURI",e)}async getApproved(e){const t=await this.callMethod("getApproved",e);return t==="0x0000000000000000000000000000000000000000"?null:t}async transfer(e,t,n){return await this.transferFrom(e,e,t,n)}async transferFrom(e,t,n,i){if(await this.getBalance(t)<=0)throw new Error(Or.INSUFFICIENT_BALANCE);if(await this.getOwner(i)!==t)throw new Error(Or.UNAUTHORIZED_ADDRESS);if(e!==t&&await this.getApproved(i)!==e)throw new Error(Or.UNAUTHORIZED_ADDRESS);return new Ig(await this.createTransactionData("transferFrom",e,t,n,i))}async approve(e,t,n){if(await this.getBalance(e)<=0)throw new Error(Or.INSUFFICIENT_BALANCE);if(await this.getOwner(n)!==e)throw new Error(Or.UNAUTHORIZED_ADDRESS);return new Ig(await this.createTransactionData("approve",e,t,n))}}class XRe{constructor(e){Ae(this,"provider");this.provider=e??t0.instance}getName(){return this.provider.network.nativeCurrency.name??this.provider.network.nativeCurrency.symbol}getSymbol(){return this.provider.network.nativeCurrency.symbol}getDecimals(){return this.provider.network.nativeCurrency.decimals}async getBalance(e){const t=await this.provider.ethers.getBalance(e);return Oh(t.toString(),this.getDecimals())}async transfer(e,t,n){if(n<0)throw new Error(Or.INVALID_AMOUNT);if(n>await this.getBalance(e))throw new Error(Or.INSUFFICIENT_BALANCE);const i=s6(n,this.getDecimals()),s={data:"0x",to:t,from:e,value:i,chainId:this.provider.network.id},[a,o,l]=await Promise.all([this.provider.ethers.getGasPrice(),this.provider.ethers.getNonce(e),this.provider.ethers.getEstimateGas(s)]);return s.nonce=o,s.gasPrice=a,s.gasLimit=l,new Ig(s)}}const fne=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"success",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"remaining",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_from",type:"address"},{indexed:!0,name:"_to",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_owner",type:"address"},{indexed:!0,name:"_spender",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"Approval",type:"event"}];class dne extends iN{constructor(e,t,n){super(e,t,n??fne)}async getName(){return await this.callMethodWithCache("name")}async getSymbol(){return await this.callMethodWithCache("symbol")}async getDecimals(){return Number(await this.callMethodWithCache("decimals"))}async getBalance(e){const[t,n]=await Promise.all([this.getDecimals(),this.callMethod("balanceOf",e)]);return Oh(n,t)}async getTotalSupply(){const[e,t]=await Promise.all([this.getDecimals(),this.callMethod("totalSupply")]);return Oh(t,e)}async getAllowance(e,t){const[n,i]=await Promise.all([this.getDecimals(),await this.callMethod("allowance",e,t)]);return Oh(i,n)}async transfer(e,t,n){if(n<=0)throw new Error(Or.INVALID_AMOUNT);const i=await this.getBalance(e);if(n>i)throw new Error(Or.INSUFFICIENT_BALANCE);const s=s6(n,await this.getDecimals());return new Ig(await this.createTransactionData("transfer",e,t,s))}async transferFrom(e,t,n,i){if(i<0)throw new Error(Or.INVALID_AMOUNT);const s=await this.getBalance(t);if(i>s)throw new Error(Or.INSUFFICIENT_BALANCE);const a=await this.getAllowance(t,e);if(a===0)throw new Error(Or.UNAUTHORIZED_ADDRESS);if(i>a)throw new Error(Or.INVALID_AMOUNT);const o=s6(i,await this.getDecimals());return new Ig(await this.createTransactionData("transferFrom",e,t,n,o))}async approve(e,t,n){if(n<0)throw new Error(Or.INVALID_AMOUNT);const i=await this.getBalance(e);if(n>i)throw new Error(Or.INSUFFICIENT_BALANCE);const s=s6(n,await this.getDecimals());return new Ig(await this.createTransactionData("approve",e,t,s))}}const eMe=Object.freeze(Object.defineProperty({__proto__:null,Coin:XRe,Contract:iN,NFT:une,Token:dne},Symbol.toStringTag,{value:"Module"})),tMe={[En.TOKEN]:["0xa9059cbb","0x095ea7b3","0x23b872dd"],[En.NFT]:["0x23b872dd","0x095ea7b3","0x42842e0e","0xb88d4fde","0xf242432a","0x2eb2c2d6","0x29535c7e"]};class uS{constructor(e,t){Ae(this,"id");Ae(this,"provider");Ae(this,"ethers");Ae(this,"data");this.id=e,this.provider=t??t0.instance,this.ethers=this.provider.ethers}async getData(){var e,t;if(((e=this.data)==null?void 0:e.response)!==void 0&&((t=this.data)==null?void 0:t.receipt)!==null)return this.data;try{const n=await this.ethers.getTransaction(this.id);if(n===null)return null;const i=await this.ethers.getTransactionReceipt(this.id);return this.data={response:n,receipt:i}}catch(n){throw n instanceof Error&&String(n.message).includes("timeout")?new Error(Or.RPC_TIMEOUT):new Error(Or.RPC_REQUEST_ERROR)}}async wait(e=4e3){return await new Promise((t,n)=>{const i=async()=>{try{await this.provider.ethers.jsonRpc.waitForTransaction(this.id,1);const s=await this.getStatus();if(s!==Yn.PENDING){t(s);return}setTimeout(i,e)}catch{n(Yn.FAILED)}};i()})}getId(){return this.id}async getType(){const e=await this.getData();if(e===null)return En.GENERAL;if(await this.provider.ethers.getByteCode(e.response.to??"")==="0x"||e.response.data==="0x")return En.COIN;if(Object.entries(tMe).find(([i,s])=>s.includes(e.response.data.slice(0,10)))!==void 0){const i=new une(e.response.to??"");try{return await i.getApproved(1),En.NFT}catch{return En.TOKEN}}return En.CONTRACT}getUrl(){let e=this.provider.network.explorerUrl;return e+=e.endsWith("/")?"":"/",e+="tx/"+this.id,e}async getSigner(){const e=await this.getData();return(e==null?void 0:e.response.from)??""}async getFee(){var t,n;const e=await this.getData();return((t=e==null?void 0:e.response)==null?void 0:t.gasPrice)===void 0||((n=e==null?void 0:e.receipt)==null?void 0:n.gasUsed)===void 0?0:Oh(((e==null?void 0:e.response.gasPrice)*(e==null?void 0:e.receipt.gasUsed)).toString(),this.provider.network.nativeCurrency.decimals)}async getBlockNumber(){const e=await this.getData();return(e==null?void 0:e.response.blockNumber)??0}async getBlockTimestamp(){const e=await this.getBlockNumber(),t=await this.ethers.getBlock(e);return(t==null?void 0:t.timestamp)??0}async getBlockConfirmationCount(){const e=await this.getBlockNumber(),n=await this.ethers.getBlockNumber()-e;return n<0?0:n}async getStatus(){const e=await this.getData();return(e==null?void 0:e.response.blockNumber)!==null&&(e==null?void 0:e.receipt)!==null?(e==null?void 0:e.receipt.status)===1?Yn.CONFIRMED:Yn.FAILED:Yn.PENDING}}class fS extends uS{constructor(t,n,i){super(t,n);Ae(this,"ABI");this.ABI=i??[]}async getAddress(){const t=await this.getData();return(t==null?void 0:t.response.to)??""}async decodeData(t){if(t===void 0){const n=await this.getData();if(n===null)return null;t=n.response}return new hg(this.ABI).parseTransaction({data:t.data??"",value:t.value??0})}}class hne extends fS{constructor(e,t,n){super(e,t,n??lne)}async getReceiver(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[1]:e.args[0]}async getSender(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[0]:await this.getSigner()}async getNftId(){var e;return Number(((e=await this.decodeData())==null?void 0:e.args[2])??0)}async verifyTransfer(e,t,n){if(await this.getStatus()===Yn.PENDING)return Yn.PENDING;if(await this.getNftId()!==n)return Yn.FAILED;if(e===yn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Yn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Yn.FAILED;return Yn.CONFIRMED}}class pne extends uS{async getReceiver(){const e=await this.getData();return(e==null?void 0:e.response.to)??""}async getSender(){return await this.getSigner()}async getAmount(){const e=await this.getData(),{decimals:t}=this.provider.network.nativeCurrency;return Oh(((e==null?void 0:e.response.value)??0).toString(),t)}async verifyTransfer(e,t,n){if(await this.getStatus()===Yn.PENDING)return Yn.PENDING;if(await this.getAmount()!==n)return Yn.FAILED;if(e===yn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Yn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Yn.FAILED;return Yn.CONFIRMED}}class mne extends fS{constructor(e,t,n){super(e,t,n??fne)}async getReceiver(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[1]:e.args[0]}async getSender(){const e=await this.decodeData();return e===null?"":e.name==="transferFrom"?e.args[0]:await this.getSigner()}async getAmount(){const e=new dne(await this.getAddress()),t=await this.decodeData();return t===null?0:t.name==="transferFrom"?Oh(t.args[2].toString(),await e.getDecimals()):Oh(t.args[1].toString(),await e.getDecimals())}async verifyTransfer(e,t,n){if(await this.getStatus()===Yn.PENDING)return Yn.PENDING;if(await this.getAmount()!==n)return Yn.FAILED;if(e===yn.INCOMING){if((await this.getReceiver()).toLowerCase()!==t.toLowerCase())return Yn.FAILED}else if((await this.getSender()).toLowerCase()!==t.toLowerCase())return Yn.FAILED;return Yn.CONFIRMED}}const rMe=Object.freeze(Object.defineProperty({__proto__:null,CoinTransaction:pne,ContractTransaction:fS,NftTransaction:hne,TokenTransaction:mne,Transaction:uS},Symbol.toStringTag,{value:"Module"}));class nMe{constructor(e,t,n){Ae(this,"type");Ae(this,"provider");Ae(this,"status",!1);Ae(this,"ethers");Ae(this,"jsonRpc");Ae(this,"webSocket");Ae(this,"callbacks",[]);Ae(this,"dynamicStop",()=>{});Ae(this,"triggeredTransactions",[]);Ae(this,"filter");this.type=e,this.filter=t??{},this.provider=n??t0.instance,this.ethers=this.provider.ethers,this.jsonRpc=this.provider.ethers.jsonRpc}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[PJ[this.type]]())}getStatus(){return this.status}async on(e){if(this.webSocket===void 0){const t=await this.provider.ethers.connectWebSocket();if(typeof t=="string")throw new Error(Or.WS_CONNECTION_FAILED);this.webSocket=t}return this.start(),this.callbacks.push(e),!0}trigger(e){this.triggeredTransactions.includes(e.id)||(this.triggeredTransactions.push(e.id),this.callbacks.forEach(t=>{t(e)}))}generalProcess(){const e=async t=>{var n;if(((n=this.filter)==null?void 0:n.signer)!==void 0){const i=await this.ethers.getTransaction(t);if((i==null?void 0:i.from.toLowerCase())!==this.filter.signer.toLowerCase())return}this.trigger(new uS(t))};this.webSocket.on("pending",e),this.dynamicStop=()=>{this.webSocket.off("pending",e)}}contractProcess(){const e=this.filter;let t;e.address===void 0?t="pending":t={address:e.address};const n=s=>{if(s===null)return!1;const a={},o={};return e.signer!==void 0&&(a.signer=e.signer.toLowerCase(),o.signer=s.from.toLowerCase()),!!a6(a,o)},i=async s=>{let a;if(typeof s=="string"){if(a=await this.ethers.getTransaction(s),!n(a)||await this.ethers.getByteCode((a==null?void 0:a.to)??"")==="0x")return}else a=await this.ethers.getTransaction(s.transactionHash);n(a)&&this.trigger(new fS(a.hash))};this.webSocket.on(t,i),this.dynamicStop=()=>{this.webSocket.off(t,i)}}coinProcess(){const e=this.filter;if(e.signer!==void 0&&e.sender!==void 0&&e.signer!==e.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");const t=async n=>{var f;const i=await this.ethers.getTransaction(n);if(i===null)return;const s=e.sender??e.signer,a={},o={};if(s!==void 0&&(a.sender=s.toLowerCase(),o.sender=i.from.toLowerCase()),e.receiver!==void 0&&(a.receiver=e.receiver.toLowerCase(),o.receiver=(f=i.to)==null?void 0:f.toLowerCase()),!a6(a,o)||await this.ethers.getByteCode((i==null?void 0:i.to)??"")!=="0x")return;const u=new pne(n);e.amount!==void 0&&(await u.wait(),await u.getAmount()!==e.amount)||this.trigger(u)};this.webSocket.on("pending",t),this.dynamicStop=()=>{this.webSocket.off("pending",t)}}tokenProcess(){const e=this.filter,t={address:e.address,topics:[Gc("Transfer(address,address,uint256)"),e.sender!==void 0?Ha(e.sender,32):null,e.receiver!==void 0?Ha(e.receiver,32):null]},n=async i=>{const s=new mne(i.transactionHash),a=await s.getData();if(a===null)return;const o=await s.decodeData(a.response);if(o===null||o.name!=="transfer"&&o.name!=="transferFrom")return;const l={},u={};e.signer!==void 0&&(l.signer=e.signer.toLowerCase(),u.signer=a.response.from.toLowerCase()),a6(l,u)&&(e.amount!==void 0&&(await s.wait(),await s.getAmount()!==e.amount)||this.trigger(s))};this.webSocket.on(t,n),this.dynamicStop=()=>{this.webSocket.off(t,n)}}nftProcess(){const e=this.filter,t={address:e.address,topics:[Gc("Transfer(address,address,uint256)"),e.sender!==void 0?Ha(e.sender,32):null,e.receiver!==void 0?Ha(e.receiver,32):null,e.nftId!==void 0?Ha(`0x0${e.nftId.toString(16)}`,32):null]},n=async i=>{const s=new hne(i.transactionHash),a=await s.getData();if(a===null)return;const o=await s.decodeData(a.response);if(o===null||o.name!=="transferFrom")return;const l={},u={};e.signer!==void 0&&(l.signer=e.signer.toLowerCase(),u.signer=a.response.from.toLowerCase()),a6(l,u)&&this.trigger(s)};this.webSocket.on(t,n),this.dynamicStop=()=>{this.webSocket.off(t,n)}}}const iMe=Object.freeze(Object.defineProperty({__proto__:null,TransactionListener:nMe,TransactionSigner:Ig},Symbol.toStringTag,{value:"Module"})),sMe=Symbol(),gne=Object.getPrototypeOf,sN=new WeakMap,aMe=r=>r&&(sN.has(r)?sN.get(r):gne(r)===Object.prototype||gne(r)===Array.prototype),oMe=r=>aMe(r)&&r[sMe]||null,bne=(r,e=!0)=>{sN.set(r,e)},dS={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},aN=r=>typeof r=="object"&&r!==null,w1=new WeakMap,i8=new WeakSet,cMe=(r=Object.is,e=(u,f)=>new Proxy(u,f),t=u=>aN(u)&&!i8.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},i=new WeakMap,s=(u,f,h=n)=>{const m=i.get(u);if((m==null?void 0:m[0])===f)return m[1];const b=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return bne(b,!0),i.set(u,[f,b]),Reflect.ownKeys(u).forEach(v=>{if(Object.getOwnPropertyDescriptor(b,v))return;const C=Reflect.get(u,v),R={value:C,enumerable:!0,configurable:!0};if(i8.has(C))bne(C,!1);else if(C instanceof Promise)delete R.value,R.get=()=>h(C);else if(w1.has(C)){const[k,P]=w1.get(C);R.value=s(k,P(),h)}Object.defineProperty(b,v,R)}),Object.preventExtensions(b)},a=new WeakMap,o=[1,1],l=u=>{if(!aN(u))throw new Error("object required");const f=a.get(u);if(f)return f;let h=o[0];const m=new Set,b=(V,te=++o[0])=>{h!==te&&(h=te,m.forEach(D=>D(V,te)))};let v=o[1];const C=(V=++o[1])=>(v!==V&&!m.size&&(v=V,k.forEach(([te])=>{const D=te[1](V);D>h&&(h=D)})),h),R=V=>(te,D)=>{const x=[...te];x[1]=[V,...x[1]],b(x,D)},k=new Map,P=(V,te)=>{if((dS?"production":void 0)!=="production"&&k.has(V))throw new Error("prop listener already exists");if(m.size){const D=te[3](R(V));k.set(V,[te,D])}else k.set(V,[te])},N=V=>{var te;const D=k.get(V);D&&(k.delete(V),(te=D[1])==null||te.call(D))},$=V=>(m.add(V),m.size===1&&k.forEach(([D,x],y)=>{if((dS?"production":void 0)!=="production"&&x)throw new Error("remove already exists");const p=D[3](R(y));k.set(y,[D,p])}),()=>{m.delete(V),m.size===0&&k.forEach(([D,x],y)=>{x&&(x(),k.set(y,[D]))})}),j=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),U=e(j,{deleteProperty(V,te){const D=Reflect.get(V,te);N(te);const x=Reflect.deleteProperty(V,te);return x&&b(["delete",[te],D]),x},set(V,te,D,x){const y=Reflect.has(V,te),p=Reflect.get(V,te,x);if(y&&(r(p,D)||a.has(D)&&r(p,a.get(D))))return!0;N(te),aN(D)&&(D=oMe(D)||D);let g=D;if(D instanceof Promise)D.then(_=>{D.status="fulfilled",D.value=_,b(["resolve",[te],_])}).catch(_=>{D.status="rejected",D.reason=_,b(["reject",[te],_])});else{!w1.has(D)&&t(D)&&(g=l(D));const _=!i8.has(g)&&w1.get(g);_&&P(te,_)}return Reflect.set(V,te,g,x),b(["set",[te],D,p]),!0}});a.set(u,U);const L=[j,C,s,$];return w1.set(U,L),Reflect.ownKeys(u).forEach(V=>{const te=Object.getOwnPropertyDescriptor(u,V);"value"in te&&(U[V]=u[V],delete te.value,delete te.writable),Object.defineProperty(j,V,te)}),U})=>[l,w1,i8,r,e,t,n,i,s,a,o],[lMe]=cMe();function Ei(r={}){return lMe(r)}function ms(r,e,t){const n=w1.get(r);(dS?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i;const s=[],a=n[3];let o=!1;const u=a(f=>{s.push(f),i||(i=Promise.resolve().then(()=>{i=void 0,o&&e(s.splice(0))}))});return o=!0,()=>{o=!1,u()}}function oN(r,e){const t=w1.get(r);(dS?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,i,s]=t;return s(n,i(),e)}function y1(r){return i8.add(r),r}function Lo(r,e,t,n){let i=r[e];return ms(r,()=>{const s=r[e];Object.is(i,s)||t(i=s)})}const cN="https://secure.walletconnect.com",vne=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],Hs={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:cN,SECURE_SITE_DASHBOARD:`${cN}/dashboard`,SECURE_SITE_FAVICON:`${cN}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1},rr={isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(r,e=""){return r==null?void 0:r.id.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){const r=window.navigator.userAgent.toLowerCase();return rr.isMobile()&&r.includes("android")},isIos(){const r=window.navigator.userAgent.toLowerCase();return rr.isMobile()&&(r.includes("iphone")||r.includes("ipad"))},isClient(){return typeof window<"u"},isPairingExpired(r){return r?r-Date.now()<=Hs.TEN_SEC_MS:!0},isAllowedRetry(r){return Date.now()-r>=Hs.ONE_SEC_MS},copyToClopboard(r){navigator.clipboard.writeText(r)},getPairingExpiry(){return Date.now()+Hs.FOUR_MINUTES_MS},getPlainAddress(r){return r.split(":")[2]},async wait(r){return new Promise(e=>{setTimeout(e,r)})},debounce(r,e=500){let t;return(...n)=>{function i(){r(...n)}t&&clearTimeout(t),t=setTimeout(i,e)}},isHttpUrl(r){return r.startsWith("http://")||r.startsWith("https://")},formatNativeUrl(r,e){if(rr.isHttpUrl(r))return this.formatUniversalUrl(r,e);let t=r;t.includes("://")||(t=r.replaceAll("/","").replaceAll(":",""),t=`${t}://`),t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},formatUniversalUrl(r,e){if(!rr.isHttpUrl(r))return this.formatNativeUrl(r,e);let t=r;t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},openHref(r,e,t){window.open(r,e,t||"noreferrer noopener")},async preloadImage(r){const e=new Promise((t,n)=>{const i=new Image;i.onload=t,i.onerror=n,i.crossOrigin="anonymous",i.src=r});return Promise.race([e,rr.wait(2e3)])},formatBalance(r,e){var n;let t;if(r==="0")t="0.000";else if(typeof r=="string"){const i=Number(r);i&&(t=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return t?`${t} ${e??""}`:`0.000 ${e??""}`},formatBalance2(r,e){var n;let t;if(r==="0")t="0";else if(typeof r=="string"){const i=Number(r);i&&(t=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:t??"0",rest:t==="0"?"000":"",symbol:e}},isRestrictedRegion(){try{const{timeZone:r}=new Intl.DateTimeFormat().resolvedOptions(),e=r.toUpperCase();return Hs.RESTRICTED_TIMEZONES.includes(e)}catch{return!1}},getApiUrl(){return rr.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com"},getBlockchainApiUrl(){return rr.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"},getAnalyticsUrl(){return rr.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com"},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,r=>{const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})},parseError(r){var e,t;return typeof r=="string"?r:typeof((t=(e=r==null?void 0:r.issues)==null?void 0:e[0])==null?void 0:t.message)=="string"?r.issues[0].message:r instanceof Error?r.message:"Unknown error"},sortRequestedNetworks(r,e=[]){const t={};return e&&r&&(r.forEach((n,i)=>{t[n]=i}),e.sort((n,i)=>{const s=t[n.id],a=t[i.id];return s!==void 0&&a!==void 0?s-a:s!==void 0?-1:a!==void 0?1:0})),e},calculateBalance(r){let e=0;for(const t of r)e+=t.value??0;return e},formatTokenBalance(r){const e=r.toFixed(2),[t,n]=e.split(".");return{dollars:t,pennies:n}},isAddress(r){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)||/^(?:0x)?[0-9A-F]{40}$/iu.test(r))return!0}else return!1;return!1}};class lN{constructor({baseUrl:e}){this.baseUrl=e}async get({headers:e,signal:t,...n}){const i=this.createUrl(n);return(await fetch(i,{method:"GET",headers:e,signal:t,cache:"no-cache"})).json()}async getBlob({headers:e,signal:t,...n}){const i=this.createUrl(n);return(await fetch(i,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await fetch(s,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:t}){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),n}}const Va=Ei({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),pr={state:Va,subscribeKey(r,e){return Lo(Va,r,e)},setProjectId(r){Va.projectId=r},setAllWallets(r){Va.allWallets=r},setIncludeWalletIds(r){Va.includeWalletIds=r},setExcludeWalletIds(r){Va.excludeWalletIds=r},setFeaturedWalletIds(r){Va.featuredWalletIds=r},setTokens(r){Va.tokens=r},setTermsConditionsUrl(r){Va.termsConditionsUrl=r},setPrivacyPolicyUrl(r){Va.privacyPolicyUrl=r},setCustomWallets(r){Va.customWallets=r},setIsSiweEnabled(r){Va.isSiweEnabled=r},setEnableAnalytics(r){Va.enableAnalytics=r},setSdkVersion(r){Va.sdkVersion=r},setMetadata(r){Va.metadata=r},setOnrampEnabled(r){Va.enableOnramp=r},setWalletFeaturesEnabled(r){Va.enableWalletFeatures=r}},uMe={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},fMe=rr.getBlockchainApiUrl(),eu=new lN({baseUrl:fMe}),Uo={fetchIdentity({address:r}){return eu.get({path:`/v1/identity/${r}`,params:{projectId:pr.state.projectId}})},fetchTransactions({account:r,projectId:e,cursor:t,onramp:n,signal:i}){const s=t?{cursor:t}:{};return eu.get({path:`/v1/account/${r}/history?projectId=${e}${n?`&onramp=${n}`:""}`,params:s,signal:i})},fetchConvertTokens({projectId:r,chainId:e}){return eu.get({path:`/v1/convert/tokens?projectId=${r}&chainId=${e}`})},fetchTokenPrice({projectId:r,addresses:e}){return eu.post({path:"/v1/fungible/price",body:{projectId:r,currency:"usd",addresses:e},headers:{"Content-Type":"application/json"}})},fetchConvertAllowance({projectId:r,tokenAddress:e,userAddress:t}){const{sdkType:n,sdkVersion:i}=pr.state;return eu.get({path:`/v1/convert/allowance?projectId=${r}&tokenAddress=${e}&userAddress=${t}`,headers:{"Content-Type":"application/json","x-sdk-type":n,"x-sdk-version":i}})},fetchGasPrice({projectId:r,chainId:e}){const{sdkType:t,sdkVersion:n}=pr.state;return eu.get({path:`/v1/convert/gas-price?projectId=${r}&chainId=${e}`,headers:{"Content-Type":"application/json","x-sdk-type":t,"x-sdk-version":n}})},generateConvertCalldata({amount:r,from:e,projectId:t,to:n,userAddress:i}){return eu.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:r,eip155:{slippage:Hs.CONVERT_SLIPPAGE_TOLERANCE},from:e,projectId:t,to:n,userAddress:i}})},generateApproveCalldata({from:r,projectId:e,to:t,userAddress:n}){const{sdkType:i,sdkVersion:s}=pr.state;return eu.get({path:`/v1/convert/build-approve?projectId=${e}&userAddress=${n}&from=${r}&to=${t}`,headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":s}})},async getBalance(r,e){const{sdkType:t,sdkVersion:n}=pr.state;return eu.get({path:`/v1/account/${r}/balance`,headers:{"x-sdk-type":t,"x-sdk-version":n},params:{currency:"usd",projectId:pr.state.projectId,chainId:e}})},async generateOnRampURL({destinationWallets:r,partnerUserId:e,defaultNetwork:t,purchaseAmount:n,paymentAmount:i}){return(await eu.post({path:`/v1/generators/onrampurl?projectId=${pr.state.projectId}`,body:{destinationWallets:r,defaultNetwork:t,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url},async getOnrampOptions(){try{return await eu.get({path:`/v1/onramp/options?projectId=${pr.state.projectId}`})}catch{return uMe}},async getOnrampQuote({purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}){try{return await eu.post({path:`/v1/onramp/quote?projectId=${pr.state.projectId}`,body:{purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}})}catch{return{coinbaseFee:{amount:t,currency:e.id},networkFee:{amount:t,currency:e.id},paymentSubtotal:{amount:t,currency:e.id},paymentTotal:{amount:t,currency:e.id},purchaseAmount:{amount:t,currency:e.id},quoteId:"mocked-quote-id"}}}},s0=Ei({message:"",variant:"success",open:!1}),bn={state:s0,subscribeKey(r,e){return Lo(s0,r,e)},showSuccess(r){s0.message=r,s0.variant="success",s0.open=!0},showError(r){const e=rr.parseError(r);s0.message=e,s0.variant="error",s0.open=!0},hide(){s0.open=!1}};function dMe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wne={exports:{}},Is=wne.exports={},pd,md;function uN(){throw new Error("setTimeout has not been defined")}function fN(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?pd=setTimeout:pd=uN}catch{pd=uN}try{typeof clearTimeout=="function"?md=clearTimeout:md=fN}catch{md=fN}})();function yne(r){if(pd===setTimeout)return setTimeout(r,0);if((pd===uN||!pd)&&setTimeout)return pd=setTimeout,setTimeout(r,0);try{return pd(r,0)}catch{try{return pd.call(null,r,0)}catch{return pd.call(this,r,0)}}}function hMe(r){if(md===clearTimeout)return clearTimeout(r);if((md===fN||!md)&&clearTimeout)return md=clearTimeout,clearTimeout(r);try{return md(r)}catch{try{return md.call(null,r)}catch{return md.call(this,r)}}}var a0=[],b3=!1,Tg,hS=-1;function pMe(){!b3||!Tg||(b3=!1,Tg.length?a0=Tg.concat(a0):hS=-1,a0.length&&xne())}function xne(){if(!b3){var r=yne(pMe);b3=!0;for(var e=a0.length;e;){for(Tg=a0,a0=[];++hS1)for(var t=1;tn.id===r.id)||(e.unshift(r),e.length>2&&e.pop(),localStorage.setItem(Ene,JSON.stringify(e)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const r=localStorage.getItem(Ene);return r?JSON.parse(r):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(r){try{localStorage.setItem(Cne,r)}catch{console.info("Unable to set Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(Cne)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(r){try{localStorage.setItem(Ane,r)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(Ane)}catch{console.info("Unable to get Connected Connector")}}},gMe=rr.getAnalyticsUrl(),bMe=new lN({baseUrl:gMe}),vMe=["MODAL_CREATED"],v3=Ei({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),Cr={state:v3,subscribe(r){return ms(v3,()=>r(v3))},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=pr.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},async _sendAnalyticsEvent(r){try{if(vMe.includes(r.data.event)||typeof window>"u")return;await bMe.post({path:"/e",headers:Cr._getApiHeaders(),body:{eventId:rr.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:r.timestamp,props:r.data}})}catch{}},sendEvent(r){v3.timestamp=Date.now(),v3.data=r,pr.state.enableAnalytics&&Cr._sendAnalyticsEvent(v3)}},Yi=Ei({transactions:[],coinbaseTransactions:{},transactionsByYear:{},loading:!1,empty:!1,next:void 0}),yo={state:Yi,subscribe(r){return ms(Yi,()=>r(Yi))},async fetchTransactions(r,e){const{projectId:t}=pr.state;if(!t||!r)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");Yi.loading=!0;try{const n=await Uo.fetchTransactions({account:r,projectId:t,cursor:Yi.next,onramp:e}),i=this.filterSpamTransactions(n.data),s=[...Yi.transactions,...i];Yi.loading=!1,e==="coinbase"?Yi.coinbaseTransactions=this.groupTransactionsByYearAndMonth(Yi.coinbaseTransactions,n.data):(Yi.transactions=s,Yi.transactionsByYear=this.groupTransactionsByYearAndMonth(Yi.transactionsByYear,i)),Yi.empty=s.length===0,Yi.next=n.next?n.next:void 0}catch{Cr.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:r,projectId:t,cursor:Yi.next}}),bn.showError("Failed to fetch transactions"),Yi.loading=!1,Yi.empty=!0,Yi.next=void 0}},groupTransactionsByYearAndMonth(r={},e=[]){const t=r;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),a=t[i]??{},l=(a[s]??[]).filter(u=>u.id!==n.id);t[i]={...a,[s]:[...l,n].sort((u,f)=>new Date(f.metadata.minedAt).getTime()-new Date(u.metadata.minedAt).getTime())}}),t},filterSpamTransactions(r){return r.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},clearCursor(){Yi.next=void 0},resetTransactions(){Yi.transactions=[],Yi.transactionsByYear={},Yi.loading=!1,Yi.empty=!1,Yi.next=void 0}},ya=Ei({wcError:!1,buffering:!1}),Gr={state:ya,subscribeKey(r,e){return Lo(ya,r,e)},_getClient(){if(!ya._client)throw new Error("ConnectionController client not set");return ya._client},setClient(r){ya._client=y1(r)},connectWalletConnect(){ya.wcPromise=this._getClient().connectWalletConnect(r=>{ya.wcUri=r,ya.wcPairingExpiry=rr.getPairingExpiry()}),Ts.setConnectedConnector("WALLET_CONNECT")},async connectExternal(r){var e,t;await((t=(e=this._getClient()).connectExternal)==null?void 0:t.call(e,r)),Ts.setConnectedConnector(r.type)},async signMessage(r){return this._getClient().signMessage(r)},parseUnits(r,e){return this._getClient().parseUnits(r,e)},formatUnits(r,e){return this._getClient().formatUnits(r,e)},async sendTransaction(r){return this._getClient().sendTransaction(r)},async estimateGas(r){return this._getClient().estimateGas(r)},checkInstalled(r){var e,t;return(t=(e=this._getClient()).checkInstalled)==null?void 0:t.call(e,r)},resetWcConnection(){ya.wcUri=void 0,ya.wcPairingExpiry=void 0,ya.wcPromise=void 0,ya.wcLinking=void 0,ya.recentWallet=void 0,yo.resetTransactions(),Ts.deleteWalletConnectDeepLink()},setWcLinking(r){ya.wcLinking=r},setWcError(r){ya.wcError=r,ya.buffering=!1},setRecentWallet(r){ya.recentWallet=r},setBuffering(r){ya.buffering=r},async disconnect(){await this._getClient().disconnect(),this.resetWcConnection()}},s8=Ei({loading:!1,open:!1,selectedNetworkId:void 0}),kg={state:s8,subscribe(r){return ms(s8,()=>r(s8))},set(r){Object.assign(s8,{...s8,...r})}};var Sne={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(ut,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",a="second",o="minute",l="hour",u="day",f="week",h="month",m="quarter",b="year",v="date",C="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|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,P={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(p){var g=["th","st","nd","rd"],_=p%100;return"["+p+(g[(_-20)%10]||g[_]||g[0])+"]"}},N=function(p,g,_){var S=String(p);return!S||S.length>=g?p:""+Array(g+1-S.length).join(_)+p},$={s:N,z:function(p){var g=-p.utcOffset(),_=Math.abs(g),S=Math.floor(_/60),T=_%60;return(g<=0?"+":"-")+N(S,2,"0")+":"+N(T,2,"0")},m:function p(g,_){if(g.date()<_.date())return-p(_,g);var S=12*(_.year()-g.year())+(_.month()-g.month()),T=g.clone().add(S,h),I=_-T<0,E=g.clone().add(S+(I?-1:1),h);return+(-(S+(_-T)/(I?T-E:E-T))||0)},a:function(p){return p<0?Math.ceil(p)||0:Math.floor(p)},p:function(p){return{M:h,y:b,w:f,d:u,D:v,h:l,m:o,s:a,ms:s,Q:m}[p]||String(p||"").toLowerCase().replace(/s$/,"")},u:function(p){return p===void 0}},j="en",G={};G[j]=P;var U="$isDayjsObject",L=function(p){return p instanceof x||!(!p||!p[U])},V=function p(g,_,S){var T;if(!g)return j;if(typeof g=="string"){var I=g.toLowerCase();G[I]&&(T=I),_&&(G[I]=_,T=I);var E=g.split("-");if(!T&&E.length>1)return p(E[0])}else{var M=g.name;G[M]=g,T=M}return!S&&T&&(j=T),T||!S&&j},te=function(p,g){if(L(p))return p.clone();var _=typeof g=="object"?g:{};return _.date=p,_.args=arguments,new x(_)},D=$;D.l=V,D.i=L,D.w=function(p,g){return te(p,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var x=function(){function p(_){this.$L=V(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[U]=!0}var g=p.prototype;return g.parse=function(_){this.$d=function(S){var T=S.date,I=S.utc;if(T===null)return new Date(NaN);if(D.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var E=T.match(R);if(E){var M=E[2]-1||0,A=(E[7]||"0").substring(0,3);return I?new Date(Date.UTC(E[1],M,E[3]||1,E[4]||0,E[5]||0,E[6]||0,A)):new Date(E[1],M,E[3]||1,E[4]||0,E[5]||0,E[6]||0,A)}}return new Date(T)}(_),this.init()},g.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},g.$utils=function(){return D},g.isValid=function(){return this.$d.toString()!==C},g.isSame=function(_,S){var T=te(_);return this.startOf(S)<=T&&T<=this.endOf(S)},g.isAfter=function(_,S){return te(_)0,G<=j.r||!j.r){G<=1&&$>0&&(j=P[$-1]);var U=k[j.l];b&&(G=b(""+G)),C=typeof U=="string"?U.replace("%d",G):U(G,f,j.l,R);break}}if(f)return C;var L=R?k.future:k.past;return typeof L=="function"?L(C):L.replace("%s",C)},s.to=function(u,f){return o(u,f,this,!0)},s.from=function(u,f){return o(u,f,this)};var l=function(u){return u.$u?i.utc():i()};s.toNow=function(u){return this.to(l(this),u)},s.fromNow=function(u){return this.from(l(this),u)}}})})(Tne);var _Me=Tne.exports;const EMe=Vu(_Me);w3.extend(EMe),w3.extend(xMe),w3.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%s sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}});const hN={getYear(r=new Date().toISOString()){return w3(r).year()},getRelativeDateFromNow(r){return w3(r).fromNow(!0)},formatDate(r,e="DD MMM"){return w3(r).format(e)}},a8={caipNetworkIdToNumber(r){return r?Number(r.split(":")[1]):void 0}},Ga={bigNumber(r){return new ns(r)},multiply(r,e){if(r===void 0||e===void 0)return ns(0);const t=new ns(r),n=new ns(e);return t.multipliedBy(n)}},bi=Ei({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),dr={state:bi,subscribe(r){return ms(bi,()=>r(bi))},subscribeKey(r,e){return Lo(bi,r,e)},_getClient(){if(!bi._client)throw new Error("NetworkController client not set");return bi._client},setClient(r){bi._client=y1(r)},setCaipNetwork(r){bi.caipNetwork=r,kg.set({selectedNetworkId:r==null?void 0:r.id}),this.state.allowUnsupportedChain||this.checkIfSupportedNetwork()},setDefaultCaipNetwork(r){bi.caipNetwork=r,kg.set({selectedNetworkId:r==null?void 0:r.id}),bi.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(r){bi.requestedCaipNetworks=r},setAllowUnsupportedChain(r){bi.allowUnsupportedChain=r},setSmartAccountEnabledNetworks(r){bi.smartAccountEnabledNetworks=r},getRequestedCaipNetworks(){const{approvedCaipNetworkIds:r,requestedCaipNetworks:e}=bi,t=r,n=e;return rr.sortRequestedNetworks(t,n)},async getApprovedCaipNetworksData(){const r=await this._getClient().getApprovedCaipNetworksData();bi.supportsAllNetworks=r.supportsAllNetworks,bi.approvedCaipNetworkIds=r.approvedCaipNetworkIds},async switchActiveNetwork(r){await this._getClient().switchCaipNetwork(r),bi.caipNetwork=r,r&&Cr.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:r.id}})},checkIfSupportedNetwork(){var r;bi.isUnsupportedChain=!((r=bi.requestedCaipNetworks)!=null&&r.some(e=>{var t;return e.id===((t=bi.caipNetwork)==null?void 0:t.id)})),bi.isUnsupportedChain&&this.showUnsupportedChainUI()},checkIfSmartAccountEnabled(){var e,t;const r=a8.caipNetworkIdToNumber((e=bi.caipNetwork)==null?void 0:e.id);return r?!!((t=bi.smartAccountEnabledNetworks)!=null&&t.includes(r)):!1},resetNetwork(){bi.isDefaultCaipNetwork||(bi.caipNetwork=void 0),bi.approvedCaipNetworkIds=void 0,bi.supportsAllNetworks=!0,bi.smartAccountEnabledNetworks=[]},showUnsupportedChainUI(){setTimeout(()=>{Xr.open({view:"UnsupportedChain"})},300)}},o8={async getTokenList(){var t;return(await Uo.fetchConvertTokens({chainId:(t=dr.state.caipNetwork)==null?void 0:t.id,projectId:pr.state.projectId})).tokens.map(n=>({...n,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0}))},async fetchGasPrice(){const r=pr.state.projectId,e=dr.state.caipNetwork;return e?await Uo.fetchGasPrice({projectId:r,chainId:e.id}):null},async fetchConvertAllowance({tokenAddress:r,userAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n}){const i=pr.state.projectId,s=await Uo.fetchConvertAllowance({projectId:i,tokenAddress:r,userAddress:e});if(s!=null&&s.allowance&&t&&n){const a=Gr.parseUnits(t,n);return BigInt(s.allowance)>=a}return!1},async getMyTokensWithBalance(){const r=zt.state.address,e=dr.state.caipNetwork;if(!r||!e)return[];const n=(await Uo.getBalance(r,e.id)).balances;return this.mapBalancesToConvertTokens(n)},mapBalancesToConvertTokens(r){return r.map(e=>{var t;return{symbol:e.symbol,name:e.name,address:e!=null&&e.address?e.address:`${(t=dr.state.caipNetwork)==null?void 0:t.id}:${Hs.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1,quantity:e.quantity,price:e.price,value:e.value}})}},Ui=Ei({view:"Connect",history:["Connect"],transactionStack:[]}),it={state:Ui,subscribeKey(r,e){return Lo(Ui,r,e)},pushTransactionStack(r){Ui.transactionStack.push(r)},popTransactionStack(r){var t,n;const e=Ui.transactionStack.pop();e&&(r?(this.goBack(),(t=e==null?void 0:e.onCancel)==null||t.call(e)):(e.goBack?this.goBack():e.view&&this.reset(e.view),(n=e==null?void 0:e.onSuccess)==null||n.call(e)))},push(r,e){r!==Ui.view&&(Ui.view=r,Ui.history.push(r),Ui.data=e)},reset(r){Ui.view=r,Ui.history=[r]},replace(r,e){Ui.history.length>1&&Ui.history.at(-1)!==r&&(Ui.view=r,Ui.history[Ui.history.length-1]=r,Ui.data=e)},goBack(){if(Ui.history.length>1){Ui.history.pop();const[r]=Ui.history.slice(-1);r&&(Ui.view=r)}},goBackToIndex(r){if(Ui.history.length>1){Ui.history=Ui.history.slice(0,r+1);const[e]=Ui.history.slice(-1);e&&(Ui.view=e)}}},CMe=15e4,Et=Ei({initialized:!1,loading:!1,loadingPrices:!1,approvalTransaction:void 0,convertTransaction:void 0,transactionError:void 0,transactionLoading:!1,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",inputError:void 0,slippage:Hs.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:BigInt(0),gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0}),gr={state:Et,subscribe(r){return ms(Et,()=>r(Et))},subscribeKey(r,e){return Lo(Et,r,e)},getParams(){var t,n,i,s,a;const{address:r}=zt.state,e=`${(t=dr.state.caipNetwork)==null?void 0:t.id}:${Hs.NATIVE_TOKEN_ADDRESS}`;if(!r)throw new Error("No address found to swap the tokens from.");return{networkAddress:e,fromAddress:r,fromCaipAddress:zt.state.caipAddress,sourceTokenAddress:(n=Et.sourceToken)==null?void 0:n.address,toTokenAddress:(i=Et.toToken)==null?void 0:i.address,toTokenAmount:Et.toTokenAmount,toTokenDecimals:(s=Et.toToken)==null?void 0:s.decimals,sourceTokenAmount:Et.sourceTokenAmount,sourceTokenDecimals:(a=Et.sourceToken)==null?void 0:a.decimals}},setLoading(r){Et.loading=r},setSourceToken(r){r&&(Et.sourceToken=r,this.setTokenValues(r.address,"sourceToken"))},setSourceTokenAmount(r){const{sourceTokenAddress:e}=this.getParams();Et.sourceTokenAmount=r,e&&this.setTokenValues(e,"sourceToken")},setToToken(r){const{sourceTokenAddress:e,sourceTokenAmount:t}=this.getParams();if(!r){Et.toTokenAmount="0",Et.toTokenPriceInUSD=0;return}Et.toToken=r,this.setTokenValues(r.address,"toToken"),e&&t&&this.makeChecks()},setToTokenAmount(r){const{toTokenAddress:e}=this.getParams();Et.toTokenAmount=r,e&&this.setTokenValues(e,"toToken")},async setTokenValues(r,e){let t=Et.tokensPriceMap[r]||0;t||(t=await this.getAddressPrice(r)),e==="sourceToken"?Et.sourceTokenPriceInUSD=t:e==="toToken"&&(Et.toTokenPriceInUSD=t)},switchTokens(){const r=Et.toToken?{...Et.toToken}:void 0,e=Et.sourceToken?{...Et.sourceToken}:void 0;this.setSourceToken(r),this.setToToken(e),this.setSourceTokenAmount(Et.toTokenAmount||"0"),gr.convertTokens()},resetTokens(){Et.tokens=void 0,Et.popularTokens=void 0,Et.myTokensWithBalance=void 0,Et.initialized=!1},resetValues(){var t;const{networkAddress:r}=this.getParams(),e=(t=Et.tokens)==null?void 0:t.find(n=>n.address===r);this.setSourceToken(e),Et.sourceTokenPriceInUSD=Et.tokensPriceMap[r]||0,Et.sourceTokenAmount="0",this.setToToken(void 0),Et.gasPriceInUSD=0},clearError(){Et.transactionError=void 0},async initializeState(){Et.initialized||(await this.fetchTokens(),Et.initialized=!0)},async fetchTokens(){var t;const{networkAddress:r}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();const e=(t=Et.tokens)==null?void 0:t.find(n=>n.address===r);e&&this.setSourceToken(e)},async getTokenList(){const r=await o8.getTokenList();Et.tokens=r,Et.popularTokens=r.sort((e,t)=>e.symbolt.symbol?1:0).filter(e=>!!Hs.POPULAR_TOKENS.includes(e.symbol),{}),Et.suggestedTokens=r.filter(e=>!!Hs.SUGGESTED_TOKENS.includes(e.symbol),{})},async getAddressPrice(r){var l,u;const e=Et.tokensPriceMap[r];if(e)return e;const n=(await Uo.fetchTokenPrice({projectId:pr.state.projectId,addresses:[r]})).fungibles||[],i=[...Et.tokens||[],...Et.myTokensWithBalance||[]],s=(l=i==null?void 0:i.find(f=>f.address===r))==null?void 0:l.symbol,a=((u=n.find(f=>f.symbol===s))==null?void 0:u.price)||"0",o=parseFloat(a);return Et.tokensPriceMap[r]=o,o},async getNetworkTokenPrice(){var i;const{networkAddress:r}=this.getParams(),t=(i=(await Uo.fetchTokenPrice({projectId:pr.state.projectId,addresses:[r]})).fungibles)==null?void 0:i[0],n=(t==null?void 0:t.price)||"0";Et.tokensPriceMap[r]=parseFloat(n),Et.networkPrice=n},async getMyTokensWithBalance(){const r=await o8.getMyTokensWithBalance();r&&(await this.getInitialGasPrice(),this.setBalances(r))},setBalances(r){const{networkAddress:e}=this.getParams(),t=r.find(n=>n.address===e);r.forEach(n=>{Et.tokensPriceMap[n.address]=n.price||0}),Et.myTokensWithBalance=r,Et.networkBalanceInUSD=t?Ga.multiply(t.quantity.numeric,t.price).toString():"0"},async getInitialGasPrice(){const r=await o8.fetchGasPrice();if(!r)return;const e=r.instant,t=BigInt(e),n=BigInt(CMe),i=this.calculateGasPriceInUSD(n,t);Et.gasPriceInUSD=i},async refreshConvertValues(){const{fromAddress:r,toTokenDecimals:e,toTokenAddress:t}=this.getParams();if(r&&t&&e&&!Et.loading){const n=await this.getTransaction();this.setTransactionDetails(n)}},calculateGasPriceInEther(r,e){const t=e*r;return Number(t)/1e18},calculateGasPriceInUSD(r,e){const t=this.calculateGasPriceInEther(r,e);return Ga.bigNumber(Et.networkPrice).multipliedBy(t).toNumber()},calculatePriceImpact(r,e){const t=Et.sourceTokenAmount,n=Et.sourceTokenPriceInUSD,i=Et.toTokenPriceInUSD;return Ga.bigNumber(t).multipliedBy(n).plus(e).dividedBy(r).minus(i).dividedBy(i).multipliedBy(100).toNumber()},calculateMaxSlippage(){const r=Ga.bigNumber(Et.slippage).dividedBy(100);return Ga.multiply(Et.sourceTokenAmount,r).toNumber()},async convertTokens(){const{sourceTokenAddress:r,toTokenAddress:e}=this.getParams();!r||!e||await this.makeChecks()},async makeChecks(){const{toTokenDecimals:r,toTokenAddress:e}=this.getParams();if(!r||!e)return;Et.loading=!0;const t=await this.getTransaction();this.setTransactionDetails(t),Et.loading=!1},async getTransaction(){const{fromCaipAddress:r,sourceTokenAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n}=this.getParams();if(!r||!e||!t||parseFloat(t)===0||!n)return;const i=await o8.fetchConvertAllowance({userAddress:r,tokenAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n});let s;return i?(Et.approvalTransaction=void 0,s=await this.createConvert(),Et.convertTransaction=s):(Et.convertTransaction=void 0,s=await this.createTokenAllowance(),Et.approvalTransaction=s),s},getToAmount(){const{sourceTokenDecimals:r}=this.getParams(),t=10**(r||18);return(Et.sourceTokenPriceInUSD&&Et.toTokenPriceInUSD&&Et.sourceTokenAmount?Ga.bigNumber(Et.sourceTokenAmount).multipliedBy(Et.sourceTokenPriceInUSD).dividedBy(Et.toTokenPriceInUSD):Ga.bigNumber(0)).multipliedBy(t).toString()},async createTokenAllowance(){const{fromCaipAddress:r,fromAddress:e,sourceTokenAddress:t,toTokenAddress:n}=this.getParams();if(!r||!n)return;if(!t)throw new Error(">>> createTokenAllowance - No source token address found.");const i=await Uo.generateApproveCalldata({projectId:pr.state.projectId,from:t,to:n,userAddress:r}),s=await Gr.estimateGas({address:e,to:rr.getPlainAddress(i.tx.to),data:i.tx.data}),a=this.getToAmount();return{data:i.tx.data,to:rr.getPlainAddress(i.tx.from),gas:s,gasPrice:BigInt(i.tx.eip155.gasPrice),value:BigInt(i.tx.value),toAmount:a}},async sendTransactionForApproval(r){const{fromAddress:e}=this.getParams();Et.transactionLoading=!0,it.pushTransactionStack({view:null,goBack:!0});try{await Gr.sendTransaction({address:e,to:r.to,data:r.data,value:BigInt(r.value),gasPrice:BigInt(r.gasPrice)}),Et.approvalTransaction=void 0,Et.transactionLoading=!1,this.makeChecks()}catch(t){const n=t;Et.transactionError=n==null?void 0:n.shortMessage,Et.transactionLoading=!1}},async createConvert(){const{networkAddress:r,fromCaipAddress:e,sourceTokenAddress:t,sourceTokenDecimals:n,sourceTokenAmount:i,toTokenAddress:s}=this.getParams();if(!(!e||!i||!t||!s||!n))try{const a=Gr.parseUnits(i,n).toString(),o=await Uo.generateConvertCalldata({projectId:pr.state.projectId,userAddress:e,from:t,to:s,amount:a}),l=t===r,u=this.getToAmount(),f=BigInt(o.tx.eip155.gas),h=BigInt(o.tx.eip155.gasPrice),m={data:o.tx.data,to:rr.getPlainAddress(o.tx.to),gas:f,gasPrice:h,value:BigInt(l?a:"0"),toAmount:u};return Et.gasPriceInUSD=this.calculateGasPriceInUSD(f,h),m}catch{return}},async sendTransactionForConvert(r){if(!r)return;const{fromAddress:e}=this.getParams();Et.transactionLoading=!0,it.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){gr.resetValues()}});try{const t=await Gr.sendTransaction({address:e,to:r.to,data:r.data,gas:r.gas,gasPrice:BigInt(r.gasPrice),value:r.value});return Et.transactionLoading=!1,setTimeout(()=>{this.resetValues(),this.getMyTokensWithBalance()},1e3),t}catch(t){const n=t;Et.transactionError=n==null?void 0:n.shortMessage,Et.transactionLoading=!1,bn.showError((n==null?void 0:n.shortMessage)||"Transaction error");return}},getToTokenValues(r,e){const{toTokenAddress:t}=this.getParams();if(!t)return{toTokenAmount:"0",toTokenPriceInUSD:0};const n=Ga.bigNumber(r).dividedBy(10**e).toFixed(20),i=Et.tokensPriceMap[t]||"0",s=Ga.bigNumber(i).toNumber();return{toTokenAmount:n,toTokenPriceInUSD:s}},isInsufficientNetworkTokenForGas(){return Ga.bigNumber(Ga.bigNumber(Et.gasPriceInUSD||"0")).isGreaterThan(Et.networkBalanceInUSD)},setTransactionDetails(r){const{toTokenAddress:e,toTokenDecimals:t}=this.getParams();if(!r||!e||!t)return;this.isInsufficientNetworkTokenForGas()?Et.inputError="Insufficient balance":Et.inputError=void 0;const{toTokenAmount:i,toTokenPriceInUSD:s}=this.getToTokenValues(r.toAmount,t);Et.toTokenAmount=i,Et.toTokenPriceInUSD=s,Et.gasPriceInUSD=this.calculateGasPriceInUSD(r.gas,r.gasPrice),Et.priceImpact=this.calculatePriceImpact(Et.toTokenAmount,Et.gasPriceInUSD),Et.maxSlippage=this.calculateMaxSlippage()}},Ln=Ei({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1}),zt={state:Ln,subscribe(r){return ms(Ln,()=>r(Ln))},subscribeKey(r,e){return Lo(Ln,r,e)},setIsConnected(r){Ln.isConnected=r},setCaipAddress(r){Ln.caipAddress=r,Ln.address=r?rr.getPlainAddress(r):void 0},setBalance(r,e){Ln.balance=r,Ln.balanceSymbol=e},setProfileName(r){Ln.profileName=r},setProfileImage(r){Ln.profileImage=r},setAddressExplorerUrl(r){Ln.addressExplorerUrl=r},setSmartAccountDeployed(r){Ln.smartAccountDeployed=r},setCurrentTab(r){Ln.currentTab=r},setTokenBalance(r){r&&(Ln.tokenBalance=y1(r))},setConnectedWalletInfo(r){Ln.connectedWalletInfo=r},setPreferredAccountType(r){Ln.preferredAccountType=r},async fetchTokenBalance(){try{if(Ln.address){const r=await Uo.getBalance(Ln.address);this.setTokenBalance(r.balances),gr.setBalances(o8.mapBalancesToConvertTokens(r.balances))}}catch{bn.showError("Failed to fetch token balance")}},resetAccount(){Ln.isConnected=!1,Ln.smartAccountDeployed=!1,Ln.currentTab=0,Ln.caipAddress=void 0,Ln.address=void 0,Ln.balance=void 0,Ln.balanceSymbol=void 0,Ln.profileName=void 0,Ln.profileImage=void 0,Ln.addressExplorerUrl=void 0,Ln.tokenBalance=[],Ln.connectedWalletInfo=void 0,Ln.preferredAccountType=void 0}},af=Ei({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),xa={state:af,subscribeNetworkImages(r){return ms(af.networkImages,()=>r(af.networkImages))},subscribeKey(r,e){return Lo(af,r,e)},subscribe(r){return ms(af,()=>r(af))},setWalletImage(r,e){af.walletImages[r]=e},setNetworkImage(r,e){af.networkImages[r]=e},setConnectorImage(r,e){af.connectorImages[r]=e},setTokenImage(r,e){af.tokenImages[r]=e},setCurrencyImage(r,e){af.currencyImages[r]=e}},Rg=Ei({themeMode:"dark",themeVariables:{}}),ea={state:Rg,subscribe(r){return ms(Rg,()=>r(Rg))},setThemeMode(r){Rg.themeMode=r;try{const e=Un.getEmailConnector();e&&e.provider.syncTheme({themeMode:ea.getSnapshot().themeMode})}catch{console.info("Unable to sync theme to email connector")}},setThemeVariables(r){Rg.themeVariables={...Rg.themeVariables,...r};try{const e=Un.getEmailConnector();e&&e.provider.syncTheme({themeVariables:ea.getSnapshot().themeVariables})}catch{console.info("Unable to sync theme to email connector")}},getSnapshot(){return oN(Rg)}},x1=Ei({connectors:[]}),Un={state:x1,subscribeKey(r,e){return Lo(x1,r,e)},setConnectors(r){x1.connectors=r.map(e=>y1(e))},addConnector(r){var e,t;if(x1.connectors.push(y1(r)),r.id==="w3mEmail"){const n=r,i=oN(pr.state);(t=(e=n==null?void 0:n.provider)==null?void 0:e.syncDappData)==null||t.call(e,{metadata:i.metadata,sdkVersion:i.sdkVersion,projectId:i.projectId}),n.provider.syncTheme({themeMode:ea.getSnapshot().themeMode,themeVariables:ea.getSnapshot().themeVariables})}},getEmailConnector(){return x1.connectors.find(r=>r.type==="EMAIL")},getAnnouncedConnectorRdns(){return x1.connectors.filter(r=>r.type==="ANNOUNCED").map(r=>{var e;return(e=r.info)==null?void 0:e.rdns})},getConnectors(){return x1.connectors},getConnector(r,e){return x1.connectors.find(t=>{var n;return t.explorerId===r||((n=t.info)==null?void 0:n.rdns)===e})}},AMe=rr.getApiUrl(),Fo=new lN({baseUrl:AMe}),SMe="40",kne="4",Ka=Ei({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1}),$r={state:Ka,subscribeKey(r,e){return Lo(Ka,r,e)},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=pr.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},async _fetchWalletImage(r){const e=`${Fo.baseUrl}/getWalletImage/${r}`,t=await Fo.getBlob({path:e,headers:$r._getApiHeaders()});xa.setWalletImage(r,URL.createObjectURL(t))},async _fetchNetworkImage(r){const e=`${Fo.baseUrl}/public/getAssetImage/${r}`,t=await Fo.getBlob({path:e,headers:$r._getApiHeaders()});xa.setNetworkImage(r,URL.createObjectURL(t))},async _fetchConnectorImage(r){const e=`${Fo.baseUrl}/public/getAssetImage/${r}`,t=await Fo.getBlob({path:e,headers:$r._getApiHeaders()});xa.setConnectorImage(r,URL.createObjectURL(t))},async _fetchCurrencyImage(r){const e=`${Fo.baseUrl}/public/getCurrencyImage/${r}`,t=await Fo.getBlob({path:e,headers:$r._getApiHeaders()});xa.setCurrencyImage(r,URL.createObjectURL(t))},async _fetchTokenImage(r){const e=`${Fo.baseUrl}/public/getTokenImage/${r}`,t=await Fo.getBlob({path:e,headers:$r._getApiHeaders()});xa.setTokenImage(r,URL.createObjectURL(t))},async fetchNetworkImages(){const{requestedCaipNetworks:r}=dr.state,e=r==null?void 0:r.map(({imageId:t})=>t).filter(Boolean);e&&await Promise.allSettled(e.map(t=>$r._fetchNetworkImage(t)))},async fetchConnectorImages(){const{connectors:r}=Un.state,e=r.map(({imageId:t})=>t).filter(Boolean);await Promise.allSettled(e.map(t=>$r._fetchConnectorImage(t)))},async fetchCurrencyImages(r=[]){await Promise.allSettled(r.map(e=>$r._fetchCurrencyImage(e)))},async fetchTokenImages(r=[]){await Promise.allSettled(r.map(e=>$r._fetchTokenImage(e)))},async fetchFeaturedWallets(){const{featuredWalletIds:r}=pr.state;if(r!=null&&r.length){const{data:e}=await Fo.get({path:"/getWallets",headers:$r._getApiHeaders(),params:{page:"1",entries:r!=null&&r.length?String(r.length):kne,include:r==null?void 0:r.join(",")}});e.sort((n,i)=>r.indexOf(n.id)-r.indexOf(i.id));const t=e.map(n=>n.image_id).filter(Boolean);await Promise.allSettled(t.map(n=>$r._fetchWalletImage(n))),Ka.featured=e}},async fetchRecommendedWallets(){var u;const{includeWalletIds:r,excludeWalletIds:e,featuredWalletIds:t}=pr.state,n=[...e??[],...t??[]].filter(Boolean),{data:i,count:s}=await Fo.get({path:"/getWallets",headers:$r._getApiHeaders(),params:{page:"1",chains:(u=dr.state.caipNetwork)==null?void 0:u.id,entries:kne,include:r==null?void 0:r.join(","),exclude:n==null?void 0:n.join(",")}}),a=Ts.getRecentWallets(),o=i.map(f=>f.image_id).filter(Boolean),l=a.map(f=>f.image_id).filter(Boolean);await Promise.allSettled([...o,...l].map(f=>$r._fetchWalletImage(f))),Ka.recommended=i,Ka.count=s??0},async fetchWallets({page:r}){var l;const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:n}=pr.state,i=[...Ka.recommended.map(({id:u})=>u),...t??[],...n??[]].filter(Boolean),{data:s,count:a}=await Fo.get({path:"/getWallets",headers:$r._getApiHeaders(),params:{page:String(r),entries:SMe,chains:(l=dr.state.caipNetwork)==null?void 0:l.id,include:e==null?void 0:e.join(","),exclude:i.join(",")}}),o=s.map(u=>u.image_id).filter(Boolean);await Promise.allSettled([...o.map(u=>$r._fetchWalletImage(u)),rr.wait(300)]),Ka.wallets=[...Ka.wallets,...s],Ka.count=a>Ka.count?a:Ka.count,Ka.page=r},async searchWallet({search:r}){var s;const{includeWalletIds:e,excludeWalletIds:t}=pr.state;Ka.search=[];const{data:n}=await Fo.get({path:"/getWallets",headers:$r._getApiHeaders(),params:{page:"1",entries:"100",search:r,chains:(s=dr.state.caipNetwork)==null?void 0:s.id,include:e==null?void 0:e.join(","),exclude:t==null?void 0:t.join(",")}}),i=n.map(a=>a.image_id).filter(Boolean);await Promise.allSettled([...i.map(a=>$r._fetchWalletImage(a)),rr.wait(300)]),Ka.search=n},async reFetchWallets(){Ka.page=1,Ka.wallets=[],await $r.fetchFeaturedWallets(),await $r.fetchRecommendedWallets()},prefetch(){const r=[$r.fetchFeaturedWallets(),$r.fetchRecommendedWallets(),$r.fetchNetworkImages(),$r.fetchConnectorImages()];pr.state.enableAnalytics===void 0&&r.push($r.fetchAnalyticsConfig()),Ka.prefetchPromise=Promise.race([Promise.allSettled(r),rr.wait(3e3)])},async fetchAnalyticsConfig(){const{isAnalyticsEnabled:r}=await Fo.get({path:"/getAnalyticsConfig",headers:$r._getApiHeaders()});pr.setEnableAnalytics(r)}},Mg=Ei({loading:!1,open:!1}),Xr={state:Mg,subscribe(r){return ms(Mg,()=>r(Mg))},subscribeKey(r,e){return Lo(Mg,r,e)},async open(r){await $r.state.prefetchPromise;const e=zt.state.isConnected;r!=null&&r.view?it.reset(r.view):e?it.reset("Account"):it.reset("Connect"),Mg.open=!0,kg.set({open:!0}),Cr.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:e}})},close(){const r=zt.state.isConnected;Mg.open=!1,kg.set({open:!1}),Cr.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:r}})},setLoading(r){Mg.loading=r,kg.set({loading:r})}},c8={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},pN={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},zn=Ei({providers:vne,selectedProvider:null,error:null,purchaseCurrency:c8,paymentCurrency:pN,purchaseCurrencies:[c8],paymentCurrencies:[],quotesLoading:!1}),Hn={state:zn,subscribe(r){return ms(zn,()=>r(zn))},subscribeKey(r,e){return Lo(zn,r,e)},setSelectedProvider(r){zn.selectedProvider=r},setPurchaseCurrency(r){zn.purchaseCurrency=r},setPaymentCurrency(r){zn.paymentCurrency=r},setPurchaseAmount(r){this.state.purchaseAmount=r},setPaymentAmount(r){this.state.paymentAmount=r},async getAvailableCurrencies(){const r=await Uo.getOnrampOptions();zn.purchaseCurrencies=r.purchaseCurrencies,zn.paymentCurrencies=r.paymentCurrencies,zn.paymentCurrency=r.paymentCurrencies[0]||pN,zn.purchaseCurrency=r.purchaseCurrencies[0]||c8,await $r.fetchCurrencyImages(r.paymentCurrencies.map(e=>e.id)),await $r.fetchTokenImages(r.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var r,e;zn.quotesLoading=!0;try{const t=await Uo.getOnrampQuote({purchaseCurrency:zn.purchaseCurrency,paymentCurrency:zn.paymentCurrency,amount:((r=zn.paymentAmount)==null?void 0:r.toString())||"0",network:(e=zn.purchaseCurrency)==null?void 0:e.symbol});return zn.quotesLoading=!1,zn.purchaseAmount=Number(t.purchaseAmount.amount),t}catch(t){return zn.error=t.message,zn.quotesLoading=!1,null}finally{zn.quotesLoading=!1}},resetState(){zn.providers=vne,zn.selectedProvider=null,zn.error=null,zn.purchaseCurrency=c8,zn.paymentCurrency=pN,zn.purchaseCurrencies=[c8],zn.paymentCurrencies=[],zn.paymentAmount=void 0,zn.purchaseAmount=void 0,zn.quotesLoading=!1}},vc=Ei({}),jo={state:vc,subscribe(r){return ms(vc,()=>r(vc))},subscribeKey(r,e){return Lo(vc,r,e)},setToken(r){r&&(vc.token=y1(r))},setTokenAmount(r){vc.sendTokenAmount=r},setReceiverAddress(r){vc.receiverAddress=r},setReceiverProfileImageUrl(r){vc.receiverProfileImageUrl=r},setReceiverProfileName(r){vc.receiverProfileName=r},resetSend(){vc.token=void 0,vc.sendTokenAmount=void 0,vc.receiverAddress=void 0,vc.receiverProfileImageUrl=void 0,vc.receiverProfileName=void 0}},Qn={getWalletImage(r){if(r!=null&&r.image_url)return r==null?void 0:r.image_url;if(r!=null&&r.image_id)return xa.state.walletImages[r.image_id]},getNetworkImage(r){if(r!=null&&r.imageUrl)return r==null?void 0:r.imageUrl;if(r!=null&&r.imageId)return xa.state.networkImages[r.imageId]},getConnectorImage(r){if(r!=null&&r.imageUrl)return r.imageUrl;if(r!=null&&r.imageId)return xa.state.connectorImages[r.imageId]}},mN={goBackOrCloseModal(){it.state.history.length>1?it.goBack():Xr.close()},navigateAfterNetworkSwitch(){const{history:r}=it.state,e=r.findIndex(t=>t==="Networks");e>=1?it.goBackToIndex(e-1):Xr.close()}};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const BA=globalThis,dN=BA.ShadowRoot&&(BA.ShadyCSS===void 0||BA.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pN=Symbol(),ree=new WeakMap;let nee=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==pN)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(dN&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=ree.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ree.set(t,e))}return e}toString(){return this.cssText}};const Zh=r=>new nee(typeof r=="string"?r:r+"",void 0,pN),Ze=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new nee(t,r,pN)},$xe=(r,e)=>{if(dN)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const n=document.createElement("style"),i=BA.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},iee=dN?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Zh(t)})(r):r;/** + */const pS=globalThis,gN=pS.ShadowRoot&&(pS.ShadyCSS===void 0||pS.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bN=Symbol(),Rne=new WeakMap;let Mne=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==bN)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(gN&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=Rne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Rne.set(t,e))}return e}toString(){return this.cssText}};const gd=r=>new Mne(typeof r=="string"?r:r+"",void 0,bN),Ze=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new Mne(t,r,bN)},IMe=(r,e)=>{if(gN)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const n=document.createElement("style"),i=pS.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},Pne=gN?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return gd(t)})(r):r;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:Bxe,defineProperty:Lxe,getOwnPropertyDescriptor:Uxe,getOwnPropertyNames:Fxe,getOwnPropertySymbols:jxe,getPrototypeOf:zxe}=Object,Fp=globalThis,see=Fp.trustedTypes,Hxe=see?see.emptyScript:"",gN=Fp.reactiveElementPolyfillSupport,U4=(r,e)=>r,LA={toAttribute(r,e){switch(e){case Boolean:r=r?Hxe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},mN=(r,e)=>!Bxe(r,e),oee={attribute:!0,type:String,converter:LA,reflect:!1,hasChanged:mN};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Fp.litPropertyMetadata??(Fp.litPropertyMetadata=new WeakMap);let yv=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oee){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Lxe(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:s}=Uxe(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const a=i==null?void 0:i.call(this);s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oee}static _$Ei(){if(this.hasOwnProperty(U4("elementProperties")))return;const e=zxe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(U4("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U4("properties"))){const t=this.properties,n=[...Fxe(t),...jxe(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(iee(i))}else e!==void 0&&t.push(iee(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $xe(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const o=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:LA).toAttribute(t,n.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:LA;this._$Em=i,this[i]=a.fromAttribute(t,o.type),this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??mN)(this[e],t))return;this.P(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};yv.elementStyles=[],yv.shadowRootOptions={mode:"open"},yv[U4("elementProperties")]=new Map,yv[U4("finalized")]=new Map,gN==null||gN({ReactiveElement:yv}),(Fp.reactiveElementVersions??(Fp.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:TMe,defineProperty:kMe,getOwnPropertyDescriptor:RMe,getOwnPropertyNames:MMe,getOwnPropertySymbols:PMe,getPrototypeOf:OMe}=Object,_1=globalThis,One=_1.trustedTypes,NMe=One?One.emptyScript:"",vN=_1.reactiveElementPolyfillSupport,l8=(r,e)=>r,mS={toAttribute(r,e){switch(e){case Boolean:r=r?NMe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},wN=(r,e)=>!TMe(r,e),Nne={attribute:!0,type:String,converter:mS,reflect:!1,hasChanged:wN};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_1.litPropertyMetadata??(_1.litPropertyMetadata=new WeakMap);let y3=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Nne){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&kMe(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:s}=RMe(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){const o=i==null?void 0:i.call(this);s.call(this,a),this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Nne}static _$Ei(){if(this.hasOwnProperty(l8("elementProperties")))return;const e=OMe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(l8("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(l8("properties"))){const t=this.properties,n=[...MMe(t),...PMe(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(Pne(i))}else e!==void 0&&t.push(Pne(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return IMe(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const a=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:mS).toAttribute(t,n.type);this._$Em=e,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(e,t){var s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=n.getPropertyOptions(i),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:mS;this._$Em=i,this[i]=o.fromAttribute(t,a.type),this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??wN)(this[e],t))return;this.P(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,a]of this._$Ep)this[s]=a;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,a]of i)a.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],a)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};y3.elementStyles=[],y3.shadowRootOptions={mode:"open"},y3[l8("elementProperties")]=new Map,y3[l8("finalized")]=new Map,vN==null||vN({ReactiveElement:y3}),(_1.reactiveElementVersions??(_1.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const F4=globalThis,UA=F4.trustedTypes,aee=UA?UA.createPolicy("lit-html",{createHTML:r=>r}):void 0,cee="$lit$",jp=`lit$${Math.random().toFixed(9).slice(2)}$`,lee="?"+jp,qxe=`<${lee}>`,zg=document,j4=()=>zg.createComment(""),z4=r=>r===null||typeof r!="object"&&typeof r!="function",uee=Array.isArray,Wxe=r=>uee(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",bN=`[ -\f\r]`,H4=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hee=/-->/g,fee=/>/g,Hg=RegExp(`>|${bN}(?:([^\\s"'>=/]+)(${bN}*=${bN}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),dee=/'/g,pee=/"/g,gee=/^(?:script|style|textarea|title)$/i,mee=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ce=mee(1),At=mee(2),qg=Symbol.for("lit-noChange"),_s=Symbol.for("lit-nothing"),bee=new WeakMap,Wg=zg.createTreeWalker(zg,129);function wee(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return aee!==void 0?aee.createHTML(e):e}const Vxe=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":"",o=H4;for(let a=0;a"?(o=i??H4,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?Hg:h[3]==='"'?pee:dee):o===pee||o===dee?o=Hg:o===hee||o===fee?o=H4:(o=Hg,i=void 0);const w=o===Hg&&r[a+1].startsWith("/>")?" ":"";s+=o===H4?l+qxe:p>=0?(n.push(u),l.slice(0,p)+cee+l.slice(p)+jp+w):l+jp+(p===-2?a:w)}return[wee(r,s+(r[t]||"")+(e===2?"":"")),n]};let FA=class{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[u,h]=Vxe(e,t);if(this.el=FA.createElement(u,n),Wg.currentNode=this.el.content,t===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Wg.nextNode())!==null&&l.length0){i.textContent=UA?UA.emptyScript:"";for(let w=0;w2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=_s}_$AI(e,t=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=xv(this,e,t,0),o=!z4(e)||e!==this._$AH&&e!==qg,o&&(this._$AH=e);else{const a=e;let l,u;for(e=s[0],l=0;l{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new jA(e.insertBefore(j4(),s),s,void 0,t??{})}return i._$AI(r),i};/** + */const u8=globalThis,gS=u8.trustedTypes,Dne=gS?gS.createPolicy("lit-html",{createHTML:r=>r}):void 0,$ne="$lit$",E1=`lit$${Math.random().toFixed(9).slice(2)}$`,Bne="?"+E1,DMe=`<${Bne}>`,Pg=document,f8=()=>Pg.createComment(""),d8=r=>r===null||typeof r!="object"&&typeof r!="function",yN=Array.isArray,$Me=r=>yN(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",xN=`[ +\f\r]`,h8=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lne=/-->/g,Une=/>/g,Og=RegExp(`>|${xN}(?:([^\\s"'>=/]+)(${xN}*=${xN}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Fne=/'/g,jne=/"/g,zne=/^(?:script|style|textarea|title)$/i,Hne=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),le=Hne(1),_t=Hne(2),Ng=Symbol.for("lit-noChange"),ks=Symbol.for("lit-nothing"),qne=new WeakMap,Dg=Pg.createTreeWalker(Pg,129);function Wne(r,e){if(!yN(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Dne!==void 0?Dne.createHTML(e):e}const BMe=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":e===3?"":"",a=h8;for(let o=0;o"?(a=i??h8,h=-1):f[1]===void 0?h=-2:(h=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?Og:f[3]==='"'?jne:Fne):a===jne||a===Fne?a=Og:a===Lne||a===Une?a=h8:(a=Og,i=void 0);const b=a===Og&&r[o+1].startsWith("/>")?" ":"";s+=a===h8?l+DMe:h>=0?(n.push(u),l.slice(0,h)+$ne+l.slice(h)+E1+b):l+E1+(h===-2?o:b)}return[Wne(r,s+(r[t]||"")+(e===2?"":e===3?"":"")),n]};let _N=class Nve{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,a=0;const o=e.length-1,l=this.parts,[u,f]=BMe(e,t);if(this.el=Nve.createElement(u,n),Dg.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=Dg.nextNode())!==null&&l.length0){i.textContent=gS?gS.emptyScript:"";for(let b=0;b2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ks}_$AI(e,t=this,n,i){const s=this.strings;let a=!1;if(s===void 0)e=x3(this,e,t,0),a=!d8(e)||e!==this._$AH&&e!==Ng,a&&(this._$AH=e);else{const o=e;let l,u;for(e=s[0],l=0;l{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new EN(e.insertBefore(f8(),s),s,void 0,t??{})}return i._$AI(r),i};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */let Fe=class extends yv{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qxe(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return qg}};Fe._$litElement$=!0,Fe.finalized=!0,(pge=globalThis.litElementHydrateSupport)==null||pge.call(globalThis,{LitElement:Fe});const vN=globalThis.litElementPolyfillSupport;vN==null||vN({LitElement:Fe}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.5");const vee=At` + */let He=class extends y3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=HMe(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Ng}};He._$litElement$=!0,He.finalized=!0,(xve=globalThis.litElementHydrateSupport)==null||xve.call(globalThis,{LitElement:He});const AN=globalThis.litElementPolyfillSupport;AN==null||AN({LitElement:He}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");const Vne=_t` -`,yee=At` +`,Gne=_t` -`;let q4,zp,Hp;function xee(r,e){q4=document.createElement("style"),zp=document.createElement("style"),Hp=document.createElement("style"),q4.textContent=_v(r).core.cssText,zp.textContent=_v(r).dark.cssText,Hp.textContent=_v(r).light.cssText,document.head.appendChild(q4),document.head.appendChild(zp),document.head.appendChild(Hp),yN(e)}function yN(r){zp&&Hp&&(r==="light"?(zp.removeAttribute("media"),Hp.media="enabled"):(Hp.removeAttribute("media"),zp.media="enabled"))}function _ee(r){q4&&zp&&Hp&&(q4.textContent=_v(r).core.cssText,zp.textContent=_v(r).dark.cssText,Hp.textContent=_v(r).light.cssText)}function _v(r){return{core:Ze` +`;let p8,C1,A1;function Kne(r,e){p8=document.createElement("style"),C1=document.createElement("style"),A1=document.createElement("style"),p8.textContent=_3(r).core.cssText,C1.textContent=_3(r).dark.cssText,A1.textContent=_3(r).light.cssText,document.head.appendChild(p8),document.head.appendChild(C1),document.head.appendChild(A1),SN(e)}function SN(r){C1&&A1&&(r==="light"?(C1.removeAttribute("media"),A1.media="enabled"):(A1.removeAttribute("media"),C1.media="enabled"))}function Zne(r){p8&&C1&&A1&&(p8.textContent=_3(r).core.cssText,C1.textContent=_3(r).dark.cssText,A1.textContent=_3(r).light.cssText)}function _3(r){return{core:Ze` @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); :root { - --w3m-color-mix-strength: ${Zh(r!=null&&r["--w3m-color-mix-strength"]?`${r["--w3m-color-mix-strength"]}%`:"0%")}; - --w3m-font-family: ${Zh((r==null?void 0:r["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; - --w3m-font-size-master: ${Zh((r==null?void 0:r["--w3m-font-size-master"])||"10px")}; - --w3m-border-radius-master: ${Zh((r==null?void 0:r["--w3m-border-radius-master"])||"4px")}; - --w3m-z-index: ${Zh((r==null?void 0:r["--w3m-z-index"])||999)}; + --w3m-color-mix-strength: ${gd(r!=null&&r["--w3m-color-mix-strength"]?`${r["--w3m-color-mix-strength"]}%`:"0%")}; + --w3m-font-family: ${gd((r==null?void 0:r["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; + --w3m-font-size-master: ${gd((r==null?void 0:r["--w3m-font-size-master"])||"10px")}; + --w3m-border-radius-master: ${gd((r==null?void 0:r["--w3m-border-radius-master"])||"4px")}; + --w3m-z-index: ${gd((r==null?void 0:r["--w3m-z-index"])||999)}; --wui-font-family: var(--w3m-font-family); @@ -474,8 +491,8 @@ ${this._compileErrors().join(` } `,light:Ze` :root { - --w3m-color-mix: ${Zh((r==null?void 0:r["--w3m-color-mix"])||"#fff")}; - --w3m-accent: ${Zh((r==null?void 0:r["--w3m-accent"])||"#47a1ff")}; + --w3m-color-mix: ${gd((r==null?void 0:r["--w3m-color-mix"])||"#fff")}; + --w3m-accent: ${gd((r==null?void 0:r["--w3m-accent"])||"#47a1ff")}; --w3m-default: #fff; --wui-color-modal-bg-base: #191a1a; @@ -564,8 +581,8 @@ ${this._compileErrors().join(` } `,dark:Ze` :root { - --w3m-color-mix: ${Zh((r==null?void 0:r["--w3m-color-mix"])||"#000")}; - --w3m-accent: ${Zh((r==null?void 0:r["--w3m-accent"])||"#3396ff")}; + --w3m-color-mix: ${gd((r==null?void 0:r["--w3m-color-mix"])||"#000")}; + --w3m-accent: ${gd((r==null?void 0:r["--w3m-accent"])||"#3396ff")}; --w3m-default: #000; --wui-color-modal-bg-base: #fff; @@ -652,7 +669,7 @@ ${this._compileErrors().join(` --wui-gray-glass-080: rgba(0, 0, 0, 0.8); --wui-gray-glass-090: rgba(0, 0, 0, 0.9); } - `}}const ar=Ze` + `}}const lr=Ze` *, *::after, *::before, @@ -668,7 +685,7 @@ ${this._compileErrors().join(` font-family: var(--wui-font-family); backface-visibility: hidden; } -`,en=Ze` +`,sn=Ze` button, a { cursor: pointer; @@ -798,7 +815,7 @@ ${this._compileErrors().join(` outline: none; appearance: none; } -`,xN=Ze` +`,IN=Ze` .wui-color-inherit { color: var(--wui-color-inherit); } @@ -870,7 +887,7 @@ ${this._compileErrors().join(` .wui-bg-color-fg-300 { background-color: var(--wui-color-fg-300); } -`;function Xxe(r,e){const{kind:t,elements:n}=e;return{kind:t,elements:n,finisher(i){customElements.get(r)||customElements.define(r,i)}}}function e7e(r,e){return customElements.get(r)||customElements.define(r,e),e}function Le(r){return function(t){return typeof t=="function"?e7e(r,t):Xxe(r,t)}}const t7e=Ze` +`;function qMe(r,e){const{kind:t,elements:n}=e;return{kind:t,elements:n,finisher(i){customElements.get(r)||customElements.define(r,i)}}}function WMe(r,e){return customElements.get(r)||customElements.define(r,e),e}function Fe(r){return function(t){return typeof t=="function"?WMe(r,t):qMe(r,t)}}const VMe=Ze` :host { display: block; border-radius: clamp(0px, var(--wui-border-radius-l), 44px); @@ -878,15 +895,15 @@ ${this._compileErrors().join(` background-color: var(--wui-color-modal-bg); overflow: hidden; } -`;var r7e=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let HA=class extends Fe{render(){return ce``}};HA.styles=[ar,t7e],HA=r7e([Le("wui-card")],HA);/** +`;var GMe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let vS=class extends He{render(){return le``}};vS.styles=[lr,VMe],vS=GMe([Fe("wui-card")],vS);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const n7e={attribute:!0,type:String,converter:LA,reflect:!1,hasChanged:mN},i7e=(r=n7e,e,t)=>{const{kind:n,metadata:i}=t;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(t.name,r),n==="accessor"){const{name:o}=t;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,l,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(n==="setter"){const{name:o}=t;return function(a){const l=this[o];e.call(this,a),this.requestUpdate(o,l,r)}}throw Error("Unsupported decorator location: "+n)};function pe(r){return(e,t)=>typeof t=="object"?i7e(r,e,t):((n,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,o?{...n,wrapped:!0}:n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(r,e,t)}/** + */const KMe={attribute:!0,type:String,converter:mS,reflect:!1,hasChanged:wN},ZMe=(r=KMe,e,t)=>{const{kind:n,metadata:i}=t;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(t.name,r),n==="accessor"){const{name:a}=t;return{set(o){const l=e.get.call(this);e.set.call(this,o),this.requestUpdate(a,l,r)},init(o){return o!==void 0&&this.P(a,void 0,r),o}}}if(n==="setter"){const{name:a}=t;return function(o){const l=this[a];e.call(this,o),this.requestUpdate(a,l,r)}}throw Error("Unsupported decorator location: "+n)};function me(r){return(e,t)=>typeof t=="object"?ZMe(r,e,t):((n,i,s)=>{const a=i.hasOwnProperty(s);return i.constructor.createProperty(s,a?{...n,wrapped:!0}:n),a?Object.getOwnPropertyDescriptor(i,s):void 0})(r,e,t)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function Oe(r){return pe({...r,state:!0,attribute:!1})}const s7e=Ze` + */function De(r){return me({...r,state:!0,attribute:!1})}const JMe=Ze` :host { display: flex; aspect-ratio: 1 / 1; @@ -900,12 +917,12 @@ ${this._compileErrors().join(` object-fit: contain; object-position: center; } -`,o7e=At` +`,YMe=_t` -`,a7e=At``,QMe=_t` @@ -915,7 +932,7 @@ ${this._compileErrors().join(` d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z" clip-rule="evenodd" />`,c7e=At` +>`,XMe=_t` -`,l7e=At` +`,ePe=_t` @@ -948,35 +965,35 @@ ${this._compileErrors().join(` -`,u7e=At` +`,tPe=_t` -`,h7e=At` +`,rPe=_t` -`,f7e=At` +`,nPe=_t` -`,d7e=At` +`,iPe=_t` -`,p7e=At` +`,sPe=_t` -`,g7e=At``,aPe=_t``,m7e=At` +>`,oPe=_t` -`,b7e=At` +`,cPe=_t` -`,w7e=At` +`,lPe=_t` -`,v7e=At` +`,uPe=_t` -`,y7e=At` +`,fPe=_t` -`,x7e=At` +`,dPe=_t` -`,_7e=At` +`,hPe=_t` -`,E7e=At` +`,pPe=_t` -`,A7e=At` +`,mPe=_t` -`,C7e=At``,gPe=_t``,S7e=At``,bPe=_t``,I7e=At` +>`,vPe=_t` -`,T7e=At` +`,wPe=_t` -`,R7e=At` +`,yPe=_t` -`,k7e=At` +`,xPe=_t` @@ -1179,26 +1196,26 @@ ${this._compileErrors().join(` -`,M7e=At` +`,_Pe=_t` -`,N7e=At` +`,EPe=_t` -`,P7e=At` +`,CPe=_t` -`,O7e=At` +`,APe=_t` @@ -1223,14 +1240,14 @@ ${this._compileErrors().join(` -`,D7e=At` +`,SPe=_t` -`,$7e=At` +`,IPe=_t` @@ -1247,7 +1264,7 @@ ${this._compileErrors().join(` -`,B7e=At` +`,TPe=_t` @@ -1276,7 +1293,7 @@ ${this._compileErrors().join(` -`,L7e=At` +`,kPe=_t` -`,U7e=At` +`,RPe=_t` -`,F7e=At` +`,MPe=_t` -`,j7e=At` +`,PPe=_t` -`,z7e=At` +`,OPe=_t` -`,H7e=At` +`,NPe=_t` -`,q7e=At` +`,DPe=_t` -`,W7e=At` `,$Pe=_t` -`,V7e=At` +`,BPe=_t` -`,G7e=At` +`,LPe=_t` -`,K7e=At` +`,UPe=_t` -`,Z7e=At` +`,FPe=_t` `,J7e=At` +>`,jPe=_t` -`,Y7e=At` +`,zPe=_t` -`,Q7e=At``,HPe=_t` -`,X7e=At` +`,qPe=_t` -`,e9e=At` +`,WPe=_t` -`,t9e=At` +`,VPe=_t` @@ -1463,7 +1480,7 @@ ${this._compileErrors().join(` - `,r9e=At` + `,GPe=_t` @@ -1480,7 +1497,7 @@ ${this._compileErrors().join(` -`,n9e=At` +`,KPe=_t` @@ -1494,26 +1511,26 @@ ${this._compileErrors().join(` -`,i9e=At` +`,ZPe=_t` -`,s9e=At` +`,JPe=_t` -`,o9e=At` +`,YPe=_t` -`,a9e=At` +`,QPe=_t` -`,c9e=At` +`,XPe=_t` -`,l9e=At` +`,eOe=_t` -`,u9e=At` +`,tOe=_t` -`,h9e=At``,rOe=_t` @@ -1562,7 +1579,7 @@ ${this._compileErrors().join(` fill="currentColor" d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z" />`,f9e=At``,nOe=_t``,d9e=At``,iOe=_t``,p9e=At``,sOe=_t``,g9e=At` +>`,aOe=_t` - `,m9e=At` + `,oOe=_t` -`;var qA=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const b9e={add:S7e,allWallets:o7e,arrowBottomCircle:a7e,appStore:c7e,apple:l7e,arrowBottom:u7e,arrowLeft:h7e,arrowRight:f7e,arrowTop:d7e,bank:f9e,browser:p7e,card:d9e,checkmark:g7e,checkmarkBold:m9e,chevronBottom:m7e,chevronLeft:b7e,chevronRight:w7e,chevronTop:v7e,chromeStore:y7e,clock:x7e,close:_7e,compass:A7e,coinPlaceholder:E7e,copy:C7e,cursor:I7e,cursorTransparent:g9e,desktop:T7e,disconnect:R7e,discord:k7e,etherscan:M7e,extension:N7e,externalLink:P7e,facebook:O7e,filters:D7e,github:$7e,google:B7e,helpCircle:L7e,infoCircle:U7e,mail:F7e,mobile:j7e,networkPlaceholder:z7e,nftPlaceholder:H7e,off:q7e,playStore:W7e,plus:p9e,qrCode:V7e,recycleHorizontal:h9e,refresh:G7e,search:K7e,send:Z7e,swapHorizontal:J7e,swapHorizontalMedium:Q7e,swapHorizontalBold:Y7e,swapHorizontalRoundedBold:X7e,swapVertical:e9e,telegram:t9e,twitch:r9e,twitter:n9e,twitterIcon:i9e,verify:s9e,verifyFilled:o9e,wallet:c9e,walletConnect:l9e,walletPlaceholder:a9e,warningCircle:u9e};let Vg=class extends Fe{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=` +`;var wS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const cOe={add:bPe,allWallets:YMe,arrowBottomCircle:QMe,appStore:XMe,apple:ePe,arrowBottom:tPe,arrowLeft:rPe,arrowRight:nPe,arrowTop:iPe,bank:nOe,browser:sPe,card:iOe,checkmark:aPe,checkmarkBold:oOe,chevronBottom:oPe,chevronLeft:cPe,chevronRight:lPe,chevronTop:uPe,chromeStore:fPe,clock:dPe,close:hPe,compass:mPe,coinPlaceholder:pPe,copy:gPe,cursor:vPe,cursorTransparent:aOe,desktop:wPe,disconnect:yPe,discord:xPe,etherscan:_Pe,extension:EPe,externalLink:CPe,facebook:APe,filters:SPe,github:IPe,google:TPe,helpCircle:kPe,infoCircle:RPe,mail:MPe,mobile:PPe,networkPlaceholder:OPe,nftPlaceholder:NPe,off:DPe,playStore:$Pe,plus:sOe,qrCode:BPe,recycleHorizontal:rOe,refresh:LPe,search:UPe,send:FPe,swapHorizontal:jPe,swapHorizontalMedium:HPe,swapHorizontalBold:zPe,swapHorizontalRoundedBold:qPe,swapVertical:WPe,telegram:VPe,twitch:GPe,twitter:KPe,twitterIcon:ZPe,verify:JPe,verifyFilled:YPe,wallet:XPe,walletConnect:eOe,walletPlaceholder:QPe,warningCircle:tOe};let $g=class extends He{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=` --local-color: ${`var(--wui-color-${this.color});`} --local-width: ${`var(--wui-icon-size-${this.size});`} - `,ce`${b9e[this.name]}`}};Vg.styles=[ar,xN,s7e],qA([pe()],Vg.prototype,"size",void 0),qA([pe()],Vg.prototype,"name",void 0),qA([pe()],Vg.prototype,"color",void 0),Vg=qA([Le("wui-icon")],Vg);const w9e=Ze` + `,le`${cOe[this.name]}`}};$g.styles=[lr,IN,JMe],wS([me()],$g.prototype,"size",void 0),wS([me()],$g.prototype,"name",void 0),wS([me()],$g.prototype,"color",void 0),$g=wS([Fe("wui-icon")],$g);const lOe=Ze` :host { display: block; width: var(--local-width); @@ -1636,10 +1653,10 @@ ${this._compileErrors().join(` object-position: center center; border-radius: inherit; } -`;var WA=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Gg=class extends Fe{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=` +`;var yS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Bg=class extends He{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=` --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"}; --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"}; - `,ce`${this.alt}`}};Gg.styles=[ar,xN,w9e],WA([pe()],Gg.prototype,"src",void 0),WA([pe()],Gg.prototype,"alt",void 0),WA([pe()],Gg.prototype,"size",void 0),Gg=WA([Le("wui-image")],Gg);const v9e=Ze` + `,le`${this.alt}`}};Bg.styles=[lr,IN,lOe],yS([me()],Bg.prototype,"src",void 0),yS([me()],Bg.prototype,"alt",void 0),yS([me()],Bg.prototype,"size",void 0),Bg=yS([Fe("wui-image")],Bg);const uOe=Ze` :host { display: block; width: var(--wui-box-size-lg); @@ -1667,7 +1684,7 @@ ${this._compileErrors().join(` stroke-dashoffset: 0px; } } -`;var y9e=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let VA=class extends Fe{render(){return ce` +`;var fOe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let xS=class extends He{render(){return le` - `}};VA.styles=[ar,v9e],VA=y9e([Le("wui-loading-hexagon")],VA);const x9e=Ze` + `}};xS.styles=[lr,uOe],xS=fOe([Fe("wui-loading-hexagon")],xS);const dOe=Ze` :host { display: flex; } @@ -1743,9 +1760,9 @@ ${this._compileErrors().join(` stroke-dashoffset: -125; } } -`;var _N=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ev=class extends Fe{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: var(--wui-color-${this.color});`,this.dataset.size=this.size,ce` +`;var TN=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let E3=class extends He{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: var(--wui-color-${this.color});`,this.dataset.size=this.size,le` - `}};Ev.styles=[ar,x9e],_N([pe()],Ev.prototype,"color",void 0),_N([pe()],Ev.prototype,"size",void 0),Ev=_N([Le("wui-loading-spinner")],Ev);const _9e=Ze` + `}};E3.styles=[lr,dOe],TN([me()],E3.prototype,"color",void 0),TN([me()],E3.prototype,"size",void 0),E3=TN([Fe("wui-loading-spinner")],E3);const hOe=Ze` :host { display: block; width: var(--wui-box-size-md); @@ -1770,7 +1787,7 @@ ${this._compileErrors().join(` stroke-dashoffset: 0px; } } -`;var Eee=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let W4=class extends Fe{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,o=360+n*1.75;return ce` +`;var Jne=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let m8=class extends He{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,a=360+n*1.75;return le` - `}};W4.styles=[ar,_9e],Eee([pe({type:Number})],W4.prototype,"radius",void 0),W4=Eee([Le("wui-loading-thumbnail")],W4);const E9e=Ze` + `}};m8.styles=[lr,hOe],Jne([me({type:Number})],m8.prototype,"radius",void 0),m8=Jne([Fe("wui-loading-thumbnail")],m8);const pOe=Ze` :host { display: block; box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005); @@ -1808,19 +1825,19 @@ ${this._compileErrors().join(` background-position: 250% 0; } } -`;var GA=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Kg=class extends Fe{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m"}render(){return this.style.cssText=` +`;var _S=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Lg=class extends He{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m"}render(){return this.style.cssText=` width: ${this.width}; height: ${this.height}; border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`}; - `,ce``}};Kg.styles=[E9e],GA([pe()],Kg.prototype,"width",void 0),GA([pe()],Kg.prototype,"height",void 0),GA([pe()],Kg.prototype,"borderRadius",void 0),Kg=GA([Le("wui-shimmer")],Kg);/** + `,le``}};Lg.styles=[pOe],_S([me()],Lg.prototype,"width",void 0),_S([me()],Lg.prototype,"height",void 0),_S([me()],Lg.prototype,"borderRadius",void 0),Lg=_S([Fe("wui-shimmer")],Lg);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Aee={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Cee=r=>(...e)=>({_$litDirective$:r,values:e});let See=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + */const Yne={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Qne=r=>(...e)=>({_$litDirective$:r,values:e});let Xne=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const A9e=Cee(class extends See{constructor(r){var e;if(super(r),r.type!==Aee.ATTRIBUTE||r.name!=="class"||((e=r.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var n,i;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((n=this.nt)!=null&&n.has(s))&&this.st.add(s);return this.render(e)}const t=r.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const o=!!e[s];o===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(o?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return qg}}),C9e=Ze` + */const mOe=Qne(class extends Xne{constructor(r){var e;if(super(r),r.type!==Yne.ATTRIBUTE||r.name!=="class"||((e=r.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var n,i;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((n=this.nt)!=null&&n.has(s))&&this.st.add(s);return this.render(e)}const t=r.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const a=!!e[s];a===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(a?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return Ng}}),gOe=Ze` :host { display: inline-flex !important; } @@ -1929,10 +1946,10 @@ ${this._compileErrors().join(` .wui-font-micro-600 { font-weight: var(--wui-font-weight-medium); } -`;var KA=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Zg=class extends Fe{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0};return this.style.cssText=` +`;var ES=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ug=class extends He{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0};return this.style.cssText=` --local-align: ${this.align}; --local-color: var(--wui-color-${this.color}); - `,ce``}};Zg.styles=[ar,C9e],KA([pe()],Zg.prototype,"variant",void 0),KA([pe()],Zg.prototype,"color",void 0),KA([pe()],Zg.prototype,"align",void 0),Zg=KA([Le("wui-text")],Zg);const S9e=At` + `,le``}};Ug.styles=[lr,gOe],ES([me()],Ug.prototype,"variant",void 0),ES([me()],Ug.prototype,"color",void 0),ES([me()],Ug.prototype,"align",void 0),Ug=ES([Fe("wui-text")],Ug);const bOe=_t` - `,I9e=At` + `,vOe=_t` - `,T9e=At` + `,wOe=_t` -`,R9e=At` +`,yOe=_t` - `,k9e=At` + `,xOe=_t` - `,M9e=At` + `,_Oe=_t` -`,N9e=At` +`,EOe=_t` -`,P9e=At` +`,COe=_t` - `,O9e=At` + `,AOe=_t` @@ -2163,7 +2180,7 @@ ${this._compileErrors().join(` -`,D9e=At` +`,SOe=_t` - `,$9e=At` + `,IOe=_t` -`,B9e=At``,TOe=_t` @@ -2231,7 +2248,7 @@ ${this._compileErrors().join(` - `,L9e=At` + `,kOe=_t` - `,U9e=At` + `,ROe=_t` @@ -2272,7 +2289,7 @@ ${this._compileErrors().join(` -`,F9e=At` +`,MOe=_t` -`,j9e=At` +`,POe=_t` -`,z9e=At` +`,OOe=_t` -`,H9e=At` +`,NOe=_t` @@ -2358,7 +2375,7 @@ ${this._compileErrors().join(` -`,q9e=At` +`,DOe=_t` @@ -2368,7 +2385,7 @@ ${this._compileErrors().join(` -`,W9e=At` +`,$Oe=_t` @@ -2387,7 +2404,7 @@ ${this._compileErrors().join(` -`,V9e=At` +`,BOe=_t` @@ -2404,7 +2421,7 @@ ${this._compileErrors().join(` -`,G9e=Ze` +`,LOe=Ze` :host { display: block; width: var(--local-size); @@ -2415,26 +2432,26 @@ ${this._compileErrors().join(` width: 100%; height: 100%; } -`;var EN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const K9e={browser:S9e,dao:I9e,defi:T9e,defiAlt:R9e,eth:k9e,layers:M9e,lock:N9e,login:P9e,network:O9e,nft:D9e,noun:$9e,profile:B9e,system:L9e,coinbase:U9e,onrampCard:H9e,moonpay:F9e,stripe:j9e,paypal:z9e,google:q9e,pencil:W9e,lightbulb:V9e};let Av=class extends Fe{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=` +`;var kN=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const UOe={browser:bOe,dao:vOe,defi:wOe,defiAlt:yOe,eth:xOe,layers:_Oe,lock:EOe,login:COe,network:AOe,nft:SOe,noun:IOe,profile:TOe,system:kOe,coinbase:ROe,onrampCard:NOe,moonpay:MOe,stripe:POe,paypal:OOe,google:DOe,pencil:$Oe,lightbulb:BOe};let C3=class extends He{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=` --local-size: var(--wui-visual-size-${this.size}); - `,ce`${K9e[this.name]}`}};Av.styles=[ar,G9e],EN([pe()],Av.prototype,"name",void 0),EN([pe()],Av.prototype,"size",void 0),Av=EN([Le("wui-visual")],Av);/** + `,le`${UOe[this.name]}`}};C3.styles=[lr,LOe],kN([me()],C3.prototype,"name",void 0),kN([me()],C3.prototype,"size",void 0),C3=kN([Fe("wui-visual")],C3);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const gr=r=>r??_s,Tr={getSpacingStyles(r,e){if(Array.isArray(r))return r[e]?`var(--wui-spacing-${r[e]})`:void 0;if(typeof r=="string")return`var(--wui-spacing-${r})`},getFormattedDate(r){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(r)},getHostName(r){return new URL(r).hostname},getTruncateString({string:r,charsStart:e,charsEnd:t,truncate:n}){return r.length<=e+t?r:n==="end"?`${r.substring(0,e)}...`:n==="start"?`...${r.substring(r.length-t)}`:`${r.substring(0,Math.floor(e))}...${r.substring(r.length-Math.floor(t))}`},generateAvatarColors(r){const t=r.toLowerCase().replace(/^0x/iu,"").substring(0,6),n=this.hexToRgb(t),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),o=100-3*Number(i==null?void 0:i.replace("px","")),a=`${o}% ${o}% at 65% 40%`,l=[];for(let u=0;u<5;u+=1){const h=this.tintColor(n,.15*u);l.push(`rgb(${h[0]}, ${h[1]}, ${h[2]})`)}return` + */const br=r=>r??ks,Mr={getSpacingStyles(r,e){if(Array.isArray(r))return r[e]?`var(--wui-spacing-${r[e]})`:void 0;if(typeof r=="string")return`var(--wui-spacing-${r})`},getFormattedDate(r){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(r)},getHostName(r){return new URL(r).hostname},getTruncateString({string:r,charsStart:e,charsEnd:t,truncate:n}){return r.length<=e+t?r:n==="end"?`${r.substring(0,e)}...`:n==="start"?`...${r.substring(r.length-t)}`:`${r.substring(0,Math.floor(e))}...${r.substring(r.length-Math.floor(t))}`},generateAvatarColors(r){const t=r.toLowerCase().replace(/^0x/iu,"").substring(0,6),n=this.hexToRgb(t),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),a=100-3*Number(i==null?void 0:i.replace("px","")),o=`${a}% ${a}% at 65% 40%`,l=[];for(let u=0;u<5;u+=1){const f=this.tintColor(n,.15*u);l.push(`rgb(${f[0]}, ${f[1]}, ${f[2]})`)}return` --local-color-1: ${l[0]}; --local-color-2: ${l[1]}; --local-color-3: ${l[2]}; --local-color-4: ${l[3]}; --local-color-5: ${l[4]}; - --local-radial-circle: ${a} - `},hexToRgb(r){const e=parseInt(r,16),t=e>>16&255,n=e>>8&255,i=e&255;return[t,n,i]},tintColor(r,e){const[t,n,i]=r,s=Math.round(t+(255-t)*e),o=Math.round(n+(255-n)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(r){return{number:/^[0-9]+$/u}.number.test(r)},getColorTheme(r){return r||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},splitBalance(r){const e=r.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(r,e,t){return Math.abs(r)>=e?Number(r.toFixed(t)):r},formatNumberToLocalString(r,e=2){return r===void 0?"0.00":typeof r=="number"?r.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(r).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},Z9e=Ze` + --local-radial-circle: ${o} + `},hexToRgb(r){const e=parseInt(r,16),t=e>>16&255,n=e>>8&255,i=e&255;return[t,n,i]},tintColor(r,e){const[t,n,i]=r,s=Math.round(t+(255-t)*e),a=Math.round(n+(255-n)*e),o=Math.round(i+(255-i)*e);return[s,a,o]},isNumber(r){return{number:/^[0-9]+$/u}.number.test(r)},getColorTheme(r){return r||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},splitBalance(r){const e=r.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(r,e,t){return Math.abs(r)>=e?Number(r.toFixed(t)):r},formatNumberToLocalString(r,e=2){return r===void 0?"0.00":typeof r=="number"?r.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(r).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},FOe=Ze` :host { display: flex; width: inherit; height: inherit; } -`;var Dc=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ua=class extends Fe{render(){return this.style.cssText=` +`;var Jc=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let xo=class extends He{render(){return this.style.cssText=` flex-direction: ${this.flexDirection}; flex-wrap: ${this.flexWrap}; flex-basis: ${this.flexBasis}; @@ -2445,15 +2462,15 @@ ${this._compileErrors().join(` column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; - padding-top: ${this.padding&&Tr.getSpacingStyles(this.padding,0)}; - padding-right: ${this.padding&&Tr.getSpacingStyles(this.padding,1)}; - padding-bottom: ${this.padding&&Tr.getSpacingStyles(this.padding,2)}; - padding-left: ${this.padding&&Tr.getSpacingStyles(this.padding,3)}; - margin-top: ${this.margin&&Tr.getSpacingStyles(this.margin,0)}; - margin-right: ${this.margin&&Tr.getSpacingStyles(this.margin,1)}; - margin-bottom: ${this.margin&&Tr.getSpacingStyles(this.margin,2)}; - margin-left: ${this.margin&&Tr.getSpacingStyles(this.margin,3)}; - `,ce``}};ua.styles=[ar,Z9e],Dc([pe()],ua.prototype,"flexDirection",void 0),Dc([pe()],ua.prototype,"flexWrap",void 0),Dc([pe()],ua.prototype,"flexBasis",void 0),Dc([pe()],ua.prototype,"flexGrow",void 0),Dc([pe()],ua.prototype,"flexShrink",void 0),Dc([pe()],ua.prototype,"alignItems",void 0),Dc([pe()],ua.prototype,"justifyContent",void 0),Dc([pe()],ua.prototype,"columnGap",void 0),Dc([pe()],ua.prototype,"rowGap",void 0),Dc([pe()],ua.prototype,"gap",void 0),Dc([pe()],ua.prototype,"padding",void 0),Dc([pe()],ua.prototype,"margin",void 0),ua=Dc([Le("wui-flex")],ua);const J9e=Ze` + padding-top: ${this.padding&&Mr.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&Mr.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&Mr.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&Mr.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&Mr.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&Mr.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&Mr.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&Mr.getSpacingStyles(this.margin,3)}; + `,le``}};xo.styles=[lr,FOe],Jc([me()],xo.prototype,"flexDirection",void 0),Jc([me()],xo.prototype,"flexWrap",void 0),Jc([me()],xo.prototype,"flexBasis",void 0),Jc([me()],xo.prototype,"flexGrow",void 0),Jc([me()],xo.prototype,"flexShrink",void 0),Jc([me()],xo.prototype,"alignItems",void 0),Jc([me()],xo.prototype,"justifyContent",void 0),Jc([me()],xo.prototype,"columnGap",void 0),Jc([me()],xo.prototype,"rowGap",void 0),Jc([me()],xo.prototype,"gap",void 0),Jc([me()],xo.prototype,"padding",void 0),Jc([me()],xo.prototype,"margin",void 0),xo=Jc([Fe("wui-flex")],xo);const jOe=Ze` :host { display: block; width: var(--wui-icon-box-size-xl); @@ -2527,7 +2544,7 @@ ${this._compileErrors().join(` #6ebdea 100% ); } -`;var ZA=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Jg=class extends Fe{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return ce`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",ce``;if(this.address){this.dataset.variant="generated";const e=Tr.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}};Jg.styles=[ar,J9e],ZA([pe()],Jg.prototype,"imageSrc",void 0),ZA([pe()],Jg.prototype,"alt",void 0),ZA([pe()],Jg.prototype,"address",void 0),Jg=ZA([Le("wui-avatar")],Jg);const Y9e=Ze` +`;var CS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Fg=class extends He{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return le`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",le``;if(this.address){this.dataset.variant="generated";const e=Mr.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}};Fg.styles=[lr,jOe],CS([me()],Fg.prototype,"imageSrc",void 0),CS([me()],Fg.prototype,"alt",void 0),CS([me()],Fg.prototype,"address",void 0),Fg=CS([Fe("wui-avatar")],Fg);const zOe=Ze` :host { display: inline-flex; justify-content: center; @@ -2549,13 +2566,13 @@ ${this._compileErrors().join(` background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); } } -`;var Nd=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let zl=class extends Fe{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t=this.size==="lg",n=this.size==="xl",i=t?"12%":"16%",s=t?"xxs":n?"s":"3xl",o=this.background==="gray",a=this.background==="opaque",l=this.backgroundColor==="accent-100"&&a||this.backgroundColor==="success-100"&&a||this.backgroundColor==="error-100"&&a||this.backgroundColor==="inverse-100"&&a;let u=`var(--wui-color-${this.backgroundColor})`;return l?u=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(u=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=` +`;var c0=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let tu=class extends He{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t=this.size==="lg",n=this.size==="xl",i=t?"12%":"16%",s=t?"xxs":n?"s":"3xl",a=this.background==="gray",o=this.background==="opaque",l=this.backgroundColor==="accent-100"&&o||this.backgroundColor==="success-100"&&o||this.backgroundColor==="error-100"&&o||this.backgroundColor==="inverse-100"&&o;let u=`var(--wui-color-${this.backgroundColor})`;return l?u=`var(--wui-icon-box-bg-${this.backgroundColor})`:a&&(u=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=` --local-bg-value: ${u}; - --local-bg-mix: ${l||o?"100%":i}; + --local-bg-mix: ${l||a?"100%":i}; --local-border-radius: var(--wui-border-radius-${s}); --local-size: var(--wui-icon-box-size-${this.size}); --local-border: ${this.borderColor==="wui-color-bg-125"?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"} - `,ce` `}};zl.styles=[ar,en,Y9e],Nd([pe()],zl.prototype,"size",void 0),Nd([pe()],zl.prototype,"backgroundColor",void 0),Nd([pe()],zl.prototype,"iconColor",void 0),Nd([pe()],zl.prototype,"iconSize",void 0),Nd([pe()],zl.prototype,"background",void 0),Nd([pe({type:Boolean})],zl.prototype,"border",void 0),Nd([pe()],zl.prototype,"borderColor",void 0),Nd([pe()],zl.prototype,"icon",void 0),zl=Nd([Le("wui-icon-box")],zl);const Q9e=Ze` + `,le` `}};tu.styles=[lr,sn,zOe],c0([me()],tu.prototype,"size",void 0),c0([me()],tu.prototype,"backgroundColor",void 0),c0([me()],tu.prototype,"iconColor",void 0),c0([me()],tu.prototype,"iconSize",void 0),c0([me()],tu.prototype,"background",void 0),c0([me({type:Boolean})],tu.prototype,"border",void 0),c0([me()],tu.prototype,"borderColor",void 0),c0([me()],tu.prototype,"icon",void 0),tu=c0([Fe("wui-icon-box")],tu);const HOe=Ze` :host { display: block; } @@ -2658,10 +2675,10 @@ ${this._compileErrors().join(` color: var(--wui-color-fg-175); } } -`;var Fu=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let lc=class extends Fe{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.isProfileName=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return ce` +`;var of=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let wc=class extends He{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.isProfileName=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return le` - `}balanceTemplate(){if(this.isUnsupportedChain)return ce` - Switch Network`;if(this.balance){const e=this.networkSrc?ce``:ce` + Switch Network`;if(this.balance){const e=this.networkSrc?le``:le` - `;return ce` + `;return le` ${e} ${this.balance} - `}return null}};lc.styles=[ar,en,Q9e],Fu([pe()],lc.prototype,"networkSrc",void 0),Fu([pe()],lc.prototype,"avatarSrc",void 0),Fu([pe()],lc.prototype,"balance",void 0),Fu([pe({type:Boolean})],lc.prototype,"isUnsupportedChain",void 0),Fu([pe({type:Boolean})],lc.prototype,"disabled",void 0),Fu([pe({type:Boolean})],lc.prototype,"isProfileName",void 0),Fu([pe()],lc.prototype,"address",void 0),Fu([pe()],lc.prototype,"profileName",void 0),Fu([pe()],lc.prototype,"charsStart",void 0),Fu([pe()],lc.prototype,"charsEnd",void 0),lc=Fu([Le("wui-account-button")],lc);const X9e=Ze` + `}return null}};wc.styles=[lr,sn,HOe],of([me()],wc.prototype,"networkSrc",void 0),of([me()],wc.prototype,"avatarSrc",void 0),of([me()],wc.prototype,"balance",void 0),of([me({type:Boolean})],wc.prototype,"isUnsupportedChain",void 0),of([me({type:Boolean})],wc.prototype,"disabled",void 0),of([me({type:Boolean})],wc.prototype,"isProfileName",void 0),of([me()],wc.prototype,"address",void 0),of([me()],wc.prototype,"profileName",void 0),of([me()],wc.prototype,"charsStart",void 0),of([me()],wc.prototype,"charsEnd",void 0),wc=of([Fe("wui-account-button")],wc);const qOe=Ze` :host { position: relative; background-color: var(--wui-gray-glass-002); @@ -2769,22 +2786,22 @@ ${this._compileErrors().join(` border: 2px solid var(--wui-color-bg-base-150, #1e1f1f); padding: 1px; } -`;var Yg=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Jh=class extends Fe{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=` +`;var jg=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let bd=class extends He{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=` --local-border-radius: var(--wui-border-radius-${e}); --local-size: var(--wui-wallet-image-size-${this.size}); - `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),ce` + `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),le` ${this.templateVisual()} - `}templateVisual(){return this.imageSrc?ce``:this.walletIcon?ce``:this.walletIcon?le``:ce``:le``}};Jh.styles=[ar,X9e],Yg([pe()],Jh.prototype,"size",void 0),Yg([pe()],Jh.prototype,"name",void 0),Yg([pe()],Jh.prototype,"imageSrc",void 0),Yg([pe()],Jh.prototype,"walletIcon",void 0),Yg([pe({type:Boolean})],Jh.prototype,"installed",void 0),Yg([pe()],Jh.prototype,"badgeSize",void 0),Jh=Yg([Le("wui-wallet-image")],Jh);const e_e=Ze` + >`}};bd.styles=[lr,qOe],jg([me()],bd.prototype,"size",void 0),jg([me()],bd.prototype,"name",void 0),jg([me()],bd.prototype,"imageSrc",void 0),jg([me()],bd.prototype,"walletIcon",void 0),jg([me({type:Boolean})],bd.prototype,"installed",void 0),jg([me()],bd.prototype,"badgeSize",void 0),bd=jg([Fe("wui-wallet-image")],bd);const WOe=Ze` :host { position: relative; border-radius: var(--wui-border-radius-xxs); @@ -2829,14 +2846,14 @@ ${this._compileErrors().join(` z-index: 2; display: flex; } -`;var Iee=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const AN=4;let V4=class extends Fe{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.lengthce` +`;var eie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const RN=4;let g8=class extends He{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.lengthle` `)} - ${e?[...Array(AN-this.walletImages.length)].map(()=>ce` `):null} + ${e?[...Array(RN-this.walletImages.length)].map(()=>le` `):null} - `}};V4.styles=[ar,e_e],Iee([pe({type:Array})],V4.prototype,"walletImages",void 0),V4=Iee([Le("wui-all-wallets-image")],V4);const t_e=Ze` + `}};g8.styles=[lr,WOe],eie([me({type:Array})],g8.prototype,"walletImages",void 0),g8=eie([Fe("wui-all-wallets-image")],g8);const VOe=Ze` :host { width: var(--local-width); position: relative; @@ -2936,12 +2953,12 @@ ${this._compileErrors().join(` transform: translate(-50%, -50%); opacity: var(--local-opacity-000); } -`;var Yh=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const r_e={xs:"small-600",sm:"paragraph-600",md:"small-600",mdl:"small-600",lg:"paragraph-600"};let $c=class extends Fe{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="fill",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=` +`;var vd=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const GOe={xs:"small-600",sm:"paragraph-600",md:"small-600",mdl:"small-600",lg:"paragraph-600"};let Yc=class extends He{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="fill",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=` --local-width: ${this.fullWidth?"100%":"auto"}; --local-opacity-100: ${this.loading?0:1}; --local-opacity-000: ${this.loading?1:0}; --local-border-radius: var(--wui-border-radius-${this.borderRadius}); - `;const e=this.textVariant??r_e[this.size];return ce` + `;const e=this.textVariant??GOe[this.size];return le` - `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){return this.loading?ce``:ce``}};$c.styles=[ar,en,t_e],Yh([pe()],$c.prototype,"size",void 0),Yh([pe({type:Boolean})],$c.prototype,"disabled",void 0),Yh([pe({type:Boolean})],$c.prototype,"fullWidth",void 0),Yh([pe({type:Boolean})],$c.prototype,"loading",void 0),Yh([pe()],$c.prototype,"variant",void 0),Yh([pe({type:Boolean})],$c.prototype,"hasIconLeft",void 0),Yh([pe({type:Boolean})],$c.prototype,"hasIconRight",void 0),Yh([pe()],$c.prototype,"borderRadius",void 0),Yh([pe()],$c.prototype,"textVariant",void 0),$c=Yh([Le("wui-button")],$c);const Tee=At` + `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){return this.loading?le``:le``}};Yc.styles=[lr,sn,VOe],vd([me()],Yc.prototype,"size",void 0),vd([me({type:Boolean})],Yc.prototype,"disabled",void 0),vd([me({type:Boolean})],Yc.prototype,"fullWidth",void 0),vd([me({type:Boolean})],Yc.prototype,"loading",void 0),vd([me()],Yc.prototype,"variant",void 0),vd([me({type:Boolean})],Yc.prototype,"hasIconLeft",void 0),vd([me({type:Boolean})],Yc.prototype,"hasIconRight",void 0),vd([me()],Yc.prototype,"borderRadius",void 0),vd([me()],Yc.prototype,"textVariant",void 0),Yc=vd([Fe("wui-button")],Yc);const tie=_t` -`,n_e=Ze` +`,KOe=Ze` :host { display: flex; flex-direction: column; @@ -2991,26 +3008,26 @@ ${this._compileErrors().join(` stroke: var(--wui-gray-glass-010); stroke-width: 1px; } -`;var Ree=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let G4=class extends Fe{constructor(){super(...arguments),this.type="wallet"}render(){return ce` +`;var rie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let b8=class extends He{constructor(){super(...arguments),this.type="wallet"}render(){return le` ${this.shimmerTemplate()} - `}shimmerTemplate(){return this.type==="network"?ce` - ${Tee}`:ce``}};G4.styles=[ar,en,n_e],Ree([pe()],G4.prototype,"type",void 0),G4=Ree([Le("wui-card-select-loader")],G4);const i_e=At` + ${tie}`:le``}};b8.styles=[lr,sn,KOe],rie([me()],b8.prototype,"type",void 0),b8=rie([Fe("wui-card-select-loader")],b8);const ZOe=_t` -`,s_e=At` +`,JOe=_t` -`,o_e=Ze` +`,YOe=Ze` :host { position: relative; border-radius: inherit; @@ -3048,13 +3065,13 @@ ${this._compileErrors().join(` width: var(--local-icon-size); height: var(--local-icon-size); } -`;var K4=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let qp=class extends Fe{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e={sm:i_e,md:Tee,lg:s_e};return this.style.cssText=` +`;var v8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let S1=class extends He{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e={sm:ZOe,md:tie,lg:JOe};return this.style.cssText=` --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-gray-glass-010)"}; --local-path: var(--wui-path-network-${this.size}); --local-width: var(--wui-width-network-${this.size}); --local-height: var(--wui-height-network-${this.size}); --local-icon-size: var(--wui-icon-size-network-${this.size}); - `,ce`${this.templateVisual()} ${e[this.size]}`}templateVisual(){return this.imageSrc?ce``:ce``}};qp.styles=[ar,o_e],K4([pe()],qp.prototype,"size",void 0),K4([pe()],qp.prototype,"name",void 0),K4([pe()],qp.prototype,"imageSrc",void 0),K4([pe({type:Boolean})],qp.prototype,"selected",void 0),qp=K4([Le("wui-network-image")],qp);const a_e=Ze` + `,le`${this.templateVisual()} ${e[this.size]}`}templateVisual(){return this.imageSrc?le``:le``}};S1.styles=[lr,YOe],v8([me()],S1.prototype,"size",void 0),v8([me()],S1.prototype,"name",void 0),v8([me()],S1.prototype,"imageSrc",void 0),v8([me({type:Boolean})],S1.prototype,"selected",void 0),S1=v8([Fe("wui-network-image")],S1);const QOe=Ze` button { flex-direction: column; width: 76px; @@ -3090,30 +3107,30 @@ ${this._compileErrors().join(` [data-selected='true']:active:enabled { background-color: var(--wui-accent-glass-010); } -`;var Qg=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Qh=class extends Fe{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return ce` -
      - ${e!=null&&e.url?ce``:null} - ${t!=null&&t.url?ce``:null} -
      `:e!=null&&e.url?ce``:n==="NFT"?ce``:ce``}templateIcon(){let e="accent-100",t;return t=this.getIcon(),this.status&&(e=this.getStatusColor()),t?ce` + --local-right-border-radius: ${a}; + `,le` ${this.templateVisual()} ${this.templateIcon()} `}templateVisual(){const[e,t]=this.images,n=e==null?void 0:e.type;return this.images.length===2&&(e!=null&&e.url||t!=null&&t.url)?le`
      + ${e!=null&&e.url?le``:null} + ${t!=null&&t.url?le``:null} +
      `:e!=null&&e.url?le``:n==="NFT"?le``:le``}templateIcon(){let e="accent-100",t;return t=this.getIcon(),this.status&&(e=this.getStatusColor()),t?le` - `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontalBold":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};tf.styles=[I_e],im([pe()],tf.prototype,"type",void 0),im([pe()],tf.prototype,"status",void 0),im([pe()],tf.prototype,"direction",void 0),im([pe({type:Boolean})],tf.prototype,"onlyDirectionIcon",void 0),im([pe({type:Array})],tf.prototype,"images",void 0),im([pe({type:Object})],tf.prototype,"secondImage",void 0),tf=im([Le("wui-transaction-visual")],tf);const T_e=Ze` + `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontalBold":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};_d.styles=[vNe],Kg([me()],_d.prototype,"type",void 0),Kg([me()],_d.prototype,"status",void 0),Kg([me()],_d.prototype,"direction",void 0),Kg([me({type:Boolean})],_d.prototype,"onlyDirectionIcon",void 0),Kg([me({type:Array})],_d.prototype,"images",void 0),Kg([me({type:Object})],_d.prototype,"secondImage",void 0),_d=Kg([Fe("wui-transaction-visual")],_d);const wNe=Ze` :host > wui-flex:first-child { align-items: center; column-gap: var(--wui-spacing-s); @@ -4011,18 +4028,18 @@ ${this._compileErrors().join(` -webkit-box-orient: vertical; -webkit-line-clamp: 1; } -`;var zu=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let uc=class extends Fe{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return ce` +`;var lf=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let yc=class extends He{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return le` - ${RN[this.type]||this.type} + ${DN[this.type]||this.type} ${this.templateDescription()} ${this.templateSecondDescription()} @@ -4030,16 +4047,16 @@ ${this._compileErrors().join(` ${this.date} - `}templateDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[0];return e?ce` + `}templateDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[0];return e?le` ${e} - `:null}templateSecondDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[1];return e?ce` + `:null}templateSecondDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[1];return e?le` ${e} - `:null}};uc.styles=[ar,T_e],zu([pe()],uc.prototype,"type",void 0),zu([pe({type:Array})],uc.prototype,"descriptions",void 0),zu([pe()],uc.prototype,"date",void 0),zu([pe({type:Boolean})],uc.prototype,"onlyDirectionIcon",void 0),zu([pe()],uc.prototype,"status",void 0),zu([pe()],uc.prototype,"direction",void 0),zu([pe({type:Array})],uc.prototype,"images",void 0),zu([pe({type:Array})],uc.prototype,"price",void 0),zu([pe({type:Array})],uc.prototype,"amount",void 0),zu([pe({type:Array})],uc.prototype,"symbol",void 0),uc=zu([Le("wui-transaction-list-item")],uc);const R_e=Ze` + `:null}};yc.styles=[lr,wNe],lf([me()],yc.prototype,"type",void 0),lf([me({type:Array})],yc.prototype,"descriptions",void 0),lf([me()],yc.prototype,"date",void 0),lf([me({type:Boolean})],yc.prototype,"onlyDirectionIcon",void 0),lf([me()],yc.prototype,"status",void 0),lf([me()],yc.prototype,"direction",void 0),lf([me({type:Array})],yc.prototype,"images",void 0),lf([me({type:Array})],yc.prototype,"price",void 0),lf([me({type:Array})],yc.prototype,"amount",void 0),lf([me({type:Array})],yc.prototype,"symbol",void 0),yc=lf([Fe("wui-transaction-list-item")],yc);const yNe=Ze` :host > wui-flex:first-child { column-gap: var(--wui-spacing-s); padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); @@ -4050,7 +4067,7 @@ ${this._compileErrors().join(` display: flex; flex: 1; } -`;var k_e=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let eC=class extends Fe{render(){return ce` +`;var xNe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let kS=class extends He{render(){return le` @@ -4059,7 +4076,7 @@ ${this._compileErrors().join(` - `}};eC.styles=[ar,R_e],eC=k_e([Le("wui-transaction-list-item-loader")],eC);const M_e=Ze` + `}};kS.styles=[lr,yNe],kS=xNe([Fe("wui-transaction-list-item-loader")],kS);const _Ne=Ze` :host { display: flex; justify-content: center; @@ -4100,11 +4117,11 @@ ${this._compileErrors().join(` :host([data-size='lg']) > wui-text { transform: translateY(2%); } -`;var kN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Tv=class extends Fe{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"?"mini-700":"micro-700";return ce` +`;var $N=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let T3=class extends He{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"?"mini-700":"micro-700";return le` - `}};Tv.styles=[ar,M_e],kN([pe()],Tv.prototype,"variant",void 0),kN([pe()],Tv.prototype,"size",void 0),Tv=kN([Le("wui-tag")],Tv);const N_e=Ze` + `}};T3.styles=[lr,_Ne],$N([me()],T3.prototype,"variant",void 0),$N([me()],T3.prototype,"size",void 0),T3=$N([Fe("wui-tag")],T3);const ENe=Ze` button { column-gap: var(--wui-spacing-s); padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); @@ -4132,18 +4149,18 @@ ${this._compileErrors().join(` background-color: var(--wui-gray-glass-010); color: var(--wui-color-fg-300); } -`;var Hu=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hc=class extends Fe{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return ce` +`;var uf=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let xc=class extends He{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return le` - `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?ce` `:this.showAllWallets&&this.walletIcon?ce` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?ce` `:this.showAllWallets&&this.walletIcon?le` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?le``:!this.showAllWallets&&!this.imageSrc?ce``:null}templateStatus(){return this.tagLabel&&this.tagVariant?ce`${this.tagLabel}`:this.icon?ce``:null}};hc.styles=[ar,en,N_e],Hu([pe({type:Array})],hc.prototype,"walletImages",void 0),Hu([pe()],hc.prototype,"imageSrc",void 0),Hu([pe()],hc.prototype,"name",void 0),Hu([pe()],hc.prototype,"tagLabel",void 0),Hu([pe()],hc.prototype,"tagVariant",void 0),Hu([pe()],hc.prototype,"icon",void 0),Hu([pe()],hc.prototype,"walletIcon",void 0),Hu([pe({type:Boolean})],hc.prototype,"installed",void 0),Hu([pe({type:Boolean})],hc.prototype,"disabled",void 0),Hu([pe({type:Boolean})],hc.prototype,"showAllWallets",void 0),hc=Hu([Le("wui-list-wallet")],hc);const P_e=Ze` + >`:!this.showAllWallets&&!this.imageSrc?le``:null}templateStatus(){return this.tagLabel&&this.tagVariant?le`${this.tagLabel}`:this.icon?le``:null}};xc.styles=[lr,sn,ENe],uf([me({type:Array})],xc.prototype,"walletImages",void 0),uf([me()],xc.prototype,"imageSrc",void 0),uf([me()],xc.prototype,"name",void 0),uf([me()],xc.prototype,"tagLabel",void 0),uf([me()],xc.prototype,"tagVariant",void 0),uf([me()],xc.prototype,"icon",void 0),uf([me()],xc.prototype,"walletIcon",void 0),uf([me({type:Boolean})],xc.prototype,"installed",void 0),uf([me({type:Boolean})],xc.prototype,"disabled",void 0),uf([me({type:Boolean})],xc.prototype,"showAllWallets",void 0),xc=uf([Fe("wui-list-wallet")],xc);const CNe=Ze` :host { display: block; width: 40px; @@ -4157,7 +4174,7 @@ ${this._compileErrors().join(` width: 100%; height: 100%; } -`;var Pee=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let X4=class extends Fe{constructor(){super(...arguments),this.logo="google"}render(){return ce` `}};X4.styles=[ar,P_e],Pee([pe()],X4.prototype,"logo",void 0),X4=Pee([Le("wui-logo")],X4);const O_e=Ze` +`;var aie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let E8=class extends He{constructor(){super(...arguments),this.logo="google"}render(){return le` `}};E8.styles=[lr,CNe],aie([me()],E8.prototype,"logo",void 0),E8=aie([Fe("wui-logo")],E8);const ANe=Ze` :host { display: block; } @@ -4168,11 +4185,11 @@ ${this._compileErrors().join(` background: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); } -`;var MN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Rv=class extends Fe{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return ce` +`;var BN=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let k3=class extends He{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return le` - `}};Rv.styles=[ar,en,O_e],MN([pe()],Rv.prototype,"logo",void 0),MN([pe({type:Boolean})],Rv.prototype,"disabled",void 0),Rv=MN([Le("wui-logo-select")],Rv);const D_e=Ze` + `}};k3.styles=[lr,sn,ANe],BN([me()],k3.prototype,"logo",void 0),BN([me({type:Boolean})],k3.prototype,"disabled",void 0),k3=BN([Fe("wui-logo-select")],k3);const SNe=Ze` :host { display: block; } @@ -4211,35 +4228,35 @@ ${this._compileErrors().join(` height: 24px; box-shadow: 0 0 0 2px var(--wui-gray-glass-005); } -`;var tC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let sm=class extends Fe{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return ce` +`;var RS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Zg=class extends He{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return le` - `}visualTemplate(){return this.isUnsupportedChain?ce` + `}visualTemplate(){return this.isUnsupportedChain?le` - `:this.imageSrc?ce``:ce` + `:this.imageSrc?le``:le` - `}};sm.styles=[ar,en,D_e],tC([pe()],sm.prototype,"imageSrc",void 0),tC([pe({type:Boolean})],sm.prototype,"isUnsupportedChain",void 0),tC([pe({type:Boolean})],sm.prototype,"disabled",void 0),sm=tC([Le("wui-network-button")],sm);const $_e=Ze` + `}};Zg.styles=[lr,sn,SNe],RS([me()],Zg.prototype,"imageSrc",void 0),RS([me({type:Boolean})],Zg.prototype,"isUnsupportedChain",void 0),RS([me({type:Boolean})],Zg.prototype,"disabled",void 0),Zg=RS([Fe("wui-network-button")],Zg);const INe=Ze` :host { position: relative; display: block; } -`;var rC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let om=class extends Fe{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(n=>n!==""),this.handleKeyDown=(e,t)=>{const n=e.target,i=this.getInputElement(n),s=["ArrowLeft","ArrowRight","Shift","Delete"];if(!i)return;s.includes(e.key)&&e.preventDefault();const o=i.selectionStart;switch(e.key){case"ArrowLeft":o&&i.setSelectionRange(o+1,o+1),this.focusInputField("prev",t);break;case"ArrowRight":this.focusInputField("next",t);break;case"Shift":this.focusInputField("next",t);break;case"Delete":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break;case"Backspace":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break}},this.focusInputField=(e,t)=>{if(e==="next"){const n=t+1;if(!this.shouldInputBeEnabled(n))return;const i=this.numerics[n-1?n:t],s=i?this.getInputElement(i):void 0;s&&s.focus()}}}firstUpdated(){var t,n;this.otp&&(this.values=this.otp.split(""));const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),(n=this.numerics[0])==null||n.focus()}render(){return ce` +`;var MS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Jg=class extends He{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(n=>n!==""),this.handleKeyDown=(e,t)=>{const n=e.target,i=this.getInputElement(n),s=["ArrowLeft","ArrowRight","Shift","Delete"];if(!i)return;s.includes(e.key)&&e.preventDefault();const a=i.selectionStart;switch(e.key){case"ArrowLeft":a&&i.setSelectionRange(a+1,a+1),this.focusInputField("prev",t);break;case"ArrowRight":this.focusInputField("next",t);break;case"Shift":this.focusInputField("next",t);break;case"Delete":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break;case"Backspace":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break}},this.focusInputField=(e,t)=>{if(e==="next"){const n=t+1;if(!this.shouldInputBeEnabled(n))return;const i=this.numerics[n-1?n:t],s=i?this.getInputElement(i):void 0;s&&s.focus()}}}firstUpdated(){var t,n;this.otp&&(this.values=this.otp.split(""));const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),(n=this.numerics[0])==null||n.focus()}render(){return le` - ${Array.from({length:this.length}).map((e,t)=>ce` + ${Array.from({length:this.length}).map((e,t)=>le` this.handleInput(n,t)} @click=${n=>this.selectInput(n)} @@ -4250,36 +4267,36 @@ ${this._compileErrors().join(` `)} - `}updateInput(e,t,n){const i=this.numerics[t],s=e||(i?this.getInputElement(i):void 0);s&&(s.value=n,this.values=this.values.map((o,a)=>a===t?n:o))}selectInput(e){const t=e.target;if(t){const n=this.getInputElement(t);n==null||n.select()}}handleInput(e,t){const n=e.target,i=this.getInputElement(n);if(i){const s=i.value;e.inputType==="insertFromPaste"?this.handlePaste(i,s,t):Tr.isNumber(s)&&e.data?(this.updateInput(i,t,e.data),this.focusInputField("next",t)):this.updateInput(i,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,n){const i=t[0];if(i&&Tr.isNumber(i)){this.updateInput(e,n,i);const o=t.substring(1);if(n+140)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Lc.getSymbolTotalCodewords=function(e){return L_e[e]},Lc.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e},Lc.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');NN=e},Lc.isKanjiModeEnabled=function(){return typeof NN<"u"},Lc.toSJIS=function(e){return NN(e)};var nC={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,i){if(r.isValid(n))return n;try{return e(n)}catch{return i}}})(nC);function Dee(){this.buffer=[],this.length=0}Dee.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let t=0;t>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var U_e=Dee;function e6(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}e6.prototype.set=function(r,e,t,n){const i=r*this.size+e;this.data[i]=t,n&&(this.reservedBit[i]=!0)},e6.prototype.get=function(r,e){return this.data[r*this.size+e]},e6.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t},e6.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var F_e=e6,$ee={};(function(r){const e=Lc.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,s=e(n),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let l=1;l=0&&i<=7},r.from=function(i){return r.isValid(i)?parseInt(i,10):void 0},r.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,l=0,u=null,h=null;for(let p=0;p=5&&(o+=e.N1+(a-5)),u=w,a=1),w=i.get(g,p),w===h?l++:(l>=5&&(o+=e.N1+(l-5)),h=w,l=1)}a>=5&&(o+=e.N1+(a-5)),l>=5&&(o+=e.N1+(l-5))}return o},r.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,l=l<<1&2047|i.get(h,u),h>=10&&(l===1488||l===93)&&o++}return o*e.N3},r.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let l=0;l=0;){const o=s[0];for(let l=0;l0){const s=new Uint8Array(this.degree);return s.set(n,i),s}return n};var z_e=PN,zee={},Kp={},ON={};ON.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var rf={};const Hee="[0-9]+",H_e="[A-Z $%*+\\-./:]+";let r6="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r6=r6.replace(/u/g,"\\u");const q_e="(?:(?![A-Z0-9 $%*+\\-./:]|"+r6+`)(?:.|[\r -]))+`;rf.KANJI=new RegExp(r6,"g"),rf.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),rf.BYTE=new RegExp(q_e,"g"),rf.NUMERIC=new RegExp(Hee,"g"),rf.ALPHANUMERIC=new RegExp(H_e,"g");const W_e=new RegExp("^"+r6+"$"),V_e=new RegExp("^"+Hee+"$"),G_e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");rf.testKanji=function(e){return W_e.test(e)},rf.testNumeric=function(e){return V_e.test(e)},rf.testAlphanumeric=function(e){return G_e.test(e)},function(r){const e=ON,t=rf;r.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+i)}}r.from=function(s,o){if(r.isValid(s))return s;try{return n(s)}catch{return o}}}(Kp),function(r){const e=Lc,t=iC,n=nC,i=Kp,s=ON,o=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=e.getBCHDigit(o);function l(g,w,y){for(let C=1;C<=40;C++)if(w<=r.getCapacity(C,y,g))return C}function u(g,w){return i.getCharCountIndicator(g,w)+4}function h(g,w){let y=0;return g.forEach(function(C){const T=u(C.mode,w);y+=T+C.getBitsLength()}),y}function p(g,w){for(let y=1;y<=40;y++)if(h(g,y)<=r.getCapacity(y,w,i.MIXED))return y}r.from=function(w,y){return s.isValid(w)?parseInt(w,10):y},r.getCapacity=function(w,y,C){if(!s.isValid(w))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=i.BYTE);const T=e.getSymbolTotalCodewords(w),k=t.getTotalCodewordsCount(w,y),N=(T-k)*8;if(C===i.MIXED)return N;const O=N-u(C,w);switch(C){case i.NUMERIC:return Math.floor(O/10*3);case i.ALPHANUMERIC:return Math.floor(O/11*2);case i.KANJI:return Math.floor(O/13);case i.BYTE:default:return Math.floor(O/8)}},r.getBestVersionForData=function(w,y){let C;const T=n.from(y,n.M);if(Array.isArray(w)){if(w.length>1)return p(w,T);if(w.length===0)return 1;C=w[0]}else C=w;return l(C.mode,C.getLength(),T)},r.getEncodedBits=function(w){if(!s.isValid(w)||w<7)throw new Error("Invalid QR Code version");let y=w<<12;for(;e.getBCHDigit(y)-a>=0;)y^=o<=0;)i^=Wee<0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,s*3+1))};var J_e=Mv;const Y_e=Kp,$N=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Nv(r){this.mode=Y_e.ALPHANUMERIC,this.data=r}Nv.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},Nv.prototype.getLength=function(){return this.data.length},Nv.prototype.getBitsLength=function(){return Nv.getBitsLength(this.data.length)},Nv.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=$N.indexOf(this.data[t])*45;n+=$N.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put($N.indexOf(this.data[t]),6)};var Q_e=Nv,X_e=function(e){for(var t=[],n=e.length,i=0;i=55296&&s<=56319&&n>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){t.push(s);continue}if(s<2048){t.push(s>>6|192),t.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128);continue}if(s>=65536&&s<=1114111){t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const eEe=X_e,tEe=Kp;function Pv(r){this.mode=tEe.BYTE,typeof r=="string"&&(r=eEe(r)),this.data=new Uint8Array(r)}Pv.getBitsLength=function(e){return e*8},Pv.prototype.getLength=function(){return this.data.length},Pv.prototype.getBitsLength=function(){return Pv.getBitsLength(this.data.length)},Pv.prototype.write=function(r){for(let e=0,t=this.data.length;e=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` -Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var sEe=Ov,BN={},oEe={get exports(){return BN},set exports(r){BN=r}};(function(r){var e={single_source_shortest_paths:function(t,n,i){var s={},o={};o[n]=0;var a=e.PriorityQueue.make();a.push(n,0);for(var l,u,h,p,g,w,y,C,T;!a.empty();){l=a.pop(),u=l.value,p=l.cost,g=t[u]||{};for(h in g)g.hasOwnProperty(h)&&(w=g[h],y=p+w,C=o[h],T=typeof o[h]>"u",(T||C>y)&&(o[h]=y,a.push(h,y),s[h]=u))}if(typeof i<"u"&&typeof o[i]>"u"){var k=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(k)}return s},extract_shortest_path_from_predecessor_list:function(t,n){for(var i=[],s=n;s;)i.push(s),t[s],s=t[s];return i.reverse(),i},find_path:function(t,n,i){var s=e.single_source_shortest_paths(t,n,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,i={},s;t=t||{};for(s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var i={value:t,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(oEe),function(r){const e=Kp,t=J_e,n=Q_e,i=rEe,s=sEe,o=rf,a=Lc,l=BN;function u(k){return unescape(encodeURIComponent(k)).length}function h(k,N,O){const B=[];let z;for(;(z=k.exec(O))!==null;)B.push({data:z[0],index:z.index,mode:N,length:z[0].length});return B}function p(k){const N=h(o.NUMERIC,e.NUMERIC,k),O=h(o.ALPHANUMERIC,e.ALPHANUMERIC,k);let B,z;return a.isKanjiModeEnabled()?(B=h(o.BYTE,e.BYTE,k),z=h(o.KANJI,e.KANJI,k)):(B=h(o.BYTE_KANJI,e.BYTE,k),z=[]),N.concat(O,B,z).sort(function($,D){return $.index-D.index}).map(function($){return{data:$.data,mode:$.mode,length:$.length}})}function g(k,N){switch(N){case e.NUMERIC:return t.getBitsLength(k);case e.ALPHANUMERIC:return n.getBitsLength(k);case e.KANJI:return s.getBitsLength(k);case e.BYTE:return i.getBitsLength(k)}}function w(k){return k.reduce(function(N,O){const B=N.length-1>=0?N[N.length-1]:null;return B&&B.mode===O.mode?(N[N.length-1].data+=O.data,N):(N.push(O),N)},[])}function y(k){const N=[];for(let O=0;O=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?r.set(s+a,o+l,!0,!0):r.set(s+a,o+l,!1,!0))}}function gEe(r){const e=r.size;for(let t=8;t>a&1)===1,r.set(i,s,o,!0),r.set(s,i,o,!0)}function zN(r,e,t){const n=r.size,i=fEe.getEncodedBits(e,t);let s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?r.set(s,8,o,!0):s<8?r.set(s+1,8,o,!0):r.set(n-15+s,8,o,!0),s<8?r.set(8,n-s-1,o,!0):s<9?r.set(8,15-s-1+1,o,!0):r.set(8,15-s-1,o,!0);r.set(n-8,8,1,!0)}function wEe(r,e){const t=r.size;let n=-1,i=t-1,s=7,o=0;for(let a=t-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!r.isReserved(i,a-l)){let u=!1;o>>s&1)===1),r.set(i,a-l,u),s--,s===-1&&(o++,s=7)}if(i+=n,i<0||t<=i){i-=n,n=-n;break}}}function vEe(r,e,t){const n=new aEe;t.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),dEe.getCharCountIndicator(l.mode,r)),l.write(n)});const i=lC.getSymbolTotalCodewords(r),s=FN.getTotalCodewordsCount(r,e),o=(i-s)*8;for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const a=(o-n.getLengthInBits())/8;for(let l=0;lo===t?n:a))}selectInput(e){const t=e.target;if(t){const n=this.getInputElement(t);n==null||n.select()}}handleInput(e,t){const n=e.target,i=this.getInputElement(n);if(i){const s=i.value;e.inputType==="insertFromPaste"?this.handlePaste(i,s,t):Mr.isNumber(s)&&e.data?(this.updateInput(i,t,e.data),this.focusInputField("next",t)):this.updateInput(i,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,n){const i=t[0];if(i&&Mr.isNumber(i)){this.updateInput(e,n,i);const a=t.substring(1);if(n+140)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Xc.getSymbolTotalCodewords=function(e){return kNe[e]},Xc.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e},Xc.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');LN=e},Xc.isKanjiModeEnabled=function(){return typeof LN<"u"},Xc.toSJIS=function(e){return LN(e)};var PS={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,i){if(r.isValid(n))return n;try{return e(n)}catch{return i}}})(PS);function cie(){this.buffer=[],this.length=0}cie.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let t=0;t>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var RNe=cie;function C8(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}C8.prototype.set=function(r,e,t,n){const i=r*this.size+e;this.data[i]=t,n&&(this.reservedBit[i]=!0)},C8.prototype.get=function(r,e){return this.data[r*this.size+e]},C8.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t},C8.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var MNe=C8,lie={};(function(r){const e=Xc.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,s=e(n),a=s===145?26:Math.ceil((s-13)/(2*i-2))*2,o=[s-7];for(let l=1;l=0&&i<=7},r.from=function(i){return r.isValid(i)?parseInt(i,10):void 0},r.getPenaltyN1=function(i){const s=i.size;let a=0,o=0,l=0,u=null,f=null;for(let h=0;h=5&&(a+=e.N1+(o-5)),u=b,o=1),b=i.get(m,h),b===f?l++:(l>=5&&(a+=e.N1+(l-5)),f=b,l=1)}o>=5&&(a+=e.N1+(o-5)),l>=5&&(a+=e.N1+(l-5))}return a},r.getPenaltyN2=function(i){const s=i.size;let a=0;for(let o=0;o=10&&(o===1488||o===93)&&a++,l=l<<1&2047|i.get(f,u),f>=10&&(l===1488||l===93)&&a++}return a*e.N3},r.getPenaltyN4=function(i){let s=0;const a=i.data.length;for(let l=0;l=0;){const a=s[0];for(let l=0;l0){const s=new Uint8Array(this.degree);return s.set(n,i),s}return n};var ONe=UN,mie={},R1={},FN={};FN.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ed={};const gie="[0-9]+",NNe="[A-Z $%*+\\-./:]+";let S8="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";S8=S8.replace(/u/g,"\\u");const DNe="(?:(?![A-Z0-9 $%*+\\-./:]|"+S8+`)(?:.|[\r +]))+`;Ed.KANJI=new RegExp(S8,"g"),Ed.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ed.BYTE=new RegExp(DNe,"g"),Ed.NUMERIC=new RegExp(gie,"g"),Ed.ALPHANUMERIC=new RegExp(NNe,"g");const $Ne=new RegExp("^"+S8+"$"),BNe=new RegExp("^"+gie+"$"),LNe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ed.testKanji=function(e){return $Ne.test(e)},Ed.testNumeric=function(e){return BNe.test(e)},Ed.testAlphanumeric=function(e){return LNe.test(e)},function(r){const e=FN,t=Ed;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+i)}}r.from=function(s,a){if(r.isValid(s))return s;try{return n(s)}catch{return a}}}(R1),function(r){const e=Xc,t=OS,n=PS,i=R1,s=FN,a=7973,o=e.getBCHDigit(a);function l(m,b,v){for(let C=1;C<=40;C++)if(b<=r.getCapacity(C,v,m))return C}function u(m,b){return i.getCharCountIndicator(m,b)+4}function f(m,b){let v=0;return m.forEach(function(C){const R=u(C.mode,b);v+=R+C.getBitsLength()}),v}function h(m,b){for(let v=1;v<=40;v++)if(f(m,v)<=r.getCapacity(v,b,i.MIXED))return v}r.from=function(b,v){return s.isValid(b)?parseInt(b,10):v},r.getCapacity=function(b,v,C){if(!s.isValid(b))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=i.BYTE);const R=e.getSymbolTotalCodewords(b),k=t.getTotalCodewordsCount(b,v),P=(R-k)*8;if(C===i.MIXED)return P;const N=P-u(C,b);switch(C){case i.NUMERIC:return Math.floor(N/10*3);case i.ALPHANUMERIC:return Math.floor(N/11*2);case i.KANJI:return Math.floor(N/13);case i.BYTE:default:return Math.floor(N/8)}},r.getBestVersionForData=function(b,v){let C;const R=n.from(v,n.M);if(Array.isArray(b)){if(b.length>1)return h(b,R);if(b.length===0)return 1;C=b[0]}else C=b;return l(C.mode,C.getLength(),R)},r.getEncodedBits=function(b){if(!s.isValid(b)||b<7)throw new Error("Invalid QR Code version");let v=b<<12;for(;e.getBCHDigit(v)-o>=0;)v^=a<=0;)i^=vie<0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,s*3+1))};var jNe=M3;const zNe=R1,zN=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function P3(r){this.mode=zNe.ALPHANUMERIC,this.data=r}P3.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},P3.prototype.getLength=function(){return this.data.length},P3.prototype.getBitsLength=function(){return P3.getBitsLength(this.data.length)},P3.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=zN.indexOf(this.data[t])*45;n+=zN.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(zN.indexOf(this.data[t]),6)};var HNe=P3,qNe=function(e){for(var t=[],n=e.length,i=0;i=55296&&s<=56319&&n>i+1){var a=e.charCodeAt(i+1);a>=56320&&a<=57343&&(s=(s-55296)*1024+a-56320+65536,i+=1)}if(s<128){t.push(s);continue}if(s<2048){t.push(s>>6|192),t.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128);continue}if(s>=65536&&s<=1114111){t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const WNe=qNe,VNe=R1;function O3(r){this.mode=VNe.BYTE,typeof r=="string"&&(r=WNe(r)),this.data=new Uint8Array(r)}O3.getBitsLength=function(e){return e*8},O3.prototype.getLength=function(){return this.data.length},O3.prototype.getBitsLength=function(){return O3.getBitsLength(this.data.length)},O3.prototype.write=function(r){for(let e=0,t=this.data.length;e=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var JNe=N3,xie={exports:{}};(function(r){var e={single_source_shortest_paths:function(t,n,i){var s={},a={};a[n]=0;var o=e.PriorityQueue.make();o.push(n,0);for(var l,u,f,h,m,b,v,C,R;!o.empty();){l=o.pop(),u=l.value,h=l.cost,m=t[u]||{};for(f in m)m.hasOwnProperty(f)&&(b=m[f],v=h+b,C=a[f],R=typeof a[f]>"u",(R||C>v)&&(a[f]=v,o.push(f,v),s[f]=u))}if(typeof i<"u"&&typeof a[i]>"u"){var k=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(k)}return s},extract_shortest_path_from_predecessor_list:function(t,n){for(var i=[],s=n;s;)i.push(s),t[s],s=t[s];return i.reverse(),i},find_path:function(t,n,i){var s=e.single_source_shortest_paths(t,n,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,i={},s;t=t||{};for(s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var i={value:t,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(xie);var YNe=xie.exports;(function(r){const e=R1,t=jNe,n=HNe,i=GNe,s=JNe,a=Ed,o=Xc,l=YNe;function u(k){return unescape(encodeURIComponent(k)).length}function f(k,P,N){const $=[];let j;for(;(j=k.exec(N))!==null;)$.push({data:j[0],index:j.index,mode:P,length:j[0].length});return $}function h(k){const P=f(a.NUMERIC,e.NUMERIC,k),N=f(a.ALPHANUMERIC,e.ALPHANUMERIC,k);let $,j;return o.isKanjiModeEnabled()?($=f(a.BYTE,e.BYTE,k),j=f(a.KANJI,e.KANJI,k)):($=f(a.BYTE_KANJI,e.BYTE,k),j=[]),P.concat(N,$,j).sort(function(U,L){return U.index-L.index}).map(function(U){return{data:U.data,mode:U.mode,length:U.length}})}function m(k,P){switch(P){case e.NUMERIC:return t.getBitsLength(k);case e.ALPHANUMERIC:return n.getBitsLength(k);case e.KANJI:return s.getBitsLength(k);case e.BYTE:return i.getBitsLength(k)}}function b(k){return k.reduce(function(P,N){const $=P.length-1>=0?P[P.length-1]:null;return $&&$.mode===N.mode?(P[P.length-1].data+=N.data,P):(P.push(N),P)},[])}function v(k){const P=[];for(let N=0;N=0&&o<=6&&(l===0||l===6)||l>=0&&l<=6&&(o===0||o===6)||o>=2&&o<=4&&l>=2&&l<=4?r.set(s+o,a+l,!0,!0):r.set(s+o,a+l,!1,!0))}}function aDe(r){const e=r.size;for(let t=8;t>o&1)===1,r.set(i,s,a,!0),r.set(s,i,a,!0)}function GN(r,e,t){const n=r.size,i=nDe.getEncodedBits(e,t);let s,a;for(s=0;s<15;s++)a=(i>>s&1)===1,s<6?r.set(s,8,a,!0):s<8?r.set(s+1,8,a,!0):r.set(n-15+s,8,a,!0),s<8?r.set(8,n-s-1,a,!0):s<9?r.set(8,15-s-1+1,a,!0):r.set(8,15-s-1,a,!0);r.set(n-8,8,1,!0)}function lDe(r,e){const t=r.size;let n=-1,i=t-1,s=7,a=0;for(let o=t-1;o>0;o-=2)for(o===6&&o--;;){for(let l=0;l<2;l++)if(!r.isReserved(i,o-l)){let u=!1;a>>s&1)===1),r.set(i,o-l,u),s--,s===-1&&(a++,s=7)}if(i+=n,i<0||t<=i){i-=n,n=-n;break}}}function uDe(r,e,t){const n=new QNe;t.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),iDe.getCharCountIndicator(l.mode,r)),l.write(n)});const i=LS.getSymbolTotalCodewords(r),s=WN.getTotalCodewordsCount(r,e),a=(i-s)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const o=(a-n.getLengthInBits())/8;for(let l=0;l=7&&bEe(l,e),wEe(l,o),isNaN(n)&&(n=UN.getBestMask(l,zN.bind(null,l,t))),UN.applyMask(n,l),zN(l,t,n),{modules:l,version:e,errorCorrectionLevel:t,maskPattern:n,segments:i}}Oee.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let n=LN.M,i,s;return typeof t<"u"&&(n=LN.from(t.errorCorrectionLevel,LN.M),i=uC.from(t.version),s=UN.from(t.maskPattern),t.toSJISFunc&&lC.setToSJISFunction(t.toSJISFunc)),xEe(e,i,n,s)};var Kee={},HN={};(function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,o=n.scale||4;return{width:s,scale:s?4:o,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},r.getImageWidth=function(n,i){const s=r.getScale(n,i);return Math.floor((n+i.margin*2)*s)},r.qrToImageData=function(n,i,s){const o=i.modules.size,a=i.modules.data,l=r.getScale(o,s),u=Math.floor((o+s.margin*2)*l),h=s.margin*l,p=[s.color.light,s.color.dark];for(let g=0;g=h&&w>=h&&g"u"&&(!o||!o.getContext)&&(l=o,o=void 0),o||(u=n()),l=e.getOptions(l);const h=e.getImageWidth(s.modules.size,l),p=u.getContext("2d"),g=p.createImageData(h,h);return e.qrToImageData(g.data,s,l),t(p,u,h),p.putImageData(g,0,0),u},r.renderToDataURL=function(s,o,a){let l=a;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),l||(l={});const u=r.render(s,o,l),h=l.type||"image/png",p=l.rendererOpts||{};return u.toDataURL(h,p.quality)}}(Kee);var Zee={};const _Ee=HN;function Jee(r,e){const t=r.a/255,n=e+'="'+r.hex+'"';return t<1?n+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function qN(r,e,t){let n=r+e;return typeof t<"u"&&(n+=" "+t),n}function EEe(r,e,t){let n="",i=0,s=!1,o=0;for(let a=0;a0&&l>0&&r[a-1]||(n+=s?qN("M",l+t,.5+u+t):qN("m",i,0),i=0,s=!1),l+1':"",u="',h='viewBox="0 0 '+a+" "+a+'"',g=''+l+u+` -`;return typeof n=="function"&&n(null,g),g};const AEe=B_e,WN=Oee,Yee=Kee,CEe=Zee;function VN(r,e,t,n,i){const s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!AEe())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(i=t,t=e,e=n=void 0):o===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=t,t=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(t=e,e=n=void 0):o===2&&!e.getContext&&(n=t,t=e,e=void 0),new Promise(function(l,u){try{const h=WN.create(t,n);l(r(h,e,n))}catch(h){u(h)}})}try{const l=WN.create(t,n);i(null,r(l,e,n))}catch(l){i(l)}}kv.create=WN.create,kv.toCanvas=VN.bind(null,Yee.render),kv.toDataURL=VN.bind(null,Yee.renderToDataURL),kv.toString=VN.bind(null,function(r,e,t){return CEe.render(r,t)});const SEe=.1,Qee=2.5,Pd=7;function GN(r,e,t){return r===e?!1:(r-e<0?e-r:r-e)<=t+SEe}function IEe(r,e){const t=Array.prototype.slice.call(kv.create(r,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const TEe={generate(r,e,t){const n="#141414",i="transparent",o=[],a=IEe(r,"Q"),l=e/a.length,u=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];u.forEach(({x:C,y:T})=>{const k=(a.length-Pd)*l*C,N=(a.length-Pd)*l*T,O=.45;for(let B=0;B=7&&cDe(l,e),lDe(l,a),isNaN(n)&&(n=qN.getBestMask(l,GN.bind(null,l,t))),qN.applyMask(n,l),GN(l,t,n),{modules:l,version:e,errorCorrectionLevel:t,maskPattern:n,segments:i}}oie.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let n=HN.M,i,s;return typeof t<"u"&&(n=HN.from(t.errorCorrectionLevel,HN.M),i=US.from(t.version),s=qN.from(t.maskPattern),t.toSJISFunc&&LS.setToSJISFunction(t.toSJISFunc)),dDe(e,i,n,s)};var _ie={},KN={};(function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:s,scale:s?4:a,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},r.getImageWidth=function(n,i){const s=r.getScale(n,i);return Math.floor((n+i.margin*2)*s)},r.qrToImageData=function(n,i,s){const a=i.modules.size,o=i.modules.data,l=r.getScale(a,s),u=Math.floor((a+s.margin*2)*l),f=s.margin*l,h=[s.color.light,s.color.dark];for(let m=0;m=f&&b>=f&&m"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(u=n()),l=e.getOptions(l);const f=e.getImageWidth(s.modules.size,l),h=u.getContext("2d"),m=h.createImageData(f,f);return e.qrToImageData(m.data,s,l),t(h,u,f),h.putImageData(m,0,0),u},r.renderToDataURL=function(s,a,o){let l=o;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const u=r.render(s,a,l),f=l.type||"image/png",h=l.rendererOpts||{};return u.toDataURL(f,h.quality)}}(_ie);var Eie={};const hDe=KN;function Cie(r,e){const t=r.a/255,n=e+'="'+r.hex+'"';return t<1?n+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function ZN(r,e,t){let n=r+e;return typeof t<"u"&&(n+=" "+t),n}function pDe(r,e,t){let n="",i=0,s=!1,a=0;for(let o=0;o0&&l>0&&r[o-1]||(n+=s?ZN("M",l+t,.5+u+t):ZN("m",i,0),i=0,s=!1),l+1':"",u="',f='viewBox="0 0 '+o+" "+o+'"',m=''+l+u+` +`;return typeof n=="function"&&n(null,m),m};const mDe=TNe,JN=oie,Aie=_ie,gDe=Eie;function YN(r,e,t,n,i){const s=[].slice.call(arguments,1),a=s.length,o=typeof s[a-1]=="function";if(!o&&!mDe())throw new Error("Callback required as last argument");if(o){if(a<2)throw new Error("Too few arguments provided");a===2?(i=t,t=e,e=n=void 0):a===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=t,t=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=e,e=n=void 0):a===2&&!e.getContext&&(n=t,t=e,e=void 0),new Promise(function(l,u){try{const f=JN.create(t,n);l(r(f,e,n))}catch(f){u(f)}})}try{const l=JN.create(t,n);i(null,r(l,e,n))}catch(l){i(l)}}R3.create=JN.create,R3.toCanvas=YN.bind(null,Aie.render),R3.toDataURL=YN.bind(null,Aie.renderToDataURL),R3.toString=YN.bind(null,function(r,e,t){return gDe.render(r,t)});const bDe=.1,Sie=2.5,l0=7;function QN(r,e,t){return r===e?!1:(r-e<0?e-r:r-e)<=t+bDe}function vDe(r,e){const t=Array.prototype.slice.call(R3.create(r,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((i,s,a)=>(a%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const wDe={generate(r,e,t){const n="#141414",i="transparent",a=[],o=vDe(r,"Q"),l=e/o.length,u=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];u.forEach(({x:C,y:R})=>{const k=(o.length-l0)*l*C,P=(o.length-l0)*l*R,N=.45;for(let $=0;$ - `)}});const h=Math.floor((t+25)/l),p=a.length/2-h/2,g=a.length/2+h/2-1,w=[];a.forEach((C,T)=>{C.forEach((k,N)=>{if(a[T][N]&&!(Ta.length-(Pd+1)&&Na.length-(Pd+1))&&!(T>p&&Tp&&N{var k;y[C]?(k=y[C])==null||k.push(T):y[C]=[T]}),Object.entries(y).map(([C,T])=>{const k=T.filter(N=>T.every(O=>!GN(N,O,l)));return[Number(C),k]}).forEach(([C,T])=>{T.forEach(k=>{o.push(At``)})}),Object.entries(y).filter(([C,T])=>T.length>1).map(([C,T])=>{const k=T.filter(N=>T.some(O=>GN(N,O,l)));return[Number(C),k]}).map(([C,T])=>{T.sort((N,O)=>NB.some(z=>GN(N,z,l)));O?O.push(N):k.push([N])}return[C,k.map(N=>[N[0],N[N.length-1]])]}).forEach(([C,T])=>{T.forEach(([k,N])=>{o.push(At` + `)}});const f=Math.floor((t+25)/l),h=o.length/2-f/2,m=o.length/2+f/2-1,b=[];o.forEach((C,R)=>{C.forEach((k,P)=>{if(o[R][P]&&!(Ro.length-(l0+1)&&Po.length-(l0+1))&&!(R>h&&Rh&&P{var k;v[C]?(k=v[C])==null||k.push(R):v[C]=[R]}),Object.entries(v).map(([C,R])=>{const k=R.filter(P=>R.every(N=>!QN(P,N,l)));return[Number(C),k]}).forEach(([C,R])=>{R.forEach(k=>{a.push(_t``)})}),Object.entries(v).filter(([C,R])=>R.length>1).map(([C,R])=>{const k=R.filter(P=>R.some(N=>QN(P,N,l)));return[Number(C),k]}).map(([C,R])=>{R.sort((P,N)=>P$.some(j=>QN(P,j,l)));N?N.push(P):k.push([P])}return[C,k.map(P=>[P[0],P[P.length-1]])]}).forEach(([C,R])=>{R.forEach(([k,P])=>{a.push(_t` - `)})}),o}},REe=Ze` + `)})}),a}},yDe=Ze` :host { position: relative; user-select: none; @@ -4325,19 +4342,19 @@ Minimum version required to store current data is: `+s+`. color: #3396ff !important; transform: translateY(-50%) translateX(-50%) scale(0.25); } -`;var am=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let nf=class extends Fe{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,ce`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return At` +`;var Yg=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Cd=class extends He{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,le`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return _t` - ${TEe.generate(this.uri,e,this.arenaClear?0:e/4)} + ${wDe.generate(this.uri,e,this.arenaClear?0:e/4)} - `}templateVisual(){return this.imageSrc?ce``:ce``}};nf.styles=[ar,REe],am([pe()],nf.prototype,"uri",void 0),am([pe({type:Number})],nf.prototype,"size",void 0),am([pe()],nf.prototype,"theme",void 0),am([pe()],nf.prototype,"imageSrc",void 0),am([pe()],nf.prototype,"alt",void 0),am([pe({type:Boolean})],nf.prototype,"arenaClear",void 0),nf=am([Le("wui-qr-code")],nf);const kEe=Ze` + `}templateVisual(){return this.imageSrc?le``:le``}};Cd.styles=[lr,yDe],Yg([me()],Cd.prototype,"uri",void 0),Yg([me({type:Number})],Cd.prototype,"size",void 0),Yg([me()],Cd.prototype,"theme",void 0),Yg([me()],Cd.prototype,"imageSrc",void 0),Yg([me()],Cd.prototype,"alt",void 0),Yg([me({type:Boolean})],Cd.prototype,"arenaClear",void 0),Cd=Yg([Fe("wui-qr-code")],Cd);const xDe=Ze` :host { position: relative; display: inline-block; width: 100%; } -`;var MEe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hC=class extends Fe{constructor(){super(...arguments),this.inputComponentRef=tm()}render(){return ce` +`;var _De=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let FS=class extends He{constructor(){super(...arguments),this.inputComponentRef=Wg()}render(){return le` - `}clearValue(){const e=this.inputComponentRef.value,t=e==null?void 0:e.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};hC.styles=[ar,kEe],hC=MEe([Le("wui-search-bar")],hC);const NEe=Ze` + `}clearValue(){const e=this.inputComponentRef.value,t=e==null?void 0:e.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};FS.styles=[lr,xDe],FS=_De([Fe("wui-search-bar")],FS);const EDe=Ze` :host { display: flex; column-gap: var(--wui-spacing-xs); @@ -4361,7 +4378,7 @@ Minimum version required to store current data is: `+s+`. 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 0px 8px 22px -6px rgba(0, 0, 0, 0.15); } -`;var n6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Zp=class extends Fe{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return ce` +`;var I8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let M1=class extends He{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return le` ${this.message} - `}};Zp.styles=[ar,NEe],n6([pe()],Zp.prototype,"backgroundColor",void 0),n6([pe()],Zp.prototype,"iconColor",void 0),n6([pe()],Zp.prototype,"icon",void 0),n6([pe()],Zp.prototype,"message",void 0),Zp=n6([Le("wui-snackbar")],Zp);const PEe=Ze` + `}};M1.styles=[lr,EDe],I8([me()],M1.prototype,"backgroundColor",void 0),I8([me()],M1.prototype,"iconColor",void 0),I8([me()],M1.prototype,"icon",void 0),I8([me()],M1.prototype,"message",void 0),M1=I8([Fe("wui-snackbar")],M1);const CDe=Ze` :host { display: inline-flex; background-color: var(--wui-gray-glass-002); @@ -4479,10 +4496,10 @@ Minimum version required to store current data is: `+s+`. button { border-radius: var(--wui-border-radius-3xl); } -`;var Jp=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let qu=class extends Fe{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=` +`;var P1=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ff=class extends He{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=` --local-tab: ${this.activeTab}; --local-tab-width: ${this.localTabWidth}; - `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,t)=>{var i;const n=t===this.activeTab;return ce` + `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,t)=>{var i;const n=t===this.activeTab;return le` - `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?ce``:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const n=this.buttons[this.activeTab],i=this.buttons[e],s=n==null?void 0:n.querySelector("wui-text"),o=i==null?void 0:i.querySelector("wui-text"),a=i==null?void 0:i.getBoundingClientRect(),l=o==null?void 0:o.getBoundingClientRect();n&&s&&!t&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&l&&o&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(a.width+l.width)+6}px`,i.animate([{width:`${a.width+l.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};qu.styles=[ar,en,PEe],Jp([pe({type:Array})],qu.prototype,"tabs",void 0),Jp([pe()],qu.prototype,"onTabChange",void 0),Jp([pe({type:Array})],qu.prototype,"buttons",void 0),Jp([pe({type:Boolean})],qu.prototype,"disabled",void 0),Jp([pe()],qu.prototype,"localTabWidth",void 0),Jp([Oe()],qu.prototype,"activeTab",void 0),Jp([Oe()],qu.prototype,"isDense",void 0),qu=Jp([Le("wui-tabs")],qu);const OEe=Ze` + `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?le``:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const n=this.buttons[this.activeTab],i=this.buttons[e],s=n==null?void 0:n.querySelector("wui-text"),a=i==null?void 0:i.querySelector("wui-text"),o=i==null?void 0:i.getBoundingClientRect(),l=a==null?void 0:a.getBoundingClientRect();n&&s&&!t&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&o&&l&&a&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(o.width+l.width)+6}px`,i.animate([{width:`${o.width+l.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),a.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};ff.styles=[lr,sn,CDe],P1([me({type:Array})],ff.prototype,"tabs",void 0),P1([me()],ff.prototype,"onTabChange",void 0),P1([me({type:Array})],ff.prototype,"buttons",void 0),P1([me({type:Boolean})],ff.prototype,"disabled",void 0),P1([me()],ff.prototype,"localTabWidth",void 0),P1([De()],ff.prototype,"activeTab",void 0),P1([De()],ff.prototype,"isDense",void 0),ff=P1([Fe("wui-tabs")],ff);const ADe=Ze` :host { display: block; } @@ -4514,19 +4531,19 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-s); box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010); } -`;var KN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Dv=class extends Fe{constructor(){super(...arguments),this.text=""}render(){return ce` +`;var XN=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let D3=class extends He{constructor(){super(...arguments),this.text=""}render(){return le` - `}tokenTemplate(){return this.imageSrc?ce``:ce` + `}tokenTemplate(){return this.imageSrc?le``:le` - `}};Dv.styles=[ar,en,OEe],KN([pe()],Dv.prototype,"imageSrc",void 0),KN([pe()],Dv.prototype,"text",void 0),Dv=KN([Le("wui-token-button")],Dv);const DEe=Ze` + `}};D3.styles=[lr,sn,ADe],XN([me()],D3.prototype,"imageSrc",void 0),XN([me()],D3.prototype,"text",void 0),D3=XN([Fe("wui-token-button")],D3);const SDe=Ze` :host { display: block; padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); @@ -4579,13 +4596,13 @@ Minimum version required to store current data is: `+s+`. right: 0%; transform: translate(65%, -50%) rotate(270deg); } -`;var fC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let cm=class extends Fe{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,ce`=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Qg=class extends He{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,le` - ${this.message}`}};cm.styles=[ar,en,DEe],fC([pe()],cm.prototype,"placement",void 0),fC([pe()],cm.prototype,"variant",void 0),fC([pe()],cm.prototype,"message",void 0),cm=fC([Le("wui-tooltip")],cm);const $Ee=Ze` + ${this.message}`}};Qg.styles=[lr,sn,SDe],jS([me()],Qg.prototype,"placement",void 0),jS([me()],Qg.prototype,"variant",void 0),jS([me()],Qg.prototype,"message",void 0),Qg=jS([Fe("wui-tooltip")],Qg);const IDe=Ze` :host { position: relative; } @@ -4622,14 +4639,14 @@ Minimum version required to store current data is: `+s+`. background-color: var(--wui-accent-glass-020); } } -`;var ZN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let $v=class extends Fe{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return ce` - `}onMouseEnter(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-tooltip");e&&(e.style.display="flex",e==null||e.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease",duration:250}))}onMouseLeave(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-tooltip");e&&(e.style.display="none",e==null||e.animate([{opacity:1},{opacity:0}],{fill:"forwards",easing:"ease",duration:200}))}};$v.styles=[ar,en,$Ee],ZN([pe()],$v.prototype,"text",void 0),ZN([pe()],$v.prototype,"icon",void 0),$v=ZN([Le("wui-tooltip-select")],$v);const BEe=Ze` + `}onMouseEnter(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-tooltip");e&&(e.style.display="flex",e==null||e.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease",duration:250}))}onMouseLeave(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-tooltip");e&&(e.style.display="none",e==null||e.animate([{opacity:1},{opacity:0}],{fill:"forwards",easing:"ease",duration:200}))}};$3.styles=[lr,sn,IDe],eD([me()],$3.prototype,"text",void 0),eD([me()],$3.prototype,"icon",void 0),$3=eD([Fe("wui-tooltip-select")],$3);const TDe=Ze` :host > wui-flex { cursor: pointer; display: flex; @@ -4681,27 +4698,27 @@ Minimum version required to store current data is: `+s+`. width: 36px; height: 36px; } -`;var Bv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Od=class extends Fe{constructor(){super(...arguments),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0}render(){var t;const e=(t=Lo.multiply(this.price,this.amount))==null?void 0:t.toFixed(3);return ce` +`;var B3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let u0=class extends He{constructor(){super(...arguments),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0}render(){var t;const e=(t=Ga.multiply(this.price,this.amount))==null?void 0:t.toFixed(3);return le` ${this.visualTemplate()} ${this.name} - ${e?ce` + ${e?le` - $${Tr.formatNumberToLocalString(e,3)} + $${Mr.formatNumberToLocalString(e,3)} `:null} ${this.symbol} - ${this.amount&&ce`${Tr.formatNumberToLocalString(this.amount,4)}${Mr.formatNumberToLocalString(this.amount,4)}`} - `}visualTemplate(){return this.imageSrc?ce``:null}};Od.styles=[ar,en,BEe],Bv([pe()],Od.prototype,"imageSrc",void 0),Bv([pe()],Od.prototype,"name",void 0),Bv([pe()],Od.prototype,"symbol",void 0),Bv([pe()],Od.prototype,"price",void 0),Bv([pe()],Od.prototype,"amount",void 0),Od=Bv([Le("wui-token-list-item")],Od);const LEe=Ze` + `}visualTemplate(){return this.imageSrc?le``:null}};u0.styles=[lr,sn,TDe],B3([me()],u0.prototype,"imageSrc",void 0),B3([me()],u0.prototype,"name",void 0),B3([me()],u0.prototype,"symbol",void 0),B3([me()],u0.prototype,"price",void 0),B3([me()],u0.prototype,"amount",void 0),u0=B3([Fe("wui-token-list-item")],u0);const kDe=Ze` :host { display: flex; justify-content: center; @@ -4717,12 +4734,12 @@ Minimum version required to store current data is: `+s+`. width: 32px; height: 32px; } -`;var dC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let lm=class extends Fe{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,ce`${this.templateVisual()}`}templateVisual(){return this.imageSrc?ce``:ce`=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Xg=class extends He{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,le`${this.templateVisual()}`}templateVisual(){return this.imageSrc?le``:le``}};lm.styles=[ar,LEe],dC([pe()],lm.prototype,"imageSrc",void 0),dC([pe()],lm.prototype,"alt",void 0),dC([pe({type:Boolean})],lm.prototype,"borderRadiusFull",void 0),lm=dC([Le("wui-visual-thumbnail")],lm);const UEe=Ze` + >`}};Xg.styles=[lr,kDe],zS([me()],Xg.prototype,"imageSrc",void 0),zS([me()],Xg.prototype,"alt",void 0),zS([me({type:Boolean})],Xg.prototype,"borderRadiusFull",void 0),Xg=zS([Fe("wui-visual-thumbnail")],Xg);const RDe=Ze` :host { display: block; } @@ -4745,7 +4762,7 @@ Minimum version required to store current data is: `+s+`. button:active { background-color: var(--wui-accent-glass-020) !important; } -`;var pC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let um=class extends Fe{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return ce` +`;var HS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let eb=class extends He{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return le` - `}};um.styles=[ar,en,UEe],pC([pe()],um.prototype,"label",void 0),pC([pe()],um.prototype,"description",void 0),pC([pe()],um.prototype,"icon",void 0),um=pC([Le("wui-notice-card")],um);const FEe=Ze` + `}};eb.styles=[lr,sn,RDe],HS([me()],eb.prototype,"label",void 0),HS([me()],eb.prototype,"description",void 0),HS([me()],eb.prototype,"icon",void 0),eb=HS([Fe("wui-notice-card")],eb);const MDe=Ze` button { height: auto; position: relative; @@ -4805,14 +4822,14 @@ Minimum version required to store current data is: `+s+`. overflow-x: auto; overflow-wrap: anywhere; } -`;var JN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const YN=100;let Lv=class extends Fe{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout(()=>{this.checkHeight()},1)}checkHeight(){this.updateComplete.then(()=>{var n,i;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(".heightContent"),t=(i=this.shadowRoot)==null?void 0:i.querySelector(".textContent");if(e&&t){this.scrollElement=e;const s=t==null?void 0:t.scrollHeight;s&&s>YN&&(this.enableAccordion=!0,this.scrollHeightElement=s,this.requestUpdate())}})}render(){return ce` +`;var tD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const rD=100;let L3=class extends He{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout(()=>{this.checkHeight()},1)}checkHeight(){this.updateComplete.then(()=>{var n,i;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(".heightContent"),t=(i=this.shadowRoot)==null?void 0:i.querySelector(".textContent");if(e&&t){this.scrollElement=e;const s=t==null?void 0:t.scrollHeight;s&&s>rD&&(this.enableAccordion=!0,this.scrollHeightElement=s,this.requestUpdate())}})}render(){return le` - `}onClick(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?`${YN}px`:`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:`${YN}px`}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?ce` `:null}};Lv.styles=[ar,en,FEe],JN([pe()],Lv.prototype,"textTitle",void 0),JN([pe()],Lv.prototype,"overflowedContent",void 0),Lv=JN([Le("wui-list-accordion")],Lv);const jEe=Ze` + `}onClick(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?`${rD}px`:`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:`${rD}px`}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?le` `:null}};L3.styles=[lr,sn,MDe],tD([me()],L3.prototype,"textTitle",void 0),tD([me()],L3.prototype,"overflowedContent",void 0),L3=tD([Fe("wui-list-accordion")],L3);const PDe=Ze` :host { display: flex; column-gap: var(--wui-spacing-s); @@ -4843,14 +4860,14 @@ Minimum version required to store current data is: `+s+`. width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); } -`;var gC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hm=class extends Fe{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return ce` +`;var qS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let tb=class extends He{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return le` ${this.textTitle} ${this.templateContent()} - `}templateContent(){return this.imageSrc?ce``:this.textValue?ce` ${this.textValue} `:ce``}};hm.styles=[ar,en,jEe],gC([pe()],hm.prototype,"imageSrc",void 0),gC([pe()],hm.prototype,"textTitle",void 0),gC([pe()],hm.prototype,"textValue",void 0),hm=gC([Le("wui-list-content")],hm);const zEe=Ze` + `}templateContent(){return this.imageSrc?le``:this.textValue?le` ${this.textValue} `:le``}};tb.styles=[lr,sn,PDe],qS([me()],tb.prototype,"imageSrc",void 0),qS([me()],tb.prototype,"textTitle",void 0),qS([me()],tb.prototype,"textValue",void 0),tb=qS([Fe("wui-list-content")],tb);const ODe=Ze` button { column-gap: var(--wui-spacing-s); padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); @@ -4883,16 +4900,16 @@ Minimum version required to store current data is: `+s+`. background-color: var(--wui-gray-glass-010); color: var(--wui-color-fg-300); } -`;var i6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Yp=class extends Fe{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.transparent=!1}render(){return ce` +`;var T8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let O1=class extends He{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.transparent=!1}render(){return le` - `}templateNetworkImage(){return this.imageSrc?ce``:this.imageSrc?null:ce``}};Yp.styles=[ar,en,zEe],i6([pe()],Yp.prototype,"imageSrc",void 0),i6([pe()],Yp.prototype,"name",void 0),i6([pe({type:Boolean})],Yp.prototype,"disabled",void 0),i6([pe({type:Boolean})],Yp.prototype,"transparent",void 0),Yp=i6([Le("wui-list-network")],Yp);const HEe=Ze` + >`:this.imageSrc?null:le``}};O1.styles=[lr,sn,ODe],T8([me()],O1.prototype,"imageSrc",void 0),T8([me()],O1.prototype,"name",void 0),T8([me({type:Boolean})],O1.prototype,"disabled",void 0),T8([me({type:Boolean})],O1.prototype,"transparent",void 0),O1=T8([Fe("wui-list-network")],O1);const NDe=Ze` :host { display: flex; flex-direction: column; @@ -4914,7 +4931,7 @@ Minimum version required to store current data is: `+s+`. width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); } -`;var Uv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Dd=class extends Fe{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return ce` +`;var U3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let f0=class extends He{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return le` Sending @@ -4933,7 +4950,7 @@ Minimum version required to store current data is: `+s+`. title=${this.receiverAddress} > - `}templateNetworkVisual(){return this.networkImageUrl?ce``:ce``}};Dd.styles=[ar,en,HEe],Uv([pe()],Dd.prototype,"amount",void 0),Uv([pe()],Dd.prototype,"networkCurreny",void 0),Uv([pe()],Dd.prototype,"networkImageUrl",void 0),Uv([pe()],Dd.prototype,"receiverAddress",void 0),Uv([pe()],Dd.prototype,"addressExplorerUrl",void 0),Dd=Uv([Le("wui-list-wallet-transaction")],Dd);const qEe=Ze` + `}templateNetworkVisual(){return this.networkImageUrl?le``:le``}};f0.styles=[lr,sn,NDe],U3([me()],f0.prototype,"amount",void 0),U3([me()],f0.prototype,"networkCurreny",void 0),U3([me()],f0.prototype,"networkImageUrl",void 0),U3([me()],f0.prototype,"receiverAddress",void 0),U3([me()],f0.prototype,"addressExplorerUrl",void 0),f0=U3([Fe("wui-list-wallet-transaction")],f0);const DDe=Ze` :host { width: 100%; } @@ -4986,7 +5003,7 @@ Minimum version required to store current data is: `+s+`. bottom: 0; transform: translate(20%, 20%); } -`;var Uc=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ha=class extends Fe{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return ce` +`;var el=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let _o=class extends He{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return le` ${this.imageTemplate()} @@ -4998,25 +5015,25 @@ Minimum version required to store current data is: `+s+`. + ${this.purchaseValue} ${this.purchaseCurrency} - ${this.inProgress?ce``:ce`${this.date}`} + ${this.inProgress?le``:le`${this.date}`} - `}async fetchTokenImage(){await Nr._fetchTokenImage(this.purchaseCurrency)}statusIconTemplate(){return this.inProgress?null:this.completed?this.boughtIconTemplate():this.errorIconTemplate()}errorIconTemplate(){return ce``}imageTemplate(){const e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return ce` + >`}imageTemplate(){const e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return le` - `}boughtIconTemplate(){return ce``}boughtIconTemplate(){return le``}};ha.styles=[ar,en,qEe],Uc([pe({type:Boolean})],ha.prototype,"disabled",void 0),Uc([pe()],ha.prototype,"color",void 0),Uc([pe()],ha.prototype,"label",void 0),Uc([pe()],ha.prototype,"purchaseValue",void 0),Uc([pe()],ha.prototype,"purchaseCurrency",void 0),Uc([pe()],ha.prototype,"date",void 0),Uc([pe({type:Boolean})],ha.prototype,"completed",void 0),Uc([pe({type:Boolean})],ha.prototype,"inProgress",void 0),Uc([pe({type:Boolean})],ha.prototype,"failed",void 0),Uc([pe()],ha.prototype,"onClick",void 0),Uc([pe()],ha.prototype,"symbol",void 0),Uc([pe()],ha.prototype,"icon",void 0),ha=Uc([Le("wui-onramp-activity-item")],ha);const WEe=Ze` + >`}};_o.styles=[lr,sn,DDe],el([me({type:Boolean})],_o.prototype,"disabled",void 0),el([me()],_o.prototype,"color",void 0),el([me()],_o.prototype,"label",void 0),el([me()],_o.prototype,"purchaseValue",void 0),el([me()],_o.prototype,"purchaseCurrency",void 0),el([me()],_o.prototype,"date",void 0),el([me({type:Boolean})],_o.prototype,"completed",void 0),el([me({type:Boolean})],_o.prototype,"inProgress",void 0),el([me({type:Boolean})],_o.prototype,"failed",void 0),el([me()],_o.prototype,"onClick",void 0),el([me()],_o.prototype,"symbol",void 0),el([me()],_o.prototype,"icon",void 0),_o=el([Fe("wui-onramp-activity-item")],_o);const $De=Ze` button { padding: var(--wui-spacing-s); border-radius: var(--wui-border-radius-xs); @@ -5071,9 +5088,9 @@ Minimum version required to store current data is: `+s+`. 0 0 0 3px var(--wui-gray-glass-005), 0 0 0 3px var(--wui-color-modal-bg); } -`;var Qp=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Wu=class extends Fe{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return ce` +`;var N1=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let df=class extends He{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return le` - `}networksTemplate(){var n;const e=lr.getRequestedCaipNetworks(),t=(n=e==null?void 0:e.filter(i=>i==null?void 0:i.imageId))==null?void 0:n.slice(0,5);return ce` + `}networksTemplate(){var n;const e=dr.getRequestedCaipNetworks(),t=(n=e==null?void 0:e.filter(i=>i==null?void 0:i.imageId))==null?void 0:n.slice(0,5);return le` - ${t==null?void 0:t.map(i=>ce` + ${t==null?void 0:t.map(i=>le` - + `)} - `}};Wu.styles=[ar,en,WEe],Qp([pe({type:Boolean})],Wu.prototype,"disabled",void 0),Qp([pe()],Wu.prototype,"color",void 0),Qp([pe()],Wu.prototype,"name",void 0),Qp([pe()],Wu.prototype,"label",void 0),Qp([pe()],Wu.prototype,"feeRange",void 0),Qp([pe({type:Boolean})],Wu.prototype,"loading",void 0),Qp([pe()],Wu.prototype,"onClick",void 0),Wu=Qp([Le("wui-onramp-provider-item")],Wu);const VEe=Ze` + `}};df.styles=[lr,sn,$De],N1([me({type:Boolean})],df.prototype,"disabled",void 0),N1([me()],df.prototype,"color",void 0),N1([me()],df.prototype,"name",void 0),N1([me()],df.prototype,"label",void 0),N1([me()],df.prototype,"feeRange",void 0),N1([me({type:Boolean})],df.prototype,"loading",void 0),N1([me()],df.prototype,"onClick",void 0),df=N1([Fe("wui-onramp-provider-item")],df);const BDe=Ze` button { display: flex; gap: var(--wui-spacing-3xs); @@ -5120,10 +5137,10 @@ Minimum version required to store current data is: `+s+`. background-color: var(--wui-gray-glass-060); } } -`;var Xee=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let s6=class extends Fe{constructor(){super(...arguments),this.text=""}render(){return ce``}};s6.styles=[ar,en,VEe],Xee([pe()],s6.prototype,"text",void 0),s6=Xee([Le("wui-promo")],s6);const GEe=Ze` + `}};k8.styles=[lr,sn,BDe],Iie([me()],k8.prototype,"text",void 0),k8=Iie([Fe("wui-promo")],k8);const LDe=Ze` span { font-weight: 500; font-size: 40px; @@ -5136,7 +5153,7 @@ Minimum version required to store current data is: `+s+`. .pennies { color: var(--wui-color-fg-200); } -`;var QN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Fv=class extends Fe{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return ce`$${this.dollars}.${this.pennies}`}};Fv.styles=[ar,GEe],QN([pe()],Fv.prototype,"dollars",void 0),QN([pe()],Fv.prototype,"pennies",void 0),Fv=QN([Le("wui-balance")],Fv);const KEe=Ze` +`;var nD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let F3=class extends He{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return le`$${this.dollars}.${this.pennies}`}};F3.styles=[lr,LDe],nD([me()],F3.prototype,"dollars",void 0),nD([me()],F3.prototype,"pennies",void 0),F3=nD([Fe("wui-balance")],F3);const UDe=Ze` button { background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-3xl); @@ -5170,7 +5187,7 @@ Minimum version required to store current data is: `+s+`. outline: 2px solid var(--wui-color-bg-200); background-color: var(--wui-color-bg-250); } -`;var jv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let $d=class extends Fe{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.isProfileName=!1,this.address="",this.icon="chevronBottom"}render(){return ce``}networkImageTemplate(){return this.networkSrc?ce``:ce` + `}networkImageTemplate(){return this.networkSrc?le``:le` - `}};$d.styles=[ar,en,KEe],jv([pe()],$d.prototype,"networkSrc",void 0),jv([pe()],$d.prototype,"avatarSrc",void 0),jv([pe({type:Boolean})],$d.prototype,"isProfileName",void 0),jv([pe()],$d.prototype,"address",void 0),jv([pe()],$d.prototype,"icon",void 0),$d=jv([Le("wui-profile-button")],$d);const ZEe=Ze` + `}};d0.styles=[lr,sn,UDe],j3([me()],d0.prototype,"networkSrc",void 0),j3([me()],d0.prototype,"avatarSrc",void 0),j3([me({type:Boolean})],d0.prototype,"isProfileName",void 0),j3([me()],d0.prototype,"address",void 0),j3([me()],d0.prototype,"icon",void 0),d0=j3([Fe("wui-profile-button")],d0);const FDe=Ze` button { border: 1px solid var(--wui-gray-glass-010); border-radius: var(--wui-border-radius-3xl); @@ -5373,13 +5390,13 @@ Minimum version required to store current data is: `+s+`. button[data-variant='error']:active { background-color: var(--wui-error-glass-020); } -`;var zv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Bd=class extends Fe{constructor(){super(...arguments),this.variant="fill",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.text=""}render(){const t=this.variant==="success"||this.variant==="transparent"||this.variant==="shadeSmall"?"small-600":"paragraph-600";return ce` +`;var z3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let h0=class extends He{constructor(){super(...arguments),this.variant="fill",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.text=""}render(){const t=this.variant==="success"||this.variant==="transparent"||this.variant==="shadeSmall"?"small-600":"paragraph-600";return le` - `}};Bd.styles=[ar,en,ZEe],zv([pe()],Bd.prototype,"variant",void 0),zv([pe()],Bd.prototype,"imageSrc",void 0),zv([pe({type:Boolean})],Bd.prototype,"disabled",void 0),zv([pe()],Bd.prototype,"icon",void 0),zv([pe()],Bd.prototype,"text",void 0),Bd=zv([Le("wui-chip-button")],Bd);const JEe=Ze` + `}};h0.styles=[lr,sn,FDe],z3([me()],h0.prototype,"variant",void 0),z3([me()],h0.prototype,"imageSrc",void 0),z3([me({type:Boolean})],h0.prototype,"disabled",void 0),z3([me()],h0.prototype,"icon",void 0),z3([me()],h0.prototype,"text",void 0),h0=z3([Fe("wui-chip-button")],h0);const jDe=Ze` button { display: flex; gap: var(--wui-spacing-xl); @@ -5406,7 +5423,7 @@ Minimum version required to store current data is: `+s+`. 0 0 0 3px var(--wui-gray-glass-002), 0 0 0 3px var(--wui-color-modal-bg); } -`;var XN=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Hv=class extends Fe{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return ce` +`;var iD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let H3=class extends He{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return le` - `}networksTemplate(){const e=this.networkImages.slice(0,5);return ce` - ${e==null?void 0:e.map(t=>ce` `)} - `}};Hv.styles=[ar,en,JEe],XN([pe({type:Array})],Hv.prototype,"networkImages",void 0),XN([pe()],Hv.prototype,"text",void 0),Hv=XN([Le("wui-compatible-network")],Hv);const YEe=Ze` + `}networksTemplate(){const e=this.networkImages.slice(0,5);return le` + ${e==null?void 0:e.map(t=>le` `)} + `}};H3.styles=[lr,sn,jDe],iD([me({type:Array})],H3.prototype,"networkImages",void 0),iD([me()],H3.prototype,"text",void 0),H3=iD([Fe("wui-compatible-network")],H3);const zDe=Ze` wui-flex { width: 100%; background-color: var(--wui-gray-glass-005); @@ -5424,7 +5441,7 @@ Minimum version required to store current data is: `+s+`. padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs); } -`;var eP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let qv=class extends Fe{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return ce` +`;var sD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let q3=class extends He{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return le` ${this.text} - `}};qv.styles=[ar,en,YEe],eP([pe()],qv.prototype,"icon",void 0),eP([pe()],qv.prototype,"text",void 0),qv=eP([Le("wui-banner")],qv);const QEe=Ze` + `}};q3.styles=[lr,sn,zDe],sD([me()],q3.prototype,"icon",void 0),sD([me()],q3.prototype,"text",void 0),q3=sD([Fe("wui-banner")],q3);const HDe=Ze` button { padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); display: flex; @@ -5455,20 +5472,20 @@ Minimum version required to store current data is: `+s+`. height: var(--wui-spacing-3xl); border-radius: var(--wui-border-radius-3xl); } -`;var fm=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let sf=class extends Fe{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return ce` +`;var rb=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ad=class extends He{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return le` - `}};sf.styles=[ar,en,QEe],fm([pe()],sf.prototype,"tokenName",void 0),fm([pe()],sf.prototype,"tokenImageUrl",void 0),fm([pe({type:Number})],sf.prototype,"tokenValue",void 0),fm([pe()],sf.prototype,"tokenAmount",void 0),fm([pe()],sf.prototype,"tokenCurrency",void 0),fm([pe({type:Boolean})],sf.prototype,"clickable",void 0),sf=fm([Le("wui-list-token")],sf);const XEe=Ze` + `}};Ad.styles=[lr,sn,HDe],rb([me()],Ad.prototype,"tokenName",void 0),rb([me()],Ad.prototype,"tokenImageUrl",void 0),rb([me({type:Number})],Ad.prototype,"tokenValue",void 0),rb([me()],Ad.prototype,"tokenAmount",void 0),rb([me()],Ad.prototype,"tokenCurrency",void 0),rb([me({type:Boolean})],Ad.prototype,"clickable",void 0),Ad=rb([Fe("wui-list-token")],Ad);const qDe=Ze` button { width: 100%; display: flex; @@ -5488,7 +5505,7 @@ Minimum version required to store current data is: `+s+`. wui-flex { width: auto; } -`;var Xp=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Vu=class extends Fe{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return ce` +`;var D1=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hf=class extends He{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return le` - `}titleTemplate(){return this.tag?ce` ${this.text}${this.tag} - `:ce`${this.text}`}};Vu.styles=[ar,en,XEe],Xp([pe()],Vu.prototype,"icon",void 0),Xp([pe()],Vu.prototype,"text",void 0),Xp([pe()],Vu.prototype,"description",void 0),Xp([pe()],Vu.prototype,"tag",void 0),Xp([pe()],Vu.prototype,"iconBackgroundColor",void 0),Xp([pe()],Vu.prototype,"iconColor",void 0),Xp([pe({type:Boolean})],Vu.prototype,"disabled",void 0),Vu=Xp([Le("wui-list-description")],Vu);const eAe=Ze` + `:le`${this.text}`}};hf.styles=[lr,sn,qDe],D1([me()],hf.prototype,"icon",void 0),D1([me()],hf.prototype,"text",void 0),D1([me()],hf.prototype,"description",void 0),D1([me()],hf.prototype,"tag",void 0),D1([me()],hf.prototype,"iconBackgroundColor",void 0),D1([me()],hf.prototype,"iconColor",void 0),D1([me({type:Boolean})],hf.prototype,"disabled",void 0),hf=D1([Fe("wui-list-description")],hf);const WDe=Ze` :host { position: relative; display: inline-block; @@ -5539,8 +5556,8 @@ Minimum version required to store current data is: `+s+`. input::placeholder { color: var(--wui-color-fg-275); } -`,tAe=/[.*+?^${}()|[\]\\]/gu,rAe=/[0-9,.]/u;var mC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let dm=class extends Fe{constructor(){super(...arguments),this.inputElementRef=tm(),this.disabled=!1,this.value="",this.placeholder="0"}render(){var e;return(e=this.inputElementRef)!=null&&e.value&&this.value&&(this.inputElementRef.value.value=this.value),ce`=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let nb=class extends He{constructor(){super(...arguments),this.inputElementRef=Wg(),this.disabled=!1,this.value="",this.placeholder="0"}render(){var e;return(e=this.inputElementRef)!=null&&e.value&&this.value&&(this.inputElementRef.value.value=this.value),le` `}dispatchInputChangeEvent(e){var n,i;const t=e.data;t&&!rAe.test(t)&&(n=this.inputElementRef)!=null&&n.value&&(this.inputElementRef.value.value=this.value.replace(new RegExp(t.replace(tAe,"\\$&"),"gu"),"")),this.dispatchEvent(new CustomEvent("inputChange",{detail:(i=this.inputElementRef.value)==null?void 0:i.value,bubbles:!0,composed:!0}))}};dm.styles=[ar,en,eAe],mC([pe({type:Boolean})],dm.prototype,"disabled",void 0),mC([pe({type:String})],dm.prototype,"value",void 0),mC([pe({type:String})],dm.prototype,"placeholder",void 0),dm=mC([Le("wui-input-amount")],dm);const nAe=Ze` + /> `}dispatchInputChangeEvent(e){var n,i;const t=e.data;t&&!GDe.test(t)&&(n=this.inputElementRef)!=null&&n.value&&(this.inputElementRef.value.value=this.value.replace(new RegExp(t.replace(VDe,"\\$&"),"gu"),"")),this.dispatchEvent(new CustomEvent("inputChange",{detail:(i=this.inputElementRef.value)==null?void 0:i.value,bubbles:!0,composed:!0}))}};nb.styles=[lr,sn,WDe],WS([me({type:Boolean})],nb.prototype,"disabled",void 0),WS([me({type:String})],nb.prototype,"value",void 0),WS([me({type:String})],nb.prototype,"placeholder",void 0),nb=WS([Fe("wui-input-amount")],nb);const KDe=Ze` :host { display: flex; gap: var(--wui-spacing-xs); @@ -5570,14 +5587,14 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-3xl); box-shadow: 0 0 0 2px var(--wui-gray-glass-002); } -`;var o6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let e1=class extends Fe{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return ce`${this.text} - ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?ce``:this.imageSrc?ce``:ce``}};e1.styles=[ar,en,nAe],o6([pe()],e1.prototype,"text",void 0),o6([pe()],e1.prototype,"address",void 0),o6([pe()],e1.prototype,"imageSrc",void 0),o6([pe({type:Boolean})],e1.prototype,"isAddress",void 0),e1=o6([Le("wui-preview-item")],e1);const iAe=Ze` +`;var R8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let $1=class extends He{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return le`${this.text} + ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?le``:this.imageSrc?le``:le``}};$1.styles=[lr,sn,KDe],R8([me()],$1.prototype,"text",void 0),R8([me()],$1.prototype,"address",void 0),R8([me()],$1.prototype,"imageSrc",void 0),R8([me({type:Boolean})],$1.prototype,"isAddress",void 0),$1=R8([Fe("wui-preview-item")],$1);const ZDe=Ze` :host { display: grid; width: inherit; height: inherit; } -`;var Hl=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Pa=class extends Fe{render(){return this.style.cssText=` +`;var ru=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let zo=class extends He{render(){return this.style.cssText=` grid-template-rows: ${this.gridTemplateRows}; grid-template-columns: ${this.gridTemplateColumns}; justify-items: ${this.justifyItems}; @@ -5587,15 +5604,15 @@ Minimum version required to store current data is: `+s+`. column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; - padding-top: ${this.padding&&Tr.getSpacingStyles(this.padding,0)}; - padding-right: ${this.padding&&Tr.getSpacingStyles(this.padding,1)}; - padding-bottom: ${this.padding&&Tr.getSpacingStyles(this.padding,2)}; - padding-left: ${this.padding&&Tr.getSpacingStyles(this.padding,3)}; - margin-top: ${this.margin&&Tr.getSpacingStyles(this.margin,0)}; - margin-right: ${this.margin&&Tr.getSpacingStyles(this.margin,1)}; - margin-bottom: ${this.margin&&Tr.getSpacingStyles(this.margin,2)}; - margin-left: ${this.margin&&Tr.getSpacingStyles(this.margin,3)}; - `,ce``}};Pa.styles=[ar,iAe],Hl([pe()],Pa.prototype,"gridTemplateRows",void 0),Hl([pe()],Pa.prototype,"gridTemplateColumns",void 0),Hl([pe()],Pa.prototype,"justifyItems",void 0),Hl([pe()],Pa.prototype,"alignItems",void 0),Hl([pe()],Pa.prototype,"justifyContent",void 0),Hl([pe()],Pa.prototype,"alignContent",void 0),Hl([pe()],Pa.prototype,"columnGap",void 0),Hl([pe()],Pa.prototype,"rowGap",void 0),Hl([pe()],Pa.prototype,"gap",void 0),Hl([pe()],Pa.prototype,"padding",void 0),Hl([pe()],Pa.prototype,"margin",void 0),Pa=Hl([Le("wui-grid")],Pa);const sAe=Ze` + padding-top: ${this.padding&&Mr.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&Mr.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&Mr.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&Mr.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&Mr.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&Mr.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&Mr.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&Mr.getSpacingStyles(this.margin,3)}; + `,le``}};zo.styles=[lr,ZDe],ru([me()],zo.prototype,"gridTemplateRows",void 0),ru([me()],zo.prototype,"gridTemplateColumns",void 0),ru([me()],zo.prototype,"justifyItems",void 0),ru([me()],zo.prototype,"alignItems",void 0),ru([me()],zo.prototype,"justifyContent",void 0),ru([me()],zo.prototype,"alignContent",void 0),ru([me()],zo.prototype,"columnGap",void 0),ru([me()],zo.prototype,"rowGap",void 0),ru([me()],zo.prototype,"gap",void 0),ru([me()],zo.prototype,"padding",void 0),ru([me()],zo.prototype,"margin",void 0),zo=ru([Fe("wui-grid")],zo);const JDe=Ze` :host { position: relative; display: flex; @@ -5611,51 +5628,51 @@ Minimum version required to store current data is: `+s+`. padding: 0px 10px; background-color: var(--wui-color-modal-bg); } -`;var ete=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let a6=class extends Fe{constructor(){super(...arguments),this.text=""}render(){return ce`${this.template()}`}template(){return this.text?ce`${this.text}`:null}};a6.styles=[ar,sAe],ete([pe()],a6.prototype,"text",void 0),a6=ete([Le("wui-separator")],a6);const c6={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,s=e[0]||0,o=e[1]||0;return ti?o:(o-s)/(i-n)*(t-n)+s}},oAe=3,aAe=["receive","deposit","borrow","claim"],cAe=["withdraw","repay","burn"],t1={getMonthName(r){const e=new Date;return e.setMonth(r),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(r,e){const t=hN.getYear(),n=this.getMonthName(e);return r===t?n:`${n} ${r}`},getTransactionImages(r){const[e,t]=r,n=Boolean(e)&&(r==null?void 0:r.every(o=>Boolean(o.nft_info))),i=(r==null?void 0:r.length)>1;return(r==null?void 0:r.length)===2&&!n?[this.getTransactionImage(e),this.getTransactionImage(t)]:i?r.map(o=>this.getTransactionImage(o)):[this.getTransactionImage(e)]},getTransactionImage(r){return{type:t1.getTransactionTransferTokenType(r),url:t1.getTransactionImageURL(r)}},getTransactionImageURL(r){var i,s,o,a,l;let e;const t=Boolean(r==null?void 0:r.nft_info),n=Boolean(r==null?void 0:r.fungible_info);return r&&t?e=(o=(s=(i=r==null?void 0:r.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:o.url:r&&n&&(e=(l=(a=r==null?void 0:r.fungible_info)==null?void 0:a.icon)==null?void 0:l.url),e},getTransactionTransferTokenType(r){if(r!=null&&r.fungible_info)return"FUNGIBLE";if(r!=null&&r.nft_info)return"NFT"},getTransactionDescriptions(r){var p,g,w;const e=(p=r==null?void 0:r.metadata)==null?void 0:p.operationType,t=r==null?void 0:r.transfers,n=((g=r==null?void 0:r.transfers)==null?void 0:g.length)>0,i=((w=r==null?void 0:r.transfers)==null?void 0:w.length)>1,s=n&&(t==null?void 0:t.every(y=>Boolean(y==null?void 0:y.fungible_info))),[o,a]=t;let l=this.getTransferDescription(o),u=this.getTransferDescription(a);if(!n)return(e==="send"||e==="receive")&&s?(l=Tr.getTruncateString({string:r==null?void 0:r.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),u=Tr.getTruncateString({string:r==null?void 0:r.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[l,u]):[r.metadata.status];if(i)return t.map(y=>this.getTransferDescription(y));let h="";return aAe.includes(e)?h="+":cAe.includes(e)&&(h="-"),l=h.concat(l),[l]},getTransferDescription(r){var t;let e="";return r&&(r!=null&&r.nft_info?e=((t=r==null?void 0:r.nft_info)==null?void 0:t.name)||"-":r!=null&&r.fungible_info&&(e=this.getFungibleTransferDescription(r)||"-")),e},getFungibleTransferDescription(r){var n;return r?[this.getQuantityFixedValue(r==null?void 0:r.quantity.numeric),(n=r==null?void 0:r.fungible_info)==null?void 0:n.symbol].join(" ").trim():null},getQuantityFixedValue(r){return r?parseFloat(r).toFixed(oAe):null}},lAe=Object.freeze(Object.defineProperty({__proto__:null,MathUtil:c6,TransactionUtil:t1,UiHelperUtil:Tr,get WuiAccountButton(){return lc},get WuiAllWalletsImage(){return V4},get WuiAvatar(){return Jg},get WuiBalance(){return Fv},get WuiBanner(){return qv},get WuiButton(){return $c},get WuiCard(){return HA},get WuiCardSelect(){return Qh},get WuiCardSelectLoader(){return G4},get WuiChip(){return Xh},get WuiChipButton(){return Bd},get WuiCompatibleNetwork(){return Hv},get WuiConnectButton(){return Cv},get WuiCtaButton(){return em},get WuiDetailsGroup(){return YA},get WuiDetailsGroupItem(){return Z4},get WuiEmailInput(){return nm},get WuiFlex(){return ua},get WuiGrid(){return Pa},get WuiIcon(){return Vg},get WuiIconBox(){return zl},get WuiIconLink(){return Vp},get WuiImage(){return Gg},get WuiInputAmount(){return dm},get WuiInputElement(){return Q4},get WuiInputNumeric(){return Sv},get WuiInputText(){return ju},get WuiLink(){return Iv},get WuiListAccordion(){return Lv},get WuiListContent(){return hm},get WuiListDescription(){return Vu},get WuiListItem(){return Bc},get WuiListNetwork(){return Yp},get WuiListToken(){return sf},get WuiListWallet(){return hc},get WuiListWalletTransaction(){return Dd},get WuiLoadingHexagon(){return VA},get WuiLoadingSpinner(){return Ev},get WuiLoadingThumbnail(){return W4},get WuiLogo(){return X4},get WuiLogoSelect(){return Rv},get WuiNetworkButton(){return sm},get WuiNetworkImage(){return qp},get WuiNoticeCard(){return um},get WuiOnRampActivityItem(){return ha},get WuiOnRampProviderItem(){return Wu},get WuiOtp(){return om},get WuiPreviewItem(){return e1},get WuiProfileButton(){return $d},get WuiPromo(){return s6},get WuiQrCode(){return nf},get WuiSearchBar(){return hC},get WuiSeparator(){return a6},get WuiShimmer(){return Kg},get WuiSnackbar(){return Zp},get WuiTabs(){return qu},get WuiTag(){return Tv},get WuiText(){return Zg},get WuiTokenButton(){return Dv},get WuiTokenListItem(){return Od},get WuiTooltip(){return cm},get WuiTooltipSelect(){return $v},get WuiTransactionListItem(){return uc},get WuiTransactionListItemLoader(){return eC},get WuiTransactionVisual(){return tf},get WuiVisual(){return Av},get WuiVisualThumbnail(){return lm},get WuiWalletImage(){return Jh},convertInputMaskBottomSvg:vee,convertInputMaskTopSvg:yee,customElement:Le,initializeTheming:xee,setColorTheme:yN,setThemeVariables:_ee},Symbol.toStringTag,{value:"Module"}));var ql=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Fc=class extends Fe{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=zt.state.address,this.balanceVal=zt.state.balance,this.balanceSymbol=zt.state.balanceSymbol,this.profileName=zt.state.profileName,this.profileImage=zt.state.profileImage,this.network=lr.state.caipNetwork,this.isUnsupportedChain=lr.state.isUnsupportedChain,this.unsubscribe.push(zt.subscribe(e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")}),lr.subscribeKey("caipNetwork",e=>this.network=e),lr.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=Yn.getNetworkImage(this.network),t=this.balance==="show";return ce` +`;var Tie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let M8=class extends He{constructor(){super(...arguments),this.text=""}render(){return le`${this.template()}`}template(){return this.text?le`${this.text}`:null}};M8.styles=[lr,JDe],Tie([me()],M8.prototype,"text",void 0),M8=Tie([Fe("wui-separator")],M8);const P8={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,s=e[0]||0,a=e[1]||0;return ti?a:(a-s)/(i-n)*(t-n)+s}},YDe=3,QDe=["receive","deposit","borrow","claim"],XDe=["withdraw","repay","burn"],B1={getMonthName(r){const e=new Date;return e.setMonth(r),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(r,e){const t=hN.getYear(),n=this.getMonthName(e);return r===t?n:`${n} ${r}`},getTransactionImages(r){const[e,t]=r,n=!!e&&(r==null?void 0:r.every(a=>!!a.nft_info)),i=(r==null?void 0:r.length)>1;return(r==null?void 0:r.length)===2&&!n?[this.getTransactionImage(e),this.getTransactionImage(t)]:i?r.map(a=>this.getTransactionImage(a)):[this.getTransactionImage(e)]},getTransactionImage(r){return{type:B1.getTransactionTransferTokenType(r),url:B1.getTransactionImageURL(r)}},getTransactionImageURL(r){var i,s,a,o,l;let e;const t=!!(r!=null&&r.nft_info),n=!!(r!=null&&r.fungible_info);return r&&t?e=(a=(s=(i=r==null?void 0:r.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:a.url:r&&n&&(e=(l=(o=r==null?void 0:r.fungible_info)==null?void 0:o.icon)==null?void 0:l.url),e},getTransactionTransferTokenType(r){if(r!=null&&r.fungible_info)return"FUNGIBLE";if(r!=null&&r.nft_info)return"NFT"},getTransactionDescriptions(r){var h,m,b;const e=(h=r==null?void 0:r.metadata)==null?void 0:h.operationType,t=r==null?void 0:r.transfers,n=((m=r==null?void 0:r.transfers)==null?void 0:m.length)>0,i=((b=r==null?void 0:r.transfers)==null?void 0:b.length)>1,s=n&&(t==null?void 0:t.every(v=>!!(v!=null&&v.fungible_info))),[a,o]=t;let l=this.getTransferDescription(a),u=this.getTransferDescription(o);if(!n)return(e==="send"||e==="receive")&&s?(l=Mr.getTruncateString({string:r==null?void 0:r.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),u=Mr.getTruncateString({string:r==null?void 0:r.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[l,u]):[r.metadata.status];if(i)return t.map(v=>this.getTransferDescription(v));let f="";return QDe.includes(e)?f="+":XDe.includes(e)&&(f="-"),l=f.concat(l),[l]},getTransferDescription(r){var t;let e="";return r&&(r!=null&&r.nft_info?e=((t=r==null?void 0:r.nft_info)==null?void 0:t.name)||"-":r!=null&&r.fungible_info&&(e=this.getFungibleTransferDescription(r)||"-")),e},getFungibleTransferDescription(r){var n;return r?[this.getQuantityFixedValue(r==null?void 0:r.quantity.numeric),(n=r==null?void 0:r.fungible_info)==null?void 0:n.symbol].join(" ").trim():null},getQuantityFixedValue(r){return r?parseFloat(r).toFixed(YDe):null}},e$e=Object.freeze(Object.defineProperty({__proto__:null,MathUtil:P8,TransactionUtil:B1,UiHelperUtil:Mr,get WuiAccountButton(){return wc},get WuiAllWalletsImage(){return g8},get WuiAvatar(){return Fg},get WuiBalance(){return F3},get WuiBanner(){return q3},get WuiButton(){return Yc},get WuiCard(){return vS},get WuiCardSelect(){return wd},get WuiCardSelectLoader(){return b8},get WuiChip(){return yd},get WuiChipButton(){return h0},get WuiCompatibleNetwork(){return H3},get WuiConnectButton(){return A3},get WuiCtaButton(){return qg},get WuiDetailsGroup(){return SS},get WuiDetailsGroupItem(){return w8},get WuiEmailInput(){return Gg},get WuiFlex(){return xo},get WuiGrid(){return zo},get WuiIcon(){return $g},get WuiIconBox(){return tu},get WuiIconLink(){return T1},get WuiImage(){return Bg},get WuiInputAmount(){return nb},get WuiInputElement(){return _8},get WuiInputNumeric(){return S3},get WuiInputText(){return cf},get WuiLink(){return I3},get WuiListAccordion(){return L3},get WuiListContent(){return tb},get WuiListDescription(){return hf},get WuiListItem(){return Qc},get WuiListNetwork(){return O1},get WuiListToken(){return Ad},get WuiListWallet(){return xc},get WuiListWalletTransaction(){return f0},get WuiLoadingHexagon(){return xS},get WuiLoadingSpinner(){return E3},get WuiLoadingThumbnail(){return m8},get WuiLogo(){return E8},get WuiLogoSelect(){return k3},get WuiNetworkButton(){return Zg},get WuiNetworkImage(){return S1},get WuiNoticeCard(){return eb},get WuiOnRampActivityItem(){return _o},get WuiOnRampProviderItem(){return df},get WuiOtp(){return Jg},get WuiPreviewItem(){return $1},get WuiProfileButton(){return d0},get WuiPromo(){return k8},get WuiQrCode(){return Cd},get WuiSearchBar(){return FS},get WuiSeparator(){return M8},get WuiShimmer(){return Lg},get WuiSnackbar(){return M1},get WuiTabs(){return ff},get WuiTag(){return T3},get WuiText(){return Ug},get WuiTokenButton(){return D3},get WuiTokenListItem(){return u0},get WuiTooltip(){return Qg},get WuiTooltipSelect(){return $3},get WuiTransactionListItem(){return yc},get WuiTransactionListItemLoader(){return kS},get WuiTransactionVisual(){return _d},get WuiVisual(){return C3},get WuiVisualThumbnail(){return Xg},get WuiWalletImage(){return bd},convertInputMaskBottomSvg:Vne,convertInputMaskTopSvg:Gne,customElement:Fe,initializeTheming:Kne,setColorTheme:SN,setThemeVariables:Zne},Symbol.toStringTag,{value:"Module"}));var nu=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let tl=class extends He{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=zt.state.address,this.balanceVal=zt.state.balance,this.balanceSymbol=zt.state.balanceSymbol,this.profileName=zt.state.profileName,this.profileImage=zt.state.profileImage,this.network=dr.state.caipNetwork,this.isUnsupportedChain=dr.state.isUnsupportedChain,this.unsubscribe.push(zt.subscribe(e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")}),dr.subscribeKey("caipNetwork",e=>this.network=e),dr.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=Qn.getNetworkImage(this.network),t=this.balance==="show";return le` - `}onClick(){this.isUnsupportedChain?Zr.open({view:"UnsupportedChain"}):Zr.open()}};ql([pe({type:Boolean})],Fc.prototype,"disabled",void 0),ql([pe()],Fc.prototype,"balance",void 0),ql([pe()],Fc.prototype,"charsStart",void 0),ql([pe()],Fc.prototype,"charsEnd",void 0),ql([Oe()],Fc.prototype,"address",void 0),ql([Oe()],Fc.prototype,"balanceVal",void 0),ql([Oe()],Fc.prototype,"balanceSymbol",void 0),ql([Oe()],Fc.prototype,"profileName",void 0),ql([Oe()],Fc.prototype,"profileImage",void 0),ql([Oe()],Fc.prototype,"network",void 0),ql([Oe()],Fc.prototype,"isUnsupportedChain",void 0),Fc=ql([Le("w3m-account-button")],Fc);const uAe=Ze` + `}onClick(){this.isUnsupportedChain?Xr.open({view:"UnsupportedChain"}):Xr.open()}};nu([me({type:Boolean})],tl.prototype,"disabled",void 0),nu([me()],tl.prototype,"balance",void 0),nu([me()],tl.prototype,"charsStart",void 0),nu([me()],tl.prototype,"charsEnd",void 0),nu([De()],tl.prototype,"address",void 0),nu([De()],tl.prototype,"balanceVal",void 0),nu([De()],tl.prototype,"balanceSymbol",void 0),nu([De()],tl.prototype,"profileName",void 0),nu([De()],tl.prototype,"profileImage",void 0),nu([De()],tl.prototype,"network",void 0),nu([De()],tl.prototype,"isUnsupportedChain",void 0),tl=nu([Fe("w3m-account-button")],tl);const t$e=Ze` :host { display: block; width: max-content; } -`;var Ld=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Gu=class extends Fe{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=zt.state.isConnected,this.unsubscribe.push(zt.subscribeKey("isConnected",e=>{this.isAccount=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.isAccount?ce` +`;var p0=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let pf=class extends He{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=zt.state.isConnected,this.unsubscribe.push(zt.subscribeKey("isConnected",e=>{this.isAccount=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.isAccount?le` - `:ce` + `:le` - `}};Gu.styles=uAe,Ld([pe({type:Boolean})],Gu.prototype,"disabled",void 0),Ld([pe()],Gu.prototype,"balance",void 0),Ld([pe()],Gu.prototype,"size",void 0),Ld([pe()],Gu.prototype,"label",void 0),Ld([pe()],Gu.prototype,"loadingLabel",void 0),Ld([pe()],Gu.prototype,"charsStart",void 0),Ld([pe()],Gu.prototype,"charsEnd",void 0),Ld([Oe()],Gu.prototype,"isAccount",void 0),Gu=Ld([Le("w3m-button")],Gu);var Wv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let pm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=Zr.state.open,this.loading=Zr.state.loading,this.unsubscribe.push(Zr.subscribe(e=>{this.open=e.open,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.loading||this.open;return ce` + `}};pf.styles=t$e,p0([me({type:Boolean})],pf.prototype,"disabled",void 0),p0([me()],pf.prototype,"balance",void 0),p0([me()],pf.prototype,"size",void 0),p0([me()],pf.prototype,"label",void 0),p0([me()],pf.prototype,"loadingLabel",void 0),p0([me()],pf.prototype,"charsStart",void 0),p0([me()],pf.prototype,"charsEnd",void 0),p0([De()],pf.prototype,"isAccount",void 0),pf=p0([Fe("w3m-button")],pf);var W3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ib=class extends He{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=Xr.state.open,this.loading=Xr.state.loading,this.unsubscribe.push(Xr.subscribe(e=>{this.open=e.open,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.loading||this.open;return le` ${e?this.loadingLabel:this.label} - `}onClick(){this.open?Zr.close():this.loading||Zr.open()}};Wv([pe()],pm.prototype,"size",void 0),Wv([pe()],pm.prototype,"label",void 0),Wv([pe()],pm.prototype,"loadingLabel",void 0),Wv([Oe()],pm.prototype,"open",void 0),Wv([Oe()],pm.prototype,"loading",void 0),pm=Wv([Le("w3m-connect-button")],pm);const hAe=Ze` + `}onClick(){this.open?Xr.close():this.loading||Xr.open()}};W3([me()],ib.prototype,"size",void 0),W3([me()],ib.prototype,"label",void 0),W3([me()],ib.prototype,"loadingLabel",void 0),W3([De()],ib.prototype,"open",void 0),W3([De()],ib.prototype,"loading",void 0),ib=W3([Fe("w3m-connect-button")],ib);const r$e=Ze` :host { z-index: var(--w3m-z-index); display: block; @@ -5733,7 +5750,7 @@ Minimum version required to store current data is: `+s+`. animation-name: slide-in; } } -`;var bC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const tte="scroll-lock";let gm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=Zr.state.open,this.caipAddress=zt.state.caipAddress,this.isSiweEnabled=hr.state.isSiweEnabled,this.initializeTheming(),Nr.prefetch(),this.unsubscribe.push(Zr.subscribeKey("open",e=>e?this.onOpen():this.onClose()),zt.subscribe(e=>this.onNewAccountState(e))),yr.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.open?ce` +`;var VS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const kie="scroll-lock";let sb=class extends He{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=Xr.state.open,this.caipAddress=zt.state.caipAddress,this.isSiweEnabled=pr.state.isSiweEnabled,this.initializeTheming(),$r.prefetch(),this.unsubscribe.push(Xr.subscribeKey("open",e=>e?this.onOpen():this.onClose()),zt.subscribe(e=>this.onNewAccountState(e))),Cr.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.open?le` @@ -5741,7 +5758,7 @@ Minimum version required to store current data is: `+s+`. - `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){if(this.isSiweEnabled){const{SIWEController:e}=await Promise.resolve().then(()=>MT);e.state.status!=="success"&&await Ur.disconnect()}Zr.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=Zs.state,n=Tr.getColorTheme(t);xee(e,n)}async onClose(){this.onScrollUnlock(),await this.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,dn.hide(),this.open=!1,this.onRemoveKeyboardListener()}async onOpen(){this.onScrollLock(),this.open=!0,await this.animate([{opacity:0},{opacity:1}],{duration:200,easing:"ease",fill:"forwards"}).finished,this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=tte,e.textContent=` + `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){if(this.isSiweEnabled){const{SIWEController:e}=await Promise.resolve().then(()=>bR);e.state.status!=="success"&&await Gr.disconnect()}Xr.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=ea.state,n=Mr.getColorTheme(t);Kne(e,n)}async onClose(){this.onScrollUnlock(),await this.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,bn.hide(),this.open=!1,this.onRemoveKeyboardListener()}async onOpen(){this.onScrollLock(),this.open=!0,await this.animate([{opacity:0},{opacity:1}],{duration:200,easing:"ease",fill:"forwards"}).finished,this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=kie,e.textContent=` html, body { touch-action: none; overflow: hidden; @@ -5750,26 +5767,26 @@ Minimum version required to store current data is: `+s+`. w3m-modal { pointer-events: auto; } - `,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${tte}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",n=>{if(n.key==="Escape")this.handleClose();else if(n.key==="Tab"){const{tagName:i}=n.target;i&&!i.includes("W3M-")&&!i.includes("WUI-")&&(e==null||e.focus())}},this.abortController)}onRemoveKeyboardListener(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}async onNewAccountState(e){const{isConnected:t,caipAddress:n}=e;if(this.isSiweEnabled){const{SIWEController:i}=await Promise.resolve().then(()=>MT);t&&!this.caipAddress&&(this.caipAddress=n),t&&n&&this.caipAddress!==n&&(await i.signOut(),this.onSiweNavigation(),this.caipAddress=n);try{const s=await i.getSession();s&&!t?await i.signOut():t&&!s&&this.onSiweNavigation()}catch{t&&this.onSiweNavigation()}}}onSiweNavigation(){this.open?et.push("ConnectingSiwe"):Zr.open({view:"ConnectingSiwe"})}};gm.styles=hAe,bC([Oe()],gm.prototype,"open",void 0),bC([Oe()],gm.prototype,"caipAddress",void 0),bC([Oe()],gm.prototype,"isSiweEnabled",void 0),gm=bC([Le("w3m-modal")],gm);const fAe=Object.freeze(Object.defineProperty({__proto__:null,get W3mModal(){return gm}},Symbol.toStringTag,{value:"Module"})),dAe=Ze` + `,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${kie}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",n=>{if(n.key==="Escape")this.handleClose();else if(n.key==="Tab"){const{tagName:i}=n.target;i&&!i.includes("W3M-")&&!i.includes("WUI-")&&(e==null||e.focus())}},this.abortController)}onRemoveKeyboardListener(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}async onNewAccountState(e){const{isConnected:t,caipAddress:n}=e;if(this.isSiweEnabled){const{SIWEController:i}=await Promise.resolve().then(()=>bR);t&&!this.caipAddress&&(this.caipAddress=n),t&&n&&this.caipAddress!==n&&(await i.signOut(),this.onSiweNavigation(),this.caipAddress=n);try{const s=await i.getSession();s&&!t?await i.signOut():t&&!s&&this.onSiweNavigation()}catch{t&&this.onSiweNavigation()}}}onSiweNavigation(){this.open?it.push("ConnectingSiwe"):Xr.open({view:"ConnectingSiwe"})}};sb.styles=r$e,VS([De()],sb.prototype,"open",void 0),VS([De()],sb.prototype,"caipAddress",void 0),VS([De()],sb.prototype,"isSiweEnabled",void 0),sb=VS([Fe("w3m-modal")],sb);const n$e=Object.freeze(Object.defineProperty({__proto__:null,get W3mModal(){return sb}},Symbol.toStringTag,{value:"Module"})),i$e=Ze` :host { display: block; width: max-content; } -`;var Vv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let r1=class extends Fe{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=lr.state.caipNetwork,this.connected=zt.state.isConnected,this.loading=Zr.state.loading,this.isUnsupportedChain=lr.state.isUnsupportedChain,this.unsubscribe.push(lr.subscribeKey("caipNetwork",e=>this.network=e),zt.subscribeKey("isConnected",e=>this.connected=e),Zr.subscribeKey("loading",e=>this.loading=e),lr.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return ce` +`;var V3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let L1=class extends He{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=dr.state.caipNetwork,this.connected=zt.state.isConnected,this.loading=Xr.state.loading,this.isUnsupportedChain=dr.state.isUnsupportedChain,this.unsubscribe.push(dr.subscribeKey("caipNetwork",e=>this.network=e),zt.subscribeKey("isConnected",e=>this.connected=e),Xr.subscribeKey("loading",e=>this.loading=e),dr.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return le` ${this.isUnsupportedChain?"Switch Network":((e=this.network)==null?void 0:e.name)??(this.connected?"Unknown Network":"Select Network")} - `}onClick(){this.loading||(yr.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Zr.open({view:"Networks"}))}};r1.styles=dAe,Vv([pe({type:Boolean})],r1.prototype,"disabled",void 0),Vv([Oe()],r1.prototype,"network",void 0),Vv([Oe()],r1.prototype,"connected",void 0),Vv([Oe()],r1.prototype,"loading",void 0),Vv([Oe()],r1.prototype,"isUnsupportedChain",void 0),r1=Vv([Le("w3m-network-button")],r1);const pAe=Ze` + `}onClick(){this.loading||(Cr.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Xr.open({view:"Networks"}))}};L1.styles=i$e,V3([me({type:Boolean})],L1.prototype,"disabled",void 0),V3([De()],L1.prototype,"network",void 0),V3([De()],L1.prototype,"connected",void 0),V3([De()],L1.prototype,"loading",void 0),V3([De()],L1.prototype,"isUnsupportedChain",void 0),L1=V3([Fe("w3m-network-button")],L1);const s$e=Ze` :host { display: block; will-change: transform, opacity; } -`;var rte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let wC=class extends Fe{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=et.state.view,this.unsubscribe.push(et.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(async([e])=>{const t=`${e==null?void 0:e.contentRect.height}px`;this.prevHeight!=="0px"&&(await this.animate([{height:this.prevHeight},{height:t}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=t}),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){var e;(e=this.resizeObserver)==null||e.unobserve(this.getWrapper()),this.unsubscribe.forEach(t=>t())}render(){return ce`
      ${this.viewTemplate()}
      `}viewTemplate(){switch(this.view){case"Connect":return ce``;case"ConnectingWalletConnect":return ce``;case"ConnectingExternal":return ce``;case"ConnectingSiwe":return ce``;case"AllWallets":return ce``;case"Networks":return ce``;case"SwitchNetwork":return ce``;case"Account":return ce``;case"AccountSettings":return ce``;case"WhatIsAWallet":return ce``;case"WhatIsANetwork":return ce``;case"GetWallet":return ce``;case"Downloads":return ce``;case"EmailVerifyOtp":return ce``;case"EmailVerifyDevice":return ce``;case"ApproveTransaction":return ce``;case"Transactions":return ce``;case"UpgradeEmailWallet":return ce``;case"UpgradeToSmartAccount":return ce``;case"UpdateEmailWallet":return ce``;case"UpdateEmailPrimaryOtp":return ce``;case"UpdateEmailSecondaryOtp":return ce``;case"UnsupportedChain":return ce``;case"OnRampProviders":return ce``;case"OnRampActivity":return ce``;case"OnRampTokenSelect":return ce``;case"OnRampFiatSelect":return ce``;case"WhatIsABuy":return ce``;case"BuyInProgress":return ce``;case"WalletReceive":return ce``;case"WalletCompatibleNetworks":return ce``;case"Convert":return ce``;case"ConvertSelectToken":return ce``;case"ConvertPreview":return ce``;case"WalletSend":return ce``;case"WalletSendSelectToken":return ce``;case"WalletSendPreview":return ce``;default:return ce``}}async onViewChange(e){const{history:t}=et.state;let n=-10,i=10;t.length=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let GS=class extends He{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=it.state.view,this.unsubscribe.push(it.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(async([e])=>{const t=`${e==null?void 0:e.contentRect.height}px`;this.prevHeight!=="0px"&&(await this.animate([{height:this.prevHeight},{height:t}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=t}),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){var e;(e=this.resizeObserver)==null||e.unobserve(this.getWrapper()),this.unsubscribe.forEach(t=>t())}render(){return le`
      ${this.viewTemplate()}
      `}viewTemplate(){switch(this.view){case"Connect":return le``;case"ConnectingWalletConnect":return le``;case"ConnectingExternal":return le``;case"ConnectingSiwe":return le``;case"AllWallets":return le``;case"Networks":return le``;case"SwitchNetwork":return le``;case"Account":return le``;case"AccountSettings":return le``;case"WhatIsAWallet":return le``;case"WhatIsANetwork":return le``;case"GetWallet":return le``;case"Downloads":return le``;case"EmailVerifyOtp":return le``;case"EmailVerifyDevice":return le``;case"ApproveTransaction":return le``;case"Transactions":return le``;case"UpgradeEmailWallet":return le``;case"UpgradeToSmartAccount":return le``;case"UpdateEmailWallet":return le``;case"UpdateEmailPrimaryOtp":return le``;case"UpdateEmailSecondaryOtp":return le``;case"UnsupportedChain":return le``;case"OnRampProviders":return le``;case"OnRampActivity":return le``;case"OnRampTokenSelect":return le``;case"OnRampFiatSelect":return le``;case"WhatIsABuy":return le``;case"BuyInProgress":return le``;case"WalletReceive":return le``;case"WalletCompatibleNetworks":return le``;case"Convert":return le``;case"ConvertSelectToken":return le``;case"ConvertPreview":return le``;case"WalletSend":return le``;case"WalletSendSelectToken":return le``;case"WalletSendPreview":return le``;default:return le``}}async onViewChange(e){const{history:t}=it.state;let n=-10,i=10;t.length wui-flex { width: 100%; max-width: 360px; @@ -5783,7 +5800,7 @@ Minimum version required to store current data is: `+s+`. .amounts-container { width: 100%; } -`;var n1=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const mAe={USD:"$",EUR:"€",GBP:"£"},bAe=[100,250,500,1e3];let of=class extends Fe{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=zt.state.isConnected,this.loading=Zr.state.loading,this.paymentCurrency=zn.state.paymentCurrency,this.paymentAmount=zn.state.paymentAmount,this.purchaseAmount=zn.state.purchaseAmount,this.quoteLoading=zn.state.quotesLoading,this.unsubscribe.push(zt.subscribeKey("isConnected",e=>{this.connected=e}),Zr.subscribeKey("loading",e=>{this.loading=e}),zn.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var U1=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const o$e={USD:"$",EUR:"€",GBP:"£"},c$e=[100,250,500,1e3];let Sd=class extends He{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=zt.state.isConnected,this.loading=Xr.state.loading,this.paymentCurrency=Hn.state.paymentCurrency,this.paymentAmount=Hn.state.paymentAmount,this.purchaseAmount=Hn.state.purchaseAmount,this.quoteLoading=Hn.state.quotesLoading,this.unsubscribe.push(zt.subscribeKey("isConnected",e=>{this.connected=e}),Xr.subscribeKey("loading",e=>{this.loading=e}),Hn.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` - ${bAe.map(e=>{var t;return ce`{var t;return le`this.selectPresetAmount(e)} - >${`${mAe[((t=this.paymentCurrency)==null?void 0:t.id)||"USD"]} ${e}`}${`${o$e[((t=this.paymentCurrency)==null?void 0:t.id)||"USD"]} ${e}`}`})} ${this.templateButton()} - `}templateButton(){return this.connected?ce` Get quotes - `:ce``:le` Connect wallet - `}getQuotes(){this.loading||Zr.open({view:"OnRampProviders"})}openModal(){Zr.open({view:"Connect"})}async onPaymentAmountChange(e){zn.setPaymentAmount(Number(e.detail)),await zn.getQuote()}async selectPresetAmount(e){zn.setPaymentAmount(e),await zn.getQuote()}};of.styles=gAe,n1([pe({type:Boolean})],of.prototype,"disabled",void 0),n1([Oe()],of.prototype,"connected",void 0),n1([Oe()],of.prototype,"loading",void 0),n1([Oe()],of.prototype,"paymentCurrency",void 0),n1([Oe()],of.prototype,"paymentAmount",void 0),n1([Oe()],of.prototype,"purchaseAmount",void 0),n1([Oe()],of.prototype,"quoteLoading",void 0),of=n1([Le("w3m-onramp-widget")],of);const wAe=Ze` + `}getQuotes(){this.loading||Xr.open({view:"OnRampProviders"})}openModal(){Xr.open({view:"Connect"})}async onPaymentAmountChange(e){Hn.setPaymentAmount(Number(e.detail)),await Hn.getQuote()}async selectPresetAmount(e){Hn.setPaymentAmount(e),await Hn.getQuote()}};Sd.styles=a$e,U1([me({type:Boolean})],Sd.prototype,"disabled",void 0),U1([De()],Sd.prototype,"connected",void 0),U1([De()],Sd.prototype,"loading",void 0),U1([De()],Sd.prototype,"paymentCurrency",void 0),U1([De()],Sd.prototype,"paymentAmount",void 0),U1([De()],Sd.prototype,"purchaseAmount",void 0),U1([De()],Sd.prototype,"quoteLoading",void 0),Sd=U1([Fe("w3m-onramp-widget")],Sd);const l$e=Ze` wui-flex { width: 100%; } @@ -5872,7 +5889,7 @@ Minimum version required to store current data is: `+s+`. .account-links wui-flex wui-icon svg path { stroke: #47a1ff; } -`;typeof window<"u"&&(window.Buffer||(window.Buffer=xK),window.global||(window.global=window),window.process||(window.process={}),(gge=window.process)!=null&&gge.env||(window.process={env:{}}));const vAe=yt.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL||"https://secure.walletconnect.com/sdk",Pt={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},Oa={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}},Fo=ge.object({message:ge.string()});function Rr(r){return ge.literal(Pt[r])}ge.object({accessList:ge.array(ge.string()),blockHash:ge.string().nullable(),blockNumber:ge.string().nullable(),chainId:ge.string(),from:ge.string(),gas:ge.string(),hash:ge.string(),input:ge.string().nullable(),maxFeePerGas:ge.string(),maxPriorityFeePerGas:ge.string(),nonce:ge.string(),r:ge.string(),s:ge.string(),to:ge.string(),transactionIndex:ge.string().nullable(),type:ge.string(),v:ge.string(),value:ge.string()});const yAe=ge.object({chainId:ge.number()}),xAe=ge.object({email:ge.string().email()}),_Ae=ge.object({otp:ge.string()}),EAe=ge.object({chainId:ge.optional(ge.number()),preferredAccountType:ge.optional(ge.string())}),AAe=ge.object({email:ge.string().email()}),CAe=ge.object({otp:ge.string()}),SAe=ge.object({otp:ge.string()}),IAe=ge.object({themeMode:ge.optional(ge.enum(["light","dark"])),themeVariables:ge.optional(ge.record(ge.string(),ge.string().or(ge.number())))}),TAe=ge.object({metadata:ge.object({name:ge.string(),description:ge.string(),url:ge.string(),icons:ge.array(ge.string())}).optional(),sdkVersion:ge.string(),projectId:ge.string()}),RAe=ge.object({type:ge.string()}),kAe=ge.object({action:ge.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),MAe=ge.object({action:ge.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),NAe=ge.object({email:ge.string().email(),address:ge.string(),chainId:ge.number(),smartAccountDeployed:ge.optional(ge.boolean()),preferredAccountType:ge.optional(ge.string())}),PAe=ge.object({isConnected:ge.boolean()}),OAe=ge.object({chainId:ge.number()}),DAe=ge.object({chainId:ge.number()}),$Ae=ge.object({newEmail:ge.string().email()}),BAe=ge.object({smartAccountEnabledNetworks:ge.array(ge.number())});ge.object({address:ge.string(),isDeployed:ge.boolean()});const LAe=ge.object({type:ge.string(),address:ge.string()}),UAe=ge.any(),FAe=ge.object({method:ge.literal("eth_accounts")}),jAe=ge.object({method:ge.literal("eth_blockNumber")}),zAe=ge.object({method:ge.literal("eth_call"),params:ge.array(ge.any())}),HAe=ge.object({method:ge.literal("eth_chainId")}),qAe=ge.object({method:ge.literal("eth_estimateGas"),params:ge.array(ge.any())}),WAe=ge.object({method:ge.literal("eth_feeHistory"),params:ge.array(ge.any())}),VAe=ge.object({method:ge.literal("eth_gasPrice")}),GAe=ge.object({method:ge.literal("eth_getAccount"),params:ge.array(ge.any())}),KAe=ge.object({method:ge.literal("eth_getBalance"),params:ge.array(ge.any())}),ZAe=ge.object({method:ge.literal("eth_getBlockByHash"),params:ge.array(ge.any())}),JAe=ge.object({method:ge.literal("eth_getBlockByNumber"),params:ge.array(ge.any())}),YAe=ge.object({method:ge.literal("eth_getBlockReceipts"),params:ge.array(ge.any())}),QAe=ge.object({method:ge.literal("eth_getBlockTransactionCountByHash"),params:ge.array(ge.any())}),XAe=ge.object({method:ge.literal("eth_getBlockTransactionCountByNumber"),params:ge.array(ge.any())}),eCe=ge.object({method:ge.literal("eth_getCode"),params:ge.array(ge.any())}),tCe=ge.object({method:ge.literal("eth_getFilterChanges"),params:ge.array(ge.any())}),rCe=ge.object({method:ge.literal("eth_getFilterLogs"),params:ge.array(ge.any())}),nCe=ge.object({method:ge.literal("eth_getLogs"),params:ge.array(ge.any())}),iCe=ge.object({method:ge.literal("eth_getProof"),params:ge.array(ge.any())}),sCe=ge.object({method:ge.literal("eth_getStorageAt"),params:ge.array(ge.any())}),oCe=ge.object({method:ge.literal("eth_getTransactionByBlockHashAndIndex"),params:ge.array(ge.any())}),aCe=ge.object({method:ge.literal("eth_getTransactionByBlockNumberAndIndex"),params:ge.array(ge.any())}),cCe=ge.object({method:ge.literal("eth_getTransactionByHash"),params:ge.array(ge.any())}),lCe=ge.object({method:ge.literal("eth_getTransactionCount"),params:ge.array(ge.any())}),uCe=ge.object({method:ge.literal("eth_getTransactionReceipt"),params:ge.array(ge.any())}),hCe=ge.object({method:ge.literal("eth_getUncleCountByBlockHash"),params:ge.array(ge.any())}),fCe=ge.object({method:ge.literal("eth_getUncleCountByBlockNumber"),params:ge.array(ge.any())}),dCe=ge.object({method:ge.literal("eth_maxPriorityFeePerGas")}),pCe=ge.object({method:ge.literal("eth_newBlockFilter")}),gCe=ge.object({method:ge.literal("eth_newFilter"),params:ge.array(ge.any())}),mCe=ge.object({method:ge.literal("eth_newPendingTransactionFilter")}),bCe=ge.object({method:ge.literal("eth_sendRawTransaction"),params:ge.array(ge.any())}),wCe=ge.object({method:ge.literal("eth_syncing"),params:ge.array(ge.any())}),vCe=ge.object({method:ge.literal("eth_uninstallFilter"),params:ge.array(ge.any())}),nte=ge.object({method:ge.literal("personal_sign"),params:ge.array(ge.any())}),yCe=ge.object({method:ge.literal("eth_signTypedData_v4"),params:ge.array(ge.any())}),ite=ge.object({method:ge.literal("eth_sendTransaction"),params:ge.array(ge.any())}),ste=ge.object({token:ge.string()}),vC={appEvent:ge.object({type:Rr("APP_SWITCH_NETWORK"),payload:yAe}).or(ge.object({type:Rr("APP_CONNECT_EMAIL"),payload:xAe})).or(ge.object({type:Rr("APP_CONNECT_DEVICE")})).or(ge.object({type:Rr("APP_CONNECT_OTP"),payload:_Ae})).or(ge.object({type:Rr("APP_GET_USER"),payload:ge.optional(EAe)})).or(ge.object({type:Rr("APP_SIGN_OUT")})).or(ge.object({type:Rr("APP_IS_CONNECTED"),payload:ge.optional(ste)})).or(ge.object({type:Rr("APP_GET_CHAIN_ID")})).or(ge.object({type:Rr("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(ge.object({type:Rr("APP_INIT_SMART_ACCOUNT")})).or(ge.object({type:Rr("APP_SET_PREFERRED_ACCOUNT"),payload:RAe})).or(ge.object({type:Rr("APP_RPC_REQUEST"),payload:nte.or(ite).or(FAe).or(jAe).or(zAe).or(HAe).or(qAe).or(WAe).or(VAe).or(GAe).or(KAe).or(ZAe).or(JAe).or(YAe).or(QAe).or(XAe).or(eCe).or(tCe).or(rCe).or(nCe).or(iCe).or(sCe).or(oCe).or(aCe).or(cCe).or(lCe).or(uCe).or(hCe).or(fCe).or(dCe).or(pCe).or(gCe).or(mCe).or(bCe).or(wCe).or(vCe).or(nte).or(yCe).or(ite)})).or(ge.object({type:Rr("APP_UPDATE_EMAIL"),payload:AAe})).or(ge.object({type:Rr("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:CAe})).or(ge.object({type:Rr("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:SAe})).or(ge.object({type:Rr("APP_SYNC_THEME"),payload:IAe})).or(ge.object({type:Rr("APP_SYNC_DAPP_DATA"),payload:TAe})),frameEvent:ge.object({type:Rr("FRAME_SWITCH_NETWORK_ERROR"),payload:Fo}).or(ge.object({type:Rr("FRAME_SWITCH_NETWORK_SUCCESS"),payload:DAe})).or(ge.object({type:Rr("FRAME_CONNECT_EMAIL_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_CONNECT_EMAIL_SUCCESS"),payload:kAe})).or(ge.object({type:Rr("FRAME_CONNECT_OTP_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_CONNECT_OTP_SUCCESS")})).or(ge.object({type:Rr("FRAME_CONNECT_DEVICE_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_CONNECT_DEVICE_SUCCESS")})).or(ge.object({type:Rr("FRAME_GET_USER_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_GET_USER_SUCCESS"),payload:NAe})).or(ge.object({type:Rr("FRAME_SIGN_OUT_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_SIGN_OUT_SUCCESS")})).or(ge.object({type:Rr("FRAME_IS_CONNECTED_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_IS_CONNECTED_SUCCESS"),payload:PAe})).or(ge.object({type:Rr("FRAME_GET_CHAIN_ID_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_GET_CHAIN_ID_SUCCESS"),payload:OAe})).or(ge.object({type:Rr("FRAME_RPC_REQUEST_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_RPC_REQUEST_SUCCESS"),payload:UAe})).or(ge.object({type:Rr("FRAME_SESSION_UPDATE"),payload:ste})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_SUCCESS"),payload:MAe})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:$Ae})).or(ge.object({type:Rr("FRAME_SYNC_THEME_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_SYNC_THEME_SUCCESS")})).or(ge.object({type:Rr("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(ge.object({type:Rr("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:BAe})).or(ge.object({type:Rr("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:Fo})).or(ge.object({type:Rr("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:LAe})).or(ge.object({type:Rr("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:Fo}))},fc={set(r,e){go.isClient&&localStorage.setItem(`${Pt.STORAGE_KEY}${r}`,e)},get(r){return go.isClient?localStorage.getItem(`${Pt.STORAGE_KEY}${r}`):null},delete(r){go.isClient&&localStorage.removeItem(`${Pt.STORAGE_KEY}${r}`)}},ote={address:/^0x(?:[A-Fa-f0-9]{40})$/u,transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[A-Fa-f0-9]{130})$/u},xCe=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],yC=30*1e3,go={getBlockchainApiUrl(){try{const{timeZone:r}=new Intl.DateTimeFormat().resolvedOptions(),e=r.toUpperCase();return xCe.includes(e)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){const r=fc.get(Pt.LAST_EMAIL_LOGIN_TIME);if(r){const e=Date.now()-Number(r);if(e{go.isClient&&window.addEventListener("message",({data:i})=>{var o;if(!((o=i.type)!=null&&o.includes(Pt.FRAME_EVENT_KEY)))return;const s=vC.frameEvent.parse(i);n(s)})},onAppEvent:n=>{go.isClient&&window.addEventListener("message",({data:i})=>{var o;if(!((o=i.type)!=null&&o.includes(Pt.APP_EVENT_KEY)))return;const s=vC.appEvent.parse(i);n(s)})},postAppEvent:n=>{var i;if(go.isClient){if(!((i=this.iframe)!=null&&i.contentWindow))throw new Error("W3mFrame: iframe is not set");vC.appEvent.parse(n),window.postMessage(n),this.iframe.contentWindow.postMessage(n,"*")}},postFrameEvent:n=>{if(go.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");vC.frameEvent.parse(n),parent.postMessage(n,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),t&&(this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),go.isClient)){const n=document.createElement("iframe");n.id="w3m-iframe",n.src=`${vAe}?projectId=${e}`,n.style.position="fixed",n.style.zIndex="999999",n.style.display="none",n.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.opacity="0",n.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(n),this.iframe=n,this.iframe.onload=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.resolve(void 0)},this.iframe.onerror=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.reject("Unable to load email login dependency")}}}get networks(){const e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map(t=>({[t]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${t}&projectId=${this.projectId}`,chainId:t}}));return Object.assign({},...e)}}class ECe{constructor(e){this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.updateEmailPrimaryOtpResolver=void 0,this.updateEmailSecondaryOtpResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.smartAccountEnabledNetworksResolver=void 0,this.setPreferredAccountResolver=void 0,this.w3mFrame=new _Ce(e,!0),this.w3mFrame.events.onFrameEvent(t=>{switch(console.log("💻 received",t),t.type){case Pt.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(t);case Pt.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(t);case Pt.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case Pt.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(t);case Pt.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case Pt.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(t);case Pt.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(t);case Pt.FRAME_GET_USER_ERROR:return this.onConnectError(t);case Pt.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(t);case Pt.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(t);case Pt.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(t);case Pt.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(t);case Pt.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case Pt.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(t);case Pt.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(t);case Pt.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(t);case Pt.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(t);case Pt.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(t);case Pt.FRAME_SESSION_UPDATE:return this.onSessionUpdate(t);case Pt.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess(t);case Pt.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(t);case Pt.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:return this.onUpdateEmailPrimaryOtpSuccess();case Pt.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:return this.onUpdateEmailPrimaryOtpError(t);case Pt.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:return this.onUpdateEmailSecondaryOtpSuccess(t);case Pt.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:return this.onUpdateEmailSecondaryOtpError(t);case Pt.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case Pt.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(t);case Pt.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case Pt.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(t);case Pt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:return this.onSmartAccountEnabledNetworksSuccess(t);case Pt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:return this.onSmartAccountEnabledNetworksError(t);case Pt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:return this.onSetPreferredAccountSuccess();case Pt.FRAME_SET_PREFERRED_ACCOUNT_ERROR:return this.onSetPreferredAccountError();default:return null}})}getLoginEmailUsed(){return Boolean(fc.get(Pt.EMAIL_LOGIN_USED_KEY))}getEmail(){return fc.get(Pt.EMAIL)}rejectRpcRequest(){var e;(e=this.rpcRequestResolver)==null||e.reject()}async connectEmail(e){return await this.w3mFrame.frameLoadPromise,go.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Pt.APP_CONNECT_EMAIL,payload:e}),new Promise((t,n)=>{this.connectEmailResolver={resolve:t,reject:n}})}async connectDevice(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_CONNECT_DEVICE}),new Promise((e,t)=>{this.connectDeviceResolver={resolve:e,reject:t}})}async connectOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_CONNECT_OTP,payload:e}),new Promise((t,n)=>{this.connectOtpResolver={resolve:t,reject:n}})}async isConnected(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_IS_CONNECTED,payload:void 0}),new Promise((e,t)=>{this.isConnectedResolver={resolve:e,reject:t}})}async getChainId(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_GET_CHAIN_ID}),new Promise((e,t)=>{this.getChainIdResolver={resolve:e,reject:t}})}async updateEmail(e){return await this.w3mFrame.frameLoadPromise,go.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Pt.APP_UPDATE_EMAIL,payload:e}),new Promise((t,n)=>{this.updateEmailResolver={resolve:t,reject:n}})}async updateEmailPrimaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e}),new Promise((t,n)=>{this.updateEmailPrimaryOtpResolver={resolve:t,reject:n}})}async updateEmailSecondaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e}),new Promise((t,n)=>{this.updateEmailSecondaryOtpResolver={resolve:t,reject:n}})}async syncTheme(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_SYNC_THEME,payload:e}),new Promise((t,n)=>{this.syncThemeResolver={resolve:t,reject:n}})}async syncDappData(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_SYNC_DAPP_DATA,payload:e}),new Promise((t,n)=>{this.syncDappDataResolver={resolve:t,reject:n}})}async getSmartAccountEnabledNetworks(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS}),new Promise((e,t)=>{this.smartAccountEnabledNetworksResolver={resolve:e,reject:t}})}async setPreferredAccount(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}}),new Promise((t,n)=>{this.setPreferredAccountResolver={resolve:t,reject:n}})}async connect(e){const t=(e==null?void 0:e.chainId)??this.getLastUsedChainId()??1;return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_GET_USER,payload:{chainId:t}}),new Promise((n,i)=>{this.connectResolver={resolve:n,reject:i}})}async switchNetwork(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise((t,n)=>{this.switchChainResolver={resolve:t,reject:n}})}async disconnect(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Pt.APP_SIGN_OUT}),new Promise((e,t)=>{this.disconnectResolver={resolve:e,reject:t}})}async request(e){return await this.w3mFrame.frameLoadPromise,Oa.GET_CHAIN_ID===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:Pt.APP_RPC_REQUEST,payload:e}),new Promise((t,n)=>{this.rpcRequestResolver={resolve:t,reject:n}}))}onRpcRequest(e){this.w3mFrame.events.onAppEvent(t=>{t.type.includes(Pt.RPC_METHOD_KEY)&&e(t)})}onRpcResponse(e){this.w3mFrame.events.onFrameEvent(t=>{t.type.includes(Pt.RPC_METHOD_KEY)&&e(t)})}onIsConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Pt.FRAME_GET_USER_SUCCESS&&e(t.payload)})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Pt.FRAME_IS_CONNECTED_ERROR&&e(),t.type===Pt.FRAME_IS_CONNECTED_SUCCESS&&!t.payload.isConnected&&e()})}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Pt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===Pt.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:Oa.ACCOUNT_TYPES.EOA})})}onGetSmartAccountEnabledNetworks(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Pt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS?e(t.payload.smartAccountEnabledNetworks):t.type===Pt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR&&e([])})}onConnectEmailSuccess(e){var t;(t=this.connectEmailResolver)==null||t.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){var t;(t=this.connectEmailResolver)==null||t.reject(e.payload.message)}onConnectDeviceSuccess(){var e;(e=this.connectDeviceResolver)==null||e.resolve(void 0)}onConnectDeviceError(e){var t;(t=this.connectDeviceResolver)==null||t.reject(e.payload.message)}onConnectOtpSuccess(){var e;(e=this.connectOtpResolver)==null||e.resolve(void 0)}onConnectOtpError(e){var t;(t=this.connectOtpResolver)==null||t.reject(e.payload.message)}onConnectSuccess(e){var t;this.setEmailLoginSuccess(e.payload.email),this.setLastUsedChainId(e.payload.chainId),(t=this.connectResolver)==null||t.resolve(e.payload)}onConnectError(e){var t;(t=this.connectResolver)==null||t.reject(e.payload.message)}onIsConnectedSuccess(e){var t;e.payload.isConnected||this.deleteEmailLoginCache(),(t=this.isConnectedResolver)==null||t.resolve(e.payload)}onIsConnectedError(e){var t;(t=this.isConnectedResolver)==null||t.reject(e.payload.message)}onGetChainIdSuccess(e){var t;this.setLastUsedChainId(e.payload.chainId),(t=this.getChainIdResolver)==null||t.resolve(e.payload)}onGetChainIdError(e){var t;(t=this.getChainIdResolver)==null||t.reject(e.payload.message)}onSignOutSuccess(){var e;(e=this.disconnectResolver)==null||e.resolve(void 0),this.deleteEmailLoginCache()}onSignOutError(e){var t;(t=this.disconnectResolver)==null||t.reject(e.payload.message)}onSwitchChainSuccess(e){var t;this.setLastUsedChainId(e.payload.chainId),(t=this.switchChainResolver)==null||t.resolve(e.payload)}onSwitchChainError(e){var t;(t=this.switchChainResolver)==null||t.reject(e.payload.message)}onRpcRequestSuccess(e){var t;(t=this.rpcRequestResolver)==null||t.resolve(e.payload)}onRpcRequestError(e){var t;(t=this.rpcRequestResolver)==null||t.reject(e.payload.message)}onSessionUpdate(e){}onUpdateEmailSuccess(e){var t;(t=this.updateEmailResolver)==null||t.resolve(e.payload),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){var t;(t=this.updateEmailResolver)==null||t.reject(e.payload.message)}onUpdateEmailPrimaryOtpSuccess(){var e;(e=this.updateEmailPrimaryOtpResolver)==null||e.resolve(void 0)}onUpdateEmailPrimaryOtpError(e){var t;(t=this.updateEmailPrimaryOtpResolver)==null||t.reject(e.payload.message)}onUpdateEmailSecondaryOtpSuccess(e){var n;const{newEmail:t}=e.payload;this.setEmailLoginSuccess(t),(n=this.updateEmailSecondaryOtpResolver)==null||n.resolve({newEmail:t})}onUpdateEmailSecondaryOtpError(e){var t;(t=this.updateEmailSecondaryOtpResolver)==null||t.reject(e.payload.message)}onSyncThemeSuccess(){var e;(e=this.syncThemeResolver)==null||e.resolve(void 0)}onSyncThemeError(e){var t;(t=this.syncThemeResolver)==null||t.reject(e.payload.message)}onSyncDappDataSuccess(){var e;(e=this.syncDappDataResolver)==null||e.resolve(void 0)}onSyncDappDataError(e){var t;(t=this.syncDappDataResolver)==null||t.reject(e.payload.message)}onSmartAccountEnabledNetworksSuccess(e){var t;this.persistSmartAccountEnabledNetworks(e.payload.smartAccountEnabledNetworks),(t=this.smartAccountEnabledNetworksResolver)==null||t.resolve(e.payload)}onSmartAccountEnabledNetworksError(e){var t;this.persistSmartAccountEnabledNetworks([]),(t=this.smartAccountEnabledNetworksResolver)==null||t.reject(e.payload.message)}onSetPreferredAccountSuccess(){var e;(e=this.setPreferredAccountResolver)==null||e.resolve(void 0)}onSetPreferredAccountError(){var e;(e=this.setPreferredAccountResolver)==null||e.reject()}setNewLastEmailLoginTime(){fc.set(Pt.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setEmailLoginSuccess(e){fc.set(Pt.EMAIL,e),fc.set(Pt.EMAIL_LOGIN_USED_KEY,"true"),fc.delete(Pt.LAST_EMAIL_LOGIN_TIME)}deleteEmailLoginCache(){fc.delete(Pt.EMAIL_LOGIN_USED_KEY),fc.delete(Pt.EMAIL),fc.delete(Pt.LAST_USED_CHAIN_KEY)}setLastUsedChainId(e){fc.set(Pt.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(fc.get(Pt.LAST_USED_CHAIN_KEY))}persistSmartAccountEnabledNetworks(e){fc.set(Pt.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}}var i1=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let af=class extends Fe{constructor(){super(),this.usubscribe=[],this.networkImages=po.state.networkImages,this.address=zt.state.address,this.profileImage=zt.state.profileImage,this.profileName=zt.state.profileName,this.network=lr.state.caipNetwork,this.preferredAccountType=zt.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.usubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Zr.close()}),lr.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var t,n;if(!this.address)throw new Error("w3m-account-settings-view: No account provided");const e=this.networkImages[((t=this.network)==null?void 0:t.imageId)??""];return ce` +`;typeof window<"u"&&(window.Buffer||(window.Buffer=qJ),window.global||(window.global=window),window.process||(window.process={}),(_ve=window.process)!=null&&_ve.env||(window.process={env:{}}));const u$e=vt.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL||"https://secure.walletconnect.com/sdk",Mt={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},Ho={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}},Za=be.object({message:be.string()});function Pr(r){return be.literal(Mt[r])}be.object({accessList:be.array(be.string()),blockHash:be.string().nullable(),blockNumber:be.string().nullable(),chainId:be.string(),from:be.string(),gas:be.string(),hash:be.string(),input:be.string().nullable(),maxFeePerGas:be.string(),maxPriorityFeePerGas:be.string(),nonce:be.string(),r:be.string(),s:be.string(),to:be.string(),transactionIndex:be.string().nullable(),type:be.string(),v:be.string(),value:be.string()});const f$e=be.object({chainId:be.number()}),d$e=be.object({email:be.string().email()}),h$e=be.object({otp:be.string()}),p$e=be.object({chainId:be.optional(be.number()),preferredAccountType:be.optional(be.string())}),m$e=be.object({email:be.string().email()}),g$e=be.object({otp:be.string()}),b$e=be.object({otp:be.string()}),v$e=be.object({themeMode:be.optional(be.enum(["light","dark"])),themeVariables:be.optional(be.record(be.string(),be.string().or(be.number())))}),w$e=be.object({metadata:be.object({name:be.string(),description:be.string(),url:be.string(),icons:be.array(be.string())}).optional(),sdkVersion:be.string(),projectId:be.string()}),y$e=be.object({type:be.string()}),x$e=be.object({action:be.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),_$e=be.object({action:be.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),E$e=be.object({email:be.string().email(),address:be.string(),chainId:be.number(),smartAccountDeployed:be.optional(be.boolean()),preferredAccountType:be.optional(be.string())}),C$e=be.object({isConnected:be.boolean()}),A$e=be.object({chainId:be.number()}),S$e=be.object({chainId:be.number()}),I$e=be.object({newEmail:be.string().email()}),T$e=be.object({smartAccountEnabledNetworks:be.array(be.number())});be.object({address:be.string(),isDeployed:be.boolean()});const k$e=be.object({type:be.string(),address:be.string()}),R$e=be.any(),M$e=be.object({method:be.literal("eth_accounts")}),P$e=be.object({method:be.literal("eth_blockNumber")}),O$e=be.object({method:be.literal("eth_call"),params:be.array(be.any())}),N$e=be.object({method:be.literal("eth_chainId")}),D$e=be.object({method:be.literal("eth_estimateGas"),params:be.array(be.any())}),$$e=be.object({method:be.literal("eth_feeHistory"),params:be.array(be.any())}),B$e=be.object({method:be.literal("eth_gasPrice")}),L$e=be.object({method:be.literal("eth_getAccount"),params:be.array(be.any())}),U$e=be.object({method:be.literal("eth_getBalance"),params:be.array(be.any())}),F$e=be.object({method:be.literal("eth_getBlockByHash"),params:be.array(be.any())}),j$e=be.object({method:be.literal("eth_getBlockByNumber"),params:be.array(be.any())}),z$e=be.object({method:be.literal("eth_getBlockReceipts"),params:be.array(be.any())}),H$e=be.object({method:be.literal("eth_getBlockTransactionCountByHash"),params:be.array(be.any())}),q$e=be.object({method:be.literal("eth_getBlockTransactionCountByNumber"),params:be.array(be.any())}),W$e=be.object({method:be.literal("eth_getCode"),params:be.array(be.any())}),V$e=be.object({method:be.literal("eth_getFilterChanges"),params:be.array(be.any())}),G$e=be.object({method:be.literal("eth_getFilterLogs"),params:be.array(be.any())}),K$e=be.object({method:be.literal("eth_getLogs"),params:be.array(be.any())}),Z$e=be.object({method:be.literal("eth_getProof"),params:be.array(be.any())}),J$e=be.object({method:be.literal("eth_getStorageAt"),params:be.array(be.any())}),Y$e=be.object({method:be.literal("eth_getTransactionByBlockHashAndIndex"),params:be.array(be.any())}),Q$e=be.object({method:be.literal("eth_getTransactionByBlockNumberAndIndex"),params:be.array(be.any())}),X$e=be.object({method:be.literal("eth_getTransactionByHash"),params:be.array(be.any())}),eBe=be.object({method:be.literal("eth_getTransactionCount"),params:be.array(be.any())}),tBe=be.object({method:be.literal("eth_getTransactionReceipt"),params:be.array(be.any())}),rBe=be.object({method:be.literal("eth_getUncleCountByBlockHash"),params:be.array(be.any())}),nBe=be.object({method:be.literal("eth_getUncleCountByBlockNumber"),params:be.array(be.any())}),iBe=be.object({method:be.literal("eth_maxPriorityFeePerGas")}),sBe=be.object({method:be.literal("eth_newBlockFilter")}),aBe=be.object({method:be.literal("eth_newFilter"),params:be.array(be.any())}),oBe=be.object({method:be.literal("eth_newPendingTransactionFilter")}),cBe=be.object({method:be.literal("eth_sendRawTransaction"),params:be.array(be.any())}),lBe=be.object({method:be.literal("eth_syncing"),params:be.array(be.any())}),uBe=be.object({method:be.literal("eth_uninstallFilter"),params:be.array(be.any())}),Mie=be.object({method:be.literal("personal_sign"),params:be.array(be.any())}),fBe=be.object({method:be.literal("eth_signTypedData_v4"),params:be.array(be.any())}),Pie=be.object({method:be.literal("eth_sendTransaction"),params:be.array(be.any())}),Oie=be.object({token:be.string()}),KS={appEvent:be.object({type:Pr("APP_SWITCH_NETWORK"),payload:f$e}).or(be.object({type:Pr("APP_CONNECT_EMAIL"),payload:d$e})).or(be.object({type:Pr("APP_CONNECT_DEVICE")})).or(be.object({type:Pr("APP_CONNECT_OTP"),payload:h$e})).or(be.object({type:Pr("APP_GET_USER"),payload:be.optional(p$e)})).or(be.object({type:Pr("APP_SIGN_OUT")})).or(be.object({type:Pr("APP_IS_CONNECTED"),payload:be.optional(Oie)})).or(be.object({type:Pr("APP_GET_CHAIN_ID")})).or(be.object({type:Pr("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(be.object({type:Pr("APP_INIT_SMART_ACCOUNT")})).or(be.object({type:Pr("APP_SET_PREFERRED_ACCOUNT"),payload:y$e})).or(be.object({type:Pr("APP_RPC_REQUEST"),payload:Mie.or(Pie).or(M$e).or(P$e).or(O$e).or(N$e).or(D$e).or($$e).or(B$e).or(L$e).or(U$e).or(F$e).or(j$e).or(z$e).or(H$e).or(q$e).or(W$e).or(V$e).or(G$e).or(K$e).or(Z$e).or(J$e).or(Y$e).or(Q$e).or(X$e).or(eBe).or(tBe).or(rBe).or(nBe).or(iBe).or(sBe).or(aBe).or(oBe).or(cBe).or(lBe).or(uBe).or(Mie).or(fBe).or(Pie)})).or(be.object({type:Pr("APP_UPDATE_EMAIL"),payload:m$e})).or(be.object({type:Pr("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:g$e})).or(be.object({type:Pr("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:b$e})).or(be.object({type:Pr("APP_SYNC_THEME"),payload:v$e})).or(be.object({type:Pr("APP_SYNC_DAPP_DATA"),payload:w$e})),frameEvent:be.object({type:Pr("FRAME_SWITCH_NETWORK_ERROR"),payload:Za}).or(be.object({type:Pr("FRAME_SWITCH_NETWORK_SUCCESS"),payload:S$e})).or(be.object({type:Pr("FRAME_CONNECT_EMAIL_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_CONNECT_EMAIL_SUCCESS"),payload:x$e})).or(be.object({type:Pr("FRAME_CONNECT_OTP_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_CONNECT_OTP_SUCCESS")})).or(be.object({type:Pr("FRAME_CONNECT_DEVICE_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_CONNECT_DEVICE_SUCCESS")})).or(be.object({type:Pr("FRAME_GET_USER_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_GET_USER_SUCCESS"),payload:E$e})).or(be.object({type:Pr("FRAME_SIGN_OUT_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_SIGN_OUT_SUCCESS")})).or(be.object({type:Pr("FRAME_IS_CONNECTED_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_IS_CONNECTED_SUCCESS"),payload:C$e})).or(be.object({type:Pr("FRAME_GET_CHAIN_ID_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_GET_CHAIN_ID_SUCCESS"),payload:A$e})).or(be.object({type:Pr("FRAME_RPC_REQUEST_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_RPC_REQUEST_SUCCESS"),payload:R$e})).or(be.object({type:Pr("FRAME_SESSION_UPDATE"),payload:Oie})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_SUCCESS"),payload:_$e})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:I$e})).or(be.object({type:Pr("FRAME_SYNC_THEME_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_SYNC_THEME_SUCCESS")})).or(be.object({type:Pr("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(be.object({type:Pr("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:T$e})).or(be.object({type:Pr("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:Za})).or(be.object({type:Pr("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:k$e})).or(be.object({type:Pr("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:Za}))},_c={set(r,e){_a.isClient&&localStorage.setItem(`${Mt.STORAGE_KEY}${r}`,e)},get(r){return _a.isClient?localStorage.getItem(`${Mt.STORAGE_KEY}${r}`):null},delete(r){_a.isClient&&localStorage.removeItem(`${Mt.STORAGE_KEY}${r}`)}},Nie={address:/^0x(?:[A-Fa-f0-9]{40})$/u,transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[A-Fa-f0-9]{130})$/u},dBe=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],ZS=30*1e3,_a={getBlockchainApiUrl(){try{const{timeZone:r}=new Intl.DateTimeFormat().resolvedOptions(),e=r.toUpperCase();return dBe.includes(e)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){const r=_c.get(Mt.LAST_EMAIL_LOGIN_TIME);if(r){const e=Date.now()-Number(r);if(e{_a.isClient&&window.addEventListener("message",({data:i})=>{var a;if(!((a=i.type)!=null&&a.includes(Mt.FRAME_EVENT_KEY)))return;const s=KS.frameEvent.parse(i);n(s)})},onAppEvent:n=>{_a.isClient&&window.addEventListener("message",({data:i})=>{var a;if(!((a=i.type)!=null&&a.includes(Mt.APP_EVENT_KEY)))return;const s=KS.appEvent.parse(i);n(s)})},postAppEvent:n=>{var i;if(_a.isClient){if(!((i=this.iframe)!=null&&i.contentWindow))throw new Error("W3mFrame: iframe is not set");KS.appEvent.parse(n),window.postMessage(n),this.iframe.contentWindow.postMessage(n,"*")}},postFrameEvent:n=>{if(_a.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");KS.frameEvent.parse(n),parent.postMessage(n,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),t&&(this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),_a.isClient)){const n=document.createElement("iframe");n.id="w3m-iframe",n.src=`${u$e}?projectId=${e}`,n.style.position="fixed",n.style.zIndex="999999",n.style.display="none",n.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.opacity="0",n.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",n.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(n),this.iframe=n,this.iframe.onload=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.resolve(void 0)},this.iframe.onerror=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.reject("Unable to load email login dependency")}}}get networks(){const e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map(t=>({[t]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${t}&projectId=${this.projectId}`,chainId:t}}));return Object.assign({},...e)}}class pBe{constructor(e){this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.updateEmailPrimaryOtpResolver=void 0,this.updateEmailSecondaryOtpResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.smartAccountEnabledNetworksResolver=void 0,this.setPreferredAccountResolver=void 0,this.w3mFrame=new hBe(e,!0),this.w3mFrame.events.onFrameEvent(t=>{switch(console.log("💻 received",t),t.type){case Mt.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(t);case Mt.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(t);case Mt.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case Mt.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(t);case Mt.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case Mt.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(t);case Mt.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(t);case Mt.FRAME_GET_USER_ERROR:return this.onConnectError(t);case Mt.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(t);case Mt.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(t);case Mt.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(t);case Mt.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(t);case Mt.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case Mt.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(t);case Mt.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(t);case Mt.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(t);case Mt.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(t);case Mt.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(t);case Mt.FRAME_SESSION_UPDATE:return this.onSessionUpdate(t);case Mt.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess(t);case Mt.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(t);case Mt.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:return this.onUpdateEmailPrimaryOtpSuccess();case Mt.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:return this.onUpdateEmailPrimaryOtpError(t);case Mt.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:return this.onUpdateEmailSecondaryOtpSuccess(t);case Mt.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:return this.onUpdateEmailSecondaryOtpError(t);case Mt.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case Mt.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(t);case Mt.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case Mt.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(t);case Mt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:return this.onSmartAccountEnabledNetworksSuccess(t);case Mt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:return this.onSmartAccountEnabledNetworksError(t);case Mt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:return this.onSetPreferredAccountSuccess();case Mt.FRAME_SET_PREFERRED_ACCOUNT_ERROR:return this.onSetPreferredAccountError();default:return null}})}getLoginEmailUsed(){return!!_c.get(Mt.EMAIL_LOGIN_USED_KEY)}getEmail(){return _c.get(Mt.EMAIL)}rejectRpcRequest(){var e;(e=this.rpcRequestResolver)==null||e.reject()}async connectEmail(e){return await this.w3mFrame.frameLoadPromise,_a.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Mt.APP_CONNECT_EMAIL,payload:e}),new Promise((t,n)=>{this.connectEmailResolver={resolve:t,reject:n}})}async connectDevice(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_CONNECT_DEVICE}),new Promise((e,t)=>{this.connectDeviceResolver={resolve:e,reject:t}})}async connectOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_CONNECT_OTP,payload:e}),new Promise((t,n)=>{this.connectOtpResolver={resolve:t,reject:n}})}async isConnected(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_IS_CONNECTED,payload:void 0}),new Promise((e,t)=>{this.isConnectedResolver={resolve:e,reject:t}})}async getChainId(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_GET_CHAIN_ID}),new Promise((e,t)=>{this.getChainIdResolver={resolve:e,reject:t}})}async updateEmail(e){return await this.w3mFrame.frameLoadPromise,_a.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Mt.APP_UPDATE_EMAIL,payload:e}),new Promise((t,n)=>{this.updateEmailResolver={resolve:t,reject:n}})}async updateEmailPrimaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e}),new Promise((t,n)=>{this.updateEmailPrimaryOtpResolver={resolve:t,reject:n}})}async updateEmailSecondaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e}),new Promise((t,n)=>{this.updateEmailSecondaryOtpResolver={resolve:t,reject:n}})}async syncTheme(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_SYNC_THEME,payload:e}),new Promise((t,n)=>{this.syncThemeResolver={resolve:t,reject:n}})}async syncDappData(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_SYNC_DAPP_DATA,payload:e}),new Promise((t,n)=>{this.syncDappDataResolver={resolve:t,reject:n}})}async getSmartAccountEnabledNetworks(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS}),new Promise((e,t)=>{this.smartAccountEnabledNetworksResolver={resolve:e,reject:t}})}async setPreferredAccount(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}}),new Promise((t,n)=>{this.setPreferredAccountResolver={resolve:t,reject:n}})}async connect(e){const t=(e==null?void 0:e.chainId)??this.getLastUsedChainId()??1;return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_GET_USER,payload:{chainId:t}}),new Promise((n,i)=>{this.connectResolver={resolve:n,reject:i}})}async switchNetwork(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise((t,n)=>{this.switchChainResolver={resolve:t,reject:n}})}async disconnect(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Mt.APP_SIGN_OUT}),new Promise((e,t)=>{this.disconnectResolver={resolve:e,reject:t}})}async request(e){return await this.w3mFrame.frameLoadPromise,Ho.GET_CHAIN_ID===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:Mt.APP_RPC_REQUEST,payload:e}),new Promise((t,n)=>{this.rpcRequestResolver={resolve:t,reject:n}}))}onRpcRequest(e){this.w3mFrame.events.onAppEvent(t=>{t.type.includes(Mt.RPC_METHOD_KEY)&&e(t)})}onRpcResponse(e){this.w3mFrame.events.onFrameEvent(t=>{t.type.includes(Mt.RPC_METHOD_KEY)&&e(t)})}onIsConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Mt.FRAME_GET_USER_SUCCESS&&e(t.payload)})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Mt.FRAME_IS_CONNECTED_ERROR&&e(),t.type===Mt.FRAME_IS_CONNECTED_SUCCESS&&!t.payload.isConnected&&e()})}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Mt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===Mt.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:Ho.ACCOUNT_TYPES.EOA})})}onGetSmartAccountEnabledNetworks(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Mt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS?e(t.payload.smartAccountEnabledNetworks):t.type===Mt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR&&e([])})}onConnectEmailSuccess(e){var t;(t=this.connectEmailResolver)==null||t.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){var t;(t=this.connectEmailResolver)==null||t.reject(e.payload.message)}onConnectDeviceSuccess(){var e;(e=this.connectDeviceResolver)==null||e.resolve(void 0)}onConnectDeviceError(e){var t;(t=this.connectDeviceResolver)==null||t.reject(e.payload.message)}onConnectOtpSuccess(){var e;(e=this.connectOtpResolver)==null||e.resolve(void 0)}onConnectOtpError(e){var t;(t=this.connectOtpResolver)==null||t.reject(e.payload.message)}onConnectSuccess(e){var t;this.setEmailLoginSuccess(e.payload.email),this.setLastUsedChainId(e.payload.chainId),(t=this.connectResolver)==null||t.resolve(e.payload)}onConnectError(e){var t;(t=this.connectResolver)==null||t.reject(e.payload.message)}onIsConnectedSuccess(e){var t;e.payload.isConnected||this.deleteEmailLoginCache(),(t=this.isConnectedResolver)==null||t.resolve(e.payload)}onIsConnectedError(e){var t;(t=this.isConnectedResolver)==null||t.reject(e.payload.message)}onGetChainIdSuccess(e){var t;this.setLastUsedChainId(e.payload.chainId),(t=this.getChainIdResolver)==null||t.resolve(e.payload)}onGetChainIdError(e){var t;(t=this.getChainIdResolver)==null||t.reject(e.payload.message)}onSignOutSuccess(){var e;(e=this.disconnectResolver)==null||e.resolve(void 0),this.deleteEmailLoginCache()}onSignOutError(e){var t;(t=this.disconnectResolver)==null||t.reject(e.payload.message)}onSwitchChainSuccess(e){var t;this.setLastUsedChainId(e.payload.chainId),(t=this.switchChainResolver)==null||t.resolve(e.payload)}onSwitchChainError(e){var t;(t=this.switchChainResolver)==null||t.reject(e.payload.message)}onRpcRequestSuccess(e){var t;(t=this.rpcRequestResolver)==null||t.resolve(e.payload)}onRpcRequestError(e){var t;(t=this.rpcRequestResolver)==null||t.reject(e.payload.message)}onSessionUpdate(e){}onUpdateEmailSuccess(e){var t;(t=this.updateEmailResolver)==null||t.resolve(e.payload),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){var t;(t=this.updateEmailResolver)==null||t.reject(e.payload.message)}onUpdateEmailPrimaryOtpSuccess(){var e;(e=this.updateEmailPrimaryOtpResolver)==null||e.resolve(void 0)}onUpdateEmailPrimaryOtpError(e){var t;(t=this.updateEmailPrimaryOtpResolver)==null||t.reject(e.payload.message)}onUpdateEmailSecondaryOtpSuccess(e){var n;const{newEmail:t}=e.payload;this.setEmailLoginSuccess(t),(n=this.updateEmailSecondaryOtpResolver)==null||n.resolve({newEmail:t})}onUpdateEmailSecondaryOtpError(e){var t;(t=this.updateEmailSecondaryOtpResolver)==null||t.reject(e.payload.message)}onSyncThemeSuccess(){var e;(e=this.syncThemeResolver)==null||e.resolve(void 0)}onSyncThemeError(e){var t;(t=this.syncThemeResolver)==null||t.reject(e.payload.message)}onSyncDappDataSuccess(){var e;(e=this.syncDappDataResolver)==null||e.resolve(void 0)}onSyncDappDataError(e){var t;(t=this.syncDappDataResolver)==null||t.reject(e.payload.message)}onSmartAccountEnabledNetworksSuccess(e){var t;this.persistSmartAccountEnabledNetworks(e.payload.smartAccountEnabledNetworks),(t=this.smartAccountEnabledNetworksResolver)==null||t.resolve(e.payload)}onSmartAccountEnabledNetworksError(e){var t;this.persistSmartAccountEnabledNetworks([]),(t=this.smartAccountEnabledNetworksResolver)==null||t.reject(e.payload.message)}onSetPreferredAccountSuccess(){var e;(e=this.setPreferredAccountResolver)==null||e.resolve(void 0)}onSetPreferredAccountError(){var e;(e=this.setPreferredAccountResolver)==null||e.reject()}setNewLastEmailLoginTime(){_c.set(Mt.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setEmailLoginSuccess(e){_c.set(Mt.EMAIL,e),_c.set(Mt.EMAIL_LOGIN_USED_KEY,"true"),_c.delete(Mt.LAST_EMAIL_LOGIN_TIME)}deleteEmailLoginCache(){_c.delete(Mt.EMAIL_LOGIN_USED_KEY),_c.delete(Mt.EMAIL),_c.delete(Mt.LAST_USED_CHAIN_KEY)}setLastUsedChainId(e){_c.set(Mt.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(_c.get(Mt.LAST_USED_CHAIN_KEY))}persistSmartAccountEnabledNetworks(e){_c.set(Mt.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}}var F1=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Id=class extends He{constructor(){super(),this.usubscribe=[],this.networkImages=xa.state.networkImages,this.address=zt.state.address,this.profileImage=zt.state.profileImage,this.profileName=zt.state.profileName,this.network=dr.state.caipNetwork,this.preferredAccountType=zt.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.usubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Xr.close()}),dr.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var t,n;if(!this.address)throw new Error("w3m-account-settings-view: No account provided");const e=this.networkImages[((t=this.network)==null?void 0:t.imageId)??""];return le` - ${this.profileName?Tr.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):Tr.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} + ${this.profileName?Mr.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):Mr.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} - `}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=lr.state,t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}onCopyAddress(){try{this.address&&(tr.copyToClopboard(this.address),dn.showSuccess("Address copied"))}catch{dn.showError("Failed to copy")}}emailBtnTemplate(){const e=xs.getConnectedConnector(),t=Ln.getEmailConnector();if(!t||e!=="EMAIL")return null;const n=t.provider.getEmail()??"";return ce` + `}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=dr.state,t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}onCopyAddress(){try{this.address&&(rr.copyToClopboard(this.address),bn.showSuccess("Address copied"))}catch{bn.showError("Failed to copy")}}emailBtnTemplate(){const e=Ts.getConnectedConnector(),t=Un.getEmailConnector();if(!t||e!=="EMAIL")return null;const n=t.provider.getEmail()??"";return le` ${n} - `}togglePreferredAccountBtnTemplate(){const e=lr.checkIfSmartAccountEnabled(),t=xs.getConnectedConnector();if(!Ln.getEmailConnector()||t!=="EMAIL"||!e)return null;const i=this.preferredAccountType===Oa.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account";return ce` + `}togglePreferredAccountBtnTemplate(){const e=dr.checkIfSmartAccountEnabled(),t=Ts.getConnectedConnector();if(!Un.getEmailConnector()||t!=="EMAIL"||!e)return null;const i=this.preferredAccountType===Ho.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account";return le` ${i} - `}async changePreferredAccountType(){const e=lr.checkIfSmartAccountEnabled(),t=this.preferredAccountType===Oa.ACCOUNT_TYPES.SMART_ACCOUNT||!e?Oa.ACCOUNT_TYPES.EOA:Oa.ACCOUNT_TYPES.SMART_ACCOUNT,n=Ln.getEmailConnector();n&&(this.loading=!0,await(n==null?void 0:n.provider.setPreferredAccount(t)),this.loading=!1,this.requestUpdate())}onGoToUpdateEmail(e){et.push("UpdateEmailWallet",{email:e})}onNetworks(){this.isAllowedNetworkSwitch()&&et.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await Ur.disconnect(),yr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Zr.close()}catch{yr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),dn.showError("Failed to disconnect")}finally{this.disconnecting=!1}}};af.styles=wAe,i1([Oe()],af.prototype,"address",void 0),i1([Oe()],af.prototype,"profileImage",void 0),i1([Oe()],af.prototype,"profileName",void 0),i1([Oe()],af.prototype,"network",void 0),i1([Oe()],af.prototype,"preferredAccountType",void 0),i1([Oe()],af.prototype,"disconnecting",void 0),i1([Oe()],af.prototype,"loading",void 0),af=i1([Le("w3m-account-settings-view")],af);var ACe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ate=class extends Fe{render(){const e=xs.getConnectedConnector();return ce` - ${hr.state.enableWalletFeatures&&e==="EMAIL"?this.walletFeaturesTemplate():this.defaultTemplate()} - `}walletFeaturesTemplate(){return ce``}defaultTemplate(){return ce``}};ate=ACe([Le("w3m-account-view")],ate);var cte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let tP=class extends Fe{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=tr.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return ce` + `}async changePreferredAccountType(){const e=dr.checkIfSmartAccountEnabled(),t=this.preferredAccountType===Ho.ACCOUNT_TYPES.SMART_ACCOUNT||!e?Ho.ACCOUNT_TYPES.EOA:Ho.ACCOUNT_TYPES.SMART_ACCOUNT,n=Un.getEmailConnector();n&&(this.loading=!0,await(n==null?void 0:n.provider.setPreferredAccount(t)),this.loading=!1,this.requestUpdate())}onGoToUpdateEmail(e){it.push("UpdateEmailWallet",{email:e})}onNetworks(){this.isAllowedNetworkSwitch()&&it.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await Gr.disconnect(),Cr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Xr.close()}catch{Cr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),bn.showError("Failed to disconnect")}finally{this.disconnecting=!1}}};Id.styles=l$e,F1([De()],Id.prototype,"address",void 0),F1([De()],Id.prototype,"profileImage",void 0),F1([De()],Id.prototype,"profileName",void 0),F1([De()],Id.prototype,"network",void 0),F1([De()],Id.prototype,"preferredAccountType",void 0),F1([De()],Id.prototype,"disconnecting",void 0),F1([De()],Id.prototype,"loading",void 0),Id=F1([Fe("w3m-account-settings-view")],Id);var mBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Die=class extends He{render(){const e=Ts.getConnectedConnector();return le` + ${pr.state.enableWalletFeatures&&e==="EMAIL"?this.walletFeaturesTemplate():this.defaultTemplate()} + `}walletFeaturesTemplate(){return le``}defaultTemplate(){return le``}};Die=mBe([Fe("w3m-account-view")],Die);var $ie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let aD=class extends He{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=rr.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return le` ${this.qrButtonTemplate()} - ${e?ce``:ce``} - `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return tr.isMobile()?ce` + ${e?le``:le``} + `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return rr.isMobile()?le` - `:null}onWalletConnectQr(){et.push("ConnectingWalletConnect")}};cte([Oe()],tP.prototype,"search",void 0),tP=cte([Le("w3m-all-wallets-view")],tP);const CCe=Ze` + `:null}onWalletConnectQr(){it.push("ConnectingWalletConnect")}};$ie([De()],aD.prototype,"search",void 0),aD=$ie([Fe("w3m-all-wallets-view")],aD);const gBe=Ze` @keyframes shake { 0% { transform: translateX(0); @@ -6057,9 +6074,9 @@ Minimum version required to store current data is: `+s+`. wui-link { padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); } -`;var Ku=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let jc=class extends Fe{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=zn.state.selectedProvider,this.uri=Ur.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(zn.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e})),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){var n,i;let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${(n=this.selectedOnRampProvider)==null?void 0:n.label}`);const t=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return ce` +`;var mf=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let rl=class extends He{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Hn.state.selectedProvider,this.uri=Gr.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Hn.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e})),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){var n,i;let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${(n=this.selectedOnRampProvider)==null?void 0:n.label}`);const t=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return le` @@ -6103,10 +6120,10 @@ Minimum version required to store current data is: `+s+`. Copy link - `}watchTransactions(){if(this.selectedOnRampProvider)switch(this.selectedOnRampProvider.name){case"coinbase":this.startTime=Date.now(),this.initializeCoinbaseTransactions();break}}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval(()=>this.watchCoinbaseTransactions(),4e3)}async watchCoinbaseTransactions(){try{const e=zt.state.address,t=hr.state.projectId;if(!e)throw new Error("No address found");(await ka.fetchTransactions({account:e,onramp:"coinbase",projectId:t})).data.filter(s=>new Date(s.metadata.minedAt)>new Date(this.startTime)||s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length?(clearInterval(this.intervalId),et.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){dn.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,tr.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){var e;return(e=this.selectedOnRampProvider)!=null&&e.url?ce` + `}watchTransactions(){if(this.selectedOnRampProvider)switch(this.selectedOnRampProvider.name){case"coinbase":this.startTime=Date.now(),this.initializeCoinbaseTransactions();break}}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval(()=>this.watchCoinbaseTransactions(),4e3)}async watchCoinbaseTransactions(){try{const e=zt.state.address,t=pr.state.projectId;if(!e)throw new Error("No address found");(await Uo.fetchTransactions({account:e,onramp:"coinbase",projectId:t})).data.filter(s=>new Date(s.metadata.minedAt)>new Date(this.startTime)||s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length?(clearInterval(this.intervalId),it.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){bn.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,rr.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){var e;return(e=this.selectedOnRampProvider)!=null&&e.url?le` Try again - `:null}loaderTemplate(){const e=Zs.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ce``}onCopyUri(){var e;if(!((e=this.selectedOnRampProvider)!=null&&e.url)){dn.showError("No link found"),et.goBack();return}try{tr.copyToClopboard(this.selectedOnRampProvider.url),dn.showSuccess("Link copied")}catch{dn.showError("Failed to copy")}}};jc.styles=CCe,Ku([Oe()],jc.prototype,"selectedOnRampProvider",void 0),Ku([Oe()],jc.prototype,"uri",void 0),Ku([Oe()],jc.prototype,"ready",void 0),Ku([Oe()],jc.prototype,"showRetry",void 0),Ku([Oe()],jc.prototype,"buffering",void 0),Ku([Oe()],jc.prototype,"error",void 0),Ku([Oe()],jc.prototype,"intervalId",void 0),Ku([Oe()],jc.prototype,"startTime",void 0),Ku([pe({type:Boolean})],jc.prototype,"isMobile",void 0),Ku([pe()],jc.prototype,"onRetry",void 0),jc=Ku([Le("w3m-buy-in-progress-view")],jc);const SCe=Ze` + `:null}loaderTemplate(){const e=ea.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return le``}onCopyUri(){var e;if(!((e=this.selectedOnRampProvider)!=null&&e.url)){bn.showError("No link found"),it.goBack();return}try{rr.copyToClopboard(this.selectedOnRampProvider.url),bn.showSuccess("Link copied")}catch{bn.showError("Failed to copy")}}};rl.styles=gBe,mf([De()],rl.prototype,"selectedOnRampProvider",void 0),mf([De()],rl.prototype,"uri",void 0),mf([De()],rl.prototype,"ready",void 0),mf([De()],rl.prototype,"showRetry",void 0),mf([De()],rl.prototype,"buffering",void 0),mf([De()],rl.prototype,"error",void 0),mf([De()],rl.prototype,"intervalId",void 0),mf([De()],rl.prototype,"startTime",void 0),mf([me({type:Boolean})],rl.prototype,"isMobile",void 0),mf([me()],rl.prototype,"onRetry",void 0),rl=mf([Fe("w3m-buy-in-progress-view")],rl);const bBe=Ze` wui-flex { max-height: clamp(360px, 540px, 80vh); overflow: scroll; @@ -6116,7 +6133,7 @@ Minimum version required to store current data is: `+s+`. wui-flex::-webkit-scrollbar { display: none; } -`,Jt={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",EMAIL_CONNECTOR_ID:"w3mEmail",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet"},VERSION:"4.1.11"},fa={ConnectorExplorerIds:{[Jt.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[Jt.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[Jt.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"692ed6ba-e569-459a-556a-776476829e00",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[Jt.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[Jt.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[Jt.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[Jt.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[Jt.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[Jt.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[Jt.INJECTED_CONNECTOR_ID]:"Browser Wallet",[Jt.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[Jt.COINBASE_CONNECTOR_ID]:"Coinbase",[Jt.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[Jt.LEDGER_CONNECTOR_ID]:"Ledger",[Jt.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[Jt.INJECTED_CONNECTOR_ID]:"INJECTED",[Jt.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[Jt.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[Jt.EMAIL_CONNECTOR_ID]:"EMAIL"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},ICe={getCaipTokens(r){if(!r)return;const e={};return Object.entries(r).forEach(([t,n])=>{e[`${Jt.EIP155}:${t}`]=n}),e}};var rP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let l6=class extends Fe{constructor(){super(),this.unsubscribe=[],this.connectors=Ln.state.connectors,this.count=Nr.state.count,this.unsubscribe.push(Ln.subscribeKey("connectors",e=>this.connectors=e),Nr.subscribeKey("count",e=>this.count=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`,Zt={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",EMAIL_CONNECTOR_ID:"w3mEmail",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet"},VERSION:"4.1.11"},Eo={ConnectorExplorerIds:{[Zt.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[Zt.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[Zt.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"692ed6ba-e569-459a-556a-776476829e00",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[Zt.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[Zt.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[Zt.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[Zt.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[Zt.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[Zt.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[Zt.INJECTED_CONNECTOR_ID]:"Browser Wallet",[Zt.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[Zt.COINBASE_CONNECTOR_ID]:"Coinbase",[Zt.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[Zt.LEDGER_CONNECTOR_ID]:"Ledger",[Zt.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[Zt.INJECTED_CONNECTOR_ID]:"INJECTED",[Zt.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[Zt.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[Zt.EMAIL_CONNECTOR_ID]:"EMAIL"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},vBe={getCaipTokens(r){if(!r)return;const e={};return Object.entries(r).forEach(([t,n])=>{e[`${Zt.EIP155}:${t}`]=n}),e}};var oD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let O8=class extends He{constructor(){super(),this.unsubscribe=[],this.connectors=Un.state.connectors,this.count=$r.state.count,this.unsubscribe.push(Un.subscribeKey("connectors",e=>this.connectors=e),$r.subscribeKey("count",e=>this.count=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` @@ -6126,9 +6143,9 @@ Minimum version required to store current data is: `+s+`. ${this.allWalletsTemplate()} - `}walletConnectConnectorTemplate(){if(tr.isMobile())return null;const e=this.connectors.find(t=>t.type==="WALLET_CONNECT");return e?ce` + `}walletConnectConnectorTemplate(){if(rr.isMobile())return null;const e=this.connectors.find(t=>t.type==="WALLET_CONNECT");return e?le` this.onConnector(e)} tagLabel="qr code" @@ -6136,72 +6153,72 @@ Minimum version required to store current data is: `+s+`. data-testid="wallet-selector-walletconnect" > - `:null}customTemplate(){const{customWallets:e}=hr.state;return e!=null&&e.length?this.filterOutDuplicateWallets(e).map(n=>ce` + `:null}customTemplate(){const{customWallets:e}=pr.state;return e!=null&&e.length?this.filterOutDuplicateWallets(e).map(n=>le` this.onConnectWallet(n)} data-testid=${`wallet-selector-${n.id}`} > - `):null}featuredTemplate(){if(!this.connectors.find(i=>i.type==="WALLET_CONNECT"))return null;const{featured:t}=Nr.state;return t.length?this.filterOutDuplicateWallets(t).map(i=>ce` + `):null}featuredTemplate(){if(!this.connectors.find(i=>i.type==="WALLET_CONNECT"))return null;const{featured:t}=$r.state;return t.length?this.filterOutDuplicateWallets(t).map(i=>le` this.onConnectWallet(i)} > - `):null}recentTemplate(){return xs.getRecentWallets().map(t=>ce` + `):null}recentTemplate(){return Ts.getRecentWallets().map(t=>le` this.onConnectWallet(t)} tagLabel="recent" tagVariant="shade" > - `)}announcedTemplate(){return this.connectors.map(e=>e.type!=="ANNOUNCED"?null:ce` + `)}announcedTemplate(){return this.connectors.map(e=>e.type!=="ANNOUNCED"?null:le` this.onConnector(e)} tagVariant="success" .installed=${!0} > - `)}injectedTemplate(){return this.connectors.map(e=>e.type!=="INJECTED"||!Ur.checkInstalled()?null:ce` + `)}injectedTemplate(){return this.connectors.map(e=>e.type!=="INJECTED"||!Gr.checkInstalled()?null:le` this.onConnector(e)} > - `)}externalTemplate(){const e=Ln.getAnnouncedConnectorRdns();return this.connectors.map(t=>["WALLET_CONNECT","INJECTED","ANNOUNCED","EMAIL"].includes(t.type)||e.includes(Jt.CONNECTOR_RDNS_MAP[t.id])?null:ce` + `)}externalTemplate(){const e=Un.getAnnouncedConnectorRdns();return this.connectors.map(t=>["WALLET_CONNECT","INJECTED","ANNOUNCED","EMAIL"].includes(t.type)||e.includes(Zt.CONNECTOR_RDNS_MAP[t.id])?null:le` this.onConnector(t)} > - `)}allWalletsTemplate(){const e=this.connectors.find(a=>a.type==="WALLET_CONNECT"),{allWallets:t}=hr.state;if(!e||t==="HIDE"||t==="ONLY_MOBILE"&&!tr.isMobile())return null;const n=Nr.state.featured.length,i=this.count+n,s=i<10?i:Math.floor(i/10)*10,o=so.type==="WALLET_CONNECT"),{allWallets:t}=pr.state;if(!e||t==="HIDE"||t==="ONLY_MOBILE"&&!rr.isMobile())return null;const n=$r.state.featured.length,i=this.count+n,s=i<10?i:Math.floor(i/10)*10,a=s - `}recommendedTemplate(){if(!this.connectors.find(g=>g.type==="WALLET_CONNECT"))return null;const{recommended:t}=Nr.state,{customWallets:n,featuredWalletIds:i}=hr.state,{connectors:s}=Ln.state,o=xs.getRecentWallets(),l=s.filter(g=>g.type==="INJECTED").filter(g=>g.name!=="Browser Wallet");if(i||n||!t.length)return null;const u=l.length+o.length,h=Math.max(0,2-u);return this.filterOutDuplicateWallets(t).slice(0,h).map(g=>ce` + `}recommendedTemplate(){if(!this.connectors.find(m=>m.type==="WALLET_CONNECT"))return null;const{recommended:t}=$r.state,{customWallets:n,featuredWalletIds:i}=pr.state,{connectors:s}=Un.state,a=Ts.getRecentWallets(),l=s.filter(m=>m.type==="INJECTED").filter(m=>m.name!=="Browser Wallet");if(i||n||!t.length)return null;const u=l.length+a.length,f=Math.max(0,2-u);return this.filterOutDuplicateWallets(t).slice(0,f).map(m=>le` this.onConnectWallet(g)} + imageSrc=${br(Qn.getWalletImage(m))} + name=${(m==null?void 0:m.name)??"Unknown"} + @click=${()=>this.onConnectWallet(m)} > - `)}onConnector(e){e.type==="WALLET_CONNECT"?tr.isMobile()?et.push("AllWallets"):et.push("ConnectingWalletConnect"):et.push("ConnectingExternal",{connector:e})}filterOutDuplicateWallets(e){const t=xs.getRecentWallets(),n=this.connectors.map(a=>{var l;return(l=a.info)==null?void 0:l.rdns}).filter(Boolean),i=t.map(a=>a.rdns).filter(Boolean),s=n.concat(i);return e.filter(a=>!s.includes(String(a==null?void 0:a.rdns)))}onAllWallets(){yr.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),et.push("AllWallets")}onConnectWallet(e){et.push("ConnectingWalletConnect",{wallet:e})}};l6.styles=SCe,rP([Oe()],l6.prototype,"connectors",void 0),rP([Oe()],l6.prototype,"count",void 0),l6=rP([Le("w3m-connect-view")],l6);const TCe=Ze` + `)}onConnector(e){e.type==="WALLET_CONNECT"?rr.isMobile()?it.push("AllWallets"):it.push("ConnectingWalletConnect"):it.push("ConnectingExternal",{connector:e})}filterOutDuplicateWallets(e){const t=Ts.getRecentWallets(),n=this.connectors.map(o=>{var l;return(l=o.info)==null?void 0:l.rdns}).filter(Boolean),i=t.map(o=>o.rdns).filter(Boolean),s=n.concat(i);return e.filter(o=>!s.includes(String(o==null?void 0:o.rdns)))}onAllWallets(){Cr.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),it.push("AllWallets")}onConnectWallet(e){it.push("ConnectingWalletConnect",{wallet:e})}};O8.styles=bBe,oD([De()],O8.prototype,"connectors",void 0),oD([De()],O8.prototype,"count",void 0),O8=oD([Fe("w3m-connect-view")],O8);const wBe=Ze` @keyframes shake { 0% { transform: translateX(0); @@ -6262,9 +6279,9 @@ Minimum version required to store current data is: `+s+`. display: block; opacity: 1; } -`;var mm=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class dc extends Fe{constructor(){var e,t,n,i;super(),this.wallet=(e=et.state.data)==null?void 0:e.wallet,this.connector=(t=et.state.data)==null?void 0:t.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=Yn.getWalletImage(this.wallet)??Yn.getConnectorImage(this.connector),this.name=((n=this.wallet)==null?void 0:n.name)??((i=this.connector)==null?void 0:i.name)??"Wallet",this.isRetrying=!1,this.uri=Ur.state.wcUri,this.error=Ur.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Ur.subscribeKey("wcUri",s=>{var o;this.uri=s,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(o=this.onConnect)==null||o.call(this))}),Ur.subscribeKey("wcError",s=>this.error=s),Ur.subscribeKey("buffering",s=>this.buffering=s))}firstUpdated(){var e;(e=this.onAutoConnect)==null||e.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearTimeout(this.timeout)}render(){var n;(n=this.onRender)==null||n.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),ce` +`;var ab=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};class Ec extends He{constructor(){var e,t,n,i;super(),this.wallet=(e=it.state.data)==null?void 0:e.wallet,this.connector=(t=it.state.data)==null?void 0:t.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=Qn.getWalletImage(this.wallet)??Qn.getConnectorImage(this.connector),this.name=((n=this.wallet)==null?void 0:n.name)??((i=this.connector)==null?void 0:i.name)??"Wallet",this.isRetrying=!1,this.uri=Gr.state.wcUri,this.error=Gr.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Gr.subscribeKey("wcUri",s=>{var a;this.uri=s,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(a=this.onConnect)==null||a.call(this))}),Gr.subscribeKey("wcError",s=>this.error=s),Gr.subscribeKey("buffering",s=>this.buffering=s))}firstUpdated(){var e;(e=this.onAutoConnect)==null||e.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearTimeout(this.timeout)}render(){var n;(n=this.onRender)==null||n.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),le` - + ${this.error?null:this.loaderTemplate()} @@ -6304,7 +6321,7 @@ Minimum version required to store current data is: `+s+`. - ${this.isWalletConnect?ce` + ${this.isWalletConnect?le` @@ -6314,30 +6331,30 @@ Minimum version required to store current data is: `+s+`. `:null} - `}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var e,t;this.buffering||(Ur.setWcError(!1),this.onRetry?(this.isRetrying=!0,(e=this.onRetry)==null||e.call(this)):(t=this.onConnect)==null||t.call(this))}loaderTemplate(){const e=Zs.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ce``}onCopyUri(){try{this.uri&&(tr.copyToClopboard(this.uri),dn.showSuccess("Link copied"))}catch{dn.showError("Failed to copy")}}}dc.styles=TCe,mm([Oe()],dc.prototype,"uri",void 0),mm([Oe()],dc.prototype,"error",void 0),mm([Oe()],dc.prototype,"ready",void 0),mm([Oe()],dc.prototype,"showRetry",void 0),mm([Oe()],dc.prototype,"buffering",void 0),mm([pe({type:Boolean})],dc.prototype,"isMobile",void 0),mm([pe()],dc.prototype,"onRetry",void 0);var RCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let lte=class extends dc{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&xs.setConnectedWalletImageUrl(this.connector.imageUrl),await Ur.connectExternal(this.connector),hr.state.isSiweEnabled?et.push("ConnectingSiwe"):Zr.close(),yr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){yr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(e==null?void 0:e.message)??"Unknown"}}),this.error=!0}}};lte=RCe([Le("w3m-connecting-external-view")],lte);var nP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let xC=class extends Fe{constructor(){var e;super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=(e=et.state.data)==null?void 0:e.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),Ls.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),ce` + `}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var e,t;this.buffering||(Gr.setWcError(!1),this.onRetry?(this.isRetrying=!0,(e=this.onRetry)==null||e.call(this)):(t=this.onConnect)==null||t.call(this))}loaderTemplate(){const e=ea.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return le``}onCopyUri(){try{this.uri&&(rr.copyToClopboard(this.uri),bn.showSuccess("Link copied"))}catch{bn.showError("Failed to copy")}}}Ec.styles=wBe,ab([De()],Ec.prototype,"uri",void 0),ab([De()],Ec.prototype,"error",void 0),ab([De()],Ec.prototype,"ready",void 0),ab([De()],Ec.prototype,"showRetry",void 0),ab([De()],Ec.prototype,"buffering",void 0),ab([me({type:Boolean})],Ec.prototype,"isMobile",void 0),ab([me()],Ec.prototype,"onRetry",void 0);var yBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Bie=class extends Ec{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&Ts.setConnectedWalletImageUrl(this.connector.imageUrl),await Gr.connectExternal(this.connector),pr.state.isSiweEnabled?it.push("ConnectingSiwe"):Xr.close(),Cr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){Cr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(e==null?void 0:e.message)??"Unknown"}}),this.error=!0}}};Bie=yBe([Fe("w3m-connecting-external-view")],Bie);var cD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let JS=class extends He{constructor(){var e;super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=(e=it.state.data)==null?void 0:e.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),Hs.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),le` ${this.headerTemplate()}
      ${this.platformTemplate()}
      - `):ce``}async initializeConnection(e=!1){try{const{wcPairingExpiry:t}=Ur.state;if(e||tr.isPairingExpired(t)){if(Ur.connectWalletConnect(),this.wallet){const n=Yn.getWalletImage(this.wallet);n&&xs.setConnectedWalletImageUrl(n)}else{const i=Ln.state.connectors.find(o=>o.type==="WALLET_CONNECT"),s=Yn.getConnectorImage(i);s&&xs.setConnectedWalletImageUrl(s)}await Ur.state.wcPromise,this.finalizeConnection(),hr.state.isSiweEnabled?et.push("ConnectingSiwe"):Zr.close()}}catch(t){yr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),Ur.setWcError(!0),tr.isAllowedRetry(this.lastRetry)&&(dn.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){var n;const{wcLinking:e,recentWallet:t}=Ur.state;e&&xs.setWalletConnectDeepLink(e),t&&xs.setWeb3ModalRecent(t),yr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:((n=this.wallet)==null?void 0:n.name)||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:n,injected:i,rdns:s}=this.wallet,o=i==null?void 0:i.map(({injected_id:y})=>y).filter(Boolean),a=s?[s]:o??[],l=a.length,u=e,h=n,p=Ur.checkInstalled(a),g=l&&p,w=t&&!tr.isMobile();g&&this.platforms.push("browser"),u&&this.platforms.push(tr.isMobile()?"mobile":"qrcode"),h&&this.platforms.push("web"),w&&this.platforms.push("desktop"),!g&&l&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return ce``;case"desktop":return ce` + `):le``}async initializeConnection(e=!1){try{const{wcPairingExpiry:t}=Gr.state;if(e||rr.isPairingExpired(t)){if(Gr.connectWalletConnect(),this.wallet){const n=Qn.getWalletImage(this.wallet);n&&Ts.setConnectedWalletImageUrl(n)}else{const i=Un.state.connectors.find(a=>a.type==="WALLET_CONNECT"),s=Qn.getConnectorImage(i);s&&Ts.setConnectedWalletImageUrl(s)}await Gr.state.wcPromise,this.finalizeConnection(),pr.state.isSiweEnabled?it.push("ConnectingSiwe"):Xr.close()}}catch(t){Cr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),Gr.setWcError(!0),rr.isAllowedRetry(this.lastRetry)&&(bn.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){var n;const{wcLinking:e,recentWallet:t}=Gr.state;e&&Ts.setWalletConnectDeepLink(e),t&&Ts.setWeb3ModalRecent(t),Cr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:((n=this.wallet)==null?void 0:n.name)||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:n,injected:i,rdns:s}=this.wallet,a=i==null?void 0:i.map(({injected_id:v})=>v).filter(Boolean),o=s?[s]:a??[],l=o.length,u=e,f=n,h=Gr.checkInstalled(o),m=l&&h,b=t&&!rr.isMobile();m&&this.platforms.push("browser"),u&&this.platforms.push(rr.isMobile()?"mobile":"qrcode"),f&&this.platforms.push("web"),b&&this.platforms.push("desktop"),!m&&l&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return le``;case"desktop":return le` this.initializeConnection(!0)}> - `;case"web":return ce` + `;case"web":return le` this.initializeConnection(!0)}> - `;case"mobile":return ce` + `;case"mobile":return le` this.initializeConnection(!0)}> - `;case"qrcode":return ce``;default:return ce``}}headerTemplate(){return this.platforms.length>1?ce` + `;case"qrcode":return le``;default:return le``}}headerTemplate(){return this.platforms.length>1?le` - `:null}async onSelectPlatform(e){var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};nP([Oe()],xC.prototype,"platform",void 0),nP([Oe()],xC.prototype,"platforms",void 0),xC=nP([Le("w3m-connecting-wc-view")],xC);var kCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ute=class extends Fe{constructor(){var e;super(...arguments),this.wallet=(e=et.state.data)==null?void 0:e.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return ce` + `:null}async onSelectPlatform(e){var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};cD([De()],JS.prototype,"platform",void 0),cD([De()],JS.prototype,"platforms",void 0),JS=cD([Fe("w3m-connecting-wc-view")],JS);var xBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Lie=class extends He{constructor(){var e;super(...arguments),this.wallet=(e=it.state.data)==null?void 0:e.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return le` ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} ${this.homepageTemplate()} - `}chromeTemplate(){var e;return(e=this.wallet)!=null&&e.chrome_store?ce` Chrome Extension - `:null}iosTemplate(){var e;return(e=this.wallet)!=null&&e.app_store?ce``:null}iosTemplate(){var e;return(e=this.wallet)!=null&&e.app_store?le` iOS App - `:null}androidTemplate(){var e;return(e=this.wallet)!=null&&e.play_store?ce``:null}androidTemplate(){var e;return(e=this.wallet)!=null&&e.play_store?le` Android App - `:null}homepageTemplate(){var e;return(e=this.wallet)!=null&&e.homepage?ce` + `:null}homepageTemplate(){var e;return(e=this.wallet)!=null&&e.homepage?le` Website - `:null}onChromeStore(){var e;(e=this.wallet)!=null&&e.chrome_store&&tr.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&tr.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&tr.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&tr.openHref(this.wallet.homepage,"_blank")}};ute=kCe([Le("w3m-downloads-view")],ute);var MCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const NCe="https://walletconnect.com/explorer";let hte=class extends Fe{render(){return ce` + `:null}onChromeStore(){var e;(e=this.wallet)!=null&&e.chrome_store&&rr.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&rr.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&rr.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&rr.openHref(this.wallet.homepage,"_blank")}};Lie=xBe([Fe("w3m-downloads-view")],Lie);var _Be=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const EBe="https://walletconnect.com/explorer";let Uie=class extends He{render(){return le` ${this.recommendedWalletsTemplate()} {tr.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} + @click=${()=>{rr.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} > - `}recommendedWalletsTemplate(){const{recommended:e,featured:t}=Nr.state,{customWallets:n}=hr.state;return[...t,...n??[],...e].slice(0,4).map(s=>ce` + `}recommendedWalletsTemplate(){const{recommended:e,featured:t}=$r.state,{customWallets:n}=pr.state;return[...t,...n??[],...e].slice(0,4).map(s=>le` {tr.openHref(s.homepage??NCe,"_blank")}} + imageSrc=${br(Qn.getWalletImage(s))} + @click=${()=>{rr.openHref(s.homepage??EBe,"_blank")}} > - `)}};hte=MCe([Le("w3m-get-wallet-view")],hte);const PCe=Ze` + `)}};Uie=_Be([Fe("w3m-get-wallet-view")],Uie);const CBe=Ze` @keyframes shake { 0% { transform: translateX(0); @@ -6442,7 +6459,7 @@ Minimum version required to store current data is: `+s+`. display: block; opacity: 1; } -`;var iP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let u6=class extends Fe{constructor(){var e;super(),this.network=(e=et.state.data)==null?void 0:e.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),t=this.getSubLabel();return ce` +`;var lD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let N8=class extends He{constructor(){var e;super(),this.network=(e=it.state.data)==null?void 0:e.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),t=this.getSubLabel();return le` - ${this.error?null:ce``} + ${this.error?null:le``} - `}getSubLabel(){const e=xs.getConnectedConnector();return Ln.getEmailConnector()&&e==="EMAIL"?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){var n;const e=xs.getConnectedConnector();return Ln.getEmailConnector()&&e==="EMAIL"?`Switching to ${((n=this.network)==null?void 0:n.name)??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await lr.switchActiveNetwork(this.network),hr.state.isSiweEnabled||$A.navigateAfterNetworkSwitch())}catch{this.error=!0}}};u6.styles=PCe,iP([Oe()],u6.prototype,"showRetry",void 0),iP([Oe()],u6.prototype,"error",void 0),u6=iP([Le("w3m-network-switch-view")],u6);const OCe=Ze` + `}getSubLabel(){const e=Ts.getConnectedConnector();return Un.getEmailConnector()&&e==="EMAIL"?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){var n;const e=Ts.getConnectedConnector();return Un.getEmailConnector()&&e==="EMAIL"?`Switching to ${((n=this.network)==null?void 0:n.name)??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await dr.switchActiveNetwork(this.network),pr.state.isSiweEnabled||mN.navigateAfterNetworkSwitch())}catch{this.error=!0}}};N8.styles=CBe,lD([De()],N8.prototype,"showRetry",void 0),lD([De()],N8.prototype,"error",void 0),N8=lD([Fe("w3m-network-switch-view")],N8);const ABe=Ze` :host > wui-grid { max-height: 360px; overflow: auto; @@ -6493,7 +6510,7 @@ Minimum version required to store current data is: `+s+`. wui-grid::-webkit-scrollbar { display: none; } -`;var fte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let _C=class extends Fe{constructor(){super(),this.unsubscribe=[],this.caipNetwork=lr.state.caipNetwork,this.unsubscribe.push(lr.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var Fie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let YS=class extends He{constructor(){super(),this.unsubscribe=[],this.caipNetwork=dr.state.caipNetwork,this.unsubscribe.push(dr.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.networksTemplate()} @@ -6509,17 +6526,17 @@ Minimum version required to store current data is: `+s+`. What is a network
      - `}onNetworkHelp(){yr.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),et.push("WhatIsANetwork")}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,supportsAllNetworks:n}=lr.state,i=tr.sortRequestedNetworks(e,t);return i==null?void 0:i.map(s=>{var o;return ce` + `}onNetworkHelp(){Cr.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),it.push("WhatIsANetwork")}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,supportsAllNetworks:n}=dr.state,i=rr.sortRequestedNetworks(e,t);return i==null?void 0:i.map(s=>{var a;return le` this.onSwitchNetwork(s)} .disabled=${!n&&!(e!=null&&e.includes(s.id))} data-testid=${`w3m-network-switch-${s.name??s.id}`} > - `})}async onSwitchNetwork(e){const{isConnected:t}=zt.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=lr.state,{data:o}=et.state;t&&(s==null?void 0:s.id)!==e.id?n!=null&&n.includes(e.id)?(await lr.switchActiveNetwork(e),$A.navigateAfterNetworkSwitch()):i&&et.push("SwitchNetwork",{...o,network:e}):t||(lr.setCaipNetwork(e),et.push("Connect"))}};_C.styles=OCe,fte([Oe()],_C.prototype,"caipNetwork",void 0),_C=fte([Le("w3m-networks-view")],_C);const DCe=Ze` + `})}async onSwitchNetwork(e){const{isConnected:t}=zt.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=dr.state,{data:a}=it.state;t&&(s==null?void 0:s.id)!==e.id?n!=null&&n.includes(e.id)?(await dr.switchActiveNetwork(e),mN.navigateAfterNetworkSwitch()):i&&it.push("SwitchNetwork",{...a,network:e}):t||(dr.setCaipNetwork(e),it.push("Connect"))}};YS.styles=ABe,Fie([De()],YS.prototype,"caipNetwork",void 0),YS=Fie([Fe("w3m-networks-view")],YS);const SBe=Ze` :host > wui-flex { height: 500px; overflow-y: auto; @@ -6539,36 +6556,36 @@ Minimum version required to store current data is: `+s+`. wui-transaction-list-item-loader { width: 100%; } -`;var h6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const $Ce=7;let bm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.refetchTimeout=void 0,this.selectedOnRampProvider=zn.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=la.state.coinbaseTransactions,this.tokenImages=po.state.tokenImages,this.unsubscribe.push(zn.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}),po.subscribeKey("tokenImages",e=>this.tokenImages=e),()=>{clearTimeout(this.refetchTimeout)},la.subscribe(e=>{this.coinbaseTransactions={...e.coinbaseTransactions}})),la.clearCursor(),this.fetchTransactions()}render(){return ce` +`;var D8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const IBe=7;let ob=class extends He{constructor(){super(),this.unsubscribe=[],this.refetchTimeout=void 0,this.selectedOnRampProvider=Hn.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=yo.state.coinbaseTransactions,this.tokenImages=xa.state.tokenImages,this.unsubscribe.push(Hn.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}),xa.subscribeKey("tokenImages",e=>this.tokenImages=e),()=>{clearTimeout(this.refetchTimeout)},yo.subscribe(e=>{this.coinbaseTransactions={...e.coinbaseTransactions}})),yo.clearCursor(),this.fetchTransactions()}render(){return le` ${this.loading?this.templateLoading():this.templateTransactionsByYear()} - `}templateTransactions(e){return e==null?void 0:e.map(t=>{var a,l,u;const n=hN.formatDate((a=t==null?void 0:t.metadata)==null?void 0:a.minedAt),i=t.transfers[0],s=i==null?void 0:i.fungible_info;if(!s)return null;const o=((l=s==null?void 0:s.icon)==null?void 0:l.url)||((u=this.tokenImages)==null?void 0:u[s.symbol||""]);return ce` + `}templateTransactions(e){return e==null?void 0:e.map(t=>{var o,l,u;const n=hN.formatDate((o=t==null?void 0:t.metadata)==null?void 0:o.minedAt),i=t.transfers[0],s=i==null?void 0:i.fungible_info;if(!s)return null;const a=((l=s==null?void 0:s.icon)==null?void 0:l.url)||((u=this.tokenImages)==null?void 0:u[s.symbol||""]);return le` - `})}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map(t=>{const n=parseInt(t,10);return new Array(12).fill(null).map((s,o)=>o).reverse().map(s=>{var l;const o=t1.getTransactionGroupTitle(n,s),a=(l=this.coinbaseTransactions[n])==null?void 0:l[s];return a?ce` + `})}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map(t=>{const n=parseInt(t,10);return new Array(12).fill(null).map((s,a)=>a).reverse().map(s=>{var l;const a=B1.getTransactionGroupTitle(n,s),o=(l=this.coinbaseTransactions[n])==null?void 0:l[s];return o?le` - ${o} + ${a} - ${this.templateTransactions(a)} + ${this.templateTransactions(o)} - `:null})})}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){const e=zt.state.address,t=hr.state.projectId;if(!e)throw new Error("No address found");if(!t)throw new Error("No projectId found");this.loading=!0,await la.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){var i;const e=new Date;if((((i=this.coinbaseTransactions[e.getFullYear()])==null?void 0:i[e.getMonth()])||[]).filter(s=>s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length===0){clearTimeout(this.refetchTimeout);return}this.refetchTimeout=setTimeout(async()=>{const s=zt.state.address;await la.fetchTransactions(s,"coinbase"),this.refetchLoadingTransactions()},3e3)}templateLoading(){return Array($Ce).fill(ce` `).map(e=>e)}};bm.styles=DCe,h6([Oe()],bm.prototype,"selectedOnRampProvider",void 0),h6([Oe()],bm.prototype,"loading",void 0),h6([Oe()],bm.prototype,"coinbaseTransactions",void 0),h6([Oe()],bm.prototype,"tokenImages",void 0),bm=h6([Le("w3m-onramp-activity-view")],bm);const BCe=Ze` + `:null})})}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){const e=zt.state.address,t=pr.state.projectId;if(!e)throw new Error("No address found");if(!t)throw new Error("No projectId found");this.loading=!0,await yo.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){var i;const e=new Date;if((((i=this.coinbaseTransactions[e.getFullYear()])==null?void 0:i[e.getMonth()])||[]).filter(s=>s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length===0){clearTimeout(this.refetchTimeout);return}this.refetchTimeout=setTimeout(async()=>{const s=zt.state.address;await yo.fetchTransactions(s,"coinbase"),this.refetchLoadingTransactions()},3e3)}templateLoading(){return Array(IBe).fill(le` `).map(e=>e)}};ob.styles=SBe,D8([De()],ob.prototype,"selectedOnRampProvider",void 0),D8([De()],ob.prototype,"loading",void 0),D8([De()],ob.prototype,"coinbaseTransactions",void 0),D8([De()],ob.prototype,"tokenImages",void 0),ob=D8([Fe("w3m-onramp-activity-view")],ob);const TBe=Ze` :host > wui-grid { max-height: 360px; overflow: auto; @@ -6577,25 +6594,25 @@ Minimum version required to store current data is: `+s+`. wui-grid::-webkit-scrollbar { display: none; } -`;var EC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Gv=class extends Fe{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=zn.state.paymentCurrency,this.currencies=zn.state.paymentCurrencies,this.currencyImages=po.state.currencyImages,this.unsubscribe.push(zn.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),po.subscribeKey("currencyImages",e=>this.currencyImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var QS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let G3=class extends He{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Hn.state.paymentCurrency,this.currencies=Hn.state.paymentCurrencies,this.currencyImages=xa.state.currencyImages,this.unsubscribe.push(Hn.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),xa.subscribeKey("currencyImages",e=>this.currencyImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.currenciesTemplate()} - `}currenciesTemplate(){return this.currencies.map(e=>{var t;return ce` + `}currenciesTemplate(){return this.currencies.map(e=>{var t;return le` this.selectCurrency(e)} variant="image" > ${e.id} - `})}selectCurrency(e){e&&(zn.setPaymentCurrency(e),Zr.close())}};Gv.styles=BCe,EC([Oe()],Gv.prototype,"selectedCurrency",void 0),EC([Oe()],Gv.prototype,"currencies",void 0),EC([Oe()],Gv.prototype,"currencyImages",void 0),Gv=EC([Le("w3m-onramp-fiat-select-view")],Gv);var dte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let sP=class extends Fe{constructor(){super(),this.unsubscribe=[],this.providers=zn.state.providers,this.unsubscribe.push(zn.subscribeKey("providers",e=>{this.providers=e}))}firstUpdated(){const e=this.providers.map(async t=>t.name==="coinbase"?await this.getCoinbaseOnRampURL():Promise.resolve(t==null?void 0:t.url));Promise.all(e).then(t=>{this.providers=this.providers.map((n,i)=>({...n,url:t[i]||""}))})}render(){return ce` + `})}selectCurrency(e){e&&(Hn.setPaymentCurrency(e),Xr.close())}};G3.styles=TBe,QS([De()],G3.prototype,"selectedCurrency",void 0),QS([De()],G3.prototype,"currencies",void 0),QS([De()],G3.prototype,"currencyImages",void 0),G3=QS([Fe("w3m-onramp-fiat-select-view")],G3);var jie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let uD=class extends He{constructor(){super(),this.unsubscribe=[],this.providers=Hn.state.providers,this.unsubscribe.push(Hn.subscribeKey("providers",e=>{this.providers=e}))}firstUpdated(){const e=this.providers.map(async t=>t.name==="coinbase"?await this.getCoinbaseOnRampURL():Promise.resolve(t==null?void 0:t.url));Promise.all(e).then(t=>{this.providers=this.providers.map((n,i)=>({...n,url:t[i]||""}))})}render(){return le` ${this.onRampProvidersTemplate()} - `}onRampProvidersTemplate(){return this.providers.map(e=>ce` + `}onRampProvidersTemplate(){return this.providers.map(e=>le` {this.onClickProvider(e)}} ?disabled=${!e.url} > - `)}onClickProvider(e){zn.setSelectedProvider(e),et.push("BuyInProgress"),tr.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes")}async getCoinbaseOnRampURL(){const e=zt.state.address,t=lr.state.caipNetwork;if(!e)throw new Error("No address found");if(!(t!=null&&t.name))throw new Error("No network found");const n=Ls.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[t.name]??Ls.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=zn.state.purchaseCurrency,s=i?[i.symbol]:zn.state.purchaseCurrencies.map(o=>o.symbol);return await ka.generateOnRampURL({defaultNetwork:n,destinationWallets:[{address:e,blockchains:Ls.WC_COINBASE_PAY_SDK_CHAINS,assets:s}],partnerUserId:e,purchaseAmount:zn.state.purchaseAmount})}};dte([Oe()],sP.prototype,"providers",void 0),sP=dte([Le("w3m-onramp-providers-view")],sP);const LCe=Ze` + `)}onClickProvider(e){Hn.setSelectedProvider(e),it.push("BuyInProgress"),rr.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes")}async getCoinbaseOnRampURL(){const e=zt.state.address,t=dr.state.caipNetwork;if(!e)throw new Error("No address found");if(!(t!=null&&t.name))throw new Error("No network found");const n=Hs.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[t.name]??Hs.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=Hn.state.purchaseCurrency,s=i?[i.symbol]:Hn.state.purchaseCurrencies.map(a=>a.symbol);return await Uo.generateOnRampURL({defaultNetwork:n,destinationWallets:[{address:e,blockchains:Hs.WC_COINBASE_PAY_SDK_CHAINS,assets:s}],partnerUserId:e,purchaseAmount:Hn.state.purchaseAmount})}};jie([De()],uD.prototype,"providers",void 0),uD=jie([Fe("w3m-onramp-providers-view")],uD);const kBe=Ze` :host > wui-grid { max-height: 360px; overflow: auto; @@ -6612,14 +6629,14 @@ Minimum version required to store current data is: `+s+`. wui-grid::-webkit-scrollbar { display: none; } -`;var AC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Kv=class extends Fe{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=zn.state.purchaseCurrencies,this.tokens=zn.state.purchaseCurrencies,this.tokenImages=po.state.tokenImages,this.unsubscribe.push(zn.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),po.subscribeKey("tokenImages",e=>this.tokenImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var XS=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let K3=class extends He{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Hn.state.purchaseCurrencies,this.tokens=Hn.state.purchaseCurrencies,this.tokenImages=xa.state.tokenImages,this.unsubscribe.push(Hn.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),xa.subscribeKey("tokenImages",e=>this.tokenImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.currenciesTemplate()} - `}currenciesTemplate(){return this.tokens.map(e=>{var t;return ce` + `}currenciesTemplate(){return this.tokens.map(e=>{var t;return le` this.selectToken(e)} variant="image" > @@ -6628,7 +6645,7 @@ Minimum version required to store current data is: `+s+`. ${e.symbol}
      - `})}selectToken(e){e&&(zn.setPurchaseCurrency(e),Zr.close())}};Kv.styles=LCe,AC([Oe()],Kv.prototype,"selectedCurrency",void 0),AC([Oe()],Kv.prototype,"tokens",void 0),AC([Oe()],Kv.prototype,"tokenImages",void 0),Kv=AC([Le("w3m-onramp-token-select-view")],Kv);const UCe=Ze` + `})}selectToken(e){e&&(Hn.setPurchaseCurrency(e),Xr.close())}};K3.styles=kBe,XS([De()],K3.prototype,"selectedCurrency",void 0),XS([De()],K3.prototype,"tokens",void 0),XS([De()],K3.prototype,"tokenImages",void 0),K3=XS([Fe("w3m-onramp-token-select-view")],K3);const RBe=Ze` :host > wui-flex:first-child { overflow-y: auto; overflow-x: hidden; @@ -6718,11 +6735,11 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-4xs); padding: 4.5px 6px; } -`;var mo=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Us=class extends Fe{constructor(){var e;super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=(e=lr.state.caipNetwork)==null?void 0:e.id,this.initialized=pr.state.initialized,this.loading=pr.state.loading,this.loadingPrices=pr.state.loadingPrices,this.sourceToken=pr.state.sourceToken,this.sourceTokenAmount=pr.state.sourceTokenAmount,this.sourceTokenPriceInUSD=pr.state.sourceTokenPriceInUSD,this.toToken=pr.state.toToken,this.toTokenAmount=pr.state.toTokenAmount,this.toTokenPriceInUSD=pr.state.toTokenPriceInUSD,this.inputError=pr.state.inputError,this.gasPriceInUSD=pr.state.gasPriceInUSD,this.priceImpact=pr.state.priceImpact,this.maxSlippage=pr.state.maxSlippage,this.transactionLoading=pr.state.transactionLoading,this.onDebouncedGetSwapCalldata=tr.debounce(async()=>{await pr.convertTokens()},500),lr.subscribeKey("caipNetwork",t=>{this.caipNetworkId!==(t==null?void 0:t.id)&&(this.caipNetworkId=t==null?void 0:t.id,pr.resetTokens(),pr.resetValues(),pr.initializeState())}),this.unsubscribe.push(Zr.subscribeKey("open",t=>{t||pr.resetValues()}),et.subscribeKey("view",t=>{t.includes("Convert")||pr.resetValues()}),pr.subscribe(t=>{this.initialized=t.initialized,this.loading=t.loading,this.loadingPrices=t.loadingPrices,this.transactionLoading=t.transactionLoading,this.sourceToken=t.sourceToken,this.sourceTokenAmount=t.sourceTokenAmount,this.sourceTokenPriceInUSD=t.sourceTokenPriceInUSD,this.toToken=t.toToken,this.toTokenAmount=t.toTokenAmount,this.toTokenPriceInUSD=t.toTokenPriceInUSD,this.inputError=t.inputError,this.gasPriceInUSD=t.gasPriceInUSD,this.priceImpact=t.priceImpact,this.maxSlippage=t.maxSlippage})),this.watchTokensAndValues()}firstUpdated(){this.initialized||pr.initializeState()}disconnectedCallback(){pr.setLoading(!1),this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return ce` +`;var Ea=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let qs=class extends He{constructor(){var e;super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=(e=dr.state.caipNetwork)==null?void 0:e.id,this.initialized=gr.state.initialized,this.loading=gr.state.loading,this.loadingPrices=gr.state.loadingPrices,this.sourceToken=gr.state.sourceToken,this.sourceTokenAmount=gr.state.sourceTokenAmount,this.sourceTokenPriceInUSD=gr.state.sourceTokenPriceInUSD,this.toToken=gr.state.toToken,this.toTokenAmount=gr.state.toTokenAmount,this.toTokenPriceInUSD=gr.state.toTokenPriceInUSD,this.inputError=gr.state.inputError,this.gasPriceInUSD=gr.state.gasPriceInUSD,this.priceImpact=gr.state.priceImpact,this.maxSlippage=gr.state.maxSlippage,this.transactionLoading=gr.state.transactionLoading,this.onDebouncedGetSwapCalldata=rr.debounce(async()=>{await gr.convertTokens()},500),dr.subscribeKey("caipNetwork",t=>{this.caipNetworkId!==(t==null?void 0:t.id)&&(this.caipNetworkId=t==null?void 0:t.id,gr.resetTokens(),gr.resetValues(),gr.initializeState())}),this.unsubscribe.push(Xr.subscribeKey("open",t=>{t||gr.resetValues()}),it.subscribeKey("view",t=>{t.includes("Convert")||gr.resetValues()}),gr.subscribe(t=>{this.initialized=t.initialized,this.loading=t.loading,this.loadingPrices=t.loadingPrices,this.transactionLoading=t.transactionLoading,this.sourceToken=t.sourceToken,this.sourceTokenAmount=t.sourceTokenAmount,this.sourceTokenPriceInUSD=t.sourceTokenPriceInUSD,this.toToken=t.toToken,this.toTokenAmount=t.toTokenAmount,this.toTokenPriceInUSD=t.toTokenPriceInUSD,this.inputError=t.inputError,this.gasPriceInUSD=t.gasPriceInUSD,this.priceImpact=t.priceImpact,this.maxSlippage=t.maxSlippage})),this.watchTokensAndValues()}firstUpdated(){this.initialized||gr.initializeState()}disconnectedCallback(){gr.setLoading(!1),this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return le` ${this.initialized?this.templateSwap():this.templateLoading()} - `}watchTokensAndValues(){this.interval=setInterval(()=>{pr.getNetworkTokenPrice(),pr.getMyTokensWithBalance(),pr.refreshConvertValues()},2e4)}templateSwap(){return ce` + `}watchTokensAndValues(){this.interval=setInterval(()=>{gr.getNetworkTokenPrice(),gr.getMyTokensWithBalance(),gr.refreshConvertValues()},2e4)}templateSwap(){return le` ${this.templateDetails()} ${this.templateActionButton()} - `}actionButtonLabel(){return this.inputError?this.inputError:"Review convert"}templateReplaceTokensButton(){return ce` + `}actionButtonLabel(){return this.inputError?this.inputError:"Review convert"}templateReplaceTokensButton(){return le` - `}templateLoading(){return ce` - `}templateTokenInput(e,t){var a,l;const n=(a=pr.state.myTokensWithBalance)==null?void 0:a.find(u=>(u==null?void 0:u.address)===(t==null?void 0:t.address)),i=e==="toToken"?this.toTokenAmount:this.sourceTokenAmount,s=e==="toToken"?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD;let o=parseFloat(i)*s;return e==="toToken"&&(o-=this.gasPriceInUSD||0),ce``}templateTokenInput(e,t){var o,l;const n=(o=gr.state.myTokensWithBalance)==null?void 0:o.find(u=>(u==null?void 0:u.address)===(t==null?void 0:t.address)),i=e==="toToken"?this.toTokenAmount:this.sourceTokenAmount,s=e==="toToken"?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD;let a=parseFloat(i)*s;return e==="toToken"&&(a-=this.gasPriceInUSD||0),le``}onSetMaxValue(e,t){const n=e==="sourceToken"?this.sourceToken:this.toToken,i=(n==null?void 0:n.address)===Ls.NATIVE_TOKEN_ADDRESS;let s="0";if(!t){s="0",this.handleChangeAmount(e,s);return}if(!this.gasPriceInUSD){s=t,this.handleChangeAmount(e,s);return}const o=Lo.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),a=i?Lo.bigNumber(t).minus(o):Lo.bigNumber(t);this.handleChangeAmount(e,a.isGreaterThan(0)?a.toFixed(20):"0")}templateDetails(){var t,n;if(this.loading||this.inputError||!this.sourceToken||!this.toToken||!this.sourceTokenAmount||!this.toTokenAmount)return null;const e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return ce` + >`}onSetMaxValue(e,t){const n=e==="sourceToken"?this.sourceToken:this.toToken,i=(n==null?void 0:n.address)===Hs.NATIVE_TOKEN_ADDRESS;let s="0";if(!t){s="0",this.handleChangeAmount(e,s);return}if(!this.gasPriceInUSD){s=t,this.handleChangeAmount(e,s);return}const a=Ga.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),o=i?Ga.bigNumber(t).minus(a):Ga.bigNumber(t);this.handleChangeAmount(e,o.isGreaterThan(0)?o.toFixed(20):"0")}templateDetails(){var t,n;if(this.loading||this.inputError||!this.sourceToken||!this.toToken||!this.sourceTokenAmount||!this.toTokenAmount)return null;const e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return le` - `}handleChangeAmount(e,t){pr.clearError(),e==="sourceToken"?pr.setSourceTokenAmount(t):pr.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,t=this.loading||this.loadingPrices||this.transactionLoading;return ce` + `}handleChangeAmount(e,t){gr.clearError(),e==="sourceToken"?gr.setSourceTokenAmount(t):gr.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,t=this.loading||this.loadingPrices||this.transactionLoading;return le` ${this.actionButtonLabel()} - `}onSwitchTokens(){pr.switchTokens()}onConvertPreview(){et.push("ConvertPreview")}};Us.styles=UCe,mo([Oe()],Us.prototype,"interval",void 0),mo([Oe()],Us.prototype,"detailsOpen",void 0),mo([Oe()],Us.prototype,"caipNetworkId",void 0),mo([Oe()],Us.prototype,"initialized",void 0),mo([Oe()],Us.prototype,"loading",void 0),mo([Oe()],Us.prototype,"loadingPrices",void 0),mo([Oe()],Us.prototype,"sourceToken",void 0),mo([Oe()],Us.prototype,"sourceTokenAmount",void 0),mo([Oe()],Us.prototype,"sourceTokenPriceInUSD",void 0),mo([Oe()],Us.prototype,"toToken",void 0),mo([Oe()],Us.prototype,"toTokenAmount",void 0),mo([Oe()],Us.prototype,"toTokenPriceInUSD",void 0),mo([Oe()],Us.prototype,"inputError",void 0),mo([Oe()],Us.prototype,"gasPriceInUSD",void 0),mo([Oe()],Us.prototype,"priceImpact",void 0),mo([Oe()],Us.prototype,"maxSlippage",void 0),mo([Oe()],Us.prototype,"transactionLoading",void 0),Us=mo([Le("w3m-convert-view")],Us);const FCe=Ze` + `}onSwitchTokens(){gr.switchTokens()}onConvertPreview(){it.push("ConvertPreview")}};qs.styles=RBe,Ea([De()],qs.prototype,"interval",void 0),Ea([De()],qs.prototype,"detailsOpen",void 0),Ea([De()],qs.prototype,"caipNetworkId",void 0),Ea([De()],qs.prototype,"initialized",void 0),Ea([De()],qs.prototype,"loading",void 0),Ea([De()],qs.prototype,"loadingPrices",void 0),Ea([De()],qs.prototype,"sourceToken",void 0),Ea([De()],qs.prototype,"sourceTokenAmount",void 0),Ea([De()],qs.prototype,"sourceTokenPriceInUSD",void 0),Ea([De()],qs.prototype,"toToken",void 0),Ea([De()],qs.prototype,"toTokenAmount",void 0),Ea([De()],qs.prototype,"toTokenPriceInUSD",void 0),Ea([De()],qs.prototype,"inputError",void 0),Ea([De()],qs.prototype,"gasPriceInUSD",void 0),Ea([De()],qs.prototype,"priceImpact",void 0),Ea([De()],qs.prototype,"maxSlippage",void 0),Ea([De()],qs.prototype,"transactionLoading",void 0),qs=Ea([Fe("w3m-convert-view")],qs);const MBe=Ze` :host > wui-flex:first-child { overflow-y: auto; overflow-x: hidden; @@ -6926,9 +6943,9 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-4xs); padding: 4.5px 6px; } -`;var da=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let bo=class extends Fe{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=pr.state.approvalTransaction,this.convertTransaction=pr.state.convertTransaction,this.sourceToken=pr.state.sourceToken,this.sourceTokenAmount=pr.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=pr.state.sourceTokenPriceInUSD,this.toToken=pr.state.toToken,this.toTokenAmount=pr.state.toTokenAmount??"",this.toTokenPriceInUSD=pr.state.toTokenPriceInUSD,this.caipNetwork=lr.state.caipNetwork,this.transactionLoading=pr.state.transactionLoading,this.balanceSymbol=zt.state.balanceSymbol,this.gasPriceInUSD=pr.state.gasPriceInUSD,this.priceImpact=pr.state.priceImpact,this.maxSlippage=pr.state.maxSlippage,this.unsubscribe.push(zt.subscribeKey("balanceSymbol",e=>{this.balanceSymbol!==e&&et.goBack()}),lr.subscribeKey("caipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),pr.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.convertTransaction=e.convertTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.transactionLoading=e.transactionLoading,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage}))}render(){return ce` +`;var Co=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ca=class extends He{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=gr.state.approvalTransaction,this.convertTransaction=gr.state.convertTransaction,this.sourceToken=gr.state.sourceToken,this.sourceTokenAmount=gr.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=gr.state.sourceTokenPriceInUSD,this.toToken=gr.state.toToken,this.toTokenAmount=gr.state.toTokenAmount??"",this.toTokenPriceInUSD=gr.state.toTokenPriceInUSD,this.caipNetwork=dr.state.caipNetwork,this.transactionLoading=gr.state.transactionLoading,this.balanceSymbol=zt.state.balanceSymbol,this.gasPriceInUSD=gr.state.gasPriceInUSD,this.priceImpact=gr.state.priceImpact,this.maxSlippage=gr.state.maxSlippage,this.unsubscribe.push(zt.subscribeKey("balanceSymbol",e=>{this.balanceSymbol!==e&&it.goBack()}),dr.subscribeKey("caipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),gr.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.convertTransaction=e.convertTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.transactionLoading=e.transactionLoading,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage}))}render(){return le` ${this.templateSwap()} - `}templateSwap(){var a,l,u,h;const e=`${Tr.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${(a=this.sourceToken)==null?void 0:a.symbol}`,t=`${Tr.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${(l=this.toToken)==null?void 0:l.symbol}`,n=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,i=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),s=Tr.formatNumberToLocalString(n),o=Tr.formatNumberToLocalString(i);return ce` + `}templateSwap(){var o,l,u,f;const e=`${Mr.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${(o=this.sourceToken)==null?void 0:o.symbol}`,t=`${Mr.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${(l=this.toToken)==null?void 0:l.symbol}`,n=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,i=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),s=Mr.formatNumberToLocalString(n),a=Mr.formatNumberToLocalString(i);return le` Receive - $${o} + $${a} @@ -6994,25 +7011,25 @@ Minimum version required to store current data is: `+s+`. ?disabled=${this.transactionLoading} @click=${this.onSendTransaction.bind(this)} > - ${this.transactionLoading?ce``:ce` + ${this.transactionLoading?le``:le` ${this.actionButtonLabel()} `} - `}templateDetails(){var t,n;const e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return ce` + `}templateDetails(){var t,n;const e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return le` - `}actionButtonLabel(){return this.approvalTransaction?"Approve":"Convert"}onCancelTransaction(){et.goBack()}onSendTransaction(){this.approvalTransaction?pr.sendTransactionForApproval(this.approvalTransaction):pr.sendTransactionForConvert(this.convertTransaction)}};bo.styles=FCe,da([Oe()],bo.prototype,"detailsOpen",void 0),da([Oe()],bo.prototype,"approvalTransaction",void 0),da([Oe()],bo.prototype,"convertTransaction",void 0),da([Oe()],bo.prototype,"sourceToken",void 0),da([Oe()],bo.prototype,"sourceTokenAmount",void 0),da([Oe()],bo.prototype,"sourceTokenPriceInUSD",void 0),da([Oe()],bo.prototype,"toToken",void 0),da([Oe()],bo.prototype,"toTokenAmount",void 0),da([Oe()],bo.prototype,"toTokenPriceInUSD",void 0),da([Oe()],bo.prototype,"caipNetwork",void 0),da([Oe()],bo.prototype,"transactionLoading",void 0),da([Oe()],bo.prototype,"balanceSymbol",void 0),da([Oe()],bo.prototype,"gasPriceInUSD",void 0),da([Oe()],bo.prototype,"priceImpact",void 0),da([Oe()],bo.prototype,"maxSlippage",void 0),bo=da([Le("w3m-convert-preview-view")],bo);const jCe=Ze` + `}actionButtonLabel(){return this.approvalTransaction?"Approve":"Convert"}onCancelTransaction(){it.goBack()}onSendTransaction(){this.approvalTransaction?gr.sendTransactionForApproval(this.approvalTransaction):gr.sendTransactionForConvert(this.convertTransaction)}};Ca.styles=MBe,Co([De()],Ca.prototype,"detailsOpen",void 0),Co([De()],Ca.prototype,"approvalTransaction",void 0),Co([De()],Ca.prototype,"convertTransaction",void 0),Co([De()],Ca.prototype,"sourceToken",void 0),Co([De()],Ca.prototype,"sourceTokenAmount",void 0),Co([De()],Ca.prototype,"sourceTokenPriceInUSD",void 0),Co([De()],Ca.prototype,"toToken",void 0),Co([De()],Ca.prototype,"toTokenAmount",void 0),Co([De()],Ca.prototype,"toTokenPriceInUSD",void 0),Co([De()],Ca.prototype,"caipNetwork",void 0),Co([De()],Ca.prototype,"transactionLoading",void 0),Co([De()],Ca.prototype,"balanceSymbol",void 0),Co([De()],Ca.prototype,"gasPriceInUSD",void 0),Co([De()],Ca.prototype,"priceImpact",void 0),Co([De()],Ca.prototype,"maxSlippage",void 0),Ca=Co([Fe("w3m-convert-preview-view")],Ca);const PBe=Ze` :host { --tokens-scroll--top-opacity: 0; --tokens-scroll--bottom-opacity: 1; @@ -7117,11 +7134,11 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-xs); box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010); } -`;var Zv=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let s1=class extends Fe{constructor(){var e;super(),this.unsubscribe=[],this.targetToken=(e=et.state.data)==null?void 0:e.target,this.sourceToken=pr.state.sourceToken,this.toToken=pr.state.toToken,this.searchValue="",this.unsubscribe.push(pr.subscribe(t=>{this.sourceToken=t.sourceToken,this.toToken=t.toToken})),this.watchTokens()}updated(){var n,i;const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container");e==null||e.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));const t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");t==null||t.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){var n,i;super.disconnectedCallback();const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container"),t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");e==null||e.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t==null||t.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return ce` +`;var Z3=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let j1=class extends He{constructor(){var e;super(),this.unsubscribe=[],this.targetToken=(e=it.state.data)==null?void 0:e.target,this.sourceToken=gr.state.sourceToken,this.toToken=gr.state.toToken,this.searchValue="",this.unsubscribe.push(gr.subscribe(t=>{this.sourceToken=t.sourceToken,this.toToken=t.toToken})),this.watchTokens()}updated(){var n,i;const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container");e==null||e.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));const t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");t==null||t.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){var n,i;super.disconnectedCallback();const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container"),t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");e==null||e.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t==null||t.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return le` ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()} - `}watchTokens(){this.interval=setInterval(()=>{pr.getNetworkTokenPrice(),pr.getMyTokensWithBalance()},5e3)}onSelectToken(e){this.targetToken==="sourceToken"?pr.setSourceToken(e):pr.setToToken(e),et.goBack()}templateSearchInput(){return ce` + `}watchTokens(){this.interval=setInterval(()=>{gr.getNetworkTokenPrice(),gr.getMyTokensWithBalance()},5e3)}onSelectToken(e){this.targetToken==="sourceToken"?gr.setSourceToken(e):gr.setToToken(e),it.goBack()}templateSearchInput(){return le` - `}templateTokens(){const e=pr.state.myTokensWithBalance?Object.values(pr.state.myTokensWithBalance):[],t=pr.state.popularTokens?pr.state.popularTokens:[],n=this.filterTokensWithText(e,this.searchValue),i=this.filterTokensWithText(t,this.searchValue);return ce` + `}templateTokens(){const e=gr.state.myTokensWithBalance?Object.values(gr.state.myTokensWithBalance):[],t=gr.state.popularTokens?gr.state.popularTokens:[],n=this.filterTokensWithText(e,this.searchValue),i=this.filterTokensWithText(t,this.searchValue);return le` - ${(n==null?void 0:n.length)>0?ce` + ${(n==null?void 0:n.length)>0?le` Your tokens - ${n.map(s=>{var a,l,u;const o=s.symbol===((a=this.sourceToken)==null?void 0:a.symbol)||s.symbol===((l=this.toToken)==null?void 0:l.symbol);return ce` + ${n.map(s=>{var o,l,u;const a=s.symbol===((o=this.sourceToken)==null?void 0:o.symbol)||s.symbol===((l=this.toToken)==null?void 0:l.symbol);return le` {o||this.onSelectToken(s)}} + @click=${()=>{a||this.onSelectToken(s)}} > `})} @@ -7157,7 +7174,7 @@ Minimum version required to store current data is: `+s+`. Popular tokens - ${(i==null?void 0:i.length)>0?i.map(s=>ce` + ${(i==null?void 0:i.length)>0?i.map(s=>le` - `}templateSuggestedTokens(){const e=pr.state.suggestedTokens?pr.state.suggestedTokens.slice(0,8):null;return e?ce` + `}templateSuggestedTokens(){const e=gr.state.suggestedTokens?gr.state.suggestedTokens.slice(0,8):null;return e?le` - ${e.map(t=>ce` + ${e.map(t=>le` `)} - `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",c6.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",c6.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",c6.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",c6.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter(n=>`${n.symbol} ${n.name} ${n.address}`.toLowerCase().includes(t.toLowerCase()))}};s1.styles=jCe,Zv([Oe()],s1.prototype,"interval",void 0),Zv([Oe()],s1.prototype,"targetToken",void 0),Zv([Oe()],s1.prototype,"sourceToken",void 0),Zv([Oe()],s1.prototype,"toToken",void 0),Zv([Oe()],s1.prototype,"searchValue",void 0),s1=Zv([Le("w3m-convert-select-token-view")],s1);const zCe=Ze` + `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",P8.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",P8.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",P8.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",P8.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter(n=>`${n.symbol} ${n.name} ${n.address}`.toLowerCase().includes(t.toLowerCase()))}};j1.styles=PBe,Z3([De()],j1.prototype,"interval",void 0),Z3([De()],j1.prototype,"targetToken",void 0),Z3([De()],j1.prototype,"sourceToken",void 0),Z3([De()],j1.prototype,"toToken",void 0),Z3([De()],j1.prototype,"searchValue",void 0),j1=Z3([Fe("w3m-convert-select-token-view")],j1);const OBe=Ze` :host > wui-flex:first-child { height: 500px; overflow-y: auto; @@ -7191,41 +7208,41 @@ Minimum version required to store current data is: `+s+`. :host > wui-flex:first-child::-webkit-scrollbar { display: none; } -`;var HCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let oP=class extends Fe{render(){return ce` +`;var NBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let fD=class extends He{render(){return le` - `}};oP.styles=zCe,oP=HCe([Le("w3m-transactions-view")],oP);var qCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const WCe=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let pte=class extends Fe{render(){return ce` + `}};fD.styles=OBe,fD=NBe([Fe("w3m-transactions-view")],fD);var DBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const $Be=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let zie=class extends He{render(){return le` - + {tr.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} + @click=${()=>{rr.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} > Learn more - `}};pte=qCe([Le("w3m-what-is-a-network-view")],pte);var VCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const GCe=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let gte=class extends Fe{render(){return ce` + `}};zie=DBe([Fe("w3m-what-is-a-network-view")],zie);var BBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const LBe=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let Hie=class extends He{render(){return le` - + Get a wallet - `}onGetWallet(){yr.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),et.push("GetWallet")}};gte=VCe([Le("w3m-what-is-a-wallet-view")],gte);var KCe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let mte=class extends Fe{render(){return ce` + `}onGetWallet(){Cr.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),it.push("GetWallet")}};Hie=BBe([Fe("w3m-what-is-a-wallet-view")],Hie);var UBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let qie=class extends He{render(){return le` - + Buy - `}};mte=KCe([Le("w3m-what-is-a-buy-view")],mte);const ZCe=Ze` + `}};qie=UBe([Fe("w3m-what-is-a-buy-view")],qie);const FBe=Ze` wui-loading-spinner { margin: 9px auto; } -`;var CC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const JCe=6;let Ud=class extends Fe{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){var e;super(),this.loading=!1,this.timeoutTimeLeft=go.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=(e=et.state.data)==null?void 0:e.email,this.emailConnector=Ln.getEmailConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=Boolean(this.timeoutTimeLeft),t=this.getFooterLabels(e);return ce` +`;var eI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const jBe=6;let m0=class extends He{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){var e;super(),this.loading=!1,this.timeoutTimeLeft=_a.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=(e=it.state.data)==null?void 0:e.email,this.emailConnector=Un.getEmailConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return le` The code expires in 20 minutes - ${this.loading?ce``:ce` + ${this.loading?le``:le` - ${this.error?ce` + ${this.error?le` ${this.error}. Try Again @@ -7286,12 +7303,12 @@ Minimum version required to store current data is: `+s+`. - `}startOTPTimeout(){this.timeoutTimeLeft=go.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=go.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){var t;try{this.loading||(this.otp=e.detail,this.emailConnector&&this.otp.length===JCe&&(this.loading=!0,await((t=this.onOtpSubmit)==null?void 0:t.call(this,this.otp))))}catch(n){this.error=tr.parseError(n),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!Ln.getEmailConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),dn.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){dn.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}};Ud.styles=ZCe,CC([Oe()],Ud.prototype,"loading",void 0),CC([Oe()],Ud.prototype,"timeoutTimeLeft",void 0),CC([Oe()],Ud.prototype,"error",void 0),Ud=CC([Le("w3m-email-otp-widget")],Ud);var bte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let aP=class extends Ud{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=zt.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.emailConnector){const t=lr.checkIfSmartAccountEnabled();await this.emailConnector.provider.connectOtp({otp:e}),yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await Ur.connectExternal(this.emailConnector),yr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.emailConnector.name||"Unknown"}}),t&&!this.smartAccountDeployed?et.push("UpgradeToSmartAccount"):Zr.close()}}catch(t){throw yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onOtpResend=async e=>{this.emailConnector&&(await this.emailConnector.provider.connectEmail({email:e}),yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(zt.subscribeKey("smartAccountDeployed",e=>{this.smartAccountDeployed=e}))}};bte([Oe()],aP.prototype,"smartAccountDeployed",void 0),aP=bte([Le("w3m-email-verify-otp-view")],aP);const YCe=Ze` + `}startOTPTimeout(){this.timeoutTimeLeft=_a.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=_a.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){var t;try{this.loading||(this.otp=e.detail,this.emailConnector&&this.otp.length===jBe&&(this.loading=!0,await((t=this.onOtpSubmit)==null?void 0:t.call(this,this.otp))))}catch(n){this.error=rr.parseError(n),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!Un.getEmailConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),bn.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){bn.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}};m0.styles=FBe,eI([De()],m0.prototype,"loading",void 0),eI([De()],m0.prototype,"timeoutTimeLeft",void 0),eI([De()],m0.prototype,"error",void 0),m0=eI([Fe("w3m-email-otp-widget")],m0);var Wie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let dD=class extends m0{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=zt.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.emailConnector){const t=dr.checkIfSmartAccountEnabled();await this.emailConnector.provider.connectOtp({otp:e}),Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await Gr.connectExternal(this.emailConnector),Cr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.emailConnector.name||"Unknown"}}),t&&!this.smartAccountDeployed?it.push("UpgradeToSmartAccount"):Xr.close()}}catch(t){throw Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onOtpResend=async e=>{this.emailConnector&&(await this.emailConnector.provider.connectEmail({email:e}),Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(zt.subscribeKey("smartAccountDeployed",e=>{this.smartAccountDeployed=e}))}};Wie([De()],dD.prototype,"smartAccountDeployed",void 0),dD=Wie([Fe("w3m-email-verify-otp-view")],dD);const zBe=Ze` wui-icon-box { height: var(--wui-icon-box-size-xl); width: var(--wui-icon-box-size-xl); } -`;var wte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let SC=class extends Fe{constructor(){var e;super(),this.email=(e=et.state.data)==null?void 0:e.email,this.emailConnector=Ln.getEmailConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.emailConnector)throw new Error("w3m-email-verify-device-view: No email connector provided");return ce` +`;var Vie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let tI=class extends He{constructor(){var e;super(),this.email=(e=it.state.data)==null?void 0:e.email,this.emailConnector=Un.getEmailConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.emailConnector)throw new Error("w3m-email-verify-device-view: No email connector provided");return le` - `}async listenForDeviceApproval(){if(this.emailConnector)try{await this.emailConnector.provider.connectDevice(),yr.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),et.replace("EmailVerifyOtp",{email:this.email})}catch{et.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.emailConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),dn.showSuccess("Code email resent")}}catch(e){dn.showError(e)}finally{this.loading=!1}}};SC.styles=YCe,wte([Oe()],SC.prototype,"loading",void 0),SC=wte([Le("w3m-email-verify-device-view")],SC);const QCe=Ze` + `}async listenForDeviceApproval(){if(this.emailConnector)try{await this.emailConnector.provider.connectDevice(),Cr.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),it.replace("EmailVerifyOtp",{email:this.email})}catch{it.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.emailConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),bn.showSuccess("Code email resent")}}catch(e){bn.showError(e)}finally{this.loading=!1}}};tI.styles=zBe,Vie([De()],tI.prototype,"loading",void 0),tI=Vie([Fe("w3m-email-verify-device-view")],tI);const HBe=Ze` div { width: 100%; height: 400px; @@ -7343,14 +7360,14 @@ Minimum version required to store current data is: `+s+`. transform: translateY(-50px); } } -`;var vte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const yte=400,xte=360,XCe=64;let IC=class extends Fe{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(Zr.subscribeKey("open",e=>{e||(this.onHideIframe(),et.popTransactionStack())}))}disconnectedCallback(){var e;this.onHideIframe(),this.unsubscribe.forEach(t=>t()),(e=this.bodyObserver)==null||e.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver(()=>{this.iframe.style.width=`${xte}px`,this.iframe.style.height=`${yte}px`,this.iframe.style.left=`calc(50% - ${xte/2}px)`,this.iframe.style.top=`calc(50% - ${yte/2}px + ${XCe/2}px)`,this.ready=!0}),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),ce`
      `}onShowIframe(){const e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards"})}async onHideIframe(){this.iframe.style.display="none",await this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished}async syncTheme(){const e=Ln.getEmailConnector();e&&await e.provider.syncTheme({themeVariables:Zs.getSnapshot().themeVariables})}};IC.styles=QCe,vte([Oe()],IC.prototype,"ready",void 0),IC=vte([Le("w3m-approve-transaction-view")],IC);var eSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let _te=class extends Fe{render(){return ce` +`;var Gie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const Kie=400,Zie=360,qBe=64;let rI=class extends He{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(Xr.subscribeKey("open",e=>{e||(this.onHideIframe(),it.popTransactionStack())}))}disconnectedCallback(){var e;this.onHideIframe(),this.unsubscribe.forEach(t=>t()),(e=this.bodyObserver)==null||e.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver(()=>{this.iframe.style.width=`${Zie}px`,this.iframe.style.height=`${Kie}px`,this.iframe.style.left=`calc(50% - ${Zie/2}px)`,this.iframe.style.top=`calc(50% - ${Kie/2}px + ${qBe/2}px)`,this.ready=!0}),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),le`
      `}onShowIframe(){const e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards"})}async onHideIframe(){this.iframe.style.display="none",await this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished}async syncTheme(){const e=Un.getEmailConnector();e&&await e.provider.syncTheme({themeVariables:ea.getSnapshot().themeVariables})}};rI.styles=HBe,Gie([De()],rI.prototype,"ready",void 0),rI=Gie([Fe("w3m-approve-transaction-view")],rI);var WBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Jie=class extends He{render(){return le` Follow the instructions on @@ -7358,7 +7375,7 @@ Minimum version required to store current data is: `+s+`. You will have to reconnect for security reasons - `}};_te=eSe([Le("w3m-upgrade-wallet-view")],_te);var cP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let TC=class extends Fe{constructor(){super(...arguments),this.emailConnector=Ln.getEmailConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.emailConnector)try{this.loading=!0,await this.emailConnector.provider.setPreferredAccount(Oa.ACCOUNT_TYPES.SMART_ACCOUNT),await this.emailConnector.provider.connect(),this.loading=!1,et.push("Account")}catch{dn.showError("Error upgrading to smart account")}}}render(){return ce` + `}};Jie=WBe([Fe("w3m-upgrade-wallet-view")],Jie);var hD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let nI=class extends He{constructor(){super(...arguments),this.emailConnector=Un.getEmailConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.emailConnector)try{this.loading=!0,await this.emailConnector.provider.setPreferredAccount(Ho.ACCOUNT_TYPES.SMART_ACCOUNT),await this.emailConnector.provider.connect(),this.loading=!1,it.push("Account")}catch{bn.showError("Error upgrading to smart account")}}}render(){return le`
      - `}onboardingTemplate(){return ce` - `}buttonsTemplate(){return ce` + `}buttonsTemplate(){return le` Continue - `}redirectToAccount(){et.push("Account")}};cP([Oe()],TC.prototype,"emailConnector",void 0),cP([Oe()],TC.prototype,"loading",void 0),TC=cP([Le("w3m-upgrade-to-smart-account-view")],TC);const tSe=Ze` + `}redirectToAccount(){it.push("Account")}};hD([De()],nI.prototype,"emailConnector",void 0),hD([De()],nI.prototype,"loading",void 0),nI=hD([Fe("w3m-upgrade-to-smart-account-view")],nI);const VBe=Ze` wui-email-input { width: 100%; } @@ -7417,9 +7434,9 @@ Minimum version required to store current data is: `+s+`. display: block; position: relative; } -`;var lP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let f6=class extends Fe{constructor(){var e;super(...arguments),this.formRef=tm(),this.initialEmail=((e=et.state.data)==null?void 0:e.email)??"",this.email="",this.loading=!1}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return ce` +`;var pD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let $8=class extends He{constructor(){var e;super(...arguments),this.formRef=Wg(),this.initialEmail=((e=it.state.data)==null?void 0:e.email)??"",this.email="",this.loading=!1}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return le` - + - + Cancel @@ -7446,7 +7463,7 @@ Minimum version required to store current data is: `+s+`. - `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=Ln.getEmailConnector();if(!t)throw new Error("w3m-update-email-wallet: Email connector not found");const n=await t.provider.updateEmail({email:this.email});yr.sendEvent({type:"track",event:"EMAIL_EDIT"}),n.action==="VERIFY_SECONDARY_OTP"?et.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):et.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(t){dn.showError(t),this.loading=!1}}};f6.styles=tSe,lP([Oe()],f6.prototype,"email",void 0),lP([Oe()],f6.prototype,"loading",void 0),f6=lP([Le("w3m-update-email-wallet-view")],f6);var rSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ete=class extends Ud{constructor(){var e;super(),this.email=(e=et.state.data)==null?void 0:e.email,this.onOtpSubmit=async t=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailPrimaryOtp({otp:t}),yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),et.replace("UpdateEmailSecondaryOtp",et.state.data))}catch(n){throw yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{et.replace("UpdateEmailWallet",et.state.data)}}};Ete=rSe([Le("w3m-update-email-primary-otp-view")],Ete);var nSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Ate=class extends Ud{constructor(){var e;super(),this.email=(e=et.state.data)==null?void 0:e.newEmail,this.onOtpSubmit=async t=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailSecondaryOtp({otp:t}),yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),et.reset("Account"))}catch(n){throw yr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{et.replace("UpdateEmailWallet",et.state.data)}}};Ate=nSe([Le("w3m-update-email-secondary-otp-view")],Ate);const iSe=Ze` + `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=Un.getEmailConnector();if(!t)throw new Error("w3m-update-email-wallet: Email connector not found");const n=await t.provider.updateEmail({email:this.email});Cr.sendEvent({type:"track",event:"EMAIL_EDIT"}),n.action==="VERIFY_SECONDARY_OTP"?it.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):it.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(t){bn.showError(t),this.loading=!1}}};$8.styles=VBe,pD([De()],$8.prototype,"email",void 0),pD([De()],$8.prototype,"loading",void 0),$8=pD([Fe("w3m-update-email-wallet-view")],$8);var GBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Yie=class extends m0{constructor(){var e;super(),this.email=(e=it.state.data)==null?void 0:e.email,this.onOtpSubmit=async t=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailPrimaryOtp({otp:t}),Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),it.replace("UpdateEmailSecondaryOtp",it.state.data))}catch(n){throw Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{it.replace("UpdateEmailWallet",it.state.data)}}};Yie=GBe([Fe("w3m-update-email-primary-otp-view")],Yie);var KBe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Qie=class extends m0{constructor(){var e;super(),this.email=(e=it.state.data)==null?void 0:e.newEmail,this.onOtpSubmit=async t=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailSecondaryOtp({otp:t}),Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),it.reset("Account"))}catch(n){throw Cr.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{it.replace("UpdateEmailWallet",it.state.data)}}};Qie=KBe([Fe("w3m-update-email-secondary-otp-view")],Qie);const ZBe=Ze` :host > wui-flex { max-height: clamp(360px, 540px, 80vh); overflow: scroll; @@ -7456,7 +7473,7 @@ Minimum version required to store current data is: `+s+`. :host > wui-flex::-webkit-scrollbar { display: none; } -`;var Cte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let RC=class extends Fe{constructor(){super(...arguments),this.disconecting=!1}render(){return ce` +`;var Xie=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let iI=class extends He{constructor(){super(...arguments),this.disconecting=!1}render(){return le` - `}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=lr.state;return tr.sortRequestedNetworks(e,t).map(i=>ce` + `}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=dr.state;return rr.sortRequestedNetworks(e,t).map(i=>le` this.onSwitchNetwork(i)} > - `)}async onDisconnect(){try{this.disconecting=!0,await Ur.disconnect(),yr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Zr.close()}catch{yr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),dn.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){const{isConnected:t}=zt.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=lr.state,{data:o}=et.state;t&&(s==null?void 0:s.id)!==e.id?n!=null&&n.includes(e.id)?(await lr.switchActiveNetwork(e),$A.navigateAfterNetworkSwitch()):i&&et.push("SwitchNetwork",{...o,network:e}):t||(lr.setCaipNetwork(e),et.push("Connect"))}};RC.styles=iSe,Cte([Oe()],RC.prototype,"disconecting",void 0),RC=Cte([Le("w3m-unsupported-chain-view")],RC);const sSe=Ze` + `)}async onDisconnect(){try{this.disconecting=!0,await Gr.disconnect(),Cr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Xr.close()}catch{Cr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),bn.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){const{isConnected:t}=zt.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=dr.state,{data:a}=it.state;t&&(s==null?void 0:s.id)!==e.id?n!=null&&n.includes(e.id)?(await dr.switchActiveNetwork(e),mN.navigateAfterNetworkSwitch()):i&&it.push("SwitchNetwork",{...a,network:e}):t||(dr.setCaipNetwork(e),it.push("Connect"))}};iI.styles=ZBe,Xie([De()],iI.prototype,"disconecting",void 0),iI=Xie([Fe("w3m-unsupported-chain-view")],iI);const JBe=Ze` wui-compatible-network { margin-top: var(--wui-spacing-l); } -`;var d6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let wm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.address=zt.state.address,this.profileName=zt.state.profileName,this.network=lr.state.caipNetwork,this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):dn.showError("Account not found")}),lr.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=Yn.getNetworkImage(this.network);return ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let cb=class extends He{constructor(){super(),this.unsubscribe=[],this.address=zt.state.address,this.profileName=zt.state.profileName,this.network=dr.state.caipNetwork,this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):bn.showError("Account not found")}),dr.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=Qn.getNetworkImage(this.network);return le` ${this.networkTemplate()} - `}networkTemplate(){var o;const e=lr.getRequestedCaipNetworks(),t=lr.checkIfSmartAccountEnabled(),n=lr.state.caipNetwork;if(this.preferredAccountType===Oa.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return n?ce``}networkTemplate(){var a;const e=dr.getRequestedCaipNetworks(),t=dr.checkIfSmartAccountEnabled(),n=dr.state.caipNetwork;if(this.preferredAccountType===Ho.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return n?le``:null;const s=((o=e==null?void 0:e.filter(a=>a==null?void 0:a.imageId))==null?void 0:o.slice(0,5)).map(Yn.getNetworkImage).filter(Boolean);return ce``:null;const s=((a=e==null?void 0:e.filter(o=>o==null?void 0:o.imageId))==null?void 0:a.slice(0,5)).map(Qn.getNetworkImage).filter(Boolean);return le``}onReceiveClick(){et.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(tr.copyToClopboard(this.address),dn.showSuccess("Address copied"))}catch{dn.showError("Failed to copy")}}};wm.styles=sSe,d6([Oe()],wm.prototype,"address",void 0),d6([Oe()],wm.prototype,"profileName",void 0),d6([Oe()],wm.prototype,"network",void 0),d6([Oe()],wm.prototype,"preferredAccountType",void 0),wm=d6([Le("w3m-wallet-receive-view")],wm);const oSe=Ze` + >`}onReceiveClick(){it.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(rr.copyToClopboard(this.address),bn.showSuccess("Address copied"))}catch{bn.showError("Failed to copy")}}};cb.styles=JBe,B8([De()],cb.prototype,"address",void 0),B8([De()],cb.prototype,"profileName",void 0),B8([De()],cb.prototype,"network",void 0),B8([De()],cb.prototype,"preferredAccountType",void 0),cb=B8([Fe("w3m-wallet-receive-view")],cb);const YBe=Ze` :host > wui-flex { max-height: clamp(360px, 540px, 80vh); overflow: scroll; @@ -7549,7 +7566,7 @@ Minimum version required to store current data is: `+s+`. :host > wui-flex::-webkit-scrollbar { display: none; } -`;var Ste=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let kC=class extends Fe{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribeKey("preferredAccountType",e=>{this.preferredAccountType=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let sI=class extends He{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribeKey("preferredAccountType",e=>{this.preferredAccountType=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.networkTemplate()} - `}networkTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,caipNetwork:n}=lr.state,i=lr.checkIfSmartAccountEnabled();let s=tr.sortRequestedNetworks(e,t);if(i&&this.preferredAccountType===Oa.ACCOUNT_TYPES.SMART_ACCOUNT){if(!n)return null;s=[n]}return s.map(o=>ce` + `}networkTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,caipNetwork:n}=dr.state,i=dr.checkIfSmartAccountEnabled();let s=rr.sortRequestedNetworks(e,t);if(i&&this.preferredAccountType===Ho.ACCOUNT_TYPES.SMART_ACCOUNT){if(!n)return null;s=[n]}return s.map(a=>le` - `)}};kC.styles=oSe,Ste([Oe()],kC.prototype,"preferredAccountType",void 0),kC=Ste([Le("w3m-wallet-compatible-networks-view")],kC);const aSe=Ze` + `)}};sI.styles=YBe,ese([De()],sI.prototype,"preferredAccountType",void 0),sI=ese([Fe("w3m-wallet-compatible-networks-view")],sI);const QBe=Ze` :host { display: block; } @@ -7595,7 +7612,7 @@ Minimum version required to store current data is: `+s+`. .inputContainer { height: fit-content; } -`;var p6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let vm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.token=Na.state.token,this.sendTokenAmount=Na.state.sendTokenAmount,this.receiverAddress=Na.state.receiverAddress,this.message="Preview Send",this.unsubscribe.push(Na.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),ce` +`;var L8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let lb=class extends He{constructor(){super(),this.unsubscribe=[],this.token=jo.state.token,this.sendTokenAmount=jo.state.sendTokenAmount,this.receiverAddress=jo.state.receiverAddress,this.message="Preview Send",this.unsubscribe.push(jo.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),le` - `}onButtonClick(){et.push("WalletSendPreview")}getMessage(){this.message="Preview Send",this.receiverAddress&&!tr.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.token||(this.message="Select Token")}};vm.styles=aSe,p6([Oe()],vm.prototype,"token",void 0),p6([Oe()],vm.prototype,"sendTokenAmount",void 0),p6([Oe()],vm.prototype,"receiverAddress",void 0),p6([Oe()],vm.prototype,"message",void 0),vm=p6([Le("w3m-wallet-send-view")],vm);const cSe=Ze` + `}onButtonClick(){it.push("WalletSendPreview")}getMessage(){this.message="Preview Send",this.receiverAddress&&!rr.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.token||(this.message="Select Token")}};lb.styles=QBe,L8([De()],lb.prototype,"token",void 0),L8([De()],lb.prototype,"sendTokenAmount",void 0),L8([De()],lb.prototype,"receiverAddress",void 0),L8([De()],lb.prototype,"message",void 0),lb=L8([Fe("w3m-wallet-send-view")],lb);const XBe=Ze` .contentContainer { height: 440px; overflow: scroll; @@ -7634,11 +7651,11 @@ Minimum version required to store current data is: `+s+`. height: 40px; border-radius: var(--wui-border-radius-xxs); } -`;var MC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Jv=class extends Fe{constructor(){super(),this.unsubscribe=[],this.tokenBalance=zt.state.tokenBalance,this.search="",this.onDebouncedSearch=tr.debounce(e=>{this.search=e}),this.unsubscribe.push(zt.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var aI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let J3=class extends He{constructor(){super(),this.unsubscribe=[],this.tokenBalance=zt.state.tokenBalance,this.search="",this.onDebouncedSearch=rr.debounce(e=>{this.search=e}),this.unsubscribe.push(zt.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.templateSearchInput()} ${this.templateTokens()} - `}templateSearchInput(){return ce` + `}templateSearchInput(){return le` - `}templateTokens(){var e;return this.search?this.tokens=(e=this.tokenBalance)==null?void 0:e.filter(t=>t.name.toLowerCase().includes(this.search.toLowerCase())):this.tokens=this.tokenBalance,ce` + `}templateTokens(){var e;return this.search?this.tokens=(e=this.tokenBalance)==null?void 0:e.filter(t=>t.name.toLowerCase().includes(this.search.toLowerCase())):this.tokens=this.tokenBalance,le` Your tokens - ${this.tokens&&this.tokens.length>0?this.tokens.map(t=>ce`0?this.tokens.map(t=>le``):ce``):le``} - `}onBuyClick(){et.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){Na.setToken(e),Na.setTokenAmount(void 0),et.goBack()}};Jv.styles=cSe,MC([Oe()],Jv.prototype,"tokenBalance",void 0),MC([Oe()],Jv.prototype,"tokens",void 0),MC([Oe()],Jv.prototype,"search",void 0),Jv=MC([Le("w3m-wallet-send-select-token-view")],Jv);const lSe=Ze` + `}onBuyClick(){it.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){jo.setToken(e),jo.setTokenAmount(void 0),it.goBack()}};J3.styles=XBe,aI([De()],J3.prototype,"tokenBalance",void 0),aI([De()],J3.prototype,"tokens",void 0),aI([De()],J3.prototype,"search",void 0),J3=aI([Fe("w3m-wallet-send-select-token-view")],J3);const eLe=Ze` wui-avatar, wui-image { display: ruby; @@ -7717,7 +7734,7 @@ Minimum version required to store current data is: `+s+`. --local-width: 100% !important; --local-border-radius: var(--wui-border-radius-xs) !important; } -`;var g6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ym=class extends Fe{constructor(){super(),this.unsubscribe=[],this.token=Na.state.token,this.sendTokenAmount=Na.state.sendTokenAmount,this.receiverAddress=Na.state.receiverAddress,this.caipNetwork=lr.state.caipNetwork,this.unsubscribe.push(Na.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress}),lr.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e,t,n;return ce` +`;var U8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ub=class extends He{constructor(){super(),this.unsubscribe=[],this.token=jo.state.token,this.sendTokenAmount=jo.state.sendTokenAmount,this.receiverAddress=jo.state.receiverAddress,this.caipNetwork=dr.state.caipNetwork,this.unsubscribe.push(jo.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress}),dr.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e,t,n;return le` @@ -7735,7 +7752,7 @@ Minimum version required to store current data is: `+s+`. To @@ -7769,9 +7786,9 @@ Minimum version required to store current data is: `+s+`. `}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return ce``}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return le`$${t.toFixed(2)}`}return null}onSendClick(){et.reset("Account"),setTimeout(()=>{Na.resetSend()},200)}onCancelClick(){et.goBack()}};ym.styles=lSe,g6([Oe()],ym.prototype,"token",void 0),g6([Oe()],ym.prototype,"sendTokenAmount",void 0),g6([Oe()],ym.prototype,"receiverAddress",void 0),g6([Oe()],ym.prototype,"caipNetwork",void 0),ym=g6([Le("w3m-wallet-send-preview-view")],ym);const uSe=Ze` + >`}return null}onSendClick(){it.reset("Account"),setTimeout(()=>{jo.resetSend()},200)}onCancelClick(){it.goBack()}};ub.styles=eLe,U8([De()],ub.prototype,"token",void 0),U8([De()],ub.prototype,"sendTokenAmount",void 0),U8([De()],ub.prototype,"receiverAddress",void 0),U8([De()],ub.prototype,"caipNetwork",void 0),ub=U8([Fe("w3m-wallet-send-preview-view")],ub);const tLe=Ze` wui-grid { max-height: clamp(360px, 400px, 80vh); overflow: scroll; @@ -7800,7 +7817,7 @@ Minimum version required to store current data is: `+s+`. justify-content: center; grid-column: 1 / span 4; } -`;function Ite(r){const{connectors:e}=Ln.state,t=e.filter(s=>s.type==="ANNOUNCED").reduce((s,o)=>{var a;return(a=o.info)!=null&&a.rdns&&(s[o.info.rdns]=!0),s},{});return r.map(s=>({...s,installed:Boolean(s.rdns)&&Boolean(t[s.rdns??""])})).sort((s,o)=>Number(o.installed)-Number(s.installed))}var m6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const Tte="local-paginator";let xm=class extends Fe{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!Nr.state.wallets.length,this.wallets=Nr.state.wallets,this.recommended=Nr.state.recommended,this.featured=Nr.state.featured,this.unsubscribe.push(Nr.subscribeKey("wallets",e=>this.wallets=e),Nr.subscribeKey("recommended",e=>this.recommended=e),Nr.subscribeKey("featured",e=>this.featured=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var e;this.unsubscribe.forEach(t=>t()),(e=this.paginationObserver)==null||e.disconnect()}render(){return ce` +`;function tse(r){const{connectors:e}=Un.state,t=e.filter(s=>s.type==="ANNOUNCED").reduce((s,a)=>{var o;return(o=a.info)!=null&&o.rdns&&(s[a.info.rdns]=!0),s},{});return r.map(s=>({...s,installed:!!s.rdns&&!!t[s.rdns??""]})).sort((s,a)=>Number(a.installed)-Number(s.installed))}var F8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const rse="local-paginator";let fb=class extends He{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!$r.state.wallets.length,this.wallets=$r.state.wallets,this.recommended=$r.state.recommended,this.featured=$r.state.featured,this.unsubscribe.push($r.subscribeKey("wallets",e=>this.wallets=e),$r.subscribeKey("recommended",e=>this.recommended=e),$r.subscribeKey("featured",e=>this.featured=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var e;this.unsubscribe.forEach(t=>t()),(e=this.paginationObserver)==null||e.disconnect()}render(){return le` - `}async initialFetch(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-grid");this.initial&&e&&(await Nr.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>ce` - - `)}walletsTemplate(){const e=[...this.featured,...this.recommended,...this.wallets];return Ite(e).map(n=>ce` + `}async initialFetch(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-grid");this.initial&&e&&(await $r.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>le` + + `)}walletsTemplate(){const e=[...this.featured,...this.recommended,...this.wallets];return tse(e).map(n=>le` this.onConnectWallet(n)} .installed=${n.installed} > - `)}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:n,count:i}=Nr.state,s=window.innerWidth<352?3:4,o=e.length+t.length;let l=Math.ceil(o/s)*s-o+s;return l-=e.length?n.length%s:0,i===0&&n.length>0?null:i===0||[...n,...e,...t].length{if(n!=null&&n.isIntersecting&&!this.initial){const{page:i,count:s,wallets:o}=Nr.state;o.length0?null:i===0||[...n,...e,...t].length{if(n!=null&&n.isIntersecting&&!this.initial){const{page:i,count:s,wallets:a}=$r.state;a.length=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let b6=class extends Fe{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?ce``:this.walletsTemplate()}async onSearch(){this.query!==this.prevQuery&&(this.prevQuery=this.query,this.loading=!0,await Nr.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=Nr.state,t=Ite(e);return e.length?ce` +`;var mD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let j8=class extends He{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?le``:this.walletsTemplate()}async onSearch(){this.query!==this.prevQuery&&(this.prevQuery=this.query,this.loading=!0,await $r.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=$r.state,t=tse(e);return e.length?le` - ${t.map(n=>ce` + ${t.map(n=>le` this.onConnectWallet(n)} @@ -7863,7 +7880,7 @@ Minimum version required to store current data is: `+s+`. > `)} - `:ce` + `:le` No Wallet found - `}onConnectWallet(e){const t=Ln.getConnector(e.id,e.rdns);t?et.push("ConnectingExternal",{connector:t}):et.push("ConnectingWalletConnect",{wallet:e})}};b6.styles=hSe,uP([Oe()],b6.prototype,"loading",void 0),uP([pe()],b6.prototype,"query",void 0),b6=uP([Le("w3m-all-wallets-search")],b6);var NC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let w6=class extends Fe{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(Ur.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.generateTabs();return ce` + `}onConnectWallet(e){const t=Un.getConnector(e.id,e.rdns);t?it.push("ConnectingExternal",{connector:t}):it.push("ConnectingWalletConnect",{wallet:e})}};j8.styles=rLe,mD([De()],j8.prototype,"loading",void 0),mD([me()],j8.prototype,"query",void 0),j8=mD([Fe("w3m-all-wallets-search")],j8);var oI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let z8=class extends He{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(Gr.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.generateTabs();return le` - `}generateTabs(){const e=this.platforms.map(t=>t==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:t==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:t==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:t==="web"?{label:"Webapp",icon:"browser",platform:"web"}:t==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:t})=>t),e}onTabChange(e){var n;const t=this.platformTabs[e];t&&((n=this.onSelectPlatfrom)==null||n.call(this,t))}};NC([pe({type:Array})],w6.prototype,"platforms",void 0),NC([pe()],w6.prototype,"onSelectPlatfrom",void 0),NC([Oe()],w6.prototype,"buffering",void 0),w6=NC([Le("w3m-connecting-header")],w6);var fSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Rte=class extends dc{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var e;try{this.error=!1;const{connectors:t}=Ln.state,n=t.find(s=>{var o,a;return s.type==="ANNOUNCED"&&((o=s.info)==null?void 0:o.rdns)===((a=this.wallet)==null?void 0:a.rdns)}),i=t.find(s=>s.type==="INJECTED");n?await Ur.connectExternal(n):i&&await Ur.connectExternal(i),Zr.close(),yr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((e=this.wallet)==null?void 0:e.name)||"Unknown"}})}catch(t){yr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),this.error=!0}}};Rte=fSe([Le("w3m-connecting-wc-browser")],Rte);var dSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let kte=class extends dc{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout(()=>{var e;(e=this.onConnect)==null||e.call(this)},200))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:t,name:n}=this.wallet,{redirect:i,href:s}=tr.formatNativeUrl(t,this.uri);Ur.setWcLinking({name:n,href:s}),Ur.setRecentWallet(this.wallet),tr.openHref(i,"_blank")}catch{this.error=!0}}};kte=dSe([Le("w3m-connecting-wc-desktop")],kte);var pSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Mte=class extends dc{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:t,name:n}=this.wallet,{redirect:i,href:s}=tr.formatNativeUrl(t,this.uri);Ur.setWcLinking({name:n,href:s}),Ur.setRecentWallet(this.wallet),tr.openHref(i,"_self")}catch{this.error=!0}}onBuffering(){const e=tr.isIos();(document==null?void 0:document.visibilityState)==="visible"&&!this.error&&e&&(Ur.setBuffering(!0),setTimeout(()=>{Ur.setBuffering(!1)},5e3))}};Mte=pSe([Le("w3m-connecting-wc-mobile")],Mte);const gSe=Ze` + `}generateTabs(){const e=this.platforms.map(t=>t==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:t==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:t==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:t==="web"?{label:"Webapp",icon:"browser",platform:"web"}:t==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:t})=>t),e}onTabChange(e){var n;const t=this.platformTabs[e];t&&((n=this.onSelectPlatfrom)==null||n.call(this,t))}};oI([me({type:Array})],z8.prototype,"platforms",void 0),oI([me()],z8.prototype,"onSelectPlatfrom",void 0),oI([De()],z8.prototype,"buffering",void 0),z8=oI([Fe("w3m-connecting-header")],z8);var nLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let nse=class extends Ec{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var e;try{this.error=!1;const{connectors:t}=Un.state,n=t.find(s=>{var a,o;return s.type==="ANNOUNCED"&&((a=s.info)==null?void 0:a.rdns)===((o=this.wallet)==null?void 0:o.rdns)}),i=t.find(s=>s.type==="INJECTED");n?await Gr.connectExternal(n):i&&await Gr.connectExternal(i),Xr.close(),Cr.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((e=this.wallet)==null?void 0:e.name)||"Unknown"}})}catch(t){Cr.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),this.error=!0}}};nse=nLe([Fe("w3m-connecting-wc-browser")],nse);var iLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ise=class extends Ec{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout(()=>{var e;(e=this.onConnect)==null||e.call(this)},200))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:t,name:n}=this.wallet,{redirect:i,href:s}=rr.formatNativeUrl(t,this.uri);Gr.setWcLinking({name:n,href:s}),Gr.setRecentWallet(this.wallet),rr.openHref(i,"_blank")}catch{this.error=!0}}};ise=iLe([Fe("w3m-connecting-wc-desktop")],ise);var sLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let sse=class extends Ec{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:t,name:n}=this.wallet,{redirect:i,href:s}=rr.formatNativeUrl(t,this.uri);Gr.setWcLinking({name:n,href:s}),Gr.setRecentWallet(this.wallet),rr.openHref(i,"_self")}catch{this.error=!0}}onBuffering(){const e=rr.isIos();(document==null?void 0:document.visibilityState)==="visible"&&!this.error&&e&&(Gr.setBuffering(!0),setTimeout(()=>{Gr.setBuffering(!1)},5e3))}};sse=sLe([Fe("w3m-connecting-wc-mobile")],sse);const aLe=Ze` @keyframes fadein { from { opacity: 0; @@ -7905,7 +7922,7 @@ Minimum version required to store current data is: `+s+`. animation-name: fadein; animation-fill-mode: forwards; } -`;var mSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hP=class extends dc{constructor(){var e;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((e=this.wallet)==null?void 0:e.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),ce` +`;var oLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let gD=class extends Ec{constructor(){var e;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((e=this.wallet)==null?void 0:e.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),le` ${this.qrCodeTemplate()} @@ -7916,14 +7933,14 @@ Minimum version required to store current data is: `+s+`. - `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return Ur.setWcLinking(void 0),Ur.setRecentWallet(this.wallet),ce` {this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return Gr.setWcLinking(void 0),Gr.setRecentWallet(this.wallet),le` `}copyTemplate(){const e=!this.uri||!this.ready;return ce``}copyTemplate(){const e=!this.uri||!this.ready;return le` Copy link - `}};hP.styles=gSe,hP=mSe([Le("w3m-connecting-wc-qrcode")],hP);var bSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Nte=class extends Fe{constructor(){var e;if(super(),this.wallet=(e=et.state.data)==null?void 0:e.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return ce` + `}};gD.styles=aLe,gD=oLe([Fe("w3m-connecting-wc-qrcode")],gD);var cLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ase=class extends He{constructor(){var e;if(super(),this.wallet=(e=it.state.data)==null?void 0:e.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return le` Not Detected - `}};Nte=bSe([Le("w3m-connecting-wc-unsupported")],Nte);var wSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Pte=class extends dc{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",yr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:t,name:n}=this.wallet,{redirect:i,href:s}=tr.formatUniversalUrl(t,this.uri);Ur.setWcLinking({name:n,href:s}),Ur.setRecentWallet(this.wallet),tr.openHref(i,"_blank")}catch{this.error=!0}}};Pte=wSe([Le("w3m-connecting-wc-web")],Pte);const vSe=Ze` + `}};ase=cLe([Fe("w3m-connecting-wc-unsupported")],ase);var lLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let ose=class extends Ec{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",Cr.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:t,name:n}=this.wallet,{redirect:i,href:s}=rr.formatUniversalUrl(t,this.uri);Gr.setWcLinking({name:n,href:s}),Gr.setRecentWallet(this.wallet),rr.openHref(i,"_blank")}catch{this.error=!0}}};ose=lLe([Fe("w3m-connecting-wc-web")],ose);const uLe=Ze` :host { width: 100%; } @@ -7996,7 +8013,7 @@ Minimum version required to store current data is: `+s+`. border-radius: var(--wui-border-radius-4xs); padding: 4.5px 6px; } -`;var cf=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Wl=class extends Fe{constructor(){super(...arguments),this.detailsOpen=!1,this.slippageRate=1}render(){return ce` +`;var Td=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let iu=class extends He{constructor(){super(...arguments),this.detailsOpen=!1,this.slippageRate=1}render(){return le` - ${this.detailsOpen?ce` + ${this.detailsOpen?le` Network cost - $${Tr.formatNumberToLocalString(this.gasPriceInUSD,3)} + $${Mr.formatNumberToLocalString(this.gasPriceInUSD,3)} - ${this.priceImpact?ce` + ${this.priceImpact?le` Price impact - ${Tr.formatNumberToLocalString(this.priceImpact,3)}% + ${Mr.formatNumberToLocalString(this.priceImpact,3)}% `:null} - ${this.maxSlippage&&this.sourceTokenSymbol?ce` + ${this.maxSlippage&&this.sourceTokenSymbol?le` Max. slippage - ${Tr.formatNumberToLocalString(this.maxSlippage,6)} + ${Mr.formatNumberToLocalString(this.maxSlippage,6)} ${this.sourceTokenSymbol} ${this.slippageRate}% @@ -8073,7 +8090,7 @@ Minimum version required to store current data is: `+s+`. `:null} - `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};Wl.styles=[vSe],cf([pe()],Wl.prototype,"detailsOpen",void 0),cf([pe()],Wl.prototype,"sourceTokenSymbol",void 0),cf([pe()],Wl.prototype,"sourceTokenPrice",void 0),cf([pe()],Wl.prototype,"toTokenSymbol",void 0),cf([pe()],Wl.prototype,"toTokenConvertedAmount",void 0),cf([pe()],Wl.prototype,"gasPriceInUSD",void 0),cf([pe()],Wl.prototype,"priceImpact",void 0),cf([pe()],Wl.prototype,"slippageRate",void 0),cf([pe()],Wl.prototype,"maxSlippage",void 0),Wl=cf([Le("w3m-convert-details")],Wl);const ySe=Ze` + `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};iu.styles=[uLe],Td([me()],iu.prototype,"detailsOpen",void 0),Td([me()],iu.prototype,"sourceTokenSymbol",void 0),Td([me()],iu.prototype,"sourceTokenPrice",void 0),Td([me()],iu.prototype,"toTokenSymbol",void 0),Td([me()],iu.prototype,"toTokenConvertedAmount",void 0),Td([me()],iu.prototype,"gasPriceInUSD",void 0),Td([me()],iu.prototype,"priceImpact",void 0),Td([me()],iu.prototype,"slippageRate",void 0),Td([me()],iu.prototype,"maxSlippage",void 0),iu=Td([Fe("w3m-convert-details")],iu);const fLe=Ze` :host > wui-flex { display: flex; flex-direction: row; @@ -8201,9 +8218,9 @@ Minimum version required to store current data is: `+s+`. .market-value { min-height: 18px; } -`;var Zu=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const xSe=5e-5;let zc=class extends Fe{constructor(){super(...arguments),this.focused=!1,this.price=0,this.marketValue="$1.0345,00",this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",t=Lo.bigNumber(e).isGreaterThan(0);return ce` +`;var gf=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const dLe=5e-5;let nl=class extends He{constructor(){super(...arguments),this.focused=!1,this.price=0,this.marketValue="$1.0345,00",this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",t=Ga.bigNumber(e).isGreaterThan(0);return le` - ${this.target==="sourceToken"?yee:vee} + ${this.target==="sourceToken"?Gne:Vne} ${this.templateTokenSelectButton()} - `}handleKeydown(e){const t=["Backspace","Meta","Ctrl","a","c","v","ArrowLeft","ArrowRight","Tab"],n=e.key===",",i=e.key===".",s=e.key>="0"&&e.key<="9",o=this.value;!s&&!t.includes(e.key)&&!i&&!n&&e.preventDefault(),(n||i)&&(o!=null&&o.includes(".")||o!=null&&o.includes(","))&&e.preventDefault()}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const t=e.target.value;t===","||t==="."?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){var e;(e=this.onSetMaxValue)==null||e.call(this,this.target,this.balance)}templateTokenSelectButton(){if(!this.token)return ce` ="0"&&e.key<="9",a=this.value;!s&&!t.includes(e.key)&&!i&&!n&&e.preventDefault(),(n||i)&&(a!=null&&a.includes(".")||a!=null&&a.includes(","))&&e.preventDefault()}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const t=e.target.value;t===","||t==="."?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){var e;(e=this.onSetMaxValue)==null||e.call(this,this.target,this.balance)}templateTokenSelectButton(){if(!this.token)return le` Select token - `;const e=this.token.logoUri?ce``:ce` + `;const e=this.token.logoUri?le``:le` - `;return ce` + `;return le` ${this.tokenBalanceTemplate()} - `}tokenBalanceTemplate(){const e=Lo.multiply(this.balance,this.price),t=e?e==null?void 0:e.isGreaterThan(xSe):!1;return ce` - ${t?ce` - ${Tr.formatNumberToLocalString(this.balance,3)} + `}tokenBalanceTemplate(){const e=Ga.multiply(this.balance,this.price),t=e?e==null?void 0:e.isGreaterThan(dLe):!1;return le` + ${t?le` + ${Mr.formatNumberToLocalString(this.balance,3)} `:null} ${this.target==="sourceToken"?this.tokenActionButtonTemplate(t):null} - `}tokenActionButtonTemplate(e){return e?ce` `:ce` `:le` `}onFocusChange(e){this.focused=e}onSelectToken(){yr.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),et.push("ConvertSelectToken",{target:this.target})}onBuyToken(){et.push("OnRampProviders")}};zc.styles=[ySe],Zu([pe()],zc.prototype,"focused",void 0),Zu([pe()],zc.prototype,"balance",void 0),Zu([pe()],zc.prototype,"value",void 0),Zu([pe()],zc.prototype,"price",void 0),Zu([pe()],zc.prototype,"marketValue",void 0),Zu([pe()],zc.prototype,"disabled",void 0),Zu([pe()],zc.prototype,"target",void 0),Zu([pe()],zc.prototype,"token",void 0),Zu([pe()],zc.prototype,"onSetAmount",void 0),Zu([pe()],zc.prototype,"onSetMaxValue",void 0),zc=Zu([Le("w3m-convert-input")],zc);const _Se=Ze` + `}onFocusChange(e){this.focused=e}onSelectToken(){Cr.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),it.push("ConvertSelectToken",{target:this.target})}onBuyToken(){it.push("OnRampProviders")}};nl.styles=[fLe],gf([me()],nl.prototype,"focused",void 0),gf([me()],nl.prototype,"balance",void 0),gf([me()],nl.prototype,"value",void 0),gf([me()],nl.prototype,"price",void 0),gf([me()],nl.prototype,"marketValue",void 0),gf([me()],nl.prototype,"disabled",void 0),gf([me()],nl.prototype,"target",void 0),gf([me()],nl.prototype,"token",void 0),gf([me()],nl.prototype,"onSetAmount",void 0),gf([me()],nl.prototype,"onSetMaxValue",void 0),nl=gf([Fe("w3m-convert-input")],nl);const hLe=Ze` wui-icon-link[data-hidden='true'] { opacity: 0 !important; pointer-events: none; } -`;var PC=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};function Ote(){var o,a,l,u,h,p,g;const r=(a=(o=et.state.data)==null?void 0:o.connector)==null?void 0:a.name,e=(u=(l=et.state.data)==null?void 0:l.wallet)==null?void 0:u.name,t=(p=(h=et.state.data)==null?void 0:h.network)==null?void 0:p.name,n=e??r,i=Ln.getConnectors();return{Connect:`Connect ${i.length===1&&((g=i[0])==null?void 0:g.id)==="w3m-email"?"Email":""} Wallet`,Account:void 0,AccountSettings:void 0,ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:t??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",UnsupportedChain:"Switch Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",WhatIsABuy:"What is Buy?",BuyInProgress:"Buy",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token"}}let Yv=class extends Fe{constructor(){super(),this.unsubscribe=[],this.heading=Ote()[et.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(et.subscribeKey("view",e=>{this.onViewChange(e),this.onHistoryChange()}),Ur.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` +`;var cI=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};function cse(){var a,o,l,u,f,h,m;const r=(o=(a=it.state.data)==null?void 0:a.connector)==null?void 0:o.name,e=(u=(l=it.state.data)==null?void 0:l.wallet)==null?void 0:u.name,t=(h=(f=it.state.data)==null?void 0:f.network)==null?void 0:h.name,n=e??r,i=Un.getConnectors();return{Connect:`Connect ${i.length===1&&((m=i[0])==null?void 0:m.id)==="w3m-email"?"Email":""} Wallet`,Account:void 0,AccountSettings:void 0,ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:t??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",UnsupportedChain:"Switch Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",WhatIsABuy:"What is Buy?",BuyInProgress:"Buy",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token"}}let Y3=class extends He{constructor(){super(),this.unsubscribe=[],this.heading=cse()[it.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(it.subscribeKey("view",e=>{this.onViewChange(e),this.onHistoryChange()}),Gr.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.dynamicButtonTemplate()} ${this.titleTemplate()} ${this.separatorTemplate()} - `}onWalletHelp(){yr.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),et.push("WhatIsAWallet")}async onClose(){if(hr.state.isSiweEnabled){const{SIWEController:e}=await Promise.resolve().then(()=>MT);e.state.status!=="success"&&await Ur.disconnect()}Zr.close()}titleTemplate(){return ce`${this.heading}`}dynamicButtonTemplate(){const{view:e}=et.state,t=e==="Connect",s=e==="ApproveTransaction"||e==="UpgradeToSmartAccount";return this.showBack&&!s?ce`bR);e.state.status!=="success"&&await Gr.disconnect()}Xr.close()}titleTemplate(){return le`${this.heading}`}dynamicButtonTemplate(){const{view:e}=it.state,t=e==="Connect",s=e==="ApproveTransaction"||e==="UpgradeToSmartAccount";return this.showBack&&!s?le``:ce``:le``}separatorTemplate(){return this.heading?ce``:null}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("wui-text");if(t){const i=Ote()[e];await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=i,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){var n;const{history:e}=et.state,t=(n=this.shadowRoot)==null?void 0:n.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){et.state.view==="ConnectingSiwe"?et.push("Connect"):et.goBack()}};Yv.styles=[_Se],PC([Oe()],Yv.prototype,"heading",void 0),PC([Oe()],Yv.prototype,"buffering",void 0),PC([Oe()],Yv.prototype,"showBack",void 0),Yv=PC([Le("w3m-header")],Yv);var Dte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let fP=class extends Fe{constructor(){super(...arguments),this.data=[]}render(){return ce` + >`}separatorTemplate(){return this.heading?le``:null}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("wui-text");if(t){const i=cse()[e];await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=i,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){var n;const{history:e}=it.state,t=(n=this.shadowRoot)==null?void 0:n.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){it.state.view==="ConnectingSiwe"?it.push("Connect"):it.goBack()}};Y3.styles=[hLe],cI([De()],Y3.prototype,"heading",void 0),cI([De()],Y3.prototype,"buffering",void 0),cI([De()],Y3.prototype,"showBack",void 0),Y3=cI([Fe("w3m-header")],Y3);var lse=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let bD=class extends He{constructor(){super(...arguments),this.data=[]}render(){return le` - ${this.data.map(e=>ce` + ${this.data.map(e=>le` - ${e.images.map(t=>ce``)} + ${e.images.map(t=>le``)} @@ -8310,7 +8327,7 @@ Minimum version required to store current data is: `+s+`. `)} - `}};Dte([pe({type:Array})],fP.prototype,"data",void 0),fP=Dte([Le("w3m-help-widget")],fP);const ESe=Ze` + `}};lse([me({type:Array})],bD.prototype,"data",void 0),bD=lse([Fe("w3m-help-widget")],bD);const pLe=Ze` :host { width: 100%; } @@ -8342,18 +8359,18 @@ Minimum version required to store current data is: `+s+`. width: 24px; border-radius: 50%; } -`;var _m=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Fd=class extends Fe{constructor(){var e;super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=(e=this.currencies)==null?void 0:e[0],this.currencyImages=po.state.currencyImages,this.tokenImages=po.state.tokenImages,this.unsubscribe.push(zn.subscribeKey("purchaseCurrency",t=>{!t||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(t))}),zn.subscribeKey("paymentCurrency",t=>{!t||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(t))}),zn.subscribe(t=>{this.type==="Fiat"?this.currencies=t.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=t.paymentCurrencies.map(this.formatPaymentCurrency)}),po.subscribe(t=>{this.currencyImages={...t.currencyImages},this.tokenImages={...t.tokenImages}}))}firstUpdated(){zn.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var n;const e=((n=this.selectedCurrency)==null?void 0:n.symbol)||"",t=this.currencyImages[e]||this.tokenImages[e];return ce` - ${this.selectedCurrency?ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let g0=class extends He{constructor(){var e;super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=(e=this.currencies)==null?void 0:e[0],this.currencyImages=xa.state.currencyImages,this.tokenImages=xa.state.tokenImages,this.unsubscribe.push(Hn.subscribeKey("purchaseCurrency",t=>{!t||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(t))}),Hn.subscribeKey("paymentCurrency",t=>{!t||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(t))}),Hn.subscribe(t=>{this.type==="Fiat"?this.currencies=t.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=t.paymentCurrencies.map(this.formatPaymentCurrency)}),xa.subscribe(t=>{this.currencyImages={...t.currencyImages},this.tokenImages={...t.tokenImages}}))}firstUpdated(){Hn.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var n;const e=((n=this.selectedCurrency)==null?void 0:n.symbol)||"",t=this.currencyImages[e]||this.tokenImages[e];return le` + ${this.selectedCurrency?le` Zr.open({view:`OnRamp${this.type}Select`})} + @click=${()=>Xr.open({view:`OnRamp${this.type}Select`})} > - + ${this.selectedCurrency.symbol} - `:ce``} - `}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};Fd.styles=ESe,_m([pe({type:String})],Fd.prototype,"type",void 0),_m([pe({type:Number})],Fd.prototype,"value",void 0),_m([Oe()],Fd.prototype,"currencies",void 0),_m([Oe()],Fd.prototype,"selectedCurrency",void 0),_m([Oe()],Fd.prototype,"currencyImages",void 0),_m([Oe()],Fd.prototype,"tokenImages",void 0),Fd=_m([Le("w3m-swap-input")],Fd);const ASe=Ze` + `:le``} + `}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};g0.styles=pLe,db([me({type:String})],g0.prototype,"type",void 0),db([me({type:Number})],g0.prototype,"value",void 0),db([De()],g0.prototype,"currencies",void 0),db([De()],g0.prototype,"selectedCurrency",void 0),db([De()],g0.prototype,"currencyImages",void 0),db([De()],g0.prototype,"tokenImages",void 0),g0=db([Fe("w3m-swap-input")],g0);const mLe=Ze` wui-flex { background-color: var(--wui-gray-glass-005); } @@ -8363,43 +8380,43 @@ Minimum version required to store current data is: `+s+`. color: var(--wui-color-fg-175); font-weight: 500; } -`;var CSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let dP=class extends Fe{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=hr.state;return!e&&!t?null:ce` +`;var gLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let vD=class extends He{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=pr.state;return!e&&!t?null:le` By connecting your wallet, you agree to our
      ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
      - `}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=hr.state;return e&&t?"and":""}termsTemplate(){const{termsConditionsUrl:e}=hr.state;return e?ce`Terms of Service`:null}privacyTemplate(){const{privacyPolicyUrl:e}=hr.state;return e?ce`Privacy Policy`:null}};dP.styles=[ASe],dP=CSe([Le("w3m-legal-footer")],dP);const SSe=Ze` + `}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=pr.state;return e&&t?"and":""}termsTemplate(){const{termsConditionsUrl:e}=pr.state;return e?le`Terms of Service`:null}privacyTemplate(){const{privacyPolicyUrl:e}=pr.state;return e?le`Privacy Policy`:null}};vD.styles=[mLe],vD=gLe([Fe("w3m-legal-footer")],vD);const bLe=Ze` :host { display: block; padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); } -`;var $te=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let OC=class extends Fe{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:n,chrome_store:i,homepage:s}=this.wallet,o=tr.isMobile(),a=tr.isIos(),l=tr.isAndroid(),u=[t,n,s,i].filter(Boolean).length>1,h=Tr.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!o?ce` +`;var use=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let lI=class extends He{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:n,chrome_store:i,homepage:s}=this.wallet,a=rr.isMobile(),o=rr.isIos(),l=rr.isAndroid(),u=[t,n,s,i].filter(Boolean).length>1,f=Mr.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!a?le` et.push("Downloads",{wallet:this.wallet})} + @click=${()=>it.push("Downloads",{wallet:this.wallet})} > - `:!u&&s?ce` + `:!u&&s?le` - `:t&&a?ce` + `:t&&o?le` - `:n&&l?ce` + `:n&&l?le` - `:(this.style.display="none",null)}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&tr.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&tr.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&tr.openHref(this.wallet.homepage,"_blank")}};OC.styles=[SSe],$te([pe({type:Object})],OC.prototype,"wallet",void 0),OC=$te([Le("w3m-mobile-download-links")],OC);const ISe=Ze` + `:(this.style.display="none",null)}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&rr.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&rr.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&rr.openHref(this.wallet.homepage,"_blank")}};lI.styles=[bLe],use([me({type:Object})],lI.prototype,"wallet",void 0),lI=use([Fe("w3m-mobile-download-links")],lI);const vLe=Ze` wui-flex { border-top: 1px solid var(--wui-gray-glass-005); } @@ -8413,7 +8430,7 @@ Minimum version required to store current data is: `+s+`. justify-content: center; gap: var(--wui-spacing-3xs); } -`;var TSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let pP=class extends Fe{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=hr.state;return!e&&!t?null:ce` +`;var wLe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let wD=class extends He{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=pr.state;return!e&&!t?null:le` - `}howDoesItWorkTemplate(){return ce` + `}howDoesItWorkTemplate(){return le` How does it work? - `}onWhatIsBuy(){et.push("WhatIsABuy")}};pP.styles=[ISe],pP=TSe([Le("w3m-onramp-providers-footer")],pP);const RSe=Ze` + `}onWhatIsBuy(){it.push("WhatIsABuy")}};wD.styles=[vLe],wD=wLe([Fe("w3m-onramp-providers-footer")],wD);const yLe=Ze` :host { display: block; position: absolute; @@ -8441,14 +8458,14 @@ Minimum version required to store current data is: `+s+`. left: 50%; width: max-content; } -`;var Bte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const kSe={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let DC=class extends Fe{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=dn.state.open,this.unsubscribe.push(dn.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=dn.state,n=kSe[t];return ce` +`;var fse=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const xLe={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let uI=class extends He{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=bn.state.open,this.unsubscribe.push(bn.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=bn.state,n=xLe[t];return le` - `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout(()=>dn.hide(),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};DC.styles=RSe,Bte([Oe()],DC.prototype,"open",void 0),DC=Bte([Le("w3m-snackbar")],DC);const MSe=Ze` + `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout(()=>bn.hide(),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};uI.styles=yLe,fse([De()],uI.prototype,"open",void 0),uI=fse([Fe("w3m-snackbar")],uI);const _Le=Ze` wui-separator { margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); width: calc(100% + var(--wui-spacing-s) * 2); @@ -8478,8 +8495,8 @@ Minimum version required to store current data is: `+s+`. wui-loading-spinner { right: var(--wui-spacing-m); } -`;var v6=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Em=class extends Fe{constructor(){super(),this.unsubscribe=[],this.formRef=tm(),this.connectors=Ln.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Ln.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=this.connectors.length>1;return this.connectors.find(n=>n.type==="EMAIL")?ce` - +`;var H8=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let hb=class extends He{constructor(){super(),this.unsubscribe=[],this.formRef=Wg(),this.connectors=Un.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Un.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=this.connectors.length>1;return this.connectors.find(n=>n.type==="EMAIL")?le` +
      ${this.explorerBtnTemplate()} @@ -8643,7 +8660,7 @@ Minimum version required to store current data is: `+s+`. .variant=${e?"image":"icon"} iconVariant="overlay" icon="networkPlaceholder" - imageSrc=${gr(e)} + imageSrc=${br(e)} ?chevron=${this.isAllowedNetworkSwitch()} @click=${this.onNetworks.bind(this)} data-testid="w3m-account-select-network" @@ -8673,7 +8690,7 @@ Minimum version required to store current data is: `+s+`. > Disconnect -
      `}onrampTemplate(){const{enableOnramp:e}=hr.state;return e?ce` +
      `}onrampTemplate(){const{enableOnramp:e}=pr.state;return e?le` Buy crypto - `:null}emailCardTemplate(){const e=xs.getConnectedConnector(),t=Ln.getEmailConnector(),{origin:n}=location;return!t||e!=="EMAIL"||n.includes(Ls.SECURE_SITE)?null:ce` + `:null}emailCardTemplate(){const e=Ts.getConnectedConnector(),t=Un.getEmailConnector(),{origin:n}=location;return!t||e!=="EMAIL"||n.includes(Hs.SECURE_SITE)?null:le` - `}handleClickPay(){et.push("OnRampProviders")}explorerBtnTemplate(){const{addressExplorerUrl:e}=zt.state;return e?ce` + `}handleClickPay(){it.push("OnRampProviders")}explorerBtnTemplate(){const{addressExplorerUrl:e}=zt.state;return e?le` Block Explorer - `:null}emailBtnTemplate(){const e=xs.getConnectedConnector(),t=Ln.getEmailConnector();if(!t||e!=="EMAIL")return null;const n=t.provider.getEmail()??"";return ce` + `:null}emailBtnTemplate(){const e=Ts.getConnectedConnector(),t=Un.getEmailConnector();if(!t||e!=="EMAIL")return null;const n=t.provider.getEmail()??"";return le` ${n} - `}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=lr.state,t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}onCopyAddress(){try{this.address&&(tr.copyToClopboard(this.address),dn.showSuccess("Address copied"))}catch{dn.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(yr.sendEvent({type:"track",event:"CLICK_NETWORKS"}),et.push("Networks"))}onTransactions(){yr.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),et.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await Ur.disconnect(),yr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Zr.close()}catch{yr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),dn.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const{addressExplorerUrl:e}=zt.state;e&&tr.openHref(e,"_blank")}onGoToUpgradeView(){yr.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),et.push("UpgradeEmailWallet")}onGoToUpdateEmail(e){et.push("UpdateEmailWallet",{email:e})}};lf.styles=NSe,o1([Oe()],lf.prototype,"address",void 0),o1([Oe()],lf.prototype,"profileImage",void 0),o1([Oe()],lf.prototype,"profileName",void 0),o1([Oe()],lf.prototype,"network",void 0),o1([Oe()],lf.prototype,"disconnecting",void 0),o1([Oe()],lf.prototype,"balance",void 0),o1([Oe()],lf.prototype,"balanceSymbol",void 0),lf=o1([Le("w3m-account-default-widget")],lf);const PSe=Ze` + `}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=dr.state,t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}onCopyAddress(){try{this.address&&(rr.copyToClopboard(this.address),bn.showSuccess("Address copied"))}catch{bn.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(Cr.sendEvent({type:"track",event:"CLICK_NETWORKS"}),it.push("Networks"))}onTransactions(){Cr.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),it.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await Gr.disconnect(),Cr.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Xr.close()}catch{Cr.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),bn.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const{addressExplorerUrl:e}=zt.state;e&&rr.openHref(e,"_blank")}onGoToUpgradeView(){Cr.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),it.push("UpgradeEmailWallet")}onGoToUpdateEmail(e){it.push("UpdateEmailWallet",{email:e})}};kd.styles=ELe,z1([De()],kd.prototype,"address",void 0),z1([De()],kd.prototype,"profileImage",void 0),z1([De()],kd.prototype,"profileName",void 0),z1([De()],kd.prototype,"network",void 0),z1([De()],kd.prototype,"disconnecting",void 0),z1([De()],kd.prototype,"balance",void 0),z1([De()],kd.prototype,"balanceSymbol",void 0),kd=z1([Fe("w3m-account-default-widget")],kd);const CLe=Ze` wui-flex { width: 100%; } @@ -8747,7 +8764,7 @@ Minimum version required to store current data is: `+s+`. .contentContainer > .textContent { width: 65%; } -`,OSe={ACCOUNT_TABS:[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}]};var uf=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let Vl=class extends Fe{constructor(){super(),this.unsubscribe=[],this.address=zt.state.address,this.profileImage=zt.state.profileImage,this.profileName=zt.state.profileName,this.smartAccountDeployed=zt.state.smartAccountDeployed,this.network=lr.state.caipNetwork,this.currentTab=zt.state.currentTab,this.tokenBalance=zt.state.tokenBalance,this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):Zr.close()}),lr.subscribe(e=>{this.network=e.caipNetwork})),this.watchConvertValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}firstUpdated(){zt.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=Yn.getNetworkImage(this.network);return ce`=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let su=class extends He{constructor(){super(),this.unsubscribe=[],this.address=zt.state.address,this.profileImage=zt.state.profileImage,this.profileName=zt.state.profileName,this.smartAccountDeployed=zt.state.smartAccountDeployed,this.network=dr.state.caipNetwork,this.currentTab=zt.state.currentTab,this.tokenBalance=zt.state.tokenBalance,this.preferredAccountType=zt.state.preferredAccountType,this.unsubscribe.push(zt.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):Xr.close()}),dr.subscribe(e=>{this.network=e.caipNetwork})),this.watchConvertValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}firstUpdated(){zt.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=Qn.getNetworkImage(this.network);return le` ${this.tokenBalanceTemplate()} @@ -8790,21 +8807,21 @@ Minimum version required to store current data is: `+s+`. .onTabChange=${this.onTabChange.bind(this)} .activeTab=${this.currentTab} localTabWidth="104px" - .tabs=${OSe.ACCOUNT_TABS} + .tabs=${ALe.ACCOUNT_TABS} > ${this.listContentTemplate()} - `}watchConvertValues(){this.watchTokenBalance=setInterval(()=>zt.fetchTokenBalance(),1e4)}listContentTemplate(){return this.currentTab===0?ce``:this.currentTab===1?ce``:this.currentTab===2?ce``:ce``}tokenBalanceTemplate(){var e;if(this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>=0){const t=tr.calculateBalance(this.tokenBalance),{dollars:n="0",pennies:i="00"}=tr.formatTokenBalance(t);return ce``}return ce``}activateAccountTemplate(){return!lr.checkIfSmartAccountEnabled()||this.preferredAccountType!==Oa.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:ce` `}watchConvertValues(){this.watchTokenBalance=setInterval(()=>zt.fetchTokenBalance(),1e4)}listContentTemplate(){return this.currentTab===0?le``:this.currentTab===1?le``:this.currentTab===2?le``:le``}tokenBalanceTemplate(){var e;if(this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>=0){const t=rr.calculateBalance(this.tokenBalance),{dollars:n="0",pennies:i="00"}=rr.formatTokenBalance(t);return le``}return le``}activateAccountTemplate(){return!dr.checkIfSmartAccountEnabled()||this.preferredAccountType!==Ho.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:le` `}onTabChange(e){zt.setCurrentTab(e)}onProfileButtonClick(){et.push("AccountSettings")}onBuyClick(){et.push("OnRampProviders")}onConvertClick(){et.push("Convert")}onReceiveClick(){et.push("WalletReceive")}onSendClick(){et.push("WalletSend")}onUpdateToSmartAccount(){et.push("UpgradeToSmartAccount")}};Vl.styles=PSe,uf([Oe()],Vl.prototype,"watchTokenBalance",void 0),uf([Oe()],Vl.prototype,"address",void 0),uf([Oe()],Vl.prototype,"profileImage",void 0),uf([Oe()],Vl.prototype,"profileName",void 0),uf([Oe()],Vl.prototype,"smartAccountDeployed",void 0),uf([Oe()],Vl.prototype,"network",void 0),uf([Oe()],Vl.prototype,"currentTab",void 0),uf([Oe()],Vl.prototype,"tokenBalance",void 0),uf([Oe()],Vl.prototype,"preferredAccountType",void 0),Vl=uf([Le("w3m-account-wallet-features-widget")],Vl);const DSe=Ze` + >`}onTabChange(e){zt.setCurrentTab(e)}onProfileButtonClick(){it.push("AccountSettings")}onBuyClick(){it.push("OnRampProviders")}onConvertClick(){it.push("Convert")}onReceiveClick(){it.push("WalletReceive")}onSendClick(){it.push("WalletSend")}onUpdateToSmartAccount(){it.push("UpgradeToSmartAccount")}};su.styles=CLe,Rd([De()],su.prototype,"watchTokenBalance",void 0),Rd([De()],su.prototype,"address",void 0),Rd([De()],su.prototype,"profileImage",void 0),Rd([De()],su.prototype,"profileName",void 0),Rd([De()],su.prototype,"smartAccountDeployed",void 0),Rd([De()],su.prototype,"network",void 0),Rd([De()],su.prototype,"currentTab",void 0),Rd([De()],su.prototype,"tokenBalance",void 0),Rd([De()],su.prototype,"preferredAccountType",void 0),su=Rd([Fe("w3m-account-wallet-features-widget")],su);const SLe=Ze` :host { width: 100%; max-height: 280px; overflow: scroll; scrollbar-width: none; } -`;var $Se=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let gP=class extends Fe{render(){return ce``}};gP.styles=DSe,gP=$Se([Le("w3m-account-activity-widget")],gP);const BSe=Ze` +`;var ILe=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let yD=class extends He{render(){return le``}};yD.styles=SLe,yD=ILe([Fe("w3m-account-activity-widget")],yD);const TLe=Ze` .contentContainer { height: 280px; } @@ -8818,7 +8835,7 @@ Minimum version required to store current data is: `+s+`. .contentContainer > .textContent { width: 65%; } -`;var LSe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let mP=class extends Fe{render(){return ce`${this.nftTemplate()}`}nftTemplate(){return ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let xD=class extends He{render(){return le`${this.nftTemplate()}`}nftTemplate(){return le` Receive NFTs - `}onReceiveClick(){et.push("WalletReceive")}};mP.styles=BSe,mP=LSe([Le("w3m-account-nfts-widget")],mP);const USe=Ze` + `}onReceiveClick(){it.push("WalletReceive")}};xD.styles=TLe,xD=kLe([Fe("w3m-account-nfts-widget")],xD);const RLe=Ze` :host { width: 100%; } @@ -8859,9 +8876,9 @@ Minimum version required to store current data is: `+s+`. overflow: scroll; scrollbar-width: none; } -`;var Lte=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let $C=class extends Fe{constructor(){super(),this.unsubscribe=[],this.tokenBalance=zt.state.tokenBalance,this.unsubscribe.push(zt.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce`${this.tokenTemplate()}`}tokenTemplate(){var e;return this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>0?ce` +`;var dse=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let fI=class extends He{constructor(){super(),this.unsubscribe=[],this.tokenBalance=zt.state.tokenBalance,this.unsubscribe.push(zt.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le`${this.tokenTemplate()}`}tokenTemplate(){var e;return this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>0?le` ${this.tokenItemTemplate()} - `:ce` `:le` `}tokenItemTemplate(){var e;return(e=this.tokenBalance)==null?void 0:e.map(t=>ce``}tokenItemTemplate(){var e;return(e=this.tokenBalance)==null?void 0:e.map(t=>le``)}onReceiveClick(){et.push("WalletReceive")}onBuyClick(){et.push("OnRampProviders")}};$C.styles=USe,Lte([Oe()],$C.prototype,"tokenBalance",void 0),$C=Lte([Le("w3m-account-tokens-widget")],$C);const FSe=Ze` + >`)}onReceiveClick(){it.push("WalletReceive")}onBuyClick(){it.push("OnRampProviders")}};fI.styles=RLe,dse([De()],fI.prototype,"tokenBalance",void 0),fI=dse([Fe("w3m-account-tokens-widget")],fI);const MLe=Ze` :host { min-height: 100%; } @@ -8907,9 +8924,9 @@ Minimum version required to store current data is: `+s+`. .emptyContainer { height: 100%; } -`;var Am=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const BC="last-transaction",jSe=7;let jd=class extends Fe{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=zt.state.address,this.transactionsByYear=la.state.transactionsByYear,this.loading=la.state.loading,this.empty=la.state.empty,this.next=la.state.next,la.clearCursor(),this.unsubscribe.push(zt.subscribe(e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,la.resetTransactions(),la.fetchTransactions(e.address))}),la.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){la.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ce` ${this.empty?null:this.templateTransactionsByYear()} +`;var pb=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};const dI="last-transaction",PLe=7;let b0=class extends He{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=zt.state.address,this.transactionsByYear=yo.state.transactionsByYear,this.loading=yo.state.loading,this.empty=yo.state.empty,this.next=yo.state.next,yo.clearCursor(),this.unsubscribe.push(zt.subscribe(e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,yo.resetTransactions(),yo.fetchTransactions(e.address))}),yo.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){yo.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return le` ${this.empty?null:this.templateTransactionsByYear()} ${this.loading?this.templateLoading():null} - ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){const e=Object.keys(this.transactionsByYear).sort().reverse();return e.map((t,n)=>{const i=n===e.length-1,s=parseInt(t,10);return new Array(12).fill(null).map((a,l)=>l).reverse().map(a=>{var h;const l=t1.getTransactionGroupTitle(s,a),u=(h=this.transactionsByYear[s])==null?void 0:h[a];return u?ce` + ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){const e=Object.keys(this.transactionsByYear).sort().reverse();return e.map((t,n)=>{const i=n===e.length-1,s=parseInt(t,10);return new Array(12).fill(null).map((o,l)=>l).reverse().map(o=>{var f;const l=B1.getTransactionGroupTitle(s,o),u=(f=this.transactionsByYear[s])==null?void 0:f[o];return u?le` - `:null})})}templateRenderTransaction(e,t){const{date:n,descriptions:i,direction:s,isAllNFT:o,images:a,status:l,transfers:u,type:h}=this.getTransactionListItemProps(e),p=(u==null?void 0:u.length)>1;return(u==null?void 0:u.length)===2&&!o?ce` + `:null})})}templateRenderTransaction(e,t){const{date:n,descriptions:i,direction:s,isAllNFT:a,images:o,status:l,transfers:u,type:f}=this.getTransactionListItemProps(e),h=(u==null?void 0:u.length)>1;return(u==null?void 0:u.length)===2&&!a?le` - `:p?u.map((w,y)=>{const C=t1.getTransferDescription(w),T=t&&y===u.length-1;return ce` {const C=B1.getTransferDescription(b),R=t&&v===u.length-1;return le` `}):ce` + >`}):le` - `}templateTransactions(e,t){return e.map((n,i)=>{const s=t&&i===e.length-1;return ce`${this.templateRenderTransaction(n,s)}`})}emptyStateActivity(){return ce`{const s=t&&i===e.length-1;return le`${this.templateRenderTransaction(n,s)}`})}emptyStateActivity(){return le` - `}emptyStateAccount(){return ce``}emptyStateAccount(){return le` Trade - `}templateEmpty(){return this.page==="account"?ce`${this.emptyStateAccount()}`:ce`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?Array(jSe).fill(ce` `).map(e=>e):null}onReceiveClick(){et.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=hr.state;this.paginationObserver=new IntersectionObserver(([t])=>{t!=null&&t.isIntersecting&&!this.loading&&(la.fetchTransactions(this.address),yr.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var t,n,i;(t=this.paginationObserver)==null||t.disconnect();const e=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${BC}`);e&&((i=this.paginationObserver)==null||i.observe(e))}getTransactionListItemProps(e){var l,u,h,p,g;const t=hN.formatDate((l=e==null?void 0:e.metadata)==null?void 0:l.minedAt),n=t1.getTransactionDescriptions(e),i=e==null?void 0:e.transfers,s=(u=e==null?void 0:e.transfers)==null?void 0:u[0],o=Boolean(s)&&((h=e==null?void 0:e.transfers)==null?void 0:h.every(w=>Boolean(w.nft_info))),a=t1.getTransactionImages(i);return{date:t,direction:s==null?void 0:s.direction,descriptions:n,isAllNFT:o,images:a,status:(p=e.metadata)==null?void 0:p.status,transfers:i,type:(g=e.metadata)==null?void 0:g.operationType}}};jd.styles=FSe,Am([pe()],jd.prototype,"page",void 0),Am([Oe()],jd.prototype,"address",void 0),Am([Oe()],jd.prototype,"transactionsByYear",void 0),Am([Oe()],jd.prototype,"loading",void 0),Am([Oe()],jd.prototype,"empty",void 0),Am([Oe()],jd.prototype,"next",void 0),jd=Am([Le("w3m-activity-list")],jd);const zSe=Ze` + `}templateEmpty(){return this.page==="account"?le`${this.emptyStateAccount()}`:le`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?Array(PLe).fill(le` `).map(e=>e):null}onReceiveClick(){it.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=pr.state;this.paginationObserver=new IntersectionObserver(([t])=>{t!=null&&t.isIntersecting&&!this.loading&&(yo.fetchTransactions(this.address),Cr.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var t,n,i;(t=this.paginationObserver)==null||t.disconnect();const e=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${dI}`);e&&((i=this.paginationObserver)==null||i.observe(e))}getTransactionListItemProps(e){var l,u,f,h,m;const t=hN.formatDate((l=e==null?void 0:e.metadata)==null?void 0:l.minedAt),n=B1.getTransactionDescriptions(e),i=e==null?void 0:e.transfers,s=(u=e==null?void 0:e.transfers)==null?void 0:u[0],a=!!s&&((f=e==null?void 0:e.transfers)==null?void 0:f.every(b=>!!b.nft_info)),o=B1.getTransactionImages(i);return{date:t,direction:s==null?void 0:s.direction,descriptions:n,isAllNFT:a,images:o,status:(h=e.metadata)==null?void 0:h.status,transfers:i,type:(m=e.metadata)==null?void 0:m.operationType}}};b0.styles=MLe,pb([me()],b0.prototype,"page",void 0),pb([De()],b0.prototype,"address",void 0),pb([De()],b0.prototype,"transactionsByYear",void 0),pb([De()],b0.prototype,"loading",void 0),pb([De()],b0.prototype,"empty",void 0),pb([De()],b0.prototype,"next",void 0),b0=pb([Fe("w3m-activity-list")],b0);const OLe=Ze` :host { width: 100%; height: 100px; @@ -9030,7 +9047,7 @@ Minimum version required to store current data is: `+s+`. display: flex; justify-content: flex-end; } -`;var bP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let y6=class extends Fe{render(){return ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let q8=class extends He{render(){return le` - `}buttonTemplate(){return this.token?ce``}buttonTemplate(){return this.token?le`Select token`:ce``:le`Select token`}handleSelectButtonClick(){et.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return ce`$${t.toFixed(2)}`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?ce` - ${Tr.roundNumber(Number(this.token.quantity.numeric),6,5)} - `:ce` - ${Tr.roundNumber(Number(this.token.quantity.numeric),6,5)} - `:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?ce`Buy`:ce`Max`:null}onInputChange(e){Na.setTokenAmount(e.detail)}onMaxClick(){var e;this.token&&Na.setTokenAmount(Number((e=this.token)==null?void 0:e.quantity.numeric))}onBuyClick(){et.push("OnRampProviders")}};y6.styles=zSe,bP([pe({type:Object})],y6.prototype,"token",void 0),bP([pe({type:Number})],y6.prototype,"sendTokenAmount",void 0),y6=bP([Le("w3m-input-token")],y6);const HSe=Ze` + >`}handleSelectButtonClick(){it.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return le`$${t.toFixed(2)}`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?le` + ${Mr.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:le` + ${Mr.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?le`Buy`:le`Max`:null}onInputChange(e){jo.setTokenAmount(e.detail)}onMaxClick(){var e;this.token&&jo.setTokenAmount(Number((e=this.token)==null?void 0:e.quantity.numeric))}onBuyClick(){it.push("OnRampProviders")}};q8.styles=OLe,_D([me({type:Object})],q8.prototype,"token",void 0),_D([me({type:Number})],q8.prototype,"sendTokenAmount",void 0),q8=_D([Fe("w3m-input-token")],q8);const NLe=Ze` :host { width: 100%; height: 100px; @@ -9117,7 +9134,7 @@ Minimum version required to store current data is: `+s+`. resize: none; overflow: hidden; } -`;var wP=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let x6=class extends Fe{constructor(){super(...arguments),this.inputElementRef=tm(),this.instructionElementRef=tm(),this.instructionHidden=Boolean(this.receiverAddress)}firstUpdated(){this.receiverAddress&&(this.instructionHidden=!0),this.checkHidden()}render(){return ce` =0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let W8=class extends He{constructor(){super(...arguments),this.inputElementRef=Wg(),this.instructionElementRef=Wg(),this.instructionHidden=!!this.receiverAddress}firstUpdated(){this.receiverAddress&&(this.instructionHidden=!0),this.checkHidden()}render(){return le` - `}async focusInput(){var e;this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",(e=this.inputElementRef.value)==null||e.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){var e;this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",(e=this.inputElementRef.value)==null||e.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.receiverAddress&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.receiverAddress&&this.instructionHidden&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){const e=await navigator.clipboard.readText();Na.setReceiverAddress(e)}onInputChange(e){const t=e.target;t.value&&!this.instructionHidden&&this.focusInput(),Na.setReceiverAddress(t.value)}};x6.styles=HSe,wP([pe()],x6.prototype,"receiverAddress",void 0),wP([Oe()],x6.prototype,"instructionHidden",void 0),x6=wP([Le("w3m-input-address")],x6);const qSe=Ze` + `}async focusInput(){var e;this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",(e=this.inputElementRef.value)==null||e.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){var e;this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",(e=this.inputElementRef.value)==null||e.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.receiverAddress&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.receiverAddress&&this.instructionHidden&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){const e=await navigator.clipboard.readText();jo.setReceiverAddress(e)}onInputChange(e){const t=e.target;t.value&&!this.instructionHidden&&this.focusInput(),jo.setReceiverAddress(t.value)}};W8.styles=NLe,ED([me()],W8.prototype,"receiverAddress",void 0),ED([De()],W8.prototype,"instructionHidden",void 0),W8=ED([Fe("w3m-input-address")],W8);const DLe=Ze` :host { display: flex; width: 100%; @@ -9193,34 +9210,34 @@ ${this.receiverAddress??""}=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let _6=class extends Fe{render(){return ce` Details +`;var CD=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let V8=class extends He{render(){return le` Details ${this.networkTemplate()} - `}networkTemplate(){var e;return(e=this.caipNetwork)!=null&&e.name?ce` `}networkTemplate(){var e;return(e=this.caipNetwork)!=null&&e.name?le` this.onNetworkClick(this.caipNetwork)} class="network" textTitle="Network" - imageSrc=${gr(Yn.getNetworkImage(this.caipNetwork))} - >`:null}onNetworkClick(e){e&&et.push("Networks",{network:e})}};_6.styles=qSe,vP([pe()],_6.prototype,"receiverAddress",void 0),vP([pe({type:Object})],_6.prototype,"caipNetwork",void 0),_6=vP([Le("w3m-wallet-send-details")],_6);let Ute=!1;class WSe{constructor(e){this.initPromise=void 0,this.setIsConnected=t=>{zt.setIsConnected(t)},this.getIsConnectedState=()=>zt.state.isConnected,this.setCaipAddress=t=>{zt.setCaipAddress(t)},this.setBalance=(t,n)=>{zt.setBalance(t,n)},this.setProfileName=t=>{zt.setProfileName(t)},this.setProfileImage=t=>{zt.setProfileImage(t)},this.resetAccount=()=>{zt.resetAccount()},this.setCaipNetwork=t=>{lr.setCaipNetwork(t)},this.getCaipNetwork=()=>lr.state.caipNetwork,this.setRequestedCaipNetworks=t=>{lr.setRequestedCaipNetworks(t)},this.getApprovedCaipNetworksData=()=>lr.getApprovedCaipNetworksData(),this.resetNetwork=()=>{lr.resetNetwork()},this.setConnectors=t=>{Ln.setConnectors(t)},this.addConnector=t=>{Ln.addConnector(t)},this.getConnectors=()=>Ln.getConnectors(),this.resetWcConnection=()=>{Ur.resetWcConnection()},this.fetchIdentity=t=>ka.fetchIdentity(t),this.setAddressExplorerUrl=t=>{zt.setAddressExplorerUrl(t)},this.setSmartAccountDeployed=t=>{zt.setSmartAccountDeployed(t)},this.setConnectedWalletInfo=t=>{zt.setConnectedWalletInfo(t)},this.setSmartAccountEnabledNetworks=t=>{lr.setSmartAccountEnabledNetworks(t)},this.setPreferredAccountType=t=>{zt.setPreferredAccountType(t)},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),Zr.open(e)}async close(){await this.initOrContinue(),Zr.close()}setLoading(e){Zr.setLoading(e)}getThemeMode(){return Zs.state.themeMode}getThemeVariables(){return Zs.state.themeVariables}setThemeMode(e){Zs.setThemeMode(e),yN(Zs.state.themeMode)}setThemeVariables(e){Zs.setThemeVariables(e),_ee(Zs.state.themeVariables)}subscribeTheme(e){return Zs.subscribe(e)}getWalletInfo(){return zt.state.connectedWalletInfo}subscribeWalletInfo(e){return zt.subscribeKey("connectedWalletInfo",e)}getState(){return Ug.state}subscribeState(e){return Ug.subscribe(e)}showErrorMessage(e){dn.showError(e)}showSuccessMessage(e){dn.showSuccess(e)}getEvent(){return{...yr.state}}subscribeEvents(e){return yr.subscribe(e)}redirect(e){et.push(e)}popTransactionStack(e){et.popTransactionStack(e)}isOpen(){return Zr.state.open}isTransactionStackEmpty(){return et.state.transactionStack.length===0}async initControllers(e){if(lr.setClient(e.networkControllerClient),lr.setDefaultCaipNetwork(e.defaultChain),hr.setProjectId(e.projectId),hr.setAllWallets(e.allWallets),hr.setIncludeWalletIds(e.includeWalletIds),hr.setExcludeWalletIds(e.excludeWalletIds),hr.setFeaturedWalletIds(e.featuredWalletIds),hr.setTokens(e.tokens),hr.setTermsConditionsUrl(e.termsConditionsUrl),hr.setPrivacyPolicyUrl(e.privacyPolicyUrl),hr.setCustomWallets(e.customWallets),hr.setEnableAnalytics(e.enableAnalytics),hr.setSdkVersion(e._sdkVersion),Ur.setClient(e.connectionControllerClient),e.siweControllerClient){const{SIWEController:t}=await Promise.resolve().then(()=>MT);t.setSIWEClient(e.siweControllerClient)}e.metadata&&hr.setMetadata(e.metadata),e.themeMode&&Zs.setThemeMode(e.themeMode),e.themeVariables&&Zs.setThemeVariables(e.themeVariables),e.enableOnramp&&hr.setOnrampEnabled(Boolean(e.enableOnramp)),e.enableWalletFeatures&&hr.setWalletFeaturesEnabled(Boolean(e.enableWalletFeatures)),e.allowUnsupportedChain&&lr.setAllowUnsupportedChain(e.allowUnsupportedChain)}async initOrContinue(){return!this.initPromise&&!Ute&&tr.isClient()&&(Ute=!0,this.initPromise=new Promise(async e=>{await Promise.all([Promise.resolve().then(()=>lAe),Promise.resolve().then(()=>fAe)]);const t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),e()})),this.initPromise}}var pn={},VSe={get exports(){return pn},set exports(r){pn=r}},Qv=typeof Reflect=="object"?Reflect:null,Fte=Qv&&typeof Qv.apply=="function"?Qv.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},LC;Qv&&typeof Qv.ownKeys=="function"?LC=Qv.ownKeys:Object.getOwnPropertySymbols?LC=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:LC=function(e){return Object.getOwnPropertyNames(e)};function GSe(r){console&&console.warn&&console.warn(r)}var jte=Number.isNaN||function(e){return e!==e};function di(){di.init.call(this)}VSe.exports=di,pn.once=YSe,di.EventEmitter=di,di.prototype._events=void 0,di.prototype._eventsCount=0,di.prototype._maxListeners=void 0;var zte=10;function UC(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(di,"defaultMaxListeners",{enumerable:!0,get:function(){return zte},set:function(r){if(typeof r!="number"||r<0||jte(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");zte=r}}),di.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},di.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||jte(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Hte(r){return r._maxListeners===void 0?di.defaultMaxListeners:r._maxListeners}di.prototype.getMaxListeners=function(){return Hte(this)},di.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[e];if(l===void 0)return!1;if(typeof l=="function")Fte(l,this,t);else for(var u=l.length,h=Kte(l,u),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=r,a.type=e,a.count=o.length,GSe(a)}return r}di.prototype.addListener=function(e,t){return qte(this,e,t,!1)},di.prototype.on=di.prototype.addListener,di.prototype.prependListener=function(e,t){return qte(this,e,t,!0)};function KSe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Wte(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=KSe.bind(n);return i.listener=t,n.wrapFn=i,i}di.prototype.once=function(e,t){return UC(t),this.on(e,Wte(this,e,t)),this},di.prototype.prependOnceListener=function(e,t){return UC(t),this.prependListener(e,Wte(this,e,t)),this},di.prototype.removeListener=function(e,t){var n,i,s,o,a;if(UC(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():ZSe(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this},di.prototype.off=di.prototype.removeListener,di.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function Vte(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?JSe(i):Kte(i,i.length)}di.prototype.listeners=function(e){return Vte(this,e,!0)},di.prototype.rawListeners=function(e){return Vte(this,e,!1)},di.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Gte.call(r,e)},di.prototype.listenerCount=Gte;function Gte(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}di.prototype.eventNames=function(){return this._eventsCount>0?LC(this._events):[]};function Kte(r,e){for(var t=new Array(e),n=0;n>>16&65535,h=a&65535,p=l>>>16&65535,g=l&65535;return h*g+(u*g+h*p<<16>>>0)|0}r.mul=Math.imul||e;function t(a,l){return a+l|0}r.add=t;function n(a,l){return a-l|0}r.sub=n;function i(a,l){return a<>>32-l}r.rotl=i;function s(a,l){return a<<32-l|a>>>l}r.rotr=s;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}r.isInteger=Number.isInteger||o,r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(a){return r.isInteger(a)&&a>=-r.MAX_SAFE_INTEGER&&a<=r.MAX_SAFE_INTEGER}})(Jte),Object.defineProperty(Gr,"__esModule",{value:!0});var Yte=Jte;function XSe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])<<16>>16}Gr.readInt16BE=XSe;function eIe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])>>>0}Gr.readUint16BE=eIe;function tIe(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])<<16>>16}Gr.readInt16LE=tIe;function rIe(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])>>>0}Gr.readUint16LE=rIe;function Qte(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>8,e[t+1]=r>>>0,e}Gr.writeUint16BE=Qte,Gr.writeInt16BE=Qte;function Xte(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e}Gr.writeUint16LE=Xte,Gr.writeInt16LE=Xte;function yP(r,e){return e===void 0&&(e=0),r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}Gr.readInt32BE=yP;function xP(r,e){return e===void 0&&(e=0),(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}Gr.readUint32BE=xP;function _P(r,e){return e===void 0&&(e=0),r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e]}Gr.readInt32LE=_P;function EP(r,e){return e===void 0&&(e=0),(r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e])>>>0}Gr.readUint32LE=EP;function jC(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>24,e[t+1]=r>>>16,e[t+2]=r>>>8,e[t+3]=r>>>0,e}Gr.writeUint32BE=jC,Gr.writeInt32BE=jC;function zC(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e[t+2]=r>>>16,e[t+3]=r>>>24,e}Gr.writeUint32LE=zC,Gr.writeInt32LE=zC;function nIe(r,e){e===void 0&&(e=0);var t=yP(r,e),n=yP(r,e+4);return t*4294967296+n-(n>>31)*4294967296}Gr.readInt64BE=nIe;function iIe(r,e){e===void 0&&(e=0);var t=xP(r,e),n=xP(r,e+4);return t*4294967296+n}Gr.readUint64BE=iIe;function sIe(r,e){e===void 0&&(e=0);var t=_P(r,e),n=_P(r,e+4);return n*4294967296+t-(t>>31)*4294967296}Gr.readInt64LE=sIe;function oIe(r,e){e===void 0&&(e=0);var t=EP(r,e),n=EP(r,e+4);return n*4294967296+t}Gr.readUint64LE=oIe;function ere(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),jC(r/4294967296>>>0,e,t),jC(r>>>0,e,t+4),e}Gr.writeUint64BE=ere,Gr.writeInt64BE=ere;function tre(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),zC(r>>>0,e,t),zC(r/4294967296>>>0,e,t+4),e}Gr.writeUint64LE=tre,Gr.writeInt64LE=tre;function aIe(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=r/8+t-1;s>=t;s--)n+=e[s]*i,i*=256;return n}Gr.readUintBE=aIe;function cIe(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=t;s=n;s--)t[s]=e/i&255,i*=256;return t}Gr.writeUintBE=lIe;function uIe(r,e,t,n){if(t===void 0&&(t=new Uint8Array(r/8)),n===void 0&&(n=0),r%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Yte.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s>>32-16|m<<16,F=F+m|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r,24),pa.writeUint32LE(Q+h|0,r,28),pa.writeUint32LE(F+p|0,r,32),pa.writeUint32LE(M+g|0,r,36),pa.writeUint32LE(b+w|0,r,40),pa.writeUint32LE(d+y|0,r,44),pa.writeUint32LE(m+C|0,r,48),pa.writeUint32LE(x+T|0,r,52),pa.writeUint32LE(A+k|0,r,56),pa.writeUint32LE(I+N|0,r,60)}function rre(r,e,t,n,i){if(i===void 0&&(i=0),r.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var nre={},a1={};Object.defineProperty(a1,"__esModule",{value:!0});function AIe(r,e,t){return~(r-1)&e|r-1&t}a1.select=AIe;function CIe(r,e){return(r|0)-(e|0)-1>>>31&1}a1.lessOrEqual=CIe;function ire(r,e){if(r.length!==e.length)return 0;for(var t=0,n=0;n>>8}a1.compare=ire;function SIe(r,e){return r.length===0||e.length===0?!1:ire(r,e)!==0}a1.equal=SIe,function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=a1,t=Hc;r.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=a[0]|a[1]<<8;this._r[0]=l&8191;var u=a[2]|a[3]<<8;this._r[1]=(l>>>13|u<<3)&8191;var h=a[4]|a[5]<<8;this._r[2]=(u>>>10|h<<6)&7939;var p=a[6]|a[7]<<8;this._r[3]=(h>>>7|p<<9)&8191;var g=a[8]|a[9]<<8;this._r[4]=(p>>>4|g<<12)&255,this._r[5]=g>>>1&8190;var w=a[10]|a[11]<<8;this._r[6]=(g>>>14|w<<2)&8191;var y=a[12]|a[13]<<8;this._r[7]=(w>>>11|y<<5)&8065;var C=a[14]|a[15]<<8;this._r[8]=(y>>>8|C<<8)&8191,this._r[9]=C>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,l,u){for(var h=this._fin?0:2048,p=this._h[0],g=this._h[1],w=this._h[2],y=this._h[3],C=this._h[4],T=this._h[5],k=this._h[6],N=this._h[7],O=this._h[8],B=this._h[9],z=this._r[0],G=this._r[1],$=this._r[2],D=this._r[3],V=this._r[4],Q=this._r[5],F=this._r[6],M=this._r[7],b=this._r[8],d=this._r[9];u>=16;){var m=a[l+0]|a[l+1]<<8;p+=m&8191;var x=a[l+2]|a[l+3]<<8;g+=(m>>>13|x<<3)&8191;var A=a[l+4]|a[l+5]<<8;w+=(x>>>10|A<<6)&8191;var I=a[l+6]|a[l+7]<<8;y+=(A>>>7|I<<9)&8191;var R=a[l+8]|a[l+9]<<8;C+=(I>>>4|R<<12)&8191,T+=R>>>1&8191;var S=a[l+10]|a[l+11]<<8;k+=(R>>>14|S<<2)&8191;var E=a[l+12]|a[l+13]<<8;N+=(S>>>11|E<<5)&8191;var _=a[l+14]|a[l+15]<<8;O+=(E>>>8|_<<8)&8191,B+=_>>>5|h;var L=0,ie=L;ie+=p*z,ie+=g*(5*d),ie+=w*(5*b),ie+=y*(5*M),ie+=C*(5*F),L=ie>>>13,ie&=8191,ie+=T*(5*Q),ie+=k*(5*V),ie+=N*(5*D),ie+=O*(5*$),ie+=B*(5*G),L+=ie>>>13,ie&=8191;var q=L;q+=p*G,q+=g*z,q+=w*(5*d),q+=y*(5*b),q+=C*(5*M),L=q>>>13,q&=8191,q+=T*(5*F),q+=k*(5*Q),q+=N*(5*V),q+=O*(5*D),q+=B*(5*$),L+=q>>>13,q&=8191;var Y=L;Y+=p*$,Y+=g*G,Y+=w*z,Y+=y*(5*d),Y+=C*(5*b),L=Y>>>13,Y&=8191,Y+=T*(5*M),Y+=k*(5*F),Y+=N*(5*Q),Y+=O*(5*V),Y+=B*(5*D),L+=Y>>>13,Y&=8191;var K=L;K+=p*D,K+=g*$,K+=w*G,K+=y*z,K+=C*(5*d),L=K>>>13,K&=8191,K+=T*(5*b),K+=k*(5*M),K+=N*(5*F),K+=O*(5*Q),K+=B*(5*V),L+=K>>>13,K&=8191;var te=L;te+=p*V,te+=g*D,te+=w*$,te+=y*G,te+=C*z,L=te>>>13,te&=8191,te+=T*(5*d),te+=k*(5*b),te+=N*(5*M),te+=O*(5*F),te+=B*(5*Q),L+=te>>>13,te&=8191;var re=L;re+=p*Q,re+=g*V,re+=w*D,re+=y*$,re+=C*G,L=re>>>13,re&=8191,re+=T*z,re+=k*(5*d),re+=N*(5*b),re+=O*(5*M),re+=B*(5*F),L+=re>>>13,re&=8191;var H=L;H+=p*F,H+=g*Q,H+=w*V,H+=y*D,H+=C*$,L=H>>>13,H&=8191,H+=T*G,H+=k*z,H+=N*(5*d),H+=O*(5*b),H+=B*(5*M),L+=H>>>13,H&=8191;var U=L;U+=p*M,U+=g*F,U+=w*Q,U+=y*V,U+=C*D,L=U>>>13,U&=8191,U+=T*$,U+=k*G,U+=N*z,U+=O*(5*d),U+=B*(5*b),L+=U>>>13,U&=8191;var W=L;W+=p*b,W+=g*M,W+=w*F,W+=y*Q,W+=C*V,L=W>>>13,W&=8191,W+=T*D,W+=k*$,W+=N*G,W+=O*z,W+=B*(5*d),L+=W>>>13,W&=8191;var le=L;le+=p*d,le+=g*b,le+=w*M,le+=y*F,le+=C*Q,L=le>>>13,le&=8191,le+=T*V,le+=k*D,le+=N*$,le+=O*G,le+=B*z,L+=le>>>13,le&=8191,L=(L<<2)+L|0,L=L+ie|0,ie=L&8191,L=L>>>13,q+=L,p=ie,g=q,w=Y,y=K,C=te,T=re,k=H,N=U,O=W,B=le,l+=16,u-=16}this._h[0]=p,this._h[1]=g,this._h[2]=w,this._h[3]=y,this._h[4]=C,this._h[5]=T,this._h[6]=k,this._h[7]=N,this._h[8]=O,this._h[9]=B},o.prototype.finish=function(a,l){l===void 0&&(l=0);var u=new Uint16Array(10),h,p,g,w;if(this._leftover){for(w=this._leftover,this._buffer[w++]=1;w<16;w++)this._buffer[w]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(h=this._h[1]>>>13,this._h[1]&=8191,w=2;w<10;w++)this._h[w]+=h,h=this._h[w]>>>13,this._h[w]&=8191;for(this._h[0]+=h*5,h=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=h,h=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=h,u[0]=this._h[0]+5,h=u[0]>>>13,u[0]&=8191,w=1;w<10;w++)u[w]=this._h[w]+h,h=u[w]>>>13,u[w]&=8191;for(u[9]-=1<<13,p=(h^1)-1,w=0;w<10;w++)u[w]&=p;for(p=~p,w=0;w<10;w++)this._h[w]=this._h[w]&p|u[w];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,g=this._h[0]+this._pad[0],this._h[0]=g&65535,w=1;w<8;w++)g=(this._h[w]+this._pad[w]|0)+(g>>>16)|0,this._h[w]=g&65535;return a[l+0]=this._h[0]>>>0,a[l+1]=this._h[0]>>>8,a[l+2]=this._h[1]>>>0,a[l+3]=this._h[1]>>>8,a[l+4]=this._h[2]>>>0,a[l+5]=this._h[2]>>>8,a[l+6]=this._h[3]>>>0,a[l+7]=this._h[3]>>>8,a[l+8]=this._h[4]>>>0,a[l+9]=this._h[4]>>>8,a[l+10]=this._h[5]>>>0,a[l+11]=this._h[5]>>>8,a[l+12]=this._h[6]>>>0,a[l+13]=this._h[6]>>>8,a[l+14]=this._h[7]>>>0,a[l+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var l=0,u=a.length,h;if(this._leftover){h=16-this._leftover,h>u&&(h=u);for(var p=0;p=16&&(h=u-u%16,this._blocks(a,l,h),l+=h,u-=h),u){for(var p=0;p16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var w=new Uint8Array(16);w.set(u,w.length-u.length);var y=new Uint8Array(32);e.stream(this._key,w,y,4);var C=h.length+this.tagLength,T;if(g){if(g.length!==C)throw new Error("ChaCha20Poly1305: incorrect destination length");T=g}else T=new Uint8Array(C);return e.streamXOR(this._key,w,h,T,4),this._authenticate(T.subarray(T.length-this.tagLength,T.length),y,T.subarray(0,T.length-this.tagLength),p),n.wipe(w),T},l.prototype.open=function(u,h,p,g){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(h.length0&&w.update(o.subarray(g.length%16))),w.update(p),p.length%16>0&&w.update(o.subarray(p.length%16));var y=new Uint8Array(8);g&&i.writeUint64LE(g.length,y),w.update(y),i.writeUint64LE(p.length,y),w.update(y);for(var C=w.digest(),T=0;Tthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},r.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n */var fre;function sn(){return fre||(fre=1,function(r,e){var t=qc,n=t.Buffer;function i(o,a){for(var l in o)a[l]=o[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,l){return n(o,a,l)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,l)},s.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof l=="string"?u.fill(a,l):u.fill(a):u.fill(0),u},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}}(OIe,C6)),C6}var dre;function Xv(){if(dre)return VC;dre=1;var r=65536,e=4294967295;function t(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var n=sn().Buffer,i=ct.crypto||ct.msCrypto;i&&i.getRandomValues?hre.exports=s:hre.exports=t;function s(o,a){if(o>e)throw new RangeError("requested too many random bytes");var l=n.allocUnsafe(o);if(o>0)if(o>r)for(var u=0;u"u"||!C?r:C(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":w&&C?C([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&C?C(C([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!C?r:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":n,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!C?r:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&C?C(""[Symbol.iterator]()):r,"%Symbol%":w?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":g,"%TypedArray%":k,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(C)try{null.error}catch(A){var O=C(C(A));N["%Error.prototype%"]=O}var B=function A(I){var R;if(I==="%AsyncFunction%")R=u("async function () {}");else if(I==="%GeneratorFunction%")R=u("function* () {}");else if(I==="%AsyncGeneratorFunction%")R=u("async function* () {}");else if(I==="%AsyncGenerator%"){var S=A("%AsyncGeneratorFunction%");S&&(R=S.prototype)}else if(I==="%AsyncIteratorPrototype%"){var E=A("%AsyncGenerator%");E&&C&&(R=C(E.prototype))}return N[I]=R,R},z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G=HP(),$=qIe(),D=G.call(Function.call,Array.prototype.concat),V=G.call(Function.apply,Array.prototype.splice),Q=G.call(Function.call,String.prototype.replace),F=G.call(Function.call,String.prototype.slice),M=G.call(Function.call,RegExp.prototype.exec),b=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,d=/\\(\\)?/g,m=function(I){var R=F(I,0,1),S=F(I,-1);if(R==="%"&&S!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(S==="%"&&R!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var E=[];return Q(I,b,function(_,L,ie,q){E[E.length]=ie?Q(q,d,"$1"):L||_}),E},x=function(I,R){var S=I,E;if($(z,S)&&(E=z[S],S="%"+E[0]+"%"),$(N,S)){var _=N[S];if(_===T&&(_=B(S)),typeof _>"u"&&!R)throw new o("intrinsic "+I+" exists, but is not available. Please file an issue!");return{alias:E,name:S,value:_}}throw new s("intrinsic "+I+" does not exist!")};return WP=function(I,R){if(typeof I!="string"||I.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof R!="boolean")throw new o('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,I)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var S=m(I),E=S.length>0?S[0]:"",_=x("%"+E+"%",R),L=_.name,ie=_.value,q=!1,Y=_.alias;Y&&(E=Y[0],V(S,D([0,1],Y)));for(var K=1,te=!0;K=S.length){var W=h(ie,re);te=!!W,te&&"get"in W&&!("originalValue"in W.get)?ie=W.get:ie=ie[re]}else te=$(ie,re),ie=ie[re];te&&!q&&(N[L]=ie)}}return ie},WP}var ZC={},WIe={get exports(){return ZC},set exports(r){ZC=r}},VP,Dre;function GP(){if(Dre)return VP;Dre=1;var r=I6(),e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return VP=e,VP}var KP,$re;function ZP(){if($re)return KP;$re=1;var r=I6(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return KP=e,KP}var JP,Bre;function VIe(){if(Bre)return JP;Bre=1;var r=GP(),e=Sre(),t=KC(),n=ZP();return JP=function(s,o,a){if(!s||typeof s!="object"&&typeof s!="function")throw new t("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,g=!!n&&n(s,o);if(r)r(s,o,{configurable:h===null&&g?g.configurable:!h,enumerable:l===null&&g?g.enumerable:!l,value:a,writable:u===null&&g?g.writable:!u});else if(p||!l&&!u&&!h)s[o]=a;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},JP}var YP,Lre;function GIe(){if(Lre)return YP;Lre=1;var r=GP(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},YP=e,YP}var QP,Ure;function KIe(){if(Ure)return QP;Ure=1;var r=I6(),e=VIe(),t=GIe()(),n=ZP(),i=KC(),s=r("%Math.floor%");return QP=function(a,l){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],h=!0,p=!0;if("length"in a&&n){var g=n(a,"length");g&&!g.configurable&&(h=!1),g&&!g.writable&&(p=!1)}return(h||p||!u)&&(t?e(a,"length",l,!0,!0):e(a,"length",l)),a},QP}var Fre;function jre(){return Fre||(Fre=1,function(r){var e=HP(),t=I6(),n=KIe(),i=KC(),s=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(o,s),l=GP(),u=t("%Math.max%");r.exports=function(g){if(typeof g!="function")throw new i("a function is required");var w=a(e,o,arguments);return n(w,1+u(0,g.length-(arguments.length-1)),!0)};var h=function(){return a(e,s,arguments)};l?l(r.exports,"apply",{value:h}):r.exports.apply=h}(WIe)),ZC}var XP,zre;function Hre(){if(zre)return XP;zre=1;var r=I6(),e=jre(),t=e(r("String.prototype.indexOf"));return XP=function(i,s){var o=r(i,!!s);return typeof o=="function"&&t(i,".prototype.")>-1?e(o):o},XP}var eO,qre;function ZIe(){if(qre)return eO;qre=1;var r=MP()(),e=Hre(),t=e("Object.prototype.toString"),n=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:t(a)==="[object Arguments]"},i=function(a){return n(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&t(a)!=="[object Array]"&&t(a.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,eO=s?n:i,eO}var tO,Wre;function JIe(){if(Wre)return tO;Wre=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=MP()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},o;return tO=function(l){if(typeof l!="function")return!1;if(t.test(e.call(l)))return!0;if(!n){var u=r.call(l);return u==="[object GeneratorFunction]"}if(!i)return!1;if(typeof o>"u"){var h=s();o=h?i(h):!1}return i(l)===o},tO}var rO,Vre;function YIe(){if(Vre)return rO;Vre=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(N){N!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(O){try{var B=r.call(O);return i.test(B)}catch{return!1}},o=function(O){try{return s(O)?!1:(r.call(O),!0)}catch{return!1}},a=Object.prototype.toString,l="[object Object]",u="[object Function]",h="[object GeneratorFunction]",p="[object HTMLAllCollection]",g="[object HTML document.all class]",w="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,C=!(0 in[,]),T=function(){return!1};if(typeof document=="object"){var k=document.all;a.call(k)===a.call(document.all)&&(T=function(O){if((C||!O)&&(typeof O>"u"||typeof O=="object"))try{var B=a.call(O);return(B===p||B===g||B===w||B===l)&&O("")==null}catch{}return!1})}return rO=e?function(O){if(T(O))return!0;if(!O||typeof O!="function"&&typeof O!="object")return!1;try{e(O,null,t)}catch(B){if(B!==n)return!1}return!s(O)&&o(O)}:function(O){if(T(O))return!0;if(!O||typeof O!="function"&&typeof O!="object")return!1;if(y)return o(O);if(s(O))return!1;var B=a.call(O);return B!==u&&B!==h&&!/^\[object HTML/.test(B)?!1:o(O)},rO}var nO,Gre;function QIe(){if(Gre)return nO;Gre=1;var r=YIe(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(l,u,h){for(var p=0,g=l.length;p=3&&(p=h),e.call(l)==="[object Array]"?n(l,u,p):typeof l=="string"?i(l,u,p):s(l,u,p)};return nO=o,nO}var iO,Kre;function XIe(){return Kre||(Kre=1,iO=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),iO}var sO,Zre;function eTe(){if(Zre)return sO;Zre=1;var r=XIe(),e=typeof globalThis>"u"?ct:globalThis;return sO=function(){for(var n=[],i=0;i"u"?ct:globalThis,l=e(),u=n("String.prototype.slice"),h=Object.getPrototypeOf,p=n("Array.prototype.indexOf",!0)||function(T,k){for(var N=0;N-1?k:k!=="Object"?!1:y(T)}return i?w(T):null},oO}var aO,Qre;function tTe(){if(Qre)return aO;Qre=1;var r=Yre();return aO=function(t){return!!r(t)},aO}var Xre;function rTe(){return Xre||(Xre=1,function(r){var e=ZIe(),t=JIe(),n=Yre(),i=tTe();function s(Re){return Re.call.bind(Re)}var o=typeof BigInt<"u",a=typeof Symbol<"u",l=s(Object.prototype.toString),u=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(o)var g=s(BigInt.prototype.valueOf);if(a)var w=s(Symbol.prototype.valueOf);function y(Re,je){if(typeof Re!="object")return!1;try{return je(Re),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function C(Re){return typeof Promise<"u"&&Re instanceof Promise||Re!==null&&typeof Re=="object"&&typeof Re.then=="function"&&typeof Re.catch=="function"}r.isPromise=C;function T(Re){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Re):i(Re)||L(Re)}r.isArrayBufferView=T;function k(Re){return n(Re)==="Uint8Array"}r.isUint8Array=k;function N(Re){return n(Re)==="Uint8ClampedArray"}r.isUint8ClampedArray=N;function O(Re){return n(Re)==="Uint16Array"}r.isUint16Array=O;function B(Re){return n(Re)==="Uint32Array"}r.isUint32Array=B;function z(Re){return n(Re)==="Int8Array"}r.isInt8Array=z;function G(Re){return n(Re)==="Int16Array"}r.isInt16Array=G;function $(Re){return n(Re)==="Int32Array"}r.isInt32Array=$;function D(Re){return n(Re)==="Float32Array"}r.isFloat32Array=D;function V(Re){return n(Re)==="Float64Array"}r.isFloat64Array=V;function Q(Re){return n(Re)==="BigInt64Array"}r.isBigInt64Array=Q;function F(Re){return n(Re)==="BigUint64Array"}r.isBigUint64Array=F;function M(Re){return l(Re)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function b(Re){return typeof Map>"u"?!1:M.working?M(Re):Re instanceof Map}r.isMap=b;function d(Re){return l(Re)==="[object Set]"}d.working=typeof Set<"u"&&d(new Set);function m(Re){return typeof Set>"u"?!1:d.working?d(Re):Re instanceof Set}r.isSet=m;function x(Re){return l(Re)==="[object WeakMap]"}x.working=typeof WeakMap<"u"&&x(new WeakMap);function A(Re){return typeof WeakMap>"u"?!1:x.working?x(Re):Re instanceof WeakMap}r.isWeakMap=A;function I(Re){return l(Re)==="[object WeakSet]"}I.working=typeof WeakSet<"u"&&I(new WeakSet);function R(Re){return I(Re)}r.isWeakSet=R;function S(Re){return l(Re)==="[object ArrayBuffer]"}S.working=typeof ArrayBuffer<"u"&&S(new ArrayBuffer);function E(Re){return typeof ArrayBuffer>"u"?!1:S.working?S(Re):Re instanceof ArrayBuffer}r.isArrayBuffer=E;function _(Re){return l(Re)==="[object DataView]"}_.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&_(new DataView(new ArrayBuffer(1),0,1));function L(Re){return typeof DataView>"u"?!1:_.working?_(Re):Re instanceof DataView}r.isDataView=L;var ie=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function q(Re){return l(Re)==="[object SharedArrayBuffer]"}function Y(Re){return typeof ie>"u"?!1:(typeof q.working>"u"&&(q.working=q(new ie)),q.working?q(Re):Re instanceof ie)}r.isSharedArrayBuffer=Y;function K(Re){return l(Re)==="[object AsyncFunction]"}r.isAsyncFunction=K;function te(Re){return l(Re)==="[object Map Iterator]"}r.isMapIterator=te;function re(Re){return l(Re)==="[object Set Iterator]"}r.isSetIterator=re;function H(Re){return l(Re)==="[object Generator]"}r.isGeneratorObject=H;function U(Re){return l(Re)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=U;function W(Re){return y(Re,u)}r.isNumberObject=W;function le(Re){return y(Re,h)}r.isStringObject=le;function de(Re){return y(Re,p)}r.isBooleanObject=de;function Se(Re){return o&&y(Re,g)}r.isBigIntObject=Se;function Me(Re){return a&&y(Re,w)}r.isSymbolObject=Me;function ke(Re){return W(Re)||le(Re)||de(Re)||Se(Re)||Me(Re)}r.isBoxedPrimitive=ke;function Ke(Re){return typeof Uint8Array<"u"&&(E(Re)||Y(Re))}r.isAnyArrayBuffer=Ke,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Re){Object.defineProperty(r,Re,{enumerable:!1,value:function(){throw new Error(Re+" is not supported in userland")}})})}(TP)),TP}var cO,ene;function nTe(){return ene||(ene=1,cO=function(e){return e instanceof Dt}),cO}var tne;function JC(){return tne||(tne=1,function(r){var e=Object.getOwnPropertyDescriptors||function(L){for(var ie=Object.keys(L),q={},Y=0;Y=Y)return re;switch(re){case"%s":return String(q[ie++]);case"%d":return Number(q[ie++]);case"%j":try{return JSON.stringify(q[ie++])}catch{return"[Circular]"}default:return re}}),te=q[ie];ie"u")return function(){return r.deprecate(_,L).apply(this,arguments)};var ie=!1;function q(){if(!ie){if(yt.throwDeprecation)throw new Error(L);yt.traceDeprecation?console.trace(L):console.error(L),ie=!0}return _.apply(this,arguments)}return q};var n={},i=/^$/;if(yt.env.NODE_DEBUG){var s=yt.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(_){if(_=_.toUpperCase(),!n[_])if(i.test(_)){var L=yt.pid;n[_]=function(){var ie=r.format.apply(r,arguments);console.error("%s %d: %s",_,L,ie)}}else n[_]=function(){};return n[_]};function o(_,L){var ie={seen:[],stylize:l};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),k(L)?ie.showHidden=L:L&&r._extend(ie,L),$(ie.showHidden)&&(ie.showHidden=!1),$(ie.depth)&&(ie.depth=2),$(ie.colors)&&(ie.colors=!1),$(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=a),h(ie,_,ie.depth)}r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(_,L){var ie=o.styles[L];return ie?"\x1B["+o.colors[ie][0]+"m"+_+"\x1B["+o.colors[ie][1]+"m":_}function l(_,L){return _}function u(_){var L={};return _.forEach(function(ie,q){L[ie]=!0}),L}function h(_,L,ie){if(_.customInspect&&L&&M(L.inspect)&&L.inspect!==r.inspect&&!(L.constructor&&L.constructor.prototype===L)){var q=L.inspect(ie,_);return z(q)||(q=h(_,q,ie)),q}var Y=p(_,L);if(Y)return Y;var K=Object.keys(L),te=u(K);if(_.showHidden&&(K=Object.getOwnPropertyNames(L)),F(L)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return g(L);if(K.length===0){if(M(L)){var re=L.name?": "+L.name:"";return _.stylize("[Function"+re+"]","special")}if(D(L))return _.stylize(RegExp.prototype.toString.call(L),"regexp");if(Q(L))return _.stylize(Date.prototype.toString.call(L),"date");if(F(L))return g(L)}var H="",U=!1,W=["{","}"];if(T(L)&&(U=!0,W=["[","]"]),M(L)){var le=L.name?": "+L.name:"";H=" [Function"+le+"]"}if(D(L)&&(H=" "+RegExp.prototype.toString.call(L)),Q(L)&&(H=" "+Date.prototype.toUTCString.call(L)),F(L)&&(H=" "+g(L)),K.length===0&&(!U||L.length==0))return W[0]+H+W[1];if(ie<0)return D(L)?_.stylize(RegExp.prototype.toString.call(L),"regexp"):_.stylize("[Object]","special");_.seen.push(L);var de;return U?de=w(_,L,ie,te,K):de=K.map(function(Se){return y(_,L,ie,te,Se,U)}),_.seen.pop(),C(de,H,W)}function p(_,L){if($(L))return _.stylize("undefined","undefined");if(z(L)){var ie="'"+JSON.stringify(L).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return _.stylize(ie,"string")}if(B(L))return _.stylize(""+L,"number");if(k(L))return _.stylize(""+L,"boolean");if(N(L))return _.stylize("null","null")}function g(_){return"["+Error.prototype.toString.call(_)+"]"}function w(_,L,ie,q,Y){for(var K=[],te=0,re=L.length;te`:null}onNetworkClick(e){e&&it.push("Networks",{network:e})}};V8.styles=DLe,CD([me()],V8.prototype,"receiverAddress",void 0),CD([me({type:Object})],V8.prototype,"caipNetwork",void 0),V8=CD([Fe("w3m-wallet-send-details")],V8);let hse=!1;class $Le{constructor(e){this.initPromise=void 0,this.setIsConnected=t=>{zt.setIsConnected(t)},this.getIsConnectedState=()=>zt.state.isConnected,this.setCaipAddress=t=>{zt.setCaipAddress(t)},this.setBalance=(t,n)=>{zt.setBalance(t,n)},this.setProfileName=t=>{zt.setProfileName(t)},this.setProfileImage=t=>{zt.setProfileImage(t)},this.resetAccount=()=>{zt.resetAccount()},this.setCaipNetwork=t=>{dr.setCaipNetwork(t)},this.getCaipNetwork=()=>dr.state.caipNetwork,this.setRequestedCaipNetworks=t=>{dr.setRequestedCaipNetworks(t)},this.getApprovedCaipNetworksData=()=>dr.getApprovedCaipNetworksData(),this.resetNetwork=()=>{dr.resetNetwork()},this.setConnectors=t=>{Un.setConnectors(t)},this.addConnector=t=>{Un.addConnector(t)},this.getConnectors=()=>Un.getConnectors(),this.resetWcConnection=()=>{Gr.resetWcConnection()},this.fetchIdentity=t=>Uo.fetchIdentity(t),this.setAddressExplorerUrl=t=>{zt.setAddressExplorerUrl(t)},this.setSmartAccountDeployed=t=>{zt.setSmartAccountDeployed(t)},this.setConnectedWalletInfo=t=>{zt.setConnectedWalletInfo(t)},this.setSmartAccountEnabledNetworks=t=>{dr.setSmartAccountEnabledNetworks(t)},this.setPreferredAccountType=t=>{zt.setPreferredAccountType(t)},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),Xr.open(e)}async close(){await this.initOrContinue(),Xr.close()}setLoading(e){Xr.setLoading(e)}getThemeMode(){return ea.state.themeMode}getThemeVariables(){return ea.state.themeVariables}setThemeMode(e){ea.setThemeMode(e),SN(ea.state.themeMode)}setThemeVariables(e){ea.setThemeVariables(e),Zne(ea.state.themeVariables)}subscribeTheme(e){return ea.subscribe(e)}getWalletInfo(){return zt.state.connectedWalletInfo}subscribeWalletInfo(e){return zt.subscribeKey("connectedWalletInfo",e)}getState(){return kg.state}subscribeState(e){return kg.subscribe(e)}showErrorMessage(e){bn.showError(e)}showSuccessMessage(e){bn.showSuccess(e)}getEvent(){return{...Cr.state}}subscribeEvents(e){return Cr.subscribe(e)}redirect(e){it.push(e)}popTransactionStack(e){it.popTransactionStack(e)}isOpen(){return Xr.state.open}isTransactionStackEmpty(){return it.state.transactionStack.length===0}async initControllers(e){if(dr.setClient(e.networkControllerClient),dr.setDefaultCaipNetwork(e.defaultChain),pr.setProjectId(e.projectId),pr.setAllWallets(e.allWallets),pr.setIncludeWalletIds(e.includeWalletIds),pr.setExcludeWalletIds(e.excludeWalletIds),pr.setFeaturedWalletIds(e.featuredWalletIds),pr.setTokens(e.tokens),pr.setTermsConditionsUrl(e.termsConditionsUrl),pr.setPrivacyPolicyUrl(e.privacyPolicyUrl),pr.setCustomWallets(e.customWallets),pr.setEnableAnalytics(e.enableAnalytics),pr.setSdkVersion(e._sdkVersion),Gr.setClient(e.connectionControllerClient),e.siweControllerClient){const{SIWEController:t}=await Promise.resolve().then(()=>bR);t.setSIWEClient(e.siweControllerClient)}e.metadata&&pr.setMetadata(e.metadata),e.themeMode&&ea.setThemeMode(e.themeMode),e.themeVariables&&ea.setThemeVariables(e.themeVariables),e.enableOnramp&&pr.setOnrampEnabled(!!e.enableOnramp),e.enableWalletFeatures&&pr.setWalletFeaturesEnabled(!!e.enableWalletFeatures),e.allowUnsupportedChain&&dr.setAllowUnsupportedChain(e.allowUnsupportedChain)}async initOrContinue(){return!this.initPromise&&!hse&&rr.isClient()&&(hse=!0,this.initPromise=new Promise(async e=>{await Promise.all([Promise.resolve().then(()=>e$e),Promise.resolve().then(()=>n$e)]);const t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),e()})),this.initPromise}}var AD={exports:{}},Q3=typeof Reflect=="object"?Reflect:null,pse=Q3&&typeof Q3.apply=="function"?Q3.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},hI;Q3&&typeof Q3.ownKeys=="function"?hI=Q3.ownKeys:Object.getOwnPropertySymbols?hI=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:hI=function(e){return Object.getOwnPropertyNames(e)};function BLe(r){console&&console.warn&&console.warn(r)}var mse=Number.isNaN||function(e){return e!==e};function vi(){vi.init.call(this)}AD.exports=vi,AD.exports.once=jLe,vi.EventEmitter=vi,vi.prototype._events=void 0,vi.prototype._eventsCount=0,vi.prototype._maxListeners=void 0;var gse=10;function pI(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(vi,"defaultMaxListeners",{enumerable:!0,get:function(){return gse},set:function(r){if(typeof r!="number"||r<0||mse(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");gse=r}}),vi.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},vi.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||mse(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function bse(r){return r._maxListeners===void 0?vi.defaultMaxListeners:r._maxListeners}vi.prototype.getMaxListeners=function(){return bse(this)},vi.prototype.emit=function(e){for(var t=[],n=1;n0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(l===void 0)return!1;if(typeof l=="function")pse(l,this,t);else for(var u=l.length,f=_se(l,u),n=0;n0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=e,o.count=a.length,BLe(o)}return r}vi.prototype.addListener=function(e,t){return vse(this,e,t,!1)},vi.prototype.on=vi.prototype.addListener,vi.prototype.prependListener=function(e,t){return vse(this,e,t,!0)};function LLe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wse(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=LLe.bind(n);return i.listener=t,n.wrapFn=i,i}vi.prototype.once=function(e,t){return pI(t),this.on(e,wse(this,e,t)),this},vi.prototype.prependOnceListener=function(e,t){return pI(t),this.prependListener(e,wse(this,e,t)),this},vi.prototype.removeListener=function(e,t){var n,i,s,a,o;if(pI(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():ULe(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||t)}return this},vi.prototype.off=vi.prototype.removeListener,vi.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function yse(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?FLe(i):_se(i,i.length)}vi.prototype.listeners=function(e){return yse(this,e,!0)},vi.prototype.rawListeners=function(e){return yse(this,e,!1)},vi.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):xse.call(r,e)},vi.prototype.listenerCount=xse;function xse(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}vi.prototype.eventNames=function(){return this._eventsCount>0?hI(this._events):[]};function _se(r,e){for(var t=new Array(e),n=0;n>>16&65535,f=o&65535,h=l>>>16&65535,m=l&65535;return f*m+(u*m+f*h<<16>>>0)|0}r.mul=Math.imul||e;function t(o,l){return o+l|0}r.add=t;function n(o,l){return o-l|0}r.sub=n;function i(o,l){return o<>>32-l}r.rotl=i;function s(o,l){return o<<32-l|o>>>l}r.rotr=s;function a(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}r.isInteger=Number.isInteger||a,r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(o){return r.isInteger(o)&&o>=-r.MAX_SAFE_INTEGER&&o<=r.MAX_SAFE_INTEGER}})(Cse),Object.defineProperty(Qr,"__esModule",{value:!0});var Ase=Cse;function HLe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])<<16>>16}Qr.readInt16BE=HLe;function qLe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])>>>0}Qr.readUint16BE=qLe;function WLe(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])<<16>>16}Qr.readInt16LE=WLe;function VLe(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])>>>0}Qr.readUint16LE=VLe;function Sse(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>8,e[t+1]=r>>>0,e}Qr.writeUint16BE=Sse,Qr.writeInt16BE=Sse;function Ise(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e}Qr.writeUint16LE=Ise,Qr.writeInt16LE=Ise;function SD(r,e){return e===void 0&&(e=0),r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}Qr.readInt32BE=SD;function ID(r,e){return e===void 0&&(e=0),(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}Qr.readUint32BE=ID;function TD(r,e){return e===void 0&&(e=0),r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e]}Qr.readInt32LE=TD;function kD(r,e){return e===void 0&&(e=0),(r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e])>>>0}Qr.readUint32LE=kD;function gI(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>24,e[t+1]=r>>>16,e[t+2]=r>>>8,e[t+3]=r>>>0,e}Qr.writeUint32BE=gI,Qr.writeInt32BE=gI;function bI(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e[t+2]=r>>>16,e[t+3]=r>>>24,e}Qr.writeUint32LE=bI,Qr.writeInt32LE=bI;function GLe(r,e){e===void 0&&(e=0);var t=SD(r,e),n=SD(r,e+4);return t*4294967296+n-(n>>31)*4294967296}Qr.readInt64BE=GLe;function KLe(r,e){e===void 0&&(e=0);var t=ID(r,e),n=ID(r,e+4);return t*4294967296+n}Qr.readUint64BE=KLe;function ZLe(r,e){e===void 0&&(e=0);var t=TD(r,e),n=TD(r,e+4);return n*4294967296+t-(t>>31)*4294967296}Qr.readInt64LE=ZLe;function JLe(r,e){e===void 0&&(e=0);var t=kD(r,e),n=kD(r,e+4);return n*4294967296+t}Qr.readUint64LE=JLe;function Tse(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),gI(r/4294967296>>>0,e,t),gI(r>>>0,e,t+4),e}Qr.writeUint64BE=Tse,Qr.writeInt64BE=Tse;function kse(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),bI(r>>>0,e,t),bI(r/4294967296>>>0,e,t+4),e}Qr.writeUint64LE=kse,Qr.writeInt64LE=kse;function YLe(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=r/8+t-1;s>=t;s--)n+=e[s]*i,i*=256;return n}Qr.readUintBE=YLe;function QLe(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=t;s=n;s--)t[s]=e/i&255,i*=256;return t}Qr.writeUintBE=XLe;function eUe(r,e,t,n){if(t===void 0&&(t=new Uint8Array(r/8)),n===void 0&&(n=0),r%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Ase.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s>>16|g<<16,D=D+g|0,U^=D,U=U>>>20|U<<12,$=$+L|0,_^=$,_=_>>>16|_<<16,x=x+_|0,L^=x,L=L>>>20|L<<12,j=j+V|0,S^=j,S=S>>>16|S<<16,y=y+S|0,V^=y,V=V>>>20|V<<12,G=G+te|0,T^=G,T=T>>>16|T<<16,p=p+T|0,te^=p,te=te>>>20|te<<12,j=j+V|0,S^=j,S=S>>>24|S<<8,y=y+S|0,V^=y,V=V>>>25|V<<7,G=G+te|0,T^=G,T=T>>>24|T<<8,p=p+T|0,te^=p,te=te>>>25|te<<7,$=$+L|0,_^=$,_=_>>>24|_<<8,x=x+_|0,L^=x,L=L>>>25|L<<7,N=N+U|0,g^=N,g=g>>>24|g<<8,D=D+g|0,U^=D,U=U>>>25|U<<7,N=N+L|0,T^=N,T=T>>>16|T<<16,y=y+T|0,L^=y,L=L>>>20|L<<12,$=$+V|0,g^=$,g=g>>>16|g<<16,p=p+g|0,V^=p,V=V>>>20|V<<12,j=j+te|0,_^=j,_=_>>>16|_<<16,D=D+_|0,te^=D,te=te>>>20|te<<12,G=G+U|0,S^=G,S=S>>>16|S<<16,x=x+S|0,U^=x,U=U>>>20|U<<12,j=j+te|0,_^=j,_=_>>>24|_<<8,D=D+_|0,te^=D,te=te>>>25|te<<7,G=G+U|0,S^=G,S=S>>>24|S<<8,x=x+S|0,U^=x,U=U>>>25|U<<7,$=$+V|0,g^=$,g=g>>>24|g<<8,p=p+g|0,V^=p,V=V>>>25|V<<7,N=N+L|0,T^=N,T=T>>>24|T<<8,y=y+T|0,L^=y,L=L>>>25|L<<7;Ao.writeUint32LE(N+n|0,r,0),Ao.writeUint32LE($+i|0,r,4),Ao.writeUint32LE(j+s|0,r,8),Ao.writeUint32LE(G+a|0,r,12),Ao.writeUint32LE(U+o|0,r,16),Ao.writeUint32LE(L+l|0,r,20),Ao.writeUint32LE(V+u|0,r,24),Ao.writeUint32LE(te+f|0,r,28),Ao.writeUint32LE(D+h|0,r,32),Ao.writeUint32LE(x+m|0,r,36),Ao.writeUint32LE(y+b|0,r,40),Ao.writeUint32LE(p+v|0,r,44),Ao.writeUint32LE(g+C|0,r,48),Ao.writeUint32LE(_+R|0,r,52),Ao.writeUint32LE(S+k|0,r,56),Ao.writeUint32LE(T+P|0,r,60)}function Rse(r,e,t,n,i){if(i===void 0&&(i=0),r.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var Mse={},H1={};Object.defineProperty(H1,"__esModule",{value:!0});function pUe(r,e,t){return~(r-1)&e|r-1&t}H1.select=pUe;function mUe(r,e){return(r|0)-(e|0)-1>>>31&1}H1.lessOrEqual=mUe;function Pse(r,e){if(r.length!==e.length)return 0;for(var t=0,n=0;n>>8}H1.compare=Pse;function gUe(r,e){return r.length===0||e.length===0?!1:Pse(r,e)!==0}H1.equal=gUe,function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=H1,t=il;r.DIGEST_LENGTH=16;var n=function(){function a(o){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=o[0]|o[1]<<8;this._r[0]=l&8191;var u=o[2]|o[3]<<8;this._r[1]=(l>>>13|u<<3)&8191;var f=o[4]|o[5]<<8;this._r[2]=(u>>>10|f<<6)&7939;var h=o[6]|o[7]<<8;this._r[3]=(f>>>7|h<<9)&8191;var m=o[8]|o[9]<<8;this._r[4]=(h>>>4|m<<12)&255,this._r[5]=m>>>1&8190;var b=o[10]|o[11]<<8;this._r[6]=(m>>>14|b<<2)&8191;var v=o[12]|o[13]<<8;this._r[7]=(b>>>11|v<<5)&8065;var C=o[14]|o[15]<<8;this._r[8]=(v>>>8|C<<8)&8191,this._r[9]=C>>>5&127,this._pad[0]=o[16]|o[17]<<8,this._pad[1]=o[18]|o[19]<<8,this._pad[2]=o[20]|o[21]<<8,this._pad[3]=o[22]|o[23]<<8,this._pad[4]=o[24]|o[25]<<8,this._pad[5]=o[26]|o[27]<<8,this._pad[6]=o[28]|o[29]<<8,this._pad[7]=o[30]|o[31]<<8}return a.prototype._blocks=function(o,l,u){for(var f=this._fin?0:2048,h=this._h[0],m=this._h[1],b=this._h[2],v=this._h[3],C=this._h[4],R=this._h[5],k=this._h[6],P=this._h[7],N=this._h[8],$=this._h[9],j=this._r[0],G=this._r[1],U=this._r[2],L=this._r[3],V=this._r[4],te=this._r[5],D=this._r[6],x=this._r[7],y=this._r[8],p=this._r[9];u>=16;){var g=o[l+0]|o[l+1]<<8;h+=g&8191;var _=o[l+2]|o[l+3]<<8;m+=(g>>>13|_<<3)&8191;var S=o[l+4]|o[l+5]<<8;b+=(_>>>10|S<<6)&8191;var T=o[l+6]|o[l+7]<<8;v+=(S>>>7|T<<9)&8191;var I=o[l+8]|o[l+9]<<8;C+=(T>>>4|I<<12)&8191,R+=I>>>1&8191;var E=o[l+10]|o[l+11]<<8;k+=(I>>>14|E<<2)&8191;var M=o[l+12]|o[l+13]<<8;P+=(E>>>11|M<<5)&8191;var A=o[l+14]|o[l+15]<<8;N+=(M>>>8|A<<8)&8191,$+=A>>>5|f;var B=0,ae=B;ae+=h*j,ae+=m*(5*p),ae+=b*(5*y),ae+=v*(5*x),ae+=C*(5*D),B=ae>>>13,ae&=8191,ae+=R*(5*te),ae+=k*(5*V),ae+=P*(5*L),ae+=N*(5*U),ae+=$*(5*G),B+=ae>>>13,ae&=8191;var W=B;W+=h*G,W+=m*j,W+=b*(5*p),W+=v*(5*y),W+=C*(5*x),B=W>>>13,W&=8191,W+=R*(5*D),W+=k*(5*te),W+=P*(5*V),W+=N*(5*L),W+=$*(5*U),B+=W>>>13,W&=8191;var Z=B;Z+=h*U,Z+=m*G,Z+=b*j,Z+=v*(5*p),Z+=C*(5*y),B=Z>>>13,Z&=8191,Z+=R*(5*x),Z+=k*(5*D),Z+=P*(5*te),Z+=N*(5*V),Z+=$*(5*L),B+=Z>>>13,Z&=8191;var K=B;K+=h*L,K+=m*U,K+=b*G,K+=v*j,K+=C*(5*p),B=K>>>13,K&=8191,K+=R*(5*y),K+=k*(5*x),K+=P*(5*D),K+=N*(5*te),K+=$*(5*V),B+=K>>>13,K&=8191;var ee=B;ee+=h*V,ee+=m*L,ee+=b*U,ee+=v*G,ee+=C*j,B=ee>>>13,ee&=8191,ee+=R*(5*p),ee+=k*(5*y),ee+=P*(5*x),ee+=N*(5*D),ee+=$*(5*te),B+=ee>>>13,ee&=8191;var re=B;re+=h*te,re+=m*V,re+=b*L,re+=v*U,re+=C*G,B=re>>>13,re&=8191,re+=R*j,re+=k*(5*p),re+=P*(5*y),re+=N*(5*x),re+=$*(5*D),B+=re>>>13,re&=8191;var H=B;H+=h*D,H+=m*te,H+=b*V,H+=v*L,H+=C*U,B=H>>>13,H&=8191,H+=R*G,H+=k*j,H+=P*(5*p),H+=N*(5*y),H+=$*(5*x),B+=H>>>13,H&=8191;var F=B;F+=h*x,F+=m*D,F+=b*te,F+=v*V,F+=C*L,B=F>>>13,F&=8191,F+=R*U,F+=k*G,F+=P*j,F+=N*(5*p),F+=$*(5*y),B+=F>>>13,F&=8191;var q=B;q+=h*y,q+=m*x,q+=b*D,q+=v*te,q+=C*V,B=q>>>13,q&=8191,q+=R*L,q+=k*U,q+=P*G,q+=N*j,q+=$*(5*p),B+=q>>>13,q&=8191;var fe=B;fe+=h*p,fe+=m*y,fe+=b*x,fe+=v*D,fe+=C*te,B=fe>>>13,fe&=8191,fe+=R*V,fe+=k*L,fe+=P*U,fe+=N*G,fe+=$*j,B+=fe>>>13,fe&=8191,B=(B<<2)+B|0,B=B+ae|0,ae=B&8191,B=B>>>13,W+=B,h=ae,m=W,b=Z,v=K,C=ee,R=re,k=H,P=F,N=q,$=fe,l+=16,u-=16}this._h[0]=h,this._h[1]=m,this._h[2]=b,this._h[3]=v,this._h[4]=C,this._h[5]=R,this._h[6]=k,this._h[7]=P,this._h[8]=N,this._h[9]=$},a.prototype.finish=function(o,l){l===void 0&&(l=0);var u=new Uint16Array(10),f,h,m,b;if(this._leftover){for(b=this._leftover,this._buffer[b++]=1;b<16;b++)this._buffer[b]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,b=2;b<10;b++)this._h[b]+=f,f=this._h[b]>>>13,this._h[b]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,u[0]=this._h[0]+5,f=u[0]>>>13,u[0]&=8191,b=1;b<10;b++)u[b]=this._h[b]+f,f=u[b]>>>13,u[b]&=8191;for(u[9]-=8192,h=(f^1)-1,b=0;b<10;b++)u[b]&=h;for(h=~h,b=0;b<10;b++)this._h[b]=this._h[b]&h|u[b];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,m=this._h[0]+this._pad[0],this._h[0]=m&65535,b=1;b<8;b++)m=(this._h[b]+this._pad[b]|0)+(m>>>16)|0,this._h[b]=m&65535;return o[l+0]=this._h[0]>>>0,o[l+1]=this._h[0]>>>8,o[l+2]=this._h[1]>>>0,o[l+3]=this._h[1]>>>8,o[l+4]=this._h[2]>>>0,o[l+5]=this._h[2]>>>8,o[l+6]=this._h[3]>>>0,o[l+7]=this._h[3]>>>8,o[l+8]=this._h[4]>>>0,o[l+9]=this._h[4]>>>8,o[l+10]=this._h[5]>>>0,o[l+11]=this._h[5]>>>8,o[l+12]=this._h[6]>>>0,o[l+13]=this._h[6]>>>8,o[l+14]=this._h[7]>>>0,o[l+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(o){var l=0,u=o.length,f;if(this._leftover){f=16-this._leftover,f>u&&(f=u);for(var h=0;h=16&&(f=u-u%16,this._blocks(o,l,f),l+=f,u-=f),u){for(var h=0;h16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var b=new Uint8Array(16);b.set(u,b.length-u.length);var v=new Uint8Array(32);e.stream(this._key,b,v,4);var C=f.length+this.tagLength,R;if(m){if(m.length!==C)throw new Error("ChaCha20Poly1305: incorrect destination length");R=m}else R=new Uint8Array(C);return e.streamXOR(this._key,b,f,R,4),this._authenticate(R.subarray(R.length-this.tagLength,R.length),v,R.subarray(0,R.length-this.tagLength),h),n.wipe(b),R},l.prototype.open=function(u,f,h,m){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&b.update(a.subarray(m.length%16))),b.update(h),h.length%16>0&&b.update(a.subarray(h.length%16));var v=new Uint8Array(8);m&&i.writeUint64LE(m.length,v),b.update(v),i.writeUint64LE(h.length,v),b.update(v);for(var C=b.digest(),R=0;Rthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},r.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n */var Use;function cn(){return Use||(Use=1,function(r,e){var t=Cc,n=t.Buffer;function i(a,o){for(var l in a)o[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(a,o,l){return n(a,o,l)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(a,o,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,o,l)},s.alloc=function(a,o,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return o!==void 0?typeof l=="string"?u.fill(o,l):u.fill(o):u.fill(0),u},s.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},s.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(a)}}(_I,_I.exports)),_I.exports}var Fse;function ey(){if(Fse)return xI.exports;Fse=1;var r=65536,e=4294967295;function t(){throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`)}var n=cn().Buffer,i=ut.crypto||ut.msCrypto;i&&i.getRandomValues?xI.exports=s:xI.exports=t;function s(a,o){if(a>e)throw new RangeError("requested too many random bytes");var l=n.allocUnsafe(a);if(a>0)if(a>r)for(var u=0;u"u"||!C?r:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":b&&C?C([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&C?C(C([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!C?r:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":n,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!C?r:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&C?C(""[Symbol.iterator]()):r,"%Symbol%":b?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":k,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":o,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(C)try{null.error}catch(S){var N=C(C(S));P["%Error.prototype%"]=N}var $=function S(T){var I;if(T==="%AsyncFunction%")I=u("async function () {}");else if(T==="%GeneratorFunction%")I=u("function* () {}");else if(T==="%AsyncGeneratorFunction%")I=u("async function* () {}");else if(T==="%AsyncGenerator%"){var E=S("%AsyncGeneratorFunction%");E&&(I=E.prototype)}else if(T==="%AsyncIteratorPrototype%"){var M=S("%AsyncGenerator%");M&&C&&(I=C(M.prototype))}return P[T]=I,I},j={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G=ZD(),U=PUe(),L=G.call(Function.call,Array.prototype.concat),V=G.call(Function.apply,Array.prototype.splice),te=G.call(Function.call,String.prototype.replace),D=G.call(Function.call,String.prototype.slice),x=G.call(Function.call,RegExp.prototype.exec),y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,p=/\\(\\)?/g,g=function(T){var I=D(T,0,1),E=D(T,-1);if(I==="%"&&E!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(E==="%"&&I!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var M=[];return te(T,y,function(A,B,ae,W){M[M.length]=ae?te(W,p,"$1"):B||A}),M},_=function(T,I){var E=T,M;if(U(j,E)&&(M=j[E],E="%"+M[0]+"%"),U(P,E)){var A=P[E];if(A===R&&(A=$(E)),typeof A>"u"&&!I)throw new a("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:M,name:E,value:A}}throw new s("intrinsic "+T+" does not exist!")};return YD=function(T,I){if(typeof T!="string"||T.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new a('"allowMissing" argument must be a boolean');if(x(/^%?[^%]*%?$/,T)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var E=g(T),M=E.length>0?E[0]:"",A=_("%"+M+"%",I),B=A.name,ae=A.value,W=!1,Z=A.alias;Z&&(M=Z[0],V(E,L([0,1],Z)));for(var K=1,ee=!0;K=E.length){var q=f(ae,re);ee=!!q,ee&&"get"in q&&!("originalValue"in q.get)?ae=q.get:ae=ae[re]}else ee=U(ae,re),ae=ae[re];ee&&!W&&(P[B]=ae)}}return ae},YD}var QD={exports:{}},XD,oae;function e$(){if(oae)return XD;oae=1;var r=Z8(),e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return XD=e,XD}var t$,cae;function r$(){if(cae)return t$;cae=1;var r=Z8(),e=r("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return t$=e,t$}var n$,lae;function OUe(){if(lae)return n$;lae=1;var r=e$(),e=Qse(),t=AI(),n=r$();return n$=function(s,a,o){if(!s||typeof s!="object"&&typeof s!="function")throw new t("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,m=!!n&&n(s,a);if(r)r(s,a,{configurable:f===null&&m?m.configurable:!f,enumerable:l===null&&m?m.enumerable:!l,value:o,writable:u===null&&m?m.writable:!u});else if(h||!l&&!u&&!f)s[a]=o;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},n$}var i$,uae;function NUe(){if(uae)return i$;uae=1;var r=e$(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},i$=e,i$}var s$,fae;function DUe(){if(fae)return s$;fae=1;var r=Z8(),e=OUe(),t=NUe()(),n=r$(),i=AI(),s=r("%Math.floor%");return s$=function(o,l){if(typeof o!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],f=!0,h=!0;if("length"in o&&n){var m=n(o,"length");m&&!m.configurable&&(f=!1),m&&!m.writable&&(h=!1)}return(f||h||!u)&&(t?e(o,"length",l,!0,!0):e(o,"length",l)),o},s$}var dae;function hae(){return dae||(dae=1,function(r){var e=ZD(),t=Z8(),n=DUe(),i=AI(),s=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,s),l=e$(),u=t("%Math.max%");r.exports=function(m){if(typeof m!="function")throw new i("a function is required");var b=o(e,a,arguments);return n(b,1+u(0,m.length-(arguments.length-1)),!0)};var f=function(){return o(e,s,arguments)};l?l(r.exports,"apply",{value:f}):r.exports.apply=f}(QD)),QD.exports}var a$,pae;function mae(){if(pae)return a$;pae=1;var r=Z8(),e=hae(),t=e(r("String.prototype.indexOf"));return a$=function(i,s){var a=r(i,!!s);return typeof a=="function"&&t(i,".prototype.")>-1?e(a):a},a$}var o$,gae;function $Ue(){if(gae)return o$;gae=1;var r=BD()(),e=mae(),t=e("Object.prototype.toString"),n=function(o){return r&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:t(o)==="[object Arguments]"},i=function(o){return n(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&t(o)!=="[object Array]"&&t(o.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,o$=s?n:i,o$}var c$,bae;function BUe(){if(bae)return c$;bae=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=BD()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return c$=function(l){if(typeof l!="function")return!1;if(t.test(e.call(l)))return!0;if(!n){var u=r.call(l);return u==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=s();a=f?i(f):!1}return i(l)===a},c$}var l$,vae;function LUe(){if(vae)return l$;vae=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(P){P!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(N){try{var $=r.call(N);return i.test($)}catch{return!1}},a=function(N){try{return s(N)?!1:(r.call(N),!0)}catch{return!1}},o=Object.prototype.toString,l="[object Object]",u="[object Function]",f="[object GeneratorFunction]",h="[object HTMLAllCollection]",m="[object HTML document.all class]",b="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,C=!(0 in[,]),R=function(){return!1};if(typeof document=="object"){var k=document.all;o.call(k)===o.call(document.all)&&(R=function(N){if((C||!N)&&(typeof N>"u"||typeof N=="object"))try{var $=o.call(N);return($===h||$===m||$===b||$===l)&&N("")==null}catch{}return!1})}return l$=e?function(N){if(R(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;try{e(N,null,t)}catch($){if($!==n)return!1}return!s(N)&&a(N)}:function(N){if(R(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;if(v)return a(N);if(s(N))return!1;var $=o.call(N);return $!==u&&$!==f&&!/^\[object HTML/.test($)?!1:a(N)},l$}var u$,wae;function UUe(){if(wae)return u$;wae=1;var r=LUe(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(l,u,f){for(var h=0,m=l.length;h=3&&(h=f),e.call(l)==="[object Array]"?n(l,u,h):typeof l=="string"?i(l,u,h):s(l,u,h)};return u$=a,u$}var f$,yae;function FUe(){return yae||(yae=1,f$=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),f$}var d$,xae;function jUe(){if(xae)return d$;xae=1;var r=FUe(),e=typeof globalThis>"u"?ut:globalThis;return d$=function(){for(var n=[],i=0;i"u"?ut:globalThis,l=e(),u=n("String.prototype.slice"),f=Object.getPrototypeOf,h=n("Array.prototype.indexOf",!0)||function(R,k){for(var P=0;P-1?k:k!=="Object"?!1:v(R)}return i?b(R):null},h$}var p$,Cae;function zUe(){if(Cae)return p$;Cae=1;var r=Eae();return p$=function(t){return!!r(t)},p$}var Aae;function HUe(){return Aae||(Aae=1,function(r){var e=$Ue(),t=BUe(),n=Eae(),i=zUe();function s(Re){return Re.call.bind(Re)}var a=typeof BigInt<"u",o=typeof Symbol<"u",l=s(Object.prototype.toString),u=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(a)var m=s(BigInt.prototype.valueOf);if(o)var b=s(Symbol.prototype.valueOf);function v(Re,Qe){if(typeof Re!="object")return!1;try{return Qe(Re),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function C(Re){return typeof Promise<"u"&&Re instanceof Promise||Re!==null&&typeof Re=="object"&&typeof Re.then=="function"&&typeof Re.catch=="function"}r.isPromise=C;function R(Re){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Re):i(Re)||B(Re)}r.isArrayBufferView=R;function k(Re){return n(Re)==="Uint8Array"}r.isUint8Array=k;function P(Re){return n(Re)==="Uint8ClampedArray"}r.isUint8ClampedArray=P;function N(Re){return n(Re)==="Uint16Array"}r.isUint16Array=N;function $(Re){return n(Re)==="Uint32Array"}r.isUint32Array=$;function j(Re){return n(Re)==="Int8Array"}r.isInt8Array=j;function G(Re){return n(Re)==="Int16Array"}r.isInt16Array=G;function U(Re){return n(Re)==="Int32Array"}r.isInt32Array=U;function L(Re){return n(Re)==="Float32Array"}r.isFloat32Array=L;function V(Re){return n(Re)==="Float64Array"}r.isFloat64Array=V;function te(Re){return n(Re)==="BigInt64Array"}r.isBigInt64Array=te;function D(Re){return n(Re)==="BigUint64Array"}r.isBigUint64Array=D;function x(Re){return l(Re)==="[object Map]"}x.working=typeof Map<"u"&&x(new Map);function y(Re){return typeof Map>"u"?!1:x.working?x(Re):Re instanceof Map}r.isMap=y;function p(Re){return l(Re)==="[object Set]"}p.working=typeof Set<"u"&&p(new Set);function g(Re){return typeof Set>"u"?!1:p.working?p(Re):Re instanceof Set}r.isSet=g;function _(Re){return l(Re)==="[object WeakMap]"}_.working=typeof WeakMap<"u"&&_(new WeakMap);function S(Re){return typeof WeakMap>"u"?!1:_.working?_(Re):Re instanceof WeakMap}r.isWeakMap=S;function T(Re){return l(Re)==="[object WeakSet]"}T.working=typeof WeakSet<"u"&&T(new WeakSet);function I(Re){return T(Re)}r.isWeakSet=I;function E(Re){return l(Re)==="[object ArrayBuffer]"}E.working=typeof ArrayBuffer<"u"&&E(new ArrayBuffer);function M(Re){return typeof ArrayBuffer>"u"?!1:E.working?E(Re):Re instanceof ArrayBuffer}r.isArrayBuffer=M;function A(Re){return l(Re)==="[object DataView]"}A.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&A(new DataView(new ArrayBuffer(1),0,1));function B(Re){return typeof DataView>"u"?!1:A.working?A(Re):Re instanceof DataView}r.isDataView=B;var ae=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function W(Re){return l(Re)==="[object SharedArrayBuffer]"}function Z(Re){return typeof ae>"u"?!1:(typeof W.working>"u"&&(W.working=W(new ae)),W.working?W(Re):Re instanceof ae)}r.isSharedArrayBuffer=Z;function K(Re){return l(Re)==="[object AsyncFunction]"}r.isAsyncFunction=K;function ee(Re){return l(Re)==="[object Map Iterator]"}r.isMapIterator=ee;function re(Re){return l(Re)==="[object Set Iterator]"}r.isSetIterator=re;function H(Re){return l(Re)==="[object Generator]"}r.isGeneratorObject=H;function F(Re){return l(Re)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=F;function q(Re){return v(Re,u)}r.isNumberObject=q;function fe(Re){return v(Re,f)}r.isStringObject=fe;function pe(Re){return v(Re,h)}r.isBooleanObject=pe;function Ee(Re){return a&&v(Re,m)}r.isBigIntObject=Ee;function Me(Re){return o&&v(Re,b)}r.isSymbolObject=Me;function Oe(Re){return q(Re)||fe(Re)||pe(Re)||Ee(Re)||Me(Re)}r.isBoxedPrimitive=Oe;function je(Re){return typeof Uint8Array<"u"&&(M(Re)||Z(Re))}r.isAnyArrayBuffer=je,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Re){Object.defineProperty(r,Re,{enumerable:!1,value:function(){throw new Error(Re+" is not supported in userland")}})})}(ND)),ND}var m$,Sae;function qUe(){return Sae||(Sae=1,m$=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),m$}var Iae;function SI(){return Iae||(Iae=1,function(r){var e=Object.getOwnPropertyDescriptors||function(B){for(var ae=Object.keys(B),W={},Z=0;Z=Z)return re;switch(re){case"%s":return String(W[ae++]);case"%d":return Number(W[ae++]);case"%j":try{return JSON.stringify(W[ae++])}catch{return"[Circular]"}default:return re}}),ee=W[ae];ae"u")return function(){return r.deprecate(A,B).apply(this,arguments)};var ae=!1;function W(){if(!ae){if(vt.throwDeprecation)throw new Error(B);vt.traceDeprecation?console.trace(B):console.error(B),ae=!0}return A.apply(this,arguments)}return W};var n={},i=/^$/;if(vt.env.NODE_DEBUG){var s=vt.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(A){if(A=A.toUpperCase(),!n[A])if(i.test(A)){var B=vt.pid;n[A]=function(){var ae=r.format.apply(r,arguments);console.error("%s %d: %s",A,B,ae)}}else n[A]=function(){};return n[A]};function a(A,B){var ae={seen:[],stylize:l};return arguments.length>=3&&(ae.depth=arguments[2]),arguments.length>=4&&(ae.colors=arguments[3]),k(B)?ae.showHidden=B:B&&r._extend(ae,B),U(ae.showHidden)&&(ae.showHidden=!1),U(ae.depth)&&(ae.depth=2),U(ae.colors)&&(ae.colors=!1),U(ae.customInspect)&&(ae.customInspect=!0),ae.colors&&(ae.stylize=o),f(ae,A,ae.depth)}r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(A,B){var ae=a.styles[B];return ae?"\x1B["+a.colors[ae][0]+"m"+A+"\x1B["+a.colors[ae][1]+"m":A}function l(A,B){return A}function u(A){var B={};return A.forEach(function(ae,W){B[ae]=!0}),B}function f(A,B,ae){if(A.customInspect&&B&&x(B.inspect)&&B.inspect!==r.inspect&&!(B.constructor&&B.constructor.prototype===B)){var W=B.inspect(ae,A);return j(W)||(W=f(A,W,ae)),W}var Z=h(A,B);if(Z)return Z;var K=Object.keys(B),ee=u(K);if(A.showHidden&&(K=Object.getOwnPropertyNames(B)),D(B)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return m(B);if(K.length===0){if(x(B)){var re=B.name?": "+B.name:"";return A.stylize("[Function"+re+"]","special")}if(L(B))return A.stylize(RegExp.prototype.toString.call(B),"regexp");if(te(B))return A.stylize(Date.prototype.toString.call(B),"date");if(D(B))return m(B)}var H="",F=!1,q=["{","}"];if(R(B)&&(F=!0,q=["[","]"]),x(B)){var fe=B.name?": "+B.name:"";H=" [Function"+fe+"]"}if(L(B)&&(H=" "+RegExp.prototype.toString.call(B)),te(B)&&(H=" "+Date.prototype.toUTCString.call(B)),D(B)&&(H=" "+m(B)),K.length===0&&(!F||B.length==0))return q[0]+H+q[1];if(ae<0)return L(B)?A.stylize(RegExp.prototype.toString.call(B),"regexp"):A.stylize("[Object]","special");A.seen.push(B);var pe;return F?pe=b(A,B,ae,ee,K):pe=K.map(function(Ee){return v(A,B,ae,ee,Ee,F)}),A.seen.pop(),C(pe,H,q)}function h(A,B){if(U(B))return A.stylize("undefined","undefined");if(j(B)){var ae="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(ae,"string")}if($(B))return A.stylize(""+B,"number");if(k(B))return A.stylize(""+B,"boolean");if(P(B))return A.stylize("null","null")}function m(A){return"["+Error.prototype.toString.call(A)+"]"}function b(A,B,ae,W,Z){for(var K=[],ee=0,re=B.length;ee-1&&(K?re=re.split(` -`).map(function(U){return" "+U}).join(` +`).map(function(F){return" "+F}).join(` `).slice(2):re=` `+re.split(` -`).map(function(U){return" "+U}).join(` -`))):re=_.stylize("[Circular]","special")),$(te)){if(K&&Y.match(/^\d+$/))return re;te=JSON.stringify(""+Y),te.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(te=te.slice(1,-1),te=_.stylize(te,"name")):(te=te.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),te=_.stylize(te,"string"))}return te+": "+re}function C(_,L,ie){var q=_.reduce(function(Y,K){return K.indexOf(` -`)>=0,Y+K.replace(/\u001b\[\d\d?m/g,"").length+1},0);return q>60?ie[0]+(L===""?"":L+` - `)+" "+_.join(`, - `)+" "+ie[1]:ie[0]+L+" "+_.join(", ")+" "+ie[1]}r.types=rTe();function T(_){return Array.isArray(_)}r.isArray=T;function k(_){return typeof _=="boolean"}r.isBoolean=k;function N(_){return _===null}r.isNull=N;function O(_){return _==null}r.isNullOrUndefined=O;function B(_){return typeof _=="number"}r.isNumber=B;function z(_){return typeof _=="string"}r.isString=z;function G(_){return typeof _=="symbol"}r.isSymbol=G;function $(_){return _===void 0}r.isUndefined=$;function D(_){return V(_)&&d(_)==="[object RegExp]"}r.isRegExp=D,r.types.isRegExp=D;function V(_){return typeof _=="object"&&_!==null}r.isObject=V;function Q(_){return V(_)&&d(_)==="[object Date]"}r.isDate=Q,r.types.isDate=Q;function F(_){return V(_)&&(d(_)==="[object Error]"||_ instanceof Error)}r.isError=F,r.types.isNativeError=F;function M(_){return typeof _=="function"}r.isFunction=M;function b(_){return _===null||typeof _=="boolean"||typeof _=="number"||typeof _=="string"||typeof _=="symbol"||typeof _>"u"}r.isPrimitive=b,r.isBuffer=nTe();function d(_){return Object.prototype.toString.call(_)}function m(_){return _<10?"0"+_.toString(10):_.toString(10)}var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var _=new Date,L=[m(_.getHours()),m(_.getMinutes()),m(_.getSeconds())].join(":");return[_.getDate(),x[_.getMonth()],L].join(" ")}r.log=function(){console.log("%s - %s",A(),r.format.apply(r,arguments))},r.inherits=tn(),r._extend=function(_,L){if(!L||!V(L))return _;for(var ie=Object.keys(L),q=ie.length;q--;)_[ie[q]]=L[ie[q]];return _};function I(_,L){return Object.prototype.hasOwnProperty.call(_,L)}var R=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(L){if(typeof L!="function")throw new TypeError('The "original" argument must be of type Function');if(R&&L[R]){var ie=L[R];if(typeof ie!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ie,R,{value:ie,enumerable:!1,writable:!1,configurable:!0}),ie}function ie(){for(var q,Y,K=new Promise(function(H,U){q=H,Y=U}),te=[],re=0;re0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(T){var k={data:T,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var k=this.head,N=""+k.data;k=k.next;)N+=T+k.data;return N}},{key:"concat",value:function(T){if(this.length===0)return u.alloc(0);for(var k=u.allocUnsafe(T>>>0),N=this.head,O=0;N;)w(N.data,k,O),O+=N.data.length,N=N.next;return k}},{key:"consume",value:function(T,k){var N;return TB.length?B.length:T;if(z===B.length?O+=B:O+=B.slice(0,T),T-=z,T===0){z===B.length?(++N,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=B.slice(z));break}++N}return this.length-=N,O}},{key:"_getBuffer",value:function(T){var k=u.allocUnsafe(T),N=this.head,O=1;for(N.data.copy(k),T-=N.data.length;N=N.next;){var B=N.data,z=T>B.length?B.length:T;if(B.copy(k,k.length-T,0,z),T-=z,T===0){z===B.length?(++O,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=B.slice(z));break}++O}return this.length-=O,k}},{key:g,value:function(T,k){return p(this,e(e({},k),{},{depth:0,customInspect:!1}))}}]),y}(),lO}var uO,nne;function ine(){if(nne)return uO;nne=1;function r(o,a){var l=this,u=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return u||h?(a?a(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,yt.nextTick(i,this,o)):yt.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(p){!a&&p?l._writableState?l._writableState.errorEmitted?yt.nextTick(t,l):(l._writableState.errorEmitted=!0,yt.nextTick(e,l,p)):yt.nextTick(e,l,p):a?(yt.nextTick(t,l),a(p)):yt.nextTick(t,l)}),this)}function e(o,a){i(o,a),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,a){o.emit("error",a)}function s(o,a){var l=o._readableState,u=o._writableState;l&&l.autoDestroy||u&&u.autoDestroy?o.destroy(a):o.emit("error",a)}return uO={destroy:r,undestroy:n,errorOrDestroy:s},uO}var hO={},sne;function ey(){if(sne)return hO;sne=1;function r(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,a.__proto__=l}var e={};function t(a,l,u){u||(u=Error);function h(g,w,y){return typeof l=="string"?l:l(g,w,y)}var p=function(g){r(w,g);function w(y,C,T){return g.call(this,h(y,C,T))||this}return w}(u);p.prototype.name=u.name,p.prototype.code=a,e[a]=p}function n(a,l){if(Array.isArray(a)){var u=a.length;return a=a.map(function(h){return String(h)}),u>2?"one of ".concat(l," ").concat(a.slice(0,u-1).join(", "),", or ")+a[u-1]:u===2?"one of ".concat(l," ").concat(a[0]," or ").concat(a[1]):"of ".concat(l," ").concat(a[0])}else return"of ".concat(l," ").concat(String(a))}function i(a,l,u){return a.substr(!u||u<0?0:+u,l.length)===l}function s(a,l,u){return(u===void 0||u>a.length)&&(u=a.length),a.substring(u-l.length,u)===l}function o(a,l,u){return typeof u!="number"&&(u=0),u+l.length>a.length?!1:a.indexOf(l,u)!==-1}return t("ERR_INVALID_OPT_VALUE",function(a,l){return'The value "'+l+'" is invalid for option "'+a+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(a,l,u){var h;typeof l=="string"&&i(l,"not ")?(h="must not be",l=l.replace(/^not /,"")):h="must be";var p;if(s(a," argument"))p="The ".concat(a," ").concat(h," ").concat(n(l,"type"));else{var g=o(a,".")?"property":"argument";p='The "'.concat(a,'" ').concat(g," ").concat(h," ").concat(n(l,"type"))}return p+=". Received type ".concat(typeof u),p},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),hO.codes=e,hO}var fO,one;function ane(){if(one)return fO;one=1;var r=ey().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,o){var a=e(i,o,s);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var l=o?s:"highWaterMark";throw new r(l,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return fO={getHighWaterMark:t},fO}var dO,cne;function sTe(){if(cne)return dO;cne=1,dO=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!ct.localStorage)return!1}catch{return!1}var n=ct.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return dO}var pO,lne;function gO(){if(lne)return pO;lne=1,pO=D;function r(Y){var K=this;this.next=null,this.entry=null,this.finish=function(){q(K,Y)}}var e;D.WritableState=G;var t={deprecate:sTe()},n=bre(),i=qc.Buffer,s=(typeof ct<"u"?ct:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Y){return i.from(Y)}function a(Y){return i.isBuffer(Y)||Y instanceof s}var l=ine(),u=ane(),h=u.getHighWaterMark,p=ey().codes,g=p.ERR_INVALID_ARG_TYPE,w=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,C=p.ERR_STREAM_CANNOT_PIPE,T=p.ERR_STREAM_DESTROYED,k=p.ERR_STREAM_NULL_VALUES,N=p.ERR_STREAM_WRITE_AFTER_END,O=p.ERR_UNKNOWN_ENCODING,B=l.errorOrDestroy;tn()(D,n);function z(){}function G(Y,K,te){e=e||Cm(),Y=Y||{},typeof te!="boolean"&&(te=K instanceof e),this.objectMode=!!Y.objectMode,te&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=h(this,Y,"writableHighWaterMark",te),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var re=Y.decodeStrings===!1;this.decodeStrings=!re,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){x(K,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var K=this.bufferedRequest,te=[];K;)te.push(K),K=K.next;return te},function(){try{Object.defineProperty(G.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var $;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(K){return $.call(this,K)?!0:this!==D?!1:K&&K._writableState instanceof G}})):$=function(K){return K instanceof this};function D(Y){e=e||Cm();var K=this instanceof e;if(!K&&!$.call(D,this))return new D(Y);this._writableState=new G(Y,this,K),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),n.call(this)}D.prototype.pipe=function(){B(this,new C)};function V(Y,K){var te=new N;B(Y,te),yt.nextTick(K,te)}function Q(Y,K,te,re){var H;return te===null?H=new k:typeof te!="string"&&!K.objectMode&&(H=new g("chunk",["string","Buffer"],te)),H?(B(Y,H),yt.nextTick(re,H),!1):!0}D.prototype.write=function(Y,K,te){var re=this._writableState,H=!1,U=!re.objectMode&&a(Y);return U&&!i.isBuffer(Y)&&(Y=o(Y)),typeof K=="function"&&(te=K,K=null),U?K="buffer":K||(K=re.defaultEncoding),typeof te!="function"&&(te=z),re.ending?V(this,te):(U||Q(this,re,Y,te))&&(re.pendingcb++,H=M(this,re,U,Y,K,te)),H},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&R(this,Y))},D.prototype.setDefaultEncoding=function(K){if(typeof K=="string"&&(K=K.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((K+"").toLowerCase())>-1))throw new O(K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(Y,K,te){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof K=="string"&&(K=i.from(K,te)),K}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(Y,K,te,re,H,U){if(!te){var W=F(K,re,H);re!==W&&(te=!0,H="buffer",re=W)}var le=K.objectMode?1:re.length;K.length+=le;var de=K.length>5===6?2:k>>4===14?3:k>>3===30?4:k>>6===2?-1:-2}function o(k,N,O){var B=N.length-1;if(B=0?(z>0&&(k.lastNeed=z-1),z):--B=0?(z>0&&(k.lastNeed=z-2),z):--B=0?(z>0&&(z===2?z=0:k.lastNeed=z-3),z):0))}function a(k,N,O){if((N[0]&192)!==128)return k.lastNeed=0,"�";if(k.lastNeed>1&&N.length>1){if((N[1]&192)!==128)return k.lastNeed=1,"�";if(k.lastNeed>2&&N.length>2&&(N[2]&192)!==128)return k.lastNeed=2,"�"}}function l(k){var N=this.lastTotal-this.lastNeed,O=a(this,k);if(O!==void 0)return O;if(this.lastNeed<=k.length)return k.copy(this.lastChar,N,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,N,0,k.length),this.lastNeed-=k.length}function u(k,N){var O=o(this,k,N);if(!this.lastNeed)return k.toString("utf8",N);this.lastTotal=O;var B=k.length-(O-this.lastNeed);return k.copy(this.lastChar,0,B),k.toString("utf8",N,B)}function h(k){var N=k&&k.length?this.write(k):"";return this.lastNeed?N+"�":N}function p(k,N){if((k.length-N)%2===0){var O=k.toString("utf16le",N);if(O){var B=O.charCodeAt(O.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],O.slice(0,-1)}return O}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",N,k.length-1)}function g(k){var N=k&&k.length?this.write(k):"";if(this.lastNeed){var O=this.lastTotal-this.lastNeed;return N+this.lastChar.toString("utf16le",0,O)}return N}function w(k,N){var O=(k.length-N)%3;return O===0?k.toString("base64",N):(this.lastNeed=3-O,this.lastTotal=3,O===1?this.lastChar[0]=k[k.length-1]:(this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1]),k.toString("base64",N,k.length-O))}function y(k){var N=k&&k.length?this.write(k):"";return this.lastNeed?N+this.lastChar.toString("base64",0,3-this.lastNeed):N}function C(k){return k.toString(this.encoding)}function T(k){return k&&k.length?this.write(k):""}return bO}var wO,fne;function YC(){if(fne)return wO;fne=1;var r=ey().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var o=!1;return function(){if(!o){o=!0;for(var a=arguments.length,l=new Array(a),u=0;u0)if(typeof W!="string"&&!Me.objectMode&&Object.getPrototypeOf(W)!==n.prototype&&(W=s(W)),de)Me.endEmitted?z(U,new k):F(U,Me,W,!0);else if(Me.ended)z(U,new C);else{if(Me.destroyed)return!1;Me.reading=!1,Me.decoder&&!le?(W=Me.decoder.write(W),Me.objectMode||W.length!==0?F(U,Me,W,!1):R(U,Me)):F(U,Me,W,!1)}else de||(Me.reading=!1,R(U,Me))}return!Me.ended&&(Me.length=b?U=b:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}function m(U,W){return U<=0||W.length===0&&W.ended?0:W.objectMode?1:U!==U?W.flowing&&W.length?W.buffer.head.data.length:W.length:(U>W.highWaterMark&&(W.highWaterMark=d(U)),U<=W.length?U:W.ended?W.length:(W.needReadable=!0,0))}V.prototype.read=function(U){l("read",U),U=parseInt(U,10);var W=this._readableState,le=U;if(U!==0&&(W.emittedReadable=!1),U===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return l("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?te(this):A(this),null;if(U=m(U,W),U===0&&W.ended)return W.length===0&&te(this),null;var de=W.needReadable;l("need readable",de),(W.length===0||W.length-U0?Se=K(U,W):Se=null,Se===null?(W.needReadable=W.length<=W.highWaterMark,U=0):(W.length-=U,W.awaitDrain=0),W.length===0&&(W.ended||(W.needReadable=!0),le!==U&&W.ended&&te(this)),Se!==null&&this.emit("data",Se),Se};function x(U,W){if(l("onEofChunk"),!W.ended){if(W.decoder){var le=W.decoder.end();le&&le.length&&(W.buffer.push(le),W.length+=W.objectMode?1:le.length)}W.ended=!0,W.sync?A(U):(W.needReadable=!1,W.emittedReadable||(W.emittedReadable=!0,I(U)))}}function A(U){var W=U._readableState;l("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(l("emitReadable",W.flowing),W.emittedReadable=!0,yt.nextTick(I,U))}function I(U){var W=U._readableState;l("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&(W.length||W.ended)&&(U.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,Y(U)}function R(U,W){W.readingMore||(W.readingMore=!0,yt.nextTick(S,U,W))}function S(U,W){for(;!W.reading&&!W.ended&&(W.length1&&H(de.pipes,U)!==-1)&&!je&&(l("false write response, pause",de.awaitDrain),de.awaitDrain++),le.pause())}function ze(Be){l("onerror",Be),He(),U.removeListener("error",ze),e(U,"error")===0&&z(U,Be)}$(U,"error",ze);function qe(){U.removeListener("finish",Ve),He()}U.once("close",qe);function Ve(){l("onfinish"),U.removeListener("close",qe),He()}U.once("finish",Ve);function He(){l("unpipe"),le.unpipe(U)}return U.emit("pipe",le),de.flowing||(l("pipe resume"),le.resume()),U};function E(U){return function(){var le=U._readableState;l("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&e(U,"data")&&(le.flowing=!0,Y(U))}}V.prototype.unpipe=function(U){var W=this._readableState,le={hasUnpiped:!1};if(W.pipesCount===0)return this;if(W.pipesCount===1)return U&&U!==W.pipes?this:(U||(U=W.pipes),W.pipes=null,W.pipesCount=0,W.flowing=!1,U&&U.emit("unpipe",this,le),this);if(!U){var de=W.pipes,Se=W.pipesCount;W.pipes=null,W.pipesCount=0,W.flowing=!1;for(var Me=0;Me0,de.flowing!==!1&&this.resume()):U==="readable"&&!de.endEmitted&&!de.readableListening&&(de.readableListening=de.needReadable=!0,de.flowing=!1,de.emittedReadable=!1,l("on readable",de.length,de.reading),de.length?A(this):de.reading||yt.nextTick(L,this)),le},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(U,W){var le=t.prototype.removeListener.call(this,U,W);return U==="readable"&&yt.nextTick(_,this),le},V.prototype.removeAllListeners=function(U){var W=t.prototype.removeAllListeners.apply(this,arguments);return(U==="readable"||U===void 0)&&yt.nextTick(_,this),W};function _(U){var W=U._readableState;W.readableListening=U.listenerCount("readable")>0,W.resumeScheduled&&!W.paused?W.flowing=!0:U.listenerCount("data")>0&&U.resume()}function L(U){l("readable nexttick read 0"),U.read(0)}V.prototype.resume=function(){var U=this._readableState;return U.flowing||(l("resume"),U.flowing=!U.readableListening,ie(this,U)),U.paused=!1,this};function ie(U,W){W.resumeScheduled||(W.resumeScheduled=!0,yt.nextTick(q,U,W))}function q(U,W){l("resume",W.reading),W.reading||U.read(0),W.resumeScheduled=!1,U.emit("resume"),Y(U),W.flowing&&!W.reading&&U.read(0)}V.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(U){var W=U._readableState;for(l("flow",W.flowing);W.flowing&&U.read()!==null;);}V.prototype.wrap=function(U){var W=this,le=this._readableState,de=!1;U.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var ke=le.decoder.end();ke&&ke.length&&W.push(ke)}W.push(null)}),U.on("data",function(ke){if(l("wrapped data"),le.decoder&&(ke=le.decoder.write(ke)),!(le.objectMode&&ke==null)&&!(!le.objectMode&&(!ke||!ke.length))){var Ke=W.push(ke);Ke||(de=!0,U.pause())}});for(var Se in U)this[Se]===void 0&&typeof U[Se]=="function"&&(this[Se]=function(Ke){return function(){return U[Ke].apply(U,arguments)}}(Se));for(var Me=0;Me=W.length?(W.decoder?le=W.buffer.join(""):W.buffer.length===1?le=W.buffer.first():le=W.buffer.concat(W.length),W.buffer.clear()):le=W.buffer.consume(U,W.decoder),le}function te(U){var W=U._readableState;l("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,yt.nextTick(re,W,U))}function re(U,W){if(l("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,W.readable=!1,W.emit("end"),U.autoDestroy)){var le=W._writableState;(!le||le.autoDestroy&&le.finished)&&W.destroy()}}typeof Symbol=="function"&&(V.from=function(U,W){return B===void 0&&(B=aTe()),B(V,U,W)});function H(U,W){for(var le=0,de=U.length;le0;return a(N,B,z,function(G){T||(T=G),G&&k.forEach(l),!B&&(k.forEach(l),C(T))})});return w.reduce(u)}return SO=p,SO}var xne;function _ne(){return xne||(xne=1,function(r,e){e=r.exports=_O(),e.Stream=e,e.Readable=e,e.Writable=gO(),e.Duplex=Cm(),e.Transform=AO(),e.PassThrough=wne(),e.finished=YC(),e.pipeline=yne()}(DIe,S6)),S6}var IO,Ene;function Ane(){if(Ene)return IO;Ene=1;var r=sn().Buffer,e=_ne().Transform,t=tn();function n(s,o){if(!r.isBuffer(s)&&typeof s!="string")throw new TypeError(o+" must be a string or a buffer")}function i(s){e.call(this),this._block=r.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return t(i,e),i.prototype._transform=function(s,o,a){var l=null;try{this.update(s,o)}catch(u){l=u}a(l)},i.prototype._flush=function(s){var o=null;try{this.push(this.digest())}catch(a){o=a}s(o)},i.prototype.update=function(s,o){if(n(s,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(s)||(s=r.from(s,o));for(var a=this._block,l=0;this._blockOffset+s.length-l>=this._blockSize;){for(var u=this._blockOffset;u0;++h)this._length[h]+=p,p=this._length[h]/4294967296|0,p>0&&(this._length[h]-=4294967296*p);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var o=this._digest();s!==void 0&&(o=o.toString(s)),this._block.fill(0),this._blockOffset=0;for(var a=0;a<4;++a)this._length[a]=0;return o},i.prototype._digest=function(){throw new Error("_digest is not implemented")},IO=i,IO}var TO,Cne;function RO(){if(Cne)return TO;Cne=1;var r=tn(),e=Ane(),t=sn().Buffer,n=new Array(16);function i(){e.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}r(i,e),i.prototype._update=function(){for(var h=n,p=0;p<16;++p)h[p]=this._block.readInt32LE(p*4);var g=this._a,w=this._b,y=this._c,C=this._d;g=o(g,w,y,C,h[0],3614090360,7),C=o(C,g,w,y,h[1],3905402710,12),y=o(y,C,g,w,h[2],606105819,17),w=o(w,y,C,g,h[3],3250441966,22),g=o(g,w,y,C,h[4],4118548399,7),C=o(C,g,w,y,h[5],1200080426,12),y=o(y,C,g,w,h[6],2821735955,17),w=o(w,y,C,g,h[7],4249261313,22),g=o(g,w,y,C,h[8],1770035416,7),C=o(C,g,w,y,h[9],2336552879,12),y=o(y,C,g,w,h[10],4294925233,17),w=o(w,y,C,g,h[11],2304563134,22),g=o(g,w,y,C,h[12],1804603682,7),C=o(C,g,w,y,h[13],4254626195,12),y=o(y,C,g,w,h[14],2792965006,17),w=o(w,y,C,g,h[15],1236535329,22),g=a(g,w,y,C,h[1],4129170786,5),C=a(C,g,w,y,h[6],3225465664,9),y=a(y,C,g,w,h[11],643717713,14),w=a(w,y,C,g,h[0],3921069994,20),g=a(g,w,y,C,h[5],3593408605,5),C=a(C,g,w,y,h[10],38016083,9),y=a(y,C,g,w,h[15],3634488961,14),w=a(w,y,C,g,h[4],3889429448,20),g=a(g,w,y,C,h[9],568446438,5),C=a(C,g,w,y,h[14],3275163606,9),y=a(y,C,g,w,h[3],4107603335,14),w=a(w,y,C,g,h[8],1163531501,20),g=a(g,w,y,C,h[13],2850285829,5),C=a(C,g,w,y,h[2],4243563512,9),y=a(y,C,g,w,h[7],1735328473,14),w=a(w,y,C,g,h[12],2368359562,20),g=l(g,w,y,C,h[5],4294588738,4),C=l(C,g,w,y,h[8],2272392833,11),y=l(y,C,g,w,h[11],1839030562,16),w=l(w,y,C,g,h[14],4259657740,23),g=l(g,w,y,C,h[1],2763975236,4),C=l(C,g,w,y,h[4],1272893353,11),y=l(y,C,g,w,h[7],4139469664,16),w=l(w,y,C,g,h[10],3200236656,23),g=l(g,w,y,C,h[13],681279174,4),C=l(C,g,w,y,h[0],3936430074,11),y=l(y,C,g,w,h[3],3572445317,16),w=l(w,y,C,g,h[6],76029189,23),g=l(g,w,y,C,h[9],3654602809,4),C=l(C,g,w,y,h[12],3873151461,11),y=l(y,C,g,w,h[15],530742520,16),w=l(w,y,C,g,h[2],3299628645,23),g=u(g,w,y,C,h[0],4096336452,6),C=u(C,g,w,y,h[7],1126891415,10),y=u(y,C,g,w,h[14],2878612391,15),w=u(w,y,C,g,h[5],4237533241,21),g=u(g,w,y,C,h[12],1700485571,6),C=u(C,g,w,y,h[3],2399980690,10),y=u(y,C,g,w,h[10],4293915773,15),w=u(w,y,C,g,h[1],2240044497,21),g=u(g,w,y,C,h[8],1873313359,6),C=u(C,g,w,y,h[15],4264355552,10),y=u(y,C,g,w,h[6],2734768916,15),w=u(w,y,C,g,h[13],1309151649,21),g=u(g,w,y,C,h[4],4149444226,6),C=u(C,g,w,y,h[11],3174756917,10),y=u(y,C,g,w,h[2],718787259,15),w=u(w,y,C,g,h[9],3951481745,21),this._a=this._a+g|0,this._b=this._b+w|0,this._c=this._c+y|0,this._d=this._d+C|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var h=t.allocUnsafe(16);return h.writeInt32LE(this._a,0),h.writeInt32LE(this._b,4),h.writeInt32LE(this._c,8),h.writeInt32LE(this._d,12),h};function s(h,p){return h<>>32-p}function o(h,p,g,w,y,C,T){return s(h+(p&g|~p&w)+y+C|0,T)+p|0}function a(h,p,g,w,y,C,T){return s(h+(p&w|g&~w)+y+C|0,T)+p|0}function l(h,p,g,w,y,C,T){return s(h+(p^g^w)+y+C|0,T)+p|0}function u(h,p,g,w,y,C,T){return s(h+(g^(p|~w))+y+C|0,T)+p|0}return TO=i,TO}var kO,Sne;function MO(){if(Sne)return kO;Sne=1;var r=qc.Buffer,e=tn(),t=Ane(),n=new Array(16),i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],o=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],u=[1352829926,1548603684,1836072691,2053994217,0];function h(){t.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e(h,t),h.prototype._update=function(){for(var k=n,N=0;N<16;++N)k[N]=this._block.readInt32LE(N*4);for(var O=this._a|0,B=this._b|0,z=this._c|0,G=this._d|0,$=this._e|0,D=this._a|0,V=this._b|0,Q=this._c|0,F=this._d|0,M=this._e|0,b=0;b<80;b+=1){var d,m;b<16?(d=g(O,B,z,G,$,k[i[b]],l[0],o[b]),m=T(D,V,Q,F,M,k[s[b]],u[0],a[b])):b<32?(d=w(O,B,z,G,$,k[i[b]],l[1],o[b]),m=C(D,V,Q,F,M,k[s[b]],u[1],a[b])):b<48?(d=y(O,B,z,G,$,k[i[b]],l[2],o[b]),m=y(D,V,Q,F,M,k[s[b]],u[2],a[b])):b<64?(d=C(O,B,z,G,$,k[i[b]],l[3],o[b]),m=w(D,V,Q,F,M,k[s[b]],u[3],a[b])):(d=T(O,B,z,G,$,k[i[b]],l[4],o[b]),m=g(D,V,Q,F,M,k[s[b]],u[4],a[b])),O=$,$=G,G=p(z,10),z=B,B=d,D=M,M=F,F=p(Q,10),Q=V,V=m}var x=this._b+z+F|0;this._b=this._c+G+M|0,this._c=this._d+$+D|0,this._d=this._e+O+V|0,this._e=this._a+B+Q|0,this._a=x},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var k=r.alloc?r.alloc(20):new r(20);return k.writeInt32LE(this._a,0),k.writeInt32LE(this._b,4),k.writeInt32LE(this._c,8),k.writeInt32LE(this._d,12),k.writeInt32LE(this._e,16),k};function p(k,N){return k<>>32-N}function g(k,N,O,B,z,G,$,D){return p(k+(N^O^B)+G+$|0,D)+z|0}function w(k,N,O,B,z,G,$,D){return p(k+(N&O|~N&B)+G+$|0,D)+z|0}function y(k,N,O,B,z,G,$,D){return p(k+((N|~O)^B)+G+$|0,D)+z|0}function C(k,N,O,B,z,G,$,D){return p(k+(N&B|O&~B)+G+$|0,D)+z|0}function T(k,N,O,B,z,G,$,D){return p(k+(N^(O|~B))+G+$|0,D)+z|0}return kO=h,kO}var QC={},cTe={get exports(){return QC},set exports(r){QC=r}},NO,Ine;function ty(){if(Ine)return NO;Ine=1;var r=sn().Buffer;function e(t,n){this._block=r.alloc(t),this._finalSize=n,this._blockSize=t,this._len=0}return e.prototype.update=function(t,n){typeof t=="string"&&(n=n||"utf8",t=r.from(t,n));for(var i=this._block,s=this._blockSize,o=t.length,a=this._len,l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var s=(i&4294967295)>>>0,o=(i-s)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(s,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},NO=e,NO}var PO,Tne;function lTe(){if(Tne)return PO;Tne=1;var r=tn(),e=ty(),t=sn().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(u){return u<<5|u>>>27}function a(u){return u<<30|u>>>2}function l(u,h,p,g){return u===0?h&p|~h&g:u===2?h&p|h&g|p&g:h^p^g}return s.prototype._update=function(u){for(var h=this._w,p=this._a|0,g=this._b|0,w=this._c|0,y=this._d|0,C=this._e|0,T=0;T<16;++T)h[T]=u.readInt32BE(T*4);for(;T<80;++T)h[T]=h[T-3]^h[T-8]^h[T-14]^h[T-16];for(var k=0;k<80;++k){var N=~~(k/20),O=o(p)+l(N,g,w,y)+C+h[k]+n[N]|0;C=y,y=w,w=a(g),g=p,p=O}this._a=p+this._a|0,this._b=g+this._b|0,this._c=w+this._c|0,this._d=y+this._d|0,this._e=C+this._e|0},s.prototype._hash=function(){var u=t.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},PO=s,PO}var OO,Rne;function uTe(){if(Rne)return OO;Rne=1;var r=tn(),e=ty(),t=sn().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(h){return h<<1|h>>>31}function a(h){return h<<5|h>>>27}function l(h){return h<<30|h>>>2}function u(h,p,g,w){return h===0?p&g|~p&w:h===2?p&g|p&w|g&w:p^g^w}return s.prototype._update=function(h){for(var p=this._w,g=this._a|0,w=this._b|0,y=this._c|0,C=this._d|0,T=this._e|0,k=0;k<16;++k)p[k]=h.readInt32BE(k*4);for(;k<80;++k)p[k]=o(p[k-3]^p[k-8]^p[k-14]^p[k-16]);for(var N=0;N<80;++N){var O=~~(N/20),B=a(g)+u(O,w,y,C)+T+p[N]+n[O]|0;T=C,C=y,y=l(w),w=g,g=B}this._a=g+this._a|0,this._b=w+this._b|0,this._c=y+this._c|0,this._d=C+this._d|0,this._e=T+this._e|0},s.prototype._hash=function(){var h=t.allocUnsafe(20);return h.writeInt32BE(this._a|0,0),h.writeInt32BE(this._b|0,4),h.writeInt32BE(this._c|0,8),h.writeInt32BE(this._d|0,12),h.writeInt32BE(this._e|0,16),h},OO=s,OO}var DO,kne;function Mne(){if(kne)return DO;kne=1;var r=tn(),e=ty(),t=sn().Buffer,n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=new Array(64);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function o(g,w,y){return y^g&(w^y)}function a(g,w,y){return g&w|y&(g|w)}function l(g){return(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10)}function u(g){return(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7)}function h(g){return(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3}function p(g){return(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10}return s.prototype._update=function(g){for(var w=this._w,y=this._a|0,C=this._b|0,T=this._c|0,k=this._d|0,N=this._e|0,O=this._f|0,B=this._g|0,z=this._h|0,G=0;G<16;++G)w[G]=g.readInt32BE(G*4);for(;G<64;++G)w[G]=p(w[G-2])+w[G-7]+h(w[G-15])+w[G-16]|0;for(var $=0;$<64;++$){var D=z+u(N)+o(N,O,B)+n[$]+w[$]|0,V=l(y)+a(y,C,T)|0;z=B,B=O,O=N,N=k+D|0,k=T,T=C,C=y,y=D+V|0}this._a=y+this._a|0,this._b=C+this._b|0,this._c=T+this._c|0,this._d=k+this._d|0,this._e=N+this._e|0,this._f=O+this._f|0,this._g=B+this._g|0,this._h=z+this._h|0},s.prototype._hash=function(){var g=t.allocUnsafe(32);return g.writeInt32BE(this._a,0),g.writeInt32BE(this._b,4),g.writeInt32BE(this._c,8),g.writeInt32BE(this._d,12),g.writeInt32BE(this._e,16),g.writeInt32BE(this._f,20),g.writeInt32BE(this._g,24),g.writeInt32BE(this._h,28),g},DO=s,DO}var $O,Nne;function hTe(){if(Nne)return $O;Nne=1;var r=tn(),e=Mne(),t=ty(),n=sn().Buffer,i=new Array(64);function s(){this.init(),this._w=i,t.call(this,64,56)}return r(s,e),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var o=n.allocUnsafe(28);return o.writeInt32BE(this._a,0),o.writeInt32BE(this._b,4),o.writeInt32BE(this._c,8),o.writeInt32BE(this._d,12),o.writeInt32BE(this._e,16),o.writeInt32BE(this._f,20),o.writeInt32BE(this._g,24),o},$O=s,$O}var BO,Pne;function One(){if(Pne)return BO;Pne=1;var r=tn(),e=ty(),t=sn().Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],i=new Array(160);function s(){this.init(),this._w=i,e.call(this,128,112)}r(s,e),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function o(C,T,k){return k^C&(T^k)}function a(C,T,k){return C&T|k&(C|T)}function l(C,T){return(C>>>28|T<<4)^(T>>>2|C<<30)^(T>>>7|C<<25)}function u(C,T){return(C>>>14|T<<18)^(C>>>18|T<<14)^(T>>>9|C<<23)}function h(C,T){return(C>>>1|T<<31)^(C>>>8|T<<24)^C>>>7}function p(C,T){return(C>>>1|T<<31)^(C>>>8|T<<24)^(C>>>7|T<<25)}function g(C,T){return(C>>>19|T<<13)^(T>>>29|C<<3)^C>>>6}function w(C,T){return(C>>>19|T<<13)^(T>>>29|C<<3)^(C>>>6|T<<26)}function y(C,T){return C>>>0>>0?1:0}return s.prototype._update=function(C){for(var T=this._w,k=this._ah|0,N=this._bh|0,O=this._ch|0,B=this._dh|0,z=this._eh|0,G=this._fh|0,$=this._gh|0,D=this._hh|0,V=this._al|0,Q=this._bl|0,F=this._cl|0,M=this._dl|0,b=this._el|0,d=this._fl|0,m=this._gl|0,x=this._hl|0,A=0;A<32;A+=2)T[A]=C.readInt32BE(A*4),T[A+1]=C.readInt32BE(A*4+4);for(;A<160;A+=2){var I=T[A-30],R=T[A-15*2+1],S=h(I,R),E=p(R,I);I=T[A-2*2],R=T[A-2*2+1];var _=g(I,R),L=w(R,I),ie=T[A-7*2],q=T[A-7*2+1],Y=T[A-16*2],K=T[A-16*2+1],te=E+q|0,re=S+ie+y(te,E)|0;te=te+L|0,re=re+_+y(te,L)|0,te=te+K|0,re=re+Y+y(te,K)|0,T[A]=re,T[A+1]=te}for(var H=0;H<160;H+=2){re=T[H],te=T[H+1];var U=a(k,N,O),W=a(V,Q,F),le=l(k,V),de=l(V,k),Se=u(z,b),Me=u(b,z),ke=n[H],Ke=n[H+1],Re=o(z,G,$),je=o(b,d,m),De=x+Me|0,Je=D+Se+y(De,x)|0;De=De+je|0,Je=Je+Re+y(De,je)|0,De=De+Ke|0,Je=Je+ke+y(De,Ke)|0,De=De+te|0,Je=Je+re+y(De,te)|0;var ze=de+W|0,qe=le+U+y(ze,de)|0;D=$,x=m,$=G,m=d,G=z,d=b,b=M+De|0,z=B+Je+y(b,M)|0,B=O,M=F,O=N,F=Q,N=k,Q=V,V=De+ze|0,k=Je+qe+y(V,De)|0}this._al=this._al+V|0,this._bl=this._bl+Q|0,this._cl=this._cl+F|0,this._dl=this._dl+M|0,this._el=this._el+b|0,this._fl=this._fl+d|0,this._gl=this._gl+m|0,this._hl=this._hl+x|0,this._ah=this._ah+k+y(this._al,V)|0,this._bh=this._bh+N+y(this._bl,Q)|0,this._ch=this._ch+O+y(this._cl,F)|0,this._dh=this._dh+B+y(this._dl,M)|0,this._eh=this._eh+z+y(this._el,b)|0,this._fh=this._fh+G+y(this._fl,d)|0,this._gh=this._gh+$+y(this._gl,m)|0,this._hh=this._hh+D+y(this._hl,x)|0},s.prototype._hash=function(){var C=t.allocUnsafe(64);function T(k,N,O){C.writeInt32BE(k,O),C.writeInt32BE(N,O+4)}return T(this._ah,this._al,0),T(this._bh,this._bl,8),T(this._ch,this._cl,16),T(this._dh,this._dl,24),T(this._eh,this._el,32),T(this._fh,this._fl,40),T(this._gh,this._gl,48),T(this._hh,this._hl,56),C},BO=s,BO}var LO,Dne;function fTe(){if(Dne)return LO;Dne=1;var r=tn(),e=One(),t=ty(),n=sn().Buffer,i=new Array(160);function s(){this.init(),this._w=i,t.call(this,128,112)}return r(s,e),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var o=n.allocUnsafe(48);function a(l,u,h){o.writeInt32BE(l,h),o.writeInt32BE(u,h+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),o},LO=s,LO}var $ne;function UO(){if($ne)return QC;$ne=1;var r=cTe.exports=function(t){t=t.toLowerCase();var n=r[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};return r.sha=lTe(),r.sha1=uTe(),r.sha224=hTe(),r.sha256=Mne(),r.sha384=fTe(),r.sha512=One(),QC}var FO,Bne;function dTe(){if(Bne)return FO;Bne=1,FO=t;var r=pn.EventEmitter,e=tn();e(t,r),t.Readable=_O(),t.Writable=gO(),t.Duplex=Cm(),t.Transform=AO(),t.PassThrough=wne(),t.finished=YC(),t.pipeline=yne(),t.Stream=t;function t(){r.call(this)}return t.prototype.pipe=function(n,i){var s=this;function o(w){n.writable&&n.write(w)===!1&&s.pause&&s.pause()}s.on("data",o);function a(){s.readable&&s.resume&&s.resume()}n.on("drain",a),!n._isStdio&&(!i||i.end!==!1)&&(s.on("end",u),s.on("close",h));var l=!1;function u(){l||(l=!0,n.end())}function h(){l||(l=!0,typeof n.destroy=="function"&&n.destroy())}function p(w){if(g(),r.listenerCount(this,"error")===0)throw w}s.on("error",p),n.on("error",p);function g(){s.removeListener("data",o),n.removeListener("drain",a),s.removeListener("end",u),s.removeListener("close",h),s.removeListener("error",p),n.removeListener("error",p),s.removeListener("end",g),s.removeListener("close",g),n.removeListener("close",g)}return s.on("end",g),s.on("close",g),n.on("close",g),n.emit("pipe",s),n},FO}var jO,Lne;function l1(){if(Lne)return jO;Lne=1;var r=sn().Buffer,e=dTe().Transform,t=T6().StringDecoder,n=tn();function i(s){e.call(this),this.hashMode=typeof s=="string",this.hashMode?this[s]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return n(i,e),i.prototype.update=function(s,o,a){typeof s=="string"&&(s=r.from(s,o));var l=this._update(s);return this.hashMode?this:(a&&(l=this._toString(l,a)),l)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(s,o,a){var l;try{this.hashMode?this._update(s):this.push(this._update(s))}catch(u){l=u}finally{a(l)}},i.prototype._flush=function(s){var o;try{this.push(this.__final())}catch(a){o=a}s(o)},i.prototype._finalOrDigest=function(s){var o=this.__final()||r.alloc(0);return s&&(o=this._toString(o,s,!0)),o},i.prototype._toString=function(s,o,a){if(this._decoder||(this._decoder=new t(o),this._encoding=o),this._encoding!==o)throw new Error("can't switch encodings");var l=this._decoder.write(s);return a&&(l+=this._decoder.end()),l},jO=i,jO}var zO,Une;function R6(){if(Une)return zO;Une=1;var r=tn(),e=RO(),t=MO(),n=UO(),i=l1();function s(o){i.call(this,"digest"),this._hash=o}return r(s,i),s.prototype._update=function(o){this._hash.update(o)},s.prototype._final=function(){return this._hash.digest()},zO=function(a){return a=a.toLowerCase(),a==="md5"?new e:a==="rmd160"||a==="ripemd160"?new t:new s(n(a))},zO}var HO,Fne;function pTe(){if(Fne)return HO;Fne=1;var r=tn(),e=sn().Buffer,t=l1(),n=e.alloc(128),i=64;function s(o,a){t.call(this,"digest"),typeof a=="string"&&(a=e.from(a)),this._alg=o,this._key=a,a.length>i?a=o(a):a.lengthp){var g=u==="rmd160"?new s:o(u);h=g.update(h).digest()}else h.lengthr||t!==t)throw new TypeError("Bad key length")},VO}var GO,Zne;function Jne(){if(Zne)return GO;Zne=1;var r;if(ct.process&&ct.process.browser)r="utf-8";else if(ct.process&&ct.process.version){var e=parseInt(yt.version.split(".")[0].slice(1),10);r=e>=6?"utf-8":"binary"}else r="utf-8";return GO=r,GO}var KO,Yne;function Qne(){if(Yne)return KO;Yne=1;var r=sn().Buffer;return KO=function(e,t,n){if(r.isBuffer(e))return e;if(typeof e=="string")return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},KO}var ZO,Xne;function eie(){if(Xne)return ZO;Xne=1;var r=zne(),e=MO(),t=UO(),n=sn().Buffer,i=Kne(),s=Jne(),o=Qne(),a=n.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function u(g,w,y){var C=h(g),T=g==="sha512"||g==="sha384"?128:64;w.length>T?w=C(w):w.length>>0},Wc.writeUInt32BE=function(i,s,o){i[0+o]=s>>>24,i[1+o]=s>>>16&255,i[2+o]=s>>>8&255,i[3+o]=s&255},Wc.ip=function(i,s,o,a){for(var l=0,u=0,h=6;h>=0;h-=2){for(var p=0;p<=24;p+=8)l<<=1,l|=s>>>p+h&1;for(var p=0;p<=24;p+=8)l<<=1,l|=i>>>p+h&1}for(var h=6;h>=0;h-=2){for(var p=1;p<=25;p+=8)u<<=1,u|=s>>>p+h&1;for(var p=1;p<=25;p+=8)u<<=1,u|=i>>>p+h&1}o[a+0]=l>>>0,o[a+1]=u>>>0},Wc.rip=function(i,s,o,a){for(var l=0,u=0,h=0;h<4;h++)for(var p=24;p>=0;p-=8)l<<=1,l|=s>>>p+h&1,l<<=1,l|=i>>>p+h&1;for(var h=4;h<8;h++)for(var p=24;p>=0;p-=8)u<<=1,u|=s>>>p+h&1,u<<=1,u|=i>>>p+h&1;o[a+0]=l>>>0,o[a+1]=u>>>0},Wc.pc1=function(i,s,o,a){for(var l=0,u=0,h=7;h>=5;h--){for(var p=0;p<=24;p+=8)l<<=1,l|=s>>p+h&1;for(var p=0;p<=24;p+=8)l<<=1,l|=i>>p+h&1}for(var p=0;p<=24;p+=8)l<<=1,l|=s>>p+h&1;for(var h=1;h<=3;h++){for(var p=0;p<=24;p+=8)u<<=1,u|=s>>p+h&1;for(var p=0;p<=24;p+=8)u<<=1,u|=i>>p+h&1}for(var p=0;p<=24;p+=8)u<<=1,u|=i>>p+h&1;o[a+0]=l>>>0,o[a+1]=u>>>0},Wc.r28shl=function(i,s){return i<>>28-s};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Wc.pc2=function(i,s,o,a){for(var l=0,u=0,h=r.length>>>1,p=0;p>>r[p]&1;for(var p=h;p>>r[p]&1;o[a+0]=l>>>0,o[a+1]=u>>>0},Wc.expand=function(i,s,o){var a=0,l=0;a=(i&1)<<5|i>>>27;for(var u=23;u>=15;u-=4)a<<=6,a|=i>>>u&63;for(var u=11;u>=3;u-=4)l|=i>>>u&63,l<<=6;l|=(i&31)<<1|i>>>31,s[o+0]=a>>>0,s[o+1]=l>>>0};var e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Wc.substitute=function(i,s){for(var o=0,a=0;a<4;a++){var l=i>>>18-a*6&63,u=e[a*64+l];o<<=4,o|=u}for(var a=0;a<4;a++){var l=s>>>18-a*6&63,u=e[4*64+a*64+l];o<<=4,o|=u}return o>>>0};var t=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return Wc.permute=function(i){for(var s=0,o=0;o>>t[o]&1;return s>>>0},Wc.padSplit=function(i,s,o){for(var a=i.toString(2);a.length0;o--)i+=this._buffer(n,i),s+=this._flushBuffer(a,s);return i+=this._buffer(n,i),a},e.prototype.final=function(n){var i;n&&(i=this.update(n));var s;return this.type==="encrypt"?s=this._finalEncrypt():s=this._finalDecrypt(),i?i.concat(s):s},e.prototype._pad=function(n,i){if(i===0)return!1;for(;i>>1];h=t.r28shl(h,w),p=t.r28shl(p,w),t.pc2(h,p,l.keys,g)}},s.prototype._update=function(l,u,h,p){var g=this._desState,w=t.readUInt32BE(l,u),y=t.readUInt32BE(l,u+4);t.ip(w,y,g.tmp,0),w=g.tmp[0],y=g.tmp[1],this.type==="encrypt"?this._encrypt(g,w,y,g.tmp,0):this._decrypt(g,w,y,g.tmp,0),w=g.tmp[0],y=g.tmp[1],t.writeUInt32BE(h,w,p),t.writeUInt32BE(h,y,p+4)},s.prototype._pad=function(l,u){if(this.padding===!1)return!1;for(var h=l.length-u,p=u;p>>0,w=B}t.rip(y,w,p,g)},s.prototype._decrypt=function(l,u,h,p,g){for(var w=h,y=u,C=l.keys.length-2;C>=0;C-=2){var T=l.keys[C],k=l.keys[C+1];t.expand(w,l.tmp,0),T^=l.tmp[0],k^=l.tmp[1];var N=t.substitute(T,k),O=t.permute(N),B=w;w=(y^O)>>>0,y=B}t.rip(w,y,p,g)},eD}var tD={},uie;function wTe(){if(uie)return tD;uie=1;var r=Kl(),e=tn(),t={};function n(s){r.equal(s.length,8,"Invalid IV length"),this.iv=new Array(8);for(var o=0;o>a%8,n._prev=t(n._prev,s?h:p);return u}function t(n,i){var s=n.length,o=-1,a=r.allocUnsafe(n.length);for(n=r.concat([n,r.from([i])]);++o>7;return a}return aD.encrypt=function(n,i,s){for(var o=i.length,a=r.allocUnsafe(o),l=-1;++l>>24]^w[k>>>16&255]^y[N>>>8&255]^C[O&255]^l[D++],z=g[k>>>24]^w[N>>>16&255]^y[O>>>8&255]^C[T&255]^l[D++],G=g[N>>>24]^w[O>>>16&255]^y[T>>>8&255]^C[k&255]^l[D++],$=g[O>>>24]^w[T>>>16&255]^y[k>>>8&255]^C[N&255]^l[D++],T=B,k=z,N=G,O=$;return B=(h[T>>>24]<<24|h[k>>>16&255]<<16|h[N>>>8&255]<<8|h[O&255])^l[D++],z=(h[k>>>24]<<24|h[N>>>16&255]<<16|h[O>>>8&255]<<8|h[T&255])^l[D++],G=(h[N>>>24]<<24|h[O>>>16&255]<<16|h[T>>>8&255]<<8|h[k&255])^l[D++],$=(h[O>>>24]<<24|h[T>>>16&255]<<16|h[k>>>8&255]<<8|h[N&255])^l[D++],B=B>>>0,z=z>>>0,G=G>>>0,$=$>>>0,[B,z,G,$]}var i=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var a=new Array(256),l=0;l<256;l++)l<128?a[l]=l<<1:a[l]=l<<1^283;for(var u=[],h=[],p=[[],[],[],[]],g=[[],[],[],[]],w=0,y=0,C=0;C<256;++C){var T=y^y<<1^y<<2^y<<3^y<<4;T=T>>>8^T&255^99,u[w]=T,h[T]=w;var k=a[w],N=a[k],O=a[N],B=a[T]*257^T*16843008;p[0][w]=B<<24|B>>>8,p[1][w]=B<<16|B>>>16,p[2][w]=B<<8|B>>>24,p[3][w]=B,B=O*16843009^N*65537^k*257^w*16843008,g[0][T]=B<<24|B>>>8,g[1][T]=B<<16|B>>>16,g[2][T]=B<<8|B>>>24,g[3][T]=B,w===0?w=y=1:(w=k^a[a[a[O^k]]],y^=a[a[y]])}return{SBOX:u,INV_SBOX:h,SUB_MIX:p,INV_SUB_MIX:g}}();function o(a){this._key=e(a),this._reset()}return o.blockSize=4*4,o.keySize=256/8,o.prototype.blockSize=o.blockSize,o.prototype.keySize=o.keySize,o.prototype._reset=function(){for(var a=this._key,l=a.length,u=l+6,h=(u+1)*4,p=[],g=0;g>>24,w=s.SBOX[w>>>24]<<24|s.SBOX[w>>>16&255]<<16|s.SBOX[w>>>8&255]<<8|s.SBOX[w&255],w^=i[g/l|0]<<24):l>6&&g%l===4&&(w=s.SBOX[w>>>24]<<24|s.SBOX[w>>>16&255]<<16|s.SBOX[w>>>8&255]<<8|s.SBOX[w&255]),p[g]=p[g-l]^w}for(var y=[],C=0;C>>24]]^s.INV_SUB_MIX[1][s.SBOX[k>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[k>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[k&255]]}this._nRounds=u,this._keySchedule=p,this._invKeySchedule=y},o.prototype.encryptBlockRaw=function(a){return a=e(a),n(a,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},o.prototype.encryptBlock=function(a){var l=this.encryptBlockRaw(a),u=r.allocUnsafe(16);return u.writeUInt32BE(l[0],0),u.writeUInt32BE(l[1],4),u.writeUInt32BE(l[2],8),u.writeUInt32BE(l[3],12),u},o.prototype.decryptBlock=function(a){a=e(a);var l=a[1];a[1]=a[3],a[3]=l;var u=n(a,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),h=r.allocUnsafe(16);return h.writeUInt32BE(u[0],0),h.writeUInt32BE(u[3],4),h.writeUInt32BE(u[2],8),h.writeUInt32BE(u[1],12),h},o.prototype.scrub=function(){t(this._keySchedule),t(this._invKeySchedule),t(this._key)},dD.AES=o,dD}var pD,Tie;function TTe(){if(Tie)return pD;Tie=1;var r=sn().Buffer,e=r.alloc(16,0);function t(s){return[s.readUInt32BE(0),s.readUInt32BE(4),s.readUInt32BE(8),s.readUInt32BE(12)]}function n(s){var o=r.allocUnsafe(16);return o.writeUInt32BE(s[0]>>>0,0),o.writeUInt32BE(s[1]>>>0,4),o.writeUInt32BE(s[2]>>>0,8),o.writeUInt32BE(s[3]>>>0,12),o}function i(s){this.h=s,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}return i.prototype.ghash=function(s){for(var o=-1;++o0;a--)s[a]=s[a]>>>1|(s[a-1]&1)<<31;s[0]=s[0]>>>1,u&&(s[0]=s[0]^225<<24)}this.state=n(o)},i.prototype.update=function(s){this.cache=r.concat([this.cache,s]);for(var o;this.cache.length>=16;)o=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(o)},i.prototype.final=function(s,o){return this.cache.length&&this.ghash(r.concat([this.cache,e],16)),this.ghash(n([0,s,0,o])),this.state},pD=i,pD}var gD,Rie;function kie(){if(Rie)return gD;Rie=1;var r=iS(),e=sn().Buffer,t=l1(),n=tn(),i=TTe(),s=k6(),o=_ie();function a(h,p){var g=0;h.length!==p.length&&g++;for(var w=Math.min(h.length,p.length),y=0;y0||o>0;){var p=new e;p.update(h),p.update(n),i&&p.update(i),h=p.digest();var g=0;if(a>0){var w=l.length-a;g=Math.min(a,h.length),h.copy(l,w,0,g),a-=g}if(g0){var y=u.length-o,C=Math.min(o,h.length-g);h.copy(u,y,g,g+C),o-=C}}return h.fill(0),{key:l,iv:u}}return bD=t,bD}var Oie;function RTe(){if(Oie)return tS;Oie=1;var r=fD(),e=kie(),t=sn().Buffer,n=Nie(),i=l1(),s=iS(),o=sS(),a=tn();function l(w,y,C){i.call(this),this._cache=new h,this._cipher=new s.AES(y),this._prev=t.from(C),this._mode=w,this._autopadding=!0}a(l,i),l.prototype._update=function(w){this._cache.add(w);for(var y,C,T=[];y=this._cache.get();)C=this._mode.encrypt(this,y),T.push(C);return t.concat(T)};var u=t.alloc(16,16);l.prototype._final=function(){var w=this._cache.flush();if(this._autopadding)return w=this._mode.encrypt(this,w),this._cipher.scrub(),w;if(!w.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(w){return this._autopadding=!!w,this};function h(){this.cache=t.allocUnsafe(0)}h.prototype.add=function(w){this.cache=t.concat([this.cache,w])},h.prototype.get=function(){if(this.cache.length>15){var w=this.cache.slice(0,16);return this.cache=this.cache.slice(16),w}return null},h.prototype.flush=function(){for(var w=16-this.cache.length,y=t.allocUnsafe(w),C=-1;++C16)return y=this.cache.slice(0,16),this.cache=this.cache.slice(16),y}else if(this.cache.length>=16)return y=this.cache.slice(0,16),this.cache=this.cache.slice(16),y;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache};function h(w){var y=w[15];if(y<1||y>16)throw new Error("unable to decrypt data");for(var C=-1;++C0?M:b},s.min=function(M,b){return M.cmp(b)<0?M:b},s.prototype._init=function(M,b,d){if(typeof M=="number")return this._initNumber(M,b,d);if(typeof M=="object")return this._initArray(M,b,d);b==="hex"&&(b=16),n(b===(b|0)&&b>=2&&b<=36),M=M.toString().replace(/\s+/g,"");var m=0;M[0]==="-"&&(m++,this.negative=1),m=0;m-=3)A=M[m]|M[m-1]<<8|M[m-2]<<16,this.words[x]|=A<>>26-I&67108863,I+=24,I>=26&&(I-=26,x++);else if(d==="le")for(m=0,x=0;m>>26-I&67108863,I+=24,I>=26&&(I-=26,x++);return this.strip()};function a(F,M){var b=F.charCodeAt(M);return b>=65&&b<=70?b-55:b>=97&&b<=102?b-87:b-48&15}function l(F,M,b){var d=a(F,b);return b-1>=M&&(d|=a(F,b-1)<<4),d}s.prototype._parseHex=function(M,b,d){this.length=Math.ceil((M.length-b)/6),this.words=new Array(this.length);for(var m=0;m=b;m-=2)I=l(M,b,m)<=18?(x-=18,A+=1,this.words[A]|=I>>>26):x+=8;else{var R=M.length-b;for(m=R%2===0?b+1:b;m=18?(x-=18,A+=1,this.words[A]|=I>>>26):x+=8}this.strip()};function u(F,M,b,d){for(var m=0,x=Math.min(F.length,b),A=M;A=49?m+=I-49+10:I>=17?m+=I-17+10:m+=I}return m}s.prototype._parseBase=function(M,b,d){this.words=[0],this.length=1;for(var m=0,x=1;x<=67108863;x*=b)m++;m--,x=x/b|0;for(var A=M.length-d,I=A%m,R=Math.min(A,A-I)+d,S=0,E=d;E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(M,b){M=M||10,b=b|0||1;var d;if(M===16||M==="hex"){d="";for(var m=0,x=0,A=0;A>>24-m&16777215,x!==0||A!==this.length-1?d=h[6-R.length]+R+d:d=R+d,m+=2,m>=26&&(m-=26,A--)}for(x!==0&&(d=x.toString(16)+d);d.length%b!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(M===(M|0)&&M>=2&&M<=36){var S=p[M],E=g[M];d="";var _=this.clone();for(_.negative=0;!_.isZero();){var L=_.modn(E).toString(M);_=_.idivn(E),_.isZero()?d=L+d:d=h[S-L.length]+L+d}for(this.isZero()&&(d="0"+d);d.length%b!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var M=this.words[0];return this.length===2?M+=this.words[1]*67108864:this.length===3&&this.words[2]===1?M+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-M:M},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(M,b){return n(typeof o<"u"),this.toArrayLike(o,M,b)},s.prototype.toArray=function(M,b){return this.toArrayLike(Array,M,b)},s.prototype.toArrayLike=function(M,b,d){var m=this.byteLength(),x=d||Math.max(1,m);n(m<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0"),this.strip();var A=b==="le",I=new M(x),R,S,E=this.clone();if(A){for(S=0;!E.isZero();S++)R=E.andln(255),E.iushrn(8),I[S]=R;for(;S=4096&&(d+=13,b>>>=13),b>=64&&(d+=7,b>>>=7),b>=8&&(d+=4,b>>>=4),b>=2&&(d+=2,b>>>=2),d+b},s.prototype._zeroBits=function(M){if(M===0)return 26;var b=M,d=0;return b&8191||(d+=13,b>>>=13),b&127||(d+=7,b>>>=7),b&15||(d+=4,b>>>=4),b&3||(d+=2,b>>>=2),b&1||d++,d},s.prototype.bitLength=function(){var M=this.words[this.length-1],b=this._countBits(M);return(this.length-1)*26+b};function w(F){for(var M=new Array(F.bitLength()),b=0;b>>m}return M}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var M=0,b=0;bM.length?this.clone().ior(M):M.clone().ior(this)},s.prototype.uor=function(M){return this.length>M.length?this.clone().iuor(M):M.clone().iuor(this)},s.prototype.iuand=function(M){var b;this.length>M.length?b=M:b=this;for(var d=0;dM.length?this.clone().iand(M):M.clone().iand(this)},s.prototype.uand=function(M){return this.length>M.length?this.clone().iuand(M):M.clone().iuand(this)},s.prototype.iuxor=function(M){var b,d;this.length>M.length?(b=this,d=M):(b=M,d=this);for(var m=0;mM.length?this.clone().ixor(M):M.clone().ixor(this)},s.prototype.uxor=function(M){return this.length>M.length?this.clone().iuxor(M):M.clone().iuxor(this)},s.prototype.inotn=function(M){n(typeof M=="number"&&M>=0);var b=Math.ceil(M/26)|0,d=M%26;this._expand(b),d>0&&b--;for(var m=0;m0&&(this.words[m]=~this.words[m]&67108863>>26-d),this.strip()},s.prototype.notn=function(M){return this.clone().inotn(M)},s.prototype.setn=function(M,b){n(typeof M=="number"&&M>=0);var d=M/26|0,m=M%26;return this._expand(d+1),b?this.words[d]=this.words[d]|1<M.length?(d=this,m=M):(d=M,m=this);for(var x=0,A=0;A>>26;for(;x!==0&&A>>26;if(this.length=d.length,x!==0)this.words[this.length]=x,this.length++;else if(d!==this)for(;AM.length?this.clone().iadd(M):M.clone().iadd(this)},s.prototype.isub=function(M){if(M.negative!==0){M.negative=0;var b=this.iadd(M);return M.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(M),this.negative=1,this._normSign();var d=this.cmp(M);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,x;d>0?(m=this,x=M):(m=M,x=this);for(var A=0,I=0;I>26,this.words[I]=b&67108863;for(;A!==0&&I>26,this.words[I]=b&67108863;if(A===0&&I>>26,_=R&67108863,L=Math.min(S,M.length-1),ie=Math.max(0,S-F.length+1);ie<=L;ie++){var q=S-ie|0;m=F.words[q]|0,x=M.words[ie]|0,A=m*x+_,E+=A/67108864|0,_=A&67108863}b.words[S]=_|0,R=E|0}return R!==0?b.words[S]=R|0:b.length--,b.strip()}var C=function(M,b,d){var m=M.words,x=b.words,A=d.words,I=0,R,S,E,_=m[0]|0,L=_&8191,ie=_>>>13,q=m[1]|0,Y=q&8191,K=q>>>13,te=m[2]|0,re=te&8191,H=te>>>13,U=m[3]|0,W=U&8191,le=U>>>13,de=m[4]|0,Se=de&8191,Me=de>>>13,ke=m[5]|0,Ke=ke&8191,Re=ke>>>13,je=m[6]|0,De=je&8191,Je=je>>>13,ze=m[7]|0,qe=ze&8191,Ve=ze>>>13,He=m[8]|0,Be=He&8191,Ge=He>>>13,Xe=m[9]|0,se=Xe&8191,J=Xe>>>13,X=x[0]|0,ue=X&8191,we=X>>>13,ye=x[1]|0,Ie=ye&8191,it=ye>>>13,ot=x[2]|0,tt=ot&8191,It=ot>>>13,st=x[3]|0,Nt=st&8191,Lt=st>>>13,ht=x[4]|0,wt=ht&8191,Ut=ht>>>13,ft=x[5]|0,dt=ft&8191,Vt=ft>>>13,xt=x[6]|0,pt=xt&8191,Gt=xt>>>13,gt=x[7]|0,vt=gt&8191,Ft=gt>>>13,lt=x[8]|0,_t=lt&8191,Kt=lt>>>13,Ht=x[9]|0,qt=Ht&8191,br=Ht>>>13;d.negative=M.negative^b.negative,d.length=19,R=Math.imul(L,ue),S=Math.imul(L,we),S=S+Math.imul(ie,ue)|0,E=Math.imul(ie,we);var Tt=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,R=Math.imul(Y,ue),S=Math.imul(Y,we),S=S+Math.imul(K,ue)|0,E=Math.imul(K,we),R=R+Math.imul(L,Ie)|0,S=S+Math.imul(L,it)|0,S=S+Math.imul(ie,Ie)|0,E=E+Math.imul(ie,it)|0;var ur=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(ur>>>26)|0,ur&=67108863,R=Math.imul(re,ue),S=Math.imul(re,we),S=S+Math.imul(H,ue)|0,E=Math.imul(H,we),R=R+Math.imul(Y,Ie)|0,S=S+Math.imul(Y,it)|0,S=S+Math.imul(K,Ie)|0,E=E+Math.imul(K,it)|0,R=R+Math.imul(L,tt)|0,S=S+Math.imul(L,It)|0,S=S+Math.imul(ie,tt)|0,E=E+Math.imul(ie,It)|0;var Xn=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,R=Math.imul(W,ue),S=Math.imul(W,we),S=S+Math.imul(le,ue)|0,E=Math.imul(le,we),R=R+Math.imul(re,Ie)|0,S=S+Math.imul(re,it)|0,S=S+Math.imul(H,Ie)|0,E=E+Math.imul(H,it)|0,R=R+Math.imul(Y,tt)|0,S=S+Math.imul(Y,It)|0,S=S+Math.imul(K,tt)|0,E=E+Math.imul(K,It)|0,R=R+Math.imul(L,Nt)|0,S=S+Math.imul(L,Lt)|0,S=S+Math.imul(ie,Nt)|0,E=E+Math.imul(ie,Lt)|0;var ei=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(ei>>>26)|0,ei&=67108863,R=Math.imul(Se,ue),S=Math.imul(Se,we),S=S+Math.imul(Me,ue)|0,E=Math.imul(Me,we),R=R+Math.imul(W,Ie)|0,S=S+Math.imul(W,it)|0,S=S+Math.imul(le,Ie)|0,E=E+Math.imul(le,it)|0,R=R+Math.imul(re,tt)|0,S=S+Math.imul(re,It)|0,S=S+Math.imul(H,tt)|0,E=E+Math.imul(H,It)|0,R=R+Math.imul(Y,Nt)|0,S=S+Math.imul(Y,Lt)|0,S=S+Math.imul(K,Nt)|0,E=E+Math.imul(K,Lt)|0,R=R+Math.imul(L,wt)|0,S=S+Math.imul(L,Ut)|0,S=S+Math.imul(ie,wt)|0,E=E+Math.imul(ie,Ut)|0;var ti=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(ti>>>26)|0,ti&=67108863,R=Math.imul(Ke,ue),S=Math.imul(Ke,we),S=S+Math.imul(Re,ue)|0,E=Math.imul(Re,we),R=R+Math.imul(Se,Ie)|0,S=S+Math.imul(Se,it)|0,S=S+Math.imul(Me,Ie)|0,E=E+Math.imul(Me,it)|0,R=R+Math.imul(W,tt)|0,S=S+Math.imul(W,It)|0,S=S+Math.imul(le,tt)|0,E=E+Math.imul(le,It)|0,R=R+Math.imul(re,Nt)|0,S=S+Math.imul(re,Lt)|0,S=S+Math.imul(H,Nt)|0,E=E+Math.imul(H,Lt)|0,R=R+Math.imul(Y,wt)|0,S=S+Math.imul(Y,Ut)|0,S=S+Math.imul(K,wt)|0,E=E+Math.imul(K,Ut)|0,R=R+Math.imul(L,dt)|0,S=S+Math.imul(L,Vt)|0,S=S+Math.imul(ie,dt)|0,E=E+Math.imul(ie,Vt)|0;var ri=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(ri>>>26)|0,ri&=67108863,R=Math.imul(De,ue),S=Math.imul(De,we),S=S+Math.imul(Je,ue)|0,E=Math.imul(Je,we),R=R+Math.imul(Ke,Ie)|0,S=S+Math.imul(Ke,it)|0,S=S+Math.imul(Re,Ie)|0,E=E+Math.imul(Re,it)|0,R=R+Math.imul(Se,tt)|0,S=S+Math.imul(Se,It)|0,S=S+Math.imul(Me,tt)|0,E=E+Math.imul(Me,It)|0,R=R+Math.imul(W,Nt)|0,S=S+Math.imul(W,Lt)|0,S=S+Math.imul(le,Nt)|0,E=E+Math.imul(le,Lt)|0,R=R+Math.imul(re,wt)|0,S=S+Math.imul(re,Ut)|0,S=S+Math.imul(H,wt)|0,E=E+Math.imul(H,Ut)|0,R=R+Math.imul(Y,dt)|0,S=S+Math.imul(Y,Vt)|0,S=S+Math.imul(K,dt)|0,E=E+Math.imul(K,Vt)|0,R=R+Math.imul(L,pt)|0,S=S+Math.imul(L,Gt)|0,S=S+Math.imul(ie,pt)|0,E=E+Math.imul(ie,Gt)|0;var bn=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(bn>>>26)|0,bn&=67108863,R=Math.imul(qe,ue),S=Math.imul(qe,we),S=S+Math.imul(Ve,ue)|0,E=Math.imul(Ve,we),R=R+Math.imul(De,Ie)|0,S=S+Math.imul(De,it)|0,S=S+Math.imul(Je,Ie)|0,E=E+Math.imul(Je,it)|0,R=R+Math.imul(Ke,tt)|0,S=S+Math.imul(Ke,It)|0,S=S+Math.imul(Re,tt)|0,E=E+Math.imul(Re,It)|0,R=R+Math.imul(Se,Nt)|0,S=S+Math.imul(Se,Lt)|0,S=S+Math.imul(Me,Nt)|0,E=E+Math.imul(Me,Lt)|0,R=R+Math.imul(W,wt)|0,S=S+Math.imul(W,Ut)|0,S=S+Math.imul(le,wt)|0,E=E+Math.imul(le,Ut)|0,R=R+Math.imul(re,dt)|0,S=S+Math.imul(re,Vt)|0,S=S+Math.imul(H,dt)|0,E=E+Math.imul(H,Vt)|0,R=R+Math.imul(Y,pt)|0,S=S+Math.imul(Y,Gt)|0,S=S+Math.imul(K,pt)|0,E=E+Math.imul(K,Gt)|0,R=R+Math.imul(L,vt)|0,S=S+Math.imul(L,Ft)|0,S=S+Math.imul(ie,vt)|0,E=E+Math.imul(ie,Ft)|0;var qn=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(qn>>>26)|0,qn&=67108863,R=Math.imul(Be,ue),S=Math.imul(Be,we),S=S+Math.imul(Ge,ue)|0,E=Math.imul(Ge,we),R=R+Math.imul(qe,Ie)|0,S=S+Math.imul(qe,it)|0,S=S+Math.imul(Ve,Ie)|0,E=E+Math.imul(Ve,it)|0,R=R+Math.imul(De,tt)|0,S=S+Math.imul(De,It)|0,S=S+Math.imul(Je,tt)|0,E=E+Math.imul(Je,It)|0,R=R+Math.imul(Ke,Nt)|0,S=S+Math.imul(Ke,Lt)|0,S=S+Math.imul(Re,Nt)|0,E=E+Math.imul(Re,Lt)|0,R=R+Math.imul(Se,wt)|0,S=S+Math.imul(Se,Ut)|0,S=S+Math.imul(Me,wt)|0,E=E+Math.imul(Me,Ut)|0,R=R+Math.imul(W,dt)|0,S=S+Math.imul(W,Vt)|0,S=S+Math.imul(le,dt)|0,E=E+Math.imul(le,Vt)|0,R=R+Math.imul(re,pt)|0,S=S+Math.imul(re,Gt)|0,S=S+Math.imul(H,pt)|0,E=E+Math.imul(H,Gt)|0,R=R+Math.imul(Y,vt)|0,S=S+Math.imul(Y,Ft)|0,S=S+Math.imul(K,vt)|0,E=E+Math.imul(K,Ft)|0,R=R+Math.imul(L,_t)|0,S=S+Math.imul(L,Kt)|0,S=S+Math.imul(ie,_t)|0,E=E+Math.imul(ie,Kt)|0;var Di=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Di>>>26)|0,Di&=67108863,R=Math.imul(se,ue),S=Math.imul(se,we),S=S+Math.imul(J,ue)|0,E=Math.imul(J,we),R=R+Math.imul(Be,Ie)|0,S=S+Math.imul(Be,it)|0,S=S+Math.imul(Ge,Ie)|0,E=E+Math.imul(Ge,it)|0,R=R+Math.imul(qe,tt)|0,S=S+Math.imul(qe,It)|0,S=S+Math.imul(Ve,tt)|0,E=E+Math.imul(Ve,It)|0,R=R+Math.imul(De,Nt)|0,S=S+Math.imul(De,Lt)|0,S=S+Math.imul(Je,Nt)|0,E=E+Math.imul(Je,Lt)|0,R=R+Math.imul(Ke,wt)|0,S=S+Math.imul(Ke,Ut)|0,S=S+Math.imul(Re,wt)|0,E=E+Math.imul(Re,Ut)|0,R=R+Math.imul(Se,dt)|0,S=S+Math.imul(Se,Vt)|0,S=S+Math.imul(Me,dt)|0,E=E+Math.imul(Me,Vt)|0,R=R+Math.imul(W,pt)|0,S=S+Math.imul(W,Gt)|0,S=S+Math.imul(le,pt)|0,E=E+Math.imul(le,Gt)|0,R=R+Math.imul(re,vt)|0,S=S+Math.imul(re,Ft)|0,S=S+Math.imul(H,vt)|0,E=E+Math.imul(H,Ft)|0,R=R+Math.imul(Y,_t)|0,S=S+Math.imul(Y,Kt)|0,S=S+Math.imul(K,_t)|0,E=E+Math.imul(K,Kt)|0,R=R+Math.imul(L,qt)|0,S=S+Math.imul(L,br)|0,S=S+Math.imul(ie,qt)|0,E=E+Math.imul(ie,br)|0;var Wn=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,R=Math.imul(se,Ie),S=Math.imul(se,it),S=S+Math.imul(J,Ie)|0,E=Math.imul(J,it),R=R+Math.imul(Be,tt)|0,S=S+Math.imul(Be,It)|0,S=S+Math.imul(Ge,tt)|0,E=E+Math.imul(Ge,It)|0,R=R+Math.imul(qe,Nt)|0,S=S+Math.imul(qe,Lt)|0,S=S+Math.imul(Ve,Nt)|0,E=E+Math.imul(Ve,Lt)|0,R=R+Math.imul(De,wt)|0,S=S+Math.imul(De,Ut)|0,S=S+Math.imul(Je,wt)|0,E=E+Math.imul(Je,Ut)|0,R=R+Math.imul(Ke,dt)|0,S=S+Math.imul(Ke,Vt)|0,S=S+Math.imul(Re,dt)|0,E=E+Math.imul(Re,Vt)|0,R=R+Math.imul(Se,pt)|0,S=S+Math.imul(Se,Gt)|0,S=S+Math.imul(Me,pt)|0,E=E+Math.imul(Me,Gt)|0,R=R+Math.imul(W,vt)|0,S=S+Math.imul(W,Ft)|0,S=S+Math.imul(le,vt)|0,E=E+Math.imul(le,Ft)|0,R=R+Math.imul(re,_t)|0,S=S+Math.imul(re,Kt)|0,S=S+Math.imul(H,_t)|0,E=E+Math.imul(H,Kt)|0,R=R+Math.imul(Y,qt)|0,S=S+Math.imul(Y,br)|0,S=S+Math.imul(K,qt)|0,E=E+Math.imul(K,br)|0;var $i=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+($i>>>26)|0,$i&=67108863,R=Math.imul(se,tt),S=Math.imul(se,It),S=S+Math.imul(J,tt)|0,E=Math.imul(J,It),R=R+Math.imul(Be,Nt)|0,S=S+Math.imul(Be,Lt)|0,S=S+Math.imul(Ge,Nt)|0,E=E+Math.imul(Ge,Lt)|0,R=R+Math.imul(qe,wt)|0,S=S+Math.imul(qe,Ut)|0,S=S+Math.imul(Ve,wt)|0,E=E+Math.imul(Ve,Ut)|0,R=R+Math.imul(De,dt)|0,S=S+Math.imul(De,Vt)|0,S=S+Math.imul(Je,dt)|0,E=E+Math.imul(Je,Vt)|0,R=R+Math.imul(Ke,pt)|0,S=S+Math.imul(Ke,Gt)|0,S=S+Math.imul(Re,pt)|0,E=E+Math.imul(Re,Gt)|0,R=R+Math.imul(Se,vt)|0,S=S+Math.imul(Se,Ft)|0,S=S+Math.imul(Me,vt)|0,E=E+Math.imul(Me,Ft)|0,R=R+Math.imul(W,_t)|0,S=S+Math.imul(W,Kt)|0,S=S+Math.imul(le,_t)|0,E=E+Math.imul(le,Kt)|0,R=R+Math.imul(re,qt)|0,S=S+Math.imul(re,br)|0,S=S+Math.imul(H,qt)|0,E=E+Math.imul(H,br)|0;var Bi=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,R=Math.imul(se,Nt),S=Math.imul(se,Lt),S=S+Math.imul(J,Nt)|0,E=Math.imul(J,Lt),R=R+Math.imul(Be,wt)|0,S=S+Math.imul(Be,Ut)|0,S=S+Math.imul(Ge,wt)|0,E=E+Math.imul(Ge,Ut)|0,R=R+Math.imul(qe,dt)|0,S=S+Math.imul(qe,Vt)|0,S=S+Math.imul(Ve,dt)|0,E=E+Math.imul(Ve,Vt)|0,R=R+Math.imul(De,pt)|0,S=S+Math.imul(De,Gt)|0,S=S+Math.imul(Je,pt)|0,E=E+Math.imul(Je,Gt)|0,R=R+Math.imul(Ke,vt)|0,S=S+Math.imul(Ke,Ft)|0,S=S+Math.imul(Re,vt)|0,E=E+Math.imul(Re,Ft)|0,R=R+Math.imul(Se,_t)|0,S=S+Math.imul(Se,Kt)|0,S=S+Math.imul(Me,_t)|0,E=E+Math.imul(Me,Kt)|0,R=R+Math.imul(W,qt)|0,S=S+Math.imul(W,br)|0,S=S+Math.imul(le,qt)|0,E=E+Math.imul(le,br)|0;var bi=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(bi>>>26)|0,bi&=67108863,R=Math.imul(se,wt),S=Math.imul(se,Ut),S=S+Math.imul(J,wt)|0,E=Math.imul(J,Ut),R=R+Math.imul(Be,dt)|0,S=S+Math.imul(Be,Vt)|0,S=S+Math.imul(Ge,dt)|0,E=E+Math.imul(Ge,Vt)|0,R=R+Math.imul(qe,pt)|0,S=S+Math.imul(qe,Gt)|0,S=S+Math.imul(Ve,pt)|0,E=E+Math.imul(Ve,Gt)|0,R=R+Math.imul(De,vt)|0,S=S+Math.imul(De,Ft)|0,S=S+Math.imul(Je,vt)|0,E=E+Math.imul(Je,Ft)|0,R=R+Math.imul(Ke,_t)|0,S=S+Math.imul(Ke,Kt)|0,S=S+Math.imul(Re,_t)|0,E=E+Math.imul(Re,Kt)|0,R=R+Math.imul(Se,qt)|0,S=S+Math.imul(Se,br)|0,S=S+Math.imul(Me,qt)|0,E=E+Math.imul(Me,br)|0;var Ei=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,R=Math.imul(se,dt),S=Math.imul(se,Vt),S=S+Math.imul(J,dt)|0,E=Math.imul(J,Vt),R=R+Math.imul(Be,pt)|0,S=S+Math.imul(Be,Gt)|0,S=S+Math.imul(Ge,pt)|0,E=E+Math.imul(Ge,Gt)|0,R=R+Math.imul(qe,vt)|0,S=S+Math.imul(qe,Ft)|0,S=S+Math.imul(Ve,vt)|0,E=E+Math.imul(Ve,Ft)|0,R=R+Math.imul(De,_t)|0,S=S+Math.imul(De,Kt)|0,S=S+Math.imul(Je,_t)|0,E=E+Math.imul(Je,Kt)|0,R=R+Math.imul(Ke,qt)|0,S=S+Math.imul(Ke,br)|0,S=S+Math.imul(Re,qt)|0,E=E+Math.imul(Re,br)|0;var Ai=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,R=Math.imul(se,pt),S=Math.imul(se,Gt),S=S+Math.imul(J,pt)|0,E=Math.imul(J,Gt),R=R+Math.imul(Be,vt)|0,S=S+Math.imul(Be,Ft)|0,S=S+Math.imul(Ge,vt)|0,E=E+Math.imul(Ge,Ft)|0,R=R+Math.imul(qe,_t)|0,S=S+Math.imul(qe,Kt)|0,S=S+Math.imul(Ve,_t)|0,E=E+Math.imul(Ve,Kt)|0,R=R+Math.imul(De,qt)|0,S=S+Math.imul(De,br)|0,S=S+Math.imul(Je,qt)|0,E=E+Math.imul(Je,br)|0;var Cn=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,R=Math.imul(se,vt),S=Math.imul(se,Ft),S=S+Math.imul(J,vt)|0,E=Math.imul(J,Ft),R=R+Math.imul(Be,_t)|0,S=S+Math.imul(Be,Kt)|0,S=S+Math.imul(Ge,_t)|0,E=E+Math.imul(Ge,Kt)|0,R=R+Math.imul(qe,qt)|0,S=S+Math.imul(qe,br)|0,S=S+Math.imul(Ve,qt)|0,E=E+Math.imul(Ve,br)|0;var Rs=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,R=Math.imul(se,_t),S=Math.imul(se,Kt),S=S+Math.imul(J,_t)|0,E=Math.imul(J,Kt),R=R+Math.imul(Be,qt)|0,S=S+Math.imul(Be,br)|0,S=S+Math.imul(Ge,qt)|0,E=E+Math.imul(Ge,br)|0;var ks=(I+R|0)+((S&8191)<<13)|0;I=(E+(S>>>13)|0)+(ks>>>26)|0,ks&=67108863,R=Math.imul(se,qt),S=Math.imul(se,br),S=S+Math.imul(J,qt)|0,E=Math.imul(J,br);var Ms=(I+R|0)+((S&8191)<<13)|0;return I=(E+(S>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,A[0]=Tt,A[1]=ur,A[2]=Xn,A[3]=ei,A[4]=ti,A[5]=ri,A[6]=bn,A[7]=qn,A[8]=Di,A[9]=Wn,A[10]=$i,A[11]=Bi,A[12]=bi,A[13]=Ei,A[14]=Ai,A[15]=Cn,A[16]=Rs,A[17]=ks,A[18]=Ms,I!==0&&(A[19]=I,d.length++),d};Math.imul||(C=y);function T(F,M,b){b.negative=M.negative^F.negative,b.length=F.length+M.length;for(var d=0,m=0,x=0;x>>26)|0,m+=A>>>26,A&=67108863}b.words[x]=I,d=A,A=m}return d!==0?b.words[x]=d:b.length--,b.strip()}function k(F,M,b){var d=new N;return d.mulp(F,M,b)}s.prototype.mulTo=function(M,b){var d,m=this.length+M.length;return this.length===10&&M.length===10?d=C(this,M,b):m<63?d=y(this,M,b):m<1024?d=T(this,M,b):d=k(this,M,b),d};function N(F,M){this.x=F,this.y=M}N.prototype.makeRBT=function(M){for(var b=new Array(M),d=s.prototype._countBits(M)-1,m=0;m>=1;return m},N.prototype.permute=function(M,b,d,m,x,A){for(var I=0;I>>1)x++;return 1<>>13,d[2*A+1]=x&8191,x=x>>>13;for(A=2*b;A>=26,b+=m/67108864|0,b+=x>>>26,this.words[d]=x&67108863}return b!==0&&(this.words[d]=b,this.length++),this},s.prototype.muln=function(M){return this.clone().imuln(M)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(M){var b=w(M);if(b.length===0)return new s(1);for(var d=this,m=0;m=0);var b=M%26,d=(M-b)/26,m=67108863>>>26-b<<26-b,x;if(b!==0){var A=0;for(x=0;x>>26-b}A&&(this.words[x]=A,this.length++)}if(d!==0){for(x=this.length-1;x>=0;x--)this.words[x+d]=this.words[x];for(x=0;x=0);var m;b?m=(b-b%26)/26:m=0;var x=M%26,A=Math.min((M-x)/26,this.length),I=67108863^67108863>>>x<A)for(this.length-=A,S=0;S=0&&(E!==0||S>=m);S--){var _=this.words[S]|0;this.words[S]=E<<26-x|_>>>x,E=_&I}return R&&E!==0&&(R.words[R.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(M,b,d){return n(this.negative===0),this.iushrn(M,b,d)},s.prototype.shln=function(M){return this.clone().ishln(M)},s.prototype.ushln=function(M){return this.clone().iushln(M)},s.prototype.shrn=function(M){return this.clone().ishrn(M)},s.prototype.ushrn=function(M){return this.clone().iushrn(M)},s.prototype.testn=function(M){n(typeof M=="number"&&M>=0);var b=M%26,d=(M-b)/26,m=1<=0);var b=M%26,d=(M-b)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(b!==0&&d++,this.length=Math.min(d,this.length),b!==0){var m=67108863^67108863>>>b<=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},s.prototype.isubn=function(M){if(n(typeof M=="number"),n(M<67108864),M<0)return this.iaddn(-M);if(this.negative!==0)return this.negative=0,this.iaddn(M),this.negative=1,this;if(this.words[0]-=M,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b>26)-(R/67108864|0),this.words[x+d]=A&67108863}for(;x>26,this.words[x+d]=A&67108863;if(I===0)return this.strip();for(n(I===-1),I=0,x=0;x>26,this.words[x]=A&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(M,b){var d=this.length-M.length,m=this.clone(),x=M,A=x.words[x.length-1]|0,I=this._countBits(A);d=26-I,d!==0&&(x=x.ushln(d),m.iushln(d),A=x.words[x.length-1]|0);var R=m.length-x.length,S;if(b!=="mod"){S=new s(null),S.length=R+1,S.words=new Array(S.length);for(var E=0;E=0;L--){var ie=(m.words[x.length+L]|0)*67108864+(m.words[x.length+L-1]|0);for(ie=Math.min(ie/A|0,67108863),m._ishlnsubmul(x,ie,L);m.negative!==0;)ie--,m.negative=0,m._ishlnsubmul(x,1,L),m.isZero()||(m.negative^=1);S&&(S.words[L]=ie)}return S&&S.strip(),m.strip(),b!=="div"&&d!==0&&m.iushrn(d),{div:S||null,mod:m}},s.prototype.divmod=function(M,b,d){if(n(!M.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var m,x,A;return this.negative!==0&&M.negative===0?(A=this.neg().divmod(M,b),b!=="mod"&&(m=A.div.neg()),b!=="div"&&(x=A.mod.neg(),d&&x.negative!==0&&x.iadd(M)),{div:m,mod:x}):this.negative===0&&M.negative!==0?(A=this.divmod(M.neg(),b),b!=="mod"&&(m=A.div.neg()),{div:m,mod:A.mod}):this.negative&M.negative?(A=this.neg().divmod(M.neg(),b),b!=="div"&&(x=A.mod.neg(),d&&x.negative!==0&&x.isub(M)),{div:A.div,mod:x}):M.length>this.length||this.cmp(M)<0?{div:new s(0),mod:this}:M.length===1?b==="div"?{div:this.divn(M.words[0]),mod:null}:b==="mod"?{div:null,mod:new s(this.modn(M.words[0]))}:{div:this.divn(M.words[0]),mod:new s(this.modn(M.words[0]))}:this._wordDiv(M,b)},s.prototype.div=function(M){return this.divmod(M,"div",!1).div},s.prototype.mod=function(M){return this.divmod(M,"mod",!1).mod},s.prototype.umod=function(M){return this.divmod(M,"mod",!0).mod},s.prototype.divRound=function(M){var b=this.divmod(M);if(b.mod.isZero())return b.div;var d=b.div.negative!==0?b.mod.isub(M):b.mod,m=M.ushrn(1),x=M.andln(1),A=d.cmp(m);return A<0||x===1&&A===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},s.prototype.modn=function(M){n(M<=67108863);for(var b=(1<<26)%M,d=0,m=this.length-1;m>=0;m--)d=(b*d+(this.words[m]|0))%M;return d},s.prototype.idivn=function(M){n(M<=67108863);for(var b=0,d=this.length-1;d>=0;d--){var m=(this.words[d]|0)+b*67108864;this.words[d]=m/M|0,b=m%M}return this.strip()},s.prototype.divn=function(M){return this.clone().idivn(M)},s.prototype.egcd=function(M){n(M.negative===0),n(!M.isZero());var b=this,d=M.clone();b.negative!==0?b=b.umod(M):b=b.clone();for(var m=new s(1),x=new s(0),A=new s(0),I=new s(1),R=0;b.isEven()&&d.isEven();)b.iushrn(1),d.iushrn(1),++R;for(var S=d.clone(),E=b.clone();!b.isZero();){for(var _=0,L=1;!(b.words[0]&L)&&_<26;++_,L<<=1);if(_>0)for(b.iushrn(_);_-- >0;)(m.isOdd()||x.isOdd())&&(m.iadd(S),x.isub(E)),m.iushrn(1),x.iushrn(1);for(var ie=0,q=1;!(d.words[0]&q)&&ie<26;++ie,q<<=1);if(ie>0)for(d.iushrn(ie);ie-- >0;)(A.isOdd()||I.isOdd())&&(A.iadd(S),I.isub(E)),A.iushrn(1),I.iushrn(1);b.cmp(d)>=0?(b.isub(d),m.isub(A),x.isub(I)):(d.isub(b),A.isub(m),I.isub(x))}return{a:A,b:I,gcd:d.iushln(R)}},s.prototype._invmp=function(M){n(M.negative===0),n(!M.isZero());var b=this,d=M.clone();b.negative!==0?b=b.umod(M):b=b.clone();for(var m=new s(1),x=new s(0),A=d.clone();b.cmpn(1)>0&&d.cmpn(1)>0;){for(var I=0,R=1;!(b.words[0]&R)&&I<26;++I,R<<=1);if(I>0)for(b.iushrn(I);I-- >0;)m.isOdd()&&m.iadd(A),m.iushrn(1);for(var S=0,E=1;!(d.words[0]&E)&&S<26;++S,E<<=1);if(S>0)for(d.iushrn(S);S-- >0;)x.isOdd()&&x.iadd(A),x.iushrn(1);b.cmp(d)>=0?(b.isub(d),m.isub(x)):(d.isub(b),x.isub(m))}var _;return b.cmpn(1)===0?_=m:_=x,_.cmpn(0)<0&&_.iadd(M),_},s.prototype.gcd=function(M){if(this.isZero())return M.abs();if(M.isZero())return this.abs();var b=this.clone(),d=M.clone();b.negative=0,d.negative=0;for(var m=0;b.isEven()&&d.isEven();m++)b.iushrn(1),d.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;d.isEven();)d.iushrn(1);var x=b.cmp(d);if(x<0){var A=b;b=d,d=A}else if(x===0||d.cmpn(1)===0)break;b.isub(d)}while(!0);return d.iushln(m)},s.prototype.invm=function(M){return this.egcd(M).a.umod(M)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(M){return this.words[0]&M},s.prototype.bincn=function(M){n(typeof M=="number");var b=M%26,d=(M-b)/26,m=1<>>26,I&=67108863,this.words[A]=I}return x!==0&&(this.words[A]=x,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(M){var b=M<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this.strip();var d;if(this.length>1)d=1;else{b&&(M=-M),n(M<=67108863,"Number is too big");var m=this.words[0]|0;d=m===M?0:mM.length)return 1;if(this.length=0;d--){var m=this.words[d]|0,x=M.words[d]|0;if(m!==x){mx&&(b=1);break}}return b},s.prototype.gtn=function(M){return this.cmpn(M)===1},s.prototype.gt=function(M){return this.cmp(M)===1},s.prototype.gten=function(M){return this.cmpn(M)>=0},s.prototype.gte=function(M){return this.cmp(M)>=0},s.prototype.ltn=function(M){return this.cmpn(M)===-1},s.prototype.lt=function(M){return this.cmp(M)===-1},s.prototype.lten=function(M){return this.cmpn(M)<=0},s.prototype.lte=function(M){return this.cmp(M)<=0},s.prototype.eqn=function(M){return this.cmpn(M)===0},s.prototype.eq=function(M){return this.cmp(M)===0},s.red=function(M){return new V(M)},s.prototype.toRed=function(M){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),M.convertTo(this)._forceRed(M)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(M){return this.red=M,this},s.prototype.forceRed=function(M){return n(!this.red,"Already a number in reduction context"),this._forceRed(M)},s.prototype.redAdd=function(M){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,M)},s.prototype.redIAdd=function(M){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,M)},s.prototype.redSub=function(M){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,M)},s.prototype.redISub=function(M){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,M)},s.prototype.redShl=function(M){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,M)},s.prototype.redMul=function(M){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.mul(this,M)},s.prototype.redIMul=function(M){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.imul(this,M)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(M){return n(this.red&&!M.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,M)};var O={k256:null,p224:null,p192:null,p25519:null};function B(F,M){this.name=F,this.p=new s(M,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var M=new s(null);return M.words=new Array(Math.ceil(this.n/13)),M},B.prototype.ireduce=function(M){var b=M,d;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),d=b.bitLength();while(d>this.n);var m=d0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},B.prototype.split=function(M,b){M.iushrn(this.n,0,b)},B.prototype.imulK=function(M){return M.imul(this.k)};function z(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,B),z.prototype.split=function(M,b){for(var d=4194303,m=Math.min(M.length,9),x=0;x>>22,A=I}A>>>=22,M.words[x-10]=A,A===0&&M.length>10?M.length-=10:M.length-=9},z.prototype.imulK=function(M){M.words[M.length]=0,M.words[M.length+1]=0,M.length+=2;for(var b=0,d=0;d>>=26,M.words[d]=x,b=m}return b!==0&&(M.words[M.length++]=b),M},s._prime=function(M){if(O[M])return O[M];var b;if(M==="k256")b=new z;else if(M==="p224")b=new G;else if(M==="p192")b=new $;else if(M==="p25519")b=new D;else throw new Error("Unknown prime "+M);return O[M]=b,b};function V(F){if(typeof F=="string"){var M=s._prime(F);this.m=M.p,this.prime=M}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(M){n(M.negative===0,"red works only with positives"),n(M.red,"red works only with red numbers")},V.prototype._verify2=function(M,b){n((M.negative|b.negative)===0,"red works only with positives"),n(M.red&&M.red===b.red,"red works only with red numbers")},V.prototype.imod=function(M){return this.prime?this.prime.ireduce(M)._forceRed(this):M.umod(this.m)._forceRed(this)},V.prototype.neg=function(M){return M.isZero()?M.clone():this.m.sub(M)._forceRed(this)},V.prototype.add=function(M,b){this._verify2(M,b);var d=M.add(b);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},V.prototype.iadd=function(M,b){this._verify2(M,b);var d=M.iadd(b);return d.cmp(this.m)>=0&&d.isub(this.m),d},V.prototype.sub=function(M,b){this._verify2(M,b);var d=M.sub(b);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},V.prototype.isub=function(M,b){this._verify2(M,b);var d=M.isub(b);return d.cmpn(0)<0&&d.iadd(this.m),d},V.prototype.shl=function(M,b){return this._verify1(M),this.imod(M.ushln(b))},V.prototype.imul=function(M,b){return this._verify2(M,b),this.imod(M.imul(b))},V.prototype.mul=function(M,b){return this._verify2(M,b),this.imod(M.mul(b))},V.prototype.isqr=function(M){return this.imul(M,M.clone())},V.prototype.sqr=function(M){return this.mul(M,M)},V.prototype.sqrt=function(M){if(M.isZero())return M.clone();var b=this.m.andln(3);if(n(b%2===1),b===3){var d=this.m.add(new s(1)).iushrn(2);return this.pow(M,d)}for(var m=this.m.subn(1),x=0;!m.isZero()&&m.andln(1)===0;)x++,m.iushrn(1);n(!m.isZero());var A=new s(1).toRed(this),I=A.redNeg(),R=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new s(2*S*S).toRed(this);this.pow(S,R).cmp(I)!==0;)S.redIAdd(I);for(var E=this.pow(S,m),_=this.pow(M,m.addn(1).iushrn(1)),L=this.pow(M,m),ie=x;L.cmp(A)!==0;){for(var q=L,Y=0;q.cmp(A)!==0;Y++)q=q.redSqr();n(Y=0;x--){for(var E=b.words[x],_=S-1;_>=0;_--){var L=E>>_&1;if(A!==m[0]&&(A=this.sqr(A)),L===0&&I===0){R=0;continue}I<<=1,I|=L,R++,!(R!==d&&(x!==0||_!==0))&&(A=this.mul(A,m[I]),R=0,I=0)}S=26}return A},V.prototype.convertTo=function(M){var b=M.umod(this.m);return b===M?b.clone():b},V.prototype.convertFrom=function(M){var b=M.clone();return b.red=null,b},s.mont=function(M){return new Q(M)};function Q(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(Q,V),Q.prototype.convertTo=function(M){return this.imod(M.ushln(this.shift))},Q.prototype.convertFrom=function(M){var b=this.imod(M.mul(this.rinv));return b.red=null,b},Q.prototype.imul=function(M,b){if(M.isZero()||b.isZero())return M.words[0]=0,M.length=1,M;var d=M.imul(b),m=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=d.isub(m).iushrn(this.shift),A=x;return x.cmp(this.m)>=0?A=x.isub(this.m):x.cmpn(0)<0&&(A=x.iadd(this.m)),A._forceRed(this)},Q.prototype.mul=function(M,b){if(M.isZero()||b.isZero())return new s(0)._forceRed(this);var d=M.mul(b),m=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=d.isub(m).iushrn(this.shift),A=x;return x.cmp(this.m)>=0?A=x.isub(this.m):x.cmpn(0)<0&&(A=x.iadd(this.m)),A._forceRed(this)},Q.prototype.invm=function(M){var b=this.imod(M._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(r,ct)}(PTe)),aS}var M6={},OTe={get exports(){return M6},set exports(r){M6=r}},Fie;function yD(){if(Fie)return M6;Fie=1;var r;OTe.exports=function(i){return r||(r=new e(null)),r.generate(i)};function e(n){this.rand=n}if(M6.Rand=e,e.prototype.generate=function(i){return this._rand(i)},e.prototype._rand=function(i){if(this.rand.getBytes)return this.rand.getBytes(i);for(var s=new Uint8Array(i),o=0;o=0);return a},t.prototype._randrange=function(i,s){var o=s.sub(i);return i.add(this._randbelow(o))},t.prototype.test=function(i,s,o){var a=i.bitLength(),l=r.mont(i),u=new r(1).toRed(l);s||(s=Math.max(1,a/48|0));for(var h=i.subn(1),p=0;!h.testn(p);p++);for(var g=i.shrn(p),w=h.toRed(l),y=!0;s>0;s--){var C=this._randrange(new r(2),h);o&&o(C);var T=C.toRed(l).redPow(g);if(!(T.cmp(u)===0||T.cmp(w)===0)){for(var k=1;k0;s--){var w=this._randrange(new r(2),u),y=i.gcd(w);if(y.cmpn(1)!==0)return y;var C=w.toRed(a).redPow(p);if(!(C.cmp(l)===0||C.cmp(g)===0)){for(var T=1;Tk;)O.ishrn(1);if(O.isEven()&&O.iadd(s),O.testn(1)||O.iadd(o),N.cmp(o)){if(!N.cmp(a))for(;O.mod(l).cmp(u);)O.iadd(p)}else for(;O.mod(t).cmp(h);)O.iadd(p);if(B=O.shrn(1),y(B)&&y(O)&&C(B)&&C(O)&&i.test(B)&&i.test(O))return O}}return _D}const DTe={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};var ED,Wie;function $Te(){if(Wie)return ED;Wie=1;var r=wo(),e=zie(),t=new e,n=new r(24),i=new r(11),s=new r(10),o=new r(3),a=new r(7),l=qie(),u=Xv();ED=y;function h(T,k){return k=k||"utf8",Dt.isBuffer(T)||(T=new Dt(T,k)),this._pub=new r(T),this}function p(T,k){return k=k||"utf8",Dt.isBuffer(T)||(T=new Dt(T,k)),this._priv=new r(T),this}var g={};function w(T,k){var N=k.toString("hex"),O=[N,T.toString(16)].join("_");if(O in g)return g[O];var B=0;if(T.isEven()||!l.simpleSieve||!l.fermatTest(T)||!t.test(T))return B+=1,N==="02"||N==="05"?B+=8:B+=4,g[O]=B,B;t.test(T.shrn(1))||(B+=2);var z;switch(N){case"02":T.mod(n).cmp(i)&&(B+=8);break;case"05":z=T.mod(s),z.cmp(o)&&z.cmp(a)&&(B+=8);break;default:B+=4}return g[O]=B,B}function y(T,k,N){this.setGenerator(k),this.__prime=new r(T),this._prime=r.mont(this.__prime),this._primeLen=T.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,N?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=w(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new r(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(T){T=new r(T),T=T.toRed(this._prime);var k=T.redPow(this._priv).fromRed(),N=new Dt(k.toArray()),O=this.getPrime();if(N.length0?d:m},s.min=function(d,m){return d.cmp(m)<0?d:m},s.prototype._init=function(d,m,x){if(typeof d=="number")return this._initNumber(d,m,x);if(typeof d=="object")return this._initArray(d,m,x);m==="hex"&&(m=16),n(m===(m|0)&&m>=2&&m<=36),d=d.toString().replace(/\s+/g,"");var A=0;d[0]==="-"&&(A++,this.negative=1),A=0;A-=3)R=d[A]|d[A-1]<<8|d[A-2]<<16,this.words[I]|=R<>>26-S&67108863,S+=24,S>=26&&(S-=26,I++);else if(x==="le")for(A=0,I=0;A>>26-S&67108863,S+=24,S>=26&&(S-=26,I++);return this._strip()};function a(b,d){var m=b.charCodeAt(d);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;n(!1,"Invalid character in "+b)}function l(b,d,m){var x=a(b,m);return m-1>=d&&(x|=a(b,m-1)<<4),x}s.prototype._parseHex=function(d,m,x){this.length=Math.ceil((d.length-m)/6),this.words=new Array(this.length);for(var A=0;A=m;A-=2)S=l(d,m,A)<=18?(I-=18,R+=1,this.words[R]|=S>>>26):I+=8;else{var E=d.length-m;for(A=E%2===0?m+1:m;A=18?(I-=18,R+=1,this.words[R]|=S>>>26):I+=8}this._strip()};function u(b,d,m,x){for(var A=0,I=0,R=Math.min(b.length,m),S=d;S=49?I=E-49+10:E>=17?I=E-17+10:I=E,n(E>=0&&I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?""}var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(d,m){d=d||10,m=m|0||1;var x;if(d===16||d==="hex"){x="";for(var A=0,I=0,R=0;R>>24-A&16777215,A+=2,A>=26&&(A-=26,R--),I!==0||R!==this.length-1?x=g[6-E.length]+E+x:x=E+x}for(I!==0&&(x=I.toString(16)+x);x.length%m!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(d===(d|0)&&d>=2&&d<=36){var _=w[d],L=y[d];x="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var q=ie.modrn(L).toString(d);ie=ie.idivn(L),ie.isZero()?x=q+x:x=g[_-q.length]+q+x}for(this.isZero()&&(x="0"+x);x.length%m!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(d,m){return this.toArrayLike(o,d,m)}),s.prototype.toArray=function(d,m){return this.toArrayLike(Array,d,m)};var C=function(d,m){return d.allocUnsafe?d.allocUnsafe(m):new d(m)};s.prototype.toArrayLike=function(d,m,x){this._strip();var A=this.byteLength(),I=x||Math.max(1,A);n(A<=I,"byte array longer than desired length"),n(I>0,"Requested array length <= 0");var R=C(d,I),S=m==="le"?"LE":"BE";return this["_toArrayLike"+S](R,A),R},s.prototype._toArrayLikeLE=function(d,m){for(var x=0,A=0,I=0,R=0;I>8&255),x>16&255),R===6?(x>24&255),A=0,R=0):(A=S>>>24,R+=2)}if(x=0&&(d[x--]=S>>8&255),x>=0&&(d[x--]=S>>16&255),R===6?(x>=0&&(d[x--]=S>>24&255),A=0,R=0):(A=S>>>24,R+=2)}if(x>=0)for(d[x--]=A;x>=0;)d[x--]=0},Math.clz32?s.prototype._countBits=function(d){return 32-Math.clz32(d)}:s.prototype._countBits=function(d){var m=d,x=0;return m>=4096&&(x+=13,m>>>=13),m>=64&&(x+=7,m>>>=7),m>=8&&(x+=4,m>>>=4),m>=2&&(x+=2,m>>>=2),x+m},s.prototype._zeroBits=function(d){if(d===0)return 26;var m=d,x=0;return m&8191||(x+=13,m>>>=13),m&127||(x+=7,m>>>=7),m&15||(x+=4,m>>>=4),m&3||(x+=2,m>>>=2),m&1||x++,x},s.prototype.bitLength=function(){var d=this.words[this.length-1],m=this._countBits(d);return(this.length-1)*26+m};function T(b){for(var d=new Array(b.bitLength()),m=0;m>>A&1}return d}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,m=0;md.length?this.clone().ior(d):d.clone().ior(this)},s.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},s.prototype.iuand=function(d){var m;this.length>d.length?m=d:m=this;for(var x=0;xd.length?this.clone().iand(d):d.clone().iand(this)},s.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},s.prototype.iuxor=function(d){var m,x;this.length>d.length?(m=this,x=d):(m=d,x=this);for(var A=0;Ad.length?this.clone().ixor(d):d.clone().ixor(this)},s.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},s.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var m=Math.ceil(d/26)|0,x=d%26;this._expand(m),x>0&&m--;for(var A=0;A0&&(this.words[A]=~this.words[A]&67108863>>26-x),this._strip()},s.prototype.notn=function(d){return this.clone().inotn(d)},s.prototype.setn=function(d,m){n(typeof d=="number"&&d>=0);var x=d/26|0,A=d%26;return this._expand(x+1),m?this.words[x]=this.words[x]|1<d.length?(x=this,A=d):(x=d,A=this);for(var I=0,R=0;R>>26;for(;I!==0&&R>>26;if(this.length=x.length,I!==0)this.words[this.length]=I,this.length++;else if(x!==this)for(;Rd.length?this.clone().iadd(d):d.clone().iadd(this)},s.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var m=this.iadd(d);return d.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var x=this.cmp(d);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var A,I;x>0?(A=this,I=d):(A=d,I=this);for(var R=0,S=0;S>26,this.words[S]=m&67108863;for(;R!==0&&S>26,this.words[S]=m&67108863;if(R===0&&S>>26,ie=E&67108863,q=Math.min(_,d.length-1),Y=Math.max(0,_-b.length+1);Y<=q;Y++){var K=_-Y|0;A=b.words[K]|0,I=d.words[Y]|0,R=A*I+ie,L+=R/67108864|0,ie=R&67108863}m.words[_]=ie|0,E=L|0}return E!==0?m.words[_]=E|0:m.length--,m._strip()}var N=function(d,m,x){var A=d.words,I=m.words,R=x.words,S=0,E,_,L,ie=A[0]|0,q=ie&8191,Y=ie>>>13,K=A[1]|0,te=K&8191,re=K>>>13,H=A[2]|0,U=H&8191,W=H>>>13,le=A[3]|0,de=le&8191,Se=le>>>13,Me=A[4]|0,ke=Me&8191,Ke=Me>>>13,Re=A[5]|0,je=Re&8191,De=Re>>>13,Je=A[6]|0,ze=Je&8191,qe=Je>>>13,Ve=A[7]|0,He=Ve&8191,Be=Ve>>>13,Ge=A[8]|0,Xe=Ge&8191,se=Ge>>>13,J=A[9]|0,X=J&8191,ue=J>>>13,we=I[0]|0,ye=we&8191,Ie=we>>>13,it=I[1]|0,ot=it&8191,tt=it>>>13,It=I[2]|0,st=It&8191,Nt=It>>>13,Lt=I[3]|0,ht=Lt&8191,wt=Lt>>>13,Ut=I[4]|0,ft=Ut&8191,dt=Ut>>>13,Vt=I[5]|0,xt=Vt&8191,pt=Vt>>>13,Gt=I[6]|0,gt=Gt&8191,vt=Gt>>>13,Ft=I[7]|0,lt=Ft&8191,_t=Ft>>>13,Kt=I[8]|0,Ht=Kt&8191,qt=Kt>>>13,br=I[9]|0,Tt=br&8191,ur=br>>>13;x.negative=d.negative^m.negative,x.length=19,E=Math.imul(q,ye),_=Math.imul(q,Ie),_=_+Math.imul(Y,ye)|0,L=Math.imul(Y,Ie);var Xn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,E=Math.imul(te,ye),_=Math.imul(te,Ie),_=_+Math.imul(re,ye)|0,L=Math.imul(re,Ie),E=E+Math.imul(q,ot)|0,_=_+Math.imul(q,tt)|0,_=_+Math.imul(Y,ot)|0,L=L+Math.imul(Y,tt)|0;var ei=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ei>>>26)|0,ei&=67108863,E=Math.imul(U,ye),_=Math.imul(U,Ie),_=_+Math.imul(W,ye)|0,L=Math.imul(W,Ie),E=E+Math.imul(te,ot)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,ot)|0,L=L+Math.imul(re,tt)|0,E=E+Math.imul(q,st)|0,_=_+Math.imul(q,Nt)|0,_=_+Math.imul(Y,st)|0,L=L+Math.imul(Y,Nt)|0;var ti=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ti>>>26)|0,ti&=67108863,E=Math.imul(de,ye),_=Math.imul(de,Ie),_=_+Math.imul(Se,ye)|0,L=Math.imul(Se,Ie),E=E+Math.imul(U,ot)|0,_=_+Math.imul(U,tt)|0,_=_+Math.imul(W,ot)|0,L=L+Math.imul(W,tt)|0,E=E+Math.imul(te,st)|0,_=_+Math.imul(te,Nt)|0,_=_+Math.imul(re,st)|0,L=L+Math.imul(re,Nt)|0,E=E+Math.imul(q,ht)|0,_=_+Math.imul(q,wt)|0,_=_+Math.imul(Y,ht)|0,L=L+Math.imul(Y,wt)|0;var ri=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ri>>>26)|0,ri&=67108863,E=Math.imul(ke,ye),_=Math.imul(ke,Ie),_=_+Math.imul(Ke,ye)|0,L=Math.imul(Ke,Ie),E=E+Math.imul(de,ot)|0,_=_+Math.imul(de,tt)|0,_=_+Math.imul(Se,ot)|0,L=L+Math.imul(Se,tt)|0,E=E+Math.imul(U,st)|0,_=_+Math.imul(U,Nt)|0,_=_+Math.imul(W,st)|0,L=L+Math.imul(W,Nt)|0,E=E+Math.imul(te,ht)|0,_=_+Math.imul(te,wt)|0,_=_+Math.imul(re,ht)|0,L=L+Math.imul(re,wt)|0,E=E+Math.imul(q,ft)|0,_=_+Math.imul(q,dt)|0,_=_+Math.imul(Y,ft)|0,L=L+Math.imul(Y,dt)|0;var bn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(bn>>>26)|0,bn&=67108863,E=Math.imul(je,ye),_=Math.imul(je,Ie),_=_+Math.imul(De,ye)|0,L=Math.imul(De,Ie),E=E+Math.imul(ke,ot)|0,_=_+Math.imul(ke,tt)|0,_=_+Math.imul(Ke,ot)|0,L=L+Math.imul(Ke,tt)|0,E=E+Math.imul(de,st)|0,_=_+Math.imul(de,Nt)|0,_=_+Math.imul(Se,st)|0,L=L+Math.imul(Se,Nt)|0,E=E+Math.imul(U,ht)|0,_=_+Math.imul(U,wt)|0,_=_+Math.imul(W,ht)|0,L=L+Math.imul(W,wt)|0,E=E+Math.imul(te,ft)|0,_=_+Math.imul(te,dt)|0,_=_+Math.imul(re,ft)|0,L=L+Math.imul(re,dt)|0,E=E+Math.imul(q,xt)|0,_=_+Math.imul(q,pt)|0,_=_+Math.imul(Y,xt)|0,L=L+Math.imul(Y,pt)|0;var qn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(qn>>>26)|0,qn&=67108863,E=Math.imul(ze,ye),_=Math.imul(ze,Ie),_=_+Math.imul(qe,ye)|0,L=Math.imul(qe,Ie),E=E+Math.imul(je,ot)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(De,ot)|0,L=L+Math.imul(De,tt)|0,E=E+Math.imul(ke,st)|0,_=_+Math.imul(ke,Nt)|0,_=_+Math.imul(Ke,st)|0,L=L+Math.imul(Ke,Nt)|0,E=E+Math.imul(de,ht)|0,_=_+Math.imul(de,wt)|0,_=_+Math.imul(Se,ht)|0,L=L+Math.imul(Se,wt)|0,E=E+Math.imul(U,ft)|0,_=_+Math.imul(U,dt)|0,_=_+Math.imul(W,ft)|0,L=L+Math.imul(W,dt)|0,E=E+Math.imul(te,xt)|0,_=_+Math.imul(te,pt)|0,_=_+Math.imul(re,xt)|0,L=L+Math.imul(re,pt)|0,E=E+Math.imul(q,gt)|0,_=_+Math.imul(q,vt)|0,_=_+Math.imul(Y,gt)|0,L=L+Math.imul(Y,vt)|0;var Di=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Di>>>26)|0,Di&=67108863,E=Math.imul(He,ye),_=Math.imul(He,Ie),_=_+Math.imul(Be,ye)|0,L=Math.imul(Be,Ie),E=E+Math.imul(ze,ot)|0,_=_+Math.imul(ze,tt)|0,_=_+Math.imul(qe,ot)|0,L=L+Math.imul(qe,tt)|0,E=E+Math.imul(je,st)|0,_=_+Math.imul(je,Nt)|0,_=_+Math.imul(De,st)|0,L=L+Math.imul(De,Nt)|0,E=E+Math.imul(ke,ht)|0,_=_+Math.imul(ke,wt)|0,_=_+Math.imul(Ke,ht)|0,L=L+Math.imul(Ke,wt)|0,E=E+Math.imul(de,ft)|0,_=_+Math.imul(de,dt)|0,_=_+Math.imul(Se,ft)|0,L=L+Math.imul(Se,dt)|0,E=E+Math.imul(U,xt)|0,_=_+Math.imul(U,pt)|0,_=_+Math.imul(W,xt)|0,L=L+Math.imul(W,pt)|0,E=E+Math.imul(te,gt)|0,_=_+Math.imul(te,vt)|0,_=_+Math.imul(re,gt)|0,L=L+Math.imul(re,vt)|0,E=E+Math.imul(q,lt)|0,_=_+Math.imul(q,_t)|0,_=_+Math.imul(Y,lt)|0,L=L+Math.imul(Y,_t)|0;var Wn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,E=Math.imul(Xe,ye),_=Math.imul(Xe,Ie),_=_+Math.imul(se,ye)|0,L=Math.imul(se,Ie),E=E+Math.imul(He,ot)|0,_=_+Math.imul(He,tt)|0,_=_+Math.imul(Be,ot)|0,L=L+Math.imul(Be,tt)|0,E=E+Math.imul(ze,st)|0,_=_+Math.imul(ze,Nt)|0,_=_+Math.imul(qe,st)|0,L=L+Math.imul(qe,Nt)|0,E=E+Math.imul(je,ht)|0,_=_+Math.imul(je,wt)|0,_=_+Math.imul(De,ht)|0,L=L+Math.imul(De,wt)|0,E=E+Math.imul(ke,ft)|0,_=_+Math.imul(ke,dt)|0,_=_+Math.imul(Ke,ft)|0,L=L+Math.imul(Ke,dt)|0,E=E+Math.imul(de,xt)|0,_=_+Math.imul(de,pt)|0,_=_+Math.imul(Se,xt)|0,L=L+Math.imul(Se,pt)|0,E=E+Math.imul(U,gt)|0,_=_+Math.imul(U,vt)|0,_=_+Math.imul(W,gt)|0,L=L+Math.imul(W,vt)|0,E=E+Math.imul(te,lt)|0,_=_+Math.imul(te,_t)|0,_=_+Math.imul(re,lt)|0,L=L+Math.imul(re,_t)|0,E=E+Math.imul(q,Ht)|0,_=_+Math.imul(q,qt)|0,_=_+Math.imul(Y,Ht)|0,L=L+Math.imul(Y,qt)|0;var $i=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+($i>>>26)|0,$i&=67108863,E=Math.imul(X,ye),_=Math.imul(X,Ie),_=_+Math.imul(ue,ye)|0,L=Math.imul(ue,Ie),E=E+Math.imul(Xe,ot)|0,_=_+Math.imul(Xe,tt)|0,_=_+Math.imul(se,ot)|0,L=L+Math.imul(se,tt)|0,E=E+Math.imul(He,st)|0,_=_+Math.imul(He,Nt)|0,_=_+Math.imul(Be,st)|0,L=L+Math.imul(Be,Nt)|0,E=E+Math.imul(ze,ht)|0,_=_+Math.imul(ze,wt)|0,_=_+Math.imul(qe,ht)|0,L=L+Math.imul(qe,wt)|0,E=E+Math.imul(je,ft)|0,_=_+Math.imul(je,dt)|0,_=_+Math.imul(De,ft)|0,L=L+Math.imul(De,dt)|0,E=E+Math.imul(ke,xt)|0,_=_+Math.imul(ke,pt)|0,_=_+Math.imul(Ke,xt)|0,L=L+Math.imul(Ke,pt)|0,E=E+Math.imul(de,gt)|0,_=_+Math.imul(de,vt)|0,_=_+Math.imul(Se,gt)|0,L=L+Math.imul(Se,vt)|0,E=E+Math.imul(U,lt)|0,_=_+Math.imul(U,_t)|0,_=_+Math.imul(W,lt)|0,L=L+Math.imul(W,_t)|0,E=E+Math.imul(te,Ht)|0,_=_+Math.imul(te,qt)|0,_=_+Math.imul(re,Ht)|0,L=L+Math.imul(re,qt)|0,E=E+Math.imul(q,Tt)|0,_=_+Math.imul(q,ur)|0,_=_+Math.imul(Y,Tt)|0,L=L+Math.imul(Y,ur)|0;var Bi=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,E=Math.imul(X,ot),_=Math.imul(X,tt),_=_+Math.imul(ue,ot)|0,L=Math.imul(ue,tt),E=E+Math.imul(Xe,st)|0,_=_+Math.imul(Xe,Nt)|0,_=_+Math.imul(se,st)|0,L=L+Math.imul(se,Nt)|0,E=E+Math.imul(He,ht)|0,_=_+Math.imul(He,wt)|0,_=_+Math.imul(Be,ht)|0,L=L+Math.imul(Be,wt)|0,E=E+Math.imul(ze,ft)|0,_=_+Math.imul(ze,dt)|0,_=_+Math.imul(qe,ft)|0,L=L+Math.imul(qe,dt)|0,E=E+Math.imul(je,xt)|0,_=_+Math.imul(je,pt)|0,_=_+Math.imul(De,xt)|0,L=L+Math.imul(De,pt)|0,E=E+Math.imul(ke,gt)|0,_=_+Math.imul(ke,vt)|0,_=_+Math.imul(Ke,gt)|0,L=L+Math.imul(Ke,vt)|0,E=E+Math.imul(de,lt)|0,_=_+Math.imul(de,_t)|0,_=_+Math.imul(Se,lt)|0,L=L+Math.imul(Se,_t)|0,E=E+Math.imul(U,Ht)|0,_=_+Math.imul(U,qt)|0,_=_+Math.imul(W,Ht)|0,L=L+Math.imul(W,qt)|0,E=E+Math.imul(te,Tt)|0,_=_+Math.imul(te,ur)|0,_=_+Math.imul(re,Tt)|0,L=L+Math.imul(re,ur)|0;var bi=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(bi>>>26)|0,bi&=67108863,E=Math.imul(X,st),_=Math.imul(X,Nt),_=_+Math.imul(ue,st)|0,L=Math.imul(ue,Nt),E=E+Math.imul(Xe,ht)|0,_=_+Math.imul(Xe,wt)|0,_=_+Math.imul(se,ht)|0,L=L+Math.imul(se,wt)|0,E=E+Math.imul(He,ft)|0,_=_+Math.imul(He,dt)|0,_=_+Math.imul(Be,ft)|0,L=L+Math.imul(Be,dt)|0,E=E+Math.imul(ze,xt)|0,_=_+Math.imul(ze,pt)|0,_=_+Math.imul(qe,xt)|0,L=L+Math.imul(qe,pt)|0,E=E+Math.imul(je,gt)|0,_=_+Math.imul(je,vt)|0,_=_+Math.imul(De,gt)|0,L=L+Math.imul(De,vt)|0,E=E+Math.imul(ke,lt)|0,_=_+Math.imul(ke,_t)|0,_=_+Math.imul(Ke,lt)|0,L=L+Math.imul(Ke,_t)|0,E=E+Math.imul(de,Ht)|0,_=_+Math.imul(de,qt)|0,_=_+Math.imul(Se,Ht)|0,L=L+Math.imul(Se,qt)|0,E=E+Math.imul(U,Tt)|0,_=_+Math.imul(U,ur)|0,_=_+Math.imul(W,Tt)|0,L=L+Math.imul(W,ur)|0;var Ei=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,E=Math.imul(X,ht),_=Math.imul(X,wt),_=_+Math.imul(ue,ht)|0,L=Math.imul(ue,wt),E=E+Math.imul(Xe,ft)|0,_=_+Math.imul(Xe,dt)|0,_=_+Math.imul(se,ft)|0,L=L+Math.imul(se,dt)|0,E=E+Math.imul(He,xt)|0,_=_+Math.imul(He,pt)|0,_=_+Math.imul(Be,xt)|0,L=L+Math.imul(Be,pt)|0,E=E+Math.imul(ze,gt)|0,_=_+Math.imul(ze,vt)|0,_=_+Math.imul(qe,gt)|0,L=L+Math.imul(qe,vt)|0,E=E+Math.imul(je,lt)|0,_=_+Math.imul(je,_t)|0,_=_+Math.imul(De,lt)|0,L=L+Math.imul(De,_t)|0,E=E+Math.imul(ke,Ht)|0,_=_+Math.imul(ke,qt)|0,_=_+Math.imul(Ke,Ht)|0,L=L+Math.imul(Ke,qt)|0,E=E+Math.imul(de,Tt)|0,_=_+Math.imul(de,ur)|0,_=_+Math.imul(Se,Tt)|0,L=L+Math.imul(Se,ur)|0;var Ai=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,E=Math.imul(X,ft),_=Math.imul(X,dt),_=_+Math.imul(ue,ft)|0,L=Math.imul(ue,dt),E=E+Math.imul(Xe,xt)|0,_=_+Math.imul(Xe,pt)|0,_=_+Math.imul(se,xt)|0,L=L+Math.imul(se,pt)|0,E=E+Math.imul(He,gt)|0,_=_+Math.imul(He,vt)|0,_=_+Math.imul(Be,gt)|0,L=L+Math.imul(Be,vt)|0,E=E+Math.imul(ze,lt)|0,_=_+Math.imul(ze,_t)|0,_=_+Math.imul(qe,lt)|0,L=L+Math.imul(qe,_t)|0,E=E+Math.imul(je,Ht)|0,_=_+Math.imul(je,qt)|0,_=_+Math.imul(De,Ht)|0,L=L+Math.imul(De,qt)|0,E=E+Math.imul(ke,Tt)|0,_=_+Math.imul(ke,ur)|0,_=_+Math.imul(Ke,Tt)|0,L=L+Math.imul(Ke,ur)|0;var Cn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,E=Math.imul(X,xt),_=Math.imul(X,pt),_=_+Math.imul(ue,xt)|0,L=Math.imul(ue,pt),E=E+Math.imul(Xe,gt)|0,_=_+Math.imul(Xe,vt)|0,_=_+Math.imul(se,gt)|0,L=L+Math.imul(se,vt)|0,E=E+Math.imul(He,lt)|0,_=_+Math.imul(He,_t)|0,_=_+Math.imul(Be,lt)|0,L=L+Math.imul(Be,_t)|0,E=E+Math.imul(ze,Ht)|0,_=_+Math.imul(ze,qt)|0,_=_+Math.imul(qe,Ht)|0,L=L+Math.imul(qe,qt)|0,E=E+Math.imul(je,Tt)|0,_=_+Math.imul(je,ur)|0,_=_+Math.imul(De,Tt)|0,L=L+Math.imul(De,ur)|0;var Rs=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,E=Math.imul(X,gt),_=Math.imul(X,vt),_=_+Math.imul(ue,gt)|0,L=Math.imul(ue,vt),E=E+Math.imul(Xe,lt)|0,_=_+Math.imul(Xe,_t)|0,_=_+Math.imul(se,lt)|0,L=L+Math.imul(se,_t)|0,E=E+Math.imul(He,Ht)|0,_=_+Math.imul(He,qt)|0,_=_+Math.imul(Be,Ht)|0,L=L+Math.imul(Be,qt)|0,E=E+Math.imul(ze,Tt)|0,_=_+Math.imul(ze,ur)|0,_=_+Math.imul(qe,Tt)|0,L=L+Math.imul(qe,ur)|0;var ks=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ks>>>26)|0,ks&=67108863,E=Math.imul(X,lt),_=Math.imul(X,_t),_=_+Math.imul(ue,lt)|0,L=Math.imul(ue,_t),E=E+Math.imul(Xe,Ht)|0,_=_+Math.imul(Xe,qt)|0,_=_+Math.imul(se,Ht)|0,L=L+Math.imul(se,qt)|0,E=E+Math.imul(He,Tt)|0,_=_+Math.imul(He,ur)|0,_=_+Math.imul(Be,Tt)|0,L=L+Math.imul(Be,ur)|0;var Ms=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,E=Math.imul(X,Ht),_=Math.imul(X,qt),_=_+Math.imul(ue,Ht)|0,L=Math.imul(ue,qt),E=E+Math.imul(Xe,Tt)|0,_=_+Math.imul(Xe,ur)|0,_=_+Math.imul(se,Tt)|0,L=L+Math.imul(se,ur)|0;var Zo=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,E=Math.imul(X,Tt),_=Math.imul(X,ur),_=_+Math.imul(ue,Tt)|0,L=Math.imul(ue,ur);var Ka=(S+E|0)+((_&8191)<<13)|0;return S=(L+(_>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,R[0]=Xn,R[1]=ei,R[2]=ti,R[3]=ri,R[4]=bn,R[5]=qn,R[6]=Di,R[7]=Wn,R[8]=$i,R[9]=Bi,R[10]=bi,R[11]=Ei,R[12]=Ai,R[13]=Cn,R[14]=Rs,R[15]=ks,R[16]=Ms,R[17]=Zo,R[18]=Ka,S!==0&&(R[19]=S,x.length++),x};Math.imul||(N=k);function O(b,d,m){m.negative=d.negative^b.negative,m.length=b.length+d.length;for(var x=0,A=0,I=0;I>>26)|0,A+=R>>>26,R&=67108863}m.words[I]=S,x=R,R=A}return x!==0?m.words[I]=x:m.length--,m._strip()}function B(b,d,m){return O(b,d,m)}s.prototype.mulTo=function(d,m){var x,A=this.length+d.length;return this.length===10&&d.length===10?x=N(this,d,m):A<63?x=k(this,d,m):A<1024?x=O(this,d,m):x=B(this,d,m),x},s.prototype.mul=function(d){var m=new s(null);return m.words=new Array(this.length+d.length),this.mulTo(d,m)},s.prototype.mulf=function(d){var m=new s(null);return m.words=new Array(this.length+d.length),B(this,d,m)},s.prototype.imul=function(d){return this.clone().mulTo(d,this)},s.prototype.imuln=function(d){var m=d<0;m&&(d=-d),n(typeof d=="number"),n(d<67108864);for(var x=0,A=0;A>=26,x+=I/67108864|0,x+=R>>>26,this.words[A]=R&67108863}return x!==0&&(this.words[A]=x,this.length++),m?this.ineg():this},s.prototype.muln=function(d){return this.clone().imuln(d)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(d){var m=T(d);if(m.length===0)return new s(1);for(var x=this,A=0;A=0);var m=d%26,x=(d-m)/26,A=67108863>>>26-m<<26-m,I;if(m!==0){var R=0;for(I=0;I>>26-m}R&&(this.words[I]=R,this.length++)}if(x!==0){for(I=this.length-1;I>=0;I--)this.words[I+x]=this.words[I];for(I=0;I=0);var A;m?A=(m-m%26)/26:A=0;var I=d%26,R=Math.min((d-I)/26,this.length),S=67108863^67108863>>>I<R)for(this.length-=R,_=0;_=0&&(L!==0||_>=A);_--){var ie=this.words[_]|0;this.words[_]=L<<26-I|ie>>>I,L=ie&S}return E&&L!==0&&(E.words[E.length++]=L),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(d,m,x){return n(this.negative===0),this.iushrn(d,m,x)},s.prototype.shln=function(d){return this.clone().ishln(d)},s.prototype.ushln=function(d){return this.clone().iushln(d)},s.prototype.shrn=function(d){return this.clone().ishrn(d)},s.prototype.ushrn=function(d){return this.clone().iushrn(d)},s.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var m=d%26,x=(d-m)/26,A=1<=0);var m=d%26,x=(d-m)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(m!==0&&x++,this.length=Math.min(x,this.length),m!==0){var A=67108863^67108863>>>m<=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},s.prototype.isubn=function(d){if(n(typeof d=="number"),n(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m>26)-(E/67108864|0),this.words[I+x]=R&67108863}for(;I>26,this.words[I+x]=R&67108863;if(S===0)return this._strip();for(n(S===-1),S=0,I=0;I>26,this.words[I]=R&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(d,m){var x=this.length-d.length,A=this.clone(),I=d,R=I.words[I.length-1]|0,S=this._countBits(R);x=26-S,x!==0&&(I=I.ushln(x),A.iushln(x),R=I.words[I.length-1]|0);var E=A.length-I.length,_;if(m!=="mod"){_=new s(null),_.length=E+1,_.words=new Array(_.length);for(var L=0;L<_.length;L++)_.words[L]=0}var ie=A.clone()._ishlnsubmul(I,1,E);ie.negative===0&&(A=ie,_&&(_.words[E]=1));for(var q=E-1;q>=0;q--){var Y=(A.words[I.length+q]|0)*67108864+(A.words[I.length+q-1]|0);for(Y=Math.min(Y/R|0,67108863),A._ishlnsubmul(I,Y,q);A.negative!==0;)Y--,A.negative=0,A._ishlnsubmul(I,1,q),A.isZero()||(A.negative^=1);_&&(_.words[q]=Y)}return _&&_._strip(),A._strip(),m!=="div"&&x!==0&&A.iushrn(x),{div:_||null,mod:A}},s.prototype.divmod=function(d,m,x){if(n(!d.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var A,I,R;return this.negative!==0&&d.negative===0?(R=this.neg().divmod(d,m),m!=="mod"&&(A=R.div.neg()),m!=="div"&&(I=R.mod.neg(),x&&I.negative!==0&&I.iadd(d)),{div:A,mod:I}):this.negative===0&&d.negative!==0?(R=this.divmod(d.neg(),m),m!=="mod"&&(A=R.div.neg()),{div:A,mod:R.mod}):this.negative&d.negative?(R=this.neg().divmod(d.neg(),m),m!=="div"&&(I=R.mod.neg(),x&&I.negative!==0&&I.isub(d)),{div:R.div,mod:I}):d.length>this.length||this.cmp(d)<0?{div:new s(0),mod:this}:d.length===1?m==="div"?{div:this.divn(d.words[0]),mod:null}:m==="mod"?{div:null,mod:new s(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new s(this.modrn(d.words[0]))}:this._wordDiv(d,m)},s.prototype.div=function(d){return this.divmod(d,"div",!1).div},s.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},s.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},s.prototype.divRound=function(d){var m=this.divmod(d);if(m.mod.isZero())return m.div;var x=m.div.negative!==0?m.mod.isub(d):m.mod,A=d.ushrn(1),I=d.andln(1),R=x.cmp(A);return R<0||I===1&&R===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},s.prototype.modrn=function(d){var m=d<0;m&&(d=-d),n(d<=67108863);for(var x=(1<<26)%d,A=0,I=this.length-1;I>=0;I--)A=(x*A+(this.words[I]|0))%d;return m?-A:A},s.prototype.modn=function(d){return this.modrn(d)},s.prototype.idivn=function(d){var m=d<0;m&&(d=-d),n(d<=67108863);for(var x=0,A=this.length-1;A>=0;A--){var I=(this.words[A]|0)+x*67108864;this.words[A]=I/d|0,x=I%d}return this._strip(),m?this.ineg():this},s.prototype.divn=function(d){return this.clone().idivn(d)},s.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var m=this,x=d.clone();m.negative!==0?m=m.umod(d):m=m.clone();for(var A=new s(1),I=new s(0),R=new s(0),S=new s(1),E=0;m.isEven()&&x.isEven();)m.iushrn(1),x.iushrn(1),++E;for(var _=x.clone(),L=m.clone();!m.isZero();){for(var ie=0,q=1;!(m.words[0]&q)&&ie<26;++ie,q<<=1);if(ie>0)for(m.iushrn(ie);ie-- >0;)(A.isOdd()||I.isOdd())&&(A.iadd(_),I.isub(L)),A.iushrn(1),I.iushrn(1);for(var Y=0,K=1;!(x.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(x.iushrn(Y);Y-- >0;)(R.isOdd()||S.isOdd())&&(R.iadd(_),S.isub(L)),R.iushrn(1),S.iushrn(1);m.cmp(x)>=0?(m.isub(x),A.isub(R),I.isub(S)):(x.isub(m),R.isub(A),S.isub(I))}return{a:R,b:S,gcd:x.iushln(E)}},s.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var m=this,x=d.clone();m.negative!==0?m=m.umod(d):m=m.clone();for(var A=new s(1),I=new s(0),R=x.clone();m.cmpn(1)>0&&x.cmpn(1)>0;){for(var S=0,E=1;!(m.words[0]&E)&&S<26;++S,E<<=1);if(S>0)for(m.iushrn(S);S-- >0;)A.isOdd()&&A.iadd(R),A.iushrn(1);for(var _=0,L=1;!(x.words[0]&L)&&_<26;++_,L<<=1);if(_>0)for(x.iushrn(_);_-- >0;)I.isOdd()&&I.iadd(R),I.iushrn(1);m.cmp(x)>=0?(m.isub(x),A.isub(I)):(x.isub(m),I.isub(A))}var ie;return m.cmpn(1)===0?ie=A:ie=I,ie.cmpn(0)<0&&ie.iadd(d),ie},s.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var m=this.clone(),x=d.clone();m.negative=0,x.negative=0;for(var A=0;m.isEven()&&x.isEven();A++)m.iushrn(1),x.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;x.isEven();)x.iushrn(1);var I=m.cmp(x);if(I<0){var R=m;m=x,x=R}else if(I===0||x.cmpn(1)===0)break;m.isub(x)}while(!0);return x.iushln(A)},s.prototype.invm=function(d){return this.egcd(d).a.umod(d)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(d){return this.words[0]&d},s.prototype.bincn=function(d){n(typeof d=="number");var m=d%26,x=(d-m)/26,A=1<>>26,S&=67108863,this.words[R]=S}return I!==0&&(this.words[R]=I,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(d){var m=d<0;if(this.negative!==0&&!m)return-1;if(this.negative===0&&m)return 1;this._strip();var x;if(this.length>1)x=1;else{m&&(d=-d),n(d<=67108863,"Number is too big");var A=this.words[0]|0;x=A===d?0:Ad.length)return 1;if(this.length=0;x--){var A=this.words[x]|0,I=d.words[x]|0;if(A!==I){AI&&(m=1);break}}return m},s.prototype.gtn=function(d){return this.cmpn(d)===1},s.prototype.gt=function(d){return this.cmp(d)===1},s.prototype.gten=function(d){return this.cmpn(d)>=0},s.prototype.gte=function(d){return this.cmp(d)>=0},s.prototype.ltn=function(d){return this.cmpn(d)===-1},s.prototype.lt=function(d){return this.cmp(d)===-1},s.prototype.lten=function(d){return this.cmpn(d)<=0},s.prototype.lte=function(d){return this.cmp(d)<=0},s.prototype.eqn=function(d){return this.cmpn(d)===0},s.prototype.eq=function(d){return this.cmp(d)===0},s.red=function(d){return new F(d)},s.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(d){return this.red=d,this},s.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},s.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},s.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},s.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},s.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},s.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},s.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},s.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var z={k256:null,p224:null,p192:null,p25519:null};function G(b,d){this.name=b,this.p=new s(d,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var d=new s(null);return d.words=new Array(Math.ceil(this.n/13)),d},G.prototype.ireduce=function(d){var m=d,x;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),x=m.bitLength();while(x>this.n);var A=x0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},G.prototype.split=function(d,m){d.iushrn(this.n,0,m)},G.prototype.imulK=function(d){return d.imul(this.k)};function $(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i($,G),$.prototype.split=function(d,m){for(var x=4194303,A=Math.min(d.length,9),I=0;I>>22,R=S}R>>>=22,d.words[I-10]=R,R===0&&d.length>10?d.length-=10:d.length-=9},$.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var m=0,x=0;x>>=26,d.words[x]=I,m=A}return m!==0&&(d.words[d.length++]=m),d},s._prime=function(d){if(z[d])return z[d];var m;if(d==="k256")m=new $;else if(d==="p224")m=new D;else if(d==="p192")m=new V;else if(d==="p25519")m=new Q;else throw new Error("Unknown prime "+d);return z[d]=m,m};function F(b){if(typeof b=="string"){var d=s._prime(b);this.m=d.p,this.prime=d}else n(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}F.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},F.prototype._verify2=function(d,m){n((d.negative|m.negative)===0,"red works only with positives"),n(d.red&&d.red===m.red,"red works only with red numbers")},F.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(h(d,d.umod(this.m)._forceRed(this)),d)},F.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},F.prototype.add=function(d,m){this._verify2(d,m);var x=d.add(m);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},F.prototype.iadd=function(d,m){this._verify2(d,m);var x=d.iadd(m);return x.cmp(this.m)>=0&&x.isub(this.m),x},F.prototype.sub=function(d,m){this._verify2(d,m);var x=d.sub(m);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},F.prototype.isub=function(d,m){this._verify2(d,m);var x=d.isub(m);return x.cmpn(0)<0&&x.iadd(this.m),x},F.prototype.shl=function(d,m){return this._verify1(d),this.imod(d.ushln(m))},F.prototype.imul=function(d,m){return this._verify2(d,m),this.imod(d.imul(m))},F.prototype.mul=function(d,m){return this._verify2(d,m),this.imod(d.mul(m))},F.prototype.isqr=function(d){return this.imul(d,d.clone())},F.prototype.sqr=function(d){return this.mul(d,d)},F.prototype.sqrt=function(d){if(d.isZero())return d.clone();var m=this.m.andln(3);if(n(m%2===1),m===3){var x=this.m.add(new s(1)).iushrn(2);return this.pow(d,x)}for(var A=this.m.subn(1),I=0;!A.isZero()&&A.andln(1)===0;)I++,A.iushrn(1);n(!A.isZero());var R=new s(1).toRed(this),S=R.redNeg(),E=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,E).cmp(S)!==0;)_.redIAdd(S);for(var L=this.pow(_,A),ie=this.pow(d,A.addn(1).iushrn(1)),q=this.pow(d,A),Y=I;q.cmp(R)!==0;){for(var K=q,te=0;K.cmp(R)!==0;te++)K=K.redSqr();n(te=0;I--){for(var L=m.words[I],ie=_-1;ie>=0;ie--){var q=L>>ie&1;if(R!==A[0]&&(R=this.sqr(R)),q===0&&S===0){E=0;continue}S<<=1,S|=q,E++,!(E!==x&&(I!==0||ie!==0))&&(R=this.mul(R,A[S]),E=0,S=0)}_=26}return R},F.prototype.convertTo=function(d){var m=d.umod(this.m);return m===d?m.clone():m},F.prototype.convertFrom=function(d){var m=d.clone();return m.red=null,m},s.mont=function(d){return new M(d)};function M(b){F.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(M,F),M.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},M.prototype.convertFrom=function(d){var m=this.imod(d.mul(this.rinv));return m.red=null,m},M.prototype.imul=function(d,m){if(d.isZero()||m.isZero())return d.words[0]=0,d.length=1,d;var x=d.imul(m),A=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=x.isub(A).iushrn(this.shift),R=I;return I.cmp(this.m)>=0?R=I.isub(this.m):I.cmpn(0)<0&&(R=I.iadd(this.m)),R._forceRed(this)},M.prototype.mul=function(d,m){if(d.isZero()||m.isZero())return new s(0)._forceRed(this);var x=d.mul(m),A=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=x.isub(A).iushrn(this.shift),R=I;return I.cmp(this.m)>=0?R=I.isub(this.m):I.cmpn(0)<0&&(R=I.iadd(this.m)),R._forceRed(this)},M.prototype.invm=function(d){var m=this.imod(d._invmp(this.m).mul(this.r2));return m._forceRed(this)}})(r,ct)}(UTe)),cS}var CD,Kie;function SD(){if(Kie)return CD;Kie=1;var r=AD(),e=Xv();function t(s){var o=n(s),a=o.toRed(r.mont(s.modulus)).redPow(new r(s.publicExponent)).fromRed();return{blinder:a,unblinder:o.invm(s.modulus)}}function n(s){var o=s.modulus.byteLength(),a;do a=new r(e(o));while(a.cmp(s.modulus)>=0||!a.umod(s.prime1)||!a.umod(s.prime2));return a}function i(s,o){var a=t(o),l=o.modulus.byteLength(),u=new r(s).mul(a.blinder).umod(o.modulus),h=u.toRed(r.mont(o.prime1)),p=u.toRed(r.mont(o.prime2)),g=o.coefficient,w=o.prime1,y=o.prime2,C=h.redPow(o.exponent1).fromRed(),T=p.redPow(o.exponent2).fromRed(),k=C.isub(T).imul(g).umod(w).imul(y);return T.iadd(k).imul(a.unblinder).umod(o.modulus).toArrayLike(Dt,"be",l)}return i.getr=n,CD=i,CD}var ID={};const FTe={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}};var TD={},RD={},Zie;function Jie(){return Zie||(Zie=1,function(r){var e=r;function t(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var a=[];if(typeof s!="string"){for(var l=0;l>8,p=u&255;h?a.push(h,p):a.push(p)}return a}e.toArray=t;function n(s){return s.length===1?"0"+s:s}e.zero2=n;function i(s){for(var o="",a=0;a(y>>1)-1?k=(y>>1)-N:k=N,C.isubn(k)):k=0,w[T]=k,C.iushrn(1)}return w}e.getNAF=s;function o(h,p){var g=[[],[]];h=h.clone(),p=p.clone();for(var w=0,y=0,C;h.cmpn(-w)>0||p.cmpn(-y)>0;){var T=h.andln(3)+w&3,k=p.andln(3)+y&3;T===3&&(T=-1),k===3&&(k=-1);var N;T&1?(C=h.andln(7)+w&7,(C===3||C===5)&&k===2?N=-T:N=T):N=0,g[0].push(N);var O;k&1?(C=p.andln(7)+y&7,(C===3||C===5)&&T===2?O=-k:O=k):O=0,g[1].push(O),2*w===N+1&&(w=1-w),2*y===O+1&&(y=1-y),h.iushrn(1),p.iushrn(1)}return g}e.getJSF=o;function a(h,p,g){var w="_"+p;h.prototype[p]=function(){return this[w]!==void 0?this[w]:this[w]=g.call(this)}}e.cachedProperty=a;function l(h){return typeof h=="string"?e.toArray(h,"hex"):h}e.parseBytes=l;function u(h){return new t(h,"hex","le")}e.intFromLE=u}(TD)),TD}var kD={},MD,Qie;function lS(){if(Qie)return MD;Qie=1;var r=wo(),e=Jl(),t=e.getNAF,n=e.getJSF,i=e.assert;function s(a,l){this.type=a,this.p=new r(l.p,16),this.red=l.prime?r.red(l.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=l.n&&new r(l.n,16),this.g=l.g&&this.pointFromJSON(l.g,l.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var u=this.n&&this.p.div(this.n);!u||u.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}MD=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(l,u){i(l.precomputed);var h=l._getDoubles(),p=t(u,1,this._bitLength),g=(1<=y;T--)C=(C<<1)+p[T];w.push(C)}for(var k=this.jpoint(null,null,null),N=this.jpoint(null,null,null),O=g;O>0;O--){for(y=0;y=0;C--){for(var T=0;C>=0&&w[C]===0;C--)T++;if(C>=0&&T++,y=y.dblp(T),C<0)break;var k=w[C];i(k!==0),l.type==="affine"?k>0?y=y.mixedAdd(g[k-1>>1]):y=y.mixedAdd(g[-k-1>>1].neg()):k>0?y=y.add(g[k-1>>1]):y=y.add(g[-k-1>>1].neg())}return l.type==="affine"?y.toP():y},s.prototype._wnafMulAdd=function(l,u,h,p,g){var w=this._wnafT1,y=this._wnafT2,C=this._wnafT3,T=0,k,N,O;for(k=0;k=1;k-=2){var z=k-1,G=k;if(w[z]!==1||w[G]!==1){C[z]=t(h[z],w[z],this._bitLength),C[G]=t(h[G],w[G],this._bitLength),T=Math.max(C[z].length,T),T=Math.max(C[G].length,T);continue}var $=[u[z],null,null,u[G]];u[z].y.cmp(u[G].y)===0?($[1]=u[z].add(u[G]),$[2]=u[z].toJ().mixedAdd(u[G].neg())):u[z].y.cmp(u[G].y.redNeg())===0?($[1]=u[z].toJ().mixedAdd(u[G]),$[2]=u[z].add(u[G].neg())):($[1]=u[z].toJ().mixedAdd(u[G]),$[2]=u[z].toJ().mixedAdd(u[G].neg()));var D=[-3,-1,-5,-7,0,7,5,1,3],V=n(h[z],h[G]);for(T=Math.max(V[0].length,T),C[z]=new Array(T),C[G]=new Array(T),N=0;N=0;k--){for(var d=0;k>=0;){var m=!0;for(N=0;N=0&&d++,M=M.dblp(d),k<0)break;for(N=0;N0?O=y[N][x-1>>1]:x<0&&(O=y[N][-x-1>>1].neg()),O.type==="affine"?M=M.mixedAdd(O):M=M.add(O))}}for(k=0;k=Math.ceil((l.bitLength()+1)/u.step):!1},o.prototype._getDoubles=function(l,u){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var h=[this],p=this,g=0;g=0&&(z=k,G=N),O.negative&&(O=O.neg(),B=B.neg()),z.negative&&(z=z.neg(),G=G.neg()),[{a:O,b:B},{a:z,b:G}]},s.prototype._endoSplit=function(u){var h=this.endo.basis,p=h[0],g=h[1],w=g.b.mul(u).divRound(this.n),y=p.b.neg().mul(u).divRound(this.n),C=w.mul(p.a),T=y.mul(g.a),k=w.mul(p.b),N=y.mul(g.b),O=u.sub(C).sub(T),B=k.add(N).neg();return{k1:O,k2:B}},s.prototype.pointFromX=function(u,h){u=new e(u,16),u.red||(u=u.toRed(this.red));var p=u.redSqr().redMul(u).redIAdd(u.redMul(this.a)).redIAdd(this.b),g=p.redSqrt();if(g.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");var w=g.fromRed().isOdd();return(h&&!w||!h&&w)&&(g=g.redNeg()),this.point(u,g)},s.prototype.validate=function(u){if(u.inf)return!0;var h=u.x,p=u.y,g=this.a.redMul(h),w=h.redSqr().redMul(h).redIAdd(g).redIAdd(this.b);return p.redSqr().redISub(w).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(u,h,p){for(var g=this._endoWnafT1,w=this._endoWnafT2,y=0;y":""},o.prototype.isInfinity=function(){return this.inf},o.prototype.add=function(u){if(this.inf)return u;if(u.inf)return this;if(this.eq(u))return this.dbl();if(this.neg().eq(u))return this.curve.point(null,null);if(this.x.cmp(u.x)===0)return this.curve.point(null,null);var h=this.y.redSub(u.y);h.cmpn(0)!==0&&(h=h.redMul(this.x.redSub(u.x).redInvm()));var p=h.redSqr().redISub(this.x).redISub(u.x),g=h.redMul(this.x.redSub(p)).redISub(this.y);return this.curve.point(p,g)},o.prototype.dbl=function(){if(this.inf)return this;var u=this.y.redAdd(this.y);if(u.cmpn(0)===0)return this.curve.point(null,null);var h=this.curve.a,p=this.x.redSqr(),g=u.redInvm(),w=p.redAdd(p).redIAdd(p).redIAdd(h).redMul(g),y=w.redSqr().redISub(this.x.redAdd(this.x)),C=w.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,C)},o.prototype.getX=function(){return this.x.fromRed()},o.prototype.getY=function(){return this.y.fromRed()},o.prototype.mul=function(u){return u=new e(u,16),this.isInfinity()?this:this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve.endo?this.curve._endoWnafMulAdd([this],[u]):this.curve._wnafMul(this,u)},o.prototype.mulAdd=function(u,h,p){var g=[this,h],w=[u,p];return this.curve.endo?this.curve._endoWnafMulAdd(g,w):this.curve._wnafMulAdd(1,g,w,2)},o.prototype.jmulAdd=function(u,h,p){var g=[this,h],w=[u,p];return this.curve.endo?this.curve._endoWnafMulAdd(g,w,!0):this.curve._wnafMulAdd(1,g,w,2,!0)},o.prototype.eq=function(u){return this===u||this.inf===u.inf&&(this.inf||this.x.cmp(u.x)===0&&this.y.cmp(u.y)===0)},o.prototype.neg=function(u){if(this.inf)return this;var h=this.curve.point(this.x,this.y.redNeg());if(u&&this.precomputed){var p=this.precomputed,g=function(w){return w.neg()};h.precomputed={naf:p.naf&&{wnd:p.naf.wnd,points:p.naf.points.map(g)},doubles:p.doubles&&{step:p.doubles.step,points:p.doubles.points.map(g)}}}return h},o.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var u=this.curve.jpoint(this.x,this.y,this.curve.one);return u};function a(l,u,h,p){n.BasePoint.call(this,l,"jacobian"),u===null&&h===null&&p===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new e(0)):(this.x=new e(u,16),this.y=new e(h,16),this.z=new e(p,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return t(a,n.BasePoint),s.prototype.jpoint=function(u,h,p){return new a(this,u,h,p)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var u=this.z.redInvm(),h=u.redSqr(),p=this.x.redMul(h),g=this.y.redMul(h).redMul(u);return this.curve.point(p,g)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(u){if(this.isInfinity())return u;if(u.isInfinity())return this;var h=u.z.redSqr(),p=this.z.redSqr(),g=this.x.redMul(h),w=u.x.redMul(p),y=this.y.redMul(h.redMul(u.z)),C=u.y.redMul(p.redMul(this.z)),T=g.redSub(w),k=y.redSub(C);if(T.cmpn(0)===0)return k.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var N=T.redSqr(),O=N.redMul(T),B=g.redMul(N),z=k.redSqr().redIAdd(O).redISub(B).redISub(B),G=k.redMul(B.redISub(z)).redISub(y.redMul(O)),$=this.z.redMul(u.z).redMul(T);return this.curve.jpoint(z,G,$)},a.prototype.mixedAdd=function(u){if(this.isInfinity())return u.toJ();if(u.isInfinity())return this;var h=this.z.redSqr(),p=this.x,g=u.x.redMul(h),w=this.y,y=u.y.redMul(h).redMul(this.z),C=p.redSub(g),T=w.redSub(y);if(C.cmpn(0)===0)return T.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var k=C.redSqr(),N=k.redMul(C),O=p.redMul(k),B=T.redSqr().redIAdd(N).redISub(O).redISub(O),z=T.redMul(O.redISub(B)).redISub(w.redMul(N)),G=this.z.redMul(C);return this.curve.jpoint(B,z,G)},a.prototype.dblp=function(u){if(u===0)return this;if(this.isInfinity())return this;if(!u)return this.dbl();var h;if(this.curve.zeroA||this.curve.threeA){var p=this;for(h=0;h=0)return!1;if(p.redIAdd(w),this.x.cmp(p)===0)return!0}},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return this.z.cmpn(0)===0},ND}var PD,ese;function zTe(){if(ese)return PD;ese=1;var r=wo(),e=tn(),t=lS(),n=Jl();function i(o){t.call(this,"mont",o),this.a=new r(o.a,16).toRed(this.red),this.b=new r(o.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}e(i,t),PD=i,i.prototype.validate=function(a){var l=a.normalize().x,u=l.redSqr(),h=u.redMul(l).redAdd(u.redMul(this.a)).redAdd(l),p=h.redSqrt();return p.redSqr().cmp(h)===0};function s(o,a,l){t.BasePoint.call(this,o,"projective"),a===null&&l===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(a,16),this.z=new r(l,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return e(s,t.BasePoint),i.prototype.decodePoint=function(a,l){return this.point(n.toArray(a,l),1)},i.prototype.point=function(a,l){return new s(this,a,l)},i.prototype.pointFromJSON=function(a){return s.fromJSON(this,a)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(a,l){return new s(a,l[0],l[1]||a.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var a=this.x.redAdd(this.z),l=a.redSqr(),u=this.x.redSub(this.z),h=u.redSqr(),p=l.redSub(h),g=l.redMul(h),w=p.redMul(h.redAdd(this.curve.a24.redMul(p)));return this.curve.point(g,w)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(a,l){var u=this.x.redAdd(this.z),h=this.x.redSub(this.z),p=a.x.redAdd(a.z),g=a.x.redSub(a.z),w=g.redMul(u),y=p.redMul(h),C=l.z.redMul(w.redAdd(y).redSqr()),T=l.x.redMul(w.redISub(y).redSqr());return this.curve.point(C,T)},s.prototype.mul=function(a){for(var l=a.clone(),u=this,h=this.curve.point(null,null),p=this,g=[];l.cmpn(0)!==0;l.iushrn(1))g.push(l.andln(1));for(var w=g.length-1;w>=0;w--)g[w]===0?(u=u.diffAdd(h,p),h=h.dbl()):(h=u.diffAdd(h,p),u=u.dbl());return h},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(a){return this.getX().cmp(a.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},PD}var OD,tse;function HTe(){if(tse)return OD;tse=1;var r=Jl(),e=wo(),t=tn(),n=lS(),i=r.assert;function s(a){this.twisted=(a.a|0)!==1,this.mOneA=this.twisted&&(a.a|0)===-1,this.extended=this.mOneA,n.call(this,"edwards",a),this.a=new e(a.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new e(a.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new e(a.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(a.c|0)===1}t(s,n),OD=s,s.prototype._mulA=function(l){return this.mOneA?l.redNeg():this.a.redMul(l)},s.prototype._mulC=function(l){return this.oneC?l:this.c.redMul(l)},s.prototype.jpoint=function(l,u,h,p){return this.point(l,u,h,p)},s.prototype.pointFromX=function(l,u){l=new e(l,16),l.red||(l=l.toRed(this.red));var h=l.redSqr(),p=this.c2.redSub(this.a.redMul(h)),g=this.one.redSub(this.c2.redMul(this.d).redMul(h)),w=p.redMul(g.redInvm()),y=w.redSqrt();if(y.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var C=y.fromRed().isOdd();return(u&&!C||!u&&C)&&(y=y.redNeg()),this.point(l,y)},s.prototype.pointFromY=function(l,u){l=new e(l,16),l.red||(l=l.toRed(this.red));var h=l.redSqr(),p=h.redSub(this.c2),g=h.redMul(this.d).redMul(this.c2).redSub(this.a),w=p.redMul(g.redInvm());if(w.cmp(this.zero)===0){if(u)throw new Error("invalid point");return this.point(this.zero,l)}var y=w.redSqrt();if(y.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");return y.fromRed().isOdd()!==u&&(y=y.redNeg()),this.point(y,l)},s.prototype.validate=function(l){if(l.isInfinity())return!0;l.normalize();var u=l.x.redSqr(),h=l.y.redSqr(),p=u.redMul(this.a).redAdd(h),g=this.c2.redMul(this.one.redAdd(this.d.redMul(u).redMul(h)));return p.cmp(g)===0};function o(a,l,u,h,p){n.BasePoint.call(this,a,"projective"),l===null&&u===null&&h===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new e(l,16),this.y=new e(u,16),this.z=h?new e(h,16):this.curve.one,this.t=p&&new e(p,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return t(o,n.BasePoint),s.prototype.pointFromJSON=function(l){return o.fromJSON(this,l)},s.prototype.point=function(l,u,h,p){return new o(this,l,u,h,p)},o.fromJSON=function(l,u){return new o(l,u[0],u[1],u[2])},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},o.prototype._extDbl=function(){var l=this.x.redSqr(),u=this.y.redSqr(),h=this.z.redSqr();h=h.redIAdd(h);var p=this.curve._mulA(l),g=this.x.redAdd(this.y).redSqr().redISub(l).redISub(u),w=p.redAdd(u),y=w.redSub(h),C=p.redSub(u),T=g.redMul(y),k=w.redMul(C),N=g.redMul(C),O=y.redMul(w);return this.curve.point(T,k,O,N)},o.prototype._projDbl=function(){var l=this.x.redAdd(this.y).redSqr(),u=this.x.redSqr(),h=this.y.redSqr(),p,g,w,y,C,T;if(this.curve.twisted){y=this.curve._mulA(u);var k=y.redAdd(h);this.zOne?(p=l.redSub(u).redSub(h).redMul(k.redSub(this.curve.two)),g=k.redMul(y.redSub(h)),w=k.redSqr().redSub(k).redSub(k)):(C=this.z.redSqr(),T=k.redSub(C).redISub(C),p=l.redSub(u).redISub(h).redMul(T),g=k.redMul(y.redSub(h)),w=k.redMul(T))}else y=u.redAdd(h),C=this.curve._mulC(this.z).redSqr(),T=y.redSub(C).redSub(C),p=this.curve._mulC(l.redISub(y)).redMul(T),g=this.curve._mulC(y).redMul(u.redISub(h)),w=y.redMul(T);return this.curve.point(p,g,w)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},o.prototype._extAdd=function(l){var u=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),h=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),p=this.t.redMul(this.curve.dd).redMul(l.t),g=this.z.redMul(l.z.redAdd(l.z)),w=h.redSub(u),y=g.redSub(p),C=g.redAdd(p),T=h.redAdd(u),k=w.redMul(y),N=C.redMul(T),O=w.redMul(T),B=y.redMul(C);return this.curve.point(k,N,B,O)},o.prototype._projAdd=function(l){var u=this.z.redMul(l.z),h=u.redSqr(),p=this.x.redMul(l.x),g=this.y.redMul(l.y),w=this.curve.d.redMul(p).redMul(g),y=h.redSub(w),C=h.redAdd(w),T=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(p).redISub(g),k=u.redMul(y).redMul(T),N,O;return this.curve.twisted?(N=u.redMul(C).redMul(g.redSub(this.curve._mulA(p))),O=y.redMul(C)):(N=u.redMul(C).redMul(g.redSub(p)),O=this.curve._mulC(y).redMul(C)),this.curve.point(k,N,O)},o.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},o.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},o.prototype.mulAdd=function(l,u,h){return this.curve._wnafMulAdd(1,[this,u],[l,h],2,!1)},o.prototype.jmulAdd=function(l,u,h){return this.curve._wnafMulAdd(1,[this,u],[l,h],2,!0)},o.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},o.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()},o.prototype.getY=function(){return this.normalize(),this.y.fromRed()},o.prototype.eq=function(l){return this===l||this.getX().cmp(l.getX())===0&&this.getY().cmp(l.getY())===0},o.prototype.eqXToP=function(l){var u=l.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(u)===0)return!0;for(var h=l.clone(),p=this.curve.redN.redMul(this.z);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(u.redIAdd(p),this.x.cmp(u)===0)return!0}},o.prototype.toP=o.prototype.normalize,o.prototype.mixedAdd=o.prototype.add,OD}var rse;function nse(){return rse||(rse=1,function(r){var e=r;e.base=lS(),e.short=jTe(),e.mont=zTe(),e.edwards=HTe()}(kD)),kD}var DD={},$D={},pi={},ise;function ff(){if(ise)return pi;ise=1;var r=Kl(),e=tn();pi.inherits=e;function t(M,b){return(M.charCodeAt(b)&64512)!==55296||b<0||b+1>=M.length?!1:(M.charCodeAt(b+1)&64512)===56320}function n(M,b){if(Array.isArray(M))return M.slice();if(!M)return[];var d=[];if(typeof M=="string")if(b){if(b==="hex")for(M=M.replace(/[^a-z0-9]+/ig,""),M.length%2!==0&&(M="0"+M),x=0;x>6|192,d[m++]=A&63|128):t(M,x)?(A=65536+((A&1023)<<10)+(M.charCodeAt(++x)&1023),d[m++]=A>>18|240,d[m++]=A>>12&63|128,d[m++]=A>>6&63|128,d[m++]=A&63|128):(d[m++]=A>>12|224,d[m++]=A>>6&63|128,d[m++]=A&63|128)}else for(x=0;x>>24|M>>>8&65280|M<<8&16711680|(M&255)<<24;return b>>>0}pi.htonl=s;function o(M,b){for(var d="",m=0;m>>0}return A}pi.join32=u;function h(M,b){for(var d=new Array(M.length*4),m=0,x=0;m>>24,d[x+1]=A>>>16&255,d[x+2]=A>>>8&255,d[x+3]=A&255):(d[x+3]=A>>>24,d[x+2]=A>>>16&255,d[x+1]=A>>>8&255,d[x]=A&255)}return d}pi.split32=h;function p(M,b){return M>>>b|M<<32-b}pi.rotr32=p;function g(M,b){return M<>>32-b}pi.rotl32=g;function w(M,b){return M+b>>>0}pi.sum32=w;function y(M,b,d){return M+b+d>>>0}pi.sum32_3=y;function C(M,b,d,m){return M+b+d+m>>>0}pi.sum32_4=C;function T(M,b,d,m,x){return M+b+d+m+x>>>0}pi.sum32_5=T;function k(M,b,d,m){var x=M[b],A=M[b+1],I=m+A>>>0,R=(I>>0,M[b+1]=I}pi.sum64=k;function N(M,b,d,m){var x=b+m>>>0,A=(x>>0}pi.sum64_hi=N;function O(M,b,d,m){var x=b+m;return x>>>0}pi.sum64_lo=O;function B(M,b,d,m,x,A,I,R){var S=0,E=b;E=E+m>>>0,S+=E>>0,S+=E>>0,S+=E>>0}pi.sum64_4_hi=B;function z(M,b,d,m,x,A,I,R){var S=b+m+A+R;return S>>>0}pi.sum64_4_lo=z;function G(M,b,d,m,x,A,I,R,S,E){var _=0,L=b;L=L+m>>>0,_+=L>>0,_+=L>>0,_+=L>>0,_+=L>>0}pi.sum64_5_hi=G;function $(M,b,d,m,x,A,I,R,S,E){var _=b+m+A+R+E;return _>>>0}pi.sum64_5_lo=$;function D(M,b,d){var m=b<<32-d|M>>>d;return m>>>0}pi.rotr64_hi=D;function V(M,b,d){var m=M<<32-d|b>>>d;return m>>>0}pi.rotr64_lo=V;function Q(M,b,d){return M>>>d}pi.shr64_hi=Q;function F(M,b,d){var m=M<<32-d|b>>>d;return m>>>0}return pi.shr64_lo=F,pi}var BD={},sse;function N6(){if(sse)return BD;sse=1;var r=ff(),e=Kl();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return BD.BlockHash=t,t.prototype.update=function(i,s){if(i=r.toArray(i,s),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var o=i.length%this._delta8;this.pending=i.slice(i.length-o,i.length),this.pending.length===0&&(this.pending=null),i=r.join32(i,0,i.length-o,this.endian);for(var a=0;a>>24&255,a[l++]=i>>>16&255,a[l++]=i>>>8&255,a[l++]=i&255}else for(a[l++]=i&255,a[l++]=i>>>8&255,a[l++]=i>>>16&255,a[l++]=i>>>24&255,a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=0,u=8;u>>3}df.g0_256=l;function u(h){return e(h,17)^e(h,19)^h>>>10}return df.g1_256=u,df}var LD,cse;function qTe(){if(cse)return LD;cse=1;var r=ff(),e=N6(),t=ase(),n=r.rotl32,i=r.sum32,s=r.sum32_5,o=t.ft_1,a=e.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(u,a),LD=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(p,g){for(var w=this.W,y=0;y<16;y++)w[y]=p[g+y];for(;ythis.blockSize&&(i=new this.Hash().update(i).digest()),e(i.length<=this.blockSize);for(var s=i.length;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,o,a)}return KD=n,n.prototype._init=function(s,o,a){var l=s.concat(o).concat(a);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(s.concat(a||[])),this._reseed=1},n.prototype.generate=function(s,o,a,l){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof o!="string"&&(l=a,a=o,o=null),a&&(a=e.toArray(a,l||"hex"),this._update(a));for(var u=[];u.length"},ZD}var JD,Ese;function XTe(){if(Ese)return JD;Ese=1;var r=wo(),e=Jl(),t=e.assert;function n(l,u){if(l instanceof n)return l;this._importDER(l,u)||(t(l.r&&l.s,"Signature without r or s"),this.r=new r(l.r,16),this.s=new r(l.s,16),l.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=l.recoveryParam)}JD=n;function i(){this.place=0}function s(l,u){var h=l[u.place++];if(!(h&128))return h;var p=h&15;if(p===0||p>4)return!1;for(var g=0,w=0,y=u.place;w>>=0;return g<=127?!1:(u.place=y,g)}function o(l){for(var u=0,h=l.length-1;!l[u]&&!(l[u+1]&128)&&u>>3);for(l.push(h|128);--h;)l.push(u>>>(h<<3)&255);l.push(u)}return n.prototype.toDER=function(u){var h=this.r.toArray(),p=this.s.toArray();for(h[0]&128&&(h=[0].concat(h)),p[0]&128&&(p=[0].concat(p)),h=o(h),p=o(p);!p[0]&&!(p[1]&128);)p=p.slice(1);var g=[2];a(g,h.length),g=g.concat(h),g.push(2),a(g,p.length);var w=g.concat(p),y=[48];return a(y,w.length),y=y.concat(w),e.encode(y,u)},JD}var YD,Ase;function eRe(){if(Ase)return YD;Ase=1;var r=wo(),e=YTe(),t=Jl(),n=GD(),i=yD(),s=t.assert,o=QTe(),a=XTe();function l(u){if(!(this instanceof l))return new l(u);typeof u=="string"&&(s(Object.prototype.hasOwnProperty.call(n,u),"Unknown curve "+u),u=n[u]),u instanceof n.PresetCurve&&(u={curve:u}),this.curve=u.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=u.curve.g,this.g.precompute(u.curve.n.bitLength()+1),this.hash=u.hash||u.curve.hash}return YD=l,l.prototype.keyPair=function(h){return new o(this,h)},l.prototype.keyFromPrivate=function(h,p){return o.fromPrivate(this,h,p)},l.prototype.keyFromPublic=function(h,p){return o.fromPublic(this,h,p)},l.prototype.genKeyPair=function(h){h||(h={});for(var p=new e({hash:this.hash,pers:h.pers,persEnc:h.persEnc||"utf8",entropy:h.entropy||i(this.hash.hmacStrength),entropyEnc:h.entropy&&h.entropyEnc||"utf8",nonce:this.n.toArray()}),g=this.n.byteLength(),w=this.n.sub(new r(2));;){var y=new r(p.generate(g));if(!(y.cmp(w)>0))return y.iaddn(1),this.keyFromPrivate(y)}},l.prototype._truncateToN=function(h,p){var g=h.byteLength()*8-this.n.bitLength();return g>0&&(h=h.ushrn(g)),!p&&h.cmp(this.n)>=0?h.sub(this.n):h},l.prototype.sign=function(h,p,g,w){typeof g=="object"&&(w=g,g=null),w||(w={}),p=this.keyFromPrivate(p,g),h=this._truncateToN(new r(h,16));for(var y=this.n.byteLength(),C=p.getPrivate().toArray("be",y),T=h.toArray("be",y),k=new e({hash:this.hash,entropy:C,nonce:T,pers:w.pers,persEnc:w.persEnc||"utf8"}),N=this.n.sub(new r(1)),O=0;;O++){var B=w.k?w.k(O):new r(k.generate(this.n.byteLength()));if(B=this._truncateToN(B,!0),!(B.cmpn(1)<=0||B.cmp(N)>=0)){var z=this.g.mul(B);if(!z.isInfinity()){var G=z.getX(),$=G.umod(this.n);if($.cmpn(0)!==0){var D=B.invm(this.n).mul($.mul(p.getPrivate()).iadd(h));if(D=D.umod(this.n),D.cmpn(0)!==0){var V=(z.getY().isOdd()?1:0)|(G.cmp($)!==0?2:0);return w.canonical&&D.cmp(this.nh)>0&&(D=this.n.sub(D),V^=1),new a({r:$,s:D,recoveryParam:V})}}}}}},l.prototype.verify=function(h,p,g,w){h=this._truncateToN(new r(h,16)),g=this.keyFromPublic(g,w),p=new a(p,"hex");var y=p.r,C=p.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||C.cmpn(1)<0||C.cmp(this.n)>=0)return!1;var T=C.invm(this.n),k=T.mul(h).umod(this.n),N=T.mul(y).umod(this.n),O;return this.curve._maxwellTrick?(O=this.g.jmulAdd(k,g.getPublic(),N),O.isInfinity()?!1:O.eqXToP(y)):(O=this.g.mulAdd(k,g.getPublic(),N),O.isInfinity()?!1:O.getX().umod(this.n).cmp(y)===0)},l.prototype.recoverPubKey=function(u,h,p,g){s((3&p)===p,"The recovery param is more than two bits"),h=new a(h,g);var w=this.n,y=new r(u),C=h.r,T=h.s,k=p&1,N=p>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&N)throw new Error("Unable to find sencond key candinate");N?C=this.curve.pointFromX(C.add(this.curve.n),k):C=this.curve.pointFromX(C,k);var O=h.r.invm(w),B=w.sub(y).mul(O).umod(w),z=T.mul(O).umod(w);return this.g.mulAdd(B,C,z)},l.prototype.getKeyRecoveryParam=function(u,h,p,g){if(h=new a(h,g),h.recoveryParam!==null)return h.recoveryParam;for(var w=0;w<4;w++){var y;try{y=this.recoverPubKey(u,h,w)}catch{continue}if(y.eq(p))return w}throw new Error("Unable to find valid recovery factor")},YD}var QD,Cse;function tRe(){if(Cse)return QD;Cse=1;var r=Jl(),e=r.assert,t=r.parseBytes,n=r.cachedProperty;function i(s,o){this.eddsa=s,this._secret=t(o.secret),s.isPoint(o.pub)?this._pub=o.pub:this._pubBytes=t(o.pub)}return i.fromPublic=function(o,a){return a instanceof i?a:new i(o,{pub:a})},i.fromSecret=function(o,a){return a instanceof i?a:new i(o,{secret:a})},i.prototype.secret=function(){return this._secret},n(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),n(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),n(i,"privBytes",function(){var o=this.eddsa,a=this.hash(),l=o.encodingLength-1,u=a.slice(0,o.encodingLength);return u[0]&=248,u[l]&=127,u[l]|=64,u}),n(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),n(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),n(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(o){return e(this._secret,"KeyPair can only verify"),this.eddsa.sign(o,this)},i.prototype.verify=function(o,a){return this.eddsa.verify(o,a,this)},i.prototype.getSecret=function(o){return e(this._secret,"KeyPair is public only"),r.encode(this.secret(),o)},i.prototype.getPublic=function(o){return r.encode(this.pubBytes(),o)},QD=i,QD}var XD,Sse;function rRe(){if(Sse)return XD;Sse=1;var r=wo(),e=Jl(),t=e.assert,n=e.cachedProperty,i=e.parseBytes;function s(o,a){this.eddsa=o,typeof a!="object"&&(a=i(a)),Array.isArray(a)&&(a={R:a.slice(0,o.encodingLength),S:a.slice(o.encodingLength)}),t(a.R&&a.S,"Signature without R or S"),o.isPoint(a.R)&&(this._R=a.R),a.S instanceof r&&(this._S=a.S),this._Rencoded=Array.isArray(a.R)?a.R:a.Rencoded,this._Sencoded=Array.isArray(a.S)?a.S:a.Sencoded}return n(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),n(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),n(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),n(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return e.encode(this.toBytes(),"hex").toUpperCase()},XD=s,XD}var e$,Ise;function nRe(){if(Ise)return e$;Ise=1;var r=WD(),e=GD(),t=Jl(),n=t.assert,i=t.parseBytes,s=tRe(),o=rRe();function a(l){if(n(l==="ed25519","only tested with ed25519 so far"),!(this instanceof a))return new a(l);l=e[l].curve,this.curve=l,this.g=l.g,this.g.precompute(l.n.bitLength()+1),this.pointClass=l.point().constructor,this.encodingLength=Math.ceil(l.n.bitLength()/8),this.hash=r.sha512}return e$=a,a.prototype.sign=function(u,h){u=i(u);var p=this.keyFromSecret(h),g=this.hashInt(p.messagePrefix(),u),w=this.g.mul(g),y=this.encodePoint(w),C=this.hashInt(y,p.pubBytes(),u).mul(p.priv()),T=g.add(C).umod(this.curve.n);return this.makeSignature({R:w,S:T,Rencoded:y})},a.prototype.verify=function(u,h,p){u=i(u),h=this.makeSignature(h);var g=this.keyFromPublic(p),w=this.hashInt(h.Rencoded(),g.pubBytes(),u),y=this.g.mul(h.S()),C=h.R().add(g.pub().mul(w));return C.eq(y)},a.prototype.hashInt=function(){for(var u=this.hash(),h=0;h"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s);return e(s,o,a)}),i.alloc||(i.alloc=function(s,o,a){if(typeof s!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof s);if(s<0||s>=2*(1<<30))throw new RangeError('The value "'+s+'" is invalid for option "size"');var l=e(s);return!o||o.length===0?l.fill(0):typeof a=="string"?l.fill(o,a):l.fill(o),l}),!t.kStringMaxLength)try{t.kStringMaxLength=yt.binding("buffer").kStringMaxLength}catch{}return t.constants||(t.constants={MAX_LENGTH:t.kMaxLength},t.kStringMaxLength&&(t.constants.MAX_STRING_LENGTH=t.kStringMaxLength)),s$=t,s$}var a$={},kse;function c$(){if(kse)return a$;kse=1;const r=tn();function e(n){this._reporterState={obj:null,path:[],options:n||{},errors:[]}}a$.Reporter=e,e.prototype.isError=function(i){return i instanceof t},e.prototype.save=function(){const i=this._reporterState;return{obj:i.obj,pathLen:i.path.length}},e.prototype.restore=function(i){const s=this._reporterState;s.obj=i.obj,s.path=s.path.slice(0,i.pathLen)},e.prototype.enterKey=function(i){return this._reporterState.path.push(i)},e.prototype.exitKey=function(i){const s=this._reporterState;s.path=s.path.slice(0,i-1)},e.prototype.leaveKey=function(i,s,o){const a=this._reporterState;this.exitKey(i),a.obj!==null&&(a.obj[s]=o)},e.prototype.path=function(){return this._reporterState.path.join("/")},e.prototype.enterObject=function(){const i=this._reporterState,s=i.obj;return i.obj={},s},e.prototype.leaveObject=function(i){const s=this._reporterState,o=s.obj;return s.obj=i,o},e.prototype.error=function(i){let s;const o=this._reporterState,a=i instanceof t;if(a?s=i:s=new t(o.path.map(function(l){return"["+JSON.stringify(l)+"]"}).join(""),i.message||i,i.stack),!o.options.partial)throw s;return a||o.errors.push(s),s},e.prototype.wrapResult=function(i){const s=this._reporterState;return s.options.partial?{result:this.isError(i)?null:i,errors:s.errors}:i};function t(n,i){this.path=n,this.rethrow(i)}return r(t,Error),t.prototype.rethrow=function(i){if(this.message=i+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,t),!this.stack)try{throw new Error(this.message)}catch(s){this.stack=s.stack}return this},a$}var uS={},Mse;function P6(){if(Mse)return uS;Mse=1;const r=tn(),e=c$().Reporter,t=o$().Buffer;function n(s,o){if(e.call(this,o),!t.isBuffer(s)){this.error("Input not Buffer");return}this.base=s,this.offset=0,this.length=s.length}r(n,e),uS.DecoderBuffer=n,n.isDecoderBuffer=function(o){return o instanceof n?!0:typeof o=="object"&&t.isBuffer(o.base)&&o.constructor.name==="DecoderBuffer"&&typeof o.offset=="number"&&typeof o.length=="number"&&typeof o.save=="function"&&typeof o.restore=="function"&&typeof o.isEmpty=="function"&&typeof o.readUInt8=="function"&&typeof o.skip=="function"&&typeof o.raw=="function"},n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(o){const a=new n(this.base);return a.offset=o.offset,a.length=this.offset,this.offset=o.offset,e.prototype.restore.call(this,o.reporter),a},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(o){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(o||"DecoderBuffer overrun")},n.prototype.skip=function(o,a){if(!(this.offset+o<=this.length))return this.error(a||"DecoderBuffer overrun");const l=new n(this.base);return l._reporterState=this._reporterState,l.offset=this.offset,l.length=this.offset+o,this.offset+=o,l},n.prototype.raw=function(o){return this.base.slice(o?o.offset:this.offset,this.length)};function i(s,o){if(Array.isArray(s))this.length=0,this.value=s.map(function(a){return i.isEncoderBuffer(a)||(a=new i(a,o)),this.length+=a.length,a},this);else if(typeof s=="number"){if(!(0<=s&&s<=255))return o.error("non-byte EncoderBuffer value");this.value=s,this.length=1}else if(typeof s=="string")this.value=s,this.length=t.byteLength(s);else if(t.isBuffer(s))this.value=s,this.length=s.length;else return o.error("Unsupported type: "+typeof s)}return uS.EncoderBuffer=i,i.isEncoderBuffer=function(o){return o instanceof i?!0:typeof o=="object"&&o.constructor.name==="EncoderBuffer"&&typeof o.length=="number"&&typeof o.join=="function"},i.prototype.join=function(o,a){return o||(o=t.alloc(this.length)),a||(a=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(l){l.join(o,a),a+=l.length}):(typeof this.value=="number"?o[a]=this.value:typeof this.value=="string"?o.write(this.value,a):t.isBuffer(this.value)&&this.value.copy(o,a),a+=this.length)),o},uS}var l$,Nse;function u$(){if(Nse)return l$;Nse=1;const r=c$().Reporter,e=P6().EncoderBuffer,t=P6().DecoderBuffer,n=Kl(),i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i),o=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function a(u,h,p){const g={};this._baseState=g,g.name=p,g.enc=u,g.parent=h||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}l$=a;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return a.prototype.clone=function(){const h=this._baseState,p={};l.forEach(function(w){p[w]=h[w]});const g=new this.constructor(p.parent);return g._baseState=p,g},a.prototype._wrap=function(){const h=this._baseState;s.forEach(function(p){this[p]=function(){const w=new this.constructor(this);return h.children.push(w),w[p].apply(w,arguments)}},this)},a.prototype._init=function(h){const p=this._baseState;n(p.parent===null),h.call(this),p.children=p.children.filter(function(g){return g._baseState.parent===this},this),n.equal(p.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(h){const p=this._baseState,g=h.filter(function(w){return w instanceof this.constructor},this);h=h.filter(function(w){return!(w instanceof this.constructor)},this),g.length!==0&&(n(p.children===null),p.children=g,g.forEach(function(w){w._baseState.parent=this},this)),h.length!==0&&(n(p.args===null),p.args=h,p.reverseArgs=h.map(function(w){if(typeof w!="object"||w.constructor!==Object)return w;const y={};return Object.keys(w).forEach(function(C){C==(C|0)&&(C|=0);const T=w[C];y[T]=C}),y}))},o.forEach(function(u){a.prototype[u]=function(){const p=this._baseState;throw new Error(u+" not implemented for encoding: "+p.enc)}}),i.forEach(function(u){a.prototype[u]=function(){const p=this._baseState,g=Array.prototype.slice.call(arguments);return n(p.tag===null),p.tag=u,this._useArgs(g),this}}),a.prototype.use=function(h){n(h);const p=this._baseState;return n(p.use===null),p.use=h,this},a.prototype.optional=function(){const h=this._baseState;return h.optional=!0,this},a.prototype.def=function(h){const p=this._baseState;return n(p.default===null),p.default=h,p.optional=!0,this},a.prototype.explicit=function(h){const p=this._baseState;return n(p.explicit===null&&p.implicit===null),p.explicit=h,this},a.prototype.implicit=function(h){const p=this._baseState;return n(p.explicit===null&&p.implicit===null),p.implicit=h,this},a.prototype.obj=function(){const h=this._baseState,p=Array.prototype.slice.call(arguments);return h.obj=!0,p.length!==0&&this._useArgs(p),this},a.prototype.key=function(h){const p=this._baseState;return n(p.key===null),p.key=h,this},a.prototype.any=function(){const h=this._baseState;return h.any=!0,this},a.prototype.choice=function(h){const p=this._baseState;return n(p.choice===null),p.choice=h,this._useArgs(Object.keys(h).map(function(g){return h[g]})),this},a.prototype.contains=function(h){const p=this._baseState;return n(p.use===null),p.contains=h,this},a.prototype._decode=function(h,p){const g=this._baseState;if(g.parent===null)return h.wrapResult(g.children[0]._decode(h,p));let w=g.default,y=!0,C=null;if(g.key!==null&&(C=h.enterKey(g.key)),g.optional){let k=null;if(g.explicit!==null?k=g.explicit:g.implicit!==null?k=g.implicit:g.tag!==null&&(k=g.tag),k===null&&!g.any){const N=h.save();try{g.choice===null?this._decodeGeneric(g.tag,h,p):this._decodeChoice(h,p),y=!0}catch{y=!1}h.restore(N)}else if(y=this._peekTag(h,k,g.any),h.isError(y))return y}let T;if(g.obj&&y&&(T=h.enterObject()),y){if(g.explicit!==null){const N=this._decodeTag(h,g.explicit);if(h.isError(N))return N;h=N}const k=h.offset;if(g.use===null&&g.choice===null){let N;g.any&&(N=h.save());const O=this._decodeTag(h,g.implicit!==null?g.implicit:g.tag,g.any);if(h.isError(O))return O;g.any?w=h.raw(N):h=O}if(p&&p.track&&g.tag!==null&&p.track(h.path(),k,h.length,"tagged"),p&&p.track&&g.tag!==null&&p.track(h.path(),h.offset,h.length,"content"),g.any||(g.choice===null?w=this._decodeGeneric(g.tag,h,p):w=this._decodeChoice(h,p)),h.isError(w))return w;if(!g.any&&g.choice===null&&g.children!==null&&g.children.forEach(function(O){O._decode(h,p)}),g.contains&&(g.tag==="octstr"||g.tag==="bitstr")){const N=new t(w);w=this._getUse(g.contains,h._reporterState.obj)._decode(N,p)}}return g.obj&&y&&(w=h.leaveObject(T)),g.key!==null&&(w!==null||y===!0)?h.leaveKey(C,g.key,w):C!==null&&h.exitKey(C),w},a.prototype._decodeGeneric=function(h,p,g){const w=this._baseState;return h==="seq"||h==="set"?null:h==="seqof"||h==="setof"?this._decodeList(p,h,w.args[0],g):/str$/.test(h)?this._decodeStr(p,h,g):h==="objid"&&w.args?this._decodeObjid(p,w.args[0],w.args[1],g):h==="objid"?this._decodeObjid(p,null,null,g):h==="gentime"||h==="utctime"?this._decodeTime(p,h,g):h==="null_"?this._decodeNull(p,g):h==="bool"?this._decodeBool(p,g):h==="objDesc"?this._decodeStr(p,h,g):h==="int"||h==="enum"?this._decodeInt(p,w.args&&w.args[0],g):w.use!==null?this._getUse(w.use,p._reporterState.obj)._decode(p,g):p.error("unknown tag: "+h)},a.prototype._getUse=function(h,p){const g=this._baseState;return g.useDecoder=this._use(h,p),n(g.useDecoder._baseState.parent===null),g.useDecoder=g.useDecoder._baseState.children[0],g.implicit!==g.useDecoder._baseState.implicit&&(g.useDecoder=g.useDecoder.clone(),g.useDecoder._baseState.implicit=g.implicit),g.useDecoder},a.prototype._decodeChoice=function(h,p){const g=this._baseState;let w=null,y=!1;return Object.keys(g.choice).some(function(C){const T=h.save(),k=g.choice[C];try{const N=k._decode(h,p);if(h.isError(N))return!1;w={type:C,value:N},y=!0}catch{return h.restore(T),!1}return!0},this),y?w:h.error("Choice not matched")},a.prototype._createEncoderBuffer=function(h){return new e(h,this.reporter)},a.prototype._encode=function(h,p,g){const w=this._baseState;if(w.default!==null&&w.default===h)return;const y=this._encodeValue(h,p,g);if(y!==void 0&&!this._skipDefault(y,p,g))return y},a.prototype._encodeValue=function(h,p,g){const w=this._baseState;if(w.parent===null)return w.children[0]._encode(h,p||new r);let y=null;if(this.reporter=p,w.optional&&h===void 0)if(w.default!==null)h=w.default;else return;let C=null,T=!1;if(w.any)y=this._createEncoderBuffer(h);else if(w.choice)y=this._encodeChoice(h,p);else if(w.contains)C=this._getUse(w.contains,g)._encode(h,p),T=!0;else if(w.children)C=w.children.map(function(k){if(k._baseState.tag==="null_")return k._encode(null,p,h);if(k._baseState.key===null)return p.error("Child should have a key");const N=p.enterKey(k._baseState.key);if(typeof h!="object")return p.error("Child expected, but input is not object");const O=k._encode(h[k._baseState.key],p,h);return p.leaveKey(N),O},this).filter(function(k){return k}),C=this._createEncoderBuffer(C);else if(w.tag==="seqof"||w.tag==="setof"){if(!(w.args&&w.args.length===1))return p.error("Too many args for : "+w.tag);if(!Array.isArray(h))return p.error("seqof/setof, but data is not Array");const k=this.clone();k._baseState.implicit=null,C=this._createEncoderBuffer(h.map(function(N){const O=this._baseState;return this._getUse(O.args[0],h)._encode(N,p)},k))}else w.use!==null?y=this._getUse(w.use,g)._encode(h,p):(C=this._encodePrimitive(w.tag,h),T=!0);if(!w.any&&w.choice===null){const k=w.implicit!==null?w.implicit:w.tag,N=w.implicit===null?"universal":"context";k===null?w.use===null&&p.error("Tag could be omitted only for .use()"):w.use===null&&(y=this._encodeComposite(k,T,N,C))}return w.explicit!==null&&(y=this._encodeComposite(w.explicit,!1,"context",y)),y},a.prototype._encodeChoice=function(h,p){const g=this._baseState,w=g.choice[h.type];return w||n(!1,h.type+" not found in "+JSON.stringify(Object.keys(g.choice))),w._encode(h.value,p)},a.prototype._encodePrimitive=function(h,p){const g=this._baseState;if(/str$/.test(h))return this._encodeStr(p,h);if(h==="objid"&&g.args)return this._encodeObjid(p,g.reverseArgs[0],g.args[1]);if(h==="objid")return this._encodeObjid(p,null,null);if(h==="gentime"||h==="utctime")return this._encodeTime(p,h);if(h==="null_")return this._encodeNull();if(h==="int"||h==="enum")return this._encodeInt(p,g.args&&g.reverseArgs[0]);if(h==="bool")return this._encodeBool(p);if(h==="objDesc")return this._encodeStr(p,h);throw new Error("Unsupported tag: "+h)},a.prototype._isNumstr=function(h){return/^[0-9 ]*$/.test(h)},a.prototype._isPrintstr=function(h){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(h)},l$}var h$={},Pse;function f$(){return Pse||(Pse=1,function(r){function e(t){const n={};return Object.keys(t).forEach(function(i){(i|0)==i&&(i=i|0);const s=t[i];n[s]=i}),n}r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=e(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=e(r.tag)}(h$)),h$}var d$,Ose;function Dse(){if(Ose)return d$;Ose=1;const r=tn(),e=o$().Buffer,t=u$(),n=f$();function i(l){this.enc="der",this.name=l.name,this.entity=l,this.tree=new s,this.tree._init(l.body)}d$=i,i.prototype.encode=function(u,h){return this.tree._encode(u,h).join()};function s(l){t.call(this,"der",l)}r(s,t),s.prototype._encodeComposite=function(u,h,p,g){const w=a(u,h,p,this.reporter);if(g.length<128){const T=e.alloc(2);return T[0]=w,T[1]=g.length,this._createEncoderBuffer([T,g])}let y=1;for(let T=g.length;T>=256;T>>=8)y++;const C=e.alloc(1+1+y);C[0]=w,C[1]=128|y;for(let T=1+y,k=g.length;k>0;T--,k>>=8)C[T]=k&255;return this._createEncoderBuffer([C,g])},s.prototype._encodeStr=function(u,h){if(h==="bitstr")return this._createEncoderBuffer([u.unused|0,u.data]);if(h==="bmpstr"){const p=e.alloc(u.length*2);for(let g=0;g=40)return this.reporter.error("Second objid identifier OOB");u.splice(0,2,u[0]*40+u[1])}let g=0;for(let C=0;C=128;T>>=7)g++}const w=e.alloc(g);let y=w.length-1;for(let C=u.length-1;C>=0;C--){let T=u[C];for(w[y--]=T&127;(T>>=7)>0;)w[y--]=128|T&127}return this._createEncoderBuffer(w)};function o(l){return l<10?"0"+l:l}s.prototype._encodeTime=function(u,h){let p;const g=new Date(u);return h==="gentime"?p=[o(g.getUTCFullYear()),o(g.getUTCMonth()+1),o(g.getUTCDate()),o(g.getUTCHours()),o(g.getUTCMinutes()),o(g.getUTCSeconds()),"Z"].join(""):h==="utctime"?p=[o(g.getUTCFullYear()%100),o(g.getUTCMonth()+1),o(g.getUTCDate()),o(g.getUTCHours()),o(g.getUTCMinutes()),o(g.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+h+" time is not supported yet"),this._encodeStr(p,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(u,h){if(typeof u=="string"){if(!h)return this.reporter.error("String int or enum given, but no values map");if(!h.hasOwnProperty(u))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(u));u=h[u]}if(typeof u!="number"&&!e.isBuffer(u)){const w=u.toArray();!u.sign&&w[0]&128&&w.unshift(0),u=e.from(w)}if(e.isBuffer(u)){let w=u.length;u.length===0&&w++;const y=e.alloc(w);return u.copy(y),u.length===0&&(y[0]=0),this._createEncoderBuffer(y)}if(u<128)return this._createEncoderBuffer(u);if(u<256)return this._createEncoderBuffer([0,u]);let p=1;for(let w=u;w>=256;w>>=8)p++;const g=new Array(p);for(let w=g.length-1;w>=0;w--)g[w]=u&255,u>>=8;return g[0]&128&&g.unshift(0),this._createEncoderBuffer(e.from(g))},s.prototype._encodeBool=function(u){return this._createEncoderBuffer(u?255:0)},s.prototype._use=function(u,h){return typeof u=="function"&&(u=u(h)),u._getEncoder("der").tree},s.prototype._skipDefault=function(u,h,p){const g=this._baseState;let w;if(g.default===null)return!1;const y=u.join();if(g.defaultBuffer===void 0&&(g.defaultBuffer=this._encodeValue(g.default,h,p).join()),y.length!==g.defaultBuffer.length)return!1;for(w=0;w=31?p.error("Multi-octet tag encoding unsupported"):(u||(g|=32),g|=n.tagClassByName[h||"universal"]<<6,g)}return d$}var p$,$se;function iRe(){if($se)return p$;$se=1;const r=tn(),e=Dse();function t(n){e.call(this,n),this.enc="pem"}return r(t,e),p$=t,t.prototype.encode=function(i,s){const a=e.prototype.encode.call(this,i).toString("base64"),l=["-----BEGIN "+s.label+"-----"];for(let u=0;u>6],w=(p&32)===0;if((p&31)===31){let C=p;for(p=0;(C&128)===128;){if(C=u.readUInt8(h),u.isError(C))return C;p<<=7,p|=C&127}}else p&=31;const y=i.tag[p];return{cls:g,primitive:w,tag:p,tagStr:y}}function l(u,h,p){let g=u.readUInt8(p);if(u.isError(g))return g;if(!h&&g===128)return null;if(!(g&128))return g;const w=g&127;if(w>4)return u.error("length octect is too long");g=0;for(let y=0;y0&&O.ishrn(B),O}function y(k,N){k=w(k,N),k=k.mod(N);var O=r.from(k.toArray());if(O.length=0)throw new Error("invalid sig")}return E$=s,E$}var A$,roe;function gRe(){if(roe)return A$;roe=1;var r=sn().Buffer,e=R6(),t=_ne(),n=tn(),i=dRe(),s=pRe(),o=Wne;Object.keys(o).forEach(function(p){o[p].id=r.from(o[p].id,"hex"),o[p.toLowerCase()]=o[p]});function a(p){t.Writable.call(this);var g=o[p];if(!g)throw new Error("Unknown message digest");this._hashType=g.hash,this._hash=e(g.hash),this._tag=g.id,this._signType=g.sign}n(a,t.Writable),a.prototype._write=function(g,w,y){this._hash.update(g),y()},a.prototype.update=function(g,w){return this._hash.update(typeof g=="string"?r.from(g,w):g),this},a.prototype.sign=function(g,w){this.end();var y=this._hash.digest(),C=i(y,g,this._hashType,this._signType,this._tag);return w?C.toString(w):C};function l(p){t.Writable.call(this);var g=o[p];if(!g)throw new Error("Unknown message digest");this._hash=e(g.hash),this._tag=g.id,this._signType=g.sign}n(l,t.Writable),l.prototype._write=function(g,w,y){this._hash.update(g),y()},l.prototype.update=function(g,w){return this._hash.update(typeof g=="string"?r.from(g,w):g),this},l.prototype.verify=function(g,w,y){var C=typeof w=="string"?r.from(w,y):w;this.end();var T=this._hash.digest();return s(C,T,g,this._signType,this._tag)};function u(p){return new a(p)}function h(p){return new l(p)}return A$={Sign:u,Verify:h,createSign:u,createVerify:h},A$}var C$,noe;function mRe(){if(noe)return C$;noe=1;var r=t$(),e=wo();C$=function(o){return new n(o)};var t={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};t.p224=t.secp224r1,t.p256=t.secp256r1=t.prime256v1,t.p192=t.secp192r1=t.prime192v1,t.p384=t.secp384r1,t.p521=t.secp521r1;function n(s){this.curveType=t[s],this.curveType||(this.curveType={name:s}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(s,o){return this.keys=this.curve.genKeyPair(),this.getPublicKey(s,o)},n.prototype.computeSecret=function(s,o,a){o=o||"utf8",Dt.isBuffer(s)||(s=new Dt(s,o));var l=this.curve.keyFromPublic(s).getPublic(),u=l.mul(this.keys.getPrivate()).getX();return i(u,a,this.curveType.byteLength)},n.prototype.getPublicKey=function(s,o){var a=this.keys.getPublic(o==="compressed",!0);return o==="hybrid"&&(a[a.length-1]%2?a[0]=7:a[0]=6),i(a,s)},n.prototype.getPrivateKey=function(s){return i(this.keys.getPrivate(),s)},n.prototype.setPublicKey=function(s,o){return o=o||"utf8",Dt.isBuffer(s)||(s=new Dt(s,o)),this.keys._importPublic(s),this},n.prototype.setPrivateKey=function(s,o){o=o||"utf8",Dt.isBuffer(s)||(s=new Dt(s,o));var a=new e(s);return a=a.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(a),this};function i(s,o,a){Array.isArray(s)||(s=s.toArray());var l=new Dt(s);if(a&&l.length=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return C?a(N,k):o(N,k)};function u(g,w){var y=g.modulus.byteLength(),C=w.length,T=t("sha1").update(l.alloc(0)).digest(),k=T.length,N=2*k;if(C>y-N-2)throw new Error("message too long");var O=l.alloc(y-C-N-2),B=y-k-1,z=e(k),G=i(l.concat([T,O,l.alloc(1,1),w],B),n(z,B)),$=i(z,n(G,k));return new s(l.concat([l.alloc(1),$,G],y))}function h(g,w,y){var C=w.length,T=g.modulus.byteLength();if(C>T-11)throw new Error("message too long");var k;return y?k=l.alloc(T-C-3,255):k=p(T-C-3),new s(l.concat([l.from([0,y?1:2]),k,l.alloc(1),w],T))}function p(g){for(var w=l.allocUnsafe(g),y=0,C=e(g*2),T=0,k;yk||new n(w).cmp(T.modulus)>=0)throw new Error("decryption error");var N;y?N=o(new n(w),T):N=i(w,T);var O=a.alloc(k-N.length);if(N=a.concat([O,N],k),C===4)return l(T,N);if(C===1)return u(T,N,y);if(C===3)return N;throw new Error("unknown padding")};function l(p,g){var w=p.modulus.byteLength(),y=s("sha1").update(a.alloc(0)).digest(),C=y.length;if(g[0]!==0)throw new Error("decryption error");var T=g.slice(1,C+1),k=g.slice(C+1),N=t(T,e(k,C)),O=t(k,e(N,w-C-1));if(h(y,O.slice(0,C)))throw new Error("decryption error");for(var B=C;O[B]===0;)B++;if(O[B++]!==1)throw new Error("decryption error");return O.slice(B)}function u(p,g,w){for(var y=g.slice(0,2),C=2,T=0;g[C++]!==0;)if(C>=g.length){T++;break}var k=g.slice(2,C-1);if((y.toString("hex")!=="0002"&&!w||y.toString("hex")!=="0001"&&w)&&T++,k.length<8&&T++,T)throw new Error("decryption error");return g.slice(C)}function h(p,g){p=a.from(p),g=a.from(g);var w=0,y=p.length;p.length!==g.length&&(w++,y=Math.min(p.length,g.length));for(var C=-1;++Co||g<0)throw new TypeError("offset must be a uint32");if(g>i||g>w)throw new RangeError("offset out of range")}function l(g,w,y){if(typeof g!="number"||g!==g)throw new TypeError("size must be a number");if(g>o||g<0)throw new TypeError("size must be a uint32");if(g+w>y||g>i)throw new RangeError("buffer too small")}s&&s.getRandomValues||!yt.browser?(ny.randomFill=u,ny.randomFillSync=p):(ny.randomFill=r,ny.randomFillSync=r);function u(g,w,y,C){if(!n.isBuffer(g)&&!(g instanceof ct.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof w=="function")C=w,w=0,y=g.length;else if(typeof y=="function")C=y,y=g.length-w;else if(typeof C!="function")throw new TypeError('"cb" argument must be a function');return a(w,g.length),l(y,w,g.length),h(g,w,y,C)}function h(g,w,y,C){if(yt.browser){var T=g.buffer,k=new Uint8Array(T,w,y);if(s.getRandomValues(k),C){yt.nextTick(function(){C(null,g)});return}return g}if(C){t(y,function(O,B){if(O)return C(O);B.copy(g,w),C(null,g)});return}var N=t(y);return N.copy(g,w),g}function p(g,w,y){if(typeof w>"u"&&(w=0),!n.isBuffer(g)&&!(g instanceof ct.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return a(w,g.length),y===void 0&&(y=g.length-w),l(y,w,g.length),h(g,w,y)}return ny}var poe;function goe(){if(poe)return Jr;poe=1,Jr.randomBytes=Jr.rng=Jr.pseudoRandomBytes=Jr.prng=Xv(),Jr.createHash=Jr.Hash=R6(),Jr.createHmac=Jr.Hmac=qne();var r=mTe(),e=Object.keys(r),t=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Jr.getHashes=function(){return t};var n=nie();Jr.pbkdf2=n.pbkdf2,Jr.pbkdf2Sync=n.pbkdf2Sync;var i=NTe();Jr.Cipher=i.Cipher,Jr.createCipher=i.createCipher,Jr.Cipheriv=i.Cipheriv,Jr.createCipheriv=i.createCipheriv,Jr.Decipher=i.Decipher,Jr.createDecipher=i.createDecipher,Jr.Decipheriv=i.Decipheriv,Jr.createDecipheriv=i.createDecipheriv,Jr.getCiphers=i.getCiphers,Jr.listCiphers=i.listCiphers;var s=BTe();Jr.DiffieHellmanGroup=s.DiffieHellmanGroup,Jr.createDiffieHellmanGroup=s.createDiffieHellmanGroup,Jr.getDiffieHellman=s.getDiffieHellman,Jr.createDiffieHellman=s.createDiffieHellman,Jr.DiffieHellman=s.DiffieHellman;var o=gRe();Jr.createSign=o.createSign,Jr.Sign=o.Sign,Jr.createVerify=o.createVerify,Jr.Verify=o.Verify,Jr.createECDH=mRe();var a=vRe();Jr.publicEncrypt=a.publicEncrypt,Jr.privateEncrypt=a.privateEncrypt,Jr.publicDecrypt=a.publicDecrypt,Jr.privateDecrypt=a.privateDecrypt;var l=yRe();return Jr.randomFill=l.randomFill,Jr.randomFillSync=l.randomFillSync,Jr.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},Jr.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Jr}Object.defineProperty(WC,"__esModule",{value:!0}),WC.NodeRandomSource=void 0;const xRe=Hc;class _Re{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof PIe<"u"){const e=goe();e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let i=0;i256)throw new Error("randomString charset is too long");let g="";const w=h.length,y=256-256%w;for(;u>0;){const C=i(Math.ceil(u*256/y),p);for(let T=0;T0;T++){const k=C[T];k0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[h++],u--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(h=s(this._temp,this._state,l,h,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=l[h++],u--;return this},a.prototype.finish=function(l){if(!this._finished){var u=this._bytesHashed,h=this._bufferLength,p=u/536870912|0,g=u<<3,w=u%64<56?64:128;this._buffer[h]=128;for(var y=h+1;y0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){t.wipe(l.state),l.buffer&&t.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();r.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(a,l,u,h,p){for(;p>=64;){for(var g=l[0],w=l[1],y=l[2],C=l[3],T=l[4],k=l[5],N=l[6],O=l[7],B=0;B<16;B++){var z=h+B*4;a[B]=e.readUint32BE(u,z)}for(var B=16;B<64;B++){var G=a[B-2],$=(G>>>17|G<<32-17)^(G>>>19|G<<32-19)^G>>>10;G=a[B-15];var D=(G>>>7|G<<32-7)^(G>>>18|G<<32-18)^G>>>3;a[B]=($+a[B-7]|0)+(D+a[B-16]|0)}for(var B=0;B<64;B++){var $=(((T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7))+(T&k^~T&N)|0)+(O+(i[B]+a[B]|0)|0)|0,D=((g>>>2|g<<32-2)^(g>>>13|g<<32-13)^(g>>>22|g<<32-22))+(g&w^g&y^w&y)|0;O=N,N=k,k=T,T=C+$|0,C=y,y=w,w=g,g=$+D|0}l[0]+=g,l[1]+=w,l[2]+=y,l[3]+=C,l[4]+=T,l[5]+=k,l[6]+=N,l[7]+=O,h+=64,p-=64}return h}function o(a){var l=new n;l.update(a);var u=l.digest();return l.clean(),u}r.hash=o})(Rm);var O6={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sharedKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.scalarMultBase=r.scalarMult=r.SHARED_KEY_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;const e=c1,t=Hc;r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=32,r.SHARED_KEY_LENGTH=32;function n(B){const z=new Float64Array(16);if(B)for(let G=0;G>16&1),G[Q-1]&=65535;G[15]=$[15]-32767-(G[14]>>16&1);const V=G[15]>>16&1;G[14]&=65535,a($,G,1-V)}for(let D=0;D<16;D++)B[2*D]=$[D]&255,B[2*D+1]=$[D]>>8}function u(B,z){for(let G=0;G<16;G++)B[G]=z[2*G]+(z[2*G+1]<<8);B[15]&=32767}function h(B,z,G){for(let $=0;$<16;$++)B[$]=z[$]+G[$]}function p(B,z,G){for(let $=0;$<16;$++)B[$]=z[$]-G[$]}function g(B,z,G){let $,D,V=0,Q=0,F=0,M=0,b=0,d=0,m=0,x=0,A=0,I=0,R=0,S=0,E=0,_=0,L=0,ie=0,q=0,Y=0,K=0,te=0,re=0,H=0,U=0,W=0,le=0,de=0,Se=0,Me=0,ke=0,Ke=0,Re=0,je=G[0],De=G[1],Je=G[2],ze=G[3],qe=G[4],Ve=G[5],He=G[6],Be=G[7],Ge=G[8],Xe=G[9],se=G[10],J=G[11],X=G[12],ue=G[13],we=G[14],ye=G[15];$=z[0],V+=$*je,Q+=$*De,F+=$*Je,M+=$*ze,b+=$*qe,d+=$*Ve,m+=$*He,x+=$*Be,A+=$*Ge,I+=$*Xe,R+=$*se,S+=$*J,E+=$*X,_+=$*ue,L+=$*we,ie+=$*ye,$=z[1],Q+=$*je,F+=$*De,M+=$*Je,b+=$*ze,d+=$*qe,m+=$*Ve,x+=$*He,A+=$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,$=V+D+65535,D=Math.floor($/65536),V=$-D*65536,$=Q+D+65535,D=Math.floor($/65536),Q=$-D*65536,$=F+D+65535,D=Math.floor($/65536),F=$-D*65536,$=M+D+65535,D=Math.floor($/65536),M=$-D*65536,$=b+D+65535,D=Math.floor($/65536),b=$-D*65536,$=d+D+65535,D=Math.floor($/65536),d=$-D*65536,$=m+D+65535,D=Math.floor($/65536),m=$-D*65536,$=x+D+65535,D=Math.floor($/65536),x=$-D*65536,$=A+D+65535,D=Math.floor($/65536),A=$-D*65536,$=I+D+65535,D=Math.floor($/65536),I=$-D*65536,$=R+D+65535,D=Math.floor($/65536),R=$-D*65536,$=S+D+65535,D=Math.floor($/65536),S=$-D*65536,$=E+D+65535,D=Math.floor($/65536),E=$-D*65536,$=_+D+65535,D=Math.floor($/65536),_=$-D*65536,$=L+D+65535,D=Math.floor($/65536),L=$-D*65536,$=ie+D+65535,D=Math.floor($/65536),ie=$-D*65536,V+=D-1+37*(D-1),D=1,$=V+D+65535,D=Math.floor($/65536),V=$-D*65536,$=Q+D+65535,D=Math.floor($/65536),Q=$-D*65536,$=F+D+65535,D=Math.floor($/65536),F=$-D*65536,$=M+D+65535,D=Math.floor($/65536),M=$-D*65536,$=b+D+65535,D=Math.floor($/65536),b=$-D*65536,$=d+D+65535,D=Math.floor($/65536),d=$-D*65536,$=m+D+65535,D=Math.floor($/65536),m=$-D*65536,$=x+D+65535,D=Math.floor($/65536),x=$-D*65536,$=A+D+65535,D=Math.floor($/65536),A=$-D*65536,$=I+D+65535,D=Math.floor($/65536),I=$-D*65536,$=R+D+65535,D=Math.floor($/65536),R=$-D*65536,$=S+D+65535,D=Math.floor($/65536),S=$-D*65536,$=E+D+65535,D=Math.floor($/65536),E=$-D*65536,$=_+D+65535,D=Math.floor($/65536),_=$-D*65536,$=L+D+65535,D=Math.floor($/65536),L=$-D*65536,$=ie+D+65535,D=Math.floor($/65536),ie=$-D*65536,V+=D-1+37*(D-1),B[0]=V,B[1]=Q,B[2]=F,B[3]=M,B[4]=b,B[5]=d,B[6]=m,B[7]=x,B[8]=A,B[9]=I,B[10]=R,B[11]=S,B[12]=E,B[13]=_,B[14]=L,B[15]=ie}function w(B,z){g(B,z,z)}function y(B,z){const G=n();for(let $=0;$<16;$++)G[$]=z[$];for(let $=253;$>=0;$--)w(G,G),$!==2&&$!==4&&g(G,G,z);for(let $=0;$<16;$++)B[$]=G[$]}function C(B,z){const G=new Uint8Array(32),$=new Float64Array(80),D=n(),V=n(),Q=n(),F=n(),M=n(),b=n();for(let A=0;A<31;A++)G[A]=B[A];G[31]=B[31]&127|64,G[0]&=248,u($,z);for(let A=0;A<16;A++)V[A]=$[A];D[0]=F[0]=1;for(let A=254;A>=0;--A){const I=G[A>>>3]>>>(A&7)&1;a(D,V,I),a(Q,F,I),h(M,D,Q),p(D,D,Q),h(Q,V,F),p(V,V,F),w(F,M),w(b,D),g(D,Q,D),g(Q,V,M),h(M,D,Q),p(D,D,Q),w(V,D),p(Q,F,b),g(D,Q,s),h(D,D,F),g(Q,Q,D),g(D,F,b),g(F,V,$),w(V,M),a(D,V,I),a(Q,F,I)}for(let A=0;A<16;A++)$[A+16]=D[A],$[A+32]=Q[A],$[A+48]=V[A],$[A+64]=F[A];const d=$.subarray(32),m=$.subarray(16);y(d,d),g(m,m,d);const x=new Uint8Array(32);return l(x,m),x}r.scalarMult=C;function T(B){return C(B,i)}r.scalarMultBase=T;function k(B){if(B.length!==r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${r.SECRET_KEY_LENGTH} bytes`);const z=new Uint8Array(B);return{publicKey:T(z),secretKey:z}}r.generateKeyPairFromSeed=k;function N(B){const z=(0,e.randomBytes)(32,B),G=k(z);return(0,t.wipe)(z),G}r.generateKeyPair=N;function O(B,z,G=!1){if(B.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(z.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const $=C(B,z);if(G){let D=0;for(let V=0;V<$.length;V++)D|=$[V];if(D===0)throw new Error("X25519: invalid shared key")}return $}r.sharedKey=O})(O6);function N$(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function moe(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?N$(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function D6(r,e){e||(e=r.reduce((i,s)=>i+s.length,0));const t=moe(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return N$(t)}function SRe(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,B=new Uint8Array(O);k!==N;){for(var z=y[k],G=0,$=O-1;(z!==0||G>>0,B[$]=z%a>>>0,z=z/a>>>0;if(z!==0)throw new Error("Non-zero carry");T=G,k++}for(var D=O-T;D!==O&&B[D]===0;)D++;for(var V=l.repeat(C);D>>0,O=new Uint8Array(N);y[C];){var B=t[y.charCodeAt(C)];if(B===255)return;for(var z=0,G=N-1;(B!==0||z>>0,O[G]=B%256>>>0,B=B/256>>>0;if(B!==0)throw new Error("Non-zero carry");k=z,C++}if(y[C]!==" "){for(var $=N-k;$!==N&&O[$]===0;)$++;for(var D=new Uint8Array(T+(N-$)),V=T;$!==N;)D[V++]=O[$++];return D}}}function w(y){var C=g(y);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:g,decode:w}}var IRe=SRe,TRe=IRe;const RRe=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},kRe=r=>new TextEncoder().encode(r),MRe=r=>new TextDecoder().decode(r);class NRe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class PRe{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return boe(this,e)}}class ORe{constructor(e){this.decoders=e}or(e){return boe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const boe=(r,e)=>new ORe({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class DRe{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new NRe(e,t,n),this.decoder=new PRe(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const fS=({name:r,prefix:e,encode:t,decode:n})=>new DRe(r,e,t,n),$6=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=TRe(t,e);return fS({prefix:r,name:e,encode:n,decode:s=>RRe(i(s))})},$Re=(r,e,t,n)=>{const i={};for(let h=0;h=8&&(a-=8,o[u++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},BRe=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)o-=t,s+=e[i&a>>o];if(o&&(s+=e[i&a<fS({prefix:e,name:r,encode(i){return BRe(i,n,t)},decode(i){return $Re(i,n,t,r)}}),LRe=fS({prefix:"\0",name:"identity",encode:r=>MRe(r),decode:r=>kRe(r)}),URe=Object.freeze(Object.defineProperty({__proto__:null,identity:LRe},Symbol.toStringTag,{value:"Module"})),FRe=jo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),jRe=Object.freeze(Object.defineProperty({__proto__:null,base2:FRe},Symbol.toStringTag,{value:"Module"})),zRe=jo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),HRe=Object.freeze(Object.defineProperty({__proto__:null,base8:zRe},Symbol.toStringTag,{value:"Module"})),qRe=$6({prefix:"9",name:"base10",alphabet:"0123456789"}),WRe=Object.freeze(Object.defineProperty({__proto__:null,base10:qRe},Symbol.toStringTag,{value:"Module"})),VRe=jo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),GRe=jo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),KRe=Object.freeze(Object.defineProperty({__proto__:null,base16:VRe,base16upper:GRe},Symbol.toStringTag,{value:"Module"})),ZRe=jo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),JRe=jo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),YRe=jo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),QRe=jo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),XRe=jo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),eke=jo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),tke=jo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rke=jo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),nke=jo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),ike=Object.freeze(Object.defineProperty({__proto__:null,base32:ZRe,base32hex:XRe,base32hexpad:tke,base32hexpadupper:rke,base32hexupper:eke,base32pad:YRe,base32padupper:QRe,base32upper:JRe,base32z:nke},Symbol.toStringTag,{value:"Module"})),ske=$6({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),oke=$6({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),ake=Object.freeze(Object.defineProperty({__proto__:null,base36:ske,base36upper:oke},Symbol.toStringTag,{value:"Module"})),cke=$6({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),lke=$6({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),uke=Object.freeze(Object.defineProperty({__proto__:null,base58btc:cke,base58flickr:lke},Symbol.toStringTag,{value:"Module"})),hke=jo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),fke=jo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),dke=jo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),pke=jo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),gke=Object.freeze(Object.defineProperty({__proto__:null,base64:hke,base64pad:fke,base64url:dke,base64urlpad:pke},Symbol.toStringTag,{value:"Module"})),woe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),mke=woe.reduce((r,e,t)=>(r[t]=e,r),[]),bke=woe.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function wke(r){return r.reduce((e,t)=>(e+=mke[t],e),"")}function vke(r){const e=[];for(const t of r){const n=bke[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const yke=fS({prefix:"🚀",name:"base256emoji",encode:wke,decode:vke}),xke=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:yke},Symbol.toStringTag,{value:"Module"}));new TextEncoder,new TextDecoder;const voe={...URe,...jRe,...HRe,...WRe,...KRe,...ike,...ake,...uke,...gke,...xke};function yoe(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const xoe=yoe("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),P$=yoe("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=moe(r.length);for(let t=0;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Ske:typeof navigator<"u"?Ioe(navigator.userAgent):Nke()}function kke(r){return r!==""&&Rke.reduce(function(e,t){var n=t[0],i=t[1];if(e)return e;var s=i.exec(r);return!!s&&[n,s]},!1)}function Ioe(r){var e=kke(r);if(!e)return null;var t=e[0],n=e[1];if(t==="searchbot")return new Cke;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length=0,Z+K.replace(/\u001b\[\d\d?m/g,"").length+1},0);return W>60?ae[0]+(B===""?"":B+` + `)+" "+A.join(`, + `)+" "+ae[1]:ae[0]+B+" "+A.join(", ")+" "+ae[1]}r.types=HUe();function R(A){return Array.isArray(A)}r.isArray=R;function k(A){return typeof A=="boolean"}r.isBoolean=k;function P(A){return A===null}r.isNull=P;function N(A){return A==null}r.isNullOrUndefined=N;function $(A){return typeof A=="number"}r.isNumber=$;function j(A){return typeof A=="string"}r.isString=j;function G(A){return typeof A=="symbol"}r.isSymbol=G;function U(A){return A===void 0}r.isUndefined=U;function L(A){return V(A)&&p(A)==="[object RegExp]"}r.isRegExp=L,r.types.isRegExp=L;function V(A){return typeof A=="object"&&A!==null}r.isObject=V;function te(A){return V(A)&&p(A)==="[object Date]"}r.isDate=te,r.types.isDate=te;function D(A){return V(A)&&(p(A)==="[object Error]"||A instanceof Error)}r.isError=D,r.types.isNativeError=D;function x(A){return typeof A=="function"}r.isFunction=x;function y(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A>"u"}r.isPrimitive=y,r.isBuffer=qUe();function p(A){return Object.prototype.toString.call(A)}function g(A){return A<10?"0"+A.toString(10):A.toString(10)}var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var A=new Date,B=[g(A.getHours()),g(A.getMinutes()),g(A.getSeconds())].join(":");return[A.getDate(),_[A.getMonth()],B].join(" ")}r.log=function(){console.log("%s - %s",S(),r.format.apply(r,arguments))},r.inherits=an(),r._extend=function(A,B){if(!B||!V(B))return A;for(var ae=Object.keys(B),W=ae.length;W--;)A[ae[W]]=B[ae[W]];return A};function T(A,B){return Object.prototype.hasOwnProperty.call(A,B)}var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&B[I]){var ae=B[I];if(typeof ae!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ae,I,{value:ae,enumerable:!1,writable:!1,configurable:!0}),ae}function ae(){for(var W,Z,K=new Promise(function(H,F){W=H,Z=F}),ee=[],re=0;re0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(R){var k={data:R,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var R=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,R}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(R){if(this.length===0)return"";for(var k=this.head,P=""+k.data;k=k.next;)P+=R+k.data;return P}},{key:"concat",value:function(R){if(this.length===0)return u.alloc(0);for(var k=u.allocUnsafe(R>>>0),P=this.head,N=0;P;)b(P.data,k,N),N+=P.data.length,P=P.next;return k}},{key:"consume",value:function(R,k){var P;return R$.length?$.length:R;if(j===$.length?N+=$:N+=$.slice(0,R),R-=j,R===0){j===$.length?(++P,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=$.slice(j));break}++P}return this.length-=P,N}},{key:"_getBuffer",value:function(R){var k=u.allocUnsafe(R),P=this.head,N=1;for(P.data.copy(k),R-=P.data.length;P=P.next;){var $=P.data,j=R>$.length?$.length:R;if($.copy(k,k.length-R,0,j),R-=j,R===0){j===$.length?(++N,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=$.slice(j));break}++N}return this.length-=N,k}},{key:m,value:function(R,k){return h(this,e(e({},k),{},{depth:0,customInspect:!1}))}}]),v}(),g$}var b$,kae;function Rae(){if(kae)return b$;kae=1;function r(a,o){var l=this,u=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return u||f?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(i,this,a)):vt.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(h){!o&&h?l._writableState?l._writableState.errorEmitted?vt.nextTick(t,l):(l._writableState.errorEmitted=!0,vt.nextTick(e,l,h)):vt.nextTick(e,l,h):o?(vt.nextTick(t,l),o(h)):vt.nextTick(t,l)}),this)}function e(a,o){i(a,o),t(a)}function t(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,o){a.emit("error",o)}function s(a,o){var l=a._readableState,u=a._writableState;l&&l.autoDestroy||u&&u.autoDestroy?a.destroy(o):a.emit("error",o)}return b$={destroy:r,undestroy:n,errorOrDestroy:s},b$}var v$={},Mae;function ty(){if(Mae)return v$;Mae=1;function r(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,o.__proto__=l}var e={};function t(o,l,u){u||(u=Error);function f(m,b,v){return typeof l=="string"?l:l(m,b,v)}var h=function(m){r(b,m);function b(v,C,R){return m.call(this,f(v,C,R))||this}return b}(u);h.prototype.name=u.name,h.prototype.code=o,e[o]=h}function n(o,l){if(Array.isArray(o)){var u=o.length;return o=o.map(function(f){return String(f)}),u>2?"one of ".concat(l," ").concat(o.slice(0,u-1).join(", "),", or ")+o[u-1]:u===2?"one of ".concat(l," ").concat(o[0]," or ").concat(o[1]):"of ".concat(l," ").concat(o[0])}else return"of ".concat(l," ").concat(String(o))}function i(o,l,u){return o.substr(0,l.length)===l}function s(o,l,u){return(u===void 0||u>o.length)&&(u=o.length),o.substring(u-l.length,u)===l}function a(o,l,u){return typeof u!="number"&&(u=0),u+l.length>o.length?!1:o.indexOf(l,u)!==-1}return t("ERR_INVALID_OPT_VALUE",function(o,l){return'The value "'+l+'" is invalid for option "'+o+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(o,l,u){var f;typeof l=="string"&&i(l,"not ")?(f="must not be",l=l.replace(/^not /,"")):f="must be";var h;if(s(o," argument"))h="The ".concat(o," ").concat(f," ").concat(n(l,"type"));else{var m=a(o,".")?"property":"argument";h='The "'.concat(o,'" ').concat(m," ").concat(f," ").concat(n(l,"type"))}return h+=". Received type ".concat(typeof u),h},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),v$.codes=e,v$}var w$,Pae;function Oae(){if(Pae)return w$;Pae=1;var r=ty().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,a){var o=e(i,a,s);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var l=a?s:"highWaterMark";throw new r(l,o)}return Math.floor(o)}return n.objectMode?16:16*1024}return w$={getHighWaterMark:t},w$}var y$,Nae;function VUe(){if(Nae)return y$;Nae=1,y$=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!ut.localStorage)return!1}catch{return!1}var n=ut.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return y$}var x$,Dae;function _$(){if(Dae)return x$;Dae=1,x$=L;function r(Z){var K=this;this.next=null,this.entry=null,this.finish=function(){W(K,Z)}}var e;L.WritableState=G;var t={deprecate:VUe()},n=Hse(),i=Cc.Buffer,s=(typeof ut<"u"?ut:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(Z){return i.from(Z)}function o(Z){return i.isBuffer(Z)||Z instanceof s}var l=Rae(),u=Oae(),f=u.getHighWaterMark,h=ty().codes,m=h.ERR_INVALID_ARG_TYPE,b=h.ERR_METHOD_NOT_IMPLEMENTED,v=h.ERR_MULTIPLE_CALLBACK,C=h.ERR_STREAM_CANNOT_PIPE,R=h.ERR_STREAM_DESTROYED,k=h.ERR_STREAM_NULL_VALUES,P=h.ERR_STREAM_WRITE_AFTER_END,N=h.ERR_UNKNOWN_ENCODING,$=l.errorOrDestroy;an()(L,n);function j(){}function G(Z,K,ee){e=e||mb(),Z=Z||{},typeof ee!="boolean"&&(ee=K instanceof e),this.objectMode=!!Z.objectMode,ee&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=f(this,Z,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var re=Z.decodeStrings===!1;this.decodeStrings=!re,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){_(K,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var K=this.bufferedRequest,ee=[];K;)ee.push(K),K=K.next;return ee},function(){try{Object.defineProperty(G.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var U;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(K){return U.call(this,K)?!0:this!==L?!1:K&&K._writableState instanceof G}})):U=function(K){return K instanceof this};function L(Z){e=e||mb();var K=this instanceof e;if(!K&&!U.call(L,this))return new L(Z);this._writableState=new G(Z,this,K),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),n.call(this)}L.prototype.pipe=function(){$(this,new C)};function V(Z,K){var ee=new P;$(Z,ee),vt.nextTick(K,ee)}function te(Z,K,ee,re){var H;return ee===null?H=new k:typeof ee!="string"&&!K.objectMode&&(H=new m("chunk",["string","Buffer"],ee)),H?($(Z,H),vt.nextTick(re,H),!1):!0}L.prototype.write=function(Z,K,ee){var re=this._writableState,H=!1,F=!re.objectMode&&o(Z);return F&&!i.isBuffer(Z)&&(Z=a(Z)),typeof K=="function"&&(ee=K,K=null),F?K="buffer":K||(K=re.defaultEncoding),typeof ee!="function"&&(ee=j),re.ending?V(this,ee):(F||te(this,re,Z,ee))&&(re.pendingcb++,H=x(this,re,F,Z,K,ee)),H},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&I(this,Z))},L.prototype.setDefaultEncoding=function(K){if(typeof K=="string"&&(K=K.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((K+"").toLowerCase())>-1))throw new N(K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(Z,K,ee){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof K=="string"&&(K=i.from(K,ee)),K}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function x(Z,K,ee,re,H,F){if(!ee){var q=D(K,re,H);re!==q&&(ee=!0,H="buffer",re=q)}var fe=K.objectMode?1:re.length;K.length+=fe;var pe=K.length>5===6?2:k>>4===14?3:k>>3===30?4:k>>6===2?-1:-2}function a(k,P,N){var $=P.length-1;if($=0?(j>0&&(k.lastNeed=j-1),j):--$=0?(j>0&&(k.lastNeed=j-2),j):--$=0?(j>0&&(j===2?j=0:k.lastNeed=j-3),j):0))}function o(k,P,N){if((P[0]&192)!==128)return k.lastNeed=0,"�";if(k.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return k.lastNeed=1,"�";if(k.lastNeed>2&&P.length>2&&(P[2]&192)!==128)return k.lastNeed=2,"�"}}function l(k){var P=this.lastTotal-this.lastNeed,N=o(this,k);if(N!==void 0)return N;if(this.lastNeed<=k.length)return k.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,P,0,k.length),this.lastNeed-=k.length}function u(k,P){var N=a(this,k,P);if(!this.lastNeed)return k.toString("utf8",P);this.lastTotal=N;var $=k.length-(N-this.lastNeed);return k.copy(this.lastChar,0,$),k.toString("utf8",P,$)}function f(k){var P=k&&k.length?this.write(k):"";return this.lastNeed?P+"�":P}function h(k,P){if((k.length-P)%2===0){var N=k.toString("utf16le",P);if(N){var $=N.charCodeAt(N.length-1);if($>=55296&&$<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",P,k.length-1)}function m(k){var P=k&&k.length?this.write(k):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,N)}return P}function b(k,P){var N=(k.length-P)%3;return N===0?k.toString("base64",P):(this.lastNeed=3-N,this.lastTotal=3,N===1?this.lastChar[0]=k[k.length-1]:(this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1]),k.toString("base64",P,k.length-N))}function v(k){var P=k&&k.length?this.write(k):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function C(k){return k.toString(this.encoding)}function R(k){return k&&k.length?this.write(k):""}return C$}var A$,Lae;function II(){if(Lae)return A$;Lae=1;var r=ty().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,l=new Array(o),u=0;u0)if(typeof q!="string"&&!Me.objectMode&&Object.getPrototypeOf(q)!==n.prototype&&(q=s(q)),pe)Me.endEmitted?j(F,new k):D(F,Me,q,!0);else if(Me.ended)j(F,new C);else{if(Me.destroyed)return!1;Me.reading=!1,Me.decoder&&!fe?(q=Me.decoder.write(q),Me.objectMode||q.length!==0?D(F,Me,q,!1):I(F,Me)):D(F,Me,q,!1)}else pe||(Me.reading=!1,I(F,Me))}return!Me.ended&&(Me.length=y?F=y:(F--,F|=F>>>1,F|=F>>>2,F|=F>>>4,F|=F>>>8,F|=F>>>16,F++),F}function g(F,q){return F<=0||q.length===0&&q.ended?0:q.objectMode?1:F!==F?q.flowing&&q.length?q.buffer.head.data.length:q.length:(F>q.highWaterMark&&(q.highWaterMark=p(F)),F<=q.length?F:q.ended?q.length:(q.needReadable=!0,0))}V.prototype.read=function(F){l("read",F),F=parseInt(F,10);var q=this._readableState,fe=F;if(F!==0&&(q.emittedReadable=!1),F===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return l("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?ee(this):S(this),null;if(F=g(F,q),F===0&&q.ended)return q.length===0&&ee(this),null;var pe=q.needReadable;l("need readable",pe),(q.length===0||q.length-F0?Ee=K(F,q):Ee=null,Ee===null?(q.needReadable=q.length<=q.highWaterMark,F=0):(q.length-=F,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),fe!==F&&q.ended&&ee(this)),Ee!==null&&this.emit("data",Ee),Ee};function _(F,q){if(l("onEofChunk"),!q.ended){if(q.decoder){var fe=q.decoder.end();fe&&fe.length&&(q.buffer.push(fe),q.length+=q.objectMode?1:fe.length)}q.ended=!0,q.sync?S(F):(q.needReadable=!1,q.emittedReadable||(q.emittedReadable=!0,T(F)))}}function S(F){var q=F._readableState;l("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(l("emitReadable",q.flowing),q.emittedReadable=!0,vt.nextTick(T,F))}function T(F){var q=F._readableState;l("emitReadable_",q.destroyed,q.length,q.ended),!q.destroyed&&(q.length||q.ended)&&(F.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,Z(F)}function I(F,q){q.readingMore||(q.readingMore=!0,vt.nextTick(E,F,q))}function E(F,q){for(;!q.reading&&!q.ended&&(q.length1&&H(pe.pipes,F)!==-1)&&!Qe&&(l("false write response, pause",pe.awaitDrain),pe.awaitDrain++),fe.pause())}function Xe(Be){l("onerror",Be),et(),F.removeListener("error",Xe),e(F,"error")===0&&j(F,Be)}U(F,"error",Xe);function Le(){F.removeListener("finish",Ge),et()}F.once("close",Le);function Ge(){l("onfinish"),F.removeListener("close",Le),et()}F.once("finish",Ge);function et(){l("unpipe"),fe.unpipe(F)}return F.emit("pipe",fe),pe.flowing||(l("pipe resume"),fe.resume()),F};function M(F){return function(){var fe=F._readableState;l("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&e(F,"data")&&(fe.flowing=!0,Z(F))}}V.prototype.unpipe=function(F){var q=this._readableState,fe={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return F&&F!==q.pipes?this:(F||(F=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,F&&F.emit("unpipe",this,fe),this);if(!F){var pe=q.pipes,Ee=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var Me=0;Me0,pe.flowing!==!1&&this.resume()):F==="readable"&&!pe.endEmitted&&!pe.readableListening&&(pe.readableListening=pe.needReadable=!0,pe.flowing=!1,pe.emittedReadable=!1,l("on readable",pe.length,pe.reading),pe.length?S(this):pe.reading||vt.nextTick(B,this)),fe},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(F,q){var fe=t.prototype.removeListener.call(this,F,q);return F==="readable"&&vt.nextTick(A,this),fe},V.prototype.removeAllListeners=function(F){var q=t.prototype.removeAllListeners.apply(this,arguments);return(F==="readable"||F===void 0)&&vt.nextTick(A,this),q};function A(F){var q=F._readableState;q.readableListening=F.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:F.listenerCount("data")>0&&F.resume()}function B(F){l("readable nexttick read 0"),F.read(0)}V.prototype.resume=function(){var F=this._readableState;return F.flowing||(l("resume"),F.flowing=!F.readableListening,ae(this,F)),F.paused=!1,this};function ae(F,q){q.resumeScheduled||(q.resumeScheduled=!0,vt.nextTick(W,F,q))}function W(F,q){l("resume",q.reading),q.reading||F.read(0),q.resumeScheduled=!1,F.emit("resume"),Z(F),q.flowing&&!q.reading&&F.read(0)}V.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(F){var q=F._readableState;for(l("flow",q.flowing);q.flowing&&F.read()!==null;);}V.prototype.wrap=function(F){var q=this,fe=this._readableState,pe=!1;F.on("end",function(){if(l("wrapped end"),fe.decoder&&!fe.ended){var Oe=fe.decoder.end();Oe&&Oe.length&&q.push(Oe)}q.push(null)}),F.on("data",function(Oe){if(l("wrapped data"),fe.decoder&&(Oe=fe.decoder.write(Oe)),!(fe.objectMode&&Oe==null)&&!(!fe.objectMode&&(!Oe||!Oe.length))){var je=q.push(Oe);je||(pe=!0,F.pause())}});for(var Ee in F)this[Ee]===void 0&&typeof F[Ee]=="function"&&(this[Ee]=function(je){return function(){return F[je].apply(F,arguments)}}(Ee));for(var Me=0;Me=q.length?(q.decoder?fe=q.buffer.join(""):q.buffer.length===1?fe=q.buffer.first():fe=q.buffer.concat(q.length),q.buffer.clear()):fe=q.buffer.consume(F,q.decoder),fe}function ee(F){var q=F._readableState;l("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,vt.nextTick(re,q,F))}function re(F,q){if(l("endReadableNT",F.endEmitted,F.length),!F.endEmitted&&F.length===0&&(F.endEmitted=!0,q.readable=!1,q.emit("end"),F.autoDestroy)){var fe=q._writableState;(!fe||fe.autoDestroy&&fe.finished)&&q.destroy()}}typeof Symbol=="function"&&(V.from=function(F,q){return $===void 0&&($=KUe()),$(V,F,q)});function H(F,q){for(var fe=0,pe=F.length;fe0;return o(P,$,j,function(G){R||(R=G),G&&k.forEach(l),!$&&(k.forEach(l),C(R))})});return b.reduce(u)}return O$=h,O$}var Gae;function Kae(){return Gae||(Gae=1,function(r,e){e=r.exports=k$(),e.Stream=e,e.Readable=e,e.Writable=_$(),e.Duplex=mb(),e.Transform=M$(),e.PassThrough=qae(),e.finished=II(),e.pipeline=Vae()}(CI,CI.exports)),CI.exports}var N$,Zae;function Jae(){if(Zae)return N$;Zae=1;var r=cn().Buffer,e=Kae().Transform,t=an();function n(s,a){if(!r.isBuffer(s)&&typeof s!="string")throw new TypeError(a+" must be a string or a buffer")}function i(s){e.call(this),this._block=r.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return t(i,e),i.prototype._transform=function(s,a,o){var l=null;try{this.update(s,a)}catch(u){l=u}o(l)},i.prototype._flush=function(s){var a=null;try{this.push(this.digest())}catch(o){a=o}s(a)},i.prototype.update=function(s,a){if(n(s,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(s)||(s=r.from(s,a));for(var o=this._block,l=0;this._blockOffset+s.length-l>=this._blockSize;){for(var u=this._blockOffset;u0;++f)this._length[f]+=h,h=this._length[f]/4294967296|0,h>0&&(this._length[f]-=4294967296*h);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var a=this._digest();s!==void 0&&(a=a.toString(s)),this._block.fill(0),this._blockOffset=0;for(var o=0;o<4;++o)this._length[o]=0;return a},i.prototype._digest=function(){throw new Error("_digest is not implemented")},N$=i,N$}var D$,Yae;function $$(){if(Yae)return D$;Yae=1;var r=an(),e=Jae(),t=cn().Buffer,n=new Array(16);function i(){e.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}r(i,e),i.prototype._update=function(){for(var f=n,h=0;h<16;++h)f[h]=this._block.readInt32LE(h*4);var m=this._a,b=this._b,v=this._c,C=this._d;m=a(m,b,v,C,f[0],3614090360,7),C=a(C,m,b,v,f[1],3905402710,12),v=a(v,C,m,b,f[2],606105819,17),b=a(b,v,C,m,f[3],3250441966,22),m=a(m,b,v,C,f[4],4118548399,7),C=a(C,m,b,v,f[5],1200080426,12),v=a(v,C,m,b,f[6],2821735955,17),b=a(b,v,C,m,f[7],4249261313,22),m=a(m,b,v,C,f[8],1770035416,7),C=a(C,m,b,v,f[9],2336552879,12),v=a(v,C,m,b,f[10],4294925233,17),b=a(b,v,C,m,f[11],2304563134,22),m=a(m,b,v,C,f[12],1804603682,7),C=a(C,m,b,v,f[13],4254626195,12),v=a(v,C,m,b,f[14],2792965006,17),b=a(b,v,C,m,f[15],1236535329,22),m=o(m,b,v,C,f[1],4129170786,5),C=o(C,m,b,v,f[6],3225465664,9),v=o(v,C,m,b,f[11],643717713,14),b=o(b,v,C,m,f[0],3921069994,20),m=o(m,b,v,C,f[5],3593408605,5),C=o(C,m,b,v,f[10],38016083,9),v=o(v,C,m,b,f[15],3634488961,14),b=o(b,v,C,m,f[4],3889429448,20),m=o(m,b,v,C,f[9],568446438,5),C=o(C,m,b,v,f[14],3275163606,9),v=o(v,C,m,b,f[3],4107603335,14),b=o(b,v,C,m,f[8],1163531501,20),m=o(m,b,v,C,f[13],2850285829,5),C=o(C,m,b,v,f[2],4243563512,9),v=o(v,C,m,b,f[7],1735328473,14),b=o(b,v,C,m,f[12],2368359562,20),m=l(m,b,v,C,f[5],4294588738,4),C=l(C,m,b,v,f[8],2272392833,11),v=l(v,C,m,b,f[11],1839030562,16),b=l(b,v,C,m,f[14],4259657740,23),m=l(m,b,v,C,f[1],2763975236,4),C=l(C,m,b,v,f[4],1272893353,11),v=l(v,C,m,b,f[7],4139469664,16),b=l(b,v,C,m,f[10],3200236656,23),m=l(m,b,v,C,f[13],681279174,4),C=l(C,m,b,v,f[0],3936430074,11),v=l(v,C,m,b,f[3],3572445317,16),b=l(b,v,C,m,f[6],76029189,23),m=l(m,b,v,C,f[9],3654602809,4),C=l(C,m,b,v,f[12],3873151461,11),v=l(v,C,m,b,f[15],530742520,16),b=l(b,v,C,m,f[2],3299628645,23),m=u(m,b,v,C,f[0],4096336452,6),C=u(C,m,b,v,f[7],1126891415,10),v=u(v,C,m,b,f[14],2878612391,15),b=u(b,v,C,m,f[5],4237533241,21),m=u(m,b,v,C,f[12],1700485571,6),C=u(C,m,b,v,f[3],2399980690,10),v=u(v,C,m,b,f[10],4293915773,15),b=u(b,v,C,m,f[1],2240044497,21),m=u(m,b,v,C,f[8],1873313359,6),C=u(C,m,b,v,f[15],4264355552,10),v=u(v,C,m,b,f[6],2734768916,15),b=u(b,v,C,m,f[13],1309151649,21),m=u(m,b,v,C,f[4],4149444226,6),C=u(C,m,b,v,f[11],3174756917,10),v=u(v,C,m,b,f[2],718787259,15),b=u(b,v,C,m,f[9],3951481745,21),this._a=this._a+m|0,this._b=this._b+b|0,this._c=this._c+v|0,this._d=this._d+C|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var f=t.allocUnsafe(16);return f.writeInt32LE(this._a,0),f.writeInt32LE(this._b,4),f.writeInt32LE(this._c,8),f.writeInt32LE(this._d,12),f};function s(f,h){return f<>>32-h}function a(f,h,m,b,v,C,R){return s(f+(h&m|~h&b)+v+C|0,R)+h|0}function o(f,h,m,b,v,C,R){return s(f+(h&b|m&~b)+v+C|0,R)+h|0}function l(f,h,m,b,v,C,R){return s(f+(h^m^b)+v+C|0,R)+h|0}function u(f,h,m,b,v,C,R){return s(f+(m^(h|~b))+v+C|0,R)+h|0}return D$=i,D$}var B$,Qae;function L$(){if(Qae)return B$;Qae=1;var r=Cc.Buffer,e=an(),t=Jae(),n=new Array(16),i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],a=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],o=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],u=[1352829926,1548603684,1836072691,2053994217,0];function f(){t.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e(f,t),f.prototype._update=function(){for(var k=n,P=0;P<16;++P)k[P]=this._block.readInt32LE(P*4);for(var N=this._a|0,$=this._b|0,j=this._c|0,G=this._d|0,U=this._e|0,L=this._a|0,V=this._b|0,te=this._c|0,D=this._d|0,x=this._e|0,y=0;y<80;y+=1){var p,g;y<16?(p=m(N,$,j,G,U,k[i[y]],l[0],a[y]),g=R(L,V,te,D,x,k[s[y]],u[0],o[y])):y<32?(p=b(N,$,j,G,U,k[i[y]],l[1],a[y]),g=C(L,V,te,D,x,k[s[y]],u[1],o[y])):y<48?(p=v(N,$,j,G,U,k[i[y]],l[2],a[y]),g=v(L,V,te,D,x,k[s[y]],u[2],o[y])):y<64?(p=C(N,$,j,G,U,k[i[y]],l[3],a[y]),g=b(L,V,te,D,x,k[s[y]],u[3],o[y])):(p=R(N,$,j,G,U,k[i[y]],l[4],a[y]),g=m(L,V,te,D,x,k[s[y]],u[4],o[y])),N=U,U=G,G=h(j,10),j=$,$=p,L=x,x=D,D=h(te,10),te=V,V=g}var _=this._b+j+D|0;this._b=this._c+G+x|0,this._c=this._d+U+L|0,this._d=this._e+N+V|0,this._e=this._a+$+te|0,this._a=_},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var k=r.alloc?r.alloc(20):new r(20);return k.writeInt32LE(this._a,0),k.writeInt32LE(this._b,4),k.writeInt32LE(this._c,8),k.writeInt32LE(this._d,12),k.writeInt32LE(this._e,16),k};function h(k,P){return k<>>32-P}function m(k,P,N,$,j,G,U,L){return h(k+(P^N^$)+G+U|0,L)+j|0}function b(k,P,N,$,j,G,U,L){return h(k+(P&N|~P&$)+G+U|0,L)+j|0}function v(k,P,N,$,j,G,U,L){return h(k+((P|~N)^$)+G+U|0,L)+j|0}function C(k,P,N,$,j,G,U,L){return h(k+(P&$|N&~$)+G+U|0,L)+j|0}function R(k,P,N,$,j,G,U,L){return h(k+(P^(N|~$))+G+U|0,L)+j|0}return B$=f,B$}var U$={exports:{}},F$,Xae;function ry(){if(Xae)return F$;Xae=1;var r=cn().Buffer;function e(t,n){this._block=r.alloc(t),this._finalSize=n,this._blockSize=t,this._len=0}return e.prototype.update=function(t,n){typeof t=="string"&&(n=n||"utf8",t=r.from(t,n));for(var i=this._block,s=this._blockSize,a=t.length,o=this._len,l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var s=(i&4294967295)>>>0,a=(i-s)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(s,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},F$=e,F$}var j$,eoe;function ZUe(){if(eoe)return j$;eoe=1;var r=an(),e=ry(),t=cn().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(u){return u<<5|u>>>27}function o(u){return u<<30|u>>>2}function l(u,f,h,m){return u===0?f&h|~f&m:u===2?f&h|f&m|h&m:f^h^m}return s.prototype._update=function(u){for(var f=this._w,h=this._a|0,m=this._b|0,b=this._c|0,v=this._d|0,C=this._e|0,R=0;R<16;++R)f[R]=u.readInt32BE(R*4);for(;R<80;++R)f[R]=f[R-3]^f[R-8]^f[R-14]^f[R-16];for(var k=0;k<80;++k){var P=~~(k/20),N=a(h)+l(P,m,b,v)+C+f[k]+n[P]|0;C=v,v=b,b=o(m),m=h,h=N}this._a=h+this._a|0,this._b=m+this._b|0,this._c=b+this._c|0,this._d=v+this._d|0,this._e=C+this._e|0},s.prototype._hash=function(){var u=t.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},j$=s,j$}var z$,toe;function JUe(){if(toe)return z$;toe=1;var r=an(),e=ry(),t=cn().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],i=new Array(80);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(f){return f<<1|f>>>31}function o(f){return f<<5|f>>>27}function l(f){return f<<30|f>>>2}function u(f,h,m,b){return f===0?h&m|~h&b:f===2?h&m|h&b|m&b:h^m^b}return s.prototype._update=function(f){for(var h=this._w,m=this._a|0,b=this._b|0,v=this._c|0,C=this._d|0,R=this._e|0,k=0;k<16;++k)h[k]=f.readInt32BE(k*4);for(;k<80;++k)h[k]=a(h[k-3]^h[k-8]^h[k-14]^h[k-16]);for(var P=0;P<80;++P){var N=~~(P/20),$=o(m)+u(N,b,v,C)+R+h[P]+n[N]|0;R=C,C=v,v=l(b),b=m,m=$}this._a=m+this._a|0,this._b=b+this._b|0,this._c=v+this._c|0,this._d=C+this._d|0,this._e=R+this._e|0},s.prototype._hash=function(){var f=t.allocUnsafe(20);return f.writeInt32BE(this._a|0,0),f.writeInt32BE(this._b|0,4),f.writeInt32BE(this._c|0,8),f.writeInt32BE(this._d|0,12),f.writeInt32BE(this._e|0,16),f},z$=s,z$}var H$,roe;function noe(){if(roe)return H$;roe=1;var r=an(),e=ry(),t=cn().Buffer,n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=new Array(64);function s(){this.init(),this._w=i,e.call(this,64,56)}r(s,e),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function a(m,b,v){return v^m&(b^v)}function o(m,b,v){return m&b|v&(m|b)}function l(m){return(m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10)}function u(m){return(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7)}function f(m){return(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3}function h(m){return(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10}return s.prototype._update=function(m){for(var b=this._w,v=this._a|0,C=this._b|0,R=this._c|0,k=this._d|0,P=this._e|0,N=this._f|0,$=this._g|0,j=this._h|0,G=0;G<16;++G)b[G]=m.readInt32BE(G*4);for(;G<64;++G)b[G]=h(b[G-2])+b[G-7]+f(b[G-15])+b[G-16]|0;for(var U=0;U<64;++U){var L=j+u(P)+a(P,N,$)+n[U]+b[U]|0,V=l(v)+o(v,C,R)|0;j=$,$=N,N=P,P=k+L|0,k=R,R=C,C=v,v=L+V|0}this._a=v+this._a|0,this._b=C+this._b|0,this._c=R+this._c|0,this._d=k+this._d|0,this._e=P+this._e|0,this._f=N+this._f|0,this._g=$+this._g|0,this._h=j+this._h|0},s.prototype._hash=function(){var m=t.allocUnsafe(32);return m.writeInt32BE(this._a,0),m.writeInt32BE(this._b,4),m.writeInt32BE(this._c,8),m.writeInt32BE(this._d,12),m.writeInt32BE(this._e,16),m.writeInt32BE(this._f,20),m.writeInt32BE(this._g,24),m.writeInt32BE(this._h,28),m},H$=s,H$}var q$,ioe;function YUe(){if(ioe)return q$;ioe=1;var r=an(),e=noe(),t=ry(),n=cn().Buffer,i=new Array(64);function s(){this.init(),this._w=i,t.call(this,64,56)}return r(s,e),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var a=n.allocUnsafe(28);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a},q$=s,q$}var W$,soe;function aoe(){if(soe)return W$;soe=1;var r=an(),e=ry(),t=cn().Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],i=new Array(160);function s(){this.init(),this._w=i,e.call(this,128,112)}r(s,e),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function a(C,R,k){return k^C&(R^k)}function o(C,R,k){return C&R|k&(C|R)}function l(C,R){return(C>>>28|R<<4)^(R>>>2|C<<30)^(R>>>7|C<<25)}function u(C,R){return(C>>>14|R<<18)^(C>>>18|R<<14)^(R>>>9|C<<23)}function f(C,R){return(C>>>1|R<<31)^(C>>>8|R<<24)^C>>>7}function h(C,R){return(C>>>1|R<<31)^(C>>>8|R<<24)^(C>>>7|R<<25)}function m(C,R){return(C>>>19|R<<13)^(R>>>29|C<<3)^C>>>6}function b(C,R){return(C>>>19|R<<13)^(R>>>29|C<<3)^(C>>>6|R<<26)}function v(C,R){return C>>>0>>0?1:0}return s.prototype._update=function(C){for(var R=this._w,k=this._ah|0,P=this._bh|0,N=this._ch|0,$=this._dh|0,j=this._eh|0,G=this._fh|0,U=this._gh|0,L=this._hh|0,V=this._al|0,te=this._bl|0,D=this._cl|0,x=this._dl|0,y=this._el|0,p=this._fl|0,g=this._gl|0,_=this._hl|0,S=0;S<32;S+=2)R[S]=C.readInt32BE(S*4),R[S+1]=C.readInt32BE(S*4+4);for(;S<160;S+=2){var T=R[S-30],I=R[S-15*2+1],E=f(T,I),M=h(I,T);T=R[S-2*2],I=R[S-2*2+1];var A=m(T,I),B=b(I,T),ae=R[S-7*2],W=R[S-7*2+1],Z=R[S-16*2],K=R[S-16*2+1],ee=M+W|0,re=E+ae+v(ee,M)|0;ee=ee+B|0,re=re+A+v(ee,B)|0,ee=ee+K|0,re=re+Z+v(ee,K)|0,R[S]=re,R[S+1]=ee}for(var H=0;H<160;H+=2){re=R[H],ee=R[H+1];var F=o(k,P,N),q=o(V,te,D),fe=l(k,V),pe=l(V,k),Ee=u(j,y),Me=u(y,j),Oe=n[H],je=n[H+1],Re=a(j,G,U),Qe=a(y,p,g),Ne=_+Me|0,Je=L+Ee+v(Ne,_)|0;Ne=Ne+Qe|0,Je=Je+Re+v(Ne,Qe)|0,Ne=Ne+je|0,Je=Je+Oe+v(Ne,je)|0,Ne=Ne+ee|0,Je=Je+re+v(Ne,ee)|0;var Xe=pe+q|0,Le=fe+F+v(Xe,pe)|0;L=U,_=g,U=G,g=p,G=j,p=y,y=x+Ne|0,j=$+Je+v(y,x)|0,$=N,x=D,N=P,D=te,P=k,te=V,V=Ne+Xe|0,k=Je+Le+v(V,Ne)|0}this._al=this._al+V|0,this._bl=this._bl+te|0,this._cl=this._cl+D|0,this._dl=this._dl+x|0,this._el=this._el+y|0,this._fl=this._fl+p|0,this._gl=this._gl+g|0,this._hl=this._hl+_|0,this._ah=this._ah+k+v(this._al,V)|0,this._bh=this._bh+P+v(this._bl,te)|0,this._ch=this._ch+N+v(this._cl,D)|0,this._dh=this._dh+$+v(this._dl,x)|0,this._eh=this._eh+j+v(this._el,y)|0,this._fh=this._fh+G+v(this._fl,p)|0,this._gh=this._gh+U+v(this._gl,g)|0,this._hh=this._hh+L+v(this._hl,_)|0},s.prototype._hash=function(){var C=t.allocUnsafe(64);function R(k,P,N){C.writeInt32BE(k,N),C.writeInt32BE(P,N+4)}return R(this._ah,this._al,0),R(this._bh,this._bl,8),R(this._ch,this._cl,16),R(this._dh,this._dl,24),R(this._eh,this._el,32),R(this._fh,this._fl,40),R(this._gh,this._gl,48),R(this._hh,this._hl,56),C},W$=s,W$}var V$,ooe;function QUe(){if(ooe)return V$;ooe=1;var r=an(),e=aoe(),t=ry(),n=cn().Buffer,i=new Array(160);function s(){this.init(),this._w=i,t.call(this,128,112)}return r(s,e),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var a=n.allocUnsafe(48);function o(l,u,f){a.writeInt32BE(l,f),a.writeInt32BE(u,f+4)}return o(this._ah,this._al,0),o(this._bh,this._bl,8),o(this._ch,this._cl,16),o(this._dh,this._dl,24),o(this._eh,this._el,32),o(this._fh,this._fl,40),a},V$=s,V$}var coe;function G$(){if(coe)return U$.exports;coe=1;var r=U$.exports=function(t){t=t.toLowerCase();var n=r[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};return r.sha=ZUe(),r.sha1=JUe(),r.sha224=YUe(),r.sha256=noe(),r.sha384=QUe(),r.sha512=aoe(),U$.exports}var K$,loe;function XUe(){if(loe)return K$;loe=1,K$=t;var r=Xn.EventEmitter,e=an();e(t,r),t.Readable=k$(),t.Writable=_$(),t.Duplex=mb(),t.Transform=M$(),t.PassThrough=qae(),t.finished=II(),t.pipeline=Vae(),t.Stream=t;function t(){r.call(this)}return t.prototype.pipe=function(n,i){var s=this;function a(b){n.writable&&n.write(b)===!1&&s.pause&&s.pause()}s.on("data",a);function o(){s.readable&&s.resume&&s.resume()}n.on("drain",o),!n._isStdio&&(!i||i.end!==!1)&&(s.on("end",u),s.on("close",f));var l=!1;function u(){l||(l=!0,n.end())}function f(){l||(l=!0,typeof n.destroy=="function"&&n.destroy())}function h(b){if(m(),r.listenerCount(this,"error")===0)throw b}s.on("error",h),n.on("error",h);function m(){s.removeListener("data",a),n.removeListener("drain",o),s.removeListener("end",u),s.removeListener("close",f),s.removeListener("error",h),n.removeListener("error",h),s.removeListener("end",m),s.removeListener("close",m),n.removeListener("close",m)}return s.on("end",m),s.on("close",m),n.on("close",m),n.emit("pipe",s),n},K$}var Z$,uoe;function q1(){if(uoe)return Z$;uoe=1;var r=cn().Buffer,e=XUe().Transform,t=J8().StringDecoder,n=an();function i(s){e.call(this),this.hashMode=typeof s=="string",this.hashMode?this[s]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return n(i,e),i.prototype.update=function(s,a,o){typeof s=="string"&&(s=r.from(s,a));var l=this._update(s);return this.hashMode?this:(o&&(l=this._toString(l,o)),l)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(s,a,o){var l;try{this.hashMode?this._update(s):this.push(this._update(s))}catch(u){l=u}finally{o(l)}},i.prototype._flush=function(s){var a;try{this.push(this.__final())}catch(o){a=o}s(a)},i.prototype._finalOrDigest=function(s){var a=this.__final()||r.alloc(0);return s&&(a=this._toString(a,s,!0)),a},i.prototype._toString=function(s,a,o){if(this._decoder||(this._decoder=new t(a),this._encoding=a),this._encoding!==a)throw new Error("can't switch encodings");var l=this._decoder.write(s);return o&&(l+=this._decoder.end()),l},Z$=i,Z$}var J$,foe;function Y8(){if(foe)return J$;foe=1;var r=an(),e=$$(),t=L$(),n=G$(),i=q1();function s(a){i.call(this,"digest"),this._hash=a}return r(s,i),s.prototype._update=function(a){this._hash.update(a)},s.prototype._final=function(){return this._hash.digest()},J$=function(o){return o=o.toLowerCase(),o==="md5"?new e:o==="rmd160"||o==="ripemd160"?new t:new s(n(o))},J$}var Y$,doe;function eFe(){if(doe)return Y$;doe=1;var r=an(),e=cn().Buffer,t=q1(),n=e.alloc(128),i=64;function s(a,o){t.call(this,"digest"),typeof o=="string"&&(o=e.from(o)),this._alg=a,this._key=o,o.length>i?o=a(o):o.lengthh){var m=u==="rmd160"?new s:a(u);f=m.update(f).digest()}else f.lengthr||t!==t)throw new TypeError("Bad key length")},tB}var rB,xoe;function _oe(){if(xoe)return rB;xoe=1;var r;if(ut.process&&ut.process.browser)r="utf-8";else if(ut.process&&ut.process.version){var e=parseInt(vt.version.split(".")[0].slice(1),10);r=e>=6?"utf-8":"binary"}else r="utf-8";return rB=r,rB}var nB,Eoe;function Coe(){if(Eoe)return nB;Eoe=1;var r=cn().Buffer;return nB=function(e,t,n){if(r.isBuffer(e))return e;if(typeof e=="string")return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},nB}var iB,Aoe;function Soe(){if(Aoe)return iB;Aoe=1;var r=poe(),e=L$(),t=G$(),n=cn().Buffer,i=yoe(),s=_oe(),a=Coe(),o=n.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function u(m,b,v){var C=f(m),R=m==="sha512"||m==="sha384"?128:64;b.length>R?b=C(b):b.length>>0},sl.writeUInt32BE=function(i,s,a){i[0+a]=s>>>24,i[1+a]=s>>>16&255,i[2+a]=s>>>8&255,i[3+a]=s&255},sl.ip=function(i,s,a,o){for(var l=0,u=0,f=6;f>=0;f-=2){for(var h=0;h<=24;h+=8)l<<=1,l|=s>>>h+f&1;for(var h=0;h<=24;h+=8)l<<=1,l|=i>>>h+f&1}for(var f=6;f>=0;f-=2){for(var h=1;h<=25;h+=8)u<<=1,u|=s>>>h+f&1;for(var h=1;h<=25;h+=8)u<<=1,u|=i>>>h+f&1}a[o+0]=l>>>0,a[o+1]=u>>>0},sl.rip=function(i,s,a,o){for(var l=0,u=0,f=0;f<4;f++)for(var h=24;h>=0;h-=8)l<<=1,l|=s>>>h+f&1,l<<=1,l|=i>>>h+f&1;for(var f=4;f<8;f++)for(var h=24;h>=0;h-=8)u<<=1,u|=s>>>h+f&1,u<<=1,u|=i>>>h+f&1;a[o+0]=l>>>0,a[o+1]=u>>>0},sl.pc1=function(i,s,a,o){for(var l=0,u=0,f=7;f>=5;f--){for(var h=0;h<=24;h+=8)l<<=1,l|=s>>h+f&1;for(var h=0;h<=24;h+=8)l<<=1,l|=i>>h+f&1}for(var h=0;h<=24;h+=8)l<<=1,l|=s>>h+f&1;for(var f=1;f<=3;f++){for(var h=0;h<=24;h+=8)u<<=1,u|=s>>h+f&1;for(var h=0;h<=24;h+=8)u<<=1,u|=i>>h+f&1}for(var h=0;h<=24;h+=8)u<<=1,u|=i>>h+f&1;a[o+0]=l>>>0,a[o+1]=u>>>0},sl.r28shl=function(i,s){return i<>>28-s};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];sl.pc2=function(i,s,a,o){for(var l=0,u=0,f=r.length>>>1,h=0;h>>r[h]&1;for(var h=f;h>>r[h]&1;a[o+0]=l>>>0,a[o+1]=u>>>0},sl.expand=function(i,s,a){var o=0,l=0;o=(i&1)<<5|i>>>27;for(var u=23;u>=15;u-=4)o<<=6,o|=i>>>u&63;for(var u=11;u>=3;u-=4)l|=i>>>u&63,l<<=6;l|=(i&31)<<1|i>>>31,s[a+0]=o>>>0,s[a+1]=l>>>0};var e=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];sl.substitute=function(i,s){for(var a=0,o=0;o<4;o++){var l=i>>>18-o*6&63,u=e[o*64+l];a<<=4,a|=u}for(var o=0;o<4;o++){var l=s>>>18-o*6&63,u=e[4*64+o*64+l];a<<=4,a|=u}return a>>>0};var t=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return sl.permute=function(i){for(var s=0,a=0;a>>t[a]&1;return s>>>0},sl.padSplit=function(i,s,a){for(var o=i.toString(2);o.length0;a--)i+=this._buffer(n,i),s+=this._flushBuffer(o,s);return i+=this._buffer(n,i),o},e.prototype.final=function(n){var i;n&&(i=this.update(n));var s;return this.type==="encrypt"?s=this._finalEncrypt():s=this._finalDecrypt(),i?i.concat(s):s},e.prototype._pad=function(n,i){if(i===0)return!1;for(;i>>1];f=t.r28shl(f,b),h=t.r28shl(h,b),t.pc2(f,h,l.keys,m)}},s.prototype._update=function(l,u,f,h){var m=this._desState,b=t.readUInt32BE(l,u),v=t.readUInt32BE(l,u+4);t.ip(b,v,m.tmp,0),b=m.tmp[0],v=m.tmp[1],this.type==="encrypt"?this._encrypt(m,b,v,m.tmp,0):this._decrypt(m,b,v,m.tmp,0),b=m.tmp[0],v=m.tmp[1],t.writeUInt32BE(f,b,h),t.writeUInt32BE(f,v,h+4)},s.prototype._pad=function(l,u){if(this.padding===!1)return!1;for(var f=l.length-u,h=u;h>>0,b=$}t.rip(v,b,h,m)},s.prototype._decrypt=function(l,u,f,h,m){for(var b=f,v=u,C=l.keys.length-2;C>=0;C-=2){var R=l.keys[C],k=l.keys[C+1];t.expand(b,l.tmp,0),R^=l.tmp[0],k^=l.tmp[1];var P=t.substitute(R,k),N=t.permute(P),$=b;b=(v^N)>>>0,v=$}t.rip(b,v,h,m)},lB}var uB={},$oe;function nFe(){if($oe)return uB;$oe=1;var r=ou(),e=an(),t={};function n(s){r.equal(s.length,8,"Invalid IV length"),this.iv=new Array(8);for(var a=0;a>o%8,n._prev=t(n._prev,s?f:h);return u}function t(n,i){var s=n.length,a=-1,o=r.allocUnsafe(n.length);for(n=r.concat([n,r.from([i])]);++a>7;return o}return gB.encrypt=function(n,i,s){for(var a=i.length,o=r.allocUnsafe(a),l=-1;++l>>24]^b[k>>>16&255]^v[P>>>8&255]^C[N&255]^l[L++],j=m[k>>>24]^b[P>>>16&255]^v[N>>>8&255]^C[R&255]^l[L++],G=m[P>>>24]^b[N>>>16&255]^v[R>>>8&255]^C[k&255]^l[L++],U=m[N>>>24]^b[R>>>16&255]^v[k>>>8&255]^C[P&255]^l[L++],R=$,k=j,P=G,N=U;return $=(f[R>>>24]<<24|f[k>>>16&255]<<16|f[P>>>8&255]<<8|f[N&255])^l[L++],j=(f[k>>>24]<<24|f[P>>>16&255]<<16|f[N>>>8&255]<<8|f[R&255])^l[L++],G=(f[P>>>24]<<24|f[N>>>16&255]<<16|f[R>>>8&255]<<8|f[k&255])^l[L++],U=(f[N>>>24]<<24|f[R>>>16&255]<<16|f[k>>>8&255]<<8|f[P&255])^l[L++],$=$>>>0,j=j>>>0,G=G>>>0,U=U>>>0,[$,j,G,U]}var i=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var o=new Array(256),l=0;l<256;l++)l<128?o[l]=l<<1:o[l]=l<<1^283;for(var u=[],f=[],h=[[],[],[],[]],m=[[],[],[],[]],b=0,v=0,C=0;C<256;++C){var R=v^v<<1^v<<2^v<<3^v<<4;R=R>>>8^R&255^99,u[b]=R,f[R]=b;var k=o[b],P=o[k],N=o[P],$=o[R]*257^R*16843008;h[0][b]=$<<24|$>>>8,h[1][b]=$<<16|$>>>16,h[2][b]=$<<8|$>>>24,h[3][b]=$,$=N*16843009^P*65537^k*257^b*16843008,m[0][R]=$<<24|$>>>8,m[1][R]=$<<16|$>>>16,m[2][R]=$<<8|$>>>24,m[3][R]=$,b===0?b=v=1:(b=k^o[o[o[N^k]]],v^=o[o[v]])}return{SBOX:u,INV_SBOX:f,SUB_MIX:h,INV_SUB_MIX:m}}();function a(o){this._key=e(o),this._reset()}return a.blockSize=4*4,a.keySize=256/8,a.prototype.blockSize=a.blockSize,a.prototype.keySize=a.keySize,a.prototype._reset=function(){for(var o=this._key,l=o.length,u=l+6,f=(u+1)*4,h=[],m=0;m>>24,b=s.SBOX[b>>>24]<<24|s.SBOX[b>>>16&255]<<16|s.SBOX[b>>>8&255]<<8|s.SBOX[b&255],b^=i[m/l|0]<<24):l>6&&m%l===4&&(b=s.SBOX[b>>>24]<<24|s.SBOX[b>>>16&255]<<16|s.SBOX[b>>>8&255]<<8|s.SBOX[b&255]),h[m]=h[m-l]^b}for(var v=[],C=0;C>>24]]^s.INV_SUB_MIX[1][s.SBOX[k>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[k>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[k&255]]}this._nRounds=u,this._keySchedule=h,this._invKeySchedule=v},a.prototype.encryptBlockRaw=function(o){return o=e(o),n(o,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},a.prototype.encryptBlock=function(o){var l=this.encryptBlockRaw(o),u=r.allocUnsafe(16);return u.writeUInt32BE(l[0],0),u.writeUInt32BE(l[1],4),u.writeUInt32BE(l[2],8),u.writeUInt32BE(l[3],12),u},a.prototype.decryptBlock=function(o){o=e(o);var l=o[1];o[1]=o[3],o[3]=l;var u=n(o,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),f=r.allocUnsafe(16);return f.writeUInt32BE(u[0],0),f.writeUInt32BE(u[3],4),f.writeUInt32BE(u[2],8),f.writeUInt32BE(u[1],12),f},a.prototype.scrub=function(){t(this._keySchedule),t(this._invKeySchedule),t(this._key)},_B.AES=a,_B}var EB,ece;function hFe(){if(ece)return EB;ece=1;var r=cn().Buffer,e=r.alloc(16,0);function t(s){return[s.readUInt32BE(0),s.readUInt32BE(4),s.readUInt32BE(8),s.readUInt32BE(12)]}function n(s){var a=r.allocUnsafe(16);return a.writeUInt32BE(s[0]>>>0,0),a.writeUInt32BE(s[1]>>>0,4),a.writeUInt32BE(s[2]>>>0,8),a.writeUInt32BE(s[3]>>>0,12),a}function i(s){this.h=s,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}return i.prototype.ghash=function(s){for(var a=-1;++a0;o--)s[o]=s[o]>>>1|(s[o-1]&1)<<31;s[0]=s[0]>>>1,u&&(s[0]=s[0]^225<<24)}this.state=n(a)},i.prototype.update=function(s){this.cache=r.concat([this.cache,s]);for(var a;this.cache.length>=16;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)},i.prototype.final=function(s,a){return this.cache.length&&this.ghash(r.concat([this.cache,e],16)),this.ghash(n([0,s,0,a])),this.state},EB=i,EB}var CB,tce;function rce(){if(tce)return CB;tce=1;var r=PI(),e=cn().Buffer,t=q1(),n=an(),i=hFe(),s=Q8(),a=Koe();function o(f,h){var m=0;f.length!==h.length&&m++;for(var b=Math.min(f.length,h.length),v=0;v0||a>0;){var h=new e;h.update(f),h.update(n),i&&h.update(i),f=h.digest();var m=0;if(o>0){var b=l.length-o;m=Math.min(o,f.length),f.copy(l,b,0,m),o-=m}if(m0){var v=u.length-a,C=Math.min(a,f.length-m);f.copy(u,v,m,m+C),a-=C}}return f.fill(0),{key:l,iv:u}}return SB=t,SB}var ace;function pFe(){if(ace)return kI;ace=1;var r=xB(),e=rce(),t=cn().Buffer,n=ice(),i=q1(),s=PI(),a=OI(),o=an();function l(b,v,C){i.call(this),this._cache=new f,this._cipher=new s.AES(v),this._prev=t.from(C),this._mode=b,this._autopadding=!0}o(l,i),l.prototype._update=function(b){this._cache.add(b);for(var v,C,R=[];v=this._cache.get();)C=this._mode.encrypt(this,v),R.push(C);return t.concat(R)};var u=t.alloc(16,16);l.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return b=this._mode.encrypt(this,b),this._cipher.scrub(),b;if(!b.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this};function f(){this.cache=t.allocUnsafe(0)}f.prototype.add=function(b){this.cache=t.concat([this.cache,b])},f.prototype.get=function(){if(this.cache.length>15){var b=this.cache.slice(0,16);return this.cache=this.cache.slice(16),b}return null},f.prototype.flush=function(){for(var b=16-this.cache.length,v=t.allocUnsafe(b),C=-1;++C16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v}else if(this.cache.length>=16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache};function f(b){var v=b[15];if(v<1||v>16)throw new Error("unable to decrypt data");for(var C=-1;++C0?x:y},s.min=function(x,y){return x.cmp(y)<0?x:y},s.prototype._init=function(x,y,p){if(typeof x=="number")return this._initNumber(x,y,p);if(typeof x=="object")return this._initArray(x,y,p);y==="hex"&&(y=16),n(y===(y|0)&&y>=2&&y<=36),x=x.toString().replace(/\s+/g,"");var g=0;x[0]==="-"&&(g++,this.negative=1),g=0;g-=3)S=x[g]|x[g-1]<<8|x[g-2]<<16,this.words[_]|=S<>>26-T&67108863,T+=24,T>=26&&(T-=26,_++);else if(p==="le")for(g=0,_=0;g>>26-T&67108863,T+=24,T>=26&&(T-=26,_++);return this.strip()};function o(D,x){var y=D.charCodeAt(x);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function l(D,x,y){var p=o(D,y);return y-1>=x&&(p|=o(D,y-1)<<4),p}s.prototype._parseHex=function(x,y,p){this.length=Math.ceil((x.length-y)/6),this.words=new Array(this.length);for(var g=0;g=y;g-=2)T=l(x,y,g)<<_,this.words[S]|=T&67108863,_>=18?(_-=18,S+=1,this.words[S]|=T>>>26):_+=8;else{var I=x.length-y;for(g=I%2===0?y+1:y;g=18?(_-=18,S+=1,this.words[S]|=T>>>26):_+=8}this.strip()};function u(D,x,y,p){for(var g=0,_=Math.min(D.length,y),S=x;S<_;S++){var T=D.charCodeAt(S)-48;g*=p,T>=49?g+=T-49+10:T>=17?g+=T-17+10:g+=T}return g}s.prototype._parseBase=function(x,y,p){this.words=[0],this.length=1;for(var g=0,_=1;_<=67108863;_*=y)g++;g--,_=_/y|0;for(var S=x.length-p,T=S%g,I=Math.min(S,S-T)+p,E=0,M=p;M1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(x,y){x=x||10,y=y|0||1;var p;if(x===16||x==="hex"){p="";for(var g=0,_=0,S=0;S>>24-g&16777215,_!==0||S!==this.length-1?p=f[6-I.length]+I+p:p=I+p,g+=2,g>=26&&(g-=26,S--)}for(_!==0&&(p=_.toString(16)+p);p.length%y!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(x===(x|0)&&x>=2&&x<=36){var E=h[x],M=m[x];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var B=A.modn(M).toString(x);A=A.idivn(M),A.isZero()?p=B+p:p=f[E-B.length]+B+p}for(this.isZero()&&(p="0"+p);p.length%y!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=this.words[1]*67108864:this.length===3&&this.words[2]===1?x+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(x,y){return n(typeof a<"u"),this.toArrayLike(a,x,y)},s.prototype.toArray=function(x,y){return this.toArrayLike(Array,x,y)},s.prototype.toArrayLike=function(x,y,p){var g=this.byteLength(),_=p||Math.max(1,g);n(g<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0"),this.strip();var S=y==="le",T=new x(_),I,E,M=this.clone();if(S){for(E=0;!M.isZero();E++)I=M.andln(255),M.iushrn(8),T[E]=I;for(;E<_;E++)T[E]=0}else{for(E=0;E<_-g;E++)T[E]=0;for(E=0;!M.isZero();E++)I=M.andln(255),M.iushrn(8),T[_-E-1]=I}return T},Math.clz32?s.prototype._countBits=function(x){return 32-Math.clz32(x)}:s.prototype._countBits=function(x){var y=x,p=0;return y>=4096&&(p+=13,y>>>=13),y>=64&&(p+=7,y>>>=7),y>=8&&(p+=4,y>>>=4),y>=2&&(p+=2,y>>>=2),p+y},s.prototype._zeroBits=function(x){if(x===0)return 26;var y=x,p=0;return y&8191||(p+=13,y>>>=13),y&127||(p+=7,y>>>=7),y&15||(p+=4,y>>>=4),y&3||(p+=2,y>>>=2),y&1||p++,p},s.prototype.bitLength=function(){var x=this.words[this.length-1],y=this._countBits(x);return(this.length-1)*26+y};function b(D){for(var x=new Array(D.bitLength()),y=0;y>>g}return x}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,y=0;yx.length?this.clone().ior(x):x.clone().ior(this)},s.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},s.prototype.iuand=function(x){var y;this.length>x.length?y=x:y=this;for(var p=0;px.length?this.clone().iand(x):x.clone().iand(this)},s.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},s.prototype.iuxor=function(x){var y,p;this.length>x.length?(y=this,p=x):(y=x,p=this);for(var g=0;gx.length?this.clone().ixor(x):x.clone().ixor(this)},s.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},s.prototype.inotn=function(x){n(typeof x=="number"&&x>=0);var y=Math.ceil(x/26)|0,p=x%26;this._expand(y),p>0&&y--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-p),this.strip()},s.prototype.notn=function(x){return this.clone().inotn(x)},s.prototype.setn=function(x,y){n(typeof x=="number"&&x>=0);var p=x/26|0,g=x%26;return this._expand(p+1),y?this.words[p]=this.words[p]|1<x.length?(p=this,g=x):(p=x,g=this);for(var _=0,S=0;S>>26;for(;_!==0&&S>>26;if(this.length=p.length,_!==0)this.words[this.length]=_,this.length++;else if(p!==this)for(;Sx.length?this.clone().iadd(x):x.clone().iadd(this)},s.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var y=this.iadd(x);return x.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var p=this.cmp(x);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,_;p>0?(g=this,_=x):(g=x,_=this);for(var S=0,T=0;T<_.length;T++)y=(g.words[T]|0)-(_.words[T]|0)+S,S=y>>26,this.words[T]=y&67108863;for(;S!==0&&T>26,this.words[T]=y&67108863;if(S===0&&T>>26,A=I&67108863,B=Math.min(E,x.length-1),ae=Math.max(0,E-D.length+1);ae<=B;ae++){var W=E-ae|0;g=D.words[W]|0,_=x.words[ae]|0,S=g*_+A,M+=S/67108864|0,A=S&67108863}y.words[E]=A|0,I=M|0}return I!==0?y.words[E]=I|0:y.length--,y.strip()}var C=function(x,y,p){var g=x.words,_=y.words,S=p.words,T=0,I,E,M,A=g[0]|0,B=A&8191,ae=A>>>13,W=g[1]|0,Z=W&8191,K=W>>>13,ee=g[2]|0,re=ee&8191,H=ee>>>13,F=g[3]|0,q=F&8191,fe=F>>>13,pe=g[4]|0,Ee=pe&8191,Me=pe>>>13,Oe=g[5]|0,je=Oe&8191,Re=Oe>>>13,Qe=g[6]|0,Ne=Qe&8191,Je=Qe>>>13,Xe=g[7]|0,Le=Xe&8191,Ge=Xe>>>13,et=g[8]|0,Be=et&8191,Ke=et>>>13,pt=g[9]|0,ne=pt&8191,Y=pt>>>13,X=_[0]|0,ue=X&8191,we=X>>>13,Ce=_[1]|0,Te=Ce&8191,lt=Ce>>>13,Ct=_[2]|0,We=Ct&8191,At=Ct>>>13,xt=_[3]|0,dt=xt&8191,Lt=xt>>>13,Ot=_[4]|0,st=Ot&8191,Ut=Ot>>>13,Nt=_[5]|0,tt=Nt&8191,qt=Nt>>>13,Wt=_[6]|0,rt=Wt&8191,Vt=Wt>>>13,Dt=_[7]|0,at=Dt&8191,Ft=Dt>>>13,Rt=_[8]|0,ot=Rt&8191,Gt=Rt>>>13,wr=_[9]|0,wt=wr&8191,yr=wr>>>13;p.negative=x.negative^y.negative,p.length=19,I=Math.imul(B,ue),E=Math.imul(B,we),E=E+Math.imul(ae,ue)|0,M=Math.imul(ae,we);var Xt=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,I=Math.imul(Z,ue),E=Math.imul(Z,we),E=E+Math.imul(K,ue)|0,M=Math.imul(K,we),I=I+Math.imul(B,Te)|0,E=E+Math.imul(B,lt)|0,E=E+Math.imul(ae,Te)|0,M=M+Math.imul(ae,lt)|0;var hr=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,I=Math.imul(re,ue),E=Math.imul(re,we),E=E+Math.imul(H,ue)|0,M=Math.imul(H,we),I=I+Math.imul(Z,Te)|0,E=E+Math.imul(Z,lt)|0,E=E+Math.imul(K,Te)|0,M=M+Math.imul(K,lt)|0,I=I+Math.imul(B,We)|0,E=E+Math.imul(B,At)|0,E=E+Math.imul(ae,We)|0,M=M+Math.imul(ae,At)|0;var ri=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ri>>>26)|0,ri&=67108863,I=Math.imul(q,ue),E=Math.imul(q,we),E=E+Math.imul(fe,ue)|0,M=Math.imul(fe,we),I=I+Math.imul(re,Te)|0,E=E+Math.imul(re,lt)|0,E=E+Math.imul(H,Te)|0,M=M+Math.imul(H,lt)|0,I=I+Math.imul(Z,We)|0,E=E+Math.imul(Z,At)|0,E=E+Math.imul(K,We)|0,M=M+Math.imul(K,At)|0,I=I+Math.imul(B,dt)|0,E=E+Math.imul(B,Lt)|0,E=E+Math.imul(ae,dt)|0,M=M+Math.imul(ae,Lt)|0;var ni=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ni>>>26)|0,ni&=67108863,I=Math.imul(Ee,ue),E=Math.imul(Ee,we),E=E+Math.imul(Me,ue)|0,M=Math.imul(Me,we),I=I+Math.imul(q,Te)|0,E=E+Math.imul(q,lt)|0,E=E+Math.imul(fe,Te)|0,M=M+Math.imul(fe,lt)|0,I=I+Math.imul(re,We)|0,E=E+Math.imul(re,At)|0,E=E+Math.imul(H,We)|0,M=M+Math.imul(H,At)|0,I=I+Math.imul(Z,dt)|0,E=E+Math.imul(Z,Lt)|0,E=E+Math.imul(K,dt)|0,M=M+Math.imul(K,Lt)|0,I=I+Math.imul(B,st)|0,E=E+Math.imul(B,Ut)|0,E=E+Math.imul(ae,st)|0,M=M+Math.imul(ae,Ut)|0;var ii=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ii>>>26)|0,ii&=67108863,I=Math.imul(je,ue),E=Math.imul(je,we),E=E+Math.imul(Re,ue)|0,M=Math.imul(Re,we),I=I+Math.imul(Ee,Te)|0,E=E+Math.imul(Ee,lt)|0,E=E+Math.imul(Me,Te)|0,M=M+Math.imul(Me,lt)|0,I=I+Math.imul(q,We)|0,E=E+Math.imul(q,At)|0,E=E+Math.imul(fe,We)|0,M=M+Math.imul(fe,At)|0,I=I+Math.imul(re,dt)|0,E=E+Math.imul(re,Lt)|0,E=E+Math.imul(H,dt)|0,M=M+Math.imul(H,Lt)|0,I=I+Math.imul(Z,st)|0,E=E+Math.imul(Z,Ut)|0,E=E+Math.imul(K,st)|0,M=M+Math.imul(K,Ut)|0,I=I+Math.imul(B,tt)|0,E=E+Math.imul(B,qt)|0,E=E+Math.imul(ae,tt)|0,M=M+Math.imul(ae,qt)|0;var si=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(si>>>26)|0,si&=67108863,I=Math.imul(Ne,ue),E=Math.imul(Ne,we),E=E+Math.imul(Je,ue)|0,M=Math.imul(Je,we),I=I+Math.imul(je,Te)|0,E=E+Math.imul(je,lt)|0,E=E+Math.imul(Re,Te)|0,M=M+Math.imul(Re,lt)|0,I=I+Math.imul(Ee,We)|0,E=E+Math.imul(Ee,At)|0,E=E+Math.imul(Me,We)|0,M=M+Math.imul(Me,At)|0,I=I+Math.imul(q,dt)|0,E=E+Math.imul(q,Lt)|0,E=E+Math.imul(fe,dt)|0,M=M+Math.imul(fe,Lt)|0,I=I+Math.imul(re,st)|0,E=E+Math.imul(re,Ut)|0,E=E+Math.imul(H,st)|0,M=M+Math.imul(H,Ut)|0,I=I+Math.imul(Z,tt)|0,E=E+Math.imul(Z,qt)|0,E=E+Math.imul(K,tt)|0,M=M+Math.imul(K,qt)|0,I=I+Math.imul(B,rt)|0,E=E+Math.imul(B,Vt)|0,E=E+Math.imul(ae,rt)|0,M=M+Math.imul(ae,Vt)|0;var wn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(wn>>>26)|0,wn&=67108863,I=Math.imul(Le,ue),E=Math.imul(Le,we),E=E+Math.imul(Ge,ue)|0,M=Math.imul(Ge,we),I=I+Math.imul(Ne,Te)|0,E=E+Math.imul(Ne,lt)|0,E=E+Math.imul(Je,Te)|0,M=M+Math.imul(Je,lt)|0,I=I+Math.imul(je,We)|0,E=E+Math.imul(je,At)|0,E=E+Math.imul(Re,We)|0,M=M+Math.imul(Re,At)|0,I=I+Math.imul(Ee,dt)|0,E=E+Math.imul(Ee,Lt)|0,E=E+Math.imul(Me,dt)|0,M=M+Math.imul(Me,Lt)|0,I=I+Math.imul(q,st)|0,E=E+Math.imul(q,Ut)|0,E=E+Math.imul(fe,st)|0,M=M+Math.imul(fe,Ut)|0,I=I+Math.imul(re,tt)|0,E=E+Math.imul(re,qt)|0,E=E+Math.imul(H,tt)|0,M=M+Math.imul(H,qt)|0,I=I+Math.imul(Z,rt)|0,E=E+Math.imul(Z,Vt)|0,E=E+Math.imul(K,rt)|0,M=M+Math.imul(K,Vt)|0,I=I+Math.imul(B,at)|0,E=E+Math.imul(B,Ft)|0,E=E+Math.imul(ae,at)|0,M=M+Math.imul(ae,Ft)|0;var Wn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,I=Math.imul(Be,ue),E=Math.imul(Be,we),E=E+Math.imul(Ke,ue)|0,M=Math.imul(Ke,we),I=I+Math.imul(Le,Te)|0,E=E+Math.imul(Le,lt)|0,E=E+Math.imul(Ge,Te)|0,M=M+Math.imul(Ge,lt)|0,I=I+Math.imul(Ne,We)|0,E=E+Math.imul(Ne,At)|0,E=E+Math.imul(Je,We)|0,M=M+Math.imul(Je,At)|0,I=I+Math.imul(je,dt)|0,E=E+Math.imul(je,Lt)|0,E=E+Math.imul(Re,dt)|0,M=M+Math.imul(Re,Lt)|0,I=I+Math.imul(Ee,st)|0,E=E+Math.imul(Ee,Ut)|0,E=E+Math.imul(Me,st)|0,M=M+Math.imul(Me,Ut)|0,I=I+Math.imul(q,tt)|0,E=E+Math.imul(q,qt)|0,E=E+Math.imul(fe,tt)|0,M=M+Math.imul(fe,qt)|0,I=I+Math.imul(re,rt)|0,E=E+Math.imul(re,Vt)|0,E=E+Math.imul(H,rt)|0,M=M+Math.imul(H,Vt)|0,I=I+Math.imul(Z,at)|0,E=E+Math.imul(Z,Ft)|0,E=E+Math.imul(K,at)|0,M=M+Math.imul(K,Ft)|0,I=I+Math.imul(B,ot)|0,E=E+Math.imul(B,Gt)|0,E=E+Math.imul(ae,ot)|0,M=M+Math.imul(ae,Gt)|0;var ji=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ji>>>26)|0,ji&=67108863,I=Math.imul(ne,ue),E=Math.imul(ne,we),E=E+Math.imul(Y,ue)|0,M=Math.imul(Y,we),I=I+Math.imul(Be,Te)|0,E=E+Math.imul(Be,lt)|0,E=E+Math.imul(Ke,Te)|0,M=M+Math.imul(Ke,lt)|0,I=I+Math.imul(Le,We)|0,E=E+Math.imul(Le,At)|0,E=E+Math.imul(Ge,We)|0,M=M+Math.imul(Ge,At)|0,I=I+Math.imul(Ne,dt)|0,E=E+Math.imul(Ne,Lt)|0,E=E+Math.imul(Je,dt)|0,M=M+Math.imul(Je,Lt)|0,I=I+Math.imul(je,st)|0,E=E+Math.imul(je,Ut)|0,E=E+Math.imul(Re,st)|0,M=M+Math.imul(Re,Ut)|0,I=I+Math.imul(Ee,tt)|0,E=E+Math.imul(Ee,qt)|0,E=E+Math.imul(Me,tt)|0,M=M+Math.imul(Me,qt)|0,I=I+Math.imul(q,rt)|0,E=E+Math.imul(q,Vt)|0,E=E+Math.imul(fe,rt)|0,M=M+Math.imul(fe,Vt)|0,I=I+Math.imul(re,at)|0,E=E+Math.imul(re,Ft)|0,E=E+Math.imul(H,at)|0,M=M+Math.imul(H,Ft)|0,I=I+Math.imul(Z,ot)|0,E=E+Math.imul(Z,Gt)|0,E=E+Math.imul(K,ot)|0,M=M+Math.imul(K,Gt)|0,I=I+Math.imul(B,wt)|0,E=E+Math.imul(B,yr)|0,E=E+Math.imul(ae,wt)|0,M=M+Math.imul(ae,yr)|0;var Vn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,I=Math.imul(ne,Te),E=Math.imul(ne,lt),E=E+Math.imul(Y,Te)|0,M=Math.imul(Y,lt),I=I+Math.imul(Be,We)|0,E=E+Math.imul(Be,At)|0,E=E+Math.imul(Ke,We)|0,M=M+Math.imul(Ke,At)|0,I=I+Math.imul(Le,dt)|0,E=E+Math.imul(Le,Lt)|0,E=E+Math.imul(Ge,dt)|0,M=M+Math.imul(Ge,Lt)|0,I=I+Math.imul(Ne,st)|0,E=E+Math.imul(Ne,Ut)|0,E=E+Math.imul(Je,st)|0,M=M+Math.imul(Je,Ut)|0,I=I+Math.imul(je,tt)|0,E=E+Math.imul(je,qt)|0,E=E+Math.imul(Re,tt)|0,M=M+Math.imul(Re,qt)|0,I=I+Math.imul(Ee,rt)|0,E=E+Math.imul(Ee,Vt)|0,E=E+Math.imul(Me,rt)|0,M=M+Math.imul(Me,Vt)|0,I=I+Math.imul(q,at)|0,E=E+Math.imul(q,Ft)|0,E=E+Math.imul(fe,at)|0,M=M+Math.imul(fe,Ft)|0,I=I+Math.imul(re,ot)|0,E=E+Math.imul(re,Gt)|0,E=E+Math.imul(H,ot)|0,M=M+Math.imul(H,Gt)|0,I=I+Math.imul(Z,wt)|0,E=E+Math.imul(Z,yr)|0,E=E+Math.imul(K,wt)|0,M=M+Math.imul(K,yr)|0;var zi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(zi>>>26)|0,zi&=67108863,I=Math.imul(ne,We),E=Math.imul(ne,At),E=E+Math.imul(Y,We)|0,M=Math.imul(Y,At),I=I+Math.imul(Be,dt)|0,E=E+Math.imul(Be,Lt)|0,E=E+Math.imul(Ke,dt)|0,M=M+Math.imul(Ke,Lt)|0,I=I+Math.imul(Le,st)|0,E=E+Math.imul(Le,Ut)|0,E=E+Math.imul(Ge,st)|0,M=M+Math.imul(Ge,Ut)|0,I=I+Math.imul(Ne,tt)|0,E=E+Math.imul(Ne,qt)|0,E=E+Math.imul(Je,tt)|0,M=M+Math.imul(Je,qt)|0,I=I+Math.imul(je,rt)|0,E=E+Math.imul(je,Vt)|0,E=E+Math.imul(Re,rt)|0,M=M+Math.imul(Re,Vt)|0,I=I+Math.imul(Ee,at)|0,E=E+Math.imul(Ee,Ft)|0,E=E+Math.imul(Me,at)|0,M=M+Math.imul(Me,Ft)|0,I=I+Math.imul(q,ot)|0,E=E+Math.imul(q,Gt)|0,E=E+Math.imul(fe,ot)|0,M=M+Math.imul(fe,Gt)|0,I=I+Math.imul(re,wt)|0,E=E+Math.imul(re,yr)|0,E=E+Math.imul(H,wt)|0,M=M+Math.imul(H,yr)|0;var Hi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,I=Math.imul(ne,dt),E=Math.imul(ne,Lt),E=E+Math.imul(Y,dt)|0,M=Math.imul(Y,Lt),I=I+Math.imul(Be,st)|0,E=E+Math.imul(Be,Ut)|0,E=E+Math.imul(Ke,st)|0,M=M+Math.imul(Ke,Ut)|0,I=I+Math.imul(Le,tt)|0,E=E+Math.imul(Le,qt)|0,E=E+Math.imul(Ge,tt)|0,M=M+Math.imul(Ge,qt)|0,I=I+Math.imul(Ne,rt)|0,E=E+Math.imul(Ne,Vt)|0,E=E+Math.imul(Je,rt)|0,M=M+Math.imul(Je,Vt)|0,I=I+Math.imul(je,at)|0,E=E+Math.imul(je,Ft)|0,E=E+Math.imul(Re,at)|0,M=M+Math.imul(Re,Ft)|0,I=I+Math.imul(Ee,ot)|0,E=E+Math.imul(Ee,Gt)|0,E=E+Math.imul(Me,ot)|0,M=M+Math.imul(Me,Gt)|0,I=I+Math.imul(q,wt)|0,E=E+Math.imul(q,yr)|0,E=E+Math.imul(fe,wt)|0,M=M+Math.imul(fe,yr)|0;var xi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(xi>>>26)|0,xi&=67108863,I=Math.imul(ne,st),E=Math.imul(ne,Ut),E=E+Math.imul(Y,st)|0,M=Math.imul(Y,Ut),I=I+Math.imul(Be,tt)|0,E=E+Math.imul(Be,qt)|0,E=E+Math.imul(Ke,tt)|0,M=M+Math.imul(Ke,qt)|0,I=I+Math.imul(Le,rt)|0,E=E+Math.imul(Le,Vt)|0,E=E+Math.imul(Ge,rt)|0,M=M+Math.imul(Ge,Vt)|0,I=I+Math.imul(Ne,at)|0,E=E+Math.imul(Ne,Ft)|0,E=E+Math.imul(Je,at)|0,M=M+Math.imul(Je,Ft)|0,I=I+Math.imul(je,ot)|0,E=E+Math.imul(je,Gt)|0,E=E+Math.imul(Re,ot)|0,M=M+Math.imul(Re,Gt)|0,I=I+Math.imul(Ee,wt)|0,E=E+Math.imul(Ee,yr)|0,E=E+Math.imul(Me,wt)|0,M=M+Math.imul(Me,yr)|0;var Si=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Si>>>26)|0,Si&=67108863,I=Math.imul(ne,tt),E=Math.imul(ne,qt),E=E+Math.imul(Y,tt)|0,M=Math.imul(Y,qt),I=I+Math.imul(Be,rt)|0,E=E+Math.imul(Be,Vt)|0,E=E+Math.imul(Ke,rt)|0,M=M+Math.imul(Ke,Vt)|0,I=I+Math.imul(Le,at)|0,E=E+Math.imul(Le,Ft)|0,E=E+Math.imul(Ge,at)|0,M=M+Math.imul(Ge,Ft)|0,I=I+Math.imul(Ne,ot)|0,E=E+Math.imul(Ne,Gt)|0,E=E+Math.imul(Je,ot)|0,M=M+Math.imul(Je,Gt)|0,I=I+Math.imul(je,wt)|0,E=E+Math.imul(je,yr)|0,E=E+Math.imul(Re,wt)|0,M=M+Math.imul(Re,yr)|0;var Ii=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,I=Math.imul(ne,rt),E=Math.imul(ne,Vt),E=E+Math.imul(Y,rt)|0,M=Math.imul(Y,Vt),I=I+Math.imul(Be,at)|0,E=E+Math.imul(Be,Ft)|0,E=E+Math.imul(Ke,at)|0,M=M+Math.imul(Ke,Ft)|0,I=I+Math.imul(Le,ot)|0,E=E+Math.imul(Le,Gt)|0,E=E+Math.imul(Ge,ot)|0,M=M+Math.imul(Ge,Gt)|0,I=I+Math.imul(Ne,wt)|0,E=E+Math.imul(Ne,yr)|0,E=E+Math.imul(Je,wt)|0,M=M+Math.imul(Je,yr)|0;var kn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(kn>>>26)|0,kn&=67108863,I=Math.imul(ne,at),E=Math.imul(ne,Ft),E=E+Math.imul(Y,at)|0,M=Math.imul(Y,Ft),I=I+Math.imul(Be,ot)|0,E=E+Math.imul(Be,Gt)|0,E=E+Math.imul(Ke,ot)|0,M=M+Math.imul(Ke,Gt)|0,I=I+Math.imul(Le,wt)|0,E=E+Math.imul(Le,yr)|0,E=E+Math.imul(Ge,wt)|0,M=M+Math.imul(Ge,yr)|0;var Ds=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,I=Math.imul(ne,ot),E=Math.imul(ne,Gt),E=E+Math.imul(Y,ot)|0,M=Math.imul(Y,Gt),I=I+Math.imul(Be,wt)|0,E=E+Math.imul(Be,yr)|0,E=E+Math.imul(Ke,wt)|0,M=M+Math.imul(Ke,yr)|0;var $s=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+($s>>>26)|0,$s&=67108863,I=Math.imul(ne,wt),E=Math.imul(ne,yr),E=E+Math.imul(Y,wt)|0,M=Math.imul(Y,yr);var Bs=(T+I|0)+((E&8191)<<13)|0;return T=(M+(E>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,S[0]=Xt,S[1]=hr,S[2]=ri,S[3]=ni,S[4]=ii,S[5]=si,S[6]=wn,S[7]=Wn,S[8]=ji,S[9]=Vn,S[10]=zi,S[11]=Hi,S[12]=xi,S[13]=Si,S[14]=Ii,S[15]=kn,S[16]=Ds,S[17]=$s,S[18]=Bs,T!==0&&(S[19]=T,p.length++),p};Math.imul||(C=v);function R(D,x,y){y.negative=x.negative^D.negative,y.length=D.length+x.length;for(var p=0,g=0,_=0;_>>26)|0,g+=S>>>26,S&=67108863}y.words[_]=T,p=S,S=g}return p!==0?y.words[_]=p:y.length--,y.strip()}function k(D,x,y){var p=new P;return p.mulp(D,x,y)}s.prototype.mulTo=function(x,y){var p,g=this.length+x.length;return this.length===10&&x.length===10?p=C(this,x,y):g<63?p=v(this,x,y):g<1024?p=R(this,x,y):p=k(this,x,y),p};function P(D,x){this.x=D,this.y=x}P.prototype.makeRBT=function(x){for(var y=new Array(x),p=s.prototype._countBits(x)-1,g=0;g>=1;return g},P.prototype.permute=function(x,y,p,g,_,S){for(var T=0;T>>1)_++;return 1<<_+1+g},P.prototype.conjugate=function(x,y,p){if(!(p<=1))for(var g=0;g

      >>13,p[2*S+1]=_&8191,_=_>>>13;for(S=2*y;S>=26,y+=g/67108864|0,y+=_>>>26,this.words[p]=_&67108863}return y!==0&&(this.words[p]=y,this.length++),this},s.prototype.muln=function(x){return this.clone().imuln(x)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(x){var y=b(x);if(y.length===0)return new s(1);for(var p=this,g=0;g=0);var y=x%26,p=(x-y)/26,g=67108863>>>26-y<<26-y,_;if(y!==0){var S=0;for(_=0;_>>26-y}S&&(this.words[_]=S,this.length++)}if(p!==0){for(_=this.length-1;_>=0;_--)this.words[_+p]=this.words[_];for(_=0;_=0);var g;y?g=(y-y%26)/26:g=0;var _=x%26,S=Math.min((x-_)/26,this.length),T=67108863^67108863>>>_<<_,I=p;if(g-=S,g=Math.max(0,g),I){for(var E=0;ES)for(this.length-=S,E=0;E=0&&(M!==0||E>=g);E--){var A=this.words[E]|0;this.words[E]=M<<26-_|A>>>_,M=A&T}return I&&M!==0&&(I.words[I.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(x,y,p){return n(this.negative===0),this.iushrn(x,y,p)},s.prototype.shln=function(x){return this.clone().ishln(x)},s.prototype.ushln=function(x){return this.clone().iushln(x)},s.prototype.shrn=function(x){return this.clone().ishrn(x)},s.prototype.ushrn=function(x){return this.clone().iushrn(x)},s.prototype.testn=function(x){n(typeof x=="number"&&x>=0);var y=x%26,p=(x-y)/26,g=1<=0);var y=x%26,p=(x-y)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(y!==0&&p++,this.length=Math.min(p,this.length),y!==0){var g=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},s.prototype.isubn=function(x){if(n(typeof x=="number"),n(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(I/67108864|0),this.words[_+p]=S&67108863}for(;_>26,this.words[_+p]=S&67108863;if(T===0)return this.strip();for(n(T===-1),T=0,_=0;_>26,this.words[_]=S&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(x,y){var p=this.length-x.length,g=this.clone(),_=x,S=_.words[_.length-1]|0,T=this._countBits(S);p=26-T,p!==0&&(_=_.ushln(p),g.iushln(p),S=_.words[_.length-1]|0);var I=g.length-_.length,E;if(y!=="mod"){E=new s(null),E.length=I+1,E.words=new Array(E.length);for(var M=0;M=0;B--){var ae=(g.words[_.length+B]|0)*67108864+(g.words[_.length+B-1]|0);for(ae=Math.min(ae/S|0,67108863),g._ishlnsubmul(_,ae,B);g.negative!==0;)ae--,g.negative=0,g._ishlnsubmul(_,1,B),g.isZero()||(g.negative^=1);E&&(E.words[B]=ae)}return E&&E.strip(),g.strip(),y!=="div"&&p!==0&&g.iushrn(p),{div:E||null,mod:g}},s.prototype.divmod=function(x,y,p){if(n(!x.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var g,_,S;return this.negative!==0&&x.negative===0?(S=this.neg().divmod(x,y),y!=="mod"&&(g=S.div.neg()),y!=="div"&&(_=S.mod.neg(),p&&_.negative!==0&&_.iadd(x)),{div:g,mod:_}):this.negative===0&&x.negative!==0?(S=this.divmod(x.neg(),y),y!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&x.negative?(S=this.neg().divmod(x.neg(),y),y!=="div"&&(_=S.mod.neg(),p&&_.negative!==0&&_.isub(x)),{div:S.div,mod:_}):x.length>this.length||this.cmp(x)<0?{div:new s(0),mod:this}:x.length===1?y==="div"?{div:this.divn(x.words[0]),mod:null}:y==="mod"?{div:null,mod:new s(this.modn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new s(this.modn(x.words[0]))}:this._wordDiv(x,y)},s.prototype.div=function(x){return this.divmod(x,"div",!1).div},s.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},s.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},s.prototype.divRound=function(x){var y=this.divmod(x);if(y.mod.isZero())return y.div;var p=y.div.negative!==0?y.mod.isub(x):y.mod,g=x.ushrn(1),_=x.andln(1),S=p.cmp(g);return S<0||_===1&&S===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},s.prototype.modn=function(x){n(x<=67108863);for(var y=(1<<26)%x,p=0,g=this.length-1;g>=0;g--)p=(y*p+(this.words[g]|0))%x;return p},s.prototype.idivn=function(x){n(x<=67108863);for(var y=0,p=this.length-1;p>=0;p--){var g=(this.words[p]|0)+y*67108864;this.words[p]=g/x|0,y=g%x}return this.strip()},s.prototype.divn=function(x){return this.clone().idivn(x)},s.prototype.egcd=function(x){n(x.negative===0),n(!x.isZero());var y=this,p=x.clone();y.negative!==0?y=y.umod(x):y=y.clone();for(var g=new s(1),_=new s(0),S=new s(0),T=new s(1),I=0;y.isEven()&&p.isEven();)y.iushrn(1),p.iushrn(1),++I;for(var E=p.clone(),M=y.clone();!y.isZero();){for(var A=0,B=1;!(y.words[0]&B)&&A<26;++A,B<<=1);if(A>0)for(y.iushrn(A);A-- >0;)(g.isOdd()||_.isOdd())&&(g.iadd(E),_.isub(M)),g.iushrn(1),_.iushrn(1);for(var ae=0,W=1;!(p.words[0]&W)&&ae<26;++ae,W<<=1);if(ae>0)for(p.iushrn(ae);ae-- >0;)(S.isOdd()||T.isOdd())&&(S.iadd(E),T.isub(M)),S.iushrn(1),T.iushrn(1);y.cmp(p)>=0?(y.isub(p),g.isub(S),_.isub(T)):(p.isub(y),S.isub(g),T.isub(_))}return{a:S,b:T,gcd:p.iushln(I)}},s.prototype._invmp=function(x){n(x.negative===0),n(!x.isZero());var y=this,p=x.clone();y.negative!==0?y=y.umod(x):y=y.clone();for(var g=new s(1),_=new s(0),S=p.clone();y.cmpn(1)>0&&p.cmpn(1)>0;){for(var T=0,I=1;!(y.words[0]&I)&&T<26;++T,I<<=1);if(T>0)for(y.iushrn(T);T-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var E=0,M=1;!(p.words[0]&M)&&E<26;++E,M<<=1);if(E>0)for(p.iushrn(E);E-- >0;)_.isOdd()&&_.iadd(S),_.iushrn(1);y.cmp(p)>=0?(y.isub(p),g.isub(_)):(p.isub(y),_.isub(g))}var A;return y.cmpn(1)===0?A=g:A=_,A.cmpn(0)<0&&A.iadd(x),A},s.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var y=this.clone(),p=x.clone();y.negative=0,p.negative=0;for(var g=0;y.isEven()&&p.isEven();g++)y.iushrn(1),p.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;p.isEven();)p.iushrn(1);var _=y.cmp(p);if(_<0){var S=y;y=p,p=S}else if(_===0||p.cmpn(1)===0)break;y.isub(p)}while(!0);return p.iushln(g)},s.prototype.invm=function(x){return this.egcd(x).a.umod(x)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(x){return this.words[0]&x},s.prototype.bincn=function(x){n(typeof x=="number");var y=x%26,p=(x-y)/26,g=1<>>26,T&=67108863,this.words[S]=T}return _!==0&&(this.words[S]=_,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(x){var y=x<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var p;if(this.length>1)p=1;else{y&&(x=-x),n(x<=67108863,"Number is too big");var g=this.words[0]|0;p=g===x?0:gx.length)return 1;if(this.length=0;p--){var g=this.words[p]|0,_=x.words[p]|0;if(g!==_){g<_?y=-1:g>_&&(y=1);break}}return y},s.prototype.gtn=function(x){return this.cmpn(x)===1},s.prototype.gt=function(x){return this.cmp(x)===1},s.prototype.gten=function(x){return this.cmpn(x)>=0},s.prototype.gte=function(x){return this.cmp(x)>=0},s.prototype.ltn=function(x){return this.cmpn(x)===-1},s.prototype.lt=function(x){return this.cmp(x)===-1},s.prototype.lten=function(x){return this.cmpn(x)<=0},s.prototype.lte=function(x){return this.cmp(x)<=0},s.prototype.eqn=function(x){return this.cmpn(x)===0},s.prototype.eq=function(x){return this.cmp(x)===0},s.red=function(x){return new V(x)},s.prototype.toRed=function(x){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(x){return this.red=x,this},s.prototype.forceRed=function(x){return n(!this.red,"Already a number in reduction context"),this._forceRed(x)},s.prototype.redAdd=function(x){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},s.prototype.redIAdd=function(x){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},s.prototype.redSub=function(x){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},s.prototype.redISub=function(x){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},s.prototype.redShl=function(x){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},s.prototype.redMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},s.prototype.redIMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(x){return n(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var N={k256:null,p224:null,p192:null,p25519:null};function $(D,x){this.name=D,this.p=new s(x,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var x=new s(null);return x.words=new Array(Math.ceil(this.n/13)),x},$.prototype.ireduce=function(x){var y=x,p;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),p=y.bitLength();while(p>this.n);var g=p0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(x,y){x.iushrn(this.n,0,y)},$.prototype.imulK=function(x){return x.imul(this.k)};function j(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(j,$),j.prototype.split=function(x,y){for(var p=4194303,g=Math.min(x.length,9),_=0;_>>22,S=T}S>>>=22,x.words[_-10]=S,S===0&&x.length>10?x.length-=10:x.length-=9},j.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var y=0,p=0;p>>=26,x.words[p]=_,y=g}return y!==0&&(x.words[x.length++]=y),x},s._prime=function(x){if(N[x])return N[x];var y;if(x==="k256")y=new j;else if(x==="p224")y=new G;else if(x==="p192")y=new U;else if(x==="p25519")y=new L;else throw new Error("Unknown prime "+x);return N[x]=y,y};function V(D){if(typeof D=="string"){var x=s._prime(D);this.m=x.p,this.prime=x}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}V.prototype._verify1=function(x){n(x.negative===0,"red works only with positives"),n(x.red,"red works only with red numbers")},V.prototype._verify2=function(x,y){n((x.negative|y.negative)===0,"red works only with positives"),n(x.red&&x.red===y.red,"red works only with red numbers")},V.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):x.umod(this.m)._forceRed(this)},V.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},V.prototype.add=function(x,y){this._verify2(x,y);var p=x.add(y);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},V.prototype.iadd=function(x,y){this._verify2(x,y);var p=x.iadd(y);return p.cmp(this.m)>=0&&p.isub(this.m),p},V.prototype.sub=function(x,y){this._verify2(x,y);var p=x.sub(y);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},V.prototype.isub=function(x,y){this._verify2(x,y);var p=x.isub(y);return p.cmpn(0)<0&&p.iadd(this.m),p},V.prototype.shl=function(x,y){return this._verify1(x),this.imod(x.ushln(y))},V.prototype.imul=function(x,y){return this._verify2(x,y),this.imod(x.imul(y))},V.prototype.mul=function(x,y){return this._verify2(x,y),this.imod(x.mul(y))},V.prototype.isqr=function(x){return this.imul(x,x.clone())},V.prototype.sqr=function(x){return this.mul(x,x)},V.prototype.sqrt=function(x){if(x.isZero())return x.clone();var y=this.m.andln(3);if(n(y%2===1),y===3){var p=this.m.add(new s(1)).iushrn(2);return this.pow(x,p)}for(var g=this.m.subn(1),_=0;!g.isZero()&&g.andln(1)===0;)_++,g.iushrn(1);n(!g.isZero());var S=new s(1).toRed(this),T=S.redNeg(),I=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,I).cmp(T)!==0;)E.redIAdd(T);for(var M=this.pow(E,g),A=this.pow(x,g.addn(1).iushrn(1)),B=this.pow(x,g),ae=_;B.cmp(S)!==0;){for(var W=B,Z=0;W.cmp(S)!==0;Z++)W=W.redSqr();n(Z=0;_--){for(var M=y.words[_],A=E-1;A>=0;A--){var B=M>>A&1;if(S!==g[0]&&(S=this.sqr(S)),B===0&&T===0){I=0;continue}T<<=1,T|=B,I++,!(I!==p&&(_!==0||A!==0))&&(S=this.mul(S,g[T]),I=0,T=0)}E=26}return S},V.prototype.convertTo=function(x){var y=x.umod(this.m);return y===x?y.clone():y},V.prototype.convertFrom=function(x){var y=x.clone();return y.red=null,y},s.mont=function(x){return new te(x)};function te(D){V.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(te,V),te.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},te.prototype.convertFrom=function(x){var y=this.imod(x.mul(this.rinv));return y.red=null,y},te.prototype.imul=function(x,y){if(x.isZero()||y.isZero())return x.words[0]=0,x.length=1,x;var p=x.imul(y),g=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=p.isub(g).iushrn(this.shift),S=_;return _.cmp(this.m)>=0?S=_.isub(this.m):_.cmpn(0)<0&&(S=_.iadd(this.m)),S._forceRed(this)},te.prototype.mul=function(x,y){if(x.isZero()||y.isZero())return new s(0)._forceRed(this);var p=x.mul(y),g=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=p.isub(g).iushrn(this.shift),S=_;return _.cmp(this.m)>=0?S=_.isub(this.m):_.cmpn(0)<0&&(S=_.iadd(this.m)),S._forceRed(this)},te.prototype.invm=function(x){var y=this.imod(x._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(r,ut)}(DI)),DI.exports}var $I={exports:{}},dce;function kB(){if(dce)return $I.exports;dce=1;var r;$I.exports=function(i){return r||(r=new e(null)),r.generate(i)};function e(n){this.rand=n}if($I.exports.Rand=e,e.prototype.generate=function(i){return this._rand(i)},e.prototype._rand=function(i){if(this.rand.getBytes)return this.rand.getBytes(i);for(var s=new Uint8Array(i),a=0;a=0);return o},t.prototype._randrange=function(i,s){var a=s.sub(i);return i.add(this._randbelow(a))},t.prototype.test=function(i,s,a){var o=i.bitLength(),l=r.mont(i),u=new r(1).toRed(l);s||(s=Math.max(1,o/48|0));for(var f=i.subn(1),h=0;!f.testn(h);h++);for(var m=i.shrn(h),b=f.toRed(l),v=!0;s>0;s--){var C=this._randrange(new r(2),f);a&&a(C);var R=C.toRed(l).redPow(m);if(!(R.cmp(u)===0||R.cmp(b)===0)){for(var k=1;k0;s--){var b=this._randrange(new r(2),u),v=i.gcd(b);if(v.cmpn(1)!==0)return v;var C=b.toRed(o).redPow(h);if(!(C.cmp(l)===0||C.cmp(m)===0)){for(var R=1;Rk;)N.ishrn(1);if(N.isEven()&&N.iadd(s),N.testn(1)||N.iadd(a),P.cmp(a)){if(!P.cmp(o))for(;N.mod(l).cmp(u);)N.iadd(h)}else for(;N.mod(t).cmp(f);)N.iadd(h);if($=N.shrn(1),v($)&&v(N)&&C($)&&C(N)&&i.test($)&&i.test(N))return N}}return MB}const vFe={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};var PB,bce;function wFe(){if(bce)return PB;bce=1;var r=Aa(),e=pce(),t=new e,n=new r(24),i=new r(11),s=new r(10),a=new r(3),o=new r(7),l=gce(),u=ey();PB=v;function f(R,k){return k=k||"utf8",It.isBuffer(R)||(R=new It(R,k)),this._pub=new r(R),this}function h(R,k){return k=k||"utf8",It.isBuffer(R)||(R=new It(R,k)),this._priv=new r(R),this}var m={};function b(R,k){var P=k.toString("hex"),N=[P,R.toString(16)].join("_");if(N in m)return m[N];var $=0;if(R.isEven()||!l.simpleSieve||!l.fermatTest(R)||!t.test(R))return $+=1,P==="02"||P==="05"?$+=8:$+=4,m[N]=$,$;t.test(R.shrn(1))||($+=2);var j;switch(P){case"02":R.mod(n).cmp(i)&&($+=8);break;case"05":j=R.mod(s),j.cmp(a)&&j.cmp(o)&&($+=8);break;default:$+=4}return m[N]=$,$}function v(R,k,P){this.setGenerator(k),this.__prime=new r(R),this._prime=r.mont(this.__prime),this._primeLen=R.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=f,this.setPrivateKey=h):this._primeCode=8}Object.defineProperty(v.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=b(this.__prime,this.__gen)),this._primeCode}}),v.prototype.generateKeys=function(){return this._priv||(this._priv=new r(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},v.prototype.computeSecret=function(R){R=new r(R),R=R.toRed(this._prime);var k=R.redPow(this._priv).fromRed(),P=new It(k.toArray()),N=this.getPrime();if(P.length0?p:g},s.min=function(p,g){return p.cmp(g)<0?p:g},s.prototype._init=function(p,g,_){if(typeof p=="number")return this._initNumber(p,g,_);if(typeof p=="object")return this._initArray(p,g,_);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),p=p.toString().replace(/\s+/g,"");var S=0;p[0]==="-"&&(S++,this.negative=1),S=0;S-=3)I=p[S]|p[S-1]<<8|p[S-2]<<16,this.words[T]|=I<>>26-E&67108863,E+=24,E>=26&&(E-=26,T++);else if(_==="le")for(S=0,T=0;S>>26-E&67108863,E+=24,E>=26&&(E-=26,T++);return this._strip()};function o(y,p){var g=y.charCodeAt(p);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;n(!1,"Invalid character in "+y)}function l(y,p,g){var _=o(y,g);return g-1>=p&&(_|=o(y,g-1)<<4),_}s.prototype._parseHex=function(p,g,_){this.length=Math.ceil((p.length-g)/6),this.words=new Array(this.length);for(var S=0;S=g;S-=2)E=l(p,g,S)<=18?(T-=18,I+=1,this.words[I]|=E>>>26):T+=8;else{var M=p.length-g;for(S=M%2===0?g+1:g;S=18?(T-=18,I+=1,this.words[I]|=E>>>26):T+=8}this._strip()};function u(y,p,g,_){for(var S=0,T=0,I=Math.min(y.length,g),E=p;E=49?T=M-49+10:M>=17?T=M-17+10:T=M,n(M>=0&&T<_,"Invalid character"),S+=T}return S}s.prototype._parseBase=function(p,g,_){this.words=[0],this.length=1;for(var S=0,T=1;T<=67108863;T*=g)S++;S--,T=T/g|0;for(var I=p.length-_,E=I%S,M=Math.min(I,I-E)+_,A=0,B=_;B1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?""}var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],b=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(p,g){p=p||10,g=g|0||1;var _;if(p===16||p==="hex"){_="";for(var S=0,T=0,I=0;I>>24-S&16777215,S+=2,S>=26&&(S-=26,I--),T!==0||I!==this.length-1?_=m[6-M.length]+M+_:_=M+_}for(T!==0&&(_=T.toString(16)+_);_.length%g!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(p===(p|0)&&p>=2&&p<=36){var A=b[p],B=v[p];_="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var W=ae.modrn(B).toString(p);ae=ae.idivn(B),ae.isZero()?_=W+_:_=m[A-W.length]+W+_}for(this.isZero()&&(_="0"+_);_.length%g!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var p=this.words[0];return this.length===2?p+=this.words[1]*67108864:this.length===3&&this.words[2]===1?p+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-p:p},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(p,g){return this.toArrayLike(a,p,g)}),s.prototype.toArray=function(p,g){return this.toArrayLike(Array,p,g)};var C=function(p,g){return p.allocUnsafe?p.allocUnsafe(g):new p(g)};s.prototype.toArrayLike=function(p,g,_){this._strip();var S=this.byteLength(),T=_||Math.max(1,S);n(S<=T,"byte array longer than desired length"),n(T>0,"Requested array length <= 0");var I=C(p,T),E=g==="le"?"LE":"BE";return this["_toArrayLike"+E](I,S),I},s.prototype._toArrayLikeLE=function(p,g){for(var _=0,S=0,T=0,I=0;T>8&255),_>16&255),I===6?(_>24&255),S=0,I=0):(S=E>>>24,I+=2)}if(_=0&&(p[_--]=E>>8&255),_>=0&&(p[_--]=E>>16&255),I===6?(_>=0&&(p[_--]=E>>24&255),S=0,I=0):(S=E>>>24,I+=2)}if(_>=0)for(p[_--]=S;_>=0;)p[_--]=0},Math.clz32?s.prototype._countBits=function(p){return 32-Math.clz32(p)}:s.prototype._countBits=function(p){var g=p,_=0;return g>=4096&&(_+=13,g>>>=13),g>=64&&(_+=7,g>>>=7),g>=8&&(_+=4,g>>>=4),g>=2&&(_+=2,g>>>=2),_+g},s.prototype._zeroBits=function(p){if(p===0)return 26;var g=p,_=0;return g&8191||(_+=13,g>>>=13),g&127||(_+=7,g>>>=7),g&15||(_+=4,g>>>=4),g&3||(_+=2,g>>>=2),g&1||_++,_},s.prototype.bitLength=function(){var p=this.words[this.length-1],g=this._countBits(p);return(this.length-1)*26+g};function R(y){for(var p=new Array(y.bitLength()),g=0;g>>S&1}return p}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var p=0,g=0;gp.length?this.clone().ior(p):p.clone().ior(this)},s.prototype.uor=function(p){return this.length>p.length?this.clone().iuor(p):p.clone().iuor(this)},s.prototype.iuand=function(p){var g;this.length>p.length?g=p:g=this;for(var _=0;_p.length?this.clone().iand(p):p.clone().iand(this)},s.prototype.uand=function(p){return this.length>p.length?this.clone().iuand(p):p.clone().iuand(this)},s.prototype.iuxor=function(p){var g,_;this.length>p.length?(g=this,_=p):(g=p,_=this);for(var S=0;S<_.length;S++)this.words[S]=g.words[S]^_.words[S];if(this!==g)for(;Sp.length?this.clone().ixor(p):p.clone().ixor(this)},s.prototype.uxor=function(p){return this.length>p.length?this.clone().iuxor(p):p.clone().iuxor(this)},s.prototype.inotn=function(p){n(typeof p=="number"&&p>=0);var g=Math.ceil(p/26)|0,_=p%26;this._expand(g),_>0&&g--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-_),this._strip()},s.prototype.notn=function(p){return this.clone().inotn(p)},s.prototype.setn=function(p,g){n(typeof p=="number"&&p>=0);var _=p/26|0,S=p%26;return this._expand(_+1),g?this.words[_]=this.words[_]|1<p.length?(_=this,S=p):(_=p,S=this);for(var T=0,I=0;I>>26;for(;T!==0&&I<_.length;I++)g=(_.words[I]|0)+T,this.words[I]=g&67108863,T=g>>>26;if(this.length=_.length,T!==0)this.words[this.length]=T,this.length++;else if(_!==this)for(;I<_.length;I++)this.words[I]=_.words[I];return this},s.prototype.add=function(p){var g;return p.negative!==0&&this.negative===0?(p.negative=0,g=this.sub(p),p.negative^=1,g):p.negative===0&&this.negative!==0?(this.negative=0,g=p.sub(this),this.negative=1,g):this.length>p.length?this.clone().iadd(p):p.clone().iadd(this)},s.prototype.isub=function(p){if(p.negative!==0){p.negative=0;var g=this.iadd(p);return p.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(p),this.negative=1,this._normSign();var _=this.cmp(p);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,T;_>0?(S=this,T=p):(S=p,T=this);for(var I=0,E=0;E>26,this.words[E]=g&67108863;for(;I!==0&&E>26,this.words[E]=g&67108863;if(I===0&&E>>26,ae=M&67108863,W=Math.min(A,p.length-1),Z=Math.max(0,A-y.length+1);Z<=W;Z++){var K=A-Z|0;S=y.words[K]|0,T=p.words[Z]|0,I=S*T+ae,B+=I/67108864|0,ae=I&67108863}g.words[A]=ae|0,M=B|0}return M!==0?g.words[A]=M|0:g.length--,g._strip()}var P=function(p,g,_){var S=p.words,T=g.words,I=_.words,E=0,M,A,B,ae=S[0]|0,W=ae&8191,Z=ae>>>13,K=S[1]|0,ee=K&8191,re=K>>>13,H=S[2]|0,F=H&8191,q=H>>>13,fe=S[3]|0,pe=fe&8191,Ee=fe>>>13,Me=S[4]|0,Oe=Me&8191,je=Me>>>13,Re=S[5]|0,Qe=Re&8191,Ne=Re>>>13,Je=S[6]|0,Xe=Je&8191,Le=Je>>>13,Ge=S[7]|0,et=Ge&8191,Be=Ge>>>13,Ke=S[8]|0,pt=Ke&8191,ne=Ke>>>13,Y=S[9]|0,X=Y&8191,ue=Y>>>13,we=T[0]|0,Ce=we&8191,Te=we>>>13,lt=T[1]|0,Ct=lt&8191,We=lt>>>13,At=T[2]|0,xt=At&8191,dt=At>>>13,Lt=T[3]|0,Ot=Lt&8191,st=Lt>>>13,Ut=T[4]|0,Nt=Ut&8191,tt=Ut>>>13,qt=T[5]|0,Wt=qt&8191,rt=qt>>>13,Vt=T[6]|0,Dt=Vt&8191,at=Vt>>>13,Ft=T[7]|0,Rt=Ft&8191,ot=Ft>>>13,Gt=T[8]|0,wr=Gt&8191,wt=Gt>>>13,yr=T[9]|0,Xt=yr&8191,hr=yr>>>13;_.negative=p.negative^g.negative,_.length=19,M=Math.imul(W,Ce),A=Math.imul(W,Te),A=A+Math.imul(Z,Ce)|0,B=Math.imul(Z,Te);var ri=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ri>>>26)|0,ri&=67108863,M=Math.imul(ee,Ce),A=Math.imul(ee,Te),A=A+Math.imul(re,Ce)|0,B=Math.imul(re,Te),M=M+Math.imul(W,Ct)|0,A=A+Math.imul(W,We)|0,A=A+Math.imul(Z,Ct)|0,B=B+Math.imul(Z,We)|0;var ni=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ni>>>26)|0,ni&=67108863,M=Math.imul(F,Ce),A=Math.imul(F,Te),A=A+Math.imul(q,Ce)|0,B=Math.imul(q,Te),M=M+Math.imul(ee,Ct)|0,A=A+Math.imul(ee,We)|0,A=A+Math.imul(re,Ct)|0,B=B+Math.imul(re,We)|0,M=M+Math.imul(W,xt)|0,A=A+Math.imul(W,dt)|0,A=A+Math.imul(Z,xt)|0,B=B+Math.imul(Z,dt)|0;var ii=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ii>>>26)|0,ii&=67108863,M=Math.imul(pe,Ce),A=Math.imul(pe,Te),A=A+Math.imul(Ee,Ce)|0,B=Math.imul(Ee,Te),M=M+Math.imul(F,Ct)|0,A=A+Math.imul(F,We)|0,A=A+Math.imul(q,Ct)|0,B=B+Math.imul(q,We)|0,M=M+Math.imul(ee,xt)|0,A=A+Math.imul(ee,dt)|0,A=A+Math.imul(re,xt)|0,B=B+Math.imul(re,dt)|0,M=M+Math.imul(W,Ot)|0,A=A+Math.imul(W,st)|0,A=A+Math.imul(Z,Ot)|0,B=B+Math.imul(Z,st)|0;var si=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(si>>>26)|0,si&=67108863,M=Math.imul(Oe,Ce),A=Math.imul(Oe,Te),A=A+Math.imul(je,Ce)|0,B=Math.imul(je,Te),M=M+Math.imul(pe,Ct)|0,A=A+Math.imul(pe,We)|0,A=A+Math.imul(Ee,Ct)|0,B=B+Math.imul(Ee,We)|0,M=M+Math.imul(F,xt)|0,A=A+Math.imul(F,dt)|0,A=A+Math.imul(q,xt)|0,B=B+Math.imul(q,dt)|0,M=M+Math.imul(ee,Ot)|0,A=A+Math.imul(ee,st)|0,A=A+Math.imul(re,Ot)|0,B=B+Math.imul(re,st)|0,M=M+Math.imul(W,Nt)|0,A=A+Math.imul(W,tt)|0,A=A+Math.imul(Z,Nt)|0,B=B+Math.imul(Z,tt)|0;var wn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(wn>>>26)|0,wn&=67108863,M=Math.imul(Qe,Ce),A=Math.imul(Qe,Te),A=A+Math.imul(Ne,Ce)|0,B=Math.imul(Ne,Te),M=M+Math.imul(Oe,Ct)|0,A=A+Math.imul(Oe,We)|0,A=A+Math.imul(je,Ct)|0,B=B+Math.imul(je,We)|0,M=M+Math.imul(pe,xt)|0,A=A+Math.imul(pe,dt)|0,A=A+Math.imul(Ee,xt)|0,B=B+Math.imul(Ee,dt)|0,M=M+Math.imul(F,Ot)|0,A=A+Math.imul(F,st)|0,A=A+Math.imul(q,Ot)|0,B=B+Math.imul(q,st)|0,M=M+Math.imul(ee,Nt)|0,A=A+Math.imul(ee,tt)|0,A=A+Math.imul(re,Nt)|0,B=B+Math.imul(re,tt)|0,M=M+Math.imul(W,Wt)|0,A=A+Math.imul(W,rt)|0,A=A+Math.imul(Z,Wt)|0,B=B+Math.imul(Z,rt)|0;var Wn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,M=Math.imul(Xe,Ce),A=Math.imul(Xe,Te),A=A+Math.imul(Le,Ce)|0,B=Math.imul(Le,Te),M=M+Math.imul(Qe,Ct)|0,A=A+Math.imul(Qe,We)|0,A=A+Math.imul(Ne,Ct)|0,B=B+Math.imul(Ne,We)|0,M=M+Math.imul(Oe,xt)|0,A=A+Math.imul(Oe,dt)|0,A=A+Math.imul(je,xt)|0,B=B+Math.imul(je,dt)|0,M=M+Math.imul(pe,Ot)|0,A=A+Math.imul(pe,st)|0,A=A+Math.imul(Ee,Ot)|0,B=B+Math.imul(Ee,st)|0,M=M+Math.imul(F,Nt)|0,A=A+Math.imul(F,tt)|0,A=A+Math.imul(q,Nt)|0,B=B+Math.imul(q,tt)|0,M=M+Math.imul(ee,Wt)|0,A=A+Math.imul(ee,rt)|0,A=A+Math.imul(re,Wt)|0,B=B+Math.imul(re,rt)|0,M=M+Math.imul(W,Dt)|0,A=A+Math.imul(W,at)|0,A=A+Math.imul(Z,Dt)|0,B=B+Math.imul(Z,at)|0;var ji=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ji>>>26)|0,ji&=67108863,M=Math.imul(et,Ce),A=Math.imul(et,Te),A=A+Math.imul(Be,Ce)|0,B=Math.imul(Be,Te),M=M+Math.imul(Xe,Ct)|0,A=A+Math.imul(Xe,We)|0,A=A+Math.imul(Le,Ct)|0,B=B+Math.imul(Le,We)|0,M=M+Math.imul(Qe,xt)|0,A=A+Math.imul(Qe,dt)|0,A=A+Math.imul(Ne,xt)|0,B=B+Math.imul(Ne,dt)|0,M=M+Math.imul(Oe,Ot)|0,A=A+Math.imul(Oe,st)|0,A=A+Math.imul(je,Ot)|0,B=B+Math.imul(je,st)|0,M=M+Math.imul(pe,Nt)|0,A=A+Math.imul(pe,tt)|0,A=A+Math.imul(Ee,Nt)|0,B=B+Math.imul(Ee,tt)|0,M=M+Math.imul(F,Wt)|0,A=A+Math.imul(F,rt)|0,A=A+Math.imul(q,Wt)|0,B=B+Math.imul(q,rt)|0,M=M+Math.imul(ee,Dt)|0,A=A+Math.imul(ee,at)|0,A=A+Math.imul(re,Dt)|0,B=B+Math.imul(re,at)|0,M=M+Math.imul(W,Rt)|0,A=A+Math.imul(W,ot)|0,A=A+Math.imul(Z,Rt)|0,B=B+Math.imul(Z,ot)|0;var Vn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,M=Math.imul(pt,Ce),A=Math.imul(pt,Te),A=A+Math.imul(ne,Ce)|0,B=Math.imul(ne,Te),M=M+Math.imul(et,Ct)|0,A=A+Math.imul(et,We)|0,A=A+Math.imul(Be,Ct)|0,B=B+Math.imul(Be,We)|0,M=M+Math.imul(Xe,xt)|0,A=A+Math.imul(Xe,dt)|0,A=A+Math.imul(Le,xt)|0,B=B+Math.imul(Le,dt)|0,M=M+Math.imul(Qe,Ot)|0,A=A+Math.imul(Qe,st)|0,A=A+Math.imul(Ne,Ot)|0,B=B+Math.imul(Ne,st)|0,M=M+Math.imul(Oe,Nt)|0,A=A+Math.imul(Oe,tt)|0,A=A+Math.imul(je,Nt)|0,B=B+Math.imul(je,tt)|0,M=M+Math.imul(pe,Wt)|0,A=A+Math.imul(pe,rt)|0,A=A+Math.imul(Ee,Wt)|0,B=B+Math.imul(Ee,rt)|0,M=M+Math.imul(F,Dt)|0,A=A+Math.imul(F,at)|0,A=A+Math.imul(q,Dt)|0,B=B+Math.imul(q,at)|0,M=M+Math.imul(ee,Rt)|0,A=A+Math.imul(ee,ot)|0,A=A+Math.imul(re,Rt)|0,B=B+Math.imul(re,ot)|0,M=M+Math.imul(W,wr)|0,A=A+Math.imul(W,wt)|0,A=A+Math.imul(Z,wr)|0,B=B+Math.imul(Z,wt)|0;var zi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(zi>>>26)|0,zi&=67108863,M=Math.imul(X,Ce),A=Math.imul(X,Te),A=A+Math.imul(ue,Ce)|0,B=Math.imul(ue,Te),M=M+Math.imul(pt,Ct)|0,A=A+Math.imul(pt,We)|0,A=A+Math.imul(ne,Ct)|0,B=B+Math.imul(ne,We)|0,M=M+Math.imul(et,xt)|0,A=A+Math.imul(et,dt)|0,A=A+Math.imul(Be,xt)|0,B=B+Math.imul(Be,dt)|0,M=M+Math.imul(Xe,Ot)|0,A=A+Math.imul(Xe,st)|0,A=A+Math.imul(Le,Ot)|0,B=B+Math.imul(Le,st)|0,M=M+Math.imul(Qe,Nt)|0,A=A+Math.imul(Qe,tt)|0,A=A+Math.imul(Ne,Nt)|0,B=B+Math.imul(Ne,tt)|0,M=M+Math.imul(Oe,Wt)|0,A=A+Math.imul(Oe,rt)|0,A=A+Math.imul(je,Wt)|0,B=B+Math.imul(je,rt)|0,M=M+Math.imul(pe,Dt)|0,A=A+Math.imul(pe,at)|0,A=A+Math.imul(Ee,Dt)|0,B=B+Math.imul(Ee,at)|0,M=M+Math.imul(F,Rt)|0,A=A+Math.imul(F,ot)|0,A=A+Math.imul(q,Rt)|0,B=B+Math.imul(q,ot)|0,M=M+Math.imul(ee,wr)|0,A=A+Math.imul(ee,wt)|0,A=A+Math.imul(re,wr)|0,B=B+Math.imul(re,wt)|0,M=M+Math.imul(W,Xt)|0,A=A+Math.imul(W,hr)|0,A=A+Math.imul(Z,Xt)|0,B=B+Math.imul(Z,hr)|0;var Hi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,M=Math.imul(X,Ct),A=Math.imul(X,We),A=A+Math.imul(ue,Ct)|0,B=Math.imul(ue,We),M=M+Math.imul(pt,xt)|0,A=A+Math.imul(pt,dt)|0,A=A+Math.imul(ne,xt)|0,B=B+Math.imul(ne,dt)|0,M=M+Math.imul(et,Ot)|0,A=A+Math.imul(et,st)|0,A=A+Math.imul(Be,Ot)|0,B=B+Math.imul(Be,st)|0,M=M+Math.imul(Xe,Nt)|0,A=A+Math.imul(Xe,tt)|0,A=A+Math.imul(Le,Nt)|0,B=B+Math.imul(Le,tt)|0,M=M+Math.imul(Qe,Wt)|0,A=A+Math.imul(Qe,rt)|0,A=A+Math.imul(Ne,Wt)|0,B=B+Math.imul(Ne,rt)|0,M=M+Math.imul(Oe,Dt)|0,A=A+Math.imul(Oe,at)|0,A=A+Math.imul(je,Dt)|0,B=B+Math.imul(je,at)|0,M=M+Math.imul(pe,Rt)|0,A=A+Math.imul(pe,ot)|0,A=A+Math.imul(Ee,Rt)|0,B=B+Math.imul(Ee,ot)|0,M=M+Math.imul(F,wr)|0,A=A+Math.imul(F,wt)|0,A=A+Math.imul(q,wr)|0,B=B+Math.imul(q,wt)|0,M=M+Math.imul(ee,Xt)|0,A=A+Math.imul(ee,hr)|0,A=A+Math.imul(re,Xt)|0,B=B+Math.imul(re,hr)|0;var xi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(xi>>>26)|0,xi&=67108863,M=Math.imul(X,xt),A=Math.imul(X,dt),A=A+Math.imul(ue,xt)|0,B=Math.imul(ue,dt),M=M+Math.imul(pt,Ot)|0,A=A+Math.imul(pt,st)|0,A=A+Math.imul(ne,Ot)|0,B=B+Math.imul(ne,st)|0,M=M+Math.imul(et,Nt)|0,A=A+Math.imul(et,tt)|0,A=A+Math.imul(Be,Nt)|0,B=B+Math.imul(Be,tt)|0,M=M+Math.imul(Xe,Wt)|0,A=A+Math.imul(Xe,rt)|0,A=A+Math.imul(Le,Wt)|0,B=B+Math.imul(Le,rt)|0,M=M+Math.imul(Qe,Dt)|0,A=A+Math.imul(Qe,at)|0,A=A+Math.imul(Ne,Dt)|0,B=B+Math.imul(Ne,at)|0,M=M+Math.imul(Oe,Rt)|0,A=A+Math.imul(Oe,ot)|0,A=A+Math.imul(je,Rt)|0,B=B+Math.imul(je,ot)|0,M=M+Math.imul(pe,wr)|0,A=A+Math.imul(pe,wt)|0,A=A+Math.imul(Ee,wr)|0,B=B+Math.imul(Ee,wt)|0,M=M+Math.imul(F,Xt)|0,A=A+Math.imul(F,hr)|0,A=A+Math.imul(q,Xt)|0,B=B+Math.imul(q,hr)|0;var Si=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Si>>>26)|0,Si&=67108863,M=Math.imul(X,Ot),A=Math.imul(X,st),A=A+Math.imul(ue,Ot)|0,B=Math.imul(ue,st),M=M+Math.imul(pt,Nt)|0,A=A+Math.imul(pt,tt)|0,A=A+Math.imul(ne,Nt)|0,B=B+Math.imul(ne,tt)|0,M=M+Math.imul(et,Wt)|0,A=A+Math.imul(et,rt)|0,A=A+Math.imul(Be,Wt)|0,B=B+Math.imul(Be,rt)|0,M=M+Math.imul(Xe,Dt)|0,A=A+Math.imul(Xe,at)|0,A=A+Math.imul(Le,Dt)|0,B=B+Math.imul(Le,at)|0,M=M+Math.imul(Qe,Rt)|0,A=A+Math.imul(Qe,ot)|0,A=A+Math.imul(Ne,Rt)|0,B=B+Math.imul(Ne,ot)|0,M=M+Math.imul(Oe,wr)|0,A=A+Math.imul(Oe,wt)|0,A=A+Math.imul(je,wr)|0,B=B+Math.imul(je,wt)|0,M=M+Math.imul(pe,Xt)|0,A=A+Math.imul(pe,hr)|0,A=A+Math.imul(Ee,Xt)|0,B=B+Math.imul(Ee,hr)|0;var Ii=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,M=Math.imul(X,Nt),A=Math.imul(X,tt),A=A+Math.imul(ue,Nt)|0,B=Math.imul(ue,tt),M=M+Math.imul(pt,Wt)|0,A=A+Math.imul(pt,rt)|0,A=A+Math.imul(ne,Wt)|0,B=B+Math.imul(ne,rt)|0,M=M+Math.imul(et,Dt)|0,A=A+Math.imul(et,at)|0,A=A+Math.imul(Be,Dt)|0,B=B+Math.imul(Be,at)|0,M=M+Math.imul(Xe,Rt)|0,A=A+Math.imul(Xe,ot)|0,A=A+Math.imul(Le,Rt)|0,B=B+Math.imul(Le,ot)|0,M=M+Math.imul(Qe,wr)|0,A=A+Math.imul(Qe,wt)|0,A=A+Math.imul(Ne,wr)|0,B=B+Math.imul(Ne,wt)|0,M=M+Math.imul(Oe,Xt)|0,A=A+Math.imul(Oe,hr)|0,A=A+Math.imul(je,Xt)|0,B=B+Math.imul(je,hr)|0;var kn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(kn>>>26)|0,kn&=67108863,M=Math.imul(X,Wt),A=Math.imul(X,rt),A=A+Math.imul(ue,Wt)|0,B=Math.imul(ue,rt),M=M+Math.imul(pt,Dt)|0,A=A+Math.imul(pt,at)|0,A=A+Math.imul(ne,Dt)|0,B=B+Math.imul(ne,at)|0,M=M+Math.imul(et,Rt)|0,A=A+Math.imul(et,ot)|0,A=A+Math.imul(Be,Rt)|0,B=B+Math.imul(Be,ot)|0,M=M+Math.imul(Xe,wr)|0,A=A+Math.imul(Xe,wt)|0,A=A+Math.imul(Le,wr)|0,B=B+Math.imul(Le,wt)|0,M=M+Math.imul(Qe,Xt)|0,A=A+Math.imul(Qe,hr)|0,A=A+Math.imul(Ne,Xt)|0,B=B+Math.imul(Ne,hr)|0;var Ds=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,M=Math.imul(X,Dt),A=Math.imul(X,at),A=A+Math.imul(ue,Dt)|0,B=Math.imul(ue,at),M=M+Math.imul(pt,Rt)|0,A=A+Math.imul(pt,ot)|0,A=A+Math.imul(ne,Rt)|0,B=B+Math.imul(ne,ot)|0,M=M+Math.imul(et,wr)|0,A=A+Math.imul(et,wt)|0,A=A+Math.imul(Be,wr)|0,B=B+Math.imul(Be,wt)|0,M=M+Math.imul(Xe,Xt)|0,A=A+Math.imul(Xe,hr)|0,A=A+Math.imul(Le,Xt)|0,B=B+Math.imul(Le,hr)|0;var $s=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+($s>>>26)|0,$s&=67108863,M=Math.imul(X,Rt),A=Math.imul(X,ot),A=A+Math.imul(ue,Rt)|0,B=Math.imul(ue,ot),M=M+Math.imul(pt,wr)|0,A=A+Math.imul(pt,wt)|0,A=A+Math.imul(ne,wr)|0,B=B+Math.imul(ne,wt)|0,M=M+Math.imul(et,Xt)|0,A=A+Math.imul(et,hr)|0,A=A+Math.imul(Be,Xt)|0,B=B+Math.imul(Be,hr)|0;var Bs=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,M=Math.imul(X,wr),A=Math.imul(X,wt),A=A+Math.imul(ue,wr)|0,B=Math.imul(ue,wt),M=M+Math.imul(pt,Xt)|0,A=A+Math.imul(pt,hr)|0,A=A+Math.imul(ne,Xt)|0,B=B+Math.imul(ne,hr)|0;var xl=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(xl>>>26)|0,xl&=67108863,M=Math.imul(X,Xt),A=Math.imul(X,hr),A=A+Math.imul(ue,Xt)|0,B=Math.imul(ue,hr);var tc=(E+M|0)+((A&8191)<<13)|0;return E=(B+(A>>>13)|0)+(tc>>>26)|0,tc&=67108863,I[0]=ri,I[1]=ni,I[2]=ii,I[3]=si,I[4]=wn,I[5]=Wn,I[6]=ji,I[7]=Vn,I[8]=zi,I[9]=Hi,I[10]=xi,I[11]=Si,I[12]=Ii,I[13]=kn,I[14]=Ds,I[15]=$s,I[16]=Bs,I[17]=xl,I[18]=tc,E!==0&&(I[19]=E,_.length++),_};Math.imul||(P=k);function N(y,p,g){g.negative=p.negative^y.negative,g.length=y.length+p.length;for(var _=0,S=0,T=0;T>>26)|0,S+=I>>>26,I&=67108863}g.words[T]=E,_=I,I=S}return _!==0?g.words[T]=_:g.length--,g._strip()}function $(y,p,g){return N(y,p,g)}s.prototype.mulTo=function(p,g){var _,S=this.length+p.length;return this.length===10&&p.length===10?_=P(this,p,g):S<63?_=k(this,p,g):S<1024?_=N(this,p,g):_=$(this,p,g),_},s.prototype.mul=function(p){var g=new s(null);return g.words=new Array(this.length+p.length),this.mulTo(p,g)},s.prototype.mulf=function(p){var g=new s(null);return g.words=new Array(this.length+p.length),$(this,p,g)},s.prototype.imul=function(p){return this.clone().mulTo(p,this)},s.prototype.imuln=function(p){var g=p<0;g&&(p=-p),n(typeof p=="number"),n(p<67108864);for(var _=0,S=0;S>=26,_+=T/67108864|0,_+=I>>>26,this.words[S]=I&67108863}return _!==0&&(this.words[S]=_,this.length++),g?this.ineg():this},s.prototype.muln=function(p){return this.clone().imuln(p)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(p){var g=R(p);if(g.length===0)return new s(1);for(var _=this,S=0;S=0);var g=p%26,_=(p-g)/26,S=67108863>>>26-g<<26-g,T;if(g!==0){var I=0;for(T=0;T>>26-g}I&&(this.words[T]=I,this.length++)}if(_!==0){for(T=this.length-1;T>=0;T--)this.words[T+_]=this.words[T];for(T=0;T<_;T++)this.words[T]=0;this.length+=_}return this._strip()},s.prototype.ishln=function(p){return n(this.negative===0),this.iushln(p)},s.prototype.iushrn=function(p,g,_){n(typeof p=="number"&&p>=0);var S;g?S=(g-g%26)/26:S=0;var T=p%26,I=Math.min((p-T)/26,this.length),E=67108863^67108863>>>T<I)for(this.length-=I,A=0;A=0&&(B!==0||A>=S);A--){var ae=this.words[A]|0;this.words[A]=B<<26-T|ae>>>T,B=ae&E}return M&&B!==0&&(M.words[M.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(p,g,_){return n(this.negative===0),this.iushrn(p,g,_)},s.prototype.shln=function(p){return this.clone().ishln(p)},s.prototype.ushln=function(p){return this.clone().iushln(p)},s.prototype.shrn=function(p){return this.clone().ishrn(p)},s.prototype.ushrn=function(p){return this.clone().iushrn(p)},s.prototype.testn=function(p){n(typeof p=="number"&&p>=0);var g=p%26,_=(p-g)/26,S=1<=0);var g=p%26,_=(p-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(g!==0&&_++,this.length=Math.min(_,this.length),g!==0){var S=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},s.prototype.isubn=function(p){if(n(typeof p=="number"),n(p<67108864),p<0)return this.iaddn(-p);if(this.negative!==0)return this.negative=0,this.iaddn(p),this.negative=1,this;if(this.words[0]-=p,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(M/67108864|0),this.words[T+_]=I&67108863}for(;T>26,this.words[T+_]=I&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,T=0;T>26,this.words[T]=I&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(p,g){var _=this.length-p.length,S=this.clone(),T=p,I=T.words[T.length-1]|0,E=this._countBits(I);_=26-E,_!==0&&(T=T.ushln(_),S.iushln(_),I=T.words[T.length-1]|0);var M=S.length-T.length,A;if(g!=="mod"){A=new s(null),A.length=M+1,A.words=new Array(A.length);for(var B=0;B=0;W--){var Z=(S.words[T.length+W]|0)*67108864+(S.words[T.length+W-1]|0);for(Z=Math.min(Z/I|0,67108863),S._ishlnsubmul(T,Z,W);S.negative!==0;)Z--,S.negative=0,S._ishlnsubmul(T,1,W),S.isZero()||(S.negative^=1);A&&(A.words[W]=Z)}return A&&A._strip(),S._strip(),g!=="div"&&_!==0&&S.iushrn(_),{div:A||null,mod:S}},s.prototype.divmod=function(p,g,_){if(n(!p.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var S,T,I;return this.negative!==0&&p.negative===0?(I=this.neg().divmod(p,g),g!=="mod"&&(S=I.div.neg()),g!=="div"&&(T=I.mod.neg(),_&&T.negative!==0&&T.iadd(p)),{div:S,mod:T}):this.negative===0&&p.negative!==0?(I=this.divmod(p.neg(),g),g!=="mod"&&(S=I.div.neg()),{div:S,mod:I.mod}):this.negative&p.negative?(I=this.neg().divmod(p.neg(),g),g!=="div"&&(T=I.mod.neg(),_&&T.negative!==0&&T.isub(p)),{div:I.div,mod:T}):p.length>this.length||this.cmp(p)<0?{div:new s(0),mod:this}:p.length===1?g==="div"?{div:this.divn(p.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(p.words[0]))}:{div:this.divn(p.words[0]),mod:new s(this.modrn(p.words[0]))}:this._wordDiv(p,g)},s.prototype.div=function(p){return this.divmod(p,"div",!1).div},s.prototype.mod=function(p){return this.divmod(p,"mod",!1).mod},s.prototype.umod=function(p){return this.divmod(p,"mod",!0).mod},s.prototype.divRound=function(p){var g=this.divmod(p);if(g.mod.isZero())return g.div;var _=g.div.negative!==0?g.mod.isub(p):g.mod,S=p.ushrn(1),T=p.andln(1),I=_.cmp(S);return I<0||T===1&&I===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},s.prototype.modrn=function(p){var g=p<0;g&&(p=-p),n(p<=67108863);for(var _=(1<<26)%p,S=0,T=this.length-1;T>=0;T--)S=(_*S+(this.words[T]|0))%p;return g?-S:S},s.prototype.modn=function(p){return this.modrn(p)},s.prototype.idivn=function(p){var g=p<0;g&&(p=-p),n(p<=67108863);for(var _=0,S=this.length-1;S>=0;S--){var T=(this.words[S]|0)+_*67108864;this.words[S]=T/p|0,_=T%p}return this._strip(),g?this.ineg():this},s.prototype.divn=function(p){return this.clone().idivn(p)},s.prototype.egcd=function(p){n(p.negative===0),n(!p.isZero());var g=this,_=p.clone();g.negative!==0?g=g.umod(p):g=g.clone();for(var S=new s(1),T=new s(0),I=new s(0),E=new s(1),M=0;g.isEven()&&_.isEven();)g.iushrn(1),_.iushrn(1),++M;for(var A=_.clone(),B=g.clone();!g.isZero();){for(var ae=0,W=1;!(g.words[0]&W)&&ae<26;++ae,W<<=1);if(ae>0)for(g.iushrn(ae);ae-- >0;)(S.isOdd()||T.isOdd())&&(S.iadd(A),T.isub(B)),S.iushrn(1),T.iushrn(1);for(var Z=0,K=1;!(_.words[0]&K)&&Z<26;++Z,K<<=1);if(Z>0)for(_.iushrn(Z);Z-- >0;)(I.isOdd()||E.isOdd())&&(I.iadd(A),E.isub(B)),I.iushrn(1),E.iushrn(1);g.cmp(_)>=0?(g.isub(_),S.isub(I),T.isub(E)):(_.isub(g),I.isub(S),E.isub(T))}return{a:I,b:E,gcd:_.iushln(M)}},s.prototype._invmp=function(p){n(p.negative===0),n(!p.isZero());var g=this,_=p.clone();g.negative!==0?g=g.umod(p):g=g.clone();for(var S=new s(1),T=new s(0),I=_.clone();g.cmpn(1)>0&&_.cmpn(1)>0;){for(var E=0,M=1;!(g.words[0]&M)&&E<26;++E,M<<=1);if(E>0)for(g.iushrn(E);E-- >0;)S.isOdd()&&S.iadd(I),S.iushrn(1);for(var A=0,B=1;!(_.words[0]&B)&&A<26;++A,B<<=1);if(A>0)for(_.iushrn(A);A-- >0;)T.isOdd()&&T.iadd(I),T.iushrn(1);g.cmp(_)>=0?(g.isub(_),S.isub(T)):(_.isub(g),T.isub(S))}var ae;return g.cmpn(1)===0?ae=S:ae=T,ae.cmpn(0)<0&&ae.iadd(p),ae},s.prototype.gcd=function(p){if(this.isZero())return p.abs();if(p.isZero())return this.abs();var g=this.clone(),_=p.clone();g.negative=0,_.negative=0;for(var S=0;g.isEven()&&_.isEven();S++)g.iushrn(1),_.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;_.isEven();)_.iushrn(1);var T=g.cmp(_);if(T<0){var I=g;g=_,_=I}else if(T===0||_.cmpn(1)===0)break;g.isub(_)}while(!0);return _.iushln(S)},s.prototype.invm=function(p){return this.egcd(p).a.umod(p)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(p){return this.words[0]&p},s.prototype.bincn=function(p){n(typeof p=="number");var g=p%26,_=(p-g)/26,S=1<>>26,E&=67108863,this.words[I]=E}return T!==0&&(this.words[I]=T,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(p){var g=p<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var _;if(this.length>1)_=1;else{g&&(p=-p),n(p<=67108863,"Number is too big");var S=this.words[0]|0;_=S===p?0:Sp.length)return 1;if(this.length=0;_--){var S=this.words[_]|0,T=p.words[_]|0;if(S!==T){ST&&(g=1);break}}return g},s.prototype.gtn=function(p){return this.cmpn(p)===1},s.prototype.gt=function(p){return this.cmp(p)===1},s.prototype.gten=function(p){return this.cmpn(p)>=0},s.prototype.gte=function(p){return this.cmp(p)>=0},s.prototype.ltn=function(p){return this.cmpn(p)===-1},s.prototype.lt=function(p){return this.cmp(p)===-1},s.prototype.lten=function(p){return this.cmpn(p)<=0},s.prototype.lte=function(p){return this.cmp(p)<=0},s.prototype.eqn=function(p){return this.cmpn(p)===0},s.prototype.eq=function(p){return this.cmp(p)===0},s.red=function(p){return new D(p)},s.prototype.toRed=function(p){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),p.convertTo(this)._forceRed(p)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(p){return this.red=p,this},s.prototype.forceRed=function(p){return n(!this.red,"Already a number in reduction context"),this._forceRed(p)},s.prototype.redAdd=function(p){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,p)},s.prototype.redIAdd=function(p){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,p)},s.prototype.redSub=function(p){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,p)},s.prototype.redISub=function(p){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,p)},s.prototype.redShl=function(p){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,p)},s.prototype.redMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.mul(this,p)},s.prototype.redIMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.imul(this,p)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(p){return n(this.red&&!p.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,p)};var j={k256:null,p224:null,p192:null,p25519:null};function G(y,p){this.name=y,this.p=new s(p,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var p=new s(null);return p.words=new Array(Math.ceil(this.n/13)),p},G.prototype.ireduce=function(p){var g=p,_;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),_=g.bitLength();while(_>this.n);var S=_0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},G.prototype.split=function(p,g){p.iushrn(this.n,0,g)},G.prototype.imulK=function(p){return p.imul(this.k)};function U(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(U,G),U.prototype.split=function(p,g){for(var _=4194303,S=Math.min(p.length,9),T=0;T>>22,I=E}I>>>=22,p.words[T-10]=I,I===0&&p.length>10?p.length-=10:p.length-=9},U.prototype.imulK=function(p){p.words[p.length]=0,p.words[p.length+1]=0,p.length+=2;for(var g=0,_=0;_>>=26,p.words[_]=T,g=S}return g!==0&&(p.words[p.length++]=g),p},s._prime=function(p){if(j[p])return j[p];var g;if(p==="k256")g=new U;else if(p==="p224")g=new L;else if(p==="p192")g=new V;else if(p==="p25519")g=new te;else throw new Error("Unknown prime "+p);return j[p]=g,g};function D(y){if(typeof y=="string"){var p=s._prime(y);this.m=p.p,this.prime=p}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(p){n(p.negative===0,"red works only with positives"),n(p.red,"red works only with red numbers")},D.prototype._verify2=function(p,g){n((p.negative|g.negative)===0,"red works only with positives"),n(p.red&&p.red===g.red,"red works only with red numbers")},D.prototype.imod=function(p){return this.prime?this.prime.ireduce(p)._forceRed(this):(f(p,p.umod(this.m)._forceRed(this)),p)},D.prototype.neg=function(p){return p.isZero()?p.clone():this.m.sub(p)._forceRed(this)},D.prototype.add=function(p,g){this._verify2(p,g);var _=p.add(g);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},D.prototype.iadd=function(p,g){this._verify2(p,g);var _=p.iadd(g);return _.cmp(this.m)>=0&&_.isub(this.m),_},D.prototype.sub=function(p,g){this._verify2(p,g);var _=p.sub(g);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},D.prototype.isub=function(p,g){this._verify2(p,g);var _=p.isub(g);return _.cmpn(0)<0&&_.iadd(this.m),_},D.prototype.shl=function(p,g){return this._verify1(p),this.imod(p.ushln(g))},D.prototype.imul=function(p,g){return this._verify2(p,g),this.imod(p.imul(g))},D.prototype.mul=function(p,g){return this._verify2(p,g),this.imod(p.mul(g))},D.prototype.isqr=function(p){return this.imul(p,p.clone())},D.prototype.sqr=function(p){return this.mul(p,p)},D.prototype.sqrt=function(p){if(p.isZero())return p.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var _=this.m.add(new s(1)).iushrn(2);return this.pow(p,_)}for(var S=this.m.subn(1),T=0;!S.isZero()&&S.andln(1)===0;)T++,S.iushrn(1);n(!S.isZero());var I=new s(1).toRed(this),E=I.redNeg(),M=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,M).cmp(E)!==0;)A.redIAdd(E);for(var B=this.pow(A,S),ae=this.pow(p,S.addn(1).iushrn(1)),W=this.pow(p,S),Z=T;W.cmp(I)!==0;){for(var K=W,ee=0;K.cmp(I)!==0;ee++)K=K.redSqr();n(ee=0;T--){for(var B=g.words[T],ae=A-1;ae>=0;ae--){var W=B>>ae&1;if(I!==S[0]&&(I=this.sqr(I)),W===0&&E===0){M=0;continue}E<<=1,E|=W,M++,!(M!==_&&(T!==0||ae!==0))&&(I=this.mul(I,S[E]),M=0,E=0)}A=26}return I},D.prototype.convertTo=function(p){var g=p.umod(this.m);return g===p?g.clone():g},D.prototype.convertFrom=function(p){var g=p.clone();return g.red=null,g},s.mont=function(p){return new x(p)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(p){return this.imod(p.ushln(this.shift))},x.prototype.convertFrom=function(p){var g=this.imod(p.mul(this.rinv));return g.red=null,g},x.prototype.imul=function(p,g){if(p.isZero()||g.isZero())return p.words[0]=0,p.length=1,p;var _=p.imul(g),S=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=_.isub(S).iushrn(this.shift),I=T;return T.cmp(this.m)>=0?I=T.isub(this.m):T.cmpn(0)<0&&(I=T.iadd(this.m)),I._forceRed(this)},x.prototype.mul=function(p,g){if(p.isZero()||g.isZero())return new s(0)._forceRed(this);var _=p.mul(g),S=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=_.isub(S).iushrn(this.shift),I=T;return T.cmp(this.m)>=0?I=T.isub(this.m):T.cmpn(0)<0&&(I=T.iadd(this.m)),I._forceRed(this)},x.prototype.invm=function(p){var g=this.imod(p._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(r,ut)}(BI)),BI.exports}var NB,yce;function DB(){if(yce)return NB;yce=1;var r=OB(),e=ey();function t(s){var a=n(s),o=a.toRed(r.mont(s.modulus)).redPow(new r(s.publicExponent)).fromRed();return{blinder:o,unblinder:a.invm(s.modulus)}}function n(s){var a=s.modulus.byteLength(),o;do o=new r(e(a));while(o.cmp(s.modulus)>=0||!o.umod(s.prime1)||!o.umod(s.prime2));return o}function i(s,a){var o=t(a),l=a.modulus.byteLength(),u=new r(s).mul(o.blinder).umod(a.modulus),f=u.toRed(r.mont(a.prime1)),h=u.toRed(r.mont(a.prime2)),m=a.coefficient,b=a.prime1,v=a.prime2,C=f.redPow(a.exponent1).fromRed(),R=h.redPow(a.exponent2).fromRed(),k=C.isub(R).imul(m).umod(b).imul(v);return R.iadd(k).imul(o.unblinder).umod(a.modulus).toArrayLike(It,"be",l)}return i.getr=n,NB=i,NB}var $B={};const xFe={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}};var BB={},LB={},xce;function _ce(){return xce||(xce=1,function(r){var e=r;function t(s,a){if(Array.isArray(s))return s.slice();if(!s)return[];var o=[];if(typeof s!="string"){for(var l=0;l>8,h=u&255;f?o.push(f,h):o.push(h)}return o}e.toArray=t;function n(s){return s.length===1?"0"+s:s}e.zero2=n;function i(s){for(var a="",o=0;o(v>>1)-1?k=(v>>1)-P:k=P,C.isubn(k)):k=0,b[R]=k,C.iushrn(1)}return b}e.getNAF=s;function a(f,h){var m=[[],[]];f=f.clone(),h=h.clone();for(var b=0,v=0,C;f.cmpn(-b)>0||h.cmpn(-v)>0;){var R=f.andln(3)+b&3,k=h.andln(3)+v&3;R===3&&(R=-1),k===3&&(k=-1);var P;R&1?(C=f.andln(7)+b&7,(C===3||C===5)&&k===2?P=-R:P=R):P=0,m[0].push(P);var N;k&1?(C=h.andln(7)+v&7,(C===3||C===5)&&R===2?N=-k:N=k):N=0,m[1].push(N),2*b===P+1&&(b=1-b),2*v===N+1&&(v=1-v),f.iushrn(1),h.iushrn(1)}return m}e.getJSF=a;function o(f,h,m){var b="_"+h;f.prototype[h]=function(){return this[b]!==void 0?this[b]:this[b]=m.call(this)}}e.cachedProperty=o;function l(f){return typeof f=="string"?e.toArray(f,"hex"):f}e.parseBytes=l;function u(f){return new t(f,"hex","le")}e.intFromLE=u}(BB)),BB}var UB={},FB,Cce;function LI(){if(Cce)return FB;Cce=1;var r=Aa(),e=lu(),t=e.getNAF,n=e.getJSF,i=e.assert;function s(o,l){this.type=o,this.p=new r(l.p,16),this.red=l.prime?r.red(l.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=l.n&&new r(l.n,16),this.g=l.g&&this.pointFromJSON(l.g,l.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var u=this.n&&this.p.div(this.n);!u||u.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}FB=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(l,u){i(l.precomputed);var f=l._getDoubles(),h=t(u,1,this._bitLength),m=(1<=v;R--)C=(C<<1)+h[R];b.push(C)}for(var k=this.jpoint(null,null,null),P=this.jpoint(null,null,null),N=m;N>0;N--){for(v=0;v=0;C--){for(var R=0;C>=0&&b[C]===0;C--)R++;if(C>=0&&R++,v=v.dblp(R),C<0)break;var k=b[C];i(k!==0),l.type==="affine"?k>0?v=v.mixedAdd(m[k-1>>1]):v=v.mixedAdd(m[-k-1>>1].neg()):k>0?v=v.add(m[k-1>>1]):v=v.add(m[-k-1>>1].neg())}return l.type==="affine"?v.toP():v},s.prototype._wnafMulAdd=function(l,u,f,h,m){var b=this._wnafT1,v=this._wnafT2,C=this._wnafT3,R=0,k,P,N;for(k=0;k=1;k-=2){var j=k-1,G=k;if(b[j]!==1||b[G]!==1){C[j]=t(f[j],b[j],this._bitLength),C[G]=t(f[G],b[G],this._bitLength),R=Math.max(C[j].length,R),R=Math.max(C[G].length,R);continue}var U=[u[j],null,null,u[G]];u[j].y.cmp(u[G].y)===0?(U[1]=u[j].add(u[G]),U[2]=u[j].toJ().mixedAdd(u[G].neg())):u[j].y.cmp(u[G].y.redNeg())===0?(U[1]=u[j].toJ().mixedAdd(u[G]),U[2]=u[j].add(u[G].neg())):(U[1]=u[j].toJ().mixedAdd(u[G]),U[2]=u[j].toJ().mixedAdd(u[G].neg()));var L=[-3,-1,-5,-7,0,7,5,1,3],V=n(f[j],f[G]);for(R=Math.max(V[0].length,R),C[j]=new Array(R),C[G]=new Array(R),P=0;P=0;k--){for(var p=0;k>=0;){var g=!0;for(P=0;P=0&&p++,x=x.dblp(p),k<0)break;for(P=0;P0?N=v[P][_-1>>1]:_<0&&(N=v[P][-_-1>>1].neg()),N.type==="affine"?x=x.mixedAdd(N):x=x.add(N))}}for(k=0;k=Math.ceil((l.bitLength()+1)/u.step):!1},a.prototype._getDoubles=function(l,u){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var f=[this],h=this,m=0;m=0&&(j=k,G=P),N.negative&&(N=N.neg(),$=$.neg()),j.negative&&(j=j.neg(),G=G.neg()),[{a:N,b:$},{a:j,b:G}]},s.prototype._endoSplit=function(u){var f=this.endo.basis,h=f[0],m=f[1],b=m.b.mul(u).divRound(this.n),v=h.b.neg().mul(u).divRound(this.n),C=b.mul(h.a),R=v.mul(m.a),k=b.mul(h.b),P=v.mul(m.b),N=u.sub(C).sub(R),$=k.add(P).neg();return{k1:N,k2:$}},s.prototype.pointFromX=function(u,f){u=new e(u,16),u.red||(u=u.toRed(this.red));var h=u.redSqr().redMul(u).redIAdd(u.redMul(this.a)).redIAdd(this.b),m=h.redSqrt();if(m.redSqr().redSub(h).cmp(this.zero)!==0)throw new Error("invalid point");var b=m.fromRed().isOdd();return(f&&!b||!f&&b)&&(m=m.redNeg()),this.point(u,m)},s.prototype.validate=function(u){if(u.inf)return!0;var f=u.x,h=u.y,m=this.a.redMul(f),b=f.redSqr().redMul(f).redIAdd(m).redIAdd(this.b);return h.redSqr().redISub(b).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(u,f,h){for(var m=this._endoWnafT1,b=this._endoWnafT2,v=0;v":""},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(u){if(this.inf)return u;if(u.inf)return this;if(this.eq(u))return this.dbl();if(this.neg().eq(u))return this.curve.point(null,null);if(this.x.cmp(u.x)===0)return this.curve.point(null,null);var f=this.y.redSub(u.y);f.cmpn(0)!==0&&(f=f.redMul(this.x.redSub(u.x).redInvm()));var h=f.redSqr().redISub(this.x).redISub(u.x),m=f.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,m)},a.prototype.dbl=function(){if(this.inf)return this;var u=this.y.redAdd(this.y);if(u.cmpn(0)===0)return this.curve.point(null,null);var f=this.curve.a,h=this.x.redSqr(),m=u.redInvm(),b=h.redAdd(h).redIAdd(h).redIAdd(f).redMul(m),v=b.redSqr().redISub(this.x.redAdd(this.x)),C=b.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,C)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(u){return u=new e(u,16),this.isInfinity()?this:this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve.endo?this.curve._endoWnafMulAdd([this],[u]):this.curve._wnafMul(this,u)},a.prototype.mulAdd=function(u,f,h){var m=[this,f],b=[u,h];return this.curve.endo?this.curve._endoWnafMulAdd(m,b):this.curve._wnafMulAdd(1,m,b,2)},a.prototype.jmulAdd=function(u,f,h){var m=[this,f],b=[u,h];return this.curve.endo?this.curve._endoWnafMulAdd(m,b,!0):this.curve._wnafMulAdd(1,m,b,2,!0)},a.prototype.eq=function(u){return this===u||this.inf===u.inf&&(this.inf||this.x.cmp(u.x)===0&&this.y.cmp(u.y)===0)},a.prototype.neg=function(u){if(this.inf)return this;var f=this.curve.point(this.x,this.y.redNeg());if(u&&this.precomputed){var h=this.precomputed,m=function(b){return b.neg()};f.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(m)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(m)}}}return f},a.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var u=this.curve.jpoint(this.x,this.y,this.curve.one);return u};function o(l,u,f,h){n.BasePoint.call(this,l,"jacobian"),u===null&&f===null&&h===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new e(0)):(this.x=new e(u,16),this.y=new e(f,16),this.z=new e(h,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return t(o,n.BasePoint),s.prototype.jpoint=function(u,f,h){return new o(this,u,f,h)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var u=this.z.redInvm(),f=u.redSqr(),h=this.x.redMul(f),m=this.y.redMul(f).redMul(u);return this.curve.point(h,m)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(u){if(this.isInfinity())return u;if(u.isInfinity())return this;var f=u.z.redSqr(),h=this.z.redSqr(),m=this.x.redMul(f),b=u.x.redMul(h),v=this.y.redMul(f.redMul(u.z)),C=u.y.redMul(h.redMul(this.z)),R=m.redSub(b),k=v.redSub(C);if(R.cmpn(0)===0)return k.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var P=R.redSqr(),N=P.redMul(R),$=m.redMul(P),j=k.redSqr().redIAdd(N).redISub($).redISub($),G=k.redMul($.redISub(j)).redISub(v.redMul(N)),U=this.z.redMul(u.z).redMul(R);return this.curve.jpoint(j,G,U)},o.prototype.mixedAdd=function(u){if(this.isInfinity())return u.toJ();if(u.isInfinity())return this;var f=this.z.redSqr(),h=this.x,m=u.x.redMul(f),b=this.y,v=u.y.redMul(f).redMul(this.z),C=h.redSub(m),R=b.redSub(v);if(C.cmpn(0)===0)return R.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var k=C.redSqr(),P=k.redMul(C),N=h.redMul(k),$=R.redSqr().redIAdd(P).redISub(N).redISub(N),j=R.redMul(N.redISub($)).redISub(b.redMul(P)),G=this.z.redMul(C);return this.curve.jpoint($,j,G)},o.prototype.dblp=function(u){if(u===0)return this;if(this.isInfinity())return this;if(!u)return this.dbl();var f;if(this.curve.zeroA||this.curve.threeA){var h=this;for(f=0;f=0)return!1;if(h.redIAdd(b),this.x.cmp(h)===0)return!0}},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return this.z.cmpn(0)===0},jB}var zB,Sce;function EFe(){if(Sce)return zB;Sce=1;var r=Aa(),e=an(),t=LI(),n=lu();function i(a){t.call(this,"mont",a),this.a=new r(a.a,16).toRed(this.red),this.b=new r(a.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}e(i,t),zB=i,i.prototype.validate=function(o){var l=o.normalize().x,u=l.redSqr(),f=u.redMul(l).redAdd(u.redMul(this.a)).redAdd(l),h=f.redSqrt();return h.redSqr().cmp(f)===0};function s(a,o,l){t.BasePoint.call(this,a,"projective"),o===null&&l===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(o,16),this.z=new r(l,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return e(s,t.BasePoint),i.prototype.decodePoint=function(o,l){return this.point(n.toArray(o,l),1)},i.prototype.point=function(o,l){return new s(this,o,l)},i.prototype.pointFromJSON=function(o){return s.fromJSON(this,o)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(o,l){return new s(o,l[0],l[1]||o.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var o=this.x.redAdd(this.z),l=o.redSqr(),u=this.x.redSub(this.z),f=u.redSqr(),h=l.redSub(f),m=l.redMul(f),b=h.redMul(f.redAdd(this.curve.a24.redMul(h)));return this.curve.point(m,b)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(o,l){var u=this.x.redAdd(this.z),f=this.x.redSub(this.z),h=o.x.redAdd(o.z),m=o.x.redSub(o.z),b=m.redMul(u),v=h.redMul(f),C=l.z.redMul(b.redAdd(v).redSqr()),R=l.x.redMul(b.redISub(v).redSqr());return this.curve.point(C,R)},s.prototype.mul=function(o){for(var l=o.clone(),u=this,f=this.curve.point(null,null),h=this,m=[];l.cmpn(0)!==0;l.iushrn(1))m.push(l.andln(1));for(var b=m.length-1;b>=0;b--)m[b]===0?(u=u.diffAdd(f,h),f=f.dbl()):(f=u.diffAdd(f,h),u=u.dbl());return f},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(o){return this.getX().cmp(o.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},zB}var HB,Ice;function CFe(){if(Ice)return HB;Ice=1;var r=lu(),e=Aa(),t=an(),n=LI(),i=r.assert;function s(o){this.twisted=(o.a|0)!==1,this.mOneA=this.twisted&&(o.a|0)===-1,this.extended=this.mOneA,n.call(this,"edwards",o),this.a=new e(o.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new e(o.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new e(o.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(o.c|0)===1}t(s,n),HB=s,s.prototype._mulA=function(l){return this.mOneA?l.redNeg():this.a.redMul(l)},s.prototype._mulC=function(l){return this.oneC?l:this.c.redMul(l)},s.prototype.jpoint=function(l,u,f,h){return this.point(l,u,f,h)},s.prototype.pointFromX=function(l,u){l=new e(l,16),l.red||(l=l.toRed(this.red));var f=l.redSqr(),h=this.c2.redSub(this.a.redMul(f)),m=this.one.redSub(this.c2.redMul(this.d).redMul(f)),b=h.redMul(m.redInvm()),v=b.redSqrt();if(v.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var C=v.fromRed().isOdd();return(u&&!C||!u&&C)&&(v=v.redNeg()),this.point(l,v)},s.prototype.pointFromY=function(l,u){l=new e(l,16),l.red||(l=l.toRed(this.red));var f=l.redSqr(),h=f.redSub(this.c2),m=f.redMul(this.d).redMul(this.c2).redSub(this.a),b=h.redMul(m.redInvm());if(b.cmp(this.zero)===0){if(u)throw new Error("invalid point");return this.point(this.zero,l)}var v=b.redSqrt();if(v.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==u&&(v=v.redNeg()),this.point(v,l)},s.prototype.validate=function(l){if(l.isInfinity())return!0;l.normalize();var u=l.x.redSqr(),f=l.y.redSqr(),h=u.redMul(this.a).redAdd(f),m=this.c2.redMul(this.one.redAdd(this.d.redMul(u).redMul(f)));return h.cmp(m)===0};function a(o,l,u,f,h){n.BasePoint.call(this,o,"projective"),l===null&&u===null&&f===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new e(l,16),this.y=new e(u,16),this.z=f?new e(f,16):this.curve.one,this.t=h&&new e(h,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return t(a,n.BasePoint),s.prototype.pointFromJSON=function(l){return a.fromJSON(this,l)},s.prototype.point=function(l,u,f,h){return new a(this,l,u,f,h)},a.fromJSON=function(l,u){return new a(l,u[0],u[1],u[2])},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},a.prototype._extDbl=function(){var l=this.x.redSqr(),u=this.y.redSqr(),f=this.z.redSqr();f=f.redIAdd(f);var h=this.curve._mulA(l),m=this.x.redAdd(this.y).redSqr().redISub(l).redISub(u),b=h.redAdd(u),v=b.redSub(f),C=h.redSub(u),R=m.redMul(v),k=b.redMul(C),P=m.redMul(C),N=v.redMul(b);return this.curve.point(R,k,N,P)},a.prototype._projDbl=function(){var l=this.x.redAdd(this.y).redSqr(),u=this.x.redSqr(),f=this.y.redSqr(),h,m,b,v,C,R;if(this.curve.twisted){v=this.curve._mulA(u);var k=v.redAdd(f);this.zOne?(h=l.redSub(u).redSub(f).redMul(k.redSub(this.curve.two)),m=k.redMul(v.redSub(f)),b=k.redSqr().redSub(k).redSub(k)):(C=this.z.redSqr(),R=k.redSub(C).redISub(C),h=l.redSub(u).redISub(f).redMul(R),m=k.redMul(v.redSub(f)),b=k.redMul(R))}else v=u.redAdd(f),C=this.curve._mulC(this.z).redSqr(),R=v.redSub(C).redSub(C),h=this.curve._mulC(l.redISub(v)).redMul(R),m=this.curve._mulC(v).redMul(u.redISub(f)),b=v.redMul(R);return this.curve.point(h,m,b)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(l){var u=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),f=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),h=this.t.redMul(this.curve.dd).redMul(l.t),m=this.z.redMul(l.z.redAdd(l.z)),b=f.redSub(u),v=m.redSub(h),C=m.redAdd(h),R=f.redAdd(u),k=b.redMul(v),P=C.redMul(R),N=b.redMul(R),$=v.redMul(C);return this.curve.point(k,P,$,N)},a.prototype._projAdd=function(l){var u=this.z.redMul(l.z),f=u.redSqr(),h=this.x.redMul(l.x),m=this.y.redMul(l.y),b=this.curve.d.redMul(h).redMul(m),v=f.redSub(b),C=f.redAdd(b),R=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(h).redISub(m),k=u.redMul(v).redMul(R),P,N;return this.curve.twisted?(P=u.redMul(C).redMul(m.redSub(this.curve._mulA(h))),N=v.redMul(C)):(P=u.redMul(C).redMul(m.redSub(h)),N=this.curve._mulC(v).redMul(C)),this.curve.point(k,P,N)},a.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},a.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},a.prototype.mulAdd=function(l,u,f){return this.curve._wnafMulAdd(1,[this,u],[l,f],2,!1)},a.prototype.jmulAdd=function(l,u,f){return this.curve._wnafMulAdd(1,[this,u],[l,f],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(l){return this===l||this.getX().cmp(l.getX())===0&&this.getY().cmp(l.getY())===0},a.prototype.eqXToP=function(l){var u=l.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(u)===0)return!0;for(var f=l.clone(),h=this.curve.redN.redMul(this.z);;){if(f.iadd(this.curve.n),f.cmp(this.curve.p)>=0)return!1;if(u.redIAdd(h),this.x.cmp(u)===0)return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add,HB}var Tce;function kce(){return Tce||(Tce=1,function(r){var e=r;e.base=LI(),e.short=_Fe(),e.mont=EFe(),e.edwards=CFe()}(UB)),UB}var qB={},WB={},wi={},Rce;function Od(){if(Rce)return wi;Rce=1;var r=ou(),e=an();wi.inherits=e;function t(x,y){return(x.charCodeAt(y)&64512)!==55296||y<0||y+1>=x.length?!1:(x.charCodeAt(y+1)&64512)===56320}function n(x,y){if(Array.isArray(x))return x.slice();if(!x)return[];var p=[];if(typeof x=="string")if(y){if(y==="hex")for(x=x.replace(/[^a-z0-9]+/ig,""),x.length%2!==0&&(x="0"+x),_=0;_>6|192,p[g++]=S&63|128):t(x,_)?(S=65536+((S&1023)<<10)+(x.charCodeAt(++_)&1023),p[g++]=S>>18|240,p[g++]=S>>12&63|128,p[g++]=S>>6&63|128,p[g++]=S&63|128):(p[g++]=S>>12|224,p[g++]=S>>6&63|128,p[g++]=S&63|128)}else for(_=0;_>>24|x>>>8&65280|x<<8&16711680|(x&255)<<24;return y>>>0}wi.htonl=s;function a(x,y){for(var p="",g=0;g>>0}return S}wi.join32=u;function f(x,y){for(var p=new Array(x.length*4),g=0,_=0;g>>24,p[_+1]=S>>>16&255,p[_+2]=S>>>8&255,p[_+3]=S&255):(p[_+3]=S>>>24,p[_+2]=S>>>16&255,p[_+1]=S>>>8&255,p[_]=S&255)}return p}wi.split32=f;function h(x,y){return x>>>y|x<<32-y}wi.rotr32=h;function m(x,y){return x<>>32-y}wi.rotl32=m;function b(x,y){return x+y>>>0}wi.sum32=b;function v(x,y,p){return x+y+p>>>0}wi.sum32_3=v;function C(x,y,p,g){return x+y+p+g>>>0}wi.sum32_4=C;function R(x,y,p,g,_){return x+y+p+g+_>>>0}wi.sum32_5=R;function k(x,y,p,g){var _=x[y],S=x[y+1],T=g+S>>>0,I=(T>>0,x[y+1]=T}wi.sum64=k;function P(x,y,p,g){var _=y+g>>>0,S=(_>>0}wi.sum64_hi=P;function N(x,y,p,g){var _=y+g;return _>>>0}wi.sum64_lo=N;function $(x,y,p,g,_,S,T,I){var E=0,M=y;M=M+g>>>0,E+=M>>0,E+=M>>0,E+=M>>0}wi.sum64_4_hi=$;function j(x,y,p,g,_,S,T,I){var E=y+g+S+I;return E>>>0}wi.sum64_4_lo=j;function G(x,y,p,g,_,S,T,I,E,M){var A=0,B=y;B=B+g>>>0,A+=B>>0,A+=B>>0,A+=B>>0,A+=B>>0}wi.sum64_5_hi=G;function U(x,y,p,g,_,S,T,I,E,M){var A=y+g+S+I+M;return A>>>0}wi.sum64_5_lo=U;function L(x,y,p){var g=y<<32-p|x>>>p;return g>>>0}wi.rotr64_hi=L;function V(x,y,p){var g=x<<32-p|y>>>p;return g>>>0}wi.rotr64_lo=V;function te(x,y,p){return x>>>p}wi.shr64_hi=te;function D(x,y,p){var g=x<<32-p|y>>>p;return g>>>0}return wi.shr64_lo=D,wi}var VB={},Mce;function ex(){if(Mce)return VB;Mce=1;var r=Od(),e=ou();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return VB.BlockHash=t,t.prototype.update=function(i,s){if(i=r.toArray(i,s),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var a=i.length%this._delta8;this.pending=i.slice(i.length-a,i.length),this.pending.length===0&&(this.pending=null),i=r.join32(i,0,i.length-a,this.endian);for(var o=0;o>>24&255,o[l++]=i>>>16&255,o[l++]=i>>>8&255,o[l++]=i&255}else for(o[l++]=i&255,o[l++]=i>>>8&255,o[l++]=i>>>16&255,o[l++]=i>>>24&255,o[l++]=0,o[l++]=0,o[l++]=0,o[l++]=0,u=8;u>>3}Nd.g0_256=l;function u(f){return e(f,17)^e(f,19)^f>>>10}return Nd.g1_256=u,Nd}var GB,Nce;function AFe(){if(Nce)return GB;Nce=1;var r=Od(),e=ex(),t=Oce(),n=r.rotl32,i=r.sum32,s=r.sum32_5,a=t.ft_1,o=e.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(u,o),GB=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(h,m){for(var b=this.W,v=0;v<16;v++)b[v]=h[m+v];for(;vthis.blockSize&&(i=new this.Hash().update(i).digest()),e(i.length<=this.blockSize);for(var s=i.length;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,a,o)}return nL=n,n.prototype._init=function(s,a,o){var l=s.concat(a).concat(o);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(s.concat(o||[])),this._reseed=1},n.prototype.generate=function(s,a,o,l){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof a!="string"&&(l=o,o=a,a=null),o&&(o=e.toArray(o,l||"hex"),this._update(o));for(var u=[];u.length"},iL}var sL,Zce;function NFe(){if(Zce)return sL;Zce=1;var r=Aa(),e=lu(),t=e.assert;function n(l,u){if(l instanceof n)return l;this._importDER(l,u)||(t(l.r&&l.s,"Signature without r or s"),this.r=new r(l.r,16),this.s=new r(l.s,16),l.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=l.recoveryParam)}sL=n;function i(){this.place=0}function s(l,u){var f=l[u.place++];if(!(f&128))return f;var h=f&15;if(h===0||h>4)return!1;for(var m=0,b=0,v=u.place;b>>=0;return m<=127?!1:(u.place=v,m)}function a(l){for(var u=0,f=l.length-1;!l[u]&&!(l[u+1]&128)&&u>>3);for(l.push(f|128);--f;)l.push(u>>>(f<<3)&255);l.push(u)}return n.prototype.toDER=function(u){var f=this.r.toArray(),h=this.s.toArray();for(f[0]&128&&(f=[0].concat(f)),h[0]&128&&(h=[0].concat(h)),f=a(f),h=a(h);!h[0]&&!(h[1]&128);)h=h.slice(1);var m=[2];o(m,f.length),m=m.concat(f),m.push(2),o(m,h.length);var b=m.concat(h),v=[48];return o(v,b.length),v=v.concat(b),e.encode(v,u)},sL}var aL,Jce;function DFe(){if(Jce)return aL;Jce=1;var r=Aa(),e=PFe(),t=lu(),n=rL(),i=kB(),s=t.assert,a=OFe(),o=NFe();function l(u){if(!(this instanceof l))return new l(u);typeof u=="string"&&(s(Object.prototype.hasOwnProperty.call(n,u),"Unknown curve "+u),u=n[u]),u instanceof n.PresetCurve&&(u={curve:u}),this.curve=u.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=u.curve.g,this.g.precompute(u.curve.n.bitLength()+1),this.hash=u.hash||u.curve.hash}return aL=l,l.prototype.keyPair=function(f){return new a(this,f)},l.prototype.keyFromPrivate=function(f,h){return a.fromPrivate(this,f,h)},l.prototype.keyFromPublic=function(f,h){return a.fromPublic(this,f,h)},l.prototype.genKeyPair=function(f){f||(f={});for(var h=new e({hash:this.hash,pers:f.pers,persEnc:f.persEnc||"utf8",entropy:f.entropy||i(this.hash.hmacStrength),entropyEnc:f.entropy&&f.entropyEnc||"utf8",nonce:this.n.toArray()}),m=this.n.byteLength(),b=this.n.sub(new r(2));;){var v=new r(h.generate(m));if(!(v.cmp(b)>0))return v.iaddn(1),this.keyFromPrivate(v)}},l.prototype._truncateToN=function(f,h){var m=f.byteLength()*8-this.n.bitLength();return m>0&&(f=f.ushrn(m)),!h&&f.cmp(this.n)>=0?f.sub(this.n):f},l.prototype.sign=function(f,h,m,b){typeof m=="object"&&(b=m,m=null),b||(b={}),h=this.keyFromPrivate(h,m),f=this._truncateToN(new r(f,16));for(var v=this.n.byteLength(),C=h.getPrivate().toArray("be",v),R=f.toArray("be",v),k=new e({hash:this.hash,entropy:C,nonce:R,pers:b.pers,persEnc:b.persEnc||"utf8"}),P=this.n.sub(new r(1)),N=0;;N++){var $=b.k?b.k(N):new r(k.generate(this.n.byteLength()));if($=this._truncateToN($,!0),!($.cmpn(1)<=0||$.cmp(P)>=0)){var j=this.g.mul($);if(!j.isInfinity()){var G=j.getX(),U=G.umod(this.n);if(U.cmpn(0)!==0){var L=$.invm(this.n).mul(U.mul(h.getPrivate()).iadd(f));if(L=L.umod(this.n),L.cmpn(0)!==0){var V=(j.getY().isOdd()?1:0)|(G.cmp(U)!==0?2:0);return b.canonical&&L.cmp(this.nh)>0&&(L=this.n.sub(L),V^=1),new o({r:U,s:L,recoveryParam:V})}}}}}},l.prototype.verify=function(f,h,m,b){f=this._truncateToN(new r(f,16)),m=this.keyFromPublic(m,b),h=new o(h,"hex");var v=h.r,C=h.s;if(v.cmpn(1)<0||v.cmp(this.n)>=0||C.cmpn(1)<0||C.cmp(this.n)>=0)return!1;var R=C.invm(this.n),k=R.mul(f).umod(this.n),P=R.mul(v).umod(this.n),N;return this.curve._maxwellTrick?(N=this.g.jmulAdd(k,m.getPublic(),P),N.isInfinity()?!1:N.eqXToP(v)):(N=this.g.mulAdd(k,m.getPublic(),P),N.isInfinity()?!1:N.getX().umod(this.n).cmp(v)===0)},l.prototype.recoverPubKey=function(u,f,h,m){s((3&h)===h,"The recovery param is more than two bits"),f=new o(f,m);var b=this.n,v=new r(u),C=f.r,R=f.s,k=h&1,P=h>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&P)throw new Error("Unable to find sencond key candinate");P?C=this.curve.pointFromX(C.add(this.curve.n),k):C=this.curve.pointFromX(C,k);var N=f.r.invm(b),$=b.sub(v).mul(N).umod(b),j=R.mul(N).umod(b);return this.g.mulAdd($,C,j)},l.prototype.getKeyRecoveryParam=function(u,f,h,m){if(f=new o(f,m),f.recoveryParam!==null)return f.recoveryParam;for(var b=0;b<4;b++){var v;try{v=this.recoverPubKey(u,f,b)}catch{continue}if(v.eq(h))return b}throw new Error("Unable to find valid recovery factor")},aL}var oL,Yce;function $Fe(){if(Yce)return oL;Yce=1;var r=lu(),e=r.assert,t=r.parseBytes,n=r.cachedProperty;function i(s,a){this.eddsa=s,this._secret=t(a.secret),s.isPoint(a.pub)?this._pub=a.pub:this._pubBytes=t(a.pub)}return i.fromPublic=function(a,o){return o instanceof i?o:new i(a,{pub:o})},i.fromSecret=function(a,o){return o instanceof i?o:new i(a,{secret:o})},i.prototype.secret=function(){return this._secret},n(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),n(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),n(i,"privBytes",function(){var a=this.eddsa,o=this.hash(),l=a.encodingLength-1,u=o.slice(0,a.encodingLength);return u[0]&=248,u[l]&=127,u[l]|=64,u}),n(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),n(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),n(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(a){return e(this._secret,"KeyPair can only verify"),this.eddsa.sign(a,this)},i.prototype.verify=function(a,o){return this.eddsa.verify(a,o,this)},i.prototype.getSecret=function(a){return e(this._secret,"KeyPair is public only"),r.encode(this.secret(),a)},i.prototype.getPublic=function(a){return r.encode(this.pubBytes(),a)},oL=i,oL}var cL,Qce;function BFe(){if(Qce)return cL;Qce=1;var r=Aa(),e=lu(),t=e.assert,n=e.cachedProperty,i=e.parseBytes;function s(a,o){this.eddsa=a,typeof o!="object"&&(o=i(o)),Array.isArray(o)&&(o={R:o.slice(0,a.encodingLength),S:o.slice(a.encodingLength)}),t(o.R&&o.S,"Signature without R or S"),a.isPoint(o.R)&&(this._R=o.R),o.S instanceof r&&(this._S=o.S),this._Rencoded=Array.isArray(o.R)?o.R:o.Rencoded,this._Sencoded=Array.isArray(o.S)?o.S:o.Sencoded}return n(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),n(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),n(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),n(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return e.encode(this.toBytes(),"hex").toUpperCase()},cL=s,cL}var lL,Xce;function LFe(){if(Xce)return lL;Xce=1;var r=eL(),e=rL(),t=lu(),n=t.assert,i=t.parseBytes,s=$Fe(),a=BFe();function o(l){if(n(l==="ed25519","only tested with ed25519 so far"),!(this instanceof o))return new o(l);l=e[l].curve,this.curve=l,this.g=l.g,this.g.precompute(l.n.bitLength()+1),this.pointClass=l.point().constructor,this.encodingLength=Math.ceil(l.n.bitLength()/8),this.hash=r.sha512}return lL=o,o.prototype.sign=function(u,f){u=i(u);var h=this.keyFromSecret(f),m=this.hashInt(h.messagePrefix(),u),b=this.g.mul(m),v=this.encodePoint(b),C=this.hashInt(v,h.pubBytes(),u).mul(h.priv()),R=m.add(C).umod(this.curve.n);return this.makeSignature({R:b,S:R,Rencoded:v})},o.prototype.verify=function(u,f,h){u=i(u),f=this.makeSignature(f);var m=this.keyFromPublic(h),b=this.hashInt(f.Rencoded(),m.pubBytes(),u),v=this.g.mul(f.S()),C=f.R().add(m.pub().mul(b));return C.eq(v)},o.prototype.hashInt=function(){for(var u=this.hash(),f=0;f"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof s);return e(s,a,o)}),i.alloc||(i.alloc=function(s,a,o){if(typeof s!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof s);if(s<0||s>=2*(1<<30))throw new RangeError('The value "'+s+'" is invalid for option "size"');var l=e(s);return!a||a.length===0?l.fill(0):typeof o=="string"?l.fill(a,o):l.fill(a),l}),!t.kStringMaxLength)try{t.kStringMaxLength=vt.binding("buffer").kStringMaxLength}catch{}return t.constants||(t.constants={MAX_LENGTH:t.kMaxLength},t.kStringMaxLength&&(t.constants.MAX_STRING_LENGTH=t.kStringMaxLength)),pL=t,pL}var gL={},rle;function bL(){if(rle)return gL;rle=1;const r=an();function e(n){this._reporterState={obj:null,path:[],options:n||{},errors:[]}}gL.Reporter=e,e.prototype.isError=function(i){return i instanceof t},e.prototype.save=function(){const i=this._reporterState;return{obj:i.obj,pathLen:i.path.length}},e.prototype.restore=function(i){const s=this._reporterState;s.obj=i.obj,s.path=s.path.slice(0,i.pathLen)},e.prototype.enterKey=function(i){return this._reporterState.path.push(i)},e.prototype.exitKey=function(i){const s=this._reporterState;s.path=s.path.slice(0,i-1)},e.prototype.leaveKey=function(i,s,a){const o=this._reporterState;this.exitKey(i),o.obj!==null&&(o.obj[s]=a)},e.prototype.path=function(){return this._reporterState.path.join("/")},e.prototype.enterObject=function(){const i=this._reporterState,s=i.obj;return i.obj={},s},e.prototype.leaveObject=function(i){const s=this._reporterState,a=s.obj;return s.obj=i,a},e.prototype.error=function(i){let s;const a=this._reporterState,o=i instanceof t;if(o?s=i:s=new t(a.path.map(function(l){return"["+JSON.stringify(l)+"]"}).join(""),i.message||i,i.stack),!a.options.partial)throw s;return o||a.errors.push(s),s},e.prototype.wrapResult=function(i){const s=this._reporterState;return s.options.partial?{result:this.isError(i)?null:i,errors:s.errors}:i};function t(n,i){this.path=n,this.rethrow(i)}return r(t,Error),t.prototype.rethrow=function(i){if(this.message=i+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,t),!this.stack)try{throw new Error(this.message)}catch(s){this.stack=s.stack}return this},gL}var UI={},nle;function tx(){if(nle)return UI;nle=1;const r=an(),e=bL().Reporter,t=mL().Buffer;function n(s,a){if(e.call(this,a),!t.isBuffer(s)){this.error("Input not Buffer");return}this.base=s,this.offset=0,this.length=s.length}r(n,e),UI.DecoderBuffer=n,n.isDecoderBuffer=function(a){return a instanceof n?!0:typeof a=="object"&&t.isBuffer(a.base)&&a.constructor.name==="DecoderBuffer"&&typeof a.offset=="number"&&typeof a.length=="number"&&typeof a.save=="function"&&typeof a.restore=="function"&&typeof a.isEmpty=="function"&&typeof a.readUInt8=="function"&&typeof a.skip=="function"&&typeof a.raw=="function"},n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(a){const o=new n(this.base);return o.offset=a.offset,o.length=this.offset,this.offset=a.offset,e.prototype.restore.call(this,a.reporter),o},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(a){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(a||"DecoderBuffer overrun")},n.prototype.skip=function(a,o){if(!(this.offset+a<=this.length))return this.error(o||"DecoderBuffer overrun");const l=new n(this.base);return l._reporterState=this._reporterState,l.offset=this.offset,l.length=this.offset+a,this.offset+=a,l},n.prototype.raw=function(a){return this.base.slice(a?a.offset:this.offset,this.length)};function i(s,a){if(Array.isArray(s))this.length=0,this.value=s.map(function(o){return i.isEncoderBuffer(o)||(o=new i(o,a)),this.length+=o.length,o},this);else if(typeof s=="number"){if(!(0<=s&&s<=255))return a.error("non-byte EncoderBuffer value");this.value=s,this.length=1}else if(typeof s=="string")this.value=s,this.length=t.byteLength(s);else if(t.isBuffer(s))this.value=s,this.length=s.length;else return a.error("Unsupported type: "+typeof s)}return UI.EncoderBuffer=i,i.isEncoderBuffer=function(a){return a instanceof i?!0:typeof a=="object"&&a.constructor.name==="EncoderBuffer"&&typeof a.length=="number"&&typeof a.join=="function"},i.prototype.join=function(a,o){return a||(a=t.alloc(this.length)),o||(o=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(l){l.join(a,o),o+=l.length}):(typeof this.value=="number"?a[o]=this.value:typeof this.value=="string"?a.write(this.value,o):t.isBuffer(this.value)&&this.value.copy(a,o),o+=this.length)),a},UI}var vL,ile;function wL(){if(ile)return vL;ile=1;const r=bL().Reporter,e=tx().EncoderBuffer,t=tx().DecoderBuffer,n=ou(),i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i),a=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function o(u,f,h){const m={};this._baseState=m,m.name=h,m.enc=u,m.parent=f||null,m.children=null,m.tag=null,m.args=null,m.reverseArgs=null,m.choice=null,m.optional=!1,m.any=!1,m.obj=!1,m.use=null,m.useDecoder=null,m.key=null,m.default=null,m.explicit=null,m.implicit=null,m.contains=null,m.parent||(m.children=[],this._wrap())}vL=o;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return o.prototype.clone=function(){const f=this._baseState,h={};l.forEach(function(b){h[b]=f[b]});const m=new this.constructor(h.parent);return m._baseState=h,m},o.prototype._wrap=function(){const f=this._baseState;s.forEach(function(h){this[h]=function(){const b=new this.constructor(this);return f.children.push(b),b[h].apply(b,arguments)}},this)},o.prototype._init=function(f){const h=this._baseState;n(h.parent===null),f.call(this),h.children=h.children.filter(function(m){return m._baseState.parent===this},this),n.equal(h.children.length,1,"Root node can have only one child")},o.prototype._useArgs=function(f){const h=this._baseState,m=f.filter(function(b){return b instanceof this.constructor},this);f=f.filter(function(b){return!(b instanceof this.constructor)},this),m.length!==0&&(n(h.children===null),h.children=m,m.forEach(function(b){b._baseState.parent=this},this)),f.length!==0&&(n(h.args===null),h.args=f,h.reverseArgs=f.map(function(b){if(typeof b!="object"||b.constructor!==Object)return b;const v={};return Object.keys(b).forEach(function(C){C==(C|0)&&(C|=0);const R=b[C];v[R]=C}),v}))},a.forEach(function(u){o.prototype[u]=function(){const h=this._baseState;throw new Error(u+" not implemented for encoding: "+h.enc)}}),i.forEach(function(u){o.prototype[u]=function(){const h=this._baseState,m=Array.prototype.slice.call(arguments);return n(h.tag===null),h.tag=u,this._useArgs(m),this}}),o.prototype.use=function(f){n(f);const h=this._baseState;return n(h.use===null),h.use=f,this},o.prototype.optional=function(){const f=this._baseState;return f.optional=!0,this},o.prototype.def=function(f){const h=this._baseState;return n(h.default===null),h.default=f,h.optional=!0,this},o.prototype.explicit=function(f){const h=this._baseState;return n(h.explicit===null&&h.implicit===null),h.explicit=f,this},o.prototype.implicit=function(f){const h=this._baseState;return n(h.explicit===null&&h.implicit===null),h.implicit=f,this},o.prototype.obj=function(){const f=this._baseState,h=Array.prototype.slice.call(arguments);return f.obj=!0,h.length!==0&&this._useArgs(h),this},o.prototype.key=function(f){const h=this._baseState;return n(h.key===null),h.key=f,this},o.prototype.any=function(){const f=this._baseState;return f.any=!0,this},o.prototype.choice=function(f){const h=this._baseState;return n(h.choice===null),h.choice=f,this._useArgs(Object.keys(f).map(function(m){return f[m]})),this},o.prototype.contains=function(f){const h=this._baseState;return n(h.use===null),h.contains=f,this},o.prototype._decode=function(f,h){const m=this._baseState;if(m.parent===null)return f.wrapResult(m.children[0]._decode(f,h));let b=m.default,v=!0,C=null;if(m.key!==null&&(C=f.enterKey(m.key)),m.optional){let k=null;if(m.explicit!==null?k=m.explicit:m.implicit!==null?k=m.implicit:m.tag!==null&&(k=m.tag),k===null&&!m.any){const P=f.save();try{m.choice===null?this._decodeGeneric(m.tag,f,h):this._decodeChoice(f,h),v=!0}catch{v=!1}f.restore(P)}else if(v=this._peekTag(f,k,m.any),f.isError(v))return v}let R;if(m.obj&&v&&(R=f.enterObject()),v){if(m.explicit!==null){const P=this._decodeTag(f,m.explicit);if(f.isError(P))return P;f=P}const k=f.offset;if(m.use===null&&m.choice===null){let P;m.any&&(P=f.save());const N=this._decodeTag(f,m.implicit!==null?m.implicit:m.tag,m.any);if(f.isError(N))return N;m.any?b=f.raw(P):f=N}if(h&&h.track&&m.tag!==null&&h.track(f.path(),k,f.length,"tagged"),h&&h.track&&m.tag!==null&&h.track(f.path(),f.offset,f.length,"content"),m.any||(m.choice===null?b=this._decodeGeneric(m.tag,f,h):b=this._decodeChoice(f,h)),f.isError(b))return b;if(!m.any&&m.choice===null&&m.children!==null&&m.children.forEach(function(N){N._decode(f,h)}),m.contains&&(m.tag==="octstr"||m.tag==="bitstr")){const P=new t(b);b=this._getUse(m.contains,f._reporterState.obj)._decode(P,h)}}return m.obj&&v&&(b=f.leaveObject(R)),m.key!==null&&(b!==null||v===!0)?f.leaveKey(C,m.key,b):C!==null&&f.exitKey(C),b},o.prototype._decodeGeneric=function(f,h,m){const b=this._baseState;return f==="seq"||f==="set"?null:f==="seqof"||f==="setof"?this._decodeList(h,f,b.args[0],m):/str$/.test(f)?this._decodeStr(h,f,m):f==="objid"&&b.args?this._decodeObjid(h,b.args[0],b.args[1],m):f==="objid"?this._decodeObjid(h,null,null,m):f==="gentime"||f==="utctime"?this._decodeTime(h,f,m):f==="null_"?this._decodeNull(h,m):f==="bool"?this._decodeBool(h,m):f==="objDesc"?this._decodeStr(h,f,m):f==="int"||f==="enum"?this._decodeInt(h,b.args&&b.args[0],m):b.use!==null?this._getUse(b.use,h._reporterState.obj)._decode(h,m):h.error("unknown tag: "+f)},o.prototype._getUse=function(f,h){const m=this._baseState;return m.useDecoder=this._use(f,h),n(m.useDecoder._baseState.parent===null),m.useDecoder=m.useDecoder._baseState.children[0],m.implicit!==m.useDecoder._baseState.implicit&&(m.useDecoder=m.useDecoder.clone(),m.useDecoder._baseState.implicit=m.implicit),m.useDecoder},o.prototype._decodeChoice=function(f,h){const m=this._baseState;let b=null,v=!1;return Object.keys(m.choice).some(function(C){const R=f.save(),k=m.choice[C];try{const P=k._decode(f,h);if(f.isError(P))return!1;b={type:C,value:P},v=!0}catch{return f.restore(R),!1}return!0},this),v?b:f.error("Choice not matched")},o.prototype._createEncoderBuffer=function(f){return new e(f,this.reporter)},o.prototype._encode=function(f,h,m){const b=this._baseState;if(b.default!==null&&b.default===f)return;const v=this._encodeValue(f,h,m);if(v!==void 0&&!this._skipDefault(v,h,m))return v},o.prototype._encodeValue=function(f,h,m){const b=this._baseState;if(b.parent===null)return b.children[0]._encode(f,h||new r);let v=null;if(this.reporter=h,b.optional&&f===void 0)if(b.default!==null)f=b.default;else return;let C=null,R=!1;if(b.any)v=this._createEncoderBuffer(f);else if(b.choice)v=this._encodeChoice(f,h);else if(b.contains)C=this._getUse(b.contains,m)._encode(f,h),R=!0;else if(b.children)C=b.children.map(function(k){if(k._baseState.tag==="null_")return k._encode(null,h,f);if(k._baseState.key===null)return h.error("Child should have a key");const P=h.enterKey(k._baseState.key);if(typeof f!="object")return h.error("Child expected, but input is not object");const N=k._encode(f[k._baseState.key],h,f);return h.leaveKey(P),N},this).filter(function(k){return k}),C=this._createEncoderBuffer(C);else if(b.tag==="seqof"||b.tag==="setof"){if(!(b.args&&b.args.length===1))return h.error("Too many args for : "+b.tag);if(!Array.isArray(f))return h.error("seqof/setof, but data is not Array");const k=this.clone();k._baseState.implicit=null,C=this._createEncoderBuffer(f.map(function(P){const N=this._baseState;return this._getUse(N.args[0],f)._encode(P,h)},k))}else b.use!==null?v=this._getUse(b.use,m)._encode(f,h):(C=this._encodePrimitive(b.tag,f),R=!0);if(!b.any&&b.choice===null){const k=b.implicit!==null?b.implicit:b.tag,P=b.implicit===null?"universal":"context";k===null?b.use===null&&h.error("Tag could be omitted only for .use()"):b.use===null&&(v=this._encodeComposite(k,R,P,C))}return b.explicit!==null&&(v=this._encodeComposite(b.explicit,!1,"context",v)),v},o.prototype._encodeChoice=function(f,h){const m=this._baseState,b=m.choice[f.type];return b||n(!1,f.type+" not found in "+JSON.stringify(Object.keys(m.choice))),b._encode(f.value,h)},o.prototype._encodePrimitive=function(f,h){const m=this._baseState;if(/str$/.test(f))return this._encodeStr(h,f);if(f==="objid"&&m.args)return this._encodeObjid(h,m.reverseArgs[0],m.args[1]);if(f==="objid")return this._encodeObjid(h,null,null);if(f==="gentime"||f==="utctime")return this._encodeTime(h,f);if(f==="null_")return this._encodeNull();if(f==="int"||f==="enum")return this._encodeInt(h,m.args&&m.reverseArgs[0]);if(f==="bool")return this._encodeBool(h);if(f==="objDesc")return this._encodeStr(h,f);throw new Error("Unsupported tag: "+f)},o.prototype._isNumstr=function(f){return/^[0-9 ]*$/.test(f)},o.prototype._isPrintstr=function(f){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(f)},vL}var yL={},sle;function xL(){return sle||(sle=1,function(r){function e(t){const n={};return Object.keys(t).forEach(function(i){(i|0)==i&&(i=i|0);const s=t[i];n[s]=i}),n}r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=e(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=e(r.tag)}(yL)),yL}var _L,ale;function ole(){if(ale)return _L;ale=1;const r=an(),e=mL().Buffer,t=wL(),n=xL();function i(l){this.enc="der",this.name=l.name,this.entity=l,this.tree=new s,this.tree._init(l.body)}_L=i,i.prototype.encode=function(u,f){return this.tree._encode(u,f).join()};function s(l){t.call(this,"der",l)}r(s,t),s.prototype._encodeComposite=function(u,f,h,m){const b=o(u,f,h,this.reporter);if(m.length<128){const R=e.alloc(2);return R[0]=b,R[1]=m.length,this._createEncoderBuffer([R,m])}let v=1;for(let R=m.length;R>=256;R>>=8)v++;const C=e.alloc(2+v);C[0]=b,C[1]=128|v;for(let R=1+v,k=m.length;k>0;R--,k>>=8)C[R]=k&255;return this._createEncoderBuffer([C,m])},s.prototype._encodeStr=function(u,f){if(f==="bitstr")return this._createEncoderBuffer([u.unused|0,u.data]);if(f==="bmpstr"){const h=e.alloc(u.length*2);for(let m=0;m=40)return this.reporter.error("Second objid identifier OOB");u.splice(0,2,u[0]*40+u[1])}let m=0;for(let C=0;C=128;R>>=7)m++}const b=e.alloc(m);let v=b.length-1;for(let C=u.length-1;C>=0;C--){let R=u[C];for(b[v--]=R&127;(R>>=7)>0;)b[v--]=128|R&127}return this._createEncoderBuffer(b)};function a(l){return l<10?"0"+l:l}s.prototype._encodeTime=function(u,f){let h;const m=new Date(u);return f==="gentime"?h=[a(m.getUTCFullYear()),a(m.getUTCMonth()+1),a(m.getUTCDate()),a(m.getUTCHours()),a(m.getUTCMinutes()),a(m.getUTCSeconds()),"Z"].join(""):f==="utctime"?h=[a(m.getUTCFullYear()%100),a(m.getUTCMonth()+1),a(m.getUTCDate()),a(m.getUTCHours()),a(m.getUTCMinutes()),a(m.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+f+" time is not supported yet"),this._encodeStr(h,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(u,f){if(typeof u=="string"){if(!f)return this.reporter.error("String int or enum given, but no values map");if(!f.hasOwnProperty(u))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(u));u=f[u]}if(typeof u!="number"&&!e.isBuffer(u)){const b=u.toArray();!u.sign&&b[0]&128&&b.unshift(0),u=e.from(b)}if(e.isBuffer(u)){let b=u.length;u.length===0&&b++;const v=e.alloc(b);return u.copy(v),u.length===0&&(v[0]=0),this._createEncoderBuffer(v)}if(u<128)return this._createEncoderBuffer(u);if(u<256)return this._createEncoderBuffer([0,u]);let h=1;for(let b=u;b>=256;b>>=8)h++;const m=new Array(h);for(let b=m.length-1;b>=0;b--)m[b]=u&255,u>>=8;return m[0]&128&&m.unshift(0),this._createEncoderBuffer(e.from(m))},s.prototype._encodeBool=function(u){return this._createEncoderBuffer(u?255:0)},s.prototype._use=function(u,f){return typeof u=="function"&&(u=u(f)),u._getEncoder("der").tree},s.prototype._skipDefault=function(u,f,h){const m=this._baseState;let b;if(m.default===null)return!1;const v=u.join();if(m.defaultBuffer===void 0&&(m.defaultBuffer=this._encodeValue(m.default,f,h).join()),v.length!==m.defaultBuffer.length)return!1;for(b=0;b=31?h.error("Multi-octet tag encoding unsupported"):(u||(m|=32),m|=n.tagClassByName[f||"universal"]<<6,m)}return _L}var EL,cle;function UFe(){if(cle)return EL;cle=1;const r=an(),e=ole();function t(n){e.call(this,n),this.enc="pem"}return r(t,e),EL=t,t.prototype.encode=function(i,s){const o=e.prototype.encode.call(this,i).toString("base64"),l=["-----BEGIN "+s.label+"-----"];for(let u=0;u>6],b=(h&32)===0;if((h&31)===31){let C=h;for(h=0;(C&128)===128;){if(C=u.readUInt8(f),u.isError(C))return C;h<<=7,h|=C&127}}else h&=31;const v=i.tag[h];return{cls:m,primitive:b,tag:h,tagStr:v}}function l(u,f,h){let m=u.readUInt8(h);if(u.isError(m))return m;if(!f&&m===128)return null;if(!(m&128))return m;const b=m&127;if(b>4)return u.error("length octect is too long");m=0;for(let v=0;v0&&N.ishrn($),N}function v(k,P){k=b(k,P),k=k.mod(P);var N=r.from(k.toArray());if(N.length=0)throw new Error("invalid sig")}return PL=s,PL}var OL,Tle;function JFe(){if(Tle)return OL;Tle=1;var r=cn().Buffer,e=Y8(),t=Kae(),n=an(),i=KFe(),s=ZFe(),a=boe;Object.keys(a).forEach(function(h){a[h].id=r.from(a[h].id,"hex"),a[h.toLowerCase()]=a[h]});function o(h){t.Writable.call(this);var m=a[h];if(!m)throw new Error("Unknown message digest");this._hashType=m.hash,this._hash=e(m.hash),this._tag=m.id,this._signType=m.sign}n(o,t.Writable),o.prototype._write=function(m,b,v){this._hash.update(m),v()},o.prototype.update=function(m,b){return this._hash.update(typeof m=="string"?r.from(m,b):m),this},o.prototype.sign=function(m,b){this.end();var v=this._hash.digest(),C=i(v,m,this._hashType,this._signType,this._tag);return b?C.toString(b):C};function l(h){t.Writable.call(this);var m=a[h];if(!m)throw new Error("Unknown message digest");this._hash=e(m.hash),this._tag=m.id,this._signType=m.sign}n(l,t.Writable),l.prototype._write=function(m,b,v){this._hash.update(m),v()},l.prototype.update=function(m,b){return this._hash.update(typeof m=="string"?r.from(m,b):m),this},l.prototype.verify=function(m,b,v){var C=typeof b=="string"?r.from(b,v):b;this.end();var R=this._hash.digest();return s(C,R,m,this._signType,this._tag)};function u(h){return new o(h)}function f(h){return new l(h)}return OL={Sign:u,Verify:f,createSign:u,createVerify:f},OL}var NL,kle;function YFe(){if(kle)return NL;kle=1;var r=uL(),e=Aa();NL=function(a){return new n(a)};var t={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};t.p224=t.secp224r1,t.p256=t.secp256r1=t.prime256v1,t.p192=t.secp192r1=t.prime192v1,t.p384=t.secp384r1,t.p521=t.secp521r1;function n(s){this.curveType=t[s],this.curveType||(this.curveType={name:s}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(s,a){return this.keys=this.curve.genKeyPair(),this.getPublicKey(s,a)},n.prototype.computeSecret=function(s,a,o){a=a||"utf8",It.isBuffer(s)||(s=new It(s,a));var l=this.curve.keyFromPublic(s).getPublic(),u=l.mul(this.keys.getPrivate()).getX();return i(u,o,this.curveType.byteLength)},n.prototype.getPublicKey=function(s,a){var o=this.keys.getPublic(a==="compressed",!0);return a==="hybrid"&&(o[o.length-1]%2?o[0]=7:o[0]=6),i(o,s)},n.prototype.getPrivateKey=function(s){return i(this.keys.getPrivate(),s)},n.prototype.setPublicKey=function(s,a){return a=a||"utf8",It.isBuffer(s)||(s=new It(s,a)),this.keys._importPublic(s),this},n.prototype.setPrivateKey=function(s,a){a=a||"utf8",It.isBuffer(s)||(s=new It(s,a));var o=new e(s);return o=o.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(o),this};function i(s,a,o){Array.isArray(s)||(s=s.toArray());var l=new It(s);if(o&&l.length=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return C?o(P,k):a(P,k)};function u(m,b){var v=m.modulus.byteLength(),C=b.length,R=t("sha1").update(l.alloc(0)).digest(),k=R.length,P=2*k;if(C>v-P-2)throw new Error("message too long");var N=l.alloc(v-C-P-2),$=v-k-1,j=e(k),G=i(l.concat([R,N,l.alloc(1,1),b],$),n(j,$)),U=i(j,n(G,k));return new s(l.concat([l.alloc(1),U,G],v))}function f(m,b,v){var C=b.length,R=m.modulus.byteLength();if(C>R-11)throw new Error("message too long");var k;return v?k=l.alloc(R-C-3,255):k=h(R-C-3),new s(l.concat([l.from([0,v?1:2]),k,l.alloc(1),b],R))}function h(m){for(var b=l.allocUnsafe(m),v=0,C=e(m*2),R=0,k;vk||new n(b).cmp(R.modulus)>=0)throw new Error("decryption error");var P;v?P=a(new n(b),R):P=i(b,R);var N=o.alloc(k-P.length);if(P=o.concat([N,P],k),C===4)return l(R,P);if(C===1)return u(R,P,v);if(C===3)return P;throw new Error("unknown padding")};function l(h,m){var b=h.modulus.byteLength(),v=s("sha1").update(o.alloc(0)).digest(),C=v.length;if(m[0]!==0)throw new Error("decryption error");var R=m.slice(1,C+1),k=m.slice(C+1),P=t(R,e(k,C)),N=t(k,e(P,b-C-1));if(f(v,N.slice(0,C)))throw new Error("decryption error");for(var $=C;N[$]===0;)$++;if(N[$++]!==1)throw new Error("decryption error");return N.slice($)}function u(h,m,b){for(var v=m.slice(0,2),C=2,R=0;m[C++]!==0;)if(C>=m.length){R++;break}var k=m.slice(2,C-1);if((v.toString("hex")!=="0002"&&!b||v.toString("hex")!=="0001"&&b)&&R++,k.length<8&&R++,R)throw new Error("decryption error");return m.slice(C)}function f(h,m){h=o.from(h),m=o.from(m);var b=0,v=h.length;h.length!==m.length&&(b++,v=Math.min(h.length,m.length));for(var C=-1;++Ca||m<0)throw new TypeError("offset must be a uint32");if(m>i||m>b)throw new RangeError("offset out of range")}function l(m,b,v){if(typeof m!="number"||m!==m)throw new TypeError("size must be a number");if(m>a||m<0)throw new TypeError("size must be a uint32");if(m+b>v||m>i)throw new RangeError("buffer too small")}s&&s.getRandomValues||!vt.browser?(ny.randomFill=u,ny.randomFillSync=h):(ny.randomFill=r,ny.randomFillSync=r);function u(m,b,v,C){if(!n.isBuffer(m)&&!(m instanceof ut.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof b=="function")C=b,b=0,v=m.length;else if(typeof v=="function")C=v,v=m.length-b;else if(typeof C!="function")throw new TypeError('"cb" argument must be a function');return o(b,m.length),l(v,b,m.length),f(m,b,v,C)}function f(m,b,v,C){if(vt.browser){var R=m.buffer,k=new Uint8Array(R,b,v);if(s.getRandomValues(k),C){vt.nextTick(function(){C(null,m)});return}return m}if(C){t(v,function(N,$){if(N)return C(N);$.copy(m,b),C(null,m)});return}var P=t(v);return P.copy(m,b),m}function h(m,b,v){if(typeof b>"u"&&(b=0),!n.isBuffer(m)&&!(m instanceof ut.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return o(b,m.length),v===void 0&&(v=m.length-b),l(v,b,m.length),f(m,b,v)}return ny}var Fle;function jL(){if(Fle)return en;Fle=1,en.randomBytes=en.rng=en.pseudoRandomBytes=en.prng=ey(),en.createHash=en.Hash=Y8(),en.createHmac=en.Hmac=goe();var r=tFe(),e=Object.keys(r),t=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);en.getHashes=function(){return t};var n=koe();en.pbkdf2=n.pbkdf2,en.pbkdf2Sync=n.pbkdf2Sync;var i=bFe();en.Cipher=i.Cipher,en.createCipher=i.createCipher,en.Cipheriv=i.Cipheriv,en.createCipheriv=i.createCipheriv,en.Decipher=i.Decipher,en.createDecipher=i.createDecipher,en.Decipheriv=i.Decipheriv,en.createDecipheriv=i.createDecipheriv,en.getCiphers=i.getCiphers,en.listCiphers=i.listCiphers;var s=yFe();en.DiffieHellmanGroup=s.DiffieHellmanGroup,en.createDiffieHellmanGroup=s.createDiffieHellmanGroup,en.getDiffieHellman=s.getDiffieHellman,en.createDiffieHellman=s.createDiffieHellman,en.DiffieHellman=s.DiffieHellman;var a=JFe();en.createSign=a.createSign,en.Sign=a.Sign,en.createVerify=a.createVerify,en.Verify=a.Verify,en.createECDH=YFe();var o=eje();en.publicEncrypt=o.publicEncrypt,en.privateEncrypt=o.privateEncrypt,en.publicDecrypt=o.publicDecrypt,en.privateDecrypt=o.privateDecrypt;var l=tje();return en.randomFill=l.randomFill,en.randomFillSync=l.randomFillSync,en.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` +`))},en.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},en}Object.defineProperty(yI,"__esModule",{value:!0}),yI.NodeRandomSource=void 0;const rje=il;class nje{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof EUe<"u"){const e=jL();e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let i=0;i256)throw new Error("randomString charset is too long");let m="";const b=f.length,v=256-256%b;for(;u>0;){const C=i(Math.ceil(u*256/v),h);for(let R=0;R0;R++){const k=C[R];k0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],u--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=s(this._temp,this._state,l,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=l[f++],u--;return this},o.prototype.finish=function(l){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,h=u/536870912|0,m=u<<3,b=u%64<56?64:128;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},o.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},o.prototype.cleanSavedState=function(l){t.wipe(l.state),l.buffer&&t.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},o}();r.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(o,l,u,f,h){for(;h>=64;){for(var m=l[0],b=l[1],v=l[2],C=l[3],R=l[4],k=l[5],P=l[6],N=l[7],$=0;$<16;$++){var j=f+$*4;o[$]=e.readUint32BE(u,j)}for(var $=16;$<64;$++){var G=o[$-2],U=(G>>>17|G<<15)^(G>>>19|G<<13)^G>>>10;G=o[$-15];var L=(G>>>7|G<<25)^(G>>>18|G<<14)^G>>>3;o[$]=(U+o[$-7]|0)+(L+o[$-16]|0)}for(var $=0;$<64;$++){var U=(((R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7))+(R&k^~R&P)|0)+(N+(i[$]+o[$]|0)|0)|0,L=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&b^m&v^b&v)|0;N=P,P=k,k=R,R=C+U|0,C=v,v=b,b=m,m=U+L|0}l[0]+=m,l[1]+=b,l[2]+=v,l[3]+=C,l[4]+=R,l[5]+=k,l[6]+=P,l[7]+=N,f+=64,h-=64}return f}function a(o){var l=new n;l.update(o);var u=l.digest();return l.clean(),u}r.hash=a})(W1);var rx={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sharedKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.scalarMultBase=r.scalarMult=r.SHARED_KEY_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;const e=Pd,t=il;r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=32,r.SHARED_KEY_LENGTH=32;function n($){const j=new Float64Array(16);if($)for(let G=0;G<$.length;G++)j[G]=$[G];return j}const i=new Uint8Array(32);i[0]=9;const s=n([56129,1]);function a($){let j=1;for(let G=0;G<16;G++){let U=$[G]+j+65535;j=Math.floor(U/65536),$[G]=U-j*65536}$[0]+=j-1+37*(j-1)}function o($,j,G){const U=~(G-1);for(let L=0;L<16;L++){const V=U&($[L]^j[L]);$[L]^=V,j[L]^=V}}function l($,j){const G=n(),U=n();for(let L=0;L<16;L++)U[L]=j[L];a(U),a(U),a(U);for(let L=0;L<2;L++){G[0]=U[0]-65517;for(let te=1;te<15;te++)G[te]=U[te]-65535-(G[te-1]>>16&1),G[te-1]&=65535;G[15]=U[15]-32767-(G[14]>>16&1);const V=G[15]>>16&1;G[14]&=65535,o(U,G,1-V)}for(let L=0;L<16;L++)$[2*L]=U[L]&255,$[2*L+1]=U[L]>>8}function u($,j){for(let G=0;G<16;G++)$[G]=j[2*G]+(j[2*G+1]<<8);$[15]&=32767}function f($,j,G){for(let U=0;U<16;U++)$[U]=j[U]+G[U]}function h($,j,G){for(let U=0;U<16;U++)$[U]=j[U]-G[U]}function m($,j,G){let U,L,V=0,te=0,D=0,x=0,y=0,p=0,g=0,_=0,S=0,T=0,I=0,E=0,M=0,A=0,B=0,ae=0,W=0,Z=0,K=0,ee=0,re=0,H=0,F=0,q=0,fe=0,pe=0,Ee=0,Me=0,Oe=0,je=0,Re=0,Qe=G[0],Ne=G[1],Je=G[2],Xe=G[3],Le=G[4],Ge=G[5],et=G[6],Be=G[7],Ke=G[8],pt=G[9],ne=G[10],Y=G[11],X=G[12],ue=G[13],we=G[14],Ce=G[15];U=j[0],V+=U*Qe,te+=U*Ne,D+=U*Je,x+=U*Xe,y+=U*Le,p+=U*Ge,g+=U*et,_+=U*Be,S+=U*Ke,T+=U*pt,I+=U*ne,E+=U*Y,M+=U*X,A+=U*ue,B+=U*we,ae+=U*Ce,U=j[1],te+=U*Qe,D+=U*Ne,x+=U*Je,y+=U*Xe,p+=U*Le,g+=U*Ge,_+=U*et,S+=U*Be,T+=U*Ke,I+=U*pt,E+=U*ne,M+=U*Y,A+=U*X,B+=U*ue,ae+=U*we,W+=U*Ce,U=j[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=38*fe,T+=38*pe,I+=38*Ee,E+=38*Me,M+=38*Oe,A+=38*je,B+=38*Re,L=1,U=V+L+65535,L=Math.floor(U/65536),V=U-L*65536,U=te+L+65535,L=Math.floor(U/65536),te=U-L*65536,U=D+L+65535,L=Math.floor(U/65536),D=U-L*65536,U=x+L+65535,L=Math.floor(U/65536),x=U-L*65536,U=y+L+65535,L=Math.floor(U/65536),y=U-L*65536,U=p+L+65535,L=Math.floor(U/65536),p=U-L*65536,U=g+L+65535,L=Math.floor(U/65536),g=U-L*65536,U=_+L+65535,L=Math.floor(U/65536),_=U-L*65536,U=S+L+65535,L=Math.floor(U/65536),S=U-L*65536,U=T+L+65535,L=Math.floor(U/65536),T=U-L*65536,U=I+L+65535,L=Math.floor(U/65536),I=U-L*65536,U=E+L+65535,L=Math.floor(U/65536),E=U-L*65536,U=M+L+65535,L=Math.floor(U/65536),M=U-L*65536,U=A+L+65535,L=Math.floor(U/65536),A=U-L*65536,U=B+L+65535,L=Math.floor(U/65536),B=U-L*65536,U=ae+L+65535,L=Math.floor(U/65536),ae=U-L*65536,V+=L-1+37*(L-1),L=1,U=V+L+65535,L=Math.floor(U/65536),V=U-L*65536,U=te+L+65535,L=Math.floor(U/65536),te=U-L*65536,U=D+L+65535,L=Math.floor(U/65536),D=U-L*65536,U=x+L+65535,L=Math.floor(U/65536),x=U-L*65536,U=y+L+65535,L=Math.floor(U/65536),y=U-L*65536,U=p+L+65535,L=Math.floor(U/65536),p=U-L*65536,U=g+L+65535,L=Math.floor(U/65536),g=U-L*65536,U=_+L+65535,L=Math.floor(U/65536),_=U-L*65536,U=S+L+65535,L=Math.floor(U/65536),S=U-L*65536,U=T+L+65535,L=Math.floor(U/65536),T=U-L*65536,U=I+L+65535,L=Math.floor(U/65536),I=U-L*65536,U=E+L+65535,L=Math.floor(U/65536),E=U-L*65536,U=M+L+65535,L=Math.floor(U/65536),M=U-L*65536,U=A+L+65535,L=Math.floor(U/65536),A=U-L*65536,U=B+L+65535,L=Math.floor(U/65536),B=U-L*65536,U=ae+L+65535,L=Math.floor(U/65536),ae=U-L*65536,V+=L-1+37*(L-1),$[0]=V,$[1]=te,$[2]=D,$[3]=x,$[4]=y,$[5]=p,$[6]=g,$[7]=_,$[8]=S,$[9]=T,$[10]=I,$[11]=E,$[12]=M,$[13]=A,$[14]=B,$[15]=ae}function b($,j){m($,j,j)}function v($,j){const G=n();for(let U=0;U<16;U++)G[U]=j[U];for(let U=253;U>=0;U--)b(G,G),U!==2&&U!==4&&m(G,G,j);for(let U=0;U<16;U++)$[U]=G[U]}function C($,j){const G=new Uint8Array(32),U=new Float64Array(80),L=n(),V=n(),te=n(),D=n(),x=n(),y=n();for(let S=0;S<31;S++)G[S]=$[S];G[31]=$[31]&127|64,G[0]&=248,u(U,j);for(let S=0;S<16;S++)V[S]=U[S];L[0]=D[0]=1;for(let S=254;S>=0;--S){const T=G[S>>>3]>>>(S&7)&1;o(L,V,T),o(te,D,T),f(x,L,te),h(L,L,te),f(te,V,D),h(V,V,D),b(D,x),b(y,L),m(L,te,L),m(te,V,x),f(x,L,te),h(L,L,te),b(V,L),h(te,D,y),m(L,te,s),f(L,L,D),m(te,te,L),m(L,D,y),m(D,V,U),b(V,x),o(L,V,T),o(te,D,T)}for(let S=0;S<16;S++)U[S+16]=L[S],U[S+32]=te[S],U[S+48]=V[S],U[S+64]=D[S];const p=U.subarray(32),g=U.subarray(16);v(p,p),m(g,g,p);const _=new Uint8Array(32);return l(_,g),_}r.scalarMult=C;function R($){return C($,i)}r.scalarMultBase=R;function k($){if($.length!==r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${r.SECRET_KEY_LENGTH} bytes`);const j=new Uint8Array($);return{publicKey:R(j),secretKey:j}}r.generateKeyPairFromSeed=k;function P($){const j=(0,e.randomBytes)(32,$),G=k(j);return(0,t.wipe)(j),G}r.generateKeyPair=P;function N($,j,G=!1){if($.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(j.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const U=C($,j);if(G){let L=0;for(let V=0;Vi+s.length,0));const t=jle(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return zL(t)}function oje(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,$=new Uint8Array(N);k!==P;){for(var j=v[k],G=0,U=N-1;(j!==0||G>>0,$[U]=j%o>>>0,j=j/o>>>0;if(j!==0)throw new Error("Non-zero carry");R=G,k++}for(var L=N-R;L!==N&&$[L]===0;)L++;for(var V=l.repeat(C);L>>0,N=new Uint8Array(P);v[C];){var $=t[v.charCodeAt(C)];if($===255)return;for(var j=0,G=P-1;($!==0||j>>0,N[G]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");k=j,C++}if(v[C]!==" "){for(var U=P-k;U!==P&&N[U]===0;)U++;for(var L=new Uint8Array(R+(P-U)),V=R;U!==P;)L[V++]=N[U++];return L}}}function b(v){var C=m(v);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:b}}var cje=oje,lje=cje;const uje=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},fje=r=>new TextEncoder().encode(r),dje=r=>new TextDecoder().decode(r);class hje{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class pje{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return zle(this,e)}}class mje{constructor(e){this.decoders=e}or(e){return zle(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const zle=(r,e)=>new mje({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class gje{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new hje(e,t,n),this.decoder=new pje(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jI=({name:r,prefix:e,encode:t,decode:n})=>new gje(r,e,t,n),nx=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=lje(t,e);return jI({prefix:r,name:e,encode:n,decode:s=>uje(i(s))})},bje=(r,e,t,n)=>{const i={};for(let f=0;f=8&&(o-=8,a[u++]=255&l>>o)}if(o>=t||255&l<<8-o)throw new SyntaxError("Unexpected end of data");return a},vje=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)a-=t,s+=e[i&o>>a];if(a&&(s+=e[i&o<jI({prefix:e,name:r,encode(i){return vje(i,n,t)},decode(i){return bje(i,n,t,r)}}),wje=jI({prefix:"\0",name:"identity",encode:r=>dje(r),decode:r=>fje(r)}),yje=Object.freeze(Object.defineProperty({__proto__:null,identity:wje},Symbol.toStringTag,{value:"Module"})),xje=Ja({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),_je=Object.freeze(Object.defineProperty({__proto__:null,base2:xje},Symbol.toStringTag,{value:"Module"})),Eje=Ja({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Cje=Object.freeze(Object.defineProperty({__proto__:null,base8:Eje},Symbol.toStringTag,{value:"Module"})),Aje=nx({prefix:"9",name:"base10",alphabet:"0123456789"}),Sje=Object.freeze(Object.defineProperty({__proto__:null,base10:Aje},Symbol.toStringTag,{value:"Module"})),Ije=Ja({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Tje=Ja({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),kje=Object.freeze(Object.defineProperty({__proto__:null,base16:Ije,base16upper:Tje},Symbol.toStringTag,{value:"Module"})),Rje=Ja({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Mje=Ja({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Pje=Ja({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Oje=Ja({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nje=Ja({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Dje=Ja({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),$je=Ja({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Bje=Ja({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Lje=Ja({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Uje=Object.freeze(Object.defineProperty({__proto__:null,base32:Rje,base32hex:Nje,base32hexpad:$je,base32hexpadupper:Bje,base32hexupper:Dje,base32pad:Pje,base32padupper:Oje,base32upper:Mje,base32z:Lje},Symbol.toStringTag,{value:"Module"})),Fje=nx({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),jje=nx({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),zje=Object.freeze(Object.defineProperty({__proto__:null,base36:Fje,base36upper:jje},Symbol.toStringTag,{value:"Module"})),Hje=nx({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),qje=nx({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Wje=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Hje,base58flickr:qje},Symbol.toStringTag,{value:"Module"})),Vje=Ja({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Gje=Ja({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Kje=Ja({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Zje=Ja({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Jje=Object.freeze(Object.defineProperty({__proto__:null,base64:Vje,base64pad:Gje,base64url:Kje,base64urlpad:Zje},Symbol.toStringTag,{value:"Module"})),Hle=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Yje=Hle.reduce((r,e,t)=>(r[t]=e,r),[]),Qje=Hle.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Xje(r){return r.reduce((e,t)=>(e+=Yje[t],e),"")}function eze(r){const e=[];for(const t of r){const n=Qje[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const tze=jI({prefix:"🚀",name:"base256emoji",encode:Xje,decode:eze}),rze=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:tze},Symbol.toStringTag,{value:"Module"}));new TextEncoder,new TextDecoder;const zI={...yje,..._je,...Cje,...Sje,...kje,...Uje,...zje,...Wje,...Jje,...rze};function qle(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const Wle=qle("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),qL=qle("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=jle(r.length);for(let t=0;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oze:typeof navigator<"u"?dze(navigator.userAgent):pze()}function fze(r){return r!==""&&uze.reduce(function(e,t){var n=t[0],i=t[1];if(e)return e;var s=i.exec(r);return!!s&&[n,s]},!1)}function dze(r){var e=fze(r);if(!e)return null;var t=e[0],n=e[1];if(t==="searchbot")return new aze;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length=0;A--)(x=Q[A])&&(m=(d<3?x(m):d>3?x(F,M,m):x(F,M))||m);return d>3&&m&&Object.defineProperty(F,M,m),m},s=function(Q,F){return function(M,b){F(M,b,Q)}},o=function(Q,F){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Q,F)},a=function(Q,F,M,b){function d(m){return m instanceof M?m:new M(function(x){x(m)})}return new(M||(M=Promise))(function(m,x){function A(S){try{R(b.next(S))}catch(E){x(E)}}function I(S){try{R(b.throw(S))}catch(E){x(E)}}function R(S){S.done?m(S.value):d(S.value).then(A,I)}R((b=b.apply(Q,F||[])).next())})},l=function(Q,F){var M={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},b,d,m,x;return x={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function A(R){return function(S){return I([R,S])}}function I(R){if(b)throw new TypeError("Generator is already executing.");for(;M;)try{if(b=1,d&&(m=R[0]&2?d.return:R[0]?d.throw||((m=d.return)&&m.call(d),0):d.next)&&!(m=m.call(d,R[1])).done)return m;switch(d=0,m&&(R=[R[0]&2,m.value]),R[0]){case 0:case 1:m=R;break;case 4:return M.label++,{value:R[1],done:!1};case 5:M.label++,d=R[1],R=[0];continue;case 7:R=M.ops.pop(),M.trys.pop();continue;default:if(m=M.trys,!(m=m.length>0&&m[m.length-1])&&(R[0]===6||R[0]===2)){M=0;continue}if(R[0]===3&&(!m||R[1]>m[0]&&R[1]=Q.length&&(Q=void 0),{value:Q&&Q[b++],done:!Q}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},p=function(Q,F){var M=typeof Symbol=="function"&&Q[Symbol.iterator];if(!M)return Q;var b=M.call(Q),d,m=[],x;try{for(;(F===void 0||F-- >0)&&!(d=b.next()).done;)m.push(d.value)}catch(A){x={error:A}}finally{try{d&&!d.done&&(M=b.return)&&M.call(b)}finally{if(x)throw x.error}}return m},g=function(){for(var Q=[],F=0;F1||A(_,L)})})}function A(_,L){try{I(b[_](L))}catch(ie){E(m[0][3],ie)}}function I(_){_.value instanceof y?Promise.resolve(_.value.v).then(R,S):E(m[0][2],_)}function R(_){A("next",_)}function S(_){A("throw",_)}function E(_,L){_(L),m.shift(),m.length&&A(m[0][0],m[0][1])}},T=function(Q){var F,M;return F={},b("next"),b("throw",function(d){throw d}),b("return"),F[Symbol.iterator]=function(){return this},F;function b(d,m){F[d]=Q[d]?function(x){return(M=!M)?{value:y(Q[d](x)),done:d==="return"}:m?m(x):x}:m}},k=function(Q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=Q[Symbol.asyncIterator],M;return F?F.call(Q):(Q=typeof h=="function"?h(Q):Q[Symbol.iterator](),M={},b("next"),b("throw"),b("return"),M[Symbol.asyncIterator]=function(){return this},M);function b(m){M[m]=Q[m]&&function(x){return new Promise(function(A,I){x=Q[m](x),d(A,I,x.done,x.value)})}}function d(m,x,A,I){Promise.resolve(I).then(function(R){m({value:R,done:A})},x)}},N=function(Q,F){return Object.defineProperty?Object.defineProperty(Q,"raw",{value:F}):Q.raw=F,Q},O=function(Q){if(Q&&Q.__esModule)return Q;var F={};if(Q!=null)for(var M in Q)Object.hasOwnProperty.call(Q,M)&&(F[M]=Q[M]);return F.default=Q,F},B=function(Q){return Q&&Q.__esModule?Q:{default:Q}},z=function(Q,F){if(!F.has(Q))throw new TypeError("attempted to get private field on non-instance");return F.get(Q)},G=function(Q,F,M){if(!F.has(Q))throw new TypeError("attempted to set private field on non-instance");return F.set(Q,M),M},D("__extends",e),D("__assign",t),D("__rest",n),D("__decorate",i),D("__param",s),D("__metadata",o),D("__awaiter",a),D("__generator",l),D("__exportStar",u),D("__createBinding",$),D("__values",h),D("__read",p),D("__spread",g),D("__spreadArrays",w),D("__await",y),D("__asyncGenerator",C),D("__asyncDelegator",T),D("__asyncValues",k),D("__makeTemplateObject",N),D("__importStar",O),D("__importDefault",B),D("__classPrivateFieldGet",z),D("__classPrivateFieldSet",G)})})(Oke);var O$={},B6={},Toe;function Dke(){if(Toe)return B6;Toe=1,Object.defineProperty(B6,"__esModule",{value:!0}),B6.delay=void 0;function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}return B6.delay=r,B6}var km={},D$={},Mm={},Roe;function $ke(){return Roe||(Roe=1,Object.defineProperty(Mm,"__esModule",{value:!0}),Mm.ONE_THOUSAND=Mm.ONE_HUNDRED=void 0,Mm.ONE_HUNDRED=100,Mm.ONE_THOUSAND=1e3),Mm}var $$={},koe;function Bke(){return koe||(koe=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=r.ONE_MINUTE*5,r.TEN_MINUTES=r.ONE_MINUTE*10,r.THIRTY_MINUTES=r.ONE_MINUTE*30,r.SIXTY_MINUTES=r.ONE_MINUTE*60,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=r.ONE_HOUR*3,r.SIX_HOURS=r.ONE_HOUR*6,r.TWELVE_HOURS=r.ONE_HOUR*12,r.TWENTY_FOUR_HOURS=r.ONE_HOUR*24,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=r.ONE_DAY*3,r.FIVE_DAYS=r.ONE_DAY*5,r.SEVEN_DAYS=r.ONE_DAY*7,r.THIRTY_DAYS=r.ONE_DAY*30,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=r.ONE_WEEK*2,r.THREE_WEEKS=r.ONE_WEEK*3,r.FOUR_WEEKS=r.ONE_WEEK*4,r.ONE_YEAR=r.ONE_DAY*365}($$)),$$}var Moe;function Noe(){return Moe||(Moe=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Ju;e.__exportStar($ke(),r),e.__exportStar(Bke(),r)}(D$)),D$}var Poe;function Lke(){if(Poe)return km;Poe=1,Object.defineProperty(km,"__esModule",{value:!0}),km.fromMiliseconds=km.toMiliseconds=void 0;const r=Noe();function e(n){return n*r.ONE_THOUSAND}km.toMiliseconds=e;function t(n){return Math.floor(n/r.ONE_THOUSAND)}return km.fromMiliseconds=t,km}var Ooe;function Uke(){return Ooe||(Ooe=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Ju;e.__exportStar(Dke(),r),e.__exportStar(Lke(),r)}(O$)),O$}var iy={},Doe;function Fke(){if(Doe)return iy;Doe=1,Object.defineProperty(iy,"__esModule",{value:!0}),iy.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const n=this.get(t);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const i=Date.now()-n.started;this.timestamps.set(t,{started:n.started,elapsed:i})}get(t){const n=this.timestamps.get(t);if(typeof n>"u")throw new Error(`No timestamp found for label: ${t}`);return n}elapsed(t){const n=this.get(t);return n.elapsed||Date.now()-n.started}}return iy.Watch=r,iy.default=r,iy}var B$={},L6={},$oe;function jke(){if($oe)return L6;$oe=1,Object.defineProperty(L6,"__esModule",{value:!0}),L6.IWatch=void 0;class r{}return L6.IWatch=r,L6}var Boe;function zke(){return Boe||(Boe=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Ju.__exportStar(jke(),r)}(B$)),B$}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Ju;e.__exportStar(Uke(),r),e.__exportStar(Fke(),r),e.__exportStar(zke(),r),e.__exportStar(Noe(),r)})(Ye);var ki={};Object.defineProperty(ki,"__esModule",{value:!0}),ki.getLocalStorage=ki.getLocalStorageOrThrow=ki.getCrypto=ki.getCryptoOrThrow=L$=ki.getLocation=ki.getLocationOrThrow=F6=ki.getNavigator=ki.getNavigatorOrThrow=U6=ki.getDocument=ki.getDocumentOrThrow=ki.getFromWindowOrThrow=ki.getFromWindow=void 0;function Nm(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}ki.getFromWindow=Nm;function sy(r){const e=Nm(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}ki.getFromWindowOrThrow=sy;function Hke(){return sy("document")}ki.getDocumentOrThrow=Hke;function qke(){return Nm("document")}var U6=ki.getDocument=qke;function Wke(){return sy("navigator")}ki.getNavigatorOrThrow=Wke;function Vke(){return Nm("navigator")}var F6=ki.getNavigator=Vke;function Gke(){return sy("location")}ki.getLocationOrThrow=Gke;function Kke(){return Nm("location")}var L$=ki.getLocation=Kke;function Zke(){return sy("crypto")}ki.getCryptoOrThrow=Zke;function Jke(){return Nm("crypto")}ki.getCrypto=Jke;function Yke(){return sy("localStorage")}ki.getLocalStorageOrThrow=Yke;function Qke(){return Nm("localStorage")}ki.getLocalStorage=Qke;var U$={};Object.defineProperty(U$,"__esModule",{value:!0});var F$=U$.getWindowMetadata=void 0;const Loe=ki;function Xke(){let r,e;try{r=Loe.getDocumentOrThrow(),e=Loe.getLocationOrThrow()}catch{return null}function t(){const p=r.getElementsByTagName("link"),g=[];for(let w=0;w-1){const T=y.getAttribute("href");if(T)if(T.toLowerCase().indexOf("https:")===-1&&T.toLowerCase().indexOf("http:")===-1&&T.indexOf("//")!==0){let k=e.protocol+"//"+e.host;if(T.indexOf("/")===0)k+=T;else{const N=e.pathname.split("/");N.pop();const O=N.join("/");k+=O+"/"+T}g.push(k)}else if(T.indexOf("//")===0){const k=e.protocol+T;g.push(k)}else g.push(T)}}return g}function n(...p){const g=r.getElementsByTagName("meta");for(let w=0;wy.getAttribute(T)).filter(T=>T?p.includes(T):!1);if(C.length&&C){const T=y.getAttribute("content");if(T)return T}}return""}function i(){let p=n("name","og:site_name","og:title","twitter:title");return p||(p=r.title),p}function s(){return n("description","og:description","twitter:description","keywords")}const o=i(),a=s(),l=e.origin,u=t();return{description:a,url:l,icons:u,name:o}}F$=U$.getWindowMetadata=Xke;var zd={},eMe=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Uoe="%[a-f0-9]{2}",Foe=new RegExp("("+Uoe+")|([^%]+?)","gi"),joe=new RegExp("("+Uoe+")+","gi");function j$(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;var t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],j$(t),j$(n))}function tMe(r){try{return decodeURIComponent(r)}catch{for(var e=r.match(Foe)||[],t=1;t{if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[r];const t=r.indexOf(e);return t===-1?[r]:[r.slice(0,t),r.slice(t+e.length)]},sMe=function(r,e){for(var t={},n=Object.keys(r),i=Array.isArray(e),s=0;sN==null,o=Symbol("encodeFragmentIdentifier");function a(N){switch(N.arrayFormat){case"index":return O=>(B,z)=>{const G=B.length;return z===void 0||N.skipNull&&z===null||N.skipEmptyString&&z===""?B:z===null?[...B,[h(O,N),"[",G,"]"].join("")]:[...B,[h(O,N),"[",h(G,N),"]=",h(z,N)].join("")]};case"bracket":return O=>(B,z)=>z===void 0||N.skipNull&&z===null||N.skipEmptyString&&z===""?B:z===null?[...B,[h(O,N),"[]"].join("")]:[...B,[h(O,N),"[]=",h(z,N)].join("")];case"colon-list-separator":return O=>(B,z)=>z===void 0||N.skipNull&&z===null||N.skipEmptyString&&z===""?B:z===null?[...B,[h(O,N),":list="].join("")]:[...B,[h(O,N),":list=",h(z,N)].join("")];case"comma":case"separator":case"bracket-separator":{const O=N.arrayFormat==="bracket-separator"?"[]=":"=";return B=>(z,G)=>G===void 0||N.skipNull&&G===null||N.skipEmptyString&&G===""?z:(G=G===null?"":G,z.length===0?[[h(B,N),O,h(G,N)].join("")]:[[z,h(G,N)].join(N.arrayFormatSeparator)])}default:return O=>(B,z)=>z===void 0||N.skipNull&&z===null||N.skipEmptyString&&z===""?B:z===null?[...B,h(O,N)]:[...B,[h(O,N),"=",h(z,N)].join("")]}}function l(N){let O;switch(N.arrayFormat){case"index":return(B,z,G)=>{if(O=/\[(\d*)\]$/.exec(B),B=B.replace(/\[\d*\]$/,""),!O){G[B]=z;return}G[B]===void 0&&(G[B]={}),G[B][O[1]]=z};case"bracket":return(B,z,G)=>{if(O=/(\[\])$/.exec(B),B=B.replace(/\[\]$/,""),!O){G[B]=z;return}if(G[B]===void 0){G[B]=[z];return}G[B]=[].concat(G[B],z)};case"colon-list-separator":return(B,z,G)=>{if(O=/(:list)$/.exec(B),B=B.replace(/:list$/,""),!O){G[B]=z;return}if(G[B]===void 0){G[B]=[z];return}G[B]=[].concat(G[B],z)};case"comma":case"separator":return(B,z,G)=>{const $=typeof z=="string"&&z.includes(N.arrayFormatSeparator),D=typeof z=="string"&&!$&&p(z,N).includes(N.arrayFormatSeparator);z=D?p(z,N):z;const V=$||D?z.split(N.arrayFormatSeparator).map(Q=>p(Q,N)):z===null?z:p(z,N);G[B]=V};case"bracket-separator":return(B,z,G)=>{const $=/(\[\])$/.test(B);if(B=B.replace(/\[\]$/,""),!$){G[B]=z&&p(z,N);return}const D=z===null?[]:z.split(N.arrayFormatSeparator).map(V=>p(V,N));if(G[B]===void 0){G[B]=D;return}G[B]=[].concat(G[B],D)};default:return(B,z,G)=>{if(G[B]===void 0){G[B]=z;return}G[B]=[].concat(G[B],z)}}}function u(N){if(typeof N!="string"||N.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(N,O){return O.encode?O.strict?e(N):encodeURIComponent(N):N}function p(N,O){return O.decode?t(N):N}function g(N){return Array.isArray(N)?N.sort():typeof N=="object"?g(Object.keys(N)).sort((O,B)=>Number(O)-Number(B)).map(O=>N[O]):N}function w(N){const O=N.indexOf("#");return O!==-1&&(N=N.slice(0,O)),N}function y(N){let O="";const B=N.indexOf("#");return B!==-1&&(O=N.slice(B)),O}function C(N){N=w(N);const O=N.indexOf("?");return O===-1?"":N.slice(O+1)}function T(N,O){return O.parseNumbers&&!Number.isNaN(Number(N))&&typeof N=="string"&&N.trim()!==""?N=Number(N):O.parseBooleans&&N!==null&&(N.toLowerCase()==="true"||N.toLowerCase()==="false")&&(N=N.toLowerCase()==="true"),N}function k(N,O){O=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},O),u(O.arrayFormatSeparator);const B=l(O),z=Object.create(null);if(typeof N!="string"||(N=N.trim().replace(/^[?#&]/,""),!N))return z;for(const G of N.split("&")){if(G==="")continue;let[$,D]=n(O.decode?G.replace(/\+/g," "):G,"=");D=D===void 0?null:["comma","separator","bracket-separator"].includes(O.arrayFormat)?D:p(D,O),B(p($,O),D,z)}for(const G of Object.keys(z)){const $=z[G];if(typeof $=="object"&&$!==null)for(const D of Object.keys($))$[D]=T($[D],O);else z[G]=T($,O)}return O.sort===!1?z:(O.sort===!0?Object.keys(z).sort():Object.keys(z).sort(O.sort)).reduce((G,$)=>{const D=z[$];return Boolean(D)&&typeof D=="object"&&!Array.isArray(D)?G[$]=g(D):G[$]=D,G},Object.create(null))}r.extract=C,r.parse=k,r.stringify=(N,O)=>{if(!N)return"";O=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},O),u(O.arrayFormatSeparator);const B=D=>O.skipNull&&s(N[D])||O.skipEmptyString&&N[D]==="",z=a(O),G={};for(const D of Object.keys(N))B(D)||(G[D]=N[D]);const $=Object.keys(G);return O.sort!==!1&&$.sort(O.sort),$.map(D=>{const V=N[D];return V===void 0?"":V===null?h(D,O):Array.isArray(V)?V.length===0&&O.arrayFormat==="bracket-separator"?h(D,O)+"[]":V.reduce(z(D),[]).join("&"):h(D,O)+"="+h(V,O)}).filter(D=>D.length>0).join("&")},r.parseUrl=(N,O)=>{O=Object.assign({decode:!0},O);const[B,z]=n(N,"#");return Object.assign({url:B.split("?")[0]||"",query:k(C(N),O)},O&&O.parseFragmentIdentifier&&z?{fragmentIdentifier:p(z,O)}:{})},r.stringifyUrl=(N,O)=>{O=Object.assign({encode:!0,strict:!0,[o]:!0},O);const B=w(N.url).split("?")[0]||"",z=r.extract(N.url),G=r.parse(z,{sort:!1}),$=Object.assign(G,N.query);let D=r.stringify($,O);D&&(D=`?${D}`);let V=y(N.url);return N.fragmentIdentifier&&(V=`#${O[o]?h(N.fragmentIdentifier,O):N.fragmentIdentifier}`),`${B}${D}${V}`},r.pick=(N,O,B)=>{B=Object.assign({parseFragmentIdentifier:!0,[o]:!1},B);const{url:z,query:G,fragmentIdentifier:$}=r.parseUrl(N,B);return r.stringifyUrl({url:z,query:i(G,O),fragmentIdentifier:$},B)},r.exclude=(N,O,B)=>{const z=Array.isArray(O)?G=>!O.includes(G):(G,$)=>!O(G,$);return r.pick(N,z,B)}})(zd);const zoe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},oMe=":";function aMe(r){const[e,t]=r.split(oMe);return{namespace:e,reference:t}}function cMe(r,e=[]){const t=[];return Object.keys(r).forEach(n=>{if(e.length&&!e.includes(n))return;const i=r[n];t.push(...i.accounts)}),t}function Hoe(r,e){return r.includes(":")?[r]:e.chains||[]}const qoe="base10",Da="base16",z$="base64pad",H$="utf8",Woe=0,Pm=1,lMe=0,Voe=1,q$=12,W$=32;function uMe(){const r=O6.generateKeyPair();return{privateKey:yi(r.secretKey,Da),publicKey:yi(r.publicKey,Da)}}function V$(){const r=c1.randomBytes(W$);return yi(r,Da)}function hMe(r,e){const t=O6.sharedKey(Pi(r,Da),Pi(e,Da),!0),n=new lre(Rm.SHA256,t).expand(W$);return yi(n,Da)}function fMe(r){const e=Rm.hash(Pi(r,Da));return yi(e,Da)}function oy(r){const e=Rm.hash(Pi(r,H$));return yi(e,Da)}function dMe(r){return Pi(`${r}`,qoe)}function j6(r){return Number(yi(r,qoe))}function pMe(r){const e=dMe(typeof r.type<"u"?r.type:Woe);if(j6(e)===Pm&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?Pi(r.senderPublicKey,Da):void 0,n=typeof r.iv<"u"?Pi(r.iv,Da):c1.randomBytes(q$),i=new E6.ChaCha20Poly1305(Pi(r.symKey,Da)).seal(n,Pi(r.message,H$));return mMe({type:e,sealed:i,iv:n,senderPublicKey:t})}function gMe(r){const e=new E6.ChaCha20Poly1305(Pi(r.symKey,Da)),{sealed:t,iv:n}=dS(r.encoded),i=e.open(n,t);if(i===null)throw new Error("Failed to decrypt");return yi(i,H$)}function mMe(r){if(j6(r.type)===Pm){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return yi(D6([r.type,r.senderPublicKey,r.iv,r.sealed]),z$)}return yi(D6([r.type,r.iv,r.sealed]),z$)}function dS(r){const e=Pi(r,z$),t=e.slice(lMe,Voe),n=Voe;if(j6(t)===Pm){const a=n+W$,l=a+q$,u=e.slice(n,a),h=e.slice(a,l),p=e.slice(l);return{type:t,sealed:p,iv:h,senderPublicKey:u}}const i=n+q$,s=e.slice(n,i),o=e.slice(i);return{type:t,sealed:o,iv:s}}function bMe(r,e){const t=dS(r);return Goe({type:j6(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?yi(t.senderPublicKey,Da):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function Goe(r){const e=(r==null?void 0:r.type)||Woe;if(e===Pm){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function Koe(r){return r.type===Pm&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}var wMe=Object.defineProperty,Zoe=Object.getOwnPropertySymbols,vMe=Object.prototype.hasOwnProperty,yMe=Object.prototype.propertyIsEnumerable,Joe=(r,e,t)=>e in r?wMe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yoe=(r,e)=>{for(var t in e||(e={}))vMe.call(e,t)&&Joe(r,t,e[t]);if(Zoe)for(var t of Zoe(e))yMe.call(e,t)&&Joe(r,t,e[t]);return r};const xMe="ReactNative",Vc={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_Me="js";function G$(){return typeof yt<"u"&&typeof yt.versions<"u"&&typeof yt.versions.node<"u"}function ay(){return!U6()&&!!F6()&&navigator.product===xMe}function cy(){return!G$()&&!!F6()&&!!U6()}function z6(){return ay()?Vc.reactNative:G$()?Vc.node:cy()?Vc.browser:Vc.unknown}function EMe(){var r;try{return ay()&&typeof dr<"u"&&typeof(dr==null?void 0:dr.Application)<"u"?(r=dr.Application)==null?void 0:r.applicationId:void 0}catch{return}}function AMe(r,e){let t=zd.parse(r);return t=Yoe(Yoe({},t),e),r=zd.stringify(t),r}function CMe(){return F$()||{name:"",description:"",url:"",icons:[""]}}function SMe(){if(z6()===Vc.reactNative&&typeof dr<"u"&&typeof(dr==null?void 0:dr.Platform)<"u"){const{OS:t,Version:n}=dr.Platform;return[t,n].join("-")}const r=Soe();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function IMe(){var r;const e=z6();return e===Vc.browser?[e,((r=L$())==null?void 0:r.host)||"unknown"].join(":"):e}function TMe(r,e,t){const n=SMe(),i=IMe();return[[r,e].join("-"),[_Me,t].join("-"),n,i].join("/")}function RMe({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a}){const l=t.split("?"),u=TMe(r,e,n),h={auth:i,ua:u,projectId:s,useOnCloseEvent:o||void 0,origin:a||void 0},p=AMe(l[1]||"",h);return l[0]+"?"+p}function Om(r,e){return r.filter(t=>e.includes(t)).length===r.length}function Qoe(r){return Object.fromEntries(r.entries())}function Xoe(r){return new Map(Object.entries(r))}function ly(r=Ye.FIVE_MINUTES,e){const t=Ye.toMiliseconds(r||Ye.FIVE_MINUTES);let n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},t),n=o,i=a})}}function H6(r,e,t){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(t)),e);try{const o=await r;n(o)}catch(o){i(o)}clearTimeout(s)})}function eae(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function kMe(r){return eae("topic",r)}function MMe(r){return eae("id",r)}function tae(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")n.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return n}function Gc(r,e){return Ye.fromMiliseconds((e||Date.now())+Ye.toMiliseconds(r))}function u1(r){return Date.now()>=Ye.toMiliseconds(r)}function Es(r,e){return`${r}${e?`:${e}`:""}`}function K$(r=[],e=[]){return[...new Set([...r,...e])]}async function NMe({id:r,topic:e,wcDeepLink:t}){try{if(!t)return;const n=typeof t=="string"?JSON.parse(t):t;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${r}&sessionTopic=${e}`,o=z6();o===Vc.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===Vc.reactNative&&typeof(dr==null?void 0:dr.Linking)<"u"&&await dr.Linking.openURL(s)}catch(n){console.error(n)}}async function PMe(r,e){try{return await r.getItem(e)||(cy()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}const OMe="irn";function Z$(r){return(r==null?void 0:r.relay)||{protocol:OMe}}function pS(r){const e=zoe[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var DMe=Object.defineProperty,$Me=Object.defineProperties,BMe=Object.getOwnPropertyDescriptors,rae=Object.getOwnPropertySymbols,LMe=Object.prototype.hasOwnProperty,UMe=Object.prototype.propertyIsEnumerable,nae=(r,e,t)=>e in r?DMe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,FMe=(r,e)=>{for(var t in e||(e={}))LMe.call(e,t)&&nae(r,t,e[t]);if(rae)for(var t of rae(e))UMe.call(e,t)&&nae(r,t,e[t]);return r},jMe=(r,e)=>$Me(r,BMe(e));function zMe(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=r[i];t[s]=o}}),t}function iae(r){r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),s=typeof t<"u"?r.substring(t):"",o=zd.parse(s);return{protocol:n,topic:HMe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:zMe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function HMe(r){return r.startsWith("//")?r.substring(2):r}function qMe(r,e="-"){const t="relay",n={};return Object.keys(r).forEach(i=>{const s=t+e+i;r[i]&&(n[s]=r[i])}),n}function WMe(r){return`${r.protocol}:${r.topic}@${r.version}?`+zd.stringify(jMe(FMe({symKey:r.symKey},qMe(r.relay)),{expiryTimestamp:r.expiryTimestamp}))}function uy(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}function VMe(r){const e=[];return Object.values(r).forEach(t=>{e.push(...uy(t.accounts))}),e}function GMe(r,e){const t=[];return Object.values(r).forEach(n=>{uy(n.accounts).includes(e)&&t.push(...n.methods)}),t}function KMe(r,e){const t=[];return Object.values(r).forEach(n=>{uy(n.accounts).includes(e)&&t.push(...n.events)}),t}function J$(r){return r.includes(":")}function q6(r){return J$(r)?r.split(":")[0]:r}const ZMe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},JMe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Wt(r,e){const{message:t,code:n}=JMe[r];return{message:e?`${t} ${e}`:t,code:n}}function Gi(r,e){const{message:t,code:n}=ZMe[r];return{message:e?`${t} ${e}`:t,code:n}}function pf(r,e){return Array.isArray(r)?typeof e<"u"&&r.length?r.every(e):!0:!1}function W6(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function $a(r){return typeof r>"u"}function vo(r,e){return e&&$a(r)?!0:typeof r=="string"&&!!r.trim().length}function Y$(r,e){return e&&$a(r)?!0:typeof r=="number"&&!isNaN(r)}function YMe(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let s=!0;return Om(i,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:u}=r.namespaces[o],h=uy(a),p=t[o];(!Om(Hoe(o,p),h)||!Om(p.methods,l)||!Om(p.events,u))&&(s=!1)}),s):!1}function gS(r){return vo(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function QMe(r){if(vo(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&gS(t)}}return!1}function XMe(r){if(vo(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}function eNe(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function tNe(r){return r==null?void 0:r.topic}function rNe(r,e){let t=null;return vo(r==null?void 0:r.publicKey,!1)||(t=Wt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function sae(r){let e=!0;return pf(r)?r.length&&(e=r.every(t=>vo(t,!1))):e=!1,e}function nNe(r,e,t){let n=null;return pf(e)&&e.length?e.forEach(i=>{n||gS(i)||(n=Gi("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):gS(r)||(n=Gi("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function iNe(r,e,t){let n=null;return Object.entries(r).forEach(([i,s])=>{if(n)return;const o=nNe(i,Hoe(i,s),`${e} ${t}`);o&&(n=o)}),n}function sNe(r,e){let t=null;return pf(r)?r.forEach(n=>{t||QMe(n)||(t=Gi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=Gi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function oNe(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=sNe(n==null?void 0:n.accounts,`${e} namespace`);i&&(t=i)}),t}function aNe(r,e){let t=null;return sae(r==null?void 0:r.methods)?sae(r==null?void 0:r.events)||(t=Gi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=Gi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function oae(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=aNe(n,`${e}, namespace`);i&&(t=i)}),t}function cNe(r,e,t){let n=null;if(r&&W6(r)){const i=oae(r,e);i&&(n=i);const s=iNe(r,e,t);s&&(n=s)}else n=Wt("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}function Q$(r,e){let t=null;if(r&&W6(r)){const n=oae(r,e);n&&(t=n);const i=oNe(r,e);i&&(t=i)}else t=Wt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function aae(r){return vo(r.protocol,!0)}function lNe(r,e){let t=!1;return e&&!r?t=!0:r&&pf(r)&&r.length&&r.forEach(n=>{t=aae(n)}),t}function uNe(r){return typeof r=="number"}function pc(r){return typeof r<"u"&&typeof r!==null}function hNe(r){return!(!r||typeof r!="object"||!r.code||!Y$(r.code,!1)||!r.message||!vo(r.message,!1))}function fNe(r){return!($a(r)||!vo(r.method,!1))}function dNe(r){return!($a(r)||$a(r.result)&&$a(r.error)||!Y$(r.id,!1)||!vo(r.jsonrpc,!1))}function pNe(r){return!($a(r)||!vo(r.name,!1))}function cae(r,e){return!(!gS(e)||!VMe(r).includes(e))}function gNe(r,e,t){return vo(t,!1)?GMe(r,e).includes(t):!1}function mNe(r,e,t){return vo(t,!1)?KMe(r,e).includes(t):!1}function lae(r,e,t){let n=null;const i=bNe(r),s=wNe(e),o=Object.keys(i),a=Object.keys(s),l=uae(Object.keys(r)),u=uae(Object.keys(e)),h=l.filter(p=>!u.includes(p));return h.length&&(n=Wt("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. - Required: ${h.toString()} - Received: ${Object.keys(e).toString()}`)),Om(o,a)||(n=Wt("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. - Required: ${o.toString()} - Approved: ${a.toString()}`)),Object.keys(e).forEach(p=>{if(!p.includes(":")||n)return;const g=uy(e[p].accounts);g.includes(p)||(n=Wt("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${p} - Required: ${p} - Approved: ${g.toString()}`))}),o.forEach(p=>{n||(Om(i[p].methods,s[p].methods)?Om(i[p].events,s[p].events)||(n=Wt("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${p}`)):n=Wt("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${p}`))}),n}function bNe(r){const e={};return Object.keys(r).forEach(t=>{var n;t.includes(":")?e[t]=r[t]:(n=r[t].chains)==null||n.forEach(i=>{e[i]={methods:r[t].methods,events:r[t].events}})}),e}function uae(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function wNe(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const n=uy(r[t].accounts);n==null||n.forEach(i=>{e[i]={accounts:r[t].accounts.filter(s=>s.includes(`${i}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function vNe(r,e){return Y$(r,!1)&&r<=e.max&&r>=e.min}function hae(){const r=z6();return new Promise(e=>{switch(r){case Vc.browser:e(yNe());break;case Vc.reactNative:e(xNe());break;case Vc.node:e(_Ne());break;default:e(!0)}})}function yNe(){return cy()&&(navigator==null?void 0:navigator.onLine)}async function xNe(){if(ay()&&typeof dr<"u"&&dr!=null&&dr.NetInfo){const r=await(dr==null?void 0:dr.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function _Ne(){return!0}function ENe(r){switch(z6()){case Vc.browser:ANe(r);break;case Vc.reactNative:CNe(r);break}}function ANe(r){!ay()&&cy()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function CNe(r){ay()&&typeof dr<"u"&&dr!=null&&dr.NetInfo&&(dr==null||dr.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const X$={};let mS=class{static get(e){return X$[e]}static set(e,t){X$[e]=t}static delete(e){delete X$[e]}};const SNe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,INe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,TNe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function RNe(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){kNe(r);return}return e}function kNe(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function bS(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const n=t.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!TNe.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(SNe.test(r)||INe.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,RNe)}return JSON.parse(r)}catch(n){if(e.strict)throw n;return r}}function MNe(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function yo(r,...e){try{return MNe(r(...e))}catch(t){return Promise.reject(t)}}function NNe(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function PNe(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function wS(r){if(NNe(r))return String(r);if(PNe(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return wS(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function fae(){if(typeof Dt===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const eB="base64:";function ONe(r){if(typeof r=="string")return r;fae();const e=Dt.from(r).toString("base64");return eB+e}function DNe(r){return typeof r!="string"||!r.startsWith(eB)?r:(fae(),Dt.from(r.slice(eB.length),"base64"))}function gc(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function $Ne(...r){return gc(r.join(":"))}function vS(r){return r=gc(r),r?r+":":""}function jat(r){return r}const BNe="memory",LNe=()=>{const r=new Map;return{name:BNe,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function UNe(r={}){const e={mounts:{"":r.driver||LNe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=u=>{for(const h of e.mountpoints)if(u.startsWith(h))return{base:h,relativeKey:u.slice(h.length),driver:e.mounts[h]};return{base:"",relativeKey:u,driver:e.mounts[""]}},n=(u,h)=>e.mountpoints.filter(p=>p.startsWith(u)||h&&u.startsWith(p)).map(p=>({relativeBase:u.length>p.length?u.slice(p.length):void 0,mountpoint:p,driver:e.mounts[p]})),i=(u,h)=>{if(e.watching){h=gc(h);for(const p of e.watchListeners)p(u,h)}},s=async()=>{if(!e.watching){e.watching=!0;for(const u in e.mounts)e.unwatch[u]=await dae(e.mounts[u],i,u)}},o=async()=>{if(e.watching){for(const u in e.unwatch)await e.unwatch[u]();e.unwatch={},e.watching=!1}},a=(u,h,p)=>{const g=new Map,w=y=>{let C=g.get(y.base);return C||(C={driver:y.driver,base:y.base,items:[]},g.set(y.base,C)),C};for(const y of u){const C=typeof y=="string",T=gc(C?y:y.key),k=C?void 0:y.value,N=C||!y.options?h:{...h,...y.options},O=t(T);w(O).items.push({key:T,value:k,relativeKey:O.relativeKey,options:N})}return Promise.all([...g.values()].map(y=>p(y))).then(y=>y.flat())},l={hasItem(u,h={}){u=gc(u);const{relativeKey:p,driver:g}=t(u);return yo(g.hasItem,p,h)},getItem(u,h={}){u=gc(u);const{relativeKey:p,driver:g}=t(u);return yo(g.getItem,p,h).then(w=>bS(w))},getItems(u,h){return a(u,h,p=>p.driver.getItems?yo(p.driver.getItems,p.items.map(g=>({key:g.relativeKey,options:g.options})),h).then(g=>g.map(w=>({key:$Ne(p.base,w.key),value:bS(w.value)}))):Promise.all(p.items.map(g=>yo(p.driver.getItem,g.relativeKey,g.options).then(w=>({key:g.key,value:bS(w)})))))},getItemRaw(u,h={}){u=gc(u);const{relativeKey:p,driver:g}=t(u);return g.getItemRaw?yo(g.getItemRaw,p,h):yo(g.getItem,p,h).then(w=>DNe(w))},async setItem(u,h,p={}){if(h===void 0)return l.removeItem(u);u=gc(u);const{relativeKey:g,driver:w}=t(u);w.setItem&&(await yo(w.setItem,g,wS(h),p),w.watch||i("update",u))},async setItems(u,h){await a(u,h,async p=>{if(p.driver.setItems)return yo(p.driver.setItems,p.items.map(g=>({key:g.relativeKey,value:wS(g.value),options:g.options})),h);p.driver.setItem&&await Promise.all(p.items.map(g=>yo(p.driver.setItem,g.relativeKey,wS(g.value),g.options)))})},async setItemRaw(u,h,p={}){if(h===void 0)return l.removeItem(u,p);u=gc(u);const{relativeKey:g,driver:w}=t(u);if(w.setItemRaw)await yo(w.setItemRaw,g,h,p);else if(w.setItem)await yo(w.setItem,g,ONe(h),p);else return;w.watch||i("update",u)},async removeItem(u,h={}){typeof h=="boolean"&&(h={removeMeta:h}),u=gc(u);const{relativeKey:p,driver:g}=t(u);g.removeItem&&(await yo(g.removeItem,p,h),(h.removeMeta||h.removeMata)&&await yo(g.removeItem,p+"$",h),g.watch||i("remove",u))},async getMeta(u,h={}){typeof h=="boolean"&&(h={nativeOnly:h}),u=gc(u);const{relativeKey:p,driver:g}=t(u),w=Object.create(null);if(g.getMeta&&Object.assign(w,await yo(g.getMeta,p,h)),!h.nativeOnly){const y=await yo(g.getItem,p+"$",h).then(C=>bS(C));y&&typeof y=="object"&&(typeof y.atime=="string"&&(y.atime=new Date(y.atime)),typeof y.mtime=="string"&&(y.mtime=new Date(y.mtime)),Object.assign(w,y))}return w},setMeta(u,h,p={}){return this.setItem(u+"$",h,p)},removeMeta(u,h={}){return this.removeItem(u+"$",h)},async getKeys(u,h={}){u=vS(u);const p=n(u,!0);let g=[];const w=[];for(const y of p){const T=(await yo(y.driver.getKeys,y.relativeBase,h)).map(k=>y.mountpoint+gc(k)).filter(k=>!g.some(N=>k.startsWith(N)));w.push(...T),g=[y.mountpoint,...g.filter(k=>!k.startsWith(y.mountpoint))]}return u?w.filter(y=>y.startsWith(u)&&!y.endsWith("$")):w.filter(y=>!y.endsWith("$"))},async clear(u,h={}){u=vS(u),await Promise.all(n(u,!1).map(async p=>{if(p.driver.clear)return yo(p.driver.clear,p.relativeBase,h);if(p.driver.removeItem){const g=await p.driver.getKeys(p.relativeBase||"",h);return Promise.all(g.map(w=>p.driver.removeItem(w,h)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(u=>pae(u)))},async watch(u){return await s(),e.watchListeners.push(u),async()=>{e.watchListeners=e.watchListeners.filter(h=>h!==u),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(u,h){if(u=vS(u),u&&e.mounts[u])throw new Error(`already mounted at ${u}`);return u&&(e.mountpoints.push(u),e.mountpoints.sort((p,g)=>g.length-p.length)),e.mounts[u]=h,e.watching&&Promise.resolve(dae(h,i,u)).then(p=>{e.unwatch[u]=p}).catch(console.error),l},async unmount(u,h=!0){u=vS(u),!(!u||!e.mounts[u])&&(e.watching&&u in e.unwatch&&(e.unwatch[u](),delete e.unwatch[u]),h&&await pae(e.mounts[u]),e.mountpoints=e.mountpoints.filter(p=>p!==u),delete e.mounts[u])},getMount(u=""){u=gc(u)+":";const h=t(u);return{driver:h.driver,base:h.base}},getMounts(u="",h={}){return u=gc(u),n(u,h.parents).map(g=>({driver:g.driver,base:g.mountpoint}))}};return l}function dae(r,e,t){return r.watch?r.watch((n,i)=>e(n,t+i)):()=>{}}async function pae(r){typeof r.dispose=="function"&&await yo(r.dispose)}function Dm(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function gae(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const n=Dm(t);return(i,s)=>n.then(o=>s(o.transaction(e,i).objectStore(e)))}let tB;function V6(){return tB||(tB=gae("keyval-store","keyval")),tB}function mae(r,e=V6()){return e("readonly",t=>Dm(t.get(r)))}function FNe(r,e,t=V6()){return t("readwrite",n=>(n.put(e,r),Dm(n.transaction)))}function jNe(r,e=V6()){return e("readwrite",t=>(t.delete(r),Dm(t.transaction)))}function zNe(r=V6()){return r("readwrite",e=>(e.clear(),Dm(e.transaction)))}function HNe(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Dm(r.transaction)}function qNe(r=V6()){return r("readonly",e=>{if(e.getAllKeys)return Dm(e.getAllKeys());const t=[];return HNe(e,n=>t.push(n.key)).then(()=>t)})}const WNe=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),VNe=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function hy(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return VNe(r)}catch{return r}}function gf(r){return typeof r=="string"?r:WNe(r)||""}const GNe="idb-keyval";var KNe=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=i=>e+i;let n;return r.dbName&&r.storeName&&(n=gae(r.dbName,r.storeName)),{name:GNe,options:r,async hasItem(i){return!(typeof await mae(t(i),n)>"u")},async getItem(i){return await mae(t(i),n)??null},setItem(i,s){return FNe(t(i),s,n)},removeItem(i){return jNe(t(i),n)},getKeys(){return qNe(n)},clear(){return zNe(n)}}};const ZNe="WALLET_CONNECT_V2_INDEXED_DB",JNe="keyvaluestorage";let YNe=class{constructor(){this.indexedDb=UNe({driver:KNe({dbName:ZNe,storeName:JNe})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,gf(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};var rB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},yS={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,n){this[t]=String(n)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(n){t[n]=void 0,delete t[n]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof rB<"u"&&rB.localStorage?yS.exports=rB.localStorage:typeof window<"u"&&window.localStorage?yS.exports=window.localStorage:yS.exports=new e})();function QNe(r){var e;return[r[0],hy((e=r[1])!=null?e:"")]}let XNe=class{constructor(){this.localStorage=yS.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(QNe)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return hy(t)}async setItem(e,t){this.localStorage.setItem(e,gf(t))}async removeItem(e){this.localStorage.removeItem(e)}};const ePe="wc_storage_version",bae=1,tPe=async(r,e,t)=>{const n=ePe,i=await e.getItem(n);if(i&&i>=bae){t(e);return}const s=await r.getKeys();if(!s.length){t(e);return}const o=[];for(;s.length;){const a=s.shift();if(!a)continue;const l=a.toLowerCase();if(l.includes("wc@")||l.includes("walletconnect")||l.includes("wc_")||l.includes("wallet_connect")){const u=await r.getItem(a);await e.setItem(a,u),o.push(a)}}await e.setItem(n,bae),t(e),rPe(r,o)},rPe=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let wae=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new XNe;this.storage=e;try{const t=new YNe;tPe(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var Yu={},G6={},nB={},K6={};let Kc=class{};const nPe=ad(Object.freeze(Object.defineProperty({__proto__:null,IEvents:Kc},Symbol.toStringTag,{value:"Module"})));var vae;function iPe(){if(vae)return K6;vae=1,Object.defineProperty(K6,"__esModule",{value:!0}),K6.IHeartBeat=void 0;const r=nPe;class e extends r.IEvents{constructor(n){super()}}return K6.IHeartBeat=e,K6}var yae;function xae(){return yae||(yae=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Ju.__exportStar(iPe(),r)}(nB)),nB}var iB={},$m={},_ae;function sPe(){if(_ae)return $m;_ae=1,Object.defineProperty($m,"__esModule",{value:!0}),$m.HEARTBEAT_EVENTS=$m.HEARTBEAT_INTERVAL=void 0;const r=Ye;return $m.HEARTBEAT_INTERVAL=r.FIVE_SECONDS,$m.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},$m}var Eae;function Aae(){return Eae||(Eae=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Ju.__exportStar(sPe(),r)}(iB)),iB}var Cae;function oPe(){if(Cae)return G6;Cae=1,Object.defineProperty(G6,"__esModule",{value:!0}),G6.HeartBeat=void 0;const r=Ju,e=pn,t=Ye,n=xae(),i=Aae();class s extends n.IHeartBeat{constructor(a){super(a),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(a==null?void 0:a.interval)||i.HEARTBEAT_INTERVAL}static init(a){return r.__awaiter(this,void 0,void 0,function*(){const l=new s(a);return yield l.init(),l})}init(){return r.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(a,l){this.events.on(a,l)}once(a,l){this.events.once(a,l)}off(a,l){this.events.off(a,l)}removeListener(a,l){this.events.removeListener(a,l)}initialize(){return r.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),t.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return G6.HeartBeat=s,G6}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Ju;e.__exportStar(oPe(),r),e.__exportStar(xae(),r),e.__exportStar(Aae(),r)})(Yu);function aPe(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}var cPe=lPe;function lPe(r,e,t){var n=t&&t.stringify||aPe,i=1;if(typeof r=="object"&&r!==null){var s=e.length+i;if(s===1)return r;var o=new Array(s);o[0]=n(r);for(var a=1;a-1?p:0,r.charCodeAt(w+1)){case 100:case 102:if(h>=l||e[h]==null)break;p=l||e[h]==null)break;p=l||e[h]===void 0)break;p",p=w+2,w++;break}u+=n(e[h]),p=w+2,w++;break;case 115:if(h>=l)break;p-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof t=="function"&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),r.enabled===!1&&(r.level="silent");const a=r.level||"info",l=Object.create(t);l.log||(l.log=J6),Object.defineProperty(l,"levelVal",{get:h}),Object.defineProperty(l,"level",{get:p,set:g});const u={transmit:e,serialize:i,asObject:r.browser.asObject,levels:o,timestamp:mPe(r)};l.levels=mf.levels,l.level=a,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=J6,l.serializers=n,l._serialize=i,l._stdErrSerialize=s,l.child=w,e&&(l._logEvent=sB());function h(){return this.level==="silent"?1/0:this.levels.values[this.level]}function p(){return this._level}function g(y){if(y!=="silent"&&!this.levels.values[y])throw Error("unknown level "+y);this._level=y,fy(u,l,"error","log"),fy(u,l,"fatal","error"),fy(u,l,"warn","error"),fy(u,l,"info","log"),fy(u,l,"debug","log"),fy(u,l,"trace","log")}function w(y,C){if(!y)throw new Error("missing bindings for child Pino");C=C||{},i&&y.serializers&&(C.serializers=y.serializers);const T=C.serializers;if(i&&T){var k=Object.assign({},n,T),N=r.browser.serialize===!0?Object.keys(k):i;delete y.serializers,xS([y],N,k,this._stdErrSerialize)}function O(B){this._childLevel=(B._childLevel|0)+1,this.error=dy(B,y,"error"),this.fatal=dy(B,y,"fatal"),this.warn=dy(B,y,"warn"),this.info=dy(B,y,"info"),this.debug=dy(B,y,"debug"),this.trace=dy(B,y,"trace"),k&&(this.serializers=k,this._serialize=N),e&&(this._logEvent=sB([].concat(B._logEvent.bindings,y)))}return O.prototype=this,new O(this)}return l}mf.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},mf.stdSerializers=uPe,mf.stdTimeFunctions=Object.assign({},{nullTime:Iae,epochTime:Tae,unixTime:bPe,isoTime:wPe});function fy(r,e,t,n){const i=Object.getPrototypeOf(e);e[t]=e.levelVal>e.levels.values[t]?J6:i[t]?i[t]:Z6[t]||Z6[n]||J6,fPe(r,e,t)}function fPe(r,e,t){!r.transmit&&e[t]===J6||(e[t]=function(n){return function(){const s=r.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Z6?Z6:this;for(var l=0;l-1&&s in t&&(r[i][s]=t[s](r[i][s]))}function dy(r,e,t){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;ithis.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}},kae=class{constructor(e,t=aB){this.level=e??"error",this.levelValue=mc.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new Rae(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===mc.levels.values.error?console.error(e):t===mc.levels.values.warn?console.warn(e):t===mc.levels.values.debug?console.debug(e):t===mc.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(gf({timestamp:new Date().toISOString(),log:e}));const t=typeof e=="string"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new Rae(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(gf({extraMetadata:e})),new Blob(t,{type:"application/json"})}},_Pe=class{constructor(e,t=aB){this.baseChunkLogger=new kae(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=t,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}},EPe=class{constructor(e,t=aB){this.baseChunkLogger=new kae(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var APe=Object.defineProperty,CPe=Object.defineProperties,SPe=Object.getOwnPropertyDescriptors,Mae=Object.getOwnPropertySymbols,IPe=Object.prototype.hasOwnProperty,TPe=Object.prototype.propertyIsEnumerable,Nae=(r,e,t)=>e in r?APe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ES=(r,e)=>{for(var t in e||(e={}))IPe.call(e,t)&&Nae(r,t,e[t]);if(Mae)for(var t of Mae(e))TPe.call(e,t)&&Nae(r,t,e[t]);return r},AS=(r,e)=>CPe(r,SPe(e));function h1(r){return AS(ES({},r),{level:(r==null?void 0:r.level)||yPe.level})}function RPe(r,e=Y6){return r[e]||""}function kPe(r,e,t=Y6){return r[t]=e,r}function xi(r,e=Y6){let t="";return typeof r.bindings>"u"?t=RPe(r,e):t=r.bindings().context||"",t}function MPe(r,e,t=Y6){const n=xi(r,t);return n.trim()?`${n}/${e}`:e}function gi(r,e,t=Y6){const n=MPe(r,e,t),i=r.child({context:n});return kPe(i,n,t)}function NPe(r){var e,t;const n=new _Pe((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:mc(AS(ES({},r.opts),{level:"trace",browser:AS(ES({},(t=r.opts)==null?void 0:t.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function PPe(r){var e;const t=new EPe((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:mc(AS(ES({},r.opts),{level:"trace"})),chunkLoggerController:t}}function OPe(r){return typeof r.loggerOverride<"u"&&typeof r.loggerOverride!="string"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<"u"?NPe(r):PPe(r)}let DPe=class extends Kc{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},$Pe=class extends Kc{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},BPe=class{constructor(e,t){this.logger=e,this.core=t}},LPe=class extends Kc{constructor(e,t){super(),this.relayer=e,this.logger=t}},UPe=class extends Kc{constructor(e){super()}},FPe=class{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}},jPe=class extends Kc{constructor(e,t){super(),this.relayer=e,this.logger=t}},zPe=class extends Kc{constructor(e,t){super(),this.core=e,this.logger=t}},HPe=class{constructor(e,t){this.projectId=e,this.logger=t}},qPe=class{constructor(e,t){this.projectId=e,this.logger=t}},WPe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},VPe=class{constructor(e){this.client=e}};var cB={},Pae={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Gr,t=Hc;r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128;var n=function(){function a(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return a.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},a.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},a.prototype.clean=function(){t.wipe(this._buffer),t.wipe(this._tempHi),t.wipe(this._tempLo),this.reset()},a.prototype.update=function(l,u){if(u===void 0&&(u=l.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var h=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[h++],u--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(h=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,l,h,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=l[h++],u--;return this},a.prototype.finish=function(l){if(!this._finished){var u=this._bytesHashed,h=this._bufferLength,p=u/536870912|0,g=u<<3,w=u%128<112?128:256;this._buffer[h]=128;for(var y=h+1;y0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._stateHi.set(l.stateHi),this._stateLo.set(l.stateLo),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){t.wipe(l.stateHi),t.wipe(l.stateLo),l.buffer&&t.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();r.SHA512=n;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(a,l,u,h,p,g,w){for(var y=u[0],C=u[1],T=u[2],k=u[3],N=u[4],O=u[5],B=u[6],z=u[7],G=h[0],$=h[1],D=h[2],V=h[3],Q=h[4],F=h[5],M=h[6],b=h[7],d,m,x,A,I,R,S,E;w>=128;){for(var _=0;_<16;_++){var L=8*_+g;a[_]=e.readUint32BE(p,L),l[_]=e.readUint32BE(p,L+4)}for(var _=0;_<80;_++){var ie=y,q=C,Y=T,K=k,te=N,re=O,H=B,U=z,W=G,le=$,de=D,Se=V,Me=Q,ke=F,Ke=M,Re=b;if(d=z,m=b,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=(N>>>14|Q<<32-14)^(N>>>18|Q<<32-18)^(Q>>>41-32|N<<32-(41-32)),m=(Q>>>14|N<<32-14)^(Q>>>18|N<<32-18)^(N>>>41-32|Q<<32-(41-32)),I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,d=N&O^~N&B,m=Q&F^~Q&M,I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,d=i[_*2],m=i[_*2+1],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,d=a[_%16],m=l[_%16],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,x=S&65535|E<<16,A=I&65535|R<<16,d=x,m=A,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=(y>>>28|G<<32-28)^(G>>>34-32|y<<32-(34-32))^(G>>>39-32|y<<32-(39-32)),m=(G>>>28|y<<32-28)^(y>>>34-32|G<<32-(34-32))^(y>>>39-32|G<<32-(39-32)),I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,d=y&C^y&T^C&T,m=G&$^G&D^$&D,I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,U=S&65535|E<<16,Re=I&65535|R<<16,d=K,m=Se,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=x,m=A,I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,K=S&65535|E<<16,Se=I&65535|R<<16,C=ie,T=q,k=Y,N=K,O=te,B=re,z=H,y=U,$=W,D=le,V=de,Q=Se,F=Me,M=ke,b=Ke,G=Re,_%16===15)for(var L=0;L<16;L++)d=a[L],m=l[L],I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=a[(L+9)%16],m=l[(L+9)%16],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,x=a[(L+1)%16],A=l[(L+1)%16],d=(x>>>1|A<<32-1)^(x>>>8|A<<32-8)^x>>>7,m=(A>>>1|x<<32-1)^(A>>>8|x<<32-8)^(A>>>7|x<<32-7),I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,x=a[(L+14)%16],A=l[(L+14)%16],d=(x>>>19|A<<32-19)^(A>>>61-32|x<<32-(61-32))^x>>>6,m=(A>>>19|x<<32-19)^(x>>>61-32|A<<32-(61-32))^(A>>>6|x<<32-6),I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,a[L]=S&65535|E<<16,l[L]=I&65535|R<<16}d=y,m=G,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[0],m=h[0],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[0]=y=S&65535|E<<16,h[0]=G=I&65535|R<<16,d=C,m=$,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[1],m=h[1],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[1]=C=S&65535|E<<16,h[1]=$=I&65535|R<<16,d=T,m=D,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[2],m=h[2],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[2]=T=S&65535|E<<16,h[2]=D=I&65535|R<<16,d=k,m=V,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[3],m=h[3],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[3]=k=S&65535|E<<16,h[3]=V=I&65535|R<<16,d=N,m=Q,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[4],m=h[4],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[4]=N=S&65535|E<<16,h[4]=Q=I&65535|R<<16,d=O,m=F,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[5],m=h[5],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[5]=O=S&65535|E<<16,h[5]=F=I&65535|R<<16,d=B,m=M,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[6],m=h[6],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[6]=B=S&65535|E<<16,h[6]=M=I&65535|R<<16,d=z,m=b,I=m&65535,R=m>>>16,S=d&65535,E=d>>>16,d=u[7],m=h[7],I+=m&65535,R+=m>>>16,S+=d&65535,E+=d>>>16,R+=I>>>16,S+=R>>>16,E+=S>>>16,u[7]=z=S&65535|E<<16,h[7]=b=I&65535|R<<16,g+=128,w-=128}return g}function o(a){var l=new n;l.update(a);var u=l.digest();return l.clean(),u}r.hash=o})(Pae),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSecretKeyToX25519=r.convertPublicKeyToX25519=r.verify=r.sign=r.extractPublicKeyFromSecretKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.SEED_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=r.SIGNATURE_LENGTH=void 0;const e=c1,t=Pae,n=Hc;r.SIGNATURE_LENGTH=64,r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=64,r.SEED_LENGTH=32;function i(K){const te=new Float64Array(16);if(K)for(let re=0;re>16&1),re[le-1]&=65535;re[15]=H[15]-32767-(re[14]>>16&1);const W=re[15]>>16&1;re[14]&=65535,C(H,re,1-W)}for(let U=0;U<16;U++)K[2*U]=H[U]&255,K[2*U+1]=H[U]>>8}function k(K,te){let re=0;for(let H=0;H<32;H++)re|=K[H]^te[H];return(1&re-1>>>8)-1}function N(K,te){const re=new Uint8Array(32),H=new Uint8Array(32);return T(re,K),T(H,te),k(re,H)}function O(K){const te=new Uint8Array(32);return T(te,K),te[0]&1}function B(K,te){for(let re=0;re<16;re++)K[re]=te[2*re]+(te[2*re+1]<<8);K[15]&=32767}function z(K,te,re){for(let H=0;H<16;H++)K[H]=te[H]+re[H]}function G(K,te,re){for(let H=0;H<16;H++)K[H]=te[H]-re[H]}function $(K,te,re){let H,U,W=0,le=0,de=0,Se=0,Me=0,ke=0,Ke=0,Re=0,je=0,De=0,Je=0,ze=0,qe=0,Ve=0,He=0,Be=0,Ge=0,Xe=0,se=0,J=0,X=0,ue=0,we=0,ye=0,Ie=0,it=0,ot=0,tt=0,It=0,st=0,Nt=0,Lt=re[0],ht=re[1],wt=re[2],Ut=re[3],ft=re[4],dt=re[5],Vt=re[6],xt=re[7],pt=re[8],Gt=re[9],gt=re[10],vt=re[11],Ft=re[12],lt=re[13],_t=re[14],Kt=re[15];H=te[0],W+=H*Lt,le+=H*ht,de+=H*wt,Se+=H*Ut,Me+=H*ft,ke+=H*dt,Ke+=H*Vt,Re+=H*xt,je+=H*pt,De+=H*Gt,Je+=H*gt,ze+=H*vt,qe+=H*Ft,Ve+=H*lt,He+=H*_t,Be+=H*Kt,H=te[1],le+=H*Lt,de+=H*ht,Se+=H*wt,Me+=H*Ut,ke+=H*ft,Ke+=H*dt,Re+=H*Vt,je+=H*xt,De+=H*pt,Je+=H*Gt,ze+=H*gt,qe+=H*vt,Ve+=H*Ft,He+=H*lt,Be+=H*_t,Ge+=H*Kt,H=te[2],de+=H*Lt,Se+=H*ht,Me+=H*wt,ke+=H*Ut,Ke+=H*ft,Re+=H*dt,je+=H*Vt,De+=H*xt,Je+=H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,st+=H*_t,Nt+=H*Kt,W+=38*Ge,le+=38*Xe,de+=38*se,Se+=38*J,Me+=38*X,ke+=38*ue,Ke+=38*we,Re+=38*ye,je+=38*Ie,De+=38*it,Je+=38*ot,ze+=38*tt,qe+=38*It,Ve+=38*st,He+=38*Nt,U=1,H=W+U+65535,U=Math.floor(H/65536),W=H-U*65536,H=le+U+65535,U=Math.floor(H/65536),le=H-U*65536,H=de+U+65535,U=Math.floor(H/65536),de=H-U*65536,H=Se+U+65535,U=Math.floor(H/65536),Se=H-U*65536,H=Me+U+65535,U=Math.floor(H/65536),Me=H-U*65536,H=ke+U+65535,U=Math.floor(H/65536),ke=H-U*65536,H=Ke+U+65535,U=Math.floor(H/65536),Ke=H-U*65536,H=Re+U+65535,U=Math.floor(H/65536),Re=H-U*65536,H=je+U+65535,U=Math.floor(H/65536),je=H-U*65536,H=De+U+65535,U=Math.floor(H/65536),De=H-U*65536,H=Je+U+65535,U=Math.floor(H/65536),Je=H-U*65536,H=ze+U+65535,U=Math.floor(H/65536),ze=H-U*65536,H=qe+U+65535,U=Math.floor(H/65536),qe=H-U*65536,H=Ve+U+65535,U=Math.floor(H/65536),Ve=H-U*65536,H=He+U+65535,U=Math.floor(H/65536),He=H-U*65536,H=Be+U+65535,U=Math.floor(H/65536),Be=H-U*65536,W+=U-1+37*(U-1),U=1,H=W+U+65535,U=Math.floor(H/65536),W=H-U*65536,H=le+U+65535,U=Math.floor(H/65536),le=H-U*65536,H=de+U+65535,U=Math.floor(H/65536),de=H-U*65536,H=Se+U+65535,U=Math.floor(H/65536),Se=H-U*65536,H=Me+U+65535,U=Math.floor(H/65536),Me=H-U*65536,H=ke+U+65535,U=Math.floor(H/65536),ke=H-U*65536,H=Ke+U+65535,U=Math.floor(H/65536),Ke=H-U*65536,H=Re+U+65535,U=Math.floor(H/65536),Re=H-U*65536,H=je+U+65535,U=Math.floor(H/65536),je=H-U*65536,H=De+U+65535,U=Math.floor(H/65536),De=H-U*65536,H=Je+U+65535,U=Math.floor(H/65536),Je=H-U*65536,H=ze+U+65535,U=Math.floor(H/65536),ze=H-U*65536,H=qe+U+65535,U=Math.floor(H/65536),qe=H-U*65536,H=Ve+U+65535,U=Math.floor(H/65536),Ve=H-U*65536,H=He+U+65535,U=Math.floor(H/65536),He=H-U*65536,H=Be+U+65535,U=Math.floor(H/65536),Be=H-U*65536,W+=U-1+37*(U-1),K[0]=W,K[1]=le,K[2]=de,K[3]=Se,K[4]=Me,K[5]=ke,K[6]=Ke,K[7]=Re,K[8]=je,K[9]=De,K[10]=Je,K[11]=ze,K[12]=qe,K[13]=Ve,K[14]=He,K[15]=Be}function D(K,te){$(K,te,te)}function V(K,te){const re=i();let H;for(H=0;H<16;H++)re[H]=te[H];for(H=253;H>=0;H--)D(re,re),H!==2&&H!==4&&$(re,re,te);for(H=0;H<16;H++)K[H]=re[H]}function Q(K,te){const re=i();let H;for(H=0;H<16;H++)re[H]=te[H];for(H=250;H>=0;H--)D(re,re),H!==1&&$(re,re,te);for(H=0;H<16;H++)K[H]=re[H]}function F(K,te){const re=i(),H=i(),U=i(),W=i(),le=i(),de=i(),Se=i(),Me=i(),ke=i();G(re,K[1],K[0]),G(ke,te[1],te[0]),$(re,re,ke),z(H,K[0],K[1]),z(ke,te[0],te[1]),$(H,H,ke),$(U,K[3],te[3]),$(U,U,u),$(W,K[2],te[2]),z(W,W,W),G(le,H,re),G(de,W,U),z(Se,W,U),z(Me,H,re),$(K[0],le,de),$(K[1],Me,Se),$(K[2],Se,de),$(K[3],le,Me)}function M(K,te,re){for(let H=0;H<4;H++)C(K[H],te[H],re)}function b(K,te){const re=i(),H=i(),U=i();V(U,te[2]),$(re,te[0],U),$(H,te[1],U),T(K,H),K[31]^=O(re)<<7}function d(K,te,re){w(K[0],o),w(K[1],a),w(K[2],a),w(K[3],o);for(let H=255;H>=0;--H){const U=re[H/8|0]>>(H&7)&1;M(K,te,U),F(te,K),F(K,K),M(K,te,U)}}function m(K,te){const re=[i(),i(),i(),i()];w(re[0],h),w(re[1],p),w(re[2],a),$(re[3],h,p),d(K,re,te)}function x(K){if(K.length!==r.SEED_LENGTH)throw new Error(`ed25519: seed must be ${r.SEED_LENGTH} bytes`);const te=(0,t.hash)(K);te[0]&=248,te[31]&=127,te[31]|=64;const re=new Uint8Array(32),H=[i(),i(),i(),i()];m(H,te),b(re,H);const U=new Uint8Array(64);return U.set(K),U.set(re,32),{publicKey:re,secretKey:U}}r.generateKeyPairFromSeed=x;function A(K){const te=(0,e.randomBytes)(32,K),re=x(te);return(0,n.wipe)(te),re}r.generateKeyPair=A;function I(K){if(K.length!==r.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${r.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(K.subarray(32))}r.extractPublicKeyFromSecretKey=I;const R=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function S(K,te){let re,H,U,W;for(H=63;H>=32;--H){for(re=0,U=H-32,W=H-12;U>4)*R[U],re=te[U]>>8,te[U]&=255;for(U=0;U<32;U++)te[U]-=re*R[U];for(H=0;H<32;H++)te[H+1]+=te[H]>>8,K[H]=te[H]&255}function E(K){const te=new Float64Array(64);for(let re=0;re<64;re++)te[re]=K[re];for(let re=0;re<64;re++)K[re]=0;S(K,te)}function _(K,te){const re=new Float64Array(64),H=[i(),i(),i(),i()],U=(0,t.hash)(K.subarray(0,32));U[0]&=248,U[31]&=127,U[31]|=64;const W=new Uint8Array(64);W.set(U.subarray(32),32);const le=new t.SHA512;le.update(W.subarray(32)),le.update(te);const de=le.digest();le.clean(),E(de),m(H,de),b(W,H),le.reset(),le.update(W.subarray(0,32)),le.update(K.subarray(32)),le.update(te);const Se=le.digest();E(Se);for(let Me=0;Me<32;Me++)re[Me]=de[Me];for(let Me=0;Me<32;Me++)for(let ke=0;ke<32;ke++)re[Me+ke]+=Se[Me]*U[ke];return S(W.subarray(32),re),W}r.sign=_;function L(K,te){const re=i(),H=i(),U=i(),W=i(),le=i(),de=i(),Se=i();return w(K[2],a),B(K[1],te),D(U,K[1]),$(W,U,l),G(U,U,K[2]),z(W,K[2],W),D(le,W),D(de,le),$(Se,de,le),$(re,Se,U),$(re,re,W),Q(re,re),$(re,re,U),$(re,re,W),$(re,re,W),$(K[0],re,W),D(H,K[0]),$(H,H,W),N(H,U)&&$(K[0],K[0],g),D(H,K[0]),$(H,H,W),N(H,U)?-1:(O(K[0])===te[31]>>7&&G(K[0],o,K[0]),$(K[3],K[0],K[1]),0)}function ie(K,te,re){const H=new Uint8Array(32),U=[i(),i(),i(),i()],W=[i(),i(),i(),i()];if(re.length!==r.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${r.SIGNATURE_LENGTH} bytes`);if(L(W,K))return!1;const le=new t.SHA512;le.update(re.subarray(0,32)),le.update(K),le.update(te);const de=le.digest();return E(de),d(U,W,de),m(W,re.subarray(32)),F(U,W),b(H,U),!k(re,H)}r.verify=ie;function q(K){let te=[i(),i(),i(),i()];if(L(te,K))throw new Error("Ed25519: invalid public key");let re=i(),H=i(),U=te[1];z(re,a,U),G(H,a,U),V(H,H),$(re,re,H);let W=new Uint8Array(32);return T(W,re),W}r.convertPublicKeyToX25519=q;function Y(K){const te=(0,t.hash)(K.subarray(0,32));te[0]&=248,te[31]&=127,te[31]|=64;const re=new Uint8Array(te.subarray(0,32));return(0,n.wipe)(te),re}r.convertSecretKeyToX25519=Y}(cB);const GPe="EdDSA",KPe="JWT",Oae=".",Dae="base64url",ZPe="utf8",JPe="utf8",YPe=":",QPe="did",XPe="key",$ae="base58btc",eOe="z",tOe="K36",rOe=32;function CS(r){return yi(Pi(gf(r),ZPe),Dae)}function lB(r){const e=Pi(tOe,$ae),t=eOe+yi(D6([e,r]),$ae);return[QPe,XPe,t].join(YPe)}function nOe(r){return yi(r,Dae)}function iOe(r){return Pi([CS(r.header),CS(r.payload)].join(Oae),JPe)}function sOe(r){return[CS(r.header),CS(r.payload),nOe(r.signature)].join(Oae)}function SS(r=c1.randomBytes(rOe)){return cB.generateKeyPairFromSeed(r)}async function Bae(r,e,t,n,i=Ye.fromMiliseconds(Date.now())){const s={alg:GPe,typ:KPe},o=lB(n.publicKey),a=i+t,l={iss:o,sub:r,aud:e,iat:i,exp:a},u=iOe({header:s,payload:l}),h=cB.sign(n.secretKey,u);return sOe({header:s,payload:l,signature:h})}const oOe="PARSE_ERROR",aOe="INVALID_REQUEST",cOe="METHOD_NOT_FOUND",lOe="INVALID_PARAMS",Lae="INTERNAL_ERROR",uB="SERVER_ERROR",uOe=[-32700,-32600,-32601,-32602,-32603],Q6={[oOe]:{code:-32700,message:"Parse error"},[aOe]:{code:-32600,message:"Invalid Request"},[cOe]:{code:-32601,message:"Method not found"},[lOe]:{code:-32602,message:"Invalid params"},[Lae]:{code:-32603,message:"Internal error"},[uB]:{code:-32e3,message:"Server error"}},Uae=uB;function hOe(r){return uOe.includes(r)}function Fae(r){return Object.keys(Q6).includes(r)?Q6[r]:Q6[Uae]}function fOe(r){const e=Object.values(Q6).find(t=>t.code===r);return e||Q6[Uae]}function jae(r,e,t){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${t} RPC url at ${e}`):r}var zae={},Hd={},Hae;function dOe(){if(Hae)return Hd;Hae=1,Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.isBrowserCryptoAvailable=Hd.getSubtleCrypto=Hd.getBrowerCrypto=void 0;function r(){return(ct==null?void 0:ct.crypto)||(ct==null?void 0:ct.msCrypto)||{}}Hd.getBrowerCrypto=r;function e(){const n=r();return n.subtle||n.webkitSubtle}Hd.getSubtleCrypto=e;function t(){return!!r()&&!!e()}return Hd.isBrowserCryptoAvailable=t,Hd}var qd={},qae;function pOe(){if(qae)return qd;qae=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.isBrowser=qd.isNode=qd.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}qd.isReactNative=r;function e(){return typeof yt<"u"&&typeof yt.versions<"u"&&typeof yt.versions.node<"u"}qd.isNode=e;function t(){return!r()&&!e()}return qd.isBrowser=t,qd}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Ju;e.__exportStar(dOe(),r),e.__exportStar(pOe(),r)})(zae);function Wd(r=3){const e=Date.now()*Math.pow(10,r),t=Math.floor(Math.random()*Math.pow(10,r));return e+t}function f1(r=6){return BigInt(Wd(r))}function Qu(r,e,t){return{id:t||Wd(),jsonrpc:"2.0",method:r,params:e}}function d1(r,e){return{id:r,jsonrpc:"2.0",result:e}}function py(r,e,t){return{id:r,jsonrpc:"2.0",error:gOe(e,t)}}function gOe(r,e){return typeof r>"u"?Fae(Lae):(typeof r=="string"&&(r=Object.assign(Object.assign({},Fae(uB)),{message:r})),typeof e<"u"&&(r.data=e),hOe(r.code)&&(r=fOe(r.code)),r)}class mOe{}class bOe extends mOe{constructor(){super()}}class wOe extends bOe{constructor(e){super()}}const vOe="^https?:",yOe="^wss?:";function xOe(r){const e=r.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Wae(r,e){const t=xOe(r);return typeof t>"u"?!1:new RegExp(e).test(t)}function Vae(r){return Wae(r,vOe)}function Gae(r){return Wae(r,yOe)}function _Oe(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function Kae(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function gy(r){return Kae(r)&&"method"in r}function Bm(r){return Kae(r)&&(xo(r)||As(r))}function xo(r){return"result"in r}function As(r){return"error"in r}class _o extends wOe{constructor(e){super(e),this.events=new pn.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Qu(e.method,e.params||[],e.id||f1().toString()),t)}async requestStrict(e,t){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{As(s)?i(s.error):n(s.result)});try{await this.connection.send(e,t)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Bm(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const EOe=()=>typeof WebSocket<"u"?WebSocket:typeof dr<"u"&&typeof dr.WebSocket<"u"?dr.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),AOe=()=>typeof WebSocket<"u"||typeof dr<"u"&&typeof dr.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",Zae=r=>r.split("?")[0],Jae=10,COe=EOe();let Yae=class{constructor(e){if(this.url=e,this.events=new pn.EventEmitter,this.registering=!1,!Gae(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(gf(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!Gae(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const i=new URLSearchParams(e).get("origin"),s=zae.isReactNative()?{headers:{origin:i}}:{rejectUnauthorized:!_Oe(e)},o=new COe(e,[],s);AOe()?o.onerror=a=>{const l=a;n(this.emitError(l.error))}:o.on("error",a=>{n(this.emitError(a))}),o.onopen=()=>{this.onOpen(o),t(o)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?hy(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=py(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return jae(e,Zae(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>Jae&&this.events.setMaxListeners(Jae)}emitError(e){const t=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${Zae(this.url)}`));return this.events.emit("register_error",t),t}};var X6={},SOe={get exports(){return X6},set exports(r){X6=r}};(function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",g="[object Error]",w="[object Function]",y="[object GeneratorFunction]",C="[object Map]",T="[object Number]",k="[object Null]",N="[object Object]",O="[object Promise]",B="[object Proxy]",z="[object RegExp]",G="[object Set]",$="[object String]",D="[object Symbol]",V="[object Undefined]",Q="[object WeakMap]",F="[object ArrayBuffer]",M="[object DataView]",b="[object Float32Array]",d="[object Float64Array]",m="[object Int8Array]",x="[object Int16Array]",A="[object Int32Array]",I="[object Uint8Array]",R="[object Uint8ClampedArray]",S="[object Uint16Array]",E="[object Uint32Array]",_=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,ie=/^(?:0|[1-9]\d*)$/,q={};q[b]=q[d]=q[m]=q[x]=q[A]=q[I]=q[R]=q[S]=q[E]=!0,q[a]=q[l]=q[F]=q[h]=q[M]=q[p]=q[g]=q[w]=q[C]=q[T]=q[N]=q[z]=q[G]=q[$]=q[Q]=!1;var Y=typeof ct=="object"&&ct&&ct.Object===Object&&ct,K=typeof self=="object"&&self&&self.Object===Object&&self,te=Y||K||Function("return this")(),re=e&&!e.nodeType&&e,H=re&&!0&&r&&!r.nodeType&&r,U=H&&H.exports===re,W=U&&Y.process,le=function(){try{return W&&W.binding&&W.binding("util")}catch{}}(),de=le&&le.isTypedArray;function Se(ve,Pe){for(var at=-1,nr=ve==null?0:ve.length,ii=0,$r=[];++at-1}function ri(ve,Pe){var at=this.__data__,nr=Qf(at,ve);return nr<0?(++this.size,at.push([ve,Pe])):at[nr][1]=Pe,this}Tt.prototype.clear=ur,Tt.prototype.delete=Xn,Tt.prototype.get=ei,Tt.prototype.has=ti,Tt.prototype.set=ri;function bn(ve){var Pe=-1,at=ve==null?0:ve.length;for(this.clear();++Peps))return!1;var Vn=$r.get(ve);if(Vn&&$r.get(Pe))return Vn==Pe;var si=-1,Jo=!0,Yi=at&s?new bi:void 0;for($r.set(ve,Pe),$r.set(Pe,ve);++si-1&&ve%1==0&&ve-1&&ve%1==0&&ve<=o}function A5(ve){var Pe=typeof ve;return ve!=null&&(Pe=="object"||Pe=="function")}function M0(ve){return ve!=null&&typeof ve=="object"}var C5=de?Re(de):sb;function m7(ve){return p7(ve)?nb(ve):ob(ve)}function Cr(){return[]}function _r(){return!1}r.exports=g7})(SOe,X6);function IOe(r,e){return e=e||{},new Promise(function(t,n){var i=new XMLHttpRequest,s=[],o=[],a={},l=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return s},entries:function(){return o},get:function(h){return a[h.toLowerCase()]},has:function(h){return h.toLowerCase()in a}}}};for(var u in i.open(e.method||"get",r,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,p,g){s.push(p=p.toLowerCase()),o.push([p,g]),a[p]=a[p]?a[p]+","+g:g}),t(l())},i.onerror=n,i.withCredentials=e.credentials=="include",e.headers)i.setRequestHeader(u,e.headers[u]);i.send(e.body||null)})}const Qae=ad(Object.freeze(Object.defineProperty({__proto__:null,default:IOe},Symbol.toStringTag,{value:"Module"})));var Xae=self.fetch||(self.fetch=Qae.default||Qae);function TOe(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,B=new Uint8Array(O);k!==N;){for(var z=y[k],G=0,$=O-1;(z!==0||G>>0,B[$]=z%a>>>0,z=z/a>>>0;if(z!==0)throw new Error("Non-zero carry");T=G,k++}for(var D=O-T;D!==O&&B[D]===0;)D++;for(var V=l.repeat(C);D>>0,O=new Uint8Array(N);y[C];){var B=t[y.charCodeAt(C)];if(B===255)return;for(var z=0,G=N-1;(B!==0||z>>0,O[G]=B%256>>>0,B=B/256>>>0;if(B!==0)throw new Error("Non-zero carry");k=z,C++}if(y[C]!==" "){for(var $=N-k;$!==N&&O[$]===0;)$++;for(var D=new Uint8Array(T+(N-$)),V=T;$!==N;)D[V++]=O[$++];return D}}}function w(y){var C=g(y);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:g,decode:w}}var ROe=TOe,kOe=ROe;const ece=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},MOe=r=>new TextEncoder().encode(r),NOe=r=>new TextDecoder().decode(r);let POe=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},OOe=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return tce(this,e)}},DOe=class{constructor(e){this.decoders=e}or(e){return tce(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const tce=(r,e)=>new DOe({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});let $Oe=class{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new POe(e,t,n),this.decoder=new OOe(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const IS=({name:r,prefix:e,encode:t,decode:n})=>new $Oe(r,e,t,n),e8=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=kOe(t,e);return IS({prefix:r,name:e,encode:n,decode:s=>ece(i(s))})},BOe=(r,e,t,n)=>{const i={};for(let h=0;h=8&&(a-=8,o[u++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},LOe=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)o-=t,s+=e[i&a>>o];if(o&&(s+=e[i&a<IS({prefix:e,name:r,encode(i){return LOe(i,n,t)},decode(i){return BOe(i,n,t,r)}}),UOe=IS({prefix:"\0",name:"identity",encode:r=>NOe(r),decode:r=>MOe(r)});var FOe=Object.freeze({__proto__:null,identity:UOe});const jOe=zo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var zOe=Object.freeze({__proto__:null,base2:jOe});const HOe=zo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var qOe=Object.freeze({__proto__:null,base8:HOe});const WOe=e8({prefix:"9",name:"base10",alphabet:"0123456789"});var VOe=Object.freeze({__proto__:null,base10:WOe});const GOe=zo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),KOe=zo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ZOe=Object.freeze({__proto__:null,base16:GOe,base16upper:KOe});const JOe=zo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),YOe=zo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),QOe=zo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),XOe=zo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),eDe=zo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),tDe=zo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rDe=zo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),nDe=zo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),iDe=zo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var sDe=Object.freeze({__proto__:null,base32:JOe,base32upper:YOe,base32pad:QOe,base32padupper:XOe,base32hex:eDe,base32hexupper:tDe,base32hexpad:rDe,base32hexpadupper:nDe,base32z:iDe});const oDe=e8({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),aDe=e8({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var cDe=Object.freeze({__proto__:null,base36:oDe,base36upper:aDe});const lDe=e8({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uDe=e8({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var hDe=Object.freeze({__proto__:null,base58btc:lDe,base58flickr:uDe});const fDe=zo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),dDe=zo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),pDe=zo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),gDe=zo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var mDe=Object.freeze({__proto__:null,base64:fDe,base64pad:dDe,base64url:pDe,base64urlpad:gDe});const rce=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),bDe=rce.reduce((r,e,t)=>(r[t]=e,r),[]),wDe=rce.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function vDe(r){return r.reduce((e,t)=>(e+=bDe[t],e),"")}function yDe(r){const e=[];for(const t of r){const n=wDe[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const xDe=IS({prefix:"🚀",name:"base256emoji",encode:vDe,decode:yDe});var _De=Object.freeze({__proto__:null,base256emoji:xDe}),EDe=ice,nce=128,ADe=127,CDe=~ADe,SDe=Math.pow(2,31);function ice(r,e,t){e=e||[],t=t||0;for(var n=t;r>=SDe;)e[t++]=r&255|nce,r/=128;for(;r&CDe;)e[t++]=r&255|nce,r>>>=7;return e[t]=r|0,ice.bytes=t-n+1,e}var IDe=hB,TDe=128,sce=127;function hB(r,n){var t=0,n=n||0,i=0,s=n,o,a=r.length;do{if(s>=a)throw hB.bytes=0,new RangeError("Could not decode varint");o=r[s++],t+=i<28?(o&sce)<=TDe);return hB.bytes=s-n,t}var RDe=Math.pow(2,7),kDe=Math.pow(2,14),MDe=Math.pow(2,21),NDe=Math.pow(2,28),PDe=Math.pow(2,35),ODe=Math.pow(2,42),DDe=Math.pow(2,49),$De=Math.pow(2,56),BDe=Math.pow(2,63),LDe=function(r){return r(oce.encode(r,e,t),e),cce=r=>oce.encodingLength(r),fB=(r,e)=>{const t=e.byteLength,n=cce(r),i=n+cce(t),s=new Uint8Array(i+t);return ace(r,s,0),ace(t,s,n),s.set(e,i),new FDe(r,t,e,s)};let FDe=class{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}};const lce=({name:r,code:e,encode:t})=>new jDe(r,e,t);let jDe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?fB(this.code,t):t.then(n=>fB(this.code,n))}else throw Error("Unknown type, must be binary type")}};const uce=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),zDe=lce({name:"sha2-256",code:18,encode:uce("SHA-256")}),HDe=lce({name:"sha2-512",code:19,encode:uce("SHA-512")});var qDe=Object.freeze({__proto__:null,sha256:zDe,sha512:HDe});const hce=0,WDe="identity",fce=ece;var VDe=Object.freeze({__proto__:null,identity:{code:hce,name:WDe,encode:fce,digest:r=>fB(hce,fce(r))}});new TextEncoder,new TextDecoder;const dce={...FOe,...zOe,...qOe,...VOe,...ZOe,...sDe,...cDe,...hDe,...mDe,..._De};({...qDe,...VDe});function pce(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function GDe(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?pce(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function gce(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const mce=gce("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),dB=gce("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=GDe(r.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=Wt("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Qoe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xoe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},T$e=class{constructor(e,t,n){this.core=e,this.logger=t,this.name=XDe,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),s=SS(i);return lB(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=uMe();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),o=SS(s),a=V$();return await Bae(a,i,e$e,o)},this.generateSharedKey=(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),l=hMe(a,s);return this.setSymKey(l,o)},this.setSymKey=async(i,s)=>{this.isInitialized();const o=s||fMe(i);return await this.keychain.set(o,i),o},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,s,o)=>{this.isInitialized();const a=Goe(o),l=gf(s);if(Koe(a)){const g=a.senderPublicKey,w=a.receiverPublicKey;i=await this.generateSharedKey(g,w)}const u=this.getSymKey(i),{type:h,senderPublicKey:p}=a;return pMe({type:h,symKey:u,message:l,senderPublicKey:p})},this.decode=async(i,s,o)=>{this.isInitialized();const a=bMe(s,o);if(Koe(a)){const l=a.receiverPublicKey,u=a.senderPublicKey;i=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(i),u=gMe({symKey:l,encoded:s});return hy(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}},this.getPayloadType=i=>{const s=dS(i);return j6(s.type)},this.getPayloadSenderPublicKey=i=>{const s=dS(i);return s.senderPublicKey?yi(s.senderPublicKey,Da):void 0},this.core=e,this.logger=gi(t,this.name),this.keychain=n||new I$e(this.core,this.logger)}get context(){return xi(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(wce)}catch{e=V$(),await this.keychain.set(wce,e)}return ZDe(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},R$e=class extends BPe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=n$e,this.version=i$e,this.initialized=!1,this.storagePrefix=p1,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const s=oy(i);let o=this.messages.get(n);return typeof o>"u"&&(o={}),typeof o[s]<"u"||(o[s]=i,this.messages.set(n,o),await this.persist()),s},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const s=this.get(n),o=oy(i);return typeof s[o]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=gi(e,this.name),this.core=t}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Qoe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Xoe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},k$e=class extends LPe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new pn.EventEmitter,this.name=o$e,this.queue=new Map,this.publishTimeout=Ye.toMiliseconds(Ye.TEN_SECONDS*2),this.needsTransportRestart=!1,this.publish=async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});try{const a=(s==null?void 0:s.ttl)||s$e,l=Z$(s),u=(s==null?void 0:s.prompt)||!1,h=(s==null?void 0:s.tag)||0,p=(s==null?void 0:s.id)||f1().toString(),g={topic:n,message:i,opts:{ttl:a,relay:l,prompt:u,tag:h,id:p}},w=setTimeout(()=>this.queue.set(p,g),this.publishTimeout);try{await await H6(this.rpcPublish(n,i,a,l,u,h,p),this.publishTimeout,`Failed to publish payload, please try again. id:${p} tag:${h}`),this.removeRequestFromQueue(p),this.relayer.events.emit(ga.publish,g)}catch(y){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(p),y;return}finally{clearTimeout(w)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}})}catch(a){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(a),a}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=gi(t,this.name),this.registerEventListeners()}get context(){return xi(this.logger)}rpcPublish(e,t,n,i,s,o,a){var l,u,h,p;const g={method:pS(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:s,tag:o},id:a};return $a((l=g.params)==null?void 0:l.prompt)&&((u=g.params)==null||delete u.prompt),$a((h=g.params)==null?void 0:h.tag)&&((p=g.params)==null||delete p.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g}),this.relayer.request(g)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:n,opts:i}=e;await this.publish(t,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(ga.connection_stalled);return}this.checkQueue()}),this.relayer.on(ga.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},M$e=class{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(s=>s!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}};var N$e=Object.defineProperty,P$e=Object.defineProperties,O$e=Object.getOwnPropertyDescriptors,_ce=Object.getOwnPropertySymbols,D$e=Object.prototype.hasOwnProperty,$$e=Object.prototype.propertyIsEnumerable,Ece=(r,e,t)=>e in r?N$e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,n8=(r,e)=>{for(var t in e||(e={}))D$e.call(e,t)&&Ece(r,t,e[t]);if(_ce)for(var t of _ce(e))$$e.call(e,t)&&Ece(r,t,e[t]);return r},bB=(r,e)=>P$e(r,O$e(e));let B$e=class extends jPe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new M$e,this.events=new pn.EventEmitter,this.name=g$e,this.version=m$e,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=p1,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=Z$(i),o={topic:n,relay:s};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s);return this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>{if(this.topics.includes(n))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${n}`;return await new Promise((s,o)=>{const a=new Ye.Watch;a.start(i);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),a.stop(i),s(!0)),a.elapsed(i)>=b$e&&(clearInterval(l),a.stop(i),o(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=gi(t,this.name),this.clientId=""}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const i=Z$(n);await this.rpcUnsubscribe(e,t,i);const s=Gi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,t){const n={method:pS(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await H6(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(ga.connection_stalled)}return oy(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,n={method:pS(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await H6(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(ga.connection_stalled)}}rpcUnsubscribe(e,t,n){const i={method:pS(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,bB(n8({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,n8({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,n8({},t)),this.topicMap.set(t.topic,e),this.events.emit(Xu.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=Wt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Xu.deleted,bB(n8({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Xu.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=Wt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);pf(t)&&this.onBatchSubscribe(t.map((n,i)=>bB(n8({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(ga.connect,async()=>{await this.onConnect()}),this.relayer.on(ga.disconnect,()=>{this.onDisconnect()}),this.events.on(Xu.created,async e=>{const t=Xu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(Xu.deleted,async e=>{const t=Xu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}};var L$e=Object.defineProperty,Ace=Object.getOwnPropertySymbols,U$e=Object.prototype.hasOwnProperty,F$e=Object.prototype.propertyIsEnumerable,Cce=(r,e,t)=>e in r?L$e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,j$e=(r,e)=>{for(var t in e||(e={}))U$e.call(e,t)&&Cce(r,t,e[t]);if(Ace)for(var t of Ace(e))F$e.call(e,t)&&Cce(r,t,e[t]);return r};let z$e=class extends UPe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new pn.EventEmitter,this.name=c$e,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async t=>{this.logger.debug("Publishing Request Payload");const n=t.id,i=this.provider.request(t);this.requestsInFlight.set(n,{promise:i,request:t});try{return await this.toEstablishConnection(),await i}catch(s){throw this.logger.debug("Failed to Publish Request"),this.logger.error(s),s}finally{this.requestsInFlight.delete(n)}},this.onPayloadHandler=t=>{this.onProviderPayload(t)},this.onConnectHandler=()=>{this.events.emit(ga.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(ga.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Vd.payload,this.onPayloadHandler),this.provider.on(Vd.connect,this.onConnectHandler),this.provider.on(Vd.disconnect,this.onDisconnectHandler),this.provider.on(Vd.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?gi(e.logger,this.name):mc(h1({level:e.logger||a$e})),this.messages=new R$e(this.logger,e.core),this.subscriber=new B$e(this,this.logger),this.publisher=new k$e(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||yce,this.projectId=e.projectId,this.bundleId=EMe(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${xce}...`),await this.restartTransport(xce)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},f$e)}get context(){return xi(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"";if(i)return i;let s;const o=a=>{a.topic===e&&(this.subscriber.off(Xu.created,o),s())};return await Promise.all([new Promise(a=>{s=a,this.subscriber.on(Xu.created,o)}),new Promise(async a=>{i=await this.subscriber.subscribe(e,t),a()})]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach(async e=>{await e.promise})),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await H6(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(t=>{if(!this.initialized)return t();this.subscriber.once(Xu.resubscribed,()=>{t()})}),new Promise(async(t,n)=>{try{await H6(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(i){n(i);return}t()})])}catch(t){this.logger.error(t);const n=t;if(!this.isConnectionStalled(n.message))throw t;this.provider.events.emit(Vd.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await hae())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new _o(new Yae(RMe({sdkVersion:h$e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),gy(e)){if(!e.method.endsWith(l$e))return;const t=e.params,{topic:n,message:i,publishedAt:s}=t.data,o={topic:n,message:i,publishedAt:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(j$e({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Bm(e)&&this.events.emit(ga.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(ga.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=d1(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Vd.payload,this.onPayloadHandler),this.provider.off(Vd.connect,this.onConnectHandler),this.provider.off(Vd.disconnect,this.onDisconnectHandler),this.provider.off(Vd.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(ga.connection_stalled,()=>{this.restartTransport().catch(t=>this.logger.error(t))});let e=await hae();ENe(async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(ga.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},Ye.toMiliseconds(u$e)))}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}};var H$e=Object.defineProperty,Sce=Object.getOwnPropertySymbols,q$e=Object.prototype.hasOwnProperty,W$e=Object.prototype.propertyIsEnumerable,Ice=(r,e,t)=>e in r?H$e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Tce=(r,e)=>{for(var t in e||(e={}))q$e.call(e,t)&&Ice(r,t,e[t]);if(Sce)for(var t of Sce(e))W$e.call(e,t)&&Ice(r,t,e[t]);return r};let TS=class extends FPe{constructor(e,t,n,i=p1,s=void 0){super(e,t,n,i),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=d$e,this.cached=[],this.initialized=!1,this.storagePrefix=p1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!$a(o)?this.map.set(this.getKey(o),o):eNe(o)?this.map.set(o.id,o):tNe(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(l=>X6(a[l],o[l]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const l=Tce(Tce({},this.getData(o)),a);this.map.set(o,l),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),await this.persist())},this.logger=gi(t,this.name),this.storagePrefix=i,this.getKey=s}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:n}=Wt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=Wt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},V$e=class{constructor(e,t){this.core=e,this.logger=t,this.name=w$e,this.version=v$e,this.events=new pn,this.initialized=!1,this.storagePrefix=p1,this.ignoredPayloadTypes=[Pm],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=V$(),i=await this.core.crypto.setSymKey(n),s=Gc(Ye.FIVE_MINUTES),o={protocol:vce},a={topic:i,expiry:s,relay:o,active:!1},l=WMe({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:o,expiryTimestamp:s});return await this.pairings.set(i,a),await this.core.relayer.subscribe(i),this.core.expirer.set(i,s),{topic:i,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:s,relay:o,expiryTimestamp:a}=iae(n.uri);let l;if(this.pairings.keys.includes(i)&&(l=this.pairings.get(i),l.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);const u=a||Gc(Ye.FIVE_MINUTES),h={topic:i,relay:o,expiry:u,active:!1};return await this.pairings.set(i,h),this.core.expirer.set(i,u),n.activatePairing&&await this.activate({topic:i}),this.events.emit(r8.create,h),this.core.crypto.keychain.has(i)||(await this.core.crypto.setSymKey(s,i),await this.core.relayer.subscribe(i,{relay:o})),h},this.activate=async({topic:n})=>{this.isInitialized();const i=Gc(Ye.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:l}=ly();this.events.once(Es("pairing_ping",s),({error:u})=>{u?l(u):a()}),await o()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Gi("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,s)=>{const o=Qu(i,s),a=await this.core.crypto.encode(n,o),l=t8[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,l),o.id},this.sendResult=async(n,i,s)=>{const o=d1(n,s),a=await this.core.crypto.encode(i,o),l=await this.core.history.get(i,n),u=t8[l.request.method].res;await this.core.relayer.publish(i,a,u),await this.core.history.resolve(o)},this.sendError=async(n,i,s)=>{const o=py(n,s),a=await this.core.crypto.encode(i,o),l=await this.core.history.get(i,n),u=t8[l.request.method]?t8[l.request.method].res:t8.unregistered_method.res;await this.core.relayer.publish(i,a,u),await this.core.history.resolve(o)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Gi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>u1(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(r8.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onPairingPingResponse=(n,i)=>{const{id:s}=i;setTimeout(()=>{xo(i)?this.events.emit(Es("pairing_ping",s),{}):As(i)&&this.events.emit(Es("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(r8.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=Gi("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Gi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var i;if(!pc(n)){const{message:o}=Wt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!XMe(n.uri)){const{message:o}=Wt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}const s=iae(n.uri);if(!((i=s==null?void 0:s.relay)!=null&&i.protocol)){const{message:o}=Wt("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(o)}if(!(s!=null&&s.symKey)){const{message:o}=Wt("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(o)}if(s!=null&&s.expiryTimestamp&&Ye.toMiliseconds(s==null?void 0:s.expiryTimestamp){if(!pc(n)){const{message:s}=Wt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!pc(n)){const{message:s}=Wt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!vo(n,!1)){const{message:i}=Wt("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Wt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(u1(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Wt("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=gi(t,this.name),this.pairings=new TS(this.core,this.logger,this.name,this.storagePrefix)}get context(){return xi(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(ga.message,async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(t,n);try{gy(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):Bm(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(Ql.expired,async e=>{const{topic:t}=tae(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(r8.expire,{topic:t}))})}},G$e=class extends $Pe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new pn.EventEmitter,this.name=y$e,this.version=x$e,this.cached=[],this.initialized=!1,this.storagePrefix=p1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:Gc(Ye.THIRTY_DAYS)};this.records.set(o.id,o),this.events.emit(bf.created,o)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=As(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(bf.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(bf.deleted,s)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:Qu(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=Wt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(bf.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=Wt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(bf.created,e=>{const t=bf.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(bf.updated,e=>{const t=bf.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(bf.deleted,e=>{const t=bf.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{Ye.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},K$e=class extends zPe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new pn.EventEmitter,this.name=_$e,this.version=E$e,this.cached=[],this.initialized=!1,this.storagePrefix=p1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Ql.created,{target:s,expiration:o})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Ql.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return kMe(e);if(typeof e=="number")return MMe(e);const{message:t}=Wt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ql.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=Wt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=Wt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;Ye.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Ql.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Ql.created,e=>{const t=Ql.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Ql.expired,e=>{const t=Ql.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Ql.deleted,e=>{const t=Ql.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}}},Z$e=class extends HPe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=gB,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||ay()||!cy())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s)}if(!this.initialized){this.removeIframe(),this.verifyUrl=mB;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let s;try{s=await this.fetchAttestation(n.attestationId,i)}catch(o){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(o),s=await this.fetchAttestation(n.attestationId,mB)}return s},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const s=this.startAbortTimer(Ye.ONE_SECOND*2),o=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(s),o.status===200?await o.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=s=>{s.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(s=>{if(document.getElementById(gB))return s();window.addEventListener("message",i);const o=document.createElement("iframe");o.id=gB,o.src=`${this.verifyUrl}/${this.projectId}`,o.style.display="none",document.body.append(o),this.iframe=o,n=s}),new Promise((s,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},Ye.toMiliseconds(Ye.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||my;return A$e.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${my}`),i=my),i},this.logger=gi(t,this.name),this.verifyUrl=my,this.abortController=new AbortController,this.isDevEnv=G$()&&yt.env.IS_VITEST}get context(){return xi(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Ye.toMiliseconds(e))}},J$e=class extends qPe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=C$e,this.registerDeviceToken=async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,l=`${S$e}/${this.projectId}/clients`;await Xae(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})},this.logger=gi(t,this.context)}};var Y$e=Object.defineProperty,Rce=Object.getOwnPropertySymbols,Q$e=Object.prototype.hasOwnProperty,X$e=Object.prototype.propertyIsEnumerable,kce=(r,e,t)=>e in r?Y$e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Mce=(r,e)=>{for(var t in e||(e={}))Q$e.call(e,t)&&kce(r,t,e[t]);if(Rce)for(var t of Rce(e))X$e.call(e,t)&&kce(r,t,e[t]);return r};let Nce=class extends DPe{constructor(e){super(e),this.protocol=bce,this.version=JDe,this.name=pB,this.events=new pn.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||yce,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:mc(h1({level:(e==null?void 0:e.logger)||YDe.logger}));this.logger=gi(t,this.name),this.heartbeat=new Yu.HeartBeat,this.crypto=new T$e(this,this.logger,e==null?void 0:e.keychain),this.history=new G$e(this,this.logger),this.expirer=new K$e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new wae(Mce(Mce({},QDe),e==null?void 0:e.storageOptions)),this.relayer=new z$e({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new V$e(this,this.logger),this.verify=new Z$e(this.projectId||"",this.logger),this.echoClient=new J$e(this.projectId||"",this.logger)}static async init(e){const t=new Nce(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(p$e,n),t}get context(){return xi(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}};const eBe=Nce,Pce="wc",Oce=2,Dce="client",wB=`${Pce}@${Oce}:${Dce}:`,vB={name:Dce,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},$ce="WALLETCONNECT_DEEPLINK_CHOICE",tBe="proposal",Bce="Proposal expired",rBe="session",RS=Ye.SEVEN_DAYS,nBe="engine",Gd={wc_sessionPropose:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Ye.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Ye.THIRTY_SECONDS,prompt:!1,tag:1115}}},yB={min:Ye.FIVE_MINUTES,max:Ye.SEVEN_DAYS},Kd={idle:"IDLE",active:"ACTIVE"},iBe="request",sBe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var oBe=Object.defineProperty,aBe=Object.defineProperties,cBe=Object.getOwnPropertyDescriptors,Lce=Object.getOwnPropertySymbols,lBe=Object.prototype.hasOwnProperty,uBe=Object.prototype.propertyIsEnumerable,Uce=(r,e,t)=>e in r?oBe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ba=(r,e)=>{for(var t in e||(e={}))lBe.call(e,t)&&Uce(r,t,e[t]);if(Lce)for(var t of Lce(e))uBe.call(e,t)&&Uce(r,t,e[t]);return r},by=(r,e)=>aBe(r,cBe(e));let hBe=class extends VPe{constructor(e){super(e),this.name=nBe,this.events=new pn,this.initialized=!1,this.ignoredPayloadTypes=[Pm],this.requestQueue={state:Kd.idle,queue:[]},this.sessionRequestQueue={state:Kd.idle,queue:[]},this.requestQueueDelay=Ye.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Gd)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Ye.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const n=by(Ba({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,relays:l}=n;let u=i,h,p=!1;if(u&&(p=this.client.core.pairing.pairings.get(u).active),!u||!p){const{topic:B,uri:z}=await this.client.core.pairing.create();u=B,h=z}const g=await this.client.core.crypto.generateKeyPair(),w=Gd.wc_sessionPropose.req.ttl||Ye.FIVE_MINUTES,y=Gc(w),C=Ba({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:vce}],proposer:{publicKey:g,metadata:this.client.metadata},expiryTimestamp:y},a&&{sessionProperties:a}),{reject:T,resolve:k,done:N}=ly(w,Bce);if(this.events.once(Es("session_connect"),async({error:B,session:z})=>{if(B)T(B);else if(z){z.self.publicKey=g;const G=by(Ba({},z),{requiredNamespaces:C.requiredNamespaces,optionalNamespaces:C.optionalNamespaces});await this.client.session.set(z.topic,G),await this.setExpiry(z.topic,z.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:z.peer.metadata}),k(G)}}),!u){const{message:B}=Wt("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(B)}const O=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:C,throwOnFailedPublish:!0});return await this.setProposal(O,Ba({id:O},C)),{uri:h,approval:N}},this.pair=async t=>(await this.isInitialized(),await this.client.core.pairing.pair(t)),this.approve=async t=>{await this.isInitialized(),await this.isValidApprove(t);const{id:n,relayProtocol:i,namespaces:s,sessionProperties:o}=t,a=this.client.proposal.get(n);let{pairingTopic:l,proposer:u,requiredNamespaces:h,optionalNamespaces:p}=a;l=l||"";const g=await this.client.core.crypto.generateKeyPair(),w=u.publicKey,y=await this.client.core.crypto.generateSharedKey(g,w);l&&n&&(await this.client.core.pairing.updateMetadata({topic:l,metadata:u.metadata}),await this.sendResult({id:n,topic:l,result:{relay:{protocol:i??"irn"},responderPublicKey:g}}),await this.client.proposal.delete(n,Gi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}));const C=Ba({relay:{protocol:i??"irn"},namespaces:s,pairingTopic:l,controller:{publicKey:g,metadata:this.client.metadata},expiry:Gc(RS)},o&&{sessionProperties:o});await this.client.core.relayer.subscribe(y);const T=by(Ba({},C),{topic:y,requiredNamespaces:h,optionalNamespaces:p,pairingTopic:l,acknowledged:!1,self:C.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:g});await this.client.session.set(y,T);try{await this.sendRequest({topic:y,method:"wc_sessionSettle",params:C,throwOnFailedPublish:!0})}catch(k){throw this.client.logger.error(k),this.client.session.delete(y,Gi("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(y),k}return await this.setExpiry(y,Gc(RS)),{topic:y,acknowledged:()=>new Promise(k=>setTimeout(()=>k(this.client.session.get(y)),500))}},this.reject=async t=>{await this.isInitialized(),await this.isValidReject(t);const{id:n,reason:i}=t,{pairingTopic:s}=this.client.proposal.get(n);s&&(await this.sendError(n,s,i),await this.client.proposal.delete(n,Gi("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized(),await this.isValidUpdate(t);const{topic:n,namespaces:i}=t,s=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:o,resolve:a,reject:l}=ly();return this.events.once(Es("session_update",s),({error:u})=>{u?l(u):a()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:o}},this.extend=async t=>{await this.isInitialized(),await this.isValidExtend(t);const{topic:n}=t,i=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:s,resolve:o,reject:a}=ly();return this.events.once(Es("session_extend",i),({error:l})=>{l?a(l):o()}),await this.setExpiry(n,Gc(RS)),{acknowledged:s}},this.request=async t=>{await this.isInitialized(),await this.isValidRequest(t);const{chainId:n,request:i,topic:s,expiry:o=Gd.wc_sessionRequest.req.ttl}=t,a=Wd(),{done:l,resolve:u,reject:h}=ly(o,"Request expired. Please try again.");return this.events.once(Es("session_request",a),({error:p,result:g})=>{p?h(p):u(g)}),await Promise.all([new Promise(async p=>{await this.sendRequest({clientRpcId:a,topic:s,method:"wc_sessionRequest",params:{request:by(Ba({},i),{expiryTimestamp:Gc(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(g=>h(g)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:a}),p()}),new Promise(async p=>{const g=await PMe(this.client.core.storage,$ce);NMe({id:a,topic:s,wcDeepLink:g}),p()}),l()]).then(p=>p[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:i}=t,{id:s}=i;xo(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0}):As(i)&&await this.sendError(s,n,i.error),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized(),await this.isValidPing(t);const{topic:n}=t;if(this.client.session.keys.includes(n)){const i=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:s,resolve:o,reject:a}=ly();this.events.once(Es("session_ping",i),({error:l})=>{l?a(l):o()}),await s()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:n,event:i,chainId:s}=t;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s}})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:n}=t;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:Gi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=Wt("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>YMe(n,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===t.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async t=>{const{topic:n,expirerHasDeleted:i=!1,emitEvent:s=!0,id:o=0}=t,{self:a}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await this.client.session.delete(n,Gi("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(n)&&await this.client.core.crypto.deleteSymKey(n),i||this.client.core.expirer.del(n),this.client.core.storage.removeItem($ce).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===n&&this.deletePendingSessionRequest(l.id,Gi("USER_DISCONNECTED"))}),s&&this.client.events.emit("session_delete",{id:o,topic:n})},this.deleteProposal=async(t,n)=>{await Promise.all([this.client.proposal.delete(t,Gi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)])},this.deletePendingSessionRequest=async(t,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==t),i&&(this.sessionRequestQueue.state=Kd.idle,this.client.events.emit("session_request_expire",{id:t}))},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:n}),this.client.core.expirer.set(t,n)},this.setProposal=async(t,n)=>{await this.client.proposal.set(t,n),this.client.core.expirer.set(t,Gc(Gd.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async t=>{const{id:n,topic:i,params:s,verifyContext:o}=t,a=s.request.expiryTimestamp||Gc(Gd.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o}),a&&this.client.core.expirer.set(n,a)},this.sendRequest=async t=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:l,throwOnFailedPublish:u}=t,h=Qu(i,s,l);if(cy()&&sBe.includes(i)){const w=oy(JSON.stringify(h));this.client.core.verify.register({attestationId:w})}const p=await this.client.core.crypto.encode(n,h),g=Gd[i].req;return o&&(g.ttl=o),a&&(g.id=a),this.client.core.history.set(n,h),u?(g.internal=by(Ba({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,p,g)):this.client.core.relayer.publish(n,p,g).catch(w=>this.client.logger.error(w)),h.id},this.sendResult=async t=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o}=t,a=d1(n,s),l=await this.client.core.crypto.encode(i,a),u=await this.client.core.history.get(i,n),h=Gd[u.request.method].res;o?(h.internal=by(Ba({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,l,h)):this.client.core.relayer.publish(i,l,h).catch(p=>this.client.logger.error(p)),await this.client.core.history.resolve(a)},this.sendError=async(t,n,i)=>{const s=py(t,i),o=await this.client.core.crypto.encode(n,s),a=await this.client.core.history.get(n,t),l=Gd[a.request.method].res;this.client.core.relayer.publish(n,o,l),await this.client.core.history.resolve(s)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;u1(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&t.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{u1(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...t.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===Kd.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Kd.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Kd.idle},this.processRequest=t=>{const{topic:n,payload:i}=t,s=i.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:i}=t,s=(await this.client.core.history.get(n,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:i}=Wt("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.onSessionProposeRequest=async(t,n)=>{const{params:i,id:s}=n;try{this.isValidConnect(Ba({},n.params));const o=i.expiryTimestamp||Gc(Gd.wc_sessionPropose.req.ttl),a=Ba({id:s,pairingTopic:t,expiryTimestamp:o},i);await this.setProposal(s,a);const l=oy(JSON.stringify(n)),u=await this.getVerifyContext(l,a.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:a,verifyContext:u})}catch(o){await this.sendError(s,t,o),this.client.logger.error(o)}},this.onSessionProposeResponse=async(t,n)=>{const{id:i}=n;if(xo(n)){const{result:s}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const a=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const l=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(a,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});const h=await this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:t})}else As(n)&&(await this.client.proposal.delete(i,Gi("USER_DISCONNECTED")),this.events.emit(Es("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:l,namespaces:u,sessionProperties:h,pairingTopic:p}=n.params,g=Ba({topic:t,relay:o,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:p,requiredNamespaces:{},optionalNamespaces:{},controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},h&&{sessionProperties:h});await this.sendResult({id:n.id,topic:t,result:!0}),this.events.emit(Es("session_connect"),{session:g}),this.cleanupDuplicatePairings(g)}catch(o){await this.sendError(i,t,o),this.client.logger.error(o)}},this.onSessionSettleResponse=async(t,n)=>{const{id:i}=n;xo(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(Es("session_approve",i),{})):As(n)&&(await this.client.session.delete(t,Gi("USER_DISCONNECTED")),this.events.emit(Es("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:i,id:s}=n;try{const o=`${t}_session_update`,a=mS.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidUpdate(Ba({topic:t},i)),await this.client.session.update(t,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:t,result:!0}),this.client.events.emit("session_update",{id:s,topic:t,params:i}),mS.set(o,s)}catch(o){await this.sendError(s,t,o),this.client.logger.error(o)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:i}=n;xo(n)?this.events.emit(Es("session_update",i),{}):As(n)&&this.events.emit(Es("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:i}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,Gc(RS)),await this.sendResult({id:i,topic:t,result:!0}),this.client.events.emit("session_extend",{id:i,topic:t})}catch(s){await this.sendError(i,t,s),this.client.logger.error(s)}},this.onSessionExtendResponse=(t,n)=>{const{id:i}=n;xo(n)?this.events.emit(Es("session_extend",i),{}):As(n)&&this.events.emit(Es("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:i}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:i,topic:t,result:!0}),this.client.events.emit("session_ping",{id:i,topic:t})}catch(s){await this.sendError(i,t,s),this.client.logger.error(s)}},this.onSessionPingResponse=(t,n)=>{const{id:i}=n;setTimeout(()=>{xo(n)?this.events.emit(Es("session_ping",i),{}):As(n)&&this.events.emit(Es("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(ga.publish,async()=>{s(await this.deleteSession({topic:t,id:i}))})}),this.sendResult({id:i,topic:t,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:Gi("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidRequest(Ba({topic:t},s));const o=oy(JSON.stringify(Qu("wc_sessionRequest",s,i))),a=this.client.session.get(t),l=await this.getVerifyContext(o,a.peer.metadata),u={id:i,topic:t,params:s,verifyContext:l};await this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(o){await this.sendError(i,t,o),this.client.logger.error(o)}},this.onSessionRequestResponse=(t,n)=>{const{id:i}=n;xo(n)?this.events.emit(Es("session_request",i),{result:n.result}):As(n)&&this.events.emit(Es("session_request",i),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:i,params:s}=n;try{const o=`${t}_session_event_${s.event.name}`,a=mS.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Ba({topic:t},s)),this.client.events.emit("session_event",{id:i,topic:t,params:s}),mS.set(o,i)}catch(o){await this.sendError(i,t,o),this.client.logger.error(o)}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Kd.idle,this.processSessionRequestQueue()},Ye.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===t&&s.request.method==="wc_sessionRequest").forEach(s=>{this.events.emit(Es("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Kd.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Kd.active,this.client.events.emit("session_request",t)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=t=>{if(t.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===t.topic);n&&this.onSessionProposeRequest(t.topic,Qu("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=async t=>{if(!pc(t)){const{message:l}=Wt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,relays:a}=t;if($a(n)||await this.isValidPairingTopic(n),!lNe(a,!0)){const{message:l}=Wt("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(l)}!$a(i)&&W6(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!$a(s)&&W6(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),$a(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(t,n)=>{const i=cNe(t,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async t=>{if(!pc(t))throw new Error(Wt("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o}=t;await this.isValidProposalId(n);const a=this.client.proposal.get(n),l=Q$(i,"approve()");if(l)throw new Error(l.message);const u=lae(a.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!vo(s,!0)){const{message:h}=Wt("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(h)}$a(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async t=>{if(!pc(t)){const{message:s}=Wt("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(s)}const{id:n,reason:i}=t;if(await this.isValidProposalId(n),!hNe(i)){const{message:s}=Wt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=t=>{if(!pc(t)){const{message:u}=Wt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(u)}const{relay:n,controller:i,namespaces:s,expiry:o}=t;if(!aae(n)){const{message:u}=Wt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const a=rNe(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const l=Q$(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(u1(o)){const{message:u}=Wt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async t=>{if(!pc(t)){const{message:l}=Wt("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(l)}const{topic:n,namespaces:i}=t;await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=Q$(i,"update()");if(o)throw new Error(o.message);const a=lae(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async t=>{if(!pc(t)){const{message:i}=Wt("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!pc(t)){const{message:l}=Wt("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(l)}const{topic:n,request:i,chainId:s,expiry:o}=t;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!cae(a,s)){const{message:l}=Wt("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!fNe(i)){const{message:l}=Wt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!gNe(a,s,i.method)){const{message:l}=Wt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(o&&!vNe(o,yB)){const{message:l}=Wt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${yB.min} and ${yB.max}`);throw new Error(l)}},this.isValidRespond=async t=>{var n;if(!pc(t)){const{message:o}=Wt("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(o)}const{topic:i,response:s}=t;try{await this.isValidSessionTopic(i)}catch(o){throw(n=t==null?void 0:t.response)!=null&&n.id&&this.cleanupAfterResponse(t),o}if(!dNe(s)){const{message:o}=Wt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}},this.isValidPing=async t=>{if(!pc(t)){const{message:i}=Wt("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!pc(t)){const{message:a}=Wt("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=t;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!cae(o,s)){const{message:a}=Wt("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!pNe(i)){const{message:a}=Wt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!mNe(o,s,i.name)){const{message:a}=Wt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidDisconnect=async t=>{if(!pc(t)){const{message:i}=Wt("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(t,n)=>{const i={verified:{verifyUrl:n.verifyUrl||my,validation:"UNKNOWN",origin:n.url||""}};try{const s=await this.client.core.verify.resolve({attestationId:t,verifyUrl:n.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(i=>{if(!vo(i,!1)){const{message:s}=Wt("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})}}async isInitialized(){if(!this.initialized){const{message:e}=Wt("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(ga.message,async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(t,n);try{gy(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):Bm(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(s){this.client.logger.error(s)}})}registerExpirerEvents(){this.client.core.expirer.on(Ql.expired,async e=>{const{topic:t,id:n}=tae(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Wt("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(r8.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!vo(e,!1)){const{message:t}=Wt("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Wt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(u1(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Wt("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!vo(e,!1)){const{message:t}=Wt("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=Wt("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(u1(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=Wt("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=Wt("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(vo(e,!1)){const{message:t}=Wt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=Wt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!uNe(e)){const{message:t}=Wt("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Wt("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(u1(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=Wt("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}},fBe=class extends TS{constructor(e,t){super(e,t,tBe,wB),this.core=e,this.logger=t}},dBe=class extends TS{constructor(e,t){super(e,t,rBe,wB),this.core=e,this.logger=t}},pBe=class extends TS{constructor(e,t){super(e,t,iBe,wB,n=>n.id),this.core=e,this.logger=t}},Fce=class extends WPe{constructor(e){super(e),this.protocol=Pce,this.version=Oce,this.name=vB.name,this.events=new pn.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(e==null?void 0:e.name)||vB.name,this.metadata=(e==null?void 0:e.metadata)||CMe();const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:mc(h1({level:(e==null?void 0:e.logger)||vB.logger}));this.core=(e==null?void 0:e.core)||new eBe(e),this.logger=gi(t,this.name),this.session=new dBe(this.core,this.logger),this.proposal=new fBe(this.core,this.logger),this.pendingRequest=new pBe(this.core,this.logger),this.engine=new hBe(this)}static async init(e){const t=new Fce(e);return await t.initialize(),t}get context(){return xi(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var kS={},gBe={get exports(){return kS},set exports(r){kS=r}};(function(r,e){var t=typeof self<"u"?self:ct,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(d){return d&&DataView.prototype.isPrototypeOf(d)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(d){return d&&u.indexOf(Object.prototype.toString.call(d))>-1};function p(d){if(typeof d!="string"&&(d=String(d)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(d))throw new TypeError("Invalid character in header field name");return d.toLowerCase()}function g(d){return typeof d!="string"&&(d=String(d)),d}function w(d){var m={next:function(){var x=d.shift();return{done:x===void 0,value:x}}};return a.iterable&&(m[Symbol.iterator]=function(){return m}),m}function y(d){this.map={},d instanceof y?d.forEach(function(m,x){this.append(x,m)},this):Array.isArray(d)?d.forEach(function(m){this.append(m[0],m[1])},this):d&&Object.getOwnPropertyNames(d).forEach(function(m){this.append(m,d[m])},this)}y.prototype.append=function(d,m){d=p(d),m=g(m);var x=this.map[d];this.map[d]=x?x+", "+m:m},y.prototype.delete=function(d){delete this.map[p(d)]},y.prototype.get=function(d){return d=p(d),this.has(d)?this.map[d]:null},y.prototype.has=function(d){return this.map.hasOwnProperty(p(d))},y.prototype.set=function(d,m){this.map[p(d)]=g(m)},y.prototype.forEach=function(d,m){for(var x in this.map)this.map.hasOwnProperty(x)&&d.call(m,this.map[x],x,this)},y.prototype.keys=function(){var d=[];return this.forEach(function(m,x){d.push(x)}),w(d)},y.prototype.values=function(){var d=[];return this.forEach(function(m){d.push(m)}),w(d)},y.prototype.entries=function(){var d=[];return this.forEach(function(m,x){d.push([x,m])}),w(d)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function C(d){if(d.bodyUsed)return Promise.reject(new TypeError("Already read"));d.bodyUsed=!0}function T(d){return new Promise(function(m,x){d.onload=function(){m(d.result)},d.onerror=function(){x(d.error)}})}function k(d){var m=new FileReader,x=T(m);return m.readAsArrayBuffer(d),x}function N(d){var m=new FileReader,x=T(m);return m.readAsText(d),x}function O(d){for(var m=new Uint8Array(d),x=new Array(m.length),A=0;A-1?m:d}function D(d,m){m=m||{};var x=m.body;if(d instanceof D){if(d.bodyUsed)throw new TypeError("Already read");this.url=d.url,this.credentials=d.credentials,m.headers||(this.headers=new y(d.headers)),this.method=d.method,this.mode=d.mode,this.signal=d.signal,!x&&d._bodyInit!=null&&(x=d._bodyInit,d.bodyUsed=!0)}else this.url=String(d);if(this.credentials=m.credentials||this.credentials||"same-origin",(m.headers||!this.headers)&&(this.headers=new y(m.headers)),this.method=$(m.method||this.method||"GET"),this.mode=m.mode||this.mode||null,this.signal=m.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}D.prototype.clone=function(){return new D(this,{body:this._bodyInit})};function V(d){var m=new FormData;return d.trim().split("&").forEach(function(x){if(x){var A=x.split("="),I=A.shift().replace(/\+/g," "),R=A.join("=").replace(/\+/g," ");m.append(decodeURIComponent(I),decodeURIComponent(R))}}),m}function Q(d){var m=new y,x=d.replace(/\r?\n[\t ]+/g," ");return x.split(/\r?\n/).forEach(function(A){var I=A.split(":"),R=I.shift().trim();if(R){var S=I.join(":").trim();m.append(R,S)}}),m}z.call(D.prototype);function F(d,m){m||(m={}),this.type="default",this.status=m.status===void 0?200:m.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in m?m.statusText:"OK",this.headers=new y(m.headers),this.url=m.url||"",this._initBody(d)}z.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},F.error=function(){var d=new F(null,{status:0,statusText:""});return d.type="error",d};var M=[301,302,303,307,308];F.redirect=function(d,m){if(M.indexOf(m)===-1)throw new RangeError("Invalid status code");return new F(null,{status:m,headers:{location:d}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(m,x){this.message=m,this.name=x;var A=Error(m);this.stack=A.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function b(d,m){return new Promise(function(x,A){var I=new D(d,m);if(I.signal&&I.signal.aborted)return A(new o.DOMException("Aborted","AbortError"));var R=new XMLHttpRequest;function S(){R.abort()}R.onload=function(){var E={status:R.status,statusText:R.statusText,headers:Q(R.getAllResponseHeaders()||"")};E.url="responseURL"in R?R.responseURL:E.headers.get("X-Request-URL");var _="response"in R?R.response:R.responseText;x(new F(_,E))},R.onerror=function(){A(new TypeError("Network request failed"))},R.ontimeout=function(){A(new TypeError("Network request failed"))},R.onabort=function(){A(new o.DOMException("Aborted","AbortError"))},R.open(I.method,I.url,!0),I.credentials==="include"?R.withCredentials=!0:I.credentials==="omit"&&(R.withCredentials=!1),"responseType"in R&&a.blob&&(R.responseType="blob"),I.headers.forEach(function(E,_){R.setRequestHeader(_,E)}),I.signal&&(I.signal.addEventListener("abort",S),R.onreadystatechange=function(){R.readyState===4&&I.signal.removeEventListener("abort",S)}),R.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return b.polyfill=!0,s.fetch||(s.fetch=b,s.Headers=y,s.Request=D,s.Response=F),o.Headers=y,o.Request=D,o.Response=F,o.fetch=b,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e})(gBe,kS);const jce=wwe(kS),zce={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Hce=10;class ma{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new pn.EventEmitter,this.isAvailable=!1,this.registering=!1,!Vae(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const n=gf(e),s=await(await jce(this.url,Object.assign(Object.assign({},zce),{body:n}))).json();this.onPayload({data:s})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!Vae(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=gf({id:1,jsonrpc:"2.0",method:"test",params:[]});await jce(e,Object.assign(Object.assign({},zce),{body:t}))}this.onOpen()}catch(t){const n=this.parseError(t);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?hy(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=py(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return jae(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Hce&&this.events.setMaxListeners(Hce)}}const qce="error",mBe="wss://relay.walletconnect.com",bBe="wc",wBe="universal_provider",Wce=`${bBe}@2:${wBe}:`,vBe="https://rpc.walletconnect.com/v1/",Zd={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var i8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},xB={exports:{}};/** + ***************************************************************************** */var WL=function(r,e){return WL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},WL(r,e)};function gze(r,e){WL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var VL=function(){return VL=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function wze(r,e){return function(t,n){e(t,n,r)}}function yze(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function xze(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(f){try{u(n.next(f))}catch(h){a(h)}}function l(f){try{u(n.throw(f))}catch(h){a(h)}}function u(f){f.done?s(f.value):i(f.value).then(o,l)}u((n=n.apply(r,e||[])).next())})}function _ze(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(f){return l([u,f])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yle(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return s}function Aze(){for(var r=[],e=0;e1||o(m,b)})})}function o(m,b){try{l(n[m](b))}catch(v){h(s[0][3],v)}}function l(m){m.value instanceof ix?Promise.resolve(m.value.v).then(u,f):h(s[0][2],m)}function u(m){o("next",m)}function f(m){o("throw",m)}function h(m,b){m(b),s.shift(),s.length&&o(s[0][0],s[0][1])}}function Tze(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=r[i]?function(a){return(t=!t)?{value:ix(r[i](a)),done:i==="return"}:s?s(a):a}:s}}function kze(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof GL=="function"?GL(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(a){return new Promise(function(o,l){a=r[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(u){s({value:u,done:o})},a)}}function Rze(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function Mze(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function Pze(r){return r&&r.__esModule?r:{default:r}}function Oze(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function Nze(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}const v0=Mh(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return VL},__asyncDelegator:Tze,__asyncGenerator:Ize,__asyncValues:kze,__await:ix,__awaiter:xze,__classPrivateFieldGet:Oze,__classPrivateFieldSet:Nze,__createBinding:Eze,__decorate:vze,__exportStar:Cze,__extends:gze,__generator:_ze,__importDefault:Pze,__importStar:Mze,__makeTemplateObject:Rze,__metadata:yze,__param:wze,__read:Yle,__rest:bze,__spread:Aze,__spreadArrays:Sze,__values:GL},Symbol.toStringTag,{value:"Module"})));var KL={},sx={},Qle;function Dze(){if(Qle)return sx;Qle=1,Object.defineProperty(sx,"__esModule",{value:!0}),sx.delay=void 0;function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}return sx.delay=r,sx}var wb={},ZL={},yb={},Xle;function $ze(){return Xle||(Xle=1,Object.defineProperty(yb,"__esModule",{value:!0}),yb.ONE_THOUSAND=yb.ONE_HUNDRED=void 0,yb.ONE_HUNDRED=100,yb.ONE_THOUSAND=1e3),yb}var JL={},eue;function Bze(){return eue||(eue=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=r.ONE_MINUTE*5,r.TEN_MINUTES=r.ONE_MINUTE*10,r.THIRTY_MINUTES=r.ONE_MINUTE*30,r.SIXTY_MINUTES=r.ONE_MINUTE*60,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=r.ONE_HOUR*3,r.SIX_HOURS=r.ONE_HOUR*6,r.TWELVE_HOURS=r.ONE_HOUR*12,r.TWENTY_FOUR_HOURS=r.ONE_HOUR*24,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=r.ONE_DAY*3,r.FIVE_DAYS=r.ONE_DAY*5,r.SEVEN_DAYS=r.ONE_DAY*7,r.THIRTY_DAYS=r.ONE_DAY*30,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=r.ONE_WEEK*2,r.THREE_WEEKS=r.ONE_WEEK*3,r.FOUR_WEEKS=r.ONE_WEEK*4,r.ONE_YEAR=r.ONE_DAY*365}(JL)),JL}var tue;function rue(){return tue||(tue=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=v0;e.__exportStar($ze(),r),e.__exportStar(Bze(),r)}(ZL)),ZL}var nue;function Lze(){if(nue)return wb;nue=1,Object.defineProperty(wb,"__esModule",{value:!0}),wb.fromMiliseconds=wb.toMiliseconds=void 0;const r=rue();function e(n){return n*r.ONE_THOUSAND}wb.toMiliseconds=e;function t(n){return Math.floor(n/r.ONE_THOUSAND)}return wb.fromMiliseconds=t,wb}var iue;function Uze(){return iue||(iue=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=v0;e.__exportStar(Dze(),r),e.__exportStar(Lze(),r)}(KL)),KL}var iy={},sue;function Fze(){if(sue)return iy;sue=1,Object.defineProperty(iy,"__esModule",{value:!0}),iy.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const n=this.get(t);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const i=Date.now()-n.started;this.timestamps.set(t,{started:n.started,elapsed:i})}get(t){const n=this.timestamps.get(t);if(typeof n>"u")throw new Error(`No timestamp found for label: ${t}`);return n}elapsed(t){const n=this.get(t);return n.elapsed||Date.now()-n.started}}return iy.Watch=r,iy.default=r,iy}var YL={},ax={},aue;function jze(){if(aue)return ax;aue=1,Object.defineProperty(ax,"__esModule",{value:!0}),ax.IWatch=void 0;class r{}return ax.IWatch=r,ax}var oue;function zze(){return oue||(oue=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),v0.__exportStar(jze(),r)}(YL)),YL}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=v0;e.__exportStar(Uze(),r),e.__exportStar(Fze(),r),e.__exportStar(zze(),r),e.__exportStar(rue(),r)})(qe);var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.getLocalStorage=Ni.getLocalStorageOrThrow=Ni.getCrypto=Ni.getCryptoOrThrow=QL=Ni.getLocation=Ni.getLocationOrThrow=ox=Ni.getNavigator=Ni.getNavigatorOrThrow=_b=Ni.getDocument=Ni.getDocumentOrThrow=Ni.getFromWindowOrThrow=Ni.getFromWindow=void 0;function xb(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}Ni.getFromWindow=xb;function sy(r){const e=xb(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}Ni.getFromWindowOrThrow=sy;function Hze(){return sy("document")}Ni.getDocumentOrThrow=Hze;function qze(){return xb("document")}var _b=Ni.getDocument=qze;function Wze(){return sy("navigator")}Ni.getNavigatorOrThrow=Wze;function Vze(){return xb("navigator")}var ox=Ni.getNavigator=Vze;function Gze(){return sy("location")}Ni.getLocationOrThrow=Gze;function Kze(){return xb("location")}var QL=Ni.getLocation=Kze;function Zze(){return sy("crypto")}Ni.getCryptoOrThrow=Zze;function Jze(){return xb("crypto")}Ni.getCrypto=Jze;function Yze(){return sy("localStorage")}Ni.getLocalStorageOrThrow=Yze;function Qze(){return xb("localStorage")}Ni.getLocalStorage=Qze;var XL={};Object.defineProperty(XL,"__esModule",{value:!0});var eU=XL.getWindowMetadata=void 0;const cue=Ni;function Xze(){let r,e;try{r=cue.getDocumentOrThrow(),e=cue.getLocationOrThrow()}catch{return null}function t(){const h=r.getElementsByTagName("link"),m=[];for(let b=0;b-1){const R=v.getAttribute("href");if(R)if(R.toLowerCase().indexOf("https:")===-1&&R.toLowerCase().indexOf("http:")===-1&&R.indexOf("//")!==0){let k=e.protocol+"//"+e.host;if(R.indexOf("/")===0)k+=R;else{const P=e.pathname.split("/");P.pop();const N=P.join("/");k+=N+"/"+R}m.push(k)}else if(R.indexOf("//")===0){const k=e.protocol+R;m.push(k)}else m.push(R)}}return m}function n(...h){const m=r.getElementsByTagName("meta");for(let b=0;bv.getAttribute(R)).filter(R=>R?h.includes(R):!1);if(C.length&&C){const R=v.getAttribute("content");if(R)return R}}return""}function i(){let h=n("name","og:site_name","og:title","twitter:title");return h||(h=r.title),h}function s(){return n("description","og:description","twitter:description","keywords")}const a=i(),o=s(),l=e.origin,u=t();return{description:o,url:l,icons:u,name:a}}eU=XL.getWindowMetadata=Xze;var w0={},eHe=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),lue="%[a-f0-9]{2}",uue=new RegExp("("+lue+")|([^%]+?)","gi"),fue=new RegExp("("+lue+")+","gi");function tU(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;var t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],tU(t),tU(n))}function tHe(r){try{return decodeURIComponent(r)}catch{for(var e=r.match(uue)||[],t=1;t{if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[r];const t=r.indexOf(e);return t===-1?[r]:[r.slice(0,t),r.slice(t+e.length)]},sHe=function(r,e){for(var t={},n=Object.keys(r),i=Array.isArray(e),s=0;sP==null,a=Symbol("encodeFragmentIdentifier");function o(P){switch(P.arrayFormat){case"index":return N=>($,j)=>{const G=$.length;return j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?$:j===null?[...$,[f(N,P),"[",G,"]"].join("")]:[...$,[f(N,P),"[",f(G,P),"]=",f(j,P)].join("")]};case"bracket":return N=>($,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?$:j===null?[...$,[f(N,P),"[]"].join("")]:[...$,[f(N,P),"[]=",f(j,P)].join("")];case"colon-list-separator":return N=>($,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?$:j===null?[...$,[f(N,P),":list="].join("")]:[...$,[f(N,P),":list=",f(j,P)].join("")];case"comma":case"separator":case"bracket-separator":{const N=P.arrayFormat==="bracket-separator"?"[]=":"=";return $=>(j,G)=>G===void 0||P.skipNull&&G===null||P.skipEmptyString&&G===""?j:(G=G===null?"":G,j.length===0?[[f($,P),N,f(G,P)].join("")]:[[j,f(G,P)].join(P.arrayFormatSeparator)])}default:return N=>($,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?$:j===null?[...$,f(N,P)]:[...$,[f(N,P),"=",f(j,P)].join("")]}}function l(P){let N;switch(P.arrayFormat){case"index":return($,j,G)=>{if(N=/\[(\d*)\]$/.exec($),$=$.replace(/\[\d*\]$/,""),!N){G[$]=j;return}G[$]===void 0&&(G[$]={}),G[$][N[1]]=j};case"bracket":return($,j,G)=>{if(N=/(\[\])$/.exec($),$=$.replace(/\[\]$/,""),!N){G[$]=j;return}if(G[$]===void 0){G[$]=[j];return}G[$]=[].concat(G[$],j)};case"colon-list-separator":return($,j,G)=>{if(N=/(:list)$/.exec($),$=$.replace(/:list$/,""),!N){G[$]=j;return}if(G[$]===void 0){G[$]=[j];return}G[$]=[].concat(G[$],j)};case"comma":case"separator":return($,j,G)=>{const U=typeof j=="string"&&j.includes(P.arrayFormatSeparator),L=typeof j=="string"&&!U&&h(j,P).includes(P.arrayFormatSeparator);j=L?h(j,P):j;const V=U||L?j.split(P.arrayFormatSeparator).map(te=>h(te,P)):j===null?j:h(j,P);G[$]=V};case"bracket-separator":return($,j,G)=>{const U=/(\[\])$/.test($);if($=$.replace(/\[\]$/,""),!U){G[$]=j&&h(j,P);return}const L=j===null?[]:j.split(P.arrayFormatSeparator).map(V=>h(V,P));if(G[$]===void 0){G[$]=L;return}G[$]=[].concat(G[$],L)};default:return($,j,G)=>{if(G[$]===void 0){G[$]=j;return}G[$]=[].concat(G[$],j)}}}function u(P){if(typeof P!="string"||P.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(P,N){return N.encode?N.strict?e(P):encodeURIComponent(P):P}function h(P,N){return N.decode?t(P):P}function m(P){return Array.isArray(P)?P.sort():typeof P=="object"?m(Object.keys(P)).sort((N,$)=>Number(N)-Number($)).map(N=>P[N]):P}function b(P){const N=P.indexOf("#");return N!==-1&&(P=P.slice(0,N)),P}function v(P){let N="";const $=P.indexOf("#");return $!==-1&&(N=P.slice($)),N}function C(P){P=b(P);const N=P.indexOf("?");return N===-1?"":P.slice(N+1)}function R(P,N){return N.parseNumbers&&!Number.isNaN(Number(P))&&typeof P=="string"&&P.trim()!==""?P=Number(P):N.parseBooleans&&P!==null&&(P.toLowerCase()==="true"||P.toLowerCase()==="false")&&(P=P.toLowerCase()==="true"),P}function k(P,N){N=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},N),u(N.arrayFormatSeparator);const $=l(N),j=Object.create(null);if(typeof P!="string"||(P=P.trim().replace(/^[?#&]/,""),!P))return j;for(const G of P.split("&")){if(G==="")continue;let[U,L]=n(N.decode?G.replace(/\+/g," "):G,"=");L=L===void 0?null:["comma","separator","bracket-separator"].includes(N.arrayFormat)?L:h(L,N),$(h(U,N),L,j)}for(const G of Object.keys(j)){const U=j[G];if(typeof U=="object"&&U!==null)for(const L of Object.keys(U))U[L]=R(U[L],N);else j[G]=R(U,N)}return N.sort===!1?j:(N.sort===!0?Object.keys(j).sort():Object.keys(j).sort(N.sort)).reduce((G,U)=>{const L=j[U];return L&&typeof L=="object"&&!Array.isArray(L)?G[U]=m(L):G[U]=L,G},Object.create(null))}r.extract=C,r.parse=k,r.stringify=(P,N)=>{if(!P)return"";N=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},N),u(N.arrayFormatSeparator);const $=L=>N.skipNull&&s(P[L])||N.skipEmptyString&&P[L]==="",j=o(N),G={};for(const L of Object.keys(P))$(L)||(G[L]=P[L]);const U=Object.keys(G);return N.sort!==!1&&U.sort(N.sort),U.map(L=>{const V=P[L];return V===void 0?"":V===null?f(L,N):Array.isArray(V)?V.length===0&&N.arrayFormat==="bracket-separator"?f(L,N)+"[]":V.reduce(j(L),[]).join("&"):f(L,N)+"="+f(V,N)}).filter(L=>L.length>0).join("&")},r.parseUrl=(P,N)=>{N=Object.assign({decode:!0},N);const[$,j]=n(P,"#");return Object.assign({url:$.split("?")[0]||"",query:k(C(P),N)},N&&N.parseFragmentIdentifier&&j?{fragmentIdentifier:h(j,N)}:{})},r.stringifyUrl=(P,N)=>{N=Object.assign({encode:!0,strict:!0,[a]:!0},N);const $=b(P.url).split("?")[0]||"",j=r.extract(P.url),G=r.parse(j,{sort:!1}),U=Object.assign(G,P.query);let L=r.stringify(U,N);L&&(L=`?${L}`);let V=v(P.url);return P.fragmentIdentifier&&(V=`#${N[a]?f(P.fragmentIdentifier,N):P.fragmentIdentifier}`),`${$}${L}${V}`},r.pick=(P,N,$)=>{$=Object.assign({parseFragmentIdentifier:!0,[a]:!1},$);const{url:j,query:G,fragmentIdentifier:U}=r.parseUrl(P,$);return r.stringifyUrl({url:j,query:i(G,N),fragmentIdentifier:U},$)},r.exclude=(P,N,$)=>{const j=Array.isArray(N)?G=>!N.includes(G):(G,U)=>!N(G,U);return r.pick(P,j,$)}})(w0);const due={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},aHe=":";function oHe(r){const[e,t]=r.split(aHe);return{namespace:e,reference:t}}function cHe(r,e=[]){const t=[];return Object.keys(r).forEach(n=>{if(e.length&&!e.includes(n))return;const i=r[n];t.push(...i.accounts)}),t}function hue(r,e){return r.includes(":")?[r]:e.chains||[]}const pue="base10",qo="base16",rU="base64pad",nU="utf8",mue=0,Eb=1,lHe=0,gue=1,iU=12,sU=32;function uHe(){const r=rx.generateKeyPair();return{privateKey:So(r.secretKey,qo),publicKey:So(r.publicKey,qo)}}function aU(){const r=Pd.randomBytes(sU);return So(r,qo)}function fHe(r,e){const t=rx.sharedKey(Ya(r,qo),Ya(e,qo),!0),n=new Bse(W1.SHA256,t).expand(sU);return So(n,qo)}function dHe(r){const e=W1.hash(Ya(r,qo));return So(e,qo)}function ay(r){const e=W1.hash(Ya(r,nU));return So(e,qo)}function hHe(r){return Ya(`${r}`,pue)}function cx(r){return Number(So(r,pue))}function pHe(r){const e=hHe(typeof r.type<"u"?r.type:mue);if(cx(e)===Eb&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?Ya(r.senderPublicKey,qo):void 0,n=typeof r.iv<"u"?Ya(r.iv,qo):Pd.randomBytes(iU),i=new G8.ChaCha20Poly1305(Ya(r.symKey,qo)).seal(n,Ya(r.message,nU));return gHe({type:e,sealed:i,iv:n,senderPublicKey:t})}function mHe(r){const e=new G8.ChaCha20Poly1305(Ya(r.symKey,qo)),{sealed:t,iv:n}=HI(r.encoded),i=e.open(n,t);if(i===null)throw new Error("Failed to decrypt");return So(i,nU)}function gHe(r){if(cx(r.type)===Eb){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return So(HL([r.type,r.senderPublicKey,r.iv,r.sealed]),rU)}return So(HL([r.type,r.iv,r.sealed]),rU)}function HI(r){const e=Ya(r,rU),t=e.slice(lHe,gue),n=gue;if(cx(t)===Eb){const o=n+sU,l=o+iU,u=e.slice(n,o),f=e.slice(o,l),h=e.slice(l);return{type:t,sealed:h,iv:f,senderPublicKey:u}}const i=n+iU,s=e.slice(n,i),a=e.slice(i);return{type:t,sealed:a,iv:s}}function bHe(r,e){const t=HI(r);return bue({type:cx(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?So(t.senderPublicKey,qo):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function bue(r){const e=(r==null?void 0:r.type)||mue;if(e===Eb){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function vue(r){return r.type===Eb&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}var vHe=Object.defineProperty,wue=Object.getOwnPropertySymbols,wHe=Object.prototype.hasOwnProperty,yHe=Object.prototype.propertyIsEnumerable,yue=(r,e,t)=>e in r?vHe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,xue=(r,e)=>{for(var t in e||(e={}))wHe.call(e,t)&&yue(r,t,e[t]);if(wue)for(var t of wue(e))yHe.call(e,t)&&yue(r,t,e[t]);return r};const xHe="ReactNative",al={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_He="js";function oU(){return typeof vt<"u"&&typeof vt.versions<"u"&&typeof vt.versions.node<"u"}function oy(){return!_b()&&!!ox()&&navigator.product===xHe}function cy(){return!oU()&&!!ox()&&!!_b()}function lx(){return oy()?al.reactNative:oU()?al.node:cy()?al.browser:al.unknown}function EHe(){var r;try{return oy()&&typeof sr<"u"&&typeof(sr==null?void 0:sr.Application)<"u"?(r=sr.Application)==null?void 0:r.applicationId:void 0}catch{return}}function CHe(r,e){let t=w0.parse(r);return t=xue(xue({},t),e),r=w0.stringify(t),r}function AHe(){return eU()||{name:"",description:"",url:"",icons:[""]}}function SHe(){if(lx()===al.reactNative&&typeof sr<"u"&&typeof(sr==null?void 0:sr.Platform)<"u"){const{OS:t,Version:n}=sr.Platform;return[t,n].join("-")}const r=Jle();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function IHe(){var r;const e=lx();return e===al.browser?[e,((r=QL())==null?void 0:r.host)||"unknown"].join(":"):e}function THe(r,e,t){const n=SHe(),i=IHe();return[[r,e].join("-"),[_He,t].join("-"),n,i].join("/")}function kHe({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:a,bundleId:o}){const l=t.split("?"),u=THe(r,e,n),f={auth:i,ua:u,projectId:s,useOnCloseEvent:a||void 0,origin:o||void 0},h=CHe(l[1]||"",f);return l[0]+"?"+h}function Cb(r,e){return r.filter(t=>e.includes(t)).length===r.length}function _ue(r){return Object.fromEntries(r.entries())}function Eue(r){return new Map(Object.entries(r))}function ly(r=qe.FIVE_MINUTES,e){const t=qe.toMiliseconds(r||qe.FIVE_MINUTES);let n,i,s;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a))},reject:a=>{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(e))},t),n=a,i=o})}}function ux(r,e,t){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(t)),e);try{const a=await r;n(a)}catch(a){i(a)}clearTimeout(s)})}function Cue(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function RHe(r){return Cue("topic",r)}function MHe(r){return Cue("id",r)}function Aue(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")n.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return n}function ol(r,e){return qe.fromMiliseconds(Date.now()+qe.toMiliseconds(r))}function V1(r){return Date.now()>=qe.toMiliseconds(r)}function Rs(r,e){return`${r}${e?`:${e}`:""}`}function cU(r=[],e=[]){return[...new Set([...r,...e])]}async function PHe({id:r,topic:e,wcDeepLink:t}){try{if(!t)return;const n=typeof t=="string"?JSON.parse(t):t;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${r}&sessionTopic=${e}`,a=lx();a===al.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):a===al.reactNative&&typeof(sr==null?void 0:sr.Linking)<"u"&&await sr.Linking.openURL(s)}catch(n){console.error(n)}}async function OHe(r,e){try{return await r.getItem(e)||(cy()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}const NHe="irn";function lU(r){return(r==null?void 0:r.relay)||{protocol:NHe}}function qI(r){const e=due[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var DHe=Object.defineProperty,$He=Object.defineProperties,BHe=Object.getOwnPropertyDescriptors,Sue=Object.getOwnPropertySymbols,LHe=Object.prototype.hasOwnProperty,UHe=Object.prototype.propertyIsEnumerable,Iue=(r,e,t)=>e in r?DHe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,FHe=(r,e)=>{for(var t in e||(e={}))LHe.call(e,t)&&Iue(r,t,e[t]);if(Sue)for(var t of Sue(e))UHe.call(e,t)&&Iue(r,t,e[t]);return r},jHe=(r,e)=>$He(r,BHe(e));function zHe(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),a=r[i];t[s]=a}}),t}function Tue(r){r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),s=typeof t<"u"?r.substring(t):"",a=w0.parse(s);return{protocol:n,topic:HHe(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:zHe(a),expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function HHe(r){return r.startsWith("//")?r.substring(2):r}function qHe(r,e="-"){const t="relay",n={};return Object.keys(r).forEach(i=>{const s=t+e+i;r[i]&&(n[s]=r[i])}),n}function WHe(r){return`${r.protocol}:${r.topic}@${r.version}?`+w0.stringify(jHe(FHe({symKey:r.symKey},qHe(r.relay)),{expiryTimestamp:r.expiryTimestamp}))}function uy(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}function VHe(r){const e=[];return Object.values(r).forEach(t=>{e.push(...uy(t.accounts))}),e}function GHe(r,e){const t=[];return Object.values(r).forEach(n=>{uy(n.accounts).includes(e)&&t.push(...n.methods)}),t}function KHe(r,e){const t=[];return Object.values(r).forEach(n=>{uy(n.accounts).includes(e)&&t.push(...n.events)}),t}function uU(r){return r.includes(":")}function fx(r){return uU(r)?r.split(":")[0]:r}const ZHe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},JHe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ht(r,e){const{message:t,code:n}=JHe[r];return{message:e?`${t} ${e}`:t,code:n}}function Qi(r,e){const{message:t,code:n}=ZHe[r];return{message:e?`${t} ${e}`:t,code:n}}function Dd(r,e){return!!Array.isArray(r)}function dx(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function Ac(r){return typeof r>"u"}function Sa(r,e){return e&&Ac(r)?!0:typeof r=="string"&&!!r.trim().length}function fU(r,e){return typeof r=="number"&&!isNaN(r)}function YHe(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let s=!0;return Cb(i,n)?(n.forEach(a=>{const{accounts:o,methods:l,events:u}=r.namespaces[a],f=uy(o),h=t[a];(!Cb(hue(a,h),f)||!Cb(h.methods,l)||!Cb(h.events,u))&&(s=!1)}),s):!1}function WI(r){return Sa(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function QHe(r){if(Sa(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&WI(t)}}return!1}function XHe(r){if(Sa(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}function eqe(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function tqe(r){return r==null?void 0:r.topic}function rqe(r,e){let t=null;return Sa(r==null?void 0:r.publicKey,!1)||(t=Ht("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function kue(r){let e=!0;return Dd(r)?r.length&&(e=r.every(t=>Sa(t,!1))):e=!1,e}function nqe(r,e,t){let n=null;return Dd(e)&&e.length?e.forEach(i=>{n||WI(i)||(n=Qi("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):WI(r)||(n=Qi("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function iqe(r,e,t){let n=null;return Object.entries(r).forEach(([i,s])=>{if(n)return;const a=nqe(i,hue(i,s),`${e} ${t}`);a&&(n=a)}),n}function sqe(r,e){let t=null;return Dd(r)?r.forEach(n=>{t||QHe(n)||(t=Qi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=Qi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function aqe(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=sqe(n==null?void 0:n.accounts,`${e} namespace`);i&&(t=i)}),t}function oqe(r,e){let t=null;return kue(r==null?void 0:r.methods)?kue(r==null?void 0:r.events)||(t=Qi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=Qi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function Rue(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=oqe(n,`${e}, namespace`);i&&(t=i)}),t}function cqe(r,e,t){let n=null;if(r&&dx(r)){const i=Rue(r,e);i&&(n=i);const s=iqe(r,e,t);s&&(n=s)}else n=Ht("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}function dU(r,e){let t=null;if(r&&dx(r)){const n=Rue(r,e);n&&(t=n);const i=aqe(r,e);i&&(t=i)}else t=Ht("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function Mue(r){return Sa(r.protocol,!0)}function lqe(r,e){let t=!1;return r?r&&Dd(r)&&r.length&&r.forEach(n=>{t=Mue(n)}):t=!0,t}function uqe(r){return typeof r=="number"}function Sc(r){return typeof r<"u"&&typeof r!==null}function fqe(r){return!(!r||typeof r!="object"||!r.code||!fU(r.code)||!r.message||!Sa(r.message,!1))}function dqe(r){return!(Ac(r)||!Sa(r.method,!1))}function hqe(r){return!(Ac(r)||Ac(r.result)&&Ac(r.error)||!fU(r.id)||!Sa(r.jsonrpc,!1))}function pqe(r){return!(Ac(r)||!Sa(r.name,!1))}function Pue(r,e){return!(!WI(e)||!VHe(r).includes(e))}function mqe(r,e,t){return Sa(t,!1)?GHe(r,e).includes(t):!1}function gqe(r,e,t){return Sa(t,!1)?KHe(r,e).includes(t):!1}function Oue(r,e,t){let n=null;const i=bqe(r),s=vqe(e),a=Object.keys(i),o=Object.keys(s),l=Nue(Object.keys(r)),u=Nue(Object.keys(e)),f=l.filter(h=>!u.includes(h));return f.length&&(n=Ht("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. + Required: ${f.toString()} + Received: ${Object.keys(e).toString()}`)),Cb(a,o)||(n=Ht("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. + Required: ${a.toString()} + Approved: ${o.toString()}`)),Object.keys(e).forEach(h=>{if(!h.includes(":")||n)return;const m=uy(e[h].accounts);m.includes(h)||(n=Ht("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${h} + Required: ${h} + Approved: ${m.toString()}`))}),a.forEach(h=>{n||(Cb(i[h].methods,s[h].methods)?Cb(i[h].events,s[h].events)||(n=Ht("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${h}`)):n=Ht("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${h}`))}),n}function bqe(r){const e={};return Object.keys(r).forEach(t=>{var n;t.includes(":")?e[t]=r[t]:(n=r[t].chains)==null||n.forEach(i=>{e[i]={methods:r[t].methods,events:r[t].events}})}),e}function Nue(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function vqe(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const n=uy(r[t].accounts);n==null||n.forEach(i=>{e[i]={accounts:r[t].accounts.filter(s=>s.includes(`${i}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function wqe(r,e){return fU(r)&&r<=e.max&&r>=e.min}function Due(){const r=lx();return new Promise(e=>{switch(r){case al.browser:e(yqe());break;case al.reactNative:e(xqe());break;case al.node:e(_qe());break;default:e(!0)}})}function yqe(){return cy()&&(navigator==null?void 0:navigator.onLine)}async function xqe(){if(oy()&&typeof sr<"u"&&sr!=null&&sr.NetInfo){const r=await(sr==null?void 0:sr.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function _qe(){return!0}function Eqe(r){switch(lx()){case al.browser:Cqe(r);break;case al.reactNative:Aqe(r);break}}function Cqe(r){!oy()&&cy()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function Aqe(r){oy()&&typeof sr<"u"&&sr!=null&&sr.NetInfo&&(sr==null||sr.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const hU={};let VI=class{static get(e){return hU[e]}static set(e,t){hU[e]=t}static delete(e){delete hU[e]}};const Sqe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Iqe=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Tqe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function kqe(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Rqe(r);return}return e}function Rqe(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function GI(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const n=t.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!Tqe.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(Sqe.test(r)||Iqe.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,kqe)}return JSON.parse(r)}catch(n){if(e.strict)throw n;return r}}function Mqe(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function Ia(r,...e){try{return Mqe(r(...e))}catch(t){return Promise.reject(t)}}function Pqe(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Oqe(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function KI(r){if(Pqe(r))return String(r);if(Oqe(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return KI(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function $ue(){if(typeof It===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const pU="base64:";function Nqe(r){if(typeof r=="string")return r;$ue();const e=It.from(r).toString("base64");return pU+e}function Dqe(r){return typeof r!="string"||!r.startsWith(pU)?r:($ue(),It.from(r.slice(pU.length),"base64"))}function Ic(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function $qe(...r){return Ic(r.join(":"))}function ZI(r){return r=Ic(r),r?r+":":""}function i2t(r){return r}const Bqe="memory",Lqe=()=>{const r=new Map;return{name:Bqe,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function Uqe(r={}){const e={mounts:{"":r.driver||Lqe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=u=>{for(const f of e.mountpoints)if(u.startsWith(f))return{base:f,relativeKey:u.slice(f.length),driver:e.mounts[f]};return{base:"",relativeKey:u,driver:e.mounts[""]}},n=(u,f)=>e.mountpoints.filter(h=>h.startsWith(u)||f&&u.startsWith(h)).map(h=>({relativeBase:u.length>h.length?u.slice(h.length):void 0,mountpoint:h,driver:e.mounts[h]})),i=(u,f)=>{if(e.watching){f=Ic(f);for(const h of e.watchListeners)h(u,f)}},s=async()=>{if(!e.watching){e.watching=!0;for(const u in e.mounts)e.unwatch[u]=await Bue(e.mounts[u],i,u)}},a=async()=>{if(e.watching){for(const u in e.unwatch)await e.unwatch[u]();e.unwatch={},e.watching=!1}},o=(u,f,h)=>{const m=new Map,b=v=>{let C=m.get(v.base);return C||(C={driver:v.driver,base:v.base,items:[]},m.set(v.base,C)),C};for(const v of u){const C=typeof v=="string",R=Ic(C?v:v.key),k=C?void 0:v.value,P=C||!v.options?f:{...f,...v.options},N=t(R);b(N).items.push({key:R,value:k,relativeKey:N.relativeKey,options:P})}return Promise.all([...m.values()].map(v=>h(v))).then(v=>v.flat())},l={hasItem(u,f={}){u=Ic(u);const{relativeKey:h,driver:m}=t(u);return Ia(m.hasItem,h,f)},getItem(u,f={}){u=Ic(u);const{relativeKey:h,driver:m}=t(u);return Ia(m.getItem,h,f).then(b=>GI(b))},getItems(u,f){return o(u,f,h=>h.driver.getItems?Ia(h.driver.getItems,h.items.map(m=>({key:m.relativeKey,options:m.options})),f).then(m=>m.map(b=>({key:$qe(h.base,b.key),value:GI(b.value)}))):Promise.all(h.items.map(m=>Ia(h.driver.getItem,m.relativeKey,m.options).then(b=>({key:m.key,value:GI(b)})))))},getItemRaw(u,f={}){u=Ic(u);const{relativeKey:h,driver:m}=t(u);return m.getItemRaw?Ia(m.getItemRaw,h,f):Ia(m.getItem,h,f).then(b=>Dqe(b))},async setItem(u,f,h={}){if(f===void 0)return l.removeItem(u);u=Ic(u);const{relativeKey:m,driver:b}=t(u);b.setItem&&(await Ia(b.setItem,m,KI(f),h),b.watch||i("update",u))},async setItems(u,f){await o(u,f,async h=>{if(h.driver.setItems)return Ia(h.driver.setItems,h.items.map(m=>({key:m.relativeKey,value:KI(m.value),options:m.options})),f);h.driver.setItem&&await Promise.all(h.items.map(m=>Ia(h.driver.setItem,m.relativeKey,KI(m.value),m.options)))})},async setItemRaw(u,f,h={}){if(f===void 0)return l.removeItem(u,h);u=Ic(u);const{relativeKey:m,driver:b}=t(u);if(b.setItemRaw)await Ia(b.setItemRaw,m,f,h);else if(b.setItem)await Ia(b.setItem,m,Nqe(f),h);else return;b.watch||i("update",u)},async removeItem(u,f={}){typeof f=="boolean"&&(f={removeMeta:f}),u=Ic(u);const{relativeKey:h,driver:m}=t(u);m.removeItem&&(await Ia(m.removeItem,h,f),(f.removeMeta||f.removeMata)&&await Ia(m.removeItem,h+"$",f),m.watch||i("remove",u))},async getMeta(u,f={}){typeof f=="boolean"&&(f={nativeOnly:f}),u=Ic(u);const{relativeKey:h,driver:m}=t(u),b=Object.create(null);if(m.getMeta&&Object.assign(b,await Ia(m.getMeta,h,f)),!f.nativeOnly){const v=await Ia(m.getItem,h+"$",f).then(C=>GI(C));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(b,v))}return b},setMeta(u,f,h={}){return this.setItem(u+"$",f,h)},removeMeta(u,f={}){return this.removeItem(u+"$",f)},async getKeys(u,f={}){u=ZI(u);const h=n(u,!0);let m=[];const b=[];for(const v of h){const R=(await Ia(v.driver.getKeys,v.relativeBase,f)).map(k=>v.mountpoint+Ic(k)).filter(k=>!m.some(P=>k.startsWith(P)));b.push(...R),m=[v.mountpoint,...m.filter(k=>!k.startsWith(v.mountpoint))]}return u?b.filter(v=>v.startsWith(u)&&!v.endsWith("$")):b.filter(v=>!v.endsWith("$"))},async clear(u,f={}){u=ZI(u),await Promise.all(n(u,!1).map(async h=>{if(h.driver.clear)return Ia(h.driver.clear,h.relativeBase,f);if(h.driver.removeItem){const m=await h.driver.getKeys(h.relativeBase||"",f);return Promise.all(m.map(b=>h.driver.removeItem(b,f)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(u=>Lue(u)))},async watch(u){return await s(),e.watchListeners.push(u),async()=>{e.watchListeners=e.watchListeners.filter(f=>f!==u),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(u,f){if(u=ZI(u),u&&e.mounts[u])throw new Error(`already mounted at ${u}`);return u&&(e.mountpoints.push(u),e.mountpoints.sort((h,m)=>m.length-h.length)),e.mounts[u]=f,e.watching&&Promise.resolve(Bue(f,i,u)).then(h=>{e.unwatch[u]=h}).catch(console.error),l},async unmount(u,f=!0){u=ZI(u),!(!u||!e.mounts[u])&&(e.watching&&u in e.unwatch&&(e.unwatch[u](),delete e.unwatch[u]),f&&await Lue(e.mounts[u]),e.mountpoints=e.mountpoints.filter(h=>h!==u),delete e.mounts[u])},getMount(u=""){u=Ic(u)+":";const f=t(u);return{driver:f.driver,base:f.base}},getMounts(u="",f={}){return u=Ic(u),n(u,f.parents).map(m=>({driver:m.driver,base:m.mountpoint}))}};return l}function Bue(r,e,t){return r.watch?r.watch((n,i)=>e(n,t+i)):()=>{}}async function Lue(r){typeof r.dispose=="function"&&await Ia(r.dispose)}function Ab(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Uue(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const n=Ab(t);return(i,s)=>n.then(a=>s(a.transaction(e,i).objectStore(e)))}let mU;function hx(){return mU||(mU=Uue("keyval-store","keyval")),mU}function Fue(r,e=hx()){return e("readonly",t=>Ab(t.get(r)))}function Fqe(r,e,t=hx()){return t("readwrite",n=>(n.put(e,r),Ab(n.transaction)))}function jqe(r,e=hx()){return e("readwrite",t=>(t.delete(r),Ab(t.transaction)))}function zqe(r=hx()){return r("readwrite",e=>(e.clear(),Ab(e.transaction)))}function Hqe(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Ab(r.transaction)}function qqe(r=hx()){return r("readonly",e=>{if(e.getAllKeys)return Ab(e.getAllKeys());const t=[];return Hqe(e,n=>t.push(n.key)).then(()=>t)})}const Wqe=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Vqe=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function G1(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Vqe(r)}catch{return r}}function $d(r){return typeof r=="string"?r:Wqe(r)||""}const Gqe="idb-keyval";var Kqe=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=i=>e+i;let n;return r.dbName&&r.storeName&&(n=Uue(r.dbName,r.storeName)),{name:Gqe,options:r,async hasItem(i){return!(typeof await Fue(t(i),n)>"u")},async getItem(i){return await Fue(t(i),n)??null},setItem(i,s){return Fqe(t(i),s,n)},removeItem(i){return jqe(t(i),n)},getKeys(){return qqe(n)},clear(){return zqe(n)}}};const Zqe="WALLET_CONNECT_V2_INDEXED_DB",Jqe="keyvaluestorage";let Yqe=class{constructor(){this.indexedDb=Uqe({driver:Kqe({dbName:Zqe,storeName:Jqe})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,$d(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};var gU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof sr<"u"?sr:typeof self<"u"?self:{},JI={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,n){this[t]=String(n)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(n){t[n]=void 0,delete t[n]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof gU<"u"&&gU.localStorage?JI.exports=gU.localStorage:typeof window<"u"&&window.localStorage?JI.exports=window.localStorage:JI.exports=new e})();function Qqe(r){var e;return[r[0],G1((e=r[1])!=null?e:"")]}let Xqe=class{constructor(){this.localStorage=JI.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Qqe)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return G1(t)}async setItem(e,t){this.localStorage.setItem(e,$d(t))}async removeItem(e){this.localStorage.removeItem(e)}};const eWe="wc_storage_version",jue=1,tWe=async(r,e,t)=>{const n=eWe,i=await e.getItem(n);if(i&&i>=jue){t(e);return}const s=await r.getKeys();if(!s.length){t(e);return}const a=[];for(;s.length;){const o=s.shift();if(!o)continue;const l=o.toLowerCase();if(l.includes("wc@")||l.includes("walletconnect")||l.includes("wc_")||l.includes("wallet_connect")){const u=await r.getItem(o);await e.setItem(o,u),a.push(o)}}await e.setItem(n,jue),t(e),rWe(r,a)},rWe=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let zue=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new Xqe;this.storage=e;try{const t=new Yqe;tWe(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var fy={},px={},bU={},mx={};class Tc{}const nWe=Mh(Object.freeze(Object.defineProperty({__proto__:null,IEvents:Tc},Symbol.toStringTag,{value:"Module"})));var Hue;function iWe(){if(Hue)return mx;Hue=1,Object.defineProperty(mx,"__esModule",{value:!0}),mx.IHeartBeat=void 0;const r=nWe;class e extends r.IEvents{constructor(n){super()}}return mx.IHeartBeat=e,mx}var que;function Wue(){return que||(que=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),v0.__exportStar(iWe(),r)}(bU)),bU}var vU={},Sb={},Vue;function sWe(){if(Vue)return Sb;Vue=1,Object.defineProperty(Sb,"__esModule",{value:!0}),Sb.HEARTBEAT_EVENTS=Sb.HEARTBEAT_INTERVAL=void 0;const r=qe;return Sb.HEARTBEAT_INTERVAL=r.FIVE_SECONDS,Sb.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Sb}var Gue;function Kue(){return Gue||(Gue=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),v0.__exportStar(sWe(),r)}(vU)),vU}var Zue;function aWe(){if(Zue)return px;Zue=1,Object.defineProperty(px,"__esModule",{value:!0}),px.HeartBeat=void 0;const r=v0,e=Xn,t=qe,n=Wue(),i=Kue();class s extends n.IHeartBeat{constructor(o){super(o),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(o==null?void 0:o.interval)||i.HEARTBEAT_INTERVAL}static init(o){return r.__awaiter(this,void 0,void 0,function*(){const l=new s(o);return yield l.init(),l})}init(){return r.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(o,l){this.events.on(o,l)}once(o,l){this.events.once(o,l)}off(o,l){this.events.off(o,l)}removeListener(o,l){this.events.removeListener(o,l)}initialize(){return r.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),t.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return px.HeartBeat=s,px}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=v0;e.__exportStar(aWe(),r),e.__exportStar(Wue(),r),e.__exportStar(Kue(),r)})(fy);function oWe(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}var cWe=lWe;function lWe(r,e,t){var n=t&&t.stringify||oWe,i=1;if(typeof r=="object"&&r!==null){var s=e.length+i;if(s===1)return r;var a=new Array(s);a[0]=n(r);for(var o=1;o-1?h:0,r.charCodeAt(b+1)){case 100:case 102:if(f>=l||e[f]==null)break;h=l||e[f]==null)break;h=l||e[f]===void 0)break;h",h=b+2,b++;break}u+=n(e[f]),h=b+2,b++;break;case 115:if(f>=l)break;h-1&&(s=!1);const a=["error","fatal","warn","info","debug","trace"];typeof t=="function"&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),r.enabled===!1&&(r.level="silent");const o=r.level||"info",l=Object.create(t);l.log||(l.log=bx),Object.defineProperty(l,"levelVal",{get:f}),Object.defineProperty(l,"level",{get:h,set:m});const u={transmit:e,serialize:i,asObject:r.browser.asObject,levels:a,timestamp:gWe(r)};l.levels=Bd.levels,l.level=o,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=bx,l.serializers=n,l._serialize=i,l._stdErrSerialize=s,l.child=b,e&&(l._logEvent=wU());function f(){return this.level==="silent"?1/0:this.levels.values[this.level]}function h(){return this._level}function m(v){if(v!=="silent"&&!this.levels.values[v])throw Error("unknown level "+v);this._level=v,hy(u,l,"error","log"),hy(u,l,"fatal","error"),hy(u,l,"warn","error"),hy(u,l,"info","log"),hy(u,l,"debug","log"),hy(u,l,"trace","log")}function b(v,C){if(!v)throw new Error("missing bindings for child Pino");C=C||{},i&&v.serializers&&(C.serializers=v.serializers);const R=C.serializers;if(i&&R){var k=Object.assign({},n,R),P=r.browser.serialize===!0?Object.keys(k):i;delete v.serializers,YI([v],P,k,this._stdErrSerialize)}function N($){this._childLevel=($._childLevel|0)+1,this.error=py($,v,"error"),this.fatal=py($,v,"fatal"),this.warn=py($,v,"warn"),this.info=py($,v,"info"),this.debug=py($,v,"debug"),this.trace=py($,v,"trace"),k&&(this.serializers=k,this._serialize=P),e&&(this._logEvent=wU([].concat($._logEvent.bindings,v)))}return N.prototype=this,new N(this)}return l}Bd.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},Bd.stdSerializers=uWe,Bd.stdTimeFunctions=Object.assign({},{nullTime:Yue,epochTime:Que,unixTime:bWe,isoTime:vWe});function hy(r,e,t,n){const i=Object.getPrototypeOf(e);e[t]=e.levelVal>e.levels.values[t]?bx:i[t]?i[t]:gx[t]||gx[n]||bx,dWe(r,e,t)}function dWe(r,e,t){!r.transmit&&e[t]===bx||(e[t]=function(n){return function(){const s=r.timestamp(),a=new Array(arguments.length),o=Object.getPrototypeOf&&Object.getPrototypeOf(this)===gx?gx:this;for(var l=0;l-1&&s in t&&(r[i][s]=t[s](r[i][s]))}function py(r,e,t){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;ithis.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}},efe=class{constructor(e,t=xU){this.level=e??"error",this.levelValue=dy.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new Xue(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===dy.levels.values.error?console.error(e):t===dy.levels.values.warn?console.warn(e):t===dy.levels.values.debug?console.debug(e):t===dy.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append($d({timestamp:new Date().toISOString(),log:e}));const t=typeof e=="string"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new Xue(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push($d({extraMetadata:e})),new Blob(t,{type:"application/json"})}},_We=class{constructor(e,t=xU){this.baseChunkLogger=new efe(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=t,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}},EWe=class{constructor(e,t=xU){this.baseChunkLogger=new efe(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var CWe=Object.defineProperty,AWe=Object.defineProperties,SWe=Object.getOwnPropertyDescriptors,tfe=Object.getOwnPropertySymbols,IWe=Object.prototype.hasOwnProperty,TWe=Object.prototype.propertyIsEnumerable,rfe=(r,e,t)=>e in r?CWe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,XI=(r,e)=>{for(var t in e||(e={}))IWe.call(e,t)&&rfe(r,t,e[t]);if(tfe)for(var t of tfe(e))TWe.call(e,t)&&rfe(r,t,e[t]);return r},eT=(r,e)=>AWe(r,SWe(e));function K1(r){return eT(XI({},r),{level:(r==null?void 0:r.level)||yWe.level})}function kWe(r,e=vx){return r[e]||""}function RWe(r,e,t=vx){return r[t]=e,r}function Ci(r,e=vx){let t="";return typeof r.bindings>"u"?t=kWe(r,e):t=r.bindings().context||"",t}function MWe(r,e,t=vx){const n=Ci(r,t);return n.trim()?`${n}/${e}`:e}function ai(r,e,t=vx){const n=MWe(r,e,t),i=r.child({context:n});return RWe(i,n,t)}function PWe(r){var e,t;const n=new _We((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:y0(eT(XI({},r.opts),{level:"trace",browser:eT(XI({},(t=r.opts)==null?void 0:t.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function OWe(r){var e;const t=new EWe((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:y0(eT(XI({},r.opts),{level:"trace"}),t),chunkLoggerController:t}}function NWe(r){return typeof r.loggerOverride<"u"&&typeof r.loggerOverride!="string"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<"u"?PWe(r):OWe(r)}let DWe=class extends Tc{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},$We=class extends Tc{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},BWe=class{constructor(e,t){this.logger=e,this.core=t}},LWe=class extends Tc{constructor(e,t){super(),this.relayer=e,this.logger=t}},UWe=class extends Tc{constructor(e){super()}},FWe=class{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}},jWe=class extends Tc{constructor(e,t){super(),this.relayer=e,this.logger=t}},zWe=class extends Tc{constructor(e,t){super(),this.core=e,this.logger=t}},HWe=class{constructor(e,t){this.projectId=e,this.logger=t}},qWe=class{constructor(e,t){this.projectId=e,this.logger=t}},WWe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},VWe=class{constructor(e){this.client=e}};var _U={},nfe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Qr,t=il;r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128;var n=function(){function o(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return o.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},o.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},o.prototype.clean=function(){t.wipe(this._buffer),t.wipe(this._tempHi),t.wipe(this._tempLo),this.reset()},o.prototype.update=function(l,u){if(u===void 0&&(u=l.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],u--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,l,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=l[f++],u--;return this},o.prototype.finish=function(l){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,h=u/536870912|0,m=u<<3,b=u%128<112?128:256;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},o.prototype.restoreState=function(l){return this._stateHi.set(l.stateHi),this._stateLo.set(l.stateLo),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},o.prototype.cleanSavedState=function(l){t.wipe(l.stateHi),t.wipe(l.stateLo),l.buffer&&t.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},o}();r.SHA512=n;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(o,l,u,f,h,m,b){for(var v=u[0],C=u[1],R=u[2],k=u[3],P=u[4],N=u[5],$=u[6],j=u[7],G=f[0],U=f[1],L=f[2],V=f[3],te=f[4],D=f[5],x=f[6],y=f[7],p,g,_,S,T,I,E,M;b>=128;){for(var A=0;A<16;A++){var B=8*A+m;o[A]=e.readUint32BE(h,B),l[A]=e.readUint32BE(h,B+4)}for(var A=0;A<80;A++){var ae=v,W=C,Z=R,K=k,ee=P,re=N,H=$,F=j,q=G,fe=U,pe=L,Ee=V,Me=te,Oe=D,je=x,Re=y;if(p=j,g=y,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=(P>>>14|te<<18)^(P>>>18|te<<14)^(te>>>9|P<<23),g=(te>>>14|P<<18)^(te>>>18|P<<14)^(P>>>9|te<<23),T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,p=P&N^~P&$,g=te&D^~te&x,T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,p=i[A*2],g=i[A*2+1],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,p=o[A%16],g=l[A%16],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,_=E&65535|M<<16,S=T&65535|I<<16,p=_,g=S,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=(v>>>28|G<<4)^(G>>>2|v<<30)^(G>>>7|v<<25),g=(G>>>28|v<<4)^(v>>>2|G<<30)^(v>>>7|G<<25),T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,p=v&C^v&R^C&R,g=G&U^G&L^U&L,T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,F=E&65535|M<<16,Re=T&65535|I<<16,p=K,g=Ee,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=_,g=S,T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,K=E&65535|M<<16,Ee=T&65535|I<<16,C=ae,R=W,k=Z,P=K,N=ee,$=re,j=H,v=F,U=q,L=fe,V=pe,te=Ee,D=Me,x=Oe,y=je,G=Re,A%16===15)for(var B=0;B<16;B++)p=o[B],g=l[B],T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=o[(B+9)%16],g=l[(B+9)%16],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,_=o[(B+1)%16],S=l[(B+1)%16],p=(_>>>1|S<<31)^(_>>>8|S<<24)^_>>>7,g=(S>>>1|_<<31)^(S>>>8|_<<24)^(S>>>7|_<<25),T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,_=o[(B+14)%16],S=l[(B+14)%16],p=(_>>>19|S<<13)^(S>>>29|_<<3)^_>>>6,g=(S>>>19|_<<13)^(_>>>29|S<<3)^(S>>>6|_<<26),T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,o[B]=E&65535|M<<16,l[B]=T&65535|I<<16}p=v,g=G,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[0],g=f[0],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[0]=v=E&65535|M<<16,f[0]=G=T&65535|I<<16,p=C,g=U,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[1],g=f[1],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[1]=C=E&65535|M<<16,f[1]=U=T&65535|I<<16,p=R,g=L,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[2],g=f[2],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[2]=R=E&65535|M<<16,f[2]=L=T&65535|I<<16,p=k,g=V,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[3],g=f[3],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[3]=k=E&65535|M<<16,f[3]=V=T&65535|I<<16,p=P,g=te,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[4],g=f[4],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[4]=P=E&65535|M<<16,f[4]=te=T&65535|I<<16,p=N,g=D,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[5],g=f[5],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[5]=N=E&65535|M<<16,f[5]=D=T&65535|I<<16,p=$,g=x,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[6],g=f[6],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[6]=$=E&65535|M<<16,f[6]=x=T&65535|I<<16,p=j,g=y,T=g&65535,I=g>>>16,E=p&65535,M=p>>>16,p=u[7],g=f[7],T+=g&65535,I+=g>>>16,E+=p&65535,M+=p>>>16,I+=T>>>16,E+=I>>>16,M+=E>>>16,u[7]=j=E&65535|M<<16,f[7]=y=T&65535|I<<16,m+=128,b-=128}return m}function a(o){var l=new n;l.update(o);var u=l.digest();return l.clean(),u}r.hash=a})(nfe),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSecretKeyToX25519=r.convertPublicKeyToX25519=r.verify=r.sign=r.extractPublicKeyFromSecretKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.SEED_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=r.SIGNATURE_LENGTH=void 0;const e=Pd,t=nfe,n=il;r.SIGNATURE_LENGTH=64,r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=64,r.SEED_LENGTH=32;function i(K){const ee=new Float64Array(16);if(K)for(let re=0;re>16&1),re[fe-1]&=65535;re[15]=H[15]-32767-(re[14]>>16&1);const q=re[15]>>16&1;re[14]&=65535,C(H,re,1-q)}for(let F=0;F<16;F++)K[2*F]=H[F]&255,K[2*F+1]=H[F]>>8}function k(K,ee){let re=0;for(let H=0;H<32;H++)re|=K[H]^ee[H];return(1&re-1>>>8)-1}function P(K,ee){const re=new Uint8Array(32),H=new Uint8Array(32);return R(re,K),R(H,ee),k(re,H)}function N(K){const ee=new Uint8Array(32);return R(ee,K),ee[0]&1}function $(K,ee){for(let re=0;re<16;re++)K[re]=ee[2*re]+(ee[2*re+1]<<8);K[15]&=32767}function j(K,ee,re){for(let H=0;H<16;H++)K[H]=ee[H]+re[H]}function G(K,ee,re){for(let H=0;H<16;H++)K[H]=ee[H]-re[H]}function U(K,ee,re){let H,F,q=0,fe=0,pe=0,Ee=0,Me=0,Oe=0,je=0,Re=0,Qe=0,Ne=0,Je=0,Xe=0,Le=0,Ge=0,et=0,Be=0,Ke=0,pt=0,ne=0,Y=0,X=0,ue=0,we=0,Ce=0,Te=0,lt=0,Ct=0,We=0,At=0,xt=0,dt=0,Lt=re[0],Ot=re[1],st=re[2],Ut=re[3],Nt=re[4],tt=re[5],qt=re[6],Wt=re[7],rt=re[8],Vt=re[9],Dt=re[10],at=re[11],Ft=re[12],Rt=re[13],ot=re[14],Gt=re[15];H=ee[0],q+=H*Lt,fe+=H*Ot,pe+=H*st,Ee+=H*Ut,Me+=H*Nt,Oe+=H*tt,je+=H*qt,Re+=H*Wt,Qe+=H*rt,Ne+=H*Vt,Je+=H*Dt,Xe+=H*at,Le+=H*Ft,Ge+=H*Rt,et+=H*ot,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*Vt,Ce+=H*Dt,Te+=H*at,lt+=H*Ft,Ct+=H*Rt,We+=H*ot,At+=H*Gt,H=ee[14],et+=H*Lt,Be+=H*Ot,Ke+=H*st,pt+=H*Ut,ne+=H*Nt,Y+=H*tt,X+=H*qt,ue+=H*Wt,we+=H*rt,Ce+=H*Vt,Te+=H*Dt,lt+=H*at,Ct+=H*Ft,We+=H*Rt,At+=H*ot,xt+=H*Gt,H=ee[15],Be+=H*Lt,Ke+=H*Ot,pt+=H*st,ne+=H*Ut,Y+=H*Nt,X+=H*tt,ue+=H*qt,we+=H*Wt,Ce+=H*rt,Te+=H*Vt,lt+=H*Dt,Ct+=H*at,We+=H*Ft,At+=H*Rt,xt+=H*ot,dt+=H*Gt,q+=38*Ke,fe+=38*pt,pe+=38*ne,Ee+=38*Y,Me+=38*X,Oe+=38*ue,je+=38*we,Re+=38*Ce,Qe+=38*Te,Ne+=38*lt,Je+=38*Ct,Xe+=38*We,Le+=38*At,Ge+=38*xt,et+=38*dt,F=1,H=q+F+65535,F=Math.floor(H/65536),q=H-F*65536,H=fe+F+65535,F=Math.floor(H/65536),fe=H-F*65536,H=pe+F+65535,F=Math.floor(H/65536),pe=H-F*65536,H=Ee+F+65535,F=Math.floor(H/65536),Ee=H-F*65536,H=Me+F+65535,F=Math.floor(H/65536),Me=H-F*65536,H=Oe+F+65535,F=Math.floor(H/65536),Oe=H-F*65536,H=je+F+65535,F=Math.floor(H/65536),je=H-F*65536,H=Re+F+65535,F=Math.floor(H/65536),Re=H-F*65536,H=Qe+F+65535,F=Math.floor(H/65536),Qe=H-F*65536,H=Ne+F+65535,F=Math.floor(H/65536),Ne=H-F*65536,H=Je+F+65535,F=Math.floor(H/65536),Je=H-F*65536,H=Xe+F+65535,F=Math.floor(H/65536),Xe=H-F*65536,H=Le+F+65535,F=Math.floor(H/65536),Le=H-F*65536,H=Ge+F+65535,F=Math.floor(H/65536),Ge=H-F*65536,H=et+F+65535,F=Math.floor(H/65536),et=H-F*65536,H=Be+F+65535,F=Math.floor(H/65536),Be=H-F*65536,q+=F-1+37*(F-1),F=1,H=q+F+65535,F=Math.floor(H/65536),q=H-F*65536,H=fe+F+65535,F=Math.floor(H/65536),fe=H-F*65536,H=pe+F+65535,F=Math.floor(H/65536),pe=H-F*65536,H=Ee+F+65535,F=Math.floor(H/65536),Ee=H-F*65536,H=Me+F+65535,F=Math.floor(H/65536),Me=H-F*65536,H=Oe+F+65535,F=Math.floor(H/65536),Oe=H-F*65536,H=je+F+65535,F=Math.floor(H/65536),je=H-F*65536,H=Re+F+65535,F=Math.floor(H/65536),Re=H-F*65536,H=Qe+F+65535,F=Math.floor(H/65536),Qe=H-F*65536,H=Ne+F+65535,F=Math.floor(H/65536),Ne=H-F*65536,H=Je+F+65535,F=Math.floor(H/65536),Je=H-F*65536,H=Xe+F+65535,F=Math.floor(H/65536),Xe=H-F*65536,H=Le+F+65535,F=Math.floor(H/65536),Le=H-F*65536,H=Ge+F+65535,F=Math.floor(H/65536),Ge=H-F*65536,H=et+F+65535,F=Math.floor(H/65536),et=H-F*65536,H=Be+F+65535,F=Math.floor(H/65536),Be=H-F*65536,q+=F-1+37*(F-1),K[0]=q,K[1]=fe,K[2]=pe,K[3]=Ee,K[4]=Me,K[5]=Oe,K[6]=je,K[7]=Re,K[8]=Qe,K[9]=Ne,K[10]=Je,K[11]=Xe,K[12]=Le,K[13]=Ge,K[14]=et,K[15]=Be}function L(K,ee){U(K,ee,ee)}function V(K,ee){const re=i();let H;for(H=0;H<16;H++)re[H]=ee[H];for(H=253;H>=0;H--)L(re,re),H!==2&&H!==4&&U(re,re,ee);for(H=0;H<16;H++)K[H]=re[H]}function te(K,ee){const re=i();let H;for(H=0;H<16;H++)re[H]=ee[H];for(H=250;H>=0;H--)L(re,re),H!==1&&U(re,re,ee);for(H=0;H<16;H++)K[H]=re[H]}function D(K,ee){const re=i(),H=i(),F=i(),q=i(),fe=i(),pe=i(),Ee=i(),Me=i(),Oe=i();G(re,K[1],K[0]),G(Oe,ee[1],ee[0]),U(re,re,Oe),j(H,K[0],K[1]),j(Oe,ee[0],ee[1]),U(H,H,Oe),U(F,K[3],ee[3]),U(F,F,u),U(q,K[2],ee[2]),j(q,q,q),G(fe,H,re),G(pe,q,F),j(Ee,q,F),j(Me,H,re),U(K[0],fe,pe),U(K[1],Me,Ee),U(K[2],Ee,pe),U(K[3],fe,Me)}function x(K,ee,re){for(let H=0;H<4;H++)C(K[H],ee[H],re)}function y(K,ee){const re=i(),H=i(),F=i();V(F,ee[2]),U(re,ee[0],F),U(H,ee[1],F),R(K,H),K[31]^=N(re)<<7}function p(K,ee,re){b(K[0],a),b(K[1],o),b(K[2],o),b(K[3],a);for(let H=255;H>=0;--H){const F=re[H/8|0]>>(H&7)&1;x(K,ee,F),D(ee,K),D(K,K),x(K,ee,F)}}function g(K,ee){const re=[i(),i(),i(),i()];b(re[0],f),b(re[1],h),b(re[2],o),U(re[3],f,h),p(K,re,ee)}function _(K){if(K.length!==r.SEED_LENGTH)throw new Error(`ed25519: seed must be ${r.SEED_LENGTH} bytes`);const ee=(0,t.hash)(K);ee[0]&=248,ee[31]&=127,ee[31]|=64;const re=new Uint8Array(32),H=[i(),i(),i(),i()];g(H,ee),y(re,H);const F=new Uint8Array(64);return F.set(K),F.set(re,32),{publicKey:re,secretKey:F}}r.generateKeyPairFromSeed=_;function S(K){const ee=(0,e.randomBytes)(32,K),re=_(ee);return(0,n.wipe)(ee),re}r.generateKeyPair=S;function T(K){if(K.length!==r.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${r.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(K.subarray(32))}r.extractPublicKeyFromSecretKey=T;const I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(K,ee){let re,H,F,q;for(H=63;H>=32;--H){for(re=0,F=H-32,q=H-12;F>4)*I[F],re=ee[F]>>8,ee[F]&=255;for(F=0;F<32;F++)ee[F]-=re*I[F];for(H=0;H<32;H++)ee[H+1]+=ee[H]>>8,K[H]=ee[H]&255}function M(K){const ee=new Float64Array(64);for(let re=0;re<64;re++)ee[re]=K[re];for(let re=0;re<64;re++)K[re]=0;E(K,ee)}function A(K,ee){const re=new Float64Array(64),H=[i(),i(),i(),i()],F=(0,t.hash)(K.subarray(0,32));F[0]&=248,F[31]&=127,F[31]|=64;const q=new Uint8Array(64);q.set(F.subarray(32),32);const fe=new t.SHA512;fe.update(q.subarray(32)),fe.update(ee);const pe=fe.digest();fe.clean(),M(pe),g(H,pe),y(q,H),fe.reset(),fe.update(q.subarray(0,32)),fe.update(K.subarray(32)),fe.update(ee);const Ee=fe.digest();M(Ee);for(let Me=0;Me<32;Me++)re[Me]=pe[Me];for(let Me=0;Me<32;Me++)for(let Oe=0;Oe<32;Oe++)re[Me+Oe]+=Ee[Me]*F[Oe];return E(q.subarray(32),re),q}r.sign=A;function B(K,ee){const re=i(),H=i(),F=i(),q=i(),fe=i(),pe=i(),Ee=i();return b(K[2],o),$(K[1],ee),L(F,K[1]),U(q,F,l),G(F,F,K[2]),j(q,K[2],q),L(fe,q),L(pe,fe),U(Ee,pe,fe),U(re,Ee,F),U(re,re,q),te(re,re),U(re,re,F),U(re,re,q),U(re,re,q),U(K[0],re,q),L(H,K[0]),U(H,H,q),P(H,F)&&U(K[0],K[0],m),L(H,K[0]),U(H,H,q),P(H,F)?-1:(N(K[0])===ee[31]>>7&&G(K[0],a,K[0]),U(K[3],K[0],K[1]),0)}function ae(K,ee,re){const H=new Uint8Array(32),F=[i(),i(),i(),i()],q=[i(),i(),i(),i()];if(re.length!==r.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${r.SIGNATURE_LENGTH} bytes`);if(B(q,K))return!1;const fe=new t.SHA512;fe.update(re.subarray(0,32)),fe.update(K),fe.update(ee);const pe=fe.digest();return M(pe),p(F,q,pe),g(q,re.subarray(32)),D(F,q),y(H,F),!k(re,H)}r.verify=ae;function W(K){let ee=[i(),i(),i(),i()];if(B(ee,K))throw new Error("Ed25519: invalid public key");let re=i(),H=i(),F=ee[1];j(re,o,F),G(H,o,F),V(H,H),U(re,re,H);let q=new Uint8Array(32);return R(q,re),q}r.convertPublicKeyToX25519=W;function Z(K){const ee=(0,t.hash)(K.subarray(0,32));ee[0]&=248,ee[31]&=127,ee[31]|=64;const re=new Uint8Array(ee.subarray(0,32));return(0,n.wipe)(ee),re}r.convertSecretKeyToX25519=Z}(_U);const GWe="EdDSA",KWe="JWT",tT=".",rT="base64url",ife="utf8",sfe="utf8",ZWe=":",JWe="did",YWe="key",afe="base58btc",QWe="z",XWe="K36",eVe=32;function ofe(r){return G1(So(Ya(r,rT),ife))}function nT(r){return So(Ya($d(r),ife),rT)}function EU(r){const e=Ya(XWe,afe),t=QWe+So(HL([e,r]),afe);return[JWe,YWe,t].join(ZWe)}function tVe(r){return So(r,rT)}function rVe(r){return Ya(r,rT)}function nVe(r){return Ya([nT(r.header),nT(r.payload)].join(tT),sfe)}function iVe(r){return[nT(r.header),nT(r.payload),tVe(r.signature)].join(tT)}function CU(r){const e=r.split(tT),t=ofe(e[0]),n=ofe(e[1]),i=rVe(e[2]),s=Ya(e.slice(0,2).join(tT),sfe);return{header:t,payload:n,signature:i,data:s}}function iT(r=Pd.randomBytes(eVe)){return _U.generateKeyPairFromSeed(r)}async function cfe(r,e,t,n,i=qe.fromMiliseconds(Date.now())){const s={alg:GWe,typ:KWe},a=EU(n.publicKey),o=i+t,l={iss:a,sub:r,aud:e,iat:i,exp:o},u=nVe({header:s,payload:l}),f=_U.sign(n.secretKey,u);return iVe({header:s,payload:l,signature:f})}const sVe="PARSE_ERROR",aVe="INVALID_REQUEST",oVe="METHOD_NOT_FOUND",cVe="INVALID_PARAMS",lfe="INTERNAL_ERROR",AU="SERVER_ERROR",lVe=[-32700,-32600,-32601,-32602,-32603],wx={[sVe]:{code:-32700,message:"Parse error"},[aVe]:{code:-32600,message:"Invalid Request"},[oVe]:{code:-32601,message:"Method not found"},[cVe]:{code:-32602,message:"Invalid params"},[lfe]:{code:-32603,message:"Internal error"},[AU]:{code:-32e3,message:"Server error"}},ufe=AU;function uVe(r){return lVe.includes(r)}function ffe(r){return Object.keys(wx).includes(r)?wx[r]:wx[ufe]}function fVe(r){const e=Object.values(wx).find(t=>t.code===r);return e||wx[ufe]}function dfe(r,e,t){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${t} RPC url at ${e}`):r}var hfe={},x0={},pfe;function dVe(){if(pfe)return x0;pfe=1,Object.defineProperty(x0,"__esModule",{value:!0}),x0.isBrowserCryptoAvailable=x0.getSubtleCrypto=x0.getBrowerCrypto=void 0;function r(){return(ut==null?void 0:ut.crypto)||(ut==null?void 0:ut.msCrypto)||{}}x0.getBrowerCrypto=r;function e(){const n=r();return n.subtle||n.webkitSubtle}x0.getSubtleCrypto=e;function t(){return!!r()&&!!e()}return x0.isBrowserCryptoAvailable=t,x0}var _0={},mfe;function hVe(){if(mfe)return _0;mfe=1,Object.defineProperty(_0,"__esModule",{value:!0}),_0.isBrowser=_0.isNode=_0.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}_0.isReactNative=r;function e(){return typeof vt<"u"&&typeof vt.versions<"u"&&typeof vt.versions.node<"u"}_0.isNode=e;function t(){return!r()&&!e()}return _0.isBrowser=t,_0}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=v0;e.__exportStar(dVe(),r),e.__exportStar(hVe(),r)})(hfe);function E0(r=3){const e=Date.now()*Math.pow(10,r),t=Math.floor(Math.random()*Math.pow(10,r));return e+t}function C0(r=6){return BigInt(E0(r))}function kc(r,e,t){return{id:t||E0(),jsonrpc:"2.0",method:r,params:e}}function Z1(r,e){return{id:r,jsonrpc:"2.0",result:e}}function my(r,e,t){return{id:r,jsonrpc:"2.0",error:pVe(e)}}function pVe(r,e){return typeof r>"u"?ffe(lfe):(typeof r=="string"&&(r=Object.assign(Object.assign({},ffe(AU)),{message:r})),uVe(r.code)&&(r=fVe(r.code)),r)}let mVe=class{},gVe=class extends mVe{constructor(){super()}},gfe=class extends gVe{constructor(e){super()}};const bVe="^https?:",vVe="^wss?:";function wVe(r){const e=r.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function bfe(r,e){const t=wVe(r);return typeof t>"u"?!1:new RegExp(e).test(t)}function vfe(r){return bfe(r,bVe)}function wfe(r){return bfe(r,vVe)}function yVe(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function yfe(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function gy(r){return yfe(r)&&"method"in r}function J1(r){return yfe(r)&&(Ta(r)||gs(r))}function Ta(r){return"result"in r}function gs(r){return"error"in r}class A0 extends gfe{constructor(e){super(e),this.events=new Xn.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(kc(e.method,e.params||[],e.id||C0().toString()),t)}async requestStrict(e,t){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{gs(s)?i(s.error):n(s.result)});try{await this.connection.send(e,t)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),J1(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const xVe=()=>typeof WebSocket<"u"?WebSocket:typeof sr<"u"&&typeof sr.WebSocket<"u"?sr.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),_Ve=()=>typeof WebSocket<"u"||typeof sr<"u"&&typeof sr.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",xfe=r=>r.split("?")[0],_fe=10,EVe=xVe();let Efe=class{constructor(e){if(this.url=e,this.events=new Xn.EventEmitter,this.registering=!1,!wfe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send($d(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!wfe(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const i=new URLSearchParams(e).get("origin"),s=hfe.isReactNative()?{headers:{origin:i}}:{rejectUnauthorized:!yVe(e)},a=new EVe(e,[],s);_Ve()?a.onerror=o=>{const l=o;n(this.emitError(l.error))}:a.on("error",o=>{n(this.emitError(o))}),a.onopen=()=>{this.onOpen(a),t(a)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?G1(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=my(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return dfe(e,xfe(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>_fe&&this.events.setMaxListeners(_fe)}emitError(e){const t=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${xfe(this.url)}`));return this.events.emit("register_error",t),t}};var sT={exports:{}};sT.exports,function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,o="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",h="[object Date]",m="[object Error]",b="[object Function]",v="[object GeneratorFunction]",C="[object Map]",R="[object Number]",k="[object Null]",P="[object Object]",N="[object Promise]",$="[object Proxy]",j="[object RegExp]",G="[object Set]",U="[object String]",L="[object Symbol]",V="[object Undefined]",te="[object WeakMap]",D="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",p="[object Float64Array]",g="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",T="[object Uint8Array]",I="[object Uint8ClampedArray]",E="[object Uint16Array]",M="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,B=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,W={};W[y]=W[p]=W[g]=W[_]=W[S]=W[T]=W[I]=W[E]=W[M]=!0,W[o]=W[l]=W[D]=W[f]=W[x]=W[h]=W[m]=W[b]=W[C]=W[R]=W[P]=W[j]=W[G]=W[U]=W[te]=!1;var Z=typeof ut=="object"&&ut&&ut.Object===Object&&ut,K=typeof self=="object"&&self&&self.Object===Object&&self,ee=Z||K||Function("return this")(),re=e&&!e.nodeType&&e,H=re&&!0&&r&&!r.nodeType&&r,F=H&&H.exports===re,q=F&&Z.process,fe=function(){try{return q&&q.binding&&q.binding("util")}catch{}}(),pe=fe&&fe.isTypedArray;function Ee(ye,Pe){for(var ft=-1,ir=ye==null?0:ye.length,ci=0,Fr=[];++ft-1}function si(ye,Pe){var ft=this.__data__,ir=_h(ft,ye);return ir<0?(++this.size,ft.push([ye,Pe])):ft[ir][1]=Pe,this}Xt.prototype.clear=hr,Xt.prototype.delete=ri,Xt.prototype.get=ni,Xt.prototype.has=ii,Xt.prototype.set=si;function wn(ye){var Pe=-1,ft=ye==null?0:ye.length;for(this.clear();++Peys))return!1;var Gn=Fr.get(ye);if(Gn&&Fr.get(Pe))return Gn==Pe;var li=-1,ao=!0,es=ft&s?new xi:void 0;for(Fr.set(ye,Pe),Fr.set(Pe,ye);++li-1&&ye%1==0&&ye-1&&ye%1==0&&ye<=a}function R4(ye){var Pe=typeof ye;return ye!=null&&(Pe=="object"||Pe=="function")}function fp(ye){return ye!=null&&typeof ye=="object"}var M4=pe?Re(pe):J2;function E9(ye){return x9(ye)?K2(ye):Y2(ye)}function Tr(){return[]}function Ar(){return!1}r.exports=_9}(sT,sT.exports);var CVe=sT.exports;const Cfe=Vu(CVe);function AVe(r,e){return e=e||{},new Promise(function(t,n){var i=new XMLHttpRequest,s=[],a=[],o={},l=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return s},entries:function(){return a},get:function(f){return o[f.toLowerCase()]},has:function(f){return f.toLowerCase()in o}}}};for(var u in i.open(e.method||"get",r,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(f,h,m){s.push(h=h.toLowerCase()),a.push([h,m]),o[h]=o[h]?o[h]+","+m:m}),t(l())},i.onerror=n,i.withCredentials=e.credentials=="include",e.headers)i.setRequestHeader(u,e.headers[u]);i.send(e.body||null)})}const Afe=Mh(Object.freeze(Object.defineProperty({__proto__:null,default:AVe},Symbol.toStringTag,{value:"Module"})));var SVe=self.fetch||(self.fetch=Afe.default||Afe);const IVe=Vu(SVe);function TVe(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,$=new Uint8Array(N);k!==P;){for(var j=v[k],G=0,U=N-1;(j!==0||G>>0,$[U]=j%o>>>0,j=j/o>>>0;if(j!==0)throw new Error("Non-zero carry");R=G,k++}for(var L=N-R;L!==N&&$[L]===0;)L++;for(var V=l.repeat(C);L>>0,N=new Uint8Array(P);v[C];){var $=t[v.charCodeAt(C)];if($===255)return;for(var j=0,G=P-1;($!==0||j>>0,N[G]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");k=j,C++}if(v[C]!==" "){for(var U=P-k;U!==P&&N[U]===0;)U++;for(var L=new Uint8Array(R+(P-U)),V=R;U!==P;)L[V++]=N[U++];return L}}}function b(v){var C=m(v);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:b}}var kVe=TVe,RVe=kVe;const Sfe=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},MVe=r=>new TextEncoder().encode(r),PVe=r=>new TextDecoder().decode(r);class OVe{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class NVe{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Ife(this,e)}}class DVe{constructor(e){this.decoders=e}or(e){return Ife(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ife=(r,e)=>new DVe({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});let $Ve=class{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new OVe(e,t,n),this.decoder=new NVe(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const aT=({name:r,prefix:e,encode:t,decode:n})=>new $Ve(r,e,t,n),yx=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=RVe(t,e);return aT({prefix:r,name:e,encode:n,decode:s=>Sfe(i(s))})},BVe=(r,e,t,n)=>{const i={};for(let f=0;f=8&&(o-=8,a[u++]=255&l>>o)}if(o>=t||255&l<<8-o)throw new SyntaxError("Unexpected end of data");return a},LVe=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)a-=t,s+=e[i&o>>a];if(a&&(s+=e[i&o<aT({prefix:e,name:r,encode(i){return LVe(i,n,t)},decode(i){return BVe(i,n,t,r)}}),UVe=aT({prefix:"\0",name:"identity",encode:r=>PVe(r),decode:r=>MVe(r)});var FVe=Object.freeze({__proto__:null,identity:UVe});const jVe=Qa({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var zVe=Object.freeze({__proto__:null,base2:jVe});const HVe=Qa({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var qVe=Object.freeze({__proto__:null,base8:HVe});const WVe=yx({prefix:"9",name:"base10",alphabet:"0123456789"});var VVe=Object.freeze({__proto__:null,base10:WVe});const GVe=Qa({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),KVe=Qa({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ZVe=Object.freeze({__proto__:null,base16:GVe,base16upper:KVe});const JVe=Qa({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),YVe=Qa({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),QVe=Qa({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),XVe=Qa({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),eGe=Qa({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),tGe=Qa({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),rGe=Qa({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),nGe=Qa({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),iGe=Qa({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var sGe=Object.freeze({__proto__:null,base32:JVe,base32upper:YVe,base32pad:QVe,base32padupper:XVe,base32hex:eGe,base32hexupper:tGe,base32hexpad:rGe,base32hexpadupper:nGe,base32z:iGe});const aGe=yx({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),oGe=yx({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var cGe=Object.freeze({__proto__:null,base36:aGe,base36upper:oGe});const lGe=yx({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uGe=yx({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var fGe=Object.freeze({__proto__:null,base58btc:lGe,base58flickr:uGe});const dGe=Qa({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),hGe=Qa({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),pGe=Qa({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),mGe=Qa({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var gGe=Object.freeze({__proto__:null,base64:dGe,base64pad:hGe,base64url:pGe,base64urlpad:mGe});const Tfe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),bGe=Tfe.reduce((r,e,t)=>(r[t]=e,r),[]),vGe=Tfe.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function wGe(r){return r.reduce((e,t)=>(e+=bGe[t],e),"")}function yGe(r){const e=[];for(const t of r){const n=vGe[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const xGe=aT({prefix:"🚀",name:"base256emoji",encode:wGe,decode:yGe});var _Ge=Object.freeze({__proto__:null,base256emoji:xGe}),EGe=Rfe,kfe=128,CGe=127,AGe=~CGe,SGe=Math.pow(2,31);function Rfe(r,e,t){e=e||[],t=t||0;for(var n=t;r>=SGe;)e[t++]=r&255|kfe,r/=128;for(;r&AGe;)e[t++]=r&255|kfe,r>>>=7;return e[t]=r|0,Rfe.bytes=t-n+1,e}var IGe=SU,TGe=128,Mfe=127;function SU(r,n){var t=0,n=n||0,i=0,s=n,a,o=r.length;do{if(s>=o)throw SU.bytes=0,new RangeError("Could not decode varint");a=r[s++],t+=i<28?(a&Mfe)<=TGe);return SU.bytes=s-n,t}var kGe=Math.pow(2,7),RGe=Math.pow(2,14),MGe=Math.pow(2,21),PGe=Math.pow(2,28),OGe=Math.pow(2,35),NGe=Math.pow(2,42),DGe=Math.pow(2,49),$Ge=Math.pow(2,56),BGe=Math.pow(2,63),LGe=function(r){return r(Pfe.encode(r,e,t),e),Nfe=r=>Pfe.encodingLength(r),IU=(r,e)=>{const t=e.byteLength,n=Nfe(r),i=n+Nfe(t),s=new Uint8Array(i+t);return Ofe(r,s,0),Ofe(t,s,n),s.set(e,i),new FGe(r,t,e,s)};let FGe=class{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}};const Dfe=({name:r,code:e,encode:t})=>new jGe(r,e,t);let jGe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?IU(this.code,t):t.then(n=>IU(this.code,n))}else throw Error("Unknown type, must be binary type")}};const $fe=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),zGe=Dfe({name:"sha2-256",code:18,encode:$fe("SHA-256")}),HGe=Dfe({name:"sha2-512",code:19,encode:$fe("SHA-512")});var qGe=Object.freeze({__proto__:null,sha256:zGe,sha512:HGe});const Bfe=0,WGe="identity",Lfe=Sfe;var VGe=Object.freeze({__proto__:null,identity:{code:Bfe,name:WGe,encode:Lfe,digest:r=>IU(Bfe,Lfe(r))}});new TextEncoder,new TextDecoder;const Ufe={...FVe,...zVe,...qVe,...VVe,...ZVe,...sGe,...cGe,...fGe,...gGe,..._Ge};({...qGe,...VGe});function Ffe(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function GGe(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Ffe(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function jfe(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const zfe=jfe("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),TU=jfe("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=GGe(r.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=Ht("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,_ue(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Eue(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},TKe=class{constructor(e,t,n){this.core=e,this.logger=t,this.name=XGe,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),s=iT(i);return EU(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=uHe();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),a=iT(s),o=aU();return await cfe(o,i,eKe,a)},this.generateSharedKey=(i,s,a)=>{this.isInitialized();const o=this.getPrivateKey(i),l=fHe(o,s);return this.setSymKey(l,a)},this.setSymKey=async(i,s)=>{this.isInitialized();const a=s||dHe(i);return await this.keychain.set(a,i),a},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,s,a)=>{this.isInitialized();const o=bue(a),l=$d(s);if(vue(o)){const m=o.senderPublicKey,b=o.receiverPublicKey;i=await this.generateSharedKey(m,b)}const u=this.getSymKey(i),{type:f,senderPublicKey:h}=o;return pHe({type:f,symKey:u,message:l,senderPublicKey:h})},this.decode=async(i,s,a)=>{this.isInitialized();const o=bHe(s,a);if(vue(o)){const l=o.receiverPublicKey,u=o.senderPublicKey;i=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(i),u=mHe({symKey:l,encoded:s});return G1(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}},this.getPayloadType=i=>{const s=HI(i);return cx(s.type)},this.getPayloadSenderPublicKey=i=>{const s=HI(i);return s.senderPublicKey?So(s.senderPublicKey,qo):void 0},this.core=e,this.logger=ai(t,this.name),this.keychain=n||new IKe(this.core,this.logger)}get context(){return Ci(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(qfe)}catch{e=aU(),await this.keychain.set(qfe,e)}return ZGe(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},kKe=class extends BWe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=nKe,this.version=iKe,this.initialized=!1,this.storagePrefix=Y1,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const s=ay(i);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[s]<"u"||(a[s]=i,this.messages.set(n,a),await this.persist()),s},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const s=this.get(n),a=ay(i);return typeof s[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=ai(e,this.name),this.core=t}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,_ue(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Eue(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},RKe=class extends LWe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Xn.EventEmitter,this.name=aKe,this.queue=new Map,this.publishTimeout=qe.toMiliseconds(qe.TEN_SECONDS*2),this.needsTransportRestart=!1,this.publish=async(n,i,s)=>{var a;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});try{const o=(s==null?void 0:s.ttl)||sKe,l=lU(s),u=(s==null?void 0:s.prompt)||!1,f=(s==null?void 0:s.tag)||0,h=(s==null?void 0:s.id)||C0().toString(),m={topic:n,message:i,opts:{ttl:o,relay:l,prompt:u,tag:f,id:h}},b=setTimeout(()=>this.queue.set(h,m),this.publishTimeout);try{await await ux(this.rpcPublish(n,i,o,l,u,f,h),this.publishTimeout,`Failed to publish payload, please try again. id:${h} tag:${f}`),this.removeRequestFromQueue(h),this.relayer.events.emit(Io.publish,m)}catch(v){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(a=s==null?void 0:s.internal)!=null&&a.throwOnFailedPublish)throw this.removeRequestFromQueue(h),v;return}finally{clearTimeout(b)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}})}catch(o){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(o),o}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=ai(t,this.name),this.registerEventListeners()}get context(){return Ci(this.logger)}rpcPublish(e,t,n,i,s,a,o){var l,u,f,h;const m={method:qI(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:s,tag:a},id:o};return Ac((l=m.params)==null?void 0:l.prompt)&&((u=m.params)==null||delete u.prompt),Ac((f=m.params)==null?void 0:f.tag)&&((h=m.params)==null||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:m}),this.relayer.request(m)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:n,opts:i}=e;await this.publish(t,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(fy.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Io.connection_stalled);return}this.checkQueue()}),this.relayer.on(Io.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},MKe=class{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(s=>s!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}};var PKe=Object.defineProperty,OKe=Object.defineProperties,NKe=Object.getOwnPropertyDescriptors,Kfe=Object.getOwnPropertySymbols,DKe=Object.prototype.hasOwnProperty,$Ke=Object.prototype.propertyIsEnumerable,Zfe=(r,e,t)=>e in r?PKe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ex=(r,e)=>{for(var t in e||(e={}))DKe.call(e,t)&&Zfe(r,t,e[t]);if(Kfe)for(var t of Kfe(e))$Ke.call(e,t)&&Zfe(r,t,e[t]);return r},PU=(r,e)=>OKe(r,NKe(e));let BKe=class extends jWe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new MKe,this.events=new Xn.EventEmitter,this.name=mKe,this.version=gKe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Y1,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=lU(i),a={topic:n,relay:s};this.pending.set(n,a);const o=await this.rpcSubscribe(n,s);return this.onSubscribe(o,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),o}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>{if(this.topics.includes(n))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${n}`;return await new Promise((s,a)=>{const o=new qe.Watch;o.start(i);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),o.stop(i),s(!0)),o.elapsed(i)>=bKe&&(clearInterval(l),o.stop(i),a(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=ai(t,this.name),this.clientId=""}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const i=lU(n);await this.rpcUnsubscribe(e,t,i);const s=Qi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,t){const n={method:qI(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await ux(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Io.connection_stalled)}return ay(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,n={method:qI(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await ux(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Io.connection_stalled)}}rpcUnsubscribe(e,t,n){const i={method:qI(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,PU(Ex({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,Ex({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,Ex({},t)),this.topicMap.set(t.topic,e),this.events.emit(bf.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=Ht("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(bf.deleted,PU(Ex({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(bf.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=Ht("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Dd(t)&&this.onBatchSubscribe(t.map((n,i)=>PU(Ex({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(fy.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Io.connect,async()=>{await this.onConnect()}),this.relayer.on(Io.disconnect,()=>{this.onDisconnect()}),this.events.on(bf.created,async e=>{const t=bf.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(bf.deleted,async e=>{const t=bf.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}};var LKe=Object.defineProperty,Jfe=Object.getOwnPropertySymbols,UKe=Object.prototype.hasOwnProperty,FKe=Object.prototype.propertyIsEnumerable,Yfe=(r,e,t)=>e in r?LKe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,jKe=(r,e)=>{for(var t in e||(e={}))UKe.call(e,t)&&Yfe(r,t,e[t]);if(Jfe)for(var t of Jfe(e))FKe.call(e,t)&&Yfe(r,t,e[t]);return r};let zKe=class extends UWe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Xn.EventEmitter,this.name=cKe,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async t=>{this.logger.debug("Publishing Request Payload");const n=t.id,i=this.provider.request(t);this.requestsInFlight.set(n,{promise:i,request:t});try{return await this.toEstablishConnection(),await i}catch(s){throw this.logger.debug("Failed to Publish Request"),this.logger.error(s),s}finally{this.requestsInFlight.delete(n)}},this.onPayloadHandler=t=>{this.onProviderPayload(t)},this.onConnectHandler=()=>{this.events.emit(Io.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(Io.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(S0.payload,this.onPayloadHandler),this.provider.on(S0.connect,this.onConnectHandler),this.provider.on(S0.disconnect,this.onDisconnectHandler),this.provider.on(S0.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?ai(e.logger,this.name):y0(K1({level:e.logger||oKe})),this.messages=new kKe(this.logger,e.core),this.subscriber=new BKe(this,this.logger),this.publisher=new RKe(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||Vfe,this.projectId=e.projectId,this.bundleId=EHe(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Gfe}...`),await this.restartTransport(Gfe)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},dKe)}get context(){return Ci(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"";if(i)return i;let s;const a=o=>{o.topic===e&&(this.subscriber.off(bf.created,a),s())};return await Promise.all([new Promise(o=>{s=o,this.subscriber.on(bf.created,a)}),new Promise(async o=>{i=await this.subscriber.subscribe(e,t),o()})]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach(async e=>{await e.promise})),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await ux(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(t=>{if(!this.initialized)return t();this.subscriber.once(bf.resubscribed,()=>{t()})}),new Promise(async(t,n)=>{try{await ux(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(i){n(i);return}t()})])}catch(t){this.logger.error(t);const n=t;if(!this.isConnectionStalled(n.message))throw t;this.provider.events.emit(S0.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Due())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new A0(new Efe(kHe({sdkVersion:fKe,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),gy(e)){if(!e.method.endsWith(lKe))return;const t=e.params,{topic:n,message:i,publishedAt:s}=t.data,a={topic:n,message:i,publishedAt:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(jKe({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else J1(e)&&this.events.emit(Io.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Io.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Z1(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(S0.payload,this.onPayloadHandler),this.provider.off(S0.connect,this.onConnectHandler),this.provider.off(S0.disconnect,this.onDisconnectHandler),this.provider.off(S0.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Io.connection_stalled,()=>{this.restartTransport().catch(t=>this.logger.error(t))});let e=await Due();Eqe(async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(Io.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},qe.toMiliseconds(uKe)))}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}};var HKe=Object.defineProperty,Qfe=Object.getOwnPropertySymbols,qKe=Object.prototype.hasOwnProperty,WKe=Object.prototype.propertyIsEnumerable,Xfe=(r,e,t)=>e in r?HKe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ede=(r,e)=>{for(var t in e||(e={}))qKe.call(e,t)&&Xfe(r,t,e[t]);if(Qfe)for(var t of Qfe(e))WKe.call(e,t)&&Xfe(r,t,e[t]);return r};let oT=class extends FWe{constructor(e,t,n,i=Y1,s=void 0){super(e,t,n,i),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=hKe,this.cached=[],this.initialized=!1,this.storagePrefix=Y1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!Ac(a)?this.map.set(this.getKey(a),a):eqe(a)?this.map.set(a.id,a):tqe(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,o)=>{this.isInitialized(),this.map.has(a)?await this.update(a,o):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:o}),this.map.set(a,o),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(o=>Object.keys(a).every(l=>Cfe(o[l],a[l]))):this.values),this.update=async(a,o)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:o});const l=ede(ede({},this.getData(a)),o);this.map.set(a,l),await this.persist()},this.delete=async(a,o)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:o}),this.map.delete(a),await this.persist())},this.logger=ai(t,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:n}=Ht("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=Ht("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},VKe=class{constructor(e,t){this.core=e,this.logger=t,this.name=vKe,this.version=wKe,this.events=new X3,this.initialized=!1,this.storagePrefix=Y1,this.ignoredPayloadTypes=[Eb],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=aU(),i=await this.core.crypto.setSymKey(n),s=ol(qe.FIVE_MINUTES),a={protocol:Wfe},o={topic:i,expiry:s,relay:a,active:!1},l=WHe({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:a,expiryTimestamp:s});return await this.pairings.set(i,o),await this.core.relayer.subscribe(i),this.core.expirer.set(i,s),{topic:i,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:s,relay:a,expiryTimestamp:o}=Tue(n.uri);let l;if(this.pairings.keys.includes(i)&&(l=this.pairings.get(i),l.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);const u=o||ol(qe.FIVE_MINUTES),f={topic:i,relay:a,expiry:u,active:!1};return await this.pairings.set(i,f),this.core.expirer.set(i,u),n.activatePairing&&await this.activate({topic:i}),this.events.emit(_x.create,f),this.core.crypto.keychain.has(i)||(await this.core.crypto.setSymKey(s,i),await this.core.relayer.subscribe(i,{relay:a})),f},this.activate=async({topic:n})=>{this.isInitialized();const i=ol(qe.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:a,resolve:o,reject:l}=ly();this.events.once(Rs("pairing_ping",s),({error:u})=>{u?l(u):o()}),await a()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Qi("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,s)=>{const a=kc(i,s),o=await this.core.crypto.encode(n,a),l=xx[i].req;return this.core.history.set(n,a),this.core.relayer.publish(n,o,l),a.id},this.sendResult=async(n,i,s)=>{const a=Z1(n,s),o=await this.core.crypto.encode(i,a),l=await this.core.history.get(i,n),u=xx[l.request.method].res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(a)},this.sendError=async(n,i,s)=>{const a=my(n,s),o=await this.core.crypto.encode(i,a),l=await this.core.history.get(i,n),u=xx[l.request.method]?xx[l.request.method].res:xx.unregistered_method.res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(a)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Qi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>V1(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:s}=n,a=(await this.core.history.get(i,s.id)).request.method;switch(a){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(_x.ping,{id:s,topic:n})}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,i)=>{const{id:s}=i;setTimeout(()=>{Ta(i)?this.events.emit(Rs("pairing_ping",s),{}):gs(i)&&this.events.emit(Rs("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(_x.delete,{id:s,topic:n})}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:s,method:a}=i;try{if(this.registeredMethods.includes(a))return;const o=Qi("WC_METHOD_UNSUPPORTED",a);await this.sendError(s,n,o),this.logger.error(o)}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Qi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var i;if(!Sc(n)){const{message:a}=Ht("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(a)}if(!XHe(n.uri)){const{message:a}=Ht("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(a)}const s=Tue(n.uri);if(!((i=s==null?void 0:s.relay)!=null&&i.protocol)){const{message:a}=Ht("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(a)}if(!(s!=null&&s.symKey)){const{message:a}=Ht("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(a)}if(s!=null&&s.expiryTimestamp&&qe.toMiliseconds(s==null?void 0:s.expiryTimestamp){if(!Sc(n)){const{message:s}=Ht("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!Sc(n)){const{message:s}=Ht("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!Sa(n,!1)){const{message:i}=Ht("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Ht("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(V1(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Ht("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=ai(t,this.name),this.pairings=new oT(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ci(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Io.message,async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(t,n);try{gy(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):J1(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(fu.expired,async e=>{const{topic:t}=Aue(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(_x.expire,{topic:t}))})}},GKe=class extends $We{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Xn.EventEmitter,this.name=yKe,this.version=xKe,this.cached=[],this.initialized=!1,this.storagePrefix=Y1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const a={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:ol(qe.THIRTY_DAYS)};this.records.set(a.id,a),this.events.emit(Ld.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=gs(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(Ld.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Ld.deleted,s)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:kc(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=Ht("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Ld.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=Ht("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Ld.created,e=>{const t=Ld.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(Ld.updated,e=>{const t=Ld.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(Ld.deleted,e=>{const t=Ld.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.core.heartbeat.on(fy.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{qe.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},KKe=class extends zWe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Xn.EventEmitter,this.name=_Ke,this.version=EKe,this.cached=[],this.initialized=!1,this.storagePrefix=Y1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const s=this.formatTarget(n),a={target:s,expiry:i};this.expirations.set(s,a),this.checkExpiry(s,a),this.events.emit(fu.created,{target:s,expiration:a})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(fu.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return RHe(e);if(typeof e=="number")return MHe(e);const{message:t}=Ht("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(fu.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=Ht("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=Ht("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;qe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(fu.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(fy.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(fu.created,e=>{const t=fu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(fu.expired,e=>{const t=fu.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(fu.deleted,e=>{const t=fu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}}},ZKe=class extends HWe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=RU,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||oy()||!cy())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s)}if(!this.initialized){this.removeIframe(),this.verifyUrl=MU;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let s;try{s=await this.fetchAttestation(n.attestationId,i)}catch(a){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(a),s=await this.fetchAttestation(n.attestationId,MU)}return s},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const s=this.startAbortTimer(qe.ONE_SECOND*2),a=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(s),a.status===200?await a.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=s=>{s.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(s=>{if(document.getElementById(RU))return s();window.addEventListener("message",i);const a=document.createElement("iframe");a.id=RU,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display="none",document.body.append(a),this.iframe=a,n=s}),new Promise((s,a)=>setTimeout(()=>{window.removeEventListener("message",i),a("verify iframe load timeout")},qe.toMiliseconds(qe.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||by;return CKe.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${by}`),i=by),i},this.logger=ai(t,this.name),this.verifyUrl=by,this.abortController=new AbortController,this.isDevEnv=oU()&&vt.env.IS_VITEST}get context(){return Ci(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),qe.toMiliseconds(e))}},JKe=class extends qWe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=AKe,this.registerDeviceToken=async n=>{const{clientId:i,token:s,notificationType:a,enableEncrypted:o=!1}=n,l=`${SKe}/${this.projectId}/clients`;await IVe(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:a,token:s,always_raw:o})})},this.logger=ai(t,this.context)}};var YKe=Object.defineProperty,tde=Object.getOwnPropertySymbols,QKe=Object.prototype.hasOwnProperty,XKe=Object.prototype.propertyIsEnumerable,rde=(r,e,t)=>e in r?YKe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,nde=(r,e)=>{for(var t in e||(e={}))QKe.call(e,t)&&rde(r,t,e[t]);if(tde)for(var t of tde(e))XKe.call(e,t)&&rde(r,t,e[t]);return r};class OU extends DWe{constructor(e){super(e),this.protocol=Hfe,this.version=JGe,this.name=kU,this.events=new Xn.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||Vfe,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:y0(K1({level:(e==null?void 0:e.logger)||YGe.logger}));this.logger=ai(t,this.name),this.heartbeat=new fy.HeartBeat,this.crypto=new TKe(this,this.logger,e==null?void 0:e.keychain),this.history=new GKe(this,this.logger),this.expirer=new KKe(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new zue(nde(nde({},QGe),e==null?void 0:e.storageOptions)),this.relayer=new zKe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new VKe(this,this.logger),this.verify=new ZKe(this.projectId||"",this.logger),this.echoClient=new JKe(this.projectId||"",this.logger)}static async init(e){const t=new OU(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(pKe,n),t}get context(){return Ci(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const eZe=OU,ide="wc",sde=2,ade="client",NU=`${ide}@${sde}:${ade}:`,DU={name:ade,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},ode="WALLETCONNECT_DEEPLINK_CHOICE",tZe="proposal",cde="Proposal expired",rZe="session",cT=qe.SEVEN_DAYS,nZe="engine",I0={wc_sessionPropose:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:qe.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:qe.THIRTY_SECONDS,prompt:!1,tag:1115}}},$U={min:qe.FIVE_MINUTES,max:qe.SEVEN_DAYS},T0={idle:"IDLE",active:"ACTIVE"},iZe="request",sZe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var aZe=Object.defineProperty,oZe=Object.defineProperties,cZe=Object.getOwnPropertyDescriptors,lde=Object.getOwnPropertySymbols,lZe=Object.prototype.hasOwnProperty,uZe=Object.prototype.propertyIsEnumerable,ude=(r,e,t)=>e in r?aZe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Wo=(r,e)=>{for(var t in e||(e={}))lZe.call(e,t)&&ude(r,t,e[t]);if(lde)for(var t of lde(e))uZe.call(e,t)&&ude(r,t,e[t]);return r},vy=(r,e)=>oZe(r,cZe(e));class fZe extends VWe{constructor(e){super(e),this.name=nZe,this.events=new X3,this.initialized=!1,this.ignoredPayloadTypes=[Eb],this.requestQueue={state:T0.idle,queue:[]},this.sessionRequestQueue={state:T0.idle,queue:[]},this.requestQueueDelay=qe.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(I0)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},qe.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const n=vy(Wo({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:a,sessionProperties:o,relays:l}=n;let u=i,f,h=!1;if(u&&(h=this.client.core.pairing.pairings.get(u).active),!u||!h){const{topic:$,uri:j}=await this.client.core.pairing.create();u=$,f=j}const m=await this.client.core.crypto.generateKeyPair(),b=I0.wc_sessionPropose.req.ttl||qe.FIVE_MINUTES,v=ol(b),C=Wo({requiredNamespaces:s,optionalNamespaces:a,relays:l??[{protocol:Wfe}],proposer:{publicKey:m,metadata:this.client.metadata},expiryTimestamp:v},o&&{sessionProperties:o}),{reject:R,resolve:k,done:P}=ly(b,cde);if(this.events.once(Rs("session_connect"),async({error:$,session:j})=>{if($)R($);else if(j){j.self.publicKey=m;const G=vy(Wo({},j),{requiredNamespaces:C.requiredNamespaces,optionalNamespaces:C.optionalNamespaces});await this.client.session.set(j.topic,G),await this.setExpiry(j.topic,j.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:j.peer.metadata}),k(G)}}),!u){const{message:$}=Ht("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error($)}const N=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:C,throwOnFailedPublish:!0});return await this.setProposal(N,Wo({id:N},C)),{uri:f,approval:P}},this.pair=async t=>(await this.isInitialized(),await this.client.core.pairing.pair(t)),this.approve=async t=>{await this.isInitialized(),await this.isValidApprove(t);const{id:n,relayProtocol:i,namespaces:s,sessionProperties:a}=t,o=this.client.proposal.get(n);let{pairingTopic:l,proposer:u,requiredNamespaces:f,optionalNamespaces:h}=o;l=l||"";const m=await this.client.core.crypto.generateKeyPair(),b=u.publicKey,v=await this.client.core.crypto.generateSharedKey(m,b);l&&n&&(await this.client.core.pairing.updateMetadata({topic:l,metadata:u.metadata}),await this.sendResult({id:n,topic:l,result:{relay:{protocol:i??"irn"},responderPublicKey:m}}),await this.client.proposal.delete(n,Qi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}));const C=Wo({relay:{protocol:i??"irn"},namespaces:s,pairingTopic:l,controller:{publicKey:m,metadata:this.client.metadata},expiry:ol(cT)},a&&{sessionProperties:a});await this.client.core.relayer.subscribe(v);const R=vy(Wo({},C),{topic:v,requiredNamespaces:f,optionalNamespaces:h,pairingTopic:l,acknowledged:!1,self:C.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:m});await this.client.session.set(v,R);try{await this.sendRequest({topic:v,method:"wc_sessionSettle",params:C,throwOnFailedPublish:!0})}catch(k){throw this.client.logger.error(k),this.client.session.delete(v,Qi("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(v),k}return await this.setExpiry(v,ol(cT)),{topic:v,acknowledged:()=>new Promise(k=>setTimeout(()=>k(this.client.session.get(v)),500))}},this.reject=async t=>{await this.isInitialized(),await this.isValidReject(t);const{id:n,reason:i}=t,{pairingTopic:s}=this.client.proposal.get(n);s&&(await this.sendError(n,s,i),await this.client.proposal.delete(n,Qi("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized(),await this.isValidUpdate(t);const{topic:n,namespaces:i}=t,s=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:a,resolve:o,reject:l}=ly();return this.events.once(Rs("session_update",s),({error:u})=>{u?l(u):o()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:a}},this.extend=async t=>{await this.isInitialized(),await this.isValidExtend(t);const{topic:n}=t,i=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:s,resolve:a,reject:o}=ly();return this.events.once(Rs("session_extend",i),({error:l})=>{l?o(l):a()}),await this.setExpiry(n,ol(cT)),{acknowledged:s}},this.request=async t=>{await this.isInitialized(),await this.isValidRequest(t);const{chainId:n,request:i,topic:s,expiry:a=I0.wc_sessionRequest.req.ttl}=t,o=E0(),{done:l,resolve:u,reject:f}=ly(a,"Request expired. Please try again.");return this.events.once(Rs("session_request",o),({error:h,result:m})=>{h?f(h):u(m)}),await Promise.all([new Promise(async h=>{await this.sendRequest({clientRpcId:o,topic:s,method:"wc_sessionRequest",params:{request:vy(Wo({},i),{expiryTimestamp:ol(a)}),chainId:n},expiry:a,throwOnFailedPublish:!0}).catch(m=>f(m)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:o}),h()}),new Promise(async h=>{const m=await OHe(this.client.core.storage,ode);PHe({id:o,topic:s,wcDeepLink:m}),h()}),l()]).then(h=>h[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:i}=t,{id:s}=i;Ta(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0}):gs(i)&&await this.sendError(s,n,i.error),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized(),await this.isValidPing(t);const{topic:n}=t;if(this.client.session.keys.includes(n)){const i=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:s,resolve:a,reject:o}=ly();this.events.once(Rs("session_ping",i),({error:l})=>{l?o(l):a()}),await s()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:n,event:i,chainId:s}=t;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s}})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:n}=t;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:Qi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=Ht("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>YHe(n,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var a,o;return((a=s.peerMetadata)==null?void 0:a.url)&&((o=s.peerMetadata)==null?void 0:o.url)===t.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async t=>{const{topic:n,expirerHasDeleted:i=!1,emitEvent:s=!0,id:a=0}=t,{self:o}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await this.client.session.delete(n,Qi("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(n)&&await this.client.core.crypto.deleteSymKey(n),i||this.client.core.expirer.del(n),this.client.core.storage.removeItem(ode).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===n&&this.deletePendingSessionRequest(l.id,Qi("USER_DISCONNECTED"))}),s&&this.client.events.emit("session_delete",{id:a,topic:n})},this.deleteProposal=async(t,n)=>{await Promise.all([this.client.proposal.delete(t,Qi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)])},this.deletePendingSessionRequest=async(t,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==t),i&&(this.sessionRequestQueue.state=T0.idle,this.client.events.emit("session_request_expire",{id:t}))},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:n}),this.client.core.expirer.set(t,n)},this.setProposal=async(t,n)=>{await this.client.proposal.set(t,n),this.client.core.expirer.set(t,ol(I0.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async t=>{const{id:n,topic:i,params:s,verifyContext:a}=t,o=s.request.expiryTimestamp||ol(I0.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:a}),o&&this.client.core.expirer.set(n,o)},this.sendRequest=async t=>{const{topic:n,method:i,params:s,expiry:a,relayRpcId:o,clientRpcId:l,throwOnFailedPublish:u}=t,f=kc(i,s,l);if(cy()&&sZe.includes(i)){const b=ay(JSON.stringify(f));this.client.core.verify.register({attestationId:b})}const h=await this.client.core.crypto.encode(n,f),m=I0[i].req;return a&&(m.ttl=a),o&&(m.id=o),this.client.core.history.set(n,f),u?(m.internal=vy(Wo({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,h,m)):this.client.core.relayer.publish(n,h,m).catch(b=>this.client.logger.error(b)),f.id},this.sendResult=async t=>{const{id:n,topic:i,result:s,throwOnFailedPublish:a}=t,o=Z1(n,s),l=await this.client.core.crypto.encode(i,o),u=await this.client.core.history.get(i,n),f=I0[u.request.method].res;a?(f.internal=vy(Wo({},f.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,l,f)):this.client.core.relayer.publish(i,l,f).catch(h=>this.client.logger.error(h)),await this.client.core.history.resolve(o)},this.sendError=async(t,n,i)=>{const s=my(t,i),a=await this.client.core.crypto.encode(n,s),o=await this.client.core.history.get(n,t),l=I0[o.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(s)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;V1(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&t.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{V1(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...t.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===T0.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=T0.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=T0.idle},this.processRequest=t=>{const{topic:n,payload:i}=t,s=i.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:i}=t,s=(await this.client.core.history.get(n,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:i}=Ht("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.onSessionProposeRequest=async(t,n)=>{const{params:i,id:s}=n;try{this.isValidConnect(Wo({},n.params));const a=i.expiryTimestamp||ol(I0.wc_sessionPropose.req.ttl),o=Wo({id:s,pairingTopic:t,expiryTimestamp:a},i);await this.setProposal(s,o);const l=ay(JSON.stringify(n)),u=await this.getVerifyContext(l,o.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:o,verifyContext:u})}catch(a){await this.sendError(s,t,a),this.client.logger.error(a)}},this.onSessionProposeResponse=async(t,n)=>{const{id:i}=n;if(Ta(n)){const{result:s}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const a=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const o=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const l=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(o,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});const f=await this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:t})}else gs(n)&&(await this.client.proposal.delete(i,Qi("USER_DISCONNECTED")),this.events.emit(Rs("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:a,controller:o,expiry:l,namespaces:u,sessionProperties:f,pairingTopic:h}=n.params,m=Wo({topic:t,relay:a,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:h,requiredNamespaces:{},optionalNamespaces:{},controller:o.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},f&&{sessionProperties:f});await this.sendResult({id:n.id,topic:t,result:!0}),this.events.emit(Rs("session_connect"),{session:m}),this.cleanupDuplicatePairings(m)}catch(a){await this.sendError(i,t,a),this.client.logger.error(a)}},this.onSessionSettleResponse=async(t,n)=>{const{id:i}=n;Ta(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(Rs("session_approve",i),{})):gs(n)&&(await this.client.session.delete(t,Qi("USER_DISCONNECTED")),this.events.emit(Rs("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:i,id:s}=n;try{const a=`${t}_session_update`,o=VI.get(a);if(o&&this.isRequestOutOfSync(o,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidUpdate(Wo({topic:t},i)),await this.client.session.update(t,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:t,result:!0}),this.client.events.emit("session_update",{id:s,topic:t,params:i}),VI.set(a,s)}catch(a){await this.sendError(s,t,a),this.client.logger.error(a)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:i}=n;Ta(n)?this.events.emit(Rs("session_update",i),{}):gs(n)&&this.events.emit(Rs("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:i}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,ol(cT)),await this.sendResult({id:i,topic:t,result:!0}),this.client.events.emit("session_extend",{id:i,topic:t})}catch(s){await this.sendError(i,t,s),this.client.logger.error(s)}},this.onSessionExtendResponse=(t,n)=>{const{id:i}=n;Ta(n)?this.events.emit(Rs("session_extend",i),{}):gs(n)&&this.events.emit(Rs("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:i}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:i,topic:t,result:!0}),this.client.events.emit("session_ping",{id:i,topic:t})}catch(s){await this.sendError(i,t,s),this.client.logger.error(s)}},this.onSessionPingResponse=(t,n)=>{const{id:i}=n;setTimeout(()=>{Ta(n)?this.events.emit(Rs("session_ping",i),{}):gs(n)&&this.events.emit(Rs("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(Io.publish,async()=>{s(await this.deleteSession({topic:t,id:i}))})}),this.sendResult({id:i,topic:t,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:Qi("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidRequest(Wo({topic:t},s));const a=ay(JSON.stringify(kc("wc_sessionRequest",s,i))),o=this.client.session.get(t),l=await this.getVerifyContext(a,o.peer.metadata),u={id:i,topic:t,params:s,verifyContext:l};await this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(a){await this.sendError(i,t,a),this.client.logger.error(a)}},this.onSessionRequestResponse=(t,n)=>{const{id:i}=n;Ta(n)?this.events.emit(Rs("session_request",i),{result:n.result}):gs(n)&&this.events.emit(Rs("session_request",i),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:i,params:s}=n;try{const a=`${t}_session_event_${s.event.name}`,o=VI.get(a);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Wo({topic:t},s)),this.client.events.emit("session_event",{id:i,topic:t,params:s}),VI.set(a,i)}catch(a){await this.sendError(i,t,a),this.client.logger.error(a)}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=T0.idle,this.processSessionRequestQueue()},qe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===t&&s.request.method==="wc_sessionRequest").forEach(s=>{this.events.emit(Rs("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===T0.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=T0.active,this.client.events.emit("session_request",t)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=t=>{if(t.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===t.topic);n&&this.onSessionProposeRequest(t.topic,kc("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=async t=>{if(!Sc(t)){const{message:l}=Ht("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:a,relays:o}=t;if(Ac(n)||await this.isValidPairingTopic(n),!lqe(o)){const{message:l}=Ht("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(l)}!Ac(i)&&dx(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!Ac(s)&&dx(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),Ac(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(t,n)=>{const i=cqe(t,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async t=>{if(!Sc(t))throw new Error(Ht("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:a}=t;await this.isValidProposalId(n);const o=this.client.proposal.get(n),l=dU(i,"approve()");if(l)throw new Error(l.message);const u=Oue(o.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Sa(s,!0)){const{message:f}=Ht("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(f)}Ac(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async t=>{if(!Sc(t)){const{message:s}=Ht("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(s)}const{id:n,reason:i}=t;if(await this.isValidProposalId(n),!fqe(i)){const{message:s}=Ht("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=t=>{if(!Sc(t)){const{message:u}=Ht("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(u)}const{relay:n,controller:i,namespaces:s,expiry:a}=t;if(!Mue(n)){const{message:u}=Ht("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const o=rqe(i,"onSessionSettleRequest()");if(o)throw new Error(o.message);const l=dU(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(V1(a)){const{message:u}=Ht("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async t=>{if(!Sc(t)){const{message:l}=Ht("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(l)}const{topic:n,namespaces:i}=t;await this.isValidSessionTopic(n);const s=this.client.session.get(n),a=dU(i,"update()");if(a)throw new Error(a.message);const o=Oue(s.requiredNamespaces,i,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async t=>{if(!Sc(t)){const{message:i}=Ht("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!Sc(t)){const{message:l}=Ht("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(l)}const{topic:n,request:i,chainId:s,expiry:a}=t;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!Pue(o,s)){const{message:l}=Ht("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!dqe(i)){const{message:l}=Ht("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!mqe(o,s,i.method)){const{message:l}=Ht("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(a&&!wqe(a,$U)){const{message:l}=Ht("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${$U.min} and ${$U.max}`);throw new Error(l)}},this.isValidRespond=async t=>{var n;if(!Sc(t)){const{message:a}=Ht("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(a)}const{topic:i,response:s}=t;try{await this.isValidSessionTopic(i)}catch(a){throw(n=t==null?void 0:t.response)!=null&&n.id&&this.cleanupAfterResponse(t),a}if(!hqe(s)){const{message:a}=Ht("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(a)}},this.isValidPing=async t=>{if(!Sc(t)){const{message:i}=Ht("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!Sc(t)){const{message:o}=Ht("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(o)}const{topic:n,event:i,chainId:s}=t;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!Pue(a,s)){const{message:o}=Ht("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(o)}if(!pqe(i)){const{message:o}=Ht("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}if(!gqe(a,s,i.name)){const{message:o}=Ht("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidDisconnect=async t=>{if(!Sc(t)){const{message:i}=Ht("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(t,n)=>{const i={verified:{verifyUrl:n.verifyUrl||by,validation:"UNKNOWN",origin:n.url||""}};try{const s=await this.client.core.verify.resolve({attestationId:t,verifyUrl:n.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(i=>{if(!Sa(i,!1)){const{message:s}=Ht("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})}}async isInitialized(){if(!this.initialized){const{message:e}=Ht("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Io.message,async e=>{const{topic:t,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(t,n);try{gy(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):J1(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(s){this.client.logger.error(s)}})}registerExpirerEvents(){this.client.core.expirer.on(fu.expired,async e=>{const{topic:t,id:n}=Aue(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Ht("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(_x.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Sa(e,!1)){const{message:t}=Ht("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Ht("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(V1(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Ht("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!Sa(e,!1)){const{message:t}=Ht("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=Ht("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(V1(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=Ht("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=Ht("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Sa(e,!1)){const{message:t}=Ht("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=Ht("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!uqe(e)){const{message:t}=Ht("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Ht("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(V1(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=Ht("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class dZe extends oT{constructor(e,t){super(e,t,tZe,NU),this.core=e,this.logger=t}}let hZe=class extends oT{constructor(e,t){super(e,t,rZe,NU),this.core=e,this.logger=t}};class pZe extends oT{constructor(e,t){super(e,t,iZe,NU,n=>n.id),this.core=e,this.logger=t}}let mZe=class $ve extends WWe{constructor(e){super(e),this.protocol=ide,this.version=sde,this.name=DU.name,this.events=new Xn.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(e==null?void 0:e.name)||DU.name,this.metadata=(e==null?void 0:e.metadata)||AHe();const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:y0(K1({level:(e==null?void 0:e.logger)||DU.logger}));this.core=(e==null?void 0:e.core)||new eZe(e),this.logger=ai(t,this.name),this.session=new hZe(this.core,this.logger),this.proposal=new dZe(this.core,this.logger),this.pendingRequest=new pZe(this.core,this.logger),this.engine=new fZe(this)}static async init(e){const t=new $ve(e);return await t.initialize(),t}get context(){return Ci(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var BU={exports:{}};(function(r,e){var t=typeof self<"u"?self:ut,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(a){var o={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(p){return p&&DataView.prototype.isPrototypeOf(p)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(p){return p&&u.indexOf(Object.prototype.toString.call(p))>-1};function h(p){if(typeof p!="string"&&(p=String(p)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(p))throw new TypeError("Invalid character in header field name");return p.toLowerCase()}function m(p){return typeof p!="string"&&(p=String(p)),p}function b(p){var g={next:function(){var _=p.shift();return{done:_===void 0,value:_}}};return o.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(p){this.map={},p instanceof v?p.forEach(function(g,_){this.append(_,g)},this):Array.isArray(p)?p.forEach(function(g){this.append(g[0],g[1])},this):p&&Object.getOwnPropertyNames(p).forEach(function(g){this.append(g,p[g])},this)}v.prototype.append=function(p,g){p=h(p),g=m(g);var _=this.map[p];this.map[p]=_?_+", "+g:g},v.prototype.delete=function(p){delete this.map[h(p)]},v.prototype.get=function(p){return p=h(p),this.has(p)?this.map[p]:null},v.prototype.has=function(p){return this.map.hasOwnProperty(h(p))},v.prototype.set=function(p,g){this.map[h(p)]=m(g)},v.prototype.forEach=function(p,g){for(var _ in this.map)this.map.hasOwnProperty(_)&&p.call(g,this.map[_],_,this)},v.prototype.keys=function(){var p=[];return this.forEach(function(g,_){p.push(_)}),b(p)},v.prototype.values=function(){var p=[];return this.forEach(function(g){p.push(g)}),b(p)},v.prototype.entries=function(){var p=[];return this.forEach(function(g,_){p.push([_,g])}),b(p)},o.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function C(p){if(p.bodyUsed)return Promise.reject(new TypeError("Already read"));p.bodyUsed=!0}function R(p){return new Promise(function(g,_){p.onload=function(){g(p.result)},p.onerror=function(){_(p.error)}})}function k(p){var g=new FileReader,_=R(g);return g.readAsArrayBuffer(p),_}function P(p){var g=new FileReader,_=R(g);return g.readAsText(p),_}function N(p){for(var g=new Uint8Array(p),_=new Array(g.length),S=0;S-1?g:p}function L(p,g){g=g||{};var _=g.body;if(p instanceof L){if(p.bodyUsed)throw new TypeError("Already read");this.url=p.url,this.credentials=p.credentials,g.headers||(this.headers=new v(p.headers)),this.method=p.method,this.mode=p.mode,this.signal=p.signal,!_&&p._bodyInit!=null&&(_=p._bodyInit,p.bodyUsed=!0)}else this.url=String(p);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=U(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(_)}L.prototype.clone=function(){return new L(this,{body:this._bodyInit})};function V(p){var g=new FormData;return p.trim().split("&").forEach(function(_){if(_){var S=_.split("="),T=S.shift().replace(/\+/g," "),I=S.join("=").replace(/\+/g," ");g.append(decodeURIComponent(T),decodeURIComponent(I))}}),g}function te(p){var g=new v,_=p.replace(/\r?\n[\t ]+/g," ");return _.split(/\r?\n/).forEach(function(S){var T=S.split(":"),I=T.shift().trim();if(I){var E=T.join(":").trim();g.append(I,E)}}),g}j.call(L.prototype);function D(p,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.url||"",this._initBody(p)}j.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},D.error=function(){var p=new D(null,{status:0,statusText:""});return p.type="error",p};var x=[301,302,303,307,308];D.redirect=function(p,g){if(x.indexOf(g)===-1)throw new RangeError("Invalid status code");return new D(null,{status:g,headers:{location:p}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,_){this.message=g,this.name=_;var S=Error(g);this.stack=S.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function y(p,g){return new Promise(function(_,S){var T=new L(p,g);if(T.signal&&T.signal.aborted)return S(new a.DOMException("Aborted","AbortError"));var I=new XMLHttpRequest;function E(){I.abort()}I.onload=function(){var M={status:I.status,statusText:I.statusText,headers:te(I.getAllResponseHeaders()||"")};M.url="responseURL"in I?I.responseURL:M.headers.get("X-Request-URL");var A="response"in I?I.response:I.responseText;_(new D(A,M))},I.onerror=function(){S(new TypeError("Network request failed"))},I.ontimeout=function(){S(new TypeError("Network request failed"))},I.onabort=function(){S(new a.DOMException("Aborted","AbortError"))},I.open(T.method,T.url,!0),T.credentials==="include"?I.withCredentials=!0:T.credentials==="omit"&&(I.withCredentials=!1),"responseType"in I&&o.blob&&(I.responseType="blob"),T.headers.forEach(function(M,A){I.setRequestHeader(A,M)}),T.signal&&(T.signal.addEventListener("abort",E),I.onreadystatechange=function(){I.readyState===4&&T.signal.removeEventListener("abort",E)}),I.send(typeof T._bodyInit>"u"?null:T._bodyInit)})}return y.polyfill=!0,s.fetch||(s.fetch=y,s.Headers=v,s.Request=L,s.Response=D),a.Headers=v,a.Request=L,a.Response=D,a.fetch=y,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e})(BU,BU.exports);var gZe=BU.exports;const fde=Vu(gZe);var bZe=Object.defineProperty,vZe=Object.defineProperties,wZe=Object.getOwnPropertyDescriptors,dde=Object.getOwnPropertySymbols,yZe=Object.prototype.hasOwnProperty,xZe=Object.prototype.propertyIsEnumerable,hde=(r,e,t)=>e in r?bZe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pde=(r,e)=>{for(var t in e||(e={}))yZe.call(e,t)&&hde(r,t,e[t]);if(dde)for(var t of dde(e))xZe.call(e,t)&&hde(r,t,e[t]);return r},mde=(r,e)=>vZe(r,wZe(e));const _Ze={Accept:"application/json","Content-Type":"application/json"},EZe="POST",gde={headers:_Ze,method:EZe},bde=10;let ta=class{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new Xn.EventEmitter,this.isAvailable=!1,this.registering=!1,!vfe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=$d(e),n=await(await fde(this.url,mde(pde({},gde),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!vfe(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=$d({id:1,jsonrpc:"2.0",method:"test",params:[]});await fde(e,mde(pde({},gde),{body:t}))}this.onOpen()}catch(t){const n=this.parseError(t);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?G1(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=my(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return dfe(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>bde&&this.events.setMaxListeners(bde)}};const vde="error",CZe="wss://relay.walletconnect.com",AZe="wc",SZe="universal_provider",wde=`${AZe}@2:${SZe}:`,IZe="https://rpc.walletconnect.com/v1/",k0={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Cx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof sr<"u"?sr:typeof self<"u"?self:{},LU={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -*/(function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,g=2,w=4,y=1,C=2,T=1,k=2,N=4,O=8,B=16,z=32,G=64,$=128,D=256,V=512,Q=30,F="...",M=800,b=16,d=1,m=2,x=3,A=1/0,I=9007199254740991,R=17976931348623157e292,S=0/0,E=4294967295,_=E-1,L=E>>>1,ie=[["ary",$],["bind",T],["bindKey",k],["curry",O],["curryRight",B],["flip",V],["partial",z],["partialRight",G],["rearg",D]],q="[object Arguments]",Y="[object Array]",K="[object AsyncFunction]",te="[object Boolean]",re="[object Date]",H="[object DOMException]",U="[object Error]",W="[object Function]",le="[object GeneratorFunction]",de="[object Map]",Se="[object Number]",Me="[object Null]",ke="[object Object]",Ke="[object Promise]",Re="[object Proxy]",je="[object RegExp]",De="[object Set]",Je="[object String]",ze="[object Symbol]",qe="[object Undefined]",Ve="[object WeakMap]",He="[object WeakSet]",Be="[object ArrayBuffer]",Ge="[object DataView]",Xe="[object Float32Array]",se="[object Float64Array]",J="[object Int8Array]",X="[object Int16Array]",ue="[object Int32Array]",we="[object Uint8Array]",ye="[object Uint8ClampedArray]",Ie="[object Uint16Array]",it="[object Uint32Array]",ot=/\b__p \+= '';/g,tt=/\b(__p \+=) '' \+/g,It=/(__e\(.*?\)|\b__t\)) \+\n'';/g,st=/&(?:amp|lt|gt|quot|#39);/g,Nt=/[&<>"']/g,Lt=RegExp(st.source),ht=RegExp(Nt.source),wt=/<%-([\s\S]+?)%>/g,Ut=/<%([\s\S]+?)%>/g,ft=/<%=([\s\S]+?)%>/g,dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vt=/^\w*$/,xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,Gt=RegExp(pt.source),gt=/^\s+/,vt=/\s/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,Kt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ht=/[()=,{}\[\]\/\s]/,qt=/\\(\\)?/g,br=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Tt=/\w*$/,ur=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,ei=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,ri=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qn=/($^)/,Di=/['\n\r\u2028\u2029\\]/g,Wn="\\ud800-\\udfff",$i="\\u0300-\\u036f",Bi="\\ufe20-\\ufe2f",bi="\\u20d0-\\u20ff",Ei=$i+Bi+bi,Ai="\\u2700-\\u27bf",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",ks="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ms="\\u2000-\\u206f",Zo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ka="A-Z\\xc0-\\xd6\\xd8-\\xde",nb="\\ufe0e\\ufe0f",Qf=Rs+ks+Ms+Zo,R0="['’]",k0="["+Wn+"]",og="["+Qf+"]",xu="["+Ei+"]",ib="\\d+",h7="["+Ai+"]",sb="["+Cn+"]",ob="[^"+Wn+Qf+ib+Ai+Cn+Ka+"]",Xf="\\ud83c[\\udffb-\\udfff]",f7="(?:"+xu+"|"+Xf+")",ab="[^"+Wn+"]",ed="(?:\\ud83c[\\udde6-\\uddff]){2}",_u="[\\ud800-\\udbff][\\udc00-\\udfff]",zs="["+Ka+"]",cb="\\u200d",lb="(?:"+sb+"|"+ob+")",Eu="(?:"+zs+"|"+ob+")",ub="(?:"+R0+"(?:d|ll|m|re|s|t|ve))?",hb="(?:"+R0+"(?:D|LL|M|RE|S|T|VE))?",fb=f7+"?",db="["+nb+"]?",d7="(?:"+cb+"(?:"+[ab,ed,_u].join("|")+")"+db+fb+")*",bh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_5="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pb=db+fb+d7,ag="(?:"+[h7,ed,_u].join("|")+")"+pb,p7="(?:"+[ab+xu+"?",xu,ed,_u,k0].join("|")+")",gb=RegExp(R0,"g"),g7=RegExp(xu,"g"),td=RegExp(Xf+"(?="+Xf+")|"+p7+pb,"g"),E5=RegExp([zs+"?"+sb+"+"+ub+"(?="+[og,zs,"$"].join("|")+")",Eu+"+"+hb+"(?="+[og,zs+lb,"$"].join("|")+")",zs+"?"+lb+"+"+ub,zs+"+"+hb,_5,bh,ib,ag].join("|"),"g"),A5=RegExp("["+cb+Wn+Ei+nb+"]"),M0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,C5=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],m7=-1,Cr={};Cr[Xe]=Cr[se]=Cr[J]=Cr[X]=Cr[ue]=Cr[we]=Cr[ye]=Cr[Ie]=Cr[it]=!0,Cr[q]=Cr[Y]=Cr[Be]=Cr[te]=Cr[Ge]=Cr[re]=Cr[U]=Cr[W]=Cr[de]=Cr[Se]=Cr[ke]=Cr[je]=Cr[De]=Cr[Je]=Cr[Ve]=!1;var _r={};_r[q]=_r[Y]=_r[Be]=_r[Ge]=_r[te]=_r[re]=_r[Xe]=_r[se]=_r[J]=_r[X]=_r[ue]=_r[de]=_r[Se]=_r[ke]=_r[je]=_r[De]=_r[Je]=_r[ze]=_r[we]=_r[ye]=_r[Ie]=_r[it]=!0,_r[U]=_r[W]=_r[Ve]=!1;var ve={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ: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"&&self&&self.Object===Object&&self,Sr=wi||ps||Function("return this")(),Vn=e&&!e.nodeType&&e,si=Vn&&!0&&r&&!r.nodeType&&r,Jo=si&&si.exports===Vn,Yi=Jo&&wi.process,un=function(){try{var he=si&&si.require&&si.require("util").types;return he||Yi&&Yi.binding&&Yi.binding("util")}catch{}}(),No=un&&un.isArrayBuffer,Tc=un&&un.isDate,Za=un&&un.isMap,cl=un&&un.isRegExp,cg=un&&un.isSet,rd=un&&un.isTypedArray;function Fn(he,_e,be){switch(be.length){case 0:return he.call(_e);case 1:return he.call(_e,be[0]);case 2:return he.call(_e,be[0],be[1]);case 3:return he.call(_e,be[0],be[1],be[2])}return he.apply(_e,be)}function pj(he,_e,be,We){for(var kt=-1,fr=he==null?0:he.length;++kt-1}function mb(he,_e,be){for(var We=-1,kt=he==null?0:he.length;++We-1;);return be}function A7(he,_e){for(var be=he.length;be--&&ll(_e,he[be],0)>-1;);return be}function Ej(he,_e){for(var be=he.length,We=0;be--;)he[be]===_e&&++We;return We}var Aj=yb(ve),Cj=yb(Pe);function Sj(he){return"\\"+nr[he]}function Ij(he,_e){return he==null?t:he[_e]}function ul(he){return A5.test(he)}function Tj(he){return M0.test(he)}function Rj(he){for(var _e,be=[];!(_e=he.next()).done;)be.push(_e.value);return be}function Ab(he){var _e=-1,be=Array(he.size);return he.forEach(function(We,kt){be[++_e]=[kt,We]}),be}function C7(he,_e){return function(be){return he(_e(be))}}function Xo(he,_e){for(var be=-1,We=he.length,kt=0,fr=[];++be-1}function mz(c,f){var v=this.__data__,P=Z0(v,c);return P<0?(++this.size,v.push([c,f])):v[P][1]=f,this}Xs.prototype.clear=fz,Xs.prototype.delete=dz,Xs.prototype.get=pz,Xs.prototype.has=gz,Xs.prototype.set=mz;function eo(c){var f=-1,v=c==null?0:c.length;for(this.clear();++f=f?c:f)),c}function ji(c,f,v,P,j,ee){var ne,ae=f&p,fe=f&g,Ae=f&w;if(v&&(ne=j?v(c,P,j,ee):v(c)),ne!==t)return ne;if(!Or(c))return c;var Ce=Mt(c);if(Ce){if(ne=yH(c),!ae)return oi(c,ne)}else{var Te=Nn(c),$e=Te==W||Te==le;if(sa(c))return a9(c,ae);if(Te==ke||Te==q||$e&&!j){if(ne=fe||$e?{}:S9(c),!ae)return fe?lH(c,Nz(ne,c)):cH(c,B7(ne,c))}else{if(!_r[Te])return j?c:{};ne=xH(c,Te,ae)}}ee||(ee=new cs);var Qe=ee.get(c);if(Qe)return Qe;ee.set(c,ne),t_(c)?c.forEach(function(bt){ne.add(ji(bt,f,v,bt,c,ee))}):X9(c)&&c.forEach(function(bt,Qt){ne.set(Qt,ji(bt,f,v,Qt,c,ee))});var mt=Ae?fe?Jb:Zb:fe?ci:fn,jt=Ce?t:mt(c);return Li(jt||c,function(bt,Qt){jt&&(Qt=bt,bt=c[Qt]),Ah(ne,Qt,ji(bt,f,v,Qt,c,ee))}),ne}function Pz(c){var f=fn(c);return function(v){return L7(v,c,f)}}function L7(c,f,v){var P=v.length;if(c==null)return!P;for(c=Er(c);P--;){var j=v[P],ee=f[j],ne=c[j];if(ne===t&&!(j in c)||!ee(ne))return!1}return!0}function U7(c,f,v){if(typeof c!="function")throw new Ui(o);return Mh(function(){c.apply(t,v)},f)}function Ch(c,f,v,P){var j=-1,ee=N0,ne=!0,ae=c.length,fe=[],Ae=f.length;if(!ae)return fe;v&&(f=Pr(f,Ci(v))),P?(ee=mb,ne=!1):f.length>=i&&(ee=wh,ne=!1,f=new Qa(f));e:for(;++jj?0:j+v),P=P===t||P>j?j:Ot(P),P<0&&(P+=j),P=v>P?0:n_(P);v0&&v(ae)?f>1?xn(ae,f-1,v,P,j):Qo(j,ae):P||(j[j.length]=ae)}return j}var Mb=d9(),z7=d9(!0);function Ns(c,f){return c&&Mb(c,f,fn)}function Nb(c,f){return c&&z7(c,f,fn)}function Y0(c,f){return Yo(f,function(v){return so(c[v])})}function ec(c,f){f=na(f,c);for(var v=0,P=f.length;c!=null&&vf}function $z(c,f){return c!=null&&vr.call(c,f)}function Bz(c,f){return c!=null&&f in Er(c)}function Lz(c,f,v){return c>=Mn(f,v)&&c=120&&Ce.length>=120)?new Qa(ne&&Ce):t}Ce=c[0];var Te=-1,$e=ae[0];e:for(;++Te-1;)ae!==c&&z0.call(ae,fe,1),z0.call(c,fe,1);return c}function X7(c,f){for(var v=c?f.length:0,P=v-1;v--;){var j=f[v];if(v==P||j!==ee){var ee=j;io(j)?z0.call(c,j,1):zb(c,j)}}return c}function Ub(c,f){return c+W0(P7()*(f-c+1))}function Yz(c,f,v,P){for(var j=-1,ee=an(q0((f-c)/(v||1)),0),ne=be(ee);ee--;)ne[P?ee:++j]=c,c+=v;return ne}function Fb(c,f){var v="";if(!c||f<1||f>I)return v;do f%2&&(v+=c),f=W0(f/2),f&&(c+=c);while(f);return v}function Zt(c,f){return nw(R9(c,f,li),c+"")}function Qz(c){return $7(xl(c))}function Xz(c,f){var v=xl(c);return cp(v,Xa(f,0,v.length))}function Th(c,f,v,P){if(!Or(c))return c;f=na(f,c);for(var j=-1,ee=f.length,ne=ee-1,ae=c;ae!=null&&++jj?0:j+f),v=v>j?j:v,v<0&&(v+=j),j=f>v?0:v-f>>>0,f>>>=0;for(var ee=be(j);++P>>1,ne=c[ee];ne!==null&&!Ii(ne)&&(v?ne<=f:ne=i){var Ae=f?null:dH(c);if(Ae)return O0(Ae);ne=!1,j=wh,fe=new Qa}else fe=f?[]:ae;e:for(;++P=P?c:zi(c,f,v)}var o9=qj||function(c){return Sr.clearTimeout(c)};function a9(c,f){if(f)return c.slice();var v=c.length,P=T7?T7(v):new c.constructor(v);return c.copy(P),P}function Vb(c){var f=new c.constructor(c.byteLength);return new F0(f).set(new F0(c)),f}function iH(c,f){var v=f?Vb(c.buffer):c.buffer;return new c.constructor(v,c.byteOffset,c.byteLength)}function sH(c){var f=new c.constructor(c.source,Tt.exec(c));return f.lastIndex=c.lastIndex,f}function oH(c){return Eh?Er(Eh.call(c)):{}}function c9(c,f){var v=f?Vb(c.buffer):c.buffer;return new c.constructor(v,c.byteOffset,c.length)}function l9(c,f){if(c!==f){var v=c!==t,P=c===null,j=c===c,ee=Ii(c),ne=f!==t,ae=f===null,fe=f===f,Ae=Ii(f);if(!ae&&!Ae&&!ee&&c>f||ee&&ne&&fe&&!ae&&!Ae||P&&ne&&fe||!v&&fe||!j)return 1;if(!P&&!ee&&!Ae&&c=ae)return fe;var Ae=v[P];return fe*(Ae=="desc"?-1:1)}}return c.index-f.index}function u9(c,f,v,P){for(var j=-1,ee=c.length,ne=v.length,ae=-1,fe=f.length,Ae=an(ee-ne,0),Ce=be(fe+Ae),Te=!P;++ae1?v[j-1]:t,ne=j>2?v[2]:t;for(ee=c.length>3&&typeof ee=="function"?(j--,ee):t,ne&&Kn(v[0],v[1],ne)&&(ee=j<3?t:ee,j=1),f=Er(f);++P-1?j[ee?f[ne]:ne]:t}}function m9(c){return no(function(f){var v=f.length,P=v,j=Fi.prototype.thru;for(c&&f.reverse();P--;){var ee=f[P];if(typeof ee!="function")throw new Ui(o);if(j&&!ne&&op(ee)=="wrapper")var ne=new Fi([],!0)}for(P=ne?P:v;++P1&&rr.reverse(),Ce&&feae))return!1;var Ae=ee.get(c),Ce=ee.get(f);if(Ae&&Ce)return Ae==f&&Ce==c;var Te=-1,$e=!0,Qe=v&C?new Qa:t;for(ee.set(c,f),ee.set(f,c);++Te1?"& ":"")+f[P],f=f.join(v>2?", ":" "),c.replace(Ft,`{ -/* [wrapped with `+f+`] */ -`)}function EH(c){return Mt(c)||nc(c)||!!(M7&&c&&c[M7])}function io(c,f){var v=typeof c;return f=f??I,!!f&&(v=="number"||v!="symbol"&&ri.test(c))&&c>-1&&c%1==0&&c0){if(++f>=M)return arguments[0]}else f=0;return c.apply(t,arguments)}}function cp(c,f){var v=-1,P=c.length,j=P-1;for(f=f===t?P:f;++v1?c[f-1]:t;return v=typeof v=="function"?(c.pop(),v):t,j9(c,v)});function z9(c){var f=Z(c);return f.__chain__=!0,f}function Oq(c,f){return f(c),c}function lp(c,f){return f(c)}var Dq=no(function(c){var f=c.length,v=f?c[0]:0,P=this.__wrapped__,j=function(ee){return kb(ee,c)};return f>1||this.__actions__.length||!(P instanceof Xt)||!io(v)?this.thru(j):(P=P.slice(v,+v+(f?1:0)),P.__actions__.push({func:lp,args:[j],thisArg:t}),new Fi(P,this.__chain__).thru(function(ee){return f&&!ee.length&&ee.push(t),ee}))});function $q(){return z9(this)}function Bq(){return new Fi(this.value(),this.__chain__)}function Lq(){this.__values__===t&&(this.__values__=r_(this.value()));var c=this.__index__>=this.__values__.length,f=c?t:this.__values__[this.__index__++];return{done:c,value:f}}function Uq(){return this}function Fq(c){for(var f,v=this;v instanceof K0;){var P=D9(v);P.__index__=0,P.__values__=t,f?j.__wrapped__=P:f=P;var j=P;v=v.__wrapped__}return j.__wrapped__=c,f}function jq(){var c=this.__wrapped__;if(c instanceof Xt){var f=c;return this.__actions__.length&&(f=new Xt(this)),f=f.reverse(),f.__actions__.push({func:lp,args:[iw],thisArg:t}),new Fi(f,this.__chain__)}return this.thru(iw)}function zq(){return i9(this.__wrapped__,this.__actions__)}var Hq=tp(function(c,f,v){vr.call(c,v)?++c[v]:to(c,v,1)});function qq(c,f,v){var P=Mt(c)?b7:Oz;return v&&Kn(c,f,v)&&(f=t),P(c,ut(f,3))}function Wq(c,f){var v=Mt(c)?Yo:j7;return v(c,ut(f,3))}var Vq=g9($9),Gq=g9(B9);function Kq(c,f){return xn(up(c,f),1)}function Zq(c,f){return xn(up(c,f),A)}function Jq(c,f,v){return v=v===t?1:Ot(v),xn(up(c,f),v)}function H9(c,f){var v=Mt(c)?Li:ta;return v(c,ut(f,3))}function q9(c,f){var v=Mt(c)?gj:F7;return v(c,ut(f,3))}var Yq=tp(function(c,f,v){vr.call(c,v)?c[v].push(f):to(c,v,[f])});function Qq(c,f,v,P){c=ai(c)?c:xl(c),v=v&&!P?Ot(v):0;var j=c.length;return v<0&&(v=an(j+v,0)),gp(c)?v<=j&&c.indexOf(f,v)>-1:!!j&&ll(c,f,v)>-1}var Xq=Zt(function(c,f,v){var P=-1,j=typeof f=="function",ee=ai(c)?be(c.length):[];return ta(c,function(ne){ee[++P]=j?Fn(f,ne,v):Sh(ne,f,v)}),ee}),eW=tp(function(c,f,v){to(c,v,f)});function up(c,f){var v=Mt(c)?Pr:G7;return v(c,ut(f,3))}function tW(c,f,v,P){return c==null?[]:(Mt(f)||(f=f==null?[]:[f]),v=P?t:v,Mt(v)||(v=v==null?[]:[v]),Y7(c,f,v))}var rW=tp(function(c,f,v){c[v?0:1].push(f)},function(){return[[],[]]});function nW(c,f,v){var P=Mt(c)?bb:x7,j=arguments.length<3;return P(c,ut(f,4),v,j,ta)}function iW(c,f,v){var P=Mt(c)?mj:x7,j=arguments.length<3;return P(c,ut(f,4),v,j,F7)}function sW(c,f){var v=Mt(c)?Yo:j7;return v(c,dp(ut(f,3)))}function oW(c){var f=Mt(c)?$7:Qz;return f(c)}function aW(c,f,v){(v?Kn(c,f,v):f===t)?f=1:f=Ot(f);var P=Mt(c)?Rz:Xz;return P(c,f)}function cW(c){var f=Mt(c)?kz:tH;return f(c)}function lW(c){if(c==null)return 0;if(ai(c))return gp(c)?hl(c):c.length;var f=Nn(c);return f==de||f==De?c.size:$b(c).length}function uW(c,f,v){var P=Mt(c)?wb:rH;return v&&Kn(c,f,v)&&(f=t),P(c,ut(f,3))}var hW=Zt(function(c,f){if(c==null)return[];var v=f.length;return v>1&&Kn(c,f[0],f[1])?f=[]:v>2&&Kn(f[0],f[1],f[2])&&(f=[f[0]]),Y7(c,xn(f,1),[])}),hp=Wj||function(){return Sr.Date.now()};function fW(c,f){if(typeof f!="function")throw new Ui(o);return c=Ot(c),function(){if(--c<1)return f.apply(this,arguments)}}function W9(c,f,v){return f=v?t:f,f=c&&f==null?c.length:f,ro(c,$,t,t,t,t,f)}function V9(c,f){var v;if(typeof f!="function")throw new Ui(o);return c=Ot(c),function(){return--c>0&&(v=f.apply(this,arguments)),c<=1&&(f=t),v}}var ow=Zt(function(c,f,v){var P=T;if(v.length){var j=Xo(v,vl(ow));P|=z}return ro(c,P,f,v,j)}),G9=Zt(function(c,f,v){var P=T|k;if(v.length){var j=Xo(v,vl(G9));P|=z}return ro(f,P,c,v,j)});function K9(c,f,v){f=v?t:f;var P=ro(c,O,t,t,t,t,t,f);return P.placeholder=K9.placeholder,P}function Z9(c,f,v){f=v?t:f;var P=ro(c,B,t,t,t,t,t,f);return P.placeholder=Z9.placeholder,P}function J9(c,f,v){var P,j,ee,ne,ae,fe,Ae=0,Ce=!1,Te=!1,$e=!0;if(typeof c!="function")throw new Ui(o);f=qi(f)||0,Or(v)&&(Ce=!!v.leading,Te="maxWait"in v,ee=Te?an(qi(v.maxWait)||0,f):ee,$e="trailing"in v?!!v.trailing:$e);function Qe(Wr){var us=P,ao=j;return P=j=t,Ae=Wr,ne=c.apply(ao,us),ne}function mt(Wr){return Ae=Wr,ae=Mh(Qt,f),Ce?Qe(Wr):ne}function jt(Wr){var us=Wr-fe,ao=Wr-Ae,g_=f-us;return Te?Mn(g_,ee-ao):g_}function bt(Wr){var us=Wr-fe,ao=Wr-Ae;return fe===t||us>=f||us<0||Te&&ao>=ee}function Qt(){var Wr=hp();if(bt(Wr))return rr(Wr);ae=Mh(Qt,jt(Wr))}function rr(Wr){return ae=t,$e&&P?Qe(Wr):(P=j=t,ne)}function Ti(){ae!==t&&o9(ae),Ae=0,P=fe=j=ae=t}function Zn(){return ae===t?ne:rr(hp())}function Ri(){var Wr=hp(),us=bt(Wr);if(P=arguments,j=this,fe=Wr,us){if(ae===t)return mt(fe);if(Te)return o9(ae),ae=Mh(Qt,f),Qe(fe)}return ae===t&&(ae=Mh(Qt,f)),ne}return Ri.cancel=Ti,Ri.flush=Zn,Ri}var dW=Zt(function(c,f){return U7(c,1,f)}),pW=Zt(function(c,f,v){return U7(c,qi(f)||0,v)});function gW(c){return ro(c,V)}function fp(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new Ui(o);var v=function(){var P=arguments,j=f?f.apply(this,P):P[0],ee=v.cache;if(ee.has(j))return ee.get(j);var ne=c.apply(this,P);return v.cache=ee.set(j,ne)||ee,ne};return v.cache=new(fp.Cache||eo),v}fp.Cache=eo;function dp(c){if(typeof c!="function")throw new Ui(o);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}function mW(c){return V9(2,c)}var bW=nH(function(c,f){f=f.length==1&&Mt(f[0])?Pr(f[0],Ci(ut())):Pr(xn(f,1),Ci(ut()));var v=f.length;return Zt(function(P){for(var j=-1,ee=Mn(P.length,v);++j=f}),nc=q7(function(){return arguments}())?q7:function(c){return Br(c)&&vr.call(c,"callee")&&!k7.call(c,"callee")},Mt=be.isArray,NW=No?Ci(No):Fz;function ai(c){return c!=null&&pp(c.length)&&!so(c)}function qr(c){return Br(c)&&ai(c)}function PW(c){return c===!0||c===!1||Br(c)&&Gn(c)==te}var sa=Gj||ww,OW=Tc?Ci(Tc):jz;function DW(c){return Br(c)&&c.nodeType===1&&!Nh(c)}function $W(c){if(c==null)return!0;if(ai(c)&&(Mt(c)||typeof c=="string"||typeof c.splice=="function"||sa(c)||yl(c)||nc(c)))return!c.length;var f=Nn(c);if(f==de||f==De)return!c.size;if(kh(c))return!$b(c).length;for(var v in c)if(vr.call(c,v))return!1;return!0}function BW(c,f){return Ih(c,f)}function LW(c,f,v){v=typeof v=="function"?v:t;var P=v?v(c,f):t;return P===t?Ih(c,f,t,v):!!P}function cw(c){if(!Br(c))return!1;var f=Gn(c);return f==U||f==H||typeof c.message=="string"&&typeof c.name=="string"&&!Nh(c)}function UW(c){return typeof c=="number"&&N7(c)}function so(c){if(!Or(c))return!1;var f=Gn(c);return f==W||f==le||f==K||f==Re}function Q9(c){return typeof c=="number"&&c==Ot(c)}function pp(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=I}function Or(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function Br(c){return c!=null&&typeof c=="object"}var X9=Za?Ci(Za):Hz;function FW(c,f){return c===f||Db(c,f,Qb(f))}function jW(c,f,v){return v=typeof v=="function"?v:t,Db(c,f,Qb(f),v)}function zW(c){return e_(c)&&c!=+c}function HW(c){if(SH(c))throw new kt(s);return W7(c)}function qW(c){return c===null}function WW(c){return c==null}function e_(c){return typeof c=="number"||Br(c)&&Gn(c)==Se}function Nh(c){if(!Br(c)||Gn(c)!=ke)return!1;var f=j0(c);if(f===null)return!0;var v=vr.call(f,"constructor")&&f.constructor;return typeof v=="function"&&v instanceof v&&B0.call(v)==jj}var lw=cl?Ci(cl):qz;function VW(c){return Q9(c)&&c>=-I&&c<=I}var t_=cg?Ci(cg):Wz;function gp(c){return typeof c=="string"||!Mt(c)&&Br(c)&&Gn(c)==Je}function Ii(c){return typeof c=="symbol"||Br(c)&&Gn(c)==ze}var yl=rd?Ci(rd):Vz;function GW(c){return c===t}function KW(c){return Br(c)&&Nn(c)==Ve}function ZW(c){return Br(c)&&Gn(c)==He}var JW=sp(Bb),YW=sp(function(c,f){return c<=f});function r_(c){if(!c)return[];if(ai(c))return gp(c)?as(c):oi(c);if(vh&&c[vh])return Rj(c[vh]());var f=Nn(c),v=f==de?Ab:f==De?O0:xl;return v(c)}function oo(c){if(!c)return c===0?c:0;if(c=qi(c),c===A||c===-A){var f=c<0?-1:1;return f*R}return c===c?c:0}function Ot(c){var f=oo(c),v=f%1;return f===f?v?f-v:f:0}function n_(c){return c?Xa(Ot(c),0,E):0}function qi(c){if(typeof c=="number")return c;if(Ii(c))return S;if(Or(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=Or(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=_7(c);var v=Xn.test(c);return v||ti.test(c)?$r(c.slice(2),v?2:8):ur.test(c)?S:+c}function i_(c){return Ps(c,ci(c))}function QW(c){return c?Xa(Ot(c),-I,I):c===0?c:0}function wr(c){return c==null?"":Si(c)}var XW=bl(function(c,f){if(kh(f)||ai(f)){Ps(f,fn(f),c);return}for(var v in f)vr.call(f,v)&&Ah(c,v,f[v])}),s_=bl(function(c,f){Ps(f,ci(f),c)}),mp=bl(function(c,f,v,P){Ps(f,ci(f),c,P)}),eV=bl(function(c,f,v,P){Ps(f,fn(f),c,P)}),tV=no(kb);function rV(c,f){var v=ml(c);return f==null?v:B7(v,f)}var nV=Zt(function(c,f){c=Er(c);var v=-1,P=f.length,j=P>2?f[2]:t;for(j&&Kn(f[0],f[1],j)&&(P=1);++v1),ee}),Ps(c,Jb(c),v),P&&(v=ji(v,p|g|w,pH));for(var j=f.length;j--;)zb(v,f[j]);return v});function xV(c,f){return a_(c,dp(ut(f)))}var _V=no(function(c,f){return c==null?{}:Zz(c,f)});function a_(c,f){if(c==null)return{};var v=Pr(Jb(c),function(P){return[P]});return f=ut(f),Q7(c,v,function(P,j){return f(P,j[0])})}function EV(c,f,v){f=na(f,c);var P=-1,j=f.length;for(j||(j=1,c=t);++Pf){var P=c;c=f,f=P}if(v||c%1||f%1){var j=P7();return Mn(c+j*(f-c+ii("1e-"+((j+"").length-1))),f)}return Ub(c,f)}var OV=wl(function(c,f,v){return f=f.toLowerCase(),c+(v?u_(f):f)});function u_(c){return fw(wr(c).toLowerCase())}function h_(c){return c=wr(c),c&&c.replace(bn,Aj).replace(g7,"")}function DV(c,f,v){c=wr(c),f=Si(f);var P=c.length;v=v===t?P:Xa(Ot(v),0,P);var j=v;return v-=f.length,v>=0&&c.slice(v,j)==f}function $V(c){return c=wr(c),c&&ht.test(c)?c.replace(Nt,Cj):c}function BV(c){return c=wr(c),c&&Gt.test(c)?c.replace(pt,"\\$&"):c}var LV=wl(function(c,f,v){return c+(v?"-":"")+f.toLowerCase()}),UV=wl(function(c,f,v){return c+(v?" ":"")+f.toLowerCase()}),FV=p9("toLowerCase");function jV(c,f,v){c=wr(c),f=Ot(f);var P=f?hl(c):0;if(!f||P>=f)return c;var j=(f-P)/2;return ip(W0(j),v)+c+ip(q0(j),v)}function zV(c,f,v){c=wr(c),f=Ot(f);var P=f?hl(c):0;return f&&P>>0,v?(c=wr(c),c&&(typeof f=="string"||f!=null&&!lw(f))&&(f=Si(f),!f&&ul(c))?ia(as(c),0,v):c.split(f,v)):[]}var ZV=wl(function(c,f,v){return c+(v?" ":"")+fw(f)});function JV(c,f,v){return c=wr(c),v=v==null?0:Xa(Ot(v),0,c.length),f=Si(f),c.slice(v,v+f.length)==f}function YV(c,f,v){var P=Z.templateSettings;v&&Kn(c,f,v)&&(f=t),c=wr(c),f=mp({},f,P,x9);var j=mp({},f.imports,P.imports,x9),ee=fn(j),ne=Eb(j,ee),ae,fe,Ae=0,Ce=f.interpolate||qn,Te="__p += '",$e=Cb((f.escape||qn).source+"|"+Ce.source+"|"+(Ce===ft?br:qn).source+"|"+(f.evaluate||qn).source+"|$","g"),Qe="//# sourceURL="+(vr.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++m7+"]")+` -`;c.replace($e,function(bt,Qt,rr,Ti,Zn,Ri){return rr||(rr=Ti),Te+=c.slice(Ae,Ri).replace(Di,Sj),Qt&&(ae=!0,Te+=`' + +*/(function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,m=2,b=4,v=1,C=2,R=1,k=2,P=4,N=8,$=16,j=32,G=64,U=128,L=256,V=512,te=30,D="...",x=800,y=16,p=1,g=2,_=3,S=1/0,T=9007199254740991,I=17976931348623157e292,E=NaN,M=4294967295,A=M-1,B=M>>>1,ae=[["ary",U],["bind",R],["bindKey",k],["curry",N],["curryRight",$],["flip",V],["partial",j],["partialRight",G],["rearg",L]],W="[object Arguments]",Z="[object Array]",K="[object AsyncFunction]",ee="[object Boolean]",re="[object Date]",H="[object DOMException]",F="[object Error]",q="[object Function]",fe="[object GeneratorFunction]",pe="[object Map]",Ee="[object Number]",Me="[object Null]",Oe="[object Object]",je="[object Promise]",Re="[object Proxy]",Qe="[object RegExp]",Ne="[object Set]",Je="[object String]",Xe="[object Symbol]",Le="[object Undefined]",Ge="[object WeakMap]",et="[object WeakSet]",Be="[object ArrayBuffer]",Ke="[object DataView]",pt="[object Float32Array]",ne="[object Float64Array]",Y="[object Int8Array]",X="[object Int16Array]",ue="[object Int32Array]",we="[object Uint8Array]",Ce="[object Uint8ClampedArray]",Te="[object Uint16Array]",lt="[object Uint32Array]",Ct=/\b__p \+= '';/g,We=/\b(__p \+=) '' \+/g,At=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,dt=/[&<>"']/g,Lt=RegExp(xt.source),Ot=RegExp(dt.source),st=/<%-([\s\S]+?)%>/g,Ut=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qt=/^\w*$/,Wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,Vt=RegExp(rt.source),Dt=/^\s+/,at=/\s/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rt=/\{\n\/\* \[wrapped with (.+)\] \*/,ot=/,? & /,Gt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wr=/[()=,{}\[\]\/\s]/,wt=/\\(\\)?/g,yr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xt=/\w*$/,hr=/^[-+]0x[0-9a-f]+$/i,ri=/^0b[01]+$/i,ni=/^\[object .+?Constructor\]$/,ii=/^0o[0-7]+$/i,si=/^(?:0|[1-9]\d*)$/,wn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,ji=/['\n\r\u2028\u2029\\]/g,Vn="\\ud800-\\udfff",zi="\\u0300-\\u036f",Hi="\\ufe20-\\ufe2f",xi="\\u20d0-\\u20ff",Si=zi+Hi+xi,Ii="\\u2700-\\u27bf",kn="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",$s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bs="\\u2000-\\u206f",xl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tc="A-Z\\xc0-\\xd6\\xd8-\\xde",K2="\\ufe0e\\ufe0f",_h=Ds+$s+Bs+xl,lp="['’]",up="["+Vn+"]",Wm="["+_h+"]",Uu="["+Si+"]",Z2="\\d+",v9="["+Ii+"]",J2="["+kn+"]",Y2="[^"+Vn+_h+Z2+Ii+kn+tc+"]",Eh="\\ud83c[\\udffb-\\udfff]",w9="(?:"+Uu+"|"+Eh+")",Q2="[^"+Vn+"]",Ch="(?:\\ud83c[\\udde6-\\uddff]){2}",Fu="[\\ud800-\\udbff][\\udc00-\\udfff]",Gs="["+tc+"]",X2="\\u200d",ev="(?:"+J2+"|"+Y2+")",ju="(?:"+Gs+"|"+Y2+")",tv="(?:"+lp+"(?:d|ll|m|re|s|t|ve))?",rv="(?:"+lp+"(?:D|LL|M|RE|S|T|VE))?",nv=w9+"?",iv="["+K2+"]?",y9="(?:"+X2+"(?:"+[Q2,Ch,Fu].join("|")+")"+iv+nv+")*",$f="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",T4="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sv=iv+nv+y9,Vm="(?:"+[v9,Ch,Fu].join("|")+")"+sv,x9="(?:"+[Q2+Uu+"?",Uu,Ch,Fu,up].join("|")+")",av=RegExp(lp,"g"),_9=RegExp(Uu,"g"),Ah=RegExp(Eh+"(?="+Eh+")|"+x9+sv,"g"),k4=RegExp([Gs+"?"+J2+"+"+tv+"(?="+[Wm,Gs,"$"].join("|")+")",ju+"+"+rv+"(?="+[Wm,Gs+ev,"$"].join("|")+")",Gs+"?"+ev+"+"+tv,Gs+"+"+rv,T4,$f,Z2,Vm].join("|"),"g"),R4=RegExp("["+X2+Vn+Si+K2+"]"),fp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,M4=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],E9=-1,Tr={};Tr[pt]=Tr[ne]=Tr[Y]=Tr[X]=Tr[ue]=Tr[we]=Tr[Ce]=Tr[Te]=Tr[lt]=!0,Tr[W]=Tr[Z]=Tr[Be]=Tr[ee]=Tr[Ke]=Tr[re]=Tr[F]=Tr[q]=Tr[pe]=Tr[Ee]=Tr[Oe]=Tr[Qe]=Tr[Ne]=Tr[Je]=Tr[Ge]=!1;var Ar={};Ar[W]=Ar[Z]=Ar[Be]=Ar[Ke]=Ar[ee]=Ar[re]=Ar[pt]=Ar[ne]=Ar[Y]=Ar[X]=Ar[ue]=Ar[pe]=Ar[Ee]=Ar[Oe]=Ar[Qe]=Ar[Ne]=Ar[Je]=Ar[Xe]=Ar[we]=Ar[Ce]=Ar[Te]=Ar[lt]=!0,Ar[F]=Ar[q]=Ar[Ge]=!1;var ye={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é: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:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Pe={"&":"&","<":"<",">":">",'"':""","'":"'"},ft={"&":"&","<":"<",">":">",""":'"',"'":"'"},ir={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ci=parseFloat,Fr=parseInt,_i=typeof Cx=="object"&&Cx&&Cx.Object===Object&&Cx,ys=typeof self=="object"&&self&&self.Object===Object&&self,kr=_i||ys||Function("return this")(),Gn=e&&!e.nodeType&&e,li=Gn&&!0&&r&&!r.nodeType&&r,ao=li&&li.exports===Gn,es=ao&&_i.process,pn=function(){try{var de=li&&li.require&&li.require("util").types;return de||es&&es.binding&&es.binding("util")}catch{}}(),ja=pn&&pn.isArrayBuffer,qc=pn&&pn.isDate,rc=pn&&pn.isMap,_l=pn&&pn.isRegExp,Gm=pn&&pn.isSet,Sh=pn&&pn.isTypedArray;function jn(de,_e,ve){switch(ve.length){case 0:return de.call(_e);case 1:return de.call(_e,ve[0]);case 2:return de.call(_e,ve[0],ve[1]);case 3:return de.call(_e,ve[0],ve[1],ve[2])}return de.apply(_e,ve)}function BH(de,_e,ve,Ve){for(var Tt=-1,mr=de==null?0:de.length;++Tt-1}function ov(de,_e,ve){for(var Ve=-1,Tt=de==null?0:de.length;++Ve-1;);return ve}function M9(de,_e){for(var ve=de.length;ve--&&El(_e,de[ve],0)>-1;);return ve}function VH(de,_e){for(var ve=de.length,Ve=0;ve--;)de[ve]===_e&&++Ve;return Ve}var GH=fv(ye),KH=fv(Pe);function ZH(de){return"\\"+ir[de]}function JH(de,_e){return de==null?t:de[_e]}function Cl(de){return R4.test(de)}function YH(de){return fp.test(de)}function QH(de){for(var _e,ve=[];!(_e=de.next()).done;)ve.push(_e.value);return ve}function mv(de){var _e=-1,ve=Array(de.size);return de.forEach(function(Ve,Tt){ve[++_e]=[Tt,Ve]}),ve}function P9(de,_e){return function(ve){return de(_e(ve))}}function lo(de,_e){for(var ve=-1,Ve=de.length,Tt=0,mr=[];++ve-1}function Uq(c,d){var w=this.__data__,O=kp(w,c);return O<0?(++this.size,w.push([c,d])):w[O][1]=d,this}aa.prototype.clear=Dq,aa.prototype.delete=$q,aa.prototype.get=Bq,aa.prototype.has=Lq,aa.prototype.set=Uq;function oa(c){var d=-1,w=c==null?0:c.length;for(this.clear();++d=d?c:d)),c}function Gi(c,d,w,O,z,Q){var ie,ce=d&h,he=d&m,Se=d&b;if(w&&(ie=z?w(c,O,z,Q):w(c)),ie!==t)return ie;if(!Lr(c))return c;var Ie=kt(c);if(Ie){if(ie=HW(c),!ce)return ui(c,ie)}else{var ke=Nn(c),Ue=ke==q||ke==fe;if(go(c))return p_(c,ce);if(ke==Oe||ke==W||Ue&&!z){if(ie=he||Ue?{}:O_(c),!ce)return he?PW(c,tW(ie,c)):MW(c,q9(ie,c))}else{if(!Ar[ke])return z?c:{};ie=qW(c,ke,ce)}}Q||(Q=new fs);var Ye=Q.get(c);if(Ye)return Ye;Q.set(c,ie),cE(c)?c.forEach(function(gt){ie.add(Gi(gt,d,w,gt,c,Q))}):aE(c)&&c.forEach(function(gt,Qt){ie.set(Qt,Gi(gt,d,w,Qt,c,Q))});var mt=Se?he?jv:Fv:he?di:gn,jt=Ie?t:mt(c);return qi(jt||c,function(gt,Qt){jt&&(Qt=gt,gt=c[Qt]),Hf(ie,Qt,Gi(gt,d,w,Qt,c,Q))}),ie}function rW(c){var d=gn(c);return function(w){return W9(w,c,d)}}function W9(c,d,w){var O=w.length;if(c==null)return!O;for(c=Sr(c);O--;){var z=w[O],Q=d[z],ie=c[z];if(ie===t&&!(z in c)||!Q(ie))return!1}return!0}function V9(c,d,w){if(typeof c!="function")throw new Wi(a);return Jf(function(){c.apply(t,w)},d)}function qf(c,d,w,O){var z=-1,Q=dp,ie=!0,ce=c.length,he=[],Se=d.length;if(!ce)return he;w&&(d=Br(d,Ti(w))),O?(Q=ov,ie=!1):d.length>=i&&(Q=Bf,ie=!1,d=new sc(d));e:for(;++zz?0:z+w),O=O===t||O>z?z:$t(O),O<0&&(O+=z),O=w>O?0:uE(O);w0&&w(ce)?d>1?_n(ce,d-1,w,O,z):co(z,ce):O||(z[z.length]=ce)}return z}var _v=y_(),Z9=y_(!0);function Ls(c,d){return c&&_v(c,d,gn)}function Ev(c,d){return c&&Z9(c,d,gn)}function Mp(c,d){return oo(d,function(w){return da(c[w])})}function oc(c,d){d=po(d,c);for(var w=0,O=d.length;c!=null&&wd}function sW(c,d){return c!=null&&Er.call(c,d)}function aW(c,d){return c!=null&&d in Sr(c)}function oW(c,d,w){return c>=On(d,w)&&c=120&&Ie.length>=120)?new sc(ie&&Ie):t}Ie=c[0];var ke=-1,Ue=ce[0];e:for(;++ke-1;)ce!==c&&_p.call(ce,he,1),_p.call(c,he,1);return c}function a_(c,d){for(var w=c?d.length:0,O=w-1;w--;){var z=d[w];if(w==O||z!==Q){var Q=z;fa(z)?_p.call(c,z,1):Ov(c,z)}}return c}function Rv(c,d){return c+Ap(F9()*(d-c+1))}function yW(c,d,w,O){for(var z=-1,Q=un(Cp((d-c)/(w||1)),0),ie=ve(Q);Q--;)ie[O?Q:++z]=c,c+=w;return ie}function Mv(c,d){var w="";if(!c||d<1||d>T)return w;do d%2&&(w+=c),d=Ap(d/2),d&&(c+=c);while(d);return w}function Kt(c,d){return Kv($_(c,d,hi),c+"")}function xW(c){return H9(Dl(c))}function _W(c,d){var w=Dl(c);return zp(w,ac(d,0,w.length))}function Gf(c,d,w,O){if(!Lr(c))return c;d=po(d,c);for(var z=-1,Q=d.length,ie=Q-1,ce=c;ce!=null&&++zz?0:z+d),w=w>z?z:w,w<0&&(w+=z),z=d>w?0:w-d>>>0,d>>>=0;for(var Q=ve(z);++O>>1,ie=c[Q];ie!==null&&!Ri(ie)&&(w?ie<=d:ie=i){var Se=d?null:$W(c);if(Se)return pp(Se);ie=!1,z=Bf,he=new sc}else he=d?[]:ce;e:for(;++O=O?c:Ki(c,d,w)}var h_=hq||function(c){return kr.clearTimeout(c)};function p_(c,d){if(d)return c.slice();var w=c.length,O=D9?D9(w):new c.constructor(w);return c.copy(O),O}function Bv(c){var d=new c.constructor(c.byteLength);return new yp(d).set(new yp(c)),d}function IW(c,d){var w=d?Bv(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.byteLength)}function TW(c){var d=new c.constructor(c.source,Xt.exec(c));return d.lastIndex=c.lastIndex,d}function kW(c){return zf?Sr(zf.call(c)):{}}function m_(c,d){var w=d?Bv(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.length)}function g_(c,d){if(c!==d){var w=c!==t,O=c===null,z=c===c,Q=Ri(c),ie=d!==t,ce=d===null,he=d===d,Se=Ri(d);if(!ce&&!Se&&!Q&&c>d||Q&&ie&&he&&!ce&&!Se||O&&ie&&he||!w&&he||!z)return 1;if(!O&&!Q&&!Se&&c=ce)return he;var Se=w[O];return he*(Se=="desc"?-1:1)}}return c.index-d.index}function b_(c,d,w,O){for(var z=-1,Q=c.length,ie=w.length,ce=-1,he=d.length,Se=un(Q-ie,0),Ie=ve(he+Se),ke=!O;++ce1?w[z-1]:t,ie=z>2?w[2]:t;for(Q=c.length>3&&typeof Q=="function"?(z--,Q):t,ie&&Zn(w[0],w[1],ie)&&(Q=z<3?t:Q,z=1),d=Sr(d);++O-1?z[Q?d[ie]:ie]:t}}function E_(c){return ua(function(d){var w=d.length,O=w,z=Vi.prototype.thru;for(c&&d.reverse();O--;){var Q=d[O];if(typeof Q!="function")throw new Wi(a);if(z&&!ie&&Fp(Q)=="wrapper")var ie=new Vi([],!0)}for(O=ie?O:w;++O1&&nr.reverse(),Ie&&hece))return!1;var Se=Q.get(c),Ie=Q.get(d);if(Se&&Ie)return Se==d&&Ie==c;var ke=-1,Ue=!0,Ye=w&C?new sc:t;for(Q.set(c,d),Q.set(d,c);++ke1?"& ":"")+d[O],d=d.join(w>2?", ":" "),c.replace(Ft,`{ +/* [wrapped with `+d+`] */ +`)}function VW(c){return kt(c)||uc(c)||!!(L9&&c&&c[L9])}function fa(c,d){var w=typeof c;return d=d??T,!!d&&(w=="number"||w!="symbol"&&si.test(c))&&c>-1&&c%1==0&&c0){if(++d>=x)return arguments[0]}else d=0;return c.apply(t,arguments)}}function zp(c,d){var w=-1,O=c.length,z=O-1;for(d=d===t?O:d;++w1?c[d-1]:t;return w=typeof w=="function"?(c.pop(),w):t,K_(c,w)});function Z_(c){var d=J(c);return d.__chain__=!0,d}function nG(c,d){return d(c),c}function Hp(c,d){return d(c)}var iG=ua(function(c){var d=c.length,w=d?c[0]:0,O=this.__wrapped__,z=function(Q){return xv(Q,c)};return d>1||this.__actions__.length||!(O instanceof tr)||!fa(w)?this.thru(z):(O=O.slice(w,+w+(d?1:0)),O.__actions__.push({func:Hp,args:[z],thisArg:t}),new Vi(O,this.__chain__).thru(function(Q){return d&&!Q.length&&Q.push(t),Q}))});function sG(){return Z_(this)}function aG(){return new Vi(this.value(),this.__chain__)}function oG(){this.__values__===t&&(this.__values__=lE(this.value()));var c=this.__index__>=this.__values__.length,d=c?t:this.__values__[this.__index__++];return{done:c,value:d}}function cG(){return this}function lG(c){for(var d,w=this;w instanceof Tp;){var O=z_(w);O.__index__=0,O.__values__=t,d?z.__wrapped__=O:d=O;var z=O;w=w.__wrapped__}return z.__wrapped__=c,d}function uG(){var c=this.__wrapped__;if(c instanceof tr){var d=c;return this.__actions__.length&&(d=new tr(this)),d=d.reverse(),d.__actions__.push({func:Hp,args:[Zv],thisArg:t}),new Vi(d,this.__chain__)}return this.thru(Zv)}function fG(){return f_(this.__wrapped__,this.__actions__)}var dG=Dp(function(c,d,w){Er.call(c,w)?++c[w]:ca(c,w,1)});function hG(c,d,w){var O=kt(c)?C9:nW;return w&&Zn(c,d,w)&&(d=t),O(c,ht(d,3))}function pG(c,d){var w=kt(c)?oo:K9;return w(c,ht(d,3))}var mG=__(H_),gG=__(q_);function bG(c,d){return _n(qp(c,d),1)}function vG(c,d){return _n(qp(c,d),S)}function wG(c,d,w){return w=w===t?1:$t(w),_n(qp(c,d),w)}function J_(c,d){var w=kt(c)?qi:fo;return w(c,ht(d,3))}function Y_(c,d){var w=kt(c)?LH:G9;return w(c,ht(d,3))}var yG=Dp(function(c,d,w){Er.call(c,w)?c[w].push(d):ca(c,w,[d])});function xG(c,d,w,O){c=fi(c)?c:Dl(c),w=w&&!O?$t(w):0;var z=c.length;return w<0&&(w=un(z+w,0)),Zp(c)?w<=z&&c.indexOf(d,w)>-1:!!z&&El(c,d,w)>-1}var _G=Kt(function(c,d,w){var O=-1,z=typeof d=="function",Q=fi(c)?ve(c.length):[];return fo(c,function(ie){Q[++O]=z?jn(d,ie,w):Wf(ie,d,w)}),Q}),EG=Dp(function(c,d,w){ca(c,w,d)});function qp(c,d){var w=kt(c)?Br:e_;return w(c,ht(d,3))}function CG(c,d,w,O){return c==null?[]:(kt(d)||(d=d==null?[]:[d]),w=O?t:w,kt(w)||(w=w==null?[]:[w]),i_(c,d,w))}var AG=Dp(function(c,d,w){c[w?0:1].push(d)},function(){return[[],[]]});function SG(c,d,w){var O=kt(c)?cv:T9,z=arguments.length<3;return O(c,ht(d,4),w,z,fo)}function IG(c,d,w){var O=kt(c)?UH:T9,z=arguments.length<3;return O(c,ht(d,4),w,z,G9)}function TG(c,d){var w=kt(c)?oo:K9;return w(c,Gp(ht(d,3)))}function kG(c){var d=kt(c)?H9:xW;return d(c)}function RG(c,d,w){(w?Zn(c,d,w):d===t)?d=1:d=$t(d);var O=kt(c)?Qq:_W;return O(c,d)}function MG(c){var d=kt(c)?Xq:CW;return d(c)}function PG(c){if(c==null)return 0;if(fi(c))return Zp(c)?Al(c):c.length;var d=Nn(c);return d==pe||d==Ne?c.size:Iv(c).length}function OG(c,d,w){var O=kt(c)?lv:AW;return w&&Zn(c,d,w)&&(d=t),O(c,ht(d,3))}var NG=Kt(function(c,d){if(c==null)return[];var w=d.length;return w>1&&Zn(c,d[0],d[1])?d=[]:w>2&&Zn(d[0],d[1],d[2])&&(d=[d[0]]),i_(c,_n(d,1),[])}),Wp=pq||function(){return kr.Date.now()};function DG(c,d){if(typeof d!="function")throw new Wi(a);return c=$t(c),function(){if(--c<1)return d.apply(this,arguments)}}function Q_(c,d,w){return d=w?t:d,d=c&&d==null?c.length:d,la(c,U,t,t,t,t,d)}function X_(c,d){var w;if(typeof d!="function")throw new Wi(a);return c=$t(c),function(){return--c>0&&(w=d.apply(this,arguments)),c<=1&&(d=t),w}}var Yv=Kt(function(c,d,w){var O=R;if(w.length){var z=lo(w,Ol(Yv));O|=j}return la(c,O,d,w,z)}),eE=Kt(function(c,d,w){var O=R|k;if(w.length){var z=lo(w,Ol(eE));O|=j}return la(d,O,c,w,z)});function tE(c,d,w){d=w?t:d;var O=la(c,N,t,t,t,t,t,d);return O.placeholder=tE.placeholder,O}function rE(c,d,w){d=w?t:d;var O=la(c,$,t,t,t,t,t,d);return O.placeholder=rE.placeholder,O}function nE(c,d,w){var O,z,Q,ie,ce,he,Se=0,Ie=!1,ke=!1,Ue=!0;if(typeof c!="function")throw new Wi(a);d=Ji(d)||0,Lr(w)&&(Ie=!!w.leading,ke="maxWait"in w,Q=ke?un(Ji(w.maxWait)||0,d):Q,Ue="trailing"in w?!!w.trailing:Ue);function Ye(Jr){var hs=O,pa=z;return O=z=t,Se=Jr,ie=c.apply(pa,hs),ie}function mt(Jr){return Se=Jr,ce=Jf(Qt,d),Ie?Ye(Jr):ie}function jt(Jr){var hs=Jr-he,pa=Jr-Se,_E=d-hs;return ke?On(_E,Q-pa):_E}function gt(Jr){var hs=Jr-he,pa=Jr-Se;return he===t||hs>=d||hs<0||ke&&pa>=Q}function Qt(){var Jr=Wp();if(gt(Jr))return nr(Jr);ce=Jf(Qt,jt(Jr))}function nr(Jr){return ce=t,Ue&&O?Ye(Jr):(O=z=t,ie)}function Mi(){ce!==t&&h_(ce),Se=0,O=he=z=ce=t}function Jn(){return ce===t?ie:nr(Wp())}function Pi(){var Jr=Wp(),hs=gt(Jr);if(O=arguments,z=this,he=Jr,hs){if(ce===t)return mt(he);if(ke)return h_(ce),ce=Jf(Qt,d),Ye(he)}return ce===t&&(ce=Jf(Qt,d)),ie}return Pi.cancel=Mi,Pi.flush=Jn,Pi}var $G=Kt(function(c,d){return V9(c,1,d)}),BG=Kt(function(c,d,w){return V9(c,Ji(d)||0,w)});function LG(c){return la(c,V)}function Vp(c,d){if(typeof c!="function"||d!=null&&typeof d!="function")throw new Wi(a);var w=function(){var O=arguments,z=d?d.apply(this,O):O[0],Q=w.cache;if(Q.has(z))return Q.get(z);var ie=c.apply(this,O);return w.cache=Q.set(z,ie)||Q,ie};return w.cache=new(Vp.Cache||oa),w}Vp.Cache=oa;function Gp(c){if(typeof c!="function")throw new Wi(a);return function(){var d=arguments;switch(d.length){case 0:return!c.call(this);case 1:return!c.call(this,d[0]);case 2:return!c.call(this,d[0],d[1]);case 3:return!c.call(this,d[0],d[1],d[2])}return!c.apply(this,d)}}function UG(c){return X_(2,c)}var FG=SW(function(c,d){d=d.length==1&&kt(d[0])?Br(d[0],Ti(ht())):Br(_n(d,1),Ti(ht()));var w=d.length;return Kt(function(O){for(var z=-1,Q=On(O.length,w);++z=d}),uc=Y9(function(){return arguments}())?Y9:function(c){return jr(c)&&Er.call(c,"callee")&&!B9.call(c,"callee")},kt=ve.isArray,tK=ja?Ti(ja):lW;function fi(c){return c!=null&&Kp(c.length)&&!da(c)}function Zr(c){return jr(c)&&fi(c)}function rK(c){return c===!0||c===!1||jr(c)&&Kn(c)==ee}var go=gq||lw,nK=qc?Ti(qc):uW;function iK(c){return jr(c)&&c.nodeType===1&&!Yf(c)}function sK(c){if(c==null)return!0;if(fi(c)&&(kt(c)||typeof c=="string"||typeof c.splice=="function"||go(c)||Nl(c)||uc(c)))return!c.length;var d=Nn(c);if(d==pe||d==Ne)return!c.size;if(Zf(c))return!Iv(c).length;for(var w in c)if(Er.call(c,w))return!1;return!0}function aK(c,d){return Vf(c,d)}function oK(c,d,w){w=typeof w=="function"?w:t;var O=w?w(c,d):t;return O===t?Vf(c,d,t,w):!!O}function Xv(c){if(!jr(c))return!1;var d=Kn(c);return d==F||d==H||typeof c.message=="string"&&typeof c.name=="string"&&!Yf(c)}function cK(c){return typeof c=="number"&&U9(c)}function da(c){if(!Lr(c))return!1;var d=Kn(c);return d==q||d==fe||d==K||d==Re}function sE(c){return typeof c=="number"&&c==$t(c)}function Kp(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=T}function Lr(c){var d=typeof c;return c!=null&&(d=="object"||d=="function")}function jr(c){return c!=null&&typeof c=="object"}var aE=rc?Ti(rc):dW;function lK(c,d){return c===d||Sv(c,d,Hv(d))}function uK(c,d,w){return w=typeof w=="function"?w:t,Sv(c,d,Hv(d),w)}function fK(c){return oE(c)&&c!=+c}function dK(c){if(ZW(c))throw new Tt(s);return Q9(c)}function hK(c){return c===null}function pK(c){return c==null}function oE(c){return typeof c=="number"||jr(c)&&Kn(c)==Ee}function Yf(c){if(!jr(c)||Kn(c)!=Oe)return!1;var d=xp(c);if(d===null)return!0;var w=Er.call(d,"constructor")&&d.constructor;return typeof w=="function"&&w instanceof w&&bp.call(w)==uq}var ew=_l?Ti(_l):hW;function mK(c){return sE(c)&&c>=-T&&c<=T}var cE=Gm?Ti(Gm):pW;function Zp(c){return typeof c=="string"||!kt(c)&&jr(c)&&Kn(c)==Je}function Ri(c){return typeof c=="symbol"||jr(c)&&Kn(c)==Xe}var Nl=Sh?Ti(Sh):mW;function gK(c){return c===t}function bK(c){return jr(c)&&Nn(c)==Ge}function vK(c){return jr(c)&&Kn(c)==et}var wK=Up(Tv),yK=Up(function(c,d){return c<=d});function lE(c){if(!c)return[];if(fi(c))return Zp(c)?us(c):ui(c);if(Lf&&c[Lf])return QH(c[Lf]());var d=Nn(c),w=d==pe?mv:d==Ne?pp:Dl;return w(c)}function ha(c){if(!c)return c===0?c:0;if(c=Ji(c),c===S||c===-S){var d=c<0?-1:1;return d*I}return c===c?c:0}function $t(c){var d=ha(c),w=d%1;return d===d?w?d-w:d:0}function uE(c){return c?ac($t(c),0,M):0}function Ji(c){if(typeof c=="number")return c;if(Ri(c))return E;if(Lr(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=Lr(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=k9(c);var w=ri.test(c);return w||ii.test(c)?Fr(c.slice(2),w?2:8):hr.test(c)?E:+c}function fE(c){return Us(c,di(c))}function xK(c){return c?ac($t(c),-T,T):c===0?c:0}function xr(c){return c==null?"":ki(c)}var _K=Ml(function(c,d){if(Zf(d)||fi(d)){Us(d,gn(d),c);return}for(var w in d)Er.call(d,w)&&Hf(c,w,d[w])}),dE=Ml(function(c,d){Us(d,di(d),c)}),Jp=Ml(function(c,d,w,O){Us(d,di(d),c,O)}),EK=Ml(function(c,d,w,O){Us(d,gn(d),c,O)}),CK=ua(xv);function AK(c,d){var w=Rl(c);return d==null?w:q9(w,d)}var SK=Kt(function(c,d){c=Sr(c);var w=-1,O=d.length,z=O>2?d[2]:t;for(z&&Zn(d[0],d[1],z)&&(O=1);++w1),Q}),Us(c,jv(c),w),O&&(w=Gi(w,h|m|b,BW));for(var z=d.length;z--;)Ov(w,d[z]);return w});function qK(c,d){return pE(c,Gp(ht(d)))}var WK=ua(function(c,d){return c==null?{}:vW(c,d)});function pE(c,d){if(c==null)return{};var w=Br(jv(c),function(O){return[O]});return d=ht(d),s_(c,w,function(O,z){return d(O,z[0])})}function VK(c,d,w){d=po(d,c);var O=-1,z=d.length;for(z||(z=1,c=t);++Od){var O=c;c=d,d=O}if(w||c%1||d%1){var z=F9();return On(c+z*(d-c+ci("1e-"+((z+"").length-1))),d)}return Rv(c,d)}var nZ=Pl(function(c,d,w){return d=d.toLowerCase(),c+(w?bE(d):d)});function bE(c){return nw(xr(c).toLowerCase())}function vE(c){return c=xr(c),c&&c.replace(wn,GH).replace(_9,"")}function iZ(c,d,w){c=xr(c),d=ki(d);var O=c.length;w=w===t?O:ac($t(w),0,O);var z=w;return w-=d.length,w>=0&&c.slice(w,z)==d}function sZ(c){return c=xr(c),c&&Ot.test(c)?c.replace(dt,KH):c}function aZ(c){return c=xr(c),c&&Vt.test(c)?c.replace(rt,"\\$&"):c}var oZ=Pl(function(c,d,w){return c+(w?"-":"")+d.toLowerCase()}),cZ=Pl(function(c,d,w){return c+(w?" ":"")+d.toLowerCase()}),lZ=x_("toLowerCase");function uZ(c,d,w){c=xr(c),d=$t(d);var O=d?Al(c):0;if(!d||O>=d)return c;var z=(d-O)/2;return Lp(Ap(z),w)+c+Lp(Cp(z),w)}function fZ(c,d,w){c=xr(c),d=$t(d);var O=d?Al(c):0;return d&&O>>0,w?(c=xr(c),c&&(typeof d=="string"||d!=null&&!ew(d))&&(d=ki(d),!d&&Cl(c))?mo(us(c),0,w):c.split(d,w)):[]}var vZ=Pl(function(c,d,w){return c+(w?" ":"")+nw(d)});function wZ(c,d,w){return c=xr(c),w=w==null?0:ac($t(w),0,c.length),d=ki(d),c.slice(w,w+d.length)==d}function yZ(c,d,w){var O=J.templateSettings;w&&Zn(c,d,w)&&(d=t),c=xr(c),d=Jp({},d,O,T_);var z=Jp({},d.imports,O.imports,T_),Q=gn(z),ie=pv(z,Q),ce,he,Se=0,Ie=d.interpolate||Wn,ke="__p += '",Ue=gv((d.escape||Wn).source+"|"+Ie.source+"|"+(Ie===Nt?yr:Wn).source+"|"+(d.evaluate||Wn).source+"|$","g"),Ye="//# sourceURL="+(Er.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++E9+"]")+` +`;c.replace(Ue,function(gt,Qt,nr,Mi,Jn,Pi){return nr||(nr=Mi),ke+=c.slice(Se,Pi).replace(ji,ZH),Qt&&(ce=!0,ke+=`' + __e(`+Qt+`) + -'`),Zn&&(fe=!0,Te+=`'; -`+Zn+`; -__p += '`),rr&&(Te+=`' + -((__t = (`+rr+`)) == null ? '' : __t) + -'`),Ae=Ri+bt.length,bt}),Te+=`'; -`;var mt=vr.call(f,"variable")&&f.variable;if(!mt)Te=`with (obj) { -`+Te+` +'`),Jn&&(he=!0,ke+=`'; +`+Jn+`; +__p += '`),nr&&(ke+=`' + +((__t = (`+nr+`)) == null ? '' : __t) + +'`),Se=Pi+gt.length,gt}),ke+=`'; +`;var mt=Er.call(d,"variable")&&d.variable;if(!mt)ke=`with (obj) { +`+ke+` } -`;else if(Ht.test(mt))throw new kt(a);Te=(fe?Te.replace(ot,""):Te).replace(tt,"$1").replace(It,"$1;"),Te="function("+(mt||"obj")+`) { +`;else if(wr.test(mt))throw new Tt(o);ke=(he?ke.replace(Ct,""):ke).replace(We,"$1").replace(At,"$1;"),ke="function("+(mt||"obj")+`) { `+(mt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(ce?", __e = _.escape":"")+(he?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+Te+`return __p -}`;var jt=d_(function(){return fr(ee,Qe+"return "+Te).apply(t,ne)});if(jt.source=Te,cw(jt))throw jt;return jt}function QV(c){return wr(c).toLowerCase()}function XV(c){return wr(c).toUpperCase()}function eG(c,f,v){if(c=wr(c),c&&(v||f===t))return _7(c);if(!c||!(f=Si(f)))return c;var P=as(c),j=as(f),ee=E7(P,j),ne=A7(P,j)+1;return ia(P,ee,ne).join("")}function tG(c,f,v){if(c=wr(c),c&&(v||f===t))return c.slice(0,S7(c)+1);if(!c||!(f=Si(f)))return c;var P=as(c),j=A7(P,as(f))+1;return ia(P,0,j).join("")}function rG(c,f,v){if(c=wr(c),c&&(v||f===t))return c.replace(gt,"");if(!c||!(f=Si(f)))return c;var P=as(c),j=E7(P,as(f));return ia(P,j).join("")}function nG(c,f){var v=Q,P=F;if(Or(f)){var j="separator"in f?f.separator:j;v="length"in f?Ot(f.length):v,P="omission"in f?Si(f.omission):P}c=wr(c);var ee=c.length;if(ul(c)){var ne=as(c);ee=ne.length}if(v>=ee)return c;var ae=v-hl(P);if(ae<1)return P;var fe=ne?ia(ne,0,ae).join(""):c.slice(0,ae);if(j===t)return fe+P;if(ne&&(ae+=fe.length-ae),lw(j)){if(c.slice(ae).search(j)){var Ae,Ce=fe;for(j.global||(j=Cb(j.source,wr(Tt.exec(j))+"g")),j.lastIndex=0;Ae=j.exec(Ce);)var Te=Ae.index;fe=fe.slice(0,Te===t?ae:Te)}}else if(c.indexOf(Si(j),ae)!=ae){var $e=fe.lastIndexOf(j);$e>-1&&(fe=fe.slice(0,$e))}return fe+P}function iG(c){return c=wr(c),c&&Lt.test(c)?c.replace(st,Pj):c}var sG=wl(function(c,f,v){return c+(v?" ":"")+f.toUpperCase()}),fw=p9("toUpperCase");function f_(c,f,v){return c=wr(c),f=v?t:f,f===t?Tj(c)?$j(c):vj(c):c.match(f)||[]}var d_=Zt(function(c,f){try{return Fn(c,t,f)}catch(v){return cw(v)?v:new kt(v)}}),oG=no(function(c,f){return Li(f,function(v){v=Os(v),to(c,v,ow(c[v],c))}),c});function aG(c){var f=c==null?0:c.length,v=ut();return c=f?Pr(c,function(P){if(typeof P[1]!="function")throw new Ui(o);return[v(P[0]),P[1]]}):[],Zt(function(P){for(var j=-1;++jI)return[];var v=E,P=Mn(c,E);f=ut(f),c-=E;for(var j=_b(P,f);++v0||f<0)?new Xt(v):(c<0?v=v.takeRight(-c):c&&(v=v.drop(c)),f!==t&&(f=Ot(f),v=f<0?v.dropRight(-f):v.take(f-c)),v)},Xt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Xt.prototype.toArray=function(){return this.take(E)},Ns(Xt.prototype,function(c,f){var v=/^(?:filter|find|map|reject)|While$/.test(f),P=/^(?:head|last)$/.test(f),j=Z[P?"take"+(f=="last"?"Right":""):f],ee=P||/^find/.test(f);j&&(Z.prototype[f]=function(){var ne=this.__wrapped__,ae=P?[1]:arguments,fe=ne instanceof Xt,Ae=ae[0],Ce=fe||Mt(ne),Te=function(Qt){var rr=j.apply(Z,Qo([Qt],ae));return P&&$e?rr[0]:rr};Ce&&v&&typeof Ae=="function"&&Ae.length!=1&&(fe=Ce=!1);var $e=this.__chain__,Qe=!!this.__actions__.length,mt=ee&&!$e,jt=fe&&!Qe;if(!ee&&Ce){ne=jt?ne:new Xt(this);var bt=c.apply(ne,ae);return bt.__actions__.push({func:lp,args:[Te],thisArg:t}),new Fi(bt,$e)}return mt&&jt?c.apply(this,ae):(bt=this.thru(Te),mt?P?bt.value()[0]:bt.value():bt)})}),Li(["pop","push","shift","sort","splice","unshift"],function(c){var f=D0[c],v=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",P=/^(?:pop|shift)$/.test(c);Z.prototype[c]=function(){var j=arguments;if(P&&!this.__chain__){var ee=this.value();return f.apply(Mt(ee)?ee:[],j)}return this[v](function(ne){return f.apply(Mt(ne)?ne:[],j)})}}),Ns(Xt.prototype,function(c,f){var v=Z[f];if(v){var P=v.name+"";vr.call(gl,P)||(gl[P]=[]),gl[P].push({name:f,func:v})}}),gl[rp(t,k).name]=[{name:"wrapper",func:t}],Xt.prototype.clone=iz,Xt.prototype.reverse=sz,Xt.prototype.value=oz,Z.prototype.at=Dq,Z.prototype.chain=$q,Z.prototype.commit=Bq,Z.prototype.next=Lq,Z.prototype.plant=Fq,Z.prototype.reverse=jq,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=zq,Z.prototype.first=Z.prototype.head,vh&&(Z.prototype[vh]=Uq),Z},fl=Bj();si?((si.exports=fl)._=fl,Vn._=fl):Sr._=fl}).call(i8)})(xB,xB.exports);var yBe=Object.defineProperty,xBe=Object.defineProperties,_Be=Object.getOwnPropertyDescriptors,Vce=Object.getOwnPropertySymbols,EBe=Object.prototype.hasOwnProperty,ABe=Object.prototype.propertyIsEnumerable,Gce=(r,e,t)=>e in r?yBe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,MS=(r,e)=>{for(var t in e||(e={}))EBe.call(e,t)&&Gce(r,t,e[t]);if(Vce)for(var t of Vce(e))ABe.call(e,t)&&Gce(r,t,e[t]);return r},CBe=(r,e)=>xBe(r,_Be(e));function g1(r,e,t){var n;const i=aMe(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${vBe}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function Lm(r){return r.includes(":")?r.split(":")[1]:r}function Kce(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function SBe(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function Zce(r={},e={}){const t=Jce(r),n=Jce(e);return xB.exports.merge(t,n)}function Jce(r){var e,t,n,i;const s={};if(!W6(r))return s;for(const[o,a]of Object.entries(r)){const l=J$(o)?[o]:a.chains,u=a.methods||[],h=a.events||[],p=a.rpcMap||{},g=q6(o);s[g]=CBe(MS(MS({},s[g]),a),{chains:K$(l,(e=s[g])==null?void 0:e.chains),methods:K$(u,(t=s[g])==null?void 0:t.methods),events:K$(h,(n=s[g])==null?void 0:n.events),rpcMap:MS(MS({},p),(i=s[g])==null?void 0:i.rpcMap)})}return s}function IBe(r){return r.includes(":")?r.split(":")[2]:r}function TBe(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=J$(t)?[t]:n.chains?n.chains:Kce(n.accounts);e[t]={chains:a,methods:i,events:s,accounts:o}}return e}function _B(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const Yce={},Ki=r=>Yce[r],EB=(r,e)=>{Yce[r]=e};let RBe=class{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Lm(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},kBe=class{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||g1(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(Lm(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}},MBe=class{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Lm(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},NBe=class{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Lm(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},PBe=class{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=Lm(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},OBe=class{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Lm(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},DBe=class{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Lm(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ki("disableProviderPing")))}},$Be=class{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Ki("events"),this.client=Ki("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||g1(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Zd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||g1(e,this.namespace);return typeof n>"u"?void 0:new _o(new ma(n,Ki("disableProviderPing")))}};var BBe=Object.defineProperty,LBe=Object.defineProperties,UBe=Object.getOwnPropertyDescriptors,Qce=Object.getOwnPropertySymbols,FBe=Object.prototype.hasOwnProperty,jBe=Object.prototype.propertyIsEnumerable,Xce=(r,e,t)=>e in r?BBe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,NS=(r,e)=>{for(var t in e||(e={}))FBe.call(e,t)&&Xce(r,t,e[t]);if(Qce)for(var t of Qce(e))jBe.call(e,t)&&Xce(r,t,e[t]);return r},AB=(r,e)=>LBe(r,UBe(e));let ele=class{constructor(e){this.events=new pn,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:mc(h1({level:(e==null?void 0:e.logger)||qce})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new ele(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:NS({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>t(null,d1(s,o))).catch(o=>t(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Gi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const o=TBe(s.namespaces);this.namespaces=Zce(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==Bce)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(pf(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Fce.init({logger:this.providerOpts.logger||qce,relayUrl:this.providerOpts.relayUrl||mBe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>q6(t)))];EB("client",this.client),EB("events",this.events),EB("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=SBe(t,this.session),i=Kce(n),s=Zce(this.namespaces,this.optionalNamespaces),o=AB(NS({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new kBe({namespace:o});break;case"solana":this.rpcProviders[t]=new MBe({namespace:o});break;case"cosmos":this.rpcProviders[t]=new NBe({namespace:o});break;case"polkadot":this.rpcProviders[t]=new RBe({namespace:o});break;case"cip34":this.rpcProviders[t]=new PBe({namespace:o});break;case"elrond":this.rpcProviders[t]=new OBe({namespace:o});break;case"multiversx":this.rpcProviders[t]=new DBe({namespace:o});break;case"near":this.rpcProviders[t]=new $Be({namespace:o});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&pf(i)&&this.events.emit("accountsChanged",i.map(IBe))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,o=q6(i),a=_B(i)!==_B(s)?`${o}:${_B(s)}`:i;this.onChainChanged(a)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=AB(NS({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",AB(NS({},Gi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Zd.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(o=>q6(o)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=q6(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Wce}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Wce}/${e}`)}};const zBe=ele,HBe="wc",qBe="ethereum_provider",WBe=`${HBe}@2:${qBe}:`,VBe="https://rpc.walletconnect.com/v1/",CB=["eth_sendTransaction","personal_sign"],GBe=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],SB=["chainChanged","accountsChanged"],KBe=["chainChanged","accountsChanged","message","disconnect","connect"];var ZBe=Object.defineProperty,JBe=Object.defineProperties,YBe=Object.getOwnPropertyDescriptors,tle=Object.getOwnPropertySymbols,QBe=Object.prototype.hasOwnProperty,XBe=Object.prototype.propertyIsEnumerable,rle=(r,e,t)=>e in r?ZBe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,s8=(r,e)=>{for(var t in e||(e={}))QBe.call(e,t)&&rle(r,t,e[t]);if(tle)for(var t of tle(e))XBe.call(e,t)&&rle(r,t,e[t]);return r},nle=(r,e)=>JBe(r,YBe(e));function PS(r){return Number(r[0].split(":")[1])}function IB(r){return`0x${r.toString(16)}`}function eLe(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=r;if(!pf(e))throw new Error("Invalid chains");const l={chains:e,methods:n||CB,events:s||SB,rpcMap:s8({},e.length?{[PS(e)]:a[PS(e)]}:{})},u=s==null?void 0:s.filter(w=>!SB.includes(w)),h=n==null?void 0:n.filter(w=>!CB.includes(w));if(!t&&!o&&!i&&!(u!=null&&u.length)&&!(h!=null&&h.length))return{required:e.length?l:void 0};const p=(u==null?void 0:u.length)&&(h==null?void 0:h.length)||!t,g={chains:[...new Set(p?l.chains.concat(t||[]):t)],methods:[...new Set(l.methods.concat(i!=null&&i.length?i:GBe))],events:[...new Set(l.events.concat(o!=null&&o.length?o:KBe))],rpcMap:a};return{required:e.length?l:void 0,optional:t.length?g:void 0}}let ile=class{constructor(){this.events=new pn.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=WBe,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new ile;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=eLe(this.rpc);try{const i=await new Promise(async(o,a)=>{var l;this.rpc.showQrModal&&((l=this.modal)==null||l.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(nle(s8({namespaces:s8({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{o(u)}).catch(u=>{a(new Error(u.message))})});if(!i)return;const s=cMe(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:IB(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",IB(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",nle(s8({},Gi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",IB(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=i.length?(e==null?void 0:e.methods)||CB:[],l=i.length?(e==null?void 0:e.events)||SB:[],u=(e==null?void 0:e.optionalMethods)||[],h=(e==null?void 0:e.optionalEvents)||[],p=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),g=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(w=>this.formatChainId(w)),optionalChains:s.map(w=>this.formatChainId(w)),methods:a,events:l,optionalMethods:u,optionalEvents:h,rpcMap:p,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:g,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?PS(this.rpc.chains):PS(this.rpc.optionalChains),this.signer=await zBe.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await Promise.resolve().then(()=>c1e);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(s8({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&pf(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&pf(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${VBe}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};const En={WALLET_ID:"@w3m/wallet_id",ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3},Eo={getCaipDefaultChain(r){if(r)return{id:`${Jt.EIP155}:${r.chainId}`,name:r.name,imageId:fa.EIP155NetworkImageIds[r.chainId]}},hexStringToNumber(r){const e=r.startsWith("0x")?r.slice(2):r;return parseInt(e,16)},numberToHexString(r){return`0x${r.toString(16)}`},async getUserInfo(r){const[e,t]=await Promise.all([Eo.getAddress(r),Eo.getChainId(r)]);return{chainId:t,address:e}},async getChainId(r){const e=await r.request({method:"eth_chainId"});return Number(e)},async getAddress(r){const[e]=await r.request({method:"eth_accounts"});return e},async addEthereumChain(r,e){await r.request({method:"wallet_addEthereumChain",params:[{chainId:Eo.numberToHexString(e.chainId),rpcUrls:[e.rpcUrl],chainName:e.name,nativeCurrency:{name:e.currency,decimals:18,symbol:e.currency},blockExplorerUrls:[e.explorerUrl],iconUrls:[fa.EIP155NetworkImageIds[e.chainId]]}]})}},Ao=vi({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,isConnected:!1}),Et={state:Ao,subscribeKey(r,e){return Ra(Ao,r,e)},subscribe(r){return hs(Ao,()=>r(Ao))},setProvider(r){r&&(Ao.provider=Lp(r))},setProviderType(r){Ao.providerType=r},setAddress(r){Ao.address=r},setPreferredAccountType(r){Ao.preferredAccountType=r},setChainId(r){Ao.chainId=r},setIsConnected(r){Ao.isConnected=r},setError(r){Ao.error=r},reset(){Ao.provider=void 0,Ao.address=void 0,Ao.chainId=void 0,Ao.providerType=void 0,Ao.isConnected=!1,Ao.error=void 0,Ao.preferredAccountType=void 0}};let tLe=class extends WSe{constructor(e){const{ethersConfig:t,siweConfig:n,chains:i,defaultChain:s,tokens:o,chainImages:a,_sdkVersion:l,...u}=e;if(!t)throw new Error("web3modal:constructor - ethersConfig is undefined");if(!u.projectId)throw new Error("web3modal:constructor - projectId is undefined");const h={switchCaipNetwork:async g=>{const w=vv.caipNetworkIdToNumber(g==null?void 0:g.id);if(w)try{Et.setError(void 0),await this.switchNetwork(w)}catch(y){throw Et.setError(y),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}},getApprovedCaipNetworksData:async()=>new Promise(async g=>{var y,C,T,k;const w=localStorage.getItem(En.WALLET_ID);if(w!=null&&w.includes(Jt.WALLET_CONNECT_CONNECTOR_ID)){const N=await this.getWalletConnectProvider();if(!N)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const O=(C=(y=N.signer)==null?void 0:y.session)==null?void 0:C.namespaces,B=(T=O==null?void 0:O[Jt.EIP155])==null?void 0:T.methods,z=(k=O==null?void 0:O[Jt.EIP155])==null?void 0:k.chains,G={supportsAllNetworks:(B==null?void 0:B.includes(Jt.ADD_CHAIN_METHOD))??!1,approvedCaipNetworkIds:z};g(G)}else g({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})})},p={connectWalletConnect:async g=>{const w=await this.getWalletConnectProvider();if(!w)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");w.on("display_uri",y=>{g(y)}),await w.connect(),await this.setWalletConnectProvider()},connectExternal:async({id:g,info:w,provider:y})=>{if(g===Jt.INJECTED_CONNECTOR_ID){const C=t.injected;if(!C)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{Et.setError(void 0),await C.request({method:"eth_requestAccounts"}),this.setInjectedProvider(t)}catch(T){Et.setError(T)}}else if(g===Jt.EIP6963_CONNECTOR_ID&&w&&y)try{Et.setError(void 0),await y.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(y,w.name)}catch(C){Et.setError(C)}else if(g===Jt.COINBASE_CONNECTOR_ID){const C=t.coinbase;if(!C)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{Et.setError(void 0),await C.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(t)}catch(T){Et.setError(T)}}else g===Jt.EMAIL_CONNECTOR_ID&&this.setEmailProvider()},checkInstalled(g){return g?t.injected&&!(window!=null&&window.ethereum)?!1:g.some(w=>{var y;return Boolean((y=window.ethereum)==null?void 0:y[String(w)])}):Boolean(window.ethereum)},disconnect:async()=>{var y;const g=Et.state.provider,w=Et.state.providerType;localStorage.removeItem(En.WALLET_ID),Et.reset(),w===Jt.WALLET_CONNECT_CONNECTOR_ID?await g.disconnect():w!==Jt.EMAIL_CONNECTOR_ID?g==null||g.emit("disconnect"):await((y=this.emailProvider)==null?void 0:y.disconnect())},signMessage:async g=>{const w=Et.state.provider;if(!w)throw new Error("connectionControllerClient:signMessage - provider is undefined");return await w.request({method:"personal_sign",params:[g,this.getAddress()]})},parseUnits:(g,w)=>AE(g,w),formatUnits:(g,w)=>EE(g,w),async estimateGas(g){const w=Et.state.chainId,y=Et.state.provider,C=Et.state.address;if(!y)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!C)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const T={from:g.address,to:g.to,data:g.data,type:0},k=new wA(y,w);return await new Pg(k,C).estimateGas(T)},sendTransaction:async g=>{const w=Et.state.chainId,y=Et.state.provider,C=Et.state.address;if(!y)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!C)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const T={to:g.to,value:g.value,gasLimit:g.gas,gasPrice:g.gasPrice,data:g.data,type:0},k=new wA(y,w),B=await(await new Pg(k,C).sendTransaction(T)).wait();return(B==null?void 0:B.hash)||null}};super({networkControllerClient:h,connectionControllerClient:p,siweControllerClient:n,defaultChain:Eo.getCaipDefaultChain(s),tokens:ICe.getCaipTokens(o),_sdkVersion:l??`html-ethers-${Jt.VERSION}`,...u}),this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.options=void 0,this.options=e,this.metadata=t.metadata,this.projectId=u.projectId,this.chains=i,this.createProvider(),Et.subscribeKey("address",()=>{this.syncAccount()}),Et.subscribeKey("chainId",()=>{this.syncNetwork(a)}),this.syncRequestedNetworks(i,a),this.syncConnectors(t),t.EIP6963&&typeof window<"u"&&(this.listenConnectors(t.EIP6963),this.checkActive6963Provider()),t.email&&this.syncEmailConnector(u.projectId),t.injected&&this.checkActiveInjectedProvider(t),t.coinbase&&this.checkActiveCoinbaseProvider(t)}getState(){const e=super.getState();return{...e,selectedNetworkId:vv.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState(t=>e({...t,selectedNetworkId:vv.caipNetworkIdToNumber(t.selectedNetworkId)}))}setAddress(e){const t=e?zr(e):void 0;Et.setAddress(t)}getAddress(){const{address:e}=Et.state;return e?zr(e):void 0}getError(){return Et.state.error}getChainId(){return Et.state.chainId}getIsConnected(){return Et.state.isConnected}getWalletProvider(){return Et.state.provider}getWalletProviderType(){return Et.state.providerType}subscribeProvider(e){return Et.subscribe(e)}async disconnect(){const{provider:e,providerType:t}=Et.state;if(localStorage.removeItem(En.WALLET_ID),Et.reset(),t==="injected"||t==="eip6963")e==null||e.emit("disconnect");else{const n=e;if(n)try{Et.setError(void 0),await n.disconnect()}catch(i){Et.setError(i)}}}createProvider(){return!this.walletConnectProviderInitPromise&&typeof window<"u"&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}async initWalletConnectProvider(){const e={projectId:this.projectId,showQrModal:!1,rpcMap:this.chains?this.chains.reduce((t,n)=>(t[n.chainId]=n.rpcUrl,t),{}):{},optionalChains:[...this.chains.map(t=>t.chainId)],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=await ile.init(e),await this.checkActiveWalletConnectProvider()}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{Et.setError(void 0),await this.createProvider()}catch(e){Et.setError(e)}return this.walletConnectProvider}syncRequestedNetworks(e,t){const n=e==null?void 0:e.map(i=>({id:`${Jt.EIP155}:${i.chainId}`,name:i.name,imageId:fa.EIP155NetworkImageIds[i.chainId],imageUrl:t==null?void 0:t[i.chainId]}));this.setRequestedCaipNetworks(n??[])}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=localStorage.getItem(En.WALLET_ID);e&&t===Jt.WALLET_CONNECT_CONNECTOR_ID&&await this.setWalletConnectProvider()}checkActiveInjectedProvider(e){const t=e.injected,n=localStorage.getItem(En.WALLET_ID);t&&n===Jt.INJECTED_CONNECTOR_ID&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){var i;const t=e.coinbase,n=localStorage.getItem(En.WALLET_ID);t&&n===Jt.COINBASE_CONNECTOR_ID&&(t._addresses&&((i=t._addresses)==null?void 0:i.length)>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(localStorage.removeItem(En.WALLET_ID),Et.reset()))}checkActive6963Provider(){const e=window==null?void 0:window.localStorage.getItem(En.WALLET_ID);if(e){const t=this.EIP6963Providers.find(n=>n.info.name===e);t&&this.setEIP6963Provider(t.provider,t.info.name)}}async setWalletConnectProvider(){var t;window==null||window.localStorage.setItem(En.WALLET_ID,Jt.WALLET_CONNECT_CONNECTOR_ID);const e=await this.getWalletConnectProvider();e&&(Et.setChainId(e.chainId),Et.setProviderType("walletConnect"),Et.setProvider(e),Et.setIsConnected(!0),this.setAddress((t=e.accounts)==null?void 0:t[0]),this.watchWalletConnect())}async setInjectedProvider(e){window==null||window.localStorage.setItem(En.WALLET_ID,Jt.INJECTED_CONNECTOR_ID);const t=e.injected;if(t){const{address:n,chainId:i}=await Eo.getUserInfo(t);n&&i&&(Et.setChainId(i),Et.setProviderType("injected"),Et.setProvider(e.injected),Et.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}async setEIP6963Provider(e,t){if(window==null||window.localStorage.setItem(En.WALLET_ID,t),e){const{address:n,chainId:i}=await Eo.getUserInfo(e);n&&i&&(Et.setChainId(i),Et.setProviderType("eip6963"),Et.setProvider(e),Et.setIsConnected(!0),this.setAddress(n),this.watchEIP6963(e))}}async setCoinbaseProvider(e){window==null||window.localStorage.setItem(En.WALLET_ID,Jt.COINBASE_CONNECTOR_ID);const t=e.coinbase;if(t){const{address:n,chainId:i}=await Eo.getUserInfo(t);n&&i&&(Et.setChainId(i),Et.setProviderType("coinbaseWallet"),Et.setProvider(e.coinbase),Et.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}async setEmailProvider(){if(window==null||window.localStorage.setItem(En.WALLET_ID,Jt.EMAIL_CONNECTOR_ID),this.emailProvider){const{address:e,chainId:t,smartAccountDeployed:n,preferredAccountType:i}=await this.emailProvider.connect({chainId:this.getChainId()}),{smartAccountEnabledNetworks:s}=await this.emailProvider.getSmartAccountEnabledNetworks();this.setSmartAccountEnabledNetworks(s),e&&t&&(Et.setChainId(t),Et.setProviderType(Jt.EMAIL_CONNECTOR_ID),Et.setProvider(this.emailProvider),Et.setIsConnected(!0),Et.setAddress(e),Et.setPreferredAccountType(i),this.setSmartAccountDeployed(Boolean(n)),this.watchEmail(),this.watchModal()),super.setLoading(!1)}}async watchWalletConnect(){const e=await this.getWalletConnectProvider();function t(){localStorage.removeItem(En.WALLET_ID),Et.reset(),e==null||e.removeListener("disconnect",t),e==null||e.removeListener("accountsChanged",i),e==null||e.removeListener("chainChanged",n)}function n(s){if(s){const o=Eo.hexStringToNumber(s);Et.setChainId(o)}}const i=async s=>{s.length>0&&await this.setWalletConnectProvider()};e&&(e.on("disconnect",t),e.on("accountsChanged",i),e.on("chainChanged",n))}watchInjected(e){const t=e.injected;function n(){localStorage.removeItem(En.WALLET_ID),Et.reset(),t==null||t.removeListener("disconnect",n),t==null||t.removeListener("accountsChanged",i),t==null||t.removeListener("chainChanged",s)}function i(o){const a=o==null?void 0:o[0];a?Et.setAddress(zr(a)):(localStorage.removeItem(En.WALLET_ID),Et.reset())}function s(o){if(o){const a=typeof o=="string"?Eo.hexStringToNumber(o):Number(o);Et.setChainId(a)}}t&&(t.on("disconnect",n),t.on("accountsChanged",i),t.on("chainChanged",s))}watchEIP6963(e){function t(){localStorage.removeItem(En.WALLET_ID),Et.reset(),e.removeListener("disconnect",t),e.removeListener("accountsChanged",n),e.removeListener("chainChanged",i)}function n(s){const o=s==null?void 0:s[0];o?Et.setAddress(zr(o)):(localStorage.removeItem(En.WALLET_ID),Et.reset())}function i(s){if(s){const o=typeof s=="string"?Eo.hexStringToNumber(s):Number(s);Et.setChainId(o)}}e&&(e.on("disconnect",t),e.on("accountsChanged",n),e.on("chainChanged",i))}watchCoinbase(e){const t=e.coinbase,n=localStorage.getItem(En.WALLET_ID);function i(){localStorage.removeItem(En.WALLET_ID),Et.reset(),t==null||t.removeListener("disconnect",i),t==null||t.removeListener("accountsChanged",s),t==null||t.removeListener("chainChanged",o)}function s(a){const l=a==null?void 0:a[0];l?Et.setAddress(zr(l)):(localStorage.removeItem(En.WALLET_ID),Et.reset())}function o(a){if(a&&n===Jt.COINBASE_CONNECTOR_ID){const l=Number(a);Et.setChainId(l)}}t&&(t.on("disconnect",i),t.on("accountsChanged",s),t.on("chainChanged",o))}watchEmail(){this.emailProvider&&(this.emailProvider.onRpcRequest(e=>{if(go.checkIfRequestExists(e))go.checkIfRequestIsAllowed(e)||(super.isOpen()?super.isTransactionStackEmpty()||super.redirect("ApproveTransaction"):super.open({view:"ApproveTransaction"}));else{super.open();const t=go.getRequestMethod(e);console.error(Oa.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:t}),setTimeout(()=>{this.showErrorMessage(Oa.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300)}}),this.emailProvider.onRpcResponse(e=>{switch(go.getResponseType(e)){case Pt.RPC_RESPONSE_TYPE_ERROR:{super.isOpen()&&(super.isTransactionStackEmpty()?super.close():super.popTransactionStack(!0));break}case Pt.RPC_RESPONSE_TYPE_TX:{super.isTransactionStackEmpty()?super.close():super.popTransactionStack();break}}}),this.emailProvider.onNotConnected(()=>{this.setIsConnected(!1),super.setLoading(!1)}),this.emailProvider.onIsConnected(({preferredAccountType:e})=>{this.setIsConnected(!0),super.setLoading(!1),Et.setPreferredAccountType(e)}),this.emailProvider.onSetPreferredAccount(({address:e,type:t})=>{var i;if(!e)return;const n=vv.caipNetworkIdToNumber((i=this.getCaipNetwork())==null?void 0:i.id);Et.setAddress(e),Et.setChainId(n),Et.setIsConnected(!0),Et.setPreferredAccountType(t),this.syncAccount()}))}watchModal(){this.emailProvider&&this.subscribeState(e=>{var t;e.open||(t=this.emailProvider)==null||t.rejectRpcRequest()})}async syncAccount(){const e=Et.state.address,t=Et.state.chainId,n=Et.state.isConnected,i=Et.state.preferredAccountType;if(this.resetAccount(),n&&e&&t){const s=`${Jt.EIP155}:${t}:${e}`;this.setIsConnected(n),this.setPreferredAccountType(i),this.setCaipAddress(s),this.syncConnectedWalletInfo(),await Promise.all([this.syncProfile(e),this.syncBalance(e),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())}async syncNetwork(e){const t=Et.state.address,n=Et.state.chainId,i=Et.state.isConnected;if(this.chains){const s=this.chains.find(o=>o.chainId===n);if(s){const o=`${Jt.EIP155}:${s.chainId}`;if(this.setCaipNetwork({id:o,name:s.name,imageId:fa.EIP155NetworkImageIds[s.chainId],imageUrl:e==null?void 0:e[s.chainId]}),i&&t){const a=`${Jt.EIP155}:${n}:${t}`;if(this.setCaipAddress(a),s.explorerUrl){const l=`${s.explorerUrl}/address/${t}`;this.setAddressExplorerUrl(l)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(await this.syncProfile(t),await this.syncBalance(t))}}else i&&this.setCaipNetwork({id:`${Jt.EIP155}:${n}`})}}async syncProfile(e){const t=Et.state.chainId;try{const{name:n,avatar:i}=await this.fetchIdentity({address:e});this.setProfileName(n),this.setProfileImage(i)}catch{if(t===1){const n=new Pp("mainnet"),i=await n.lookupAddress(e),s=await n.getAvatar(e);i&&this.setProfileName(i),s&&this.setProfileImage(s)}else this.setProfileName(null),this.setProfileImage(null)}}async syncBalance(e){const t=Et.state.chainId;if(t&&this.chains){const n=this.chains.find(i=>i.chainId===t);if(n){const i=new $l(n.rpcUrl,{chainId:t,name:n.name});if(i){const s=await i.getBalance(e),o=fk(s);this.setBalance(o,n.currency)}}}}syncConnectedWalletInfo(){var n;const e=window==null?void 0:window.localStorage.getItem(En.WALLET_ID),t=Et.state.providerType;if(t===Jt.EIP6963_CONNECTOR_ID){if(e){const i=this.EIP6963Providers.find(s=>s.info.name===e);i&&this.setConnectedWalletInfo({...i.info})}}else if(t===Jt.WALLET_CONNECT_CONNECTOR_ID){const i=Et.state.provider;i.session&&this.setConnectedWalletInfo({...i.session.peer.metadata,name:i.session.peer.metadata.name,icon:(n=i.session.peer.metadata.icons)==null?void 0:n[0]})}else e&&this.setConnectedWalletInfo({name:e})}async switchNetwork(e){var i,s,o,a,l,u,h,p;const t=Et.state.provider,n=Et.state.providerType;if(this.chains){const g=this.chains.find(w=>w.chainId===e);if(n===Jt.WALLET_CONNECT_CONNECTOR_ID&&g){const w=t;if(w)try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:Eo.numberToHexString(g.chainId)}]}),Et.setChainId(e)}catch(y){if(y.code===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||y.code===En.ERROR_CODE_DEFAULT||((s=(i=y==null?void 0:y.data)==null?void 0:i.originalError)==null?void 0:s.code)===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Eo.addEthereumChain(w,g);else throw new Error("Chain is not supported")}}else if(n===Jt.INJECTED_CONNECTOR_ID&&g){const w=t;if(w)try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:Eo.numberToHexString(g.chainId)}]}),Et.setChainId(g.chainId)}catch(y){if(y.code===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||y.code===En.ERROR_CODE_DEFAULT||((a=(o=y==null?void 0:y.data)==null?void 0:o.originalError)==null?void 0:a.code)===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Eo.addEthereumChain(w,g);else throw new Error("Chain is not supported")}}else if(n===Jt.EIP6963_CONNECTOR_ID&&g){const w=t;if(w)try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:Eo.numberToHexString(g.chainId)}]}),Et.setChainId(g.chainId)}catch(y){if(y.code===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||y.code===En.ERROR_CODE_DEFAULT||((u=(l=y==null?void 0:y.data)==null?void 0:l.originalError)==null?void 0:u.code)===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Eo.addEthereumChain(w,g);else throw new Error("Chain is not supported")}}else if(n===Jt.COINBASE_CONNECTOR_ID&&g){const w=t;if(w)try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:Eo.numberToHexString(g.chainId)}]}),Et.setChainId(g.chainId)}catch(y){(y.code===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||y.code===En.ERROR_CODE_DEFAULT||((p=(h=y==null?void 0:y.data)==null?void 0:h.originalError)==null?void 0:p.code)===En.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)&&await Eo.addEthereumChain(w,g)}}else if(n===Jt.EMAIL_CONNECTOR_ID&&this.emailProvider&&g!=null&&g.chainId)try{await this.emailProvider.switchNetwork(g==null?void 0:g.chainId),Et.setChainId(g.chainId);const{address:w,preferredAccountType:y}=await this.emailProvider.connect({chainId:g==null?void 0:g.chainId});Et.setAddress(w),Et.setPreferredAccountType(y),await this.syncAccount()}catch{throw new Error("Switching chain failed")}}}syncConnectors(e){var i,s,o,a,l,u;const t=[],n=fa.ConnectorTypesMap[Jt.WALLET_CONNECT_CONNECTOR_ID];if(t.push({id:Jt.WALLET_CONNECT_CONNECTOR_ID,explorerId:fa.ConnectorExplorerIds[Jt.WALLET_CONNECT_CONNECTOR_ID],imageId:fa.ConnectorImageIds[Jt.WALLET_CONNECT_CONNECTOR_ID],imageUrl:(s=(i=this.options)==null?void 0:i.connectorImages)==null?void 0:s[Jt.WALLET_CONNECT_CONNECTOR_ID],name:fa.ConnectorNamesMap[Jt.WALLET_CONNECT_CONNECTOR_ID],type:n}),e.injected){const h=fa.ConnectorTypesMap[Jt.INJECTED_CONNECTOR_ID];t.push({id:Jt.INJECTED_CONNECTOR_ID,explorerId:fa.ConnectorExplorerIds[Jt.INJECTED_CONNECTOR_ID],imageId:fa.ConnectorImageIds[Jt.INJECTED_CONNECTOR_ID],imageUrl:(a=(o=this.options)==null?void 0:o.connectorImages)==null?void 0:a[Jt.INJECTED_CONNECTOR_ID],name:fa.ConnectorNamesMap[Jt.INJECTED_CONNECTOR_ID],type:h})}e.coinbase&&t.push({id:Jt.COINBASE_CONNECTOR_ID,explorerId:fa.ConnectorExplorerIds[Jt.COINBASE_CONNECTOR_ID],imageId:fa.ConnectorImageIds[Jt.COINBASE_CONNECTOR_ID],imageUrl:(u=(l=this.options)==null?void 0:l.connectorImages)==null?void 0:u[Jt.COINBASE_CONNECTOR_ID],name:fa.ConnectorNamesMap[Jt.COINBASE_CONNECTOR_ID],type:"EXTERNAL"}),this.setConnectors(t)}async syncEmailConnector(e){if(typeof window<"u"){this.emailProvider=new ECe(e),this.addConnector({id:Jt.EMAIL_CONNECTOR_ID,type:"EMAIL",name:"Email",provider:this.emailProvider}),super.setLoading(!0);const t=this.emailProvider.getLoginEmailUsed();super.setLoading(t);const{isConnected:n}=await this.emailProvider.isConnected();n?await this.setEmailProvider():super.setLoading(!1)}}eip6963EventHandler(e){var t,n;if(e.detail){const{info:i,provider:s}=e.detail;if(!this.getConnectors().find(l=>l.name===i.name)){const l=fa.ConnectorTypesMap[Jt.EIP6963_CONNECTOR_ID];{this.addConnector({id:Jt.EIP6963_CONNECTOR_ID,type:l,imageUrl:i.icon??((n=(t=this.options)==null?void 0:t.connectorImages)==null?void 0:n[Jt.EIP6963_CONNECTOR_ID]),name:i.name,provider:s,info:i});const u={provider:s,info:i};this.EIP6963Providers.push(u)}}}}listenConnectors(e){if(typeof window<"u"&&e){const t=this.eip6963EventHandler.bind(this);window.addEventListener(Jt.EIP6963_ANNOUNCE_EVENT,t),window.dispatchEvent(new Event(Jt.EIP6963_REQUEST_EVENT))}}};var sle={},o8={},OS={};Object.defineProperty(OS,"__esModule",{value:!0}),OS.walletLogo=void 0;const rLe=(r,e)=>{let t;switch(r){case"standard":return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};OS.walletLogo=rLe;var DS={};Object.defineProperty(DS,"__esModule",{value:!0}),DS.LINK_API_URL=void 0,DS.LINK_API_URL="https://www.walletlink.org";var mr={},wy={},nLe={get exports(){return wy},set exports(r){wy=r}};(function(r){(function(e,t){function n(b,d){if(!b)throw new Error(d||"Assertion failed")}function i(b,d){b.super_=d;var m=function(){};m.prototype=d.prototype,b.prototype=new m,b.prototype.constructor=b}function s(b,d,m){if(s.isBN(b))return b;this.negative=0,this.words=null,this.length=0,this.red=null,b!==null&&((d==="le"||d==="be")&&(m=d,d=10),this._init(b||0,d||10,m||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=qc.Buffer}catch{}s.isBN=function(d){return d instanceof s?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===s.wordSize&&Array.isArray(d.words)},s.max=function(d,m){return d.cmp(m)>0?d:m},s.min=function(d,m){return d.cmp(m)<0?d:m},s.prototype._init=function(d,m,x){if(typeof d=="number")return this._initNumber(d,m,x);if(typeof d=="object")return this._initArray(d,m,x);m==="hex"&&(m=16),n(m===(m|0)&&m>=2&&m<=36),d=d.toString().replace(/\s+/g,"");var A=0;d[0]==="-"&&(A++,this.negative=1),A=0;A-=3)R=d[A]|d[A-1]<<8|d[A-2]<<16,this.words[I]|=R<>>26-S&67108863,S+=24,S>=26&&(S-=26,I++);else if(x==="le")for(A=0,I=0;A>>26-S&67108863,S+=24,S>=26&&(S-=26,I++);return this._strip()};function a(b,d){var m=b.charCodeAt(d);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;n(!1,"Invalid character in "+b)}function l(b,d,m){var x=a(b,m);return m-1>=d&&(x|=a(b,m-1)<<4),x}s.prototype._parseHex=function(d,m,x){this.length=Math.ceil((d.length-m)/6),this.words=new Array(this.length);for(var A=0;A=m;A-=2)S=l(d,m,A)<=18?(I-=18,R+=1,this.words[R]|=S>>>26):I+=8;else{var E=d.length-m;for(A=E%2===0?m+1:m;A=18?(I-=18,R+=1,this.words[R]|=S>>>26):I+=8}this._strip()};function u(b,d,m,x){for(var A=0,I=0,R=Math.min(b.length,m),S=d;S=49?I=E-49+10:E>=17?I=E-17+10:I=E,n(E>=0&&I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?""}var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(d,m){d=d||10,m=m|0||1;var x;if(d===16||d==="hex"){x="";for(var A=0,I=0,R=0;R>>24-A&16777215,A+=2,A>=26&&(A-=26,R--),I!==0||R!==this.length-1?x=g[6-E.length]+E+x:x=E+x}for(I!==0&&(x=I.toString(16)+x);x.length%m!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(d===(d|0)&&d>=2&&d<=36){var _=w[d],L=y[d];x="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var q=ie.modrn(L).toString(d);ie=ie.idivn(L),ie.isZero()?x=q+x:x=g[_-q.length]+q+x}for(this.isZero()&&(x="0"+x);x.length%m!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(d,m){return this.toArrayLike(o,d,m)}),s.prototype.toArray=function(d,m){return this.toArrayLike(Array,d,m)};var C=function(d,m){return d.allocUnsafe?d.allocUnsafe(m):new d(m)};s.prototype.toArrayLike=function(d,m,x){this._strip();var A=this.byteLength(),I=x||Math.max(1,A);n(A<=I,"byte array longer than desired length"),n(I>0,"Requested array length <= 0");var R=C(d,I),S=m==="le"?"LE":"BE";return this["_toArrayLike"+S](R,A),R},s.prototype._toArrayLikeLE=function(d,m){for(var x=0,A=0,I=0,R=0;I>8&255),x>16&255),R===6?(x>24&255),A=0,R=0):(A=S>>>24,R+=2)}if(x=0&&(d[x--]=S>>8&255),x>=0&&(d[x--]=S>>16&255),R===6?(x>=0&&(d[x--]=S>>24&255),A=0,R=0):(A=S>>>24,R+=2)}if(x>=0)for(d[x--]=A;x>=0;)d[x--]=0},Math.clz32?s.prototype._countBits=function(d){return 32-Math.clz32(d)}:s.prototype._countBits=function(d){var m=d,x=0;return m>=4096&&(x+=13,m>>>=13),m>=64&&(x+=7,m>>>=7),m>=8&&(x+=4,m>>>=4),m>=2&&(x+=2,m>>>=2),x+m},s.prototype._zeroBits=function(d){if(d===0)return 26;var m=d,x=0;return m&8191||(x+=13,m>>>=13),m&127||(x+=7,m>>>=7),m&15||(x+=4,m>>>=4),m&3||(x+=2,m>>>=2),m&1||x++,x},s.prototype.bitLength=function(){var d=this.words[this.length-1],m=this._countBits(d);return(this.length-1)*26+m};function T(b){for(var d=new Array(b.bitLength()),m=0;m>>A&1}return d}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,m=0;md.length?this.clone().ior(d):d.clone().ior(this)},s.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},s.prototype.iuand=function(d){var m;this.length>d.length?m=d:m=this;for(var x=0;xd.length?this.clone().iand(d):d.clone().iand(this)},s.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},s.prototype.iuxor=function(d){var m,x;this.length>d.length?(m=this,x=d):(m=d,x=this);for(var A=0;Ad.length?this.clone().ixor(d):d.clone().ixor(this)},s.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},s.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var m=Math.ceil(d/26)|0,x=d%26;this._expand(m),x>0&&m--;for(var A=0;A0&&(this.words[A]=~this.words[A]&67108863>>26-x),this._strip()},s.prototype.notn=function(d){return this.clone().inotn(d)},s.prototype.setn=function(d,m){n(typeof d=="number"&&d>=0);var x=d/26|0,A=d%26;return this._expand(x+1),m?this.words[x]=this.words[x]|1<d.length?(x=this,A=d):(x=d,A=this);for(var I=0,R=0;R>>26;for(;I!==0&&R>>26;if(this.length=x.length,I!==0)this.words[this.length]=I,this.length++;else if(x!==this)for(;Rd.length?this.clone().iadd(d):d.clone().iadd(this)},s.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var m=this.iadd(d);return d.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var x=this.cmp(d);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var A,I;x>0?(A=this,I=d):(A=d,I=this);for(var R=0,S=0;S>26,this.words[S]=m&67108863;for(;R!==0&&S>26,this.words[S]=m&67108863;if(R===0&&S>>26,ie=E&67108863,q=Math.min(_,d.length-1),Y=Math.max(0,_-b.length+1);Y<=q;Y++){var K=_-Y|0;A=b.words[K]|0,I=d.words[Y]|0,R=A*I+ie,L+=R/67108864|0,ie=R&67108863}m.words[_]=ie|0,E=L|0}return E!==0?m.words[_]=E|0:m.length--,m._strip()}var N=function(d,m,x){var A=d.words,I=m.words,R=x.words,S=0,E,_,L,ie=A[0]|0,q=ie&8191,Y=ie>>>13,K=A[1]|0,te=K&8191,re=K>>>13,H=A[2]|0,U=H&8191,W=H>>>13,le=A[3]|0,de=le&8191,Se=le>>>13,Me=A[4]|0,ke=Me&8191,Ke=Me>>>13,Re=A[5]|0,je=Re&8191,De=Re>>>13,Je=A[6]|0,ze=Je&8191,qe=Je>>>13,Ve=A[7]|0,He=Ve&8191,Be=Ve>>>13,Ge=A[8]|0,Xe=Ge&8191,se=Ge>>>13,J=A[9]|0,X=J&8191,ue=J>>>13,we=I[0]|0,ye=we&8191,Ie=we>>>13,it=I[1]|0,ot=it&8191,tt=it>>>13,It=I[2]|0,st=It&8191,Nt=It>>>13,Lt=I[3]|0,ht=Lt&8191,wt=Lt>>>13,Ut=I[4]|0,ft=Ut&8191,dt=Ut>>>13,Vt=I[5]|0,xt=Vt&8191,pt=Vt>>>13,Gt=I[6]|0,gt=Gt&8191,vt=Gt>>>13,Ft=I[7]|0,lt=Ft&8191,_t=Ft>>>13,Kt=I[8]|0,Ht=Kt&8191,qt=Kt>>>13,br=I[9]|0,Tt=br&8191,ur=br>>>13;x.negative=d.negative^m.negative,x.length=19,E=Math.imul(q,ye),_=Math.imul(q,Ie),_=_+Math.imul(Y,ye)|0,L=Math.imul(Y,Ie);var Xn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,E=Math.imul(te,ye),_=Math.imul(te,Ie),_=_+Math.imul(re,ye)|0,L=Math.imul(re,Ie),E=E+Math.imul(q,ot)|0,_=_+Math.imul(q,tt)|0,_=_+Math.imul(Y,ot)|0,L=L+Math.imul(Y,tt)|0;var ei=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ei>>>26)|0,ei&=67108863,E=Math.imul(U,ye),_=Math.imul(U,Ie),_=_+Math.imul(W,ye)|0,L=Math.imul(W,Ie),E=E+Math.imul(te,ot)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,ot)|0,L=L+Math.imul(re,tt)|0,E=E+Math.imul(q,st)|0,_=_+Math.imul(q,Nt)|0,_=_+Math.imul(Y,st)|0,L=L+Math.imul(Y,Nt)|0;var ti=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ti>>>26)|0,ti&=67108863,E=Math.imul(de,ye),_=Math.imul(de,Ie),_=_+Math.imul(Se,ye)|0,L=Math.imul(Se,Ie),E=E+Math.imul(U,ot)|0,_=_+Math.imul(U,tt)|0,_=_+Math.imul(W,ot)|0,L=L+Math.imul(W,tt)|0,E=E+Math.imul(te,st)|0,_=_+Math.imul(te,Nt)|0,_=_+Math.imul(re,st)|0,L=L+Math.imul(re,Nt)|0,E=E+Math.imul(q,ht)|0,_=_+Math.imul(q,wt)|0,_=_+Math.imul(Y,ht)|0,L=L+Math.imul(Y,wt)|0;var ri=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ri>>>26)|0,ri&=67108863,E=Math.imul(ke,ye),_=Math.imul(ke,Ie),_=_+Math.imul(Ke,ye)|0,L=Math.imul(Ke,Ie),E=E+Math.imul(de,ot)|0,_=_+Math.imul(de,tt)|0,_=_+Math.imul(Se,ot)|0,L=L+Math.imul(Se,tt)|0,E=E+Math.imul(U,st)|0,_=_+Math.imul(U,Nt)|0,_=_+Math.imul(W,st)|0,L=L+Math.imul(W,Nt)|0,E=E+Math.imul(te,ht)|0,_=_+Math.imul(te,wt)|0,_=_+Math.imul(re,ht)|0,L=L+Math.imul(re,wt)|0,E=E+Math.imul(q,ft)|0,_=_+Math.imul(q,dt)|0,_=_+Math.imul(Y,ft)|0,L=L+Math.imul(Y,dt)|0;var bn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(bn>>>26)|0,bn&=67108863,E=Math.imul(je,ye),_=Math.imul(je,Ie),_=_+Math.imul(De,ye)|0,L=Math.imul(De,Ie),E=E+Math.imul(ke,ot)|0,_=_+Math.imul(ke,tt)|0,_=_+Math.imul(Ke,ot)|0,L=L+Math.imul(Ke,tt)|0,E=E+Math.imul(de,st)|0,_=_+Math.imul(de,Nt)|0,_=_+Math.imul(Se,st)|0,L=L+Math.imul(Se,Nt)|0,E=E+Math.imul(U,ht)|0,_=_+Math.imul(U,wt)|0,_=_+Math.imul(W,ht)|0,L=L+Math.imul(W,wt)|0,E=E+Math.imul(te,ft)|0,_=_+Math.imul(te,dt)|0,_=_+Math.imul(re,ft)|0,L=L+Math.imul(re,dt)|0,E=E+Math.imul(q,xt)|0,_=_+Math.imul(q,pt)|0,_=_+Math.imul(Y,xt)|0,L=L+Math.imul(Y,pt)|0;var qn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(qn>>>26)|0,qn&=67108863,E=Math.imul(ze,ye),_=Math.imul(ze,Ie),_=_+Math.imul(qe,ye)|0,L=Math.imul(qe,Ie),E=E+Math.imul(je,ot)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(De,ot)|0,L=L+Math.imul(De,tt)|0,E=E+Math.imul(ke,st)|0,_=_+Math.imul(ke,Nt)|0,_=_+Math.imul(Ke,st)|0,L=L+Math.imul(Ke,Nt)|0,E=E+Math.imul(de,ht)|0,_=_+Math.imul(de,wt)|0,_=_+Math.imul(Se,ht)|0,L=L+Math.imul(Se,wt)|0,E=E+Math.imul(U,ft)|0,_=_+Math.imul(U,dt)|0,_=_+Math.imul(W,ft)|0,L=L+Math.imul(W,dt)|0,E=E+Math.imul(te,xt)|0,_=_+Math.imul(te,pt)|0,_=_+Math.imul(re,xt)|0,L=L+Math.imul(re,pt)|0,E=E+Math.imul(q,gt)|0,_=_+Math.imul(q,vt)|0,_=_+Math.imul(Y,gt)|0,L=L+Math.imul(Y,vt)|0;var Di=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Di>>>26)|0,Di&=67108863,E=Math.imul(He,ye),_=Math.imul(He,Ie),_=_+Math.imul(Be,ye)|0,L=Math.imul(Be,Ie),E=E+Math.imul(ze,ot)|0,_=_+Math.imul(ze,tt)|0,_=_+Math.imul(qe,ot)|0,L=L+Math.imul(qe,tt)|0,E=E+Math.imul(je,st)|0,_=_+Math.imul(je,Nt)|0,_=_+Math.imul(De,st)|0,L=L+Math.imul(De,Nt)|0,E=E+Math.imul(ke,ht)|0,_=_+Math.imul(ke,wt)|0,_=_+Math.imul(Ke,ht)|0,L=L+Math.imul(Ke,wt)|0,E=E+Math.imul(de,ft)|0,_=_+Math.imul(de,dt)|0,_=_+Math.imul(Se,ft)|0,L=L+Math.imul(Se,dt)|0,E=E+Math.imul(U,xt)|0,_=_+Math.imul(U,pt)|0,_=_+Math.imul(W,xt)|0,L=L+Math.imul(W,pt)|0,E=E+Math.imul(te,gt)|0,_=_+Math.imul(te,vt)|0,_=_+Math.imul(re,gt)|0,L=L+Math.imul(re,vt)|0,E=E+Math.imul(q,lt)|0,_=_+Math.imul(q,_t)|0,_=_+Math.imul(Y,lt)|0,L=L+Math.imul(Y,_t)|0;var Wn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,E=Math.imul(Xe,ye),_=Math.imul(Xe,Ie),_=_+Math.imul(se,ye)|0,L=Math.imul(se,Ie),E=E+Math.imul(He,ot)|0,_=_+Math.imul(He,tt)|0,_=_+Math.imul(Be,ot)|0,L=L+Math.imul(Be,tt)|0,E=E+Math.imul(ze,st)|0,_=_+Math.imul(ze,Nt)|0,_=_+Math.imul(qe,st)|0,L=L+Math.imul(qe,Nt)|0,E=E+Math.imul(je,ht)|0,_=_+Math.imul(je,wt)|0,_=_+Math.imul(De,ht)|0,L=L+Math.imul(De,wt)|0,E=E+Math.imul(ke,ft)|0,_=_+Math.imul(ke,dt)|0,_=_+Math.imul(Ke,ft)|0,L=L+Math.imul(Ke,dt)|0,E=E+Math.imul(de,xt)|0,_=_+Math.imul(de,pt)|0,_=_+Math.imul(Se,xt)|0,L=L+Math.imul(Se,pt)|0,E=E+Math.imul(U,gt)|0,_=_+Math.imul(U,vt)|0,_=_+Math.imul(W,gt)|0,L=L+Math.imul(W,vt)|0,E=E+Math.imul(te,lt)|0,_=_+Math.imul(te,_t)|0,_=_+Math.imul(re,lt)|0,L=L+Math.imul(re,_t)|0,E=E+Math.imul(q,Ht)|0,_=_+Math.imul(q,qt)|0,_=_+Math.imul(Y,Ht)|0,L=L+Math.imul(Y,qt)|0;var $i=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+($i>>>26)|0,$i&=67108863,E=Math.imul(X,ye),_=Math.imul(X,Ie),_=_+Math.imul(ue,ye)|0,L=Math.imul(ue,Ie),E=E+Math.imul(Xe,ot)|0,_=_+Math.imul(Xe,tt)|0,_=_+Math.imul(se,ot)|0,L=L+Math.imul(se,tt)|0,E=E+Math.imul(He,st)|0,_=_+Math.imul(He,Nt)|0,_=_+Math.imul(Be,st)|0,L=L+Math.imul(Be,Nt)|0,E=E+Math.imul(ze,ht)|0,_=_+Math.imul(ze,wt)|0,_=_+Math.imul(qe,ht)|0,L=L+Math.imul(qe,wt)|0,E=E+Math.imul(je,ft)|0,_=_+Math.imul(je,dt)|0,_=_+Math.imul(De,ft)|0,L=L+Math.imul(De,dt)|0,E=E+Math.imul(ke,xt)|0,_=_+Math.imul(ke,pt)|0,_=_+Math.imul(Ke,xt)|0,L=L+Math.imul(Ke,pt)|0,E=E+Math.imul(de,gt)|0,_=_+Math.imul(de,vt)|0,_=_+Math.imul(Se,gt)|0,L=L+Math.imul(Se,vt)|0,E=E+Math.imul(U,lt)|0,_=_+Math.imul(U,_t)|0,_=_+Math.imul(W,lt)|0,L=L+Math.imul(W,_t)|0,E=E+Math.imul(te,Ht)|0,_=_+Math.imul(te,qt)|0,_=_+Math.imul(re,Ht)|0,L=L+Math.imul(re,qt)|0,E=E+Math.imul(q,Tt)|0,_=_+Math.imul(q,ur)|0,_=_+Math.imul(Y,Tt)|0,L=L+Math.imul(Y,ur)|0;var Bi=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,E=Math.imul(X,ot),_=Math.imul(X,tt),_=_+Math.imul(ue,ot)|0,L=Math.imul(ue,tt),E=E+Math.imul(Xe,st)|0,_=_+Math.imul(Xe,Nt)|0,_=_+Math.imul(se,st)|0,L=L+Math.imul(se,Nt)|0,E=E+Math.imul(He,ht)|0,_=_+Math.imul(He,wt)|0,_=_+Math.imul(Be,ht)|0,L=L+Math.imul(Be,wt)|0,E=E+Math.imul(ze,ft)|0,_=_+Math.imul(ze,dt)|0,_=_+Math.imul(qe,ft)|0,L=L+Math.imul(qe,dt)|0,E=E+Math.imul(je,xt)|0,_=_+Math.imul(je,pt)|0,_=_+Math.imul(De,xt)|0,L=L+Math.imul(De,pt)|0,E=E+Math.imul(ke,gt)|0,_=_+Math.imul(ke,vt)|0,_=_+Math.imul(Ke,gt)|0,L=L+Math.imul(Ke,vt)|0,E=E+Math.imul(de,lt)|0,_=_+Math.imul(de,_t)|0,_=_+Math.imul(Se,lt)|0,L=L+Math.imul(Se,_t)|0,E=E+Math.imul(U,Ht)|0,_=_+Math.imul(U,qt)|0,_=_+Math.imul(W,Ht)|0,L=L+Math.imul(W,qt)|0,E=E+Math.imul(te,Tt)|0,_=_+Math.imul(te,ur)|0,_=_+Math.imul(re,Tt)|0,L=L+Math.imul(re,ur)|0;var bi=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(bi>>>26)|0,bi&=67108863,E=Math.imul(X,st),_=Math.imul(X,Nt),_=_+Math.imul(ue,st)|0,L=Math.imul(ue,Nt),E=E+Math.imul(Xe,ht)|0,_=_+Math.imul(Xe,wt)|0,_=_+Math.imul(se,ht)|0,L=L+Math.imul(se,wt)|0,E=E+Math.imul(He,ft)|0,_=_+Math.imul(He,dt)|0,_=_+Math.imul(Be,ft)|0,L=L+Math.imul(Be,dt)|0,E=E+Math.imul(ze,xt)|0,_=_+Math.imul(ze,pt)|0,_=_+Math.imul(qe,xt)|0,L=L+Math.imul(qe,pt)|0,E=E+Math.imul(je,gt)|0,_=_+Math.imul(je,vt)|0,_=_+Math.imul(De,gt)|0,L=L+Math.imul(De,vt)|0,E=E+Math.imul(ke,lt)|0,_=_+Math.imul(ke,_t)|0,_=_+Math.imul(Ke,lt)|0,L=L+Math.imul(Ke,_t)|0,E=E+Math.imul(de,Ht)|0,_=_+Math.imul(de,qt)|0,_=_+Math.imul(Se,Ht)|0,L=L+Math.imul(Se,qt)|0,E=E+Math.imul(U,Tt)|0,_=_+Math.imul(U,ur)|0,_=_+Math.imul(W,Tt)|0,L=L+Math.imul(W,ur)|0;var Ei=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,E=Math.imul(X,ht),_=Math.imul(X,wt),_=_+Math.imul(ue,ht)|0,L=Math.imul(ue,wt),E=E+Math.imul(Xe,ft)|0,_=_+Math.imul(Xe,dt)|0,_=_+Math.imul(se,ft)|0,L=L+Math.imul(se,dt)|0,E=E+Math.imul(He,xt)|0,_=_+Math.imul(He,pt)|0,_=_+Math.imul(Be,xt)|0,L=L+Math.imul(Be,pt)|0,E=E+Math.imul(ze,gt)|0,_=_+Math.imul(ze,vt)|0,_=_+Math.imul(qe,gt)|0,L=L+Math.imul(qe,vt)|0,E=E+Math.imul(je,lt)|0,_=_+Math.imul(je,_t)|0,_=_+Math.imul(De,lt)|0,L=L+Math.imul(De,_t)|0,E=E+Math.imul(ke,Ht)|0,_=_+Math.imul(ke,qt)|0,_=_+Math.imul(Ke,Ht)|0,L=L+Math.imul(Ke,qt)|0,E=E+Math.imul(de,Tt)|0,_=_+Math.imul(de,ur)|0,_=_+Math.imul(Se,Tt)|0,L=L+Math.imul(Se,ur)|0;var Ai=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,E=Math.imul(X,ft),_=Math.imul(X,dt),_=_+Math.imul(ue,ft)|0,L=Math.imul(ue,dt),E=E+Math.imul(Xe,xt)|0,_=_+Math.imul(Xe,pt)|0,_=_+Math.imul(se,xt)|0,L=L+Math.imul(se,pt)|0,E=E+Math.imul(He,gt)|0,_=_+Math.imul(He,vt)|0,_=_+Math.imul(Be,gt)|0,L=L+Math.imul(Be,vt)|0,E=E+Math.imul(ze,lt)|0,_=_+Math.imul(ze,_t)|0,_=_+Math.imul(qe,lt)|0,L=L+Math.imul(qe,_t)|0,E=E+Math.imul(je,Ht)|0,_=_+Math.imul(je,qt)|0,_=_+Math.imul(De,Ht)|0,L=L+Math.imul(De,qt)|0,E=E+Math.imul(ke,Tt)|0,_=_+Math.imul(ke,ur)|0,_=_+Math.imul(Ke,Tt)|0,L=L+Math.imul(Ke,ur)|0;var Cn=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,E=Math.imul(X,xt),_=Math.imul(X,pt),_=_+Math.imul(ue,xt)|0,L=Math.imul(ue,pt),E=E+Math.imul(Xe,gt)|0,_=_+Math.imul(Xe,vt)|0,_=_+Math.imul(se,gt)|0,L=L+Math.imul(se,vt)|0,E=E+Math.imul(He,lt)|0,_=_+Math.imul(He,_t)|0,_=_+Math.imul(Be,lt)|0,L=L+Math.imul(Be,_t)|0,E=E+Math.imul(ze,Ht)|0,_=_+Math.imul(ze,qt)|0,_=_+Math.imul(qe,Ht)|0,L=L+Math.imul(qe,qt)|0,E=E+Math.imul(je,Tt)|0,_=_+Math.imul(je,ur)|0,_=_+Math.imul(De,Tt)|0,L=L+Math.imul(De,ur)|0;var Rs=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,E=Math.imul(X,gt),_=Math.imul(X,vt),_=_+Math.imul(ue,gt)|0,L=Math.imul(ue,vt),E=E+Math.imul(Xe,lt)|0,_=_+Math.imul(Xe,_t)|0,_=_+Math.imul(se,lt)|0,L=L+Math.imul(se,_t)|0,E=E+Math.imul(He,Ht)|0,_=_+Math.imul(He,qt)|0,_=_+Math.imul(Be,Ht)|0,L=L+Math.imul(Be,qt)|0,E=E+Math.imul(ze,Tt)|0,_=_+Math.imul(ze,ur)|0,_=_+Math.imul(qe,Tt)|0,L=L+Math.imul(qe,ur)|0;var ks=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(ks>>>26)|0,ks&=67108863,E=Math.imul(X,lt),_=Math.imul(X,_t),_=_+Math.imul(ue,lt)|0,L=Math.imul(ue,_t),E=E+Math.imul(Xe,Ht)|0,_=_+Math.imul(Xe,qt)|0,_=_+Math.imul(se,Ht)|0,L=L+Math.imul(se,qt)|0,E=E+Math.imul(He,Tt)|0,_=_+Math.imul(He,ur)|0,_=_+Math.imul(Be,Tt)|0,L=L+Math.imul(Be,ur)|0;var Ms=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,E=Math.imul(X,Ht),_=Math.imul(X,qt),_=_+Math.imul(ue,Ht)|0,L=Math.imul(ue,qt),E=E+Math.imul(Xe,Tt)|0,_=_+Math.imul(Xe,ur)|0,_=_+Math.imul(se,Tt)|0,L=L+Math.imul(se,ur)|0;var Zo=(S+E|0)+((_&8191)<<13)|0;S=(L+(_>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,E=Math.imul(X,Tt),_=Math.imul(X,ur),_=_+Math.imul(ue,Tt)|0,L=Math.imul(ue,ur);var Ka=(S+E|0)+((_&8191)<<13)|0;return S=(L+(_>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,R[0]=Xn,R[1]=ei,R[2]=ti,R[3]=ri,R[4]=bn,R[5]=qn,R[6]=Di,R[7]=Wn,R[8]=$i,R[9]=Bi,R[10]=bi,R[11]=Ei,R[12]=Ai,R[13]=Cn,R[14]=Rs,R[15]=ks,R[16]=Ms,R[17]=Zo,R[18]=Ka,S!==0&&(R[19]=S,x.length++),x};Math.imul||(N=k);function O(b,d,m){m.negative=d.negative^b.negative,m.length=b.length+d.length;for(var x=0,A=0,I=0;I>>26)|0,A+=R>>>26,R&=67108863}m.words[I]=S,x=R,R=A}return x!==0?m.words[I]=x:m.length--,m._strip()}function B(b,d,m){return O(b,d,m)}s.prototype.mulTo=function(d,m){var x,A=this.length+d.length;return this.length===10&&d.length===10?x=N(this,d,m):A<63?x=k(this,d,m):A<1024?x=O(this,d,m):x=B(this,d,m),x},s.prototype.mul=function(d){var m=new s(null);return m.words=new Array(this.length+d.length),this.mulTo(d,m)},s.prototype.mulf=function(d){var m=new s(null);return m.words=new Array(this.length+d.length),B(this,d,m)},s.prototype.imul=function(d){return this.clone().mulTo(d,this)},s.prototype.imuln=function(d){var m=d<0;m&&(d=-d),n(typeof d=="number"),n(d<67108864);for(var x=0,A=0;A>=26,x+=I/67108864|0,x+=R>>>26,this.words[A]=R&67108863}return x!==0&&(this.words[A]=x,this.length++),m?this.ineg():this},s.prototype.muln=function(d){return this.clone().imuln(d)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(d){var m=T(d);if(m.length===0)return new s(1);for(var x=this,A=0;A=0);var m=d%26,x=(d-m)/26,A=67108863>>>26-m<<26-m,I;if(m!==0){var R=0;for(I=0;I>>26-m}R&&(this.words[I]=R,this.length++)}if(x!==0){for(I=this.length-1;I>=0;I--)this.words[I+x]=this.words[I];for(I=0;I=0);var A;m?A=(m-m%26)/26:A=0;var I=d%26,R=Math.min((d-I)/26,this.length),S=67108863^67108863>>>I<R)for(this.length-=R,_=0;_=0&&(L!==0||_>=A);_--){var ie=this.words[_]|0;this.words[_]=L<<26-I|ie>>>I,L=ie&S}return E&&L!==0&&(E.words[E.length++]=L),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(d,m,x){return n(this.negative===0),this.iushrn(d,m,x)},s.prototype.shln=function(d){return this.clone().ishln(d)},s.prototype.ushln=function(d){return this.clone().iushln(d)},s.prototype.shrn=function(d){return this.clone().ishrn(d)},s.prototype.ushrn=function(d){return this.clone().iushrn(d)},s.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var m=d%26,x=(d-m)/26,A=1<=0);var m=d%26,x=(d-m)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(m!==0&&x++,this.length=Math.min(x,this.length),m!==0){var A=67108863^67108863>>>m<=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},s.prototype.isubn=function(d){if(n(typeof d=="number"),n(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m>26)-(E/67108864|0),this.words[I+x]=R&67108863}for(;I>26,this.words[I+x]=R&67108863;if(S===0)return this._strip();for(n(S===-1),S=0,I=0;I>26,this.words[I]=R&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(d,m){var x=this.length-d.length,A=this.clone(),I=d,R=I.words[I.length-1]|0,S=this._countBits(R);x=26-S,x!==0&&(I=I.ushln(x),A.iushln(x),R=I.words[I.length-1]|0);var E=A.length-I.length,_;if(m!=="mod"){_=new s(null),_.length=E+1,_.words=new Array(_.length);for(var L=0;L<_.length;L++)_.words[L]=0}var ie=A.clone()._ishlnsubmul(I,1,E);ie.negative===0&&(A=ie,_&&(_.words[E]=1));for(var q=E-1;q>=0;q--){var Y=(A.words[I.length+q]|0)*67108864+(A.words[I.length+q-1]|0);for(Y=Math.min(Y/R|0,67108863),A._ishlnsubmul(I,Y,q);A.negative!==0;)Y--,A.negative=0,A._ishlnsubmul(I,1,q),A.isZero()||(A.negative^=1);_&&(_.words[q]=Y)}return _&&_._strip(),A._strip(),m!=="div"&&x!==0&&A.iushrn(x),{div:_||null,mod:A}},s.prototype.divmod=function(d,m,x){if(n(!d.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var A,I,R;return this.negative!==0&&d.negative===0?(R=this.neg().divmod(d,m),m!=="mod"&&(A=R.div.neg()),m!=="div"&&(I=R.mod.neg(),x&&I.negative!==0&&I.iadd(d)),{div:A,mod:I}):this.negative===0&&d.negative!==0?(R=this.divmod(d.neg(),m),m!=="mod"&&(A=R.div.neg()),{div:A,mod:R.mod}):this.negative&d.negative?(R=this.neg().divmod(d.neg(),m),m!=="div"&&(I=R.mod.neg(),x&&I.negative!==0&&I.isub(d)),{div:R.div,mod:I}):d.length>this.length||this.cmp(d)<0?{div:new s(0),mod:this}:d.length===1?m==="div"?{div:this.divn(d.words[0]),mod:null}:m==="mod"?{div:null,mod:new s(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new s(this.modrn(d.words[0]))}:this._wordDiv(d,m)},s.prototype.div=function(d){return this.divmod(d,"div",!1).div},s.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},s.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},s.prototype.divRound=function(d){var m=this.divmod(d);if(m.mod.isZero())return m.div;var x=m.div.negative!==0?m.mod.isub(d):m.mod,A=d.ushrn(1),I=d.andln(1),R=x.cmp(A);return R<0||I===1&&R===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},s.prototype.modrn=function(d){var m=d<0;m&&(d=-d),n(d<=67108863);for(var x=(1<<26)%d,A=0,I=this.length-1;I>=0;I--)A=(x*A+(this.words[I]|0))%d;return m?-A:A},s.prototype.modn=function(d){return this.modrn(d)},s.prototype.idivn=function(d){var m=d<0;m&&(d=-d),n(d<=67108863);for(var x=0,A=this.length-1;A>=0;A--){var I=(this.words[A]|0)+x*67108864;this.words[A]=I/d|0,x=I%d}return this._strip(),m?this.ineg():this},s.prototype.divn=function(d){return this.clone().idivn(d)},s.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var m=this,x=d.clone();m.negative!==0?m=m.umod(d):m=m.clone();for(var A=new s(1),I=new s(0),R=new s(0),S=new s(1),E=0;m.isEven()&&x.isEven();)m.iushrn(1),x.iushrn(1),++E;for(var _=x.clone(),L=m.clone();!m.isZero();){for(var ie=0,q=1;!(m.words[0]&q)&&ie<26;++ie,q<<=1);if(ie>0)for(m.iushrn(ie);ie-- >0;)(A.isOdd()||I.isOdd())&&(A.iadd(_),I.isub(L)),A.iushrn(1),I.iushrn(1);for(var Y=0,K=1;!(x.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(x.iushrn(Y);Y-- >0;)(R.isOdd()||S.isOdd())&&(R.iadd(_),S.isub(L)),R.iushrn(1),S.iushrn(1);m.cmp(x)>=0?(m.isub(x),A.isub(R),I.isub(S)):(x.isub(m),R.isub(A),S.isub(I))}return{a:R,b:S,gcd:x.iushln(E)}},s.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var m=this,x=d.clone();m.negative!==0?m=m.umod(d):m=m.clone();for(var A=new s(1),I=new s(0),R=x.clone();m.cmpn(1)>0&&x.cmpn(1)>0;){for(var S=0,E=1;!(m.words[0]&E)&&S<26;++S,E<<=1);if(S>0)for(m.iushrn(S);S-- >0;)A.isOdd()&&A.iadd(R),A.iushrn(1);for(var _=0,L=1;!(x.words[0]&L)&&_<26;++_,L<<=1);if(_>0)for(x.iushrn(_);_-- >0;)I.isOdd()&&I.iadd(R),I.iushrn(1);m.cmp(x)>=0?(m.isub(x),A.isub(I)):(x.isub(m),I.isub(A))}var ie;return m.cmpn(1)===0?ie=A:ie=I,ie.cmpn(0)<0&&ie.iadd(d),ie},s.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var m=this.clone(),x=d.clone();m.negative=0,x.negative=0;for(var A=0;m.isEven()&&x.isEven();A++)m.iushrn(1),x.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;x.isEven();)x.iushrn(1);var I=m.cmp(x);if(I<0){var R=m;m=x,x=R}else if(I===0||x.cmpn(1)===0)break;m.isub(x)}while(!0);return x.iushln(A)},s.prototype.invm=function(d){return this.egcd(d).a.umod(d)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(d){return this.words[0]&d},s.prototype.bincn=function(d){n(typeof d=="number");var m=d%26,x=(d-m)/26,A=1<>>26,S&=67108863,this.words[R]=S}return I!==0&&(this.words[R]=I,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(d){var m=d<0;if(this.negative!==0&&!m)return-1;if(this.negative===0&&m)return 1;this._strip();var x;if(this.length>1)x=1;else{m&&(d=-d),n(d<=67108863,"Number is too big");var A=this.words[0]|0;x=A===d?0:Ad.length)return 1;if(this.length=0;x--){var A=this.words[x]|0,I=d.words[x]|0;if(A!==I){AI&&(m=1);break}}return m},s.prototype.gtn=function(d){return this.cmpn(d)===1},s.prototype.gt=function(d){return this.cmp(d)===1},s.prototype.gten=function(d){return this.cmpn(d)>=0},s.prototype.gte=function(d){return this.cmp(d)>=0},s.prototype.ltn=function(d){return this.cmpn(d)===-1},s.prototype.lt=function(d){return this.cmp(d)===-1},s.prototype.lten=function(d){return this.cmpn(d)<=0},s.prototype.lte=function(d){return this.cmp(d)<=0},s.prototype.eqn=function(d){return this.cmpn(d)===0},s.prototype.eq=function(d){return this.cmp(d)===0},s.red=function(d){return new F(d)},s.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(d){return this.red=d,this},s.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},s.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},s.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},s.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},s.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},s.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},s.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},s.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var z={k256:null,p224:null,p192:null,p25519:null};function G(b,d){this.name=b,this.p=new s(d,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var d=new s(null);return d.words=new Array(Math.ceil(this.n/13)),d},G.prototype.ireduce=function(d){var m=d,x;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),x=m.bitLength();while(x>this.n);var A=x0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},G.prototype.split=function(d,m){d.iushrn(this.n,0,m)},G.prototype.imulK=function(d){return d.imul(this.k)};function $(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i($,G),$.prototype.split=function(d,m){for(var x=4194303,A=Math.min(d.length,9),I=0;I>>22,R=S}R>>>=22,d.words[I-10]=R,R===0&&d.length>10?d.length-=10:d.length-=9},$.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var m=0,x=0;x>>=26,d.words[x]=I,m=A}return m!==0&&(d.words[d.length++]=m),d},s._prime=function(d){if(z[d])return z[d];var m;if(d==="k256")m=new $;else if(d==="p224")m=new D;else if(d==="p192")m=new V;else if(d==="p25519")m=new Q;else throw new Error("Unknown prime "+d);return z[d]=m,m};function F(b){if(typeof b=="string"){var d=s._prime(b);this.m=d.p,this.prime=d}else n(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}F.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},F.prototype._verify2=function(d,m){n((d.negative|m.negative)===0,"red works only with positives"),n(d.red&&d.red===m.red,"red works only with red numbers")},F.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(h(d,d.umod(this.m)._forceRed(this)),d)},F.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},F.prototype.add=function(d,m){this._verify2(d,m);var x=d.add(m);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},F.prototype.iadd=function(d,m){this._verify2(d,m);var x=d.iadd(m);return x.cmp(this.m)>=0&&x.isub(this.m),x},F.prototype.sub=function(d,m){this._verify2(d,m);var x=d.sub(m);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},F.prototype.isub=function(d,m){this._verify2(d,m);var x=d.isub(m);return x.cmpn(0)<0&&x.iadd(this.m),x},F.prototype.shl=function(d,m){return this._verify1(d),this.imod(d.ushln(m))},F.prototype.imul=function(d,m){return this._verify2(d,m),this.imod(d.imul(m))},F.prototype.mul=function(d,m){return this._verify2(d,m),this.imod(d.mul(m))},F.prototype.isqr=function(d){return this.imul(d,d.clone())},F.prototype.sqr=function(d){return this.mul(d,d)},F.prototype.sqrt=function(d){if(d.isZero())return d.clone();var m=this.m.andln(3);if(n(m%2===1),m===3){var x=this.m.add(new s(1)).iushrn(2);return this.pow(d,x)}for(var A=this.m.subn(1),I=0;!A.isZero()&&A.andln(1)===0;)I++,A.iushrn(1);n(!A.isZero());var R=new s(1).toRed(this),S=R.redNeg(),E=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,E).cmp(S)!==0;)_.redIAdd(S);for(var L=this.pow(_,A),ie=this.pow(d,A.addn(1).iushrn(1)),q=this.pow(d,A),Y=I;q.cmp(R)!==0;){for(var K=q,te=0;K.cmp(R)!==0;te++)K=K.redSqr();n(te=0;I--){for(var L=m.words[I],ie=_-1;ie>=0;ie--){var q=L>>ie&1;if(R!==A[0]&&(R=this.sqr(R)),q===0&&S===0){E=0;continue}S<<=1,S|=q,E++,!(E!==x&&(I!==0||ie!==0))&&(R=this.mul(R,A[S]),E=0,S=0)}_=26}return R},F.prototype.convertTo=function(d){var m=d.umod(this.m);return m===d?m.clone():m},F.prototype.convertFrom=function(d){var m=d.clone();return m.red=null,m},s.mont=function(d){return new M(d)};function M(b){F.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(M,F),M.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},M.prototype.convertFrom=function(d){var m=this.imod(d.mul(this.rinv));return m.red=null,m},M.prototype.imul=function(d,m){if(d.isZero()||m.isZero())return d.words[0]=0,d.length=1,d;var x=d.imul(m),A=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=x.isub(A).iushrn(this.shift),R=I;return I.cmp(this.m)>=0?R=I.isub(this.m):I.cmpn(0)<0&&(R=I.iadd(this.m)),R._forceRed(this)},M.prototype.mul=function(d,m){if(d.isZero()||m.isZero())return new s(0)._forceRed(this);var x=d.mul(m),A=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=x.isub(A).iushrn(this.shift),R=I;return I.cmp(this.m)>=0?R=I.isub(this.m):I.cmpn(0)<0&&(R=I.iadd(this.m)),R._forceRed(this)},M.prototype.invm=function(d){var m=this.imod(d._invmp(this.m).mul(this.r2));return m._forceRed(this)}})(r,ct)})(nLe);var a8={},Jd={};Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.errorValues=Jd.standardErrorCodes=void 0,Jd.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},Jd.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var $S={},BS={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.serialize=r.getErrorCode=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Jd,t="Unspecified error message.";r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(g,w=t){if(g&&Number.isInteger(g)){const y=g.toString();if(h(e.errorValues,y))return e.errorValues[y].message;if(l(g))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return w}r.getMessageFromCode=n;function i(g){if(!Number.isInteger(g))return!1;const w=g.toString();return!!(e.errorValues[w]||l(g))}r.isValidCode=i;function s(g){var w;if(typeof g=="number")return g;if(o(g))return(w=g.code)!==null&&w!==void 0?w:g.errorCode}r.getErrorCode=s;function o(g){return typeof g=="object"&&g!==null&&(typeof g.code=="number"||typeof g.errorCode=="number")}function a(g,{shouldIncludeStack:w=!1}={}){const y={};if(g&&typeof g=="object"&&!Array.isArray(g)&&h(g,"code")&&i(g.code)){const C=g;y.code=C.code,C.message&&typeof C.message=="string"?(y.message=C.message,h(C,"data")&&(y.data=C.data)):(y.message=n(y.code),y.data={originalError:u(g)})}else y.code=e.standardErrorCodes.rpc.internal,y.message=p(g,"message")?g.message:t,y.data={originalError:u(g)};return w&&(y.stack=p(g,"stack")?g.stack:void 0),y}r.serialize=a;function l(g){return g>=-32099&&g<=-32e3}function u(g){return g&&typeof g=="object"&&!Array.isArray(g)?Object.assign({},g):g}function h(g,w){return Object.prototype.hasOwnProperty.call(g,w)}function p(g,w){return typeof g=="object"&&g!==null&&w in g&&typeof g[w]=="string"}})(BS),Object.defineProperty($S,"__esModule",{value:!0}),$S.standardErrors=void 0;const Ho=Jd,ole=BS;$S.standardErrors={rpc:{parse:r=>Xl(Ho.standardErrorCodes.rpc.parse,r),invalidRequest:r=>Xl(Ho.standardErrorCodes.rpc.invalidRequest,r),invalidParams:r=>Xl(Ho.standardErrorCodes.rpc.invalidParams,r),methodNotFound:r=>Xl(Ho.standardErrorCodes.rpc.methodNotFound,r),internal:r=>Xl(Ho.standardErrorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Xl(e,r)},invalidInput:r=>Xl(Ho.standardErrorCodes.rpc.invalidInput,r),resourceNotFound:r=>Xl(Ho.standardErrorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>Xl(Ho.standardErrorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>Xl(Ho.standardErrorCodes.rpc.transactionRejected,r),methodNotSupported:r=>Xl(Ho.standardErrorCodes.rpc.methodNotSupported,r),limitExceeded:r=>Xl(Ho.standardErrorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>vy(Ho.standardErrorCodes.provider.userRejectedRequest,r),unauthorized:r=>vy(Ho.standardErrorCodes.provider.unauthorized,r),unsupportedMethod:r=>vy(Ho.standardErrorCodes.provider.unsupportedMethod,r),disconnected:r=>vy(Ho.standardErrorCodes.provider.disconnected,r),chainDisconnected:r=>vy(Ho.standardErrorCodes.provider.chainDisconnected,r),unsupportedChain:r=>vy(Ho.standardErrorCodes.provider.unsupportedChain,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new lle(e,t,n)}}};function Xl(r,e){const[t,n]=ale(e);return new cle(r,t||(0,ole.getMessageFromCode)(r),n)}function vy(r,e){const[t,n]=ale(e);return new lle(r,t||(0,ole.getMessageFromCode)(r),n)}function ale(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}let cle=class extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,n!==void 0&&(this.data=n)}},lle=class extends cle{constructor(e,t,n){if(!iLe(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}};function iLe(r){return Number.isInteger(r)&&r>=1e3&&r<=4999}var LS={},yy={};Object.defineProperty(yy,"__esModule",{value:!0}),yy.isErrorResponse=void 0;function sLe(r){return r.errorMessage!==void 0}yy.isErrorResponse=sLe;var xy={};Object.defineProperty(xy,"__esModule",{value:!0}),xy.LIB_VERSION=void 0,xy.LIB_VERSION="3.9.1",Object.defineProperty(LS,"__esModule",{value:!0}),LS.serializeError=void 0;const oLe=yy,aLe=xy,cLe=Jd,lLe=BS;function uLe(r,e){const t=(0,lLe.serialize)(hLe(r),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",aLe.LIB_VERSION),n.searchParams.set("code",t.code.toString());const i=fLe(t.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}LS.serializeError=uLe;function hLe(r){return typeof r=="string"?{message:r,code:cLe.standardErrorCodes.rpc.internal}:(0,oLe.isErrorResponse)(r)?Object.assign(Object.assign({},r),{message:r.errorMessage,code:r.errorCode,data:{method:r.method}}):r}function fLe(r,e){const t=r==null?void 0:r.method;if(t)return t;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.standardErrors=r.standardErrorCodes=r.serializeError=r.getMessageFromCode=r.getErrorCode=void 0;const e=Jd;Object.defineProperty(r,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});const t=$S;Object.defineProperty(r,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}});const n=LS;Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=BS;Object.defineProperty(r,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(a8);var Js={};Object.defineProperty(Js,"__esModule",{value:!0}),Js.ProviderType=Js.RegExpString=Js.IntNumber=Js.BigIntString=Js.AddressString=Js.HexString=Js.OpaqueType=void 0;function c8(){return r=>r}Js.OpaqueType=c8,Js.HexString=c8(),Js.AddressString=c8(),Js.BigIntString=c8();function dLe(r){return Math.floor(r)}Js.IntNumber=dLe,Js.RegExpString=c8();var ule;(function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""})(ule||(Js.ProviderType=ule={}));var pLe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mr,"__esModule",{value:!0}),mr.isMobileWeb=mr.getLocation=mr.isInIFrame=mr.createQrUrl=mr.getFavicon=mr.range=mr.isBigNumber=mr.ensureParsedJSONObject=mr.ensureBN=mr.ensureRegExpString=mr.ensureIntNumber=mr.ensureBuffer=mr.ensureAddressString=mr.ensureEvenLengthHexString=mr.ensureHexString=mr.isHexString=mr.prepend0x=mr.strip0x=mr.has0xPrefix=mr.hexStringFromIntNumber=mr.intNumberFromHexString=mr.bigIntStringFromBN=mr.hexStringFromBuffer=mr.hexStringToUint8Array=mr.uint8ArrayToHex=mr.randomBytesHex=void 0;const m1=pLe(wy),Um=a8,eu=Js,hle=/^[0-9]*$/,fle=/^[a-f0-9]*$/;function gLe(r){return dle(crypto.getRandomValues(new Uint8Array(r)))}mr.randomBytesHex=gLe;function dle(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")}mr.uint8ArrayToHex=dle;function mLe(r){return new Uint8Array(r.match(/.{1,2}/g).map(e=>parseInt(e,16)))}mr.hexStringToUint8Array=mLe;function bLe(r,e=!1){const t=r.toString("hex");return(0,eu.HexString)(e?`0x${t}`:t)}mr.hexStringFromBuffer=bLe;function wLe(r){return(0,eu.BigIntString)(r.toString(10))}mr.bigIntStringFromBN=wLe;function vLe(r){return(0,eu.IntNumber)(new m1.default(u8(r,!1),16).toNumber())}mr.intNumberFromHexString=vLe;function yLe(r){return(0,eu.HexString)(`0x${new m1.default(r).toString(16)}`)}mr.hexStringFromIntNumber=yLe;function TB(r){return r.startsWith("0x")||r.startsWith("0X")}mr.has0xPrefix=TB;function US(r){return TB(r)?r.slice(2):r}mr.strip0x=US;function ple(r){return TB(r)?`0x${r.slice(2)}`:`0x${r}`}mr.prepend0x=ple;function l8(r){if(typeof r!="string")return!1;const e=US(r).toLowerCase();return fle.test(e)}mr.isHexString=l8;function gle(r,e=!1){if(typeof r=="string"){const t=US(r).toLowerCase();if(fle.test(t))return(0,eu.HexString)(e?`0x${t}`:t)}throw Um.standardErrors.rpc.invalidParams(`"${String(r)}" is not a hexadecimal string`)}mr.ensureHexString=gle;function u8(r,e=!1){let t=gle(r,!1);return t.length%2===1&&(t=(0,eu.HexString)(`0${t}`)),e?(0,eu.HexString)(`0x${t}`):t}mr.ensureEvenLengthHexString=u8;function xLe(r){if(typeof r=="string"){const e=US(r).toLowerCase();if(l8(e)&&e.length===40)return(0,eu.AddressString)(ple(e))}throw Um.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(r)}`)}mr.ensureAddressString=xLe;function _Le(r){if(Dt.isBuffer(r))return r;if(typeof r=="string"){if(l8(r)){const e=u8(r,!1);return Dt.from(e,"hex")}return Dt.from(r,"utf8")}throw Um.standardErrors.rpc.invalidParams(`Not binary data: ${String(r)}`)}mr.ensureBuffer=_Le;function mle(r){if(typeof r=="number"&&Number.isInteger(r))return(0,eu.IntNumber)(r);if(typeof r=="string"){if(hle.test(r))return(0,eu.IntNumber)(Number(r));if(l8(r))return(0,eu.IntNumber)(new m1.default(u8(r,!1),16).toNumber())}throw Um.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}mr.ensureIntNumber=mle;function ELe(r){if(r instanceof RegExp)return(0,eu.RegExpString)(r.toString());throw Um.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(r)}`)}mr.ensureRegExpString=ELe;function ALe(r){if(r!==null&&(m1.default.isBN(r)||ble(r)))return new m1.default(r.toString(10),10);if(typeof r=="number")return new m1.default(mle(r));if(typeof r=="string"){if(hle.test(r))return new m1.default(r,10);if(l8(r))return new m1.default(u8(r,!1),16)}throw Um.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}mr.ensureBN=ALe;function CLe(r){if(typeof r=="string")return JSON.parse(r);if(typeof r=="object")return r;throw Um.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(r)}`)}mr.ensureParsedJSONObject=CLe;function ble(r){if(r==null||typeof r.constructor!="function")return!1;const{constructor:e}=r;return typeof e.config=="function"&&typeof e.EUCLID=="number"}mr.isBigNumber=ble;function SLe(r,e){return Array.from({length:e-r},(t,n)=>r+n)}mr.range=SLe;function ILe(){const r=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:t}=document.location,n=r?r.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${t}${n}`}mr.getFavicon=ILe;function TLe(r,e,t,n,i,s){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:r,secret:e,server:t,v:i,chainId:s.toString()}).toString();return`${t}/#/link?${a}`}mr.createQrUrl=TLe;function wle(){try{return window.frameElement!==null}catch{return!1}}mr.isInIFrame=wle;function RLe(){try{return wle()&&window.top?window.top.location:window.location}catch{return window.location}}mr.getLocation=RLe;function kLe(){var r;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((r=window==null?void 0:window.navigator)===null||r===void 0?void 0:r.userAgent)}mr.isMobileWeb=kLe;var FS={};Object.defineProperty(FS,"__esModule",{value:!0}),FS.ScopedLocalStorage=void 0;class MLe{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}FS.ScopedLocalStorage=MLe;var _y={};const NLe=ad(ywe);var h8={},f8={},Ey={};Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.EVENTS=void 0,Ey.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var tu={};Object.defineProperty(tu,"__esModule",{value:!0}),tu.RelayAbstract=tu.APP_VERSION_KEY=tu.LOCAL_STORAGE_ADDRESSES_KEY=tu.WALLET_USER_NAME_KEY=void 0;const vle=a8;tu.WALLET_USER_NAME_KEY="walletUsername",tu.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",tu.APP_VERSION_KEY="AppVersion";class PLe{async makeEthereumJSONRPCRequest(e,t){if(!t)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(t,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw vle.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,vle.serializeError)(s,e.method);return i})}}tu.RelayAbstract=PLe;var Ay={},RB={},OLe={get exports(){return RB},set exports(r){RB=r}},Zc={},yle={get exports(){return Zc},set exports(r){Zc=r}};typeof Object.create=="function"?yle.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yle.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var wf={},DLe={get exports(){return wf},set exports(r){wf=r}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(r,e){var t=qc,n=t.Buffer;function i(o,a){for(var l in o)a[l]=o[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,l){return n(o,a,l)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,l)},s.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof l=="string"?u.fill(a,l):u.fill(a):u.fill(0),u},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(DLe,wf);var xle=wf.Buffer;function jS(r,e){this._block=xle.alloc(r),this._finalSize=e,this._blockSize=r,this._len=0}jS.prototype.update=function(r,e){typeof r=="string"&&(e=e||"utf8",r=xle.from(r,e));for(var t=this._block,n=this._blockSize,i=r.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=this._len*8;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(t&4294967295)>>>0,i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return r?s.toString(r):s},jS.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Cy=jS,$Le=Zc,_le=Cy,BLe=wf.Buffer,LLe=[1518500249,1859775393,-1894007588,-899497514],ULe=new Array(80);function d8(){this.init(),this._w=ULe,_le.call(this,64,56)}$Le(d8,_le),d8.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function FLe(r){return r<<5|r>>>27}function jLe(r){return r<<30|r>>>2}function zLe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}d8.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var l=0;l<80;++l){var u=~~(l/20),h=FLe(t)+zLe(u,n,i,s)+o+e[l]+LLe[u]|0;o=s,s=i,i=jLe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},d8.prototype._hash=function(){var r=BLe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var HLe=d8,qLe=Zc,Ele=Cy,WLe=wf.Buffer,VLe=[1518500249,1859775393,-1894007588,-899497514],GLe=new Array(80);function p8(){this.init(),this._w=GLe,Ele.call(this,64,56)}qLe(p8,Ele),p8.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function KLe(r){return r<<1|r>>>31}function ZLe(r){return r<<5|r>>>27}function JLe(r){return r<<30|r>>>2}function YLe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}p8.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=r.readInt32BE(a*4);for(;a<80;++a)e[a]=KLe(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var l=0;l<80;++l){var u=~~(l/20),h=ZLe(t)+YLe(u,n,i,s)+o+e[l]+VLe[u]|0;o=s,s=i,i=JLe(n),n=t,t=h}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},p8.prototype._hash=function(){var r=WLe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var QLe=p8,XLe=Zc,Ale=Cy,eUe=wf.Buffer,tUe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],rUe=new Array(64);function g8(){this.init(),this._w=rUe,Ale.call(this,64,56)}XLe(g8,Ale),g8.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function nUe(r,e,t){return t^r&(e^t)}function iUe(r,e,t){return r&e|t&(r|e)}function sUe(r){return(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10)}function oUe(r){return(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7)}function aUe(r){return(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3}function cUe(r){return(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10}g8.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,l=this._g|0,u=this._h|0,h=0;h<16;++h)e[h]=r.readInt32BE(h*4);for(;h<64;++h)e[h]=cUe(e[h-2])+e[h-7]+aUe(e[h-15])+e[h-16]|0;for(var p=0;p<64;++p){var g=u+oUe(o)+nUe(o,a,l)+tUe[p]+e[p]|0,w=sUe(t)+iUe(t,n,i)|0;u=l,l=a,a=o,o=s+g|0,s=i,i=n,n=t,t=g+w|0}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=l+this._g|0,this._h=u+this._h|0},g8.prototype._hash=function(){var r=eUe.allocUnsafe(32);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r.writeInt32BE(this._h,28),r};var Cle=g8,lUe=Zc,uUe=Cle,hUe=Cy,fUe=wf.Buffer,dUe=new Array(64);function zS(){this.init(),this._w=dUe,hUe.call(this,64,56)}lUe(zS,uUe),zS.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},zS.prototype._hash=function(){var r=fUe.allocUnsafe(28);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r};var pUe=zS,gUe=Zc,Sle=Cy,mUe=wf.Buffer,Ile=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],bUe=new Array(160);function m8(){this.init(),this._w=bUe,Sle.call(this,128,112)}gUe(m8,Sle),m8.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Tle(r,e,t){return t^r&(e^t)}function Rle(r,e,t){return r&e|t&(r|e)}function kle(r,e){return(r>>>28|e<<4)^(e>>>2|r<<30)^(e>>>7|r<<25)}function Mle(r,e){return(r>>>14|e<<18)^(r>>>18|e<<14)^(e>>>9|r<<23)}function wUe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^r>>>7}function vUe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^(r>>>7|e<<25)}function yUe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^r>>>6}function xUe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^(r>>>6|e<<26)}function Co(r,e){return r>>>0>>0?1:0}m8.prototype._update=function(r){for(var e=this._w,t=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,l=this._gh|0,u=this._hh|0,h=this._al|0,p=this._bl|0,g=this._cl|0,w=this._dl|0,y=this._el|0,C=this._fl|0,T=this._gl|0,k=this._hl|0,N=0;N<32;N+=2)e[N]=r.readInt32BE(N*4),e[N+1]=r.readInt32BE(N*4+4);for(;N<160;N+=2){var O=e[N-30],B=e[N-15*2+1],z=wUe(O,B),G=vUe(B,O);O=e[N-2*2],B=e[N-2*2+1];var $=yUe(O,B),D=xUe(B,O),V=e[N-7*2],Q=e[N-7*2+1],F=e[N-16*2],M=e[N-16*2+1],b=G+Q|0,d=z+V+Co(b,G)|0;b=b+D|0,d=d+$+Co(b,D)|0,b=b+M|0,d=d+F+Co(b,M)|0,e[N]=d,e[N+1]=b}for(var m=0;m<160;m+=2){d=e[m],b=e[m+1];var x=Rle(t,n,i),A=Rle(h,p,g),I=kle(t,h),R=kle(h,t),S=Mle(o,y),E=Mle(y,o),_=Ile[m],L=Ile[m+1],ie=Tle(o,a,l),q=Tle(y,C,T),Y=k+E|0,K=u+S+Co(Y,k)|0;Y=Y+q|0,K=K+ie+Co(Y,q)|0,Y=Y+L|0,K=K+_+Co(Y,L)|0,Y=Y+b|0,K=K+d+Co(Y,b)|0;var te=R+A|0,re=I+x+Co(te,R)|0;u=l,k=T,l=a,T=C,a=o,C=y,y=w+Y|0,o=s+K+Co(y,w)|0,s=i,w=g,i=n,g=p,n=t,p=h,h=Y+te|0,t=K+re+Co(h,Y)|0}this._al=this._al+h|0,this._bl=this._bl+p|0,this._cl=this._cl+g|0,this._dl=this._dl+w|0,this._el=this._el+y|0,this._fl=this._fl+C|0,this._gl=this._gl+T|0,this._hl=this._hl+k|0,this._ah=this._ah+t+Co(this._al,h)|0,this._bh=this._bh+n+Co(this._bl,p)|0,this._ch=this._ch+i+Co(this._cl,g)|0,this._dh=this._dh+s+Co(this._dl,w)|0,this._eh=this._eh+o+Co(this._el,y)|0,this._fh=this._fh+a+Co(this._fl,C)|0,this._gh=this._gh+l+Co(this._gl,T)|0,this._hh=this._hh+u+Co(this._hl,k)|0},m8.prototype._hash=function(){var r=mUe.allocUnsafe(64);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),r};var Nle=m8,_Ue=Zc,EUe=Nle,AUe=Cy,CUe=wf.Buffer,SUe=new Array(160);function HS(){this.init(),this._w=SUe,AUe.call(this,128,112)}_Ue(HS,EUe),HS.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},HS.prototype._hash=function(){var r=CUe.allocUnsafe(48);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),r};var IUe=HS,Fm=OLe.exports=function(e){e=e.toLowerCase();var t=Fm[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Fm.sha=HLe,Fm.sha1=QLe,Fm.sha224=pUe,Fm.sha256=Cle,Fm.sha384=IUe,Fm.sha512=Nle,Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.Session=void 0;const Ple=RB,Ole=mr,Dle="session:id",$le="session:secret",Ble="session:linked";class kB{constructor(e,t,n,i){this._storage=e,this._id=t||(0,Ole.randomBytesHex)(16),this._secret=n||(0,Ole.randomBytesHex)(32),this._key=new Ple.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(Dle),n=e.getItem(Ble),i=e.getItem($le);return t&&i?new kB(e,t,i,n==="1"):null}static hash(e){return new Ple.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Dle,this._id),this._storage.setItem($le,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ble,this._linked?"1":"0")}}Ay.Session=kB;var qS={},WS={};Object.defineProperty(WS,"__esModule",{value:!0}),WS.Cipher=void 0;const VS=mr;class TUe{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,VS.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),a=16,l=o.slice(o.byteLength-a),u=o.slice(0,o.byteLength-a),h=new Uint8Array(l),p=new Uint8Array(u),g=new Uint8Array([...n,...h,...p]);return(0,VS.uint8ArrayToHex)(g)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,VS.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,VS.hexStringToUint8Array)(e),a=o.slice(0,12),l=o.slice(12,28),u=o.slice(28),h=new Uint8Array([...u,...l]),p={name:"AES-GCM",iv:new Uint8Array(a)};try{const g=await window.crypto.subtle.decrypt(p,s,h),w=new TextDecoder;n(w.decode(g))}catch(g){i(g)}})()})}}WS.Cipher=TUe;var GS={};Object.defineProperty(GS,"__esModule",{value:!0}),GS.WalletLinkHTTP=void 0;class RUe{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const i=`${t}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(e=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${t.status}`)}}GS.WalletLinkHTTP=RUe;var Sy={};Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.WalletLinkWebSocket=Sy.ConnectionState=void 0;var Iy;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(Iy||(Sy.ConnectionState=Iy={}));class kUe{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){t(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Iy.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),t(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Iy.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Iy.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,l)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Iy.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}Sy.WalletLinkWebSocket=kUe,Object.defineProperty(qS,"__esModule",{value:!0}),qS.WalletLinkConnection=void 0;const Ty=Js,MUe=WS,vf=Ey,Lle=tu,Ry=Ay,NUe=GS,KS=Sy,Ule=1e4,PUe=6e4;class OUe{constructor({session:e,linkAPIUrl:t,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Ty.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",u=>a.JsonRpcUrl&&this.handleChainUpdated(u,a.JsonRpcUrl)]]).forEach((u,h)=>{const p=a[h];p!==void 0&&u(p)})},this.handleDestroyed=a=>{var l,u;a==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(u=this.diagnostic)===null||u===void 0||u.log(vf.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Ry.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var l,u;try{const h=await this.cipher.decrypt(a);(l=this.listener)===null||l===void 0||l.accountUpdated(h)}catch{(u=this.diagnostic)===null||u===void 0||u.log(vf.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(a,l)=>{var u,h;try{const p=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.metadataUpdated(a,p)}catch{(h=this.diagnostic)===null||h===void 0||h.log(vf.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(Lle.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(Lle.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,l)=>{var u,h;try{const p=await this.cipher.decrypt(a),g=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.chainUpdated(p,g)}catch{(h=this.diagnostic)===null||h===void 0||h.log(vf.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=e,this.cipher=new MUe.Cipher(e.secret),this.diagnostic=i,this.listener=n;const o=new KS.WalletLinkWebSocket(`${t}/rpc`,s);o.setConnectionStateListener(async a=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(vf.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Ry.Session.hash(e.id)});let u=!1;switch(a){case KS.ConnectionState.DISCONNECTED:if(!this.destroyed){const h=async()=>{await new Promise(p=>setTimeout(p,5e3)),this.destroyed||o.connect().catch(()=>{h()})};h()}break;case KS.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),u=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ule),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case KS.ConnectionState.CONNECTING:break}this.connected!==u&&(this.connected=u)}),o.setIncomingDataListener(a=>{var l,u,h;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const p=a.type==="IsLinkedOK"?a.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(vf.EVENTS.LINKED,{sessionIdHash:Ry.Session.hash(e.id),linked:p,type:a.type,onlineGuests:a.onlineGuests}),this.linked=p||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(u=this.diagnostic)===null||u===void 0||u.log(vf.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Ry.Session.hash(e.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((h=this.requestResolutions.get(a.id))===null||h===void 0||h(a))}),this.ws=o,this.http=new NUe.WalletLinkHTTP(t,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(vf.EVENTS.STARTED_CONNECTING,{sessionIdHash:Ry.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(vf.EVENTS.DISCONNECTED,{sessionIdHash:Ry.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t,n;this._connected=e,e&&((t=this.onceConnected)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t,n;if(!(e.type!=="Event"||e.event!=="Web3Response"))try{const i=await this.cipher.decrypt(e.data),s=JSON.parse(i);if(s.type!=="WEB3_RESPONSE")return;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(vf.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,t,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(s);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ule*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=PUe){const n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,o)=>{i=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},t)}),new Promise(s=>{this.requestResolutions.set(n,o=>{clearTimeout(i),s(o),this.requestResolutions.delete(n)})})])}async authenticate(){const e={type:"HostSession",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if(t.type==="Fail")throw new Error(t.error||"failed to authentcate")}sendIsLinked(){const e={type:"IsLinked",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}qS.WalletLinkConnection=OUe;var b8={},w8={},MB={};Object.defineProperty(MB,"__esModule",{value:!0}),MB.default=(()=>'@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')();var DUe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(w8,"__esModule",{value:!0}),w8.injectCssReset=void 0;const $Ue=DUe(MB);function BUe(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode($Ue.default)),document.documentElement.appendChild(r)}w8.injectCssReset=BUe;var ZS={},v8,Zi,Fle,jle,jm,zle,Hle,NB,PB,OB,DB,qle,y8={},Wle=[],LUe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,JS=Array.isArray;function Yd(r,e){for(var t in e)r[t]=e[t];return r}function Vle(r){var e=r.parentNode;e&&e.removeChild(r)}function $B(r,e,t){var n,i,s,o={};for(s in e)s=="key"?n=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?v8.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)o[s]===void 0&&(o[s]=r.defaultProps[s]);return x8(r,o,n,i,null)}function x8(r,e,t,n,i){var s={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Fle,__i:-1,__u:0};return i==null&&Zi.vnode!=null&&Zi.vnode(s),s}function UUe(){return{current:null}}function _8(r){return r.children}function E8(r,e){this.props=r,this.context=e}function zm(r,e){if(e==null)return r.__?zm(r.__,r.__i+1):null;for(var t;ee&&jm.sort(NB));YS.__r=0}function Kle(r,e,t,n,i,s,o,a,l,u,h){var p,g,w,y,C,T=n&&n.__k||Wle,k=e.length;for(t.__d=l,FUe(t,e,T),l=t.__d,p=0;p0?x8(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=r,i.__b=r.__b+1,a=jUe(i,t,o,h),i.__i=a,s=null,a!==-1&&(h--,(s=t[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&p--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a===o+1?p++:a>o?h>l-o?p+=a-o:p--:a(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a=0){if((l=e[o])&&!(131072&l.__u)&&i==l.key&&s===l.type)return o;o--}if(a2&&(a.children=arguments.length>3?v8.call(arguments,2):t),x8(r.type,a,n||r.key,i||r.ref,null)}function WUe(r,e){var t={__c:e="__cC"+qle++,__:r,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,BB(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}v8=Wle.slice,Zi={__e:function(r,e,t,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(r)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(r,n||{}),o=i.__d),o)return i.__E=i}catch(a){r=a}throw r}},Fle=0,jle=function(r){return r!=null&&r.constructor==null},E8.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Yd({},this.state),typeof r=="function"&&(r=r(Yd({},t),this.props)),r&&Yd(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),BB(this))},E8.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),BB(this))},E8.prototype.render=_8,jm=[],Hle=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,NB=function(r,e){return r.__v.__b-e.__v.__b},YS.__r=0,PB=0,OB=Qle(!1),DB=Qle(!0),qle=0;const bc=ad(Object.freeze(Object.defineProperty({__proto__:null,Component:E8,Fragment:_8,cloneElement:qUe,createContext:WUe,createElement:$B,createRef:UUe,h:$B,hydrate:tue,get isValidElement(){return jle},get options(){return Zi},render:eue,toChildArray:Jle},Symbol.toStringTag,{value:"Module"})));var XS={};function rue(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e=t.__.length&&t.__.push({__V:eI}),t.__[r]}function fue(r){return ky=1,due(mue,r)}function due(r,e,t){var n=Hm(Qd++,2);if(n.t=r,!n.__c&&(n.__=[t?t(e):mue(void 0,e),function(a){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,a);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=_i,!_i.u)){var i=function(a,l,u){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(g){return!!g.__c});if(h.every(function(g){return!g.__N}))return!s||s.call(this,a,l,u);var p=!1;return h.forEach(function(g){if(g.__N){var w=g.__[0];g.__=g.__N,g.__N=void 0,w!==g.__[0]&&(p=!0)}}),!(!p&&n.__c.props===a)&&(!s||s.call(this,a,l,u))};_i.u=!0;var s=_i.shouldComponentUpdate,o=_i.componentWillUpdate;_i.componentWillUpdate=function(a,l,u){if(this.__e){var h=s;s=void 0,i(a,l,u),s=h}o&&o.call(this,a,l,u)},_i.shouldComponentUpdate=i}return n.__N||n.__}function VUe(r,e){var t=Hm(Qd++,3);!rs.__s&&qB(t.__H,e)&&(t.__=r,t.i=e,_i.__H.__h.push(t))}function pue(r,e){var t=Hm(Qd++,4);!rs.__s&&qB(t.__H,e)&&(t.__=r,t.i=e,_i.__h.push(t))}function GUe(r){return ky=5,zB(function(){return{current:r}},[])}function KUe(r,e,t){ky=6,pue(function(){return typeof r=="function"?(r(e()),function(){return r(null)}):r?(r.current=e(),function(){return r.current=null}):void 0},t==null?t:t.concat(r))}function zB(r,e){var t=Hm(Qd++,7);return qB(t.__H,e)?(t.__V=r(),t.i=e,t.__h=r,t.__V):t.__}function ZUe(r,e){return ky=8,zB(function(){return r},e)}function JUe(r){var e=_i.context[r.__c],t=Hm(Qd++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(_i)),e.props.value):r.__}function YUe(r,e){rs.useDebugValue&&rs.useDebugValue(e?e(r):r)}function QUe(r){var e=Hm(Qd++,10),t=fue();return e.__=r,_i.componentDidCatch||(_i.componentDidCatch=function(n,i){e.__&&e.__(n,i),t[1](n)}),[t[0],function(){t[1](void 0)}]}function XUe(){var r=Hm(Qd++,11);if(!r.__){for(var e=_i.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);r.__="P"+t[0]+"-"+t[1]++}return r.__}function eFe(){for(var r;r=sue.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(tI),r.__H.__h.forEach(HB),r.__H.__h=[]}catch(e){r.__H.__h=[],rs.__e(e,r.__v)}}rs.__b=function(r){_i=null,oue&&oue(r)},rs.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),hue&&hue(r,e)},rs.__r=function(r){aue&&aue(r),Qd=0;var e=(_i=r.__c).__H;e&&(jB===_i?(e.__h=[],_i.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=eI,t.__N=t.i=void 0})):(e.__h.forEach(tI),e.__h.forEach(HB),e.__h=[],Qd=0)),jB=_i},rs.diffed=function(r){cue&&cue(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(sue.push(e)!==1&&iue===rs.requestAnimationFrame||((iue=rs.requestAnimationFrame)||tFe)(eFe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==eI&&(t.__=t.__V),t.i=void 0,t.__V=eI})),jB=_i=null},rs.__c=function(r,e){e.some(function(t){try{t.__h.forEach(tI),t.__h=t.__h.filter(function(n){return!n.__||HB(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],rs.__e(n,t.__v)}}),lue&&lue(r,e)},rs.unmount=function(r){uue&&uue(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{tI(n)}catch(i){e=i}}),t.__H=void 0,e&&rs.__e(e,t.__v))};var gue=typeof requestAnimationFrame=="function";function tFe(r){var e,t=function(){clearTimeout(n),gue&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);gue&&(e=requestAnimationFrame(t))}function tI(r){var e=_i,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),_i=e}function HB(r){var e=_i;r.__c=r.__(),_i=e}function qB(r,e){return!r||r.length!==e.length||e.some(function(t,n){return t!==r[n]})}function mue(r,e){return typeof e=="function"?e(r):e}const rI=ad(Object.freeze(Object.defineProperty({__proto__:null,useCallback:ZUe,useContext:JUe,useDebugValue:YUe,useEffect:VUe,useErrorBoundary:QUe,useId:XUe,useImperativeHandle:KUe,useLayoutEffect:pue,useMemo:zB,useReducer:due,useRef:GUe,useState:fue},Symbol.toStringTag,{value:"Module"})));var My={},nI={};Object.defineProperty(nI,"__esModule",{value:!0}),nI.CloseIcon=void 0;const bue=bc;function rFe(r){return(0,bue.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,bue.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}nI.CloseIcon=rFe;var iI={};Object.defineProperty(iI,"__esModule",{value:!0}),iI.CoinbaseWalletRound=void 0;const sI=bc;function nFe(r){return(0,sI.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,sI.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,sI.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,sI.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}iI.CoinbaseWalletRound=nFe;var oI={};Object.defineProperty(oI,"__esModule",{value:!0}),oI.QRCodeIcon=void 0;const C8=bc;function iFe(r){return(0,C8.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,C8.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,C8.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,C8.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,C8.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}oI.QRCodeIcon=iFe;var aI={};function wue(r){this.mode=Jc.MODE_8BIT_BYTE,this.data=r,this.parsedData=[];for(var e=0,t=this.data.length;e65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}wue.prototype={getLength:function(r){return this.parsedData.length},write:function(r){for(var e=0,t=this.parsedData.length;e=7&&this.setupTypeNumber(r),this.dataCache==null&&(this.dataCache=yf.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(r,e){for(var t=-1;t<=7;t++)if(!(r+t<=-1||this.moduleCount<=r+t))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=t&&t<=6&&(n==0||n==6)||0<=n&&n<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=n&&n<=4?this.modules[r+t][e+n]=!0:this.modules[r+t][e+n]=!1)},getBestMaskPattern:function(){for(var r=0,e=0,t=0;t<8;t++){this.makeImpl(!0,t);var n=ns.getLostPoint(this);(t==0||r>n)&&(r=n,e=t)}return e},createMovieClip:function(r,e,t){var n=r.createEmptyMovieClip(e,t),i=1;this.make();for(var s=0;s>t&1)==1;this.modules[Math.floor(t/3)][t%3+this.moduleCount-8-3]=n}for(var t=0;t<18;t++){var n=!r&&(e>>t&1)==1;this.modules[t%3+this.moduleCount-8-3][Math.floor(t/3)]=n}},setupTypeInfo:function(r,e){for(var t=this.errorCorrectLevel<<3|e,n=ns.getBCHTypeInfo(t),i=0;i<15;i++){var s=!r&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!r&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!r},mapData:function(r,e){for(var t=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var l=!1;s>>i&1)==1);var u=ns.getMask(e,n,o-a);u&&(l=!l),this.modules[n][o-a]=l,i--,i==-1&&(s++,i=7)}if(n+=t,n<0||this.moduleCount<=n){n-=t,t=-t;break}}}},yf.PAD0=236,yf.PAD1=17,yf.createData=function(r,e,t){for(var n=xf.getRSBlocks(r,e),i=new vue,s=0;sa*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+a*8+")");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(yf.PAD0,8),i.getLengthInBits()>=a*8));)i.put(yf.PAD1,8);return yf.createBytes(i,n)},yf.createBytes=function(r,e){for(var t=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a=0?w.get(y):0}}for(var C=0,h=0;h=0;)e^=ns.G15<=0;)e^=ns.G18<>>=1;return e},getPatternPosition:function(r){return ns.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,e,t){switch(r){case w1.PATTERN000:return(e+t)%2==0;case w1.PATTERN001:return e%2==0;case w1.PATTERN010:return t%3==0;case w1.PATTERN011:return(e+t)%3==0;case w1.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2==0;case w1.PATTERN101:return e*t%2+e*t%3==0;case w1.PATTERN110:return(e*t%2+e*t%3)%2==0;case w1.PATTERN111:return(e*t%3+(e+t)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){for(var e=new Ny([1],0),t=0;t5&&(t+=3+s-5)}for(var n=0;n=256;)r-=255;return So.EXP_TABLE[r]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},qo=0;qo<8;qo++)So.EXP_TABLE[qo]=1<>>7-r%8&1)==1},put:function(r,e){for(var t=0;t>>e-t-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var WB=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function yue(r){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof r=="string"&&(r={content:r}),r)for(var e in r)this.options[e]=r[e];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function t(l){switch(l){case"L":return b1.L;case"M":return b1.M;case"Q":return b1.Q;case"H":return b1.H;default:throw new Error("Unknwon error correction level: "+l)}}function n(l,u){for(var h=i(l),p=1,g=0,w=0,y=WB.length;w<=y;w++){var C=WB[w];if(!C)throw new Error("Content too long: expected "+g+" but got "+h);switch(u){case"L":g=C[0];break;case"M":g=C[1];break;case"Q":g=C[2];break;case"H":g=C[3];break;default:throw new Error("Unknwon error correction level: "+u)}if(h<=g)break;p++}if(p>WB.length)throw new Error("Content too long");return p}function i(l){var u=encodeURI(l).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return u.length+(u.length!=l?3:0)}var s=this.options.content,o=n(s,this.options.ecl),a=t(this.options.ecl);this.qrcode=new yf(o,a),this.qrcode.addData(s),this.qrcode.make()}yue.prototype.svg=function(r){var e=this.options||{},t=this.qrcode.modules;typeof r>"u"&&(r={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",s=n?`\r -`:"",o=e.width,a=e.height,l=t.length,u=o/(l+2*e.padding),h=a/(l+2*e.padding),p=typeof e.join<"u"?!!e.join:!1,g=typeof e.swap<"u"?!!e.swap:!1,w=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,y=typeof e.predefined<"u"?!!e.predefined:!1,C=y?i+''+s:"",T=i+''+s,k="",N="",O=0;O'+s:k+=i+''+s}}p&&(k=i+'');let F="";if(this.options.image!==void 0&&this.options.image.svg){const b=o*this.options.image.width/100,d=a*this.options.image.height/100,m=o/2-b/2,x=a/2-d/2;F+=``,F+=this.options.image.svg+s,F+=""}var M="";switch(r.container){case"svg":w&&(M+=''+s),M+=''+s,M+=C+T+k,M+=F,M+="";break;case"svg-viewbox":w&&(M+=''+s),M+=''+s,M+=C+T+k,M+=F,M+="";break;case"g":M+=''+s,M+=C+T+k,M+=F,M+="";break;default:M+=(C+T+k+F).replace(/^\s+/,"");break}return M};var sFe=yue,oFe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aI,"__esModule",{value:!0}),aI.QRCode=void 0;const aFe=bc,xue=rI,cFe=oFe(sFe),lFe=r=>{const[e,t]=(0,xue.useState)("");return(0,xue.useEffect)(()=>{var n,i;const s=new cFe.default({content:r.content,background:r.bgColor||"#ffffff",color:r.fgColor||"#000000",container:"svg",ecl:"M",width:(n=r.width)!==null&&n!==void 0?n:256,height:(i=r.height)!==null&&i!==void 0?i:256,padding:0,image:r.image}),o=Dt.from(s.svg(),"utf8").toString("base64");t(`data:image/svg+xml;base64,${o}`)},[r.bgColor,r.content,r.fgColor,r.height,r.image,r.width]),e?(0,aFe.h)("img",{src:e,alt:"QR Code"}):null};aI.QRCode=lFe;var cI={},VB={};Object.defineProperty(VB,"__esModule",{value:!0}),VB.default=(()=>".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}")();var uFe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cI,"__esModule",{value:!0}),cI.Spinner=void 0;const lI=bc,hFe=uFe(VB),fFe=r=>{var e;const t=(e=r.size)!==null&&e!==void 0?e:64,n=r.color||"#000";return(0,lI.h)("div",{class:"-cbwsdk-spinner"},(0,lI.h)("style",null,hFe.default),(0,lI.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:t,height:t}},(0,lI.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};cI.Spinner=fFe;var GB={};Object.defineProperty(GB,"__esModule",{value:!0}),GB.default=(()=>".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}")();var _ue=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(My,"__esModule",{value:!0}),My.CoinbaseWalletSteps=My.ConnectContent=void 0;const qm=_ue(A8),Tn=bc,dFe=mr,pFe=xy,gFe=nI,mFe=iI,bFe=oI,wFe=aI,vFe=cI,yFe=_ue(GB),KB={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:Eue},xFe=r=>r==="light"?"#FFFFFF":"#0A0B0D";function _Fe(r){const{theme:e}=r,t=(0,dFe.createQrUrl)(r.sessionId,r.sessionSecret,r.linkAPIUrl,r.isParentConnection,r.version,r.chainId),n=KB.steps;return(0,Tn.h)("div",{"data-testid":"connect-content",className:(0,qm.default)("-cbwsdk-connect-content",e)},(0,Tn.h)("style",null,yFe.default),(0,Tn.h)("div",{className:"-cbwsdk-connect-content-header"},(0,Tn.h)("h2",{className:(0,qm.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with our mobile app"),r.onCancel&&(0,Tn.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:r.onCancel},(0,Tn.h)(gFe.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Tn.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,Tn.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,Tn.h)(EFe,{title:KB.title,description:KB.description,theme:e})),(0,Tn.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,Tn.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,Tn.h)(wFe.QRCode,{content:t,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,Tn.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:pFe.LIB_VERSION}),(0,Tn.h)("input",{type:"hidden",value:t})),(0,Tn.h)(n,{theme:e}),!r.isConnected&&(0,Tn.h)("div",{"data-testid":"connecting-spinner",className:(0,qm.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,Tn.h)(vFe.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,Tn.h)("p",null,"Connecting...")))))}My.ConnectContent=_Fe;function EFe({title:r,description:e,theme:t}){return(0,Tn.h)("div",{className:(0,qm.default)("-cbwsdk-connect-item",t)},(0,Tn.h)("div",null,(0,Tn.h)(mFe.CoinbaseWalletRound,null)),(0,Tn.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,Tn.h)("h3",{className:"-cbwsdk-connect-item-title"},r),(0,Tn.h)("p",{className:"-cbwsdk-connect-item-description"},e)))}function Eue({theme:r}){return(0,Tn.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,Tn.h)("li",{className:(0,qm.default)("-cbwsdk-wallet-steps-item",r)},(0,Tn.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,Tn.h)("li",{className:(0,qm.default)("-cbwsdk-wallet-steps-item",r)},(0,Tn.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,Tn.h)("span",null,"Tap ",(0,Tn.h)("strong",null,"Scan")," "),(0,Tn.h)("span",{className:(0,qm.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",r)},(0,Tn.h)(bFe.QRCodeIcon,{fill:xFe(r)})))))}My.CoinbaseWalletSteps=Eue;var uI={},hI={};Object.defineProperty(hI,"__esModule",{value:!0}),hI.ArrowLeftIcon=void 0;const Aue=bc;function AFe(r){return(0,Aue.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},r),(0,Aue.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}hI.ArrowLeftIcon=AFe;var fI={};Object.defineProperty(fI,"__esModule",{value:!0}),fI.LaptopIcon=void 0;const ZB=bc;function CFe(r){return(0,ZB.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,ZB.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,ZB.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}fI.LaptopIcon=CFe;var dI={};Object.defineProperty(dI,"__esModule",{value:!0}),dI.SafeIcon=void 0;const Cue=bc;function SFe(r){return(0,Cue.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,Cue.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}dI.SafeIcon=SFe;var JB={};Object.defineProperty(JB,"__esModule",{value:!0}),JB.default=(()=>".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}")();var Sue=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(uI,"__esModule",{value:!0}),uI.TryExtensionContent=void 0;const Wm=Sue(A8),Fs=bc,YB=rI,IFe=hI,TFe=fI,RFe=dI,kFe=Sue(JB);function MFe({theme:r}){const[e,t]=(0,YB.useState)(!1),n=(0,YB.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,YB.useCallback)(()=>{e?window.location.reload():(n(),t(!0))},[n,e]);return(0,Fs.h)("div",{class:(0,Wm.default)("-cbwsdk-try-extension",r)},(0,Fs.h)("style",null,kFe.default),(0,Fs.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Fs.h)("h3",{class:(0,Wm.default)("-cbwsdk-try-extension-heading",r)},"Or try the Coinbase Wallet browser extension"),(0,Fs.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,Fs.h)("button",{class:(0,Wm.default)("-cbwsdk-try-extension-cta",r),onClick:i},e?"Refresh":"Install"),(0,Fs.h)("div",null,!e&&(0,Fs.h)(IFe.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:r==="light"?"#0052FF":"#588AF5"})))),(0,Fs.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Fs.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,Fs.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Fs.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Fs.h)("span",{class:(0,Wm.default)("-cbwsdk-try-extension-list-item-icon",r)},(0,Fs.h)(TFe.LaptopIcon,{fill:r==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Fs.h)("div",{class:(0,Wm.default)("-cbwsdk-try-extension-list-item-copy",r)},"Connect with dapps with just one click on your desktop browser")),(0,Fs.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Fs.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Fs.h)("span",{class:(0,Wm.default)("-cbwsdk-try-extension-list-item-icon",r)},(0,Fs.h)(RFe.SafeIcon,{fill:r==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Fs.h)("div",{class:(0,Wm.default)("-cbwsdk-try-extension-list-item-copy",r)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}uI.TryExtensionContent=MFe;var QB={};Object.defineProperty(QB,"__esModule",{value:!0}),QB.default=(()=>".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}")();var Iue=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(XS,"__esModule",{value:!0}),XS.ConnectDialog=void 0;const XB=Iue(A8),Vm=bc,eL=rI,NFe=My,PFe=uI,OFe=Iue(QB),DFe=r=>{const{isOpen:e,darkMode:t}=r,[n,i]=(0,eL.useState)(!e),[s,o]=(0,eL.useState)(!e);(0,eL.useEffect)(()=>{const l=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):l.push(window.setTimeout(()=>{i(!0)},360)),()=>{l.forEach(window.clearTimeout)}},[e]);const a=t?"dark":"light";return(0,Vm.h)("div",{class:(0,XB.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Vm.h)("style",null,OFe.default),(0,Vm.h)("div",{class:(0,XB.default)("-cbwsdk-connect-dialog-backdrop",a,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Vm.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Vm.h)("div",{class:(0,XB.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},r.connectDisabled?null:(0,Vm.h)(NFe.ConnectContent,{theme:a,version:r.version,sessionId:r.sessionId,sessionSecret:r.sessionSecret,linkAPIUrl:r.linkAPIUrl,isConnected:r.isConnected,isParentConnection:r.isParentConnection,chainId:r.chainId,onCancel:r.onCancel}),(0,Vm.h)(PFe.TryExtensionContent,{theme:a}))))};XS.ConnectDialog=DFe,Object.defineProperty(ZS,"__esModule",{value:!0}),ZS.LinkFlow=void 0;const tL=bc,$Fe=XS;class BFe{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,tL.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,tL.render)((0,tL.h)($Fe.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}ZS.LinkFlow=BFe;var rL={},nL={};Object.defineProperty(nL,"__esModule",{value:!0}),nL.default=(()=>".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}")(),function(r){var e=ct&&ct.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(r,"__esModule",{value:!0}),r.SnackbarInstance=r.SnackbarContainer=r.Snackbar=void 0;const t=e(A8),n=bc,i=rI,s=e(nL),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgO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xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(g){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=g.darkMode}attach(g){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",g.appendChild(this.root),this.render()}presentItem(g){const w=this.nextItemKey++;return this.items.set(w,g),this.render(),()=>{this.items.delete(w),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(r.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([g,w])=>(0,n.h)(r.SnackbarInstance,Object.assign({},w,{key:g}))))),this.root)}}r.Snackbar=l;const u=p=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},p.children));r.SnackbarContainer=u;const h=({autoExpand:p,message:g,menuItems:w})=>{const[y,C]=(0,i.useState)(!0),[T,k]=(0,i.useState)(p??!1);(0,i.useEffect)(()=>{const O=[window.setTimeout(()=>{C(!1)},1),window.setTimeout(()=>{k(!0)},1e4)];return()=>{O.forEach(window.clearTimeout)}});const N=()=>{k(!T)};return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",y&&"-cbwsdk-snackbar-instance-hidden",T&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:N},(0,n.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},g),(0,n.h)("div",{class:"-gear-container"},!T&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:a,class:"-gear-icon",title:"Expand"}))),w&&w.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},w.map((O,B)=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",O.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:O.onClick,key:B},(0,n.h)("svg",{width:O.svgWidth,height:O.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":O.defaultFillRule,"clip-rule":O.defaultClipRule,d:O.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",O.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},O.info)))))};r.SnackbarInstance=h}(rL),Object.defineProperty(b8,"__esModule",{value:!0}),b8.WalletLinkRelayUI=void 0;const LFe=w8,UFe=ZS,FFe=rL;class jFe{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new FFe.Snackbar({darkMode:e.darkMode}),this.linkFlow=new UFe.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,LFe.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}}b8.WalletLinkRelayUI=jFe,Object.defineProperty(f8,"__esModule",{value:!0}),f8.WalletLinkRelay=void 0;const Py=a8,zFe=Js,is=mr,Gm=Ey,Tue=tu,v1=Ay,HFe=qS,Km=yy,qFe=b8;class Xd extends Tue.RelayAbstract{constructor(e){var t;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=o=>{var a;this.isLinked=o;const l=this.storage.getItem(Tue.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this.session.linked=o),this.isUnlinkedErrorState=!1,l){const u=l.split(" "),h=this.storage.getItem("IsStandaloneSigning")==="true";if(u[0]!==""&&!o&&this.session.linked&&!h){this.isUnlinkedErrorState=!0;const p=this.getSessionIdHash();(a=this.diagnostic)===null||a===void 0||a.log(Gm.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:p})}}},this.metadataUpdated=(o,a)=>{this.storage.setItem(o,a)},this.chainUpdated=(o,a)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:o,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(o,a))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),Xd.accountRequestCallbackIds.size>0&&(Array.from(Xd.accountRequestCallbackIds.values()).forEach(a=>{const l={type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},l),{id:a}))}),Xd.accountRequestCallbackIds.clear())},this.connectedUpdated=o=>{this.ui.setConnected(o)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(t=e.reloadOnDisconnect)!==null&&t!==void 0?t:!0,this.ui=i}subscribe(){const e=v1.Session.load(this.storage)||new v1.Session(this.storage).save(),{linkAPIUrl:t,diagnostic:n}=this,i=new HFe.WalletLinkConnection({session:e,linkAPIUrl:t,diagnostic:n,listener:this}),{version:s,darkMode:o}=this.options,a=this.options.uiConstructor({linkAPIUrl:t,version:s,darkMode:o,session:e});return i.connect(),{session:e,ui:a,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,t;const n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log(Gm.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=v1.Session.load(this.storage);if((i==null?void 0:i.id)===this._session.id?this.storage.clear():i&&((t=this.diagnostic)===null||t===void 0||t.log(Gm.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:v1.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:s,ui:o,connection:a}=this.subscribe();this._session=s,this.connection=a,this.ui=o,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}).catch(e=>{var t;(t=this.diagnostic)===null||t===void 0||t.log(Gm.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,is.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,is.hexStringFromBuffer)(e,!0),signature:(0,is.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,is.bigIntStringFromBN)(e.weiValue),data:(0,is.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,is.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,is.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,is.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,is.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,is.bigIntStringFromBN)(e.weiValue),data:(0,is.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,is.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,is.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,is.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,is.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,is.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,is.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,is.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),t==null||t()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,l=>{if(t==null||t(),(0,Km.isErrorResponse)(l))return a(new Error(l.errorMessage));o(l)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof qFe.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,t){var n;const i={type:"WEB3_REQUEST",id:e,request:t},s=v1.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(Gm.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?v1.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(Gm.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?v1.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})}).catch(o=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:t.method,errorMessage:o.message}})})}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){var t;const{response:n}=e;if((t=this.diagnostic)===null||t===void 0||t.log(Gm.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){Xd.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),Xd.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,n,i){var s;const o=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,Py.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:o,errorCode:i}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,is.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(t),this.handleErrorResponse(t,e.method,s)};return{promise:new Promise((s,o)=>{if(this.relayEventManager.callbacks.set(t,a=>{if(this.ui.hideRequestEthereumAccounts(),(0,Km.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.ui.inlineAccountsResponse()){const a=l=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:{method:"requestEthereumAccounts",result:l}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:a})}else{const a=Py.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(a)})}Xd.accountRequestCallbackIds.add(t),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(t,e)}),cancel:n}}selectProvider(e){const t={method:"selectProvider",params:{providerOptions:e}},n=(0,is.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,h=>{if((0,Km.isErrorResponse)(h))return a(new Error(h.errorMessage));o(h)});const l=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:zFe.ProviderType.Unselected}})},u=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:h}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:l,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,t,n,i,s,o){const a={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:i,image:s},chainId:o}};let l=null;const u=(0,is.randomBytesHex)(8),h=g=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,g),l==null||l()};this.ui.inlineWatchAsset()||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}));const p=new Promise((g,w)=>{this.relayEventManager.callbacks.set(u,T=>{if(l==null||l(),(0,Km.isErrorResponse)(T))return w(new Error(T.errorMessage));g(T)});const y=T=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!1}})},C=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:C,onCancel:y,type:e,address:t,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)});return{cancel:h,promise:p}}addEthereumChain(e,t,n,i,s,o){const a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let l=null;const u=(0,is.randomBytesHex)(8),h=g=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,g),l==null||l()};return this.ui.inlineAddEthereumChain(e)||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload})),{promise:new Promise((g,w)=>{this.relayEventManager.callbacks.set(u,T=>{if(l==null||l(),(0,Km.isErrorResponse)(T))return w(new Error(T.errorMessage));g(T)});const y=T=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},C=T=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:T}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:y,onApprove:C,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)}),cancel:h}}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},i=(0,is.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,l)=>{this.relayEventManager.callbacks.set(i,p=>{if((0,Km.isErrorResponse)(p)&&p.errorCode)return l(Py.standardErrors.provider.custom({code:p.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,Km.isErrorResponse)(p))return l(new Error(p.errorMessage));a(p)});const u=p=>{var g;if(p){const w=(g=(0,Py.getErrorCode)(p))!==null&&g!==void 0?g:Py.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",p instanceof Error?p:Py.standardErrors.provider.unsupportedChain(e),w)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},h=p=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:p}}})};this.ui.switchEthereumChain({onCancel:u,onApprove:h,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return v1.Session.hash(this._session.id)}sendRequestStandalone(e,t){const n=s=>{this.handleErrorResponse(e,t.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:s})};switch(t.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:t,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:t,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:t,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:i});break;default:n();break}}}f8.WalletLinkRelay=Xd,Xd.accountRequestCallbackIds=new Set;var S8={},pI={},Rue={};(function(r){var e=ct&&ct.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),t=ct&&ct.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(rL,r)})(Rue);var iL={};Object.defineProperty(iL,"__esModule",{value:!0}),iL.default=(()=>".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}")();var kue=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pI,"__esModule",{value:!0}),pI.RedirectDialog=void 0;const WFe=kue(A8),_f=bc,VFe=w8,GFe=Rue,KFe=kue(iL);class ZFe{constructor(){this.root=null}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,VFe.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,_f.render)(null,this.root),e&&(0,_f.render)((0,_f.h)(JFe,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}}pI.RedirectDialog=ZFe;const JFe=({title:r,buttonText:e,darkMode:t,onButtonClick:n,onDismiss:i})=>{const s=t?"dark":"light";return(0,_f.h)(GFe.SnackbarContainer,{darkMode:t},(0,_f.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,_f.h)("style",null,KFe.default),(0,_f.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,_f.h)("div",{class:(0,WFe.default)("-cbwsdk-redirect-dialog-box",s)},(0,_f.h)("p",null,r),(0,_f.h)("button",{onClick:n},e))))};Object.defineProperty(S8,"__esModule",{value:!0}),S8.MobileRelayUI=void 0;const YFe=pI;class QFe{constructor(e){this.attached=!1,this.darkMode=!1,this.openedWindow=null,this.redirectDialog=new YFe.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}closeOpenedWindow(){var e;(e=this.openedWindow)===null||e===void 0||e.close(),this.openedWindow=null}redirectToCoinbaseWallet(e){const t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",window.location.href),e&&t.searchParams.append("wl_url",e),this.openedWindow=window.open(t.href,"cbw-opener"),this.openedWindow&&setTimeout(()=>this.closeOpenedWindow(),5e3)}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.closeOpenedWindow(),this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.closeOpenedWindow(),this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}S8.MobileRelayUI=QFe,Object.defineProperty(h8,"__esModule",{value:!0}),h8.MobileRelay=void 0;const XFe=mr,eje=f8,Mue=S8;class tje extends eje.WalletLinkRelay{constructor(e){var t;super(e),this._enableMobileWalletLink=(t=e.enableMobileWalletLink)!==null&&t!==void 0?t:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const e=(0,XFe.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,t){if(super.publishWeb3RequestEvent(e,t),!(this._enableMobileWalletLink&&this.ui instanceof Mue.MobileRelayUI))return;let n=!1;switch(t.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e),this._enableMobileWalletLink&&this.ui instanceof Mue.MobileRelayUI&&this.ui.closeOpenedWindow()}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}}h8.MobileRelay=tje;var I8={},rje={get exports(){return I8},set exports(r){I8=r}},Nue=pn.EventEmitter,sL,Pue;function nje(){if(Pue)return sL;Pue=1;function r(y,C){var T=Object.keys(y);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(y);C&&(k=k.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),T.push.apply(T,k)}return T}function e(y){for(var C=1;C0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(T){var k={data:T,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var k=this.head,N=""+k.data;k=k.next;)N+=T+k.data;return N}},{key:"concat",value:function(T){if(this.length===0)return u.alloc(0);for(var k=u.allocUnsafe(T>>>0),N=this.head,O=0;N;)w(N.data,k,O),O+=N.data.length,N=N.next;return k}},{key:"consume",value:function(T,k){var N;return TB.length?B.length:T;if(z===B.length?O+=B:O+=B.slice(0,T),T-=z,T===0){z===B.length?(++N,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=B.slice(z));break}++N}return this.length-=N,O}},{key:"_getBuffer",value:function(T){var k=u.allocUnsafe(T),N=this.head,O=1;for(N.data.copy(k),T-=N.data.length;N=N.next;){var B=N.data,z=T>B.length?B.length:T;if(B.copy(k,k.length-T,0,z),T-=z,T===0){z===B.length?(++O,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=B.slice(z));break}++O}return this.length-=O,k}},{key:g,value:function(T,k){return p(this,e(e({},k),{},{depth:0,customInspect:!1}))}}]),y}(),sL}function ije(r,e){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,yt.nextTick(oL,this,r)):yt.nextTick(oL,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!e&&s?t._writableState?t._writableState.errorEmitted?yt.nextTick(gI,t):(t._writableState.errorEmitted=!0,yt.nextTick(Oue,t,s)):yt.nextTick(Oue,t,s):e?(yt.nextTick(gI,t),e(s)):yt.nextTick(gI,t)}),this)}function Oue(r,e){oL(r,e),gI(r)}function gI(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function sje(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function oL(r,e){r.emit("error",e)}function oje(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}var Due={destroy:ije,undestroy:sje,errorOrDestroy:oje},Zm={};function aje(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var $ue={};function ru(r,e,t){t||(t=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){aje(o,s);function o(a,l,u){return s.call(this,n(a,l,u))||this}return o}(t);i.prototype.name=t.name,i.prototype.code=r,$ue[r]=i}function Bue(r,e){if(Array.isArray(r)){var t=r.length;return r=r.map(function(n){return String(n)}),t>2?"one of ".concat(e," ").concat(r.slice(0,t-1).join(", "),", or ")+r[t-1]:t===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}else return"of ".concat(e," ").concat(String(r))}function cje(r,e,t){return r.substr(!t||t<0?0:+t,e.length)===e}function lje(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function uje(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}ru("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError),ru("ERR_INVALID_ARG_TYPE",function(r,e,t){var n;typeof e=="string"&&cje(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(lje(r," argument"))i="The ".concat(r," ").concat(n," ").concat(Bue(e,"type"));else{var s=uje(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(s," ").concat(n," ").concat(Bue(e,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError),ru("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ru("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"}),ru("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ru("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"}),ru("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ru("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ru("ERR_STREAM_WRITE_AFTER_END","write after end"),ru("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ru("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError),ru("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Zm.codes=$ue;var hje=Zm.codes.ERR_INVALID_OPT_VALUE;function fje(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function dje(r,e,t,n){var i=fje(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?t:"highWaterMark";throw new hje(s,i)}return Math.floor(i)}return r.objectMode?16:16*1024}var Lue={getHighWaterMark:dje},pje=gje;function gje(r,e){if(aL("noDeprecation"))return r;var t=!1;function n(){if(!t){if(aL("throwDeprecation"))throw new Error(e);aL("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function aL(r){try{if(!ct.localStorage)return!1}catch{return!1}var e=ct.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}var cL,Uue;function Fue(){if(Uue)return cL;Uue=1,cL=D;function r(Y){var K=this;this.next=null,this.entry=null,this.finish=function(){q(K,Y)}}var e;D.WritableState=G;var t={deprecate:pje},n=Nue,i=qc.Buffer,s=(typeof ct<"u"?ct:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(Y){return i.from(Y)}function a(Y){return i.isBuffer(Y)||Y instanceof s}var l=Due,u=Lue,h=u.getHighWaterMark,p=Zm.codes,g=p.ERR_INVALID_ARG_TYPE,w=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,C=p.ERR_STREAM_CANNOT_PIPE,T=p.ERR_STREAM_DESTROYED,k=p.ERR_STREAM_NULL_VALUES,N=p.ERR_STREAM_WRITE_AFTER_END,O=p.ERR_UNKNOWN_ENCODING,B=l.errorOrDestroy;Zc(D,n);function z(){}function G(Y,K,te){e=e||Oy(),Y=Y||{},typeof te!="boolean"&&(te=K instanceof e),this.objectMode=!!Y.objectMode,te&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=h(this,Y,"writableHighWaterMark",te),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var re=Y.decodeStrings===!1;this.decodeStrings=!re,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){x(K,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var K=this.bufferedRequest,te=[];K;)te.push(K),K=K.next;return te},function(){try{Object.defineProperty(G.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var $;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(K){return $.call(this,K)?!0:this!==D?!1:K&&K._writableState instanceof G}})):$=function(K){return K instanceof this};function D(Y){e=e||Oy();var K=this instanceof e;if(!K&&!$.call(D,this))return new D(Y);this._writableState=new G(Y,this,K),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),n.call(this)}D.prototype.pipe=function(){B(this,new C)};function V(Y,K){var te=new N;B(Y,te),yt.nextTick(K,te)}function Q(Y,K,te,re){var H;return te===null?H=new k:typeof te!="string"&&!K.objectMode&&(H=new g("chunk",["string","Buffer"],te)),H?(B(Y,H),yt.nextTick(re,H),!1):!0}D.prototype.write=function(Y,K,te){var re=this._writableState,H=!1,U=!re.objectMode&&a(Y);return U&&!i.isBuffer(Y)&&(Y=o(Y)),typeof K=="function"&&(te=K,K=null),U?K="buffer":K||(K=re.defaultEncoding),typeof te!="function"&&(te=z),re.ending?V(this,te):(U||Q(this,re,Y,te))&&(re.pendingcb++,H=M(this,re,U,Y,K,te)),H},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&R(this,Y))},D.prototype.setDefaultEncoding=function(K){if(typeof K=="string"&&(K=K.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((K+"").toLowerCase())>-1))throw new O(K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(Y,K,te){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof K=="string"&&(K=i.from(K,te)),K}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(Y,K,te,re,H,U){if(!te){var W=F(K,re,H);re!==W&&(te=!0,H="buffer",re=W)}var le=K.objectMode?1:re.length;K.length+=le;var de=K.length0)if(typeof W!="string"&&!Me.objectMode&&Object.getPrototypeOf(W)!==n.prototype&&(W=s(W)),de)Me.endEmitted?z(U,new k):F(U,Me,W,!0);else if(Me.ended)z(U,new C);else{if(Me.destroyed)return!1;Me.reading=!1,Me.decoder&&!le?(W=Me.decoder.write(W),Me.objectMode||W.length!==0?F(U,Me,W,!1):R(U,Me)):F(U,Me,W,!1)}else de||(Me.reading=!1,R(U,Me))}return!Me.ended&&(Me.length=b?U=b:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}function m(U,W){return U<=0||W.length===0&&W.ended?0:W.objectMode?1:U!==U?W.flowing&&W.length?W.buffer.head.data.length:W.length:(U>W.highWaterMark&&(W.highWaterMark=d(U)),U<=W.length?U:W.ended?W.length:(W.needReadable=!0,0))}V.prototype.read=function(U){l("read",U),U=parseInt(U,10);var W=this._readableState,le=U;if(U!==0&&(W.emittedReadable=!1),U===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return l("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?te(this):A(this),null;if(U=m(U,W),U===0&&W.ended)return W.length===0&&te(this),null;var de=W.needReadable;l("need readable",de),(W.length===0||W.length-U0?Se=K(U,W):Se=null,Se===null?(W.needReadable=W.length<=W.highWaterMark,U=0):(W.length-=U,W.awaitDrain=0),W.length===0&&(W.ended||(W.needReadable=!0),le!==U&&W.ended&&te(this)),Se!==null&&this.emit("data",Se),Se};function x(U,W){if(l("onEofChunk"),!W.ended){if(W.decoder){var le=W.decoder.end();le&&le.length&&(W.buffer.push(le),W.length+=W.objectMode?1:le.length)}W.ended=!0,W.sync?A(U):(W.needReadable=!1,W.emittedReadable||(W.emittedReadable=!0,I(U)))}}function A(U){var W=U._readableState;l("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(l("emitReadable",W.flowing),W.emittedReadable=!0,yt.nextTick(I,U))}function I(U){var W=U._readableState;l("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&(W.length||W.ended)&&(U.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,Y(U)}function R(U,W){W.readingMore||(W.readingMore=!0,yt.nextTick(S,U,W))}function S(U,W){for(;!W.reading&&!W.ended&&(W.length1&&H(de.pipes,U)!==-1)&&!je&&(l("false write response, pause",de.awaitDrain),de.awaitDrain++),le.pause())}function ze(Be){l("onerror",Be),He(),U.removeListener("error",ze),e(U,"error")===0&&z(U,Be)}$(U,"error",ze);function qe(){U.removeListener("finish",Ve),He()}U.once("close",qe);function Ve(){l("onfinish"),U.removeListener("close",qe),He()}U.once("finish",Ve);function He(){l("unpipe"),le.unpipe(U)}return U.emit("pipe",le),de.flowing||(l("pipe resume"),le.resume()),U};function E(U){return function(){var le=U._readableState;l("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&e(U,"data")&&(le.flowing=!0,Y(U))}}V.prototype.unpipe=function(U){var W=this._readableState,le={hasUnpiped:!1};if(W.pipesCount===0)return this;if(W.pipesCount===1)return U&&U!==W.pipes?this:(U||(U=W.pipes),W.pipes=null,W.pipesCount=0,W.flowing=!1,U&&U.emit("unpipe",this,le),this);if(!U){var de=W.pipes,Se=W.pipesCount;W.pipes=null,W.pipesCount=0,W.flowing=!1;for(var Me=0;Me0,de.flowing!==!1&&this.resume()):U==="readable"&&!de.endEmitted&&!de.readableListening&&(de.readableListening=de.needReadable=!0,de.flowing=!1,de.emittedReadable=!1,l("on readable",de.length,de.reading),de.length?A(this):de.reading||yt.nextTick(L,this)),le},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(U,W){var le=t.prototype.removeListener.call(this,U,W);return U==="readable"&&yt.nextTick(_,this),le},V.prototype.removeAllListeners=function(U){var W=t.prototype.removeAllListeners.apply(this,arguments);return(U==="readable"||U===void 0)&&yt.nextTick(_,this),W};function _(U){var W=U._readableState;W.readableListening=U.listenerCount("readable")>0,W.resumeScheduled&&!W.paused?W.flowing=!0:U.listenerCount("data")>0&&U.resume()}function L(U){l("readable nexttick read 0"),U.read(0)}V.prototype.resume=function(){var U=this._readableState;return U.flowing||(l("resume"),U.flowing=!U.readableListening,ie(this,U)),U.paused=!1,this};function ie(U,W){W.resumeScheduled||(W.resumeScheduled=!0,yt.nextTick(q,U,W))}function q(U,W){l("resume",W.reading),W.reading||U.read(0),W.resumeScheduled=!1,U.emit("resume"),Y(U),W.flowing&&!W.reading&&U.read(0)}V.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(U){var W=U._readableState;for(l("flow",W.flowing);W.flowing&&U.read()!==null;);}V.prototype.wrap=function(U){var W=this,le=this._readableState,de=!1;U.on("end",function(){if(l("wrapped end"),le.decoder&&!le.ended){var ke=le.decoder.end();ke&&ke.length&&W.push(ke)}W.push(null)}),U.on("data",function(ke){if(l("wrapped data"),le.decoder&&(ke=le.decoder.write(ke)),!(le.objectMode&&ke==null)&&!(!le.objectMode&&(!ke||!ke.length))){var Ke=W.push(ke);Ke||(de=!0,U.pause())}});for(var Se in U)this[Se]===void 0&&typeof U[Se]=="function"&&(this[Se]=function(Ke){return function(){return U[Ke].apply(U,arguments)}}(Se));for(var Me=0;Me=W.length?(W.decoder?le=W.buffer.join(""):W.buffer.length===1?le=W.buffer.first():le=W.buffer.concat(W.length),W.buffer.clear()):le=W.buffer.consume(U,W.decoder),le}function te(U){var W=U._readableState;l("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,yt.nextTick(re,W,U))}function re(U,W){if(l("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,W.readable=!1,W.emit("end"),U.autoDestroy)){var le=W._writableState;(!le||le.autoDestroy&&le.finished)&&W.destroy()}}typeof Symbol=="function"&&(V.from=function(U,W){return B===void 0&&(B=yje()),B(V,U,W)});function H(U,W){for(var le=0,de=U.length;le0;return Nje(o,l,u,function(h){i||(i=h),h&&s.forEach(Xue),!l&&(s.forEach(Xue),n(i))})});return e.reduce(Pje)}var $je=Dje;(function(r,e){e=r.exports=Gue(),e.Stream=e,e.Readable=e,e.Writable=Fue(),e.Duplex=Oy(),e.Transform=Kue,e.PassThrough=Ije,e.finished=uL,e.pipeline=$je})(rje,I8);const{Transform:Bje}=I8;var Lje=r=>class Sge extends Bje{constructor(t,n,i,s,o){super(o),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(t){let n=null;try{this.push(this.digest())}catch(i){n=i}t(n)}update(t,n){if(!Dt.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Dt.isBuffer(t)||(t=Dt.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(n=n.toString(t)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Sge(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const{Transform:Uje}=I8;var Fje=r=>class Ige extends Uje{constructor(t,n,i,s){super(s),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(o){s=o}i(s)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!Dt.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Dt.isBuffer(t)||(t=Dt.from(t,n)),this._state.absorb(t),this}squeeze(t,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Ige(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const jje=Lje,zje=Fje;var Hje=function(r){const e=jje(r),t=zje(r);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new t(1344,256,31,i);case"shake256":return new t(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},ehe={};const the=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];ehe.p1600=function(r){for(let e=0;e<24;++e){const t=r[0]^r[10]^r[20]^r[30]^r[40],n=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],s=r[3]^r[13]^r[23]^r[33]^r[43],o=r[4]^r[14]^r[24]^r[34]^r[44],a=r[5]^r[15]^r[25]^r[35]^r[45],l=r[6]^r[16]^r[26]^r[36]^r[46],u=r[7]^r[17]^r[27]^r[37]^r[47],h=r[8]^r[18]^r[28]^r[38]^r[48],p=r[9]^r[19]^r[29]^r[39]^r[49];let g=h^(i<<1|s>>>31),w=p^(s<<1|i>>>31);const y=r[0]^g,C=r[1]^w,T=r[10]^g,k=r[11]^w,N=r[20]^g,O=r[21]^w,B=r[30]^g,z=r[31]^w,G=r[40]^g,$=r[41]^w;g=t^(o<<1|a>>>31),w=n^(a<<1|o>>>31);const D=r[2]^g,V=r[3]^w,Q=r[12]^g,F=r[13]^w,M=r[22]^g,b=r[23]^w,d=r[32]^g,m=r[33]^w,x=r[42]^g,A=r[43]^w;g=i^(l<<1|u>>>31),w=s^(u<<1|l>>>31);const I=r[4]^g,R=r[5]^w,S=r[14]^g,E=r[15]^w,_=r[24]^g,L=r[25]^w,ie=r[34]^g,q=r[35]^w,Y=r[44]^g,K=r[45]^w;g=o^(h<<1|p>>>31),w=a^(p<<1|h>>>31);const te=r[6]^g,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pt&ur,r[30]=bn^~se&Nt,r[31]=qn^~J&Lt,r[40]=dt^~qt&$i,r[41]=Vt^~br&Bi,r[2]=It^~Gt&Xn,r[3]=st^~gt&ei,r[12]=Di^~X&ht,r[13]=Wn^~ue&wt,r[22]=xt^~Tt&bi,r[23]=pt^~ur&Ei,r[32]=se^~Nt&vt,r[33]=J^~Lt&Ft,r[42]=qt^~$i&we,r[43]=br^~Bi&ye,r[4]=Gt^~Xn&Ai,r[5]=gt^~ei&Cn,r[14]=X^~ht<,r[15]=ue^~wt&_t,r[24]=Tt^~bi&Ie,r[25]=ur^~Ei&it,r[34]=Nt^~vt&ti,r[35]=Lt^~Ft&ri,r[44]=$i^~we&Ut,r[45]=Bi^~ye&ft,r[6]=Xn^~Ai&Ge,r[7]=ei^~Cn&Xe,r[16]=ht^~lt&Kt,r[17]=wt^~_t&Ht,r[26]=bi^~Ie&ot,r[27]=Ei^~it&tt,r[36]=vt^~ti&bn,r[37]=Ft^~ri&qn,r[46]=we^~Ut&dt,r[47]=ye^~ft&Vt,r[8]=Ai^~Ge&It,r[9]=Cn^~Xe&st,r[18]=lt^~Kt&Di,r[19]=_t^~Ht&Wn,r[28]=Ie^~ot&xt,r[29]=it^~tt&pt,r[38]=ti^~bn&se,r[39]=ri^~qn&J,r[48]=Ut^~dt&qt,r[49]=ft^~Vt&br,r[0]^=the[e*2],r[1]^=the[e*2+1]}};const wI=ehe;function Dy(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Dy.prototype.initialize=function(r,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1},Dy.prototype.absorb=function(r){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(wI.p1600(this.state),this.count=0);return e},Dy.prototype.copy=function(r){for(let e=0;e<50;++e)r.state[e]=this.state[e];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing};var qje=Dy,Wje=Hje(qje);const Vje=Wje,Gje=wy;function rhe(r){return Dt.allocUnsafe(r).fill(0)}function nhe(r,e,t){const n=rhe(e);return r=vI(r),t?r.length"u")throw new Error("Not an array?");if(t=lhe(r),t!=="dynamic"&&t!==0&&e.length>t)throw new Error("Elements exceed array size: "+t);i=[],r=r.slice(0,r.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Ef(r,e[s]));if(t==="dynamic"){var o=Ef("uint256",e.length);i.unshift(o)}return Dt.concat(i)}else{if(r==="bytes")return e=new Dt(e),i=Dt.concat([Ef("uint256",e.length),e]),e.length%32!==0&&(i=Dt.concat([i,Jm.zeros(32-e.length%32)])),i;if(r.startsWith("bytes")){if(t=$y(r),t<1||t>32)throw new Error("Invalid bytes width: "+t);return Jm.setLengthRight(e,32)}else if(r.startsWith("uint")){if(t=$y(r),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);if(n=Qm(e),n.bitLength()>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Dt,"be",32)}else if(r.startsWith("int")){if(t=$y(r),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);if(n=Qm(e),n.bitLength()>t)throw new Error("Supplied int exceeds width: "+t+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Dt,"be",32)}else if(r.startsWith("ufixed")){if(t=che(r),n=Qm(e),n<0)throw new Error("Supplied ufixed is negative");return Ef("uint256",n.mul(new Ym(2).pow(new Ym(t[1]))))}else if(r.startsWith("fixed"))return t=che(r),Ef("int256",Qm(e).mul(new Ym(2).pow(new Ym(t[1]))))}throw new Error("Unsupported or invalid type: "+r)}function Qje(r){return r==="string"||r==="bytes"||lhe(r)==="dynamic"}function Xje(r){return r.lastIndexOf("]")===r.length-1}function eze(r,e){var t=[],n=[],i=32*r.length;for(var s in r){var o=ahe(r[s]),a=e[s],l=Ef(o,a);Qje(o)?(t.push(Ef("uint256",i)),n.push(l),i+=l.length):t.push(l)}return Dt.concat(t.concat(n))}function uhe(r,e){if(r.length!==e.length)throw new Error("Number of types are not matching the values");for(var t,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+t);i.push(Jm.setLengthRight(a,t))}else if(o.startsWith("uint")){if(t=$y(o),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);if(n=Qm(a),n.bitLength()>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+n.bitLength());i.push(n.toArrayLike(Dt,"be",t/8))}else if(o.startsWith("int")){if(t=$y(o),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);if(n=Qm(a),n.bitLength()>t)throw new Error("Supplied int exceeds width: "+t+" vs "+n.bitLength());i.push(n.toTwos(t).toArrayLike(Dt,"be",t/8))}else throw new Error("Unsupported or invalid type: "+o)}return Dt.concat(i)}function tze(r,e){return Jm.keccak(uhe(r,e))}var rze={rawEncode:eze,solidityPack:uhe,soliditySHA3:tze};const eh=ohe,R8=rze,hhe={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},gL={encodeData(r,e,t,n=!0){const i=["bytes32"],s=[this.hashType(r,t)];if(n){const o=(a,l,u)=>{if(t[l]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":eh.keccak(this.encodeData(l,u,t,n))];if(u===void 0)throw new Error(`missing value for field ${a} of type ${l}`);if(l==="bytes")return["bytes32",eh.keccak(u)];if(l==="string")return typeof u=="string"&&(u=Dt.from(u,"utf8")),["bytes32",eh.keccak(u)];if(l.lastIndexOf("]")===l.length-1){const h=l.slice(0,l.lastIndexOf("[")),p=u.map(g=>o(a,h,g));return["bytes32",eh.keccak(R8.rawEncode(p.map(([g])=>g),p.map(([,g])=>g)))]}return[l,u]};for(const a of t[r]){const[l,u]=o(a.name,a.type,e[a.name]);i.push(l),s.push(u)}}else for(const o of t[r]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=eh.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Dt.from(a,"utf8")),a=eh.keccak(a),s.push(a);else if(t[o.type]!==void 0)i.push("bytes32"),a=eh.keccak(this.encodeData(o.type,a,t,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return R8.rawEncode(i,s)},encodeType(r,e){let t="",n=this.findTypeDependencies(r,e).filter(i=>i!==r);n=[r].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);t+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return t},findTypeDependencies(r,e,t=[]){if(r=r.match(/^\w*/)[0],t.includes(r)||e[r]===void 0)return t;t.push(r);for(const n of e[r])for(const i of this.findTypeDependencies(n.type,e,t))!t.includes(i)&&t.push(i);return t},hashStruct(r,e,t,n=!0){return eh.keccak(this.encodeData(r,e,t,n))},hashType(r,e){return eh.keccak(this.encodeType(r,e))},sanitizeData(r){const e={};for(const t in hhe.properties)r[t]&&(e[t]=r[t]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(r,e=!0){const t=this.sanitizeData(r),n=[Dt.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",t.domain,t.types,e)),t.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(t.primaryType,t.message,t.types,e)),eh.keccak(Dt.concat(n))}};var nze={TYPED_MESSAGE_SCHEMA:hhe,TypedDataUtils:gL,hashForSignTypedDataLegacy:function(r){return ize(r.data)},hashForSignTypedData_v3:function(r){return gL.hash(r.data,!1)},hashForSignTypedData_v4:function(r){return gL.hash(r.data)}};function ize(r){const e=new Error("Expect argument to be non-empty array");if(typeof r!="object"||!r.length)throw e;const t=r.map(function(s){return s.type==="bytes"?eh.toBuffer(s.value):s.value}),n=r.map(function(s){return s.type}),i=r.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return R8.soliditySHA3(["bytes32","bytes32"],[R8.soliditySHA3(new Array(r.length).fill("string"),i),R8.soliditySHA3(n,t)])}var By={};Object.defineProperty(By,"__esModule",{value:!0}),By.filterFromParam=By.FilterPolyfill=void 0;const Ly=Js,La=mr,sze=5*60*1e3,Xm={jsonrpc:"2.0",id:0};class oze{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,Ly.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){const t=fhe(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,t.fromBlock);return console.info(`Installing new log filter(${n}):`,t,"initial cursor position:",i),this.logFilters.set(n,t),this.setFilterTimeout(n),(0,La.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,La.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,La.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,La.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,La.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(yI())}async getFilterLogs(e){const t=(0,La.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},Xm),{method:"eth_getLogs",params:[dhe(n)]})):yI()}makeFilterId(){return(0,Ly.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((t,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));t(s)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return yI();const i=await this.getCurrentBlockHeight(),s=t.toBlock==="latest"?i:t.toBlock;if(n>i||n>Number(t.toBlock))return xI();console.info(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},Xm),{method:"eth_getLogs",params:[dhe(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(u=>(0,La.intNumberFromHexString)(u.blockNumber||"0x0")),l=Math.max(...a);if(l&&l>n){const u=(0,Ly.IntNumber)(l+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return o}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return yI();const n=await this.getCurrentBlockHeight();if(t>n)return xI();console.info(`Fetching blocks from ${t} to ${n} for filter (${e})`);const i=(await Promise.all((0,La.range)(t,n+1).map(o=>this.getBlockHashByNumber((0,Ly.IntNumber)(o))))).filter(o=>!!o),s=(0,Ly.IntNumber)(t+i.length);return console.info(`Moving cursor position for filter (${e}) from ${t} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},Xm),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(xI())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),i=typeof t=="number"&&t>n?t:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},sze);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;const t=await this._getCurrentBlockHeight();this.currentBlockHeight=t,this.resolvers.forEach(n=>n(t)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(t=>this.resolvers.push(t))}async _getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},Xm),{method:"eth_blockNumber",params:[]}));return(0,La.intNumberFromHexString)((0,La.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},Xm),{method:"eth_getBlockByNumber",params:[(0,La.hexStringFromIntNumber)(e),!1]}));return t.result&&typeof t.result.hash=="string"?(0,La.ensureHexString)(t.result.hash):null}}By.FilterPolyfill=oze;function fhe(r){return{fromBlock:phe(r.fromBlock),toBlock:phe(r.toBlock),addresses:r.address===void 0?null:Array.isArray(r.address)?r.address:[r.address],topics:r.topics||[]}}By.filterFromParam=fhe;function dhe(r){const e={fromBlock:ghe(r.fromBlock),toBlock:ghe(r.toBlock),topics:r.topics};return r.addresses!==null&&(e.address=r.addresses),e}function phe(r){if(r===void 0||r==="latest"||r==="pending")return"latest";if(r==="earliest")return(0,Ly.IntNumber)(0);if((0,La.isHexString)(r))return(0,La.intNumberFromHexString)(r);throw new Error(`Invalid block option: ${String(r)}`)}function ghe(r){return r==="latest"?r:(0,La.hexStringFromIntNumber)(r)}function yI(){return Object.assign(Object.assign({},Xm),{error:{code:-32e3,message:"filter not found"}})}function xI(){return Object.assign(Object.assign({},Xm),{result:[]})}var _I={},mhe={},EI={},mL=aze;function aze(r){r=r||{};var e=r.max||Number.MAX_SAFE_INTEGER,t=typeof r.start<"u"?r.start:Math.floor(Math.random()*e);return function(){return t=t%e,t++}}const bhe=(r,e)=>function(){const t=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(o,a){if(e.multiArgs){const l=new Array(arguments.length-1);for(let u=1;u{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const t=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof r=="function"?n=function(){return e.excludeMain?r.apply(this,arguments):bhe(r,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(r));for(const i in r){const s=r[i];n[i]=typeof s=="function"&&t(i)?bhe(s,e):s}return n},k8={},M8={};Object.defineProperty(M8,"__esModule",{value:!0});const lze=pn;function whe(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function uze(r){const e=r.length,t=new Array(e);for(let n=0;n0&&([o]=t),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")whe(s,this,t);else{const o=s.length,a=uze(s);for(let l=0;lr+e,vhe=["sync","latest"];class mze extends dze.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*pze,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(t=>this.once("latest",t))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){vhe.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return vhe.map(e=>this.listenerCount(e)).reduce(gze)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const n=yhe(e),i=yhe(t);return this._usePastBlocks&&ni}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}k8.BaseBlockTracker=mze;function yhe(r){return Number.parseInt(r,16)}var xhe={},_he={},Wo={};class Ehe extends TypeError{constructor(e,t){let n;const{message:i,explanation:s,...o}=e,{path:a}=e,l=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??l),s!=null&&(this.cause=l),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function bze(r){return nu(r)&&typeof r[Symbol.iterator]=="function"}function nu(r){return typeof r=="object"&&r!=null}function Ahe(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;const e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function Ys(r){return typeof r=="symbol"?r.toString():typeof r=="string"?JSON.stringify(r):`${r}`}function wze(r){const{done:e,value:t}=r.next();return e?void 0:t}function vze(r,e,t,n){if(r===!0)return;r===!1?r={}:typeof r=="string"&&(r={message:r});const{path:i,branch:s}=e,{type:o}=t,{refinement:a,message:l=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${Ys(n)}\``}=r;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...r,message:l}}function*bL(r,e,t,n){bze(r)||(r=[r]);for(const i of r){const s=vze(i,e,t,n);s&&(yield s)}}function*wL(r,e,t={}){const{path:n=[],branch:i=[r],coerce:s=!1,mask:o=!1}=t,a={path:n,branch:i};if(s&&(r=e.coercer(r,a),o&&e.type!=="type"&&nu(e.schema)&&nu(r)&&!Array.isArray(r)))for(const u in r)e.schema[u]===void 0&&delete r[u];let l="valid";for(const u of e.validator(r,a))u.explanation=t.message,l="not_valid",yield[u,void 0];for(let[u,h,p]of e.entries(r,a)){const g=wL(h,p,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,h],coerce:s,mask:o,message:t.message});for(const w of g)w[0]?(l=w[0].refinement!=null?"not_refined":"not_valid",yield[w[0],void 0]):s&&(h=w[1],u===void 0?r=h:r instanceof Map?r.set(u,h):r instanceof Set?r.add(h):nu(r)&&(h!==void 0||u in r)&&(r[u]=h))}if(l!=="not_valid")for(const u of e.refiner(r,a))u.explanation=t.message,l="not_refined",yield[u,void 0];l==="valid"&&(yield[void 0,r])}class Cs{constructor(e){const{type:t,schema:n,validator:i,refiner:s,coercer:o=l=>l,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(l,u)=>{const h=i(l,u);return bL(h,u,this,l)}:this.validator=()=>[],s?this.refiner=(l,u)=>{const h=s(l,u);return bL(h,u,this,l)}:this.refiner=()=>[]}assert(e,t){return Che(e,this,t)}create(e,t){return She(e,this,t)}is(e){return vL(e,this)}mask(e,t){return Ihe(e,this,t)}validate(e,t={}){return Uy(e,this,t)}}function Che(r,e,t){const n=Uy(r,e,{message:t});if(n[0])throw n[0]}function She(r,e,t){const n=Uy(r,e,{coerce:!0,message:t});if(n[0])throw n[0];return n[1]}function Ihe(r,e,t){const n=Uy(r,e,{coerce:!0,mask:!0,message:t});if(n[0])throw n[0];return n[1]}function vL(r,e){return!Uy(r,e)[0]}function Uy(r,e,t={}){const n=wL(r,e,t),i=wze(n);return i[0]?[new Ehe(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function yze(...r){const e=r[0].type==="type",t=r.map(i=>i.schema),n=Object.assign({},...t);return e?P8(n):N8(n)}function wc(r,e){return new Cs({type:r,schema:null,validator:e})}function xze(r,e){return new Cs({...r,refiner:(t,n)=>t===void 0||r.refiner(t,n),validator(t,n){return t===void 0?!0:(e(t,n),r.validator(t,n))}})}function _ze(r){return new Cs({type:"dynamic",schema:null,*entries(e,t){yield*r(e,t).entries(e,t)},validator(e,t){return r(e,t).validator(e,t)},coercer(e,t){return r(e,t).coercer(e,t)},refiner(e,t){return r(e,t).refiner(e,t)}})}function Eze(r){let e;return new Cs({type:"lazy",schema:null,*entries(t,n){e??(e=r()),yield*e.entries(t,n)},validator(t,n){return e??(e=r()),e.validator(t,n)},coercer(t,n){return e??(e=r()),e.coercer(t,n)},refiner(t,n){return e??(e=r()),e.refiner(t,n)}})}function Aze(r,e){const{schema:t}=r,n={...t};for(const i of e)delete n[i];switch(r.type){case"type":return P8(n);default:return N8(n)}}function Cze(r){const e=r instanceof Cs,t=e?{...r.schema}:{...r};for(const n in t)t[n]=The(t[n]);return e&&r.type==="type"?P8(t):N8(t)}function Sze(r,e){const{schema:t}=r,n={};for(const i of e)n[i]=t[i];switch(r.type){case"type":return P8(n);default:return N8(n)}}function Ize(r,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),wc(r,e)}function Tze(){return wc("any",()=>!0)}function Rze(r){return new Cs({type:"array",schema:r,*entries(e){if(r&&Array.isArray(e))for(const[t,n]of e.entries())yield[t,n,r]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${Ys(e)}`}})}function kze(){return wc("bigint",r=>typeof r=="bigint")}function Mze(){return wc("boolean",r=>typeof r=="boolean")}function Nze(){return wc("date",r=>r instanceof Date&&!isNaN(r.getTime())||`Expected a valid \`Date\` object, but received: ${Ys(r)}`)}function Pze(r){const e={},t=r.map(n=>Ys(n)).join();for(const n of r)e[n]=n;return new Cs({type:"enums",schema:e,validator(n){return r.includes(n)||`Expected one of \`${t}\`, but received: ${Ys(n)}`}})}function Oze(){return wc("func",r=>typeof r=="function"||`Expected a function, but received: ${Ys(r)}`)}function Dze(r){return wc("instance",e=>e instanceof r||`Expected a \`${r.name}\` instance, but received: ${Ys(e)}`)}function $ze(){return wc("integer",r=>typeof r=="number"&&!isNaN(r)&&Number.isInteger(r)||`Expected an integer, but received: ${Ys(r)}`)}function Bze(r){return new Cs({type:"intersection",schema:null,*entries(e,t){for(const n of r)yield*n.entries(e,t)},*validator(e,t){for(const n of r)yield*n.validator(e,t)},*refiner(e,t){for(const n of r)yield*n.refiner(e,t)}})}function Lze(r){const e=Ys(r),t=typeof r;return new Cs({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?r:null,validator(n){return n===r||`Expected the literal \`${e}\`, but received: ${Ys(n)}`}})}function Uze(r,e){return new Cs({type:"map",schema:null,*entries(t){if(r&&e&&t instanceof Map)for(const[n,i]of t.entries())yield[n,n,r],yield[n,i,e]},coercer(t){return t instanceof Map?new Map(t):t},validator(t){return t instanceof Map||`Expected a \`Map\` object, but received: ${Ys(t)}`}})}function yL(){return wc("never",()=>!1)}function Fze(r){return new Cs({...r,validator:(e,t)=>e===null||r.validator(e,t),refiner:(e,t)=>e===null||r.refiner(e,t)})}function jze(){return wc("number",r=>typeof r=="number"&&!isNaN(r)||`Expected a number, but received: ${Ys(r)}`)}function N8(r){const e=r?Object.keys(r):[],t=yL();return new Cs({type:"object",schema:r||null,*entries(n){if(r&&nu(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],r[s]];for(const s of i)yield[s,n[s],t]}},validator(n){return nu(n)||`Expected an object, but received: ${Ys(n)}`},coercer(n){return nu(n)?{...n}:n}})}function The(r){return new Cs({...r,validator:(e,t)=>e===void 0||r.validator(e,t),refiner:(e,t)=>e===void 0||r.refiner(e,t)})}function zze(r,e){return new Cs({type:"record",schema:null,*entries(t){if(nu(t))for(const n in t){const i=t[n];yield[n,n,r],yield[n,i,e]}},validator(t){return nu(t)||`Expected an object, but received: ${Ys(t)}`}})}function Hze(){return wc("regexp",r=>r instanceof RegExp)}function qze(r){return new Cs({type:"set",schema:null,*entries(e){if(r&&e instanceof Set)for(const t of e)yield[t,t,r]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${Ys(e)}`}})}function Rhe(){return wc("string",r=>typeof r=="string"||`Expected a string, but received: ${Ys(r)}`)}function Wze(r){const e=yL();return new Cs({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const n=Math.max(r.length,t.length);for(let i=0;it.type).join(" | ");return new Cs({type:"union",schema:null,coercer(t){for(const n of r){const[i,s]=n.validate(t,{coerce:!0});if(!i)return s}return t},validator(t,n){const i=[];for(const s of r){const[...o]=wL(t,s,n),[a]=o;if(a[0])for(const[l]of o)l&&i.push(l);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Ys(t)}`,...i]}})}function khe(){return wc("unknown",()=>!0)}function xL(r,e,t){return new Cs({...r,coercer:(n,i)=>vL(n,e)?r.coercer(t(n,i),i):r.coercer(n,i)})}function Gze(r,e,t={}){return xL(r,khe(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!t.strict&&Ahe(n)&&Ahe(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function Kze(r){return xL(r,Rhe(),e=>e.trim())}function Zze(r){return e2(r,"empty",e=>{const t=Mhe(e);return t===0||`Expected an empty ${r.type} but received one with a size of \`${t}\``})}function Mhe(r){return r instanceof Map||r instanceof Set?r.size:r.length}function Jze(r,e,t={}){const{exclusive:n}=t;return e2(r,"max",i=>n?in?i>e:i>=e||`Expected a ${r.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function Qze(r){return e2(r,"nonempty",e=>Mhe(e)>0||`Expected a nonempty ${r.type} but received an empty one`)}function Xze(r,e){return e2(r,"pattern",t=>e.test(t)||`Expected a ${r.type} matching \`/${e.source}/\` but received "${t}"`)}function eHe(r,e,t=e){const n=`Expected a ${r.type}`,i=e===t?`of \`${e}\``:`between \`${e}\` and \`${t}\``;return e2(r,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=t||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:o}=s;return e<=o&&o<=t||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=t||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function e2(r,e,t){return new Cs({...r,*refiner(n,i){yield*r.refiner(n,i);const s=t(n,i),o=bL(s,i,r,n);for(const a of o)yield{...a,refinement:e}}})}const t2=ad(Object.freeze(Object.defineProperty({__proto__:null,Struct:Cs,StructError:Ehe,any:Tze,array:Rze,assert:Che,assign:yze,bigint:kze,boolean:Mze,coerce:xL,create:She,date:Nze,defaulted:Gze,define:wc,deprecated:xze,dynamic:_ze,empty:Zze,enums:Pze,func:Oze,instance:Dze,integer:$ze,intersection:Bze,is:vL,lazy:Eze,literal:Lze,map:Uze,mask:Ihe,max:Jze,min:Yze,never:yL,nonempty:Qze,nullable:Fze,number:jze,object:N8,omit:Aze,optional:The,partial:Cze,pattern:Xze,pick:Sze,record:zze,refine:e2,regexp:Hze,set:qze,size:eHe,string:Rhe,struct:Ize,trimmed:Kze,tuple:Wze,type:P8,union:Vze,unknown:khe,validate:Uy},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.assertExhaustive=Wo.assertStruct=Wo.assert=Wo.AssertionError=void 0;const tHe=t2;function rHe(r){return typeof r=="object"&&r!==null&&"message"in r}function nHe(r){var e,t;return Boolean(typeof((t=(e=r==null?void 0:r.prototype)===null||e===void 0?void 0:e.constructor)===null||t===void 0?void 0:t.name)=="string")}function iHe(r){const e=rHe(r)?r.message:String(r);return e.endsWith(".")?e.slice(0,-1):e}function Nhe(r,e){return nHe(r)?new r({message:e}):r({message:e})}class _L extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}Wo.AssertionError=_L;function sHe(r,e="Assertion failed.",t=_L){if(!r)throw e instanceof Error?e:Nhe(t,e)}Wo.assert=sHe;function oHe(r,e,t="Assertion failed",n=_L){try{(0,tHe.assert)(r,e)}catch(i){throw Nhe(n,`${t}: ${iHe(i)}.`)}}Wo.assertStruct=oHe;function aHe(r){throw new Error("Invalid branch reached. Should be detected during compilation.")}Wo.assertExhaustive=aHe;var O8={};Object.defineProperty(O8,"__esModule",{value:!0}),O8.base64=void 0;const cHe=t2,lHe=Wo,uHe=(r,e={})=>{var t,n;const i=(t=e.paddingRequired)!==null&&t!==void 0?t:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,lHe.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,cHe.pattern)(r,a)};O8.base64=uHe;var Rn={},D8={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const e=t2,t=Wo;r.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,e.is)(u,r.HexStruct)}r.isHexString=n;function i(u){return(0,e.is)(u,r.StrictHexStruct)}r.isStrictHexString=i;function s(u){(0,t.assert)(n(u),"Value must be a hexadecimal string.")}r.assertIsHexString=s;function o(u){(0,t.assert)(i(u),'Value must be a hexadecimal string, starting with "0x".')}r.assertIsStrictHexString=o;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}r.add0x=a;function l(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}r.remove0x=l})(D8),Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.createDataView=Rn.concatBytes=Rn.valueToBytes=Rn.stringToBytes=Rn.numberToBytes=Rn.signedBigIntToBytes=Rn.bigIntToBytes=Rn.hexToBytes=Rn.bytesToString=Rn.bytesToNumber=Rn.bytesToSignedBigInt=Rn.bytesToBigInt=Rn.bytesToHex=Rn.assertIsBytes=Rn.isBytes=void 0;const Yc=Wo,EL=D8,Phe=48,Ohe=58,Dhe=87;function hHe(){const r=[];return()=>{if(r.length===0)for(let e=0;e<256;e++)r.push(e.toString(16).padStart(2,"0"));return r}}const fHe=hHe();function AL(r){return r instanceof Uint8Array}Rn.isBytes=AL;function Fy(r){(0,Yc.assert)(AL(r),"Value must be a Uint8Array.")}Rn.assertIsBytes=Fy;function $he(r){if(Fy(r),r.length===0)return"0x";const e=fHe(),t=new Array(r.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const e=r.toString(16);return AI(e)}Rn.bigIntToBytes=Lhe;function mHe(r,e){(0,Yc.assert)(e>0);const t=r>>BigInt(31);return!((~r&t)+(r&~t)>>BigInt(e*8+-1))}function bHe(r,e){(0,Yc.assert)(typeof r=="bigint","Value must be a bigint."),(0,Yc.assert)(typeof e=="number","Byte length must be a number."),(0,Yc.assert)(e>0,"Byte length must be greater than 0."),(0,Yc.assert)(mHe(r,e),"Byte length is too small to represent the given value.");let t=r;const n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}Rn.signedBigIntToBytes=bHe;function Uhe(r){(0,Yc.assert)(typeof r=="number","Value must be a number."),(0,Yc.assert)(r>=0,"Value must be a non-negative number."),(0,Yc.assert)(Number.isSafeInteger(r),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=r.toString(16);return AI(e)}Rn.numberToBytes=Uhe;function Fhe(r){return(0,Yc.assert)(typeof r=="string","Value must be a string."),new TextEncoder().encode(r)}Rn.stringToBytes=Fhe;function jhe(r){if(typeof r=="bigint")return Lhe(r);if(typeof r=="number")return Uhe(r);if(typeof r=="string")return r.startsWith("0x")?AI(r):Fhe(r);if(AL(r))return r;throw new TypeError(`Unsupported value type: "${typeof r}".`)}Rn.valueToBytes=jhe;function wHe(r){const e=new Array(r.length);let t=0;for(let i=0;ie.call(t,n,i,this))}get(e){return Ua(this,th,"f").get(e)}has(e){return Ua(this,th,"f").has(e)}keys(){return Ua(this,th,"f").keys()}values(){return Ua(this,th,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,t])=>`${String(e)} => ${String(t)}`).join(", ")} `:""}}`}}jy.FrozenMap=CL;class SL{constructor(e){Cf.set(this,void 0),Whe(this,Cf,new Set(e),"f"),Object.freeze(this)}get size(){return Ua(this,Cf,"f").size}[(Cf=new WeakMap,Symbol.iterator)](){return Ua(this,Cf,"f")[Symbol.iterator]()}entries(){return Ua(this,Cf,"f").entries()}forEach(e,t){return Ua(this,Cf,"f").forEach((n,i,s)=>e.call(t,n,i,this))}has(e){return Ua(this,Cf,"f").has(e)}keys(){return Ua(this,Cf,"f").keys()}values(){return Ua(this,Cf,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}jy.FrozenSet=SL,Object.freeze(CL),Object.freeze(CL.prototype),Object.freeze(SL),Object.freeze(SL.prototype);var Vhe={};Object.defineProperty(Vhe,"__esModule",{value:!0});var Ghe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const e=t2,t=Wo,n=()=>(0,e.define)("finite number",z=>(0,e.is)(z,(0,e.number)())&&Number.isFinite(z));r.UnsafeJsonStruct=(0,e.union)([(0,e.literal)(null),(0,e.boolean)(),n(),(0,e.string)(),(0,e.array)((0,e.lazy)(()=>r.UnsafeJsonStruct)),(0,e.record)((0,e.string)(),(0,e.lazy)(()=>r.UnsafeJsonStruct))]),r.JsonStruct=(0,e.define)("Json",(z,G)=>{function $(D,V){const F=[...V.validator(D,G)];return F.length>0?F:!0}try{const D=$(z,r.UnsafeJsonStruct);return D!==!0?D:$(JSON.parse(JSON.stringify(z)),r.UnsafeJsonStruct)}catch(D){return D instanceof RangeError?"Circular reference detected":!1}});function i(z){return(0,e.is)(z,r.JsonStruct)}r.isValidJson=i;function s(z){(0,t.assertStruct)(z,r.JsonStruct,"Invalid JSON value");const G=JSON.stringify(z);return new TextEncoder().encode(G).byteLength}r.getJsonSize=s,r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,e.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),r.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(r.JsonStruct),stack:(0,e.optional)((0,e.string)())}),r.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),r.JsonStruct),(0,e.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,e.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,e.omit)(r.JsonRpcRequestStruct,["id"]);function o(z){return(0,e.is)(z,r.JsonRpcNotificationStruct)}r.isJsonRpcNotification=o;function a(z,G){(0,t.assertStruct)(z,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",G)}r.assertIsJsonRpcNotification=a;function l(z){return(0,e.is)(z,r.JsonRpcRequestStruct)}r.isJsonRpcRequest=l;function u(z,G){(0,t.assertStruct)(z,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",G)}r.assertIsJsonRpcRequest=u,r.PendingJsonRpcResponseStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,e.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]);function h(z){return(0,e.is)(z,r.PendingJsonRpcResponseStruct)}r.isPendingJsonRpcResponse=h;function p(z,G){(0,t.assertStruct)(z,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",G)}r.assertIsPendingJsonRpcResponse=p;function g(z){return(0,e.is)(z,r.JsonRpcResponseStruct)}r.isJsonRpcResponse=g;function w(z,G){(0,t.assertStruct)(z,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",G)}r.assertIsJsonRpcResponse=w;function y(z){return(0,e.is)(z,r.JsonRpcSuccessStruct)}r.isJsonRpcSuccess=y;function C(z,G){(0,t.assertStruct)(z,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",G)}r.assertIsJsonRpcSuccess=C;function T(z){return(0,e.is)(z,r.JsonRpcFailureStruct)}r.isJsonRpcFailure=T;function k(z,G){(0,t.assertStruct)(z,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",G)}r.assertIsJsonRpcFailure=k;function N(z){return(0,e.is)(z,r.JsonRpcErrorStruct)}r.isJsonRpcError=N;function O(z,G){(0,t.assertStruct)(z,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",G)}r.assertIsJsonRpcError=O;function B(z){const{permitEmptyString:G,permitFractions:$,permitNull:D}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},z);return Q=>Boolean(typeof Q=="number"&&($||Number.isInteger(Q))||typeof Q=="string"&&(G||Q.length>0)||D&&Q===null)}r.getJsonRpcIdValidator=B})(Ghe);var Khe={};Object.defineProperty(Khe,"__esModule",{value:!0});var zy={},II={},kHe={get exports(){return II},set exports(r){II=r}},IL,Zhe;function MHe(){if(Zhe)return IL;Zhe=1;var r=1e3,e=r*60,t=e*60,n=t*24,i=n*7,s=n*365.25;IL=function(h,p){p=p||{};var g=typeof h;if(g==="string"&&h.length>0)return o(h);if(g==="number"&&isFinite(h))return p.long?l(h):a(h);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(h))};function o(h){if(h=String(h),!(h.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(h);if(p){var g=parseFloat(p[1]),w=(p[2]||"ms").toLowerCase();switch(w){case"years":case"year":case"yrs":case"yr":case"y":return g*s;case"weeks":case"week":case"w":return g*i;case"days":case"day":case"d":return g*n;case"hours":case"hour":case"hrs":case"hr":case"h":return g*t;case"minutes":case"minute":case"mins":case"min":case"m":return g*e;case"seconds":case"second":case"secs":case"sec":case"s":return g*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function a(h){var p=Math.abs(h);return p>=n?Math.round(h/n)+"d":p>=t?Math.round(h/t)+"h":p>=e?Math.round(h/e)+"m":p>=r?Math.round(h/r)+"s":h+"ms"}function l(h){var p=Math.abs(h);return p>=n?u(h,p,n,"day"):p>=t?u(h,p,t,"hour"):p>=e?u(h,p,e,"minute"):p>=r?u(h,p,r,"second"):h+" ms"}function u(h,p,g,w){var y=p>=g*1.5;return Math.round(h/g)+" "+w+(y?"s":"")}return IL}function NHe(r){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=i,t.enabled=o,t.humanize=MHe(),t.destroy=u,Object.keys(r).forEach(h=>{t[h]=r[h]}),t.names=[],t.skips=[],t.formatters={};function e(h){let p=0;for(let g=0;g{if(G==="%%")return"%";B++;const D=t.formatters[$];if(typeof D=="function"){const V=T[B];G=D.call(k,V),T.splice(B,1),B--}return G}),t.formatArgs.call(k,T),(k.log||t.log).apply(k,T)}return C.namespace=h,C.useColors=t.useColors(),C.color=t.selectColor(h),C.extend=n,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==t.namespaces&&(w=t.namespaces,y=t.enabled(h)),y),set:T=>{g=T}}),typeof t.init=="function"&&t.init(C),C}function n(h,p){const g=t(this.namespace+(typeof p>"u"?":":p)+h);return g.log=this.log,g}function i(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];let p;const g=(typeof h=="string"?h:"").split(/[\s,]+/),w=g.length;for(p=0;p"-"+p)].join(",");return t.enable(""),h}function o(h){if(h[h.length-1]==="*")return!0;let p,g;for(p=0,g=t.skips.length;p{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;l.splice(1,0,u,"color: inherit");let h=0,p=0;l[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(h++,g==="%c"&&(p=h))}),l.splice(p,0,u)}e.log=console.debug||console.log||(()=>{});function i(l){try{l?e.storage.setItem("debug",l):e.storage.removeItem("debug")}catch{}}function s(){let l;try{l=e.storage.getItem("debug")}catch{}return!l&&typeof yt<"u"&&"env"in yt&&(l=yt.env.DEBUG),l}function o(){try{return localStorage}catch{}}r.exports=PHe(e);const{formatters:a}=r.exports;a.j=function(l){try{return JSON.stringify(l)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(kHe,II);var OHe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zy,"__esModule",{value:!0}),zy.createModuleLogger=zy.createProjectLogger=void 0;const DHe=(0,OHe(II).default)("metamask");function $He(r){return DHe.extend(r)}zy.createProjectLogger=$He;function BHe(r,e){return r.extend(e)}zy.createModuleLogger=BHe;var Jhe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0;function e(u){return Array.isArray(u)&&u.length>0}r.isNonEmptyArray=e;function t(u){return u==null}r.isNullOrUndefined=t;function n(u){return Boolean(u)&&typeof u=="object"&&!Array.isArray(u)}r.isObject=n;const i=(u,h)=>Object.hasOwnProperty.call(u,h);r.hasProperty=i,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(u){if(typeof u!="object"||u===null)return!1;try{let h=u;for(;Object.getPrototypeOf(h)!==null;)h=Object.getPrototypeOf(h);return Object.getPrototypeOf(u)===h}catch{return!1}}r.isPlainObject=s;function o(u){return u.charCodeAt(0)<=127}r.isASCII=o;function a(u){var h;return u.split("").reduce((g,w)=>o(w)?g+1:g+2,0)+((h=u.match(r.ESCAPE_CHARACTERS_REGEXP))!==null&&h!==void 0?h:[]).length}r.calculateStringSize=a;function l(u){return u.toString().length}r.calculateNumberSize=l})(Jhe);var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.hexToBigInt=Sf.hexToNumber=Sf.bigIntToHex=Sf.numberToHex=void 0;const Hy=Wo,$8=D8,LHe=r=>((0,Hy.assert)(typeof r=="number","Value must be a number."),(0,Hy.assert)(r>=0,"Value must be a non-negative number."),(0,Hy.assert)(Number.isSafeInteger(r),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,$8.add0x)(r.toString(16)));Sf.numberToHex=LHe;const UHe=r=>((0,Hy.assert)(typeof r=="bigint","Value must be a bigint."),(0,Hy.assert)(r>=0,"Value must be a non-negative bigint."),(0,$8.add0x)(r.toString(16)));Sf.bigIntToHex=UHe;const FHe=r=>{(0,$8.assertIsHexString)(r);const e=parseInt(r,16);return(0,Hy.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};Sf.hexToNumber=FHe;const jHe=r=>((0,$8.assertIsHexString)(r),BigInt((0,$8.add0x)(r)));Sf.hexToBigInt=jHe;var Yhe={};Object.defineProperty(Yhe,"__esModule",{value:!0});var Qhe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(r.Duration||(r.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,t=(s,o)=>{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return t(s,"count"),s*o}r.inMilliseconds=n;function i(s){return t(s,"timestamp"),Date.now()-s}r.timeSince=i})(Qhe);var Xhe={};Object.defineProperty(Xhe,"__esModule",{value:!0});var efe={},y1={},zHe={get exports(){return y1},set exports(r){y1=r}};const HHe="2.0.0",tfe=256,qHe=Number.MAX_SAFE_INTEGER||9007199254740991,WHe=16,VHe=tfe-6;var TI={MAX_LENGTH:tfe,MAX_SAFE_COMPONENT_LENGTH:WHe,MAX_SAFE_BUILD_LENGTH:VHe,MAX_SAFE_INTEGER:qHe,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:HHe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},RI=typeof yt=="object"&&yt.env&&yt.env.NODE_DEBUG&&/\bsemver\b/i.test(yt.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};(function(r,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=TI,s=RI;e=r.exports={};const o=e.re=[],a=e.safeRe=[],l=e.src=[],u=e.t={};let h=0;const p="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",i],[p,n]],w=C=>{for(const[T,k]of g)C=C.split(`${T}*`).join(`${T}{0,${k}}`).split(`${T}+`).join(`${T}{1,${k}}`);return C},y=(C,T,k)=>{const N=w(T),O=h++;s(C,O,T),u[C]=O,l[O]=T,o[O]=new RegExp(T,k?"g":void 0),a[O]=new RegExp(N,k?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),y("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),y("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${p}+`),y("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),y("FULL",`^${l[u.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),y("LOOSE",`^${l[u.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),y("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),y("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",l[u.COERCE],!0),y("COERCERTLFULL",l[u.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",y("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",y("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(zHe,y1);const GHe=Object.freeze({loose:!0}),KHe=Object.freeze({});var TL=r=>r?typeof r!="object"?GHe:r:KHe;const rfe=/^[0-9]+$/,nfe=(r,e)=>{const t=rfe.test(r),n=rfe.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:rnfe(e,r)};const kI=RI,{MAX_LENGTH:sfe,MAX_SAFE_INTEGER:MI}=TI,{safeRe:ofe,t:afe}=y1,ZHe=TL,{compareIdentifiers:qy}=ife;let If=class{constructor(e,t){if(t=ZHe(t),e instanceof If){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>sfe)throw new TypeError(`version is longer than ${sfe} characters`);kI("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?ofe[afe.LOOSE]:ofe[afe.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>MI||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MI||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MI||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];n===!1&&(s=[t]),qy(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Fa=If;const cfe=Fa;var Wy=(r,e,t=!1)=>{if(r instanceof cfe)return r;try{return new cfe(r,e)}catch(n){if(!t)return null;throw n}};const JHe=Wy;var YHe=(r,e)=>{const t=JHe(r,e);return t?t.version:null};const QHe=Wy;var XHe=(r,e)=>{const t=QHe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};const lfe=Fa;var eqe=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new lfe(r instanceof lfe?r.version:r,t).inc(e,n,i).version}catch{return null}};const ufe=Wy;var tqe=(r,e)=>{const t=ufe(r,null,!0),n=ufe(e,null,!0),i=t.compare(n);if(i===0)return null;const s=i>0,o=s?t:n,a=s?n:t,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const h=l?"pre":"";return t.major!==n.major?h+"major":t.minor!==n.minor?h+"minor":t.patch!==n.patch?h+"patch":"prerelease"};const rqe=Fa;var nqe=(r,e)=>new rqe(r,e).major;const iqe=Fa;var sqe=(r,e)=>new iqe(r,e).minor;const oqe=Fa;var aqe=(r,e)=>new oqe(r,e).patch;const cqe=Wy;var lqe=(r,e)=>{const t=cqe(r,e);return t&&t.prerelease.length?t.prerelease:null};const hfe=Fa;var rh=(r,e,t)=>new hfe(r,t).compare(new hfe(e,t));const uqe=rh;var hqe=(r,e,t)=>uqe(e,r,t);const fqe=rh;var dqe=(r,e)=>fqe(r,e,!0);const ffe=Fa;var RL=(r,e,t)=>{const n=new ffe(r,t),i=new ffe(e,t);return n.compare(i)||n.compareBuild(i)};const pqe=RL;var gqe=(r,e)=>r.sort((t,n)=>pqe(t,n,e));const mqe=RL;var bqe=(r,e)=>r.sort((t,n)=>mqe(n,t,e));const wqe=rh;var NI=(r,e,t)=>wqe(r,e,t)>0;const vqe=rh;var kL=(r,e,t)=>vqe(r,e,t)<0;const yqe=rh;var dfe=(r,e,t)=>yqe(r,e,t)===0;const xqe=rh;var pfe=(r,e,t)=>xqe(r,e,t)!==0;const _qe=rh;var ML=(r,e,t)=>_qe(r,e,t)>=0;const Eqe=rh;var NL=(r,e,t)=>Eqe(r,e,t)<=0;const Aqe=dfe,Cqe=pfe,Sqe=NI,Iqe=ML,Tqe=kL,Rqe=NL;var gfe=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Aqe(r,t,n);case"!=":return Cqe(r,t,n);case">":return Sqe(r,t,n);case">=":return Iqe(r,t,n);case"<":return Tqe(r,t,n);case"<=":return Rqe(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};const kqe=Fa,Mqe=Wy,{safeRe:PI,t:OI}=y1;var Nqe=(r,e)=>{if(r instanceof kqe)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?PI[OI.COERCEFULL]:PI[OI.COERCE]);else{const l=e.includePrerelease?PI[OI.COERCERTLFULL]:PI[OI.COERCERTL];let u;for(;(u=l.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||u.index+u[0].length!==t.index+t[0].length)&&(t=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(t===null)return null;const n=t[2],i=t[3]||"0",s=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Mqe(`${n}.${i}.${s}${o}${a}`,e)},PL,mfe;function Pqe(){return mfe||(mfe=1,PL=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),PL}var Oqe=Un;Un.Node=r2,Un.create=Un;function Un(r){var e=this;if(e instanceof Un||(e=new Un),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var t=0,n=arguments.length;t1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)t=r(t,n.value,i),n=n.next;return t},Un.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)t=r(t,n.value,i),n=n.prev;return t},Un.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r},Un.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r},Un.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Un;if(ethis.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&nthis.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>r;n--,i=i.prev)t.push(i.value);return t},Un.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,i=this.head;i!==null&&n1;class Uqe{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[n2]=e.max||1/0;const t=e.length||OL;if(this[Vy]=typeof t!="function"?OL:t,this[B8]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[i2]=e.maxAge||0,this[r0]=e.dispose,this[bfe]=e.noDisposeOnSet||!1,this[wfe]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[n2]=e||1/0,L8(this)}get max(){return this[n2]}set allowStale(e){this[B8]=!!e}get allowStale(){return this[B8]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[i2]=e,L8(this)}get maxAge(){return this[i2]}set lengthCalculator(e){typeof e!="function"&&(e=OL),e!==this[Vy]&&(this[Vy]=e,this[t0]=0,this[Io].forEach(t=>{t.length=this[Vy](t.value,t.key),this[t0]+=t.length})),L8(this)}get lengthCalculator(){return this[Vy]}get length(){return this[t0]}get itemCount(){return this[Io].length}rforEach(e,t){t=t||this;for(let n=this[Io].tail;n!==null;){const i=n.prev;vfe(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[Io].head;n!==null;){const i=n.next;vfe(this,e,n,t),n=i}}keys(){return this[Io].toArray().map(e=>e.key)}values(){return this[Io].toArray().map(e=>e.value)}reset(){this[r0]&&this[Io]&&this[Io].length&&this[Io].forEach(e=>this[r0](e.key,e.value)),this[nh]=new Map,this[Io]=new Lqe,this[t0]=0}dump(){return this[Io].map(e=>DI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Io]}set(e,t,n){if(n=n||this[i2],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[Vy](t,e);if(this[nh].has(e)){if(s>this[n2])return Gy(this,this[nh].get(e)),!1;const l=this[nh].get(e).value;return this[r0]&&(this[bfe]||this[r0](e,l.value)),l.now=i,l.maxAge=n,l.value=t,this[t0]+=s-l.length,l.length=s,this.get(e),L8(this),!0}const o=new Fqe(e,t,s,i,n);return o.length>this[n2]?(this[r0]&&this[r0](e,t),!1):(this[t0]+=o.length,this[Io].unshift(o),this[nh].set(e,this[Io].head),L8(this),!0)}has(e){if(!this[nh].has(e))return!1;const t=this[nh].get(e).value;return!DI(this,t)}get(e){return DL(this,e,!0)}peek(e){return DL(this,e,!1)}pop(){const e=this[Io].tail;return e?(Gy(this,e),e.value):null}del(e){Gy(this,this[nh].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-t;o>0&&this.set(i.k,i.v,o)}}}prune(){this[nh].forEach((e,t)=>DL(this,t,!1))}}const DL=(r,e,t)=>{const n=r[nh].get(e);if(n){const i=n.value;if(DI(r,i)){if(Gy(r,n),!r[B8])return}else t&&(r[wfe]&&(n.value.now=Date.now()),r[Io].unshiftNode(n));return i.value}},DI=(r,e)=>{if(!e||!e.maxAge&&!r[i2])return!1;const t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[i2]&&t>r[i2]},L8=r=>{if(r[t0]>r[n2])for(let e=r[Io].tail;r[t0]>r[n2]&&e!==null;){const t=e.prev;Gy(r,e),e=t}},Gy=(r,e)=>{if(e){const t=e.value;r[r0]&&r[r0](t.key,t.value),r[t0]-=t.length,r[nh].delete(t.key),r[Io].removeNode(e)}};class Fqe{constructor(e,t,n,i,s){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=s||0}}const vfe=(r,e,t,n)=>{let i=t.value;DI(r,i)&&(Gy(r,t),r[B8]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};var jqe=Uqe,$L,yfe;function ih(){if(yfe)return $L;yfe=1;class r{constructor(d,m){if(m=n(m),d instanceof r)return d.loose===!!m.loose&&d.includePrerelease===!!m.includePrerelease?d:new r(d.raw,m);if(d instanceof i)return this.raw=d.value,this.set=[[d]],this.format(),this;if(this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease,this.raw=d.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(x=>this.parseRange(x.trim())).filter(x=>x.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const x=this.set[0];if(this.set=this.set.filter(A=>!y(A[0])),this.set.length===0)this.set=[x];else if(this.set.length>1){for(const A of this.set)if(A.length===1&&C(A[0])){this.set=[A];break}}}this.format()}format(){return this.range=this.set.map(d=>d.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(d){const x=((this.options.includePrerelease&&g)|(this.options.loose&&w))+":"+d,A=t.get(x);if(A)return A;const I=this.options.loose,R=I?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];d=d.replace(R,F(this.options.includePrerelease)),s("hyphen replace",d),d=d.replace(a[l.COMPARATORTRIM],u),s("comparator trim",d),d=d.replace(a[l.TILDETRIM],h),s("tilde trim",d),d=d.replace(a[l.CARETTRIM],p),s("caret trim",d);let S=d.split(" ").map(ie=>k(ie,this.options)).join(" ").split(/\s+/).map(ie=>Q(ie,this.options));I&&(S=S.filter(ie=>(s("loose invalid filter",ie,this.options),!!ie.match(a[l.COMPARATORLOOSE])))),s("range list",S);const E=new Map,_=S.map(ie=>new i(ie,this.options));for(const ie of _){if(y(ie))return[ie];E.set(ie.value,ie)}E.size>1&&E.has("")&&E.delete("");const L=[...E.values()];return t.set(x,L),L}intersects(d,m){if(!(d instanceof r))throw new TypeError("a Range is required");return this.set.some(x=>T(x,m)&&d.set.some(A=>T(A,m)&&x.every(I=>A.every(R=>I.intersects(R,m)))))}test(d){if(!d)return!1;if(typeof d=="string")try{d=new o(d,this.options)}catch{return!1}for(let m=0;mb.value==="<0.0.0-0",C=b=>b.value==="",T=(b,d)=>{let m=!0;const x=b.slice();let A=x.pop();for(;m&&x.length;)m=x.every(I=>A.intersects(I,d)),A=x.pop();return m},k=(b,d)=>(s("comp",b,d),b=z(b,d),s("caret",b),b=O(b,d),s("tildes",b),b=$(b,d),s("xrange",b),b=V(b,d),s("stars",b),b),N=b=>!b||b.toLowerCase()==="x"||b==="*",O=(b,d)=>b.trim().split(/\s+/).map(m=>B(m,d)).join(" "),B=(b,d)=>{const m=d.loose?a[l.TILDELOOSE]:a[l.TILDE];return b.replace(m,(x,A,I,R,S)=>{s("tilde",b,x,A,I,R,S);let E;return N(A)?E="":N(I)?E=`>=${A}.0.0 <${+A+1}.0.0-0`:N(R)?E=`>=${A}.${I}.0 <${A}.${+I+1}.0-0`:S?(s("replaceTilde pr",S),E=`>=${A}.${I}.${R}-${S} <${A}.${+I+1}.0-0`):E=`>=${A}.${I}.${R} <${A}.${+I+1}.0-0`,s("tilde return",E),E})},z=(b,d)=>b.trim().split(/\s+/).map(m=>G(m,d)).join(" "),G=(b,d)=>{s("caret",b,d);const m=d.loose?a[l.CARETLOOSE]:a[l.CARET],x=d.includePrerelease?"-0":"";return b.replace(m,(A,I,R,S,E)=>{s("caret",b,A,I,R,S,E);let _;return N(I)?_="":N(R)?_=`>=${I}.0.0${x} <${+I+1}.0.0-0`:N(S)?I==="0"?_=`>=${I}.${R}.0${x} <${I}.${+R+1}.0-0`:_=`>=${I}.${R}.0${x} <${+I+1}.0.0-0`:E?(s("replaceCaret pr",E),I==="0"?R==="0"?_=`>=${I}.${R}.${S}-${E} <${I}.${R}.${+S+1}-0`:_=`>=${I}.${R}.${S}-${E} <${I}.${+R+1}.0-0`:_=`>=${I}.${R}.${S}-${E} <${+I+1}.0.0-0`):(s("no pr"),I==="0"?R==="0"?_=`>=${I}.${R}.${S}${x} <${I}.${R}.${+S+1}-0`:_=`>=${I}.${R}.${S}${x} <${I}.${+R+1}.0-0`:_=`>=${I}.${R}.${S} <${+I+1}.0.0-0`),s("caret return",_),_})},$=(b,d)=>(s("replaceXRanges",b,d),b.split(/\s+/).map(m=>D(m,d)).join(" ")),D=(b,d)=>{b=b.trim();const m=d.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return b.replace(m,(x,A,I,R,S,E)=>{s("xRange",b,x,A,I,R,S,E);const _=N(I),L=_||N(R),ie=L||N(S),q=ie;return A==="="&&q&&(A=""),E=d.includePrerelease?"-0":"",_?A===">"||A==="<"?x="<0.0.0-0":x="*":A&&q?(L&&(R=0),S=0,A===">"?(A=">=",L?(I=+I+1,R=0,S=0):(R=+R+1,S=0)):A==="<="&&(A="<",L?I=+I+1:R=+R+1),A==="<"&&(E="-0"),x=`${A+I}.${R}.${S}${E}`):L?x=`>=${I}.0.0${E} <${+I+1}.0.0-0`:ie&&(x=`>=${I}.${R}.0${E} <${I}.${+R+1}.0-0`),s("xRange return",x),x})},V=(b,d)=>(s("replaceStars",b,d),b.trim().replace(a[l.STAR],"")),Q=(b,d)=>(s("replaceGTE0",b,d),b.trim().replace(a[d.includePrerelease?l.GTE0PRE:l.GTE0],"")),F=b=>(d,m,x,A,I,R,S,E,_,L,ie,q,Y)=>(N(x)?m="":N(A)?m=`>=${x}.0.0${b?"-0":""}`:N(I)?m=`>=${x}.${A}.0${b?"-0":""}`:R?m=`>=${m}`:m=`>=${m}${b?"-0":""}`,N(_)?E="":N(L)?E=`<${+_+1}.0.0-0`:N(ie)?E=`<${_}.${+L+1}.0-0`:q?E=`<=${_}.${L}.${ie}-${q}`:b?E=`<${_}.${L}.${+ie+1}-0`:E=`<=${E}`,`${m} ${E}`.trim()),M=(b,d,m)=>{for(let x=0;x0){const A=b[x].semver;if(A.major===d.major&&A.minor===d.minor&&A.patch===d.patch)return!0}return!1}return!0};return $L}var BL,xfe;function $I(){if(xfe)return BL;xfe=1;const r=Symbol("SemVer ANY");class e{static get ANY(){return r}constructor(h,p){if(p=t(p),h instanceof e){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),o("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===r?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(h){const p=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],g=h.match(p);if(!g)throw new TypeError(`Invalid comparator: ${h}`);this.operator=g[1]!==void 0?g[1]:"",this.operator==="="&&(this.operator=""),g[2]?this.semver=new a(g[2],this.options.loose):this.semver=r}toString(){return this.value}test(h){if(o("Comparator.test",h,this.options.loose),this.semver===r||h===r)return!0;if(typeof h=="string")try{h=new a(h,this.options)}catch{return!1}return s(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new l(this.value,p).test(h.semver):(p=t(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||s(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||s(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}BL=e;const t=TL,{safeRe:n,t:i}=y1,s=gfe,o=RI,a=Fa,l=ih();return BL}const zqe=ih();var BI=(r,e,t)=>{try{e=new zqe(e,t)}catch{return!1}return e.test(r)};const Hqe=ih();var qqe=(r,e)=>new Hqe(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));const Wqe=Fa,Vqe=ih();var Gqe=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Vqe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Wqe(n,t))}),n};const Kqe=Fa,Zqe=ih();var Jqe=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Zqe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Kqe(n,t))}),n};const LL=Fa,Yqe=ih(),_fe=NI;var Qqe=(r,e)=>{r=new Yqe(r,e);let t=new LL("0.0.0");if(r.test(t)||(t=new LL("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n{const a=new LL(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||_fe(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||_fe(t,s))&&(t=s)}return t&&r.test(t)?t:null};const Xqe=ih();var eWe=(r,e)=>{try{return new Xqe(r,e).range||"*"}catch{return null}};const tWe=Fa,Efe=$I(),{ANY:rWe}=Efe,nWe=ih(),iWe=BI,Afe=NI,Cfe=kL,sWe=NL,oWe=ML;var UL=(r,e,t,n)=>{r=new tWe(r,n),e=new nWe(e,n);let i,s,o,a,l;switch(t){case">":i=Afe,s=sWe,o=Cfe,a=">",l=">=";break;case"<":i=Cfe,s=oWe,o=Afe,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(iWe(r,e,n))return!1;for(let u=0;u{w.semver===rWe&&(w=new Efe(">=0.0.0")),p=p||w,g=g||w,i(w.semver,p.semver,n)?p=w:o(w.semver,g.semver,n)&&(g=w)}),p.operator===a||p.operator===l||(!g.operator||g.operator===a)&&s(r,g.semver))return!1;if(g.operator===l&&o(r,g.semver))return!1}return!0};const aWe=UL;var cWe=(r,e,t)=>aWe(r,e,">",t);const lWe=UL;var uWe=(r,e,t)=>lWe(r,e,"<",t);const Sfe=ih();var hWe=(r,e,t)=>(r=new Sfe(r,t),e=new Sfe(e,t),r.intersects(e,t));const fWe=BI,dWe=rh;var pWe=(r,e,t)=>{const n=[];let i=null,s=null;const o=r.sort((h,p)=>dWe(h,p,t));for(const h of o)fWe(h,e,t)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[h,p]of n)h===p?a.push(h):!p&&h===o[0]?a.push("*"):p?h===o[0]?a.push(`<=${p}`):a.push(`${h} - ${p}`):a.push(`>=${h}`);const l=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{if(r===e)return!0;r=new Ife(r,t),e=new Ife(e,t);let n=!1;e:for(const i of r.set){for(const s of e.set){const o=bWe(i,s,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},mWe=[new FL(">=0.0.0-0")],Tfe=[new FL(">=0.0.0")],bWe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===jL){if(e.length===1&&e[0].semver===jL)return!0;t.includePrerelease?r=mWe:r=Tfe}if(e.length===1&&e[0].semver===jL){if(t.includePrerelease)return!0;e=Tfe}const n=new Set;let i,s;for(const w of r)w.operator===">"||w.operator===">="?i=Rfe(i,w,t):w.operator==="<"||w.operator==="<="?s=kfe(s,w,t):n.add(w.semver);if(n.size>1)return null;let o;if(i&&s){if(o=zL(i.semver,s.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const w of n){if(i&&!U8(w,String(i),t)||s&&!U8(w,String(s),t))return null;for(const y of e)if(!U8(w,String(y),t))return!1;return!0}let a,l,u,h,p=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,g=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const w of e){if(h=h||w.operator===">"||w.operator===">=",u=u||w.operator==="<"||w.operator==="<=",i){if(g&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===g.major&&w.semver.minor===g.minor&&w.semver.patch===g.patch&&(g=!1),w.operator===">"||w.operator===">="){if(a=Rfe(i,w,t),a===w&&a!==i)return!1}else if(i.operator===">="&&!U8(i.semver,String(w),t))return!1}if(s){if(p&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===p.major&&w.semver.minor===p.minor&&w.semver.patch===p.patch&&(p=!1),w.operator==="<"||w.operator==="<="){if(l=kfe(s,w,t),l===w&&l!==s)return!1}else if(s.operator==="<="&&!U8(s.semver,String(w),t))return!1}if(!w.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&h&&!i&&o!==0||g||p)},Rfe=(r,e,t)=>{if(!r)return e;const n=zL(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},kfe=(r,e,t)=>{if(!r)return e;const n=zL(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};var wWe=gWe;const HL=y1,Mfe=TI,vWe=Fa,Nfe=ife,yWe=Wy,xWe=YHe,_We=XHe,EWe=eqe,AWe=tqe,CWe=nqe,SWe=sqe,IWe=aqe,TWe=lqe,RWe=rh,kWe=hqe,MWe=dqe,NWe=RL,PWe=gqe,OWe=bqe,DWe=NI,$We=kL,BWe=dfe,LWe=pfe,UWe=ML,FWe=NL,jWe=gfe,zWe=Nqe,HWe=$I(),qWe=ih();var WWe={parse:yWe,valid:xWe,clean:_We,inc:EWe,diff:AWe,major:CWe,minor:SWe,patch:IWe,prerelease:TWe,compare:RWe,rcompare:kWe,compareLoose:MWe,compareBuild:NWe,sort:PWe,rsort:OWe,gt:DWe,lt:$We,eq:BWe,neq:LWe,gte:UWe,lte:FWe,cmp:jWe,coerce:zWe,Comparator:HWe,Range:qWe,satisfies:BI,toComparators:qqe,maxSatisfying:Gqe,minSatisfying:Jqe,minVersion:Qqe,validRange:eWe,outside:UL,gtr:cWe,ltr:uWe,intersects:hWe,simplifyRange:pWe,subset:wWe,SemVer:vWe,re:HL.re,src:HL.src,tokens:HL.t,SEMVER_SPEC_VERSION:Mfe.SEMVER_SPEC_VERSION,RELEASE_TYPES:Mfe.RELEASE_TYPES,compareIdentifiers:Nfe.compareIdentifiers,rcompareIdentifiers:Nfe.rcompareIdentifiers};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const e=WWe,t=t2,n=Wo;r.VersionStruct=(0,t.refine)((0,t.string)(),"Version",p=>(0,e.valid)(p)===null?`Expected SemVer version, got "${p}"`:!0),r.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",p=>(0,e.validRange)(p)===null?`Expected SemVer range, got "${p}"`:!0);function i(p){return(0,t.is)(p,r.VersionStruct)}r.isValidSemVerVersion=i;function s(p){return(0,t.is)(p,r.VersionRangeStruct)}r.isValidSemVerRange=s;function o(p){(0,n.assertStruct)(p,r.VersionStruct)}r.assertIsSemVerVersion=o;function a(p){(0,n.assertStruct)(p,r.VersionRangeStruct)}r.assertIsSemVerRange=a;function l(p,g){return(0,e.gt)(p,g)}r.gtVersion=l;function u(p,g){return(0,e.gtr)(p,g)}r.gtRange=u;function h(p,g){return(0,e.satisfies)(p,g,{includePrerelease:!0})}r.satisfiesVersionRange=h})(efe),function(r){var e=ct&&ct.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),t=ct&&ct.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(Wo,r),t(O8,r),t(Rn,r),t(CI,r),t(Af,r),t(jy,r),t(Vhe,r),t(D8,r),t(Ghe,r),t(Khe,r),t(zy,r),t(Jhe,r),t(Sf,r),t(Yhe,r),t(Qhe,r),t(Xhe,r),t(efe,r)}(_he),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const e=_he;Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),r.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")}(xhe);var Pfe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(EI,"__esModule",{value:!0}),EI.PollingBlockTracker=void 0;const VWe=Pfe(mL),GWe=Pfe(cze),KWe=k8,Ofe=xhe,Dfe=(0,Ofe.createModuleLogger)(Ofe.projectLogger,"polling-block-tracker"),ZWe=(0,VWe.default)(),JWe=1e3;class YWe extends KWe.BaseBlockTracker{constructor(e={}){var t;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:(t=e.blockResetDuration)!==null&&t!==void 0?t:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*JWe,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const t=$fe(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await t}catch(t){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: -${(e=t.stack)!==null&&e!==void 0?e:t}`);try{this.emit("error",n)}catch{console.error(n)}const i=$fe(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:ZWe(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),Dfe("Making request",e);const t=await(0,GWe.default)(n=>this._provider.sendAsync(e,n))();if(Dfe("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block: -${t.error.message}`);return t.result}}EI.PollingBlockTracker=YWe;function $fe(r,e){return new Promise(t=>{const n=setTimeout(t,r);n.unref&&e&&n.unref()})}var LI={},QWe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(LI,"__esModule",{value:!0}),LI.SubscribeBlockTracker=void 0;const XWe=QWe(mL),eVe=k8,tVe=(0,XWe.default)();class rVe extends eVe.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...t){return new Promise((n,i)=>{this._provider.sendAsync({id:tVe(),method:e,params:t,jsonrpc:"2.0"},(s,o)=>{s?i(s):n(o.result)})})}_handleSubData(e,t){var n;t.method==="eth_subscription"&&((n=t.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}LI.SubscribeBlockTracker=rVe,function(r){var e=ct&&ct.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),t=ct&&ct.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(EI,r),t(LI,r)}(mhe);var qL={},UI={},F8={};Object.defineProperty(F8,"__esModule",{value:!0}),F8.getUniqueId=void 0;const Bfe=4294967295;let WL=Math.floor(Math.random()*Bfe);function nVe(){return WL=(WL+1)%Bfe,WL}F8.getUniqueId=nVe,Object.defineProperty(UI,"__esModule",{value:!0}),UI.createIdRemapMiddleware=void 0;const iVe=F8;function sVe(){return(r,e,t,n)=>{const i=r.id,s=iVe.getUniqueId();r.id=s,e.id=s,t(o=>{r.id=i,e.id=i,o()})}}UI.createIdRemapMiddleware=sVe;var FI={};Object.defineProperty(FI,"__esModule",{value:!0}),FI.createAsyncMiddleware=void 0;function oVe(r){return async(e,t,n,i)=>{let s;const o=new Promise(h=>{s=h});let a=null,l=!1;const u=async()=>{l=!0,n(h=>{a=h,s()}),await o};try{await r(e,t,u),l?(await o,a(null)):i(null)}catch(h){a?a(h):i(h)}}}FI.createAsyncMiddleware=oVe;var jI={};Object.defineProperty(jI,"__esModule",{value:!0}),jI.createScaffoldMiddleware=void 0;function aVe(r){return(e,t,n,i)=>{const s=r[e.method];return s===void 0?n():typeof s=="function"?s(e,t,n,i):(t.result=s,i())}}jI.createScaffoldMiddleware=aVe;var j8={},VL={};Object.defineProperty(VL,"__esModule",{value:!0});const cVe=pn;function Lfe(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function lVe(r){const e=r.length,t=new Array(e);for(let n=0;n0&&([o]=t),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")Lfe(s,this,t);else{const o=s.length,a=lVe(s);for(let l=0;l"u"&&(n=jfe()),GL(r,"",0,[],void 0,0,n);var i;try{o2.length===0?i=JSON.stringify(r,e,t):i=JSON.stringify(r,Hfe(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;s2.length!==0;){var s=s2.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Ky(r,e,t,n){var i=Object.getOwnPropertyDescriptor(n,t);i.get!==void 0?i.configurable?(Object.defineProperty(n,t,{value:r}),s2.push([n,t,e,i])):o2.push([e,t,r]):(n[t]=r,s2.push([n,t,e]))}function GL(r,e,t,n,i,s,o){s+=1;var a;if(typeof r=="object"&&r!==null){for(a=0;ao.depthLimit){Ky(zI,r,e,i);return}if(typeof o.edgesLimit<"u"&&t+1>o.edgesLimit){Ky(zI,r,e,i);return}if(n.push(r),Array.isArray(r))for(a=0;ae?1:0}function zfe(r,e,t,n){typeof n>"u"&&(n=jfe());var i=KL(r,"",0,[],void 0,0,n)||r,s;try{o2.length===0?s=JSON.stringify(i,e,t):s=JSON.stringify(i,Hfe(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;s2.length!==0;){var o=s2.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function KL(r,e,t,n,i,s,o){s+=1;var a;if(typeof r=="object"&&r!==null){for(a=0;ao.depthLimit){Ky(zI,r,e,i);return}if(typeof o.edgesLimit<"u"&&t+1>o.edgesLimit){Ky(zI,r,e,i);return}if(n.push(r),Array.isArray(r))for(a=0;a0)for(var n=0;n=1e3&&r<=4999}function mVe(r,e){if(e!=="[Circular]")return e}var ZL={},_1={};Object.defineProperty(_1,"__esModule",{value:!0}),_1.errorValues=_1.errorCodes=void 0,_1.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},_1.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=_1,t=x1,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(g,w=i){if(Number.isInteger(g)){const y=g.toString();if(p(e.errorValues,y))return e.errorValues[y].message;if(u(g))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return w}r.getMessageFromCode=o;function a(g){if(!Number.isInteger(g))return!1;const w=g.toString();return!!(e.errorValues[w]||u(g))}r.isValidCode=a;function l(g,{fallbackError:w=s,shouldIncludeStack:y=!1}={}){var C,T;if(!w||!Number.isInteger(w.code)||typeof w.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(g instanceof t.EthereumRpcError)return g.serialize();const k={};if(g&&typeof g=="object"&&!Array.isArray(g)&&p(g,"code")&&a(g.code)){const O=g;k.code=O.code,O.message&&typeof O.message=="string"?(k.message=O.message,p(O,"data")&&(k.data=O.data)):(k.message=o(k.code),k.data={originalError:h(g)})}else{k.code=w.code;const O=(C=g)===null||C===void 0?void 0:C.message;k.message=O&&typeof O=="string"?O:w.message,k.data={originalError:h(g)}}const N=(T=g)===null||T===void 0?void 0:T.stack;return y&&g&&N&&typeof N=="string"&&(k.stack=N),k}r.serializeError=l;function u(g){return g>=-32099&&g<=-32e3}function h(g){return g&&typeof g=="object"&&!Array.isArray(g)?Object.assign({},g):g}function p(g,w){return Object.prototype.hasOwnProperty.call(g,w)}}(ZL);var HI={};Object.defineProperty(HI,"__esModule",{value:!0}),HI.ethErrors=void 0;const JL=x1,Wfe=ZL,ba=_1;HI.ethErrors={rpc:{parse:r=>iu(ba.errorCodes.rpc.parse,r),invalidRequest:r=>iu(ba.errorCodes.rpc.invalidRequest,r),invalidParams:r=>iu(ba.errorCodes.rpc.invalidParams,r),methodNotFound:r=>iu(ba.errorCodes.rpc.methodNotFound,r),internal:r=>iu(ba.errorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return iu(e,r)},invalidInput:r=>iu(ba.errorCodes.rpc.invalidInput,r),resourceNotFound:r=>iu(ba.errorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>iu(ba.errorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>iu(ba.errorCodes.rpc.transactionRejected,r),methodNotSupported:r=>iu(ba.errorCodes.rpc.methodNotSupported,r),limitExceeded:r=>iu(ba.errorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>H8(ba.errorCodes.provider.userRejectedRequest,r),unauthorized:r=>H8(ba.errorCodes.provider.unauthorized,r),unsupportedMethod:r=>H8(ba.errorCodes.provider.unsupportedMethod,r),disconnected:r=>H8(ba.errorCodes.provider.disconnected,r),chainDisconnected:r=>H8(ba.errorCodes.provider.chainDisconnected,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new JL.EthereumProviderError(e,t,n)}}};function iu(r,e){const[t,n]=Vfe(e);return new JL.EthereumRpcError(r,t||Wfe.getMessageFromCode(r),n)}function H8(r,e){const[t,n]=Vfe(e);return new JL.EthereumProviderError(r,t||Wfe.getMessageFromCode(r),n)}function Vfe(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const e=x1;Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const t=ZL;Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const n=HI;Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=_1;Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Ufe);var bVe=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(j8,"__esModule",{value:!0}),j8.JsonRpcEngine=void 0;const wVe=bVe(VL),su=Ufe;class n0 extends wVe.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&typeof t!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,n,i)=>{try{const[s,o,a]=await n0._runAllMiddleware(e,t,this._middleware);return o?(await n0._runReturnHandlers(a),i(s)):n(async l=>{try{await n0._runReturnHandlers(a)}catch(u){return l(u)}return l()})}catch(s){return i(s)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(n){if(t)return t(n);throw n}}_promiseHandle(e){return new Promise(t=>{this._handle(e,(n,i)=>{t(i)})})}async _handle(e,t){if(!e||Array.isArray(e)||typeof e!="object"){const o=new su.EthereumRpcError(su.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return t(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof e.method!="string"){const o=new su.EthereumRpcError(su.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return t(o,{id:e.id,jsonrpc:"2.0",error:o})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=su.serializeError(s))),t(s,i)}async _processRequest(e,t){const[n,i,s]=await n0._runAllMiddleware(e,t,this._middleware);if(n0._checkForCompletion(e,t,i),await n0._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,t,n){const i=[];let s=null,o=!1;for(const a of n)if([s,o]=await n0._runMiddleware(e,t,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,t,n,i){return new Promise(s=>{const o=l=>{const u=l||t.error;u&&(t.error=su.serializeError(u)),s([u,!0])},a=l=>{t.error?o(t.error):(l&&(typeof l!="function"&&o(new su.EthereumRpcError(su.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof l}" for request: -${YL(e)}`,{request:e})),i.push(l)),s([null,!1]))};try{n(e,t,a,o)}catch(l){o(l)}})}static async _runReturnHandlers(e){for(const t of e)await new Promise((n,i)=>{t(s=>s?i(s):n())})}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new su.EthereumRpcError(su.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: -${YL(e)}`,{request:e});if(!n)throw new su.EthereumRpcError(su.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: -${YL(e)}`,{request:e})}}j8.JsonRpcEngine=n0;function YL(r){return JSON.stringify(r,null,2)}var qI={};Object.defineProperty(qI,"__esModule",{value:!0}),qI.mergeMiddleware=void 0;const vVe=j8;function yVe(r){const e=new vVe.JsonRpcEngine;return r.forEach(t=>e.push(t)),e.asMiddleware()}qI.mergeMiddleware=yVe,function(r){var e=ct&&ct.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),t=ct&&ct.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(UI,r),t(FI,r),t(jI,r),t(F8,r),t(j8,r),t(qI,r)}(qL);var Gfe={},QL={},XL=function(r,e){return XL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},XL(r,e)};function xVe(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");XL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var eU=function(){return eU=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function AVe(r,e){return function(t,n){e(t,n,r)}}function CVe(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function SVe(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{u(n.next(h))}catch(p){o(p)}}function l(h){try{u(n.throw(h))}catch(p){o(p)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((n=n.apply(r,e||[])).next())})}function IVe(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(h){return l([u,h])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kfe(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s}function RVe(){for(var r=[],e=0;e1||a(g,w)})})}function a(g,w){try{l(n[g](w))}catch(y){p(s[0][3],y)}}function l(g){g.value instanceof q8?Promise.resolve(g.value.v).then(u,h):p(s[0][2],g)}function u(g){a("next",g)}function h(g){a("throw",g)}function p(g,w){g(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function PVe(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=r[i]?function(o){return(t=!t)?{value:q8(r[i](o)),done:i==="return"}:s?s(o):o}:s}}function OVe(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof rU=="function"?rU(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}function DVe(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}var $Ve=Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e};function BVe(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&tU(e,r,t);return $Ve(e,r),e}function LVe(r){return r&&r.__esModule?r:{default:r}}function UVe(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}function FVe(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t}function jVe(r,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?e===r:r.has(e)}const nU=ad(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return eU},__asyncDelegator:PVe,__asyncGenerator:NVe,__asyncValues:OVe,__await:q8,__awaiter:SVe,__classPrivateFieldGet:UVe,__classPrivateFieldIn:jVe,__classPrivateFieldSet:FVe,__createBinding:tU,__decorate:EVe,__exportStar:TVe,__extends:xVe,__generator:IVe,__importDefault:LVe,__importStar:BVe,__makeTemplateObject:DVe,__metadata:CVe,__param:AVe,__read:Kfe,__rest:_Ve,__spread:RVe,__spreadArray:MVe,__spreadArrays:kVe,__values:rU},Symbol.toStringTag,{value:"Module"})));var WI={};Object.defineProperty(WI,"__esModule",{value:!0});var Zfe=nU,zVe=function(){function r(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return r.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return t||this._dispatch(),n},r.prototype.runExclusive=function(e){return Zfe.__awaiter(this,void 0,void 0,function(){var t,n,i;return Zfe.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:t=s.sent(),n=t[0],i=t[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},r.prototype.isLocked=function(){return this._value<=0},r.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},r.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},r}();WI.default=zVe,Object.defineProperty(QL,"__esModule",{value:!0});var Jfe=nU,HVe=WI,qVe=function(){function r(){this._semaphore=new HVe.default(1)}return r.prototype.acquire=function(){return Jfe.__awaiter(this,void 0,void 0,function(){var e,t;return Jfe.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),t=e[1],[2,t]}})})},r.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},r.prototype.isLocked=function(){return this._semaphore.isLocked()},r.prototype.release=function(){this._semaphore.release()},r}();QL.default=qVe;var VI={};Object.defineProperty(VI,"__esModule",{value:!0}),VI.withTimeout=void 0;var GI=nU;function WVe(r,e,t){var n=this;return t===void 0&&(t=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return GI.__awaiter(n,void 0,void 0,function(){var o,a,l;return GI.__generator(this,function(u){switch(u.label){case 0:return o=!1,setTimeout(function(){o=!0,s(t)},e),[4,r.acquire()];case 1:return a=u.sent(),o?(l=Array.isArray(a)?a[1]:a,l()):i(a),[2]}})})})},runExclusive:function(i){return GI.__awaiter(this,void 0,void 0,function(){var s,o;return GI.__generator(this,function(a){switch(a.label){case 0:s=function(){},a.label=1;case 1:return a.trys.push([1,,7,8]),[4,this.acquire()];case 2:return o=a.sent(),Array.isArray(o)?(s=o[1],[4,i(o[0])]):[3,4];case 3:return[2,a.sent()];case 4:return s=o,[4,i()];case 5:return[2,a.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){r.release()},isLocked:function(){return r.isLocked()}}}VI.withTimeout=WVe,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.withTimeout=r.Semaphore=r.Mutex=void 0;var e=QL;Object.defineProperty(r,"Mutex",{enumerable:!0,get:function(){return e.default}});var t=WI;Object.defineProperty(r,"Semaphore",{enumerable:!0,get:function(){return t.default}});var n=VI;Object.defineProperty(r,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})}(Gfe);var VVe=KVe,GVe=Object.prototype.hasOwnProperty;function KVe(){for(var r={},e=0;efunction(...i){const s=e.promiseModule;return new s((o,a)=>{e.multiArgs?i.push((...u)=>{e.errorFirst?u[0]?a(u):(u.shift(),o(u)):o(u)}):e.errorFirst?i.push((u,h)=>{u?a(u):o(h)}):i.push(o),Reflect.apply(r,this===t?n:this,i)})},Qfe=new WeakMap;var XVe=(r,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const t=typeof r;if(!(r!==null&&(t==="object"||t==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${r===null?"null":t}\``);const n=(o,a)=>{let l=Qfe.get(o);if(l||(l={},Qfe.set(o,l)),a in l)return l[a];const u=y=>typeof y=="string"||typeof a=="symbol"?a===y:y.test(a),h=Reflect.getOwnPropertyDescriptor(o,a),p=h===void 0||h.writable||h.configurable,w=(e.include?e.include.some(u):!e.exclude.some(u))&&p;return l[a]=w,w},i=new WeakMap,s=new Proxy(r,{apply(o,a,l){const u=i.get(o);if(u)return Reflect.apply(u,a,l);const h=e.excludeMain?o:Yfe(o,e,s,o);return i.set(o,h),Reflect.apply(h,a,l)},get(o,a){const l=o[a];if(!n(o,a)||l===Function.prototype[a])return l;const u=i.get(l);if(u)return u;if(typeof l=="function"){const h=Yfe(l,e,s,o);return i.set(l,h),h}return l}});return s};const eGe=M8.default;var iU=class extends eGe{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(t=>this.emit("update",t))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}};const tGe=iU;var rGe=class extends tGe{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}},V8={minBlockRef:nGe,maxBlockRef:iGe,sortBlockRefs:sU,bnToHex:sGe,blockRefIsNumber:oGe,hexToInt:KI,incrementHexInt:aGe,intToHex:Xfe,unsafeRandomBytes:cGe};function nGe(...r){return sU(r)[0]}function iGe(...r){const e=sU(r);return e[e.length-1]}function sU(r){return r.sort((e,t)=>e==="latest"||t==="earliest"?1:t==="latest"||e==="earliest"?-1:KI(e)-KI(t))}function sGe(r){return"0x"+r.toString(16)}function oGe(r){return r&&!["earliest","latest","pending"].includes(r)}function KI(r){return r==null?r:Number.parseInt(r,16)}function aGe(r){if(r==null)return r;const e=KI(r);return Xfe(e+1)}function Xfe(r){if(r==null)return r;let e=r.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function cGe(r){let e="0x";for(let t=0;tn.toLowerCase()))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),t==="earliest"&&(t="0x0"),this.params.fromBlock=t;const n=dGe(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:t}){const n=t;let i;e?i=fGe(e):i=t;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),a=(await this._fetchLogs(s)).filter(l=>this.matchLog(l));this.addResults(a)}async _fetchLogs(e){return await uGe(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(ZI(this.params.fromBlock)>=ZI(e.blockNumber)||pGe(this.params.toBlock)&&ZI(this.params.toBlock)<=ZI(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();return this.params.address&&t&&!this.params.address.includes(t)?!1:this.params.topics.every((i,s)=>{let o=e.topics[s];if(!o)return!1;o=o.toLowerCase();let a=Array.isArray(i)?i:[i];return a.includes(null)?!0:(a=a.map(h=>h.toLowerCase()),a.includes(o))})}},oU=mGe;async function mGe({provider:r,fromBlock:e,toBlock:t}){e||(e=t);const n=tde(e),s=tde(t)-n+1,o=Array(s).fill().map((l,u)=>n+u).map(bGe);let a=await Promise.all(o.map(l=>vGe(r,"eth_getBlockByNumber",[l,!1])));return a=a.filter(l=>l!==null),a}function tde(r){return r==null?r:Number.parseInt(r,16)}function bGe(r){return r==null?r:"0x"+r.toString(16)}function wGe(r,e){return new Promise((t,n)=>{r.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?t(s.result):n(new Error("Result was empty"))})})}async function vGe(r,e,t){for(let n=0;n<3;n++)try{return await wGe(r,{id:1,jsonrpc:"2.0",method:e,params:t})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}const yGe=iU,xGe=oU,{incrementHexInt:_Ge}=V8;var EGe=class extends yGe{constructor({provider:e,params:t}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){const n=t,i=_Ge(e),o=(await xGe({provider:this.provider,fromBlock:i,toBlock:n})).map(a=>a.hash);this.addResults(o)}};const AGe=iU,CGe=oU,{incrementHexInt:SGe}=V8;var IGe=class extends AGe{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const t=e,n=SGe(e),i=await CGe({provider:this.provider,fromBlock:n,toBlock:t}),s=[];for(const o of i)s.push(...o.transactions);this.addResults(s)}};const TGe=Gfe.Mutex,{createAsyncMiddleware:RGe,createScaffoldMiddleware:kGe}=qL,MGe=gGe,NGe=EGe,PGe=IGe,{intToHex:rde,hexToInt:aU}=V8;var OGe=DGe;function DGe({blockTracker:r,provider:e}){let t=0,n={};const i=new TGe,s=$Ge({mutex:i}),o=kGe({eth_newFilter:s(cU(l)),eth_newBlockFilter:s(cU(u)),eth_newPendingTransactionFilter:s(cU(h)),eth_uninstallFilter:s(JI(w)),eth_getFilterChanges:s(JI(p)),eth_getFilterLogs:s(JI(g))}),a=async({oldBlock:N,newBlock:O})=>{if(n.length===0)return;const B=await i.acquire();try{await Promise.all(Zy(n).map(async z=>{try{await z.update({oldBlock:N,newBlock:O})}catch(G){console.error(G)}}))}catch(z){console.error(z)}B()};return o.newLogFilter=l,o.newBlockFilter=u,o.newPendingTransactionFilter=h,o.uninstallFilter=w,o.getFilterChanges=p,o.getFilterLogs=g,o.destroy=()=>{T()},o;async function l(N){const O=new MGe({provider:e,params:N});return await y(O),O}async function u(){const N=new NGe({provider:e});return await y(N),N}async function h(){const N=new PGe({provider:e});return await y(N),N}async function p(N){const O=aU(N),B=n[O];if(!B)throw new Error(`No filter for index "${O}"`);return B.getChangesAndClear()}async function g(N){const O=aU(N),B=n[O];if(!B)throw new Error(`No filter for index "${O}"`);let z=[];return B.type==="log"&&(z=B.getAllResults()),z}async function w(N){const O=aU(N),B=n[O],z=Boolean(B);return z&&await C(O),z}async function y(N){const O=Zy(n).length,B=await r.getLatestBlock();await N.initialize({currentBlock:B}),t++,n[t]=N,N.id=t,N.idHex=rde(t);const z=Zy(n).length;return k({prevFilterCount:O,newFilterCount:z}),t}async function C(N){const O=Zy(n).length;delete n[N];const B=Zy(n).length;k({prevFilterCount:O,newFilterCount:B})}async function T(){const N=Zy(n).length;n={},k({prevFilterCount:N,newFilterCount:0})}function k({prevFilterCount:N,newFilterCount:O}){if(N===0&&O>0){r.on("sync",a);return}if(N>0&&O===0){r.removeListener("sync",a);return}}}function cU(r){return JI(async(...e)=>{const t=await r(...e);return rde(t.id)})}function JI(r){return RGe(async(e,t)=>{const n=await r.apply(null,e.params);t.result=n})}function $Ge({mutex:r}){return e=>async(t,n,i,s)=>{(await r.acquire())(),e(t,n,i,s)}}function Zy(r,e){const t=[];for(let n in r)t.push(r[n]);return t}const BGe=M8.default,{createAsyncMiddleware:nde,createScaffoldMiddleware:LGe}=qL,UGe=OGe,{unsafeRandomBytes:FGe,incrementHexInt:jGe}=V8,zGe=oU;var HGe=qGe;function qGe({blockTracker:r,provider:e}){const t={},n=UGe({blockTracker:r,provider:e});let i=!1;const s=new BGe,o=LGe({eth_subscribe:nde(a),eth_unsubscribe:nde(l)});return o.destroy=h,{events:s,middleware:o};async function a(p,g){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const w=p.params[0],y=FGe(16);let C;switch(w){case"newHeads":C=T({subId:y});break;case"logs":const N=p.params[1],O=await n.newLogFilter(N);C=k({subId:y,filter:O});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${w}"`)}t[y]=C,g.result=y;return;function T({subId:N}){const O={type:w,destroy:async()=>{r.removeListener("sync",O.update)},update:async({oldBlock:B,newBlock:z})=>{const G=z,$=jGe(B);(await zGe({provider:e,fromBlock:$,toBlock:G})).map(WGe).filter(Q=>Q!==null).forEach(Q=>{u(N,Q)})}};return r.on("sync",O.update),O}function k({subId:N,filter:O}){return O.on("update",z=>u(N,z)),{type:w,destroy:async()=>await n.uninstallFilter(O.idHex)}}}async function l(p,g){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const w=p.params[0],y=t[w];if(!y){g.result=!1;return}delete t[w],await y.destroy(),g.result=!0}function u(p,g){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:p,result:g}})}function h(){s.removeAllListeners();for(const p in t)t[p].destroy(),delete t[p];i=!0}}function WGe(r){return r==null?null:{hash:r.hash,parentHash:r.parentHash,sha3Uncles:r.sha3Uncles,miner:r.miner,stateRoot:r.stateRoot,transactionsRoot:r.transactionsRoot,receiptsRoot:r.receiptsRoot,logsBloom:r.logsBloom,difficulty:r.difficulty,number:r.number,gasLimit:r.gasLimit,gasUsed:r.gasUsed,nonce:r.nonce,mixHash:r.mixHash,timestamp:r.timestamp,extraData:r.extraData}}Object.defineProperty(_I,"__esModule",{value:!0}),_I.SubscriptionManager=void 0;const VGe=mhe,GGe=HGe,ide=()=>{};class KGe{constructor(e){const t=new VGe.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=GGe({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,ide,ide),t}destroy(){this.subscriptionMiddleware.destroy()}}_I.SubscriptionManager=KGe;var sde=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_y,"__esModule",{value:!0}),_y.CoinbaseWalletProvider=void 0;const ZGe=sde(wy),JGe=NLe,kn=a8,rn=mr,YGe=h8,ode=tu,YI=Ay,Qc=yy,lU=sde(nze),G8=Ey,QGe=By,XGe=_I,ade="DefaultChainId",cde="DefaultJsonRpcUrl";class eKe extends JGe.EventEmitter{constructor(e){var t,n;super(),this._filterPolyfill=new QGe.FilterPolyfill(this),this._subscriptionManager=new XGe.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(t=e.overrideIsCoinbaseWallet)!==null&&t!==void 0?t:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;const i=this.getChainId(),s=(0,rn.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const o=this._storage.getItem(ode.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const a=o.split(" ");a[0]!==""&&(this._addresses=a.map(l=>(0,rn.ensureAddressString)(l)),this.emit("accountsChanged",a))}this._subscriptionManager.events.on("notification",a=>{this.emit("message",{type:a.method,data:a.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",a=>{var l;if(!(a.origin!==location.origin||a.source!==window)&&a.data.type==="walletLinkMessage"&&a.data.data.action==="dappChainSwitched"){const u=a.data.data.chainId,h=(l=a.data.data.jsonRpcUrl)!==null&&l!==void 0?l:this.jsonRpcUrl;this.updateProviderInfo(h,Number(u))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,rn.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(cde))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(cde,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,t){this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,t){this.jsonRpcUrl=e;const n=this.getChainId();this._storage.setItem(ade,t.toString(10)),((0,rn.ensureIntNumber)(t)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,i,s,o){const l=await(await this.initializeRelay()).watchAsset(e,t,n,i,s,o==null?void 0:o.toString()).promise;return(0,Qc.isErrorResponse)(l)?!1:!!l.result}async addEthereumChain(e,t,n,i,s,o){var a,l;if((0,rn.ensureIntNumber)(e)===this.getChainId())return!1;const u=await this.initializeRelay(),h=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!h&&await u.requestEthereumAccounts().promise;const p=await u.addEthereumChain(e.toString(),t,s,n,i,o).promise;return(0,Qc.isErrorResponse)(p)?!1:(((a=p.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(t[0],e),((l=p.result)===null||l===void 0?void 0:l.isApproved)===!0)}async switchEthereumChain(e){const n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,Qc.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===kn.standardErrorCodes.provider.unsupportedChain?kn.standardErrors.provider.unsupportedChain():kn.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,t){this.initializeRelay().then(n=>n.setAppInfo(e,t))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(G8.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?YI.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){try{const n=this._send(e,t);if(n instanceof Promise)return n.catch(i=>{throw(0,kn.serializeError)(i,e)})}catch(n){throw(0,kn.serializeError)(n,e)}}_send(e,t){if(typeof e=="string"){const i=e,s=Array.isArray(t)?t:t!==void 0?[t]:[],o={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(o).then(a=>a.result)}if(typeof t=="function"){const i=e,s=t;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));const n=e;return this._sendRequest(n)}async sendAsync(e,t){try{return this._sendAsync(e,t).catch(n=>{throw(0,kn.serializeError)(n,e)})}catch(n){return Promise.reject((0,kn.serializeError)(n,e))}}async _sendAsync(e,t){if(typeof t!="function")throw new Error("callback is required");if(Array.isArray(e)){const i=t;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}const n=t;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(t=>{throw(0,kn.serializeError)(t,e.method)})}catch(t){return Promise.reject((0,kn.serializeError)(t,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw kn.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw kn.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw kn.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){const n=await(await this.initializeRelay()).scanQRCode((0,rn.ensureRegExpString)(e)).promise;if((0,Qc.isErrorResponse)(n))throw(0,kn.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,kn.serializeError)("result was not a string","scanQRCode");return n.result}async genericRequest(e,t){const i=await(await this.initializeRelay()).genericRequest(e,t).promise;if((0,Qc.isErrorResponse)(i))throw(0,kn.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,kn.serializeError)("result was not a string","generic");return i.result}async connectAndSignIn(e){var t;(t=this.diagnostic)===null||t===void 0||t.log(G8.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?YI.Session.hash(this._relay.session.id):void 0});let n;try{const s=await this.initializeRelay();if(!(s instanceof YGe.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=await s.connectAndSignIn(e).promise,(0,Qc.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?kn.standardErrors.provider.userRejectedRequest("User denied account authorization"):s}if(!n.result)throw new Error("accounts received is empty");const{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(e){const n=await(await this.initializeRelay()).selectProvider(e).promise;if((0,Qc.isErrorResponse)(n))throw(0,kn.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,kn.serializeError)("result was not a string","selectProvider");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;if(t.result=this._handleSynchronousMethods(e),t.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return t}_setAddresses(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");const n=e.map(i=>(0,rn.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(ode.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return t({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(a=>t(Object.assign(Object.assign({},a),{id:e.id}))).catch(a=>n(a));return}const o=this._handleSubscriptionMethods(e);if(o!==void 0){o.then(a=>t({jsonrpc:"2.0",id:e.id,result:a.result})).catch(a=>n(a));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&t(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(t=>this._sendRequestAsync(t)))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(s=>{var o;throw(s.code===kn.standardErrorCodes.rpc.methodNotFound||s.code===kn.standardErrorCodes.rpc.methodNotSupported)&&((o=this.diagnostic)===null||o===void 0||o.log(G8.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?YI.Session.hash(this._relay.session.id):void 0})),s})}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,rn.ensureAddressString)(e);return this._addresses.map(i=>(0,rn.ensureAddressString)(i)).includes(t)}catch{}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw(t=this.diagnostic)===null||t===void 0||t.log(G8.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,rn.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const n=e.to?(0,rn.ensureAddressString)(e.to):null,i=e.value!=null?(0,rn.ensureBN)(e.value):new ZGe.default(0),s=e.data?(0,rn.ensureBuffer)(e.data):Dt.alloc(0),o=e.nonce!=null?(0,rn.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,rn.ensureBN)(e.gasPrice):null,l=e.maxFeePerGas!=null?(0,rn.ensureBN)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,rn.ensureBN)(e.maxPriorityFeePerGas):null,h=e.gas!=null?(0,rn.ensureBN)(e.gas):null,p=e.chainId?(0,rn.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:t,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:l,maxPriorityFeePerGas:u,gasLimit:h,chainId:p}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw kn.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw kn.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const o=await(await this.initializeRelay()).signEthereumMessage(e,t,n,i).promise;if((0,Qc.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?kn.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,t,n){const s=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,t,n).promise;if((0,Qc.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,rn.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(ade);if(!e)return(0,rn.ensureIntNumber)(this._chainIdFromOpts);const t=parseInt(e,10);return(0,rn.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(G8.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?YI.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{if(t=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,Qc.isErrorResponse)(t))throw new Error(t.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?kn.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,rn.ensureAddressString)(e[0]),n=(0,rn.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,rn.ensureBuffer)(e[0]),n=(0,rn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,rn.ensureBuffer)(e[0]),n=(0,rn.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,rn.ensureBuffer)(e[0]),n=(0,rn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signEthereumTransaction(t).promise;if((0,Qc.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?kn.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const t=(0,rn.ensureBuffer)(e[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(t,this.getChainId()).promise;if((0,Qc.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(t).promise;if((0,Qc.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?kn.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,rn.ensureParsedJSONObject)(e[0]),n=(0,rn.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=lU.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,rn.ensureAddressString)(e[0]),n=(0,rn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=lU.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,rn.ensureAddressString)(e[0]),n=(0,rn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=lU.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _cbwallet_arbitrary(e){const t=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof t!="object"||t===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,n)}}async _wallet_addEthereumChain(e){var t,n,i,s;const o=e[0];if(((t=o.rpcUrls)===null||t===void 0?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||o.chainName.trim()==="")throw kn.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw kn.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw kn.standardErrors.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw kn.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw kn.standardErrors.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw kn.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,i,s,a,o,n)}}_eth_uninstallFilter(e){const t=(0,rn.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const t=(0,rn.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,rn.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((t,n)=>this._setAddresses(t,n)),e.setChainCallback((t,n)=>{this.updateProviderInfo(n,parseInt(t,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}}_y.CoinbaseWalletProvider=eKe;var QI={};Object.defineProperty(QI,"__esModule",{value:!0}),QI.RelayEventManager=void 0;const tKe=mr;class rKe{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,tKe.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}QI.RelayEventManager=rKe,Object.defineProperty(o8,"__esModule",{value:!0}),o8.CoinbaseWalletSDK=void 0;const nKe=OS,iKe=DS,lde=mr,sKe=FS,oKe=_y,aKe=h8,cKe=S8,lKe=QI,uKe=b8,hKe=f8,ude=xy;class XI{constructor(e){var t,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||iKe.LINK_API_URL;typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(t=e.overrideIsCoinbaseWallet)!==null&&t!==void 0?t:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const o=new URL(s),a=`${o.protocol}//${o.host}`;if(this._storage=new sKe.ScopedLocalStorage(`-walletlink:${a}`),this._storage.setItem("version",XI.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new lKe.RelayEventManager;const l=(0,lde.isMobileWeb)(),u=e.uiConstructor||(p=>l?new cKe.MobileRelayUI(p):new uKe.WalletLinkRelayUI(p)),h={linkAPIUrl:s,version:ude.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=l?new aKe.MobileRelay(h):new hKe.WalletLinkRelay(h),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",t=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new oKe.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,lde.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const t=this===null||this===void 0?void 0:this.walletExtension;t?t.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,t;return(t=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&t!==void 0?t:null}getCoinbaseWalletLogo(e,t=240){return(0,nKe.walletLogo)(e,t)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{const n=(e=window.ethereum)!==null&&e!==void 0?e:(t=window.top)===null||t===void 0?void 0:t.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}}o8.CoinbaseWalletSDK=XI,XI.VERSION=ude.LIB_VERSION,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CoinbaseWalletProvider=r.CoinbaseWalletSDK=void 0;const e=o8,t=_y;var n=o8;Object.defineProperty(r,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=_y;Object.defineProperty(r,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),r.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=t.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=t.CoinbaseWalletProvider)}(sle);function fKe(r){const{enableEIP6963:e=!0,enableInjected:t=!0,enableCoinbase:n=!0,enableEmail:i=!1,metadata:s,rpcUrl:o,defaultChainId:a}=r;let l,u;const h={metadata:s};function p(){if(l)return l;if(!(typeof window>"u")&&window.ethereum)return l=window.ethereum,l}function g(){return u||(typeof window>"u"?void 0:(u=new sle.CoinbaseWalletSDK({appName:s.name,appLogoUrl:s.icons[0],darkMode:!1,enableMobileWalletLink:!0}).makeWeb3Provider(o,a),u))}return t&&(h.injected=p()),n&&o&&a&&(h.coinbase=g()),e&&(h.EIP6963=!0),i&&(h.email=!0),h}function dKe(r){return new tLe({...r,_sdkVersion:`html-ethers-${Jt.VERSION}`})}let js,hde;const pKe=NA.getAll().map(r=>({chainId:r.id,name:r.name??r.nativeCurrency.symbol,currency:r.nativeCurrency.symbol,explorerUrl:r.explorerUrl,rpcUrl:r.rpcUrl})).filter(r=>r);let uU,hU=!1,fU,fde;const gKe=r=>{if(js!==void 0)return js;const e=fKe({metadata:r.metadata,enableEIP6963:r.enableEIP6963,enableInjected:r.enableInjected,enableCoinbase:r.enableCoinbase});return js=dKe({chains:pKe,ethersConfig:e,projectId:r.projectId,themeMode:r.themeMode,customWallets:r.customWallets,allowUnsupportedChain:!0,themeVariables:{"--w3m-z-index":999999999999}}),r.events!==void 0&&r.events.forEach(t=>{js==null||js.subscribeEvents(n=>{t(n,js)})}),js.subscribeEvents(async t=>{t.data.event==="SELECT_WALLET"&&(hU=!0),t.data.event==="MODAL_CLOSE"&&(hU?hU=!1:fU(new Error(kr.CLOSED_WALLETCONNECT_MODAL)))}),js.subscribeProvider(async({provider:t,chainId:n})=>{t!==void 0&&(uU.chainId!==n&&await(js==null?void 0:js.switchNetwork(uU.chainId).catch(()=>{fU(new Error(kr.WALLET_CONNECT_REJECTED))})),fde(hde=t))}),js},mKe={modal:js,id:"web3modal",name:"Web3Modal",icon:$p.web3modal,provider:hde,platforms:[Po.UNIVERSAL],isDetected:()=>!0,isConnected:()=>js===void 0?!1:js.getIsConnected(),disconnect:async()=>{Object.keys(localStorage).filter(r=>r.startsWith("wc@2")||r.startsWith("@w3m")||r.startsWith("W3M")||r.startsWith("-walletlink")).forEach(r=>{localStorage.removeItem(r)}),(js==null?void 0:js.disconnect)!==void 0&&await js.disconnect()},connect:async(r,e)=>{const t=e;if(r===void 0)throw new Error(kr.PROVIDER_IS_REQUIRED);if(t===void 0)throw new Error(kr.CONFIG_IS_REQUIRED);if(t.projectId===void 0)throw new Error(kr.PROJECT_ID_IS_REQUIRED);if(t.metadata===void 0)throw new Error(kr.METADATA_IS_REQUIRED);const n=r.network;return uU={chainId:n.id,name:n.name??n.nativeCurrency.symbol,currency:n.nativeCurrency.symbol,explorerUrl:n.explorerUrl,rpcUrl:n.rpcUrl},await new Promise((i,s)=>{try{const o=gKe(t);fU=async a=>{await o.disconnect(),s(a)},fde=i,o.open({view:"Connect"})}catch(o){s(o)}})}},bKe={id:"okxwallet",name:"OkxWallet",icon:$p.okxWallet,provider:window==null?void 0:window.okxwallet,downloadLink:"https://www.okx.com/download",platforms:[Po.BROWSER,Po.MOBILE],createDeepLink:r=>`okx://wallet/dapp/details?dappUrl=${r}`,isDetected:()=>Boolean(window==null?void 0:window.okxwallet),isConnected:async()=>{var r;return Boolean((await((r=window==null?void 0:window.okxwallet)==null?void 0:r.request({method:"eth_accounts"}))).length)},connect:async r=>await new Promise((e,t)=>{const n=window==null?void 0:window.okxwallet;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{gv(n,r).then(()=>{e(n)}).catch(i=>{t(i)})}).catch(i=>{t(i)})}catch(i){t(i)}})},wKe={id:"xdefiwallet",name:"XdefiWallet",icon:$p.xdefiWallet,provider:(mge=window==null?void 0:window.xfi)==null?void 0:mge.ethereum,downloadLink:"https://www.xdefi.io/",platforms:[Po.BROWSER],isDetected:()=>{var r;return Boolean((r=window==null?void 0:window.xfi)==null?void 0:r.ethereum)},isConnected:async()=>{var r,e;return Boolean((await((e=(r=window==null?void 0:window.xfi)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length)},connect:async r=>await new Promise((e,t)=>{var i;const n=(i=window==null?void 0:window.xfi)==null?void 0:i.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{gv(n,r).then(()=>{e(n)}).catch(s=>{t(s)})}).catch(s=>{t(s)})}catch(s){t(s)}})},vKe={id:"trustwallet",name:"TrustWallet",icon:$p.trustWallet,provider:(bge=window==null?void 0:window.ethereum)!=null&&bge.isTrust?window.ethereum:window.trustwallet,downloadLink:"https://trustwallet.com/download",platforms:[Po.BROWSER,Po.MOBILE],isDetected:()=>{var r;return Boolean(((r=window==null?void 0:window.ethereum)==null?void 0:r.isTrust)??(window==null?void 0:window.trustwallet))},isConnected:async()=>{var e;const r=(e=window==null?void 0:window.ethereum)!=null&&e.isTrust?window.ethereum:window.trustwallet;return Boolean((await(r==null?void 0:r.request({method:"eth_accounts"}))).length)},connect:async r=>await new Promise((e,t)=>{var n;try{const i=(n=window==null?void 0:window.ethereum)!=null&&n.isTrust?window.ethereum:window.trustwallet;i==null||i.request({method:"eth_requestAccounts"}).then(()=>{var s;if(((s=window==null?void 0:window.ethereum)==null?void 0:s.isTrust)!==void 0&&(r==null?void 0:r.isTestnet())===!0){e(i);return}gv(i,r).then(()=>{e(i)}).catch(o=>{t(o)})}).catch(s=>{t(s)})}catch(i){t(i)}})},yKe={id:"bitgetwallet",name:"BitgetWallet",icon:$p.bitgetWallet,provider:(wge=window==null?void 0:window.bitkeep)==null?void 0:wge.ethereum,downloadLink:"https://web3.bitget.com/en/wallet-download?type=3",platforms:[Po.BROWSER,Po.MOBILE],createDeepLink:r=>`https://bkcode.vip?action=dapp&url=${r}`,isDetected:()=>{var r;return Boolean((r=window==null?void 0:window.bitkeep)==null?void 0:r.ethereum)},isConnected:async()=>{var r,e;return Boolean((await((e=(r=window==null?void 0:window.bitkeep)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length)},connect:async r=>await new Promise((e,t)=>{var i;const n=(i=window==null?void 0:window.bitkeep)==null?void 0:i.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{gv(n,r).then(()=>{e(n)}).catch(s=>{t(s)})}).catch(s=>{t(s)})}catch(s){t(s)}})},xKe=":";function eT(r){const[e,t]=r.split(xKe);return{namespace:e,reference:t}}function dde(r,e=[]){const t=[];return Object.keys(r).forEach(n=>{if(e.length&&!e.includes(n))return;const i=r[n];t.push(...i.accounts)}),t}function pde(r,e){return r.includes(":")?[r]:e.chains||[]}var _Ke=Object.defineProperty,gde=Object.getOwnPropertySymbols,EKe=Object.prototype.hasOwnProperty,AKe=Object.prototype.propertyIsEnumerable,mde=(r,e,t)=>e in r?_Ke(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,bde=(r,e)=>{for(var t in e||(e={}))EKe.call(e,t)&&mde(r,t,e[t]);if(gde)for(var t of gde(e))AKe.call(e,t)&&mde(r,t,e[t]);return r};const CKe="ReactNative",Xc={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},SKe="js";function K8(){return typeof yt<"u"&&typeof yt.versions<"u"&&typeof yt.versions.node<"u"}function Jy(){return!U6()&&!!F6()&&navigator.product===CKe}function Yy(){return!K8()&&!!F6()&&!!U6()}function Z8(){return Jy()?Xc.reactNative:K8()?Xc.node:Yy()?Xc.browser:Xc.unknown}function IKe(){var r;try{return Jy()&&typeof dr<"u"&&typeof(dr==null?void 0:dr.Application)<"u"?(r=dr.Application)==null?void 0:r.applicationId:void 0}catch{return}}function TKe(r,e){let t=zd.parse(r);return t=bde(bde({},t),e),r=zd.stringify(t),r}function RKe(){return F$()||{name:"",description:"",url:"",icons:[""]}}function kKe(){if(Z8()===Xc.reactNative&&typeof dr<"u"&&typeof(dr==null?void 0:dr.Platform)<"u"){const{OS:t,Version:n}=dr.Platform;return[t,n].join("-")}const r=Soe();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function MKe(){var r;const e=Z8();return e===Xc.browser?[e,((r=L$())==null?void 0:r.host)||"unknown"].join(":"):e}function NKe(r,e,t){const n=kKe(),i=MKe();return[[r,e].join("-"),[SKe,t].join("-"),n,i].join("/")}function PKe({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a}){const l=t.split("?"),u=NKe(r,e,n),h={auth:i,ua:u,projectId:s,useOnCloseEvent:o||void 0,origin:a||void 0},p=TKe(l[1]||"",h);return l[0]+"?"+p}function a2(r,e){return r.filter(t=>e.includes(t)).length===r.length}function wde(r){return Object.fromEntries(r.entries())}function vde(r){return new Map(Object.entries(r))}function c2(r=Ye.FIVE_MINUTES,e){const t=Ye.toMiliseconds(r||Ye.FIVE_MINUTES);let n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},t),n=o,i=a})}}function J8(r,e,t){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(t)),e);try{const o=await r;n(o)}catch(o){i(o)}clearTimeout(s)})}function yde(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function OKe(r){return yde("topic",r)}function DKe(r){return yde("id",r)}function xde(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")n.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return n}function wa(r,e){return Ye.fromMiliseconds((e||Date.now())+Ye.toMiliseconds(r))}function E1(r){return Date.now()>=Ye.toMiliseconds(r)}function hn(r,e){return`${r}${e?`:${e}`:""}`}function tT(r=[],e=[]){return[...new Set([...r,...e])]}async function $Ke({id:r,topic:e,wcDeepLink:t}){try{if(!t)return;const n=typeof t=="string"?JSON.parse(t):t;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${r}&sessionTopic=${e}`,o=Z8();o===Xc.browser?s.startsWith("https://")||s.startsWith("http://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===Xc.reactNative&&typeof(dr==null?void 0:dr.Linking)<"u"&&await dr.Linking.openURL(s)}catch(n){console.error(n)}}async function BKe(r,e){try{return await r.getItem(e)||(Yy()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}var _de=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{};function LKe(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Ede={exports:{}};/** -* [js-sha3]{@link https://github.com/emn178/js-sha3} -* -* @version 0.8.0 -* @author Chen, Yi-Cyuan [emn178@gmail.com] -* @copyright Chen, Yi-Cyuan 2015-2018 -* @license MIT -*/(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof yt=="object"&&yt.versions&&yt.versions.node;o?i=_de:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],p=[4,1024,262144,67108864],g=[1,256,65536,16777216],w=[6,1536,393216,100663296],y=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],T=[224,256,384,512],k=[128,256],N=["hex","buffer","arrayBuffer","array","digest"],O={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(q){return Object.prototype.toString.call(q)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(q){return typeof q=="object"&&q.buffer&&q.buffer.constructor===ArrayBuffer});for(var B=function(q,Y,K){return function(te){return new _(q,Y,q).update(te)[K]()}},z=function(q,Y,K){return function(te,re){return new _(q,Y,re).update(te)[K]()}},G=function(q,Y,K){return function(te,re,H,U){return d["cshake"+q].update(te,re,H,U)[K]()}},$=function(q,Y,K){return function(te,re,H,U){return d["kmac"+q].update(te,re,H,U)[K]()}},D=function(q,Y,K,te){for(var re=0;re>5,this.byteCount=this.blockCount<<2,this.outputBlocks=K>>5,this.extraBytes=(K&31)>>3;for(var te=0;te<50;++te)this.s[te]=0}_.prototype.update=function(q){if(this.finalized)throw new Error(t);var Y,K=typeof q;if(K!=="string"){if(K==="object"){if(q===null)throw new Error(e);if(l&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!Array.isArray(q)&&(!l||!ArrayBuffer.isView(q)))throw new Error(e)}else throw new Error(e);Y=!0}for(var te=this.blocks,re=this.byteCount,H=q.length,U=this.blockCount,W=0,le=this.s,de,Se;W>2]|=q[W]<>2]|=Se<>2]|=(192|Se>>6)<>2]|=(128|Se&63)<=57344?(te[de>>2]|=(224|Se>>12)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<>2]|=(240|Se>>18)<>2]|=(128|Se>>12&63)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<=re){for(this.start=de-re,this.block=te[U],de=0;de>8,K=q&255;K>0;)re.unshift(K),q=q>>8,K=q&255,++te;return Y?re.push(te):re.unshift(te),this.update(re),re.length},_.prototype.encodeString=function(q){var Y,K=typeof q;if(K!=="string"){if(K==="object"){if(q===null)throw new Error(e);if(l&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!Array.isArray(q)&&(!l||!ArrayBuffer.isView(q)))throw new Error(e)}else throw new Error(e);Y=!0}var te=0,re=q.length;if(Y)te=re;else for(var H=0;H=57344?te+=3:(U=65536+((U&1023)<<10|q.charCodeAt(++H)&1023),te+=4)}return te+=this.encode(te*8),this.update(q),te},_.prototype.bytepad=function(q,Y){for(var K=this.encode(Y),te=0;te>2]|=this.padding[Y&3],this.lastByteIndex===this.byteCount)for(q[0]=q[K],Y=1;Y>4&15]+u[W&15]+u[W>>12&15]+u[W>>8&15]+u[W>>20&15]+u[W>>16&15]+u[W>>28&15]+u[W>>24&15];H%q===0&&(ie(Y),re=0)}return te&&(W=Y[re],U+=u[W>>4&15]+u[W&15],te>1&&(U+=u[W>>12&15]+u[W>>8&15]),te>2&&(U+=u[W>>20&15]+u[W>>16&15])),U},_.prototype.arrayBuffer=function(){this.finalize();var q=this.blockCount,Y=this.s,K=this.outputBlocks,te=this.extraBytes,re=0,H=0,U=this.outputBits>>3,W;te?W=new ArrayBuffer(K+1<<2):W=new ArrayBuffer(U);for(var le=new Uint32Array(W);H>8&255,U[W+2]=le>>16&255,U[W+3]=le>>24&255;H%q===0&&ie(Y)}return te&&(W=H<<2,le=Y[re],U[W]=le&255,te>1&&(U[W+1]=le>>8&255),te>2&&(U[W+2]=le>>16&255)),U};function L(q,Y,K){_.call(this,q,Y,K)}L.prototype=new _,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),_.prototype.finalize.call(this)};var ie=function(q){var Y,K,te,re,H,U,W,le,de,Se,Me,ke,Ke,Re,je,De,Je,ze,qe,Ve,He,Be,Ge,Xe,se,J,X,ue,we,ye,Ie,it,ot,tt,It,st,Nt,Lt,ht,wt,Ut,ft,dt,Vt,xt,pt,Gt,gt,vt,Ft,lt,_t,Kt,Ht,qt,br,Tt,ur,Xn,ei,ti,ri,bn;for(te=0;te<48;te+=2)re=q[0]^q[10]^q[20]^q[30]^q[40],H=q[1]^q[11]^q[21]^q[31]^q[41],U=q[2]^q[12]^q[22]^q[32]^q[42],W=q[3]^q[13]^q[23]^q[33]^q[43],le=q[4]^q[14]^q[24]^q[34]^q[44],de=q[5]^q[15]^q[25]^q[35]^q[45],Se=q[6]^q[16]^q[26]^q[36]^q[46],Me=q[7]^q[17]^q[27]^q[37]^q[47],ke=q[8]^q[18]^q[28]^q[38]^q[48],Ke=q[9]^q[19]^q[29]^q[39]^q[49],Y=ke^(U<<1|W>>>31),K=Ke^(W<<1|U>>>31),q[0]^=Y,q[1]^=K,q[10]^=Y,q[11]^=K,q[20]^=Y,q[21]^=K,q[30]^=Y,q[31]^=K,q[40]^=Y,q[41]^=K,Y=re^(le<<1|de>>>31),K=H^(de<<1|le>>>31),q[2]^=Y,q[3]^=K,q[12]^=Y,q[13]^=K,q[22]^=Y,q[23]^=K,q[32]^=Y,q[33]^=K,q[42]^=Y,q[43]^=K,Y=U^(Se<<1|Me>>>31),K=W^(Me<<1|Se>>>31),q[4]^=Y,q[5]^=K,q[14]^=Y,q[15]^=K,q[24]^=Y,q[25]^=K,q[34]^=Y,q[35]^=K,q[44]^=Y,q[45]^=K,Y=le^(ke<<1|Ke>>>31),K=de^(Ke<<1|ke>>>31),q[6]^=Y,q[7]^=K,q[16]^=Y,q[17]^=K,q[26]^=Y,q[27]^=K,q[36]^=Y,q[37]^=K,q[46]^=Y,q[47]^=K,Y=Se^(re<<1|H>>>31),K=Me^(H<<1|re>>>31),q[8]^=Y,q[9]^=K,q[18]^=Y,q[19]^=K,q[28]^=Y,q[29]^=K,q[38]^=Y,q[39]^=K,q[48]^=Y,q[49]^=K,Re=q[0],je=q[1],pt=q[11]<<4|q[10]>>>28,Gt=q[10]<<4|q[11]>>>28,ue=q[20]<<3|q[21]>>>29,we=q[21]<<3|q[20]>>>29,ei=q[31]<<9|q[30]>>>23,ti=q[30]<<9|q[31]>>>23,ft=q[40]<<18|q[41]>>>14,dt=q[41]<<18|q[40]>>>14,tt=q[2]<<1|q[3]>>>31,It=q[3]<<1|q[2]>>>31,De=q[13]<<12|q[12]>>>20,Je=q[12]<<12|q[13]>>>20,gt=q[22]<<10|q[23]>>>22,vt=q[23]<<10|q[22]>>>22,ye=q[33]<<13|q[32]>>>19,Ie=q[32]<<13|q[33]>>>19,ri=q[42]<<2|q[43]>>>30,bn=q[43]<<2|q[42]>>>30,Ht=q[5]<<30|q[4]>>>2,qt=q[4]<<30|q[5]>>>2,st=q[14]<<6|q[15]>>>26,Nt=q[15]<<6|q[14]>>>26,ze=q[25]<<11|q[24]>>>21,qe=q[24]<<11|q[25]>>>21,Ft=q[34]<<15|q[35]>>>17,lt=q[35]<<15|q[34]>>>17,it=q[45]<<29|q[44]>>>3,ot=q[44]<<29|q[45]>>>3,Xe=q[6]<<28|q[7]>>>4,se=q[7]<<28|q[6]>>>4,br=q[17]<<23|q[16]>>>9,Tt=q[16]<<23|q[17]>>>9,Lt=q[26]<<25|q[27]>>>7,ht=q[27]<<25|q[26]>>>7,Ve=q[36]<<21|q[37]>>>11,He=q[37]<<21|q[36]>>>11,_t=q[47]<<24|q[46]>>>8,Kt=q[46]<<24|q[47]>>>8,Vt=q[8]<<27|q[9]>>>5,xt=q[9]<<27|q[8]>>>5,J=q[18]<<20|q[19]>>>12,X=q[19]<<20|q[18]>>>12,ur=q[29]<<7|q[28]>>>25,Xn=q[28]<<7|q[29]>>>25,wt=q[38]<<8|q[39]>>>24,Ut=q[39]<<8|q[38]>>>24,Be=q[48]<<14|q[49]>>>18,Ge=q[49]<<14|q[48]>>>18,q[0]=Re^~De&ze,q[1]=je^~Je&qe,q[10]=Xe^~J&ue,q[11]=se^~X&we,q[20]=tt^~st&Lt,q[21]=It^~Nt&ht,q[30]=Vt^~pt>,q[31]=xt^~Gt&vt,q[40]=Ht^~br&ur,q[41]=qt^~Tt&Xn,q[2]=De^~ze&Ve,q[3]=Je^~qe&He,q[12]=J^~ue&ye,q[13]=X^~we&Ie,q[22]=st^~Lt&wt,q[23]=Nt^~ht&Ut,q[32]=pt^~gt&Ft,q[33]=Gt^~vt<,q[42]=br^~ur&ei,q[43]=Tt^~Xn&ti,q[4]=ze^~Ve&Be,q[5]=qe^~He&Ge,q[14]=ue^~ye&it,q[15]=we^~Ie&ot,q[24]=Lt^~wt&ft,q[25]=ht^~Ut&dt,q[34]=gt^~Ft&_t,q[35]=vt^~lt&Kt,q[44]=ur^~ei&ri,q[45]=Xn^~ti&bn,q[6]=Ve^~Be&Re,q[7]=He^~Ge&je,q[16]=ye^~it&Xe,q[17]=Ie^~ot&se,q[26]=wt^~ft&tt,q[27]=Ut^~dt&It,q[36]=Ft^~_t&Vt,q[37]=lt^~Kt&xt,q[46]=ei^~ri&Ht,q[47]=ti^~bn&qt,q[8]=Be^~Re&De,q[9]=Ge^~je&Je,q[18]=it^~Xe&J,q[19]=ot^~se&X,q[28]=ft^~tt&st,q[29]=dt^~It&Nt,q[38]=_t^~Vt&pt,q[39]=Kt^~xt&Gt,q[48]=ri^~Ht&br,q[49]=bn^~qt&Tt,q[0]^=C[te],q[1]^=C[te+1]};if(a)r.exports=d;else for(x=0;x{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const Ide=jKe();var pU;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(pU||(pU={}));var sh;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(sh||(sh={}));const Tde="0123456789abcdef";let nn=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();rT[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Sde>rT[n])&&console.log.apply(console,t)}debug(...e){this._log(nn.levels.DEBUG,e)}info(...e){this._log(nn.levels.INFO,e)}warn(...e){this._log(nn.levels.WARNING,e)}makeError(e,t,n){if(Cde)return this.makeError("censored error",t,{});t||(t=nn.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const u=n[l];try{if(u instanceof Uint8Array){let h="";for(let p=0;p>4],h+=Tde[u[p]&15];i.push(l+"=Uint8Array(0x"+h+")")}else i.push(l+"="+JSON.stringify(u))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const s=e;let o="";switch(t){case sh.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case sh.CALL_EXCEPTION:case sh.INSUFFICIENT_FUNDS:case sh.MISSING_NEW:case sh.NONCE_EXPIRED:case sh.REPLACEMENT_UNDERPRICED:case sh.TRANSACTION_REPLACED:case sh.UNPREDICTABLE_GAS_LIMIT:o=t;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=t,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,nn.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){Ide&&this.throwError("platform missing String.prototype.normalize",nn.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ide})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,nn.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,nn.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,nn.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",nn.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",nn.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",nn.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return dU||(dU=new nn(FKe)),dU}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",nn.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ade){if(!e)return;this.globalLogger().throwError("error censorship permanent",nn.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Cde=!!e,Ade=!!t}static setLogLevel(e){const t=rT[e.toLowerCase()];if(t==null){nn.globalLogger().warn("invalid log level - "+e);return}Sde=t}static from(e){return new nn(e)}};nn.errors=sh,nn.levels=pU;const zKe="bytes/5.7.0",Ss=new nn(zKe);function Rde(r){return!!r.toHexString}function Qy(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return Qy(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function HKe(r){return el(r)&&!(r.length%2)||Xy(r)}function kde(r){return typeof r=="number"&&r==r&&r%1===0}function Xy(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!kde(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function fs(r,e){if(e||(e={}),typeof r=="number"){Ss.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),Qy(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Rde(r)&&(r=r.toHexString()),el(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Ss.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;ifs(i)),t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Qy(n)}function WKe(r,e){r=fs(r),r.length>e&&Ss.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),Qy(t)}function el(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const gU="0123456789abcdef";function ja(r,e){if(e||(e={}),typeof r=="number"){Ss.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=gU[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Rde(r))return r.toHexString();if(el(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":Ss.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(Xy(r)){let t="0x";for(let n=0;n>4]+gU[i&15]}return t}return Ss.throwArgumentError("invalid hexlify value","value",r)}function VKe(r){if(typeof r!="string")r=ja(r);else if(!el(r)||r.length%2)return null;return(r.length-2)/2}function Mde(r,e,t){return typeof r!="string"?r=ja(r):(!el(r)||r.length%2)&&Ss.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function Tf(r,e){for(typeof r!="string"?r=ja(r):el(r)||Ss.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Ss.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function Nde(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(HKe(r)){let t=fs(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=ja(t.slice(0,32)),e.s=ja(t.slice(32,64))):t.length===65?(e.r=ja(t.slice(0,32)),e.s=ja(t.slice(32,64)),e.v=t[64]):Ss.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:Ss.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=ja(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const i=WKe(fs(e._vs),32);e._vs=ja(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Ss.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const o=ja(i);e.s==null?e.s=o:e.s!==o&&Ss.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?Ss.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Ss.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!el(e.r)?Ss.throwArgumentError("signature missing or invalid r","signature",r):e.r=Tf(e.r,32),e.s==null||!el(e.s)?Ss.throwArgumentError("signature missing or invalid s","signature",r):e.s=Tf(e.s,32);const t=fs(e.s);t[0]>=128&&Ss.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const n=ja(t);e._vs&&(el(e._vs)||Ss.throwArgumentError("signature invalid _vs","signature",r),e._vs=Tf(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Ss.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function mU(r){return"0x"+UKe.keccak_256(fs(r))}var Pde={exports:{}},GKe={},KKe=Object.freeze({__proto__:null,default:GKe}),ZKe=LKe(KKe);(function(r){(function(e,t){function n(b,d){if(!b)throw new Error(d||"Assertion failed")}function i(b,d){b.super_=d;var m=function(){};m.prototype=d.prototype,b.prototype=new m,b.prototype.constructor=b}function s(b,d,m){if(s.isBN(b))return b;this.negative=0,this.words=null,this.length=0,this.red=null,b!==null&&((d==="le"||d==="be")&&(m=d,d=10),this._init(b||0,d||10,m||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ZKe.Buffer}catch{}s.isBN=function(b){return b instanceof s?!0:b!==null&&typeof b=="object"&&b.constructor.wordSize===s.wordSize&&Array.isArray(b.words)},s.max=function(b,d){return b.cmp(d)>0?b:d},s.min=function(b,d){return b.cmp(d)<0?b:d},s.prototype._init=function(b,d,m){if(typeof b=="number")return this._initNumber(b,d,m);if(typeof b=="object")return this._initArray(b,d,m);d==="hex"&&(d=16),n(d===(d|0)&&d>=2&&d<=36),b=b.toString().replace(/\s+/g,"");var x=0;b[0]==="-"&&(x++,this.negative=1),x=0;x-=3)I=b[x]|b[x-1]<<8|b[x-2]<<16,this.words[A]|=I<>>26-R&67108863,R+=24,R>=26&&(R-=26,A++);else if(m==="le")for(x=0,A=0;x>>26-R&67108863,R+=24,R>=26&&(R-=26,A++);return this._strip()};function a(b,d){var m=b.charCodeAt(d);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;n(!1,"Invalid character in "+b)}function l(b,d,m){var x=a(b,m);return m-1>=d&&(x|=a(b,m-1)<<4),x}s.prototype._parseHex=function(b,d,m){this.length=Math.ceil((b.length-d)/6),this.words=new Array(this.length);for(var x=0;x=d;x-=2)R=l(b,d,x)<=18?(A-=18,I+=1,this.words[I]|=R>>>26):A+=8;else{var S=b.length-d;for(x=S%2===0?d+1:d;x=18?(A-=18,I+=1,this.words[I]|=R>>>26):A+=8}this._strip()};function u(b,d,m,x){for(var A=0,I=0,R=Math.min(b.length,m),S=d;S=49?I=E-49+10:E>=17?I=E-17+10:I=E,n(E>=0&&I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch{s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?""}var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(b,d){b=b||10,d=d|0||1;var m;if(b===16||b==="hex"){m="";for(var x=0,A=0,I=0;I>>24-x&16777215,x+=2,x>=26&&(x-=26,I--),A!==0||I!==this.length-1?m=g[6-S.length]+S+m:m=S+m}for(A!==0&&(m=A.toString(16)+m);m.length%d!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(b===(b|0)&&b>=2&&b<=36){var E=w[b],_=y[b];m="";var L=this.clone();for(L.negative=0;!L.isZero();){var ie=L.modrn(_).toString(b);L=L.idivn(_),L.isZero()?m=ie+m:m=g[E-ie.length]+ie+m}for(this.isZero()&&(m="0"+m);m.length%d!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var b=this.words[0];return this.length===2?b+=this.words[1]*67108864:this.length===3&&this.words[2]===1?b+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-b:b},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(b,d){return this.toArrayLike(o,b,d)}),s.prototype.toArray=function(b,d){return this.toArrayLike(Array,b,d)};var C=function(b,d){return b.allocUnsafe?b.allocUnsafe(d):new b(d)};s.prototype.toArrayLike=function(b,d,m){this._strip();var x=this.byteLength(),A=m||Math.max(1,x);n(x<=A,"byte array longer than desired length"),n(A>0,"Requested array length <= 0");var I=C(b,A),R=d==="le"?"LE":"BE";return this["_toArrayLike"+R](I,x),I},s.prototype._toArrayLikeLE=function(b,d){for(var m=0,x=0,A=0,I=0;A>8&255),m>16&255),I===6?(m>24&255),x=0,I=0):(x=R>>>24,I+=2)}if(m=0&&(b[m--]=R>>8&255),m>=0&&(b[m--]=R>>16&255),I===6?(m>=0&&(b[m--]=R>>24&255),x=0,I=0):(x=R>>>24,I+=2)}if(m>=0)for(b[m--]=x;m>=0;)b[m--]=0},Math.clz32?s.prototype._countBits=function(b){return 32-Math.clz32(b)}:s.prototype._countBits=function(b){var d=b,m=0;return d>=4096&&(m+=13,d>>>=13),d>=64&&(m+=7,d>>>=7),d>=8&&(m+=4,d>>>=4),d>=2&&(m+=2,d>>>=2),m+d},s.prototype._zeroBits=function(b){if(b===0)return 26;var d=b,m=0;return d&8191||(m+=13,d>>>=13),d&127||(m+=7,d>>>=7),d&15||(m+=4,d>>>=4),d&3||(m+=2,d>>>=2),d&1||m++,m},s.prototype.bitLength=function(){var b=this.words[this.length-1],d=this._countBits(b);return(this.length-1)*26+d};function T(b){for(var d=new Array(b.bitLength()),m=0;m>>A&1}return d}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var b=0,d=0;db.length?this.clone().ior(b):b.clone().ior(this)},s.prototype.uor=function(b){return this.length>b.length?this.clone().iuor(b):b.clone().iuor(this)},s.prototype.iuand=function(b){var d;this.length>b.length?d=b:d=this;for(var m=0;mb.length?this.clone().iand(b):b.clone().iand(this)},s.prototype.uand=function(b){return this.length>b.length?this.clone().iuand(b):b.clone().iuand(this)},s.prototype.iuxor=function(b){var d,m;this.length>b.length?(d=this,m=b):(d=b,m=this);for(var x=0;xb.length?this.clone().ixor(b):b.clone().ixor(this)},s.prototype.uxor=function(b){return this.length>b.length?this.clone().iuxor(b):b.clone().iuxor(this)},s.prototype.inotn=function(b){n(typeof b=="number"&&b>=0);var d=Math.ceil(b/26)|0,m=b%26;this._expand(d),m>0&&d--;for(var x=0;x0&&(this.words[x]=~this.words[x]&67108863>>26-m),this._strip()},s.prototype.notn=function(b){return this.clone().inotn(b)},s.prototype.setn=function(b,d){n(typeof b=="number"&&b>=0);var m=b/26|0,x=b%26;return this._expand(m+1),d?this.words[m]=this.words[m]|1<b.length?(m=this,x=b):(m=b,x=this);for(var A=0,I=0;I>>26;for(;A!==0&&I>>26;if(this.length=m.length,A!==0)this.words[this.length]=A,this.length++;else if(m!==this)for(;Ib.length?this.clone().iadd(b):b.clone().iadd(this)},s.prototype.isub=function(b){if(b.negative!==0){b.negative=0;var d=this.iadd(b);return b.negative=1,d._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(b),this.negative=1,this._normSign();var m=this.cmp(b);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,A;m>0?(x=this,A=b):(x=b,A=this);for(var I=0,R=0;R>26,this.words[R]=d&67108863;for(;I!==0&&R>26,this.words[R]=d&67108863;if(I===0&&R>>26,ie=E&67108863,q=Math.min(_,d.length-1),Y=Math.max(0,_-b.length+1);Y<=q;Y++){var K=_-Y|0;A=b.words[K]|0,I=d.words[Y]|0,R=A*I+ie,L+=R/67108864|0,ie=R&67108863}m.words[_]=ie|0,E=L|0}return E!==0?m.words[_]=E|0:m.length--,m._strip()}var N=function(b,d,m){var x=b.words,A=d.words,I=m.words,R=0,S,E,_,L=x[0]|0,ie=L&8191,q=L>>>13,Y=x[1]|0,K=Y&8191,te=Y>>>13,re=x[2]|0,H=re&8191,U=re>>>13,W=x[3]|0,le=W&8191,de=W>>>13,Se=x[4]|0,Me=Se&8191,ke=Se>>>13,Ke=x[5]|0,Re=Ke&8191,je=Ke>>>13,De=x[6]|0,Je=De&8191,ze=De>>>13,qe=x[7]|0,Ve=qe&8191,He=qe>>>13,Be=x[8]|0,Ge=Be&8191,Xe=Be>>>13,se=x[9]|0,J=se&8191,X=se>>>13,ue=A[0]|0,we=ue&8191,ye=ue>>>13,Ie=A[1]|0,it=Ie&8191,ot=Ie>>>13,tt=A[2]|0,It=tt&8191,st=tt>>>13,Nt=A[3]|0,Lt=Nt&8191,ht=Nt>>>13,wt=A[4]|0,Ut=wt&8191,ft=wt>>>13,dt=A[5]|0,Vt=dt&8191,xt=dt>>>13,pt=A[6]|0,Gt=pt&8191,gt=pt>>>13,vt=A[7]|0,Ft=vt&8191,lt=vt>>>13,_t=A[8]|0,Kt=_t&8191,Ht=_t>>>13,qt=A[9]|0,br=qt&8191,Tt=qt>>>13;m.negative=b.negative^d.negative,m.length=19,S=Math.imul(ie,we),E=Math.imul(ie,ye),E=E+Math.imul(q,we)|0,_=Math.imul(q,ye);var ur=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(ur>>>26)|0,ur&=67108863,S=Math.imul(K,we),E=Math.imul(K,ye),E=E+Math.imul(te,we)|0,_=Math.imul(te,ye),S=S+Math.imul(ie,it)|0,E=E+Math.imul(ie,ot)|0,E=E+Math.imul(q,it)|0,_=_+Math.imul(q,ot)|0;var Xn=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,S=Math.imul(H,we),E=Math.imul(H,ye),E=E+Math.imul(U,we)|0,_=Math.imul(U,ye),S=S+Math.imul(K,it)|0,E=E+Math.imul(K,ot)|0,E=E+Math.imul(te,it)|0,_=_+Math.imul(te,ot)|0,S=S+Math.imul(ie,It)|0,E=E+Math.imul(ie,st)|0,E=E+Math.imul(q,It)|0,_=_+Math.imul(q,st)|0;var ei=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(ei>>>26)|0,ei&=67108863,S=Math.imul(le,we),E=Math.imul(le,ye),E=E+Math.imul(de,we)|0,_=Math.imul(de,ye),S=S+Math.imul(H,it)|0,E=E+Math.imul(H,ot)|0,E=E+Math.imul(U,it)|0,_=_+Math.imul(U,ot)|0,S=S+Math.imul(K,It)|0,E=E+Math.imul(K,st)|0,E=E+Math.imul(te,It)|0,_=_+Math.imul(te,st)|0,S=S+Math.imul(ie,Lt)|0,E=E+Math.imul(ie,ht)|0,E=E+Math.imul(q,Lt)|0,_=_+Math.imul(q,ht)|0;var ti=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(ti>>>26)|0,ti&=67108863,S=Math.imul(Me,we),E=Math.imul(Me,ye),E=E+Math.imul(ke,we)|0,_=Math.imul(ke,ye),S=S+Math.imul(le,it)|0,E=E+Math.imul(le,ot)|0,E=E+Math.imul(de,it)|0,_=_+Math.imul(de,ot)|0,S=S+Math.imul(H,It)|0,E=E+Math.imul(H,st)|0,E=E+Math.imul(U,It)|0,_=_+Math.imul(U,st)|0,S=S+Math.imul(K,Lt)|0,E=E+Math.imul(K,ht)|0,E=E+Math.imul(te,Lt)|0,_=_+Math.imul(te,ht)|0,S=S+Math.imul(ie,Ut)|0,E=E+Math.imul(ie,ft)|0,E=E+Math.imul(q,Ut)|0,_=_+Math.imul(q,ft)|0;var ri=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(ri>>>26)|0,ri&=67108863,S=Math.imul(Re,we),E=Math.imul(Re,ye),E=E+Math.imul(je,we)|0,_=Math.imul(je,ye),S=S+Math.imul(Me,it)|0,E=E+Math.imul(Me,ot)|0,E=E+Math.imul(ke,it)|0,_=_+Math.imul(ke,ot)|0,S=S+Math.imul(le,It)|0,E=E+Math.imul(le,st)|0,E=E+Math.imul(de,It)|0,_=_+Math.imul(de,st)|0,S=S+Math.imul(H,Lt)|0,E=E+Math.imul(H,ht)|0,E=E+Math.imul(U,Lt)|0,_=_+Math.imul(U,ht)|0,S=S+Math.imul(K,Ut)|0,E=E+Math.imul(K,ft)|0,E=E+Math.imul(te,Ut)|0,_=_+Math.imul(te,ft)|0,S=S+Math.imul(ie,Vt)|0,E=E+Math.imul(ie,xt)|0,E=E+Math.imul(q,Vt)|0,_=_+Math.imul(q,xt)|0;var bn=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(bn>>>26)|0,bn&=67108863,S=Math.imul(Je,we),E=Math.imul(Je,ye),E=E+Math.imul(ze,we)|0,_=Math.imul(ze,ye),S=S+Math.imul(Re,it)|0,E=E+Math.imul(Re,ot)|0,E=E+Math.imul(je,it)|0,_=_+Math.imul(je,ot)|0,S=S+Math.imul(Me,It)|0,E=E+Math.imul(Me,st)|0,E=E+Math.imul(ke,It)|0,_=_+Math.imul(ke,st)|0,S=S+Math.imul(le,Lt)|0,E=E+Math.imul(le,ht)|0,E=E+Math.imul(de,Lt)|0,_=_+Math.imul(de,ht)|0,S=S+Math.imul(H,Ut)|0,E=E+Math.imul(H,ft)|0,E=E+Math.imul(U,Ut)|0,_=_+Math.imul(U,ft)|0,S=S+Math.imul(K,Vt)|0,E=E+Math.imul(K,xt)|0,E=E+Math.imul(te,Vt)|0,_=_+Math.imul(te,xt)|0,S=S+Math.imul(ie,Gt)|0,E=E+Math.imul(ie,gt)|0,E=E+Math.imul(q,Gt)|0,_=_+Math.imul(q,gt)|0;var qn=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(qn>>>26)|0,qn&=67108863,S=Math.imul(Ve,we),E=Math.imul(Ve,ye),E=E+Math.imul(He,we)|0,_=Math.imul(He,ye),S=S+Math.imul(Je,it)|0,E=E+Math.imul(Je,ot)|0,E=E+Math.imul(ze,it)|0,_=_+Math.imul(ze,ot)|0,S=S+Math.imul(Re,It)|0,E=E+Math.imul(Re,st)|0,E=E+Math.imul(je,It)|0,_=_+Math.imul(je,st)|0,S=S+Math.imul(Me,Lt)|0,E=E+Math.imul(Me,ht)|0,E=E+Math.imul(ke,Lt)|0,_=_+Math.imul(ke,ht)|0,S=S+Math.imul(le,Ut)|0,E=E+Math.imul(le,ft)|0,E=E+Math.imul(de,Ut)|0,_=_+Math.imul(de,ft)|0,S=S+Math.imul(H,Vt)|0,E=E+Math.imul(H,xt)|0,E=E+Math.imul(U,Vt)|0,_=_+Math.imul(U,xt)|0,S=S+Math.imul(K,Gt)|0,E=E+Math.imul(K,gt)|0,E=E+Math.imul(te,Gt)|0,_=_+Math.imul(te,gt)|0,S=S+Math.imul(ie,Ft)|0,E=E+Math.imul(ie,lt)|0,E=E+Math.imul(q,Ft)|0,_=_+Math.imul(q,lt)|0;var Di=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Di>>>26)|0,Di&=67108863,S=Math.imul(Ge,we),E=Math.imul(Ge,ye),E=E+Math.imul(Xe,we)|0,_=Math.imul(Xe,ye),S=S+Math.imul(Ve,it)|0,E=E+Math.imul(Ve,ot)|0,E=E+Math.imul(He,it)|0,_=_+Math.imul(He,ot)|0,S=S+Math.imul(Je,It)|0,E=E+Math.imul(Je,st)|0,E=E+Math.imul(ze,It)|0,_=_+Math.imul(ze,st)|0,S=S+Math.imul(Re,Lt)|0,E=E+Math.imul(Re,ht)|0,E=E+Math.imul(je,Lt)|0,_=_+Math.imul(je,ht)|0,S=S+Math.imul(Me,Ut)|0,E=E+Math.imul(Me,ft)|0,E=E+Math.imul(ke,Ut)|0,_=_+Math.imul(ke,ft)|0,S=S+Math.imul(le,Vt)|0,E=E+Math.imul(le,xt)|0,E=E+Math.imul(de,Vt)|0,_=_+Math.imul(de,xt)|0,S=S+Math.imul(H,Gt)|0,E=E+Math.imul(H,gt)|0,E=E+Math.imul(U,Gt)|0,_=_+Math.imul(U,gt)|0,S=S+Math.imul(K,Ft)|0,E=E+Math.imul(K,lt)|0,E=E+Math.imul(te,Ft)|0,_=_+Math.imul(te,lt)|0,S=S+Math.imul(ie,Kt)|0,E=E+Math.imul(ie,Ht)|0,E=E+Math.imul(q,Kt)|0,_=_+Math.imul(q,Ht)|0;var Wn=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,S=Math.imul(J,we),E=Math.imul(J,ye),E=E+Math.imul(X,we)|0,_=Math.imul(X,ye),S=S+Math.imul(Ge,it)|0,E=E+Math.imul(Ge,ot)|0,E=E+Math.imul(Xe,it)|0,_=_+Math.imul(Xe,ot)|0,S=S+Math.imul(Ve,It)|0,E=E+Math.imul(Ve,st)|0,E=E+Math.imul(He,It)|0,_=_+Math.imul(He,st)|0,S=S+Math.imul(Je,Lt)|0,E=E+Math.imul(Je,ht)|0,E=E+Math.imul(ze,Lt)|0,_=_+Math.imul(ze,ht)|0,S=S+Math.imul(Re,Ut)|0,E=E+Math.imul(Re,ft)|0,E=E+Math.imul(je,Ut)|0,_=_+Math.imul(je,ft)|0,S=S+Math.imul(Me,Vt)|0,E=E+Math.imul(Me,xt)|0,E=E+Math.imul(ke,Vt)|0,_=_+Math.imul(ke,xt)|0,S=S+Math.imul(le,Gt)|0,E=E+Math.imul(le,gt)|0,E=E+Math.imul(de,Gt)|0,_=_+Math.imul(de,gt)|0,S=S+Math.imul(H,Ft)|0,E=E+Math.imul(H,lt)|0,E=E+Math.imul(U,Ft)|0,_=_+Math.imul(U,lt)|0,S=S+Math.imul(K,Kt)|0,E=E+Math.imul(K,Ht)|0,E=E+Math.imul(te,Kt)|0,_=_+Math.imul(te,Ht)|0,S=S+Math.imul(ie,br)|0,E=E+Math.imul(ie,Tt)|0,E=E+Math.imul(q,br)|0,_=_+Math.imul(q,Tt)|0;var $i=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+($i>>>26)|0,$i&=67108863,S=Math.imul(J,it),E=Math.imul(J,ot),E=E+Math.imul(X,it)|0,_=Math.imul(X,ot),S=S+Math.imul(Ge,It)|0,E=E+Math.imul(Ge,st)|0,E=E+Math.imul(Xe,It)|0,_=_+Math.imul(Xe,st)|0,S=S+Math.imul(Ve,Lt)|0,E=E+Math.imul(Ve,ht)|0,E=E+Math.imul(He,Lt)|0,_=_+Math.imul(He,ht)|0,S=S+Math.imul(Je,Ut)|0,E=E+Math.imul(Je,ft)|0,E=E+Math.imul(ze,Ut)|0,_=_+Math.imul(ze,ft)|0,S=S+Math.imul(Re,Vt)|0,E=E+Math.imul(Re,xt)|0,E=E+Math.imul(je,Vt)|0,_=_+Math.imul(je,xt)|0,S=S+Math.imul(Me,Gt)|0,E=E+Math.imul(Me,gt)|0,E=E+Math.imul(ke,Gt)|0,_=_+Math.imul(ke,gt)|0,S=S+Math.imul(le,Ft)|0,E=E+Math.imul(le,lt)|0,E=E+Math.imul(de,Ft)|0,_=_+Math.imul(de,lt)|0,S=S+Math.imul(H,Kt)|0,E=E+Math.imul(H,Ht)|0,E=E+Math.imul(U,Kt)|0,_=_+Math.imul(U,Ht)|0,S=S+Math.imul(K,br)|0,E=E+Math.imul(K,Tt)|0,E=E+Math.imul(te,br)|0,_=_+Math.imul(te,Tt)|0;var Bi=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,S=Math.imul(J,It),E=Math.imul(J,st),E=E+Math.imul(X,It)|0,_=Math.imul(X,st),S=S+Math.imul(Ge,Lt)|0,E=E+Math.imul(Ge,ht)|0,E=E+Math.imul(Xe,Lt)|0,_=_+Math.imul(Xe,ht)|0,S=S+Math.imul(Ve,Ut)|0,E=E+Math.imul(Ve,ft)|0,E=E+Math.imul(He,Ut)|0,_=_+Math.imul(He,ft)|0,S=S+Math.imul(Je,Vt)|0,E=E+Math.imul(Je,xt)|0,E=E+Math.imul(ze,Vt)|0,_=_+Math.imul(ze,xt)|0,S=S+Math.imul(Re,Gt)|0,E=E+Math.imul(Re,gt)|0,E=E+Math.imul(je,Gt)|0,_=_+Math.imul(je,gt)|0,S=S+Math.imul(Me,Ft)|0,E=E+Math.imul(Me,lt)|0,E=E+Math.imul(ke,Ft)|0,_=_+Math.imul(ke,lt)|0,S=S+Math.imul(le,Kt)|0,E=E+Math.imul(le,Ht)|0,E=E+Math.imul(de,Kt)|0,_=_+Math.imul(de,Ht)|0,S=S+Math.imul(H,br)|0,E=E+Math.imul(H,Tt)|0,E=E+Math.imul(U,br)|0,_=_+Math.imul(U,Tt)|0;var bi=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(bi>>>26)|0,bi&=67108863,S=Math.imul(J,Lt),E=Math.imul(J,ht),E=E+Math.imul(X,Lt)|0,_=Math.imul(X,ht),S=S+Math.imul(Ge,Ut)|0,E=E+Math.imul(Ge,ft)|0,E=E+Math.imul(Xe,Ut)|0,_=_+Math.imul(Xe,ft)|0,S=S+Math.imul(Ve,Vt)|0,E=E+Math.imul(Ve,xt)|0,E=E+Math.imul(He,Vt)|0,_=_+Math.imul(He,xt)|0,S=S+Math.imul(Je,Gt)|0,E=E+Math.imul(Je,gt)|0,E=E+Math.imul(ze,Gt)|0,_=_+Math.imul(ze,gt)|0,S=S+Math.imul(Re,Ft)|0,E=E+Math.imul(Re,lt)|0,E=E+Math.imul(je,Ft)|0,_=_+Math.imul(je,lt)|0,S=S+Math.imul(Me,Kt)|0,E=E+Math.imul(Me,Ht)|0,E=E+Math.imul(ke,Kt)|0,_=_+Math.imul(ke,Ht)|0,S=S+Math.imul(le,br)|0,E=E+Math.imul(le,Tt)|0,E=E+Math.imul(de,br)|0,_=_+Math.imul(de,Tt)|0;var Ei=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,S=Math.imul(J,Ut),E=Math.imul(J,ft),E=E+Math.imul(X,Ut)|0,_=Math.imul(X,ft),S=S+Math.imul(Ge,Vt)|0,E=E+Math.imul(Ge,xt)|0,E=E+Math.imul(Xe,Vt)|0,_=_+Math.imul(Xe,xt)|0,S=S+Math.imul(Ve,Gt)|0,E=E+Math.imul(Ve,gt)|0,E=E+Math.imul(He,Gt)|0,_=_+Math.imul(He,gt)|0,S=S+Math.imul(Je,Ft)|0,E=E+Math.imul(Je,lt)|0,E=E+Math.imul(ze,Ft)|0,_=_+Math.imul(ze,lt)|0,S=S+Math.imul(Re,Kt)|0,E=E+Math.imul(Re,Ht)|0,E=E+Math.imul(je,Kt)|0,_=_+Math.imul(je,Ht)|0,S=S+Math.imul(Me,br)|0,E=E+Math.imul(Me,Tt)|0,E=E+Math.imul(ke,br)|0,_=_+Math.imul(ke,Tt)|0;var Ai=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,S=Math.imul(J,Vt),E=Math.imul(J,xt),E=E+Math.imul(X,Vt)|0,_=Math.imul(X,xt),S=S+Math.imul(Ge,Gt)|0,E=E+Math.imul(Ge,gt)|0,E=E+Math.imul(Xe,Gt)|0,_=_+Math.imul(Xe,gt)|0,S=S+Math.imul(Ve,Ft)|0,E=E+Math.imul(Ve,lt)|0,E=E+Math.imul(He,Ft)|0,_=_+Math.imul(He,lt)|0,S=S+Math.imul(Je,Kt)|0,E=E+Math.imul(Je,Ht)|0,E=E+Math.imul(ze,Kt)|0,_=_+Math.imul(ze,Ht)|0,S=S+Math.imul(Re,br)|0,E=E+Math.imul(Re,Tt)|0,E=E+Math.imul(je,br)|0,_=_+Math.imul(je,Tt)|0;var Cn=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,S=Math.imul(J,Gt),E=Math.imul(J,gt),E=E+Math.imul(X,Gt)|0,_=Math.imul(X,gt),S=S+Math.imul(Ge,Ft)|0,E=E+Math.imul(Ge,lt)|0,E=E+Math.imul(Xe,Ft)|0,_=_+Math.imul(Xe,lt)|0,S=S+Math.imul(Ve,Kt)|0,E=E+Math.imul(Ve,Ht)|0,E=E+Math.imul(He,Kt)|0,_=_+Math.imul(He,Ht)|0,S=S+Math.imul(Je,br)|0,E=E+Math.imul(Je,Tt)|0,E=E+Math.imul(ze,br)|0,_=_+Math.imul(ze,Tt)|0;var Rs=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,S=Math.imul(J,Ft),E=Math.imul(J,lt),E=E+Math.imul(X,Ft)|0,_=Math.imul(X,lt),S=S+Math.imul(Ge,Kt)|0,E=E+Math.imul(Ge,Ht)|0,E=E+Math.imul(Xe,Kt)|0,_=_+Math.imul(Xe,Ht)|0,S=S+Math.imul(Ve,br)|0,E=E+Math.imul(Ve,Tt)|0,E=E+Math.imul(He,br)|0,_=_+Math.imul(He,Tt)|0;var ks=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(ks>>>26)|0,ks&=67108863,S=Math.imul(J,Kt),E=Math.imul(J,Ht),E=E+Math.imul(X,Kt)|0,_=Math.imul(X,Ht),S=S+Math.imul(Ge,br)|0,E=E+Math.imul(Ge,Tt)|0,E=E+Math.imul(Xe,br)|0,_=_+Math.imul(Xe,Tt)|0;var Ms=(R+S|0)+((E&8191)<<13)|0;R=(_+(E>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,S=Math.imul(J,br),E=Math.imul(J,Tt),E=E+Math.imul(X,br)|0,_=Math.imul(X,Tt);var Zo=(R+S|0)+((E&8191)<<13)|0;return R=(_+(E>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,I[0]=ur,I[1]=Xn,I[2]=ei,I[3]=ti,I[4]=ri,I[5]=bn,I[6]=qn,I[7]=Di,I[8]=Wn,I[9]=$i,I[10]=Bi,I[11]=bi,I[12]=Ei,I[13]=Ai,I[14]=Cn,I[15]=Rs,I[16]=ks,I[17]=Ms,I[18]=Zo,R!==0&&(I[19]=R,m.length++),m};Math.imul||(N=k);function O(b,d,m){m.negative=d.negative^b.negative,m.length=b.length+d.length;for(var x=0,A=0,I=0;I>>26)|0,A+=R>>>26,R&=67108863}m.words[I]=S,x=R,R=A}return x!==0?m.words[I]=x:m.length--,m._strip()}function B(b,d,m){return O(b,d,m)}s.prototype.mulTo=function(b,d){var m,x=this.length+b.length;return this.length===10&&b.length===10?m=N(this,b,d):x<63?m=k(this,b,d):x<1024?m=O(this,b,d):m=B(this,b,d),m},s.prototype.mul=function(b){var d=new s(null);return d.words=new Array(this.length+b.length),this.mulTo(b,d)},s.prototype.mulf=function(b){var d=new s(null);return d.words=new Array(this.length+b.length),B(this,b,d)},s.prototype.imul=function(b){return this.clone().mulTo(b,this)},s.prototype.imuln=function(b){var d=b<0;d&&(b=-b),n(typeof b=="number"),n(b<67108864);for(var m=0,x=0;x>=26,m+=A/67108864|0,m+=I>>>26,this.words[x]=I&67108863}return m!==0&&(this.words[x]=m,this.length++),d?this.ineg():this},s.prototype.muln=function(b){return this.clone().imuln(b)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(b){var d=T(b);if(d.length===0)return new s(1);for(var m=this,x=0;x=0);var d=b%26,m=(b-d)/26,x=67108863>>>26-d<<26-d,A;if(d!==0){var I=0;for(A=0;A>>26-d}I&&(this.words[A]=I,this.length++)}if(m!==0){for(A=this.length-1;A>=0;A--)this.words[A+m]=this.words[A];for(A=0;A=0);var x;d?x=(d-d%26)/26:x=0;var A=b%26,I=Math.min((b-A)/26,this.length),R=67108863^67108863>>>A<I)for(this.length-=I,E=0;E=0&&(_!==0||E>=x);E--){var L=this.words[E]|0;this.words[E]=_<<26-A|L>>>A,_=L&R}return S&&_!==0&&(S.words[S.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(b,d,m){return n(this.negative===0),this.iushrn(b,d,m)},s.prototype.shln=function(b){return this.clone().ishln(b)},s.prototype.ushln=function(b){return this.clone().iushln(b)},s.prototype.shrn=function(b){return this.clone().ishrn(b)},s.prototype.ushrn=function(b){return this.clone().iushrn(b)},s.prototype.testn=function(b){n(typeof b=="number"&&b>=0);var d=b%26,m=(b-d)/26,x=1<=0);var d=b%26,m=(b-d)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(d!==0&&m++,this.length=Math.min(m,this.length),d!==0){var x=67108863^67108863>>>d<=67108864;d++)this.words[d]-=67108864,d===this.length-1?this.words[d+1]=1:this.words[d+1]++;return this.length=Math.max(this.length,d+1),this},s.prototype.isubn=function(b){if(n(typeof b=="number"),n(b<67108864),b<0)return this.iaddn(-b);if(this.negative!==0)return this.negative=0,this.iaddn(b),this.negative=1,this;if(this.words[0]-=b,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var d=0;d>26)-(S/67108864|0),this.words[A+m]=I&67108863}for(;A>26,this.words[A+m]=I&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,A=0;A>26,this.words[A]=I&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(b,d){var m=this.length-b.length,x=this.clone(),A=b,I=A.words[A.length-1]|0,R=this._countBits(I);m=26-R,m!==0&&(A=A.ushln(m),x.iushln(m),I=A.words[A.length-1]|0);var S=x.length-A.length,E;if(d!=="mod"){E=new s(null),E.length=S+1,E.words=new Array(E.length);for(var _=0;_=0;ie--){var q=(x.words[A.length+ie]|0)*67108864+(x.words[A.length+ie-1]|0);for(q=Math.min(q/I|0,67108863),x._ishlnsubmul(A,q,ie);x.negative!==0;)q--,x.negative=0,x._ishlnsubmul(A,1,ie),x.isZero()||(x.negative^=1);E&&(E.words[ie]=q)}return E&&E._strip(),x._strip(),d!=="div"&&m!==0&&x.iushrn(m),{div:E||null,mod:x}},s.prototype.divmod=function(b,d,m){if(n(!b.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var x,A,I;return this.negative!==0&&b.negative===0?(I=this.neg().divmod(b,d),d!=="mod"&&(x=I.div.neg()),d!=="div"&&(A=I.mod.neg(),m&&A.negative!==0&&A.iadd(b)),{div:x,mod:A}):this.negative===0&&b.negative!==0?(I=this.divmod(b.neg(),d),d!=="mod"&&(x=I.div.neg()),{div:x,mod:I.mod}):this.negative&b.negative?(I=this.neg().divmod(b.neg(),d),d!=="div"&&(A=I.mod.neg(),m&&A.negative!==0&&A.isub(b)),{div:I.div,mod:A}):b.length>this.length||this.cmp(b)<0?{div:new s(0),mod:this}:b.length===1?d==="div"?{div:this.divn(b.words[0]),mod:null}:d==="mod"?{div:null,mod:new s(this.modrn(b.words[0]))}:{div:this.divn(b.words[0]),mod:new s(this.modrn(b.words[0]))}:this._wordDiv(b,d)},s.prototype.div=function(b){return this.divmod(b,"div",!1).div},s.prototype.mod=function(b){return this.divmod(b,"mod",!1).mod},s.prototype.umod=function(b){return this.divmod(b,"mod",!0).mod},s.prototype.divRound=function(b){var d=this.divmod(b);if(d.mod.isZero())return d.div;var m=d.div.negative!==0?d.mod.isub(b):d.mod,x=b.ushrn(1),A=b.andln(1),I=m.cmp(x);return I<0||A===1&&I===0?d.div:d.div.negative!==0?d.div.isubn(1):d.div.iaddn(1)},s.prototype.modrn=function(b){var d=b<0;d&&(b=-b),n(b<=67108863);for(var m=(1<<26)%b,x=0,A=this.length-1;A>=0;A--)x=(m*x+(this.words[A]|0))%b;return d?-x:x},s.prototype.modn=function(b){return this.modrn(b)},s.prototype.idivn=function(b){var d=b<0;d&&(b=-b),n(b<=67108863);for(var m=0,x=this.length-1;x>=0;x--){var A=(this.words[x]|0)+m*67108864;this.words[x]=A/b|0,m=A%b}return this._strip(),d?this.ineg():this},s.prototype.divn=function(b){return this.clone().idivn(b)},s.prototype.egcd=function(b){n(b.negative===0),n(!b.isZero());var d=this,m=b.clone();d.negative!==0?d=d.umod(b):d=d.clone();for(var x=new s(1),A=new s(0),I=new s(0),R=new s(1),S=0;d.isEven()&&m.isEven();)d.iushrn(1),m.iushrn(1),++S;for(var E=m.clone(),_=d.clone();!d.isZero();){for(var L=0,ie=1;!(d.words[0]&ie)&&L<26;++L,ie<<=1);if(L>0)for(d.iushrn(L);L-- >0;)(x.isOdd()||A.isOdd())&&(x.iadd(E),A.isub(_)),x.iushrn(1),A.iushrn(1);for(var q=0,Y=1;!(m.words[0]&Y)&&q<26;++q,Y<<=1);if(q>0)for(m.iushrn(q);q-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(E),R.isub(_)),I.iushrn(1),R.iushrn(1);d.cmp(m)>=0?(d.isub(m),x.isub(I),A.isub(R)):(m.isub(d),I.isub(x),R.isub(A))}return{a:I,b:R,gcd:m.iushln(S)}},s.prototype._invmp=function(b){n(b.negative===0),n(!b.isZero());var d=this,m=b.clone();d.negative!==0?d=d.umod(b):d=d.clone();for(var x=new s(1),A=new s(0),I=m.clone();d.cmpn(1)>0&&m.cmpn(1)>0;){for(var R=0,S=1;!(d.words[0]&S)&&R<26;++R,S<<=1);if(R>0)for(d.iushrn(R);R-- >0;)x.isOdd()&&x.iadd(I),x.iushrn(1);for(var E=0,_=1;!(m.words[0]&_)&&E<26;++E,_<<=1);if(E>0)for(m.iushrn(E);E-- >0;)A.isOdd()&&A.iadd(I),A.iushrn(1);d.cmp(m)>=0?(d.isub(m),x.isub(A)):(m.isub(d),A.isub(x))}var L;return d.cmpn(1)===0?L=x:L=A,L.cmpn(0)<0&&L.iadd(b),L},s.prototype.gcd=function(b){if(this.isZero())return b.abs();if(b.isZero())return this.abs();var d=this.clone(),m=b.clone();d.negative=0,m.negative=0;for(var x=0;d.isEven()&&m.isEven();x++)d.iushrn(1),m.iushrn(1);do{for(;d.isEven();)d.iushrn(1);for(;m.isEven();)m.iushrn(1);var A=d.cmp(m);if(A<0){var I=d;d=m,m=I}else if(A===0||m.cmpn(1)===0)break;d.isub(m)}while(!0);return m.iushln(x)},s.prototype.invm=function(b){return this.egcd(b).a.umod(b)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(b){return this.words[0]&b},s.prototype.bincn=function(b){n(typeof b=="number");var d=b%26,m=(b-d)/26,x=1<>>26,R&=67108863,this.words[I]=R}return A!==0&&(this.words[I]=A,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(b){var d=b<0;if(this.negative!==0&&!d)return-1;if(this.negative===0&&d)return 1;this._strip();var m;if(this.length>1)m=1;else{d&&(b=-b),n(b<=67108863,"Number is too big");var x=this.words[0]|0;m=x===b?0:xb.length)return 1;if(this.length=0;m--){var x=this.words[m]|0,A=b.words[m]|0;if(x!==A){xA&&(d=1);break}}return d},s.prototype.gtn=function(b){return this.cmpn(b)===1},s.prototype.gt=function(b){return this.cmp(b)===1},s.prototype.gten=function(b){return this.cmpn(b)>=0},s.prototype.gte=function(b){return this.cmp(b)>=0},s.prototype.ltn=function(b){return this.cmpn(b)===-1},s.prototype.lt=function(b){return this.cmp(b)===-1},s.prototype.lten=function(b){return this.cmpn(b)<=0},s.prototype.lte=function(b){return this.cmp(b)<=0},s.prototype.eqn=function(b){return this.cmpn(b)===0},s.prototype.eq=function(b){return this.cmp(b)===0},s.red=function(b){return new F(b)},s.prototype.toRed=function(b){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),b.convertTo(this)._forceRed(b)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(b){return this.red=b,this},s.prototype.forceRed=function(b){return n(!this.red,"Already a number in reduction context"),this._forceRed(b)},s.prototype.redAdd=function(b){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,b)},s.prototype.redIAdd=function(b){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,b)},s.prototype.redSub=function(b){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,b)},s.prototype.redISub=function(b){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,b)},s.prototype.redShl=function(b){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,b)},s.prototype.redMul=function(b){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,b),this.red.mul(this,b)},s.prototype.redIMul=function(b){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,b),this.red.imul(this,b)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(b){return n(this.red&&!b.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,b)};var z={k256:null,p224:null,p192:null,p25519:null};function G(b,d){this.name=b,this.p=new s(d,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var b=new s(null);return b.words=new Array(Math.ceil(this.n/13)),b},G.prototype.ireduce=function(b){var d=b,m;do this.split(d,this.tmp),d=this.imulK(d),d=d.iadd(this.tmp),m=d.bitLength();while(m>this.n);var x=m0?d.isub(this.p):d.strip!==void 0?d.strip():d._strip(),d},G.prototype.split=function(b,d){b.iushrn(this.n,0,d)},G.prototype.imulK=function(b){return b.imul(this.k)};function $(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i($,G),$.prototype.split=function(b,d){for(var m=4194303,x=Math.min(b.length,9),A=0;A>>22,I=R}I>>>=22,b.words[A-10]=I,I===0&&b.length>10?b.length-=10:b.length-=9},$.prototype.imulK=function(b){b.words[b.length]=0,b.words[b.length+1]=0,b.length+=2;for(var d=0,m=0;m>>=26,b.words[m]=A,d=x}return d!==0&&(b.words[b.length++]=d),b},s._prime=function(b){if(z[b])return z[b];var d;if(b==="k256")d=new $;else if(b==="p224")d=new D;else if(b==="p192")d=new V;else if(b==="p25519")d=new Q;else throw new Error("Unknown prime "+b);return z[b]=d,d};function F(b){if(typeof b=="string"){var d=s._prime(b);this.m=d.p,this.prime=d}else n(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}F.prototype._verify1=function(b){n(b.negative===0,"red works only with positives"),n(b.red,"red works only with red numbers")},F.prototype._verify2=function(b,d){n((b.negative|d.negative)===0,"red works only with positives"),n(b.red&&b.red===d.red,"red works only with red numbers")},F.prototype.imod=function(b){return this.prime?this.prime.ireduce(b)._forceRed(this):(h(b,b.umod(this.m)._forceRed(this)),b)},F.prototype.neg=function(b){return b.isZero()?b.clone():this.m.sub(b)._forceRed(this)},F.prototype.add=function(b,d){this._verify2(b,d);var m=b.add(d);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},F.prototype.iadd=function(b,d){this._verify2(b,d);var m=b.iadd(d);return m.cmp(this.m)>=0&&m.isub(this.m),m},F.prototype.sub=function(b,d){this._verify2(b,d);var m=b.sub(d);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},F.prototype.isub=function(b,d){this._verify2(b,d);var m=b.isub(d);return m.cmpn(0)<0&&m.iadd(this.m),m},F.prototype.shl=function(b,d){return this._verify1(b),this.imod(b.ushln(d))},F.prototype.imul=function(b,d){return this._verify2(b,d),this.imod(b.imul(d))},F.prototype.mul=function(b,d){return this._verify2(b,d),this.imod(b.mul(d))},F.prototype.isqr=function(b){return this.imul(b,b.clone())},F.prototype.sqr=function(b){return this.mul(b,b)},F.prototype.sqrt=function(b){if(b.isZero())return b.clone();var d=this.m.andln(3);if(n(d%2===1),d===3){var m=this.m.add(new s(1)).iushrn(2);return this.pow(b,m)}for(var x=this.m.subn(1),A=0;!x.isZero()&&x.andln(1)===0;)A++,x.iushrn(1);n(!x.isZero());var I=new s(1).toRed(this),R=I.redNeg(),S=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,S).cmp(R)!==0;)E.redIAdd(R);for(var _=this.pow(E,x),L=this.pow(b,x.addn(1).iushrn(1)),ie=this.pow(b,x),q=A;ie.cmp(I)!==0;){for(var Y=ie,K=0;Y.cmp(I)!==0;K++)Y=Y.redSqr();n(K=0;A--){for(var _=d.words[A],L=E-1;L>=0;L--){var ie=_>>L&1;if(I!==x[0]&&(I=this.sqr(I)),ie===0&&R===0){S=0;continue}R<<=1,R|=ie,S++,!(S!==m&&(A!==0||L!==0))&&(I=this.mul(I,x[R]),S=0,R=0)}E=26}return I},F.prototype.convertTo=function(b){var d=b.umod(this.m);return d===b?d.clone():d},F.prototype.convertFrom=function(b){var d=b.clone();return d.red=null,d},s.mont=function(b){return new M(b)};function M(b){F.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(M,F),M.prototype.convertTo=function(b){return this.imod(b.ushln(this.shift))},M.prototype.convertFrom=function(b){var d=this.imod(b.mul(this.rinv));return d.red=null,d},M.prototype.imul=function(b,d){if(b.isZero()||d.isZero())return b.words[0]=0,b.length=1,b;var m=b.imul(d),x=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=m.isub(x).iushrn(this.shift),I=A;return A.cmp(this.m)>=0?I=A.isub(this.m):A.cmpn(0)<0&&(I=A.iadd(this.m)),I._forceRed(this)},M.prototype.mul=function(b,d){if(b.isZero()||d.isZero())return new s(0)._forceRed(this);var m=b.mul(d),x=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=m.isub(x).iushrn(this.shift),I=A;return A.cmp(this.m)>=0?I=A.isub(this.m):A.cmpn(0)<0&&(I=A.iadd(this.m)),I._forceRed(this)},M.prototype.invm=function(b){var d=this.imod(b._invmp(this.m).mul(this.r2));return d._forceRed(this)}})(r,_de)})(Pde);var Hr=Pde.exports;const Ode="bignumber/5.7.0";var nT=Hr.BN;const i0=new nn(Ode),bU={},Dde=9007199254740991;function JKe(r){return r!=null&&(Oi.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||el(r)||typeof r=="bigint"||Xy(r))}let $de=!1,Oi=class{constructor(e,t){e!==bU&&i0.throwError("cannot call constructor directly; use BigNumber.from",nn.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return vc(gn(this).fromTwos(e))}toTwos(e){return vc(gn(this).toTwos(e))}abs(){return this._hex[0]==="-"?Oi.from(this._hex.substring(1)):this}add(e){return vc(gn(this).add(gn(e)))}sub(e){return vc(gn(this).sub(gn(e)))}div(e){return Oi.from(e).isZero()&&ou("division-by-zero","div"),vc(gn(this).div(gn(e)))}mul(e){return vc(gn(this).mul(gn(e)))}mod(e){const t=gn(e);return t.isNeg()&&ou("division-by-zero","mod"),vc(gn(this).umod(t))}pow(e){const t=gn(e);return t.isNeg()&&ou("negative-power","pow"),vc(gn(this).pow(t))}and(e){const t=gn(e);return(this.isNegative()||t.isNeg())&&ou("unbound-bitwise-result","and"),vc(gn(this).and(t))}or(e){const t=gn(e);return(this.isNegative()||t.isNeg())&&ou("unbound-bitwise-result","or"),vc(gn(this).or(t))}xor(e){const t=gn(e);return(this.isNegative()||t.isNeg())&&ou("unbound-bitwise-result","xor"),vc(gn(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ou("negative-width","mask"),vc(gn(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ou("negative-width","shl"),vc(gn(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ou("negative-width","shr"),vc(gn(this).shrn(e))}eq(e){return gn(this).eq(gn(e))}lt(e){return gn(this).lt(gn(e))}lte(e){return gn(this).lte(gn(e))}gt(e){return gn(this).gt(gn(e))}gte(e){return gn(this).gte(gn(e))}isNegative(){return this._hex[0]==="-"}isZero(){return gn(this).isZero()}toNumber(){try{return gn(this).toNumber()}catch{ou("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return i0.throwError("this platform does not support BigInt",nn.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$de||($de=!0,i0.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?i0.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",nn.errors.UNEXPECTED_ARGUMENT,{}):i0.throwError("BigNumber.toString does not accept parameters",nn.errors.UNEXPECTED_ARGUMENT,{})),gn(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Oi)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Oi(bU,Y8(e)):e.match(/^-?[0-9]+$/)?new Oi(bU,Y8(new nT(e))):i0.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ou("underflow","BigNumber.from",e),(e>=Dde||e<=-Dde)&&ou("overflow","BigNumber.from",e),Oi.from(String(e));const t=e;if(typeof t=="bigint")return Oi.from(t.toString());if(Xy(t))return Oi.from(ja(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return Oi.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(el(n)||n[0]==="-"&&el(n.substring(1))))return Oi.from(n)}return i0.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Y8(r){if(typeof r!="string")return Y8(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&i0.throwArgumentError("invalid hex","value",r),r=Y8(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function vc(r){return Oi.from(Y8(r))}function gn(r){const e=Oi.from(r).toHexString();return e[0]==="-"?new nT("-"+e.substring(3),16):new nT(e.substring(2),16)}function ou(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),i0.throwError(r,nn.errors.NUMERIC_FAULT,n)}function YKe(r){return new nT(r,36).toString(16)}const za=new nn(Ode),Q8={},Bde=Oi.from(0),Lde=Oi.from(-1);function Ude(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),za.throwError(r,nn.errors.NUMERIC_FAULT,i)}let X8="0";for(;X8.length<256;)X8+=X8;function wU(r){if(typeof r!="number")try{r=Oi.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+X8.substring(0,r):za.throwArgumentError("invalid decimal size","decimals",r)}function vU(r,e){e==null&&(e=0);const t=wU(e);r=Oi.from(r);const n=r.lt(Bde);n&&(r=r.mul(Lde));let i=r.mod(t).toString();for(;i.length2&&za.throwArgumentError("too many decimal points","value",r);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>t.length-1&&Ude("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&za.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);t=s("signed","boolean",t),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&za.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&za.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ex(Q8,t,n,i)}},va=class{constructor(e,t,n,i){e!==Q8&&za.throwError("cannot use FixedNumber constructor; use FixedNumber.from",nn.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&za.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=s0(this._value,this.format.decimals),n=s0(e._value,e.format.decimals);return va.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=s0(this._value,this.format.decimals),n=s0(e._value,e.format.decimals);return va.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=s0(this._value,this.format.decimals),n=s0(e._value,e.format.decimals);return va.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=s0(this._value,this.format.decimals),n=s0(e._value,e.format.decimals);return va.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=va.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(Fde.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=va.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(Fde.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&za.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=va.from("1"+X8.substring(0,e),this.format),i=QKe.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&za.throwArgumentError("invalid byte width","width",e);const t=Oi.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Tf(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return va.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!JKe(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),va.fromString(vU(e,t),ex.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=ex.from(t),i=s0(e,n.decimals);!n.signed&&i.lt(Bde)&&Ude("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Tf(s,n.width/8));const o=vU(i,n.decimals);return new va(Q8,s,o,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=ex.from(t);if(fs(e).length>n.width/8)throw new Error("overflow");let i=Oi.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=vU(i,n.decimals);return new va(Q8,s,o,n)}static from(e,t){if(typeof e=="string")return va.fromString(e,t);if(Xy(e))return va.fromBytes(e,t);try{return va.fromValue(e,0,t)}catch(n){if(n.code!==nn.errors.INVALID_ARGUMENT)throw n}return za.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}};const Fde=va.from(1),QKe=va.from("0.5"),XKe="strings/5.7.0",eZe=new nn(XKe);var iT;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(iT||(iT={}));var jde;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(jde||(jde={}));function yU(r,e=iT.current){e!=iT.current&&(eZe.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);if(n>=r.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return fs(t)}function tZe(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let s=i.split(":");t+=parseInt(s[0],16),n[t]=e(s[1])}),n}function zde(r){let e=0;return r.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}zde("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),xU("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),xU("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),xU("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",tZe),zde("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");const Hde="hash/5.7.0";function rZe(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(a)?i(a,o-1):t.push(a)})};return i(r,e),t}function nZe(r){const e={};for(let t=0;t>--l&1}const p=31,g=Math.pow(2,p),w=g>>>1,y=w>>1,C=g-1;let T=0;for(let z=0;z1;){let Q=G+$>>>1;z>>1|h(),D=D<<1^w,V=(V^w)<<1|w|1;N=D,O=1+V-D}let B=n-4;return k.map(z=>{switch(z-B){case 3:return B+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return B+256+(r[a++]<<8|r[a++]);case 1:return B+r[a++];default:return z-1}})}function sZe(r){let e=0;return()=>r[e++]}function oZe(r){return sZe(iZe(r))}function aZe(r){return r&1?~r>>1:r>>1}function cZe(r,e){let t=Array(r);for(let n=0;ne[o]):t}function uZe(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(fZe(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(dZe(t,r))}return nZe(qde(e))}function hZe(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function Vde(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function fZe(r,e){let t=1+e(),n=e(),i=hZe(e),s=Vde(i.length,1+r,e);return qde(s.map((o,a)=>{const l=o[0],u=o.slice(1);return Array(i[a]).fill(void 0).map((h,p)=>{let g=p*n;return[l+p*t,u.map(w=>w+g)]})}))}function dZe(r,e){let t=1+e();return Vde(t,1+r,e).map(n=>[n[0],n.slice(1)])}function pZe(r){let e=sT(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let u=sT(r,e);if(u.length==0)break;n.push({set:new Set(u),node:t()})}n.sort((u,h)=>h.set.size-u.set.size);let i=r(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function gZe(){return oZe(rZe("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdA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hhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const oT=gZe();new Set(sT(oT)),new Set(sT(oT)),uZe(oT),pZe(oT),new nn(Hde),new Uint8Array(32).fill(0);const mZe=`Ethereum Signed Message: -`;function Gde(r){return typeof r=="string"&&(r=yU(r)),mU(qKe([yU(mZe),yU(String(r.length)),r]))}const bZe="rlp/5.7.0";new nn(bZe);const wZe="address/5.7.0",tx=new nn(wZe);function Kde(r){el(r,20)||tx.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=fs(mU(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const vZe=9007199254740991;function yZe(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const _U={};for(let r=0;r<10;r++)_U[String(r)]=String(r);for(let r=0;r<26;r++)_U[String.fromCharCode(65+r)]=String(10+r);const Zde=Math.floor(yZe(vZe));function xZe(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>_U[n]).join("");for(;e.length>=Zde;){let n=e.substring(0,Zde);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function _Ze(r){let e=null;if(typeof r!="string"&&tx.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=Kde(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&tx.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==xZe(r)&&tx.throwArgumentError("bad icap checksum","address",r),e=YKe(r.substring(4));e.length<40;)e="0"+e;e=Kde("0x"+e)}else tx.throwArgumentError("invalid address","address",r);return e}const EZe="properties/5.7.0";new nn(EZe);function rx(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}new nn(Hde),new Uint8Array(32).fill(0),Oi.from(-1);const AZe=Oi.from(0),CZe=Oi.from(1);Oi.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Tf(CZe.toHexString(),32),Tf(AZe.toHexString(),32);var Rf={},mn={},nx=Jde;function Jde(r,e){if(!r)throw new Error(e||"Assertion failed")}Jde.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var EU={exports:{}};typeof Object.create=="function"?EU.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:EU.exports=function(r,e){if(e){r.super_=e;var t=function(){};t.prototype=e.prototype,r.prototype=new t,r.prototype.constructor=r}};var SZe=nx,IZe=EU.exports;mn.inherits=IZe;function TZe(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function RZe(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=s&63|128):TZe(r,i)?(s=65536+((s&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}mn.htonl=Yde;function MZe(r,e){for(var t="",n=0;n>>0}return s}mn.join32=NZe;function PZe(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=s>>>16&255,t[i+2]=s>>>8&255,t[i+3]=s&255):(t[i+3]=s>>>24,t[i+2]=s>>>16&255,t[i+1]=s>>>8&255,t[i]=s&255)}return t}mn.split32=PZe;function OZe(r,e){return r>>>e|r<<32-e}mn.rotr32=OZe;function DZe(r,e){return r<>>32-e}mn.rotl32=DZe;function $Ze(r,e){return r+e>>>0}mn.sum32=$Ze;function BZe(r,e,t){return r+e+t>>>0}mn.sum32_3=BZe;function LZe(r,e,t,n){return r+e+t+n>>>0}mn.sum32_4=LZe;function UZe(r,e,t,n,i){return r+e+t+n+i>>>0}mn.sum32_5=UZe;function FZe(r,e,t,n){var i=r[e],s=r[e+1],o=n+s>>>0,a=(o>>0,r[e+1]=o}mn.sum64=FZe;function jZe(r,e,t,n){var i=e+n>>>0,s=(i>>0}mn.sum64_hi=jZe;function zZe(r,e,t,n){var i=e+n;return i>>>0}mn.sum64_lo=zZe;function HZe(r,e,t,n,i,s,o,a){var l=0,u=e;u=u+n>>>0,l+=u>>0,l+=u>>0,l+=u>>0}mn.sum64_4_hi=HZe;function qZe(r,e,t,n,i,s,o,a){var l=e+n+s+a;return l>>>0}mn.sum64_4_lo=qZe;function WZe(r,e,t,n,i,s,o,a,l,u){var h=0,p=e;p=p+n>>>0,h+=p>>0,h+=p>>0,h+=p>>0,h+=p>>0}mn.sum64_5_hi=WZe;function VZe(r,e,t,n,i,s,o,a,l,u){var h=e+n+s+a+u;return h>>>0}mn.sum64_5_lo=VZe;function GZe(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}mn.rotr64_hi=GZe;function KZe(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}mn.rotr64_lo=KZe;function ZZe(r,e,t){return r>>>t}mn.shr64_hi=ZZe;function JZe(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}mn.shr64_lo=JZe;var e3={},e0e=mn,YZe=nx;function aT(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e3.BlockHash=aT,aT.prototype.update=function(r,e){if(r=e0e.toArray(r,e),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){r=this.pending;var t=r.length%this._delta8;this.pending=r.slice(r.length-t,r.length),this.pending.length===0&&(this.pending=null),r=e0e.join32(r,0,r.length-t,this.endian);for(var n=0;n>>24&255,n[i++]=r>>>16&255,n[i++]=r>>>8&255,n[i++]=r&255}else for(n[i++]=r&255,n[i++]=r>>>8&255,n[i++]=r>>>16&255,n[i++]=r>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,s=8;s>>3}kf.g0_256=rJe;function nJe(r){return Mf(r,17)^Mf(r,19)^r>>>10}kf.g1_256=nJe;var r3=mn,iJe=e3,sJe=kf,AU=r3.rotl32,ix=r3.sum32,oJe=r3.sum32_5,aJe=sJe.ft_1,i0e=iJe.BlockHash,cJe=[1518500249,1859775393,2400959708,3395469782];function Nf(){if(!(this instanceof Nf))return new Nf;i0e.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r3.inherits(Nf,i0e);var lJe=Nf;Nf.blockSize=512,Nf.outSize=160,Nf.hmacStrength=80,Nf.padLength=64,Nf.prototype._update=function(r,e){for(var t=this.W,n=0;n<16;n++)t[n]=r[e+n];for(;nthis.blockSize&&(r=new this.Hash().update(r).digest()),JJe(r.length<=this.blockSize);for(var e=r.length;e>8,g=h&255;p?l.push(p,g):l.push(g)}return l}t.toArray=n;function i(o){return o.length===1?"0"+o:o}t.zero2=i;function s(o){for(var a="",l=0;l(g>>1)-1?C=(g>>1)-T:C=T,w.isubn(C)):C=0,p[y]=C,w.iushrn(1)}return p}t.getNAF=n;function i(l,u){var h=[[],[]];l=l.clone(),u=u.clone();for(var p=0,g=0,w;l.cmpn(-p)>0||u.cmpn(-g)>0;){var y=l.andln(3)+p&3,C=u.andln(3)+g&3;y===3&&(y=-1),C===3&&(C=-1);var T;y&1?(w=l.andln(7)+p&7,(w===3||w===5)&&C===2?T=-y:T=y):T=0,h[0].push(T);var k;C&1?(w=u.andln(7)+g&7,(w===3||w===5)&&y===2?k=-C:k=C):k=0,h[1].push(k),2*p===T+1&&(p=1-p),2*g===k+1&&(g=1-g),l.iushrn(1),u.iushrn(1)}return h}t.getJSF=i;function s(l,u,h){var p="_"+u;l.prototype[u]=function(){return this[p]!==void 0?this[p]:this[p]=h.call(this)}}t.cachedProperty=s;function o(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=o;function a(l){return new Hr(l,"hex","le")}t.intFromLE=a}),lT=tl.getNAF,XJe=tl.getJSF,uT=tl.assert;function C1(r,e){this.type=r,this.p=new Hr(e.p,16),this.red=e.prime?Hr.red(e.prime):Hr.mont(this.p),this.zero=new Hr(0).toRed(this.red),this.one=new Hr(1).toRed(this.red),this.two=new Hr(2).toRed(this.red),this.n=e.n&&new Hr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var u2=C1;C1.prototype.point=function(){throw new Error("Not implemented")},C1.prototype.validate=function(){throw new Error("Not implemented")},C1.prototype._fixedNafMul=function(r,e){uT(r.precomputed);var t=r._getDoubles(),n=lT(e,1,this._bitLength),i=(1<=o;l--)a=(a<<1)+n[l];s.push(a)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),p=i;p>0;p--){for(o=0;o=0;a--){for(var l=0;a>=0&&s[a]===0;a--)l++;if(a>=0&&l++,o=o.dblp(l),a<0)break;var u=s[a];uT(u!==0),r.type==="affine"?u>0?o=o.mixedAdd(i[u-1>>1]):o=o.mixedAdd(i[-u-1>>1].neg()):u>0?o=o.add(i[u-1>>1]):o=o.add(i[-u-1>>1].neg())}return r.type==="affine"?o.toP():o},C1.prototype._wnafMulAdd=function(r,e,t,n,i){var s=this._wnafT1,o=this._wnafT2,a=this._wnafT3,l=0,u,h,p;for(u=0;u=1;u-=2){var w=u-1,y=u;if(s[w]!==1||s[y]!==1){a[w]=lT(t[w],s[w],this._bitLength),a[y]=lT(t[y],s[y],this._bitLength),l=Math.max(a[w].length,l),l=Math.max(a[y].length,l);continue}var C=[e[w],null,null,e[y]];e[w].y.cmp(e[y].y)===0?(C[1]=e[w].add(e[y]),C[2]=e[w].toJ().mixedAdd(e[y].neg())):e[w].y.cmp(e[y].y.redNeg())===0?(C[1]=e[w].toJ().mixedAdd(e[y]),C[2]=e[w].add(e[y].neg())):(C[1]=e[w].toJ().mixedAdd(e[y]),C[2]=e[w].toJ().mixedAdd(e[y].neg()));var T=[-3,-1,-5,-7,0,7,5,1,3],k=XJe(t[w],t[y]);for(l=Math.max(k[0].length,l),a[w]=new Array(l),a[y]=new Array(l),h=0;h=0;u--){for(var G=0;u>=0;){var $=!0;for(h=0;h=0&&G++,B=B.dblp(G),u<0)break;for(h=0;h0?p=o[h][D-1>>1]:D<0&&(p=o[h][-D-1>>1].neg()),p.type==="affine"?B=B.mixedAdd(p):B=B.add(p))}}for(u=0;u=Math.ceil((r.bitLength()+1)/e.step):!1},au.prototype._getDoubles=function(r,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],n=this,i=0;i=0&&(g=l,w=u),h.negative&&(h=h.neg(),p=p.neg()),g.negative&&(g=g.neg(),w=w.neg()),[{a:h,b:p},{a:g,b:w}]},cu.prototype._endoSplit=function(r){var e=this.endo.basis,t=e[0],n=e[1],i=n.b.mul(r).divRound(this.n),s=t.b.neg().mul(r).divRound(this.n),o=i.mul(t.a),a=s.mul(n.a),l=i.mul(t.b),u=s.mul(n.b),h=r.sub(o).sub(a),p=l.add(u).neg();return{k1:h,k2:p}},cu.prototype.pointFromX=function(r,e){r=new Hr(r,16),r.red||(r=r.toRed(this.red));var t=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b),n=t.redSqrt();if(n.redSqr().redSub(t).cmp(this.zero)!==0)throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(r,n)},cu.prototype.validate=function(r){if(r.inf)return!0;var e=r.x,t=r.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return t.redSqr().redISub(i).cmpn(0)===0},cu.prototype._endoWnafMulAdd=function(r,e,t){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s":""},To.prototype.isInfinity=function(){return this.inf},To.prototype.add=function(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(this.x.cmp(r.x)===0)return this.curve.point(null,null);var e=this.y.redSub(r.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(r.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(r.x),n=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,n)},To.prototype.dbl=function(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(r.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),n=r.redInvm(),i=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},To.prototype.getX=function(){return this.x.fromRed()},To.prototype.getY=function(){return this.y.fromRed()},To.prototype.mul=function(r){return r=new Hr(r,16),this.isInfinity()?this:this._hasDoubles(r)?this.curve._fixedNafMul(this,r):this.curve.endo?this.curve._endoWnafMulAdd([this],[r]):this.curve._wnafMul(this,r)},To.prototype.mulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},To.prototype.jmulAdd=function(r,e,t){var n=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},To.prototype.eq=function(r){return this===r||this.inf===r.inf&&(this.inf||this.x.cmp(r.x)===0&&this.y.cmp(r.y)===0)},To.prototype.neg=function(r){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var t=this.precomputed,n=function(i){return i.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e},To.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var r=this.curve.jpoint(this.x,this.y,this.curve.one);return r};function Vo(r,e,t,n){u2.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Hr(0)):(this.x=new Hr(e,16),this.y=new Hr(t,16),this.z=new Hr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}kU(Vo,u2.BasePoint),cu.prototype.jpoint=function(r,e,t){return new Vo(this,r,e,t)},Vo.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm(),e=r.redSqr(),t=this.x.redMul(e),n=this.y.redMul(e).redMul(r);return this.curve.point(t,n)},Vo.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Vo.prototype.add=function(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var e=r.z.redSqr(),t=this.z.redSqr(),n=this.x.redMul(e),i=r.x.redMul(t),s=this.y.redMul(e.redMul(r.z)),o=r.y.redMul(t.redMul(this.z)),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),p=n.redMul(u),g=l.redSqr().redIAdd(h).redISub(p).redISub(p),w=l.redMul(p.redISub(g)).redISub(s.redMul(h)),y=this.z.redMul(r.z).redMul(a);return this.curve.jpoint(g,w,y)},Vo.prototype.mixedAdd=function(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var e=this.z.redSqr(),t=this.x,n=r.x.redMul(e),i=this.y,s=r.y.redMul(e).redMul(this.z),o=t.redSub(n),a=i.redSub(s);if(o.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=o.redSqr(),u=l.redMul(o),h=t.redMul(l),p=a.redSqr().redIAdd(u).redISub(h).redISub(h),g=a.redMul(h.redISub(p)).redISub(i.redMul(u)),w=this.z.redMul(o);return this.curve.jpoint(p,g,w)},Vo.prototype.dblp=function(r){if(r===0)return this;if(this.isInfinity())return this;if(!r)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var t=this;for(e=0;e=0)return!1;if(t.redIAdd(i),this.x.cmp(t)===0)return!0}},Vo.prototype.inspect=function(){return this.isInfinity()?"":""},Vo.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var hT=o3(function(r,e){var t=e;t.base=u2,t.short=tYe,t.mont=null,t.edwards=null}),fT=o3(function(r,e){var t=e,n=tl.assert;function i(a){a.type==="short"?this.curve=new hT.short(a):a.type==="edwards"?this.curve=new hT.edwards(a):this.curve=new hT.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function s(a,l){Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){var u=new i(l);return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,value:u}),u}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Rf.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Rf.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Rf.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Rf.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Rf.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Rf.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Rf.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Rf.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function S1(r){if(!(this instanceof S1))return new S1(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=ch.toArray(r.entropy,r.entropyEnc||"hex"),t=ch.toArray(r.nonce,r.nonceEnc||"hex"),n=ch.toArray(r.pers,r.persEnc||"hex");RU(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var v0e=S1;S1.prototype._init=function(r,e,t){var n=r.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(r.concat(t||[])),this._reseed=1},S1.prototype.generate=function(r,e,t,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(n=t,t=e,e=null),t&&(t=ch.toArray(t,n||"hex"),this._update(t));for(var i=[];i.length"};var rYe=tl.assert;function dT(r,e){if(r instanceof dT)return r;this._importDER(r,e)||(rYe(r.r&&r.s,"Signature without r or s"),this.r=new Hr(r.r,16),this.s=new Hr(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var pT=dT;function nYe(){this.place=0}function PU(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function y0e(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}dT.prototype.toDER=function(r){var e=this.r.toArray(),t=this.s.toArray();for(e[0]&128&&(e=[0].concat(e)),t[0]&128&&(t=[0].concat(t)),e=y0e(e),t=y0e(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var n=[2];OU(n,e.length),n=n.concat(e),n.push(2),OU(n,t.length);var i=n.concat(t),s=[48];return OU(s,i.length),s=s.concat(i),tl.encode(s,r)};var iYe=function(){throw new Error("unsupported")},x0e=tl.assert;function lu(r){if(!(this instanceof lu))return new lu(r);typeof r=="string"&&(x0e(Object.prototype.hasOwnProperty.call(fT,r),"Unknown curve "+r),r=fT[r]),r instanceof fT.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var sYe=lu;lu.prototype.keyPair=function(r){return new NU(this,r)},lu.prototype.keyFromPrivate=function(r,e){return NU.fromPrivate(this,r,e)},lu.prototype.keyFromPublic=function(r,e){return NU.fromPublic(this,r,e)},lu.prototype.genKeyPair=function(r){r||(r={});for(var e=new v0e({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||iYe(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new Hr(2));;){var i=new Hr(e.generate(t));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},lu.prototype._truncateToN=function(r,e){var t=r.byteLength()*8-this.n.bitLength();return t>0&&(r=r.ushrn(t)),!e&&r.cmp(this.n)>=0?r.sub(this.n):r},lu.prototype.sign=function(r,e,t,n){typeof t=="object"&&(n=t,t=null),n||(n={}),e=this.keyFromPrivate(e,t),r=this._truncateToN(new Hr(r,16));for(var i=this.n.byteLength(),s=e.getPrivate().toArray("be",i),o=r.toArray("be",i),a=new v0e({hash:this.hash,entropy:s,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new Hr(1)),u=0;;u++){var h=n.k?n.k(u):new Hr(a.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var g=p.getX(),w=g.umod(this.n);if(w.cmpn(0)!==0){var y=h.invm(this.n).mul(w.mul(e.getPrivate()).iadd(r));if(y=y.umod(this.n),y.cmpn(0)!==0){var C=(p.getY().isOdd()?1:0)|(g.cmp(w)!==0?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),C^=1),new pT({r:w,s:y,recoveryParam:C})}}}}}},lu.prototype.verify=function(r,e,t,n){r=this._truncateToN(new Hr(r,16)),t=this.keyFromPublic(t,n),e=new pT(e,"hex");var i=e.r,s=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),a=o.mul(r).umod(this.n),l=o.mul(i).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(a,t.getPublic(),l),u.isInfinity()?!1:u.eqXToP(i)):(u=this.g.mulAdd(a,t.getPublic(),l),u.isInfinity()?!1:u.getX().umod(this.n).cmp(i)===0)},lu.prototype.recoverPubKey=function(r,e,t,n){x0e((3&t)===t,"The recovery param is more than two bits"),e=new pT(e,n);var i=this.n,s=new Hr(r),o=e.r,a=e.s,l=t&1,u=t>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var h=e.r.invm(i),p=i.sub(s).mul(h).umod(i),g=a.mul(h).umod(i);return this.g.mulAdd(p,o,g)},lu.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new pT(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(r,e,i)}catch{continue}if(s.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var oYe=o3(function(r,e){var t=e;t.version="6.5.4",t.utils=tl,t.rand=function(){throw new Error("unsupported")},t.curve=hT,t.curves=fT,t.ec=sYe,t.eddsa=null}),aYe=oYe.ec;const cYe="signing-key/5.7.0",DU=new nn(cYe);let $U=null;function Bf(){return $U||($U=new aYe("secp256k1")),$U}class lYe{constructor(e){rx(this,"curve","secp256k1"),rx(this,"privateKey",ja(e)),VKe(this.privateKey)!==32&&DU.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Bf().keyFromPrivate(fs(this.privateKey));rx(this,"publicKey","0x"+t.getPublic(!1,"hex")),rx(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),rx(this,"_isSigningKey",!0)}_addPoint(e){const t=Bf().keyFromPublic(fs(this.publicKey)),n=Bf().keyFromPublic(fs(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=Bf().keyFromPrivate(fs(this.privateKey)),n=fs(e);n.length!==32&&DU.throwArgumentError("bad digest length","digest",e);const i=t.sign(n,{canonical:!0});return Nde({recoveryParam:i.recoveryParam,r:Tf("0x"+i.r.toString(16),32),s:Tf("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=Bf().keyFromPrivate(fs(this.privateKey)),n=Bf().keyFromPublic(fs(_0e(e)));return Tf("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function uYe(r,e){const t=Nde(e),n={r:fs(t.r),s:fs(t.s)};return"0x"+Bf().recoverPubKey(fs(r),n,t.recoveryParam).encode("hex",!1)}function _0e(r,e){const t=fs(r);if(t.length===32){const n=new lYe(t);return e?"0x"+Bf().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?ja(t):"0x"+Bf().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Bf().keyFromPublic(t).getPublic(!0,"hex"):ja(t)}return DU.throwArgumentError("invalid public or private key","key","[REDACTED]")}const hYe="transactions/5.7.0";new nn(hYe);var E0e;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(E0e||(E0e={}));function fYe(r){const e=_0e(r);return _Ze(Mde(mU(Mde(e,1)),12))}function dYe(r,e){return fYe(uYe(fs(r),e))}const pYe="https://rpc.walletconnect.com/v1";async function gYe(r,e,t,n,i,s){switch(t.t){case"eip191":return mYe(r,e,t.s);case"eip1271":return await bYe(r,e,t.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}function mYe(r,e,t){return dYe(Gde(e),t).toLowerCase()===r.toLowerCase()}async function bYe(r,e,t,n,i,s){try{const o="0x1626ba7e",a="0000000000000000000000000000000000000000000000000000000000000040",l="0000000000000000000000000000000000000000000000000000000000000041",u=t.substring(2),h=Gde(e).substring(2),p=o+h+a+l+u,g=await fetch(`${s||pYe}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:wYe(),jsonrpc:"2.0",method:"eth_call",params:[{to:r,data:p},"latest"]})}),{result:w}=await g.json();return w?w.slice(0,o.length).toLowerCase()===o.toLowerCase():!1}catch(o){return console.error("isValidEip1271Signature: ",o),!1}}function wYe(){return Date.now()+Math.floor(Math.random()*1e3)}var vYe=Object.defineProperty,yYe=Object.defineProperties,xYe=Object.getOwnPropertyDescriptors,A0e=Object.getOwnPropertySymbols,_Ye=Object.prototype.hasOwnProperty,EYe=Object.prototype.propertyIsEnumerable,C0e=(r,e,t)=>e in r?vYe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,AYe=(r,e)=>{for(var t in e||(e={}))_Ye.call(e,t)&&C0e(r,t,e[t]);if(A0e)for(var t of A0e(e))EYe.call(e,t)&&C0e(r,t,e[t]);return r},CYe=(r,e)=>yYe(r,xYe(e));const SYe="did:pkh:",BU=r=>r==null?void 0:r.split(":"),S0e=r=>{const e=r&&BU(r);if(e)return r.includes(SYe)?e[3]:e[1]},I0e=r=>{const e=r&&BU(r);if(e)return e[2]+":"+e[3]},gT=r=>{const e=r&&BU(r);if(e)return e.pop()};async function T0e(r){const{cacao:e,projectId:t}=r,{s:n,p:i}=e,s=R0e(i,i.iss),o=gT(i.iss);return await gYe(o,s,n,S0e(i.iss),t)}const R0e=(r,e)=>{const t=`${r.domain} wants you to sign in with your Ethereum account:`,n=gT(e);if(!r.aud&&!r.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=r.statement||void 0;const s=`URI: ${r.aud||r.uri}`,o=`Version: ${r.version}`,a=`Chain ID: ${S0e(e)}`,l=`Nonce: ${r.nonce}`,u=`Issued At: ${r.iat}`,h=r.resources?`Resources:${r.resources.map(g=>` -- ${g}`).join("")}`:void 0,p=mT(r.resources);if(p){const g=ox(p);i=DYe(i,g)}return[t,n,"",i,"",s,o,a,l,u,h].filter(g=>g!=null).join(` -`)};function IYe(r){return Dt.from(JSON.stringify(r)).toString("base64")}function TYe(r){return JSON.parse(Dt.from(r,"base64").toString("utf-8"))}function h2(r){if(!r)throw new Error("No recap provided, value is undefined");if(!r.att)throw new Error("No `att` property found");const e=Object.keys(r.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(t=>{const n=r.att[t];if(Array.isArray(n))throw new Error(`Resource must be an object: ${t}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function RYe(r,e,t,n={}){return t==null||t.sort((i,s)=>i.localeCompare(s)),{att:{[r]:kYe(e,t,n)}}}function kYe(r,e,t={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${r}/${i}`]:[t]}));return Object.assign({},...n)}function k0e(r){return h2(r),`urn:recap:${IYe(r).replace(/=/g,"")}`}function ox(r){const e=TYe(r.replace("urn:recap:",""));return h2(e),e}function MYe(r,e,t){const n=RYe(r,e,t);return k0e(n)}function NYe(r){return r&&r.includes("urn:recap:")}function PYe(r,e){const t=ox(r),n=ox(e),i=OYe(t,n);return k0e(i)}function OYe(r,e){h2(r),h2(e);const t=Object.keys(r.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return t.forEach(i=>{var s,o;Object.keys(((s=r.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,l)=>a.localeCompare(l)).forEach(a=>{var l,u;n.att[i]=CYe(AYe({},n.att[i]),{[a]:((l=r.att[i])==null?void 0:l[a])||((u=e.att[i])==null?void 0:u[a])})})}),n}function DYe(r="",e){h2(e);const t="I further authorize the stated URI to perform the following actions on my behalf: ";if(r.includes(t))return r;const n=[];let i=0;Object.keys(e.att).forEach(a=>{const l=Object.keys(e.att[a]).map(p=>({ability:p.split("/")[0],action:p.split("/")[1]}));l.sort((p,g)=>p.action.localeCompare(g.action));const u={};l.forEach(p=>{u[p.ability]||(u[p.ability]=[]),u[p.ability].push(p.action)});const h=Object.keys(u).map(p=>(i++,`(${i}) '${p}': '${u[p].join("', '")}' for '${a}'.`));n.push(h.join(", ").replace(".,","."))});const s=n.join(" "),o=`${t}${s}`;return`${r?r+" ":""}${o}`}function M0e(r){var e;const t=ox(r);h2(t);const n=(e=t.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function N0e(r){const e=ox(r);h2(e);const t=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&t.push(i[0].chains)})}),[...new Set(t.flat())]}function mT(r){if(!r)return;const e=r==null?void 0:r[r.length-1];return NYe(e)?e:void 0}const P0e="base10",Ha="base16",LU="base64pad",UU="utf8",O0e=0,I1=1,$Ye=0,D0e=1,FU=12,jU=32;function BYe(){const r=O6.generateKeyPair();return{privateKey:yi(r.secretKey,Ha),publicKey:yi(r.publicKey,Ha)}}function zU(){const r=c1.randomBytes(jU);return yi(r,Ha)}function LYe(r,e){const t=O6.sharedKey(Pi(r,Ha),Pi(e,Ha),!0),n=new lre(Rm.SHA256,t).expand(jU);return yi(n,Ha)}function bT(r){const e=Rm.hash(Pi(r,Ha));return yi(e,Ha)}function f2(r){const e=Rm.hash(Pi(r,UU));return yi(e,Ha)}function UYe(r){return Pi(`${r}`,P0e)}function ax(r){return Number(yi(r,P0e))}function FYe(r){const e=UYe(typeof r.type<"u"?r.type:O0e);if(ax(e)===I1&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?Pi(r.senderPublicKey,Ha):void 0,n=typeof r.iv<"u"?Pi(r.iv,Ha):c1.randomBytes(FU),i=new E6.ChaCha20Poly1305(Pi(r.symKey,Ha)).seal(n,Pi(r.message,UU));return zYe({type:e,sealed:i,iv:n,senderPublicKey:t})}function jYe(r){const e=new E6.ChaCha20Poly1305(Pi(r.symKey,Ha)),{sealed:t,iv:n}=wT(r.encoded),i=e.open(n,t);if(i===null)throw new Error("Failed to decrypt");return yi(i,UU)}function zYe(r){if(ax(r.type)===I1){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return yi(D6([r.type,r.senderPublicKey,r.iv,r.sealed]),LU)}return yi(D6([r.type,r.iv,r.sealed]),LU)}function wT(r){const e=Pi(r,LU),t=e.slice($Ye,D0e),n=D0e;if(ax(t)===I1){const a=n+jU,l=a+FU,u=e.slice(n,a),h=e.slice(a,l),p=e.slice(l);return{type:t,sealed:p,iv:h,senderPublicKey:u}}const i=n+FU,s=e.slice(n,i),o=e.slice(i);return{type:t,sealed:o,iv:s}}function HYe(r,e){const t=wT(r);return $0e({type:ax(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?yi(t.senderPublicKey,Ha):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function $0e(r){const e=(r==null?void 0:r.type)||O0e;if(e===I1){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function B0e(r){return r.type===I1&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}const qYe="irn";function HU(r){return(r==null?void 0:r.relay)||{protocol:qYe}}function vT(r){const e=zoe[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var WYe=Object.defineProperty,VYe=Object.defineProperties,GYe=Object.getOwnPropertyDescriptors,L0e=Object.getOwnPropertySymbols,KYe=Object.prototype.hasOwnProperty,ZYe=Object.prototype.propertyIsEnumerable,U0e=(r,e,t)=>e in r?WYe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,F0e=(r,e)=>{for(var t in e||(e={}))KYe.call(e,t)&&U0e(r,t,e[t]);if(L0e)for(var t of L0e(e))ZYe.call(e,t)&&U0e(r,t,e[t]);return r},JYe=(r,e)=>VYe(r,GYe(e));function YYe(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=r[i];t[s]=o}}),t}function j0e(r){r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),s=typeof t<"u"?r.substring(t):"",o=zd.parse(s),a=typeof o.methods=="string"?o.methods.split(","):void 0;return{protocol:n,topic:QYe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:YYe(o),methods:a,expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function QYe(r){return r.startsWith("//")?r.substring(2):r}function XYe(r,e="-"){const t="relay",n={};return Object.keys(r).forEach(i=>{const s=t+e+i;r[i]&&(n[s]=r[i])}),n}function eQe(r){return`${r.protocol}:${r.topic}@${r.version}?`+zd.stringify(F0e(JYe(F0e({symKey:r.symKey},XYe(r.relay)),{expiryTimestamp:r.expiryTimestamp}),r.methods?{methods:r.methods.join(",")}:{}))}function a3(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}function tQe(r){const e=[];return Object.values(r).forEach(t=>{e.push(...a3(t.accounts))}),e}function rQe(r,e){const t=[];return Object.values(r).forEach(n=>{a3(n.accounts).includes(e)&&t.push(...n.methods)}),t}function nQe(r,e){const t=[];return Object.values(r).forEach(n=>{a3(n.accounts).includes(e)&&t.push(...n.events)}),t}function qU(r){return r.includes(":")}function cx(r){return qU(r)?r.split(":")[0]:r}function iQe(r){const e={};return r==null||r.forEach(t=>{const[n,i]=t.split(":");e[n]||(e[n]={accounts:[],chains:[],events:[]}),e[n].accounts.push(t),e[n].chains.push(`${n}:${i}`)}),e}function z0e(r,e){e=e.map(n=>n.replace("did:pkh:",""));const t=iQe(e);for(const[n,i]of Object.entries(t))i.methods?i.methods=tT(i.methods,r):i.methods=r,i.events=["chainChanged","accountsChanged"];return t}const sQe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},oQe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Bt(r,e){const{message:t,code:n}=oQe[r];return{message:e?`${t} ${e}`:t,code:n}}function ni(r,e){const{message:t,code:n}=sQe[r];return{message:e?`${t} ${e}`:t,code:n}}function Lf(r,e){return Array.isArray(r)?typeof e<"u"&&r.length?r.every(e):!0:!1}function lx(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function qa(r){return typeof r>"u"}function Is(r,e){return e&&qa(r)?!0:typeof r=="string"&&!!r.trim().length}function WU(r,e){return e&&qa(r)?!0:typeof r=="number"&&!isNaN(r)}function aQe(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let s=!0;return a2(i,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:u}=r.namespaces[o],h=a3(a),p=t[o];(!a2(pde(o,p),h)||!a2(p.methods,l)||!a2(p.events,u))&&(s=!1)}),s):!1}function yT(r){return Is(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function cQe(r){if(Is(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&yT(t)}}return!1}function lQe(r){if(Is(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}function uQe(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function hQe(r){return r==null?void 0:r.topic}function fQe(r,e){let t=null;return Is(r==null?void 0:r.publicKey,!1)||(t=Bt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function H0e(r){let e=!0;return Lf(r)?r.length&&(e=r.every(t=>Is(t,!1))):e=!1,e}function dQe(r,e,t){let n=null;return Lf(e)&&e.length?e.forEach(i=>{n||yT(i)||(n=ni("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):yT(r)||(n=ni("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function pQe(r,e,t){let n=null;return Object.entries(r).forEach(([i,s])=>{if(n)return;const o=dQe(i,pde(i,s),`${e} ${t}`);o&&(n=o)}),n}function gQe(r,e){let t=null;return Lf(r)?r.forEach(n=>{t||cQe(n)||(t=ni("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=ni("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function mQe(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=gQe(n==null?void 0:n.accounts,`${e} namespace`);i&&(t=i)}),t}function bQe(r,e){let t=null;return H0e(r==null?void 0:r.methods)?H0e(r==null?void 0:r.events)||(t=ni("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=ni("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function q0e(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=bQe(n,`${e}, namespace`);i&&(t=i)}),t}function wQe(r,e,t){let n=null;if(r&&lx(r)){const i=q0e(r,e);i&&(n=i);const s=pQe(r,e,t);s&&(n=s)}else n=Bt("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}function VU(r,e){let t=null;if(r&&lx(r)){const n=q0e(r,e);n&&(t=n);const i=mQe(r,e);i&&(t=i)}else t=Bt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function W0e(r){return Is(r.protocol,!0)}function vQe(r,e){let t=!1;return e&&!r?t=!0:r&&Lf(r)&&r.length&&r.forEach(n=>{t=W0e(n)}),t}function yQe(r){return typeof r=="number"}function xc(r){return typeof r<"u"&&typeof r!==null}function xQe(r){return!(!r||typeof r!="object"||!r.code||!WU(r.code,!1)||!r.message||!Is(r.message,!1))}function _Qe(r){return!(qa(r)||!Is(r.method,!1))}function EQe(r){return!(qa(r)||qa(r.result)&&qa(r.error)||!WU(r.id,!1)||!Is(r.jsonrpc,!1))}function AQe(r){return!(qa(r)||!Is(r.name,!1))}function V0e(r,e){return!(!yT(e)||!tQe(r).includes(e))}function CQe(r,e,t){return Is(t,!1)?rQe(r,e).includes(t):!1}function SQe(r,e,t){return Is(t,!1)?nQe(r,e).includes(t):!1}function G0e(r,e,t){let n=null;const i=IQe(r),s=TQe(e),o=Object.keys(i),a=Object.keys(s),l=K0e(Object.keys(r)),u=K0e(Object.keys(e)),h=l.filter(p=>!u.includes(p));return h.length&&(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. - Required: ${h.toString()} - Received: ${Object.keys(e).toString()}`)),a2(o,a)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. - Required: ${o.toString()} - Approved: ${a.toString()}`)),Object.keys(e).forEach(p=>{if(!p.includes(":")||n)return;const g=a3(e[p].accounts);g.includes(p)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${p} - Required: ${p} - Approved: ${g.toString()}`))}),o.forEach(p=>{n||(a2(i[p].methods,s[p].methods)?a2(i[p].events,s[p].events)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${p}`)):n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${p}`))}),n}function IQe(r){const e={};return Object.keys(r).forEach(t=>{var n;t.includes(":")?e[t]=r[t]:(n=r[t].chains)==null||n.forEach(i=>{e[i]={methods:r[t].methods,events:r[t].events}})}),e}function K0e(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function TQe(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const n=a3(r[t].accounts);n==null||n.forEach(i=>{e[i]={accounts:r[t].accounts.filter(s=>s.includes(`${i}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function RQe(r,e){return WU(r,!1)&&r<=e.max&&r>=e.min}function Z0e(){const r=Z8();return new Promise(e=>{switch(r){case Xc.browser:e(kQe());break;case Xc.reactNative:e(MQe());break;case Xc.node:e(NQe());break;default:e(!0)}})}function kQe(){return Yy()&&(navigator==null?void 0:navigator.onLine)}async function MQe(){if(Jy()&&typeof dr<"u"&&dr!=null&&dr.NetInfo){const r=await(dr==null?void 0:dr.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function NQe(){return!0}function PQe(r){switch(Z8()){case Xc.browser:OQe(r);break;case Xc.reactNative:DQe(r);break}}function OQe(r){!Jy()&&Yy()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function DQe(r){Jy()&&typeof dr<"u"&&dr!=null&&dr.NetInfo&&(dr==null||dr.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const GU={};class ux{static get(e){return GU[e]}static set(e,t){GU[e]=t}static delete(e){delete GU[e]}}let $Qe=class extends Kc{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},BQe=class extends Kc{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},LQe=class{constructor(e,t){this.logger=e,this.core=t}},UQe=class extends Kc{constructor(e,t){super(),this.relayer=e,this.logger=t}},FQe=class extends Kc{constructor(e){super()}},jQe=class{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}},zQe=class extends Kc{constructor(e,t){super(),this.relayer=e,this.logger=t}},HQe=class extends Kc{constructor(e,t){super(),this.core=e,this.logger=t}},qQe=class{constructor(e,t){this.projectId=e,this.logger=t}},WQe=class{constructor(e,t){this.projectId=e,this.logger=t}},VQe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},GQe=class{constructor(e){this.client=e}};function KQe(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,B=new Uint8Array(O);k!==N;){for(var z=y[k],G=0,$=O-1;(z!==0||G>>0,B[$]=z%a>>>0,z=z/a>>>0;if(z!==0)throw new Error("Non-zero carry");T=G,k++}for(var D=O-T;D!==O&&B[D]===0;)D++;for(var V=l.repeat(C);D>>0,O=new Uint8Array(N);y[C];){var B=t[y.charCodeAt(C)];if(B===255)return;for(var z=0,G=N-1;(B!==0||z>>0,O[G]=B%256>>>0,B=B/256>>>0;if(B!==0)throw new Error("Non-zero carry");k=z,C++}if(y[C]!==" "){for(var $=N-k;$!==N&&O[$]===0;)$++;for(var D=new Uint8Array(T+(N-$)),V=T;$!==N;)D[V++]=O[$++];return D}}}function w(y){var C=g(y);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:g,decode:w}}var ZQe=KQe,JQe=ZQe;const J0e=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},YQe=r=>new TextEncoder().encode(r),QQe=r=>new TextDecoder().decode(r);let XQe=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},eXe=class{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Y0e(this,e)}},tXe=class{constructor(e){this.decoders=e}or(e){return Y0e(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const Y0e=(r,e)=>new tXe({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});let rXe=class{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new XQe(e,t,n),this.decoder=new eXe(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const xT=({name:r,prefix:e,encode:t,decode:n})=>new rXe(r,e,t,n),hx=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=JQe(t,e);return xT({prefix:r,name:e,encode:n,decode:s=>J0e(i(s))})},nXe=(r,e,t,n)=>{const i={};for(let h=0;h=8&&(a-=8,o[u++]=255&l>>a)}if(a>=t||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},iXe=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)o-=t,s+=e[i&a>>o];if(o&&(s+=e[i&a<xT({prefix:e,name:r,encode(i){return iXe(i,n,t)},decode(i){return nXe(i,n,t,r)}}),sXe=xT({prefix:"\0",name:"identity",encode:r=>QQe(r),decode:r=>YQe(r)});var oXe=Object.freeze({__proto__:null,identity:sXe});const aXe=Go({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var cXe=Object.freeze({__proto__:null,base2:aXe});const lXe=Go({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var uXe=Object.freeze({__proto__:null,base8:lXe});const hXe=hx({prefix:"9",name:"base10",alphabet:"0123456789"});var fXe=Object.freeze({__proto__:null,base10:hXe});const dXe=Go({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pXe=Go({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var gXe=Object.freeze({__proto__:null,base16:dXe,base16upper:pXe});const mXe=Go({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),bXe=Go({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),wXe=Go({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),vXe=Go({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),yXe=Go({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),xXe=Go({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),_Xe=Go({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),EXe=Go({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),AXe=Go({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var CXe=Object.freeze({__proto__:null,base32:mXe,base32upper:bXe,base32pad:wXe,base32padupper:vXe,base32hex:yXe,base32hexupper:xXe,base32hexpad:_Xe,base32hexpadupper:EXe,base32z:AXe});const SXe=hx({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),IXe=hx({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var TXe=Object.freeze({__proto__:null,base36:SXe,base36upper:IXe});const RXe=hx({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kXe=hx({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var MXe=Object.freeze({__proto__:null,base58btc:RXe,base58flickr:kXe});const NXe=Go({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),PXe=Go({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),OXe=Go({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),DXe=Go({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var $Xe=Object.freeze({__proto__:null,base64:NXe,base64pad:PXe,base64url:OXe,base64urlpad:DXe});const Q0e=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),BXe=Q0e.reduce((r,e,t)=>(r[t]=e,r),[]),LXe=Q0e.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function UXe(r){return r.reduce((e,t)=>(e+=BXe[t],e),"")}function FXe(r){const e=[];for(const t of r){const n=LXe[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const jXe=xT({prefix:"🚀",name:"base256emoji",encode:UXe,decode:FXe});var zXe=Object.freeze({__proto__:null,base256emoji:jXe}),HXe=epe,X0e=128,qXe=127,WXe=~qXe,VXe=Math.pow(2,31);function epe(r,e,t){e=e||[],t=t||0;for(var n=t;r>=VXe;)e[t++]=r&255|X0e,r/=128;for(;r&WXe;)e[t++]=r&255|X0e,r>>>=7;return e[t]=r|0,epe.bytes=t-n+1,e}var GXe=KU,KXe=128,tpe=127;function KU(r,n){var t=0,n=n||0,i=0,s=n,o,a=r.length;do{if(s>=a)throw KU.bytes=0,new RangeError("Could not decode varint");o=r[s++],t+=i<28?(o&tpe)<=KXe);return KU.bytes=s-n,t}var ZXe=Math.pow(2,7),JXe=Math.pow(2,14),YXe=Math.pow(2,21),QXe=Math.pow(2,28),XXe=Math.pow(2,35),eet=Math.pow(2,42),tet=Math.pow(2,49),ret=Math.pow(2,56),net=Math.pow(2,63),iet=function(r){return r(rpe.encode(r,e,t),e),ipe=r=>rpe.encodingLength(r),ZU=(r,e)=>{const t=e.byteLength,n=ipe(r),i=n+ipe(t),s=new Uint8Array(i+t);return npe(r,s,0),npe(t,s,n),s.set(e,i),new oet(r,t,e,s)};let oet=class{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}};const spe=({name:r,code:e,encode:t})=>new aet(r,e,t);let aet=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ZU(this.code,t):t.then(n=>ZU(this.code,n))}else throw Error("Unknown type, must be binary type")}};const ope=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),cet=spe({name:"sha2-256",code:18,encode:ope("SHA-256")}),uet=spe({name:"sha2-512",code:19,encode:ope("SHA-512")});var het=Object.freeze({__proto__:null,sha256:cet,sha512:uet});const ape=0,fet="identity",cpe=J0e;var det=Object.freeze({__proto__:null,identity:{code:ape,name:fet,encode:cpe,digest:r=>ZU(ape,cpe(r))}});new TextEncoder,new TextDecoder;const lpe={...oXe,...cXe,...uXe,...fXe,...gXe,...CXe,...TXe,...MXe,...$Xe,...zXe};({...het,...det});function upe(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function pet(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?upe(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function hpe(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const fpe=hpe("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),JU=hpe("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=pet(r.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=Bt("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,wde(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?vde(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}},Jet=class{constructor(e,t,n){this.core=e,this.logger=t,this.name=yet,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),s=SS(i);return lB(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=BYe();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),o=SS(s),a=zU();return await Bae(a,i,xet,o)},this.generateSharedKey=(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),l=LYe(a,s);return this.setSymKey(l,o)},this.setSymKey=async(i,s)=>{this.isInitialized();const o=s||bT(i);return await this.keychain.set(o,i),o},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,s,o)=>{this.isInitialized();const a=$0e(o),l=gf(s);if(B0e(a)){const g=a.senderPublicKey,w=a.receiverPublicKey;i=await this.generateSharedKey(g,w)}const u=this.getSymKey(i),{type:h,senderPublicKey:p}=a;return FYe({type:h,symKey:u,message:l,senderPublicKey:p})},this.decode=async(i,s,o)=>{this.isInitialized();const a=HYe(s,o);if(B0e(a)){const l=a.receiverPublicKey,u=a.senderPublicKey;i=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(i),u=jYe({symKey:l,encoded:s});return hy(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}},this.getPayloadType=i=>{const s=wT(i);return ax(s.type)},this.getPayloadSenderPublicKey=i=>{const s=wT(i);return s.senderPublicKey?yi(s.senderPublicKey,Ha):void 0},this.core=e,this.logger=gi(t,this.name),this.keychain=n||new Zet(this.core,this.logger)}get context(){return xi(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(ppe)}catch{e=zU(),await this.keychain.set(ppe,e)}return met(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}},Yet=class extends LQe{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=Aet,this.version=Cet,this.initialized=!1,this.storagePrefix=T1,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const s=f2(i);let o=this.messages.get(n);return typeof o>"u"&&(o={}),typeof o[s]<"u"||(o[s]=i,this.messages.set(n,o),await this.persist()),s},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const s=this.get(n),o=f2(i);return typeof s[o]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=gi(e,this.name),this.core=t}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,wde(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?vde(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}};class Qet extends UQe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new pn.EventEmitter,this.name=Tet,this.queue=new Map,this.publishTimeout=Ye.toMiliseconds(Ye.ONE_MINUTE),this.failedPublishTimeout=Ye.toMiliseconds(Ye.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||Iet,l=HU(s),u=(s==null?void 0:s.prompt)||!1,h=(s==null?void 0:s.tag)||0,p=(s==null?void 0:s.id)||f1().toString(),g={topic:n,message:i,opts:{ttl:a,relay:l,prompt:u,tag:h,id:p}},w=`Failed to publish payload, please try again. id:${p} tag:${h}`,y=Date.now();let C,T=1;try{for(;C===void 0;){if(Date.now()-y>this.publishTimeout)throw new Error(w);this.logger.trace({id:p,attempts:T},`publisher.publish - attempt ${T}`),C=await await J8(this.rpcPublish(n,i,a,l,u,h,p).catch(k=>this.logger.warn(k)),this.publishTimeout,w),T++,C||await new Promise(k=>setTimeout(k,this.failedPublishTimeout))}this.relayer.events.emit(rl.publish,g),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:p,topic:n,message:i,opts:s}})}catch(k){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(k),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw k;this.queue.set(p,g)}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=gi(t,this.name),this.registerEventListeners()}get context(){return xi(this.logger)}rpcPublish(e,t,n,i,s,o,a){var l,u,h,p;const g={method:vT(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:s,tag:o},id:a};return qa((l=g.params)==null?void 0:l.prompt)&&((u=g.params)==null||delete u.prompt),qa((h=g.params)==null?void 0:h.tag)&&((p=g.params)==null||delete p.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g}),this.relayer.request(g)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:n,opts:i}=e;await this.publish(t,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(rl.connection_stalled);return}this.checkQueue()}),this.relayer.on(rl.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Xet{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(s=>s!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var ett=Object.defineProperty,ttt=Object.defineProperties,rtt=Object.getOwnPropertyDescriptors,wpe=Object.getOwnPropertySymbols,ntt=Object.prototype.hasOwnProperty,itt=Object.prototype.propertyIsEnumerable,vpe=(r,e,t)=>e in r?ett(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,dx=(r,e)=>{for(var t in e||(e={}))ntt.call(e,t)&&vpe(r,t,e[t]);if(wpe)for(var t of wpe(e))itt.call(e,t)&&vpe(r,t,e[t]);return r},eF=(r,e)=>ttt(r,rtt(e));let stt=class extends zQe{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Xet,this.events=new pn.EventEmitter,this.name=Bet,this.version=Let,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=T1,this.subscribeTimeout=Ye.toMiliseconds(Ye.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=HU(i),o={topic:n,relay:s};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>{if(this.topics.includes(n))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${n}`;return await new Promise((s,o)=>{const a=new Ye.Watch;a.start(i);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),a.stop(i),s(!0)),a.elapsed(i)>=Uet&&(clearInterval(l),a.stop(i),o(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=gi(t,this.name),this.clientId=""}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const i=HU(n);await this.rpcUnsubscribe(e,t,i);const s=ni("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,t){const n={method:vT(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await J8(this.relayer.request(n).catch(i=>this.logger.warn(i)),this.subscribeTimeout)?f2(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(rl.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,n={method:vT(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await J8(this.relayer.request(n).catch(i=>this.logger.warn(i)),this.subscribeTimeout)}catch{this.relayer.events.emit(rl.connection_stalled)}}rpcUnsubscribe(e,t,n){const i={method:vT(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,eF(dx({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,dx({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,dx({},t)),this.topicMap.set(t.topic,e),this.events.emit(Uf.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Uf.deleted,eF(dx({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Uf.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Lf(t)&&this.onBatchSubscribe(t.map((n,i)=>eF(dx({},e[i]),{id:n})))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.events.on(Uf.created,async e=>{const t=Uf.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(Uf.deleted,async e=>{const t=Uf.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}};var ott=Object.defineProperty,ype=Object.getOwnPropertySymbols,att=Object.prototype.hasOwnProperty,ctt=Object.prototype.propertyIsEnumerable,xpe=(r,e,t)=>e in r?ott(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ltt=(r,e)=>{for(var t in e||(e={}))att.call(e,t)&&xpe(r,t,e[t]);if(ype)for(var t of ype(e))ctt.call(e,t)&&xpe(r,t,e[t]);return r};let utt=class extends FQe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new pn.EventEmitter,this.name=ket,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=Ye.toMiliseconds(Ye.THIRTY_SECONDS+Ye.ONE_SECOND),this.request=async t=>{var n,i;this.logger.debug("Publishing Request Payload");const s=t.id||f1().toString();await this.toEstablishConnection();try{const o=this.provider.request(t);this.requestsInFlight.set(s,{promise:o,request:t}),this.logger.trace({id:s,method:t.method,topic:(n=t.params)==null?void 0:n.topic},"relayer.request - attempt to publish...");const a=await new Promise(async(l,u)=>{const h=()=>{u(new Error(`relayer.request - publish interrupted, id: ${s}`))};this.provider.on(uu.disconnect,h);const p=await o;this.provider.off(uu.disconnect,h),l(p)});return this.logger.trace({id:s,method:t.method,topic:(i=t.params)==null?void 0:i.topic},"relayer.request - published"),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}finally{this.requestsInFlight.delete(s)}},this.resetPingTimeout=()=>{if(K8())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,n,i;(i=(n=(t=this.provider)==null?void 0:t.connection)==null?void 0:n.socket)==null||i.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.startPingTimeout(),this.events.emit(rl.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(rl.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(uu.payload,this.onPayloadHandler),this.provider.on(uu.connect,this.onConnectHandler),this.provider.on(uu.disconnect,this.onDisconnectHandler),this.provider.on(uu.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?gi(e.logger,this.name):mc(h1({level:e.logger||Ret})),this.messages=new Yet(this.logger,e.core),this.subscriber=new stt(this,this.logger),this.publisher=new Qet(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||mpe,this.projectId=e.projectId,this.bundleId=IKe(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${bpe}...`),await this.restartTransport(bpe)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&this.subscriber.pending.size===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},Oet)}get context(){return xi(this.logger)}get connected(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===1}get connecting(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===0}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"",s;const o=a=>{a.topic===e&&(this.subscriber.off(Uf.created,o),s())};return await Promise.all([new Promise(a=>{s=a,this.subscriber.on(Uf.created,o)}),new Promise(async a=>{i=await this.subscriber.subscribe(e,t)||i,a()})]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await J8(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect(),await this.createProvider()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,n)=>{const i=()=>{this.provider.off(uu.disconnect,i),n(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(uu.disconnect,i),await J8(this.provider.connect(),Ye.toMiliseconds(Ye.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(s=>{n(s)}),await this.subscriber.start(),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const n=t;if(!this.isConnectionStalled(n.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Z0e())throw new Error("No internet connection detected. Please restart your network and try again.")}startPingTimeout(){var e,t,n,i,s;if(K8())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new _o(new Yae(PKe({sdkVersion:Pet,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),gy(e)){if(!e.method.endsWith(Met))return;const t=e.params,{topic:n,message:i,publishedAt:s}=t.data,o={topic:n,message:i,publishedAt:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(ltt({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Bm(e)&&this.events.emit(rl.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(rl.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=d1(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(uu.payload,this.onPayloadHandler),this.provider.off(uu.connect,this.onConnectHandler),this.provider.off(uu.disconnect,this.onDisconnectHandler),this.provider.off(uu.error,this.onProviderErrorHandler)}async registerEventListeners(){let e=await Z0e();PQe(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.events.emit(rl.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},Ye.toMiliseconds(Net))}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}};var htt=Object.defineProperty,_pe=Object.getOwnPropertySymbols,ftt=Object.prototype.hasOwnProperty,dtt=Object.prototype.propertyIsEnumerable,Epe=(r,e,t)=>e in r?htt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ape=(r,e)=>{for(var t in e||(e={}))ftt.call(e,t)&&Epe(r,t,e[t]);if(_pe)for(var t of _pe(e))dtt.call(e,t)&&Epe(r,t,e[t]);return r};let d2=class extends jQe{constructor(e,t,n,i=T1,s=void 0){super(e,t,n,i),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=Det,this.cached=[],this.initialized=!1,this.storagePrefix=T1,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!qa(o)?this.map.set(this.getKey(o),o):uQe(o)?this.map.set(o.id,o):hQe(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(l=>X6(a[l],o[l]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const l=Ape(Ape({},this.getData(o)),a);this.map.set(o,l),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())},this.logger=gi(t,this.name),this.storagePrefix=i,this.getKey=s}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:i}=Bt("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}},ptt=class{constructor(e,t){this.core=e,this.logger=t,this.name=Fet,this.version=jet,this.events=new pn,this.initialized=!1,this.storagePrefix=T1,this.ignoredPayloadTypes=[I1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async n=>{this.isInitialized();const i=zU(),s=await this.core.crypto.setSymKey(i),o=wa(Ye.FIVE_MINUTES),a={protocol:gpe},l={topic:s,expiry:o,relay:a,active:!1},u=eQe({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n==null?void 0:n.methods});return await this.pairings.set(s,l),await this.core.relayer.subscribe(s),this.core.expirer.set(s,o),{topic:s,uri:u}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:s,relay:o,expiryTimestamp:a,methods:l}=j0e(n.uri);let u;if(this.pairings.keys.includes(i)&&(u=this.pairings.get(i),u.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);const h=a||wa(Ye.FIVE_MINUTES),p={topic:i,relay:o,expiry:h,active:!1,methods:l};return await this.pairings.set(i,p),this.core.expirer.set(i,h),n.activatePairing&&await this.activate({topic:i}),this.events.emit(c3.create,p),this.core.crypto.keychain.has(i)||await this.core.crypto.setSymKey(s,i),await this.core.relayer.subscribe(i,{relay:o}),p},this.activate=async({topic:n})=>{this.isInitialized();const i=wa(Ye.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:l}=c2();this.events.once(hn("pairing_ping",s),({error:u})=>{u?l(u):a()}),await o()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",ni("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,s)=>{const o=Qu(i,s),a=await this.core.crypto.encode(n,o),l=fx[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,l),o.id},this.sendResult=async(n,i,s)=>{const o=d1(n,s),a=await this.core.crypto.encode(i,o),l=await this.core.history.get(i,n),u=fx[l.request.method].res;await this.core.relayer.publish(i,a,u),await this.core.history.resolve(o)},this.sendError=async(n,i,s)=>{const o=py(n,s),a=await this.core.crypto.encode(i,o),l=await this.core.history.get(i,n),u=fx[l.request.method]?fx[l.request.method].res:fx.unregistered_method.res;await this.core.relayer.publish(i,a,u),await this.core.history.resolve(o)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,ni("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>E1(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(c3.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onPairingPingResponse=(n,i)=>{const{id:s}=i;setTimeout(()=>{xo(i)?this.events.emit(hn("pairing_ping",s),{}):As(i)&&this.events.emit(hn("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(c3.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=ni("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(ni("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var i;if(!xc(n)){const{message:o}=Bt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!lQe(n.uri)){const{message:o}=Bt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}const s=j0e(n.uri);if(!((i=s==null?void 0:s.relay)!=null&&i.protocol)){const{message:o}=Bt("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(o)}if(!(s!=null&&s.symKey)){const{message:o}=Bt("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(o)}if(s!=null&&s.expiryTimestamp&&Ye.toMiliseconds(s==null?void 0:s.expiryTimestamp){if(!xc(n)){const{message:s}=Bt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!xc(n)){const{message:s}=Bt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!Is(n,!1)){const{message:i}=Bt("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Bt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(E1(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Bt("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=gi(t,this.name),this.pairings=new d2(this.core,this.logger,this.name,this.storagePrefix)}get context(){return xi(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(rl.message,async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(t,n);try{gy(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):Bm(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(hu.expired,async e=>{const{topic:t}=xde(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(c3.expire,{topic:t}))})}},gtt=class extends BQe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new pn.EventEmitter,this.name=zet,this.version=Het,this.cached=[],this.initialized=!1,this.storagePrefix=T1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:wa(Ye.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(lh.created,o)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=As(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(lh.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(lh.deleted,s)}}),this.persist()},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:Qu(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(lh.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(lh.created,e=>{const t=lh.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(lh.updated,e=>{const t=lh.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(lh.deleted,e=>{const t=lh.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{Ye.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(lh.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}},mtt=class extends HQe{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new pn.EventEmitter,this.name=qet,this.version=Wet,this.cached=[],this.initialized=!1,this.storagePrefix=T1,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(hu.created,{target:s,expiration:o})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(hu.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=gi(t,this.name)}get context(){return xi(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return OKe(e);if(typeof e=="number")return DKe(e);const{message:t}=Bt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(hu.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;Ye.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(hu.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(Yu.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(hu.created,e=>{const t=hu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(hu.expired,e=>{const t=hu.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(hu.deleted,e=>{const t=hu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}},btt=class extends qQe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=QU,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||Jy()||!Yy())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s)}if(!this.initialized){this.removeIframe(),this.verifyUrl=XU;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let s;try{s=await this.fetchAttestation(n.attestationId,i)}catch(o){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(o),s=await this.fetchAttestation(n.attestationId,XU)}return s},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const s=this.startAbortTimer(Ye.ONE_SECOND*2),o=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(s),o.status===200?await o.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=s=>{s.data==="verify_ready"&&(this.onInit(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(s=>{const o=document.getElementById(QU);if(o)return this.iframe=o,this.onInit(),s();window.addEventListener("message",i);const a=document.createElement("iframe");a.id=QU,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display="none",document.body.append(a),this.iframe=a,n=s}),new Promise((s,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},Ye.toMiliseconds(Ye.FIVE_SECONDS)))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||l3;return Vet.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${l3}`),i=l3),i},this.logger=gi(t,this.name),this.verifyUrl=l3,this.abortController=new AbortController,this.isDevEnv=K8()&&yt.env.IS_VITEST}get context(){return xi(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Ye.toMiliseconds(e))}},wtt=class extends WQe{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=Get,this.registerDeviceToken=async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,l=`${Ket}/${this.projectId}/clients`;await Xae(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})},this.logger=gi(t,this.context)}};var vtt=Object.defineProperty,Cpe=Object.getOwnPropertySymbols,ytt=Object.prototype.hasOwnProperty,xtt=Object.prototype.propertyIsEnumerable,Spe=(r,e,t)=>e in r?vtt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ipe=(r,e)=>{for(var t in e||(e={}))ytt.call(e,t)&&Spe(r,t,e[t]);if(Cpe)for(var t of Cpe(e))xtt.call(e,t)&&Spe(r,t,e[t]);return r};let Tpe=class extends $Qe{constructor(e){var t;super(e),this.protocol=dpe,this.version=bet,this.name=YU,this.events=new pn.EventEmitter,this.initialized=!1,this.on=(o,a)=>this.events.on(o,a),this.once=(o,a)=>this.events.once(o,a),this.off=(o,a)=>this.events.off(o,a),this.removeListener=(o,a)=>this.events.removeListener(o,a),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||mpe,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=h1({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:wet.logger}),{logger:i,chunkLoggerController:s}=OPe({opts:n,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=s,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var o,a;(o=this.logChunkController)!=null&&o.downloadLogsBlobInBrowser&&((a=this.logChunkController)==null||a.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=gi(i,this.name),this.heartbeat=new Yu.HeartBeat,this.crypto=new Jet(this,this.logger,e==null?void 0:e.keychain),this.history=new gtt(this,this.logger),this.expirer=new mtt(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new wae(Ipe(Ipe({},vet),e==null?void 0:e.storageOptions)),this.relayer=new utt({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new ptt(this,this.logger),this.verify=new btt(this.projectId||"",this.logger),this.echoClient=new wtt(this.projectId||"",this.logger)}static async init(e){const t=new Tpe(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem($et,n),t}get context(){return xi(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}};const _tt=Tpe,Rpe="wc",kpe=2,Mpe="client",tF=`${Rpe}@${kpe}:${Mpe}:`,rF={name:Mpe,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Npe="WALLETCONNECT_DEEPLINK_CHOICE",Ett="proposal",Ppe="Proposal expired",Att="session",u3=Ye.SEVEN_DAYS,Ctt="engine",fu={wc_sessionPropose:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Ye.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Ye.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1114},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:Ye.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:Ye.ONE_HOUR,prompt:!1,tag:1117}}},nF={min:Ye.FIVE_MINUTES,max:Ye.SEVEN_DAYS},c0={idle:"IDLE",active:"ACTIVE"},Stt="request",Itt=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],Ttt="wc",Rtt="auth",ktt="authKeys",Mtt="pairingTopics",Ntt="requests",_T=`${Ttt}@${1.5}:${Rtt}:`,ET=`${_T}:PUB_KEY`;var Ptt=Object.defineProperty,Ott=Object.defineProperties,Dtt=Object.getOwnPropertyDescriptors,Ope=Object.getOwnPropertySymbols,$tt=Object.prototype.hasOwnProperty,Btt=Object.prototype.propertyIsEnumerable,Dpe=(r,e,t)=>e in r?Ptt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ro=(r,e)=>{for(var t in e||(e={}))$tt.call(e,t)&&Dpe(r,t,e[t]);if(Ope)for(var t of Ope(e))Btt.call(e,t)&&Dpe(r,t,e[t]);return r},h3=(r,e)=>Ott(r,Dtt(e));let Ltt=class extends GQe{constructor(e){super(e),this.name=Ctt,this.events=new pn,this.initialized=!1,this.requestQueue={state:c0.idle,queue:[]},this.sessionRequestQueue={state:c0.idle,queue:[]},this.requestQueueDelay=Ye.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(fu)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Ye.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const n=h3(Ro({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,relays:l}=n;let u=i,h,p=!1;try{u&&(p=this.client.core.pairing.pairings.get(u).active)}catch(B){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),B}if(!u||!p){const{topic:B,uri:z}=await this.client.core.pairing.create();u=B,h=z}if(!u){const{message:B}=Bt("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(B)}const g=await this.client.core.crypto.generateKeyPair(),w=fu.wc_sessionPropose.req.ttl||Ye.FIVE_MINUTES,y=wa(w),C=Ro({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:gpe}],proposer:{publicKey:g,metadata:this.client.metadata},expiryTimestamp:y},a&&{sessionProperties:a}),{reject:T,resolve:k,done:N}=c2(w,Ppe);this.events.once(hn("session_connect"),async({error:B,session:z})=>{if(B)T(B);else if(z){z.self.publicKey=g;const G=h3(Ro({},z),{requiredNamespaces:C.requiredNamespaces,optionalNamespaces:C.optionalNamespaces});await this.client.session.set(z.topic,G),await this.setExpiry(z.topic,z.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:z.peer.metadata}),k(G)}});const O=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:C,throwOnFailedPublish:!0});return await this.setProposal(O,Ro({id:O},C)),{uri:h,approval:N}},this.pair=async t=>{await this.isInitialized();try{return await this.client.core.pairing.pair(t)}catch(n){throw this.client.logger.error("pair() failed"),n}},this.approve=async t=>{await this.isInitialized();try{await this.isValidApprove(t)}catch(N){throw this.client.logger.error("approve() -> isValidApprove() failed"),N}const{id:n,relayProtocol:i,namespaces:s,sessionProperties:o,sessionConfig:a}=t;let l;try{l=this.client.proposal.get(n)}catch(N){throw this.client.logger.error(`approve() -> proposal.get(${n}) failed`),N}let{pairingTopic:u,proposer:h,requiredNamespaces:p,optionalNamespaces:g}=l;u=u||"";const w=await this.client.core.crypto.generateKeyPair(),y=h.publicKey,C=await this.client.core.crypto.generateSharedKey(w,y),T=Ro(Ro({relay:{protocol:i??"irn"},namespaces:s,pairingTopic:u,controller:{publicKey:w,metadata:this.client.metadata},expiry:wa(u3)},o&&{sessionProperties:o}),a&&{sessionConfig:a});await this.client.core.relayer.subscribe(C);const k=h3(Ro({},T),{topic:C,requiredNamespaces:p,optionalNamespaces:g,pairingTopic:u,acknowledged:!1,self:T.controller,peer:{publicKey:h.publicKey,metadata:h.metadata},controller:w});await this.client.session.set(C,k);try{await this.sendResult({id:n,topic:u,result:{relay:{protocol:i??"irn"},responderPublicKey:w},throwOnFailedPublish:!0}),await this.sendRequest({topic:C,method:"wc_sessionSettle",params:T,throwOnFailedPublish:!0})}catch(N){throw this.client.logger.error(N),this.client.session.delete(C,ni("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(C),N}return await this.client.core.pairing.updateMetadata({topic:u,metadata:h.metadata}),await this.client.proposal.delete(n,ni("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:u}),await this.setExpiry(C,wa(u3)),{topic:C,acknowledged:()=>new Promise(N=>setTimeout(()=>N(this.client.session.get(C)),500))}},this.reject=async t=>{await this.isInitialized();try{await this.isValidReject(t)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:n,reason:i}=t;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&(await this.sendError({id:n,topic:s,error:i}),await this.client.proposal.delete(n,ni("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized();try{await this.isValidUpdate(t)}catch(p){throw this.client.logger.error("update() -> isValidUpdate() failed"),p}const{topic:n,namespaces:i}=t,{done:s,resolve:o,reject:a}=c2(),l=Wd(),u=f1().toString(),h=this.client.session.get(n).namespaces;return this.events.once(hn("session_update",l),({error:p})=>{p?a(p):o()}),await this.client.session.update(n,{namespaces:i}),this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:u}).catch(p=>{this.client.logger.error(p),this.client.session.update(n,{namespaces:h}),a(p)}),{acknowledged:s}},this.extend=async t=>{await this.isInitialized();try{await this.isValidExtend(t)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:n}=t,i=Wd(),{done:s,resolve:o,reject:a}=c2();return this.events.once(hn("session_extend",i),({error:l})=>{l?a(l):o()}),await this.setExpiry(n,wa(u3)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(l=>{a(l)}),{acknowledged:s}},this.request=async t=>{await this.isInitialized();try{await this.isValidRequest(t)}catch(w){throw this.client.logger.error("request() -> isValidRequest() failed"),w}const{chainId:n,request:i,topic:s,expiry:o=fu.wc_sessionRequest.req.ttl}=t,a=this.client.session.get(s),l=Wd(),u=f1().toString(),{done:h,resolve:p,reject:g}=c2(o,"Request expired. Please try again.");return this.events.once(hn("session_request",l),({error:w,result:y})=>{w?g(w):p(y)}),await Promise.all([new Promise(async w=>{await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:"wc_sessionRequest",params:{request:h3(Ro({},i),{expiryTimestamp:wa(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(y=>g(y)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:l}),w()}),new Promise(async w=>{var y;if(!((y=a.sessionConfig)!=null&&y.disableDeepLink)){const C=await BKe(this.client.core.storage,Npe);$Ke({id:l,topic:s,wcDeepLink:C})}w()}),h()]).then(w=>w[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:i}=t,{id:s}=i;xo(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0}):As(i)&&await this.sendError({id:s,topic:n,error:i.error}),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized();try{await this.isValidPing(t)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=t;if(this.client.session.keys.includes(n)){const i=Wd(),s=f1().toString(),{done:o,resolve:a,reject:l}=c2();this.events.once(hn("session_ping",i),({error:u})=>{u?l(u):a()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:n,event:i,chainId:s}=t,o=f1().toString();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:n}=t;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:ni("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=Bt("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>aQe(n,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async t=>{this.isInitialized(),this.isValidAuthenticate(t);const{chains:n,statement:i="",uri:s,domain:o,nonce:a,type:l,exp:u,nbf:h,methods:p=[]}=t,g=[...t.resources||[]],{topic:w,uri:y}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:w,uri:y}});const C=await this.client.core.crypto.generateKeyPair(),T=bT(C);if(await Promise.all([this.client.auth.authKeys.set(ET,{responseTopic:T,publicKey:C}),this.client.auth.pairingTopics.set(T,{topic:T,pairingTopic:w})]),await this.client.core.relayer.subscribe(T),this.client.logger.info(`sending request to new pairing topic: ${w}`),p.length>0){const{namespace:M}=eT(n[0]);let b=MYe(M,"request",p);mT(g)&&(b=PYe(b,g.pop())),g.push(b)}const k=wa(fu.wc_sessionPropose.req.ttl),N={authPayload:{type:l??"caip122",chains:n,statement:i,aud:s,domain:o,version:"1",nonce:a,iat:new Date().toISOString(),exp:u,nbf:h,resources:g},requester:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:k},O={eip155:{chains:n,methods:[...new Set(["personal_sign",...p])],events:["chainChanged","accountsChanged"]}},B={requiredNamespaces:{},optionalNamespaces:O,relays:[{protocol:"irn"}],proposer:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:k},{done:z,resolve:G,reject:$}=c2(fu.wc_sessionAuthenticate.req.ttl,"Request expired"),D=async({error:M,session:b})=>{if(this.events.off(hn("session_request",Q),V),M)$(M);else if(b){b.self.publicKey=C,await this.client.session.set(b.topic,b),await this.setExpiry(b.topic,b.expiry),w&&await this.client.core.pairing.updateMetadata({topic:w,metadata:b.peer.metadata});const d=this.client.session.get(b.topic);G({session:d})}},V=async M=>{if(M.error){const R=ni("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return M.error.code===R.code?void 0:(this.events.off(hn("session_connect"),D),$(M.error.message))}this.events.off(hn("session_connect"),D);const{cacaos:b,responder:d}=M.result,m=[],x=[];for(const R of b){await T0e({cacao:R,projectId:this.client.core.projectId})||(this.client.logger.error(R,"Signature verification failed"),$(ni("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:S}=R,E=mT(S.resources),_=[I0e(S.iss)],L=gT(S.iss);if(E){const ie=M0e(E),q=N0e(E);m.push(...ie),_.push(...q)}for(const ie of _)x.push(`${ie}:${L}`)}const A=await this.client.core.crypto.generateSharedKey(C,d.publicKey);let I;m.length>0&&(I={topic:A,acknowledged:!0,self:{publicKey:C,metadata:this.client.metadata},peer:d,controller:d.publicKey,expiry:wa(u3),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:w,namespaces:z0e([...new Set(m)],[...new Set(x)])},await this.client.core.relayer.subscribe(A),await this.client.session.set(A,I),I=this.client.session.get(A)),G({auths:b,session:I})},Q=Wd(),F=Wd();this.events.once(hn("session_connect"),D),this.events.once(hn("session_request",Q),V);try{await Promise.all([this.sendRequest({topic:w,method:"wc_sessionAuthenticate",params:N,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:Q}),this.sendRequest({topic:w,method:"wc_sessionPropose",params:B,expiry:fu.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:F})])}catch(M){throw this.events.off(hn("session_connect"),D),this.events.off(hn("session_request",Q),V),M}return await this.setProposal(F,Ro({id:F},B)),await this.client.auth.requests.set(Q,{authPayload:N.authPayload,requester:N.requester,expiryTimestamp:k,id:Q,pairingTopic:w,verifyContext:{}}),{uri:y,response:z}},this.approveSessionAuthenticate=async t=>{this.isInitialized();const{id:n,auths:i}=t,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),l=bT(o),u={type:I1,receiverPublicKey:o,senderPublicKey:a},h=[],p=[];for(const y of i){if(!await T0e({cacao:y,projectId:this.client.core.projectId})){const O=ni("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:l,error:O,encodeOpts:u}),new Error(O.message)}const{p:C}=y,T=mT(C.resources),k=[I0e(C.iss)],N=gT(C.iss);if(T){const O=M0e(T),B=N0e(T);h.push(...O),k.push(...B)}for(const O of k)p.push(`${O}:${N}`)}const g=await this.client.core.crypto.generateSharedKey(a,o);let w;return(h==null?void 0:h.length)>0&&(w={topic:g,acknowledged:!0,self:{publicKey:a,metadata:this.client.metadata},peer:{publicKey:o,metadata:s.requester.metadata},controller:o,expiry:wa(u3),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:"",namespaces:z0e([...new Set(h)],[...new Set(p)])},await this.client.core.relayer.subscribe(g),await this.client.session.set(g,w)),await this.sendResult({topic:l,id:n,result:{cacaos:i,responder:{publicKey:a,metadata:this.client.metadata}},encodeOpts:u,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(n,{message:"fullfilled",code:0}),await this.client.core.pairing.activate({topic:s.pairingTopic}),{session:w}},this.rejectSessionAuthenticate=async t=>{await this.isInitialized();const{id:n,reason:i}=t,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),l=bT(o),u={type:I1,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:l,error:i,encodeOpts:u}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.client.proposal.delete(n,ni("USER_DISCONNECTED"))},this.formatAuthMessage=t=>{this.isInitialized();const{request:n,iss:i}=t;return R0e(n,i)},this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===t.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async t=>{const{topic:n,expirerHasDeleted:i=!1,emitEvent:s=!0,id:o=0}=t,{self:a}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await this.client.session.delete(n,ni("USER_DISCONNECTED")),this.addToRecentlyDeleted(n,"session"),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(n)&&await this.client.core.crypto.deleteSymKey(n),i||this.client.core.expirer.del(n),this.client.core.storage.removeItem(Npe).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===n&&this.deletePendingSessionRequest(l.id,ni("USER_DISCONNECTED"))}),s&&this.client.events.emit("session_delete",{id:o,topic:n})},this.deleteProposal=async(t,n)=>{await Promise.all([this.client.proposal.delete(t,ni("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"proposal")},this.deletePendingSessionRequest=async(t,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==t),i&&(this.sessionRequestQueue.state=c0.idle,this.client.events.emit("session_request_expire",{id:t}))},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:n}),this.client.core.expirer.set(t,n)},this.setProposal=async(t,n)=>{await this.client.proposal.set(t,n),this.client.core.expirer.set(t,wa(fu.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async t=>{const{id:n,topic:i,params:s,verifyContext:o}=t,a=s.request.expiryTimestamp||wa(fu.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o}),a&&this.client.core.expirer.set(n,a)},this.sendRequest=async t=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:l,throwOnFailedPublish:u}=t,h=Qu(i,s,l);if(Yy()&&Itt.includes(i)){const w=f2(JSON.stringify(h));this.client.core.verify.register({attestationId:w})}let p;try{p=await this.client.core.crypto.encode(n,h)}catch(w){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),w}const g=fu[i].req;return o&&(g.ttl=o),a&&(g.id=a),this.client.core.history.set(n,h),u?(g.internal=h3(Ro({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,p,g)):this.client.core.relayer.publish(n,p,g).catch(w=>this.client.logger.error(w)),h.id},this.sendResult=async t=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a}=t,l=d1(n,s);let u;try{u=await this.client.core.crypto.encode(i,l,a)}catch(g){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),g}let h;try{h=await this.client.core.history.get(i,n)}catch(g){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),g}const p=fu[h.request.method].res;o?(p.internal=h3(Ro({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,u,p)):this.client.core.relayer.publish(i,u,p).catch(g=>this.client.logger.error(g)),await this.client.core.history.resolve(l)},this.sendError=async t=>{const{id:n,topic:i,error:s,encodeOpts:o}=t,a=py(n,s);let l;try{l=await this.client.core.crypto.encode(i,a,o)}catch(p){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),p}let u;try{u=await this.client.core.history.get(i,n)}catch(p){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),p}const h=fu[u.request.method].res;this.client.core.relayer.publish(i,l,h),await this.client.core.history.resolve(a)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;E1(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&t.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{E1(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...t.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===c0.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=c0.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=c0.idle},this.processRequest=t=>{const{topic:n,payload:i}=t,s=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:s}))switch(s){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:i}=t,s=(await this.client.core.history.get(n,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:i}=Bt("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.shouldIgnorePairingRequest=t=>{const{topic:n,requestMethod:i}=t,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(t,n)=>{const{params:i,id:s}=n;try{this.isValidConnect(Ro({},n.params));const o=i.expiryTimestamp||wa(fu.wc_sessionPropose.req.ttl),a=Ro({id:s,pairingTopic:t,expiryTimestamp:o},i);await this.setProposal(s,a);const l=f2(JSON.stringify(n)),u=await this.getVerifyContext(l,a.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:a,verifyContext:u})}catch(o){await this.sendError({id:s,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionProposeResponse=async(t,n)=>{const{id:i}=n;if(xo(n)){const{result:s}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const a=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const l=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(a,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});const h=await this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:t})}else if(As(n)){await this.client.proposal.delete(i,ni("USER_DISCONNECTED"));const s=hn("session_connect");if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners, 954`);this.events.emit(hn("session_connect"),{error:n.error})}},this.onSessionSettleRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:l,namespaces:u,sessionProperties:h,pairingTopic:p,sessionConfig:g}=n.params,w=Ro(Ro({topic:t,relay:o,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:p,requiredNamespaces:{},optionalNamespaces:{},controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},h&&{sessionProperties:h}),g&&{sessionConfig:g});await this.sendResult({id:n.id,topic:t,result:!0,throwOnFailedPublish:!0});const y=hn("session_connect");if(this.events.listenerCount(y)===0)throw new Error(`emitting ${y} without any listeners 997`);this.events.emit(hn("session_connect"),{session:w}),this.cleanupDuplicatePairings(w)}catch(o){await this.sendError({id:i,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionSettleResponse=async(t,n)=>{const{id:i}=n;xo(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(hn("session_approve",i),{})):As(n)&&(await this.client.session.delete(t,ni("USER_DISCONNECTED")),this.events.emit(hn("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:i,id:s}=n;try{const o=`${t}_session_update`,a=ux.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.info(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:t,error:ni("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(Ro({topic:t},i));try{ux.set(o,s),await this.client.session.update(t,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0})}catch(l){throw ux.delete(o),l}this.client.events.emit("session_update",{id:s,topic:t,params:i})}catch(o){await this.sendError({id:s,topic:t,error:o}),this.client.logger.error(o)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:i}=n,s=hn("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);xo(n)?this.events.emit(hn("session_update",i),{}):As(n)&&this.events.emit(hn("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:i}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,wa(u3)),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionExtendResponse=(t,n)=>{const{id:i}=n,s=hn("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);xo(n)?this.events.emit(hn("session_extend",i),{}):As(n)&&this.events.emit(hn("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:i}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionPingResponse=(t,n)=>{const{id:i}=n,s=hn("session_ping",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);setTimeout(()=>{xo(n)?this.events.emit(hn("session_ping",i),{}):As(n)&&this.events.emit(hn("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(rl.publish,async()=>{s(await this.deleteSession({topic:t,id:i}))})}),this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:ni("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async(t,n)=>{const{id:i,params:s}=n;try{await this.isValidRequest(Ro({topic:t},s));const o=f2(JSON.stringify(Qu("wc_sessionRequest",s,i))),a=this.client.session.get(t),l=await this.getVerifyContext(o,a.peer.metadata),u={id:i,topic:t,params:s,verifyContext:l};await this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(o){await this.sendError({id:i,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionRequestResponse=(t,n)=>{const{id:i}=n,s=hn("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);xo(n)?this.events.emit(hn("session_request",i),{result:n.result}):As(n)&&this.events.emit(hn("session_request",i),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:i,params:s}=n;try{const o=`${t}_session_event_${s.event.name}`,a=ux.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Ro({topic:t},s)),this.client.events.emit("session_event",{id:i,topic:t,params:s}),ux.set(o,i)}catch(o){await this.sendError({id:i,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionAuthenticateResponse=(t,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:t,payload:n}),xo(n)?this.events.emit(hn("session_request",i),{result:n.result}):As(n)&&this.events.emit(hn("session_request",i),{error:n.error})},this.onSessionAuthenticateRequest=async(t,n)=>{const{requester:i,authPayload:s,expiryTimestamp:o}=n.params,a=f2(JSON.stringify(n)),l=await this.getVerifyContext(a,this.client.metadata),u={requester:i,pairingTopic:t,id:n.id,authPayload:s,verifyContext:l,expiryTimestamp:o};await this.client.auth.requests.set(n.id,u),this.client.events.emit("session_authenticate",{topic:t,params:n.params,id:n.id})},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=c0.idle,this.processSessionRequestQueue()},Ye.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===t&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=hn("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(hn("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===c0.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=c0.active,this.client.events.emit("session_request",t)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===t.topic);n&&this.onSessionProposeRequest(t.topic,Qu("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=async t=>{if(!xc(t)){const{message:l}=Bt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,relays:a}=t;if(qa(n)||await this.isValidPairingTopic(n),!vQe(a,!0)){const{message:l}=Bt("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(l)}!qa(i)&&lx(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!qa(s)&&lx(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),qa(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(t,n)=>{const i=wQe(t,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async t=>{if(!xc(t))throw new Error(Bt("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o}=t;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const a=this.client.proposal.get(n),l=VU(i,"approve()");if(l)throw new Error(l.message);const u=G0e(a.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Is(s,!0)){const{message:h}=Bt("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(h)}qa(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async t=>{if(!xc(t)){const{message:s}=Bt("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(s)}const{id:n,reason:i}=t;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!xQe(i)){const{message:s}=Bt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=t=>{if(!xc(t)){const{message:u}=Bt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(u)}const{relay:n,controller:i,namespaces:s,expiry:o}=t;if(!W0e(n)){const{message:u}=Bt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const a=fQe(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const l=VU(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(E1(o)){const{message:u}=Bt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async t=>{if(!xc(t)){const{message:l}=Bt("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(l)}const{topic:n,namespaces:i}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=VU(i,"update()");if(o)throw new Error(o.message);const a=G0e(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async t=>{if(!xc(t)){const{message:i}=Bt("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(i)}const{topic:n}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!xc(t)){const{message:l}=Bt("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(l)}const{topic:n,request:i,chainId:s,expiry:o}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!V0e(a,s)){const{message:l}=Bt("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!_Qe(i)){const{message:l}=Bt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!CQe(a,s,i.method)){const{message:l}=Bt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(o&&!RQe(o,nF)){const{message:l}=Bt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${nF.min} and ${nF.max}`);throw new Error(l)}},this.isValidRespond=async t=>{var n;if(!xc(t)){const{message:o}=Bt("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(o)}const{topic:i,response:s}=t;try{await this.isValidSessionTopic(i)}catch(o){throw(n=t==null?void 0:t.response)!=null&&n.id&&this.cleanupAfterResponse(t),o}if(!EQe(s)){const{message:o}=Bt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}},this.isValidPing=async t=>{if(!xc(t)){const{message:i}=Bt("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!xc(t)){const{message:a}=Bt("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=t;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!V0e(o,s)){const{message:a}=Bt("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!AQe(i)){const{message:a}=Bt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!SQe(o,s,i.name)){const{message:a}=Bt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidDisconnect=async t=>{if(!xc(t)){const{message:i}=Bt("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidAuthenticate=t=>{const{chains:n,uri:i,domain:s,nonce:o}=t;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!Is(i,!1))throw new Error("uri is required parameter");if(!Is(s,!1))throw new Error("domain is required parameter");if(!Is(o,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(l=>eT(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=eT(n[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(t,n)=>{const i={verified:{verifyUrl:n.verifyUrl||l3,validation:"UNKNOWN",origin:n.url||""}};try{const s=await this.client.core.verify.resolve({attestationId:t,verifyUrl:n.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(i=>{if(!Is(i,!1)){const{message:s}=Bt("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})},this.getPendingAuthRequest=t=>{const n=this.client.auth.requests.get(t);return typeof n=="object"?n:void 0},this.addToRecentlyDeleted=(t,n)=>{if(this.recentlyDeletedMap.set(t,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}},this.checkRecentlyDeleted=t=>{const n=this.recentlyDeletedMap.get(t);if(n){const{message:i}=Bt("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${t}`);throw new Error(i)}}}async isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(rl.message,async e=>{const{topic:t,message:n}=e,{publicKey:i}=this.client.auth.authKeys.keys.includes(ET)?this.client.auth.authKeys.get(ET):{responseTopic:void 0,publicKey:void 0},s=await this.client.core.crypto.decode(t,n,{receiverPublicKey:i});try{gy(s)?(this.client.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):Bm(s)?(await this.client.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.client.core.history.delete(t,s.id)):this.onRelayEventUnknownPayload({topic:t,payload:s})}catch(o){this.client.logger.error(o)}})}registerExpirerEvents(){this.client.core.expirer.on(hu.expired,async e=>{const{topic:t,id:n}=xde(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Bt("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(c3.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(c3.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Is(e,!1)){const{message:t}=Bt("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(E1(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Bt("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!Is(e,!1)){const{message:t}=Bt("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(E1(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=Bt("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=Bt("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Is(e,!1)){const{message:t}=Bt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=Bt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!yQe(e)){const{message:t}=Bt("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(E1(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=Bt("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}},Utt=class extends d2{constructor(e,t){super(e,t,Ett,tF),this.core=e,this.logger=t}},Ftt=class extends d2{constructor(e,t){super(e,t,Att,tF),this.core=e,this.logger=t}};class jtt extends d2{constructor(e,t){super(e,t,Stt,tF,n=>n.id),this.core=e,this.logger=t}}class ztt extends d2{constructor(e,t){super(e,t,ktt,_T,()=>ET),this.core=e,this.logger=t}}class Htt extends d2{constructor(e,t){super(e,t,Mtt,_T),this.core=e,this.logger=t}}class qtt extends d2{constructor(e,t){super(e,t,Ntt,_T,n=>n.id),this.core=e,this.logger=t}}class Wtt{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new ztt(this.core,this.logger),this.pairingTopics=new Htt(this.core,this.logger),this.requests=new qtt(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}let $pe=class extends VQe{constructor(e){super(e),this.protocol=Rpe,this.version=kpe,this.name=rF.name,this.events=new pn.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.authenticate=async n=>{try{return await this.engine.authenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.formatAuthMessage=n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}},this.approveSessionAuthenticate=async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.rejectSessionAuthenticate=async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.name=(e==null?void 0:e.name)||rF.name,this.metadata=(e==null?void 0:e.metadata)||RKe();const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:mc(h1({level:(e==null?void 0:e.logger)||rF.logger}));this.core=(e==null?void 0:e.core)||new _tt(e),this.logger=gi(t,this.name),this.session=new Ftt(this.core,this.logger),this.proposal=new Utt(this.core,this.logger),this.pendingRequest=new jtt(this.core,this.logger),this.engine=new Ltt(this),this.auth=new Wtt(this.core,this.logger)}static async init(e){const t=new $pe(e);return await t.initialize(),t}get context(){return xi(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};const Bpe="error",Vtt="wss://relay.walletconnect.com",Gtt="wc",Ktt="universal_provider",Lpe=`${Gtt}@2:${Ktt}:`,Ztt="https://rpc.walletconnect.com/v1/",l0={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var px=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},iF={exports:{}};/** -* @license -* Lodash -* Copyright OpenJS Foundation and other contributors -* Released under MIT license -* Based on Underscore.js 1.8.3 -* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -*/(function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,g=2,w=4,y=1,C=2,T=1,k=2,N=4,O=8,B=16,z=32,G=64,$=128,D=256,V=512,Q=30,F="...",M=800,b=16,d=1,m=2,x=3,A=1/0,I=9007199254740991,R=17976931348623157e292,S=0/0,E=4294967295,_=E-1,L=E>>>1,ie=[["ary",$],["bind",T],["bindKey",k],["curry",O],["curryRight",B],["flip",V],["partial",z],["partialRight",G],["rearg",D]],q="[object Arguments]",Y="[object Array]",K="[object AsyncFunction]",te="[object Boolean]",re="[object Date]",H="[object DOMException]",U="[object Error]",W="[object Function]",le="[object GeneratorFunction]",de="[object Map]",Se="[object Number]",Me="[object Null]",ke="[object Object]",Ke="[object Promise]",Re="[object Proxy]",je="[object RegExp]",De="[object Set]",Je="[object String]",ze="[object Symbol]",qe="[object Undefined]",Ve="[object WeakMap]",He="[object WeakSet]",Be="[object ArrayBuffer]",Ge="[object DataView]",Xe="[object Float32Array]",se="[object Float64Array]",J="[object Int8Array]",X="[object Int16Array]",ue="[object Int32Array]",we="[object Uint8Array]",ye="[object Uint8ClampedArray]",Ie="[object Uint16Array]",it="[object Uint32Array]",ot=/\b__p \+= '';/g,tt=/\b(__p \+=) '' \+/g,It=/(__e\(.*?\)|\b__t\)) \+\n'';/g,st=/&(?:amp|lt|gt|quot|#39);/g,Nt=/[&<>"']/g,Lt=RegExp(st.source),ht=RegExp(Nt.source),wt=/<%-([\s\S]+?)%>/g,Ut=/<%([\s\S]+?)%>/g,ft=/<%=([\s\S]+?)%>/g,dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vt=/^\w*$/,xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,Gt=RegExp(pt.source),gt=/^\s+/,vt=/\s/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,Kt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ht=/[()=,{}\[\]\/\s]/,qt=/\\(\\)?/g,br=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Tt=/\w*$/,ur=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,ei=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,ri=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qn=/($^)/,Di=/['\n\r\u2028\u2029\\]/g,Wn="\\ud800-\\udfff",$i="\\u0300-\\u036f",Bi="\\ufe20-\\ufe2f",bi="\\u20d0-\\u20ff",Ei=$i+Bi+bi,Ai="\\u2700-\\u27bf",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",Rs="\\xac\\xb1\\xd7\\xf7",ks="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ms="\\u2000-\\u206f",Zo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ka="A-Z\\xc0-\\xd6\\xd8-\\xde",nb="\\ufe0e\\ufe0f",Qf=Rs+ks+Ms+Zo,R0="['’]",k0="["+Wn+"]",og="["+Qf+"]",xu="["+Ei+"]",ib="\\d+",h7="["+Ai+"]",sb="["+Cn+"]",ob="[^"+Wn+Qf+ib+Ai+Cn+Ka+"]",Xf="\\ud83c[\\udffb-\\udfff]",f7="(?:"+xu+"|"+Xf+")",ab="[^"+Wn+"]",ed="(?:\\ud83c[\\udde6-\\uddff]){2}",_u="[\\ud800-\\udbff][\\udc00-\\udfff]",zs="["+Ka+"]",cb="\\u200d",lb="(?:"+sb+"|"+ob+")",Eu="(?:"+zs+"|"+ob+")",ub="(?:"+R0+"(?:d|ll|m|re|s|t|ve))?",hb="(?:"+R0+"(?:D|LL|M|RE|S|T|VE))?",fb=f7+"?",db="["+nb+"]?",d7="(?:"+cb+"(?:"+[ab,ed,_u].join("|")+")"+db+fb+")*",bh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_5="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pb=db+fb+d7,ag="(?:"+[h7,ed,_u].join("|")+")"+pb,p7="(?:"+[ab+xu+"?",xu,ed,_u,k0].join("|")+")",gb=RegExp(R0,"g"),g7=RegExp(xu,"g"),td=RegExp(Xf+"(?="+Xf+")|"+p7+pb,"g"),E5=RegExp([zs+"?"+sb+"+"+ub+"(?="+[og,zs,"$"].join("|")+")",Eu+"+"+hb+"(?="+[og,zs+lb,"$"].join("|")+")",zs+"?"+lb+"+"+ub,zs+"+"+hb,_5,bh,ib,ag].join("|"),"g"),A5=RegExp("["+cb+Wn+Ei+nb+"]"),M0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,C5=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","U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Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Pe={"&":"&","<":"<",">":">",'"':""","'":"'"},at={"&":"&","<":"<",">":">",""":'"',"'":"'"},nr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ii=parseFloat,$r=parseInt,wi=typeof px=="object"&&px&&px.Object===Object&&px,ps=typeof self=="object"&&self&&self.Object===Object&&self,Sr=wi||ps||Function("return this")(),Vn=e&&!e.nodeType&&e,si=Vn&&!0&&r&&!r.nodeType&&r,Jo=si&&si.exports===Vn,Yi=Jo&&wi.process,un=function(){try{var he=si&&si.require&&si.require("util").types;return he||Yi&&Yi.binding&&Yi.binding("util")}catch{}}(),No=un&&un.isArrayBuffer,Tc=un&&un.isDate,Za=un&&un.isMap,cl=un&&un.isRegExp,cg=un&&un.isSet,rd=un&&un.isTypedArray;function Fn(he,_e,be){switch(be.length){case 0:return he.call(_e);case 1:return he.call(_e,be[0]);case 2:return he.call(_e,be[0],be[1]);case 3:return he.call(_e,be[0],be[1],be[2])}return he.apply(_e,be)}function pj(he,_e,be,We){for(var kt=-1,fr=he==null?0:he.length;++kt-1}function mb(he,_e,be){for(var We=-1,kt=he==null?0:he.length;++We-1;);return be}function A7(he,_e){for(var be=he.length;be--&&ll(_e,he[be],0)>-1;);return be}function Ej(he,_e){for(var be=he.length,We=0;be--;)he[be]===_e&&++We;return We}var Aj=yb(ve),Cj=yb(Pe);function Sj(he){return"\\"+nr[he]}function Ij(he,_e){return he==null?t:he[_e]}function ul(he){return A5.test(he)}function Tj(he){return M0.test(he)}function Rj(he){for(var _e,be=[];!(_e=he.next()).done;)be.push(_e.value);return be}function Ab(he){var _e=-1,be=Array(he.size);return he.forEach(function(We,kt){be[++_e]=[kt,We]}),be}function C7(he,_e){return function(be){return he(_e(be))}}function Xo(he,_e){for(var be=-1,We=he.length,kt=0,fr=[];++be-1}function mz(c,f){var v=this.__data__,P=Z0(v,c);return P<0?(++this.size,v.push([c,f])):v[P][1]=f,this}Xs.prototype.clear=fz,Xs.prototype.delete=dz,Xs.prototype.get=pz,Xs.prototype.has=gz,Xs.prototype.set=mz;function eo(c){var f=-1,v=c==null?0:c.length;for(this.clear();++f=f?c:f)),c}function ji(c,f,v,P,j,ee){var ne,ae=f&p,fe=f&g,Ae=f&w;if(v&&(ne=j?v(c,P,j,ee):v(c)),ne!==t)return ne;if(!Or(c))return c;var Ce=Mt(c);if(Ce){if(ne=yH(c),!ae)return oi(c,ne)}else{var Te=Nn(c),$e=Te==W||Te==le;if(sa(c))return a9(c,ae);if(Te==ke||Te==q||$e&&!j){if(ne=fe||$e?{}:S9(c),!ae)return fe?lH(c,Nz(ne,c)):cH(c,B7(ne,c))}else{if(!_r[Te])return j?c:{};ne=xH(c,Te,ae)}}ee||(ee=new cs);var Qe=ee.get(c);if(Qe)return Qe;ee.set(c,ne),t_(c)?c.forEach(function(bt){ne.add(ji(bt,f,v,bt,c,ee))}):X9(c)&&c.forEach(function(bt,Qt){ne.set(Qt,ji(bt,f,v,Qt,c,ee))});var mt=Ae?fe?Jb:Zb:fe?ci:fn,jt=Ce?t:mt(c);return Li(jt||c,function(bt,Qt){jt&&(Qt=bt,bt=c[Qt]),Ah(ne,Qt,ji(bt,f,v,Qt,c,ee))}),ne}function Pz(c){var f=fn(c);return function(v){return L7(v,c,f)}}function L7(c,f,v){var P=v.length;if(c==null)return!P;for(c=Er(c);P--;){var j=v[P],ee=f[j],ne=c[j];if(ne===t&&!(j in c)||!ee(ne))return!1}return!0}function U7(c,f,v){if(typeof c!="function")throw new Ui(o);return Mh(function(){c.apply(t,v)},f)}function Ch(c,f,v,P){var j=-1,ee=N0,ne=!0,ae=c.length,fe=[],Ae=f.length;if(!ae)return fe;v&&(f=Pr(f,Ci(v))),P?(ee=mb,ne=!1):f.length>=i&&(ee=wh,ne=!1,f=new Qa(f));e:for(;++jj?0:j+v),P=P===t||P>j?j:Ot(P),P<0&&(P+=j),P=v>P?0:n_(P);v0&&v(ae)?f>1?xn(ae,f-1,v,P,j):Qo(j,ae):P||(j[j.length]=ae)}return j}var Mb=d9(),z7=d9(!0);function Ns(c,f){return c&&Mb(c,f,fn)}function Nb(c,f){return c&&z7(c,f,fn)}function Y0(c,f){return Yo(f,function(v){return so(c[v])})}function ec(c,f){f=na(f,c);for(var v=0,P=f.length;c!=null&&vf}function $z(c,f){return c!=null&&vr.call(c,f)}function Bz(c,f){return c!=null&&f in Er(c)}function Lz(c,f,v){return c>=Mn(f,v)&&c=120&&Ce.length>=120)?new Qa(ne&&Ce):t}Ce=c[0];var Te=-1,$e=ae[0];e:for(;++Te-1;)ae!==c&&z0.call(ae,fe,1),z0.call(c,fe,1);return c}function X7(c,f){for(var v=c?f.length:0,P=v-1;v--;){var j=f[v];if(v==P||j!==ee){var ee=j;io(j)?z0.call(c,j,1):zb(c,j)}}return c}function Ub(c,f){return c+W0(P7()*(f-c+1))}function Yz(c,f,v,P){for(var j=-1,ee=an(q0((f-c)/(v||1)),0),ne=be(ee);ee--;)ne[P?ee:++j]=c,c+=v;return ne}function Fb(c,f){var v="";if(!c||f<1||f>I)return v;do f%2&&(v+=c),f=W0(f/2),f&&(c+=c);while(f);return v}function Zt(c,f){return nw(R9(c,f,li),c+"")}function Qz(c){return $7(xl(c))}function Xz(c,f){var v=xl(c);return cp(v,Xa(f,0,v.length))}function Th(c,f,v,P){if(!Or(c))return c;f=na(f,c);for(var j=-1,ee=f.length,ne=ee-1,ae=c;ae!=null&&++jj?0:j+f),v=v>j?j:v,v<0&&(v+=j),j=f>v?0:v-f>>>0,f>>>=0;for(var ee=be(j);++P>>1,ne=c[ee];ne!==null&&!Ii(ne)&&(v?ne<=f:ne=i){var Ae=f?null:dH(c);if(Ae)return O0(Ae);ne=!1,j=wh,fe=new Qa}else fe=f?[]:ae;e:for(;++P=P?c:zi(c,f,v)}var o9=qj||function(c){return Sr.clearTimeout(c)};function a9(c,f){if(f)return c.slice();var v=c.length,P=T7?T7(v):new c.constructor(v);return c.copy(P),P}function Vb(c){var f=new c.constructor(c.byteLength);return new F0(f).set(new F0(c)),f}function iH(c,f){var v=f?Vb(c.buffer):c.buffer;return new c.constructor(v,c.byteOffset,c.byteLength)}function sH(c){var f=new c.constructor(c.source,Tt.exec(c));return f.lastIndex=c.lastIndex,f}function oH(c){return Eh?Er(Eh.call(c)):{}}function c9(c,f){var v=f?Vb(c.buffer):c.buffer;return new c.constructor(v,c.byteOffset,c.length)}function l9(c,f){if(c!==f){var v=c!==t,P=c===null,j=c===c,ee=Ii(c),ne=f!==t,ae=f===null,fe=f===f,Ae=Ii(f);if(!ae&&!Ae&&!ee&&c>f||ee&&ne&&fe&&!ae&&!Ae||P&&ne&&fe||!v&&fe||!j)return 1;if(!P&&!ee&&!Ae&&c=ae)return fe;var Ae=v[P];return fe*(Ae=="desc"?-1:1)}}return c.index-f.index}function u9(c,f,v,P){for(var j=-1,ee=c.length,ne=v.length,ae=-1,fe=f.length,Ae=an(ee-ne,0),Ce=be(fe+Ae),Te=!P;++ae1?v[j-1]:t,ne=j>2?v[2]:t;for(ee=c.length>3&&typeof ee=="function"?(j--,ee):t,ne&&Kn(v[0],v[1],ne)&&(ee=j<3?t:ee,j=1),f=Er(f);++P-1?j[ee?f[ne]:ne]:t}}function m9(c){return no(function(f){var v=f.length,P=v,j=Fi.prototype.thru;for(c&&f.reverse();P--;){var ee=f[P];if(typeof ee!="function")throw new Ui(o);if(j&&!ne&&op(ee)=="wrapper")var ne=new Fi([],!0)}for(P=ne?P:v;++P1&&rr.reverse(),Ce&&feae))return!1;var Ae=ee.get(c),Ce=ee.get(f);if(Ae&&Ce)return Ae==f&&Ce==c;var Te=-1,$e=!0,Qe=v&C?new Qa:t;for(ee.set(c,f),ee.set(f,c);++Te1?"& ":"")+f[P],f=f.join(v>2?", ":" "),c.replace(Ft,`{ -/* [wrapped with `+f+`] */ -`)}function EH(c){return Mt(c)||nc(c)||!!(M7&&c&&c[M7])}function io(c,f){var v=typeof c;return f=f??I,!!f&&(v=="number"||v!="symbol"&&ri.test(c))&&c>-1&&c%1==0&&c0){if(++f>=M)return arguments[0]}else f=0;return c.apply(t,arguments)}}function cp(c,f){var v=-1,P=c.length,j=P-1;for(f=f===t?P:f;++v1?c[f-1]:t;return v=typeof v=="function"?(c.pop(),v):t,j9(c,v)});function z9(c){var f=Z(c);return f.__chain__=!0,f}function Oq(c,f){return f(c),c}function lp(c,f){return f(c)}var Dq=no(function(c){var f=c.length,v=f?c[0]:0,P=this.__wrapped__,j=function(ee){return kb(ee,c)};return f>1||this.__actions__.length||!(P instanceof Xt)||!io(v)?this.thru(j):(P=P.slice(v,+v+(f?1:0)),P.__actions__.push({func:lp,args:[j],thisArg:t}),new Fi(P,this.__chain__).thru(function(ee){return f&&!ee.length&&ee.push(t),ee}))});function $q(){return z9(this)}function Bq(){return new Fi(this.value(),this.__chain__)}function Lq(){this.__values__===t&&(this.__values__=r_(this.value()));var c=this.__index__>=this.__values__.length,f=c?t:this.__values__[this.__index__++];return{done:c,value:f}}function Uq(){return this}function Fq(c){for(var f,v=this;v instanceof K0;){var P=D9(v);P.__index__=0,P.__values__=t,f?j.__wrapped__=P:f=P;var j=P;v=v.__wrapped__}return j.__wrapped__=c,f}function jq(){var c=this.__wrapped__;if(c instanceof Xt){var f=c;return this.__actions__.length&&(f=new Xt(this)),f=f.reverse(),f.__actions__.push({func:lp,args:[iw],thisArg:t}),new Fi(f,this.__chain__)}return this.thru(iw)}function zq(){return i9(this.__wrapped__,this.__actions__)}var Hq=tp(function(c,f,v){vr.call(c,v)?++c[v]:to(c,v,1)});function qq(c,f,v){var P=Mt(c)?b7:Oz;return v&&Kn(c,f,v)&&(f=t),P(c,ut(f,3))}function Wq(c,f){var v=Mt(c)?Yo:j7;return v(c,ut(f,3))}var Vq=g9($9),Gq=g9(B9);function Kq(c,f){return xn(up(c,f),1)}function Zq(c,f){return xn(up(c,f),A)}function Jq(c,f,v){return v=v===t?1:Ot(v),xn(up(c,f),v)}function H9(c,f){var v=Mt(c)?Li:ta;return v(c,ut(f,3))}function q9(c,f){var v=Mt(c)?gj:F7;return v(c,ut(f,3))}var Yq=tp(function(c,f,v){vr.call(c,v)?c[v].push(f):to(c,v,[f])});function Qq(c,f,v,P){c=ai(c)?c:xl(c),v=v&&!P?Ot(v):0;var j=c.length;return v<0&&(v=an(j+v,0)),gp(c)?v<=j&&c.indexOf(f,v)>-1:!!j&&ll(c,f,v)>-1}var Xq=Zt(function(c,f,v){var P=-1,j=typeof f=="function",ee=ai(c)?be(c.length):[];return ta(c,function(ne){ee[++P]=j?Fn(f,ne,v):Sh(ne,f,v)}),ee}),eW=tp(function(c,f,v){to(c,v,f)});function up(c,f){var v=Mt(c)?Pr:G7;return v(c,ut(f,3))}function tW(c,f,v,P){return c==null?[]:(Mt(f)||(f=f==null?[]:[f]),v=P?t:v,Mt(v)||(v=v==null?[]:[v]),Y7(c,f,v))}var rW=tp(function(c,f,v){c[v?0:1].push(f)},function(){return[[],[]]});function nW(c,f,v){var P=Mt(c)?bb:x7,j=arguments.length<3;return P(c,ut(f,4),v,j,ta)}function iW(c,f,v){var P=Mt(c)?mj:x7,j=arguments.length<3;return P(c,ut(f,4),v,j,F7)}function sW(c,f){var v=Mt(c)?Yo:j7;return v(c,dp(ut(f,3)))}function oW(c){var f=Mt(c)?$7:Qz;return f(c)}function aW(c,f,v){(v?Kn(c,f,v):f===t)?f=1:f=Ot(f);var P=Mt(c)?Rz:Xz;return P(c,f)}function cW(c){var f=Mt(c)?kz:tH;return f(c)}function lW(c){if(c==null)return 0;if(ai(c))return gp(c)?hl(c):c.length;var f=Nn(c);return f==de||f==De?c.size:$b(c).length}function uW(c,f,v){var P=Mt(c)?wb:rH;return v&&Kn(c,f,v)&&(f=t),P(c,ut(f,3))}var hW=Zt(function(c,f){if(c==null)return[];var v=f.length;return v>1&&Kn(c,f[0],f[1])?f=[]:v>2&&Kn(f[0],f[1],f[2])&&(f=[f[0]]),Y7(c,xn(f,1),[])}),hp=Wj||function(){return Sr.Date.now()};function fW(c,f){if(typeof f!="function")throw new Ui(o);return c=Ot(c),function(){if(--c<1)return f.apply(this,arguments)}}function W9(c,f,v){return f=v?t:f,f=c&&f==null?c.length:f,ro(c,$,t,t,t,t,f)}function V9(c,f){var v;if(typeof f!="function")throw new Ui(o);return c=Ot(c),function(){return--c>0&&(v=f.apply(this,arguments)),c<=1&&(f=t),v}}var ow=Zt(function(c,f,v){var P=T;if(v.length){var j=Xo(v,vl(ow));P|=z}return ro(c,P,f,v,j)}),G9=Zt(function(c,f,v){var P=T|k;if(v.length){var j=Xo(v,vl(G9));P|=z}return ro(f,P,c,v,j)});function K9(c,f,v){f=v?t:f;var P=ro(c,O,t,t,t,t,t,f);return P.placeholder=K9.placeholder,P}function Z9(c,f,v){f=v?t:f;var P=ro(c,B,t,t,t,t,t,f);return P.placeholder=Z9.placeholder,P}function J9(c,f,v){var P,j,ee,ne,ae,fe,Ae=0,Ce=!1,Te=!1,$e=!0;if(typeof c!="function")throw new Ui(o);f=qi(f)||0,Or(v)&&(Ce=!!v.leading,Te="maxWait"in v,ee=Te?an(qi(v.maxWait)||0,f):ee,$e="trailing"in v?!!v.trailing:$e);function Qe(Wr){var us=P,ao=j;return P=j=t,Ae=Wr,ne=c.apply(ao,us),ne}function mt(Wr){return Ae=Wr,ae=Mh(Qt,f),Ce?Qe(Wr):ne}function jt(Wr){var us=Wr-fe,ao=Wr-Ae,g_=f-us;return Te?Mn(g_,ee-ao):g_}function bt(Wr){var us=Wr-fe,ao=Wr-Ae;return fe===t||us>=f||us<0||Te&&ao>=ee}function Qt(){var Wr=hp();if(bt(Wr))return rr(Wr);ae=Mh(Qt,jt(Wr))}function rr(Wr){return ae=t,$e&&P?Qe(Wr):(P=j=t,ne)}function Ti(){ae!==t&&o9(ae),Ae=0,P=fe=j=ae=t}function Zn(){return ae===t?ne:rr(hp())}function Ri(){var Wr=hp(),us=bt(Wr);if(P=arguments,j=this,fe=Wr,us){if(ae===t)return mt(fe);if(Te)return o9(ae),ae=Mh(Qt,f),Qe(fe)}return ae===t&&(ae=Mh(Qt,f)),ne}return Ri.cancel=Ti,Ri.flush=Zn,Ri}var dW=Zt(function(c,f){return U7(c,1,f)}),pW=Zt(function(c,f,v){return U7(c,qi(f)||0,v)});function gW(c){return ro(c,V)}function fp(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new Ui(o);var v=function(){var P=arguments,j=f?f.apply(this,P):P[0],ee=v.cache;if(ee.has(j))return ee.get(j);var ne=c.apply(this,P);return v.cache=ee.set(j,ne)||ee,ne};return v.cache=new(fp.Cache||eo),v}fp.Cache=eo;function dp(c){if(typeof c!="function")throw new Ui(o);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}function mW(c){return V9(2,c)}var bW=nH(function(c,f){f=f.length==1&&Mt(f[0])?Pr(f[0],Ci(ut())):Pr(xn(f,1),Ci(ut()));var v=f.length;return Zt(function(P){for(var j=-1,ee=Mn(P.length,v);++j=f}),nc=q7(function(){return arguments}())?q7:function(c){return Br(c)&&vr.call(c,"callee")&&!k7.call(c,"callee")},Mt=be.isArray,NW=No?Ci(No):Fz;function ai(c){return c!=null&&pp(c.length)&&!so(c)}function qr(c){return Br(c)&&ai(c)}function PW(c){return c===!0||c===!1||Br(c)&&Gn(c)==te}var sa=Gj||ww,OW=Tc?Ci(Tc):jz;function DW(c){return Br(c)&&c.nodeType===1&&!Nh(c)}function $W(c){if(c==null)return!0;if(ai(c)&&(Mt(c)||typeof c=="string"||typeof c.splice=="function"||sa(c)||yl(c)||nc(c)))return!c.length;var f=Nn(c);if(f==de||f==De)return!c.size;if(kh(c))return!$b(c).length;for(var v in c)if(vr.call(c,v))return!1;return!0}function BW(c,f){return Ih(c,f)}function LW(c,f,v){v=typeof v=="function"?v:t;var P=v?v(c,f):t;return P===t?Ih(c,f,t,v):!!P}function cw(c){if(!Br(c))return!1;var f=Gn(c);return f==U||f==H||typeof c.message=="string"&&typeof c.name=="string"&&!Nh(c)}function UW(c){return typeof c=="number"&&N7(c)}function so(c){if(!Or(c))return!1;var f=Gn(c);return f==W||f==le||f==K||f==Re}function Q9(c){return typeof c=="number"&&c==Ot(c)}function pp(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=I}function Or(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function Br(c){return c!=null&&typeof c=="object"}var X9=Za?Ci(Za):Hz;function FW(c,f){return c===f||Db(c,f,Qb(f))}function jW(c,f,v){return v=typeof v=="function"?v:t,Db(c,f,Qb(f),v)}function zW(c){return e_(c)&&c!=+c}function HW(c){if(SH(c))throw new kt(s);return W7(c)}function qW(c){return c===null}function WW(c){return c==null}function e_(c){return typeof c=="number"||Br(c)&&Gn(c)==Se}function Nh(c){if(!Br(c)||Gn(c)!=ke)return!1;var f=j0(c);if(f===null)return!0;var v=vr.call(f,"constructor")&&f.constructor;return typeof v=="function"&&v instanceof v&&B0.call(v)==jj}var lw=cl?Ci(cl):qz;function VW(c){return Q9(c)&&c>=-I&&c<=I}var t_=cg?Ci(cg):Wz;function gp(c){return typeof c=="string"||!Mt(c)&&Br(c)&&Gn(c)==Je}function Ii(c){return typeof c=="symbol"||Br(c)&&Gn(c)==ze}var yl=rd?Ci(rd):Vz;function GW(c){return c===t}function KW(c){return Br(c)&&Nn(c)==Ve}function ZW(c){return Br(c)&&Gn(c)==He}var JW=sp(Bb),YW=sp(function(c,f){return c<=f});function r_(c){if(!c)return[];if(ai(c))return gp(c)?as(c):oi(c);if(vh&&c[vh])return Rj(c[vh]());var f=Nn(c),v=f==de?Ab:f==De?O0:xl;return v(c)}function oo(c){if(!c)return c===0?c:0;if(c=qi(c),c===A||c===-A){var f=c<0?-1:1;return f*R}return c===c?c:0}function Ot(c){var f=oo(c),v=f%1;return f===f?v?f-v:f:0}function n_(c){return c?Xa(Ot(c),0,E):0}function qi(c){if(typeof c=="number")return c;if(Ii(c))return S;if(Or(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=Or(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=_7(c);var v=Xn.test(c);return v||ti.test(c)?$r(c.slice(2),v?2:8):ur.test(c)?S:+c}function i_(c){return Ps(c,ci(c))}function QW(c){return c?Xa(Ot(c),-I,I):c===0?c:0}function wr(c){return c==null?"":Si(c)}var XW=bl(function(c,f){if(kh(f)||ai(f)){Ps(f,fn(f),c);return}for(var v in f)vr.call(f,v)&&Ah(c,v,f[v])}),s_=bl(function(c,f){Ps(f,ci(f),c)}),mp=bl(function(c,f,v,P){Ps(f,ci(f),c,P)}),eV=bl(function(c,f,v,P){Ps(f,fn(f),c,P)}),tV=no(kb);function rV(c,f){var v=ml(c);return f==null?v:B7(v,f)}var nV=Zt(function(c,f){c=Er(c);var v=-1,P=f.length,j=P>2?f[2]:t;for(j&&Kn(f[0],f[1],j)&&(P=1);++v1),ee}),Ps(c,Jb(c),v),P&&(v=ji(v,p|g|w,pH));for(var j=f.length;j--;)zb(v,f[j]);return v});function xV(c,f){return a_(c,dp(ut(f)))}var _V=no(function(c,f){return c==null?{}:Zz(c,f)});function a_(c,f){if(c==null)return{};var v=Pr(Jb(c),function(P){return[P]});return f=ut(f),Q7(c,v,function(P,j){return f(P,j[0])})}function EV(c,f,v){f=na(f,c);var P=-1,j=f.length;for(j||(j=1,c=t);++Pf){var P=c;c=f,f=P}if(v||c%1||f%1){var j=P7();return Mn(c+j*(f-c+ii("1e-"+((j+"").length-1))),f)}return Ub(c,f)}var OV=wl(function(c,f,v){return f=f.toLowerCase(),c+(v?u_(f):f)});function u_(c){return fw(wr(c).toLowerCase())}function h_(c){return c=wr(c),c&&c.replace(bn,Aj).replace(g7,"")}function DV(c,f,v){c=wr(c),f=Si(f);var P=c.length;v=v===t?P:Xa(Ot(v),0,P);var j=v;return v-=f.length,v>=0&&c.slice(v,j)==f}function $V(c){return c=wr(c),c&&ht.test(c)?c.replace(Nt,Cj):c}function BV(c){return c=wr(c),c&&Gt.test(c)?c.replace(pt,"\\$&"):c}var LV=wl(function(c,f,v){return c+(v?"-":"")+f.toLowerCase()}),UV=wl(function(c,f,v){return c+(v?" ":"")+f.toLowerCase()}),FV=p9("toLowerCase");function jV(c,f,v){c=wr(c),f=Ot(f);var P=f?hl(c):0;if(!f||P>=f)return c;var j=(f-P)/2;return ip(W0(j),v)+c+ip(q0(j),v)}function zV(c,f,v){c=wr(c),f=Ot(f);var P=f?hl(c):0;return f&&P>>0,v?(c=wr(c),c&&(typeof f=="string"||f!=null&&!lw(f))&&(f=Si(f),!f&&ul(c))?ia(as(c),0,v):c.split(f,v)):[]}var ZV=wl(function(c,f,v){return c+(v?" ":"")+fw(f)});function JV(c,f,v){return c=wr(c),v=v==null?0:Xa(Ot(v),0,c.length),f=Si(f),c.slice(v,v+f.length)==f}function YV(c,f,v){var P=Z.templateSettings;v&&Kn(c,f,v)&&(f=t),c=wr(c),f=mp({},f,P,x9);var j=mp({},f.imports,P.imports,x9),ee=fn(j),ne=Eb(j,ee),ae,fe,Ae=0,Ce=f.interpolate||qn,Te="__p += '",$e=Cb((f.escape||qn).source+"|"+Ce.source+"|"+(Ce===ft?br:qn).source+"|"+(f.evaluate||qn).source+"|$","g"),Qe="//# sourceURL="+(vr.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++m7+"]")+` -`;c.replace($e,function(bt,Qt,rr,Ti,Zn,Ri){return rr||(rr=Ti),Te+=c.slice(Ae,Ri).replace(Di,Sj),Qt&&(ae=!0,Te+=`' + +`)+ke+`return __p +}`;var jt=yE(function(){return mr(Q,Ye+"return "+ke).apply(t,ie)});if(jt.source=ke,Xv(jt))throw jt;return jt}function xZ(c){return xr(c).toLowerCase()}function _Z(c){return xr(c).toUpperCase()}function EZ(c,d,w){if(c=xr(c),c&&(w||d===t))return k9(c);if(!c||!(d=ki(d)))return c;var O=us(c),z=us(d),Q=R9(O,z),ie=M9(O,z)+1;return mo(O,Q,ie).join("")}function CZ(c,d,w){if(c=xr(c),c&&(w||d===t))return c.slice(0,O9(c)+1);if(!c||!(d=ki(d)))return c;var O=us(c),z=M9(O,us(d))+1;return mo(O,0,z).join("")}function AZ(c,d,w){if(c=xr(c),c&&(w||d===t))return c.replace(Dt,"");if(!c||!(d=ki(d)))return c;var O=us(c),z=R9(O,us(d));return mo(O,z).join("")}function SZ(c,d){var w=te,O=D;if(Lr(d)){var z="separator"in d?d.separator:z;w="length"in d?$t(d.length):w,O="omission"in d?ki(d.omission):O}c=xr(c);var Q=c.length;if(Cl(c)){var ie=us(c);Q=ie.length}if(w>=Q)return c;var ce=w-Al(O);if(ce<1)return O;var he=ie?mo(ie,0,ce).join(""):c.slice(0,ce);if(z===t)return he+O;if(ie&&(ce+=he.length-ce),ew(z)){if(c.slice(ce).search(z)){var Se,Ie=he;for(z.global||(z=gv(z.source,xr(Xt.exec(z))+"g")),z.lastIndex=0;Se=z.exec(Ie);)var ke=Se.index;he=he.slice(0,ke===t?ce:ke)}}else if(c.indexOf(ki(z),ce)!=ce){var Ue=he.lastIndexOf(z);Ue>-1&&(he=he.slice(0,Ue))}return he+O}function IZ(c){return c=xr(c),c&&Lt.test(c)?c.replace(xt,rq):c}var TZ=Pl(function(c,d,w){return c+(w?" ":"")+d.toUpperCase()}),nw=x_("toUpperCase");function wE(c,d,w){return c=xr(c),d=w?t:d,d===t?YH(c)?sq(c):zH(c):c.match(d)||[]}var yE=Kt(function(c,d){try{return jn(c,t,d)}catch(w){return Xv(w)?w:new Tt(w)}}),kZ=ua(function(c,d){return qi(d,function(w){w=Fs(w),ca(c,w,Yv(c[w],c))}),c});function RZ(c){var d=c==null?0:c.length,w=ht();return c=d?Br(c,function(O){if(typeof O[1]!="function")throw new Wi(a);return[w(O[0]),O[1]]}):[],Kt(function(O){for(var z=-1;++zT)return[];var w=M,O=On(c,M);d=ht(d),c-=M;for(var z=hv(O,d);++w0||d<0)?new tr(w):(c<0?w=w.takeRight(-c):c&&(w=w.drop(c)),d!==t&&(d=$t(d),w=d<0?w.dropRight(-d):w.take(d-c)),w)},tr.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},tr.prototype.toArray=function(){return this.take(M)},Ls(tr.prototype,function(c,d){var w=/^(?:filter|find|map|reject)|While$/.test(d),O=/^(?:head|last)$/.test(d),z=J[O?"take"+(d=="last"?"Right":""):d],Q=O||/^find/.test(d);z&&(J.prototype[d]=function(){var ie=this.__wrapped__,ce=O?[1]:arguments,he=ie instanceof tr,Se=ce[0],Ie=he||kt(ie),ke=function(Qt){var nr=z.apply(J,co([Qt],ce));return O&&Ue?nr[0]:nr};Ie&&w&&typeof Se=="function"&&Se.length!=1&&(he=Ie=!1);var Ue=this.__chain__,Ye=!!this.__actions__.length,mt=Q&&!Ue,jt=he&&!Ye;if(!Q&&Ie){ie=jt?ie:new tr(this);var gt=c.apply(ie,ce);return gt.__actions__.push({func:Hp,args:[ke],thisArg:t}),new Vi(gt,Ue)}return mt&&jt?c.apply(this,ce):(gt=this.thru(ke),mt?O?gt.value()[0]:gt.value():gt)})}),qi(["pop","push","shift","sort","splice","unshift"],function(c){var d=mp[c],w=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);J.prototype[c]=function(){var z=arguments;if(O&&!this.__chain__){var Q=this.value();return d.apply(kt(Q)?Q:[],z)}return this[w](function(ie){return d.apply(kt(ie)?ie:[],z)})}}),Ls(tr.prototype,function(c,d){var w=J[d];if(w){var O=w.name+"";Er.call(kl,O)||(kl[O]=[]),kl[O].push({name:d,func:w})}}),kl[$p(t,k).name]=[{name:"wrapper",func:t}],tr.prototype.clone=Iq,tr.prototype.reverse=Tq,tr.prototype.value=kq,J.prototype.at=iG,J.prototype.chain=sG,J.prototype.commit=aG,J.prototype.next=oG,J.prototype.plant=lG,J.prototype.reverse=uG,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=fG,J.prototype.first=J.prototype.head,Lf&&(J.prototype[Lf]=cG),J},Sl=aq();li?((li.exports=Sl)._=Sl,Gn._=Sl):kr._=Sl}).call(Cx)})(LU,LU.exports);var TZe=Object.defineProperty,kZe=Object.defineProperties,RZe=Object.getOwnPropertyDescriptors,yde=Object.getOwnPropertySymbols,MZe=Object.prototype.hasOwnProperty,PZe=Object.prototype.propertyIsEnumerable,xde=(r,e,t)=>e in r?TZe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,lT=(r,e)=>{for(var t in e||(e={}))MZe.call(e,t)&&xde(r,t,e[t]);if(yde)for(var t of yde(e))PZe.call(e,t)&&xde(r,t,e[t]);return r},OZe=(r,e)=>kZe(r,RZe(e));function Q1(r,e,t){var n;const i=oHe(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${IZe}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function Ib(r){return r.includes(":")?r.split(":")[1]:r}function _de(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function NZe(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function Ede(r={},e={}){const t=Cde(r),n=Cde(e);return LU.exports.merge(t,n)}function Cde(r){var e,t,n,i;const s={};if(!dx(r))return s;for(const[a,o]of Object.entries(r)){const l=uU(a)?[a]:o.chains,u=o.methods||[],f=o.events||[],h=o.rpcMap||{},m=fx(a);s[m]=OZe(lT(lT({},s[m]),o),{chains:cU(l,(e=s[m])==null?void 0:e.chains),methods:cU(u,(t=s[m])==null?void 0:t.methods),events:cU(f,(n=s[m])==null?void 0:n.events),rpcMap:lT(lT({},h),(i=s[m])==null?void 0:i.rpcMap)})}return s}function DZe(r){return r.includes(":")?r.split(":")[2]:r}function $Ze(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],a=n.accounts||[],o=uU(t)?[t]:n.chains?n.chains:_de(n.accounts);e[t]={chains:o,methods:i,events:s,accounts:a}}return e}function UU(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const Ade={},Xi=r=>Ade[r],FU=(r,e)=>{Ade[r]=e};class BZe{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Ib(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class LZe{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Q1(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(Ib(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class UZe{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Ib(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class FZe{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Ib(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class jZe{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=Ib(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class zZe{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Ib(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class HZe{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=Ib(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new A0(new ta(n,Xi("disableProviderPing")))}}class qZe{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Xi("events"),this.client=Xi("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Q1(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(k0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Q1(e,this.namespace);return typeof n>"u"?void 0:new A0(new ta(n,Xi("disableProviderPing")))}}var WZe=Object.defineProperty,VZe=Object.defineProperties,GZe=Object.getOwnPropertyDescriptors,Sde=Object.getOwnPropertySymbols,KZe=Object.prototype.hasOwnProperty,ZZe=Object.prototype.propertyIsEnumerable,Ide=(r,e,t)=>e in r?WZe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,uT=(r,e)=>{for(var t in e||(e={}))KZe.call(e,t)&&Ide(r,t,e[t]);if(Sde)for(var t of Sde(e))ZZe.call(e,t)&&Ide(r,t,e[t]);return r},jU=(r,e)=>VZe(r,GZe(e));const JZe=class Bve{constructor(e){this.events=new X3,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:y0(K1({level:(e==null?void 0:e.logger)||vde})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new Bve(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:uT({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(a=>t(null,Z1(s,a))).catch(a=>t(a,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Qi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const a=$Ze(s.namespaces);this.namespaces=Ede(this.namespaces,a),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==cde)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Dd(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await mZe.init({logger:this.providerOpts.logger||vde,relayUrl:this.providerOpts.relayUrl||CZe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>fx(t)))];FU("client",this.client),FU("events",this.events),FU("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=NZe(t,this.session),i=_de(n),s=Ede(this.namespaces,this.optionalNamespaces),a=jU(uT({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new LZe({namespace:a});break;case"solana":this.rpcProviders[t]=new UZe({namespace:a});break;case"cosmos":this.rpcProviders[t]=new FZe({namespace:a});break;case"polkadot":this.rpcProviders[t]=new BZe({namespace:a});break;case"cip34":this.rpcProviders[t]=new jZe({namespace:a});break;case"elrond":this.rpcProviders[t]=new zZe({namespace:a});break;case"multiversx":this.rpcProviders[t]=new HZe({namespace:a});break;case"near":this.rpcProviders[t]=new qZe({namespace:a});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&Dd(i)&&this.events.emit("accountsChanged",i.map(DZe))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,a=fx(i),o=UU(i)!==UU(s)?`${a}:${UU(s)}`:i;this.onChainChanged(o)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=jU(uT({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",jU(uT({},Qi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(k0.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(a=>fx(a)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=fx(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${wde}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${wde}/${e}`)}},YZe="wc",QZe="ethereum_provider",XZe=`${YZe}@2:${QZe}:`,eJe="https://rpc.walletconnect.com/v1/",zU=["eth_sendTransaction","personal_sign"],tJe=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],HU=["chainChanged","accountsChanged"],rJe=["chainChanged","accountsChanged","message","disconnect","connect"];var nJe=Object.defineProperty,iJe=Object.defineProperties,sJe=Object.getOwnPropertyDescriptors,Tde=Object.getOwnPropertySymbols,aJe=Object.prototype.hasOwnProperty,oJe=Object.prototype.propertyIsEnumerable,kde=(r,e,t)=>e in r?nJe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ax=(r,e)=>{for(var t in e||(e={}))aJe.call(e,t)&&kde(r,t,e[t]);if(Tde)for(var t of Tde(e))oJe.call(e,t)&&kde(r,t,e[t]);return r},Rde=(r,e)=>iJe(r,sJe(e));function fT(r){return Number(r[0].split(":")[1])}function qU(r){return`0x${r.toString(16)}`}function cJe(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:a,rpcMap:o}=r;if(!Dd(e))throw new Error("Invalid chains");const l={chains:e,methods:n||zU,events:s||HU,rpcMap:Ax({},e.length?{[fT(e)]:o[fT(e)]}:{})},u=s==null?void 0:s.filter(b=>!HU.includes(b)),f=n==null?void 0:n.filter(b=>!zU.includes(b));if(!t&&!a&&!i&&!(u!=null&&u.length)&&!(f!=null&&f.length))return{required:e.length?l:void 0};const h=(u==null?void 0:u.length)&&(f==null?void 0:f.length)||!t,m={chains:[...new Set(h?l.chains.concat(t||[]):t)],methods:[...new Set(l.methods.concat(i!=null&&i.length?i:tJe))],events:[...new Set(l.events.concat(a!=null&&a.length?a:rJe))],rpcMap:o};return{required:e.length?l:void 0,optional:t.length?m:void 0}}let lJe=class Lve{constructor(){this.events=new Xn.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=XZe,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Lve;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=cJe(this.rpc);try{const i=await new Promise(async(a,o)=>{var l;this.rpc.showQrModal&&((l=this.modal)==null||l.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),o(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Rde(Ax({namespaces:Ax({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{a(u)}).catch(u=>{o(new Error(u.message))})});if(!i)return;const s=cHe(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:qU(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",qU(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Rde(Ax({},Qi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",qU(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],a=i.concat(s);if(!a.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const o=i.length?(e==null?void 0:e.methods)||zU:[],l=i.length?(e==null?void 0:e.events)||HU:[],u=(e==null?void 0:e.optionalMethods)||[],f=(e==null?void 0:e.optionalEvents)||[],h=(e==null?void 0:e.rpcMap)||this.buildRpcMap(a,e.projectId),m=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(b=>this.formatChainId(b)),optionalChains:s.map(b=>this.formatChainId(b)),methods:o,events:l,optionalMethods:u,optionalEvents:f,rpcMap:h,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:m,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?fT(this.rpc.chains):fT(this.rpc.optionalChains),this.signer=await JZe.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await Promise.resolve().then(()=>g2e);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Ax({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&Dd(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&Dd(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${eJe}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};const In={WALLET_ID:"@w3m/wallet_id",ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3},ka={getCaipDefaultChain(r){if(r)return{id:`${Zt.EIP155}:${r.chainId}`,name:r.name,imageId:Eo.EIP155NetworkImageIds[r.chainId]}},hexStringToNumber(r){const e=r.startsWith("0x")?r.slice(2):r;return parseInt(e,16)},numberToHexString(r){return`0x${r.toString(16)}`},async getUserInfo(r){const[e,t]=await Promise.all([ka.getAddress(r),ka.getChainId(r)]);return{chainId:t,address:e}},async getChainId(r){const e=await r.request({method:"eth_chainId"});return Number(e)},async getAddress(r){const[e]=await r.request({method:"eth_accounts"});return e},async addEthereumChain(r,e){await r.request({method:"wallet_addEthereumChain",params:[{chainId:ka.numberToHexString(e.chainId),rpcUrls:[e.rpcUrl],chainName:e.name,nativeCurrency:{name:e.currency,decimals:18,symbol:e.currency},blockExplorerUrls:[e.explorerUrl],iconUrls:[Eo.EIP155NetworkImageIds[e.chainId]]}]})}},Ra=Ei({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,isConnected:!1}),yt={state:Ra,subscribeKey(r,e){return Lo(Ra,r,e)},subscribe(r){return ms(Ra,()=>r(Ra))},setProvider(r){r&&(Ra.provider=y1(r))},setProviderType(r){Ra.providerType=r},setAddress(r){Ra.address=r},setPreferredAccountType(r){Ra.preferredAccountType=r},setChainId(r){Ra.chainId=r},setIsConnected(r){Ra.isConnected=r},setError(r){Ra.error=r},reset(){Ra.provider=void 0,Ra.address=void 0,Ra.chainId=void 0,Ra.providerType=void 0,Ra.isConnected=!1,Ra.error=void 0,Ra.preferredAccountType=void 0}};class uJe extends $Le{constructor(e){const{ethersConfig:t,siweConfig:n,chains:i,defaultChain:s,tokens:a,chainImages:o,_sdkVersion:l,...u}=e;if(!t)throw new Error("web3modal:constructor - ethersConfig is undefined");if(!u.projectId)throw new Error("web3modal:constructor - projectId is undefined");const f={switchCaipNetwork:async m=>{const b=a8.caipNetworkIdToNumber(m==null?void 0:m.id);if(b)try{yt.setError(void 0),await this.switchNetwork(b)}catch(v){throw yt.setError(v),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}},getApprovedCaipNetworksData:async()=>new Promise(async m=>{var v,C,R,k;const b=localStorage.getItem(In.WALLET_ID);if(b!=null&&b.includes(Zt.WALLET_CONNECT_CONNECTOR_ID)){const P=await this.getWalletConnectProvider();if(!P)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const N=(C=(v=P.signer)==null?void 0:v.session)==null?void 0:C.namespaces,$=(R=N==null?void 0:N[Zt.EIP155])==null?void 0:R.methods,j=(k=N==null?void 0:N[Zt.EIP155])==null?void 0:k.chains,G={supportsAllNetworks:($==null?void 0:$.includes(Zt.ADD_CHAIN_METHOD))??!1,approvedCaipNetworkIds:j};m(G)}else m({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})})},h={connectWalletConnect:async m=>{const b=await this.getWalletConnectProvider();if(!b)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");b.on("display_uri",v=>{m(v)}),await b.connect(),await this.setWalletConnectProvider()},connectExternal:async({id:m,info:b,provider:v})=>{if(m===Zt.INJECTED_CONNECTOR_ID){const C=t.injected;if(!C)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{yt.setError(void 0),await C.request({method:"eth_requestAccounts"}),this.setInjectedProvider(t)}catch(R){yt.setError(R)}}else if(m===Zt.EIP6963_CONNECTOR_ID&&b&&v)try{yt.setError(void 0),await v.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(v,b.name)}catch(C){yt.setError(C)}else if(m===Zt.COINBASE_CONNECTOR_ID){const C=t.coinbase;if(!C)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{yt.setError(void 0),await C.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(t)}catch(R){yt.setError(R)}}else m===Zt.EMAIL_CONNECTOR_ID&&this.setEmailProvider()},checkInstalled(m){return m?t.injected&&!(window!=null&&window.ethereum)?!1:m.some(b=>{var v;return!!((v=window.ethereum)!=null&&v[String(b)])}):!!window.ethereum},disconnect:async()=>{var v;const m=yt.state.provider,b=yt.state.providerType;localStorage.removeItem(In.WALLET_ID),yt.reset(),b===Zt.WALLET_CONNECT_CONNECTOR_ID?await m.disconnect():b!==Zt.EMAIL_CONNECTOR_ID?m==null||m.emit("disconnect"):await((v=this.emailProvider)==null?void 0:v.disconnect())},signMessage:async m=>{const b=yt.state.provider;if(!b)throw new Error("connectionControllerClient:signMessage - provider is undefined");return await b.request({method:"personal_sign",params:[m,this.getAddress()]})},parseUnits:(m,b)=>AC(m,b),formatUnits:(m,b)=>CC(m,b),async estimateGas(m){const b=yt.state.chainId,v=yt.state.provider,C=yt.state.address;if(!v)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!C)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const R={from:m.address,to:m.to,data:m.data,type:0},k=new yA(v,b);return await new yg(k,C).estimateGas(R)},sendTransaction:async m=>{const b=yt.state.chainId,v=yt.state.provider,C=yt.state.address;if(!v)throw new Error("connectionControllerClient:sendTransaction - provider is undefined");if(!C)throw new Error("connectionControllerClient:sendTransaction - address is undefined");const R={to:m.to,value:m.value,gasLimit:m.gas,gasPrice:m.gasPrice,data:m.data,type:0},k=new yA(v,b),$=await(await new yg(k,C).sendTransaction(R)).wait();return($==null?void 0:$.hash)||null}};super({networkControllerClient:f,connectionControllerClient:h,siweControllerClient:n,defaultChain:ka.getCaipDefaultChain(s),tokens:vBe.getCaipTokens(a),_sdkVersion:l??`html-ethers-${Zt.VERSION}`,...u}),this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.options=void 0,this.options=e,this.metadata=t.metadata,this.projectId=u.projectId,this.chains=i,this.createProvider(),yt.subscribeKey("address",()=>{this.syncAccount()}),yt.subscribeKey("chainId",()=>{this.syncNetwork(o)}),this.syncRequestedNetworks(i,o),this.syncConnectors(t),t.EIP6963&&typeof window<"u"&&(this.listenConnectors(t.EIP6963),this.checkActive6963Provider()),t.email&&this.syncEmailConnector(u.projectId),t.injected&&this.checkActiveInjectedProvider(t),t.coinbase&&this.checkActiveCoinbaseProvider(t)}getState(){const e=super.getState();return{...e,selectedNetworkId:a8.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState(t=>e({...t,selectedNetworkId:a8.caipNetworkIdToNumber(t.selectedNetworkId)}))}setAddress(e){const t=e?Vr(e):void 0;yt.setAddress(t)}getAddress(){const{address:e}=yt.state;return e?Vr(e):void 0}getError(){return yt.state.error}getChainId(){return yt.state.chainId}getIsConnected(){return yt.state.isConnected}getWalletProvider(){return yt.state.provider}getWalletProviderType(){return yt.state.providerType}subscribeProvider(e){return yt.subscribe(e)}async disconnect(){const{provider:e,providerType:t}=yt.state;if(localStorage.removeItem(In.WALLET_ID),yt.reset(),t==="injected"||t==="eip6963")e==null||e.emit("disconnect");else{const n=e;if(n)try{yt.setError(void 0),await n.disconnect()}catch(i){yt.setError(i)}}}createProvider(){return!this.walletConnectProviderInitPromise&&typeof window<"u"&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}async initWalletConnectProvider(){const e={projectId:this.projectId,showQrModal:!1,rpcMap:this.chains?this.chains.reduce((t,n)=>(t[n.chainId]=n.rpcUrl,t),{}):{},optionalChains:[...this.chains.map(t=>t.chainId)],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=await lJe.init(e),await this.checkActiveWalletConnectProvider()}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{yt.setError(void 0),await this.createProvider()}catch(e){yt.setError(e)}return this.walletConnectProvider}syncRequestedNetworks(e,t){const n=e==null?void 0:e.map(i=>({id:`${Zt.EIP155}:${i.chainId}`,name:i.name,imageId:Eo.EIP155NetworkImageIds[i.chainId],imageUrl:t==null?void 0:t[i.chainId]}));this.setRequestedCaipNetworks(n??[])}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=localStorage.getItem(In.WALLET_ID);e&&t===Zt.WALLET_CONNECT_CONNECTOR_ID&&await this.setWalletConnectProvider()}checkActiveInjectedProvider(e){const t=e.injected,n=localStorage.getItem(In.WALLET_ID);t&&n===Zt.INJECTED_CONNECTOR_ID&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){var i;const t=e.coinbase,n=localStorage.getItem(In.WALLET_ID);t&&n===Zt.COINBASE_CONNECTOR_ID&&(t._addresses&&((i=t._addresses)==null?void 0:i.length)>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(localStorage.removeItem(In.WALLET_ID),yt.reset()))}checkActive6963Provider(){const e=window==null?void 0:window.localStorage.getItem(In.WALLET_ID);if(e){const t=this.EIP6963Providers.find(n=>n.info.name===e);t&&this.setEIP6963Provider(t.provider,t.info.name)}}async setWalletConnectProvider(){var t;window==null||window.localStorage.setItem(In.WALLET_ID,Zt.WALLET_CONNECT_CONNECTOR_ID);const e=await this.getWalletConnectProvider();e&&(yt.setChainId(e.chainId),yt.setProviderType("walletConnect"),yt.setProvider(e),yt.setIsConnected(!0),this.setAddress((t=e.accounts)==null?void 0:t[0]),this.watchWalletConnect())}async setInjectedProvider(e){window==null||window.localStorage.setItem(In.WALLET_ID,Zt.INJECTED_CONNECTOR_ID);const t=e.injected;if(t){const{address:n,chainId:i}=await ka.getUserInfo(t);n&&i&&(yt.setChainId(i),yt.setProviderType("injected"),yt.setProvider(e.injected),yt.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}async setEIP6963Provider(e,t){if(window==null||window.localStorage.setItem(In.WALLET_ID,t),e){const{address:n,chainId:i}=await ka.getUserInfo(e);n&&i&&(yt.setChainId(i),yt.setProviderType("eip6963"),yt.setProvider(e),yt.setIsConnected(!0),this.setAddress(n),this.watchEIP6963(e))}}async setCoinbaseProvider(e){window==null||window.localStorage.setItem(In.WALLET_ID,Zt.COINBASE_CONNECTOR_ID);const t=e.coinbase;if(t){const{address:n,chainId:i}=await ka.getUserInfo(t);n&&i&&(yt.setChainId(i),yt.setProviderType("coinbaseWallet"),yt.setProvider(e.coinbase),yt.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}}async setEmailProvider(){if(window==null||window.localStorage.setItem(In.WALLET_ID,Zt.EMAIL_CONNECTOR_ID),this.emailProvider){const{address:e,chainId:t,smartAccountDeployed:n,preferredAccountType:i}=await this.emailProvider.connect({chainId:this.getChainId()}),{smartAccountEnabledNetworks:s}=await this.emailProvider.getSmartAccountEnabledNetworks();this.setSmartAccountEnabledNetworks(s),e&&t&&(yt.setChainId(t),yt.setProviderType(Zt.EMAIL_CONNECTOR_ID),yt.setProvider(this.emailProvider),yt.setIsConnected(!0),yt.setAddress(e),yt.setPreferredAccountType(i),this.setSmartAccountDeployed(!!n),this.watchEmail(),this.watchModal()),super.setLoading(!1)}}async watchWalletConnect(){const e=await this.getWalletConnectProvider();function t(){localStorage.removeItem(In.WALLET_ID),yt.reset(),e==null||e.removeListener("disconnect",t),e==null||e.removeListener("accountsChanged",i),e==null||e.removeListener("chainChanged",n)}function n(s){if(s){const a=ka.hexStringToNumber(s);yt.setChainId(a)}}const i=async s=>{s.length>0&&await this.setWalletConnectProvider()};e&&(e.on("disconnect",t),e.on("accountsChanged",i),e.on("chainChanged",n))}watchInjected(e){const t=e.injected;function n(){localStorage.removeItem(In.WALLET_ID),yt.reset(),t==null||t.removeListener("disconnect",n),t==null||t.removeListener("accountsChanged",i),t==null||t.removeListener("chainChanged",s)}function i(a){const o=a==null?void 0:a[0];o?yt.setAddress(Vr(o)):(localStorage.removeItem(In.WALLET_ID),yt.reset())}function s(a){if(a){const o=typeof a=="string"?ka.hexStringToNumber(a):Number(a);yt.setChainId(o)}}t&&(t.on("disconnect",n),t.on("accountsChanged",i),t.on("chainChanged",s))}watchEIP6963(e){function t(){localStorage.removeItem(In.WALLET_ID),yt.reset(),e.removeListener("disconnect",t),e.removeListener("accountsChanged",n),e.removeListener("chainChanged",i)}function n(s){const a=s==null?void 0:s[0];a?yt.setAddress(Vr(a)):(localStorage.removeItem(In.WALLET_ID),yt.reset())}function i(s){if(s){const a=typeof s=="string"?ka.hexStringToNumber(s):Number(s);yt.setChainId(a)}}e&&(e.on("disconnect",t),e.on("accountsChanged",n),e.on("chainChanged",i))}watchCoinbase(e){const t=e.coinbase,n=localStorage.getItem(In.WALLET_ID);function i(){localStorage.removeItem(In.WALLET_ID),yt.reset(),t==null||t.removeListener("disconnect",i),t==null||t.removeListener("accountsChanged",s),t==null||t.removeListener("chainChanged",a)}function s(o){const l=o==null?void 0:o[0];l?yt.setAddress(Vr(l)):(localStorage.removeItem(In.WALLET_ID),yt.reset())}function a(o){if(o&&n===Zt.COINBASE_CONNECTOR_ID){const l=Number(o);yt.setChainId(l)}}t&&(t.on("disconnect",i),t.on("accountsChanged",s),t.on("chainChanged",a))}watchEmail(){this.emailProvider&&(this.emailProvider.onRpcRequest(e=>{if(_a.checkIfRequestExists(e))_a.checkIfRequestIsAllowed(e)||(super.isOpen()?super.isTransactionStackEmpty()||super.redirect("ApproveTransaction"):super.open({view:"ApproveTransaction"}));else{super.open();const t=_a.getRequestMethod(e);console.error(Ho.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:t}),setTimeout(()=>{this.showErrorMessage(Ho.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300)}}),this.emailProvider.onRpcResponse(e=>{switch(_a.getResponseType(e)){case Mt.RPC_RESPONSE_TYPE_ERROR:{super.isOpen()&&(super.isTransactionStackEmpty()?super.close():super.popTransactionStack(!0));break}case Mt.RPC_RESPONSE_TYPE_TX:{super.isTransactionStackEmpty()?super.close():super.popTransactionStack();break}}}),this.emailProvider.onNotConnected(()=>{this.setIsConnected(!1),super.setLoading(!1)}),this.emailProvider.onIsConnected(({preferredAccountType:e})=>{this.setIsConnected(!0),super.setLoading(!1),yt.setPreferredAccountType(e)}),this.emailProvider.onSetPreferredAccount(({address:e,type:t})=>{var i;if(!e)return;const n=a8.caipNetworkIdToNumber((i=this.getCaipNetwork())==null?void 0:i.id);yt.setAddress(e),yt.setChainId(n),yt.setIsConnected(!0),yt.setPreferredAccountType(t),this.syncAccount()}))}watchModal(){this.emailProvider&&this.subscribeState(e=>{var t;e.open||(t=this.emailProvider)==null||t.rejectRpcRequest()})}async syncAccount(){const e=yt.state.address,t=yt.state.chainId,n=yt.state.isConnected,i=yt.state.preferredAccountType;if(this.resetAccount(),n&&e&&t){const s=`${Zt.EIP155}:${t}:${e}`;this.setIsConnected(n),this.setPreferredAccountType(i),this.setCaipAddress(s),this.syncConnectedWalletInfo(),await Promise.all([this.syncProfile(e),this.syncBalance(e),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())}async syncNetwork(e){const t=yt.state.address,n=yt.state.chainId,i=yt.state.isConnected;if(this.chains){const s=this.chains.find(a=>a.chainId===n);if(s){const a=`${Zt.EIP155}:${s.chainId}`;if(this.setCaipNetwork({id:a,name:s.name,imageId:Eo.EIP155NetworkImageIds[s.chainId],imageUrl:e==null?void 0:e[s.chainId]}),i&&t){const o=`${Zt.EIP155}:${n}:${t}`;if(this.setCaipAddress(o),s.explorerUrl){const l=`${s.explorerUrl}/address/${t}`;this.setAddressExplorerUrl(l)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(await this.syncProfile(t),await this.syncBalance(t))}}else i&&this.setCaipNetwork({id:`${Zt.EIP155}:${n}`})}}async syncProfile(e){const t=yt.state.chainId;try{const{name:n,avatar:i}=await this.fetchIdentity({address:e});this.setProfileName(n),this.setProfileImage(i)}catch{if(t===1){const n=new d1("mainnet"),i=await n.lookupAddress(e),s=await n.getAvatar(e);i&&this.setProfileName(i),s&&this.setProfileImage(s)}else this.setProfileName(null),this.setProfileImage(null)}}async syncBalance(e){const t=yt.state.chainId;if(t&&this.chains){const n=this.chains.find(i=>i.chainId===t);if(n){const i=new mc(n.rpcUrl,{chainId:t,name:n.name});if(i){const s=await i.getBalance(e),a=WM(s);this.setBalance(a,n.currency)}}}}syncConnectedWalletInfo(){var n;const e=window==null?void 0:window.localStorage.getItem(In.WALLET_ID),t=yt.state.providerType;if(t===Zt.EIP6963_CONNECTOR_ID){if(e){const i=this.EIP6963Providers.find(s=>s.info.name===e);i&&this.setConnectedWalletInfo({...i.info})}}else if(t===Zt.WALLET_CONNECT_CONNECTOR_ID){const i=yt.state.provider;i.session&&this.setConnectedWalletInfo({...i.session.peer.metadata,name:i.session.peer.metadata.name,icon:(n=i.session.peer.metadata.icons)==null?void 0:n[0]})}else e&&this.setConnectedWalletInfo({name:e})}async switchNetwork(e){var i,s,a,o,l,u,f,h;const t=yt.state.provider,n=yt.state.providerType;if(this.chains){const m=this.chains.find(b=>b.chainId===e);if(n===Zt.WALLET_CONNECT_CONNECTOR_ID&&m){const b=t;if(b)try{await b.request({method:"wallet_switchEthereumChain",params:[{chainId:ka.numberToHexString(m.chainId)}]}),yt.setChainId(e)}catch(v){if(v.code===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||v.code===In.ERROR_CODE_DEFAULT||((s=(i=v==null?void 0:v.data)==null?void 0:i.originalError)==null?void 0:s.code)===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await ka.addEthereumChain(b,m);else throw new Error("Chain is not supported")}}else if(n===Zt.INJECTED_CONNECTOR_ID&&m){const b=t;if(b)try{await b.request({method:"wallet_switchEthereumChain",params:[{chainId:ka.numberToHexString(m.chainId)}]}),yt.setChainId(m.chainId)}catch(v){if(v.code===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||v.code===In.ERROR_CODE_DEFAULT||((o=(a=v==null?void 0:v.data)==null?void 0:a.originalError)==null?void 0:o.code)===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await ka.addEthereumChain(b,m);else throw new Error("Chain is not supported")}}else if(n===Zt.EIP6963_CONNECTOR_ID&&m){const b=t;if(b)try{await b.request({method:"wallet_switchEthereumChain",params:[{chainId:ka.numberToHexString(m.chainId)}]}),yt.setChainId(m.chainId)}catch(v){if(v.code===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||v.code===In.ERROR_CODE_DEFAULT||((u=(l=v==null?void 0:v.data)==null?void 0:l.originalError)==null?void 0:u.code)===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await ka.addEthereumChain(b,m);else throw new Error("Chain is not supported")}}else if(n===Zt.COINBASE_CONNECTOR_ID&&m){const b=t;if(b)try{await b.request({method:"wallet_switchEthereumChain",params:[{chainId:ka.numberToHexString(m.chainId)}]}),yt.setChainId(m.chainId)}catch(v){(v.code===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||v.code===In.ERROR_CODE_DEFAULT||((h=(f=v==null?void 0:v.data)==null?void 0:f.originalError)==null?void 0:h.code)===In.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)&&await ka.addEthereumChain(b,m)}}else if(n===Zt.EMAIL_CONNECTOR_ID&&this.emailProvider&&m!=null&&m.chainId)try{await this.emailProvider.switchNetwork(m==null?void 0:m.chainId),yt.setChainId(m.chainId);const{address:b,preferredAccountType:v}=await this.emailProvider.connect({chainId:m==null?void 0:m.chainId});yt.setAddress(b),yt.setPreferredAccountType(v),await this.syncAccount()}catch{throw new Error("Switching chain failed")}}}syncConnectors(e){var i,s,a,o,l,u;const t=[],n=Eo.ConnectorTypesMap[Zt.WALLET_CONNECT_CONNECTOR_ID];if(t.push({id:Zt.WALLET_CONNECT_CONNECTOR_ID,explorerId:Eo.ConnectorExplorerIds[Zt.WALLET_CONNECT_CONNECTOR_ID],imageId:Eo.ConnectorImageIds[Zt.WALLET_CONNECT_CONNECTOR_ID],imageUrl:(s=(i=this.options)==null?void 0:i.connectorImages)==null?void 0:s[Zt.WALLET_CONNECT_CONNECTOR_ID],name:Eo.ConnectorNamesMap[Zt.WALLET_CONNECT_CONNECTOR_ID],type:n}),e.injected){const f=Eo.ConnectorTypesMap[Zt.INJECTED_CONNECTOR_ID];t.push({id:Zt.INJECTED_CONNECTOR_ID,explorerId:Eo.ConnectorExplorerIds[Zt.INJECTED_CONNECTOR_ID],imageId:Eo.ConnectorImageIds[Zt.INJECTED_CONNECTOR_ID],imageUrl:(o=(a=this.options)==null?void 0:a.connectorImages)==null?void 0:o[Zt.INJECTED_CONNECTOR_ID],name:Eo.ConnectorNamesMap[Zt.INJECTED_CONNECTOR_ID],type:f})}e.coinbase&&t.push({id:Zt.COINBASE_CONNECTOR_ID,explorerId:Eo.ConnectorExplorerIds[Zt.COINBASE_CONNECTOR_ID],imageId:Eo.ConnectorImageIds[Zt.COINBASE_CONNECTOR_ID],imageUrl:(u=(l=this.options)==null?void 0:l.connectorImages)==null?void 0:u[Zt.COINBASE_CONNECTOR_ID],name:Eo.ConnectorNamesMap[Zt.COINBASE_CONNECTOR_ID],type:"EXTERNAL"}),this.setConnectors(t)}async syncEmailConnector(e){if(typeof window<"u"){this.emailProvider=new pBe(e),this.addConnector({id:Zt.EMAIL_CONNECTOR_ID,type:"EMAIL",name:"Email",provider:this.emailProvider}),super.setLoading(!0);const t=this.emailProvider.getLoginEmailUsed();super.setLoading(t);const{isConnected:n}=await this.emailProvider.isConnected();n?await this.setEmailProvider():super.setLoading(!1)}}eip6963EventHandler(e){var t,n;if(e.detail){const{info:i,provider:s}=e.detail;if(!this.getConnectors().find(l=>l.name===i.name)){const l=Eo.ConnectorTypesMap[Zt.EIP6963_CONNECTOR_ID];{this.addConnector({id:Zt.EIP6963_CONNECTOR_ID,type:l,imageUrl:i.icon??((n=(t=this.options)==null?void 0:t.connectorImages)==null?void 0:n[Zt.EIP6963_CONNECTOR_ID]),name:i.name,provider:s,info:i});const u={provider:s,info:i};this.EIP6963Providers.push(u)}}}}listenConnectors(e){if(typeof window<"u"&&e){const t=this.eip6963EventHandler.bind(this);window.addEventListener(Zt.EIP6963_ANNOUNCE_EVENT,t),window.dispatchEvent(new Event(Zt.EIP6963_REQUEST_EVENT))}}}var Mde={},Sx={},dT={};Object.defineProperty(dT,"__esModule",{value:!0}),dT.walletLogo=void 0;const fJe=(r,e)=>{let t;switch(r){case"standard":return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};dT.walletLogo=fJe;var hT={};Object.defineProperty(hT,"__esModule",{value:!0}),hT.LINK_API_URL=void 0,hT.LINK_API_URL="https://www.walletlink.org";var vr={},WU={exports:{}};WU.exports,function(r){(function(e,t){function n(y,p){if(!y)throw new Error(p||"Assertion failed")}function i(y,p){y.super_=p;var g=function(){};g.prototype=p.prototype,y.prototype=new g,y.prototype.constructor=y}function s(y,p,g){if(s.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((p==="le"||p==="be")&&(g=p,p=10),this._init(y||0,p||10,g||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Cc.Buffer}catch{}s.isBN=function(p){return p instanceof s?!0:p!==null&&typeof p=="object"&&p.constructor.wordSize===s.wordSize&&Array.isArray(p.words)},s.max=function(p,g){return p.cmp(g)>0?p:g},s.min=function(p,g){return p.cmp(g)<0?p:g},s.prototype._init=function(p,g,_){if(typeof p=="number")return this._initNumber(p,g,_);if(typeof p=="object")return this._initArray(p,g,_);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),p=p.toString().replace(/\s+/g,"");var S=0;p[0]==="-"&&(S++,this.negative=1),S=0;S-=3)I=p[S]|p[S-1]<<8|p[S-2]<<16,this.words[T]|=I<>>26-E&67108863,E+=24,E>=26&&(E-=26,T++);else if(_==="le")for(S=0,T=0;S>>26-E&67108863,E+=24,E>=26&&(E-=26,T++);return this._strip()};function o(y,p){var g=y.charCodeAt(p);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;n(!1,"Invalid character in "+y)}function l(y,p,g){var _=o(y,g);return g-1>=p&&(_|=o(y,g-1)<<4),_}s.prototype._parseHex=function(p,g,_){this.length=Math.ceil((p.length-g)/6),this.words=new Array(this.length);for(var S=0;S=g;S-=2)E=l(p,g,S)<=18?(T-=18,I+=1,this.words[I]|=E>>>26):T+=8;else{var M=p.length-g;for(S=M%2===0?g+1:g;S=18?(T-=18,I+=1,this.words[I]|=E>>>26):T+=8}this._strip()};function u(y,p,g,_){for(var S=0,T=0,I=Math.min(y.length,g),E=p;E=49?T=M-49+10:M>=17?T=M-17+10:T=M,n(M>=0&&T<_,"Invalid character"),S+=T}return S}s.prototype._parseBase=function(p,g,_){this.words=[0],this.length=1;for(var S=0,T=1;T<=67108863;T*=g)S++;S--,T=T/g|0;for(var I=p.length-_,E=I%S,M=Math.min(I,I-E)+_,A=0,B=_;B1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?""}var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],b=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(p,g){p=p||10,g=g|0||1;var _;if(p===16||p==="hex"){_="";for(var S=0,T=0,I=0;I>>24-S&16777215,S+=2,S>=26&&(S-=26,I--),T!==0||I!==this.length-1?_=m[6-M.length]+M+_:_=M+_}for(T!==0&&(_=T.toString(16)+_);_.length%g!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(p===(p|0)&&p>=2&&p<=36){var A=b[p],B=v[p];_="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var W=ae.modrn(B).toString(p);ae=ae.idivn(B),ae.isZero()?_=W+_:_=m[A-W.length]+W+_}for(this.isZero()&&(_="0"+_);_.length%g!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var p=this.words[0];return this.length===2?p+=this.words[1]*67108864:this.length===3&&this.words[2]===1?p+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-p:p},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(p,g){return this.toArrayLike(a,p,g)}),s.prototype.toArray=function(p,g){return this.toArrayLike(Array,p,g)};var C=function(p,g){return p.allocUnsafe?p.allocUnsafe(g):new p(g)};s.prototype.toArrayLike=function(p,g,_){this._strip();var S=this.byteLength(),T=_||Math.max(1,S);n(S<=T,"byte array longer than desired length"),n(T>0,"Requested array length <= 0");var I=C(p,T),E=g==="le"?"LE":"BE";return this["_toArrayLike"+E](I,S),I},s.prototype._toArrayLikeLE=function(p,g){for(var _=0,S=0,T=0,I=0;T>8&255),_>16&255),I===6?(_>24&255),S=0,I=0):(S=E>>>24,I+=2)}if(_=0&&(p[_--]=E>>8&255),_>=0&&(p[_--]=E>>16&255),I===6?(_>=0&&(p[_--]=E>>24&255),S=0,I=0):(S=E>>>24,I+=2)}if(_>=0)for(p[_--]=S;_>=0;)p[_--]=0},Math.clz32?s.prototype._countBits=function(p){return 32-Math.clz32(p)}:s.prototype._countBits=function(p){var g=p,_=0;return g>=4096&&(_+=13,g>>>=13),g>=64&&(_+=7,g>>>=7),g>=8&&(_+=4,g>>>=4),g>=2&&(_+=2,g>>>=2),_+g},s.prototype._zeroBits=function(p){if(p===0)return 26;var g=p,_=0;return g&8191||(_+=13,g>>>=13),g&127||(_+=7,g>>>=7),g&15||(_+=4,g>>>=4),g&3||(_+=2,g>>>=2),g&1||_++,_},s.prototype.bitLength=function(){var p=this.words[this.length-1],g=this._countBits(p);return(this.length-1)*26+g};function R(y){for(var p=new Array(y.bitLength()),g=0;g>>S&1}return p}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var p=0,g=0;gp.length?this.clone().ior(p):p.clone().ior(this)},s.prototype.uor=function(p){return this.length>p.length?this.clone().iuor(p):p.clone().iuor(this)},s.prototype.iuand=function(p){var g;this.length>p.length?g=p:g=this;for(var _=0;_p.length?this.clone().iand(p):p.clone().iand(this)},s.prototype.uand=function(p){return this.length>p.length?this.clone().iuand(p):p.clone().iuand(this)},s.prototype.iuxor=function(p){var g,_;this.length>p.length?(g=this,_=p):(g=p,_=this);for(var S=0;S<_.length;S++)this.words[S]=g.words[S]^_.words[S];if(this!==g)for(;Sp.length?this.clone().ixor(p):p.clone().ixor(this)},s.prototype.uxor=function(p){return this.length>p.length?this.clone().iuxor(p):p.clone().iuxor(this)},s.prototype.inotn=function(p){n(typeof p=="number"&&p>=0);var g=Math.ceil(p/26)|0,_=p%26;this._expand(g),_>0&&g--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-_),this._strip()},s.prototype.notn=function(p){return this.clone().inotn(p)},s.prototype.setn=function(p,g){n(typeof p=="number"&&p>=0);var _=p/26|0,S=p%26;return this._expand(_+1),g?this.words[_]=this.words[_]|1<p.length?(_=this,S=p):(_=p,S=this);for(var T=0,I=0;I>>26;for(;T!==0&&I<_.length;I++)g=(_.words[I]|0)+T,this.words[I]=g&67108863,T=g>>>26;if(this.length=_.length,T!==0)this.words[this.length]=T,this.length++;else if(_!==this)for(;I<_.length;I++)this.words[I]=_.words[I];return this},s.prototype.add=function(p){var g;return p.negative!==0&&this.negative===0?(p.negative=0,g=this.sub(p),p.negative^=1,g):p.negative===0&&this.negative!==0?(this.negative=0,g=p.sub(this),this.negative=1,g):this.length>p.length?this.clone().iadd(p):p.clone().iadd(this)},s.prototype.isub=function(p){if(p.negative!==0){p.negative=0;var g=this.iadd(p);return p.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(p),this.negative=1,this._normSign();var _=this.cmp(p);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,T;_>0?(S=this,T=p):(S=p,T=this);for(var I=0,E=0;E>26,this.words[E]=g&67108863;for(;I!==0&&E>26,this.words[E]=g&67108863;if(I===0&&E>>26,ae=M&67108863,W=Math.min(A,p.length-1),Z=Math.max(0,A-y.length+1);Z<=W;Z++){var K=A-Z|0;S=y.words[K]|0,T=p.words[Z]|0,I=S*T+ae,B+=I/67108864|0,ae=I&67108863}g.words[A]=ae|0,M=B|0}return M!==0?g.words[A]=M|0:g.length--,g._strip()}var P=function(p,g,_){var S=p.words,T=g.words,I=_.words,E=0,M,A,B,ae=S[0]|0,W=ae&8191,Z=ae>>>13,K=S[1]|0,ee=K&8191,re=K>>>13,H=S[2]|0,F=H&8191,q=H>>>13,fe=S[3]|0,pe=fe&8191,Ee=fe>>>13,Me=S[4]|0,Oe=Me&8191,je=Me>>>13,Re=S[5]|0,Qe=Re&8191,Ne=Re>>>13,Je=S[6]|0,Xe=Je&8191,Le=Je>>>13,Ge=S[7]|0,et=Ge&8191,Be=Ge>>>13,Ke=S[8]|0,pt=Ke&8191,ne=Ke>>>13,Y=S[9]|0,X=Y&8191,ue=Y>>>13,we=T[0]|0,Ce=we&8191,Te=we>>>13,lt=T[1]|0,Ct=lt&8191,We=lt>>>13,At=T[2]|0,xt=At&8191,dt=At>>>13,Lt=T[3]|0,Ot=Lt&8191,st=Lt>>>13,Ut=T[4]|0,Nt=Ut&8191,tt=Ut>>>13,qt=T[5]|0,Wt=qt&8191,rt=qt>>>13,Vt=T[6]|0,Dt=Vt&8191,at=Vt>>>13,Ft=T[7]|0,Rt=Ft&8191,ot=Ft>>>13,Gt=T[8]|0,wr=Gt&8191,wt=Gt>>>13,yr=T[9]|0,Xt=yr&8191,hr=yr>>>13;_.negative=p.negative^g.negative,_.length=19,M=Math.imul(W,Ce),A=Math.imul(W,Te),A=A+Math.imul(Z,Ce)|0,B=Math.imul(Z,Te);var ri=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ri>>>26)|0,ri&=67108863,M=Math.imul(ee,Ce),A=Math.imul(ee,Te),A=A+Math.imul(re,Ce)|0,B=Math.imul(re,Te),M=M+Math.imul(W,Ct)|0,A=A+Math.imul(W,We)|0,A=A+Math.imul(Z,Ct)|0,B=B+Math.imul(Z,We)|0;var ni=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ni>>>26)|0,ni&=67108863,M=Math.imul(F,Ce),A=Math.imul(F,Te),A=A+Math.imul(q,Ce)|0,B=Math.imul(q,Te),M=M+Math.imul(ee,Ct)|0,A=A+Math.imul(ee,We)|0,A=A+Math.imul(re,Ct)|0,B=B+Math.imul(re,We)|0,M=M+Math.imul(W,xt)|0,A=A+Math.imul(W,dt)|0,A=A+Math.imul(Z,xt)|0,B=B+Math.imul(Z,dt)|0;var ii=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ii>>>26)|0,ii&=67108863,M=Math.imul(pe,Ce),A=Math.imul(pe,Te),A=A+Math.imul(Ee,Ce)|0,B=Math.imul(Ee,Te),M=M+Math.imul(F,Ct)|0,A=A+Math.imul(F,We)|0,A=A+Math.imul(q,Ct)|0,B=B+Math.imul(q,We)|0,M=M+Math.imul(ee,xt)|0,A=A+Math.imul(ee,dt)|0,A=A+Math.imul(re,xt)|0,B=B+Math.imul(re,dt)|0,M=M+Math.imul(W,Ot)|0,A=A+Math.imul(W,st)|0,A=A+Math.imul(Z,Ot)|0,B=B+Math.imul(Z,st)|0;var si=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(si>>>26)|0,si&=67108863,M=Math.imul(Oe,Ce),A=Math.imul(Oe,Te),A=A+Math.imul(je,Ce)|0,B=Math.imul(je,Te),M=M+Math.imul(pe,Ct)|0,A=A+Math.imul(pe,We)|0,A=A+Math.imul(Ee,Ct)|0,B=B+Math.imul(Ee,We)|0,M=M+Math.imul(F,xt)|0,A=A+Math.imul(F,dt)|0,A=A+Math.imul(q,xt)|0,B=B+Math.imul(q,dt)|0,M=M+Math.imul(ee,Ot)|0,A=A+Math.imul(ee,st)|0,A=A+Math.imul(re,Ot)|0,B=B+Math.imul(re,st)|0,M=M+Math.imul(W,Nt)|0,A=A+Math.imul(W,tt)|0,A=A+Math.imul(Z,Nt)|0,B=B+Math.imul(Z,tt)|0;var wn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(wn>>>26)|0,wn&=67108863,M=Math.imul(Qe,Ce),A=Math.imul(Qe,Te),A=A+Math.imul(Ne,Ce)|0,B=Math.imul(Ne,Te),M=M+Math.imul(Oe,Ct)|0,A=A+Math.imul(Oe,We)|0,A=A+Math.imul(je,Ct)|0,B=B+Math.imul(je,We)|0,M=M+Math.imul(pe,xt)|0,A=A+Math.imul(pe,dt)|0,A=A+Math.imul(Ee,xt)|0,B=B+Math.imul(Ee,dt)|0,M=M+Math.imul(F,Ot)|0,A=A+Math.imul(F,st)|0,A=A+Math.imul(q,Ot)|0,B=B+Math.imul(q,st)|0,M=M+Math.imul(ee,Nt)|0,A=A+Math.imul(ee,tt)|0,A=A+Math.imul(re,Nt)|0,B=B+Math.imul(re,tt)|0,M=M+Math.imul(W,Wt)|0,A=A+Math.imul(W,rt)|0,A=A+Math.imul(Z,Wt)|0,B=B+Math.imul(Z,rt)|0;var Wn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,M=Math.imul(Xe,Ce),A=Math.imul(Xe,Te),A=A+Math.imul(Le,Ce)|0,B=Math.imul(Le,Te),M=M+Math.imul(Qe,Ct)|0,A=A+Math.imul(Qe,We)|0,A=A+Math.imul(Ne,Ct)|0,B=B+Math.imul(Ne,We)|0,M=M+Math.imul(Oe,xt)|0,A=A+Math.imul(Oe,dt)|0,A=A+Math.imul(je,xt)|0,B=B+Math.imul(je,dt)|0,M=M+Math.imul(pe,Ot)|0,A=A+Math.imul(pe,st)|0,A=A+Math.imul(Ee,Ot)|0,B=B+Math.imul(Ee,st)|0,M=M+Math.imul(F,Nt)|0,A=A+Math.imul(F,tt)|0,A=A+Math.imul(q,Nt)|0,B=B+Math.imul(q,tt)|0,M=M+Math.imul(ee,Wt)|0,A=A+Math.imul(ee,rt)|0,A=A+Math.imul(re,Wt)|0,B=B+Math.imul(re,rt)|0,M=M+Math.imul(W,Dt)|0,A=A+Math.imul(W,at)|0,A=A+Math.imul(Z,Dt)|0,B=B+Math.imul(Z,at)|0;var ji=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(ji>>>26)|0,ji&=67108863,M=Math.imul(et,Ce),A=Math.imul(et,Te),A=A+Math.imul(Be,Ce)|0,B=Math.imul(Be,Te),M=M+Math.imul(Xe,Ct)|0,A=A+Math.imul(Xe,We)|0,A=A+Math.imul(Le,Ct)|0,B=B+Math.imul(Le,We)|0,M=M+Math.imul(Qe,xt)|0,A=A+Math.imul(Qe,dt)|0,A=A+Math.imul(Ne,xt)|0,B=B+Math.imul(Ne,dt)|0,M=M+Math.imul(Oe,Ot)|0,A=A+Math.imul(Oe,st)|0,A=A+Math.imul(je,Ot)|0,B=B+Math.imul(je,st)|0,M=M+Math.imul(pe,Nt)|0,A=A+Math.imul(pe,tt)|0,A=A+Math.imul(Ee,Nt)|0,B=B+Math.imul(Ee,tt)|0,M=M+Math.imul(F,Wt)|0,A=A+Math.imul(F,rt)|0,A=A+Math.imul(q,Wt)|0,B=B+Math.imul(q,rt)|0,M=M+Math.imul(ee,Dt)|0,A=A+Math.imul(ee,at)|0,A=A+Math.imul(re,Dt)|0,B=B+Math.imul(re,at)|0,M=M+Math.imul(W,Rt)|0,A=A+Math.imul(W,ot)|0,A=A+Math.imul(Z,Rt)|0,B=B+Math.imul(Z,ot)|0;var Vn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,M=Math.imul(pt,Ce),A=Math.imul(pt,Te),A=A+Math.imul(ne,Ce)|0,B=Math.imul(ne,Te),M=M+Math.imul(et,Ct)|0,A=A+Math.imul(et,We)|0,A=A+Math.imul(Be,Ct)|0,B=B+Math.imul(Be,We)|0,M=M+Math.imul(Xe,xt)|0,A=A+Math.imul(Xe,dt)|0,A=A+Math.imul(Le,xt)|0,B=B+Math.imul(Le,dt)|0,M=M+Math.imul(Qe,Ot)|0,A=A+Math.imul(Qe,st)|0,A=A+Math.imul(Ne,Ot)|0,B=B+Math.imul(Ne,st)|0,M=M+Math.imul(Oe,Nt)|0,A=A+Math.imul(Oe,tt)|0,A=A+Math.imul(je,Nt)|0,B=B+Math.imul(je,tt)|0,M=M+Math.imul(pe,Wt)|0,A=A+Math.imul(pe,rt)|0,A=A+Math.imul(Ee,Wt)|0,B=B+Math.imul(Ee,rt)|0,M=M+Math.imul(F,Dt)|0,A=A+Math.imul(F,at)|0,A=A+Math.imul(q,Dt)|0,B=B+Math.imul(q,at)|0,M=M+Math.imul(ee,Rt)|0,A=A+Math.imul(ee,ot)|0,A=A+Math.imul(re,Rt)|0,B=B+Math.imul(re,ot)|0,M=M+Math.imul(W,wr)|0,A=A+Math.imul(W,wt)|0,A=A+Math.imul(Z,wr)|0,B=B+Math.imul(Z,wt)|0;var zi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(zi>>>26)|0,zi&=67108863,M=Math.imul(X,Ce),A=Math.imul(X,Te),A=A+Math.imul(ue,Ce)|0,B=Math.imul(ue,Te),M=M+Math.imul(pt,Ct)|0,A=A+Math.imul(pt,We)|0,A=A+Math.imul(ne,Ct)|0,B=B+Math.imul(ne,We)|0,M=M+Math.imul(et,xt)|0,A=A+Math.imul(et,dt)|0,A=A+Math.imul(Be,xt)|0,B=B+Math.imul(Be,dt)|0,M=M+Math.imul(Xe,Ot)|0,A=A+Math.imul(Xe,st)|0,A=A+Math.imul(Le,Ot)|0,B=B+Math.imul(Le,st)|0,M=M+Math.imul(Qe,Nt)|0,A=A+Math.imul(Qe,tt)|0,A=A+Math.imul(Ne,Nt)|0,B=B+Math.imul(Ne,tt)|0,M=M+Math.imul(Oe,Wt)|0,A=A+Math.imul(Oe,rt)|0,A=A+Math.imul(je,Wt)|0,B=B+Math.imul(je,rt)|0,M=M+Math.imul(pe,Dt)|0,A=A+Math.imul(pe,at)|0,A=A+Math.imul(Ee,Dt)|0,B=B+Math.imul(Ee,at)|0,M=M+Math.imul(F,Rt)|0,A=A+Math.imul(F,ot)|0,A=A+Math.imul(q,Rt)|0,B=B+Math.imul(q,ot)|0,M=M+Math.imul(ee,wr)|0,A=A+Math.imul(ee,wt)|0,A=A+Math.imul(re,wr)|0,B=B+Math.imul(re,wt)|0,M=M+Math.imul(W,Xt)|0,A=A+Math.imul(W,hr)|0,A=A+Math.imul(Z,Xt)|0,B=B+Math.imul(Z,hr)|0;var Hi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,M=Math.imul(X,Ct),A=Math.imul(X,We),A=A+Math.imul(ue,Ct)|0,B=Math.imul(ue,We),M=M+Math.imul(pt,xt)|0,A=A+Math.imul(pt,dt)|0,A=A+Math.imul(ne,xt)|0,B=B+Math.imul(ne,dt)|0,M=M+Math.imul(et,Ot)|0,A=A+Math.imul(et,st)|0,A=A+Math.imul(Be,Ot)|0,B=B+Math.imul(Be,st)|0,M=M+Math.imul(Xe,Nt)|0,A=A+Math.imul(Xe,tt)|0,A=A+Math.imul(Le,Nt)|0,B=B+Math.imul(Le,tt)|0,M=M+Math.imul(Qe,Wt)|0,A=A+Math.imul(Qe,rt)|0,A=A+Math.imul(Ne,Wt)|0,B=B+Math.imul(Ne,rt)|0,M=M+Math.imul(Oe,Dt)|0,A=A+Math.imul(Oe,at)|0,A=A+Math.imul(je,Dt)|0,B=B+Math.imul(je,at)|0,M=M+Math.imul(pe,Rt)|0,A=A+Math.imul(pe,ot)|0,A=A+Math.imul(Ee,Rt)|0,B=B+Math.imul(Ee,ot)|0,M=M+Math.imul(F,wr)|0,A=A+Math.imul(F,wt)|0,A=A+Math.imul(q,wr)|0,B=B+Math.imul(q,wt)|0,M=M+Math.imul(ee,Xt)|0,A=A+Math.imul(ee,hr)|0,A=A+Math.imul(re,Xt)|0,B=B+Math.imul(re,hr)|0;var xi=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(xi>>>26)|0,xi&=67108863,M=Math.imul(X,xt),A=Math.imul(X,dt),A=A+Math.imul(ue,xt)|0,B=Math.imul(ue,dt),M=M+Math.imul(pt,Ot)|0,A=A+Math.imul(pt,st)|0,A=A+Math.imul(ne,Ot)|0,B=B+Math.imul(ne,st)|0,M=M+Math.imul(et,Nt)|0,A=A+Math.imul(et,tt)|0,A=A+Math.imul(Be,Nt)|0,B=B+Math.imul(Be,tt)|0,M=M+Math.imul(Xe,Wt)|0,A=A+Math.imul(Xe,rt)|0,A=A+Math.imul(Le,Wt)|0,B=B+Math.imul(Le,rt)|0,M=M+Math.imul(Qe,Dt)|0,A=A+Math.imul(Qe,at)|0,A=A+Math.imul(Ne,Dt)|0,B=B+Math.imul(Ne,at)|0,M=M+Math.imul(Oe,Rt)|0,A=A+Math.imul(Oe,ot)|0,A=A+Math.imul(je,Rt)|0,B=B+Math.imul(je,ot)|0,M=M+Math.imul(pe,wr)|0,A=A+Math.imul(pe,wt)|0,A=A+Math.imul(Ee,wr)|0,B=B+Math.imul(Ee,wt)|0,M=M+Math.imul(F,Xt)|0,A=A+Math.imul(F,hr)|0,A=A+Math.imul(q,Xt)|0,B=B+Math.imul(q,hr)|0;var Si=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Si>>>26)|0,Si&=67108863,M=Math.imul(X,Ot),A=Math.imul(X,st),A=A+Math.imul(ue,Ot)|0,B=Math.imul(ue,st),M=M+Math.imul(pt,Nt)|0,A=A+Math.imul(pt,tt)|0,A=A+Math.imul(ne,Nt)|0,B=B+Math.imul(ne,tt)|0,M=M+Math.imul(et,Wt)|0,A=A+Math.imul(et,rt)|0,A=A+Math.imul(Be,Wt)|0,B=B+Math.imul(Be,rt)|0,M=M+Math.imul(Xe,Dt)|0,A=A+Math.imul(Xe,at)|0,A=A+Math.imul(Le,Dt)|0,B=B+Math.imul(Le,at)|0,M=M+Math.imul(Qe,Rt)|0,A=A+Math.imul(Qe,ot)|0,A=A+Math.imul(Ne,Rt)|0,B=B+Math.imul(Ne,ot)|0,M=M+Math.imul(Oe,wr)|0,A=A+Math.imul(Oe,wt)|0,A=A+Math.imul(je,wr)|0,B=B+Math.imul(je,wt)|0,M=M+Math.imul(pe,Xt)|0,A=A+Math.imul(pe,hr)|0,A=A+Math.imul(Ee,Xt)|0,B=B+Math.imul(Ee,hr)|0;var Ii=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,M=Math.imul(X,Nt),A=Math.imul(X,tt),A=A+Math.imul(ue,Nt)|0,B=Math.imul(ue,tt),M=M+Math.imul(pt,Wt)|0,A=A+Math.imul(pt,rt)|0,A=A+Math.imul(ne,Wt)|0,B=B+Math.imul(ne,rt)|0,M=M+Math.imul(et,Dt)|0,A=A+Math.imul(et,at)|0,A=A+Math.imul(Be,Dt)|0,B=B+Math.imul(Be,at)|0,M=M+Math.imul(Xe,Rt)|0,A=A+Math.imul(Xe,ot)|0,A=A+Math.imul(Le,Rt)|0,B=B+Math.imul(Le,ot)|0,M=M+Math.imul(Qe,wr)|0,A=A+Math.imul(Qe,wt)|0,A=A+Math.imul(Ne,wr)|0,B=B+Math.imul(Ne,wt)|0,M=M+Math.imul(Oe,Xt)|0,A=A+Math.imul(Oe,hr)|0,A=A+Math.imul(je,Xt)|0,B=B+Math.imul(je,hr)|0;var kn=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(kn>>>26)|0,kn&=67108863,M=Math.imul(X,Wt),A=Math.imul(X,rt),A=A+Math.imul(ue,Wt)|0,B=Math.imul(ue,rt),M=M+Math.imul(pt,Dt)|0,A=A+Math.imul(pt,at)|0,A=A+Math.imul(ne,Dt)|0,B=B+Math.imul(ne,at)|0,M=M+Math.imul(et,Rt)|0,A=A+Math.imul(et,ot)|0,A=A+Math.imul(Be,Rt)|0,B=B+Math.imul(Be,ot)|0,M=M+Math.imul(Xe,wr)|0,A=A+Math.imul(Xe,wt)|0,A=A+Math.imul(Le,wr)|0,B=B+Math.imul(Le,wt)|0,M=M+Math.imul(Qe,Xt)|0,A=A+Math.imul(Qe,hr)|0,A=A+Math.imul(Ne,Xt)|0,B=B+Math.imul(Ne,hr)|0;var Ds=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,M=Math.imul(X,Dt),A=Math.imul(X,at),A=A+Math.imul(ue,Dt)|0,B=Math.imul(ue,at),M=M+Math.imul(pt,Rt)|0,A=A+Math.imul(pt,ot)|0,A=A+Math.imul(ne,Rt)|0,B=B+Math.imul(ne,ot)|0,M=M+Math.imul(et,wr)|0,A=A+Math.imul(et,wt)|0,A=A+Math.imul(Be,wr)|0,B=B+Math.imul(Be,wt)|0,M=M+Math.imul(Xe,Xt)|0,A=A+Math.imul(Xe,hr)|0,A=A+Math.imul(Le,Xt)|0,B=B+Math.imul(Le,hr)|0;var $s=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+($s>>>26)|0,$s&=67108863,M=Math.imul(X,Rt),A=Math.imul(X,ot),A=A+Math.imul(ue,Rt)|0,B=Math.imul(ue,ot),M=M+Math.imul(pt,wr)|0,A=A+Math.imul(pt,wt)|0,A=A+Math.imul(ne,wr)|0,B=B+Math.imul(ne,wt)|0,M=M+Math.imul(et,Xt)|0,A=A+Math.imul(et,hr)|0,A=A+Math.imul(Be,Xt)|0,B=B+Math.imul(Be,hr)|0;var Bs=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,M=Math.imul(X,wr),A=Math.imul(X,wt),A=A+Math.imul(ue,wr)|0,B=Math.imul(ue,wt),M=M+Math.imul(pt,Xt)|0,A=A+Math.imul(pt,hr)|0,A=A+Math.imul(ne,Xt)|0,B=B+Math.imul(ne,hr)|0;var xl=(E+M|0)+((A&8191)<<13)|0;E=(B+(A>>>13)|0)+(xl>>>26)|0,xl&=67108863,M=Math.imul(X,Xt),A=Math.imul(X,hr),A=A+Math.imul(ue,Xt)|0,B=Math.imul(ue,hr);var tc=(E+M|0)+((A&8191)<<13)|0;return E=(B+(A>>>13)|0)+(tc>>>26)|0,tc&=67108863,I[0]=ri,I[1]=ni,I[2]=ii,I[3]=si,I[4]=wn,I[5]=Wn,I[6]=ji,I[7]=Vn,I[8]=zi,I[9]=Hi,I[10]=xi,I[11]=Si,I[12]=Ii,I[13]=kn,I[14]=Ds,I[15]=$s,I[16]=Bs,I[17]=xl,I[18]=tc,E!==0&&(I[19]=E,_.length++),_};Math.imul||(P=k);function N(y,p,g){g.negative=p.negative^y.negative,g.length=y.length+p.length;for(var _=0,S=0,T=0;T>>26)|0,S+=I>>>26,I&=67108863}g.words[T]=E,_=I,I=S}return _!==0?g.words[T]=_:g.length--,g._strip()}function $(y,p,g){return N(y,p,g)}s.prototype.mulTo=function(p,g){var _,S=this.length+p.length;return this.length===10&&p.length===10?_=P(this,p,g):S<63?_=k(this,p,g):S<1024?_=N(this,p,g):_=$(this,p,g),_},s.prototype.mul=function(p){var g=new s(null);return g.words=new Array(this.length+p.length),this.mulTo(p,g)},s.prototype.mulf=function(p){var g=new s(null);return g.words=new Array(this.length+p.length),$(this,p,g)},s.prototype.imul=function(p){return this.clone().mulTo(p,this)},s.prototype.imuln=function(p){var g=p<0;g&&(p=-p),n(typeof p=="number"),n(p<67108864);for(var _=0,S=0;S>=26,_+=T/67108864|0,_+=I>>>26,this.words[S]=I&67108863}return _!==0&&(this.words[S]=_,this.length++),g?this.ineg():this},s.prototype.muln=function(p){return this.clone().imuln(p)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(p){var g=R(p);if(g.length===0)return new s(1);for(var _=this,S=0;S=0);var g=p%26,_=(p-g)/26,S=67108863>>>26-g<<26-g,T;if(g!==0){var I=0;for(T=0;T>>26-g}I&&(this.words[T]=I,this.length++)}if(_!==0){for(T=this.length-1;T>=0;T--)this.words[T+_]=this.words[T];for(T=0;T<_;T++)this.words[T]=0;this.length+=_}return this._strip()},s.prototype.ishln=function(p){return n(this.negative===0),this.iushln(p)},s.prototype.iushrn=function(p,g,_){n(typeof p=="number"&&p>=0);var S;g?S=(g-g%26)/26:S=0;var T=p%26,I=Math.min((p-T)/26,this.length),E=67108863^67108863>>>T<I)for(this.length-=I,A=0;A=0&&(B!==0||A>=S);A--){var ae=this.words[A]|0;this.words[A]=B<<26-T|ae>>>T,B=ae&E}return M&&B!==0&&(M.words[M.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(p,g,_){return n(this.negative===0),this.iushrn(p,g,_)},s.prototype.shln=function(p){return this.clone().ishln(p)},s.prototype.ushln=function(p){return this.clone().iushln(p)},s.prototype.shrn=function(p){return this.clone().ishrn(p)},s.prototype.ushrn=function(p){return this.clone().iushrn(p)},s.prototype.testn=function(p){n(typeof p=="number"&&p>=0);var g=p%26,_=(p-g)/26,S=1<=0);var g=p%26,_=(p-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(g!==0&&_++,this.length=Math.min(_,this.length),g!==0){var S=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},s.prototype.isubn=function(p){if(n(typeof p=="number"),n(p<67108864),p<0)return this.iaddn(-p);if(this.negative!==0)return this.negative=0,this.iaddn(p),this.negative=1,this;if(this.words[0]-=p,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(M/67108864|0),this.words[T+_]=I&67108863}for(;T>26,this.words[T+_]=I&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,T=0;T>26,this.words[T]=I&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(p,g){var _=this.length-p.length,S=this.clone(),T=p,I=T.words[T.length-1]|0,E=this._countBits(I);_=26-E,_!==0&&(T=T.ushln(_),S.iushln(_),I=T.words[T.length-1]|0);var M=S.length-T.length,A;if(g!=="mod"){A=new s(null),A.length=M+1,A.words=new Array(A.length);for(var B=0;B=0;W--){var Z=(S.words[T.length+W]|0)*67108864+(S.words[T.length+W-1]|0);for(Z=Math.min(Z/I|0,67108863),S._ishlnsubmul(T,Z,W);S.negative!==0;)Z--,S.negative=0,S._ishlnsubmul(T,1,W),S.isZero()||(S.negative^=1);A&&(A.words[W]=Z)}return A&&A._strip(),S._strip(),g!=="div"&&_!==0&&S.iushrn(_),{div:A||null,mod:S}},s.prototype.divmod=function(p,g,_){if(n(!p.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var S,T,I;return this.negative!==0&&p.negative===0?(I=this.neg().divmod(p,g),g!=="mod"&&(S=I.div.neg()),g!=="div"&&(T=I.mod.neg(),_&&T.negative!==0&&T.iadd(p)),{div:S,mod:T}):this.negative===0&&p.negative!==0?(I=this.divmod(p.neg(),g),g!=="mod"&&(S=I.div.neg()),{div:S,mod:I.mod}):this.negative&p.negative?(I=this.neg().divmod(p.neg(),g),g!=="div"&&(T=I.mod.neg(),_&&T.negative!==0&&T.isub(p)),{div:I.div,mod:T}):p.length>this.length||this.cmp(p)<0?{div:new s(0),mod:this}:p.length===1?g==="div"?{div:this.divn(p.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(p.words[0]))}:{div:this.divn(p.words[0]),mod:new s(this.modrn(p.words[0]))}:this._wordDiv(p,g)},s.prototype.div=function(p){return this.divmod(p,"div",!1).div},s.prototype.mod=function(p){return this.divmod(p,"mod",!1).mod},s.prototype.umod=function(p){return this.divmod(p,"mod",!0).mod},s.prototype.divRound=function(p){var g=this.divmod(p);if(g.mod.isZero())return g.div;var _=g.div.negative!==0?g.mod.isub(p):g.mod,S=p.ushrn(1),T=p.andln(1),I=_.cmp(S);return I<0||T===1&&I===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},s.prototype.modrn=function(p){var g=p<0;g&&(p=-p),n(p<=67108863);for(var _=(1<<26)%p,S=0,T=this.length-1;T>=0;T--)S=(_*S+(this.words[T]|0))%p;return g?-S:S},s.prototype.modn=function(p){return this.modrn(p)},s.prototype.idivn=function(p){var g=p<0;g&&(p=-p),n(p<=67108863);for(var _=0,S=this.length-1;S>=0;S--){var T=(this.words[S]|0)+_*67108864;this.words[S]=T/p|0,_=T%p}return this._strip(),g?this.ineg():this},s.prototype.divn=function(p){return this.clone().idivn(p)},s.prototype.egcd=function(p){n(p.negative===0),n(!p.isZero());var g=this,_=p.clone();g.negative!==0?g=g.umod(p):g=g.clone();for(var S=new s(1),T=new s(0),I=new s(0),E=new s(1),M=0;g.isEven()&&_.isEven();)g.iushrn(1),_.iushrn(1),++M;for(var A=_.clone(),B=g.clone();!g.isZero();){for(var ae=0,W=1;!(g.words[0]&W)&&ae<26;++ae,W<<=1);if(ae>0)for(g.iushrn(ae);ae-- >0;)(S.isOdd()||T.isOdd())&&(S.iadd(A),T.isub(B)),S.iushrn(1),T.iushrn(1);for(var Z=0,K=1;!(_.words[0]&K)&&Z<26;++Z,K<<=1);if(Z>0)for(_.iushrn(Z);Z-- >0;)(I.isOdd()||E.isOdd())&&(I.iadd(A),E.isub(B)),I.iushrn(1),E.iushrn(1);g.cmp(_)>=0?(g.isub(_),S.isub(I),T.isub(E)):(_.isub(g),I.isub(S),E.isub(T))}return{a:I,b:E,gcd:_.iushln(M)}},s.prototype._invmp=function(p){n(p.negative===0),n(!p.isZero());var g=this,_=p.clone();g.negative!==0?g=g.umod(p):g=g.clone();for(var S=new s(1),T=new s(0),I=_.clone();g.cmpn(1)>0&&_.cmpn(1)>0;){for(var E=0,M=1;!(g.words[0]&M)&&E<26;++E,M<<=1);if(E>0)for(g.iushrn(E);E-- >0;)S.isOdd()&&S.iadd(I),S.iushrn(1);for(var A=0,B=1;!(_.words[0]&B)&&A<26;++A,B<<=1);if(A>0)for(_.iushrn(A);A-- >0;)T.isOdd()&&T.iadd(I),T.iushrn(1);g.cmp(_)>=0?(g.isub(_),S.isub(T)):(_.isub(g),T.isub(S))}var ae;return g.cmpn(1)===0?ae=S:ae=T,ae.cmpn(0)<0&&ae.iadd(p),ae},s.prototype.gcd=function(p){if(this.isZero())return p.abs();if(p.isZero())return this.abs();var g=this.clone(),_=p.clone();g.negative=0,_.negative=0;for(var S=0;g.isEven()&&_.isEven();S++)g.iushrn(1),_.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;_.isEven();)_.iushrn(1);var T=g.cmp(_);if(T<0){var I=g;g=_,_=I}else if(T===0||_.cmpn(1)===0)break;g.isub(_)}while(!0);return _.iushln(S)},s.prototype.invm=function(p){return this.egcd(p).a.umod(p)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(p){return this.words[0]&p},s.prototype.bincn=function(p){n(typeof p=="number");var g=p%26,_=(p-g)/26,S=1<>>26,E&=67108863,this.words[I]=E}return T!==0&&(this.words[I]=T,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(p){var g=p<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var _;if(this.length>1)_=1;else{g&&(p=-p),n(p<=67108863,"Number is too big");var S=this.words[0]|0;_=S===p?0:Sp.length)return 1;if(this.length=0;_--){var S=this.words[_]|0,T=p.words[_]|0;if(S!==T){ST&&(g=1);break}}return g},s.prototype.gtn=function(p){return this.cmpn(p)===1},s.prototype.gt=function(p){return this.cmp(p)===1},s.prototype.gten=function(p){return this.cmpn(p)>=0},s.prototype.gte=function(p){return this.cmp(p)>=0},s.prototype.ltn=function(p){return this.cmpn(p)===-1},s.prototype.lt=function(p){return this.cmp(p)===-1},s.prototype.lten=function(p){return this.cmpn(p)<=0},s.prototype.lte=function(p){return this.cmp(p)<=0},s.prototype.eqn=function(p){return this.cmpn(p)===0},s.prototype.eq=function(p){return this.cmp(p)===0},s.red=function(p){return new D(p)},s.prototype.toRed=function(p){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),p.convertTo(this)._forceRed(p)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(p){return this.red=p,this},s.prototype.forceRed=function(p){return n(!this.red,"Already a number in reduction context"),this._forceRed(p)},s.prototype.redAdd=function(p){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,p)},s.prototype.redIAdd=function(p){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,p)},s.prototype.redSub=function(p){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,p)},s.prototype.redISub=function(p){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,p)},s.prototype.redShl=function(p){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,p)},s.prototype.redMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.mul(this,p)},s.prototype.redIMul=function(p){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,p),this.red.imul(this,p)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(p){return n(this.red&&!p.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,p)};var j={k256:null,p224:null,p192:null,p25519:null};function G(y,p){this.name=y,this.p=new s(p,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G.prototype._tmp=function(){var p=new s(null);return p.words=new Array(Math.ceil(this.n/13)),p},G.prototype.ireduce=function(p){var g=p,_;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),_=g.bitLength();while(_>this.n);var S=_0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},G.prototype.split=function(p,g){p.iushrn(this.n,0,g)},G.prototype.imulK=function(p){return p.imul(this.k)};function U(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(U,G),U.prototype.split=function(p,g){for(var _=4194303,S=Math.min(p.length,9),T=0;T>>22,I=E}I>>>=22,p.words[T-10]=I,I===0&&p.length>10?p.length-=10:p.length-=9},U.prototype.imulK=function(p){p.words[p.length]=0,p.words[p.length+1]=0,p.length+=2;for(var g=0,_=0;_>>=26,p.words[_]=T,g=S}return g!==0&&(p.words[p.length++]=g),p},s._prime=function(p){if(j[p])return j[p];var g;if(p==="k256")g=new U;else if(p==="p224")g=new L;else if(p==="p192")g=new V;else if(p==="p25519")g=new te;else throw new Error("Unknown prime "+p);return j[p]=g,g};function D(y){if(typeof y=="string"){var p=s._prime(y);this.m=p.p,this.prime=p}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(p){n(p.negative===0,"red works only with positives"),n(p.red,"red works only with red numbers")},D.prototype._verify2=function(p,g){n((p.negative|g.negative)===0,"red works only with positives"),n(p.red&&p.red===g.red,"red works only with red numbers")},D.prototype.imod=function(p){return this.prime?this.prime.ireduce(p)._forceRed(this):(f(p,p.umod(this.m)._forceRed(this)),p)},D.prototype.neg=function(p){return p.isZero()?p.clone():this.m.sub(p)._forceRed(this)},D.prototype.add=function(p,g){this._verify2(p,g);var _=p.add(g);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},D.prototype.iadd=function(p,g){this._verify2(p,g);var _=p.iadd(g);return _.cmp(this.m)>=0&&_.isub(this.m),_},D.prototype.sub=function(p,g){this._verify2(p,g);var _=p.sub(g);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},D.prototype.isub=function(p,g){this._verify2(p,g);var _=p.isub(g);return _.cmpn(0)<0&&_.iadd(this.m),_},D.prototype.shl=function(p,g){return this._verify1(p),this.imod(p.ushln(g))},D.prototype.imul=function(p,g){return this._verify2(p,g),this.imod(p.imul(g))},D.prototype.mul=function(p,g){return this._verify2(p,g),this.imod(p.mul(g))},D.prototype.isqr=function(p){return this.imul(p,p.clone())},D.prototype.sqr=function(p){return this.mul(p,p)},D.prototype.sqrt=function(p){if(p.isZero())return p.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var _=this.m.add(new s(1)).iushrn(2);return this.pow(p,_)}for(var S=this.m.subn(1),T=0;!S.isZero()&&S.andln(1)===0;)T++,S.iushrn(1);n(!S.isZero());var I=new s(1).toRed(this),E=I.redNeg(),M=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,M).cmp(E)!==0;)A.redIAdd(E);for(var B=this.pow(A,S),ae=this.pow(p,S.addn(1).iushrn(1)),W=this.pow(p,S),Z=T;W.cmp(I)!==0;){for(var K=W,ee=0;K.cmp(I)!==0;ee++)K=K.redSqr();n(ee=0;T--){for(var B=g.words[T],ae=A-1;ae>=0;ae--){var W=B>>ae&1;if(I!==S[0]&&(I=this.sqr(I)),W===0&&E===0){M=0;continue}E<<=1,E|=W,M++,!(M!==_&&(T!==0||ae!==0))&&(I=this.mul(I,S[E]),M=0,E=0)}A=26}return I},D.prototype.convertTo=function(p){var g=p.umod(this.m);return g===p?g.clone():g},D.prototype.convertFrom=function(p){var g=p.clone();return g.red=null,g},s.mont=function(p){return new x(p)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(p){return this.imod(p.ushln(this.shift))},x.prototype.convertFrom=function(p){var g=this.imod(p.mul(this.rinv));return g.red=null,g},x.prototype.imul=function(p,g){if(p.isZero()||g.isZero())return p.words[0]=0,p.length=1,p;var _=p.imul(g),S=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=_.isub(S).iushrn(this.shift),I=T;return T.cmp(this.m)>=0?I=T.isub(this.m):T.cmpn(0)<0&&(I=T.iadd(this.m)),I._forceRed(this)},x.prototype.mul=function(p,g){if(p.isZero()||g.isZero())return new s(0)._forceRed(this);var _=p.mul(g),S=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=_.isub(S).iushrn(this.shift),I=T;return T.cmp(this.m)>=0?I=T.isub(this.m):T.cmpn(0)<0&&(I=T.iadd(this.m)),I._forceRed(this)},x.prototype.invm=function(p){var g=this.imod(p._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(r,ut)}(WU);var Ix=WU.exports;const Kr=Vu(Ix);var Tx={},R0={};Object.defineProperty(R0,"__esModule",{value:!0}),R0.errorValues=R0.standardErrorCodes=void 0,R0.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},R0.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var pT={},mT={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.serialize=r.getErrorCode=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=R0,t="Unspecified error message.";r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(m,b=t){if(m&&Number.isInteger(m)){const v=m.toString();if(f(e.errorValues,v))return e.errorValues[v].message;if(l(m))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return b}r.getMessageFromCode=n;function i(m){if(!Number.isInteger(m))return!1;const b=m.toString();return!!(e.errorValues[b]||l(m))}r.isValidCode=i;function s(m){var b;if(typeof m=="number")return m;if(a(m))return(b=m.code)!==null&&b!==void 0?b:m.errorCode}r.getErrorCode=s;function a(m){return typeof m=="object"&&m!==null&&(typeof m.code=="number"||typeof m.errorCode=="number")}function o(m,{shouldIncludeStack:b=!1}={}){const v={};if(m&&typeof m=="object"&&!Array.isArray(m)&&f(m,"code")&&i(m.code)){const C=m;v.code=C.code,C.message&&typeof C.message=="string"?(v.message=C.message,f(C,"data")&&(v.data=C.data)):(v.message=n(v.code),v.data={originalError:u(m)})}else v.code=e.standardErrorCodes.rpc.internal,v.message=h(m,"message")?m.message:t,v.data={originalError:u(m)};return b&&(v.stack=h(m,"stack")?m.stack:void 0),v}r.serialize=o;function l(m){return m>=-32099&&m<=-32e3}function u(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function f(m,b){return Object.prototype.hasOwnProperty.call(m,b)}function h(m,b){return typeof m=="object"&&m!==null&&b in m&&typeof m[b]=="string"}})(mT),Object.defineProperty(pT,"__esModule",{value:!0}),pT.standardErrors=void 0;const Xa=R0,Pde=mT;pT.standardErrors={rpc:{parse:r=>du(Xa.standardErrorCodes.rpc.parse,r),invalidRequest:r=>du(Xa.standardErrorCodes.rpc.invalidRequest,r),invalidParams:r=>du(Xa.standardErrorCodes.rpc.invalidParams,r),methodNotFound:r=>du(Xa.standardErrorCodes.rpc.methodNotFound,r),internal:r=>du(Xa.standardErrorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return du(e,r)},invalidInput:r=>du(Xa.standardErrorCodes.rpc.invalidInput,r),resourceNotFound:r=>du(Xa.standardErrorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>du(Xa.standardErrorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>du(Xa.standardErrorCodes.rpc.transactionRejected,r),methodNotSupported:r=>du(Xa.standardErrorCodes.rpc.methodNotSupported,r),limitExceeded:r=>du(Xa.standardErrorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>wy(Xa.standardErrorCodes.provider.userRejectedRequest,r),unauthorized:r=>wy(Xa.standardErrorCodes.provider.unauthorized,r),unsupportedMethod:r=>wy(Xa.standardErrorCodes.provider.unsupportedMethod,r),disconnected:r=>wy(Xa.standardErrorCodes.provider.disconnected,r),chainDisconnected:r=>wy(Xa.standardErrorCodes.provider.chainDisconnected,r),unsupportedChain:r=>wy(Xa.standardErrorCodes.provider.unsupportedChain,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new Dde(e,t,n)}}};function du(r,e){const[t,n]=Ode(e);return new Nde(r,t||(0,Pde.getMessageFromCode)(r),n)}function wy(r,e){const[t,n]=Ode(e);return new Dde(r,t||(0,Pde.getMessageFromCode)(r),n)}function Ode(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}let Nde=class extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,n!==void 0&&(this.data=n)}},Dde=class extends Nde{constructor(e,t,n){if(!dJe(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}};function dJe(r){return Number.isInteger(r)&&r>=1e3&&r<=4999}var gT={},yy={};Object.defineProperty(yy,"__esModule",{value:!0}),yy.isErrorResponse=void 0;function hJe(r){return r.errorMessage!==void 0}yy.isErrorResponse=hJe;var xy={};Object.defineProperty(xy,"__esModule",{value:!0}),xy.LIB_VERSION=void 0,xy.LIB_VERSION="3.9.1",Object.defineProperty(gT,"__esModule",{value:!0}),gT.serializeError=void 0;const pJe=yy,mJe=xy,gJe=R0,bJe=mT;function vJe(r,e){const t=(0,bJe.serialize)(wJe(r),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",mJe.LIB_VERSION),n.searchParams.set("code",t.code.toString());const i=yJe(t.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}gT.serializeError=vJe;function wJe(r){return typeof r=="string"?{message:r,code:gJe.standardErrorCodes.rpc.internal}:(0,pJe.isErrorResponse)(r)?Object.assign(Object.assign({},r),{message:r.errorMessage,code:r.errorCode,data:{method:r.method}}):r}function yJe(r,e){const t=r==null?void 0:r.method;if(t)return t;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.standardErrors=r.standardErrorCodes=r.serializeError=r.getMessageFromCode=r.getErrorCode=void 0;const e=R0;Object.defineProperty(r,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});const t=pT;Object.defineProperty(r,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}});const n=gT;Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=mT;Object.defineProperty(r,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(Tx);var ra={};Object.defineProperty(ra,"__esModule",{value:!0}),ra.ProviderType=ra.RegExpString=ra.IntNumber=ra.BigIntString=ra.AddressString=ra.HexString=ra.OpaqueType=void 0;function kx(){return r=>r}ra.OpaqueType=kx,ra.HexString=kx(),ra.AddressString=kx(),ra.BigIntString=kx();function xJe(r){return Math.floor(r)}ra.IntNumber=xJe,ra.RegExpString=kx();var $de;(function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""})($de||(ra.ProviderType=$de={}));var _Je=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vr,"__esModule",{value:!0}),vr.isMobileWeb=vr.getLocation=vr.isInIFrame=vr.createQrUrl=vr.getFavicon=vr.range=vr.isBigNumber=vr.ensureParsedJSONObject=vr.ensureBN=vr.ensureRegExpString=vr.ensureIntNumber=vr.ensureBuffer=vr.ensureAddressString=vr.ensureEvenLengthHexString=vr.ensureHexString=vr.isHexString=vr.prepend0x=vr.strip0x=vr.has0xPrefix=vr.hexStringFromIntNumber=vr.intNumberFromHexString=vr.bigIntStringFromBN=vr.hexStringFromBuffer=vr.hexStringToUint8Array=vr.uint8ArrayToHex=vr.randomBytesHex=void 0;const X1=_Je(Ix),Tb=Tx,hu=ra,Bde=/^[0-9]*$/,Lde=/^[a-f0-9]*$/;function EJe(r){return Ude(crypto.getRandomValues(new Uint8Array(r)))}vr.randomBytesHex=EJe;function Ude(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")}vr.uint8ArrayToHex=Ude;function CJe(r){return new Uint8Array(r.match(/.{1,2}/g).map(e=>parseInt(e,16)))}vr.hexStringToUint8Array=CJe;function AJe(r,e=!1){const t=r.toString("hex");return(0,hu.HexString)(e?`0x${t}`:t)}vr.hexStringFromBuffer=AJe;function SJe(r){return(0,hu.BigIntString)(r.toString(10))}vr.bigIntStringFromBN=SJe;function IJe(r){return(0,hu.IntNumber)(new X1.default(Mx(r,!1),16).toNumber())}vr.intNumberFromHexString=IJe;function TJe(r){return(0,hu.HexString)(`0x${new X1.default(r).toString(16)}`)}vr.hexStringFromIntNumber=TJe;function VU(r){return r.startsWith("0x")||r.startsWith("0X")}vr.has0xPrefix=VU;function bT(r){return VU(r)?r.slice(2):r}vr.strip0x=bT;function Fde(r){return VU(r)?`0x${r.slice(2)}`:`0x${r}`}vr.prepend0x=Fde;function Rx(r){if(typeof r!="string")return!1;const e=bT(r).toLowerCase();return Lde.test(e)}vr.isHexString=Rx;function jde(r,e=!1){if(typeof r=="string"){const t=bT(r).toLowerCase();if(Lde.test(t))return(0,hu.HexString)(e?`0x${t}`:t)}throw Tb.standardErrors.rpc.invalidParams(`"${String(r)}" is not a hexadecimal string`)}vr.ensureHexString=jde;function Mx(r,e=!1){let t=jde(r,!1);return t.length%2===1&&(t=(0,hu.HexString)(`0${t}`)),e?(0,hu.HexString)(`0x${t}`):t}vr.ensureEvenLengthHexString=Mx;function kJe(r){if(typeof r=="string"){const e=bT(r).toLowerCase();if(Rx(e)&&e.length===40)return(0,hu.AddressString)(Fde(e))}throw Tb.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(r)}`)}vr.ensureAddressString=kJe;function RJe(r){if(It.isBuffer(r))return r;if(typeof r=="string"){if(Rx(r)){const e=Mx(r,!1);return It.from(e,"hex")}return It.from(r,"utf8")}throw Tb.standardErrors.rpc.invalidParams(`Not binary data: ${String(r)}`)}vr.ensureBuffer=RJe;function zde(r){if(typeof r=="number"&&Number.isInteger(r))return(0,hu.IntNumber)(r);if(typeof r=="string"){if(Bde.test(r))return(0,hu.IntNumber)(Number(r));if(Rx(r))return(0,hu.IntNumber)(new X1.default(Mx(r,!1),16).toNumber())}throw Tb.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}vr.ensureIntNumber=zde;function MJe(r){if(r instanceof RegExp)return(0,hu.RegExpString)(r.toString());throw Tb.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(r)}`)}vr.ensureRegExpString=MJe;function PJe(r){if(r!==null&&(X1.default.isBN(r)||Hde(r)))return new X1.default(r.toString(10),10);if(typeof r=="number")return new X1.default(zde(r));if(typeof r=="string"){if(Bde.test(r))return new X1.default(r,10);if(Rx(r))return new X1.default(Mx(r,!1),16)}throw Tb.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}vr.ensureBN=PJe;function OJe(r){if(typeof r=="string")return JSON.parse(r);if(typeof r=="object")return r;throw Tb.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(r)}`)}vr.ensureParsedJSONObject=OJe;function Hde(r){if(r==null||typeof r.constructor!="function")return!1;const{constructor:e}=r;return typeof e.config=="function"&&typeof e.EUCLID=="number"}vr.isBigNumber=Hde;function NJe(r,e){return Array.from({length:e-r},(t,n)=>r+n)}vr.range=NJe;function DJe(){const r=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:t}=document.location,n=r?r.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${t}${n}`}vr.getFavicon=DJe;function $Je(r,e,t,n,i,s){const a=n?"parent-id":"id",o=new URLSearchParams({[a]:r,secret:e,server:t,v:i,chainId:s.toString()}).toString();return`${t}/#/link?${o}`}vr.createQrUrl=$Je;function qde(){try{return window.frameElement!==null}catch{return!1}}vr.isInIFrame=qde;function BJe(){try{return qde()&&window.top?window.top.location:window.location}catch{return window.location}}vr.getLocation=BJe;function LJe(){var r;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((r=window==null?void 0:window.navigator)===null||r===void 0?void 0:r.userAgent)}vr.isMobileWeb=LJe;var vT={};Object.defineProperty(vT,"__esModule",{value:!0}),vT.ScopedLocalStorage=void 0;class UJe{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}vT.ScopedLocalStorage=UJe;var _y={},Px={},Ox={},Ey={};Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.EVENTS=void 0,Ey.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var pu={};Object.defineProperty(pu,"__esModule",{value:!0}),pu.RelayAbstract=pu.APP_VERSION_KEY=pu.LOCAL_STORAGE_ADDRESSES_KEY=pu.WALLET_USER_NAME_KEY=void 0;const Wde=Tx;pu.WALLET_USER_NAME_KEY="walletUsername",pu.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",pu.APP_VERSION_KEY="AppVersion";class FJe{async makeEthereumJSONRPCRequest(e,t){if(!t)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(t,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw Wde.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,Wde.serializeError)(s,e.method);return i})}}pu.RelayAbstract=FJe;var Cy={},Vde={exports:{}},GU={exports:{}};typeof Object.create=="function"?GU.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:GU.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Vo=GU.exports,KU={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(r,e){var t=Cc,n=t.Buffer;function i(a,o){for(var l in a)o[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(a,o,l){return n(a,o,l)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(a,o,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,o,l)},s.alloc=function(a,o,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return o!==void 0?typeof l=="string"?u.fill(o,l):u.fill(o):u.fill(0),u},s.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},s.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(a)}})(KU,KU.exports);var kb=KU.exports,Gde=kb.Buffer;function wT(r,e){this._block=Gde.alloc(r),this._finalSize=e,this._blockSize=r,this._len=0}wT.prototype.update=function(r,e){typeof r=="string"&&(e=e||"utf8",r=Gde.from(r,e));for(var t=this._block,n=this._blockSize,i=r.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=this._len*8;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(t&4294967295)>>>0,i=(t-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return r?s.toString(r):s},wT.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ay=wT,jJe=Vo,Kde=Ay,zJe=kb.Buffer,HJe=[1518500249,1859775393,-1894007588,-899497514],qJe=new Array(80);function Nx(){this.init(),this._w=qJe,Kde.call(this,64,56)}jJe(Nx,Kde),Nx.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function WJe(r){return r<<5|r>>>27}function VJe(r){return r<<30|r>>>2}function GJe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}Nx.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,o=0;o<16;++o)e[o]=r.readInt32BE(o*4);for(;o<80;++o)e[o]=e[o-3]^e[o-8]^e[o-14]^e[o-16];for(var l=0;l<80;++l){var u=~~(l/20),f=WJe(t)+GJe(u,n,i,s)+a+e[l]+HJe[u]|0;a=s,s=i,i=VJe(n),n=t,t=f}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Nx.prototype._hash=function(){var r=zJe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var KJe=Nx,ZJe=Vo,Zde=Ay,JJe=kb.Buffer,YJe=[1518500249,1859775393,-1894007588,-899497514],QJe=new Array(80);function Dx(){this.init(),this._w=QJe,Zde.call(this,64,56)}ZJe(Dx,Zde),Dx.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function XJe(r){return r<<1|r>>>31}function eYe(r){return r<<5|r>>>27}function tYe(r){return r<<30|r>>>2}function rYe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}Dx.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,o=0;o<16;++o)e[o]=r.readInt32BE(o*4);for(;o<80;++o)e[o]=XJe(e[o-3]^e[o-8]^e[o-14]^e[o-16]);for(var l=0;l<80;++l){var u=~~(l/20),f=eYe(t)+rYe(u,n,i,s)+a+e[l]+YJe[u]|0;a=s,s=i,i=tYe(n),n=t,t=f}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Dx.prototype._hash=function(){var r=JJe.allocUnsafe(20);return r.writeInt32BE(this._a|0,0),r.writeInt32BE(this._b|0,4),r.writeInt32BE(this._c|0,8),r.writeInt32BE(this._d|0,12),r.writeInt32BE(this._e|0,16),r};var nYe=Dx,iYe=Vo,Jde=Ay,sYe=kb.Buffer,aYe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],oYe=new Array(64);function $x(){this.init(),this._w=oYe,Jde.call(this,64,56)}iYe($x,Jde),$x.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function cYe(r,e,t){return t^r&(e^t)}function lYe(r,e,t){return r&e|t&(r|e)}function uYe(r){return(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10)}function fYe(r){return(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7)}function dYe(r){return(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3}function hYe(r){return(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10}$x.prototype._update=function(r){for(var e=this._w,t=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,o=this._f|0,l=this._g|0,u=this._h|0,f=0;f<16;++f)e[f]=r.readInt32BE(f*4);for(;f<64;++f)e[f]=hYe(e[f-2])+e[f-7]+dYe(e[f-15])+e[f-16]|0;for(var h=0;h<64;++h){var m=u+fYe(a)+cYe(a,o,l)+aYe[h]+e[h]|0,b=uYe(t)+lYe(t,n,i)|0;u=l,l=o,o=a,a=s+m|0,s=i,i=n,n=t,t=m+b|0}this._a=t+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=o+this._f|0,this._g=l+this._g|0,this._h=u+this._h|0},$x.prototype._hash=function(){var r=sYe.allocUnsafe(32);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r.writeInt32BE(this._h,28),r};var Yde=$x,pYe=Vo,mYe=Yde,gYe=Ay,bYe=kb.Buffer,vYe=new Array(64);function yT(){this.init(),this._w=vYe,gYe.call(this,64,56)}pYe(yT,mYe),yT.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},yT.prototype._hash=function(){var r=bYe.allocUnsafe(28);return r.writeInt32BE(this._a,0),r.writeInt32BE(this._b,4),r.writeInt32BE(this._c,8),r.writeInt32BE(this._d,12),r.writeInt32BE(this._e,16),r.writeInt32BE(this._f,20),r.writeInt32BE(this._g,24),r};var wYe=yT,yYe=Vo,Qde=Ay,xYe=kb.Buffer,Xde=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_Ye=new Array(160);function Bx(){this.init(),this._w=_Ye,Qde.call(this,128,112)}yYe(Bx,Qde),Bx.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function ehe(r,e,t){return t^r&(e^t)}function the(r,e,t){return r&e|t&(r|e)}function rhe(r,e){return(r>>>28|e<<4)^(e>>>2|r<<30)^(e>>>7|r<<25)}function nhe(r,e){return(r>>>14|e<<18)^(r>>>18|e<<14)^(e>>>9|r<<23)}function EYe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^r>>>7}function CYe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^(r>>>7|e<<25)}function AYe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^r>>>6}function SYe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^(r>>>6|e<<26)}function Ma(r,e){return r>>>0>>0?1:0}Bx.prototype._update=function(r){for(var e=this._w,t=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,a=this._eh|0,o=this._fh|0,l=this._gh|0,u=this._hh|0,f=this._al|0,h=this._bl|0,m=this._cl|0,b=this._dl|0,v=this._el|0,C=this._fl|0,R=this._gl|0,k=this._hl|0,P=0;P<32;P+=2)e[P]=r.readInt32BE(P*4),e[P+1]=r.readInt32BE(P*4+4);for(;P<160;P+=2){var N=e[P-30],$=e[P-15*2+1],j=EYe(N,$),G=CYe($,N);N=e[P-2*2],$=e[P-2*2+1];var U=AYe(N,$),L=SYe($,N),V=e[P-7*2],te=e[P-7*2+1],D=e[P-16*2],x=e[P-16*2+1],y=G+te|0,p=j+V+Ma(y,G)|0;y=y+L|0,p=p+U+Ma(y,L)|0,y=y+x|0,p=p+D+Ma(y,x)|0,e[P]=p,e[P+1]=y}for(var g=0;g<160;g+=2){p=e[g],y=e[g+1];var _=the(t,n,i),S=the(f,h,m),T=rhe(t,f),I=rhe(f,t),E=nhe(a,v),M=nhe(v,a),A=Xde[g],B=Xde[g+1],ae=ehe(a,o,l),W=ehe(v,C,R),Z=k+M|0,K=u+E+Ma(Z,k)|0;Z=Z+W|0,K=K+ae+Ma(Z,W)|0,Z=Z+B|0,K=K+A+Ma(Z,B)|0,Z=Z+y|0,K=K+p+Ma(Z,y)|0;var ee=I+S|0,re=T+_+Ma(ee,I)|0;u=l,k=R,l=o,R=C,o=a,C=v,v=b+Z|0,a=s+K+Ma(v,b)|0,s=i,b=m,i=n,m=h,n=t,h=f,f=Z+ee|0,t=K+re+Ma(f,Z)|0}this._al=this._al+f|0,this._bl=this._bl+h|0,this._cl=this._cl+m|0,this._dl=this._dl+b|0,this._el=this._el+v|0,this._fl=this._fl+C|0,this._gl=this._gl+R|0,this._hl=this._hl+k|0,this._ah=this._ah+t+Ma(this._al,f)|0,this._bh=this._bh+n+Ma(this._bl,h)|0,this._ch=this._ch+i+Ma(this._cl,m)|0,this._dh=this._dh+s+Ma(this._dl,b)|0,this._eh=this._eh+a+Ma(this._el,v)|0,this._fh=this._fh+o+Ma(this._fl,C)|0,this._gh=this._gh+l+Ma(this._gl,R)|0,this._hh=this._hh+u+Ma(this._hl,k)|0},Bx.prototype._hash=function(){var r=xYe.allocUnsafe(64);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),r};var ihe=Bx,IYe=Vo,TYe=ihe,kYe=Ay,RYe=kb.Buffer,MYe=new Array(160);function xT(){this.init(),this._w=MYe,kYe.call(this,128,112)}IYe(xT,TYe),xT.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},xT.prototype._hash=function(){var r=RYe.allocUnsafe(48);function e(t,n,i){r.writeInt32BE(t,i),r.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),r};var PYe=xT,Rb=Vde.exports=function(e){e=e.toLowerCase();var t=Rb[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Rb.sha=KJe,Rb.sha1=nYe,Rb.sha224=wYe,Rb.sha256=Yde,Rb.sha384=PYe,Rb.sha512=ihe;var OYe=Vde.exports;Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.Session=void 0;const she=OYe,ahe=vr,ohe="session:id",che="session:secret",lhe="session:linked";class ZU{constructor(e,t,n,i){this._storage=e,this._id=t||(0,ahe.randomBytesHex)(16),this._secret=n||(0,ahe.randomBytesHex)(32),this._key=new she.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(ohe),n=e.getItem(lhe),i=e.getItem(che);return t&&i?new ZU(e,t,i,n==="1"):null}static hash(e){return new she.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(ohe,this._id),this._storage.setItem(che,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(lhe,this._linked?"1":"0")}}Cy.Session=ZU;var _T={},ET={};Object.defineProperty(ET,"__esModule",{value:!0}),ET.Cipher=void 0;const CT=vr;class NYe{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,CT.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),o=16,l=a.slice(a.byteLength-o),u=a.slice(0,a.byteLength-o),f=new Uint8Array(l),h=new Uint8Array(u),m=new Uint8Array([...n,...f,...h]);return(0,CT.uint8ArrayToHex)(m)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,CT.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=(0,CT.hexStringToUint8Array)(e),o=a.slice(0,12),l=a.slice(12,28),u=a.slice(28),f=new Uint8Array([...u,...l]),h={name:"AES-GCM",iv:new Uint8Array(o)};try{const m=await window.crypto.subtle.decrypt(h,s,f),b=new TextDecoder;n(b.decode(m))}catch(m){i(m)}})()})}}ET.Cipher=NYe;var AT={};Object.defineProperty(AT,"__esModule",{value:!0}),AT.WalletLinkHTTP=void 0;class DYe{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const i=`${t}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(e=n==null?void 0:n.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${t.status}`)}}AT.WalletLinkHTTP=DYe;var Sy={};Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.WalletLinkWebSocket=Sy.ConnectionState=void 0;var Iy;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(Iy||(Sy.ConnectionState=Iy={}));class $Ye{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){t(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Iy.CONNECTING),i.onclose=s=>{var a;this.clearWebSocket(),t(new Error(`websocket error ${s.code}: ${s.reason}`)),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Iy.DISCONNECTED)},i.onopen=s=>{var a;e(),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Iy.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},i.onmessage=s=>{var a,o;if(s.data==="h")(a=this.incomingDataListener)===null||a===void 0||a.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(s.data);(o=this.incomingDataListener)===null||o===void 0||o.call(this,l)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Iy.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}Sy.WalletLinkWebSocket=$Ye,Object.defineProperty(_T,"__esModule",{value:!0}),_T.WalletLinkConnection=void 0;const Ty=ra,BYe=ET,Ud=Ey,uhe=pu,ky=Cy,LYe=AT,ST=Sy,fhe=1e4,UYe=6e4;class FYe{constructor({session:e,linkAPIUrl:t,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Ty.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=o=>{if(!o)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",u=>o.JsonRpcUrl&&this.handleChainUpdated(u,o.JsonRpcUrl)]]).forEach((u,f)=>{const h=o[f];h!==void 0&&u(h)})},this.handleDestroyed=o=>{var l,u;o==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(u=this.diagnostic)===null||u===void 0||u.log(Ud.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:ky.Session.hash(this.session.id)}))},this.handleAccountUpdated=async o=>{var l,u;try{const f=await this.cipher.decrypt(o);(l=this.listener)===null||l===void 0||l.accountUpdated(f)}catch{(u=this.diagnostic)===null||u===void 0||u.log(Ud.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(o,l)=>{var u,f;try{const h=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.metadataUpdated(o,h)}catch{(f=this.diagnostic)===null||f===void 0||f.log(Ud.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:o})}},this.handleWalletUsernameUpdated=async o=>{this.handleMetadataUpdated(uhe.WALLET_USER_NAME_KEY,o)},this.handleAppVersionUpdated=async o=>{this.handleMetadataUpdated(uhe.APP_VERSION_KEY,o)},this.handleChainUpdated=async(o,l)=>{var u,f;try{const h=await this.cipher.decrypt(o),m=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.chainUpdated(h,m)}catch{(f=this.diagnostic)===null||f===void 0||f.log(Ud.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=e,this.cipher=new BYe.Cipher(e.secret),this.diagnostic=i,this.listener=n;const a=new ST.WalletLinkWebSocket(`${t}/rpc`,s);a.setConnectionStateListener(async o=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(Ud.EVENTS.CONNECTED_STATE_CHANGE,{state:o,sessionIdHash:ky.Session.hash(e.id)});let u=!1;switch(o){case ST.ConnectionState.DISCONNECTED:if(!this.destroyed){const f=async()=>{await new Promise(h=>setTimeout(h,5e3)),this.destroyed||a.connect().catch(()=>{f()})};f()}break;case ST.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),u=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},fhe),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case ST.ConnectionState.CONNECTING:break}this.connected!==u&&(this.connected=u)}),a.setIncomingDataListener(o=>{var l,u,f;switch(o.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const h=o.type==="IsLinkedOK"?o.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(Ud.EVENTS.LINKED,{sessionIdHash:ky.Session.hash(e.id),linked:h,type:o.type,onlineGuests:o.onlineGuests}),this.linked=h||o.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(u=this.diagnostic)===null||u===void 0||u.log(Ud.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:ky.Session.hash(e.id),metadata_keys:o&&o.metadata?Object.keys(o.metadata):void 0}),this.handleSessionMetadataUpdated(o.metadata);break}case"Event":{this.handleIncomingEvent(o);break}}o.id!==void 0&&((f=this.requestResolutions.get(o.id))===null||f===void 0||f(o))}),this.ws=a,this.http=new LYe.WalletLinkHTTP(t,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(Ud.EVENTS.STARTED_CONNECTING,{sessionIdHash:ky.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(Ud.EVENTS.DISCONNECTED,{sessionIdHash:ky.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t,n;this._connected=e,e&&((t=this.onceConnected)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t,n;if(!(e.type!=="Event"||e.event!=="Web3Response"))try{const i=await this.cipher.decrypt(e.data),s=JSON.parse(i);if(s.type!=="WEB3_RESPONSE")return;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Ud.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,t,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const a=await this.makeRequest(s);if(a.type==="Fail")throw new Error(a.error||"failed to publish event");return a.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>fhe*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=UYe){const n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,a)=>{i=window.setTimeout(()=>{a(new Error(`request ${n} timed out`))},t)}),new Promise(s=>{this.requestResolutions.set(n,a=>{clearTimeout(i),s(a),this.requestResolutions.delete(n)})})])}async authenticate(){const e={type:"HostSession",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if(t.type==="Fail")throw new Error(t.error||"failed to authentcate")}sendIsLinked(){const e={type:"IsLinked",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,Ty.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}_T.WalletLinkConnection=FYe;var Lx={},Ux={},JU={};Object.defineProperty(JU,"__esModule",{value:!0}),JU.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var jYe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ux,"__esModule",{value:!0}),Ux.injectCssReset=void 0;const zYe=jYe(JU);function HYe(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(zYe.default)),document.documentElement.appendChild(r)}Ux.injectCssReset=HYe;var IT={},Fx,Di,dhe,hhe,Mb,phe,mhe,YU,QU,XU,eF,ghe,jx={},bhe=[],qYe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,TT=Array.isArray;function M0(r,e){for(var t in e)r[t]=e[t];return r}function vhe(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function tF(r,e,t){var n,i,s,a={};for(s in e)s=="key"?n=e[s]:s=="ref"?i=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?Fx.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)a[s]===void 0&&(a[s]=r.defaultProps[s]);return zx(r,a,n,i,null)}function zx(r,e,t,n,i){var s={type:r,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++dhe,__i:-1,__u:0};return i==null&&Di.vnode!=null&&Di.vnode(s),s}function WYe(){return{current:null}}function Ry(r){return r.children}function Hx(r,e){this.props=r,this.context=e}function My(r,e){if(e==null)return r.__?My(r.__,r.__i+1):null;for(var t;ee&&Mb.sort(YU));kT.__r=0}function yhe(r,e,t,n,i,s,a,o,l,u,f){var h,m,b,v,C,R=n&&n.__k||bhe,k=e.length;for(t.__d=l,VYe(t,e,R),l=t.__d,h=0;h0?zx(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=r,i.__b=r.__b+1,s=null,(o=i.__i=GYe(i,t,a,f))!==-1&&(f--,(s=t[o])&&(s.__u|=131072)),s==null||s.__v===null?(o==-1&&h--,typeof i.type!="function"&&(i.__u|=65536)):o!==a&&(o==a-1?h--:o==a+1?h++:(o>a?h--:h++,i.__u|=65536))):i=r.__k[n]=null;if(f)for(n=0;n(l!=null&&!(131072&l.__u)?1:0))for(;a>=0||o=0){if((l=e[a])&&!(131072&l.__u)&&i==l.key&&s===l.type)return a;a--}if(o2&&(o.children=arguments.length>3?Fx.call(arguments,2):t),zx(r.type,o,n||r.key,i||r.ref,null)}function YYe(r,e){var t={__c:e="__cC"+ghe++,__:r,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.forEach(function(o){o.__e=!0,rF(o)})},this.sub=function(a){i.add(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){i&&i.delete(a),o&&o.call(a)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}Fx=bhe.slice,Di={__e:function(r,e,t,n){for(var i,s,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(r)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(r,n||{}),a=i.__d),a)return i.__E=i}catch(o){r=o}throw r}},dhe=0,hhe=function(r){return r!=null&&r.constructor==null},Hx.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=M0({},this.state),typeof r=="function"&&(r=r(M0({},t),this.props)),r&&M0(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),rF(this))},Hx.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),rF(this))},Hx.prototype.render=Ry,Mb=[],mhe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,YU=function(r,e){return r.__v.__b-e.__v.__b},kT.__r=0,QU=0,XU=Che(!1),eF=Che(!0),ghe=0;const Rc=Mh(Object.freeze(Object.defineProperty({__proto__:null,Component:Hx,Fragment:Ry,cloneElement:JYe,createContext:YYe,createElement:tF,createRef:WYe,h:tF,hydrate:The,get isValidElement(){return hhe},get options(){return Di},render:Ihe,toChildArray:_he},Symbol.toStringTag,{value:"Module"})));var MT={};function khe(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e=t.__.length&&t.__.push({}),t.__[r]}function Uhe(r){return Py=1,Fhe(Hhe,r)}function Fhe(r,e,t){var n=Pb(P0++,2);if(n.t=r,!n.__c&&(n.__=[t?t(e):Hhe(void 0,e),function(o){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,o);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=Ai,!Ai.u)){var i=function(o,l,u){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(m){return!!m.__c});if(f.every(function(m){return!m.__N}))return!s||s.call(this,o,l,u);var h=n.__c.props!==o;return f.forEach(function(m){if(m.__N){var b=m.__[0];m.__=m.__N,m.__N=void 0,b!==m.__[0]&&(h=!0)}}),s&&s.call(this,o,l,u)||h};Ai.u=!0;var s=Ai.shouldComponentUpdate,a=Ai.componentWillUpdate;Ai.componentWillUpdate=function(o,l,u){if(this.__e){var f=s;s=void 0,i(o,l,u),s=f}a&&a.call(this,o,l,u)},Ai.shouldComponentUpdate=i}return n.__N||n.__}function QYe(r,e){var t=Pb(P0++,3);!ss.__s&&cF(t.__H,e)&&(t.__=r,t.i=e,Ai.__H.__h.push(t))}function jhe(r,e){var t=Pb(P0++,4);!ss.__s&&cF(t.__H,e)&&(t.__=r,t.i=e,Ai.__h.push(t))}function XYe(r){return Py=5,aF(function(){return{current:r}},[])}function eQe(r,e,t){Py=6,jhe(function(){return typeof r=="function"?(r(e()),function(){return r(null)}):r?(r.current=e(),function(){return r.current=null}):void 0},t==null?t:t.concat(r))}function aF(r,e){var t=Pb(P0++,7);return cF(t.__H,e)&&(t.__=r(),t.__H=e,t.__h=r),t.__}function tQe(r,e){return Py=8,aF(function(){return r},e)}function rQe(r){var e=Ai.context[r.__c],t=Pb(P0++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(Ai)),e.props.value):r.__}function nQe(r,e){ss.useDebugValue&&ss.useDebugValue(e?e(r):r)}function iQe(r){var e=Pb(P0++,10),t=Uhe();return e.__=r,Ai.componentDidCatch||(Ai.componentDidCatch=function(n,i){e.__&&e.__(n,i),t[1](n)}),[t[0],function(){t[1](void 0)}]}function sQe(){var r=Pb(P0++,11);if(!r.__){for(var e=Ai.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);r.__="P"+t[0]+"-"+t[1]++}return r.__}function aQe(){for(var r;r=Phe.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(PT),r.__H.__h.forEach(oF),r.__H.__h=[]}catch(e){r.__H.__h=[],ss.__e(e,r.__v)}}ss.__b=function(r){Ai=null,Ohe&&Ohe(r)},ss.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),Lhe&&Lhe(r,e)},ss.__r=function(r){Nhe&&Nhe(r),P0=0;var e=(Ai=r.__c).__H;e&&(sF===Ai?(e.__h=[],Ai.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(PT),e.__h.forEach(oF),e.__h=[],P0=0)),sF=Ai},ss.diffed=function(r){Dhe&&Dhe(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(Phe.push(e)!==1&&Mhe===ss.requestAnimationFrame||((Mhe=ss.requestAnimationFrame)||oQe)(aQe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),sF=Ai=null},ss.__c=function(r,e){e.some(function(t){try{t.__h.forEach(PT),t.__h=t.__h.filter(function(n){return!n.__||oF(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ss.__e(n,t.__v)}}),$he&&$he(r,e)},ss.unmount=function(r){Bhe&&Bhe(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{PT(n)}catch(i){e=i}}),t.__H=void 0,e&&ss.__e(e,t.__v))};var zhe=typeof requestAnimationFrame=="function";function oQe(r){var e,t=function(){clearTimeout(n),zhe&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);zhe&&(e=requestAnimationFrame(t))}function PT(r){var e=Ai,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),Ai=e}function oF(r){var e=Ai;r.__c=r.__(),Ai=e}function cF(r,e){return!r||r.length!==e.length||e.some(function(t,n){return t!==r[n]})}function Hhe(r,e){return typeof e=="function"?e(r):e}const OT=Mh(Object.freeze(Object.defineProperty({__proto__:null,useCallback:tQe,useContext:rQe,useDebugValue:nQe,useEffect:QYe,useErrorBoundary:iQe,useId:sQe,useImperativeHandle:eQe,useLayoutEffect:jhe,useMemo:aF,useReducer:Fhe,useRef:XYe,useState:Uhe},Symbol.toStringTag,{value:"Module"})));var Oy={},NT={};Object.defineProperty(NT,"__esModule",{value:!0}),NT.CloseIcon=void 0;const qhe=Rc;function cQe(r){return(0,qhe.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,qhe.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}NT.CloseIcon=cQe;var DT={};Object.defineProperty(DT,"__esModule",{value:!0}),DT.CoinbaseWalletRound=void 0;const $T=Rc;function lQe(r){return(0,$T.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,$T.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,$T.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,$T.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}DT.CoinbaseWalletRound=lQe;var BT={};Object.defineProperty(BT,"__esModule",{value:!0}),BT.QRCodeIcon=void 0;const Wx=Rc;function uQe(r){return(0,Wx.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,Wx.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,Wx.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,Wx.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,Wx.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}BT.QRCodeIcon=uQe;var LT={};function Whe(r){this.mode=cl.MODE_8BIT_BYTE,this.data=r,this.parsedData=[];for(var e=0,t=this.data.length;e65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Whe.prototype={getLength:function(r){return this.parsedData.length},write:function(r){for(var e=0,t=this.parsedData.length;e=7&&this.setupTypeNumber(r),this.dataCache==null&&(this.dataCache=Fd.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(r,e){for(var t=-1;t<=7;t++)if(!(r+t<=-1||this.moduleCount<=r+t))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=t&&t<=6&&(n==0||n==6)||0<=n&&n<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=n&&n<=4?this.modules[r+t][e+n]=!0:this.modules[r+t][e+n]=!1)},getBestMaskPattern:function(){for(var r=0,e=0,t=0;t<8;t++){this.makeImpl(!0,t);var n=as.getLostPoint(this);(t==0||r>n)&&(r=n,e=t)}return e},createMovieClip:function(r,e,t){var n=r.createEmptyMovieClip(e,t),i=1;this.make();for(var s=0;s>t&1)==1;this.modules[Math.floor(t/3)][t%3+this.moduleCount-8-3]=n}for(var t=0;t<18;t++){var n=!r&&(e>>t&1)==1;this.modules[t%3+this.moduleCount-8-3][Math.floor(t/3)]=n}},setupTypeInfo:function(r,e){for(var t=this.errorCorrectLevel<<3|e,n=as.getBCHTypeInfo(t),i=0;i<15;i++){var s=!r&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!r&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!r},mapData:function(r,e){for(var t=-1,n=this.moduleCount-1,i=7,s=0,a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(var o=0;o<2;o++)if(this.modules[n][a-o]==null){var l=!1;s>>i&1)==1);var u=as.getMask(e,n,a-o);u&&(l=!l),this.modules[n][a-o]=l,i--,i==-1&&(s++,i=7)}if(n+=t,n<0||this.moduleCount<=n){n-=t,t=-t;break}}}},Fd.PAD0=236,Fd.PAD1=17,Fd.createData=function(r,e,t){for(var n=jd.getRSBlocks(r,e),i=new Vhe,s=0;so*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+o*8+")");for(i.getLengthInBits()+4<=o*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=o*8||(i.put(Fd.PAD0,8),i.getLengthInBits()>=o*8));)i.put(Fd.PAD1,8);return Fd.createBytes(i,n)},Fd.createBytes=function(r,e){for(var t=0,n=0,i=0,s=new Array(e.length),a=new Array(e.length),o=0;o=0?b.get(v):0}}for(var C=0,f=0;f=0;)e^=as.G15<=0;)e^=as.G18<>>=1;return e},getPatternPosition:function(r){return as.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,e,t){switch(r){case tm.PATTERN000:return(e+t)%2==0;case tm.PATTERN001:return e%2==0;case tm.PATTERN010:return t%3==0;case tm.PATTERN011:return(e+t)%3==0;case tm.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2==0;case tm.PATTERN101:return e*t%2+e*t%3==0;case tm.PATTERN110:return(e*t%2+e*t%3)%2==0;case tm.PATTERN111:return(e*t%3+(e+t)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){for(var e=new Ny([1],0),t=0;t5&&(t+=3+s-5)}for(var n=0;n=256;)r-=255;return Pa.EXP_TABLE[r]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},eo=0;eo<8;eo++)Pa.EXP_TABLE[eo]=1<>>7-r%8&1)==1},put:function(r,e){for(var t=0;t>>e-t-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var lF=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Ghe(r){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof r=="string"&&(r={content:r}),r)for(var e in r)this.options[e]=r[e];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function t(l){switch(l){case"L":return em.L;case"M":return em.M;case"Q":return em.Q;case"H":return em.H;default:throw new Error("Unknwon error correction level: "+l)}}function n(l,u){for(var f=i(l),h=1,m=0,b=0,v=lF.length;b<=v;b++){var C=lF[b];if(!C)throw new Error("Content too long: expected "+m+" but got "+f);switch(u){case"L":m=C[0];break;case"M":m=C[1];break;case"Q":m=C[2];break;case"H":m=C[3];break;default:throw new Error("Unknwon error correction level: "+u)}if(f<=m)break;h++}if(h>lF.length)throw new Error("Content too long");return h}function i(l){var u=encodeURI(l).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return u.length+(u.length!=l?3:0)}var s=this.options.content,a=n(s,this.options.ecl),o=t(this.options.ecl);this.qrcode=new Fd(a,o),this.qrcode.addData(s),this.qrcode.make()}Ghe.prototype.svg=function(r){var e=this.options||{},t=this.qrcode.modules;typeof r>"u"&&(r={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",s=n?`\r +`:"",a=e.width,o=e.height,l=t.length,u=a/(l+2*e.padding),f=o/(l+2*e.padding),h=typeof e.join<"u"?!!e.join:!1,m=typeof e.swap<"u"?!!e.swap:!1,b=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,v=typeof e.predefined<"u"?!!e.predefined:!1,C=v?i+''+s:"",R=i+''+s,k="",P="",N=0;N'+s:k+=i+''+s}}h&&(k=i+'');let D="";if(this.options.image!==void 0&&this.options.image.svg){const y=a*this.options.image.width/100,p=o*this.options.image.height/100,g=a/2-y/2,_=o/2-p/2;D+=``,D+=this.options.image.svg+s,D+=""}var x="";switch(r.container){case"svg":b&&(x+=''+s),x+=''+s,x+=C+R+k,x+=D,x+="";break;case"svg-viewbox":b&&(x+=''+s),x+=''+s,x+=C+R+k,x+=D,x+="";break;case"g":x+=''+s,x+=C+R+k,x+=D,x+="";break;default:x+=(C+R+k+D).replace(/^\s+/,"");break}return x};var fQe=Ghe,dQe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(LT,"__esModule",{value:!0}),LT.QRCode=void 0;const hQe=Rc,Khe=OT,pQe=dQe(fQe),mQe=r=>{const[e,t]=(0,Khe.useState)("");return(0,Khe.useEffect)(()=>{var n,i;const s=new pQe.default({content:r.content,background:r.bgColor||"#ffffff",color:r.fgColor||"#000000",container:"svg",ecl:"M",width:(n=r.width)!==null&&n!==void 0?n:256,height:(i=r.height)!==null&&i!==void 0?i:256,padding:0,image:r.image}),a=It.from(s.svg(),"utf8").toString("base64");t(`data:image/svg+xml;base64,${a}`)},[r.bgColor,r.content,r.fgColor,r.height,r.image,r.width]),e?(0,hQe.h)("img",{src:e,alt:"QR Code"}):null};LT.QRCode=mQe;var UT={},uF={};Object.defineProperty(uF,"__esModule",{value:!0}),uF.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var gQe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(UT,"__esModule",{value:!0}),UT.Spinner=void 0;const FT=Rc,bQe=gQe(uF),vQe=r=>{var e;const t=(e=r.size)!==null&&e!==void 0?e:64,n=r.color||"#000";return(0,FT.h)("div",{class:"-cbwsdk-spinner"},(0,FT.h)("style",null,bQe.default),(0,FT.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:t,height:t}},(0,FT.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};UT.Spinner=vQe;var fF={};Object.defineProperty(fF,"__esModule",{value:!0}),fF.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var Zhe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oy,"__esModule",{value:!0}),Oy.CoinbaseWalletSteps=Oy.ConnectContent=void 0;const Ob=Zhe(qx),Rn=Rc,wQe=vr,yQe=xy,xQe=NT,_Qe=DT,EQe=BT,CQe=LT,AQe=UT,SQe=Zhe(fF),dF={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:Jhe},IQe=r=>r==="light"?"#FFFFFF":"#0A0B0D";function TQe(r){const{theme:e}=r,t=(0,wQe.createQrUrl)(r.sessionId,r.sessionSecret,r.linkAPIUrl,r.isParentConnection,r.version,r.chainId),n=dF.steps;return(0,Rn.h)("div",{"data-testid":"connect-content",className:(0,Ob.default)("-cbwsdk-connect-content",e)},(0,Rn.h)("style",null,SQe.default),(0,Rn.h)("div",{className:"-cbwsdk-connect-content-header"},(0,Rn.h)("h2",{className:(0,Ob.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with our mobile app"),r.onCancel&&(0,Rn.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:r.onCancel},(0,Rn.h)(xQe.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Rn.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,Rn.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,Rn.h)(kQe,{title:dF.title,description:dF.description,theme:e})),(0,Rn.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,Rn.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,Rn.h)(CQe.QRCode,{content:t,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,Rn.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:yQe.LIB_VERSION}),(0,Rn.h)("input",{type:"hidden",value:t})),(0,Rn.h)(n,{theme:e}),!r.isConnected&&(0,Rn.h)("div",{"data-testid":"connecting-spinner",className:(0,Ob.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,Rn.h)(AQe.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,Rn.h)("p",null,"Connecting...")))))}Oy.ConnectContent=TQe;function kQe({title:r,description:e,theme:t}){return(0,Rn.h)("div",{className:(0,Ob.default)("-cbwsdk-connect-item",t)},(0,Rn.h)("div",null,(0,Rn.h)(_Qe.CoinbaseWalletRound,null)),(0,Rn.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,Rn.h)("h3",{className:"-cbwsdk-connect-item-title"},r),(0,Rn.h)("p",{className:"-cbwsdk-connect-item-description"},e)))}function Jhe({theme:r}){return(0,Rn.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,Rn.h)("li",{className:(0,Ob.default)("-cbwsdk-wallet-steps-item",r)},(0,Rn.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,Rn.h)("li",{className:(0,Ob.default)("-cbwsdk-wallet-steps-item",r)},(0,Rn.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,Rn.h)("span",null,"Tap ",(0,Rn.h)("strong",null,"Scan")," "),(0,Rn.h)("span",{className:(0,Ob.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",r)},(0,Rn.h)(EQe.QRCodeIcon,{fill:IQe(r)})))))}Oy.CoinbaseWalletSteps=Jhe;var jT={},zT={};Object.defineProperty(zT,"__esModule",{value:!0}),zT.ArrowLeftIcon=void 0;const Yhe=Rc;function RQe(r){return(0,Yhe.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},r),(0,Yhe.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}zT.ArrowLeftIcon=RQe;var HT={};Object.defineProperty(HT,"__esModule",{value:!0}),HT.LaptopIcon=void 0;const hF=Rc;function MQe(r){return(0,hF.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,hF.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,hF.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}HT.LaptopIcon=MQe;var qT={};Object.defineProperty(qT,"__esModule",{value:!0}),qT.SafeIcon=void 0;const Qhe=Rc;function PQe(r){return(0,Qhe.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,Qhe.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}qT.SafeIcon=PQe;var pF={};Object.defineProperty(pF,"__esModule",{value:!0}),pF.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var Xhe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jT,"__esModule",{value:!0}),jT.TryExtensionContent=void 0;const Nb=Xhe(qx),Ws=Rc,mF=OT,OQe=zT,NQe=HT,DQe=qT,$Qe=Xhe(pF);function BQe({theme:r}){const[e,t]=(0,mF.useState)(!1),n=(0,mF.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,mF.useCallback)(()=>{e?window.location.reload():(n(),t(!0))},[n,e]);return(0,Ws.h)("div",{class:(0,Nb.default)("-cbwsdk-try-extension",r)},(0,Ws.h)("style",null,$Qe.default),(0,Ws.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Ws.h)("h3",{class:(0,Nb.default)("-cbwsdk-try-extension-heading",r)},"Or try the Coinbase Wallet browser extension"),(0,Ws.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,Ws.h)("button",{class:(0,Nb.default)("-cbwsdk-try-extension-cta",r),onClick:i},e?"Refresh":"Install"),(0,Ws.h)("div",null,!e&&(0,Ws.h)(OQe.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:r==="light"?"#0052FF":"#588AF5"})))),(0,Ws.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Ws.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,Ws.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Ws.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Ws.h)("span",{class:(0,Nb.default)("-cbwsdk-try-extension-list-item-icon",r)},(0,Ws.h)(NQe.LaptopIcon,{fill:r==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Ws.h)("div",{class:(0,Nb.default)("-cbwsdk-try-extension-list-item-copy",r)},"Connect with dapps with just one click on your desktop browser")),(0,Ws.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Ws.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Ws.h)("span",{class:(0,Nb.default)("-cbwsdk-try-extension-list-item-icon",r)},(0,Ws.h)(DQe.SafeIcon,{fill:r==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Ws.h)("div",{class:(0,Nb.default)("-cbwsdk-try-extension-list-item-copy",r)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}jT.TryExtensionContent=BQe;var gF={};Object.defineProperty(gF,"__esModule",{value:!0}),gF.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var e0e=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(MT,"__esModule",{value:!0}),MT.ConnectDialog=void 0;const bF=e0e(qx),Db=Rc,vF=OT,LQe=Oy,UQe=jT,FQe=e0e(gF),jQe=r=>{const{isOpen:e,darkMode:t}=r,[n,i]=(0,vF.useState)(!e),[s,a]=(0,vF.useState)(!e);(0,vF.useEffect)(()=>{const l=[window.setTimeout(()=>{a(!e)},10)];return e?i(!1):l.push(window.setTimeout(()=>{i(!0)},360)),()=>{l.forEach(window.clearTimeout)}},[e]);const o=t?"dark":"light";return(0,Db.h)("div",{class:(0,bF.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Db.h)("style",null,FQe.default),(0,Db.h)("div",{class:(0,bF.default)("-cbwsdk-connect-dialog-backdrop",o,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Db.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Db.h)("div",{class:(0,bF.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},r.connectDisabled?null:(0,Db.h)(LQe.ConnectContent,{theme:o,version:r.version,sessionId:r.sessionId,sessionSecret:r.sessionSecret,linkAPIUrl:r.linkAPIUrl,isConnected:r.isConnected,isParentConnection:r.isParentConnection,chainId:r.chainId,onCancel:r.onCancel}),(0,Db.h)(UQe.TryExtensionContent,{theme:o}))))};MT.ConnectDialog=jQe,Object.defineProperty(IT,"__esModule",{value:!0}),IT.LinkFlow=void 0;const wF=Rc,zQe=MT;class HQe{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,wF.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,wF.render)((0,wF.h)(zQe.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}IT.LinkFlow=HQe;var yF={},xF={};Object.defineProperty(xF,"__esModule",{value:!0}),xF.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}",function(r){var e=ut&&ut.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.SnackbarInstance=r.SnackbarContainer=r.Snackbar=void 0;const t=e(qx),n=Rc,i=OT,s=e(xF),a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIj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Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(m){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=m.darkMode}attach(m){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",m.appendChild(this.root),this.render()}presentItem(m){const b=this.nextItemKey++;return this.items.set(b,m),this.render(),()=>{this.items.delete(b),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(r.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([m,b])=>(0,n.h)(r.SnackbarInstance,Object.assign({},b,{key:m}))))),this.root)}}r.Snackbar=l;const u=h=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},h.children));r.SnackbarContainer=u;const f=({autoExpand:h,message:m,menuItems:b})=>{const[v,C]=(0,i.useState)(!0),[R,k]=(0,i.useState)(h??!1);(0,i.useEffect)(()=>{const N=[window.setTimeout(()=>{C(!1)},1),window.setTimeout(()=>{k(!0)},1e4)];return()=>{N.forEach(window.clearTimeout)}});const P=()=>{k(!R)};return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",v&&"-cbwsdk-snackbar-instance-hidden",R&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:P},(0,n.h)("img",{src:a,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},m),(0,n.h)("div",{class:"-gear-container"},!R&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:o,class:"-gear-icon",title:"Expand"}))),b&&b.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},b.map((N,$)=>(0,n.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",N.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:N.onClick,key:$},(0,n.h)("svg",{width:N.svgWidth,height:N.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":N.defaultFillRule,"clip-rule":N.defaultClipRule,d:N.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",N.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},N.info)))))};r.SnackbarInstance=f}(yF),Object.defineProperty(Lx,"__esModule",{value:!0}),Lx.WalletLinkRelayUI=void 0;const qQe=Ux,WQe=IT,VQe=yF;class GQe{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new VQe.Snackbar({darkMode:e.darkMode}),this.linkFlow=new WQe.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,qQe.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}}Lx.WalletLinkRelayUI=GQe,Object.defineProperty(Ox,"__esModule",{value:!0}),Ox.WalletLinkRelay=void 0;const Dy=Tx,KQe=ra,os=vr,$b=Ey,t0e=pu,rm=Cy,ZQe=_T,Bb=yy,JQe=Lx;class O0 extends t0e.RelayAbstract{constructor(e){var t;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=a=>{var o;this.isLinked=a;const l=this.storage.getItem(t0e.LOCAL_STORAGE_ADDRESSES_KEY);if(a&&(this.session.linked=a),this.isUnlinkedErrorState=!1,l){const u=l.split(" "),f=this.storage.getItem("IsStandaloneSigning")==="true";if(u[0]!==""&&!a&&this.session.linked&&!f){this.isUnlinkedErrorState=!0;const h=this.getSessionIdHash();(o=this.diagnostic)===null||o===void 0||o.log($b.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:h})}}},this.metadataUpdated=(a,o)=>{this.storage.setItem(a,o)},this.chainUpdated=(a,o)=>{this.chainCallbackParams.chainId===a&&this.chainCallbackParams.jsonRpcUrl===o||(this.chainCallbackParams={chainId:a,jsonRpcUrl:o},this.chainCallback&&this.chainCallback(a,o))},this.accountUpdated=a=>{this.accountsCallback&&this.accountsCallback([a]),O0.accountRequestCallbackIds.size>0&&(Array.from(O0.accountRequestCallbackIds.values()).forEach(o=>{const l={type:"WEB3_RESPONSE",id:o,response:{method:"requestEthereumAccounts",result:[a]}};this.invokeCallback(Object.assign(Object.assign({},l),{id:o}))}),O0.accountRequestCallbackIds.clear())},this.connectedUpdated=a=>{this.ui.setConnected(a)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(t=e.reloadOnDisconnect)!==null&&t!==void 0?t:!0,this.ui=i}subscribe(){const e=rm.Session.load(this.storage)||new rm.Session(this.storage).save(),{linkAPIUrl:t,diagnostic:n}=this,i=new ZQe.WalletLinkConnection({session:e,linkAPIUrl:t,diagnostic:n,listener:this}),{version:s,darkMode:a}=this.options,o=this.options.uiConstructor({linkAPIUrl:t,version:s,darkMode:a,session:e});return i.connect(),{session:e,ui:o,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,t;const n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log($b.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=rm.Session.load(this.storage);if((i==null?void 0:i.id)===this._session.id?this.storage.clear():i&&((t=this.diagnostic)===null||t===void 0||t.log($b.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:rm.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:s,ui:a,connection:o}=this.subscribe();this._session=s,this.connection=o,this.ui=a,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}).catch(e=>{var t;(t=this.diagnostic)===null||t===void 0||t.log($b.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,os.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,os.hexStringFromBuffer)(e,!0),signature:(0,os.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,os.bigIntStringFromBN)(e.weiValue),data:(0,os.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,os.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,os.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,os.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,os.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,os.bigIntStringFromBN)(e.weiValue),data:(0,os.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,os.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,os.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,os.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,os.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,os.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,os.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,os.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,a),t==null||t()};return{promise:new Promise((a,o)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,l=>{if(t==null||t(),(0,Bb.isErrorResponse)(l))return o(new Error(l.errorMessage));a(l)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof JQe.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,t){var n;const i={type:"WEB3_REQUEST",id:e,request:t},s=rm.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log($b.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?rm.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(a=>{var o;(o=this.diagnostic)===null||o===void 0||o.log($b.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?rm.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})}).catch(a=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:t.method,errorMessage:a.message}})})}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){var t;const{response:n}=e;if((t=this.diagnostic)===null||t===void 0||t.log($b.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){O0.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),O0.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,n,i){var s;const a=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,Dy.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:a,errorCode:i}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,os.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(t),this.handleErrorResponse(t,e.method,s)};return{promise:new Promise((s,a)=>{if(this.relayEventManager.callbacks.set(t,o=>{if(this.ui.hideRequestEthereumAccounts(),(0,Bb.isErrorResponse)(o))return a(new Error(o.errorMessage));s(o)}),this.ui.inlineAccountsResponse()){const o=l=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:{method:"requestEthereumAccounts",result:l}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:o})}else{const o=Dy.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(o)})}O0.accountRequestCallbackIds.add(t),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(t,e)}),cancel:n}}selectProvider(e){const t={method:"selectProvider",params:{providerOptions:e}},n=(0,os.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,a)},s=new Promise((a,o)=>{this.relayEventManager.callbacks.set(n,f=>{if((0,Bb.isErrorResponse)(f))return o(new Error(f.errorMessage));a(f)});const l=f=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:KQe.ProviderType.Unselected}})},u=f=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:f}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:l,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,t,n,i,s,a){const o={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:i,image:s},chainId:a}};let l=null;const u=(0,os.randomBytesHex)(8),f=m=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,o.method,m),l==null||l()};this.ui.inlineWatchAsset()||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload}));const h=new Promise((m,b)=>{this.relayEventManager.callbacks.set(u,R=>{if(l==null||l(),(0,Bb.isErrorResponse)(R))return b(new Error(R.errorMessage));m(R)});const v=R=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!1}})},C=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:C,onCancel:v,type:e,address:t,symbol:n,decimals:i,image:s,chainId:a}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,o)});return{cancel:f,promise:h}}addEthereumChain(e,t,n,i,s,a){const o={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:a}};let l=null;const u=(0,os.randomBytesHex)(8),f=m=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,o.method,m),l==null||l()};return this.ui.inlineAddEthereumChain(e)||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload})),{promise:new Promise((m,b)=>{this.relayEventManager.callbacks.set(u,R=>{if(l==null||l(),(0,Bb.isErrorResponse)(R))return b(new Error(R.errorMessage));m(R)});const v=R=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},C=R=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:R}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:v,onApprove:C,chainId:o.params.chainId,rpcUrls:o.params.rpcUrls,blockExplorerUrls:o.params.blockExplorerUrls,chainName:o.params.chainName,iconUrls:o.params.iconUrls,nativeCurrency:o.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,o)}),cancel:f}}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},i=(0,os.randomBytesHex)(8),s=o=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,o)};return{promise:new Promise((o,l)=>{this.relayEventManager.callbacks.set(i,h=>{if((0,Bb.isErrorResponse)(h)&&h.errorCode)return l(Dy.standardErrors.provider.custom({code:h.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,Bb.isErrorResponse)(h))return l(new Error(h.errorMessage));o(h)});const u=h=>{var m;if(h){const b=(m=(0,Dy.getErrorCode)(h))!==null&&m!==void 0?m:Dy.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",h instanceof Error?h:Dy.standardErrors.provider.unsupportedChain(e),b)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},f=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:h}}})};this.ui.switchEthereumChain({onCancel:u,onApprove:f,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return rm.Session.hash(this._session.id)}sendRequestStandalone(e,t){const n=s=>{this.handleErrorResponse(e,t.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:s})};switch(t.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:t,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:t,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:t,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:i});break;default:n();break}}}Ox.WalletLinkRelay=O0,O0.accountRequestCallbackIds=new Set;var Vx={},WT={},r0e={};(function(r){var e=ut&&ut.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s);var o=Object.getOwnPropertyDescriptor(i,s);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,o)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),t=ut&&ut.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(yF,r)})(r0e);var _F={};Object.defineProperty(_F,"__esModule",{value:!0}),_F.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var n0e=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(WT,"__esModule",{value:!0}),WT.RedirectDialog=void 0;const YQe=n0e(qx),zd=Rc,QQe=Ux,XQe=r0e,eXe=n0e(_F);class tXe{constructor(){this.root=null}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,QQe.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,zd.render)(null,this.root),e&&(0,zd.render)((0,zd.h)(rXe,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}}WT.RedirectDialog=tXe;const rXe=({title:r,buttonText:e,darkMode:t,onButtonClick:n,onDismiss:i})=>{const s=t?"dark":"light";return(0,zd.h)(XQe.SnackbarContainer,{darkMode:t},(0,zd.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,zd.h)("style",null,eXe.default),(0,zd.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,zd.h)("div",{class:(0,YQe.default)("-cbwsdk-redirect-dialog-box",s)},(0,zd.h)("p",null,r),(0,zd.h)("button",{onClick:n},e))))};Object.defineProperty(Vx,"__esModule",{value:!0}),Vx.MobileRelayUI=void 0;const nXe=WT;class iXe{constructor(e){this.attached=!1,this.darkMode=!1,this.openedWindow=null,this.redirectDialog=new nXe.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}closeOpenedWindow(){var e;(e=this.openedWindow)===null||e===void 0||e.close(),this.openedWindow=null}redirectToCoinbaseWallet(e){const t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",window.location.href),e&&t.searchParams.append("wl_url",e),this.openedWindow=window.open(t.href,"cbw-opener"),this.openedWindow&&setTimeout(()=>this.closeOpenedWindow(),5e3)}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.closeOpenedWindow(),this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.closeOpenedWindow(),this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}Vx.MobileRelayUI=iXe,Object.defineProperty(Px,"__esModule",{value:!0}),Px.MobileRelay=void 0;const sXe=vr,aXe=Ox,i0e=Vx;class oXe extends aXe.WalletLinkRelay{constructor(e){var t;super(e),this._enableMobileWalletLink=(t=e.enableMobileWalletLink)!==null&&t!==void 0?t:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const e=(0,sXe.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,t){if(super.publishWeb3RequestEvent(e,t),!(this._enableMobileWalletLink&&this.ui instanceof i0e.MobileRelayUI))return;let n=!1;switch(t.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e),this._enableMobileWalletLink&&this.ui instanceof i0e.MobileRelayUI&&this.ui.closeOpenedWindow()}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}}Px.MobileRelay=oXe;var EF={exports:{}},s0e=Xn.EventEmitter,CF,a0e;function cXe(){if(a0e)return CF;a0e=1;function r(v,C){var R=Object.keys(v);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(v);C&&(k=k.filter(function(P){return Object.getOwnPropertyDescriptor(v,P).enumerable})),R.push.apply(R,k)}return R}function e(v){for(var C=1;C0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(R){var k={data:R,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var R=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,R}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(R){if(this.length===0)return"";for(var k=this.head,P=""+k.data;k=k.next;)P+=R+k.data;return P}},{key:"concat",value:function(R){if(this.length===0)return u.alloc(0);for(var k=u.allocUnsafe(R>>>0),P=this.head,N=0;P;)b(P.data,k,N),N+=P.data.length,P=P.next;return k}},{key:"consume",value:function(R,k){var P;return R$.length?$.length:R;if(j===$.length?N+=$:N+=$.slice(0,R),R-=j,R===0){j===$.length?(++P,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=$.slice(j));break}++P}return this.length-=P,N}},{key:"_getBuffer",value:function(R){var k=u.allocUnsafe(R),P=this.head,N=1;for(P.data.copy(k),R-=P.data.length;P=P.next;){var $=P.data,j=R>$.length?$.length:R;if($.copy(k,k.length-R,0,j),R-=j,R===0){j===$.length?(++N,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=$.slice(j));break}++N}return this.length-=N,k}},{key:m,value:function(R,k){return h(this,e(e({},k),{},{depth:0,customInspect:!1}))}}]),v}(),CF}function lXe(r,e){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(AF,this,r)):vt.nextTick(AF,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!e&&s?t._writableState?t._writableState.errorEmitted?vt.nextTick(VT,t):(t._writableState.errorEmitted=!0,vt.nextTick(o0e,t,s)):vt.nextTick(o0e,t,s):e?(vt.nextTick(VT,t),e(s)):vt.nextTick(VT,t)}),this)}function o0e(r,e){AF(r,e),VT(r)}function VT(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function uXe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function AF(r,e){r.emit("error",e)}function fXe(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}var c0e={destroy:lXe,undestroy:uXe,errorOrDestroy:fXe},Lb={};function dXe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var l0e={};function mu(r,e,t){t||(t=Error);function n(s,a,o){return typeof e=="string"?e:e(s,a,o)}var i=function(s){dXe(a,s);function a(o,l,u){return s.call(this,n(o,l,u))||this}return a}(t);i.prototype.name=t.name,i.prototype.code=r,l0e[r]=i}function u0e(r,e){if(Array.isArray(r)){var t=r.length;return r=r.map(function(n){return String(n)}),t>2?"one of ".concat(e," ").concat(r.slice(0,t-1).join(", "),", or ")+r[t-1]:t===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}else return"of ".concat(e," ").concat(String(r))}function hXe(r,e,t){return r.substr(0,e.length)===e}function pXe(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function mXe(r,e,t){return typeof t!="number"&&(t=0),t+e.length>r.length?!1:r.indexOf(e,t)!==-1}mu("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError),mu("ERR_INVALID_ARG_TYPE",function(r,e,t){var n;typeof e=="string"&&hXe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(pXe(r," argument"))i="The ".concat(r," ").concat(n," ").concat(u0e(e,"type"));else{var s=mXe(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(s," ").concat(n," ").concat(u0e(e,"type"))}return i+=". Received type ".concat(typeof t),i},TypeError),mu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),mu("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"}),mu("ERR_STREAM_PREMATURE_CLOSE","Premature close"),mu("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"}),mu("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),mu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),mu("ERR_STREAM_WRITE_AFTER_END","write after end"),mu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),mu("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError),mu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Lb.codes=l0e;var gXe=Lb.codes.ERR_INVALID_OPT_VALUE;function bXe(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function vXe(r,e,t,n){var i=bXe(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?t:"highWaterMark";throw new gXe(s,i)}return Math.floor(i)}return r.objectMode?16:16*1024}var f0e={getHighWaterMark:vXe},wXe=yXe;function yXe(r,e){if(SF("noDeprecation"))return r;var t=!1;function n(){if(!t){if(SF("throwDeprecation"))throw new Error(e);SF("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function SF(r){try{if(!ut.localStorage)return!1}catch{return!1}var e=ut.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}var IF,d0e;function h0e(){if(d0e)return IF;d0e=1,IF=L;function r(Z){var K=this;this.next=null,this.entry=null,this.finish=function(){W(K,Z)}}var e;L.WritableState=G;var t={deprecate:wXe},n=s0e,i=Cc.Buffer,s=(typeof ut<"u"?ut:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(Z){return i.from(Z)}function o(Z){return i.isBuffer(Z)||Z instanceof s}var l=c0e,u=f0e,f=u.getHighWaterMark,h=Lb.codes,m=h.ERR_INVALID_ARG_TYPE,b=h.ERR_METHOD_NOT_IMPLEMENTED,v=h.ERR_MULTIPLE_CALLBACK,C=h.ERR_STREAM_CANNOT_PIPE,R=h.ERR_STREAM_DESTROYED,k=h.ERR_STREAM_NULL_VALUES,P=h.ERR_STREAM_WRITE_AFTER_END,N=h.ERR_UNKNOWN_ENCODING,$=l.errorOrDestroy;Vo(L,n);function j(){}function G(Z,K,ee){e=e||$y(),Z=Z||{},typeof ee!="boolean"&&(ee=K instanceof e),this.objectMode=!!Z.objectMode,ee&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=f(this,Z,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var re=Z.decodeStrings===!1;this.decodeStrings=!re,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){_(K,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}G.prototype.getBuffer=function(){for(var K=this.bufferedRequest,ee=[];K;)ee.push(K),K=K.next;return ee},function(){try{Object.defineProperty(G.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var U;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(K){return U.call(this,K)?!0:this!==L?!1:K&&K._writableState instanceof G}})):U=function(K){return K instanceof this};function L(Z){e=e||$y();var K=this instanceof e;if(!K&&!U.call(L,this))return new L(Z);this._writableState=new G(Z,this,K),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),n.call(this)}L.prototype.pipe=function(){$(this,new C)};function V(Z,K){var ee=new P;$(Z,ee),vt.nextTick(K,ee)}function te(Z,K,ee,re){var H;return ee===null?H=new k:typeof ee!="string"&&!K.objectMode&&(H=new m("chunk",["string","Buffer"],ee)),H?($(Z,H),vt.nextTick(re,H),!1):!0}L.prototype.write=function(Z,K,ee){var re=this._writableState,H=!1,F=!re.objectMode&&o(Z);return F&&!i.isBuffer(Z)&&(Z=a(Z)),typeof K=="function"&&(ee=K,K=null),F?K="buffer":K||(K=re.defaultEncoding),typeof ee!="function"&&(ee=j),re.ending?V(this,ee):(F||te(this,re,Z,ee))&&(re.pendingcb++,H=x(this,re,F,Z,K,ee)),H},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&I(this,Z))},L.prototype.setDefaultEncoding=function(K){if(typeof K=="string"&&(K=K.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((K+"").toLowerCase())>-1))throw new N(K);return this._writableState.defaultEncoding=K,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(Z,K,ee){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof K=="string"&&(K=i.from(K,ee)),K}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function x(Z,K,ee,re,H,F){if(!ee){var q=D(K,re,H);re!==q&&(ee=!0,H="buffer",re=q)}var fe=K.objectMode?1:re.length;K.length+=fe;var pe=K.length0)if(typeof q!="string"&&!Me.objectMode&&Object.getPrototypeOf(q)!==n.prototype&&(q=s(q)),pe)Me.endEmitted?j(F,new k):D(F,Me,q,!0);else if(Me.ended)j(F,new C);else{if(Me.destroyed)return!1;Me.reading=!1,Me.decoder&&!fe?(q=Me.decoder.write(q),Me.objectMode||q.length!==0?D(F,Me,q,!1):I(F,Me)):D(F,Me,q,!1)}else pe||(Me.reading=!1,I(F,Me))}return!Me.ended&&(Me.length=y?F=y:(F--,F|=F>>>1,F|=F>>>2,F|=F>>>4,F|=F>>>8,F|=F>>>16,F++),F}function g(F,q){return F<=0||q.length===0&&q.ended?0:q.objectMode?1:F!==F?q.flowing&&q.length?q.buffer.head.data.length:q.length:(F>q.highWaterMark&&(q.highWaterMark=p(F)),F<=q.length?F:q.ended?q.length:(q.needReadable=!0,0))}V.prototype.read=function(F){l("read",F),F=parseInt(F,10);var q=this._readableState,fe=F;if(F!==0&&(q.emittedReadable=!1),F===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return l("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?ee(this):S(this),null;if(F=g(F,q),F===0&&q.ended)return q.length===0&&ee(this),null;var pe=q.needReadable;l("need readable",pe),(q.length===0||q.length-F0?Ee=K(F,q):Ee=null,Ee===null?(q.needReadable=q.length<=q.highWaterMark,F=0):(q.length-=F,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),fe!==F&&q.ended&&ee(this)),Ee!==null&&this.emit("data",Ee),Ee};function _(F,q){if(l("onEofChunk"),!q.ended){if(q.decoder){var fe=q.decoder.end();fe&&fe.length&&(q.buffer.push(fe),q.length+=q.objectMode?1:fe.length)}q.ended=!0,q.sync?S(F):(q.needReadable=!1,q.emittedReadable||(q.emittedReadable=!0,T(F)))}}function S(F){var q=F._readableState;l("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(l("emitReadable",q.flowing),q.emittedReadable=!0,vt.nextTick(T,F))}function T(F){var q=F._readableState;l("emitReadable_",q.destroyed,q.length,q.ended),!q.destroyed&&(q.length||q.ended)&&(F.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,Z(F)}function I(F,q){q.readingMore||(q.readingMore=!0,vt.nextTick(E,F,q))}function E(F,q){for(;!q.reading&&!q.ended&&(q.length1&&H(pe.pipes,F)!==-1)&&!Qe&&(l("false write response, pause",pe.awaitDrain),pe.awaitDrain++),fe.pause())}function Xe(Be){l("onerror",Be),et(),F.removeListener("error",Xe),e(F,"error")===0&&j(F,Be)}U(F,"error",Xe);function Le(){F.removeListener("finish",Ge),et()}F.once("close",Le);function Ge(){l("onfinish"),F.removeListener("close",Le),et()}F.once("finish",Ge);function et(){l("unpipe"),fe.unpipe(F)}return F.emit("pipe",fe),pe.flowing||(l("pipe resume"),fe.resume()),F};function M(F){return function(){var fe=F._readableState;l("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&e(F,"data")&&(fe.flowing=!0,Z(F))}}V.prototype.unpipe=function(F){var q=this._readableState,fe={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return F&&F!==q.pipes?this:(F||(F=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,F&&F.emit("unpipe",this,fe),this);if(!F){var pe=q.pipes,Ee=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var Me=0;Me0,pe.flowing!==!1&&this.resume()):F==="readable"&&!pe.endEmitted&&!pe.readableListening&&(pe.readableListening=pe.needReadable=!0,pe.flowing=!1,pe.emittedReadable=!1,l("on readable",pe.length,pe.reading),pe.length?S(this):pe.reading||vt.nextTick(B,this)),fe},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(F,q){var fe=t.prototype.removeListener.call(this,F,q);return F==="readable"&&vt.nextTick(A,this),fe},V.prototype.removeAllListeners=function(F){var q=t.prototype.removeAllListeners.apply(this,arguments);return(F==="readable"||F===void 0)&&vt.nextTick(A,this),q};function A(F){var q=F._readableState;q.readableListening=F.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:F.listenerCount("data")>0&&F.resume()}function B(F){l("readable nexttick read 0"),F.read(0)}V.prototype.resume=function(){var F=this._readableState;return F.flowing||(l("resume"),F.flowing=!F.readableListening,ae(this,F)),F.paused=!1,this};function ae(F,q){q.resumeScheduled||(q.resumeScheduled=!0,vt.nextTick(W,F,q))}function W(F,q){l("resume",q.reading),q.reading||F.read(0),q.resumeScheduled=!1,F.emit("resume"),Z(F),q.flowing&&!q.reading&&F.read(0)}V.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Z(F){var q=F._readableState;for(l("flow",q.flowing);q.flowing&&F.read()!==null;);}V.prototype.wrap=function(F){var q=this,fe=this._readableState,pe=!1;F.on("end",function(){if(l("wrapped end"),fe.decoder&&!fe.ended){var Oe=fe.decoder.end();Oe&&Oe.length&&q.push(Oe)}q.push(null)}),F.on("data",function(Oe){if(l("wrapped data"),fe.decoder&&(Oe=fe.decoder.write(Oe)),!(fe.objectMode&&Oe==null)&&!(!fe.objectMode&&(!Oe||!Oe.length))){var je=q.push(Oe);je||(pe=!0,F.pause())}});for(var Ee in F)this[Ee]===void 0&&typeof F[Ee]=="function"&&(this[Ee]=function(je){return function(){return F[je].apply(F,arguments)}}(Ee));for(var Me=0;Me=q.length?(q.decoder?fe=q.buffer.join(""):q.buffer.length===1?fe=q.buffer.first():fe=q.buffer.concat(q.length),q.buffer.clear()):fe=q.buffer.consume(F,q.decoder),fe}function ee(F){var q=F._readableState;l("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,vt.nextTick(re,q,F))}function re(F,q){if(l("endReadableNT",F.endEmitted,F.length),!F.endEmitted&&F.length===0&&(F.endEmitted=!0,q.readable=!1,q.emit("end"),F.autoDestroy)){var fe=q._writableState;(!fe||fe.autoDestroy&&fe.finished)&&q.destroy()}}typeof Symbol=="function"&&(V.from=function(F,q){return $===void 0&&($=AXe()),$(V,F,q)});function H(F,q){for(var fe=0,pe=F.length;fe0;return BXe(a,l,u,function(f){i||(i=f),f&&s.forEach(S0e),!l&&(s.forEach(S0e),n(i))})});return e.reduce(LXe)}var jXe=FXe;(function(r,e){e=r.exports=y0e(),e.Stream=e,e.Readable=e,e.Writable=h0e(),e.Duplex=$y(),e.Transform=x0e,e.PassThrough=PXe,e.finished=kF,e.pipeline=jXe})(EF,EF.exports);var I0e=EF.exports;const{Transform:zXe}=I0e;var HXe=r=>class Uve extends zXe{constructor(t,n,i,s,a){super(a),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=a,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(a){s=a}i(s)}_flush(t){let n=null;try{this.push(this.digest())}catch(i){n=i}t(n)}update(t,n){if(!It.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return It.isBuffer(t)||(t=It.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(n=n.toString(t)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Uve(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const{Transform:qXe}=I0e;var WXe=r=>class Fve extends qXe{constructor(t,n,i,s){super(s),this._rate=t,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new r,this._state.initialize(t,n),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(a){s=a}i(s)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!It.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return It.isBuffer(t)||(t=It.from(t,n)),this._state.absorb(t),this}squeeze(t,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new Fve(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const VXe=HXe,GXe=WXe;var KXe=function(r){const e=VXe(r),t=GXe(r);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new t(1344,256,31,i);case"shake256":return new t(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},T0e={};const k0e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];T0e.p1600=function(r){for(let e=0;e<24;++e){const t=r[0]^r[10]^r[20]^r[30]^r[40],n=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],s=r[3]^r[13]^r[23]^r[33]^r[43],a=r[4]^r[14]^r[24]^r[34]^r[44],o=r[5]^r[15]^r[25]^r[35]^r[45],l=r[6]^r[16]^r[26]^r[36]^r[46],u=r[7]^r[17]^r[27]^r[37]^r[47],f=r[8]^r[18]^r[28]^r[38]^r[48],h=r[9]^r[19]^r[29]^r[39]^r[49];let m=f^(i<<1|s>>>31),b=h^(s<<1|i>>>31);const v=r[0]^m,C=r[1]^b,R=r[10]^m,k=r[11]^b,P=r[20]^m,N=r[21]^b,$=r[30]^m,j=r[31]^b,G=r[40]^m,U=r[41]^b;m=t^(a<<1|o>>>31),b=n^(o<<1|a>>>31);const L=r[2]^m,V=r[3]^b,te=r[12]^m,D=r[13]^b,x=r[22]^m,y=r[23]^b,p=r[32]^m,g=r[33]^b,_=r[42]^m,S=r[43]^b;m=i^(l<<1|u>>>31),b=s^(u<<1|l>>>31);const T=r[4]^m,I=r[5]^b,E=r[14]^m,M=r[15]^b,A=r[24]^m,B=r[25]^b,ae=r[34]^m,W=r[35]^b,Z=r[44]^m,K=r[45]^b;m=a^(f<<1|h>>>31),b=o^(h<<1|f>>>31);const ee=r[6]^m,re=r[7]^b,H=r[16]^m,F=r[17]^b,q=r[26]^m,fe=r[27]^b,pe=r[36]^m,Ee=r[37]^b,Me=r[46]^m,Oe=r[47]^b;m=l^(t<<1|n>>>31),b=u^(n<<1|t>>>31);const je=r[8]^m,Re=r[9]^b,Qe=r[18]^m,Ne=r[19]^b,Je=r[28]^m,Xe=r[29]^b,Le=r[38]^m,Ge=r[39]^b,et=r[48]^m,Be=r[49]^b,Ke=v,pt=C,ne=k<<4|R>>>28,Y=R<<4|k>>>28,X=P<<3|N>>>29,ue=N<<3|P>>>29,we=j<<9|$>>>23,Ce=$<<9|j>>>23,Te=G<<18|U>>>14,lt=U<<18|G>>>14,Ct=L<<1|V>>>31,We=V<<1|L>>>31,At=D<<12|te>>>20,xt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45]=Hi^~Ce&Nt,r[6]=ri^~Ii&Ke,r[7]=ni^~kn&pt,r[16]=Ot^~Rt&Gt,r[17]=st^~ot&wr,r[26]=xi^~Te&Ct,r[27]=Si^~lt&We,r[36]=at^~ii&wn,r[37]=Ft^~si&Wn,r[46]=we^~Ut&tt,r[47]=Ce^~Nt&qt,r[8]=Ii^~Ke&At,r[9]=kn^~pt&xt,r[18]=Rt^~Gt&ji,r[19]=ot^~wr&Vn,r[28]=Te^~Ct&Wt,r[29]=lt^~We&rt,r[38]=ii^~wn&ne,r[39]=si^~Wn&Y,r[48]=Ut^~tt&wt,r[49]=Nt^~qt&yr,r[0]^=k0e[e*2],r[1]^=k0e[e*2+1]}};const ZT=T0e;function By(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}By.prototype.initialize=function(r,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1},By.prototype.absorb=function(r){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(ZT.p1600(this.state),this.count=0);return e},By.prototype.copy=function(r){for(let e=0;e<50;++e)r.state[e]=this.state[e];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing};var ZXe=By,JXe=KXe(ZXe);const YXe=JXe,QXe=Ix;function R0e(r){return It.allocUnsafe(r).fill(0)}function M0e(r,e,t){const n=R0e(e);return r=JT(r),t?r.length"u")throw new Error("Not an array?");if(t=B0e(r),t!=="dynamic"&&t!==0&&e.length>t)throw new Error("Elements exceed array size: "+t);i=[],r=r.slice(0,r.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Hd(r,e[s]));if(t==="dynamic"){var a=Hd("uint256",e.length);i.unshift(a)}return It.concat(i)}else{if(r==="bytes")return e=new It(e),i=It.concat([Hd("uint256",e.length),e]),e.length%32!==0&&(i=It.concat([i,Ub.zeros(32-e.length%32)])),i;if(r.startsWith("bytes")){if(t=Ly(r),t<1||t>32)throw new Error("Invalid bytes width: "+t);return Ub.setLengthRight(e,32)}else if(r.startsWith("uint")){if(t=Ly(r),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);if(n=jb(e),n.bitLength()>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(It,"be",32)}else if(r.startsWith("int")){if(t=Ly(r),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);if(n=jb(e),n.bitLength()>t)throw new Error("Supplied int exceeds width: "+t+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(It,"be",32)}else if(r.startsWith("ufixed")){if(t=$0e(r),n=jb(e),n<0)throw new Error("Supplied ufixed is negative");return Hd("uint256",n.mul(new Fb(2).pow(new Fb(t[1]))))}else if(r.startsWith("fixed"))return t=$0e(r),Hd("int256",jb(e).mul(new Fb(2).pow(new Fb(t[1]))))}throw new Error("Unsupported or invalid type: "+r)}function net(r){return r==="string"||r==="bytes"||B0e(r)==="dynamic"}function iet(r){return r.lastIndexOf("]")===r.length-1}function set(r,e){var t=[],n=[],i=32*r.length;for(var s in r){var a=D0e(r[s]),o=e[s],l=Hd(a,o);net(a)?(t.push(Hd("uint256",i)),n.push(l),i+=l.length):t.push(l)}return It.concat(t.concat(n))}function L0e(r,e){if(r.length!==e.length)throw new Error("Number of types are not matching the values");for(var t,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+t);i.push(Ub.setLengthRight(o,t))}else if(a.startsWith("uint")){if(t=Ly(a),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);if(n=jb(o),n.bitLength()>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+n.bitLength());i.push(n.toArrayLike(It,"be",t/8))}else if(a.startsWith("int")){if(t=Ly(a),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);if(n=jb(o),n.bitLength()>t)throw new Error("Supplied int exceeds width: "+t+" vs "+n.bitLength());i.push(n.toTwos(t).toArrayLike(It,"be",t/8))}else throw new Error("Unsupported or invalid type: "+a)}return It.concat(i)}function aet(r,e){return Ub.keccak(L0e(r,e))}var oet={rawEncode:set,solidityPack:L0e,soliditySHA3:aet};const vf=N0e,Kx=oet,U0e={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},NF={encodeData(r,e,t,n=!0){const i=["bytes32"],s=[this.hashType(r,t)];if(n){const a=(o,l,u)=>{if(t[l]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":vf.keccak(this.encodeData(l,u,t,n))];if(u===void 0)throw new Error(`missing value for field ${o} of type ${l}`);if(l==="bytes")return["bytes32",vf.keccak(u)];if(l==="string")return typeof u=="string"&&(u=It.from(u,"utf8")),["bytes32",vf.keccak(u)];if(l.lastIndexOf("]")===l.length-1){const f=l.slice(0,l.lastIndexOf("[")),h=u.map(m=>a(o,f,m));return["bytes32",vf.keccak(Kx.rawEncode(h.map(([m])=>m),h.map(([,m])=>m)))]}return[l,u]};for(const o of t[r]){const[l,u]=a(o.name,o.type,e[o.name]);i.push(l),s.push(u)}}else for(const a of t[r]){let o=e[a.name];if(o!==void 0)if(a.type==="bytes")i.push("bytes32"),o=vf.keccak(o),s.push(o);else if(a.type==="string")i.push("bytes32"),typeof o=="string"&&(o=It.from(o,"utf8")),o=vf.keccak(o),s.push(o);else if(t[a.type]!==void 0)i.push("bytes32"),o=vf.keccak(this.encodeData(a.type,o,t,n)),s.push(o);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(a.type),s.push(o)}}return Kx.rawEncode(i,s)},encodeType(r,e){let t="",n=this.findTypeDependencies(r,e).filter(i=>i!==r);n=[r].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);t+=i+"("+e[i].map(({name:a,type:o})=>o+" "+a).join(",")+")"}return t},findTypeDependencies(r,e,t=[]){if(r=r.match(/^\w*/)[0],t.includes(r)||e[r]===void 0)return t;t.push(r);for(const n of e[r])for(const i of this.findTypeDependencies(n.type,e,t))!t.includes(i)&&t.push(i);return t},hashStruct(r,e,t,n=!0){return vf.keccak(this.encodeData(r,e,t,n))},hashType(r,e){return vf.keccak(this.encodeType(r,e))},sanitizeData(r){const e={};for(const t in U0e.properties)r[t]&&(e[t]=r[t]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(r,e=!0){const t=this.sanitizeData(r),n=[It.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",t.domain,t.types,e)),t.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(t.primaryType,t.message,t.types,e)),vf.keccak(It.concat(n))}};var cet={TYPED_MESSAGE_SCHEMA:U0e,TypedDataUtils:NF,hashForSignTypedDataLegacy:function(r){return uet(r.data)},hashForSignTypedData_v3:function(r){return NF.hash(r.data,!1)},hashForSignTypedData_v4:function(r){return NF.hash(r.data)}};function uet(r){const e=new Error("Expect argument to be non-empty array");if(typeof r!="object"||!r.length)throw e;const t=r.map(function(s){return s.type==="bytes"?vf.toBuffer(s.value):s.value}),n=r.map(function(s){return s.type}),i=r.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return Kx.soliditySHA3(["bytes32","bytes32"],[Kx.soliditySHA3(new Array(r.length).fill("string"),i),Kx.soliditySHA3(n,t)])}var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.filterFromParam=Uy.FilterPolyfill=void 0;const Fy=ra,Go=vr,fet=5*60*1e3,zb={jsonrpc:"2.0",id:0};class det{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,Fy.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){const t=F0e(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,t.fromBlock);return console.info(`Installing new log filter(${n}):`,t,"initial cursor position:",i),this.logFilters.set(n,t),this.setFilterTimeout(n),(0,Go.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,Go.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,Go.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,Go.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,Go.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(YT())}async getFilterLogs(e){const t=(0,Go.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},zb),{method:"eth_getLogs",params:[j0e(n)]})):YT()}makeFilterId(){return(0,Fy.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((t,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));t(s)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return YT();const i=await this.getCurrentBlockHeight(),s=t.toBlock==="latest"?i:t.toBlock;if(n>i||n>Number(t.toBlock))return QT();console.info(`Fetching logs from ${n} to ${s} for filter ${e}`);const a=await this.sendAsyncPromise(Object.assign(Object.assign({},zb),{method:"eth_getLogs",params:[j0e(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(a.result)){const o=a.result.map(u=>(0,Go.intNumberFromHexString)(u.blockNumber||"0x0")),l=Math.max(...o);if(l&&l>n){const u=(0,Fy.IntNumber)(l+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return a}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return YT();const n=await this.getCurrentBlockHeight();if(t>n)return QT();console.info(`Fetching blocks from ${t} to ${n} for filter (${e})`);const i=(await Promise.all((0,Go.range)(t,n+1).map(a=>this.getBlockHashByNumber((0,Fy.IntNumber)(a))))).filter(a=>!!a),s=(0,Fy.IntNumber)(t+i.length);return console.info(`Moving cursor position for filter (${e}) from ${t} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},zb),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(QT())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),i=typeof t=="number"&&t>n?t:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},fet);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;const t=await this._getCurrentBlockHeight();this.currentBlockHeight=t,this.resolvers.forEach(n=>n(t)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(t=>this.resolvers.push(t))}async _getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},zb),{method:"eth_blockNumber",params:[]}));return(0,Go.intNumberFromHexString)((0,Go.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},zb),{method:"eth_getBlockByNumber",params:[(0,Go.hexStringFromIntNumber)(e),!1]}));return t.result&&typeof t.result.hash=="string"?(0,Go.ensureHexString)(t.result.hash):null}}Uy.FilterPolyfill=det;function F0e(r){return{fromBlock:z0e(r.fromBlock),toBlock:z0e(r.toBlock),addresses:r.address===void 0?null:Array.isArray(r.address)?r.address:[r.address],topics:r.topics||[]}}Uy.filterFromParam=F0e;function j0e(r){const e={fromBlock:H0e(r.fromBlock),toBlock:H0e(r.toBlock),topics:r.topics};return r.addresses!==null&&(e.address=r.addresses),e}function z0e(r){if(r===void 0||r==="latest"||r==="pending")return"latest";if(r==="earliest")return(0,Fy.IntNumber)(0);if((0,Go.isHexString)(r))return(0,Go.intNumberFromHexString)(r);throw new Error(`Invalid block option: ${String(r)}`)}function H0e(r){return r==="latest"?r:(0,Go.hexStringFromIntNumber)(r)}function YT(){return Object.assign(Object.assign({},zb),{error:{code:-32e3,message:"filter not found"}})}function QT(){return Object.assign(Object.assign({},zb),{result:[]})}var XT={},q0e={},ek={},DF=het;function het(r){r=r||{};var e=r.max||Number.MAX_SAFE_INTEGER,t=typeof r.start<"u"?r.start:Math.floor(Math.random()*e);return function(){return t=t%e,t++}}const W0e=(r,e)=>function(){const t=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(a,o){if(e.multiArgs){const l=new Array(arguments.length-1);for(let u=1;u{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const t=i=>{const s=a=>typeof a=="string"?i===a:a.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof r=="function"?n=function(){return e.excludeMain?r.apply(this,arguments):W0e(r,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(r));for(const i in r){const s=r[i];n[i]=typeof s=="function"&&t(i)?W0e(s,e):s}return n},Zx={},Jx={};Object.defineProperty(Jx,"__esModule",{value:!0});const met=Xn;function V0e(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function get(r){const e=r.length,t=new Array(e);for(let n=0;n0&&([a]=t),a instanceof Error)throw a;const o=new Error(`Unhandled error.${a?` (${a.message})`:""}`);throw o.context=a,o}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")V0e(s,this,t);else{const a=s.length,o=get(s);for(let l=0;lr+e,G0e=["sync","latest"];class _et extends wet.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*yet,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(t=>this.once("latest",t))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){G0e.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return G0e.map(e=>this.listenerCount(e)).reduce(xet)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const n=K0e(e),i=K0e(t);return this._usePastBlocks&&ni}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}Zx.BaseBlockTracker=_et;function K0e(r){return Number.parseInt(r,16)}var Z0e={},J0e={},to={};class Y0e extends TypeError{constructor(e,t){let n;const{message:i,explanation:s,...a}=e,{path:o}=e,l=o.length===0?i:`At path: ${o.join(".")} -- ${i}`;super(s??l),s!=null&&(this.cause=l),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function Eet(r){return gu(r)&&typeof r[Symbol.iterator]=="function"}function gu(r){return typeof r=="object"&&r!=null}function Q0e(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;const e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function na(r){return typeof r=="symbol"?r.toString():typeof r=="string"?JSON.stringify(r):`${r}`}function Cet(r){const{done:e,value:t}=r.next();return e?void 0:t}function Aet(r,e,t,n){if(r===!0)return;r===!1?r={}:typeof r=="string"&&(r={message:r});const{path:i,branch:s}=e,{type:a}=t,{refinement:o,message:l=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${na(n)}\``}=r;return{value:n,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...r,message:l}}function*$F(r,e,t,n){Eet(r)||(r=[r]);for(const i of r){const s=Aet(i,e,t,n);s&&(yield s)}}function*BF(r,e,t={}){const{path:n=[],branch:i=[r],coerce:s=!1,mask:a=!1}=t,o={path:n,branch:i};if(s&&(r=e.coercer(r,o),a&&e.type!=="type"&&gu(e.schema)&&gu(r)&&!Array.isArray(r)))for(const u in r)e.schema[u]===void 0&&delete r[u];let l="valid";for(const u of e.validator(r,o))u.explanation=t.message,l="not_valid",yield[u,void 0];for(let[u,f,h]of e.entries(r,o)){const m=BF(f,h,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,f],coerce:s,mask:a,message:t.message});for(const b of m)b[0]?(l=b[0].refinement!=null?"not_refined":"not_valid",yield[b[0],void 0]):s&&(f=b[1],u===void 0?r=f:r instanceof Map?r.set(u,f):r instanceof Set?r.add(f):gu(r)&&(f!==void 0||u in r)&&(r[u]=f))}if(l!=="not_valid")for(const u of e.refiner(r,o))u.explanation=t.message,l="not_refined",yield[u,void 0];l==="valid"&&(yield[void 0,r])}class Ms{constructor(e){const{type:t,schema:n,validator:i,refiner:s,coercer:a=l=>l,entries:o=function*(){}}=e;this.type=t,this.schema=n,this.entries=o,this.coercer=a,i?this.validator=(l,u)=>{const f=i(l,u);return $F(f,u,this,l)}:this.validator=()=>[],s?this.refiner=(l,u)=>{const f=s(l,u);return $F(f,u,this,l)}:this.refiner=()=>[]}assert(e,t){return X0e(e,this,t)}create(e,t){return epe(e,this,t)}is(e){return LF(e,this)}mask(e,t){return tpe(e,this,t)}validate(e,t={}){return jy(e,this,t)}}function X0e(r,e,t){const n=jy(r,e,{message:t});if(n[0])throw n[0]}function epe(r,e,t){const n=jy(r,e,{coerce:!0,message:t});if(n[0])throw n[0];return n[1]}function tpe(r,e,t){const n=jy(r,e,{coerce:!0,mask:!0,message:t});if(n[0])throw n[0];return n[1]}function LF(r,e){return!jy(r,e)[0]}function jy(r,e,t={}){const n=BF(r,e,t),i=Cet(n);return i[0]?[new Y0e(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function Iet(...r){const e=r[0].type==="type",t=r.map(i=>i.schema),n=Object.assign({},...t);return e?Qx(n):Yx(n)}function Mc(r,e){return new Ms({type:r,schema:null,validator:e})}function Tet(r,e){return new Ms({...r,refiner:(t,n)=>t===void 0||r.refiner(t,n),validator(t,n){return t===void 0?!0:(e(t,n),r.validator(t,n))}})}function ket(r){return new Ms({type:"dynamic",schema:null,*entries(e,t){yield*r(e,t).entries(e,t)},validator(e,t){return r(e,t).validator(e,t)},coercer(e,t){return r(e,t).coercer(e,t)},refiner(e,t){return r(e,t).refiner(e,t)}})}function Ret(r){let e;return new Ms({type:"lazy",schema:null,*entries(t,n){e??(e=r()),yield*e.entries(t,n)},validator(t,n){return e??(e=r()),e.validator(t,n)},coercer(t,n){return e??(e=r()),e.coercer(t,n)},refiner(t,n){return e??(e=r()),e.refiner(t,n)}})}function Met(r,e){const{schema:t}=r,n={...t};for(const i of e)delete n[i];switch(r.type){case"type":return Qx(n);default:return Yx(n)}}function Pet(r){const e=r instanceof Ms,t=e?{...r.schema}:{...r};for(const n in t)t[n]=rpe(t[n]);return e&&r.type==="type"?Qx(t):Yx(t)}function Oet(r,e){const{schema:t}=r,n={};for(const i of e)n[i]=t[i];switch(r.type){case"type":return Qx(n);default:return Yx(n)}}function Net(r,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Mc(r,e)}function Det(){return Mc("any",()=>!0)}function $et(r){return new Ms({type:"array",schema:r,*entries(e){if(r&&Array.isArray(e))for(const[t,n]of e.entries())yield[t,n,r]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${na(e)}`}})}function Bet(){return Mc("bigint",r=>typeof r=="bigint")}function Let(){return Mc("boolean",r=>typeof r=="boolean")}function Uet(){return Mc("date",r=>r instanceof Date&&!isNaN(r.getTime())||`Expected a valid \`Date\` object, but received: ${na(r)}`)}function Fet(r){const e={},t=r.map(n=>na(n)).join();for(const n of r)e[n]=n;return new Ms({type:"enums",schema:e,validator(n){return r.includes(n)||`Expected one of \`${t}\`, but received: ${na(n)}`}})}function jet(){return Mc("func",r=>typeof r=="function"||`Expected a function, but received: ${na(r)}`)}function zet(r){return Mc("instance",e=>e instanceof r||`Expected a \`${r.name}\` instance, but received: ${na(e)}`)}function Het(){return Mc("integer",r=>typeof r=="number"&&!isNaN(r)&&Number.isInteger(r)||`Expected an integer, but received: ${na(r)}`)}function qet(r){return new Ms({type:"intersection",schema:null,*entries(e,t){for(const n of r)yield*n.entries(e,t)},*validator(e,t){for(const n of r)yield*n.validator(e,t)},*refiner(e,t){for(const n of r)yield*n.refiner(e,t)}})}function Wet(r){const e=na(r),t=typeof r;return new Ms({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?r:null,validator(n){return n===r||`Expected the literal \`${e}\`, but received: ${na(n)}`}})}function Vet(r,e){return new Ms({type:"map",schema:null,*entries(t){if(r&&e&&t instanceof Map)for(const[n,i]of t.entries())yield[n,n,r],yield[n,i,e]},coercer(t){return t instanceof Map?new Map(t):t},validator(t){return t instanceof Map||`Expected a \`Map\` object, but received: ${na(t)}`}})}function UF(){return Mc("never",()=>!1)}function Get(r){return new Ms({...r,validator:(e,t)=>e===null||r.validator(e,t),refiner:(e,t)=>e===null||r.refiner(e,t)})}function Ket(){return Mc("number",r=>typeof r=="number"&&!isNaN(r)||`Expected a number, but received: ${na(r)}`)}function Yx(r){const e=r?Object.keys(r):[],t=UF();return new Ms({type:"object",schema:r||null,*entries(n){if(r&&gu(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],r[s]];for(const s of i)yield[s,n[s],t]}},validator(n){return gu(n)||`Expected an object, but received: ${na(n)}`},coercer(n){return gu(n)?{...n}:n}})}function rpe(r){return new Ms({...r,validator:(e,t)=>e===void 0||r.validator(e,t),refiner:(e,t)=>e===void 0||r.refiner(e,t)})}function Zet(r,e){return new Ms({type:"record",schema:null,*entries(t){if(gu(t))for(const n in t){const i=t[n];yield[n,n,r],yield[n,i,e]}},validator(t){return gu(t)||`Expected an object, but received: ${na(t)}`}})}function Jet(){return Mc("regexp",r=>r instanceof RegExp)}function Yet(r){return new Ms({type:"set",schema:null,*entries(e){if(r&&e instanceof Set)for(const t of e)yield[t,t,r]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${na(e)}`}})}function npe(){return Mc("string",r=>typeof r=="string"||`Expected a string, but received: ${na(r)}`)}function Qet(r){const e=UF();return new Ms({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const n=Math.max(r.length,t.length);for(let i=0;it.type).join(" | ");return new Ms({type:"union",schema:null,coercer(t){for(const n of r){const[i,s]=n.validate(t,{coerce:!0});if(!i)return s}return t},validator(t,n){const i=[];for(const s of r){const[...a]=BF(t,s,n),[o]=a;if(o[0])for(const[l]of a)l&&i.push(l);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${na(t)}`,...i]}})}function ipe(){return Mc("unknown",()=>!0)}function FF(r,e,t){return new Ms({...r,coercer:(n,i)=>LF(n,e)?r.coercer(t(n,i),i):r.coercer(n,i)})}function ett(r,e,t={}){return FF(r,ipe(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!t.strict&&Q0e(n)&&Q0e(i)){const s={...n};let a=!1;for(const o in i)s[o]===void 0&&(s[o]=i[o],a=!0);if(a)return s}return n})}function ttt(r){return FF(r,npe(),e=>e.trim())}function rtt(r){return Hb(r,"empty",e=>{const t=spe(e);return t===0||`Expected an empty ${r.type} but received one with a size of \`${t}\``})}function spe(r){return r instanceof Map||r instanceof Set?r.size:r.length}function ntt(r,e,t={}){const{exclusive:n}=t;return Hb(r,"max",i=>n?in?i>e:i>=e||`Expected a ${r.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function stt(r){return Hb(r,"nonempty",e=>spe(e)>0||`Expected a nonempty ${r.type} but received an empty one`)}function att(r,e){return Hb(r,"pattern",t=>e.test(t)||`Expected a ${r.type} matching \`/${e.source}/\` but received "${t}"`)}function ott(r,e,t=e){const n=`Expected a ${r.type}`,i=e===t?`of \`${e}\``:`between \`${e}\` and \`${t}\``;return Hb(r,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=t||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:a}=s;return e<=a&&a<=t||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=s;return e<=a&&a<=t||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function Hb(r,e,t){return new Ms({...r,*refiner(n,i){yield*r.refiner(n,i);const s=t(n,i),a=$F(s,i,r,n);for(const o of a)yield{...o,refinement:e}}})}const qb=Mh(Object.freeze(Object.defineProperty({__proto__:null,Struct:Ms,StructError:Y0e,any:Det,array:$et,assert:X0e,assign:Iet,bigint:Bet,boolean:Let,coerce:FF,create:epe,date:Uet,defaulted:ett,define:Mc,deprecated:Tet,dynamic:ket,empty:rtt,enums:Fet,func:jet,instance:zet,integer:Het,intersection:qet,is:LF,lazy:Ret,literal:Wet,map:Vet,mask:tpe,max:ntt,min:itt,never:UF,nonempty:stt,nullable:Get,number:Ket,object:Yx,omit:Met,optional:rpe,partial:Pet,pattern:att,pick:Oet,record:Zet,refine:Hb,regexp:Jet,set:Yet,size:ott,string:npe,struct:Net,trimmed:ttt,tuple:Qet,type:Qx,union:Xet,unknown:ipe,validate:jy},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(to,"__esModule",{value:!0}),to.assertExhaustive=to.assertStruct=to.assert=to.AssertionError=void 0;const ctt=qb;function ltt(r){return typeof r=="object"&&r!==null&&"message"in r}function utt(r){var e,t;return typeof((t=(e=r==null?void 0:r.prototype)===null||e===void 0?void 0:e.constructor)===null||t===void 0?void 0:t.name)=="string"}function ftt(r){const e=ltt(r)?r.message:String(r);return e.endsWith(".")?e.slice(0,-1):e}function ape(r,e){return utt(r)?new r({message:e}):r({message:e})}class jF extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}to.AssertionError=jF;function dtt(r,e="Assertion failed.",t=jF){if(!r)throw e instanceof Error?e:ape(t,e)}to.assert=dtt;function htt(r,e,t="Assertion failed",n=jF){try{(0,ctt.assert)(r,e)}catch(i){throw ape(n,`${t}: ${ftt(i)}.`)}}to.assertStruct=htt;function ptt(r){throw new Error("Invalid branch reached. Should be detected during compilation.")}to.assertExhaustive=ptt;var Xx={};Object.defineProperty(Xx,"__esModule",{value:!0}),Xx.base64=void 0;const mtt=qb,gtt=to,btt=(r,e={})=>{var t,n;const i=(t=e.paddingRequired)!==null&&t!==void 0?t:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let a;s==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,gtt.assert)(s==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let o;return i?o=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):o=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,mtt.pattern)(r,o)};Xx.base64=btt;var Mn={},e7={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const e=qb,t=to;r.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,e.is)(u,r.HexStruct)}r.isHexString=n;function i(u){return(0,e.is)(u,r.StrictHexStruct)}r.isStrictHexString=i;function s(u){(0,t.assert)(n(u),"Value must be a hexadecimal string.")}r.assertIsHexString=s;function a(u){(0,t.assert)(i(u),'Value must be a hexadecimal string, starting with "0x".')}r.assertIsStrictHexString=a;function o(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}r.add0x=o;function l(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}r.remove0x=l})(e7),Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.createDataView=Mn.concatBytes=Mn.valueToBytes=Mn.stringToBytes=Mn.numberToBytes=Mn.signedBigIntToBytes=Mn.bigIntToBytes=Mn.hexToBytes=Mn.bytesToString=Mn.bytesToNumber=Mn.bytesToSignedBigInt=Mn.bytesToBigInt=Mn.bytesToHex=Mn.assertIsBytes=Mn.isBytes=void 0;const ll=to,zF=e7,ope=48,cpe=58,lpe=87;function vtt(){const r=[];return()=>{if(r.length===0)for(let e=0;e<256;e++)r.push(e.toString(16).padStart(2,"0"));return r}}const wtt=vtt();function HF(r){return r instanceof Uint8Array}Mn.isBytes=HF;function zy(r){(0,ll.assert)(HF(r),"Value must be a Uint8Array.")}Mn.assertIsBytes=zy;function upe(r){if(zy(r),r.length===0)return"0x";const e=wtt(),t=new Array(r.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const e=r.toString(16);return tk(e)}Mn.bigIntToBytes=dpe;function Ett(r,e){(0,ll.assert)(e>0);const t=r>>BigInt(31);return!((~r&t)+(r&~t)>>BigInt(e*8+-1))}function Ctt(r,e){(0,ll.assert)(typeof r=="bigint","Value must be a bigint."),(0,ll.assert)(typeof e=="number","Byte length must be a number."),(0,ll.assert)(e>0,"Byte length must be greater than 0."),(0,ll.assert)(Ett(r,e),"Byte length is too small to represent the given value.");let t=r;const n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}Mn.signedBigIntToBytes=Ctt;function hpe(r){(0,ll.assert)(typeof r=="number","Value must be a number."),(0,ll.assert)(r>=0,"Value must be a non-negative number."),(0,ll.assert)(Number.isSafeInteger(r),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=r.toString(16);return tk(e)}Mn.numberToBytes=hpe;function ppe(r){return(0,ll.assert)(typeof r=="string","Value must be a string."),new TextEncoder().encode(r)}Mn.stringToBytes=ppe;function mpe(r){if(typeof r=="bigint")return dpe(r);if(typeof r=="number")return hpe(r);if(typeof r=="string")return r.startsWith("0x")?tk(r):ppe(r);if(HF(r))return r;throw new TypeError(`Unsupported value type: "${typeof r}".`)}Mn.valueToBytes=mpe;function Att(r){const e=new Array(r.length);let t=0;for(let i=0;ie.call(t,n,i,this))}get(e){return Ko(this,wf,"f").get(e)}has(e){return Ko(this,wf,"f").has(e)}keys(){return Ko(this,wf,"f").keys()}values(){return Ko(this,wf,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,t])=>`${String(e)} => ${String(t)}`).join(", ")} `:""}}`}}Hy.FrozenMap=qF;class WF{constructor(e){Wd.set(this,void 0),wpe(this,Wd,new Set(e),"f"),Object.freeze(this)}get size(){return Ko(this,Wd,"f").size}[(Wd=new WeakMap,Symbol.iterator)](){return Ko(this,Wd,"f")[Symbol.iterator]()}entries(){return Ko(this,Wd,"f").entries()}forEach(e,t){return Ko(this,Wd,"f").forEach((n,i,s)=>e.call(t,n,i,this))}has(e){return Ko(this,Wd,"f").has(e)}keys(){return Ko(this,Wd,"f").keys()}values(){return Ko(this,Wd,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}Hy.FrozenSet=WF,Object.freeze(qF),Object.freeze(qF.prototype),Object.freeze(WF),Object.freeze(WF.prototype);var ype={};Object.defineProperty(ype,"__esModule",{value:!0});var xpe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const e=qb,t=to,n=()=>(0,e.define)("finite number",j=>(0,e.is)(j,(0,e.number)())&&Number.isFinite(j));r.UnsafeJsonStruct=(0,e.union)([(0,e.literal)(null),(0,e.boolean)(),n(),(0,e.string)(),(0,e.array)((0,e.lazy)(()=>r.UnsafeJsonStruct)),(0,e.record)((0,e.string)(),(0,e.lazy)(()=>r.UnsafeJsonStruct))]),r.JsonStruct=(0,e.define)("Json",(j,G)=>{function U(L,V){const D=[...V.validator(L,G)];return D.length>0?D:!0}try{const L=U(j,r.UnsafeJsonStruct);return L!==!0?L:U(JSON.parse(JSON.stringify(j)),r.UnsafeJsonStruct)}catch(L){return L instanceof RangeError?"Circular reference detected":!1}});function i(j){return(0,e.is)(j,r.JsonStruct)}r.isValidJson=i;function s(j){(0,t.assertStruct)(j,r.JsonStruct,"Invalid JSON value");const G=JSON.stringify(j);return new TextEncoder().encode(G).byteLength}r.getJsonSize=s,r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,e.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),r.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(r.JsonStruct),stack:(0,e.optional)((0,e.string)())}),r.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),r.JsonStruct),(0,e.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,e.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,e.omit)(r.JsonRpcRequestStruct,["id"]);function a(j){return(0,e.is)(j,r.JsonRpcNotificationStruct)}r.isJsonRpcNotification=a;function o(j,G){(0,t.assertStruct)(j,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",G)}r.assertIsJsonRpcNotification=o;function l(j){return(0,e.is)(j,r.JsonRpcRequestStruct)}r.isJsonRpcRequest=l;function u(j,G){(0,t.assertStruct)(j,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",G)}r.assertIsJsonRpcRequest=u,r.PendingJsonRpcResponseStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,e.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,e.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]);function f(j){return(0,e.is)(j,r.PendingJsonRpcResponseStruct)}r.isPendingJsonRpcResponse=f;function h(j,G){(0,t.assertStruct)(j,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",G)}r.assertIsPendingJsonRpcResponse=h;function m(j){return(0,e.is)(j,r.JsonRpcResponseStruct)}r.isJsonRpcResponse=m;function b(j,G){(0,t.assertStruct)(j,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",G)}r.assertIsJsonRpcResponse=b;function v(j){return(0,e.is)(j,r.JsonRpcSuccessStruct)}r.isJsonRpcSuccess=v;function C(j,G){(0,t.assertStruct)(j,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",G)}r.assertIsJsonRpcSuccess=C;function R(j){return(0,e.is)(j,r.JsonRpcFailureStruct)}r.isJsonRpcFailure=R;function k(j,G){(0,t.assertStruct)(j,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",G)}r.assertIsJsonRpcFailure=k;function P(j){return(0,e.is)(j,r.JsonRpcErrorStruct)}r.isJsonRpcError=P;function N(j,G){(0,t.assertStruct)(j,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",G)}r.assertIsJsonRpcError=N;function $(j){const{permitEmptyString:G,permitFractions:U,permitNull:L}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},j);return te=>!!(typeof te=="number"&&(U||Number.isInteger(te))||typeof te=="string"&&(G||te.length>0)||L&&te===null)}r.getJsonRpcIdValidator=$})(xpe);var _pe={};Object.defineProperty(_pe,"__esModule",{value:!0});var qy={},VF={exports:{}},GF,Epe;function Btt(){if(Epe)return GF;Epe=1;var r=1e3,e=r*60,t=e*60,n=t*24,i=n*7,s=n*365.25;GF=function(f,h){h=h||{};var m=typeof f;if(m==="string"&&f.length>0)return a(f);if(m==="number"&&isFinite(f))return h.long?l(f):o(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))};function a(f){if(f=String(f),!(f.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(f);if(h){var m=parseFloat(h[1]),b=(h[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return m*s;case"weeks":case"week":case"w":return m*i;case"days":case"day":case"d":return m*n;case"hours":case"hour":case"hrs":case"hr":case"h":return m*t;case"minutes":case"minute":case"mins":case"min":case"m":return m*e;case"seconds":case"second":case"secs":case"sec":case"s":return m*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function o(f){var h=Math.abs(f);return h>=n?Math.round(f/n)+"d":h>=t?Math.round(f/t)+"h":h>=e?Math.round(f/e)+"m":h>=r?Math.round(f/r)+"s":f+"ms"}function l(f){var h=Math.abs(f);return h>=n?u(f,h,n,"day"):h>=t?u(f,h,t,"hour"):h>=e?u(f,h,e,"minute"):h>=r?u(f,h,r,"second"):f+" ms"}function u(f,h,m,b){var v=h>=m*1.5;return Math.round(f/m)+" "+b+(v?"s":"")}return GF}function Ltt(r){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=i,t.enabled=a,t.humanize=Btt(),t.destroy=u,Object.keys(r).forEach(f=>{t[f]=r[f]}),t.names=[],t.skips=[],t.formatters={};function e(f){let h=0;for(let m=0;m{if(G==="%%")return"%";$++;const L=t.formatters[U];if(typeof L=="function"){const V=R[$];G=L.call(k,V),R.splice($,1),$--}return G}),t.formatArgs.call(k,R),(k.log||t.log).apply(k,R)}return C.namespace=f,C.useColors=t.useColors(),C.color=t.selectColor(f),C.extend=n,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(b!==t.namespaces&&(b=t.namespaces,v=t.enabled(f)),v),set:R=>{m=R}}),typeof t.init=="function"&&t.init(C),C}function n(f,h){const m=t(this.namespace+(typeof h>"u"?":":h)+f);return m.log=this.log,m}function i(f){t.save(f),t.namespaces=f,t.names=[],t.skips=[];let h;const m=(typeof f=="string"?f:"").split(/[\s,]+/),b=m.length;for(h=0;h"-"+h)].join(",");return t.enable(""),f}function a(f){if(f[f.length-1]==="*")return!0;let h,m;for(h=0,m=t.skips.length;h{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;l.splice(1,0,u,"color: inherit");let f=0,h=0;l[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(f++,m==="%c"&&(h=f))}),l.splice(h,0,u)}e.log=console.debug||console.log||(()=>{});function i(l){try{l?e.storage.setItem("debug",l):e.storage.removeItem("debug")}catch{}}function s(){let l;try{l=e.storage.getItem("debug")}catch{}return!l&&typeof vt<"u"&&"env"in vt&&(l=vt.env.DEBUG),l}function a(){try{return localStorage}catch{}}r.exports=Utt(e);const{formatters:o}=r.exports;o.j=function(l){try{return JSON.stringify(l)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(VF,VF.exports);var Ftt=VF.exports,jtt=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qy,"__esModule",{value:!0}),qy.createModuleLogger=qy.createProjectLogger=void 0;const ztt=(0,jtt(Ftt).default)("metamask");function Htt(r){return ztt.extend(r)}qy.createProjectLogger=Htt;function qtt(r,e){return r.extend(e)}qy.createModuleLogger=qtt;var Cpe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0;function e(u){return Array.isArray(u)&&u.length>0}r.isNonEmptyArray=e;function t(u){return u==null}r.isNullOrUndefined=t;function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}r.isObject=n;const i=(u,f)=>Object.hasOwnProperty.call(u,f);r.hasProperty=i,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(u){if(typeof u!="object"||u===null)return!1;try{let f=u;for(;Object.getPrototypeOf(f)!==null;)f=Object.getPrototypeOf(f);return Object.getPrototypeOf(u)===f}catch{return!1}}r.isPlainObject=s;function a(u){return u.charCodeAt(0)<=127}r.isASCII=a;function o(u){var f;return u.split("").reduce((m,b)=>a(b)?m+1:m+2,0)+((f=u.match(r.ESCAPE_CHARACTERS_REGEXP))!==null&&f!==void 0?f:[]).length}r.calculateStringSize=o;function l(u){return u.toString().length}r.calculateNumberSize=l})(Cpe);var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.hexToBigInt=Vd.hexToNumber=Vd.bigIntToHex=Vd.numberToHex=void 0;const Wy=to,t7=e7,Wtt=r=>((0,Wy.assert)(typeof r=="number","Value must be a number."),(0,Wy.assert)(r>=0,"Value must be a non-negative number."),(0,Wy.assert)(Number.isSafeInteger(r),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t7.add0x)(r.toString(16)));Vd.numberToHex=Wtt;const Vtt=r=>((0,Wy.assert)(typeof r=="bigint","Value must be a bigint."),(0,Wy.assert)(r>=0,"Value must be a non-negative bigint."),(0,t7.add0x)(r.toString(16)));Vd.bigIntToHex=Vtt;const Gtt=r=>{(0,t7.assertIsHexString)(r);const e=parseInt(r,16);return(0,Wy.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};Vd.hexToNumber=Gtt;const Ktt=r=>((0,t7.assertIsHexString)(r),BigInt((0,t7.add0x)(r)));Vd.hexToBigInt=Ktt;var Ape={};Object.defineProperty(Ape,"__esModule",{value:!0});var Spe={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(r.Duration||(r.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,t=(s,a)=>{if(!e(s))throw new Error(`"${a}" must be a non-negative integer. Received: "${s}".`)};function n(s,a){return t(s,"count"),s*a}r.inMilliseconds=n;function i(s){return t(s,"timestamp"),Date.now()-s}r.timeSince=i})(Spe);var Ipe={};Object.defineProperty(Ipe,"__esModule",{value:!0});var Tpe={},KF={exports:{}};const Ztt="2.0.0",kpe=256,Jtt=Number.MAX_SAFE_INTEGER||9007199254740991,Ytt=16,Qtt=kpe-6;var ik={MAX_LENGTH:kpe,MAX_SAFE_COMPONENT_LENGTH:Ytt,MAX_SAFE_BUILD_LENGTH:Qtt,MAX_SAFE_INTEGER:Jtt,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:Ztt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},sk=typeof vt=="object"&&vt.env&&vt.env.NODE_DEBUG&&/\bsemver\b/i.test(vt.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};(function(r,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=ik,s=sk;e=r.exports={};const a=e.re=[],o=e.safeRe=[],l=e.src=[],u=e.t={};let f=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",i],[h,n]],b=C=>{for(const[R,k]of m)C=C.split(`${R}*`).join(`${R}{0,${k}}`).split(`${R}+`).join(`${R}{1,${k}}`);return C},v=(C,R,k)=>{const P=b(R),N=f++;s(C,N,R),u[C]=N,l[N]=R,a[N]=new RegExp(R,k?"g":void 0),o[N]=new RegExp(P,k?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),v("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${h}+`),v("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),v("FULL",`^${l[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),v("LOOSE",`^${l[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),v("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),v("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[u.COERCE],!0),v("COERCERTLFULL",l[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",v("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",v("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(KF,KF.exports);var r7=KF.exports;const Xtt=Object.freeze({loose:!0}),ert=Object.freeze({});var ZF=r=>r?typeof r!="object"?Xtt:r:ert;const Rpe=/^[0-9]+$/,Mpe=(r,e)=>{const t=Rpe.test(r),n=Rpe.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:rMpe(e,r)};const ak=sk,{MAX_LENGTH:Ope,MAX_SAFE_INTEGER:ok}=ik,{safeRe:Npe,t:Dpe}=r7,trt=ZF,{compareIdentifiers:Vy}=Ppe;var Zo=class Ih{constructor(e,t){if(t=trt(t),e instanceof Ih){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ope)throw new TypeError(`version is longer than ${Ope} characters`);ak("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Npe[Dpe.LOOSE]:Npe[Dpe.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ok||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ok||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ok||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let s=[t,i];n===!1&&(s=[t]),Vy(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const $pe=Zo;var Gy=(r,e,t=!1)=>{if(r instanceof $pe)return r;try{return new $pe(r,e)}catch(n){if(!t)return null;throw n}};const rrt=Gy;var nrt=(r,e)=>{const t=rrt(r,e);return t?t.version:null};const irt=Gy;var srt=(r,e)=>{const t=irt(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};const Bpe=Zo;var art=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Bpe(r instanceof Bpe?r.version:r,t).inc(e,n,i).version}catch{return null}};const Lpe=Gy;var ort=(r,e)=>{const t=Lpe(r,null,!0),n=Lpe(e,null,!0),i=t.compare(n);if(i===0)return null;const s=i>0,a=s?t:n,o=s?n:t,l=!!a.prerelease.length;if(!!o.prerelease.length&&!l)return!o.patch&&!o.minor?"major":a.patch?"patch":a.minor?"minor":"major";const f=l?"pre":"";return t.major!==n.major?f+"major":t.minor!==n.minor?f+"minor":t.patch!==n.patch?f+"patch":"prerelease"};const crt=Zo;var lrt=(r,e)=>new crt(r,e).major;const urt=Zo;var frt=(r,e)=>new urt(r,e).minor;const drt=Zo;var hrt=(r,e)=>new drt(r,e).patch;const prt=Gy;var mrt=(r,e)=>{const t=prt(r,e);return t&&t.prerelease.length?t.prerelease:null};const Upe=Zo;var yf=(r,e,t)=>new Upe(r,t).compare(new Upe(e,t));const grt=yf;var brt=(r,e,t)=>grt(e,r,t);const vrt=yf;var wrt=(r,e)=>vrt(r,e,!0);const Fpe=Zo;var JF=(r,e,t)=>{const n=new Fpe(r,t),i=new Fpe(e,t);return n.compare(i)||n.compareBuild(i)};const yrt=JF;var xrt=(r,e)=>r.sort((t,n)=>yrt(t,n,e));const _rt=JF;var Ert=(r,e)=>r.sort((t,n)=>_rt(n,t,e));const Crt=yf;var ck=(r,e,t)=>Crt(r,e,t)>0;const Art=yf;var YF=(r,e,t)=>Art(r,e,t)<0;const Srt=yf;var jpe=(r,e,t)=>Srt(r,e,t)===0;const Irt=yf;var zpe=(r,e,t)=>Irt(r,e,t)!==0;const Trt=yf;var QF=(r,e,t)=>Trt(r,e,t)>=0;const krt=yf;var XF=(r,e,t)=>krt(r,e,t)<=0;const Rrt=jpe,Mrt=zpe,Prt=ck,Ort=QF,Nrt=YF,Drt=XF;var Hpe=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Rrt(r,t,n);case"!=":return Mrt(r,t,n);case">":return Prt(r,t,n);case">=":return Ort(r,t,n);case"<":return Nrt(r,t,n);case"<=":return Drt(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};const $rt=Zo,Brt=Gy,{safeRe:lk,t:uk}=r7;var Lrt=(r,e)=>{if(r instanceof $rt)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?lk[uk.COERCEFULL]:lk[uk.COERCE]);else{const l=e.includePrerelease?lk[uk.COERCERTLFULL]:lk[uk.COERCERTL];let u;for(;(u=l.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||u.index+u[0].length!==t.index+t[0].length)&&(t=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(t===null)return null;const n=t[2],i=t[3]||"0",s=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",o=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Brt(`${n}.${i}.${s}${a}${o}`,e)};class Urt{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}}var Frt=Urt,ej,qpe;function xf(){if(qpe)return ej;qpe=1;const r=/\s+/g;class e{constructor(g,_){if(_=i(_),g instanceof e)return g.loose===!!_.loose&&g.includePrerelease===!!_.includePrerelease?g:new e(g.raw,_);if(g instanceof s)return this.raw=g.value,this.set=[[g]],this.formatted=void 0,this;if(this.options=_,this.loose=!!_.loose,this.includePrerelease=!!_.includePrerelease,this.raw=g.trim().replace(r," "),this.set=this.raw.split("||").map(S=>this.parseRange(S.trim())).filter(S=>S.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const S=this.set[0];if(this.set=this.set.filter(T=>!C(T[0])),this.set.length===0)this.set=[S];else if(this.set.length>1){for(const T of this.set)if(T.length===1&&R(T[0])){this.set=[T];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let g=0;g0&&(this.formatted+="||");const _=this.set[g];for(let S=0;S<_.length;S++)S>0&&(this.formatted+=" "),this.formatted+=_[S].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(g){const S=((this.options.includePrerelease&&b)|(this.options.loose&&v))+":"+g,T=n.get(S);if(T)return T;const I=this.options.loose,E=I?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];g=g.replace(E,x(this.options.includePrerelease)),a("hyphen replace",g),g=g.replace(l[u.COMPARATORTRIM],f),a("comparator trim",g),g=g.replace(l[u.TILDETRIM],h),a("tilde trim",g),g=g.replace(l[u.CARETTRIM],m),a("caret trim",g);let M=g.split(" ").map(W=>P(W,this.options)).join(" ").split(/\s+/).map(W=>D(W,this.options));I&&(M=M.filter(W=>(a("loose invalid filter",W,this.options),!!W.match(l[u.COMPARATORLOOSE])))),a("range list",M);const A=new Map,B=M.map(W=>new s(W,this.options));for(const W of B){if(C(W))return[W];A.set(W.value,W)}A.size>1&&A.has("")&&A.delete("");const ae=[...A.values()];return n.set(S,ae),ae}intersects(g,_){if(!(g instanceof e))throw new TypeError("a Range is required");return this.set.some(S=>k(S,_)&&g.set.some(T=>k(T,_)&&S.every(I=>T.every(E=>I.intersects(E,_)))))}test(g){if(!g)return!1;if(typeof g=="string")try{g=new o(g,this.options)}catch{return!1}for(let _=0;_p.value==="<0.0.0-0",R=p=>p.value==="",k=(p,g)=>{let _=!0;const S=p.slice();let T=S.pop();for(;_&&S.length;)_=S.every(I=>T.intersects(I,g)),T=S.pop();return _},P=(p,g)=>(a("comp",p,g),p=G(p,g),a("caret",p),p=$(p,g),a("tildes",p),p=L(p,g),a("xrange",p),p=te(p,g),a("stars",p),p),N=p=>!p||p.toLowerCase()==="x"||p==="*",$=(p,g)=>p.trim().split(/\s+/).map(_=>j(_,g)).join(" "),j=(p,g)=>{const _=g.loose?l[u.TILDELOOSE]:l[u.TILDE];return p.replace(_,(S,T,I,E,M)=>{a("tilde",p,S,T,I,E,M);let A;return N(T)?A="":N(I)?A=`>=${T}.0.0 <${+T+1}.0.0-0`:N(E)?A=`>=${T}.${I}.0 <${T}.${+I+1}.0-0`:M?(a("replaceTilde pr",M),A=`>=${T}.${I}.${E}-${M} <${T}.${+I+1}.0-0`):A=`>=${T}.${I}.${E} <${T}.${+I+1}.0-0`,a("tilde return",A),A})},G=(p,g)=>p.trim().split(/\s+/).map(_=>U(_,g)).join(" "),U=(p,g)=>{a("caret",p,g);const _=g.loose?l[u.CARETLOOSE]:l[u.CARET],S=g.includePrerelease?"-0":"";return p.replace(_,(T,I,E,M,A)=>{a("caret",p,T,I,E,M,A);let B;return N(I)?B="":N(E)?B=`>=${I}.0.0${S} <${+I+1}.0.0-0`:N(M)?I==="0"?B=`>=${I}.${E}.0${S} <${I}.${+E+1}.0-0`:B=`>=${I}.${E}.0${S} <${+I+1}.0.0-0`:A?(a("replaceCaret pr",A),I==="0"?E==="0"?B=`>=${I}.${E}.${M}-${A} <${I}.${E}.${+M+1}-0`:B=`>=${I}.${E}.${M}-${A} <${I}.${+E+1}.0-0`:B=`>=${I}.${E}.${M}-${A} <${+I+1}.0.0-0`):(a("no pr"),I==="0"?E==="0"?B=`>=${I}.${E}.${M}${S} <${I}.${E}.${+M+1}-0`:B=`>=${I}.${E}.${M}${S} <${I}.${+E+1}.0-0`:B=`>=${I}.${E}.${M} <${+I+1}.0.0-0`),a("caret return",B),B})},L=(p,g)=>(a("replaceXRanges",p,g),p.split(/\s+/).map(_=>V(_,g)).join(" ")),V=(p,g)=>{p=p.trim();const _=g.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return p.replace(_,(S,T,I,E,M,A)=>{a("xRange",p,S,T,I,E,M,A);const B=N(I),ae=B||N(E),W=ae||N(M),Z=W;return T==="="&&Z&&(T=""),A=g.includePrerelease?"-0":"",B?T===">"||T==="<"?S="<0.0.0-0":S="*":T&&Z?(ae&&(E=0),M=0,T===">"?(T=">=",ae?(I=+I+1,E=0,M=0):(E=+E+1,M=0)):T==="<="&&(T="<",ae?I=+I+1:E=+E+1),T==="<"&&(A="-0"),S=`${T+I}.${E}.${M}${A}`):ae?S=`>=${I}.0.0${A} <${+I+1}.0.0-0`:W&&(S=`>=${I}.${E}.0${A} <${I}.${+E+1}.0-0`),a("xRange return",S),S})},te=(p,g)=>(a("replaceStars",p,g),p.trim().replace(l[u.STAR],"")),D=(p,g)=>(a("replaceGTE0",p,g),p.trim().replace(l[g.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=p=>(g,_,S,T,I,E,M,A,B,ae,W,Z)=>(N(S)?_="":N(T)?_=`>=${S}.0.0${p?"-0":""}`:N(I)?_=`>=${S}.${T}.0${p?"-0":""}`:E?_=`>=${_}`:_=`>=${_}${p?"-0":""}`,N(B)?A="":N(ae)?A=`<${+B+1}.0.0-0`:N(W)?A=`<${B}.${+ae+1}.0-0`:Z?A=`<=${B}.${ae}.${W}-${Z}`:p?A=`<${B}.${ae}.${+W+1}-0`:A=`<=${A}`,`${_} ${A}`.trim()),y=(p,g,_)=>{for(let S=0;S0){const T=p[S].semver;if(T.major===g.major&&T.minor===g.minor&&T.patch===g.patch)return!0}return!1}return!0};return ej}var tj,Wpe;function fk(){if(Wpe)return tj;Wpe=1;const r=Symbol("SemVer ANY");class e{static get ANY(){return r}constructor(f,h){if(h=t(h),f instanceof e){if(f.loose===!!h.loose)return f;f=f.value}f=f.trim().split(/\s+/).join(" "),a("comparator",f,h),this.options=h,this.loose=!!h.loose,this.parse(f),this.semver===r?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(f){const h=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],m=f.match(h);if(!m)throw new TypeError(`Invalid comparator: ${f}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new o(m[2],this.options.loose):this.semver=r}toString(){return this.value}test(f){if(a("Comparator.test",f,this.options.loose),this.semver===r||f===r)return!0;if(typeof f=="string")try{f=new o(f,this.options)}catch{return!1}return s(f,this.operator,this.semver,this.options)}intersects(f,h){if(!(f instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(f.value,h).test(this.value):f.operator===""?f.value===""?!0:new l(this.value,h).test(f.semver):(h=t(h),h.includePrerelease&&(this.value==="<0.0.0-0"||f.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||f.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&f.operator.startsWith(">")||this.operator.startsWith("<")&&f.operator.startsWith("<")||this.semver.version===f.semver.version&&this.operator.includes("=")&&f.operator.includes("=")||s(this.semver,"<",f.semver,h)&&this.operator.startsWith(">")&&f.operator.startsWith("<")||s(this.semver,">",f.semver,h)&&this.operator.startsWith("<")&&f.operator.startsWith(">")))}}tj=e;const t=ZF,{safeRe:n,t:i}=r7,s=Hpe,a=sk,o=Zo,l=xf();return tj}const jrt=xf();var dk=(r,e,t)=>{try{e=new jrt(e,t)}catch{return!1}return e.test(r)};const zrt=xf();var Hrt=(r,e)=>new zrt(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));const qrt=Zo,Wrt=xf();var Vrt=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Wrt(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new qrt(n,t))}),n};const Grt=Zo,Krt=xf();var Zrt=(r,e,t)=>{let n=null,i=null,s=null;try{s=new Krt(e,t)}catch{return null}return r.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new Grt(n,t))}),n};const rj=Zo,Jrt=xf(),Vpe=ck;var Yrt=(r,e)=>{r=new Jrt(r,e);let t=new rj("0.0.0");if(r.test(t)||(t=new rj("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n{const o=new rj(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||Vpe(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!t||Vpe(t,s))&&(t=s)}return t&&r.test(t)?t:null};const Qrt=xf();var Xrt=(r,e)=>{try{return new Qrt(r,e).range||"*"}catch{return null}};const ent=Zo,Gpe=fk(),{ANY:tnt}=Gpe,rnt=xf(),nnt=dk,Kpe=ck,Zpe=YF,int=XF,snt=QF;var nj=(r,e,t,n)=>{r=new ent(r,n),e=new rnt(e,n);let i,s,a,o,l;switch(t){case">":i=Kpe,s=int,a=Zpe,o=">",l=">=";break;case"<":i=Zpe,s=snt,a=Kpe,o="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(nnt(r,e,n))return!1;for(let u=0;u{b.semver===tnt&&(b=new Gpe(">=0.0.0")),h=h||b,m=m||b,i(b.semver,h.semver,n)?h=b:a(b.semver,m.semver,n)&&(m=b)}),h.operator===o||h.operator===l||(!m.operator||m.operator===o)&&s(r,m.semver))return!1;if(m.operator===l&&a(r,m.semver))return!1}return!0};const ant=nj;var ont=(r,e,t)=>ant(r,e,">",t);const cnt=nj;var lnt=(r,e,t)=>cnt(r,e,"<",t);const Jpe=xf();var unt=(r,e,t)=>(r=new Jpe(r,t),e=new Jpe(e,t),r.intersects(e,t));const fnt=dk,dnt=yf;var hnt=(r,e,t)=>{const n=[];let i=null,s=null;const a=r.sort((f,h)=>dnt(f,h,t));for(const f of a)fnt(f,e,t)?(s=f,i||(i=f)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const o=[];for(const[f,h]of n)f===h?o.push(f):!h&&f===a[0]?o.push("*"):h?f===a[0]?o.push(`<=${h}`):o.push(`${f} - ${h}`):o.push(`>=${f}`);const l=o.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{if(r===e)return!0;r=new Ype(r,t),e=new Ype(e,t);let n=!1;e:for(const i of r.set){for(const s of e.set){const a=gnt(i,s,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},mnt=[new ij(">=0.0.0-0")],Qpe=[new ij(">=0.0.0")],gnt=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===sj){if(e.length===1&&e[0].semver===sj)return!0;t.includePrerelease?r=mnt:r=Qpe}if(e.length===1&&e[0].semver===sj){if(t.includePrerelease)return!0;e=Qpe}const n=new Set;let i,s;for(const b of r)b.operator===">"||b.operator===">="?i=Xpe(i,b,t):b.operator==="<"||b.operator==="<="?s=e1e(s,b,t):n.add(b.semver);if(n.size>1)return null;let a;if(i&&s){if(a=aj(i.semver,s.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const b of n){if(i&&!n7(b,String(i),t)||s&&!n7(b,String(s),t))return null;for(const v of e)if(!n7(b,String(v),t))return!1;return!0}let o,l,u,f,h=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(const b of e){if(f=f||b.operator===">"||b.operator===">=",u=u||b.operator==="<"||b.operator==="<=",i){if(m&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===m.major&&b.semver.minor===m.minor&&b.semver.patch===m.patch&&(m=!1),b.operator===">"||b.operator===">="){if(o=Xpe(i,b,t),o===b&&o!==i)return!1}else if(i.operator===">="&&!n7(i.semver,String(b),t))return!1}if(s){if(h&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===h.major&&b.semver.minor===h.minor&&b.semver.patch===h.patch&&(h=!1),b.operator==="<"||b.operator==="<="){if(l=e1e(s,b,t),l===b&&l!==s)return!1}else if(s.operator==="<="&&!n7(s.semver,String(b),t))return!1}if(!b.operator&&(s||i)&&a!==0)return!1}return!(i&&u&&!s&&a!==0||s&&f&&!i&&a!==0||m||h)},Xpe=(r,e,t)=>{if(!r)return e;const n=aj(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},e1e=(r,e,t)=>{if(!r)return e;const n=aj(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};var bnt=pnt;const oj=r7,t1e=ik,vnt=Zo,r1e=Ppe,wnt=Gy,ynt=nrt,xnt=srt,_nt=art,Ent=ort,Cnt=lrt,Ant=frt,Snt=hrt,Int=mrt,Tnt=yf,knt=brt,Rnt=wrt,Mnt=JF,Pnt=xrt,Ont=Ert,Nnt=ck,Dnt=YF,$nt=jpe,Bnt=zpe,Lnt=QF,Unt=XF,Fnt=Hpe,jnt=Lrt,znt=fk(),Hnt=xf();var qnt={parse:wnt,valid:ynt,clean:xnt,inc:_nt,diff:Ent,major:Cnt,minor:Ant,patch:Snt,prerelease:Int,compare:Tnt,rcompare:knt,compareLoose:Rnt,compareBuild:Mnt,sort:Pnt,rsort:Ont,gt:Nnt,lt:Dnt,eq:$nt,neq:Bnt,gte:Lnt,lte:Unt,cmp:Fnt,coerce:jnt,Comparator:znt,Range:Hnt,satisfies:dk,toComparators:Hrt,maxSatisfying:Vrt,minSatisfying:Zrt,minVersion:Yrt,validRange:Xrt,outside:nj,gtr:ont,ltr:lnt,intersects:unt,simplifyRange:hnt,subset:bnt,SemVer:vnt,re:oj.re,src:oj.src,tokens:oj.t,SEMVER_SPEC_VERSION:t1e.SEMVER_SPEC_VERSION,RELEASE_TYPES:t1e.RELEASE_TYPES,compareIdentifiers:r1e.compareIdentifiers,rcompareIdentifiers:r1e.rcompareIdentifiers};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const e=qnt,t=qb,n=to;r.VersionStruct=(0,t.refine)((0,t.string)(),"Version",h=>(0,e.valid)(h)===null?`Expected SemVer version, got "${h}"`:!0),r.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",h=>(0,e.validRange)(h)===null?`Expected SemVer range, got "${h}"`:!0);function i(h){return(0,t.is)(h,r.VersionStruct)}r.isValidSemVerVersion=i;function s(h){return(0,t.is)(h,r.VersionRangeStruct)}r.isValidSemVerRange=s;function a(h){(0,n.assertStruct)(h,r.VersionStruct)}r.assertIsSemVerVersion=a;function o(h){(0,n.assertStruct)(h,r.VersionRangeStruct)}r.assertIsSemVerRange=o;function l(h,m){return(0,e.gt)(h,m)}r.gtVersion=l;function u(h,m){return(0,e.gtr)(h,m)}r.gtRange=u;function f(h,m){return(0,e.satisfies)(h,m,{includePrerelease:!0})}r.satisfiesVersionRange=f})(Tpe),function(r){var e=ut&&ut.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s);var o=Object.getOwnPropertyDescriptor(i,s);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,o)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),t=ut&&ut.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(to,r),t(Xx,r),t(Mn,r),t(rk,r),t(qd,r),t(Hy,r),t(ype,r),t(e7,r),t(xpe,r),t(_pe,r),t(qy,r),t(Cpe,r),t(Vd,r),t(Ape,r),t(Spe,r),t(Ipe,r),t(Tpe,r)}(J0e),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const e=J0e;Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),r.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")}(Z0e);var n1e=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ek,"__esModule",{value:!0}),ek.PollingBlockTracker=void 0;const Wnt=n1e(DF),Vnt=n1e(pet),Gnt=Zx,i1e=Z0e,s1e=(0,i1e.createModuleLogger)(i1e.projectLogger,"polling-block-tracker"),Knt=(0,Wnt.default)(),Znt=1e3;class Jnt extends Gnt.BaseBlockTracker{constructor(e={}){var t;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:(t=e.blockResetDuration)!==null&&t!==void 0?t:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*Znt,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const t=a1e(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await t}catch(t){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: +${(e=t.stack)!==null&&e!==void 0?e:t}`);try{this.emit("error",n)}catch{console.error(n)}const i=a1e(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:Knt(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),s1e("Making request",e);const t=await(0,Vnt.default)(n=>this._provider.sendAsync(e,n))();if(s1e("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block: +${t.error.message}`);return t.result}}ek.PollingBlockTracker=Jnt;function a1e(r,e){return new Promise(t=>{const n=setTimeout(t,r);n.unref&&e&&n.unref()})}var hk={},Ynt=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hk,"__esModule",{value:!0}),hk.SubscribeBlockTracker=void 0;const Qnt=Ynt(DF),Xnt=Zx,eit=(0,Qnt.default)();class tit extends Xnt.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...t){return new Promise((n,i)=>{this._provider.sendAsync({id:eit(),method:e,params:t,jsonrpc:"2.0"},(s,a)=>{s?i(s):n(a.result)})})}_handleSubData(e,t){var n;t.method==="eth_subscription"&&((n=t.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}hk.SubscribeBlockTracker=tit,function(r){var e=ut&&ut.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s),Object.defineProperty(n,a,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),t=ut&&ut.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(ek,r),t(hk,r)}(q0e);var cj={},pk={},i7={};Object.defineProperty(i7,"__esModule",{value:!0}),i7.getUniqueId=void 0;const o1e=4294967295;let lj=Math.floor(Math.random()*o1e);function rit(){return lj=(lj+1)%o1e,lj}i7.getUniqueId=rit,Object.defineProperty(pk,"__esModule",{value:!0}),pk.createIdRemapMiddleware=void 0;const nit=i7;function iit(){return(r,e,t,n)=>{const i=r.id,s=nit.getUniqueId();r.id=s,e.id=s,t(a=>{r.id=i,e.id=i,a()})}}pk.createIdRemapMiddleware=iit;var mk={};Object.defineProperty(mk,"__esModule",{value:!0}),mk.createAsyncMiddleware=void 0;function sit(r){return async(e,t,n,i)=>{let s;const a=new Promise(f=>{s=f});let o=null,l=!1;const u=async()=>{l=!0,n(f=>{o=f,s()}),await a};try{await r(e,t,u),l?(await a,o(null)):i(null)}catch(f){o?o(f):i(f)}}}mk.createAsyncMiddleware=sit;var gk={};Object.defineProperty(gk,"__esModule",{value:!0}),gk.createScaffoldMiddleware=void 0;function ait(r){return(e,t,n,i)=>{const s=r[e.method];return s===void 0?n():typeof s=="function"?s(e,t,n,i):(t.result=s,i())}}gk.createScaffoldMiddleware=ait;var s7={},uj={};Object.defineProperty(uj,"__esModule",{value:!0});const oit=Xn;function c1e(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function cit(r){const e=r.length,t=new Array(e);for(let n=0;n0&&([a]=t),a instanceof Error)throw a;const o=new Error(`Unhandled error.${a?` (${a.message})`:""}`);throw o.context=a,o}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")c1e(s,this,t);else{const a=s.length,o=cit(s);for(let l=0;l"u"&&(n=f1e()),fj(r,"",0,[],void 0,0,n);var i;try{Vb.length===0?i=JSON.stringify(r,e,t):i=JSON.stringify(r,h1e(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wb.length!==0;){var s=Wb.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Ky(r,e,t,n){var i=Object.getOwnPropertyDescriptor(n,t);i.get!==void 0?i.configurable?(Object.defineProperty(n,t,{value:r}),Wb.push([n,t,e,i])):Vb.push([e,t,r]):(n[t]=r,Wb.push([n,t,e]))}function fj(r,e,t,n,i,s,a){s+=1;var o;if(typeof r=="object"&&r!==null){for(o=0;oa.depthLimit){Ky(bk,r,e,i);return}if(typeof a.edgesLimit<"u"&&t+1>a.edgesLimit){Ky(bk,r,e,i);return}if(n.push(r),Array.isArray(r))for(o=0;oe?1:0}function d1e(r,e,t,n){typeof n>"u"&&(n=f1e());var i=dj(r,"",0,[],void 0,0,n)||r,s;try{Vb.length===0?s=JSON.stringify(i,e,t):s=JSON.stringify(i,h1e(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wb.length!==0;){var a=Wb.pop();a.length===4?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return s}function dj(r,e,t,n,i,s,a){s+=1;var o;if(typeof r=="object"&&r!==null){for(o=0;oa.depthLimit){Ky(bk,r,e,i);return}if(typeof a.edgesLimit<"u"&&t+1>a.edgesLimit){Ky(bk,r,e,i);return}if(n.push(r),Array.isArray(r))for(o=0;o0)for(var n=0;n=1e3&&r<=4999}function mit(r,e){if(e!=="[Circular]")return e}var hj={},im={};Object.defineProperty(im,"__esModule",{value:!0}),im.errorValues=im.errorCodes=void 0,im.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},im.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=im,t=nm,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:a(n)};r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function a(m,b=i){if(Number.isInteger(m)){const v=m.toString();if(h(e.errorValues,v))return e.errorValues[v].message;if(u(m))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return b}r.getMessageFromCode=a;function o(m){if(!Number.isInteger(m))return!1;const b=m.toString();return!!(e.errorValues[b]||u(m))}r.isValidCode=o;function l(m,{fallbackError:b=s,shouldIncludeStack:v=!1}={}){var C,R;if(!b||!Number.isInteger(b.code)||typeof b.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(m instanceof t.EthereumRpcError)return m.serialize();const k={};if(m&&typeof m=="object"&&!Array.isArray(m)&&h(m,"code")&&o(m.code)){const N=m;k.code=N.code,N.message&&typeof N.message=="string"?(k.message=N.message,h(N,"data")&&(k.data=N.data)):(k.message=a(k.code),k.data={originalError:f(m)})}else{k.code=b.code;const N=(C=m)===null||C===void 0?void 0:C.message;k.message=N&&typeof N=="string"?N:b.message,k.data={originalError:f(m)}}const P=(R=m)===null||R===void 0?void 0:R.stack;return v&&m&&P&&typeof P=="string"&&(k.stack=P),k}r.serializeError=l;function u(m){return m>=-32099&&m<=-32e3}function f(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function h(m,b){return Object.prototype.hasOwnProperty.call(m,b)}}(hj);var vk={};Object.defineProperty(vk,"__esModule",{value:!0}),vk.ethErrors=void 0;const pj=nm,m1e=hj,To=im;vk.ethErrors={rpc:{parse:r=>bu(To.errorCodes.rpc.parse,r),invalidRequest:r=>bu(To.errorCodes.rpc.invalidRequest,r),invalidParams:r=>bu(To.errorCodes.rpc.invalidParams,r),methodNotFound:r=>bu(To.errorCodes.rpc.methodNotFound,r),internal:r=>bu(To.errorCodes.rpc.internal,r),server:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=r;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return bu(e,r)},invalidInput:r=>bu(To.errorCodes.rpc.invalidInput,r),resourceNotFound:r=>bu(To.errorCodes.rpc.resourceNotFound,r),resourceUnavailable:r=>bu(To.errorCodes.rpc.resourceUnavailable,r),transactionRejected:r=>bu(To.errorCodes.rpc.transactionRejected,r),methodNotSupported:r=>bu(To.errorCodes.rpc.methodNotSupported,r),limitExceeded:r=>bu(To.errorCodes.rpc.limitExceeded,r)},provider:{userRejectedRequest:r=>o7(To.errorCodes.provider.userRejectedRequest,r),unauthorized:r=>o7(To.errorCodes.provider.unauthorized,r),unsupportedMethod:r=>o7(To.errorCodes.provider.unsupportedMethod,r),disconnected:r=>o7(To.errorCodes.provider.disconnected,r),chainDisconnected:r=>o7(To.errorCodes.provider.chainDisconnected,r),custom:r=>{if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:n}=r;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new pj.EthereumProviderError(e,t,n)}}};function bu(r,e){const[t,n]=g1e(e);return new pj.EthereumRpcError(r,t||m1e.getMessageFromCode(r),n)}function o7(r,e){const[t,n]=g1e(e);return new pj.EthereumProviderError(r,t||m1e.getMessageFromCode(r),n)}function g1e(r){if(r){if(typeof r=="string")return[r];if(typeof r=="object"&&!Array.isArray(r)){const{message:e,data:t}=r;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const e=nm;Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const t=hj;Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const n=vk;Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=im;Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(l1e);var git=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(s7,"__esModule",{value:!0}),s7.JsonRpcEngine=void 0;const bit=git(uj),vu=l1e;class D0 extends bit.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&typeof t!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,n,i)=>{try{const[s,a,o]=await D0._runAllMiddleware(e,t,this._middleware);return a?(await D0._runReturnHandlers(o),i(s)):n(async l=>{try{await D0._runReturnHandlers(o)}catch(u){return l(u)}return l()})}catch(s){return i(s)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(n){if(t)return t(n);throw n}}_promiseHandle(e){return new Promise(t=>{this._handle(e,(n,i)=>{t(i)})})}async _handle(e,t){if(!e||Array.isArray(e)||typeof e!="object"){const a=new vu.EthereumRpcError(vu.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return t(a,{id:void 0,jsonrpc:"2.0",error:a})}if(typeof e.method!="string"){const a=new vu.EthereumRpcError(vu.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return t(a,{id:e.id,jsonrpc:"2.0",error:a})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(a){s=a}return s&&(delete i.result,i.error||(i.error=vu.serializeError(s))),t(s,i)}async _processRequest(e,t){const[n,i,s]=await D0._runAllMiddleware(e,t,this._middleware);if(D0._checkForCompletion(e,t,i),await D0._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,t,n){const i=[];let s=null,a=!1;for(const o of n)if([s,a]=await D0._runMiddleware(e,t,o,i),a)break;return[s,a,i.reverse()]}static _runMiddleware(e,t,n,i){return new Promise(s=>{const a=l=>{const u=l||t.error;u&&(t.error=vu.serializeError(u)),s([u,!0])},o=l=>{t.error?a(t.error):(l&&(typeof l!="function"&&a(new vu.EthereumRpcError(vu.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof l}" for request: +${mj(e)}`,{request:e})),i.push(l)),s([null,!1]))};try{n(e,t,o,a)}catch(l){a(l)}})}static async _runReturnHandlers(e){for(const t of e)await new Promise((n,i)=>{t(s=>s?i(s):n())})}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new vu.EthereumRpcError(vu.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: +${mj(e)}`,{request:e});if(!n)throw new vu.EthereumRpcError(vu.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: +${mj(e)}`,{request:e})}}s7.JsonRpcEngine=D0;function mj(r){return JSON.stringify(r,null,2)}var wk={};Object.defineProperty(wk,"__esModule",{value:!0}),wk.mergeMiddleware=void 0;const vit=s7;function wit(r){const e=new vit.JsonRpcEngine;return r.forEach(t=>e.push(t)),e.asMiddleware()}wk.mergeMiddleware=wit,function(r){var e=ut&&ut.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s),Object.defineProperty(n,a,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),t=ut&&ut.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(r,"__esModule",{value:!0}),t(pk,r),t(mk,r),t(gk,r),t(i7,r),t(s7,r),t(wk,r)}(cj);var b1e={},gj={},bj=function(r,e){return bj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},bj(r,e)};function v1e(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");bj(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var yk=function(){return yk=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function x1e(r,e){return function(t,n){e(t,n,r)}}function yit(r,e,t,n,i,s){function a(k){if(k!==void 0&&typeof k!="function")throw new TypeError("Function expected");return k}for(var o=n.kind,l=o==="getter"?"get":o==="setter"?"set":"value",u=!e&&r?n.static?r:r.prototype:null,f=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h,m=!1,b=t.length-1;b>=0;b--){var v={};for(var C in n)v[C]=C==="access"?{}:n[C];for(var C in n.access)v.access[C]=n.access[C];v.addInitializer=function(k){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(k||null))};var R=(0,t[b])(o==="accessor"?{get:f.get,set:f.set}:f[l],v);if(o==="accessor"){if(R===void 0)continue;if(R===null||typeof R!="object")throw new TypeError("Object expected");(h=a(R.get))&&(f.get=h),(h=a(R.set))&&(f.set=h),(h=a(R.init))&&i.unshift(h)}else(h=a(R))&&(o==="field"?i.unshift(h):f[l]=h)}u&&Object.defineProperty(u,n.name,f),m=!0}function xit(r,e,t){for(var n=arguments.length>2,i=0;i0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vj(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return s}function S1e(){for(var r=[],e=0;e1||l(b,C)})},v&&(i[b]=v(i[b])))}function l(b,v){try{u(n[b](v))}catch(C){m(s[0][3],C)}}function u(b){b.value instanceof Zy?Promise.resolve(b.value.v).then(f,h):m(s[0][2],b)}function f(b){l("next",b)}function h(b){l("throw",b)}function m(b,v){b(v),s.shift(),s.length&&l(s[0][0],s[0][1])}}function R1e(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=r[i]?function(a){return(t=!t)?{value:Zy(r[i](a)),done:!1}:s?s(a):a}:s}}function M1e(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof _k=="function"?_k(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(a){return new Promise(function(o,l){a=r[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(u){s({value:u,done:o})},a)}}function P1e(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}var Cit=Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e};function O1e(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xk(e,r,t);return Cit(e,r),e}function N1e(r){return r&&r.__esModule?r:{default:r}}function D1e(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}function $1e(r,e,t,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(r,t):i?i.value=t:e.set(r,t),t}function B1e(r,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?e===r:r.has(e)}function L1e(r,e,t){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(t){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],t&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),r.stack.push({value:e,dispose:n,async:t})}else t&&r.stack.push({async:!0});return e}var Ait=typeof SuppressedError=="function"?SuppressedError:function(r,e,t){var n=new Error(t);return n.name="SuppressedError",n.error=r,n.suppressed=e,n};function U1e(r){function e(s){r.error=r.hasError?new Ait(s,r.error,"An error was suppressed during disposal."):s,r.hasError=!0}var t,n=0;function i(){for(;t=r.stack.pop();)try{if(!t.async&&n===1)return n=0,r.stack.push(t),Promise.resolve().then(i);if(t.dispose){var s=t.dispose.call(t.value);if(t.async)return n|=2,Promise.resolve(s).then(i,function(a){return e(a),i()})}else n|=1}catch(a){e(a)}if(n===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return i()}const wj=Mh(Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:L1e,get __assign(){return yk},__asyncDelegator:R1e,__asyncGenerator:k1e,__asyncValues:M1e,__await:Zy,__awaiter:E1e,__classPrivateFieldGet:D1e,__classPrivateFieldIn:B1e,__classPrivateFieldSet:$1e,__createBinding:xk,__decorate:y1e,__disposeResources:U1e,__esDecorate:yit,__exportStar:A1e,__extends:v1e,__generator:C1e,__importDefault:N1e,__importStar:O1e,__makeTemplateObject:P1e,__metadata:_1e,__param:x1e,__propKey:_it,__read:vj,__rest:w1e,__runInitializers:xit,__setFunctionName:Eit,__spread:S1e,__spreadArray:T1e,__spreadArrays:I1e,__values:_k,default:{__extends:v1e,__assign:yk,__rest:w1e,__decorate:y1e,__param:x1e,__metadata:_1e,__awaiter:E1e,__generator:C1e,__createBinding:xk,__exportStar:A1e,__values:_k,__read:vj,__spread:S1e,__spreadArrays:I1e,__spreadArray:T1e,__await:Zy,__asyncGenerator:k1e,__asyncDelegator:R1e,__asyncValues:M1e,__makeTemplateObject:P1e,__importStar:O1e,__importDefault:N1e,__classPrivateFieldGet:D1e,__classPrivateFieldSet:$1e,__classPrivateFieldIn:B1e,__addDisposableResource:L1e,__disposeResources:U1e}},Symbol.toStringTag,{value:"Module"})));var Ek={};Object.defineProperty(Ek,"__esModule",{value:!0});var F1e=wj,Sit=function(){function r(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return r.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return t||this._dispatch(),n},r.prototype.runExclusive=function(e){return F1e.__awaiter(this,void 0,void 0,function(){var t,n,i;return F1e.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:t=s.sent(),n=t[0],i=t[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},r.prototype.isLocked=function(){return this._value<=0},r.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},r.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},r}();Ek.default=Sit,Object.defineProperty(gj,"__esModule",{value:!0});var j1e=wj,Iit=Ek,Tit=function(){function r(){this._semaphore=new Iit.default(1)}return r.prototype.acquire=function(){return j1e.__awaiter(this,void 0,void 0,function(){var e,t;return j1e.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),t=e[1],[2,t]}})})},r.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},r.prototype.isLocked=function(){return this._semaphore.isLocked()},r.prototype.release=function(){this._semaphore.release()},r}();gj.default=Tit;var Ck={};Object.defineProperty(Ck,"__esModule",{value:!0}),Ck.withTimeout=void 0;var Ak=wj;function kit(r,e,t){var n=this;return t===void 0&&(t=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return Ak.__awaiter(n,void 0,void 0,function(){var a,o,l;return Ak.__generator(this,function(u){switch(u.label){case 0:return a=!1,setTimeout(function(){a=!0,s(t)},e),[4,r.acquire()];case 1:return o=u.sent(),a?(l=Array.isArray(o)?o[1]:o,l()):i(o),[2]}})})})},runExclusive:function(i){return Ak.__awaiter(this,void 0,void 0,function(){var s,a;return Ak.__generator(this,function(o){switch(o.label){case 0:s=function(){},o.label=1;case 1:return o.trys.push([1,,7,8]),[4,this.acquire()];case 2:return a=o.sent(),Array.isArray(a)?(s=a[1],[4,i(a[0])]):[3,4];case 3:return[2,o.sent()];case 4:return s=a,[4,i()];case 5:return[2,o.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){r.release()},isLocked:function(){return r.isLocked()}}}Ck.withTimeout=kit,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.withTimeout=r.Semaphore=r.Mutex=void 0;var e=gj;Object.defineProperty(r,"Mutex",{enumerable:!0,get:function(){return e.default}});var t=Ek;Object.defineProperty(r,"Semaphore",{enumerable:!0,get:function(){return t.default}});var n=Ck;Object.defineProperty(r,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})}(b1e);var Rit=Pit,Mit=Object.prototype.hasOwnProperty;function Pit(){for(var r={},e=0;efunction(...i){const s=e.promiseModule;return new s((a,o)=>{e.multiArgs?i.push((...u)=>{e.errorFirst?u[0]?o(u):(u.shift(),a(u)):a(u)}):e.errorFirst?i.push((u,f)=>{u?o(u):a(f)}):i.push(a),Reflect.apply(r,this===t?n:this,i)})},H1e=new WeakMap;var Bit=(r,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const t=typeof r;if(!(r!==null&&(t==="object"||t==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${r===null?"null":t}\``);const n=(a,o)=>{let l=H1e.get(a);if(l||(l={},H1e.set(a,l)),o in l)return l[o];const u=v=>typeof v=="string"||typeof o=="symbol"?o===v:v.test(o),f=Reflect.getOwnPropertyDescriptor(a,o),h=f===void 0||f.writable||f.configurable,b=(e.include?e.include.some(u):!e.exclude.some(u))&&h;return l[o]=b,b},i=new WeakMap,s=new Proxy(r,{apply(a,o,l){const u=i.get(a);if(u)return Reflect.apply(u,o,l);const f=e.excludeMain?a:z1e(a,e,s,a);return i.set(a,f),Reflect.apply(f,o,l)},get(a,o){const l=a[o];if(!n(a,o)||l===Function.prototype[o])return l;const u=i.get(l);if(u)return u;if(typeof l=="function"){const f=z1e(l,e,s,a);return i.set(l,f),f}return l}});return s};const Lit=Jx.default;var yj=class extends Lit{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(t=>this.emit("update",t))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}};const Uit=yj;var Fit=class extends Uit{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}},l7={minBlockRef:jit,maxBlockRef:zit,sortBlockRefs:xj,bnToHex:Hit,blockRefIsNumber:qit,hexToInt:Sk,incrementHexInt:Wit,intToHex:q1e,unsafeRandomBytes:Vit};function jit(...r){return xj(r)[0]}function zit(...r){const e=xj(r);return e[e.length-1]}function xj(r){return r.sort((e,t)=>e==="latest"||t==="earliest"?1:t==="latest"||e==="earliest"?-1:Sk(e)-Sk(t))}function Hit(r){return"0x"+r.toString(16)}function qit(r){return r&&!["earliest","latest","pending"].includes(r)}function Sk(r){return r==null?r:Number.parseInt(r,16)}function Wit(r){if(r==null)return r;const e=Sk(r);return q1e(e+1)}function q1e(r){if(r==null)return r;let e=r.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function Vit(r){let e="0x";for(let t=0;tn.toLowerCase()))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),t==="earliest"&&(t="0x0"),this.params.fromBlock=t;const n=Yit(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:t}){const n=t;let i;e?i=Jit(e):i=t;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),o=(await this._fetchLogs(s)).filter(l=>this.matchLog(l));this.addResults(o)}async _fetchLogs(e){return await Kit(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(Ik(this.params.fromBlock)>=Ik(e.blockNumber)||Qit(this.params.toBlock)&&Ik(this.params.toBlock)<=Ik(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();return this.params.address&&t&&!this.params.address.includes(t)?!1:this.params.topics.every((i,s)=>{let a=e.topics[s];if(!a)return!1;a=a.toLowerCase();let o=Array.isArray(i)?i:[i];return o.includes(null)?!0:(o=o.map(f=>f.toLowerCase()),o.includes(a))})}},_j=est;async function est({provider:r,fromBlock:e,toBlock:t}){e||(e=t);const n=V1e(e),s=V1e(t)-n+1,a=Array(s).fill().map((l,u)=>n+u).map(tst);let o=await Promise.all(a.map(l=>nst(r,"eth_getBlockByNumber",[l,!1])));return o=o.filter(l=>l!==null),o}function V1e(r){return r==null?r:Number.parseInt(r,16)}function tst(r){return r==null?r:"0x"+r.toString(16)}function rst(r,e){return new Promise((t,n)=>{r.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?t(s.result):n(new Error("Result was empty"))})})}async function nst(r,e,t){for(let n=0;n<3;n++)try{return await rst(r,{id:1,jsonrpc:"2.0",method:e,params:t})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}const ist=yj,sst=_j,{incrementHexInt:ast}=l7;var ost=class extends ist{constructor({provider:e,params:t}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){const n=t,i=ast(e),a=(await sst({provider:this.provider,fromBlock:i,toBlock:n})).map(o=>o.hash);this.addResults(a)}};const cst=yj,lst=_j,{incrementHexInt:ust}=l7;var fst=class extends cst{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const t=e,n=ust(e),i=await lst({provider:this.provider,fromBlock:n,toBlock:t}),s=[];for(const a of i)s.push(...a.transactions);this.addResults(s)}};const dst=b1e.Mutex,{createAsyncMiddleware:hst,createScaffoldMiddleware:pst}=cj,mst=Xit,gst=ost,bst=fst,{intToHex:G1e,hexToInt:Ej}=l7;var vst=wst;function wst({blockTracker:r,provider:e}){let t=0,n={};const i=new dst,s=yst({mutex:i}),a=pst({eth_newFilter:s(Cj(l)),eth_newBlockFilter:s(Cj(u)),eth_newPendingTransactionFilter:s(Cj(f)),eth_uninstallFilter:s(Tk(b)),eth_getFilterChanges:s(Tk(h)),eth_getFilterLogs:s(Tk(m))}),o=async({oldBlock:P,newBlock:N})=>{if(n.length===0)return;const $=await i.acquire();try{await Promise.all(Jy(n).map(async j=>{try{await j.update({oldBlock:P,newBlock:N})}catch(G){console.error(G)}}))}catch(j){console.error(j)}$()};return a.newLogFilter=l,a.newBlockFilter=u,a.newPendingTransactionFilter=f,a.uninstallFilter=b,a.getFilterChanges=h,a.getFilterLogs=m,a.destroy=()=>{R()},a;async function l(P){const N=new mst({provider:e,params:P});return await v(N),N}async function u(){const P=new gst({provider:e});return await v(P),P}async function f(){const P=new bst({provider:e});return await v(P),P}async function h(P){const N=Ej(P),$=n[N];if(!$)throw new Error(`No filter for index "${N}"`);return $.getChangesAndClear()}async function m(P){const N=Ej(P),$=n[N];if(!$)throw new Error(`No filter for index "${N}"`);let j=[];return $.type==="log"&&(j=$.getAllResults()),j}async function b(P){const N=Ej(P),j=!!n[N];return j&&await C(N),j}async function v(P){const N=Jy(n).length,$=await r.getLatestBlock();await P.initialize({currentBlock:$}),t++,n[t]=P,P.id=t,P.idHex=G1e(t);const j=Jy(n).length;return k({prevFilterCount:N,newFilterCount:j}),t}async function C(P){const N=Jy(n).length;delete n[P];const $=Jy(n).length;k({prevFilterCount:N,newFilterCount:$})}async function R(){const P=Jy(n).length;n={},k({prevFilterCount:P,newFilterCount:0})}function k({prevFilterCount:P,newFilterCount:N}){if(P===0&&N>0){r.on("sync",o);return}if(P>0&&N===0){r.removeListener("sync",o);return}}}function Cj(r){return Tk(async(...e)=>{const t=await r(...e);return G1e(t.id)})}function Tk(r){return hst(async(e,t)=>{const n=await r.apply(null,e.params);t.result=n})}function yst({mutex:r}){return e=>async(t,n,i,s)=>{(await r.acquire())(),e(t,n,i,s)}}function Jy(r,e){const t=[];for(let n in r)t.push(r[n]);return t}const xst=Jx.default,{createAsyncMiddleware:K1e,createScaffoldMiddleware:_st}=cj,Est=vst,{unsafeRandomBytes:Cst,incrementHexInt:Ast}=l7,Sst=_j;var Ist=Tst;function Tst({blockTracker:r,provider:e}){const t={},n=Est({blockTracker:r,provider:e});let i=!1;const s=new xst,a=_st({eth_subscribe:K1e(o),eth_unsubscribe:K1e(l)});return a.destroy=f,{events:s,middleware:a};async function o(h,m){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const b=h.params[0],v=Cst(16);let C;switch(b){case"newHeads":C=R({subId:v});break;case"logs":const P=h.params[1],N=await n.newLogFilter(P);C=k({subId:v,filter:N});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${b}"`)}t[v]=C,m.result=v;return;function R({subId:P}){const N={type:b,destroy:async()=>{r.removeListener("sync",N.update)},update:async({oldBlock:$,newBlock:j})=>{const G=j,U=Ast($);(await Sst({provider:e,fromBlock:U,toBlock:G})).map(kst).filter(te=>te!==null).forEach(te=>{u(P,te)})}};return r.on("sync",N.update),N}function k({subId:P,filter:N}){return N.on("update",j=>u(P,j)),{type:b,destroy:async()=>await n.uninstallFilter(N.idHex)}}}async function l(h,m){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const b=h.params[0],v=t[b];if(!v){m.result=!1;return}delete t[b],await v.destroy(),m.result=!0}function u(h,m){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:h,result:m}})}function f(){s.removeAllListeners();for(const h in t)t[h].destroy(),delete t[h];i=!0}}function kst(r){return r==null?null:{hash:r.hash,parentHash:r.parentHash,sha3Uncles:r.sha3Uncles,miner:r.miner,stateRoot:r.stateRoot,transactionsRoot:r.transactionsRoot,receiptsRoot:r.receiptsRoot,logsBloom:r.logsBloom,difficulty:r.difficulty,number:r.number,gasLimit:r.gasLimit,gasUsed:r.gasUsed,nonce:r.nonce,mixHash:r.mixHash,timestamp:r.timestamp,extraData:r.extraData}}Object.defineProperty(XT,"__esModule",{value:!0}),XT.SubscriptionManager=void 0;const Rst=q0e,Mst=Ist,Z1e=()=>{};class Pst{constructor(e){const t=new Rst.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=Mst({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,Z1e,Z1e),t}destroy(){this.subscriptionMiddleware.destroy()}}XT.SubscriptionManager=Pst;var J1e=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_y,"__esModule",{value:!0}),_y.CoinbaseWalletProvider=void 0;const Ost=J1e(Ix),Nst=R5e,Pn=Tx,on=vr,Dst=Px,Y1e=pu,kk=Cy,ul=yy,Aj=J1e(cet),u7=Ey,$st=Uy,Bst=XT,Q1e="DefaultChainId",X1e="DefaultJsonRpcUrl";class Lst extends Nst.EventEmitter{constructor(e){var t,n;super(),this._filterPolyfill=new $st.FilterPolyfill(this),this._subscriptionManager=new Bst.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(t=e.overrideIsCoinbaseWallet)!==null&&t!==void 0?t:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;const i=this.getChainId(),s=(0,on.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const a=this._storage.getItem(Y1e.LOCAL_STORAGE_ADDRESSES_KEY);if(a){const o=a.split(" ");o[0]!==""&&(this._addresses=o.map(l=>(0,on.ensureAddressString)(l)),this.emit("accountsChanged",o))}this._subscriptionManager.events.on("notification",o=>{this.emit("message",{type:o.method,data:o.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",o=>{var l;if(!(o.origin!==location.origin||o.source!==window)&&o.data.type==="walletLinkMessage"&&o.data.data.action==="dappChainSwitched"){const u=o.data.data.chainId,f=(l=o.data.data.jsonRpcUrl)!==null&&l!==void 0?l:this.jsonRpcUrl;this.updateProviderInfo(f,Number(u))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,on.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(X1e))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(X1e,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,t){this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,t){this.jsonRpcUrl=e;const n=this.getChainId();this._storage.setItem(Q1e,t.toString(10)),((0,on.ensureIntNumber)(t)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,i,s,a){const l=await(await this.initializeRelay()).watchAsset(e,t,n,i,s,a==null?void 0:a.toString()).promise;return(0,ul.isErrorResponse)(l)?!1:!!l.result}async addEthereumChain(e,t,n,i,s,a){var o,l;if((0,on.ensureIntNumber)(e)===this.getChainId())return!1;const u=await this.initializeRelay(),f=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!f&&await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(e.toString(),t,s,n,i,a).promise;return(0,ul.isErrorResponse)(h)?!1:(((o=h.result)===null||o===void 0?void 0:o.isApproved)===!0&&this.updateProviderInfo(t[0],e),((l=h.result)===null||l===void 0?void 0:l.isApproved)===!0)}async switchEthereumChain(e){const n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,ul.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===Pn.standardErrorCodes.provider.unsupportedChain?Pn.standardErrors.provider.unsupportedChain():Pn.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,t){this.initializeRelay().then(n=>n.setAppInfo(e,t))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(u7.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?kk.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){try{const n=this._send(e,t);if(n instanceof Promise)return n.catch(i=>{throw(0,Pn.serializeError)(i,e)})}catch(n){throw(0,Pn.serializeError)(n,e)}}_send(e,t){if(typeof e=="string"){const i=e,s=Array.isArray(t)?t:t!==void 0?[t]:[],a={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(a).then(o=>o.result)}if(typeof t=="function"){const i=e,s=t;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));const n=e;return this._sendRequest(n)}async sendAsync(e,t){try{return this._sendAsync(e,t).catch(n=>{throw(0,Pn.serializeError)(n,e)})}catch(n){return Promise.reject((0,Pn.serializeError)(n,e))}}async _sendAsync(e,t){if(typeof t!="function")throw new Error("callback is required");if(Array.isArray(e)){const i=t;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}const n=t;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(t=>{throw(0,Pn.serializeError)(t,e.method)})}catch(t){return Promise.reject((0,Pn.serializeError)(t,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw Pn.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw Pn.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw Pn.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){const n=await(await this.initializeRelay()).scanQRCode((0,on.ensureRegExpString)(e)).promise;if((0,ul.isErrorResponse)(n))throw(0,Pn.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,Pn.serializeError)("result was not a string","scanQRCode");return n.result}async genericRequest(e,t){const i=await(await this.initializeRelay()).genericRequest(e,t).promise;if((0,ul.isErrorResponse)(i))throw(0,Pn.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,Pn.serializeError)("result was not a string","generic");return i.result}async connectAndSignIn(e){var t;(t=this.diagnostic)===null||t===void 0||t.log(u7.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?kk.Session.hash(this._relay.session.id):void 0});let n;try{const s=await this.initializeRelay();if(!(s instanceof Dst.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=await s.connectAndSignIn(e).promise,(0,ul.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Pn.standardErrors.provider.userRejectedRequest("User denied account authorization"):s}if(!n.result)throw new Error("accounts received is empty");const{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(e){const n=await(await this.initializeRelay()).selectProvider(e).promise;if((0,ul.isErrorResponse)(n))throw(0,Pn.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,Pn.serializeError)("result was not a string","selectProvider");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;if(t.result=this._handleSynchronousMethods(e),t.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return t}_setAddresses(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");const n=e.map(i=>(0,on.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(Y1e.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return t({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(o=>t(Object.assign(Object.assign({},o),{id:e.id}))).catch(o=>n(o));return}const a=this._handleSubscriptionMethods(e);if(a!==void 0){a.then(o=>t({jsonrpc:"2.0",id:e.id,result:o.result})).catch(o=>n(o));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&t(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(t=>this._sendRequestAsync(t)))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(s=>{var a;throw(s.code===Pn.standardErrorCodes.rpc.methodNotFound||s.code===Pn.standardErrorCodes.rpc.methodNotSupported)&&((a=this.diagnostic)===null||a===void 0||a.log(u7.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?kk.Session.hash(this._relay.session.id):void 0})),s})}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,on.ensureAddressString)(e);return this._addresses.map(i=>(0,on.ensureAddressString)(i)).includes(t)}catch{}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw(t=this.diagnostic)===null||t===void 0||t.log(u7.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,on.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const n=e.to?(0,on.ensureAddressString)(e.to):null,i=e.value!=null?(0,on.ensureBN)(e.value):new Ost.default(0),s=e.data?(0,on.ensureBuffer)(e.data):It.alloc(0),a=e.nonce!=null?(0,on.ensureIntNumber)(e.nonce):null,o=e.gasPrice!=null?(0,on.ensureBN)(e.gasPrice):null,l=e.maxFeePerGas!=null?(0,on.ensureBN)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,on.ensureBN)(e.maxPriorityFeePerGas):null,f=e.gas!=null?(0,on.ensureBN)(e.gas):null,h=e.chainId?(0,on.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:t,toAddress:n,weiValue:i,data:s,nonce:a,gasPriceInWei:o,maxFeePerGas:l,maxPriorityFeePerGas:u,gasLimit:f,chainId:h}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw Pn.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw Pn.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const a=await(await this.initializeRelay()).signEthereumMessage(e,t,n,i).promise;if((0,ul.isErrorResponse)(a))throw new Error(a.errorMessage);return{jsonrpc:"2.0",id:0,result:a.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Pn.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,t,n){const s=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,t,n).promise;if((0,ul.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,on.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(Q1e);if(!e)return(0,on.ensureIntNumber)(this._chainIdFromOpts);const t=parseInt(e,10);return(0,on.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(u7.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?kk.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{if(t=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,ul.isErrorResponse)(t))throw new Error(t.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Pn.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,on.ensureAddressString)(e[0]),n=(0,on.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,on.ensureBuffer)(e[0]),n=(0,on.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,on.ensureBuffer)(e[0]),n=(0,on.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,on.ensureBuffer)(e[0]),n=(0,on.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signEthereumTransaction(t).promise;if((0,ul.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Pn.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const t=(0,on.ensureBuffer)(e[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(t,this.getChainId()).promise;if((0,ul.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(t).promise;if((0,ul.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Pn.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,on.ensureParsedJSONObject)(e[0]),n=(0,on.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=Aj.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,on.ensureAddressString)(e[0]),n=(0,on.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=Aj.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,on.ensureAddressString)(e[0]),n=(0,on.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=Aj.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _cbwallet_arbitrary(e){const t=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof t!="object"||t===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,n)}}async _wallet_addEthereumChain(e){var t,n,i,s;const a=e[0];if(((t=a.rpcUrls)===null||t===void 0?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!a.chainName||a.chainName.trim()==="")throw Pn.standardErrors.rpc.invalidParams("chainName is a required field");if(!a.nativeCurrency)throw Pn.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(a.chainId,16);return await this.addEthereumChain(o,(n=a.rpcUrls)!==null&&n!==void 0?n:[],(i=a.blockExplorerUrls)!==null&&i!==void 0?i:[],a.chainName,(s=a.iconUrls)!==null&&s!==void 0?s:[],a.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw Pn.standardErrors.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw Pn.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw Pn.standardErrors.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw Pn.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:a,decimals:o}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,i,s,o,a,n)}}_eth_uninstallFilter(e){const t=(0,on.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const t=(0,on.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,on.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((t,n)=>this._setAddresses(t,n)),e.setChainCallback((t,n)=>{this.updateProviderInfo(n,parseInt(t,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}}_y.CoinbaseWalletProvider=Lst;var Rk={};Object.defineProperty(Rk,"__esModule",{value:!0}),Rk.RelayEventManager=void 0;const Ust=vr;class Fst{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,Ust.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}Rk.RelayEventManager=Fst,Object.defineProperty(Sx,"__esModule",{value:!0}),Sx.CoinbaseWalletSDK=void 0;const jst=dT,zst=hT,eme=vr,Hst=vT,qst=_y,Wst=Px,Vst=Vx,Gst=Rk,Kst=Lx,Zst=Ox,tme=xy;class Mk{constructor(e){var t,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||zst.LINK_API_URL;typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(t=e.overrideIsCoinbaseWallet)!==null&&t!==void 0?t:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const a=new URL(s),o=`${a.protocol}//${a.host}`;if(this._storage=new Hst.ScopedLocalStorage(`-walletlink:${o}`),this._storage.setItem("version",Mk.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new Gst.RelayEventManager;const l=(0,eme.isMobileWeb)(),u=e.uiConstructor||(h=>l?new Vst.MobileRelayUI(h):new Kst.WalletLinkRelayUI(h)),f={linkAPIUrl:s,version:tme.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=l?new Wst.MobileRelay(f):new Zst.WalletLinkRelay(f),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",t=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new qst.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,eme.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const t=this===null||this===void 0?void 0:this.walletExtension;t?t.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,t;return(t=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&t!==void 0?t:null}getCoinbaseWalletLogo(e,t=240){return(0,jst.walletLogo)(e,t)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{const n=(e=window.ethereum)!==null&&e!==void 0?e:(t=window.top)===null||t===void 0?void 0:t.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}}Sx.CoinbaseWalletSDK=Mk,Mk.VERSION=tme.LIB_VERSION,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CoinbaseWalletProvider=r.CoinbaseWalletSDK=void 0;const e=Sx,t=_y;var n=Sx;Object.defineProperty(r,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=_y;Object.defineProperty(r,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),r.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=t.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=t.CoinbaseWalletProvider)}(Mde);function Jst(r){const{enableEIP6963:e=!0,enableInjected:t=!0,enableCoinbase:n=!0,enableEmail:i=!1,metadata:s,rpcUrl:a,defaultChainId:o}=r;let l,u;const f={metadata:s};function h(){if(l)return l;if(!(typeof window>"u")&&window.ethereum)return l=window.ethereum,l}function m(){return u||(typeof window>"u"?void 0:(u=new Mde.CoinbaseWalletSDK({appName:s.name,appLogoUrl:s.icons[0],darkMode:!1,enableMobileWalletLink:!0}).makeWeb3Provider(a,o),u))}return t&&(f.injected=h()),n&&a&&o&&(f.coinbase=m()),e&&(f.EIP6963=!0),i&&(f.email=!0),f}function Yst(r){return new uJe({...r,_sdkVersion:`html-ethers-${Zt.VERSION}`})}const Qst=lS.getAll().map(r=>({chainId:r.id,name:r.name??r.nativeCurrency.symbol,currency:r.nativeCurrency.symbol,explorerUrl:r.explorerUrl,rpcUrl:r.rpcUrl})).filter(r=>r);let Sj,Oa,rme,nme;const Xst=r=>{if(Oa!==void 0)return Oa;const e=Jst({metadata:r.metadata});return Oa=Yst({chains:Qst,ethersConfig:e,projectId:r.projectId,themeMode:r.themeMode,allowUnsupportedChain:!0,customWallets:r.customWallets,themeVariables:r.themeVariables}),r.events!==void 0&&r.events.forEach(t=>{Oa==null||Oa.subscribeEvents(n=>{t(n,Oa)})}),Oa.subscribeProvider(async({provider:t,chainId:n})=>{t!==void 0&&(Sj.chainId!==n&&await(Oa==null?void 0:Oa.switchNetwork(Sj.chainId).catch(()=>{rme(new Error(Or.WALLET_CONNECT_REJECTED))})),nme(t))}),Oa},eat={id:"web3wallets",name:"Web3 Wallets",icon:v1.web3wallets,platforms:[za.UNIVERSAL],isDetected:()=>!0,isConnected:()=>Oa===void 0?!1:Oa.getIsConnected(),disconnect:async()=>{Object.keys(localStorage).filter(r=>r.startsWith("wc@2")||r.startsWith("@w3m")||r.startsWith("W3M")||r.startsWith("-walletlink")).forEach(r=>{localStorage.removeItem(r)}),(Oa==null?void 0:Oa.disconnect)!==void 0&&await Oa.disconnect()},connect:async(r,e)=>{const t=e;if(r===void 0)throw new Error(Or.PROVIDER_IS_REQUIRED);if(t===void 0)throw new Error(Or.CONFIG_IS_REQUIRED);if(t.projectId===void 0)throw new Error(Or.PROJECT_ID_IS_REQUIRED);if(t.metadata===void 0)throw new Error(Or.METADATA_IS_REQUIRED);const n=r.network;return Sj={chainId:n.id,name:n.name??n.nativeCurrency.symbol,currency:n.nativeCurrency.symbol,explorerUrl:n.explorerUrl,rpcUrl:n.rpcUrl},await new Promise((i,s)=>{try{const a=Xst(t);rme=async o=>{await a.disconnect(),s(o)},nme=i,a.open({view:"Connect"})}catch(a){s(a)}})}},tat={id:"bitgetwallet",name:"BitgetWallet",icon:v1.bitgetWallet,downloadLink:"https://web3.bitget.com/en/wallet-download?type=3",platforms:[za.BROWSER,za.MOBILE],createDeepLink:r=>`https://bkcode.vip?action=dapp&url=${r}`,isDetected:()=>{var r;return!!((r=window==null?void 0:window.bitkeep)!=null&&r.ethereum)},isConnected:async()=>{var r,e;return!!(await((e=(r=window==null?void 0:window.bitkeep)==null?void 0:r.ethereum)==null?void 0:e.request({method:"eth_accounts"}))).length},connect:async r=>await new Promise((e,t)=>{var i;const n=(i=window==null?void 0:window.bitkeep)==null?void 0:i.ethereum;try{n==null||n.request({method:"eth_requestAccounts"}).then(()=>{g3(n,r).then(()=>{e(n)}).catch(s=>{t(s)})}).catch(s=>{t(s)})}catch(s){t(s)}})};var ime={exports:{}};(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof vt=="object"&&vt.versions&&vt.versions.node;a?i=ut:s&&(i=self);var o=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],h=[4,1024,262144,67108864],m=[1,256,65536,16777216],b=[6,1536,393216,100663296],v=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],R=[224,256,384,512],k=[128,256],P=["hex","buffer","arrayBuffer","array","digest"],N={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(W){return Object.prototype.toString.call(W)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(W){return typeof W=="object"&&W.buffer&&W.buffer.constructor===ArrayBuffer});for(var $=function(W,Z,K){return function(ee){return new A(W,Z,W).update(ee)[K]()}},j=function(W,Z,K){return function(ee,re){return new A(W,Z,re).update(ee)[K]()}},G=function(W,Z,K){return function(ee,re,H,F){return p["cshake"+W].update(ee,re,H,F)[K]()}},U=function(W,Z,K){return function(ee,re,H,F){return p["kmac"+W].update(ee,re,H,F)[K]()}},L=function(W,Z,K,ee){for(var re=0;re>5,this.byteCount=this.blockCount<<2,this.outputBlocks=K>>5,this.extraBytes=(K&31)>>3;for(var ee=0;ee<50;++ee)this.s[ee]=0}A.prototype.update=function(W){if(this.finalized)throw new Error(t);var Z,K=typeof W;if(K!=="string"){if(K==="object"){if(W===null)throw new Error(e);if(l&&W.constructor===ArrayBuffer)W=new Uint8Array(W);else if(!Array.isArray(W)&&(!l||!ArrayBuffer.isView(W)))throw new Error(e)}else throw new Error(e);Z=!0}for(var ee=this.blocks,re=this.byteCount,H=W.length,F=this.blockCount,q=0,fe=this.s,pe,Ee;q>2]|=W[q]<>2]|=Ee<>2]|=(192|Ee>>6)<>2]|=(128|Ee&63)<=57344?(ee[pe>>2]|=(224|Ee>>12)<>2]|=(128|Ee>>6&63)<>2]|=(128|Ee&63)<>2]|=(240|Ee>>18)<>2]|=(128|Ee>>12&63)<>2]|=(128|Ee>>6&63)<>2]|=(128|Ee&63)<=re){for(this.start=pe-re,this.block=ee[F],pe=0;pe>8,K=W&255;K>0;)re.unshift(K),W=W>>8,K=W&255,++ee;return Z?re.push(ee):re.unshift(ee),this.update(re),re.length},A.prototype.encodeString=function(W){var Z,K=typeof W;if(K!=="string"){if(K==="object"){if(W===null)throw new Error(e);if(l&&W.constructor===ArrayBuffer)W=new Uint8Array(W);else if(!Array.isArray(W)&&(!l||!ArrayBuffer.isView(W)))throw new Error(e)}else throw new Error(e);Z=!0}var ee=0,re=W.length;if(Z)ee=re;else for(var H=0;H=57344?ee+=3:(F=65536+((F&1023)<<10|W.charCodeAt(++H)&1023),ee+=4)}return ee+=this.encode(ee*8),this.update(W),ee},A.prototype.bytepad=function(W,Z){for(var K=this.encode(Z),ee=0;ee>2]|=this.padding[Z&3],this.lastByteIndex===this.byteCount)for(W[0]=W[K],Z=1;Z>4&15]+u[q&15]+u[q>>12&15]+u[q>>8&15]+u[q>>20&15]+u[q>>16&15]+u[q>>28&15]+u[q>>24&15];H%W===0&&(ae(Z),re=0)}return ee&&(q=Z[re],F+=u[q>>4&15]+u[q&15],ee>1&&(F+=u[q>>12&15]+u[q>>8&15]),ee>2&&(F+=u[q>>20&15]+u[q>>16&15])),F},A.prototype.arrayBuffer=function(){this.finalize();var W=this.blockCount,Z=this.s,K=this.outputBlocks,ee=this.extraBytes,re=0,H=0,F=this.outputBits>>3,q;ee?q=new ArrayBuffer(K+1<<2):q=new ArrayBuffer(F);for(var fe=new Uint32Array(q);H>8&255,F[q+2]=fe>>16&255,F[q+3]=fe>>24&255;H%W===0&&ae(Z)}return ee&&(q=H<<2,fe=Z[re],F[q]=fe&255,ee>1&&(F[q+1]=fe>>8&255),ee>2&&(F[q+2]=fe>>16&255)),F};function B(W,Z,K){A.call(this,W,Z,K)}B.prototype=new A,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var ae=function(W){var Z,K,ee,re,H,F,q,fe,pe,Ee,Me,Oe,je,Re,Qe,Ne,Je,Xe,Le,Ge,et,Be,Ke,pt,ne,Y,X,ue,we,Ce,Te,lt,Ct,We,At,xt,dt,Lt,Ot,st,Ut,Nt,tt,qt,Wt,rt,Vt,Dt,at,Ft,Rt,ot,Gt,wr,wt,yr,Xt,hr,ri,ni,ii,si,wn;for(ee=0;ee<48;ee+=2)re=W[0]^W[10]^W[20]^W[30]^W[40],H=W[1]^W[11]^W[21]^W[31]^W[41],F=W[2]^W[12]^W[22]^W[32]^W[42],q=W[3]^W[13]^W[23]^W[33]^W[43],fe=W[4]^W[14]^W[24]^W[34]^W[44],pe=W[5]^W[15]^W[25]^W[35]^W[45],Ee=W[6]^W[16]^W[26]^W[36]^W[46],Me=W[7]^W[17]^W[27]^W[37]^W[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~Ut&tt,W[34]=Dt^~Ft&ot,W[35]=at^~Rt&Gt,W[44]=hr^~ni&si,W[45]=ri^~ii&wn,W[6]=Ge^~Be&Re,W[7]=et^~Ke&Qe,W[16]=Ce^~lt&pt,W[17]=Te^~Ct&ne,W[26]=st^~Nt&We,W[27]=Ut^~tt&At,W[36]=Ft^~ot&qt,W[37]=Rt^~Gt&Wt,W[46]=ni^~si&wr,W[47]=ii^~wn&wt,W[8]=Be^~Re&Ne,W[9]=Ke^~Qe&Je,W[18]=lt^~pt&Y,W[19]=Ct^~ne&X,W[28]=Nt^~We&xt,W[29]=tt^~At&dt,W[38]=ot^~qt&rt,W[39]=Gt^~Wt&Vt,W[48]=si^~wr&yr,W[49]=wn^~wt&Xt,W[0]^=C[ee],W[1]^=C[ee+1]};if(o)r.exports=p;else for(_=0;_{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const cme=sat();var Tj;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(Tj||(Tj={}));var _f;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(_f||(_f={}));const lme="0123456789abcdef";class Fi{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();Pk[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ome>Pk[n])&&console.log.apply(console,t)}debug(...e){this._log(Fi.levels.DEBUG,e)}info(...e){this._log(Fi.levels.INFO,e)}warn(...e){this._log(Fi.levels.WARNING,e)}makeError(e,t,n){if(ame)return this.makeError("censored error",t,{});t||(t=Fi.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const u=n[l];try{if(u instanceof Uint8Array){let f="";for(let h=0;h>4],f+=lme[u[h]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(u))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const s=e;let a="";switch(t){case _f.NUMERIC_FAULT:{a="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":a+="-"+l;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case _f.CALL_EXCEPTION:case _f.INSUFFICIENT_FUNDS:case _f.MISSING_NEW:case _f.NONCE_EXPIRED:case _f.REPLACEMENT_UNDERPRICED:case _f.TRANSACTION_REPLACED:case _f.UNPREDICTABLE_GAS_LIMIT:a=t;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const o=new Error(e);return o.reason=s,o.code=t,Object.keys(n).forEach(function(l){o[l]=n[l]}),o}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,Fi.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){cme&&this.throwError("platform missing String.prototype.normalize",Fi.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:cme})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Fi.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Fi.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,Fi.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",Fi.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Fi.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Fi.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Ij||(Ij=new Fi(iat)),Ij}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Fi.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),sme){if(!e)return;this.globalLogger().throwError("error censorship permanent",Fi.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ame=!!e,sme=!!t}static setLogLevel(e){const t=Pk[e.toLowerCase()];if(t==null){Fi.globalLogger().warn("invalid log level - "+e);return}ome=t}static from(e){return new Fi(e)}}Fi.errors=_f,Fi.levels=Tj;const aat="bytes/5.7.0",Ps=new Fi(aat);function ume(r){return!!r.toHexString}function Yy(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return Yy(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function oat(r){return Gd(r)&&!(r.length%2)||kj(r)}function fme(r){return typeof r=="number"&&r==r&&r%1===0}function kj(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!fme(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Vs(r,e){if(e||(e={}),typeof r=="number"){Ps.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),Yy(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),ume(r)&&(r=r.toHexString()),Gd(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Ps.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;iVs(i)),t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Yy(n)}function lat(r,e){r=Vs(r),r.length>e&&Ps.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),Yy(t)}function Gd(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const Rj="0123456789abcdef";function fl(r,e){if(e||(e={}),typeof r=="number"){Ps.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=Rj[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),ume(r))return r.toHexString();if(Gd(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":Ps.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(kj(r)){let t="0x";for(let n=0;n>4]+Rj[i&15]}return t}return Ps.throwArgumentError("invalid hexlify value","value",r)}function uat(r){if(typeof r!="string")r=fl(r);else if(!Gd(r)||r.length%2)return null;return(r.length-2)/2}function dme(r,e,t){return typeof r!="string"?r=fl(r):(!Gd(r)||r.length%2)&&Ps.throwArgumentError("invalid hexData","value",r),e=2+2*e,"0x"+r.substring(e)}function Qy(r,e){for(typeof r!="string"?r=fl(r):Gd(r)||Ps.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Ps.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function hme(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(oat(r)){let t=Vs(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=fl(t.slice(0,32)),e.s=fl(t.slice(32,64))):t.length===65?(e.r=fl(t.slice(0,32)),e.s=fl(t.slice(32,64)),e.v=t[64]):Ps.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:Ps.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=fl(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const i=lat(Vs(e._vs),32);e._vs=fl(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Ps.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const a=fl(i);e.s==null?e.s=a:e.s!==a&&Ps.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?Ps.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Ps.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!Gd(e.r)?Ps.throwArgumentError("signature missing or invalid r","signature",r):e.r=Qy(e.r,32),e.s==null||!Gd(e.s)?Ps.throwArgumentError("signature missing or invalid s","signature",r):e.s=Qy(e.s,32);const t=Vs(e.s);t[0]>=128&&Ps.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const n=fl(t);e._vs&&(Gd(e._vs)||Ps.throwArgumentError("signature invalid _vs","signature",r),e._vs=Qy(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Ps.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Mj(r){return"0x"+nat.keccak_256(Vs(r))}var fat=Kr.BN;function dat(r){return new fat(r,36).toString(16)}const hat="strings/5.7.0",pat=new Fi(hat);var Ok;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(Ok||(Ok={}));var pme;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(pme||(pme={}));function Pj(r,e=Ok.current){e!=Ok.current&&(pat.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const s=r.charCodeAt(n);if(n>=r.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((i&1023)<<10)+(s&1023);t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return Vs(t)}const mat=`Ethereum Signed Message: +`;function mme(r){return typeof r=="string"&&(r=Pj(r)),Mj(cat([Pj(mat),Pj(String(r.length)),r]))}const gat="address/5.7.0",f7=new Fi(gat);function gme(r){Gd(r,20)||f7.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Vs(Mj(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const bat=9007199254740991;function vat(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const Oj={};for(let r=0;r<10;r++)Oj[String(r)]=String(r);for(let r=0;r<26;r++)Oj[String.fromCharCode(65+r)]=String(10+r);const bme=Math.floor(vat(bat));function wat(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>Oj[n]).join("");for(;e.length>=bme;){let n=e.substring(0,bme);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function yat(r){let e=null;if(typeof r!="string"&&f7.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=gme(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&f7.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==wat(r)&&f7.throwArgumentError("bad icap checksum","address",r),e=dat(r.substring(4));e.length<40;)e="0"+e;e=gme("0x"+e)}else f7.throwArgumentError("invalid address","address",r);return e}function d7(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}var h7={},vn={},Gb=vme;function vme(r,e){if(!r)throw new Error(e||"Assertion failed")}vme.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var xat=Gb,_at=Vo;vn.inherits=_at;function Eat(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function Cat(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=s&63|128):Eat(r,i)?(s=65536+((s&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}vn.htonl=wme;function Sat(r,e){for(var t="",n=0;n>>0}return s}vn.join32=Iat;function Tat(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=s>>>16&255,t[i+2]=s>>>8&255,t[i+3]=s&255):(t[i+3]=s>>>24,t[i+2]=s>>>16&255,t[i+1]=s>>>8&255,t[i]=s&255)}return t}vn.split32=Tat;function kat(r,e){return r>>>e|r<<32-e}vn.rotr32=kat;function Rat(r,e){return r<>>32-e}vn.rotl32=Rat;function Mat(r,e){return r+e>>>0}vn.sum32=Mat;function Pat(r,e,t){return r+e+t>>>0}vn.sum32_3=Pat;function Oat(r,e,t,n){return r+e+t+n>>>0}vn.sum32_4=Oat;function Nat(r,e,t,n,i){return r+e+t+n+i>>>0}vn.sum32_5=Nat;function Dat(r,e,t,n){var i=r[e],s=r[e+1],a=n+s>>>0,o=(a>>0,r[e+1]=a}vn.sum64=Dat;function $at(r,e,t,n){var i=e+n>>>0,s=(i>>0}vn.sum64_hi=$at;function Bat(r,e,t,n){var i=e+n;return i>>>0}vn.sum64_lo=Bat;function Lat(r,e,t,n,i,s,a,o){var l=0,u=e;u=u+n>>>0,l+=u>>0,l+=u>>0,l+=u>>0}vn.sum64_4_hi=Lat;function Uat(r,e,t,n,i,s,a,o){var l=e+n+s+o;return l>>>0}vn.sum64_4_lo=Uat;function Fat(r,e,t,n,i,s,a,o,l,u){var f=0,h=e;h=h+n>>>0,f+=h>>0,f+=h>>0,f+=h>>0,f+=h>>0}vn.sum64_5_hi=Fat;function jat(r,e,t,n,i,s,a,o,l,u){var f=e+n+s+o+u;return f>>>0}vn.sum64_5_lo=jat;function zat(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}vn.rotr64_hi=zat;function Hat(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}vn.rotr64_lo=Hat;function qat(r,e,t){return r>>>t}vn.shr64_hi=qat;function Wat(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}vn.shr64_lo=Wat;var Xy={},_me=vn,Vat=Gb;function Nk(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Xy.BlockHash=Nk,Nk.prototype.update=function(e,t){if(e=_me.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=_me.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,a=8;a>>3}Kd.g0_256=Yat;function Qat(r){return Zd(r,17)^Zd(r,19)^r>>>10}Kd.g1_256=Qat;var t5=vn,Xat=Xy,eot=Kd,Nj=t5.rotl32,p7=t5.sum32,tot=t5.sum32_5,rot=eot.ft_1,Sme=Xat.BlockHash,not=[1518500249,1859775393,2400959708,3395469782];function Jd(){if(!(this instanceof Jd))return new Jd;Sme.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}t5.inherits(Jd,Sme);var iot=Jd;Jd.blockSize=512,Jd.outSize=160,Jd.hmacStrength=80,Jd.padLength=64,Jd.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Wot(e.length<=this.blockSize);for(var t=e.length;t>8,m=f&255;h?l.push(h,m):l.push(m)}return l}t.toArray=n;function i(a){return a.length===1?"0"+a:a}t.zero2=i;function s(a){for(var o="",l=0;l(m>>1)-1?C=(m>>1)-R:C=R,b.isubn(C)):C=0,h[v]=C,b.iushrn(1)}return h}t.getNAF=n;function i(l,u){var f=[[],[]];l=l.clone(),u=u.clone();for(var h=0,m=0,b;l.cmpn(-h)>0||u.cmpn(-m)>0;){var v=l.andln(3)+h&3,C=u.andln(3)+m&3;v===3&&(v=-1),C===3&&(C=-1);var R;v&1?(b=l.andln(7)+h&7,(b===3||b===5)&&C===2?R=-v:R=v):R=0,f[0].push(R);var k;C&1?(b=u.andln(7)+m&7,(b===3||b===5)&&v===2?k=-C:k=C):k=0,f[1].push(k),2*h===R+1&&(h=1-h),2*m===k+1&&(m=1-m),l.iushrn(1),u.iushrn(1)}return f}t.getJSF=i;function s(l,u,f){var h="_"+u;l.prototype[u]=function(){return this[h]!==void 0?this[h]:this[h]=f.call(this)}}t.cachedProperty=s;function a(l){return typeof l=="string"?t.toArray(l,"hex"):l}t.parseBytes=a;function o(l){return new Kr(l,"hex","le")}t.intFromLE=o}),$k=dl.getNAF,Kot=dl.getJSF,Bk=dl.assert;function am(r,e){this.type=r,this.p=new Kr(e.p,16),this.red=e.prime?Kr.red(e.prime):Kr.mont(this.p),this.zero=new Kr(0).toRed(this.red),this.one=new Kr(1).toRed(this.red),this.two=new Kr(2).toRed(this.red),this.n=e.n&&new Kr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Zb=am;am.prototype.point=function(){throw new Error("Not implemented")},am.prototype.validate=function(){throw new Error("Not implemented")},am.prototype._fixedNafMul=function(e,t){Bk(e.precomputed);var n=e._getDoubles(),i=$k(t,1,this._bitLength),s=(1<=o;u--)l=(l<<1)+i[u];a.push(l)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),m=s;m>0;m--){for(o=0;o=0;l--){for(var u=0;l>=0&&a[l]===0;l--)u++;if(l>=0&&u++,o=o.dblp(u),l<0)break;var f=a[l];Bk(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(s[f-1>>1]):o=o.mixedAdd(s[-f-1>>1].neg()):f>0?o=o.add(s[f-1>>1]):o=o.add(s[-f-1>>1].neg())}return e.type==="affine"?o.toP():o},am.prototype._wnafMulAdd=function(e,t,n,i,s){var a=this._wnafT1,o=this._wnafT2,l=this._wnafT3,u=0,f,h,m;for(f=0;f=1;f-=2){var v=f-1,C=f;if(a[v]!==1||a[C]!==1){l[v]=$k(n[v],a[v],this._bitLength),l[C]=$k(n[C],a[C],this._bitLength),u=Math.max(l[v].length,u),u=Math.max(l[C].length,u);continue}var R=[t[v],null,null,t[C]];t[v].y.cmp(t[C].y)===0?(R[1]=t[v].add(t[C]),R[2]=t[v].toJ().mixedAdd(t[C].neg())):t[v].y.cmp(t[C].y.redNeg())===0?(R[1]=t[v].toJ().mixedAdd(t[C]),R[2]=t[v].add(t[C].neg())):(R[1]=t[v].toJ().mixedAdd(t[C]),R[2]=t[v].toJ().mixedAdd(t[C].neg()));var k=[-3,-1,-5,-7,0,7,5,1,3],P=Kot(n[v],n[C]);for(u=Math.max(P[0].length,u),l[v]=new Array(u),l[C]=new Array(u),h=0;h=0;f--){for(var U=0;f>=0;){var L=!0;for(h=0;h=0&&U++,j=j.dblp(U),f<0)break;for(h=0;h0?m=o[h][V-1>>1]:V<0&&(m=o[h][-V-1>>1].neg()),m.type==="affine"?j=j.mixedAdd(m):j=j.add(m))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1},wu.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(b=u,v=f),h.negative&&(h=h.neg(),m=m.neg()),b.negative&&(b=b.neg(),v=v.neg()),[{a:h,b:m},{a:b,b:v}]},yu.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],s=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),o=s.mul(n.a),l=a.mul(i.a),u=s.mul(n.b),f=a.mul(i.b),h=e.sub(o).sub(l),m=u.add(f).neg();return{k1:h,k2:m}},yu.prototype.pointFromX=function(e,t){e=new Kr(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(t&&!s||!t&&s)&&(i=i.redNeg()),this.point(e,i)},yu.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0},yu.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,a=0;a":""},Na.prototype.isInfinity=function(){return this.inf},Na.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},Na.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),a=s.redSqr().redISub(this.x.redAdd(this.x)),o=s.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},Na.prototype.getX=function(){return this.x.fromRed()},Na.prototype.getY=function(){return this.y.fromRed()},Na.prototype.mul=function(e){return e=new Kr(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Na.prototype.mulAdd=function(e,t,n){var i=[this,t],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},Na.prototype.jmulAdd=function(e,t,n){var i=[this,t],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)},Na.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},Na.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},Na.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function ro(r,e,t,n){Zb.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Kr(0)):(this.x=new Kr(e,16),this.y=new Kr(t,16),this.z=new Kr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Fj(ro,Zb.BasePoint),yu.prototype.jpoint=function(e,t,n){return new ro(this,e,t,n)},ro.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},ro.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ro.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),s=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),u=a.redSub(o);if(l.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),h=f.redMul(l),m=i.redMul(f),b=u.redSqr().redIAdd(h).redISub(m).redISub(m),v=u.redMul(m.redISub(b)).redISub(a.redMul(h)),C=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(b,v,C)},ro.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),s=this.y,a=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=s.redSub(a);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),f=u.redMul(o),h=n.redMul(u),m=l.redSqr().redIAdd(f).redISub(h).redISub(h),b=l.redMul(h.redISub(m)).redISub(s.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(m,b,v)},ro.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}},ro.prototype.inspect=function(){return this.isInfinity()?"":""},ro.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Lk=s5(function(r,e){var t=e;t.base=Zb,t.short=Jot,t.mont=null,t.edwards=null}),Uk=s5(function(r,e){var t=e,n=dl.assert;function i(o){o.type==="short"?this.curve=new Lk.short(o):o.type==="edwards"?this.curve=new Lk.edwards(o):this.curve=new Lk.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function s(o,l){Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){var u=new i(l);return Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:u}),u}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:L0.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:L0.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:L0.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:L0.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:L0.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:L0.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:L0.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var a;try{a=null.crash()}catch{a=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:L0.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})});function om(r){if(!(this instanceof om))return new om(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Af.toArray(r.entropy,r.entropyEnc||"hex"),t=Af.toArray(r.nonce,r.nonceEnc||"hex"),n=Af.toArray(r.pers,r.persEnc||"hex");Uj(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var jme=om;om.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},om.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Af.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Yot=dl.assert;function Fk(r,e){if(r instanceof Fk)return r;this._importDER(r,e)||(Yot(r.r&&r.s,"Signature without r or s"),this.r=new Kr(r.r,16),this.s=new Kr(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var jk=Fk;function Qot(){this.place=0}function Hj(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,s=0,a=e.place;s>>=0;return i<=127?!1:(e.place=a,i)}function zme(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}Fk.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=zme(t),n=zme(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];qj(i,t.length),i=i.concat(t),i.push(2),qj(i,n.length);var s=i.concat(n),a=[48];return qj(a,s.length),a=a.concat(s),dl.encode(a,e)};var Xot=function(){throw new Error("unsupported")},Hme=dl.assert;function xu(r){if(!(this instanceof xu))return new xu(r);typeof r=="string"&&(Hme(Object.prototype.hasOwnProperty.call(Uk,r),"Unknown curve "+r),r=Uk[r]),r instanceof Uk.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var ect=xu;xu.prototype.keyPair=function(e){return new zj(this,e)},xu.prototype.keyFromPrivate=function(e,t){return zj.fromPrivate(this,e,t)},xu.prototype.keyFromPublic=function(e,t){return zj.fromPublic(this,e,t)},xu.prototype.genKeyPair=function(e){e||(e={});for(var t=new jme({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Xot(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Kr(2));;){var s=new Kr(t.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},xu.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},xu.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new Kr(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),o=e.toArray("be",s),l=new jme({hash:this.hash,entropy:a,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new Kr(1)),f=0;;f++){var h=i.k?i.k(f):new Kr(l.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(u)>=0)){var m=this.g.mul(h);if(!m.isInfinity()){var b=m.getX(),v=b.umod(this.n);if(v.cmpn(0)!==0){var C=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var R=(m.getY().isOdd()?1:0)|(b.cmp(v)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),R^=1),new jk({r:v,s:C,recoveryParam:R})}}}}}},xu.prototype.verify=function(e,t,n,i){e=this._truncateToN(new Kr(e,16)),n=this.keyFromPublic(n,i),t=new jk(t,"hex");var s=t.r,a=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o=a.invm(this.n),l=o.mul(e).umod(this.n),u=o.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),u),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),u),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)},xu.prototype.recoverPubKey=function(r,e,t,n){Hme((3&t)===t,"The recovery param is more than two bits"),e=new jk(e,n);var i=this.n,s=new Kr(r),a=e.r,o=e.s,l=t&1,u=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?a=this.curve.pointFromX(a.add(this.curve.n),l):a=this.curve.pointFromX(a,l);var f=e.r.invm(i),h=i.sub(s).mul(f).umod(i),m=o.mul(f).umod(i);return this.g.mulAdd(h,a,m)},xu.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new jk(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(r,e,i)}catch{continue}if(s.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var tct=s5(function(r,e){var t=e;t.version="6.5.4",t.utils=dl,t.rand=function(){throw new Error("unsupported")},t.curve=Lk,t.curves=Uk,t.ec=ect,t.eddsa=null}),rct=tct.ec;const nct="signing-key/5.7.0",Wj=new Fi(nct);let Vj=null;function cm(){return Vj||(Vj=new rct("secp256k1")),Vj}class ict{constructor(e){d7(this,"curve","secp256k1"),d7(this,"privateKey",fl(e)),uat(this.privateKey)!==32&&Wj.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=cm().keyFromPrivate(Vs(this.privateKey));d7(this,"publicKey","0x"+t.getPublic(!1,"hex")),d7(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),d7(this,"_isSigningKey",!0)}_addPoint(e){const t=cm().keyFromPublic(Vs(this.publicKey)),n=cm().keyFromPublic(Vs(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=cm().keyFromPrivate(Vs(this.privateKey)),n=Vs(e);n.length!==32&&Wj.throwArgumentError("bad digest length","digest",e);const i=t.sign(n,{canonical:!0});return hme({recoveryParam:i.recoveryParam,r:Qy("0x"+i.r.toString(16),32),s:Qy("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=cm().keyFromPrivate(Vs(this.privateKey)),n=cm().keyFromPublic(Vs(qme(e)));return Qy("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function sct(r,e){const t=hme(e),n={r:Vs(t.r),s:Vs(t.s)};return"0x"+cm().recoverPubKey(Vs(r),n,t.recoveryParam).encode("hex",!1)}function qme(r,e){const t=Vs(r);return t.length===32?new ict(t).publicKey:t.length===33?"0x"+cm().keyFromPublic(t).getPublic(!1,"hex"):t.length===65?fl(t):Wj.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Wme;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(Wme||(Wme={}));function act(r){const e=qme(r);return yat(dme(Mj(dme(e,1)),12))}function oct(r,e){return act(sct(Vs(r),e))}function Vme(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}function Gj(r,e){e||(e=r.reduce((i,s)=>i+s.length,0));const t=Vme(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return t}function Gme(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const Kme=Gme("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),Kj=Gme("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=Vme(r.length);for(let t=0;t",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}};var hl={},Zj={exports:{}};Zj.exports,function(r){(function(e,t){function n(D,x){if(!D)throw new Error(x||"Assertion failed")}function i(D,x){D.super_=x;var y=function(){};y.prototype=x.prototype,D.prototype=new y,D.prototype.constructor=D}function s(D,x,y){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((x==="le"||x==="be")&&(y=x,x=10),this._init(D||0,x||10,y||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Cc.Buffer}catch{}s.isBN=function(x){return x instanceof s?!0:x!==null&&typeof x=="object"&&x.constructor.wordSize===s.wordSize&&Array.isArray(x.words)},s.max=function(x,y){return x.cmp(y)>0?x:y},s.min=function(x,y){return x.cmp(y)<0?x:y},s.prototype._init=function(x,y,p){if(typeof x=="number")return this._initNumber(x,y,p);if(typeof x=="object")return this._initArray(x,y,p);y==="hex"&&(y=16),n(y===(y|0)&&y>=2&&y<=36),x=x.toString().replace(/\s+/g,"");var g=0;x[0]==="-"&&(g++,this.negative=1),g=0;g-=3)S=x[g]|x[g-1]<<8|x[g-2]<<16,this.words[_]|=S<>>26-T&67108863,T+=24,T>=26&&(T-=26,_++);else if(p==="le")for(g=0,_=0;g>>26-T&67108863,T+=24,T>=26&&(T-=26,_++);return this.strip()};function o(D,x){var y=D.charCodeAt(x);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function l(D,x,y){var p=o(D,y);return y-1>=x&&(p|=o(D,y-1)<<4),p}s.prototype._parseHex=function(x,y,p){this.length=Math.ceil((x.length-y)/6),this.words=new Array(this.length);for(var g=0;g=y;g-=2)T=l(x,y,g)<<_,this.words[S]|=T&67108863,_>=18?(_-=18,S+=1,this.words[S]|=T>>>26):_+=8;else{var I=x.length-y;for(g=I%2===0?y+1:y;g=18?(_-=18,S+=1,this.words[S]|=T>>>26):_+=8}this.strip()};function u(D,x,y,p){for(var g=0,_=Math.min(D.length,y),S=x;S<_;S++){var T=D.charCodeAt(S)-48;g*=p,T>=49?g+=T-49+10:T>=17?g+=T-17+10:g+=T}return g}s.prototype._parseBase=function(x,y,p){this.words=[0],this.length=1;for(var g=0,_=1;_<=67108863;_*=y)g++;g--,_=_/y|0;for(var S=x.length-p,T=S%g,I=Math.min(S,S-T)+p,E=0,M=p;M1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(x,y){x=x||10,y=y|0||1;var p;if(x===16||x==="hex"){p="";for(var g=0,_=0,S=0;S>>24-g&16777215,_!==0||S!==this.length-1?p=f[6-I.length]+I+p:p=I+p,g+=2,g>=26&&(g-=26,S--)}for(_!==0&&(p=_.toString(16)+p);p.length%y!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(x===(x|0)&&x>=2&&x<=36){var E=h[x],M=m[x];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var B=A.modn(M).toString(x);A=A.idivn(M),A.isZero()?p=B+p:p=f[E-B.length]+B+p}for(this.isZero()&&(p="0"+p);p.length%y!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=this.words[1]*67108864:this.length===3&&this.words[2]===1?x+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(x,y){return n(typeof a<"u"),this.toArrayLike(a,x,y)},s.prototype.toArray=function(x,y){return this.toArrayLike(Array,x,y)},s.prototype.toArrayLike=function(x,y,p){var g=this.byteLength(),_=p||Math.max(1,g);n(g<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0"),this.strip();var S=y==="le",T=new x(_),I,E,M=this.clone();if(S){for(E=0;!M.isZero();E++)I=M.andln(255),M.iushrn(8),T[E]=I;for(;E<_;E++)T[E]=0}else{for(E=0;E<_-g;E++)T[E]=0;for(E=0;!M.isZero();E++)I=M.andln(255),M.iushrn(8),T[_-E-1]=I}return T},Math.clz32?s.prototype._countBits=function(x){return 32-Math.clz32(x)}:s.prototype._countBits=function(x){var y=x,p=0;return y>=4096&&(p+=13,y>>>=13),y>=64&&(p+=7,y>>>=7),y>=8&&(p+=4,y>>>=4),y>=2&&(p+=2,y>>>=2),p+y},s.prototype._zeroBits=function(x){if(x===0)return 26;var y=x,p=0;return y&8191||(p+=13,y>>>=13),y&127||(p+=7,y>>>=7),y&15||(p+=4,y>>>=4),y&3||(p+=2,y>>>=2),y&1||p++,p},s.prototype.bitLength=function(){var x=this.words[this.length-1],y=this._countBits(x);return(this.length-1)*26+y};function b(D){for(var x=new Array(D.bitLength()),y=0;y>>g}return x}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,y=0;yx.length?this.clone().ior(x):x.clone().ior(this)},s.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},s.prototype.iuand=function(x){var y;this.length>x.length?y=x:y=this;for(var p=0;px.length?this.clone().iand(x):x.clone().iand(this)},s.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},s.prototype.iuxor=function(x){var y,p;this.length>x.length?(y=this,p=x):(y=x,p=this);for(var g=0;gx.length?this.clone().ixor(x):x.clone().ixor(this)},s.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},s.prototype.inotn=function(x){n(typeof x=="number"&&x>=0);var y=Math.ceil(x/26)|0,p=x%26;this._expand(y),p>0&&y--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-p),this.strip()},s.prototype.notn=function(x){return this.clone().inotn(x)},s.prototype.setn=function(x,y){n(typeof x=="number"&&x>=0);var p=x/26|0,g=x%26;return this._expand(p+1),y?this.words[p]=this.words[p]|1<x.length?(p=this,g=x):(p=x,g=this);for(var _=0,S=0;S>>26;for(;_!==0&&S>>26;if(this.length=p.length,_!==0)this.words[this.length]=_,this.length++;else if(p!==this)for(;Sx.length?this.clone().iadd(x):x.clone().iadd(this)},s.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var y=this.iadd(x);return x.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var p=this.cmp(x);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,_;p>0?(g=this,_=x):(g=x,_=this);for(var S=0,T=0;T<_.length;T++)y=(g.words[T]|0)-(_.words[T]|0)+S,S=y>>26,this.words[T]=y&67108863;for(;S!==0&&T>26,this.words[T]=y&67108863;if(S===0&&T>>26,A=I&67108863,B=Math.min(E,x.length-1),ae=Math.max(0,E-D.length+1);ae<=B;ae++){var W=E-ae|0;g=D.words[W]|0,_=x.words[ae]|0,S=g*_+A,M+=S/67108864|0,A=S&67108863}y.words[E]=A|0,I=M|0}return I!==0?y.words[E]=I|0:y.length--,y.strip()}var C=function(x,y,p){var g=x.words,_=y.words,S=p.words,T=0,I,E,M,A=g[0]|0,B=A&8191,ae=A>>>13,W=g[1]|0,Z=W&8191,K=W>>>13,ee=g[2]|0,re=ee&8191,H=ee>>>13,F=g[3]|0,q=F&8191,fe=F>>>13,pe=g[4]|0,Ee=pe&8191,Me=pe>>>13,Oe=g[5]|0,je=Oe&8191,Re=Oe>>>13,Qe=g[6]|0,Ne=Qe&8191,Je=Qe>>>13,Xe=g[7]|0,Le=Xe&8191,Ge=Xe>>>13,et=g[8]|0,Be=et&8191,Ke=et>>>13,pt=g[9]|0,ne=pt&8191,Y=pt>>>13,X=_[0]|0,ue=X&8191,we=X>>>13,Ce=_[1]|0,Te=Ce&8191,lt=Ce>>>13,Ct=_[2]|0,We=Ct&8191,At=Ct>>>13,xt=_[3]|0,dt=xt&8191,Lt=xt>>>13,Ot=_[4]|0,st=Ot&8191,Ut=Ot>>>13,Nt=_[5]|0,tt=Nt&8191,qt=Nt>>>13,Wt=_[6]|0,rt=Wt&8191,Vt=Wt>>>13,Dt=_[7]|0,at=Dt&8191,Ft=Dt>>>13,Rt=_[8]|0,ot=Rt&8191,Gt=Rt>>>13,wr=_[9]|0,wt=wr&8191,yr=wr>>>13;p.negative=x.negative^y.negative,p.length=19,I=Math.imul(B,ue),E=Math.imul(B,we),E=E+Math.imul(ae,ue)|0,M=Math.imul(ae,we);var Xt=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,I=Math.imul(Z,ue),E=Math.imul(Z,we),E=E+Math.imul(K,ue)|0,M=Math.imul(K,we),I=I+Math.imul(B,Te)|0,E=E+Math.imul(B,lt)|0,E=E+Math.imul(ae,Te)|0,M=M+Math.imul(ae,lt)|0;var hr=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,I=Math.imul(re,ue),E=Math.imul(re,we),E=E+Math.imul(H,ue)|0,M=Math.imul(H,we),I=I+Math.imul(Z,Te)|0,E=E+Math.imul(Z,lt)|0,E=E+Math.imul(K,Te)|0,M=M+Math.imul(K,lt)|0,I=I+Math.imul(B,We)|0,E=E+Math.imul(B,At)|0,E=E+Math.imul(ae,We)|0,M=M+Math.imul(ae,At)|0;var ri=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ri>>>26)|0,ri&=67108863,I=Math.imul(q,ue),E=Math.imul(q,we),E=E+Math.imul(fe,ue)|0,M=Math.imul(fe,we),I=I+Math.imul(re,Te)|0,E=E+Math.imul(re,lt)|0,E=E+Math.imul(H,Te)|0,M=M+Math.imul(H,lt)|0,I=I+Math.imul(Z,We)|0,E=E+Math.imul(Z,At)|0,E=E+Math.imul(K,We)|0,M=M+Math.imul(K,At)|0,I=I+Math.imul(B,dt)|0,E=E+Math.imul(B,Lt)|0,E=E+Math.imul(ae,dt)|0,M=M+Math.imul(ae,Lt)|0;var ni=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ni>>>26)|0,ni&=67108863,I=Math.imul(Ee,ue),E=Math.imul(Ee,we),E=E+Math.imul(Me,ue)|0,M=Math.imul(Me,we),I=I+Math.imul(q,Te)|0,E=E+Math.imul(q,lt)|0,E=E+Math.imul(fe,Te)|0,M=M+Math.imul(fe,lt)|0,I=I+Math.imul(re,We)|0,E=E+Math.imul(re,At)|0,E=E+Math.imul(H,We)|0,M=M+Math.imul(H,At)|0,I=I+Math.imul(Z,dt)|0,E=E+Math.imul(Z,Lt)|0,E=E+Math.imul(K,dt)|0,M=M+Math.imul(K,Lt)|0,I=I+Math.imul(B,st)|0,E=E+Math.imul(B,Ut)|0,E=E+Math.imul(ae,st)|0,M=M+Math.imul(ae,Ut)|0;var ii=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ii>>>26)|0,ii&=67108863,I=Math.imul(je,ue),E=Math.imul(je,we),E=E+Math.imul(Re,ue)|0,M=Math.imul(Re,we),I=I+Math.imul(Ee,Te)|0,E=E+Math.imul(Ee,lt)|0,E=E+Math.imul(Me,Te)|0,M=M+Math.imul(Me,lt)|0,I=I+Math.imul(q,We)|0,E=E+Math.imul(q,At)|0,E=E+Math.imul(fe,We)|0,M=M+Math.imul(fe,At)|0,I=I+Math.imul(re,dt)|0,E=E+Math.imul(re,Lt)|0,E=E+Math.imul(H,dt)|0,M=M+Math.imul(H,Lt)|0,I=I+Math.imul(Z,st)|0,E=E+Math.imul(Z,Ut)|0,E=E+Math.imul(K,st)|0,M=M+Math.imul(K,Ut)|0,I=I+Math.imul(B,tt)|0,E=E+Math.imul(B,qt)|0,E=E+Math.imul(ae,tt)|0,M=M+Math.imul(ae,qt)|0;var si=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(si>>>26)|0,si&=67108863,I=Math.imul(Ne,ue),E=Math.imul(Ne,we),E=E+Math.imul(Je,ue)|0,M=Math.imul(Je,we),I=I+Math.imul(je,Te)|0,E=E+Math.imul(je,lt)|0,E=E+Math.imul(Re,Te)|0,M=M+Math.imul(Re,lt)|0,I=I+Math.imul(Ee,We)|0,E=E+Math.imul(Ee,At)|0,E=E+Math.imul(Me,We)|0,M=M+Math.imul(Me,At)|0,I=I+Math.imul(q,dt)|0,E=E+Math.imul(q,Lt)|0,E=E+Math.imul(fe,dt)|0,M=M+Math.imul(fe,Lt)|0,I=I+Math.imul(re,st)|0,E=E+Math.imul(re,Ut)|0,E=E+Math.imul(H,st)|0,M=M+Math.imul(H,Ut)|0,I=I+Math.imul(Z,tt)|0,E=E+Math.imul(Z,qt)|0,E=E+Math.imul(K,tt)|0,M=M+Math.imul(K,qt)|0,I=I+Math.imul(B,rt)|0,E=E+Math.imul(B,Vt)|0,E=E+Math.imul(ae,rt)|0,M=M+Math.imul(ae,Vt)|0;var wn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(wn>>>26)|0,wn&=67108863,I=Math.imul(Le,ue),E=Math.imul(Le,we),E=E+Math.imul(Ge,ue)|0,M=Math.imul(Ge,we),I=I+Math.imul(Ne,Te)|0,E=E+Math.imul(Ne,lt)|0,E=E+Math.imul(Je,Te)|0,M=M+Math.imul(Je,lt)|0,I=I+Math.imul(je,We)|0,E=E+Math.imul(je,At)|0,E=E+Math.imul(Re,We)|0,M=M+Math.imul(Re,At)|0,I=I+Math.imul(Ee,dt)|0,E=E+Math.imul(Ee,Lt)|0,E=E+Math.imul(Me,dt)|0,M=M+Math.imul(Me,Lt)|0,I=I+Math.imul(q,st)|0,E=E+Math.imul(q,Ut)|0,E=E+Math.imul(fe,st)|0,M=M+Math.imul(fe,Ut)|0,I=I+Math.imul(re,tt)|0,E=E+Math.imul(re,qt)|0,E=E+Math.imul(H,tt)|0,M=M+Math.imul(H,qt)|0,I=I+Math.imul(Z,rt)|0,E=E+Math.imul(Z,Vt)|0,E=E+Math.imul(K,rt)|0,M=M+Math.imul(K,Vt)|0,I=I+Math.imul(B,at)|0,E=E+Math.imul(B,Ft)|0,E=E+Math.imul(ae,at)|0,M=M+Math.imul(ae,Ft)|0;var Wn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,I=Math.imul(Be,ue),E=Math.imul(Be,we),E=E+Math.imul(Ke,ue)|0,M=Math.imul(Ke,we),I=I+Math.imul(Le,Te)|0,E=E+Math.imul(Le,lt)|0,E=E+Math.imul(Ge,Te)|0,M=M+Math.imul(Ge,lt)|0,I=I+Math.imul(Ne,We)|0,E=E+Math.imul(Ne,At)|0,E=E+Math.imul(Je,We)|0,M=M+Math.imul(Je,At)|0,I=I+Math.imul(je,dt)|0,E=E+Math.imul(je,Lt)|0,E=E+Math.imul(Re,dt)|0,M=M+Math.imul(Re,Lt)|0,I=I+Math.imul(Ee,st)|0,E=E+Math.imul(Ee,Ut)|0,E=E+Math.imul(Me,st)|0,M=M+Math.imul(Me,Ut)|0,I=I+Math.imul(q,tt)|0,E=E+Math.imul(q,qt)|0,E=E+Math.imul(fe,tt)|0,M=M+Math.imul(fe,qt)|0,I=I+Math.imul(re,rt)|0,E=E+Math.imul(re,Vt)|0,E=E+Math.imul(H,rt)|0,M=M+Math.imul(H,Vt)|0,I=I+Math.imul(Z,at)|0,E=E+Math.imul(Z,Ft)|0,E=E+Math.imul(K,at)|0,M=M+Math.imul(K,Ft)|0,I=I+Math.imul(B,ot)|0,E=E+Math.imul(B,Gt)|0,E=E+Math.imul(ae,ot)|0,M=M+Math.imul(ae,Gt)|0;var ji=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(ji>>>26)|0,ji&=67108863,I=Math.imul(ne,ue),E=Math.imul(ne,we),E=E+Math.imul(Y,ue)|0,M=Math.imul(Y,we),I=I+Math.imul(Be,Te)|0,E=E+Math.imul(Be,lt)|0,E=E+Math.imul(Ke,Te)|0,M=M+Math.imul(Ke,lt)|0,I=I+Math.imul(Le,We)|0,E=E+Math.imul(Le,At)|0,E=E+Math.imul(Ge,We)|0,M=M+Math.imul(Ge,At)|0,I=I+Math.imul(Ne,dt)|0,E=E+Math.imul(Ne,Lt)|0,E=E+Math.imul(Je,dt)|0,M=M+Math.imul(Je,Lt)|0,I=I+Math.imul(je,st)|0,E=E+Math.imul(je,Ut)|0,E=E+Math.imul(Re,st)|0,M=M+Math.imul(Re,Ut)|0,I=I+Math.imul(Ee,tt)|0,E=E+Math.imul(Ee,qt)|0,E=E+Math.imul(Me,tt)|0,M=M+Math.imul(Me,qt)|0,I=I+Math.imul(q,rt)|0,E=E+Math.imul(q,Vt)|0,E=E+Math.imul(fe,rt)|0,M=M+Math.imul(fe,Vt)|0,I=I+Math.imul(re,at)|0,E=E+Math.imul(re,Ft)|0,E=E+Math.imul(H,at)|0,M=M+Math.imul(H,Ft)|0,I=I+Math.imul(Z,ot)|0,E=E+Math.imul(Z,Gt)|0,E=E+Math.imul(K,ot)|0,M=M+Math.imul(K,Gt)|0,I=I+Math.imul(B,wt)|0,E=E+Math.imul(B,yr)|0,E=E+Math.imul(ae,wt)|0,M=M+Math.imul(ae,yr)|0;var Vn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,I=Math.imul(ne,Te),E=Math.imul(ne,lt),E=E+Math.imul(Y,Te)|0,M=Math.imul(Y,lt),I=I+Math.imul(Be,We)|0,E=E+Math.imul(Be,At)|0,E=E+Math.imul(Ke,We)|0,M=M+Math.imul(Ke,At)|0,I=I+Math.imul(Le,dt)|0,E=E+Math.imul(Le,Lt)|0,E=E+Math.imul(Ge,dt)|0,M=M+Math.imul(Ge,Lt)|0,I=I+Math.imul(Ne,st)|0,E=E+Math.imul(Ne,Ut)|0,E=E+Math.imul(Je,st)|0,M=M+Math.imul(Je,Ut)|0,I=I+Math.imul(je,tt)|0,E=E+Math.imul(je,qt)|0,E=E+Math.imul(Re,tt)|0,M=M+Math.imul(Re,qt)|0,I=I+Math.imul(Ee,rt)|0,E=E+Math.imul(Ee,Vt)|0,E=E+Math.imul(Me,rt)|0,M=M+Math.imul(Me,Vt)|0,I=I+Math.imul(q,at)|0,E=E+Math.imul(q,Ft)|0,E=E+Math.imul(fe,at)|0,M=M+Math.imul(fe,Ft)|0,I=I+Math.imul(re,ot)|0,E=E+Math.imul(re,Gt)|0,E=E+Math.imul(H,ot)|0,M=M+Math.imul(H,Gt)|0,I=I+Math.imul(Z,wt)|0,E=E+Math.imul(Z,yr)|0,E=E+Math.imul(K,wt)|0,M=M+Math.imul(K,yr)|0;var zi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(zi>>>26)|0,zi&=67108863,I=Math.imul(ne,We),E=Math.imul(ne,At),E=E+Math.imul(Y,We)|0,M=Math.imul(Y,At),I=I+Math.imul(Be,dt)|0,E=E+Math.imul(Be,Lt)|0,E=E+Math.imul(Ke,dt)|0,M=M+Math.imul(Ke,Lt)|0,I=I+Math.imul(Le,st)|0,E=E+Math.imul(Le,Ut)|0,E=E+Math.imul(Ge,st)|0,M=M+Math.imul(Ge,Ut)|0,I=I+Math.imul(Ne,tt)|0,E=E+Math.imul(Ne,qt)|0,E=E+Math.imul(Je,tt)|0,M=M+Math.imul(Je,qt)|0,I=I+Math.imul(je,rt)|0,E=E+Math.imul(je,Vt)|0,E=E+Math.imul(Re,rt)|0,M=M+Math.imul(Re,Vt)|0,I=I+Math.imul(Ee,at)|0,E=E+Math.imul(Ee,Ft)|0,E=E+Math.imul(Me,at)|0,M=M+Math.imul(Me,Ft)|0,I=I+Math.imul(q,ot)|0,E=E+Math.imul(q,Gt)|0,E=E+Math.imul(fe,ot)|0,M=M+Math.imul(fe,Gt)|0,I=I+Math.imul(re,wt)|0,E=E+Math.imul(re,yr)|0,E=E+Math.imul(H,wt)|0,M=M+Math.imul(H,yr)|0;var Hi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,I=Math.imul(ne,dt),E=Math.imul(ne,Lt),E=E+Math.imul(Y,dt)|0,M=Math.imul(Y,Lt),I=I+Math.imul(Be,st)|0,E=E+Math.imul(Be,Ut)|0,E=E+Math.imul(Ke,st)|0,M=M+Math.imul(Ke,Ut)|0,I=I+Math.imul(Le,tt)|0,E=E+Math.imul(Le,qt)|0,E=E+Math.imul(Ge,tt)|0,M=M+Math.imul(Ge,qt)|0,I=I+Math.imul(Ne,rt)|0,E=E+Math.imul(Ne,Vt)|0,E=E+Math.imul(Je,rt)|0,M=M+Math.imul(Je,Vt)|0,I=I+Math.imul(je,at)|0,E=E+Math.imul(je,Ft)|0,E=E+Math.imul(Re,at)|0,M=M+Math.imul(Re,Ft)|0,I=I+Math.imul(Ee,ot)|0,E=E+Math.imul(Ee,Gt)|0,E=E+Math.imul(Me,ot)|0,M=M+Math.imul(Me,Gt)|0,I=I+Math.imul(q,wt)|0,E=E+Math.imul(q,yr)|0,E=E+Math.imul(fe,wt)|0,M=M+Math.imul(fe,yr)|0;var xi=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(xi>>>26)|0,xi&=67108863,I=Math.imul(ne,st),E=Math.imul(ne,Ut),E=E+Math.imul(Y,st)|0,M=Math.imul(Y,Ut),I=I+Math.imul(Be,tt)|0,E=E+Math.imul(Be,qt)|0,E=E+Math.imul(Ke,tt)|0,M=M+Math.imul(Ke,qt)|0,I=I+Math.imul(Le,rt)|0,E=E+Math.imul(Le,Vt)|0,E=E+Math.imul(Ge,rt)|0,M=M+Math.imul(Ge,Vt)|0,I=I+Math.imul(Ne,at)|0,E=E+Math.imul(Ne,Ft)|0,E=E+Math.imul(Je,at)|0,M=M+Math.imul(Je,Ft)|0,I=I+Math.imul(je,ot)|0,E=E+Math.imul(je,Gt)|0,E=E+Math.imul(Re,ot)|0,M=M+Math.imul(Re,Gt)|0,I=I+Math.imul(Ee,wt)|0,E=E+Math.imul(Ee,yr)|0,E=E+Math.imul(Me,wt)|0,M=M+Math.imul(Me,yr)|0;var Si=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Si>>>26)|0,Si&=67108863,I=Math.imul(ne,tt),E=Math.imul(ne,qt),E=E+Math.imul(Y,tt)|0,M=Math.imul(Y,qt),I=I+Math.imul(Be,rt)|0,E=E+Math.imul(Be,Vt)|0,E=E+Math.imul(Ke,rt)|0,M=M+Math.imul(Ke,Vt)|0,I=I+Math.imul(Le,at)|0,E=E+Math.imul(Le,Ft)|0,E=E+Math.imul(Ge,at)|0,M=M+Math.imul(Ge,Ft)|0,I=I+Math.imul(Ne,ot)|0,E=E+Math.imul(Ne,Gt)|0,E=E+Math.imul(Je,ot)|0,M=M+Math.imul(Je,Gt)|0,I=I+Math.imul(je,wt)|0,E=E+Math.imul(je,yr)|0,E=E+Math.imul(Re,wt)|0,M=M+Math.imul(Re,yr)|0;var Ii=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,I=Math.imul(ne,rt),E=Math.imul(ne,Vt),E=E+Math.imul(Y,rt)|0,M=Math.imul(Y,Vt),I=I+Math.imul(Be,at)|0,E=E+Math.imul(Be,Ft)|0,E=E+Math.imul(Ke,at)|0,M=M+Math.imul(Ke,Ft)|0,I=I+Math.imul(Le,ot)|0,E=E+Math.imul(Le,Gt)|0,E=E+Math.imul(Ge,ot)|0,M=M+Math.imul(Ge,Gt)|0,I=I+Math.imul(Ne,wt)|0,E=E+Math.imul(Ne,yr)|0,E=E+Math.imul(Je,wt)|0,M=M+Math.imul(Je,yr)|0;var kn=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(kn>>>26)|0,kn&=67108863,I=Math.imul(ne,at),E=Math.imul(ne,Ft),E=E+Math.imul(Y,at)|0,M=Math.imul(Y,Ft),I=I+Math.imul(Be,ot)|0,E=E+Math.imul(Be,Gt)|0,E=E+Math.imul(Ke,ot)|0,M=M+Math.imul(Ke,Gt)|0,I=I+Math.imul(Le,wt)|0,E=E+Math.imul(Le,yr)|0,E=E+Math.imul(Ge,wt)|0,M=M+Math.imul(Ge,yr)|0;var Ds=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,I=Math.imul(ne,ot),E=Math.imul(ne,Gt),E=E+Math.imul(Y,ot)|0,M=Math.imul(Y,Gt),I=I+Math.imul(Be,wt)|0,E=E+Math.imul(Be,yr)|0,E=E+Math.imul(Ke,wt)|0,M=M+Math.imul(Ke,yr)|0;var $s=(T+I|0)+((E&8191)<<13)|0;T=(M+(E>>>13)|0)+($s>>>26)|0,$s&=67108863,I=Math.imul(ne,wt),E=Math.imul(ne,yr),E=E+Math.imul(Y,wt)|0,M=Math.imul(Y,yr);var Bs=(T+I|0)+((E&8191)<<13)|0;return T=(M+(E>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,S[0]=Xt,S[1]=hr,S[2]=ri,S[3]=ni,S[4]=ii,S[5]=si,S[6]=wn,S[7]=Wn,S[8]=ji,S[9]=Vn,S[10]=zi,S[11]=Hi,S[12]=xi,S[13]=Si,S[14]=Ii,S[15]=kn,S[16]=Ds,S[17]=$s,S[18]=Bs,T!==0&&(S[19]=T,p.length++),p};Math.imul||(C=v);function R(D,x,y){y.negative=x.negative^D.negative,y.length=D.length+x.length;for(var p=0,g=0,_=0;_>>26)|0,g+=S>>>26,S&=67108863}y.words[_]=T,p=S,S=g}return p!==0?y.words[_]=p:y.length--,y.strip()}function k(D,x,y){var p=new P;return p.mulp(D,x,y)}s.prototype.mulTo=function(x,y){var p,g=this.length+x.length;return this.length===10&&x.length===10?p=C(this,x,y):g<63?p=v(this,x,y):g<1024?p=R(this,x,y):p=k(this,x,y),p};function P(D,x){this.x=D,this.y=x}P.prototype.makeRBT=function(x){for(var y=new Array(x),p=s.prototype._countBits(x)-1,g=0;g>=1;return g},P.prototype.permute=function(x,y,p,g,_,S){for(var T=0;T>>1)_++;return 1<<_+1+g},P.prototype.conjugate=function(x,y,p){if(!(p<=1))for(var g=0;g

      >>13,p[2*S+1]=_&8191,_=_>>>13;for(S=2*y;S>=26,y+=g/67108864|0,y+=_>>>26,this.words[p]=_&67108863}return y!==0&&(this.words[p]=y,this.length++),this},s.prototype.muln=function(x){return this.clone().imuln(x)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(x){var y=b(x);if(y.length===0)return new s(1);for(var p=this,g=0;g=0);var y=x%26,p=(x-y)/26,g=67108863>>>26-y<<26-y,_;if(y!==0){var S=0;for(_=0;_>>26-y}S&&(this.words[_]=S,this.length++)}if(p!==0){for(_=this.length-1;_>=0;_--)this.words[_+p]=this.words[_];for(_=0;_=0);var g;y?g=(y-y%26)/26:g=0;var _=x%26,S=Math.min((x-_)/26,this.length),T=67108863^67108863>>>_<<_,I=p;if(g-=S,g=Math.max(0,g),I){for(var E=0;ES)for(this.length-=S,E=0;E=0&&(M!==0||E>=g);E--){var A=this.words[E]|0;this.words[E]=M<<26-_|A>>>_,M=A&T}return I&&M!==0&&(I.words[I.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(x,y,p){return n(this.negative===0),this.iushrn(x,y,p)},s.prototype.shln=function(x){return this.clone().ishln(x)},s.prototype.ushln=function(x){return this.clone().iushln(x)},s.prototype.shrn=function(x){return this.clone().ishrn(x)},s.prototype.ushrn=function(x){return this.clone().iushrn(x)},s.prototype.testn=function(x){n(typeof x=="number"&&x>=0);var y=x%26,p=(x-y)/26,g=1<=0);var y=x%26,p=(x-y)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(y!==0&&p++,this.length=Math.min(p,this.length),y!==0){var g=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},s.prototype.isubn=function(x){if(n(typeof x=="number"),n(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(I/67108864|0),this.words[_+p]=S&67108863}for(;_>26,this.words[_+p]=S&67108863;if(T===0)return this.strip();for(n(T===-1),T=0,_=0;_>26,this.words[_]=S&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(x,y){var p=this.length-x.length,g=this.clone(),_=x,S=_.words[_.length-1]|0,T=this._countBits(S);p=26-T,p!==0&&(_=_.ushln(p),g.iushln(p),S=_.words[_.length-1]|0);var I=g.length-_.length,E;if(y!=="mod"){E=new s(null),E.length=I+1,E.words=new Array(E.length);for(var M=0;M=0;B--){var ae=(g.words[_.length+B]|0)*67108864+(g.words[_.length+B-1]|0);for(ae=Math.min(ae/S|0,67108863),g._ishlnsubmul(_,ae,B);g.negative!==0;)ae--,g.negative=0,g._ishlnsubmul(_,1,B),g.isZero()||(g.negative^=1);E&&(E.words[B]=ae)}return E&&E.strip(),g.strip(),y!=="div"&&p!==0&&g.iushrn(p),{div:E||null,mod:g}},s.prototype.divmod=function(x,y,p){if(n(!x.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var g,_,S;return this.negative!==0&&x.negative===0?(S=this.neg().divmod(x,y),y!=="mod"&&(g=S.div.neg()),y!=="div"&&(_=S.mod.neg(),p&&_.negative!==0&&_.iadd(x)),{div:g,mod:_}):this.negative===0&&x.negative!==0?(S=this.divmod(x.neg(),y),y!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&x.negative?(S=this.neg().divmod(x.neg(),y),y!=="div"&&(_=S.mod.neg(),p&&_.negative!==0&&_.isub(x)),{div:S.div,mod:_}):x.length>this.length||this.cmp(x)<0?{div:new s(0),mod:this}:x.length===1?y==="div"?{div:this.divn(x.words[0]),mod:null}:y==="mod"?{div:null,mod:new s(this.modn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new s(this.modn(x.words[0]))}:this._wordDiv(x,y)},s.prototype.div=function(x){return this.divmod(x,"div",!1).div},s.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},s.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},s.prototype.divRound=function(x){var y=this.divmod(x);if(y.mod.isZero())return y.div;var p=y.div.negative!==0?y.mod.isub(x):y.mod,g=x.ushrn(1),_=x.andln(1),S=p.cmp(g);return S<0||_===1&&S===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},s.prototype.modn=function(x){n(x<=67108863);for(var y=(1<<26)%x,p=0,g=this.length-1;g>=0;g--)p=(y*p+(this.words[g]|0))%x;return p},s.prototype.idivn=function(x){n(x<=67108863);for(var y=0,p=this.length-1;p>=0;p--){var g=(this.words[p]|0)+y*67108864;this.words[p]=g/x|0,y=g%x}return this.strip()},s.prototype.divn=function(x){return this.clone().idivn(x)},s.prototype.egcd=function(x){n(x.negative===0),n(!x.isZero());var y=this,p=x.clone();y.negative!==0?y=y.umod(x):y=y.clone();for(var g=new s(1),_=new s(0),S=new s(0),T=new s(1),I=0;y.isEven()&&p.isEven();)y.iushrn(1),p.iushrn(1),++I;for(var E=p.clone(),M=y.clone();!y.isZero();){for(var A=0,B=1;!(y.words[0]&B)&&A<26;++A,B<<=1);if(A>0)for(y.iushrn(A);A-- >0;)(g.isOdd()||_.isOdd())&&(g.iadd(E),_.isub(M)),g.iushrn(1),_.iushrn(1);for(var ae=0,W=1;!(p.words[0]&W)&&ae<26;++ae,W<<=1);if(ae>0)for(p.iushrn(ae);ae-- >0;)(S.isOdd()||T.isOdd())&&(S.iadd(E),T.isub(M)),S.iushrn(1),T.iushrn(1);y.cmp(p)>=0?(y.isub(p),g.isub(S),_.isub(T)):(p.isub(y),S.isub(g),T.isub(_))}return{a:S,b:T,gcd:p.iushln(I)}},s.prototype._invmp=function(x){n(x.negative===0),n(!x.isZero());var y=this,p=x.clone();y.negative!==0?y=y.umod(x):y=y.clone();for(var g=new s(1),_=new s(0),S=p.clone();y.cmpn(1)>0&&p.cmpn(1)>0;){for(var T=0,I=1;!(y.words[0]&I)&&T<26;++T,I<<=1);if(T>0)for(y.iushrn(T);T-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var E=0,M=1;!(p.words[0]&M)&&E<26;++E,M<<=1);if(E>0)for(p.iushrn(E);E-- >0;)_.isOdd()&&_.iadd(S),_.iushrn(1);y.cmp(p)>=0?(y.isub(p),g.isub(_)):(p.isub(y),_.isub(g))}var A;return y.cmpn(1)===0?A=g:A=_,A.cmpn(0)<0&&A.iadd(x),A},s.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var y=this.clone(),p=x.clone();y.negative=0,p.negative=0;for(var g=0;y.isEven()&&p.isEven();g++)y.iushrn(1),p.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;p.isEven();)p.iushrn(1);var _=y.cmp(p);if(_<0){var S=y;y=p,p=S}else if(_===0||p.cmpn(1)===0)break;y.isub(p)}while(!0);return p.iushln(g)},s.prototype.invm=function(x){return this.egcd(x).a.umod(x)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(x){return this.words[0]&x},s.prototype.bincn=function(x){n(typeof x=="number");var y=x%26,p=(x-y)/26,g=1<>>26,T&=67108863,this.words[S]=T}return _!==0&&(this.words[S]=_,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(x){var y=x<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var p;if(this.length>1)p=1;else{y&&(x=-x),n(x<=67108863,"Number is too big");var g=this.words[0]|0;p=g===x?0:gx.length)return 1;if(this.length=0;p--){var g=this.words[p]|0,_=x.words[p]|0;if(g!==_){g<_?y=-1:g>_&&(y=1);break}}return y},s.prototype.gtn=function(x){return this.cmpn(x)===1},s.prototype.gt=function(x){return this.cmp(x)===1},s.prototype.gten=function(x){return this.cmpn(x)>=0},s.prototype.gte=function(x){return this.cmp(x)>=0},s.prototype.ltn=function(x){return this.cmpn(x)===-1},s.prototype.lt=function(x){return this.cmp(x)===-1},s.prototype.lten=function(x){return this.cmpn(x)<=0},s.prototype.lte=function(x){return this.cmp(x)<=0},s.prototype.eqn=function(x){return this.cmpn(x)===0},s.prototype.eq=function(x){return this.cmp(x)===0},s.red=function(x){return new V(x)},s.prototype.toRed=function(x){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(x){return this.red=x,this},s.prototype.forceRed=function(x){return n(!this.red,"Already a number in reduction context"),this._forceRed(x)},s.prototype.redAdd=function(x){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},s.prototype.redIAdd=function(x){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},s.prototype.redSub=function(x){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},s.prototype.redISub=function(x){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},s.prototype.redShl=function(x){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},s.prototype.redMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},s.prototype.redIMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(x){return n(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var N={k256:null,p224:null,p192:null,p25519:null};function $(D,x){this.name=D,this.p=new s(x,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var x=new s(null);return x.words=new Array(Math.ceil(this.n/13)),x},$.prototype.ireduce=function(x){var y=x,p;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),p=y.bitLength();while(p>this.n);var g=p0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},$.prototype.split=function(x,y){x.iushrn(this.n,0,y)},$.prototype.imulK=function(x){return x.imul(this.k)};function j(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(j,$),j.prototype.split=function(x,y){for(var p=4194303,g=Math.min(x.length,9),_=0;_>>22,S=T}S>>>=22,x.words[_-10]=S,S===0&&x.length>10?x.length-=10:x.length-=9},j.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var y=0,p=0;p>>=26,x.words[p]=_,y=g}return y!==0&&(x.words[x.length++]=y),x},s._prime=function(x){if(N[x])return N[x];var y;if(x==="k256")y=new j;else if(x==="p224")y=new G;else if(x==="p192")y=new U;else if(x==="p25519")y=new L;else throw new Error("Unknown prime "+x);return N[x]=y,y};function V(D){if(typeof D=="string"){var x=s._prime(D);this.m=x.p,this.prime=x}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}V.prototype._verify1=function(x){n(x.negative===0,"red works only with positives"),n(x.red,"red works only with red numbers")},V.prototype._verify2=function(x,y){n((x.negative|y.negative)===0,"red works only with positives"),n(x.red&&x.red===y.red,"red works only with red numbers")},V.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):x.umod(this.m)._forceRed(this)},V.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},V.prototype.add=function(x,y){this._verify2(x,y);var p=x.add(y);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},V.prototype.iadd=function(x,y){this._verify2(x,y);var p=x.iadd(y);return p.cmp(this.m)>=0&&p.isub(this.m),p},V.prototype.sub=function(x,y){this._verify2(x,y);var p=x.sub(y);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},V.prototype.isub=function(x,y){this._verify2(x,y);var p=x.isub(y);return p.cmpn(0)<0&&p.iadd(this.m),p},V.prototype.shl=function(x,y){return this._verify1(x),this.imod(x.ushln(y))},V.prototype.imul=function(x,y){return this._verify2(x,y),this.imod(x.imul(y))},V.prototype.mul=function(x,y){return this._verify2(x,y),this.imod(x.mul(y))},V.prototype.isqr=function(x){return this.imul(x,x.clone())},V.prototype.sqr=function(x){return this.mul(x,x)},V.prototype.sqrt=function(x){if(x.isZero())return x.clone();var y=this.m.andln(3);if(n(y%2===1),y===3){var p=this.m.add(new s(1)).iushrn(2);return this.pow(x,p)}for(var g=this.m.subn(1),_=0;!g.isZero()&&g.andln(1)===0;)_++,g.iushrn(1);n(!g.isZero());var S=new s(1).toRed(this),T=S.redNeg(),I=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,I).cmp(T)!==0;)E.redIAdd(T);for(var M=this.pow(E,g),A=this.pow(x,g.addn(1).iushrn(1)),B=this.pow(x,g),ae=_;B.cmp(S)!==0;){for(var W=B,Z=0;W.cmp(S)!==0;Z++)W=W.redSqr();n(Z=0;_--){for(var M=y.words[_],A=E-1;A>=0;A--){var B=M>>A&1;if(S!==g[0]&&(S=this.sqr(S)),B===0&&T===0){I=0;continue}T<<=1,T|=B,I++,!(I!==p&&(_!==0||A!==0))&&(S=this.mul(S,g[T]),I=0,T=0)}E=26}return S},V.prototype.convertTo=function(x){var y=x.umod(this.m);return y===x?y.clone():y},V.prototype.convertFrom=function(x){var y=x.clone();return y.red=null,y},s.mont=function(x){return new te(x)};function te(D){V.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(te,V),te.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},te.prototype.convertFrom=function(x){var y=this.imod(x.mul(this.rinv));return y.red=null,y},te.prototype.imul=function(x,y){if(x.isZero()||y.isZero())return x.words[0]=0,x.length=1,x;var p=x.imul(y),g=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=p.isub(g).iushrn(this.shift),S=_;return _.cmp(this.m)>=0?S=_.isub(this.m):_.cmpn(0)<0&&(S=_.iadd(this.m)),S._forceRed(this)},te.prototype.mul=function(x,y){if(x.isZero()||y.isZero())return new s(0)._forceRed(this);var p=x.mul(y),g=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=p.isub(g).iushrn(this.shift),S=_;return _.cmp(this.m)>=0?S=_.isub(this.m):_.cmpn(0)<0&&(S=_.iadd(this.m)),S._forceRed(this)},te.prototype.invm=function(x){var y=this.imod(x._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(r,ut)}(Zj);var U0=Zj.exports,Jj={};(function(r){var e=r;function t(s,a){if(Array.isArray(s))return s.slice();if(!s)return[];var o=[];if(typeof s!="string"){for(var l=0;l>8,h=u&255;f?o.push(f,h):o.push(h)}return o}e.toArray=t;function n(s){return s.length===1?"0"+s:s}e.zero2=n;function i(s){for(var a="",o=0;o(C>>1)-1?k=(C>>1)-P:k=P,R.isubn(k)):k=0,b[v]=k,R.iushrn(1)}return b}e.getNAF=s;function a(f,h){var m=[[],[]];f=f.clone(),h=h.clone();for(var b=0,v=0,C;f.cmpn(-b)>0||h.cmpn(-v)>0;){var R=f.andln(3)+b&3,k=h.andln(3)+v&3;R===3&&(R=-1),k===3&&(k=-1);var P;R&1?(C=f.andln(7)+b&7,(C===3||C===5)&&k===2?P=-R:P=R):P=0,m[0].push(P);var N;k&1?(C=h.andln(7)+v&7,(C===3||C===5)&&R===2?N=-k:N=k):N=0,m[1].push(N),2*b===P+1&&(b=1-b),2*v===N+1&&(v=1-v),f.iushrn(1),h.iushrn(1)}return m}e.getJSF=a;function o(f,h,m){var b="_"+h;f.prototype[h]=function(){return this[b]!==void 0?this[b]:this[b]=m.call(this)}}e.cachedProperty=o;function l(f){return typeof f=="string"?e.toArray(f,"hex"):f}e.parseBytes=l;function u(f){return new t(f,"hex","le")}e.intFromLE=u}(hl);var Yj={exports:{}},Qj;Yj.exports=function(e){return Qj||(Qj=new lm(null)),Qj.generate(e)};function lm(r){this.rand=r}if(Yj.exports.Rand=lm,lm.prototype.generate=function(e){return this._rand(e)},lm.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var qk=um;um.prototype.point=function(){throw new Error("Not implemented")},um.prototype.validate=function(){throw new Error("Not implemented")},um.prototype._fixedNafMul=function(e,t){Hk(e.precomputed);var n=e._getDoubles(),i=zk(t,1,this._bitLength),s=(1<=o;u--)l=(l<<1)+i[u];a.push(l)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),m=s;m>0;m--){for(o=0;o=0;l--){for(var u=0;l>=0&&a[l]===0;l--)u++;if(l>=0&&u++,o=o.dblp(u),l<0)break;var f=a[l];Hk(f!==0),e.type==="affine"?f>0?o=o.mixedAdd(s[f-1>>1]):o=o.mixedAdd(s[-f-1>>1].neg()):f>0?o=o.add(s[f-1>>1]):o=o.add(s[-f-1>>1].neg())}return e.type==="affine"?o.toP():o},um.prototype._wnafMulAdd=function(e,t,n,i,s){var a=this._wnafT1,o=this._wnafT2,l=this._wnafT3,u=0,f,h,m;for(f=0;f=1;f-=2){var v=f-1,C=f;if(a[v]!==1||a[C]!==1){l[v]=zk(n[v],a[v],this._bitLength),l[C]=zk(n[C],a[C],this._bitLength),u=Math.max(l[v].length,u),u=Math.max(l[C].length,u);continue}var R=[t[v],null,null,t[C]];t[v].y.cmp(t[C].y)===0?(R[1]=t[v].add(t[C]),R[2]=t[v].toJ().mixedAdd(t[C].neg())):t[v].y.cmp(t[C].y.redNeg())===0?(R[1]=t[v].toJ().mixedAdd(t[C]),R[2]=t[v].add(t[C].neg())):(R[1]=t[v].toJ().mixedAdd(t[C]),R[2]=t[v].toJ().mixedAdd(t[C].neg()));var k=[-3,-1,-5,-7,0,7,5,1,3],P=lct(n[v],n[C]);for(u=Math.max(P[0].length,u),l[v]=new Array(u),l[C]=new Array(u),h=0;h=0;f--){for(var U=0;f>=0;){var L=!0;for(h=0;h=0&&U++,j=j.dblp(U),f<0)break;for(h=0;h0?m=o[h][V-1>>1]:V<0&&(m=o[h][-V-1>>1].neg()),m.type==="affine"?j=j.mixedAdd(m):j=j.add(m))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step):!1},Eu.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(b=u,v=f),h.negative&&(h=h.neg(),m=m.neg()),b.negative&&(b=b.neg(),v=v.neg()),[{a:h,b:m},{a:b,b:v}]},Cu.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],s=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),o=s.mul(n.a),l=a.mul(i.a),u=s.mul(n.b),f=a.mul(i.b),h=e.sub(o).sub(l),m=u.add(f).neg();return{k1:h,k2:m}},Cu.prototype.pointFromX=function(e,t){e=new bs(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(t&&!s||!t&&s)&&(i=i.redNeg()),this.point(e,i)},Cu.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0},Cu.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,a=0;a":""},Da.prototype.isInfinity=function(){return this.inf},Da.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},Da.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),a=s.redSqr().redISub(this.x.redAdd(this.x)),o=s.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},Da.prototype.getX=function(){return this.x.fromRed()},Da.prototype.getY=function(){return this.y.fromRed()},Da.prototype.mul=function(e){return e=new bs(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Da.prototype.mulAdd=function(e,t,n){var i=[this,t],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},Da.prototype.jmulAdd=function(e,t,n){var i=[this,t],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)},Da.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},Da.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},Da.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function no(r,e,t,n){a5.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new bs(0)):(this.x=new bs(e,16),this.y=new bs(t,16),this.z=new bs(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ez(no,a5.BasePoint),Cu.prototype.jpoint=function(e,t,n){return new no(this,e,t,n)},no.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},no.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},no.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),s=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),u=a.redSub(o);if(l.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),h=f.redMul(l),m=i.redMul(f),b=u.redSqr().redIAdd(h).redISub(m).redISub(m),v=u.redMul(m.redISub(b)).redISub(a.redMul(h)),C=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(b,v,C)},no.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),s=this.y,a=e.y.redMul(t).redMul(this.z),o=n.redSub(i),l=s.redSub(a);if(o.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),f=u.redMul(o),h=n.redMul(u),m=l.redSqr().redIAdd(f).redISub(h).redISub(h),b=l.redMul(h.redISub(m)).redISub(s.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(m,b,v)},no.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}},no.prototype.inspect=function(){return this.isInfinity()?"":""},no.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var o5=U0,Xme=Vo,Wk=qk,hct=hl;function c5(r){Wk.call(this,"mont",r),this.a=new o5(r.a,16).toRed(this.red),this.b=new o5(r.b,16).toRed(this.red),this.i4=new o5(4).toRed(this.red).redInvm(),this.two=new o5(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Xme(c5,Wk);var pct=c5;c5.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t),s=i.redSqrt();return s.redSqr().cmp(i)===0};function $a(r,e,t){Wk.BasePoint.call(this,r,"projective"),e===null&&t===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o5(e,16),this.z=new o5(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Xme($a,Wk.BasePoint),c5.prototype.decodePoint=function(e,t){return this.point(hct.toArray(e,t),1)},c5.prototype.point=function(e,t){return new $a(this,e,t)},c5.prototype.pointFromJSON=function(e){return $a.fromJSON(this,e)},$a.prototype.precompute=function(){},$a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},$a.fromJSON=function(e,t){return new $a(e,t[0],t[1]||e.one)},$a.prototype.inspect=function(){return this.isInfinity()?"":""},$a.prototype.isInfinity=function(){return this.z.cmpn(0)===0},$a.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),s=t.redSub(i),a=t.redMul(i),o=s.redMul(i.redAdd(this.curve.a24.redMul(s)));return this.curve.point(a,o)},$a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},$a.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),s=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(n),l=s.redMul(i),u=t.z.redMul(o.redAdd(l).redSqr()),f=t.x.redMul(o.redISub(l).redSqr());return this.curve.point(u,f)},$a.prototype.mul=function(e){for(var t=e.clone(),n=this,i=this.curve.point(null,null),s=this,a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)a[o]===0?(n=n.diffAdd(i,s),i=i.dbl()):(i=n.diffAdd(i,s),n=n.dbl());return i},$a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},$a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},$a.prototype.eq=function(e){return this.getX().cmp(e.getX())===0},$a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},$a.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var mct=hl,F0=U0,ege=Vo,Vk=qk,gct=mct.assert;function th(r){this.twisted=(r.a|0)!==1,this.mOneA=this.twisted&&(r.a|0)===-1,this.extended=this.mOneA,Vk.call(this,"edwards",r),this.a=new F0(r.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new F0(r.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new F0(r.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),gct(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(r.c|0)===1}ege(th,Vk);var bct=th;th.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},th.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},th.prototype.jpoint=function(e,t,n,i){return this.point(e,t,n,i)},th.prototype.pointFromX=function(e,t){e=new F0(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(s.redInvm()),o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var l=o.fromRed().isOdd();return(t&&!l||!t&&l)&&(o=o.redNeg()),this.point(e,o)},th.prototype.pointFromY=function(e,t){e=new F0(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(s.redInvm());if(a.cmp(this.zero)===0){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},th.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),i=t.redMul(this.a).redAdd(n),s=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return i.cmp(s)===0};function $i(r,e,t,n,i){Vk.BasePoint.call(this,r,"projective"),e===null&&t===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new F0(e,16),this.y=new F0(t,16),this.z=n?new F0(n,16):this.curve.one,this.t=i&&new F0(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}ege($i,Vk.BasePoint),th.prototype.pointFromJSON=function(e){return $i.fromJSON(this,e)},th.prototype.point=function(e,t,n,i){return new $i(this,e,t,n,i)},$i.fromJSON=function(e,t){return new $i(e,t[0],t[1],t[2])},$i.prototype.inspect=function(){return this.isInfinity()?"":""},$i.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},$i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(n),l=i.redSub(t),u=s.redMul(o),f=a.redMul(l),h=s.redMul(l),m=o.redMul(a);return this.curve.point(u,f,m,h)},$i.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),n=this.y.redSqr(),i,s,a,o,l,u;if(this.curve.twisted){o=this.curve._mulA(t);var f=o.redAdd(n);this.zOne?(i=e.redSub(t).redSub(n).redMul(f.redSub(this.curve.two)),s=f.redMul(o.redSub(n)),a=f.redSqr().redSub(f).redSub(f)):(l=this.z.redSqr(),u=f.redSub(l).redISub(l),i=e.redSub(t).redISub(n).redMul(u),s=f.redMul(o.redSub(n)),a=f.redMul(u))}else o=t.redAdd(n),l=this.curve._mulC(this.z).redSqr(),u=o.redSub(l).redSub(l),i=this.curve._mulC(e.redISub(o)).redMul(u),s=this.curve._mulC(o).redMul(t.redISub(n)),a=o.redMul(u);return this.curve.point(i,s,a)},$i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},$i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),o=s.redSub(i),l=s.redAdd(i),u=n.redAdd(t),f=a.redMul(o),h=l.redMul(u),m=a.redMul(u),b=o.redMul(l);return this.curve.point(f,h,b,m)},$i.prototype._projAdd=function(e){var t=this.z.redMul(e.z),n=t.redSqr(),i=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(s),o=n.redSub(a),l=n.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(s),f=t.redMul(o).redMul(u),h,m;return this.curve.twisted?(h=t.redMul(l).redMul(s.redSub(this.curve._mulA(i))),m=o.redMul(l)):(h=t.redMul(l).redMul(s.redSub(i)),m=this.curve._mulC(o).redMul(l)),this.curve.point(f,h,m)},$i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},$i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},$i.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},$i.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},$i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},$i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},$i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},$i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},$i.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},$i.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),this.x.cmp(t)===0)return!0}},$i.prototype.toP=$i.prototype.normalize,$i.prototype.mixedAdd=$i.prototype.add,function(r){var e=r;e.base=qk,e.short=dct,e.mont=pct,e.edwards=bct}(Xj);var Gk={},tz,tge;function vct(){return tge||(tge=1,tz={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),tz}(function(r){var e=r,t=h7,n=Xj,i=hl,s=i.assert;function a(u){u.type==="short"?this.curve=new n.short(u):u.type==="edwards"?this.curve=new n.edwards(u):this.curve=new n.mont(u),this.g=this.curve.g,this.n=this.curve.n,this.hash=u.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=a;function o(u,f){Object.defineProperty(e,u,{configurable:!0,enumerable:!0,get:function(){var h=new a(f);return Object.defineProperty(e,u,{configurable:!0,enumerable:!0,value:h}),h}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var l;try{l=vct()}catch{l=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",l]})})(Gk);var wct=h7,Yb=Jj,rge=Gb;function fm(r){if(!(this instanceof fm))return new fm(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Yb.toArray(r.entropy,r.entropyEnc||"hex"),t=Yb.toArray(r.nonce,r.nonceEnc||"hex"),n=Yb.toArray(r.pers,r.persEnc||"hex");rge(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var yct=fm;fm.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},fm.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=Yb.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Kk=U0,nz=hl,Cct=nz.assert;function Zk(r,e){if(r instanceof Zk)return r;this._importDER(r,e)||(Cct(r.r&&r.s,"Signature without r or s"),this.r=new Kk(r.r,16),this.s=new Kk(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var Act=Zk;function Sct(){this.place=0}function iz(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4||r[e.place]===0)return!1;for(var i=0,s=0,a=e.place;s>>=0;return i<=127?!1:(e.place=a,i)}function nge(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}Zk.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=nge(t),n=nge(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];sz(i,t.length),i=i.concat(t),i.push(2),sz(i,n.length);var s=i.concat(n),a=[48];return sz(a,s.length),a=a.concat(s),nz.encode(a,e)};var j0=U0,ige=yct,Ict=hl,az=Gk,Tct=Qme,sge=Ict.assert,oz=Ect,Jk=Act;function Au(r){if(!(this instanceof Au))return new Au(r);typeof r=="string"&&(sge(Object.prototype.hasOwnProperty.call(az,r),"Unknown curve "+r),r=az[r]),r instanceof az.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var kct=Au;Au.prototype.keyPair=function(e){return new oz(this,e)},Au.prototype.keyFromPrivate=function(e,t){return oz.fromPrivate(this,e,t)},Au.prototype.keyFromPublic=function(e,t){return oz.fromPublic(this,e,t)},Au.prototype.genKeyPair=function(e){e||(e={});for(var t=new ige({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Tct(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new j0(2));;){var s=new j0(t.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},Au.prototype._truncateToN=function(e,t,n){var i;if(j0.isBN(e)||typeof e=="number")e=new j0(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new j0(e,16);else{var s=e.toString();i=s.length+1>>>1,e=new j0(s,16)}typeof n!="number"&&(n=i*8);var a=n-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Au.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(e,!1,i.msgBitLength);for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),o=e.toArray("be",s),l=new ige({hash:this.hash,entropy:a,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new j0(1)),f=0;;f++){var h=i.k?i.k(f):new j0(l.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(u)>=0)){var m=this.g.mul(h);if(!m.isInfinity()){var b=m.getX(),v=b.umod(this.n);if(v.cmpn(0)!==0){var C=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var R=(m.getY().isOdd()?1:0)|(b.cmp(v)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),R^=1),new Jk({r:v,s:C,recoveryParam:R})}}}}}},Au.prototype.verify=function(e,t,n,i,s){s||(s={}),e=this._truncateToN(e,!1,s.msgBitLength),n=this.keyFromPublic(n,i),t=new Jk(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var l=o.invm(this.n),u=l.mul(e).umod(this.n),f=l.mul(a).umod(this.n),h;return this.curve._maxwellTrick?(h=this.g.jmulAdd(u,n.getPublic(),f),h.isInfinity()?!1:h.eqXToP(a)):(h=this.g.mulAdd(u,n.getPublic(),f),h.isInfinity()?!1:h.getX().umod(this.n).cmp(a)===0)},Au.prototype.recoverPubKey=function(r,e,t,n){sge((3&t)===t,"The recovery param is more than two bits"),e=new Jk(e,n);var i=this.n,s=new j0(r),a=e.r,o=e.s,l=t&1,u=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?a=this.curve.pointFromX(a.add(this.curve.n),l):a=this.curve.pointFromX(a,l);var f=e.r.invm(i),h=i.sub(s).mul(f).umod(i),m=o.mul(f).umod(i);return this.g.mulAdd(h,a,m)},Au.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new Jk(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(r,e,i)}catch{continue}if(s.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var b7=hl,age=b7.assert,oge=b7.parseBytes,l5=b7.cachedProperty;function Ba(r,e){this.eddsa=r,this._secret=oge(e.secret),r.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=oge(e.pub)}Ba.fromPublic=function(e,t){return t instanceof Ba?t:new Ba(e,{pub:t})},Ba.fromSecret=function(e,t){return t instanceof Ba?t:new Ba(e,{secret:t})},Ba.prototype.secret=function(){return this._secret},l5(Ba,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),l5(Ba,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),l5(Ba,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i}),l5(Ba,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),l5(Ba,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),l5(Ba,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),Ba.prototype.sign=function(e){return age(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Ba.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Ba.prototype.getSecret=function(e){return age(this._secret,"KeyPair is public only"),b7.encode(this.secret(),e)},Ba.prototype.getPublic=function(e){return b7.encode(this.pubBytes(),e)};var Rct=Ba,Mct=U0,Yk=hl,cge=Yk.assert,Qk=Yk.cachedProperty,Pct=Yk.parseBytes;function Qb(r,e){this.eddsa=r,typeof e!="object"&&(e=Pct(e)),Array.isArray(e)&&(cge(e.length===r.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,r.encodingLength),S:e.slice(r.encodingLength)}),cge(e.R&&e.S,"Signature without R or S"),r.isPoint(e.R)&&(this._R=e.R),e.S instanceof Mct&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Qk(Qb,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),Qk(Qb,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),Qk(Qb,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),Qk(Qb,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),Qb.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Qb.prototype.toHex=function(){return Yk.encode(this.toBytes(),"hex").toUpperCase()};var Oct=Qb,Nct=h7,Dct=Gk,u5=hl,$ct=u5.assert,lge=u5.parseBytes,uge=Rct,fge=Oct;function Nc(r){if($ct(r==="ed25519","only tested with ed25519 so far"),!(this instanceof Nc))return new Nc(r);r=Dct[r].curve,this.curve=r,this.g=r.g,this.g.precompute(r.n.bitLength()+1),this.pointClass=r.point().constructor,this.encodingLength=Math.ceil(r.n.bitLength()/8),this.hash=Nct.sha512}var Bct=Nc;Nc.prototype.sign=function(e,t){e=lge(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),s=this.g.mul(i),a=this.encodePoint(s),o=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),l=i.add(o).umod(this.curve.n);return this.makeSignature({R:s,S:l,Rencoded:a})},Nc.prototype.verify=function(e,t,n){if(e=lge(e),t=this.makeSignature(t),t.S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var i=this.keyFromPublic(n),s=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S()),o=t.R().add(i.pub().mul(s));return o.eq(a)},Nc.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{if(e.length&&!e.includes(n))return;const i=r[n];t.push(...i.accounts)}),t}function hge(r,e){return r.includes(":")?[r]:e.chains||[]}var Uct=Object.defineProperty,pge=Object.getOwnPropertySymbols,Fct=Object.prototype.hasOwnProperty,jct=Object.prototype.propertyIsEnumerable,mge=(r,e,t)=>e in r?Uct(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,gge=(r,e)=>{for(var t in e||(e={}))Fct.call(e,t)&&mge(r,t,e[t]);if(pge)for(var t of pge(e))jct.call(e,t)&&mge(r,t,e[t]);return r};const zct="ReactNative",pl={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Hct="js";function Xk(){return typeof vt<"u"&&typeof vt.versions<"u"&&typeof vt.versions.node<"u"}function d5(){return!_b()&&!!ox()&&navigator.product===zct}function v7(){return!Xk()&&!!ox()&&!!_b()}function w7(){return d5()?pl.reactNative:Xk()?pl.node:v7()?pl.browser:pl.unknown}function qct(){var r;try{return d5()&&typeof sr<"u"&&typeof(sr==null?void 0:sr.Application)<"u"?(r=sr.Application)==null?void 0:r.applicationId:void 0}catch{return}}function Wct(r,e){let t=w0.parse(r);return t=gge(gge({},t),e),r=w0.stringify(t),r}function bge(){return eU()||{name:"",description:"",url:"",icons:[""]}}function Vct(){if(w7()===pl.reactNative&&typeof sr<"u"&&typeof(sr==null?void 0:sr.Platform)<"u"){const{OS:t,Version:n}=sr.Platform;return[t,n].join("-")}const r=Jle();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function Gct(){var r;const e=w7();return e===pl.browser?[e,((r=QL())==null?void 0:r.host)||"unknown"].join(":"):e}function vge(r,e,t){const n=Vct(),i=Gct();return[[r,e].join("-"),[Hct,t].join("-"),n,i].join("/")}function Kct({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:a,bundleId:o}){const l=t.split("?"),u=vge(r,e,n),f={auth:i,ua:u,projectId:s,useOnCloseEvent:a||void 0,origin:o||void 0},h=Wct(l[1]||"",f);return l[0]+"?"+h}function Xb(r,e){return r.filter(t=>e.includes(t)).length===r.length}function wge(r){return Object.fromEntries(r.entries())}function yge(r){return new Map(Object.entries(r))}function e2(r=qe.FIVE_MINUTES,e){const t=qe.toMiliseconds(r||qe.FIVE_MINUTES);let n,i,s;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a))},reject:a=>{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(e))},t),n=a,i=o})}}function h5(r,e,t){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(t)),e);try{const a=await r;n(a)}catch(a){i(a)}clearTimeout(s)})}function xge(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function Zct(r){return xge("topic",r)}function Jct(r){return xge("id",r)}function _ge(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")n.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return n}function ia(r,e){return qe.fromMiliseconds(Date.now()+qe.toMiliseconds(r))}function dm(r){return Date.now()>=qe.toMiliseconds(r)}function mn(r,e){return`${r}${e?`:${e}`:""}`}function eR(r=[],e=[]){return[...new Set([...r,...e])]}async function Yct({id:r,topic:e,wcDeepLink:t}){var n;try{if(!t)return;const i=typeof t=="string"?JSON.parse(t):t,s=i==null?void 0:i.href;if(typeof s!="string")return;const a=Qct(s,r,e),o=w7();if(o===pl.browser){if(!((n=_b())!=null&&n.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}a.startsWith("https://")||a.startsWith("http://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,elt()?"_blank":"_self","noreferrer noopener")}else o===pl.reactNative&&typeof(sr==null?void 0:sr.Linking)<"u"&&await sr.Linking.openURL(a)}catch(i){console.error(i)}}function Qct(r,e,t){const n=`requestId=${e}&sessionTopic=${t}`;r.endsWith("/")&&(r=r.slice(0,-1));let i=`${r}`;if(r.startsWith("https://t.me")){const s=r.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${tlt(n,!0)}`}else i=`${i}/wc?${n}`;return i}async function Xct(r,e){let t="";try{if(v7()&&(t=localStorage.getItem(e),t))return t;t=await r.getItem(e)}catch(n){console.error(n)}return t}function Ege(r,e){if(!r.includes(e))return null;const t=r.split(/([&,?,=])/),n=t.indexOf(e);return t[n+2]}function Cge(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,r=>{const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})}function cz(){return typeof vt<"u"&&vt.env.IS_VITEST==="true"}function elt(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function tlt(r,e=!1){const t=It.from(r).toString("base64");return e?t.replace(/[=]/g,""):t}function Age(r){return It.from(r,"base64").toString("utf-8")}const rlt="https://rpc.walletconnect.org/v1";async function nlt(r,e,t,n,i,s){switch(t.t){case"eip191":return ilt(r,e,t.s);case"eip1271":return await slt(r,e,t.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}function ilt(r,e,t){return oct(mme(e),t).toLowerCase()===r.toLowerCase()}async function slt(r,e,t,n,i,s){const a=f5(n);if(!a.namespace||!a.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{const o="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",u="0000000000000000000000000000000000000000000000000000000000000041",f=t.substring(2),h=mme(e).substring(2),m=o+h+l+u+f,b=await fetch(`${s||rlt}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:alt(),jsonrpc:"2.0",method:"eth_call",params:[{to:r,data:m},"latest"]})}),{result:v}=await b.json();return v?v.slice(0,o.length).toLowerCase()===o.toLowerCase():!1}catch(o){return console.error("isValidEip1271Signature: ",o),!1}}function alt(){return Date.now()+Math.floor(Math.random()*1e3)}var olt=Object.defineProperty,clt=Object.defineProperties,llt=Object.getOwnPropertyDescriptors,Sge=Object.getOwnPropertySymbols,ult=Object.prototype.hasOwnProperty,flt=Object.prototype.propertyIsEnumerable,Ige=(r,e,t)=>e in r?olt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,dlt=(r,e)=>{for(var t in e||(e={}))ult.call(e,t)&&Ige(r,t,e[t]);if(Sge)for(var t of Sge(e))flt.call(e,t)&&Ige(r,t,e[t]);return r},hlt=(r,e)=>clt(r,llt(e));const plt="did:pkh:",lz=r=>r==null?void 0:r.split(":"),mlt=r=>{const e=r&&lz(r);if(e)return r.includes(plt)?e[3]:e[1]},uz=r=>{const e=r&&lz(r);if(e)return e[2]+":"+e[3]},tR=r=>{const e=r&&lz(r);if(e)return e.pop()};async function Tge(r){const{cacao:e,projectId:t}=r,{s:n,p:i}=e,s=kge(i,i.iss),a=tR(i.iss);return await nlt(a,s,n,uz(i.iss),t)}const kge=(r,e)=>{const t=`${r.domain} wants you to sign in with your Ethereum account:`,n=tR(e);if(!r.aud&&!r.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=r.statement||void 0;const s=`URI: ${r.aud||r.uri}`,a=`Version: ${r.version}`,o=`Chain ID: ${mlt(e)}`,l=`Nonce: ${r.nonce}`,u=`Issued At: ${r.iat}`,f=r.exp?`Expiration Time: ${r.exp}`:void 0,h=r.nbf?`Not Before: ${r.nbf}`:void 0,m=r.requestId?`Request ID: ${r.requestId}`:void 0,b=r.resources?`Resources:${r.resources.map(C=>` +- ${C}`).join("")}`:void 0,v=rR(r.resources);if(v){const C=y7(v);i=Clt(i,C)}return[t,n,"",i,"",s,a,o,l,u,f,h,m,b].filter(C=>C!=null).join(` +`)};function glt(r){return It.from(JSON.stringify(r)).toString("base64")}function blt(r){return JSON.parse(It.from(r,"base64").toString("utf-8"))}function t2(r){if(!r)throw new Error("No recap provided, value is undefined");if(!r.att)throw new Error("No `att` property found");const e=Object.keys(r.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(t=>{const n=r.att[t];if(Array.isArray(n))throw new Error(`Resource must be an object: ${t}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(a=>{if(typeof a!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${a}`)})})})}function vlt(r,e,t,n={}){return t==null||t.sort((i,s)=>i.localeCompare(s)),{att:{[r]:wlt(e,t,n)}}}function wlt(r,e,t={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${r}/${i}`]:[t]}));return Object.assign({},...n)}function Rge(r){return t2(r),`urn:recap:${glt(r).replace(/=/g,"")}`}function y7(r){const e=blt(r.replace("urn:recap:",""));return t2(e),e}function ylt(r,e,t){const n=vlt(r,e,t);return Rge(n)}function xlt(r){return r&&r.includes("urn:recap:")}function _lt(r,e){const t=y7(r),n=y7(e),i=Elt(t,n);return Rge(i)}function Elt(r,e){t2(r),t2(e);const t=Object.keys(r.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return t.forEach(i=>{var s,a;Object.keys(((s=r.att)==null?void 0:s[i])||{}).concat(Object.keys(((a=e.att)==null?void 0:a[i])||{})).sort((o,l)=>o.localeCompare(l)).forEach(o=>{var l,u;n.att[i]=hlt(dlt({},n.att[i]),{[o]:((l=r.att[i])==null?void 0:l[o])||((u=e.att[i])==null?void 0:u[o])})})}),n}function Clt(r="",e){t2(e);const t="I further authorize the stated URI to perform the following actions on my behalf: ";if(r.includes(t))return r;const n=[];let i=0;Object.keys(e.att).forEach(o=>{const l=Object.keys(e.att[o]).map(h=>({ability:h.split("/")[0],action:h.split("/")[1]}));l.sort((h,m)=>h.action.localeCompare(m.action));const u={};l.forEach(h=>{u[h.ability]||(u[h.ability]=[]),u[h.ability].push(h.action)});const f=Object.keys(u).map(h=>(i++,`(${i}) '${h}': '${u[h].join("', '")}' for '${o}'.`));n.push(f.join(", ").replace(".,","."))});const s=n.join(" "),a=`${t}${s}`;return`${r?r+" ":""}${a}`}function Mge(r){var e;const t=y7(r);t2(t);const n=(e=t.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function Pge(r){const e=y7(r);t2(e);const t=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&t.push(i[0].chains)})}),[...new Set(t.flat())]}function rR(r){if(!r)return;const e=r==null?void 0:r[r.length-1];return xlt(e)?e:void 0}const Oge="base10",Jo="base16",hm="base64pad",x7="base64url",_7="utf8",Nge=0,z0=1,E7=2,Alt=0,Dge=1,C7=12,fz=32;function Slt(){const r=rx.generateKeyPair();return{privateKey:Oc(r.secretKey,Jo),publicKey:Oc(r.publicKey,Jo)}}function dz(){const r=Pd.randomBytes(fz);return Oc(r,Jo)}function Ilt(r,e){const t=rx.sharedKey(_u(r,Jo),_u(e,Jo),!0),n=new Bse(W1.SHA256,t).expand(fz);return Oc(n,Jo)}function nR(r){const e=W1.hash(_u(r,Jo));return Oc(e,Jo)}function H0(r){const e=W1.hash(_u(r,_7));return Oc(e,Jo)}function $ge(r){return _u(`${r}`,Oge)}function r2(r){return Number(Oc(r,Oge))}function Tlt(r){const e=$ge(typeof r.type<"u"?r.type:Nge);if(r2(e)===z0&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?_u(r.senderPublicKey,Jo):void 0,n=typeof r.iv<"u"?_u(r.iv,Jo):Pd.randomBytes(C7),i=new G8.ChaCha20Poly1305(_u(r.symKey,Jo)).seal(n,_u(r.message,_7));return Bge({type:e,sealed:i,iv:n,senderPublicKey:t,encoding:r.encoding})}function klt(r,e){const t=$ge(E7),n=Pd.randomBytes(C7),i=_u(r,_7);return Bge({type:t,sealed:i,iv:n,encoding:e})}function Rlt(r){const e=new G8.ChaCha20Poly1305(_u(r.symKey,Jo)),{sealed:t,iv:n}=A7({encoded:r.encoded,encoding:r==null?void 0:r.encoding}),i=e.open(n,t);if(i===null)throw new Error("Failed to decrypt");return Oc(i,_7)}function Mlt(r,e){const{sealed:t}=A7({encoded:r,encoding:e});return Oc(t,_7)}function Bge(r){const{encoding:e=hm}=r;if(r2(r.type)===E7)return Oc(Gj([r.type,r.sealed]),e);if(r2(r.type)===z0){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Oc(Gj([r.type,r.senderPublicKey,r.iv,r.sealed]),e)}return Oc(Gj([r.type,r.iv,r.sealed]),e)}function A7(r){const{encoded:e,encoding:t=hm}=r,n=_u(e,t),i=n.slice(Alt,Dge),s=Dge;if(r2(i)===z0){const u=s+fz,f=u+C7,h=n.slice(s,u),m=n.slice(u,f),b=n.slice(f);return{type:i,sealed:b,iv:m,senderPublicKey:h}}if(r2(i)===E7){const u=n.slice(s),f=Pd.randomBytes(C7);return{type:i,sealed:u,iv:f}}const a=s+C7,o=n.slice(s,a),l=n.slice(a);return{type:i,sealed:l,iv:o}}function Plt(r,e){const t=A7({encoded:r,encoding:e==null?void 0:e.encoding});return Lge({type:r2(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?Oc(t.senderPublicKey,Jo):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function Lge(r){const e=(r==null?void 0:r.type)||Nge;if(e===z0){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function Uge(r){return r.type===z0&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}function Fge(r){return r.type===E7}function Olt(r){return new Jme.ec("p256").keyFromPublic({x:It.from(r.x,"base64").toString("hex"),y:It.from(r.y,"base64").toString("hex")},"hex")}function Nlt(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");const t=e.length%4;return t>0&&(e+="=".repeat(4-t)),e}function Dlt(r){return It.from(Nlt(r),"base64")}function $lt(r,e){const[t,n,i]=r.split("."),s=Dlt(i);if(s.length!==64)throw new Error("Invalid signature length");const a=s.slice(0,32).toString("hex"),o=s.slice(32,64).toString("hex"),l=`${t}.${n}`,u=new W1.SHA256().update(It.from(l)).digest(),f=Olt(e),h=It.from(u).toString("hex");if(!f.verify(h,{r:a,s:o}))throw new Error("Invalid signature");return CU(r).payload}const Blt="irn";function hz(r){return(r==null?void 0:r.relay)||{protocol:Blt}}function S7(r){const e=due[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var Llt=Object.defineProperty,Ult=Object.defineProperties,Flt=Object.getOwnPropertyDescriptors,jge=Object.getOwnPropertySymbols,jlt=Object.prototype.hasOwnProperty,zlt=Object.prototype.propertyIsEnumerable,zge=(r,e,t)=>e in r?Llt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Hge=(r,e)=>{for(var t in e||(e={}))jlt.call(e,t)&&zge(r,t,e[t]);if(jge)for(var t of jge(e))zlt.call(e,t)&&zge(r,t,e[t]);return r},Hlt=(r,e)=>Ult(r,Flt(e));function qlt(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),a=r[i];t[s]=a}}),t}function qge(r){if(!r.includes("wc:")){const l=Age(r);l!=null&&l.includes("wc:")&&(r=l)}r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),s=typeof t<"u"?r.substring(t):"",a=w0.parse(s),o=typeof a.methods=="string"?a.methods.split(","):void 0;return{protocol:n,topic:Wlt(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:qlt(a),methods:o,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function Wlt(r){return r.startsWith("//")?r.substring(2):r}function Vlt(r,e="-"){const t="relay",n={};return Object.keys(r).forEach(i=>{const s=t+e+i;r[i]&&(n[s]=r[i])}),n}function Wge(r){return`${r.protocol}:${r.topic}@${r.version}?`+w0.stringify(Hge(Hlt(Hge({symKey:r.symKey},Vlt(r.relay)),{expiryTimestamp:r.expiryTimestamp}),r.methods?{methods:r.methods.join(",")}:{}))}function iR(r,e,t){return`${r}?wc_ev=${t}&topic=${e}`}function p5(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}function Glt(r){const e=[];return Object.values(r).forEach(t=>{e.push(...p5(t.accounts))}),e}function Klt(r,e){const t=[];return Object.values(r).forEach(n=>{p5(n.accounts).includes(e)&&t.push(...n.methods)}),t}function Zlt(r,e){const t=[];return Object.values(r).forEach(n=>{p5(n.accounts).includes(e)&&t.push(...n.events)}),t}function pz(r){return r.includes(":")}function I7(r){return pz(r)?r.split(":")[0]:r}function Jlt(r){const e={};return r==null||r.forEach(t=>{const[n,i]=t.split(":");e[n]||(e[n]={accounts:[],chains:[],events:[]}),e[n].accounts.push(t),e[n].chains.push(`${n}:${i}`)}),e}function Vge(r,e){e=e.map(n=>n.replace("did:pkh:",""));const t=Jlt(e);for(const[n,i]of Object.entries(t))i.methods?i.methods=eR(i.methods,r):i.methods=r,i.events=["chainChanged","accountsChanged"];return t}const Ylt={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Qlt={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Bt(r,e){const{message:t,code:n}=Qlt[r];return{message:e?`${t} ${e}`:t,code:n}}function oi(r,e){const{message:t,code:n}=Ylt[r];return{message:e?`${t} ${e}`:t,code:n}}function rh(r,e){return!!Array.isArray(r)}function T7(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function Dc(r){return typeof r>"u"}function Os(r,e){return e&&Dc(r)?!0:typeof r=="string"&&!!r.trim().length}function mz(r,e){return typeof r=="number"&&!isNaN(r)}function Xlt(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let s=!0;return Xb(i,n)?(n.forEach(a=>{const{accounts:o,methods:l,events:u}=r.namespaces[a],f=p5(o),h=t[a];(!Xb(hge(a,h),f)||!Xb(h.methods,l)||!Xb(h.events,u))&&(s=!1)}),s):!1}function sR(r){return Os(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function eut(r){if(Os(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&sR(t)}}return!1}function tut(r){function e(t){try{return typeof new URL(t)<"u"}catch{return!1}}try{if(Os(r,!1)){if(e(r))return!0;const t=Age(r);return e(t)}}catch{}return!1}function rut(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function nut(r){return r==null?void 0:r.topic}function iut(r,e){let t=null;return Os(r==null?void 0:r.publicKey,!1)||(t=Bt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function Gge(r){let e=!0;return rh(r)?r.length&&(e=r.every(t=>Os(t,!1))):e=!1,e}function sut(r,e,t){let n=null;return rh(e)&&e.length?e.forEach(i=>{n||sR(i)||(n=oi("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):sR(r)||(n=oi("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function aut(r,e,t){let n=null;return Object.entries(r).forEach(([i,s])=>{if(n)return;const a=sut(i,hge(i,s),`${e} ${t}`);a&&(n=a)}),n}function out(r,e){let t=null;return rh(r)?r.forEach(n=>{t||eut(n)||(t=oi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=oi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function cut(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=out(n==null?void 0:n.accounts,`${e} namespace`);i&&(t=i)}),t}function lut(r,e){let t=null;return Gge(r==null?void 0:r.methods)?Gge(r==null?void 0:r.events)||(t=oi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=oi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function Kge(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=lut(n,`${e}, namespace`);i&&(t=i)}),t}function uut(r,e,t){let n=null;if(r&&T7(r)){const i=Kge(r,e);i&&(n=i);const s=aut(r,e,t);s&&(n=s)}else n=Bt("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}function gz(r,e){let t=null;if(r&&T7(r)){const n=Kge(r,e);n&&(t=n);const i=cut(r,e);i&&(t=i)}else t=Bt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function Zge(r){return Os(r.protocol,!0)}function fut(r,e){let t=!1;return r?r&&rh(r)&&r.length&&r.forEach(n=>{t=Zge(n)}):t=!0,t}function dut(r){return typeof r=="number"}function $c(r){return typeof r<"u"&&typeof r!==null}function hut(r){return!(!r||typeof r!="object"||!r.code||!mz(r.code)||!r.message||!Os(r.message,!1))}function put(r){return!(Dc(r)||!Os(r.method,!1))}function mut(r){return!(Dc(r)||Dc(r.result)&&Dc(r.error)||!mz(r.id)||!Os(r.jsonrpc,!1))}function gut(r){return!(Dc(r)||!Os(r.name,!1))}function Jge(r,e){return!(!sR(e)||!Glt(r).includes(e))}function but(r,e,t){return Os(t,!1)?Klt(r,e).includes(t):!1}function vut(r,e,t){return Os(t,!1)?Zlt(r,e).includes(t):!1}function Yge(r,e,t){let n=null;const i=wut(r),s=yut(e),a=Object.keys(i),o=Object.keys(s),l=Qge(Object.keys(r)),u=Qge(Object.keys(e)),f=l.filter(h=>!u.includes(h));return f.length&&(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. + Required: ${f.toString()} + Received: ${Object.keys(e).toString()}`)),Xb(a,o)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. + Required: ${a.toString()} + Approved: ${o.toString()}`)),Object.keys(e).forEach(h=>{if(!h.includes(":")||n)return;const m=p5(e[h].accounts);m.includes(h)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${h} + Required: ${h} + Approved: ${m.toString()}`))}),a.forEach(h=>{n||(Xb(i[h].methods,s[h].methods)?Xb(i[h].events,s[h].events)||(n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${h}`)):n=Bt("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${h}`))}),n}function wut(r){const e={};return Object.keys(r).forEach(t=>{var n;t.includes(":")?e[t]=r[t]:(n=r[t].chains)==null||n.forEach(i=>{e[i]={methods:r[t].methods,events:r[t].events}})}),e}function Qge(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function yut(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const n=p5(r[t].accounts);n==null||n.forEach(i=>{e[i]={accounts:r[t].accounts.filter(s=>s.includes(`${i}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function xut(r,e){return mz(r)&&r<=e.max&&r>=e.min}function Xge(){const r=w7();return new Promise(e=>{switch(r){case pl.browser:e(_ut());break;case pl.reactNative:e(Eut());break;case pl.node:e(Cut());break;default:e(!0)}})}function _ut(){return v7()&&(navigator==null?void 0:navigator.onLine)}async function Eut(){if(d5()&&typeof sr<"u"&&sr!=null&&sr.NetInfo){const r=await(sr==null?void 0:sr.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function Cut(){return!0}function Aut(r){switch(w7()){case pl.browser:Sut(r);break;case pl.reactNative:Iut(r);break}}function Sut(r){!d5()&&v7()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function Iut(r){d5()&&typeof sr<"u"&&sr!=null&&sr.NetInfo&&(sr==null||sr.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const bz={};class k7{static get(e){return bz[e]}static set(e,t){bz[e]=t}static delete(e){delete bz[e]}}let Tut=class extends Tc{constructor(e){super()}};const ebe=qe.FIVE_SECONDS,m5={pulse:"heartbeat_pulse"};let kut=class jve extends Tut{constructor(e){super(e),this.events=new Xn.EventEmitter,this.interval=ebe,this.interval=(e==null?void 0:e.interval)||ebe}static async init(e){const t=new jve(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),qe.toMiliseconds(this.interval))}pulse(){this.events.emit(m5.pulse)}},Rut=class extends Tc{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},Mut=class extends Tc{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},Put=class{constructor(e,t){this.logger=e,this.core=t}},Out=class extends Tc{constructor(e,t){super(),this.relayer=e,this.logger=t}},Nut=class extends Tc{constructor(e){super()}},Dut=class{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}},$ut=class extends Tc{constructor(e,t){super(),this.relayer=e,this.logger=t}},But=class extends Tc{constructor(e,t){super(),this.core=e,this.logger=t}},Lut=class{constructor(e,t,n){this.core=e,this.logger=t,this.store=n}},Uut=class{constructor(e,t){this.projectId=e,this.logger=t}},Fut=class{constructor(e,t,n){this.core=e,this.logger=t,this.telemetryEnabled=n}},jut=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},zut=class{constructor(e){this.client=e}},Su=class extends gfe{constructor(e){super(e),this.events=new Xn.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(kc(e.method,e.params||[],e.id||C0().toString()),t)}async requestStrict(e,t){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{gs(s)?i(s.error):n(s.result)});try{await this.connection.send(e,t)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),J1(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};const tbe="wc",rbe=2,vz="core",nh=`${tbe}@2:${vz}:`,Hut={name:vz,logger:"error"},qut={database:":memory:"},Wut="crypto",nbe="client_ed25519_seed",Vut=qe.ONE_DAY,Gut="keychain",Kut="0.3",Zut="messages",Jut="0.3",Yut=qe.SIX_HOURS,Qut="publisher",ibe="irn",Xut="error",sbe="wss://relay.walletconnect.org",eft="relayer",Yo={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},tft="_subscription",Iu={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},rft=.1,wz="2.17.2",Bi={link_mode:"link_mode",relay:"relay"},nft="0.3",ift="WALLETCONNECT_CLIENT_ID",abe="WALLETCONNECT_LINK_MODE_APPS",ih={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},sft="subscription",aft="0.3",oft=qe.FIVE_SECONDS*1e3,cft="pairing",lft="0.3",R7={wc_pairingDelete:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:qe.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:qe.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:0},res:{ttl:qe.ONE_DAY,prompt:!1,tag:0}}},n2={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Sf={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},uft="history",fft="0.3",dft="expirer",Tu={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},hft="0.3",pft="verify-api",mft="https://verify.walletconnect.com",obe="https://verify.walletconnect.org",M7=obe,gft=`${M7}/v3`,bft=[mft,obe],vft="echo",wft="https://echo.walletconnect.com",sh={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},q0={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},If={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},i2={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},s2={authenticated_session_approve_started:"authenticated_session_approve_started",authenticated_session_not_expired:"authenticated_session_not_expired",chains_caip2_compliant:"chains_caip2_compliant",chains_evm_compliant:"chains_evm_compliant",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve",authenticated_session_approve_publish_success:"authenticated_session_approve_publish_success"},P7={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",missing_session_authenticate_request:"missing_session_authenticate_request",session_authenticate_request_expired:"session_authenticate_request_expired",chains_caip2_compliant_failure:"chains_caip2_compliant_failure",chains_evm_compliant_failure:"chains_evm_compliant_failure",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},yft=.1,xft="event-client",_ft=86400,Eft="https://pulse.walletconnect.org/batch";function Cft(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,$=new Uint8Array(N);k!==P;){for(var j=v[k],G=0,U=N-1;(j!==0||G>>0,$[U]=j%o>>>0,j=j/o>>>0;if(j!==0)throw new Error("Non-zero carry");R=G,k++}for(var L=N-R;L!==N&&$[L]===0;)L++;for(var V=l.repeat(C);L>>0,N=new Uint8Array(P);v[C];){var $=t[v.charCodeAt(C)];if($===255)return;for(var j=0,G=P-1;($!==0||j>>0,N[G]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");k=j,C++}if(v[C]!==" "){for(var U=P-k;U!==P&&N[U]===0;)U++;for(var L=new Uint8Array(R+(P-U)),V=R;U!==P;)L[V++]=N[U++];return L}}}function b(v){var C=m(v);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:b}}var Aft=Cft,Sft=Aft;const cbe=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},Ift=r=>new TextEncoder().encode(r),Tft=r=>new TextDecoder().decode(r);class kft{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Rft{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return lbe(this,e)}}class Mft{constructor(e){this.decoders=e}or(e){return lbe(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const lbe=(r,e)=>new Mft({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class Pft{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new kft(e,t,n),this.decoder=new Rft(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const aR=({name:r,prefix:e,encode:t,decode:n})=>new Pft(r,e,t,n),O7=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=Sft(t,e);return aR({prefix:r,name:e,encode:n,decode:s=>cbe(i(s))})},Oft=(r,e,t,n)=>{const i={};for(let f=0;f=8&&(o-=8,a[u++]=255&l>>o)}if(o>=t||255&l<<8-o)throw new SyntaxError("Unexpected end of data");return a},Nft=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)a-=t,s+=e[i&o>>a];if(a&&(s+=e[i&o<aR({prefix:e,name:r,encode(i){return Nft(i,n,t)},decode(i){return Oft(i,n,t,r)}}),Dft=aR({prefix:"\0",name:"identity",encode:r=>Tft(r),decode:r=>Ift(r)});var $ft=Object.freeze({__proto__:null,identity:Dft});const Bft=io({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Lft=Object.freeze({__proto__:null,base2:Bft});const Uft=io({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Fft=Object.freeze({__proto__:null,base8:Uft});const jft=O7({prefix:"9",name:"base10",alphabet:"0123456789"});var zft=Object.freeze({__proto__:null,base10:jft});const Hft=io({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),qft=io({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Wft=Object.freeze({__proto__:null,base16:Hft,base16upper:qft});const Vft=io({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Gft=io({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Kft=io({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Zft=io({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Jft=io({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Yft=io({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Qft=io({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Xft=io({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),edt=io({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var tdt=Object.freeze({__proto__:null,base32:Vft,base32upper:Gft,base32pad:Kft,base32padupper:Zft,base32hex:Jft,base32hexupper:Yft,base32hexpad:Qft,base32hexpadupper:Xft,base32z:edt});const rdt=O7({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ndt=O7({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var idt=Object.freeze({__proto__:null,base36:rdt,base36upper:ndt});const sdt=O7({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),adt=O7({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var odt=Object.freeze({__proto__:null,base58btc:sdt,base58flickr:adt});const cdt=io({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ldt=io({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),udt=io({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),fdt=io({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ddt=Object.freeze({__proto__:null,base64:cdt,base64pad:ldt,base64url:udt,base64urlpad:fdt});const ube=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),hdt=ube.reduce((r,e,t)=>(r[t]=e,r),[]),pdt=ube.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function mdt(r){return r.reduce((e,t)=>(e+=hdt[t],e),"")}function gdt(r){const e=[];for(const t of r){const n=pdt[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const bdt=aR({prefix:"🚀",name:"base256emoji",encode:mdt,decode:gdt});var vdt=Object.freeze({__proto__:null,base256emoji:bdt}),wdt=dbe,fbe=128,ydt=127,xdt=~ydt,_dt=Math.pow(2,31);function dbe(r,e,t){e=e||[],t=t||0;for(var n=t;r>=_dt;)e[t++]=r&255|fbe,r/=128;for(;r&xdt;)e[t++]=r&255|fbe,r>>>=7;return e[t]=r|0,dbe.bytes=t-n+1,e}var Edt=yz,Cdt=128,hbe=127;function yz(r,n){var t=0,n=n||0,i=0,s=n,a,o=r.length;do{if(s>=o)throw yz.bytes=0,new RangeError("Could not decode varint");a=r[s++],t+=i<28?(a&hbe)<=Cdt);return yz.bytes=s-n,t}var Adt=Math.pow(2,7),Sdt=Math.pow(2,14),Idt=Math.pow(2,21),Tdt=Math.pow(2,28),kdt=Math.pow(2,35),Rdt=Math.pow(2,42),Mdt=Math.pow(2,49),Pdt=Math.pow(2,56),Odt=Math.pow(2,63),Ndt=function(r){return r(pbe.encode(r,e,t),e),gbe=r=>pbe.encodingLength(r),xz=(r,e)=>{const t=e.byteLength,n=gbe(r),i=n+gbe(t),s=new Uint8Array(i+t);return mbe(r,s,0),mbe(t,s,n),s.set(e,i),new $dt(r,t,e,s)};class $dt{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}}const bbe=({name:r,code:e,encode:t})=>new Bdt(r,e,t);class Bdt{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?xz(this.code,t):t.then(n=>xz(this.code,n))}else throw Error("Unknown type, must be binary type")}}const vbe=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),Ldt=bbe({name:"sha2-256",code:18,encode:vbe("SHA-256")}),Udt=bbe({name:"sha2-512",code:19,encode:vbe("SHA-512")});var Fdt=Object.freeze({__proto__:null,sha256:Ldt,sha512:Udt});const wbe=0,jdt="identity",ybe=cbe;var zdt=Object.freeze({__proto__:null,identity:{code:wbe,name:jdt,encode:ybe,digest:r=>xz(wbe,ybe(r))}});new TextEncoder,new TextDecoder;const xbe={...$ft,...Lft,...Fft,...zft,...Wft,...tdt,...idt,...odt,...ddt,...vdt};({...Fdt,...zdt});function Hdt(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}function _be(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const Ebe=_be("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),_z=_be("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=Hdt(r.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=Bt("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,wge(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?yge(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}}let Gdt=class{constructor(e,t,n){this.core=e,this.logger=t,this.name=Wut,this.randomSessionIdentifier=dz(),this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),s=iT(i);return EU(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=Slt();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),a=iT(s),o=this.randomSessionIdentifier;return await cfe(o,i,Vut,a)},this.generateSharedKey=(i,s,a)=>{this.isInitialized();const o=this.getPrivateKey(i),l=Ilt(o,s);return this.setSymKey(l,a)},this.setSymKey=async(i,s)=>{this.isInitialized();const a=s||nR(i);return await this.keychain.set(a,i),a},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,s,a)=>{this.isInitialized();const o=Lge(a),l=$d(s);if(Fge(o))return klt(l,a==null?void 0:a.encoding);if(Uge(o)){const m=o.senderPublicKey,b=o.receiverPublicKey;i=await this.generateSharedKey(m,b)}const u=this.getSymKey(i),{type:f,senderPublicKey:h}=o;return Tlt({type:f,symKey:u,message:l,senderPublicKey:h,encoding:a==null?void 0:a.encoding})},this.decode=async(i,s,a)=>{this.isInitialized();const o=Plt(s,a);if(Fge(o)){const l=Mlt(s,a==null?void 0:a.encoding);return G1(l)}if(Uge(o)){const l=o.receiverPublicKey,u=o.senderPublicKey;i=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(i),u=Rlt({symKey:l,encoded:s,encoding:a==null?void 0:a.encoding});return G1(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}},this.getPayloadType=(i,s=hm)=>{const a=A7({encoded:i,encoding:s});return r2(a.type)},this.getPayloadSenderPublicKey=(i,s=hm)=>{const a=A7({encoded:i,encoding:s});return a.senderPublicKey?Oc(a.senderPublicKey,Jo):void 0},this.core=e,this.logger=ai(t,this.name),this.keychain=n||new Vdt(this.core,this.logger)}get context(){return Ci(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(nbe)}catch{e=dz(),await this.keychain.set(nbe,e)}return Wdt(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}};class Kdt extends Put{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=Zut,this.version=Jut,this.initialized=!1,this.storagePrefix=nh,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const s=H0(i);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[s]<"u"||(a[s]=i,this.messages.set(n,a),await this.persist()),s},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const s=this.get(n),a=H0(i);return typeof s[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=ai(e,this.name),this.core=t}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,wge(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?yge(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Zdt extends Out{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Xn.EventEmitter,this.name=Qut,this.queue=new Map,this.publishTimeout=qe.toMiliseconds(qe.ONE_MINUTE),this.failedPublishTimeout=qe.toMiliseconds(qe.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(n,i,s)=>{var a;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const o=(s==null?void 0:s.ttl)||Yut,l=hz(s),u=(s==null?void 0:s.prompt)||!1,f=(s==null?void 0:s.tag)||0,h=(s==null?void 0:s.id)||C0().toString(),m={topic:n,message:i,opts:{ttl:o,relay:l,prompt:u,tag:f,id:h,attestation:s==null?void 0:s.attestation}},b=`Failed to publish payload, please try again. id:${h} tag:${f}`,v=Date.now();let C,R=1;try{for(;C===void 0;){if(Date.now()-v>this.publishTimeout)throw new Error(b);this.logger.trace({id:h,attempts:R},`publisher.publish - attempt ${R}`),C=await await h5(this.rpcPublish(n,i,o,l,u,f,h,s==null?void 0:s.attestation).catch(k=>this.logger.warn(k)),this.publishTimeout,b),R++,C||await new Promise(k=>setTimeout(k,this.failedPublishTimeout))}this.relayer.events.emit(Yo.publish,m),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:h,topic:n,message:i,opts:s}})}catch(k){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(k),(a=s==null?void 0:s.internal)!=null&&a.throwOnFailedPublish)throw k;this.queue.set(h,m)}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=ai(t,this.name),this.registerEventListeners()}get context(){return Ci(this.logger)}rpcPublish(e,t,n,i,s,a,o,l){var u,f,h,m;const b={method:S7(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:s,tag:a,attestation:l},id:o};return Dc((u=b.params)==null?void 0:u.prompt)&&((f=b.params)==null||delete f.prompt),Dc((h=b.params)==null?void 0:h.tag)&&((m=b.params)==null||delete m.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:b}),this.relayer.request(b)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:n,opts:i}=e;await this.publish(t,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(m5.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Yo.connection_stalled);return}this.checkQueue()}),this.relayer.on(Yo.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Jdt{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(s=>s!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Ydt=Object.defineProperty,Qdt=Object.defineProperties,Xdt=Object.getOwnPropertyDescriptors,Cbe=Object.getOwnPropertySymbols,eht=Object.prototype.hasOwnProperty,tht=Object.prototype.propertyIsEnumerable,Abe=(r,e,t)=>e in r?Ydt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,N7=(r,e)=>{for(var t in e||(e={}))eht.call(e,t)&&Abe(r,t,e[t]);if(Cbe)for(var t of Cbe(e))tht.call(e,t)&&Abe(r,t,e[t]);return r},Ez=(r,e)=>Qdt(r,Xdt(e));class rht extends $ut{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Jdt,this.events=new Xn.EventEmitter,this.name=sft,this.version=aft,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=nh,this.subscribeTimeout=qe.toMiliseconds(qe.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId(),await this.restore()),this.initialized=!0},this.subscribe=async(n,i)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=hz(i),a={topic:n,relay:s,transportType:i==null?void 0:i.transportType};this.pending.set(n,a);const o=await this.rpcSubscribe(n,s,i);return typeof o=="string"&&(this.onSubscribe(o,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),o}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>{if(this.topics.includes(n))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${n}`;return await new Promise((s,a)=>{const o=new qe.Watch;o.start(i);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),o.stop(i),s(!0)),o.elapsed(i)>=oft&&(clearInterval(l),o.stop(i),a(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=ai(t,this.name),this.clientId=""}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const i=hz(n);await this.rpcUnsubscribe(e,t,i);const s=oi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,t,n){var i;(n==null?void 0:n.transportType)===Bi.relay&&await this.restartToComplete();const s={method:S7(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});const a=(i=n==null?void 0:n.internal)==null?void 0:i.throwOnFailedPublish;try{const o=H0(e+this.clientId);if((n==null?void 0:n.transportType)===Bi.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(u=>this.logger.warn(u))},qe.toMiliseconds(qe.ONE_SECOND)),o;const l=await h5(this.relayer.request(s).catch(u=>this.logger.warn(u)),this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&a)throw new Error(`Subscribing to ${e} failed, please try again`);return l?o:null}catch(o){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Yo.connection_stalled),a)throw o}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,n={method:S7(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await h5(this.relayer.request(n).catch(i=>this.logger.warn(i)),this.subscribeTimeout)}catch{this.relayer.events.emit(Yo.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t=e[0].relay,n={method:S7(t.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await h5(this.relayer.request(n).catch(s=>this.logger.warn(s)),this.subscribeTimeout)}catch{this.relayer.events.emit(Yo.connection_stalled)}return i}rpcUnsubscribe(e,t,n){const i={method:S7(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,Ez(N7({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,N7({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,N7({},t)),this.topicMap.set(t.topic,e),this.events.emit(ih.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(ih.deleted,Ez(N7({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(ih.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);rh(t)&&this.onBatchSubscribe(t.map((n,i)=>Ez(N7({},e[i]),{id:n})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(m5.pulse,async()=>{await this.checkPending()}),this.events.on(ih.created,async e=>{const t=ih.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(ih.deleted,async e=>{const t=ih.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){!this.relayer.connected&&!this.relayer.connecting&&await this.relayer.transportOpen(),this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var nht=Object.defineProperty,Sbe=Object.getOwnPropertySymbols,iht=Object.prototype.hasOwnProperty,sht=Object.prototype.propertyIsEnumerable,Ibe=(r,e,t)=>e in r?nht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Tbe=(r,e)=>{for(var t in e||(e={}))iht.call(e,t)&&Ibe(r,t,e[t]);if(Sbe)for(var t of Sbe(e))sht.call(e,t)&&Ibe(r,t,e[t]);return r};class aht extends Nut{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Xn.EventEmitter,this.name=eft,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=qe.toMiliseconds(qe.THIRTY_SECONDS+qe.ONE_SECOND),this.request=async t=>{var n,i;this.logger.debug("Publishing Request Payload");const s=t.id||C0().toString();await this.toEstablishConnection();try{const a=this.provider.request(t);this.requestsInFlight.set(s,{promise:a,request:t}),this.logger.trace({id:s,method:t.method,topic:(n=t.params)==null?void 0:n.topic},"relayer.request - attempt to publish...");const o=await new Promise(async(l,u)=>{const f=()=>{u(new Error(`relayer.request - publish interrupted, id: ${s}`))};this.provider.on(Iu.disconnect,f);const h=await a;this.provider.off(Iu.disconnect,f),l(h)});return this.logger.trace({id:s,method:t.method,topic:(i=t.params)==null?void 0:i.topic},"relayer.request - published"),o}catch(a){throw this.logger.debug(`Failed to Publish Request: ${s}`),a}finally{this.requestsInFlight.delete(s)}},this.resetPingTimeout=()=>{if(Xk())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,n,i;(i=(n=(t=this.provider)==null?void 0:t.connection)==null?void 0:n.socket)==null||i.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace("relayer connected"),this.startPingTimeout(),this.events.emit(Yo.connect)},this.onDisconnectHandler=()=>{this.logger.trace("relayer disconnected"),this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(Yo.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Iu.payload,this.onPayloadHandler),this.provider.on(Iu.connect,this.onConnectHandler),this.provider.on(Iu.disconnect,this.onDisconnectHandler),this.provider.on(Iu.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?ai(e.logger,this.name):y0(K1({level:e.logger||Xut})),this.messages=new Kdt(this.logger,e.core),this.subscriber=new rht(this,this.logger),this.publisher=new Zdt(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||sbe,this.projectId=e.projectId,this.bundleId=qct(),this.provider={}}async init(){if(this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.cached.length>0)try{await this.transportOpen()}catch(e){this.logger.warn(e)}}get context(){return Ci(this.logger)}get connected(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===1}get connecting(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===0}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:Bi.relay})}async subscribe(e,t){var n,i,s;this.isInitialized(),(t==null?void 0:t.transportType)==="relay"&&await this.toEstablishConnection();const a=typeof((n=t==null?void 0:t.internal)==null?void 0:n.throwOnFailedPublish)>"u"?!0:(i=t==null?void 0:t.internal)==null?void 0:i.throwOnFailedPublish;let o=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||"",l;const u=f=>{f.topic===e&&(this.subscriber.off(ih.created,u),l())};return await Promise.all([new Promise(f=>{l=f,this.subscriber.on(ih.created,u)}),new Promise(async(f,h)=>{o=await this.subscriber.subscribe(e,Tbe({internal:{throwOnFailedPublish:a}},t)).catch(m=>{a&&h(m)})||o,f()})]),o}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await h5(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,n)=>{const i=()=>{this.provider.off(Iu.disconnect,i),n(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(Iu.disconnect,i),await h5(this.provider.connect(),qe.toMiliseconds(qe.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(s=>{n(s)}).finally(()=>{clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0}),this.subscriber.start().catch(s=>{this.logger.error(s),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const n=t;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(n.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Xge())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const t=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.trace(`Batch of ${t.length} message events sorted`);for(const n of t)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i)}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(e,t){const{topic:n}=e;if(!t.sessionExists){const i=ia(qe.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Yo.message,e),await this.recordMessageEvent(e)}startPingTimeout(){var e,t,n,i,s;if(Xk())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(a){this.logger.warn(a)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Su(new Efe(Kct({sdkVersion:wz,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),gy(e)){if(!e.method.endsWith(tft))return;const t=e.params,{topic:n,message:i,publishedAt:s,attestation:a}=t.data,o={topic:n,message:i,publishedAt:s,transportType:Bi.relay,attestation:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Tbe({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else J1(e)&&this.events.emit(Yo.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Yo.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Z1(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Iu.payload,this.onPayloadHandler),this.provider.off(Iu.connect,this.onConnectHandler),this.provider.off(Iu.disconnect,this.onDisconnectHandler),this.provider.off(Iu.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await Xge();Aut(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(Yo.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&(this.reconnectTimeout||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},qe.toMiliseconds(rft))))}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var oht=Object.defineProperty,kbe=Object.getOwnPropertySymbols,cht=Object.prototype.hasOwnProperty,lht=Object.prototype.propertyIsEnumerable,Rbe=(r,e,t)=>e in r?oht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Mbe=(r,e)=>{for(var t in e||(e={}))cht.call(e,t)&&Rbe(r,t,e[t]);if(kbe)for(var t of kbe(e))lht.call(e,t)&&Rbe(r,t,e[t]);return r};class a2 extends Dut{constructor(e,t,n,i=nh,s=void 0){super(e,t,n,i),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=nft,this.cached=[],this.initialized=!1,this.storagePrefix=nh,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!Dc(a)?this.map.set(this.getKey(a),a):rut(a)?this.map.set(a.id,a):nut(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,o)=>{this.isInitialized(),this.map.has(a)?await this.update(a,o):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:o}),this.map.set(a,o),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(o=>Object.keys(a).every(l=>Cfe(o[l],a[l]))):this.values),this.update=async(a,o)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:o});const l=Mbe(Mbe({},this.getData(a)),o);this.map.set(a,l),await this.persist()},this.delete=async(a,o)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:o}),this.map.delete(a),this.addToRecentlyDeleted(a),await this.persist())},this.logger=ai(t,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:i}=Bt("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class uht{constructor(e,t){this.core=e,this.logger=t,this.name=cft,this.version=lft,this.events=new X3,this.initialized=!1,this.storagePrefix=nh,this.ignoredPayloadTypes=[z0],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async n=>{this.isInitialized();const i=dz(),s=await this.core.crypto.setSymKey(i),a=ia(qe.FIVE_MINUTES),o={protocol:ibe},l={topic:s,expiry:a,relay:o,active:!1,methods:n==null?void 0:n.methods},u=Wge({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:o,expiryTimestamp:a,methods:n==null?void 0:n.methods});return this.events.emit(n2.create,l),this.core.expirer.set(s,a),await this.pairings.set(s,l),await this.core.relayer.subscribe(s,{transportType:n==null?void 0:n.transportType}),{topic:s,uri:u}},this.pair=async n=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:n==null?void 0:n.uri,trace:[sh.pairing_started]}});this.isValidPair(n,i);const{topic:s,symKey:a,relay:o,expiryTimestamp:l,methods:u}=qge(n.uri);i.props.properties.topic=s,i.addTrace(sh.pairing_uri_validation_success),i.addTrace(sh.pairing_uri_not_expired);let f;if(this.pairings.keys.includes(s)){if(f=this.pairings.get(s),i.addTrace(sh.existing_pairing),f.active)throw i.setError(q0.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(sh.pairing_not_expired)}const h=l||ia(qe.FIVE_MINUTES),m={topic:s,relay:o,expiry:h,active:!1,methods:u};this.core.expirer.set(s,h),await this.pairings.set(s,m),i.addTrace(sh.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(n2.create,m),i.addTrace(sh.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(a,s),i.addTrace(sh.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(q0.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:o})}catch(b){throw i.setError(q0.subscribe_pairing_topic_failure),b}return i.addTrace(sh.subscribe_pairing_topic_success),m},this.activate=async({topic:n})=>{this.isInitialized();const i=ia(qe.THIRTY_DAYS);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:a,resolve:o,reject:l}=e2();this.events.once(mn("pairing_ping",s),({error:u})=>{u?l(u):o()}),await a()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",oi("USER_DISCONNECTED")),await this.deletePairing(i))},this.formatUriFromPairing=n=>{this.isInitialized();const{topic:i,relay:s,expiry:a,methods:o}=n,l=this.core.crypto.keychain.get(i);return Wge({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:l,relay:s,expiryTimestamp:a,methods:o})},this.sendRequest=async(n,i,s)=>{const a=kc(i,s),o=await this.core.crypto.encode(n,a),l=R7[i].req;return this.core.history.set(n,a),this.core.relayer.publish(n,o,l),a.id},this.sendResult=async(n,i,s)=>{const a=Z1(n,s),o=await this.core.crypto.encode(i,a),l=await this.core.history.get(i,n),u=R7[l.request.method].res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(a)},this.sendError=async(n,i,s)=>{const a=my(n,s),o=await this.core.crypto.encode(i,a),l=await this.core.history.get(i,n),u=R7[l.request.method]?R7[l.request.method].res:R7.unregistered_method.res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(a)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,oi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>dm(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:s}=n,a=(await this.core.history.get(i,s.id)).request.method;switch(a){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(n2.ping,{id:s,topic:n})}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,i)=>{const{id:s}=i;setTimeout(()=>{Ta(i)?this.events.emit(mn("pairing_ping",s),{}):gs(i)&&this.events.emit(mn("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(n2.delete,{id:s,topic:n})}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:s,method:a}=i;try{if(this.registeredMethods.includes(a))return;const o=oi("WC_METHOD_UNSUPPORTED",a);await this.sendError(s,n,o),this.logger.error(o)}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(oi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=(n,i)=>{var s;if(!$c(n)){const{message:o}=Bt("MISSING_OR_INVALID",`pair() params: ${n}`);throw i.setError(q0.malformed_pairing_uri),new Error(o)}if(!tut(n.uri)){const{message:o}=Bt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw i.setError(q0.malformed_pairing_uri),new Error(o)}const a=qge(n==null?void 0:n.uri);if(!((s=a==null?void 0:a.relay)!=null&&s.protocol)){const{message:o}=Bt("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(q0.malformed_pairing_uri),new Error(o)}if(!(a!=null&&a.symKey)){const{message:o}=Bt("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(q0.malformed_pairing_uri),new Error(o)}if(a!=null&&a.expiryTimestamp&&qe.toMiliseconds(a==null?void 0:a.expiryTimestamp){if(!$c(n)){const{message:s}=Bt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!$c(n)){const{message:s}=Bt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!Os(n,!1)){const{message:i}=Bt("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Bt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(dm(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Bt("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=ai(t,this.name),this.pairings=new a2(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ci(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Yo.message,async e=>{const{topic:t,message:n,transportType:i}=e;if(!this.pairings.keys.includes(t)||i===Bi.link_mode||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const s=await this.core.crypto.decode(t,n);try{gy(s)?(this.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):J1(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.core.history.delete(t,s.id))}catch(a){this.logger.error(a)}})}registerExpirerEvents(){this.core.expirer.on(Tu.expired,async e=>{const{topic:t}=_ge(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(n2.expire,{topic:t}))})}}class fht extends Mut{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Xn.EventEmitter,this.name=uft,this.version=fft,this.cached=[],this.initialized=!1,this.storagePrefix=nh,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const a={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:ia(qe.THIRTY_DAYS)};this.records.set(a.id,a),this.persist(),this.events.emit(Sf.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=gs(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Sf.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Sf.deleted,s)}}),this.persist()},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:kc(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Sf.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Sf.created,e=>{const t=Sf.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Sf.updated,e=>{const t=Sf.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Sf.deleted,e=>{const t=Sf.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(m5.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{qe.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(Sf.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class dht extends But{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Xn.EventEmitter,this.name=dft,this.version=hft,this.cached=[],this.initialized=!1,this.storagePrefix=nh,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const s=this.formatTarget(n),a={target:s,expiry:i};this.expirations.set(s,a),this.checkExpiry(s,a),this.events.emit(Tu.created,{target:s,expiration:a})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Tu.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=ai(t,this.name)}get context(){return Ci(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return Zct(e);if(typeof e=="number")return Jct(e);const{message:t}=Bt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Tu.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=Bt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=Bt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;qe.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Tu.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(m5.pulse,()=>this.checkExpirations()),this.events.on(Tu.created,e=>{const t=Tu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Tu.expired,e=>{const t=Tu.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Tu.deleted,e=>{const t=Tu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class hht extends Lut{constructor(e,t,n){super(e,t,n),this.core=e,this.logger=t,this.store=n,this.name=pft,this.verifyUrlV3=gft,this.storagePrefix=nh,this.version=rbe,this.init=async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&qe.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt){if(!v7()||this.isDevEnv)return;const s=window.location.origin,{id:a,decryptedId:o}=i,l=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${a}&decryptedId=${o}`;try{const u=_b(),f=this.startAbortTimer(qe.ONE_SECOND*5),h=await new Promise((m,b)=>{const v=()=>{window.removeEventListener("message",R),u.body.removeChild(C),b("attestation aborted")};this.abortController.signal.addEventListener("abort",v);const C=u.createElement("iframe");C.src=l,C.style.display="none",C.addEventListener("error",v,{signal:this.abortController.signal});const R=k=>{if(k.data&&typeof k.data=="string")try{const P=JSON.parse(k.data);if(P.type==="verify_attestation"){if(CU(P.attestation).payload.id!==a)return;clearInterval(f),u.body.removeChild(C),this.abortController.signal.removeEventListener("abort",v),window.removeEventListener("message",R),m(P.attestation===null?"":P.attestation)}}catch(P){this.logger.warn(P)}};u.body.appendChild(C),window.addEventListener("message",R,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",h),h}catch(u){this.logger.warn(u)}return""},this.resolve=async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:a,encryptedId:o}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(CU(s).payload.id!==o)return;const u=await this.isValidJwtAttestation(s);if(u){if(!u.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return u}}if(!a)return;const l=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(a,l)},this.fetchAttestation=async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const a=this.startAbortTimer(qe.ONE_SECOND*5),o=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(a),o.status===200?await o.json():void 0},this.getVerifyUrl=i=>{let s=i||M7;return bft.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${M7}`),s=M7),s},this.fetchPublicKey=async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(qe.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}},this.persistPublicKey=async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i},this.removePublicKey=async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0},this.isValidJwtAttestation=async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(o){this.logger.error(o),this.logger.warn("error validating attestation")}const a=await this.fetchAndPersistPublicKey();try{if(a)return this.validateAttestation(i,a)}catch(o){this.logger.error(o),this.logger.warn("error validating attestation")}},this.getPublicKey=async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey(),this.fetchAndPersistPublicKey=async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const a=await this.fetchPublicKey();a&&(await this.persistPublicKey(a),s(a))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i},this.validateAttestation=(i,s)=>{const a=$lt(i,s.publicKey),o={hasExpired:qe.toMiliseconds(a.exp)this.abortController.abort(),qe.toMiliseconds(e))}}class pht extends Uut{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=vft,this.registerDeviceToken=async n=>{const{clientId:i,token:s,notificationType:a,enableEncrypted:o=!1}=n,l=`${wft}/${this.projectId}/clients`;await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:a,token:s,always_raw:o})})},this.logger=ai(t,this.context)}}var mht=Object.defineProperty,Pbe=Object.getOwnPropertySymbols,ght=Object.prototype.hasOwnProperty,bht=Object.prototype.propertyIsEnumerable,Obe=(r,e,t)=>e in r?mht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,D7=(r,e)=>{for(var t in e||(e={}))ght.call(e,t)&&Obe(r,t,e[t]);if(Pbe)for(var t of Pbe(e))bht.call(e,t)&&Obe(r,t,e[t]);return r};class vht extends Fut{constructor(e,t,n=!0){super(e,t,n),this.core=e,this.logger=t,this.context=xft,this.storagePrefix=nh,this.storageVersion=yft,this.events=new Map,this.shouldPersist=!1,this.init=async()=>{if(!cz())try{const i={eventId:Cge(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:vge(this.core.relayer.protocol,this.core.relayer.version,wz)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}},this.createEvent=i=>{const{event:s="ERROR",type:a="",properties:{topic:o,trace:l}}=i,u=Cge(),f=this.core.projectId||"",h=Date.now(),m=D7({eventId:u,timestamp:h,props:{event:s,type:a,properties:{topic:o,trace:l}},bundleId:f,domain:this.getAppDomain()},this.setMethods(u));return this.telemetryEnabled&&(this.events.set(u,m),this.shouldPersist=!0),m},this.getEvent=i=>{const{eventId:s,topic:a}=i;if(s)return this.events.get(s);const o=Array.from(this.events.values()).find(l=>l.props.properties.topic===a);if(o)return D7(D7({},o),this.setMethods(o.eventId))},this.deleteEvent=i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0},this.setEventListeners=()=>{this.core.heartbeat.on(m5.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{qe.fromMiliseconds(Date.now())-qe.fromMiliseconds(i.timestamp)>_ft&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})},this.setMethods=i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)}),this.addTrace=(i,s)=>{const a=this.events.get(i);a&&(a.props.properties.trace.push(s),this.events.set(i,a),this.shouldPersist=!0)},this.setError=(i,s)=>{const a=this.events.get(i);a&&(a.props.type=s,a.timestamp=Date.now(),this.events.set(i,a),this.shouldPersist=!0)},this.persist=async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1},this.restore=async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,D7(D7({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}},this.submit=async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,a]of this.events)a.props.type&&i.push(a);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}},this.sendEvent=async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${Eft}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${wz}${s}`,{method:"POST",body:JSON.stringify(i)})},this.getAppDomain=()=>bge().url,this.logger=ai(t,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var wht=Object.defineProperty,Nbe=Object.getOwnPropertySymbols,yht=Object.prototype.hasOwnProperty,xht=Object.prototype.propertyIsEnumerable,Dbe=(r,e,t)=>e in r?wht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,$be=(r,e)=>{for(var t in e||(e={}))yht.call(e,t)&&Dbe(r,t,e[t]);if(Nbe)for(var t of Nbe(e))xht.call(e,t)&&Dbe(r,t,e[t]);return r};class Cz extends Rut{constructor(e){var t;super(e),this.protocol=tbe,this.version=rbe,this.name=vz,this.events=new Xn.EventEmitter,this.initialized=!1,this.on=(a,o)=>this.events.on(a,o),this.once=(a,o)=>this.events.once(a,o),this.off=(a,o)=>this.events.off(a,o),this.removeListener=(a,o)=>this.events.removeListener(a,o),this.dispatchEnvelope=({topic:a,message:o,sessionExists:l})=>{if(!a||!o)return;const u={topic:a,message:o,publishedAt:Date.now(),transportType:Bi.link_mode};this.relayer.onLinkMessageEvent(u,{sessionExists:l})},this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||sbe,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=K1({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:Hut.logger}),{logger:i,chunkLoggerController:s}=NWe({opts:n,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=s,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,o;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((o=this.logChunkController)==null||o.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=ai(i,this.name),this.heartbeat=new kut,this.crypto=new Gdt(this,this.logger,e==null?void 0:e.keychain),this.history=new fht(this,this.logger),this.expirer=new dht(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new zue($be($be({},qut),e==null?void 0:e.storageOptions)),this.relayer=new aht({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new uht(this,this.logger),this.verify=new hht(this,this.logger,this.storage),this.echoClient=new pht(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new vht(this,this.logger,e==null?void 0:e.telemetryEnabled)}static async init(e){const t=new Cz(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(ift,n),t}get context(){return Ci(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(abe,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.eventClient.init(),this.linkModeSupportedApps=await this.storage.getItem(abe)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const _ht=Cz,Bbe="wc",Lbe=2,Ube="client",Az=`${Bbe}@${Lbe}:${Ube}:`,Sz={name:Ube,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.org"},Fbe="WALLETCONNECT_DEEPLINK_CHOICE",Eht="proposal",jbe="Proposal expired",Cht="session",g5=qe.SEVEN_DAYS,Aht="engine",La={wc_sessionPropose:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1104},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1106},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:qe.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1112},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:qe.ONE_DAY,prompt:!1,tag:1114},res:{ttl:qe.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:qe.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:qe.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:qe.FIVE_MINUTES,prompt:!1,tag:1119}}},Iz={min:qe.FIVE_MINUTES,max:qe.SEVEN_DAYS},ah={idle:"IDLE",active:"ACTIVE"},Sht="request",Iht=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],Tht="wc",kht="auth",Rht="authKeys",Mht="pairingTopics",Pht="requests",oR=`${Tht}@${1.5}:${kht}:`,cR=`${oR}:PUB_KEY`;var Oht=Object.defineProperty,Nht=Object.defineProperties,Dht=Object.getOwnPropertyDescriptors,zbe=Object.getOwnPropertySymbols,$ht=Object.prototype.hasOwnProperty,Bht=Object.prototype.propertyIsEnumerable,Hbe=(r,e,t)=>e in r?Oht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,vs=(r,e)=>{for(var t in e||(e={}))$ht.call(e,t)&&Hbe(r,t,e[t]);if(zbe)for(var t of zbe(e))Bht.call(e,t)&&Hbe(r,t,e[t]);return r},Tf=(r,e)=>Nht(r,Dht(e));class Lht extends zut{constructor(e){super(e),this.name=Aht,this.events=new X3,this.initialized=!1,this.requestQueue={state:ah.idle,queue:[]},this.sessionRequestQueue={state:ah.idle,queue:[]},this.requestQueueDelay=qe.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(La)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},qe.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const n=Tf(vs({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:a,sessionProperties:o,relays:l}=n;let u=i,f,h=!1;try{u&&(h=this.client.core.pairing.pairings.get(u).active)}catch($){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),$}if(!u||!h){const{topic:$,uri:j}=await this.client.core.pairing.create();u=$,f=j}if(!u){const{message:$}=Bt("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error($)}const m=await this.client.core.crypto.generateKeyPair(),b=La.wc_sessionPropose.req.ttl||qe.FIVE_MINUTES,v=ia(b),C=vs({requiredNamespaces:s,optionalNamespaces:a,relays:l??[{protocol:ibe}],proposer:{publicKey:m,metadata:this.client.metadata},expiryTimestamp:v,pairingTopic:u},o&&{sessionProperties:o}),{reject:R,resolve:k,done:P}=e2(b,jbe);this.events.once(mn("session_connect"),async({error:$,session:j})=>{if($)R($);else if(j){j.self.publicKey=m;const G=Tf(vs({},j),{pairingTopic:C.pairingTopic,requiredNamespaces:C.requiredNamespaces,optionalNamespaces:C.optionalNamespaces,transportType:Bi.relay});await this.client.session.set(j.topic,G),await this.setExpiry(j.topic,j.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:j.peer.metadata}),this.cleanupDuplicatePairings(G),k(G)}});const N=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:C,throwOnFailedPublish:!0});return await this.setProposal(N,vs({id:N},C)),{uri:f,approval:P}},this.pair=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(t)}catch(n){throw this.client.logger.error("pair() failed"),n}},this.approve=async t=>{var n,i,s;const a=this.client.core.eventClient.createEvent({properties:{topic:(n=t==null?void 0:t.id)==null?void 0:n.toString(),trace:[If.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(L){throw a.setError(i2.no_internet_connection),L}try{await this.isValidProposalId(t==null?void 0:t.id)}catch(L){throw this.client.logger.error(`approve() -> proposal.get(${t==null?void 0:t.id}) failed`),a.setError(i2.proposal_not_found),L}try{await this.isValidApprove(t)}catch(L){throw this.client.logger.error("approve() -> isValidApprove() failed"),a.setError(i2.session_approve_namespace_validation_failure),L}const{id:o,relayProtocol:l,namespaces:u,sessionProperties:f,sessionConfig:h}=t,m=this.client.proposal.get(o);this.client.core.eventClient.deleteEvent({eventId:a.eventId});const{pairingTopic:b,proposer:v,requiredNamespaces:C,optionalNamespaces:R}=m;let k=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:b});k||(k=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:If.session_approve_started,properties:{topic:b,trace:[If.session_approve_started,If.session_namespaces_validation_success]}}));const P=await this.client.core.crypto.generateKeyPair(),N=v.publicKey,$=await this.client.core.crypto.generateSharedKey(P,N),j=vs(vs({relay:{protocol:l??"irn"},namespaces:u,controller:{publicKey:P,metadata:this.client.metadata},expiry:ia(g5)},f&&{sessionProperties:f}),h&&{sessionConfig:h}),G=Bi.relay;k.addTrace(If.subscribing_session_topic);try{await this.client.core.relayer.subscribe($,{transportType:G})}catch(L){throw k.setError(i2.subscribe_session_topic_failure),L}k.addTrace(If.subscribe_session_topic_success);const U=Tf(vs({},j),{topic:$,requiredNamespaces:C,optionalNamespaces:R,pairingTopic:b,acknowledged:!1,self:j.controller,peer:{publicKey:v.publicKey,metadata:v.metadata},controller:P,transportType:Bi.relay});await this.client.session.set($,U),k.addTrace(If.store_session);try{k.addTrace(If.publishing_session_settle),await this.sendRequest({topic:$,method:"wc_sessionSettle",params:j,throwOnFailedPublish:!0}).catch(L=>{throw k==null||k.setError(i2.session_settle_publish_failure),L}),k.addTrace(If.session_settle_publish_success),k.addTrace(If.publishing_session_approve),await this.sendResult({id:o,topic:b,result:{relay:{protocol:l??"irn"},responderPublicKey:P},throwOnFailedPublish:!0}).catch(L=>{throw k==null||k.setError(i2.session_approve_publish_failure),L}),k.addTrace(If.session_approve_publish_success)}catch(L){throw this.client.logger.error(L),this.client.session.delete($,oi("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe($),L}return this.client.core.eventClient.deleteEvent({eventId:k.eventId}),await this.client.core.pairing.updateMetadata({topic:b,metadata:v.metadata}),await this.client.proposal.delete(o,oi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:b}),await this.setExpiry($,ia(g5)),{topic:$,acknowledged:()=>Promise.resolve(this.client.session.get($))}},this.reject=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(t)}catch(a){throw this.client.logger.error("reject() -> isValidReject() failed"),a}const{id:n,reason:i}=t;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(a){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),a}s&&(await this.sendError({id:n,topic:s,error:i,rpcOpts:La.wc_sessionPropose.reject}),await this.client.proposal.delete(n,oi("USER_DISCONNECTED")))},this.update=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(t)}catch(h){throw this.client.logger.error("update() -> isValidUpdate() failed"),h}const{topic:n,namespaces:i}=t,{done:s,resolve:a,reject:o}=e2(),l=E0(),u=C0().toString(),f=this.client.session.get(n).namespaces;return this.events.once(mn("session_update",l),({error:h})=>{h?o(h):a()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:u}).catch(h=>{this.client.logger.error(h),this.client.session.update(n,{namespaces:f}),o(h)}),{acknowledged:s}},this.extend=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(t)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:n}=t,i=E0(),{done:s,resolve:a,reject:o}=e2();return this.events.once(mn("session_extend",i),({error:l})=>{l?o(l):a()}),await this.setExpiry(n,ia(g5)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(l=>{o(l)}),{acknowledged:s}},this.request=async t=>{this.isInitialized();try{await this.isValidRequest(t)}catch(v){throw this.client.logger.error("request() -> isValidRequest() failed"),v}const{chainId:n,request:i,topic:s,expiry:a=La.wc_sessionRequest.req.ttl}=t,o=this.client.session.get(s);(o==null?void 0:o.transportType)===Bi.relay&&await this.confirmOnlineStateOrThrow();const l=E0(),u=C0().toString(),{done:f,resolve:h,reject:m}=e2(a,"Request expired. Please try again.");this.events.once(mn("session_request",l),({error:v,result:C})=>{v?m(v):h(C)});const b=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);return b?(await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:"wc_sessionRequest",params:{request:Tf(vs({},i),{expiryTimestamp:ia(a)}),chainId:n},expiry:a,throwOnFailedPublish:!0,appLink:b}).catch(v=>m(v)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:l}),await f()):await Promise.all([new Promise(async v=>{await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:"wc_sessionRequest",params:{request:Tf(vs({},i),{expiryTimestamp:ia(a)}),chainId:n},expiry:a,throwOnFailedPublish:!0}).catch(C=>m(C)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:l}),v()}),new Promise(async v=>{var C;if(!((C=o.sessionConfig)!=null&&C.disableDeepLink)){const R=await Xct(this.client.core.storage,Fbe);await Yct({id:l,topic:s,wcDeepLink:R})}v()}),f()]).then(v=>v[2])},this.respond=async t=>{this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:i}=t,{id:s}=i,a=this.client.session.get(n);a.transportType===Bi.relay&&await this.confirmOnlineStateOrThrow();const o=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);Ta(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:o}):gs(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:o}),this.cleanupAfterResponse(t)},this.ping=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(t)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=t;if(this.client.session.keys.includes(n)){const i=E0(),s=C0().toString(),{done:a,resolve:o,reject:l}=e2();this.events.once(mn("session_ping",i),({error:u})=>{u?l(u):o()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),a()])}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(t);const{topic:n,event:i,chainId:s}=t,a=C0().toString();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:a})},this.disconnect=async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(t);const{topic:n}=t;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:oi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=Bt("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>Xlt(n,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async(t,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(t);const s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),a=s?Bi.link_mode:Bi.relay;a===Bi.relay&&await this.confirmOnlineStateOrThrow();const{chains:o,statement:l="",uri:u,domain:f,nonce:h,type:m,exp:b,nbf:v,methods:C=[],expiry:R}=t,k=[...t.resources||[]],{topic:P,uri:N}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:a});this.client.logger.info({message:"Generated new pairing",pairing:{topic:P,uri:N}});const $=await this.client.core.crypto.generateKeyPair(),j=nR($);if(await Promise.all([this.client.auth.authKeys.set(cR,{responseTopic:j,publicKey:$}),this.client.auth.pairingTopics.set(j,{topic:j,pairingTopic:P})]),await this.client.core.relayer.subscribe(j,{transportType:a}),this.client.logger.info(`sending request to new pairing topic: ${P}`),C.length>0){const{namespace:T}=f5(o[0]);let I=ylt(T,"request",C);rR(k)&&(I=_lt(I,k.pop())),k.push(I)}const G=R&&R>La.wc_sessionAuthenticate.req.ttl?R:La.wc_sessionAuthenticate.req.ttl,U={authPayload:{type:m??"caip122",chains:o,statement:l,aud:u,domain:f,version:"1",nonce:h,iat:new Date().toISOString(),exp:b,nbf:v,resources:k},requester:{publicKey:$,metadata:this.client.metadata},expiryTimestamp:ia(G)},L={eip155:{chains:o,methods:[...new Set(["personal_sign",...C])],events:["chainChanged","accountsChanged"]}},V={requiredNamespaces:{},optionalNamespaces:L,relays:[{protocol:"irn"}],pairingTopic:P,proposer:{publicKey:$,metadata:this.client.metadata},expiryTimestamp:ia(La.wc_sessionPropose.req.ttl)},{done:te,resolve:D,reject:x}=e2(G,"Request expired"),y=async({error:T,session:I})=>{if(this.events.off(mn("session_request",g),p),T)x(T);else if(I){I.self.publicKey=$,await this.client.session.set(I.topic,I),await this.setExpiry(I.topic,I.expiry),P&&await this.client.core.pairing.updateMetadata({topic:P,metadata:I.peer.metadata});const E=this.client.session.get(I.topic);await this.deleteProposal(_),D({session:E})}},p=async T=>{var I,E,M;if(await this.deletePendingAuthRequest(g,{message:"fulfilled",code:0}),T.error){const ee=oi("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return T.error.code===ee.code?void 0:(this.events.off(mn("session_connect"),y),x(T.error.message))}await this.deleteProposal(_),this.events.off(mn("session_connect"),y);const{cacaos:A,responder:B}=T.result,ae=[],W=[];for(const ee of A){await Tge({cacao:ee,projectId:this.client.core.projectId})||(this.client.logger.error(ee,"Signature verification failed"),x(oi("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:re}=ee,H=rR(re.resources),F=[uz(re.iss)],q=tR(re.iss);if(H){const fe=Mge(H),pe=Pge(H);ae.push(...fe),F.push(...pe)}for(const fe of F)W.push(`${fe}:${q}`)}const Z=await this.client.core.crypto.generateSharedKey($,B.publicKey);let K;ae.length>0&&(K={topic:Z,acknowledged:!0,self:{publicKey:$,metadata:this.client.metadata},peer:B,controller:B.publicKey,expiry:ia(g5),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:P,namespaces:Vge([...new Set(ae)],[...new Set(W)]),transportType:a},await this.client.core.relayer.subscribe(Z,{transportType:a}),await this.client.session.set(Z,K),P&&await this.client.core.pairing.updateMetadata({topic:P,metadata:B.metadata}),K=this.client.session.get(Z)),(I=this.client.metadata.redirect)!=null&&I.linkMode&&(E=B.metadata.redirect)!=null&&E.linkMode&&(M=B.metadata.redirect)!=null&&M.universal&&n&&(this.client.core.addLinkModeSupportedApp(B.metadata.redirect.universal),this.client.session.update(Z,{transportType:Bi.link_mode})),D({auths:A,session:K})},g=E0(),_=E0();this.events.once(mn("session_connect"),y),this.events.once(mn("session_request",g),p);let S;try{if(s){const T=kc("wc_sessionAuthenticate",U,g);this.client.core.history.set(P,T);const I=await this.client.core.crypto.encode("",T,{type:E7,encoding:x7});S=iR(n,P,I)}else await Promise.all([this.sendRequest({topic:P,method:"wc_sessionAuthenticate",params:U,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:g}),this.sendRequest({topic:P,method:"wc_sessionPropose",params:V,expiry:La.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:_})])}catch(T){throw this.events.off(mn("session_connect"),y),this.events.off(mn("session_request",g),p),T}return await this.setProposal(_,vs({id:_},V)),await this.setAuthRequest(g,{request:Tf(vs({},U),{verifyContext:{}}),pairingTopic:P,transportType:a}),{uri:S??N,response:te}},this.approveSessionAuthenticate=async t=>{const{id:n,auths:i}=t,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[s2.authenticated_session_approve_started]}});try{this.isInitialized()}catch(R){throw s.setError(P7.no_internet_connection),R}const a=this.getPendingAuthRequest(n);if(!a)throw s.setError(P7.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);const o=a.transportType||Bi.relay;o===Bi.relay&&await this.confirmOnlineStateOrThrow();const l=a.requester.publicKey,u=await this.client.core.crypto.generateKeyPair(),f=nR(l),h={type:z0,receiverPublicKey:l,senderPublicKey:u},m=[],b=[];for(const R of i){if(!await Tge({cacao:R,projectId:this.client.core.projectId})){s.setError(P7.invalid_cacao);const j=oi("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:f,error:j,encodeOpts:h}),new Error(j.message)}s.addTrace(s2.cacaos_verified);const{p:k}=R,P=rR(k.resources),N=[uz(k.iss)],$=tR(k.iss);if(P){const j=Mge(P),G=Pge(P);m.push(...j),N.push(...G)}for(const j of N)b.push(`${j}:${$}`)}const v=await this.client.core.crypto.generateSharedKey(u,l);s.addTrace(s2.create_authenticated_session_topic);let C;if((m==null?void 0:m.length)>0){C={topic:v,acknowledged:!0,self:{publicKey:u,metadata:this.client.metadata},peer:{publicKey:l,metadata:a.requester.metadata},controller:l,expiry:ia(g5),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:a.pairingTopic,namespaces:Vge([...new Set(m)],[...new Set(b)]),transportType:o},s.addTrace(s2.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(v,{transportType:o})}catch(R){throw s.setError(P7.subscribe_authenticated_session_topic_failure),R}s.addTrace(s2.subscribe_authenticated_session_topic_success),await this.client.session.set(v,C),s.addTrace(s2.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:a.pairingTopic,metadata:a.requester.metadata})}s.addTrace(s2.publishing_authenticated_session_approve);try{await this.sendResult({topic:f,id:n,result:{cacaos:i,responder:{publicKey:u,metadata:this.client.metadata}},encodeOpts:h,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(a.requester.metadata,o)})}catch(R){throw s.setError(P7.authenticated_session_approve_publish_failure),R}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:a.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:C}},this.rejectSessionAuthenticate=async t=>{this.isInitialized();const{id:n,reason:i}=t,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===Bi.relay&&await this.confirmOnlineStateOrThrow();const a=s.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),l=nR(a),u={type:z0,receiverPublicKey:a,senderPublicKey:o};await this.sendError({id:n,topic:l,error:i,encodeOpts:u,rpcOpts:La.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.client.proposal.delete(n,oi("USER_DISCONNECTED"))},this.formatAuthMessage=t=>{this.isInitialized();const{request:n,iss:i}=t;return kge(n,i)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const t=this.relayMessageCache.shift();t&&await this.onRelayMessage(t)}catch(t){this.client.logger.error(t)}},50)},this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var a,o;return((a=s.peerMetadata)==null?void 0:a.url)&&((o=s.peerMetadata)==null?void 0:o.url)===t.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async t=>{var n;const{topic:i,expirerHasDeleted:s=!1,emitEvent:a=!0,id:o=0}=t,{self:l}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,oi("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(l.publicKey)&&await this.client.core.crypto.deleteKeyPair(l.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(Fbe).catch(u=>this.client.logger.warn(u)),this.getPendingSessionRequests().forEach(u=>{u.topic===i&&this.deletePendingSessionRequest(u.id,oi("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=ah.idle),a&&this.client.events.emit("session_delete",{id:o,topic:i})},this.deleteProposal=async(t,n)=>{if(n)try{const i=this.client.proposal.get(t),s=this.client.core.eventClient.getEvent({topic:i.pairingTopic});s==null||s.setError(i2.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(t,oi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"proposal")},this.deletePendingSessionRequest=async(t,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==t),i&&(this.sessionRequestQueue.state=ah.idle,this.client.events.emit("session_request_expire",{id:t}))},this.deletePendingAuthRequest=async(t,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)])},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&(this.client.core.expirer.set(t,n),await this.client.session.update(t,{expiry:n}))},this.setProposal=async(t,n)=>{this.client.core.expirer.set(t,ia(La.wc_sessionPropose.req.ttl)),await this.client.proposal.set(t,n)},this.setAuthRequest=async(t,n)=>{const{request:i,pairingTopic:s,transportType:a=Bi.relay}=n;this.client.core.expirer.set(t,i.expiryTimestamp),await this.client.auth.requests.set(t,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:t,pairingTopic:s,verifyContext:i.verifyContext,transportType:a})},this.setPendingSessionRequest=async t=>{const{id:n,topic:i,params:s,verifyContext:a}=t,o=s.request.expiryTimestamp||ia(La.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,o),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:a})},this.sendRequest=async t=>{const{topic:n,method:i,params:s,expiry:a,relayRpcId:o,clientRpcId:l,throwOnFailedPublish:u,appLink:f}=t,h=kc(i,s,l);let m;const b=!!f;try{const R=b?x7:hm;m=await this.client.core.crypto.encode(n,h,{encoding:R})}catch(R){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),R}let v;if(Iht.includes(i)){const R=H0(JSON.stringify(h)),k=H0(m);v=await this.client.core.verify.register({id:k,decryptedId:R})}const C=La[i].req;if(C.attestation=v,a&&(C.ttl=a),o&&(C.id=o),this.client.core.history.set(n,h),b){const R=iR(f,n,m);await sr.Linking.openURL(R,this.client.name)}else{const R=La[i].req;a&&(R.ttl=a),o&&(R.id=o),u?(R.internal=Tf(vs({},R.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,m,R)):this.client.core.relayer.publish(n,m,R).catch(k=>this.client.logger.error(k))}return h.id},this.sendResult=async t=>{const{id:n,topic:i,result:s,throwOnFailedPublish:a,encodeOpts:o,appLink:l}=t,u=Z1(n,s);let f;const h=l&&typeof(sr==null?void 0:sr.Linking)<"u";try{const b=h?x7:hm;f=await this.client.core.crypto.encode(i,u,Tf(vs({},o||{}),{encoding:b}))}catch(b){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),b}let m;try{m=await this.client.core.history.get(i,n)}catch(b){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),b}if(h){const b=iR(l,i,f);await sr.Linking.openURL(b,this.client.name)}else{const b=La[m.request.method].res;a?(b.internal=Tf(vs({},b.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,f,b)):this.client.core.relayer.publish(i,f,b).catch(v=>this.client.logger.error(v))}await this.client.core.history.resolve(u)},this.sendError=async t=>{const{id:n,topic:i,error:s,encodeOpts:a,rpcOpts:o,appLink:l}=t,u=my(n,s);let f;const h=l&&typeof(sr==null?void 0:sr.Linking)<"u";try{const b=h?x7:hm;f=await this.client.core.crypto.encode(i,u,Tf(vs({},a||{}),{encoding:b}))}catch(b){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),b}let m;try{m=await this.client.core.history.get(i,n)}catch(b){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),b}if(h){const b=iR(l,i,f);await sr.Linking.openURL(b,this.client.name)}else{const b=o||La[m.request.method].res;this.client.core.relayer.publish(i,f,b)}await this.client.core.history.resolve(u)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;dm(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&t.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{dm(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...t.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===ah.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=ah.active;const t=this.requestQueue.queue.shift();if(t)try{await this.processRequest(t)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=ah.idle},this.processRequest=async t=>{const{topic:n,payload:i,attestation:s,transportType:a,encryptedId:o}=t,l=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:l}))switch(l){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:s,encryptedId:o});case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:o,transportType:a});case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:o,transportType:a});default:return this.client.logger.info(`Unsupported request method ${l}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:i,transportType:s}=t,a=(await this.client.core.history.get(n,i.id)).request.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${a}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:i}=Bt("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.shouldIgnorePairingRequest=t=>{const{topic:n,requestMethod:i}=t,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async t=>{const{topic:n,payload:i,attestation:s,encryptedId:a}=t,{params:o,id:l}=i;try{const u=this.client.core.eventClient.getEvent({topic:n});this.isValidConnect(vs({},i.params));const f=o.expiryTimestamp||ia(La.wc_sessionPropose.req.ttl),h=vs({id:l,pairingTopic:n,expiryTimestamp:f},o);await this.setProposal(l,h);const m=await this.getVerifyContext({attestationId:s,hash:H0(JSON.stringify(i)),encryptedId:a,metadata:h.proposer.metadata});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),u==null||u.setError(q0.proposal_listener_not_found)),u==null||u.addTrace(sh.emit_session_proposal),this.client.events.emit("session_proposal",{id:l,params:h,verifyContext:m})}catch(u){await this.sendError({id:l,topic:n,error:u,rpcOpts:La.wc_sessionPropose.autoReject}),this.client.logger.error(u)}},this.onSessionProposeResponse=async(t,n,i)=>{const{id:s}=n;if(Ta(n)){const{result:a}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const o=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const l=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const u=a.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:u});const f=await this.client.core.crypto.generateSharedKey(l,u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:f});const h=await this.client.core.relayer.subscribe(f,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:t})}else if(gs(n)){await this.client.proposal.delete(s,oi("USER_DISCONNECTED"));const a=mn("session_connect");if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners, 954`);this.events.emit(mn("session_connect"),{error:n.error})}},this.onSessionSettleRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:a,controller:o,expiry:l,namespaces:u,sessionProperties:f,sessionConfig:h}=n.params,m=Tf(vs(vs({topic:t,relay:a,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:o.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},f&&{sessionProperties:f}),h&&{sessionConfig:h}),{transportType:Bi.relay}),b=mn("session_connect");if(this.events.listenerCount(b)===0)throw new Error(`emitting ${b} without any listeners 997`);this.events.emit(mn("session_connect"),{session:m}),await this.sendResult({id:n.id,topic:t,result:!0,throwOnFailedPublish:!0})}catch(a){await this.sendError({id:i,topic:t,error:a}),this.client.logger.error(a)}},this.onSessionSettleResponse=async(t,n)=>{const{id:i}=n;Ta(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(mn("session_approve",i),{})):gs(n)&&(await this.client.session.delete(t,oi("USER_DISCONNECTED")),this.events.emit(mn("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:i,id:s}=n;try{const a=`${t}_session_update`,o=k7.get(a);if(o&&this.isRequestOutOfSync(o,s)){this.client.logger.info(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:t,error:oi("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(vs({topic:t},i));try{k7.set(a,s),await this.client.session.update(t,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0})}catch(l){throw k7.delete(a),l}this.client.events.emit("session_update",{id:s,topic:t,params:i})}catch(a){await this.sendError({id:s,topic:t,error:a}),this.client.logger.error(a)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:i}=n,s=mn("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ta(n)?this.events.emit(mn("session_update",i),{}):gs(n)&&this.events.emit(mn("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:i}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,ia(g5)),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionExtendResponse=(t,n)=>{const{id:i}=n,s=mn("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ta(n)?this.events.emit(mn("session_extend",i),{}):gs(n)&&this.events.emit(mn("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:i}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionPingResponse=(t,n)=>{const{id:i}=n,s=mn("session_ping",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);setTimeout(()=>{Ta(n)?this.events.emit(mn("session_ping",i),{}):gs(n)&&this.events.emit(mn("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Yo.publish,async()=>{s(await this.deleteSession({topic:t,id:i}))})}),this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:oi("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async t=>{var n,i,s;const{topic:a,payload:o,attestation:l,encryptedId:u,transportType:f}=t,{id:h,params:m}=o;try{await this.isValidRequest(vs({topic:a},m));const b=this.client.session.get(a),v=await this.getVerifyContext({attestationId:l,hash:H0(JSON.stringify(kc("wc_sessionRequest",m,h))),encryptedId:u,metadata:b.peer.metadata,transportType:f}),C={id:h,topic:a,params:m,verifyContext:v};await this.setPendingSessionRequest(C),f===Bi.link_mode&&(n=b.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=b.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(C):(this.addSessionRequestToSessionRequestQueue(C),this.processSessionRequestQueue())}catch(b){await this.sendError({id:h,topic:a,error:b}),this.client.logger.error(b)}},this.onSessionRequestResponse=(t,n)=>{const{id:i}=n,s=mn("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ta(n)?this.events.emit(mn("session_request",i),{result:n.result}):gs(n)&&this.events.emit(mn("session_request",i),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:i,params:s}=n;try{const a=`${t}_session_event_${s.event.name}`,o=k7.get(a);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(vs({topic:t},s)),this.client.events.emit("session_event",{id:i,topic:t,params:s}),k7.set(a,i)}catch(a){await this.sendError({id:i,topic:t,error:a}),this.client.logger.error(a)}},this.onSessionAuthenticateResponse=(t,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:t,payload:n}),Ta(n)?this.events.emit(mn("session_request",i),{result:n.result}):gs(n)&&this.events.emit(mn("session_request",i),{error:n.error})},this.onSessionAuthenticateRequest=async t=>{var n;const{topic:i,payload:s,attestation:a,encryptedId:o,transportType:l}=t;try{const{requester:u,authPayload:f,expiryTimestamp:h}=s.params,m=await this.getVerifyContext({attestationId:a,hash:H0(JSON.stringify(s)),encryptedId:o,metadata:u.metadata,transportType:l}),b={requester:u,pairingTopic:i,id:s.id,authPayload:f,verifyContext:m,expiryTimestamp:h};await this.setAuthRequest(s.id,{request:b,pairingTopic:i,transportType:l}),l===Bi.link_mode&&(n=u.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(u.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:m})}catch(u){this.client.logger.error(u);const f=s.params.requester.publicKey,h=await this.client.core.crypto.generateKeyPair(),m=this.getAppLinkIfEnabled(s.params.requester.metadata,l),b={type:z0,receiverPublicKey:f,senderPublicKey:h};await this.sendError({id:s.id,topic:i,error:u,encodeOpts:b,rpcOpts:La.wc_sessionAuthenticate.autoReject,appLink:m})}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=ah.idle,this.processSessionRequestQueue()},qe.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===t&&s.request.method==="wc_sessionRequest").forEach(s=>{const a=s.request.id,o=mn("session_request",a);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);this.events.emit(mn("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===ah.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=ah.active,this.emitSessionRequest(t)}catch(n){this.client.logger.error(n)}},this.emitSessionRequest=t=>{this.client.events.emit("session_request",t)},this.onPairingCreated=t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===t.topic);n&&this.onSessionProposeRequest({topic:t.topic,payload:kc("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id)})},this.isValidConnect=async t=>{if(!$c(t)){const{message:l}=Bt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:a,relays:o}=t;if(Dc(n)||await this.isValidPairingTopic(n),!fut(o)){const{message:l}=Bt("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(l)}!Dc(i)&&T7(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!Dc(s)&&T7(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),Dc(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(t,n)=>{const i=uut(t,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async t=>{if(!$c(t))throw new Error(Bt("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:a}=t;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const o=this.client.proposal.get(n),l=gz(i,"approve()");if(l)throw new Error(l.message);const u=Yge(o.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Os(s,!0)){const{message:f}=Bt("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(f)}Dc(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async t=>{if(!$c(t)){const{message:s}=Bt("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(s)}const{id:n,reason:i}=t;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!hut(i)){const{message:s}=Bt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=t=>{if(!$c(t)){const{message:u}=Bt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(u)}const{relay:n,controller:i,namespaces:s,expiry:a}=t;if(!Zge(n)){const{message:u}=Bt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const o=iut(i,"onSessionSettleRequest()");if(o)throw new Error(o.message);const l=gz(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(dm(a)){const{message:u}=Bt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async t=>{if(!$c(t)){const{message:l}=Bt("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(l)}const{topic:n,namespaces:i}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),a=gz(i,"update()");if(a)throw new Error(a.message);const o=Yge(s.requiredNamespaces,i,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async t=>{if(!$c(t)){const{message:i}=Bt("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(i)}const{topic:n}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!$c(t)){const{message:l}=Bt("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(l)}const{topic:n,request:i,chainId:s,expiry:a}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!Jge(o,s)){const{message:l}=Bt("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!put(i)){const{message:l}=Bt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!but(o,s,i.method)){const{message:l}=Bt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(a&&!xut(a,Iz)){const{message:l}=Bt("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${Iz.min} and ${Iz.max}`);throw new Error(l)}},this.isValidRespond=async t=>{var n;if(!$c(t)){const{message:a}=Bt("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(a)}const{topic:i,response:s}=t;try{await this.isValidSessionTopic(i)}catch(a){throw(n=t==null?void 0:t.response)!=null&&n.id&&this.cleanupAfterResponse(t),a}if(!mut(s)){const{message:a}=Bt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(a)}},this.isValidPing=async t=>{if(!$c(t)){const{message:i}=Bt("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!$c(t)){const{message:o}=Bt("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(o)}const{topic:n,event:i,chainId:s}=t;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!Jge(a,s)){const{message:o}=Bt("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(o)}if(!gut(i)){const{message:o}=Bt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}if(!vut(a,s,i.name)){const{message:o}=Bt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidDisconnect=async t=>{if(!$c(t)){const{message:i}=Bt("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidAuthenticate=t=>{const{chains:n,uri:i,domain:s,nonce:a}=t;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!Os(i,!1))throw new Error("uri is required parameter");if(!Os(s,!1))throw new Error("domain is required parameter");if(!Os(a,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(l=>f5(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:o}=f5(n[0]);if(o!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async t=>{const{attestationId:n,hash:i,encryptedId:s,metadata:a,transportType:o}=t,l={verified:{verifyUrl:a.verifyUrl||M7,validation:"UNKNOWN",origin:a.url||""}};try{if(o===Bi.link_mode){const f=this.getAppLinkIfEnabled(a,o);return l.verified.validation=f&&new URL(f).origin===new URL(a.url).origin?"VALID":"INVALID",l}const u=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:a.verifyUrl});u&&(l.verified.origin=u.origin,l.verified.isScam=u.isScam,l.verified.validation=u.origin===new URL(a.url).origin?"VALID":"INVALID")}catch(u){this.client.logger.warn(u)}return this.client.logger.debug(`Verify context: ${JSON.stringify(l)}`),l},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(i=>{if(!Os(i,!1)){const{message:s}=Bt("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})},this.getPendingAuthRequest=t=>{const n=this.client.auth.requests.get(t);return typeof n=="object"?n:void 0},this.addToRecentlyDeleted=(t,n)=>{if(this.recentlyDeletedMap.set(t,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const a of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(a)}}},this.checkRecentlyDeleted=t=>{const n=this.recentlyDeletedMap.get(t);if(n){const{message:i}=Bt("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${t}`);throw new Error(i)}},this.isLinkModeEnabled=(t,n)=>{var i,s,a,o,l,u,f,h,m;return!t||n!==Bi.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((o=(a=this.client.metadata)==null?void 0:a.redirect)==null?void 0:o.universal)!==void 0&&((u=(l=this.client.metadata)==null?void 0:l.redirect)==null?void 0:u.universal)!==""&&((f=t==null?void 0:t.redirect)==null?void 0:f.universal)!==void 0&&((h=t==null?void 0:t.redirect)==null?void 0:h.universal)!==""&&((m=t==null?void 0:t.redirect)==null?void 0:m.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(t.redirect.universal)&&typeof(sr==null?void 0:sr.Linking)<"u"},this.getAppLinkIfEnabled=(t,n)=>{var i;return this.isLinkModeEnabled(t,n)?(i=t==null?void 0:t.redirect)==null?void 0:i.universal:void 0},this.handleLinkModeMessage=({url:t})=>{if(!t||!t.includes("wc_ev")||!t.includes("topic"))return;const n=Ege(t,"topic")||"",i=decodeURIComponent(Ege(t,"wc_ev")||""),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:Bi.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})},this.registerLinkModeListeners=async()=>{var t;if(cz()||d5()&&(t=this.client.metadata.redirect)!=null&&t.linkMode){const n=sr==null?void 0:sr.Linking;if(typeof n<"u"){n.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}}isInitialized(){if(!this.initialized){const{message:e}=Bt("NOT_INITIALIZED",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Yo.message,e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):this.onRelayMessage(e)})}async onRelayMessage(e){const{topic:t,message:n,attestation:i,transportType:s}=e,{publicKey:a}=this.client.auth.authKeys.keys.includes(cR)?this.client.auth.authKeys.get(cR):{responseTopic:void 0,publicKey:void 0},o=await this.client.core.crypto.decode(t,n,{receiverPublicKey:a,encoding:s===Bi.link_mode?x7:hm});try{gy(o)?(this.client.core.history.set(t,o),this.onRelayEventRequest({topic:t,payload:o,attestation:i,transportType:s,encryptedId:H0(n)})):J1(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:t,payload:o,transportType:s}),this.client.core.history.delete(t,o.id)):this.onRelayEventUnknownPayload({topic:t,payload:o,transportType:s})}catch(l){this.client.logger.error(l)}}registerExpirerEvents(){this.client.core.expirer.on(Tu.expired,async e=>{const{topic:t,id:n}=_ge(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Bt("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,Bt("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(n2.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(n2.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Os(e,!1)){const{message:t}=Bt("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(dm(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=Bt("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!Os(e,!1)){const{message:t}=Bt("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(dm(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=Bt("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=Bt("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Os(e,!1)){const{message:t}=Bt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=Bt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!dut(e)){const{message:t}=Bt("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=Bt("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(dm(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=Bt("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class Uht extends a2{constructor(e,t){super(e,t,Eht,Az),this.core=e,this.logger=t}}let Fht=class extends a2{constructor(e,t){super(e,t,Cht,Az),this.core=e,this.logger=t}};class jht extends a2{constructor(e,t){super(e,t,Sht,Az,n=>n.id),this.core=e,this.logger=t}}class zht extends a2{constructor(e,t){super(e,t,Rht,oR,()=>cR),this.core=e,this.logger=t}}class Hht extends a2{constructor(e,t){super(e,t,Mht,oR),this.core=e,this.logger=t}}class qht extends a2{constructor(e,t){super(e,t,Pht,oR,n=>n.id),this.core=e,this.logger=t}}class Wht{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new zht(this.core,this.logger),this.pairingTopics=new Hht(this.core,this.logger),this.requests=new qht(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class Tz extends jut{constructor(e){super(e),this.protocol=Bbe,this.version=Lbe,this.name=Sz.name,this.events=new Xn.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.authenticate=async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}},this.formatAuthMessage=n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}},this.approveSessionAuthenticate=async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.rejectSessionAuthenticate=async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.name=(e==null?void 0:e.name)||Sz.name,this.metadata=(e==null?void 0:e.metadata)||bge(),this.signConfig=e==null?void 0:e.signConfig;const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:y0(K1({level:(e==null?void 0:e.logger)||Sz.logger}));this.core=(e==null?void 0:e.core)||new _ht(e),this.logger=ai(t,this.name),this.session=new Fht(this.core,this.logger),this.proposal=new Uht(this.core,this.logger),this.pendingRequest=new jht(this.core,this.logger),this.engine=new Lht(this),this.auth=new Wht(this.core,this.logger)}static async init(e){const t=new Tz(e);return await t.initialize(),t}get context(){return Ci(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success"),this.engine.processRelayMessageCache()}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var lR={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */lR.exports,function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,m=2,b=4,v=1,C=2,R=1,k=2,P=4,N=8,$=16,j=32,G=64,U=128,L=256,V=512,te=30,D="...",x=800,y=16,p=1,g=2,_=3,S=1/0,T=9007199254740991,I=17976931348623157e292,E=NaN,M=4294967295,A=M-1,B=M>>>1,ae=[["ary",U],["bind",R],["bindKey",k],["curry",N],["curryRight",$],["flip",V],["partial",j],["partialRight",G],["rearg",L]],W="[object Arguments]",Z="[object Array]",K="[object AsyncFunction]",ee="[object Boolean]",re="[object Date]",H="[object DOMException]",F="[object Error]",q="[object Function]",fe="[object GeneratorFunction]",pe="[object Map]",Ee="[object Number]",Me="[object Null]",Oe="[object Object]",je="[object Promise]",Re="[object Proxy]",Qe="[object RegExp]",Ne="[object Set]",Je="[object String]",Xe="[object Symbol]",Le="[object Undefined]",Ge="[object WeakMap]",et="[object WeakSet]",Be="[object ArrayBuffer]",Ke="[object DataView]",pt="[object Float32Array]",ne="[object Float64Array]",Y="[object Int8Array]",X="[object Int16Array]",ue="[object Int32Array]",we="[object Uint8Array]",Ce="[object Uint8ClampedArray]",Te="[object Uint16Array]",lt="[object Uint32Array]",Ct=/\b__p \+= '';/g,We=/\b(__p \+=) '' \+/g,At=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,dt=/[&<>"']/g,Lt=RegExp(xt.source),Ot=RegExp(dt.source),st=/<%-([\s\S]+?)%>/g,Ut=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qt=/^\w*$/,Wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,Vt=RegExp(rt.source),Dt=/^\s+/,at=/\s/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rt=/\{\n\/\* \[wrapped with (.+)\] \*/,ot=/,? & /,Gt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wr=/[()=,{}\[\]\/\s]/,wt=/\\(\\)?/g,yr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xt=/\w*$/,hr=/^[-+]0x[0-9a-f]+$/i,ri=/^0b[01]+$/i,ni=/^\[object .+?Constructor\]$/,ii=/^0o[0-7]+$/i,si=/^(?:0|[1-9]\d*)$/,wn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,ji=/['\n\r\u2028\u2029\\]/g,Vn="\\ud800-\\udfff",zi="\\u0300-\\u036f",Hi="\\ufe20-\\ufe2f",xi="\\u20d0-\\u20ff",Si=zi+Hi+xi,Ii="\\u2700-\\u27bf",kn="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",$s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bs="\\u2000-\\u206f",xl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tc="A-Z\\xc0-\\xd6\\xd8-\\xde",K2="\\ufe0e\\ufe0f",_h=Ds+$s+Bs+xl,lp="['’]",up="["+Vn+"]",Wm="["+_h+"]",Uu="["+Si+"]",Z2="\\d+",v9="["+Ii+"]",J2="["+kn+"]",Y2="[^"+Vn+_h+Z2+Ii+kn+tc+"]",Eh="\\ud83c[\\udffb-\\udfff]",w9="(?:"+Uu+"|"+Eh+")",Q2="[^"+Vn+"]",Ch="(?:\\ud83c[\\udde6-\\uddff]){2}",Fu="[\\ud800-\\udbff][\\udc00-\\udfff]",Gs="["+tc+"]",X2="\\u200d",ev="(?:"+J2+"|"+Y2+")",ju="(?:"+Gs+"|"+Y2+")",tv="(?:"+lp+"(?:d|ll|m|re|s|t|ve))?",rv="(?:"+lp+"(?:D|LL|M|RE|S|T|VE))?",nv=w9+"?",iv="["+K2+"]?",y9="(?:"+X2+"(?:"+[Q2,Ch,Fu].join("|")+")"+iv+nv+")*",$f="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",T4="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sv=iv+nv+y9,Vm="(?:"+[v9,Ch,Fu].join("|")+")"+sv,x9="(?:"+[Q2+Uu+"?",Uu,Ch,Fu,up].join("|")+")",av=RegExp(lp,"g"),_9=RegExp(Uu,"g"),Ah=RegExp(Eh+"(?="+Eh+")|"+x9+sv,"g"),k4=RegExp([Gs+"?"+J2+"+"+tv+"(?="+[Wm,Gs,"$"].join("|")+")",ju+"+"+rv+"(?="+[Wm,Gs+ev,"$"].join("|")+")",Gs+"?"+ev+"+"+tv,Gs+"+"+rv,T4,$f,Z2,Vm].join("|"),"g"),R4=RegExp("["+X2+Vn+Si+K2+"]"),fp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,M4=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","Weak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e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Pe={"&":"&","<":"<",">":">",'"':""","'":"'"},ft={"&":"&","<":"<",">":">",""":'"',"'":"'"},ir={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ci=parseFloat,Fr=parseInt,_i=typeof ut=="object"&&ut&&ut.Object===Object&&ut,ys=typeof self=="object"&&self&&self.Object===Object&&self,kr=_i||ys||Function("return this")(),Gn=e&&!e.nodeType&&e,li=Gn&&!0&&r&&!r.nodeType&&r,ao=li&&li.exports===Gn,es=ao&&_i.process,pn=function(){try{var de=li&&li.require&&li.require("util").types;return de||es&&es.binding&&es.binding("util")}catch{}}(),ja=pn&&pn.isArrayBuffer,qc=pn&&pn.isDate,rc=pn&&pn.isMap,_l=pn&&pn.isRegExp,Gm=pn&&pn.isSet,Sh=pn&&pn.isTypedArray;function jn(de,_e,ve){switch(ve.length){case 0:return de.call(_e);case 1:return de.call(_e,ve[0]);case 2:return de.call(_e,ve[0],ve[1]);case 3:return de.call(_e,ve[0],ve[1],ve[2])}return de.apply(_e,ve)}function BH(de,_e,ve,Ve){for(var Tt=-1,mr=de==null?0:de.length;++Tt-1}function ov(de,_e,ve){for(var Ve=-1,Tt=de==null?0:de.length;++Ve-1;);return ve}function M9(de,_e){for(var ve=de.length;ve--&&El(_e,de[ve],0)>-1;);return ve}function VH(de,_e){for(var ve=de.length,Ve=0;ve--;)de[ve]===_e&&++Ve;return Ve}var GH=fv(ye),KH=fv(Pe);function ZH(de){return"\\"+ir[de]}function JH(de,_e){return de==null?t:de[_e]}function Cl(de){return R4.test(de)}function YH(de){return fp.test(de)}function QH(de){for(var _e,ve=[];!(_e=de.next()).done;)ve.push(_e.value);return ve}function mv(de){var _e=-1,ve=Array(de.size);return de.forEach(function(Ve,Tt){ve[++_e]=[Tt,Ve]}),ve}function P9(de,_e){return function(ve){return de(_e(ve))}}function lo(de,_e){for(var ve=-1,Ve=de.length,Tt=0,mr=[];++ve-1}function Uq(c,d){var w=this.__data__,O=kp(w,c);return O<0?(++this.size,w.push([c,d])):w[O][1]=d,this}aa.prototype.clear=Dq,aa.prototype.delete=$q,aa.prototype.get=Bq,aa.prototype.has=Lq,aa.prototype.set=Uq;function oa(c){var d=-1,w=c==null?0:c.length;for(this.clear();++d=d?c:d)),c}function Gi(c,d,w,O,z,Q){var ie,ce=d&h,he=d&m,Se=d&b;if(w&&(ie=z?w(c,O,z,Q):w(c)),ie!==t)return ie;if(!Lr(c))return c;var Ie=kt(c);if(Ie){if(ie=HW(c),!ce)return ui(c,ie)}else{var ke=Nn(c),Ue=ke==q||ke==fe;if(go(c))return p_(c,ce);if(ke==Oe||ke==W||Ue&&!z){if(ie=he||Ue?{}:O_(c),!ce)return he?PW(c,tW(ie,c)):MW(c,q9(ie,c))}else{if(!Ar[ke])return z?c:{};ie=qW(c,ke,ce)}}Q||(Q=new fs);var Ye=Q.get(c);if(Ye)return Ye;Q.set(c,ie),cE(c)?c.forEach(function(gt){ie.add(Gi(gt,d,w,gt,c,Q))}):aE(c)&&c.forEach(function(gt,Qt){ie.set(Qt,Gi(gt,d,w,Qt,c,Q))});var mt=Se?he?jv:Fv:he?di:gn,jt=Ie?t:mt(c);return qi(jt||c,function(gt,Qt){jt&&(Qt=gt,gt=c[Qt]),Hf(ie,Qt,Gi(gt,d,w,Qt,c,Q))}),ie}function rW(c){var d=gn(c);return function(w){return W9(w,c,d)}}function W9(c,d,w){var O=w.length;if(c==null)return!O;for(c=Sr(c);O--;){var z=w[O],Q=d[z],ie=c[z];if(ie===t&&!(z in c)||!Q(ie))return!1}return!0}function V9(c,d,w){if(typeof c!="function")throw new Wi(a);return Jf(function(){c.apply(t,w)},d)}function qf(c,d,w,O){var z=-1,Q=dp,ie=!0,ce=c.length,he=[],Se=d.length;if(!ce)return he;w&&(d=Br(d,Ti(w))),O?(Q=ov,ie=!1):d.length>=i&&(Q=Bf,ie=!1,d=new sc(d));e:for(;++zz?0:z+w),O=O===t||O>z?z:$t(O),O<0&&(O+=z),O=w>O?0:uE(O);w0&&w(ce)?d>1?_n(ce,d-1,w,O,z):co(z,ce):O||(z[z.length]=ce)}return z}var _v=y_(),Z9=y_(!0);function Ls(c,d){return c&&_v(c,d,gn)}function Ev(c,d){return c&&Z9(c,d,gn)}function Mp(c,d){return oo(d,function(w){return da(c[w])})}function oc(c,d){d=po(d,c);for(var w=0,O=d.length;c!=null&&wd}function sW(c,d){return c!=null&&Er.call(c,d)}function aW(c,d){return c!=null&&d in Sr(c)}function oW(c,d,w){return c>=On(d,w)&&c=120&&Ie.length>=120)?new sc(ie&&Ie):t}Ie=c[0];var ke=-1,Ue=ce[0];e:for(;++ke-1;)ce!==c&&_p.call(ce,he,1),_p.call(c,he,1);return c}function a_(c,d){for(var w=c?d.length:0,O=w-1;w--;){var z=d[w];if(w==O||z!==Q){var Q=z;fa(z)?_p.call(c,z,1):Ov(c,z)}}return c}function Rv(c,d){return c+Ap(F9()*(d-c+1))}function yW(c,d,w,O){for(var z=-1,Q=un(Cp((d-c)/(w||1)),0),ie=ve(Q);Q--;)ie[O?Q:++z]=c,c+=w;return ie}function Mv(c,d){var w="";if(!c||d<1||d>T)return w;do d%2&&(w+=c),d=Ap(d/2),d&&(c+=c);while(d);return w}function Kt(c,d){return Kv($_(c,d,hi),c+"")}function xW(c){return H9(Dl(c))}function _W(c,d){var w=Dl(c);return zp(w,ac(d,0,w.length))}function Gf(c,d,w,O){if(!Lr(c))return c;d=po(d,c);for(var z=-1,Q=d.length,ie=Q-1,ce=c;ce!=null&&++zz?0:z+d),w=w>z?z:w,w<0&&(w+=z),z=d>w?0:w-d>>>0,d>>>=0;for(var Q=ve(z);++O>>1,ie=c[Q];ie!==null&&!Ri(ie)&&(w?ie<=d:ie=i){var Se=d?null:$W(c);if(Se)return pp(Se);ie=!1,z=Bf,he=new sc}else he=d?[]:ce;e:for(;++O=O?c:Ki(c,d,w)}var h_=hq||function(c){return kr.clearTimeout(c)};function p_(c,d){if(d)return c.slice();var w=c.length,O=D9?D9(w):new c.constructor(w);return c.copy(O),O}function Bv(c){var d=new c.constructor(c.byteLength);return new yp(d).set(new yp(c)),d}function IW(c,d){var w=d?Bv(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.byteLength)}function TW(c){var d=new c.constructor(c.source,Xt.exec(c));return d.lastIndex=c.lastIndex,d}function kW(c){return zf?Sr(zf.call(c)):{}}function m_(c,d){var w=d?Bv(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.length)}function g_(c,d){if(c!==d){var w=c!==t,O=c===null,z=c===c,Q=Ri(c),ie=d!==t,ce=d===null,he=d===d,Se=Ri(d);if(!ce&&!Se&&!Q&&c>d||Q&&ie&&he&&!ce&&!Se||O&&ie&&he||!w&&he||!z)return 1;if(!O&&!Q&&!Se&&c=ce)return he;var Se=w[O];return he*(Se=="desc"?-1:1)}}return c.index-d.index}function b_(c,d,w,O){for(var z=-1,Q=c.length,ie=w.length,ce=-1,he=d.length,Se=un(Q-ie,0),Ie=ve(he+Se),ke=!O;++ce1?w[z-1]:t,ie=z>2?w[2]:t;for(Q=c.length>3&&typeof Q=="function"?(z--,Q):t,ie&&Zn(w[0],w[1],ie)&&(Q=z<3?t:Q,z=1),d=Sr(d);++O-1?z[Q?d[ie]:ie]:t}}function E_(c){return ua(function(d){var w=d.length,O=w,z=Vi.prototype.thru;for(c&&d.reverse();O--;){var Q=d[O];if(typeof Q!="function")throw new Wi(a);if(z&&!ie&&Fp(Q)=="wrapper")var ie=new Vi([],!0)}for(O=ie?O:w;++O1&&nr.reverse(),Ie&&hece))return!1;var Se=Q.get(c),Ie=Q.get(d);if(Se&&Ie)return Se==d&&Ie==c;var ke=-1,Ue=!0,Ye=w&C?new sc:t;for(Q.set(c,d),Q.set(d,c);++ke1?"& ":"")+d[O],d=d.join(w>2?", ":" "),c.replace(Ft,`{ +/* [wrapped with `+d+`] */ +`)}function VW(c){return kt(c)||uc(c)||!!(L9&&c&&c[L9])}function fa(c,d){var w=typeof c;return d=d??T,!!d&&(w=="number"||w!="symbol"&&si.test(c))&&c>-1&&c%1==0&&c0){if(++d>=x)return arguments[0]}else d=0;return c.apply(t,arguments)}}function zp(c,d){var w=-1,O=c.length,z=O-1;for(d=d===t?O:d;++w1?c[d-1]:t;return w=typeof w=="function"?(c.pop(),w):t,K_(c,w)});function Z_(c){var d=J(c);return d.__chain__=!0,d}function nG(c,d){return d(c),c}function Hp(c,d){return d(c)}var iG=ua(function(c){var d=c.length,w=d?c[0]:0,O=this.__wrapped__,z=function(Q){return xv(Q,c)};return d>1||this.__actions__.length||!(O instanceof tr)||!fa(w)?this.thru(z):(O=O.slice(w,+w+(d?1:0)),O.__actions__.push({func:Hp,args:[z],thisArg:t}),new Vi(O,this.__chain__).thru(function(Q){return d&&!Q.length&&Q.push(t),Q}))});function sG(){return Z_(this)}function aG(){return new Vi(this.value(),this.__chain__)}function oG(){this.__values__===t&&(this.__values__=lE(this.value()));var c=this.__index__>=this.__values__.length,d=c?t:this.__values__[this.__index__++];return{done:c,value:d}}function cG(){return this}function lG(c){for(var d,w=this;w instanceof Tp;){var O=z_(w);O.__index__=0,O.__values__=t,d?z.__wrapped__=O:d=O;var z=O;w=w.__wrapped__}return z.__wrapped__=c,d}function uG(){var c=this.__wrapped__;if(c instanceof tr){var d=c;return this.__actions__.length&&(d=new tr(this)),d=d.reverse(),d.__actions__.push({func:Hp,args:[Zv],thisArg:t}),new Vi(d,this.__chain__)}return this.thru(Zv)}function fG(){return f_(this.__wrapped__,this.__actions__)}var dG=Dp(function(c,d,w){Er.call(c,w)?++c[w]:ca(c,w,1)});function hG(c,d,w){var O=kt(c)?C9:nW;return w&&Zn(c,d,w)&&(d=t),O(c,ht(d,3))}function pG(c,d){var w=kt(c)?oo:K9;return w(c,ht(d,3))}var mG=__(H_),gG=__(q_);function bG(c,d){return _n(qp(c,d),1)}function vG(c,d){return _n(qp(c,d),S)}function wG(c,d,w){return w=w===t?1:$t(w),_n(qp(c,d),w)}function J_(c,d){var w=kt(c)?qi:fo;return w(c,ht(d,3))}function Y_(c,d){var w=kt(c)?LH:G9;return w(c,ht(d,3))}var yG=Dp(function(c,d,w){Er.call(c,w)?c[w].push(d):ca(c,w,[d])});function xG(c,d,w,O){c=fi(c)?c:Dl(c),w=w&&!O?$t(w):0;var z=c.length;return w<0&&(w=un(z+w,0)),Zp(c)?w<=z&&c.indexOf(d,w)>-1:!!z&&El(c,d,w)>-1}var _G=Kt(function(c,d,w){var O=-1,z=typeof d=="function",Q=fi(c)?ve(c.length):[];return fo(c,function(ie){Q[++O]=z?jn(d,ie,w):Wf(ie,d,w)}),Q}),EG=Dp(function(c,d,w){ca(c,w,d)});function qp(c,d){var w=kt(c)?Br:e_;return w(c,ht(d,3))}function CG(c,d,w,O){return c==null?[]:(kt(d)||(d=d==null?[]:[d]),w=O?t:w,kt(w)||(w=w==null?[]:[w]),i_(c,d,w))}var AG=Dp(function(c,d,w){c[w?0:1].push(d)},function(){return[[],[]]});function SG(c,d,w){var O=kt(c)?cv:T9,z=arguments.length<3;return O(c,ht(d,4),w,z,fo)}function IG(c,d,w){var O=kt(c)?UH:T9,z=arguments.length<3;return O(c,ht(d,4),w,z,G9)}function TG(c,d){var w=kt(c)?oo:K9;return w(c,Gp(ht(d,3)))}function kG(c){var d=kt(c)?H9:xW;return d(c)}function RG(c,d,w){(w?Zn(c,d,w):d===t)?d=1:d=$t(d);var O=kt(c)?Qq:_W;return O(c,d)}function MG(c){var d=kt(c)?Xq:CW;return d(c)}function PG(c){if(c==null)return 0;if(fi(c))return Zp(c)?Al(c):c.length;var d=Nn(c);return d==pe||d==Ne?c.size:Iv(c).length}function OG(c,d,w){var O=kt(c)?lv:AW;return w&&Zn(c,d,w)&&(d=t),O(c,ht(d,3))}var NG=Kt(function(c,d){if(c==null)return[];var w=d.length;return w>1&&Zn(c,d[0],d[1])?d=[]:w>2&&Zn(d[0],d[1],d[2])&&(d=[d[0]]),i_(c,_n(d,1),[])}),Wp=pq||function(){return kr.Date.now()};function DG(c,d){if(typeof d!="function")throw new Wi(a);return c=$t(c),function(){if(--c<1)return d.apply(this,arguments)}}function Q_(c,d,w){return d=w?t:d,d=c&&d==null?c.length:d,la(c,U,t,t,t,t,d)}function X_(c,d){var w;if(typeof d!="function")throw new Wi(a);return c=$t(c),function(){return--c>0&&(w=d.apply(this,arguments)),c<=1&&(d=t),w}}var Yv=Kt(function(c,d,w){var O=R;if(w.length){var z=lo(w,Ol(Yv));O|=j}return la(c,O,d,w,z)}),eE=Kt(function(c,d,w){var O=R|k;if(w.length){var z=lo(w,Ol(eE));O|=j}return la(d,O,c,w,z)});function tE(c,d,w){d=w?t:d;var O=la(c,N,t,t,t,t,t,d);return O.placeholder=tE.placeholder,O}function rE(c,d,w){d=w?t:d;var O=la(c,$,t,t,t,t,t,d);return O.placeholder=rE.placeholder,O}function nE(c,d,w){var O,z,Q,ie,ce,he,Se=0,Ie=!1,ke=!1,Ue=!0;if(typeof c!="function")throw new Wi(a);d=Ji(d)||0,Lr(w)&&(Ie=!!w.leading,ke="maxWait"in w,Q=ke?un(Ji(w.maxWait)||0,d):Q,Ue="trailing"in w?!!w.trailing:Ue);function Ye(Jr){var hs=O,pa=z;return O=z=t,Se=Jr,ie=c.apply(pa,hs),ie}function mt(Jr){return Se=Jr,ce=Jf(Qt,d),Ie?Ye(Jr):ie}function jt(Jr){var hs=Jr-he,pa=Jr-Se,_E=d-hs;return ke?On(_E,Q-pa):_E}function gt(Jr){var hs=Jr-he,pa=Jr-Se;return he===t||hs>=d||hs<0||ke&&pa>=Q}function Qt(){var Jr=Wp();if(gt(Jr))return nr(Jr);ce=Jf(Qt,jt(Jr))}function nr(Jr){return ce=t,Ue&&O?Ye(Jr):(O=z=t,ie)}function Mi(){ce!==t&&h_(ce),Se=0,O=he=z=ce=t}function Jn(){return ce===t?ie:nr(Wp())}function Pi(){var Jr=Wp(),hs=gt(Jr);if(O=arguments,z=this,he=Jr,hs){if(ce===t)return mt(he);if(ke)return h_(ce),ce=Jf(Qt,d),Ye(he)}return ce===t&&(ce=Jf(Qt,d)),ie}return Pi.cancel=Mi,Pi.flush=Jn,Pi}var $G=Kt(function(c,d){return V9(c,1,d)}),BG=Kt(function(c,d,w){return V9(c,Ji(d)||0,w)});function LG(c){return la(c,V)}function Vp(c,d){if(typeof c!="function"||d!=null&&typeof d!="function")throw new Wi(a);var w=function(){var O=arguments,z=d?d.apply(this,O):O[0],Q=w.cache;if(Q.has(z))return Q.get(z);var ie=c.apply(this,O);return w.cache=Q.set(z,ie)||Q,ie};return w.cache=new(Vp.Cache||oa),w}Vp.Cache=oa;function Gp(c){if(typeof c!="function")throw new Wi(a);return function(){var d=arguments;switch(d.length){case 0:return!c.call(this);case 1:return!c.call(this,d[0]);case 2:return!c.call(this,d[0],d[1]);case 3:return!c.call(this,d[0],d[1],d[2])}return!c.apply(this,d)}}function UG(c){return X_(2,c)}var FG=SW(function(c,d){d=d.length==1&&kt(d[0])?Br(d[0],Ti(ht())):Br(_n(d,1),Ti(ht()));var w=d.length;return Kt(function(O){for(var z=-1,Q=On(O.length,w);++z=d}),uc=Y9(function(){return arguments}())?Y9:function(c){return jr(c)&&Er.call(c,"callee")&&!B9.call(c,"callee")},kt=ve.isArray,tK=ja?Ti(ja):lW;function fi(c){return c!=null&&Kp(c.length)&&!da(c)}function Zr(c){return jr(c)&&fi(c)}function rK(c){return c===!0||c===!1||jr(c)&&Kn(c)==ee}var go=gq||lw,nK=qc?Ti(qc):uW;function iK(c){return jr(c)&&c.nodeType===1&&!Yf(c)}function sK(c){if(c==null)return!0;if(fi(c)&&(kt(c)||typeof c=="string"||typeof c.splice=="function"||go(c)||Nl(c)||uc(c)))return!c.length;var d=Nn(c);if(d==pe||d==Ne)return!c.size;if(Zf(c))return!Iv(c).length;for(var w in c)if(Er.call(c,w))return!1;return!0}function aK(c,d){return Vf(c,d)}function oK(c,d,w){w=typeof w=="function"?w:t;var O=w?w(c,d):t;return O===t?Vf(c,d,t,w):!!O}function Xv(c){if(!jr(c))return!1;var d=Kn(c);return d==F||d==H||typeof c.message=="string"&&typeof c.name=="string"&&!Yf(c)}function cK(c){return typeof c=="number"&&U9(c)}function da(c){if(!Lr(c))return!1;var d=Kn(c);return d==q||d==fe||d==K||d==Re}function sE(c){return typeof c=="number"&&c==$t(c)}function Kp(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=T}function Lr(c){var d=typeof c;return c!=null&&(d=="object"||d=="function")}function jr(c){return c!=null&&typeof c=="object"}var aE=rc?Ti(rc):dW;function lK(c,d){return c===d||Sv(c,d,Hv(d))}function uK(c,d,w){return w=typeof w=="function"?w:t,Sv(c,d,Hv(d),w)}function fK(c){return oE(c)&&c!=+c}function dK(c){if(ZW(c))throw new Tt(s);return Q9(c)}function hK(c){return c===null}function pK(c){return c==null}function oE(c){return typeof c=="number"||jr(c)&&Kn(c)==Ee}function Yf(c){if(!jr(c)||Kn(c)!=Oe)return!1;var d=xp(c);if(d===null)return!0;var w=Er.call(d,"constructor")&&d.constructor;return typeof w=="function"&&w instanceof w&&bp.call(w)==uq}var ew=_l?Ti(_l):hW;function mK(c){return sE(c)&&c>=-T&&c<=T}var cE=Gm?Ti(Gm):pW;function Zp(c){return typeof c=="string"||!kt(c)&&jr(c)&&Kn(c)==Je}function Ri(c){return typeof c=="symbol"||jr(c)&&Kn(c)==Xe}var Nl=Sh?Ti(Sh):mW;function gK(c){return c===t}function bK(c){return jr(c)&&Nn(c)==Ge}function vK(c){return jr(c)&&Kn(c)==et}var wK=Up(Tv),yK=Up(function(c,d){return c<=d});function lE(c){if(!c)return[];if(fi(c))return Zp(c)?us(c):ui(c);if(Lf&&c[Lf])return QH(c[Lf]());var d=Nn(c),w=d==pe?mv:d==Ne?pp:Dl;return w(c)}function ha(c){if(!c)return c===0?c:0;if(c=Ji(c),c===S||c===-S){var d=c<0?-1:1;return d*I}return c===c?c:0}function $t(c){var d=ha(c),w=d%1;return d===d?w?d-w:d:0}function uE(c){return c?ac($t(c),0,M):0}function Ji(c){if(typeof c=="number")return c;if(Ri(c))return E;if(Lr(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=Lr(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=k9(c);var w=ri.test(c);return w||ii.test(c)?Fr(c.slice(2),w?2:8):hr.test(c)?E:+c}function fE(c){return Us(c,di(c))}function xK(c){return c?ac($t(c),-T,T):c===0?c:0}function xr(c){return c==null?"":ki(c)}var _K=Ml(function(c,d){if(Zf(d)||fi(d)){Us(d,gn(d),c);return}for(var w in d)Er.call(d,w)&&Hf(c,w,d[w])}),dE=Ml(function(c,d){Us(d,di(d),c)}),Jp=Ml(function(c,d,w,O){Us(d,di(d),c,O)}),EK=Ml(function(c,d,w,O){Us(d,gn(d),c,O)}),CK=ua(xv);function AK(c,d){var w=Rl(c);return d==null?w:q9(w,d)}var SK=Kt(function(c,d){c=Sr(c);var w=-1,O=d.length,z=O>2?d[2]:t;for(z&&Zn(d[0],d[1],z)&&(O=1);++w1),Q}),Us(c,jv(c),w),O&&(w=Gi(w,h|m|b,BW));for(var z=d.length;z--;)Ov(w,d[z]);return w});function qK(c,d){return pE(c,Gp(ht(d)))}var WK=ua(function(c,d){return c==null?{}:vW(c,d)});function pE(c,d){if(c==null)return{};var w=Br(jv(c),function(O){return[O]});return d=ht(d),s_(c,w,function(O,z){return d(O,z[0])})}function VK(c,d,w){d=po(d,c);var O=-1,z=d.length;for(z||(z=1,c=t);++Od){var O=c;c=d,d=O}if(w||c%1||d%1){var z=F9();return On(c+z*(d-c+ci("1e-"+((z+"").length-1))),d)}return Rv(c,d)}var nZ=Pl(function(c,d,w){return d=d.toLowerCase(),c+(w?bE(d):d)});function bE(c){return nw(xr(c).toLowerCase())}function vE(c){return c=xr(c),c&&c.replace(wn,GH).replace(_9,"")}function iZ(c,d,w){c=xr(c),d=ki(d);var O=c.length;w=w===t?O:ac($t(w),0,O);var z=w;return w-=d.length,w>=0&&c.slice(w,z)==d}function sZ(c){return c=xr(c),c&&Ot.test(c)?c.replace(dt,KH):c}function aZ(c){return c=xr(c),c&&Vt.test(c)?c.replace(rt,"\\$&"):c}var oZ=Pl(function(c,d,w){return c+(w?"-":"")+d.toLowerCase()}),cZ=Pl(function(c,d,w){return c+(w?" ":"")+d.toLowerCase()}),lZ=x_("toLowerCase");function uZ(c,d,w){c=xr(c),d=$t(d);var O=d?Al(c):0;if(!d||O>=d)return c;var z=(d-O)/2;return Lp(Ap(z),w)+c+Lp(Cp(z),w)}function fZ(c,d,w){c=xr(c),d=$t(d);var O=d?Al(c):0;return d&&O>>0,w?(c=xr(c),c&&(typeof d=="string"||d!=null&&!ew(d))&&(d=ki(d),!d&&Cl(c))?mo(us(c),0,w):c.split(d,w)):[]}var vZ=Pl(function(c,d,w){return c+(w?" ":"")+nw(d)});function wZ(c,d,w){return c=xr(c),w=w==null?0:ac($t(w),0,c.length),d=ki(d),c.slice(w,w+d.length)==d}function yZ(c,d,w){var O=J.templateSettings;w&&Zn(c,d,w)&&(d=t),c=xr(c),d=Jp({},d,O,T_);var z=Jp({},d.imports,O.imports,T_),Q=gn(z),ie=pv(z,Q),ce,he,Se=0,Ie=d.interpolate||Wn,ke="__p += '",Ue=gv((d.escape||Wn).source+"|"+Ie.source+"|"+(Ie===Nt?yr:Wn).source+"|"+(d.evaluate||Wn).source+"|$","g"),Ye="//# sourceURL="+(Er.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++E9+"]")+` +`;c.replace(Ue,function(gt,Qt,nr,Mi,Jn,Pi){return nr||(nr=Mi),ke+=c.slice(Se,Pi).replace(ji,ZH),Qt&&(ce=!0,ke+=`' + __e(`+Qt+`) + -'`),Zn&&(fe=!0,Te+=`'; -`+Zn+`; -__p += '`),rr&&(Te+=`' + -((__t = (`+rr+`)) == null ? '' : __t) + -'`),Ae=Ri+bt.length,bt}),Te+=`'; -`;var mt=vr.call(f,"variable")&&f.variable;if(!mt)Te=`with (obj) { -`+Te+` +'`),Jn&&(he=!0,ke+=`'; +`+Jn+`; +__p += '`),nr&&(ke+=`' + +((__t = (`+nr+`)) == null ? '' : __t) + +'`),Se=Pi+gt.length,gt}),ke+=`'; +`;var mt=Er.call(d,"variable")&&d.variable;if(!mt)ke=`with (obj) { +`+ke+` } -`;else if(Ht.test(mt))throw new kt(a);Te=(fe?Te.replace(ot,""):Te).replace(tt,"$1").replace(It,"$1;"),Te="function("+(mt||"obj")+`) { +`;else if(wr.test(mt))throw new Tt(o);ke=(he?ke.replace(Ct,""):ke).replace(We,"$1").replace(At,"$1;"),ke="function("+(mt||"obj")+`) { `+(mt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ae?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(ce?", __e = _.escape":"")+(he?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+Te+`return __p -}`;var jt=d_(function(){return fr(ee,Qe+"return "+Te).apply(t,ne)});if(jt.source=Te,cw(jt))throw jt;return jt}function QV(c){return wr(c).toLowerCase()}function XV(c){return wr(c).toUpperCase()}function eG(c,f,v){if(c=wr(c),c&&(v||f===t))return _7(c);if(!c||!(f=Si(f)))return c;var P=as(c),j=as(f),ee=E7(P,j),ne=A7(P,j)+1;return ia(P,ee,ne).join("")}function tG(c,f,v){if(c=wr(c),c&&(v||f===t))return c.slice(0,S7(c)+1);if(!c||!(f=Si(f)))return c;var P=as(c),j=A7(P,as(f))+1;return ia(P,0,j).join("")}function rG(c,f,v){if(c=wr(c),c&&(v||f===t))return c.replace(gt,"");if(!c||!(f=Si(f)))return c;var P=as(c),j=E7(P,as(f));return ia(P,j).join("")}function nG(c,f){var v=Q,P=F;if(Or(f)){var j="separator"in f?f.separator:j;v="length"in f?Ot(f.length):v,P="omission"in f?Si(f.omission):P}c=wr(c);var ee=c.length;if(ul(c)){var ne=as(c);ee=ne.length}if(v>=ee)return c;var ae=v-hl(P);if(ae<1)return P;var fe=ne?ia(ne,0,ae).join(""):c.slice(0,ae);if(j===t)return fe+P;if(ne&&(ae+=fe.length-ae),lw(j)){if(c.slice(ae).search(j)){var Ae,Ce=fe;for(j.global||(j=Cb(j.source,wr(Tt.exec(j))+"g")),j.lastIndex=0;Ae=j.exec(Ce);)var Te=Ae.index;fe=fe.slice(0,Te===t?ae:Te)}}else if(c.indexOf(Si(j),ae)!=ae){var $e=fe.lastIndexOf(j);$e>-1&&(fe=fe.slice(0,$e))}return fe+P}function iG(c){return c=wr(c),c&&Lt.test(c)?c.replace(st,Pj):c}var sG=wl(function(c,f,v){return c+(v?" ":"")+f.toUpperCase()}),fw=p9("toUpperCase");function f_(c,f,v){return c=wr(c),f=v?t:f,f===t?Tj(c)?$j(c):vj(c):c.match(f)||[]}var d_=Zt(function(c,f){try{return Fn(c,t,f)}catch(v){return cw(v)?v:new kt(v)}}),oG=no(function(c,f){return Li(f,function(v){v=Os(v),to(c,v,ow(c[v],c))}),c});function aG(c){var f=c==null?0:c.length,v=ut();return c=f?Pr(c,function(P){if(typeof P[1]!="function")throw new Ui(o);return[v(P[0]),P[1]]}):[],Zt(function(P){for(var j=-1;++jI)return[];var v=E,P=Mn(c,E);f=ut(f),c-=E;for(var j=_b(P,f);++v0||f<0)?new Xt(v):(c<0?v=v.takeRight(-c):c&&(v=v.drop(c)),f!==t&&(f=Ot(f),v=f<0?v.dropRight(-f):v.take(f-c)),v)},Xt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Xt.prototype.toArray=function(){return this.take(E)},Ns(Xt.prototype,function(c,f){var v=/^(?:filter|find|map|reject)|While$/.test(f),P=/^(?:head|last)$/.test(f),j=Z[P?"take"+(f=="last"?"Right":""):f],ee=P||/^find/.test(f);j&&(Z.prototype[f]=function(){var ne=this.__wrapped__,ae=P?[1]:arguments,fe=ne instanceof Xt,Ae=ae[0],Ce=fe||Mt(ne),Te=function(Qt){var rr=j.apply(Z,Qo([Qt],ae));return P&&$e?rr[0]:rr};Ce&&v&&typeof Ae=="function"&&Ae.length!=1&&(fe=Ce=!1);var $e=this.__chain__,Qe=!!this.__actions__.length,mt=ee&&!$e,jt=fe&&!Qe;if(!ee&&Ce){ne=jt?ne:new Xt(this);var bt=c.apply(ne,ae);return bt.__actions__.push({func:lp,args:[Te],thisArg:t}),new Fi(bt,$e)}return mt&&jt?c.apply(this,ae):(bt=this.thru(Te),mt?P?bt.value()[0]:bt.value():bt)})}),Li(["pop","push","shift","sort","splice","unshift"],function(c){var f=D0[c],v=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",P=/^(?:pop|shift)$/.test(c);Z.prototype[c]=function(){var j=arguments;if(P&&!this.__chain__){var ee=this.value();return f.apply(Mt(ee)?ee:[],j)}return this[v](function(ne){return f.apply(Mt(ne)?ne:[],j)})}}),Ns(Xt.prototype,function(c,f){var v=Z[f];if(v){var P=v.name+"";vr.call(gl,P)||(gl[P]=[]),gl[P].push({name:f,func:v})}}),gl[rp(t,k).name]=[{name:"wrapper",func:t}],Xt.prototype.clone=iz,Xt.prototype.reverse=sz,Xt.prototype.value=oz,Z.prototype.at=Dq,Z.prototype.chain=$q,Z.prototype.commit=Bq,Z.prototype.next=Lq,Z.prototype.plant=Fq,Z.prototype.reverse=jq,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=zq,Z.prototype.first=Z.prototype.head,vh&&(Z.prototype[vh]=Uq),Z},fl=Bj();si?((si.exports=fl)._=fl,Vn._=fl):Sr._=fl}).call(px)})(iF,iF.exports);var Jtt=Object.defineProperty,Ytt=Object.defineProperties,Qtt=Object.getOwnPropertyDescriptors,Upe=Object.getOwnPropertySymbols,Xtt=Object.prototype.hasOwnProperty,ert=Object.prototype.propertyIsEnumerable,Fpe=(r,e,t)=>e in r?Jtt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,AT=(r,e)=>{for(var t in e||(e={}))Xtt.call(e,t)&&Fpe(r,t,e[t]);if(Upe)for(var t of Upe(e))ert.call(e,t)&&Fpe(r,t,e[t]);return r},trt=(r,e)=>Ytt(r,Qtt(e));function R1(r,e,t){var n;const i=eT(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${Ztt}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function p2(r){return r.includes(":")?r.split(":")[1]:r}function jpe(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function rrt(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function sF(r={},e={}){const t=zpe(r),n=zpe(e);return iF.exports.merge(t,n)}function zpe(r){var e,t,n,i;const s={};if(!lx(r))return s;for(const[o,a]of Object.entries(r)){const l=qU(o)?[o]:a.chains,u=a.methods||[],h=a.events||[],p=a.rpcMap||{},g=cx(o);s[g]=trt(AT(AT({},s[g]),a),{chains:tT(l,(e=s[g])==null?void 0:e.chains),methods:tT(u,(t=s[g])==null?void 0:t.methods),events:tT(h,(n=s[g])==null?void 0:n.events),rpcMap:AT(AT({},p),(i=s[g])==null?void 0:i.rpcMap)})}return s}function nrt(r){return r.includes(":")?r.split(":")[2]:r}function Hpe(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=qU(t)?[t]:n.chains?n.chains:jpe(n.accounts);e[t]={chains:a,methods:i,events:s,accounts:o}}return e}function oF(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const qpe={},Ji=r=>qpe[r],aF=(r,e)=>{qpe[r]=e};class irt{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=p2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class srt{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||R1(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(p2(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class ort{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=p2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class art{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=p2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class crt{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=p2(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class lrt{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=p2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class urt{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=p2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new _o(new ma(n,Ji("disableProviderPing")))}}class hrt{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Ji("events"),this.client=Ji("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||R1(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(l0.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||R1(e,this.namespace);return typeof n>"u"?void 0:new _o(new ma(n,Ji("disableProviderPing")))}}var frt=Object.defineProperty,drt=Object.defineProperties,prt=Object.getOwnPropertyDescriptors,Wpe=Object.getOwnPropertySymbols,grt=Object.prototype.hasOwnProperty,mrt=Object.prototype.propertyIsEnumerable,Vpe=(r,e,t)=>e in r?frt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,CT=(r,e)=>{for(var t in e||(e={}))grt.call(e,t)&&Vpe(r,t,e[t]);if(Wpe)for(var t of Wpe(e))mrt.call(e,t)&&Vpe(r,t,e[t]);return r},cF=(r,e)=>drt(r,prt(e));let Gpe=class{constructor(e){this.events=new pn,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:mc(h1({level:(e==null?void 0:e.logger)||Bpe})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new Gpe(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:CT({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>t(null,d1(s,o))).catch(o=>t(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:ni("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:t,response:n}=await this.client.authenticate(e);t&&(this.uri=t,this.events.emit("display_uri",t));const i=await n();if(this.session=i.session,this.session){const s=Hpe(this.session.namespaces);this.namespaces=sF(this.namespaces,s),this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const o=Hpe(s.namespaces);this.namespaces=sF(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==Ppe)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Lf(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await $pe.init({logger:this.providerOpts.logger||Bpe,relayUrl:this.providerOpts.relayUrl||Vtt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>cx(t)))];aF("client",this.client),aF("events",this.events),aF("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=rrt(t,this.session),i=jpe(n),s=sF(this.namespaces,this.optionalNamespaces),o=cF(CT({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new srt({namespace:o});break;case"solana":this.rpcProviders[t]=new ort({namespace:o});break;case"cosmos":this.rpcProviders[t]=new art({namespace:o});break;case"polkadot":this.rpcProviders[t]=new irt({namespace:o});break;case"cip34":this.rpcProviders[t]=new crt({namespace:o});break;case"elrond":this.rpcProviders[t]=new lrt({namespace:o});break;case"multiversx":this.rpcProviders[t]=new urt({namespace:o});break;case"near":this.rpcProviders[t]=new hrt({namespace:o});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&Lf(i)&&this.events.emit("accountsChanged",i.map(nrt))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,o=cx(i),a=oF(i)!==oF(s)?`${o}:${oF(s)}`:i;this.onChainChanged(a)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=cF(CT({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",cF(CT({},ni("USER_DISCONNECTED")),{data:e.topic}))}),this.on(l0.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(o=>cx(o)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=cx(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Lpe}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Lpe}/${e}`)}};const brt=Gpe,wrt="wc",vrt="ethereum_provider",yrt=`${wrt}@2:${vrt}:`,xrt="https://rpc.walletconnect.com/v1/",lF=["eth_sendTransaction","personal_sign"],_rt=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],uF=["chainChanged","accountsChanged"],Ert=["chainChanged","accountsChanged","message","disconnect","connect"];var Art=Object.defineProperty,Crt=Object.defineProperties,Srt=Object.getOwnPropertyDescriptors,Kpe=Object.getOwnPropertySymbols,Irt=Object.prototype.hasOwnProperty,Trt=Object.prototype.propertyIsEnumerable,Zpe=(r,e,t)=>e in r?Art(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,f3=(r,e)=>{for(var t in e||(e={}))Irt.call(e,t)&&Zpe(r,t,e[t]);if(Kpe)for(var t of Kpe(e))Trt.call(e,t)&&Zpe(r,t,e[t]);return r},hF=(r,e)=>Crt(r,Srt(e));function ST(r){return Number(r[0].split(":")[1])}function IT(r){return`0x${r.toString(16)}`}function Rrt(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=r;if(!Lf(e))throw new Error("Invalid chains");const l={chains:e,methods:n||lF,events:s||uF,rpcMap:f3({},e.length?{[ST(e)]:a[ST(e)]}:{})},u=s==null?void 0:s.filter(w=>!uF.includes(w)),h=n==null?void 0:n.filter(w=>!lF.includes(w));if(!t&&!o&&!i&&!(u!=null&&u.length)&&!(h!=null&&h.length))return{required:e.length?l:void 0};const p=(u==null?void 0:u.length)&&(h==null?void 0:h.length)||!t,g={chains:[...new Set(p?l.chains.concat(t||[]):t)],methods:[...new Set(l.methods.concat(i!=null&&i.length?i:_rt))],events:[...new Set(l.events.concat(o!=null&&o.length?o:Ert))],rpcMap:a};return{required:e.length?l:void 0,optional:t.length?g:void 0}}let Jpe=class{constructor(){this.events=new pn.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=yrt,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Jpe;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=Rrt(this.rpc);try{const i=await new Promise(async(o,a)=>{var l;this.rpc.showQrModal&&((l=this.modal)==null||l.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(hF(f3({namespaces:f3({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{o(u)}).catch(u=>{a(new Error(u.message))})});if(!i)return;const s=dde(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:IT(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const t=await new Promise(async(i,s)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(a=>{!a.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),s(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(hF(f3({},e),{chains:this.rpc.chains})).then(a=>{i(a)}).catch(a=>{s(new Error(a.message))})}),n=t.session;if(n){const i=dde(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:IT(this.chainId)})}return t}catch(t){throw this.signer.logger.error(t),t}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",IT(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",hF(f3({},ni("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",IT(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=i.length?(e==null?void 0:e.methods)||lF:[],l=i.length?(e==null?void 0:e.events)||uF:[],u=(e==null?void 0:e.optionalMethods)||[],h=(e==null?void 0:e.optionalEvents)||[],p=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),g=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(w=>this.formatChainId(w)),optionalChains:s.map(w=>this.formatChainId(w)),methods:a,events:l,optionalMethods:u,optionalEvents:h,rpcMap:p,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:g,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?ST(this.rpc.chains):ST(this.rpc.optionalChains),this.signer=await brt.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await Promise.resolve().then(()=>c1e);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(f3({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&Lf(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&Lf(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${xrt}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};const krt=Jpe;let fF=!1,Ype,TT;const Mrt=async(r,e)=>{if(TT!==void 0)return TT;const t=NA.getAll().map(i=>i.id).filter(i=>i!==e.id),n=[e.id,...t];return TT=await krt.init({chains:n,projectId:r.projectId,relayUrl:"wss://relay.walletconnect.com",optionalChains:n,showQrModal:!0,qrModalOptions:{themeMode:r.themeMode,themeVariables:{"--wcm-z-index":"999999999999"},explorerExcludedWalletIds:"ALL",explorerRecommendedWalletIds:["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0","1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369","0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150","971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709","c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a","ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18","ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef","bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6","74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d","afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7","20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66","8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e","c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576","38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662","85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041"]}}),TT},Nrt={id:"walletconnect",name:"WalletConnect",icon:$p.walletConnect,provider:Ype,platforms:[Po.UNIVERSAL],isDetected:()=>!0,isConnected:()=>fF,disconnect:()=>{fF=!1,Object.keys(localStorage).filter(r=>r.startsWith("wc@2")||r.startsWith("@w3m")||r.startsWith("W3M")||r.startsWith("-walletlink")).forEach(r=>{localStorage.removeItem(r)}),indexedDB.deleteDatabase("WALLET_CONNECT_V2_INDEXED_DB")},connect:async(r,e)=>{if(r===void 0)throw new Error(kr.PROVIDER_IS_REQUIRED);if(e===void 0)throw new Error(kr.CONFIG_IS_REQUIRED);if(e.projectId===void 0)throw new Error(kr.PROJECT_ID_IS_REQUIRED);const t={},n=r.network;t[n.id]=n.rpcUrl;const i=await Mrt(e,n);return await new Promise((s,o)=>{i.connect({rpcMap:t,chains:[n.id],optionalChains:[n.id]}).then(()=>{fF=!0,s(Ype=i)}).catch(a=>{o(a)})})}},Prt=Object.freeze(Object.defineProperty({__proto__:null,BitgetWallet:yKe,MetaMask:axe,OkxWallet:bKe,Phantom:oxe,TrustWallet:vKe,WalletConnect:Nrt,Web3Modal:mKe,XdefiWallet:wKe},Symbol.toStringTag,{value:"Module"})),Ort={"app.phantom":"phantom","io.metamask":"metamask","com.bitget.web3":"bitgetwallet","com.okex.wallet":"okxwallet","com.trustwallet.app":"trustwallet","io.xdefi":"xdefiwallet"},dF={},Drt={Wallet:M4e,switcher:gv,registerAdapter:r=>{if(Ort[r.id]!==void 0){console.warn(`Adapter is not registered, because it is already registered default: ${r.id}`);return}if(Object.values(dF).find(e=>e.id===r.id)!==void 0)throw new Error(`Adapter with id ${r.id} already exists`);dF[r.id]=r},toEIP6963ProviderDetail:r=>{if(r.provider===void 0)throw new Error("Cannot convert adapter without provider to EIP6963ProviderDetail");return{info:{uuid:r.id,name:r.name,icon:r.icon},provider:r.provider}},fromEIP6963ProviderDetail:r=>({name:r.info.name,icon:r.info.icon,provider:r.provider,id:r.info.rdns??r.info.uuid,platforms:[Po.BROWSER,Po.MOBILE],isDetected:()=>!0,isConnected:async()=>Boolean((await r.provider.request({method:"eth_accounts"})).length),connect:async()=>await new Promise((e,t)=>{try{r.provider.request({method:"eth_requestAccounts"}).then(()=>{e(r.provider)}).catch(n=>{t(n)})}catch(n){t(n)}})}),adapters:Object.assign(dF,Prt)},Qpe={FIVE_MINUTES_IN_MS:3e5};class $rt{constructor(e){const{enabled:t=!0,nonceRefetchIntervalMs:n=Qpe.FIVE_MINUTES_IN_MS,sessionRefetchIntervalMs:i=Qpe.FIVE_MINUTES_IN_MS,signOutOnAccountChange:s=!0,signOutOnDisconnect:o=!0,signOutOnNetworkChange:a=!0,...l}=e;this.options={enabled:t,nonceRefetchIntervalMs:n,sessionRefetchIntervalMs:i,signOutOnDisconnect:o,signOutOnAccountChange:s,signOutOnNetworkChange:a},this.methods=l}async getNonce(e){const t=await this.methods.getNonce(e);if(!t)throw new Error("siweControllerClient:getNonce - nonce is undefined");return t}createMessage(e){const t=this.methods.createMessage(e);if(!t)throw new Error("siweControllerClient:createMessage - message is undefined");return t}async verifyMessage(e){return await this.methods.verifyMessage(e)}async getSession(){const e=await this.methods.getSession();if(!e)throw new Error("siweControllerClient:getSession - session is undefined");return e}async signIn(){var l;const{address:e}=zt.state,t=await this.methods.getNonce(e);if(!e)throw new Error("An address is required to create a SIWE message.");const n=vv.caipNetworkIdToNumber((l=lr.state.caipNetwork)==null?void 0:l.id);if(!n)throw new Error("A chainId is required to create a SIWE message.");const i=this.methods.createMessage({address:e,nonce:t,chainId:n}),s=await Ur.signMessage(i);if(!await this.methods.verifyMessage({message:i,signature:s}))throw new Error("Error verifying SIWE signature");const a=await this.methods.getSession();if(!a)throw new Error("Error verifying SIWE signature");return this.methods.onSignIn&&this.methods.onSignIn(a),$A.navigateAfterNetworkSwitch(),a}async signOut(){return this.methods.signOut()}}const du=vi({status:"uninitialized"}),gx={state:du,subscribeKey(r,e){return Ra(du,r,e)},subscribe(r){return hs(du,()=>r(du))},_getClient(){if(!du._client)throw new Error("SIWEController client not set");return du._client},async getNonce(r){const t=await this._getClient().getNonce(r);return this.setNonce(t),t},async getSession(){const e=await this._getClient().getSession();return e&&(this.setSession(e),this.setStatus("success")),e},createMessage(r){const t=this._getClient().createMessage(r);return this.setMessage(t),t},async verifyMessage(r){return await this._getClient().verifyMessage(r)},async signIn(){return await this._getClient().signIn()},async signOut(){var e;const r=this._getClient();await r.signOut(),this.setStatus("ready"),(e=r.onSignOut)==null||e.call(r)},onSignIn(r){var t;const e=this._getClient();(t=e.onSignIn)==null||t.call(e,r)},onSignOut(){var e;const r=this._getClient();(e=r.onSignOut)==null||e.call(r)},setSIWEClient(r){du._client=Lp(r),du.status="ready",hr.setIsSiweEnabled(r.options.enabled)},setNonce(r){du.nonce=r},setStatus(r){du.status=r},setMessage(r){du.message=r},setSession(r){du.session=r}},Brt=Ze` +`)+ke+`return __p +}`;var jt=yE(function(){return mr(Q,Ye+"return "+ke).apply(t,ie)});if(jt.source=ke,Xv(jt))throw jt;return jt}function xZ(c){return xr(c).toLowerCase()}function _Z(c){return xr(c).toUpperCase()}function EZ(c,d,w){if(c=xr(c),c&&(w||d===t))return k9(c);if(!c||!(d=ki(d)))return c;var O=us(c),z=us(d),Q=R9(O,z),ie=M9(O,z)+1;return mo(O,Q,ie).join("")}function CZ(c,d,w){if(c=xr(c),c&&(w||d===t))return c.slice(0,O9(c)+1);if(!c||!(d=ki(d)))return c;var O=us(c),z=M9(O,us(d))+1;return mo(O,0,z).join("")}function AZ(c,d,w){if(c=xr(c),c&&(w||d===t))return c.replace(Dt,"");if(!c||!(d=ki(d)))return c;var O=us(c),z=R9(O,us(d));return mo(O,z).join("")}function SZ(c,d){var w=te,O=D;if(Lr(d)){var z="separator"in d?d.separator:z;w="length"in d?$t(d.length):w,O="omission"in d?ki(d.omission):O}c=xr(c);var Q=c.length;if(Cl(c)){var ie=us(c);Q=ie.length}if(w>=Q)return c;var ce=w-Al(O);if(ce<1)return O;var he=ie?mo(ie,0,ce).join(""):c.slice(0,ce);if(z===t)return he+O;if(ie&&(ce+=he.length-ce),ew(z)){if(c.slice(ce).search(z)){var Se,Ie=he;for(z.global||(z=gv(z.source,xr(Xt.exec(z))+"g")),z.lastIndex=0;Se=z.exec(Ie);)var ke=Se.index;he=he.slice(0,ke===t?ce:ke)}}else if(c.indexOf(ki(z),ce)!=ce){var Ue=he.lastIndexOf(z);Ue>-1&&(he=he.slice(0,Ue))}return he+O}function IZ(c){return c=xr(c),c&&Lt.test(c)?c.replace(xt,rq):c}var TZ=Pl(function(c,d,w){return c+(w?" ":"")+d.toUpperCase()}),nw=x_("toUpperCase");function wE(c,d,w){return c=xr(c),d=w?t:d,d===t?YH(c)?sq(c):zH(c):c.match(d)||[]}var yE=Kt(function(c,d){try{return jn(c,t,d)}catch(w){return Xv(w)?w:new Tt(w)}}),kZ=ua(function(c,d){return qi(d,function(w){w=Fs(w),ca(c,w,Yv(c[w],c))}),c});function RZ(c){var d=c==null?0:c.length,w=ht();return c=d?Br(c,function(O){if(typeof O[1]!="function")throw new Wi(a);return[w(O[0]),O[1]]}):[],Kt(function(O){for(var z=-1;++zT)return[];var w=M,O=On(c,M);d=ht(d),c-=M;for(var z=hv(O,d);++w0||d<0)?new tr(w):(c<0?w=w.takeRight(-c):c&&(w=w.drop(c)),d!==t&&(d=$t(d),w=d<0?w.dropRight(-d):w.take(d-c)),w)},tr.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},tr.prototype.toArray=function(){return this.take(M)},Ls(tr.prototype,function(c,d){var w=/^(?:filter|find|map|reject)|While$/.test(d),O=/^(?:head|last)$/.test(d),z=J[O?"take"+(d=="last"?"Right":""):d],Q=O||/^find/.test(d);z&&(J.prototype[d]=function(){var ie=this.__wrapped__,ce=O?[1]:arguments,he=ie instanceof tr,Se=ce[0],Ie=he||kt(ie),ke=function(Qt){var nr=z.apply(J,co([Qt],ce));return O&&Ue?nr[0]:nr};Ie&&w&&typeof Se=="function"&&Se.length!=1&&(he=Ie=!1);var Ue=this.__chain__,Ye=!!this.__actions__.length,mt=Q&&!Ue,jt=he&&!Ye;if(!Q&&Ie){ie=jt?ie:new tr(this);var gt=c.apply(ie,ce);return gt.__actions__.push({func:Hp,args:[ke],thisArg:t}),new Vi(gt,Ue)}return mt&&jt?c.apply(this,ce):(gt=this.thru(ke),mt?O?gt.value()[0]:gt.value():gt)})}),qi(["pop","push","shift","sort","splice","unshift"],function(c){var d=mp[c],w=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);J.prototype[c]=function(){var z=arguments;if(O&&!this.__chain__){var Q=this.value();return d.apply(kt(Q)?Q:[],z)}return this[w](function(ie){return d.apply(kt(ie)?ie:[],z)})}}),Ls(tr.prototype,function(c,d){var w=J[d];if(w){var O=w.name+"";Er.call(kl,O)||(kl[O]=[]),kl[O].push({name:d,func:w})}}),kl[$p(t,k).name]=[{name:"wrapper",func:t}],tr.prototype.clone=Iq,tr.prototype.reverse=Tq,tr.prototype.value=kq,J.prototype.at=iG,J.prototype.chain=sG,J.prototype.commit=aG,J.prototype.next=oG,J.prototype.plant=lG,J.prototype.reverse=uG,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=fG,J.prototype.first=J.prototype.head,Lf&&(J.prototype[Lf]=cG),J},Sl=aq();li?((li.exports=Sl)._=Sl,Gn._=Sl):kr._=Sl}).call(ut)}(lR,lR.exports);var Vht=lR.exports;const qbe="error",Ght="wss://relay.walletconnect.org",Kht="wc",Zht="universal_provider",Wbe=`${Kht}@2:${Zht}:`,Vbe="https://rpc.walletconnect.org/v1/",b5="generic",Jht=`${Vbe}bundler`,ku={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Yht=Object.defineProperty,Qht=Object.defineProperties,Xht=Object.getOwnPropertyDescriptors,Gbe=Object.getOwnPropertySymbols,e0t=Object.prototype.hasOwnProperty,t0t=Object.prototype.propertyIsEnumerable,Kbe=(r,e,t)=>e in r?Yht(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,uR=(r,e)=>{for(var t in e||(e={}))e0t.call(e,t)&&Kbe(r,t,e[t]);if(Gbe)for(var t of Gbe(e))t0t.call(e,t)&&Kbe(r,t,e[t]);return r},r0t=(r,e)=>Qht(r,Xht(e));function ml(r,e,t){var n;const i=f5(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${Vbe}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function o2(r){return r.includes(":")?r.split(":")[1]:r}function Zbe(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function n0t(r,e){const t=Object.keys(e.namespaces).filter(i=>i.includes(r));if(!t.length)return[];const n=[];return t.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function kz(r={},e={}){const t=Jbe(r),n=Jbe(e);return Vht.merge(t,n)}function Jbe(r){var e,t,n,i;const s={};if(!T7(r))return s;for(const[a,o]of Object.entries(r)){const l=pz(a)?[a]:o.chains,u=o.methods||[],f=o.events||[],h=o.rpcMap||{},m=I7(a);s[m]=r0t(uR(uR({},s[m]),o),{chains:eR(l,(e=s[m])==null?void 0:e.chains),methods:eR(u,(t=s[m])==null?void 0:t.methods),events:eR(f,(n=s[m])==null?void 0:n.events),rpcMap:uR(uR({},h),(i=s[m])==null?void 0:i.rpcMap)})}return s}function i0t(r){return r.includes(":")?r.split(":")[2]:r}function Ybe(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],a=n.accounts||[],o=pz(t)?[t]:n.chains?n.chains:Zbe(n.accounts);e[t]={chains:o,methods:i,events:s,accounts:a}}return e}function Rz(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const Qbe={},Fn=r=>Qbe[r],Mz=(r,e)=>{Qbe[r]=e};class s0t{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=o2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}var a0t=Object.defineProperty,o0t=Object.defineProperties,c0t=Object.getOwnPropertyDescriptors,Xbe=Object.getOwnPropertySymbols,l0t=Object.prototype.hasOwnProperty,u0t=Object.prototype.propertyIsEnumerable,e2e=(r,e,t)=>e in r?a0t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,t2e=(r,e)=>{for(var t in e||(e={}))l0t.call(e,t)&&e2e(r,t,e[t]);if(Xbe)for(var t of Xbe(e))u0t.call(e,t)&&e2e(r,t,e[t]);return r},r2e=(r,e)=>o0t(r,c0t(e));class f0t{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||ml(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=parseInt(o2(t));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let i=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,n,i;const s=(n=(t=e.request)==null?void 0:t.params)==null?void 0:n[0];if(!s)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const a=this.client.session.get(e.topic),o=((i=a==null?void 0:a.sessionProperties)==null?void 0:i.capabilities)||{};if(o!=null&&o[s])return o==null?void 0:o[s];const l=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:r2e(t2e({},a.sessionProperties||{}),{capabilities:r2e(t2e({},o||{}),{[s]:l})})})}catch(u){console.warn("Failed to update session with capabilities",u)}return l}async getCallStatus(e){var t,n;const i=this.client.session.get(e.topic),s=(t=i.sessionProperties)==null?void 0:t.bundler_name;if(s){const o=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(o,e)}catch(l){console.warn("Failed to fetch call status from bundler",l,o)}}const a=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(a)try{return await this.getUserOperationReceipt(a,e)}catch(o){console.warn("Failed to fetch call status from custom bundler",o,a)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var n;const i=new URL(e),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(kc("eth_getUserOperationReceipt",[(n=t.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}getBundlerUrl(e,t){return`${Jht}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}}class d0t{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=o2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}class h0t{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=o2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}class p0t{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||ml(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Su(new ta(n,Fn("disableProviderPing")))}}class m0t{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),i=o2(t);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}class g0t{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=o2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}class b0t{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;const i=o2(t);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}class v0t{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||ml(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var n;e[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace);return typeof n>"u"?void 0:new Su(new ta(n,Fn("disableProviderPing")))}}class w0t{constructor(e){this.name="tezos",this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||ml(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{e[t]=this.createHttpProvider(t)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace);return typeof n>"u"?void 0:new Su(new ta(n))}}class y0t{constructor(e){this.name=b5,this.namespace=e.namespace,this.events=Fn("events"),this.client=Fn("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(ku.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const n={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(i=>{const s=f5(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new ta(n,Fn("disableProviderPing")))}}var x0t=Object.defineProperty,_0t=Object.defineProperties,E0t=Object.getOwnPropertyDescriptors,n2e=Object.getOwnPropertySymbols,C0t=Object.prototype.hasOwnProperty,A0t=Object.prototype.propertyIsEnumerable,i2e=(r,e,t)=>e in r?x0t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,fR=(r,e)=>{for(var t in e||(e={}))C0t.call(e,t)&&i2e(r,t,e[t]);if(n2e)for(var t of n2e(e))A0t.call(e,t)&&i2e(r,t,e[t]);return r},Pz=(r,e)=>_0t(r,E0t(e));const S0t=class zve{constructor(e){this.events=new X3,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:y0(K1({level:(e==null?void 0:e.logger)||qbe})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new zve(e);return await t.initialize(),t}async request(e,t,n){const[i,s]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:fR({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,t,n,i){const s=new Date().getTime();this.request(e,n,i).then(a=>t(null,Z1(s,a))).catch(a=>t(a,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:oi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:n,response:i}=await this.client.authenticate(e,t);n&&(this.uri=n,this.events.emit("display_uri",n));const s=await i();if(this.session=s.session,this.session){const a=Ybe(this.session.namespaces);this.namespaces=kz(this.namespaces,a),this.persist("namespaces",this.namespaces),this.onConnect()}return s}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(s=>{this.session=s;const a=Ybe(s.namespaces);this.namespaces=kz(this.namespaces,a),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==jbe)throw s;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===b5?s.setDefaultChain(`${n}:${i}`,t):s.setDefaultChain(i,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(rh(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Tz.init({core:this.providerOpts.core,logger:this.providerOpts.logger||qbe,relayUrl:this.providerOpts.relayUrl||Ght,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>I7(t)))];Mz("client",this.client),Mz("events",this.events),Mz("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=n0t(t,this.session),i=Zbe(n),s=kz(this.namespaces,this.optionalNamespaces),a=Pz(fR({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new f0t({namespace:a});break;case"algorand":this.rpcProviders[t]=new p0t({namespace:a});break;case"solana":this.rpcProviders[t]=new d0t({namespace:a});break;case"cosmos":this.rpcProviders[t]=new h0t({namespace:a});break;case"polkadot":this.rpcProviders[t]=new s0t({namespace:a});break;case"cip34":this.rpcProviders[t]=new m0t({namespace:a});break;case"elrond":this.rpcProviders[t]=new g0t({namespace:a});break;case"multiversx":this.rpcProviders[t]=new b0t({namespace:a});break;case"near":this.rpcProviders[t]=new v0t({namespace:a});break;case"tezos":this.rpcProviders[t]=new w0t({namespace:a});break;default:this.rpcProviders[b5]?this.rpcProviders[b5].updateNamespace(a):this.rpcProviders[b5]=new y0t({namespace:a})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:n}=t;if(n.name==="accountsChanged"){const i=n.data;i&&rh(i)&&this.events.emit("accountsChanged",i.map(i0t))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,a=I7(i),o=Rz(i)!==Rz(s)?`${a}:${Rz(s)}`:i;this.onChainChanged(o)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var n;const{namespaces:i}=t,s=(n=this.client)==null?void 0:n.session.get(e);this.session=Pz(fR({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Pz(fR({},oi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(ku.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[b5]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(a=>I7(a)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const i=I7(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);i&&(t||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Wbe}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Wbe}/${e}`)}},I0t="wc",T0t="ethereum_provider",k0t=`${I0t}@2:${T0t}:`,R0t="https://rpc.walletconnect.org/v1/",Oz=["eth_sendTransaction","personal_sign"],M0t=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],Nz=["chainChanged","accountsChanged"],P0t=["chainChanged","accountsChanged","message","disconnect","connect"];var O0t=Object.defineProperty,N0t=Object.defineProperties,D0t=Object.getOwnPropertyDescriptors,s2e=Object.getOwnPropertySymbols,$0t=Object.prototype.hasOwnProperty,B0t=Object.prototype.propertyIsEnumerable,a2e=(r,e,t)=>e in r?O0t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v5=(r,e)=>{for(var t in e||(e={}))$0t.call(e,t)&&a2e(r,t,e[t]);if(s2e)for(var t of s2e(e))B0t.call(e,t)&&a2e(r,t,e[t]);return r},Dz=(r,e)=>N0t(r,D0t(e));function dR(r){return Number(r[0].split(":")[1])}function hR(r){return`0x${r.toString(16)}`}function L0t(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:a,rpcMap:o}=r;if(!rh(e))throw new Error("Invalid chains");const l={chains:e,methods:n||Oz,events:s||Nz,rpcMap:v5({},e.length?{[dR(e)]:o[dR(e)]}:{})},u=s==null?void 0:s.filter(b=>!Nz.includes(b)),f=n==null?void 0:n.filter(b=>!Oz.includes(b));if(!t&&!a&&!i&&!(u!=null&&u.length)&&!(f!=null&&f.length))return{required:e.length?l:void 0};const h=(u==null?void 0:u.length)&&(f==null?void 0:f.length)||!t,m={chains:[...new Set(h?l.chains.concat(t||[]):t)],methods:[...new Set(l.methods.concat(i!=null&&i.length?i:M0t))],events:[...new Set(l.events.concat(a!=null&&a.length?a:P0t))],rpcMap:o};return{required:e.length?l:void 0,optional:t.length?m:void 0}}const U0t=class Hve{constructor(){this.events=new Xn.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=k0t,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Hve;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,n){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=L0t(this.rpc);try{const i=await new Promise(async(a,o)=>{var l;this.rpc.showQrModal&&((l=this.modal)==null||l.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),o(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Dz(v5({namespaces:v5({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{a(u)}).catch(u=>{o(new Error(u.message))})});if(!i)return;const s=dge(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:hR(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async authenticate(e,t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const n=await new Promise(async(s,a)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(l=>{!l.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(Dz(v5({},e),{chains:this.rpc.chains}),t).then(l=>{s(l)}).catch(l=>{a(new Error(l.message))})}),i=n.session;if(i){const s=dge(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:hR(this.chainId)})}return n}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",hR(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Dz(v5({},oi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",hR(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,i]=e.split(":");return{chainId:`${t}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,n;const i=(t=e==null?void 0:e.chains)!=null?t:[],s=(n=e==null?void 0:e.optionalChains)!=null?n:[],a=i.concat(s);if(!a.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const o=i.length?(e==null?void 0:e.methods)||Oz:[],l=i.length?(e==null?void 0:e.events)||Nz:[],u=(e==null?void 0:e.optionalMethods)||[],f=(e==null?void 0:e.optionalEvents)||[],h=(e==null?void 0:e.rpcMap)||this.buildRpcMap(a,e.projectId),m=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(b=>this.formatChainId(b)),optionalChains:s.map(b=>this.formatChainId(b)),methods:o,events:l,optionalMethods:u,optionalEvents:f,rpcMap:h,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:m,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,t)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?dR(this.rpc.chains):dR(this.rpc.optionalChains),this.signer=await S0t.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await Promise.resolve().then(()=>g2e);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(v5({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:i}=e;t&&rh(t)&&(this.rpc.chains=t.map(s=>this.formatChainId(s)),t.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),n&&rh(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${R0t}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}};let $z=!1,pR;const F0t=async(r,e)=>{if(pR!==void 0)return pR;const t=lS.getAll().map(i=>i.id).filter(i=>i!==e.id),n=[e.id,...t];return pR=await U0t.init({chains:n,projectId:r.projectId,optionalChains:n,showQrModal:!0,qrModalOptions:{themeMode:r.themeMode,themeVariables:r.themeVariables}}),pR},j0t={id:"walletconnect",name:"WalletConnect",icon:v1.walletConnect,platforms:[za.UNIVERSAL],isDetected:()=>!0,isConnected:()=>$z,disconnect:()=>{$z=!1,Object.keys(localStorage).filter(r=>r.startsWith("wc@2")||r.startsWith("@w3m")||r.startsWith("W3M")||r.startsWith("-walletlink")).forEach(r=>{localStorage.removeItem(r)}),indexedDB.deleteDatabase("WALLET_CONNECT_V2_INDEXED_DB")},connect:async(r,e)=>{if(r===void 0)throw new Error(Or.PROVIDER_IS_REQUIRED);if(e===void 0)throw new Error(Or.CONFIG_IS_REQUIRED);if(e.projectId===void 0)throw new Error(Or.PROJECT_ID_IS_REQUIRED);const t={},n=r.network;t[n.id]=n.rpcUrl;const i=await F0t(e,n);return await new Promise((s,a)=>{i.connect({rpcMap:t,chains:[n.id],optionalChains:[n.id]}).then(()=>{$z=!0,s(i)}).catch(o=>{a(o)})})}},z0t=Object.freeze(Object.defineProperty({__proto__:null,BitgetWallet:tat,MetaMask:ZRe,OkxWallet:JRe,Phantom:KRe,TrustWallet:QRe,WalletConnect:j0t,Web3Wallets:eat,XdefiWallet:YRe},Symbol.toStringTag,{value:"Module"})),H0t={"app.phantom":"phantom","io.metamask":"metamask","com.bitget.web3":"bitgetwallet","com.okex.wallet":"okxwallet","com.trustwallet.app":"trustwallet","io.xdefi":"xdefiwallet"},Bz={},q0t={Wallet:V7e,switcher:g3,registerAdapter:r=>{if(H0t[r.id]!==void 0){console.warn(`Adapter is not registered, because it is already registered default: ${r.id}`);return}if(Object.values(Bz).find(e=>e.id===r.id)!==void 0)throw new Error(`Adapter with id ${r.id} already exists`);Bz[r.id]=r},fromEIP6963ProviderDetail:r=>({name:r.info.name,icon:r.info.icon,id:r.info.rdns??r.info.uuid,platforms:[za.BROWSER,za.MOBILE],isDetected:()=>!0,isConnected:async()=>!!(await r.provider.request({method:"eth_accounts"})).length,connect:async()=>await new Promise((e,t)=>{try{r.provider.request({method:"eth_requestAccounts"}).then(()=>{e(r.provider)}).catch(n=>{t(n)})}catch(n){t(n)}})}),adapters:Object.assign(Bz,z0t)},Ru=Ei({status:"uninitialized"}),$7={state:Ru,subscribeKey(r,e){return Lo(Ru,r,e)},subscribe(r){return ms(Ru,()=>r(Ru))},_getClient(){if(!Ru._client)throw new Error("SIWEController client not set");return Ru._client},async getNonce(r){const t=await this._getClient().getNonce(r);return this.setNonce(t),t},async getSession(){const e=await this._getClient().getSession();return e&&(this.setSession(e),this.setStatus("success")),e},createMessage(r){const t=this._getClient().createMessage(r);return this.setMessage(t),t},async verifyMessage(r){return await this._getClient().verifyMessage(r)},async signIn(){return await this._getClient().signIn()},async signOut(){var e;const r=this._getClient();await r.signOut(),this.setStatus("ready"),(e=r.onSignOut)==null||e.call(r)},onSignIn(r){var t;const e=this._getClient();(t=e.onSignIn)==null||t.call(e,r)},onSignOut(){var e;const r=this._getClient();(e=r.onSignOut)==null||e.call(r)},setSIWEClient(r){Ru._client=y1(r),Ru.status="ready",pr.setIsSiweEnabled(r.options.enabled)},setNonce(r){Ru.nonce=r},setStatus(r){Ru.status=r},setMessage(r){Ru.message=r},setSession(r){Ru.session=r}},W0t=Ze` :host { display: flex; justify-content: center; @@ -9323,13 +9333,13 @@ function print() { __p += __j.call(arguments, '') } wui-visual-thumbnail:nth-child(1) { z-index: 1; } -`;var Lrt=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let RT=class extends Fe{constructor(){var e;super(...arguments),this.dappImageUrl=(e=hr.state.metadata)==null?void 0:e.icons,this.walletImageUrl=xs.getConnectedWalletImageUrl()}firstUpdated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll("wui-visual-thumbnail");e!=null&&e[0]&&this.createAnimation(e[0],"translate(18px)"),e!=null&&e[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){var e;return ce` +`;var V0t=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let mR=class extends He{constructor(){var e;super(...arguments),this.dappImageUrl=(e=pr.state.metadata)==null?void 0:e.icons,this.walletImageUrl=Ts.getConnectedWalletImageUrl()}firstUpdated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll("wui-visual-thumbnail");e!=null&&e[0]&&this.createAnimation(e[0],"translate(18px)"),e!=null&&e[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){var e;return le` - `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};RT.styles=Brt,RT=Lrt([Le("w3m-connecting-siwe")],RT);var Xpe=globalThis&&globalThis.__decorate||function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let kT=class extends Fe{constructor(){var e;super(...arguments),this.dappName=(e=hr.state.metadata)==null?void 0:e.name,this.isSigning=!1}render(){return ce` + `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};mR.styles=W0t,mR=V0t([Fe("w3m-connecting-siwe")],mR);var o2e=function(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var o=r.length-1;o>=0;o--)(a=r[o])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};let gR=class extends He{constructor(){var e;super(...arguments),this.dappName=(e=pr.state.metadata)==null?void 0:e.name,this.isSigning=!1}render(){return le` @@ -9373,51 +9383,51 @@ function print() { __p += __j.call(arguments, '') } ${this.isSigning?"Signing...":"Sign"} - `}async onSign(){this.isSigning=!0,yr.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track"});try{gx.setStatus("loading");const e=await gx.signIn();return gx.setStatus("success"),yr.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track"}),e}catch{return dn.showError("Signature declined"),gx.setStatus("error"),yr.sendEvent({event:"SIWE_AUTH_ERROR",type:"track"})}finally{this.isSigning=!1}}async onCancel(){const{isConnected:e}=zt.state;e?(await Ur.disconnect(),Zr.close()):et.push("Connect"),yr.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track"})}};Xpe([Oe()],kT.prototype,"isSigning",void 0),kT=Xpe([Le("w3m-connecting-siwe-view")],kT);function Urt(r){return new $rt(r)}const MT=Object.freeze(Object.defineProperty({__proto__:null,SIWEController:gx,get W3mConnectingSiwe(){return RT},get W3mConnectingSiweView(){return kT},createSIWEConfig:Urt},Symbol.toStringTag,{value:"Module"})),ko=vi({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),os={state:ko,subscribe(r){return hs(ko,()=>r(ko))},push(r,e){r!==ko.view&&(ko.view=r,e&&(ko.data=e),ko.history.push(r))},reset(r){ko.view=r,ko.history=[r]},replace(r){ko.history.length>1&&(ko.history[ko.history.length-1]=r,ko.view=r)},goBack(){if(ko.history.length>1){ko.history.pop();const[r]=ko.history.slice(-1);ko.view=r}},setData(r){ko.data=r}},xr={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return xr.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const r=navigator.userAgent.toLowerCase();return xr.isMobile()&&(r.includes("iphone")||r.includes("ipad"))},isHttpUrl(r){return r.startsWith("http://")||r.startsWith("https://")},isArray(r){return Array.isArray(r)&&r.length>0},formatNativeUrl(r,e,t){if(xr.isHttpUrl(r))return this.formatUniversalUrl(r,e,t);let n=r;n.includes("://")||(n=r.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,t);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(r,e,t){if(!xr.isHttpUrl(r))return this.formatNativeUrl(r,e,t);let n=r;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,t);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},async wait(r){return new Promise(e=>{setTimeout(e,r)})},openHref(r,e){window.open(r,e,"noreferrer noopener")},setWalletConnectDeepLink(r,e){try{localStorage.setItem(xr.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:r,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(r){try{const[e]=r.split("?");localStorage.setItem(xr.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(xr.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(xr.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var r;const e=(r=os.state.data)==null?void 0:r.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e}},Frt=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),xa=vi({enabled:Frt,userSessionId:"",events:[],connectedWalletId:void 0}),e1e={state:xa,subscribe(r){return hs(xa.events,()=>r(rN(xa.events[xa.events.length-1])))},initialize(){xa.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(xa.userSessionId=crypto.randomUUID())},setConnectedWalletId(r){xa.connectedWalletId=r},click(r){if(xa.enabled){const e={type:"CLICK",name:r.name,userSessionId:xa.userSessionId,timestamp:Date.now(),data:r};xa.events.push(e)}},track(r){if(xa.enabled){const e={type:"TRACK",name:r.name,userSessionId:xa.userSessionId,timestamp:Date.now(),data:r};xa.events.push(e)}},view(r){if(xa.enabled){const e={type:"VIEW",name:r.name,userSessionId:xa.userSessionId,timestamp:Date.now(),data:r};xa.events.push(e)}}},Ff=vi({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Ts={state:Ff,subscribe(r){return hs(Ff,()=>r(Ff))},setChains(r){Ff.chains=r},setWalletConnectUri(r){Ff.walletConnectUri=r},setIsCustomDesktop(r){Ff.isCustomDesktop=r},setIsCustomMobile(r){Ff.isCustomMobile=r},setIsDataLoaded(r){Ff.isDataLoaded=r},setIsUiLoaded(r){Ff.isUiLoaded=r},setIsAuth(r){Ff.isAuth=r}},NT=vi({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),nl={state:NT,subscribe(r){return hs(NT,()=>r(NT))},setConfig(r){var e,t;e1e.initialize(),Ts.setChains(r.chains),Ts.setIsAuth(Boolean(r.enableAuthMode)),Ts.setIsCustomMobile(Boolean((e=r.mobileWallets)==null?void 0:e.length)),Ts.setIsCustomDesktop(Boolean((t=r.desktopWallets)==null?void 0:t.length)),xr.setModalVersionInStorage(),Object.assign(NT,r)}};var jrt=Object.defineProperty,t1e=Object.getOwnPropertySymbols,zrt=Object.prototype.hasOwnProperty,Hrt=Object.prototype.propertyIsEnumerable,r1e=(r,e,t)=>e in r?jrt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,qrt=(r,e)=>{for(var t in e||(e={}))zrt.call(e,t)&&r1e(r,t,e[t]);if(t1e)for(var t of t1e(e))Hrt.call(e,t)&&r1e(r,t,e[t]);return r};const pF="https://explorer-api.walletconnect.com",gF="wcm",mF="js-2.6.2";async function PT(r,e){const t=qrt({sdkType:gF,sdkVersion:mF},e),n=new URL(r,pF);return n.searchParams.append("projectId",nl.state.projectId),Object.entries(t).forEach(([i,s])=>{s&&n.searchParams.append(i,String(s))}),(await fetch(n)).json()}const g2={async getDesktopListings(r){return PT("/w3m/v1/getDesktopListings",r)},async getMobileListings(r){return PT("/w3m/v1/getMobileListings",r)},async getInjectedListings(r){return PT("/w3m/v1/getInjectedListings",r)},async getAllListings(r){return PT("/w3m/v1/getAllListings",r)},getWalletImageUrl(r){return`${pF}/w3m/v1/getWalletImage/${r}?projectId=${nl.state.projectId}&sdkType=${gF}&sdkVersion=${mF}`},getAssetImageUrl(r){return`${pF}/w3m/v1/getAssetImage/${r}?projectId=${nl.state.projectId}&sdkType=${gF}&sdkVersion=${mF}`}};var Wrt=Object.defineProperty,n1e=Object.getOwnPropertySymbols,Vrt=Object.prototype.hasOwnProperty,Grt=Object.prototype.propertyIsEnumerable,i1e=(r,e,t)=>e in r?Wrt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Krt=(r,e)=>{for(var t in e||(e={}))Vrt.call(e,t)&&i1e(r,t,e[t]);if(n1e)for(var t of n1e(e))Grt.call(e,t)&&i1e(r,t,e[t]);return r};const s1e=xr.isMobile(),jf=vi({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),_c={state:jf,async getRecomendedWallets(){const{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:e}=nl.state;if(r==="NONE"||e==="ALL"&&!r)return jf.recomendedWallets;if(xr.isArray(r)){const t={recommendedIds:r.join(",")},{listings:n}=await g2.getAllListings(t),i=Object.values(n);i.sort((s,o)=>{const a=r.indexOf(s.id),l=r.indexOf(o.id);return a-l}),jf.recomendedWallets=i}else{const{chains:t,isAuth:n}=Ts.state,i=t==null?void 0:t.join(","),s=xr.isArray(e),o={page:1,sdks:n?"auth_v1":void 0,entries:xr.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:s?e.join(","):void 0},{listings:a}=s1e?await g2.getMobileListings(o):await g2.getDesktopListings(o);jf.recomendedWallets=Object.values(a)}return jf.recomendedWallets},async getWallets(r){const e=Krt({},r),{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:n}=nl.state,{recomendedWallets:i}=jf;if(n==="ALL")return jf.wallets;i.length?e.excludedIds=i.map(p=>p.id).join(","):xr.isArray(t)&&(e.excludedIds=t.join(",")),xr.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Ts.state.isAuth&&(e.sdks="auth_v1");const{page:s,search:o}=r,{listings:a,total:l}=s1e?await g2.getMobileListings(e):await g2.getDesktopListings(e),u=Object.values(a),h=o?"search":"wallets";return jf[h]={listings:[...jf[h].listings,...u],total:l,page:s??1},{listings:u,total:l}},getWalletImageUrl(r){return g2.getWalletImageUrl(r)},getAssetImageUrl(r){return g2.getAssetImageUrl(r)},resetSearch(){jf.search={listings:[],total:0,page:1}}},d3=vi({open:!1}),m2={state:d3,subscribe(r){return hs(d3,()=>r(d3))},async open(r){return new Promise(e=>{const{isUiLoaded:t,isDataLoaded:n}=Ts.state;if(xr.removeWalletConnectDeepLink(),Ts.setWalletConnectUri(r==null?void 0:r.uri),Ts.setChains(r==null?void 0:r.chains),os.reset("ConnectWallet"),t&&n)d3.open=!0,e();else{const i=setInterval(()=>{const s=Ts.state;s.isUiLoaded&&s.isDataLoaded&&(clearInterval(i),d3.open=!0,e())},200)}})},close(){d3.open=!1}};var Zrt=Object.defineProperty,o1e=Object.getOwnPropertySymbols,Jrt=Object.prototype.hasOwnProperty,Yrt=Object.prototype.propertyIsEnumerable,a1e=(r,e,t)=>e in r?Zrt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qrt=(r,e)=>{for(var t in e||(e={}))Jrt.call(e,t)&&a1e(r,t,e[t]);if(o1e)for(var t of o1e(e))Yrt.call(e,t)&&a1e(r,t,e[t]);return r};function Xrt(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const mx=vi({themeMode:Xrt()?"dark":"light"}),k1={state:mx,subscribe(r){return hs(mx,()=>r(mx))},setThemeConfig(r){const{themeMode:e,themeVariables:t}=r;e&&(mx.themeMode=e),t&&(mx.themeVariables=Qrt({},t))}},b2=vi({open:!1,message:"",variant:"success"}),M1={state:b2,subscribe(r){return hs(b2,()=>r(b2))},openToast(r,e){b2.open=!0,b2.message=r,b2.variant=e},closeToast(){b2.open=!1}},c1e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:class{constructor(e){this.openModal=m2.open,this.closeModal=m2.close,this.subscribeModal=m2.subscribe,this.setTheme=k1.setThemeConfig,k1.setThemeConfig(e),nl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>mot);const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Ts.setIsUiLoaded(!0)}}}},Symbol.toStringTag,{value:"Module"}));/** + `}async onSign(){this.isSigning=!0,Cr.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track"});try{$7.setStatus("loading");const e=await $7.signIn();return $7.setStatus("success"),Cr.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track"}),e}catch{return bn.showError("Signature declined"),$7.setStatus("error"),Cr.sendEvent({event:"SIWE_AUTH_ERROR",type:"track"})}finally{this.isSigning=!1}}async onCancel(){const{isConnected:e}=zt.state;e?(await Gr.disconnect(),Xr.close()):it.push("Connect"),Cr.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track"})}};o2e([De()],gR.prototype,"isSigning",void 0),gR=o2e([Fe("w3m-connecting-siwe-view")],gR);const bR=Object.freeze(Object.defineProperty({__proto__:null,SIWEController:$7,get W3mConnectingSiwe(){return mR},get W3mConnectingSiweView(){return gR}},Symbol.toStringTag,{value:"Module"})),Ua=Ei({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ls={state:Ua,subscribe(r){return ms(Ua,()=>r(Ua))},push(r,e){r!==Ua.view&&(Ua.view=r,e&&(Ua.data=e),Ua.history.push(r))},reset(r){Ua.view=r,Ua.history=[r]},replace(r){Ua.history.length>1&&(Ua.history[Ua.history.length-1]=r,Ua.view=r)},goBack(){if(Ua.history.length>1){Ua.history.pop();const[r]=Ua.history.slice(-1);Ua.view=r}},setData(r){Ua.data=r}},fr={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return fr.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const r=navigator.userAgent.toLowerCase();return fr.isMobile()&&(r.includes("iphone")||r.includes("ipad"))},isHttpUrl(r){return r.startsWith("http://")||r.startsWith("https://")},isArray(r){return Array.isArray(r)&&r.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(r,e,t){if(fr.isHttpUrl(r))return this.formatUniversalUrl(r,e,t);let n=r;n.includes("://")||(n=r.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,t);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(r,e,t){if(!fr.isHttpUrl(r))return this.formatNativeUrl(r,e,t);let n=r;if(n.startsWith("https://t.me")){const s=It.from(e).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,t);const a=new URL(n);return a.searchParams.set("startapp",s),a.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,t);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},async wait(r){return new Promise(e=>{setTimeout(e,r)})},openHref(r,e){const t=this.isTelegram()?"_blank":e;window.open(r,t,"noreferrer noopener")},setWalletConnectDeepLink(r,e){try{localStorage.setItem(fr.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:r,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(r){try{const[e]=r.split("?");localStorage.setItem(fr.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(fr.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(fr.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var r;const e=(r=ls.state.data)==null?void 0:r.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e}},G0t=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Mo=Ei({enabled:G0t,userSessionId:"",events:[],connectedWalletId:void 0}),c2e={state:Mo,subscribe(r){return ms(Mo.events,()=>r(oN(Mo.events[Mo.events.length-1])))},initialize(){Mo.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(Mo.userSessionId=crypto.randomUUID())},setConnectedWalletId(r){Mo.connectedWalletId=r},click(r){if(Mo.enabled){const e={type:"CLICK",name:r.name,userSessionId:Mo.userSessionId,timestamp:Date.now(),data:r};Mo.events.push(e)}},track(r){if(Mo.enabled){const e={type:"TRACK",name:r.name,userSessionId:Mo.userSessionId,timestamp:Date.now(),data:r};Mo.events.push(e)}},view(r){if(Mo.enabled){const e={type:"VIEW",name:r.name,userSessionId:Mo.userSessionId,timestamp:Date.now(),data:r};Mo.events.push(e)}}},oh=Ei({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Ns={state:oh,subscribe(r){return ms(oh,()=>r(oh))},setChains(r){oh.chains=r},setWalletConnectUri(r){oh.walletConnectUri=r},setIsCustomDesktop(r){oh.isCustomDesktop=r},setIsCustomMobile(r){oh.isCustomMobile=r},setIsDataLoaded(r){oh.isDataLoaded=r},setIsUiLoaded(r){oh.isUiLoaded=r},setIsAuth(r){oh.isAuth=r}},vR=Ei({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),gl={state:vR,subscribe(r){return ms(vR,()=>r(vR))},setConfig(r){var e,t;c2e.initialize(),Ns.setChains(r.chains),Ns.setIsAuth(!!r.enableAuthMode),Ns.setIsCustomMobile(!!((e=r.mobileWallets)!=null&&e.length)),Ns.setIsCustomDesktop(!!((t=r.desktopWallets)!=null&&t.length)),fr.setModalVersionInStorage(),Object.assign(vR,r)}};var K0t=Object.defineProperty,l2e=Object.getOwnPropertySymbols,Z0t=Object.prototype.hasOwnProperty,J0t=Object.prototype.propertyIsEnumerable,u2e=(r,e,t)=>e in r?K0t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Y0t=(r,e)=>{for(var t in e||(e={}))Z0t.call(e,t)&&u2e(r,t,e[t]);if(l2e)for(var t of l2e(e))J0t.call(e,t)&&u2e(r,t,e[t]);return r};const Lz="https://explorer-api.walletconnect.com",Uz="wcm",Fz="js-2.7.0";async function wR(r,e){const t=Y0t({sdkType:Uz,sdkVersion:Fz},e),n=new URL(r,Lz);return n.searchParams.append("projectId",gl.state.projectId),Object.entries(t).forEach(([s,a])=>{a&&n.searchParams.append(s,String(a))}),(await fetch(n)).json()}const c2={async getDesktopListings(r){return wR("/w3m/v1/getDesktopListings",r)},async getMobileListings(r){return wR("/w3m/v1/getMobileListings",r)},async getInjectedListings(r){return wR("/w3m/v1/getInjectedListings",r)},async getAllListings(r){return wR("/w3m/v1/getAllListings",r)},getWalletImageUrl(r){return`${Lz}/w3m/v1/getWalletImage/${r}?projectId=${gl.state.projectId}&sdkType=${Uz}&sdkVersion=${Fz}`},getAssetImageUrl(r){return`${Lz}/w3m/v1/getAssetImage/${r}?projectId=${gl.state.projectId}&sdkType=${Uz}&sdkVersion=${Fz}`}};var Q0t=Object.defineProperty,f2e=Object.getOwnPropertySymbols,X0t=Object.prototype.hasOwnProperty,ept=Object.prototype.propertyIsEnumerable,d2e=(r,e,t)=>e in r?Q0t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,tpt=(r,e)=>{for(var t in e||(e={}))X0t.call(e,t)&&d2e(r,t,e[t]);if(f2e)for(var t of f2e(e))ept.call(e,t)&&d2e(r,t,e[t]);return r};const h2e=fr.isMobile(),ch=Ei({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Bc={state:ch,async getRecomendedWallets(){const{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:e}=gl.state;if(r==="NONE"||e==="ALL"&&!r)return ch.recomendedWallets;if(fr.isArray(r)){const n={recommendedIds:r.join(",")},{listings:i}=await c2.getAllListings(n),s=Object.values(i);s.sort((a,o)=>{const l=r.indexOf(a.id),u=r.indexOf(o.id);return l-u}),ch.recomendedWallets=s}else{const{chains:t,isAuth:n}=Ns.state,i=t==null?void 0:t.join(","),s=fr.isArray(e),a={page:1,sdks:n?"auth_v1":void 0,entries:fr.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:s?e.join(","):void 0},{listings:o}=h2e?await c2.getMobileListings(a):await c2.getDesktopListings(a);ch.recomendedWallets=Object.values(o)}return ch.recomendedWallets},async getWallets(r){const e=tpt({},r),{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:n}=gl.state,{recomendedWallets:i}=ch;if(n==="ALL")return ch.wallets;i.length?e.excludedIds=i.map(h=>h.id).join(","):fr.isArray(t)&&(e.excludedIds=t.join(",")),fr.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Ns.state.isAuth&&(e.sdks="auth_v1");const{page:s,search:a}=r,{listings:o,total:l}=h2e?await c2.getMobileListings(e):await c2.getDesktopListings(e),u=Object.values(o),f=a?"search":"wallets";return ch[f]={listings:[...ch[f].listings,...u],total:l,page:s??1},{listings:u,total:l}},getWalletImageUrl(r){return c2.getWalletImageUrl(r)},getAssetImageUrl(r){return c2.getAssetImageUrl(r)},resetSearch(){ch.search={listings:[],total:0,page:1}}},w5=Ei({open:!1}),l2={state:w5,subscribe(r){return ms(w5,()=>r(w5))},async open(r){return new Promise(e=>{const{isUiLoaded:t,isDataLoaded:n}=Ns.state;if(fr.removeWalletConnectDeepLink(),Ns.setWalletConnectUri(r==null?void 0:r.uri),Ns.setChains(r==null?void 0:r.chains),ls.reset("ConnectWallet"),t&&n)w5.open=!0,e();else{const i=setInterval(()=>{const s=Ns.state;s.isUiLoaded&&s.isDataLoaded&&(clearInterval(i),w5.open=!0,e())},200)}})},close(){w5.open=!1}};var rpt=Object.defineProperty,p2e=Object.getOwnPropertySymbols,npt=Object.prototype.hasOwnProperty,ipt=Object.prototype.propertyIsEnumerable,m2e=(r,e,t)=>e in r?rpt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,spt=(r,e)=>{for(var t in e||(e={}))npt.call(e,t)&&m2e(r,t,e[t]);if(p2e)for(var t of p2e(e))ipt.call(e,t)&&m2e(r,t,e[t]);return r};function apt(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const B7=Ei({themeMode:apt()?"dark":"light"}),pm={state:B7,subscribe(r){return ms(B7,()=>r(B7))},setThemeConfig(r){const{themeMode:e,themeVariables:t}=r;e&&(B7.themeMode=e),t&&(B7.themeVariables=spt({},t))}},u2=Ei({open:!1,message:"",variant:"success"}),mm={state:u2,subscribe(r){return ms(u2,()=>r(u2))},openToast(r,e){u2.open=!0,u2.message=r,u2.variant=e},closeToast(){u2.open=!1}};class opt{constructor(e){this.openModal=l2.open,this.closeModal=l2.close,this.subscribeModal=l2.subscribe,this.setTheme=pm.setThemeConfig,pm.setThemeConfig(e),gl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>Cgt);const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Ns.setIsUiLoaded(!0)}}}const g2e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:opt},Symbol.toStringTag,{value:"Module"}));/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const OT=window,bF=OT.ShadowRoot&&(OT.ShadyCSS===void 0||OT.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wF=Symbol(),l1e=new WeakMap;let u1e=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==wF)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(bF&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=l1e.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&l1e.set(t,e))}return e}toString(){return this.cssText}};const ent=r=>new u1e(typeof r=="string"?r:r+"",void 0,wF),Hn=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new u1e(t,r,wF)},tnt=(r,e)=>{bF?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),i=OT.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)})},h1e=bF?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return ent(t)})(r):r;/** + */const yR=window,jz=yR.ShadowRoot&&(yR.ShadyCSS===void 0||yR.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zz=Symbol(),b2e=new WeakMap;let v2e=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==zz)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(jz&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=b2e.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&b2e.set(t,e))}return e}toString(){return this.cssText}};const cpt=r=>new v2e(typeof r=="string"?r:r+"",void 0,zz),qn=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new v2e(t,r,zz)},lpt=(r,e)=>{jz?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),i=yR.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)})},w2e=jz?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return cpt(t)})(r):r;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var vF;const DT=window,f1e=DT.trustedTypes,rnt=f1e?f1e.emptyScript:"",d1e=DT.reactiveElementPolyfillSupport,yF={toAttribute(r,e){switch(e){case Boolean:r=r?rnt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},p1e=(r,e)=>e!==r&&(e==e||r==r),xF={attribute:!0,type:String,converter:yF,reflect:!1,hasChanged:p1e},_F="finalized";let p3=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const i=this._$Ep(n,t);i!==void 0&&(this._$Ev.set(i,n),e.push(i))}),e}static createProperty(e,t=xF){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const s=this[e];this[t]=i,this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||xF}static finalize(){if(this.hasOwnProperty(_F))return!1;this[_F]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of n)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(h1e(i))}else e!==void 0&&t.push(h1e(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return tnt(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=xF){var i;const s=this.constructor._$Ep(e,n);if(s!==void 0&&n.reflect===!0){const o=(((i=n.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?n.converter:yF).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,t){var n;const i=this.constructor,s=i._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=i.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:yF;this._$El=s,this[s]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||p1e)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,s)=>this[s]=i),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdate)===null||s===void 0?void 0:s.call(i)}),this.update(n)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostUpdated)===null||i===void 0?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};p3[_F]=!0,p3.elementProperties=new Map,p3.elementStyles=[],p3.shadowRootOptions={mode:"open"},d1e==null||d1e({ReactiveElement:p3}),((vF=DT.reactiveElementVersions)!==null&&vF!==void 0?vF:DT.reactiveElementVersions=[]).push("1.6.3");/** + */var Hz;const xR=window,y2e=xR.trustedTypes,upt=y2e?y2e.emptyScript:"",x2e=xR.reactiveElementPolyfillSupport,qz={toAttribute(r,e){switch(e){case Boolean:r=r?upt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},_2e=(r,e)=>e!==r&&(e==e||r==r),Wz={attribute:!0,type:String,converter:qz,reflect:!1,hasChanged:_2e},Vz="finalized";let y5=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const i=this._$Ep(n,t);i!==void 0&&(this._$Ev.set(i,n),e.push(i))}),e}static createProperty(e,t=Wz){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const s=this[e];this[t]=i,this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Wz}static finalize(){if(this.hasOwnProperty(Vz))return!1;this[Vz]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of n)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(w2e(i))}else e!==void 0&&t.push(w2e(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return lpt(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Wz){var i;const s=this.constructor._$Ep(e,n);if(s!==void 0&&n.reflect===!0){const a=(((i=n.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?n.converter:qz).toAttribute(t,n.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,t){var n;const i=this.constructor,s=i._$Ev.get(e);if(s!==void 0&&this._$El!==s){const a=i.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?a.converter:qz;this._$El=s,this[s]=o.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||_2e)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,s)=>this[s]=i),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdate)===null||s===void 0?void 0:s.call(i)}),this.update(n)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostUpdated)===null||i===void 0?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};y5[Vz]=!0,y5.elementProperties=new Map,y5.elementStyles=[],y5.shadowRootOptions={mode:"open"},x2e==null||x2e({ReactiveElement:y5}),((Hz=xR.reactiveElementVersions)!==null&&Hz!==void 0?Hz:xR.reactiveElementVersions=[]).push("1.6.3");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var EF;const $T=window,g3=$T.trustedTypes,g1e=g3?g3.createPolicy("lit-html",{createHTML:r=>r}):void 0,AF="$lit$",N1=`lit$${(Math.random()+"").slice(9)}$`,m1e="?"+N1,nnt=`<${m1e}>`,w2=document,bx=()=>w2.createComment(""),wx=r=>r===null||typeof r!="object"&&typeof r!="function",b1e=Array.isArray,int=r=>b1e(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",CF=`[ -\f\r]`,vx=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w1e=/-->/g,v1e=/>/g,v2=RegExp(`>|${CF}(?:([^\\s"'>=/]+)(${CF}*=${CF}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),y1e=/'/g,x1e=/"/g,_1e=/^(?:script|style|textarea|title)$/i,E1e=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Yt=E1e(1),ds=E1e(2),y2=Symbol.for("lit-noChange"),Qs=Symbol.for("lit-nothing"),A1e=new WeakMap,x2=w2.createTreeWalker(w2,129,null,!1);function C1e(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return g1e!==void 0?g1e.createHTML(e):e}const snt=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":"",o=vx;for(let a=0;a"?(o=i??vx,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?v2:h[3]==='"'?x1e:y1e):o===x1e||o===y1e?o=v2:o===w1e||o===v1e?o=vx:(o=v2,i=void 0);const w=o===v2&&r[a+1].startsWith("/>")?" ":"";s+=o===vx?l+nnt:p>=0?(n.push(u),l.slice(0,p)+AF+l.slice(p)+N1+w):l+N1+(p===-2?(n.push(void 0),a):w)}return[C1e(r,s+(r[t]||"")+(e===2?"":"")),n]};class yx{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[u,h]=snt(e,t);if(this.el=yx.createElement(u,n),x2.currentNode=this.el.content,t===2){const p=this.el.content,g=p.firstChild;g.remove(),p.append(...g.childNodes)}for(;(i=x2.nextNode())!==null&&l.length0){i.textContent=g3?g3.emptyScript:"";for(let w=0;w2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Qs}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=m3(this,e,t,0),o=!wx(e)||e!==this._$AH&&e!==y2,o&&(this._$AH=e);else{const a=e;let l,u;for(e=s[0],l=0;l{var n,i;const s=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let o=s._$litPart$;if(o===void 0){const a=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:null;s._$litPart$=o=new xx(e.insertBefore(bx(),a),a,void 0,t??{})}return o._$AI(r),o};/** + */var Gz;const _R=window,x5=_R.trustedTypes,E2e=x5?x5.createPolicy("lit-html",{createHTML:r=>r}):void 0,Kz="$lit$",gm=`lit$${(Math.random()+"").slice(9)}$`,C2e="?"+gm,fpt=`<${C2e}>`,f2=document,L7=()=>f2.createComment(""),U7=r=>r===null||typeof r!="object"&&typeof r!="function",A2e=Array.isArray,dpt=r=>A2e(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",Zz=`[ +\f\r]`,F7=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S2e=/-->/g,I2e=/>/g,d2=RegExp(`>|${Zz}(?:([^\\s"'>=/]+)(${Zz}*=${Zz}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),T2e=/'/g,k2e=/"/g,R2e=/^(?:script|style|textarea|title)$/i,M2e=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Yt=M2e(1),ws=M2e(2),h2=Symbol.for("lit-noChange"),sa=Symbol.for("lit-nothing"),P2e=new WeakMap,p2=f2.createTreeWalker(f2,129,null,!1);function O2e(r,e){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return E2e!==void 0?E2e.createHTML(e):e}const hpt=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":"",a=F7;for(let o=0;o"?(a=i??F7,h=-1):f[1]===void 0?h=-2:(h=a.lastIndex-f[2].length,u=f[1],a=f[3]===void 0?d2:f[3]==='"'?k2e:T2e):a===k2e||a===T2e?a=d2:a===S2e||a===I2e?a=F7:(a=d2,i=void 0);const b=a===d2&&r[o+1].startsWith("/>")?" ":"";s+=a===F7?l+fpt:h>=0?(n.push(u),l.slice(0,h)+Kz+l.slice(h)+gm+b):l+gm+(h===-2?(n.push(void 0),o):b)}return[O2e(r,s+(r[t]||"")+(e===2?"":"")),n]};class j7{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,a=0;const o=e.length-1,l=this.parts,[u,f]=hpt(e,t);if(this.el=j7.createElement(u,n),p2.currentNode=this.el.content,t===2){const h=this.el.content,m=h.firstChild;m.remove(),h.append(...m.childNodes)}for(;(i=p2.nextNode())!==null&&l.length0){i.textContent=x5?x5.emptyScript:"";for(let b=0;b2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=sa}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const s=this.strings;let a=!1;if(s===void 0)e=_5(this,e,t,0),a=!U7(e)||e!==this._$AH&&e!==h2,a&&(this._$AH=e);else{const o=e;let l,u;for(e=s[0],l=0;l{var n,i;const s=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let a=s._$litPart$;if(a===void 0){const o=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:null;s._$litPart$=a=new z7(e.insertBefore(L7(),o),o,void 0,t??{})}return a._$AI(r),a};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var SF,IF;class ln extends p3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=fnt(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return y2}}ln.finalized=!0,ln._$litElement$=!0,(SF=globalThis.litElementHydrateSupport)===null||SF===void 0||SF.call(globalThis,{LitElement:ln});const I1e=globalThis.litElementPolyfillSupport;I1e==null||I1e({LitElement:ln}),((IF=globalThis.litElementVersions)!==null&&IF!==void 0?IF:globalThis.litElementVersions=[]).push("3.3.3");/** + */var Jz,Yz;class dn extends y5{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ypt(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return h2}}dn.finalized=!0,dn._$litElement$=!0,(Jz=globalThis.litElementHydrateSupport)===null||Jz===void 0||Jz.call(globalThis,{LitElement:dn});const D2e=globalThis.litElementPolyfillSupport;D2e==null||D2e({LitElement:dn}),((Yz=globalThis.litElementVersions)!==null&&Yz!==void 0?Yz:globalThis.litElementVersions=[]).push("3.3.3");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const An=r=>e=>typeof e=="function"?((t,n)=>(customElements.define(t,n),n))(r,e):((t,n)=>{const{kind:i,elements:s}=n;return{kind:i,elements:s,finisher(o){customElements.define(t,o)}}})(r,e);/** + */const Tn=r=>e=>typeof e=="function"?((t,n)=>(customElements.define(t,n),n))(r,e):((t,n)=>{const{kind:i,elements:s}=n;return{kind:i,elements:s,finisher(a){customElements.define(t,a)}}})(r,e);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const dnt=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},pnt=(r,e,t)=>{e.constructor.createProperty(t,r)};function Yr(r){return(e,t)=>t!==void 0?pnt(r,e,t):dnt(r,e)}/** + */const xpt=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},_pt=(r,e,t)=>{e.constructor.createProperty(t,r)};function tn(r){return(e,t)=>t!==void 0?_pt(r,e,t):xpt(r,e)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function Ec(r){return Yr({...r,state:!0})}/** + */function Lc(r){return tn({...r,state:!0})}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var TF;((TF=window.HTMLSlotElement)===null||TF===void 0?void 0:TF.prototype.assignedElements)!=null;/** + */var Qz;((Qz=window.HTMLSlotElement)===null||Qz===void 0?void 0:Qz.prototype.assignedElements)!=null;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const gnt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},mnt=r=>(...e)=>({_$litDirective$:r,values:e});class bnt{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/** + */const Ept={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Cpt=r=>(...e)=>({_$litDirective$:r,values:e});class Apt{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const u0=mnt(class extends bnt{constructor(r){var e;if(super(r),r.type!==gnt.ATTRIBUTE||r.name!=="class"||((e=r.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var t,n;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!(!((t=this.nt)===null||t===void 0)&&t.has(s))&&this.it.add(s);return this.render(e)}const i=r.element.classList;this.it.forEach(s=>{s in e||(i.remove(s),this.it.delete(s))});for(const s in e){const o=!!e[s];o===this.it.has(s)||!((n=this.nt)===null||n===void 0)&&n.has(s)||(o?(i.add(s),this.it.add(s)):(i.remove(s),this.it.delete(s)))}return y2}});function wnt(r,e){r.indexOf(e)===-1&&r.push(e)}const T1e=(r,e,t)=>Math.min(Math.max(t,r),e),pu={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},LT=r=>typeof r=="number",b3=r=>Array.isArray(r)&&!LT(r[0]),vnt=(r,e,t)=>{const n=e-r;return((t-r)%n+n)%n+r};function ynt(r,e){return b3(r)?r[vnt(0,r.length,e)]:r}const R1e=(r,e,t)=>-t*r+t*e+r,k1e=()=>{},P1=r=>r,RF=(r,e,t)=>e-r===0?1:(t-r)/(e-r);function M1e(r,e){const t=r[r.length-1];for(let n=1;n<=e;n++){const i=RF(0,e,n);r.push(R1e(t,1,i))}}function xnt(r){const e=[0];return M1e(e,r-1),e}function _nt(r,e=xnt(r.length),t=P1){const n=r.length,i=n-e.length;return i>0&&M1e(e,i),s=>{let o=0;for(;oArray.isArray(r)&<(r[0]),kF=r=>typeof r=="object"&&Boolean(r.createAnimation),w3=r=>typeof r=="function",Ent=r=>typeof r=="string",_x={ms:r=>r*1e3,s:r=>r/1e3},P1e=(r,e,t)=>(((1-3*t+3*e)*r+(3*t-6*e))*r+3*e)*r,Ant=1e-7,Cnt=12;function Snt(r,e,t,n,i){let s,o,a=0;do o=e+(t-e)/2,s=P1e(o,n,i)-r,s>0?t=o:e=o;while(Math.abs(s)>Ant&&++aSnt(s,0,1,r,t);return s=>s===0||s===1?s:P1e(i(s),e,n)}const Int=(r,e="end")=>t=>{t=e==="end"?Math.min(t,.999):Math.max(t,.001);const n=t*r,i=e==="end"?Math.floor(n):Math.ceil(n);return T1e(0,1,i/r)},O1e={ease:Ex(.25,.1,.25,1),"ease-in":Ex(.42,0,1,1),"ease-in-out":Ex(.42,0,.58,1),"ease-out":Ex(0,0,.58,1)},Tnt=/\((.*?)\)/;function D1e(r){if(w3(r))return r;if(N1e(r))return Ex(...r);if(O1e[r])return O1e[r];if(r.startsWith("steps")){const e=Tnt.exec(r);if(e){const t=e[1].split(",");return Int(parseFloat(t[0]),t[1].trim())}}return P1}class $1e{constructor(e,t=[0,1],{easing:n,duration:i=pu.duration,delay:s=pu.delay,endDelay:o=pu.endDelay,repeat:a=pu.repeat,offset:l,direction:u="normal",autoplay:h=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=P1,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((g,w)=>{this.resolve=g,this.reject=w}),n=n||pu.easing,kF(n)){const g=n.createAnimation(t);n=g.easing,t=g.keyframes||t,i=g.duration||i}this.repeat=a,this.easing=b3(n)?P1:D1e(n),this.updateDuration(i);const p=_nt(t,l,b3(n)?n.map(D1e):P1);this.tick=g=>{var w;s=s;let y=0;this.pauseTime!==void 0?y=this.pauseTime:y=(g-this.startTime)*this.rate,this.t=y,y/=1e3,y=Math.max(y-s,0),this.playState==="finished"&&this.pauseTime===void 0&&(y=this.totalDuration);const C=y/this.duration;let T=Math.floor(C),k=C%1;!k&&C>=1&&(k=1),k===1&&T--;const N=T%2;(u==="reverse"||u==="alternate"&&N||u==="alternate-reverse"&&!N)&&(k=1-k);const O=y>=this.totalDuration?1:Math.min(k,1),B=p(this.easing(O));e(B),this.pauseTime===void 0&&(this.playState==="finished"||y>=this.totalDuration+o)?(this.playState="finished",(w=this.resolve)===null||w===void 0||w.call(this,B)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},h&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var MF=function(){};yt.env.NODE_ENV!=="production"&&(MF=function(r,e){if(!r)throw new Error(e)});class Rnt{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const NF=new WeakMap;function B1e(r){return NF.has(r)||NF.set(r,{transforms:[],values:new Map}),NF.get(r)}function knt(r,e){return r.has(e)||r.set(e,new Rnt),r.get(e)}const Mnt=["","X","Y","Z"],Nnt=["translate","scale","rotate","skew"],UT={x:"translateX",y:"translateY",z:"translateZ"},L1e={syntax:"",initialValue:"0deg",toDefaultUnit:r=>r+"deg"},Pnt={translate:{syntax:"",initialValue:"0px",toDefaultUnit:r=>r+"px"},rotate:L1e,scale:{syntax:"",initialValue:1,toDefaultUnit:P1},skew:L1e},Ax=new Map,PF=r=>`--motion-${r}`,FT=["x","y","z"];Nnt.forEach(r=>{Mnt.forEach(e=>{FT.push(r+e),Ax.set(PF(r+e),Pnt[r])})});const Ont=(r,e)=>FT.indexOf(r)-FT.indexOf(e),Dnt=new Set(FT),U1e=r=>Dnt.has(r),$nt=(r,e)=>{UT[e]&&(e=UT[e]);const{transforms:t}=B1e(r);wnt(t,e),r.style.transform=Bnt(t)},Bnt=r=>r.sort(Ont).reduce(Lnt,"").trim(),Lnt=(r,e)=>`${r} ${e}(var(${PF(e)}))`,OF=r=>r.startsWith("--"),F1e=new Set;function Unt(r){if(!F1e.has(r)){F1e.add(r);try{const{syntax:e,initialValue:t}=Ax.has(r)?Ax.get(r):{};CSS.registerProperty({name:r,inherits:!1,syntax:e,initialValue:t})}catch{}}}const DF=(r,e)=>document.createElement("div").animate(r,e),j1e={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{DF({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(DF({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{DF({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},$F={},v3={};for(const r in j1e)v3[r]=()=>($F[r]===void 0&&($F[r]=j1e[r]()),$F[r]);const Fnt=.015,jnt=(r,e)=>{let t="";const n=Math.round(e/Fnt);for(let i=0;iw3(r)?v3.linearEasing()?`linear(${jnt(r,e)})`:pu.easing:N1e(r)?znt(r):r,znt=([r,e,t,n])=>`cubic-bezier(${r}, ${e}, ${t}, ${n})`;function Hnt(r,e){for(let t=0;tArray.isArray(r)?r:[r];function BF(r){return UT[r]&&(r=UT[r]),U1e(r)?PF(r):r}const jT={get:(r,e)=>{e=BF(e);let t=OF(e)?r.style.getPropertyValue(e):getComputedStyle(r)[e];if(!t&&t!==0){const n=Ax.get(e);n&&(t=n.initialValue)}return t},set:(r,e,t)=>{e=BF(e),OF(e)?r.style.setProperty(e,t):r.style[e]=t}};function H1e(r,e=!0){if(!(!r||r.playState==="finished"))try{r.stop?r.stop():(e&&r.commitStyles(),r.cancel())}catch{}}function Wnt(r,e){var t;let n=(e==null?void 0:e.toDefaultUnit)||P1;const i=r[r.length-1];if(Ent(i)){const s=((t=i.match(/(-?[\d.]+)([a-z%]*)/))===null||t===void 0?void 0:t[2])||"";s&&(n=o=>o+s)}return n}function Vnt(){return window.__MOTION_DEV_TOOLS_RECORD}function Gnt(r,e,t,n={},i){const s=Vnt(),o=n.record!==!1&&s;let a,{duration:l=pu.duration,delay:u=pu.delay,endDelay:h=pu.endDelay,repeat:p=pu.repeat,easing:g=pu.easing,persist:w=!1,direction:y,offset:C,allowWebkitAcceleration:T=!1,autoplay:k=!0}=n;const N=B1e(r),O=U1e(e);let B=v3.waapi();O&&$nt(r,e);const z=BF(e),G=knt(N.values,z),$=Ax.get(z);return H1e(G.animation,!(kF(g)&&G.generator)&&n.record!==!1),()=>{const D=()=>{var F,M;return(M=(F=jT.get(r,z))!==null&&F!==void 0?F:$==null?void 0:$.initialValue)!==null&&M!==void 0?M:0};let V=Hnt(qnt(t),D);const Q=Wnt(V,$);if(kF(g)){const F=g.createAnimation(V,e!=="opacity",D,z,G);g=F.easing,V=F.keyframes||V,l=F.duration||l}if(OF(z)&&(v3.cssRegisterProperty()?Unt(z):B=!1),O&&!v3.linearEasing()&&(w3(g)||b3(g)&&g.some(w3))&&(B=!1),B){$&&(V=V.map(b=>LT(b)?$.toDefaultUnit(b):b)),V.length===1&&(!v3.partialKeyframes()||o)&&V.unshift(D());const F={delay:_x.ms(u),duration:_x.ms(l),endDelay:_x.ms(h),easing:b3(g)?void 0:z1e(g,l),direction:y,iterations:p+1,fill:"both"};a=r.animate({[z]:V,offset:C,easing:b3(g)?g.map(b=>z1e(b,l)):void 0},F),a.finished||(a.finished=new Promise((b,d)=>{a.onfinish=b,a.oncancel=d}));const M=V[V.length-1];a.finished.then(()=>{w||(jT.set(r,z,M),a.cancel())}).catch(k1e),T||(a.playbackRate=1.000001)}else if(i&&O)V=V.map(F=>typeof F=="string"?parseFloat(F):F),V.length===1&&V.unshift(parseFloat(D())),a=new i(F=>{jT.set(r,z,Q?Q(F):F)},V,Object.assign(Object.assign({},n),{duration:l,easing:g}));else{const F=V[V.length-1];jT.set(r,z,$&<(F)?$.toDefaultUnit(F):F)}return o&&s(r,e,V,{duration:l,delay:u,easing:g,repeat:p,offset:C},"motion-one"),G.setAnimation(a),a&&!k&&a.pause(),a}}const Knt=(r,e)=>r[e]?Object.assign(Object.assign({},r),r[e]):Object.assign({},r);function Znt(r,e){var t;return typeof r=="string"?e?((t=e[r])!==null&&t!==void 0||(e[r]=document.querySelectorAll(r)),r=e[r]):r=document.querySelectorAll(r):r instanceof Element&&(r=[r]),Array.from(r||[])}const Jnt=r=>r(),q1e=(r,e,t=pu.duration)=>new Proxy({animations:r.map(Jnt).filter(Boolean),duration:t,options:e},Qnt),Ynt=r=>r.animations[0],Qnt={get:(r,e)=>{const t=Ynt(r);switch(e){case"duration":return r.duration;case"currentTime":return _x.s((t==null?void 0:t[e])||0);case"playbackRate":case"playState":return t==null?void 0:t[e];case"finished":return r.finished||(r.finished=Promise.all(r.animations.map(Xnt)).catch(k1e)),r.finished;case"stop":return()=>{r.animations.forEach(n=>H1e(n))};case"forEachNative":return n=>{r.animations.forEach(i=>n(i,r))};default:return typeof(t==null?void 0:t[e])>"u"?void 0:()=>r.animations.forEach(n=>n[e]())}},set:(r,e,t)=>{switch(e){case"currentTime":t=_x.ms(t);case"playbackRate":for(let n=0;nr.finished;function eit(r,e,t){return w3(r)?r(e,t):r}function tit(r){return function(t,n,i={}){t=Znt(t);const s=t.length;MF(Boolean(s),"No valid element provided."),MF(Boolean(n),"No keyframes defined.");const o=[];for(let a=0;a{const t=new $1e(r,[0,1],e);return t.finished.catch(()=>{}),t}],e,e.duration)}function _2(r,e,t){return(w3(r)?nit:rit)(r,e,t)}/** + */const W0=Cpt(class extends Apt{constructor(r){var e;if(super(r),r.type!==Ept.ATTRIBUTE||r.name!=="class"||((e=r.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var t,n;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!(!((t=this.nt)===null||t===void 0)&&t.has(s))&&this.it.add(s);return this.render(e)}const i=r.element.classList;this.it.forEach(s=>{s in e||(i.remove(s),this.it.delete(s))});for(const s in e){const a=!!e[s];a===this.it.has(s)||!((n=this.nt)===null||n===void 0)&&n.has(s)||(a?(i.add(s),this.it.add(s)):(i.remove(s),this.it.delete(s)))}return h2}});function Spt(r,e){r.indexOf(e)===-1&&r.push(e)}const $2e=(r,e,t)=>Math.min(Math.max(t,r),e),Mu={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},CR=r=>typeof r=="number",E5=r=>Array.isArray(r)&&!CR(r[0]),Ipt=(r,e,t)=>{const n=e-r;return((t-r)%n+n)%n+r};function Tpt(r,e){return E5(r)?r[Ipt(0,r.length,e)]:r}const B2e=(r,e,t)=>-t*r+t*e+r,L2e=()=>{},bm=r=>r,Xz=(r,e,t)=>e-r===0?1:(t-r)/(e-r);function U2e(r,e){const t=r[r.length-1];for(let n=1;n<=e;n++){const i=Xz(0,e,n);r.push(B2e(t,1,i))}}function kpt(r){const e=[0];return U2e(e,r-1),e}function Rpt(r,e=kpt(r.length),t=bm){const n=r.length,i=n-e.length;return i>0&&U2e(e,i),s=>{let a=0;for(;aArray.isArray(r)&&CR(r[0]),eH=r=>typeof r=="object"&&!!r.createAnimation,C5=r=>typeof r=="function",Mpt=r=>typeof r=="string",H7={ms:r=>r*1e3,s:r=>r/1e3},j2e=(r,e,t)=>(((1-3*t+3*e)*r+(3*t-6*e))*r+3*e)*r,Ppt=1e-7,Opt=12;function Npt(r,e,t,n,i){let s,a,o=0;do a=e+(t-e)/2,s=j2e(a,n,i)-r,s>0?t=a:e=a;while(Math.abs(s)>Ppt&&++oNpt(s,0,1,r,t);return s=>s===0||s===1?s:j2e(i(s),e,n)}const Dpt=(r,e="end")=>t=>{t=e==="end"?Math.min(t,.999):Math.max(t,.001);const n=t*r,i=e==="end"?Math.floor(n):Math.ceil(n);return $2e(0,1,i/r)},z2e={ease:q7(.25,.1,.25,1),"ease-in":q7(.42,0,1,1),"ease-in-out":q7(.42,0,.58,1),"ease-out":q7(0,0,.58,1)},$pt=/\((.*?)\)/;function H2e(r){if(C5(r))return r;if(F2e(r))return q7(...r);if(z2e[r])return z2e[r];if(r.startsWith("steps")){const e=$pt.exec(r);if(e){const t=e[1].split(",");return Dpt(parseFloat(t[0]),t[1].trim())}}return bm}class q2e{constructor(e,t=[0,1],{easing:n,duration:i=Mu.duration,delay:s=Mu.delay,endDelay:a=Mu.endDelay,repeat:o=Mu.repeat,offset:l,direction:u="normal",autoplay:f=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=bm,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((m,b)=>{this.resolve=m,this.reject=b}),n=n||Mu.easing,eH(n)){const m=n.createAnimation(t);n=m.easing,t=m.keyframes||t,i=m.duration||i}this.repeat=o,this.easing=E5(n)?bm:H2e(n),this.updateDuration(i);const h=Rpt(t,l,E5(n)?n.map(H2e):bm);this.tick=m=>{var b;s=s;let v=0;this.pauseTime!==void 0?v=this.pauseTime:v=(m-this.startTime)*this.rate,this.t=v,v/=1e3,v=Math.max(v-s,0),this.playState==="finished"&&this.pauseTime===void 0&&(v=this.totalDuration);const C=v/this.duration;let R=Math.floor(C),k=C%1;!k&&C>=1&&(k=1),k===1&&R--;const P=R%2;(u==="reverse"||u==="alternate"&&P||u==="alternate-reverse"&&!P)&&(k=1-k);const N=v>=this.totalDuration?1:Math.min(k,1),$=h(this.easing(N));e($),this.pauseTime===void 0&&(this.playState==="finished"||v>=this.totalDuration+a)?(this.playState="finished",(b=this.resolve)===null||b===void 0||b.call(this,$)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},f&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var tH=function(){};vt.env.NODE_ENV!=="production"&&(tH=function(r,e){if(!r)throw new Error(e)});class Bpt{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const rH=new WeakMap;function W2e(r){return rH.has(r)||rH.set(r,{transforms:[],values:new Map}),rH.get(r)}function Lpt(r,e){return r.has(e)||r.set(e,new Bpt),r.get(e)}const Upt=["","X","Y","Z"],Fpt=["translate","scale","rotate","skew"],AR={x:"translateX",y:"translateY",z:"translateZ"},V2e={syntax:"",initialValue:"0deg",toDefaultUnit:r=>r+"deg"},jpt={translate:{syntax:"",initialValue:"0px",toDefaultUnit:r=>r+"px"},rotate:V2e,scale:{syntax:"",initialValue:1,toDefaultUnit:bm},skew:V2e},W7=new Map,nH=r=>`--motion-${r}`,SR=["x","y","z"];Fpt.forEach(r=>{Upt.forEach(e=>{SR.push(r+e),W7.set(nH(r+e),jpt[r])})});const zpt=(r,e)=>SR.indexOf(r)-SR.indexOf(e),Hpt=new Set(SR),G2e=r=>Hpt.has(r),qpt=(r,e)=>{AR[e]&&(e=AR[e]);const{transforms:t}=W2e(r);Spt(t,e),r.style.transform=Wpt(t)},Wpt=r=>r.sort(zpt).reduce(Vpt,"").trim(),Vpt=(r,e)=>`${r} ${e}(var(${nH(e)}))`,iH=r=>r.startsWith("--"),K2e=new Set;function Gpt(r){if(!K2e.has(r)){K2e.add(r);try{const{syntax:e,initialValue:t}=W7.has(r)?W7.get(r):{};CSS.registerProperty({name:r,inherits:!1,syntax:e,initialValue:t})}catch{}}}const sH=(r,e)=>document.createElement("div").animate(r,e),Z2e={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{sH({opacity:[1]})}catch{return!1}return!0},finished:()=>!!sH({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{sH({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},aH={},A5={};for(const r in Z2e)A5[r]=()=>(aH[r]===void 0&&(aH[r]=Z2e[r]()),aH[r]);const Kpt=.015,Zpt=(r,e)=>{let t="";const n=Math.round(e/Kpt);for(let i=0;iC5(r)?A5.linearEasing()?`linear(${Zpt(r,e)})`:Mu.easing:F2e(r)?Jpt(r):r,Jpt=([r,e,t,n])=>`cubic-bezier(${r}, ${e}, ${t}, ${n})`;function Ypt(r,e){for(let t=0;tArray.isArray(r)?r:[r];function oH(r){return AR[r]&&(r=AR[r]),G2e(r)?nH(r):r}const IR={get:(r,e)=>{e=oH(e);let t=iH(e)?r.style.getPropertyValue(e):getComputedStyle(r)[e];if(!t&&t!==0){const n=W7.get(e);n&&(t=n.initialValue)}return t},set:(r,e,t)=>{e=oH(e),iH(e)?r.style.setProperty(e,t):r.style[e]=t}};function Y2e(r,e=!0){if(!(!r||r.playState==="finished"))try{r.stop?r.stop():(e&&r.commitStyles(),r.cancel())}catch{}}function Xpt(r,e){var t;let n=(e==null?void 0:e.toDefaultUnit)||bm;const i=r[r.length-1];if(Mpt(i)){const s=((t=i.match(/(-?[\d.]+)([a-z%]*)/))===null||t===void 0?void 0:t[2])||"";s&&(n=a=>a+s)}return n}function e1t(){return window.__MOTION_DEV_TOOLS_RECORD}function t1t(r,e,t,n={},i){const s=e1t(),a=n.record!==!1&&s;let o,{duration:l=Mu.duration,delay:u=Mu.delay,endDelay:f=Mu.endDelay,repeat:h=Mu.repeat,easing:m=Mu.easing,persist:b=!1,direction:v,offset:C,allowWebkitAcceleration:R=!1,autoplay:k=!0}=n;const P=W2e(r),N=G2e(e);let $=A5.waapi();N&&qpt(r,e);const j=oH(e),G=Lpt(P.values,j),U=W7.get(j);return Y2e(G.animation,!(eH(m)&&G.generator)&&n.record!==!1),()=>{const L=()=>{var D,x;return(x=(D=IR.get(r,j))!==null&&D!==void 0?D:U==null?void 0:U.initialValue)!==null&&x!==void 0?x:0};let V=Ypt(Qpt(t),L);const te=Xpt(V,U);if(eH(m)){const D=m.createAnimation(V,e!=="opacity",L,j,G);m=D.easing,V=D.keyframes||V,l=D.duration||l}if(iH(j)&&(A5.cssRegisterProperty()?Gpt(j):$=!1),N&&!A5.linearEasing()&&(C5(m)||E5(m)&&m.some(C5))&&($=!1),$){U&&(V=V.map(y=>CR(y)?U.toDefaultUnit(y):y)),V.length===1&&(!A5.partialKeyframes()||a)&&V.unshift(L());const D={delay:H7.ms(u),duration:H7.ms(l),endDelay:H7.ms(f),easing:E5(m)?void 0:J2e(m,l),direction:v,iterations:h+1,fill:"both"};o=r.animate({[j]:V,offset:C,easing:E5(m)?m.map(y=>J2e(y,l)):void 0},D),o.finished||(o.finished=new Promise((y,p)=>{o.onfinish=y,o.oncancel=p}));const x=V[V.length-1];o.finished.then(()=>{b||(IR.set(r,j,x),o.cancel())}).catch(L2e),R||(o.playbackRate=1.000001)}else if(i&&N)V=V.map(D=>typeof D=="string"?parseFloat(D):D),V.length===1&&V.unshift(parseFloat(L())),o=new i(D=>{IR.set(r,j,te?te(D):D)},V,Object.assign(Object.assign({},n),{duration:l,easing:m}));else{const D=V[V.length-1];IR.set(r,j,U&&CR(D)?U.toDefaultUnit(D):D)}return a&&s(r,e,V,{duration:l,delay:u,easing:m,repeat:h,offset:C},"motion-one"),G.setAnimation(o),o&&!k&&o.pause(),o}}const r1t=(r,e)=>r[e]?Object.assign(Object.assign({},r),r[e]):Object.assign({},r);function n1t(r,e){return typeof r=="string"?r=document.querySelectorAll(r):r instanceof Element&&(r=[r]),Array.from(r||[])}const i1t=r=>r(),Q2e=(r,e,t=Mu.duration)=>new Proxy({animations:r.map(i1t).filter(Boolean),duration:t,options:e},a1t),s1t=r=>r.animations[0],a1t={get:(r,e)=>{const t=s1t(r);switch(e){case"duration":return r.duration;case"currentTime":return H7.s((t==null?void 0:t[e])||0);case"playbackRate":case"playState":return t==null?void 0:t[e];case"finished":return r.finished||(r.finished=Promise.all(r.animations.map(o1t)).catch(L2e)),r.finished;case"stop":return()=>{r.animations.forEach(n=>Y2e(n))};case"forEachNative":return n=>{r.animations.forEach(i=>n(i,r))};default:return typeof(t==null?void 0:t[e])>"u"?void 0:()=>r.animations.forEach(n=>n[e]())}},set:(r,e,t)=>{switch(e){case"currentTime":t=H7.ms(t);case"playbackRate":for(let n=0;nr.finished;function c1t(r,e,t){return C5(r)?r(e,t):r}function l1t(r){return function(t,n,i={}){t=n1t(t);const s=t.length;tH(!!s,"No valid element provided."),tH(!!n,"No keyframes defined.");const a=[];for(let o=0;o{const t=new q2e(r,[0,1],e);return t.finished.catch(()=>{}),t}],e,e.duration)}function m2(r,e,t){return(C5(r)?f1t:u1t)(r,e,t)}/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Wa=r=>r??Qs;var iit=Object.defineProperty,W1e=Object.getOwnPropertySymbols,sit=Object.prototype.hasOwnProperty,oit=Object.prototype.propertyIsEnumerable,V1e=(r,e,t)=>e in r?iit(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,LF=(r,e)=>{for(var t in e||(e={}))sit.call(e,t)&&V1e(r,t,e[t]);if(W1e)for(var t of W1e(e))oit.call(e,t)&&V1e(r,t,e[t]);return r};function ait(){var r;const e=(r=k1.state.themeMode)!=null?r:"dark",t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--wcm-color-fg-1":t.foreground[1],"--wcm-color-fg-2":t.foreground[2],"--wcm-color-fg-3":t.foreground[3],"--wcm-color-bg-1":t.background[1],"--wcm-color-bg-2":t.background[2],"--wcm-color-bg-3":t.background[3],"--wcm-color-overlay":t.overlay}}function G1e(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const yn={getPreset(r){return G1e()[r]},setTheme(){const r=document.querySelector(":root"),{themeVariables:e}=k1.state;if(r){const t=LF(LF(LF({},ait()),G1e()),e);Object.entries(t).forEach(([n,i])=>r.style.setProperty(n,i))}},globalCss:Hn`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},cit=Hn`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var lit=Object.defineProperty,uit=Object.getOwnPropertyDescriptor,y3=(r,e,t,n)=>{for(var i=n>1?void 0:n?uit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&lit(e,t,i),i};let O1=class extends ln{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const r={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),Yt``}};O1.styles=[yn.globalCss,cit],y3([Yr({type:Boolean})],O1.prototype,"disabled",2),y3([Yr()],O1.prototype,"iconLeft",2),y3([Yr()],O1.prototype,"iconRight",2),y3([Yr()],O1.prototype,"onClick",2),y3([Yr()],O1.prototype,"variant",2),O1=y3([An("wcm-button")],O1);const hit=Hn`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var fit=Object.defineProperty,dit=Object.getOwnPropertyDescriptor,UF=(r,e,t,n)=>{for(var i=n>1?void 0:n?dit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&fit(e,t,i),i};let Cx=class extends ln{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const r={"wcm-secondary":this.variant==="secondary"};return Yt``}};Cx.styles=[yn.globalCss,hit],UF([Yr({type:Boolean})],Cx.prototype,"disabled",2),UF([Yr()],Cx.prototype,"variant",2),Cx=UF([An("wcm-button-big")],Cx);const pit=Hn`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var git=Object.defineProperty,mit=Object.getOwnPropertyDescriptor,bit=(r,e,t,n)=>{for(var i=n>1?void 0:n?mit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&git(e,t,i),i};let FF=class extends ln{render(){return Yt`

      `}};FF.styles=[yn.globalCss,pit],FF=bit([An("wcm-info-footer")],FF);const Qn={CROSS_ICON:ds``,WALLET_CONNECT_LOGO:ds``,WALLET_CONNECT_ICON:ds``,WALLET_CONNECT_ICON_COLORED:ds``,BACK_ICON:ds``,COPY_ICON:ds``,RETRY_ICON:ds``,DESKTOP_ICON:ds``,MOBILE_ICON:ds``,ARROW_DOWN_ICON:ds``,ARROW_UP_RIGHT_ICON:ds``,ARROW_RIGHT_ICON:ds``,QRCODE_ICON:ds``,SCAN_ICON:ds``,CHECKMARK_ICON:ds``,SEARCH_ICON:ds``,WALLET_PLACEHOLDER:ds``,GLOBE_ICON:ds``},wit=Hn`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var vit=Object.defineProperty,yit=Object.getOwnPropertyDescriptor,xit=(r,e,t,n)=>{for(var i=n>1?void 0:n?yit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&vit(e,t,i),i};let jF=class extends ln{render(){return Yt`
      ${Qn.WALLET_CONNECT_LOGO}
      `}};jF.styles=[yn.globalCss,wit],jF=xit([An("wcm-modal-backcard")],jF);const _it=Hn`main{padding:20px;padding-top:0;width:100%}`;var Eit=Object.defineProperty,Ait=Object.getOwnPropertyDescriptor,Cit=(r,e,t,n)=>{for(var i=n>1?void 0:n?Ait(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Eit(e,t,i),i};let zF=class extends ln{render(){return Yt`
      `}};zF.styles=[yn.globalCss,_it],zF=Cit([An("wcm-modal-content")],zF);const Sit=Hn`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var Iit=Object.defineProperty,Tit=Object.getOwnPropertyDescriptor,Rit=(r,e,t,n)=>{for(var i=n>1?void 0:n?Tit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Iit(e,t,i),i};let HF=class extends ln{render(){return Yt`
      `}};HF.styles=[yn.globalCss,Sit],HF=Rit([An("wcm-modal-footer")],HF);const kit=Hn`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var Mit=Object.defineProperty,Nit=Object.getOwnPropertyDescriptor,Sx=(r,e,t,n)=>{for(var i=n>1?void 0:n?Nit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Mit(e,t,i),i};let E2=class extends ln{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return Yt``}actionBtnTemplate(){return Yt``}render(){const r={"wcm-border":this.border},e=os.state.history.length>1,t=this.title?Yt`${this.title}`:Yt``;return Yt`
      ${e?this.backBtnTemplate():null} ${t} ${this.onAction?this.actionBtnTemplate():null}
      `}};E2.styles=[yn.globalCss,kit],Sx([Yr()],E2.prototype,"title",2),Sx([Yr()],E2.prototype,"onAction",2),Sx([Yr()],E2.prototype,"actionIcon",2),Sx([Yr({type:Boolean})],E2.prototype,"border",2),E2=Sx([An("wcm-modal-header")],E2);const Fr={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(r,e){const t=r.renderRoot.querySelector(e);if(!t)throw new Error(`${e} not found`);return t},getWalletIcon({id:r,image_id:e}){const{walletImages:t}=nl.state;return t!=null&&t[r]?t[r]:e?_c.getWalletImageUrl(e):""},getWalletName(r,e=!1){return e&&r.length>8?`${r.substring(0,8)}..`:r},isMobileAnimation(){return window.innerWidth<=Fr.MOBILE_BREAKPOINT},async preloadImage(r){const e=new Promise((t,n)=>{const i=new Image;i.onload=t,i.onerror=n,i.crossOrigin="anonymous",i.src=r});return Promise.race([e,xr.wait(3e3)])},getErrorMessage(r){return r instanceof Error?r.message:"Unknown Error"},debounce(r,e=500){let t;return(...n)=>{function i(){r(...n)}t&&clearTimeout(t),t=setTimeout(i,e)}},handleMobileLinking(r){const{walletConnectUri:e}=Ts.state,{mobile:t,name:n}=r,i=t==null?void 0:t.native,s=t==null?void 0:t.universal;Fr.setRecentWallet(r);function o(a){let l="";i?l=xr.formatUniversalUrl(i,a,n):s&&(l=xr.formatNativeUrl(s,a,n)),xr.openHref(l,"_self")}e&&o(e)},handleAndroidLinking(){const{walletConnectUri:r}=Ts.state;r&&(xr.setWalletConnectAndroidDeepLink(r),xr.openHref(r,"_self"))},async handleUriCopy(){const{walletConnectUri:r}=Ts.state;if(r)try{await navigator.clipboard.writeText(r),M1.openToast("Link copied","success")}catch{M1.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:r}=nl.state,e=Object.values(r??{});return Object.values(e)},truncate(r,e=8){return r.length<=e?r:`${r.substring(0,4)}...${r.substring(r.length-4)}`},setRecentWallet(r){try{localStorage.setItem(Fr.WCM_RECENT_WALLET_DATA,JSON.stringify(r))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const r=localStorage.getItem(Fr.WCM_RECENT_WALLET_DATA);return r?JSON.parse(r):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(r,e){return r.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){xr.openHref(Fr.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:r,mobile:e}=xr.getWalletRouterData(),t=Boolean(r==null?void 0:r.native),n=Boolean(r==null?void 0:r.universal),i=Boolean(e==null?void 0:e.native)||Boolean(e==null?void 0:e.universal);return{isDesktop:t,isMobile:i,isWeb:n}},goToConnectingView(r){os.setData({Wallet:r});const e=xr.isMobile(),{isDesktop:t,isWeb:n,isMobile:i}=Fr.getCachedRouterWalletPlatforms();e?i?os.push("MobileConnecting"):n?os.push("WebConnecting"):os.push("InstallWallet"):t?os.push("DesktopConnecting"):n?os.push("WebConnecting"):i?os.push("MobileQrcodeConnecting"):os.push("InstallWallet")}},Pit=Hn`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var Oit=Object.defineProperty,Dit=Object.getOwnPropertyDescriptor,qF=(r,e,t,n)=>{for(var i=n>1?void 0:n?Dit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Oit(e,t,i),i};let Ix=class extends ln{constructor(){super(),this.view=os.state.view,this.prevView=os.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=os.subscribe(r=>{this.view!==r.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([r])=>{const e=`${r.contentRect.height}px`;this.oldHeight!=="0px"&&_2(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var r,e;(r=this.unsubscribe)==null||r.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return Fr.getShadowRootElement(this,".wcm-router")}get contentEl(){return Fr.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return Yt``;case"DesktopConnecting":return Yt``;case"MobileConnecting":return Yt``;case"WebConnecting":return Yt``;case"MobileQrcodeConnecting":return Yt``;case"WalletExplorer":return Yt``;case"Qrcode":return Yt``;case"InstallWallet":return Yt``;default:return Yt`
      Not Found
      `}}async onChangeRoute(){await _2(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=os.state.view,_2(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return Yt`
      ${this.viewTemplate()}
      `}};Ix.styles=[yn.globalCss,Pit],qF([Ec()],Ix.prototype,"view",2),qF([Ec()],Ix.prototype,"prevView",2),Ix=qF([An("wcm-modal-router")],Ix);const $it=Hn`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var Bit=Object.defineProperty,Lit=Object.getOwnPropertyDescriptor,K1e=(r,e,t,n)=>{for(var i=n>1?void 0:n?Lit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Bit(e,t,i),i};let zT=class extends ln{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=M1.subscribe(r=>{r.open?(this.open=!0,this.timeout=setTimeout(()=>M1.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),clearTimeout(this.timeout),M1.closeToast()}render(){const{message:r,variant:e}=M1.state,t={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?Yt`
      ${e==="success"?Qn.CHECKMARK_ICON:null} ${e==="error"?Qn.CROSS_ICON:null}${r}
      `:null}};zT.styles=[yn.globalCss,$it],K1e([Ec()],zT.prototype,"open",2),zT=K1e([An("wcm-modal-toast")],zT);const Uit=.1,Z1e=2.5,h0=7;function WF(r,e,t){return r===e?!1:(r-e<0?e-r:r-e)<=t+Uit}function Fit(r,e){const t=Array.prototype.slice.call(kv.create(r,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const jit={generate(r,e,t){const n="#141414",i="#ffffff",s=[],o=Fit(r,"Q"),a=e/o.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:y,y:C})=>{const T=(o.length-h0)*a*y,k=(o.length-h0)*a*C,N=.45;for(let O=0;O`)}});const u=Math.floor((t+25)/a),h=o.length/2-u/2,p=o.length/2+u/2-1,g=[];o.forEach((y,C)=>{y.forEach((T,k)=>{if(o[C][k]&&!(Co.length-(h0+1)&&ko.length-(h0+1))&&!(C>h&&Ch&&k{w[y]?w[y].push(C):w[y]=[C]}),Object.entries(w).map(([y,C])=>{const T=C.filter(k=>C.every(N=>!WF(k,N,a)));return[Number(y),T]}).forEach(([y,C])=>{C.forEach(T=>{s.push(ds``)})}),Object.entries(w).filter(([y,C])=>C.length>1).map(([y,C])=>{const T=C.filter(k=>C.some(N=>WF(k,N,a)));return[Number(y),T]}).map(([y,C])=>{C.sort((k,N)=>kO.some(B=>WF(k,B,a)));N?N.push(k):T.push([k])}return[y,T.map(k=>[k[0],k[k.length-1]])]}).forEach(([y,C])=>{C.forEach(([T,k])=>{s.push(ds``)})}),s}},zit=Hn`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Hit=Object.defineProperty,qit=Object.getOwnPropertyDescriptor,x3=(r,e,t,n)=>{for(var i=n>1?void 0:n?qit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Hit(e,t,i),i};let f0=class extends ln{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const r=k1.state.themeMode==="light"?this.size:this.size-36;return ds`${jit.generate(this.uri,r,r/4)}`}render(){const r={"wcm-dark":k1.state.themeMode==="dark"};return Yt`
      ${this.walletId||this.imageUrl?Yt``:Qn.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
      `}};f0.styles=[yn.globalCss,zit],x3([Yr()],f0.prototype,"uri",2),x3([Yr({type:Number})],f0.prototype,"size",2),x3([Yr()],f0.prototype,"imageId",2),x3([Yr()],f0.prototype,"walletId",2),x3([Yr()],f0.prototype,"imageUrl",2),f0=x3([An("wcm-qrcode")],f0);const Wit=Hn`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Vit=Object.defineProperty,Git=Object.getOwnPropertyDescriptor,J1e=(r,e,t,n)=>{for(var i=n>1?void 0:n?Git(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Vit(e,t,i),i};let HT=class extends ln{constructor(){super(...arguments),this.onChange=()=>null}render(){return Yt` ${Qn.SEARCH_ICON}`}};HT.styles=[yn.globalCss,Wit],J1e([Yr()],HT.prototype,"onChange",2),HT=J1e([An("wcm-search-input")],HT);const Kit=Hn`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Zit=Object.defineProperty,Jit=Object.getOwnPropertyDescriptor,Yit=(r,e,t,n)=>{for(var i=n>1?void 0:n?Jit(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Zit(e,t,i),i};let VF=class extends ln{render(){return Yt``}};VF.styles=[yn.globalCss,Kit],VF=Yit([An("wcm-spinner")],VF);const Qit=Hn`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Xit=Object.defineProperty,est=Object.getOwnPropertyDescriptor,GF=(r,e,t,n)=>{for(var i=n>1?void 0:n?est(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Xit(e,t,i),i};let Tx=class extends ln{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const r={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return Yt``}};Tx.styles=[yn.globalCss,Qit],GF([Yr()],Tx.prototype,"variant",2),GF([Yr()],Tx.prototype,"color",2),Tx=GF([An("wcm-text")],Tx);const tst=Hn`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var rst=Object.defineProperty,nst=Object.getOwnPropertyDescriptor,D1=(r,e,t,n)=>{for(var i=n>1?void 0:n?nst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&rst(e,t,i),i};let zf=class extends ln{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?Yt`RECENT`:this.installed?Yt`INSTALLED`:null}handleClick(){e1e.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var r;return Yt``}};zf.styles=[yn.globalCss,tst],D1([Yr()],zf.prototype,"onClick",2),D1([Yr()],zf.prototype,"name",2),D1([Yr()],zf.prototype,"walletId",2),D1([Yr()],zf.prototype,"label",2),D1([Yr()],zf.prototype,"imageId",2),D1([Yr({type:Boolean})],zf.prototype,"installed",2),D1([Yr({type:Boolean})],zf.prototype,"recent",2),zf=D1([An("wcm-wallet-button")],zf);const ist=Hn`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var sst=Object.defineProperty,ost=Object.getOwnPropertyDescriptor,qT=(r,e,t,n)=>{for(var i=n>1?void 0:n?ost(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&sst(e,t,i),i};let _3=class extends ln{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var r;const e=(r=this.imageUrl)!=null&&r.length?this.imageUrl:Fr.getWalletIcon({id:this.walletId,image_id:this.imageId});return Yt`${e.length?Yt`
      ${this.id}
      `:Qn.WALLET_PLACEHOLDER}`}};_3.styles=[yn.globalCss,ist],qT([Yr()],_3.prototype,"walletId",2),qT([Yr()],_3.prototype,"imageId",2),qT([Yr()],_3.prototype,"imageUrl",2),_3=qT([An("wcm-wallet-image")],_3);var ast=Object.defineProperty,cst=Object.getOwnPropertyDescriptor,Y1e=(r,e,t,n)=>{for(var i=n>1?void 0:n?cst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&ast(e,t,i),i};let KF=class extends ln{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(r){try{r!=null&&r.length&&await Promise.all(r.map(async e=>Fr.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",r)}}async preloadListings(){if(nl.state.enableExplorer){await _c.getRecomendedWallets(),Ts.setIsDataLoaded(!0);const{recomendedWallets:r}=_c.state,e=r.map(t=>Fr.getWalletIcon(t));await this.loadImages(e)}else Ts.setIsDataLoaded(!0)}async preloadCustomImages(){const r=Fr.getCustomImageUrls();await this.loadImages(r)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(r){console.error(r),M1.openToast("Failed preloading","error")}}};Y1e([Ec()],KF.prototype,"preload",2),KF=Y1e([An("wcm-explorer-context")],KF);var lst=Object.defineProperty,ust=Object.getOwnPropertyDescriptor,hst=(r,e,t,n)=>{for(var i=n>1?void 0:n?ust(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&lst(e,t,i),i};let Q1e=class extends ln{constructor(){super(),this.unsubscribeTheme=void 0,yn.setTheme(),this.unsubscribeTheme=k1.subscribe(yn.setTheme)}disconnectedCallback(){var r;(r=this.unsubscribeTheme)==null||r.call(this)}};Q1e=hst([An("wcm-theme-context")],Q1e);const fst=Hn`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var dst=Object.defineProperty,pst=Object.getOwnPropertyDescriptor,gst=(r,e,t,n)=>{for(var i=n>1?void 0:n?pst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&dst(e,t,i),i};let ZF=class extends ln{onGoToQrcode(){os.push("Qrcode")}render(){const{recomendedWallets:r}=_c.state,e=[...r,...r],t=xr.RECOMMENDED_WALLET_AMOUNT*2;return Yt`
      ${Qn.MOBILE_ICON}WalletConnect
      ${[...Array(t)].map((n,i)=>{const s=e[i%e.length];return s?Yt``:Qn.WALLET_PLACEHOLDER})}
      Select Wallet
      Choose WalletConnect to see supported apps on your device`}};ZF.styles=[yn.globalCss,fst],ZF=gst([An("wcm-android-wallet-selection")],ZF);const mst=Hn`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var bst=Object.defineProperty,wst=Object.getOwnPropertyDescriptor,E3=(r,e,t,n)=>{for(var i=n>1?void 0:n?wst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&bst(e,t,i),i};let $1=class extends ln{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var r,e;const t=(e=(r=k1.state.themeVariables)==null?void 0:r["--wcm-wallet-icon-large-border-radius"])!=null?e:yn.getPreset("--wcm-wallet-icon-large-border-radius");let n=0;t.includes("%")?n=88/100*parseInt(t,10):n=parseInt(t,10),n*=1.17;const i=317-n*1.57,s=425-n*1.8;return Yt``}render(){const r={"wcm-error":this.isError,"wcm-stale":this.isStale};return Yt`
      ${this.svgLoaderTemplate()}
      ${this.isError?"Connection declined":this.label}`}};$1.styles=[yn.globalCss,mst],E3([Yr()],$1.prototype,"walletId",2),E3([Yr()],$1.prototype,"imageId",2),E3([Yr({type:Boolean})],$1.prototype,"isError",2),E3([Yr({type:Boolean})],$1.prototype,"isStale",2),E3([Yr()],$1.prototype,"label",2),$1=E3([An("wcm-connector-waiting")],$1);const A3={manualWallets(){var r,e;const{mobileWallets:t,desktopWallets:n}=nl.state,i=(r=A3.recentWallet())==null?void 0:r.id,s=xr.isMobile()?t:n,o=s==null?void 0:s.filter(a=>i!==a.id);return(e=xr.isMobile()?o==null?void 0:o.map(({id:a,name:l,links:u})=>({id:a,name:l,mobile:u,links:u})):o==null?void 0:o.map(({id:a,name:l,links:u})=>({id:a,name:l,desktop:u,links:u})))!=null?e:[]},recentWallet(){return Fr.getRecentWallet()},recomendedWallets(r=!1){var e;const t=r||(e=A3.recentWallet())==null?void 0:e.id,{recomendedWallets:n}=_c.state;return n.filter(i=>t!==i.id)}},B1={onConnecting(r){Fr.goToConnectingView(r)},manualWalletsTemplate(){return A3.manualWallets().map(r=>Yt``)},recomendedWalletsTemplate(r=!1){return A3.recomendedWallets(r).map(e=>Yt``)},recentWalletTemplate(){const r=A3.recentWallet();if(r)return Yt``}},vst=Hn`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var yst=Object.defineProperty,xst=Object.getOwnPropertyDescriptor,_st=(r,e,t,n)=>{for(var i=n>1?void 0:n?xst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&yst(e,t,i),i};let JF=class extends ln{render(){const{explorerExcludedWalletIds:r,enableExplorer:e}=nl.state,t=r!=="ALL"&&e,n=B1.manualWalletsTemplate(),i=B1.recomendedWalletsTemplate();let s=[B1.recentWalletTemplate(),...n,...i];s=s.filter(Boolean);const o=s.length>4||t;let a=[];o?a=s.slice(0,3):a=s;const l=Boolean(a.length);return Yt`
      ${Qn.MOBILE_ICON}Mobile
      ${Qn.SCAN_ICON}Scan with your wallet
      ${l?Yt`
      ${Qn.DESKTOP_ICON}Desktop
      ${a} ${o?Yt``:null}
      `:null}`}};JF.styles=[yn.globalCss,vst],JF=_st([An("wcm-desktop-wallet-selection")],JF);const Est=Hn`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Ast=Object.defineProperty,Cst=Object.getOwnPropertyDescriptor,Sst=(r,e,t,n)=>{for(var i=n>1?void 0:n?Cst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Ast(e,t,i),i};let YF=class extends ln{render(){const{termsOfServiceUrl:r,privacyPolicyUrl:e}=nl.state;return r??e?Yt`
      By connecting your wallet to this app, you agree to the app's ${r?Yt`Terms of Service`:null} ${r&&e?"and":null} ${e?Yt`Privacy Policy`:null}
      `:null}};YF.styles=[yn.globalCss,Est],YF=Sst([An("wcm-legal-notice")],YF);const Ist=Hn`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var Tst=Object.defineProperty,Rst=Object.getOwnPropertyDescriptor,kst=(r,e,t,n)=>{for(var i=n>1?void 0:n?Rst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Tst(e,t,i),i};let QF=class extends ln{onQrcode(){os.push("Qrcode")}render(){const{explorerExcludedWalletIds:r,enableExplorer:e}=nl.state,t=r!=="ALL"&&e,n=B1.manualWalletsTemplate(),i=B1.recomendedWalletsTemplate();let s=[B1.recentWalletTemplate(),...n,...i];s=s.filter(Boolean);const o=s.length>8||t;let a=[];o?a=s.slice(0,7):a=s;const l=Boolean(a.length);return Yt`${l?Yt`
      ${a} ${o?Yt``:null}
      `:null}`}};QF.styles=[yn.globalCss,Ist],QF=kst([An("wcm-mobile-wallet-selection")],QF);const Mst=Hn`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var Nst=Object.defineProperty,Pst=Object.getOwnPropertyDescriptor,XF=(r,e,t,n)=>{for(var i=n>1?void 0:n?Pst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Nst(e,t,i),i};let C3=class extends ln{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=m2.subscribe(r=>{r.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var r;(r=this.unsubscribeModal)==null||r.call(this)}get overlayEl(){return Fr.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return Fr.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(r){if(document.querySelector("body"))if(r){const e=document.getElementById("wcm-styles");e==null||e.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(r){r.target===r.currentTarget&&m2.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const r=Fr.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,t=.2;await Promise.all([_2(this.overlayEl,{opacity:[0,1]},{delay:e,duration:t}).finished,_2(this.containerEl,r,{delay:e,duration:t}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const r=Fr.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([_2(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,_2(this.containerEl,r,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",r=>{var e;r.key==="Escape"?m2.close():r.key==="Tab"&&((e=r.target)!=null&&e.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var r;(r=this.abortController)==null||r.abort(),this.abortController=void 0}render(){const r={"wcm-overlay":!0,"wcm-active":this.active};return Yt`
      ${this.open?Yt`
      `:null}
      `}};C3.styles=[yn.globalCss,Mst],XF([Ec()],C3.prototype,"open",2),XF([Ec()],C3.prototype,"active",2),C3=XF([An("wcm-modal")],C3);const Ost=Hn`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var Dst=Object.defineProperty,$st=Object.getOwnPropertyDescriptor,Rx=(r,e,t,n)=>{for(var i=n>1?void 0:n?$st(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Dst(e,t,i),i};let A2=class extends ln{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){xr.isMobile()?os.replace("MobileConnecting"):os.replace("MobileQrcodeConnecting")}onDesktop(){os.replace("DesktopConnecting")}onWeb(){os.replace("WebConnecting")}render(){return Yt`
      ${this.isRetry?Yt``:null} ${this.isMobile?Yt`Mobile`:null} ${this.isDesktop?Yt`Desktop`:null} ${this.isWeb?Yt`Web`:null}
      `}};A2.styles=[yn.globalCss,Ost],Rx([Yr({type:Boolean})],A2.prototype,"isMobile",2),Rx([Yr({type:Boolean})],A2.prototype,"isDesktop",2),Rx([Yr({type:Boolean})],A2.prototype,"isWeb",2),Rx([Yr({type:Boolean})],A2.prototype,"isRetry",2),A2=Rx([An("wcm-platform-selection")],A2);const Bst=Hn`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Lst=Object.defineProperty,Ust=Object.getOwnPropertyDescriptor,Fst=(r,e,t,n)=>{for(var i=n>1?void 0:n?Ust(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Lst(e,t,i),i};let ej=class extends ln{onClick(){os.push("WalletExplorer")}render(){const{recomendedWallets:r}=_c.state,e=A3.manualWallets(),t=[...r,...e].reverse().slice(0,4);return Yt``}};ej.styles=[yn.globalCss,Bst],ej=Fst([An("wcm-view-all-wallets-button")],ej);const jst=Hn`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var zst=Object.defineProperty,Hst=Object.getOwnPropertyDescriptor,WT=(r,e,t,n)=>{for(var i=n>1?void 0:n?Hst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&zst(e,t,i),i};let S3=class extends ln{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:r}=Ts.state;this.uri=r},0)}get overlayEl(){return Fr.getShadowRootElement(this,".wcm-qr-container")}render(){return Yt`
      ${this.uri?Yt``:Yt``}
      `}};S3.styles=[yn.globalCss,jst],WT([Yr()],S3.prototype,"walletId",2),WT([Yr()],S3.prototype,"imageId",2),WT([Ec()],S3.prototype,"uri",2),S3=WT([An("wcm-walletconnect-qr")],S3);var qst=Object.defineProperty,Wst=Object.getOwnPropertyDescriptor,Vst=(r,e,t,n)=>{for(var i=n>1?void 0:n?Wst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&qst(e,t,i),i};let tj=class extends ln{viewTemplate(){return xr.isAndroid()?Yt``:xr.isMobile()?Yt``:Yt``}render(){return Yt`${this.viewTemplate()}`}};tj.styles=[yn.globalCss],tj=Vst([An("wcm-connect-wallet-view")],tj);const Gst=Hn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Kst=Object.defineProperty,Zst=Object.getOwnPropertyDescriptor,X1e=(r,e,t,n)=>{for(var i=n>1?void 0:n?Zst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Kst(e,t,i),i};let VT=class extends ln{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(r){const{desktop:e,name:t}=xr.getWalletRouterData(),n=e==null?void 0:e.native;if(n){const i=xr.formatNativeUrl(n,r,t);xr.openHref(i,"_self")}}openDesktopApp(){const{walletConnectUri:r}=Ts.state,e=xr.getWalletRouterData();Fr.setRecentWallet(e),r&&this.onFormatAndRedirect(r)}render(){const{name:r,id:e,image_id:t}=xr.getWalletRouterData(),{isMobile:n,isWeb:i}=Fr.getCachedRouterWalletPlatforms();return Yt`${`Connection can continue loading if ${r} is not installed on your device`}Retry`}};VT.styles=[yn.globalCss,Gst],X1e([Ec()],VT.prototype,"isError",2),VT=X1e([An("wcm-desktop-connecting-view")],VT);const Jst=Hn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Yst=Object.defineProperty,Qst=Object.getOwnPropertyDescriptor,Xst=(r,e,t,n)=>{for(var i=n>1?void 0:n?Qst(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&Yst(e,t,i),i};let rj=class extends ln{onInstall(r){r&&xr.openHref(r,"_blank")}render(){const{name:r,id:e,image_id:t,homepage:n}=xr.getWalletRouterData();return Yt`${`Download ${r} to continue. If multiple browser extensions are installed, disable non ${r} ones and try again`}Download`}};rj.styles=[yn.globalCss,Jst],rj=Xst([An("wcm-install-wallet-view")],rj);const eot=Hn`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var tot=Object.defineProperty,rot=Object.getOwnPropertyDescriptor,ege=(r,e,t,n)=>{for(var i=n>1?void 0:n?rot(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&tot(e,t,i),i};let GT=class extends ln{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(r,e=!1){const{mobile:t,name:n}=xr.getWalletRouterData(),i=t==null?void 0:t.native,s=t==null?void 0:t.universal;if(i&&!e){const o=xr.formatNativeUrl(i,r,n);xr.openHref(o,"_self")}else if(s){const o=xr.formatUniversalUrl(s,r,n);xr.openHref(o,"_self")}}openMobileApp(r=!1){const{walletConnectUri:e}=Ts.state,t=xr.getWalletRouterData();Fr.setRecentWallet(t),e&&this.onFormatAndRedirect(e,r)}onGoToAppStore(r){r&&xr.openHref(r,"_blank")}render(){const{name:r,id:e,image_id:t,app:n,mobile:i}=xr.getWalletRouterData(),{isWeb:s}=Fr.getCachedRouterWalletPlatforms(),o=n==null?void 0:n.ios,a=i==null?void 0:i.universal;return Yt`Retry${a?Yt`Still doesn't work? Try this alternate link`:null}
      ${`Get ${r}`}
      App Store
      `}};GT.styles=[yn.globalCss,eot],ege([Ec()],GT.prototype,"isError",2),GT=ege([An("wcm-mobile-connecting-view")],GT);const not=Hn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var iot=Object.defineProperty,sot=Object.getOwnPropertyDescriptor,oot=(r,e,t,n)=>{for(var i=n>1?void 0:n?sot(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&iot(e,t,i),i};let nj=class extends ln{render(){const{name:r,id:e,image_id:t}=xr.getWalletRouterData(),{isDesktop:n,isWeb:i}=Fr.getCachedRouterWalletPlatforms();return Yt`${`Scan this QR Code with your phone's camera or inside ${r} app`}`}};nj.styles=[yn.globalCss,not],nj=oot([An("wcm-mobile-qr-connecting-view")],nj);var aot=Object.defineProperty,cot=Object.getOwnPropertyDescriptor,lot=(r,e,t,n)=>{for(var i=n>1?void 0:n?cot(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&aot(e,t,i),i};let ij=class extends ln{render(){return Yt``}};ij.styles=[yn.globalCss],ij=lot([An("wcm-qrcode-view")],ij);const uot=Hn`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var hot=Object.defineProperty,fot=Object.getOwnPropertyDescriptor,kx=(r,e,t,n)=>{for(var i=n>1?void 0:n?fot(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&hot(e,t,i),i};const sj=40;let C2=class extends ln{constructor(){super(...arguments),this.loading=!_c.state.wallets.listings.length,this.firstFetch=!_c.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=Fr.debounce(r=>{r.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=r,_c.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),_c.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var r;(r=this.intersectionObserver)==null||r.disconnect()}get placeholderEl(){return Fr.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([r])=>{r.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:r,search:e}=_c.state,{listings:t,total:n}=this.search?e:r;return n<=sj||t.length>=n}async fetchWallets(){var r;const{wallets:e,search:t}=_c.state,{listings:n,total:i,page:s}=this.search?t:e;if(!this.endReached&&(this.firstFetch||i>sj&&n.lengthFr.getWalletIcon(u));await Promise.all([...l.map(async u=>Fr.preloadImage(u)),xr.wait(300)]),this.endReached=this.isLastPage()}catch(o){console.error(o),M1.openToast(Fr.getErrorMessage(o),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(r){xr.isAndroid()?Fr.handleMobileLinking(r):Fr.goToConnectingView(r)}onSearchChange(r){const{value:e}=r.target;this.searchDebounce(e)}render(){const{wallets:r,search:e}=_c.state,{listings:t}=this.search?e:r,n=this.loading&&!t.length,i=this.search.length>=3;let s=B1.manualWalletsTemplate(),o=B1.recomendedWalletsTemplate(!0);i&&(s=s.filter(({values:u})=>Fr.caseSafeIncludes(u[0],this.search)),o=o.filter(({values:u})=>Fr.caseSafeIncludes(u[0],this.search)));const a=!this.loading&&!t.length&&!o.length,l={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":a};return Yt`
      ${n?null:s} ${n?null:o} ${n?null:t.map(u=>Yt`${u?Yt``:null}`)}
      ${a?Yt`No results found`:null} ${!a&&this.loading?Yt``:null}
      `}};C2.styles=[yn.globalCss,uot],kx([Ec()],C2.prototype,"loading",2),kx([Ec()],C2.prototype,"firstFetch",2),kx([Ec()],C2.prototype,"search",2),kx([Ec()],C2.prototype,"endReached",2),C2=kx([An("wcm-wallet-explorer-view")],C2);const dot=Hn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var pot=Object.defineProperty,got=Object.getOwnPropertyDescriptor,tge=(r,e,t,n)=>{for(var i=n>1?void 0:n?got(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(i=(n?o(e,t,i):o(i))||i);return n&&i&&pot(e,t,i),i};let KT=class extends ln{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(r){const{desktop:e,name:t}=xr.getWalletRouterData(),n=e==null?void 0:e.universal;if(n){const i=xr.formatUniversalUrl(n,r,t);xr.openHref(i,"_blank")}}openWebWallet(){const{walletConnectUri:r}=Ts.state,e=xr.getWalletRouterData();Fr.setRecentWallet(e),r&&this.onFormatAndRedirect(r)}render(){const{name:r,id:e,image_id:t}=xr.getWalletRouterData(),{isMobile:n,isDesktop:i}=Fr.getCachedRouterWalletPlatforms(),s=xr.isMobile();return Yt`${`${r} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};KT.styles=[yn.globalCss,dot],tge([Ec()],KT.prototype,"isError",2),KT=tge([An("wcm-web-connecting-view")],KT);const mot=Object.freeze(Object.defineProperty({__proto__:null,get WcmModal(){return C3},get WcmQrCode(){return f0}},Symbol.toStringTag,{value:"Module"}));Kr.Provider=Vh,Kr.assets=lxe,Kr.browser=Drt,Kr.ethers=R4e,Kr.models=hxe,Kr.networks=NA,Kr.services=dxe,Kr.types=Tge,Kr.utils=Rwe,Object.defineProperty(Kr,Symbol.toStringTag,{value:"Module"})}); + */const Qo=r=>r??sa;var d1t=Object.defineProperty,X2e=Object.getOwnPropertySymbols,h1t=Object.prototype.hasOwnProperty,p1t=Object.prototype.propertyIsEnumerable,eve=(r,e,t)=>e in r?d1t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,cH=(r,e)=>{for(var t in e||(e={}))h1t.call(e,t)&&eve(r,t,e[t]);if(X2e)for(var t of X2e(e))p1t.call(e,t)&&eve(r,t,e[t]);return r};function m1t(){var r;const e=(r=pm.state.themeMode)!=null?r:"dark",n={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--wcm-color-fg-1":n.foreground[1],"--wcm-color-fg-2":n.foreground[2],"--wcm-color-fg-3":n.foreground[3],"--wcm-color-bg-1":n.background[1],"--wcm-color-bg-2":n.background[2],"--wcm-color-bg-3":n.background[3],"--wcm-color-overlay":n.overlay}}function tve(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const xn={getPreset(r){return tve()[r]},setTheme(){const r=document.querySelector(":root"),{themeVariables:e}=pm.state;if(r){const t=cH(cH(cH({},m1t()),tve()),e);Object.entries(t).forEach(([n,i])=>r.style.setProperty(n,i))}},globalCss:qn`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},g1t=qn`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var b1t=Object.defineProperty,v1t=Object.getOwnPropertyDescriptor,S5=(r,e,t,n)=>{for(var i=n>1?void 0:n?v1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&b1t(e,t,i),i};let vm=class extends dn{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const r={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),Yt``}};vm.styles=[xn.globalCss,g1t],S5([tn({type:Boolean})],vm.prototype,"disabled",2),S5([tn()],vm.prototype,"iconLeft",2),S5([tn()],vm.prototype,"iconRight",2),S5([tn()],vm.prototype,"onClick",2),S5([tn()],vm.prototype,"variant",2),vm=S5([Tn("wcm-button")],vm);const w1t=qn`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var y1t=Object.defineProperty,x1t=Object.getOwnPropertyDescriptor,lH=(r,e,t,n)=>{for(var i=n>1?void 0:n?x1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&y1t(e,t,i),i};let V7=class extends dn{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const r={"wcm-secondary":this.variant==="secondary"};return Yt``}};V7.styles=[xn.globalCss,w1t],lH([tn({type:Boolean})],V7.prototype,"disabled",2),lH([tn()],V7.prototype,"variant",2),V7=lH([Tn("wcm-button-big")],V7);const _1t=qn`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var E1t=Object.defineProperty,C1t=Object.getOwnPropertyDescriptor,A1t=(r,e,t,n)=>{for(var i=n>1?void 0:n?C1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&E1t(e,t,i),i};let uH=class extends dn{render(){return Yt`
      `}};uH.styles=[xn.globalCss,_1t],uH=A1t([Tn("wcm-info-footer")],uH);const ei={CROSS_ICON:ws``,WALLET_CONNECT_LOGO:ws``,WALLET_CONNECT_ICON:ws``,WALLET_CONNECT_ICON_COLORED:ws``,BACK_ICON:ws``,COPY_ICON:ws``,RETRY_ICON:ws``,DESKTOP_ICON:ws``,MOBILE_ICON:ws``,ARROW_DOWN_ICON:ws``,ARROW_UP_RIGHT_ICON:ws``,ARROW_RIGHT_ICON:ws``,QRCODE_ICON:ws``,SCAN_ICON:ws``,CHECKMARK_ICON:ws``,SEARCH_ICON:ws``,WALLET_PLACEHOLDER:ws``,GLOBE_ICON:ws``},S1t=qn`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var I1t=Object.defineProperty,T1t=Object.getOwnPropertyDescriptor,k1t=(r,e,t,n)=>{for(var i=n>1?void 0:n?T1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&I1t(e,t,i),i};let fH=class extends dn{render(){return Yt`
      ${ei.WALLET_CONNECT_LOGO}
      `}};fH.styles=[xn.globalCss,S1t],fH=k1t([Tn("wcm-modal-backcard")],fH);const R1t=qn`main{padding:20px;padding-top:0;width:100%}`;var M1t=Object.defineProperty,P1t=Object.getOwnPropertyDescriptor,O1t=(r,e,t,n)=>{for(var i=n>1?void 0:n?P1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&M1t(e,t,i),i};let dH=class extends dn{render(){return Yt`
      `}};dH.styles=[xn.globalCss,R1t],dH=O1t([Tn("wcm-modal-content")],dH);const N1t=qn`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var D1t=Object.defineProperty,$1t=Object.getOwnPropertyDescriptor,B1t=(r,e,t,n)=>{for(var i=n>1?void 0:n?$1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&D1t(e,t,i),i};let hH=class extends dn{render(){return Yt`
      `}};hH.styles=[xn.globalCss,N1t],hH=B1t([Tn("wcm-modal-footer")],hH);const L1t=qn`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var U1t=Object.defineProperty,F1t=Object.getOwnPropertyDescriptor,G7=(r,e,t,n)=>{for(var i=n>1?void 0:n?F1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&U1t(e,t,i),i};let g2=class extends dn{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return Yt``}actionBtnTemplate(){return Yt``}render(){const r={"wcm-border":this.border},e=ls.state.history.length>1,t=this.title?Yt`${this.title}`:Yt``;return Yt`
      ${e?this.backBtnTemplate():null} ${t} ${this.onAction?this.actionBtnTemplate():null}
      `}};g2.styles=[xn.globalCss,L1t],G7([tn()],g2.prototype,"title",2),G7([tn()],g2.prototype,"onAction",2),G7([tn()],g2.prototype,"actionIcon",2),G7([tn({type:Boolean})],g2.prototype,"border",2),g2=G7([Tn("wcm-modal-header")],g2);const Hr={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(r,e){const t=r.renderRoot.querySelector(e);if(!t)throw new Error(`${e} not found`);return t},getWalletIcon({id:r,image_id:e}){const{walletImages:t}=gl.state;return t!=null&&t[r]?t[r]:e?Bc.getWalletImageUrl(e):""},getWalletName(r,e=!1){return e&&r.length>8?`${r.substring(0,8)}..`:r},isMobileAnimation(){return window.innerWidth<=Hr.MOBILE_BREAKPOINT},async preloadImage(r){const e=new Promise((t,n)=>{const i=new Image;i.onload=t,i.onerror=n,i.crossOrigin="anonymous",i.src=r});return Promise.race([e,fr.wait(3e3)])},getErrorMessage(r){return r instanceof Error?r.message:"Unknown Error"},debounce(r,e=500){let t;return(...n)=>{function i(){r(...n)}t&&clearTimeout(t),t=setTimeout(i,e)}},handleMobileLinking(r,e="_self"){const{walletConnectUri:t}=Ns.state,{mobile:n,name:i}=r,s=n==null?void 0:n.native,a=n==null?void 0:n.universal;Hr.setRecentWallet(r);function o(l){if(s){const u=fr.formatNativeUrl(s,l,i);fr.openHref(u,e)}else if(a){const u=fr.formatUniversalUrl(a,l,i);fr.openHref(u,e)}}t&&o(t)},handleAndroidLinking(){const{walletConnectUri:r}=Ns.state;r&&(fr.setWalletConnectAndroidDeepLink(r),fr.openHref(r,fr.isTelegram()?"_blank":"_self"))},async handleUriCopy(){const{walletConnectUri:r}=Ns.state;if(r)try{await navigator.clipboard.writeText(r),mm.openToast("Link copied","success")}catch{mm.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:r}=gl.state,e=Object.values(r??{});return Object.values(e)},truncate(r,e=8){return r.length<=e?r:`${r.substring(0,4)}...${r.substring(r.length-4)}`},setRecentWallet(r){try{localStorage.setItem(Hr.WCM_RECENT_WALLET_DATA,JSON.stringify(r))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const r=localStorage.getItem(Hr.WCM_RECENT_WALLET_DATA);return r?JSON.parse(r):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(r,e){return r.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){fr.openHref(Hr.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:r,mobile:e}=fr.getWalletRouterData(),t=!!(r!=null&&r.native),n=!!(r!=null&&r.universal),i=!!(e!=null&&e.native)||!!(e!=null&&e.universal);return{isDesktop:t,isMobile:i,isWeb:n}},goToConnectingView(r){ls.setData({Wallet:r});const e=fr.isMobile(),{isDesktop:t,isWeb:n,isMobile:i}=Hr.getCachedRouterWalletPlatforms();e?i?(ls.push("MobileConnecting"),!fr.isAndroid()&&fr.isTelegram()&&this.handleMobileLinking(r,"_blank")):n?ls.push("WebConnecting"):ls.push("InstallWallet"):t?ls.push("DesktopConnecting"):n?ls.push("WebConnecting"):i?ls.push("MobileQrcodeConnecting"):ls.push("InstallWallet")}},j1t=qn`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var z1t=Object.defineProperty,H1t=Object.getOwnPropertyDescriptor,pH=(r,e,t,n)=>{for(var i=n>1?void 0:n?H1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&z1t(e,t,i),i};let K7=class extends dn{constructor(){super(),this.view=ls.state.view,this.prevView=ls.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=ls.subscribe(r=>{this.view!==r.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([r])=>{const e=`${r.contentRect.height}px`;this.oldHeight!=="0px"&&m2(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var r,e;(r=this.unsubscribe)==null||r.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return Hr.getShadowRootElement(this,".wcm-router")}get contentEl(){return Hr.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return Yt``;case"DesktopConnecting":return Yt``;case"MobileConnecting":return Yt``;case"WebConnecting":return Yt``;case"MobileQrcodeConnecting":return Yt``;case"WalletExplorer":return Yt``;case"Qrcode":return Yt``;case"InstallWallet":return Yt``;default:return Yt`
      Not Found
      `}}async onChangeRoute(){await m2(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=ls.state.view,m2(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return Yt`
      ${this.viewTemplate()}
      `}};K7.styles=[xn.globalCss,j1t],pH([Lc()],K7.prototype,"view",2),pH([Lc()],K7.prototype,"prevView",2),K7=pH([Tn("wcm-modal-router")],K7);const q1t=qn`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var W1t=Object.defineProperty,V1t=Object.getOwnPropertyDescriptor,rve=(r,e,t,n)=>{for(var i=n>1?void 0:n?V1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&W1t(e,t,i),i};let TR=class extends dn{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=mm.subscribe(r=>{r.open?(this.open=!0,this.timeout=setTimeout(()=>mm.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),clearTimeout(this.timeout),mm.closeToast()}render(){const{message:r,variant:e}=mm.state,t={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?Yt`
      ${e==="success"?ei.CHECKMARK_ICON:null} ${e==="error"?ei.CROSS_ICON:null}${r}
      `:null}};TR.styles=[xn.globalCss,q1t],rve([Lc()],TR.prototype,"open",2),TR=rve([Tn("wcm-modal-toast")],TR);const G1t=.1,nve=2.5,V0=7;function mH(r,e,t){return r===e?!1:(r-e<0?e-r:r-e)<=t+G1t}function K1t(r,e){const t=Array.prototype.slice.call(R3.create(r,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((i,s,a)=>(a%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const Z1t={generate(r,e,t){const n="#141414",i="#ffffff",s=[],a=K1t(r,"Q"),o=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:v,y:C})=>{const R=(a.length-V0)*o*v,k=(a.length-V0)*o*C,P=.45;for(let N=0;N`)}});const u=Math.floor((t+25)/o),f=a.length/2-u/2,h=a.length/2+u/2-1,m=[];a.forEach((v,C)=>{v.forEach((R,k)=>{if(a[C][k]&&!(Ca.length-(V0+1)&&ka.length-(V0+1))&&!(C>f&&Cf&&k{b[v]?b[v].push(C):b[v]=[C]}),Object.entries(b).map(([v,C])=>{const R=C.filter(k=>C.every(P=>!mH(k,P,o)));return[Number(v),R]}).forEach(([v,C])=>{C.forEach(R=>{s.push(ws``)})}),Object.entries(b).filter(([v,C])=>C.length>1).map(([v,C])=>{const R=C.filter(k=>C.some(P=>mH(k,P,o)));return[Number(v),R]}).map(([v,C])=>{C.sort((k,P)=>kN.some($=>mH(k,$,o)));P?P.push(k):R.push([k])}return[v,R.map(k=>[k[0],k[k.length-1]])]}).forEach(([v,C])=>{C.forEach(([R,k])=>{s.push(ws``)})}),s}},J1t=qn`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Y1t=Object.defineProperty,Q1t=Object.getOwnPropertyDescriptor,I5=(r,e,t,n)=>{for(var i=n>1?void 0:n?Q1t(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Y1t(e,t,i),i};let G0=class extends dn{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e=pm.state.themeMode==="light"?this.size:this.size-18*2;return ws`${Z1t.generate(this.uri,e,e/4)}`}render(){const r={"wcm-dark":pm.state.themeMode==="dark"};return Yt`
      ${this.walletId||this.imageUrl?Yt``:ei.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
      `}};G0.styles=[xn.globalCss,J1t],I5([tn()],G0.prototype,"uri",2),I5([tn({type:Number})],G0.prototype,"size",2),I5([tn()],G0.prototype,"imageId",2),I5([tn()],G0.prototype,"walletId",2),I5([tn()],G0.prototype,"imageUrl",2),G0=I5([Tn("wcm-qrcode")],G0);const X1t=qn`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var emt=Object.defineProperty,tmt=Object.getOwnPropertyDescriptor,ive=(r,e,t,n)=>{for(var i=n>1?void 0:n?tmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&emt(e,t,i),i};let kR=class extends dn{constructor(){super(...arguments),this.onChange=()=>null}render(){return Yt` ${ei.SEARCH_ICON}`}};kR.styles=[xn.globalCss,X1t],ive([tn()],kR.prototype,"onChange",2),kR=ive([Tn("wcm-search-input")],kR);const rmt=qn`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var nmt=Object.defineProperty,imt=Object.getOwnPropertyDescriptor,smt=(r,e,t,n)=>{for(var i=n>1?void 0:n?imt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&nmt(e,t,i),i};let gH=class extends dn{render(){return Yt``}};gH.styles=[xn.globalCss,rmt],gH=smt([Tn("wcm-spinner")],gH);const amt=qn`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var omt=Object.defineProperty,cmt=Object.getOwnPropertyDescriptor,bH=(r,e,t,n)=>{for(var i=n>1?void 0:n?cmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&omt(e,t,i),i};let Z7=class extends dn{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const r={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return Yt``}};Z7.styles=[xn.globalCss,amt],bH([tn()],Z7.prototype,"variant",2),bH([tn()],Z7.prototype,"color",2),Z7=bH([Tn("wcm-text")],Z7);const lmt=qn`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var umt=Object.defineProperty,fmt=Object.getOwnPropertyDescriptor,wm=(r,e,t,n)=>{for(var i=n>1?void 0:n?fmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&umt(e,t,i),i};let lh=class extends dn{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?Yt`RECENT`:this.installed?Yt`INSTALLED`:null}handleClick(){c2e.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var r;return Yt``}};lh.styles=[xn.globalCss,lmt],wm([tn()],lh.prototype,"onClick",2),wm([tn()],lh.prototype,"name",2),wm([tn()],lh.prototype,"walletId",2),wm([tn()],lh.prototype,"label",2),wm([tn()],lh.prototype,"imageId",2),wm([tn({type:Boolean})],lh.prototype,"installed",2),wm([tn({type:Boolean})],lh.prototype,"recent",2),lh=wm([Tn("wcm-wallet-button")],lh);const dmt=qn`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var hmt=Object.defineProperty,pmt=Object.getOwnPropertyDescriptor,RR=(r,e,t,n)=>{for(var i=n>1?void 0:n?pmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&hmt(e,t,i),i};let T5=class extends dn{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var r;const e=(r=this.imageUrl)!=null&&r.length?this.imageUrl:Hr.getWalletIcon({id:this.walletId,image_id:this.imageId});return Yt`${e.length?Yt`
      ${this.id}
      `:ei.WALLET_PLACEHOLDER}`}};T5.styles=[xn.globalCss,dmt],RR([tn()],T5.prototype,"walletId",2),RR([tn()],T5.prototype,"imageId",2),RR([tn()],T5.prototype,"imageUrl",2),T5=RR([Tn("wcm-wallet-image")],T5);var mmt=Object.defineProperty,gmt=Object.getOwnPropertyDescriptor,sve=(r,e,t,n)=>{for(var i=n>1?void 0:n?gmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&mmt(e,t,i),i};let vH=class extends dn{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(r){try{r!=null&&r.length&&await Promise.all(r.map(async e=>Hr.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",r)}}async preloadListings(){if(gl.state.enableExplorer){await Bc.getRecomendedWallets(),Ns.setIsDataLoaded(!0);const{recomendedWallets:r}=Bc.state,e=r.map(t=>Hr.getWalletIcon(t));await this.loadImages(e)}else Ns.setIsDataLoaded(!0)}async preloadCustomImages(){const r=Hr.getCustomImageUrls();await this.loadImages(r)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(r){console.error(r),mm.openToast("Failed preloading","error")}}};sve([Lc()],vH.prototype,"preload",2),vH=sve([Tn("wcm-explorer-context")],vH);var bmt=Object.defineProperty,vmt=Object.getOwnPropertyDescriptor,wmt=(r,e,t,n)=>{for(var i=n>1?void 0:n?vmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&bmt(e,t,i),i};let ave=class extends dn{constructor(){super(),this.unsubscribeTheme=void 0,xn.setTheme(),this.unsubscribeTheme=pm.subscribe(xn.setTheme)}disconnectedCallback(){var r;(r=this.unsubscribeTheme)==null||r.call(this)}};ave=wmt([Tn("wcm-theme-context")],ave);const ymt=qn`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var xmt=Object.defineProperty,_mt=Object.getOwnPropertyDescriptor,Emt=(r,e,t,n)=>{for(var i=n>1?void 0:n?_mt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&xmt(e,t,i),i};let wH=class extends dn{onGoToQrcode(){ls.push("Qrcode")}render(){const{recomendedWallets:r}=Bc.state,e=[...r,...r],t=fr.RECOMMENDED_WALLET_AMOUNT*2;return Yt`
      ${ei.MOBILE_ICON}WalletConnect
      ${[...Array(t)].map((n,i)=>{const s=e[i%e.length];return s?Yt``:ei.WALLET_PLACEHOLDER})}
      Select Wallet
      Choose WalletConnect to see supported apps on your device`}};wH.styles=[xn.globalCss,ymt],wH=Emt([Tn("wcm-android-wallet-selection")],wH);const Cmt=qn`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Amt=Object.defineProperty,Smt=Object.getOwnPropertyDescriptor,k5=(r,e,t,n)=>{for(var i=n>1?void 0:n?Smt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Amt(e,t,i),i};let ym=class extends dn{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var r,e;const s=(e=(r=pm.state.themeVariables)==null?void 0:r["--wcm-wallet-icon-large-border-radius"])!=null?e:xn.getPreset("--wcm-wallet-icon-large-border-radius");let a=0;s.includes("%")?a=88/100*parseInt(s,10):a=parseInt(s,10),a*=1.17;const o=317-a*1.57,l=425-a*1.8;return Yt``}render(){const r={"wcm-error":this.isError,"wcm-stale":this.isStale};return Yt`
      ${this.svgLoaderTemplate()}
      ${this.isError?"Connection declined":this.label}`}};ym.styles=[xn.globalCss,Cmt],k5([tn()],ym.prototype,"walletId",2),k5([tn()],ym.prototype,"imageId",2),k5([tn({type:Boolean})],ym.prototype,"isError",2),k5([tn({type:Boolean})],ym.prototype,"isStale",2),k5([tn()],ym.prototype,"label",2),ym=k5([Tn("wcm-connector-waiting")],ym);const R5={manualWallets(){var r,e;const{mobileWallets:t,desktopWallets:n}=gl.state,i=(r=R5.recentWallet())==null?void 0:r.id,s=fr.isMobile()?t:n,a=s==null?void 0:s.filter(o=>i!==o.id);return(e=fr.isMobile()?a==null?void 0:a.map(({id:o,name:l,links:u})=>({id:o,name:l,mobile:u,links:u})):a==null?void 0:a.map(({id:o,name:l,links:u})=>({id:o,name:l,desktop:u,links:u})))!=null?e:[]},recentWallet(){return Hr.getRecentWallet()},recomendedWallets(r=!1){var e;const t=r||(e=R5.recentWallet())==null?void 0:e.id,{recomendedWallets:n}=Bc.state;return n.filter(s=>t!==s.id)}},xm={onConnecting(r){Hr.goToConnectingView(r)},manualWalletsTemplate(){return R5.manualWallets().map(e=>Yt``)},recomendedWalletsTemplate(r=!1){return R5.recomendedWallets(r).map(t=>Yt``)},recentWalletTemplate(){const r=R5.recentWallet();if(r)return Yt``}},Imt=qn`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var Tmt=Object.defineProperty,kmt=Object.getOwnPropertyDescriptor,Rmt=(r,e,t,n)=>{for(var i=n>1?void 0:n?kmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Tmt(e,t,i),i};let yH=class extends dn{render(){const{explorerExcludedWalletIds:r,enableExplorer:e}=gl.state,t=r!=="ALL"&&e,n=xm.manualWalletsTemplate(),i=xm.recomendedWalletsTemplate();let a=[xm.recentWalletTemplate(),...n,...i];a=a.filter(Boolean);const o=a.length>4||t;let l=[];o?l=a.slice(0,3):l=a;const u=!!l.length;return Yt`
      ${ei.MOBILE_ICON}Mobile
      ${ei.SCAN_ICON}Scan with your wallet
      ${u?Yt`
      ${ei.DESKTOP_ICON}Desktop
      ${l} ${o?Yt``:null}
      `:null}`}};yH.styles=[xn.globalCss,Imt],yH=Rmt([Tn("wcm-desktop-wallet-selection")],yH);const Mmt=qn`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Pmt=Object.defineProperty,Omt=Object.getOwnPropertyDescriptor,Nmt=(r,e,t,n)=>{for(var i=n>1?void 0:n?Omt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Pmt(e,t,i),i};let xH=class extends dn{render(){const{termsOfServiceUrl:r,privacyPolicyUrl:e}=gl.state;return r??e?Yt`
      By connecting your wallet to this app, you agree to the app's ${r?Yt`Terms of Service`:null} ${r&&e?"and":null} ${e?Yt`Privacy Policy`:null}
      `:null}};xH.styles=[xn.globalCss,Mmt],xH=Nmt([Tn("wcm-legal-notice")],xH);const Dmt=qn`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var $mt=Object.defineProperty,Bmt=Object.getOwnPropertyDescriptor,Lmt=(r,e,t,n)=>{for(var i=n>1?void 0:n?Bmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&$mt(e,t,i),i};let _H=class extends dn{onQrcode(){ls.push("Qrcode")}render(){const{explorerExcludedWalletIds:r,enableExplorer:e}=gl.state,t=r!=="ALL"&&e,n=xm.manualWalletsTemplate(),i=xm.recomendedWalletsTemplate();let a=[xm.recentWalletTemplate(),...n,...i];a=a.filter(Boolean);const o=a.length>8||t;let l=[];o?l=a.slice(0,7):l=a;const u=!!l.length;return Yt`${u?Yt`
      ${l} ${o?Yt``:null}
      `:null}`}};_H.styles=[xn.globalCss,Dmt],_H=Lmt([Tn("wcm-mobile-wallet-selection")],_H);const Umt=qn`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var Fmt=Object.defineProperty,jmt=Object.getOwnPropertyDescriptor,EH=(r,e,t,n)=>{for(var i=n>1?void 0:n?jmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Fmt(e,t,i),i};let M5=class extends dn{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=l2.subscribe(r=>{r.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var r;(r=this.unsubscribeModal)==null||r.call(this)}get overlayEl(){return Hr.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return Hr.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(r){if(document.querySelector("body"))if(r){const t=document.getElementById("wcm-styles");t==null||t.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(r){r.target===r.currentTarget&&l2.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const r=Hr.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,t=.2;await Promise.all([m2(this.overlayEl,{opacity:[0,1]},{delay:e,duration:t}).finished,m2(this.containerEl,r,{delay:e,duration:t}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const r=Hr.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([m2(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,m2(this.containerEl,r,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",r=>{var e;r.key==="Escape"?l2.close():r.key==="Tab"&&((e=r.target)!=null&&e.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var r;(r=this.abortController)==null||r.abort(),this.abortController=void 0}render(){const r={"wcm-overlay":!0,"wcm-active":this.active};return Yt`
      ${this.open?Yt`
      `:null}
      `}};M5.styles=[xn.globalCss,Umt],EH([Lc()],M5.prototype,"open",2),EH([Lc()],M5.prototype,"active",2),M5=EH([Tn("wcm-modal")],M5);const zmt=qn`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var Hmt=Object.defineProperty,qmt=Object.getOwnPropertyDescriptor,J7=(r,e,t,n)=>{for(var i=n>1?void 0:n?qmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Hmt(e,t,i),i};let b2=class extends dn{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){fr.isMobile()?ls.replace("MobileConnecting"):ls.replace("MobileQrcodeConnecting")}onDesktop(){ls.replace("DesktopConnecting")}onWeb(){ls.replace("WebConnecting")}render(){return Yt`
      ${this.isRetry?Yt``:null} ${this.isMobile?Yt`Mobile`:null} ${this.isDesktop?Yt`Desktop`:null} ${this.isWeb?Yt`Web`:null}
      `}};b2.styles=[xn.globalCss,zmt],J7([tn({type:Boolean})],b2.prototype,"isMobile",2),J7([tn({type:Boolean})],b2.prototype,"isDesktop",2),J7([tn({type:Boolean})],b2.prototype,"isWeb",2),J7([tn({type:Boolean})],b2.prototype,"isRetry",2),b2=J7([Tn("wcm-platform-selection")],b2);const Wmt=qn`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Vmt=Object.defineProperty,Gmt=Object.getOwnPropertyDescriptor,Kmt=(r,e,t,n)=>{for(var i=n>1?void 0:n?Gmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Vmt(e,t,i),i};let CH=class extends dn{onClick(){ls.push("WalletExplorer")}render(){const{recomendedWallets:r}=Bc.state,e=R5.manualWallets(),t=[...r,...e].reverse().slice(0,4);return Yt``}};CH.styles=[xn.globalCss,Wmt],CH=Kmt([Tn("wcm-view-all-wallets-button")],CH);const Zmt=qn`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Jmt=Object.defineProperty,Ymt=Object.getOwnPropertyDescriptor,MR=(r,e,t,n)=>{for(var i=n>1?void 0:n?Ymt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Jmt(e,t,i),i};let P5=class extends dn{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:r}=Ns.state;this.uri=r},0)}get overlayEl(){return Hr.getShadowRootElement(this,".wcm-qr-container")}render(){return Yt`
      ${this.uri?Yt``:Yt``}
      `}};P5.styles=[xn.globalCss,Zmt],MR([tn()],P5.prototype,"walletId",2),MR([tn()],P5.prototype,"imageId",2),MR([Lc()],P5.prototype,"uri",2),P5=MR([Tn("wcm-walletconnect-qr")],P5);var Qmt=Object.defineProperty,Xmt=Object.getOwnPropertyDescriptor,egt=(r,e,t,n)=>{for(var i=n>1?void 0:n?Xmt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Qmt(e,t,i),i};let AH=class extends dn{viewTemplate(){return fr.isAndroid()&&!fr.isTelegram()?Yt``:fr.isMobile()?Yt``:Yt``}render(){return Yt`${this.viewTemplate()}`}};AH.styles=[xn.globalCss],AH=egt([Tn("wcm-connect-wallet-view")],AH);const tgt=qn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var rgt=Object.defineProperty,ngt=Object.getOwnPropertyDescriptor,ove=(r,e,t,n)=>{for(var i=n>1?void 0:n?ngt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&rgt(e,t,i),i};let PR=class extends dn{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(r){const{desktop:e,name:t}=fr.getWalletRouterData(),n=e==null?void 0:e.native,i=e==null?void 0:e.universal;if(n){const s=fr.formatNativeUrl(n,r,t);fr.openHref(s,"_self")}else if(i){const s=fr.formatUniversalUrl(i,r,t);fr.openHref(s,"_blank")}}openDesktopApp(){const{walletConnectUri:r}=Ns.state,e=fr.getWalletRouterData();Hr.setRecentWallet(e),r&&this.onFormatAndRedirect(r)}render(){const{name:r,id:e,image_id:t}=fr.getWalletRouterData(),{isMobile:n,isWeb:i}=Hr.getCachedRouterWalletPlatforms();return Yt`${`Connection can continue loading if ${r} is not installed on your device`}Retry`}};PR.styles=[xn.globalCss,tgt],ove([Lc()],PR.prototype,"isError",2),PR=ove([Tn("wcm-desktop-connecting-view")],PR);const igt=qn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var sgt=Object.defineProperty,agt=Object.getOwnPropertyDescriptor,ogt=(r,e,t,n)=>{for(var i=n>1?void 0:n?agt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&sgt(e,t,i),i};let SH=class extends dn{onInstall(r){r&&fr.openHref(r,"_blank")}render(){const{name:r,id:e,image_id:t,homepage:n}=fr.getWalletRouterData();return Yt`${`Download ${r} to continue. If multiple browser extensions are installed, disable non ${r} ones and try again`}Download`}};SH.styles=[xn.globalCss,igt],SH=ogt([Tn("wcm-install-wallet-view")],SH);const cgt=qn`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var lgt=Object.defineProperty,ugt=Object.getOwnPropertyDescriptor,cve=(r,e,t,n)=>{for(var i=n>1?void 0:n?ugt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&lgt(e,t,i),i};let OR=class extends dn{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(r,e=!1){const{mobile:t,name:n}=fr.getWalletRouterData(),i=t==null?void 0:t.native,s=t==null?void 0:t.universal,a=fr.isTelegram()?"_blank":"_self";if(r=fr.isTelegram()&&fr.isAndroid()?encodeURIComponent(r):r,i&&!e){const o=fr.formatNativeUrl(i,r,n);fr.openHref(o,a)}else if(s){const o=fr.formatUniversalUrl(s,r,n);fr.openHref(o,a)}}openMobileApp(r=!1){const{walletConnectUri:e}=Ns.state,t=fr.getWalletRouterData();e&&this.onFormatAndRedirect(e,r),Hr.setRecentWallet(t)}onGoToAppStore(r){r&&fr.openHref(r,"_blank")}render(){const{name:r,id:e,image_id:t,app:n,mobile:i}=fr.getWalletRouterData(),{isWeb:s}=Hr.getCachedRouterWalletPlatforms(),a=n==null?void 0:n.ios,o=i==null?void 0:i.universal;return Yt`Retry${o?Yt`Still doesn't work? Try this alternate link`:null}
      ${`Get ${r}`}
      App Store
      `}};OR.styles=[xn.globalCss,cgt],cve([Lc()],OR.prototype,"isError",2),OR=cve([Tn("wcm-mobile-connecting-view")],OR);const fgt=qn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var dgt=Object.defineProperty,hgt=Object.getOwnPropertyDescriptor,pgt=(r,e,t,n)=>{for(var i=n>1?void 0:n?hgt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&dgt(e,t,i),i};let IH=class extends dn{render(){const{name:r,id:e,image_id:t}=fr.getWalletRouterData(),{isDesktop:n,isWeb:i}=Hr.getCachedRouterWalletPlatforms();return Yt`${`Scan this QR Code with your phone's camera or inside ${r} app`}`}};IH.styles=[xn.globalCss,fgt],IH=pgt([Tn("wcm-mobile-qr-connecting-view")],IH);var mgt=Object.defineProperty,ggt=Object.getOwnPropertyDescriptor,bgt=(r,e,t,n)=>{for(var i=n>1?void 0:n?ggt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&mgt(e,t,i),i};let TH=class extends dn{render(){return Yt``}};TH.styles=[xn.globalCss],TH=bgt([Tn("wcm-qrcode-view")],TH);const vgt=qn`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var wgt=Object.defineProperty,ygt=Object.getOwnPropertyDescriptor,Y7=(r,e,t,n)=>{for(var i=n>1?void 0:n?ygt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&wgt(e,t,i),i};const kH=40;let v2=class extends dn{constructor(){super(...arguments),this.loading=!Bc.state.wallets.listings.length,this.firstFetch=!Bc.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=Hr.debounce(r=>{r.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=r,Bc.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),Bc.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var r;(r=this.intersectionObserver)==null||r.disconnect()}get placeholderEl(){return Hr.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([r])=>{r.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:r,search:e}=Bc.state,{listings:t,total:n}=this.search?e:r;return n<=kH||t.length>=n}async fetchWallets(){var r;const{wallets:e,search:t}=Bc.state,{listings:n,total:i,page:s}=this.search?t:e;if(!this.endReached&&(this.firstFetch||i>kH&&n.lengthHr.getWalletIcon(u));await Promise.all([...l.map(async u=>Hr.preloadImage(u)),fr.wait(300)]),this.endReached=this.isLastPage()}catch(a){console.error(a),mm.openToast(Hr.getErrorMessage(a),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(r){fr.isAndroid()?Hr.handleMobileLinking(r):Hr.goToConnectingView(r)}onSearchChange(r){const{value:e}=r.target;this.searchDebounce(e)}render(){const{wallets:r,search:e}=Bc.state,{listings:t}=this.search?e:r,n=this.loading&&!t.length,i=this.search.length>=3;let s=xm.manualWalletsTemplate(),a=xm.recomendedWalletsTemplate(!0);i&&(s=s.filter(({values:u})=>Hr.caseSafeIncludes(u[0],this.search)),a=a.filter(({values:u})=>Hr.caseSafeIncludes(u[0],this.search)));const o=!this.loading&&!t.length&&!a.length,l={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":o};return Yt`
      ${n?null:s} ${n?null:a} ${n?null:t.map(u=>Yt`${u?Yt``:null}`)}
      ${o?Yt`No results found`:null} ${!o&&this.loading?Yt``:null}
      `}};v2.styles=[xn.globalCss,vgt],Y7([Lc()],v2.prototype,"loading",2),Y7([Lc()],v2.prototype,"firstFetch",2),Y7([Lc()],v2.prototype,"search",2),Y7([Lc()],v2.prototype,"endReached",2),v2=Y7([Tn("wcm-wallet-explorer-view")],v2);const xgt=qn`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var _gt=Object.defineProperty,Egt=Object.getOwnPropertyDescriptor,lve=(r,e,t,n)=>{for(var i=n>1?void 0:n?Egt(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&_gt(e,t,i),i};let NR=class extends dn{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(r){const{desktop:e,name:t}=fr.getWalletRouterData(),n=e==null?void 0:e.universal;if(n){const i=fr.formatUniversalUrl(n,r,t);fr.openHref(i,"_blank")}}openWebWallet(){const{walletConnectUri:r}=Ns.state,e=fr.getWalletRouterData();Hr.setRecentWallet(e),r&&this.onFormatAndRedirect(r)}render(){const{name:r,id:e,image_id:t}=fr.getWalletRouterData(),{isMobile:n,isDesktop:i}=Hr.getCachedRouterWalletPlatforms(),s=fr.isMobile();return Yt`${`${r} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};NR.styles=[xn.globalCss,xgt],lve([Lc()],NR.prototype,"isError",2),NR=lve([Tn("wcm-web-connecting-view")],NR);const Cgt=Object.freeze(Object.defineProperty({__proto__:null,get WcmModal(){return M5},get WcmQrCode(){return G0}},Symbol.toStringTag,{value:"Module"}));qr.Provider=t0,qr.assets=eMe,qr.browser=q0t,qr.ethers=q7e,qr.models=rMe,qr.networks=lS,qr.services=iMe,qr.types=qve,qr.utils=U5e,Object.defineProperty(qr,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=evm-chains-provider.js.map diff --git a/assets/js/evm-chains-provider.js.map b/assets/js/evm-chains-provider.js.map index 01c1de6..6316016 100644 --- a/assets/js/evm-chains-provider.js.map +++ b/assets/js/evm-chains-provider.js.map @@ -1 +1 @@ -{"version":3,"file":"index.umd.js","sources":["../node_modules/.pnpm/@multiplechain+types@0.1.68/node_modules/@multiplechain/types/src/enums.ts","../node_modules/.pnpm/@multiplechain+types@0.1.68/node_modules/@multiplechain/types/src/services/TransactionListenerInterface.ts","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_vite@5.1.4/node_modules/vite-plugin-node-polyfills/shims/global/dist/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/bind.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/utils.js","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_vite@5.1.4/node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/AxiosError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/null.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/toFormData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/buildURL.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/InterceptorManager.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/defaults/transitional.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/Blob.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/common/utils.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/defaults/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/transformData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/isCancel.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/CanceledError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/settle.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/cookies.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/combineURLs.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/buildFullPath.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/speedometer.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/adapters/xhr.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/adapters/adapters.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/dispatchRequest.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/mergeConfig.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/env/data.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/validator.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/Axios.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/CancelToken.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/spread.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/HttpStatusCode.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/axios.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/ethereum-cryptography@2.1.3/node_modules/ethereum-cryptography/esm/utils.js","../node_modules/.pnpm/ethereum-cryptography@2.1.3/node_modules/ethereum-cryptography/esm/keccak.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/error_codes.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/web3_error_base.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/utils_errors.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/rpc_errors.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/schema_errors.js","../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/errors.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/constants.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/abi.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/string.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/utils.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/bytes.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/address.js","../node_modules/.pnpm/web3-types@1.5.0/node_modules/web3-types/lib/esm/data_format_types.js","../node_modules/.pnpm/web3-types@1.5.0/node_modules/web3-types/lib/esm/eth_types.js","../node_modules/.pnpm/web3-types@1.5.0/node_modules/web3-types/lib/esm/web3_base_provider.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/numbers.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/block.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/bloom.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/boolean.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/object.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/topic.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/filter.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/formats.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validator.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/web3_validator.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/default_validator.js","../node_modules/.pnpm/web3-utils@4.2.2/node_modules/web3-utils/lib/esm/uint8array.js","../node_modules/.pnpm/web3-utils@4.2.2/node_modules/web3-utils/lib/esm/converters.js","../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js","../node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.mjs","../node_modules/.pnpm/ws@8.16.0/node_modules/ws/browser.js","../node_modules/.pnpm/@multiplechain+utils@0.1.21/node_modules/@multiplechain/utils/src/index.ts","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/_version.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/properties.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/errors.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/data.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/maths.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/base58.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/base64-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/events.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/utf8.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/geturl-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/fetch.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/fixednumber.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/rlp-decode.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/rlp-encode.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/units.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/utils/uuid.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/abstract-coder.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/pbkdf2.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha512.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/crypto-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/hmac.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/keccak.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/ripemd160.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/ripemd160.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/pbkdf2.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/random.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/scrypt.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/scrypt.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/sha2.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/constants/addresses.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/constants/hashes.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/constants/numbers.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/constants/strings.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/signature.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/signing-key.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/crypto/index.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/address/address.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/address/contract-address.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/address/checks.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/typed.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/address.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/anonymous.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/array.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/boolean.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/bytes.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/fixed-bytes.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/null.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/number.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/string.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/coders/tuple.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/hash/id.js","../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.mjs","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/hash/namehash.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/transaction/accesslist.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/transaction/address.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/transaction/transaction.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/hash/message.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/hash/solidity.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/hash/typed-data.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/fragments.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/abi-coder.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/bytes32.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/abi/interface.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/contract/wrappers.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/contract/contract.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/contract/factory.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/ens-resolver.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/format.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/plugins-network.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/network.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/subscriber-polling.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/abstract-provider.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/abstract-signer.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/community.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/subscriber-filterid.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-jsonrpc.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-ankr.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-alchemy.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-cloudflare.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-etherscan.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/ws-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-socket.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-websocket.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-infura.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-quicknode.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-fallback.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/default-provider.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/signer-noncemanager.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-pocket.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/providers/provider-ipcsocket-browser.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/base-wallet.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/decode-owl.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/wordlist.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/wordlist-owl.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/lang-en.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/mnemonic.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/aes.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode-cbc.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode-ctr.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/padding.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/utils.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/json-keystore.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/hdwallet.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/json-crowdsale.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wallet/wallet.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/bit-reader.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/decode-owla.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/wordlist-owla.js","../node_modules/.pnpm/ethers@6.11.1/node_modules/ethers/lib.esm/wordlists/wordlists-browser.js","../src/services/Ethers.ts","../src/services/Provider.ts","../src/browser/Wallet.ts","../node_modules/.pnpm/@wagmi+chains@1.8.0/node_modules/@wagmi/chains/dist/index.mjs","../src/services/Networks.ts","../src/browser/adapters/switcher.ts","../src/browser/adapters/icons.ts","../src/browser/adapters/Phantom.ts","../src/browser/adapters/MetaMask.ts","../src/assets/Contract.ts","../src/services/TransactionSigner.ts","../src/assets/NFT.ts","../src/assets/Coin.ts","../src/assets/Token.ts","../src/models/Transaction.ts","../src/models/ContractTransaction.ts","../src/models/NftTransaction.ts","../src/models/CoinTransaction.ts","../src/models/TokenTransaction.ts","../src/services/TransactionListener.ts","../node_modules/.pnpm/proxy-compare@2.5.1/node_modules/proxy-compare/dist/index.modern.js","../node_modules/.pnpm/valtio@1.11.2_react@18.2.0/node_modules/valtio/esm/vanilla.mjs","../node_modules/.pnpm/valtio@1.11.2_react@18.2.0/node_modules/valtio/esm/vanilla/utils.mjs","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/CoreHelperUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/FetchUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/OptionsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/BlockchainApiController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/SnackController.js","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_vite@5.1.4/node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/StorageUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/EventsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/TransactionsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConnectionController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/PublicStateController.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/updateLocale.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/relativeTime.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/DateUtil.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/NetworkUtil.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/NumberUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/NetworkController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/ConvertApiUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/RouterController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConvertController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/AccountController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/AssetController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ThemeController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConnectorController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ApiController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ModalController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/OnRampController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/SendController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/AssetUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/RouterUtil.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/lit-html.js","../node_modules/.pnpm/lit-element@4.0.5/node_modules/lit-element/lit-element.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/convert-input-mask-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/convert-input-mask-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/ThemeUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/WebComponentsUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-card/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-card/index.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-icon/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/all-wallets.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-bottom-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/app-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/apple.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-left.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-right.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/checkmark.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-left.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-right.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chrome-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/clock.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/close.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/coinPlaceholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/compass.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/copy.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/add.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/cursor.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/desktop.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/disconnect.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/discord.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/etherscan.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/extension.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/external-link.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/facebook.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/filters.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/github.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/google.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/help-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/info-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/mail.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/mobile.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/network-placeholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/nftPlaceholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/off.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/play-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/qr-code.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/refresh.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/search.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/send.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalBold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalMedium.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalRoundedBold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapVertical.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/telegram.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitch.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitter.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitterIcon.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/verify.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/verify-filled.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/wallet-placeholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/wallet.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/walletconnect.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/warning-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/recycle-horizontal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/bank.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/card.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/plus.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/cursor-transparent.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/checkmark-bold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-icon/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-hexagon/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-hexagon/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-spinner/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-spinner/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-thumbnail/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-thumbnail/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-shimmer/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-shimmer/index.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/directive.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/directives/class-map.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-text/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-text/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/dao.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/defi.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/defiAlt.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/eth.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/layers.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/lock.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/login.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/network.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/nft.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/noun.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/profile.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/system.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/coinbase.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/moonpay.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/stripe.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/paypal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/onramp-card.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/google.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/pencil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/lightbulb.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-visual/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-visual/index.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/directives/if-defined.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/UiHelperUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-flex/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-flex/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-avatar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-avatar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-box/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-box/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-account-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-account-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-wallet-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-wallet-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-all-wallets-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-all-wallets-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkMd.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select-loader/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select-loader/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkSm.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkLg.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-connect-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-connect-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-cta-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-cta-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group-item/index.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/directive-helpers.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/async-directive.js","../node_modules/.pnpm/lit-html@3.1.3/node_modules/lit-html/directives/ref.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-text/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-text/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-email-input/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-email-input/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-link/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-link/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-element/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-element/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-numeric/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-numeric/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-link/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-link/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/TypeUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-visual/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-visual/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item-loader/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item-loader/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tag/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tag/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-otp/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-otp/index.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js","../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js","../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/QrCode.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-qr-code/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-qr-code/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-search-bar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-search-bar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-snackbar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-snackbar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tabs/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tabs/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-visual-thumbnail/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-visual-thumbnail/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-notice-card/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-notice-card/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-accordion/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-accordion/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-content/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-content/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-network/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-network/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet-transaction/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet-transaction/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-activity-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-activity-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-provider-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-provider-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-promo/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-promo/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-balance/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-balance/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-profile-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-profile-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-compatible-network/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-compatible-network/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-banner/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-banner/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-token/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-token/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-description/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-description/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-amount/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-amount/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-preview-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-preview-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-grid/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-grid/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-separator/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-separator/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/MathUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/TransactionUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-account-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-button/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-connect-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-modal/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-modal/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-network-button/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-network-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-router/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-router/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-onramp-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-onramp-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-settings-view/styles.js","../node_modules/.pnpm/@web3modal+polyfills@4.1.11/node_modules/@web3modal/polyfills/dist/esm/index.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameConstants.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameSchema.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameStorage.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/RegexUtil.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameHelpers.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrame.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameProvider.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-settings-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-all-wallets-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-buy-in-progress-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-buy-in-progress-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connect-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/PresetsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/HelpersUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connect-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-connecting-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-connecting-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connecting-external-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connecting-wc-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-downloads-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-get-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-network-switch-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-network-switch-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-networks-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-networks-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-activity-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-activity-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-fiat-select-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-fiat-select-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-providers-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-tokens-select-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-tokens-select-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-preview-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-preview-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-select-token-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-select-token-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-transactions-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-transactions-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-network-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-buy-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-email-otp-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-email-otp-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-device-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-device-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-approve-transaction-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-approve-transaction-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-upgrade-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-upgrade-to-smart-account-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-wallet-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-primary-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-secondary-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-unsupported-chain-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-unsupported-chain-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-receive-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-receive-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-compatible-networks-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-compatible-networks-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-select-token-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-select-token-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-preview-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-preview-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-list/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/markWalletsAsInstalled.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-list/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-search/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-search/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-header/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-browser/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-desktop/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-mobile/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-qrcode/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-qrcode/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-unsupported/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-web/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-details/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-details/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-input/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-input/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-header/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-header/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-help-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-swap-input/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-swap-input/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-legal-footer/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-legal-footer/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-mobile-download-links/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-mobile-download-links/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-onramp-providers-footer/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-onramp-providers-footer/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-snackbar/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-snackbar/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-email-login-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-email-login-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-default-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-default-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-wallet-features-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-wallet-features-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-activity-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-activity-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-nfts-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-nfts-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-tokens-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-tokens-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-activity-list/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-activity-list/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-token/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-token/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-address/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-address/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-wallet-send-details/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-wallet-send-details/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/client.js","../../../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js","../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js","../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js","../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js","../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js","../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js","../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js","../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js","../node_modules/.pnpm/@stablelib+hash@1.0.1/node_modules/@stablelib/hash/lib/hash.js","../node_modules/.pnpm/@stablelib+hmac@1.0.1/node_modules/@stablelib/hmac/lib/hmac.js","../node_modules/.pnpm/@stablelib+hkdf@1.0.1/node_modules/@stablelib/hkdf/lib/hkdf.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js","../../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../../node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/browser.js","../../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js","../../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","../../../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js","../../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","../../../../node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js","../../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","../../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","../../../../node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js","../../../../node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js","../../../../node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js","../../../../node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","../../../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js","../../../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js","../../../../node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js","../../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js","../../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js","../../../../node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js","../../../../node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js","../../../../node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","../../../../node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js","../../../../node_modules/.pnpm/possible-typed-array-names@1.0.0/node_modules/possible-typed-array-names/index.js","../../../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js","../../../../node_modules/.pnpm/which-typed-array@1.1.14/node_modules/which-typed-array/index.js","../../../../node_modules/.pnpm/is-typed-array@1.1.13/node_modules/is-typed-array/index.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBuffer.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/util.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js","../../../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js","../../../../node_modules/.pnpm/hash-base@3.1.0/node_modules/hash-base/index.js","../../../../node_modules/.pnpm/md5.js@1.3.5/node_modules/md5.js/index.js","../../../../node_modules/.pnpm/ripemd160@2.0.2/node_modules/ripemd160/index.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha256.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha224.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha512.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha384.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/index.js","../../../../node_modules/.pnpm/stream-browserify@3.0.0/node_modules/stream-browserify/index.js","../../../../node_modules/.pnpm/cipher-base@1.0.4/node_modules/cipher-base/index.js","../../../../node_modules/.pnpm/create-hash@1.2.0/node_modules/create-hash/browser.js","../../../../node_modules/.pnpm/create-hmac@1.1.7/node_modules/create-hmac/legacy.js","../../../../node_modules/.pnpm/create-hash@1.2.0/node_modules/create-hash/md5.js","../../../../node_modules/.pnpm/create-hmac@1.1.7/node_modules/create-hmac/browser.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/algos.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/precondition.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/default-encoding.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/to-buffer.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/sync-browser.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/async.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/browser.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/utils.js","../../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/cipher.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/des.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/cbc.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/ede.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des.js","../../../../node_modules/.pnpm/browserify-des@1.0.2/node_modules/browserify-des/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ecb.js","../../../../node_modules/.pnpm/buffer-xor@1.0.3/node_modules/buffer-xor/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cbc.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb8.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb1.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ofb.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/incr32.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ctr.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/aes.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/ghash.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/authCipher.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/streamCipher.js","../../../../node_modules/.pnpm/evp_bytestokey@1.0.3/node_modules/evp_bytestokey/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/encrypter.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/decrypter.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/browser.js","../../../../node_modules/.pnpm/browserify-des@1.0.2/node_modules/browserify-des/modes.js","../../../../node_modules/.pnpm/browserify-cipher@1.0.1/node_modules/browserify-cipher/browser.js","../../../../node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js","../../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js","../../../../node_modules/.pnpm/miller-rabin@4.0.1/node_modules/miller-rabin/lib/mr.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/generatePrime.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/dh.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/browser.js","../../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../../node_modules/.pnpm/browserify-rsa@4.1.0/node_modules/browserify-rsa/index.js","../../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/utils.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/base.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/short.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/mont.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/edwards.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/index.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curves.js","../../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/key.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/signature.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/index.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/key.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/signature.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/index.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic.js","../../../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/reporter.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/buffer.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/node.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/constants/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/pem.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/pem.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/api.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/constants/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/certificate.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/asn1.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/fixProc.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/index.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/sign.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/verify.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/index.js","../../../../node_modules/.pnpm/create-ecdh@4.0.4/node_modules/create-ecdh/browser.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/mgf.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/xor.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/withPublic.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/publicEncrypt.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/privateDecrypt.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/browser.js","../../../../node_modules/.pnpm/randomfill@1.0.4/node_modules/randomfill/browser.js","../../../../node_modules/.pnpm/crypto-browserify@3.12.0/node_modules/crypto-browserify/index.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js","../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js","../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/as-uint8array.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/alloc.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/concat.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/vendor/base-x.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bytes.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/identity.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base2.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base8.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base10.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base16.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base32.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base36.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base58.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base64.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base256emoji.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/codecs/json.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/to-string.js","../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/delay.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/misc.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/time.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/convert.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/watch.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/watch.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+window-getters@1.0.1/node_modules/@walletconnect/window-getters/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+window-metadata@1.0.1/node_modules/@walletconnect/window-metadata/dist/cjs/index.js","../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js","../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js","../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js","../node_modules/.pnpm/filter-obj@1.1.0/node_modules/filter-obj/index.js","../node_modules/.pnpm/query-string@7.1.3/node_modules/query-string/index.js","../node_modules/.pnpm/@walletconnect+relay-api@1.0.10/node_modules/@walletconnect/relay-api/dist/index.es.js","../node_modules/.pnpm/@walletconnect+utils@2.11.1/node_modules/@walletconnect/utils/dist/index.es.js","../node_modules/.pnpm/destr@2.0.3/node_modules/destr/dist/index.mjs","../node_modules/.pnpm/unstorage@1.10.2_idb-keyval@6.2.1/node_modules/unstorage/dist/shared/unstorage.8581f561.mjs","../node_modules/.pnpm/unstorage@1.10.2_idb-keyval@6.2.1/node_modules/unstorage/dist/index.mjs","../node_modules/.pnpm/idb-keyval@6.2.1/node_modules/idb-keyval/dist/index.js","../node_modules/.pnpm/@walletconnect+safe-json@1.0.2/node_modules/@walletconnect/safe-json/dist/esm/index.js","../node_modules/.pnpm/@walletconnect+keyvaluestorage@1.1.1/node_modules/@walletconnect/keyvaluestorage/dist/index.es.js","../node_modules/.pnpm/@walletconnect+events@1.0.1/node_modules/@walletconnect/events/dist/esm/events.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/types/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/types/index.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/constants/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/constants/index.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/index.js","../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js","../node_modules/.pnpm/pino@7.11.0/node_modules/pino/browser.js","../node_modules/.pnpm/@walletconnect+logger@2.1.2/node_modules/@walletconnect/logger/dist/index.es.js","../node_modules/.pnpm/@walletconnect+types@2.11.1/node_modules/@walletconnect/types/dist/index.es.js","../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js","../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/constants.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/utils.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/api.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/constants.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/error.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/format.js","../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.3/node_modules/@walletconnect/jsonrpc-types/dist/esm/misc.js","../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.3/node_modules/@walletconnect/jsonrpc-types/dist/esm/provider.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/url.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/validators.js","../node_modules/.pnpm/@walletconnect+jsonrpc-provider@1.0.13/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js","../node_modules/.pnpm/@walletconnect+jsonrpc-ws-connection@1.0.14/node_modules/@walletconnect/jsonrpc-ws-connection/dist/index.es.js","../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js","../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js","../node_modules/.pnpm/isomorphic-unfetch@3.1.0/node_modules/isomorphic-unfetch/browser.js","../node_modules/.pnpm/@walletconnect+core@2.11.1/node_modules/@walletconnect/core/dist/index.es.js","../node_modules/.pnpm/@walletconnect+sign-client@2.11.1/node_modules/@walletconnect/sign-client/dist/index.es.js","../node_modules/.pnpm/cross-fetch@3.1.8/node_modules/cross-fetch/dist/browser-ponyfill.js","../node_modules/.pnpm/@walletconnect+jsonrpc-http-connection@1.0.7/node_modules/@walletconnect/jsonrpc-http-connection/dist/esm/http.js","../node_modules/.pnpm/@walletconnect+universal-provider@2.11.1/node_modules/@walletconnect/universal-provider/dist/index.es.js","../node_modules/.pnpm/@walletconnect+ethereum-provider@2.11.1_react@18.2.0/node_modules/@walletconnect/ethereum-provider/dist/index.es.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersHelpersUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersStoreUtil.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_ethers@6.11.1_react@18.2.0/node_modules/@web3modal/ethers/dist/esm/src/client.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/assets/wallet-logo.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/constants.js","../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/constants.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/utils.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/errors.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/type/Web3Response.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/version.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/serialize.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/type.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/util.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/ScopedLocalStorage.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/DiagnosticLogger.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/RelayAbstract.js","../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha256.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha224.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha512.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha384.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/Session.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/Cipher.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkHTTP.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkWebSocket.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkConnection.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/cssReset-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/cssReset.js","../node_modules/.pnpm/preact@10.20.2/node_modules/preact/dist/preact.module.js","../node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js","../node_modules/.pnpm/preact@10.20.2/node_modules/preact/hooks/dist/hooks.module.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/CloseIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/CoinbaseWalletRound.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/QRCodeIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/qrcode-svg/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/QRCode.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Spinner/Spinner-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Spinner/Spinner.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectContent/ConnectContent-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectContent/ConnectContent.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/ArrowLeftIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/LaptopIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/SafeIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/TryExtensionContent/TryExtensionContent-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/TryExtensionContent/TryExtensionContent.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectDialog/ConnectDialog-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectDialog/ConnectDialog.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/LinkFlow/LinkFlow.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/Snackbar-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/Snackbar.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/WalletLinkRelayUI.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/WalletLinkRelay.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/RedirectDialog/RedirectDialog-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/RedirectDialog/RedirectDialog.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/mobile/MobileRelayUI.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/mobile/MobileRelay.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js","../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/keccak.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/shake.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/index.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/keccak-state-unroll.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/keccak.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/js.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/util.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/abi.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/FilterPolyfill.js","../node_modules/.pnpm/json-rpc-random-id@1.0.1/node_modules/json-rpc-random-id/index.js","../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js","../node_modules/.pnpm/@metamask+safe-event-emitter@3.1.1/node_modules/@metamask/safe-event-emitter/dist/cjs/index.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/BaseBlockTracker.js","../node_modules/.pnpm/superstruct@1.0.4/node_modules/superstruct/dist/index.mjs","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/assert.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/base64.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/hex.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/bytes.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/checksum.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/coercers.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/collections.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/encryption-types.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/json.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/keyring.js","../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js","../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/logging.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/misc.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/number.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/opaque.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/time.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/transaction-types.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js","../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js","../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js","../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/simplify.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/subset.js","../node_modules/.pnpm/semver@7.6.0/node_modules/semver/index.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/versions.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/index.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/logging-utils.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/PollingBlockTracker.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/SubscribeBlockTracker.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/index.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/getUniqueId.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/idRemapMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/createAsyncMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/createScaffoldMiddleware.js","../node_modules/.pnpm/@metamask+safe-event-emitter@2.0.0/node_modules/@metamask/safe-event-emitter/index.js","../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/classes.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/error-constants.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/utils.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/errors.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/index.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/JsonRpcEngine.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/mergeMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/index.js","../node_modules/.pnpm/tslib@2.4.0/node_modules/tslib/tslib.es6.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/Semaphore.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/Mutex.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/withTimeout.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/index.js","../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js","../node_modules/.pnpm/eth-query@2.1.2/node_modules/eth-query/index.js","../node_modules/.pnpm/pify@5.0.0/node_modules/pify/index.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/base-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/base-filter-history.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/hexUtils.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/log-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/getBlocksForRange.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/block-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/tx-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/index.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/subscriptionManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/SubscriptionManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/CoinbaseWalletProvider.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/RelayEventManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/CoinbaseWalletSDK.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/index.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_ethers@6.11.1_react@18.2.0/node_modules/@web3modal/ethers/dist/esm/src/utils/defaultConfig.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_ethers@6.11.1_react@18.2.0/node_modules/@web3modal/ethers/dist/esm/exports/index.js","../src/browser/adapters/Web3Modal.ts","../src/browser/adapters/OkxWallet.ts","../src/browser/adapters/XdefiWallet.ts","../src/browser/adapters/TrustWallet.ts","../src/browser/adapters/BitgetWallet.ts","../node_modules/.pnpm/@walletconnect+utils@2.12.2/node_modules/@walletconnect/utils/dist/index.es.js","../node_modules/.pnpm/@walletconnect+types@2.12.2/node_modules/@walletconnect/types/dist/index.es.js","../node_modules/.pnpm/@walletconnect+core@2.12.2/node_modules/@walletconnect/core/dist/index.es.js","../node_modules/.pnpm/@walletconnect+sign-client@2.12.2/node_modules/@walletconnect/sign-client/dist/index.es.js","../node_modules/.pnpm/@walletconnect+universal-provider@2.12.2/node_modules/@walletconnect/universal-provider/dist/index.es.js","../node_modules/.pnpm/@walletconnect+ethereum-provider@2.12.2_react@18.2.0/node_modules/@walletconnect/ethereum-provider/dist/index.es.js","../src/browser/adapters/WalletConnect.ts","../src/browser/index.ts","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/core/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/src/client.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/core/controller/SIWEController.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/styles.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/index.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/views/w3m-connecting-siwe-view/index.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/exports/index.js","../node_modules/.pnpm/@walletconnect+modal-core@2.6.2_react@18.2.0/node_modules/@walletconnect/modal-core/dist/index.js","../node_modules/.pnpm/@walletconnect+modal@2.6.2_react@18.2.0/node_modules/@walletconnect/modal/dist/index.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/css-tag.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/reactive-element.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/lit-html.js","../node_modules/.pnpm/lit-element@3.3.3/node_modules/lit-element/lit-element.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/property.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/state.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directive.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/class-map.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/array.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/clamp.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/defaults.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-number.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-easing-list.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/wrap.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/easing.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/mix.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/noop.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/progress.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/offset.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/interpolate.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-easing-generator.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-function.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-string.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/time.es.js","../node_modules/.pnpm/@motionone+easing@10.17.0/node_modules/@motionone/easing/dist/cubic-bezier.es.js","../node_modules/.pnpm/@motionone+easing@10.17.0/node_modules/@motionone/easing/dist/steps.es.js","../node_modules/.pnpm/@motionone+animation@10.17.0/node_modules/@motionone/animation/dist/utils/easing.es.js","../node_modules/.pnpm/@motionone+animation@10.17.0/node_modules/@motionone/animation/dist/Animation.es.js","../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js","../node_modules/.pnpm/@motionone+types@10.17.0/node_modules/@motionone/types/dist/MotionValue.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/data.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/easing.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/style.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/animate-style.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/options.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/controls.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/utils/stagger.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/create-animate.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/index.es.js","../node_modules/.pnpm/motion@10.16.2/node_modules/motion/dist/animate.es.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/if-defined.js","../node_modules/.pnpm/@walletconnect+modal-ui@2.6.2_react@18.2.0/node_modules/@walletconnect/modal-ui/dist/index.js"],"sourcesContent":["/**\n * Asset transactions (COIN, TOKEN, NFT) has two directions\n */\nexport enum AssetDirectionEnum {\n INCOMING = 'INCOMING',\n OUTGOING = 'OUTGOING'\n}\n\n/**\n * There are six types of transactions at the moment.\n * COIN, TOKEN, and NFT transactions are called ASSET transactions\n */\nexport enum TransactionTypeEnum {\n GENERAL = 'GENERAL',\n CONTRACT = 'CONTRACT',\n COIN = 'COIN',\n TOKEN = 'TOKEN',\n NFT = 'NFT'\n}\n\n/**\n * There are 3 available transaction statuses:\n * FAILED --> When a transaction is failed\n * PENDING --> When a transaction has not been concluded\n * CONFIRMED --> When a transaction is confirmed\n */\nexport enum TransactionStatusEnum {\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n CONFIRMED = 'CONFIRMED'\n}\n\nexport enum ErrorTypeEnum {\n RPC_TIMEOUT = 'RPC_TIMEOUT',\n RPC_REQUEST_ERROR = 'RPC_REQUEST_ERROR',\n RPC_ACCESS_DENIED = 'RPC_ACCESS_DENIED',\n WS_URL_NOT_DEFINED = 'WS_URL_NOT_DEFINED',\n WS_CONNECTION_FAILED = 'WS_CONNECTION_FAILED',\n UNACCEPTED_CHAIN = 'UNACCEPTED_CHAIN',\n UNAUTHORIZED_ADDRESS = 'UNAUTHORIZED_ADDRESS',\n INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE',\n INVALID_AMOUNT = 'INVALID_AMOUNT',\n INVALID_ADDRESS = 'INVALID_ADDRESS',\n INVALID_PRIVATE_KEY = 'INVALID_PRIVATE_KEY',\n INVALID_PUBLIC_KEY = 'INVALID_PUBLIC_KEY',\n INVALID_TRANSACTION_ID = 'INVALID_TRANSACTION_ID',\n PROVIDER_IS_REQUIRED = 'PROVIDER_IS_REQUIRED',\n PROVIDER_IS_NOT_INITIALIZED = 'PROVIDER_IS_NOT_INITIALIZED',\n PROVIDER_IS_ALREADY_INITIALIZED = 'PROVIDER_IS_ALREADY_INITIALIZED',\n WALLET_ALREADY_PROCESSING = 'WALLET_ALREADY_PROCESSING',\n WALLET_CONNECT_REJECTED = 'WALLET_CONNECT_REJECTED',\n WALLET_REQUEST_REJECTED = 'WALLET_REQUEST_REJECTED',\n WALLET_CONNECTION_FAILED = 'WALLET_CONNECTION_FAILED',\n WALLET_CONNECTION_TIMEOUT = 'WALLET_CONNECTION_TIMEOUT',\n TRANSACTION_CREATION_FAILED = 'TRANSACTION_CREATION_FAILED',\n TRANSACTION_NOT_FOUND = 'TRANSACTION_NOT_FOUND',\n CLOSED_WALLETCONNECT_MODAL = 'CLOSED_WALLETCONNECT_MODAL',\n PROJECT_ID_IS_REQUIRED = 'PROJECT_ID_IS_REQUIRED',\n METADATA_IS_REQUIRED = 'METADATA_IS_REQUIRED',\n CONFIG_IS_REQUIRED = 'CONFIG_IS_REQUIRED'\n}\n\nexport enum WalletPlatformEnum {\n BROWSER = 'BROWSER',\n MOBILE = 'MOBILE',\n DESKTOP = 'DESKTOP',\n UNIVERSAL = 'UNIVERSAL'\n}\n","import type {\n NftId,\n ContractAddress,\n TransactionId,\n TransferAmount,\n WalletAddress\n} from '../defines'\nimport { TransactionTypeEnum } from '../enums'\n\n/**\n * Filter types for each transaction type in TransactionListenerInterface\n */\nexport interface TransactionListenerFilterInterface {\n signer?: WalletAddress\n}\n\nexport interface ContractTransactionListenerFilterInterface\n extends TransactionListenerFilterInterface {\n address?: ContractAddress\n}\n\nexport interface AssetTransactionListenerFilterInterface\n extends TransactionListenerFilterInterface {\n sender?: WalletAddress\n receiver?: WalletAddress\n}\n\nexport interface CoinTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface {\n amount?: TransferAmount\n}\n\nexport interface TokenTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface,\n ContractTransactionListenerFilterInterface {\n amount?: TransferAmount\n}\n\nexport interface NftTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface,\n ContractTransactionListenerFilterInterface {\n nftId?: NftId\n}\n/**\n * Filter types for each transaction type in TransactionListenerInterface\n */\n\n/**\n * 'DynamicTransactionListenerFilterInterface' connects transaction types to their corresponding filter interfaces\n * Every type of transaction has its own unique filter values.\n * A sender's wallet address is a common value.\n */\nexport type DynamicTransactionListenerFilterType =\n T extends TransactionTypeEnum.GENERAL\n ? TransactionListenerFilterInterface\n : T extends TransactionTypeEnum.CONTRACT\n ? ContractTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.COIN\n ? CoinTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.TOKEN\n ? TokenTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.NFT\n ? NftTransactionListenerFilterInterface\n : never\n\n/**\n * 'TransactionListenerProcessIndex' is an object that connects transaction types to their corresponding process methods.\n * Example: this[TransactionListenerProcessIndex[type]]()\n */\nexport const TransactionListenerProcessIndex = {\n [TransactionTypeEnum.GENERAL]: 'generalProcess',\n [TransactionTypeEnum.CONTRACT]: 'contractProcess',\n [TransactionTypeEnum.COIN]: 'coinProcess',\n [TransactionTypeEnum.TOKEN]: 'tokenProcess',\n [TransactionTypeEnum.NFT]: 'nftProcess'\n}\n\n/**\n * 'DynamicTransactionType' connects transaction types to their corresponding transaction interfaces\n * Every type of transaction has its own unique transaction interface.\n */\nexport type DynamicTransactionType<\n T extends TransactionTypeEnum,\n Transaction,\n ContractTransaction,\n CoinTransaction,\n TokenTransaction,\n NftTransaction\n> = T extends TransactionTypeEnum.GENERAL\n ? Transaction\n : T extends TransactionTypeEnum.CONTRACT\n ? ContractTransaction\n : T extends TransactionTypeEnum.COIN\n ? CoinTransaction\n : T extends TransactionTypeEnum.TOKEN\n ? TokenTransaction\n : T extends TransactionTypeEnum.NFT\n ? NftTransaction\n : never\n\nexport interface TransactionListenerInterface<\n T extends TransactionTypeEnum,\n Transaction,\n CallBackType\n> {\n /**\n * The 'type' property is a generic type that is used to define the type of transaction listener.\n */\n type: T\n\n /**\n * 'status' is a boolean that shows the status of the listener.\n * If 'status' is true, the listener is active.\n * If 'status' is false, the listener is inactive.\n */\n status: boolean\n\n /**\n * 'callback' is an array of callback functions that are triggered when a transaction is detected.\n */\n callbacks: CallBackType[]\n\n /**\n * Triggered transactions are stored in the 'triggeredTransactions' array.\n */\n triggeredTransactions: TransactionId[]\n\n /**\n * 'filter' is an object that has values depending on transaction listener type.\n * E.g. no matter which type of transaction is listening, 'filter' has to have a 'signer' value\n */\n filter?: DynamicTransactionListenerFilterType | Record\n\n /**\n * If the listener is active, the 'stop' method deactivates the listener.\n * @returns {void}\n */\n stop: () => void\n\n /**\n * If the listener is inactive, the 'start' method activates the listener.\n * @returns {void}\n */\n start: () => void\n\n /**\n * The 'getStatus' method returns the status of the listener.\n * @returns {boolean}\n */\n getStatus: () => boolean\n\n /**\n * The 'on' method adds a callback function to the 'callbacks' array and starts the listener.\n * @param {CallBackType} callback - a function that is triggered when a transaction is detected.\n * @return {Promise}\n */\n on: (callback: CallBackType) => Promise\n\n /**\n * The 'trigger' method is triggered when a transaction is detected.\n * @param {Transaction} transaction - a transaction that is detected.\n * @return {void}\n */\n trigger: (transaction: Transaction) => void\n\n /**\n * listener methods for each transaction type\n */\n generalProcess: () => void\n\n contractProcess: () => void\n\n coinProcess: () => void\n\n tokenProcess: () => void\n\n nftProcess: () => void\n}\n","const global = globalThis || void 0 || self;\n\nexport { global as default, global };\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","var buffer = {};\n\nvar base64Js = {};\n\nbase64Js.byteLength = byteLength;\nbase64Js.toByteArray = toByteArray;\nbase64Js.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens (b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4);\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = (tmp >> 16) & 0xFF;\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n );\n }\n\n return parts.join('')\n}\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n(function (exports) {\n\n\tconst base64 = base64Js;\n\tconst ieee754$1 = ieee754;\n\tconst customInspectSymbol =\n\t (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n\t ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n\t : null;\n\n\texports.Buffer = Buffer;\n\texports.SlowBuffer = SlowBuffer;\n\texports.INSPECT_MAX_BYTES = 50;\n\n\tconst K_MAX_LENGTH = 0x7fffffff;\n\texports.kMaxLength = K_MAX_LENGTH;\n\tconst { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;\n\n\t/**\n\t * If `Buffer.TYPED_ARRAY_SUPPORT`:\n\t * === true Use Uint8Array implementation (fastest)\n\t * === false Print warning and recommend using `buffer` v4.x which has an Object\n\t * implementation (most compatible, even IE6)\n\t *\n\t * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n\t * Opera 11.6+, iOS 4.2+.\n\t *\n\t * We report that the browser does not support typed arrays if the are not subclassable\n\t * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n\t * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n\t * for __proto__ and has a buggy typed array implementation.\n\t */\n\tBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\n\tif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n\t typeof console.error === 'function') {\n\t console.error(\n\t 'This browser lacks typed array (Uint8Array) support which is required by ' +\n\t '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n\t );\n\t}\n\n\tfunction typedArraySupport () {\n\t // Can typed array instances can be augmented?\n\t try {\n\t const arr = new GlobalUint8Array(1);\n\t const proto = { foo: function () { return 42 } };\n\t Object.setPrototypeOf(proto, GlobalUint8Array.prototype);\n\t Object.setPrototypeOf(arr, proto);\n\t return arr.foo() === 42\n\t } catch (e) {\n\t return false\n\t }\n\t}\n\n\tObject.defineProperty(Buffer.prototype, 'parent', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.buffer\n\t }\n\t});\n\n\tObject.defineProperty(Buffer.prototype, 'offset', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.byteOffset\n\t }\n\t});\n\n\tfunction createBuffer (length) {\n\t if (length > K_MAX_LENGTH) {\n\t throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n\t }\n\t // Return an augmented `Uint8Array` instance\n\t const buf = new GlobalUint8Array(length);\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\t return buf\n\t}\n\n\t/**\n\t * The Buffer constructor returns instances of `Uint8Array` that have their\n\t * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n\t * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n\t * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n\t * returns a single octet.\n\t *\n\t * The `Uint8Array` prototype remains unmodified.\n\t */\n\n\tfunction Buffer (arg, encodingOrOffset, length) {\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be of type string. Received type number'\n\t )\n\t }\n\t return allocUnsafe(arg)\n\t }\n\t return from(arg, encodingOrOffset, length)\n\t}\n\n\tBuffer.poolSize = 8192; // not used by this implementation\n\n\tfunction from (value, encodingOrOffset, length) {\n\t if (typeof value === 'string') {\n\t return fromString(value, encodingOrOffset)\n\t }\n\n\t if (GlobalArrayBuffer.isView(value)) {\n\t return fromArrayView(value)\n\t }\n\n\t if (value == null) {\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t }\n\n\t if (isInstance(value, GlobalArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalArrayBuffer))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof GlobalSharedArrayBuffer !== 'undefined' &&\n\t (isInstance(value, GlobalSharedArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalSharedArrayBuffer)))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof value === 'number') {\n\t throw new TypeError(\n\t 'The \"value\" argument must not be of type number. Received type number'\n\t )\n\t }\n\n\t const valueOf = value.valueOf && value.valueOf();\n\t if (valueOf != null && valueOf !== value) {\n\t return Buffer.from(valueOf, encodingOrOffset, length)\n\t }\n\n\t const b = fromObject(value);\n\t if (b) return b\n\n\t if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n\t typeof value[Symbol.toPrimitive] === 'function') {\n\t return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n\t }\n\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t}\n\n\t/**\n\t * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n\t * if value is a number.\n\t * Buffer.from(str[, encoding])\n\t * Buffer.from(array)\n\t * Buffer.from(buffer)\n\t * Buffer.from(arrayBuffer[, byteOffset[, length]])\n\t **/\n\tBuffer.from = function (value, encodingOrOffset, length) {\n\t return from(value, encodingOrOffset, length)\n\t};\n\n\t// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n\t// https://github.com/feross/buffer/pull/148\n\tObject.setPrototypeOf(Buffer.prototype, GlobalUint8Array.prototype);\n\tObject.setPrototypeOf(Buffer, GlobalUint8Array);\n\n\tfunction assertSize (size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be of type number')\n\t } else if (size < 0) {\n\t throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n\t }\n\t}\n\n\tfunction alloc (size, fill, encoding) {\n\t assertSize(size);\n\t if (size <= 0) {\n\t return createBuffer(size)\n\t }\n\t if (fill !== undefined) {\n\t // Only pay attention to encoding if it's a string. This\n\t // prevents accidentally sending in a number that would\n\t // be interpreted as a start offset.\n\t return typeof encoding === 'string'\n\t ? createBuffer(size).fill(fill, encoding)\n\t : createBuffer(size).fill(fill)\n\t }\n\t return createBuffer(size)\n\t}\n\n\t/**\n\t * Creates a new filled Buffer instance.\n\t * alloc(size[, fill[, encoding]])\n\t **/\n\tBuffer.alloc = function (size, fill, encoding) {\n\t return alloc(size, fill, encoding)\n\t};\n\n\tfunction allocUnsafe (size) {\n\t assertSize(size);\n\t return createBuffer(size < 0 ? 0 : checked(size) | 0)\n\t}\n\n\t/**\n\t * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n\t * */\n\tBuffer.allocUnsafe = function (size) {\n\t return allocUnsafe(size)\n\t};\n\t/**\n\t * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n\t */\n\tBuffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(size)\n\t};\n\n\tfunction fromString (string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8';\n\t }\n\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\n\t const length = byteLength(string, encoding) | 0;\n\t let buf = createBuffer(length);\n\n\t const actual = buf.write(string, encoding);\n\n\t if (actual !== length) {\n\t // Writing a hex string, for example, that contains invalid characters will\n\t // cause everything after the first invalid character to be ignored. (e.g.\n\t // 'abxxcd' will be treated as 'ab')\n\t buf = buf.slice(0, actual);\n\t }\n\n\t return buf\n\t}\n\n\tfunction fromArrayLike (array) {\n\t const length = array.length < 0 ? 0 : checked(array.length) | 0;\n\t const buf = createBuffer(length);\n\t for (let i = 0; i < length; i += 1) {\n\t buf[i] = array[i] & 255;\n\t }\n\t return buf\n\t}\n\n\tfunction fromArrayView (arrayView) {\n\t if (isInstance(arrayView, GlobalUint8Array)) {\n\t const copy = new GlobalUint8Array(arrayView);\n\t return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n\t }\n\t return fromArrayLike(arrayView)\n\t}\n\n\tfunction fromArrayBuffer (array, byteOffset, length) {\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\"offset\" is outside of buffer bounds')\n\t }\n\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\"length\" is outside of buffer bounds')\n\t }\n\n\t let buf;\n\t if (byteOffset === undefined && length === undefined) {\n\t buf = new GlobalUint8Array(array);\n\t } else if (length === undefined) {\n\t buf = new GlobalUint8Array(array, byteOffset);\n\t } else {\n\t buf = new GlobalUint8Array(array, byteOffset, length);\n\t }\n\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\n\t return buf\n\t}\n\n\tfunction fromObject (obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t const len = checked(obj.length) | 0;\n\t const buf = createBuffer(len);\n\n\t if (buf.length === 0) {\n\t return buf\n\t }\n\n\t obj.copy(buf, 0, 0, len);\n\t return buf\n\t }\n\n\t if (obj.length !== undefined) {\n\t if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n\t return createBuffer(0)\n\t }\n\t return fromArrayLike(obj)\n\t }\n\n\t if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n\t return fromArrayLike(obj.data)\n\t }\n\t}\n\n\tfunction checked (length) {\n\t // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n\t // length is NaN (which is otherwise coerced to zero.)\n\t if (length >= K_MAX_LENGTH) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n\t 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n\t }\n\t return length | 0\n\t}\n\n\tfunction SlowBuffer (length) {\n\t if (+length != length) { // eslint-disable-line eqeqeq\n\t length = 0;\n\t }\n\t return Buffer.alloc(+length)\n\t}\n\n\tBuffer.isBuffer = function isBuffer (b) {\n\t return b != null && b._isBuffer === true &&\n\t b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n\t};\n\n\tBuffer.compare = function compare (a, b) {\n\t if (isInstance(a, GlobalUint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n\t if (isInstance(b, GlobalUint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError(\n\t 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n\t )\n\t }\n\n\t if (a === b) return 0\n\n\t let x = a.length;\n\t let y = b.length;\n\n\t for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i];\n\t y = b[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\tBuffer.isEncoding = function isEncoding (encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true\n\t default:\n\t return false\n\t }\n\t};\n\n\tBuffer.concat = function concat (list, length) {\n\t if (!Array.isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\n\t if (list.length === 0) {\n\t return Buffer.alloc(0)\n\t }\n\n\t let i;\n\t if (length === undefined) {\n\t length = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length;\n\t }\n\t }\n\n\t const buffer = Buffer.allocUnsafe(length);\n\t let pos = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t let buf = list[i];\n\t if (isInstance(buf, GlobalUint8Array)) {\n\t if (pos + buf.length > buffer.length) {\n\t if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n\t buf.copy(buffer, pos);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t buffer,\n\t buf,\n\t pos\n\t );\n\t }\n\t } else if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t } else {\n\t buf.copy(buffer, pos);\n\t }\n\t pos += buf.length;\n\t }\n\t return buffer\n\t};\n\n\tfunction byteLength (string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length\n\t }\n\t if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {\n\t return string.byteLength\n\t }\n\t if (typeof string !== 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n\t 'Received type ' + typeof string\n\t )\n\t }\n\n\t const len = string.length;\n\t const mustMatch = (arguments.length > 2 && arguments[2] === true);\n\t if (!mustMatch && len === 0) return 0\n\n\t // Use a for loop to avoid recursion\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8ToBytes(string).length\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2\n\t case 'hex':\n\t return len >>> 1\n\t case 'base64':\n\t return base64ToBytes(string).length\n\t default:\n\t if (loweredCase) {\n\t return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n\t }\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\tBuffer.byteLength = byteLength;\n\n\tfunction slowToString (encoding, start, end) {\n\t let loweredCase = false;\n\n\t // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n\t // property of a typed array.\n\n\t // This behaves neither like String nor Uint8Array in that we set start/end\n\t // to their upper/lower bounds if the value passed is out of range.\n\t // undefined is handled specially as per ECMA-262 6th Edition,\n\t // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\t if (start === undefined || start < 0) {\n\t start = 0;\n\t }\n\t // Return early if start > this.length. Done here to prevent potential uint32\n\t // coercion fail below.\n\t if (start > this.length) {\n\t return ''\n\t }\n\n\t if (end === undefined || end > this.length) {\n\t end = this.length;\n\t }\n\n\t if (end <= 0) {\n\t return ''\n\t }\n\n\t // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n\t end >>>= 0;\n\t start >>>= 0;\n\n\t if (end <= start) {\n\t return ''\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end)\n\n\t case 'ascii':\n\t return asciiSlice(this, start, end)\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end)\n\n\t case 'base64':\n\t return base64Slice(this, start, end)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = (encoding + '').toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\n\t// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n\t// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n\t// reliably in a browserify context because there could be multiple different\n\t// copies of the 'buffer' package in use. This method works even for Buffer\n\t// instances that were created from another copy of the `buffer` package.\n\t// See: https://github.com/feross/buffer/issues/154\n\tBuffer.prototype._isBuffer = true;\n\n\tfunction swap (b, n, m) {\n\t const i = b[n];\n\t b[n] = b[m];\n\t b[m] = i;\n\t}\n\n\tBuffer.prototype.swap16 = function swap16 () {\n\t const len = this.length;\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits')\n\t }\n\t for (let i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap32 = function swap32 () {\n\t const len = this.length;\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits')\n\t }\n\t for (let i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3);\n\t swap(this, i + 1, i + 2);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap64 = function swap64 () {\n\t const len = this.length;\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits')\n\t }\n\t for (let i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7);\n\t swap(this, i + 1, i + 6);\n\t swap(this, i + 2, i + 5);\n\t swap(this, i + 3, i + 4);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.toString = function toString () {\n\t const length = this.length;\n\t if (length === 0) return ''\n\t if (arguments.length === 0) return utf8Slice(this, 0, length)\n\t return slowToString.apply(this, arguments)\n\t};\n\n\tBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\n\tBuffer.prototype.equals = function equals (b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n\t if (this === b) return true\n\t return Buffer.compare(this, b) === 0\n\t};\n\n\tBuffer.prototype.inspect = function inspect () {\n\t let str = '';\n\t const max = exports.INSPECT_MAX_BYTES;\n\t str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n\t if (this.length > max) str += ' ... ';\n\t return ''\n\t};\n\tif (customInspectSymbol) {\n\t Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n\t}\n\n\tBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n\t if (isInstance(target, GlobalUint8Array)) {\n\t target = Buffer.from(target, target.offset, target.byteLength);\n\t }\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError(\n\t 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n\t 'Received type ' + (typeof target)\n\t )\n\t }\n\n\t if (start === undefined) {\n\t start = 0;\n\t }\n\t if (end === undefined) {\n\t end = target ? target.length : 0;\n\t }\n\t if (thisStart === undefined) {\n\t thisStart = 0;\n\t }\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length;\n\t }\n\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index')\n\t }\n\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0\n\t }\n\t if (thisStart >= thisEnd) {\n\t return -1\n\t }\n\t if (start >= end) {\n\t return 1\n\t }\n\n\t start >>>= 0;\n\t end >>>= 0;\n\t thisStart >>>= 0;\n\t thisEnd >>>= 0;\n\n\t if (this === target) return 0\n\n\t let x = thisEnd - thisStart;\n\t let y = end - start;\n\t const len = Math.min(x, y);\n\n\t const thisCopy = this.slice(thisStart, thisEnd);\n\t const targetCopy = target.slice(start, end);\n\n\t for (let i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i];\n\t y = targetCopy[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\t// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n\t// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n\t//\n\t// Arguments:\n\t// - buffer - a Buffer to search\n\t// - val - a string, Buffer, or number\n\t// - byteOffset - an index into `buffer`; will be clamped to an int32\n\t// - encoding - an optional encoding, relevant is val is a string\n\t// - dir - true for indexOf, false for lastIndexOf\n\tfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n\t // Empty buffer means no match\n\t if (buffer.length === 0) return -1\n\n\t // Normalize byteOffset\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset;\n\t byteOffset = 0;\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff;\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000;\n\t }\n\t byteOffset = +byteOffset; // Coerce to Number.\n\t if (numberIsNaN(byteOffset)) {\n\t // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\t byteOffset = dir ? 0 : (buffer.length - 1);\n\t }\n\n\t // Normalize byteOffset: negative offsets start from the end of the buffer\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1\n\t else byteOffset = buffer.length - 1;\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0;\n\t else return -1\n\t }\n\n\t // Normalize val\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding);\n\t }\n\n\t // Finally, search either indexOf (if dir is true) or lastIndexOf\n\t if (Buffer.isBuffer(val)) {\n\t // Special case: looking for empty string/buffer always fails\n\t if (val.length === 0) {\n\t return -1\n\t }\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF; // Search for a byte value [0-255]\n\t if (typeof GlobalUint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return GlobalUint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n\t } else {\n\t return GlobalUint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n\t }\n\t }\n\t return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n\t }\n\n\t throw new TypeError('val must be string, number or Buffer')\n\t}\n\n\tfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n\t let indexSize = 1;\n\t let arrLength = arr.length;\n\t let valLength = val.length;\n\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase();\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n\t encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1\n\t }\n\t indexSize = 2;\n\t arrLength /= 2;\n\t valLength /= 2;\n\t byteOffset /= 2;\n\t }\n\t }\n\n\t function read (buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i]\n\t } else {\n\t return buf.readUInt16BE(i * indexSize)\n\t }\n\t }\n\n\t let i;\n\t if (dir) {\n\t let foundIndex = -1;\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i;\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex;\n\t foundIndex = -1;\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\t for (i = byteOffset; i >= 0; i--) {\n\t let found = true;\n\t for (let j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false;\n\t break\n\t }\n\t }\n\t if (found) return i\n\t }\n\t }\n\n\t return -1\n\t}\n\n\tBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1\n\t};\n\n\tBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n\t};\n\n\tBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n\t};\n\n\tfunction hexWrite (buf, string, offset, length) {\n\t offset = Number(offset) || 0;\n\t const remaining = buf.length - offset;\n\t if (!length) {\n\t length = remaining;\n\t } else {\n\t length = Number(length);\n\t if (length > remaining) {\n\t length = remaining;\n\t }\n\t }\n\n\t const strLen = string.length;\n\n\t if (length > strLen / 2) {\n\t length = strLen / 2;\n\t }\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t const parsed = parseInt(string.substr(i * 2, 2), 16);\n\t if (numberIsNaN(parsed)) return i\n\t buf[offset + i] = parsed;\n\t }\n\t return i\n\t}\n\n\tfunction utf8Write (buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tfunction asciiWrite (buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length)\n\t}\n\n\tfunction base64Write (buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length)\n\t}\n\n\tfunction ucs2Write (buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tBuffer.prototype.write = function write (string, offset, length, encoding) {\n\t // Buffer#write(string)\n\t if (offset === undefined) {\n\t encoding = 'utf8';\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, encoding)\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset;\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, offset[, length][, encoding])\n\t } else if (isFinite(offset)) {\n\t offset = offset >>> 0;\n\t if (isFinite(length)) {\n\t length = length >>> 0;\n\t if (encoding === undefined) encoding = 'utf8';\n\t } else {\n\t encoding = length;\n\t length = undefined;\n\t }\n\t } else {\n\t throw new Error(\n\t 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n\t )\n\t }\n\n\t const remaining = this.length - offset;\n\t if (length === undefined || length > remaining) length = remaining;\n\n\t if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds')\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length)\n\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return asciiWrite(this, string, offset, length)\n\n\t case 'base64':\n\t // Warning: maxLength not taken into account in base64Write\n\t return base64Write(this, string, offset, length)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t};\n\n\tBuffer.prototype.toJSON = function toJSON () {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t }\n\t};\n\n\tfunction base64Slice (buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64.fromByteArray(buf)\n\t } else {\n\t return base64.fromByteArray(buf.slice(start, end))\n\t }\n\t}\n\n\tfunction utf8Slice (buf, start, end) {\n\t end = Math.min(buf.length, end);\n\t const res = [];\n\n\t let i = start;\n\t while (i < end) {\n\t const firstByte = buf[i];\n\t let codePoint = null;\n\t let bytesPerSequence = (firstByte > 0xEF)\n\t ? 4\n\t : (firstByte > 0xDF)\n\t ? 3\n\t : (firstByte > 0xBF)\n\t ? 2\n\t : 1;\n\n\t if (i + bytesPerSequence <= end) {\n\t let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte;\n\t }\n\t break\n\t case 2:\n\t secondByte = buf[i + 1];\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 3:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 4:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t fourthByte = buf[i + 3];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t }\n\t }\n\n\t if (codePoint === null) {\n\t // we did not generate a valid codePoint so insert a\n\t // replacement char (U+FFFD) and advance only 1 byte\n\t codePoint = 0xFFFD;\n\t bytesPerSequence = 1;\n\t } else if (codePoint > 0xFFFF) {\n\t // encode to utf16 (surrogate pair dance)\n\t codePoint -= 0x10000;\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n\t codePoint = 0xDC00 | codePoint & 0x3FF;\n\t }\n\n\t res.push(codePoint);\n\t i += bytesPerSequence;\n\t }\n\n\t return decodeCodePointsArray(res)\n\t}\n\n\t// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n\t// the lowest limit is Chrome, with 0x10000 args.\n\t// We go 1 magnitude less, for safety\n\tconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\n\tfunction decodeCodePointsArray (codePoints) {\n\t const len = codePoints.length;\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n\t }\n\n\t // Decode in chunks to avoid \"call stack size exceeded\".\n\t let res = '';\n\t let i = 0;\n\t while (i < len) {\n\t res += String.fromCharCode.apply(\n\t String,\n\t codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n\t );\n\t }\n\t return res\n\t}\n\n\tfunction asciiSlice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F);\n\t }\n\t return ret\n\t}\n\n\tfunction latin1Slice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i]);\n\t }\n\t return ret\n\t}\n\n\tfunction hexSlice (buf, start, end) {\n\t const len = buf.length;\n\n\t if (!start || start < 0) start = 0;\n\t if (!end || end < 0 || end > len) end = len;\n\n\t let out = '';\n\t for (let i = start; i < end; ++i) {\n\t out += hexSliceLookupTable[buf[i]];\n\t }\n\t return out\n\t}\n\n\tfunction utf16leSlice (buf, start, end) {\n\t const bytes = buf.slice(start, end);\n\t let res = '';\n\t // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n\t for (let i = 0; i < bytes.length - 1; i += 2) {\n\t res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n\t }\n\t return res\n\t}\n\n\tBuffer.prototype.slice = function slice (start, end) {\n\t const len = this.length;\n\t start = ~~start;\n\t end = end === undefined ? len : ~~end;\n\n\t if (start < 0) {\n\t start += len;\n\t if (start < 0) start = 0;\n\t } else if (start > len) {\n\t start = len;\n\t }\n\n\t if (end < 0) {\n\t end += len;\n\t if (end < 0) end = 0;\n\t } else if (end > len) {\n\t end = len;\n\t }\n\n\t if (end < start) end = start;\n\n\t const newBuf = this.subarray(start, end);\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n\t return newBuf\n\t};\n\n\t/*\n\t * Need to make sure that buffer isn't trying to write out of bounds.\n\t */\n\tfunction checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}\n\n\tBuffer.prototype.readUintLE =\n\tBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUintBE =\n\tBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length);\n\t }\n\n\t let val = this[offset + --byteLength];\n\t let mul = 1;\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUint8 =\n\tBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t return this[offset]\n\t};\n\n\tBuffer.prototype.readUint16LE =\n\tBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] | (this[offset + 1] << 8)\n\t};\n\n\tBuffer.prototype.readUint16BE =\n\tBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return (this[offset] << 8) | this[offset + 1]\n\t};\n\n\tBuffer.prototype.readUint32LE =\n\tBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return ((this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16)) +\n\t (this[offset + 3] * 0x1000000)\n\t};\n\n\tBuffer.prototype.readUint32BE =\n\tBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] * 0x1000000) +\n\t ((this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const lo = first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24;\n\n\t const hi = this[++offset] +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t last * 2 ** 24;\n\n\t return BigInt(lo) + (BigInt(hi) << BigInt(32))\n\t});\n\n\tBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const hi = first * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t const lo = this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last;\n\n\t return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n\t});\n\n\tBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let i = byteLength;\n\t let mul = 1;\n\t let val = this[offset + --i];\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t if (!(this[offset] & 0x80)) return (this[offset])\n\t return ((0xff - this[offset] + 1) * -1)\n\t};\n\n\tBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset] | (this[offset + 1] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset + 1] | (this[offset] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16) |\n\t (this[offset + 3] << 24)\n\t};\n\n\tBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] << 24) |\n\t (this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t (this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = this[offset + 4] +\n\t this[offset + 5] * 2 ** 8 +\n\t this[offset + 6] * 2 ** 16 +\n\t (last << 24); // Overflow\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24)\n\t});\n\n\tBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = (first << 24) + // Overflow\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last)\n\t});\n\n\tBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, true, 23, 4)\n\t};\n\n\tBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, false, 23, 4)\n\t};\n\n\tBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, true, 52, 8)\n\t};\n\n\tBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, false, 52, 8)\n\t};\n\n\tfunction checkInt (buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t}\n\n\tBuffer.prototype.writeUintLE =\n\tBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let mul = 1;\n\t let i = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUintBE =\n\tBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUint8 =\n\tBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeUint16LE =\n\tBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint16BE =\n\tBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint32LE =\n\tBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset + 3] = (value >>> 24);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeUint32BE =\n\tBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t return offset\n\t}\n\n\tfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset + 7] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 6] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 5] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 4] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset + 3] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 2] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 1] = hi;\n\t hi = hi >> 8;\n\t buf[offset] = hi;\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = 0;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n\t if (value < 0) value = 0xff + value + 1;\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 3] = (value >>> 24);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t if (value < 0) value = 0xffffffff + value + 1;\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t if (offset < 0) throw new RangeError('Index out of range')\n\t}\n\n\tfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 23, 4);\n\t return offset + 4\n\t}\n\n\tBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert)\n\t};\n\n\tfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 52, 8);\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert)\n\t};\n\n\t// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\tBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n\t if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n\t if (!start) start = 0;\n\t if (!end && end !== 0) end = this.length;\n\t if (targetStart >= target.length) targetStart = target.length;\n\t if (!targetStart) targetStart = 0;\n\t if (end > 0 && end < start) end = start;\n\n\t // Copy 0 bytes; we're done\n\t if (end === start) return 0\n\t if (target.length === 0 || this.length === 0) return 0\n\n\t // Fatal error conditions\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds')\n\t }\n\t if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n\t // Are we oob?\n\t if (end > this.length) end = this.length;\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start;\n\t }\n\n\t const len = end - start;\n\n\t if (this === target && typeof GlobalUint8Array.prototype.copyWithin === 'function') {\n\t // Use built-in when available, missing from IE11\n\t this.copyWithin(targetStart, start, end);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t target,\n\t this.subarray(start, end),\n\t targetStart\n\t );\n\t }\n\n\t return len\n\t};\n\n\t// Usage:\n\t// buffer.fill(number[, offset[, end]])\n\t// buffer.fill(buffer[, offset[, end]])\n\t// buffer.fill(string[, offset[, end]][, encoding])\n\tBuffer.prototype.fill = function fill (val, start, end, encoding) {\n\t // Handle string cases:\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start;\n\t start = 0;\n\t end = this.length;\n\t } else if (typeof end === 'string') {\n\t encoding = end;\n\t end = this.length;\n\t }\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string')\n\t }\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\t if (val.length === 1) {\n\t const code = val.charCodeAt(0);\n\t if ((encoding === 'utf8' && code < 128) ||\n\t encoding === 'latin1') {\n\t // Fast path: If `val` fits into a single byte, use that numeric value.\n\t val = code;\n\t }\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255;\n\t } else if (typeof val === 'boolean') {\n\t val = Number(val);\n\t }\n\n\t // Invalid ranges are not set to a default, so can range check early.\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index')\n\t }\n\n\t if (end <= start) {\n\t return this\n\t }\n\n\t start = start >>> 0;\n\t end = end === undefined ? this.length : end >>> 0;\n\n\t if (!val) val = 0;\n\n\t let i;\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val;\n\t }\n\t } else {\n\t const bytes = Buffer.isBuffer(val)\n\t ? val\n\t : Buffer.from(val, encoding);\n\t const len = bytes.length;\n\t if (len === 0) {\n\t throw new TypeError('The value \"' + val +\n\t '\" is invalid for argument \"value\"')\n\t }\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len];\n\t }\n\t }\n\n\t return this\n\t};\n\n\t// CUSTOM ERRORS\n\t// =============\n\n\t// Simplified versions from Node, changed for Buffer-only usage\n\tconst errors = {};\n\tfunction E (sym, getMessage, Base) {\n\t errors[sym] = class NodeError extends Base {\n\t constructor () {\n\t super();\n\n\t Object.defineProperty(this, 'message', {\n\t value: getMessage.apply(this, arguments),\n\t writable: true,\n\t configurable: true\n\t });\n\n\t // Add the error code to the name to include it in the stack trace.\n\t this.name = `${this.name} [${sym}]`;\n\t // Access the stack to generate the error message including the error code\n\t // from the name.\n\t this.stack; // eslint-disable-line no-unused-expressions\n\t // Reset the name to the actual name.\n\t delete this.name;\n\t }\n\n\t get code () {\n\t return sym\n\t }\n\n\t set code (value) {\n\t Object.defineProperty(this, 'code', {\n\t configurable: true,\n\t enumerable: true,\n\t value,\n\t writable: true\n\t });\n\t }\n\n\t toString () {\n\t return `${this.name} [${sym}]: ${this.message}`\n\t }\n\t };\n\t}\n\n\tE('ERR_BUFFER_OUT_OF_BOUNDS',\n\t function (name) {\n\t if (name) {\n\t return `${name} is outside of buffer bounds`\n\t }\n\n\t return 'Attempt to access memory outside buffer bounds'\n\t }, RangeError);\n\tE('ERR_INVALID_ARG_TYPE',\n\t function (name, actual) {\n\t return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n\t }, TypeError);\n\tE('ERR_OUT_OF_RANGE',\n\t function (str, range, input) {\n\t let msg = `The value of \"${str}\" is out of range.`;\n\t let received = input;\n\t if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n\t received = addNumericalSeparator(String(input));\n\t } else if (typeof input === 'bigint') {\n\t received = String(input);\n\t if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n\t received = addNumericalSeparator(received);\n\t }\n\t received += 'n';\n\t }\n\t msg += ` It must be ${range}. Received ${received}`;\n\t return msg\n\t }, RangeError);\n\n\tfunction addNumericalSeparator (val) {\n\t let res = '';\n\t let i = val.length;\n\t const start = val[0] === '-' ? 1 : 0;\n\t for (; i >= start + 4; i -= 3) {\n\t res = `_${val.slice(i - 3, i)}${res}`;\n\t }\n\t return `${val.slice(0, i)}${res}`\n\t}\n\n\t// CHECK FUNCTIONS\n\t// ===============\n\n\tfunction checkBounds (buf, offset, byteLength) {\n\t validateNumber(offset, 'offset');\n\t if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n\t boundsError(offset, buf.length - (byteLength + 1));\n\t }\n\t}\n\n\tfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n\t if (value > max || value < min) {\n\t const n = typeof min === 'bigint' ? 'n' : '';\n\t let range;\n\t if (byteLength > 3) {\n\t if (min === 0 || min === BigInt(0)) {\n\t range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n\t } else {\n\t range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n\t `${(byteLength + 1) * 8 - 1}${n}`;\n\t }\n\t } else {\n\t range = `>= ${min}${n} and <= ${max}${n}`;\n\t }\n\t throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n\t }\n\t checkBounds(buf, offset, byteLength);\n\t}\n\n\tfunction validateNumber (value, name) {\n\t if (typeof value !== 'number') {\n\t throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n\t }\n\t}\n\n\tfunction boundsError (value, length, type) {\n\t if (Math.floor(value) !== value) {\n\t validateNumber(value, type);\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n\t }\n\n\t if (length < 0) {\n\t throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n\t }\n\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n\t `>= ${type ? 1 : 0} and <= ${length}`,\n\t value)\n\t}\n\n\t// HELPER FUNCTIONS\n\t// ================\n\n\tconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\n\tfunction base64clean (str) {\n\t // Node takes equal signs as end of the Base64 encoding\n\t str = str.split('=')[0];\n\t // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n\t str = str.trim().replace(INVALID_BASE64_RE, '');\n\t // Node converts strings with length < 2 to ''\n\t if (str.length < 2) return ''\n\t // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\t while (str.length % 4 !== 0) {\n\t str = str + '=';\n\t }\n\t return str\n\t}\n\n\tfunction utf8ToBytes (string, units) {\n\t units = units || Infinity;\n\t let codePoint;\n\t const length = string.length;\n\t let leadSurrogate = null;\n\t const bytes = [];\n\n\t for (let i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i);\n\n\t // is surrogate component\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t // last char was a lead\n\t if (!leadSurrogate) {\n\t // no lead yet\n\t if (codePoint > 0xDBFF) {\n\t // unexpected trail\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t } else if (i + 1 === length) {\n\t // unpaired lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t }\n\n\t // valid lead\n\t leadSurrogate = codePoint;\n\n\t continue\n\t }\n\n\t // 2 leads in a row\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t leadSurrogate = codePoint;\n\t continue\n\t }\n\n\t // valid surrogate pair\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n\t } else if (leadSurrogate) {\n\t // valid bmp char, but last char was a lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t }\n\n\t leadSurrogate = null;\n\n\t // encode utf8\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break\n\t bytes.push(codePoint);\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break\n\t bytes.push(\n\t codePoint >> 0x6 | 0xC0,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break\n\t bytes.push(\n\t codePoint >> 0xC | 0xE0,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break\n\t bytes.push(\n\t codePoint >> 0x12 | 0xF0,\n\t codePoint >> 0xC & 0x3F | 0x80,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else {\n\t throw new Error('Invalid code point')\n\t }\n\t }\n\n\t return bytes\n\t}\n\n\tfunction asciiToBytes (str) {\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t // Node's code seems to be doing this and not & 0x7F..\n\t byteArray.push(str.charCodeAt(i) & 0xFF);\n\t }\n\t return byteArray\n\t}\n\n\tfunction utf16leToBytes (str, units) {\n\t let c, hi, lo;\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break\n\n\t c = str.charCodeAt(i);\n\t hi = c >> 8;\n\t lo = c % 256;\n\t byteArray.push(lo);\n\t byteArray.push(hi);\n\t }\n\n\t return byteArray\n\t}\n\n\tfunction base64ToBytes (str) {\n\t return base64.toByteArray(base64clean(str))\n\t}\n\n\tfunction blitBuffer (src, dst, offset, length) {\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t if ((i + offset >= dst.length) || (i >= src.length)) break\n\t dst[i + offset] = src[i];\n\t }\n\t return i\n\t}\n\n\t// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n\t// the `instanceof` check but they should be treated as of that type.\n\t// See: https://github.com/feross/buffer/issues/166\n\tfunction isInstance (obj, type) {\n\t return obj instanceof type ||\n\t (obj != null && obj.constructor != null && obj.constructor.name != null &&\n\t obj.constructor.name === type.name)\n\t}\n\tfunction numberIsNaN (obj) {\n\t // For IE11 support\n\t return obj !== obj // eslint-disable-line no-self-compare\n\t}\n\n\t// Create lookup table for `toString('hex')`\n\t// See: https://github.com/feross/buffer/issues/219\n\tconst hexSliceLookupTable = (function () {\n\t const alphabet = '0123456789abcdef';\n\t const table = new Array(256);\n\t for (let i = 0; i < 16; ++i) {\n\t const i16 = i * 16;\n\t for (let j = 0; j < 16; ++j) {\n\t table[i16 + j] = alphabet[i] + alphabet[j];\n\t }\n\t }\n\t return table\n\t})();\n\n\t// Return not function with Error if BigInt not supported\n\tfunction defineBigIntMethod (fn) {\n\t return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n\t}\n\n\tfunction BufferBigIntNotDefined () {\n\t throw new Error('BigInt not supported')\n\t} \n} (buffer));\n\nconst Buffer = buffer.Buffer;\n\nconst Blob = buffer.Blob;\nconst BlobOptions = buffer.BlobOptions;\nconst Buffer$1 = buffer.Buffer;\nconst File = buffer.File;\nconst FileOptions = buffer.FileOptions;\nconst INSPECT_MAX_BYTES = buffer.INSPECT_MAX_BYTES;\nconst SlowBuffer = buffer.SlowBuffer;\nconst TranscodeEncoding = buffer.TranscodeEncoding;\nconst atob = buffer.atob;\nconst btoa = buffer.btoa;\nconst constants = buffer.constants;\nconst isAscii = buffer.isAscii;\nconst isUtf8 = buffer.isUtf8;\nconst kMaxLength = buffer.kMaxLength;\nconst kStringMaxLength = buffer.kStringMaxLength;\nconst resolveObjectURL = buffer.resolveObjectURL;\nconst transcode = buffer.transcode;\nexport { Blob, BlobOptions, Buffer$1 as Buffer, File, FileOptions, INSPECT_MAX_BYTES, SlowBuffer, TranscodeEncoding, atob, btoa, constants, Buffer as default, isAscii, isUtf8, kMaxLength, kStringMaxLength, resolveObjectURL, transcode };\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.8\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\n// copied from utils\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\n// Other libraries would silently corrupt the data instead of throwing an error,\n// when they don't support it.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!isBytes(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!isBytes(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n if (!isBytes(a))\n throw new Error('Uint8Array expected');\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import assert from \"@noble/hashes/_assert\";\nimport { hexToBytes as _hexToBytes } from \"@noble/hashes/utils\";\nconst assertBool = assert.bool;\nconst assertBytes = assert.bytes;\nexport { assertBool, assertBytes };\nexport { bytesToHex, bytesToHex as toHex, concatBytes, createView, utf8ToBytes } from \"@noble/hashes/utils\";\n// buf.toString('utf8') -> bytesToUtf8(buf)\nexport function bytesToUtf8(data) {\n if (!(data instanceof Uint8Array)) {\n throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof data}`);\n }\n return new TextDecoder().decode(data);\n}\nexport function hexToBytes(data) {\n const sliced = data.startsWith(\"0x\") ? data.substring(2) : data;\n return _hexToBytes(sliced);\n}\n// buf.equals(buf2) -> equalsBytes(buf, buf2)\nexport function equalsBytes(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n// Internal utils\nexport function wrapHash(hash) {\n return (msg) => {\n assert.bytes(msg);\n return hash(msg);\n };\n}\n// TODO(v3): switch away from node crypto, remove this unnecessary variable.\nexport const crypto = (() => {\n const webCrypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : undefined;\n const nodeRequire = typeof module !== \"undefined\" &&\n typeof module.require === \"function\" &&\n module.require.bind(module);\n return {\n node: nodeRequire && !webCrypto ? nodeRequire(\"crypto\") : undefined,\n web: webCrypto\n };\n})();\n","import { keccak_224, keccak_256, keccak_384, keccak_512 } from \"@noble/hashes/sha3\";\nimport { wrapHash } from \"./utils.js\";\nexport const keccak224 = wrapHash(keccak_224);\nexport const keccak256 = (() => {\n const k = wrapHash(keccak_256);\n k.create = keccak_256.create;\n return k;\n})();\nexport const keccak384 = wrapHash(keccak_384);\nexport const keccak512 = wrapHash(keccak_512);\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n// Response error\nexport const ERR_RESPONSE = 100;\nexport const ERR_INVALID_RESPONSE = 101;\n// Generic errors\nexport const ERR_PARAM = 200;\nexport const ERR_FORMATTERS = 201;\nexport const ERR_METHOD_NOT_IMPLEMENTED = 202;\nexport const ERR_OPERATION_TIMEOUT = 203;\nexport const ERR_OPERATION_ABORT = 204;\nexport const ERR_ABI_ENCODING = 205;\nexport const ERR_EXISTING_PLUGIN_NAMESPACE = 206;\nexport const ERR_INVALID_METHOD_PARAMS = 207;\n// Contract error codes\nexport const ERR_CONTRACT = 300;\nexport const ERR_CONTRACT_RESOLVER_MISSING = 301;\nexport const ERR_CONTRACT_ABI_MISSING = 302;\nexport const ERR_CONTRACT_REQUIRED_CALLBACK = 303;\nexport const ERR_CONTRACT_EVENT_NOT_EXISTS = 304;\nexport const ERR_CONTRACT_RESERVED_EVENT = 305;\nexport const ERR_CONTRACT_MISSING_DEPLOY_DATA = 306;\nexport const ERR_CONTRACT_MISSING_ADDRESS = 307;\nexport const ERR_CONTRACT_MISSING_FROM_ADDRESS = 308;\nexport const ERR_CONTRACT_INSTANTIATION = 309;\nexport const ERR_CONTRACT_EXECUTION_REVERTED = 310;\nexport const ERR_CONTRACT_TX_DATA_AND_INPUT = 311;\n// Transaction error codes\nexport const ERR_TX = 400;\nexport const ERR_TX_REVERT_INSTRUCTION = 401;\nexport const ERR_TX_REVERT_TRANSACTION = 402;\nexport const ERR_TX_NO_CONTRACT_ADDRESS = 403;\nexport const ERR_TX_CONTRACT_NOT_STORED = 404;\nexport const ERR_TX_REVERT_WITHOUT_REASON = 405;\nexport const ERR_TX_OUT_OF_GAS = 406;\nexport const ERR_RAW_TX_UNDEFINED = 407;\nexport const ERR_TX_INVALID_SENDER = 408;\nexport const ERR_TX_INVALID_CALL = 409;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN = 410;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN_ID = 411;\nexport const ERR_TX_CHAIN_ID_MISMATCH = 412;\nexport const ERR_TX_INVALID_CHAIN_INFO = 413;\nexport const ERR_TX_MISSING_CHAIN_INFO = 414;\nexport const ERR_TX_MISSING_GAS = 415;\nexport const ERR_TX_INVALID_LEGACY_GAS = 416;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS = 417;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS_PRICE = 418;\nexport const ERR_TX_INVALID_LEGACY_FEE_MARKET = 419;\nexport const ERR_TX_INVALID_OBJECT = 420;\nexport const ERR_TX_INVALID_NONCE_OR_CHAIN_ID = 421;\nexport const ERR_TX_UNABLE_TO_POPULATE_NONCE = 422;\nexport const ERR_TX_UNSUPPORTED_EIP_1559 = 423;\nexport const ERR_TX_UNSUPPORTED_TYPE = 424;\nexport const ERR_TX_DATA_AND_INPUT = 425;\nexport const ERR_TX_POLLING_TIMEOUT = 426;\nexport const ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL = 427;\nexport const ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = 428;\nexport const ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = 429;\nexport const ERR_TX_NOT_FOUND = 430;\nexport const ERR_TX_SEND_TIMEOUT = 431;\nexport const ERR_TX_BLOCK_TIMEOUT = 432;\nexport const ERR_TX_SIGNING = 433;\nexport const ERR_TX_GAS_MISMATCH = 434;\nexport const ERR_TX_CHAIN_MISMATCH = 435;\nexport const ERR_TX_HARDFORK_MISMATCH = 436;\nexport const ERR_TX_INVALID_RECEIVER = 437;\nexport const ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = 438;\nexport const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439;\nexport const ERR_TX_MISSING_GAS_INNER_ERROR = 440;\nexport const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441;\n// Connection error codes\nexport const ERR_CONN = 500;\nexport const ERR_CONN_INVALID = 501;\nexport const ERR_CONN_TIMEOUT = 502;\nexport const ERR_CONN_NOT_OPEN = 503;\nexport const ERR_CONN_CLOSE = 504;\nexport const ERR_CONN_MAX_ATTEMPTS = 505;\nexport const ERR_CONN_PENDING_REQUESTS = 506;\nexport const ERR_REQ_ALREADY_SENT = 507;\n// Provider error codes\nexport const ERR_PROVIDER = 600;\nexport const ERR_INVALID_PROVIDER = 601;\nexport const ERR_INVALID_CLIENT = 602;\nexport const ERR_SUBSCRIPTION = 603;\nexport const ERR_WS_PROVIDER = 604;\n// Account error codes\nexport const ERR_PRIVATE_KEY_LENGTH = 701;\nexport const ERR_INVALID_PRIVATE_KEY = 702;\nexport const ERR_UNSUPPORTED_KDF = 703;\nexport const ERR_KEY_DERIVATION_FAIL = 704;\nexport const ERR_KEY_VERSION_UNSUPPORTED = 705;\nexport const ERR_INVALID_PASSWORD = 706;\nexport const ERR_IV_LENGTH = 707;\nexport const ERR_INVALID_KEYSTORE = 708;\nexport const ERR_PBKDF2_ITERATIONS = 709;\n// Signature error codes\nexport const ERR_SIGNATURE_FAILED = 801;\nexport const ERR_INVALID_SIGNATURE = 802;\nexport const GENESIS_BLOCK_NUMBER = '0x0';\n// RPC error codes (EIP-1193)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\nexport const JSONRPC_ERR_REJECTED_REQUEST = 4001;\nexport const JSONRPC_ERR_UNAUTHORIZED = 4100;\nexport const JSONRPC_ERR_UNSUPPORTED_METHOD = 4200;\nexport const JSONRPC_ERR_DISCONNECTED = 4900;\nexport const JSONRPC_ERR_CHAIN_DISCONNECTED = 4901;\n// ENS error codes\nexport const ERR_ENS_CHECK_INTERFACE_SUPPORT = 901;\nexport const ERR_ENS_UNSUPPORTED_NETWORK = 902;\nexport const ERR_ENS_NETWORK_NOT_SYNCED = 903;\n// Utils error codes\nexport const ERR_INVALID_STRING = 1001;\nexport const ERR_INVALID_BYTES = 1002;\nexport const ERR_INVALID_NUMBER = 1003;\nexport const ERR_INVALID_UNIT = 1004;\nexport const ERR_INVALID_ADDRESS = 1005;\nexport const ERR_INVALID_HEX = 1006;\nexport const ERR_INVALID_TYPE = 1007;\nexport const ERR_INVALID_BOOLEAN = 1008;\nexport const ERR_INVALID_UNSIGNED_INTEGER = 1009;\nexport const ERR_INVALID_SIZE = 1010;\nexport const ERR_INVALID_LARGE_VALUE = 1011;\nexport const ERR_INVALID_BLOCK = 1012;\nexport const ERR_INVALID_TYPE_ABI = 1013;\nexport const ERR_INVALID_NIBBLE_WIDTH = 1014;\n// Validation error codes\nexport const ERR_VALIDATION = 1100;\n// Core error codes\nexport const ERR_CORE_HARDFORK_MISMATCH = 1101;\nexport const ERR_CORE_CHAIN_MISMATCH = 1102;\n// Schema error codes\nexport const ERR_SCHEMA_FORMAT = 1200;\n// RPC error codes (EIP-1474)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\nexport const ERR_RPC_INVALID_JSON = -32700;\nexport const ERR_RPC_INVALID_REQUEST = -32600;\nexport const ERR_RPC_INVALID_METHOD = -32601;\nexport const ERR_RPC_INVALID_PARAMS = -32602;\nexport const ERR_RPC_INTERNAL_ERROR = -32603;\nexport const ERR_RPC_INVALID_INPUT = -32000;\nexport const ERR_RPC_MISSING_RESOURCE = -32001;\nexport const ERR_RPC_UNAVAILABLE_RESOURCE = -32002;\nexport const ERR_RPC_TRANSACTION_REJECTED = -32003;\nexport const ERR_RPC_UNSUPPORTED_METHOD = -32004;\nexport const ERR_RPC_LIMIT_EXCEEDED = -32005;\nexport const ERR_RPC_NOT_SUPPORTED = -32006;\n//# sourceMappingURL=error_codes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport class BaseWeb3Error extends Error {\n constructor(msg, innerError) {\n super(msg);\n this.innerError = innerError;\n this.name = this.constructor.name;\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(new.target.constructor);\n }\n else {\n this.stack = new Error().stack;\n }\n }\n static convertToString(value, unquotValue = false) {\n // Using \"null\" value intentionally for validation\n // eslint-disable-next-line no-null/no-null\n if (value === null || value === undefined)\n return 'undefined';\n const result = JSON.stringify(value, (_, v) => (typeof v === 'bigint' ? v.toString() : v));\n return unquotValue && ['bigint', 'string'].includes(typeof value)\n ? result.replace(/['\\\\\"]+/g, '')\n : result;\n }\n toJSON() {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n innerError: this.innerError,\n };\n }\n}\nexport class InvalidValueError extends BaseWeb3Error {\n constructor(value, msg) {\n super(`Invalid value given \"${BaseWeb3Error.convertToString(value, true)}\". Error: ${msg}.`);\n this.name = this.constructor.name;\n }\n}\n//# sourceMappingURL=web3_error_base.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_INVALID_BYTES, ERR_INVALID_NUMBER, ERR_INVALID_ADDRESS, ERR_INVALID_BLOCK, ERR_INVALID_BOOLEAN, ERR_INVALID_HEX, ERR_INVALID_LARGE_VALUE, ERR_INVALID_NIBBLE_WIDTH, ERR_INVALID_SIZE, ERR_INVALID_STRING, ERR_INVALID_TYPE, ERR_INVALID_TYPE_ABI, ERR_INVALID_UNIT, ERR_INVALID_UNSIGNED_INTEGER, } from '../error_codes.js';\nimport { InvalidValueError } from '../web3_error_base.js';\nexport class InvalidBytesError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not parse as byte data');\n this.code = ERR_INVALID_BYTES;\n }\n}\nexport class InvalidNumberError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not parse as number data');\n this.code = ERR_INVALID_NUMBER;\n }\n}\nexport class InvalidAddressError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid ethereum address');\n this.code = ERR_INVALID_ADDRESS;\n }\n}\nexport class InvalidStringError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid string');\n this.code = ERR_INVALID_STRING;\n }\n}\nexport class InvalidUnitError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid unit');\n this.code = ERR_INVALID_UNIT;\n }\n}\nexport class HexProcessingError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not be converted to hex');\n this.code = ERR_INVALID_HEX;\n }\n}\nexport class NibbleWidthError extends InvalidValueError {\n constructor(value) {\n super(value, 'value greater than the nibble width');\n this.code = ERR_INVALID_NIBBLE_WIDTH;\n }\n}\nexport class InvalidTypeError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid type, type not supported');\n this.code = ERR_INVALID_TYPE;\n }\n}\nexport class InvalidBooleanError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid boolean.');\n this.code = ERR_INVALID_BOOLEAN;\n }\n}\nexport class InvalidUnsignedIntegerError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid unsigned integer.');\n this.code = ERR_INVALID_UNSIGNED_INTEGER;\n }\n}\nexport class InvalidSizeError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid size given.');\n this.code = ERR_INVALID_SIZE;\n }\n}\nexport class InvalidLargeValueError extends InvalidValueError {\n constructor(value) {\n super(value, 'value is larger than size.');\n this.code = ERR_INVALID_LARGE_VALUE;\n }\n}\nexport class InvalidBlockError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid string given');\n this.code = ERR_INVALID_BLOCK;\n }\n}\nexport class InvalidTypeAbiInputError extends InvalidValueError {\n constructor(value) {\n super(value, 'components found but type is not tuple');\n this.code = ERR_INVALID_TYPE_ABI;\n }\n}\n//# sourceMappingURL=utils_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, JSONRPC_ERR_CHAIN_DISCONNECTED, JSONRPC_ERR_DISCONNECTED, JSONRPC_ERR_REJECTED_REQUEST, JSONRPC_ERR_UNAUTHORIZED, JSONRPC_ERR_UNSUPPORTED_METHOD, } from '../error_codes.js';\n/**\n * A template string for a generic Rpc Error. The `*code*` will be replaced with the code number.\n * Note: consider in next version that a spelling mistake could be corrected for `occured` and the value could be:\n * \t`An Rpc error has occurred with a code of *code*`\n */\nexport const genericRpcErrorMessageTemplate = 'An Rpc error has occured with a code of *code*';\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const RpcErrorMessages = {\n // EIP-1474 & JSON RPC 2.0\n // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\n [ERR_RPC_INVALID_JSON]: {\n message: 'Parse error',\n description: 'Invalid JSON',\n },\n [ERR_RPC_INVALID_REQUEST]: {\n message: 'Invalid request',\n description: 'JSON is not a valid request object\t',\n },\n [ERR_RPC_INVALID_METHOD]: {\n message: 'Method not found',\n description: 'Method does not exist\t',\n },\n [ERR_RPC_INVALID_PARAMS]: {\n message: 'Invalid params',\n description: 'Invalid method parameters',\n },\n [ERR_RPC_INTERNAL_ERROR]: {\n message: 'Internal error',\n description: 'Internal JSON-RPC error',\n },\n [ERR_RPC_INVALID_INPUT]: {\n message: 'Invalid input',\n description: 'Missing or invalid parameters',\n },\n [ERR_RPC_MISSING_RESOURCE]: {\n message: 'Resource not found',\n description: 'Requested resource not found',\n },\n [ERR_RPC_UNAVAILABLE_RESOURCE]: {\n message: 'Resource unavailable',\n description: 'Requested resource not available',\n },\n [ERR_RPC_TRANSACTION_REJECTED]: {\n message: 'Transaction rejected',\n description: 'Transaction creation failed',\n },\n [ERR_RPC_UNSUPPORTED_METHOD]: {\n message: 'Method not supported',\n description: 'Method is not implemented',\n },\n [ERR_RPC_LIMIT_EXCEEDED]: {\n message: 'Limit exceeded',\n description: 'Request exceeds defined limit',\n },\n [ERR_RPC_NOT_SUPPORTED]: {\n message: 'JSON-RPC version not supported',\n description: 'Version of JSON-RPC protocol is not supported',\n },\n // EIP-1193\n // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\n [JSONRPC_ERR_REJECTED_REQUEST]: {\n name: 'User Rejected Request',\n message: 'The user rejected the request.',\n },\n [JSONRPC_ERR_UNAUTHORIZED]: {\n name: 'Unauthorized',\n message: 'The requested method and/or account has not been authorized by the user.',\n },\n [JSONRPC_ERR_UNSUPPORTED_METHOD]: {\n name: 'Unsupported Method',\n message: 'The Provider does not support the requested method.',\n },\n [JSONRPC_ERR_DISCONNECTED]: {\n name: 'Disconnected',\n message: 'The Provider is disconnected from all chains.',\n },\n [JSONRPC_ERR_CHAIN_DISCONNECTED]: {\n name: 'Chain Disconnected',\n message: 'The Provider is not connected to the requested chain.',\n },\n // EIP-1193 - CloseEvent\n // https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code\n '0-999': {\n name: '',\n message: 'Not used.',\n },\n 1000: {\n name: 'Normal Closure',\n message: 'The connection successfully completed the purpose for which it was created.',\n },\n 1001: {\n name: 'Going Away',\n message: 'The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.',\n },\n 1002: {\n name: 'Protocol error',\n message: 'The endpoint is terminating the connection due to a protocol error.',\n },\n 1003: {\n name: 'Unsupported Data',\n message: 'The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)',\n },\n 1004: {\n name: 'Reserved',\n message: 'Reserved. A meaning might be defined in the future.',\n },\n 1005: {\n name: 'No Status Rcvd',\n message: 'Reserved. Indicates that no status code was provided even though one was expected.',\n },\n 1006: {\n name: 'Abnormal Closure',\n message: 'Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.',\n },\n 1007: {\n name: 'Invalid frame payload data',\n message: 'The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).',\n },\n 1008: {\n name: 'Policy Violation',\n message: 'The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.',\n },\n 1009: {\n name: 'Message Too Big',\n message: 'The endpoint is terminating the connection because a data frame was received that is too large.',\n },\n 1010: {\n name: 'Mandatory Ext.',\n message: \"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.\",\n },\n 1011: {\n name: 'Internal Error',\n message: 'The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.',\n },\n 1012: {\n name: 'Service Restart',\n message: 'The server is terminating the connection because it is restarting.',\n },\n 1013: {\n name: 'Try Again Later',\n message: 'The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.',\n },\n 1014: {\n name: 'Bad Gateway',\n message: 'The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.',\n },\n 1015: {\n name: 'TLS handshake',\n message: \"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).\",\n },\n '1016-2999': {\n name: '',\n message: 'For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications.',\n },\n '3000-3999': {\n name: '',\n message: 'For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol.',\n },\n '4000-4999': {\n name: '',\n message: \"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol.\",\n },\n};\n//# sourceMappingURL=rpc_error_messages.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BaseWeb3Error } from '../web3_error_base.js';\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, } from '../error_codes.js';\nimport { RpcErrorMessages, genericRpcErrorMessageTemplate } from './rpc_error_messages.js';\nexport class RpcError extends BaseWeb3Error {\n constructor(rpcError, message) {\n super(message !== null && message !== void 0 ? message : genericRpcErrorMessageTemplate.replace('*code*', rpcError.error.code.toString()));\n this.code = rpcError.error.code;\n this.id = rpcError.id;\n this.jsonrpc = rpcError.jsonrpc;\n this.jsonRpcError = rpcError.error;\n }\n toJSON() {\n return Object.assign(Object.assign({}, super.toJSON()), { error: this.jsonRpcError, id: this.id, jsonRpc: this.jsonrpc });\n }\n}\nexport class EIP1193ProviderRpcError extends BaseWeb3Error {\n constructor(code, data) {\n var _a, _b, _c, _d;\n if (!code) {\n // this case should ideally not happen\n super();\n }\n else if ((_a = RpcErrorMessages[code]) === null || _a === void 0 ? void 0 : _a.message) {\n super(RpcErrorMessages[code].message);\n }\n else {\n // Retrieve the status code object for the given code from the table, by searching through the appropriate range\n const statusCodeRange = Object.keys(RpcErrorMessages).find(statusCode => typeof statusCode === 'string' &&\n code >= parseInt(statusCode.split('-')[0], 10) &&\n code <= parseInt(statusCode.split('-')[1], 10));\n super((_c = (_b = RpcErrorMessages[statusCodeRange !== null && statusCodeRange !== void 0 ? statusCodeRange : '']) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : genericRpcErrorMessageTemplate.replace('*code*', (_d = code === null || code === void 0 ? void 0 : code.toString()) !== null && _d !== void 0 ? _d : '\"\"'));\n }\n this.code = code;\n this.data = data;\n }\n}\nexport class ParseError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_JSON].message);\n this.code = ERR_RPC_INVALID_JSON;\n }\n}\nexport class InvalidRequestError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_REQUEST].message);\n this.code = ERR_RPC_INVALID_REQUEST;\n }\n}\nexport class MethodNotFoundError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_METHOD].message);\n this.code = ERR_RPC_INVALID_METHOD;\n }\n}\nexport class InvalidParamsError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_PARAMS].message);\n this.code = ERR_RPC_INVALID_PARAMS;\n }\n}\nexport class InternalError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INTERNAL_ERROR].message);\n this.code = ERR_RPC_INTERNAL_ERROR;\n }\n}\nexport class InvalidInputError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_INPUT].message);\n this.code = ERR_RPC_INVALID_INPUT;\n }\n}\nexport class MethodNotSupported extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_UNSUPPORTED_METHOD].message);\n this.code = ERR_RPC_UNSUPPORTED_METHOD;\n }\n}\nexport class ResourceUnavailableError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_UNAVAILABLE_RESOURCE].message);\n this.code = ERR_RPC_UNAVAILABLE_RESOURCE;\n }\n}\nexport class ResourcesNotFoundError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_MISSING_RESOURCE].message);\n this.code = ERR_RPC_MISSING_RESOURCE;\n }\n}\nexport class VersionNotSupportedError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_NOT_SUPPORTED].message);\n this.code = ERR_RPC_NOT_SUPPORTED;\n }\n}\nexport class TransactionRejectedError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_TRANSACTION_REJECTED].message);\n this.code = ERR_RPC_TRANSACTION_REJECTED;\n }\n}\nexport class LimitExceededError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_LIMIT_EXCEEDED].message);\n this.code = ERR_RPC_LIMIT_EXCEEDED;\n }\n}\nexport const rpcErrorsMap = new Map();\nrpcErrorsMap.set(ERR_RPC_INVALID_JSON, { error: ParseError });\nrpcErrorsMap.set(ERR_RPC_INVALID_REQUEST, {\n error: InvalidRequestError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_METHOD, {\n error: MethodNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_PARAMS, { error: InvalidParamsError });\nrpcErrorsMap.set(ERR_RPC_INTERNAL_ERROR, { error: InternalError });\nrpcErrorsMap.set(ERR_RPC_INVALID_INPUT, { error: InvalidInputError });\nrpcErrorsMap.set(ERR_RPC_UNSUPPORTED_METHOD, {\n error: MethodNotSupported,\n});\nrpcErrorsMap.set(ERR_RPC_UNAVAILABLE_RESOURCE, {\n error: ResourceUnavailableError,\n});\nrpcErrorsMap.set(ERR_RPC_TRANSACTION_REJECTED, {\n error: TransactionRejectedError,\n});\nrpcErrorsMap.set(ERR_RPC_MISSING_RESOURCE, {\n error: ResourcesNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_NOT_SUPPORTED, {\n error: VersionNotSupportedError,\n});\nrpcErrorsMap.set(ERR_RPC_LIMIT_EXCEEDED, { error: LimitExceededError });\n//# sourceMappingURL=rpc_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { ERR_SCHEMA_FORMAT } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class SchemaFormatError extends BaseWeb3Error {\n constructor(type) {\n super(`Format for the type ${type} is unsupported`);\n this.type = type;\n this.code = ERR_SCHEMA_FORMAT;\n }\n toJSON() {\n return Object.assign(Object.assign({}, super.toJSON()), { type: this.type });\n }\n}\n//# sourceMappingURL=schema_errors.js.map","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.issues.length) {\n return {\n status: \"dirty\",\n value: ctx.data,\n };\n }\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n if (isValid(result)) {\n result.value = Object.freeze(result.value);\n }\n return result;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nconst custom = (check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BaseWeb3Error, ERR_VALIDATION } from 'web3-errors';\nconst errorFormatter = (error) => {\n if (error.message) {\n return error.message;\n }\n return 'unspecified error';\n};\nexport class Web3ValidatorError extends BaseWeb3Error {\n constructor(errors) {\n super();\n this.code = ERR_VALIDATION;\n this.errors = errors;\n super.message = `Web3 validator found ${errors.length} error[s]:\\n${this._compileErrors().join('\\n')}`;\n }\n _compileErrors() {\n return this.errors.map(errorFormatter);\n }\n}\n//# sourceMappingURL=errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport const VALID_ETH_BASE_TYPES = ['bool', 'int', 'uint', 'bytes', 'string', 'address', 'tuple'];\n//# sourceMappingURL=constants.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport const isAbiParameterSchema = (schema) => typeof schema === 'object' && 'type' in schema && 'name' in schema;\n//# sourceMappingURL=abi.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/**\n * checks input if typeof data is valid string input\n */\nexport const isString = (value) => typeof value === 'string';\nexport const isHexStrict = (hex) => typeof hex === 'string' && /^((-)?0x[0-9a-f]+|(0x))$/i.test(hex);\n/**\n * Is the string a hex string.\n *\n * @param value\n * @param length\n * @returns output the string is a hex string\n */\nexport function isHexString(value, length) {\n if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/))\n return false;\n if (typeof length !== 'undefined' && length > 0 && value.length !== 2 + 2 * length)\n return false;\n return true;\n}\nexport const isHex = (hex) => typeof hex === 'number' ||\n typeof hex === 'bigint' ||\n (typeof hex === 'string' && /^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(hex));\nexport const isHexString8Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 18 : isHex(value) && value.length === 16;\nexport const isHexString32Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 66 : isHex(value) && value.length === 64;\n/**\n * Returns a `Boolean` on whether or not the a `String` starts with '0x'\n * @param str the string input value\n * @return a boolean if it is or is not hex prefixed\n * @throws if the str input is not a string\n */\nexport function isHexPrefixed(str) {\n if (typeof str !== 'string') {\n throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof str}`);\n }\n return str.startsWith('0x');\n}\n/**\n * Checks provided Uint8Array for leading zeroes and throws if found.\n *\n * Examples:\n *\n * Valid values: 0x1, 0x, 0x01, 0x1234\n * Invalid values: 0x0, 0x00, 0x001, 0x0001\n *\n * Note: This method is useful for validating that RLP encoded integers comply with the rule that all\n * integer values encoded to RLP must be in the most compact form and contain no leading zero bytes\n * @param values An object containing string keys and Uint8Array values\n * @throws if any provided value is found to have leading zero bytes\n */\nexport const validateNoLeadingZeroes = function (values) {\n for (const [k, v] of Object.entries(values)) {\n if (v !== undefined && v.length > 0 && v[0] === 0) {\n throw new Error(`${k} cannot have leading zeroes, received: ${v.toString()}`);\n }\n }\n};\n//# sourceMappingURL=string.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { InvalidBytesError, InvalidNumberError } from 'web3-errors';\nimport { VALID_ETH_BASE_TYPES } from './constants.js';\nimport { isAbiParameterSchema } from './validation/abi.js';\nimport { isHexStrict } from './validation/string.js';\nimport { Web3ValidatorError } from './errors.js';\nconst extraTypes = ['hex', 'number', 'blockNumber', 'blockNumberOrTag', 'filter', 'bloom'];\nexport const parseBaseType = (type) => {\n // Remove all empty spaces to avoid any parsing issue.\n let strippedType = type.replace(/ /, '');\n let baseTypeSize;\n let isArray = false;\n let arraySizes = [];\n if (type.includes('[')) {\n // Extract the array type\n strippedType = strippedType.slice(0, strippedType.indexOf('['));\n // Extract array indexes\n arraySizes = [...type.matchAll(/(?:\\[(\\d*)\\])/g)]\n .map(match => parseInt(match[1], 10))\n .map(size => (Number.isNaN(size) ? -1 : size));\n isArray = arraySizes.length > 0;\n }\n if (VALID_ETH_BASE_TYPES.includes(strippedType)) {\n return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n }\n if (strippedType.startsWith('int')) {\n baseTypeSize = parseInt(strippedType.substring(3), 10);\n strippedType = 'int';\n }\n else if (strippedType.startsWith('uint')) {\n baseTypeSize = parseInt(type.substring(4), 10);\n strippedType = 'uint';\n }\n else if (strippedType.startsWith('bytes')) {\n baseTypeSize = parseInt(strippedType.substring(5), 10);\n strippedType = 'bytes';\n }\n else {\n return { baseType: undefined, isArray: false, baseTypeSize: undefined, arraySizes };\n }\n return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n};\nconst convertEthType = (type, parentSchema = {}) => {\n const typePropertyPresent = Object.keys(parentSchema).includes('type');\n if (typePropertyPresent) {\n throw new Web3ValidatorError([\n {\n keyword: 'eth',\n message: 'Either \"eth\" or \"type\" can be presented in schema',\n params: { eth: type },\n instancePath: '',\n schemaPath: '',\n },\n ]);\n }\n const { baseType, baseTypeSize } = parseBaseType(type);\n if (!baseType && !extraTypes.includes(type)) {\n throw new Web3ValidatorError([\n {\n keyword: 'eth',\n message: `Eth data type \"${type}\" is not valid`,\n params: { eth: type },\n instancePath: '',\n schemaPath: '',\n },\n ]);\n }\n if (baseType) {\n if (baseType === 'tuple') {\n throw new Error('\"tuple\" type is not implemented directly.');\n }\n return { format: `${baseType}${baseTypeSize !== null && baseTypeSize !== void 0 ? baseTypeSize : ''}`, required: true };\n }\n if (type) {\n return { format: type, required: true };\n }\n return {};\n};\nexport const abiSchemaToJsonSchema = (abis, level = '/0') => {\n const schema = {\n type: 'array',\n items: [],\n maxItems: abis.length,\n minItems: abis.length,\n };\n for (const [index, abi] of abis.entries()) {\n // eslint-disable-next-line no-nested-ternary\n let abiType;\n let abiName;\n let abiComponents = [];\n // If it's a complete Abi Parameter\n // e.g. {name: 'a', type: 'uint'}\n if (isAbiParameterSchema(abi)) {\n abiType = abi.type;\n abiName = abi.name;\n abiComponents = abi.components;\n // If its short form string value e.g. ['uint']\n }\n else if (typeof abi === 'string') {\n abiType = abi;\n abiName = `${level}/${index}`;\n // If it's provided in short form of tuple e.g. [['uint', 'string']]\n }\n else if (Array.isArray(abi)) {\n // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n if (abi[0] &&\n typeof abi[0] === 'string' &&\n abi[0].startsWith('tuple') &&\n !Array.isArray(abi[0]) &&\n abi[1] &&\n Array.isArray(abi[1])) {\n // eslint-disable-next-line prefer-destructuring\n abiType = abi[0];\n abiName = `${level}/${index}`;\n abiComponents = abi[1];\n }\n else {\n abiType = 'tuple';\n abiName = `${level}/${index}`;\n abiComponents = abi;\n }\n }\n const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n let childSchema;\n let lastSchema = schema;\n for (let i = arraySizes.length - 1; i > 0; i -= 1) {\n childSchema = {\n type: 'array',\n $id: abiName,\n items: [],\n maxItems: arraySizes[i],\n minItems: arraySizes[i],\n };\n if (arraySizes[i] < 0) {\n delete childSchema.maxItems;\n delete childSchema.minItems;\n }\n // lastSchema.items is a Schema, concat with 'childSchema'\n if (!Array.isArray(lastSchema.items)) {\n lastSchema.items = [lastSchema.items, childSchema];\n } // lastSchema.items is an empty Scheme array, set it to 'childSchema'\n else if (lastSchema.items.length === 0) {\n lastSchema.items = [childSchema];\n } // lastSchema.items is a non-empty Scheme array, append 'childSchema'\n else {\n lastSchema.items.push(childSchema);\n }\n lastSchema = childSchema;\n }\n if (baseType === 'tuple' && !isArray) {\n const nestedTuple = abiSchemaToJsonSchema(abiComponents, abiName);\n nestedTuple.$id = abiName;\n lastSchema.items.push(nestedTuple);\n }\n else if (baseType === 'tuple' && isArray) {\n const arraySize = arraySizes[0];\n const item = Object.assign({ type: 'array', $id: abiName, items: abiSchemaToJsonSchema(abiComponents, abiName) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n lastSchema.items.push(item);\n }\n else if (isArray) {\n const arraySize = arraySizes[0];\n const item = Object.assign({ type: 'array', $id: abiName, items: convertEthType(abiType) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n lastSchema.items.push(item);\n }\n else if (Array.isArray(lastSchema.items)) {\n // Array of non-tuple items\n lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n }\n else {\n // Nested object\n lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n }\n lastSchema = schema;\n }\n return schema;\n};\nexport const ethAbiToJsonSchema = (abis) => abiSchemaToJsonSchema(abis);\nexport const fetchArrayElement = (data, level) => {\n if (level === 1) {\n return data;\n }\n return fetchArrayElement(data[0], level - 1);\n};\nexport const transformJsonDataToAbiFormat = (abis, data, transformedData) => {\n const newData = [];\n for (const [index, abi] of abis.entries()) {\n // eslint-disable-next-line no-nested-ternary\n let abiType;\n let abiName;\n let abiComponents = [];\n // If it's a complete Abi Parameter\n // e.g. {name: 'a', type: 'uint'}\n if (isAbiParameterSchema(abi)) {\n abiType = abi.type;\n abiName = abi.name;\n abiComponents = abi.components;\n // If its short form string value e.g. ['uint']\n }\n else if (typeof abi === 'string') {\n abiType = abi;\n // If it's provided in short form of tuple e.g. [['uint', 'string']]\n }\n else if (Array.isArray(abi)) {\n // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n if (abi[1] && Array.isArray(abi[1])) {\n abiType = abi[0];\n abiComponents = abi[1];\n }\n else {\n abiType = 'tuple';\n abiComponents = abi;\n }\n }\n const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n const dataItem = Array.isArray(data)\n ? data[index]\n : data[abiName];\n if (baseType === 'tuple' && !isArray) {\n newData.push(transformJsonDataToAbiFormat(abiComponents, dataItem, transformedData));\n }\n else if (baseType === 'tuple' && isArray) {\n const tupleData = [];\n for (const tupleItem of dataItem) {\n // Nested array\n if (arraySizes.length > 1) {\n const nestedItems = fetchArrayElement(tupleItem, arraySizes.length - 1);\n const nestedData = [];\n for (const nestedItem of nestedItems) {\n nestedData.push(transformJsonDataToAbiFormat(abiComponents, nestedItem, transformedData));\n }\n tupleData.push(nestedData);\n }\n else {\n tupleData.push(transformJsonDataToAbiFormat(abiComponents, tupleItem, transformedData));\n }\n }\n newData.push(tupleData);\n }\n else {\n newData.push(dataItem);\n }\n }\n // Have to reassign before pushing to transformedData\n // eslint-disable-next-line no-param-reassign\n transformedData = transformedData !== null && transformedData !== void 0 ? transformedData : [];\n transformedData.push(...newData);\n return transformedData;\n};\n/**\n * Code points to int\n */\nexport const codePointToInt = (codePoint) => {\n if (codePoint >= 48 && codePoint <= 57) {\n /* ['0'..'9'] -> [0..9] */\n return codePoint - 48;\n }\n if (codePoint >= 65 && codePoint <= 70) {\n /* ['A'..'F'] -> [10..15] */\n return codePoint - 55;\n }\n if (codePoint >= 97 && codePoint <= 102) {\n /* ['a'..'f'] -> [10..15] */\n return codePoint - 87;\n }\n throw new Error(`Invalid code point: ${codePoint}`);\n};\n/**\n * Converts value to it's number representation\n */\nexport const hexToNumber = (value) => {\n if (!isHexStrict(value)) {\n throw new Error('Invalid hex string');\n }\n const [negative, hexValue] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n const num = BigInt(hexValue);\n if (num > Number.MAX_SAFE_INTEGER) {\n return negative ? -num : num;\n }\n if (num < Number.MIN_SAFE_INTEGER) {\n return num;\n }\n return negative ? -1 * Number(num) : Number(num);\n};\n/**\n * Converts value to it's hex representation\n */\nexport const numberToHex = (value) => {\n if ((typeof value === 'number' || typeof value === 'bigint') && value < 0) {\n return `-0x${value.toString(16).slice(1)}`;\n }\n if ((typeof value === 'number' || typeof value === 'bigint') && value >= 0) {\n return `0x${value.toString(16)}`;\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n const [negative, hex] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n const hexValue = hex.split(/^(-)?0(x|X)/).slice(-1)[0];\n return `${negative ? '-' : ''}0x${hexValue.replace(/^0+/, '').toLowerCase()}`;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return numberToHex(BigInt(value));\n }\n throw new InvalidNumberError(value);\n};\n/**\n * Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string.\n */\nexport const padLeft = (value, characterAmount, sign = '0') => {\n if (typeof value === 'string' && !isHexStrict(value)) {\n return value.padStart(characterAmount, sign);\n }\n const hex = typeof value === 'string' && isHexStrict(value) ? value : numberToHex(value);\n const [prefix, hexValue] = hex.startsWith('-') ? ['-0x', hex.slice(3)] : ['0x', hex.slice(2)];\n return `${prefix}${hexValue.padStart(characterAmount, sign)}`;\n};\nexport function uint8ArrayToHexString(uint8Array) {\n let hexString = '0x';\n for (const e of uint8Array) {\n const hex = e.toString(16);\n hexString += hex.length === 1 ? `0${hex}` : hex;\n }\n return hexString;\n}\n// for optimized technique for hex to bytes conversion\nconst charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102,\n};\nfunction charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return undefined;\n}\nexport function hexToUint8Array(hex) {\n let offset = 0;\n if (hex.startsWith('0') && (hex[1] === 'x' || hex[1] === 'X')) {\n offset = 2;\n }\n if (hex.length % 2 !== 0) {\n throw new InvalidBytesError(`hex string has odd length: ${hex}`);\n }\n const length = (hex.length - offset) / 2;\n const bytes = new Uint8Array(length);\n for (let index = 0, j = offset; index < length; index += 1) {\n // eslint-disable-next-line no-plusplus\n const nibbleLeft = charCodeToBase16(hex.charCodeAt(j++));\n // eslint-disable-next-line no-plusplus\n const nibbleRight = charCodeToBase16(hex.charCodeAt(j++));\n if (nibbleLeft === undefined || nibbleRight === undefined) {\n throw new InvalidBytesError(`Invalid byte sequence (\"${hex[j - 2]}${hex[j - 1]}\" in \"${hex}\").`);\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n}\n// @TODO: Remove this function and its usages once all sub dependencies uses version 1.3.3 or above of @noble/hashes\nexport function ensureIfUint8Array(data) {\n var _a;\n if (!(data instanceof Uint8Array) &&\n ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array') {\n return Uint8Array.from(data);\n }\n return data;\n}\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { hexToUint8Array, parseBaseType } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * checks input if typeof data is valid Uint8Array input\n */\nexport const isUint8Array = (data) => { var _a; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array'; };\nexport const isBytes = (value, options = {\n abiType: 'bytes',\n}) => {\n if (typeof value !== 'string' && !Array.isArray(value) && !isUint8Array(value)) {\n return false;\n }\n // isHexStrict also accepts - prefix which can not exists in bytes\n if (typeof value === 'string' && isHexStrict(value) && value.startsWith('-')) {\n return false;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return false;\n }\n let valueToCheck;\n if (typeof value === 'string') {\n if (value.length % 2 !== 0) {\n // odd length hex\n return false;\n }\n valueToCheck = hexToUint8Array(value);\n }\n else if (Array.isArray(value)) {\n if (value.some(d => d < 0 || d > 255 || !Number.isInteger(d))) {\n return false;\n }\n valueToCheck = new Uint8Array(value);\n }\n else {\n valueToCheck = value;\n }\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize } = parseBaseType(options.abiType);\n return baseTypeSize ? valueToCheck.length === baseTypeSize : true;\n }\n if (options === null || options === void 0 ? void 0 : options.size) {\n return valueToCheck.length === (options === null || options === void 0 ? void 0 : options.size);\n }\n return true;\n};\n//# sourceMappingURL=bytes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { utf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { ensureIfUint8Array, uint8ArrayToHexString } from '../utils.js';\nimport { isHexStrict } from './string.js';\nimport { isUint8Array } from './bytes.js';\n/**\n * Checks the checksum of a given address. Will also return false on non-checksum addresses.\n */\nexport const checkAddressCheckSum = (data) => {\n if (!/^(0x)?[0-9a-f]{40}$/i.test(data))\n return false;\n const address = data.slice(2);\n const updatedData = utf8ToBytes(address.toLowerCase());\n const addressHash = uint8ArrayToHexString(keccak256(ensureIfUint8Array(updatedData))).slice(2);\n for (let i = 0; i < 40; i += 1) {\n // the nth letter should be uppercase if the nth digit of casemap is 1\n if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) ||\n (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {\n return false;\n }\n }\n return true;\n};\n/**\n * Checks if a given string is a valid Ethereum address. It will also check the checksum, if the address has upper and lowercase letters.\n */\nexport const isAddress = (value, checkChecksum = true) => {\n if (typeof value !== 'string' && !isUint8Array(value)) {\n return false;\n }\n let valueToCheck;\n if (isUint8Array(value)) {\n valueToCheck = uint8ArrayToHexString(value);\n }\n else if (typeof value === 'string' && !isHexStrict(value)) {\n valueToCheck = value.toLowerCase().startsWith('0x') ? value : `0x${value}`;\n }\n else {\n valueToCheck = value;\n }\n // check if it has the basic requirements of an address\n if (!/^(0x)?[0-9a-f]{40}$/i.test(valueToCheck)) {\n return false;\n }\n // If it's ALL lowercase or ALL upppercase\n if (/^(0x|0X)?[0-9a-f]{40}$/.test(valueToCheck) ||\n /^(0x|0X)?[0-9A-F]{40}$/.test(valueToCheck)) {\n return true;\n // Otherwise check each case\n }\n return checkChecksum ? checkAddressCheckSum(valueToCheck) : true;\n};\n//# sourceMappingURL=address.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport var FMT_NUMBER;\n(function (FMT_NUMBER) {\n FMT_NUMBER[\"NUMBER\"] = \"NUMBER_NUMBER\";\n FMT_NUMBER[\"HEX\"] = \"NUMBER_HEX\";\n FMT_NUMBER[\"STR\"] = \"NUMBER_STR\";\n FMT_NUMBER[\"BIGINT\"] = \"NUMBER_BIGINT\";\n})(FMT_NUMBER || (FMT_NUMBER = {}));\nexport var FMT_BYTES;\n(function (FMT_BYTES) {\n FMT_BYTES[\"HEX\"] = \"BYTES_HEX\";\n FMT_BYTES[\"UINT8ARRAY\"] = \"BYTES_UINT8ARRAY\";\n})(FMT_BYTES || (FMT_BYTES = {}));\nexport const DEFAULT_RETURN_FORMAT = { number: FMT_NUMBER.BIGINT, bytes: FMT_BYTES.HEX };\nexport const ETH_DATA_FORMAT = { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX };\n//# sourceMappingURL=data_format_types.js.map","export var BlockTags;\n(function (BlockTags) {\n BlockTags[\"EARLIEST\"] = \"earliest\";\n BlockTags[\"LATEST\"] = \"latest\";\n BlockTags[\"PENDING\"] = \"pending\";\n BlockTags[\"SAFE\"] = \"safe\";\n BlockTags[\"FINALIZED\"] = \"finalized\";\n})(BlockTags || (BlockTags = {}));\n// This list of hardforks is expected to be in order\n// keep this in mind when making changes to it\nexport var HardforksOrdered;\n(function (HardforksOrdered) {\n HardforksOrdered[\"chainstart\"] = \"chainstart\";\n HardforksOrdered[\"frontier\"] = \"frontier\";\n HardforksOrdered[\"homestead\"] = \"homestead\";\n HardforksOrdered[\"dao\"] = \"dao\";\n HardforksOrdered[\"tangerineWhistle\"] = \"tangerineWhistle\";\n HardforksOrdered[\"spuriousDragon\"] = \"spuriousDragon\";\n HardforksOrdered[\"byzantium\"] = \"byzantium\";\n HardforksOrdered[\"constantinople\"] = \"constantinople\";\n HardforksOrdered[\"petersburg\"] = \"petersburg\";\n HardforksOrdered[\"istanbul\"] = \"istanbul\";\n HardforksOrdered[\"muirGlacier\"] = \"muirGlacier\";\n HardforksOrdered[\"berlin\"] = \"berlin\";\n HardforksOrdered[\"london\"] = \"london\";\n HardforksOrdered[\"altair\"] = \"altair\";\n HardforksOrdered[\"arrowGlacier\"] = \"arrowGlacier\";\n HardforksOrdered[\"grayGlacier\"] = \"grayGlacier\";\n HardforksOrdered[\"bellatrix\"] = \"bellatrix\";\n HardforksOrdered[\"merge\"] = \"merge\";\n HardforksOrdered[\"capella\"] = \"capella\";\n HardforksOrdered[\"shanghai\"] = \"shanghai\";\n})(HardforksOrdered || (HardforksOrdered = {}));\n//# sourceMappingURL=eth_types.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nconst symbol = Symbol.for('web3/base-provider');\n// Provider interface compatible with EIP-1193\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md\nexport class Web3BaseProvider {\n static isWeb3Provider(provider) {\n return (provider instanceof Web3BaseProvider ||\n Boolean(provider && provider[symbol]));\n }\n // To match an object \"instanceof\" does not work if\n // matcher class and object is using different package versions\n // to overcome this bottleneck used this approach.\n // The symbol value for one string will always remain same regardless of package versions\n // eslint-disable-next-line class-methods-use-this\n get [symbol]() {\n return true;\n }\n /**\n * @deprecated Please use `.request` instead.\n * @param payload - Request Payload\n * @param callback - Callback\n */\n send(payload, \n // eslint-disable-next-line @typescript-eslint/ban-types\n callback) {\n this.request(payload)\n .then(response => {\n // eslint-disable-next-line no-null/no-null\n callback(null, response);\n })\n .catch((err) => {\n callback(err);\n });\n }\n /**\n * @deprecated Please use `.request` instead.\n * @param payload - Request Payload\n */\n sendAsync(payload) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(payload);\n });\n }\n /**\n * Modify the return type of the request method to be fully compatible with EIP-1193\n *\n * [deprecated] In the future major releases (\\>= v5) all providers are supposed to be fully compatible with EIP-1193.\n * So this method will not be needed and would not be available in the future.\n *\n * @returns A new instance of the provider with the request method fully compatible with EIP-1193\n *\n * @example\n * ```ts\n * const provider = new Web3HttpProvider('http://localhost:8545');\n * const fullyCompatibleProvider = provider.asEIP1193Provider();\n * const result = await fullyCompatibleProvider.request({ method: 'eth_getBalance' });\n * console.log(result); // '0x0234c8a3397aab58' or something like that\n * ```\n */\n asEIP1193Provider() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const newObj = Object.create(this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalRequest = newObj.request;\n newObj.request = function request(args) {\n return __awaiter(this, void 0, void 0, function* () {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const response = (yield originalRequest(args));\n return response.result;\n });\n };\n // @ts-expect-error the property should not be available in the new object because of using Object.create(this).\n //\tBut it is available if we do not delete it.\n newObj.asEIP1193Provider = undefined; // to prevent the user for calling this method again\n return newObj;\n }\n}\n//# sourceMappingURL=web3_base_provider.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { parseBaseType, hexToNumber } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * Checks if a given value is a valid big int\n */\nexport const isBigInt = (value) => typeof value === 'bigint';\n// Note: this could be simplified using ** operator, but babel does not handle it well\n// \tyou can find more at: https://github.com/babel/babel/issues/13109 and https://github.com/web3/web3.js/issues/6187\n/** @internal */\nexport const bigintPower = (base, expo) => {\n let res = base;\n for (let index = 1; index < expo; index += 1) {\n res *= base;\n }\n return res;\n};\nexport const isUInt = (value, options = {\n abiType: 'uint',\n}) => {\n if (!['number', 'string', 'bigint'].includes(typeof value) ||\n (typeof value === 'string' && value.length === 0)) {\n return false;\n }\n let size;\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize } = parseBaseType(options.abiType);\n if (baseTypeSize) {\n size = baseTypeSize;\n }\n }\n else if (options.bitSize) {\n size = options.bitSize;\n }\n const maxSize = bigintPower(BigInt(2), BigInt(size !== null && size !== void 0 ? size : 256)) - BigInt(1);\n try {\n const valueToCheck = typeof value === 'string' && isHexStrict(value)\n ? BigInt(hexToNumber(value))\n : BigInt(value);\n return valueToCheck >= 0 && valueToCheck <= maxSize;\n }\n catch (error) {\n // Some invalid number value given which can not be converted via BigInt\n return false;\n }\n};\nexport const isInt = (value, options = {\n abiType: 'int',\n}) => {\n if (!['number', 'string', 'bigint'].includes(typeof value)) {\n return false;\n }\n if (typeof value === 'number' && value > Number.MAX_SAFE_INTEGER) {\n return false;\n }\n let size;\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize, baseType } = parseBaseType(options.abiType);\n if (baseType !== 'int') {\n return false;\n }\n if (baseTypeSize) {\n size = baseTypeSize;\n }\n }\n else if (options.bitSize) {\n size = options.bitSize;\n }\n const maxSize = bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n const minSize = BigInt(-1) * bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n try {\n const valueToCheck = typeof value === 'string' && isHexStrict(value)\n ? BigInt(hexToNumber(value))\n : BigInt(value);\n return valueToCheck >= minSize && valueToCheck <= maxSize;\n }\n catch (error) {\n // Some invalid number value given which can not be converted via BigInt\n return false;\n }\n};\nexport const isNumber = (value) => {\n if (isInt(value)) {\n return true;\n }\n // It would be a decimal number\n if (typeof value === 'string' &&\n /[0-9.]/.test(value) &&\n value.indexOf('.') === value.lastIndexOf('.')) {\n return true;\n }\n if (typeof value === 'number') {\n return true;\n }\n return false;\n};\n//# sourceMappingURL=numbers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BlockTags } from 'web3-types';\nimport { isUInt } from './numbers.js';\nexport const isBlockNumber = (value) => isUInt(value);\n/**\n * Returns true if the given blockNumber is 'latest', 'pending', 'earliest, 'safe' or 'finalized'\n */\nexport const isBlockTag = (value) => Object.values(BlockTags).includes(value);\n/**\n * Returns true if given value is valid hex string and not negative, or is a valid BlockTag\n */\nexport const isBlockNumberOrTag = (value) => isBlockTag(value) || isBlockNumber(value);\n//# sourceMappingURL=block.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { codePointToInt, hexToUint8Array, padLeft, uint8ArrayToHexString } from '../utils.js';\nimport { isAddress } from './address.js';\nimport { isHexStrict } from './string.js';\n/**\n * Returns true if the bloom is a valid bloom\n * https://github.com/joshstevens19/ethereum-bloom-filters/blob/fbeb47b70b46243c3963fe1c2988d7461ef17236/src/index.ts#L7\n */\nexport const isBloom = (bloom) => {\n if (typeof bloom !== 'string') {\n return false;\n }\n if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) {\n return false;\n }\n if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if the value is part of the given bloom\n * note: false positives are possible.\n */\nexport const isInBloom = (bloom, value) => {\n if (typeof value === 'string' && !isHexStrict(value)) {\n return false;\n }\n if (!isBloom(bloom)) {\n return false;\n }\n const uint8Array = typeof value === 'string' ? hexToUint8Array(value) : value;\n const hash = uint8ArrayToHexString(keccak256(uint8Array)).slice(2);\n for (let i = 0; i < 12; i += 4) {\n // calculate bit position in bloom filter that must be active\n const bitpos = \n // eslint-disable-next-line no-bitwise\n ((parseInt(hash.slice(i, i + 2), 16) << 8) + parseInt(hash.slice(i + 2, i + 4), 16)) &\n 2047;\n // test if bitpos in bloom is active\n const code = codePointToInt(bloom.charCodeAt(bloom.length - 1 - Math.floor(bitpos / 4)));\n // eslint-disable-next-line no-bitwise\n const offset = 1 << bitpos % 4;\n // eslint-disable-next-line no-bitwise\n if ((code & offset) !== offset) {\n return false;\n }\n }\n return true;\n};\n/**\n * Returns true if the ethereum users address is part of the given bloom note: false positives are possible.\n */\nexport const isUserEthereumAddressInBloom = (bloom, ethereumAddress) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isAddress(ethereumAddress)) {\n return false;\n }\n // you have to pad the ethereum address to 32 bytes\n // else the bloom filter does not work\n // this is only if your matching the USERS\n // ethereum address. Contract address do not need this\n // hence why we have 2 methods\n // (0x is not in the 2nd parameter of padleft so 64 chars is fine)\n const address = padLeft(ethereumAddress, 64);\n return isInBloom(bloom, address);\n};\n/**\n * Returns true if the contract address is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isContractAddressInBloom = (bloom, contractAddress) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isAddress(contractAddress)) {\n return false;\n }\n return isInBloom(bloom, contractAddress);\n};\n//# sourceMappingURL=bloom.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isHexStrict } from './string.js';\nexport const isBoolean = (value) => {\n if (!['number', 'string', 'boolean'].includes(typeof value)) {\n return false;\n }\n if (typeof value === 'boolean') {\n return true;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return value === '1' || value === '0';\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n return value === '0x1' || value === '0x0';\n }\n // type === number\n return value === 1 || value === 0;\n};\n//# sourceMappingURL=boolean.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { TypedArray } from 'web3-types';\n// Explicitly check for the\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isNullish = (item) => \n// Using \"null\" value intentionally for validation\n// eslint-disable-next-line no-null/no-null\nitem === undefined || item === null;\nexport const isObject = (item) => typeof item === 'object' &&\n !isNullish(item) &&\n !Array.isArray(item) &&\n !(item instanceof TypedArray);\n//# sourceMappingURL=object.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isBloom, isInBloom } from './bloom.js';\n/**\n * Checks if its a valid topic\n */\nexport const isTopic = (topic) => {\n if (typeof topic !== 'string') {\n return false;\n }\n if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) {\n return false;\n }\n if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if the topic is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isTopicInBloom = (bloom, topic) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isTopic(topic)) {\n return false;\n }\n return isInBloom(bloom, topic);\n};\n//# sourceMappingURL=topic.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isAddress } from './address.js';\nimport { isBlockNumberOrTag } from './block.js';\nimport { isNullish } from './object.js';\nimport { isTopic } from './topic.js';\n/**\n * First we check if all properties in the provided value are expected,\n * then because all Filter properties are optional, we check if the expected properties\n * are defined. If defined and they're not the expected type, we immediately return false,\n * otherwise we return true after all checks pass.\n */\nexport const isFilterObject = (value) => {\n const expectedFilterProperties = [\n 'fromBlock',\n 'toBlock',\n 'address',\n 'topics',\n 'blockHash',\n ];\n if (isNullish(value) || typeof value !== 'object')\n return false;\n if (!Object.keys(value).every(property => expectedFilterProperties.includes(property)))\n return false;\n if ((!isNullish(value.fromBlock) && !isBlockNumberOrTag(value.fromBlock)) ||\n (!isNullish(value.toBlock) && !isBlockNumberOrTag(value.toBlock)))\n return false;\n if (!isNullish(value.address)) {\n if (Array.isArray(value.address)) {\n if (!value.address.every(address => isAddress(address)))\n return false;\n }\n else if (!isAddress(value.address))\n return false;\n }\n if (!isNullish(value.topics)) {\n if (!value.topics.every(topic => {\n if (isNullish(topic))\n return true;\n if (Array.isArray(topic)) {\n return topic.every(nestedTopic => isTopic(nestedTopic));\n }\n if (isTopic(topic))\n return true;\n return false;\n }))\n return false;\n }\n return true;\n};\n//# sourceMappingURL=filter.js.map","import { isAddress } from './validation/address.js';\nimport { isBlockNumber, isBlockNumberOrTag, isBlockTag } from './validation/block.js';\nimport { isBloom } from './validation/bloom.js';\nimport { isBoolean } from './validation/boolean.js';\nimport { isBytes } from './validation/bytes.js';\nimport { isFilterObject } from './validation/filter.js';\nimport { isHexStrict, isString } from './validation/string.js';\nimport { isNumber, isInt, isUInt } from './validation/numbers.js';\nconst formats = {\n address: (data) => isAddress(data),\n bloom: (data) => isBloom(data),\n blockNumber: (data) => isBlockNumber(data),\n blockTag: (data) => isBlockTag(data),\n blockNumberOrTag: (data) => isBlockNumberOrTag(data),\n bool: (data) => isBoolean(data),\n bytes: (data) => isBytes(data),\n filter: (data) => isFilterObject(data),\n hex: (data) => isHexStrict(data),\n uint: (data) => isUInt(data),\n int: (data) => isInt(data),\n number: (data) => isNumber(data),\n string: (data) => isString(data),\n};\n// generate formats for all numbers types\nfor (let bitSize = 8; bitSize <= 256; bitSize += 8) {\n formats[`int${bitSize}`] = data => isInt(data, { bitSize });\n formats[`uint${bitSize}`] = data => isUInt(data, { bitSize });\n}\n// generate bytes\nfor (let size = 1; size <= 32; size += 1) {\n formats[`bytes${size}`] = data => isBytes(data, { size });\n}\nformats.bytes256 = formats.bytes;\nexport default formats;\n//# sourceMappingURL=formats.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { SchemaFormatError } from 'web3-errors';\nimport { z, ZodIssueCode } from 'zod';\nimport { Web3ValidatorError } from './errors.js';\nimport formats from './formats.js';\nconst convertToZod = (schema) => {\n if ((!(schema === null || schema === void 0 ? void 0 : schema.type) || (schema === null || schema === void 0 ? void 0 : schema.type) === 'object') && (schema === null || schema === void 0 ? void 0 : schema.properties)) {\n const obj = {};\n for (const name of Object.keys(schema.properties)) {\n const zItem = convertToZod(schema.properties[name]);\n if (zItem) {\n obj[name] = zItem;\n }\n }\n if (Array.isArray(schema.required)) {\n return z\n .object(obj)\n .partial()\n .required(schema.required.reduce((acc, v) => (Object.assign(Object.assign({}, acc), { [v]: true })), {}));\n }\n return z.object(obj).partial();\n }\n if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'array' && (schema === null || schema === void 0 ? void 0 : schema.items)) {\n if (Array.isArray(schema.items) && schema.items.length > 1\n && schema.maxItems !== undefined\n && new Set(schema.items.map((item) => item.$id)).size === schema.items.length) {\n const arr = [];\n for (const item of schema.items) {\n const zItem = convertToZod(item);\n if (zItem) {\n arr.push(zItem);\n }\n }\n return z.tuple(arr);\n }\n const nextSchema = Array.isArray(schema.items) ? schema.items[0] : schema.items;\n let zodArraySchema = z.array(convertToZod(nextSchema));\n zodArraySchema = schema.minItems !== undefined ? zodArraySchema.min(schema.minItems) : zodArraySchema;\n zodArraySchema = schema.maxItems !== undefined ? zodArraySchema.max(schema.maxItems) : zodArraySchema;\n return zodArraySchema;\n }\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n return z.union(schema.oneOf.map(oneOfSchema => convertToZod(oneOfSchema)));\n }\n if (schema === null || schema === void 0 ? void 0 : schema.format) {\n if (!formats[schema.format]) {\n throw new SchemaFormatError(schema.format);\n }\n return z.any().refine(formats[schema.format], (value) => ({\n params: { value, format: schema.format },\n }));\n }\n if ((schema === null || schema === void 0 ? void 0 : schema.type) &&\n (schema === null || schema === void 0 ? void 0 : schema.type) !== 'object' &&\n typeof z[String(schema.type)] === 'function') {\n return z[String(schema.type)]();\n }\n return z.object({ data: z.any() }).partial();\n};\nexport class Validator {\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n static factory() {\n if (!Validator.validatorInstance) {\n Validator.validatorInstance = new Validator();\n }\n return Validator.validatorInstance;\n }\n validate(schema, data, options) {\n var _a, _b;\n const zod = convertToZod(schema);\n const result = zod.safeParse(data);\n if (!result.success) {\n const errors = this.convertErrors((_b = (_a = result.error) === null || _a === void 0 ? void 0 : _a.issues) !== null && _b !== void 0 ? _b : []);\n if (errors) {\n if (options === null || options === void 0 ? void 0 : options.silent) {\n return errors;\n }\n throw new Web3ValidatorError(errors);\n }\n }\n return undefined;\n }\n // eslint-disable-next-line class-methods-use-this\n convertErrors(errors) {\n if (errors && Array.isArray(errors) && errors.length > 0) {\n return errors.map((error) => {\n var _a;\n let message;\n let keyword;\n let params;\n let schemaPath;\n schemaPath = error.path.join('/');\n const field = String(error.path[error.path.length - 1]);\n const instancePath = error.path.join('/');\n if (error.code === ZodIssueCode.too_big) {\n keyword = 'maxItems';\n schemaPath = `${instancePath}/maxItems`;\n params = { limit: error.maximum };\n message = `must NOT have more than ${error.maximum} items`;\n }\n else if (error.code === ZodIssueCode.too_small) {\n keyword = 'minItems';\n schemaPath = `${instancePath}/minItems`;\n params = { limit: error.minimum };\n message = `must NOT have fewer than ${error.minimum} items`;\n }\n else if (error.code === ZodIssueCode.custom) {\n const { value, format } = ((_a = error.params) !== null && _a !== void 0 ? _a : {});\n if (typeof value === 'undefined') {\n message = `value at \"/${schemaPath}\" is required`;\n }\n else {\n message = `value \"${\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n typeof value === 'object' ? JSON.stringify(value) : value}\" at \"/${schemaPath}\" must pass \"${format}\" validation`;\n }\n params = { value };\n }\n return {\n keyword: keyword !== null && keyword !== void 0 ? keyword : field,\n instancePath: instancePath ? `/${instancePath}` : '',\n schemaPath: schemaPath ? `#${schemaPath}` : '#',\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params: params !== null && params !== void 0 ? params : { value: error.message },\n message: message !== null && message !== void 0 ? message : error.message,\n };\n });\n }\n return undefined;\n }\n}\n//# sourceMappingURL=validator.js.map","import { Validator } from './validator.js';\nimport { ethAbiToJsonSchema } from './utils.js';\nimport { Web3ValidatorError } from './errors.js';\nexport class Web3Validator {\n constructor() {\n this._validator = Validator.factory();\n }\n validateJSONSchema(schema, data, options) {\n return this._validator.validate(schema, data, options);\n }\n validate(schema, data, options = { silent: false }) {\n var _a, _b;\n const jsonSchema = ethAbiToJsonSchema(schema);\n if (Array.isArray(jsonSchema.items) &&\n ((_a = jsonSchema.items) === null || _a === void 0 ? void 0 : _a.length) === 0 &&\n data.length === 0) {\n return undefined;\n }\n if (Array.isArray(jsonSchema.items) &&\n ((_b = jsonSchema.items) === null || _b === void 0 ? void 0 : _b.length) === 0 &&\n data.length !== 0) {\n throw new Web3ValidatorError([\n {\n instancePath: '/0',\n schemaPath: '/',\n keyword: 'required',\n message: 'empty schema against data can not be validated',\n params: data,\n },\n ]);\n }\n return this._validator.validate(jsonSchema, data, options);\n }\n}\n//# sourceMappingURL=web3_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { Web3Validator } from './web3_validator.js';\nexport const validator = new Web3Validator();\n//# sourceMappingURL=default_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport function isUint8Array(data) {\n var _a;\n return (data instanceof Uint8Array ||\n ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array');\n}\nexport function uint8ArrayConcat(...parts) {\n const length = parts.reduce((prev, part) => {\n const agg = prev + part.length;\n return agg;\n }, 0);\n const result = new Uint8Array(length);\n let offset = 0;\n for (const part of parts) {\n result.set(part, offset);\n offset += part.length;\n }\n return result;\n}\n/**\n * Returns true if the two passed Uint8Arrays have the same content\n */\nexport function uint8ArrayEquals(a, b) {\n if (a === b) {\n return true;\n }\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (let i = 0; i < a.byteLength; i += 1) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=uint8array.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/**\n * @module Utils\n */\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { bytesToUtf8, utf8ToBytes as ecUtf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { isAddress, isHex, isHexStrict, isInt, isUInt, isNullish, utils, utils as validatorUtils, validator, } from 'web3-validator';\nimport { HexProcessingError, InvalidAddressError, InvalidBooleanError, InvalidBytesError, InvalidNumberError, InvalidUnitError, } from 'web3-errors';\nimport { isUint8Array } from './uint8array.js';\n// Ref: https://ethdocs.org/en/latest/ether.html\n// Note: this could be simplified using ** operator, but babel does not handle it well (https://github.com/babel/babel/issues/13109)\n/** @internal */\nexport const ethUnitMap = {\n noether: BigInt(0),\n wei: BigInt(1),\n kwei: BigInt(1000),\n Kwei: BigInt(1000),\n babbage: BigInt(1000),\n femtoether: BigInt(1000),\n mwei: BigInt(1000000),\n Mwei: BigInt(1000000),\n lovelace: BigInt(1000000),\n picoether: BigInt(1000000),\n gwei: BigInt(1000000000),\n Gwei: BigInt(1000000000),\n shannon: BigInt(1000000000),\n nanoether: BigInt(1000000000),\n nano: BigInt(1000000000),\n szabo: BigInt(1000000000000),\n microether: BigInt(1000000000000),\n micro: BigInt(1000000000000),\n finney: BigInt(1000000000000000),\n milliether: BigInt(1000000000000000),\n milli: BigInt(1000000000000000),\n ether: BigInt('1000000000000000000'),\n kether: BigInt('1000000000000000000000'),\n grand: BigInt('1000000000000000000000'),\n mether: BigInt('1000000000000000000000000'),\n gether: BigInt('1000000000000000000000000000'),\n tether: BigInt('1000000000000000000000000000000'),\n};\n/**\n * Convert a value from bytes to Uint8Array\n * @param data - Data to be converted\n * @returns - The Uint8Array representation of the input data\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToUint8Array(\"0xab\")));\n * > Uint8Array(1) [ 171 ]\n * ```\n */\nexport const bytesToUint8Array = (data) => {\n validator.validate(['bytes'], [data]);\n if (isUint8Array(data)) {\n return data;\n }\n if (Array.isArray(data)) {\n return new Uint8Array(data);\n }\n if (typeof data === 'string') {\n return validatorUtils.hexToUint8Array(data);\n }\n throw new InvalidBytesError(data);\n};\n/**\n * @internal\n */\nconst { uint8ArrayToHexString } = validatorUtils;\n/**\n * Convert a byte array to a hex string\n * @param bytes - Byte array to be converted\n * @returns - The hex string representation of the input byte array\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToHex(new Uint8Array([72, 12])));\n * > \"0x480c\"\n *\n */\nexport const bytesToHex = (bytes) => uint8ArrayToHexString(bytesToUint8Array(bytes));\n/**\n * Convert a hex string to a byte array\n * @param hex - Hex string to be converted\n * @returns - The byte array representation of the input hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToBytes('0x74657374'));\n * > Uint8Array(4) [ 116, 101, 115, 116 ]\n * ```\n */\nexport const hexToBytes = (bytes) => {\n if (typeof bytes === 'string' && bytes.slice(0, 2).toLowerCase() !== '0x') {\n return bytesToUint8Array(`0x${bytes}`);\n }\n return bytesToUint8Array(bytes);\n};\n/**\n * Converts value to it's number representation\n * @param value - Hex string to be converted\n * @returns - The number representation of the input value\n *\n * @example\n * ```ts\n * conoslle.log(web3.utils.hexToNumber('0xa'));\n * > 10\n * ```\n */\nexport const hexToNumber = (value) => {\n validator.validate(['hex'], [value]);\n // To avoid duplicate code and circular dependency we will\n // use `hexToNumber` implementation from `web3-validator`\n return validatorUtils.hexToNumber(value);\n};\n/**\n * Converts value to it's number representation @alias `hexToNumber`\n */\nexport const toDecimal = hexToNumber;\n/**\n * Converts value to it's hex representation\n * @param value - Value to be converted\n * @param hexstrict - Add padding to converted value if odd, to make it hexstrict\n * @returns - The hex representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.numberToHex(10));\n * > \"0xa\"\n * ```\n */\nexport const numberToHex = (value, hexstrict) => {\n if (typeof value !== 'bigint')\n validator.validate(['int'], [value]);\n // To avoid duplicate code and circular dependency we will\n // use `numberToHex` implementation from `web3-validator`\n let updatedValue = validatorUtils.numberToHex(value);\n if (hexstrict) {\n if (!updatedValue.startsWith('-') && updatedValue.length % 2 === 1) {\n // To avoid duplicate a circular dependency we will not be using the padLeft method\n updatedValue = '0x0'.concat(updatedValue.slice(2));\n }\n else if (updatedValue.length % 2 === 0 && updatedValue.startsWith('-'))\n updatedValue = '-0x0'.concat(updatedValue.slice(3));\n }\n return updatedValue;\n};\n/**\n * Converts value to it's hex representation @alias `numberToHex`\n *\n */\nexport const fromDecimal = numberToHex;\n/**\n * Converts value to it's decimal representation in string\n * @param value - Hex string to be converted\n * @returns - The decimal representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToNumberString('0xa'));\n * > \"10\"\n * ```\n */\nexport const hexToNumberString = (data) => hexToNumber(data).toString();\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n * @param str - Utf8 string to be converted\n * @returns - The hex representation of the input string\n *\n * @example\n * ```ts\n * console.log(utf8ToHex('web3.js'));\n * > \"0x776562332e6a73\"\n * ```\n *\n */\nexport const utf8ToHex = (str) => {\n validator.validate(['string'], [str]);\n // To be compatible with 1.x trim null character\n // eslint-disable-next-line no-control-regex\n let strWithoutNullCharacter = str.replace(/^(?:\\u0000)/, '');\n // eslint-disable-next-line no-control-regex\n strWithoutNullCharacter = strWithoutNullCharacter.replace(/(?:\\u0000)$/, '');\n return bytesToHex(new TextEncoder().encode(strWithoutNullCharacter));\n};\n/**\n * @alias utf8ToHex\n */\nexport const fromUtf8 = utf8ToHex;\n/**\n * @alias utf8ToHex\n */\nexport const stringToHex = utf8ToHex;\n/**\n * Should be called to get utf8 from it's hex representation\n * @param str - Hex string to be converted\n * @returns - Utf8 string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToUtf8('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToUtf8 = (str) => bytesToUtf8(hexToBytes(str));\n/**\n * @alias hexToUtf8\n */\nexport const toUtf8 = (input) => {\n if (typeof input === 'string') {\n return hexToUtf8(input);\n }\n validator.validate(['bytes'], [input]);\n return bytesToUtf8(input);\n};\nexport const utf8ToBytes = ecUtf8ToBytes;\n/**\n * @alias hexToUtf8\n */\nexport const hexToString = hexToUtf8;\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n * @param str - String to be converted to hex\n * @returns - Hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.asciiToHex('Hello World'));\n * > 0x48656c6c6f20576f726c64\n * ```\n */\nexport const asciiToHex = (str) => {\n validator.validate(['string'], [str]);\n let hexString = '';\n for (let i = 0; i < str.length; i += 1) {\n const hexCharCode = str.charCodeAt(i).toString(16);\n // might need a leading 0\n hexString += hexCharCode.length % 2 !== 0 ? `0${hexCharCode}` : hexCharCode;\n }\n return `0x${hexString}`;\n};\n/**\n * @alias asciiToHex\n */\nexport const fromAscii = asciiToHex;\n/**\n * Should be called to get ascii from it's hex representation\n * @param str - Hex string to be converted to ascii\n * @returns - Ascii string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToAscii('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToAscii = (str) => {\n const decoder = new TextDecoder('ascii');\n return decoder.decode(hexToBytes(str));\n};\n/**\n * @alias hexToAscii\n */\nexport const toAscii = hexToAscii;\n/**\n * Auto converts any given value into it's hex representation.\n * @param value - Value to be converted to hex\n * @param returnType - If true, it will return the type of the value\n *\n * @example\n * ```ts\n * console.log(web3.utils.toHex(10));\n * > 0xa\n *\n * console.log(web3.utils.toHex('0x123', true));\n * > bytes\n *```\n */\nexport const toHex = (value, returnType) => {\n if (typeof value === 'string' && isAddress(value)) {\n return returnType ? 'address' : `0x${value.toLowerCase().replace(/^0x/i, '')}`;\n }\n if (typeof value === 'boolean') {\n // eslint-disable-next-line no-nested-ternary\n return returnType ? 'bool' : value ? '0x01' : '0x00';\n }\n if (typeof value === 'number') {\n // eslint-disable-next-line no-nested-ternary\n return returnType ? (value < 0 ? 'int256' : 'uint256') : numberToHex(value);\n }\n if (typeof value === 'bigint') {\n return returnType ? 'bigint' : numberToHex(value);\n }\n if (typeof value === 'object' && !!value) {\n return returnType ? 'string' : utf8ToHex(JSON.stringify(value));\n }\n if (typeof value === 'string') {\n if (value.startsWith('-0x') || value.startsWith('-0X')) {\n return returnType ? 'int256' : numberToHex(value);\n }\n if (isHexStrict(value)) {\n return returnType ? 'bytes' : value;\n }\n if (isHex(value) && !isInt(value) && !isUInt(value)) {\n return returnType ? 'bytes' : `0x${value}`;\n }\n if (isHex(value) && !isInt(value) && isUInt(value)) {\n return returnType ? 'uint' : numberToHex(value);\n }\n if (!Number.isFinite(value)) {\n return returnType ? 'string' : utf8ToHex(value);\n }\n }\n throw new HexProcessingError(value);\n};\n/**\n * Converts any given value into it's number representation, if possible, else into it's bigint representation.\n * @param value - The value to convert\n * @returns - Returns the value in number or bigint representation\n *\n * @example\n * ```ts\n * console.log(web3.utils.toNumber(1));\n * > 1\n * console.log(web3.utils.toNumber(Number.MAX_SAFE_INTEGER));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER)));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)));\n * > 9007199254740992n\n *\n * ```\n */\nexport const toNumber = (value) => {\n if (typeof value === 'number') {\n if (value > 1e+20) {\n // JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,\n // leading to potential parsing errors and incorrect representations.\n // For instance, String(10000000000000000000000) yields '1e+22'.\n // Using BigInt prevents this\n return BigInt(value);\n }\n return value;\n }\n if (typeof value === 'bigint') {\n return value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER\n ? Number(value)\n : value;\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n return hexToNumber(value);\n }\n try {\n return toNumber(BigInt(value));\n }\n catch (_a) {\n throw new InvalidNumberError(value);\n }\n};\n/**\n * Auto converts any given value into it's bigint representation\n *\n * @param value - The value to convert\n * @returns - Returns the value in bigint representation\n\n * @example\n * ```ts\n * console.log(web3.utils.toBigInt(1));\n * > 1n\n * ```\n */\nexport const toBigInt = (value) => {\n if (typeof value === 'number') {\n return BigInt(value);\n }\n if (typeof value === 'bigint') {\n return value;\n }\n // isHex passes for dec, too\n if (typeof value === 'string' && isHex(value)) {\n if (value.startsWith('-')) {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n }\n throw new InvalidNumberError(value);\n};\n/**\n * Takes a number of wei and converts it to any other ether unit.\n * @param number - The value in wei\n * @param unit - The unit to convert to\n * @returns - Returns the converted value in the given unit\n *\n * @example\n * ```ts\n * console.log(web3.utils.fromWei(\"1\", \"ether\"));\n * > 0.000000000000000001\n *\n * console.log(web3.utils.fromWei(\"1\", \"shannon\"));\n * > 0.000000001\n * ```\n */\nexport const fromWei = (number, unit) => {\n const denomination = ethUnitMap[unit];\n if (!denomination) {\n throw new InvalidUnitError(unit);\n }\n // value in wei would always be integer\n // 13456789, 1234\n const value = String(toNumber(number));\n // count number of zeros in denomination\n // 1000000 -> 6\n const numberOfZerosInDenomination = denomination.toString().length - 1;\n if (numberOfZerosInDenomination <= 0) {\n return value.toString();\n }\n // pad the value with required zeros\n // 13456789 -> 13456789, 1234 -> 001234\n const zeroPaddedValue = value.padStart(numberOfZerosInDenomination, '0');\n // get the integer part of value by counting number of zeros from start\n // 13456789 -> '13'\n // 001234 -> ''\n const integer = zeroPaddedValue.slice(0, -numberOfZerosInDenomination);\n // get the fraction part of value by counting number of zeros backward\n // 13456789 -> '456789'\n // 001234 -> '001234'\n const fraction = zeroPaddedValue.slice(-numberOfZerosInDenomination).replace(/\\.?0+$/, '');\n if (integer === '') {\n return `0.${fraction}`;\n }\n if (fraction === '') {\n return integer;\n }\n return `${integer}.${fraction}`;\n};\n/**\n * Takes a number of a unit and converts it to wei.\n *\n * @param number - The number to convert.\n * @param unit - {@link EtherUnits} The unit of the number passed.\n * @returns The number converted to wei.\n *\n * @example\n * ```ts\n * console.log(web3.utils.toWei(\"0.001\", \"ether\"));\n * > 1000000000000000 //(wei)\n * ```\n */\n// todo in 1.x unit defaults to 'ether'\nexport const toWei = (number, unit) => {\n validator.validate(['number'], [number]);\n const denomination = ethUnitMap[unit];\n if (!denomination) {\n throw new InvalidUnitError(unit);\n }\n // if value is decimal e.g. 24.56 extract `integer` and `fraction` part\n // to avoid `fraction` to be null use `concat` with empty string\n const [integer, fraction] = String(typeof number === 'string' && !isHexStrict(number) ? number : toNumber(number))\n .split('.')\n .concat('');\n // join the value removing `.` from\n // 24.56 -> 2456\n const value = BigInt(`${integer}${fraction}`);\n // multiply value with denomination\n // 2456 * 1000000 -> 2456000000\n const updatedValue = value * denomination;\n // count number of zeros in denomination\n const numberOfZerosInDenomination = denomination.toString().length - 1;\n // check which either `fraction` or `denomination` have lower number of zeros\n const decimals = Math.min(fraction.length, numberOfZerosInDenomination);\n if (decimals === 0) {\n return updatedValue.toString();\n }\n // Add zeros to make length equal to required decimal points\n // If string is larger than decimal points required then remove last zeros\n return updatedValue.toString().padStart(decimals, '0').slice(0, -decimals);\n};\n/**\n * Will convert an upper or lowercase Ethereum address to a checksum address.\n * @param address - An address string\n * @returns\tThe checksum address\n * @example\n * ```ts\n * web3.utils.toChecksumAddress('0xc1912fee45d61c87cc5ea59dae31190fffff232d');\n * > \"0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d\"\n * ```\n */\nexport const toChecksumAddress = (address) => {\n if (!isAddress(address, false)) {\n throw new InvalidAddressError(address);\n }\n const lowerCaseAddress = address.toLowerCase().replace(/^0x/i, '');\n // calling `Uint8Array.from` because `noble-hashes` checks with `instanceof Uint8Array` that fails in some edge cases:\n // \thttps://github.com/paulmillr/noble-hashes/issues/25#issuecomment-1750106284\n const hash = utils.uint8ArrayToHexString(keccak256(validatorUtils.ensureIfUint8Array(utf8ToBytes(lowerCaseAddress))));\n if (isNullish(hash) ||\n hash === '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470')\n return ''; // // EIP-1052 if hash is equal to c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, keccak was given empty data\n let checksumAddress = '0x';\n const addressHash = hash.replace(/^0x/i, '');\n for (let i = 0; i < lowerCaseAddress.length; i += 1) {\n // If ith character is 8 to f then make it uppercase\n if (parseInt(addressHash[i], 16) > 7) {\n checksumAddress += lowerCaseAddress[i].toUpperCase();\n }\n else {\n checksumAddress += lowerCaseAddress[i];\n }\n }\n return checksumAddress;\n};\nexport const toBool = (value) => {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'number' && (value === 0 || value === 1)) {\n return Boolean(value);\n }\n if (typeof value === 'bigint' && (value === BigInt(0) || value === BigInt(1))) {\n return Boolean(value);\n }\n if (typeof value === 'string' &&\n !isHexStrict(value) &&\n (value === '1' || value === '0' || value === 'false' || value === 'true')) {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n return Boolean(Number(value));\n }\n if (typeof value === 'string' && isHexStrict(value) && (value === '0x1' || value === '0x0')) {\n return Boolean(toNumber(value));\n }\n throw new InvalidBooleanError(value);\n};\n//# sourceMappingURL=converters.js.map","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\nvar\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n/*\r\n * Create and return a BigNumber constructor.\r\n */\r\nfunction clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n P[Symbol.toStringTag] = 'BigNumber';\r\n\r\n // Node.js v10.12.0+\r\n P[Symbol.for('nodejs.util.inspect.custom')] = P.valueOf;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n}\r\n\r\n\r\n// PRIVATE HELPER FUNCTIONS\r\n\r\n// These functions don't need access to variables,\r\n// e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\nfunction bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n}\r\n\r\n\r\n// Return a coefficient array as a string of base 10 digits.\r\nfunction coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n}\r\n\r\n\r\n// Compare the value of BigNumbers x and y.\r\nfunction compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n}\r\n\r\n\r\n/*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\nfunction intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n}\r\n\r\n\r\n// Assumes finite n.\r\nfunction isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n}\r\n\r\n\r\nfunction toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n}\r\n\r\n\r\nfunction toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n}\r\n\r\n\r\n// EXPORT\r\n\r\n\r\nexport var BigNumber = clone();\r\n\r\nexport default BigNumber;\r\n","'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n","import { toHex } from 'web3-utils'\nimport BigNumber from 'bignumber.js'\nimport { WebSocket as NodeWebSocket, type ErrorEvent } from 'ws'\n\nconst BASE58_ALPHABET: string = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\n/**\n * Converts the decimal to hexadecimal\n */\nexport const numberToHex = (value: number | string | BigNumber, decimals: number): string => {\n const length = '1' + '0'.repeat(decimals)\n const newValue = new BigNumber(value.toString(10), 10)\n return toHex(newValue.times(length).toString(16))\n}\n\n/**\n * Converts the hexadecimal to decimal\n */\nexport const hexToNumber = (value: string, decimals: number): number => {\n const length = '1' + '0'.repeat(decimals)\n const newValue = new BigNumber(value.toString(), 10)\n return parseFloat(newValue.dividedBy(length).toString())\n}\n\n/**\n * Converts the given data to Base58 string. Given data may be string or an Uint8Array\n * If the given data is a string, it'll be converted to Uint8Array inside of the method\n */\nexport const base58Encode = (input: Uint8Array | string): string => {\n // Convert input to bytes if it's a string\n if (typeof input === 'string') input = new Uint8Array(Buffer.from(input))\n\n const base58Array: string[] = []\n\n // Convert the byte array to a BigInt\n let value = BigInt('0x' + Buffer.from(input).toString('hex'))\n\n // Base58 encoding\n while (value > BigInt(0)) {\n const remainder = Number(value % BigInt(58))\n base58Array.unshift(BASE58_ALPHABET[remainder])\n value = value / BigInt(58)\n }\n\n // Add '1' characters for leading zero bytes\n for (let i = 0; i < input.length; i++) {\n if (input[i] !== 0) break\n base58Array.unshift(BASE58_ALPHABET[0])\n }\n\n return base58Array.join('')\n}\n\n/**\n * Converts the given string to Base58 as an Uint8Array\n */\nexport const base58Decode = (input: string): Uint8Array => {\n let value = BigInt(0)\n\n for (let i = 0; i < input.length; i++)\n value = value * BigInt(58) + BigInt(BASE58_ALPHABET.indexOf(input[i]))\n\n const valueHex: string = value.toString(16)\n\n // Make the string's length even\n const hexString = valueHex.length % 2 === 0 ? valueHex : '0' + valueHex\n\n return new Uint8Array(Buffer.from(hexString, 'hex'))\n}\n\n/**\n * Converts the given buffer to a string\n */\nexport const bufferToString = (input: Buffer): string => {\n return Buffer.from(input).toString('utf8')\n}\n\n/**\n * Converts the given string to a buffer\n */\nexport const stringToBuffer = (input: string): Buffer => {\n return Buffer.from(input, 'utf8')\n}\n\n/**\n * Checks if given value is numeric\n */\nexport const isNumeric = (value: string | number): boolean => {\n return !isNaN(Number(value))\n}\n\n/**\n * Sleeps the given milliseconds\n * @param {number} ms\n * @returns Promise\n */\nexport const sleep = async (ms: number): Promise => {\n await new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Checks if the given objects are equal\n * @param {object} o1\n * @param {object} o2\n * @returns boolean\n */\nexport const objectsEqual = (o1: object, o2: object): boolean => {\n return JSON.stringify(o1) === JSON.stringify(o2)\n}\n\n/**\n * Converts the given number to a readable string\n * @param {number} num\n * @returns string\n */\nexport const toReadableString = (num: number): string => {\n const [coefficient, exponent] = num\n .toExponential()\n .split('e')\n .map((item) => parseFloat(item))\n\n let result = (coefficient * Math.pow(10, exponent)).toString()\n\n result = parseFloat(result).toString()\n\n return result\n}\n\n/**\n * checks if the given url is a valid websocket url\n * @param {string} url\n * @returns {Promise}\n */\nexport const checkWebSocket = async (url: string): Promise => {\n return await new Promise((resolve, reject) => {\n let socket: WebSocket | NodeWebSocket\n\n if (typeof window !== 'undefined') {\n socket = new WebSocket(url)\n } else {\n socket = new NodeWebSocket(url)\n }\n\n socket.onopen = () => {\n resolve(true)\n socket.close()\n }\n\n socket.onerror = (error: ErrorEvent) => {\n reject(new Error(error.message))\n socket.close()\n }\n })\n}\n\nexport const math = {\n add: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).plus(new BigNumber(b)).toFixed(decimals))\n },\n sub: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).minus(new BigNumber(b)).toFixed(decimals))\n },\n mul: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).times(new BigNumber(b)).toFixed(decimals))\n },\n div: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).div(new BigNumber(b)).toFixed(decimals))\n },\n pow: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).pow(b).toFixed(decimals))\n },\n sqrt: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).sqrt().toFixed(decimals))\n },\n abs: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).absoluteValue().toFixed(decimals))\n },\n ceil: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_CEIL).toFixed(decimals))\n },\n floor: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_FLOOR).toFixed(decimals))\n },\n round: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_HALF_UP).toFixed(decimals))\n }\n}\n\ndeclare global {\n interface Window {\n opera?: any\n WebViewJavascriptBridge?: any\n webkit?: any\n }\n interface Navigator {\n standalone?: any\n }\n}\n\nexport const isMobile = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n /* eslint-disable */\n return (function (a) {\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(\n a\n ) ||\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\\\-(n|u)|c55\\/|capi|ccwa|cdm\\\\-|cell|chtm|cldc|cmd\\\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\\\-|_)|g1 u|g560|gene|gf\\\\-5|g\\\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\\\-(m|p|t)|hei\\\\-|hi(pt|ta)|hp( i|ip)|hs\\\\-c|ht(c(\\\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\\\-(20|go|ma)|i230|iac( |\\\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\\\-[a-w])|libw|lynx|m1\\\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\\\-2|po(ck|rt|se)|prox|psio|pt\\\\-g|qa\\\\-a|qc(07|12|21|32|60|\\\\-[2-7]|i\\\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\\\-|oo|p\\\\-)|sdk\\/|se(c(\\\\-|0|1)|47|mc|nd|ri)|sgh\\\\-|shar|sie(\\\\-|m)|sk\\\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\\\-|v\\\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\\\-|tdg\\\\-|tel(i|m)|tim\\\\-|t\\\\-mo|to(pl|sh)|ts(70|m\\\\-|m3|m5)|tx\\\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\\\-|your|zeto|zte\\\\-/i.test(\n a.substr(0, 4)\n )\n ? true\n : false\n })(navigator.userAgent || navigator.vendor || window.opera)\n /* eslint-enable */\n}\n\nexport const isWebview = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n\n const navigator = window.navigator\n\n /* eslint-disable */\n if (window.WebViewJavascriptBridge) {\n return true\n }\n\n if (window.webkit && window.webkit.messageHandlers) {\n return true\n }\n\n if (navigator.userAgent.match(/WebView/i)) {\n return true\n }\n\n const standalone = navigator.standalone\n const userAgent = navigator.userAgent.toLowerCase()\n const safari = /safari/.test(userAgent)\n const ios = /iphone|ipod|ipad/.test(userAgent)\n\n return ios ? !standalone && !safari : userAgent.includes('wv')\n /* eslint-enable */\n}\n\nexport { toHex }\n","/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */\n/**\n * The current version of Ethers.\n */\nexport const version = \"6.11.1\";\n//# sourceMappingURL=_version.js.map","/**\n * Property helper functions.\n *\n * @_subsection api/utils:Properties [about-properties]\n */\nfunction checkType(value, type, name) {\n const types = type.split(\"|\").map(t => t.trim());\n for (let i = 0; i < types.length; i++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof (value) === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n}\n/**\n * Resolves to a new object that is a copy of %%value%%, but with all\n * values resolved.\n */\nexport async function resolveProperties(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k) => Promise.resolve(value[k])));\n return results.reduce((accum, v, index) => {\n accum[keys[index]] = v;\n return accum;\n }, {});\n}\n/**\n * Assigns the %%values%% to %%target%% as read-only values.\n *\n * It %%types%% is specified, the values are checked.\n */\nexport function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = (types ? types[key] : null);\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n}\n//# sourceMappingURL=properties.js.map","/**\n * All errors in ethers include properties to ensure they are both\n * human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``).\n *\n * The [[isError]] function can be used to check the error ``code`` and\n * provide a type guard for the properties present on that error interface.\n *\n * @_section: api/utils/errors:Errors [about-errors]\n */\nimport { version } from \"../_version.js\";\nimport { defineProperties } from \"./properties.js\";\nfunction stringify(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[ \" + (value.map(stringify)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n result += HEX[value[i] >> 4];\n result += HEX[value[i] & 0xf];\n }\n return result;\n }\n if (typeof (value) === \"object\" && typeof (value.toJSON) === \"function\") {\n return stringify(value.toJSON());\n }\n switch (typeof (value)) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"number\":\n return (value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k) => `${stringify(k)}: ${stringify(value[k])}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n}\n/**\n * Returns true if the %%error%% matches an error thrown by ethers\n * that matches the error %%code%%.\n *\n * In TypeScript environments, this can be used to check that %%error%%\n * matches an EthersError type, which means the expected properties will\n * be set.\n *\n * @See [ErrorCodes](api:ErrorCode)\n * @example\n * try {\n * // code....\n * } catch (e) {\n * if (isError(e, \"CALL_EXCEPTION\")) {\n * // The Type Guard has validated this object\n * console.log(e.data);\n * }\n * }\n */\nexport function isError(error, code) {\n return (error && error.code === code);\n}\n/**\n * Returns true if %%error%% is a [[CallExceptionError].\n */\nexport function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n}\n/**\n * Returns a new Error configured to the format ethers emits errors, with\n * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties\n * for the corresponding EthersError.\n *\n * Each error in ethers includes the version of ethers, a\n * machine-readable [[ErrorCode]], and depending on %%code%%, additional\n * required properties. The error message will also include the %%message%%,\n * ethers version, %%code%% and all additional properties, serialized.\n */\nexport function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = (info[key]);\n // try {\n details.push(key + \"=\" + stringify(value));\n // } catch (error: any) {\n // console.log(\"MMM\", error.message);\n // details.push(key + \"=[could not serialize object]\");\n // }\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n defineProperties(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n defineProperties(error, { shortMessage });\n }\n return error;\n}\n/**\n * Throws an EthersError with %%message%%, %%code%% and additional error\n * %%info%% when %%check%% is falsish..\n *\n * @see [[api:makeError]]\n */\nexport function assert(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n}\n/**\n * A simple helper to simply ensuring provided arguments match expected\n * constraints, throwing if not.\n *\n * In TypeScript environments, the %%check%% has been asserted true, so\n * any further code does not need additional compile-time checks.\n */\nexport function assertArgument(check, message, name, value) {\n assert(check, message, \"INVALID_ARGUMENT\", { argument: name, value: value });\n}\nexport function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert(count >= expectedCount, \"missing arguemnt\" + message, \"MISSING_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n assert(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n}\nconst _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n // General test for normalize\n /* c8 ignore start */\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n /* c8 ignore stop */\n if (form === \"NFD\") {\n const check = String.fromCharCode(0xe9).normalize(\"NFD\");\n const expected = String.fromCharCode(0x65, 0x0301);\n /* c8 ignore start */\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n /* c8 ignore stop */\n }\n accum.push(form);\n }\n catch (error) { }\n return accum;\n}, []);\n/**\n * Throws if the normalization %%form%% is not supported.\n */\nexport function assertNormalize(form) {\n assert(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\", info: { form }\n });\n}\n/**\n * Many classes use file-scoped values to guard the constructor,\n * making it effectively private. This facilitates that pattern\n * by ensuring the %%givenGaurd%% matches the file-scoped %%guard%%,\n * throwing if not, indicating the %%className%% if provided.\n */\nexport function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n}\n//# sourceMappingURL=errors.js.map","/**\n * Some data helpers.\n *\n *\n * @_subsection api/utils:Data Helpers [about-data]\n */\nimport { assert, assertArgument } from \"./errors.js\";\nfunction _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof (value) === \"string\" && value.match(/^0x([0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i = 0; i < result.length; i++) {\n result[i] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n assertArgument(false, \"invalid BytesLike value\", name || \"value\", value);\n}\n/**\n * Get a typed Uint8Array for %%value%%. If already a Uint8Array\n * the original %%value%% is returned; if a copy is required use\n * [[getBytesCopy]].\n *\n * @see: getBytesCopy\n */\nexport function getBytes(value, name) {\n return _getBytes(value, name, false);\n}\n/**\n * Get a typed Uint8Array for %%value%%, creating a copy if necessary\n * to prevent any modifications of the returned value from being\n * reflected elsewhere.\n *\n * @see: getBytes\n */\nexport function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n}\n/**\n * Returns true if %%value%% is a valid [[HexString]].\n *\n * If %%length%% is ``true`` or a //number//, it also checks that\n * %%value%% is a valid [[DataHexString]] of %%length%% (if a //number//)\n * bytes of data (e.g. ``0x1234`` is 2 bytes).\n */\nexport function isHexString(value, length) {\n if (typeof (value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof (length) === \"number\" && value.length !== 2 + 2 * length) {\n return false;\n }\n if (length === true && (value.length % 2) !== 0) {\n return false;\n }\n return true;\n}\n/**\n * Returns true if %%value%% is a valid representation of arbitrary\n * data (i.e. a valid [[DataHexString]] or a Uint8Array).\n */\nexport function isBytesLike(value) {\n return (isHexString(value, true) || (value instanceof Uint8Array));\n}\nconst HexCharacters = \"0123456789abcdef\";\n/**\n * Returns a [[DataHexString]] representation of %%data%%.\n */\nexport function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i = 0; i < bytes.length; i++) {\n const v = bytes[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n}\n/**\n * Returns a [[DataHexString]] by concatenating all values\n * within %%data%%.\n */\nexport function concat(datas) {\n return \"0x\" + datas.map((d) => hexlify(d).substring(2)).join(\"\");\n}\n/**\n * Returns the length of %%data%%, in bytes.\n */\nexport function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n}\n/**\n * Returns a [[DataHexString]] by slicing %%data%% from the %%start%%\n * offset to the %%end%% offset.\n *\n * By default %%start%% is 0 and %%end%% is the length of %%data%%.\n */\nexport function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n assert(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes, length: bytes.length, offset: end\n });\n }\n return hexlify(bytes.slice((start == null) ? 0 : start, (end == null) ? bytes.length : end));\n}\n/**\n * Return the [[DataHexString]] result by stripping all **leading**\n ** zero bytes from %%data%%.\n */\nexport function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n}\nfunction zeroPad(data, length, left) {\n const bytes = getBytes(data);\n assert(length >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length: length,\n offset: length + 1\n });\n const result = new Uint8Array(length);\n result.fill(0);\n if (left) {\n result.set(bytes, length - bytes.length);\n }\n else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **left**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **values** are in Solidity\n * (e.g. ``uint128``).\n */\nexport function zeroPadValue(data, length) {\n return zeroPad(data, length, true);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **right**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **bytes** are in Solidity\n * (e.g. ``bytes16``).\n */\nexport function zeroPadBytes(data, length) {\n return zeroPad(data, length, false);\n}\n//# sourceMappingURL=data.js.map","/**\n * Some mathematic operations.\n *\n * @_subsection: api/utils:Math Helpers [about-maths]\n */\nimport { hexlify, isBytesLike } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\n//const BN_Max256 = (BN_1 << BigInt(256)) - BN_1;\n// IEEE 754 support 53-bits of mantissa\nconst maxValue = 0x1fffffffffffff;\n/**\n * Convert %%value%% from a twos-compliment representation of %%width%%\n * bits to its value.\n *\n * If the highest bit is ``1``, the result will be negative.\n */\nexport function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n assert((value >> width) === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\", fault: \"overflow\", value: _value\n });\n // Top bit set; treat as a negative value\n if (value >> (width - BN_1)) {\n const mask = (BN_1 << width) - BN_1;\n return -(((~value) & mask) + BN_1);\n }\n return value;\n}\n/**\n * Convert %%value%% to a twos-compliment representation of\n * %%width%% bits.\n *\n * The result will always be positive.\n */\nexport function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = (BN_1 << (width - BN_1));\n if (value < BN_0) {\n value = -value;\n assert(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n const mask = (BN_1 << width) - BN_1;\n return ((~value) & mask) + BN_1;\n }\n else {\n assert(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n }\n return value;\n}\n/**\n * Mask %%value%% with a bitmask of %%bits%% ones.\n */\nexport function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & ((BN_1 << bits) - BN_1);\n}\n/**\n * Gets a BigInt from %%value%%. If it is an invalid value for\n * a BigInt, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getBigInt(value, name) {\n switch (typeof (value)) {\n case \"bigint\": return value;\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n }\n catch (e) {\n assertArgument(false, `invalid BigNumberish string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid BigNumberish value\", name || \"value\", value);\n}\n/**\n * Returns %%value%% as a bigint, validating it is valid as a bigint\n * value and that it is positive.\n */\nexport function getUint(value, name) {\n const result = getBigInt(value, name);\n assert(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\", operation: \"getUint\", value\n });\n return result;\n}\nconst Nibbles = \"0123456789abcdef\";\n/*\n * Converts %%value%% to a BigInt. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data.\n */\nexport function toBigInt(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v of value) {\n result += Nibbles[v >> 4];\n result += Nibbles[v & 0x0f];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n}\n/**\n * Gets a //number// from %%value%%. If it is an invalid value for\n * a //number//, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getNumber(value, name) {\n switch (typeof (value)) {\n case \"bigint\":\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n }\n catch (e) {\n assertArgument(false, `invalid numeric string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid numeric value\", name || \"value\", value);\n}\n/**\n * Converts %%value%% to a number. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data. Throws if the value is not safe.\n */\nexport function toNumber(value) {\n return getNumber(toBigInt(value));\n}\n/**\n * Converts %%value%% to a Big Endian hexstring, optionally padded to\n * %%width%% bytes.\n */\nexport function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n // Ensure the value is of even length\n if (result.length % 2) {\n result = \"0\" + result;\n }\n }\n else {\n const width = getNumber(_width, \"width\");\n assert(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n // Pad the value to the required width\n while (result.length < (width * 2)) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n}\n/**\n * Converts %%value%% to a Big Endian Uint8Array.\n */\nexport function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i = 0; i < result.length; i++) {\n const offset = i * 2;\n result[i] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n}\n/**\n * Returns a [[HexString]] for %%value%% safe to use as a //Quantity//.\n *\n * A //Quantity// does not have and leading 0 values unless the value is\n * the literal value `0x0`. This is most commonly used for JSSON-RPC\n * numeric values.\n */\nexport function toQuantity(value) {\n let result = hexlify(isBytesLike(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n}\n//# sourceMappingURL=maths.js.map","/**\n * The [Base58 Encoding](link-base58) scheme allows a **numeric** value\n * to be encoded as a compact string using a radix of 58 using only\n * alpha-numeric characters. Confusingly similar characters are omitted\n * (i.e. ``\"l0O\"``).\n *\n * Note that Base58 encodes a **numeric** value, not arbitrary bytes,\n * since any zero-bytes on the left would get removed. To mitigate this\n * issue most schemes that use Base58 choose specific high-order values\n * to ensure non-zero prefixes.\n *\n * @_subsection: api/utils:Base58 Encoding [about-base58]\n */\nimport { getBytes } from \"./data.js\";\nimport { assertArgument } from \"./errors.js\";\nimport { toBigInt } from \"./maths.js\";\nconst Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\nlet Lookup = null;\nfunction getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i = 0; i < Alphabet.length; i++) {\n Lookup[Alphabet[i]] = BigInt(i);\n }\n }\n const result = Lookup[letter];\n assertArgument(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n}\nconst BN_0 = BigInt(0);\nconst BN_58 = BigInt(58);\n/**\n * Encode %%value%% as a Base58-encoded string.\n */\nexport function encodeBase58(_value) {\n const bytes = getBytes(_value);\n let value = toBigInt(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n // Account for leading padding zeros\n for (let i = 0; i < bytes.length; i++) {\n if (bytes[i]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n}\n/**\n * Decode the Base58-encoded %%value%%.\n */\nexport function decodeBase58(value) {\n let result = BN_0;\n for (let i = 0; i < value.length; i++) {\n result *= BN_58;\n result += getAlpha(value[i]);\n }\n return result;\n}\n//# sourceMappingURL=base58.js.map","// utils/base64-browser\nimport { getBytes } from \"./data.js\";\nexport function decodeBase64(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i = 0; i < textData.length; i++) {\n data[i] = textData.charCodeAt(i);\n }\n return getBytes(data);\n}\nexport function encodeBase64(_data) {\n const data = getBytes(_data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n//# sourceMappingURL=base64-browser.js.map","/**\n * Events allow for applications to use the observer pattern, which\n * allows subscribing and publishing events, outside the normal\n * execution paths.\n *\n * @_section api/utils/events:Events [about-events]\n */\nimport { defineProperties } from \"./properties.js\";\n/**\n * When an [[EventEmitterable]] triggers a [[Listener]], the\n * callback always ahas one additional argument passed, which is\n * an **EventPayload**.\n */\nexport class EventPayload {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n defineProperties(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n}\n//# sourceMappingURL=events.js.map","/**\n * Using strings in Ethereum (or any security-basd system) requires\n * additional care. These utilities attempt to mitigate some of the\n * safety issues as well as provide the ability to recover and analyse\n * strings.\n *\n * @_subsection api/utils:Strings and UTF-8 [about-strings]\n */\nimport { getBytes } from \"./data.js\";\nimport { assertArgument, assertNormalize } from \"./errors.js\";\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === \"OVERLONG\") {\n assertArgument(typeof (badCodepoint) === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n/**\n * A handful of popular, built-in UTF-8 error handling strategies.\n *\n * **``\"error\"``** - throws on ANY illegal UTF-8 sequence or\n * non-canonical (overlong) codepoints (this is the default)\n *\n * **``\"ignore\"``** - silently drops any illegal UTF-8 sequence\n * and accepts non-canonical (overlong) codepoints\n *\n * **``\"replace\"``** - replace any illegal UTF-8 sequence with the\n * UTF-8 replacement character (i.e. ``\"\\\\ufffd\"``) and accepts\n * non-canonical (overlong) codepoints\n *\n * @returns: Record<\"error\" | \"ignore\" | \"replace\", Utf8ErrorFunc>\n */\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n const bytes = getBytes(_bytes, \"bytes\");\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(\"UNEXPECTED_CONTINUE\", i - 1, bytes, result);\n }\n else {\n i += onError(\"BAD_PREFIX\", i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(\"OVERRUN\", i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(\"MISSING_CONTINUE\", i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(\"OUT_OF_RANGE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(\"UTF16_SURROGATE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(\"OVERLONG\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n/**\n * Returns the UTF-8 byte representation of %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8Bytes(str, form) {\n assertArgument(typeof (str) === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n assertNormalize(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n assertArgument(i < str.length && ((c2 & 0xfc00) === 0xdc00), \"invalid surrogate pair\", \"str\", str);\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return new Uint8Array(result);\n}\n;\n//export \nfunction _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\n/**\n * Returns the string represented by the UTF-8 data %%bytes%%.\n *\n * When %%onError%% function is specified, it is called on UTF-8\n * errors allowing recovery using the [[Utf8ErrorFunc]] API.\n * (default: [error](Utf8ErrorFuncs))\n */\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n/**\n * Returns the UTF-8 code-points for %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","import { assert } from \"./errors.js\";\n// @TODO: timeout is completely ignored; start a Promise.any with a reject?\nexport function createGetUrl(options) {\n async function getUrl(req, _signal) {\n const protocol = req.url.split(\":\")[0].toLowerCase();\n assert(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n assert(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let signal = undefined;\n if (_signal) {\n const controller = new AbortController();\n signal = controller.signal;\n _signal.addListener(() => { controller.abort(); });\n }\n const init = {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || undefined,\n signal\n };\n const resp = await fetch(req.url, init);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = (respBody == null) ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers, body\n };\n }\n return getUrl;\n}\n// @TODO: remove in v7; provided for backwards compat\nconst defaultGetUrl = createGetUrl({});\nexport async function getUrl(req, _signal) {\n return defaultGetUrl(req, _signal);\n}\n//# sourceMappingURL=geturl-browser.js.map","/**\n * Fetching content from the web is environment-specific, so Ethers\n * provides an abstraction that each environment can implement to provide\n * this service.\n *\n * On [Node.js](link-node), the ``http`` and ``https`` libs are used to\n * create a request object, register event listeners and process data\n * and populate the [[FetchResponse]].\n *\n * In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting\n * ``Promise`` is waited on to retrieve the payload.\n *\n * The [[FetchRequest]] is responsible for handling many common situations,\n * such as redirects, server throttling, authentication, etc.\n *\n * It also handles common gateways, such as IPFS and data URIs.\n *\n * @_section api/utils/fetching:Fetching Web Content [about-fetch]\n */\nimport { decodeBase64, encodeBase64 } from \"./base64.js\";\nimport { hexlify } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nimport { defineProperties } from \"./properties.js\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8.js\";\nimport { createGetUrl } from \"./geturl.js\";\nconst MAX_ATTEMPTS = 12;\nconst SLOT_INTERVAL = 250;\n// The global FetchGetUrlFunc implementation.\nlet defaultGetUrlFunc = createGetUrl();\nconst reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\nconst reIpfs = new RegExp(\"^ipfs:/\\/(ipfs/)?(.*)$\", \"i\");\n// If locked, new Gateways cannot be added\nlet locked = false;\n// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs\nasync function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": (match[1] || \"text/plain\"),\n }, (match[2] ? decodeBase64(match[3]) : unpercent(match[3])));\n }\n catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n}\n/**\n * Returns a [[FetchGatewayFunc]] for fetching content from a standard\n * IPFS gateway hosted at %%baseUrl%%.\n */\nfunction getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n }\n catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n}\nconst Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https:/\\/gateway.ipfs.io/ipfs/\")\n};\nconst fetchSignals = new WeakMap();\n/**\n * @_ignore\n */\nexport class FetchCancelSignal {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => { listener(); }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n assert(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() { return this.#cancelled; }\n checkSignal() {\n assert(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n}\n// Check the signal, throwing if it is cancelled\nfunction checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n}\n/**\n * Represents a request for a resource using a URI.\n *\n * By default, the supported schemes are ``HTTP``, ``HTTPS``, ``data:``,\n * and ``IPFS:``.\n *\n * Additional schemes can be added globally using [[registerGateway]].\n *\n * @example:\n * req = new FetchRequest(\"https://www.ricmoo.com\")\n * resp = await req.send()\n * resp.body.length\n * //_result:\n */\nexport class FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() { return this.#url; }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = undefined;\n this.#bodyType = undefined;\n }\n else if (typeof (body) === \"string\") {\n this.#body = toUtf8Bytes(body);\n this.#bodyType = \"text/plain\";\n }\n else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n }\n else if (typeof (body) === \"object\") {\n this.#body = toUtf8Bytes(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n }\n else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return (this.#body != null);\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${encodeBase64(toUtf8Bytes(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index = 0;\n return {\n next: () => {\n if (index < keys.length) {\n const key = keys[index++];\n return {\n value: [key, headers[key]], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n assertArgument(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() { return this.#timeout; }\n set timeout(timeout) {\n assertArgument(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process) {\n this.#process = process;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 300000;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n assert(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\", reason: \"timeout\", request: _request\n });\n if (delay > 0) {\n await wait(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n // Process any Gateways\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n }\n catch (error) {\n // Something went wrong during processing; throw a 5xx server error\n if (error.throttle == null || typeof (error.stall) !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n // Ignore throttling\n }\n }\n return response;\n }\n req = result;\n }\n // We have a preflight function; update the request\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirect\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n }\n catch (error) { }\n // Things won't get any better on another attempt; abort\n return response;\n }\n else if (response.statusCode === 429) {\n // Throttle\n if (this.retryFunc == null || (await this.retryFunc(req, response, attempt))) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof (retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n }\n catch (error) {\n // Something went wrong during processing; throw a 5xx server error\n if (error.throttle == null || typeof (error.stall) !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n // Throttle\n let delay = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n assert(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n assert(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n // Redirection; for now we only support absolute locations\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n // Don't allow redirecting:\n // - non-GET requests\n // - downgrading the security (e.g. https => http)\n // - to non-HTTP (or non-HTTPS) protocols [this could be relaxed?]\n assert(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n // Create a copy of this request, with a new URL\n const req = new FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n // Do not forward credentials unless on the same domain; only absolute\n //req.allowInsecure = false;\n // paths are currently supported; may want a way to specify to forward?\n //setStore(req.#props, \"creds\", getStore(this.#pros, \"creds\"));\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone = new FetchRequest(this.url);\n // Preserve \"default method\" (i.e. null)\n clone.#method = this.#method;\n // Preserve \"default body\" with type, copying the Uint8Array is present\n if (this.#body) {\n clone.#body = this.#body;\n }\n clone.#bodyType = this.#bodyType;\n // Preserve \"default headers\"\n clone.#headers = Object.assign({}, this.#headers);\n // Credentials is readonly, so we copy internally\n clone.#creds = this.#creds;\n if (this.allowGzip) {\n clone.allowGzip = true;\n }\n clone.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone.allowInsecureAuthentication = true;\n }\n clone.#preflight = this.#preflight;\n clone.#process = this.#process;\n clone.#retry = this.#retry;\n clone.#getUrlFunc = this.#getUrlFunc;\n return clone;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return createGetUrl(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n}\n;\n/**\n * The response for a FetchRequest.\n */\nexport class FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() { return this.#statusCode; }\n /**\n * The response status message.\n */\n get statusMessage() { return this.#statusMessage; }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() { return Object.assign({}, this.#headers); }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return (this.#body == null) ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return (this.#body == null) ? \"\" : toUtf8String(this.#body);\n }\n catch (error) {\n assert(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\", info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n }\n catch (error) {\n assert(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\", info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index = 0;\n return {\n next: () => {\n if (index < keys.length) {\n const key = keys[index++];\n return {\n value: [key, headers[key]], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k) => {\n accum[k.toLowerCase()] = String(headers[k]);\n return accum;\n }, {});\n this.#body = ((body == null) ? null : new Uint8Array(body));\n this.#request = (request || null);\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message, error) {\n let statusMessage;\n if (!message) {\n message = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message})`;\n }\n else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message})`;\n }\n const response = new FetchResponse(599, statusMessage, this.headers, this.body, this.#request || undefined);\n response.#error = { message, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message, stall) {\n if (stall == null) {\n stall = -1;\n }\n else {\n assertArgument(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message || \"throttling requests\");\n defineProperties(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return (this.#body != null);\n }\n /**\n * The request made for this response.\n */\n get request() { return this.#request; }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return (this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300);\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message, error } = this.#error;\n if (message === \"\") {\n message = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = toUtf8String(this.#body);\n }\n }\n catch (e) { }\n assert(false, message, \"SERVER_ERROR\", {\n request: (this.request || \"unknown request\"), response: this, error,\n info: {\n requestUrl, responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n}\nfunction getTime() { return (new Date()).getTime(); }\nfunction unpercent(value) {\n return toUtf8Bytes(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n}\nfunction wait(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n}\n//# sourceMappingURL=fetch.js.map","/**\n * The **FixedNumber** class permits using values with decimal places,\n * using fixed-pont math.\n *\n * Fixed-point math is still based on integers under-the-hood, but uses an\n * internal offset to store fractional components below, and each operation\n * corrects for this after each operation.\n *\n * @_section: api/utils/fixed-point-math:Fixed-Point Maths [about-fixed-point-math]\n */\nimport { getBytes } from \"./data.js\";\nimport { assert, assertArgument, assertPrivate } from \"./errors.js\";\nimport { getBigInt, getNumber, fromTwos, mask, toBigInt } from \"./maths.js\";\nimport { defineProperties } from \"./properties.js\";\nconst BN_N1 = BigInt(-1);\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_5 = BigInt(5);\nconst _guard = {};\n// Constant to pull zeros from for multipliers\nlet Zeros = \"0000\";\nwhile (Zeros.length < 80) {\n Zeros += Zeros;\n}\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n}\nfunction checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n }\n else {\n val = -fromTwos(mask(-val, width), width);\n }\n }\n else {\n const limit = (BN_1 << width);\n assert(safeOp == null || (val >= 0 && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n val = (((val % limit) + limit) % limit) & (limit - BN_1);\n }\n return val;\n}\nfunction getFormat(value) {\n if (typeof (value) === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof (value) === \"string\") {\n // Parse the format string\n if (value === \"fixed\") {\n // defaults...\n }\n else if (value === \"ufixed\") {\n signed = false;\n }\n else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n assertArgument(match, \"invalid fixed format\", \"format\", value);\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n }\n else if (value) {\n // Extract the values from the object\n const v = value;\n const check = (key, type, defaultValue) => {\n if (v[key] == null) {\n return defaultValue;\n }\n assertArgument(typeof (v[key]) === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v[key]);\n return v[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n assertArgument((width % 8) === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n assertArgument(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n}\nfunction toString(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n // No decimal point for whole values\n if (decimals === 0) {\n return (negative + str);\n }\n // Pad out to the whole component (including a whole digit)\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n // Insert the decimal point\n const index = str.length - decimals;\n str = str.substring(0, index) + \".\" + str.substring(index);\n // Trim the whole component (leaving at least one 0)\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n // Trim the decimal component (leaving at least one 0)\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return (negative + str);\n}\n/**\n * A FixedNumber represents a value over its [[FixedFormat]]\n * arithmetic field.\n *\n * A FixedNumber can be used to perform math, losslessly, on\n * values which have decmial places.\n *\n * A FixedNumber has a fixed bit-width to store values in, and stores all\n * values internally by multiplying the value by 10 raised to the power of\n * %%decimals%%.\n *\n * If operations are performed that cause a value to grow too high (close to\n * positive infinity) or too low (close to negative infinity), the value\n * is said to //overflow//.\n *\n * For example, an 8-bit signed value, with 0 decimals may only be within\n * the range ``-128`` to ``127``; so ``-128 - 1`` will overflow and become\n * ``127``. Likewise, ``127 + 1`` will overflow and become ``-127``.\n *\n * Many operation have a normal and //unsafe// variant. The normal variant\n * will throw a [[NumericFaultError]] on any overflow, while the //unsafe//\n * variant will silently allow overflow, corrupting its value value.\n *\n * If operations are performed that cause a value to become too small\n * (close to zero), the value loses precison and is said to //underflow//.\n *\n * For example, an value with 1 decimal place may store a number as small\n * as ``0.1``, but the value of ``0.1 / 2`` is ``0.05``, which cannot fit\n * into 1 decimal place, so underflow occurs which means precision is lost\n * and the value becomes ``0``.\n *\n * Some operations have a normal and //signalling// variant. The normal\n * variant will silently ignore underflow, while the //signalling// variant\n * will thow a [[NumericFaultError]] on underflow.\n */\nexport class FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n assertPrivate(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString(value, format.decimals);\n defineProperties(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() { return this.#format.signed; }\n /**\n * The number of bits available to store the value.\n */\n get width() { return this.#format.width; }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() { return this.#format.decimals; }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() { return this.#val; }\n #checkFormat(other) {\n assertArgument(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n /*\n const width = BigInt(this.width);\n if (this.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n \n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n } else {\n val = -fromTwos(mask(-val, width), width);\n }\n \n } else {\n const masked = mask(val, width);\n assert(safeOp == null || (val >= 0 && val === masked), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n val = masked;\n }\n */\n val = checkValue(val, this.#format, safeOp);\n return new FixedNumber(_guard, val, this.#format);\n }\n #add(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val + o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) { return this.#add(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) { return this.#add(other, \"add\"); }\n #sub(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val - o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) { return this.#sub(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) { return this.#sub(other, \"sub\"); }\n #mul(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue((this.#val * o.#val) / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) { return this.#mul(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) { return this.#mul(other, \"mul\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n assert((value % this.#tens) === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o, safeOp) {\n assert(o.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(o);\n return this.#checkValue((this.#val * this.#tens) / o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) { return this.#div(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) { return this.#div(other, \"div\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n assert(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(other);\n const value = (this.#val * this.#tens);\n assert((value % other.#val) === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a = this.value, b = other.value;\n // Coerce a and b to the same magnitude\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b *= getTens(delta);\n }\n else if (delta < 0) {\n a *= getTens(-delta);\n }\n // Comnpare\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) { return this.cmp(other) === 0; }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) { return this.cmp(other) < 0; }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) { return this.cmp(other) <= 0; }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) { return this.cmp(other) > 0; }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) { return this.cmp(other) >= 0; }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n // Not enough precision to not already be rounded\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = (value / tens) * tens;\n checkValue(value, this.#format, \"round\");\n return new FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() { return (this.#val === BN_0); }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() { return (this.#val < BN_0); }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() { return this._value; }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() { return parseFloat(this.toString()); }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = (_decimals == null) ? 0 : getNumber(_decimals);\n const format = getFormat(_format);\n let value = getBigInt(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n assert((value % tens) === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\", fault: \"underflow\", value: _value\n });\n value /= tens;\n }\n else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n assertArgument(match && (match[2].length + match[3].length) > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = (match[2] || \"0\"), decimal = (match[3] || \"\");\n // Pad out the decimals\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n // Check precision is safe\n assert(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\", fault: \"underflow\", value: _value\n });\n // Remove extra padding\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = toBigInt(getBytes(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = fromTwos(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new FixedNumber(_guard, value, format);\n }\n}\n//const f1 = FixedNumber.fromString(\"12.56\", \"fixed16x2\");\n//const f2 = FixedNumber.fromString(\"0.3\", \"fixed16x2\");\n//console.log(f1.divSignal(f2));\n//const BUMP = FixedNumber.from(\"0.5\");\n//# sourceMappingURL=fixednumber.js.map","//See: https://github.com/ethereum/wiki/wiki/RLP\nimport { hexlify } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nimport { getBytes } from \"./data.js\";\nfunction hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n}\nfunction unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\nfunction _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n assert(childOffset <= offset + 1 + length, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length, offset\n });\n }\n return { consumed: (1 + length), result: result };\n}\n// returns { consumed: number, result: Object }\nfunction _decode(data, offset) {\n assert(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length: 0, offset: 1\n });\n const checkOffset = (offset) => {\n assert(offset <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length: data.length, offset\n });\n };\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n }\n else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n checkOffset(offset + 1 + length);\n return _decodeChildren(data, offset, offset + 1, length);\n }\n else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result };\n }\n else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n checkOffset(offset + 1 + length);\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n}\n/**\n * Decodes %%data%% into the structured data it represents.\n */\nexport function decodeRlp(_data) {\n const data = getBytes(_data, \"data\");\n const decoded = _decode(data, 0);\n assertArgument(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n}\n//# sourceMappingURL=rlp-decode.js.map","//See: https://github.com/ethereum/wiki/wiki/RLP\nimport { getBytes } from \"./data.js\";\nfunction arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\nfunction _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function (child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length);\n return payload;\n }\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n return length.concat(payload);\n }\n const data = Array.prototype.slice.call(getBytes(object, \"object\"));\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n }\n else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n return length.concat(data);\n}\nconst nibbles = \"0123456789abcdef\";\n/**\n * Encodes %%object%% as an RLP-encoded [[DataHexString]].\n */\nexport function encodeRlp(object) {\n let result = \"0x\";\n for (const v of _encode(object)) {\n result += nibbles[v >> 4];\n result += nibbles[v & 0xf];\n }\n return result;\n}\n//# sourceMappingURL=rlp-encode.js.map","/**\n * Most interactions with Ethereum requires integer values, which use\n * the smallest magnitude unit.\n *\n * For example, imagine dealing with dollars and cents. Since dollars\n * are divisible, non-integer values are possible, such as ``$10.77``.\n * By using the smallest indivisible unit (i.e. cents), the value can\n * be kept as the integer ``1077``.\n *\n * When receiving decimal input from the user (as a decimal string),\n * the value should be converted to an integer and when showing a user\n * a value, the integer value should be converted to a decimal string.\n *\n * This creates a clear distinction, between values to be used by code\n * (integers) and values used for display logic to users (decimals).\n *\n * The native unit in Ethereum, //ether// is divisible to 18 decimal places,\n * where each individual unit is called a //wei//.\n *\n * @_subsection api/utils:Unit Conversion [about-units]\n */\nimport { assertArgument } from \"./errors.js\";\nimport { FixedNumber } from \"./fixednumber.js\";\nimport { getNumber } from \"./maths.js\";\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n/**\n * Converts %%value%% into a //decimal string//, assuming %%unit%% decimal\n * places. The %%unit%% may be the number of decimal places or the name of\n * a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n *\n */\nexport function formatUnits(value, unit) {\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n}\n/**\n * Converts the //decimal string// %%value%% to a BigInt, assuming\n * %%unit%% decimal places. The %%unit%% may the number of decimal places\n * or the name of a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n */\nexport function parseUnits(value, unit) {\n assertArgument(typeof (value) === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromString(value, { decimals, width: 512 }).value;\n}\n/**\n * Converts %%value%% into a //decimal string// using 18 decimal places.\n */\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\n/**\n * Converts the //decimal string// %%ether%% to a BigInt, using 18\n * decimal places.\n */\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=units.js.map","/**\n * Explain UUID and link to RFC here.\n *\n * @_subsection: api/utils:UUID [about-uuid]\n */\nimport { getBytes, hexlify } from \"./data.js\";\n/**\n * Returns the version 4 [[link-uuid]] for the %%randomBytes%%.\n *\n * @see: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\n */\nexport function uuidV4(randomBytes) {\n const bytes = getBytes(randomBytes, \"randomBytes\");\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const value = hexlify(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n//# sourceMappingURL=uuid.js.map","import { defineProperties, concat, getBytesCopy, getNumber, hexlify, toBeArray, toBigInt, toNumber, assert, assertArgument } from \"../../utils/index.js\";\n/**\n * @_ignore:\n */\nexport const WordSize = 32;\nconst Padding = new Uint8Array(WordSize);\n// Properties used to immediate pass through to the underlying object\n// - `then` is used to detect if an object is a Promise for await\nconst passProperties = [\"then\"];\nconst _guard = {};\nfunction throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n}\n/**\n * A [[Result]] is a sub-class of Array, which allows accessing any\n * of its values either positionally by its index or, if keys are\n * provided by its name.\n *\n * @_docloc: api/abi\n */\nexport class Result extends Array {\n #names;\n /**\n * @private\n */\n constructor(...args) {\n // To properly sub-class Array so the other built-in\n // functions work, the constructor has to behave fairly\n // well. So, in the event we are created via fromItems()\n // we build the read-only Result object we want, but on\n // any other input, we use the default constructor\n // constructor(guard: any, items: Array, keys?: Array);\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap = false;\n }\n // Can't just pass in ...items since an array of length 1\n // is a special case in the super.\n super(items.length);\n items.forEach((item, index) => { this[index] = item; });\n // Find all unique keys\n const nameCounts = names.reduce((accum, name) => {\n if (typeof (name) === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, (new Map()));\n // Remove any key thats not unique\n this.#names = Object.freeze(items.map((item, index) => {\n const name = names[index];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n }));\n if (!wrap) {\n return;\n }\n // A wrapped Result is immutable\n Object.freeze(this);\n // Proxy indices and names so we can trap deferred errors\n return new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof (prop) === \"string\") {\n // Index accessor\n if (prop.match(/^[0-9]+$/)) {\n const index = getNumber(prop, \"%index\");\n if (index < 0 || index >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index];\n if (item instanceof Error) {\n throwError(`index ${index}`, item);\n }\n return item;\n }\n // Pass important checks (like `then` for Promise) through\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n // Make sure functions work with private variables\n // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding\n return function (...args) {\n return value.apply((this === receiver) ? target : this, args);\n };\n }\n else if (!(prop in target)) {\n // Possible name accessor\n return target.getValue.apply((this === receiver) ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n }\n /**\n * Returns the Result as a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray() {\n const result = [];\n this.forEach((item, index) => {\n if (item instanceof Error) {\n throwError(`index ${index}`, item);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject() {\n return this.#names.reduce((accum, name, index) => {\n assert(name != null, \"value at index ${ index } unnamed\", \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n // Add values for names that don't conflict\n if (!(name in accum)) {\n accum[name] = this.getValue(name);\n }\n return accum;\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const result = [], names = [];\n for (let i = start; i < end; i++) {\n result.push(this[i]);\n names.push(this.#names[i]);\n }\n return new Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const result = [], names = [];\n for (let i = 0; i < this.length; i++) {\n const item = this[i];\n if (item instanceof Error) {\n throwError(`index ${i}`, item);\n }\n if (callback.call(thisArg, item, i, this)) {\n result.push(item);\n names.push(this.#names[i]);\n }\n }\n return new Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i = 0; i < this.length; i++) {\n const item = this[i];\n if (item instanceof Error) {\n throwError(`index ${i}`, item);\n }\n result.push(callback.call(thisArg, item, i, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index = this.#names.indexOf(name);\n if (index === -1) {\n return undefined;\n }\n const value = this[index];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new Result(_guard, items, keys);\n }\n}\n/**\n * Returns all errors found in a [[Result]].\n *\n * Since certain errors encountered when creating a [[Result]] do\n * not impact the ability to continue parsing data, they are\n * deferred until they are actually accessed. Hence a faulty string\n * in an Event that is never used does not impact the program flow.\n *\n * However, sometimes it may be useful to access, identify or\n * validate correctness of a [[Result]].\n *\n * @_docloc api/abi\n */\nexport function checkResultErrors(result) {\n // Find the first error (if any)\n const errors = [];\n const checkErrors = function (path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n }\n catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n}\nfunction getValue(value) {\n let bytes = toBeArray(value);\n assert(bytes.length <= WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: WordSize, offset: bytes.length });\n if (bytes.length !== WordSize) {\n bytes = getBytesCopy(concat([Padding.slice(bytes.length % WordSize), bytes]));\n }\n return bytes;\n}\n/**\n * @_ignore\n */\nexport class Coder {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n defineProperties(this, { name, type, localName, dynamic }, {\n name: \"string\", type: \"string\", localName: \"string\", dynamic: \"boolean\"\n });\n }\n _throwError(message, value) {\n assertArgument(false, message, this.localName, value);\n }\n}\n/**\n * @_ignore\n */\nexport class Writer {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return concat(this.#data);\n }\n get length() { return this.#dataLength; }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData(getBytesCopy(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = getBytesCopy(value);\n const paddingOffset = bytes.length % WordSize;\n if (paddingOffset) {\n bytes = getBytesCopy(concat([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n}\n/**\n * @_ignore\n */\nexport class Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n defineProperties(this, { allowLoose: !!allowLoose });\n this.#data = getBytesCopy(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = (maxInflation != null) ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() { return hexlify(this.#data); }\n get dataLength() { return this.#data.length; }\n get consumed() { return this.#offset; }\n get bytes() { return new Uint8Array(this.#data); }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n // Check for excessive inflation (see: #4537)\n assert(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https:/\\/github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: getBytesCopy(this.#data), offset: this.#offset,\n length: count, info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length, loose) {\n let alignedLength = Math.ceil(length / WordSize) * WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length <= this.#data.length) {\n alignedLength = length;\n }\n else {\n assert(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: getBytesCopy(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length, loose) {\n let bytes = this.#peekBytes(0, length, !!loose);\n this.#incrementBytesRead(length);\n this.#offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n // Read a numeric values\n readValue() {\n return toBigInt(this.readBytes(WordSize));\n }\n readIndex() {\n return toNumber(this.readBytes(WordSize));\n }\n}\n//# sourceMappingURL=abstract-coder.js.map","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assertHash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assertExists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assertExists(this);\n assertBytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","import { hash as assertHash, number as assertNumber } from './_assert.js';\nimport { hmac } from './hmac.js';\nimport { createView, toBytes, checkOpts, asyncLoop } from './utils.js';\n// Common prologue and epilogue for sync/async functions\nfunction pbkdf2Init(hash, _password, _salt, _opts) {\n assertHash(hash);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c, dkLen, asyncTick } = opts;\n assertNumber(c);\n assertNumber(dkLen);\n assertNumber(asyncTick);\n if (c < 1)\n throw new Error('PBKDF2: iterations (c) should be >= 1');\n const password = toBytes(_password);\n const salt = toBytes(_salt);\n // DK = PBKDF2(PRF, Password, Salt, c, dkLen);\n const DK = new Uint8Array(dkLen);\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n const PRF = hmac.create(hash, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c, dkLen, asyncTick, DK, PRF, PRFSalt };\n}\nfunction pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u.fill(0);\n return DK;\n}\n/**\n * PBKDF2-HMAC: RFC 2898 key derivation function\n * @param hash - hash function that would be used e.g. sha256\n * @param password - password from which a derived key is generated\n * @param salt - cryptographic salt\n * @param opts - {c, dkLen} where c is work factor and dkLen is output message size\n */\nexport function pbkdf2(hash, password, salt, opts) {\n const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n for (let ui = 1; ui < c; ui++) {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\nexport async function pbkdf2Async(hash, password, salt, opts) {\n const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n await asyncLoop(c - 1, asyncTick, () => {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n });\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\n//# sourceMappingURL=pbkdf2.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = /* @__PURE__ */ wrapConstructor(() => new SHA512());\nexport const sha512_224 = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());\nexport const sha384 = /* @__PURE__ */ wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/* Browser Crypto Shims */\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { pbkdf2 } from \"@noble/hashes/pbkdf2\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { sha512 } from \"@noble/hashes/sha512\";\nimport { assert, assertArgument } from \"../utils/index.js\";\nfunction getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n}\n;\nconst anyGlobal = getGlobal();\nconst crypto = anyGlobal.crypto || anyGlobal.msCrypto;\nexport function createHash(algo) {\n switch (algo) {\n case \"sha256\": return sha256.create();\n case \"sha512\": return sha512.create();\n }\n assertArgument(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n}\nexport function createHmac(_algo, key) {\n const algo = ({ sha256, sha512 }[_algo]);\n assertArgument(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac.create(algo, key);\n}\nexport function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = ({ sha256, sha512 }[_algo]);\n assertArgument(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return pbkdf2(algo, password, salt, { c: iterations, dkLen: keylen });\n}\nexport function randomBytes(length) {\n assert(crypto != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n assertArgument(Number.isInteger(length) && length > 0 && length <= 1024, \"invalid length\", \"length\", length);\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return result;\n}\n//# sourceMappingURL=crypto-browser.js.map","/**\n * An **HMAC** enables verification that a given key was used\n * to authenticate a payload.\n *\n * See: [[link-wiki-hmac]]\n *\n * @_subsection: api/crypto:HMAC [about-hmac]\n */\nimport { createHmac } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _computeHmac = function (algorithm, key, data) {\n return createHmac(algorithm, key).update(data).digest();\n};\nlet __computeHmac = _computeHmac;\n/**\n * Return the HMAC for %%data%% using the %%key%% key with the underlying\n * %%algo%% used for compression.\n *\n * @example:\n * key = id(\"some-secret\")\n *\n * // Compute the HMAC\n * computeHmac(\"sha256\", key, \"0x1337\")\n * //_result:\n *\n * // To compute the HMAC of UTF-8 data, the data must be\n * // converted to UTF-8 bytes\n * computeHmac(\"sha256\", key, toUtf8Bytes(\"Hello World\"))\n * //_result:\n *\n */\nexport function computeHmac(algorithm, _key, _data) {\n const key = getBytes(_key, \"key\");\n const data = getBytes(_data, \"data\");\n return hexlify(__computeHmac(algorithm, key, data));\n}\ncomputeHmac._ = _computeHmac;\ncomputeHmac.lock = function () { locked = true; };\ncomputeHmac.register = function (func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n};\nObject.freeze(computeHmac);\n//# sourceMappingURL=hmac.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","/**\n * Cryptographic hashing functions\n *\n * @_subsection: api/crypto:Hash Functions [about-crypto-hashing]\n */\nimport { keccak_256 } from \"@noble/hashes/sha3\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _keccak256 = function (data) {\n return keccak_256(data);\n};\nlet __keccak256 = _keccak256;\n/**\n * Compute the cryptographic KECCAK256 hash of %%data%%.\n *\n * The %%data%% **must** be a data representation, to compute the\n * hash of UTF-8 data use the [[id]] function.\n *\n * @returns DataHexstring\n * @example:\n * keccak256(\"0x\")\n * //_result:\n *\n * keccak256(\"0x1337\")\n * //_result:\n *\n * keccak256(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n * // Strings are assumed to be DataHexString, otherwise it will\n * // throw. To hash UTF-8 data, see the note above.\n * keccak256(\"Hello World\")\n * //_error:\n */\nexport function keccak256(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__keccak256(data));\n}\nkeccak256._ = _keccak256;\nkeccak256.lock = function () { locked = true; };\nkeccak256.register = function (func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n};\nObject.freeze(keccak256);\n//# sourceMappingURL=keccak.js.map","import { SHA2 } from './_sha2.js';\nimport { wrapConstructor } from './utils.js';\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf\nconst Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\nconst Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_, i) => i);\nconst Pi = /* @__PURE__ */ Id.map((i) => (9 * i + 5) % 16);\nlet idxL = [Id];\nlet idxR = [Pi];\nfor (let i = 0; i < 4; i++)\n for (let j of [idxL, idxR])\n j.push(j[i].map((k) => Rho[k]));\nconst shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5],\n].map((i) => new Uint8Array(i));\nconst shiftsL = /* @__PURE__ */ idxL.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst shiftsR = /* @__PURE__ */ idxR.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst Kl = /* @__PURE__ */ new Uint32Array([\n 0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e,\n]);\nconst Kr = /* @__PURE__ */ new Uint32Array([\n 0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000,\n]);\n// The rotate left (circular left shift) operation for uint32\nconst rotl = (word, shift) => (word << shift) | (word >>> (32 - shift));\n// It's called f() in spec.\nfunction f(group, x, y, z) {\n if (group === 0)\n return x ^ y ^ z;\n else if (group === 1)\n return (x & y) | (~x & z);\n else if (group === 2)\n return (x | ~y) ^ z;\n else if (group === 3)\n return (x & z) | (y & ~z);\n else\n return x ^ (y | ~z);\n}\n// Temporary buffer, not used to store anything between runs\nconst BUF = /* @__PURE__ */ new Uint32Array(16);\nexport class RIPEMD160 extends SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 0x67452301 | 0;\n this.h1 = 0xefcdab89 | 0;\n this.h2 = 0x98badcfe | 0;\n this.h3 = 0x10325476 | 0;\n this.h4 = 0xc3d2e1f0 | 0;\n }\n get() {\n const { h0, h1, h2, h3, h4 } = this;\n return [h0, h1, h2, h3, h4];\n }\n set(h0, h1, h2, h3, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h2 | 0;\n this.h3 = h3 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i = 0; i < 16; i++, offset += 4)\n BUF[i] = view.getUint32(offset, true);\n // prettier-ignore\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n // Instead of iterating 0 to 80, we split it into 5 groups\n // And use the groups in constants, functions, etc. Much simpler\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group]; // prettier-ignore\n const rl = idxL[group], rr = idxR[group]; // prettier-ignore\n const sl = shiftsL[group], sr = shiftsR[group]; // prettier-ignore\n for (let i = 0; i < 16; i++) {\n const tl = (rotl(al + f(group, bl, cl, dl) + BUF[rl[i]] + hbl, sl[i]) + el) | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore\n }\n // 2 loops are 10% faster\n for (let i = 0; i < 16; i++) {\n const tr = (rotl(ar + f(rGroup, br, cr, dr) + BUF[rr[i]] + hbr, sr[i]) + er) | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr; // prettier-ignore\n }\n }\n // Add the compressed chunk to the current hash value\n this.set((this.h1 + cl + dr) | 0, (this.h2 + dl + er) | 0, (this.h3 + el + ar) | 0, (this.h4 + al + br) | 0, (this.h0 + bl + cr) | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n}\n/**\n * RIPEMD-160 - a hash function from 1990s.\n * @param message - msg that would be hashed\n */\nexport const ripemd160 = /* @__PURE__ */ wrapConstructor(() => new RIPEMD160());\n//# sourceMappingURL=ripemd160.js.map","import { ripemd160 as noble_ripemd160 } from \"@noble/hashes/ripemd160\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _ripemd160 = function (data) {\n return noble_ripemd160(data);\n};\nlet __ripemd160 = _ripemd160;\n/**\n * Compute the cryptographic RIPEMD-160 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * ripemd160(\"0x\")\n * //_result:\n *\n * ripemd160(\"0x1337\")\n * //_result:\n *\n * ripemd160(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n */\nexport function ripemd160(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__ripemd160(data));\n}\nripemd160._ = _ripemd160;\nripemd160.lock = function () { locked = true; };\nripemd160.register = function (func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n};\nObject.freeze(ripemd160);\n//# sourceMappingURL=ripemd160.js.map","/**\n * A **Password-Based Key-Derivation Function** is designed to create\n * a sequence of bytes suitible as a **key** from a human-rememberable\n * password.\n *\n * @_subsection: api/crypto:Passwords [about-pbkdf]\n */\nimport { pbkdf2Sync } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _pbkdf2 = function (password, salt, iterations, keylen, algo) {\n return pbkdf2Sync(password, salt, iterations, keylen, algo);\n};\nlet __pbkdf2 = _pbkdf2;\n/**\n * Return the [[link-pbkdf2]] for %%keylen%% bytes for %%password%% using\n * the %%salt%% and using %%iterations%% of %%algo%%.\n *\n * This PBKDF is outdated and should not be used in new projects, but is\n * required to decrypt older files.\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the PBKDF2\n * pbkdf2(passwordBytes, salt, 1024, 16, \"sha256\")\n * //_result:\n */\nexport function pbkdf2(_password, _salt, iterations, keylen, algo) {\n const password = getBytes(_password, \"password\");\n const salt = getBytes(_salt, \"salt\");\n return hexlify(__pbkdf2(password, salt, iterations, keylen, algo));\n}\npbkdf2._ = _pbkdf2;\npbkdf2.lock = function () { locked = true; };\npbkdf2.register = function (func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n};\nObject.freeze(pbkdf2);\n//# sourceMappingURL=pbkdf2.js.map","/**\n * A **Cryptographically Secure Random Value** is one that has been\n * generated with additional care take to prevent side-channels\n * from allowing others to detect it and prevent others from through\n * coincidence generate the same values.\n *\n * @_subsection: api/crypto:Random Values [about-crypto-random]\n */\nimport { randomBytes as crypto_random } from \"./crypto.js\";\nlet locked = false;\nconst _randomBytes = function (length) {\n return new Uint8Array(crypto_random(length));\n};\nlet __randomBytes = _randomBytes;\n/**\n * Return %%length%% bytes of cryptographically secure random data.\n *\n * @example:\n * randomBytes(8)\n * //_result:\n */\nexport function randomBytes(length) {\n return __randomBytes(length);\n}\nrandomBytes._ = _randomBytes;\nrandomBytes.lock = function () { locked = true; };\nrandomBytes.register = function (func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n};\nObject.freeze(randomBytes);\n//# sourceMappingURL=random.js.map","import { number as assertNumber } from './_assert.js';\nimport { sha256 } from './sha256.js';\nimport { pbkdf2 } from './pbkdf2.js';\nimport { asyncLoop, checkOpts, u32 } from './utils.js';\n// RFC 7914 Scrypt KDF\n// Left rotate for uint32\nconst rotl = (a, b) => (a << b) | (a >>> (32 - b));\n// The main Scrypt loop: uses Salsa extensively.\n// Six versions of the function were tried, this is the fastest one.\n// prettier-ignore\nfunction XorAndSalsa(prev, pi, input, ii, out, oi) {\n // Based on https://cr.yp.to/salsa20.html\n // Xor blocks\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n // Save state to temporary variables (salsa)\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n // Main loop (salsa)\n for (let i = 0; i < 8; i += 2) {\n x04 ^= rotl(x00 + x12 | 0, 7);\n x08 ^= rotl(x04 + x00 | 0, 9);\n x12 ^= rotl(x08 + x04 | 0, 13);\n x00 ^= rotl(x12 + x08 | 0, 18);\n x09 ^= rotl(x05 + x01 | 0, 7);\n x13 ^= rotl(x09 + x05 | 0, 9);\n x01 ^= rotl(x13 + x09 | 0, 13);\n x05 ^= rotl(x01 + x13 | 0, 18);\n x14 ^= rotl(x10 + x06 | 0, 7);\n x02 ^= rotl(x14 + x10 | 0, 9);\n x06 ^= rotl(x02 + x14 | 0, 13);\n x10 ^= rotl(x06 + x02 | 0, 18);\n x03 ^= rotl(x15 + x11 | 0, 7);\n x07 ^= rotl(x03 + x15 | 0, 9);\n x11 ^= rotl(x07 + x03 | 0, 13);\n x15 ^= rotl(x11 + x07 | 0, 18);\n x01 ^= rotl(x00 + x03 | 0, 7);\n x02 ^= rotl(x01 + x00 | 0, 9);\n x03 ^= rotl(x02 + x01 | 0, 13);\n x00 ^= rotl(x03 + x02 | 0, 18);\n x06 ^= rotl(x05 + x04 | 0, 7);\n x07 ^= rotl(x06 + x05 | 0, 9);\n x04 ^= rotl(x07 + x06 | 0, 13);\n x05 ^= rotl(x04 + x07 | 0, 18);\n x11 ^= rotl(x10 + x09 | 0, 7);\n x08 ^= rotl(x11 + x10 | 0, 9);\n x09 ^= rotl(x08 + x11 | 0, 13);\n x10 ^= rotl(x09 + x08 | 0, 18);\n x12 ^= rotl(x15 + x14 | 0, 7);\n x13 ^= rotl(x12 + x15 | 0, 9);\n x14 ^= rotl(x13 + x12 | 0, 13);\n x15 ^= rotl(x14 + x13 | 0, 18);\n }\n // Write output (salsa)\n out[oi++] = (y00 + x00) | 0;\n out[oi++] = (y01 + x01) | 0;\n out[oi++] = (y02 + x02) | 0;\n out[oi++] = (y03 + x03) | 0;\n out[oi++] = (y04 + x04) | 0;\n out[oi++] = (y05 + x05) | 0;\n out[oi++] = (y06 + x06) | 0;\n out[oi++] = (y07 + x07) | 0;\n out[oi++] = (y08 + x08) | 0;\n out[oi++] = (y09 + x09) | 0;\n out[oi++] = (y10 + x10) | 0;\n out[oi++] = (y11 + x11) | 0;\n out[oi++] = (y12 + x12) | 0;\n out[oi++] = (y13 + x13) | 0;\n out[oi++] = (y14 + x14) | 0;\n out[oi++] = (y15 + x15) | 0;\n}\nfunction BlockMix(input, ii, out, oi, r) {\n // The block B is r 128-byte chunks (which is equivalent of 2r 64-byte chunks)\n let head = oi + 0;\n let tail = oi + 16 * r;\n for (let i = 0; i < 16; i++)\n out[tail + i] = input[ii + (2 * r - 1) * 16 + i]; // X ← B[2r−1]\n for (let i = 0; i < r; i++, head += 16, ii += 16) {\n // We write odd & even Yi at same time. Even: 0bXXXXX0 Odd: 0bXXXXX1\n XorAndSalsa(out, tail, input, ii, out, head); // head[i] = Salsa(blockIn[2*i] ^ tail[i-1])\n if (i > 0)\n tail += 16; // First iteration overwrites tmp value in tail\n XorAndSalsa(out, head, input, (ii += 16), out, tail); // tail[i] = Salsa(blockIn[2*i+1] ^ head[i])\n }\n}\n// Common prologue and epilogue for sync/async functions\nfunction scryptInit(password, salt, _opts) {\n // Maxmem - 1GB+1KB by default\n const opts = checkOpts({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024,\n }, _opts);\n const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = opts;\n assertNumber(N);\n assertNumber(r);\n assertNumber(p);\n assertNumber(dkLen);\n assertNumber(asyncTick);\n assertNumber(maxmem);\n if (onProgress !== undefined && typeof onProgress !== 'function')\n throw new Error('progressCb should be function');\n const blockSize = 128 * r;\n const blockSize32 = blockSize / 4;\n if (N <= 1 || (N & (N - 1)) !== 0 || N >= 2 ** (blockSize / 8) || N > 2 ** 32) {\n // NOTE: we limit N to be less than 2**32 because of 32 bit variant of Integrify function\n // There is no JS engines that allows alocate more than 4GB per single Uint8Array for now, but can change in future.\n throw new Error('Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32');\n }\n if (p < 0 || p > ((2 ** 32 - 1) * 32) / blockSize) {\n throw new Error('Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)');\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error('Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32');\n }\n const memUsed = blockSize * (N + p);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n // [B0...Bp−1] ← PBKDF2HMAC-SHA256(Passphrase, Salt, 1, blockSize*ParallelizationFactor)\n // Since it has only one iteration there is no reason to use async variant\n const B = pbkdf2(sha256, password, salt, { c: 1, dkLen: blockSize * p });\n const B32 = u32(B);\n // Re-used between parallel iterations. Array(iterations) of B\n const V = u32(new Uint8Array(blockSize * N));\n const tmp = u32(new Uint8Array(blockSize));\n let blockMixCb = () => { };\n if (onProgress) {\n const totalBlockMix = 2 * N * p;\n // Invoke callback if progress changes from 10.01 to 10.02\n // Allows to draw smooth progress bar on up to 8K screen\n const callbackPer = Math.max(Math.floor(totalBlockMix / 10000), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick };\n}\nfunction scryptOutput(password, dkLen, B, V, tmp) {\n const res = pbkdf2(sha256, password, B, { c: 1, dkLen });\n B.fill(0);\n V.fill(0);\n tmp.fill(0);\n return res;\n}\n/**\n * Scrypt KDF from RFC 7914.\n * @param password - pass\n * @param salt - salt\n * @param opts - parameters\n * - `N` is cpu/mem work factor (power of 2 e.g. 2**18)\n * - `r` is block size (8 is common), fine-tunes sequential memory read size and performance\n * - `p` is parallelization factor (1 is common)\n * - `dkLen` is output key length in bytes e.g. 32.\n * - `asyncTick` - (default: 10) max time in ms for which async function can block execution\n * - `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt\n * - `onProgress` - callback function that would be executed for progress report\n * @returns Derived key\n */\nexport function scrypt(password, salt, opts) {\n const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p; pi++) {\n const Pi = blockSize32 * pi;\n for (let i = 0; i < blockSize32; i++)\n V[i] = B32[Pi + i]; // V[0] = B[i]\n for (let i = 0, pos = 0; i < N - 1; i++) {\n BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n blockMixCb();\n }\n BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n blockMixCb();\n for (let i = 0; i < N; i++) {\n // First u32 of the last 64-byte block (u32 is LE)\n const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n for (let k = 0; k < blockSize32; k++)\n tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B, V, tmp);\n}\n/**\n * Scrypt KDF from RFC 7914.\n */\nexport async function scryptAsync(password, salt, opts) {\n const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p; pi++) {\n const Pi = blockSize32 * pi;\n for (let i = 0; i < blockSize32; i++)\n V[i] = B32[Pi + i]; // V[0] = B[i]\n let pos = 0;\n await asyncLoop(N - 1, asyncTick, () => {\n BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n blockMixCb();\n });\n BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n blockMixCb();\n await asyncLoop(N, asyncTick, () => {\n // First u32 of the last 64-byte block (u32 is LE)\n const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n for (let k = 0; k < blockSize32; k++)\n tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B, V, tmp);\n}\n//# sourceMappingURL=scrypt.js.map","import { scrypt as _nobleSync, scryptAsync as _nobleAsync } from \"@noble/hashes/scrypt\";\nimport { getBytes, hexlify as H } from \"../utils/index.js\";\nlet lockedSync = false, lockedAsync = false;\nconst _scryptAsync = async function (passwd, salt, N, r, p, dkLen, onProgress) {\n return await _nobleAsync(passwd, salt, { N, r, p, dkLen, onProgress });\n};\nconst _scryptSync = function (passwd, salt, N, r, p, dkLen) {\n return _nobleSync(passwd, salt, { N, r, p, dkLen });\n};\nlet __scryptAsync = _scryptAsync;\nlet __scryptSync = _scryptSync;\n/**\n * The [[link-wiki-scrypt]] uses a memory and cpu hard method of\n * derivation to increase the resource cost to brute-force a password\n * for a given key.\n *\n * This means this algorithm is intentionally slow, and can be tuned to\n * become slower. As computation and memory speed improve over time,\n * increasing the difficulty maintains the cost of an attacker.\n *\n * For example, if a target time of 5 seconds is used, a legitimate user\n * which knows their password requires only 5 seconds to unlock their\n * account. A 6 character password has 68 billion possibilities, which\n * would require an attacker to invest over 10,000 years of CPU time. This\n * is of course a crude example (as password generally aren't random),\n * but demonstrates to value of imposing large costs to decryption.\n *\n * For this reason, if building a UI which involved decrypting or\n * encrypting datsa using scrypt, it is recommended to use a\n * [[ProgressCallback]] (as event short periods can seem lik an eternity\n * if the UI freezes). Including the phrase //\"decrypting\"// in the UI\n * can also help, assuring the user their waiting is for a good reason.\n *\n * @_docloc: api/crypto:Passwords\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the scrypt\n * scrypt(passwordBytes, salt, 1024, 8, 1, 16)\n * //_result:\n */\nexport async function scrypt(_passwd, _salt, N, r, p, dkLen, progress) {\n const passwd = getBytes(_passwd, \"passwd\");\n const salt = getBytes(_salt, \"salt\");\n return H(await __scryptAsync(passwd, salt, N, r, p, dkLen, progress));\n}\nscrypt._ = _scryptAsync;\nscrypt.lock = function () { lockedAsync = true; };\nscrypt.register = function (func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n};\nObject.freeze(scrypt);\n/**\n * Provides a synchronous variant of [[scrypt]].\n *\n * This will completely lock up and freeze the UI in a browser and will\n * prevent any event loop from progressing. For this reason, it is\n * preferred to use the [async variant](scrypt).\n *\n * @_docloc: api/crypto:Passwords\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the scrypt\n * scryptSync(passwordBytes, salt, 1024, 8, 1, 16)\n * //_result:\n */\nexport function scryptSync(_passwd, _salt, N, r, p, dkLen) {\n const passwd = getBytes(_passwd, \"passwd\");\n const salt = getBytes(_salt, \"salt\");\n return H(__scryptSync(passwd, salt, N, r, p, dkLen));\n}\nscryptSync._ = _scryptSync;\nscryptSync.lock = function () { lockedSync = true; };\nscryptSync.register = function (func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n};\nObject.freeze(scryptSync);\n//# sourceMappingURL=scrypt.js.map","import { createHash } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nconst _sha256 = function (data) {\n return createHash(\"sha256\").update(data).digest();\n};\nconst _sha512 = function (data) {\n return createHash(\"sha512\").update(data).digest();\n};\nlet __sha256 = _sha256;\nlet __sha512 = _sha512;\nlet locked256 = false, locked512 = false;\n/**\n * Compute the cryptographic SHA2-256 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * sha256(\"0x\")\n * //_result:\n *\n * sha256(\"0x1337\")\n * //_result:\n *\n * sha256(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n */\nexport function sha256(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__sha256(data));\n}\nsha256._ = _sha256;\nsha256.lock = function () { locked256 = true; };\nsha256.register = function (func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n};\nObject.freeze(sha256);\n/**\n * Compute the cryptographic SHA2-512 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * sha512(\"0x\")\n * //_result:\n *\n * sha512(\"0x1337\")\n * //_result:\n *\n * sha512(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n */\nexport function sha512(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__sha512(data));\n}\nsha512._ = _sha512;\nsha512.lock = function () { locked512 = true; };\nsha512.register = function (func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n};\nObject.freeze(sha256);\n//# sourceMappingURL=sha2.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport const bitSet = (n, pos, value) => {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n};\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = mod(num, fieldOrder - _1n) + _1n;\n return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","/**\n * A constant for the zero address.\n *\n * (**i.e.** ``\"0x0000000000000000000000000000000000000000\"``)\n */\nexport const ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n//# sourceMappingURL=addresses.js.map","/**\n * A constant for the zero hash.\n *\n * (**i.e.** ``\"0x0000000000000000000000000000000000000000000000000000000000000000\"``)\n */\nexport const ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n//# sourceMappingURL=hashes.js.map","/**\n * A constant for the order N for the secp256k1 curve.\n *\n * (**i.e.** ``0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n``)\n */\nexport const N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n/**\n * A constant for the number of wei in a single ether.\n *\n * (**i.e.** ``1000000000000000000n``)\n */\nexport const WeiPerEther = BigInt(\"1000000000000000000\");\n/**\n * A constant for the maximum value for a ``uint256``.\n *\n * (**i.e.** ``0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)\n */\nexport const MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n/**\n * A constant for the minimum value for an ``int256``.\n *\n * (**i.e.** ``-8000000000000000000000000000000000000000000000000000000000000000n``)\n */\nexport const MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n/**\n * A constant for the maximum value for an ``int256``.\n *\n * (**i.e.** ``0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)\n */\nexport const MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n//# sourceMappingURL=numbers.js.map","// NFKC (composed) // (decomposed)\n/**\n * A constant for the ether symbol (normalized using NFKC).\n *\n * (**i.e.** ``\"\\\\u039e\"``)\n */\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n/**\n * A constant for the [[link-eip-191]] personal message prefix.\n *\n * (**i.e.** ``\"\\\\x19Ethereum Signed Message:\\\\n\"``)\n */\nexport const MessagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n//# sourceMappingURL=strings.js.map","import { ZeroHash } from \"../constants/index.js\";\nimport { concat, dataLength, getBigInt, getBytes, getNumber, hexlify, toBeArray, isHexString, zeroPadValue, assertArgument, assertPrivate } from \"../utils/index.js\";\n// Constants\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_2 = BigInt(2);\nconst BN_27 = BigInt(27);\nconst BN_28 = BigInt(28);\nconst BN_35 = BigInt(35);\nconst _guard = {};\nfunction toUint256(value) {\n return zeroPadValue(toBeArray(value), 32);\n}\n/**\n * A Signature @TODO\n *\n *\n * @_docloc: api/crypto:Signing\n */\nexport class Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signautre.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() { return this.#r; }\n set r(value) {\n assertArgument(dataLength(value) === 32, \"invalid r\", \"value\", value);\n this.#r = hexlify(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() { return this.#s; }\n set s(_value) {\n assertArgument(dataLength(_value) === 32, \"invalid s\", \"value\", _value);\n const value = hexlify(_value);\n assertArgument(parseInt(value.substring(0, 3)) < 8, \"non-canonical s\", \"value\", value);\n this.#s = value;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() { return this.#v; }\n set v(value) {\n const v = getNumber(value, \"value\");\n assertArgument(v === 27 || v === 28, \"invalid v\", \"v\", value);\n this.#v = v;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() { return this.#networkV; }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v = this.networkV;\n if (v == null) {\n return null;\n }\n return Signature.getChainId(v);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return (this.v === 27) ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n // The EIP-2098 compact representation\n const yParityAndS = getBytes(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 0x80;\n }\n return hexlify(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return concat([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return concat([this.r, this.s, (this.yParity ? \"0x1c\" : \"0x1b\")]);\n }\n /**\n * @private\n */\n constructor(guard, r, s, v) {\n assertPrivate(guard, _guard, \"Signature\");\n this.#r = r;\n this.#s = s;\n this.#v = v;\n this.#networkV = null;\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return `Signature { r: \"${this.r}\", s: \"${this.s}\", yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone = new Signature(_guard, this.r, this.s, this.v);\n if (this.networkV) {\n clone.#networkV = this.networkV;\n }\n return clone;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: ((networkV != null) ? networkV.toString() : null),\n r: this.r, s: this.s, v: this.v,\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v) {\n const bv = getBigInt(v, \"v\");\n // The v is not an EIP-155 v, so it is the unspecified chain ID\n if ((bv == BN_27) || (bv == BN_28)) {\n return BN_0;\n }\n // Bad value for an EIP-155 v\n assertArgument(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v) {\n return (getBigInt(chainId) * BN_2) + BigInt(35 + v - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v) {\n const bv = getBigInt(v);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n assertArgument(bv >= BN_35, \"invalid v\", \"v\", v);\n // Otherwise, EIP-155 v means odd is 27 and even is 28\n return (bv & BN_1) ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check, message) {\n assertArgument(check, message, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new Signature(_guard, ZeroHash, ZeroHash, 27);\n }\n if (typeof (sig) === \"string\") {\n const bytes = getBytes(sig, \"signature\");\n if (bytes.length === 64) {\n const r = hexlify(bytes.slice(0, 32));\n const s = bytes.slice(32, 64);\n const v = (s[0] & 0x80) ? 28 : 27;\n s[0] &= 0x7f;\n return new Signature(_guard, r, hexlify(s), v);\n }\n if (bytes.length === 65) {\n const r = hexlify(bytes.slice(0, 32));\n const s = bytes.slice(32, 64);\n assertError((s[0] & 0x80) === 0, \"non-canonical s\");\n const v = Signature.getNormalizedV(bytes[64]);\n return new Signature(_guard, r, hexlify(s), v);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof Signature) {\n return sig.clone();\n }\n // Get r\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r = toUint256(_r);\n // Get s; by any means necessary (we check consistency below)\n const s = (function (s, yParityAndS) {\n if (s != null) {\n return toUint256(s);\n }\n if (yParityAndS != null) {\n assertError(isHexString(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = getBytes(yParityAndS);\n bytes[0] &= 0x7f;\n return hexlify(bytes);\n }\n assertError(false, \"missing s\");\n })(sig.s, sig.yParityAndS);\n assertError((getBytes(s)[0] & 0x80) == 0, \"non-canonical s\");\n // Get v; by any means necessary (we check consistency below)\n const { networkV, v } = (function (_v, yParityAndS, yParity) {\n if (_v != null) {\n const v = getBigInt(_v);\n return {\n networkV: ((v >= BN_35) ? v : undefined),\n v: Signature.getNormalizedV(v)\n };\n }\n if (yParityAndS != null) {\n assertError(isHexString(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: ((getBytes(yParityAndS)[0] & 0x80) ? 28 : 27) };\n }\n if (yParity != null) {\n switch (getNumber(yParity, \"sig.yParity\")) {\n case 0: return { v: 27 };\n case 1: return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n })(sig.v, sig.yParityAndS, sig.yParity);\n const result = new Signature(_guard, r, s, v);\n if (networkV) {\n result.#networkV = networkV;\n }\n // If multiple of v, yParity, yParityAndS we given, check they match\n assertError(sig.yParity == null || getNumber(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n}\n//# sourceMappingURL=signature.js.map","/**\n * Add details about signing here.\n *\n * @_subsection: api/crypto:Signing [about-signing]\n */\nimport { secp256k1 } from \"@noble/curves/secp256k1\";\nimport { concat, dataLength, getBytes, getBytesCopy, hexlify, toBeHex, assertArgument } from \"../utils/index.js\";\nimport { Signature } from \"./signature.js\";\n/**\n * A **SigningKey** provides high-level access to the elliptic curve\n * cryptography (ECC) operations and key management.\n */\nexport class SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n assertArgument(dataLength(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = hexlify(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() { return this.#privateKey; }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() { return SigningKey.computePublicKey(this.#privateKey); }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() { return SigningKey.computePublicKey(this.#privateKey, true); }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest) {\n assertArgument(dataLength(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = secp256k1.sign(getBytesCopy(digest), getBytesCopy(this.#privateKey), {\n lowS: true\n });\n return Signature.from({\n r: toBeHex(sig.r, 32),\n s: toBeHex(sig.s, 32),\n v: (sig.recovery ? 0x1c : 0x1b)\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = SigningKey.computePublicKey(other);\n return hexlify(secp256k1.getSharedSecret(getBytesCopy(this.#privateKey), getBytes(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = getBytes(key, \"key\");\n // private key\n if (bytes.length === 32) {\n const pubKey = secp256k1.getPublicKey(bytes, !!compressed);\n return hexlify(pubKey);\n }\n // raw public key; use uncompressed key with 0x04 prefix\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 0x04;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1.ProjectivePoint.fromHex(bytes);\n return hexlify(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest, signature) {\n assertArgument(dataLength(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = Signature.from(signature);\n let secpSig = secp256k1.Signature.fromCompact(getBytesCopy(concat([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey(getBytesCopy(digest));\n assertArgument(pubKey != null, \"invalid signautre for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n}\n//# sourceMappingURL=signing-key.js.map","/**\n * A fundamental building block of Ethereum is the underlying\n * cryptographic primitives.\n *\n * @_section: api/crypto:Cryptographic Functions [about-crypto]\n */\nnull;\n// We import all these so we can export lock()\nimport { computeHmac } from \"./hmac.js\";\nimport { keccak256 } from \"./keccak.js\";\nimport { ripemd160 } from \"./ripemd160.js\";\nimport { pbkdf2 } from \"./pbkdf2.js\";\nimport { randomBytes } from \"./random.js\";\nimport { scrypt, scryptSync } from \"./scrypt.js\";\nimport { sha256, sha512 } from \"./sha2.js\";\nexport { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync };\nexport { SigningKey } from \"./signing-key.js\";\nexport { Signature } from \"./signature.js\";\n/**\n * Once called, prevents any future change to the underlying cryptographic\n * primitives using the ``.register`` feature for hooks.\n */\nfunction lock() {\n computeHmac.lock();\n keccak256.lock();\n pbkdf2.lock();\n randomBytes.lock();\n ripemd160.lock();\n scrypt.lock();\n scryptSync.lock();\n sha256.lock();\n sha512.lock();\n randomBytes.lock();\n}\nexport { lock };\n//# sourceMappingURL=index.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { getBytes, assertArgument } from \"../utils/index.js\";\nconst BN_0 = BigInt(0);\nconst BN_36 = BigInt(36);\nfunction getChecksumAddress(address) {\n // if (!isHexString(address, 20)) {\n // logger.throwArgumentError(\"invalid address\", \"address\", address);\n // }\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n const hashed = getBytes(keccak256(expanded));\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n}\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n// Create lookup table\nconst ibanLookup = {};\nfor (let i = 0; i < 10; i++) {\n ibanLookup[String(i)] = String(i);\n}\nfor (let i = 0; i < 26; i++) {\n ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);\n}\n// How many decimal digits can we process? (for 64-bit float, this is 15)\n// i.e. Math.floor(Math.log10(Number.MAX_SAFE_INTEGER));\nconst safeDigits = 15;\nfunction ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) {\n checksum = \"0\" + checksum;\n }\n return checksum;\n}\n;\nconst Base36 = (function () {\n ;\n const result = {};\n for (let i = 0; i < 36; i++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i];\n result[key] = BigInt(i);\n }\n return result;\n})();\nfunction fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i = 0; i < value.length; i++) {\n result = result * BN_36 + Base36[value[i]];\n }\n return result;\n}\n/**\n * Returns a normalized and checksumed address for %%address%%.\n * This accepts non-checksum addresses, checksum addresses and\n * [[getIcapAddress]] formats.\n *\n * The checksum in Ethereum uses the capitalization (upper-case\n * vs lower-case) of the characters within an address to encode\n * its checksum, which offers, on average, a checksum of 15-bits.\n *\n * If %%address%% contains both upper-case and lower-case, it is\n * assumed to already be a checksum address and its checksum is\n * validated, and if the address fails its expected checksum an\n * error is thrown.\n *\n * If you wish the checksum of %%address%% to be ignore, it should\n * be converted to lower-case (i.e. ``.toLowercase()``) before\n * being passed in. This should be a very rare situation though,\n * that you wish to bypass the safegaurds in place to protect\n * against an address that has been incorrectly copied from another\n * source.\n *\n * @example:\n * // Adds the checksum (via upper-casing specific letters)\n * getAddress(\"0x8ba1f109551bd432803012645ac136ddd64dba72\")\n * //_result:\n *\n * // Converts ICAP address and adds checksum\n * getAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\");\n * //_result:\n *\n * // Throws an error if an address contains mixed case,\n * // but the checksum fails\n * getAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_error:\n */\nexport function getAddress(address) {\n assertArgument(typeof (address) === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n // Missing the 0x prefix\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n // It is a checksummed address with a bad checksum\n assertArgument(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n // Maybe ICAP? (we only support direct mode)\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n // It is an ICAP address with a bad checksum\n assertArgument(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n assertArgument(false, \"invalid address\", \"address\", address);\n}\n/**\n * The [ICAP Address format](link-icap) format is an early checksum\n * format which attempts to be compatible with the banking\n * industry [IBAN format](link-wiki-iban) for bank accounts.\n *\n * It is no longer common or a recommended format.\n *\n * @example:\n * getIcapAddress(\"0x8ba1f109551bd432803012645ac136ddd64dba72\");\n * //_result:\n *\n * getIcapAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\");\n * //_result:\n *\n * // Throws an error if the ICAP checksum is wrong\n * getIcapAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK37\");\n * //_error:\n */\nexport function getIcapAddress(address) {\n //let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n let base36 = BigInt(getAddress(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n//# sourceMappingURL=address.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { concat, dataSlice, getBigInt, getBytes, encodeRlp, assertArgument } from \"../utils/index.js\";\nimport { getAddress } from \"./address.js\";\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\n/**\n * Returns the address that would result from a ``CREATE`` for %%tx%%.\n *\n * This can be used to compute the address a contract will be\n * deployed to by an EOA when sending a deployment transaction (i.e.\n * when the ``to`` address is ``null``).\n *\n * This can also be used to compute the address a contract will be\n * deployed to by a contract, by using the contract's address as the\n * ``to`` and the contract's nonce.\n *\n * @example\n * from = \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\";\n * nonce = 5;\n *\n * getCreateAddress({ from, nonce });\n * //_result:\n */\nexport function getCreateAddress(tx) {\n const from = getAddress(tx.from);\n const nonce = getBigInt(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n }\n else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n }\n else {\n nonceHex = \"0x\" + nonceHex;\n }\n return getAddress(dataSlice(keccak256(encodeRlp([from, nonceHex])), 12));\n}\n/**\n * Returns the address that would result from a ``CREATE2`` operation\n * with the given %%from%%, %%salt%% and %%initCodeHash%%.\n *\n * To compute the %%initCodeHash%% from a contract's init code, use\n * the [[keccak256]] function.\n *\n * For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].\n *\n * @example\n * // The address of the contract\n * from = \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\"\n *\n * // The salt\n * salt = id(\"HelloWorld\")\n *\n * // The hash of the initCode\n * initCode = \"0x6394198df16000526103ff60206004601c335afa6040516060f3\";\n * initCodeHash = keccak256(initCode)\n *\n * getCreate2Address(from, salt, initCodeHash)\n * //_result:\n */\nexport function getCreate2Address(_from, _salt, _initCodeHash) {\n const from = getAddress(_from);\n const salt = getBytes(_salt, \"salt\");\n const initCodeHash = getBytes(_initCodeHash, \"initCodeHash\");\n assertArgument(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n assertArgument(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return getAddress(dataSlice(keccak256(concat([\"0xff\", from, salt, initCodeHash])), 12));\n}\n//# sourceMappingURL=contract-address.js.map","import { assert, assertArgument } from \"../utils/index.js\";\nimport { getAddress } from \"./address.js\";\n/**\n * Returns true if %%value%% is an object which implements the\n * [[Addressable]] interface.\n *\n * @example:\n * // Wallets and AbstractSigner sub-classes\n * isAddressable(Wallet.createRandom())\n * //_result:\n *\n * // Contracts\n * contract = new Contract(\"dai.tokens.ethers.eth\", [ ], provider)\n * isAddressable(contract)\n * //_result:\n */\nexport function isAddressable(value) {\n return (value && typeof (value.getAddress) === \"function\");\n}\n/**\n * Returns true if %%value%% is a valid address.\n *\n * @example:\n * // Valid address\n * isAddress(\"0x8ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_result:\n *\n * // Valid ICAP address\n * isAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\")\n * //_result:\n *\n * // Invalid checksum\n * isAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBa72\")\n * //_result:\n *\n * // Invalid ICAP checksum\n * isAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_result:\n *\n * // Not an address (an ENS name requires a provided and an\n * // asynchronous API to access)\n * isAddress(\"ricmoo.eth\")\n * //_result:\n */\nexport function isAddress(value) {\n try {\n getAddress(value);\n return true;\n }\n catch (error) { }\n return false;\n}\nasync function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n assert(typeof (target) !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n assertArgument(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return getAddress(result);\n}\n/**\n * Resolves to an address for the %%target%%, which may be any\n * supported address type, an [[Addressable]] or a Promise which\n * resolves to an address.\n *\n * If an ENS name is provided, but that name has not been correctly\n * configured a [[UnconfiguredNameError]] is thrown.\n *\n * @example:\n * addr = \"0x6B175474E89094C44Da98b954EedeAC495271d0F\"\n *\n * // Addresses are return synchronously\n * resolveAddress(addr, provider)\n * //_result:\n *\n * // Address promises are resolved asynchronously\n * resolveAddress(Promise.resolve(addr))\n * //_result:\n *\n * // ENS names are resolved asynchronously\n * resolveAddress(\"dai.tokens.ethers.eth\", provider)\n * //_result:\n *\n * // Addressable objects are resolved asynchronously\n * contract = new Contract(addr, [ ])\n * resolveAddress(contract, provider)\n * //_result:\n *\n * // Unconfigured ENS names reject\n * resolveAddress(\"nothing-here.ricmoo.eth\", provider)\n * //_error:\n *\n * // ENS names require a NameResolver object passed in\n * // (notice the provider was omitted)\n * resolveAddress(\"nothing-here.ricmoo.eth\")\n * //_error:\n */\nexport function resolveAddress(target, resolver) {\n if (typeof (target) === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return getAddress(target);\n }\n assert(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n }\n else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n }\n else if (target && typeof (target.then) === \"function\") {\n return checkAddress(target, target);\n }\n assertArgument(false, \"unsupported addressable value\", \"target\", target);\n}\n//# sourceMappingURL=checks.js.map","/**\n * A Typed object allows a value to have its type explicitly\n * specified.\n *\n * For example, in Solidity, the value ``45`` could represent a\n * ``uint8`` or a ``uint256``. The value ``0x1234`` could represent\n * a ``bytes2`` or ``bytes``.\n *\n * Since JavaScript has no meaningful way to explicitly inform any\n * APIs which what the type is, this allows transparent interoperation\n * with Soldity.\n *\n * @_subsection: api/abi:Typed Values\n */\nimport { assertPrivate, defineProperties } from \"../utils/index.js\";\nconst _gaurd = {};\nfunction n(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n}\nfunction b(value, size) {\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `bytes${(size) ? size : \"\"}`, value, { size });\n}\nconst _typedSymbol = Symbol.for(\"_ethers_typed\");\n/**\n * The **Typed** class to wrap values providing explicit type information.\n */\nexport class Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n assertPrivate(_gaurd, gaurd, \"Typed\");\n defineProperties(this, { _typedSymbol, type, value });\n this.#options = options;\n // Check the value is valid\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n }\n else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n }\n else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v) => v.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!(this.type.match(/^u?int[0-9]+$/));\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return (this.type === \"string\");\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return (this.value).length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v) { return n(v, 8); }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v) { return n(v, 16); }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v) { return n(v, 24); }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v) { return n(v, 32); }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v) { return n(v, 40); }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v) { return n(v, 48); }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v) { return n(v, 56); }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v) { return n(v, 64); }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v) { return n(v, 72); }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v) { return n(v, 80); }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v) { return n(v, 88); }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v) { return n(v, 96); }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v) { return n(v, 104); }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v) { return n(v, 112); }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v) { return n(v, 120); }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v) { return n(v, 128); }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v) { return n(v, 136); }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v) { return n(v, 144); }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v) { return n(v, 152); }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v) { return n(v, 160); }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v) { return n(v, 168); }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v) { return n(v, 176); }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v) { return n(v, 184); }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v) { return n(v, 192); }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v) { return n(v, 200); }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v) { return n(v, 208); }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v) { return n(v, 216); }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v) { return n(v, 224); }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v) { return n(v, 232); }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v) { return n(v, 240); }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v) { return n(v, 248); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v) { return n(v, 256); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v) { return n(v, 256); }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v) { return n(v, -8); }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v) { return n(v, -16); }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v) { return n(v, -24); }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v) { return n(v, -32); }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v) { return n(v, -40); }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v) { return n(v, -48); }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v) { return n(v, -56); }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v) { return n(v, -64); }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v) { return n(v, -72); }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v) { return n(v, -80); }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v) { return n(v, -88); }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v) { return n(v, -96); }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v) { return n(v, -104); }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v) { return n(v, -112); }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v) { return n(v, -120); }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v) { return n(v, -128); }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v) { return n(v, -136); }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v) { return n(v, -144); }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v) { return n(v, -152); }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v) { return n(v, -160); }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v) { return n(v, -168); }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v) { return n(v, -176); }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v) { return n(v, -184); }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v) { return n(v, -192); }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v) { return n(v, -200); }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v) { return n(v, -208); }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v) { return n(v, -216); }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v) { return n(v, -224); }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v) { return n(v, -232); }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v) { return n(v, -240); }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v) { return n(v, -248); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v) { return n(v, -256); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v) { return n(v, -256); }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v) { return b(v, 1); }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v) { return b(v, 2); }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v) { return b(v, 3); }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v) { return b(v, 4); }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v) { return b(v, 5); }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v) { return b(v, 6); }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v) { return b(v, 7); }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v) { return b(v, 8); }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v) { return b(v, 9); }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v) { return b(v, 10); }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v) { return b(v, 11); }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v) { return b(v, 12); }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v) { return b(v, 13); }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v) { return b(v, 14); }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v) { return b(v, 15); }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v) { return b(v, 16); }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v) { return b(v, 17); }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v) { return b(v, 18); }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v) { return b(v, 19); }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v) { return b(v, 20); }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v) { return b(v, 21); }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v) { return b(v, 22); }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v) { return b(v, 23); }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v) { return b(v, 24); }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v) { return b(v, 25); }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v) { return b(v, 26); }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v) { return b(v, 27); }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v) { return b(v, 28); }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v) { return b(v, 29); }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v) { return b(v, 30); }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v) { return b(v, 31); }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v) { return b(v, 32); }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v) { return new Typed(_gaurd, \"address\", v); }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v) { return new Typed(_gaurd, \"bool\", !!v); }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v) { return new Typed(_gaurd, \"bytes\", v); }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v) { return new Typed(_gaurd, \"string\", v); }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v, dynamic) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"array\", v, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v, name) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"tuple\", v, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v) {\n return new Typed(_gaurd, \"overrides\", Object.assign({}, v));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return (value\n && typeof (value) === \"object\"\n && \"_typedSymbol\" in value\n && value._typedSymbol === _typedSymbol);\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n}\n//# sourceMappingURL=typed.js.map","import { getAddress } from \"../../address/index.js\";\nimport { toBeHex } from \"../../utils/maths.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class AddressCoder extends Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = Typed.dereference(_value, \"string\");\n try {\n value = getAddress(value);\n }\n catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return getAddress(toBeHex(reader.readValue(), 20));\n }\n}\n//# sourceMappingURL=address.js.map","import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map","import { defineProperties, isError, assert, assertArgument, assertArgumentCount } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder, Result, WordSize, Writer } from \"./abstract-coder.js\";\nimport { AnonymousCoder } from \"./anonymous.js\";\n/**\n * @_ignore\n */\nexport function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n }\n else if (values && typeof (values) === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n assert(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n assert(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n }\n else {\n assertArgument(false, \"invalid tuple value\", \"tuple\", values);\n }\n assertArgument(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new Writer();\n let dynamicWriter = new Writer();\n let updateFuncs = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n }\n else {\n coder.encode(staticWriter, value);\n }\n });\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n/**\n * @_ignore\n */\nexport function unpack(reader, coders) {\n let values = [];\n let keys = [];\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n }\n catch (error) {\n // Cannot recover from this\n if (isError(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n else {\n try {\n value = coder.decode(reader);\n }\n catch (error) {\n // Cannot recover from this\n if (isError(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == undefined) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return Result.fromItems(values, keys);\n}\n/**\n * @_ignore\n */\nexport class ArrayCoder extends Coder {\n coder;\n length;\n constructor(coder, length, localName) {\n const type = (coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n defineProperties(this, { coder, length });\n }\n defaultValue() {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n assertArgumentCount(value.length, count, \"coder array\" + (this.localName ? (\" \" + this.localName) : \"\"));\n let coders = [];\n for (let i = 0; i < value.length; i++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n assert(count * WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i = 0; i < count; i++) {\n coders.push(new AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n}\n//# sourceMappingURL=array.js.map","import { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class BooleanCoder extends Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n}\n//# sourceMappingURL=boolean.js.map","import { getBytesCopy, hexlify } from \"../../utils/index.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class DynamicBytesCoder extends Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = getBytesCopy(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n}\n/**\n * @_ignore\n */\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return hexlify(super.decode(reader));\n }\n}\n//# sourceMappingURL=bytes.js.map","import { defineProperties, getBytesCopy, hexlify } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class FixedBytesCoder extends Coder {\n size;\n constructor(size, localName) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n defineProperties(this, { size }, { size: \"number\" });\n }\n defaultValue() {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = getBytesCopy(Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return hexlify(reader.readBytes(this.size));\n }\n}\n//# sourceMappingURL=fixed-bytes.js.map","import { Coder } from \"./abstract-coder.js\";\nconst Empty = new Uint8Array([]);\n/**\n * @_ignore\n */\nexport class NullCoder extends Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n}\n//# sourceMappingURL=null.js.map","import { defineProperties, fromTwos, getBigInt, mask, toTwos } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder, WordSize } from \"./abstract-coder.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n/**\n * @_ignore\n */\nexport class NumberCoder extends Coder {\n size;\n signed;\n constructor(size, signed, localName) {\n const name = ((signed ? \"int\" : \"uint\") + (size * 8));\n super(name, name, localName, false);\n defineProperties(this, { size, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = getBigInt(Typed.dereference(_value, this.type));\n // Check bounds are safe for encoding\n let maxUintValue = mask(BN_MAX_UINT256, WordSize * 8);\n if (this.signed) {\n let bounds = mask(maxUintValue, (this.size * 8) - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = toTwos(value, 8 * WordSize);\n }\n else if (value < BN_0 || value > mask(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = mask(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = fromTwos(value, this.size * 8);\n }\n return value;\n }\n}\n//# sourceMappingURL=number.js.map","import { toUtf8Bytes, toUtf8String } from \"../../utils/utf8.js\";\nimport { Typed } from \"../typed.js\";\nimport { DynamicBytesCoder } from \"./bytes.js\";\n/**\n * @_ignore\n */\nexport class StringCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, toUtf8Bytes(Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return toUtf8String(super.decode(reader));\n }\n}\n//# sourceMappingURL=string.js.map","import { defineProperties } from \"../../utils/properties.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\nimport { pack, unpack } from \"./array.js\";\n/**\n * @_ignore\n */\nexport class TupleCoder extends Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n super(\"tuple\", type, localName, dynamic);\n defineProperties(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n // Add named values\n this.coders.forEach((coder, index) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"tuple\");\n return pack(writer, this.coders, value);\n }\n decode(reader) {\n return unpack(reader, this.coders);\n }\n}\n//# sourceMappingURL=tuple.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { toUtf8Bytes } from \"../utils/index.js\";\n/**\n * A simple hashing function which operates on UTF-8 strings to\n * compute an 32-byte identifier.\n *\n * This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes\n * the [[keccak256]].\n *\n * @example:\n * id(\"hello world\")\n * //_result:\n */\nexport function id(value) {\n return keccak256(toUtf8Bytes(value));\n}\n//# sourceMappingURL=id.js.map","// created 2023-09-25T01:01:55.148Z\n// compressed base64-encoded blob for include-ens data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: 0565ed049b9cf1614bb9e11ba7d8ac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kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI';\nconst FENCED = new Map([[8217,\"apostrophe\"],[8260,\"fraction slash\"],[12539,\"middle dot\"]]);\nconst NSM_MAX = 4;\n\nfunction decode_arithmetic(bytes) {\r\n\tlet pos = 0;\r\n\tfunction u16() { return (bytes[pos++] << 8) | bytes[pos++]; }\r\n\t\r\n\t// decode the frequency table\r\n\tlet symbol_count = u16();\r\n\tlet total = 1;\r\n\tlet acc = [0, 1]; // first symbol has frequency 1\r\n\tfor (let i = 1; i < symbol_count; i++) {\r\n\t\tacc.push(total += u16());\r\n\t}\r\n\r\n\t// skip the sized-payload that the last 3 symbols index into\r\n\tlet skip = u16();\r\n\tlet pos_payload = pos;\r\n\tpos += skip;\r\n\r\n\tlet read_width = 0;\r\n\tlet read_buffer = 0; \r\n\tfunction read_bit() {\r\n\t\tif (read_width == 0) {\r\n\t\t\t// this will read beyond end of buffer\r\n\t\t\t// but (undefined|0) => zero pad\r\n\t\t\tread_buffer = (read_buffer << 8) | bytes[pos++];\r\n\t\t\tread_width = 8;\r\n\t\t}\r\n\t\treturn (read_buffer >> --read_width) & 1;\r\n\t}\r\n\r\n\tconst N = 31;\r\n\tconst FULL = 2**N;\r\n\tconst HALF = FULL >>> 1;\r\n\tconst QRTR = HALF >> 1;\r\n\tconst MASK = FULL - 1;\r\n\r\n\t// fill register\r\n\tlet register = 0;\r\n\tfor (let i = 0; i < N; i++) register = (register << 1) | read_bit();\r\n\r\n\tlet symbols = [];\r\n\tlet low = 0;\r\n\tlet range = FULL; // treat like a float\r\n\twhile (true) {\r\n\t\tlet value = Math.floor((((register - low + 1) * total) - 1) / range);\r\n\t\tlet start = 0;\r\n\t\tlet end = symbol_count;\r\n\t\twhile (end - start > 1) { // binary search\r\n\t\t\tlet mid = (start + end) >>> 1;\r\n\t\t\tif (value < acc[mid]) {\r\n\t\t\t\tend = mid;\r\n\t\t\t} else {\r\n\t\t\t\tstart = mid;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (start == 0) break; // first symbol is end mark\r\n\t\tsymbols.push(start);\r\n\t\tlet a = low + Math.floor(range * acc[start] / total);\r\n\t\tlet b = low + Math.floor(range * acc[start+1] / total) - 1;\r\n\t\twhile (((a ^ b) & HALF) == 0) {\r\n\t\t\tregister = (register << 1) & MASK | read_bit();\r\n\t\t\ta = (a << 1) & MASK;\r\n\t\t\tb = (b << 1) & MASK | 1;\r\n\t\t}\r\n\t\twhile (a & ~b & QRTR) {\r\n\t\t\tregister = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit();\r\n\t\t\ta = (a << 1) ^ HALF;\r\n\t\t\tb = ((b ^ HALF) << 1) | HALF | 1;\r\n\t\t}\r\n\t\tlow = a;\r\n\t\trange = 1 + b - a;\r\n\t}\r\n\tlet offset = symbol_count - 4;\r\n\treturn symbols.map(x => { // index into payload\r\n\t\tswitch (x - offset) {\r\n\t\t\tcase 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 1: return offset + bytes[pos_payload++];\r\n\t\t\tdefault: return x - 1;\r\n\t\t}\r\n\t});\r\n}\t\r\n\r\n// returns an iterator which returns the next symbol\r\nfunction read_payload(v) {\r\n\tlet pos = 0;\r\n\treturn () => v[pos++];\r\n}\r\nfunction read_compressed_payload(s) {\r\n\treturn read_payload(decode_arithmetic(unsafe_atob(s)));\r\n}\r\n\r\n// unsafe in the sense:\r\n// expected well-formed Base64 w/o padding \r\n// 20220922: added for https://github.com/adraffy/ens-normalize.js/issues/4\r\nfunction unsafe_atob(s) {\r\n\tlet lookup = [];\r\n\t[...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'].forEach((c, i) => lookup[c.charCodeAt(0)] = i);\r\n\tlet n = s.length;\r\n\tlet ret = new Uint8Array((6 * n) >> 3);\r\n\tfor (let i = 0, pos = 0, width = 0, carry = 0; i < n; i++) {\r\n\t\tcarry = (carry << 6) | lookup[s.charCodeAt(i)];\r\n\t\twidth += 6;\r\n\t\tif (width >= 8) {\r\n\t\t\tret[pos++] = (carry >> (width -= 8));\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// eg. [0,1,2,3...] => [0,-1,1,-2,...]\r\nfunction signed(i) { \r\n\treturn (i & 1) ? (~i >> 1) : (i >> 1);\r\n}\r\n\r\nfunction read_deltas(n, next) {\r\n\tlet v = Array(n);\r\n\tfor (let i = 0, x = 0; i < n; i++) v[i] = x += signed(next());\r\n\treturn v;\r\n}\r\n\r\n// [123][5] => [0 3] [1 1] [0 0]\r\nfunction read_sorted(next, prev = 0) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet x = next();\r\n\t\tlet n = next();\r\n\t\tif (!n) break;\r\n\t\tprev += x;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tret.push(prev + i);\r\n\t\t}\r\n\t\tprev += n + 1;\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction read_sorted_arrays(next) {\r\n\treturn read_array_while(() => { \r\n\t\tlet v = read_sorted(next);\r\n\t\tif (v.length) return v;\r\n\t});\r\n}\r\n\r\n// returns map of x => ys\r\nfunction read_mapped(next) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet w = next();\r\n\t\tif (w == 0) break;\r\n\t\tret.push(read_linear_table(w, next));\r\n\t}\r\n\twhile (true) {\r\n\t\tlet w = next() - 1;\r\n\t\tif (w < 0) break;\r\n\t\tret.push(read_replacement_table(w, next));\r\n\t}\r\n\treturn ret.flat();\r\n}\r\n\r\n// read until next is falsy\r\n// return array of read values\r\nfunction read_array_while(next) {\r\n\tlet v = [];\r\n\twhile (true) {\r\n\t\tlet x = next(v.length);\r\n\t\tif (!x) break;\r\n\t\tv.push(x);\r\n\t}\r\n\treturn v;\r\n}\r\n\r\n// read w columns of length n\r\n// return as n rows of length w\r\nfunction read_transposed(n, w, next) {\r\n\tlet m = Array(n).fill().map(() => []);\r\n\tfor (let i = 0; i < w; i++) {\r\n\t\tread_deltas(n, next).forEach((x, j) => m[j].push(x));\r\n\t}\r\n\treturn m;\r\n}\r\n \r\n// returns [[x, ys], [x+dx, ys+dy], [x+2*dx, ys+2*dy], ...]\r\n// where dx/dy = steps, n = run size, w = length of y\r\nfunction read_linear_table(w, next) {\r\n\tlet dx = 1 + next();\r\n\tlet dy = next();\r\n\tlet vN = read_array_while(next);\r\n\tlet m = read_transposed(vN.length, 1+w, next);\r\n\treturn m.flatMap((v, i) => {\r\n\t\tlet [x, ...ys] = v;\r\n\t\treturn Array(vN[i]).fill().map((_, j) => {\r\n\t\t\tlet j_dy = j * dy;\r\n\t\t\treturn [x + j * dx, ys.map(y => y + j_dy)];\r\n\t\t});\r\n\t});\r\n}\r\n\r\n// return [[x, ys...], ...]\r\n// where w = length of y\r\nfunction read_replacement_table(w, next) { \r\n\tlet n = 1 + next();\r\n\tlet m = read_transposed(n, 1+w, next);\r\n\treturn m.map(v => [v[0], v.slice(1)]);\r\n}\r\n\r\n\r\nfunction read_trie(next) {\r\n\tlet ret = [];\r\n\tlet sorted = read_sorted(next); \r\n\texpand(decode([]), []);\r\n\treturn ret; // not sorted\r\n\tfunction decode(Q) { // characters that lead into this node\r\n\t\tlet S = next(); // state: valid, save, check\r\n\t\tlet B = read_array_while(() => { // buckets leading to new nodes\r\n\t\t\tlet cps = read_sorted(next).map(i => sorted[i]);\r\n\t\t\tif (cps.length) return decode(cps);\r\n\t\t});\r\n\t\treturn {S, B, Q};\r\n\t}\r\n\tfunction expand({S, B}, cps, saved) {\r\n\t\tif (S & 4 && saved === cps[cps.length-1]) return;\r\n\t\tif (S & 2) saved = cps[cps.length-1];\r\n\t\tif (S & 1) ret.push(cps); \r\n\t\tfor (let br of B) {\r\n\t\t\tfor (let cp of br.Q) {\r\n\t\t\t\texpand(br, [...cps, cp], saved);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\n\nfunction hex_cp(cp) {\r\n\treturn cp.toString(16).toUpperCase().padStart(2, '0');\r\n}\r\n\r\nfunction quote_cp(cp) {\r\n\treturn `{${hex_cp(cp)}}`; // raffy convention: like \"\\u{X}\" w/o the \"\\u\"\r\n}\r\n\r\n/*\r\nexport function explode_cp(s) {\r\n\treturn [...s].map(c => c.codePointAt(0));\r\n}\r\n*/\r\nfunction explode_cp(s) { // this is about 2x faster\r\n\tlet cps = [];\r\n\tfor (let pos = 0, len = s.length; pos < len; ) {\r\n\t\tlet cp = s.codePointAt(pos);\r\n\t\tpos += cp < 0x10000 ? 1 : 2;\r\n\t\tcps.push(cp);\r\n\t}\r\n\treturn cps;\r\n}\r\n\r\nfunction str_from_cps(cps) {\r\n\tconst chunk = 4096;\r\n\tlet len = cps.length;\r\n\tif (len < chunk) return String.fromCodePoint(...cps);\r\n\tlet buf = [];\r\n\tfor (let i = 0; i < len; ) {\r\n\t\tbuf.push(String.fromCodePoint(...cps.slice(i, i += chunk)));\r\n\t}\r\n\treturn buf.join('');\r\n}\r\n\r\nfunction compare_arrays(a, b) {\r\n\tlet n = a.length;\r\n\tlet c = n - b.length;\r\n\tfor (let i = 0; c == 0 && i < n; i++) c = a[i] - b[i];\r\n\treturn c;\r\n}\n\n// created 2023-09-25T01:01:55.148Z\n// compressed base64-encoded blob for include-nf data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: a974b6f8541fc29d919bc85118af0a44015851fab5343f8679cb31be2bdb209e\nvar COMPRESSED = 'AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohB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\r\n// see: /derive/nf.js\r\n\r\n\r\n// algorithmic hangul\r\n// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf (page 144)\r\nconst S0 = 0xAC00;\r\nconst L0 = 0x1100;\r\nconst V0 = 0x1161;\r\nconst T0 = 0x11A7;\r\nconst L_COUNT = 19;\r\nconst V_COUNT = 21;\r\nconst T_COUNT = 28;\r\nconst N_COUNT = V_COUNT * T_COUNT;\r\nconst S_COUNT = L_COUNT * N_COUNT;\r\nconst S1 = S0 + S_COUNT;\r\nconst L1 = L0 + L_COUNT;\r\nconst V1 = V0 + V_COUNT;\r\nconst T1 = T0 + T_COUNT;\r\n\r\nfunction unpack_cc(packed) {\r\n\treturn (packed >> 24) & 0xFF;\r\n}\r\nfunction unpack_cp(packed) {\r\n\treturn packed & 0xFFFFFF;\r\n}\r\n\r\nlet SHIFTED_RANK, EXCLUSIONS, DECOMP, RECOMP;\r\n\r\nfunction init$1() {\r\n\t//console.time('nf');\r\n\tlet r = read_compressed_payload(COMPRESSED);\r\n\tSHIFTED_RANK = new Map(read_sorted_arrays(r).flatMap((v, i) => v.map(x => [x, (i+1) << 24]))); // pre-shifted\r\n\tEXCLUSIONS = new Set(read_sorted(r));\r\n\tDECOMP = new Map();\r\n\tRECOMP = new Map();\r\n\tfor (let [cp, cps] of read_mapped(r)) {\r\n\t\tif (!EXCLUSIONS.has(cp) && cps.length == 2) {\r\n\t\t\tlet [a, b] = cps;\r\n\t\t\tlet bucket = RECOMP.get(a);\r\n\t\t\tif (!bucket) {\r\n\t\t\t\tbucket = new Map();\r\n\t\t\t\tRECOMP.set(a, bucket);\r\n\t\t\t}\r\n\t\t\tbucket.set(b, cp);\r\n\t\t}\r\n\t\tDECOMP.set(cp, cps.reverse()); // stored reversed\r\n\t}\r\n\t//console.timeEnd('nf');\r\n\t// 20230905: 11ms\r\n}\r\n\r\nfunction is_hangul(cp) {\r\n\treturn cp >= S0 && cp < S1;\r\n}\r\n\r\nfunction compose_pair(a, b) {\r\n\tif (a >= L0 && a < L1 && b >= V0 && b < V1) {\r\n\t\treturn S0 + (a - L0) * N_COUNT + (b - V0) * T_COUNT;\r\n\t} else if (is_hangul(a) && b > T0 && b < T1 && (a - S0) % T_COUNT == 0) {\r\n\t\treturn a + (b - T0);\r\n\t} else {\r\n\t\tlet recomp = RECOMP.get(a);\r\n\t\tif (recomp) {\r\n\t\t\trecomp = recomp.get(b);\r\n\t\t\tif (recomp) {\r\n\t\t\t\treturn recomp;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nfunction decomposed(cps) {\r\n\tif (!SHIFTED_RANK) init$1();\r\n\tlet ret = [];\r\n\tlet buf = [];\r\n\tlet check_order = false;\r\n\tfunction add(cp) {\r\n\t\tlet cc = SHIFTED_RANK.get(cp);\r\n\t\tif (cc) {\r\n\t\t\tcheck_order = true;\r\n\t\t\tcp |= cc;\r\n\t\t}\r\n\t\tret.push(cp);\r\n\t}\r\n\tfor (let cp of cps) {\r\n\t\twhile (true) {\r\n\t\t\tif (cp < 0x80) {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t} else if (is_hangul(cp)) {\r\n\t\t\t\tlet s_index = cp - S0;\r\n\t\t\t\tlet l_index = s_index / N_COUNT | 0;\r\n\t\t\t\tlet v_index = (s_index % N_COUNT) / T_COUNT | 0;\r\n\t\t\t\tlet t_index = s_index % T_COUNT;\r\n\t\t\t\tadd(L0 + l_index);\r\n\t\t\t\tadd(V0 + v_index);\r\n\t\t\t\tif (t_index > 0) add(T0 + t_index);\r\n\t\t\t} else {\r\n\t\t\t\tlet mapped = DECOMP.get(cp);\r\n\t\t\t\tif (mapped) {\r\n\t\t\t\t\tbuf.push(...mapped);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tadd(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!buf.length) break;\r\n\t\t\tcp = buf.pop();\r\n\t\t}\r\n\t}\r\n\tif (check_order && ret.length > 1) {\r\n\t\tlet prev_cc = unpack_cc(ret[0]);\r\n\t\tfor (let i = 1; i < ret.length; i++) {\r\n\t\t\tlet cc = unpack_cc(ret[i]);\r\n\t\t\tif (cc == 0 || prev_cc <= cc) {\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet j = i-1;\r\n\t\t\twhile (true) {\r\n\t\t\t\tlet tmp = ret[j+1];\r\n\t\t\t\tret[j+1] = ret[j];\r\n\t\t\t\tret[j] = tmp;\r\n\t\t\t\tif (!j) break;\r\n\t\t\t\tprev_cc = unpack_cc(ret[--j]);\r\n\t\t\t\tif (prev_cc <= cc) break;\r\n\t\t\t}\r\n\t\t\tprev_cc = unpack_cc(ret[i]);\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction composed_from_decomposed(v) {\r\n\tlet ret = [];\r\n\tlet stack = [];\r\n\tlet prev_cp = -1;\r\n\tlet prev_cc = 0;\r\n\tfor (let packed of v) {\r\n\t\tlet cc = unpack_cc(packed);\r\n\t\tlet cp = unpack_cp(packed);\r\n\t\tif (prev_cp == -1) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t}\r\n\t\t} else if (prev_cc > 0 && prev_cc >= cc) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tret.push(prev_cp, ...stack);\r\n\t\t\t\tstack.length = 0;\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t}\r\n\t\t\tprev_cc = cc;\r\n\t\t} else {\r\n\t\t\tlet composed = compose_pair(prev_cp, cp);\r\n\t\t\tif (composed >= 0) {\r\n\t\t\t\tprev_cp = composed;\r\n\t\t\t} else if (prev_cc == 0 && cc == 0) {\r\n\t\t\t\tret.push(prev_cp);\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (prev_cp >= 0) {\r\n\t\tret.push(prev_cp, ...stack);\t\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// note: cps can be iterable\r\nfunction nfd(cps) {\r\n\treturn decomposed(cps).map(unpack_cp);\r\n}\r\nfunction nfc(cps) {\r\n\treturn composed_from_decomposed(decomposed(cps));\r\n}\n\nconst HYPHEN = 0x2D;\r\nconst STOP = 0x2E;\r\nconst STOP_CH = '.';\r\nconst FE0F = 0xFE0F;\r\nconst UNIQUE_PH = 1;\r\n\r\n// 20230913: replace [...v] with Array_from(v) to avoid large spreads\r\nconst Array_from = x => Array.from(x); // Array.from.bind(Array);\r\n\r\nfunction group_has_cp(g, cp) {\r\n\t// 20230913: keep primary and secondary distinct instead of creating valid union\r\n\treturn g.P.has(cp) || g.Q.has(cp);\r\n}\r\n\r\nclass Emoji extends Array {\r\n\tget is_emoji() { return true; } // free tagging system\r\n}\r\n\r\nlet MAPPED, IGNORED, CM, NSM, ESCAPE, NFC_CHECK, GROUPS, WHOLE_VALID, WHOLE_MAP, VALID, EMOJI_LIST, EMOJI_ROOT;\r\n\r\nfunction init() {\r\n\tif (MAPPED) return;\r\n\t\r\n\tlet r = read_compressed_payload(COMPRESSED$1);\r\n\tconst read_sorted_array = () => read_sorted(r);\r\n\tconst read_sorted_set = () => new Set(read_sorted_array());\r\n\tconst set_add_many = (set, v) => v.forEach(x => set.add(x));\r\n\r\n\tMAPPED = new Map(read_mapped(r)); \r\n\tIGNORED = read_sorted_set(); // ignored characters are not valid, so just read raw codepoints\r\n\r\n\t/*\r\n\t// direct include from payload is smaller than the decompression code\r\n\tconst FENCED = new Map(read_array_while(() => {\r\n\t\tlet cp = r();\r\n\t\tif (cp) return [cp, read_str(r())];\r\n\t}));\r\n\t*/\r\n\t// 20230217: we still need all CM for proper error formatting\r\n\t// but norm only needs NSM subset that are potentially-valid\r\n\tCM = read_sorted_array();\r\n\tNSM = new Set(read_sorted_array().map(i => CM[i]));\r\n\tCM = new Set(CM);\r\n\t\r\n\tESCAPE = read_sorted_set(); // characters that should not be printed\r\n\tNFC_CHECK = read_sorted_set(); // only needed to illustrate ens_tokenize() transformations\r\n\r\n\tlet chunks = read_sorted_arrays(r);\r\n\tlet unrestricted = r();\r\n\t//const read_chunked = () => new Set(read_sorted_array().flatMap(i => chunks[i]).concat(read_sorted_array()));\r\n\tconst read_chunked = () => {\r\n\t\t// 20230921: build set in parts, 2x faster\r\n\t\tlet set = new Set();\r\n\t\tread_sorted_array().forEach(i => set_add_many(set, chunks[i]));\r\n\t\tset_add_many(set, read_sorted_array());\r\n\t\treturn set; \r\n\t};\r\n\tGROUPS = read_array_while(i => {\r\n\t\t// minifier property mangling seems unsafe\r\n\t\t// so these are manually renamed to single chars\r\n\t\tlet N = read_array_while(r).map(x => x+0x60);\r\n\t\tif (N.length) {\r\n\t\t\tlet R = i >= unrestricted; // unrestricted then restricted\r\n\t\t\tN[0] -= 32; // capitalize\r\n\t\t\tN = str_from_cps(N);\r\n\t\t\tif (R) N=`Restricted[${N}]`;\r\n\t\t\tlet P = read_chunked(); // primary\r\n\t\t\tlet Q = read_chunked(); // secondary\r\n\t\t\tlet M = !r(); // not-whitelisted, check for NSM\r\n\t\t\t// *** this code currently isn't needed ***\r\n\t\t\t/*\r\n\t\t\tlet V = [...P, ...Q].sort((a, b) => a-b); // derive: sorted valid\r\n\t\t\tlet M = r()-1; // number of combining mark\r\n\t\t\tif (M < 0) { // whitelisted\r\n\t\t\t\tM = new Map(read_array_while(() => {\r\n\t\t\t\t\tlet i = r();\r\n\t\t\t\t\tif (i) return [V[i-1], read_array_while(() => {\r\n\t\t\t\t\t\tlet v = read_array_while(r);\r\n\t\t\t\t\t\tif (v.length) return v.map(x => x-1);\r\n\t\t\t\t\t})];\r\n\t\t\t\t}));\r\n\t\t\t}*/\r\n\t\t\treturn {N, P, Q, M, R};\r\n\t\t}\r\n\t});\r\n\r\n\t// decode compressed wholes\r\n\tWHOLE_VALID = read_sorted_set();\r\n\tWHOLE_MAP = new Map();\r\n\tlet wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a, b) => a-b); // must be sorted\r\n\twholes.forEach((cp, i) => {\r\n\t\tlet d = r(); \r\n\t\tlet w = wholes[i] = d ? wholes[i-d] : {V: [], M: new Map()};\r\n\t\tw.V.push(cp); // add to member set\r\n\t\tif (!WHOLE_VALID.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, w); // register with whole map\r\n\t\t}\r\n\t});\r\n\r\n\t// compute confusable-extent complements\r\n\t// usage: WHOLE_MAP.get(cp).M.get(cp) = complement set\r\n\tfor (let {V, M} of new Set(WHOLE_MAP.values())) {\r\n\t\t// connect all groups that have each whole character\r\n\t\tlet recs = [];\r\n\t\tfor (let cp of V) {\r\n\t\t\tlet gs = GROUPS.filter(g => group_has_cp(g, cp));\r\n\t\t\tlet rec = recs.find(({G}) => gs.some(g => G.has(g)));\r\n\t\t\tif (!rec) {\r\n\t\t\t\trec = {G: new Set(), V: []};\r\n\t\t\t\trecs.push(rec);\r\n\t\t\t}\r\n\t\t\trec.V.push(cp);\r\n\t\t\tset_add_many(rec.G, gs);\r\n\t\t}\r\n\t\t// per character cache groups which are not a member of the extent\r\n\t\tlet union = recs.flatMap(x => Array_from(x.G)); // all of the groups used by this whole\r\n\t\tfor (let {G, V} of recs) {\r\n\t\t\tlet complement = new Set(union.filter(g => !G.has(g))); // groups not covered by the extent\r\n\t\t\tfor (let cp of V) {\r\n\t\t\t\tM.set(cp, complement); // this is the same reference\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// compute valid set\r\n\t// 20230924: VALID was union but can be re-used\r\n\tVALID = new Set(); // exists in 1+ groups\r\n\tlet multi = new Set(); // exists in 2+ groups\r\n\tconst add_to_union = cp => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\r\n\tfor (let g of GROUPS) {\r\n\t\tfor (let cp of g.P) add_to_union(cp);\r\n\t\tfor (let cp of g.Q) add_to_union(cp);\r\n\t}\r\n\t// dual purpose WHOLE_MAP: return placeholder if unique non-confusable\r\n\tfor (let cp of VALID) {\r\n\t\tif (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, UNIQUE_PH);\r\n\t\t}\r\n\t}\r\n\t// add all decomposed parts\r\n\t// see derive: \"Valid is Closed (via Brute-force)\"\r\n\tset_add_many(VALID, nfd(VALID));\r\n\t\r\n\t// decode emoji\r\n\t// 20230719: emoji are now fully-expanded to avoid quirk logic \r\n\tEMOJI_LIST = read_trie(r).map(v => Emoji.from(v)).sort(compare_arrays);\r\n\tEMOJI_ROOT = new Map(); // this has approx 7K nodes (2+ per emoji)\r\n\tfor (let cps of EMOJI_LIST) {\r\n\t\t// 20230719: change to *slightly* stricter algorithm which disallows \r\n\t\t// insertion of misplaced FE0F in emoji sequences (matching ENSIP-15)\r\n\t\t// example: beautified [A B] (eg. flag emoji) \r\n\t\t// before: allow: [A FE0F B], error: [A FE0F FE0F B] \r\n\t\t// after: error: both\r\n\t\t// note: this code now matches ENSNormalize.{cs,java} logic\r\n\t\tlet prev = [EMOJI_ROOT];\r\n\t\tfor (let cp of cps) {\r\n\t\t\tlet next = prev.map(node => {\r\n\t\t\t\tlet child = node.get(cp);\r\n\t\t\t\tif (!child) {\r\n\t\t\t\t\t// should this be object? \r\n\t\t\t\t\t// (most have 1-2 items, few have many)\r\n\t\t\t\t\t// 20230719: no, v8 default map is 4?\r\n\t\t\t\t\tchild = new Map();\r\n\t\t\t\t\tnode.set(cp, child);\r\n\t\t\t\t}\r\n\t\t\t\treturn child;\r\n\t\t\t});\r\n\t\t\tif (cp === FE0F) {\r\n\t\t\t\tprev.push(...next); // less than 20 elements\r\n\t\t\t} else {\r\n\t\t\t\tprev = next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let x of prev) {\r\n\t\t\tx.V = cps;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// if escaped: {HEX}\r\n// else: \"x\" {HEX}\r\nfunction quoted_cp(cp) {\r\n\treturn (should_escape(cp) ? '' : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\r\n}\r\n\r\n// 20230211: some messages can be mixed-directional and result in spillover\r\n// use 200E after a quoted string to force the remainder of a string from \r\n// acquring the direction of the quote\r\n// https://www.w3.org/International/questions/qa-bidi-unicode-controls#exceptions\r\nfunction bidi_qq(s) {\r\n\treturn `\"${s}\"\\u200E`; // strong LTR\r\n}\r\n\r\nfunction check_label_extension(cps) {\r\n\tif (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\r\n\t\tthrow new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`); // this can only be ascii so cant be bidi\r\n\t}\r\n}\r\nfunction check_leading_underscore(cps) {\r\n\tconst UNDERSCORE = 0x5F;\r\n\tfor (let i = cps.lastIndexOf(UNDERSCORE); i > 0; ) {\r\n\t\tif (cps[--i] !== UNDERSCORE) {\r\n\t\t\tthrow new Error('underscore allowed only at start');\r\n\t\t}\r\n\t}\r\n}\r\n// check that a fenced cp is not leading, trailing, or touching another fenced cp\r\nfunction check_fenced(cps) {\r\n\tlet cp = cps[0];\r\n\tlet prev = FENCED.get(cp);\r\n\tif (prev) throw error_placement(`leading ${prev}`);\r\n\tlet n = cps.length;\r\n\tlet last = -1; // prevents trailing from throwing\r\n\tfor (let i = 1; i < n; i++) {\r\n\t\tcp = cps[i];\r\n\t\tlet match = FENCED.get(cp);\r\n\t\tif (match) {\r\n\t\t\t// since cps[0] isn't fenced, cps[1] cannot throw\r\n\t\t\tif (last == i) throw error_placement(`${prev} + ${match}`);\r\n\t\t\tlast = i + 1;\r\n\t\t\tprev = match;\r\n\t\t}\r\n\t}\r\n\tif (last == n) throw error_placement(`trailing ${prev}`);\r\n}\r\n\r\n// create a safe to print string \r\n// invisibles are escaped\r\n// leading cm uses placeholder\r\n// if cps exceed max, middle truncate with ellipsis\r\n// quoter(cp) => string, eg. 3000 => \"{3000}\"\r\n// note: in html, you'd call this function then replace [<>&] with entities\r\nfunction safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\r\n\t//if (Number.isInteger(cps)) cps = [cps];\r\n\t//if (!Array.isArray(cps)) throw new TypeError(`expected codepoints`);\r\n\tlet buf = [];\r\n\tif (is_combining_mark(cps[0])) buf.push('◌');\r\n\tif (cps.length > max) {\r\n\t\tmax >>= 1;\r\n\t\tcps = [...cps.slice(0, max), 0x2026, ...cps.slice(-max)];\r\n\t}\r\n\tlet prev = 0;\r\n\tlet n = cps.length;\r\n\tfor (let i = 0; i < n; i++) {\r\n\t\tlet cp = cps[i];\r\n\t\tif (should_escape(cp)) {\r\n\t\t\tbuf.push(str_from_cps(cps.slice(prev, i)));\r\n\t\t\tbuf.push(quoter(cp));\r\n\t\t\tprev = i + 1;\r\n\t\t}\r\n\t}\r\n\tbuf.push(str_from_cps(cps.slice(prev, n)));\r\n\treturn buf.join('');\r\n}\r\n\r\n// note: set(s) cannot be exposed because they can be modified\r\n// note: Object.freeze() doesn't work\r\nfunction is_combining_mark(cp) {\r\n\tinit();\r\n\treturn CM.has(cp);\r\n}\r\nfunction should_escape(cp) {\r\n\tinit();\r\n\treturn ESCAPE.has(cp);\r\n}\r\n\r\n// return all supported emoji as fully-qualified emoji \r\n// ordered by length then lexicographic \r\nfunction ens_emoji() {\r\n\tinit();\r\n\treturn EMOJI_LIST.map(x => x.slice()); // emoji are exposed so copy\r\n}\r\n\r\nfunction ens_normalize_fragment(frag, decompose) {\r\n\tinit();\r\n\tlet nf = decompose ? nfd : nfc;\r\n\treturn frag.split(STOP_CH).map(label => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\r\n}\r\n\r\nfunction ens_normalize(name) {\r\n\treturn flatten(split(name, nfc, filter_fe0f));\r\n}\r\n\r\nfunction ens_beautify(name) {\r\n\tlet labels = split(name, nfc, x => x); // emoji not exposed\r\n\tfor (let {type, output, error} of labels) {\r\n\t\tif (error) break; // flatten will throw\r\n\r\n\t\t// replace leading/trailing hyphen\r\n\t\t// 20230121: consider beautifing all or leading/trailing hyphen to unicode variant\r\n\t\t// not exactly the same in every font, but very similar: \"-\" vs \"‐\"\r\n\t\t/*\r\n\t\tconst UNICODE_HYPHEN = 0x2010;\r\n\t\t// maybe this should replace all for visual consistancy?\r\n\t\t// `node tools/reg-count.js regex ^-\\{2,\\}` => 592\r\n\t\t//for (let i = 0; i < output.length; i++) if (output[i] == 0x2D) output[i] = 0x2010;\r\n\t\tif (output[0] == HYPHEN) output[0] = UNICODE_HYPHEN;\r\n\t\tlet end = output.length-1;\r\n\t\tif (output[end] == HYPHEN) output[end] = UNICODE_HYPHEN;\r\n\t\t*/\r\n\t\t// 20230123: WHATWG URL uses \"CheckHyphens\" false\r\n\t\t// https://url.spec.whatwg.org/#idna\r\n\r\n\t\t// update ethereum symbol\r\n\t\t// ξ => Ξ if not greek\r\n\t\tif (type !== 'Greek') array_replace(output, 0x3BE, 0x39E);\r\n\r\n\t\t// 20221213: fixes bidi subdomain issue, but breaks invariant (200E is disallowed)\r\n\t\t// could be fixed with special case for: 2D (.) + 200E (LTR)\r\n\t\t// https://discuss.ens.domains/t/bidi-label-ordering-spoof/15824\r\n\t\t//output.splice(0, 0, 0x200E);\r\n\t}\r\n\treturn flatten(labels);\r\n}\r\n\r\nfunction array_replace(v, a, b) {\r\n\tlet prev = 0;\r\n\twhile (true) {\r\n\t\tlet next = v.indexOf(a, prev);\r\n\t\tif (next < 0) break;\r\n\t\tv[next] = b; \r\n\t\tprev = next + 1;\r\n\t}\r\n}\r\n\r\nfunction ens_split(name, preserve_emoji) {\r\n\treturn split(name, nfc, preserve_emoji ? x => x.slice() : filter_fe0f); // emoji are exposed so copy\r\n}\r\n\r\nfunction split(name, nf, ef) {\r\n\tif (!name) return []; // 20230719: empty name allowance\r\n\tinit();\r\n\tlet offset = 0;\r\n\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t// 4.) \"The label must not contain a U+002E ( . ) FULL STOP.\"\r\n\treturn name.split(STOP_CH).map(label => {\r\n\t\tlet input = explode_cp(label);\r\n\t\tlet info = {\r\n\t\t\tinput,\r\n\t\t\toffset, // codepoint, not substring!\r\n\t\t};\r\n\t\toffset += input.length + 1; // + stop\r\n\t\ttry {\r\n\t\t\t// 1.) \"The label must be in Unicode Normalization Form NFC\"\r\n\t\t\tlet tokens = info.tokens = tokens_from_str(input, nf, ef);\r\n\t\t\tlet token_count = tokens.length;\r\n\t\t\tlet type;\r\n\t\t\tif (!token_count) { // the label was effectively empty (could of had ignored characters)\r\n\t\t\t\t//norm = [];\r\n\t\t\t\t//type = 'None'; // use this instead of next match, \"ASCII\"\r\n\t\t\t\t// 20230120: change to strict\r\n\t\t\t\t// https://discuss.ens.domains/t/ens-name-normalization-2nd/14564/59\r\n\t\t\t\tthrow new Error(`empty label`);\r\n\t\t\t} \r\n\t\t\tlet norm = info.output = tokens.flat();\r\n\t\t\tcheck_leading_underscore(norm);\r\n\t\t\tlet emoji = info.emoji = token_count > 1 || tokens[0].is_emoji; // same as: tokens.some(x => x.is_emoji);\r\n\t\t\tif (!emoji && norm.every(cp => cp < 0x80)) { // special case for ascii\r\n\t\t\t\t// 20230123: matches matches WHATWG, see note 3.3\r\n\t\t\t\tcheck_label_extension(norm); // only needed for ascii\r\n\t\t\t\t// cant have fenced\r\n\t\t\t\t// cant have cm\r\n\t\t\t\t// cant have wholes\r\n\t\t\t\t// see derive: \"Fastpath ASCII\"\r\n\t\t\t\ttype = 'ASCII';\r\n\t\t\t} else {\r\n\t\t\t\tlet chars = tokens.flatMap(x => x.is_emoji ? [] : x); // all of the nfc tokens concat together\r\n\t\t\t\tif (!chars.length) { // theres no text, just emoji\r\n\t\t\t\t\ttype = 'Emoji';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 5.) \"The label must not begin with a combining mark, that is: General_Category=Mark.\"\r\n\t\t\t\t\tif (CM.has(norm[0])) throw error_placement('leading combining mark');\r\n\t\t\t\t\tfor (let i = 1; i < token_count; i++) { // we've already checked the first token\r\n\t\t\t\t\t\tlet cps = tokens[i];\r\n\t\t\t\t\t\tif (!cps.is_emoji && CM.has(cps[0])) { // every text token has emoji neighbors, eg. EtEEEtEt...\r\n\t\t\t\t\t\t\t// bidi_qq() not needed since emoji is LTR and cps is a CM\r\n\t\t\t\t\t\t\tthrow error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i-1])} + ${safe_str_from_cps([cps[0]])}\"`); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcheck_fenced(norm);\r\n\t\t\t\t\tlet unique = Array_from(new Set(chars));\r\n\t\t\t\t\tlet [g] = determine_group(unique); // take the first match\r\n\t\t\t\t\t// see derive: \"Matching Groups have Same CM Style\"\r\n\t\t\t\t\t// alternative: could form a hybrid type: Latin/Japanese/...\t\r\n\t\t\t\t\tcheck_group(g, chars); // need text in order\r\n\t\t\t\t\tcheck_whole(g, unique); // only need unique text (order would be required for multiple-char confusables)\r\n\t\t\t\t\ttype = g.N;\r\n\t\t\t\t\t// 20230121: consider exposing restricted flag\r\n\t\t\t\t\t// it's simpler to just check for 'Restricted'\r\n\t\t\t\t\t// or even better: type.endsWith(']')\r\n\t\t\t\t\t//if (g.R) info.restricted = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tinfo.type = type;\r\n\t\t} catch (err) {\r\n\t\t\tinfo.error = err; // use full error object\r\n\t\t}\r\n\t\treturn info;\r\n\t});\r\n}\r\n\r\nfunction check_whole(group, unique) {\r\n\tlet maker;\r\n\tlet shared = [];\r\n\tfor (let cp of unique) {\r\n\t\tlet whole = WHOLE_MAP.get(cp);\r\n\t\tif (whole === UNIQUE_PH) return; // unique, non-confusable\r\n\t\tif (whole) {\r\n\t\t\tlet set = whole.M.get(cp); // groups which have a character that look-like this character\r\n\t\t\tmaker = maker ? maker.filter(g => set.has(g)) : Array_from(set);\r\n\t\t\tif (!maker.length) return; // confusable intersection is empty\r\n\t\t} else {\r\n\t\t\tshared.push(cp); \r\n\t\t}\r\n\t}\r\n\tif (maker) {\r\n\t\t// we have 1+ confusable\r\n\t\t// check if any of the remaining groups\r\n\t\t// contain the shared characters too\r\n\t\tfor (let g of maker) {\r\n\t\t\tif (shared.every(cp => group_has_cp(g, cp))) {\r\n\t\t\t\tthrow new Error(`whole-script confusable: ${group.N}/${g.N}`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// assumption: unique.size > 0\r\n// returns list of matching groups\r\nfunction determine_group(unique) {\r\n\tlet groups = GROUPS;\r\n\tfor (let cp of unique) {\r\n\t\t// note: we need to dodge CM that are whitelisted\r\n\t\t// but that code isn't currently necessary\r\n\t\tlet gs = groups.filter(g => group_has_cp(g, cp));\r\n\t\tif (!gs.length) {\r\n\t\t\tif (!GROUPS.some(g => group_has_cp(g, cp))) { \r\n\t\t\t\t// the character was composed of valid parts\r\n\t\t\t\t// but it's NFC form is invalid\r\n\t\t\t\t// 20230716: change to more exact statement, see: ENSNormalize.{cs,java}\r\n\t\t\t\t// note: this doesn't have to be a composition\r\n\t\t\t\t// 20230720: change to full check\r\n\t\t\t\tthrow error_disallowed(cp); // this should be rare\r\n\t\t\t} else {\r\n\t\t\t\t// there is no group that contains all these characters\r\n\t\t\t\t// throw using the highest priority group that matched\r\n\t\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\t\tthrow error_group_member(groups[0], cp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tgroups = gs;\r\n\t\tif (gs.length == 1) break; // there is only one group left\r\n\t}\r\n\t// there are at least 1 group(s) with all of these characters\r\n\treturn groups;\r\n}\r\n\r\n// throw on first error\r\nfunction flatten(split) {\r\n\treturn split.map(({input, error, output}) => {\r\n\t\tif (error) {\r\n\t\t\t// don't print label again if just a single label\r\n\t\t\tlet msg = error.message;\r\n\t\t\t// bidi_qq() only necessary if msg is digits\r\n\t\t\tthrow new Error(split.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`); \r\n\t\t}\r\n\t\treturn str_from_cps(output);\r\n\t}).join(STOP_CH);\r\n}\r\n\r\nfunction error_disallowed(cp) {\r\n\t// TODO: add cp to error?\r\n\treturn new Error(`disallowed character: ${quoted_cp(cp)}`); \r\n}\r\nfunction error_group_member(g, cp) {\r\n\tlet quoted = quoted_cp(cp);\r\n\tlet gg = GROUPS.find(g => g.P.has(cp)); // only check primary\r\n\tif (gg) {\r\n\t\tquoted = `${gg.N} ${quoted}`;\r\n\t}\r\n\treturn new Error(`illegal mixture: ${g.N} + ${quoted}`);\r\n}\r\nfunction error_placement(where) {\r\n\treturn new Error(`illegal placement: ${where}`);\r\n}\r\n\r\n// assumption: cps.length > 0\r\n// assumption: cps[0] isn't a CM\r\n// assumption: the previous character isn't an emoji\r\nfunction check_group(g, cps) {\r\n\tfor (let cp of cps) {\r\n\t\tif (!group_has_cp(g, cp)) {\r\n\t\t\t// for whitelisted scripts, this will throw illegal mixture on invalid cm, eg. \"e{300}{300}\"\r\n\t\t\t// at the moment, it's unnecessary to introduce an extra error type\r\n\t\t\t// until there exists a whitelisted multi-character\r\n\t\t\t// eg. if (M < 0 && is_combining_mark(cp)) { ... }\r\n\t\t\t// there are 3 cases:\r\n\t\t\t// 1. illegal cm for wrong group => mixture error\r\n\t\t\t// 2. illegal cm for same group => cm error\r\n\t\t\t// requires set of whitelist cm per group: \r\n\t\t\t// eg. new Set([...g.P, ...g.Q].flatMap(nfc).filter(cp => CM.has(cp)))\r\n\t\t\t// 3. wrong group => mixture error\r\n\t\t\tthrow error_group_member(g, cp);\r\n\t\t}\r\n\t}\r\n\t//if (M >= 0) { // we have a known fixed cm count\r\n\tif (g.M) { // we need to check for NSM\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // see: assumption\r\n\t\t\t// 20230210: bugfix: using cps instead of decomposed h/t Carbon225\r\n\t\t\t/*\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: ${g.N} ${bidi_qq(str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\t// 20230217: switch to NSM counting\r\n\t\t\t// https://www.unicode.org/reports/tr39/#Optional_Detection\r\n\t\t\tif (NSM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\tfor (let cp; j < e && NSM.has(cp = decomposed[j]); j++) {\r\n\t\t\t\t\t// a. Forbid sequences of the same nonspacing mark.\r\n\t\t\t\t\tfor (let k = i; k < j; k++) { // O(n^2) but n < 100\r\n\t\t\t\t\t\tif (decomposed[k] == cp) {\r\n\t\t\t\t\t\t\tthrow new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// parse to end so we have full nsm count\r\n\t\t\t\t// b. Forbid sequences of more than 4 nonspacing marks (gc=Mn or gc=Me).\r\n\t\t\t\tif (j - i > NSM_MAX) {\r\n\t\t\t\t\t// note: this slice starts with a base char or spacing-mark cm\r\n\t\t\t\t\tthrow new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${NSM_MAX})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// *** this code currently isn't needed ***\r\n\t/*\r\n\tlet cm_whitelist = M instanceof Map;\r\n\tfor (let i = 0, e = cps.length; i < e; ) {\r\n\t\tlet cp = cps[i++];\r\n\t\tlet seqs = cm_whitelist && M.get(cp);\r\n\t\tif (seqs) { \r\n\t\t\t// list of codepoints that can follow\r\n\t\t\t// if this exists, this will always be 1+\r\n\t\t\tlet j = i;\r\n\t\t\twhile (j < e && CM.has(cps[j])) j++;\r\n\t\t\tlet cms = cps.slice(i, j);\r\n\t\t\tlet match = seqs.find(seq => !compare_arrays(seq, cms));\r\n\t\t\tif (!match) throw new Error(`disallowed combining mark sequence: \"${safe_str_from_cps([cp, ...cms])}\"`);\r\n\t\t\ti = j;\r\n\t\t} else if (!V.has(cp)) {\r\n\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\tlet quoted = quoted_cp(cp);\r\n\t\t\tfor (let cp of cps) {\r\n\t\t\t\tlet u = UNIQUE.get(cp);\r\n\t\t\t\tif (u && u !== g) {\r\n\t\t\t\t\t// if both scripts are restricted this error is confusing\r\n\t\t\t\t\t// because we don't differentiate RestrictedA from RestrictedB \r\n\t\t\t\t\tif (!u.R) quoted = `${quoted} is ${u.N}`;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new Error(`disallowed ${g.N} character: ${quoted}`);\r\n\t\t\t//throw new Error(`disallowed character: ${quoted} (expected ${g.N})`);\r\n\t\t\t//throw new Error(`${g.N} does not allow: ${quoted}`);\r\n\t\t}\r\n\t}\r\n\tif (!cm_whitelist) {\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // we know it can't be cm leading\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: \"${str_from_cps(decomposed.slice(i-1, j))}\" (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t*/\r\n}\r\n\r\n// given a list of codepoints\r\n// returns a list of lists, where emoji are a fully-qualified (as Array subclass)\r\n// eg. explode_cp(\"abc💩d\") => [[61, 62, 63], Emoji[1F4A9, FE0F], [64]]\r\n// 20230818: rename for 'process' name collision h/t Javarome\r\n// https://github.com/adraffy/ens-normalize.js/issues/23\r\nfunction tokens_from_str(input, nf, ef) {\r\n\tlet ret = [];\r\n\tlet chars = [];\r\n\tinput = input.slice().reverse(); // flip so we can pop\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input);\r\n\t\tif (emoji) {\r\n\t\t\tif (chars.length) {\r\n\t\t\t\tret.push(nf(chars));\r\n\t\t\t\tchars = [];\r\n\t\t\t}\r\n\t\t\tret.push(ef(emoji));\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (VALID.has(cp)) {\r\n\t\t\t\tchars.push(cp);\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\tchars.push(...cps); // less than 10 elements\r\n\t\t\t\t} else if (!IGNORED.has(cp)) {\r\n\t\t\t\t\t// 20230912: unicode 15.1 changed the order of processing such that\r\n\t\t\t\t\t// disallowed parts are only rejected after NFC\r\n\t\t\t\t\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t\t\t\t\t// this doesn't impact normalization as of today\r\n\t\t\t\t\t// technically, this error can be removed as the group logic will apply similar logic\r\n\t\t\t\t\t// however the error type might be less clear\r\n\t\t\t\t\tthrow error_disallowed(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (chars.length) {\r\n\t\tret.push(nf(chars));\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction filter_fe0f(cps) {\r\n\treturn cps.filter(cp => cp != FE0F);\r\n}\r\n\r\n// given array of codepoints\r\n// returns the longest valid emoji sequence (or undefined if no match)\r\n// *MUTATES* the supplied array\r\n// disallows interleaved ignored characters\r\n// fills (optional) eaten array with matched codepoints\r\nfunction consume_emoji_reversed(cps, eaten) {\r\n\tlet node = EMOJI_ROOT;\r\n\tlet emoji;\r\n\tlet pos = cps.length;\r\n\twhile (pos) {\r\n\t\tnode = node.get(cps[--pos]);\r\n\t\tif (!node) break;\r\n\t\tlet {V} = node;\r\n\t\tif (V) { // this is a valid emoji (so far)\r\n\t\t\temoji = V;\r\n\t\t\tif (eaten) eaten.push(...cps.slice(pos).reverse()); // (optional) copy input, used for ens_tokenize()\r\n\t\t\tcps.length = pos; // truncate\r\n\t\t}\r\n\t}\r\n\treturn emoji;\r\n}\r\n\r\n// ************************************************************\r\n// tokenizer \r\n\r\nconst TY_VALID = 'valid';\r\nconst TY_MAPPED = 'mapped';\r\nconst TY_IGNORED = 'ignored';\r\nconst TY_DISALLOWED = 'disallowed';\r\nconst TY_EMOJI = 'emoji';\r\nconst TY_NFC = 'nfc';\r\nconst TY_STOP = 'stop';\r\n\r\nfunction ens_tokenize(name, {\r\n\tnf = true, // collapse unnormalized runs into a single token\r\n} = {}) {\r\n\tinit();\r\n\tlet input = explode_cp(name).reverse();\r\n\tlet eaten = [];\r\n\tlet tokens = [];\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input, eaten);\r\n\t\tif (emoji) {\r\n\t\t\ttokens.push({\r\n\t\t\t\ttype: TY_EMOJI,\r\n\t\t\t\temoji: emoji.slice(), // copy emoji\r\n\t\t\t\tinput: eaten,\r\n\t\t\t\tcps: filter_fe0f(emoji)\r\n\t\t\t});\r\n\t\t\teaten = []; // reset buffer\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (cp == STOP) {\r\n\t\t\t\ttokens.push({type: TY_STOP, cp});\r\n\t\t\t} else if (VALID.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_VALID, cps: [cp]});\r\n\t\t\t} else if (IGNORED.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_IGNORED, cp});\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\ttokens.push({type: TY_MAPPED, cp, cps: cps.slice()});\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttokens.push({type: TY_DISALLOWED, cp});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (nf) {\r\n\t\tfor (let i = 0, start = -1; i < tokens.length; i++) {\r\n\t\t\tlet token = tokens[i];\r\n\t\t\tif (is_valid_or_mapped(token.type)) {\r\n\t\t\t\tif (requires_check(token.cps)) { // normalization might be needed\r\n\t\t\t\t\tlet end = i + 1;\r\n\t\t\t\t\tfor (let pos = end; pos < tokens.length; pos++) { // find adjacent text\r\n\t\t\t\t\t\tlet {type, cps} = tokens[pos];\r\n\t\t\t\t\t\tif (is_valid_or_mapped(type)) {\r\n\t\t\t\t\t\t\tif (!requires_check(cps)) break;\r\n\t\t\t\t\t\t\tend = pos + 1;\r\n\t\t\t\t\t\t} else if (type !== TY_IGNORED) { // || type !== TY_DISALLOWED) { \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (start < 0) start = i;\r\n\t\t\t\t\tlet slice = tokens.slice(start, end);\r\n\t\t\t\t\tlet cps0 = slice.flatMap(x => is_valid_or_mapped(x.type) ? x.cps : []); // strip junk tokens\r\n\t\t\t\t\tlet cps = nfc(cps0);\r\n\t\t\t\t\tif (compare_arrays(cps, cps0)) { // bundle into an nfc token\r\n\t\t\t\t\t\ttokens.splice(start, end - start, {\r\n\t\t\t\t\t\t\ttype: TY_NFC, \r\n\t\t\t\t\t\t\tinput: cps0, // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\r\n\t\t\t\t\t\t\tcps, \r\n\t\t\t\t\t\t\ttokens0: collapse_valid_tokens(slice),\r\n\t\t\t\t\t\t\ttokens: ens_tokenize(str_from_cps(cps), {nf: false})\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\ti = start;\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\ti = end - 1; // skip to end of slice\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart = -1; // reset\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstart = i; // remember last\r\n\t\t\t\t}\r\n\t\t\t} else if (token.type !== TY_IGNORED) { // 20221024: is this correct?\r\n\t\t\t\tstart = -1; // reset\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn collapse_valid_tokens(tokens);\r\n}\r\n\r\nfunction is_valid_or_mapped(type) {\r\n\treturn type == TY_VALID || type == TY_MAPPED;\r\n}\r\n\r\nfunction requires_check(cps) {\r\n\treturn cps.some(cp => NFC_CHECK.has(cp));\r\n}\r\n\r\nfunction collapse_valid_tokens(tokens) {\r\n\tfor (let i = 0; i < tokens.length; i++) {\r\n\t\tif (tokens[i].type == TY_VALID) {\r\n\t\t\tlet j = i + 1;\r\n\t\t\twhile (j < tokens.length && tokens[j].type == TY_VALID) j++;\r\n\t\t\ttokens.splice(i, j - i, {type: TY_VALID, cps: tokens.slice(i, j).flatMap(x => x.cps)});\r\n\t\t}\r\n\t}\r\n\treturn tokens;\r\n}\n\nexport { ens_beautify, ens_emoji, ens_normalize, ens_normalize_fragment, ens_split, ens_tokenize, is_combining_mark, nfc, nfd, safe_str_from_cps, should_escape };\n","import { keccak256 } from \"../crypto/index.js\";\nimport { concat, hexlify, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nimport { ens_normalize } from \"@adraffy/ens-normalize\";\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\nfunction checkComponent(comp) {\n assertArgument(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n}\nfunction ensNameSplit(name) {\n const bytes = toUtf8Bytes(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i = 0; i < bytes.length; i++) {\n const d = bytes[i];\n // A separator (i.e. \".\"); copy this component\n if (d === 0x2e) {\n comps.push(checkComponent(bytes.slice(last, i)));\n last = i + 1;\n }\n }\n // There was a stray separator at the end of the name\n assertArgument(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n}\n/**\n * Returns the ENS %%name%% normalized.\n */\nexport function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return ens_normalize(name);\n }\n catch (error) {\n assertArgument(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n}\n/**\n * Returns ``true`` if %%name%% is a valid ENS name.\n */\nexport function isValidName(name) {\n try {\n return (ensNameSplit(name).length !== 0);\n }\n catch (error) { }\n return false;\n}\n/**\n * Returns the [[link-namehash]] for %%name%%.\n */\nexport function namehash(name) {\n assertArgument(typeof (name) === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n assertArgument(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = keccak256(concat([result, keccak256((comps.pop()))]));\n }\n return hexlify(result);\n}\n/**\n * Returns the DNS encoded %%name%%.\n *\n * This is used for various parts of ENS name resolution, such\n * as the wildcard resolution.\n */\nexport function dnsEncode(name, _maxLength) {\n const length = (_maxLength != null) ? _maxLength : 63;\n assertArgument(length <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length);\n return hexlify(concat(ensNameSplit(name).map((comp) => {\n assertArgument(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n}\n//# sourceMappingURL=namehash.js.map","import { getAddress } from \"../address/index.js\";\nimport { assertArgument, isHexString } from \"../utils/index.js\";\nfunction accessSetify(addr, storageKeys) {\n return {\n address: getAddress(addr),\n storageKeys: storageKeys.map((storageKey, index) => {\n assertArgument(isHexString(storageKey, 32), \"invalid slot\", `storageKeys[${index}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n}\n/**\n * Returns a [[AccessList]] from any ethers-supported access-list structure.\n */\nexport function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index) => {\n if (Array.isArray(set)) {\n assertArgument(set.length === 2, \"invalid slot set\", `value[${index}]`, set);\n return accessSetify(set[0], set[1]);\n }\n assertArgument(set != null && typeof (set) === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n assertArgument(value != null && typeof (value) === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n//# sourceMappingURL=accesslist.js.map","import { getAddress } from \"../address/index.js\";\nimport { keccak256, SigningKey } from \"../crypto/index.js\";\n/**\n * Returns the address for the %%key%%.\n *\n * The key may be any standard form of public key or a private key.\n */\nexport function computeAddress(key) {\n let pubkey;\n if (typeof (key) === \"string\") {\n pubkey = SigningKey.computePublicKey(key, false);\n }\n else {\n pubkey = key.publicKey;\n }\n return getAddress(keccak256(\"0x\" + pubkey.substring(4)).substring(26));\n}\n/**\n * Returns the recovered address for the private key that was\n * used to sign %%digest%% that resulted in %%signature%%.\n */\nexport function recoverAddress(digest, signature) {\n return computeAddress(SigningKey.recoverPublicKey(digest, signature));\n}\n//# sourceMappingURL=address.js.map","import { getAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/addresses.js\";\nimport { keccak256, Signature, SigningKey } from \"../crypto/index.js\";\nimport { concat, decodeRlp, encodeRlp, getBytes, getBigInt, getNumber, hexlify, assert, assertArgument, isHexString, toBeArray, zeroPadValue } from \"../utils/index.js\";\nimport { accessListify } from \"./accesslist.js\";\nimport { recoverAddress } from \"./address.js\";\nconst BN_0 = BigInt(0);\nconst BN_2 = BigInt(2);\nconst BN_27 = BigInt(27);\nconst BN_28 = BigInt(28);\nconst BN_35 = BigInt(35);\nconst BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\nfunction handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return getAddress(value);\n}\nfunction handleAccessList(value, param) {\n try {\n return accessListify(value);\n }\n catch (error) {\n assertArgument(false, error.message, param, value);\n }\n}\nfunction handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return getNumber(_value, param);\n}\nfunction handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = getBigInt(_value, param);\n assertArgument(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n}\nfunction formatNumber(_value, name) {\n const value = getBigInt(_value, \"value\");\n const result = toBeArray(value);\n assertArgument(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n}\nfunction formatAccessList(value) {\n return accessListify(value).map((set) => [set.address, set.storageKeys]);\n}\nfunction formatHashes(value, param) {\n assertArgument(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i = 0; i < value.length; i++) {\n assertArgument(isHexString(value[i], 32), \"invalid ${ param } hash\", `value[${i}]`, value[i]);\n }\n return value;\n}\nfunction _parseLegacy(data) {\n const fields = decodeRlp(data);\n assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: hexlify(fields[5]),\n chainId: BN_0\n };\n // Legacy unsigned transaction\n if (fields.length === 6) {\n return tx;\n }\n const v = handleUint(fields[6], \"v\");\n const r = handleUint(fields[7], \"r\");\n const s = handleUint(fields[8], \"s\");\n if (r === BN_0 && s === BN_0) {\n // EIP-155 unsigned transaction\n tx.chainId = v;\n }\n else {\n // Compute the EIP-155 chain ID (or 0 for legacy)\n let chainId = (v - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n // Signed Legacy Transaction\n assertArgument(chainId !== BN_0 || (v === BN_27 || v === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = Signature.from({\n r: zeroPadValue(fields[7], 32),\n s: zeroPadValue(fields[8], 32),\n v\n });\n tx.hash = keccak256(data);\n }\n return tx;\n}\nfunction _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = getBigInt(tx.chainId, \"tx.chainId\");\n // We have a chainId in the tx and an EIP-155 v in the signature,\n // make sure they agree with each other\n assertArgument(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n else if (tx.signature) {\n // No explicit chainId, but EIP-155 have a derived implicit chainId\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n // Requesting an unsigned transaction\n if (!sig) {\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== BN_0) {\n fields.push(toBeArray(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return encodeRlp(fields);\n }\n // @TODO: We should probably check that tx.signature, chainId, and sig\n // match but that logic could break existing code, so schedule\n // this for the next major bump.\n // Compute the EIP-155 v\n let v = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v = Signature.getChainIdV(chainId, sig.v);\n }\n else if (BigInt(sig.v) !== v) {\n assertArgument(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n // Add the signature\n fields.push(toBeArray(v));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n return encodeRlp(fields);\n}\nfunction _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n }\n catch (error) {\n assertArgument(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r = zeroPadValue(fields[1], 32);\n const s = zeroPadValue(fields[2], 32);\n const signature = Signature.from({ r, s, yParity });\n tx.signature = signature;\n}\nfunction _parseEip1559(data) {\n const fields = decodeRlp(getBytes(data).slice(1));\n assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", hexlify(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: hexlify(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n };\n // Unsigned EIP-1559 Transaction\n if (fields.length === 9) {\n return tx;\n }\n tx.hash = keccak256(data);\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n}\nfunction _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n }\n return concat([\"0x02\", encodeRlp(fields)]);\n}\nfunction _parseEip2930(data) {\n const fields = decodeRlp(getBytes(data).slice(1));\n assertArgument(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", hexlify(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: hexlify(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n // Unsigned EIP-2930 Transaction\n if (fields.length === 8) {\n return tx;\n }\n tx.hash = keccak256(data);\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n}\nfunction _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n }\n return concat([\"0x01\", encodeRlp(fields)]);\n}\nfunction _parseEip4844(data) {\n const fields = decodeRlp(getBytes(data).slice(1));\n assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), \"invalid field count for transaction type: 3\", \"data\", hexlify(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: hexlify(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n assertArgument(tx.to != null, \"invalid address for transaction type: 3\", \"data\", data);\n assertArgument(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i = 0; i < tx.blobVersionedHashes.length; i++) {\n assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, \"data\", data);\n }\n // Unsigned EIP-4844 Transaction\n if (fields.length === 11) {\n return tx;\n }\n tx.hash = keccak256(data);\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n}\nfunction _serializeEip4844(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || ZeroAddress),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n }\n return concat([\"0x03\", encodeRlp(fields)]);\n}\n/**\n * A **Transaction** describes an operation to be executed on\n * Ethereum by an Externally Owned Account (EOA). It includes\n * who (the [[to]] address), what (the [[data]]) and how much (the\n * [[value]] in ether) the operation should entail.\n *\n * @example:\n * tx = new Transaction()\n * //_result:\n *\n * tx.data = \"0x1234\";\n * //_result:\n */\nexport class Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() { return this.#type; }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n default:\n assertArgument(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0: return \"legacy\";\n case 1: return \"eip-2930\";\n case 2: return \"eip-1559\";\n case 3: return \"eip-4844\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = (value == null) ? null : getAddress(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() { return this.#nonce; }\n set nonce(value) { this.#nonce = getNumber(value, \"value\"); }\n /**\n * The gas limit.\n */\n get gasLimit() { return this.#gasLimit; }\n set gasLimit(value) { this.#gasLimit = getBigInt(value); }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = (value == null) ? null : getBigInt(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = (value == null) ? null : getBigInt(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = (value == null) ? null : getBigInt(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() { return this.#data; }\n set data(value) { this.#data = hexlify(value); }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() { return this.#value; }\n set value(value) {\n this.#value = getBigInt(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() { return this.#chainId; }\n set chainId(value) { this.#chainId = getBigInt(value); }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() { return this.#sig || null; }\n set signature(value) {\n this.#sig = (value == null) ? null : Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n // @TODO: in v7, this should assign the value or become\n // a live object itself, otherwise mutation is inconsistent\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = (value == null) ? null : accessListify(value);\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOB versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n // @TODO: Mutation is inconsistent; if unset, the returned value\n // cannot mutate the object, if set it can\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n assertArgument(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i = 0; i < value.length; i++) {\n assertArgument(isHexString(value[i], 32), \"invalid blobVersionedHash\", `value[${i}]`, value[i]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return keccak256(this.serialized);\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return keccak256(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return recoverAddress(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n assert(this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, this.signature);\n case 1:\n return _serializeEip2930(this, this.signature);\n case 2:\n return _serializeEip1559(this, this.signature);\n case 3:\n return _serializeEip4844(this, this.signature);\n }\n assert(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this);\n case 1:\n return _serializeEip2930(this);\n case 2:\n return _serializeEip1559(this);\n case 3:\n return _serializeEip4844(this);\n }\n assert(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".unsignedSerialized\" });\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types = this.inferTypes();\n // Prefer London (EIP-1559) over Cancun (BLOb)\n if (types.indexOf(2) >= 0) {\n return 2;\n }\n // Return the highest inferred type\n return (types.pop());\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n // Checks that there are no conflicting properties set\n const hasGasPrice = this.gasPrice != null;\n const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);\n const hasAccessList = (this.accessList != null);\n const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);\n //if (hasGasPrice && hasFee) {\n // throw new Error(\"transaction cannot have gasPrice and maxFeePerGas\");\n //}\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n assert(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n //if (this.type === 2 && hasGasPrice) {\n // throw new Error(\"eip-1559 transaction cannot have gasPrice\");\n //}\n assert(!hasFee || (this.type !== 0 && this.type !== 1), \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n assert(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types = [];\n // Explicit type\n if (this.type != null) {\n types.push(this.type);\n }\n else {\n if (hasFee) {\n types.push(2);\n }\n else if (hasGasPrice) {\n types.push(1);\n if (!hasAccessList) {\n types.push(0);\n }\n }\n else if (hasAccessList) {\n types.push(1);\n types.push(2);\n }\n else if (hasBlob && this.to) {\n types.push(3);\n }\n else {\n types.push(0);\n types.push(1);\n types.push(2);\n types.push(3);\n }\n }\n types.sort();\n return types;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return (this.type === 0);\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return (this.type === 1);\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return (this.type === 2);\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return (this.type === 3);\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s = (v) => {\n if (v == null) {\n return null;\n }\n return v.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s(this.gasLimit),\n gasPrice: s(this.gasPrice),\n maxPriorityFeePerGas: s(this.maxPriorityFeePerGas),\n maxFeePerGas: s(this.maxFeePerGas),\n value: s(this.value),\n chainId: s(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new Transaction();\n }\n if (typeof (tx) === \"string\") {\n const payload = getBytes(tx);\n if (payload[0] >= 0x7f) { // @TODO: > vs >= ??\n return Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1: return Transaction.from(_parseEip2930(payload));\n case 2: return Transaction.from(_parseEip1559(payload));\n case 3: return Transaction.from(_parseEip4844(payload));\n }\n assert(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n if (tx.hash != null) {\n assertArgument(result.isSigned(), \"unsigned transaction cannot define hash\", \"tx\", tx);\n assertArgument(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n assertArgument(result.isSigned(), \"unsigned transaction cannot define from\", \"tx\", tx);\n assertArgument(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n}\n//# sourceMappingURL=transaction.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { MessagePrefix } from \"../constants/index.js\";\nimport { recoverAddress } from \"../transaction/index.js\";\nimport { concat, toUtf8Bytes } from \"../utils/index.js\";\n/**\n * Computes the [[link-eip-191]] personal-sign message digest to sign.\n *\n * This prefixes the message with [[MessagePrefix]] and the decimal length\n * of %%message%% and computes the [[keccak256]] digest.\n *\n * If %%message%% is a string, it is converted to its UTF-8 bytes\n * first. To compute the digest of a [[DataHexString]], it must be converted\n * to [bytes](getBytes).\n *\n * @example:\n * hashMessage(\"Hello World\")\n * //_result:\n *\n * // Hashes the SIX (6) string characters, i.e.\n * // [ \"0\", \"x\", \"4\", \"2\", \"4\", \"3\" ]\n * hashMessage(\"0x4243\")\n * //_result:\n *\n * // Hashes the TWO (2) bytes [ 0x42, 0x43 ]...\n * hashMessage(getBytes(\"0x4243\"))\n * //_result:\n *\n * // ...which is equal to using data\n * hashMessage(new Uint8Array([ 0x42, 0x43 ]))\n * //_result:\n *\n */\nexport function hashMessage(message) {\n if (typeof (message) === \"string\") {\n message = toUtf8Bytes(message);\n }\n return keccak256(concat([\n toUtf8Bytes(MessagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n/**\n * Return the address of the private key that produced\n * the signature %%sig%% during signing for %%message%%.\n */\nexport function verifyMessage(message, sig) {\n const digest = hashMessage(message);\n return recoverAddress(digest, sig);\n}\n//# sourceMappingURL=message.js.map","import { getAddress } from \"../address/index.js\";\nimport { keccak256 as _keccak256, sha256 as _sha256 } from \"../crypto/index.js\";\nimport { concat, dataLength, getBytes, hexlify, toBeArray, toTwos, toUtf8Bytes, zeroPadBytes, zeroPadValue, assertArgument } from \"../utils/index.js\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return getBytes(zeroPadValue(value, 32));\n }\n return getBytes(getAddress(value));\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return getBytes(value);\n case \"bool\":\n value = (!!value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return getBytes(zeroPadValue(value, 32));\n }\n return getBytes(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = (match[1] === \"int\");\n let size = parseInt(match[2] || \"256\");\n assertArgument((!match[2] || match[2] === String(size)) && (size % 8 === 0) && size !== 0 && size <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size = 256;\n }\n if (signed) {\n value = toTwos(value, size);\n }\n return getBytes(zeroPadValue(toBeArray(value), size / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n assertArgument(String(size) === match[1] && size !== 0 && size <= 32, \"invalid bytes type\", \"type\", type);\n assertArgument(dataLength(value) === size, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return getBytes(zeroPadBytes(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n assertArgument(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return getBytes(concat(result));\n }\n assertArgument(false, \"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\n/**\n * Computes the [[link-solc-packed]] representation of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPacked([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPacked(types, values) {\n assertArgument(types.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n/**\n * Computes the [[link-solc-packed]] [[keccak256]] hash of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPackedKeccak256([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPackedKeccak256(types, values) {\n return _keccak256(solidityPacked(types, values));\n}\n/**\n * Computes the [[link-solc-packed]] [[sha256]] hash of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPackedSha256([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPackedSha256(types, values) {\n return _sha256(solidityPacked(types, values));\n}\n//# sourceMappingURL=solidity.js.map","//import { TypedDataDomain, TypedDataField } from \"@ethersproject/providerabstract-signer\";\nimport { getAddress } from \"../address/index.js\";\nimport { keccak256 } from \"../crypto/index.js\";\nimport { recoverAddress } from \"../transaction/index.js\";\nimport { concat, defineProperties, getBigInt, getBytes, hexlify, isHexString, mask, toBeHex, toQuantity, toTwos, zeroPadValue, assertArgument } from \"../utils/index.js\";\nimport { id } from \"./id.js\";\nconst padding = new Uint8Array(32);\npadding.fill(0);\nconst BN__1 = BigInt(-1);\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n;\n;\nfunction hexPadRight(value) {\n const bytes = getBytes(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return concat([bytes, padding.slice(padOffset)]);\n }\n return hexlify(bytes);\n}\nconst hexTrue = toBeHex(BN_1, 32);\nconst hexFalse = toBeHex(BN_0, 32);\nconst domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\nconst domainFieldNames = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\nfunction checkString(key) {\n return function (value) {\n assertArgument(typeof (value) === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n}\nconst domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function (_value) {\n const value = getBigInt(_value, \"domain.chainId\");\n assertArgument(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return toQuantity(value);\n },\n verifyingContract: function (value) {\n try {\n return getAddress(value).toLowerCase();\n }\n catch (error) { }\n assertArgument(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function (value) {\n const bytes = getBytes(value, \"domain.salt\");\n assertArgument(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return hexlify(bytes);\n }\n};\nfunction getBaseEncoder(type) {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = (match[1] === \"\");\n const width = parseInt(match[2]);\n assertArgument(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = mask(BN_MAX_UINT256, signed ? (width - 1) : width);\n const boundsLower = signed ? ((boundsUpper + BN_1) * BN__1) : BN_0;\n return function (_value) {\n const value = getBigInt(_value, \"value\");\n assertArgument(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return toBeHex(signed ? toTwos(value, 256) : value, 32);\n };\n }\n }\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n assertArgument(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function (value) {\n const bytes = getBytes(value);\n assertArgument(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\": return function (value) {\n return zeroPadValue(getAddress(value), 32);\n };\n case \"bool\": return function (value) {\n return ((!value) ? hexFalse : hexTrue);\n };\n case \"bytes\": return function (value) {\n return keccak256(value);\n };\n case \"string\": return function (value) {\n return id(value);\n };\n }\n return null;\n}\nfunction encodeType(name, fields) {\n return `${name}(${fields.map(({ name, type }) => (type + \" \" + name)).join(\",\")})`;\n}\n// foo[][3] => { base: \"foo\", index: \"[][3]\", array: {\n// base: \"foo\", prefix: \"foo[]\", count: 3 } }\nfunction splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: (match[2] + match[4]),\n array: {\n base: match[1],\n prefix: (match[1] + match[2]),\n count: (match[5] ? parseInt(match[5]) : -1),\n }\n };\n }\n return { base: type };\n}\n/**\n * A **TypedDataEncode** prepares and encodes [[link-eip-712]] payloads\n * for signed typed data.\n *\n * This is useful for those that wish to compute various components of a\n * typed data hash, primary types, or sub-components, but generally the\n * higher level [[Signer-signTypedData]] is more useful.\n */\nexport class TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = new Map();\n this.#encoderCache = new Map();\n // Link struct types to their direct child structs\n const links = new Map();\n // Link structs to structs which contain them as a child\n const parents = new Map();\n // Link all subtypes within a given struct\n const subtypes = new Map();\n const types = {};\n Object.keys(_types).forEach((type) => {\n types[type] = _types[type].map(({ name, type }) => {\n // Normalize the base type (unless name conflict)\n let { base, index } = splitArray(type);\n if (base === \"int\" && !_types[\"int\"]) {\n base = \"int256\";\n }\n if (base === \"uint\" && !_types[\"uint\"]) {\n base = \"uint256\";\n }\n return { name, type: (base + (index || \"\")) };\n });\n links.set(type, new Set());\n parents.set(type, []);\n subtypes.set(type, new Set());\n });\n this.#types = JSON.stringify(types);\n for (const name in types) {\n const uniqueNames = new Set();\n for (const field of types[name]) {\n // Check each field has a unique name\n assertArgument(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n // Get the base type (drop any array specifiers)\n const baseType = splitArray(field.type).base;\n assertArgument(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) {\n continue;\n }\n assertArgument(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n // Add linkage\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n // Deduce the primary type\n const primaryTypes = Array.from(parents.keys()).filter((n) => (parents.get(n).length === 0));\n assertArgument(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n assertArgument(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(\", \")}`, \"types\", _types);\n defineProperties(this, { primaryType: primaryTypes[0] });\n // Check for circular type references\n function checkCircular(type, found) {\n assertArgument(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n // Recursively check children\n checkCircular(child, found);\n // Mark all ancestors as having this decendant\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, new Set());\n // Compute each fully describe type\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder = this.#encoderCache.get(type);\n if (!encoder) {\n encoder = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder);\n }\n return encoder;\n }\n #getEncoder(type) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return encoder;\n }\n }\n // Array\n const array = splitArray(type).array;\n if (array) {\n const subtype = array.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n assertArgument(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(keccak256);\n }\n return keccak256(concat(result));\n };\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this.#fullTypes.has(type)) {\n return keccak256(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return concat(values);\n };\n }\n assertArgument(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n assertArgument(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return keccak256(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return callback(type, value);\n }\n }\n // Array\n const array = splitArray(type).array;\n if (array) {\n assertArgument(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n return value.map((v) => this._visit(array.prefix, v, callback));\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, {});\n }\n assertArgument(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types) {\n return new TypedDataEncoder(types);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types) {\n return TypedDataEncoder.from(types).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types, value) {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain) {\n const domainFields = [];\n for (const name in domain) {\n if (domain[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n assertArgument(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain);\n domainFields.push({ name, type });\n }\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain, types, value) {\n return concat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain, types, value) {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain, types, value, resolveName) {\n // Make a copy to isolate it from the object passed in\n domain = Object.assign({}, domain);\n // Allow passing null to ignore value\n for (const key in domain) {\n if (domain[key] == null) {\n delete domain[key];\n }\n }\n // Look up all ENS names\n const ensCache = {};\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n // Get a list of all the addresses\n encoder.visit(value, (type, value) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n // Replace all ENS names with their address\n value = encoder.visit(value, (type, value) => {\n if (type === \"address\" && ensCache[value]) {\n return ensCache[value];\n }\n return value;\n });\n return { domain, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain, types, value) {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n // Derive the EIP712Domain Struct reference type\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value = domain[name];\n if (value == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder = TypedDataEncoder.from(types);\n // Get the normalized types\n types = encoder.types;\n const typesWithDomain = Object.assign({}, types);\n assertArgument(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n typesWithDomain.EIP712Domain = domainTypes;\n // Validate the data structures and types\n encoder.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type, value) => {\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(getBytes(value));\n }\n // uint or int\n if (type.match(/^u?int/)) {\n return getBigInt(value).toString();\n }\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n assertArgument(typeof (value) === \"string\", \"invalid string\", \"value\", value);\n return value;\n }\n assertArgument(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n}\n/**\n * Compute the address used to sign the typed data for the %%signature%%.\n */\nexport function verifyTypedData(domain, types, value, signature) {\n return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature);\n}\n//# sourceMappingURL=typed-data.js.map","/**\n * A fragment is a single item from an ABI, which may represent any of:\n *\n * - [Functions](FunctionFragment)\n * - [Events](EventFragment)\n * - [Constructors](ConstructorFragment)\n * - Custom [Errors](ErrorFragment)\n * - [Fallback or Receive](FallbackFragment) functions\n *\n * @_subsection api/abi/abi-coder:Fragments [about-fragments]\n */\nimport { defineProperties, getBigInt, getNumber, assert, assertPrivate, assertArgument } from \"../utils/index.js\";\nimport { id } from \"../hash/index.js\";\n;\n// [ \"a\", \"b\" ] => { \"a\": 1, \"b\": 1 }\nfunction setify(items) {\n const result = new Set();\n items.forEach((k) => result.add(k));\n return Object.freeze(result);\n}\nconst _kwVisibDeploy = \"external public payable override\";\nconst KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n// Visibility Keywords\nconst _kwVisib = \"constant external internal payable private public pure view override\";\nconst KwVisib = setify(_kwVisib.split(\" \"));\nconst _kwTypes = \"constructor error event fallback function receive struct\";\nconst KwTypes = setify(_kwTypes.split(\" \"));\nconst _kwModifiers = \"calldata memory storage payable indexed\";\nconst KwModifiers = setify(_kwModifiers.split(\" \"));\nconst _kwOther = \"tuple returns\";\n// All Keywords\nconst _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\nconst Keywords = setify(_keywords.split(\" \"));\n// Single character tokens\nconst SimpleTokens = {\n \"(\": \"OPEN_PAREN\", \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\", \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\", \"@\": \"AT\"\n};\n// Parser regexes to consume the next token\nconst regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\nconst regexNumberPrefix = new RegExp(\"^([0-9]+)\");\nconst regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n// Parser regexs to check validity\nconst regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\nconst regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\nclass TokenString {\n #offset;\n #tokens;\n get offset() { return this.#offset; }\n get length() { return this.#tokens.length - this.#offset; }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() { return new TokenString(this.#tokens); }\n reset() { this.#offset = 0; }\n #subTokenString(from = 0, to = 0) {\n return new TokenString(this.#tokens.slice(from, to).map((t) => {\n return Object.freeze(Object.assign({}, t, {\n match: (t.match - from),\n linkBack: (t.linkBack - from),\n linkNext: (t.linkNext - from),\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return (top != null && allowed.has(top)) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return (top.type === type) ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i = this.#offset; i < this.#tokens.length; i++) {\n const token = this.#tokens[i];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n}\nfunction lex(text) {\n const tokens = [];\n const throwError = (message) => {\n const token = (offset < text.length) ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n // Strip off any leading whitespace\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = (SimpleTokens[cur[0]] || \"\");\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n }\n else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n (tokens[token.match]).match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n (tokens[token.linkBack]).linkNext = tokens.length - 1;\n }\n else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n (tokens[token.linkBack]).linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n }\n else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n }\n else if (type === \"CLOSE_BRACKET\") {\n // Remove the CLOSE_BRACKET\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n (tokens[tokens.length - 1]).value = getNumber(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n (tokens[tokens.length - 1]).text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t) => Object.freeze(t)));\n}\n// Check only one of `allowed` is in `set`\nfunction allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n}\n// Functions to process a Solidity Signature TokenString from left-to-right for...\n// ...the name with an optional type, returning the name\nfunction consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n}\n// ...all keywords matching allowed, returning the keywords\nfunction consumeKeywords(tokens, allowed) {\n const keywords = new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || (allowed && !allowed.has(keyword))) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n}\n// ...all visibility keywords, returning the coalesced mutability\nfunction consumeMutability(tokens) {\n let modifiers = consumeKeywords(tokens, KwVisib);\n // Detect conflicting modifiers\n allowSingle(modifiers, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers, setify(\"pure view payable nonpayable\".split(\" \")));\n // Process mutability states\n if (modifiers.has(\"view\")) {\n return \"view\";\n }\n if (modifiers.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n // Process legacy `constant` last\n if (modifiers.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n}\n// ...a parameter list, returning the ParamType list\nfunction consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t) => ParamType.from(t, allowIndexed));\n}\n// ...a gas limit, returning a BigNumber or null if none\nfunction consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return getBigInt(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n}\nfunction consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n}\nconst regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\nfunction verifyBasicType(type) {\n const match = type.match(regexType);\n assertArgument(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n // bytesXX\n const length = parseInt(match[2]);\n assertArgument(length !== 0 && length <= 32, \"invalid bytes length\", \"type\", type);\n }\n else if (match[3]) {\n // intXX or uintXX\n const size = parseInt(match[3]);\n assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n}\n// Make the Fragment constructors effectively private\nconst _guard = {};\nconst internal = Symbol.for(\"_ethers_internal\");\nconst ParamTypeInternal = \"_ParamTypeInternal\";\nconst ErrorFragmentInternal = \"_ErrorInternal\";\nconst EventFragmentInternal = \"_EventInternal\";\nconst ConstructorFragmentInternal = \"_ConstructorInternal\";\nconst FallbackFragmentInternal = \"_FallbackInternal\";\nconst FunctionFragmentInternal = \"_FunctionInternal\";\nconst StructFragmentInternal = \"_StructInternal\";\n/**\n * Each input and output of a [[Fragment]] is an Array of **ParamType**.\n */\nexport class ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n assertPrivate(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n }\n else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n }\n else if (components != null) {\n throw new Error(\"\");\n }\n defineProperties(this, {\n name, type, baseType, indexed, components, arrayLength, arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result = JSON.parse(this.arrayChildren.format(\"json\"));\n result.name = name;\n result.type += `[${(this.arrayLength < 0 ? \"\" : String(this.arrayLength))}]`;\n return JSON.stringify(result);\n }\n const result = {\n type: ((this.baseType === \"tuple\") ? \"tuple\" : this.type),\n name\n };\n if (typeof (this.indexed) === \"boolean\") {\n result.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result.components = this.components.map((c) => JSON.parse(c.format(format)));\n }\n return JSON.stringify(result);\n }\n let result = \"\";\n // Array\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${(this.arrayLength < 0 ? \"\" : String(this.arrayLength))}]`;\n }\n else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join((format === \"full\") ? \", \" : \",\") + \")\";\n }\n else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return (this.baseType === \"array\");\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return (this.baseType === \"tuple\");\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return (this.indexed != null);\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v) => (_this.arrayChildren.walk(v, process)));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v, i) => (_this.components[i].walk(v, process)));\n }\n return process(this.type, value);\n }\n #walkAsync(promises, value, process, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result = value.slice();\n result.forEach((value, index) => {\n childType.#walkAsync(promises, value, process, (value) => {\n result[index] = value;\n });\n });\n setValue(result);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n // Convert the object into an array\n let result;\n if (Array.isArray(value)) {\n result = value.slice();\n }\n else {\n if (value == null || typeof (value) !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result.forEach((value, index) => {\n components[index].#walkAsync(promises, value, process, (value) => {\n result[index] = value;\n });\n });\n setValue(result);\n return;\n }\n const result = process(this.type, value);\n if (result.then) {\n promises.push((async function () { setValue(await result); })());\n }\n else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS naes by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process, (value) => {\n result[0] = value;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return ParamType.from(lex(obj), allowIndexed);\n }\n catch (error) {\n assertArgument(false, \"invalid param type\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n let type = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n // Tuple\n baseType = \"tuple\";\n comps = obj.popParams().map((t) => ParamType.from(t));\n type = `tuple(${comps.map((c) => c.format()).join(\",\")})`;\n }\n else {\n // Normal\n type = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type;\n }\n // Check for Array\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop(); //arrays[i];\n arrayChildren = new ParamType(_guard, \"\", type, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed = true;\n }\n const name = (obj.peekType(\"ID\") ? obj.pop().text : \"\");\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new ParamType(_guard, name, type, baseType, indexed, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n assertArgument(!name || (typeof (name) === \"string\" && name.match(regexId)), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n assertArgument(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\"tuple(\" /* fix: ) */) || type.startsWith(\"(\" /* fix: ) */)) {\n const comps = (obj.components != null) ? obj.components.map((c) => ParamType.from(c)) : null;\n const tuple = new ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n // @TODO: use lexer to validate and normalize type\n return tuple;\n }\n type = verifyBasicType(obj.type);\n return new ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return (value && value[internal] === ParamTypeInternal);\n }\n}\n/**\n * An abstract class to represent An individual fragment from a parse ABI.\n */\nexport class Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n assertPrivate(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n defineProperties(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof (obj) === \"string\") {\n // Try parsing JSON...\n try {\n Fragment.from(JSON.parse(obj));\n }\n catch (e) { }\n // ...otherwise, use the human-readable lexer\n return Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n // Human-readable ABI (already lexed)\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\": return ConstructorFragment.from(obj);\n case \"error\": return ErrorFragment.from(obj);\n case \"event\": return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\": return FunctionFragment.from(obj);\n case \"struct\": return StructFragment.from(obj);\n }\n }\n else if (typeof (obj) === \"object\") {\n // JSON ABI\n switch (obj.type) {\n case \"constructor\": return ConstructorFragment.from(obj);\n case \"error\": return ErrorFragment.from(obj);\n case \"event\": return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\": return FunctionFragment.from(obj);\n case \"struct\": return StructFragment.from(obj);\n }\n assert(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n assertArgument(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n}\n/**\n * An abstract class to represent An individual fragment\n * which has a name from a parse ABI.\n */\nexport class NamedFragment extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n assertArgument(typeof (name) === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n defineProperties(this, { name });\n }\n}\nfunction joinParams(format, params) {\n return \"(\" + params.map((p) => p.format(format)).join((format === \"full\") ? \", \" : \",\") + \")\";\n}\n/**\n * A Fragment which represents a //Custom Error//.\n */\nexport class ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return id(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n return ErrorFragment.from(lex(obj));\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new ErrorFragment(_guard, name, inputs);\n }\n return new ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === ErrorFragmentInternal);\n }\n}\n/**\n * A Fragment which represents an Event.\n */\nexport class EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n defineProperties(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return id(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i) => JSON.parse(i.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p) => ParamType.from(p));\n const fragment = new EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return EventFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid event fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new EventFragment(_guard, name, inputs, anonymous);\n }\n return new EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p) => ParamType.from(p, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === EventFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a constructor.\n */\nexport class ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n defineProperties(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n assert(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: (this.payable ? \"payable\" : \"undefined\"),\n payable: this.payable,\n gas: ((this.gas != null) ? this.gas : undefined),\n inputs: this.inputs.map((i) => JSON.parse(i.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return ConstructorFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, (obj.gas != null) ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === ConstructorFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a method.\n */\nexport class FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n defineProperties(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = ((this.inputs.length === 0) ? \"receive\" : \"fallback\");\n if (format === \"json\") {\n const stateMutability = (this.payable ? \"payable\" : \"nonpayable\");\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return FallbackFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n assertArgument(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n // receive()\n if (type === \"receive\") {\n const inputs = consumeParams(obj);\n assertArgument(inputs.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new FallbackFragment(_guard, [], true);\n }\n // fallback() [payable]\n // fallback(bytes) [payable] returns (bytes)\n let inputs = consumeParams(obj);\n if (inputs.length) {\n assertArgument(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i) => i.format(\"minimal\")).join(\", \"));\n }\n else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n assertArgument(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n assertArgument(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i) => i.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = (obj.stateMutability === \"payable\");\n return new FallbackFragment(_guard, inputs, payable);\n }\n assertArgument(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === FallbackFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a method.\n */\nexport class FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = (stateMutability === \"view\" || stateMutability === \"pure\");\n const payable = (stateMutability === \"payable\");\n defineProperties(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return id(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability : undefined),\n payable: this.payable,\n gas: ((this.gas != null) ? this.gas : undefined),\n inputs: this.inputs.map((i) => JSON.parse(i.format(format))),\n outputs: this.outputs.map((o) => JSON.parse(o.format(format))),\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p) => ParamType.from(p));\n const fragment = new FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return FunctionFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid function fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n // Use legacy Solidity ABI logic if stateMutability is missing\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof (obj.constant) === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof (obj.payable) === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n }\n else if (typeof (obj.payable) === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n // @TODO: verifyState for stateMutability (e.g. throw if\n // payable: false but stateMutability is \"nonpayable\")\n return new FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], (obj.gas != null) ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === FunctionFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a structure.\n */\nexport class StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof (obj) === \"string\") {\n try {\n return StructFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid struct fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new StructFragment(_guard, name, inputs);\n }\n return new StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === StructFragmentInternal);\n }\n}\n//# sourceMappingURL=fragments.js.map","/**\n * When sending values to or receiving values from a [[Contract]], the\n * data is generally encoded using the [ABI standard](link-solc-abi).\n *\n * The AbiCoder provides a utility to encode values to ABI data and\n * decode values from ABI data.\n *\n * Most of the time, developers should favour the [[Contract]] class,\n * which further abstracts a lot of the finer details of ABI data.\n *\n * @_section api/abi/abi-coder:ABI Encoding\n */\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\nimport { assertArgumentCount, assertArgument } from \"../utils/index.js\";\nimport { Reader, Writer } from \"./coders/abstract-coder.js\";\nimport { AddressCoder } from \"./coders/address.js\";\nimport { ArrayCoder } from \"./coders/array.js\";\nimport { BooleanCoder } from \"./coders/boolean.js\";\nimport { BytesCoder } from \"./coders/bytes.js\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes.js\";\nimport { NullCoder } from \"./coders/null.js\";\nimport { NumberCoder } from \"./coders/number.js\";\nimport { StringCoder } from \"./coders/string.js\";\nimport { TupleCoder } from \"./coders/tuple.js\";\nimport { ParamType } from \"./fragments.js\";\nimport { getAddress } from \"../address/index.js\";\nimport { getBytes, hexlify, makeError } from \"../utils/index.js\";\n// https://docs.soliditylang.org/en/v0.8.17/control-structures.html\nconst PanicReasons = new Map();\nPanicReasons.set(0x00, \"GENERIC_PANIC\");\nPanicReasons.set(0x01, \"ASSERT_FALSE\");\nPanicReasons.set(0x11, \"OVERFLOW\");\nPanicReasons.set(0x12, \"DIVIDE_BY_ZERO\");\nPanicReasons.set(0x21, \"ENUM_RANGE_ERROR\");\nPanicReasons.set(0x22, \"BAD_STORAGE_DATA\");\nPanicReasons.set(0x31, \"STACK_UNDERFLOW\");\nPanicReasons.set(0x32, \"ARRAY_RANGE_ERROR\");\nPanicReasons.set(0x41, \"OUT_OF_MEMORY\");\nPanicReasons.set(0x51, \"UNINITIALIZED_FUNCTION_CALL\");\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\nlet defaultCoder = null;\nlet defaultMaxInflation = 1024;\nfunction getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = getBytes(data);\n data = hexlify(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n }\n else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x08c379a0\") {\n // Error(string)\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n }\n catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x4e487b71\") {\n // Panic(uint256)\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n }\n catch (error) {\n message += \" (could not decode panic code)\";\n }\n }\n else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: (tx.to ? getAddress(tx.to) : null),\n data: (tx.data || \"0x\")\n };\n if (tx.from) {\n transaction.from = getAddress(tx.from);\n }\n return makeError(message, \"CALL_EXCEPTION\", {\n action, data, reason, transaction, invocation, revert\n });\n}\n/**\n * The **AbiCoder** is a low-level class responsible for encoding JavaScript\n * values into binary data and decoding binary data into JavaScript values.\n */\nexport class AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new TupleCoder(param.components.map((c) => this.#getCoder(c)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n assertArgument(size !== 0 && size <= 32, \"invalid bytes length\", \"param\", param);\n return new FixedBytesCoder(size, param.name);\n }\n assertArgument(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n assertArgumentCount(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n const writer = new Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(new Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n assertArgument(typeof (value) === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, AbiCoder.defaultAbiCoder());\n }\n}\n//# sourceMappingURL=abi-coder.js.map","/**\n * About bytes32 strings...\n *\n * @_docloc: api/utils:Bytes32 Strings\n */\nimport { getBytes, toUtf8Bytes, toUtf8String, zeroPadBytes } from \"../utils/index.js\";\n/**\n * Encodes %%text%% as a Bytes32 string.\n */\nexport function encodeBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return zeroPadBytes(bytes, 32);\n}\n/**\n * Encodes the Bytes32-encoded %%bytes%% into a string.\n */\nexport function decodeBytes32String(_bytes) {\n const data = getBytes(_bytes, \"bytes\");\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","/**\n * The Interface class is a low-level class that accepts an\n * ABI and provides all the necessary functionality to encode\n * and decode paramaters to and results from methods, events\n * and errors.\n *\n * It also provides several convenience methods to automatically\n * search and find matching transactions and events to parse them.\n *\n * @_subsection api/abi:Interfaces [interfaces]\n */\nimport { keccak256 } from \"../crypto/index.js\";\nimport { id } from \"../hash/index.js\";\nimport { concat, dataSlice, getBigInt, getBytes, getBytesCopy, hexlify, zeroPadBytes, zeroPadValue, isHexString, defineProperties, assertArgument, toBeHex, assert } from \"../utils/index.js\";\nimport { AbiCoder } from \"./abi-coder.js\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder.js\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType } from \"./fragments.js\";\nimport { Typed } from \"./typed.js\";\nexport { checkResultErrors, Result };\n/**\n * When using the [[Interface-parseLog]] to automatically match a Log to its event\n * for parsing, a **LogDescription** is returned.\n */\nexport class LogDescription {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, signature, topic, args\n });\n }\n}\n/**\n * When using the [[Interface-parseTransaction]] to automatically match\n * a transaction data to its function for parsing,\n * a **TransactionDescription** is returned.\n */\nexport class TransactionDescription {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, args, signature, selector, value\n });\n }\n}\n/**\n * When using the [[Interface-parseError]] to automatically match an\n * error for a call result for parsing, an **ErrorDescription** is returned.\n */\nexport class ErrorDescription {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, args, signature, selector\n });\n }\n}\n/**\n * An **Indexed** is used as a value when a value that does not\n * fit within a topic (i.e. not a fixed-length, 32-byte type). It\n * is the ``keccak256`` of the value, and used for types such as\n * arrays, tuples, bytes and strings.\n */\nexport class Indexed {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash) {\n defineProperties(this, { hash, _isIndexed: true });\n }\n}\n// https://docs.soliditylang.org/en/v0.8.13/control-structures.html?highlight=panic#panic-via-assert-and-error-via-require\nconst PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\",\n};\nconst BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message) => {\n return `reverted with reason string ${JSON.stringify(message)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 0xff && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n};\n/**\n * An Interface abstracts many of the low-level details for\n * encoding and decoding the data on the blockchain.\n *\n * An ABI provides information on how to encode data to send to\n * a Contract, how to decode the results and events and how to\n * interpret revert errors.\n *\n * The ABI can be specified by [any supported format](InterfaceAbi).\n */\nexport class Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi = [];\n if (typeof (fragments) === \"string\") {\n abi = JSON.parse(fragments);\n }\n else {\n abi = fragments;\n }\n this.#functions = new Map();\n this.#errors = new Map();\n this.#events = new Map();\n // this.#structs = new Map();\n const frags = [];\n for (const a of abi) {\n try {\n frags.push(Fragment.from(a));\n }\n catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);\n }\n }\n defineProperties(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n // Add all fragments by their signature\n this.fragments.forEach((fragment, index) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineProperties(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n }\n else {\n assertArgument(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.#functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n // Two identical entries; ignore it\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineProperties(this, {\n deploy: ConstructorFragment.from(\"constructor()\")\n });\n }\n defineProperties(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = (minimal ? \"minimal\" : \"full\");\n const abi = this.fragments.map((f) => f.format(format));\n return abi;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi = this.fragments.map((f) => f.format(\"json\"));\n // We need to re-bundle the JSON fragments a bit\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n // Selector\n if (isHexString(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = (values.length > 0) ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n // Remove all matches that don't have a compatible length. The args\n // may contain an overrides, so the match may have n or n - 1 parameters\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i, 1);\n }\n }\n // Remove all matches that don't match the Typed signature\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs;\n for (let j = 0; j < values.length; j++) {\n // Not a typed value\n if (!Typed.isTyped(values[j])) {\n continue;\n }\n // We are past the inputs\n if (j >= inputs.length) {\n if (values[j].type === \"overrides\") {\n continue;\n }\n matching.splice(i, 1);\n break;\n }\n // Make sure the value type matches the input type\n if (values[j].type !== inputs[j].baseType) {\n matching.splice(i, 1);\n break;\n }\n }\n }\n }\n // We found a single matching signature with an overrides, but the\n // last value is something that cannot possibly be an options\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof (lastArg) !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n const result = this.#functions.get(FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n assertArgument(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#functions.get(name)), i);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n // EventTopic\n if (isHexString(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n // Remove all matches that don't have a compatible length.\n for (let i = matching.length - 1; i >= 0; i--) {\n if (matching[i].inputs.length < values.length) {\n matching.splice(i, 1);\n }\n }\n // Remove all matches that don't match the Typed signature\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs;\n for (let j = 0; j < values.length; j++) {\n // Not a typed value\n if (!Typed.isTyped(values[j])) {\n continue;\n }\n // Make sure the value type matches the input type\n if (values[j].type !== inputs[j].baseType) {\n matching.splice(i, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n const result = this.#events.get(EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n assertArgument(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#events.get(name)), i);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if (isHexString(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n }\n else if (matching.length > 1) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n key = ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#errors.get(name)), i);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\ngetSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n\n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n\n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n\n fragment = matches[0];\n }\n\n return dataSlice(id(fragment.format()), 0, 4);\n}\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getError(fragment);\n assertArgument(f, \"unknown error\", \"fragment\", fragment);\n fragment = f;\n }\n assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, dataSlice(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getError(fragment);\n assertArgument(f, \"unknown error\", \"fragment\", fragment);\n fragment = f;\n }\n return concat([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, dataSlice(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n return concat([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n let message = \"invalid length for result data\";\n const bytes = getBytesCopy(data);\n if ((bytes.length % 32) === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n }\n catch (error) {\n message = \"could not decode result data\";\n }\n }\n // Call returned data with no error, but the data is junk\n assert(false, message, \"BAD_DATA\", {\n value: hexlify(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = getBytes(_data, \"data\");\n const error = AbiCoder.getBuiltinCallException(\"call\", tx, data);\n // Not a built-in error; try finding a custom error\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = hexlify(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name, signature: ef.format(), args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n }\n catch (e) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n // Add the invocation, if available\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n return hexlify(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n assert(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n // @TODO: Use the coders for this; to properly support tuples, etc.\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return id(value);\n }\n else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n if (param.type === \"bool\" && typeof (value) === \"boolean\") {\n value = (value ? \"0x01\" : \"0x00\");\n }\n else if (param.type.match(/^u?int/)) {\n value = toBeHex(value); // @TODO: Should this toTwos??\n }\n else if (param.type.match(/^bytes/)) {\n value = zeroPadBytes(value, 32);\n }\n else if (param.type === \"address\") {\n // Check addresses are valid\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return zeroPadValue(hexlify(value), 32);\n };\n values.forEach((value, index) => {\n const param = fragment.inputs[index];\n if (!param.indexed) {\n assertArgument(value == null, \"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n return;\n }\n if (value == null) {\n topics.push(null);\n }\n else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n assertArgument(false, \"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n }\n else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n }\n else {\n topics.push(encodeTopic(param, value));\n }\n });\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n assertArgument(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value));\n }\n else if (param.type === \"bytes\") {\n topics.push(keccak256(value));\n }\n else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n }\n else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n }\n else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics: topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n assertArgument(isHexString(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = (topics != null) ? this.#abiCoder.decode(indexed, concat(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n //const result: (Array & { [ key: string ]: any }) = [ ];\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n }\n else if (dynamic[index]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n }\n else {\n try {\n value = resultIndexed[indexedIndex++];\n }\n catch (error) {\n value = error;\n }\n }\n }\n else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = getBytes(tx.data, \"tx.data\");\n const value = getBigInt((tx.value != null) ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction(hexlify(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = hexlify(data);\n const fragment = this.getError(dataSlice(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n // Already an Interface, which is immutable\n if (value instanceof Interface) {\n return value;\n }\n // JSON\n if (typeof (value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n // Maybe an interface from an older version, or from a symlinked copy\n if (typeof (value.format) === \"function\") {\n return new Interface(value.format(\"json\"));\n }\n // Array of fragments\n return new Interface(value);\n }\n}\n//# sourceMappingURL=interface.js.map","//import { resolveAddress } from \"@ethersproject/address\";\nimport { defineProperties, getBigInt, getNumber, hexlify, resolveProperties, assert, assertArgument, isError, makeError } from \"../utils/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nconst BN_0 = BigInt(0);\n// -----------------------\nfunction getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n}\nfunction toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n}\n// @TODO? implements Required\n/**\n * A **FeeData** wraps all the fee-related values associated with\n * the network.\n */\nexport class FeeData {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n defineProperties(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas),\n };\n }\n}\n;\n/**\n * Returns a copy of %%req%% with all properties coerced to their strict\n * types.\n */\nexport function copyRequest(req) {\n const result = {};\n // These could be addresses, ENS names or Addressables\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = hexlify(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = getBigInt(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = getNumber(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = accessListify(req.accessList);\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n return result;\n}\n/**\n * A **Block** represents the data associated with a full block on\n * Ethereum.\n */\nexport class Block {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof (tx) !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n defineProperties(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot,\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof (tx) === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n // Doesn't matter...\n if (txs.length === 0) {\n return [];\n }\n // Make sure we prefetched the transactions\n assert(typeof (txs[0]) === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash, miner, nonce, number, parentHash, timestamp,\n parentBeaconBlockRoot, stateRoot, receiptsRoot,\n transactions,\n };\n }\n [Symbol.iterator]() {\n let index = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index < this.length) {\n return {\n value: txs[index++], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() { return this.#transactions.length; }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1000);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n // Find the internal value by its index or hash\n let tx = undefined;\n if (typeof (indexOrHash) === \"number\") {\n tx = this.#transactions[indexOrHash];\n }\n else {\n const hash = indexOrHash.toLowerCase();\n for (const v of this.#transactions) {\n if (typeof (v) === \"string\") {\n if (v !== hash) {\n continue;\n }\n tx = v;\n break;\n }\n else {\n if (v.hash === hash) {\n continue;\n }\n tx = v;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof (tx) === \"string\") {\n return (await this.provider.getTransaction(tx));\n }\n else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof (indexOrHash) === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n assertArgument(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() { return !!this.hash; }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n}\n//////////////////////\n// Log\n/**\n * A **Log** in Ethereum represents an event that has been included in a\n * transaction using the ``LOG*`` opcodes, which are most commonly used by\n * Solidity's emit for announcing events.\n */\nexport class Log {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n defineProperties(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex,\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address, blockHash, blockNumber, data, index,\n removed, topics, transactionHash, transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n assert(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n assert(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n assert(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n}\n//////////////////////\n// Transaction Receipt\n/*\nexport interface LegacyTransactionReceipt {\n byzantium: false;\n status: null;\n root: string;\n}\n\nexport interface ByzantiumTransactionReceipt {\n byzantium: true;\n status: number;\n root: null;\n}\n*/\n/**\n * A **TransactionReceipt** includes additional information about a\n * transaction that is only available after it has been mined.\n */\nexport class TransactionReceipt {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n }\n else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n defineProperties(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() { return this.#logs; }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const { to, from, contractAddress, hash, index, blockHash, blockNumber, logsBloom, logs, //byzantium, \n status, root } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash, blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash, index, logs, logsBloom, root, status, to\n };\n }\n /**\n * @_ignore:\n */\n get length() { return this.logs.length; }\n [Symbol.iterator]() {\n let index = 0;\n return {\n next: () => {\n if (index < this.length) {\n return { value: this.logs[index++], done: false };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return (await this.provider.getTransactionResult(this.hash));\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return (await this.provider.getBlockNumber()) - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n assert(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n}\n/**\n * A **TransactionResponse** includes all properties about a transaction\n * that was sent to the network, which may or may not be included in a\n * block.\n *\n * The [[TransactionResponse-isMined]] can be used to check if the\n * transaction has been mined as well as type guard that the otherwise\n * possibly ``null`` properties are defined.\n */\nexport class TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = (tx.blockNumber != null) ? tx.blockNumber : null;\n this.blockHash = (tx.blockHash != null) ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = (tx.accessList != null) ? tx.accessList : null;\n this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList, blockNumber, blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data, from,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce, signature, to, index, type,\n value: toJson(this.value),\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber } = await resolveProperties({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n // Not mined yet...\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = (_confirms == null) ? 1 : _confirms;\n const timeout = (_timeout == null) ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = (startBlock === -1) ? true : false;\n const checkReplacement = async () => {\n // Get the current transaction count for this sender\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await resolveProperties({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n // No transaction or our nonce has not been mined yet; but we\n // can start scanning later when we do start\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n // We were mined; no replacement\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n // We were replaced; start scanning for that transaction\n // Starting to scan; look back a few extra blocks for safety\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n // Get the next block to scan\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n // This should not happen; but we'll try again shortly\n if (block == null) {\n return;\n }\n // We were mined; no replacement\n for (const hash of block) {\n if (hash === this.hash) {\n return;\n }\n }\n // Search for the transaction that replaced us\n for (let i = 0; i < block.length; i++) {\n const tx = await block.getTransaction(i);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n // Get the receipt\n if (stopScanning) {\n return null;\n }\n const receipt = await this.provider.getTransactionReceipt(tx.hash);\n // This should not happen; but we'll try again shortly\n if (receipt == null) {\n return;\n }\n // We will retry this on the next block (this case could be optimized)\n if ((blockNumber - receipt.blockNumber + 1) < confirms) {\n return;\n }\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n }\n else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n assert(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt) => {\n if (receipt == null || receipt.status !== 0) {\n return receipt;\n }\n assert(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null, reason: null, invocation: null, revert: null,\n transaction: {\n to: receipt.to,\n from: receipt.from,\n data: \"\" // @TODO: in v7, split out sendTransaction properties\n }, receipt\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if ((await receipt.confirmations()) >= confirms) {\n return checkReceipt(receipt);\n }\n }\n else {\n // Check for a replacement; throws if a replacement was found\n await checkReplacement();\n // Allow null only when the confirms is 0\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n // List of things to cancel when we have a result (one way or the other)\n const cancellers = [];\n const cancel = () => { cancellers.forEach((c) => c()); };\n // On cancel, stop scanning for replacements\n cancellers.push(() => { stopScanning = true; });\n // Set up any timeout requested\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel();\n reject(makeError(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => { clearTimeout(timer); });\n }\n const txListener = async (receipt) => {\n // Done; return it!\n if ((await receipt.confirmations()) >= confirms) {\n cancel();\n try {\n resolve(checkReceipt(receipt));\n }\n catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => { this.provider.off(this.hash, txListener); });\n this.provider.on(this.hash, txListener);\n // We support replacement detection; start checking\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n // Check for a replacement; this throws only if one is found\n await checkReplacement();\n }\n catch (error) {\n // We were replaced (with enough confirms); re-throw the error\n if (isError(error, \"TRANSACTION_REPLACED\")) {\n cancel();\n reject(error);\n return;\n }\n }\n // Rescheudle a check on the next block\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => { this.provider.off(\"block\", replaceListener); });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return (this.blockHash != null);\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return (this.type === 0);\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return (this.type === 1);\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return (this.type === 2);\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return (this.type === 3);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n assert(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n assert(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n assert(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n assertArgument(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n}\nfunction createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n}\nfunction createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n}\nfunction createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n}\nfunction createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n}\n//# sourceMappingURL=provider.js.map","// import from provider.ts instead of index.ts to prevent circular dep\n// from EtherscanProvider\nimport { Log, TransactionReceipt, TransactionResponse } from \"../providers/provider.js\";\nimport { defineProperties, EventPayload } from \"../utils/index.js\";\n/**\n * An **EventLog** contains additional properties parsed from the [[Log]].\n */\nexport class EventLog extends Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n defineProperties(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() { return this.fragment.name; }\n /**\n * The signature of the event.\n */\n get eventSignature() { return this.fragment.format(); }\n}\n/**\n * An **EventLog** contains additional properties parsed from the [[Log]].\n */\nexport class UndecodedEventLog extends Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n defineProperties(this, { error });\n }\n}\n/**\n * A **ContractTransactionReceipt** includes the parsed logs from a\n * [[TransactionReceipt]].\n */\nexport class ContractTransactionReceipt extends TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n }\n catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n}\n/**\n * A **ContractTransactionResponse** will return a\n * [[ContractTransactionReceipt]] when waited on.\n */\nexport class ContractTransactionResponse extends TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n}\n/**\n * A **ContractUnknownEventPayload** is included as the last parameter to\n * Contract Events when the event does not match any events in the ABI.\n */\nexport class ContractUnknownEventPayload extends EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n defineProperties(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n}\n/**\n * A **ContractEventPayload** is included as the last parameter to\n * Contract Events when the event is known.\n */\nexport class ContractEventPayload extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n defineProperties(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n}\n//# sourceMappingURL=wrappers.js.map","import { Interface, Typed } from \"../abi/index.js\";\nimport { isAddressable, resolveAddress } from \"../address/index.js\";\n// import from provider.ts instead of index.ts to prevent circular dep\n// from EtherscanProvider\nimport { copyRequest, Log } from \"../providers/provider.js\";\nimport { defineProperties, getBigInt, isCallException, isHexString, resolveProperties, isError, makeError, assert, assertArgument } from \"../utils/index.js\";\nimport { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionResponse, EventLog, UndecodedEventLog } from \"./wrappers.js\";\nconst BN_0 = BigInt(0);\nfunction canCall(value) {\n return (value && typeof (value.call) === \"function\");\n}\nfunction canEstimate(value) {\n return (value && typeof (value.estimateGas) === \"function\");\n}\nfunction canResolve(value) {\n return (value && typeof (value.resolveName) === \"function\");\n}\nfunction canSend(value) {\n return (value && typeof (value.sendTransaction) === \"function\");\n}\nfunction getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return undefined;\n}\nclass PreparedTopicFilter {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n defineProperties(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n // Recursively descend into args and resolve any addresses\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = (async function () {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index) => {\n const arg = args[index];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v) => resolveAddress(v, resolver)));\n }\n return resolveAddress(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n })();\n }\n getTopicFilter() {\n return this.#filter;\n }\n}\n// A = Arguments passed in as a tuple\n// R = The result type of the call (i.e. if only one return type,\n// the qualified type, otherwise Result)\n// D = The type the default call will return (i.e. R for view/pure,\n// TransactionResponse otherwise)\n//export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = ContractTransactionResponse> {\nfunction getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof (value[feature]) === \"function\") {\n return value;\n }\n if (value.provider && typeof (value.provider[feature]) === \"function\") {\n return value.provider;\n }\n return null;\n}\nfunction getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n}\n/**\n * @_ignore:\n */\nexport async function copyOverrides(arg, allowed) {\n // Make sure the overrides passed in are a valid overrides object\n const _overrides = Typed.dereference(arg, \"overrides\");\n assertArgument(typeof (_overrides) === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n // Create a shallow copy (we'll deep-ify anything needed during normalizing)\n const overrides = copyRequest(_overrides);\n assertArgument(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n assertArgument(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n // Resolve any from\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n}\n/**\n * @_ignore:\n */\nexport async function resolveArgs(_runner, inputs, args) {\n // Recursively descend into args and resolve any addresses\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index) => {\n return param.walkAsync(args[index], (type, value) => {\n value = Typed.dereference(value, type);\n if (type === \"address\") {\n return resolveAddress(value, resolver);\n }\n return value;\n });\n }));\n}\nfunction buildWrappedFallback(contract) {\n const populateTransaction = async function (overrides) {\n // If an overrides was passed in, copy it and normalize the values\n const tx = (await copyOverrides(overrides, [\"data\"]));\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await resolveAddress(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (getBigInt((tx.value || BN_0), \"overrides.value\") === BN_0);\n const noData = ((tx.data || \"0x\") === \"0x\");\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n assertArgument(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n assertArgument(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n // Only allow payable contracts to set non-zero value\n const payable = iface.receive || (iface.fallback && iface.fallback.payable);\n assertArgument(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n // Only allow fallback contracts to set non-empty data\n assertArgument(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function (overrides) {\n const runner = getRunner(contract.runner, \"call\");\n assert(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(overrides);\n try {\n return await runner.call(tx);\n }\n catch (error) {\n if (isCallException(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function (overrides) {\n const runner = contract.runner;\n assert(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(overrides));\n const provider = getProvider(contract.runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n return new ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas = async function (overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n assert(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n defineProperties(method, {\n _contract: contract,\n estimateGas,\n populateTransaction,\n send, staticCall\n });\n return method;\n}\nfunction buildWrappedMethod(contract, key) {\n const getFragment = function (...args) {\n const fragment = contract.interface.getFunction(key, args);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction = async function (...args) {\n const fragment = getFragment(...args);\n // If an overrides was passed in, copy it and normalize the values\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await resolveAddress(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await resolveProperties({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function (...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function (...args) {\n const runner = contract.runner;\n assert(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(...args));\n const provider = getProvider(contract.runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n return new ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas = async function (...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n assert(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(...args));\n };\n const staticCallResult = async function (...args) {\n const runner = getRunner(contract.runner, \"call\");\n assert(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n }\n catch (error) {\n if (isCallException(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n defineProperties(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract, _key: key,\n getFragment,\n estimateGas,\n populateTransaction,\n send, staticCall, staticCallResult,\n });\n // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n}\nfunction buildWrappedEvent(contract, key) {\n const getFragment = function (...args) {\n const fragment = contract.interface.getEvent(key, args);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function (...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n defineProperties(method, {\n name: contract.interface.getEventName(key),\n _contract: contract, _key: key,\n getFragment\n });\n // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n}\n// The combination of TypeScrype, Private Fields and Proxies makes\n// the world go boom; so we hide variables with some trickery keeping\n// a symbol attached to each BaseContract which its sub-class (even\n// via a Proxy) can reach and use to look up its internal values.\nconst internal = Symbol.for(\"_ethersInternal_contract\");\nconst internalValues = new WeakMap();\nfunction setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n}\nfunction getInternal(contract) {\n return internalValues.get(contract[internal]);\n}\nfunction isDeferred(value) {\n return (value && typeof (value) === \"object\" && (\"getTopicFilter\" in value) &&\n (typeof (value.getTopicFilter) === \"function\") && value.fragment);\n}\nasync function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n // Convert named events to topicHash and get the fragment for\n // events which need deconstructing.\n if (Array.isArray(event)) {\n const topicHashify = function (name) {\n if (isHexString(name, 32)) {\n return name;\n }\n const fragment = contract.interface.getEvent(name);\n assertArgument(fragment, \"unknown fragment\", \"name\", name);\n return fragment.topicHash;\n };\n // Array of Topics and Names; e.g. `[ \"0x1234...89ab\", \"Transfer(address)\" ]`\n topics = event.map((e) => {\n if (e == null) {\n return null;\n }\n if (Array.isArray(e)) {\n return e.map(topicHashify);\n }\n return topicHashify(e);\n });\n }\n else if (event === \"*\") {\n topics = [null];\n }\n else if (typeof (event) === \"string\") {\n if (isHexString(event, 32)) {\n // Topic Hash\n topics = [event];\n }\n else {\n // Name or Signature; e.g. `\"Transfer\", `\"Transfer(address)\"`\n fragment = contract.interface.getEvent(event);\n assertArgument(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n }\n else if (isDeferred(event)) {\n // Deferred Topic Filter; e.g. `contract.filter.Transfer(from)`\n topics = await event.getTopicFilter();\n }\n else if (\"fragment\" in event) {\n // ContractEvent; e.g. `contract.filter.Transfer`\n fragment = event.fragment;\n topics = [fragment.topicHash];\n }\n else {\n assertArgument(false, \"unknown event name\", \"event\", event);\n }\n // Normalize topics and sort TopicSets\n topics = topics.map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n const items = Array.from(new Set(t.map((t) => t.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t.toLowerCase();\n });\n const tag = topics.map((t) => {\n if (t == null) {\n return \"null\";\n }\n if (Array.isArray(t)) {\n return t.join(\"|\");\n }\n return t;\n }).join(\"&\");\n return { fragment, tag, topics };\n}\nasync function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n}\nasync function getSub(contract, operation, event) {\n // Make sure our runner can actually subscribe to events\n const provider = getProvider(contract.runner);\n assert(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = (addr ? addr : contract);\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n }\n catch (error) { }\n }\n // If fragment is null, we do not deconstruct the args to emit\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit(contract, event, args, (listener) => {\n return new ContractEventPayload(contract, listener, event, _foundFragment, log);\n });\n }\n else {\n emit(contract, event, [], (listener) => {\n return new ContractUnknownEventPayload(contract, listener, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n}\n// We use this to ensure one emit resolves before firing the next to\n// ensure correct ordering (note this cannot throw and just adds the\n// notice to the event queu using setTimeout).\nlet lastEmit = Promise.resolve();\nasync function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n }\n catch (error) { }\n return !once;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return (count > 0);\n}\nasync function emit(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n }\n catch (error) { }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n}\nconst passProperties = [\"then\"];\nexport class BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi, runner, _deployTx) {\n assertArgument(typeof (target) === \"string\" || isAddressable(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = Interface.from(abi);\n defineProperties(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n deployTx = new ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = new Map();\n // Resolve the target as the address\n if (typeof (target) === \"string\") {\n if (isHexString(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n }\n else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw makeError(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr) => {\n if (addr == null) {\n throw makeError(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr;\n return addr;\n });\n }\n }\n else {\n addrPromise = target.getAddress().then((addr) => {\n if (addr == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr;\n return addr;\n });\n }\n // Set our private values\n setInternal(this, { addrPromise, addr, deployTx, subs });\n // Add the event filters\n const filters = new Proxy({}, {\n get: (target, prop, receiver) => {\n // Pass important checks (like `then` for Promise) through\n if (typeof (prop) === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n }\n catch (error) {\n if (!isError(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return undefined;\n },\n has: (target, prop) => {\n // Pass important checks (like `then` for Promise) through\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target, prop);\n }\n return Reflect.has(target, prop) || this.interface.hasEvent(String(prop));\n }\n });\n defineProperties(this, { filters });\n defineProperties(this, {\n fallback: ((iface.receive || iface.fallback) ? (buildWrappedFallback(this)) : null)\n });\n // Return a Proxy that will respond to functions\n return new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof (prop) === \"symbol\" || prop in target || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n // Undefined properties should return undefined\n try {\n return target.getFunction(prop);\n }\n catch (error) {\n if (!isError(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return undefined;\n },\n has: (target, prop) => {\n if (typeof (prop) === \"symbol\" || prop in target || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target, prop);\n }\n return target.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() { return await getInternal(this).addrPromise; }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n assert(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n // We have the deployement transaction; just use that (throws if deployement fails)\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n // Check for code\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n // Make sure we can subscribe to a provider event\n const provider = getProvider(this.runner);\n assert(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code = await this.getDeployedCode();\n if (code != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n }\n catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof (key) !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof (key) !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n\n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n\n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = (addr ? addr : (await addrPromise));\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n }\n catch (error) { }\n }\n if (foundFragment) {\n try {\n return new EventLog(log, this.interface, foundFragment);\n }\n catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return new Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners } of subs.values()) {\n total += listeners.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners } of subs.values()) {\n result = result.concat(listeners.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);\n if (index >= 0) {\n sub.listeners.splice(index, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi) {\n class CustomContract extends BaseContract {\n constructor(address, runner = null) {\n super(address, abi, runner);\n }\n }\n return CustomContract;\n }\n ;\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi, runner);\n return contract;\n }\n}\nfunction _ContractBase() {\n return BaseContract;\n}\n/**\n * A [[BaseContract]] with no type guards on its methods or events.\n */\nexport class Contract extends _ContractBase() {\n}\n//# sourceMappingURL=contract.js.map","import { Interface } from \"../abi/index.js\";\nimport { getCreateAddress } from \"../address/index.js\";\nimport { concat, defineProperties, getBytes, hexlify, assert, assertArgument } from \"../utils/index.js\";\nimport { BaseContract, copyOverrides, resolveArgs } from \"./contract.js\";\n// A = Arguments to the constructor\n// I = Interface of deployed contracts\n/**\n * A **ContractFactory** is used to deploy a Contract to the blockchain.\n */\nexport class ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi, bytecode, runner) {\n const iface = Interface.from(abi);\n // Dereference Solidity bytecode objects and allow a missing `0x`-prefix\n if (bytecode instanceof Uint8Array) {\n bytecode = hexlify(getBytes(bytecode));\n }\n else {\n if (typeof (bytecode) === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = hexlify(getBytes(bytecode));\n }\n defineProperties(this, {\n bytecode, interface: iface, runner: (runner || null)\n });\n }\n attach(target) {\n return new BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await resolveArgs(this.runner, fragment.inputs, args);\n const data = concat([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n assert(this.runner && typeof (this.runner.sendTransaction) === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = getCreateAddress(sentTx);\n return new BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n assertArgument(output != null, \"bad compiler output\", \"output\", output);\n if (typeof (output) === \"string\") {\n output = JSON.parse(output);\n }\n const abi = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n }\n else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi, bytecode, runner);\n }\n}\n//# sourceMappingURL=factory.js.map","/**\n * ENS is a service which allows easy-to-remember names to map to\n * network addresses.\n *\n * @_section: api/providers/ens-resolver:ENS Resolver [about-ens-rsolver]\n */\nimport { getAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { dnsEncode, namehash } from \"../hash/index.js\";\nimport { hexlify, isHexString, toBeHex, defineProperties, encodeBase58, assert, assertArgument, isError, FetchRequest } from \"../utils/index.js\";\n// @TODO: This should use the fetch-data:ipfs gateway\n// Trim off the ipfs:// prefix and return the default gateway URL\nfunction getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n }\n else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n }\n else {\n assertArgument(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https:/\\/gateway.ipfs.io/ipfs/${link}`;\n}\n;\n;\n/**\n * A provider plugin super-class for processing multicoin address types.\n */\nexport class MulticoinProviderPlugin {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n defineProperties(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resovles to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resovles to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n}\nconst BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n/**\n * A **BasicMulticoinProviderPlugin** provides service for common\n * coin types, which do not require additional libraries to encode or\n * decode.\n */\nexport class BasicMulticoinProviderPlugin extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n}\nconst matcherIpfs = new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\");\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n/**\n * A connected object to a resolved ENS name resolver, which can be\n * used to query additional details.\n */\nexport class EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n defineProperties(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\",\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n }\n catch (error) {\n // Wildcard resolvers must understand supportsInterface\n // and return true.\n if (isError(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n // Let future attempts try again...\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n // The first parameters is always the nodehash\n params.unshift(namehash(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n assert(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n dnsEncode(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n }\n catch (error) {\n if (!isError(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n // No address\n if (result == null || result === ZeroAddress) {\n return null;\n }\n return result;\n }\n catch (error) {\n if (isError(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n // Try decoding its EVM canonical chain as an EVM chain address first\n if (coinType >= 0 && coinType < 0x80000000) {\n let ethCoinType = coinType + 0x80000000;\n const data = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if (isHexString(data, 20)) {\n return getAddress(data);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n // keccak256(\"addr(bytes32,uint256\")\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n // No address\n if (data == null || data === \"0x\") {\n return null;\n }\n // Compute the address\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n assert(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n // keccak256(\"contenthash()\")\n const data = await this.#fetch(\"contenthash(bytes32)\");\n // No contenthash\n if (data == null || data === \"0x\") {\n return null;\n }\n // IPFS (CID: 1, Type: 70=DAG-PB, 72=libp2p-key)\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = (ipfs[1] === \"e3010170\") ? \"ipfs\" : \"ipns\";\n const length = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length * 2) {\n return `${scheme}:/\\/${encodeBase58(\"0x\" + ipfs[2])}`;\n }\n }\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz:/\\/${swarm[1]}`;\n }\n assert(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (scheme === \"erc721\") ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n // The owner of this name\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: (match[2] || \"\") });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n // Check that this account owns the token\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n }\n else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n // Call the token contract for the metadata URL\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n // ERC-1155 allows a generic {id} in the URL\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", toBeHex(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n // Transform IPFS metadata links\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n // Get the token metadata\n let metadata = {};\n const response = await (new FetchRequest(metadataUrl)).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n }\n catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n }\n catch (error) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: hexlify(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n // Pull the image URL out\n let imageUrl = metadata.image;\n if (typeof (imageUrl) !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n // Allow\n }\n else {\n // Transform IPFS link to gateway\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n }\n catch (error) { }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n // No ENS...\n assert(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\", info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await EnsResolver.getEnsAddress(provider);\n try {\n const contract = new Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver(namehash(name), {\n enableCcipRead: true\n });\n if (addr === ZeroAddress) {\n return null;\n }\n return addr;\n }\n catch (error) {\n // ENS registry cannot throw errors on resolver(bytes32),\n // so probably a link error\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n // Optimization since the eth node cannot change and does\n // not have a wildcard resolver\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n // Check the current node for a resolver\n const addr = await EnsResolver.#getResolver(provider, currentName);\n // Found a resolver!\n if (addr != null) {\n const resolver = new EnsResolver(provider, addr, name);\n // Legacy resolver found, using EIP-2544 so it isn't safe to use\n if (currentName !== name && !(await resolver.supportsWildcard())) {\n return null;\n }\n return resolver;\n }\n // Get the parent node\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n}\n//# sourceMappingURL=ens-resolver.js.map","/**\n * @_ignore\n */\nimport { getAddress, getCreateAddress } from \"../address/index.js\";\nimport { Signature } from \"../crypto/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nimport { getBigInt, getNumber, hexlify, isHexString, zeroPadValue, assert, assertArgument } from \"../utils/index.js\";\nconst BN_0 = BigInt(0);\nexport function allowNull(format, nullValue) {\n return (function (value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n });\n}\nexport function arrayOf(format, allowNull) {\n return ((array) => {\n if (allowNull && array == null) {\n return null;\n }\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n return array.map((i) => format(i));\n });\n}\n// Requires an object which matches a fleet of other formatters\n// Any FormatFunc may return `undefined` to have the value omitted\n// from the result object. Calls preserve `this`.\nexport function object(format, altNames) {\n return ((value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== undefined) {\n result[key] = nv;\n }\n }\n catch (error) {\n const message = (error instanceof Error) ? error.message : \"not-an-error\";\n assert(false, `invalid value for value.${key} (${message})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n });\n}\nexport function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n assertArgument(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n}\nexport function formatData(value) {\n assertArgument(isHexString(value, true), \"invalid data\", \"value\", value);\n return value;\n}\nexport function formatHash(value) {\n assertArgument(isHexString(value, 32), \"invalid hash\", \"value\", value);\n return value;\n}\nexport function formatUint256(value) {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return zeroPadValue(value, 32);\n}\nconst _formatLog = object({\n address: getAddress,\n blockHash: formatHash,\n blockNumber: getNumber,\n data: formatData,\n index: getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: getNumber,\n}, {\n index: [\"logIndex\"]\n});\nexport function formatLog(value) {\n return _formatLog(value);\n}\nconst _formatBlock = object({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: getNumber,\n timestamp: getNumber,\n nonce: allowNull(formatData),\n difficulty: getBigInt,\n gasLimit: getBigInt,\n gasUsed: getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(getBigInt, null),\n excessBlobGas: allowNull(getBigInt, null),\n miner: allowNull(getAddress),\n extraData: formatData,\n baseFeePerGas: allowNull(getBigInt)\n});\nexport function formatBlock(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof (tx) === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n}\nconst _formatReceiptLog = object({\n transactionIndex: getNumber,\n blockNumber: getNumber,\n transactionHash: formatHash,\n address: getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: getNumber,\n blockHash: formatHash,\n}, {\n index: [\"logIndex\"]\n});\nexport function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n}\nconst _formatTransactionReceipt = object({\n to: allowNull(getAddress, null),\n from: allowNull(getAddress, null),\n contractAddress: allowNull(getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: getNumber,\n root: allowNull(hexlify),\n gasUsed: getBigInt,\n blobGasUsed: allowNull(getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: getBigInt,\n effectiveGasPrice: allowNull(getBigInt),\n blobGasPrice: allowNull(getBigInt, null),\n status: allowNull(getNumber),\n type: allowNull(getNumber, 0)\n}, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"],\n});\nexport function formatTransactionReceipt(value) {\n return _formatTransactionReceipt(value);\n}\nexport function formatTransactionResponse(value) {\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (value.to && getBigInt(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(getNumber, undefined),\n type: (value) => {\n if (value === \"0x\" || value == null) {\n return 0;\n }\n return getNumber(value);\n },\n accessList: allowNull(accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(getNumber, null),\n transactionIndex: allowNull(getNumber, null),\n from: getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(getBigInt),\n maxPriorityFeePerGas: allowNull(getBigInt),\n maxFeePerGas: allowNull(getBigInt),\n maxFeePerBlobGas: allowNull(getBigInt, null),\n gasLimit: getBigInt,\n to: allowNull(getAddress, null),\n value: getBigInt,\n nonce: getNumber,\n data: formatData,\n creates: allowNull(getAddress, null),\n chainId: allowNull(getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n // If to and creates are empty, populate the creates from the value\n if (result.to == null && result.creates == null) {\n result.creates = getCreateAddress(result);\n }\n // @TODO: Check fee data\n // Add an access list to supported transaction types\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n // Compute the signature\n if (value.signature) {\n result.signature = Signature.from(value.signature);\n }\n else {\n result.signature = Signature.from(value);\n }\n // Some backends omit ChainId on legacy transactions, but we can compute it\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n // @TODO: check chainID\n /*\n if (value.chainId != null) {\n let chainId = value.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = value.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = value.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n */\n // 0x0000... should actually be null\n if (result.blockHash && getBigInt(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n}\n//# sourceMappingURL=format.js.map","import { defineProperties } from \"../utils/properties.js\";\nimport { assertArgument } from \"../utils/index.js\";\nconst EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n/**\n * A **NetworkPlugin** provides additional functionality on a [[Network]].\n */\nexport class NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n defineProperties(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new NetworkPlugin(this.name);\n }\n}\n/**\n * A **GasCostPlugin** allows a network to provide alternative values when\n * computing the intrinsic gas required for a transaction.\n */\nexport class GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${(effectiveBlock || 0)}`);\n const props = { effectiveBlock };\n function set(name, nullish) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish;\n }\n assertArgument(typeof (value) === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21000);\n set(\"txCreate\", 32000);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n defineProperties(this, props);\n }\n clone() {\n return new GasCostPlugin(this.effectiveBlock, this);\n }\n}\n/**\n * An **EnsPlugin** allows a [[Network]] to specify the ENS Registry\n * Contract address and the target network to use when using that\n * contract.\n *\n * Various testnets have their own instance of the contract to use, but\n * in general, the mainnet instance supports multi-chain addresses and\n * should be used.\n */\nexport class EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n defineProperties(this, {\n address: (address || EnsAddress),\n targetNetwork: ((targetNetwork == null) ? 1 : targetNetwork)\n });\n }\n clone() {\n return new EnsPlugin(this.address, this.targetNetwork);\n }\n}\n/**\n * A **FeeDataNetworkPlugin** allows a network to provide and alternate\n * means to specify its fee data.\n *\n * For example, a network which does not support [[link-eip-1559]] may\n * choose to use a Gas Station site to approximate the gas price.\n */\nexport class FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n}\nexport class FetchUrlFeeDataNetworkPlugin extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() { return this.#url; }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() { return this.#processFunc; }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() { return this; }\n}\n/*\nexport class CustomBlockNetworkPlugin extends NetworkPlugin {\n readonly #blockFunc: (provider: Provider, block: BlockParams) => Block;\n readonly #blockWithTxsFunc: (provider: Provider, block: BlockParams) => Block;\n\n constructor(blockFunc: (provider: Provider, block: BlockParams) => Block, blockWithTxsFunc: (provider: Provider, block: BlockParams) => Block) {\n super(\"org.ethers.network-plugins.custom-block\");\n this.#blockFunc = blockFunc;\n this.#blockWithTxsFunc = blockWithTxsFunc;\n }\n\n async getBlock(provider: Provider, block: BlockParams): Promise> {\n return await this.#blockFunc(provider, block);\n }\n\n async getBlockions(provider: Provider, block: BlockParams): Promise> {\n return await this.#blockWithTxsFunc(provider, block);\n }\n\n clone(): CustomBlockNetworkPlugin {\n return new CustomBlockNetworkPlugin(this.#blockFunc, this.#blockWithTxsFunc);\n }\n}\n*/\n//# sourceMappingURL=plugins-network.js.map","/**\n * A **Network** encapsulates the various properties required to\n * interact with a specific chain.\n *\n * @_subsection: api/providers:Networks [networks]\n */\nimport { accessListify } from \"../transaction/index.js\";\nimport { getBigInt, assert, assertArgument } from \"../utils/index.js\";\nimport { EnsPlugin, FetchUrlFeeDataNetworkPlugin, GasCostPlugin } from \"./plugins-network.js\";\n/* * * *\n// Networks which operation against an L2 can use this plugin to\n// specify how to access L1, for the purpose of resolving ENS,\n// for example.\nexport class LayerOneConnectionPlugin extends NetworkPlugin {\n readonly provider!: Provider;\n// @TODO: Rename to ChainAccess and allow for connecting to any chain\n constructor(provider: Provider) {\n super(\"org.ethers.plugins.layer-one-connection\");\n defineProperties(this, { provider });\n }\n\n clone(): LayerOneConnectionPlugin {\n return new LayerOneConnectionPlugin(this.provider);\n }\n}\n*/\nconst Networks = new Map();\n/**\n * A **Network** provides access to a chain's properties and allows\n * for plug-ins to extend functionality.\n */\nexport class Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = getBigInt(chainId);\n this.#plugins = new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() { return this.#name; }\n set name(value) { this.#name = value; }\n /**\n * The network chain ID.\n */\n get chainId() { return this.#chainId; }\n set chainId(value) { this.#chainId = getBigInt(value, \"chainId\"); }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof (other) === \"string\") {\n try {\n return (this.chainId === getBigInt(other));\n }\n catch (error) { }\n return (this.name === other);\n }\n if (typeof (other) === \"number\" || typeof (other) === \"bigint\") {\n try {\n return (this.chainId === getBigInt(other));\n }\n catch (error) { }\n return false;\n }\n if (typeof (other) === \"object\") {\n if (other.chainId != null) {\n try {\n return (this.chainId === getBigInt(other.chainId));\n }\n catch (error) { }\n return false;\n }\n if (other.name != null) {\n return (this.name === other.name);\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return (this.#plugins.get(name)) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return (this.plugins.filter((p) => (p.name.split(\"#\")[0] === basename)));\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone = new Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone.attachPlugin(plugin.clone());\n });\n return clone;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || (new GasCostPlugin());\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i = 2; i < tx.data.length; i += 2) {\n if (tx.data.substring(i, i + 2) === \"00\") {\n gas += costs.txDataZero;\n }\n else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = accessListify(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n // Default network\n if (network == null) {\n return Network.from(\"mainnet\");\n }\n // Canonical name or chain ID\n if (typeof (network) === \"number\") {\n network = BigInt(network);\n }\n if (typeof (network) === \"string\" || typeof (network) === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof (network) === \"bigint\") {\n return new Network(\"unknown\", network);\n }\n assertArgument(false, \"unknown network\", \"network\", network);\n }\n // Clonable with network-like abilities\n if (typeof (network.clone) === \"function\") {\n const clone = network.clone();\n //if (typeof(network.name) !== \"string\" || typeof(network.chainId) !== \"number\") {\n //}\n return clone;\n }\n // Networkish\n if (typeof (network) === \"object\") {\n assertArgument(typeof (network.name) === \"string\" && typeof (network.chainId) === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom = new Network((network.name), (network.chainId));\n if (network.ensAddress || network.ensNetwork != null) {\n custom.attachPlugin(new EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n //if ((network).layerOneConnection) {\n // custom.attachPlugin(new LayerOneConnectionPlugin((network).layerOneConnection));\n //}\n return custom;\n }\n assertArgument(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof (nameOrChainId) === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n assertArgument(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n}\n// We don't want to bring in formatUnits because it is backed by\n// FixedNumber and we want to keep Networks tiny. The values\n// included by the Gas Stations are also IEEE 754 with lots of\n// rounding issues and exceed the strict checks formatUnits has.\nfunction parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n // Break into [ whole, fraction ]\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n // More than 1 decimal point or too many fractional positions\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n // Pad the fraction to 9 decimalplaces\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n // Too many decimals and some non-zero ending, take the ceiling\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n}\n// Used by Polygon to use a gas station for fee data\nfunction getGasStationPlugin(url) {\n return new FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n // Prevent Cloudflare from blocking our request in node.js\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(), fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9),\n };\n return feeData;\n }\n catch (error) {\n assert(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n}\n// See: https://chainlist.org\nlet injected = false;\nfunction injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n /// Register popular Ethereum networks\n function registerEth(name, chainId, options) {\n const func = function () {\n const network = new Network(name, chainId);\n // We use 0 to disable ENS\n if (options.ensNetwork != null) {\n network.attachPlugin(new EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n // Register the network by name and chain ID\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name) => {\n Network.register(name, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17000, { ensNetwork: 17000 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1,\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https:/\\/gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https:/\\/gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n}\n//# sourceMappingURL=network.js.map","import { assert, isHexString } from \"../utils/index.js\";\nfunction copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n/**\n * Return the polling subscriber for common events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if (isHexString(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n assert(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\", info: { event }\n });\n}\n// @TODO: refactor this\n/**\n * A **PollingBlockSubscriber** polls at a regular interval for a change\n * in the block number.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingBlockSubscriber {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4000;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() { return this.#interval; }\n set pollingInterval(value) { this.#interval = value; }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n // Bootstrap poll to setup our initial block number\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n // @TODO: Put a cap on the maximum number of events per loop?\n if (blockNumber !== this.#blockNumber) {\n for (let b = this.#blockNumber + 1; b <= blockNumber; b++) {\n // We have been stopped\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b);\n }\n this.#blockNumber = blockNumber;\n }\n }\n catch (error) {\n // @TODO: Minor bump, add an \"error\" event to let subscribers\n // know things went awry.\n //console.log(error);\n }\n // We have been stopped\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n}\n/**\n * An **OnBlockSubscriber** can be sub-classed, with a [[_poll]]\n * implmentation which will be called on every new block.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class OnBlockSubscriber {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) { this.stop(); }\n resume() { this.start(); }\n}\nexport class PollingBlockTagSubscriber extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n }\n else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n}\n/**\n * @_ignore:\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingOrphanSubscriber extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n}\n/**\n * A **PollingTransactionSubscriber** will poll for a given transaction\n * hash for its receipt.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingTransactionSubscriber extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash) {\n super(provider);\n this.#hash = hash;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n}\n/**\n * A **PollingEventSubscriber** will poll for a given filter for its logs.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingEventSubscriber {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n // The initial block hasn't been determined yet\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n // No logs could just mean the node has not indexed them yet,\n // so we keep a sliding window of 60 blocks to keep scanning\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n // Only advance the block number when logs were found to\n // account for networks (like BNB and Polygon) which may\n // sacrifice event consistency for block event speed\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n}\n//# sourceMappingURL=subscriber-polling.js.map","/**\n * The available providers should suffice for most developers purposes,\n * but the [[AbstractProvider]] class has many features which enable\n * sub-classing it for specific purposes.\n *\n * @_section: api/providers/abstract-provider: Subclassing Provider [abstract-provider]\n */\n// @TODO\n// Event coalescence\n// When we register an event with an async value (e.g. address is a Signer\n// or ENS name), we need to add it immeidately for the Event API, but also\n// need time to resolve the address. Upon resolving the address, we need to\n// migrate the listener to the static event. We also need to maintain a map\n// of Signer/ENS name to address so we can sync respond to listenerCount.\nimport { getAddress, resolveAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { namehash } from \"../hash/index.js\";\nimport { Transaction } from \"../transaction/index.js\";\nimport { concat, dataLength, dataSlice, hexlify, isHexString, getBigInt, getBytes, getNumber, isCallException, isError, makeError, assert, assertArgument, FetchRequest, toBeArray, toQuantity, defineProperties, EventPayload, resolveProperties, toUtf8String } from \"../utils/index.js\";\nimport { EnsResolver } from \"./ens-resolver.js\";\nimport { formatBlock, formatLog, formatTransactionReceipt, formatTransactionResponse } from \"./format.js\";\nimport { Network } from \"./network.js\";\nimport { copyRequest, Block, FeeData, Log, TransactionReceipt, TransactionResponse } from \"./provider.js\";\nimport { PollingBlockSubscriber, PollingBlockTagSubscriber, PollingEventSubscriber, PollingOrphanSubscriber, PollingTransactionSubscriber } from \"./subscriber-polling.js\";\n// Constants\nconst BN_2 = BigInt(2);\nconst MAX_CCIP_REDIRECTS = 10;\nfunction isPromise(value) {\n return (value && typeof (value.then) === \"function\");\n}\nfunction getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k, v) => {\n if (v == null) {\n return \"null\";\n }\n if (typeof (v) === \"bigint\") {\n return `bigint:${v.toString()}`;\n }\n if (typeof (v) === \"string\") {\n return v.toLowerCase();\n }\n // Sort object keys\n if (typeof (v) === \"object\" && !Array.isArray(v)) {\n const keys = Object.keys(v);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v[key];\n return accum;\n }, {});\n }\n return v;\n });\n}\n/**\n * An **UnmanagedSubscriber** is useful for events which do not require\n * any additional management, such as ``\"debug\"`` which only requires\n * emit in synchronous event loop triggered calls.\n */\nexport class UnmanagedSubscriber {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) { defineProperties(this, { name }); }\n start() { }\n stop() { }\n pause(dropWhilePaused) { }\n resume() { }\n}\nfunction copy(value) {\n return JSON.parse(JSON.stringify(value));\n}\nfunction concisify(items) {\n items = Array.from((new Set(items)).values());\n items.sort();\n return items;\n}\nasync function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n // Normalize topic array info an EventFilter\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof (_event) === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if (isHexString(_event, 32)) {\n const hash = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash }), hash };\n }\n if (_event.orphan) {\n const event = _event;\n // @TODO: Should lowercase and whatnot things here instead of copy...\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if ((_event.address || _event.topics)) {\n const event = _event;\n const filter = {\n topics: ((event.topics || []).map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n return concisify(t.map((t) => t.toLowerCase()));\n }\n return t.toLowerCase();\n }))\n };\n if (event.address) {\n const addresses = [];\n const promises = [];\n const addAddress = (addr) => {\n if (isHexString(addr)) {\n addresses.push(addr);\n }\n else {\n promises.push((async () => {\n addresses.push(await resolveAddress(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n }\n else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses.map((a) => a.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n assertArgument(false, \"unknown ProviderEvent\", \"event\", _event);\n}\nfunction getTime() { return (new Date()).getTime(); }\nconst defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4000\n};\n/**\n * An **AbstractProvider** provides a base class for other sub-classes to\n * implement the [[Provider]] API by normalizing input arguments and\n * formatting output results as well as tracking events for consistent\n * behaviour on an eventually-consistent network.\n */\nexport class AbstractProvider {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n }\n else if (_network) {\n const network = Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => { this.emit(\"network\", network, null); }, 0);\n }\n else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = new Map();\n this.#subs = new Map();\n this.#plugins = new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() { return this.#options.pollingInterval; }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() { return this; }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return (this.#plugins.get(name)) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() { return this.#disableCcipRead; }\n set disableCcipRead(value) { this.#disableCcipRead = !!value; }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n // Caching disabled\n if (timeout < 0) {\n return await this._perform(req);\n }\n // Create a tag\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n // URL expansion\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n // If no {data} is present, use POST; otherwise GET\n //const json: string | null = (url.indexOf(\"{data}\") >= 0) ? null: JSON.stringify({ data, sender });\n //const result = await fetchJson({ url: href, errorPassThrough: true }, json, (value, response) => {\n // value.status = response.statusCode;\n // return value;\n //});\n const request = new FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i, urls });\n let errorMessage = \"unknown error\";\n const resp = await request.send();\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n }\n catch (error) { }\n // 4xx indicates the result is not present; stop\n assert(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n // 5xx indicates server issue; try the next url\n errorMessages.push(errorMessage);\n }\n assert(false, `error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx, info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new Block(formatBlock(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new Log(formatLog(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new TransactionReceipt(formatTransactionReceipt(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new TransactionResponse(formatTransactionResponse(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n assert(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n assert(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = getNumber(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return resolveAddress(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if (isHexString(blockTag)) {\n if (isHexString(blockTag, 32)) {\n return blockTag;\n }\n return toQuantity(blockTag);\n }\n if (typeof (blockTag) === \"bigint\") {\n blockTag = getNumber(blockTag, \"blockTag\");\n }\n if (typeof (blockTag) === \"number\") {\n if (blockTag >= 0) {\n return toQuantity(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return toQuantity(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b) => toQuantity(b + blockTag));\n }\n assertArgument(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n // Create a canonical representation of the topics\n const topics = (filter.topics || []).map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n return concisify(t.map((t) => t.toLowerCase()));\n }\n return t.toLowerCase();\n });\n const blockHash = (\"blockHash\" in filter) ? filter.blockHash : undefined;\n const resolve = (_address, fromBlock, toBlock) => {\n let address = undefined;\n switch (_address.length) {\n case 0: break;\n case 1:\n address = _address[0];\n break;\n default:\n _address.sort();\n address = _address;\n }\n if (blockHash) {\n if (fromBlock != null || toBlock != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter = {};\n if (address) {\n filter.address = address;\n }\n if (topics.length) {\n filter.topics = topics;\n }\n if (fromBlock) {\n filter.fromBlock = fromBlock;\n }\n if (toBlock) {\n filter.toBlock = toBlock;\n }\n if (blockHash) {\n filter.blockHash = blockHash;\n }\n return filter;\n };\n // Addresses could be async (ENS names or Addressables)\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n }\n else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = undefined;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = undefined;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a) => (typeof (a) !== \"string\")).length ||\n (fromBlock != null && typeof (fromBlock) !== \"string\") ||\n (toBlock != null && typeof (toBlock) !== \"string\")) {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resovles to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = copyRequest(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = resolveAddress(request[key], this);\n if (isPromise(addr)) {\n promises.push((async function () { request[key] = await addr; })());\n }\n else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push((async function () { request.blockTag = await blockTag; })());\n }\n else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return (async function () {\n await Promise.all(promises);\n return request;\n })();\n }\n return request;\n }\n async getNetwork() {\n // No explicit network was set and this is our first time\n if (this.#networkPromise == null) {\n // Detect the current network (shared with all calls)\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n }\n catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork() // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n // The \"any\" network can change, so notify listeners\n this.emit(\"network\", actual, expected);\n // Update the network if something else hasn't already changed it\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n }\n else {\n // Otherwise, we do not allow changes to the underlying network\n assert(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await resolveProperties({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: ((async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return getBigInt(value, \"%response\");\n }\n catch (error) { }\n return null;\n })()),\n priorityFee: ((async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return getBigInt(value, \"%response\");\n }\n catch (error) { }\n return null;\n })())\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n // These are the recommended EIP-1559 heuristics for fee data\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = (priorityFee != null) ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = (block.baseFeePerGas * BN_2) + maxPriorityFeePerGas;\n }\n return new FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n // Check for a FeeDataNetWorkPlugin\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return getBigInt(await this.#perform({\n method: \"estimateGas\", transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n assert(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n // This came in as a PerformActionTransaction, so to/from are safe; we can cast\n const transaction = copyRequest(tx);\n try {\n return hexlify(await this._perform({ method: \"call\", transaction, blockTag }));\n }\n catch (error) {\n // CCIP Read OffchainLookup\n if (!this.disableCcipRead && isCallException(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && dataSlice(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await resolveAddress(transaction.to, this);\n // Parse the CCIP Read Arguments\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup(dataSlice(error.data, 4));\n }\n catch (error) {\n assert(false, error.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\", transaction, info: { data }\n });\n }\n // Check the sender of the OffchainLookup matches the transaction\n assert(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction: transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n assert(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\", transaction, info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx = {\n to: txSender,\n data: concat([ccipArgs.selector, encodeBytes([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx });\n try {\n const result = await this.#call(tx, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx), result });\n return result;\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx), error });\n throw error;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await resolveProperties({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await resolveProperties({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof (address) !== \"string\" || typeof (blockTag) !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return getBigInt(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return getNumber(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return hexlify(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = getBigInt(_position, \"position\");\n return hexlify(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash, network } = await resolveProperties({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = Transaction.from(signedTx);\n if (tx.hash !== hash) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n // @TODO: Add CustomBlockPlugin check\n if (isHexString(block, 32)) {\n return await this.#perform({\n method: \"getBlock\", blockHash: block, includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof (blockTag) !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\", blockTag, includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash })\n });\n if (params == null) {\n return null;\n }\n // Some backends did not backfill the effectiveGasPrice into old transactions\n // in the receipt, so we look it up manually and inject it.\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash) {\n const { result } = await resolveProperties({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash })\n });\n if (result == null) {\n return null;\n }\n return hexlify(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p) => this._wrapLog(p, network));\n }\n // ENS\n _getProvider(chainId) {\n assert(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = getAddress(address);\n const node = namehash(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await EnsResolver.getEnsAddress(this);\n const ensContract = new Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === ZeroAddress) {\n return null;\n }\n const resolverContract = new Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n // Failed forward resolution\n const check = await this.resolveName(name);\n if (check !== address) {\n return null;\n }\n return name;\n }\n catch (error) {\n // No data was returned from the resolver\n if (isError(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n // Something reerted\n if (isError(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash, _confirms, timeout) {\n const confirms = (_confirms != null) ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = (async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n //this.off(\"block\", listener);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n }\n catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n });\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject(makeError(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n assert(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n }\n else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n // This is a log that is removing an existing log; we actually want\n // to emit an orphan event for the removed log\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n // Prevent tampering with our tag in any subclass' _getSubscriber\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = new WeakMap();\n const nameMap = new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n // If there is not subscription or if a recent emit removed\n // the last of them (which also deleted the sub) do nothing\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once }) => {\n const payload = new EventPayload(this, (once ? null : listener), event);\n try {\n listener.call(this, ...args, payload);\n }\n catch (error) { }\n return !once;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return (count > 0);\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners } of this.#subs.values()) {\n total += listeners.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners } of this.#subs.values()) {\n result = result.concat(listeners.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);\n if (index >= 0) {\n sub.listeners.splice(index, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n // Stop all listeners\n this.removeAllListeners();\n // Shut down all tiemrs\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() { return (this.#pausedState != null); }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n }\n else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n assert(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s) => s.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n // Clear the timer\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n // Remaining time needed for when we become unpaused\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s) => s.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n // Remaining time when we were paused\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n // Start time (in cause paused, so we con compute remaininf time)\n timer.time = getTime();\n // Start the timer\n setTimeout(timer.func, timeout);\n }\n }\n}\nfunction _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return toUtf8String(bytes);\n }\n }\n catch (error) { }\n return null;\n}\nfunction _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = getNumber(dataSlice(result, start, start + 32));\n const length = getNumber(dataSlice(result, offset, offset + 32));\n return dataSlice(result, offset + 32, offset + 32 + length);\n }\n catch (error) { }\n return null;\n}\nfunction numPad(value) {\n const result = toBeArray(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n}\nfunction bytesPad(value) {\n if ((value.length % 32) === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n}\nconst empty = new Uint8Array([]);\n// ABI Encodes a series of (bytes, bytes, ...)\nfunction encodeBytes(datas) {\n const result = [];\n let byteCount = 0;\n // Add place-holders for pointers as we add items\n for (let i = 0; i < datas.length; i++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i = 0; i < datas.length; i++) {\n const data = getBytes(datas[i]);\n // Update the bytes offset\n result[i] = numPad(byteCount);\n // The length and padded value of data\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return concat(result);\n}\nconst zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\nfunction parseOffchainLookup(data) {\n const result = {\n sender: \"\", urls: [], calldata: \"\", selector: \"\", extraData: \"\", errorArgs: []\n };\n assert(dataLength(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = dataSlice(data, 0, 32);\n assert(dataSlice(sender, 0, 12) === dataSlice(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = dataSlice(sender, 12);\n // Read the URLs from the response\n try {\n const urls = [];\n const urlsOffset = getNumber(dataSlice(data, 32, 64));\n const urlsLength = getNumber(dataSlice(data, urlsOffset, urlsOffset + 32));\n const urlsData = dataSlice(data, urlsOffset + 32);\n for (let u = 0; u < urlsLength; u++) {\n const url = _parseString(urlsData, u * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n // Get the CCIP calldata to forward\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n // Get the callbackSelector (bytes4)\n assert(dataSlice(data, 100, 128) === dataSlice(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = dataSlice(data, 96, 100);\n // Get the extra data to send back to the contract as context\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k) => result[k]);\n return result;\n}\n//# sourceMappingURL=abstract-provider.js.map","/**\n * Generally the [[Wallet]] and [[JsonRpcSigner]] and their sub-classes\n * are sufficent for most developers, but this is provided to\n * fascilitate more complex Signers.\n *\n * @_section: api/providers/abstract-signer: Subclassing Signer [abstract-signer]\n */\nimport { resolveAddress } from \"../address/index.js\";\nimport { Transaction } from \"../transaction/index.js\";\nimport { defineProperties, getBigInt, resolveProperties, assert, assertArgument } from \"../utils/index.js\";\nimport { copyRequest } from \"./provider.js\";\nfunction checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n assert(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n}\nasync function populate(signer, tx) {\n let pop = copyRequest(tx);\n if (pop.to != null) {\n pop.to = resolveAddress(pop.to, signer);\n }\n if (pop.from != null) {\n const from = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n resolveAddress(from, signer)\n ]).then(([address, from]) => {\n assertArgument(address.toLowerCase() === from.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from);\n return address;\n });\n }\n else {\n pop.from = signer.getAddress();\n }\n return await resolveProperties(pop);\n}\n/**\n * An **AbstractSigner** includes most of teh functionality required\n * to get a [[Signer]] working as expected, but requires a few\n * Signer-specific methods be overridden.\n *\n */\nexport class AbstractSigner {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n defineProperties(this, { provider: (provider || null) });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n // Populate the chain ID\n const network = await (this.provider).getNetwork();\n if (pop.chainId != null) {\n const chainId = getBigInt(pop.chainId);\n assertArgument(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n }\n else {\n pop.chainId = network.chainId;\n }\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null);\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n assertArgument(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n }\n else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n assertArgument(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n pop.type = 2;\n }\n else if (pop.type === 0 || pop.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n // We need to get fee data to determine things\n const feeData = await provider.getFeeData();\n assert(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n // Populate missing gasPrice\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n }\n else {\n // We need to get fee data to determine things\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n // We need to auto-detect the intended type of this transaction...\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n // Upgrade transaction from null to eip-1559\n pop.type = 2;\n if (pop.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n }\n else {\n // Populate missing fee data\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n // ...but they are trying to use EIP-1559 properties\n assert(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n // Populate missing fee data\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n // Explicitly set untyped transaction to legacy\n // @TODO: Maybe this shold allow type 1?\n pop.type = 0;\n }\n else {\n // getFeeData has failed us.\n assert(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n }\n else if (pop.type === 2) {\n // Explicitly using EIP-1559\n // Populate missing fee data\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n //@TOOD: Don't await all over the place; save them up for\n // the end for better batching\n return await resolveProperties(pop);\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n}\n/**\n * A **VoidSigner** is a class deisgned to allow an address to be used\n * in any API which accepts a Signer, but for which there are no\n * credentials available to perform any actual signing.\n *\n * This for example allow impersonating an account for the purpose of\n * static calls or estimating gas, but does not allow sending transactions.\n */\nexport class VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n defineProperties(this, { address });\n }\n async getAddress() { return this.address; }\n connect(provider) {\n return new VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n assert(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain, types, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n}\n//# sourceMappingURL=abstract-signer.js.map","/**\n * There are many awesome community services that provide Ethereum\n * nodes both for developers just starting out and for large-scale\n * communities.\n *\n * @_section: api/providers/thirdparty: Community Providers [thirdparty]\n */\n// Show the throttle message only once per service\nconst shown = new Set();\n/**\n * Displays a warning in tht console when the community resource is\n * being used too heavily by the app, recommending the developer\n * acquire their own credentials instead of using the community\n * credentials.\n *\n * The notification will only occur once per service.\n */\nexport function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n}\n//# sourceMappingURL=community.js.map","import { isError } from \"../utils/index.js\";\nimport { PollingEventSubscriber } from \"./subscriber-polling.js\";\nfunction copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n/**\n * Some backends support subscribing to events using a Filter ID.\n *\n * When subscribing with this technique, the node issues a unique\n * //Filter ID//. At this point the node dedicates resources to\n * the filter, so that periodic calls to follow up on the //Filter ID//\n * will receive any events since the last call.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdSubscriber {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n // Subscribe if necessary\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n // Get the Filter ID\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n }\n catch (error) {\n if (!isError(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n // The backend does not support Filter ID; downgrade to\n // polling\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n }\n catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() { this.start(); }\n}\n/**\n * A **FilterIdSubscriber** for receiving contract events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdEventSubscriber extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n}\n/**\n * A **FilterIdSubscriber** for receiving pending transactions events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdPendingSubscriber extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n}\n//# sourceMappingURL=subscriber-filterid.js.map","/**\n * One of the most common ways to interact with the blockchain is\n * by a node running a JSON-RPC interface which can be connected to,\n * based on the transport, using:\n *\n * - HTTP or HTTPS - [[JsonRpcProvider]]\n * - WebSocket - [[WebSocketProvider]]\n * - IPC - [[IpcSocketProvider]]\n *\n * @_section: api/providers/jsonrpc:JSON-RPC Provider [about-jsonrpcProvider]\n */\n// @TODO:\n// - Add the batching API\n// https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/ethereum/eth1.0-apis/assembled-spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:splitView%5D=true&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false\nimport { AbiCoder } from \"../abi/index.js\";\nimport { getAddress, resolveAddress } from \"../address/index.js\";\nimport { TypedDataEncoder } from \"../hash/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nimport { defineProperties, getBigInt, hexlify, isHexString, toQuantity, toUtf8Bytes, isError, makeError, assert, assertArgument, FetchRequest, resolveProperties } from \"../utils/index.js\";\nimport { AbstractProvider, UnmanagedSubscriber } from \"./abstract-provider.js\";\nimport { AbstractSigner } from \"./abstract-signer.js\";\nimport { Network } from \"./network.js\";\nimport { FilterIdEventSubscriber, FilterIdPendingSubscriber } from \"./subscriber-filterid.js\";\nimport { PollingEventSubscriber } from \"./subscriber-polling.js\";\nconst Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n//const Methods = \"getAddress,then\".split(/,/g);\nfunction deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof (value)) >= 0) {\n return value;\n }\n // Keep any Addressable\n if (typeof (value.getAddress) === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return (value.map(deepCopy));\n }\n if (typeof (value) === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof (value)})`);\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(resolve, duration); });\n}\nfunction getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n}\nfunction isPollable(value) {\n return (value && typeof (value.pollingInterval) === \"number\");\n}\nconst defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: (1 << 20),\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4000\n};\n// @TODO: Unchecked Signers\nexport class JsonRpcSigner extends AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = getAddress(address);\n defineProperties(this, { address });\n }\n connect(provider) {\n assert(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n // Make sure the from matches the sender\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from = await resolveAddress(_from, this.provider);\n assertArgument(from != null && from.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from;\n })());\n }\n else {\n tx.from = this.address;\n }\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n // The address may be an ENS name or Addressable\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await resolveAddress(_to, this.provider);\n })());\n }\n // Wait until all of our properties are filled in\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider.getBlockNumber();\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(tx);\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await (new Promise((resolve, reject) => {\n const timeouts = [1000, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n // Try getting the transaction\n const tx = await this.provider.getTransaction(hash);\n if (tx != null) {\n resolve(tx.replaceableTransaction(blockNumber));\n return;\n }\n }\n catch (error) {\n // If we were cancelled: stop polling.\n // If the data is bad: the node returns bad transactions\n // If the network changed: calling again will also fail\n // If unsupported: likely destroyed\n if (isError(error, \"CANCELLED\") || isError(error, \"BAD_DATA\") ||\n isError(error, \"NETWORK_ERROR\" || isError(error, \"UNSUPPORTED_OPERATION\"))) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash;\n reject(error);\n return;\n }\n // Stop-gap for misbehaving backends; see #4513\n if (isError(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n // Notify anyone that cares; but we will try again, since\n // it is likely an intermittent service error\n this.provider.emit(\"error\", makeError(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n // Wait another 4 seconds\n this.provider._setTimeout(() => { checkTx(); }, timeouts.pop() || 4000);\n };\n checkTx();\n }));\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n // Make sure the from matches the sender\n if (tx.from) {\n const from = await resolveAddress(tx.from, this.provider);\n assertArgument(from != null && from.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from;\n }\n else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message = ((typeof (_message) === \"string\") ? toUtf8Bytes(_message) : _message);\n return await this.provider.send(\"personal_sign\", [\n hexlify(message), this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain, types, _value) {\n const value = deepCopy(_value);\n // Populate any ENS names (in-place)\n const populated = await TypedDataEncoder.resolveNames(domain, types, value, async (value) => {\n const address = await resolveAddress(value);\n assertArgument(address != null, \"TypedData does not support null address\", \"value\", value);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(), password, null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message = ((typeof (_message) === \"string\") ? toUtf8Bytes(_message) : _message);\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(), hexlify(message)\n ]);\n }\n}\n/**\n * The JsonRpcApiProvider is an abstract class and **MUST** be\n * sub-classed.\n *\n * It provides the base for all JSON-RPC-based Provider interaction.\n *\n * Sub-classing Notes:\n * - a sub-class MUST override _send\n * - a sub-class MUST call the `_start()` method once connected\n */\nexport class JsonRpcApiProvider extends AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n // If we aren't using batching, no harm in sending it immediately\n const stallTime = (this._getOption(\"batchMaxCount\") === 1) ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n // Create payload batches that satisfy our batch constraints\n const batch = [(payloads.shift())];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push((payloads.shift()));\n const bytes = JSON.stringify(batch.map((p) => p.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift((batch.pop()));\n break;\n }\n }\n // Process the result to each payload\n (async () => {\n const payload = ((batch.length === 1) ? batch[0].payload : batch.map((p) => p.payload));\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n // Process results in batch order\n for (const { resolve, reject, payload } of batch) {\n if (this.destroyed) {\n reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n continue;\n }\n // Find the matching result\n const resp = result.filter((r) => (r.id === payload.id))[0];\n // No result; the node failed us in unexpected ways\n if (resp == null) {\n const error = makeError(\"missing response for request\", \"BAD_DATA\", {\n value: result, info: { payload }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n // The response is an error\n if (\"error\" in resp) {\n reject(this.getRpcError(payload, resp));\n continue;\n }\n // All good; send the result\n resolve(resp.result);\n }\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n // @TODO: augment the error with the payload\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof (staticNetwork) === \"boolean\") {\n assertArgument(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = Network.from(network);\n }\n }\n else if (staticNetwork) {\n // Make sure any static network is compatbile with the provided netwrok\n assertArgument(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n assert(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && getBigInt(tx.type)) {\n // If there are no EIP-1559 properties, it might be non-EIP-a559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: undefined })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n }\n else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n // If we are ready, use ``send``, which enabled requests to be batched\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = Network.from(getBigInt(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n }\n catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n // We are not ready yet; use the primitive _send\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++, method: \"eth_chainId\", params: [], jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n }\n catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return Network.from(getBigInt(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n // Bootstrap the network\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n }\n catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", makeError(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1000);\n }\n }\n // Start dispatching requests\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n // Pending Filters aren't availble via polling\n if (sub.type === \"pending\") {\n return new FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new PollingEventSubscriber(this, sub.filter);\n }\n return new FilterIdEventSubscriber(this, sub.filter);\n }\n // Orphaned Logs are handled automatically, by the filter, since\n // logs with removed are emitted by it\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() { return this.#notReady == null; }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n // JSON-RPC now requires numeric values to be \"quantity\" values\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = toQuantity(getBigInt(tx[key], `tx.${key}`));\n });\n // Make sure addresses and data are lowercase\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = hexlify(tx[key]);\n });\n // Normalize the access list object\n if (tx.accessList) {\n result[\"accessList\"] = accessListify(tx.accessList);\n }\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n (\"0x\" + req.position.toString(16)),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n }\n else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n }\n else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return makeError(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: (payload.params[0]),\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e = AbiCoder.getBuiltinCallException((method === \"eth_call\") ? \"call\" : \"estimateGas\", (payload.params[0]), (result ? result.data : null));\n e.info = { error, payload };\n return e;\n }\n // Only estimateGas and call can return arbitrary contract-defined text, so now we\n // we can process text safely.\n const message = JSON.stringify(spelunkMessage(error));\n if (typeof (error.message) === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\",\n };\n return makeError(`user rejected action`, \"ACTION_REJECTED\", {\n action: (actionMap[method] || \"unknown\"),\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = (payload.params[0]);\n if (message.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return makeError(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction, info: { error }\n });\n }\n if (message.match(/nonce/i) && message.match(/too low/i)) {\n return makeError(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction/i) && message.match(/underpriced/i)) {\n return makeError(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message.match(/only replay-protected/i)) {\n return makeError(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method, info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return makeError(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method, info: { error, payload }\n });\n }\n return makeError(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n // @TODO: cache chainId?? purge on switch_networks\n // We have been destroyed; no operations are supported anymore\n if (this.destroyed) {\n return Promise.reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve, reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n // If there is not a pending drainTimer, set one\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n // Account index\n if (typeof (address) === \"number\") {\n const accounts = (await accountsPromise);\n if (address >= accounts.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts[address]);\n }\n const { accounts } = await resolveProperties({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n // Account address\n address = getAddress(address);\n for (const account of accounts) {\n if (getAddress(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a) => new JsonRpcSigner(this, a));\n }\n destroy() {\n // Stop processing requests\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n // Cancel all pending requests\n for (const { payload, reject } of this.#payloads) {\n reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n // Parent clean-up\n super.destroy();\n }\n}\n// @TODO: remove this in v7, it is not exported because this functionality\n// is exposed in the JsonRpcApiProvider by setting polling to true. It should\n// be safe to remove regardless, because it isn't reachable, but just in case.\n/**\n * @_ignore:\n */\nexport class JsonRpcApiPollingProvider extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n this.#pollingInterval = 4000;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() { return this.#pollingInterval; }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n}\n/**\n * The JsonRpcProvider is one of the most common Providers,\n * which performs all operations over HTTP (or HTTPS) requests.\n *\n * Events are processed by polling the backend for the current block\n * number; when it advances, all block-base events are then checked\n * for updates.\n */\nexport class JsonRpcProvider extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http:/\\/localhost:8545\";\n }\n super(network, options);\n if (typeof (url) === \"string\") {\n this.#connect = new FetchRequest(url);\n }\n else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n // All requests are over HTTP, so we can just start handling requests\n // We do this here rather than the constructor so that we don't send any\n // requests to the network (i.e. eth_chainId) until we absolutely have to.\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n // Configure a POST connection for the requested method\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n}\nfunction spelunkData(value) {\n if (value == null) {\n return null;\n }\n // These *are* the droids we're looking for.\n if (typeof (value.message) === \"string\" && value.message.match(/revert/i) && isHexString(value.data)) {\n return { message: value.message, data: value.data };\n }\n // Spelunk further...\n if (typeof (value) === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n // Might be a JSON string we can further descend...\n if (typeof (value) === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n }\n catch (error) { }\n }\n return null;\n}\nfunction _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n // These *are* the droids we're looking for.\n if (typeof (value.message) === \"string\") {\n result.push(value.message);\n }\n // Spelunk further...\n if (typeof (value) === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n // Might be a JSON string we can further descend...\n if (typeof (value) === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n }\n catch (error) { }\n }\n}\nfunction spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n}\n//# sourceMappingURL=provider-jsonrpc.js.map","/**\n * [[link-ankr]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - BNB (``bnb``)\n * - BNB Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:Ankr [providers-ankr]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **AnkrProvider** connects to the [[link-ankr]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-ankr-signup).\n */\nexport class AnkrProvider extends JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n // Ankr does not support filterId, so we force polling\n const options = { polling: true, staticNetwork: network };\n const request = AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n defineProperties(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new AnkrProvider(chainId, this.apiKey);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return (this.apiKey === defaultApiKey);\n }\n}\n//# sourceMappingURL=provider-ankr.js.map","/**\n * [[link-alchemy]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]\n */\nimport { defineProperties, resolveProperties, assert, assertArgument, FetchRequest } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **AlchemyProvider** connects to the [[link-alchemy]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-alchemy-signup).\n *\n * @_docloc: api/providers/thirdparty\n */\nexport class AlchemyProvider extends JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new AlchemyProvider(chainId, this.apiKey);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n // https://docs.alchemy.com/reference/trace-transaction\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await resolveProperties({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = (trace[0].error === \"Reverted\");\n }\n catch (error) { }\n if (data) {\n assert(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null // @TODO\n });\n return data;\n }\n assert(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return (this.apiKey === defaultApiKey);\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-alchemy.js.map","/**\n * About Cloudflare\n *\n * @_subsection: api/providers/thirdparty:Cloudflare [providers-cloudflare]\n */\nimport { assertArgument } from \"../utils/index.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\n/**\n * About Cloudflare...\n */\nexport class CloudflareProvider extends JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n assertArgument(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https:/\\/cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n}\n//# sourceMappingURL=provider-cloudflare.js.map","/**\n * [[link-etherscan]] provides a third-party service for connecting to\n * various blockchains over a combination of JSON-RPC and custom API\n * endpoints.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Sepolia Testnet (``holesky``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan]\n */\nimport { AbiCoder } from \"../abi/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { accessListify, Transaction } from \"../transaction/index.js\";\nimport { defineProperties, hexlify, toQuantity, FetchRequest, assert, assertArgument, isError, \n// parseUnits,\ntoUtf8String } from \"../utils/index.js\";\nimport { AbstractProvider } from \"./abstract-provider.js\";\nimport { Network } from \"./network.js\";\nimport { NetworkPlugin } from \"./plugins-network.js\";\nimport { showThrottleMessage } from \"./community.js\";\nconst THROTTLE = 2000;\nfunction isPromise(value) {\n return (value && typeof (value.then) === \"function\");\n}\nconst EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n/**\n * A Network can include an **EtherscanPlugin** to provide\n * a custom base URL.\n *\n * @_docloc: api/providers/thirdparty:Etherscan\n */\nexport class EtherscanPlugin extends NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n defineProperties(this, { baseUrl });\n }\n clone() {\n return new EtherscanPlugin(this.baseUrl);\n }\n}\nconst skipKeys = [\"enableCcipRead\"];\nlet nextId = 1;\n/**\n * The **EtherscanBaseProvider** is the super-class of\n * [[EtherscanProvider]], which should generally be used instead.\n *\n * Since the **EtherscanProvider** includes additional code for\n * [[Contract]] access, in //rare cases// that contracts are not\n * used, this class can reduce code size.\n *\n * @_docloc: api/providers/thirdparty:Etherscan\n */\nexport class EtherscanProvider extends AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = (_apiKey != null) ? _apiKey : null;\n super();\n const network = Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n defineProperties(this, { apiKey, network });\n // Test that the network is supported by Etherscan\n this.getBaseUrl();\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https:/\\/api.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https:/\\/api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https:/\\/api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https:/\\/api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https:/\\/api-goerli.arbiscan.io\";\n case \"bnb\":\n return \"https:/\\/api.bscscan.com\";\n case \"bnbt\":\n return \"https:/\\/api-testnet.bscscan.com\";\n case \"matic\":\n return \"https:/\\/api.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https:/\\/api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https:/\\/api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https:/\\/api-goerli-optimistic.etherscan.io\";\n default:\n }\n assertArgument(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module, params) {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${this.apiKey}` : \"\");\n return `${this.getBaseUrl()}/api?module=${module}${query}${apiKey}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `${this.getBaseUrl()}/api`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module, params) {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module, params, post) {\n const id = nextId++;\n const url = (post ? this.getPostUrl() : this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params) : null);\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload: payload });\n const request = new FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1000 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n showThrottleMessage(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request, response) => {\n const result = response.hasBody() ? JSON.parse(toUtf8String(response.body)) : {};\n const throttle = ((typeof (result.result) === \"string\") ? result.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module === \"proxy\") {\n // This JSON response indicates we are being throttled\n if (result && result.status == 0 && result.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result });\n response.throwThrottleError(result.result, THROTTLE);\n }\n }\n else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result.result });\n response.throwThrottleError(result.result, THROTTLE);\n }\n }\n return response;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k) => `${k}=${payload[k]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n assert(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n assert(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse(toUtf8String(response.body));\n if (module === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n assert(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n assert(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n else {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || (typeof (result.message) === \"string\" && !result.message.match(/^OK/))) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n assert(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n // Quantity-types require no leading zero, unless 0\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = toQuantity(value);\n }\n else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n }\n else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n // Pull any message out if, possible\n let message = \"\";\n if (isError(error, \"SERVER_ERROR\")) {\n // Check for an error emitted by a proxy call\n try {\n message = error.info.result.error.message;\n }\n catch (e) { }\n if (!message) {\n try {\n message = error.info.message;\n }\n catch (e) { }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message.match(/revert/i) && message.match(/insufficient funds/i)) {\n assert(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n }\n catch (error) { }\n const e = AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e.info = { request: req, error };\n throw e;\n }\n }\n if (message) {\n if (req.method === \"broadcastTransaction\") {\n const transaction = Transaction.from(req.signedTransaction);\n if (message.match(/replacement/i) && message.match(/underpriced/i)) {\n assert(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction\n });\n }\n if (message.match(/insufficient funds/)) {\n assert(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n assert(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction\n });\n }\n }\n }\n // Something we could not process\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n // This is temporary until Etherscan completes support\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n }\n else if (this.network.name === \"optimism\") {\n return \"1000000\";\n }\n else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n /* Working with Etherscan to get this added:\n try {\n const test = await this.fetch(\"proxy\", {\n action: \"eth_maxPriorityFeePerGas\"\n });\n console.log(test);\n return test;\n } catch (e) {\n console.log(\"DEBUG\", e);\n throw e;\n }\n */\n /* This might be safe; but due to rounding neither myself\n or Etherscan are necessarily comfortable with this. :)\n try {\n const result = await this.fetch(\"gastracker\", { action: \"gasoracle\" });\n console.log(result);\n const gasPrice = parseUnits(result.SafeGasPrice, \"gwei\");\n const baseFee = parseUnits(result.suggestBaseFee, \"gwei\");\n const priorityFee = gasPrice - baseFee;\n if (priorityFee < 0) { throw new Error(\"negative priority fee; defer to abstract provider default\"); }\n return priorityFee;\n } catch (error) {\n console.log(\"DEBUG\", error);\n throw error;\n }\n */\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: (req.includeTransactions ? \"true\" : \"false\")\n });\n }\n assert(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n }\n catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n }\n catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n /*\n case \"getLogs\": {\n // Needs to complain if more than one address is passed in\n const args: Record = { action: \"getLogs\" }\n \n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n \n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n \n if (params.filter.address) {\n args.address = params.filter.address;\n }\n \n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.Errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.Errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n \n const logs: Array = await this.fetch(\"logs\", args);\n \n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n \n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n \n log.blockHash = blocks[log.blockNumber];\n }\n \n return logs;\n }\n */\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0.0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\", address\n });\n const abi = JSON.parse(resp);\n return new Contract(address, abi, this);\n }\n catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return (this.apiKey == null);\n }\n}\n//# sourceMappingURL=provider-etherscan.js.map","function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n}\n;\nconst _WebSocket = getGlobal().WebSocket;\nexport { _WebSocket as WebSocket };\n//# sourceMappingURL=ws-browser.js.map","/**\n * Generic long-lived socket provider.\n *\n * Sub-classing notes\n * - a sub-class MUST call the `_start()` method once connected\n * - a sub-class MUST override the `_write(string)` method\n * - a sub-class MUST call `_processMessage(string)` for each message\n *\n * @_subsection: api/providers/abstract-provider:Socket Providers [about-socketProvider]\n */\nimport { UnmanagedSubscriber } from \"./abstract-provider.js\";\nimport { assert, assertArgument, makeError } from \"../utils/index.js\";\nimport { JsonRpcApiProvider } from \"./provider-jsonrpc.js\";\n/**\n * A **SocketSubscriber** uses a socket transport to handle events and\n * should use [[_emit]] to manage the events.\n */\nexport class SocketSubscriber {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() { return JSON.parse(this.#filter); }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n (this.#filterId).then((filterId) => {\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n assert(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message);\n }\n else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n}\n/**\n * A **SocketBlockSubscriber** listens for ``newHeads`` events and emits\n * ``\"block\"`` events.\n */\nexport class SocketBlockSubscriber extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"block\", parseInt(message.number));\n }\n}\n/**\n * A **SocketPendingSubscriber** listens for pending transacitons and emits\n * ``\"pending\"`` events.\n */\nexport class SocketPendingSubscriber extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"pending\", message);\n }\n}\n/**\n * A **SocketEventSubscriber** listens for event logs.\n */\nexport class SocketEventSubscriber extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() { return JSON.parse(this.#logFilter); }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message) {\n provider.emit(this.logFilter, provider._wrapLog(message, provider._network));\n }\n}\n/**\n * A **SocketProvider** is backed by a long-lived connection over a\n * socket, which can subscribe and receive real-time messages over\n * its communication channel.\n */\nexport class SocketProvider extends JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n // Copy the options\n const options = Object.assign({}, (_options != null) ? _options : {});\n // Support for batches is generally not supported for\n // connection-base providers; if this changes in the future\n // the _send should be updated to reflect this\n assertArgument(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n // Socket-based Providers (generally) cannot change their network,\n // since they have a long-lived connection; but let people override\n // this if they have just cause.\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = new Map();\n this.#subs = new Map();\n this.#pending = new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n // Handled auto-matically within AbstractProvider\n // when the log.removed = true\n if (sub.filter.orphan === \"drop-log\") {\n return new UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message of pending) {\n subscriber._handleMessage(message);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n // WebSocket provider doesn't accept batches\n assertArgument(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n // @TODO: stringify payloads here and store to prevent mutations\n // Prepare a promise to respond to\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n // Wait until the socket is connected before writing to it\n await this._waitUntilReady();\n // Write the request to the socket\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n\n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n\n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message) {\n const result = (JSON.parse(message));\n if (result && typeof (result) === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", makeError(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n }\n else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n }\n else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n }\n else {\n this.emit(\"error\", makeError(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message) {\n throw new Error(\"sub-classes must override this\");\n }\n}\n//# sourceMappingURL=provider-socket.js.map","import { WebSocket as _WebSocket } from \"./ws.js\"; /*-browser*/\nimport { SocketProvider } from \"./provider-socket.js\";\n/**\n * A JSON-RPC provider which is backed by a WebSocket.\n *\n * WebSockets are often preferred because they retain a live connection\n * to a server, which permits more instant access to events.\n *\n * However, this incurs higher server infrasturture costs, so additional\n * resources may be required to host your own WebSocket nodes and many\n * third-party services charge additional fees for WebSocket endpoints.\n */\nexport class WebSocketProvider extends SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof (url) === \"string\") {\n this.#connect = () => { return new _WebSocket(url); };\n this.#websocket = this.#connect();\n }\n else if (typeof (url) === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n }\n else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n }\n catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n // @TODO: now what? Attempt reconnect?\n }\n };\n this.websocket.onmessage = (message) => {\n this._processMessage(message.data);\n };\n /*\n this.websocket.onclose = (event) => {\n // @TODO: What event.code should we reconnect on?\n const reconnect = false;\n if (reconnect) {\n this.pause(true);\n if (this.#connect) {\n this.#websocket = this.#connect();\n this.#websocket.onopen = ...\n // @TODO: this requires the super class to rebroadcast; move it there\n }\n this._reconnect();\n }\n };\n */\n }\n async _write(message) {\n this.websocket.send(message);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n}\n//# sourceMappingURL=provider-websocket.js.map","/**\n * [[link-infura]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Linea (``linea``)\n * - Linea Goerlia Testnet (``linea-goerli``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:INFURA [providers-infura]\n */\nimport { defineProperties, FetchRequest, assert, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nimport { WebSocketProvider } from \"./provider-websocket.js\";\nconst defaultProjectId = \"84842078b09946638c03157f83405213\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bnbsmartchain-mainnet.infura.io\";\n case \"bnbt\":\n return \"bnbsmartchain-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **InfuraWebSocketProvider** connects to the [[link-infura]]\n * WebSocket end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-infura-signup).\n */\nexport class InfuraWebSocketProvider extends WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n assert(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, network);\n defineProperties(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return (this.projectId === defaultProjectId);\n }\n}\n/**\n * The **InfuraProvider** connects to the [[link-infura]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-infura-signup).\n */\nexport class InfuraProvider extends JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new InfuraProvider(chainId, this.projectId, this.projectSecret);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return (this.projectId === defaultProjectId);\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-infura.js.map","/**\n * [[link-quicknode]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Holesky Testnet (``holesky``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base Mainnet (``base``);\n * - Base Goerli Testnet (``base-goerli``);\n * - Base Sepolia Testnet (``base-sepolia``);\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:QuickNode [providers-quicknode]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/*\n@TODO:\n These networks are not currently present in the Network\n default included networks. Research them and ensure they\n are EVM compatible and work with ethers\n\n http://ethers.matic-amoy.quiknode.pro\n\n http://ethers.avalanche-mainnet.quiknode.pro\n http://ethers.avalanche-testnet.quiknode.pro\n http://ethers.blast-sepolia.quiknode.pro\n http://ethers.celo-mainnet.quiknode.pro\n http://ethers.fantom.quiknode.pro\n http://ethers.imx-demo.quiknode.pro\n http://ethers.imx-mainnet.quiknode.pro\n http://ethers.imx-testnet.quiknode.pro\n http://ethers.near-mainnet.quiknode.pro\n http://ethers.near-testnet.quiknode.pro\n http://ethers.nova-mainnet.quiknode.pro\n http://ethers.scroll-mainnet.quiknode.pro\n http://ethers.scroll-testnet.quiknode.pro\n http://ethers.tron-mainnet.quiknode.pro\n http://ethers.zkevm-mainnet.quiknode.pro\n http://ethers.zkevm-testnet.quiknode.pro\n http://ethers.zksync-mainnet.quiknode.pro\n http://ethers.zksync-testnet.quiknode.pro\n*/\n/**\n * The **QuickNodeProvider** connects to the [[link-quicknode]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API token is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-quicknode).\n */\nexport class QuickNodeProvider extends JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new QuickNodeProvider(chainId, this.token);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return (this.token === defaultToken);\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n //if (projectSecret) { request.setCredentials(\"\", projectSecret); }\n if (token === defaultToken) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-quicknode.js.map","/**\n * A **FallbackProvider** provides resilience, security and performance\n * in a way that is customizable and configurable.\n *\n * @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]\n */\nimport { assert, assertArgument, getBigInt, getNumber, isError } from \"../utils/index.js\";\nimport { AbstractProvider } from \"./abstract-provider.js\";\nimport { Network } from \"./network.js\";\nconst BN_1 = BigInt(\"1\");\nconst BN_2 = BigInt(\"2\");\nfunction shuffle(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(resolve, duration); });\n}\nfunction getTime() { return (new Date()).getTime(); }\nfunction stringify(value) {\n return JSON.stringify(value, (key, value) => {\n if (typeof (value) === \"bigint\") {\n return { type: \"bigint\", value: value.toString() };\n }\n return value;\n });\n}\n;\nconst defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\nconst defaultState = {\n blockNumber: -2, requests: 0, lateResponses: 0, errorResponses: 0,\n outOfSync: -1, unsupportedEvents: 0, rollingDuration: 0, score: 0,\n _network: null, _updateNumber: null, _totalTime: 0,\n _lastFatalError: null, _lastFatalErrorTimestamp: 0\n};\nasync function waitForSync(config, blockNumber) {\n while (config.blockNumber < 0 || config.blockNumber < blockNumber) {\n if (!config._updateNumber) {\n config._updateNumber = (async () => {\n try {\n const blockNumber = await config.provider.getBlockNumber();\n if (blockNumber > config.blockNumber) {\n config.blockNumber = blockNumber;\n }\n }\n catch (error) {\n config.blockNumber = -2;\n config._lastFatalError = error;\n config._lastFatalErrorTimestamp = getTime();\n }\n config._updateNumber = null;\n })();\n }\n await config._updateNumber;\n config.outOfSync++;\n if (config._lastFatalError) {\n break;\n }\n }\n}\nfunction _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + (value.map(_normalize)).join(\",\") + \"]\";\n }\n if (typeof (value) === \"object\" && typeof (value.toJSON) === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof (value)) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k) => `${JSON.stringify(k)}:${_normalize(value[k])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n}\nfunction normalizeResult(value) {\n if (\"error\" in value) {\n const error = value.error;\n return { tag: _normalize(error), value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n}\n// This strategy picks the highest weight result, as long as the weight is\n// equal to or greater than quorum\nfunction checkQuorum(quorum, results) {\n const tally = new Map();\n for (const { value, tag, weight } of results) {\n const t = tally.get(tag) || { value, weight: 0 };\n t.weight += weight;\n tally.set(tag, t);\n }\n let best = null;\n for (const r of tally.values()) {\n if (r.weight >= quorum && (!best || r.weight > best.weight)) {\n best = r;\n }\n }\n if (best) {\n return best.value;\n }\n return undefined;\n}\nfunction getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap = new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e = errorMap.get(tag) || { value, weight: 0 };\n e.weight += weight;\n errorMap.set(tag, e);\n if (bestError == null || e.weight > bestError.weight) {\n bestError = e;\n }\n }\n else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n // We have quorum for an error\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n // We do not have quorum for a result\n return undefined;\n }\n // Get the sorted values\n values.sort((a, b) => ((a < b) ? -1 : (b > a) ? 1 : 0));\n const mid = Math.floor(values.length / 2);\n // Odd-length; take the middle value\n if (values.length % 2) {\n return values[mid];\n }\n // Even length; take the ceiling of the mean of the center two values\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n}\nfunction getAnyResult(quorum, results) {\n // If any value or error meets quorum, that is our preferred result\n const result = checkQuorum(quorum, results);\n if (result !== undefined) {\n return result;\n }\n // Otherwise, do we have any result?\n for (const r of results) {\n if (r.value) {\n return r.value;\n }\n }\n // Nope!\n return undefined;\n}\nfunction getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return getNumber(getMedian(quorum, results), \"%internal\");\n }\n const tally = new Map();\n const add = (result, weight) => {\n const t = tally.get(result) || { result, weight: 0 };\n t.weight += weight;\n tally.set(result, t);\n };\n for (const { weight, value } of results) {\n const r = getNumber(value);\n add(r - 1, weight);\n add(r, weight);\n add(r + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = undefined;\n for (const { weight, result } of tally.values()) {\n // Use this result, if this result meets quorum and has either:\n // - a better weight\n // - or equal weight, but the result is larger\n if (weight >= quorum && (weight > bestWeight || (bestResult != null && weight === bestWeight && result > bestResult))) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n}\n/**\n * A **FallbackProvider** manages several [[Providers]] providing\n * resilience by switching between slow or misbehaving nodes, security\n * by requiring multiple backends to aggree and performance by allowing\n * faster backends to respond earlier.\n *\n */\nexport class FallbackProvider extends AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p) => {\n if (p instanceof AbstractProvider) {\n return Object.assign({ provider: p }, defaultConfig, defaultState);\n }\n else {\n return Object.assign({}, defaultConfig, p, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n }\n else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config) => {\n accum += config.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n assertArgument(this.quorum <= this.#configs.reduce((a, c) => (a + c.weight), 0), \"quorum exceed provider wieght\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c) => {\n const result = Object.assign({}, c);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return Network.from(getBigInt(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = (\"blockHash\" in req) ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n // @TODO: Maybe do a check here to favour (heavily) providers that\n // do not require waitForSync and disfavour providers that\n // seem down-ish or are behaving slowly\n const configs = Array.from(running).map((r) => r.config);\n // Shuffle the states, sorted by priority\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a, b) => (a.priority - b.priority));\n for (const config of allConfigs) {\n if (config._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config) === -1) {\n return config;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config = this.#getNextConfig(running);\n // No runners available\n if (config == null) {\n return null;\n }\n // Create a new runner\n const runner = {\n config, result: null, didBump: false,\n perform: null, staller: null\n };\n const now = getTime();\n // Start performing this operation\n runner.perform = (async () => {\n try {\n config.requests++;\n const result = await this._translatePerform(config.provider, req);\n runner.result = { result };\n }\n catch (error) {\n config.errorResponses++;\n runner.result = { error };\n }\n const dt = (getTime() - now);\n config._totalTime += dt;\n config.rollingDuration = 0.95 * config.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n // Start a staller; when this times out, it's time to force\n // kicking off another runner because we are taking too long\n runner.staller = (async () => {\n await stall(config.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config) => {\n promises.push((async () => {\n await waitForSync(config, 0);\n if (!config._lastFatalError) {\n config._network = await config.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n // Wait for all providers to have a block number and network\n await Promise.all(promises);\n // Check all the networks match\n let chainId = null;\n for (const config of this.#configs) {\n if (config._lastFatalError) {\n continue;\n }\n const network = (config._network);\n if (chainId == null) {\n chainId = network.chainId;\n }\n else if (network.chainId !== chainId) {\n assert(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n // Get all the result objects\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n // Are there enough results to event meet quorum?\n if (results.reduce((a, r) => (a + r.weight), 0) < this.quorum) {\n return undefined;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n // We need to get the bootstrap block height\n if (this.#height === -2) {\n this.#height = Math.ceil(getNumber(getMedian(this.quorum, this.#configs.filter((c) => (!c._lastFatalError)).map((c) => ({\n value: c.blockNumber,\n tag: getNumber(c.blockNumber).toString(),\n weight: c.weight\n })))));\n }\n // Find the mode across all the providers, allowing for\n // a little drift between block heights\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === undefined) {\n return undefined;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n // Pending blocks are in the mempool and already\n // quite untrustworthy; just grab anything\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n assert(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n // Any promises that are interesting to watch for; an expired stall\n // or a successful perform\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n // No responses, yet; keep an eye on it\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n // Still stalling...\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n // This runner has already triggered another runner\n if (runner.didBump) {\n continue;\n }\n // Got a response (result or error) or stalled; kick off another runner\n runner.didBump = true;\n newRunners++;\n }\n // Check if we have reached quorum on a result (or error)\n const value = await this.#checkQuorum(running, req);\n if (value !== undefined) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n // Add any new runners, because a staller timed out or a result\n // or error response came in.\n for (let i = 0; i < newRunners; i++) {\n this.#addRunner(running, req);\n }\n // All providers have returned, and we have no result\n assert(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r) => stringify(r.result)) }\n });\n // Wait for someone to either complete its perform or stall out\n await Promise.race(interesting);\n // This is recursive, but at worst case the depth is 2x the\n // number of providers (each has a perform and a staller)\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n // Broadcasting a transaction is rare (ish) and already incurs\n // a cost on the user, so spamming is safe-ish. Just send it to\n // every backend.\n if (req.method === \"broadcastTransaction\") {\n // Once any broadcast provides a positive result, use it. No\n // need to wait for anyone else\n const results = this.#configs.map((c) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index) => {\n try {\n const result = await provider._perform(req);\n results[index] = Object.assign(normalizeResult({ result }), { weight });\n }\n catch (error) {\n results[index] = Object.assign(normalizeResult({ error }), { weight });\n }\n });\n // As each promise finishes...\n while (true) {\n // Check for a valid broadcast result\n const done = results.filter((r) => (r != null));\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n // Check for a legit broadcast error (one which we cannot\n // recover from; some nodes may return the following red\n // herring events:\n // - alredy seend (UNKNOWN_ERROR)\n // - NONCE_EXPIRED\n // - REPLACEMENT_UNDERPRICED\n const result = checkQuorum(this.quorum, results.filter((r) => (r != null)));\n if (isError(result, \"INSUFFICIENT_FUNDS\")) {\n throw result;\n }\n // Kick off the next provider (if any)\n const waiting = broadcasts.filter((b, i) => (results[i] == null));\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n // Use standard quorum results; any result was returned above,\n // so this will find any error that met quorum if any\n const result = getAnyResult(this.quorum, results);\n assert(result !== undefined, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify) }\n });\n if (result instanceof Error) {\n throw result;\n }\n return result;\n }\n await this.#initialSync();\n // Bootstrap enough runners to meet quorum\n const running = new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n // Track requests sent to a provider that are still\n // outstanding after quorum has been otherwise found\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n}\n//# sourceMappingURL=provider-fallback.js.map","import { assert } from \"../utils/index.js\";\nimport { AnkrProvider } from \"./provider-ankr.js\";\nimport { AlchemyProvider } from \"./provider-alchemy.js\";\nimport { CloudflareProvider } from \"./provider-cloudflare.js\";\nimport { EtherscanProvider } from \"./provider-etherscan.js\";\nimport { InfuraProvider } from \"./provider-infura.js\";\n//import { PocketProvider } from \"./provider-pocket.js\";\nimport { QuickNodeProvider } from \"./provider-quicknode.js\";\nimport { FallbackProvider } from \"./provider-fallback.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nimport { Network } from \"./network.js\";\nimport { WebSocketProvider } from \"./provider-websocket.js\";\nfunction isWebSocketLike(value) {\n return (value && typeof (value.send) === \"function\" &&\n typeof (value.close) === \"function\");\n}\nconst Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n/**\n * Returns a default provider for %%network%%.\n *\n * If %%network%% is a [[WebSocketLike]] or string that begins with\n * ``\"ws:\"`` or ``\"wss:\"``, a [[WebSocketProvider]] is returned backed\n * by that WebSocket or URL.\n *\n * If %%network%% is a string that begins with ``\"HTTP:\"`` or ``\"HTTPS:\"``,\n * a [[JsonRpcProvider]] is returned connected to that URL.\n *\n * Otherwise, a default provider is created backed by well-known public\n * Web3 backends (such as [[link-infura]]) using community-provided API\n * keys.\n *\n * The %%options%% allows specifying custom API keys per backend (setting\n * an API key to ``\"-\"`` will omit that provider) and ``options.exclusive``\n * can be set to either a backend name or and array of backend names, which\n * will whitelist **only** those backends.\n *\n * Current backend strings supported are:\n * - ``\"alchemy\"``\n * - ``\"ankr\"``\n * - ``\"cloudflare\"``\n * - ``\"etherscan\"``\n * - ``\"infura\"``\n * - ``\"publicPolygon\"``\n * - ``\"quicknode\"``\n *\n * @example:\n * // Connect to a local Geth node\n * provider = getDefaultProvider(\"http://localhost:8545/\");\n *\n * // Connect to Ethereum mainnet with any current and future\n * // third-party services available\n * provider = getDefaultProvider(\"mainnet\");\n *\n * // Connect to Polygon, but only allow Etherscan and\n * // INFURA and use \"MY_API_KEY\" in calls to Etherscan.\n * provider = getDefaultProvider(\"matic\", {\n * etherscan: \"MY_API_KEY\",\n * exclusive: [ \"etherscan\", \"infura\" ]\n * });\n */\nexport function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof (options.exclusive) === \"string\") {\n return (name === options.exclusive);\n }\n if (Array.isArray(options.exclusive)) {\n return (options.exclusive.indexOf(name) !== -1);\n }\n return true;\n };\n if (typeof (network) === \"string\" && network.match(/^https?:/)) {\n return new JsonRpcProvider(network);\n }\n if (typeof (network) === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new WebSocketProvider(network);\n }\n // Get the network and name, if possible\n let staticNetwork = null;\n try {\n staticNetwork = Network.from(network);\n }\n catch (error) { }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new JsonRpcProvider(\"https:/\\/polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new AlchemyProvider(network, options.alchemy));\n }\n catch (error) { }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new AnkrProvider(network, options.ankr));\n }\n catch (error) { }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new CloudflareProvider(network));\n }\n catch (error) { }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new EtherscanProvider(network, options.etherscan));\n }\n catch (error) { }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = undefined;\n if (typeof (projectId) === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new InfuraProvider(network, projectId, projectSecret));\n }\n catch (error) { }\n }\n /*\n if (options.pocket !== \"-\") {\n try {\n let appId = options.pocket;\n let secretKey: undefined | string = undefined;\n let loadBalancer: undefined | boolean = undefined;\n if (typeof(appId) === \"object\") {\n loadBalancer = !!appId.loadBalancer;\n secretKey = appId.secretKey;\n appId = appId.appId;\n }\n providers.push(new PocketProvider(network, appId, secretKey, loadBalancer));\n } catch (error) { console.log(error); }\n }\n */\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new QuickNodeProvider(network, token));\n }\n catch (error) { }\n }\n assert(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n // No need for a FallbackProvider\n if (providers.length === 1) {\n return providers[0];\n }\n // We use the floor because public third-party providers can be unreliable,\n // so a low number of providers with a large quorum will fail too often\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n // Testnets don't need as strong a security gaurantee and speed is\n // more useful during testing\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n // Provided override qorum takes priority\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new FallbackProvider(providers, undefined, { quorum });\n}\n//# sourceMappingURL=default-provider.js.map","import { defineProperties } from \"../utils/index.js\";\nimport { AbstractSigner } from \"./abstract-signer.js\";\n/**\n * A **NonceManager** wraps another [[Signer]] and automatically manages\n * the nonce, ensuring serialized and sequential nonces are used during\n * transaction.\n */\nexport class NonceManager extends AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n defineProperties(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return (await this.#noncePromise) + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n // @TODO: Maybe handle interesting/recoverable errors?\n // Like don't increment if the tx was certainly not sent\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message) {\n return this.signer.signMessage(message);\n }\n signTypedData(domain, types, value) {\n return this.signer.signTypedData(domain, types, value);\n }\n}\n//# sourceMappingURL=signer-noncemanager.js.map","import { assertArgument } from \"../utils/index.js\";\nimport { JsonRpcApiPollingProvider } from \"./provider-jsonrpc.js\";\n;\n/**\n * A **BrowserProvider** is intended to wrap an injected provider which\n * adheres to the [[link-eip-1193]] standard, which most (if not all)\n * currently do.\n */\nexport class BrowserProvider extends JsonRpcApiPollingProvider {\n #request;\n /**\n * Connnect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network) {\n assertArgument(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, { batchMaxCount: 1 });\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n }\n catch (e) {\n const error = new Error(e.message);\n error.code = e.code;\n error.data = e.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n assertArgument(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n }\n catch (e) {\n return [{\n id: payload.id,\n error: { code: e.code, data: e.data, message: e.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n // EIP-1193 gives us some machine-readable error codes, so rewrite\n // them into \n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof (address) === \"number\") {\n return (accounts.length > address);\n }\n address = address.toLowerCase();\n return accounts.filter((a) => (a.toLowerCase() === address)).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!(await this.hasSigner(address))) {\n try {\n //const resp = \n await this.#request(\"eth_requestAccounts\", []);\n //console.log(\"RESP\", resp);\n }\n catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n}\n//# sourceMappingURL=provider-browser.js.map","/**\n * [[link-pocket]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Polygon (``matic``)\n * - Arbitrum (``arbitrum``)\n *\n * @_subsection: api/providers/thirdparty:Pocket [providers-pocket]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **PocketProvider** connects to the [[link-pocket]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-pocket-signup).\n */\nexport class PocketProvider extends JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n defineProperties(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new PocketProvider(chainId, this.applicationId, this.applicationSecret);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return (this.applicationId === defaultApplicationId);\n }\n}\n//# sourceMappingURL=provider-pocket.js.map","const IpcSocketProvider = undefined;\nexport { IpcSocketProvider };\n//# sourceMappingURL=provider-ipcsocket-browser.js.map","import { getAddress, resolveAddress } from \"../address/index.js\";\nimport { hashMessage, TypedDataEncoder } from \"../hash/index.js\";\nimport { AbstractSigner } from \"../providers/index.js\";\nimport { computeAddress, Transaction } from \"../transaction/index.js\";\nimport { defineProperties, resolveProperties, assert, assertArgument } from \"../utils/index.js\";\n/**\n * The **BaseWallet** is a stream-lined implementation of a\n * [[Signer]] that operates with a private key.\n *\n * It is preferred to use the [[Wallet]] class, as it offers\n * additional functionality and simplifies loading a variety\n * of JSON formats, Mnemonic Phrases, etc.\n *\n * This class may be of use for those attempting to implement\n * a minimal Signer.\n */\nexport class BaseWallet extends AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n assertArgument(privateKey && typeof (privateKey.sign) === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = computeAddress(this.signingKey.publicKey);\n defineProperties(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() { return this.#signingKey; }\n /**\n * The private key for this wallet.\n */\n get privateKey() { return this.signingKey.privateKey; }\n async getAddress() { return this.address; }\n connect(provider) {\n return new BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n // Replace any Addressable or ENS name with an address\n const { to, from } = await resolveProperties({\n to: (tx.to ? resolveAddress(tx.to, this.provider) : undefined),\n from: (tx.from ? resolveAddress(tx.from, this.provider) : undefined)\n });\n if (to != null) {\n tx.to = to;\n }\n if (from != null) {\n tx.from = from;\n }\n if (tx.from != null) {\n assertArgument(getAddress((tx.from)) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n // Build the transaction\n const btx = Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message) {\n return this.signMessageSync(message);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message) {\n return this.signingKey.sign(hashMessage(message)).serialized;\n }\n async signTypedData(domain, types, value) {\n // Populate any ENS names\n const populated = await TypedDataEncoder.resolveNames(domain, types, value, async (name) => {\n // @TODO: this should use resolveName; addresses don't\n // need a provider\n assert(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n assert(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(TypedDataEncoder.hash(populated.domain, types, populated.value)).serialized;\n }\n}\n//# sourceMappingURL=base-wallet.js.map","import { assertArgument } from \"../utils/index.js\";\nconst subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\nconst Word = /^[a-z]*$/i;\nfunction unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n }\n else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n }\n else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n}\n/**\n * @_ignore\n */\nexport function decode(data, subs) {\n // Replace all the substitutions with their expanded form\n for (let i = subsChrs.length - 1; i >= 0; i--) {\n data = data.split(subsChrs[i]).join(subs.substring(2 * i, 2 * i + 2));\n }\n // Get all tle clumps; each suffix, first-increment and second-increment\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i = parseInt(semi); i >= 0; i--) {\n clumps.push(\";\");\n }\n }\n else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n /* c8 ignore start */\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n /* c8 ignore stop */\n return unfold(unfold(clumps, \";\"), \":\");\n}\n/**\n * @_ignore\n */\nexport function decodeOwl(data) {\n assertArgument(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n}\n//# sourceMappingURL=decode-owl.js.map","import { defineProperties } from \"../utils/index.js\";\n/**\n * A Wordlist represents a collection of language-specific\n * words used to encode and devoce [[link-bip-39]] encoded data\n * by mapping words to 11-bit values and vice versa.\n */\nexport class Wordlist {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n defineProperties(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n}\n//# sourceMappingURL=wordlist.js.map","// Use the encode-latin.js script to create the necessary\n// data files to be consumed by this class\nimport { id } from \"../hash/index.js\";\nimport { assertArgument } from \"../utils/index.js\";\nimport { decodeOwl } from \"./decode-owl.js\";\nimport { Wordlist } from \"./wordlist.js\";\n/**\n * An OWL format Wordlist is an encoding method that exploits\n * the general locality of alphabetically sorted words to\n * achieve a simple but effective means of compression.\n *\n * This class is generally not useful to most developers as\n * it is used mainly internally to keep Wordlists for languages\n * based on ASCII-7 small.\n *\n * If necessary, there are tools within the ``generation/`` folder\n * to create the necessary data.\n */\nexport class WordlistOwl extends Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() { return this.#data; }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return decodeOwl(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n // Verify the computed list matches the official list\n const checksum = id(words.join(\"\\n\") + \"\\n\");\n /* c8 ignore start */\n if (checksum !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n /* c8 ignore stop */\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index) {\n const words = this.#loadWords();\n assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, \"index\", index);\n return words[index];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n}\n//# sourceMappingURL=wordlist-owl.js.map","import { WordlistOwl } from \"./wordlist-owl.js\";\nconst words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,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CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\nconst checksum = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\nlet wordlist = null;\n/**\n * The [[link-bip39-en]] for [mnemonic phrases](link-bip-39).\n *\n * @_docloc: api/wordlists\n */\nexport class LangEn extends WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() { super(\"en\", words, checksum); }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new LangEn();\n }\n return wordlist;\n }\n}\n//# sourceMappingURL=lang-en.js.map","import { pbkdf2, sha256 } from \"../crypto/index.js\";\nimport { defineProperties, getBytes, hexlify, assertNormalize, assertPrivate, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nimport { LangEn } from \"../wordlists/lang-en.js\";\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits) {\n return ((1 << bits) - 1) << (8 - bits) & 0xff;\n}\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits) {\n return ((1 << bits) - 1) & 0xff;\n}\nfunction mnemonicToEntropy(mnemonic, wordlist) {\n assertNormalize(\"NFKD\");\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n assertArgument((words.length % 3) === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n assertArgument(index >= 0, `invalid mnemonic word at index ${i}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum = getBytes(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n assertArgument(checksum === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\nfunction entropyToMnemonic(entropy, wordlist) {\n assertArgument((entropy.length % 4) === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n remainingBits -= 8;\n // This byte will complete an 11-bit index\n }\n else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = parseInt(sha256(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n return wordlist.join(indices.map((index) => wordlist.getWord(index)));\n}\nconst _guard = {};\n/**\n * A **Mnemonic** wraps all properties required to compute [[link-bip-39]]\n * seeds and convert between phrases and entropy.\n */\nexport class Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n assertPrivate(guard, _guard, \"Mnemonic\");\n defineProperties(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = toUtf8Bytes(\"mnemonic\" + this.password, \"NFKD\");\n return pbkdf2(toUtf8Bytes(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n // Normalize the case and space; throws if invalid\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic(getBytes(entropy), wordlist);\n return new Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = getBytes(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new Mnemonic(_guard, hexlify(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = getBytes(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n }\n catch (error) { }\n return false;\n }\n}\n//# sourceMappingURL=mnemonic.js.map","/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _AES_key, _AES_Kd, _AES_Ke;\n// Number of rounds by keysize\nconst numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n// Round constant words\nconst rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n// S-box and Inverse S-box (S is for Substitution)\nconst S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0x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, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n// Transformations for encryption\nconst T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\nconst T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\nconst T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\nconst T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n// Transformations for decryption\nconst T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\nconst T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\nconst T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\nconst T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n// Transformations for decryption key expansion\nconst U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\nconst U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\nconst U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\nconst U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\nfunction convertToInt32(bytes) {\n const result = [];\n for (let i = 0; i < bytes.length; i += 4) {\n result.push((bytes[i] << 24) | (bytes[i + 1] << 16) | (bytes[i + 2] << 8) | bytes[i + 3]);\n }\n return result;\n}\nexport class AES {\n get key() { return __classPrivateFieldGet(this, _AES_key, \"f\").slice(); }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n __classPrivateFieldSet(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError('invalid key size (must be 16, 24 or 32 bytes)');\n }\n // encryption round keys\n __classPrivateFieldSet(this, _AES_Ke, [], \"f\");\n // decryption round keys\n __classPrivateFieldSet(this, _AES_Kd, [], \"f\");\n for (let i = 0; i <= rounds; i++) {\n __classPrivateFieldGet(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n // convert the key into ints\n const tk = convertToInt32(this.key);\n // copy values into round key arrays\n let index;\n for (let i = 0; i < KC; i++) {\n index = i >> 2;\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[index][i % 4] = tk[i];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds - index][i % 4] = tk[i];\n }\n // key expansion (fips-197 section 5.2)\n let rconpointer = 0;\n let t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (let i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n }\n else {\n for (let i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n tk[KC / 2] ^= (S[tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n for (let i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n // copy values into round key arrays\n let i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[r][c] = tk[i];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds - r][c] = tk[i++];\n t++;\n }\n }\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (let r = 1; r < rounds; r++) {\n for (let c = 0; c < 4; c++) {\n tt = __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][c];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[tt & 0xFF]);\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError('invalid plaintext size (must be 16 bytes)');\n }\n const rounds = __classPrivateFieldGet(this, _AES_Ke, \"f\").length - 1;\n const a = [0, 0, 0, 0];\n // convert plaintext to (ints ^ key)\n let t = convertToInt32(plaintext);\n for (let i = 0; i < 4; i++) {\n t[i] ^= __classPrivateFieldGet(this, _AES_Ke, \"f\")[0][i];\n }\n // apply round transforms\n for (let r = 1; r < rounds; r++) {\n for (let i = 0; i < 4; i++) {\n a[i] = (T1[(t[i] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[t[(i + 3) % 4] & 0xff] ^\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[r][i]);\n }\n t = a.slice();\n }\n // the last round is special\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i = 0; i < 4; i++) {\n tt = __classPrivateFieldGet(this, _AES_Ke, \"f\")[rounds][i];\n result[4 * i] = (S[(t[i] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[t[(i + 3) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError('invalid ciphertext size (must be 16 bytes)');\n }\n const rounds = __classPrivateFieldGet(this, _AES_Kd, \"f\").length - 1;\n const a = [0, 0, 0, 0];\n // convert plaintext to (ints ^ key)\n let t = convertToInt32(ciphertext);\n for (let i = 0; i < 4; i++) {\n t[i] ^= __classPrivateFieldGet(this, _AES_Kd, \"f\")[0][i];\n }\n // apply round transforms\n for (let r = 1; r < rounds; r++) {\n for (let i = 0; i < 4; i++) {\n a[i] = (T5[(t[i] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[t[(i + 1) % 4] & 0xff] ^\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][i]);\n }\n t = a.slice();\n }\n // the last round is special\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i = 0; i < 4; i++) {\n tt = __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds][i];\n result[4 * i] = (Si[(t[i] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[t[(i + 1) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n }\n}\n_AES_key = new WeakMap(), _AES_Kd = new WeakMap(), _AES_Ke = new WeakMap();\n//# sourceMappingURL=aes.js.map","import { AES } from \"./aes.js\";\nexport class ModeOfOperation {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n}\n//# sourceMappingURL=mode.js.map","// Cipher Block Chaining\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _CBC_iv, _CBC_lastBlock;\nimport { ModeOfOperation } from \"./mode.js\";\nexport class CBC extends ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet(this, _CBC_iv, new Uint8Array(iv), \"f\");\n }\n else {\n __classPrivateFieldSet(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() { return new Uint8Array(__classPrivateFieldGet(this, _CBC_iv, \"f\")); }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i = 0; i < plaintext.length; i += 16) {\n for (let j = 0; j < 16; j++) {\n __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j] ^= plaintext[i + j];\n }\n __classPrivateFieldSet(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet(this, _CBC_lastBlock, \"f\"), i);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i = 0; i < ciphertext.length; i += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i, i + 16));\n for (let j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j];\n __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j] = ciphertext[i + j];\n }\n }\n return plaintext;\n }\n}\n_CBC_iv = new WeakMap(), _CBC_lastBlock = new WeakMap();\n//# sourceMappingURL=mode-cbc.js.map","// Counter Mode\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _CTR_remaining, _CTR_remainingIndex, _CTR_counter;\nimport { ModeOfOperation } from \"./mode.js\";\nexport class CTR extends ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, CTR);\n // Remaining bytes for the one-time pad\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n // The current counter\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet(this, _CTR_remaining, __classPrivateFieldGet(this, _CTR_counter, \"f\"), \"f\"); // This will be discarded immediately\n __classPrivateFieldSet(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof (initialValue) === \"number\") {\n this.setCounterValue(initialValue);\n }\n else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() { return new Uint8Array(__classPrivateFieldGet(this, _CTR_counter, \"f\")); }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index = 15; index >= 0; --index) {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[index] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i = 15; i >= 0; i--) {\n if (__classPrivateFieldGet(this, _CTR_counter, \"f\")[i] === 255) {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[i] = 0;\n }\n else {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[i]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i = 0; i < crypttext.length; i++) {\n if (__classPrivateFieldGet(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i] ^= __classPrivateFieldGet(this, _CTR_remaining, \"f\")[__classPrivateFieldSet(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n}\n_CTR_remaining = new WeakMap(), _CTR_remainingIndex = new WeakMap(), _CTR_counter = new WeakMap();\n//# sourceMappingURL=mode-ctr.js.map","export function pkcs7Pad(data) {\n const padder = 16 - (data.length % 16);\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n}\nexport function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError('PKCS#7 invalid length');\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError('PKCS#7 padding byte out of range');\n }\n const length = data.length - padder;\n for (let i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new TypeError('PKCS#7 invalid padding byte');\n }\n }\n return new Uint8Array(data.subarray(0, length));\n}\n//# sourceMappingURL=padding.js.map","/**\n * @_ignore\n */\nimport { getBytesCopy, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nexport function looseArrayify(hexString) {\n if (typeof (hexString) === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return getBytesCopy(hexString);\n}\nexport function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = '0' + value;\n }\n return value;\n}\nexport function getPassword(password) {\n if (typeof (password) === 'string') {\n return toUtf8Bytes(password, \"NFKC\");\n }\n return getBytesCopy(password);\n}\nexport function spelunk(object, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n assertArgument(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = (match[4] === \"!\");\n let cur = object;\n for (const comp of path.toLowerCase().split('.')) {\n // Search for a child object with a case-insensitive matching key\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n }\n else if (typeof (cur) === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n }\n else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n assertArgument(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof (cur) === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n }\n else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof (cur) === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof (cur) === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof (cur)) {\n return cur;\n }\n assertArgument(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n}\n/*\nexport function follow(object: any, path: string): null | string {\n let currentChild = object;\n\n for (const comp of path.toLowerCase().split('/')) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comp) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n if (matchingChild === null) { return null; }\n\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// \"path/to/something:type!\"\nexport function followRequired(data: any, path: string): string {\n const value = follow(data, path);\n if (value != null) { return value; }\n return logger.throwArgumentError(\"invalid value\", `data:${ path }`,\n JSON.stringify(data));\n}\n*/\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\n/*\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = getBytes(randomBytes, \"randomBytes\");\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n*/\n//# sourceMappingURL=utils.js.map","/**\n * The JSON Wallet formats allow a simple way to store the private\n * keys needed in Ethereum along with related information and allows\n * for extensible forms of encryption.\n *\n * These utilities facilitate decrypting and encrypting the most common\n * JSON Wallet formats.\n *\n * @_subsection: api/wallet:JSON Wallets [json-wallets]\n */\nimport { CTR } from \"aes-js\";\nimport { getAddress } from \"../address/index.js\";\nimport { keccak256, pbkdf2, randomBytes, scrypt, scryptSync } from \"../crypto/index.js\";\nimport { computeAddress } from \"../transaction/index.js\";\nimport { concat, getBytes, hexlify, uuidV4, assert, assertArgument } from \"../utils/index.js\";\nimport { getPassword, spelunk, zpad } from \"./utils.js\";\nimport { version } from \"../_version.js\";\nconst defaultPath = \"m/44'/60'/0'/0/0\";\n/**\n * Returns true if %%json%% is a valid JSON Keystore Wallet.\n */\nexport function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version = ((data.version != null) ? parseInt(data.version) : 0);\n if (version === 3) {\n return true;\n }\n }\n catch (error) { }\n return false;\n}\nfunction decrypt(data, key, ciphertext) {\n const cipher = spelunk(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = spelunk(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new CTR(key, iv);\n return hexlify(aesCtr.decrypt(ciphertext));\n }\n assert(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n}\nfunction getAccount(data, _key) {\n const key = getBytes(_key);\n const ciphertext = spelunk(data, \"crypto.ciphertext:data!\");\n const computedMAC = hexlify(keccak256(concat([key.slice(16, 32), ciphertext]))).substring(2);\n assertArgument(computedMAC === spelunk(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt(data, key.slice(0, 16), ciphertext);\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (!check.startsWith(\"0x\")) {\n check = \"0x\" + check;\n }\n assertArgument(getAddress(check) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n const version = spelunk(data, \"x-ethers.version:string\");\n if (version === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = spelunk(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = spelunk(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (spelunk(data, \"x-ethers.path:string\") || defaultPath),\n locale: (spelunk(data, \"x-ethers.locale:string\") || \"en\"),\n entropy: hexlify(getBytes(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n}\nfunction getDecryptKdfParams(data) {\n const kdf = spelunk(data, \"crypto.kdf:string\");\n if (kdf && typeof (kdf) === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = spelunk(data, \"crypto.kdfparams.salt:data!\");\n const N = spelunk(data, \"crypto.kdfparams.n:int!\");\n const r = spelunk(data, \"crypto.kdfparams.r:int!\");\n const p = spelunk(data, \"crypto.kdfparams.p:int!\");\n // Make sure N is a power of 2\n assertArgument(N > 0 && (N & (N - 1)) === 0, \"invalid kdf.N\", \"kdf.N\", N);\n assertArgument(r > 0 && p > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = spelunk(data, \"crypto.kdfparams.dklen:int!\");\n assertArgument(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N, r, p, dkLen: 64 };\n }\n else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = spelunk(data, \"crypto.kdfparams.salt:data!\");\n const prf = spelunk(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n assertArgument(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = spelunk(data, \"crypto.kdfparams.c:int!\");\n const dkLen = spelunk(data, \"crypto.kdfparams.dklen:int!\");\n assertArgument(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n assertArgument(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n}\n/**\n * Returns the account details for the JSON Keystore Wallet %%json%%\n * using %%password%%.\n *\n * It is preferred to use the [async version](decryptKeystoreJson)\n * instead, which allows a [[ProgressCallback]] to keep the user informed\n * as to the decryption status.\n *\n * This method will block the event loop (freezing all UI) until decryption\n * is complete, which can take quite some time, depending on the wallet\n * paramters and platform.\n */\nexport function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt, count, dkLen, algorithm } = params;\n const key = pbkdf2(password, salt, count, dkLen, algorithm);\n return getAccount(data, key);\n }\n assert(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N, r, p, dkLen } = params;\n const key = scryptSync(password, salt, N, r, p, dkLen);\n return getAccount(data, key);\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(() => { resolve(); }, duration); });\n}\n/**\n * Resolves to the decrypted JSON Keystore Wallet %%json%% using the\n * %%password%%.\n *\n * If provided, %%progress%% will be called periodically during the\n * decrpytion to provide feedback, and if the function returns\n * ``false`` will halt decryption.\n *\n * The %%progressCallback%% will **always** receive ``0`` before\n * decryption begins and ``1`` when complete.\n */\nexport async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt, count, dkLen, algorithm } = params;\n const key = pbkdf2(password, salt, count, dkLen, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key);\n }\n assert(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N, r, p, dkLen } = params;\n const key = await scrypt(password, salt, N, r, p, dkLen, progress);\n return getAccount(data, key);\n}\nfunction getEncryptKdfParams(options) {\n // Check/generate the salt\n const salt = (options.salt != null) ? getBytes(options.salt, \"options.salt\") : randomBytes(32);\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p = options.scrypt.p;\n }\n }\n assertArgument(typeof (N) === \"number\" && N > 0 && Number.isSafeInteger(N) && (BigInt(N) & BigInt(N - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N);\n assertArgument(typeof (r) === \"number\" && r > 0 && Number.isSafeInteger(r), \"invalid scrypt r parameter\", \"options.r\", r);\n assertArgument(typeof (p) === \"number\" && p > 0 && Number.isSafeInteger(p), \"invalid scrypt p parameter\", \"options.p\", p);\n return { name: \"scrypt\", dkLen: 32, salt, N, r, p };\n}\nfunction _encryptKeystore(key, kdf, account, options) {\n const privateKey = getBytes(account.privateKey, \"privateKey\");\n // Override initialization vector\n const iv = (options.iv != null) ? getBytes(options.iv, \"options.iv\") : randomBytes(16);\n assertArgument(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n // Override the uuid\n const uuidRandom = (options.uuid != null) ? getBytes(options.uuid, \"options.uuid\") : randomBytes(16);\n assertArgument(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n // Encrypt the private key\n const aesCtr = new CTR(derivedKey, iv);\n const ciphertext = getBytes(aesCtr.encrypt(privateKey));\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]));\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (account.mnemonic) {\n const client = (options.client != null) ? options.client : `ethers/${version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = getBytes(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = randomBytes(16);\n const mnemonicAesCtr = new CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = getBytes(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\");\n const gethFilename = (\"UTC--\" + timestamp + \"--\" + data.address);\n data[\"x-ethers\"] = {\n client, gethFilename, path, locale,\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n}\n/**\n * Return the JSON Keystore Wallet for %%account%% encrypted with\n * %%password%%.\n *\n * The %%options%% can be used to tune the password-based key\n * derivation function parameters, explicitly set the random values\n * used. Any provided [[ProgressCallback]] is ignord.\n */\nexport function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = getPassword(password);\n const kdf = getEncryptKdfParams(options);\n const key = scryptSync(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore(getBytes(key), kdf, account, options);\n}\n/**\n * Resolved to the JSON Keystore Wallet for %%account%% encrypted\n * with %%password%%.\n *\n * The %%options%% can be used to tune the password-based key\n * derivation function parameters, explicitly set the random values\n * used and provide a [[ProgressCallback]] to receive periodic updates\n * on the completion status..\n */\nexport async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = getPassword(password);\n const kdf = getEncryptKdfParams(options);\n const key = await scrypt(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore(getBytes(key), kdf, account, options);\n}\n//# sourceMappingURL=json-keystore.js.map","/**\n * Explain HD Wallets..\n *\n * @_subsection: api/wallet:HD Wallets [hd-wallets]\n */\nimport { computeHmac, randomBytes, ripemd160, SigningKey, sha256 } from \"../crypto/index.js\";\nimport { VoidSigner } from \"../providers/index.js\";\nimport { computeAddress } from \"../transaction/index.js\";\nimport { concat, dataSlice, decodeBase58, defineProperties, encodeBase58, getBytes, hexlify, isBytesLike, getNumber, toBeArray, toBigInt, toBeHex, assertPrivate, assert, assertArgument } from \"../utils/index.js\";\nimport { LangEn } from \"../wordlists/lang-en.js\";\nimport { BaseWallet } from \"./base-wallet.js\";\nimport { Mnemonic } from \"./mnemonic.js\";\nimport { encryptKeystoreJson, encryptKeystoreJsonSync, } from \"./json-keystore.js\";\n/**\n * The default derivation path for Ethereum HD Nodes. (i.e. ``\"m/44'/60'/0'/0/0\"``)\n */\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n// \"Bitcoin seed\"\nconst MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\nconst HardenedBit = 0x80000000;\nconst N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\nconst Nibbles = \"0123456789abcdef\";\nfunction zpad(value, length) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n}\nfunction encodeBase58Check(_value) {\n const value = getBytes(_value);\n const check = dataSlice(sha256(sha256(value)), 0, 4);\n const bytes = concat([value, check]);\n return encodeBase58(bytes);\n}\nconst _guard = {};\nfunction ser_I(index, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index & HardenedBit) {\n assert(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n // Data = 0x00 || ser_256(k_par)\n data.set(getBytes(privateKey), 1);\n }\n else {\n // Data = ser_p(point(k_par))\n data.set(getBytes(publicKey));\n }\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) {\n data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff);\n }\n const I = getBytes(computeHmac(\"sha512\", chainCode, data));\n return { IL: I.slice(0, 32), IR: I.slice(32) };\n}\nfunction derivePath(node, path) {\n const components = path.split(\"/\");\n assertArgument(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n assertArgument(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n assertArgument(index < HardenedBit, \"invalid path index\", `path[${i}]`, component);\n result = result.deriveChild(HardenedBit + index);\n }\n else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n assertArgument(index < HardenedBit, \"invalid path index\", `path[${i}]`, component);\n result = result.deriveChild(index);\n }\n else {\n assertArgument(false, \"invalid path component\", `path[${i}]`, component);\n }\n }\n return result;\n}\n/**\n * An **HDNodeWallet** is a [[Signer]] backed by the private key derived\n * from an HD Node using the [[link-bip-32]] stantard.\n *\n * An HD Node forms a hierarchal structure with each HD Node having a\n * private key and the ability to derive child HD Nodes, defined by\n * a path indicating the index of each child.\n */\nexport class HDNodeWallet extends BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index, depth, mnemonic, provider) {\n super(signingKey, provider);\n assertPrivate(guard, _guard, \"HDNodeWallet\");\n defineProperties(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = dataSlice(ripemd160(sha256(this.publicKey)), 0, 4);\n defineProperties(this, {\n parentFingerprint, fingerprint,\n chainCode, path, index, depth\n });\n defineProperties(this, { mnemonic });\n }\n connect(provider) {\n return new HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m = this.mnemonic;\n if (this.path && m && m.wordlist.locale === \"en\" && m.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await encryptKeystoreJson(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return encryptKeystoreJsonSync(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n assert(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check(concat([\n \"0x0488ADE4\", zpad(this.depth, 1), this.parentFingerprint,\n zpad(this.index, 4), this.chainCode,\n concat([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() { return (this.path != null); }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index <= 0xffffffff, \"invalid index\", \"index\", index);\n // Base path\n let path = this.path;\n if (path) {\n path += \"/\" + (index & ~HardenedBit);\n if (index & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, this.privateKey);\n const ki = new SigningKey(toBeHex((toBigInt(IL) + BigInt(this.privateKey)) % N, 32));\n return new HDNodeWallet(_guard, ki, this.fingerprint, hexlify(IR), path, index, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n assertArgument(isBytesLike(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = getBytes(_seed, \"seed\");\n assertArgument(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I = getBytes(computeHmac(\"sha512\", MasterSecret, seed));\n const signingKey = new SigningKey(hexlify(I.slice(0, 32)));\n return new HDNodeWallet(_guard, signingKey, \"0x00000000\", hexlify(I.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = toBeArray(decodeBase58(extendedKey)); // @TODO: redact\n assertArgument(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = hexlify(key);\n return new HDNodeVoidWallet(_guard, computeAddress(publicKey), publicKey, parentFingerprint, chainCode, null, index, depth, null);\n }\n // Private Key\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNodeWallet(_guard, new SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index, depth, null, null);\n }\n assertArgument(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = defaultPath;\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const mnemonic = Mnemonic.fromEntropy(randomBytes(16), password, wordlist);\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = defaultPath;\n }\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = defaultPath;\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const mnemonic = Mnemonic.fromPhrase(phrase, password, wordlist);\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return HDNodeWallet.#fromSeed(seed, null);\n }\n}\n/**\n * A **HDNodeVoidWallet** cannot sign, but provides access to\n * the children nodes of a [[link-bip-32]] HD wallet addresses.\n *\n * The can be created by using an extended ``xpub`` key to\n * [[HDNodeWallet_fromExtendedKey]] or by\n * [nuetering](HDNodeWallet-neuter) a [[HDNodeWallet]].\n */\nexport class HDNodeVoidWallet extends VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index, depth, provider) {\n super(address, provider);\n assertPrivate(guard, _guard, \"HDNodeVoidWallet\");\n defineProperties(this, { publicKey });\n const fingerprint = dataSlice(ripemd160(sha256(publicKey)), 0, 4);\n defineProperties(this, {\n publicKey, fingerprint, parentFingerprint, chainCode, path, index, depth\n });\n }\n connect(provider) {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n assert(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check(concat([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey,\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() { return (this.path != null); }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index <= 0xffffffff, \"invalid index\", \"index\", index);\n // Base path\n let path = this.path;\n if (path) {\n path += \"/\" + (index & ~HardenedBit);\n if (index & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, null);\n const Ki = SigningKey.addPoints(IL, this.publicKey, true);\n const address = computeAddress(Ki);\n return new HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, hexlify(IR), path, index, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n}\n/*\nexport class HDNodeWalletManager {\n #root: HDNodeWallet;\n\n constructor(phrase: string, password?: null | string, path?: null | string, locale?: null | Wordlist) {\n if (password == null) { password = \"\"; }\n if (path == null) { path = \"m/44'/60'/0'/0\"; }\n if (locale == null) { locale = LangEn.wordlist(); }\n this.#root = HDNodeWallet.fromPhrase(phrase, password, path, locale);\n }\n\n getSigner(index?: number): HDNodeWallet {\n return this.#root.deriveChild((index == null) ? 0: index);\n }\n}\n*/\n/**\n * Returns the [[link-bip-32]] path for the account at %%index%%.\n *\n * This is the pattern used by wallets like Ledger.\n *\n * There is also an [alternate pattern](getIndexedAccountPath) used by\n * some software.\n */\nexport function getAccountPath(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index >= 0 && index < HardenedBit, \"invalid account index\", \"index\", index);\n return `m/44'/60'/${index}'/0/0`;\n}\n/**\n * Returns the path using an alternative pattern for deriving accounts,\n * at %%index%%.\n *\n * This derivation path uses the //index// component rather than the\n * //account// component to derive sequential accounts.\n *\n * This is the pattern used by wallets like MetaMask.\n */\nexport function getIndexedAccountPath(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index >= 0 && index < HardenedBit, \"invalid account index\", \"index\", index);\n return `m/44'/60'/0'/0/${index}`;\n}\n//# sourceMappingURL=hdwallet.js.map","/**\n * @_subsection: api/wallet:JSON Wallets [json-wallets]\n */\nimport { CBC, pkcs7Strip } from \"aes-js\";\nimport { getAddress } from \"../address/index.js\";\nimport { pbkdf2 } from \"../crypto/index.js\";\nimport { id } from \"../hash/index.js\";\nimport { getBytes, assertArgument } from \"../utils/index.js\";\nimport { getPassword, looseArrayify, spelunk } from \"./utils.js\";\n/**\n * Returns true if %%json%% is a valid JSON Crowdsale wallet.\n */\nexport function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n }\n catch (error) { }\n return false;\n}\n// See: https://github.com/ethereum/pyethsaletool\n/**\n * Before Ethereum launched, it was necessary to create a wallet\n * format for backers to use, which would be used to receive ether\n * as a reward for contributing to the project.\n *\n * The [[link-crowdsale]] format is now obsolete, but it is still\n * useful to support and the additional code is fairly trivial as\n * all the primitives required are used through core portions of\n * the library.\n */\nexport function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n // Ethereum Address\n const address = getAddress(spelunk(data, \"ethaddr:string!\"));\n // Encrypted Seed\n const encseed = looseArrayify(spelunk(data, \"encseed:string!\"));\n assertArgument(encseed && (encseed.length % 16) === 0, \"invalid encseed\", \"json\", json);\n const key = getBytes(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n // Decrypt the seed\n const aesCbc = new CBC(key, iv);\n const seed = pkcs7Strip(getBytes(aesCbc.decrypt(encryptedSeed)));\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n return { address, privateKey: id(seedHex) };\n}\n//# sourceMappingURL=json-crowdsale.js.map","import { SigningKey } from \"../crypto/index.js\";\nimport { assertArgument } from \"../utils/index.js\";\nimport { BaseWallet } from \"./base-wallet.js\";\nimport { HDNodeWallet } from \"./hdwallet.js\";\nimport { decryptCrowdsaleJson, isCrowdsaleJson } from \"./json-crowdsale.js\";\nimport { decryptKeystoreJson, decryptKeystoreJsonSync, encryptKeystoreJson, encryptKeystoreJsonSync, isKeystoreJson } from \"./json-keystore.js\";\nimport { Mnemonic } from \"./mnemonic.js\";\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(() => { resolve(); }, duration); });\n}\n/**\n * A **Wallet** manages a single private key which is used to sign\n * transactions, messages and other common payloads.\n *\n * This class is generally the main entry point for developers\n * that wish to use a private key directly, as it can create\n * instances from a large variety of common sources, including\n * raw private key, [[link-bip-39]] mnemonics and encrypte JSON\n * wallets.\n */\nexport class Wallet extends BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof (key) === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = (typeof (key) === \"string\") ? new SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await encryptKeystoreJson(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return encryptKeystoreJsonSync(account, password);\n }\n static #fromAccount(account) {\n assertArgument(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet = HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet.address === account.address && wallet.privateKey === account.privateKey) {\n return wallet;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new Wallet(account.privateKey);\n assertArgument(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if (isKeystoreJson(json)) {\n account = await decryptKeystoreJson(json, password, progress);\n }\n else if (isCrowdsaleJson(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = decryptCrowdsaleJson(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if (isKeystoreJson(json)) {\n account = decryptKeystoreJsonSync(json, password);\n }\n else if (isCrowdsaleJson(json)) {\n account = decryptCrowdsaleJson(json, password);\n }\n else {\n assertArgument(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n}\n//# sourceMappingURL=wallet.js.map","const Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n/**\n * @_ignore\n */\nexport function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i = 0; i < data.length; i++) {\n // Accumulate 6 bits of data\n accum = ((accum << 6) | Base64.indexOf(data[i]));\n bits += 6;\n // While we have enough for a word...\n while (bits >= width) {\n // ...read the word\n const value = (accum >> (bits - width));\n accum &= (1 << (bits - width)) - 1;\n bits -= width;\n // A value of 0 indicates we exceeded maxValue, it\n // floods over into the next value\n if (value === 0) {\n flood += maxValue;\n }\n else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n}\n//# sourceMappingURL=bit-reader.js.map","import { assertArgument } from \"../utils/index.js\";\nimport { decodeBits } from \"./bit-reader.js\";\nimport { decodeOwl } from \"./decode-owl.js\";\n/**\n * @_ignore\n */\nexport function decodeOwlA(data, accents) {\n let words = decodeOwl(data).join(\",\");\n // Inject the accents\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n assertArgument(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = decodeBits(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n}\n//# sourceMappingURL=decode-owla.js.map","import { WordlistOwl } from \"./wordlist-owl.js\";\nimport { decodeOwlA } from \"./decode-owla.js\";\n/**\n * An OWL-A format Wordlist extends the OWL format to add an\n * overlay onto an OWL format Wordlist to support diacritic\n * marks.\n *\n * This class is generally not useful to most developers as\n * it is used mainly internally to keep Wordlists for languages\n * based on latin-1 small.\n *\n * If necessary, there are tools within the ``generation/`` folder\n * to create the necessary data.\n */\nexport class WordlistOwlA extends WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum) {\n super(locale, data, checksum);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() { return this.#accent; }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return decodeOwlA(this._data, this._accent);\n }\n}\n//# sourceMappingURL=wordlist-owla.js.map","import { LangEn } from \"./lang-en.js\";\nexport const wordlists = {\n en: LangEn.wordlist(),\n};\n//# sourceMappingURL=wordlists-browser.js.map","import type {\n Block,\n BlockTag,\n EthersError,\n InterfaceAbi,\n JsonRpcSigner,\n TransactionReceipt,\n TransactionResponse\n} from 'ethers'\nimport {\n ErrorTypeEnum,\n type BlockNumber,\n type ContractAddress,\n type PrivateKey,\n type TransactionId,\n type WalletAddress\n} from '@multiplechain/types'\nimport { sleep, checkWebSocket } from '@multiplechain/utils'\nimport type { EvmNetworkConfigInterface } from './Provider'\nimport type { TransactionData } from '../services/TransactionSigner'\nimport { Wallet, Contract, ContractFactory, JsonRpcProvider, WebSocketProvider } from 'ethers'\n\nexport type { EthersError } from 'ethers'\n\nexport class Ethers {\n /**\n * Network configuration of the provider\n */\n network: EvmNetworkConfigInterface\n\n /**\n * JSON RPC provider\n */\n jsonRpcProvider: JsonRpcProvider\n\n /**\n * WebSocket provider\n */\n webSocketProvider?: WebSocketProvider\n\n /**\n * @param network - Network configuration of the provider\n */\n constructor(network: EvmNetworkConfigInterface) {\n this.network = network\n this.jsonRpcProvider = new JsonRpcProvider(network.rpcUrl)\n }\n\n /**\n * @returns Ethers jsonRpc provider\n */\n public get jsonRpc(): JsonRpcProvider {\n return this.jsonRpcProvider\n }\n\n /**\n * @returns Ethers webSocket provider\n */\n public get webSocket(): WebSocketProvider | undefined {\n return this.webSocketProvider\n }\n\n /**\n * @returns Ethers webSocket provider\n */\n public async connectWebSocket(): Promise {\n return await new Promise((resolve, reject) => {\n if (this.network.wsUrl === undefined) {\n reject(new Error(ErrorTypeEnum.WS_URL_NOT_DEFINED))\n } else {\n const url = this.network.wsUrl\n checkWebSocket(url)\n .then((status: any) => {\n if (status instanceof Error) {\n reject(status)\n } else {\n resolve((this.webSocketProvider = new WebSocketProvider(url)))\n }\n })\n .catch(reject)\n }\n })\n }\n\n /**\n * @param address contract address\n * @param abi contract abi\n * @param signer signer of the contract\n * @returns contract instance\n */\n public contract(\n address: string,\n abi: InterfaceAbi,\n signer?: JsonRpcSigner | JsonRpcProvider\n ): Contract {\n return new Contract(address, abi, signer)\n }\n\n /**\n * @param privateKey private key of the wallet\n * @param provider provider of the blockchain network\n * @returns wallet instance\n */\n public wallet(privateKey: PrivateKey, provider?: JsonRpcProvider): Wallet {\n return new Wallet(privateKey, provider ?? this.jsonRpc)\n }\n\n /**\n * @param abi contract abi\n * @param bytecode contract bytecode\n * @param signer signer of the contract\n * @returns contract factory instance\n */\n public contractFactory(\n abi: InterfaceAbi,\n bytecode: string,\n signer?: JsonRpcSigner | JsonRpcProvider\n ): ContractFactory {\n return new ContractFactory(abi, bytecode, signer)\n }\n\n /**\n * @param address contract address\n * @returns contract bytecode\n */\n async getByteCode(address: ContractAddress): Promise {\n try {\n return await this.jsonRpc.getCode(address)\n } catch (error) {\n const e = error as EthersError\n if (e.code === 'UNCONFIGURED_NAME') {\n await sleep(1000)\n return await this.getByteCode(address)\n } else {\n throw error\n }\n }\n }\n\n /**\n * @param data transaction data\n * @returns transaction estimate gas\n */\n public async getEstimateGas(data: TransactionData): Promise {\n return Number(await this.jsonRpcProvider.estimateGas(data))\n }\n\n /**\n * @returns gas price\n */\n public async getGasPrice(): Promise {\n return (await this.jsonRpc.send('eth_gasPrice', [])).toString() as string\n }\n\n /**\n * @param address wallet address\n * @returns nonce of the wallet\n */\n public async getNonce(address: WalletAddress): Promise {\n return await this.jsonRpcProvider.getTransactionCount(address)\n }\n\n /**\n * @param block block number or block hash\n * @param prefetchTxs whether to prefetch transactions\n * @returns block information\n */\n public async getBlock(block: BlockTag | string, prefetchTxs?: boolean): Promise {\n return await this.jsonRpcProvider.getBlock(block, prefetchTxs)\n }\n\n /**\n * @returns block number\n */\n async getBlockNumber(): Promise {\n return await this.jsonRpcProvider.getBlockNumber()\n }\n\n /**\n * @param id transaction id\n * @returns transaction information\n */\n async getTransaction(id: TransactionId): Promise {\n return await this.jsonRpcProvider.getTransaction(id)\n }\n\n /**\n * @param id transaction id\n * @returns transaction receipt\n */\n async getTransactionReceipt(id: TransactionId): Promise {\n return await this.jsonRpcProvider.getTransactionReceipt(id)\n }\n\n /**\n * @param address wallet address\n * @param limit how many block to go back\n * @returns transactions\n */\n async getLastTransactions(\n address: WalletAddress,\n limit: number = 0\n ): Promise {\n const txPromises = []\n const blockPromises = []\n const transactions: TransactionResponse[] = []\n\n const block = await this.getBlock('pending')\n const blockNumber = block?.number ?? (await this.getBlockNumber())\n\n for (let i = blockNumber; i > blockNumber - limit; i--) {\n const block = await this.getBlock(i, true)\n if (block === null) {\n continue\n }\n blockPromises.push(block)\n }\n\n const blocks = await Promise.all(blockPromises)\n for (const block of blocks) {\n for (const txHash of block.transactions) {\n txPromises.push(this.getTransaction(txHash))\n }\n }\n\n const txs = await Promise.all(txPromises)\n for (const tx of txs) {\n if (\n tx?.from.toLowerCase() === address.toLowerCase() ||\n tx?.to?.toLowerCase() === address.toLowerCase()\n ) {\n transactions.push(tx)\n }\n }\n\n return transactions\n }\n\n /**\n * @param address wallet address\n * @param limit how many block to go back\n * @returns last transaction\n */\n async getLastTransaction(\n address: WalletAddress,\n limit: number = 0\n ): Promise {\n const block = await this.getBlock('pending')\n const blockNumber = block?.number ?? (await this.getBlockNumber())\n for (let i = blockNumber; i > blockNumber - limit; i--) {\n const block = await this.getBlock(i, true)\n if (block === null) {\n continue\n }\n for (const txId of block.transactions) {\n const tx = await this.getTransaction(txId)\n if (\n tx?.from.toLowerCase() === address.toLowerCase() ||\n tx?.to?.toLowerCase() === address.toLowerCase()\n ) {\n return tx\n }\n }\n }\n\n return null\n }\n\n /**\n * @param address wallet address\n * @returns balance of the wallet\n */\n async getBalance(address: WalletAddress): Promise {\n return await this.jsonRpcProvider.getBalance(address)\n }\n}\n","import axios from 'axios'\nimport { Ethers } from './Ethers'\nimport {\n ErrorTypeEnum,\n type NetworkConfigInterface,\n type ProviderInterface\n} from '@multiplechain/types'\n\nimport { checkWebSocket } from '@multiplechain/utils'\n\nexport interface EvmNetworkConfigInterface extends NetworkConfigInterface {\n id: number\n hexId?: string\n rpcUrl: string\n name?: string\n mainnetId?: number\n explorerUrl: string\n nativeCurrency: {\n name?: string\n symbol: string\n decimals: number\n }\n}\n\nexport class Provider implements ProviderInterface {\n /**\n * Network configuration of the provider\n */\n public network: EvmNetworkConfigInterface\n\n /**\n * Ethers service\n */\n public ethers: Ethers\n\n /**\n * Static instance of the provider\n */\n private static _instance: Provider\n\n /**\n * @param network - Network configuration of the provider\n */\n constructor(network: EvmNetworkConfigInterface) {\n this.update(network)\n }\n\n /**\n * Get the static instance of the provider\n * @returns Provider\n */\n static get instance(): Provider {\n if (Provider._instance === undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_NOT_INITIALIZED)\n }\n return Provider._instance\n }\n\n /**\n * Initialize the static instance of the provider\n * @param network - Network configuration of the provider\n */\n static initialize(network: EvmNetworkConfigInterface): void {\n if (Provider._instance !== undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_ALREADY_INITIALIZED)\n }\n Provider._instance = new Provider(network)\n }\n\n /**\n * Check RPC connection\n * @param url - RPC URL\n * @returns RPC connection status\n */\n async checkRpcConnection(url?: string): Promise {\n try {\n const response = await axios.post(url ?? this.network.rpcUrl, {\n jsonrpc: '2.0',\n method: 'eth_blockNumber',\n params: [],\n id: 1\n })\n\n if (response.status !== 200) {\n return new Error(response.statusText + ': ' + JSON.stringify(response.data))\n }\n\n return true\n } catch (error) {\n return error as any\n }\n }\n\n /**\n * Check WS connection\n * @param url - Websocket URL\n * @returns WS connection status\n */\n async checkWsConnection(url?: string): Promise {\n try {\n const result: any = await checkWebSocket(url ?? this.network.wsUrl ?? '')\n\n if (result instanceof Error) {\n return result\n }\n\n return true\n } catch (error) {\n return error as Error\n }\n }\n\n /**\n * Update network configuration of the provider\n * @param network - Network configuration of the provider\n */\n update(network: EvmNetworkConfigInterface): void {\n this.network = network\n Provider._instance = this\n this.ethers = new Ethers(network)\n }\n\n /**\n * Get the current network configuration is testnet or not\n * @returns Testnet status\n */\n isTestnet(): boolean {\n return this.network?.testnet ?? false\n }\n}\n","import {\n type WalletInterface,\n type WalletAdapterInterface,\n type WalletPlatformEnum,\n ErrorTypeEnum,\n type ConnectConfig,\n type UnknownConfig,\n type TransactionId,\n type SignedMessage,\n type WalletAddress\n} from '@multiplechain/types'\nimport { Provider } from '../services/Provider'\nimport type { EIP1193Provider } from './adapters/EIP6963'\nimport { toHex } from '@multiplechain/utils'\nimport type { TransactionSigner } from '../services/TransactionSigner'\n\nconst rejectMap = (error: any, reject: (a: any) => any): any => {\n console.error('MultipleChain EVM Wallet Error:', error)\n\n const errorMessage = String(error.message ?? '')\n if (\n errorMessage === 'Not supported chainId' ||\n errorMessage.includes('chain ID') ||\n errorMessage.includes('networkConfigurationId') ||\n errorMessage.includes('The Provider is not connected to the requested chain.')\n ) {\n return reject(new Error(ErrorTypeEnum.UNACCEPTED_CHAIN))\n } else if (\n error.code === 4001 ||\n error.error === 'Rejected by user' ||\n errorMessage === 'cancelled' ||\n errorMessage === 'User canceled' ||\n errorMessage === 'user reject this request' ||\n errorMessage === 'User rejected the transaction' ||\n errorMessage === 'An unexpected error occurred' ||\n errorMessage === 'User disapproved requested chains'\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_REQUEST_REJECTED))\n } else if (\n errorMessage.includes('User') ||\n errorMessage.includes('Rejected') ||\n errorMessage.includes('cancelled') ||\n errorMessage.includes('canceled') ||\n errorMessage.includes('rejected') ||\n errorMessage.includes('disapproved requested chains')\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_REQUEST_REJECTED))\n } else if (errorMessage.includes('Invalid RPC URL')) {\n return reject(new Error(ErrorTypeEnum.RPC_REQUEST_ERROR))\n } else if (\n error.code === -32000 ||\n errorMessage.includes('timeout') ||\n errorMessage.includes('request timed out')\n ) {\n return reject(new Error(ErrorTypeEnum.RPC_TIMEOUT))\n } else if (error.code === -32603 || error.code === -32602) {\n return reject(new Error(ErrorTypeEnum.TRANSACTION_CREATION_FAILED))\n } else if (error.code === -32601) {\n return reject(new Error(ErrorTypeEnum.RPC_REQUEST_ERROR))\n } else if (\n error.code === -32002 ||\n error.message === 'Already processing eth_requestAccounts. Please wait.'\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_ALREADY_PROCESSING))\n } else if (error.message === 'User closed modal') {\n return reject(new Error(ErrorTypeEnum.CLOSED_WALLETCONNECT_MODAL))\n } else if (error.message === 'transaction underpriced') {\n return reject(new Error(ErrorTypeEnum.TRANSACTION_CREATION_FAILED))\n }\n\n return reject(error)\n}\n\ntype WalletAdapter = WalletAdapterInterface & {\n provider?:\n | EIP1193Provider\n | { on: (eventName: string, callback: (...args: any[]) => void) => void }\n}\n\nexport interface RequestType {\n method: string\n params?: any[] | object\n}\n\nexport class Wallet implements WalletInterface {\n adapter: WalletAdapter\n\n walletProvider: EIP1193Provider\n\n networkProvider: Provider\n\n /**\n * @param adapter - Wallet adapter\n * @param provider - Blockchain network provider\n */\n constructor(adapter: WalletAdapter, provider?: Provider) {\n this.adapter = adapter\n this.networkProvider = provider ?? Provider.instance\n }\n\n /**\n * @param payload RequestType\n * @returns any\n */\n async request(payload: RequestType): Promise {\n const res = await this.walletProvider.request(payload)\n if (res?.error !== undefined) {\n const error = res.error as {\n code: number\n message: string\n }\n if (error.code === -32000) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(error.message)\n }\n return res\n }\n\n /**\n * @returns Wallet ID\n */\n getId(): string {\n return this.adapter.id\n }\n\n /**\n * @returns Wallet name\n */\n getName(): string {\n return this.adapter.name\n }\n\n /**\n * @returns Wallet icon\n */\n getIcon(): string {\n return this.adapter.icon\n }\n\n /**\n * @returns Wallet platforms\n */\n getPlatforms(): WalletPlatformEnum[] {\n return this.adapter.platforms\n }\n\n /**\n * @returns Wallet download link\n */\n getDownloadLink(): string | undefined {\n return this.adapter.downloadLink\n }\n\n /**\n * @param url - Deep link URL\n * @param config - Deep link configuration\n * @returns Deep link\n */\n createDeepLink(url: string, config?: UnknownConfig): string | null {\n if (this.adapter.createDeepLink === undefined) {\n return null\n }\n\n return this.adapter.createDeepLink(url, config)\n }\n\n /**\n * @param config - Connection configuration\n * @returns WalletAddress\n */\n async connect(config?: ConnectConfig): Promise {\n return await new Promise((resolve, reject) => {\n this.adapter\n .connect(this.networkProvider, config)\n .then(async (provider) => {\n this.walletProvider = provider\n\n const chainId = await this.getChainId()\n\n if (this.networkProvider.network.id !== chainId) {\n reject(ErrorTypeEnum.UNACCEPTED_CHAIN)\n return\n }\n\n resolve(await this.getAddress())\n })\n .catch((error) => {\n const customReject = (error: any): void => {\n if (error.message === ErrorTypeEnum.WALLET_REQUEST_REJECTED) {\n reject(new Error(ErrorTypeEnum.WALLET_CONNECT_REJECTED))\n } else {\n reject(error)\n }\n }\n rejectMap(error, customReject)\n })\n })\n }\n\n /**\n * @returns boolean\n */\n async isDetected(): Promise {\n return await this.adapter.isDetected()\n }\n\n /**\n * @returns boolean\n */\n async isConnected(): Promise {\n return await this.adapter.isConnected()\n }\n\n /**\n * @returns number\n */\n async getChainId(): Promise {\n const chainId = await this.request({ method: 'eth_chainId' })\n return typeof chainId === 'number' ? chainId : parseInt(chainId as string, 16)\n }\n\n /**\n * @returns WalletAddress\n */\n async getAddress(): Promise {\n return (await this.walletProvider.request({ method: 'eth_accounts' }))[0]\n }\n\n /**\n * @param message - Message to sign\n * @returns SignedMessage\n */\n async signMessage(message: string): Promise {\n const address = await this.getAddress()\n return await new Promise((resolve, reject) => {\n this.walletProvider\n .request({\n method: 'personal_sign',\n params: [message, address]\n })\n .then((signature: string) => {\n resolve(signature)\n })\n .catch((error) => {\n rejectMap(error, reject)\n })\n })\n }\n\n /**\n * @param transactionSigner - Transaction signer\n * @returns TransactionId\n */\n async sendTransaction(transactionSigner: TransactionSigner): Promise {\n return await new Promise((resolve, reject) => {\n const data = transactionSigner.getRawData()\n data.gas = toHex(data.gasLimit as number)\n delete data.chainId\n delete data.nonce\n delete data.gasLimit\n delete data.gasPrice\n this.walletProvider\n .request({\n method: 'eth_sendTransaction',\n params: [data]\n })\n .then((txHash: string) => {\n resolve(txHash)\n })\n .catch((error) => {\n rejectMap(error, reject)\n })\n })\n }\n\n /**\n * @param eventName - Event name\n * @param callback - Event callback\n */\n on(eventName: string, callback: (...args: any[]) => void): void {\n if (this.adapter?.provider?.on !== undefined) {\n this.adapter.provider.on(eventName, callback)\n } else {\n this.walletProvider.on(eventName, callback)\n }\n }\n}\n","// src/arbitrum.ts\nvar arbitrum = {\n id: 42161,\n name: \"Arbitrum One\",\n network: \"arbitrum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://arb-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://arbitrum-mainnet.infura.io/v3\"],\n webSocket: [\"wss://arbitrum-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://arbiscan.io\" },\n default: { name: \"Arbiscan\", url: \"https://arbiscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n};\n\n// src/arbitrumGoerli.ts\nvar arbitrumGoerli = {\n id: 421613,\n name: \"Arbitrum Goerli\",\n network: \"arbitrum-goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://arb-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://arbitrum-goerli.infura.io/v3\"],\n webSocket: [\"wss://arbitrum-goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://goerli.arbiscan.io/\" },\n default: { name: \"Arbiscan\", url: \"https://goerli.arbiscan.io/\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n};\n\n// src/arbitrumNova.ts\nvar arbitrumNova = {\n id: 42170,\n name: \"Arbitrum Nova\",\n network: \"arbitrum-nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n blast: {\n http: [\"https://arbitrum-nova.public.blastapi.io\"],\n webSocket: [\"wss://arbitrum-nova.public.blastapi.io\"]\n },\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://nova.arbiscan.io\" },\n blockScout: {\n name: \"BlockScout\",\n url: \"https://nova-explorer.arbitrum.io/\"\n },\n default: { name: \"Arbiscan\", url: \"https://nova.arbiscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n};\n\n// src/aurora.ts\nvar aurora = {\n id: 1313161554,\n name: \"Aurora\",\n network: \"aurora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n infura: { http: [\"https://aurora-mainnet.infura.io/v3\"] },\n default: { http: [\"https://mainnet.aurora.dev\"] },\n public: { http: [\"https://mainnet.aurora.dev\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Aurorascan\", url: \"https://aurorascan.dev\" },\n default: { name: \"Aurorascan\", url: \"https://aurorascan.dev\" }\n }\n};\n\n// src/auroraTestnet.ts\nvar auroraTestnet = {\n id: 1313161555,\n name: \"Aurora Testnet\",\n network: \"aurora-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n infura: { http: [\"https://aurora-testnet.infura.io/v3\"] },\n default: { http: [\"https://testnet.aurora.dev\"] },\n public: { http: [\"https://testnet.aurora.dev\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Aurorascan\", url: \"https://testnet.aurorascan.dev\" },\n default: { name: \"Aurorascan\", url: \"https://testnet.aurorascan.dev\" }\n },\n testnet: true\n};\n\n// src/avalanche.ts\nvar avalanche = {\n id: 43114,\n name: \"Avalanche\",\n network: \"avalanche\",\n nativeCurrency: {\n decimals: 18,\n name: \"Avalanche\",\n symbol: \"AVAX\"\n },\n rpcUrls: {\n default: { http: [\"https://api.avax.network/ext/bc/C/rpc\"] },\n public: { http: [\"https://api.avax.network/ext/bc/C/rpc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"SnowTrace\", url: \"https://snowtrace.io\" },\n default: { name: \"SnowTrace\", url: \"https://snowtrace.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 11907934\n }\n }\n};\n\n// src/avalancheFuji.ts\nvar avalancheFuji = {\n id: 43113,\n name: \"Avalanche Fuji\",\n network: \"avalanche-fuji\",\n nativeCurrency: {\n decimals: 18,\n name: \"Avalanche Fuji\",\n symbol: \"AVAX\"\n },\n rpcUrls: {\n default: { http: [\"https://api.avax-test.network/ext/bc/C/rpc\"] },\n public: { http: [\"https://api.avax-test.network/ext/bc/C/rpc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"SnowTrace\", url: \"https://testnet.snowtrace.io\" },\n default: { name: \"SnowTrace\", url: \"https://testnet.snowtrace.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7096959\n }\n },\n testnet: true\n};\n\n// src/base.ts\nvar base = {\n id: 8453,\n network: \"base\",\n name: \"Base\",\n nativeCurrency: { name: \"Base\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.base.org\"]\n },\n public: {\n http: [\"https://mainnet.base.org\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"Basescout\",\n url: \"https://base.blockscout.com\"\n },\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\"\n },\n etherscan: {\n name: \"Basescan\",\n url: \"https://basescan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n }\n }\n};\n\n// src/baseGoerli.ts\nvar baseGoerli = {\n id: 84531,\n network: \"base-goerli\",\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Base Goerli\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.base.org\"]\n },\n public: {\n http: [\"https://goerli.base.org\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\"\n },\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n }\n },\n testnet: true\n};\n\n// src/bearNetworkChainMainnet.ts\nvar bearNetworkChainMainnet = {\n id: 641230,\n name: \"Bear Network Chain Mainnet\",\n network: \"BearNetworkChainMainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"BearNetworkChain\",\n symbol: \"BRNKC\"\n },\n rpcUrls: {\n public: { http: [\"https://brnkc-mainnet.bearnetwork.net\"] },\n default: { http: [\"https://brnkc-mainnet.bearnetwork.net\"] }\n },\n blockExplorers: {\n default: { name: \"BrnkScan\", url: \"https://brnkscan.bearnetwork.net\" }\n }\n};\n\n// src/bearNetworkChainTestnet.ts\nvar bearNetworkChainTestnet = {\n id: 751230,\n name: \"Bear Network Chain Testnet\",\n network: \"BearNetworkChainTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"tBRNKC\",\n symbol: \"tBRNKC\"\n },\n rpcUrls: {\n public: { http: [\"https://brnkc-test.bearnetwork.net\"] },\n default: { http: [\"https://brnkc-test.bearnetwork.net\"] }\n },\n blockExplorers: {\n default: {\n name: \"BrnkTestScan\",\n url: \"https://brnktest-scan.bearnetwork.net\"\n }\n },\n testnet: true\n};\n\n// src/boba.ts\nvar boba = {\n id: 288,\n name: \"Boba Network\",\n network: \"boba\",\n nativeCurrency: {\n decimals: 18,\n name: \"Boba\",\n symbol: \"BOBA\"\n },\n rpcUrls: {\n default: { http: [\"https://mainnet.boba.network\"] },\n public: { http: [\"https://mainnet.boba.network\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BOBAScan\", url: \"https://bobascan.com\" },\n default: { name: \"BOBAScan\", url: \"https://bobascan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 446859\n }\n }\n};\n\n// src/bronos.ts\nvar bronos = {\n id: 1039,\n name: \"Bronos\",\n network: \"bronos\",\n nativeCurrency: {\n decimals: 18,\n name: \"BRO\",\n symbol: \"BRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm.bronos.org\"] },\n public: { http: [\"https://evm.bronos.org\"] }\n },\n blockExplorers: {\n default: { name: \"BronoScan\", url: \"https://broscan.bronos.org\" }\n }\n};\n\n// src/bronosTestnet.ts\nvar bronosTestnet = {\n id: 1038,\n name: \"Bronos Testnet\",\n network: \"bronos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Bronos Coin\",\n symbol: \"tBRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm-testnet.bronos.org\"] },\n public: { http: [\"https://evm-testnet.bronos.org\"] }\n },\n blockExplorers: {\n default: { name: \"BronoScan\", url: \"https://tbroscan.bronos.org\" }\n },\n testnet: true\n};\n\n// src/bsc.ts\nvar bsc = {\n id: 56,\n name: \"BNB Smart Chain\",\n network: \"bsc\",\n nativeCurrency: {\n decimals: 18,\n name: \"BNB\",\n symbol: \"BNB\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.ankr.com/bsc\"] },\n public: { http: [\"https://rpc.ankr.com/bsc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BscScan\", url: \"https://bscscan.com\" },\n default: { name: \"BscScan\", url: \"https://bscscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 15921452\n }\n }\n};\n\n// src/bscTestnet.ts\nvar bscTestnet = {\n id: 97,\n name: \"Binance Smart Chain Testnet\",\n network: \"bsc-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"BNB\",\n symbol: \"tBNB\"\n },\n rpcUrls: {\n default: { http: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"] },\n public: { http: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BscScan\", url: \"https://testnet.bscscan.com\" },\n default: { name: \"BscScan\", url: \"https://testnet.bscscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 17422483\n }\n },\n testnet: true\n};\n\n// src/bxn.ts\nvar bxn = {\n id: 4999,\n name: \"BlackFort Exchange Network\",\n network: \"bxn\",\n nativeCurrency: { name: \"BlackFort Token\", symbol: \"BXN\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.blackfort.network/rpc\"]\n },\n public: {\n http: [\"https://mainnet.blackfort.network/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://explorer.blackfort.network\"\n }\n }\n};\n\n// src/bxnTestnet.ts\nvar bxnTestnet = {\n id: 4777,\n name: \"BlackFort Exchange Network Testnet\",\n network: \"bxnTestnet\",\n nativeCurrency: {\n name: \"BlackFort Testnet Token\",\n symbol: \"TBXN\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://testnet.blackfort.network/rpc\"]\n },\n public: {\n http: [\"https://testnet.blackfort.network/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://testnet-explorer.blackfort.network\"\n }\n }\n};\n\n// src/canto.ts\nvar canto = {\n id: 7700,\n name: \"Canto\",\n network: \"canto\",\n nativeCurrency: {\n decimals: 18,\n name: \"Canto\",\n symbol: \"CANTO\"\n },\n rpcUrls: {\n default: { http: [\"https://canto.gravitychain.io\"] },\n public: { http: [\"https://canto.gravitychain.io\"] }\n },\n blockExplorers: {\n default: {\n name: \"Tuber.Build (Blockscout)\",\n url: \"https://tuber.build\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 2905789\n }\n }\n};\n\n// src/celo.ts\nvar celo = {\n id: 42220,\n name: \"Celo\",\n network: \"celo\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"CELO\"\n },\n rpcUrls: {\n default: { http: [\"https://forno.celo.org\"] },\n infura: {\n http: [\"https://celo-mainnet.infura.io/v3\"]\n },\n public: {\n http: [\"https://forno.celo.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/mainnet\"\n },\n etherscan: { name: \"CeloScan\", url: \"https://celoscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 13112599\n }\n },\n testnet: false\n};\n\n// src/celoAlfajores.ts\nvar celoAlfajores = {\n id: 44787,\n name: \"Alfajores\",\n network: \"celo-alfajores\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"A-CELO\"\n },\n rpcUrls: {\n default: {\n http: [\"https://alfajores-forno.celo-testnet.org\"]\n },\n infura: {\n http: [\"https://celo-alfajores.infura.io/v3\"]\n },\n public: {\n http: [\"https://alfajores-forno.celo-testnet.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/alfajores\"\n },\n etherscan: { name: \"CeloScan\", url: \"https://alfajores.celoscan.io/\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 14569001\n }\n },\n testnet: true\n};\n\n// src/celoCannoli.ts\nvar celoCannoli = {\n id: 17323,\n name: \"Cannoli\",\n network: \"celo-cannoli\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"C-CELO\"\n },\n rpcUrls: {\n default: {\n http: [\"https://forno.cannoli.celo-testnet.org\"]\n },\n public: {\n http: [\"https://forno.cannoli.celo-testnet.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/cannoli\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x5Acb0aa8BF4E8Ff0d882Ee187140713C12BF9718\",\n blockCreated: 87429\n }\n },\n testnet: true\n};\n\n// src/classic.ts\nvar classic = {\n id: 61,\n name: \"Ethereum Classic\",\n network: \"classic\",\n nativeCurrency: {\n decimals: 18,\n name: \"ETC\",\n symbol: \"ETC\"\n },\n rpcUrls: {\n default: { http: [\"https://etc.rivet.link\"] },\n public: { http: [\"https://etc.rivet.link\"] }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://blockscout.com/etc/mainnet\"\n }\n }\n};\n\n// src/confluxESpace.ts\nvar confluxESpace = {\n id: 1030,\n name: \"Conflux eSpace\",\n network: \"cfx-espace\",\n nativeCurrency: { name: \"Conflux\", symbol: \"CFX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://evm.confluxrpc.org\"]\n },\n public: {\n http: [\"https://evm.confluxrpc.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"ConfluxScan\",\n url: \"https://evm.confluxscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xEFf0078910f638cd81996cc117bccD3eDf2B072F\",\n blockCreated: 68602935\n }\n }\n};\n\n// src/cronos.ts\nvar cronos = {\n id: 25,\n name: \"Cronos Mainnet\",\n network: \"cronos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Cronos\",\n symbol: \"CRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm.cronos.org\"] },\n public: { http: [\"https://evm.cronos.org\"] }\n },\n blockExplorers: {\n default: { name: \"Cronoscan\", url: \"https://cronoscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1963112\n }\n }\n};\n\n// src/cronosTestnet.ts\nvar cronosTestnet = {\n id: 338,\n name: \"Cronos Testnet\",\n network: \"cronos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"CRO\",\n symbol: \"tCRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm-t3.cronos.org\"] },\n public: { http: [\"https://evm-t3.cronos.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Cronos Explorer\",\n url: \"https://cronos.org/explorer/testnet3\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 10191251\n }\n },\n testnet: true\n};\n\n// src/crossbell.ts\nvar crossbell = {\n id: 3737,\n network: \"crossbell\",\n name: \"Crossbell\",\n nativeCurrency: {\n decimals: 18,\n name: \"CSB\",\n symbol: \"CSB\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.crossbell.io\"]\n },\n public: {\n http: [\"https://rpc.crossbell.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"CrossScan\", url: \"https://scan.crossbell.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xBB9759009cDaC82774EfC84D94cD9F7440f75Fcf\",\n blockCreated: 23499787\n }\n }\n};\n\n// src/dfk.ts\nvar dfk = {\n id: 53935,\n name: \"DFK Chain\",\n network: \"dfk\",\n nativeCurrency: {\n decimals: 18,\n name: \"Jewel\",\n symbol: \"JEWEL\"\n },\n rpcUrls: {\n default: {\n http: [\"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc\"]\n },\n public: {\n http: [\"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"DFKSubnetScan\",\n url: \"https://subnets.avax.network/defi-kingdoms\"\n },\n default: {\n name: \"DFKSubnetScan\",\n url: \"https://subnets.avax.network/defi-kingdoms\"\n }\n }\n};\n\n// src/dogechain.ts\nvar dogechain = {\n id: 2e3,\n name: \"Dogechain\",\n network: \"dogechain\",\n nativeCurrency: {\n decimals: 18,\n name: \"Dogechain\",\n symbol: \"DC\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.dogechain.dog\"] },\n public: { http: [\"https://rpc.dogechain.dog\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"DogeChainExplorer\",\n url: \"https://explorer.dogechain.dog\"\n },\n default: {\n name: \"DogeChainExplorer\",\n url: \"https://explorer.dogechain.dog\"\n }\n }\n};\n\n// src/edgeware.ts\nvar edgeware = {\n id: 2021,\n name: \"Edgeware EdgeEVM Mainnet\",\n network: \"edgeware\",\n nativeCurrency: {\n decimals: 18,\n name: \"Edgeware\",\n symbol: \"EDG\"\n },\n rpcUrls: {\n default: { http: [\"https://edgeware-evm.jelliedowl.net\"] },\n public: { http: [\"https://edgeware-evm.jelliedowl.net\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Edgscan by Bharathcoorg\", url: \"https://edgscan.live\" },\n default: { name: \"Edgscan by Bharathcoorg\", url: \"https://edgscan.live\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 18117872\n }\n }\n};\n\n// src/edgewareTestnet.ts\nvar edgewareTestnet = {\n id: 2022,\n name: \"Beresheet BereEVM Testnet\",\n network: \"edgewareTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Testnet EDG\",\n symbol: \"tEDG\"\n },\n rpcUrls: {\n default: { http: [\"https://beresheet-evm.jelliedowl.net\"] },\n public: { http: [\"https://beresheet-evm.jelliedowl.net\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Edgscan by Bharathcoorg\",\n url: \"https://testnet.edgscan.live\"\n },\n default: {\n name: \"Edgscan by Bharathcoorg\",\n url: \"https://testnet.edgscan.live\"\n }\n }\n};\n\n// src/emerald.ts\nvar emerald = {\n id: 42262,\n name: \"Oasis Emerald\",\n network: \"emerald\",\n nativeCurrency: {\n decimals: 18,\n name: \"Oasis ROSE\",\n symbol: \"ROSE\"\n },\n rpcUrls: {\n default: {\n http: [\"https://emerald.oasis.dev\"],\n webSocket: [\"wss://emerald.oasis.dev/ws\"]\n },\n public: {\n http: [\"https://emerald.oasis.dev\"],\n webSocket: [\"wss://emerald.oasis.dev/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Oasis Explorer\",\n url: \"https://explorer.emerald.oasis.dev\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1481392\n }\n }\n};\n\n// src/eos.ts\nvar eos = {\n id: 17777,\n name: \"EOS EVM\",\n network: \"eos\",\n nativeCurrency: {\n decimals: 18,\n name: \"EOS\",\n symbol: \"EOS\"\n },\n rpcUrls: {\n default: { http: [\"https://api.evm.eosnetwork.com\"] },\n public: { http: [\"https://api.evm.eosnetwork.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"EOS EVM Explorer\",\n url: \"https://explorer.evm.eosnetwork.com\"\n },\n default: {\n name: \"EOS EVM Explorer\",\n url: \"https://explorer.evm.eosnetwork.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7943933\n }\n }\n};\n\n// src/eosTestnet.ts\nvar eosTestnet = {\n id: 15557,\n name: \"EOS EVM Testnet\",\n network: \"eos\",\n nativeCurrency: {\n decimals: 18,\n name: \"EOS\",\n symbol: \"EOS\"\n },\n rpcUrls: {\n default: { http: [\"https://api.testnet.evm.eosnetwork.com\"] },\n public: { http: [\"https://api.testnet.evm.eosnetwork.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"EOS EVM Testnet Explorer\",\n url: \"https://explorer.testnet.evm.eosnetwork.com\"\n },\n default: {\n name: \"EOS EVM Testnet Explorer\",\n url: \"https://explorer.testnet.evm.eosnetwork.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 9067940\n }\n },\n testnet: true\n};\n\n// src/evmos.ts\nvar evmos = {\n id: 9001,\n name: \"Evmos\",\n network: \"evmos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Evmos\",\n symbol: \"EVMOS\"\n },\n rpcUrls: {\n default: { http: [\"https://eth.bd.evmos.org:8545\"] },\n public: { http: [\"https://eth.bd.evmos.org:8545\"] }\n },\n blockExplorers: {\n default: { name: \"Evmos Block Explorer\", url: \"https://escan.live\" }\n }\n};\n\n// src/evmosTestnet.ts\nvar evmosTestnet = {\n id: 9e3,\n name: \"Evmos Testnet\",\n network: \"evmos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Evmos\",\n symbol: \"EVMOS\"\n },\n rpcUrls: {\n default: { http: [\"https://eth.bd.evmos.dev:8545\"] },\n public: { http: [\"https://eth.bd.evmos.dev:8545\"] }\n },\n blockExplorers: {\n default: {\n name: \"Evmos Testnet Block Explorer\",\n url: \"https://evm.evmos.dev/\"\n }\n }\n};\n\n// src/ekta.ts\nvar ekta = {\n id: 1994,\n name: \"Ekta\",\n network: \"ekta\",\n nativeCurrency: {\n decimals: 18,\n name: \"EKTA\",\n symbol: \"EKTA\"\n },\n rpcUrls: {\n public: { http: [\"https://main.ekta.io\"] },\n default: { http: [\"https://main.ekta.io\"] }\n },\n blockExplorers: {\n default: { name: \"Ektascan\", url: \"https://ektascan.io\" }\n }\n};\n\n// src/ektaTestnet.ts\nvar ektaTestnet = {\n id: 1004,\n name: \"Ekta Testnet\",\n network: \"ekta-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"EKTA\",\n symbol: \"EKTA\"\n },\n rpcUrls: {\n public: { http: [\"https://test.ekta.io:8545\"] },\n default: { http: [\"https://test.ekta.io:8545\"] }\n },\n blockExplorers: {\n default: { name: \"Test Ektascan\", url: \"https://test.ektascan.io\" }\n },\n testnet: true\n};\n\n// src/ewc.ts\nvar ewc = {\n id: 246,\n name: \"Energy Web Chain\",\n network: \"ewc\",\n nativeCurrency: { name: \"EWT\", symbol: \"EWT\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.energyweb.org\"]\n },\n public: {\n http: [\"https://rpc.energyweb.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Energy Web Chain Explorer\",\n url: \"https://explorer.energyweb.org\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x0A6d64413c07E10E890220BBE1c49170080C6Ca0\"\n }\n }\n};\n\n// src/fantom.ts\nvar fantom = {\n id: 250,\n name: \"Fantom\",\n network: \"fantom\",\n nativeCurrency: {\n decimals: 18,\n name: \"Fantom\",\n symbol: \"FTM\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.ankr.com/fantom\"] },\n public: { http: [\"https://rpc.ankr.com/fantom\"] }\n },\n blockExplorers: {\n etherscan: { name: \"FTMScan\", url: \"https://ftmscan.com\" },\n default: { name: \"FTMScan\", url: \"https://ftmscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 33001987\n }\n }\n};\n\n// src/fantomTestnet.ts\nvar fantomTestnet = {\n id: 4002,\n name: \"Fantom Testnet\",\n network: \"fantom-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Fantom\",\n symbol: \"FTM\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.testnet.fantom.network\"] },\n public: { http: [\"https://rpc.testnet.fantom.network\"] }\n },\n blockExplorers: {\n etherscan: { name: \"FTMScan\", url: \"https://testnet.ftmscan.com\" },\n default: { name: \"FTMScan\", url: \"https://testnet.ftmscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 8328688\n }\n }\n};\n\n// src/fibo.ts\nvar fibo = {\n id: 12306,\n name: \"Fibo Chain\",\n network: \"fibochain\",\n nativeCurrency: {\n decimals: 18,\n name: \"fibo\",\n symbol: \"FIBO\"\n },\n rpcUrls: {\n default: { http: [\"https://network.hzroc.art\"] },\n public: { http: [\"https://network.hzroc.art\"] }\n },\n blockExplorers: {\n default: { name: \"FiboScan\", url: \"https://scan.fibochain.org\" }\n }\n};\n\n// src/filecoin.ts\nvar filecoin = {\n id: 314,\n name: \"Filecoin Mainnet\",\n network: \"filecoin-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"filecoin\",\n symbol: \"FIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filfox\", url: \"https://filfox.info/en\" },\n filscan: { name: \"Filscan\", url: \"https://filscan.io\" },\n filscout: { name: \"Filscout\", url: \"https://filscout.io/en\" },\n glif: { name: \"Glif\", url: \"https://explorer.glif.io\" }\n }\n};\n\n// src/filecoinCalibration.ts\nvar filecoinCalibration = {\n id: 314159,\n name: \"Filecoin Calibration\",\n network: \"filecoin-calibration\",\n nativeCurrency: {\n decimals: 18,\n name: \"testnet filecoin\",\n symbol: \"tFIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.calibration.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.calibration.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filscan\", url: \"https://calibration.filscan.io\" }\n }\n};\n\n// src/filecoinHyperspace.ts\nvar filecoinHyperspace = {\n id: 3141,\n name: \"Filecoin Hyperspace\",\n network: \"filecoin-hyperspace\",\n nativeCurrency: {\n decimals: 18,\n name: \"testnet filecoin\",\n symbol: \"tFIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.hyperspace.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.hyperspace.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filfox\", url: \"https://hyperspace.filfox.info/en\" },\n filscan: { name: \"Filscan\", url: \"https://hyperspace.filscan.io\" }\n }\n};\n\n// src/flare.ts\nvar flare = {\n id: 14,\n name: \"Flare Mainnet\",\n network: \"flare-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"flare\",\n symbol: \"FLR\"\n },\n rpcUrls: {\n default: { http: [\"https://flare-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://flare-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Flare Explorer\",\n url: \"https://flare-explorer.flare.network\"\n }\n }\n};\n\n// src/flareTestnet.ts\nvar flareTestnet = {\n id: 114,\n name: \"Coston2\",\n network: \"coston2\",\n nativeCurrency: {\n decimals: 18,\n name: \"coston2flare\",\n symbol: \"C2FLR\"\n },\n rpcUrls: {\n default: { http: [\"https://coston2-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://coston2-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Coston2 Explorer\",\n url: \"https://coston2-explorer.flare.network\"\n }\n },\n testnet: true\n};\n\n// src/foundry.ts\nvar foundry = {\n id: 31337,\n name: \"Foundry\",\n network: \"foundry\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"http://127.0.0.1:8545\"],\n webSocket: [\"ws://127.0.0.1:8545\"]\n },\n public: {\n http: [\"http://127.0.0.1:8545\"],\n webSocket: [\"ws://127.0.0.1:8545\"]\n }\n }\n};\n\n// src/fuse.ts\nvar fuse = {\n id: 122,\n name: \"Fuse\",\n network: \"fuse\",\n nativeCurrency: { name: \"Fuse\", symbol: \"FUSE\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://rpc.fuse.io\"] },\n public: { http: [\"https://fuse-mainnet.chainstacklabs.com\"] }\n },\n blockExplorers: {\n default: { name: \"Fuse Explorer\", url: \"https://explorer.fuse.io\" }\n }\n};\n\n// src/fuseSparknet.ts\nvar fuseSparknet = {\n id: 123,\n name: \"Fuse Sparknet\",\n network: \"fuse\",\n nativeCurrency: { name: \"Spark\", symbol: \"SPARK\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://rpc.fusespark.io\"] },\n public: { http: [\"https://rpc.fusespark.io\"] }\n },\n blockExplorers: {\n default: {\n name: \"Sparkent Explorer\",\n url: \"https://explorer.fusespark.io\"\n }\n }\n};\n\n// src/iotex.ts\nvar iotex = {\n id: 4689,\n name: \"IoTeX\",\n network: \"iotex\",\n nativeCurrency: {\n decimals: 18,\n name: \"IoTeX\",\n symbol: \"IOTX\"\n },\n rpcUrls: {\n default: {\n http: [\"https://babel-api.mainnet.iotex.io\"],\n webSocket: [\"wss://babel-api.mainnet.iotex.io\"]\n },\n public: {\n http: [\"https://babel-api.mainnet.iotex.io\"],\n webSocket: [\"wss://babel-api.mainnet.iotex.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"IoTeXScan\", url: \"https://iotexscan.io\" }\n }\n};\n\n// src/iotexTestnet.ts\nvar iotexTestnet = {\n id: 4690,\n name: \"IoTeX Testnet\",\n network: \"iotex-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"IoTeX\",\n symbol: \"IOTX\"\n },\n rpcUrls: {\n default: {\n http: [\"https://babel-api.testnet.iotex.io\"],\n webSocket: [\"wss://babel-api.testnet.iotex.io\"]\n },\n public: {\n http: [\"https://babel-api.testnet.iotex.io\"],\n webSocket: [\"wss://babel-api.testnet.iotex.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"IoTeXScan\", url: \"https://testnet.iotexscan.io\" }\n }\n};\n\n// src/gobi.ts\nvar gobi = {\n id: 1663,\n name: \"Horizen Gobi Testnet\",\n network: \"gobi\",\n nativeCurrency: {\n decimals: 18,\n name: \"Test ZEN\",\n symbol: \"tZEN\"\n },\n rpcUrls: {\n public: { http: [\"https://gobi-testnet.horizenlabs.io/ethv1\"] },\n default: { http: [\"https://gobi-testnet.horizenlabs.io/ethv1\"] }\n },\n blockExplorers: {\n default: { name: \"Gobi Explorer\", url: \"https://gobi-explorer.horizen.io\" }\n },\n contracts: {},\n testnet: true\n};\n\n// src/goerli.ts\nvar goerli = {\n id: 5,\n network: \"goerli\",\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://goerli.infura.io/v3\"],\n webSocket: [\"wss://goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.ankr.com/eth_goerli\"]\n },\n public: {\n http: [\"https://rpc.ankr.com/eth_goerli\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0x56522D00C410a43BFfDF00a9A569489297385790\",\n blockCreated: 8765204\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n};\n\n// src/gnosis.ts\nvar gnosis = {\n id: 100,\n name: \"Gnosis\",\n network: \"gnosis\",\n nativeCurrency: {\n decimals: 18,\n name: \"Gnosis\",\n symbol: \"xDAI\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.gnosischain.com\"] },\n public: { http: [\"https://rpc.gnosischain.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Gnosisscan\",\n url: \"https://gnosisscan.io\"\n },\n default: {\n name: \"Gnosis Chain Explorer\",\n url: \"https://blockscout.com/xdai/mainnet\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 21022491\n }\n }\n};\n\n// src/gnosisChiado.ts\nvar gnosisChiado = {\n id: 10200,\n name: \"Gnosis Chiado\",\n network: \"chiado\",\n nativeCurrency: {\n decimals: 18,\n name: \"Gnosis\",\n symbol: \"xDAI\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.chiadochain.net\"] },\n public: { http: [\"https://rpc.chiadochain.net\"] }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://blockscout.chiadochain.net\"\n }\n }\n};\n\n// src/hardhat.ts\nvar hardhat = {\n id: 31337,\n name: \"Hardhat\",\n network: \"hardhat\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: { http: [\"http://127.0.0.1:8545\"] },\n public: { http: [\"http://127.0.0.1:8545\"] }\n }\n};\n\n// src/harmonyOne.ts\nvar harmonyOne = {\n id: 16666e5,\n name: \"Harmony One\",\n network: \"harmony\",\n nativeCurrency: {\n name: \"Harmony\",\n symbol: \"ONE\",\n decimals: 18\n },\n rpcUrls: {\n public: { http: [\"https://rpc.ankr.com/harmony\"] },\n default: { http: [\"https://rpc.ankr.com/harmony\"] }\n },\n blockExplorers: {\n default: { name: \"Harmony Explorer\", url: \"https://explorer.harmony.one\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 24185753\n }\n }\n};\n\n// src/haqqMainnet.ts\nvar haqqMainnet = {\n id: 11235,\n name: \"HAQQ Mainnet\",\n network: \"haqq-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Islamic Coin\",\n symbol: \"ISLM\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.eth.haqq.network\"]\n },\n public: {\n http: [\"https://rpc.eth.haqq.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"HAQQ Explorer\",\n url: \"https://explorer.haqq.network\"\n }\n }\n};\n\n// src/haqqTestedge2.ts\nvar haqqTestedge2 = {\n id: 54211,\n name: \"HAQQ Testedge 2\",\n network: \"haqq-testedge-2\",\n nativeCurrency: {\n decimals: 18,\n name: \"Islamic Coin\",\n symbol: \"ISLMT\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.eth.testedge2.haqq.network\"]\n },\n public: {\n http: [\"https://rpc.eth.testedge2.haqq.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"HAQQ Explorer\",\n url: \"https://explorer.testedge2.haqq.network\"\n }\n }\n};\n\n// src/klaytn.ts\nvar klaytn = {\n id: 8217,\n name: \"Klaytn\",\n network: \"klaytn\",\n nativeCurrency: {\n decimals: 18,\n name: \"Klaytn\",\n symbol: \"KLAY\"\n },\n rpcUrls: {\n default: { http: [\"https://cypress.fautor.app/archive\"] },\n public: { http: [\"https://cypress.fautor.app/archive\"] }\n },\n blockExplorers: {\n etherscan: { name: \"KlaytnScope\", url: \"https://scope.klaytn.com\" },\n default: { name: \"KlaytnScope\", url: \"https://scope.klaytn.com\" }\n }\n};\n\n// src/linea.ts\nvar linea = {\n id: 59144,\n name: \"Linea Mainnet\",\n network: \"linea-mainnet\",\n nativeCurrency: { name: \"Linea Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n infura: {\n http: [\"https://linea-mainnet.infura.io/v3\"],\n webSocket: [\"wss://linea-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.linea.build\"],\n webSocket: [\"wss://rpc.linea.build\"]\n },\n public: {\n http: [\"https://rpc.linea.build\"],\n webSocket: [\"wss://rpc.linea.build\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://lineascan.build\"\n },\n etherscan: {\n name: \"Etherscan\",\n url: \"https://lineascan.build\"\n },\n blockscout: {\n name: \"Blockscout\",\n url: \"https://explorer.linea.build\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 42\n }\n },\n testnet: false\n};\n\n// src/lineaTestnet.ts\nvar lineaTestnet = {\n id: 59140,\n name: \"Linea Goerli Testnet\",\n network: \"linea-testnet\",\n nativeCurrency: { name: \"Linea Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n infura: {\n http: [\"https://linea-goerli.infura.io/v3\"],\n webSocket: [\"wss://linea-goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.goerli.linea.build\"],\n webSocket: [\"wss://rpc.goerli.linea.build\"]\n },\n public: {\n http: [\"https://rpc.goerli.linea.build\"],\n webSocket: [\"wss://rpc.goerli.linea.build\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.lineascan.build\"\n },\n etherscan: {\n name: \"Etherscan\",\n url: \"https://goerli.lineascan.build\"\n },\n blockscout: {\n name: \"Blockscout\",\n url: \"https://explorer.goerli.linea.build\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 498623\n }\n },\n testnet: true\n};\n\n// src/localhost.ts\nvar localhost = {\n id: 1337,\n name: \"Localhost\",\n network: \"localhost\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: { http: [\"http://127.0.0.1:8545\"] },\n public: { http: [\"http://127.0.0.1:8545\"] }\n }\n};\n\n// src/mainnet.ts\nvar mainnet = {\n id: 1,\n network: \"homestead\",\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://mainnet.infura.io/v3\"],\n webSocket: [\"wss://mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://cloudflare-eth.com\"]\n },\n public: {\n http: [\"https://cloudflare-eth.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62\",\n blockCreated: 16966585\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/mantle.ts\nvar mantle = {\n id: 5e3,\n name: \"Mantle\",\n network: \"mantle\",\n nativeCurrency: {\n decimals: 18,\n name: \"MNT\",\n symbol: \"MNT\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.mantle.xyz\"] },\n public: { http: [\"https://rpc.mantle.xyz\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Mantle Explorer\",\n url: \"https://explorer.mantle.xyz\"\n },\n default: {\n name: \"Mantle Explorer\",\n url: \"https://explorer.mantle.xyz\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 304717\n }\n }\n};\n\n// src/mantleTestnet.ts\nvar mantleTestnet = {\n id: 5001,\n name: \"Mantle Testnet\",\n network: \"mantle\",\n nativeCurrency: {\n decimals: 18,\n name: \"MNT\",\n symbol: \"MNT\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.testnet.mantle.xyz\"] },\n public: { http: [\"https://rpc.testnet.mantle.xyz\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.testnet.mantle.xyz\"\n },\n default: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.testnet.mantle.xyz\"\n }\n },\n testnet: true\n};\n\n// src/metis.ts\nvar metis = {\n id: 1088,\n name: \"Metis\",\n network: \"andromeda\",\n nativeCurrency: {\n decimals: 18,\n name: \"Metis\",\n symbol: \"METIS\"\n },\n rpcUrls: {\n default: { http: [\"https://andromeda.metis.io/?owner=1088\"] },\n public: { http: [\"https://andromeda.metis.io/?owner=1088\"] }\n },\n blockExplorers: {\n default: {\n name: \"Andromeda Explorer\",\n url: \"https://andromeda-explorer.metis.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 2338552\n }\n }\n};\n\n// src/metisGoerli.ts\nvar metisGoerli = {\n id: 599,\n name: \"Metis Goerli\",\n network: \"metis-goerli\",\n nativeCurrency: {\n decimals: 18,\n name: \"Metis Goerli\",\n symbol: \"METIS\"\n },\n rpcUrls: {\n default: { http: [\"https://goerli.gateway.metisdevops.link\"] },\n public: { http: [\"https://goerli.gateway.metisdevops.link\"] }\n },\n blockExplorers: {\n default: {\n name: \"Metis Goerli Explorer\",\n url: \"https://goerli.explorer.metisdevops.link\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1006207\n }\n }\n};\n\n// src/mev.ts\nvar mev = {\n id: 7518,\n network: \"MEVerse\",\n name: \"MEVerse Chain Mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"MEVerse\",\n symbol: \"MEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.meversemainnet.io\"]\n },\n public: {\n http: [\"https://rpc.meversemainnet.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://www.meversescan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 86881340\n }\n }\n};\n\n// src/mevTestnet.ts\nvar mevTestnet = {\n id: 4759,\n network: \"MEVerse Testnet\",\n name: \"MEVerse Chain Testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"MEVerse\",\n symbol: \"MEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.meversetestnet.io\"]\n },\n public: {\n http: [\"https://rpc.meversetestnet.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://testnet.meversescan.io/\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 64371115\n }\n },\n testnet: true\n};\n\n// src/modeTestnet.ts\nvar modeTestnet = {\n id: 919,\n name: \"Mode Testnet\",\n network: \"mode-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.mode.network\"]\n },\n public: {\n http: [\"https://sepolia.mode.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://sepolia.explorer.mode.network\"\n }\n },\n testnet: true\n};\n\n// src/moonbaseAlpha.ts\nvar moonbaseAlpha = {\n id: 1287,\n name: \"Moonbase Alpha\",\n network: \"moonbase-alpha\",\n nativeCurrency: {\n decimals: 18,\n name: \"DEV\",\n symbol: \"DEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.api.moonbase.moonbeam.network\"],\n webSocket: [\"wss://wss.api.moonbase.moonbeam.network\"]\n },\n public: {\n http: [\"https://rpc.api.moonbase.moonbeam.network\"],\n webSocket: [\"wss://wss.api.moonbase.moonbeam.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonbase.moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonbase.moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1850686\n }\n },\n testnet: true\n};\n\n// src/moonbeam.ts\nvar moonbeam = {\n id: 1284,\n name: \"Moonbeam\",\n network: \"moonbeam\",\n nativeCurrency: {\n decimals: 18,\n name: \"GLMR\",\n symbol: \"GLMR\"\n },\n rpcUrls: {\n public: {\n http: [\"https://moonbeam.public.blastapi.io\"],\n webSocket: [\"wss://moonbeam.public.blastapi.io\"]\n },\n default: {\n http: [\"https://moonbeam.public.blastapi.io\"],\n webSocket: [\"wss://moonbeam.public.blastapi.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 609002\n }\n },\n testnet: false\n};\n\n// src/moonriver.ts\nvar moonriver = {\n id: 1285,\n name: \"Moonriver\",\n network: \"moonriver\",\n nativeCurrency: {\n decimals: 18,\n name: \"MOVR\",\n symbol: \"MOVR\"\n },\n rpcUrls: {\n public: {\n http: [\"https://moonriver.public.blastapi.io\"],\n webSocket: [\"wss://moonriver.public.blastapi.io\"]\n },\n default: {\n http: [\"https://moonriver.public.blastapi.io\"],\n webSocket: [\"wss://moonriver.public.blastapi.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonriver.moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonriver.moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1597904\n }\n },\n testnet: false\n};\n\n// src/neonDevnet.ts\nvar neonDevnet = {\n id: 245022926,\n network: \"neonDevnet\",\n name: \"Neon EVM DevNet\",\n nativeCurrency: { name: \"NEON\", symbol: \"NEON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://devnet.neonevm.org\"]\n },\n public: {\n http: [\"https://devnet.neonevm.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Neonscan\",\n url: \"https://neonscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 205206112\n }\n },\n testnet: true\n};\n\n// src/nexi.ts\nvar nexi = {\n id: 4242,\n name: \"Nexi\",\n network: \"nexi\",\n nativeCurrency: { name: \"Nexi\", symbol: \"NEXI\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.chain.nexi.technology\"]\n },\n public: {\n http: [\"https://rpc.chain.nexi.technology\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"NexiScan\",\n url: \"https://www.nexiscan.com\"\n },\n default: {\n name: \"NexiScan\",\n url: \"https://www.nexiscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E\",\n blockCreated: 25770160\n }\n }\n};\n\n// src/nexilix.ts\nvar nexilix = {\n id: 240,\n name: \"Nexilix Smart Chain\",\n network: \"nexilix\",\n nativeCurrency: {\n decimals: 18,\n name: \"Nexilix\",\n symbol: \"NEXILIX\"\n },\n rpcUrls: {\n default: { http: [\"https://rpcurl.pos.nexilix.com\"] },\n public: { http: [\"https://rpcurl.pos.nexilix.com\"] }\n },\n blockExplorers: {\n etherscan: { name: \"NexilixScan\", url: \"https://scan.nexilix.com\" },\n default: { name: \"NexilixScan\", url: \"https://scan.nexilix.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244\",\n blockCreated: 74448\n }\n }\n};\n\n// src/oasys.ts\nvar oasys = {\n id: 248,\n name: \"Oasys\",\n network: \"oasys\",\n nativeCurrency: { name: \"Oasys\", symbol: \"OAS\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mainnet.oasys.games\"]\n },\n public: {\n http: [\"https://rpc.mainnet.oasys.games\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"OasysScan\",\n url: \"https://scan.oasys.games\"\n }\n }\n};\n\n// src/okc.ts\nvar okc = {\n id: 66,\n name: \"OKC\",\n network: \"okc\",\n nativeCurrency: {\n decimals: 18,\n name: \"OKT\",\n symbol: \"OKT\"\n },\n rpcUrls: {\n default: { http: [\"https://exchainrpc.okex.org\"] },\n public: { http: [\"https://exchainrpc.okex.org\"] }\n },\n blockExplorers: {\n default: { name: \"oklink\", url: \"https://www.oklink.com/okc\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 10364792\n }\n }\n};\n\n// src/optimism.ts\nvar optimism = {\n id: 10,\n name: \"OP Mainnet\",\n network: \"optimism\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://opt-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://optimism-mainnet.infura.io/v3\"],\n webSocket: [\"wss://optimism-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://mainnet.optimism.io\"]\n },\n public: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://optimistic.etherscan.io\"\n },\n default: {\n name: \"Optimism Explorer\",\n url: \"https://explorer.optimism.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n }\n }\n};\n\n// src/optimismGoerli.ts\nvar optimismGoerli = {\n id: 420,\n name: \"Optimism Goerli\",\n network: \"optimism-goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://opt-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://optimism-goerli.infura.io/v3\"],\n webSocket: [\"wss://optimism-goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://goerli.optimism.io\"]\n },\n public: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n }\n },\n testnet: true\n};\n\n// src/polygon.ts\nvar polygon = {\n id: 137,\n name: \"Polygon\",\n network: \"matic\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://polygon-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://polygon-mainnet.infura.io/v3\"],\n webSocket: [\"wss://polygon-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://polygon-rpc.com\"]\n },\n public: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n};\n\n// src/polygonMumbai.ts\nvar polygonMumbai = {\n id: 80001,\n name: \"Polygon Mumbai\",\n network: \"maticmum\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"],\n webSocket: [\"wss://polygon-mumbai.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://polygon-mumbai.infura.io/v3\"],\n webSocket: [\"wss://polygon-mumbai.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://matic-mumbai.chainstacklabs.com\"]\n },\n public: {\n http: [\"https://matic-mumbai.chainstacklabs.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n};\n\n// src/polygonZkEvmTestnet.ts\nvar polygonZkEvmTestnet = {\n id: 1442,\n name: \"Polygon zkEVM Testnet\",\n network: \"polygon-zkevm-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.public.zkevm-test.net\"]\n },\n public: {\n http: [\"https://rpc.public.zkevm-test.net\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"Blockscout\",\n url: \"https://explorer.public.zkevm-test.net\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://testnet-zkevm.polygonscan.com\"\n }\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 525686\n }\n }\n};\n\n// src/polygonZkEvm.ts\nvar polygonZkEvm = {\n id: 1101,\n name: \"Polygon zkEVM\",\n network: \"polygon-zkevm\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://zkevm-rpc.com\"]\n },\n public: {\n http: [\"https://zkevm-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://zkevm.polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 57746\n }\n }\n};\n\n// src/pulsechain.ts\nvar pulsechain = {\n id: 369,\n network: \"pulsechain\",\n name: \"PulseChain\",\n nativeCurrency: { name: \"Pulse\", symbol: \"PLS\", decimals: 18 },\n testnet: false,\n rpcUrls: {\n default: {\n http: [\"https://rpc.pulsechain.com\"],\n webSocket: [\"wss://ws.pulsechain.com\"]\n },\n public: {\n http: [\"https://rpc.pulsechain.com\"],\n webSocket: [\"wss://ws.pulsechain.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PulseScan\",\n url: \"https://scan.pulsechain.com\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/pulsechainV4.ts\nvar pulsechainV4 = {\n id: 943,\n network: \"pulsechainV4\",\n name: \"PulseChain V4\",\n testnet: true,\n nativeCurrency: { name: \"V4 Pulse\", symbol: \"v4PLS\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.v4.testnet.pulsechain.com\"],\n webSocket: [\"wss://ws.v4.testnet.pulsechain.com\"]\n },\n public: {\n http: [\"https://rpc.v4.testnet.pulsechain.com\"],\n webSocket: [\"wss://ws.v4.testnet.pulsechain.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PulseScan\",\n url: \"https://scan.v4.testnet.pulsechain.com\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/qMainnet.ts\nvar qMainnet = {\n id: 35441,\n name: \"Q Mainnet\",\n network: \"q-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Q\",\n symbol: \"Q\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.q.org\"] },\n public: { http: [\"https://rpc.q.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Q Mainnet Explorer\",\n url: \"https://explorer.q.org\"\n }\n }\n};\n\n// src/qTestnet.ts\nvar qTestnet = {\n id: 35443,\n name: \"Q Testnet\",\n network: \"q-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Q\",\n symbol: \"Q\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.qtestnet.org\"] },\n public: { http: [\"https://rpc.qtestnet.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Q Testnet Explorer\",\n url: \"https://explorer.qtestnet.org\"\n }\n },\n testnet: true\n};\n\n// src/rollux.ts\nvar rollux = {\n id: 570,\n name: \"Rollux Mainnet\",\n network: \"rollux\",\n nativeCurrency: {\n decimals: 18,\n name: \"Syscoin\",\n symbol: \"SYS\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.rollux.com\"],\n webSocket: [\"wss://rpc.rollux.com/wss\"]\n },\n public: { http: [\"https://rollux.public-rpc.com\"] }\n },\n blockExplorers: {\n default: { name: \"RolluxExplorer\", url: \"https://explorer.rollux.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 119222\n }\n }\n};\n\n// src/rolluxTestnet.ts\nvar rolluxTestnet = {\n id: 57e3,\n name: \"Rollux Testnet\",\n network: \"rollux-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Syscoin\",\n symbol: \"SYS\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc-tanenbaum.rollux.com/\"],\n webSocket: [\"wss://rpc-tanenbaum.rollux.com/wss\"]\n },\n public: { http: [\"https://rpc-tanenbaum.rollux.com/\"] }\n },\n blockExplorers: {\n default: {\n name: \"RolluxTestnetExplorer\",\n url: \"https://rollux.tanenbaum.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1813675\n }\n }\n};\n\n// src/ronin.ts\nvar ronin = {\n id: 2020,\n name: \"Ronin\",\n network: \"ronin\",\n nativeCurrency: { name: \"RON\", symbol: \"RON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://api.roninchain.com/rpc\"]\n },\n public: {\n http: [\"https://api.roninchain.com/rpc\"]\n }\n },\n blockExplorers: {\n default: { name: \"Ronin Explorer\", url: \"https://app.roninchain.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 26023535\n }\n }\n};\n\n// src/saigon.ts\nvar saigon = {\n id: 2021,\n name: \"Saigon Testnet\",\n network: \"saigon\",\n nativeCurrency: { name: \"RON\", symbol: \"RON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://saigon-testnet.roninchain.com/rpc\"]\n },\n public: {\n http: [\"https://saigon-testnet.roninchain.com/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Saigon Explorer\",\n url: \"https://saigon-explorer.roninchain.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 18736871\n }\n },\n testnet: true\n};\n\n// src/scrollSepolia.ts\nvar scrollSepolia = {\n id: 534351,\n name: \"Scroll Sepolia\",\n network: \"scroll-sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia-rpc.scroll.io\"],\n webSocket: [\"wss://sepolia-rpc.scroll.io/ws\"]\n },\n public: {\n http: [\"https://sepolia-rpc.scroll.io\"],\n webSocket: [\"wss://sepolia-rpc.scroll.io/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://sepolia-blockscout.scroll.io\"\n }\n },\n testnet: true\n};\n\n// src/scrollTestnet.ts\nvar scrollTestnet = {\n id: 534353,\n name: \"Scroll Testnet\",\n network: \"scroll-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://alpha-rpc.scroll.io/l2\"],\n webSocket: [\"wss://alpha-rpc.scroll.io/l2/ws\"]\n },\n public: {\n http: [\"https://alpha-rpc.scroll.io/l2\"],\n webSocket: [\"wss://alpha-rpc.scroll.io/l2/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://blockscout.scroll.io\"\n }\n },\n testnet: true\n};\n\n// src/sapphire.ts\nvar sapphire = {\n id: 23294,\n name: \"Oasis Sapphire\",\n network: \"sapphire\",\n nativeCurrency: {\n decimals: 18,\n name: \"Oasis ROSE\",\n symbol: \"ROSE\"\n },\n rpcUrls: {\n default: {\n http: [\"https://sapphire.oasis.io\"],\n webSocket: [\"wss://sapphire.oasis.io/ws\"]\n },\n public: {\n http: [\"https://sapphire.oasis.io\"],\n webSocket: [\"wss://sapphire.oasis.io/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Oasis Explorer\",\n url: \"https://explorer.oasis.io/mainnet/sapphire\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 734531\n }\n }\n};\n\n// src/sapphireTestnet.ts\nvar sapphireTestnet = {\n id: 23295,\n name: \"Oasis Sapphire Testnet\",\n network: \"sapphireTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Oasis TEST\",\n symbol: \"TEST\"\n },\n rpcUrls: {\n default: {\n http: [\"https://testnet.sapphire.oasis.dev\"],\n webSocket: [\"wss://testnet.sapphire.oasis.dev/ws\"]\n },\n public: {\n http: [\"https://testnet.sapphire.oasis.dev\"],\n webSocket: [\"wss://testnet.sapphire.oasis.dev/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Oasis Explorer\",\n url: \"https://explorer.oasis.io/testnet/sapphire\"\n }\n }\n};\n\n// src/sepolia.ts\nvar sepolia = {\n id: 11155111,\n network: \"sepolia\",\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"SEP\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-sepolia.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://sepolia.infura.io/v3\"],\n webSocket: [\"wss://sepolia.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.sepolia.org\"]\n },\n public: {\n http: [\"https://rpc.sepolia.org\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n};\n\n// src/skale/brawl.ts\nvar skaleBlockBrawlers = {\n id: 391845894,\n name: \"SKALE | Block Brawlers\",\n network: \"skale-brawl\",\n nativeCurrency: { name: \"BRAWL\", symbol: \"BRAWL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/frayed-decent-antares\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/frayed-decent-antares\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://frayed-decent-antares.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://frayed-decent-antares.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/calypso.ts\nvar skaleCalypso = {\n id: 1564830818,\n name: \"SKALE | Calypso NFT Hub\",\n network: \"skale-calypso\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"],\n webSocket: [\n \"wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague\"\n ]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"],\n webSocket: [\n \"wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 3107626\n }\n }\n};\n\n// src/skale/calypsoTestnet.ts\nvar skaleCalypsoTestnet = {\n id: 344106930,\n name: \"SKALE | Calypso NFT Hub Testnet\",\n network: \"skale-calypso-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-utter-unripe-menkar\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-utter-unripe-menkar\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2131424\n }\n },\n testnet: true\n};\n\n// src/skale/chaosTestnet.ts\nvar skaleChaosTestnet = {\n id: 1351057110,\n name: \"SKALE | Chaos Testnet\",\n network: \"skale-chaos-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-fast-active-bellatrix\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-fast-active-bellatrix\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1192202\n }\n },\n testnet: true\n};\n\n// src/skale/cryptoBlades.ts\nvar skaleCryptoBlades = {\n id: 1026062157,\n name: \"SKALE | CryptoBlades\",\n network: \"skale-cryptoblades\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux\"],\n webSocket: [\n \"wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux\"\n ]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux\"],\n webSocket: [\n \"wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/cryptoColosseum.ts\nvar skaleCryptoColosseum = {\n id: 2046399126,\n name: \"SKALE | Crypto Colosseum\",\n network: \"skale-crypto-coloseeum\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/haunting-devoted-deneb\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/haunting-devoted-deneb\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/europa.ts\nvar skaleEuropa = {\n id: 2046399126,\n name: \"SKALE | Europa Liquidity Hub\",\n network: \"skale-europa\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://elated-tan-skat.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://elated-tan-skat.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 3113495\n }\n }\n};\n\n// src/skale/europaTestnet.ts\nvar skaleEuropaTestnet = {\n id: 476158412,\n name: \"SKALE | Europa Liquidity Hub Testnet\",\n network: \"skale-europa-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor\"],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-legal-crazy-castor\"\n ]\n },\n public: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor\"],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-legal-crazy-castor\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2071911\n }\n },\n testnet: true\n};\n\n// src/skale/exorde.ts\nvar skaleExorde = {\n id: 2139927552,\n name: \"SKALE | Exorde\",\n network: \"skale-exorde\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/light-vast-diphda\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/light-vast-diphda\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://light-vast-diphda.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://light-vast-diphda.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/humanProtocol.ts\nvar skaleHumanProtocol = {\n id: 1273227453,\n name: \"SKALE | Human Protocol\",\n network: \"skale-human-protocol\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/wan-red-ain\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/wan-red-ain\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/wan-red-ain\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/wan-red-ain\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://wan-red-ain.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://wan-red-ain.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/nebula.ts\nvar skaleNebula = {\n id: 1482601649,\n name: \"SKALE | Nebula Gaming Hub\",\n network: \"skale-nebula\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2372986\n }\n }\n};\n\n// src/skale/nebulaTestnet.ts\nvar skaleNebulaTestnet = {\n id: 503129905,\n name: \"SKALE | Nebula Gaming Hub Testnet\",\n network: \"skale-nebula-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird\"],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird\"\n ]\n },\n public: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird\"],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2205882\n }\n },\n testnet: true\n};\n\n// src/skale/razor.ts\nvar skaleRazor = {\n id: 278611351,\n name: \"SKALE | Razor Network\",\n network: \"skale-razor\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/turbulent-unique-scheat\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/turbulent-unique-scheat\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/titan.ts\nvar skaleTitan = {\n id: 1350216234,\n name: \"SKALE | Titan Community Hub\",\n network: \"skale-titan\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"],\n webSocket: [\"wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2076458\n }\n }\n};\n\n// src/skale/titanTestnet.ts\nvar skaleTitanTestnet = {\n id: 1517929550,\n name: \"SKALE | Titan Community Hub Testnet\",\n network: \"skale-titan-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-aware-chief-gianfar\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar\"\n ],\n webSocket: [\n \"wss://staging-v3.skalenodes.com/v1/ws/staging-aware-chief-gianfar\"\n ]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"SKALE Explorer\",\n url: \"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 2085155\n }\n },\n testnet: true\n};\n\n// src/songbird.ts\nvar songbird = {\n id: 19,\n name: \"Songbird Mainnet\",\n network: \"songbird-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"songbird\",\n symbol: \"SGB\"\n },\n rpcUrls: {\n default: { http: [\"https://songbird-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://songbird-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Songbird Explorer\",\n url: \"https://songbird-explorer.flare.network\"\n }\n }\n};\n\n// src/songbirdTestnet.ts\nvar songbirdTestnet = {\n id: 16,\n name: \"Coston\",\n network: \"coston\",\n nativeCurrency: {\n decimals: 18,\n name: \"costonflare\",\n symbol: \"CFLR\"\n },\n rpcUrls: {\n default: { http: [\"https://coston-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://coston-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Coston Explorer\",\n url: \"https://coston-explorer.flare.network\"\n }\n },\n testnet: true\n};\n\n// src/shardeumSphinx.ts\nvar shardeumSphinx = {\n id: 8082,\n name: \"Shardeum Sphinx\",\n network: \"shmSphinx\",\n nativeCurrency: { name: \"SHARDEUM\", symbol: \"SHM\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sphinx.shardeum.org\"]\n },\n public: {\n http: [\"https://sphinx.shardeum.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Shardeum Explorer\",\n url: \"https://explorer-sphinx.shardeum.org\"\n }\n },\n testnet: true\n};\n\n// src/syscoin.ts\nvar syscoin = {\n id: 57,\n name: \"Syscoin Mainnet\",\n network: \"syscoin\",\n nativeCurrency: {\n decimals: 18,\n name: \"Syscoin\",\n symbol: \"SYS\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.syscoin.org\"],\n webSocket: [\"wss://rpc.syscoin.org/wss\"]\n },\n public: {\n http: [\"https://rpc.syscoin.org\"],\n webSocket: [\"wss://rpc.syscoin.org/wss\"]\n }\n },\n blockExplorers: {\n default: { name: \"SyscoinExplorer\", url: \"https://explorer.syscoin.org\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 287139\n }\n }\n};\n\n// src/syscoinTestnet.ts\nvar syscoinTestnet = {\n id: 5700,\n name: \"Syscoin Tanenbaum Testnet\",\n network: \"syscoin-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Syscoin\",\n symbol: \"SYS\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.tanenbaum.io\"],\n webSocket: [\"wss://rpc.tanenbaum.io/wss\"]\n },\n public: {\n http: [\"https://rpc.tanenbaum.io\"],\n webSocket: [\"wss://rpc.tanenbaum.io/wss\"]\n }\n },\n blockExplorers: {\n default: { name: \"SyscoinTestnetExplorer\", url: \"https://tanenbaum.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 271288\n }\n }\n};\n\n// src/taraxa.ts\nvar taraxa = {\n id: 841,\n name: \"Taraxa Mainnet\",\n network: \"taraxa\",\n nativeCurrency: { name: \"Tara\", symbol: \"TARA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mainnet.taraxa.io\"]\n },\n public: {\n http: [\"https://rpc.mainnet.taraxa.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Taraxa Explorer\",\n url: \"https://explorer.mainnet.taraxa.io\"\n }\n }\n};\n\n// src/taikoTestnetSepolia.ts\nvar taikoTestnetSepolia = {\n id: 167005,\n name: \"Taiko (Alpha-3 Testnet)\",\n network: \"taiko-sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.test.taiko.xyz\"]\n },\n public: {\n http: [\"https://rpc.test.taiko.xyz\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"blockscout\",\n url: \"https://explorer.test.taiko.xyz\"\n }\n }\n};\n\n// src/taraxaTestnet.ts\nvar taraxaTestnet = {\n id: 842,\n name: \"Taraxa Testnet\",\n network: \"taraxa-testnet\",\n nativeCurrency: { name: \"Tara\", symbol: \"TARA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet.taraxa.io\"]\n },\n public: {\n http: [\"https://rpc.testnet.taraxa.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Taraxa Explorer\",\n url: \"https://explorer.testnet.taraxa.io\"\n }\n },\n testnet: true\n};\n\n// src/telos.ts\nvar telos = {\n id: 40,\n name: \"Telos\",\n network: \"telos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Telos\",\n symbol: \"TLOS\"\n },\n rpcUrls: {\n default: { http: [\"https://mainnet.telos.net/evm\"] },\n public: { http: [\"https://mainnet.telos.net/evm\"] }\n },\n blockExplorers: {\n default: {\n name: \"Teloscan\",\n url: \"https://www.teloscan.io/\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 246530709\n }\n }\n};\n\n// src/telosTestnet.ts\nvar telosTestnet = {\n id: 41,\n name: \"Telos\",\n network: \"telosTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Telos\",\n symbol: \"TLOS\"\n },\n rpcUrls: {\n default: { http: [\"https://testnet.telos.net/evm\"] },\n public: { http: [\"https://testnet.telos.net/evm\"] }\n },\n blockExplorers: {\n default: {\n name: \"Teloscan (testnet)\",\n url: \"https://testnet.teloscan.io/\"\n }\n },\n testnet: true\n};\n\n// src/thunderTestnet.ts\nvar thunderTestnet = {\n id: 997,\n name: \"5ireChain Thunder Testnet\",\n network: \"5ireChain\",\n nativeCurrency: { name: \"5ire Token\", symbol: \"5IRE\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-testnet.5ire.network\"]\n },\n public: {\n http: [\"https://rpc-testnet.5ire.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"5ireChain Explorer\",\n url: \"https://explorer.5ire.network\"\n }\n },\n testnet: true\n};\n\n// src/volta.ts\nvar volta = {\n id: 73799,\n name: \"Volta Chain\",\n network: \"volta\",\n nativeCurrency: { name: \"VT\", symbol: \"VT\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://volta-rpc.energyweb.org\"]\n },\n public: {\n http: [\"https://volta-rpc.energyweb.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Volta Explorer\",\n url: \"https://volta-explorer.energyweb.org\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac\"\n }\n }\n};\n\n// src/wanchain.ts\nvar wanchain = {\n id: 888,\n name: \"Wanchain\",\n network: \"wanchain\",\n nativeCurrency: { name: \"WANCHAIN\", symbol: \"WAN\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://gwan-ssl.wandevs.org:56891\",\n \"https://gwan2-ssl.wandevs.org\"\n ]\n },\n public: {\n http: [\n \"https://gwan-ssl.wandevs.org:56891\",\n \"https://gwan2-ssl.wandevs.org\"\n ]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"WanScan\",\n url: \"https://wanscan.org\"\n },\n default: {\n name: \"WanScan\",\n url: \"https://wanscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB\",\n blockCreated: 25312390\n }\n }\n};\n\n// src/wanchainTestnet.ts\nvar wanchainTestnet = {\n id: 999,\n name: \"Wanchain Testnet\",\n network: \"wanchainTestnet\",\n nativeCurrency: { name: \"WANCHAIN\", symbol: \"WANt\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gwan-ssl.wandevs.org:46891\"]\n },\n public: {\n http: [\"https://gwan-ssl.wandevs.org:46891\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"WanScanTest\",\n url: \"https://wanscan.org\"\n },\n default: {\n name: \"WanScanTest\",\n url: \"https://wanscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x11c89bF4496c39FB80535Ffb4c92715839CC5324\",\n blockCreated: 24743448\n }\n },\n testnet: true\n};\n\n// src/xdc.ts\nvar xdc = {\n id: 50,\n name: \"XinFin Network\",\n network: \"xdc\",\n nativeCurrency: {\n decimals: 18,\n name: \"XDC\",\n symbol: \"XDC\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.xinfin.network\"] },\n public: { http: [\"https://rpc.xinfin.network\"] }\n },\n blockExplorers: {\n xinfin: { name: \"XinFin\", url: \"https://explorer.xinfin.network\" },\n default: { name: \"Blocksscan\", url: \"https://xdc.blocksscan.io\" }\n }\n};\n\n// src/xdcTestnet.ts\nvar xdcTestnet = {\n id: 51,\n name: \"Apothem Network\",\n network: \"xdc-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"TXDC\",\n symbol: \"TXDC\"\n },\n rpcUrls: {\n default: { http: [\"https://erpc.apothem.network\"] },\n public: { http: [\"https://erpc.apothem.network\"] }\n },\n blockExplorers: {\n xinfin: { name: \"XinFin\", url: \"https://explorer.apothem.network\" },\n default: { name: \"Blocksscan\", url: \"https://apothem.blocksscan.io\" }\n }\n};\n\n// src/zhejiang.ts\nvar zhejiang = {\n id: 1337803,\n network: \"zhejiang\",\n name: \"Zhejiang\",\n nativeCurrency: { name: \"Zhejiang Ether\", symbol: \"ZhejETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zhejiang.ethpandaops.io\"]\n },\n public: {\n http: [\"https://rpc.zhejiang.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n beaconchain: {\n name: \"Etherscan\",\n url: \"https://zhejiang.beaconcha.in\"\n },\n blockscout: {\n name: \"Blockscout\",\n url: \"https://blockscout.com/eth/zhejiang-testnet\"\n },\n default: {\n name: \"Beaconchain\",\n url: \"https://zhejiang.beaconcha.in\"\n }\n },\n testnet: true\n};\n\n// src/zkSync.ts\nvar zkSync = {\n id: 324,\n name: \"zkSync Era\",\n network: \"zksync-era\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.era.zksync.io\"],\n webSocket: [\"wss://mainnet.era.zksync.io/ws\"]\n },\n public: {\n http: [\"https://mainnet.era.zksync.io\"],\n webSocket: [\"wss://mainnet.era.zksync.io/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"zkExplorer\",\n url: \"https://explorer.zksync.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xF9cda624FBC7e059355ce98a31693d299FACd963\"\n }\n }\n};\n\n// src/zkSyncTestnet.ts\nvar zkSyncTestnet = {\n id: 280,\n name: \"zkSync Era Testnet\",\n network: \"zksync-era-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://testnet.era.zksync.dev\"],\n webSocket: [\"wss://testnet.era.zksync.dev/ws\"]\n },\n public: {\n http: [\"https://testnet.era.zksync.dev\"],\n webSocket: [\"wss://testnet.era.zksync.dev/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"zkExplorer\",\n url: \"https://goerli.explorer.zksync.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xF9cda624FBC7e059355ce98a31693d299FACd963\"\n }\n },\n testnet: true\n};\n\n// src/zetachainAthensTestnet.ts\nvar zetachainAthensTestnet = {\n id: 7001,\n name: \"ZetaChain Athens Testnet\",\n network: \"zetachain-athens-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zeta\",\n symbol: \"aZETA\"\n },\n rpcUrls: {\n public: {\n http: [\"https://zetachain-athens-evm.blockpi.network/v1/rpc/public\"]\n },\n default: {\n http: [\"https://zetachain-athens-evm.blockpi.network/v1/rpc/public\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"ZetaScan\",\n url: \"https://athens3.explorer.zetachain.com\"\n }\n },\n testnet: true\n};\n\n// src/zora.ts\nvar zora = {\n id: 7777777,\n name: \"Zora\",\n network: \"zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n },\n public: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: { name: \"Explorer\", url: \"https://explorer.zora.energy\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n }\n }\n};\n\n// src/zoraTestnet.ts\nvar zoraTestnet = {\n id: 999,\n name: \"Zora Goerli Testnet\",\n network: \"zora-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Goerli\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://testnet.rpc.zora.energy\"],\n webSocket: [\"wss://testnet.rpc.zora.energy\"]\n },\n public: {\n http: [\"https://testnet.rpc.zora.energy\"],\n webSocket: [\"wss://testnet.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: { name: \"Explorer\", url: \"https://testnet.explorer.zora.energy\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 189123\n }\n },\n testnet: true\n};\nexport {\n arbitrum,\n arbitrumGoerli,\n arbitrumNova,\n aurora,\n auroraTestnet,\n avalanche,\n avalancheFuji,\n base,\n baseGoerli,\n bearNetworkChainMainnet,\n bearNetworkChainTestnet,\n boba,\n bronos,\n bronosTestnet,\n bsc,\n bscTestnet,\n bxn,\n bxnTestnet,\n canto,\n celo,\n celoAlfajores,\n celoCannoli,\n classic,\n confluxESpace,\n cronos,\n cronosTestnet,\n crossbell,\n dfk,\n dogechain,\n edgeware,\n edgewareTestnet,\n ekta,\n ektaTestnet,\n emerald,\n eos,\n eosTestnet,\n evmos,\n evmosTestnet,\n ewc,\n fantom,\n fantomTestnet,\n fibo,\n filecoin,\n filecoinCalibration,\n filecoinHyperspace,\n flare,\n flareTestnet,\n foundry,\n fuse,\n fuseSparknet,\n gnosis,\n gnosisChiado,\n gobi,\n goerli,\n haqqMainnet,\n haqqTestedge2,\n hardhat,\n harmonyOne,\n iotex,\n iotexTestnet,\n klaytn,\n linea,\n lineaTestnet,\n localhost,\n mainnet,\n mantle,\n mantleTestnet,\n metis,\n metisGoerli,\n mev,\n mevTestnet,\n modeTestnet,\n moonbaseAlpha,\n moonbeam,\n moonriver,\n neonDevnet,\n nexi,\n nexilix,\n oasys,\n okc,\n optimism,\n optimismGoerli,\n polygon,\n polygonMumbai,\n polygonZkEvm,\n polygonZkEvmTestnet,\n pulsechain,\n pulsechainV4,\n qMainnet,\n qTestnet,\n rollux,\n rolluxTestnet,\n ronin,\n saigon,\n sapphire,\n sapphireTestnet,\n scrollSepolia,\n scrollTestnet,\n sepolia,\n shardeumSphinx,\n skaleBlockBrawlers,\n skaleCalypso,\n skaleCalypsoTestnet,\n skaleChaosTestnet,\n skaleCryptoBlades,\n skaleCryptoColosseum,\n skaleEuropa,\n skaleEuropaTestnet,\n skaleExorde,\n skaleHumanProtocol,\n skaleNebula,\n skaleNebulaTestnet,\n skaleRazor,\n skaleTitan,\n skaleTitanTestnet,\n songbird,\n songbirdTestnet,\n syscoin,\n syscoinTestnet,\n taikoTestnetSepolia,\n taraxa,\n taraxaTestnet,\n telos,\n telosTestnet,\n thunderTestnet,\n volta,\n wanchain,\n wanchainTestnet,\n xdc,\n xdcTestnet,\n zetachainAthensTestnet,\n zhejiang,\n zkSync,\n zkSyncTestnet,\n zora,\n zoraTestnet\n};\n","import * as wagmiChains from '@wagmi/chains'\nimport type { EvmNetworkConfigInterface } from './Provider'\n\nconst networks: Record = {}\n\nfor (const key of Object.keys(wagmiChains)) {\n const wagmiChain: wagmiChains.Chain = wagmiChains[key as keyof typeof wagmiChains]\n\n let backupRpcUrl = ''\n if (wagmiChain.rpcUrls?.infura !== undefined) {\n backupRpcUrl = wagmiChain.rpcUrls.infura.http[0]\n } else if (wagmiChain.rpcUrls?.alchemy !== undefined) {\n backupRpcUrl = wagmiChain.rpcUrls.alchemy.http[0]\n }\n\n const network: EvmNetworkConfigInterface = {\n id: wagmiChain.id,\n name: wagmiChain.name,\n testnet: wagmiChain.testnet ?? false,\n nativeCurrency: wagmiChain.nativeCurrency,\n hexId: '0x' + Number(wagmiChain.id).toString(16),\n explorerUrl: wagmiChain.blockExplorers?.default.url ?? '',\n rpcUrl: wagmiChain.rpcUrls?.default.http[0] ?? backupRpcUrl\n }\n\n if (wagmiChain.rpcUrls?.default.webSocket !== undefined) {\n network.wsUrl = wagmiChain.rpcUrls.default.webSocket[0]\n }\n\n if (wagmiChain.rpcUrls?.infura?.webSocket !== undefined && network.wsUrl === undefined) {\n network.wsUrl = wagmiChain.rpcUrls.infura.webSocket[0]\n }\n\n if (wagmiChain.rpcUrls?.alchemy?.webSocket !== undefined && network.wsUrl === undefined) {\n network.wsUrl = wagmiChain.rpcUrls.alchemy.webSocket[0]\n }\n\n if (network.wsUrl === undefined) {\n delete network.wsUrl\n }\n\n networks[key === 'mainnet' ? 'ethereum' : key] = network\n}\n\nconst findById = (id: number): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.id === id)\n}\n\nconst findByKey = (key: string): EvmNetworkConfigInterface | undefined => {\n return networks[key]\n}\n\nconst findByName = (name: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.name?.includes(name))\n}\n\nconst findByHexId = (hexId: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.hexId === hexId)\n}\n\nconst findBySymbol = (symbol: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.nativeCurrency.symbol === symbol)\n}\n\nconst getTestnets = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks).filter((network) => network.testnet ?? false)\n}\n\nconst getMainnets = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks).filter((network) => !(network.testnet ?? false))\n}\n\nconst getAll = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks)\n}\n\nconst add = (key: string, network: EvmNetworkConfigInterface): void => {\n networks[key] = network\n}\n\nexport default {\n add,\n getAll,\n findById,\n findByKey,\n findByName,\n findByHexId,\n findBySymbol,\n getTestnets,\n getMainnets,\n ...networks\n}\n","import type { RequestType } from '../Wallet'\nimport networks from '../../services/Networks'\nimport type { EIP1193Provider } from './EIP6963'\nimport { ErrorTypeEnum } from '@multiplechain/types'\nimport type { EvmNetworkConfigInterface, Provider } from '../../services/Provider'\n\nexport const switcher = async (wallet: EIP1193Provider, provider?: Provider): Promise => {\n const network = provider?.network\n\n const request = async (params: RequestType): Promise => {\n const res = await wallet.request(params)\n if (res?.error !== undefined) {\n const error = res.error as {\n code: number\n message: string\n }\n if (error.code === -32000) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(error.message)\n }\n\n return res\n }\n\n const addNetwork = async (network: EvmNetworkConfigInterface): Promise => {\n return await new Promise((resolve, reject) => {\n try {\n request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: network.hexId,\n chainName: network.name,\n rpcUrls: [network.rpcUrl],\n nativeCurrency: network.nativeCurrency,\n blockExplorerUrls: [network.explorerUrl]\n }\n ]\n })\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n\n const changeNetwork = async (_network: EvmNetworkConfigInterface): Promise => {\n return await new Promise((resolve, reject) => {\n const chainId = `0x${_network.id.toString(16)}`\n request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId }]\n })\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n if (\n error.code === 4902 ||\n String(error.message).includes('wallet_addEthereumChain')\n ) {\n const network = networks.findById(_network.id)\n if (network === undefined) {\n resolve(true)\n return\n }\n addNetwork(network)\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n reject(error)\n })\n } else {\n reject(error)\n }\n })\n })\n }\n\n const getChainId = async (): Promise => {\n return parseInt((await request({ method: 'eth_chainId' })) as string, 16)\n }\n\n const maybeSwitch = async (): Promise => {\n return await new Promise((resolve, reject) => {\n if (network === undefined) {\n resolve(true)\n return\n }\n try {\n const check = async (): Promise => {\n if ((await getChainId()) !== network.id) {\n changeNetwork(network)\n .then(() => {\n setTimeout(() => {\n resolve(true)\n }, 1000)\n })\n .catch((error) => {\n reject(error)\n })\n } else {\n resolve(true)\n }\n }\n void check()\n } catch (error) {\n reject(error)\n }\n })\n }\n\n return await maybeSwitch()\n}\n","export default {\n metaMask:\n 'data:image/svg+xml,%3Csvg%20fill%3D%22none%22%20height%3D%2233%22%20viewBox%3D%220%200%2035%2033%22%20width%3D%2235%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%22.25%22%3E%3Cpath%20d%3D%22m32.9582%201-13.1341%209.7183%202.4424-5.72731z%22%20fill%3D%22%23e17726%22%20stroke%3D%22%23e17726%22%2F%3E%3Cg%20fill%3D%22%23e27625%22%20stroke%3D%22%23e27625%22%3E%3Cpath%20d%3D%22m2.66296%201%2013.01714%209.809-2.3254-5.81802z%22%2F%3E%3Cpath%20d%3D%22m28.2295%2023.5335-3.4947%205.3386%207.4829%202.0603%202.1436-7.2823z%22%2F%3E%3Cpath%20d%3D%22m1.27281%2023.6501%202.13055%207.2823%207.46994-2.0603-3.48166-5.3386z%22%2F%3E%3Cpath%20d%3D%22m10.4706%2014.5149-2.0786%203.1358%207.405.3369-.2469-7.969z%22%2F%3E%3Cpath%20d%3D%22m25.1505%2014.5149-5.1575-4.58704-.1688%208.05974%207.4049-.3369z%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721%204.4819-2.1639-3.8583-3.0062z%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082%204.4689%202.1639-.6105-5.1701z%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m24.7348%2028.8721-4.469-2.1639.3638%202.9025-.039%201.231z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m10.8732%2028.8721%204.1572%201.9696-.026-1.231.3508-2.9025z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m15.1084%2021.7842-3.7155-1.0884%202.6243-1.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m20.5126%2021.7842%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721.6495-5.3386-4.13117.1167z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m24.0982%2023.5335.6366%205.3386%203.4946-5.2219z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m27.2291%2017.6507-7.405.3369.6885%203.7966%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958%202.6242-1.2051%201.0913%202.2935.6885-3.7966-7.40495-.3369z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m8.392%2017.6507%203.1049%206.0513-.1039-3.0062z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m24.2412%2020.6958-.1169%203.0062%203.1049-6.0513z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m15.797%2017.9876-.6886%203.7967.8704%204.4833.1949-5.9087z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m19.8242%2017.9876-.3638%202.3584.1819%205.9216.8704-4.4833z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m20.5127%2021.7842-.8704%204.4834.6236.4406%203.8584-3.0062.1169-3.0062z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958.104%203.0062%203.8583%203.0062.6236-.4406-.8704-4.4834z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m20.5906%2030.8417.039-1.231-.3378-.2851h-4.9626l-.3248.2851.026%201.231-4.1572-1.9696%201.4551%201.1921%202.9489%202.0344h5.0536l2.962-2.0344%201.442-1.1921z%22%20fill%3D%22%23c0ac9d%22%20stroke%3D%22%23c0ac9d%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082-.6236-.4406h-3.6635l-.6236.4406-.3508%202.9025.3248-.2851h4.9626l.3378.2851z%22%20fill%3D%22%23161616%22%20stroke%3D%22%23161616%22%2F%3E%3Cpath%20d%3D%22m33.5168%2011.3532%201.1043-5.36447-1.6629-4.98873-12.6923%209.3944%204.8846%204.1205%206.8983%202.0085%201.52-1.7752-.6626-.4795%201.0523-.9588-.8054-.622%201.0523-.8034z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m1%205.98873%201.11724%205.36447-.71451.5313%201.06527.8034-.80545.622%201.05228.9588-.66255.4795%201.51997%201.7752%206.89835-2.0085%204.8846-4.1205-12.69233-9.3944z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m32.0489%2016.5234-6.8983-2.0085%202.0786%203.1358-3.1049%206.0513%204.1052-.0519h6.1318z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m10.4705%2014.5149-6.89828%202.0085-2.29944%207.1267h6.11883l4.10519.0519-3.10487-6.0513z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m19.8241%2017.9876.4417-7.5932%202.0007-5.4034h-8.9119l2.0006%205.4034.4417%207.5932.1689%202.3842.013%205.8958h3.6635l.013-5.8958z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n walletConnect:\n 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIgaWQ9IkxheWVyXzEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAzODcuNiAyMzcuNiIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9IldhbGxldENvbm5lY3RfMDAwMDAwNzM3MDMwNjM0MzgyMjA2NDI3MzAwMDAwMDI5MTc3MTc1NTIyMzY0NzI0OTZfIiBmaWxsPSIjM0I5OUZDIiBkPSJNNzkuNCw0Ni40CgljNjMuMi02MS45LDE2NS43LTYxLjksMjI4LjksMGw3LjYsNy40YzMuMiwzLjEsMy4yLDguMSwwLDExLjJsLTI2LDI1LjVjLTEuNiwxLjUtNC4xLDEuNS01LjcsMGwtMTAuNS0xMC4zCgljLTQ0LjEtNDMuMi0xMTUuNi00My4yLTE1OS43LDBsLTExLjIsMTFjLTEuNiwxLjUtNC4xLDEuNS01LjcsMEw3MSw2NS44Yy0zLjItMy4xLTMuMi04LjEsMC0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M5QzMzMy4wMzQgNDI3LjM0NSAzMDEuNzM1IDQzOC41MzggMjY5LjExNCA0NDEuNDE1TDI3MS4xMTQgNDY0QzMwNy43MzkgNDYwLjc4NiAzNDIuODg4IDQ0OC4yMzYgMzczLjA4OSA0MjcuNTgxQzQwMy4yOSA0MDYuOTI2IDQyNy41MDggMzc4Ljg4MSA0NDMuMzQ5IDM0Ni4yMDdDNDU5LjE4NSAzMTMuNTI5IDQ2Ni4xMTYgMjc3LjM1OCA0NjMuNDM4IDI0MS4yNDdaTTM3NC44MSAyNDQuNzM5QzM2NC42MjYgMjQ0LjczOSAzNTYuMzY4IDIzNi42MTMgMzU2LjM2OCAyMjYuNTg2QzM1Ni4zNjggMjE2LjU2IDM2NC42MjEgMjA4LjQzMyAzNzQuODEgMjA4LjQzM0MzODQuOTkgMjA4LjQzMyAzOTMuMjQ3IDIxNi41NiAzOTMuMjQ3IDIyNi41ODZDMzkzLjI0NyAyMzYuNjEzIDM4NC45OTQgMjQ0LjczOSAzNzQuODEgMjQ0LjczOVoiIGZpbGw9IiNFQ0VDRUMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMTkxXzQyOTAiPgo8cmVjdCB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K'\n}\n","import icons from './icons'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst Phantom: WalletAdapterInterface = {\n id: 'phantom',\n name: 'Phantom',\n icon: icons.phantom,\n provider: window?.phantom?.ethereum,\n downloadLink: 'https://phantom.app/',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => Boolean(window?.phantom?.ethereum),\n createDeepLink: (url: string): string => `https://phantom.app/ul/browse/${url}?ref=${url}`,\n isConnected: async () => {\n return Boolean(\n (await window?.phantom?.ethereum?.request({ method: 'eth_accounts' })).length\n )\n },\n connect: async (): Promise => {\n return await new Promise((resolve, reject) => {\n const phantom = window?.phantom?.ethereum\n try {\n phantom\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n resolve(phantom)\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default Phantom\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { WindowEthereum } from './types'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst MetaMask: WalletAdapterInterface = {\n id: 'metamask',\n name: 'MetaMask',\n icon: icons.metaMask,\n downloadLink: 'https://metamask.io/download/',\n provider: window.ethereum as unknown as WindowEthereum,\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => Boolean((window?.ethereum as unknown as WindowEthereum)?.isMetaMask),\n createDeepLink: (url: string): string => `https://metamask.app.link/dapp/${url}`,\n isConnected: async () => {\n return Boolean(\n (\n await (window?.ethereum as unknown as WindowEthereum).request({\n method: 'eth_accounts'\n })\n ).length\n )\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const metamaskProvider = window?.ethereum as unknown as WindowEthereum\n try {\n metamaskProvider\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(metamaskProvider, provider)\n .then(() => {\n resolve(metamaskProvider)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default MetaMask\n","import { Provider } from '../services/Provider'\nimport type { Ethers } from '../services/Ethers'\nimport type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types'\nimport type { Contract as EthersContract, InterfaceAbi } from 'ethers'\nimport type { TransactionData } from '../services/TransactionSigner'\n\nexport class Contract implements ContractInterface {\n /**\n * Contract address\n */\n address: ContractAddress\n\n /**\n * Cached static methods\n */\n cachedMethods: Record = {}\n\n /**\n * Contract ABI\n */\n ABI: InterfaceAbi\n\n /**\n * Ethers contract\n */\n ethersContract: EthersContract\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * Ethers service\n */\n ethers: Ethers\n\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n this.ABI = ABI ?? []\n this.address = address\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n this.ethersContract = this.ethers.contract(address, this.ABI, this.ethers.jsonRpc)\n }\n\n /**\n * @returns Contract address\n */\n getAddress(): ContractAddress {\n return this.address\n }\n\n /**\n * @param method Method name\n * @param args Method parameters\n * @returns Method result\n */\n async callMethod(method: string, ...args: unknown[]): Promise {\n return this.ethersContract[method](...args) // eslint-disable-line\n }\n\n /**\n * @param method Method name\n * @param args Method parameters\n * @returns Method result\n */\n async callMethodWithCache(method: string, ...args: unknown[]): Promise {\n if (this.cachedMethods[method] !== undefined) {\n return this.cachedMethods[method]\n }\n\n return (this.cachedMethods[method] = await this.callMethod(method, ...args))\n }\n\n /**\n * @param method Method name\n * @param args Sender wallet address\n * @returns Encoded method data\n */\n async getMethodData(method: string, ...args: unknown[]): Promise {\n return this.ethersContract.interface.encodeFunctionData(method, args)\n }\n\n /**\n * @param method Method name\n * @param from Sender wallet address\n * @param args Method parameters\n * @returns Gas limit\n */\n async getMethodEstimateGas(\n method: string,\n from: WalletAddress,\n ...args: unknown[]\n ): Promise {\n return Number(await this.ethersContract[method].estimateGas(...args, { from })) // eslint-disable-line\n }\n\n /**\n * @param method Method name\n * @param from Sender wallet address\n * @param args Method parameters\n * @returns Transaction data\n */\n async createTransactionData(\n method: string,\n from: WalletAddress,\n ...args: unknown[]\n ): Promise {\n const [gasPrice, nonce, data, gasLimit] = await Promise.all([\n this.provider.ethers.getGasPrice(),\n this.provider.ethers.getNonce(from),\n this.getMethodData(method, ...args), // eslint-disable-line\n this.getMethodEstimateGas(method, from, ...args) // eslint-disable-line\n ])\n\n return {\n from,\n data,\n nonce,\n gasPrice,\n gasLimit,\n value: '0x0',\n to: this.getAddress(),\n chainId: this.provider.network.id\n }\n }\n}\n","import type { EthersError } from './Ethers'\nimport { Provider } from '../services/Provider'\nimport type { TransactionRequest, Wallet, BigNumberish } from 'ethers'\nimport {\n ErrorTypeEnum,\n type PrivateKey,\n type TransactionId,\n type TransactionSignerInterface\n} from '@multiplechain/types'\n\nexport interface TransactionData extends TransactionRequest {\n gas?: BigNumberish\n}\n\nexport class TransactionSigner implements TransactionSignerInterface {\n /**\n * Transaction data from the blockchain network\n */\n rawData: TransactionData\n\n /**\n * Signed transaction data\n */\n signedData: string\n\n /**\n * Wallet instance from ethers with the private key\n */\n wallet: Wallet\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * @param rawData Transaction data\n * @param provider Blockchain network provider\n */\n constructor(rawData: TransactionData, provider?: Provider) {\n this.rawData = rawData\n this.provider = provider ?? Provider.instance\n }\n\n /**\n * Sign the transaction\n * @param privateKey - Transaction data\n * @returns Signed transaction data\n */\n public async sign(privateKey: PrivateKey): Promise {\n try {\n this.wallet = this.provider.ethers.wallet(privateKey)\n this.signedData = await this.wallet.signTransaction(this.rawData)\n return this\n } catch (error) {\n const e = error as EthersError\n if (e?.shortMessage.includes('transaction from address mismatch')) {\n throw new Error(ErrorTypeEnum.INVALID_PRIVATE_KEY)\n }\n\n throw error\n }\n }\n\n /**\n * Send the transaction to the blockchain network\n * @returns Transaction data\n */\n async send(): Promise {\n return (await this.provider.ethers.jsonRpc.send('eth_sendRawTransaction', [\n this.signedData\n ])) as TransactionId\n }\n\n /**\n * Get the raw transaction data\n * @returns Transaction data\n */\n getRawData(): TransactionData {\n return this.rawData\n }\n\n /**\n * Get the signed transaction data\n * @returns Signed transaction data\n */\n getSignedData(): string {\n return this.signedData\n }\n}\n","import { Contract } from './Contract'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC721 from '../../resources/ERC721.json'\nimport type { Provider } from '../services/Provider'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type ContractAddress,\n type NftId,\n type NftInterface,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class NFT extends Contract implements NftInterface {\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n super(address, provider, ABI ?? ERC721)\n }\n\n /**\n * @returns NFT name\n */\n async getName(): Promise {\n return (await this.callMethodWithCache('name')) as string\n }\n\n /**\n * @returns NFT symbol\n */\n async getSymbol(): Promise {\n return (await this.callMethodWithCache('symbol')) as string\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of NFT\n */\n async getBalance(owner: WalletAddress): Promise {\n return Number(await this.callMethod('balanceOf', owner))\n }\n\n /**\n * @param nftId NFT ID\n * @returns Wallet address of the owner of the NFT\n */\n async getOwner(nftId: NftId): Promise {\n return (await this.callMethod('ownerOf', nftId)) as WalletAddress\n }\n\n /**\n * @param nftId NFT ID\n * @returns URI of the NFT\n */\n async getTokenURI(nftId: NftId): Promise {\n return (await this.callMethodWithCache('tokenURI', nftId)) as string\n }\n\n /**\n * @param nftId ID of the NFT that will be transferred\n * @returns Wallet address of the approved spender\n */\n async getApproved(nftId: NftId): Promise {\n const address = (await this.callMethod('getApproved', nftId)) as WalletAddress\n return address === '0x0000000000000000000000000000000000000000' ? null : address\n }\n\n /**\n * @param sender Sender address\n * @param receiver Receiver address\n * @param nftId NFT ID\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n nftId: NftId\n ): Promise {\n return await this.transferFrom(sender, sender, receiver, nftId)\n }\n\n /**\n * @param spender Spender address\n * @param owner Owner address\n * @param receiver Receiver address\n * @param nftId NFT ID\n * @returns Transaction signer\n */\n async transferFrom(\n spender: WalletAddress,\n owner: WalletAddress,\n receiver: WalletAddress,\n nftId: NftId\n ): Promise {\n // Check if tokens exist\n const balance = await this.getBalance(owner)\n\n if (balance <= 0) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n // Check ownership\n const originalOwner = await this.getOwner(nftId)\n if (originalOwner !== owner) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n // check if spender different from owner\n if (spender !== owner) {\n const approved = await this.getApproved(nftId)\n if (approved !== spender) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n }\n\n return new TransactionSigner(\n await this.createTransactionData('transferFrom', spender, owner, receiver, nftId)\n )\n }\n\n /**\n * Gives permission to the spender to spend owner's tokens\n * @param owner Address of owner of the tokens that will be used\n * @param spender Address of the spender that will use the tokens of owner\n * @param nftId ID of the NFT that will be transferred\n * @returns Transaction signer\n */\n async approve(\n owner: WalletAddress,\n spender: WalletAddress,\n nftId: NftId\n ): Promise {\n // Check if tokens exist\n const balance = await this.getBalance(owner)\n\n if (balance <= 0) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n // Check ownership\n const originalOwner = await this.getOwner(nftId)\n if (originalOwner !== owner) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n return new TransactionSigner(\n await this.createTransactionData('approve', owner, spender, nftId)\n )\n }\n}\n","import { Provider } from '../services/Provider'\nimport { hexToNumber, numberToHex } from '@multiplechain/utils'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport type { TransactionData } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type CoinInterface,\n type TransferAmount,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class Coin implements CoinInterface {\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * @param provider network provider\n */\n constructor(provider?: Provider) {\n this.provider = provider ?? Provider.instance\n }\n\n /**\n * @returns Coin name\n */\n getName(): string {\n return (\n this.provider.network.nativeCurrency.name ?? this.provider.network.nativeCurrency.symbol\n )\n }\n\n /**\n * @returns Coin symbol\n */\n getSymbol(): string {\n return this.provider.network.nativeCurrency.symbol\n }\n\n /**\n * @returns Decimal value of the coin\n */\n getDecimals(): number {\n return this.provider.network.nativeCurrency.decimals\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of COIN\n */\n async getBalance(owner: WalletAddress): Promise {\n const balance = await this.provider.ethers.getBalance(owner)\n return hexToNumber(balance.toString(), this.getDecimals())\n }\n\n /**\n * @param sender Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of assets that will be transferred\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n if (amount > (await this.getBalance(sender))) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, this.getDecimals())\n\n const txData: TransactionData = {\n data: '0x',\n to: receiver,\n from: sender,\n value: hexAmount,\n chainId: this.provider.network.id\n }\n\n const [gasPrice, nonce, gasLimit] = await Promise.all([\n this.provider.ethers.getGasPrice(),\n this.provider.ethers.getNonce(sender),\n this.provider.ethers.getEstimateGas(txData)\n ])\n\n txData.nonce = nonce\n txData.gasPrice = gasPrice\n txData.gasLimit = gasLimit\n\n return new TransactionSigner(txData)\n }\n}\n","import { Contract } from './Contract'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC20 from '../../resources/ERC20.json'\nimport type { Provider } from '../services/Provider'\nimport { hexToNumber, numberToHex } from '@multiplechain/utils'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type ContractAddress,\n type TokenInterface,\n type TransferAmount,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class Token extends Contract implements TokenInterface {\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n super(address, provider, ABI ?? ERC20)\n }\n\n /**\n * @returns Token name\n */\n async getName(): Promise {\n return (await this.callMethodWithCache('name')) as string\n }\n\n /**\n * @returns Token symbol\n */\n async getSymbol(): Promise {\n return (await this.callMethodWithCache('symbol')) as string\n }\n\n /**\n * @returns Decimal value of the token\n */\n async getDecimals(): Promise {\n return Number(await this.callMethodWithCache('decimals'))\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of TOKEN\n */\n async getBalance(owner: WalletAddress): Promise {\n const [decimals, balance] = await Promise.all([\n this.getDecimals(),\n this.callMethod('balanceOf', owner)\n ])\n return hexToNumber(balance as string, decimals)\n }\n\n /**\n * @returns Total supply of the token\n */\n async getTotalSupply(): Promise {\n const [decimals, totalSupply] = await Promise.all([\n this.getDecimals(),\n this.callMethod('totalSupply')\n ])\n return hexToNumber(totalSupply as string, decimals)\n }\n\n /**\n * @param owner Address of owner of the tokens that is being used\n * @param spender Address of the spender that is using the tokens of owner\n * @returns Amount of tokens that the spender is allowed to spend\n */\n async getAllowance(owner: WalletAddress, spender: WalletAddress): Promise {\n const [decimals, allowance] = await Promise.all([\n this.getDecimals(),\n await this.callMethod('allowance', owner, spender)\n ])\n return hexToNumber(allowance as string, decimals)\n }\n\n /**\n * transfer() method is the main method for processing transfers for fungible assets (TOKEN, COIN)\n * @param sender Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of assets that will be transferred\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount <= 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(sender)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('transfer', sender, receiver, hexAmount)\n )\n }\n\n /**\n * @param spender Address of the spender of transaction\n * @param owner Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of tokens that will be transferred\n * @returns Transaction signer\n */\n async transferFrom(\n spender: WalletAddress,\n owner: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(owner)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const allowance = await this.getAllowance(owner, spender)\n\n if (allowance === 0) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n if (amount > allowance) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('transferFrom', spender, owner, receiver, hexAmount)\n )\n }\n\n /**\n * Gives permission to the spender to spend owner's tokens\n * @param owner Address of owner of the tokens that will be used\n * @param spender Address of the spender that will use the tokens of owner\n * @param amount Amount of the tokens that will be used\n * @returns Transaction signer\n */\n async approve(\n owner: WalletAddress,\n spender: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(owner)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('approve', owner, spender, hexAmount)\n )\n }\n}\n","import { Provider } from '../services/Provider'\nimport { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types'\nimport {\n TransactionTypeEnum,\n type BlockConfirmationCount,\n type BlockNumber,\n type BlockTimestamp,\n type TransactionFee,\n type TransactionId,\n type TransactionInterface,\n type WalletAddress\n} from '@multiplechain/types'\nimport type { TransactionReceipt, TransactionResponse } from 'ethers'\nimport type { Ethers } from '../services/Ethers'\nimport { hexToNumber } from '@multiplechain/utils'\nimport { NFT } from '../assets/NFT'\n\nconst selectors = {\n // ERC20\n [TransactionTypeEnum.TOKEN]: [\n '0xa9059cbb', // transfer(address,uint256)\n '0x095ea7b3', // approve(address,uint256)\n '0x23b872dd' // transferFrom(address,address,uint256)\n ],\n // ERC721, ERC1155\n [TransactionTypeEnum.NFT]: [\n // ERC721\n '0x23b872dd', // transferFrom(address,address,uint256)\n '0x095ea7b3', // approve(address,uint256)\n '0x42842e0e', // safeTransferFrom(address,address,uint256)\n '0xb88d4fde', // safeTransferFrom(address,address,uint256,bytes)\n // ERC1155\n '0xf242432a', // safeTransferFrom(address,address,uint256,uint256,bytes)\n '0x2eb2c2d6', // safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\n '0x29535c7e' // setApprovalForAll(address,bool)\n ]\n}\n\ninterface TransactionData {\n response: TransactionResponse\n receipt: TransactionReceipt | null\n}\n\nexport class Transaction implements TransactionInterface {\n /**\n * Each transaction has its own unique ID defined by the user\n */\n id: TransactionId\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * Ethers service\n */\n ethers: Ethers\n\n /**\n * Transaction data after completed\n */\n data: TransactionData\n\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n */\n constructor(id: TransactionId, provider?: Provider) {\n this.id = id\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n }\n\n /**\n * @returns Transaction data\n */\n async getData(): Promise {\n if (this.data?.response !== undefined && this.data?.receipt !== null) {\n return this.data\n }\n try {\n const response = await this.ethers.getTransaction(this.id)\n if (response === null) {\n return null\n }\n const receipt = await this.ethers.getTransactionReceipt(this.id)\n return (this.data = { response, receipt })\n } catch (error) {\n if (error instanceof Error && String(error.message).includes('timeout')) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(ErrorTypeEnum.RPC_REQUEST_ERROR)\n }\n }\n\n /**\n * @param ms - Milliseconds to wait for the transaction to be confirmed. Default is 4000ms\n * @returns Status of the transaction\n */\n async wait(ms: number = 4000): Promise {\n return await new Promise((resolve, reject) => {\n const check = async (): Promise => {\n try {\n const status = await this.getStatus()\n if (status !== TransactionStatusEnum.PENDING) {\n resolve(status)\n return\n }\n setTimeout(check, ms)\n } catch (error) {\n reject(TransactionStatusEnum.FAILED)\n }\n }\n void check()\n })\n }\n\n /**\n * @returns Transaction id from the blockchain network\n */\n getId(): TransactionId {\n return this.id\n }\n\n /**\n * @returns Type of the transaction\n */\n async getType(): Promise {\n const txData = await this.getData()\n\n if (txData === null) {\n return TransactionTypeEnum.GENERAL\n }\n\n const contractBytecode = await this.provider.ethers.getByteCode(txData.response.to ?? '')\n\n if (contractBytecode === '0x' || txData.response.data === '0x') {\n return TransactionTypeEnum.COIN\n }\n\n const type = Object.entries(selectors).find(([_key, values]) => {\n return values.includes(txData.response.data.slice(0, 10))\n })\n\n if (type !== undefined) {\n const tryNft = new NFT(txData.response.to ?? '')\n try {\n await tryNft.getApproved(1)\n return TransactionTypeEnum.NFT\n } catch {\n return TransactionTypeEnum.TOKEN\n }\n }\n\n return TransactionTypeEnum.CONTRACT\n }\n\n /**\n * @returns URL of the transaction on the blockchain explorer\n */\n getUrl(): string {\n let explorerUrl = this.provider.network.explorerUrl\n explorerUrl += explorerUrl.endsWith('/') ? '' : '/'\n explorerUrl += 'tx/' + this.id\n return explorerUrl\n }\n\n /**\n * @returns Signer wallet address of the transaction\n */\n async getSigner(): Promise {\n const data = await this.getData()\n return data?.response.from ?? ''\n }\n\n /**\n * @returns Fee of the transaction\n */\n async getFee(): Promise {\n const data = await this.getData()\n if (data?.response?.gasPrice === undefined || data?.receipt?.gasUsed === undefined) {\n return 0\n }\n return hexToNumber(\n (data?.response.gasPrice * data?.receipt.gasUsed).toString(),\n this.provider.network.nativeCurrency.decimals\n )\n }\n\n /**\n * @returns Block number that transaction\n */\n async getBlockNumber(): Promise {\n const data = await this.getData()\n return data?.response.blockNumber ?? 0\n }\n\n /**\n * @returns Timestamp of the block that transaction\n */\n async getBlockTimestamp(): Promise {\n const blockNumber = await this.getBlockNumber()\n const block = await this.ethers.getBlock(blockNumber)\n return block?.timestamp ?? 0\n }\n\n /**\n * @returns Confirmation count of the block that transaction\n */\n async getBlockConfirmationCount(): Promise {\n const blockNumber = await this.getBlockNumber()\n const blockCount = await this.ethers.getBlockNumber()\n const confirmations = blockCount - blockNumber\n return confirmations < 0 ? 0 : confirmations\n }\n\n /**\n * @returns Status of the transaction\n */\n async getStatus(): Promise {\n const data = await this.getData()\n if (data?.response.blockNumber !== null && data?.receipt !== null) {\n if (data?.receipt.status === 1) {\n return TransactionStatusEnum.CONFIRMED\n } else {\n return TransactionStatusEnum.FAILED\n }\n }\n return TransactionStatusEnum.PENDING\n }\n}\n","import { Transaction } from './Transaction'\nimport type {\n ContractAddress,\n ContractTransactionInterface,\n TransactionId\n} from '@multiplechain/types'\nimport {\n Interface,\n type InterfaceAbi,\n type TransactionResponse,\n type TransactionDescription\n} from 'ethers'\nimport type { Provider } from '../services/Provider'\n\nexport class ContractTransaction extends Transaction implements ContractTransactionInterface {\n /**\n */\n ABI: InterfaceAbi\n\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider)\n this.ABI = ABI ?? []\n }\n\n /**\n * @returns Contract address of the transaction\n */\n async getAddress(): Promise {\n const data = await this.getData()\n return data?.response.to ?? ''\n }\n\n /**\n * @param response Transaction response\n * @returns Decoded transaction data\n */\n async decodeData(response?: TransactionResponse): Promise {\n if (response === undefined) {\n const data = await this.getData()\n if (data === null) return null\n response = data.response\n }\n\n return new Interface(this.ABI).parseTransaction({\n data: response.data ?? '',\n value: response.value ?? 0\n })\n }\n}\n","import type { InterfaceAbi } from 'ethers'\nimport ERC721 from '../../resources/ERC721.json'\nimport type { Provider } from '../services/Provider'\nimport { ContractTransaction } from './ContractTransaction'\nimport type {\n NftId,\n NftTransactionInterface,\n TransactionId,\n WalletAddress\n} from '@multiplechain/types'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\n\nexport class NftTransaction extends ContractTransaction implements NftTransactionInterface {\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider, ABI ?? (ERC721 as InterfaceAbi))\n }\n\n /**\n * @returns Receiver wallet address\n */\n async getReceiver(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[1]\n }\n\n return decoded.args[0]\n }\n\n /**\n * @returns Sender wallet address\n */\n async getSender(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[0]\n }\n\n return await this.getSigner()\n }\n\n /**\n * @returns NFT ID\n */\n async getNftId(): Promise {\n return Number((await this.decodeData())?.args[2] ?? 0)\n }\n\n /**\n * @param direction - Direction of the transaction (nft)\n * @param address - Wallet address of the receiver or sender of the transaction, dependant on direction\n * @param nftId ID of the NFT that will be transferred\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n nftId: NftId\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getNftId()) !== nftId) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import { Transaction } from './Transaction'\nimport { hexToNumber } from '@multiplechain/utils'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\nimport type { WalletAddress, CoinTransactionInterface, TransferAmount } from '@multiplechain/types'\n\nexport class CoinTransaction extends Transaction implements CoinTransactionInterface {\n /**\n * @returns Wallet address of the receiver of transaction\n */\n async getReceiver(): Promise {\n const data = await this.getData()\n return data?.response.to ?? ''\n }\n\n /**\n * @returns Wallet address of the sender of transaction\n */\n async getSender(): Promise {\n return await this.getSigner()\n }\n\n /**\n * @returns Amount of coin that will be transferred\n */\n async getAmount(): Promise {\n const data = await this.getData()\n const { decimals } = this.provider.network.nativeCurrency\n return hexToNumber((data?.response.value ?? 0).toString(), decimals)\n }\n\n /**\n * @param direction - Direction of the transaction (asset)\n * @param address - Wallet address of the receiver or sender of the transaction, dependant on direction\n * @param amount Amount of assets that will be transferred\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n amount: TransferAmount\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getAmount()) !== amount) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import { Token } from '../assets/Token'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC20 from '../../resources/ERC20.json'\nimport { hexToNumber } from '@multiplechain/utils'\nimport type { Provider } from '../services/Provider'\nimport { ContractTransaction } from './ContractTransaction'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\nimport type {\n TransactionId,\n TokenTransactionInterface,\n WalletAddress,\n TransferAmount\n} from '@multiplechain/types'\n\nexport class TokenTransaction extends ContractTransaction implements TokenTransactionInterface {\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider, ABI ?? (ERC20 as InterfaceAbi))\n }\n\n /**\n * @returns Receiver wallet address\n */\n async getReceiver(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[1]\n }\n\n return decoded.args[0]\n }\n\n /**\n * @returns Wallet address of the sender of transaction\n */\n async getSender(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[0]\n }\n\n return await this.getSigner()\n }\n\n /**\n * @returns Amount of tokens that will be transferred\n */\n async getAmount(): Promise {\n const token = new Token(await this.getAddress())\n const decoded = await this.decodeData()\n if (decoded === null) {\n return 0\n }\n\n if (decoded.name === 'transferFrom') {\n return hexToNumber((decoded.args[2] as bigint).toString(), await token.getDecimals())\n }\n\n return hexToNumber((decoded.args[1] as bigint).toString(), await token.getDecimals())\n }\n\n /**\n * @param direction - Direction of the transaction (token)\n * @param address - Wallet address of the owner or spender of the transaction, dependant on direction\n * @param amount Amount of tokens that will be approved\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n amount: TransferAmount\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getAmount()) !== amount) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import type {\n TransactionTypeEnum,\n DynamicTransactionType,\n TransactionListenerInterface,\n DynamicTransactionListenerFilterType,\n TransactionId\n} from '@multiplechain/types'\n\nimport { Provider } from './Provider'\nimport type { Ethers } from './Ethers'\nimport { id, zeroPadValue } from 'ethers'\nimport { objectsEqual } from '@multiplechain/utils'\nimport { Transaction } from '../models/Transaction'\nimport { NftTransaction } from '../models/NftTransaction'\nimport { CoinTransaction } from '../models/CoinTransaction'\nimport { TokenTransaction } from '../models/TokenTransaction'\nimport { ErrorTypeEnum, TransactionListenerProcessIndex } from '@multiplechain/types'\nimport { ContractTransaction } from '../models/ContractTransaction'\nimport {\n type WebSocketProvider,\n type JsonRpcApiProvider,\n type EventFilter,\n type Log,\n type TransactionResponse\n} from 'ethers'\n\ntype TransactionListenerTriggerType = DynamicTransactionType<\n T,\n Transaction,\n ContractTransaction,\n CoinTransaction,\n TokenTransaction,\n NftTransaction\n>\n\ntype TransactionListenerCallbackType<\n T extends TransactionTypeEnum,\n Transaction = TransactionListenerTriggerType\n> = (transaction: Transaction) => void\n\nexport class TransactionListener<\n T extends TransactionTypeEnum,\n DTransaction extends TransactionListenerTriggerType,\n CallBackType extends TransactionListenerCallbackType\n> implements TransactionListenerInterface\n{\n /**\n * Transaction type\n */\n type: T\n\n /**\n * Provider\n */\n provider: Provider\n\n /**\n * Listener status\n */\n status: boolean = false\n\n /**\n * JSON-RPC provider\n */\n ethers: Ethers\n\n /**\n * JSON-RPC provider\n */\n jsonRpc: JsonRpcApiProvider\n\n /**\n * WebSocket provider\n */\n webSocket: WebSocketProvider\n\n /**\n * Transaction listener callback\n */\n callbacks: CallBackType[] = []\n\n /**\n * Dynamic stop method\n */\n dynamicStop: () => void = () => {}\n\n /**\n * Triggered transactions\n */\n triggeredTransactions: TransactionId[] = []\n\n /**\n * Transaction listener filter\n */\n filter?: DynamicTransactionListenerFilterType | Record\n\n /**\n * @param type - Transaction type\n * @param filter - Transaction listener filter\n * @param provider - Provider\n */\n constructor(type: T, filter?: DynamicTransactionListenerFilterType, provider?: Provider) {\n this.type = type\n this.filter = filter ?? {}\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n this.jsonRpc = this.provider.ethers.jsonRpc\n }\n\n /**\n * Close the listener\n */\n stop(): void {\n if (this.status) {\n this.status = false\n this.dynamicStop()\n }\n }\n\n /**\n * Start the listener\n */\n start(): void {\n if (!this.status) {\n this.status = true\n // @ts-expect-error allow dynamic access\n this[TransactionListenerProcessIndex[this.type]]()\n }\n }\n\n /**\n * Get the listener status\n * @returns - Listener status\n */\n getStatus(): boolean {\n return this.status\n }\n\n /**\n * Listen to the transaction events\n * @param callback - Callback function\n * @returns - listener status\n */\n async on(callback: CallBackType): Promise {\n if (this.webSocket === undefined) {\n const socket = await this.provider.ethers.connectWebSocket()\n if (typeof socket === 'string') {\n throw new Error(ErrorTypeEnum.WS_CONNECTION_FAILED)\n } else {\n this.webSocket = socket\n }\n }\n\n this.start()\n this.callbacks.push(callback)\n\n return true\n }\n\n /**\n * Trigger the event when a transaction is detected\n * @param transaction - Transaction data\n */\n trigger(transaction: TransactionListenerTriggerType): void {\n if (!this.triggeredTransactions.includes(transaction.id)) {\n this.triggeredTransactions.push(transaction.id)\n this.callbacks.forEach((callback) => {\n callback(transaction as unknown as DTransaction)\n })\n }\n }\n\n /**\n * General transaction process\n */\n generalProcess(): void {\n const callback = async (transactionId: string): Promise => {\n if (this.filter?.signer !== undefined) {\n const transaction = await this.ethers.getTransaction(transactionId)\n if (transaction?.from.toLowerCase() !== this.filter.signer.toLowerCase()) {\n return\n }\n }\n\n this.trigger(new Transaction(transactionId))\n }\n\n void this.webSocket.on('pending', callback)\n this.dynamicStop = () => {\n void this.webSocket.off('pending', callback)\n }\n }\n\n /**\n * Contract transaction process\n */\n contractProcess(): void {\n const filter = this\n .filter as DynamicTransactionListenerFilterType\n\n let params: string | EventFilter\n if (filter.address === undefined) {\n params = 'pending'\n } else {\n params = {\n address: filter.address\n }\n }\n\n const checkSigner = (transaction: TransactionResponse | null): boolean => {\n if (transaction === null) {\n return false\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = transaction.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return false\n }\n\n return true\n }\n\n const callback = async (transactionIdOrLog: string | Log): Promise => {\n let transaction: TransactionResponse | null\n if (typeof transactionIdOrLog === 'string') {\n transaction = await this.ethers.getTransaction(transactionIdOrLog)\n\n if (!checkSigner(transaction)) {\n return\n }\n\n const contractBytecode = await this.ethers.getByteCode(transaction?.to ?? '')\n\n if (contractBytecode === '0x') {\n return\n }\n } else {\n transaction = await this.ethers.getTransaction(transactionIdOrLog.transactionHash)\n }\n\n if (!checkSigner(transaction)) {\n return\n }\n\n // @ts-expect-error already checking ing checkSigner\n this.trigger(new ContractTransaction(transaction.hash))\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n\n /**\n * Coin transaction process\n */\n coinProcess(): void {\n const filter = this.filter as DynamicTransactionListenerFilterType\n\n if (\n filter.signer !== undefined &&\n filter.sender !== undefined &&\n filter.signer !== filter.sender\n ) {\n throw new Error(\n 'Sender and signer must be the same in coin transactions. Or only one of them can be defined.'\n )\n }\n\n const callback = async (transactionId: string): Promise => {\n const tx = await this.ethers.getTransaction(transactionId)\n\n if (tx === null) {\n return\n }\n\n const sender = filter.sender ?? filter.signer\n\n interface ParamsType {\n sender?: string\n receiver?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (sender !== undefined) {\n expectedParams.sender = sender.toLowerCase()\n receivedParams.sender = tx.from.toLowerCase()\n }\n\n if (filter.receiver !== undefined) {\n expectedParams.receiver = filter.receiver.toLowerCase()\n receivedParams.receiver = tx.to?.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n const contractBytecode = await this.ethers.getByteCode(tx?.to ?? '')\n\n if (contractBytecode !== '0x') {\n return\n }\n\n const transaction = new CoinTransaction(transactionId)\n\n if (filter.amount !== undefined) {\n await transaction.wait()\n const amount = await transaction.getAmount()\n if (amount !== filter.amount) {\n return\n }\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on('pending', callback)\n this.dynamicStop = () => {\n void this.webSocket.off('pending', callback)\n }\n }\n\n /**\n * Token transaction process\n */\n tokenProcess(): void {\n const filter = this\n .filter as DynamicTransactionListenerFilterType\n\n const params: EventFilter = {\n address: filter.address,\n topics: [\n id('Transfer(address,address,uint256)'),\n filter.sender !== undefined ? zeroPadValue(filter.sender, 32) : null,\n filter.receiver !== undefined ? zeroPadValue(filter.receiver, 32) : null\n ]\n }\n\n const callback = async (transactionLog: Log): Promise => {\n const transaction = new TokenTransaction(transactionLog.transactionHash)\n const data = await transaction.getData()\n\n if (data === null) {\n return\n }\n\n const decodedData = await transaction.decodeData(data.response)\n\n if (decodedData === null) {\n return\n }\n\n if (decodedData.name !== 'transfer' && decodedData.name !== 'transferFrom') {\n return\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = data.response.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n if (filter.amount !== undefined) {\n await transaction.wait()\n const amount = await transaction.getAmount()\n if (amount !== filter.amount) {\n return\n }\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n\n /**\n * NFT transaction process\n */\n nftProcess(): void {\n const filter = this.filter as DynamicTransactionListenerFilterType\n\n const params: EventFilter = {\n address: filter.address,\n topics: [\n id('Transfer(address,address,uint256)'),\n filter.sender !== undefined ? zeroPadValue(filter.sender, 32) : null,\n filter.receiver !== undefined ? zeroPadValue(filter.receiver, 32) : null,\n filter.nftId !== undefined\n ? zeroPadValue(`0x0${filter.nftId.toString(16)}`, 32)\n : null\n ]\n }\n\n const callback = async (transactionLog: Log): Promise => {\n const transaction = new NftTransaction(transactionLog.transactionHash)\n const data = await transaction.getData()\n\n if (data === null) {\n return\n }\n\n const decodedData = await transaction.decodeData(data.response)\n\n if (decodedData === null) {\n return\n }\n\n if (decodedData.name !== 'transferFrom') {\n return\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = data.response.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n}\n","const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(snap, key)) {\n return;\n }\n const value = Reflect.get(target, key);\n const desc = {\n value,\n enumerable: true,\n // This is intentional to avoid copying with proxy-compare.\n // It's still non-writable, so it avoids assigning a value.\n configurable: true\n };\n if (refSet.has(value)) {\n markToTrack(value, false);\n } else if (value instanceof Promise) {\n delete desc.value;\n desc.get = () => handlePromise(value);\n } else if (proxyStateMap.has(value)) {\n const [target2, ensureVersion] = proxyStateMap.get(\n value\n );\n desc.value = createSnapshot(\n target2,\n ensureVersion(),\n handlePromise\n );\n }\n Object.defineProperty(snap, key, desc);\n });\n return Object.preventExtensions(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxyFunction(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (\"value\" in desc) {\n proxyObject[key] = initialObject[key];\n delete desc.value;\n delete desc.writable;\n }\n Object.defineProperty(baseObject, key, desc);\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [defaultProxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return defaultProxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import { subscribe, snapshot, proxy, getVersion, ref, unstable_buildProxyFunction } from 'valtio/vanilla';\n\nfunction subscribeKey(proxyObject, key, callback, notifyInSync) {\n let prevValue = proxyObject[key];\n return subscribe(\n proxyObject,\n () => {\n const nextValue = proxyObject[key];\n if (!Object.is(prevValue, nextValue)) {\n callback(prevValue = nextValue);\n }\n },\n notifyInSync\n );\n}\n\nlet currentCleanups;\nfunction watch(callback, options) {\n let alive = true;\n const cleanups = /* @__PURE__ */ new Set();\n const subscriptions = /* @__PURE__ */ new Map();\n const cleanup = () => {\n if (alive) {\n alive = false;\n cleanups.forEach((clean) => clean());\n cleanups.clear();\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions.clear();\n }\n };\n const revalidate = () => {\n if (!alive) {\n return;\n }\n cleanups.forEach((clean) => clean());\n cleanups.clear();\n const proxiesToSubscribe = /* @__PURE__ */ new Set();\n const parent = currentCleanups;\n currentCleanups = cleanups;\n try {\n const cleanupReturn = callback((proxyObject) => {\n proxiesToSubscribe.add(proxyObject);\n return proxyObject;\n });\n if (cleanupReturn) {\n cleanups.add(cleanupReturn);\n }\n } finally {\n currentCleanups = parent;\n }\n subscriptions.forEach((unsubscribe, proxyObject) => {\n if (proxiesToSubscribe.has(proxyObject)) {\n proxiesToSubscribe.delete(proxyObject);\n } else {\n subscriptions.delete(proxyObject);\n unsubscribe();\n }\n });\n proxiesToSubscribe.forEach((proxyObject) => {\n const unsubscribe = subscribe(proxyObject, revalidate, options == null ? void 0 : options.sync);\n subscriptions.set(proxyObject, unsubscribe);\n });\n };\n if (currentCleanups) {\n currentCleanups.add(cleanup);\n }\n revalidate();\n return cleanup;\n}\n\nconst DEVTOOLS = Symbol();\nfunction devtools(proxyObject, options) {\n if (typeof options === \"string\") {\n console.warn(\n \"string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400\"\n );\n options = { name: options };\n }\n const { enabled, name = \"\", ...rest } = options || {};\n let extension;\n try {\n extension = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch {\n }\n if (!extension) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && enabled) {\n console.warn(\"[Warning] Please install/enable Redux devtools extension\");\n }\n return;\n }\n let isTimeTraveling = false;\n const devtools2 = extension.connect({ name, ...rest });\n const unsub1 = subscribe(proxyObject, (ops) => {\n const action = ops.filter(([_, path]) => path[0] !== DEVTOOLS).map(([op, path]) => `${op}:${path.map(String).join(\".\")}`).join(\", \");\n if (!action) {\n return;\n }\n if (isTimeTraveling) {\n isTimeTraveling = false;\n } else {\n const snapWithoutDevtools = Object.assign({}, snapshot(proxyObject));\n delete snapWithoutDevtools[DEVTOOLS];\n devtools2.send(\n {\n type: action,\n updatedAt: (/* @__PURE__ */ new Date()).toLocaleString()\n },\n snapWithoutDevtools\n );\n }\n });\n const unsub2 = devtools2.subscribe((message) => {\n var _a, _b, _c, _d, _e, _f;\n if (message.type === \"ACTION\" && message.payload) {\n try {\n Object.assign(proxyObject, JSON.parse(message.payload));\n } catch (e) {\n console.error(\n \"please dispatch a serializable value that JSON.parse() and proxy() support\\n\",\n e\n );\n }\n }\n if (message.type === \"DISPATCH\" && message.state) {\n if (((_a = message.payload) == null ? void 0 : _a.type) === \"JUMP_TO_ACTION\" || ((_b = message.payload) == null ? void 0 : _b.type) === \"JUMP_TO_STATE\") {\n isTimeTraveling = true;\n const state = JSON.parse(message.state);\n Object.assign(proxyObject, state);\n }\n proxyObject[DEVTOOLS] = message;\n } else if (message.type === \"DISPATCH\" && ((_c = message.payload) == null ? void 0 : _c.type) === \"COMMIT\") {\n devtools2.init(snapshot(proxyObject));\n } else if (message.type === \"DISPATCH\" && ((_d = message.payload) == null ? void 0 : _d.type) === \"IMPORT_STATE\") {\n const actions = (_e = message.payload.nextLiftedState) == null ? void 0 : _e.actionsById;\n const computedStates = ((_f = message.payload.nextLiftedState) == null ? void 0 : _f.computedStates) || [];\n isTimeTraveling = true;\n computedStates.forEach(({ state }, index) => {\n const action = actions[index] || \"No action found\";\n Object.assign(proxyObject, state);\n if (index === 0) {\n devtools2.init(snapshot(proxyObject));\n } else {\n devtools2.send(action, snapshot(proxyObject));\n }\n });\n }\n });\n devtools2.init(snapshot(proxyObject));\n return () => {\n unsub1();\n unsub2 == null ? void 0 : unsub2();\n };\n}\n\nconst sourceObjectMap = /* @__PURE__ */ new WeakMap();\nconst derivedObjectMap = /* @__PURE__ */ new WeakMap();\nconst markPending = (sourceObject, callback) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n sourceObjectEntry[0].forEach((subscription) => {\n const { d: derivedObject } = subscription;\n if (sourceObject !== derivedObject) {\n markPending(derivedObject);\n }\n });\n ++sourceObjectEntry[2];\n if (callback) {\n sourceObjectEntry[3].add(callback);\n }\n }\n};\nconst checkPending = (sourceObject, callback) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry == null ? void 0 : sourceObjectEntry[2]) {\n sourceObjectEntry[3].add(callback);\n return true;\n }\n return false;\n};\nconst unmarkPending = (sourceObject) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n --sourceObjectEntry[2];\n if (!sourceObjectEntry[2]) {\n sourceObjectEntry[3].forEach((callback) => callback());\n sourceObjectEntry[3].clear();\n }\n sourceObjectEntry[0].forEach((subscription) => {\n const { d: derivedObject } = subscription;\n if (sourceObject !== derivedObject) {\n unmarkPending(derivedObject);\n }\n });\n }\n};\nconst addSubscription = (subscription) => {\n const { s: sourceObject, d: derivedObject } = subscription;\n let derivedObjectEntry = derivedObjectMap.get(derivedObject);\n if (!derivedObjectEntry) {\n derivedObjectEntry = [/* @__PURE__ */ new Set()];\n derivedObjectMap.set(subscription.d, derivedObjectEntry);\n }\n derivedObjectEntry[0].add(subscription);\n let sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (!sourceObjectEntry) {\n const subscriptions = /* @__PURE__ */ new Set();\n const unsubscribe = subscribe(\n sourceObject,\n (ops) => {\n subscriptions.forEach((subscription2) => {\n const {\n d: derivedObject2,\n c: callback,\n n: notifyInSync,\n i: ignoreKeys\n } = subscription2;\n if (sourceObject === derivedObject2 && ops.every(\n (op) => op[1].length === 1 && ignoreKeys.includes(op[1][0])\n )) {\n return;\n }\n if (subscription2.p) {\n return;\n }\n markPending(sourceObject, callback);\n if (notifyInSync) {\n unmarkPending(sourceObject);\n } else {\n subscription2.p = Promise.resolve().then(() => {\n delete subscription2.p;\n unmarkPending(sourceObject);\n });\n }\n });\n },\n true\n );\n sourceObjectEntry = [subscriptions, unsubscribe, 0, /* @__PURE__ */ new Set()];\n sourceObjectMap.set(sourceObject, sourceObjectEntry);\n }\n sourceObjectEntry[0].add(subscription);\n};\nconst removeSubscription = (subscription) => {\n const { s: sourceObject, d: derivedObject } = subscription;\n const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].delete(subscription);\n if ((derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].size) === 0) {\n derivedObjectMap.delete(derivedObject);\n }\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n const [subscriptions, unsubscribe] = sourceObjectEntry;\n subscriptions.delete(subscription);\n if (!subscriptions.size) {\n unsubscribe();\n sourceObjectMap.delete(sourceObject);\n }\n }\n};\nconst listSubscriptions = (derivedObject) => {\n const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n if (derivedObjectEntry) {\n return Array.from(derivedObjectEntry[0]);\n }\n return [];\n};\nconst unstable_deriveSubscriptions = {\n add: addSubscription,\n remove: removeSubscription,\n list: listSubscriptions\n};\nfunction derive(derivedFns, options) {\n const proxyObject = (options == null ? void 0 : options.proxy) || proxy({});\n const notifyInSync = !!(options == null ? void 0 : options.sync);\n const derivedKeys = Object.keys(derivedFns);\n derivedKeys.forEach((key) => {\n if (Object.getOwnPropertyDescriptor(proxyObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const fn = derivedFns[key];\n let lastDependencies = null;\n const evaluate = () => {\n if (lastDependencies) {\n if (Array.from(lastDependencies).map(([p]) => checkPending(p, evaluate)).some((isPending) => isPending)) {\n return;\n }\n if (Array.from(lastDependencies).every(\n ([p, entry]) => getVersion(p) === entry.v\n )) {\n return;\n }\n }\n const dependencies = /* @__PURE__ */ new Map();\n const get = (p) => {\n dependencies.set(p, { v: getVersion(p) });\n return p;\n };\n const value = fn(get);\n const subscribeToDependencies = () => {\n dependencies.forEach((entry, p) => {\n var _a;\n const lastSubscription = (_a = lastDependencies == null ? void 0 : lastDependencies.get(p)) == null ? void 0 : _a.s;\n if (lastSubscription) {\n entry.s = lastSubscription;\n } else {\n const subscription = {\n s: p,\n // sourceObject\n d: proxyObject,\n // derivedObject\n k: key,\n // derived key\n c: evaluate,\n // callback\n n: notifyInSync,\n i: derivedKeys\n // ignoringKeys\n };\n addSubscription(subscription);\n entry.s = subscription;\n }\n });\n lastDependencies == null ? void 0 : lastDependencies.forEach((entry, p) => {\n if (!dependencies.has(p) && entry.s) {\n removeSubscription(entry.s);\n }\n });\n lastDependencies = dependencies;\n };\n if (value instanceof Promise) {\n value.finally(subscribeToDependencies);\n } else {\n subscribeToDependencies();\n }\n proxyObject[key] = value;\n };\n evaluate();\n });\n return proxyObject;\n}\nfunction underive(proxyObject, options) {\n const keysToDelete = (options == null ? void 0 : options.delete) ? /* @__PURE__ */ new Set() : null;\n listSubscriptions(proxyObject).forEach((subscription) => {\n const { k: key } = subscription;\n if (!(options == null ? void 0 : options.keys) || options.keys.includes(key)) {\n removeSubscription(subscription);\n if (keysToDelete) {\n keysToDelete.add(key);\n }\n }\n });\n if (keysToDelete) {\n keysToDelete.forEach((key) => {\n delete proxyObject[key];\n });\n }\n}\n\nfunction addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"addComputed is deprecated. Please consider using `derive`. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201\"\n );\n }\n const derivedFns = {};\n Object.keys(computedFns_FAKE).forEach((key) => {\n derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject));\n });\n return derive(derivedFns, { proxy: targetObject });\n}\n\nfunction proxyWithComputed_DEPRECATED(initialObject, computedFns) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n 'proxyWithComputed is deprecated. Please follow \"Computed Properties\" guide in docs.'\n );\n }\n Object.keys(computedFns).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const computedFn = computedFns[key];\n const { get, set } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n const desc = {};\n desc.get = () => get(snapshot(proxyObject));\n if (set) {\n desc.set = (newValue) => set(proxyObject, newValue);\n }\n Object.defineProperty(initialObject, key, desc);\n });\n const proxyObject = proxy(initialObject);\n return proxyObject;\n}\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nlet refSet;\nconst deepClone = (obj) => {\n if (!refSet) {\n refSet = unstable_buildProxyFunction()[2];\n }\n if (!isObject(obj) || refSet.has(obj)) {\n return obj;\n }\n const baseObject = Array.isArray(obj) ? [] : Object.create(Object.getPrototypeOf(obj));\n Reflect.ownKeys(obj).forEach((key) => {\n baseObject[key] = deepClone(obj[key]);\n });\n return baseObject;\n};\nfunction proxyWithHistory(initialValue, skipSubscribe = false) {\n const proxyObject = proxy({\n value: initialValue,\n history: ref({\n wip: void 0,\n // to avoid infinite loop\n snapshots: [],\n index: -1\n }),\n clone: deepClone,\n canUndo: () => proxyObject.history.index > 0,\n undo: () => {\n if (proxyObject.canUndo()) {\n proxyObject.value = proxyObject.history.wip = proxyObject.clone(\n proxyObject.history.snapshots[--proxyObject.history.index]\n );\n }\n },\n canRedo: () => proxyObject.history.index < proxyObject.history.snapshots.length - 1,\n redo: () => {\n if (proxyObject.canRedo()) {\n proxyObject.value = proxyObject.history.wip = proxyObject.clone(\n proxyObject.history.snapshots[++proxyObject.history.index]\n );\n }\n },\n saveHistory: () => {\n proxyObject.history.snapshots.splice(proxyObject.history.index + 1);\n proxyObject.history.snapshots.push(snapshot(proxyObject).value);\n ++proxyObject.history.index;\n },\n subscribe: () => subscribe(proxyObject, (ops) => {\n if (ops.every(\n (op) => op[1][0] === \"value\" && (op[0] !== \"set\" || op[2] !== proxyObject.history.wip)\n )) {\n proxyObject.saveHistory();\n }\n })\n });\n proxyObject.saveHistory();\n if (!skipSubscribe) {\n proxyObject.subscribe();\n }\n return proxyObject;\n}\n\nfunction proxySet(initialValues) {\n const set = proxy({\n data: Array.from(new Set(initialValues)),\n has(value) {\n return this.data.indexOf(value) !== -1;\n },\n add(value) {\n let hasProxy = false;\n if (typeof value === \"object\" && value !== null) {\n hasProxy = this.data.indexOf(proxy(value)) !== -1;\n }\n if (this.data.indexOf(value) === -1 && !hasProxy) {\n this.data.push(value);\n }\n return this;\n },\n delete(value) {\n const index = this.data.indexOf(value);\n if (index === -1) {\n return false;\n }\n this.data.splice(index, 1);\n return true;\n },\n clear() {\n this.data.splice(0);\n },\n get size() {\n return this.data.length;\n },\n forEach(cb) {\n this.data.forEach((value) => {\n cb(value, value, this);\n });\n },\n get [Symbol.toStringTag]() {\n return \"Set\";\n },\n toJSON() {\n return new Set(this.data);\n },\n [Symbol.iterator]() {\n return this.data[Symbol.iterator]();\n },\n values() {\n return this.data.values();\n },\n keys() {\n return this.data.values();\n },\n entries() {\n return new Set(this.data).entries();\n }\n });\n Object.defineProperties(set, {\n data: {\n enumerable: false\n },\n size: {\n enumerable: false\n },\n toJSON: {\n enumerable: false\n }\n });\n Object.seal(set);\n return set;\n}\n\nfunction proxyMap(entries) {\n const map = proxy({\n data: Array.from(entries || []),\n has(key) {\n return this.data.some((p) => p[0] === key);\n },\n set(key, value) {\n const record = this.data.find((p) => p[0] === key);\n if (record) {\n record[1] = value;\n } else {\n this.data.push([key, value]);\n }\n return this;\n },\n get(key) {\n var _a;\n return (_a = this.data.find((p) => p[0] === key)) == null ? void 0 : _a[1];\n },\n delete(key) {\n const index = this.data.findIndex((p) => p[0] === key);\n if (index === -1) {\n return false;\n }\n this.data.splice(index, 1);\n return true;\n },\n clear() {\n this.data.splice(0);\n },\n get size() {\n return this.data.length;\n },\n toJSON() {\n return new Map(this.data);\n },\n forEach(cb) {\n this.data.forEach((p) => {\n cb(p[1], p[0], this);\n });\n },\n keys() {\n return this.data.map((p) => p[0]).values();\n },\n values() {\n return this.data.map((p) => p[1]).values();\n },\n entries() {\n return new Map(this.data).entries();\n },\n get [Symbol.toStringTag]() {\n return \"Map\";\n },\n [Symbol.iterator]() {\n return this.entries();\n }\n });\n Object.defineProperties(map, {\n data: {\n enumerable: false\n },\n size: {\n enumerable: false\n },\n toJSON: {\n enumerable: false\n }\n });\n Object.seal(map);\n return map;\n}\n\nexport { addComputed_DEPRECATED as addComputed, derive, devtools, proxyMap, proxySet, proxyWithComputed_DEPRECATED as proxyWithComputed, proxyWithHistory, subscribeKey, underive, unstable_deriveSubscriptions, watch };\n","const SECURE_SITE = 'https://secure.walletconnect.com';\nexport const ONRAMP_PROVIDERS = [\n {\n label: 'Coinbase',\n name: 'coinbase',\n feeRange: '1-2%',\n url: ''\n }\n];\nexport const ConstantsUtil = {\n FOUR_MINUTES_MS: 240000,\n TEN_SEC_MS: 10000,\n ONE_SEC_MS: 1000,\n SECURE_SITE,\n SECURE_SITE_DASHBOARD: `${SECURE_SITE}/dashboard`,\n SECURE_SITE_FAVICON: `${SECURE_SITE}/images/favicon.png`,\n RESTRICTED_TIMEZONES: [\n 'ASIA/SHANGHAI',\n 'ASIA/URUMQI',\n 'ASIA/CHONGQING',\n 'ASIA/HARBIN',\n 'ASIA/KASHGAR',\n 'ASIA/MACAU',\n 'ASIA/HONG_KONG',\n 'ASIA/MACAO',\n 'ASIA/BEIJING',\n 'ASIA/HARBIN'\n ],\n WC_COINBASE_PAY_SDK_CHAINS: [\n 'ethereum',\n 'arbitrum',\n 'polygon',\n 'avalanche-c-chain',\n 'optimism',\n 'celo',\n 'base'\n ],\n WC_COINBASE_PAY_SDK_FALLBACK_CHAIN: 'ethereum',\n WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP: {\n Ethereum: 'ethereum',\n 'Arbitrum One': 'arbitrum',\n Polygon: 'polygon',\n Avalanche: 'avalanche-c-chain',\n 'OP Mainnet': 'optimism',\n Celo: 'celo',\n Base: 'base'\n },\n WC_COINBASE_ONRAMP_APP_ID: 'bf18c88d-495a-463b-b249-0b9d3656cf5e',\n SUGGESTED_TOKENS: [\n 'ETH',\n 'UNI',\n '1INCH',\n 'AAVE',\n 'SOL',\n 'ADA',\n 'AVAX',\n 'DOT',\n 'LINK',\n 'NITRO',\n 'GAIA',\n 'MILK',\n 'TRX',\n 'NEAR',\n 'GNO',\n 'WBTC',\n 'DAI',\n 'WETH',\n 'USDC',\n 'USDT',\n 'ARB',\n 'BAL',\n 'BICO',\n 'CRV',\n 'ENS',\n 'MATIC',\n 'OP'\n ],\n POPULAR_TOKENS: [\n 'ETH',\n 'UNI',\n '1INCH',\n 'AAVE',\n 'SOL',\n 'ADA',\n 'AVAX',\n 'DOT',\n 'LINK',\n 'NITRO',\n 'GAIA',\n 'MILK',\n 'TRX',\n 'NEAR',\n 'GNO',\n 'WBTC',\n 'DAI',\n 'WETH',\n 'USDC',\n 'USDT',\n 'ARB',\n 'BAL',\n 'BICO',\n 'CRV',\n 'ENS',\n 'MATIC',\n 'OP',\n 'DAI',\n 'CHAMP',\n 'WOLF',\n 'SALE',\n 'BAL',\n 'BUSD',\n 'MUST',\n 'BTCpx',\n 'ROUTE',\n 'HEX',\n 'WELT',\n 'amDAI',\n 'VSQ',\n 'VISION',\n 'AURUM',\n 'pSP',\n 'SNX',\n 'VC',\n 'LINK',\n 'CHP',\n 'amUSDT',\n 'SPHERE',\n 'FOX',\n 'GIDDY',\n 'GFC',\n 'OMEN',\n 'OX_OLD',\n 'DE',\n 'WNT'\n ],\n NATIVE_TOKEN_ADDRESS: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n CONVERT_SLIPPAGE_TOLERANCE: 1\n};\n//# sourceMappingURL=ConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const CoreHelperUtil = {\n isMobile() {\n if (typeof window !== 'undefined') {\n return Boolean(window.matchMedia('(pointer:coarse)').matches ||\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent));\n }\n return false;\n },\n checkCaipNetwork(network, networkName = '') {\n return network?.id.toLocaleLowerCase().includes(networkName.toLowerCase());\n },\n isAndroid() {\n const ua = window.navigator.userAgent.toLowerCase();\n return CoreHelperUtil.isMobile() && ua.includes('android');\n },\n isIos() {\n const ua = window.navigator.userAgent.toLowerCase();\n return CoreHelperUtil.isMobile() && (ua.includes('iphone') || ua.includes('ipad'));\n },\n isClient() {\n return typeof window !== 'undefined';\n },\n isPairingExpired(expiry) {\n return expiry ? expiry - Date.now() <= ConstantsUtil.TEN_SEC_MS : true;\n },\n isAllowedRetry(lastRetry) {\n return Date.now() - lastRetry >= ConstantsUtil.ONE_SEC_MS;\n },\n copyToClopboard(text) {\n navigator.clipboard.writeText(text);\n },\n getPairingExpiry() {\n return Date.now() + ConstantsUtil.FOUR_MINUTES_MS;\n },\n getPlainAddress(caipAddress) {\n return caipAddress.split(':')[2];\n },\n async wait(milliseconds) {\n return new Promise(resolve => {\n setTimeout(resolve, milliseconds);\n });\n },\n debounce(func, timeout = 500) {\n let timer = undefined;\n return (...args) => {\n function next() {\n func(...args);\n }\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(next, timeout);\n };\n },\n isHttpUrl(url) {\n return url.startsWith('http://') || url.startsWith('https://');\n },\n formatNativeUrl(appUrl, wcUri) {\n if (CoreHelperUtil.isHttpUrl(appUrl)) {\n return this.formatUniversalUrl(appUrl, wcUri);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.includes('://')) {\n safeAppUrl = appUrl.replaceAll('/', '').replaceAll(':', '');\n safeAppUrl = `${safeAppUrl}://`;\n }\n if (!safeAppUrl.endsWith('/')) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n const encodedWcUrl = encodeURIComponent(wcUri);\n return {\n redirect: `${safeAppUrl}wc?uri=${encodedWcUrl}`,\n href: safeAppUrl\n };\n },\n formatUniversalUrl(appUrl, wcUri) {\n if (!CoreHelperUtil.isHttpUrl(appUrl)) {\n return this.formatNativeUrl(appUrl, wcUri);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.endsWith('/')) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n const encodedWcUrl = encodeURIComponent(wcUri);\n return {\n redirect: `${safeAppUrl}wc?uri=${encodedWcUrl}`,\n href: safeAppUrl\n };\n },\n openHref(href, target, features) {\n window.open(href, target, features || 'noreferrer noopener');\n },\n async preloadImage(src) {\n const imagePromise = new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = resolve;\n image.onerror = reject;\n image.crossOrigin = 'anonymous';\n image.src = src;\n });\n return Promise.race([imagePromise, CoreHelperUtil.wait(2000)]);\n },\n formatBalance(balance, symbol) {\n let formattedBalance = undefined;\n if (balance === '0') {\n formattedBalance = '0.000';\n }\n else if (typeof balance === 'string') {\n const number = Number(balance);\n if (number) {\n formattedBalance = number.toString().match(/^-?\\d+(?:\\.\\d{0,3})?/u)?.[0];\n }\n }\n return formattedBalance ? `${formattedBalance} ${symbol ?? ''}` : `0.000 ${symbol ?? ''}`;\n },\n formatBalance2(balance, symbol) {\n let formattedBalance = undefined;\n if (balance === '0') {\n formattedBalance = '0';\n }\n else if (typeof balance === 'string') {\n const number = Number(balance);\n if (number) {\n formattedBalance = number.toString().match(/^-?\\d+(?:\\.\\d{0,3})?/u)?.[0];\n }\n }\n return {\n value: formattedBalance ?? '0',\n rest: formattedBalance === '0' ? '000' : '',\n symbol\n };\n },\n isRestrictedRegion() {\n try {\n const { timeZone } = new Intl.DateTimeFormat().resolvedOptions();\n const capTimeZone = timeZone.toUpperCase();\n return ConstantsUtil.RESTRICTED_TIMEZONES.includes(capTimeZone);\n }\n catch {\n return false;\n }\n },\n getApiUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://api.web3modal.org'\n : 'https://api.web3modal.com';\n },\n getBlockchainApiUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://rpc.walletconnect.org'\n : 'https://rpc.walletconnect.com';\n },\n getAnalyticsUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://pulse.walletconnect.org'\n : 'https://pulse.walletconnect.com';\n },\n getUUID() {\n if (crypto?.randomUUID) {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/gu, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n },\n parseError(error) {\n if (typeof error === 'string') {\n return error;\n }\n else if (typeof error?.issues?.[0]?.message === 'string') {\n return error.issues[0].message;\n }\n else if (error instanceof Error) {\n return error.message;\n }\n return 'Unknown error';\n },\n sortRequestedNetworks(approvedIds, requestedNetworks = []) {\n const approvedIndexMap = {};\n if (requestedNetworks && approvedIds) {\n approvedIds.forEach((id, index) => {\n approvedIndexMap[id] = index;\n });\n requestedNetworks.sort((a, b) => {\n const indexA = approvedIndexMap[a.id];\n const indexB = approvedIndexMap[b.id];\n if (indexA !== undefined && indexB !== undefined) {\n return indexA - indexB;\n }\n else if (indexA !== undefined) {\n return -1;\n }\n else if (indexB !== undefined) {\n return 1;\n }\n return 0;\n });\n }\n return requestedNetworks;\n },\n calculateBalance(array) {\n let sum = 0;\n for (const item of array) {\n sum += item.value ?? 0;\n }\n return sum;\n },\n formatTokenBalance(number) {\n const roundedNumber = number.toFixed(2);\n const [dollars, pennies] = roundedNumber.split('.');\n return { dollars, pennies };\n },\n isAddress(address) {\n if (!/^(?:0x)?[0-9a-f]{40}$/iu.test(address)) {\n return false;\n }\n else if (/^(?:0x)?[0-9a-f]{40}$/iu.test(address) || /^(?:0x)?[0-9A-F]{40}$/iu.test(address)) {\n return true;\n }\n return false;\n }\n};\n//# sourceMappingURL=CoreHelperUtil.js.map","export class FetchUtil {\n constructor({ baseUrl }) {\n this.baseUrl = baseUrl;\n }\n async get({ headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, { method: 'GET', headers, signal, cache: 'no-cache' });\n return response.json();\n }\n async getBlob({ headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, { method: 'GET', headers, signal });\n return response.blob();\n }\n async post({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'POST',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n async put({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'PUT',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n async delete({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'DELETE',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n createUrl({ path, params }) {\n const url = new URL(path, this.baseUrl);\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value) {\n url.searchParams.append(key, value);\n }\n });\n }\n return url;\n }\n}\n//# sourceMappingURL=FetchUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nconst state = proxy({\n projectId: '',\n sdkType: 'w3m',\n sdkVersion: 'html-wagmi-undefined'\n});\nexport const OptionsController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setProjectId(projectId) {\n state.projectId = projectId;\n },\n setAllWallets(allWallets) {\n state.allWallets = allWallets;\n },\n setIncludeWalletIds(includeWalletIds) {\n state.includeWalletIds = includeWalletIds;\n },\n setExcludeWalletIds(excludeWalletIds) {\n state.excludeWalletIds = excludeWalletIds;\n },\n setFeaturedWalletIds(featuredWalletIds) {\n state.featuredWalletIds = featuredWalletIds;\n },\n setTokens(tokens) {\n state.tokens = tokens;\n },\n setTermsConditionsUrl(termsConditionsUrl) {\n state.termsConditionsUrl = termsConditionsUrl;\n },\n setPrivacyPolicyUrl(privacyPolicyUrl) {\n state.privacyPolicyUrl = privacyPolicyUrl;\n },\n setCustomWallets(customWallets) {\n state.customWallets = customWallets;\n },\n setIsSiweEnabled(isSiweEnabled) {\n state.isSiweEnabled = isSiweEnabled;\n },\n setEnableAnalytics(enableAnalytics) {\n state.enableAnalytics = enableAnalytics;\n },\n setSdkVersion(sdkVersion) {\n state.sdkVersion = sdkVersion;\n },\n setMetadata(metadata) {\n state.metadata = metadata;\n },\n setOnrampEnabled(enableOnramp) {\n state.enableOnramp = enableOnramp;\n },\n setWalletFeaturesEnabled(enableWalletFeatures) {\n state.enableWalletFeatures = enableWalletFeatures;\n }\n};\n//# sourceMappingURL=OptionsController.js.map","import { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { OptionsController } from './OptionsController.js';\nconst DEFAULT_OPTIONS = {\n purchaseCurrencies: [\n {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'USD Coin',\n symbol: 'USDC',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n },\n {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'Ether',\n symbol: 'ETH',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n }\n ],\n paymentCurrencies: [\n {\n id: 'USD',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n },\n {\n id: 'EUR',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n }\n ]\n};\nconst baseUrl = CoreHelperUtil.getBlockchainApiUrl();\nconst api = new FetchUtil({ baseUrl });\nexport const BlockchainApiController = {\n fetchIdentity({ address }) {\n return api.get({\n path: `/v1/identity/${address}`,\n params: {\n projectId: OptionsController.state.projectId\n }\n });\n },\n fetchTransactions({ account, projectId, cursor, onramp, signal }) {\n const queryParams = cursor ? { cursor } : {};\n return api.get({\n path: `/v1/account/${account}/history?projectId=${projectId}${onramp ? `&onramp=${onramp}` : ''}`,\n params: queryParams,\n signal\n });\n },\n fetchConvertTokens({ projectId, chainId }) {\n return api.get({\n path: `/v1/convert/tokens?projectId=${projectId}&chainId=${chainId}`\n });\n },\n fetchTokenPrice({ projectId, addresses }) {\n return api.post({\n path: '/v1/fungible/price',\n body: {\n projectId,\n currency: 'usd',\n addresses\n },\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n },\n fetchConvertAllowance({ projectId, tokenAddress, userAddress }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/allowance?projectId=${projectId}&tokenAddress=${tokenAddress}&userAddress=${userAddress}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n fetchGasPrice({ projectId, chainId }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/gas-price?projectId=${projectId}&chainId=${chainId}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n generateConvertCalldata({ amount, from, projectId, to, userAddress }) {\n return api.post({\n path: '/v1/convert/build-transaction',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: {\n amount,\n eip155: {\n slippage: ConstantsUtil.CONVERT_SLIPPAGE_TOLERANCE\n },\n from,\n projectId,\n to,\n userAddress\n }\n });\n },\n generateApproveCalldata({ from, projectId, to, userAddress }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/build-approve?projectId=${projectId}&userAddress=${userAddress}&from=${from}&to=${to}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n async getBalance(address, chainId) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/account/${address}/balance`,\n headers: {\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n },\n params: {\n currency: 'usd',\n projectId: OptionsController.state.projectId,\n chainId\n }\n });\n },\n async generateOnRampURL({ destinationWallets, partnerUserId, defaultNetwork, purchaseAmount, paymentAmount }) {\n const response = await api.post({\n path: `/v1/generators/onrampurl?projectId=${OptionsController.state.projectId}`,\n body: {\n destinationWallets,\n defaultNetwork,\n partnerUserId,\n defaultExperience: 'buy',\n presetCryptoAmount: purchaseAmount,\n presetFiatAmount: paymentAmount\n }\n });\n return response.url;\n },\n async getOnrampOptions() {\n try {\n const response = await api.get({\n path: `/v1/onramp/options?projectId=${OptionsController.state.projectId}`\n });\n return response;\n }\n catch (e) {\n return DEFAULT_OPTIONS;\n }\n },\n async getOnrampQuote({ purchaseCurrency, paymentCurrency, amount, network }) {\n try {\n const response = await api.post({\n path: `/v1/onramp/quote?projectId=${OptionsController.state.projectId}`,\n body: {\n purchaseCurrency,\n paymentCurrency,\n amount,\n network\n }\n });\n return response;\n }\n catch (e) {\n return {\n coinbaseFee: { amount, currency: paymentCurrency.id },\n networkFee: { amount, currency: paymentCurrency.id },\n paymentSubtotal: { amount, currency: paymentCurrency.id },\n paymentTotal: { amount, currency: paymentCurrency.id },\n purchaseAmount: { amount, currency: paymentCurrency.id },\n quoteId: 'mocked-quote-id'\n };\n }\n }\n};\n//# sourceMappingURL=BlockchainApiController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nconst state = proxy({\n message: '',\n variant: 'success',\n open: false\n});\nexport const SnackController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n showSuccess(message) {\n state.message = message;\n state.variant = 'success';\n state.open = true;\n },\n showError(message) {\n const errorMessage = CoreHelperUtil.parseError(message);\n state.message = errorMessage;\n state.variant = 'error';\n state.open = true;\n },\n hide() {\n state.open = false;\n }\n};\n//# sourceMappingURL=SnackController.js.map","function getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar browser = {exports: {}};\n\n// shim for using process in browser\nvar process = browser.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ());\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] };\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\nvar browserExports = browser.exports;\nconst process$1 = /*@__PURE__*/getDefaultExportFromCjs(browserExports);\n\nexport { process$1 as default, process$1 as process };\n//# sourceMappingURL=index.js.map\n","const WC_DEEPLINK = 'WALLETCONNECT_DEEPLINK_CHOICE';\nconst W3M_RECENT = '@w3m/recent';\nconst W3M_CONNECTED_WALLET_IMAGE_URL = '@w3m/connected_wallet_image_url';\nconst W3M_CONNECTED_CONNECTOR = '@w3m/connected_connector';\nexport const StorageUtil = {\n setWalletConnectDeepLink({ href, name }) {\n try {\n localStorage.setItem(WC_DEEPLINK, JSON.stringify({ href, name }));\n }\n catch {\n console.info('Unable to set WalletConnect deep link');\n }\n },\n getWalletConnectDeepLink() {\n try {\n const deepLink = localStorage.getItem(WC_DEEPLINK);\n if (deepLink) {\n return JSON.parse(deepLink);\n }\n }\n catch {\n console.info('Unable to get WalletConnect deep link');\n }\n return undefined;\n },\n deleteWalletConnectDeepLink() {\n try {\n localStorage.removeItem(WC_DEEPLINK);\n }\n catch {\n console.info('Unable to delete WalletConnect deep link');\n }\n },\n setWeb3ModalRecent(wallet) {\n try {\n const recentWallets = StorageUtil.getRecentWallets();\n const exists = recentWallets.find(w => w.id === wallet.id);\n if (!exists) {\n recentWallets.unshift(wallet);\n if (recentWallets.length > 2) {\n recentWallets.pop();\n }\n localStorage.setItem(W3M_RECENT, JSON.stringify(recentWallets));\n }\n }\n catch {\n console.info('Unable to set Web3Modal recent');\n }\n },\n getRecentWallets() {\n try {\n const recent = localStorage.getItem(W3M_RECENT);\n return recent ? JSON.parse(recent) : [];\n }\n catch {\n console.info('Unable to get Web3Modal recent');\n }\n return [];\n },\n setConnectedWalletImageUrl(imageUrl) {\n try {\n localStorage.setItem(W3M_CONNECTED_WALLET_IMAGE_URL, imageUrl);\n }\n catch {\n console.info('Unable to set Connected Wallet Image Url');\n }\n },\n getConnectedWalletImageUrl() {\n try {\n return localStorage.getItem(W3M_CONNECTED_WALLET_IMAGE_URL);\n }\n catch {\n console.info('Unable to set Connected Wallet Image Url');\n }\n return undefined;\n },\n setConnectedConnector(connectorType) {\n try {\n localStorage.setItem(W3M_CONNECTED_CONNECTOR, connectorType);\n }\n catch {\n console.info('Unable to set Connected Connector');\n }\n },\n getConnectedConnector() {\n try {\n return localStorage.getItem(W3M_CONNECTED_CONNECTOR);\n }\n catch {\n console.info('Unable to get Connected Connector');\n }\n return undefined;\n }\n};\n//# sourceMappingURL=StorageUtil.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { OptionsController } from './OptionsController.js';\nconst baseUrl = CoreHelperUtil.getAnalyticsUrl();\nconst api = new FetchUtil({ baseUrl });\nconst excluded = ['MODAL_CREATED'];\nconst state = proxy({\n timestamp: Date.now(),\n data: {\n type: 'track',\n event: 'MODAL_CREATED'\n }\n});\nexport const EventsController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n _getApiHeaders() {\n const { projectId, sdkType, sdkVersion } = OptionsController.state;\n return {\n 'x-project-id': projectId,\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n };\n },\n async _sendAnalyticsEvent(payload) {\n try {\n if (excluded.includes(payload.data.event) || typeof window === 'undefined') {\n return;\n }\n await api.post({\n path: '/e',\n headers: EventsController._getApiHeaders(),\n body: {\n eventId: CoreHelperUtil.getUUID(),\n url: window.location.href,\n domain: window.location.hostname,\n timestamp: payload.timestamp,\n props: payload.data\n }\n });\n }\n catch {\n }\n },\n sendEvent(data) {\n state.timestamp = Date.now();\n state.data = data;\n if (OptionsController.state.enableAnalytics) {\n EventsController._sendAnalyticsEvent(state);\n }\n }\n};\n//# sourceMappingURL=EventsController.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { OptionsController } from './OptionsController.js';\nimport { EventsController } from './EventsController.js';\nimport { SnackController } from './SnackController.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nconst state = proxy({\n transactions: [],\n coinbaseTransactions: {},\n transactionsByYear: {},\n loading: false,\n empty: false,\n next: undefined\n});\nexport const TransactionsController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n async fetchTransactions(accountAddress, onramp) {\n const { projectId } = OptionsController.state;\n if (!projectId || !accountAddress) {\n throw new Error(\"Transactions can't be fetched without a projectId and an accountAddress\");\n }\n state.loading = true;\n try {\n const response = await BlockchainApiController.fetchTransactions({\n account: accountAddress,\n projectId,\n cursor: state.next,\n onramp\n });\n const nonSpamTransactions = this.filterSpamTransactions(response.data);\n const filteredTransactions = [...state.transactions, ...nonSpamTransactions];\n state.loading = false;\n if (onramp === 'coinbase') {\n state.coinbaseTransactions = this.groupTransactionsByYearAndMonth(state.coinbaseTransactions, response.data);\n }\n else {\n state.transactions = filteredTransactions;\n state.transactionsByYear = this.groupTransactionsByYearAndMonth(state.transactionsByYear, nonSpamTransactions);\n }\n state.empty = filteredTransactions.length === 0;\n state.next = response.next ? response.next : undefined;\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'ERROR_FETCH_TRANSACTIONS',\n properties: {\n address: accountAddress,\n projectId,\n cursor: state.next\n }\n });\n SnackController.showError('Failed to fetch transactions');\n state.loading = false;\n state.empty = true;\n state.next = undefined;\n }\n },\n groupTransactionsByYearAndMonth(transactionsMap = {}, transactions = []) {\n const grouped = transactionsMap;\n transactions.forEach(transaction => {\n const year = new Date(transaction.metadata.minedAt).getFullYear();\n const month = new Date(transaction.metadata.minedAt).getMonth();\n const yearTransactions = grouped[year] ?? {};\n const monthTransactions = yearTransactions[month] ?? [];\n const newMonthTransactions = monthTransactions.filter(tx => tx.id !== transaction.id);\n grouped[year] = {\n ...yearTransactions,\n [month]: [...newMonthTransactions, transaction].sort((a, b) => new Date(b.metadata.minedAt).getTime() - new Date(a.metadata.minedAt).getTime())\n };\n });\n return grouped;\n },\n filterSpamTransactions(transactions) {\n return transactions.filter(transaction => {\n const isAllSpam = transaction.transfers.every(transfer => transfer.nft_info?.flags.is_spam === true);\n return !isAllSpam;\n });\n },\n clearCursor() {\n state.next = undefined;\n },\n resetTransactions() {\n state.transactions = [];\n state.transactionsByYear = {};\n state.loading = false;\n state.empty = false;\n state.next = undefined;\n }\n};\n//# sourceMappingURL=TransactionsController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { StorageUtil } from '../utils/StorageUtil.js';\nimport { TransactionsController } from './TransactionsController.js';\nconst state = proxy({\n wcError: false,\n buffering: false\n});\nexport const ConnectionController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getClient() {\n if (!state._client) {\n throw new Error('ConnectionController client not set');\n }\n return state._client;\n },\n setClient(client) {\n state._client = ref(client);\n },\n connectWalletConnect() {\n state.wcPromise = this._getClient().connectWalletConnect(uri => {\n state.wcUri = uri;\n state.wcPairingExpiry = CoreHelperUtil.getPairingExpiry();\n });\n StorageUtil.setConnectedConnector('WALLET_CONNECT');\n },\n async connectExternal(options) {\n await this._getClient().connectExternal?.(options);\n StorageUtil.setConnectedConnector(options.type);\n },\n async signMessage(message) {\n return this._getClient().signMessage(message);\n },\n parseUnits(value, decimals) {\n return this._getClient().parseUnits(value, decimals);\n },\n formatUnits(value, decimals) {\n return this._getClient().formatUnits(value, decimals);\n },\n async sendTransaction(args) {\n return this._getClient().sendTransaction(args);\n },\n async estimateGas(args) {\n return this._getClient().estimateGas(args);\n },\n checkInstalled(ids) {\n return this._getClient().checkInstalled?.(ids);\n },\n resetWcConnection() {\n state.wcUri = undefined;\n state.wcPairingExpiry = undefined;\n state.wcPromise = undefined;\n state.wcLinking = undefined;\n state.recentWallet = undefined;\n TransactionsController.resetTransactions();\n StorageUtil.deleteWalletConnectDeepLink();\n },\n setWcLinking(wcLinking) {\n state.wcLinking = wcLinking;\n },\n setWcError(wcError) {\n state.wcError = wcError;\n state.buffering = false;\n },\n setRecentWallet(wallet) {\n state.recentWallet = wallet;\n },\n setBuffering(buffering) {\n state.buffering = buffering;\n },\n async disconnect() {\n await this._getClient().disconnect();\n this.resetWcConnection();\n }\n};\n//# sourceMappingURL=ConnectionController.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n loading: false,\n open: false,\n selectedNetworkId: undefined\n});\nexport const PublicStateController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n set(newState) {\n Object.assign(state, { ...state, ...newState });\n }\n};\n//# sourceMappingURL=PublicStateController.js.map","!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).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={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\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.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()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","import dayjs from 'dayjs';\nimport updateLocale from 'dayjs/plugin/updateLocale.js';\nimport relativeTime from 'dayjs/plugin/relativeTime.js';\ndayjs.extend(relativeTime);\ndayjs.extend(updateLocale);\ndayjs.updateLocale('en', {\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: '%s sec',\n m: '1 min',\n mm: '%d min',\n h: '1 hr',\n hh: '%d hrs',\n d: '1 d',\n dd: '%d d',\n M: '1 mo',\n MM: '%d mo',\n y: '1 yr',\n yy: '%d yr'\n }\n});\nexport const DateUtil = {\n getYear(date = new Date().toISOString()) {\n return dayjs(date).year();\n },\n getRelativeDateFromNow(date) {\n return dayjs(date).fromNow(true);\n },\n formatDate(date, format = 'DD MMM') {\n return dayjs(date).format(format);\n }\n};\n//# sourceMappingURL=DateUtil.js.map","export const NetworkUtil = {\n caipNetworkIdToNumber(caipnetworkId) {\n return caipnetworkId ? Number(caipnetworkId.split(':')[1]) : undefined;\n }\n};\n//# sourceMappingURL=NetworkUtil.js.map","import BigNumber from 'bignumber.js';\nexport const NumberUtil = {\n bigNumber(value) {\n return new BigNumber(value);\n },\n multiply(a, b) {\n if (a === undefined || b === undefined) {\n return BigNumber(0);\n }\n const aBigNumber = new BigNumber(a);\n const bBigNumber = new BigNumber(b);\n return aBigNumber.multipliedBy(bBigNumber);\n }\n};\n//# sourceMappingURL=NumberUtil.js.map","import { subscribeKey as subKey } from 'valtio/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { PublicStateController } from './PublicStateController.js';\nimport { EventsController } from './EventsController.js';\nimport { ModalController } from './ModalController.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { NetworkUtil } from '@web3modal/common';\nconst state = proxy({\n supportsAllNetworks: true,\n isDefaultCaipNetwork: false,\n smartAccountEnabledNetworks: []\n});\nexport const NetworkController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getClient() {\n if (!state._client) {\n throw new Error('NetworkController client not set');\n }\n return state._client;\n },\n setClient(client) {\n state._client = ref(client);\n },\n setCaipNetwork(caipNetwork) {\n state.caipNetwork = caipNetwork;\n PublicStateController.set({ selectedNetworkId: caipNetwork?.id });\n if (!this.state.allowUnsupportedChain) {\n this.checkIfSupportedNetwork();\n }\n },\n setDefaultCaipNetwork(caipNetwork) {\n state.caipNetwork = caipNetwork;\n PublicStateController.set({ selectedNetworkId: caipNetwork?.id });\n state.isDefaultCaipNetwork = true;\n },\n setRequestedCaipNetworks(requestedNetworks) {\n state.requestedCaipNetworks = requestedNetworks;\n },\n setAllowUnsupportedChain(allowUnsupportedChain) {\n state.allowUnsupportedChain = allowUnsupportedChain;\n },\n setSmartAccountEnabledNetworks(smartAccountEnabledNetworks) {\n state.smartAccountEnabledNetworks = smartAccountEnabledNetworks;\n },\n getRequestedCaipNetworks() {\n const { approvedCaipNetworkIds, requestedCaipNetworks } = state;\n const approvedIds = approvedCaipNetworkIds;\n const requestedNetworks = requestedCaipNetworks;\n return CoreHelperUtil.sortRequestedNetworks(approvedIds, requestedNetworks);\n },\n async getApprovedCaipNetworksData() {\n const data = await this._getClient().getApprovedCaipNetworksData();\n state.supportsAllNetworks = data.supportsAllNetworks;\n state.approvedCaipNetworkIds = data.approvedCaipNetworkIds;\n },\n async switchActiveNetwork(network) {\n await this._getClient().switchCaipNetwork(network);\n state.caipNetwork = network;\n if (network) {\n EventsController.sendEvent({\n type: 'track',\n event: 'SWITCH_NETWORK',\n properties: { network: network.id }\n });\n }\n },\n checkIfSupportedNetwork() {\n state.isUnsupportedChain = !state.requestedCaipNetworks?.some(network => network.id === state.caipNetwork?.id);\n if (state.isUnsupportedChain) {\n this.showUnsupportedChainUI();\n }\n },\n checkIfSmartAccountEnabled() {\n const networkId = NetworkUtil.caipNetworkIdToNumber(state.caipNetwork?.id);\n if (!networkId) {\n return false;\n }\n return Boolean(state.smartAccountEnabledNetworks?.includes(networkId));\n },\n resetNetwork() {\n if (!state.isDefaultCaipNetwork) {\n state.caipNetwork = undefined;\n }\n state.approvedCaipNetworkIds = undefined;\n state.supportsAllNetworks = true;\n state.smartAccountEnabledNetworks = [];\n },\n showUnsupportedChainUI() {\n setTimeout(() => {\n ModalController.open({ view: 'UnsupportedChain' });\n }, 300);\n }\n};\n//# sourceMappingURL=NetworkController.js.map","import { NetworkController } from '../controllers/NetworkController.js';\nimport { AccountController } from '../controllers/AccountController.js';\nimport { ConnectionController } from '../controllers/ConnectionController.js';\nimport { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { BlockchainApiController } from '../controllers/BlockchainApiController.js';\nimport { OptionsController } from '../controllers/OptionsController.js';\nexport const ConvertApiUtil = {\n async getTokenList() {\n const response = await BlockchainApiController.fetchConvertTokens({\n chainId: NetworkController.state.caipNetwork?.id,\n projectId: OptionsController.state.projectId\n });\n const tokens = response.tokens.map(token => {\n return {\n ...token,\n eip2612: false,\n quantity: {\n decimals: '0',\n numeric: '0'\n },\n price: 0,\n value: 0\n };\n });\n return tokens;\n },\n async fetchGasPrice() {\n const projectId = OptionsController.state.projectId;\n const caipNetwork = NetworkController.state.caipNetwork;\n if (!caipNetwork) {\n return null;\n }\n return await BlockchainApiController.fetchGasPrice({\n projectId,\n chainId: caipNetwork.id\n });\n },\n async fetchConvertAllowance({ tokenAddress, userAddress, sourceTokenAmount, sourceTokenDecimals }) {\n const projectId = OptionsController.state.projectId;\n const response = await BlockchainApiController.fetchConvertAllowance({\n projectId,\n tokenAddress,\n userAddress\n });\n if (response?.allowance && sourceTokenAmount && sourceTokenDecimals) {\n const parsedValue = ConnectionController.parseUnits(sourceTokenAmount, sourceTokenDecimals);\n const hasAllowance = BigInt(response.allowance) >= parsedValue;\n return hasAllowance;\n }\n return false;\n },\n async getMyTokensWithBalance() {\n const address = AccountController.state.address;\n const caipNetwork = NetworkController.state.caipNetwork;\n if (!address || !caipNetwork) {\n return [];\n }\n const response = await BlockchainApiController.getBalance(address, caipNetwork.id);\n const balances = response.balances;\n return this.mapBalancesToConvertTokens(balances);\n },\n mapBalancesToConvertTokens(balances) {\n return balances.map(token => {\n return {\n symbol: token.symbol,\n name: token.name,\n address: token?.address\n ? token.address\n : `${NetworkController.state.caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}`,\n decimals: parseInt(token.quantity.decimals, 10),\n logoUri: token.iconUrl,\n eip2612: false,\n quantity: token.quantity,\n price: token.price,\n value: token.value\n };\n });\n }\n};\n//# sourceMappingURL=ConvertApiUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nconst state = proxy({\n view: 'Connect',\n history: ['Connect'],\n transactionStack: []\n});\nexport const RouterController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n pushTransactionStack(action) {\n state.transactionStack.push(action);\n },\n popTransactionStack(cancel) {\n const action = state.transactionStack.pop();\n if (!action) {\n return;\n }\n if (cancel) {\n this.goBack();\n action?.onCancel?.();\n }\n else {\n if (action.goBack) {\n this.goBack();\n }\n else if (action.view) {\n this.reset(action.view);\n }\n action?.onSuccess?.();\n }\n },\n push(view, data) {\n if (view !== state.view) {\n state.view = view;\n state.history.push(view);\n state.data = data;\n }\n },\n reset(view) {\n state.view = view;\n state.history = [view];\n },\n replace(view, data) {\n if (state.history.length > 1 && state.history.at(-1) !== view) {\n state.view = view;\n state.history[state.history.length - 1] = view;\n state.data = data;\n }\n },\n goBack() {\n if (state.history.length > 1) {\n state.history.pop();\n const [last] = state.history.slice(-1);\n if (last) {\n state.view = last;\n }\n }\n },\n goBackToIndex(historyIndex) {\n if (state.history.length > 1) {\n state.history = state.history.slice(0, historyIndex + 1);\n const [last] = state.history.slice(-1);\n if (last) {\n state.view = last;\n }\n }\n }\n};\n//# sourceMappingURL=RouterController.js.map","import { subscribeKey as subKey } from 'valtio/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { AccountController } from './AccountController.js';\nimport { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { ConnectionController } from './ConnectionController.js';\nimport { ConvertApiUtil } from '../utils/ConvertApiUtil.js';\nimport { SnackController } from './SnackController.js';\nimport { RouterController } from './RouterController.js';\nimport { NumberUtil } from '@web3modal/common';\nimport { NetworkController } from './NetworkController.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { OptionsController } from './OptionsController.js';\nexport const INITIAL_GAS_LIMIT = 150000;\nclass TransactionError extends Error {\n constructor(message, shortMessage) {\n super(message);\n this.name = 'TransactionError';\n this.shortMessage = shortMessage;\n }\n}\nconst state = proxy({\n initialized: false,\n loading: false,\n loadingPrices: false,\n approvalTransaction: undefined,\n convertTransaction: undefined,\n transactionError: undefined,\n transactionLoading: false,\n sourceToken: undefined,\n sourceTokenAmount: '',\n sourceTokenPriceInUSD: 0,\n toToken: undefined,\n toTokenAmount: '',\n toTokenPriceInUSD: 0,\n networkPrice: '0',\n networkBalanceInUSD: '0',\n inputError: undefined,\n slippage: ConstantsUtil.CONVERT_SLIPPAGE_TOLERANCE,\n tokens: undefined,\n popularTokens: undefined,\n suggestedTokens: undefined,\n foundTokens: undefined,\n myTokensWithBalance: undefined,\n tokensPriceMap: {},\n gasFee: BigInt(0),\n gasPriceInUSD: 0,\n priceImpact: undefined,\n maxSlippage: undefined\n});\nexport const ConvertController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n getParams() {\n const { address } = AccountController.state;\n const networkAddress = `${NetworkController.state.caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}`;\n if (!address) {\n throw new Error('No address found to swap the tokens from.');\n }\n return {\n networkAddress,\n fromAddress: address,\n fromCaipAddress: AccountController.state.caipAddress,\n sourceTokenAddress: state.sourceToken?.address,\n toTokenAddress: state.toToken?.address,\n toTokenAmount: state.toTokenAmount,\n toTokenDecimals: state.toToken?.decimals,\n sourceTokenAmount: state.sourceTokenAmount,\n sourceTokenDecimals: state.sourceToken?.decimals\n };\n },\n setLoading(loading) {\n state.loading = loading;\n },\n setSourceToken(sourceToken) {\n if (!sourceToken) {\n return;\n }\n state.sourceToken = sourceToken;\n this.setTokenValues(sourceToken.address, 'sourceToken');\n },\n setSourceTokenAmount(amount) {\n const { sourceTokenAddress } = this.getParams();\n state.sourceTokenAmount = amount;\n if (sourceTokenAddress) {\n this.setTokenValues(sourceTokenAddress, 'sourceToken');\n }\n },\n setToToken(toToken) {\n const { sourceTokenAddress, sourceTokenAmount } = this.getParams();\n if (!toToken) {\n state.toTokenAmount = '0';\n state.toTokenPriceInUSD = 0;\n return;\n }\n state.toToken = toToken;\n this.setTokenValues(toToken.address, 'toToken');\n if (sourceTokenAddress && sourceTokenAmount) {\n this.makeChecks();\n }\n },\n setToTokenAmount(amount) {\n const { toTokenAddress } = this.getParams();\n state.toTokenAmount = amount;\n if (toTokenAddress) {\n this.setTokenValues(toTokenAddress, 'toToken');\n }\n },\n async setTokenValues(address, target) {\n let price = state.tokensPriceMap[address] || 0;\n if (!price) {\n price = await this.getAddressPrice(address);\n }\n if (target === 'sourceToken') {\n state.sourceTokenPriceInUSD = price;\n }\n else if (target === 'toToken') {\n state.toTokenPriceInUSD = price;\n }\n },\n switchTokens() {\n const newSourceToken = state.toToken ? { ...state.toToken } : undefined;\n const newToToken = state.sourceToken ? { ...state.sourceToken } : undefined;\n this.setSourceToken(newSourceToken);\n this.setToToken(newToToken);\n this.setSourceTokenAmount(state.toTokenAmount || '0');\n ConvertController.convertTokens();\n },\n resetTokens() {\n state.tokens = undefined;\n state.popularTokens = undefined;\n state.myTokensWithBalance = undefined;\n state.initialized = false;\n },\n resetValues() {\n const { networkAddress } = this.getParams();\n const networkToken = state.tokens?.find(token => token.address === networkAddress);\n this.setSourceToken(networkToken);\n state.sourceTokenPriceInUSD = state.tokensPriceMap[networkAddress] || 0;\n state.sourceTokenAmount = '0';\n this.setToToken(undefined);\n state.gasPriceInUSD = 0;\n },\n clearError() {\n state.transactionError = undefined;\n },\n async initializeState() {\n if (!state.initialized) {\n await this.fetchTokens();\n state.initialized = true;\n }\n },\n async fetchTokens() {\n const { networkAddress } = this.getParams();\n await this.getTokenList();\n await this.getNetworkTokenPrice();\n await this.getMyTokensWithBalance();\n const networkToken = state.tokens?.find(token => token.address === networkAddress);\n if (networkToken) {\n this.setSourceToken(networkToken);\n }\n },\n async getTokenList() {\n const tokens = await ConvertApiUtil.getTokenList();\n state.tokens = tokens;\n state.popularTokens = tokens\n .sort((aTokenInfo, bTokenInfo) => {\n if (aTokenInfo.symbol < bTokenInfo.symbol) {\n return -1;\n }\n if (aTokenInfo.symbol > bTokenInfo.symbol) {\n return 1;\n }\n return 0;\n })\n .filter(token => {\n if (ConstantsUtil.POPULAR_TOKENS.includes(token.symbol)) {\n return true;\n }\n return false;\n }, {});\n state.suggestedTokens = tokens.filter(token => {\n if (ConstantsUtil.SUGGESTED_TOKENS.includes(token.symbol)) {\n return true;\n }\n return false;\n }, {});\n },\n async getAddressPrice(address) {\n const existPrice = state.tokensPriceMap[address];\n if (existPrice) {\n return existPrice;\n }\n const response = await BlockchainApiController.fetchTokenPrice({\n projectId: OptionsController.state.projectId,\n addresses: [address]\n });\n const fungibles = response.fungibles || [];\n const allTokens = [...(state.tokens || []), ...(state.myTokensWithBalance || [])];\n const symbol = allTokens?.find(token => token.address === address)?.symbol;\n const price = fungibles.find(p => p.symbol === symbol)?.price || '0';\n const priceAsFloat = parseFloat(price);\n state.tokensPriceMap[address] = priceAsFloat;\n return priceAsFloat;\n },\n async getNetworkTokenPrice() {\n const { networkAddress } = this.getParams();\n const response = await BlockchainApiController.fetchTokenPrice({\n projectId: OptionsController.state.projectId,\n addresses: [networkAddress]\n });\n const token = response.fungibles?.[0];\n const price = token?.price || '0';\n state.tokensPriceMap[networkAddress] = parseFloat(price);\n state.networkPrice = price;\n },\n async getMyTokensWithBalance() {\n const balances = await ConvertApiUtil.getMyTokensWithBalance();\n if (!balances) {\n return;\n }\n await this.getInitialGasPrice();\n this.setBalances(balances);\n },\n setBalances(balances) {\n const { networkAddress } = this.getParams();\n const networkToken = balances.find(token => token.address === networkAddress);\n balances.forEach(token => {\n state.tokensPriceMap[token.address] = token.price || 0;\n });\n state.myTokensWithBalance = balances;\n state.networkBalanceInUSD = networkToken\n ? NumberUtil.multiply(networkToken.quantity.numeric, networkToken.price).toString()\n : '0';\n },\n async getInitialGasPrice() {\n const res = await ConvertApiUtil.fetchGasPrice();\n if (!res) {\n return;\n }\n const value = res.instant;\n const gasFee = BigInt(value);\n const gasLimit = BigInt(INITIAL_GAS_LIMIT);\n const gasPrice = this.calculateGasPriceInUSD(gasLimit, gasFee);\n state.gasPriceInUSD = gasPrice;\n },\n async refreshConvertValues() {\n const { fromAddress, toTokenDecimals, toTokenAddress } = this.getParams();\n if (fromAddress && toTokenAddress && toTokenDecimals && !state.loading) {\n const transaction = await this.getTransaction();\n this.setTransactionDetails(transaction);\n }\n },\n calculateGasPriceInEther(gas, gasPrice) {\n const totalGasCostInWei = gasPrice * gas;\n const totalGasCostInEther = Number(totalGasCostInWei) / 1e18;\n return totalGasCostInEther;\n },\n calculateGasPriceInUSD(gas, gasPrice) {\n const totalGasCostInEther = this.calculateGasPriceInEther(gas, gasPrice);\n const networkPriceInUSD = NumberUtil.bigNumber(state.networkPrice);\n const gasCostInUSD = networkPriceInUSD.multipliedBy(totalGasCostInEther);\n return gasCostInUSD.toNumber();\n },\n calculatePriceImpact(toTokenAmount, gasPriceInUSD) {\n const sourceTokenAmount = state.sourceTokenAmount;\n const sourceTokenPrice = state.sourceTokenPriceInUSD;\n const toTokenPrice = state.toTokenPriceInUSD;\n const totalCostInUSD = NumberUtil.bigNumber(sourceTokenAmount)\n .multipliedBy(sourceTokenPrice)\n .plus(gasPriceInUSD);\n const effectivePricePerToToken = totalCostInUSD.dividedBy(toTokenAmount);\n const priceImpact = effectivePricePerToToken\n .minus(toTokenPrice)\n .dividedBy(toTokenPrice)\n .multipliedBy(100);\n return priceImpact.toNumber();\n },\n calculateMaxSlippage() {\n const slippageToleranceDecimal = NumberUtil.bigNumber(state.slippage).dividedBy(100);\n const maxSlippageAmount = NumberUtil.multiply(state.sourceTokenAmount, slippageToleranceDecimal);\n return maxSlippageAmount.toNumber();\n },\n async convertTokens() {\n const { sourceTokenAddress, toTokenAddress } = this.getParams();\n if (!sourceTokenAddress || !toTokenAddress) {\n return;\n }\n await this.makeChecks();\n },\n async makeChecks() {\n const { toTokenDecimals, toTokenAddress } = this.getParams();\n if (!toTokenDecimals || !toTokenAddress) {\n return;\n }\n state.loading = true;\n const transaction = await this.getTransaction();\n this.setTransactionDetails(transaction);\n state.loading = false;\n },\n async getTransaction() {\n const { fromCaipAddress, sourceTokenAddress, sourceTokenAmount, sourceTokenDecimals } = this.getParams();\n if (!fromCaipAddress ||\n !sourceTokenAddress ||\n !sourceTokenAmount ||\n parseFloat(sourceTokenAmount) === 0 ||\n !sourceTokenDecimals) {\n return undefined;\n }\n const hasAllowance = await ConvertApiUtil.fetchConvertAllowance({\n userAddress: fromCaipAddress,\n tokenAddress: sourceTokenAddress,\n sourceTokenAmount,\n sourceTokenDecimals\n });\n let transaction = undefined;\n if (hasAllowance) {\n state.approvalTransaction = undefined;\n transaction = await this.createConvert();\n state.convertTransaction = transaction;\n }\n else {\n state.convertTransaction = undefined;\n transaction = await this.createTokenAllowance();\n state.approvalTransaction = transaction;\n }\n return transaction;\n },\n getToAmount() {\n const { sourceTokenDecimals } = this.getParams();\n const decimals = sourceTokenDecimals || 18;\n const multiplier = 10 ** decimals;\n const toTokenConvertedAmount = state.sourceTokenPriceInUSD && state.toTokenPriceInUSD && state.sourceTokenAmount\n ? NumberUtil.bigNumber(state.sourceTokenAmount)\n .multipliedBy(state.sourceTokenPriceInUSD)\n .dividedBy(state.toTokenPriceInUSD)\n : NumberUtil.bigNumber(0);\n return toTokenConvertedAmount.multipliedBy(multiplier).toString();\n },\n async createTokenAllowance() {\n const { fromCaipAddress, fromAddress, sourceTokenAddress, toTokenAddress } = this.getParams();\n if (!fromCaipAddress || !toTokenAddress) {\n return undefined;\n }\n if (!sourceTokenAddress) {\n throw new Error('>>> createTokenAllowance - No source token address found.');\n }\n const response = await BlockchainApiController.generateApproveCalldata({\n projectId: OptionsController.state.projectId,\n from: sourceTokenAddress,\n to: toTokenAddress,\n userAddress: fromCaipAddress\n });\n const gasLimit = await ConnectionController.estimateGas({\n address: fromAddress,\n to: CoreHelperUtil.getPlainAddress(response.tx.to),\n data: response.tx.data\n });\n const toAmount = this.getToAmount();\n const transaction = {\n data: response.tx.data,\n to: CoreHelperUtil.getPlainAddress(response.tx.from),\n gas: gasLimit,\n gasPrice: BigInt(response.tx.eip155.gasPrice),\n value: BigInt(response.tx.value),\n toAmount\n };\n return transaction;\n },\n async sendTransactionForApproval(data) {\n const { fromAddress } = this.getParams();\n state.transactionLoading = true;\n RouterController.pushTransactionStack({\n view: null,\n goBack: true\n });\n try {\n await ConnectionController.sendTransaction({\n address: fromAddress,\n to: data.to,\n data: data.data,\n value: BigInt(data.value),\n gasPrice: BigInt(data.gasPrice)\n });\n state.approvalTransaction = undefined;\n state.transactionLoading = false;\n this.makeChecks();\n }\n catch (err) {\n const error = err;\n state.transactionError = error?.shortMessage;\n state.transactionLoading = false;\n }\n },\n async createConvert() {\n const { networkAddress, fromCaipAddress, sourceTokenAddress, sourceTokenDecimals, sourceTokenAmount, toTokenAddress } = this.getParams();\n if (!fromCaipAddress ||\n !sourceTokenAmount ||\n !sourceTokenAddress ||\n !toTokenAddress ||\n !sourceTokenDecimals) {\n return undefined;\n }\n try {\n const amount = ConnectionController.parseUnits(sourceTokenAmount, sourceTokenDecimals).toString();\n const response = await BlockchainApiController.generateConvertCalldata({\n projectId: OptionsController.state.projectId,\n userAddress: fromCaipAddress,\n from: sourceTokenAddress,\n to: toTokenAddress,\n amount\n });\n const isSourceTokenIsNetworkToken = sourceTokenAddress === networkAddress;\n const toAmount = this.getToAmount();\n const gas = BigInt(response.tx.eip155.gas);\n const gasPrice = BigInt(response.tx.eip155.gasPrice);\n const transaction = {\n data: response.tx.data,\n to: CoreHelperUtil.getPlainAddress(response.tx.to),\n gas,\n gasPrice,\n value: isSourceTokenIsNetworkToken ? BigInt(amount) : BigInt('0'),\n toAmount\n };\n state.gasPriceInUSD = this.calculateGasPriceInUSD(gas, gasPrice);\n return transaction;\n }\n catch (error) {\n return undefined;\n }\n },\n async sendTransactionForConvert(data) {\n if (!data) {\n return undefined;\n }\n const { fromAddress } = this.getParams();\n state.transactionLoading = true;\n RouterController.pushTransactionStack({\n view: 'Account',\n goBack: false,\n onSuccess() {\n ConvertController.resetValues();\n }\n });\n try {\n const transactionHash = await ConnectionController.sendTransaction({\n address: fromAddress,\n to: data.to,\n data: data.data,\n gas: data.gas,\n gasPrice: BigInt(data.gasPrice),\n value: data.value\n });\n state.transactionLoading = false;\n setTimeout(() => {\n this.resetValues();\n this.getMyTokensWithBalance();\n }, 1000);\n return transactionHash;\n }\n catch (err) {\n const error = err;\n state.transactionError = error?.shortMessage;\n state.transactionLoading = false;\n SnackController.showError(error?.shortMessage || 'Transaction error');\n return undefined;\n }\n },\n getToTokenValues(amountBigInt, decimals) {\n const { toTokenAddress } = this.getParams();\n if (!toTokenAddress) {\n return {\n toTokenAmount: '0',\n toTokenPriceInUSD: 0\n };\n }\n const toTokenAmount = NumberUtil.bigNumber(amountBigInt)\n .dividedBy(10 ** decimals)\n .toFixed(20);\n const toTokenPrice = state.tokensPriceMap[toTokenAddress] || '0';\n const toTokenPriceInUSD = NumberUtil.bigNumber(toTokenPrice).toNumber();\n return {\n toTokenAmount,\n toTokenPriceInUSD\n };\n },\n isInsufficientNetworkTokenForGas() {\n return NumberUtil.bigNumber(NumberUtil.bigNumber(state.gasPriceInUSD || '0')).isGreaterThan(state.networkBalanceInUSD);\n },\n setTransactionDetails(transaction) {\n const { toTokenAddress, toTokenDecimals } = this.getParams();\n if (!transaction || !toTokenAddress || !toTokenDecimals) {\n return;\n }\n const insufficientNetworkToken = this.isInsufficientNetworkTokenForGas();\n if (insufficientNetworkToken) {\n state.inputError = 'Insufficient balance';\n }\n else {\n state.inputError = undefined;\n }\n const { toTokenAmount, toTokenPriceInUSD } = this.getToTokenValues(transaction.toAmount, toTokenDecimals);\n state.toTokenAmount = toTokenAmount;\n state.toTokenPriceInUSD = toTokenPriceInUSD;\n state.gasPriceInUSD = this.calculateGasPriceInUSD(transaction.gas, transaction.gasPrice);\n state.priceImpact = this.calculatePriceImpact(state.toTokenAmount, state.gasPriceInUSD);\n state.maxSlippage = this.calculateMaxSlippage();\n }\n};\n//# sourceMappingURL=ConvertController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { SnackController } from './SnackController.js';\nimport { ConvertController } from './ConvertController.js';\nimport { ConvertApiUtil } from '../utils/ConvertApiUtil.js';\nconst state = proxy({\n isConnected: false,\n currentTab: 0,\n tokenBalance: [],\n smartAccountDeployed: false\n});\nexport const AccountController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setIsConnected(isConnected) {\n state.isConnected = isConnected;\n },\n setCaipAddress(caipAddress) {\n state.caipAddress = caipAddress;\n state.address = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined;\n },\n setBalance(balance, balanceSymbol) {\n state.balance = balance;\n state.balanceSymbol = balanceSymbol;\n },\n setProfileName(profileName) {\n state.profileName = profileName;\n },\n setProfileImage(profileImage) {\n state.profileImage = profileImage;\n },\n setAddressExplorerUrl(explorerUrl) {\n state.addressExplorerUrl = explorerUrl;\n },\n setSmartAccountDeployed(isDeployed) {\n state.smartAccountDeployed = isDeployed;\n },\n setCurrentTab(currentTab) {\n state.currentTab = currentTab;\n },\n setTokenBalance(tokenBalance) {\n if (tokenBalance) {\n state.tokenBalance = ref(tokenBalance);\n }\n },\n setConnectedWalletInfo(connectedWalletInfo) {\n state.connectedWalletInfo = connectedWalletInfo;\n },\n setPreferredAccountType(preferredAccountType) {\n state.preferredAccountType = preferredAccountType;\n },\n async fetchTokenBalance() {\n try {\n if (state.address) {\n const response = await BlockchainApiController.getBalance(state.address);\n this.setTokenBalance(response.balances);\n ConvertController.setBalances(ConvertApiUtil.mapBalancesToConvertTokens(response.balances));\n }\n }\n catch (error) {\n SnackController.showError('Failed to fetch token balance');\n }\n },\n resetAccount() {\n state.isConnected = false;\n state.smartAccountDeployed = false;\n state.currentTab = 0;\n state.caipAddress = undefined;\n state.address = undefined;\n state.balance = undefined;\n state.balanceSymbol = undefined;\n state.profileName = undefined;\n state.profileImage = undefined;\n state.addressExplorerUrl = undefined;\n state.tokenBalance = [];\n state.connectedWalletInfo = undefined;\n state.preferredAccountType = undefined;\n }\n};\n//# sourceMappingURL=AccountController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n walletImages: {},\n networkImages: {},\n connectorImages: {},\n tokenImages: {},\n currencyImages: {}\n});\nexport const AssetController = {\n state,\n subscribeNetworkImages(callback) {\n return sub(state.networkImages, () => callback(state.networkImages));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setWalletImage(key, value) {\n state.walletImages[key] = value;\n },\n setNetworkImage(key, value) {\n state.networkImages[key] = value;\n },\n setConnectorImage(key, value) {\n state.connectorImages[key] = value;\n },\n setTokenImage(key, value) {\n state.tokenImages[key] = value;\n },\n setCurrencyImage(key, value) {\n state.currencyImages[key] = value;\n }\n};\n//# sourceMappingURL=AssetController.js.map","import { proxy, subscribe as sub, snapshot } from 'valtio/vanilla';\nimport { ConnectorController } from './ConnectorController.js';\nconst state = proxy({\n themeMode: 'dark',\n themeVariables: {}\n});\nexport const ThemeController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setThemeMode(themeMode) {\n state.themeMode = themeMode;\n try {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n emailConnector.provider.syncTheme({\n themeMode: ThemeController.getSnapshot().themeMode\n });\n }\n }\n catch {\n console.info('Unable to sync theme to email connector');\n }\n },\n setThemeVariables(themeVariables) {\n state.themeVariables = { ...state.themeVariables, ...themeVariables };\n try {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n emailConnector.provider.syncTheme({\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n }\n catch {\n console.info('Unable to sync theme to email connector');\n }\n },\n getSnapshot() {\n return snapshot(state);\n }\n};\n//# sourceMappingURL=ThemeController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, snapshot } from 'valtio/vanilla';\nimport { OptionsController } from './OptionsController.js';\nimport { ThemeController } from './ThemeController.js';\nconst state = proxy({\n connectors: []\n});\nexport const ConnectorController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setConnectors(connectors) {\n state.connectors = connectors.map(c => ref(c));\n },\n addConnector(connector) {\n state.connectors.push(ref(connector));\n if (connector.id === 'w3mEmail') {\n const emailConnector = connector;\n const optionsState = snapshot(OptionsController.state);\n emailConnector?.provider?.syncDappData?.({\n metadata: optionsState.metadata,\n sdkVersion: optionsState.sdkVersion,\n projectId: optionsState.projectId\n });\n emailConnector.provider.syncTheme({\n themeMode: ThemeController.getSnapshot().themeMode,\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n },\n getEmailConnector() {\n return state.connectors.find(c => c.type === 'EMAIL');\n },\n getAnnouncedConnectorRdns() {\n return state.connectors.filter(c => c.type === 'ANNOUNCED').map(c => c.info?.rdns);\n },\n getConnectors() {\n return state.connectors;\n },\n getConnector(id, rdns) {\n return state.connectors.find(c => c.explorerId === id || c.info?.rdns === rdns);\n }\n};\n//# sourceMappingURL=ConnectorController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { StorageUtil } from '../utils/StorageUtil.js';\nimport { AssetController } from './AssetController.js';\nimport { ConnectorController } from './ConnectorController.js';\nimport { NetworkController } from './NetworkController.js';\nimport { OptionsController } from './OptionsController.js';\nconst baseUrl = CoreHelperUtil.getApiUrl();\nexport const api = new FetchUtil({ baseUrl });\nconst entries = '40';\nconst recommendedEntries = '4';\nconst state = proxy({\n page: 1,\n count: 0,\n featured: [],\n recommended: [],\n wallets: [],\n search: [],\n isAnalyticsEnabled: false\n});\nexport const ApiController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getApiHeaders() {\n const { projectId, sdkType, sdkVersion } = OptionsController.state;\n return {\n 'x-project-id': projectId,\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n };\n },\n async _fetchWalletImage(imageId) {\n const imageUrl = `${api.baseUrl}/getWalletImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setWalletImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchNetworkImage(imageId) {\n const imageUrl = `${api.baseUrl}/public/getAssetImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setNetworkImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchConnectorImage(imageId) {\n const imageUrl = `${api.baseUrl}/public/getAssetImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setConnectorImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchCurrencyImage(countryCode) {\n const imageUrl = `${api.baseUrl}/public/getCurrencyImage/${countryCode}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setCurrencyImage(countryCode, URL.createObjectURL(blob));\n },\n async _fetchTokenImage(symbol) {\n const imageUrl = `${api.baseUrl}/public/getTokenImage/${symbol}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setTokenImage(symbol, URL.createObjectURL(blob));\n },\n async fetchNetworkImages() {\n const { requestedCaipNetworks } = NetworkController.state;\n const ids = requestedCaipNetworks?.map(({ imageId }) => imageId).filter(Boolean);\n if (ids) {\n await Promise.allSettled(ids.map(id => ApiController._fetchNetworkImage(id)));\n }\n },\n async fetchConnectorImages() {\n const { connectors } = ConnectorController.state;\n const ids = connectors.map(({ imageId }) => imageId).filter(Boolean);\n await Promise.allSettled(ids.map(id => ApiController._fetchConnectorImage(id)));\n },\n async fetchCurrencyImages(currencies = []) {\n await Promise.allSettled(currencies.map(currency => ApiController._fetchCurrencyImage(currency)));\n },\n async fetchTokenImages(tokens = []) {\n await Promise.allSettled(tokens.map(token => ApiController._fetchTokenImage(token)));\n },\n async fetchFeaturedWallets() {\n const { featuredWalletIds } = OptionsController.state;\n if (featuredWalletIds?.length) {\n const { data } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n entries: featuredWalletIds?.length\n ? String(featuredWalletIds.length)\n : recommendedEntries,\n include: featuredWalletIds?.join(',')\n }\n });\n data.sort((a, b) => featuredWalletIds.indexOf(a.id) - featuredWalletIds.indexOf(b.id));\n const images = data.map(d => d.image_id).filter(Boolean);\n await Promise.allSettled(images.map(id => ApiController._fetchWalletImage(id)));\n state.featured = data;\n }\n },\n async fetchRecommendedWallets() {\n const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;\n const exclude = [...(excludeWalletIds ?? []), ...(featuredWalletIds ?? [])].filter(Boolean);\n const { data, count } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n chains: NetworkController.state.caipNetwork?.id,\n entries: recommendedEntries,\n include: includeWalletIds?.join(','),\n exclude: exclude?.join(',')\n }\n });\n const recent = StorageUtil.getRecentWallets();\n const recommendedImages = data.map(d => d.image_id).filter(Boolean);\n const recentImages = recent.map(r => r.image_id).filter(Boolean);\n await Promise.allSettled([...recommendedImages, ...recentImages].map(id => ApiController._fetchWalletImage(id)));\n state.recommended = data;\n state.count = count ?? 0;\n },\n async fetchWallets({ page }) {\n const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;\n const exclude = [\n ...state.recommended.map(({ id }) => id),\n ...(excludeWalletIds ?? []),\n ...(featuredWalletIds ?? [])\n ].filter(Boolean);\n const { data, count } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: String(page),\n entries,\n chains: NetworkController.state.caipNetwork?.id,\n include: includeWalletIds?.join(','),\n exclude: exclude.join(',')\n }\n });\n const images = data.map(w => w.image_id).filter(Boolean);\n await Promise.allSettled([\n ...images.map(id => ApiController._fetchWalletImage(id)),\n CoreHelperUtil.wait(300)\n ]);\n state.wallets = [...state.wallets, ...data];\n state.count = count > state.count ? count : state.count;\n state.page = page;\n },\n async searchWallet({ search }) {\n const { includeWalletIds, excludeWalletIds } = OptionsController.state;\n state.search = [];\n const { data } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n entries: '100',\n search,\n chains: NetworkController.state.caipNetwork?.id,\n include: includeWalletIds?.join(','),\n exclude: excludeWalletIds?.join(',')\n }\n });\n const images = data.map(w => w.image_id).filter(Boolean);\n await Promise.allSettled([\n ...images.map(id => ApiController._fetchWalletImage(id)),\n CoreHelperUtil.wait(300)\n ]);\n state.search = data;\n },\n async reFetchWallets() {\n state.page = 1;\n state.wallets = [];\n await ApiController.fetchFeaturedWallets();\n await ApiController.fetchRecommendedWallets();\n },\n prefetch() {\n const promises = [\n ApiController.fetchFeaturedWallets(),\n ApiController.fetchRecommendedWallets(),\n ApiController.fetchNetworkImages(),\n ApiController.fetchConnectorImages()\n ];\n if (OptionsController.state.enableAnalytics === undefined) {\n promises.push(ApiController.fetchAnalyticsConfig());\n }\n state.prefetchPromise = Promise.race([Promise.allSettled(promises), CoreHelperUtil.wait(3000)]);\n },\n async fetchAnalyticsConfig() {\n const { isAnalyticsEnabled } = await api.get({\n path: '/getAnalyticsConfig',\n headers: ApiController._getApiHeaders()\n });\n OptionsController.setEnableAnalytics(isAnalyticsEnabled);\n }\n};\n//# sourceMappingURL=ApiController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { AccountController } from './AccountController.js';\nimport { ApiController } from './ApiController.js';\nimport { EventsController } from './EventsController.js';\nimport { PublicStateController } from './PublicStateController.js';\nimport { RouterController } from './RouterController.js';\nconst state = proxy({\n loading: false,\n open: false\n});\nexport const ModalController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n async open(options) {\n await ApiController.state.prefetchPromise;\n const connected = AccountController.state.isConnected;\n if (options?.view) {\n RouterController.reset(options.view);\n }\n else if (connected) {\n RouterController.reset('Account');\n }\n else {\n RouterController.reset('Connect');\n }\n state.open = true;\n PublicStateController.set({ open: true });\n EventsController.sendEvent({\n type: 'track',\n event: 'MODAL_OPEN',\n properties: { connected }\n });\n },\n close() {\n const connected = AccountController.state.isConnected;\n state.open = false;\n PublicStateController.set({ open: false });\n EventsController.sendEvent({\n type: 'track',\n event: 'MODAL_CLOSE',\n properties: { connected }\n });\n },\n setLoading(loading) {\n state.loading = loading;\n PublicStateController.set({ loading });\n }\n};\n//# sourceMappingURL=ModalController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { ONRAMP_PROVIDERS } from '../utils/ConstantsUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { ApiController } from './ApiController.js';\nexport const USDC_CURRENCY_DEFAULT = {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'USD Coin',\n symbol: 'USDC',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n};\nexport const USD_CURRENCY_DEFAULT = {\n id: 'USD',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n};\nconst defaultState = {\n providers: ONRAMP_PROVIDERS,\n selectedProvider: null,\n error: null,\n purchaseCurrency: USDC_CURRENCY_DEFAULT,\n paymentCurrency: USD_CURRENCY_DEFAULT,\n purchaseCurrencies: [USDC_CURRENCY_DEFAULT],\n paymentCurrencies: [],\n quotesLoading: false\n};\nconst state = proxy(defaultState);\nexport const OnRampController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setSelectedProvider(provider) {\n state.selectedProvider = provider;\n },\n setPurchaseCurrency(currency) {\n state.purchaseCurrency = currency;\n },\n setPaymentCurrency(currency) {\n state.paymentCurrency = currency;\n },\n setPurchaseAmount(amount) {\n this.state.purchaseAmount = amount;\n },\n setPaymentAmount(amount) {\n this.state.paymentAmount = amount;\n },\n async getAvailableCurrencies() {\n const options = await BlockchainApiController.getOnrampOptions();\n state.purchaseCurrencies = options.purchaseCurrencies;\n state.paymentCurrencies = options.paymentCurrencies;\n state.paymentCurrency = options.paymentCurrencies[0] || USD_CURRENCY_DEFAULT;\n state.purchaseCurrency = options.purchaseCurrencies[0] || USDC_CURRENCY_DEFAULT;\n await ApiController.fetchCurrencyImages(options.paymentCurrencies.map(currency => currency.id));\n await ApiController.fetchTokenImages(options.purchaseCurrencies.map(currency => currency.symbol));\n },\n async getQuote() {\n state.quotesLoading = true;\n try {\n const quote = await BlockchainApiController.getOnrampQuote({\n purchaseCurrency: state.purchaseCurrency,\n paymentCurrency: state.paymentCurrency,\n amount: state.paymentAmount?.toString() || '0',\n network: state.purchaseCurrency?.symbol\n });\n state.quotesLoading = false;\n state.purchaseAmount = Number(quote.purchaseAmount.amount);\n return quote;\n }\n catch (error) {\n state.error = error.message;\n state.quotesLoading = false;\n return null;\n }\n finally {\n state.quotesLoading = false;\n }\n },\n resetState() {\n state.providers = ONRAMP_PROVIDERS;\n state.selectedProvider = null;\n state.error = null;\n state.purchaseCurrency = USDC_CURRENCY_DEFAULT;\n state.paymentCurrency = USD_CURRENCY_DEFAULT;\n state.purchaseCurrencies = [USDC_CURRENCY_DEFAULT];\n state.paymentCurrencies = [];\n state.paymentAmount = undefined;\n state.purchaseAmount = undefined;\n state.quotesLoading = false;\n }\n};\n//# sourceMappingURL=OnRampController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({});\nexport const SendController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setToken(token) {\n if (token) {\n state.token = ref(token);\n }\n },\n setTokenAmount(sendTokenAmount) {\n state.sendTokenAmount = sendTokenAmount;\n },\n setReceiverAddress(receiverAddress) {\n state.receiverAddress = receiverAddress;\n },\n setReceiverProfileImageUrl(receiverProfileImageUrl) {\n state.receiverProfileImageUrl = receiverProfileImageUrl;\n },\n setReceiverProfileName(receiverProfileName) {\n state.receiverProfileName = receiverProfileName;\n },\n resetSend() {\n state.token = undefined;\n state.sendTokenAmount = undefined;\n state.receiverAddress = undefined;\n state.receiverProfileImageUrl = undefined;\n state.receiverProfileName = undefined;\n }\n};\n//# sourceMappingURL=SendController.js.map","import { AssetController } from '../controllers/AssetController.js';\nexport const AssetUtil = {\n getWalletImage(wallet) {\n if (wallet?.image_url) {\n return wallet?.image_url;\n }\n if (wallet?.image_id) {\n return AssetController.state.walletImages[wallet.image_id];\n }\n return undefined;\n },\n getNetworkImage(network) {\n if (network?.imageUrl) {\n return network?.imageUrl;\n }\n if (network?.imageId) {\n return AssetController.state.networkImages[network.imageId];\n }\n return undefined;\n },\n getConnectorImage(connector) {\n if (connector?.imageUrl) {\n return connector.imageUrl;\n }\n if (connector?.imageId) {\n return AssetController.state.connectorImages[connector.imageId];\n }\n return undefined;\n }\n};\n//# sourceMappingURL=AssetUtil.js.map","import { RouterController } from '../controllers/RouterController.js';\nimport { ModalController } from '../controllers/ModalController.js';\nexport const RouterUtil = {\n goBackOrCloseModal() {\n if (RouterController.state.history.length > 1) {\n RouterController.goBack();\n }\n else {\n ModalController.close();\n }\n },\n navigateAfterNetworkSwitch() {\n const { history } = RouterController.state;\n const networkSelectIndex = history.findIndex(name => name === 'Networks');\n if (networkSelectIndex >= 1) {\n RouterController.goBackToIndex(networkSelectIndex - 1);\n }\n else {\n ModalController.close();\n }\n }\n};\n//# sourceMappingURL=RouterUtil.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"\":\"\",c=f;for(let i=0;i\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"\")+(2===i?\"\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[(\"finalized\",\"finalized\")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.0.5\");export{s as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","import { svg } from 'lit';\nexport const convertInputMaskBottomSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=convert-input-mask-bottom.js.map","import { svg } from 'lit';\nexport const convertInputMaskTopSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=convert-input-mask-top.js.map","import { css, unsafeCSS } from 'lit';\nlet themeTag = undefined;\nlet darkModeTag = undefined;\nlet lightModeTag = undefined;\nexport function initializeTheming(themeVariables, themeMode) {\n themeTag = document.createElement('style');\n darkModeTag = document.createElement('style');\n lightModeTag = document.createElement('style');\n themeTag.textContent = createRootStyles(themeVariables).core.cssText;\n darkModeTag.textContent = createRootStyles(themeVariables).dark.cssText;\n lightModeTag.textContent = createRootStyles(themeVariables).light.cssText;\n document.head.appendChild(themeTag);\n document.head.appendChild(darkModeTag);\n document.head.appendChild(lightModeTag);\n setColorTheme(themeMode);\n}\nexport function setColorTheme(themeMode) {\n if (darkModeTag && lightModeTag) {\n if (themeMode === 'light') {\n darkModeTag.removeAttribute('media');\n lightModeTag.media = 'enabled';\n }\n else {\n lightModeTag.removeAttribute('media');\n darkModeTag.media = 'enabled';\n }\n }\n}\nexport function setThemeVariables(themeVariables) {\n if (themeTag && darkModeTag && lightModeTag) {\n themeTag.textContent = createRootStyles(themeVariables).core.cssText;\n darkModeTag.textContent = createRootStyles(themeVariables).dark.cssText;\n lightModeTag.textContent = createRootStyles(themeVariables).light.cssText;\n }\n}\nfunction createRootStyles(themeVariables) {\n return {\n core: css `\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');\n :root {\n --w3m-color-mix-strength: ${unsafeCSS(themeVariables?.['--w3m-color-mix-strength']\n ? `${themeVariables['--w3m-color-mix-strength']}%`\n : '0%')};\n --w3m-font-family: ${unsafeCSS(themeVariables?.['--w3m-font-family'] ||\n 'Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;')};\n --w3m-font-size-master: ${unsafeCSS(themeVariables?.['--w3m-font-size-master'] || '10px')};\n --w3m-border-radius-master: ${unsafeCSS(themeVariables?.['--w3m-border-radius-master'] || '4px')};\n --w3m-z-index: ${unsafeCSS(themeVariables?.['--w3m-z-index'] || 999)};\n\n --wui-font-family: var(--w3m-font-family);\n\n --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);\n --wui-font-size-micro: var(--w3m-font-size-master);\n --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);\n --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);\n --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);\n --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);\n --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);\n --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);\n --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);\n\n --wui-border-radius-5xs: var(--w3m-border-radius-master);\n --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);\n --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);\n --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);\n --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);\n --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);\n --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);\n --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);\n --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);\n\n --wui-font-weight-light: 400;\n --wui-font-weight-regular: 500;\n --wui-font-weight-medium: 600;\n --wui-font-weight-bold: 700;\n\n --wui-letter-spacing-2xl: -1.6px;\n --wui-letter-spacing-medium-title: -0.96px;\n --wui-letter-spacing-large: -0.8px;\n --wui-letter-spacing-medium: -0.72px;\n --wui-letter-spacing-paragraph: -0.64px;\n --wui-letter-spacing-small: -0.56px;\n --wui-letter-spacing-tiny: -0.48px;\n --wui-letter-spacing-micro: -0.2px;\n --wui-letter-spacing-mini: -0.16px;\n\n --wui-spacing-0: 0px;\n --wui-spacing-4xs: 2px;\n --wui-spacing-3xs: 4px;\n --wui-spacing-xxs: 6px;\n --wui-spacing-2xs: 7px;\n --wui-spacing-xs: 8px;\n --wui-spacing-1xs: 10px;\n --wui-spacing-s: 12px;\n --wui-spacing-m: 14px;\n --wui-spacing-l: 16px;\n --wui-spacing-2l: 18px;\n --wui-spacing-xl: 20px;\n --wui-spacing-xxl: 24px;\n --wui-spacing-2xl: 32px;\n --wui-spacing-3xl: 40px;\n --wui-spacing-4xl: 90px;\n\n --wui-icon-box-size-xxs: 14px;\n --wui-icon-box-size-xs: 20px;\n --wui-icon-box-size-sm: 24px;\n --wui-icon-box-size-md: 32px;\n --wui-icon-box-size-lg: 40px;\n --wui-icon-box-size-xl: 64px;\n\n --wui-icon-size-inherit: inherit;\n --wui-icon-size-xxs: 10px;\n --wui-icon-size-xs: 12px;\n --wui-icon-size-sm: 14px;\n --wui-icon-size-md: 16px;\n --wui-icon-size-mdl: 18px;\n --wui-icon-size-lg: 20px;\n --wui-icon-size-xl: 24px;\n\n --wui-wallet-image-size-inherit: inherit;\n --wui-wallet-image-size-sm: 40px;\n --wui-wallet-image-size-md: 56px;\n --wui-wallet-image-size-lg: 80px;\n\n --wui-visual-size-size-inherit: inherit;\n --wui-visual-size-sm: 40px;\n --wui-visual-size-md: 55px;\n --wui-visual-size-lg: 80px;\n\n --wui-box-size-md: 100px;\n --wui-box-size-lg: 120px;\n\n --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);\n --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);\n\n --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);\n --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);\n --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);\n\n --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);\n\n --wui-duration-lg: 200ms;\n --wui-duration-md: 125ms;\n --wui-duration-sm: 75ms;\n\n --wui-path-network-sm: path(\n 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'\n );\n\n --wui-path-network-md: path(\n 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'\n );\n\n --wui-path-network-lg: path(\n 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'\n );\n\n --wui-width-network-sm: 36px;\n --wui-width-network-md: 48px;\n --wui-width-network-lg: 86px;\n\n --wui-height-network-sm: 40px;\n --wui-height-network-md: 54px;\n --wui-height-network-lg: 96px;\n\n --wui-icon-size-network-xs: 12px;\n --wui-icon-size-network-sm: 16px;\n --wui-icon-size-network-md: 24px;\n --wui-icon-size-network-lg: 42px;\n\n --wui-color-inherit: inherit;\n\n --wui-color-inverse-100: #fff;\n --wui-color-inverse-000: #000;\n\n --wui-cover: rgba(20, 20, 20, 0.8);\n\n --wui-color-modal-bg: var(--wui-color-modal-bg-base);\n\n --wui-color-blue-100: var(--wui-color-blue-base-100);\n\n --wui-color-accent-100: var(--wui-color-accent-base-100);\n --wui-color-accent-090: var(--wui-color-accent-base-090);\n --wui-color-accent-080: var(--wui-color-accent-base-080);\n\n --wui-accent-glass-090: var(--wui-accent-glass-base-090);\n --wui-accent-glass-080: var(--wui-accent-glass-base-080);\n --wui-accent-glass-020: var(--wui-accent-glass-base-020);\n --wui-accent-glass-015: var(--wui-accent-glass-base-015);\n --wui-accent-glass-010: var(--wui-accent-glass-base-010);\n --wui-accent-glass-005: var(--wui-accent-glass-base-005);\n --wui-accent-glass-002: var(--wui-accent-glass-base-002);\n\n --wui-color-fg-100: var(--wui-color-fg-base-100);\n --wui-color-fg-125: var(--wui-color-fg-base-125);\n --wui-color-fg-150: var(--wui-color-fg-base-150);\n --wui-color-fg-175: var(--wui-color-fg-base-175);\n --wui-color-fg-200: var(--wui-color-fg-base-200);\n --wui-color-fg-225: var(--wui-color-fg-base-225);\n --wui-color-fg-250: var(--wui-color-fg-base-250);\n --wui-color-fg-275: var(--wui-color-fg-base-275);\n --wui-color-fg-300: var(--wui-color-fg-base-300);\n\n --wui-color-bg-100: var(--wui-color-bg-base-100);\n --wui-color-bg-125: var(--wui-color-bg-base-125);\n --wui-color-bg-150: var(--wui-color-bg-base-150);\n --wui-color-bg-175: var(--wui-color-bg-base-175);\n --wui-color-bg-200: var(--wui-color-bg-base-200);\n --wui-color-bg-225: var(--wui-color-bg-base-225);\n --wui-color-bg-250: var(--wui-color-bg-base-250);\n --wui-color-bg-275: var(--wui-color-bg-base-275);\n --wui-color-bg-300: var(--wui-color-bg-base-300);\n\n --wui-color-success-100: var(--wui-color-success-base-100);\n --wui-color-error-100: var(--wui-color-error-base-100);\n\n --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);\n --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);\n --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);\n --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);\n\n --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-base-100);\n\n --wui-avatar-border: var(--wui-avatar-border-base);\n\n --wui-thumbnail-border: var(--wui-thumbnail-border-base);\n\n --wui-box-shadow-blue: rgba(71, 161, 255, 0.16);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :root {\n --wui-color-modal-bg: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-modal-bg-base)\n );\n\n --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 16%, transparent);\n\n --wui-color-accent-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n var(--w3m-default)\n );\n --wui-color-accent-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n var(--w3m-default)\n );\n\n --wui-color-accent-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n transparent\n );\n --wui-color-accent-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n transparent\n );\n\n --wui-accent-glass-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n transparent\n );\n --wui-accent-glass-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n transparent\n );\n --wui-accent-glass-020: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 20%,\n transparent\n );\n --wui-accent-glass-015: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 15%,\n transparent\n );\n --wui-accent-glass-010: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 10%,\n transparent\n );\n --wui-accent-glass-005: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 5%,\n transparent\n );\n --wui-color-accent-002: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 2%,\n transparent\n );\n\n --wui-color-fg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-100)\n );\n --wui-color-fg-125: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-125)\n );\n --wui-color-fg-150: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-150)\n );\n --wui-color-fg-175: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-175)\n );\n --wui-color-fg-200: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-200)\n );\n --wui-color-fg-225: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-225)\n );\n --wui-color-fg-250: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-250)\n );\n --wui-color-fg-275: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-275)\n );\n --wui-color-fg-300: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-300)\n );\n\n --wui-color-bg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-100)\n );\n --wui-color-bg-125: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-125)\n );\n --wui-color-bg-150: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-150)\n );\n --wui-color-bg-175: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-175)\n );\n --wui-color-bg-200: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-200)\n );\n --wui-color-bg-225: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-225)\n );\n --wui-color-bg-250: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-250)\n );\n --wui-color-bg-275: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-275)\n );\n --wui-color-bg-300: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-300)\n );\n\n --wui-color-success-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-success-base-100)\n );\n --wui-color-error-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-error-base-100)\n );\n\n --wui-icon-box-bg-error-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-error-base-100)\n );\n --wui-icon-box-bg-accent-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-blue-base-100)\n );\n --wui-icon-box-bg-success-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-success-base-100)\n );\n --wui-icon-box-bg-inverse-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-inverse-base-100)\n );\n\n --wui-all-wallets-bg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-all-wallets-bg-base-100)\n );\n\n --wui-avatar-border: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-avatar-border-base)\n );\n\n --wui-thumbnail-border: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-thumbnail-border-base)\n );\n }\n }\n `,\n light: css `\n :root {\n --w3m-color-mix: ${unsafeCSS(themeVariables?.['--w3m-color-mix'] || '#fff')};\n --w3m-accent: ${unsafeCSS(themeVariables?.['--w3m-accent'] || '#47a1ff')};\n --w3m-default: #fff;\n\n --wui-color-modal-bg-base: #191a1a;\n\n --wui-color-blue-base-100: #47a1ff;\n\n --wui-color-accent-base-100: var(--w3m-accent);\n --wui-color-accent-base-090: #59aaff;\n --wui-color-accent-base-080: #6cb4ff;\n\n --wui-accent-glass-base-090: rgba(71, 161, 255, 0.9);\n --wui-accent-glass-base-080: rgba(71, 161, 255, 0.8);\n --wui-accent-glass-base-020: rgba(71, 161, 255, 0.2);\n --wui-accent-glass-base-015: rgba(71, 161, 255, 0.15);\n --wui-accent-glass-base-010: rgba(71, 161, 255, 0.1);\n --wui-accent-glass-base-005: rgba(71, 161, 255, 0.05);\n --wui-accent-glass-base-002: rgba(71, 161, 255, 0.02);\n\n --wui-color-fg-base-100: #e4e7e7;\n --wui-color-fg-base-125: #d0d5d5;\n --wui-color-fg-base-150: #a8b1b1;\n --wui-color-fg-base-175: #a8b0b0;\n --wui-color-fg-base-200: #949e9e;\n --wui-color-fg-base-225: #868f8f;\n --wui-color-fg-base-250: #788080;\n --wui-color-fg-base-275: #788181;\n --wui-color-fg-base-300: #6e7777;\n\n --wui-color-bg-base-100: #141414;\n --wui-color-bg-base-125: #191a1a;\n --wui-color-bg-base-150: #1e1f1f;\n --wui-color-bg-base-175: #222525;\n --wui-color-bg-base-200: #272a2a;\n --wui-color-bg-base-225: #2c3030;\n --wui-color-bg-base-250: #313535;\n --wui-color-bg-base-275: #363b3b;\n --wui-color-bg-base-300: #3b4040;\n\n --wui-color-success-base-100: #26d962;\n --wui-color-error-base-100: #f25a67;\n\n --wui-success-glass-001: rgba(38, 217, 98, 0.01);\n --wui-success-glass-002: rgba(38, 217, 98, 0.02);\n --wui-success-glass-005: rgba(38, 217, 98, 0.05);\n --wui-success-glass-010: rgba(38, 217, 98, 0.1);\n --wui-success-glass-015: rgba(38, 217, 98, 0.15);\n --wui-success-glass-020: rgba(38, 217, 98, 0.2);\n --wui-success-glass-025: rgba(38, 217, 98, 0.25);\n --wui-success-glass-030: rgba(38, 217, 98, 0.3);\n --wui-success-glass-060: rgba(38, 217, 98, 0.6);\n --wui-success-glass-080: rgba(38, 217, 98, 0.8);\n\n --wui-error-glass-001: rgba(242, 90, 103, 0.01);\n --wui-error-glass-002: rgba(242, 90, 103, 0.02);\n --wui-error-glass-005: rgba(242, 90, 103, 0.05);\n --wui-error-glass-010: rgba(242, 90, 103, 0.1);\n --wui-error-glass-015: rgba(242, 90, 103, 0.15);\n --wui-error-glass-020: rgba(242, 90, 103, 0.2);\n --wui-error-glass-025: rgba(242, 90, 103, 0.25);\n --wui-error-glass-030: rgba(242, 90, 103, 0.3);\n --wui-error-glass-060: rgba(242, 90, 103, 0.6);\n --wui-error-glass-080: rgba(242, 90, 103, 0.8);\n\n --wui-icon-box-bg-error-base-100: #3c2426;\n --wui-icon-box-bg-blue-base-100: #20303f;\n --wui-icon-box-bg-success-base-100: #1f3a28;\n --wui-icon-box-bg-inverse-base-100: #243240;\n\n --wui-all-wallets-bg-base-100: #222b35;\n\n --wui-avatar-border-base: #252525;\n\n --wui-thumbnail-border-base: #252525;\n\n --wui-gray-glass-001: rgba(255, 255, 255, 0.01);\n --wui-gray-glass-002: rgba(255, 255, 255, 0.02);\n --wui-gray-glass-005: rgba(255, 255, 255, 0.05);\n --wui-gray-glass-010: rgba(255, 255, 255, 0.1);\n --wui-gray-glass-015: rgba(255, 255, 255, 0.15);\n --wui-gray-glass-020: rgba(255, 255, 255, 0.2);\n --wui-gray-glass-025: rgba(255, 255, 255, 0.25);\n --wui-gray-glass-030: rgba(255, 255, 255, 0.3);\n --wui-gray-glass-060: rgba(255, 255, 255, 0.6);\n --wui-gray-glass-080: rgba(255, 255, 255, 0.8);\n --wui-gray-glass-090: rgba(255, 255, 255, 0.9);\n }\n `,\n dark: css `\n :root {\n --w3m-color-mix: ${unsafeCSS(themeVariables?.['--w3m-color-mix'] || '#000')};\n --w3m-accent: ${unsafeCSS(themeVariables?.['--w3m-accent'] || '#3396ff')};\n --w3m-default: #000;\n\n --wui-color-modal-bg-base: #fff;\n\n --wui-color-blue-base-100: #3396ff;\n\n --wui-color-accent-base-100: var(--w3m-accent);\n --wui-color-accent-base-090: #2d7dd2;\n --wui-color-accent-base-080: #2978cc;\n\n --wui-accent-glass-base-090: rgba(51, 150, 255, 0.9);\n --wui-accent-glass-base-080: rgba(51, 150, 255, 0.8);\n --wui-accent-glass-base-020: rgba(51, 150, 255, 0.2);\n --wui-accent-glass-base-015: rgba(51, 150, 255, 0.15);\n --wui-accent-glass-base-010: rgba(51, 150, 255, 0.1);\n --wui-accent-glass-base-005: rgba(51, 150, 255, 0.05);\n --wui-accent-glass-base-002: rgba(51, 150, 255, 0.02);\n\n --wui-color-fg-base-100: #141414;\n --wui-color-fg-base-125: #2d3131;\n --wui-color-fg-base-150: #474d4d;\n --wui-color-fg-base-175: #636d6d;\n --wui-color-fg-base-200: #798686;\n --wui-color-fg-base-225: #828f8f;\n --wui-color-fg-base-250: #8b9797;\n --wui-color-fg-base-275: #95a0a0;\n --wui-color-fg-base-300: #9ea9a9;\n\n --wui-color-bg-base-100: #ffffff;\n --wui-color-bg-base-125: #f5fafa;\n --wui-color-bg-base-150: #f3f8f8;\n --wui-color-bg-base-175: #eef4f4;\n --wui-color-bg-base-200: #eaf1f1;\n --wui-color-bg-base-225: #e5eded;\n --wui-color-bg-base-250: #e1e9e9;\n --wui-color-bg-base-275: #dce7e7;\n --wui-color-bg-base-300: #d8e3e3;\n\n --wui-color-success-base-100: #26b562;\n --wui-color-error-base-100: #f05142;\n\n --wui-success-glass-001: rgba(38, 181, 98, 0.01);\n --wui-success-glass-002: rgba(38, 181, 98, 0.02);\n --wui-success-glass-005: rgba(38, 181, 98, 0.05);\n --wui-success-glass-010: rgba(38, 181, 98, 0.1);\n --wui-success-glass-015: rgba(38, 181, 98, 0.15);\n --wui-success-glass-020: rgba(38, 181, 98, 0.2);\n --wui-success-glass-025: rgba(38, 181, 98, 0.25);\n --wui-success-glass-030: rgba(38, 181, 98, 0.3);\n --wui-success-glass-060: rgba(38, 181, 98, 0.6);\n --wui-success-glass-080: rgba(38, 181, 98, 0.8);\n\n --wui-error-glass-001: rgba(240, 81, 66, 0.01);\n --wui-error-glass-002: rgba(240, 81, 66, 0.02);\n --wui-error-glass-005: rgba(240, 81, 66, 0.05);\n --wui-error-glass-010: rgba(240, 81, 66, 0.1);\n --wui-error-glass-015: rgba(240, 81, 66, 0.15);\n --wui-error-glass-020: rgba(240, 81, 66, 0.2);\n --wui-error-glass-025: rgba(240, 81, 66, 0.25);\n --wui-error-glass-030: rgba(240, 81, 66, 0.3);\n --wui-error-glass-060: rgba(240, 81, 66, 0.6);\n --wui-error-glass-080: rgba(240, 81, 66, 0.8);\n\n --wui-icon-box-bg-error-base-100: #f4dfdd;\n --wui-icon-box-bg-blue-base-100: #d9ecfb;\n --wui-icon-box-bg-success-base-100: #daf0e4;\n --wui-icon-box-bg-inverse-base-100: #dcecfc;\n\n --wui-all-wallets-bg-base-100: #e8f1fa;\n\n --wui-avatar-border-base: #f3f4f4;\n\n --wui-thumbnail-border-base: #eaefef;\n\n --wui-gray-glass-001: rgba(0, 0, 0, 0.01);\n --wui-gray-glass-002: rgba(0, 0, 0, 0.02);\n --wui-gray-glass-005: rgba(0, 0, 0, 0.05);\n --wui-gray-glass-010: rgba(0, 0, 0, 0.1);\n --wui-gray-glass-015: rgba(0, 0, 0, 0.15);\n --wui-gray-glass-020: rgba(0, 0, 0, 0.2);\n --wui-gray-glass-025: rgba(0, 0, 0, 0.25);\n --wui-gray-glass-030: rgba(0, 0, 0, 0.3);\n --wui-gray-glass-060: rgba(0, 0, 0, 0.6);\n --wui-gray-glass-080: rgba(0, 0, 0, 0.8);\n --wui-gray-glass-090: rgba(0, 0, 0, 0.9);\n }\n `\n };\n}\nexport const resetStyles = css `\n *,\n *::after,\n *::before,\n :host {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-style: normal;\n text-rendering: optimizeSpeed;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n font-family: var(--wui-font-family);\n backface-visibility: hidden;\n }\n`;\nexport const elementStyles = css `\n button,\n a {\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, color;\n outline: none;\n border: 1px solid transparent;\n column-gap: var(--wui-spacing-3xs);\n background-color: transparent;\n text-decoration: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-005);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill']:hover:enabled {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='accentBg']:hover:enabled {\n background: var(--wui-accent-glass-015);\n }\n\n button[data-variant='accentBg']:active:enabled {\n background: var(--wui-accent-glass-020);\n }\n }\n\n button:disabled {\n cursor: not-allowed;\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='shade']:disabled,\n button[data-variant='accent']:disabled,\n button[data-variant='accentBg']:disabled {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-gray-glass-015);\n filter: grayscale(1);\n }\n\n button:disabled > wui-wallet-image,\n button:disabled > wui-all-wallets-image,\n button:disabled > wui-network-image,\n button:disabled > wui-image,\n button:disabled > wui-icon-box,\n button:disabled > wui-transaction-visual,\n button:disabled > wui-logo {\n filter: grayscale(1);\n }\n\n button:focus-visible,\n a:focus-visible {\n border: 1px solid var(--wui-color-accent-100);\n background-color: var(--wui-gray-glass-005);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n button[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n button[data-variant='fill']:disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='fill']:disabled > wui-icon {\n color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='shade'] {\n color: var(--wui-color-fg-200);\n }\n\n button[data-variant='accent'],\n button[data-variant='accentBg'] {\n color: var(--wui-color-accent-100);\n }\n\n button[data-variant='accentBg'] {\n background: var(--wui-accent-glass-010);\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n button[data-variant='fullWidth'] {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n height: 56px;\n border: none;\n background-color: var(--wui-gray-glass-002);\n color: var(--wui-color-fg-200);\n gap: var(--wui-spacing-xs);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill']:active:enabled {\n background-color: var(--wui-color-accent-080);\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n input {\n border: none;\n outline: none;\n appearance: none;\n }\n`;\nexport const colorStyles = css `\n .wui-color-inherit {\n color: var(--wui-color-inherit);\n }\n\n .wui-color-accent-100 {\n color: var(--wui-color-accent-100);\n }\n\n .wui-color-error-100 {\n color: var(--wui-color-error-100);\n }\n\n .wui-color-success-100 {\n color: var(--wui-color-success-100);\n }\n\n .wui-color-inverse-100 {\n color: var(--wui-color-inverse-100);\n }\n\n .wui-color-inverse-000 {\n color: var(--wui-color-inverse-000);\n }\n\n .wui-color-fg-100 {\n color: var(--wui-color-fg-100);\n }\n\n .wui-color-fg-200 {\n color: var(--wui-color-fg-200);\n }\n\n .wui-color-fg-300 {\n color: var(--wui-color-fg-300);\n }\n\n .wui-bg-color-inherit {\n background-color: var(--wui-color-inherit);\n }\n\n .wui-bg-color-blue-100 {\n background-color: var(--wui-color-accent-100);\n }\n\n .wui-bg-color-error-100 {\n background-color: var(--wui-color-error-100);\n }\n\n .wui-bg-color-success-100 {\n background-color: var(--wui-color-success-100);\n }\n\n .wui-bg-color-inverse-100 {\n background-color: var(--wui-color-inverse-100);\n }\n\n .wui-bg-color-inverse-000 {\n background-color: var(--wui-color-inverse-000);\n }\n\n .wui-bg-color-fg-100 {\n background-color: var(--wui-color-fg-100);\n }\n\n .wui-bg-color-fg-200 {\n background-color: var(--wui-color-fg-200);\n }\n\n .wui-bg-color-fg-300 {\n background-color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=ThemeUtil.js.map","function standardCustomElement(tagName, descriptor) {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n finisher(clazz) {\n if (!customElements.get(tagName)) {\n customElements.define(tagName, clazz);\n }\n }\n };\n}\nfunction legacyCustomElement(tagName, clazz) {\n if (!customElements.get(tagName)) {\n customElements.define(tagName, clazz);\n }\n return clazz;\n}\nexport function customElement(tagName) {\n return function create(classOrDescriptor) {\n return typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor);\n };\n}\n//# sourceMappingURL=WebComponentsUtil.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n border-radius: clamp(0px, var(--wui-border-radius-l), 44px);\n box-shadow: 0 0 0 1px var(--wui-gray-glass-005);\n background-color: var(--wui-color-modal-bg);\n overflow: hidden;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCard = class WuiCard extends LitElement {\n render() {\n return html ``;\n }\n};\nWuiCard.styles = [resetStyles, styles];\nWuiCard = __decorate([\n customElement('wui-card')\n], WuiCard);\nexport { WuiCard };\n//# sourceMappingURL=index.js.map","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n aspect-ratio: 1 / 1;\n color: var(--local-color);\n width: var(--local-width);\n }\n\n svg {\n width: inherit;\n height: inherit;\n object-fit: contain;\n object-position: center;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { svg } from 'lit';\nexport const allWalletsSvg = svg `\n \n`;\n//# sourceMappingURL=all-wallets.js.map","import { svg } from 'lit';\nexport const arrowBottomCircleSvg = svg `\n `;\n//# sourceMappingURL=arrow-bottom-circle.js.map","import { svg } from 'lit';\nexport const appStoreSvg = svg `\n\n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=app-store.js.map","import { svg } from 'lit';\nexport const appleSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=apple.js.map","import { svg } from 'lit';\nexport const arrowBottomSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-bottom.js.map","import { svg } from 'lit';\nexport const arrowLeftSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-left.js.map","import { svg } from 'lit';\nexport const arrowRightSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-right.js.map","import { svg } from 'lit';\nexport const arrowTopSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-top.js.map","import { svg } from 'lit';\nexport const browserSvg = svg `\n \n \n`;\n//# sourceMappingURL=browser.js.map","import { svg } from 'lit';\nexport const checkmarkSvg = svg `\n `;\n//# sourceMappingURL=checkmark.js.map","import { svg } from 'lit';\nexport const chevronBottomSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-bottom.js.map","import { svg } from 'lit';\nexport const chevronLeftSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-left.js.map","import { svg } from 'lit';\nexport const chevronRightSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-right.js.map","import { svg } from 'lit';\nexport const chevronTopSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-top.js.map","import { svg } from 'lit';\nexport const chromeStoreSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=chrome-store.js.map","import { svg } from 'lit';\nexport const clockSvg = svg `\n \n`;\n//# sourceMappingURL=clock.js.map","import { svg } from 'lit';\nexport const closeSvg = svg `\n \n`;\n//# sourceMappingURL=close.js.map","import { svg } from 'lit';\nexport const coinPlaceholderSvg = svg `\n \n`;\n//# sourceMappingURL=coinPlaceholder.js.map","import { svg } from 'lit';\nexport const compassSvg = svg `\n \n`;\n//# sourceMappingURL=compass.js.map","import { svg } from 'lit';\nexport const copySvg = svg `\n `;\n//# sourceMappingURL=copy.js.map","import { svg } from 'lit';\nexport const addSvg = svg `\n `;\n//# sourceMappingURL=add.js.map","import { svg } from 'lit';\nexport const cursorSvg = svg ` \n \n`;\n//# sourceMappingURL=cursor.js.map","import { svg } from 'lit';\nexport const desktopSvg = svg `\n \n \n`;\n//# sourceMappingURL=desktop.js.map","import { svg } from 'lit';\nexport const disconnectSvg = svg `\n \n`;\n//# sourceMappingURL=disconnect.js.map","import { svg } from 'lit';\nexport const discordSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=discord.js.map","import { svg } from 'lit';\nexport const etherscanSvg = svg `\n \n`;\n//# sourceMappingURL=etherscan.js.map","import { svg } from 'lit';\nexport const extensionSvg = svg `\n \n`;\n//# sourceMappingURL=extension.js.map","import { svg } from 'lit';\nexport const externalLinkSvg = svg `\n \n`;\n//# sourceMappingURL=external-link.js.map","import { svg } from 'lit';\nexport const facebookSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=facebook.js.map","import { svg } from 'lit';\nexport const filtersSvg = svg `\n \n`;\n//# sourceMappingURL=filters.js.map","import { svg } from 'lit';\nexport const githubSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=github.js.map","import { svg } from 'lit';\nexport const googleSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=google.js.map","import { svg } from 'lit';\nexport const helpCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=help-circle.js.map","import { svg } from 'lit';\nexport const infoCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=info-circle.js.map","import { svg } from 'lit';\nexport const mailSvg = svg `\n \n`;\n//# sourceMappingURL=mail.js.map","import { svg } from 'lit';\nexport const mobileSvg = svg `\n \n \n`;\n//# sourceMappingURL=mobile.js.map","import { svg } from 'lit';\nexport const networkPlaceholderSvg = svg `\n \n \n`;\n//# sourceMappingURL=network-placeholder.js.map","import { svg } from 'lit';\nexport const nftPlaceholderSvg = svg `\n \n`;\n//# sourceMappingURL=nftPlaceholder.js.map","import { svg } from 'lit';\nexport const offSvg = svg `\n \n`;\n//# sourceMappingURL=off.js.map","import { svg } from 'lit';\nexport const playStoreSvg = svg ` \n \n \n \n \n \n \n`;\n//# sourceMappingURL=play-store.js.map","import { svg } from 'lit';\nexport const qrCodeIcon = svg `\n \n`;\n//# sourceMappingURL=qr-code.js.map","import { svg } from 'lit';\nexport const refreshSvg = svg `\n \n`;\n//# sourceMappingURL=refresh.js.map","import { svg } from 'lit';\nexport const searchSvg = svg `\n \n`;\n//# sourceMappingURL=search.js.map","import { svg } from 'lit';\nexport const sendSvg = svg `\n \n `;\n//# sourceMappingURL=send.js.map","import { svg } from 'lit';\nexport const swapHorizontalSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontal.js.map","import { svg } from 'lit';\nexport const swapHorizontalBoldSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontalBold.js.map","import { svg } from 'lit';\nexport const swapHorizontalMediumSvg = svg `\n \n\n\n`;\n//# sourceMappingURL=swapHorizontalMedium.js.map","import { svg } from 'lit';\nexport const swapHorizontalRoundedBoldSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontalRoundedBold.js.map","import { svg } from 'lit';\nexport const swapVerticalSvg = svg `\n \n`;\n//# sourceMappingURL=swapVertical.js.map","import { svg } from 'lit';\nexport const telegramSvg = svg `\n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=telegram.js.map","import { svg } from 'lit';\nexport const twitchSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=twitch.js.map","import { svg } from 'lit';\nexport const twitterSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=twitter.js.map","import { svg } from 'lit';\nexport const twitterIconSvg = svg `\n \n`;\n//# sourceMappingURL=twitterIcon.js.map","import { svg } from 'lit';\nexport const verifySvg = svg `\n \n`;\n//# sourceMappingURL=verify.js.map","import { svg } from 'lit';\nexport const verifyFilledSvg = svg `\n \n`;\n//# sourceMappingURL=verify-filled.js.map","import { svg } from 'lit';\nexport const walletPlaceholderSvg = svg `\n \n \n \n \n`;\n//# sourceMappingURL=wallet-placeholder.js.map","import { svg } from 'lit';\nexport const walletSvg = svg `\n \n`;\n//# sourceMappingURL=wallet.js.map","import { svg } from 'lit';\nexport const walletConnectSvg = svg `\n \n \n`;\n//# sourceMappingURL=walletconnect.js.map","import { svg } from 'lit';\nexport const warningCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=warning-circle.js.map","import { svg } from 'lit';\nexport const recycleHorizontalSvg = svg `\n `;\n//# sourceMappingURL=recycle-horizontal.js.map","import { svg } from 'lit';\nexport const bankSvg = svg `\n `;\n//# sourceMappingURL=bank.js.map","import { svg } from 'lit';\nexport const cardSvg = svg `\n `;\n//# sourceMappingURL=card.js.map","import { svg } from 'lit';\nexport const plusSvg = svg `\n `;\n//# sourceMappingURL=plus.js.map","import { svg } from 'lit';\nexport const cursorTransparentSvg = svg `\n \n \n \n `;\n//# sourceMappingURL=cursor-transparent.js.map","import { svg } from 'lit';\nexport const checkmarkBoldSvg = svg `\n \n`;\n//# sourceMappingURL=checkmark-bold.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { colorStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { allWalletsSvg } from '../../assets/svg/all-wallets.js';\nimport { arrowBottomCircleSvg } from '../../assets/svg/arrow-bottom-circle.js';\nimport { appStoreSvg } from '../../assets/svg/app-store.js';\nimport { appleSvg } from '../../assets/svg/apple.js';\nimport { arrowBottomSvg } from '../../assets/svg/arrow-bottom.js';\nimport { arrowLeftSvg } from '../../assets/svg/arrow-left.js';\nimport { arrowRightSvg } from '../../assets/svg/arrow-right.js';\nimport { arrowTopSvg } from '../../assets/svg/arrow-top.js';\nimport { browserSvg } from '../../assets/svg/browser.js';\nimport { checkmarkSvg } from '../../assets/svg/checkmark.js';\nimport { chevronBottomSvg } from '../../assets/svg/chevron-bottom.js';\nimport { chevronLeftSvg } from '../../assets/svg/chevron-left.js';\nimport { chevronRightSvg } from '../../assets/svg/chevron-right.js';\nimport { chevronTopSvg } from '../../assets/svg/chevron-top.js';\nimport { chromeStoreSvg } from '../../assets/svg/chrome-store.js';\nimport { clockSvg } from '../../assets/svg/clock.js';\nimport { closeSvg } from '../../assets/svg/close.js';\nimport { coinPlaceholderSvg } from '../../assets/svg/coinPlaceholder.js';\nimport { compassSvg } from '../../assets/svg/compass.js';\nimport { copySvg } from '../../assets/svg/copy.js';\nimport { addSvg } from '../../assets/svg/add.js';\nimport { cursorSvg } from '../../assets/svg/cursor.js';\nimport { desktopSvg } from '../../assets/svg/desktop.js';\nimport { disconnectSvg } from '../../assets/svg/disconnect.js';\nimport { discordSvg } from '../../assets/svg/discord.js';\nimport { etherscanSvg } from '../../assets/svg/etherscan.js';\nimport { extensionSvg } from '../../assets/svg/extension.js';\nimport { externalLinkSvg } from '../../assets/svg/external-link.js';\nimport { facebookSvg } from '../../assets/svg/facebook.js';\nimport { filtersSvg } from '../../assets/svg/filters.js';\nimport { githubSvg } from '../../assets/svg/github.js';\nimport { googleSvg } from '../../assets/svg/google.js';\nimport { helpCircleSvg } from '../../assets/svg/help-circle.js';\nimport { infoCircleSvg } from '../../assets/svg/info-circle.js';\nimport { mailSvg } from '../../assets/svg/mail.js';\nimport { mobileSvg } from '../../assets/svg/mobile.js';\nimport { networkPlaceholderSvg } from '../../assets/svg/network-placeholder.js';\nimport { nftPlaceholderSvg } from '../../assets/svg/nftPlaceholder.js';\nimport { offSvg } from '../../assets/svg/off.js';\nimport { playStoreSvg } from '../../assets/svg/play-store.js';\nimport { qrCodeIcon } from '../../assets/svg/qr-code.js';\nimport { refreshSvg } from '../../assets/svg/refresh.js';\nimport { searchSvg } from '../../assets/svg/search.js';\nimport { sendSvg } from '../../assets/svg/send.js';\nimport { swapHorizontalSvg } from '../../assets/svg/swapHorizontal.js';\nimport { swapHorizontalBoldSvg } from '../../assets/svg/swapHorizontalBold.js';\nimport { swapHorizontalMediumSvg } from '../../assets/svg/swapHorizontalMedium.js';\nimport { swapHorizontalRoundedBoldSvg } from '../../assets/svg/swapHorizontalRoundedBold.js';\nimport { swapVerticalSvg } from '../../assets/svg/swapVertical.js';\nimport { telegramSvg } from '../../assets/svg/telegram.js';\nimport { twitchSvg } from '../../assets/svg/twitch.js';\nimport { twitterSvg } from '../../assets/svg/twitter.js';\nimport { twitterIconSvg } from '../../assets/svg/twitterIcon.js';\nimport { verifySvg } from '../../assets/svg/verify.js';\nimport { verifyFilledSvg } from '../../assets/svg/verify-filled.js';\nimport { walletPlaceholderSvg } from '../../assets/svg/wallet-placeholder.js';\nimport { walletSvg } from '../../assets/svg/wallet.js';\nimport { walletConnectSvg } from '../../assets/svg/walletconnect.js';\nimport { warningCircleSvg } from '../../assets/svg/warning-circle.js';\nimport { recycleHorizontalSvg } from '../../assets/svg/recycle-horizontal.js';\nimport { bankSvg } from '../../assets/svg/bank.js';\nimport { cardSvg } from '../../assets/svg/card.js';\nimport { plusSvg } from '../../assets/svg/plus.js';\nimport { cursorTransparentSvg } from '../../assets/svg/cursor-transparent.js';\nimport { checkmarkBoldSvg } from '../../assets/svg/checkmark-bold.js';\nconst svgOptions = {\n add: addSvg,\n allWallets: allWalletsSvg,\n arrowBottomCircle: arrowBottomCircleSvg,\n appStore: appStoreSvg,\n apple: appleSvg,\n arrowBottom: arrowBottomSvg,\n arrowLeft: arrowLeftSvg,\n arrowRight: arrowRightSvg,\n arrowTop: arrowTopSvg,\n bank: bankSvg,\n browser: browserSvg,\n card: cardSvg,\n checkmark: checkmarkSvg,\n checkmarkBold: checkmarkBoldSvg,\n chevronBottom: chevronBottomSvg,\n chevronLeft: chevronLeftSvg,\n chevronRight: chevronRightSvg,\n chevronTop: chevronTopSvg,\n chromeStore: chromeStoreSvg,\n clock: clockSvg,\n close: closeSvg,\n compass: compassSvg,\n coinPlaceholder: coinPlaceholderSvg,\n copy: copySvg,\n cursor: cursorSvg,\n cursorTransparent: cursorTransparentSvg,\n desktop: desktopSvg,\n disconnect: disconnectSvg,\n discord: discordSvg,\n etherscan: etherscanSvg,\n extension: extensionSvg,\n externalLink: externalLinkSvg,\n facebook: facebookSvg,\n filters: filtersSvg,\n github: githubSvg,\n google: googleSvg,\n helpCircle: helpCircleSvg,\n infoCircle: infoCircleSvg,\n mail: mailSvg,\n mobile: mobileSvg,\n networkPlaceholder: networkPlaceholderSvg,\n nftPlaceholder: nftPlaceholderSvg,\n off: offSvg,\n playStore: playStoreSvg,\n plus: plusSvg,\n qrCode: qrCodeIcon,\n recycleHorizontal: recycleHorizontalSvg,\n refresh: refreshSvg,\n search: searchSvg,\n send: sendSvg,\n swapHorizontal: swapHorizontalSvg,\n swapHorizontalMedium: swapHorizontalMediumSvg,\n swapHorizontalBold: swapHorizontalBoldSvg,\n swapHorizontalRoundedBold: swapHorizontalRoundedBoldSvg,\n swapVertical: swapVerticalSvg,\n telegram: telegramSvg,\n twitch: twitchSvg,\n twitter: twitterSvg,\n twitterIcon: twitterIconSvg,\n verify: verifySvg,\n verifyFilled: verifyFilledSvg,\n wallet: walletSvg,\n walletConnect: walletConnectSvg,\n walletPlaceholder: walletPlaceholderSvg,\n warningCircle: warningCircleSvg\n};\nlet WuiIcon = class WuiIcon extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = 'copy';\n this.color = 'fg-300';\n }\n render() {\n this.style.cssText = `\n --local-color: ${`var(--wui-color-${this.color});`}\n --local-width: ${`var(--wui-icon-size-${this.size});`}\n `;\n return html `${svgOptions[this.name]}`;\n }\n};\nWuiIcon.styles = [resetStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiIcon.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiIcon.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiIcon.prototype, \"color\", void 0);\nWuiIcon = __decorate([\n customElement('wui-icon')\n], WuiIcon);\nexport { WuiIcon };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--local-width);\n height: var(--local-height);\n }\n\n img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center center;\n border-radius: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { colorStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiImage = class WuiImage extends LitElement {\n constructor() {\n super(...arguments);\n this.src = './path/to/image.jpg';\n this.alt = 'Image';\n this.size = undefined;\n }\n render() {\n this.style.cssText = `\n --local-width: ${this.size ? `var(--wui-icon-size-${this.size});` : '100%'};\n --local-height: ${this.size ? `var(--wui-icon-size-${this.size});` : '100%'};\n `;\n return html `${this.alt}`;\n }\n};\nWuiImage.styles = [resetStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiImage.prototype, \"src\", void 0);\n__decorate([\n property()\n], WuiImage.prototype, \"alt\", void 0);\n__decorate([\n property()\n], WuiImage.prototype, \"size\", void 0);\nWuiImage = __decorate([\n customElement('wui-image')\n], WuiImage);\nexport { WuiImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-box-size-lg);\n height: var(--wui-box-size-lg);\n }\n\n svg {\n width: var(--wui-box-size-lg);\n height: var(--wui-box-size-lg);\n fill: none;\n stroke: transparent;\n stroke-linecap: round;\n }\n\n use {\n stroke: var(--wui-color-accent-100);\n stroke-width: 2px;\n stroke-dasharray: 54, 118;\n stroke-dashoffset: 172;\n animation: dash 1s linear infinite;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0px;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingHexagon = class WuiLoadingHexagon extends LitElement {\n render() {\n return html `\n \n \n \n \n `;\n }\n};\nWuiLoadingHexagon.styles = [resetStyles, styles];\nWuiLoadingHexagon = __decorate([\n customElement('wui-loading-hexagon')\n], WuiLoadingHexagon);\nexport { WuiLoadingHexagon };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n }\n\n :host([data-size='sm']) > svg {\n width: 12px;\n height: 12px;\n }\n\n :host([data-size='md']) > svg {\n width: 16px;\n height: 16px;\n }\n\n :host([data-size='lg']) > svg {\n width: 24px;\n height: 24px;\n }\n\n :host([data-size='xl']) > svg {\n width: 32px;\n height: 32px;\n }\n\n svg {\n animation: rotate 2s linear infinite;\n }\n\n circle {\n fill: none;\n stroke: var(--local-color);\n stroke-width: 4px;\n stroke-dasharray: 1, 124;\n stroke-dashoffset: 0;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n }\n\n :host([data-size='md']) > svg > circle {\n stroke-width: 6px;\n }\n\n :host([data-size='sm']) > svg > circle {\n stroke-width: 8px;\n }\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 124;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 90, 124;\n stroke-dashoffset: -35;\n }\n\n 100% {\n stroke-dashoffset: -125;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingSpinner = class WuiLoadingSpinner extends LitElement {\n constructor() {\n super(...arguments);\n this.color = 'accent-100';\n this.size = 'lg';\n }\n render() {\n this.style.cssText = `--local-color: var(--wui-color-${this.color});`;\n this.dataset['size'] = this.size;\n return html `\n \n `;\n }\n};\nWuiLoadingSpinner.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiLoadingSpinner.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiLoadingSpinner.prototype, \"size\", void 0);\nWuiLoadingSpinner = __decorate([\n customElement('wui-loading-spinner')\n], WuiLoadingSpinner);\nexport { WuiLoadingSpinner };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-box-size-md);\n height: var(--wui-box-size-md);\n }\n\n svg {\n width: var(--wui-box-size-md);\n height: var(--wui-box-size-md);\n }\n\n rect {\n fill: none;\n stroke: var(--wui-color-accent-100);\n stroke-width: 4px;\n stroke-linecap: round;\n animation: dash 1s linear infinite;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0px;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingThumbnail = class WuiLoadingThumbnail extends LitElement {\n constructor() {\n super(...arguments);\n this.radius = 36;\n }\n render() {\n return this.svgLoaderTemplate();\n }\n svgLoaderTemplate() {\n const radius = this.radius > 50 ? 50 : this.radius;\n const standardValue = 36;\n const radiusFactor = standardValue - radius;\n const dashArrayStart = 116 + radiusFactor;\n const dashArrayEnd = 245 + radiusFactor;\n const dashOffset = 360 + radiusFactor * 1.75;\n return html `\n \n \n \n `;\n }\n};\nWuiLoadingThumbnail.styles = [resetStyles, styles];\n__decorate([\n property({ type: Number })\n], WuiLoadingThumbnail.prototype, \"radius\", void 0);\nWuiLoadingThumbnail = __decorate([\n customElement('wui-loading-thumbnail')\n], WuiLoadingThumbnail);\nexport { WuiLoadingThumbnail };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background: linear-gradient(\n 120deg,\n var(--wui-color-bg-200) 5%,\n var(--wui-color-bg-200) 48%,\n var(--wui-color-bg-300) 55%,\n var(--wui-color-bg-300) 60%,\n var(--wui-color-bg-300) calc(60% + 10px),\n var(--wui-color-bg-200) calc(60% + 12px),\n var(--wui-color-bg-200) 100%\n );\n background-size: 250%;\n animation: shimmer 3s linear infinite reverse;\n }\n\n @keyframes shimmer {\n from {\n background-position: -250% 0;\n }\n to {\n background-position: 250% 0;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiShimmer = class WuiShimmer extends LitElement {\n constructor() {\n super(...arguments);\n this.width = '';\n this.height = '';\n this.borderRadius = 'm';\n }\n render() {\n this.style.cssText = `\n width: ${this.width};\n height: ${this.height};\n border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};\n `;\n return html ``;\n }\n};\nWuiShimmer.styles = [styles];\n__decorate([\n property()\n], WuiShimmer.prototype, \"width\", void 0);\n__decorate([\n property()\n], WuiShimmer.prototype, \"height\", void 0);\n__decorate([\n property()\n], WuiShimmer.prototype, \"borderRadius\", void 0);\nWuiShimmer = __decorate([\n customElement('wui-shimmer')\n], WuiShimmer);\nexport { WuiShimmer };\n//# sourceMappingURL=index.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex !important;\n }\n\n slot {\n width: 100%;\n display: inline-block;\n font-style: normal;\n font-family: var(--wui-font-family);\n font-feature-settings:\n 'tnum' on,\n 'lnum' on,\n 'case' on;\n line-height: 130%;\n font-weight: var(--wui-font-weight-regular);\n overflow: inherit;\n text-overflow: inherit;\n text-align: var(--local-align);\n color: var(--local-color);\n }\n\n .wui-font-medium-400 {\n font-size: var(--wui-font-size-medium);\n font-weight: var(--wui-font-weight-light);\n letter-spacing: var(--wui-letter-spacing-medium);\n }\n\n .wui-font-medium-600 {\n font-size: var(--wui-font-size-medium);\n letter-spacing: var(--wui-letter-spacing-medium);\n }\n\n .wui-font-medium-title-600 {\n font-size: var(--wui-font-size-medium-title);\n letter-spacing: var(--wui-letter-spacing-medium-title);\n }\n\n .wui-font-mini-700 {\n font-size: var(--wui-font-size-mini);\n letter-spacing: var(--wui-letter-spacing-mini);\n text-transform: uppercase;\n }\n\n .wui-font-large-500,\n .wui-font-large-600,\n .wui-font-large-700 {\n font-size: var(--wui-font-size-large);\n letter-spacing: var(--wui-letter-spacing-large);\n }\n\n .wui-font-2xl-500,\n .wui-font-2xl-600,\n .wui-font-2xl-700 {\n font-size: var(--wui-font-size-2xl);\n letter-spacing: var(--wui-letter-spacing-2xl);\n }\n\n .wui-font-paragraph-400,\n .wui-font-paragraph-500,\n .wui-font-paragraph-600,\n .wui-font-paragraph-700 {\n font-size: var(--wui-font-size-paragraph);\n letter-spacing: var(--wui-letter-spacing-paragraph);\n }\n\n .wui-font-small-400,\n .wui-font-small-500,\n .wui-font-small-600 {\n font-size: var(--wui-font-size-small);\n letter-spacing: var(--wui-letter-spacing-small);\n }\n\n .wui-font-tiny-400,\n .wui-font-tiny-500,\n .wui-font-tiny-600 {\n font-size: var(--wui-font-size-tiny);\n letter-spacing: var(--wui-letter-spacing-tiny);\n }\n\n .wui-font-micro-700,\n .wui-font-micro-600 {\n font-size: var(--wui-font-size-micro);\n letter-spacing: var(--wui-letter-spacing-micro);\n text-transform: uppercase;\n }\n\n .wui-font-tiny-400,\n .wui-font-small-400,\n .wui-font-paragraph-400 {\n font-weight: var(--wui-font-weight-light);\n }\n\n .wui-font-large-700,\n .wui-font-paragraph-700,\n .wui-font-micro-700,\n .wui-font-mini-700 {\n font-weight: var(--wui-font-weight-bold);\n }\n\n .wui-font-medium-600,\n .wui-font-medium-title-600,\n .wui-font-large-600,\n .wui-font-paragraph-600,\n .wui-font-small-600,\n .wui-font-tiny-600,\n .wui-font-micro-600 {\n font-weight: var(--wui-font-weight-medium);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiText = class WuiText extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'paragraph-500';\n this.color = 'fg-300';\n this.align = 'left';\n }\n render() {\n const classes = {\n [`wui-font-${this.variant}`]: true,\n [`wui-color-${this.color}`]: true\n };\n this.style.cssText = `\n --local-align: ${this.align};\n --local-color: var(--wui-color-${this.color});\n `;\n return html ``;\n }\n};\nWuiText.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiText.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiText.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiText.prototype, \"align\", void 0);\nWuiText = __decorate([\n customElement('wui-text')\n], WuiText);\nexport { WuiText };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const browserSvg = svg `\n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=browser.js.map","import { svg } from 'lit';\nexport const daoSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=dao.js.map","import { svg } from 'lit';\nexport const defiSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=defi.js.map","import { svg } from 'lit';\nexport const defiAltSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=defiAlt.js.map","import { svg } from 'lit';\nexport const ethSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=eth.js.map","import { svg } from 'lit';\nexport const layersSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=layers.js.map","import { svg } from 'lit';\nexport const lockSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=lock.js.map","import { svg } from 'lit';\nexport const loginSvg = svg `\n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=login.js.map","import { svg } from 'lit';\nexport const networkSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=network.js.map","import { svg } from 'lit';\nexport const nftSvg = svg `\n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=nft.js.map","import { svg } from 'lit';\nexport const nounSvg = svg `\n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=noun.js.map","import { svg } from 'lit';\nexport const profileSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=profile.js.map","import { svg } from 'lit';\nexport const systemSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=system.js.map","import { svg } from 'lit';\nexport const coinbaseSvg = svg `\n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=coinbase.js.map","import { svg } from 'lit';\nexport const moonpaySvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=moonpay.js.map","import { svg } from 'lit';\nexport const stripeSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=stripe.js.map","import { svg } from 'lit';\nexport const paypalSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=paypal.js.map","import { svg } from 'lit';\nexport const onrampCardSvg = svg `\n\n \n \n \n \n \n\n\n \n \n \n\n`;\n//# sourceMappingURL=onramp-card.js.map","import { svg } from 'lit';\nexport const googleSvg = svg `\n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=google.js.map","import { svg } from 'lit';\nexport const pencilSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=pencil.js.map","import { svg } from 'lit';\nexport const lightbulbSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=lightbulb.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--local-size);\n height: var(--local-size);\n }\n\n :host svg {\n width: 100%;\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { browserSvg } from '../../assets/visual/browser.js';\nimport { daoSvg } from '../../assets/visual/dao.js';\nimport { defiSvg } from '../../assets/visual/defi.js';\nimport { defiAltSvg } from '../../assets/visual/defiAlt.js';\nimport { ethSvg } from '../../assets/visual/eth.js';\nimport { layersSvg } from '../../assets/visual/layers.js';\nimport { lockSvg } from '../../assets/visual/lock.js';\nimport { loginSvg } from '../../assets/visual/login.js';\nimport { networkSvg } from '../../assets/visual/network.js';\nimport { nftSvg } from '../../assets/visual/nft.js';\nimport { nounSvg } from '../../assets/visual/noun.js';\nimport { profileSvg } from '../../assets/visual/profile.js';\nimport { systemSvg } from '../../assets/visual/system.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { coinbaseSvg } from '../../assets/visual/coinbase.js';\nimport { moonpaySvg } from '../../assets/visual/moonpay.js';\nimport { stripeSvg } from '../../assets/visual/stripe.js';\nimport { paypalSvg } from '../../assets/visual/paypal.js';\nimport { onrampCardSvg } from '../../assets/visual/onramp-card.js';\nimport { googleSvg } from '../../assets/visual/google.js';\nimport { pencilSvg } from '../../assets/visual/pencil.js';\nimport { lightbulbSvg } from '../../assets/visual/lightbulb.js';\nimport styles from './styles.js';\nconst svgOptions = {\n browser: browserSvg,\n dao: daoSvg,\n defi: defiSvg,\n defiAlt: defiAltSvg,\n eth: ethSvg,\n layers: layersSvg,\n lock: lockSvg,\n login: loginSvg,\n network: networkSvg,\n nft: nftSvg,\n noun: nounSvg,\n profile: profileSvg,\n system: systemSvg,\n coinbase: coinbaseSvg,\n onrampCard: onrampCardSvg,\n moonpay: moonpaySvg,\n stripe: stripeSvg,\n paypal: paypalSvg,\n google: googleSvg,\n pencil: pencilSvg,\n lightbulb: lightbulbSvg\n};\nlet WuiVisual = class WuiVisual extends LitElement {\n constructor() {\n super(...arguments);\n this.name = 'browser';\n this.size = 'md';\n }\n render() {\n this.style.cssText = `\n --local-size: var(--wui-visual-size-${this.size});\n `;\n return html `${svgOptions[this.name]}`;\n }\n};\nWuiVisual.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiVisual.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiVisual.prototype, \"size\", void 0);\nWuiVisual = __decorate([\n customElement('wui-visual')\n], WuiVisual);\nexport { WuiVisual };\n//# sourceMappingURL=index.js.map","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","export const UiHelperUtil = {\n getSpacingStyles(spacing, index) {\n if (Array.isArray(spacing)) {\n return spacing[index] ? `var(--wui-spacing-${spacing[index]})` : undefined;\n }\n else if (typeof spacing === 'string') {\n return `var(--wui-spacing-${spacing})`;\n }\n return undefined;\n },\n getFormattedDate(date) {\n return new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric' }).format(date);\n },\n getHostName(url) {\n const newUrl = new URL(url);\n return newUrl.hostname;\n },\n getTruncateString({ string, charsStart, charsEnd, truncate }) {\n if (string.length <= charsStart + charsEnd) {\n return string;\n }\n if (truncate === 'end') {\n return `${string.substring(0, charsStart)}...`;\n }\n else if (truncate === 'start') {\n return `...${string.substring(string.length - charsEnd)}`;\n }\n return `${string.substring(0, Math.floor(charsStart))}...${string.substring(string.length - Math.floor(charsEnd))}`;\n },\n generateAvatarColors(address) {\n const hash = address.toLowerCase().replace(/^0x/iu, '');\n const baseColor = hash.substring(0, 6);\n const rgbColor = this.hexToRgb(baseColor);\n const masterBorderRadius = getComputedStyle(document.documentElement).getPropertyValue('--w3m-border-radius-master');\n const radius = Number(masterBorderRadius?.replace('px', ''));\n const edge = 100 - 3 * radius;\n const gradientCircle = `${edge}% ${edge}% at 65% 40%`;\n const colors = [];\n for (let i = 0; i < 5; i += 1) {\n const tintedColor = this.tintColor(rgbColor, 0.15 * i);\n colors.push(`rgb(${tintedColor[0]}, ${tintedColor[1]}, ${tintedColor[2]})`);\n }\n return `\n --local-color-1: ${colors[0]};\n --local-color-2: ${colors[1]};\n --local-color-3: ${colors[2]};\n --local-color-4: ${colors[3]};\n --local-color-5: ${colors[4]};\n --local-radial-circle: ${gradientCircle}\n `;\n },\n hexToRgb(hex) {\n const bigint = parseInt(hex, 16);\n const r = (bigint >> 16) & 255;\n const g = (bigint >> 8) & 255;\n const b = bigint & 255;\n return [r, g, b];\n },\n tintColor(rgb, tint) {\n const [r, g, b] = rgb;\n const tintedR = Math.round(r + (255 - r) * tint);\n const tintedG = Math.round(g + (255 - g) * tint);\n const tintedB = Math.round(b + (255 - b) * tint);\n return [tintedR, tintedG, tintedB];\n },\n isNumber(character) {\n const regex = {\n number: /^[0-9]+$/u\n };\n return regex.number.test(character);\n },\n getColorTheme(theme) {\n if (theme) {\n return theme;\n }\n else if (typeof window !== 'undefined' && window.matchMedia) {\n if (window.matchMedia('(prefers-color-scheme: dark)').matches) {\n return 'dark';\n }\n return 'light';\n }\n return 'dark';\n },\n splitBalance(input) {\n const parts = input.split('.');\n if (parts.length === 2) {\n return [parts[0], parts[1]];\n }\n return ['0', '00'];\n },\n roundNumber(number, threshold, fixed) {\n const roundedNumber = Math.abs(number) >= threshold ? Number(number.toFixed(fixed)) : number;\n return roundedNumber;\n },\n formatNumberToLocalString(value, decimals = 2) {\n if (value === undefined) {\n return '0.00';\n }\n if (typeof value === 'number') {\n return value.toLocaleString('en-US', {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals\n });\n }\n return parseFloat(value).toLocaleString('en-US', {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals\n });\n }\n};\n//# sourceMappingURL=UiHelperUtil.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n width: inherit;\n height: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiFlex = class WuiFlex extends LitElement {\n render() {\n this.style.cssText = `\n flex-direction: ${this.flexDirection};\n flex-wrap: ${this.flexWrap};\n flex-basis: ${this.flexBasis};\n flex-grow: ${this.flexGrow};\n flex-shrink: ${this.flexShrink};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n column-gap: ${this.columnGap && `var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap && `var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap && `var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 0)};\n padding-right: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 1)};\n padding-bottom: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 2)};\n padding-left: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 3)};\n margin-top: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 0)};\n margin-right: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 1)};\n margin-bottom: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 2)};\n margin-left: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 3)};\n `;\n return html ``;\n }\n};\nWuiFlex.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiFlex.prototype, \"flexDirection\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexWrap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexBasis\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexGrow\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexShrink\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"alignItems\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"justifyContent\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"columnGap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"rowGap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"gap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"padding\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"margin\", void 0);\nWuiFlex = __decorate([\n customElement('wui-flex')\n], WuiFlex);\nexport { WuiFlex };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-icon-box-size-xl);\n height: var(--wui-icon-box-size-xl);\n border-radius: var(--wui-border-radius-3xl);\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n overflow: hidden;\n position: relative;\n }\n\n :host([data-variant='generated']) {\n --mixed-local-color-1: var(--local-color-1);\n --mixed-local-color-2: var(--local-color-2);\n --mixed-local-color-3: var(--local-color-3);\n --mixed-local-color-4: var(--local-color-4);\n --mixed-local-color-5: var(--local-color-5);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :host([data-variant='generated']) {\n --mixed-local-color-1: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-1)\n );\n --mixed-local-color-2: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-2)\n );\n --mixed-local-color-3: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-3)\n );\n --mixed-local-color-4: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-4)\n );\n --mixed-local-color-5: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-5)\n );\n }\n }\n\n :host([data-variant='generated']) {\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n background: radial-gradient(\n var(--local-radial-circle),\n #fff 0.52%,\n var(--mixed-local-color-5) 31.25%,\n var(--mixed-local-color-3) 51.56%,\n var(--mixed-local-color-2) 65.63%,\n var(--mixed-local-color-1) 82.29%,\n var(--mixed-local-color-4) 100%\n );\n }\n\n :host([data-variant='default']) {\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n background: radial-gradient(\n 75.29% 75.29% at 64.96% 24.36%,\n #fff 0.52%,\n #f5ccfc 31.25%,\n #dba4f5 51.56%,\n #9a8ee8 65.63%,\n #6493da 82.29%,\n #6ebdea 100%\n );\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiAvatar = class WuiAvatar extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.alt = undefined;\n this.address = undefined;\n }\n render() {\n return html `${this.visualTemplate()}`;\n }\n visualTemplate() {\n if (this.imageSrc) {\n this.dataset['variant'] = 'image';\n return html ``;\n }\n else if (this.address) {\n this.dataset['variant'] = 'generated';\n const cssColors = UiHelperUtil.generateAvatarColors(this.address);\n this.style.cssText = cssColors;\n return null;\n }\n this.dataset['variant'] = 'default';\n return null;\n }\n};\nWuiAvatar.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiAvatar.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiAvatar.prototype, \"alt\", void 0);\n__decorate([\n property()\n], WuiAvatar.prototype, \"address\", void 0);\nWuiAvatar = __decorate([\n customElement('wui-avatar')\n], WuiAvatar);\nexport { WuiAvatar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n background-color: var(--wui-gray-glass-020);\n border-radius: var(--local-border-radius);\n border: var(--local-border);\n box-sizing: content-box;\n width: var(--local-size);\n height: var(--local-size);\n min-height: var(--local-size);\n min-width: var(--local-size);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :host {\n background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiIconBox = class WuiIconBox extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.backgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.background = 'transparent';\n this.border = false;\n this.borderColor = 'wui-color-bg-125';\n this.icon = 'copy';\n }\n render() {\n const iconSize = this.iconSize || this.size;\n const isLg = this.size === 'lg';\n const isXl = this.size === 'xl';\n const bgMix = isLg ? '12%' : '16%';\n const borderRadius = isLg ? 'xxs' : isXl ? 's' : '3xl';\n const isGray = this.background === 'gray';\n const isOpaque = this.background === 'opaque';\n const isColorChange = (this.backgroundColor === 'accent-100' && isOpaque) ||\n (this.backgroundColor === 'success-100' && isOpaque) ||\n (this.backgroundColor === 'error-100' && isOpaque) ||\n (this.backgroundColor === 'inverse-100' && isOpaque);\n let bgValueVariable = `var(--wui-color-${this.backgroundColor})`;\n if (isColorChange) {\n bgValueVariable = `var(--wui-icon-box-bg-${this.backgroundColor})`;\n }\n else if (isGray) {\n bgValueVariable = `var(--wui-gray-${this.backgroundColor})`;\n }\n this.style.cssText = `\n --local-bg-value: ${bgValueVariable};\n --local-bg-mix: ${isColorChange || isGray ? `100%` : bgMix};\n --local-border-radius: var(--wui-border-radius-${borderRadius});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${this.borderColor === 'wui-color-bg-125' ? `2px` : `1px`} solid ${this.border ? `var(--${this.borderColor})` : `transparent`}\n `;\n return html ` `;\n }\n};\nWuiIconBox.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiIconBox.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"backgroundColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"iconColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"iconSize\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"background\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiIconBox.prototype, \"border\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"borderColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"icon\", void 0);\nWuiIconBox = __decorate([\n customElement('wui-icon-box')\n], WuiIconBox);\nexport { WuiIconBox };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n background: var(--wui-gray-glass-002);\n display: flex;\n gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)\n var(--wui-spacing-xs);\n border: 1px solid var(--wui-gray-glass-005);\n }\n\n button:disabled {\n background: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-flex > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-image,\n button:disabled > wui-icon-box,\n button:disabled > wui-flex > wui-avatar {\n filter: grayscale(1);\n }\n\n button:has(wui-image) {\n padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs)\n var(--wui-spacing-xs);\n }\n\n wui-text {\n color: var(--wui-color-fg-100);\n }\n\n wui-flex > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n wui-image,\n wui-icon-box {\n border-radius: var(--wui-border-radius-3xl);\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n wui-flex {\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-005);\n background: var(--wui-gray-glass-005);\n padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);\n }\n\n button.local-no-balance {\n border-radius: 0px;\n border: none;\n background: transparent;\n }\n\n wui-avatar {\n width: 20px;\n height: 20px;\n box-shadow: 0 0 0 2px var(--wui-accent-glass-010);\n }\n\n @media (max-width: 500px) {\n button {\n gap: 0px;\n padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important;\n height: 32px;\n }\n wui-image,\n wui-icon-box,\n button > wui-text {\n visibility: hidden;\n width: 0px;\n height: 0px;\n }\n button {\n border-radius: 0px;\n border: none;\n background: transparent;\n padding: 0px;\n }\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled > wui-flex > wui-text {\n color: var(--wui-color-fg-175);\n }\n\n button:active:enabled > wui-flex > wui-text {\n color: var(--wui-color-fg-175);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-avatar/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiAccountButton = class WuiAccountButton extends LitElement {\n constructor() {\n super(...arguments);\n this.networkSrc = undefined;\n this.avatarSrc = undefined;\n this.balance = undefined;\n this.isUnsupportedChain = undefined;\n this.disabled = false;\n this.isProfileName = false;\n this.address = '';\n this.profileName = '';\n this.charsStart = 4;\n this.charsEnd = 6;\n }\n render() {\n return html `\n \n ${this.balanceTemplate()}\n \n \n \n ${this.address\n ? UiHelperUtil.getTruncateString({\n string: this.isProfileName ? this.profileName : this.address,\n charsStart: this.isProfileName ? 18 : this.charsStart,\n charsEnd: this.isProfileName ? 0 : this.charsEnd,\n truncate: this.isProfileName ? 'end' : 'middle'\n })\n : null}\n \n \n \n `;\n }\n balanceTemplate() {\n if (this.isUnsupportedChain) {\n return html ` \n Switch Network`;\n }\n if (this.balance) {\n const networkElement = this.networkSrc\n ? html ``\n : html `\n \n `;\n return html `\n ${networkElement}\n ${this.balance}\n `;\n }\n return null;\n }\n};\nWuiAccountButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiAccountButton.prototype, \"networkSrc\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"avatarSrc\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"balance\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"isUnsupportedChain\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"isProfileName\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"profileName\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"charsEnd\", void 0);\nWuiAccountButton = __decorate([\n customElement('wui-account-button')\n], WuiAccountButton);\nexport { WuiAccountButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n background-color: var(--wui-gray-glass-002);\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--local-size);\n height: var(--local-size);\n border-radius: inherit;\n border-radius: var(--local-border-radius);\n }\n\n :host > wui-flex {\n overflow: hidden;\n border-radius: inherit;\n border-radius: var(--local-border-radius);\n }\n\n :host::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n :host([name='Extension'])::after {\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n :host([data-wallet-icon='allWallets']) {\n background-color: var(--wui-all-wallets-bg-100);\n }\n\n :host([data-wallet-icon='allWallets'])::after {\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n wui-icon[data-parent-size='inherit'] {\n width: 75%;\n height: 75%;\n align-items: center;\n }\n\n wui-icon[data-parent-size='sm'] {\n width: 18px;\n height: 18px;\n }\n\n wui-icon[data-parent-size='md'] {\n width: 24px;\n height: 24px;\n }\n\n wui-icon[data-parent-size='lg'] {\n width: 42px;\n height: 42px;\n }\n\n wui-icon[data-parent-size='full'] {\n width: 100%;\n height: 100%;\n }\n\n :host > wui-icon-box {\n position: absolute;\n overflow: hidden;\n right: -1px;\n bottom: -2px;\n z-index: 1;\n border: 2px solid var(--wui-color-bg-base-150, #1e1f1f);\n padding: 1px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiWalletImage = class WuiWalletImage extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = '';\n this.installed = false;\n this.badgeSize = 'xs';\n }\n render() {\n let borderRadius = 'xxs';\n if (this.size === 'lg') {\n borderRadius = 'm';\n }\n else if (this.size === 'md') {\n borderRadius = 'xs';\n }\n else {\n borderRadius = 'xxs';\n }\n this.style.cssText = `\n --local-border-radius: var(--wui-border-radius-${borderRadius});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `;\n if (this.walletIcon) {\n this.dataset['walletIcon'] = this.walletIcon;\n }\n return html `\n ${this.templateVisual()} \n `;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n else if (this.walletIcon) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiWalletImage.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiWalletImage.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"walletIcon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiWalletImage.prototype, \"installed\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"badgeSize\", void 0);\nWuiWalletImage = __decorate([\n customElement('wui-wallet-image')\n], WuiWalletImage);\nexport { WuiWalletImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n border-radius: var(--wui-border-radius-xxs);\n width: 40px;\n height: 40px;\n overflow: hidden;\n background: var(--wui-gray-glass-002);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--wui-spacing-4xs);\n padding: 3.75px !important;\n }\n\n :host::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n :host > wui-wallet-image {\n width: 14px;\n height: 14px;\n border-radius: var(--wui-border-radius-5xs);\n }\n\n :host > wui-flex {\n padding: 2px;\n position: fixed;\n overflow: hidden;\n left: 34px;\n bottom: 8px;\n background: var(--dark-background-150, #1e1f1f);\n border-radius: 50%;\n z-index: 2;\n display: flex;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-wallet-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nconst TOTAL_IMAGES = 4;\nlet WuiAllWalletsImage = class WuiAllWalletsImage extends LitElement {\n constructor() {\n super(...arguments);\n this.walletImages = [];\n }\n render() {\n const isPlaceholders = this.walletImages.length < TOTAL_IMAGES;\n return html `${this.walletImages\n .slice(0, TOTAL_IMAGES)\n .map(({ src, walletName }) => html `\n \n `)}\n ${isPlaceholders\n ? [...Array(TOTAL_IMAGES - this.walletImages.length)].map(() => html ` `)\n : null}\n \n \n `;\n }\n};\nWuiAllWalletsImage.styles = [resetStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiAllWalletsImage.prototype, \"walletImages\", void 0);\nWuiAllWalletsImage = __decorate([\n customElement('wui-all-wallets-image')\n], WuiAllWalletsImage);\nexport { WuiAllWalletsImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: var(--local-width);\n position: relative;\n }\n\n button {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--local-border-radius);\n width: var(--local-width);\n white-space: nowrap;\n }\n\n button:disabled {\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n /* xs settings */\n button[data-size='xs'] {\n padding: var(--wui-spacing-xs) var(--wui-spacing-1xs);\n }\n\n button[data-size='xs'][data-icon-left='true'][data-icon-right='false'] {\n padding-left: var(--wui-spacing-xxs);\n }\n\n button[data-size='xs'][data-icon-right='true'][data-icon-left='false'] {\n padding-right: var(--wui-spacing-xxs);\n }\n\n /* sm settings */\n button[data-size='sm'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-s);\n }\n\n button[data-size='sm'][data-icon-left='true'][data-icon-right='false'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-s) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n button[data-size='sm'][data-icon-right='true'][data-icon-left='false'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-xs) var(--wui-spacing-xxs)\n var(--wui-spacing-s);\n }\n\n /* md settings */\n button[data-size='md'] {\n padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);\n }\n\n button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {\n padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);\n }\n\n button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {\n padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);\n }\n\n /* lg settings */\n button[data-size='lg'] {\n padding: var(--wui-spacing-m) var(--wui-spacing-2l);\n }\n\n button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {\n padding-left: var(--wui-spacing-m);\n }\n\n button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {\n padding-right: var(--wui-spacing-m);\n }\n\n button > wui-text {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n ::slotted(*) {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n wui-loading-spinner {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n opacity: var(--local-opacity-000);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nconst TEXT_VARIANT_BY_SIZE = {\n xs: 'small-600',\n sm: 'paragraph-600',\n md: 'small-600',\n mdl: 'small-600',\n lg: 'paragraph-600'\n};\nlet WuiButton = class WuiButton extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.disabled = false;\n this.fullWidth = false;\n this.loading = false;\n this.variant = 'fill';\n this.hasIconLeft = false;\n this.hasIconRight = false;\n this.borderRadius = 'm';\n }\n render() {\n this.style.cssText = `\n --local-width: ${this.fullWidth ? '100%' : 'auto'};\n --local-opacity-100: ${this.loading ? 0 : 1};\n --local-opacity-000: ${this.loading ? 1 : 0};\n --local-border-radius: var(--wui-border-radius-${this.borderRadius});\n `;\n const textVariant = this.textVariant ?? TEXT_VARIANT_BY_SIZE[this.size];\n return html `\n \n ${this.loadingTemplate()}\n this.handleSlotLeftChange()}>\n \n \n \n this.handleSlotRightChange()}>\n \n `;\n }\n handleSlotLeftChange() {\n this.hasIconLeft = true;\n }\n handleSlotRightChange() {\n this.hasIconRight = true;\n }\n loadingTemplate() {\n if (this.loading) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiButton.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"fullWidth\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"loading\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"variant\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"hasIconLeft\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"hasIconRight\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"borderRadius\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"textVariant\", void 0);\nWuiButton = __decorate([\n customElement('wui-button')\n], WuiButton);\nexport { WuiButton };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const networkSvgMd = svg `\n \n`;\n//# sourceMappingURL=networkMd.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 76px;\n row-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xs) 10px;\n background-color: var(--wui-gray-glass-002);\n border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\n position: relative;\n }\n\n wui-shimmer[data-type='network'] {\n border: none;\n -webkit-clip-path: var(--wui-path-network);\n clip-path: var(--wui-path-network);\n }\n\n svg {\n position: absolute;\n width: 48px;\n height: 54px;\n z-index: 1;\n }\n\n svg > path {\n stroke: var(--wui-gray-glass-010);\n stroke-width: 1px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { networkSvgMd } from '../../assets/svg/networkMd.js';\nimport '../../components/wui-shimmer/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCardSelectLoader = class WuiCardSelectLoader extends LitElement {\n constructor() {\n super(...arguments);\n this.type = 'wallet';\n }\n render() {\n return html `\n ${this.shimmerTemplate()}\n \n `;\n }\n shimmerTemplate() {\n if (this.type === 'network') {\n return html ` \n ${networkSvgMd}`;\n }\n return html ``;\n }\n};\nWuiCardSelectLoader.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiCardSelectLoader.prototype, \"type\", void 0);\nWuiCardSelectLoader = __decorate([\n customElement('wui-card-select-loader')\n], WuiCardSelectLoader);\nexport { WuiCardSelectLoader };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const networkSvgSm = svg `\n \n \n \n`;\n//# sourceMappingURL=networkSm.js.map","import { svg } from 'lit';\nexport const networkSvgLg = svg `\n \n`;\n//# sourceMappingURL=networkLg.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n border-radius: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--local-width);\n height: var(--local-height);\n }\n\n svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n fill: var(--wui-gray-glass-002);\n }\n\n svg > path {\n stroke: var(--local-stroke);\n }\n\n wui-image {\n width: 100%;\n height: 100%;\n -webkit-clip-path: var(--local-path);\n clip-path: var(--local-path);\n background: var(--wui-gray-glass-002);\n }\n\n wui-icon {\n transform: translateY(-5%);\n width: var(--local-icon-size);\n height: var(--local-icon-size);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { networkSvgSm } from '../../assets/svg/networkSm.js';\nimport { networkSvgMd } from '../../assets/svg/networkMd.js';\nimport { networkSvgLg } from '../../assets/svg/networkLg.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiNetworkImage = class WuiNetworkImage extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = 'uknown';\n this.selected = false;\n }\n render() {\n const networkImagesBySize = { sm: networkSvgSm, md: networkSvgMd, lg: networkSvgLg };\n this.style.cssText = `\n --local-stroke: ${this.selected ? 'var(--wui-color-accent-100)' : 'var(--wui-gray-glass-010)'};\n --local-path: var(--wui-path-network-${this.size});\n --local-width: var(--wui-width-network-${this.size});\n --local-height: var(--wui-height-network-${this.size});\n --local-icon-size: var(--wui-icon-size-network-${this.size});\n `;\n return html `${this.templateVisual()} ${networkImagesBySize[this.size]}`;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiNetworkImage.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkImage.prototype, \"selected\", void 0);\nWuiNetworkImage = __decorate([\n customElement('wui-network-image')\n], WuiNetworkImage);\nexport { WuiNetworkImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n flex-direction: column;\n width: 76px;\n row-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xs) var(--wui-spacing-0);\n background-color: var(--wui-gray-glass-002);\n border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\n }\n\n button > wui-text {\n color: var(--wui-color-fg-100);\n max-width: var(--wui-icon-box-size-xl);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n justify-content: center;\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n [data-selected='true'] {\n background-color: var(--wui-accent-glass-020);\n }\n\n @media (hover: hover) and (pointer: fine) {\n [data-selected='true']:hover:enabled {\n background-color: var(--wui-accent-glass-015);\n }\n }\n\n [data-selected='true']:active:enabled {\n background-color: var(--wui-accent-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-network-image/index.js';\nimport '../wui-wallet-image/index.js';\nimport styles from './styles.js';\nlet WuiCardSelect = class WuiCardSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.name = 'Unknown';\n this.type = 'wallet';\n this.imageSrc = undefined;\n this.disabled = false;\n this.selected = false;\n this.installed = false;\n }\n render() {\n return html `\n \n `;\n }\n imageTemplate() {\n if (this.type === 'network') {\n return html `\n \n \n `;\n }\n return html `\n \n \n `;\n }\n};\nWuiCardSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiCardSelect.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiCardSelect.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiCardSelect.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"installed\", void 0);\nWuiCardSelect = __decorate([\n customElement('wui-card-select')\n], WuiCardSelect);\nexport { WuiCardSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n a {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-image {\n border-radius: var(--wui-border-radius-3xl);\n overflow: hidden;\n }\n\n a.disabled > wui-icon,\n a.disabled > wui-image {\n filter: grayscale(1);\n }\n\n a[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n a[data-variant='shade'],\n a[data-variant='shadeSmall'] {\n background-color: transparent;\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n a[data-variant='success'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-success-glass-010);\n background-color: var(--wui-success-glass-010);\n color: var(--wui-color-success-100);\n }\n\n a[data-variant='error'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-error-glass-010);\n background-color: var(--wui-error-glass-010);\n color: var(--wui-color-error-100);\n }\n\n a[data-variant='transparent'] {\n column-gap: var(--wui-spacing-xxs);\n background-color: transparent;\n color: var(--wui-color-fg-150);\n }\n\n a[data-variant='transparent'],\n a[data-variant='success'],\n a[data-variant='shadeSmall'],\n a[data-variant='error'] {\n padding: 7px var(--wui-spacing-s) 7px 10px;\n }\n\n a[data-variant='transparent']:has(wui-text:first-child),\n a[data-variant='success']:has(wui-text:first-child),\n a[data-variant='shadeSmall']:has(wui-text:first-child),\n a[data-variant='error']:has(wui-text:first-child) {\n padding: 7px var(--wui-spacing-s);\n }\n\n a[data-variant='fill'],\n a[data-variant='shade'] {\n column-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n a[data-variant='fill']:has(wui-text:first-child),\n a[data-variant='shade']:has(wui-text:first-child) {\n padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);\n }\n\n a[data-variant='fill'] > wui-image,\n a[data-variant='shade'] > wui-image {\n width: 24px;\n height: 24px;\n }\n\n a[data-variant='fill'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);\n }\n\n a[data-variant='shade'] > wui-image,\n a[data-variant='shadeSmall'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n a[data-variant='fill'] > wui-icon,\n a[data-variant='shade'] > wui-icon {\n width: 14px;\n height: 14px;\n }\n\n a[data-variant='transparent'] > wui-image,\n a[data-variant='success'] > wui-image,\n a[data-variant='shadeSmall'] > wui-image,\n a[data-variant='error'] > wui-image {\n width: 14px;\n height: 14px;\n }\n\n a[data-variant='transparent'] > wui-icon,\n a[data-variant='success'] > wui-icon,\n a[data-variant='shadeSmall'] > wui-icon,\n a[data-variant='error'] > wui-icon {\n width: 12px;\n height: 12px;\n }\n\n a[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n a[data-variant='shade']:focus-visible,\n a[data-variant='shadeSmall']:focus-visible {\n background-color: var(--wui-gray-glass-015);\n }\n\n a[data-variant='transparent']:focus-visible {\n background-color: var(--wui-gray-glass-005);\n }\n\n a[data-variant='success']:focus-visible {\n background-color: var(--wui-success-glass-015);\n }\n\n a[data-variant='error']:focus-visible {\n background-color: var(--wui-error-glass-015);\n }\n\n a.disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n pointer-events: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n a[data-variant='fill']:hover {\n background-color: var(--wui-color-accent-090);\n }\n\n a[data-variant='shade']:hover,\n a[data-variant='shadeSmall']:hover {\n background-color: var(--wui-gray-glass-015);\n }\n\n a[data-variant='transparent']:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n a[data-variant='success']:hover {\n background-color: var(--wui-success-glass-015);\n }\n\n a[data-variant='error']:hover {\n background-color: var(--wui-error-glass-015);\n }\n }\n\n a[data-variant='fill']:active {\n background-color: var(--wui-color-accent-080);\n }\n\n a[data-variant='shade']:active,\n a[data-variant='shadeSmall']:active {\n background-color: var(--wui-gray-glass-020);\n }\n\n a[data-variant='transparent']:active {\n background-color: var(--wui-gray-glass-010);\n }\n\n a[data-variant='success']:active {\n background-color: var(--wui-success-glass-020);\n }\n\n a[data-variant='error']:active {\n background-color: var(--wui-error-glass-020);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiChip = class WuiChip extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'fill';\n this.imageSrc = undefined;\n this.disabled = false;\n this.icon = 'externalLink';\n this.href = '';\n this.text = undefined;\n }\n render() {\n const isSmall = this.variant === 'success' || this.variant === 'transparent' || this.variant === 'shadeSmall';\n const textVariant = isSmall ? 'small-600' : 'paragraph-600';\n return html `\n \n ${this.imageTemplate()}\n \n ${this.title ? this.title : UiHelperUtil.getHostName(this.href)}\n \n \n \n `;\n }\n imageTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiChip.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiChip.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiChip.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"href\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"text\", void 0);\nWuiChip = __decorate([\n customElement('wui-chip')\n], WuiChip);\nexport { WuiChip };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: block;\n }\n\n button {\n background: var(--wui-color-accent-100);\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-m);\n gap: var(--wui-spacing-xs);\n }\n\n button.loading {\n background: var(--wui-gray-glass-010);\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-color-accent-090);\n }\n\n button:active:enabled {\n background-color: var(--wui-color-accent-080);\n }\n }\n\n button:focus-visible {\n border: 1px solid var(--wui-gray-glass-010);\n background-color: var(--wui-color-accent-090);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n button[data-size='sm'] {\n padding: 6.75px 10px 7.25px;\n }\n\n ::slotted(*) {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n button > wui-text {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n color: var(--wui-color-inverse-100);\n }\n\n button[data-size='md'] {\n padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l);\n }\n\n button[data-size='md'] + wui-text {\n padding-left: var(--wui-spacing-3xs);\n }\n\n @media (max-width: 500px) {\n button[data-size='md'] {\n height: 32px;\n padding: 5px 12px;\n }\n\n button[data-size='md'] > wui-text > slot {\n font-size: 14px !important;\n }\n }\n\n wui-loading-spinner {\n width: 14px;\n height: 14px;\n }\n\n wui-loading-spinner::slotted(svg) {\n width: 10px !important;\n height: 10px !important;\n }\n\n button[data-size='sm'] > wui-loading-spinner {\n width: 12px;\n height: 12px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiConnectButton = class WuiConnectButton extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.loading = false;\n }\n render() {\n const textVariant = this.size === 'md' ? 'paragraph-600' : 'small-600';\n return html `\n \n `;\n }\n loadingTemplate() {\n if (!this.loading) {\n return null;\n }\n return html ``;\n }\n};\nWuiConnectButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiConnectButton.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiConnectButton.prototype, \"loading\", void 0);\nWuiConnectButton = __decorate([\n customElement('wui-connect-button')\n], WuiConnectButton);\nexport { WuiConnectButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../composites/wui-button/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCtaButton = class WuiCtaButton extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.label = '';\n this.buttonLabel = '';\n }\n render() {\n return html `\n \n ${this.label}\n \n ${this.buttonLabel}\n \n \n
      \n `;\n }\n};\nWuiCtaButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiCtaButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiCtaButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiCtaButton.prototype, \"buttonLabel\", void 0);\nWuiCtaButton = __decorate([\n customElement('wui-cta-button')\n], WuiCtaButton);\nexport { WuiCtaButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: var(--wui-spacing-l) var(--wui-spacing-m);\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiDetailsGroup = class WuiDetailsGroup extends LitElement {\n render() {\n return html `\n \n \n \n `;\n }\n};\nWuiDetailsGroup.styles = [resetStyles, elementStyles, styles];\nWuiDetailsGroup = __decorate([\n customElement('wui-details-group')\n], WuiDetailsGroup);\nexport { WuiDetailsGroup };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: row;\n gap: var(--wui-spacing-l);\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiDetailsGroupItem = class WuiDetailsGroupItem extends LitElement {\n constructor() {\n super(...arguments);\n this.name = '';\n }\n render() {\n return html `\n \n ${this.name}\n \n \n \n \n `;\n }\n};\nWuiDetailsGroupItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiDetailsGroupItem.prototype, \"name\", void 0);\nWuiDetailsGroupItem = __decorate([\n customElement('wui-details-group-item')\n], WuiDetailsGroupItem);\nexport { WuiDetailsGroupItem };\n//# sourceMappingURL=index.js.map","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,d=o=>o?._$litDirective$,f=o=>void 0===o.strings,s=()=>document.createComment(\"\"),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,h=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},j=o=>{o._$AR()};export{n as TemplateResultType,j as clearPart,p as getCommittedValue,d as getDirectiveClass,r as insertPart,l as isCompiledTemplateResult,c as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,h as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective,t as Directive,e as PartType};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as t}from\"../lit-html.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new h;class h{}const o=new WeakMap,n=s(class extends i{render(i){return t}update(i,[s]){const e=s!==this.Y;return e&&void 0!==this.Y&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),t}rt(t){if(\"function\"==typeof this.Y){const i=this.ht??globalThis;let s=o.get(i);void 0===s&&(s=new WeakMap,o.set(i,s)),void 0!==s.get(this.Y)&&this.Y.call(this.ht,void 0),s.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return\"function\"==typeof this.Y?o.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n width: 100%;\n display: inline-block;\n color: var(--wui-color-fg-275);\n }\n\n input {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-gray-glass-005);\n background: var(--wui-gray-glass-005);\n font-size: var(--wui-font-size-paragraph);\n font-weight: var(--wui-font-weight-light);\n letter-spacing: var(--wui-letter-spacing-paragraph);\n color: var(--wui-color-fg-100);\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, border-color, box-shadow;\n caret-color: var(--wui-color-accent-100);\n }\n\n input:disabled {\n cursor: not-allowed;\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n input:disabled::placeholder,\n input:disabled + wui-icon {\n color: var(--wui-color-fg-300);\n }\n\n input::placeholder {\n color: var(--wui-color-fg-275);\n }\n\n input:focus:enabled {\n background-color: var(--wui-gray-glass-010);\n border: 1px solid var(--wui-color-accent-100);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n input:hover:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n wui-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n }\n\n .wui-size-sm {\n padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);\n }\n\n wui-icon + .wui-size-sm {\n padding: 9px var(--wui-spacing-m) 10px 36px;\n }\n\n wui-icon[data-input='sm'] {\n left: var(--wui-spacing-s);\n }\n\n .wui-size-md {\n padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);\n }\n\n wui-icon + .wui-size-md,\n wui-loading-spinner + .wui-size-md {\n padding: 10.5px var(--wui-spacing-3xl) 10.5px 40px;\n }\n\n wui-icon[data-input='md'] {\n left: var(--wui-spacing-l);\n }\n\n .wui-size-lg {\n padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);\n letter-spacing: var(--wui-letter-spacing-medium-title);\n font-size: var(--wui-font-size-medium-title);\n font-weight: var(--wui-font-weight-light);\n line-height: 130%;\n color: var(--wui-color-fg-100);\n height: 64px;\n }\n\n wui-icon + .wui-size-lg,\n wui-loading-spinner + .wui-size-lg {\n padding-left: 50px;\n }\n\n wui-icon[data-input='lg'] {\n left: var(--wui-spacing-l);\n }\n\n input:placeholder-shown ~ ::slotted(wui-input-element),\n input:placeholder-shown ~ ::slotted(wui-icon) {\n opacity: 0;\n pointer-events: none;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n ::slotted(wui-input-element),\n ::slotted(wui-icon) {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n ::slotted(wui-input-element) {\n right: var(--wui-spacing-m);\n }\n\n ::slotted(wui-icon) {\n right: 0px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputText = class WuiInputText extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.size = 'md';\n this.disabled = false;\n this.placeholder = '';\n this.type = 'text';\n this.value = '';\n }\n render() {\n const sizeClass = `wui-size-${this.size}`;\n return html ` ${this.templateIcon()}\n \n `;\n }\n templateIcon() {\n if (this.icon) {\n return html ``;\n }\n return null;\n }\n dispatchInputChangeEvent() {\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: this.inputElementRef.value?.value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiInputText.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiInputText.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"icon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiInputText.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"placeholder\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"keyHint\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"value\", void 0);\nWuiInputText = __decorate([\n customElement('wui-input-text')\n], WuiInputText);\nexport { WuiInputText };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n wui-text {\n margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-text/index.js';\nimport styles from './styles.js';\nlet WuiEmailInput = class WuiEmailInput extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n }\n render() {\n return html `\n \n ${this.templateError()}\n `;\n }\n templateError() {\n if (this.errorMessage) {\n return html `${this.errorMessage}`;\n }\n return null;\n }\n};\nWuiEmailInput.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiEmailInput.prototype, \"errorMessage\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiEmailInput.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiEmailInput.prototype, \"value\", void 0);\nWuiEmailInput = __decorate([\n customElement('wui-email-input')\n], WuiEmailInput);\nexport { WuiEmailInput };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n border-radius: var(--local-border-radius);\n color: var(--wui-color-fg-100);\n padding: var(--local-padding);\n }\n\n @media (max-width: 700px) {\n button {\n padding: var(--wui-spacing-s);\n }\n }\n\n button > wui-icon {\n pointer-events: none;\n }\n\n button:disabled > wui-icon {\n color: var(--wui-color-bg-300) !important;\n }\n\n button:disabled {\n background-color: transparent;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { colorStyles, elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiIconLink = class WuiIconLink extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.disabled = false;\n this.icon = 'copy';\n this.iconColor = 'inherit';\n }\n render() {\n const borderRadius = this.size === 'lg' ? '--wui-border-radius-xs' : '--wui-border-radius-xxs';\n const padding = this.size === 'lg' ? '--wui-spacing-1xs' : '--wui-spacing-2xs';\n this.style.cssText = `\n --local-border-radius: var(${borderRadius});\n --local-padding: var(${padding});\n`;\n return html `\n \n `;\n }\n};\nWuiIconLink.styles = [resetStyles, elementStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiIconLink.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiIconLink.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiIconLink.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiIconLink.prototype, \"iconColor\", void 0);\nWuiIconLink = __decorate([\n customElement('wui-icon-link')\n], WuiIconLink);\nexport { WuiIconLink };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n background-color: var(--wui-color-fg-300);\n border-radius: var(--wui-border-radius-4xs);\n width: 16px;\n height: 16px;\n }\n\n button:disabled {\n background-color: var(--wui-color-bg-300);\n }\n\n wui-icon {\n color: var(--wui-color-bg-200) !important;\n }\n\n button:focus-visible {\n background-color: var(--wui-color-fg-250);\n border: 1px solid var(--wui-color-accent-100);\n }\n\n button:active:enabled {\n background-color: var(--wui-color-fg-225);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-color-fg-250);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputElement = class WuiInputElement extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'copy';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiInputElement.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiInputElement.prototype, \"icon\", void 0);\nWuiInputElement = __decorate([\n customElement('wui-input-element')\n], WuiInputElement);\nexport { WuiInputElement };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n input {\n width: 50px;\n height: 50px;\n background: var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-gray-glass-005);\n font-family: var(--wui-font-family);\n font-size: var(--wui-font-size-large);\n font-weight: var(--wui-font-weight-regular);\n letter-spacing: var(--wui-letter-spacing-large);\n text-align: center;\n color: var(--wui-color-fg-100);\n caret-color: var(--wui-color-accent-100);\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, border-color, box-shadow;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n input:disabled {\n cursor: not-allowed;\n border: 1px solid var(--wui-gray-glass-010);\n background: var(--wui-gray-glass-005);\n }\n\n input:focus:enabled {\n background-color: var(--wui-gray-glass-015);\n border: 1px solid var(--wui-color-accent-100);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n @media (hover: hover) and (pointer: fine) {\n input:hover:enabled {\n background-color: var(--wui-gray-glass-015);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputNumeric = class WuiInputNumeric extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.value = '';\n }\n render() {\n return html ` `;\n }\n};\nWuiInputNumeric.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiInputNumeric.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputNumeric.prototype, \"value\", void 0);\nWuiInputNumeric = __decorate([\n customElement('wui-input-numeric')\n], WuiInputNumeric);\nexport { WuiInputNumeric };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);\n border-radius: var(--wui-border-radius-3xs);\n background-color: transparent;\n color: var(--wui-color-accent-100);\n }\n\n button:disabled {\n background-color: transparent;\n color: var(--wui-gray-glass-015);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLink = class WuiLink extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiLink.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiLink.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiLink.prototype, \"color\", void 0);\nWuiLink = __decorate([\n customElement('wui-link')\n], WuiLink);\nexport { WuiLink };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 11px 18px 11px var(--wui-spacing-s);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n transition:\n color var(--wui-ease-out-power-1) var(--wui-duration-md),\n background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: color, background-color;\n }\n\n button[data-iconvariant='square'],\n button[data-iconvariant='square-blue'] {\n padding: 6px 18px 6px 9px;\n }\n\n button > wui-flex {\n flex: 1;\n }\n\n button > wui-image {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n button > wui-icon {\n width: 36px;\n height: 36px;\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n }\n\n button > wui-icon-box[data-variant='blue'] {\n box-shadow: 0 0 0 2px var(--wui-accent-glass-005);\n }\n\n button > wui-icon-box[data-variant='overlay'] {\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n button > wui-icon-box[data-variant='square-blue'] {\n border-radius: var(--wui-border-radius-3xs);\n position: relative;\n border: none;\n width: 36px;\n height: 36px;\n }\n\n button > wui-icon-box[data-variant='square-blue']::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-accent-glass-010);\n pointer-events: none;\n }\n\n button > wui-icon:last-child {\n width: 14px;\n height: 14px;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button[data-loading='true'] > wui-icon {\n opacity: 0;\n }\n\n wui-loading-spinner {\n position: absolute;\n right: 18px;\n top: 50%;\n transform: translateY(-50%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiListItem = class WuiListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'icon';\n this.disabled = false;\n this.imageSrc = undefined;\n this.alt = undefined;\n this.chevron = false;\n this.loading = false;\n }\n render() {\n return html `\n \n ${this.loadingTemplate()} ${this.visualTemplate()}\n \n \n \n ${this.chevronTemplate()}\n \n `;\n }\n visualTemplate() {\n if (this.variant === 'image' && this.imageSrc) {\n return html ``;\n }\n if (this.iconVariant === 'square' && this.icon && this.variant === 'icon') {\n return html ``;\n }\n if (this.variant === 'icon' && this.icon && this.iconVariant) {\n const color = ['blue', 'square-blue'].includes(this.iconVariant) ? 'accent-100' : 'fg-200';\n const size = this.iconVariant === 'square-blue' ? 'mdl' : 'md';\n const iconSize = this.iconSize ? this.iconSize : size;\n return html `\n \n `;\n }\n return null;\n }\n loadingTemplate() {\n if (this.loading) {\n return html ``;\n }\n return html ``;\n }\n chevronTemplate() {\n if (this.chevron) {\n return html ``;\n }\n return null;\n }\n};\nWuiListItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListItem.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"iconSize\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"iconVariant\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"chevron\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"loading\", void 0);\nWuiListItem = __decorate([\n customElement('wui-list-item')\n], WuiListItem);\nexport { WuiListItem };\n//# sourceMappingURL=index.js.map","export var TransactionTypePastTense;\n(function (TransactionTypePastTense) {\n TransactionTypePastTense[\"approve\"] = \"approved\";\n TransactionTypePastTense[\"bought\"] = \"bought\";\n TransactionTypePastTense[\"borrow\"] = \"borrowed\";\n TransactionTypePastTense[\"burn\"] = \"burnt\";\n TransactionTypePastTense[\"cancel\"] = \"canceled\";\n TransactionTypePastTense[\"claim\"] = \"claimed\";\n TransactionTypePastTense[\"deploy\"] = \"deployed\";\n TransactionTypePastTense[\"deposit\"] = \"deposited\";\n TransactionTypePastTense[\"execute\"] = \"executed\";\n TransactionTypePastTense[\"mint\"] = \"minted\";\n TransactionTypePastTense[\"receive\"] = \"received\";\n TransactionTypePastTense[\"repay\"] = \"repaid\";\n TransactionTypePastTense[\"send\"] = \"sent\";\n TransactionTypePastTense[\"sell\"] = \"sold\";\n TransactionTypePastTense[\"stake\"] = \"staked\";\n TransactionTypePastTense[\"trade\"] = \"swapped\";\n TransactionTypePastTense[\"unstake\"] = \"unstaked\";\n TransactionTypePastTense[\"withdraw\"] = \"withdrawn\";\n})(TransactionTypePastTense || (TransactionTypePastTense = {}));\n//# sourceMappingURL=TypeUtil.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 40px;\n height: 40px;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background-color: var(--wui-gray-glass-005);\n }\n\n :host > wui-flex wui-image {\n display: block;\n }\n\n :host > wui-flex,\n :host > wui-flex wui-image,\n .swap-images-container,\n .swap-images-container.nft,\n wui-image.nft {\n border-top-left-radius: var(--local-left-border-radius);\n border-top-right-radius: var(--local-right-border-radius);\n border-bottom-left-radius: var(--local-left-border-radius);\n border-bottom-right-radius: var(--local-right-border-radius);\n }\n\n wui-icon {\n width: 20px;\n height: 20px;\n }\n\n wui-icon-box {\n position: absolute;\n right: 0;\n bottom: 0;\n transform: translate(20%, 20%);\n }\n\n .swap-images-container {\n position: relative;\n width: 40px;\n height: 40px;\n overflow: hidden;\n }\n\n .swap-images-container wui-image:first-child {\n position: absolute;\n width: 40px;\n height: 40px;\n top: 0;\n left: 0%;\n clip-path: inset(0px calc(50% + 2px) 0px 0%);\n }\n\n .swap-images-container wui-image:last-child {\n clip-path: inset(0px 0px 0px calc(50% + 2px));\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../../components/wui-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiTransactionVisual = class WuiTransactionVisual extends LitElement {\n constructor() {\n super(...arguments);\n this.images = [];\n this.secondImage = {\n type: undefined,\n url: ''\n };\n }\n render() {\n const [firstImage, secondImage] = this.images;\n const isLeftNFT = firstImage?.type === 'NFT';\n const isRightNFT = secondImage?.url ? secondImage.type === 'NFT' : isLeftNFT;\n const leftRadius = isLeftNFT ? 'var(--wui-border-radius-xxs)' : 'var(--wui-border-radius-s)';\n const rightRadius = isRightNFT ? 'var(--wui-border-radius-xxs)' : 'var(--wui-border-radius-s)';\n this.style.cssText = `\n --local-left-border-radius: ${leftRadius};\n --local-right-border-radius: ${rightRadius};\n `;\n return html ` ${this.templateVisual()} ${this.templateIcon()} `;\n }\n templateVisual() {\n const [firstImage, secondImage] = this.images;\n const firstImageType = firstImage?.type;\n const haveTwoImages = this.images.length === 2;\n if (haveTwoImages && (firstImage?.url || secondImage?.url)) {\n return html `
      \n ${firstImage?.url\n ? html ``\n : null}\n ${secondImage?.url\n ? html ``\n : null}\n
      `;\n }\n else if (firstImage?.url) {\n return html ``;\n }\n else if (firstImageType === 'NFT') {\n return html ``;\n }\n return html ``;\n }\n templateIcon() {\n let color = 'accent-100';\n let icon = undefined;\n icon = this.getIcon();\n if (this.status) {\n color = this.getStatusColor();\n }\n if (!icon) {\n return null;\n }\n return html `\n \n `;\n }\n getDirectionIcon() {\n switch (this.direction) {\n case 'in':\n return 'arrowBottom';\n case 'out':\n return 'arrowTop';\n default:\n return undefined;\n }\n }\n getIcon() {\n if (this.onlyDirectionIcon) {\n return this.getDirectionIcon();\n }\n if (this.type === 'trade') {\n return 'swapHorizontalBold';\n }\n else if (this.type === 'approve') {\n return 'checkmark';\n }\n else if (this.type === 'cancel') {\n return 'close';\n }\n return this.getDirectionIcon();\n }\n getStatusColor() {\n switch (this.status) {\n case 'confirmed':\n return 'success-100';\n case 'failed':\n return 'error-100';\n case 'pending':\n return 'inverse-100';\n default:\n return 'accent-100';\n }\n }\n};\nWuiTransactionVisual.styles = [styles];\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"status\", void 0);\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"direction\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTransactionVisual.prototype, \"onlyDirectionIcon\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionVisual.prototype, \"images\", void 0);\n__decorate([\n property({ type: Object })\n], WuiTransactionVisual.prototype, \"secondImage\", void 0);\nWuiTransactionVisual = __decorate([\n customElement('wui-transaction-visual')\n], WuiTransactionVisual);\nexport { WuiTransactionVisual };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n align-items: center;\n column-gap: var(--wui-spacing-s);\n padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);\n width: 100%;\n }\n\n :host > wui-flex:first-child wui-text:nth-child(1) {\n text-transform: capitalize;\n }\n\n wui-transaction-visual {\n width: 40px;\n height: 40px;\n }\n\n wui-flex {\n flex: 1;\n }\n\n :host wui-flex wui-flex {\n overflow: hidden;\n }\n\n :host .description-container wui-text span {\n word-break: break-all;\n }\n\n :host .description-container wui-text {\n overflow: hidden;\n }\n\n :host .description-separator-icon {\n margin: 0px 6px;\n }\n\n :host wui-text > span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { TransactionTypePastTense } from '../../utils/TypeUtil.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-transaction-visual/index.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet WuiTransactionListItem = class WuiTransactionListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.type = 'approve';\n this.onlyDirectionIcon = false;\n this.images = [];\n this.price = [];\n this.amount = [];\n this.symbol = [];\n }\n render() {\n return html `\n \n \n \n \n ${TransactionTypePastTense[this.type] || this.type}\n \n \n ${this.templateDescription()} ${this.templateSecondDescription()}\n \n \n ${this.date}\n \n `;\n }\n templateDescription() {\n const description = this.descriptions?.[0];\n return description\n ? html `\n \n ${description}\n \n `\n : null;\n }\n templateSecondDescription() {\n const description = this.descriptions?.[1];\n return description\n ? html `\n \n \n ${description}\n \n `\n : null;\n }\n};\nWuiTransactionListItem.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"type\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"descriptions\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"date\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTransactionListItem.prototype, \"onlyDirectionIcon\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"status\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"direction\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"images\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"price\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"amount\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"symbol\", void 0);\nWuiTransactionListItem = __decorate([\n customElement('wui-transaction-list-item')\n], WuiTransactionListItem);\nexport { WuiTransactionListItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n }\n\n wui-flex {\n display: flex;\n flex: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-transaction-visual/index.js';\nimport styles from './styles.js';\nlet WuiTransactionListItemLoader = class WuiTransactionListItemLoader extends LitElement {\n render() {\n return html `\n \n \n \n \n \n \n \n \n `;\n }\n};\nWuiTransactionListItemLoader.styles = [resetStyles, styles];\nWuiTransactionListItemLoader = __decorate([\n customElement('wui-transaction-list-item-loader')\n], WuiTransactionListItemLoader);\nexport { WuiTransactionListItemLoader };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--wui-spacing-m);\n padding: 0 var(--wui-spacing-3xs) !important;\n border-radius: var(--wui-border-radius-5xs);\n }\n\n :host > wui-text {\n transform: translateY(5%);\n }\n\n :host([data-variant='main']) {\n background-color: var(--wui-accent-glass-015);\n color: var(--wui-color-accent-100);\n }\n\n :host([data-variant='shade']) {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n :host([data-variant='success']) {\n background-color: var(--wui-icon-box-bg-success-100);\n color: var(--wui-color-success-100);\n }\n\n :host([data-variant='error']) {\n background-color: var(--wui-icon-box-bg-error-100);\n color: var(--wui-color-error-100);\n }\n\n :host([data-size='lg']) {\n padding: 9px 5px !important;\n }\n\n :host([data-size='lg']) > wui-text {\n transform: translateY(2%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTag = class WuiTag extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'main';\n this.size = 'lg';\n }\n render() {\n this.dataset['variant'] = this.variant;\n this.dataset['size'] = this.size;\n const textVariant = this.size === 'md' ? 'mini-700' : 'micro-700';\n return html `\n \n \n \n `;\n }\n};\nWuiTag.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiTag.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiTag.prototype, \"size\", void 0);\nWuiTag = __decorate([\n customElement('wui-tag')\n], WuiTag);\nexport { WuiTag };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-100);\n }\n\n button > wui-text:nth-child(2) {\n display: flex;\n flex: 1;\n }\n\n wui-icon {\n color: var(--wui-color-fg-200) !important;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-tag {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../composites/wui-icon-box/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-all-wallets-image/index.js';\nimport '../wui-tag/index.js';\nimport '../wui-wallet-image/index.js';\nimport styles from './styles.js';\nlet WuiListWallet = class WuiListWallet extends LitElement {\n constructor() {\n super(...arguments);\n this.walletImages = [];\n this.imageSrc = '';\n this.name = '';\n this.installed = false;\n this.disabled = false;\n this.showAllWallets = false;\n }\n render() {\n return html `\n \n `;\n }\n templateAllWallets() {\n if (this.showAllWallets && this.imageSrc) {\n return html ` `;\n }\n else if (this.showAllWallets && this.walletIcon) {\n return html ` `;\n }\n return null;\n }\n templateWalletImage() {\n if (!this.showAllWallets && this.imageSrc) {\n return html ``;\n }\n else if (!this.showAllWallets && !this.imageSrc) {\n return html ``;\n }\n return null;\n }\n templateStatus() {\n if (this.tagLabel && this.tagVariant) {\n return html `${this.tagLabel}`;\n }\n else if (this.icon) {\n return html ``;\n }\n return null;\n }\n};\nWuiListWallet.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiListWallet.prototype, \"walletImages\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"tagLabel\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"tagVariant\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"walletIcon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"installed\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"showAllWallets\", void 0);\nWuiListWallet = __decorate([\n customElement('wui-list-wallet')\n], WuiListWallet);\nexport { WuiListWallet };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-010);\n overflow: hidden;\n }\n\n wui-icon {\n width: 100%;\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLogo = class WuiLogo extends LitElement {\n constructor() {\n super(...arguments);\n this.logo = 'google';\n }\n render() {\n return html ` `;\n }\n};\nWuiLogo.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiLogo.prototype, \"logo\", void 0);\nWuiLogo = __decorate([\n customElement('wui-logo')\n], WuiLogo);\nexport { WuiLogo };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n width: 50px;\n height: 50px;\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-logo/index.js';\nimport styles from './styles.js';\nlet WuiLogoSelect = class WuiLogoSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.logo = 'google';\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiLogoSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiLogoSelect.prototype, \"logo\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiLogoSelect.prototype, \"disabled\", void 0);\nWuiLogoSelect = __decorate([\n customElement('wui-logo-select')\n], WuiLogoSelect);\nexport { WuiLogoSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n display: flex;\n gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs)\n var(--wui-spacing-xs);\n border: 1px solid var(--wui-gray-glass-010);\n background-color: var(--wui-gray-glass-005);\n color: var(--wui-color-fg-100);\n }\n\n button:disabled {\n border: 1px solid var(--wui-gray-glass-005);\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-015);\n }\n }\n\n wui-image,\n wui-icon-box {\n border-radius: var(--wui-border-radius-3xl);\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiNetworkButton = class WuiNetworkButton extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.isUnsupportedChain = undefined;\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n visualTemplate() {\n if (this.isUnsupportedChain) {\n return html `\n \n `;\n }\n if (this.imageSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiNetworkButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiNetworkButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkButton.prototype, \"isUnsupportedChain\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkButton.prototype, \"disabled\", void 0);\nWuiNetworkButton = __decorate([\n customElement('wui-network-button')\n], WuiNetworkButton);\nexport { WuiNetworkButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: block;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport '../../layout/wui-flex/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-numeric/index.js';\nimport { WuiInputNumeric } from '../wui-input-numeric/index.js';\nimport styles from './styles.js';\nlet WuiOtp = class WuiOtp extends LitElement {\n constructor() {\n super(...arguments);\n this.length = 6;\n this.otp = '';\n this.values = Array.from({ length: this.length }).map(() => '');\n this.numerics = [];\n this.shouldInputBeEnabled = (index) => {\n const previousInputs = this.values.slice(0, index);\n return previousInputs.every(input => input !== '');\n };\n this.handleKeyDown = (e, index) => {\n const inputElement = e.target;\n const input = this.getInputElement(inputElement);\n const keyArr = ['ArrowLeft', 'ArrowRight', 'Shift', 'Delete'];\n if (!input) {\n return;\n }\n if (keyArr.includes(e.key)) {\n e.preventDefault();\n }\n const currentCaretPos = input.selectionStart;\n switch (e.key) {\n case 'ArrowLeft':\n if (currentCaretPos) {\n input.setSelectionRange(currentCaretPos + 1, currentCaretPos + 1);\n }\n this.focusInputField('prev', index);\n break;\n case 'ArrowRight':\n this.focusInputField('next', index);\n break;\n case 'Shift':\n this.focusInputField('next', index);\n break;\n case 'Delete':\n if (input.value === '') {\n this.focusInputField('prev', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n break;\n case 'Backspace':\n if (input.value === '') {\n this.focusInputField('prev', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n break;\n default:\n }\n };\n this.focusInputField = (dir, index) => {\n if (dir === 'next') {\n const nextIndex = index + 1;\n if (!this.shouldInputBeEnabled(nextIndex)) {\n return;\n }\n const numeric = this.numerics[nextIndex < this.length ? nextIndex : index];\n const input = numeric ? this.getInputElement(numeric) : undefined;\n if (input) {\n input.disabled = false;\n input.focus();\n }\n }\n if (dir === 'prev') {\n const nextIndex = index - 1;\n const numeric = this.numerics[nextIndex > -1 ? nextIndex : index];\n const input = numeric ? this.getInputElement(numeric) : undefined;\n if (input) {\n input.focus();\n }\n }\n };\n }\n firstUpdated() {\n if (this.otp) {\n this.values = this.otp.split('');\n }\n const numericElements = this.shadowRoot?.querySelectorAll('wui-input-numeric');\n if (numericElements) {\n this.numerics = Array.from(numericElements);\n }\n this.numerics[0]?.focus();\n }\n render() {\n return html `\n \n ${Array.from({ length: this.length }).map((_, index) => html `\n this.handleInput(e, index)}\n @click=${(e) => this.selectInput(e)}\n @keydown=${(e) => this.handleKeyDown(e, index)}\n .disabled=${!this.shouldInputBeEnabled(index)}\n .value=${this.values[index] || ''}\n >\n \n `)}\n \n `;\n }\n updateInput(element, index, value) {\n const numeric = this.numerics[index];\n const input = element || (numeric ? this.getInputElement(numeric) : undefined);\n if (input) {\n input.value = value;\n this.values = this.values.map((val, i) => (i === index ? value : val));\n }\n }\n selectInput(e) {\n const targetElement = e.target;\n if (targetElement) {\n const inputElement = this.getInputElement(targetElement);\n inputElement?.select();\n }\n }\n handleInput(e, index) {\n const inputElement = e.target;\n const input = this.getInputElement(inputElement);\n if (input) {\n const inputValue = input.value;\n if (e.inputType === 'insertFromPaste') {\n this.handlePaste(input, inputValue, index);\n }\n else {\n const isValid = UiHelperUtil.isNumber(inputValue);\n if (isValid && e.data) {\n this.updateInput(input, index, e.data);\n this.focusInputField('next', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n }\n }\n this.dispatchInputChangeEvent();\n }\n handlePaste(input, inputValue, index) {\n const value = inputValue[0];\n const isValid = value && UiHelperUtil.isNumber(value);\n if (isValid) {\n this.updateInput(input, index, value);\n const inputString = inputValue.substring(1);\n if (index + 1 < this.length && inputString.length) {\n const nextNumeric = this.numerics[index + 1];\n const nextInput = nextNumeric ? this.getInputElement(nextNumeric) : undefined;\n if (nextInput) {\n this.handlePaste(nextInput, inputString, index + 1);\n }\n }\n else {\n this.focusInputField('next', index);\n }\n }\n else {\n this.updateInput(input, index, '');\n }\n }\n getInputElement(el) {\n if (el.shadowRoot?.querySelector('input')) {\n return el.shadowRoot.querySelector('input');\n }\n return null;\n }\n dispatchInputChangeEvent() {\n const value = this.values.join('');\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiOtp.styles = [resetStyles, styles];\n__decorate([\n property({ type: Number })\n], WuiOtp.prototype, \"length\", void 0);\n__decorate([\n property({ type: String })\n], WuiOtp.prototype, \"otp\", void 0);\n__decorate([\n state()\n], WuiOtp.prototype, \"values\", void 0);\nWuiOtp = __decorate([\n customElement('wui-otp')\n], WuiOtp);\nexport { WuiOtp };\n//# sourceMappingURL=index.js.map","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","'use strict'\n\nmodule.exports = function encodeUtf8 (input) {\n var result = []\n var size = input.length\n\n for (var index = 0; index < size; index++) {\n var point = input.charCodeAt(index)\n\n if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {\n var second = input.charCodeAt(index + 1)\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000\n index += 1\n }\n }\n\n // US-ASCII\n if (point < 0x80) {\n result.push(point)\n continue\n }\n\n // 2-byte UTF-8\n if (point < 0x800) {\n result.push((point >> 6) | 192)\n result.push((point & 63) | 128)\n continue\n }\n\n // 3-byte UTF-8\n if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {\n result.push((point >> 12) | 224)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // 4-byte UTF-8\n if (point >= 0x10000 && point <= 0x10FFFF) {\n result.push((point >> 18) | 240)\n result.push(((point >> 12) & 63) | 128)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // Invalid character\n result.push(0xEF, 0xBF, 0xBD)\n }\n\n return new Uint8Array(result).buffer\n}\n","const encodeUtf8 = require('encode-utf8')\nconst Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n data = encodeUtf8(data)\n }\n this.data = new Uint8Array(data)\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : ''\n\n const path =\n ''\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '' + bg + path + '\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","import { svg } from 'lit';\nimport QRCodeUtil from 'qrcode';\nconst CONNECTING_ERROR_MARGIN = 0.1;\nconst CIRCLE_SIZE_MODIFIER = 2.5;\nconst QRCODE_MATRIX_MARGIN = 7;\nfunction isAdjecentDots(cy, otherCy, cellSize) {\n if (cy === otherCy) {\n return false;\n }\n const diff = cy - otherCy < 0 ? otherCy - cy : cy - otherCy;\n return diff <= cellSize + CONNECTING_ERROR_MARGIN;\n}\nfunction getMatrix(value, errorCorrectionLevel) {\n const arr = Array.prototype.slice.call(QRCodeUtil.create(value, { errorCorrectionLevel }).modules.data, 0);\n const sqrt = Math.sqrt(arr.length);\n return arr.reduce((rows, key, index) => (index % sqrt === 0 ? rows.push([key]) : rows[rows.length - 1].push(key)) && rows, []);\n}\nexport const QrCodeUtil = {\n generate(uri, size, logoSize) {\n const dotColor = '#141414';\n const edgeColor = 'transparent';\n const strokeWidth = 5;\n const dots = [];\n const matrix = getMatrix(uri, 'Q');\n const cellSize = size / matrix.length;\n const qrList = [\n { x: 0, y: 0 },\n { x: 1, y: 0 },\n { x: 0, y: 1 }\n ];\n qrList.forEach(({ x, y }) => {\n const x1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * x;\n const y1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * y;\n const borderRadius = 0.45;\n for (let i = 0; i < qrList.length; i += 1) {\n const dotSize = cellSize * (QRCODE_MATRIX_MARGIN - i * 2);\n dots.push(svg `\n \n `);\n }\n });\n const clearArenaSize = Math.floor((logoSize + 25) / cellSize);\n const matrixMiddleStart = matrix.length / 2 - clearArenaSize / 2;\n const matrixMiddleEnd = matrix.length / 2 + clearArenaSize / 2 - 1;\n const circles = [];\n matrix.forEach((row, i) => {\n row.forEach((_, j) => {\n if (matrix[i][j]) {\n if (!((i < QRCODE_MATRIX_MARGIN && j < QRCODE_MATRIX_MARGIN) ||\n (i > matrix.length - (QRCODE_MATRIX_MARGIN + 1) && j < QRCODE_MATRIX_MARGIN) ||\n (i < QRCODE_MATRIX_MARGIN && j > matrix.length - (QRCODE_MATRIX_MARGIN + 1)))) {\n if (!(i > matrixMiddleStart &&\n i < matrixMiddleEnd &&\n j > matrixMiddleStart &&\n j < matrixMiddleEnd)) {\n const cx = i * cellSize + cellSize / 2;\n const cy = j * cellSize + cellSize / 2;\n circles.push([cx, cy]);\n }\n }\n }\n });\n });\n const circlesToConnect = {};\n circles.forEach(([cx, cy]) => {\n if (circlesToConnect[cx]) {\n circlesToConnect[cx]?.push(cy);\n }\n else {\n circlesToConnect[cx] = [cy];\n }\n });\n Object.entries(circlesToConnect)\n .map(([cx, cys]) => {\n const newCys = cys.filter(cy => cys.every(otherCy => !isAdjecentDots(cy, otherCy, cellSize)));\n return [Number(cx), newCys];\n })\n .forEach(([cx, cys]) => {\n cys.forEach(cy => {\n dots.push(svg ``);\n });\n });\n Object.entries(circlesToConnect)\n .filter(([_, cys]) => cys.length > 1)\n .map(([cx, cys]) => {\n const newCys = cys.filter(cy => cys.some(otherCy => isAdjecentDots(cy, otherCy, cellSize)));\n return [Number(cx), newCys];\n })\n .map(([cx, cys]) => {\n cys.sort((a, b) => (a < b ? -1 : 1));\n const groups = [];\n for (const cy of cys) {\n const group = groups.find(item => item.some(otherCy => isAdjecentDots(cy, otherCy, cellSize)));\n if (group) {\n group.push(cy);\n }\n else {\n groups.push([cy]);\n }\n }\n return [cx, groups.map(item => [item[0], item[item.length - 1]])];\n })\n .forEach(([cx, groups]) => {\n groups.forEach(([y1, y2]) => {\n dots.push(svg `\n \n `);\n });\n });\n return dots;\n }\n};\n//# sourceMappingURL=QrCode.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n user-select: none;\n display: block;\n overflow: hidden;\n aspect-ratio: 1 / 1;\n width: var(--local-size);\n }\n\n :host([data-theme='dark']) {\n border-radius: clamp(0px, var(--wui-border-radius-l), 40px);\n background-color: var(--wui-color-inverse-100);\n padding: var(--wui-spacing-l);\n }\n\n :host([data-theme='light']) {\n box-shadow: 0 0 0 1px var(--wui-color-bg-125);\n background-color: var(--wui-color-bg-125);\n }\n\n :host([data-clear='true']) > wui-icon {\n display: none;\n }\n\n svg:first-child,\n wui-image,\n wui-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateY(-50%) translateX(-50%);\n }\n\n wui-image {\n width: 25%;\n height: 25%;\n border-radius: var(--wui-border-radius-xs);\n }\n\n wui-icon {\n width: 100%;\n height: 100%;\n color: #3396ff !important;\n transform: translateY(-50%) translateX(-50%) scale(0.25);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement, svg } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { QrCodeUtil } from '../../utils/QrCode.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiQrCode = class WuiQrCode extends LitElement {\n constructor() {\n super(...arguments);\n this.uri = '';\n this.size = 0;\n this.theme = 'dark';\n this.imageSrc = undefined;\n this.alt = undefined;\n this.arenaClear = undefined;\n }\n render() {\n this.dataset['theme'] = this.theme;\n this.dataset['clear'] = String(this.arenaClear);\n this.style.cssText = `--local-size: ${this.size}px`;\n return html `${this.templateVisual()} ${this.templateSvg()}`;\n }\n templateSvg() {\n const size = this.theme === 'light' ? this.size : this.size - 16 * 2;\n return svg `\n \n ${QrCodeUtil.generate(this.uri, size, this.arenaClear ? 0 : size / 4)}\n \n `;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiQrCode.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiQrCode.prototype, \"uri\", void 0);\n__decorate([\n property({ type: Number })\n], WuiQrCode.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"theme\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiQrCode.prototype, \"arenaClear\", void 0);\nWuiQrCode = __decorate([\n customElement('wui-qr-code')\n], WuiQrCode);\nexport { WuiQrCode };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport '../../composites/wui-input-element/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-text/index.js';\nimport styles from './styles.js';\nlet WuiSearchBar = class WuiSearchBar extends LitElement {\n constructor() {\n super(...arguments);\n this.inputComponentRef = createRef();\n }\n render() {\n return html `\n \n \n \n `;\n }\n clearValue() {\n const inputComponent = this.inputComponentRef.value;\n const inputElement = inputComponent?.inputElementRef.value;\n if (inputElement) {\n inputElement.value = '';\n inputElement.focus();\n inputElement.dispatchEvent(new Event('input'));\n }\n }\n};\nWuiSearchBar.styles = [resetStyles, styles];\nWuiSearchBar = __decorate([\n customElement('wui-search-bar')\n], WuiSearchBar);\nexport { WuiSearchBar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n column-gap: var(--wui-spacing-xs);\n align-items: center;\n padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-005);\n box-sizing: border-box;\n max-height: 40px;\n background-color: var(--wui-color-bg-175);\n box-shadow:\n 0px 14px 64px -4px rgba(0, 0, 0, 0.15),\n 0px 8px 22px -6px rgba(0, 0, 0, 0.15);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiSnackbar = class WuiSnackbar extends LitElement {\n constructor() {\n super(...arguments);\n this.backgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.icon = 'checkmark';\n this.message = '';\n }\n render() {\n return html `\n \n ${this.message}\n `;\n }\n};\nWuiSnackbar.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiSnackbar.prototype, \"backgroundColor\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"iconColor\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"message\", void 0);\nWuiSnackbar = __decorate([\n customElement('wui-snackbar')\n], WuiSnackbar);\nexport { WuiSnackbar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n padding: var(--wui-spacing-3xs);\n position: relative;\n height: 36px;\n overflow: hidden;\n }\n\n :host::before {\n content: '';\n position: absolute;\n pointer-events: none;\n top: 4px;\n left: 4px;\n display: block;\n width: var(--local-tab-width);\n height: 28px;\n border-radius: var(--wui-border-radius-3xl);\n background-color: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));\n transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color, opacity;\n }\n\n :host([data-type='flex'])::before {\n left: 3px;\n transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));\n }\n\n :host([data-type='flex']) {\n display: flex;\n padding: 0px 0px 0px 12px;\n gap: 4px;\n }\n\n :host([data-type='flex']) > button > wui-text {\n position: absolute;\n left: 18px;\n opacity: 0;\n }\n\n button[data-active='true'] > wui-icon,\n button[data-active='true'] > wui-text {\n color: var(--wui-color-fg-100);\n }\n\n button[data-active='false'] > wui-icon,\n button[data-active='false'] > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n button[data-active='true']:disabled,\n button[data-active='false']:disabled {\n background-color: transparent;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n button[data-active='true']:disabled > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n button[data-active='false']:disabled > wui-text {\n color: var(--wui-color-fg-300);\n }\n\n button > wui-icon,\n button > wui-text {\n pointer-events: none;\n transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);\n will-change: color;\n }\n\n button {\n width: var(--local-tab-width);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n :host([data-type='flex']) > button {\n width: 34px;\n position: relative;\n display: flex;\n justify-content: flex-start;\n }\n\n button:hover:enabled,\n button:active:enabled {\n background-color: transparent !important;\n }\n\n button:hover:enabled > wui-icon,\n button:active:enabled > wui-icon {\n color: var(--wui-color-fg-125);\n }\n\n button:hover:enabled > wui-text,\n button:active:enabled > wui-text {\n color: var(--wui-color-fg-125);\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-icon/index.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTabs = class WuiTabs extends LitElement {\n constructor() {\n super(...arguments);\n this.tabs = [];\n this.onTabChange = () => null;\n this.buttons = [];\n this.disabled = false;\n this.localTabWidth = '100px';\n this.activeTab = 0;\n this.isDense = false;\n }\n render() {\n this.isDense = this.tabs.length > 3;\n this.style.cssText = `\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `;\n this.dataset['type'] = this.isDense ? 'flex' : 'block';\n return this.tabs.map((tab, index) => {\n const isActive = index === this.activeTab;\n return html `\n this.onTabClick(index)}\n data-active=${isActive}\n data-testid=\"tab-${tab.label?.toLowerCase()}\"\n >\n ${this.iconTemplate(tab)}\n ${tab.label} \n \n `;\n });\n }\n firstUpdated() {\n if (this.shadowRoot && this.isDense) {\n this.buttons = [...this.shadowRoot.querySelectorAll('button')];\n setTimeout(() => {\n this.animateTabs(0, true);\n }, 0);\n }\n }\n iconTemplate(tab) {\n if (tab.icon) {\n return html ``;\n }\n return null;\n }\n onTabClick(index) {\n if (this.buttons) {\n this.animateTabs(index, false);\n }\n this.activeTab = index;\n this.onTabChange(index);\n }\n animateTabs(index, initialAnimation) {\n const passiveBtn = this.buttons[this.activeTab];\n const activeBtn = this.buttons[index];\n const passiveBtnText = passiveBtn?.querySelector('wui-text');\n const activeBtnText = activeBtn?.querySelector('wui-text');\n const activeBtnBounds = activeBtn?.getBoundingClientRect();\n const activeBtnTextBounds = activeBtnText?.getBoundingClientRect();\n if (passiveBtn && passiveBtnText && !initialAnimation && index !== this.activeTab) {\n passiveBtnText.animate([{ opacity: 0 }], {\n duration: 50,\n easing: 'ease',\n fill: 'forwards'\n });\n passiveBtn.animate([{ width: `34px` }], {\n duration: 500,\n easing: 'ease',\n fill: 'forwards'\n });\n }\n if (activeBtn && activeBtnBounds && activeBtnTextBounds && activeBtnText) {\n if (index !== this.activeTab || initialAnimation) {\n this.localTabWidth = `${Math.round(activeBtnBounds.width + activeBtnTextBounds.width) + 6}px`;\n activeBtn.animate([{ width: `${activeBtnBounds.width + activeBtnTextBounds.width}px` }], {\n duration: initialAnimation ? 0 : 500,\n fill: 'forwards',\n easing: 'ease'\n });\n activeBtnText.animate([{ opacity: 1 }], {\n duration: initialAnimation ? 0 : 125,\n delay: initialAnimation ? 0 : 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n }\n};\nWuiTabs.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiTabs.prototype, \"tabs\", void 0);\n__decorate([\n property()\n], WuiTabs.prototype, \"onTabChange\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTabs.prototype, \"buttons\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTabs.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiTabs.prototype, \"localTabWidth\", void 0);\n__decorate([\n state()\n], WuiTabs.prototype, \"activeTab\", void 0);\n__decorate([\n state()\n], WuiTabs.prototype, \"isDense\", void 0);\nWuiTabs = __decorate([\n customElement('wui-tabs')\n], WuiTabs);\nexport { WuiTabs };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n :host > button {\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-1xs);\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n background: var(--wui-gray-glass-002);\n border-width: 0px;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n }\n\n :host > button wui-image {\n width: 24px;\n height: 24px;\n border-radius: var(--wui-border-radius-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiTokenButton = class WuiTokenButton extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html `\n \n `;\n }\n tokenTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiTokenButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTokenButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiTokenButton.prototype, \"text\", void 0);\nWuiTokenButton = __decorate([\n customElement('wui-token-button')\n], WuiTokenButton);\nexport { WuiTokenButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n\n color: var(--wui-color-bg-100);\n position: relative;\n }\n\n :host([data-variant='shade']) {\n background-color: var(--wui-color-bg-150);\n border: 1px solid var(--wui-gray-glass-005);\n }\n\n :host([data-variant='shade']) > wui-text {\n color: var(--wui-color-fg-150);\n }\n\n :host([data-variant='fill']) {\n background-color: var(--wui-color-fg-100);\n border: none;\n }\n\n wui-icon {\n position: absolute;\n width: 12px !important;\n height: 4px !important;\n }\n\n wui-icon[data-placement='top'] {\n bottom: 0px;\n left: 50%;\n transform: translate(-50%, 95%);\n }\n\n wui-icon[data-placement='bottom'] {\n top: 0;\n left: 50%;\n transform: translate(-50%, -95%) rotate(180deg);\n }\n\n wui-icon[data-placement='right'] {\n top: 50%;\n left: 0;\n transform: translate(-65%, -50%) rotate(90deg);\n }\n\n wui-icon[data-placement='left'] {\n top: 50%;\n right: 0%;\n transform: translate(65%, -50%) rotate(270deg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTooltip = class WuiTooltip extends LitElement {\n constructor() {\n super(...arguments);\n this.placement = 'top';\n this.variant = 'fill';\n this.message = '';\n }\n render() {\n this.dataset['variant'] = this.variant;\n return html `\n ${this.message}`;\n }\n};\nWuiTooltip.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTooltip.prototype, \"placement\", void 0);\n__decorate([\n property()\n], WuiTooltip.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiTooltip.prototype, \"message\", void 0);\nWuiTooltip = __decorate([\n customElement('wui-tooltip')\n], WuiTooltip);\nexport { WuiTooltip };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n }\n\n button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n width: 100%;\n background-color: var(--wui-accent-glass-010);\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-accent-glass-010);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n wui-tooltip {\n padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s);\n position: absolute;\n top: -8px;\n left: 50%;\n transform: translate(-50%, -100%);\n opacity: 0;\n display: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-accent-glass-015);\n }\n\n button:active:enabled {\n background-color: var(--wui-accent-glass-020);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport '../wui-tooltip/index.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiTooltipSelect = class WuiTooltipSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n this.icon = 'card';\n }\n render() {\n return html `\n \n \n `;\n }\n onMouseEnter() {\n const element = this.shadowRoot?.querySelector('wui-tooltip');\n if (element) {\n element.style.display = 'flex';\n element?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease',\n duration: 250\n });\n }\n }\n onMouseLeave() {\n const element = this.shadowRoot?.querySelector('wui-tooltip');\n if (element) {\n element.style.display = 'none';\n element?.animate([{ opacity: 1 }, { opacity: 0 }], {\n fill: 'forwards',\n easing: 'ease',\n duration: 200\n });\n }\n }\n};\nWuiTooltipSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTooltipSelect.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiTooltipSelect.prototype, \"icon\", void 0);\nWuiTooltipSelect = __decorate([\n customElement('wui-tooltip-select')\n], WuiTooltipSelect);\nexport { WuiTooltipSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n cursor: pointer;\n display: flex;\n column-gap: var(--wui-spacing-s);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-l);\n width: 100%;\n background-color: transparent;\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n transition: background-color 0.2s linear;\n }\n\n :host > wui-flex:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n :host([disabled]) > wui-flex {\n opacity: 0.6;\n }\n\n :host([disabled]) > wui-flex:hover {\n background-color: transparent;\n }\n\n :host > wui-flex > wui-flex {\n flex: 1;\n }\n\n :host > wui-flex > wui-image {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n position: relative;\n }\n\n :host > wui-flex > wui-image::after {\n position: absolute;\n content: '';\n inset: 0;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-l);\n }\n\n button > wui-icon-box[data-variant='square-blue'] {\n border-radius: var(--wui-border-radius-3xs);\n position: relative;\n border: none;\n width: 36px;\n height: 36px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { NumberUtil } from '@web3modal/common';\nlet WuiTokenListItem = class WuiTokenListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.name = undefined;\n this.symbol = undefined;\n this.price = undefined;\n this.amount = undefined;\n }\n render() {\n const value = NumberUtil.multiply(this.price, this.amount)?.toFixed(3);\n return html `\n \n ${this.visualTemplate()}\n \n \n ${this.name}\n ${value\n ? html `\n \n $${UiHelperUtil.formatNumberToLocalString(value, 3)}\n \n `\n : null}\n \n \n ${this.symbol}\n ${this.amount &&\n html `${UiHelperUtil.formatNumberToLocalString(this.amount, 4)}`}\n \n \n \n `;\n }\n visualTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiTokenListItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"symbol\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"price\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"amount\", void 0);\nWuiTokenListItem = __decorate([\n customElement('wui-token-list-item')\n], WuiTokenListItem);\nexport { WuiTokenListItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--wui-icon-box-size-xl);\n height: var(--wui-icon-box-size-xl);\n box-shadow: 0 0 0 8px var(--wui-thumbnail-border);\n border-radius: var(--local-border-radius);\n overflow: hidden;\n }\n\n wui-icon {\n width: 32px;\n height: 32px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-icon/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiVisualThumbnail = class WuiVisualThumbnail extends LitElement {\n render() {\n this.style.cssText = `--local-border-radius: ${this.borderRadiusFull ? '1000px' : '20px'};`;\n return html `${this.templateVisual()}`;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiVisualThumbnail.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiVisualThumbnail.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiVisualThumbnail.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiVisualThumbnail.prototype, \"borderRadiusFull\", void 0);\nWuiVisualThumbnail = __decorate([\n customElement('wui-visual-thumbnail')\n], WuiVisualThumbnail);\nexport { WuiVisualThumbnail };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n width: 100%;\n display: block;\n padding-top: var(--wui-spacing-l);\n padding-bottom: var(--wui-spacing-l);\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-2l);\n border-radius: var(--wui-border-radius-s);\n background-color: var(--wui-accent-glass-015);\n }\n\n button:hover {\n background-color: var(--wui-accent-glass-010) !important;\n }\n\n button:active {\n background-color: var(--wui-accent-glass-020) !important;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport '../../layout/wui-flex/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../composites/wui-button/index.js';\nimport '../../composites/wui-icon-box/index.js';\nimport { resetStyles, elementStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nlet WuiNoticeCard = class WuiNoticeCard extends LitElement {\n constructor() {\n super(...arguments);\n this.label = '';\n this.description = '';\n this.icon = 'wallet';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiNoticeCard.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"description\", void 0);\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"icon\", void 0);\nWuiNoticeCard = __decorate([\n customElement('wui-notice-card')\n], WuiNoticeCard);\nexport { WuiNoticeCard };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n height: auto;\n position: relative;\n flex-direction: column;\n gap: var(--wui-spacing-s);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n .overflowedContent {\n width: 100%;\n overflow: hidden;\n }\n\n .overflowedContent[data-active='false']:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(to top, var(--wui-color-bg-200), transparent);\n border-bottom-left-radius: var(--wui-border-radius-xs);\n border-bottom-right-radius: var(--wui-border-radius-xs);\n }\n\n .heightContent {\n max-height: 100px;\n }\n\n pre {\n text-align: left;\n white-space: pre-wrap;\n height: auto;\n overflow-x: auto;\n overflow-wrap: anywhere;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nconst MAX_HEIGHT = 100;\nlet WuiListAccordion = class WuiListAccordion extends LitElement {\n constructor() {\n super(...arguments);\n this.textTitle = '';\n this.overflowedContent = '';\n this.toggled = false;\n this.enableAccordion = false;\n this.scrollElement = undefined;\n this.scrollHeightElement = 0;\n }\n updated(changedProperties) {\n super.updated(changedProperties);\n if (changedProperties.has('textTitle') || changedProperties.has('overflowedContent')) {\n setTimeout(() => {\n this.checkHeight();\n }, 1);\n }\n }\n checkHeight() {\n this.updateComplete.then(() => {\n const heightElement = this.shadowRoot?.querySelector('.heightContent');\n const textElement = this.shadowRoot?.querySelector('.textContent');\n if (heightElement && textElement) {\n this.scrollElement = heightElement;\n const scrollHeight = textElement?.scrollHeight;\n if (scrollHeight && scrollHeight > MAX_HEIGHT) {\n this.enableAccordion = true;\n this.scrollHeightElement = scrollHeight;\n this.requestUpdate();\n }\n }\n });\n }\n render() {\n return html `\n
      \n \n `;\n }\n onClick() {\n const icon = this.shadowRoot?.querySelector('wui-icon');\n if (this.enableAccordion) {\n this.toggled = !this.toggled;\n this.requestUpdate();\n if (this.scrollElement) {\n this.scrollElement.animate([\n { maxHeight: this.toggled ? `${MAX_HEIGHT}px` : `${this.scrollHeightElement}px` },\n { maxHeight: this.toggled ? `${this.scrollHeightElement}px` : `${MAX_HEIGHT}px` }\n ], {\n duration: 300,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n if (icon) {\n icon.animate([\n { transform: this.toggled ? `rotate(0deg)` : `rotate(180deg)` },\n { transform: this.toggled ? `rotate(180deg)` : `rotate(0deg)` }\n ], {\n duration: 300,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n }\n chevronTemplate() {\n if (this.enableAccordion) {\n return html ` `;\n }\n return null;\n }\n};\nWuiListAccordion.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListAccordion.prototype, \"textTitle\", void 0);\n__decorate([\n property()\n], WuiListAccordion.prototype, \"overflowedContent\", void 0);\nWuiListAccordion = __decorate([\n customElement('wui-list-accordion')\n], WuiListAccordion);\nexport { WuiListAccordion };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n column-gap: var(--wui-spacing-s);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n wui-image {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-icon {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListContent = class WuiListContent extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.textTitle = '';\n this.textValue = undefined;\n }\n render() {\n return html `\n \n \n ${this.textTitle}\n \n ${this.templateContent()}\n \n `;\n }\n templateContent() {\n if (this.imageSrc) {\n return html ``;\n }\n else if (this.textValue) {\n return html ` ${this.textValue} `;\n }\n return html ``;\n }\n};\nWuiListContent.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListContent.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListContent.prototype, \"textTitle\", void 0);\n__decorate([\n property()\n], WuiListContent.prototype, \"textValue\", void 0);\nWuiListContent = __decorate([\n customElement('wui-list-content')\n], WuiListContent);\nexport { WuiListContent };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-100);\n }\n\n button > wui-text:nth-child(2) {\n display: flex;\n flex: 1;\n }\n\n button[data-transparent='true'] {\n pointer-events: none;\n background-color: transparent;\n }\n\n wui-icon {\n color: var(--wui-color-fg-200) !important;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-tag {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-network-image/index.js';\nimport styles from './styles.js';\nlet WuiListNetwork = class WuiListNetwork extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = '';\n this.name = '';\n this.disabled = false;\n this.transparent = false;\n }\n render() {\n return html `\n \n `;\n }\n templateNetworkImage() {\n if (this.imageSrc) {\n return html ``;\n }\n if (!this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiListNetwork.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListNetwork.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListNetwork.prototype, \"name\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListNetwork.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListNetwork.prototype, \"transparent\", void 0);\nWuiListNetwork = __decorate([\n customElement('wui-list-network')\n], WuiListNetwork);\nexport { WuiListNetwork };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: column;\n gap: var(--wui-spacing-l);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n wui-image {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-icon {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-chip/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListWalletTransaction = class WuiListWalletTransaction extends LitElement {\n constructor() {\n super(...arguments);\n this.amount = '';\n this.networkCurreny = '';\n this.networkImageUrl = '';\n this.receiverAddress = '';\n this.addressExplorerUrl = '';\n }\n render() {\n return html `\n \n Sending\n \n \n ${this.amount} ${this.networkCurreny}\n \n ${this.templateNetworkVisual()}\n \n \n \n To\n \n \n `;\n }\n templateNetworkVisual() {\n if (this.networkImageUrl) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiListWalletTransaction.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"amount\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"networkCurreny\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"networkImageUrl\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"receiverAddress\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"addressExplorerUrl\", void 0);\nWuiListWalletTransaction = __decorate([\n customElement('wui-list-wallet-transaction')\n], WuiListWalletTransaction);\nexport { WuiListWalletTransaction };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n :host > wui-flex {\n width: 100%;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xs);\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--wui-spacing-s);\n }\n\n :host > wui-flex:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n .purchase-image-container {\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: var(--wui-icon-box-size-lg);\n height: var(--wui-icon-box-size-lg);\n }\n\n .purchase-image-container wui-image {\n width: 100%;\n height: 100%;\n position: relative;\n border-radius: calc(var(--wui-icon-box-size-lg) / 2);\n }\n\n .purchase-image-container wui-image::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-icon-box-size-lg) / 2);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n .purchase-image-container wui-icon-box {\n position: absolute;\n right: 0;\n bottom: 0;\n transform: translate(20%, 20%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { ApiController } from '@web3modal/core';\nlet WuiOnRampActivityItem = class WuiOnRampActivityItem extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n this.label = 'Bought';\n this.purchaseValue = '';\n this.purchaseCurrency = '';\n this.date = '';\n this.completed = false;\n this.inProgress = false;\n this.failed = false;\n this.onClick = null;\n this.symbol = '';\n }\n firstUpdated() {\n if (!this.icon) {\n this.fetchTokenImage();\n }\n }\n render() {\n return html `\n \n ${this.imageTemplate()}\n \n \n ${this.statusIconTemplate()}\n ${this.label}\n \n \n + ${this.purchaseValue} ${this.purchaseCurrency}\n \n \n ${this.inProgress\n ? html ``\n : html `${this.date}`}\n \n `;\n }\n async fetchTokenImage() {\n await ApiController._fetchTokenImage(this.purchaseCurrency);\n }\n statusIconTemplate() {\n if (this.inProgress) {\n return null;\n }\n return this.completed ? this.boughtIconTemplate() : this.errorIconTemplate();\n }\n errorIconTemplate() {\n return html ``;\n }\n imageTemplate() {\n const icon = this.icon || `https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;\n return html `\n \n `;\n }\n boughtIconTemplate() {\n return html ``;\n }\n};\nWuiOnRampActivityItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"purchaseValue\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"purchaseCurrency\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"date\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"completed\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"inProgress\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"failed\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"onClick\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"symbol\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"icon\", void 0);\nWuiOnRampActivityItem = __decorate([\n customElement('wui-onramp-activity-item')\n], WuiOnRampActivityItem);\nexport { WuiOnRampActivityItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xs);\n background-color: var(--wui-gray-glass-002);\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--wui-spacing-s);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n button:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .provider-image {\n width: var(--wui-spacing-3xl);\n min-width: var(--wui-spacing-3xl);\n height: var(--wui-spacing-3xl);\n border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));\n position: relative;\n overflow: hidden;\n }\n\n .provider-image::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n .network-icon {\n width: var(--wui-spacing-m);\n height: var(--wui-spacing-m);\n border-radius: calc(var(--wui-spacing-m) / 2);\n overflow: hidden;\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-002),\n 0 0 0 3px var(--wui-color-modal-bg);\n transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: box-shadow;\n }\n\n button:hover .network-icon {\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-005),\n 0 0 0 3px var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { AssetUtil, NetworkController } from '@web3modal/core';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet WuiOnRampProviderItem = class WuiOnRampProviderItem extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n this.label = '';\n this.feeRange = '';\n this.loading = false;\n this.onClick = null;\n }\n render() {\n return html `\n \n `;\n }\n networksTemplate() {\n const networks = NetworkController.getRequestedCaipNetworks();\n const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5);\n return html `\n \n ${slicedNetworks?.map(network => html `\n \n \n \n `)}\n \n `;\n }\n};\nWuiOnRampProviderItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiOnRampProviderItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"feeRange\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampProviderItem.prototype, \"loading\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"onClick\", void 0);\nWuiOnRampProviderItem = __decorate([\n customElement('wui-onramp-provider-item')\n], WuiOnRampProviderItem);\nexport { WuiOnRampProviderItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n display: flex;\n gap: var(--wui-spacing-3xs);\n align-items: center;\n padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s);\n background-color: var(--wui-gray-glass-090);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-060);\n transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1);\n will-change: background-color;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-080);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-060);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiPromo = class WuiPromo extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html ``;\n }\n};\nWuiPromo.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiPromo.prototype, \"text\", void 0);\nWuiPromo = __decorate([\n customElement('wui-promo')\n], WuiPromo);\nexport { WuiPromo };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n span {\n font-weight: 500;\n font-size: 40px;\n color: var(--wui-color-fg-100);\n line-height: 130%; /* 52px */\n letter-spacing: -1.6px;\n text-align: center;\n }\n\n .pennies {\n color: var(--wui-color-fg-200);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiBalance = class WuiBalance extends LitElement {\n constructor() {\n super(...arguments);\n this.dollars = '0';\n this.pennies = '00';\n }\n render() {\n return html `$${this.dollars}.${this.pennies}`;\n }\n};\nWuiBalance.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiBalance.prototype, \"dollars\", void 0);\n__decorate([\n property()\n], WuiBalance.prototype, \"pennies\", void 0);\nWuiBalance = __decorate([\n customElement('wui-balance')\n], WuiBalance);\nexport { WuiBalance };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-002);\n padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs);\n position: relative;\n }\n\n wui-avatar {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 0;\n outline: 3px solid var(--wui-gray-glass-005);\n }\n\n wui-icon-box,\n wui-image {\n width: 16px;\n height: 16px;\n border-radius: var(--wui-border-radius-3xl);\n position: absolute;\n left: 26px;\n top: 24px;\n }\n\n wui-image {\n outline: 2px solid var(--wui-color-bg-125);\n }\n\n wui-icon-box {\n outline: 2px solid var(--wui-color-bg-200);\n background-color: var(--wui-color-bg-250);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport '../wui-avatar/index.js';\nimport '../wui-icon-box/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nlet WuiProfileButton = class WuiProfileButton extends LitElement {\n constructor() {\n super(...arguments);\n this.networkSrc = undefined;\n this.avatarSrc = undefined;\n this.isProfileName = false;\n this.address = '';\n this.icon = 'chevronBottom';\n }\n render() {\n return html ``;\n }\n networkImageTemplate() {\n if (this.networkSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiProfileButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiProfileButton.prototype, \"networkSrc\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"avatarSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiProfileButton.prototype, \"isProfileName\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"icon\", void 0);\nWuiProfileButton = __decorate([\n customElement('wui-profile-button')\n], WuiProfileButton);\nexport { WuiProfileButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-image {\n border-radius: var(--wui-border-radius-3xl);\n overflow: hidden;\n }\n\n button.disabled > wui-icon,\n button.disabled > wui-image {\n filter: grayscale(1);\n }\n\n button[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n button[data-variant='shade'],\n button[data-variant='shadeSmall'] {\n background-color: transparent;\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n button[data-variant='success'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-success-glass-010);\n background-color: var(--wui-success-glass-010);\n color: var(--wui-color-success-100);\n }\n\n button[data-variant='error'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-error-glass-010);\n background-color: var(--wui-error-glass-010);\n color: var(--wui-color-error-100);\n }\n\n button[data-variant='transparent'] {\n column-gap: var(--wui-spacing-xxs);\n background-color: transparent;\n color: var(--wui-color-fg-150);\n }\n\n button[data-variant='transparent'],\n button[data-variant='success'],\n button[data-variant='shadeSmall'],\n button[data-variant='error'] {\n padding: 7px var(--wui-spacing-s) 7px 8px;\n }\n\n button[data-variant='transparent']:has(wui-text:first-child),\n button[data-variant='success']:has(wui-text:first-child),\n button[data-variant='shadeSmall']:has(wui-text:first-child),\n button[data-variant='error']:has(wui-text:first-child) {\n padding: 7px var(--wui-spacing-s);\n }\n\n button[data-variant='fill'],\n button[data-variant='shade'] {\n column-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n button[data-variant='fill']:has(wui-text:first-child),\n button[data-variant='shade']:has(wui-text:first-child) {\n padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);\n }\n\n button[data-variant='fill'] > wui-image,\n button[data-variant='shade'] > wui-image {\n width: 24px;\n height: 24px;\n }\n\n button[data-variant='fill'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);\n }\n\n button[data-variant='shade'] > wui-image,\n button[data-variant='shadeSmall'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill'] > wui-icon,\n button[data-variant='shade'] > wui-icon {\n width: 14px;\n height: 14px;\n }\n\n button[data-variant='transparent'] > wui-image,\n button[data-variant='success'] > wui-image,\n button[data-variant='shadeSmall'] > wui-image,\n button[data-variant='error'] > wui-image {\n width: 14px;\n height: 14px;\n }\n\n button[data-variant='transparent'] > wui-icon,\n button[data-variant='success'] > wui-icon,\n button[data-variant='shadeSmall'] > wui-icon,\n button[data-variant='error'] > wui-icon {\n width: 12px;\n height: 12px;\n }\n\n button[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='shade']:focus-visible,\n button[data-variant='shadeSmall']:focus-visible {\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='transparent']:focus-visible {\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='success']:focus-visible {\n background-color: var(--wui-success-glass-015);\n }\n\n button[data-variant='error']:focus-visible {\n background-color: var(--wui-error-glass-015);\n }\n\n button.disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n pointer-events: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button[data-variant='fill']:hover {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='shade']:hover,\n button[data-variant='shadeSmall']:hover {\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='transparent']:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='success']:hover {\n background-color: var(--wui-success-glass-015);\n }\n\n button[data-variant='error']:hover {\n background-color: var(--wui-error-glass-015);\n }\n }\n\n button[data-variant='fill']:active {\n background-color: var(--wui-color-accent-080);\n }\n\n button[data-variant='shade']:active,\n button[data-variant='shadeSmall']:active {\n background-color: var(--wui-gray-glass-020);\n }\n\n button[data-variant='transparent']:active {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='success']:active {\n background-color: var(--wui-success-glass-020);\n }\n\n button[data-variant='error']:active {\n background-color: var(--wui-error-glass-020);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiChipButton = class WuiChipButton extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'fill';\n this.imageSrc = '';\n this.disabled = false;\n this.icon = 'externalLink';\n this.text = '';\n }\n render() {\n const isSmall = this.variant === 'success' || this.variant === 'transparent' || this.variant === 'shadeSmall';\n const textVariant = isSmall ? 'small-600' : 'paragraph-600';\n return html `\n \n `;\n }\n};\nWuiChipButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiChipButton.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiChipButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"text\", void 0);\nWuiChipButton = __decorate([\n customElement('wui-chip-button')\n], WuiChipButton);\nexport { WuiChipButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n display: flex;\n gap: var(--wui-spacing-xl);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n padding: var(--wui-spacing-m) var(--wui-spacing-s);\n }\n\n wui-text {\n width: 100%;\n }\n\n wui-flex {\n width: auto;\n }\n\n .network-icon {\n width: var(--wui-spacing-2l);\n height: var(--wui-spacing-2l);\n border-radius: calc(var(--wui-spacing-2l) / 2);\n overflow: hidden;\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-002),\n 0 0 0 3px var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCompatibleNetwork = class WuiCompatibleNetwork extends LitElement {\n constructor() {\n super(...arguments);\n this.networkImages = [''];\n this.text = '';\n }\n render() {\n return html `\n \n `;\n }\n networksTemplate() {\n const slicedNetworks = this.networkImages.slice(0, 5);\n return html ` \n ${slicedNetworks?.map(network => html ` `)}\n `;\n }\n};\nWuiCompatibleNetwork.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiCompatibleNetwork.prototype, \"networkImages\", void 0);\n__decorate([\n property()\n], WuiCompatibleNetwork.prototype, \"text\", void 0);\nWuiCompatibleNetwork = __decorate([\n customElement('wui-compatible-network')\n], WuiCompatibleNetwork);\nexport { WuiCompatibleNetwork };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n background-color: var(--wui-gray-glass-005);\n border-radius: var(--wui-border-radius-s);\n padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)\n var(--wui-spacing-1xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-icon-box/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiBanner = class WuiBanner extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'externalLink';\n this.text = '';\n }\n render() {\n return html `\n \n \n ${this.text}\n \n `;\n }\n};\nWuiBanner.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiBanner.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiBanner.prototype, \"text\", void 0);\nWuiBanner = __decorate([\n customElement('wui-banner')\n], WuiBanner);\nexport { WuiBanner };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);\n display: flex;\n justify-content: space-between;\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n background-color: var(--wui-gray-glass-002);\n }\n\n button[data-clickable='false'] {\n pointer-events: none;\n background-color: transparent;\n }\n\n wui-image {\n width: var(--wui-spacing-3xl);\n height: var(--wui-spacing-3xl);\n border-radius: var(--wui-border-radius-3xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nlet WuiListToken = class WuiListToken extends LitElement {\n constructor() {\n super(...arguments);\n this.tokenName = '';\n this.tokenImageUrl = '';\n this.tokenValue = 0.0;\n this.tokenAmount = '0.0';\n this.tokenCurrency = '';\n this.clickable = false;\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiListToken.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenName\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenImageUrl\", void 0);\n__decorate([\n property({ type: Number })\n], WuiListToken.prototype, \"tokenValue\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenAmount\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenCurrency\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListToken.prototype, \"clickable\", void 0);\nWuiListToken = __decorate([\n customElement('wui-list-token')\n], WuiListToken);\nexport { WuiListToken };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n width: 100%;\n display: flex;\n gap: var(--wui-spacing-s);\n align-items: center;\n justify-content: flex-start;\n padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s);\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n\n wui-icon-box {\n width: var(--wui-spacing-2xl);\n height: var(--wui-spacing-2xl);\n }\n\n wui-flex {\n width: auto;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListDescription = class WuiListDescription extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'card';\n this.text = '';\n this.description = '';\n this.tag = undefined;\n this.iconBackgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n titleTemplate() {\n if (this.tag) {\n return html ` ${this.text}${this.tag}\n `;\n }\n return html `${this.text}`;\n }\n};\nWuiListDescription.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListDescription.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"description\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"tag\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"iconBackgroundColor\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"iconColor\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListDescription.prototype, \"disabled\", void 0);\nWuiListDescription = __decorate([\n customElement('wui-list-description')\n], WuiListDescription);\nexport { WuiListDescription };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n input {\n background: transparent;\n width: 100%;\n height: auto;\n font-family: var(--wui-font-family);\n color: var(--wui-color-fg-100);\n\n font-feature-settings: 'case' on;\n font-size: 32px;\n font-weight: var(--wui-font-weight-light);\n caret-color: var(--wui-color-accent-100);\n line-height: 130%;\n letter-spacing: -1.28px;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input::placeholder {\n color: var(--wui-color-fg-275);\n }\n`;\n//# sourceMappingURL=styles.js.map","export const specialCharactersRegex = /[.*+?^${}()|[\\]\\\\]/gu;\nexport const numbersRegex = /[0-9,.]/u;\n//# sourceMappingURL=ConstantsUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { numbersRegex, specialCharactersRegex } from '../../utils/ConstantsUtil.js';\nlet WuiInputAmount = class WuiInputAmount extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.disabled = false;\n this.value = '';\n this.placeholder = '0';\n }\n render() {\n if (this.inputElementRef?.value && this.value) {\n this.inputElementRef.value.value = this.value;\n }\n return html ` `;\n }\n dispatchInputChangeEvent(e) {\n const inputChar = e.data;\n if (inputChar) {\n if (!numbersRegex.test(inputChar) && this.inputElementRef?.value) {\n this.inputElementRef.value.value = this.value.replace(new RegExp(inputChar.replace(specialCharactersRegex, '\\\\$&'), 'gu'), '');\n }\n }\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: this.inputElementRef.value?.value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiInputAmount.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiInputAmount.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputAmount.prototype, \"value\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputAmount.prototype, \"placeholder\", void 0);\nWuiInputAmount = __decorate([\n customElement('wui-input-amount')\n], WuiInputAmount);\nexport { WuiInputAmount };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n gap: var(--wui-spacing-xs);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-002);\n background: var(--wui-gray-glass-002);\n padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)\n var(--wui-spacing-s);\n align-items: center;\n }\n\n wui-avatar,\n wui-icon,\n wui-image {\n width: 32px;\n height: 32px;\n border: 1px solid var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n box-shadow: 0 0 0 2px var(--wui-gray-glass-002);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-icon/index.js';\nimport '../wui-avatar/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiPreviewItem = class WuiPreviewItem extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n this.address = '';\n this.isAddress = false;\n }\n render() {\n return html `${this.text}\n ${this.imageTemplate()}`;\n }\n imageTemplate() {\n if (this.isAddress) {\n return html ``;\n }\n else if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiPreviewItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiPreviewItem.prototype, \"isAddress\", void 0);\nWuiPreviewItem = __decorate([\n customElement('wui-preview-item')\n], WuiPreviewItem);\nexport { WuiPreviewItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: grid;\n width: inherit;\n height: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiGrid = class WuiGrid extends LitElement {\n render() {\n this.style.cssText = `\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap && `var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap && `var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap && `var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 0)};\n padding-right: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 1)};\n padding-bottom: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 2)};\n padding-left: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 3)};\n margin-top: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 0)};\n margin-right: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 1)};\n margin-bottom: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 2)};\n margin-left: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 3)};\n `;\n return html ``;\n }\n};\nWuiGrid.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiGrid.prototype, \"gridTemplateRows\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"gridTemplateColumns\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"justifyItems\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"alignItems\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"justifyContent\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"alignContent\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"columnGap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"rowGap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"gap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"padding\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"margin\", void 0);\nWuiGrid = __decorate([\n customElement('wui-grid')\n], WuiGrid);\nexport { WuiGrid };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: flex;\n width: 100%;\n height: 1px;\n background-color: var(--wui-gray-glass-005);\n justify-content: center;\n align-items: center;\n }\n\n :host > wui-text {\n position: absolute;\n padding: 0px 10px;\n background-color: var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiSeparator = class WuiSeparator extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html `${this.template()}`;\n }\n template() {\n if (this.text) {\n return html `${this.text}`;\n }\n return null;\n }\n};\nWuiSeparator.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiSeparator.prototype, \"text\", void 0);\nWuiSeparator = __decorate([\n customElement('wui-separator')\n], WuiSeparator);\nexport { WuiSeparator };\n//# sourceMappingURL=index.js.map","export const MathUtil = {\n interpolate(inputRange, outputRange, value) {\n if (inputRange.length !== 2 || outputRange.length !== 2) {\n throw new Error('inputRange and outputRange must be an array of length 2');\n }\n const originalRangeMin = inputRange[0] || 0;\n const originalRangeMax = inputRange[1] || 0;\n const newRangeMin = outputRange[0] || 0;\n const newRangeMax = outputRange[1] || 0;\n if (value < originalRangeMin) {\n return newRangeMin;\n }\n if (value > originalRangeMax) {\n return newRangeMax;\n }\n return (((newRangeMax - newRangeMin) / (originalRangeMax - originalRangeMin)) *\n (value - originalRangeMin) +\n newRangeMin);\n }\n};\n//# sourceMappingURL=MathUtil.js.map","import { DateUtil } from '@web3modal/common';\nimport { UiHelperUtil } from './UiHelperUtil.js';\nconst FLOAT_FIXED_VALUE = 3;\nconst plusTypes = ['receive', 'deposit', 'borrow', 'claim'];\nconst minusTypes = ['withdraw', 'repay', 'burn'];\nexport const TransactionUtil = {\n getMonthName(monthNumber) {\n const date = new Date();\n date.setMonth(monthNumber);\n return date.toLocaleString('en-US', {\n month: 'long'\n });\n },\n getTransactionGroupTitle(year, month) {\n const currentYear = DateUtil.getYear();\n const monthName = this.getMonthName(month);\n const isCurrentYear = year === currentYear;\n const groupTitle = isCurrentYear ? monthName : `${monthName} ${year}`;\n return groupTitle;\n },\n getTransactionImages(transfers) {\n const [transfer, secondTransfer] = transfers;\n const isAllNFT = Boolean(transfer) && transfers?.every(item => Boolean(item.nft_info));\n const haveMultipleTransfers = transfers?.length > 1;\n const haveTwoTransfers = transfers?.length === 2;\n if (haveTwoTransfers && !isAllNFT) {\n return [this.getTransactionImage(transfer), this.getTransactionImage(secondTransfer)];\n }\n if (haveMultipleTransfers) {\n return transfers.map(item => this.getTransactionImage(item));\n }\n return [this.getTransactionImage(transfer)];\n },\n getTransactionImage(transfer) {\n return {\n type: TransactionUtil.getTransactionTransferTokenType(transfer),\n url: TransactionUtil.getTransactionImageURL(transfer)\n };\n },\n getTransactionImageURL(transfer) {\n let imageURL = undefined;\n const isNFT = Boolean(transfer?.nft_info);\n const isFungible = Boolean(transfer?.fungible_info);\n if (transfer && isNFT) {\n imageURL = transfer?.nft_info?.content?.preview?.url;\n }\n else if (transfer && isFungible) {\n imageURL = transfer?.fungible_info?.icon?.url;\n }\n return imageURL;\n },\n getTransactionTransferTokenType(transfer) {\n if (transfer?.fungible_info) {\n return 'FUNGIBLE';\n }\n else if (transfer?.nft_info) {\n return 'NFT';\n }\n return undefined;\n },\n getTransactionDescriptions(transaction) {\n const type = transaction?.metadata?.operationType;\n const transfers = transaction?.transfers;\n const haveTransfer = transaction?.transfers?.length > 0;\n const haveMultipleTransfers = transaction?.transfers?.length > 1;\n const isFungible = haveTransfer && transfers?.every(transfer => Boolean(transfer?.fungible_info));\n const [firstTransfer, secondTransfer] = transfers;\n let firstDescription = this.getTransferDescription(firstTransfer);\n let secondDescription = this.getTransferDescription(secondTransfer);\n if (!haveTransfer) {\n const isSendOrReceive = type === 'send' || type === 'receive';\n if (isSendOrReceive && isFungible) {\n firstDescription = UiHelperUtil.getTruncateString({\n string: transaction?.metadata.sentFrom,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n });\n secondDescription = UiHelperUtil.getTruncateString({\n string: transaction?.metadata.sentTo,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n });\n return [firstDescription, secondDescription];\n }\n return [transaction.metadata.status];\n }\n if (haveMultipleTransfers) {\n return transfers.map(item => this.getTransferDescription(item));\n }\n let prefix = '';\n if (plusTypes.includes(type)) {\n prefix = '+';\n }\n else if (minusTypes.includes(type)) {\n prefix = '-';\n }\n firstDescription = prefix.concat(firstDescription);\n return [firstDescription];\n },\n getTransferDescription(transfer) {\n let description = '';\n if (!transfer) {\n return description;\n }\n if (transfer?.nft_info) {\n description = transfer?.nft_info?.name || '-';\n }\n else if (transfer?.fungible_info) {\n description = this.getFungibleTransferDescription(transfer) || '-';\n }\n return description;\n },\n getFungibleTransferDescription(transfer) {\n if (!transfer) {\n return null;\n }\n const quantity = this.getQuantityFixedValue(transfer?.quantity.numeric);\n const description = [quantity, transfer?.fungible_info?.symbol].join(' ').trim();\n return description;\n },\n getQuantityFixedValue(value) {\n if (!value) {\n return null;\n }\n const parsedValue = parseFloat(value);\n return parsedValue.toFixed(FLOAT_FIXED_VALUE);\n }\n};\n//# sourceMappingURL=TransactionUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, ModalController, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mAccountButton = class W3mAccountButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.balance = 'show';\n this.charsStart = 4;\n this.charsEnd = 6;\n this.address = AccountController.state.address;\n this.balanceVal = AccountController.state.balance;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.profileName = AccountController.state.profileName;\n this.profileImage = AccountController.state.profileImage;\n this.network = NetworkController.state.caipNetwork;\n this.isUnsupportedChain = NetworkController.state.isUnsupportedChain;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.isConnected) {\n this.address = val.address;\n this.balanceVal = val.balance;\n this.profileName = val.profileName;\n this.profileImage = val.profileImage;\n this.balanceSymbol = val.balanceSymbol;\n }\n else {\n this.address = '';\n this.balanceVal = '';\n this.profileName = '';\n this.profileImage = '';\n this.balanceSymbol = '';\n }\n }),\n NetworkController.subscribeKey('caipNetwork', val => (this.network = val)),\n NetworkController.subscribeKey('isUnsupportedChain', val => (this.isUnsupportedChain = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const networkImage = AssetUtil.getNetworkImage(this.network);\n const showBalance = this.balance === 'show';\n return html `\n \n \n `;\n }\n onClick() {\n if (this.isUnsupportedChain) {\n ModalController.open({ view: 'UnsupportedChain' });\n }\n else {\n ModalController.open();\n }\n }\n};\n__decorate([\n property({ type: Boolean })\n], W3mAccountButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"charsEnd\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"balanceVal\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"balanceSymbol\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"isUnsupportedChain\", void 0);\nW3mAccountButton = __decorate([\n customElement('w3m-account-button')\n], W3mAccountButton);\nexport { W3mAccountButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mButton = class W3mButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.balance = undefined;\n this.size = undefined;\n this.label = undefined;\n this.loadingLabel = undefined;\n this.charsStart = 4;\n this.charsEnd = 6;\n this.isAccount = AccountController.state.isConnected;\n this.unsubscribe.push(AccountController.subscribeKey('isConnected', val => {\n this.isAccount = val;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return this.isAccount\n ? html `\n \n \n `\n : html `\n \n `;\n }\n};\nW3mButton.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"size\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"loadingLabel\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"charsEnd\", void 0);\n__decorate([\n state()\n], W3mButton.prototype, \"isAccount\", void 0);\nW3mButton = __decorate([\n customElement('w3m-button')\n], W3mButton);\nexport { W3mButton };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ModalController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mConnectButton = class W3mConnectButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.size = 'md';\n this.label = 'Connect Wallet';\n this.loadingLabel = 'Connecting...';\n this.open = ModalController.state.open;\n this.loading = ModalController.state.loading;\n this.unsubscribe.push(ModalController.subscribe(val => {\n this.open = val.open;\n this.loading = val.loading;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const isLoading = this.loading || this.open;\n return html `\n \n ${isLoading ? this.loadingLabel : this.label}\n \n `;\n }\n onClick() {\n if (this.open) {\n ModalController.close();\n }\n else if (!this.loading) {\n ModalController.open();\n }\n }\n};\n__decorate([\n property()\n], W3mConnectButton.prototype, \"size\", void 0);\n__decorate([\n property()\n], W3mConnectButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], W3mConnectButton.prototype, \"loadingLabel\", void 0);\n__decorate([\n state()\n], W3mConnectButton.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mConnectButton.prototype, \"loading\", void 0);\nW3mConnectButton = __decorate([\n customElement('w3m-connect-button')\n], W3mConnectButton);\nexport { W3mConnectButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n z-index: var(--w3m-z-index);\n display: block;\n backface-visibility: hidden;\n will-change: opacity;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n opacity: 0;\n background-color: var(--wui-cover);\n }\n\n @keyframes zoom-in {\n 0% {\n transform: scale(0.95) translateY(0);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes slide-in {\n 0% {\n transform: scale(1) translateY(50px);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n wui-card {\n max-width: 360px;\n width: 100%;\n position: relative;\n animation-duration: 0.2s;\n animation-name: zoom-in;\n animation-fill-mode: backwards;\n animation-timing-function: var(--wui-ease-out-power-2);\n outline: none;\n }\n\n wui-flex {\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n @media (max-height: 700px) and (min-width: 431px) {\n wui-flex {\n align-items: flex-start;\n }\n\n wui-card {\n margin: var(--wui-spacing-xxl) 0px;\n }\n }\n\n @media (max-width: 430px) {\n wui-flex {\n align-items: flex-end;\n }\n\n wui-card {\n max-width: 100%;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: none;\n animation-name: slide-in;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ApiController, ConnectionController, EventsController, ModalController, OptionsController, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { UiHelperUtil, customElement, initializeTheming } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst SCROLL_LOCK = 'scroll-lock';\nlet W3mModal = class W3mModal extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.abortController = undefined;\n this.open = ModalController.state.open;\n this.caipAddress = AccountController.state.caipAddress;\n this.isSiweEnabled = OptionsController.state.isSiweEnabled;\n this.initializeTheming();\n ApiController.prefetch();\n this.unsubscribe.push(ModalController.subscribeKey('open', val => (val ? this.onOpen() : this.onClose())), AccountController.subscribe(newAccountState => this.onNewAccountState(newAccountState)));\n EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' });\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.onRemoveKeyboardListener();\n }\n render() {\n return this.open\n ? html `\n \n \n \n \n \n \n \n `\n : null;\n }\n async onOverlayClick(event) {\n if (event.target === event.currentTarget) {\n await this.handleClose();\n }\n }\n async handleClose() {\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (SIWEController.state.status !== 'success') {\n await ConnectionController.disconnect();\n }\n }\n ModalController.close();\n }\n initializeTheming() {\n const { themeVariables, themeMode } = ThemeController.state;\n const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);\n initializeTheming(themeVariables, defaultThemeMode);\n }\n async onClose() {\n this.onScrollUnlock();\n await this.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n SnackController.hide();\n this.open = false;\n this.onRemoveKeyboardListener();\n }\n async onOpen() {\n this.onScrollLock();\n this.open = true;\n await this.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n this.onAddKeyboardListener();\n }\n onScrollLock() {\n const styleTag = document.createElement('style');\n styleTag.dataset['w3m'] = SCROLL_LOCK;\n styleTag.textContent = `\n html, body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n `;\n document.head.appendChild(styleTag);\n }\n onScrollUnlock() {\n const styleTag = document.head.querySelector(`style[data-w3m=\"${SCROLL_LOCK}\"]`);\n if (styleTag) {\n styleTag.remove();\n }\n }\n onAddKeyboardListener() {\n this.abortController = new AbortController();\n const card = this.shadowRoot?.querySelector('wui-card');\n card?.focus();\n window.addEventListener('keydown', event => {\n if (event.key === 'Escape') {\n this.handleClose();\n }\n else if (event.key === 'Tab') {\n const { tagName } = event.target;\n if (tagName && !tagName.includes('W3M-') && !tagName.includes('WUI-')) {\n card?.focus();\n }\n }\n }, this.abortController);\n }\n onRemoveKeyboardListener() {\n this.abortController?.abort();\n this.abortController = undefined;\n }\n async onNewAccountState(newState) {\n const { isConnected, caipAddress: newCaipAddress } = newState;\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (isConnected && !this.caipAddress) {\n this.caipAddress = newCaipAddress;\n }\n if (isConnected && newCaipAddress && this.caipAddress !== newCaipAddress) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n this.caipAddress = newCaipAddress;\n }\n try {\n const session = await SIWEController.getSession();\n if (session && !isConnected) {\n await SIWEController.signOut();\n }\n else if (isConnected && !session) {\n this.onSiweNavigation();\n }\n }\n catch (error) {\n if (isConnected) {\n this.onSiweNavigation();\n }\n }\n }\n }\n onSiweNavigation() {\n if (this.open) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.open({\n view: 'ConnectingSiwe'\n });\n }\n }\n};\nW3mModal.styles = styles;\n__decorate([\n state()\n], W3mModal.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipAddress\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"isSiweEnabled\", void 0);\nW3mModal = __decorate([\n customElement('w3m-modal')\n], W3mModal);\nexport { W3mModal };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, EventsController, ModalController, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworkButton = class W3mNetworkButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.network = NetworkController.state.caipNetwork;\n this.connected = AccountController.state.isConnected;\n this.loading = ModalController.state.loading;\n this.isUnsupportedChain = NetworkController.state.isUnsupportedChain;\n this.unsubscribe.push(...[\n NetworkController.subscribeKey('caipNetwork', val => (this.network = val)),\n AccountController.subscribeKey('isConnected', val => (this.connected = val)),\n ModalController.subscribeKey('loading', val => (this.loading = val)),\n NetworkController.subscribeKey('isUnsupportedChain', val => (this.isUnsupportedChain = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.isUnsupportedChain\n ? 'Switch Network'\n : this.network?.name ?? (this.connected ? 'Unknown Network' : 'Select Network')}\n \n `;\n }\n onClick() {\n if (!this.loading) {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORKS' });\n ModalController.open({ view: 'Networks' });\n }\n }\n};\nW3mNetworkButton.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mNetworkButton.prototype, \"disabled\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"connected\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"isUnsupportedChain\", void 0);\nW3mNetworkButton = __decorate([\n customElement('w3m-network-button')\n], W3mNetworkButton);\nexport { W3mNetworkButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n will-change: transform, opacity;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nlet W3mRouter = class W3mRouter extends LitElement {\n constructor() {\n super();\n this.resizeObserver = undefined;\n this.prevHeight = '0px';\n this.prevHistoryLength = 1;\n this.unsubscribe = [];\n this.view = RouterController.state.view;\n this.unsubscribe.push(RouterController.subscribeKey('view', val => this.onViewChange(val)));\n }\n firstUpdated() {\n this.resizeObserver = new ResizeObserver(async ([content]) => {\n const height = `${content?.contentRect.height}px`;\n if (this.prevHeight !== '0px') {\n await this.animate([{ height: this.prevHeight }, { height }], {\n duration: 150,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n this.style.height = 'auto';\n }\n this.prevHeight = height;\n });\n this.resizeObserver.observe(this.getWrapper());\n }\n disconnectedCallback() {\n this.resizeObserver?.unobserve(this.getWrapper());\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `
      ${this.viewTemplate()}
      `;\n }\n viewTemplate() {\n switch (this.view) {\n case 'Connect':\n return html ``;\n case 'ConnectingWalletConnect':\n return html ``;\n case 'ConnectingExternal':\n return html ``;\n case 'ConnectingSiwe':\n return html ``;\n case 'AllWallets':\n return html ``;\n case 'Networks':\n return html ``;\n case 'SwitchNetwork':\n return html ``;\n case 'Account':\n return html ``;\n case 'AccountSettings':\n return html ``;\n case 'WhatIsAWallet':\n return html ``;\n case 'WhatIsANetwork':\n return html ``;\n case 'GetWallet':\n return html ``;\n case 'Downloads':\n return html ``;\n case 'EmailVerifyOtp':\n return html ``;\n case 'EmailVerifyDevice':\n return html ``;\n case 'ApproveTransaction':\n return html ``;\n case 'Transactions':\n return html ``;\n case 'UpgradeEmailWallet':\n return html ``;\n case 'UpgradeToSmartAccount':\n return html ``;\n case 'UpdateEmailWallet':\n return html ``;\n case 'UpdateEmailPrimaryOtp':\n return html ``;\n case 'UpdateEmailSecondaryOtp':\n return html ``;\n case 'UnsupportedChain':\n return html ``;\n case 'OnRampProviders':\n return html ``;\n case 'OnRampActivity':\n return html ``;\n case 'OnRampTokenSelect':\n return html ``;\n case 'OnRampFiatSelect':\n return html ``;\n case 'WhatIsABuy':\n return html ``;\n case 'BuyInProgress':\n return html ``;\n case 'WalletReceive':\n return html ``;\n case 'WalletCompatibleNetworks':\n return html ``;\n case 'Convert':\n return html ``;\n case 'ConvertSelectToken':\n return html ``;\n case 'ConvertPreview':\n return html ``;\n case 'WalletSend':\n return html ``;\n case 'WalletSendSelectToken':\n return html ``;\n case 'WalletSendPreview':\n return html ``;\n default:\n return html ``;\n }\n }\n async onViewChange(newView) {\n const { history } = RouterController.state;\n let xOut = -10;\n let xIn = 10;\n if (history.length < this.prevHistoryLength) {\n xOut = 10;\n xIn = -10;\n }\n this.prevHistoryLength = history.length;\n await this.animate([\n { opacity: 1, transform: 'translateX(0px)' },\n { opacity: 0, transform: `translateX(${xOut}px)` }\n ], { duration: 150, easing: 'ease', fill: 'forwards' }).finished;\n this.view = newView;\n await this.animate([\n { opacity: 0, transform: `translateX(${xIn}px)` },\n { opacity: 1, transform: 'translateX(0px)' }\n ], { duration: 150, easing: 'ease', fill: 'forwards', delay: 50 }).finished;\n }\n getWrapper() {\n return this.shadowRoot?.querySelector('div');\n }\n};\nW3mRouter.styles = styles;\n__decorate([\n state()\n], W3mRouter.prototype, \"view\", void 0);\nW3mRouter = __decorate([\n customElement('w3m-router')\n], W3mRouter);\nexport { W3mRouter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n width: 100%;\n max-width: 360px;\n }\n\n :host > wui-flex > wui-flex {\n border-radius: var(--wui-border-radius-l);\n width: 100%;\n }\n\n .amounts-container {\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ModalController, OnRampController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst PAYMENT_CURRENCY_SYMBOLS = {\n USD: '$',\n EUR: '€',\n GBP: '£'\n};\nconst BUY_PRESET_AMOUNTS = [100, 250, 500, 1000];\nlet W3mOnrampWidget = class W3mOnrampWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.connected = AccountController.state.isConnected;\n this.loading = ModalController.state.loading;\n this.paymentCurrency = OnRampController.state.paymentCurrency;\n this.paymentAmount = OnRampController.state.paymentAmount;\n this.purchaseAmount = OnRampController.state.purchaseAmount;\n this.quoteLoading = OnRampController.state.quotesLoading;\n this.unsubscribe.push(...[\n AccountController.subscribeKey('isConnected', val => {\n this.connected = val;\n }),\n ModalController.subscribeKey('loading', val => {\n this.loading = val;\n }),\n OnRampController.subscribe(val => {\n this.paymentCurrency = val.paymentCurrency;\n this.paymentAmount = val.paymentAmount;\n this.purchaseAmount = val.purchaseAmount;\n this.quoteLoading = val.quotesLoading;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n \n \n \n \n ${BUY_PRESET_AMOUNTS.map(amount => html ` this.selectPresetAmount(amount)}\n >${`${PAYMENT_CURRENCY_SYMBOLS[this.paymentCurrency?.id || 'USD']} ${amount}`}`)}\n \n ${this.templateButton()}\n \n \n `;\n }\n templateButton() {\n return this.connected\n ? html `\n Get quotes\n `\n : html `\n Connect wallet\n `;\n }\n getQuotes() {\n if (!this.loading) {\n ModalController.open({ view: 'OnRampProviders' });\n }\n }\n openModal() {\n ModalController.open({ view: 'Connect' });\n }\n async onPaymentAmountChange(event) {\n OnRampController.setPaymentAmount(Number(event.detail));\n await OnRampController.getQuote();\n }\n async selectPresetAmount(amount) {\n OnRampController.setPaymentAmount(amount);\n await OnRampController.getQuote();\n }\n};\nW3mOnrampWidget.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mOnrampWidget.prototype, \"disabled\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"connected\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"paymentCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"paymentAmount\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"purchaseAmount\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"quoteLoading\", void 0);\nW3mOnrampWidget = __decorate([\n customElement('w3m-onramp-widget')\n], W3mOnrampWidget);\nexport { W3mOnrampWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n wui-icon-link {\n margin-right: calc(var(--wui-icon-box-size-md) * -1);\n }\n\n .account-links {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .account-links wui-flex {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n background: red;\n align-items: center;\n justify-content: center;\n height: 48px;\n padding: 10px;\n flex: 1 0 0;\n\n border-radius: var(--XS, 16px);\n border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n .account-links wui-flex:hover {\n background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));\n }\n\n .account-links wui-flex wui-icon {\n width: var(--S, 20px);\n height: var(--S, 20px);\n }\n\n .account-links wui-flex wui-icon svg path {\n stroke: #47a1ff;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { Buffer } from 'buffer';\nif (typeof window !== 'undefined') {\n if (!window.Buffer) {\n window.Buffer = Buffer;\n }\n if (!window.global) {\n window.global = window;\n }\n if (!window.process) {\n window.process = {};\n }\n if (!window.process?.env) {\n window.process = { env: {} };\n }\n}\n//# sourceMappingURL=index.js.map","export const SECURE_SITE_SDK = process.env['NEXT_PUBLIC_SECURE_SITE_SDK_URL'] || 'https://secure.walletconnect.com/sdk';\nexport const W3mFrameConstants = {\n APP_EVENT_KEY: '@w3m-app/',\n FRAME_EVENT_KEY: '@w3m-frame/',\n RPC_METHOD_KEY: 'RPC_',\n STORAGE_KEY: '@w3m-storage/',\n SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',\n EMAIL_LOGIN_USED_KEY: 'EMAIL_LOGIN_USED_KEY',\n LAST_USED_CHAIN_KEY: 'LAST_USED_CHAIN_KEY',\n LAST_EMAIL_LOGIN_TIME: 'LAST_EMAIL_LOGIN_TIME',\n EMAIL: 'EMAIL',\n PREFERRED_ACCOUNT_TYPE: 'PREFERRED_ACCOUNT_TYPE',\n SMART_ACCOUNT_ENABLED: 'SMART_ACCOUNT_ENABLED',\n SMART_ACCOUNT_ENABLED_NETWORKS: 'SMART_ACCOUNT_ENABLED_NETWORKS',\n APP_SWITCH_NETWORK: '@w3m-app/SWITCH_NETWORK',\n APP_CONNECT_EMAIL: '@w3m-app/CONNECT_EMAIL',\n APP_CONNECT_DEVICE: '@w3m-app/CONNECT_DEVICE',\n APP_CONNECT_OTP: '@w3m-app/CONNECT_OTP',\n APP_GET_USER: '@w3m-app/GET_USER',\n APP_SIGN_OUT: '@w3m-app/SIGN_OUT',\n APP_IS_CONNECTED: '@w3m-app/IS_CONNECTED',\n APP_GET_CHAIN_ID: '@w3m-app/GET_CHAIN_ID',\n APP_RPC_REQUEST: '@w3m-app/RPC_REQUEST',\n APP_UPDATE_EMAIL: '@w3m-app/UPDATE_EMAIL',\n APP_UPDATE_EMAIL_PRIMARY_OTP: '@w3m-app/UPDATE_EMAIL_PRIMARY_OTP',\n APP_UPDATE_EMAIL_SECONDARY_OTP: '@w3m-app/UPDATE_EMAIL_SECONDARY_OTP',\n APP_AWAIT_UPDATE_EMAIL: '@w3m-app/AWAIT_UPDATE_EMAIL',\n APP_SYNC_THEME: '@w3m-app/SYNC_THEME',\n APP_SYNC_DAPP_DATA: '@w3m-app/SYNC_DAPP_DATA',\n APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS: '@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS',\n APP_INIT_SMART_ACCOUNT: '@w3m-app/INIT_SMART_ACCOUNT',\n APP_SET_PREFERRED_ACCOUNT: '@w3m-app/SET_PREFERRED_ACCOUNT',\n FRAME_SWITCH_NETWORK_ERROR: '@w3m-frame/SWITCH_NETWORK_ERROR',\n FRAME_SWITCH_NETWORK_SUCCESS: '@w3m-frame/SWITCH_NETWORK_SUCCESS',\n FRAME_CONNECT_EMAIL_ERROR: '@w3m-frame/CONNECT_EMAIL_ERROR',\n FRAME_CONNECT_EMAIL_SUCCESS: '@w3m-frame/CONNECT_EMAIL_SUCCESS',\n FRAME_CONNECT_DEVICE_ERROR: '@w3m-frame/CONNECT_DEVICE_ERROR',\n FRAME_CONNECT_DEVICE_SUCCESS: '@w3m-frame/CONNECT_DEVICE_SUCCESS',\n FRAME_CONNECT_OTP_SUCCESS: '@w3m-frame/CONNECT_OTP_SUCCESS',\n FRAME_CONNECT_OTP_ERROR: '@w3m-frame/CONNECT_OTP_ERROR',\n FRAME_GET_USER_SUCCESS: '@w3m-frame/GET_USER_SUCCESS',\n FRAME_GET_USER_ERROR: '@w3m-frame/GET_USER_ERROR',\n FRAME_SIGN_OUT_SUCCESS: '@w3m-frame/SIGN_OUT_SUCCESS',\n FRAME_SIGN_OUT_ERROR: '@w3m-frame/SIGN_OUT_ERROR',\n FRAME_IS_CONNECTED_SUCCESS: '@w3m-frame/IS_CONNECTED_SUCCESS',\n FRAME_IS_CONNECTED_ERROR: '@w3m-frame/IS_CONNECTED_ERROR',\n FRAME_GET_CHAIN_ID_SUCCESS: '@w3m-frame/GET_CHAIN_ID_SUCCESS',\n FRAME_GET_CHAIN_ID_ERROR: '@w3m-frame/GET_CHAIN_ID_ERROR',\n FRAME_RPC_REQUEST_SUCCESS: '@w3m-frame/RPC_REQUEST_SUCCESS',\n FRAME_RPC_REQUEST_ERROR: '@w3m-frame/RPC_REQUEST_ERROR',\n FRAME_SESSION_UPDATE: '@w3m-frame/SESSION_UPDATE',\n FRAME_UPDATE_EMAIL_SUCCESS: '@w3m-frame/UPDATE_EMAIL_SUCCESS',\n FRAME_UPDATE_EMAIL_ERROR: '@w3m-frame/UPDATE_EMAIL_ERROR',\n FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS: '@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS',\n FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR: '@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR',\n FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS: '@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS',\n FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR: '@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR',\n FRAME_SYNC_THEME_SUCCESS: '@w3m-frame/SYNC_THEME_SUCCESS',\n FRAME_SYNC_THEME_ERROR: '@w3m-frame/SYNC_THEME_ERROR',\n FRAME_SYNC_DAPP_DATA_SUCCESS: '@w3m-frame/SYNC_DAPP_DATA_SUCCESS',\n FRAME_SYNC_DAPP_DATA_ERROR: '@w3m-frame/SYNC_DAPP_DATA_ERROR',\n FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS: '@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS',\n FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR: '@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR',\n FRAME_INIT_SMART_ACCOUNT_SUCCESS: '@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS',\n FRAME_INIT_SMART_ACCOUNT_ERROR: '@w3m-frame/INIT_SMART_ACCOUNT_ERROR',\n FRAME_SET_PREFERRED_ACCOUNT_SUCCESS: '@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS',\n FRAME_SET_PREFERRED_ACCOUNT_ERROR: '@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR',\n RPC_RESPONSE_TYPE_ERROR: 'RPC_RESPONSE_ERROR',\n RPC_RESPONSE_TYPE_TX: 'RPC_RESPONSE_TRANSACTION_HASH',\n RPC_RESPONSE_TYPE_OBJECT: 'RPC_RESPONSE_OBJECT'\n};\nexport const W3mFrameRpcConstants = {\n SAFE_RPC_METHODS: [\n 'eth_accounts',\n 'eth_blockNumber',\n 'eth_call',\n 'eth_chainId',\n 'eth_estimateGas',\n 'eth_feeHistory',\n 'eth_gasPrice',\n 'eth_getAccount',\n 'eth_getBalance',\n 'eth_getBlockByHash',\n 'eth_getBlockByNumber',\n 'eth_getBlockReceipts',\n 'eth_getBlockTransactionCountByHash',\n 'eth_getBlockTransactionCountByNumber',\n 'eth_getCode',\n 'eth_getFilterChanges',\n 'eth_getFilterLogs',\n 'eth_getLogs',\n 'eth_getProof',\n 'eth_getStorageAt',\n 'eth_getTransactionByBlockHashAndIndex',\n 'eth_getTransactionByBlockNumberAndIndex',\n 'eth_getTransactionByHash',\n 'eth_getTransactionCount',\n 'eth_getTransactionReceipt',\n 'eth_getUncleCountByBlockHash',\n 'eth_getUncleCountByBlockNumber',\n 'eth_maxPriorityFeePerGas',\n 'eth_newBlockFilter',\n 'eth_newFilter',\n 'eth_newPendingTransactionFilter',\n 'eth_sendRawTransaction',\n 'eth_syncing',\n 'eth_uninstallFilter'\n ],\n NOT_SAFE_RPC_METHODS: ['personal_sign', 'eth_signTypedData_v4', 'eth_sendTransaction'],\n GET_CHAIN_ID: 'eth_chainId',\n RPC_METHOD_NOT_ALLOWED_MESSAGE: 'Requested RPC call is not allowed',\n RPC_METHOD_NOT_ALLOWED_UI_MESSAGE: 'Action not allowed',\n ACCOUNT_TYPES: {\n EOA: 'eoa',\n SMART_ACCOUNT: 'smartAccount'\n }\n};\n//# sourceMappingURL=W3mFrameConstants.js.map","import { z } from 'zod';\nimport { W3mFrameConstants } from './W3mFrameConstants.js';\nconst zError = z.object({ message: z.string() });\nfunction zType(key) {\n return z.literal(W3mFrameConstants[key]);\n}\nexport const GetTransactionByHashResponse = z.object({\n accessList: z.array(z.string()),\n blockHash: z.string().nullable(),\n blockNumber: z.string().nullable(),\n chainId: z.string(),\n from: z.string(),\n gas: z.string(),\n hash: z.string(),\n input: z.string().nullable(),\n maxFeePerGas: z.string(),\n maxPriorityFeePerGas: z.string(),\n nonce: z.string(),\n r: z.string(),\n s: z.string(),\n to: z.string(),\n transactionIndex: z.string().nullable(),\n type: z.string(),\n v: z.string(),\n value: z.string()\n});\nexport const AppSwitchNetworkRequest = z.object({ chainId: z.number() });\nexport const AppConnectEmailRequest = z.object({ email: z.string().email() });\nexport const AppConnectOtpRequest = z.object({ otp: z.string() });\nexport const AppGetUserRequest = z.object({\n chainId: z.optional(z.number()),\n preferredAccountType: z.optional(z.string())\n});\nexport const AppUpdateEmailRequest = z.object({ email: z.string().email() });\nexport const AppUpdateEmailPrimaryOtpRequest = z.object({ otp: z.string() });\nexport const AppUpdateEmailSecondaryOtpRequest = z.object({ otp: z.string() });\nexport const AppSyncThemeRequest = z.object({\n themeMode: z.optional(z.enum(['light', 'dark'])),\n themeVariables: z.optional(z.record(z.string(), z.string().or(z.number())))\n});\nexport const AppSyncDappDataRequest = z.object({\n metadata: z\n .object({\n name: z.string(),\n description: z.string(),\n url: z.string(),\n icons: z.array(z.string())\n })\n .optional(),\n sdkVersion: z.string(),\n projectId: z.string()\n});\nexport const AppSetPreferredAccountRequest = z.object({ type: z.string() });\nexport const FrameConnectEmailResponse = z.object({\n action: z.enum(['VERIFY_DEVICE', 'VERIFY_OTP'])\n});\nexport const FrameUpdateEmailResponse = z.object({\n action: z.enum(['VERIFY_PRIMARY_OTP', 'VERIFY_SECONDARY_OTP'])\n});\nexport const FrameGetUserResponse = z.object({\n email: z.string().email(),\n address: z.string(),\n chainId: z.number(),\n smartAccountDeployed: z.optional(z.boolean()),\n preferredAccountType: z.optional(z.string())\n});\nexport const FrameIsConnectedResponse = z.object({ isConnected: z.boolean() });\nexport const FrameGetChainIdResponse = z.object({ chainId: z.number() });\nexport const FrameSwitchNetworkResponse = z.object({ chainId: z.number() });\nexport const FrameUpdateEmailSecondaryOtpResolver = z.object({ newEmail: z.string().email() });\nexport const FrameGetSmartAccountEnabledNetworksResponse = z.object({\n smartAccountEnabledNetworks: z.array(z.number())\n});\nexport const FrameInitSmartAccountResponse = z.object({\n address: z.string(),\n isDeployed: z.boolean()\n});\nexport const FrameSetPreferredAccountResponse = z.object({ type: z.string(), address: z.string() });\nexport const RpcResponse = z.any();\nexport const RpcEthAccountsRequest = z.object({\n method: z.literal('eth_accounts')\n});\nexport const RpcEthBlockNumber = z.object({\n method: z.literal('eth_blockNumber')\n});\nexport const RpcEthCall = z.object({\n method: z.literal('eth_call'),\n params: z.array(z.any())\n});\nexport const RpcEthChainId = z.object({\n method: z.literal('eth_chainId')\n});\nexport const RpcEthEstimateGas = z.object({\n method: z.literal('eth_estimateGas'),\n params: z.array(z.any())\n});\nexport const RpcEthFeeHistory = z.object({\n method: z.literal('eth_feeHistory'),\n params: z.array(z.any())\n});\nexport const RpcEthGasPrice = z.object({\n method: z.literal('eth_gasPrice')\n});\nexport const RpcEthGetAccount = z.object({\n method: z.literal('eth_getAccount'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBalance = z.object({\n method: z.literal('eth_getBalance'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockyByHash = z.object({\n method: z.literal('eth_getBlockByHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockByNumber = z.object({\n method: z.literal('eth_getBlockByNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockReceipts = z.object({\n method: z.literal('eth_getBlockReceipts'),\n params: z.array(z.any())\n});\nexport const RcpEthGetBlockTransactionCountByHash = z.object({\n method: z.literal('eth_getBlockTransactionCountByHash'),\n params: z.array(z.any())\n});\nexport const RcpEthGetBlockTransactionCountByNumber = z.object({\n method: z.literal('eth_getBlockTransactionCountByNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthGetCode = z.object({\n method: z.literal('eth_getCode'),\n params: z.array(z.any())\n});\nexport const RpcEthGetFilter = z.object({\n method: z.literal('eth_getFilterChanges'),\n params: z.array(z.any())\n});\nexport const RpcEthGetFilterLogs = z.object({\n method: z.literal('eth_getFilterLogs'),\n params: z.array(z.any())\n});\nexport const RpcEthGetLogs = z.object({\n method: z.literal('eth_getLogs'),\n params: z.array(z.any())\n});\nexport const RpcEthGetProof = z.object({\n method: z.literal('eth_getProof'),\n params: z.array(z.any())\n});\nexport const RpcEthGetStorageAt = z.object({\n method: z.literal('eth_getStorageAt'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByBlockHashAndIndex = z.object({\n method: z.literal('eth_getTransactionByBlockHashAndIndex'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByBlockNumberAndIndex = z.object({\n method: z.literal('eth_getTransactionByBlockNumberAndIndex'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByHash = z.object({\n method: z.literal('eth_getTransactionByHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionCount = z.object({\n method: z.literal('eth_getTransactionCount'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionReceipt = z.object({\n method: z.literal('eth_getTransactionReceipt'),\n params: z.array(z.any())\n});\nexport const RpcEthGetUncleCountByBlockHash = z.object({\n method: z.literal('eth_getUncleCountByBlockHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetUncleCountByBlockNumber = z.object({\n method: z.literal('eth_getUncleCountByBlockNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthMaxPriorityFeePerGas = z.object({\n method: z.literal('eth_maxPriorityFeePerGas')\n});\nexport const RpcEthNewBlockFilter = z.object({\n method: z.literal('eth_newBlockFilter')\n});\nexport const RpcEthNewFilter = z.object({\n method: z.literal('eth_newFilter'),\n params: z.array(z.any())\n});\nexport const RpcEthNewPendingTransactionFilter = z.object({\n method: z.literal('eth_newPendingTransactionFilter')\n});\nexport const RpcEthSendRawTransaction = z.object({\n method: z.literal('eth_sendRawTransaction'),\n params: z.array(z.any())\n});\nexport const RpcEthSyncing = z.object({\n method: z.literal('eth_syncing'),\n params: z.array(z.any())\n});\nexport const RpcUnistallFilter = z.object({\n method: z.literal('eth_uninstallFilter'),\n params: z.array(z.any())\n});\nexport const RpcPersonalSignRequest = z.object({\n method: z.literal('personal_sign'),\n params: z.array(z.any())\n});\nexport const RpcEthSignTypedDataV4 = z.object({\n method: z.literal('eth_signTypedData_v4'),\n params: z.array(z.any())\n});\nexport const RpcEthSendTransactionRequest = z.object({\n method: z.literal('eth_sendTransaction'),\n params: z.array(z.any())\n});\nexport const FrameSession = z.object({\n token: z.string()\n});\nexport const W3mFrameSchema = {\n appEvent: z\n .object({ type: zType('APP_SWITCH_NETWORK'), payload: AppSwitchNetworkRequest })\n .or(z.object({ type: zType('APP_CONNECT_EMAIL'), payload: AppConnectEmailRequest }))\n .or(z.object({ type: zType('APP_CONNECT_DEVICE') }))\n .or(z.object({ type: zType('APP_CONNECT_OTP'), payload: AppConnectOtpRequest }))\n .or(z.object({ type: zType('APP_GET_USER'), payload: z.optional(AppGetUserRequest) }))\n .or(z.object({ type: zType('APP_SIGN_OUT') }))\n .or(z.object({ type: zType('APP_IS_CONNECTED'), payload: z.optional(FrameSession) }))\n .or(z.object({ type: zType('APP_GET_CHAIN_ID') }))\n .or(z.object({ type: zType('APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS') }))\n .or(z.object({ type: zType('APP_INIT_SMART_ACCOUNT') }))\n .or(z.object({ type: zType('APP_SET_PREFERRED_ACCOUNT'), payload: AppSetPreferredAccountRequest }))\n .or(z.object({\n type: zType('APP_RPC_REQUEST'),\n payload: RpcPersonalSignRequest.or(RpcEthSendTransactionRequest)\n .or(RpcEthAccountsRequest)\n .or(RpcEthBlockNumber)\n .or(RpcEthCall)\n .or(RpcEthChainId)\n .or(RpcEthEstimateGas)\n .or(RpcEthFeeHistory)\n .or(RpcEthGasPrice)\n .or(RpcEthGetAccount)\n .or(RpcEthGetBalance)\n .or(RpcEthGetBlockyByHash)\n .or(RpcEthGetBlockByNumber)\n .or(RpcEthGetBlockReceipts)\n .or(RcpEthGetBlockTransactionCountByHash)\n .or(RcpEthGetBlockTransactionCountByNumber)\n .or(RpcEthGetCode)\n .or(RpcEthGetFilter)\n .or(RpcEthGetFilterLogs)\n .or(RpcEthGetLogs)\n .or(RpcEthGetProof)\n .or(RpcEthGetStorageAt)\n .or(RpcEthGetTransactionByBlockHashAndIndex)\n .or(RpcEthGetTransactionByBlockNumberAndIndex)\n .or(RpcEthGetTransactionByHash)\n .or(RpcEthGetTransactionCount)\n .or(RpcEthGetTransactionReceipt)\n .or(RpcEthGetUncleCountByBlockHash)\n .or(RpcEthGetUncleCountByBlockNumber)\n .or(RpcEthMaxPriorityFeePerGas)\n .or(RpcEthNewBlockFilter)\n .or(RpcEthNewFilter)\n .or(RpcEthNewPendingTransactionFilter)\n .or(RpcEthSendRawTransaction)\n .or(RpcEthSyncing)\n .or(RpcUnistallFilter)\n .or(RpcPersonalSignRequest)\n .or(RpcEthSignTypedDataV4)\n .or(RpcEthSendTransactionRequest)\n }))\n .or(z.object({ type: zType('APP_UPDATE_EMAIL'), payload: AppUpdateEmailRequest }))\n .or(z.object({\n type: zType('APP_UPDATE_EMAIL_PRIMARY_OTP'),\n payload: AppUpdateEmailPrimaryOtpRequest\n }))\n .or(z.object({\n type: zType('APP_UPDATE_EMAIL_SECONDARY_OTP'),\n payload: AppUpdateEmailSecondaryOtpRequest\n }))\n .or(z.object({ type: zType('APP_SYNC_THEME'), payload: AppSyncThemeRequest }))\n .or(z.object({ type: zType('APP_SYNC_DAPP_DATA'), payload: AppSyncDappDataRequest })),\n frameEvent: z\n .object({ type: zType('FRAME_SWITCH_NETWORK_ERROR'), payload: zError })\n .or(z.object({ type: zType('FRAME_SWITCH_NETWORK_SUCCESS'), payload: FrameSwitchNetworkResponse }))\n .or(z.object({ type: zType('FRAME_CONNECT_EMAIL_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_EMAIL_SUCCESS'), payload: FrameConnectEmailResponse }))\n .or(z.object({ type: zType('FRAME_CONNECT_OTP_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_OTP_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_CONNECT_DEVICE_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_DEVICE_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_GET_USER_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_GET_USER_SUCCESS'), payload: FrameGetUserResponse }))\n .or(z.object({ type: zType('FRAME_SIGN_OUT_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SIGN_OUT_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_IS_CONNECTED_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_IS_CONNECTED_SUCCESS'), payload: FrameIsConnectedResponse }))\n .or(z.object({ type: zType('FRAME_GET_CHAIN_ID_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_GET_CHAIN_ID_SUCCESS'), payload: FrameGetChainIdResponse }))\n .or(z.object({ type: zType('FRAME_RPC_REQUEST_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_RPC_REQUEST_SUCCESS'), payload: RpcResponse }))\n .or(z.object({ type: zType('FRAME_SESSION_UPDATE'), payload: FrameSession }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_SUCCESS'), payload: FrameUpdateEmailResponse }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR'), payload: zError }))\n .or(z.object({\n type: zType('FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS'),\n payload: FrameUpdateEmailSecondaryOtpResolver\n }))\n .or(z.object({ type: zType('FRAME_SYNC_THEME_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SYNC_THEME_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_SUCCESS') }))\n .or(z.object({\n type: zType('FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS'),\n payload: FrameGetSmartAccountEnabledNetworksResponse\n }))\n .or(z.object({\n type: zType('FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR'),\n payload: zError\n }))\n .or(z.object({ type: zType('FRAME_INIT_SMART_ACCOUNT_ERROR'), payload: zError }))\n .or(z.object({\n type: zType('FRAME_SET_PREFERRED_ACCOUNT_SUCCESS'),\n payload: FrameSetPreferredAccountResponse\n }))\n .or(z.object({ type: zType('FRAME_SET_PREFERRED_ACCOUNT_ERROR'), payload: zError }))\n};\n//# sourceMappingURL=W3mFrameSchema.js.map","import { W3mFrameConstants } from './W3mFrameConstants.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport const W3mFrameStorage = {\n set(key, value) {\n if (W3mFrameHelpers.isClient) {\n localStorage.setItem(`${W3mFrameConstants.STORAGE_KEY}${key}`, value);\n }\n },\n get(key) {\n if (W3mFrameHelpers.isClient) {\n return localStorage.getItem(`${W3mFrameConstants.STORAGE_KEY}${key}`);\n }\n return null;\n },\n delete(key) {\n if (W3mFrameHelpers.isClient) {\n localStorage.removeItem(`${W3mFrameConstants.STORAGE_KEY}${key}`);\n }\n }\n};\n//# sourceMappingURL=W3mFrameStorage.js.map","export const RegexUtil = {\n address: /^0x(?:[A-Fa-f0-9]{40})$/u,\n transactionHash: /^0x(?:[A-Fa-f0-9]{64})$/u,\n signedMessage: /^0x(?:[A-Fa-f0-9]{130})$/u\n};\n//# sourceMappingURL=RegexUtil.js.map","import { W3mFrameStorage } from './W3mFrameStorage.js';\nimport { W3mFrameConstants, W3mFrameRpcConstants } from './W3mFrameConstants.js';\nimport { RegexUtil } from './RegexUtil.js';\nconst RESTRICTED_TIMEZONES = [\n 'ASIA/SHANGHAI',\n 'ASIA/URUMQI',\n 'ASIA/CHONGQING',\n 'ASIA/HARBIN',\n 'ASIA/KASHGAR',\n 'ASIA/MACAU',\n 'ASIA/HONG_KONG',\n 'ASIA/MACAO',\n 'ASIA/BEIJING',\n 'ASIA/HARBIN'\n];\nconst EMAIL_MINIMUM_TIMEOUT = 30 * 1000;\nexport const W3mFrameHelpers = {\n getBlockchainApiUrl() {\n try {\n const { timeZone } = new Intl.DateTimeFormat().resolvedOptions();\n const capTimeZone = timeZone.toUpperCase();\n return RESTRICTED_TIMEZONES.includes(capTimeZone)\n ? 'https://rpc.walletconnect.org'\n : 'https://rpc.walletconnect.com';\n }\n catch {\n return false;\n }\n },\n checkIfAllowedToTriggerEmail() {\n const lastEmailLoginTime = W3mFrameStorage.get(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n if (lastEmailLoginTime) {\n const difference = Date.now() - Number(lastEmailLoginTime);\n if (difference < EMAIL_MINIMUM_TIMEOUT) {\n const cooldownSec = Math.ceil((EMAIL_MINIMUM_TIMEOUT - difference) / 1000);\n throw new Error(`Please try again after ${cooldownSec} seconds`);\n }\n }\n },\n getTimeToNextEmailLogin() {\n const lastEmailLoginTime = W3mFrameStorage.get(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n if (lastEmailLoginTime) {\n const difference = Date.now() - Number(lastEmailLoginTime);\n if (difference < EMAIL_MINIMUM_TIMEOUT) {\n return Math.ceil((EMAIL_MINIMUM_TIMEOUT - difference) / 1000);\n }\n }\n return 0;\n },\n checkIfRequestExists(request) {\n const method = this.getRequestMethod(request);\n return (W3mFrameRpcConstants.NOT_SAFE_RPC_METHODS.includes(method) ||\n W3mFrameRpcConstants.SAFE_RPC_METHODS.includes(method));\n },\n getRequestMethod(request) {\n return request?.payload?.method;\n },\n getResponseType(response) {\n const { type, payload } = response;\n const isError = type === W3mFrameConstants.FRAME_RPC_REQUEST_ERROR;\n if (isError) {\n return W3mFrameConstants.RPC_RESPONSE_TYPE_ERROR;\n }\n const isPayloadString = typeof payload === 'string';\n const isTransactionHash = isPayloadString &&\n (payload.match(RegexUtil.transactionHash) || payload.match(RegexUtil.signedMessage));\n if (isTransactionHash) {\n return W3mFrameConstants.RPC_RESPONSE_TYPE_TX;\n }\n return W3mFrameConstants.RPC_RESPONSE_TYPE_OBJECT;\n },\n checkIfRequestIsAllowed(request) {\n const method = this.getRequestMethod(request);\n return W3mFrameRpcConstants.SAFE_RPC_METHODS.includes(method);\n },\n isClient: typeof window !== 'undefined'\n};\n//# sourceMappingURL=W3mFrameHelpers.js.map","import { SECURE_SITE_SDK, W3mFrameConstants } from './W3mFrameConstants.js';\nimport { W3mFrameSchema } from './W3mFrameSchema.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport class W3mFrame {\n constructor(projectId, isAppClient = false) {\n this.iframe = null;\n this.rpcUrl = W3mFrameHelpers.getBlockchainApiUrl();\n this.events = {\n onFrameEvent: (callback) => {\n if (W3mFrameHelpers.isClient) {\n window.addEventListener('message', ({ data }) => {\n if (!data.type?.includes(W3mFrameConstants.FRAME_EVENT_KEY)) {\n return;\n }\n const frameEvent = W3mFrameSchema.frameEvent.parse(data);\n callback(frameEvent);\n });\n }\n },\n onAppEvent: (callback) => {\n if (W3mFrameHelpers.isClient) {\n window.addEventListener('message', ({ data }) => {\n if (!data.type?.includes(W3mFrameConstants.APP_EVENT_KEY)) {\n return;\n }\n const appEvent = W3mFrameSchema.appEvent.parse(data);\n callback(appEvent);\n });\n }\n },\n postAppEvent: (event) => {\n if (W3mFrameHelpers.isClient) {\n if (!this.iframe?.contentWindow) {\n throw new Error('W3mFrame: iframe is not set');\n }\n W3mFrameSchema.appEvent.parse(event);\n window.postMessage(event);\n this.iframe.contentWindow.postMessage(event, '*');\n }\n },\n postFrameEvent: (event) => {\n if (W3mFrameHelpers.isClient) {\n if (!parent) {\n throw new Error('W3mFrame: parent is not set');\n }\n W3mFrameSchema.frameEvent.parse(event);\n parent.postMessage(event, '*');\n }\n }\n };\n this.projectId = projectId;\n this.frameLoadPromise = new Promise((resolve, reject) => {\n this.frameLoadPromiseResolver = { resolve, reject };\n });\n if (isAppClient) {\n this.frameLoadPromise = new Promise((resolve, reject) => {\n this.frameLoadPromiseResolver = { resolve, reject };\n });\n if (W3mFrameHelpers.isClient) {\n const iframe = document.createElement('iframe');\n iframe.id = 'w3m-iframe';\n iframe.src = `${SECURE_SITE_SDK}?projectId=${projectId}`;\n iframe.style.position = 'fixed';\n iframe.style.zIndex = '999999';\n iframe.style.display = 'none';\n iframe.style.borderBottomLeftRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.borderBottomRightRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.opacity = '0';\n iframe.style.borderBottomLeftRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.borderBottomRightRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n document.body.appendChild(iframe);\n this.iframe = iframe;\n this.iframe.onload = () => {\n this.frameLoadPromiseResolver?.resolve(undefined);\n };\n this.iframe.onerror = () => {\n this.frameLoadPromiseResolver?.reject('Unable to load email login dependency');\n };\n }\n }\n }\n get networks() {\n const data = [\n 1, 5, 11155111, 10, 420, 42161, 421613, 137, 80001, 42220, 1313161554, 1313161555, 56, 97,\n 43114, 43113, 324, 280, 100, 8453, 84531, 7777777, 999\n ].map(id => ({\n [id]: {\n rpcUrl: `${this.rpcUrl}/v1/?chainId=eip155:${id}&projectId=${this.projectId}`,\n chainId: id\n }\n }));\n return Object.assign({}, ...data);\n }\n}\n//# sourceMappingURL=W3mFrame.js.map","import { W3mFrame } from './W3mFrame.js';\nimport { W3mFrameConstants, W3mFrameRpcConstants } from './W3mFrameConstants.js';\nimport { W3mFrameStorage } from './W3mFrameStorage.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport class W3mFrameProvider {\n constructor(projectId) {\n this.connectEmailResolver = undefined;\n this.connectDeviceResolver = undefined;\n this.connectOtpResolver = undefined;\n this.connectResolver = undefined;\n this.disconnectResolver = undefined;\n this.isConnectedResolver = undefined;\n this.getChainIdResolver = undefined;\n this.switchChainResolver = undefined;\n this.rpcRequestResolver = undefined;\n this.updateEmailResolver = undefined;\n this.updateEmailPrimaryOtpResolver = undefined;\n this.updateEmailSecondaryOtpResolver = undefined;\n this.syncThemeResolver = undefined;\n this.syncDappDataResolver = undefined;\n this.smartAccountEnabledNetworksResolver = undefined;\n this.setPreferredAccountResolver = undefined;\n this.w3mFrame = new W3mFrame(projectId, true);\n this.w3mFrame.events.onFrameEvent(event => {\n console.log('💻 received', event);\n switch (event.type) {\n case W3mFrameConstants.FRAME_CONNECT_EMAIL_SUCCESS:\n return this.onConnectEmailSuccess(event);\n case W3mFrameConstants.FRAME_CONNECT_EMAIL_ERROR:\n return this.onConnectEmailError(event);\n case W3mFrameConstants.FRAME_CONNECT_DEVICE_SUCCESS:\n return this.onConnectDeviceSuccess();\n case W3mFrameConstants.FRAME_CONNECT_DEVICE_ERROR:\n return this.onConnectDeviceError(event);\n case W3mFrameConstants.FRAME_CONNECT_OTP_SUCCESS:\n return this.onConnectOtpSuccess();\n case W3mFrameConstants.FRAME_CONNECT_OTP_ERROR:\n return this.onConnectOtpError(event);\n case W3mFrameConstants.FRAME_GET_USER_SUCCESS:\n return this.onConnectSuccess(event);\n case W3mFrameConstants.FRAME_GET_USER_ERROR:\n return this.onConnectError(event);\n case W3mFrameConstants.FRAME_IS_CONNECTED_SUCCESS:\n return this.onIsConnectedSuccess(event);\n case W3mFrameConstants.FRAME_IS_CONNECTED_ERROR:\n return this.onIsConnectedError(event);\n case W3mFrameConstants.FRAME_GET_CHAIN_ID_SUCCESS:\n return this.onGetChainIdSuccess(event);\n case W3mFrameConstants.FRAME_GET_CHAIN_ID_ERROR:\n return this.onGetChainIdError(event);\n case W3mFrameConstants.FRAME_SIGN_OUT_SUCCESS:\n return this.onSignOutSuccess();\n case W3mFrameConstants.FRAME_SIGN_OUT_ERROR:\n return this.onSignOutError(event);\n case W3mFrameConstants.FRAME_SWITCH_NETWORK_SUCCESS:\n return this.onSwitchChainSuccess(event);\n case W3mFrameConstants.FRAME_SWITCH_NETWORK_ERROR:\n return this.onSwitchChainError(event);\n case W3mFrameConstants.FRAME_RPC_REQUEST_SUCCESS:\n return this.onRpcRequestSuccess(event);\n case W3mFrameConstants.FRAME_RPC_REQUEST_ERROR:\n return this.onRpcRequestError(event);\n case W3mFrameConstants.FRAME_SESSION_UPDATE:\n return this.onSessionUpdate(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SUCCESS:\n return this.onUpdateEmailSuccess(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_ERROR:\n return this.onUpdateEmailError(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:\n return this.onUpdateEmailPrimaryOtpSuccess();\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:\n return this.onUpdateEmailPrimaryOtpError(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:\n return this.onUpdateEmailSecondaryOtpSuccess(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:\n return this.onUpdateEmailSecondaryOtpError(event);\n case W3mFrameConstants.FRAME_SYNC_THEME_SUCCESS:\n return this.onSyncThemeSuccess();\n case W3mFrameConstants.FRAME_SYNC_THEME_ERROR:\n return this.onSyncThemeError(event);\n case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_SUCCESS:\n return this.onSyncDappDataSuccess();\n case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_ERROR:\n return this.onSyncDappDataError(event);\n case W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:\n return this.onSmartAccountEnabledNetworksSuccess(event);\n case W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:\n return this.onSmartAccountEnabledNetworksError(event);\n case W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:\n return this.onSetPreferredAccountSuccess();\n case W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_ERROR:\n return this.onSetPreferredAccountError();\n default:\n return null;\n }\n });\n }\n getLoginEmailUsed() {\n return Boolean(W3mFrameStorage.get(W3mFrameConstants.EMAIL_LOGIN_USED_KEY));\n }\n getEmail() {\n return W3mFrameStorage.get(W3mFrameConstants.EMAIL);\n }\n rejectRpcRequest() {\n this.rpcRequestResolver?.reject();\n }\n async connectEmail(payload) {\n await this.w3mFrame.frameLoadPromise;\n W3mFrameHelpers.checkIfAllowedToTriggerEmail();\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_EMAIL, payload });\n return new Promise((resolve, reject) => {\n this.connectEmailResolver = { resolve, reject };\n });\n }\n async connectDevice() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_DEVICE });\n return new Promise((resolve, reject) => {\n this.connectDeviceResolver = { resolve, reject };\n });\n }\n async connectOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_OTP, payload });\n return new Promise((resolve, reject) => {\n this.connectOtpResolver = { resolve, reject };\n });\n }\n async isConnected() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_IS_CONNECTED,\n payload: undefined\n });\n return new Promise((resolve, reject) => {\n this.isConnectedResolver = { resolve, reject };\n });\n }\n async getChainId() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_GET_CHAIN_ID });\n return new Promise((resolve, reject) => {\n this.getChainIdResolver = { resolve, reject };\n });\n }\n async updateEmail(payload) {\n await this.w3mFrame.frameLoadPromise;\n W3mFrameHelpers.checkIfAllowedToTriggerEmail();\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_UPDATE_EMAIL, payload });\n return new Promise((resolve, reject) => {\n this.updateEmailResolver = { resolve, reject };\n });\n }\n async updateEmailPrimaryOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_UPDATE_EMAIL_PRIMARY_OTP,\n payload\n });\n return new Promise((resolve, reject) => {\n this.updateEmailPrimaryOtpResolver = { resolve, reject };\n });\n }\n async updateEmailSecondaryOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_UPDATE_EMAIL_SECONDARY_OTP,\n payload\n });\n return new Promise((resolve, reject) => {\n this.updateEmailSecondaryOtpResolver = { resolve, reject };\n });\n }\n async syncTheme(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SYNC_THEME, payload });\n return new Promise((resolve, reject) => {\n this.syncThemeResolver = { resolve, reject };\n });\n }\n async syncDappData(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SYNC_DAPP_DATA, payload });\n return new Promise((resolve, reject) => {\n this.syncDappDataResolver = { resolve, reject };\n });\n }\n async getSmartAccountEnabledNetworks() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS\n });\n return new Promise((resolve, reject) => {\n this.smartAccountEnabledNetworksResolver = { resolve, reject };\n });\n }\n async setPreferredAccount(type) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_SET_PREFERRED_ACCOUNT,\n payload: { type }\n });\n return new Promise((resolve, reject) => {\n this.setPreferredAccountResolver = { resolve, reject };\n });\n }\n async connect(payload) {\n const chainId = payload?.chainId ?? this.getLastUsedChainId() ?? 1;\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_GET_USER,\n payload: { chainId }\n });\n return new Promise((resolve, reject) => {\n this.connectResolver = { resolve, reject };\n });\n }\n async switchNetwork(chainId) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_SWITCH_NETWORK,\n payload: { chainId }\n });\n return new Promise((resolve, reject) => {\n this.switchChainResolver = { resolve, reject };\n });\n }\n async disconnect() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SIGN_OUT });\n return new Promise((resolve, reject) => {\n this.disconnectResolver = { resolve, reject };\n });\n }\n async request(req) {\n await this.w3mFrame.frameLoadPromise;\n if (W3mFrameRpcConstants.GET_CHAIN_ID === req.method) {\n return this.getLastUsedChainId();\n }\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_RPC_REQUEST,\n payload: req\n });\n return new Promise((resolve, reject) => {\n this.rpcRequestResolver = { resolve, reject };\n });\n }\n onRpcRequest(callback) {\n this.w3mFrame.events.onAppEvent(event => {\n if (event.type.includes(W3mFrameConstants.RPC_METHOD_KEY)) {\n callback(event);\n }\n });\n }\n onRpcResponse(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type.includes(W3mFrameConstants.RPC_METHOD_KEY)) {\n callback(event);\n }\n });\n }\n onIsConnected(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_GET_USER_SUCCESS) {\n callback(event.payload);\n }\n });\n }\n onNotConnected(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_IS_CONNECTED_ERROR) {\n callback();\n }\n if (event.type === W3mFrameConstants.FRAME_IS_CONNECTED_SUCCESS &&\n !event.payload.isConnected) {\n callback();\n }\n });\n }\n onSetPreferredAccount(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS) {\n callback(event.payload);\n }\n else if (event.type === W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_ERROR) {\n callback({ type: W3mFrameRpcConstants.ACCOUNT_TYPES.EOA });\n }\n });\n }\n onGetSmartAccountEnabledNetworks(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS) {\n callback(event.payload.smartAccountEnabledNetworks);\n }\n else if (event.type === W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR) {\n callback([]);\n }\n });\n }\n onConnectEmailSuccess(event) {\n this.connectEmailResolver?.resolve(event.payload);\n this.setNewLastEmailLoginTime();\n }\n onConnectEmailError(event) {\n this.connectEmailResolver?.reject(event.payload.message);\n }\n onConnectDeviceSuccess() {\n this.connectDeviceResolver?.resolve(undefined);\n }\n onConnectDeviceError(event) {\n this.connectDeviceResolver?.reject(event.payload.message);\n }\n onConnectOtpSuccess() {\n this.connectOtpResolver?.resolve(undefined);\n }\n onConnectOtpError(event) {\n this.connectOtpResolver?.reject(event.payload.message);\n }\n onConnectSuccess(event) {\n this.setEmailLoginSuccess(event.payload.email);\n this.setLastUsedChainId(event.payload.chainId);\n this.connectResolver?.resolve(event.payload);\n }\n onConnectError(event) {\n this.connectResolver?.reject(event.payload.message);\n }\n onIsConnectedSuccess(event) {\n if (!event.payload.isConnected) {\n this.deleteEmailLoginCache();\n }\n this.isConnectedResolver?.resolve(event.payload);\n }\n onIsConnectedError(event) {\n this.isConnectedResolver?.reject(event.payload.message);\n }\n onGetChainIdSuccess(event) {\n this.setLastUsedChainId(event.payload.chainId);\n this.getChainIdResolver?.resolve(event.payload);\n }\n onGetChainIdError(event) {\n this.getChainIdResolver?.reject(event.payload.message);\n }\n onSignOutSuccess() {\n this.disconnectResolver?.resolve(undefined);\n this.deleteEmailLoginCache();\n }\n onSignOutError(event) {\n this.disconnectResolver?.reject(event.payload.message);\n }\n onSwitchChainSuccess(event) {\n this.setLastUsedChainId(event.payload.chainId);\n this.switchChainResolver?.resolve(event.payload);\n }\n onSwitchChainError(event) {\n this.switchChainResolver?.reject(event.payload.message);\n }\n onRpcRequestSuccess(event) {\n this.rpcRequestResolver?.resolve(event.payload);\n }\n onRpcRequestError(event) {\n this.rpcRequestResolver?.reject(event.payload.message);\n }\n onSessionUpdate(event) {\n const { payload } = event;\n if (payload) {\n }\n }\n onUpdateEmailSuccess(event) {\n this.updateEmailResolver?.resolve(event.payload);\n this.setNewLastEmailLoginTime();\n }\n onUpdateEmailError(event) {\n this.updateEmailResolver?.reject(event.payload.message);\n }\n onUpdateEmailPrimaryOtpSuccess() {\n this.updateEmailPrimaryOtpResolver?.resolve(undefined);\n }\n onUpdateEmailPrimaryOtpError(event) {\n this.updateEmailPrimaryOtpResolver?.reject(event.payload.message);\n }\n onUpdateEmailSecondaryOtpSuccess(event) {\n const { newEmail } = event.payload;\n this.setEmailLoginSuccess(newEmail);\n this.updateEmailSecondaryOtpResolver?.resolve({ newEmail });\n }\n onUpdateEmailSecondaryOtpError(event) {\n this.updateEmailSecondaryOtpResolver?.reject(event.payload.message);\n }\n onSyncThemeSuccess() {\n this.syncThemeResolver?.resolve(undefined);\n }\n onSyncThemeError(event) {\n this.syncThemeResolver?.reject(event.payload.message);\n }\n onSyncDappDataSuccess() {\n this.syncDappDataResolver?.resolve(undefined);\n }\n onSyncDappDataError(event) {\n this.syncDappDataResolver?.reject(event.payload.message);\n }\n onSmartAccountEnabledNetworksSuccess(event) {\n this.persistSmartAccountEnabledNetworks(event.payload.smartAccountEnabledNetworks);\n this.smartAccountEnabledNetworksResolver?.resolve(event.payload);\n }\n onSmartAccountEnabledNetworksError(event) {\n this.persistSmartAccountEnabledNetworks([]);\n this.smartAccountEnabledNetworksResolver?.reject(event.payload.message);\n }\n onSetPreferredAccountSuccess() {\n this.setPreferredAccountResolver?.resolve(undefined);\n }\n onSetPreferredAccountError() {\n this.setPreferredAccountResolver?.reject();\n }\n setNewLastEmailLoginTime() {\n W3mFrameStorage.set(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME, Date.now().toString());\n }\n setEmailLoginSuccess(email) {\n W3mFrameStorage.set(W3mFrameConstants.EMAIL, email);\n W3mFrameStorage.set(W3mFrameConstants.EMAIL_LOGIN_USED_KEY, 'true');\n W3mFrameStorage.delete(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n }\n deleteEmailLoginCache() {\n W3mFrameStorage.delete(W3mFrameConstants.EMAIL_LOGIN_USED_KEY);\n W3mFrameStorage.delete(W3mFrameConstants.EMAIL);\n W3mFrameStorage.delete(W3mFrameConstants.LAST_USED_CHAIN_KEY);\n }\n setLastUsedChainId(chainId) {\n W3mFrameStorage.set(W3mFrameConstants.LAST_USED_CHAIN_KEY, String(chainId));\n }\n getLastUsedChainId() {\n return Number(W3mFrameStorage.get(W3mFrameConstants.LAST_USED_CHAIN_KEY));\n }\n persistSmartAccountEnabledNetworks(networks) {\n W3mFrameStorage.set(W3mFrameConstants.SMART_ACCOUNT_ENABLED_NETWORKS, networks.join(','));\n }\n}\n//# sourceMappingURL=W3mFrameProvider.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ConnectionController, AssetController, CoreHelperUtil, EventsController, ModalController, NetworkController, RouterController, SnackController, StorageUtil, ConnectorController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mAccountSettingsView = class W3mAccountSettingsView extends LitElement {\n constructor() {\n super();\n this.usubscribe = [];\n this.networkImages = AssetController.state.networkImages;\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.disconnecting = false;\n this.loading = false;\n this.usubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n ModalController.close();\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.usubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-settings-view: No account provided');\n }\n const networkImage = this.networkImages[this.network?.imageId ?? ''];\n return html `\n \n \n \n \n \n ${this.profileName\n ? UiHelperUtil.getTruncateString({\n string: this.profileName,\n charsStart: 20,\n charsEnd: 0,\n truncate: 'end'\n })\n : UiHelperUtil.getTruncateString({\n string: this.address,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n })}\n \n \n \n \n \n\n \n \n ${this.emailBtnTemplate()}\n \n \n ${this.network?.name ?? 'Unknown'}\n \n \n ${this.togglePreferredAccountBtnTemplate()}\n \n Disconnect\n \n \n \n `;\n }\n isAllowedNetworkSwitch() {\n const { requestedCaipNetworks } = NetworkController.state;\n const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;\n const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id);\n return isMultiNetwork || !isValidNetwork;\n }\n onCopyAddress() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n emailBtnTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL') {\n return null;\n }\n const email = emailConnector.provider.getEmail() ?? '';\n return html `\n this.onGoToUpdateEmail(email)}\n >\n ${email}\n \n `;\n }\n togglePreferredAccountBtnTemplate() {\n const networkEnabled = NetworkController.checkIfSmartAccountEnabled();\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL' || !networkEnabled) {\n return null;\n }\n const text = this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT\n ? 'Switch to your EOA'\n : 'Switch to your smart account';\n return html `\n \n ${text}\n \n `;\n }\n async changePreferredAccountType() {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n const accountTypeTarget = this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT ||\n !smartAccountEnabled\n ? W3mFrameRpcConstants.ACCOUNT_TYPES.EOA\n : W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n return;\n }\n this.loading = true;\n await emailConnector?.provider.setPreferredAccount(accountTypeTarget);\n this.loading = false;\n this.requestUpdate();\n }\n onGoToUpdateEmail(email) {\n RouterController.push('UpdateEmailWallet', { email });\n }\n onNetworks() {\n if (this.isAllowedNetworkSwitch()) {\n RouterController.push('Networks');\n }\n }\n async onDisconnect() {\n try {\n this.disconnecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_SUCCESS' });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconnecting = false;\n }\n }\n};\nW3mAccountSettingsView.styles = styles;\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"preferredAccountType\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"disconnecting\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"loading\", void 0);\nW3mAccountSettingsView = __decorate([\n customElement('w3m-account-settings-view')\n], W3mAccountSettingsView);\nexport { W3mAccountSettingsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nlet W3mAccountView = class W3mAccountView extends LitElement {\n render() {\n const type = StorageUtil.getConnectedConnector();\n return html `\n ${OptionsController.state.enableWalletFeatures && type === 'EMAIL'\n ? this.walletFeaturesTemplate()\n : this.defaultTemplate()}\n `;\n }\n walletFeaturesTemplate() {\n return html ``;\n }\n defaultTemplate() {\n return html ``;\n }\n};\nW3mAccountView = __decorate([\n customElement('w3m-account-view')\n], W3mAccountView);\nexport { W3mAccountView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mAllWalletsView = class W3mAllWalletsView extends LitElement {\n constructor() {\n super(...arguments);\n this.search = '';\n this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {\n this.search = value;\n });\n }\n render() {\n const isSearch = this.search.length >= 2;\n return html `\n \n \n ${this.qrButtonTemplate()}\n \n ${isSearch\n ? html ``\n : html ``}\n `;\n }\n onInputChange(event) {\n this.onDebouncedSearch(event.detail);\n }\n qrButtonTemplate() {\n if (CoreHelperUtil.isMobile()) {\n return html `\n \n `;\n }\n return null;\n }\n onWalletConnectQr() {\n RouterController.push('ConnectingWalletConnect');\n }\n};\n__decorate([\n state()\n], W3mAllWalletsView.prototype, \"search\", void 0);\nW3mAllWalletsView = __decorate([\n customElement('w3m-all-wallets-view')\n], W3mAllWalletsView);\nexport { W3mAllWalletsView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-thumbnail {\n position: absolute;\n }\n\n wui-visual {\n width: var(--wui-wallet-image-size-lg);\n height: var(--wui-wallet-image-size-lg);\n border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));\n position: relative;\n overflow: hidden;\n }\n\n wui-visual::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n wui-icon-box {\n position: absolute;\n right: calc(var(--wui-spacing-3xs) * -1);\n bottom: calc(var(--wui-spacing-3xs) * -1);\n opacity: 0;\n transform: scale(0.5);\n transition:\n opacity var(--wui-ease-out-power-2) var(--wui-duration-lg),\n transform var(--wui-ease-out-power-2) var(--wui-duration-lg);\n will-change: opacity, transform;\n }\n\n wui-text[align='center'] {\n width: 100%;\n padding: 0px var(--wui-spacing-l);\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n [data-retry='false'] wui-link {\n display: none;\n }\n\n [data-retry='true'] wui-link {\n display: block;\n opacity: 1;\n }\n\n wui-link {\n padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ConnectionController, CoreHelperUtil, OnRampController, RouterController, SnackController, ThemeController, BlockchainApiController, OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mBuyInProgressView = class W3mBuyInProgressView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedOnRampProvider = OnRampController.state.selectedProvider;\n this.uri = ConnectionController.state.wcUri;\n this.ready = false;\n this.showRetry = false;\n this.buffering = false;\n this.error = false;\n this.startTime = null;\n this.isMobile = false;\n this.onRetry = undefined;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('selectedProvider', val => {\n this.selectedOnRampProvider = val;\n })\n ]);\n this.watchTransactions();\n }\n disconnectedCallback() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n render() {\n let label = 'Continue in external window';\n if (this.error) {\n label = 'Buy failed';\n }\n else if (this.selectedOnRampProvider) {\n label = `Buy in ${this.selectedOnRampProvider?.label}`;\n }\n const subLabel = this.error\n ? 'Buy can be declined from your side or due to and error on the provider app'\n : `We’ll notify you once your Buy is processed`;\n return html `\n \n \n \n \n\n ${this.error ? null : this.loaderTemplate()}\n\n \n \n\n \n \n ${label}\n \n ${subLabel}\n \n\n ${this.error ? this.tryAgainTemplate() : null}\n \n\n \n \n \n Copy link\n \n \n `;\n }\n watchTransactions() {\n if (!this.selectedOnRampProvider) {\n return;\n }\n switch (this.selectedOnRampProvider.name) {\n case 'coinbase':\n this.startTime = Date.now();\n this.initializeCoinbaseTransactions();\n break;\n default:\n break;\n }\n }\n async initializeCoinbaseTransactions() {\n await this.watchCoinbaseTransactions();\n this.intervalId = setInterval(() => this.watchCoinbaseTransactions(), 4000);\n }\n async watchCoinbaseTransactions() {\n try {\n const address = AccountController.state.address;\n const projectId = OptionsController.state.projectId;\n if (!address) {\n throw new Error('No address found');\n }\n const coinbaseResponse = await BlockchainApiController.fetchTransactions({\n account: address,\n onramp: 'coinbase',\n projectId\n });\n const newTransactions = coinbaseResponse.data.filter(tx => new Date(tx.metadata.minedAt) > new Date(this.startTime) ||\n tx.metadata.status === 'ONRAMP_TRANSACTION_STATUS_IN_PROGRESS');\n if (newTransactions.length) {\n clearInterval(this.intervalId);\n RouterController.replace('OnRampActivity');\n }\n else if (this.startTime && Date.now() - this.startTime >= 180000) {\n clearInterval(this.intervalId);\n this.error = true;\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n }\n onTryAgain() {\n if (!this.selectedOnRampProvider) {\n return;\n }\n this.error = false;\n CoreHelperUtil.openHref(this.selectedOnRampProvider.url, 'popupWindow', 'width=600,height=800,scrollbars=yes');\n }\n tryAgainTemplate() {\n if (!this.selectedOnRampProvider?.url) {\n return null;\n }\n return html `\n \n Try again\n `;\n }\n loaderTemplate() {\n const borderRadiusMaster = ThemeController.state.themeVariables['--w3m-border-radius-master'];\n const radius = borderRadiusMaster ? parseInt(borderRadiusMaster.replace('px', ''), 10) : 4;\n return html ``;\n }\n onCopyUri() {\n if (!this.selectedOnRampProvider?.url) {\n SnackController.showError('No link found');\n RouterController.goBack();\n return;\n }\n try {\n CoreHelperUtil.copyToClopboard(this.selectedOnRampProvider.url);\n SnackController.showSuccess('Link copied');\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n};\nW3mBuyInProgressView.styles = styles;\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"selectedOnRampProvider\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"uri\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"ready\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"buffering\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"error\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"intervalId\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"startTime\", void 0);\n__decorate([\n property({ type: Boolean })\n], W3mBuyInProgressView.prototype, \"isMobile\", void 0);\n__decorate([\n property()\n], W3mBuyInProgressView.prototype, \"onRetry\", void 0);\nW3mBuyInProgressView = __decorate([\n customElement('w3m-buy-in-progress-view')\n], W3mBuyInProgressView);\nexport { W3mBuyInProgressView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","export const ConstantsUtil = {\n WALLET_CONNECT_CONNECTOR_ID: 'walletConnect',\n INJECTED_CONNECTOR_ID: 'injected',\n COINBASE_CONNECTOR_ID: 'coinbaseWallet',\n COINBASE_SDK_CONNECTOR_ID: 'coinbaseWalletSDK',\n SAFE_CONNECTOR_ID: 'safe',\n LEDGER_CONNECTOR_ID: 'ledger',\n EIP6963_CONNECTOR_ID: 'eip6963',\n EMAIL_CONNECTOR_ID: 'w3mEmail',\n EIP155: 'eip155',\n ADD_CHAIN_METHOD: 'wallet_addEthereumChain',\n EIP6963_ANNOUNCE_EVENT: 'eip6963:announceProvider',\n EIP6963_REQUEST_EVENT: 'eip6963:requestProvider',\n CONNECTOR_RDNS_MAP: {\n coinbaseWallet: 'com.coinbase.wallet'\n },\n VERSION: '4.1.11'\n};\n//# sourceMappingURL=ConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const PresetsUtil = {\n ConnectorExplorerIds: {\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: '225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: '19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927'\n },\n EIP155NetworkImageIds: {\n 1: '692ed6ba-e569-459a-556a-776476829e00',\n 42161: '3bff954d-5cb0-47a0-9a23-d20192e74600',\n 43114: '30c46e53-e989-45fb-4549-be3bd4eb3b00',\n 56: '93564157-2e8e-4ce7-81df-b264dbee9b00',\n 250: '06b26297-fe0c-4733-5d6b-ffa5498aac00',\n 10: 'ab9c186a-c52f-464b-2906-ca59d760a400',\n 137: '41d04d42-da3b-4453-8506-668cc0727900',\n 100: '02b53f6a-e3d4-479e-1cb4-21178987d100',\n 9001: 'f926ff41-260d-4028-635e-91913fc28e00',\n 324: 'b310f07f-4ef7-49f3-7073-2a0a39685800',\n 314: '5a73b3dd-af74-424e-cae0-0de859ee9400',\n 4689: '34e68754-e536-40da-c153-6ef2e7188a00',\n 1088: '3897a66d-40b9-4833-162f-a2c90531c900',\n 1284: '161038da-44ae-4ec7-1208-0ea569454b00',\n 1285: 'f1d73bb6-5450-4e18-38f7-fb6484264a00',\n 7777777: '845c60df-d429-4991-e687-91ae45791600',\n 42220: 'ab781bbc-ccc6-418d-d32d-789b15da1f00',\n 8453: '7289c336-3981-4081-c5f4-efc26ac64a00',\n 1313161554: '3ff73439-a619-4894-9262-4470c773a100',\n 2020: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',\n 2021: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',\n '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': 'a1b58899-f671-4276-6a5e-56ca5bd59700',\n '4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z': 'a1b58899-f671-4276-6a5e-56ca5bd59700',\n EtWTRABZaYq6iMfeYKouRu166VU2xqa1: 'a1b58899-f671-4276-6a5e-56ca5bd59700'\n },\n ConnectorImageIds: {\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: '0c2840c3-5b04-4c44-9661-fbd4b49e1800',\n [ConstantsUtil.COINBASE_SDK_CONNECTOR_ID]: '0c2840c3-5b04-4c44-9661-fbd4b49e1800',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: '461db637-8616-43ce-035a-d89b8a1d5800',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: '54a1aa77-d202-4f8d-0fb2-5d2bb6db0300',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400',\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: '07ba87ed-43aa-4adf-4540-9e6a2b9cae00'\n },\n ConnectorNamesMap: {\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: 'Browser Wallet',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'WalletConnect',\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: 'Coinbase',\n [ConstantsUtil.COINBASE_SDK_CONNECTOR_ID]: 'Coinbase',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: 'Ledger',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: 'Safe'\n },\n ConnectorTypesMap: {\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: 'INJECTED',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'WALLET_CONNECT',\n [ConstantsUtil.EIP6963_CONNECTOR_ID]: 'ANNOUNCED',\n [ConstantsUtil.EMAIL_CONNECTOR_ID]: 'EMAIL'\n },\n WalletConnectRpcChainIds: [\n 1,\n 5,\n 11155111,\n 10,\n 420,\n 42161,\n 421613,\n 137,\n 80001,\n 42220,\n 1313161554,\n 1313161555,\n 56,\n 97,\n 43114,\n 43113,\n 100,\n 8453,\n 84531,\n 7777777,\n 999,\n 324,\n 280\n ]\n};\n//# sourceMappingURL=PresetsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const HelpersUtil = {\n getCaipTokens(tokens) {\n if (!tokens) {\n return undefined;\n }\n const caipTokens = {};\n Object.entries(tokens).forEach(([id, token]) => {\n caipTokens[`${ConstantsUtil.EIP155}:${id}`] = token;\n });\n return caipTokens;\n }\n};\n//# sourceMappingURL=HelpersUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, OptionsController, RouterController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '@web3modal/scaffold-utils';\nlet W3mConnectView = class W3mConnectView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.connectors = ConnectorController.state.connectors;\n this.count = ApiController.state.count;\n this.unsubscribe.push(ConnectorController.subscribeKey('connectors', val => (this.connectors = val)), ApiController.subscribeKey('count', val => (this.count = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n \n\n ${this.walletConnectConnectorTemplate()} ${this.recentTemplate()}\n ${this.announcedTemplate()} ${this.injectedTemplate()} ${this.featuredTemplate()}\n ${this.customTemplate()} ${this.recommendedTemplate()} ${this.externalTemplate()}\n ${this.allWalletsTemplate()}\n \n \n `;\n }\n walletConnectConnectorTemplate() {\n if (CoreHelperUtil.isMobile()) {\n return null;\n }\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n tagLabel=\"qr code\"\n tagVariant=\"main\"\n data-testid=\"wallet-selector-walletconnect\"\n >\n \n `;\n }\n customTemplate() {\n const { customWallets } = OptionsController.state;\n if (!customWallets?.length) {\n return null;\n }\n const wallets = this.filterOutDuplicateWallets(customWallets);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n data-testid=${`wallet-selector-${wallet.id}`}\n >\n \n `);\n }\n featuredTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n const { featured } = ApiController.state;\n if (!featured.length) {\n return null;\n }\n const wallets = this.filterOutDuplicateWallets(featured);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n >\n \n `);\n }\n recentTemplate() {\n const recent = StorageUtil.getRecentWallets();\n return recent.map(wallet => html `\n this.onConnectWallet(wallet)}\n tagLabel=\"recent\"\n tagVariant=\"shade\"\n >\n \n `);\n }\n announcedTemplate() {\n return this.connectors.map(connector => {\n if (connector.type !== 'ANNOUNCED') {\n return null;\n }\n return html `\n this.onConnector(connector)}\n tagVariant=\"success\"\n .installed=${true}\n >\n \n `;\n });\n }\n injectedTemplate() {\n return this.connectors.map(connector => {\n if (connector.type !== 'INJECTED') {\n return null;\n }\n if (!ConnectionController.checkInstalled()) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n >\n \n `;\n });\n }\n externalTemplate() {\n const announcedRdns = ConnectorController.getAnnouncedConnectorRdns();\n return this.connectors.map(connector => {\n if (['WALLET_CONNECT', 'INJECTED', 'ANNOUNCED', 'EMAIL'].includes(connector.type)) {\n return null;\n }\n if (announcedRdns.includes(ConstantsUtil.CONNECTOR_RDNS_MAP[connector.id])) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n >\n \n `;\n });\n }\n allWalletsTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n const { allWallets } = OptionsController.state;\n if (!connector || allWallets === 'HIDE') {\n return null;\n }\n if (allWallets === 'ONLY_MOBILE' && !CoreHelperUtil.isMobile()) {\n return null;\n }\n const featuredCount = ApiController.state.featured.length;\n const rawCount = this.count + featuredCount;\n const roundedCount = rawCount < 10 ? rawCount : Math.floor(rawCount / 10) * 10;\n const tagLabel = roundedCount < rawCount ? `${roundedCount}+` : `${roundedCount}`;\n return html `\n \n `;\n }\n recommendedTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n const { recommended } = ApiController.state;\n const { customWallets, featuredWalletIds } = OptionsController.state;\n const { connectors } = ConnectorController.state;\n const recent = StorageUtil.getRecentWallets();\n const injected = connectors.filter(c => c.type === 'INJECTED');\n const filteredInjected = injected.filter(i => i.name !== 'Browser Wallet');\n if (featuredWalletIds || customWallets || !recommended.length) {\n return null;\n }\n const overrideLength = filteredInjected.length + recent.length;\n const maxRecommended = Math.max(0, 2 - overrideLength);\n const wallets = this.filterOutDuplicateWallets(recommended).slice(0, maxRecommended);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n >\n \n `);\n }\n onConnector(connector) {\n if (connector.type === 'WALLET_CONNECT') {\n if (CoreHelperUtil.isMobile()) {\n RouterController.push('AllWallets');\n }\n else {\n RouterController.push('ConnectingWalletConnect');\n }\n }\n else {\n RouterController.push('ConnectingExternal', { connector });\n }\n }\n filterOutDuplicateWallets(wallets) {\n const recent = StorageUtil.getRecentWallets();\n const connectorRDNSs = this.connectors\n .map(connector => connector.info?.rdns)\n .filter(Boolean);\n const recentRDNSs = recent.map(wallet => wallet.rdns).filter(Boolean);\n const allRDNSs = connectorRDNSs.concat(recentRDNSs);\n const filtered = wallets.filter(wallet => !allRDNSs.includes(String(wallet?.rdns)));\n return filtered;\n }\n onAllWallets() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_ALL_WALLETS' });\n RouterController.push('AllWallets');\n }\n onConnectWallet(wallet) {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n};\nW3mConnectView.styles = styles;\n__decorate([\n state()\n], W3mConnectView.prototype, \"connectors\", void 0);\n__decorate([\n state()\n], W3mConnectView.prototype, \"count\", void 0);\nW3mConnectView = __decorate([\n customElement('w3m-connect-view')\n], W3mConnectView);\nexport { W3mConnectView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-thumbnail {\n position: absolute;\n }\n\n wui-icon-box {\n position: absolute;\n right: calc(var(--wui-spacing-3xs) * -1);\n bottom: calc(var(--wui-spacing-3xs) * -1);\n opacity: 0;\n transform: scale(0.5);\n transition-property: opacity, transform;\n transition-duration: var(--wui-duration-lg);\n transition-timing-function: var(--wui-ease-out-power-2);\n will-change: opacity, transform;\n }\n\n wui-text[align='center'] {\n width: 100%;\n padding: 0px var(--wui-spacing-l);\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n [data-retry='false'] wui-link {\n display: none;\n }\n\n [data-retry='true'] wui-link {\n display: block;\n opacity: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, CoreHelperUtil, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nexport class W3mConnectingWidget extends LitElement {\n constructor() {\n super();\n this.wallet = RouterController.state.data?.wallet;\n this.connector = RouterController.state.data?.connector;\n this.timeout = undefined;\n this.secondaryBtnLabel = 'Try again';\n this.secondaryBtnIcon = 'refresh';\n this.secondaryLabel = 'Accept connection request in the wallet';\n this.onConnect = undefined;\n this.onRender = undefined;\n this.onAutoConnect = undefined;\n this.isWalletConnect = true;\n this.unsubscribe = [];\n this.imageSrc = AssetUtil.getWalletImage(this.wallet) ?? AssetUtil.getConnectorImage(this.connector);\n this.name = this.wallet?.name ?? this.connector?.name ?? 'Wallet';\n this.isRetrying = false;\n this.uri = ConnectionController.state.wcUri;\n this.error = ConnectionController.state.wcError;\n this.ready = false;\n this.showRetry = false;\n this.buffering = false;\n this.isMobile = false;\n this.onRetry = undefined;\n this.unsubscribe.push(...[\n ConnectionController.subscribeKey('wcUri', val => {\n this.uri = val;\n if (this.isRetrying && this.onRetry) {\n this.isRetrying = false;\n this.onConnect?.();\n }\n }),\n ConnectionController.subscribeKey('wcError', val => (this.error = val)),\n ConnectionController.subscribeKey('buffering', val => (this.buffering = val))\n ]);\n }\n firstUpdated() {\n this.onAutoConnect?.();\n this.showRetry = !this.onAutoConnect;\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n clearTimeout(this.timeout);\n }\n render() {\n this.onRender?.();\n this.onShowRetry();\n const subLabel = this.error\n ? 'Connection can be declined if a previous request is still active'\n : this.secondaryLabel;\n let label = `Continue in ${this.name}`;\n if (this.buffering) {\n label = 'Connecting...';\n }\n if (this.error) {\n label = 'Connection declined';\n }\n return html `\n \n \n \n\n ${this.error ? null : this.loaderTemplate()}\n\n \n \n\n \n \n ${label}\n \n ${subLabel}\n \n\n \n \n ${this.secondaryBtnLabel}\n \n \n\n ${this.isWalletConnect\n ? html `\n \n \n \n Copy link\n \n \n `\n : null}\n\n \n `;\n }\n onShowRetry() {\n if (this.error && !this.showRetry) {\n this.showRetry = true;\n const retryButton = this.shadowRoot?.querySelector('wui-button');\n retryButton?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n onTryAgain() {\n if (!this.buffering) {\n ConnectionController.setWcError(false);\n if (this.onRetry) {\n this.isRetrying = true;\n this.onRetry?.();\n }\n else {\n this.onConnect?.();\n }\n }\n }\n loaderTemplate() {\n const borderRadiusMaster = ThemeController.state.themeVariables['--w3m-border-radius-master'];\n const radius = borderRadiusMaster ? parseInt(borderRadiusMaster.replace('px', ''), 10) : 4;\n return html ``;\n }\n onCopyUri() {\n try {\n if (this.uri) {\n CoreHelperUtil.copyToClopboard(this.uri);\n SnackController.showSuccess('Link copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n}\nW3mConnectingWidget.styles = styles;\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"uri\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"error\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"ready\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"buffering\", void 0);\n__decorate([\n property({ type: Boolean })\n], W3mConnectingWidget.prototype, \"isMobile\", void 0);\n__decorate([\n property()\n], W3mConnectingWidget.prototype, \"onRetry\", void 0);\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, EventsController, ModalController, OptionsController, RouterController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingExternalView = class W3mConnectingExternalView extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.connector) {\n throw new Error('w3m-connecting-view: No connector provided');\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: {\n name: this.connector.name ?? 'Unknown',\n platform: 'browser'\n }\n });\n this.onConnect = this.onConnectProxy.bind(this);\n this.onAutoConnect = this.onConnectProxy.bind(this);\n this.isWalletConnect = false;\n }\n async onConnectProxy() {\n try {\n this.error = false;\n if (this.connector) {\n if (this.connector.imageUrl) {\n StorageUtil.setConnectedWalletImageUrl(this.connector.imageUrl);\n }\n await ConnectionController.connectExternal(this.connector);\n if (OptionsController.state.isSiweEnabled) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.close();\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'browser', name: this.connector.name || 'Unknown' }\n });\n }\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n this.error = true;\n }\n }\n};\nW3mConnectingExternalView = __decorate([\n customElement('w3m-connecting-external-view')\n], W3mConnectingExternalView);\nexport { W3mConnectingExternalView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, ConnectorController, ConstantsUtil, CoreHelperUtil, EventsController, ModalController, OptionsController, RouterController, SnackController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mConnectingWcView = class W3mConnectingWcView extends LitElement {\n constructor() {\n super();\n this.interval = undefined;\n this.lastRetry = Date.now();\n this.wallet = RouterController.state.data?.wallet;\n this.platform = undefined;\n this.platforms = [];\n this.initializeConnection();\n this.interval = setInterval(this.initializeConnection.bind(this), ConstantsUtil.TEN_SEC_MS);\n }\n disconnectedCallback() {\n clearTimeout(this.interval);\n }\n render() {\n if (!this.wallet) {\n return html ``;\n }\n this.determinePlatforms();\n return html `\n ${this.headerTemplate()}\n
      ${this.platformTemplate()}
      \n `;\n }\n async initializeConnection(retry = false) {\n try {\n const { wcPairingExpiry } = ConnectionController.state;\n if (retry || CoreHelperUtil.isPairingExpired(wcPairingExpiry)) {\n ConnectionController.connectWalletConnect();\n if (this.wallet) {\n const url = AssetUtil.getWalletImage(this.wallet);\n if (url) {\n StorageUtil.setConnectedWalletImageUrl(url);\n }\n }\n else {\n const connectors = ConnectorController.state.connectors;\n const connector = connectors.find(c => c.type === 'WALLET_CONNECT');\n const url = AssetUtil.getConnectorImage(connector);\n if (url) {\n StorageUtil.setConnectedWalletImageUrl(url);\n }\n }\n await ConnectionController.state.wcPromise;\n this.finalizeConnection();\n if (OptionsController.state.isSiweEnabled) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.close();\n }\n }\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n ConnectionController.setWcError(true);\n if (CoreHelperUtil.isAllowedRetry(this.lastRetry)) {\n SnackController.showError('Declined');\n this.lastRetry = Date.now();\n this.initializeConnection(true);\n }\n }\n }\n finalizeConnection() {\n const { wcLinking, recentWallet } = ConnectionController.state;\n if (wcLinking) {\n StorageUtil.setWalletConnectDeepLink(wcLinking);\n }\n if (recentWallet) {\n StorageUtil.setWeb3ModalRecent(recentWallet);\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: {\n method: wcLinking ? 'mobile' : 'qrcode',\n name: this.wallet?.name || 'Unknown'\n }\n });\n }\n determinePlatforms() {\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-view:determinePlatforms No wallet');\n }\n if (this.platform) {\n return;\n }\n const { mobile_link, desktop_link, webapp_link, injected, rdns } = this.wallet;\n const injectedIds = injected?.map(({ injected_id }) => injected_id).filter(Boolean);\n const browserIds = rdns ? [rdns] : injectedIds ?? [];\n const isBrowser = browserIds.length;\n const isMobileWc = mobile_link;\n const isWebWc = webapp_link;\n const isBrowserInstalled = ConnectionController.checkInstalled(browserIds);\n const isBrowserWc = isBrowser && isBrowserInstalled;\n const isDesktopWc = desktop_link && !CoreHelperUtil.isMobile();\n if (isBrowserWc) {\n this.platforms.push('browser');\n }\n if (isMobileWc) {\n this.platforms.push(CoreHelperUtil.isMobile() ? 'mobile' : 'qrcode');\n }\n if (isWebWc) {\n this.platforms.push('web');\n }\n if (isDesktopWc) {\n this.platforms.push('desktop');\n }\n if (!isBrowserWc && isBrowser) {\n this.platforms.push('unsupported');\n }\n this.platform = this.platforms[0];\n }\n platformTemplate() {\n switch (this.platform) {\n case 'browser':\n return html ``;\n case 'desktop':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'web':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'mobile':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'qrcode':\n return html ``;\n default:\n return html ``;\n }\n }\n headerTemplate() {\n const multiPlatform = this.platforms.length > 1;\n if (!multiPlatform) {\n return null;\n }\n return html `\n \n \n `;\n }\n async onSelectPlatform(platform) {\n const container = this.shadowRoot?.querySelector('div');\n if (container) {\n await container.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.platform = platform;\n container.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n};\n__decorate([\n state()\n], W3mConnectingWcView.prototype, \"platform\", void 0);\n__decorate([\n state()\n], W3mConnectingWcView.prototype, \"platforms\", void 0);\nW3mConnectingWcView = __decorate([\n customElement('w3m-connecting-wc-view')\n], W3mConnectingWcView);\nexport { W3mConnectingWcView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nlet W3mDownloadsView = class W3mDownloadsView extends LitElement {\n constructor() {\n super(...arguments);\n this.wallet = RouterController.state.data?.wallet;\n }\n render() {\n if (!this.wallet) {\n throw new Error('w3m-downloads-view');\n }\n return html `\n \n ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}\n ${this.homepageTemplate()}\n \n `;\n }\n chromeTemplate() {\n if (!this.wallet?.chrome_store) {\n return null;\n }\n return html `\n Chrome Extension\n `;\n }\n iosTemplate() {\n if (!this.wallet?.app_store) {\n return null;\n }\n return html `\n iOS App\n `;\n }\n androidTemplate() {\n if (!this.wallet?.play_store) {\n return null;\n }\n return html `\n Android App\n `;\n }\n homepageTemplate() {\n if (!this.wallet?.homepage) {\n return null;\n }\n return html `\n \n Website\n \n `;\n }\n onChromeStore() {\n if (this.wallet?.chrome_store) {\n CoreHelperUtil.openHref(this.wallet.chrome_store, '_blank');\n }\n }\n onAppStore() {\n if (this.wallet?.app_store) {\n CoreHelperUtil.openHref(this.wallet.app_store, '_blank');\n }\n }\n onPlayStore() {\n if (this.wallet?.play_store) {\n CoreHelperUtil.openHref(this.wallet.play_store, '_blank');\n }\n }\n onHomePage() {\n if (this.wallet?.homepage) {\n CoreHelperUtil.openHref(this.wallet.homepage, '_blank');\n }\n }\n};\nW3mDownloadsView = __decorate([\n customElement('w3m-downloads-view')\n], W3mDownloadsView);\nexport { W3mDownloadsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, CoreHelperUtil, OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nconst EXPLORER = 'https://walletconnect.com/explorer';\nlet W3mGetWalletView = class W3mGetWalletView extends LitElement {\n render() {\n return html `\n \n ${this.recommendedWalletsTemplate()}\n {\n CoreHelperUtil.openHref('https://walletconnect.com/explorer?type=wallet', '_blank');\n }}\n >\n \n `;\n }\n recommendedWalletsTemplate() {\n const { recommended, featured } = ApiController.state;\n const { customWallets } = OptionsController.state;\n const wallets = [...featured, ...(customWallets ?? []), ...recommended].slice(0, 4);\n return wallets.map(wallet => html `\n {\n CoreHelperUtil.openHref(wallet.homepage ?? EXPLORER, '_blank');\n }}\n >\n `);\n }\n};\nW3mGetWalletView = __decorate([\n customElement('w3m-get-wallet-view')\n], W3mGetWalletView);\nexport { W3mGetWalletView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n wui-icon-box {\n position: absolute;\n right: 4px;\n bottom: 0;\n opacity: 0;\n transform: scale(0.5);\n z-index: 1;\n }\n\n wui-button {\n display: none;\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n wui-button[data-retry='true'] {\n display: block;\n opacity: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectorController, NetworkController, OptionsController, RouterController, RouterUtil, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworkSwitchView = class W3mNetworkSwitchView extends LitElement {\n constructor() {\n super();\n this.network = RouterController.state.data?.network;\n this.unsubscribe = [];\n this.showRetry = false;\n this.error = false;\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n firstUpdated() {\n this.onSwitchNetwork();\n }\n render() {\n if (!this.network) {\n throw new Error('w3m-network-switch-view: No network provided');\n }\n this.onShowRetry();\n const label = this.getLabel();\n const subLabel = this.getSubLabel();\n return html `\n \n \n \n\n ${this.error ? null : html ``}\n\n \n \n\n \n ${label}\n ${subLabel}\n \n\n \n \n Try again\n \n \n `;\n }\n getSubLabel() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector && type === 'EMAIL') {\n return '';\n }\n return this.error\n ? 'Switch can be declined if chain is not supported by a wallet or previous request is still active'\n : 'Accept connection request in your wallet';\n }\n getLabel() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector && type === 'EMAIL') {\n return `Switching to ${this.network?.name ?? 'Unknown'} network...`;\n }\n return this.error ? 'Switch declined' : 'Approve in wallet';\n }\n onShowRetry() {\n if (this.error && !this.showRetry) {\n this.showRetry = true;\n const retryButton = this.shadowRoot?.querySelector('wui-button');\n retryButton?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n async onSwitchNetwork() {\n try {\n this.error = false;\n if (this.network) {\n await NetworkController.switchActiveNetwork(this.network);\n if (!OptionsController.state.isSiweEnabled) {\n RouterUtil.navigateAfterNetworkSwitch();\n }\n }\n }\n catch {\n this.error = true;\n }\n }\n};\nW3mNetworkSwitchView.styles = styles;\n__decorate([\n state()\n], W3mNetworkSwitchView.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mNetworkSwitchView.prototype, \"error\", void 0);\nW3mNetworkSwitchView = __decorate([\n customElement('w3m-network-switch-view')\n], W3mNetworkSwitchView);\nexport { W3mNetworkSwitchView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, EventsController, NetworkController, RouterController, RouterUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworksView = class W3mNetworksView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.unsubscribe.push(NetworkController.subscribeKey('caipNetwork', val => (this.caipNetwork = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.networksTemplate()}\n \n\n \n\n \n \n Your connected wallet may not support some of the networks available for this dApp\n \n \n \n What is a network\n \n \n `;\n }\n onNetworkHelp() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORK_HELP' });\n RouterController.push('WhatIsANetwork');\n }\n networksTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks, supportsAllNetworks } = NetworkController.state;\n const sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n return sortedNetworks?.map(network => html `\n this.onSwitchNetwork(network)}\n .disabled=${!supportsAllNetworks && !approvedCaipNetworkIds?.includes(network.id)}\n data-testid=${`w3m-network-switch-${network.name ?? network.id}`}\n >\n `);\n }\n async onSwitchNetwork(network) {\n const { isConnected } = AccountController.state;\n const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state;\n const { data } = RouterController.state;\n if (isConnected && caipNetwork?.id !== network.id) {\n if (approvedCaipNetworkIds?.includes(network.id)) {\n await NetworkController.switchActiveNetwork(network);\n RouterUtil.navigateAfterNetworkSwitch();\n }\n else if (supportsAllNetworks) {\n RouterController.push('SwitchNetwork', { ...data, network });\n }\n }\n else if (!isConnected) {\n NetworkController.setCaipNetwork(network);\n RouterController.push('Connect');\n }\n }\n};\nW3mNetworksView.styles = styles;\n__decorate([\n state()\n], W3mNetworksView.prototype, \"caipNetwork\", void 0);\nW3mNetworksView = __decorate([\n customElement('w3m-networks-view')\n], W3mNetworksView);\nexport { W3mNetworksView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n padding: var(--wui-spacing-m);\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n\n :host > wui-flex > wui-flex {\n width: 100%;\n }\n\n wui-transaction-list-item-loader {\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DateUtil } from '@web3modal/common';\nimport { AccountController, AssetController, OnRampController, OptionsController, TransactionsController } from '@web3modal/core';\nimport { TransactionUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nconst LOADING_ITEM_COUNT = 7;\nlet W3mOnRampActivityView = class W3mOnRampActivityView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.refetchTimeout = undefined;\n this.selectedOnRampProvider = OnRampController.state.selectedProvider;\n this.loading = false;\n this.coinbaseTransactions = TransactionsController.state.coinbaseTransactions;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('selectedProvider', val => {\n this.selectedOnRampProvider = val;\n }),\n AssetController.subscribeKey('tokenImages', val => (this.tokenImages = val)),\n () => {\n clearTimeout(this.refetchTimeout);\n },\n TransactionsController.subscribe(val => {\n this.coinbaseTransactions = { ...val.coinbaseTransactions };\n })\n ]);\n TransactionsController.clearCursor();\n this.fetchTransactions();\n }\n render() {\n return html `\n \n ${this.loading ? this.templateLoading() : this.templateTransactionsByYear()}\n \n `;\n }\n templateTransactions(transactions) {\n return transactions?.map(transaction => {\n const date = DateUtil.formatDate(transaction?.metadata?.minedAt);\n const transfer = transaction.transfers[0];\n const fungibleInfo = transfer?.fungible_info;\n if (!fungibleInfo) {\n return null;\n }\n const icon = fungibleInfo?.icon?.url || this.tokenImages?.[fungibleInfo.symbol || ''];\n return html `\n \n `;\n });\n }\n templateTransactionsByYear() {\n const sortedYearKeys = Object.keys(this.coinbaseTransactions).sort().reverse();\n return sortedYearKeys.map(year => {\n const yearInt = parseInt(year, 10);\n const sortedMonthIndexes = new Array(12)\n .fill(null)\n .map((_, idx) => idx)\n .reverse();\n return sortedMonthIndexes.map(month => {\n const groupTitle = TransactionUtil.getTransactionGroupTitle(yearInt, month);\n const transactions = this.coinbaseTransactions[yearInt]?.[month];\n if (!transactions) {\n return null;\n }\n return html `\n \n \n ${groupTitle}\n \n \n ${this.templateTransactions(transactions)}\n \n \n `;\n });\n });\n }\n async fetchTransactions() {\n const provider = 'coinbase';\n if (provider === 'coinbase') {\n await this.fetchCoinbaseTransactions();\n }\n }\n async fetchCoinbaseTransactions() {\n const address = AccountController.state.address;\n const projectId = OptionsController.state.projectId;\n if (!address) {\n throw new Error('No address found');\n }\n if (!projectId) {\n throw new Error('No projectId found');\n }\n this.loading = true;\n await TransactionsController.fetchTransactions(address, 'coinbase');\n this.loading = false;\n this.refetchLoadingTransactions();\n }\n refetchLoadingTransactions() {\n const today = new Date();\n const currentMonthTxs = this.coinbaseTransactions[today.getFullYear()]?.[today.getMonth()] || [];\n const loadingTransactions = currentMonthTxs.filter(transaction => transaction.metadata.status === 'ONRAMP_TRANSACTION_STATUS_IN_PROGRESS');\n if (loadingTransactions.length === 0) {\n clearTimeout(this.refetchTimeout);\n return;\n }\n this.refetchTimeout = setTimeout(async () => {\n const address = AccountController.state.address;\n await TransactionsController.fetchTransactions(address, 'coinbase');\n this.refetchLoadingTransactions();\n }, 3000);\n }\n templateLoading() {\n return Array(LOADING_ITEM_COUNT)\n .fill(html ` `)\n .map(item => item);\n }\n};\nW3mOnRampActivityView.styles = styles;\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"selectedOnRampProvider\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"coinbaseTransactions\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"tokenImages\", void 0);\nW3mOnRampActivityView = __decorate([\n customElement('w3m-onramp-activity-view')\n], W3mOnRampActivityView);\nexport { W3mOnRampActivityView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OnRampController, ModalController, AssetController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mOnrampFiatSelectView = class W3mOnrampFiatSelectView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedCurrency = OnRampController.state.paymentCurrency;\n this.currencies = OnRampController.state.paymentCurrencies;\n this.currencyImages = AssetController.state.currencyImages;\n this.unsubscribe.push(...[\n OnRampController.subscribe(val => {\n this.selectedCurrency = val.paymentCurrency;\n this.currencies = val.paymentCurrencies;\n }),\n AssetController.subscribeKey('currencyImages', val => (this.currencyImages = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.currenciesTemplate()}\n \n \n `;\n }\n currenciesTemplate() {\n return this.currencies.map(currency => html `\n this.selectCurrency(currency)}\n variant=\"image\"\n >\n ${currency.id}\n \n `);\n }\n selectCurrency(currency) {\n if (!currency) {\n return;\n }\n OnRampController.setPaymentCurrency(currency);\n ModalController.close();\n }\n};\nW3mOnrampFiatSelectView.styles = styles;\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"currencies\", void 0);\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"currencyImages\", void 0);\nW3mOnrampFiatSelectView = __decorate([\n customElement('w3m-onramp-fiat-select-view')\n], W3mOnrampFiatSelectView);\nexport { W3mOnrampFiatSelectView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, AccountController, ConstantsUtil, OnRampController, RouterController, NetworkController, BlockchainApiController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mOnRampProvidersView = class W3mOnRampProvidersView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.providers = OnRampController.state.providers;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('providers', val => {\n this.providers = val;\n })\n ]);\n }\n firstUpdated() {\n const urlPromises = this.providers.map(async (provider) => {\n if (provider.name === 'coinbase') {\n return await this.getCoinbaseOnRampURL();\n }\n return Promise.resolve(provider?.url);\n });\n Promise.all(urlPromises).then(urls => {\n this.providers = this.providers.map((provider, index) => ({\n ...provider,\n url: urls[index] || ''\n }));\n });\n }\n render() {\n return html `\n \n ${this.onRampProvidersTemplate()}\n \n \n `;\n }\n onRampProvidersTemplate() {\n return this.providers.map(provider => html `\n {\n this.onClickProvider(provider);\n }}\n ?disabled=${!provider.url}\n >\n `);\n }\n onClickProvider(provider) {\n OnRampController.setSelectedProvider(provider);\n RouterController.push('BuyInProgress');\n CoreHelperUtil.openHref(provider.url, 'popupWindow', 'width=600,height=800,scrollbars=yes');\n }\n async getCoinbaseOnRampURL() {\n const address = AccountController.state.address;\n const network = NetworkController.state.caipNetwork;\n if (!address) {\n throw new Error('No address found');\n }\n if (!network?.name) {\n throw new Error('No network found');\n }\n const defaultNetwork = ConstantsUtil.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[network.name] ?? ConstantsUtil.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN;\n const purchaseCurrency = OnRampController.state.purchaseCurrency;\n const assets = purchaseCurrency\n ? [purchaseCurrency.symbol]\n : OnRampController.state.purchaseCurrencies.map(currency => currency.symbol);\n return await BlockchainApiController.generateOnRampURL({\n defaultNetwork,\n destinationWallets: [\n { address, blockchains: ConstantsUtil.WC_COINBASE_PAY_SDK_CHAINS, assets }\n ],\n partnerUserId: address,\n purchaseAmount: OnRampController.state.purchaseAmount\n });\n }\n};\n__decorate([\n state()\n], W3mOnRampProvidersView.prototype, \"providers\", void 0);\nW3mOnRampProvidersView = __decorate([\n customElement('w3m-onramp-providers-view')\n], W3mOnRampProvidersView);\nexport { W3mOnRampProvidersView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OnRampController, ModalController, AssetController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mOnrampTokensView = class W3mOnrampTokensView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedCurrency = OnRampController.state.purchaseCurrencies;\n this.tokens = OnRampController.state.purchaseCurrencies;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(...[\n OnRampController.subscribe(val => {\n this.selectedCurrency = val.purchaseCurrencies;\n this.tokens = val.purchaseCurrencies;\n }),\n AssetController.subscribeKey('tokenImages', val => (this.tokenImages = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.currenciesTemplate()}\n \n \n `;\n }\n currenciesTemplate() {\n return this.tokens.map(token => html `\n this.selectToken(token)}\n variant=\"image\"\n >\n \n ${token.name}\n ${token.symbol}\n \n \n `);\n }\n selectToken(currency) {\n if (!currency) {\n return;\n }\n OnRampController.setPurchaseCurrency(currency);\n ModalController.close();\n }\n};\nW3mOnrampTokensView.styles = styles;\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"tokens\", void 0);\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"tokenImages\", void 0);\nW3mOnrampTokensView = __decorate([\n customElement('w3m-onramp-token-select-view')\n], W3mOnrampTokensView);\nexport { W3mOnrampTokensView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .action-button {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n }\n\n .action-button:disabled {\n border-color: 1px solid var(--wui-gray-glass-005);\n }\n\n .convert-inputs-container {\n position: relative;\n }\n\n .replace-tokens-button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n gap: var(--wui-spacing-1xs);\n height: 40px;\n width: 40px;\n padding: var(--wui-spacing-xs);\n border: none;\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-005);\n transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1);\n will-change: background-color;\n z-index: 20;\n }\n\n .replace-tokens-button:hover {\n background: var(--wui-gray-glass-010);\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n transition: background 0.2s linear;\n }\n\n .details-container > wui-flex > button:hover {\n background: var(--wui-gray-glass-002);\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ConvertController, RouterController, CoreHelperUtil, NetworkController, ModalController, ConstantsUtil } from '@web3modal/core';\nimport { NumberUtil } from '@web3modal/common';\nlet W3mConvertView = class W3mConvertView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.detailsOpen = false;\n this.caipNetworkId = NetworkController.state.caipNetwork?.id;\n this.initialized = ConvertController.state.initialized;\n this.loading = ConvertController.state.loading;\n this.loadingPrices = ConvertController.state.loadingPrices;\n this.sourceToken = ConvertController.state.sourceToken;\n this.sourceTokenAmount = ConvertController.state.sourceTokenAmount;\n this.sourceTokenPriceInUSD = ConvertController.state.sourceTokenPriceInUSD;\n this.toToken = ConvertController.state.toToken;\n this.toTokenAmount = ConvertController.state.toTokenAmount;\n this.toTokenPriceInUSD = ConvertController.state.toTokenPriceInUSD;\n this.inputError = ConvertController.state.inputError;\n this.gasPriceInUSD = ConvertController.state.gasPriceInUSD;\n this.priceImpact = ConvertController.state.priceImpact;\n this.maxSlippage = ConvertController.state.maxSlippage;\n this.transactionLoading = ConvertController.state.transactionLoading;\n this.onDebouncedGetSwapCalldata = CoreHelperUtil.debounce(async () => {\n await ConvertController.convertTokens();\n }, 500);\n NetworkController.subscribeKey('caipNetwork', newCaipNetwork => {\n if (this.caipNetworkId !== newCaipNetwork?.id) {\n this.caipNetworkId = newCaipNetwork?.id;\n ConvertController.resetTokens();\n ConvertController.resetValues();\n ConvertController.initializeState();\n }\n });\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', isOpen => {\n if (!isOpen) {\n ConvertController.resetValues();\n }\n }),\n RouterController.subscribeKey('view', newRoute => {\n if (!newRoute.includes('Convert')) {\n ConvertController.resetValues();\n }\n }),\n ConvertController.subscribe(newState => {\n this.initialized = newState.initialized;\n this.loading = newState.loading;\n this.loadingPrices = newState.loadingPrices;\n this.transactionLoading = newState.transactionLoading;\n this.sourceToken = newState.sourceToken;\n this.sourceTokenAmount = newState.sourceTokenAmount;\n this.sourceTokenPriceInUSD = newState.sourceTokenPriceInUSD;\n this.toToken = newState.toToken;\n this.toTokenAmount = newState.toTokenAmount;\n this.toTokenPriceInUSD = newState.toTokenPriceInUSD;\n this.inputError = newState.inputError;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.priceImpact = newState.priceImpact;\n this.maxSlippage = newState.maxSlippage;\n })\n ]);\n this.watchTokensAndValues();\n }\n firstUpdated() {\n if (!this.initialized) {\n ConvertController.initializeState();\n }\n }\n disconnectedCallback() {\n ConvertController.setLoading(false);\n this.unsubscribe.forEach(unsubscribe => unsubscribe?.());\n clearInterval(this.interval);\n }\n render() {\n return html `\n \n ${this.initialized ? this.templateSwap() : this.templateLoading()}\n \n `;\n }\n watchTokensAndValues() {\n this.interval = setInterval(() => {\n ConvertController.getNetworkTokenPrice();\n ConvertController.getMyTokensWithBalance();\n ConvertController.refreshConvertValues();\n }, 20000);\n }\n templateSwap() {\n return html `\n \n \n ${this.templateTokenInput('sourceToken', this.sourceToken)}\n ${this.templateTokenInput('toToken', this.toToken)} ${this.templateReplaceTokensButton()}\n \n ${this.templateDetails()} ${this.templateActionButton()}\n \n `;\n }\n actionButtonLabel() {\n if (this.inputError) {\n return this.inputError;\n }\n return 'Review convert';\n }\n templateReplaceTokensButton() {\n return html `\n \n `;\n }\n templateLoading() {\n return html `\n \n\n \n `;\n }\n templateTokenInput(target, token) {\n const myToken = ConvertController.state.myTokensWithBalance?.find(ct => ct?.address === token?.address);\n const amount = target === 'toToken' ? this.toTokenAmount : this.sourceTokenAmount;\n const price = target === 'toToken' ? this.toTokenPriceInUSD : this.sourceTokenPriceInUSD;\n let value = parseFloat(amount) * price;\n if (target === 'toToken') {\n value -= this.gasPriceInUSD || 0;\n }\n return html ``;\n }\n onSetMaxValue(target, balance) {\n const token = target === 'sourceToken' ? this.sourceToken : this.toToken;\n const isNetworkToken = token?.address === ConstantsUtil.NATIVE_TOKEN_ADDRESS;\n let value = '0';\n if (!balance) {\n value = '0';\n this.handleChangeAmount(target, value);\n return;\n }\n if (!this.gasPriceInUSD) {\n value = balance;\n this.handleChangeAmount(target, value);\n return;\n }\n const amountOfTokenGasRequires = NumberUtil.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD);\n const maxValue = isNetworkToken\n ? NumberUtil.bigNumber(balance).minus(amountOfTokenGasRequires)\n : NumberUtil.bigNumber(balance);\n this.handleChangeAmount(target, maxValue.isGreaterThan(0) ? maxValue.toFixed(20) : '0');\n }\n templateDetails() {\n if (this.loading || this.inputError) {\n return null;\n }\n if (!this.sourceToken || !this.toToken || !this.sourceTokenAmount || !this.toTokenAmount) {\n return null;\n }\n const toTokenConvertedAmount = this.sourceTokenPriceInUSD && this.toTokenPriceInUSD\n ? (1 / this.toTokenPriceInUSD) * this.sourceTokenPriceInUSD\n : 0;\n return html `\n \n `;\n }\n handleChangeAmount(target, value) {\n ConvertController.clearError();\n if (target === 'sourceToken') {\n ConvertController.setSourceTokenAmount(value);\n }\n else {\n ConvertController.setToTokenAmount(value);\n }\n this.onDebouncedGetSwapCalldata();\n }\n templateActionButton() {\n const haveNoTokenSelected = !this.toToken || !this.sourceToken;\n const loading = this.loading || this.loadingPrices || this.transactionLoading;\n return html ` \n \n ${this.actionButtonLabel()}\n \n `;\n }\n onSwitchTokens() {\n ConvertController.switchTokens();\n }\n onConvertPreview() {\n RouterController.push('ConvertPreview');\n }\n};\nW3mConvertView.styles = styles;\n__decorate([\n state()\n], W3mConvertView.prototype, \"interval\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"detailsOpen\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"caipNetworkId\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"initialized\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"loadingPrices\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"inputError\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"priceImpact\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"maxSlippage\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"transactionLoading\", void 0);\nW3mConvertView = __decorate([\n customElement('w3m-convert-view')\n], W3mConvertView);\nexport { W3mConvertView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n .preview-container,\n .details-container {\n width: 100%;\n }\n\n .token-image {\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n border-radius: 12px;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .token-item {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n height: 40px;\n border: none;\n border-radius: 80px;\n background: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n cursor: pointer;\n transition: background 0.2s linear;\n }\n\n .token-item:hover {\n background: var(--wui-gray-glass-005);\n }\n\n .preview-token-details-container {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .action-buttons-container {\n width: 100%;\n gap: var(--wui-spacing-xs);\n }\n\n .action-buttons-container > button {\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n height: 48px;\n border-radius: var(--wui-border-radius-xs);\n border: none;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n .action-buttons-container > button:disabled {\n opacity: 0.8;\n cursor: not-allowed;\n }\n\n .cancel-button:hover,\n .convert-button:hover {\n cursor: pointer;\n }\n\n .action-buttons-container > button.cancel-button {\n flex: 2;\n }\n\n .action-buttons-container > button.convert-button {\n flex: 4;\n background-color: var(--wui-color-accent-090);\n }\n\n .action-buttons-container > button.convert-button > wui-text {\n color: white;\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n transition: background 0.2s linear;\n }\n\n .details-container > wui-flex > button:hover {\n background: var(--wui-gray-glass-002);\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { AccountController, NetworkController, RouterController, ConvertController, ConstantsUtil } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mConvertPreviewView = class W3mConvertPreviewView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.detailsOpen = true;\n this.approvalTransaction = ConvertController.state.approvalTransaction;\n this.convertTransaction = ConvertController.state.convertTransaction;\n this.sourceToken = ConvertController.state.sourceToken;\n this.sourceTokenAmount = ConvertController.state.sourceTokenAmount ?? '';\n this.sourceTokenPriceInUSD = ConvertController.state.sourceTokenPriceInUSD;\n this.toToken = ConvertController.state.toToken;\n this.toTokenAmount = ConvertController.state.toTokenAmount ?? '';\n this.toTokenPriceInUSD = ConvertController.state.toTokenPriceInUSD;\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.transactionLoading = ConvertController.state.transactionLoading;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.gasPriceInUSD = ConvertController.state.gasPriceInUSD;\n this.priceImpact = ConvertController.state.priceImpact;\n this.maxSlippage = ConvertController.state.maxSlippage;\n this.unsubscribe.push(...[\n AccountController.subscribeKey('balanceSymbol', newBalanceSymbol => {\n if (this.balanceSymbol !== newBalanceSymbol) {\n RouterController.goBack();\n }\n }),\n NetworkController.subscribeKey('caipNetwork', newCaipNetwork => {\n if (this.caipNetwork !== newCaipNetwork) {\n this.caipNetwork = newCaipNetwork;\n }\n }),\n ConvertController.subscribe(newState => {\n this.approvalTransaction = newState.approvalTransaction;\n this.convertTransaction = newState.convertTransaction;\n this.sourceToken = newState.sourceToken;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.toToken = newState.toToken;\n this.transactionLoading = newState.transactionLoading;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.toTokenPriceInUSD = newState.toTokenPriceInUSD;\n this.sourceTokenAmount = newState.sourceTokenAmount ?? '';\n this.toTokenAmount = newState.toTokenAmount ?? '';\n this.priceImpact = newState.priceImpact;\n this.maxSlippage = newState.maxSlippage;\n })\n ]);\n }\n render() {\n return html `\n ${this.templateSwap()}\n `;\n }\n templateSwap() {\n const sourceTokenText = `${UiHelperUtil.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`;\n const toTokenText = `${UiHelperUtil.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`;\n const sourceTokenValue = parseFloat(this.sourceTokenAmount) * this.sourceTokenPriceInUSD;\n const toTokenValue = parseFloat(this.toTokenAmount) * this.toTokenPriceInUSD - (this.gasPriceInUSD || 0);\n const sentPrice = UiHelperUtil.formatNumberToLocalString(sourceTokenValue);\n const receivePrice = UiHelperUtil.formatNumberToLocalString(toTokenValue);\n return html `\n \n \n \n \n Send\n $${sentPrice}\n \n \n \n \n \n \n \n Receive\n $${receivePrice}\n \n \n \n \n \n\n ${this.templateDetails()}\n\n \n \n Review transaction carefully\n \n\n \n \n Cancel\n \n \n ${this.transactionLoading\n ? html ``\n : html `\n ${this.actionButtonLabel()}\n `}\n \n \n \n `;\n }\n templateDetails() {\n const toTokenConvertedAmount = this.sourceTokenPriceInUSD && this.toTokenPriceInUSD\n ? (1 / this.toTokenPriceInUSD) * this.sourceTokenPriceInUSD\n : 0;\n return html `\n \n `;\n }\n actionButtonLabel() {\n if (this.approvalTransaction) {\n return 'Approve';\n }\n return 'Convert';\n }\n onCancelTransaction() {\n RouterController.goBack();\n }\n onSendTransaction() {\n if (this.approvalTransaction) {\n ConvertController.sendTransactionForApproval(this.approvalTransaction);\n }\n else {\n ConvertController.sendTransactionForConvert(this.convertTransaction);\n }\n }\n};\nW3mConvertPreviewView.styles = styles;\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"detailsOpen\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"approvalTransaction\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"convertTransaction\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"caipNetwork\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"transactionLoading\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"balanceSymbol\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"priceImpact\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"maxSlippage\", void 0);\nW3mConvertPreviewView = __decorate([\n customElement('w3m-convert-preview-view')\n], W3mConvertPreviewView);\nexport { W3mConvertPreviewView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n --tokens-scroll--top-opacity: 0;\n --tokens-scroll--bottom-opacity: 1;\n --suggested-tokens-scroll--left-opacity: 0;\n --suggested-tokens-scroll--right-opacity: 1;\n }\n\n :host > wui-flex:first-child {\n overflow-y: hidden;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-height: none;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .search-input-container,\n .suggested-tokens-container {\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-s);\n }\n\n .tokens-container .tokens {\n padding: 0px var(--wui-spacing-s);\n padding-bottom: var(--wui-spacing-s);\n }\n\n .search-input-container {\n padding-top: var(--wui-spacing-s);\n }\n\n .suggested-tokens-container {\n overflow-x: auto;\n mask-image: linear-gradient(\n to right,\n rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px,\n rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px,\n black 50px,\n black 90px,\n black calc(100% - 90px),\n black calc(100% - 50px),\n rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px),\n rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100%\n );\n }\n\n .suggested-tokens-container::-webkit-scrollbar {\n display: none;\n }\n\n .tokens-container {\n border-top: 1px solid var(--wui-gray-glass-005);\n height: 100%;\n max-height: 390px;\n }\n\n .tokens {\n width: 100%;\n overflow-y: auto;\n mask-image: linear-gradient(\n to bottom,\n rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px,\n rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px,\n black 50px,\n black 90px,\n black calc(100% - 90px),\n black calc(100% - 50px),\n rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px),\n rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100%\n );\n }\n\n .network-search-input,\n .select-network-button {\n height: 40px;\n }\n\n .select-network-button {\n border: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xs);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background-color: transparent;\n border-radius: var(--wui-border-radius-xxs);\n padding: var(--wui-spacing-xs);\n align-items: center;\n transition: background-color 0.2s linear;\n }\n\n .select-network-button:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n .select-network-button > wui-image {\n width: 26px;\n height: 26px;\n border-radius: var(--wui-border-radius-xs);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, MathUtil } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { RouterController, ConvertController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mConvertSelectTokenView = class W3mConvertSelectTokenView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.targetToken = RouterController.state.data?.target;\n this.sourceToken = ConvertController.state.sourceToken;\n this.toToken = ConvertController.state.toToken;\n this.searchValue = '';\n this.unsubscribe.push(...[\n ConvertController.subscribe(newState => {\n this.sourceToken = newState.sourceToken;\n this.toToken = newState.toToken;\n })\n ]);\n this.watchTokens();\n }\n updated() {\n const suggestedTokensContainer = this.renderRoot?.querySelector('.suggested-tokens-container');\n suggestedTokensContainer?.addEventListener('scroll', this.handleSuggestedTokensScroll.bind(this));\n const tokensList = this.renderRoot?.querySelector('.tokens');\n tokensList?.addEventListener('scroll', this.handleTokenListScroll.bind(this));\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n const suggestedTokensContainer = this.renderRoot?.querySelector('.suggested-tokens-container');\n const tokensList = this.renderRoot?.querySelector('.tokens');\n suggestedTokensContainer?.removeEventListener('scroll', this.handleSuggestedTokensScroll.bind(this));\n tokensList?.removeEventListener('scroll', this.handleTokenListScroll.bind(this));\n clearInterval(this.interval);\n }\n render() {\n return html `\n \n ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()}\n \n `;\n }\n watchTokens() {\n this.interval = setInterval(() => {\n ConvertController.getNetworkTokenPrice();\n ConvertController.getMyTokensWithBalance();\n }, 5000);\n }\n onSelectToken(token) {\n if (this.targetToken === 'sourceToken') {\n ConvertController.setSourceToken(token);\n }\n else {\n ConvertController.setToToken(token);\n }\n RouterController.goBack();\n }\n templateSearchInput() {\n return html `\n \n \n \n `;\n }\n templateTokens() {\n const yourTokens = ConvertController.state.myTokensWithBalance\n ? Object.values(ConvertController.state.myTokensWithBalance)\n : [];\n const tokens = ConvertController.state.popularTokens\n ? ConvertController.state.popularTokens\n : [];\n const filteredYourTokens = this.filterTokensWithText(yourTokens, this.searchValue);\n const filteredTokens = this.filterTokensWithText(tokens, this.searchValue);\n return html `\n \n \n ${filteredYourTokens?.length > 0\n ? html `\n \n Your tokens\n \n ${filteredYourTokens.map(token => {\n const selected = token.symbol === this.sourceToken?.symbol ||\n token.symbol === this.toToken?.symbol;\n return html `\n {\n if (!selected) {\n this.onSelectToken(token);\n }\n }}\n >\n \n `;\n })}\n `\n : null}\n\n \n Popular tokens\n \n\n ${filteredTokens?.length > 0\n ? filteredTokens.map(token => html `\n this.onSelectToken(token)}\n >\n \n `)\n : null}\n \n \n `;\n }\n templateSuggestedTokens() {\n const tokens = ConvertController.state.suggestedTokens\n ? ConvertController.state.suggestedTokens.slice(0, 8)\n : null;\n if (!tokens) {\n return null;\n }\n return html `\n \n ${tokens.map(token => html `\n this.onSelectToken(token)}\n >\n \n `)}\n \n `;\n }\n onSearchInputChange(event) {\n this.searchValue = event.detail;\n }\n handleSuggestedTokensScroll() {\n const container = this.renderRoot?.querySelector('.suggested-tokens-container');\n if (!container) {\n return;\n }\n container.style.setProperty('--suggested-tokens-scroll--left-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollLeft).toString());\n container.style.setProperty('--suggested-tokens-scroll--right-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollWidth - container.scrollLeft - container.offsetWidth).toString());\n }\n handleTokenListScroll() {\n const container = this.renderRoot?.querySelector('.tokens');\n if (!container) {\n return;\n }\n container.style.setProperty('--tokens-scroll--top-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollTop).toString());\n container.style.setProperty('--tokens-scroll--bottom-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollHeight - container.scrollTop - container.offsetHeight).toString());\n }\n filterTokensWithText(tokens, text) {\n return tokens.filter(token => `${token.symbol} ${token.name} ${token.address}`.toLowerCase().includes(text.toLowerCase()));\n }\n};\nW3mConvertSelectTokenView.styles = styles;\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"interval\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"targetToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"searchValue\", void 0);\nW3mConvertSelectTokenView = __decorate([\n customElement('w3m-convert-select-token-view')\n], W3mConvertSelectTokenView);\nexport { W3mConvertSelectTokenView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n padding: var(--wui-spacing-m);\n }\n\n :host > wui-flex:first-child::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mTransactionsView = class W3mTransactionsView extends LitElement {\n render() {\n return html `\n \n \n \n `;\n }\n};\nW3mTransactionsView.styles = styles;\nW3mTransactionsView = __decorate([\n customElement('w3m-transactions-view')\n], W3mTransactionsView);\nexport { W3mTransactionsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nconst data = [\n {\n images: ['network', 'layers', 'system'],\n title: 'The system’s nuts and bolts',\n text: 'A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services.'\n },\n {\n images: ['noun', 'defiAlt', 'dao'],\n title: 'Designed for different uses',\n text: 'Each network is designed differently, and may therefore suit certain apps and experiences.'\n }\n];\nlet W3mWhatIsANetworkView = class W3mWhatIsANetworkView extends LitElement {\n render() {\n return html `\n \n \n {\n CoreHelperUtil.openHref('https://ethereum.org/en/developers/docs/networks/', '_blank');\n }}\n >\n Learn more\n \n \n \n `;\n }\n};\nW3mWhatIsANetworkView = __decorate([\n customElement('w3m-what-is-a-network-view')\n], W3mWhatIsANetworkView);\nexport { W3mWhatIsANetworkView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { EventsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nconst data = [\n {\n images: ['login', 'profile', 'lock'],\n title: 'One login for all of web3',\n text: 'Log in to any app by connecting your wallet. Say goodbye to countless passwords!'\n },\n {\n images: ['defi', 'nft', 'eth'],\n title: 'A home for your digital assets',\n text: 'A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.'\n },\n {\n images: ['browser', 'noun', 'dao'],\n title: 'Your gateway to a new web',\n text: 'With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.'\n }\n];\nlet W3mWhatIsAWalletView = class W3mWhatIsAWalletView extends LitElement {\n render() {\n return html `\n \n \n \n \n Get a wallet\n \n \n `;\n }\n onGetWallet() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_GET_WALLET' });\n RouterController.push('GetWallet');\n }\n};\nW3mWhatIsAWalletView = __decorate([\n customElement('w3m-what-is-a-wallet-view')\n], W3mWhatIsAWalletView);\nexport { W3mWhatIsAWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { RouterController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nlet W3mWhatIsABuyView = class W3mWhatIsABuyView extends LitElement {\n render() {\n return html `\n \n \n \n \n Quickly and easily buy digital assets!\n \n \n Simply select your preferred onramp provider and add digital assets to your account\n using your credit card or bank transfer\n \n \n \n \n Buy\n \n \n `;\n }\n};\nW3mWhatIsABuyView = __decorate([\n customElement('w3m-what-is-a-buy-view')\n], W3mWhatIsABuyView);\nexport { W3mWhatIsABuyView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-loading-spinner {\n margin: 9px auto;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { RouterController, SnackController, ConnectorController, CoreHelperUtil } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { W3mFrameHelpers } from '@web3modal/wallet';\nconst OTP_LENGTH = 6;\nlet W3mEmailOtpWidget = class W3mEmailOtpWidget extends LitElement {\n firstUpdated() {\n this.startOTPTimeout();\n }\n disconnectedCallback() {\n clearTimeout(this.OTPTimeout);\n }\n constructor() {\n super();\n this.loading = false;\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n this.error = '';\n this.otp = '';\n this.email = RouterController.state.data?.email;\n this.emailConnector = ConnectorController.getEmailConnector();\n }\n render() {\n if (!this.email) {\n throw new Error('w3m-email-otp-widget: No email provided');\n }\n const isResendDisabled = Boolean(this.timeoutTimeLeft);\n const footerLabels = this.getFooterLabels(isResendDisabled);\n return html `\n \n \n Enter the code we sent to\n ${this.email}\n \n\n The code expires in 20 minutes\n\n ${this.loading\n ? html ``\n : html ` \n \n ${this.error\n ? html `\n \n ${this.error}. Try Again\n \n `\n : null}\n `}\n\n \n ${footerLabels.title}\n \n ${footerLabels.action}\n \n \n \n `;\n }\n startOTPTimeout() {\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n this.OTPTimeout = setInterval(() => {\n if (this.timeoutTimeLeft > 0) {\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n }\n else {\n clearInterval(this.OTPTimeout);\n }\n }, 1000);\n }\n async onOtpInputChange(event) {\n try {\n if (!this.loading) {\n this.otp = event.detail;\n if (this.emailConnector && this.otp.length === OTP_LENGTH) {\n this.loading = true;\n await this.onOtpSubmit?.(this.otp);\n }\n }\n }\n catch (error) {\n this.error = CoreHelperUtil.parseError(error);\n this.loading = false;\n }\n }\n async onResendCode() {\n try {\n if (this.onOtpResend) {\n if (!this.loading && !this.timeoutTimeLeft) {\n this.error = '';\n this.otp = '';\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || !this.email) {\n throw new Error('w3m-email-otp-widget: Unable to resend email');\n }\n this.loading = true;\n await this.onOtpResend(this.email);\n this.startOTPTimeout();\n SnackController.showSuccess('Code email resent');\n }\n }\n else if (this.onStartOver) {\n this.onStartOver();\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n finally {\n this.loading = false;\n }\n }\n getFooterLabels(isResendDisabled) {\n if (this.onStartOver) {\n return {\n title: 'Something wrong?',\n action: `Try again ${isResendDisabled ? `in ${this.timeoutTimeLeft}s` : ''}`\n };\n }\n return {\n title: `Didn't receive it?`,\n action: `Resend ${isResendDisabled ? `in ${this.timeoutTimeLeft}s` : 'Code'}`\n };\n }\n};\nW3mEmailOtpWidget.styles = styles;\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"timeoutTimeLeft\", void 0);\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"error\", void 0);\nW3mEmailOtpWidget = __decorate([\n customElement('w3m-email-otp-widget')\n], W3mEmailOtpWidget);\nexport { W3mEmailOtpWidget };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, ConnectionController, ModalController, NetworkController, RouterController, AccountController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mEmailVerifyOtpView = class W3mEmailVerifyOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.unsubscribe = [];\n this.smartAccountDeployed = AccountController.state.smartAccountDeployed;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n await this.emailConnector.provider.connectOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n await ConnectionController.connectExternal(this.emailConnector);\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'email', name: this.emailConnector.name || 'Unknown' }\n });\n if (smartAccountEnabled && !this.smartAccountDeployed) {\n RouterController.push('UpgradeToSmartAccount');\n }\n else {\n ModalController.close();\n }\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onOtpResend = async (email) => {\n if (this.emailConnector) {\n await this.emailConnector.provider.connectEmail({ email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n }\n };\n this.unsubscribe.push(AccountController.subscribeKey('smartAccountDeployed', val => {\n this.smartAccountDeployed = val;\n }));\n }\n};\n__decorate([\n state()\n], W3mEmailVerifyOtpView.prototype, \"smartAccountDeployed\", void 0);\nW3mEmailVerifyOtpView = __decorate([\n customElement('w3m-email-verify-otp-view')\n], W3mEmailVerifyOtpView);\nexport { W3mEmailVerifyOtpView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-icon-box {\n height: var(--wui-icon-box-size-xl);\n width: var(--wui-icon-box-size-xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { RouterController, ConnectorController, SnackController, EventsController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mEmailVerifyDeviceView = class W3mEmailVerifyDeviceView extends LitElement {\n constructor() {\n super();\n this.email = RouterController.state.data?.email;\n this.emailConnector = ConnectorController.getEmailConnector();\n this.loading = false;\n this.listenForDeviceApproval();\n }\n render() {\n if (!this.email) {\n throw new Error('w3m-email-verify-device-view: No email provided');\n }\n if (!this.emailConnector) {\n throw new Error('w3m-email-verify-device-view: No email connector provided');\n }\n return html `\n \n \n\n \n \n \n Approve the login link we sent to\n \n ${this.email}\n \n\n \n The code expires in 20 minutes\n \n\n \n \n Didn't receive it?\n \n \n Resend email\n \n \n \n \n `;\n }\n async listenForDeviceApproval() {\n if (this.emailConnector) {\n try {\n await this.emailConnector.provider.connectDevice();\n EventsController.sendEvent({ type: 'track', event: 'DEVICE_REGISTERED_FOR_EMAIL' });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n RouterController.replace('EmailVerifyOtp', { email: this.email });\n }\n catch (error) {\n RouterController.goBack();\n }\n }\n }\n async onResendCode() {\n try {\n if (!this.loading) {\n if (!this.emailConnector || !this.email) {\n throw new Error('w3m-email-login-widget: Unable to resend email');\n }\n this.loading = true;\n await this.emailConnector.provider.connectEmail({ email: this.email });\n this.listenForDeviceApproval();\n SnackController.showSuccess('Code email resent');\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n finally {\n this.loading = false;\n }\n }\n};\nW3mEmailVerifyDeviceView.styles = styles;\n__decorate([\n state()\n], W3mEmailVerifyDeviceView.prototype, \"loading\", void 0);\nW3mEmailVerifyDeviceView = __decorate([\n customElement('w3m-email-verify-device-view')\n], W3mEmailVerifyDeviceView);\nexport { W3mEmailVerifyDeviceView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n div {\n width: 100%;\n height: 400px;\n }\n\n [data-ready='false'] {\n transform: scale(1.05);\n }\n\n @media (max-width: 430px) {\n [data-ready='false'] {\n transform: translateY(-50px);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ModalController, ConnectorController, ThemeController, RouterController } from '@web3modal/core';\nconst PAGE_HEIGHT = 400;\nconst PAGE_WIDTH = 360;\nconst HEADER_HEIGHT = 64;\nlet W3mApproveTransactionView = class W3mApproveTransactionView extends LitElement {\n constructor() {\n super();\n this.bodyObserver = undefined;\n this.unsubscribe = [];\n this.iframe = document.getElementById('w3m-iframe');\n this.ready = false;\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', isOpen => {\n if (!isOpen) {\n this.onHideIframe();\n RouterController.popTransactionStack();\n }\n })\n ]);\n }\n disconnectedCallback() {\n this.onHideIframe();\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.bodyObserver?.unobserve(window.document.body);\n }\n async firstUpdated() {\n await this.syncTheme();\n this.iframe.style.display = 'block';\n this.bodyObserver = new ResizeObserver(() => {\n this.iframe.style.width = `${PAGE_WIDTH}px`;\n this.iframe.style.height = `${PAGE_HEIGHT}px`;\n this.iframe.style.left = `calc(50% - ${PAGE_WIDTH / 2}px)`;\n this.iframe.style.top = `calc(50% - ${PAGE_HEIGHT / 2}px + ${HEADER_HEIGHT / 2}px)`;\n this.ready = true;\n });\n this.bodyObserver.observe(window.document.body);\n }\n render() {\n if (this.ready) {\n this.onShowIframe();\n }\n return html `
      `;\n }\n onShowIframe() {\n const isMobile = window.innerWidth <= 430;\n this.iframe.animate([\n { opacity: 0, transform: isMobile ? 'translateY(50px)' : 'scale(.95)' },\n { opacity: 1, transform: isMobile ? 'translateY(0)' : 'scale(1)' }\n ], { duration: 200, easing: 'ease', fill: 'forwards' });\n }\n async onHideIframe() {\n this.iframe.style.display = 'none';\n await this.iframe.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n }\n async syncTheme() {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n await emailConnector.provider.syncTheme({\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n }\n};\nW3mApproveTransactionView.styles = styles;\n__decorate([\n state()\n], W3mApproveTransactionView.prototype, \"ready\", void 0);\nW3mApproveTransactionView = __decorate([\n customElement('w3m-approve-transaction-view')\n], W3mApproveTransactionView);\nexport { W3mApproveTransactionView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { ConstantsUtil } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nlet W3mUpgradeWalletView = class W3mUpgradeWalletView extends LitElement {\n render() {\n return html `\n \n Follow the instructions on\n \n \n \n You will have to reconnect for security reasons\n \n \n `;\n }\n};\nW3mUpgradeWalletView = __decorate([\n customElement('w3m-upgrade-wallet-view')\n], W3mUpgradeWalletView);\nexport { W3mUpgradeWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { ConnectorController, RouterController, SnackController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mUpgradeToSmartAccountView = class W3mUpgradeToSmartAccountView extends LitElement {\n constructor() {\n super(...arguments);\n this.emailConnector = ConnectorController.getEmailConnector();\n this.loading = false;\n this.setPreferSmartAccount = async () => {\n if (this.emailConnector) {\n try {\n this.loading = true;\n await this.emailConnector.provider.setPreferredAccount(W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT);\n await this.emailConnector.provider.connect();\n this.loading = false;\n RouterController.push('Account');\n }\n catch (e) {\n SnackController.showError('Error upgrading to smart account');\n }\n }\n };\n }\n render() {\n return html `\n \n ${this.onboardingTemplate()} ${this.buttonsTemplate()}\n \n Learn more\n \n \n \n `;\n }\n onboardingTemplate() {\n return html ` \n \n \n \n \n \n \n \n Discover Smart Accounts\n \n \n Access advanced features such as username, social login, improved security and a smoother\n user experience!\n \n \n `;\n }\n buttonsTemplate() {\n return html `\n \n Do it later\n \n Continue\n \n `;\n }\n redirectToAccount() {\n RouterController.push('Account');\n }\n};\n__decorate([\n state()\n], W3mUpgradeToSmartAccountView.prototype, \"emailConnector\", void 0);\n__decorate([\n state()\n], W3mUpgradeToSmartAccountView.prototype, \"loading\", void 0);\nW3mUpgradeToSmartAccountView = __decorate([\n customElement('w3m-upgrade-to-smart-account-view')\n], W3mUpgradeToSmartAccountView);\nexport { W3mUpgradeToSmartAccountView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-email-input {\n width: 100%;\n }\n\n form {\n width: 100%;\n display: block;\n position: relative;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectorController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ref, createRef } from 'lit/directives/ref.js';\nimport styles from './styles.js';\nimport { SnackController, RouterController, EventsController } from '@web3modal/core';\nlet W3mUpdateEmailWalletView = class W3mUpdateEmailWalletView extends LitElement {\n constructor() {\n super(...arguments);\n this.formRef = createRef();\n this.initialEmail = RouterController.state.data?.email ?? '';\n this.email = '';\n this.loading = false;\n }\n firstUpdated() {\n this.formRef.value?.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n this.onSubmitEmail(event);\n }\n });\n }\n render() {\n const showSubmit = !this.loading && this.email.length > 3 && this.email !== this.initialEmail;\n return html `\n \n
      \n \n \n \n \n\n \n \n Cancel\n \n\n \n Save\n \n \n
      \n `;\n }\n onEmailInputChange(event) {\n this.email = event.detail;\n }\n async onSubmitEmail(event) {\n try {\n if (this.loading) {\n return;\n }\n this.loading = true;\n event.preventDefault();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n throw new Error('w3m-update-email-wallet: Email connector not found');\n }\n const response = await emailConnector.provider.updateEmail({ email: this.email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_EDIT' });\n if (response.action === 'VERIFY_SECONDARY_OTP') {\n RouterController.push('UpdateEmailSecondaryOtp', {\n email: this.initialEmail,\n newEmail: this.email\n });\n }\n else {\n RouterController.push('UpdateEmailPrimaryOtp', {\n email: this.initialEmail,\n newEmail: this.email\n });\n }\n }\n catch (error) {\n SnackController.showError(error);\n this.loading = false;\n }\n }\n};\nW3mUpdateEmailWalletView.styles = styles;\n__decorate([\n state()\n], W3mUpdateEmailWalletView.prototype, \"email\", void 0);\n__decorate([\n state()\n], W3mUpdateEmailWalletView.prototype, \"loading\", void 0);\nW3mUpdateEmailWalletView = __decorate([\n customElement('w3m-update-email-wallet-view')\n], W3mUpdateEmailWalletView);\nexport { W3mUpdateEmailWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nlet W3mUpdateEmailPrimaryOtpView = class W3mUpdateEmailPrimaryOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.email = RouterController.state.data?.email;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n await this.emailConnector.provider.updateEmailPrimaryOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n RouterController.replace('UpdateEmailSecondaryOtp', RouterController.state.data);\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onStartOver = () => {\n RouterController.replace('UpdateEmailWallet', RouterController.state.data);\n };\n }\n};\nW3mUpdateEmailPrimaryOtpView = __decorate([\n customElement('w3m-update-email-primary-otp-view')\n], W3mUpdateEmailPrimaryOtpView);\nexport { W3mUpdateEmailPrimaryOtpView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nlet W3mUpdateEmailSecondaryOtpView = class W3mUpdateEmailSecondaryOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.email = RouterController.state.data?.newEmail;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n await this.emailConnector.provider.updateEmailSecondaryOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n RouterController.reset('Account');\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onStartOver = () => {\n RouterController.replace('UpdateEmailWallet', RouterController.state.data);\n };\n }\n};\nW3mUpdateEmailSecondaryOtpView = __decorate([\n customElement('w3m-update-email-secondary-otp-view')\n], W3mUpdateEmailSecondaryOtpView);\nexport { W3mUpdateEmailSecondaryOtpView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n :host > wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, ConnectionController, CoreHelperUtil, EventsController, ModalController, NetworkController, RouterController, RouterUtil, SnackController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mUnsupportedChainView = class W3mUnsupportedChainView extends LitElement {\n constructor() {\n super(...arguments);\n this.disconecting = false;\n }\n render() {\n return html `\n \n \n \n This app doesn’t support your current network. Switch to an available option following\n to continue.\n \n \n\n \n ${this.networksTemplate()}\n \n\n \n \n \n Disconnect\n \n \n \n `;\n }\n networksTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks } = NetworkController.state;\n const sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n return sortedNetworks.map(network => html `\n this.onSwitchNetwork(network)}\n >\n \n `);\n }\n async onDisconnect() {\n try {\n this.disconecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({\n type: 'track',\n event: 'DISCONNECT_SUCCESS'\n });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconecting = false;\n }\n }\n async onSwitchNetwork(network) {\n const { isConnected } = AccountController.state;\n const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state;\n const { data } = RouterController.state;\n if (isConnected && caipNetwork?.id !== network.id) {\n if (approvedCaipNetworkIds?.includes(network.id)) {\n await NetworkController.switchActiveNetwork(network);\n RouterUtil.navigateAfterNetworkSwitch();\n }\n else if (supportsAllNetworks) {\n RouterController.push('SwitchNetwork', { ...data, network });\n }\n }\n else if (!isConnected) {\n NetworkController.setCaipNetwork(network);\n RouterController.push('Connect');\n }\n }\n};\nW3mUnsupportedChainView.styles = styles;\n__decorate([\n state()\n], W3mUnsupportedChainView.prototype, \"disconecting\", void 0);\nW3mUnsupportedChainView = __decorate([\n customElement('w3m-unsupported-chain-view')\n], W3mUnsupportedChainView);\nexport { W3mUnsupportedChainView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-compatible-network {\n margin-top: var(--wui-spacing-l);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, NetworkController, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mWalletReceiveView = class W3mWalletReceiveView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileName = val.profileName;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n SnackController.showError('Account not found');\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-wallet-receive-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html ` \n \n \n \n \n Copy your address or scan this QR code\n \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n const networks = NetworkController.getRequestedCaipNetworks();\n const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled();\n const caipNetwork = NetworkController.state.caipNetwork;\n if (this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT &&\n isNetworkEnabledForSmartAccounts) {\n if (!caipNetwork) {\n return null;\n }\n return html ``;\n }\n const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5);\n const imagesArray = slicedNetworks.map(AssetUtil.getNetworkImage).filter(Boolean);\n return html ``;\n }\n onReceiveClick() {\n RouterController.push('WalletCompatibleNetworks');\n }\n onCopyClick() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n};\nW3mWalletReceiveView.styles = styles;\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"preferredAccountType\", void 0);\nW3mWalletReceiveView = __decorate([\n customElement('w3m-wallet-receive-view')\n], W3mWalletReceiveView);\nexport { W3mWalletReceiveView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n :host > wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nimport { state } from 'lit/decorators.js';\nlet W3mWalletCompatibleNetworksView = class W3mWalletCompatibleNetworksView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(AccountController.subscribeKey('preferredAccountType', val => {\n this.preferredAccountType = val;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks, caipNetwork } = NetworkController.state;\n const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled();\n let sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n if (isNetworkEnabledForSmartAccounts &&\n this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT) {\n if (!caipNetwork) {\n return null;\n }\n sortedNetworks = [caipNetwork];\n }\n return sortedNetworks.map(network => html `\n \n \n `);\n }\n};\nW3mWalletCompatibleNetworksView.styles = styles;\n__decorate([\n state()\n], W3mWalletCompatibleNetworksView.prototype, \"preferredAccountType\", void 0);\nW3mWalletCompatibleNetworksView = __decorate([\n customElement('w3m-wallet-compatible-networks-view')\n], W3mWalletCompatibleNetworksView);\nexport { W3mWalletCompatibleNetworksView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n wui-flex {\n position: relative;\n }\n\n wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xs) !important;\n border: 5px solid var(--wui-color-bg-125);\n background: var(--wui-color-bg-175);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n }\n\n wui-button {\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n\n .inputContainer {\n height: fit-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { CoreHelperUtil, RouterController, SendController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mWalletSendView = class W3mWalletSendView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.token = SendController.state.token;\n this.sendTokenAmount = SendController.state.sendTokenAmount;\n this.receiverAddress = SendController.state.receiverAddress;\n this.message = 'Preview Send';\n this.unsubscribe.push(...[\n SendController.subscribe(val => {\n this.token = val.token;\n this.sendTokenAmount = val.sendTokenAmount;\n this.receiverAddress = val.receiverAddress;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n this.getMessage();\n return html ` \n \n \n \n \n \n \n \n ${this.message}\n \n \n `;\n }\n onButtonClick() {\n RouterController.push('WalletSendPreview');\n }\n getMessage() {\n this.message = 'Preview Send';\n if (this.receiverAddress && !CoreHelperUtil.isAddress(this.receiverAddress)) {\n this.message = 'Invalid Address';\n }\n if (!this.receiverAddress) {\n this.message = 'Add Address';\n }\n if (this.sendTokenAmount &&\n this.token &&\n this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n this.message = 'Insufficient Funds';\n }\n if (!this.sendTokenAmount) {\n this.message = 'Add Amount';\n }\n if (!this.token) {\n this.message = 'Select Token';\n }\n }\n};\nW3mWalletSendView.styles = styles;\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"token\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"sendTokenAmount\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"message\", void 0);\nW3mWalletSendView = __decorate([\n customElement('w3m-wallet-send-view')\n], W3mWalletSendView);\nexport { W3mWalletSendView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n .contentContainer {\n height: 440px;\n overflow: scroll;\n scrollbar-width: none;\n }\n\n wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { AccountController, CoreHelperUtil, RouterController, SendController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mSendSelectTokenView = class W3mSendSelectTokenView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.tokenBalance = AccountController.state.tokenBalance;\n this.search = '';\n this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {\n this.search = value;\n });\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n this.tokenBalance = val.tokenBalance;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.templateSearchInput()} ${this.templateTokens()}\n \n `;\n }\n templateSearchInput() {\n return html `\n \n \n \n `;\n }\n templateTokens() {\n if (this.search) {\n this.tokens = this.tokenBalance?.filter(token => token.name.toLowerCase().includes(this.search.toLowerCase()));\n }\n else {\n this.tokens = this.tokenBalance;\n }\n return html `\n \n \n Your tokens\n \n \n ${this.tokens && this.tokens.length > 0\n ? this.tokens.map(token => html ``)\n : html `\n \n \n No tokens found\n Your tokens will appear here\n \n Buy\n `}\n \n \n `;\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n onInputChange(event) {\n this.onDebouncedSearch(event.detail);\n }\n handleTokenClick(token) {\n SendController.setToken(token);\n SendController.setTokenAmount(undefined);\n RouterController.goBack();\n }\n};\nW3mSendSelectTokenView.styles = styles;\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"tokenBalance\", void 0);\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"tokens\", void 0);\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"search\", void 0);\nW3mSendSelectTokenView = __decorate([\n customElement('w3m-wallet-send-select-token-view')\n], W3mSendSelectTokenView);\nexport { W3mSendSelectTokenView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-avatar,\n wui-image {\n display: ruby;\n width: 32px;\n height: 32px;\n border-radius: var(--wui-border-radius-3xl);\n }\n\n .sendButton {\n width: 70%;\n --local-width: 100% !important;\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n\n .cancelButton {\n width: 30%;\n --local-width: 100% !important;\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nimport { NetworkController, RouterController, SendController } from '@web3modal/core';\nlet W3mWalletSendPreviewView = class W3mWalletSendPreviewView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.token = SendController.state.token;\n this.sendTokenAmount = SendController.state.sendTokenAmount;\n this.receiverAddress = SendController.state.receiverAddress;\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.unsubscribe.push(...[\n SendController.subscribe(val => {\n this.token = val.token;\n this.sendTokenAmount = val.sendTokenAmount;\n this.receiverAddress = val.receiverAddress;\n }),\n NetworkController.subscribeKey('caipNetwork', val => (this.caipNetwork = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` \n \n \n \n Send\n ${this.sendValueTemplate()}\n \n \n \n \n \n \n \n To\n \n \n \n \n \n \n \n Review transaction carefully\n \n \n \n Cancel\n \n \n Send\n \n \n `;\n }\n sendValueTemplate() {\n if (this.token && this.sendTokenAmount) {\n const price = this.token.price;\n const totalValue = price * this.sendTokenAmount;\n return html `$${totalValue.toFixed(2)}`;\n }\n return null;\n }\n onSendClick() {\n RouterController.reset('Account');\n setTimeout(() => {\n SendController.resetSend();\n }, 200);\n }\n onCancelClick() {\n RouterController.goBack();\n }\n};\nW3mWalletSendPreviewView.styles = styles;\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"token\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"sendTokenAmount\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"caipNetwork\", void 0);\nW3mWalletSendPreviewView = __decorate([\n customElement('w3m-wallet-send-preview-view')\n], W3mWalletSendPreviewView);\nexport { W3mWalletSendPreviewView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-grid {\n max-height: clamp(360px, 400px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n grid-auto-rows: min-content;\n grid-template-columns: repeat(auto-fill, 76px);\n }\n\n @media (max-width: 435px) {\n wui-grid {\n grid-template-columns: repeat(auto-fill, 77px);\n }\n }\n\n wui-grid[data-scroll='false'] {\n overflow: hidden;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n\n wui-loading-spinner {\n padding-top: var(--wui-spacing-l);\n padding-bottom: var(--wui-spacing-l);\n justify-content: center;\n grid-column: 1 / span 4;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { ConnectorController } from '@web3modal/core';\nexport function markWalletsAsInstalled(wallets) {\n const { connectors } = ConnectorController.state;\n const installedConnectors = connectors\n .filter(c => c.type === 'ANNOUNCED')\n .reduce((acum, val) => {\n if (!val.info?.rdns) {\n return acum;\n }\n acum[val.info.rdns] = true;\n return acum;\n }, {});\n const walletsWithInstalled = wallets.map(wallet => ({\n ...wallet,\n installed: Boolean(wallet.rdns) && Boolean(installedConnectors[wallet.rdns ?? ''])\n }));\n const sortedWallets = walletsWithInstalled.sort((a, b) => Number(b.installed) - Number(a.installed));\n return sortedWallets;\n}\n//# sourceMappingURL=markWalletsAsInstalled.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectorController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { markWalletsAsInstalled } from '../../utils/markWalletsAsInstalled.js';\nconst PAGINATOR_ID = 'local-paginator';\nlet W3mAllWalletsList = class W3mAllWalletsList extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.paginationObserver = undefined;\n this.initial = !ApiController.state.wallets.length;\n this.wallets = ApiController.state.wallets;\n this.recommended = ApiController.state.recommended;\n this.featured = ApiController.state.featured;\n this.unsubscribe.push(...[\n ApiController.subscribeKey('wallets', val => (this.wallets = val)),\n ApiController.subscribeKey('recommended', val => (this.recommended = val)),\n ApiController.subscribeKey('featured', val => (this.featured = val))\n ]);\n }\n firstUpdated() {\n this.initialFetch();\n this.createPaginationObserver();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.paginationObserver?.disconnect();\n }\n render() {\n return html `\n \n ${this.initial ? this.shimmerTemplate(16) : this.walletsTemplate()}\n ${this.paginationLoaderTemplate()}\n \n `;\n }\n async initialFetch() {\n const gridEl = this.shadowRoot?.querySelector('wui-grid');\n if (this.initial && gridEl) {\n await ApiController.fetchWallets({ page: 1 });\n await gridEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.initial = false;\n gridEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n shimmerTemplate(items, id) {\n return [...Array(items)].map(() => html `\n \n `);\n }\n walletsTemplate() {\n const wallets = [...this.featured, ...this.recommended, ...this.wallets];\n const walletsWithInstalled = markWalletsAsInstalled(wallets);\n return walletsWithInstalled.map(wallet => html `\n this.onConnectWallet(wallet)}\n .installed=${wallet.installed}\n >\n `);\n }\n paginationLoaderTemplate() {\n const { wallets, recommended, featured, count } = ApiController.state;\n const columns = window.innerWidth < 352 ? 3 : 4;\n const currentWallets = wallets.length + recommended.length;\n const minimumRows = Math.ceil(currentWallets / columns);\n let shimmerCount = minimumRows * columns - currentWallets + columns;\n shimmerCount -= wallets.length ? featured.length % columns : 0;\n if (count === 0 && featured.length > 0) {\n return null;\n }\n if (count === 0 || [...featured, ...wallets, ...recommended].length < count) {\n return this.shimmerTemplate(shimmerCount, PAGINATOR_ID);\n }\n return null;\n }\n createPaginationObserver() {\n const loaderEl = this.shadowRoot?.querySelector(`#${PAGINATOR_ID}`);\n if (loaderEl) {\n this.paginationObserver = new IntersectionObserver(([element]) => {\n if (element?.isIntersecting && !this.initial) {\n const { page, count, wallets } = ApiController.state;\n if (wallets.length < count) {\n ApiController.fetchWallets({ page: page + 1 });\n }\n }\n });\n this.paginationObserver.observe(loaderEl);\n }\n }\n onConnectWallet(wallet) {\n const connector = ConnectorController.getConnector(wallet.id, wallet.rdns);\n if (connector) {\n RouterController.push('ConnectingExternal', { connector });\n }\n else {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n }\n};\nW3mAllWalletsList.styles = styles;\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"initial\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"wallets\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"recommended\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"featured\", void 0);\nW3mAllWalletsList = __decorate([\n customElement('w3m-all-wallets-list')\n], W3mAllWalletsList);\nexport { W3mAllWalletsList };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-grid,\n wui-loading-spinner,\n wui-flex {\n height: 360px;\n }\n\n wui-grid {\n overflow: scroll;\n scrollbar-width: none;\n grid-auto-rows: min-content;\n }\n\n wui-grid[data-scroll='false'] {\n overflow: hidden;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n\n wui-loading-spinner {\n justify-content: center;\n align-items: center;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectorController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { markWalletsAsInstalled } from '../../utils/markWalletsAsInstalled.js';\nlet W3mAllWalletsSearch = class W3mAllWalletsSearch extends LitElement {\n constructor() {\n super(...arguments);\n this.prevQuery = '';\n this.loading = true;\n this.query = '';\n }\n render() {\n this.onSearch();\n return this.loading\n ? html ``\n : this.walletsTemplate();\n }\n async onSearch() {\n if (this.query !== this.prevQuery) {\n this.prevQuery = this.query;\n this.loading = true;\n await ApiController.searchWallet({ search: this.query });\n this.loading = false;\n }\n }\n walletsTemplate() {\n const { search } = ApiController.state;\n const wallets = markWalletsAsInstalled(search);\n if (!search.length) {\n return html `\n \n \n No Wallet found\n \n `;\n }\n return html `\n \n ${wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n .installed=${wallet.installed}\n >\n `)}\n \n `;\n }\n onConnectWallet(wallet) {\n const connector = ConnectorController.getConnector(wallet.id, wallet.rdns);\n if (connector) {\n RouterController.push('ConnectingExternal', { connector });\n }\n else {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n }\n};\nW3mAllWalletsSearch.styles = styles;\n__decorate([\n state()\n], W3mAllWalletsSearch.prototype, \"loading\", void 0);\n__decorate([\n property()\n], W3mAllWalletsSearch.prototype, \"query\", void 0);\nW3mAllWalletsSearch = __decorate([\n customElement('w3m-all-wallets-search')\n], W3mAllWalletsSearch);\nexport { W3mAllWalletsSearch };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nlet W3mConnectingHeader = class W3mConnectingHeader extends LitElement {\n constructor() {\n super();\n this.platformTabs = [];\n this.unsubscribe = [];\n this.platforms = [];\n this.onSelectPlatfrom = undefined;\n this.buffering = false;\n this.unsubscribe.push(ConnectionController.subscribeKey('buffering', val => (this.buffering = val)));\n }\n disconnectCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const tabs = this.generateTabs();\n return html `\n \n \n \n `;\n }\n generateTabs() {\n const tabs = this.platforms.map(platform => {\n if (platform === 'browser') {\n return { label: 'Browser', icon: 'extension', platform: 'browser' };\n }\n else if (platform === 'mobile') {\n return { label: 'Mobile', icon: 'mobile', platform: 'mobile' };\n }\n else if (platform === 'qrcode') {\n return { label: 'Mobile', icon: 'mobile', platform: 'qrcode' };\n }\n else if (platform === 'web') {\n return { label: 'Webapp', icon: 'browser', platform: 'web' };\n }\n else if (platform === 'desktop') {\n return { label: 'Desktop', icon: 'desktop', platform: 'desktop' };\n }\n return { label: 'Browser', icon: 'extension', platform: 'unsupported' };\n });\n this.platformTabs = tabs.map(({ platform }) => platform);\n return tabs;\n }\n onTabChange(index) {\n const tab = this.platformTabs[index];\n if (tab) {\n this.onSelectPlatfrom?.(tab);\n }\n }\n};\n__decorate([\n property({ type: Array })\n], W3mConnectingHeader.prototype, \"platforms\", void 0);\n__decorate([\n property()\n], W3mConnectingHeader.prototype, \"onSelectPlatfrom\", void 0);\n__decorate([\n state()\n], W3mConnectingHeader.prototype, \"buffering\", void 0);\nW3mConnectingHeader = __decorate([\n customElement('w3m-connecting-header')\n], W3mConnectingHeader);\nexport { W3mConnectingHeader };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, ConnectorController, EventsController, ModalController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcBrowser = class W3mConnectingWcBrowser extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-browser: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onAutoConnect = this.onConnectProxy.bind(this);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'browser' }\n });\n }\n async onConnectProxy() {\n try {\n this.error = false;\n const { connectors } = ConnectorController.state;\n const announcedConnector = connectors.find(c => c.type === 'ANNOUNCED' && c.info?.rdns === this.wallet?.rdns);\n const injectedConnector = connectors.find(c => c.type === 'INJECTED');\n if (announcedConnector) {\n await ConnectionController.connectExternal(announcedConnector);\n }\n else if (injectedConnector) {\n await ConnectionController.connectExternal(injectedConnector);\n }\n ModalController.close();\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'browser', name: this.wallet?.name || 'Unknown' }\n });\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n this.error = true;\n }\n }\n};\nW3mConnectingWcBrowser = __decorate([\n customElement('w3m-connecting-wc-browser')\n], W3mConnectingWcBrowser);\nexport { W3mConnectingWcBrowser };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcDesktop = class W3mConnectingWcDesktop extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-desktop: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onRender = this.onRenderProxy.bind(this);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'desktop' }\n });\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.ready = true;\n this.timeout = setTimeout(() => {\n this.onConnect?.();\n }, 200);\n }\n }\n onConnectProxy() {\n if (this.wallet?.desktop_link && this.uri) {\n try {\n this.error = false;\n const { desktop_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatNativeUrl(desktop_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_blank');\n }\n catch {\n this.error = true;\n }\n }\n }\n};\nW3mConnectingWcDesktop = __decorate([\n customElement('w3m-connecting-wc-desktop')\n], W3mConnectingWcDesktop);\nexport { W3mConnectingWcDesktop };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcMobile = class W3mConnectingWcMobile extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-mobile: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onRender = this.onRenderProxy.bind(this);\n document.addEventListener('visibilitychange', this.onBuffering.bind(this));\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'mobile' }\n });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('visibilitychange', this.onBuffering.bind(this));\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.ready = true;\n this.onConnect?.();\n }\n }\n onConnectProxy() {\n if (this.wallet?.mobile_link && this.uri) {\n try {\n this.error = false;\n const { mobile_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatNativeUrl(mobile_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_self');\n }\n catch {\n this.error = true;\n }\n }\n }\n onBuffering() {\n const isIos = CoreHelperUtil.isIos();\n if (document?.visibilityState === 'visible' && !this.error && isIos) {\n ConnectionController.setBuffering(true);\n setTimeout(() => {\n ConnectionController.setBuffering(false);\n }, 5000);\n }\n }\n};\nW3mConnectingWcMobile = __decorate([\n customElement('w3m-connecting-wc-mobile')\n], W3mConnectingWcMobile);\nexport { W3mConnectingWcMobile };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n wui-shimmer {\n width: 100%;\n aspect-ratio: 1 / 1;\n border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;\n }\n\n wui-qr-code {\n opacity: 0;\n animation-duration: 200ms;\n animation-timing-function: ease;\n animation-name: fadein;\n animation-fill-mode: forwards;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, EventsController, ThemeController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nimport styles from './styles.js';\nlet W3mConnectingWcQrcode = class W3mConnectingWcQrcode extends W3mConnectingWidget {\n constructor() {\n super();\n this.forceUpdate = () => {\n this.requestUpdate();\n };\n window.addEventListener('resize', this.forceUpdate);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet?.name ?? 'WalletConnect', platform: 'qrcode' }\n });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('resize', this.forceUpdate);\n }\n render() {\n this.onRenderProxy();\n return html `\n \n ${this.qrCodeTemplate()} \n\n \n Scan this QR Code with your phone\n \n ${this.copyTemplate()}\n \n\n \n `;\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.timeout = setTimeout(() => {\n this.ready = true;\n }, 200);\n }\n }\n qrCodeTemplate() {\n if (!this.uri || !this.ready) {\n return null;\n }\n const size = this.getBoundingClientRect().width - 40;\n const alt = this.wallet ? this.wallet.name : undefined;\n ConnectionController.setWcLinking(undefined);\n ConnectionController.setRecentWallet(this.wallet);\n return html ` `;\n }\n copyTemplate() {\n const inactive = !this.uri || !this.ready;\n return html `\n \n Copy link\n `;\n }\n};\nW3mConnectingWcQrcode.styles = styles;\nW3mConnectingWcQrcode = __decorate([\n customElement('w3m-connecting-wc-qrcode')\n], W3mConnectingWcQrcode);\nexport { W3mConnectingWcQrcode };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, EventsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mConnectingWcUnsupported = class W3mConnectingWcUnsupported extends LitElement {\n constructor() {\n super();\n this.wallet = RouterController.state.data?.wallet;\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-unsupported: No wallet provided');\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'browser' }\n });\n }\n render() {\n return html `\n \n \n\n Not Detected\n \n\n \n `;\n }\n};\nW3mConnectingWcUnsupported = __decorate([\n customElement('w3m-connecting-wc-unsupported')\n], W3mConnectingWcUnsupported);\nexport { W3mConnectingWcUnsupported };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcWeb = class W3mConnectingWcWeb extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-web: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.secondaryBtnLabel = 'Open';\n this.secondaryLabel = 'Open and continue in a new browser tab';\n this.secondaryBtnIcon = 'externalLink';\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'web' }\n });\n }\n onConnectProxy() {\n if (this.wallet?.webapp_link && this.uri) {\n try {\n this.error = false;\n const { webapp_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatUniversalUrl(webapp_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_blank');\n }\n catch {\n this.error = true;\n }\n }\n }\n};\nW3mConnectingWcWeb = __decorate([\n customElement('w3m-connecting-wc-web')\n], W3mConnectingWcWeb);\nexport { W3mConnectingWcWeb };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n cursor: pointer;\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n padding-top: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s);\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-1xs);\n border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs));\n background: var(--wui-gray-glass-002);\n }\n\n .details-row.provider-free-row {\n padding-right: var(--wui-spacing-xs);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nlet WuiConvertDetails = class WuiConvertDetails extends LitElement {\n constructor() {\n super(...arguments);\n this.detailsOpen = false;\n this.slippageRate = 1;\n }\n render() {\n return html `\n \n \n \n ${this.detailsOpen\n ? html `\n \n \n \n Network cost\n \n $${UiHelperUtil.formatNumberToLocalString(this.gasPriceInUSD, 3)}\n \n \n \n ${this.priceImpact\n ? html ` \n \n Price impact\n \n \n ${UiHelperUtil.formatNumberToLocalString(this.priceImpact, 3)}%\n \n \n \n `\n : null}\n ${this.maxSlippage && this.sourceTokenSymbol\n ? html `\n \n Max. slippage\n \n \n ${UiHelperUtil.formatNumberToLocalString(this.maxSlippage, 6)}\n ${this.sourceTokenSymbol} ${this.slippageRate}%\n \n \n \n `\n : null}\n \n \n Provider fee\n \n Free\n \n \n \n \n `\n : null}\n \n \n `;\n }\n toggleDetails() {\n this.detailsOpen = !this.detailsOpen;\n }\n};\nWuiConvertDetails.styles = [styles];\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"detailsOpen\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"sourceTokenSymbol\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"sourceTokenPrice\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"toTokenSymbol\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"toTokenConvertedAmount\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"priceImpact\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"slippageRate\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"maxSlippage\", void 0);\nWuiConvertDetails = __decorate([\n customElement('w3m-convert-details')\n], WuiConvertDetails);\nexport { WuiConvertDetails };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-radius: var(--wui-border-radius-s);\n padding: var(--wui-spacing-xl);\n padding-right: var(--wui-spacing-s);\n width: 100%;\n height: 100px;\n box-sizing: border-box;\n position: relative;\n }\n\n :host > wui-flex > svg.input_mask {\n position: absolute;\n inset: 0;\n z-index: 5;\n }\n\n :host wui-flex .input_mask__border,\n :host wui-flex .input_mask__background {\n transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1);\n will-change: fill;\n }\n\n :host wui-flex .input_mask__border {\n fill: var(--wui-gray-glass-005);\n }\n\n :host wui-flex .input_mask__background {\n fill: var(--wui-gray-glass-002);\n }\n\n :host wui-flex.focus .input_mask__border {\n fill: var(--wui-gray-glass-020);\n }\n\n :host > wui-flex .swap-input,\n :host > wui-flex .swap-token-button {\n z-index: 10;\n }\n\n :host > wui-flex .swap-input {\n -webkit-mask-image: linear-gradient(\n 270deg,\n transparent 0px,\n transparent 8px,\n black 24px,\n black 25px,\n black 32px,\n black 100%\n );\n mask-image: linear-gradient(\n 270deg,\n transparent 0px,\n transparent 8px,\n black 24px,\n black 25px,\n black 32px,\n black 100%\n );\n }\n\n :host > wui-flex .swap-input input {\n background: none;\n border: none;\n height: 42px;\n width: 100%;\n font-size: 32px;\n font-style: normal;\n font-weight: 400;\n line-height: 130%;\n letter-spacing: -1.28px;\n outline: none;\n caret-color: var(--wui-color-accent-100);\n color: var(--wui-color-fg-100);\n }\n\n :host > wui-flex .swap-input input:focus-visible {\n outline: none;\n }\n\n :host > wui-flex .swap-input input::-webkit-outer-spin-button,\n :host > wui-flex .swap-input input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .token-select-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-1xs);\n height: 40px;\n border: none;\n border-radius: 80px;\n background: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n cursor: pointer;\n transition: background 0.2s linear;\n }\n\n .token-select-button:hover {\n background: var(--wui-gray-glass-005);\n }\n\n .token-select-button wui-image {\n width: 24px;\n height: 24px;\n border-radius: var(--wui-border-radius-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n .max-value-button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n color: var(--wui-gray-glass-020);\n padding-left: 0px;\n }\n\n .market-value {\n min-height: 18px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nimport { NumberUtil } from '@web3modal/common';\nimport { UiHelperUtil, customElement, convertInputMaskBottomSvg, convertInputMaskTopSvg } from '@web3modal/ui';\nimport styles from './styles.js';\nconst MINIMUM_USD_VALUE_TO_CONVERT = 0.00005;\nlet W3mConvertInput = class W3mConvertInput extends LitElement {\n constructor() {\n super(...arguments);\n this.focused = false;\n this.price = 0;\n this.marketValue = '$1.0345,00';\n this.target = 'sourceToken';\n this.onSetAmount = null;\n this.onSetMaxValue = null;\n }\n render() {\n const marketValue = this.marketValue || '0';\n const isMarketValueGreaterThanZero = NumberUtil.bigNumber(marketValue).isGreaterThan(0);\n return html `\n \n ${this.target === 'sourceToken' ? convertInputMaskTopSvg : convertInputMaskBottomSvg}\n \n this.onFocusChange(true)}\n @focusout=${() => this.onFocusChange(false)}\n ?disabled=${this.disabled}\n .value=${this.value}\n @input=${this.dispatchInputChangeEvent}\n @keydown=${this.handleKeydown}\n placeholder=\"0\"\n />\n \n ${isMarketValueGreaterThanZero ? `$${this.marketValue}` : null}\n \n \n ${this.templateTokenSelectButton()}\n \n `;\n }\n handleKeydown(event) {\n const allowedKeys = [\n 'Backspace',\n 'Meta',\n 'Ctrl',\n 'a',\n 'c',\n 'v',\n 'ArrowLeft',\n 'ArrowRight',\n 'Tab'\n ];\n const isComma = event.key === ',';\n const isDot = event.key === '.';\n const isNumericKey = event.key >= '0' && event.key <= '9';\n const currentValue = this.value;\n if (!isNumericKey && !allowedKeys.includes(event.key) && !isDot && !isComma) {\n event.preventDefault();\n }\n if (isComma || isDot) {\n if (currentValue?.includes('.') || currentValue?.includes(',')) {\n event.preventDefault();\n }\n }\n }\n dispatchInputChangeEvent(event) {\n if (!this.onSetAmount) {\n return;\n }\n const value = event.target.value;\n if (value === ',' || value === '.') {\n this.onSetAmount(this.target, '0.');\n }\n else if (value.endsWith(',')) {\n this.onSetAmount(this.target, value.replace(',', '.'));\n }\n else {\n this.onSetAmount(this.target, value);\n }\n }\n setMaxValueToInput() {\n this.onSetMaxValue?.(this.target, this.balance);\n }\n templateTokenSelectButton() {\n if (!this.token) {\n return html ` \n Select token\n `;\n }\n const tokenElement = this.token.logoUri\n ? html ``\n : html `\n \n `;\n return html `\n \n \n ${tokenElement}\n ${this.token.symbol}\n \n ${this.tokenBalanceTemplate()} \n \n `;\n }\n tokenBalanceTemplate() {\n const balanceValueInUSD = NumberUtil.multiply(this.balance, this.price);\n const haveBalance = balanceValueInUSD\n ? balanceValueInUSD?.isGreaterThan(MINIMUM_USD_VALUE_TO_CONVERT)\n : false;\n return html `\n ${haveBalance\n ? html `\n ${UiHelperUtil.formatNumberToLocalString(this.balance, 3)}\n `\n : null}\n ${this.target === 'sourceToken' ? this.tokenActionButtonTemplate(haveBalance) : null}\n `;\n }\n tokenActionButtonTemplate(haveBalance) {\n if (haveBalance) {\n return html ` `;\n }\n return html ` `;\n }\n onFocusChange(state) {\n this.focused = state;\n }\n onSelectToken() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_SELECT_TOKEN_TO_SWAP' });\n RouterController.push('ConvertSelectToken', {\n target: this.target\n });\n }\n onBuyToken() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mConvertInput.styles = [styles];\n__decorate([\n property()\n], W3mConvertInput.prototype, \"focused\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"value\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"price\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"marketValue\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"target\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"token\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"onSetAmount\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"onSetMaxValue\", void 0);\nW3mConvertInput = __decorate([\n customElement('w3m-convert-input')\n], W3mConvertInput);\nexport { W3mConvertInput };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-icon-link[data-hidden='true'] {\n opacity: 0 !important;\n pointer-events: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, ConnectorController, EventsController, ModalController, OptionsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nfunction headings() {\n const connectorName = RouterController.state.data?.connector?.name;\n const walletName = RouterController.state.data?.wallet?.name;\n const networkName = RouterController.state.data?.network?.name;\n const name = walletName ?? connectorName;\n const connectors = ConnectorController.getConnectors();\n const isEmail = connectors.length === 1 && connectors[0]?.id === 'w3m-email';\n return {\n Connect: `Connect ${isEmail ? 'Email' : ''} Wallet`,\n Account: undefined,\n AccountSettings: undefined,\n ConnectingExternal: name ?? 'Connect Wallet',\n ConnectingWalletConnect: name ?? 'WalletConnect',\n ConnectingSiwe: 'Sign In',\n Networks: 'Choose Network',\n SwitchNetwork: networkName ?? 'Switch Network',\n AllWallets: 'All Wallets',\n WhatIsANetwork: 'What is a network?',\n WhatIsAWallet: 'What is a wallet?',\n GetWallet: 'Get a wallet',\n Downloads: name ? `Get ${name}` : 'Downloads',\n EmailVerifyOtp: 'Confirm Email',\n EmailVerifyDevice: 'Register Device',\n ApproveTransaction: 'Approve Transaction',\n Transactions: 'Activity',\n UpgradeEmailWallet: 'Upgrade your Wallet',\n UpgradeToSmartAccount: undefined,\n UpdateEmailWallet: 'Edit Email',\n UpdateEmailPrimaryOtp: 'Confirm Current Email',\n UpdateEmailSecondaryOtp: 'Confirm New Email',\n UnsupportedChain: 'Switch Network',\n OnRampProviders: 'Choose Provider',\n OnRampActivity: 'Activity',\n WhatIsABuy: 'What is Buy?',\n BuyInProgress: 'Buy',\n OnRampTokenSelect: 'Select Token',\n OnRampFiatSelect: 'Select Currency',\n WalletReceive: 'Receive',\n WalletCompatibleNetworks: 'Compatible Networks',\n Convert: 'Convert',\n ConvertSelectToken: 'Select token',\n ConvertPreview: 'Preview convert',\n WalletSend: 'Send',\n WalletSendPreview: 'Review send',\n WalletSendSelectToken: 'Select Token'\n };\n}\nlet W3mHeader = class W3mHeader extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.heading = headings()[RouterController.state.view];\n this.buffering = false;\n this.showBack = false;\n this.unsubscribe.push(RouterController.subscribeKey('view', val => {\n this.onViewChange(val);\n this.onHistoryChange();\n }), ConnectionController.subscribeKey('buffering', val => (this.buffering = val)));\n }\n disconnectCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.dynamicButtonTemplate()} ${this.titleTemplate()}\n \n \n ${this.separatorTemplate()}\n `;\n }\n onWalletHelp() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_WALLET_HELP' });\n RouterController.push('WhatIsAWallet');\n }\n async onClose() {\n if (OptionsController.state.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (SIWEController.state.status !== 'success') {\n await ConnectionController.disconnect();\n }\n }\n ModalController.close();\n }\n titleTemplate() {\n return html `${this.heading}`;\n }\n dynamicButtonTemplate() {\n const { view } = RouterController.state;\n const isConnectHelp = view === 'Connect';\n const isApproveTransaction = view === 'ApproveTransaction';\n const isUpgradeToSmartAccounts = view === 'UpgradeToSmartAccount';\n const shouldHideBack = isApproveTransaction || isUpgradeToSmartAccounts;\n if (this.showBack && !shouldHideBack) {\n return html ``;\n }\n return html ``;\n }\n separatorTemplate() {\n if (!this.heading) {\n return null;\n }\n return html ``;\n }\n getPadding() {\n if (this.heading) {\n return ['l', '2l', 'l', '2l'];\n }\n return ['l', '2l', '0', '2l'];\n }\n async onViewChange(view) {\n const headingEl = this.shadowRoot?.querySelector('wui-text');\n if (headingEl) {\n const preset = headings()[view];\n await headingEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.heading = preset;\n headingEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n async onHistoryChange() {\n const { history } = RouterController.state;\n const buttonEl = this.shadowRoot?.querySelector('#dynamic');\n if (history.length > 1 && !this.showBack && buttonEl) {\n await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.showBack = true;\n buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n else if (history.length <= 1 && this.showBack && buttonEl) {\n await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.showBack = false;\n buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n onGoBack() {\n if (RouterController.state.view === 'ConnectingSiwe') {\n RouterController.push('Connect');\n }\n else {\n RouterController.goBack();\n }\n }\n};\nW3mHeader.styles = [styles];\n__decorate([\n state()\n], W3mHeader.prototype, \"heading\", void 0);\n__decorate([\n state()\n], W3mHeader.prototype, \"buffering\", void 0);\n__decorate([\n state()\n], W3mHeader.prototype, \"showBack\", void 0);\nW3mHeader = __decorate([\n customElement('w3m-header')\n], W3mHeader);\nexport { W3mHeader };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nlet W3mHelpWidget = class W3mHelpWidget extends LitElement {\n constructor() {\n super(...arguments);\n this.data = [];\n }\n render() {\n return html `\n \n ${this.data.map(item => html `\n \n \n ${item.images.map(image => html ``)}\n \n \n \n \n ${item.title}\n \n ${item.text}\n \n `)}\n \n `;\n }\n};\n__decorate([\n property({ type: Array })\n], W3mHelpWidget.prototype, \"data\", void 0);\nW3mHelpWidget = __decorate([\n customElement('w3m-help-widget')\n], W3mHelpWidget);\nexport { W3mHelpWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n wui-loading-spinner {\n position: absolute;\n top: 50%;\n right: 20px;\n transform: translateY(-50%);\n }\n\n .currency-container {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: var(--wui-spacing-1xs);\n height: 40px;\n padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)\n var(--wui-spacing-xs);\n min-width: 95px;\n border-radius: var(--FULL, 1000px);\n border: 1px solid var(--wui-gray-glass-002);\n background: var(--wui-gray-glass-002);\n cursor: pointer;\n }\n\n .currency-container > wui-image {\n height: 24px;\n width: 24px;\n border-radius: 50%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { customElement } from '@web3modal/ui';\nimport styles from './styles.js';\nimport { AssetController, ModalController, OnRampController } from '@web3modal/core';\nlet W3mInputCurrency = class W3mInputCurrency extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.type = 'Token';\n this.value = 0;\n this.currencies = [];\n this.selectedCurrency = this.currencies?.[0];\n this.currencyImages = AssetController.state.currencyImages;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(OnRampController.subscribeKey('purchaseCurrency', val => {\n if (!val || this.type === 'Fiat') {\n return;\n }\n this.selectedCurrency = this.formatPurchaseCurrency(val);\n }), OnRampController.subscribeKey('paymentCurrency', val => {\n if (!val || this.type === 'Token') {\n return;\n }\n this.selectedCurrency = this.formatPaymentCurrency(val);\n }), OnRampController.subscribe(val => {\n if (this.type === 'Fiat') {\n this.currencies = val.purchaseCurrencies.map(this.formatPurchaseCurrency);\n }\n else {\n this.currencies = val.paymentCurrencies.map(this.formatPaymentCurrency);\n }\n }), AssetController.subscribe(val => {\n this.currencyImages = { ...val.currencyImages };\n this.tokenImages = { ...val.tokenImages };\n }));\n }\n firstUpdated() {\n OnRampController.getAvailableCurrencies();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const symbol = this.selectedCurrency?.symbol || '';\n const image = this.currencyImages[symbol] || this.tokenImages[symbol];\n return html `\n ${this.selectedCurrency\n ? html ` ModalController.open({ view: `OnRamp${this.type}Select` })}\n >\n \n ${this.selectedCurrency.symbol}\n `\n : html ``}\n `;\n }\n formatPaymentCurrency(currency) {\n return {\n name: currency.id,\n symbol: currency.id\n };\n }\n formatPurchaseCurrency(currency) {\n return {\n name: currency.name,\n symbol: currency.symbol\n };\n }\n};\nW3mInputCurrency.styles = styles;\n__decorate([\n property({ type: String })\n], W3mInputCurrency.prototype, \"type\", void 0);\n__decorate([\n property({ type: Number })\n], W3mInputCurrency.prototype, \"value\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"currencies\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"currencyImages\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"tokenImages\", void 0);\nW3mInputCurrency = __decorate([\n customElement('w3m-swap-input')\n], W3mInputCurrency);\nexport { W3mInputCurrency };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n background-color: var(--wui-gray-glass-005);\n }\n\n a {\n text-decoration: none;\n color: var(--wui-color-fg-175);\n font-weight: 500;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mLegalFooter = class W3mLegalFooter extends LitElement {\n render() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n if (!termsConditionsUrl && !privacyPolicyUrl) {\n return null;\n }\n return html `\n \n \n By connecting your wallet, you agree to our
      \n ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}\n
      \n
      \n `;\n }\n andTemplate() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n return termsConditionsUrl && privacyPolicyUrl ? 'and' : '';\n }\n termsTemplate() {\n const { termsConditionsUrl } = OptionsController.state;\n if (!termsConditionsUrl) {\n return null;\n }\n return html `Terms of Service`;\n }\n privacyTemplate() {\n const { privacyPolicyUrl } = OptionsController.state;\n if (!privacyPolicyUrl) {\n return null;\n }\n return html `Privacy Policy`;\n }\n};\nW3mLegalFooter.styles = [styles];\nW3mLegalFooter = __decorate([\n customElement('w3m-legal-footer')\n], W3mLegalFooter);\nexport { W3mLegalFooter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './styles.js';\nlet W3mMobileDownloadLinks = class W3mMobileDownloadLinks extends LitElement {\n constructor() {\n super(...arguments);\n this.wallet = undefined;\n }\n render() {\n if (!this.wallet) {\n this.style.display = 'none';\n return null;\n }\n const { name, app_store, play_store, chrome_store, homepage } = this.wallet;\n const isMobile = CoreHelperUtil.isMobile();\n const isIos = CoreHelperUtil.isIos();\n const isAndroid = CoreHelperUtil.isAndroid();\n const isMultiple = [app_store, play_store, homepage, chrome_store].filter(Boolean).length > 1;\n const shortName = UiHelperUtil.getTruncateString({\n string: name,\n charsStart: 12,\n charsEnd: 0,\n truncate: 'end'\n });\n if (isMultiple && !isMobile) {\n return html `\n RouterController.push('Downloads', { wallet: this.wallet })}\n >\n `;\n }\n if (!isMultiple && homepage) {\n return html `\n \n `;\n }\n if (app_store && isIos) {\n return html `\n \n `;\n }\n if (play_store && isAndroid) {\n return html `\n \n `;\n }\n this.style.display = 'none';\n return null;\n }\n onAppStore() {\n if (this.wallet?.app_store) {\n CoreHelperUtil.openHref(this.wallet.app_store, '_blank');\n }\n }\n onPlayStore() {\n if (this.wallet?.play_store) {\n CoreHelperUtil.openHref(this.wallet.play_store, '_blank');\n }\n }\n onHomePage() {\n if (this.wallet?.homepage) {\n CoreHelperUtil.openHref(this.wallet.homepage, '_blank');\n }\n }\n};\nW3mMobileDownloadLinks.styles = [styles];\n__decorate([\n property({ type: Object })\n], W3mMobileDownloadLinks.prototype, \"wallet\", void 0);\nW3mMobileDownloadLinks = __decorate([\n customElement('w3m-mobile-download-links')\n], W3mMobileDownloadLinks);\nexport { W3mMobileDownloadLinks };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n border-top: 1px solid var(--wui-gray-glass-005);\n }\n\n a {\n text-decoration: none;\n color: var(--wui-color-fg-175);\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-3xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mOnRampProvidersFooter = class W3mOnRampProvidersFooter extends LitElement {\n render() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n if (!termsConditionsUrl && !privacyPolicyUrl) {\n return null;\n }\n return html `\n \n \n We work with the best providers to give you the lowest fees and best support. More options\n coming soon!\n \n\n ${this.howDoesItWorkTemplate()}\n \n `;\n }\n howDoesItWorkTemplate() {\n return html ` \n \n How does it work?\n `;\n }\n onWhatIsBuy() {\n RouterController.push('WhatIsABuy');\n }\n};\nW3mOnRampProvidersFooter.styles = [styles];\nW3mOnRampProvidersFooter = __decorate([\n customElement('w3m-onramp-providers-footer')\n], W3mOnRampProvidersFooter);\nexport { W3mOnRampProvidersFooter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n position: absolute;\n opacity: 0;\n pointer-events: none;\n top: 11px;\n left: 50%;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { SnackController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst presets = {\n success: {\n backgroundColor: 'success-100',\n iconColor: 'success-100',\n icon: 'checkmark'\n },\n error: {\n backgroundColor: 'error-100',\n iconColor: 'error-100',\n icon: 'close'\n }\n};\nlet W3mSnackBar = class W3mSnackBar extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.timeout = undefined;\n this.open = SnackController.state.open;\n this.unsubscribe.push(SnackController.subscribeKey('open', val => {\n this.open = val;\n this.onOpen();\n }));\n }\n disconnectedCallback() {\n clearTimeout(this.timeout);\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const { message, variant } = SnackController.state;\n const preset = presets[variant];\n return html `\n \n `;\n }\n onOpen() {\n clearTimeout(this.timeout);\n if (this.open) {\n this.animate([\n { opacity: 0, transform: 'translateX(-50%) scale(0.85)' },\n { opacity: 1, transform: 'translateX(-50%) scale(1)' }\n ], {\n duration: 150,\n fill: 'forwards',\n easing: 'ease'\n });\n this.timeout = setTimeout(() => SnackController.hide(), 2500);\n }\n else {\n this.animate([\n { opacity: 1, transform: 'translateX(-50%) scale(1)' },\n { opacity: 0, transform: 'translateX(-50%) scale(0.85)' }\n ], {\n duration: 150,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n};\nW3mSnackBar.styles = styles;\n__decorate([\n state()\n], W3mSnackBar.prototype, \"open\", void 0);\nW3mSnackBar = __decorate([\n customElement('w3m-snackbar')\n], W3mSnackBar);\nexport { W3mSnackBar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-separator {\n margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1);\n width: calc(100% + var(--wui-spacing-s) * 2);\n }\n\n wui-email-input {\n width: 100%;\n }\n\n form {\n width: 100%;\n display: block;\n position: relative;\n }\n\n wui-icon-link,\n wui-loading-spinner {\n position: absolute;\n top: 21px;\n transform: translateY(-50%);\n }\n\n wui-icon-link {\n right: var(--wui-spacing-xs);\n }\n\n wui-loading-spinner {\n right: var(--wui-spacing-m);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectorController, CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ref, createRef } from 'lit/directives/ref.js';\nimport styles from './styles.js';\nimport { SnackController, RouterController, EventsController } from '@web3modal/core';\nlet W3mEmailLoginWidget = class W3mEmailLoginWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.formRef = createRef();\n this.connectors = ConnectorController.state.connectors;\n this.email = '';\n this.loading = false;\n this.error = '';\n this.unsubscribe.push(ConnectorController.subscribeKey('connectors', val => (this.connectors = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n firstUpdated() {\n this.formRef.value?.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n this.onSubmitEmail(event);\n }\n });\n }\n render() {\n const multipleConnectors = this.connectors.length > 1;\n const connector = this.connectors.find(c => c.type === 'EMAIL');\n if (!connector) {\n return null;\n }\n return html `\n
      \n \n \n\n ${this.submitButtonTemplate()}${this.loadingTemplate()}\n \n \n\n ${multipleConnectors ? html `` : null}\n `;\n }\n submitButtonTemplate() {\n const showSubmit = !this.loading && this.email.length > 3;\n return showSubmit\n ? html `\n \n \n `\n : null;\n }\n loadingTemplate() {\n return this.loading\n ? html ``\n : null;\n }\n onEmailInputChange(event) {\n this.email = event.detail.trim();\n this.error = '';\n }\n async onSubmitEmail(event) {\n try {\n if (this.loading) {\n return;\n }\n this.loading = true;\n event.preventDefault();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n throw new Error('w3m-email-login-widget: Email connector not found');\n }\n const { action } = await emailConnector.provider.connectEmail({ email: this.email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_SUBMITTED' });\n if (action === 'VERIFY_OTP') {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n RouterController.push('EmailVerifyOtp', { email: this.email });\n }\n else if (action === 'VERIFY_DEVICE') {\n RouterController.push('EmailVerifyDevice', { email: this.email });\n }\n }\n catch (error) {\n const parsedError = CoreHelperUtil.parseError(error);\n if (parsedError?.includes('Invalid email')) {\n this.error = 'Invalid email. Try again.';\n }\n else {\n SnackController.showError(error);\n }\n }\n finally {\n this.loading = false;\n }\n }\n onFocusEvent() {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_LOGIN_SELECTED' });\n }\n};\nW3mEmailLoginWidget.styles = styles;\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"connectors\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"email\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"error\", void 0);\nW3mEmailLoginWidget = __decorate([\n customElement('w3m-email-login-widget')\n], W3mEmailLoginWidget);\nexport { W3mEmailLoginWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n :host > wui-flex:first-child {\n transform: translateY(calc(var(--wui-spacing-xxs) * -1));\n }\n\n wui-icon-link {\n margin-right: calc(var(--wui-icon-box-size-md) * -1);\n }\n\n wui-notice-card {\n margin-bottom: var(--wui-spacing-3xs);\n }\n\n w3m-transactions-view {\n max-height: 200px;\n }\n\n .tab-content-container {\n height: 300px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n .account-button {\n width: auto;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-s);\n height: 48px;\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n border-radius: 24px;\n transaction: background-color 0.2s linear;\n }\n\n .account-button:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .avatar-container {\n position: relative;\n }\n\n wui-avatar.avatar {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n wui-avatar.network-avatar {\n width: 16px;\n height: 16px;\n position: absolute;\n left: 100%;\n top: 100%;\n transform: translate(-75%, -75%);\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n .account-links {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .account-links wui-flex {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n background: red;\n align-items: center;\n justify-content: center;\n height: 48px;\n padding: 10px;\n flex: 1 0 0;\n border-radius: var(--XS, 16px);\n border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n .account-links wui-flex:hover {\n background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));\n }\n\n .account-links wui-flex wui-icon {\n width: var(--S, 20px);\n height: var(--S, 20px);\n }\n\n .account-links wui-flex wui-icon svg path {\n stroke: #47a1ff;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, CoreHelperUtil, ModalController, NetworkController, RouterController, AssetUtil, StorageUtil, ConnectorController, EventsController, ConnectionController, SnackController, ConstantsUtil, OptionsController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mAccountDefaultWidget = class W3mAccountDefaultWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.disconnecting = false;\n this.balance = AccountController.state.balance;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.balance = val.balance;\n this.balanceSymbol = val.balanceSymbol;\n }\n else if (!this.disconnecting) {\n SnackController.showError('Account not found');\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html `\n \n \n \n \n ${this.profileName\n ? UiHelperUtil.getTruncateString({\n string: this.profileName,\n charsStart: 20,\n charsEnd: 0,\n truncate: 'end'\n })\n : UiHelperUtil.getTruncateString({\n string: this.address ? this.address : '',\n charsStart: 4,\n charsEnd: 4,\n truncate: 'middle'\n })}\n \n \n \n ${CoreHelperUtil.formatBalance(this.balance, this.balanceSymbol)}\n \n ${this.explorerBtnTemplate()}\n \n\n \n ${this.emailCardTemplate()} ${this.emailBtnTemplate()}\n\n \n \n ${this.network?.name ?? 'Unknown'}\n \n \n ${this.onrampTemplate()}\n \n Activity\n \n \n Disconnect\n \n `;\n }\n onrampTemplate() {\n const { enableOnramp } = OptionsController.state;\n if (!enableOnramp) {\n return null;\n }\n return html `\n \n Buy crypto\n \n `;\n }\n emailCardTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n const { origin } = location;\n if (!emailConnector || type !== 'EMAIL' || origin.includes(ConstantsUtil.SECURE_SITE)) {\n return null;\n }\n return html `\n \n `;\n }\n handleClickPay() {\n RouterController.push('OnRampProviders');\n }\n explorerBtnTemplate() {\n const { addressExplorerUrl } = AccountController.state;\n if (!addressExplorerUrl) {\n return null;\n }\n return html `\n \n \n Block Explorer\n \n \n `;\n }\n emailBtnTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL') {\n return null;\n }\n const email = emailConnector.provider.getEmail() ?? '';\n return html `\n this.onGoToUpdateEmail(email)}\n >\n ${email}\n \n `;\n }\n isAllowedNetworkSwitch() {\n const { requestedCaipNetworks } = NetworkController.state;\n const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;\n const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id);\n return isMultiNetwork || !isValidNetwork;\n }\n onCopyAddress() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n onNetworks() {\n if (this.isAllowedNetworkSwitch()) {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORKS' });\n RouterController.push('Networks');\n }\n }\n onTransactions() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_TRANSACTIONS' });\n RouterController.push('Transactions');\n }\n async onDisconnect() {\n try {\n this.disconnecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_SUCCESS' });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconnecting = false;\n }\n }\n onExplorer() {\n const { addressExplorerUrl } = AccountController.state;\n if (addressExplorerUrl) {\n CoreHelperUtil.openHref(addressExplorerUrl, '_blank');\n }\n }\n onGoToUpgradeView() {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_UPGRADE_FROM_MODAL' });\n RouterController.push('UpgradeEmailWallet');\n }\n onGoToUpdateEmail(email) {\n RouterController.push('UpdateEmailWallet', { email });\n }\n};\nW3mAccountDefaultWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"disconnecting\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"balance\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"balanceSymbol\", void 0);\nW3mAccountDefaultWidget = __decorate([\n customElement('w3m-account-default-widget')\n], W3mAccountDefaultWidget);\nexport { W3mAccountDefaultWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n wui-promo {\n position: absolute;\n top: -32px;\n }\n\n wui-profile-button {\n margin-top: calc(-1 * var(--wui-spacing-2l));\n }\n\n wui-promo + wui-profile-button {\n margin-top: var(--wui-spacing-2l);\n }\n\n wui-tooltip-select {\n width: 100%;\n }\n\n wui-tabs {\n width: 100%;\n }\n\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n`;\n//# sourceMappingURL=styles.js.map","export const ConstantsUtil = {\n ACCOUNT_TABS: [{ label: 'Tokens' }, { label: 'NFTs' }, { label: 'Activity' }]\n};\n//# sourceMappingURL=ConstantsUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ModalController, NetworkController, AssetUtil, RouterController, CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '../../utils/ConstantsUtil.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mAccountWalletFeaturesWidget = class W3mAccountWalletFeaturesWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.smartAccountDeployed = AccountController.state.smartAccountDeployed;\n this.network = NetworkController.state.caipNetwork;\n this.currentTab = AccountController.state.currentTab;\n this.tokenBalance = AccountController.state.tokenBalance;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.currentTab = val.currentTab;\n this.tokenBalance = val.tokenBalance;\n this.smartAccountDeployed = val.smartAccountDeployed;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n ModalController.close();\n }\n })\n ], NetworkController.subscribe(val => {\n this.network = val.caipNetwork;\n }));\n this.watchConvertValues();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n clearInterval(this.watchTokenBalance);\n }\n firstUpdated() {\n AccountController.fetchTokenBalance();\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html `\n ${this.activateAccountTemplate()}\n \n ${this.tokenBalanceTemplate()}\n \n \n \n \n \n \n\n \n ${this.listContentTemplate()}\n `;\n }\n watchConvertValues() {\n this.watchTokenBalance = setInterval(() => AccountController.fetchTokenBalance(), 10000);\n }\n listContentTemplate() {\n if (this.currentTab === 0) {\n return html ``;\n }\n if (this.currentTab === 1) {\n return html ``;\n }\n if (this.currentTab === 2) {\n return html ``;\n }\n return html ``;\n }\n tokenBalanceTemplate() {\n if (this.tokenBalance && this.tokenBalance?.length >= 0) {\n const value = CoreHelperUtil.calculateBalance(this.tokenBalance);\n const { dollars = '0', pennies = '00' } = CoreHelperUtil.formatTokenBalance(value);\n return html ``;\n }\n return html ``;\n }\n activateAccountTemplate() {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n if (!smartAccountEnabled ||\n this.preferredAccountType !== W3mFrameRpcConstants.ACCOUNT_TYPES.EOA ||\n this.smartAccountDeployed) {\n return null;\n }\n return html ` `;\n }\n onTabChange(index) {\n AccountController.setCurrentTab(index);\n }\n onProfileButtonClick() {\n RouterController.push('AccountSettings');\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n onConvertClick() {\n RouterController.push('Convert');\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n onSendClick() {\n RouterController.push('WalletSend');\n }\n onUpdateToSmartAccount() {\n RouterController.push('UpgradeToSmartAccount');\n }\n};\nW3mAccountWalletFeaturesWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"watchTokenBalance\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"smartAccountDeployed\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"currentTab\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"tokenBalance\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"preferredAccountType\", void 0);\nW3mAccountWalletFeaturesWidget = __decorate([\n customElement('w3m-account-wallet-features-widget')\n], W3mAccountWalletFeaturesWidget);\nexport { W3mAccountWalletFeaturesWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n max-height: 280px;\n overflow: scroll;\n scrollbar-width: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mAccountActivityWidget = class W3mAccountActivityWidget extends LitElement {\n render() {\n return html ``;\n }\n};\nW3mAccountActivityWidget.styles = styles;\nW3mAccountActivityWidget = __decorate([\n customElement('w3m-account-activity-widget')\n], W3mAccountActivityWidget);\nexport { W3mAccountActivityWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mAccountNftsWidget = class W3mAccountNftsWidget extends LitElement {\n render() {\n return html `${this.nftTemplate()}`;\n }\n nftTemplate() {\n return html ` \n \n \n No NFTs yet\n Transfer from another wallets to get started\n \n Receive NFTs\n `;\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n};\nW3mAccountNftsWidget.styles = styles;\nW3mAccountNftsWidget = __decorate([\n customElement('w3m-account-nfts-widget')\n], W3mAccountNftsWidget);\nexport { W3mAccountNftsWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n wui-flex {\n width: 100%;\n }\n\n .contentContainer {\n max-height: 280px;\n overflow: scroll;\n scrollbar-width: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nlet W3mAccountTokensWidget = class W3mAccountTokensWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.tokenBalance = AccountController.state.tokenBalance;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n this.tokenBalance = val.tokenBalance;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `${this.tokenTemplate()}`;\n }\n tokenTemplate() {\n if (this.tokenBalance && this.tokenBalance?.length > 0) {\n return html `\n ${this.tokenItemTemplate()}\n `;\n }\n return html ` `;\n }\n tokenItemTemplate() {\n return this.tokenBalance?.map(token => html ``);\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mAccountTokensWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountTokensWidget.prototype, \"tokenBalance\", void 0);\nW3mAccountTokensWidget = __decorate([\n customElement('w3m-account-tokens-widget')\n], W3mAccountTokensWidget);\nexport { W3mAccountTokensWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n min-height: 100%;\n }\n\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n\n .emptyContainer {\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DateUtil } from '@web3modal/common';\nimport { AccountController, EventsController, OptionsController, RouterController, TransactionsController } from '@web3modal/core';\nimport { TransactionUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst PAGINATOR_ID = 'last-transaction';\nconst LOADING_ITEM_COUNT = 7;\nlet W3mActivityList = class W3mActivityList extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.paginationObserver = undefined;\n this.page = 'activity';\n this.address = AccountController.state.address;\n this.transactionsByYear = TransactionsController.state.transactionsByYear;\n this.loading = TransactionsController.state.loading;\n this.empty = TransactionsController.state.empty;\n this.next = TransactionsController.state.next;\n TransactionsController.clearCursor();\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.isConnected) {\n if (this.address !== val.address) {\n this.address = val.address;\n TransactionsController.resetTransactions();\n TransactionsController.fetchTransactions(val.address);\n }\n }\n }),\n TransactionsController.subscribe(val => {\n this.transactionsByYear = val.transactionsByYear;\n this.loading = val.loading;\n this.empty = val.empty;\n this.next = val.next;\n })\n ]);\n }\n firstUpdated() {\n TransactionsController.fetchTransactions(this.address);\n this.createPaginationObserver();\n }\n updated() {\n this.setPaginationObserver();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` ${this.empty ? null : this.templateTransactionsByYear()}\n ${this.loading ? this.templateLoading() : null}\n ${!this.loading && this.empty ? this.templateEmpty() : null}`;\n }\n templateTransactionsByYear() {\n const sortedYearKeys = Object.keys(this.transactionsByYear).sort().reverse();\n return sortedYearKeys.map((year, index) => {\n const isLastGroup = index === sortedYearKeys.length - 1;\n const yearInt = parseInt(year, 10);\n const sortedMonthIndexes = new Array(12)\n .fill(null)\n .map((_, idx) => idx)\n .reverse();\n return sortedMonthIndexes.map(month => {\n const groupTitle = TransactionUtil.getTransactionGroupTitle(yearInt, month);\n const transactions = this.transactionsByYear[yearInt]?.[month];\n if (!transactions) {\n return null;\n }\n return html `\n \n \n ${groupTitle}\n \n \n ${this.templateTransactions(transactions, isLastGroup)}\n \n \n `;\n });\n });\n }\n templateRenderTransaction(transaction, isLastTransaction) {\n const { date, descriptions, direction, isAllNFT, images, status, transfers, type } = this.getTransactionListItemProps(transaction);\n const haveMultipleTransfers = transfers?.length > 1;\n const haveTwoTransfers = transfers?.length === 2;\n if (haveTwoTransfers && !isAllNFT) {\n return html `\n \n `;\n }\n if (haveMultipleTransfers) {\n return transfers.map((transfer, index) => {\n const description = TransactionUtil.getTransferDescription(transfer);\n const isLastTransfer = isLastTransaction && index === transfers.length - 1;\n return html ` `;\n });\n }\n return html `\n \n `;\n }\n templateTransactions(transactions, isLastGroup) {\n return transactions.map((transaction, index) => {\n const isLastTransaction = isLastGroup && index === transactions.length - 1;\n return html `${this.templateRenderTransaction(transaction, isLastTransaction)}`;\n });\n }\n emptyStateActivity() {\n return html `\n \n \n No Transactions yet\n Start trading on dApps
      \n to grow your wallet!\n
      \n `;\n }\n emptyStateAccount() {\n return html `\n \n \n No activity yet\n Your next transactions will appear here\n \n Trade\n `;\n }\n templateEmpty() {\n if (this.page === 'account') {\n return html `${this.emptyStateAccount()}`;\n }\n return html `${this.emptyStateActivity()}`;\n }\n templateLoading() {\n if (this.page === 'activity') {\n return Array(LOADING_ITEM_COUNT)\n .fill(html ` `)\n .map(item => item);\n }\n return null;\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n createPaginationObserver() {\n const { projectId } = OptionsController.state;\n this.paginationObserver = new IntersectionObserver(([element]) => {\n if (element?.isIntersecting && !this.loading) {\n TransactionsController.fetchTransactions(this.address);\n EventsController.sendEvent({\n type: 'track',\n event: 'LOAD_MORE_TRANSACTIONS',\n properties: {\n address: this.address,\n projectId,\n cursor: this.next\n }\n });\n }\n }, {});\n this.setPaginationObserver();\n }\n setPaginationObserver() {\n this.paginationObserver?.disconnect();\n const lastItem = this.shadowRoot?.querySelector(`#${PAGINATOR_ID}`);\n if (lastItem) {\n this.paginationObserver?.observe(lastItem);\n }\n }\n getTransactionListItemProps(transaction) {\n const date = DateUtil.formatDate(transaction?.metadata?.minedAt);\n const descriptions = TransactionUtil.getTransactionDescriptions(transaction);\n const transfers = transaction?.transfers;\n const transfer = transaction?.transfers?.[0];\n const isAllNFT = Boolean(transfer) && transaction?.transfers?.every(item => Boolean(item.nft_info));\n const images = TransactionUtil.getTransactionImages(transfers);\n return {\n date,\n direction: transfer?.direction,\n descriptions,\n isAllNFT,\n images,\n status: transaction.metadata?.status,\n transfers,\n type: transaction.metadata?.operationType\n };\n }\n};\nW3mActivityList.styles = styles;\n__decorate([\n property()\n], W3mActivityList.prototype, \"page\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"transactionsByYear\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"empty\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"next\", void 0);\nW3mActivityList = __decorate([\n customElement('w3m-activity-list')\n], W3mActivityList);\nexport { W3mActivityList };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n height: 100px;\n border-radius: var(--wui-border-radius-s);\n border: 1px solid var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n }\n\n :host(:hover) {\n background-color: var(--wui-gray-glass-005);\n }\n\n wui-flex {\n width: 100%;\n height: fit-content;\n }\n\n wui-button {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nimport { RouterController, SendController } from '@web3modal/core';\nlet W3mInputToken = class W3mInputToken extends LitElement {\n render() {\n return html ` \n \n \n ${this.buttonTemplate()}\n \n \n ${this.sendValueTemplate()}\n \n ${this.maxAmountTemplate()} ${this.actionTemplate()}\n \n \n `;\n }\n buttonTemplate() {\n if (this.token) {\n return html `Select token`;\n }\n return html `Select token`;\n }\n handleSelectButtonClick() {\n RouterController.push('WalletSendSelectToken');\n }\n sendValueTemplate() {\n if (this.token && this.sendTokenAmount) {\n const price = this.token.price;\n const totalValue = price * this.sendTokenAmount;\n return html `$${totalValue.toFixed(2)}`;\n }\n return null;\n }\n maxAmountTemplate() {\n if (this.token) {\n if (this.sendTokenAmount && this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n return html ` \n ${UiHelperUtil.roundNumber(Number(this.token.quantity.numeric), 6, 5)}\n `;\n }\n return html ` \n ${UiHelperUtil.roundNumber(Number(this.token.quantity.numeric), 6, 5)}\n `;\n }\n return null;\n }\n actionTemplate() {\n if (this.token) {\n if (this.sendTokenAmount && this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n return html `Buy`;\n }\n return html `Max`;\n }\n return null;\n }\n onInputChange(event) {\n SendController.setTokenAmount(event.detail);\n }\n onMaxClick() {\n if (this.token) {\n SendController.setTokenAmount(Number(this.token?.quantity.numeric));\n }\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mInputToken.styles = styles;\n__decorate([\n property({ type: Object })\n], W3mInputToken.prototype, \"token\", void 0);\n__decorate([\n property({ type: Number })\n], W3mInputToken.prototype, \"sendTokenAmount\", void 0);\nW3mInputToken = __decorate([\n customElement('w3m-input-token')\n], W3mInputToken);\nexport { W3mInputToken };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n height: 100px;\n border-radius: var(--wui-border-radius-s);\n border: 1px solid var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n position: relative;\n }\n\n :host(:hover) {\n background-color: var(--wui-gray-glass-005);\n }\n\n wui-flex {\n width: 100%;\n height: fit-content;\n }\n\n wui-button {\n display: ruby;\n color: var(--wui-color-fg-100);\n margin: 0 var(--wui-spacing-xs);\n }\n\n .instruction {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n textarea {\n background: transparent;\n width: 100%;\n font-family: var(--w3m-font-family);\n font-size: var(--wui-font-size-medium);\n font-style: normal;\n font-weight: var(--wui-font-weight-light);\n line-height: 130%;\n letter-spacing: var(--wui-letter-spacing-medium);\n color: var(--wui-color-fg-100);\n caret-color: var(--wui-color-accent-100);\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n border: none;\n outline: none;\n appearance: none;\n resize: none;\n overflow: hidden;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property, state } from 'lit/decorators.js';\nimport { SendController } from '@web3modal/core';\nimport { createRef, ref } from 'lit/directives/ref.js';\nlet W3mInputAddress = class W3mInputAddress extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.instructionElementRef = createRef();\n this.instructionHidden = Boolean(this.receiverAddress);\n }\n firstUpdated() {\n if (this.receiverAddress) {\n this.instructionHidden = true;\n }\n this.checkHidden();\n }\n render() {\n return html ` \n \n Type or\n \n \n Paste\n \n address\n \n \n${this.receiverAddress ?? ''}\n `;\n }\n async focusInput() {\n if (this.instructionElementRef.value) {\n this.instructionHidden = true;\n await this.toggleInstructionFocus(false);\n this.instructionElementRef.value.style.pointerEvents = 'none';\n this.inputElementRef.value?.focus();\n if (this.inputElementRef.value) {\n this.inputElementRef.value.selectionStart = this.inputElementRef.value.selectionEnd =\n this.inputElementRef.value.value.length;\n }\n }\n }\n async focusInstruction() {\n if (this.instructionElementRef.value) {\n this.instructionHidden = false;\n await this.toggleInstructionFocus(true);\n this.instructionElementRef.value.style.pointerEvents = 'auto';\n this.inputElementRef.value?.blur();\n }\n }\n async toggleInstructionFocus(focus) {\n if (this.instructionElementRef.value) {\n await this.instructionElementRef.value.animate([{ opacity: focus ? 0 : 1 }, { opacity: focus ? 1 : 0 }], {\n duration: 100,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n }\n }\n onBoxClick() {\n if (!this.receiverAddress && !this.instructionHidden) {\n this.focusInput();\n }\n }\n onBlur() {\n if (!this.receiverAddress && this.instructionHidden) {\n this.focusInstruction();\n }\n }\n checkHidden() {\n if (this.instructionHidden) {\n this.focusInput();\n }\n }\n async onPasteClick() {\n const text = await navigator.clipboard.readText();\n SendController.setReceiverAddress(text);\n }\n onInputChange(e) {\n const element = e.target;\n if (element.value && !this.instructionHidden) {\n this.focusInput();\n }\n SendController.setReceiverAddress(element.value);\n }\n};\nW3mInputAddress.styles = styles;\n__decorate([\n property()\n], W3mInputAddress.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mInputAddress.prototype, \"instructionHidden\", void 0);\nW3mInputAddress = __decorate([\n customElement('w3m-input-address')\n], W3mInputAddress);\nexport { W3mInputAddress };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n width: 100%;\n flex-direction: column;\n gap: var(--wui-border-radius-1xs);\n border-radius: var(--wui-border-radius-s);\n background: var(--wui-gray-glass-002);\n padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs)\n var(--wui-spacing-1xs);\n }\n\n wui-text {\n padding: 0 var(--wui-spacing-1xs);\n }\n\n wui-flex {\n margin-top: var(--wui-spacing-1xs);\n }\n\n .network {\n cursor: pointer;\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n }\n\n .network:focus-visible {\n border: 1px solid var(--wui-color-accent-100);\n background-color: var(--wui-gray-glass-005);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n .network:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .network:active {\n background-color: var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nimport { AssetUtil, RouterController } from '@web3modal/core';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mWalletSendDetails = class W3mWalletSendDetails extends LitElement {\n render() {\n return html ` Details\n \n \n \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n if (this.caipNetwork?.name) {\n return html ` this.onNetworkClick(this.caipNetwork)}\n class=\"network\"\n textTitle=\"Network\"\n imageSrc=${ifDefined(AssetUtil.getNetworkImage(this.caipNetwork))}\n >`;\n }\n return null;\n }\n onNetworkClick(network) {\n if (network) {\n RouterController.push('Networks', { network });\n }\n }\n};\nW3mWalletSendDetails.styles = styles;\n__decorate([\n property()\n], W3mWalletSendDetails.prototype, \"receiverAddress\", void 0);\n__decorate([\n property({ type: Object })\n], W3mWalletSendDetails.prototype, \"caipNetwork\", void 0);\nW3mWalletSendDetails = __decorate([\n customElement('w3m-wallet-send-details')\n], W3mWalletSendDetails);\nexport { W3mWalletSendDetails };\n//# sourceMappingURL=index.js.map","import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, ModalController, NetworkController, OptionsController, PublicStateController, ThemeController, SnackController, RouterController } from '@web3modal/core';\nimport { setColorTheme, setThemeVariables } from '@web3modal/ui';\nlet isInitialized = false;\nexport class Web3ModalScaffold {\n constructor(options) {\n this.initPromise = undefined;\n this.setIsConnected = isConnected => {\n AccountController.setIsConnected(isConnected);\n };\n this.getIsConnectedState = () => AccountController.state.isConnected;\n this.setCaipAddress = caipAddress => {\n AccountController.setCaipAddress(caipAddress);\n };\n this.setBalance = (balance, balanceSymbol) => {\n AccountController.setBalance(balance, balanceSymbol);\n };\n this.setProfileName = profileName => {\n AccountController.setProfileName(profileName);\n };\n this.setProfileImage = profileImage => {\n AccountController.setProfileImage(profileImage);\n };\n this.resetAccount = () => {\n AccountController.resetAccount();\n };\n this.setCaipNetwork = caipNetwork => {\n NetworkController.setCaipNetwork(caipNetwork);\n };\n this.getCaipNetwork = () => NetworkController.state.caipNetwork;\n this.setRequestedCaipNetworks = requestedCaipNetworks => {\n NetworkController.setRequestedCaipNetworks(requestedCaipNetworks);\n };\n this.getApprovedCaipNetworksData = () => NetworkController.getApprovedCaipNetworksData();\n this.resetNetwork = () => {\n NetworkController.resetNetwork();\n };\n this.setConnectors = connectors => {\n ConnectorController.setConnectors(connectors);\n };\n this.addConnector = connector => {\n ConnectorController.addConnector(connector);\n };\n this.getConnectors = () => ConnectorController.getConnectors();\n this.resetWcConnection = () => {\n ConnectionController.resetWcConnection();\n };\n this.fetchIdentity = request => BlockchainApiController.fetchIdentity(request);\n this.setAddressExplorerUrl = addressExplorerUrl => {\n AccountController.setAddressExplorerUrl(addressExplorerUrl);\n };\n this.setSmartAccountDeployed = isDeployed => {\n AccountController.setSmartAccountDeployed(isDeployed);\n };\n this.setConnectedWalletInfo = connectedWalletInfo => {\n AccountController.setConnectedWalletInfo(connectedWalletInfo);\n };\n this.setSmartAccountEnabledNetworks = smartAccountEnabledNetworks => {\n NetworkController.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks);\n };\n this.setPreferredAccountType = preferredAccountType => {\n AccountController.setPreferredAccountType(preferredAccountType);\n };\n this.initControllers(options);\n this.initOrContinue();\n }\n async open(options) {\n await this.initOrContinue();\n ModalController.open(options);\n }\n async close() {\n await this.initOrContinue();\n ModalController.close();\n }\n setLoading(loading) {\n ModalController.setLoading(loading);\n }\n getThemeMode() {\n return ThemeController.state.themeMode;\n }\n getThemeVariables() {\n return ThemeController.state.themeVariables;\n }\n setThemeMode(themeMode) {\n ThemeController.setThemeMode(themeMode);\n setColorTheme(ThemeController.state.themeMode);\n }\n setThemeVariables(themeVariables) {\n ThemeController.setThemeVariables(themeVariables);\n setThemeVariables(ThemeController.state.themeVariables);\n }\n subscribeTheme(callback) {\n return ThemeController.subscribe(callback);\n }\n getWalletInfo() {\n return AccountController.state.connectedWalletInfo;\n }\n subscribeWalletInfo(callback) {\n return AccountController.subscribeKey('connectedWalletInfo', callback);\n }\n getState() {\n return PublicStateController.state;\n }\n subscribeState(callback) {\n return PublicStateController.subscribe(callback);\n }\n showErrorMessage(message) {\n SnackController.showError(message);\n }\n showSuccessMessage(message) {\n SnackController.showSuccess(message);\n }\n getEvent() {\n return { ...EventsController.state };\n }\n subscribeEvents(callback) {\n return EventsController.subscribe(callback);\n }\n redirect(route) {\n RouterController.push(route);\n }\n popTransactionStack(cancel) {\n RouterController.popTransactionStack(cancel);\n }\n isOpen() {\n return ModalController.state.open;\n }\n isTransactionStackEmpty() {\n return RouterController.state.transactionStack.length === 0;\n }\n async initControllers(options) {\n NetworkController.setClient(options.networkControllerClient);\n NetworkController.setDefaultCaipNetwork(options.defaultChain);\n OptionsController.setProjectId(options.projectId);\n OptionsController.setAllWallets(options.allWallets);\n OptionsController.setIncludeWalletIds(options.includeWalletIds);\n OptionsController.setExcludeWalletIds(options.excludeWalletIds);\n OptionsController.setFeaturedWalletIds(options.featuredWalletIds);\n OptionsController.setTokens(options.tokens);\n OptionsController.setTermsConditionsUrl(options.termsConditionsUrl);\n OptionsController.setPrivacyPolicyUrl(options.privacyPolicyUrl);\n OptionsController.setCustomWallets(options.customWallets);\n OptionsController.setEnableAnalytics(options.enableAnalytics);\n OptionsController.setSdkVersion(options._sdkVersion);\n ConnectionController.setClient(options.connectionControllerClient);\n if (options.siweControllerClient) {\n const { SIWEController } = await import('@web3modal/siwe');\n SIWEController.setSIWEClient(options.siweControllerClient);\n }\n if (options.metadata) {\n OptionsController.setMetadata(options.metadata);\n }\n if (options.themeMode) {\n ThemeController.setThemeMode(options.themeMode);\n }\n if (options.themeVariables) {\n ThemeController.setThemeVariables(options.themeVariables);\n }\n if (options.enableOnramp) {\n OptionsController.setOnrampEnabled(Boolean(options.enableOnramp));\n }\n if (options.enableWalletFeatures) {\n OptionsController.setWalletFeaturesEnabled(Boolean(options.enableWalletFeatures));\n }\n if (options.allowUnsupportedChain) {\n NetworkController.setAllowUnsupportedChain(options.allowUnsupportedChain);\n }\n }\n async initOrContinue() {\n if (!this.initPromise && !isInitialized && CoreHelperUtil.isClient()) {\n isInitialized = true;\n this.initPromise = new Promise(async (resolve) => {\n await Promise.all([import('@web3modal/ui'), import('./modal/w3m-modal/index.js')]);\n const modal = document.createElement('w3m-modal');\n document.body.insertAdjacentElement('beforeend', modal);\n resolve();\n });\n }\n return this.initPromise;\n }\n}\n//# sourceMappingURL=client.js.map","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package int provides helper functions for integerss.\n */\n// Shim using 16-bit pieces.\nfunction imulShim(a, b) {\n var ah = (a >>> 16) & 0xffff, al = a & 0xffff;\n var bh = (b >>> 16) & 0xffff, bl = b & 0xffff;\n return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);\n}\n/** 32-bit integer multiplication. */\n// Use system Math.imul if available, otherwise use our shim.\nexports.mul = Math.imul || imulShim;\n/** 32-bit integer addition. */\nfunction add(a, b) {\n return (a + b) | 0;\n}\nexports.add = add;\n/** 32-bit integer subtraction. */\nfunction sub(a, b) {\n return (a - b) | 0;\n}\nexports.sub = sub;\n/** 32-bit integer left rotation */\nfunction rotl(x, n) {\n return x << n | x >>> (32 - n);\n}\nexports.rotl = rotl;\n/** 32-bit integer left rotation */\nfunction rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}\nexports.rotr = rotr;\nfunction isIntegerShim(n) {\n return typeof n === \"number\" && isFinite(n) && Math.floor(n) === n;\n}\n/**\n * Returns true if the argument is an integer number.\n *\n * In ES2015, Number.isInteger.\n */\nexports.isInteger = Number.isInteger || isIntegerShim;\n/**\n * Math.pow(2, 53) - 1\n *\n * In ES2015 Number.MAX_SAFE_INTEGER.\n */\nexports.MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * Returns true if the argument is a safe integer number\n * (-MIN_SAFE_INTEGER < number <= MAX_SAFE_INTEGER)\n *\n * In ES2015, Number.isSafeInteger.\n */\nexports.isSafeInteger = function (n) {\n return exports.isInteger(n) && (n >= -exports.MAX_SAFE_INTEGER && n <= exports.MAX_SAFE_INTEGER);\n};\n//# sourceMappingURL=int.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package binary provides functions for encoding and decoding numbers in byte arrays.\n */\nvar int_1 = require(\"@stablelib/int\");\n// TODO(dchest): add asserts for correct value ranges and array offsets.\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (((array[offset + 0] << 8) | array[offset + 1]) << 16) >> 16;\n}\nexports.readInt16BE = readInt16BE;\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 0] << 8) | array[offset + 1]) >>> 0;\n}\nexports.readUint16BE = readUint16BE;\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (((array[offset + 1] << 8) | array[offset]) << 16) >> 16;\n}\nexports.readInt16LE = readInt16LE;\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 1] << 8) | array[offset]) >>> 0;\n}\nexports.readUint16LE = readUint16LE;\n/**\n * Writes 2-byte big-endian representation of 16-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(2); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 8;\n out[offset + 1] = value >>> 0;\n return out;\n}\nexports.writeUint16BE = writeUint16BE;\nexports.writeInt16BE = writeUint16BE;\n/**\n * Writes 2-byte little-endian representation of 16-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(2); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n return out;\n}\nexports.writeUint16LE = writeUint16LE;\nexports.writeInt16LE = writeUint16LE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3];\n}\nexports.readInt32BE = readInt32BE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3]) >>> 0;\n}\nexports.readUint32BE = readUint32BE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset];\n}\nexports.readInt32LE = readInt32LE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset]) >>> 0;\n}\nexports.readUint32LE = readUint32LE;\n/**\n * Writes 4-byte big-endian representation of 32-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 24;\n out[offset + 1] = value >>> 16;\n out[offset + 2] = value >>> 8;\n out[offset + 3] = value >>> 0;\n return out;\n}\nexports.writeUint32BE = writeUint32BE;\nexports.writeInt32BE = writeUint32BE;\n/**\n * Writes 4-byte little-endian representation of 32-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n out[offset + 2] = value >>> 16;\n out[offset + 3] = value >>> 24;\n return out;\n}\nexports.writeUint32LE = writeUint32LE;\nexports.writeInt32LE = writeUint32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var hi = readInt32BE(array, offset);\n var lo = readInt32BE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\nexports.readInt64BE = readInt64BE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var hi = readUint32BE(array, offset);\n var lo = readUint32BE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\nexports.readUint64BE = readUint64BE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var lo = readInt32LE(array, offset);\n var hi = readInt32LE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\nexports.readInt64LE = readInt64LE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var lo = readUint32LE(array, offset);\n var hi = readUint32LE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\nexports.readUint64LE = readUint64LE;\n/**\n * Writes 8-byte big-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n writeUint32BE(value / 0x100000000 >>> 0, out, offset);\n writeUint32BE(value >>> 0, out, offset + 4);\n return out;\n}\nexports.writeUint64BE = writeUint64BE;\nexports.writeInt64BE = writeUint64BE;\n/**\n * Writes 8-byte little-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n writeUint32LE(value >>> 0, out, offset);\n writeUint32LE(value / 0x100000000 >>> 0, out, offset + 4);\n return out;\n}\nexports.writeUint64LE = writeUint64LE;\nexports.writeInt64LE = writeUint64LE;\n/**\n * Reads bytes from array starting at offset as big-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintBE(bitLength, array, offset) {\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"readUintBE supports only bitLengths divisible by 8\");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error(\"readUintBE: array is too short for the given bitLength\");\n }\n var result = 0;\n var mul = 1;\n for (var i = bitLength / 8 + offset - 1; i >= offset; i--) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\nexports.readUintBE = readUintBE;\n/**\n * Reads bytes from array starting at offset as little-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintLE(bitLength, array, offset) {\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"readUintLE supports only bitLengths divisible by 8\");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error(\"readUintLE: array is too short for the given bitLength\");\n }\n var result = 0;\n var mul = 1;\n for (var i = offset; i < offset + bitLength / 8; i++) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\nexports.readUintLE = readUintLE;\n/**\n * Writes a big-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintBE(bitLength, value, out, offset) {\n if (out === void 0) { out = new Uint8Array(bitLength / 8); }\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"writeUintBE supports only bitLengths divisible by 8\");\n }\n if (!int_1.isSafeInteger(value)) {\n throw new Error(\"writeUintBE value must be an integer\");\n }\n var div = 1;\n for (var i = bitLength / 8 + offset - 1; i >= offset; i--) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\nexports.writeUintBE = writeUintBE;\n/**\n * Writes a little-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintLE(bitLength, value, out, offset) {\n if (out === void 0) { out = new Uint8Array(bitLength / 8); }\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"writeUintLE supports only bitLengths divisible by 8\");\n }\n if (!int_1.isSafeInteger(value)) {\n throw new Error(\"writeUintLE value must be an integer\");\n }\n var div = 1;\n for (var i = offset; i < offset + bitLength / 8; i++) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\nexports.writeUintLE = writeUintLE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset);\n}\nexports.readFloat32BE = readFloat32BE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset, true);\n}\nexports.readFloat32LE = readFloat32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * 64-bit floating-point number (\"double\") and returns it.\n */\nfunction readFloat64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset);\n}\nexports.readFloat64BE = readFloat64BE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * 64-bit floating-point number (\"double\") and returns it.\n */\nfunction readFloat64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset, true);\n}\nexports.readFloat64LE = readFloat64LE;\n/**\n * Writes 4-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value);\n return out;\n}\nexports.writeFloat32BE = writeFloat32BE;\n/**\n * Writes 4-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value, true);\n return out;\n}\nexports.writeFloat32LE = writeFloat32LE;\n/**\n * Writes 8-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value);\n return out;\n}\nexports.writeFloat64BE = writeFloat64BE;\n/**\n * Writes 8-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value, true);\n return out;\n}\nexports.writeFloat64LE = writeFloat64LE;\n//# sourceMappingURL=binary.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sets all values in the given array to zero and returns it.\n *\n * The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\nfunction wipe(array) {\n // Right now it's similar to array.fill(0). If it turns\n // out that runtimes optimize this call away, maybe\n // we can try something else.\n for (var i = 0; i < array.length; i++) {\n array[i] = 0;\n }\n return array;\n}\nexports.wipe = wipe;\n//# sourceMappingURL=wipe.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package chacha implements ChaCha stream cipher.\n */\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n// Number of ChaCha rounds (ChaCha20).\nvar ROUNDS = 20;\n// Applies the ChaCha core function to 16-byte input,\n// 32-byte key key, and puts the result into 64-byte array out.\nfunction core(out, input, key) {\n var j0 = 0x61707865; // \"expa\" -- ChaCha's \"sigma\" constant\n var j1 = 0x3320646E; // \"nd 3\" for 32-byte keys\n var j2 = 0x79622D32; // \"2-by\"\n var j3 = 0x6B206574; // \"te k\"\n var j4 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n var j5 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n var j6 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n var j7 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n var j8 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n var j9 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n var j10 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n var j11 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n var j12 = (input[3] << 24) | (input[2] << 16) | (input[1] << 8) | input[0];\n var j13 = (input[7] << 24) | (input[6] << 16) | (input[5] << 8) | input[4];\n var j14 = (input[11] << 24) | (input[10] << 16) | (input[9] << 8) | input[8];\n var j15 = (input[15] << 24) | (input[14] << 16) | (input[13] << 8) | input[12];\n var x0 = j0;\n var x1 = j1;\n var x2 = j2;\n var x3 = j3;\n var x4 = j4;\n var x5 = j5;\n var x6 = j6;\n var x7 = j7;\n var x8 = j8;\n var x9 = j9;\n var x10 = j10;\n var x11 = j11;\n var x12 = j12;\n var x13 = j13;\n var x14 = j14;\n var x15 = j15;\n for (var i = 0; i < ROUNDS; i += 2) {\n x0 = x0 + x4 | 0;\n x12 ^= x0;\n x12 = x12 >>> (32 - 16) | x12 << 16;\n x8 = x8 + x12 | 0;\n x4 ^= x8;\n x4 = x4 >>> (32 - 12) | x4 << 12;\n x1 = x1 + x5 | 0;\n x13 ^= x1;\n x13 = x13 >>> (32 - 16) | x13 << 16;\n x9 = x9 + x13 | 0;\n x5 ^= x9;\n x5 = x5 >>> (32 - 12) | x5 << 12;\n x2 = x2 + x6 | 0;\n x14 ^= x2;\n x14 = x14 >>> (32 - 16) | x14 << 16;\n x10 = x10 + x14 | 0;\n x6 ^= x10;\n x6 = x6 >>> (32 - 12) | x6 << 12;\n x3 = x3 + x7 | 0;\n x15 ^= x3;\n x15 = x15 >>> (32 - 16) | x15 << 16;\n x11 = x11 + x15 | 0;\n x7 ^= x11;\n x7 = x7 >>> (32 - 12) | x7 << 12;\n x2 = x2 + x6 | 0;\n x14 ^= x2;\n x14 = x14 >>> (32 - 8) | x14 << 8;\n x10 = x10 + x14 | 0;\n x6 ^= x10;\n x6 = x6 >>> (32 - 7) | x6 << 7;\n x3 = x3 + x7 | 0;\n x15 ^= x3;\n x15 = x15 >>> (32 - 8) | x15 << 8;\n x11 = x11 + x15 | 0;\n x7 ^= x11;\n x7 = x7 >>> (32 - 7) | x7 << 7;\n x1 = x1 + x5 | 0;\n x13 ^= x1;\n x13 = x13 >>> (32 - 8) | x13 << 8;\n x9 = x9 + x13 | 0;\n x5 ^= x9;\n x5 = x5 >>> (32 - 7) | x5 << 7;\n x0 = x0 + x4 | 0;\n x12 ^= x0;\n x12 = x12 >>> (32 - 8) | x12 << 8;\n x8 = x8 + x12 | 0;\n x4 ^= x8;\n x4 = x4 >>> (32 - 7) | x4 << 7;\n x0 = x0 + x5 | 0;\n x15 ^= x0;\n x15 = x15 >>> (32 - 16) | x15 << 16;\n x10 = x10 + x15 | 0;\n x5 ^= x10;\n x5 = x5 >>> (32 - 12) | x5 << 12;\n x1 = x1 + x6 | 0;\n x12 ^= x1;\n x12 = x12 >>> (32 - 16) | x12 << 16;\n x11 = x11 + x12 | 0;\n x6 ^= x11;\n x6 = x6 >>> (32 - 12) | x6 << 12;\n x2 = x2 + x7 | 0;\n x13 ^= x2;\n x13 = x13 >>> (32 - 16) | x13 << 16;\n x8 = x8 + x13 | 0;\n x7 ^= x8;\n x7 = x7 >>> (32 - 12) | x7 << 12;\n x3 = x3 + x4 | 0;\n x14 ^= x3;\n x14 = x14 >>> (32 - 16) | x14 << 16;\n x9 = x9 + x14 | 0;\n x4 ^= x9;\n x4 = x4 >>> (32 - 12) | x4 << 12;\n x2 = x2 + x7 | 0;\n x13 ^= x2;\n x13 = x13 >>> (32 - 8) | x13 << 8;\n x8 = x8 + x13 | 0;\n x7 ^= x8;\n x7 = x7 >>> (32 - 7) | x7 << 7;\n x3 = x3 + x4 | 0;\n x14 ^= x3;\n x14 = x14 >>> (32 - 8) | x14 << 8;\n x9 = x9 + x14 | 0;\n x4 ^= x9;\n x4 = x4 >>> (32 - 7) | x4 << 7;\n x1 = x1 + x6 | 0;\n x12 ^= x1;\n x12 = x12 >>> (32 - 8) | x12 << 8;\n x11 = x11 + x12 | 0;\n x6 ^= x11;\n x6 = x6 >>> (32 - 7) | x6 << 7;\n x0 = x0 + x5 | 0;\n x15 ^= x0;\n x15 = x15 >>> (32 - 8) | x15 << 8;\n x10 = x10 + x15 | 0;\n x5 ^= x10;\n x5 = x5 >>> (32 - 7) | x5 << 7;\n }\n binary_1.writeUint32LE(x0 + j0 | 0, out, 0);\n binary_1.writeUint32LE(x1 + j1 | 0, out, 4);\n binary_1.writeUint32LE(x2 + j2 | 0, out, 8);\n binary_1.writeUint32LE(x3 + j3 | 0, out, 12);\n binary_1.writeUint32LE(x4 + j4 | 0, out, 16);\n binary_1.writeUint32LE(x5 + j5 | 0, out, 20);\n binary_1.writeUint32LE(x6 + j6 | 0, out, 24);\n binary_1.writeUint32LE(x7 + j7 | 0, out, 28);\n binary_1.writeUint32LE(x8 + j8 | 0, out, 32);\n binary_1.writeUint32LE(x9 + j9 | 0, out, 36);\n binary_1.writeUint32LE(x10 + j10 | 0, out, 40);\n binary_1.writeUint32LE(x11 + j11 | 0, out, 44);\n binary_1.writeUint32LE(x12 + j12 | 0, out, 48);\n binary_1.writeUint32LE(x13 + j13 | 0, out, 52);\n binary_1.writeUint32LE(x14 + j14 | 0, out, 56);\n binary_1.writeUint32LE(x15 + j15 | 0, out, 60);\n}\n/**\n * Encrypt src with ChaCha20 stream generated for the given 32-byte key and\n * 8-byte (as in original implementation) or 12-byte (as in RFC7539) nonce and\n * write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * If nonce is 12 bytes, users should not encrypt more than 256 GiB with the\n * same key and nonce, otherwise the stream will repeat. The function will\n * throw error if counter overflows to prevent this.\n *\n * If nonce is 8 bytes, the output is practically unlimited (2^70 bytes, which\n * is more than a million petabytes). However, it is not recommended to\n * generate 8-byte nonces randomly, as the chance of collision is high.\n *\n * Never use the same key and nonce to encrypt more than one message.\n *\n * If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte\n * array with stream counter in first nonceInplaceCounterLength bytes and nonce\n * in the last remaining bytes. The counter will be incremented inplace for\n * each ChaCha block. This is useful if you need to encrypt one stream of data\n * in chunks.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength) {\n if (nonceInplaceCounterLength === void 0) { nonceInplaceCounterLength = 0; }\n // We only support 256-bit keys.\n if (key.length !== 32) {\n throw new Error(\"ChaCha: key size must be 32 bytes\");\n }\n if (dst.length < src.length) {\n throw new Error(\"ChaCha: destination is shorter than source\");\n }\n var nc;\n var counterLength;\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 8 && nonce.length !== 12) {\n throw new Error(\"ChaCha nonce must be 8 or 12 bytes\");\n }\n nc = new Uint8Array(16);\n // First counterLength bytes of nc are counter, starting with zero.\n counterLength = nc.length - nonce.length;\n // Last bytes of nc after counterLength are nonce, set them.\n nc.set(nonce, counterLength);\n }\n else {\n if (nonce.length !== 16) {\n throw new Error(\"ChaCha nonce with counter must be 16 bytes\");\n }\n // This will update passed nonce with counter inplace.\n nc = nonce;\n counterLength = nonceInplaceCounterLength;\n }\n // Allocate temporary space for ChaCha block.\n var block = new Uint8Array(64);\n for (var i = 0; i < src.length; i += 64) {\n // Generate a block.\n core(block, nc, key);\n // XOR block bytes with src into dst.\n for (var j = i; j < i + 64 && j < src.length; j++) {\n dst[j] = src[j] ^ block[j - i];\n }\n // Increment counter.\n incrementCounter(nc, 0, counterLength);\n }\n // Cleanup temporary space.\n wipe_1.wipe(block);\n if (nonceInplaceCounterLength === 0) {\n // Cleanup counter.\n wipe_1.wipe(nc);\n }\n return dst;\n}\nexports.streamXOR = streamXOR;\n/**\n * Generate ChaCha20 stream for the given 32-byte key and 8-byte or 12-byte\n * nonce and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * If nonceInplaceCounterLength is not 0, it behaves the same with respect to\n * the nonce as described in the streamXOR documentation.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength) {\n if (nonceInplaceCounterLength === void 0) { nonceInplaceCounterLength = 0; }\n wipe_1.wipe(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\nexports.stream = stream;\nfunction incrementCounter(counter, pos, len) {\n var carry = 1;\n while (len--) {\n carry = carry + (counter[pos] & 0xff) | 0;\n counter[pos] = carry & 0xff;\n carry >>>= 8;\n pos++;\n }\n if (carry > 0) {\n throw new Error(\"ChaCha: counter overflow\");\n }\n}\n//# sourceMappingURL=chacha.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package constant-time provides functions for performing algorithmically constant-time operations.\n */\n/**\n * NOTE! Due to the inability to guarantee real constant time evaluation of\n * anything in JavaScript VM, this is module is the best effort.\n */\n/**\n * Returns resultIfOne if subject is 1, or resultIfZero if subject is 0.\n *\n * Supports only 32-bit integers, so resultIfOne or resultIfZero are not\n * integers, they'll be converted to them with bitwise operations.\n */\nfunction select(subject, resultIfOne, resultIfZero) {\n return (~(subject - 1) & resultIfOne) | ((subject - 1) & resultIfZero);\n}\nexports.select = select;\n/**\n * Returns 1 if a <= b, or 0 if not.\n * Arguments must be positive 32-bit integers less than or equal to 2^31 - 1.\n */\nfunction lessOrEqual(a, b) {\n return (((a | 0) - (b | 0) - 1) >>> 31) & 1;\n}\nexports.lessOrEqual = lessOrEqual;\n/**\n * Returns 1 if a and b are of equal length and their contents\n * are equal, or 0 otherwise.\n *\n * Note that unlike in equal(), zero-length inputs are considered\n * the same, so this function will return 1.\n */\nfunction compare(a, b) {\n if (a.length !== b.length) {\n return 0;\n }\n var result = 0;\n for (var i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return (1 & ((result - 1) >>> 8));\n}\nexports.compare = compare;\n/**\n * Returns true if a and b are of equal non-zero length,\n * and their contents are equal, or false otherwise.\n *\n * Note that unlike in compare() zero-length inputs are considered\n * _not_ equal, so this function will return false.\n */\nfunction equal(a, b) {\n if (a.length === 0 || b.length === 0) {\n return false;\n }\n return compare(a, b) !== 0;\n}\nexports.equal = equal;\n//# sourceMappingURL=constant-time.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package poly1305 implements Poly1305 one-time message authentication algorithm.\n */\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 16;\n// Port of Andrew Moon's Poly1305-donna-16. Public domain.\n// https://github.com/floodyberry/poly1305-donna\n/**\n * Poly1305 computes 16-byte authenticator of message using\n * a one-time 32-byte key.\n *\n * Important: key should be used for only one message,\n * it should never repeat.\n */\nvar Poly1305 = /** @class */ (function () {\n function Poly1305(key) {\n this.digestLength = exports.DIGEST_LENGTH;\n this._buffer = new Uint8Array(16);\n this._r = new Uint16Array(10);\n this._h = new Uint16Array(10);\n this._pad = new Uint16Array(8);\n this._leftover = 0;\n this._fin = 0;\n this._finished = false;\n var t0 = key[0] | key[1] << 8;\n this._r[0] = (t0) & 0x1fff;\n var t1 = key[2] | key[3] << 8;\n this._r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n var t2 = key[4] | key[5] << 8;\n this._r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n var t3 = key[6] | key[7] << 8;\n this._r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n var t4 = key[8] | key[9] << 8;\n this._r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this._r[5] = ((t4 >>> 1)) & 0x1ffe;\n var t5 = key[10] | key[11] << 8;\n this._r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n var t6 = key[12] | key[13] << 8;\n this._r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n var t7 = key[14] | key[15] << 8;\n this._r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this._r[9] = ((t7 >>> 5)) & 0x007f;\n this._pad[0] = key[16] | key[17] << 8;\n this._pad[1] = key[18] | key[19] << 8;\n this._pad[2] = key[20] | key[21] << 8;\n this._pad[3] = key[22] | key[23] << 8;\n this._pad[4] = key[24] | key[25] << 8;\n this._pad[5] = key[26] | key[27] << 8;\n this._pad[6] = key[28] | key[29] << 8;\n this._pad[7] = key[30] | key[31] << 8;\n }\n Poly1305.prototype._blocks = function (m, mpos, bytes) {\n var hibit = this._fin ? 0 : 1 << 11;\n var h0 = this._h[0], h1 = this._h[1], h2 = this._h[2], h3 = this._h[3], h4 = this._h[4], h5 = this._h[5], h6 = this._h[6], h7 = this._h[7], h8 = this._h[8], h9 = this._h[9];\n var r0 = this._r[0], r1 = this._r[1], r2 = this._r[2], r3 = this._r[3], r4 = this._r[4], r5 = this._r[5], r6 = this._r[6], r7 = this._r[7], r8 = this._r[8], r9 = this._r[9];\n while (bytes >= 16) {\n var t0 = m[mpos + 0] | m[mpos + 1] << 8;\n h0 += (t0) & 0x1fff;\n var t1 = m[mpos + 2] | m[mpos + 3] << 8;\n h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n var t2 = m[mpos + 4] | m[mpos + 5] << 8;\n h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;\n var t3 = m[mpos + 6] | m[mpos + 7] << 8;\n h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n var t4 = m[mpos + 8] | m[mpos + 9] << 8;\n h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;\n h5 += ((t4 >>> 1)) & 0x1fff;\n var t5 = m[mpos + 10] | m[mpos + 11] << 8;\n h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n var t6 = m[mpos + 12] | m[mpos + 13] << 8;\n h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;\n var t7 = m[mpos + 14] | m[mpos + 15] << 8;\n h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n h9 += ((t7 >>> 5)) | hibit;\n var c = 0;\n var d0 = c;\n d0 += h0 * r0;\n d0 += h1 * (5 * r9);\n d0 += h2 * (5 * r8);\n d0 += h3 * (5 * r7);\n d0 += h4 * (5 * r6);\n c = (d0 >>> 13);\n d0 &= 0x1fff;\n d0 += h5 * (5 * r5);\n d0 += h6 * (5 * r4);\n d0 += h7 * (5 * r3);\n d0 += h8 * (5 * r2);\n d0 += h9 * (5 * r1);\n c += (d0 >>> 13);\n d0 &= 0x1fff;\n var d1 = c;\n d1 += h0 * r1;\n d1 += h1 * r0;\n d1 += h2 * (5 * r9);\n d1 += h3 * (5 * r8);\n d1 += h4 * (5 * r7);\n c = (d1 >>> 13);\n d1 &= 0x1fff;\n d1 += h5 * (5 * r6);\n d1 += h6 * (5 * r5);\n d1 += h7 * (5 * r4);\n d1 += h8 * (5 * r3);\n d1 += h9 * (5 * r2);\n c += (d1 >>> 13);\n d1 &= 0x1fff;\n var d2 = c;\n d2 += h0 * r2;\n d2 += h1 * r1;\n d2 += h2 * r0;\n d2 += h3 * (5 * r9);\n d2 += h4 * (5 * r8);\n c = (d2 >>> 13);\n d2 &= 0x1fff;\n d2 += h5 * (5 * r7);\n d2 += h6 * (5 * r6);\n d2 += h7 * (5 * r5);\n d2 += h8 * (5 * r4);\n d2 += h9 * (5 * r3);\n c += (d2 >>> 13);\n d2 &= 0x1fff;\n var d3 = c;\n d3 += h0 * r3;\n d3 += h1 * r2;\n d3 += h2 * r1;\n d3 += h3 * r0;\n d3 += h4 * (5 * r9);\n c = (d3 >>> 13);\n d3 &= 0x1fff;\n d3 += h5 * (5 * r8);\n d3 += h6 * (5 * r7);\n d3 += h7 * (5 * r6);\n d3 += h8 * (5 * r5);\n d3 += h9 * (5 * r4);\n c += (d3 >>> 13);\n d3 &= 0x1fff;\n var d4 = c;\n d4 += h0 * r4;\n d4 += h1 * r3;\n d4 += h2 * r2;\n d4 += h3 * r1;\n d4 += h4 * r0;\n c = (d4 >>> 13);\n d4 &= 0x1fff;\n d4 += h5 * (5 * r9);\n d4 += h6 * (5 * r8);\n d4 += h7 * (5 * r7);\n d4 += h8 * (5 * r6);\n d4 += h9 * (5 * r5);\n c += (d4 >>> 13);\n d4 &= 0x1fff;\n var d5 = c;\n d5 += h0 * r5;\n d5 += h1 * r4;\n d5 += h2 * r3;\n d5 += h3 * r2;\n d5 += h4 * r1;\n c = (d5 >>> 13);\n d5 &= 0x1fff;\n d5 += h5 * r0;\n d5 += h6 * (5 * r9);\n d5 += h7 * (5 * r8);\n d5 += h8 * (5 * r7);\n d5 += h9 * (5 * r6);\n c += (d5 >>> 13);\n d5 &= 0x1fff;\n var d6 = c;\n d6 += h0 * r6;\n d6 += h1 * r5;\n d6 += h2 * r4;\n d6 += h3 * r3;\n d6 += h4 * r2;\n c = (d6 >>> 13);\n d6 &= 0x1fff;\n d6 += h5 * r1;\n d6 += h6 * r0;\n d6 += h7 * (5 * r9);\n d6 += h8 * (5 * r8);\n d6 += h9 * (5 * r7);\n c += (d6 >>> 13);\n d6 &= 0x1fff;\n var d7 = c;\n d7 += h0 * r7;\n d7 += h1 * r6;\n d7 += h2 * r5;\n d7 += h3 * r4;\n d7 += h4 * r3;\n c = (d7 >>> 13);\n d7 &= 0x1fff;\n d7 += h5 * r2;\n d7 += h6 * r1;\n d7 += h7 * r0;\n d7 += h8 * (5 * r9);\n d7 += h9 * (5 * r8);\n c += (d7 >>> 13);\n d7 &= 0x1fff;\n var d8 = c;\n d8 += h0 * r8;\n d8 += h1 * r7;\n d8 += h2 * r6;\n d8 += h3 * r5;\n d8 += h4 * r4;\n c = (d8 >>> 13);\n d8 &= 0x1fff;\n d8 += h5 * r3;\n d8 += h6 * r2;\n d8 += h7 * r1;\n d8 += h8 * r0;\n d8 += h9 * (5 * r9);\n c += (d8 >>> 13);\n d8 &= 0x1fff;\n var d9 = c;\n d9 += h0 * r9;\n d9 += h1 * r8;\n d9 += h2 * r7;\n d9 += h3 * r6;\n d9 += h4 * r5;\n c = (d9 >>> 13);\n d9 &= 0x1fff;\n d9 += h5 * r4;\n d9 += h6 * r3;\n d9 += h7 * r2;\n d9 += h8 * r1;\n d9 += h9 * r0;\n c += (d9 >>> 13);\n d9 &= 0x1fff;\n c = (((c << 2) + c)) | 0;\n c = (c + d0) | 0;\n d0 = c & 0x1fff;\n c = (c >>> 13);\n d1 += c;\n h0 = d0;\n h1 = d1;\n h2 = d2;\n h3 = d3;\n h4 = d4;\n h5 = d5;\n h6 = d6;\n h7 = d7;\n h8 = d8;\n h9 = d9;\n mpos += 16;\n bytes -= 16;\n }\n this._h[0] = h0;\n this._h[1] = h1;\n this._h[2] = h2;\n this._h[3] = h3;\n this._h[4] = h4;\n this._h[5] = h5;\n this._h[6] = h6;\n this._h[7] = h7;\n this._h[8] = h8;\n this._h[9] = h9;\n };\n Poly1305.prototype.finish = function (mac, macpos) {\n if (macpos === void 0) { macpos = 0; }\n var g = new Uint16Array(10);\n var c;\n var mask;\n var f;\n var i;\n if (this._leftover) {\n i = this._leftover;\n this._buffer[i++] = 1;\n for (; i < 16; i++) {\n this._buffer[i] = 0;\n }\n this._fin = 1;\n this._blocks(this._buffer, 0, 16);\n }\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n for (i = 2; i < 10; i++) {\n this._h[i] += c;\n c = this._h[i] >>> 13;\n this._h[i] &= 0x1fff;\n }\n this._h[0] += (c * 5);\n c = this._h[0] >>> 13;\n this._h[0] &= 0x1fff;\n this._h[1] += c;\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n this._h[2] += c;\n g[0] = this._h[0] + 5;\n c = g[0] >>> 13;\n g[0] &= 0x1fff;\n for (i = 1; i < 10; i++) {\n g[i] = this._h[i] + c;\n c = g[i] >>> 13;\n g[i] &= 0x1fff;\n }\n g[9] -= (1 << 13);\n mask = (c ^ 1) - 1;\n for (i = 0; i < 10; i++) {\n g[i] &= mask;\n }\n mask = ~mask;\n for (i = 0; i < 10; i++) {\n this._h[i] = (this._h[i] & mask) | g[i];\n }\n this._h[0] = ((this._h[0]) | (this._h[1] << 13)) & 0xffff;\n this._h[1] = ((this._h[1] >>> 3) | (this._h[2] << 10)) & 0xffff;\n this._h[2] = ((this._h[2] >>> 6) | (this._h[3] << 7)) & 0xffff;\n this._h[3] = ((this._h[3] >>> 9) | (this._h[4] << 4)) & 0xffff;\n this._h[4] = ((this._h[4] >>> 12) | (this._h[5] << 1) | (this._h[6] << 14)) & 0xffff;\n this._h[5] = ((this._h[6] >>> 2) | (this._h[7] << 11)) & 0xffff;\n this._h[6] = ((this._h[7] >>> 5) | (this._h[8] << 8)) & 0xffff;\n this._h[7] = ((this._h[8] >>> 8) | (this._h[9] << 5)) & 0xffff;\n f = this._h[0] + this._pad[0];\n this._h[0] = f & 0xffff;\n for (i = 1; i < 8; i++) {\n f = (((this._h[i] + this._pad[i]) | 0) + (f >>> 16)) | 0;\n this._h[i] = f & 0xffff;\n }\n mac[macpos + 0] = this._h[0] >>> 0;\n mac[macpos + 1] = this._h[0] >>> 8;\n mac[macpos + 2] = this._h[1] >>> 0;\n mac[macpos + 3] = this._h[1] >>> 8;\n mac[macpos + 4] = this._h[2] >>> 0;\n mac[macpos + 5] = this._h[2] >>> 8;\n mac[macpos + 6] = this._h[3] >>> 0;\n mac[macpos + 7] = this._h[3] >>> 8;\n mac[macpos + 8] = this._h[4] >>> 0;\n mac[macpos + 9] = this._h[4] >>> 8;\n mac[macpos + 10] = this._h[5] >>> 0;\n mac[macpos + 11] = this._h[5] >>> 8;\n mac[macpos + 12] = this._h[6] >>> 0;\n mac[macpos + 13] = this._h[6] >>> 8;\n mac[macpos + 14] = this._h[7] >>> 0;\n mac[macpos + 15] = this._h[7] >>> 8;\n this._finished = true;\n return this;\n };\n Poly1305.prototype.update = function (m) {\n var mpos = 0;\n var bytes = m.length;\n var want;\n if (this._leftover) {\n want = (16 - this._leftover);\n if (want > bytes) {\n want = bytes;\n }\n for (var i = 0; i < want; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n bytes -= want;\n mpos += want;\n this._leftover += want;\n if (this._leftover < 16) {\n return this;\n }\n this._blocks(this._buffer, 0, 16);\n this._leftover = 0;\n }\n if (bytes >= 16) {\n want = bytes - (bytes % 16);\n this._blocks(m, mpos, want);\n mpos += want;\n bytes -= want;\n }\n if (bytes) {\n for (var i = 0; i < bytes; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n this._leftover += bytes;\n }\n return this;\n };\n Poly1305.prototype.digest = function () {\n // TODO(dchest): it behaves differently than other hashes/HMAC,\n // because it throws when finished — others just return saved result.\n if (this._finished) {\n throw new Error(\"Poly1305 was finished\");\n }\n var mac = new Uint8Array(16);\n this.finish(mac);\n return mac;\n };\n Poly1305.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._r);\n wipe_1.wipe(this._h);\n wipe_1.wipe(this._pad);\n this._leftover = 0;\n this._fin = 0;\n this._finished = true; // mark as finished even if not\n return this;\n };\n return Poly1305;\n}());\nexports.Poly1305 = Poly1305;\n/**\n * Returns 16-byte authenticator of data using a one-time 32-byte key.\n *\n * Important: key should be used for only one message, it should never repeat.\n */\nfunction oneTimeAuth(key, data) {\n var h = new Poly1305(key);\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.oneTimeAuth = oneTimeAuth;\n/**\n * Returns true if two authenticators are 16-byte long and equal.\n * Uses contant-time comparison to avoid leaking timing information.\n */\nfunction equal(a, b) {\n if (a.length !== exports.DIGEST_LENGTH || b.length !== exports.DIGEST_LENGTH) {\n return false;\n }\n return constant_time_1.equal(a, b);\n}\nexports.equal = equal;\n//# sourceMappingURL=poly1305.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar chacha_1 = require(\"@stablelib/chacha\");\nvar poly1305_1 = require(\"@stablelib/poly1305\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nvar binary_1 = require(\"@stablelib/binary\");\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nexports.KEY_LENGTH = 32;\nexports.NONCE_LENGTH = 12;\nexports.TAG_LENGTH = 16;\nvar ZEROS = new Uint8Array(16);\n/**\n * ChaCha20-Poly1305 Authenticated Encryption with Associated Data.\n *\n * Defined in RFC7539.\n */\nvar ChaCha20Poly1305 = /** @class */ (function () {\n /**\n * Creates a new instance with the given 32-byte key.\n */\n function ChaCha20Poly1305(key) {\n this.nonceLength = exports.NONCE_LENGTH;\n this.tagLength = exports.TAG_LENGTH;\n if (key.length !== exports.KEY_LENGTH) {\n throw new Error(\"ChaCha20Poly1305 needs 32-byte key\");\n }\n // Copy key.\n this._key = new Uint8Array(key);\n }\n /**\n * Encrypts and authenticates plaintext, authenticates associated data,\n * and returns sealed ciphertext, which includes authentication tag.\n *\n * RFC7539 specifies 12 bytes for nonce. It may be this 12-byte nonce\n * (\"IV\"), or full 16-byte counter (called \"32-bit fixed-common part\")\n * and nonce.\n *\n * If dst is given (it must be the size of plaintext + the size of tag\n * length) the result will be put into it. Dst and plaintext must not\n * overlap.\n */\n ChaCha20Poly1305.prototype.seal = function (nonce, plaintext, associatedData, dst) {\n if (nonce.length > 16) {\n throw new Error(\"ChaCha20Poly1305: incorrect nonce length\");\n }\n // Allocate space for counter, and set nonce as last bytes of it.\n var counter = new Uint8Array(16);\n counter.set(nonce, counter.length - nonce.length);\n // Generate authentication key by taking first 32-bytes of stream.\n // We pass full counter, which has 12-byte nonce and 4-byte block counter,\n // and it will get incremented after generating the block, which is\n // exactly what we need: we only use the first 32 bytes of 64-byte\n // ChaCha block and discard the next 32 bytes.\n var authKey = new Uint8Array(32);\n chacha_1.stream(this._key, counter, authKey, 4);\n // Allocate space for sealed ciphertext.\n var resultLength = plaintext.length + this.tagLength;\n var result;\n if (dst) {\n if (dst.length !== resultLength) {\n throw new Error(\"ChaCha20Poly1305: incorrect destination length\");\n }\n result = dst;\n }\n else {\n result = new Uint8Array(resultLength);\n }\n // Encrypt plaintext.\n chacha_1.streamXOR(this._key, counter, plaintext, result, 4);\n // Authenticate.\n // XXX: can \"simplify\" here: pass full result (which is already padded\n // due to zeroes prepared for tag), and ciphertext length instead of\n // subarray of result.\n this._authenticate(result.subarray(result.length - this.tagLength, result.length), authKey, result.subarray(0, result.length - this.tagLength), associatedData);\n // Cleanup.\n wipe_1.wipe(counter);\n return result;\n };\n /**\n * Authenticates sealed ciphertext (which includes authentication tag) and\n * associated data, decrypts ciphertext and returns decrypted plaintext.\n *\n * RFC7539 specifies 12 bytes for nonce. It may be this 12-byte nonce\n * (\"IV\"), or full 16-byte counter (called \"32-bit fixed-common part\")\n * and nonce.\n *\n * If authentication fails, it returns null.\n *\n * If dst is given (it must be of ciphertext length minus tag length),\n * the result will be put into it. Dst and plaintext must not overlap.\n */\n ChaCha20Poly1305.prototype.open = function (nonce, sealed, associatedData, dst) {\n if (nonce.length > 16) {\n throw new Error(\"ChaCha20Poly1305: incorrect nonce length\");\n }\n // Sealed ciphertext should at least contain tag.\n if (sealed.length < this.tagLength) {\n // TODO(dchest): should we throw here instead?\n return null;\n }\n // Allocate space for counter, and set nonce as last bytes of it.\n var counter = new Uint8Array(16);\n counter.set(nonce, counter.length - nonce.length);\n // Generate authentication key by taking first 32-bytes of stream.\n var authKey = new Uint8Array(32);\n chacha_1.stream(this._key, counter, authKey, 4);\n // Authenticate.\n // XXX: can simplify and avoid allocation: since authenticate()\n // already allocates tag (from Poly1305.digest(), it can return)\n // it instead of copying to calculatedTag. But then in seal()\n // we'll need to copy it.\n var calculatedTag = new Uint8Array(this.tagLength);\n this._authenticate(calculatedTag, authKey, sealed.subarray(0, sealed.length - this.tagLength), associatedData);\n // Constant-time compare tags and return null if they differ.\n if (!constant_time_1.equal(calculatedTag, sealed.subarray(sealed.length - this.tagLength, sealed.length))) {\n return null;\n }\n // Allocate space for decrypted plaintext.\n var resultLength = sealed.length - this.tagLength;\n var result;\n if (dst) {\n if (dst.length !== resultLength) {\n throw new Error(\"ChaCha20Poly1305: incorrect destination length\");\n }\n result = dst;\n }\n else {\n result = new Uint8Array(resultLength);\n }\n // Decrypt.\n chacha_1.streamXOR(this._key, counter, sealed.subarray(0, sealed.length - this.tagLength), result, 4);\n // Cleanup.\n wipe_1.wipe(counter);\n return result;\n };\n ChaCha20Poly1305.prototype.clean = function () {\n wipe_1.wipe(this._key);\n return this;\n };\n ChaCha20Poly1305.prototype._authenticate = function (tagOut, authKey, ciphertext, associatedData) {\n // Initialize Poly1305 with authKey.\n var h = new poly1305_1.Poly1305(authKey);\n // Authenticate padded associated data.\n if (associatedData) {\n h.update(associatedData);\n if (associatedData.length % 16 > 0) {\n h.update(ZEROS.subarray(associatedData.length % 16));\n }\n }\n // Authenticate padded ciphertext.\n h.update(ciphertext);\n if (ciphertext.length % 16 > 0) {\n h.update(ZEROS.subarray(ciphertext.length % 16));\n }\n // Authenticate length of associated data.\n // XXX: can avoid allocation here?\n var length = new Uint8Array(8);\n if (associatedData) {\n binary_1.writeUint64LE(associatedData.length, length);\n }\n h.update(length);\n // Authenticate length of ciphertext.\n binary_1.writeUint64LE(ciphertext.length, length);\n h.update(length);\n // Get tag and copy it into tagOut.\n var tag = h.digest();\n for (var i = 0; i < tag.length; i++) {\n tagOut[i] = tag[i];\n }\n // Cleanup.\n h.clean();\n wipe_1.wipe(tag);\n wipe_1.wipe(length);\n };\n return ChaCha20Poly1305;\n}());\nexports.ChaCha20Poly1305 = ChaCha20Poly1305;\n//# sourceMappingURL=chacha20poly1305.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isSerializableHash(h) {\n return (typeof h.saveState !== \"undefined\" &&\n typeof h.restoreState !== \"undefined\" &&\n typeof h.cleanSavedState !== \"undefined\");\n}\nexports.isSerializableHash = isSerializableHash;\n// TODO(dchest): figure out the standardized interface for XOF such as\n// SHAKE and BLAKE2X.\n//# sourceMappingURL=hash.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package hmac implements HMAC algorithm.\n */\nvar hash_1 = require(\"@stablelib/hash\");\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n/**\n * HMAC implements hash-based message authentication algorithm.\n */\nvar HMAC = /** @class */ (function () {\n /**\n * Constructs a new HMAC with the given Hash and secret key.\n */\n function HMAC(hash, key) {\n this._finished = false; // true if HMAC was finalized\n // Initialize inner and outer hashes.\n this._inner = new hash();\n this._outer = new hash();\n // Set block and digest sizes for this HMAC\n // instance to values from the hash.\n this.blockSize = this._outer.blockSize;\n this.digestLength = this._outer.digestLength;\n // Pad temporary stores a key (or its hash) padded with zeroes.\n var pad = new Uint8Array(this.blockSize);\n if (key.length > this.blockSize) {\n // If key is bigger than hash block size, it must be\n // hashed and this hash is used as a key instead.\n this._inner.update(key).finish(pad).clean();\n }\n else {\n // Otherwise, copy the key into pad.\n pad.set(key);\n }\n // Now two different keys are derived from padded key\n // by xoring a different byte value to each.\n // To make inner hash key, xor byte 0x36 into pad.\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36;\n }\n // Update inner hash with the result.\n this._inner.update(pad);\n // To make outer hash key, xor byte 0x5c into pad.\n // But since we already xored 0x36 there, we must\n // first undo this by xoring it again.\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36 ^ 0x5c;\n }\n // Update outer hash with the result.\n this._outer.update(pad);\n // Save states of both hashes, so that we can quickly restore\n // them later in reset() without the need to remember the actual\n // key and perform this initialization again.\n if (hash_1.isSerializableHash(this._inner) && hash_1.isSerializableHash(this._outer)) {\n this._innerKeyedState = this._inner.saveState();\n this._outerKeyedState = this._outer.saveState();\n }\n // Clean pad.\n wipe_1.wipe(pad);\n }\n /**\n * Returns HMAC state to the state initialized with key\n * to make it possible to run HMAC over the other data with the same\n * key without creating a new instance.\n */\n HMAC.prototype.reset = function () {\n if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {\n throw new Error(\"hmac: can't reset() because hash doesn't implement restoreState()\");\n }\n // Restore keyed states of inner and outer hashes.\n this._inner.restoreState(this._innerKeyedState);\n this._outer.restoreState(this._outerKeyedState);\n this._finished = false;\n return this;\n };\n /**\n * Cleans HMAC state.\n */\n HMAC.prototype.clean = function () {\n if (hash_1.isSerializableHash(this._inner)) {\n this._inner.cleanSavedState(this._innerKeyedState);\n }\n if (hash_1.isSerializableHash(this._outer)) {\n this._outer.cleanSavedState(this._outerKeyedState);\n }\n this._inner.clean();\n this._outer.clean();\n };\n /**\n * Updates state with provided data.\n */\n HMAC.prototype.update = function (data) {\n this._inner.update(data);\n return this;\n };\n /**\n * Finalizes HMAC and puts the result in out.\n */\n HMAC.prototype.finish = function (out) {\n if (this._finished) {\n // If HMAC was finalized, outer hash is also finalized,\n // so it produces the same digest it produced when it\n // was finalized.\n this._outer.finish(out);\n return this;\n }\n // Finalize inner hash and store the result temporarily.\n this._inner.finish(out);\n // Update outer hash with digest of inner hash and and finalize it.\n this._outer.update(out.subarray(0, this.digestLength)).finish(out);\n this._finished = true;\n return this;\n };\n /**\n * Returns the computed message authentication code.\n */\n HMAC.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Saves HMAC state.\n * This function is needed for PBKDF2 optimization.\n */\n HMAC.prototype.saveState = function () {\n if (!hash_1.isSerializableHash(this._inner)) {\n throw new Error(\"hmac: can't saveState() because hash doesn't implement it\");\n }\n return this._inner.saveState();\n };\n HMAC.prototype.restoreState = function (savedState) {\n if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {\n throw new Error(\"hmac: can't restoreState() because hash doesn't implement it\");\n }\n this._inner.restoreState(savedState);\n this._outer.restoreState(this._outerKeyedState);\n this._finished = false;\n return this;\n };\n HMAC.prototype.cleanSavedState = function (savedState) {\n if (!hash_1.isSerializableHash(this._inner)) {\n throw new Error(\"hmac: can't cleanSavedState() because hash doesn't implement it\");\n }\n this._inner.cleanSavedState(savedState);\n };\n return HMAC;\n}());\nexports.HMAC = HMAC;\n/**\n * Returns HMAC using the given hash constructor for the key over data.\n */\nfunction hmac(hash, key, data) {\n var h = new HMAC(hash, key);\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hmac = hmac;\n/**\n * Returns true if two HMAC digests are equal.\n * Uses constant-time comparison to avoid leaking timing information.\n *\n * Example:\n *\n * const receivedDigest = ...\n * const realDigest = hmac(SHA256, key, data);\n * if (!equal(receivedDigest, realDigest)) {\n * throw new Error(\"Authentication error\");\n * }\n */\nexports.equal = constant_time_1.equal;\n//# sourceMappingURL=hmac.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar hmac_1 = require(\"@stablelib/hmac\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n/**\n * HMAC-based Extract-and-Expand Key Derivation Function.\n *\n * Implements HKDF from RFC5869.\n *\n * Expands the given master key with salt and info into\n * a limited stream of key material.\n */\nvar HKDF = /** @class */ (function () {\n /**\n * Create a new HKDF instance for the given hash function\n * with the master key, optional salt, and info.\n *\n * - Master key is a high-entropy secret key (not a password).\n * - Salt is a non-secret random value.\n * - Info is application- and/or context-specific information.\n */\n function HKDF(hash, key, salt, info) {\n if (salt === void 0) { salt = new Uint8Array(0); }\n this._counter = new Uint8Array(1); // starts with zero\n this._hash = hash;\n this._info = info;\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac_1.hmac(this._hash, salt, key);\n // Initialize HMAC for expanding with extracted key.\n this._hmac = new hmac_1.HMAC(hash, okm);\n // Allocate buffer.\n this._buffer = new Uint8Array(this._hmac.digestLength);\n this._bufpos = this._buffer.length;\n }\n // Fill buffer with new block of HKDF-Extract output.\n HKDF.prototype._fillBuffer = function () {\n // Increment counter.\n this._counter[0]++;\n var ctr = this._counter[0];\n // Check if counter overflowed.\n if (ctr === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n this._hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (ctr > 1) {\n this._hmac.update(this._buffer);\n }\n // Hash in info if it exists.\n if (this._info) {\n this._hmac.update(this._info);\n }\n // Hash in the counter.\n this._hmac.update(this._counter);\n // Output result to buffer and clean HMAC instance.\n this._hmac.finish(this._buffer);\n // Reset buffer position.\n this._bufpos = 0;\n };\n /**\n * Expand returns next key material of the given length.\n *\n * It throws if expansion limit is reached (which is\n * 254 digests of the underlying HMAC function).\n */\n HKDF.prototype.expand = function (length) {\n var out = new Uint8Array(length);\n for (var i = 0; i < out.length; i++) {\n if (this._bufpos === this._buffer.length) {\n this._fillBuffer();\n }\n out[i] = this._buffer[this._bufpos++];\n }\n return out;\n };\n HKDF.prototype.clean = function () {\n this._hmac.clean();\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._counter);\n this._bufpos = 0;\n };\n return HKDF;\n}());\nexports.HKDF = HKDF;\n// TODO(dchest): maybe implement deriveKey?\n//# sourceMappingURL=hkdf.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowserRandomSource = void 0;\nconst QUOTA = 65536;\nclass BrowserRandomSource {\n constructor() {\n this.isAvailable = false;\n this.isInstantiated = false;\n const browserCrypto = typeof self !== 'undefined'\n ? (self.crypto || self.msCrypto) // IE11 has msCrypto\n : null;\n if (browserCrypto && browserCrypto.getRandomValues !== undefined) {\n this._crypto = browserCrypto;\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n randomBytes(length) {\n if (!this.isAvailable || !this._crypto) {\n throw new Error(\"Browser random byte generator is not available.\");\n }\n const out = new Uint8Array(length);\n for (let i = 0; i < out.length; i += QUOTA) {\n this._crypto.getRandomValues(out.subarray(i, i + Math.min(out.length - i, QUOTA)));\n }\n return out;\n }\n}\nexports.BrowserRandomSource = BrowserRandomSource;\n//# sourceMappingURL=browser.js.map","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295\n\nfunction oldBrowser () {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11')\n}\n\nvar Buffer = require('safe-buffer').Buffer\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n\n var bytes = Buffer.allocUnsafe(size)\n\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","module.exports = require('events').EventEmitter;\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @typedef {(...args: unknown[]) => unknown} Func */\n\n/** @type {(fn: T, length: number, loose?: boolean) => T} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */\n/** @typedef {'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array'} TypedArrayName */\n/** @type {{ [k in `\\$${TypedArrayName}`]?: (receiver: TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call } & { __proto__: null }} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(fn);\n\t\t}\n\t});\n}\n\n/** @type {import('.')} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, typeof cache>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${TypedArrayName}`) => void} */ function (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = $slice(name, 1);\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","module.exports = function isBuffer(arg) {\n return arg instanceof Buffer;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","'use strict'\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('readable-stream').Transform\nvar inherits = require('inherits')\n\nfunction throwIfNotStringOrBuffer (val, prefix) {\n if (!Buffer.isBuffer(val) && typeof val !== 'string') {\n throw new TypeError(prefix + ' must be a string or a buffer')\n }\n}\n\nfunction HashBase (blockSize) {\n Transform.call(this)\n\n this._block = Buffer.allocUnsafe(blockSize)\n this._blockSize = blockSize\n this._blockOffset = 0\n this._length = [0, 0, 0, 0]\n\n this._finalized = false\n}\n\ninherits(HashBase, Transform)\n\nHashBase.prototype._transform = function (chunk, encoding, callback) {\n var error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype._flush = function (callback) {\n var error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype.update = function (data, encoding) {\n throwIfNotStringOrBuffer(data, 'Data')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n // consume data\n var block = this._block\n var offset = 0\n while (this._blockOffset + data.length - offset >= this._blockSize) {\n for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]\n this._update()\n this._blockOffset = 0\n }\n while (offset < data.length) block[this._blockOffset++] = data[offset++]\n\n // update length\n for (var j = 0, carry = data.length * 8; carry > 0; ++j) {\n this._length[j] += carry\n carry = (this._length[j] / 0x0100000000) | 0\n if (carry > 0) this._length[j] -= 0x0100000000 * carry\n }\n\n return this\n}\n\nHashBase.prototype._update = function () {\n throw new Error('_update is not implemented')\n}\n\nHashBase.prototype.digest = function (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n var digest = this._digest()\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n // reset state\n this._block.fill(0)\n this._blockOffset = 0\n for (var i = 0; i < 4; ++i) this._length[i] = 0\n\n return digest\n}\n\nHashBase.prototype._digest = function () {\n throw new Error('_digest is not implemented')\n}\n\nmodule.exports = HashBase\n","'use strict'\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\nvar Buffer = require('safe-buffer').Buffer\n\nvar ARRAY16 = new Array(16)\n\nfunction MD5 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n}\n\ninherits(MD5, HashBase)\n\nMD5.prototype._update = function () {\n var M = ARRAY16\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)\n\n var a = this._a\n var b = this._b\n var c = this._c\n var d = this._d\n\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)\n c = fnF(c, d, a, b, M[2], 0x242070db, 17)\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17)\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22)\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7)\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7)\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12)\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17)\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22)\n\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9)\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)\n d = fnG(d, a, b, c, M[10], 0x02441453, 9)\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)\n\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11)\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23)\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)\n\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6)\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10)\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15)\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)\n\n this._a = (this._a + a) | 0\n this._b = (this._b + b) | 0\n this._c = (this._c + c) | 0\n this._d = (this._d + d) | 0\n}\n\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.allocUnsafe(16)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fnF (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnG (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnH (a, b, c, d, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnI (a, b, c, d, m, k, s) {\n return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0\n}\n\nmodule.exports = MD5\n","'use strict'\nvar Buffer = require('buffer').Buffer\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\n\nvar ARRAY16 = new Array(16)\n\nvar zl = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n]\n\nvar zr = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n]\n\nvar sl = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n]\n\nvar sr = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n]\n\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]\n\nfunction RIPEMD160 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n}\n\ninherits(RIPEMD160, HashBase)\n\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)\n\n var al = this._a | 0\n var bl = this._b | 0\n var cl = this._c | 0\n var dl = this._d | 0\n var el = this._e | 0\n\n var ar = this._a | 0\n var br = this._b | 0\n var cr = this._c | 0\n var dr = this._d | 0\n var er = this._e | 0\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl\n var tr\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])\n } else { // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])\n }\n\n al = el\n el = dl\n dl = rotl(cl, 10)\n cl = bl\n bl = tl\n\n ar = er\n er = dr\n dr = rotl(cr, 10)\n cr = br\n br = tr\n }\n\n // update state\n var t = (this._b + cl + dr) | 0\n this._b = (this._c + dl + er) | 0\n this._c = (this._d + el + ar) | 0\n this._d = (this._e + al + br) | 0\n this._e = (this._a + bl + cr) | 0\n this._a = t\n}\n\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n buffer.writeInt32LE(this._e, 16)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fn1 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn2 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn3 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn4 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn5 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0\n}\n\nmodule.exports = RIPEMD160\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n","var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n","var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n","var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/lib/_stream_readable.js');\nStream.Writable = require('readable-stream/lib/_stream_writable.js');\nStream.Duplex = require('readable-stream/lib/_stream_duplex.js');\nStream.Transform = require('readable-stream/lib/_stream_transform.js');\nStream.PassThrough = require('readable-stream/lib/_stream_passthrough.js');\nStream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js')\nStream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js')\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","var Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar StringDecoder = require('string_decoder').StringDecoder\nvar inherits = require('inherits')\n\nfunction CipherBase (hashMode) {\n Transform.call(this)\n this.hashMode = typeof hashMode === 'string'\n if (this.hashMode) {\n this[hashMode] = this._finalOrDigest\n } else {\n this.final = this._finalOrDigest\n }\n if (this._final) {\n this.__final = this._final\n this._final = null\n }\n this._decoder = null\n this._encoding = null\n}\ninherits(CipherBase, Transform)\n\nCipherBase.prototype.update = function (data, inputEnc, outputEnc) {\n if (typeof data === 'string') {\n data = Buffer.from(data, inputEnc)\n }\n\n var outData = this._update(data)\n if (this.hashMode) return this\n\n if (outputEnc) {\n outData = this._toString(outData, outputEnc)\n }\n\n return outData\n}\n\nCipherBase.prototype.setAutoPadding = function () {}\nCipherBase.prototype.getAuthTag = function () {\n throw new Error('trying to get auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAuthTag = function () {\n throw new Error('trying to set auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAAD = function () {\n throw new Error('trying to set aad in unsupported state')\n}\n\nCipherBase.prototype._transform = function (data, _, next) {\n var err\n try {\n if (this.hashMode) {\n this._update(data)\n } else {\n this.push(this._update(data))\n }\n } catch (e) {\n err = e\n } finally {\n next(err)\n }\n}\nCipherBase.prototype._flush = function (done) {\n var err\n try {\n this.push(this.__final())\n } catch (e) {\n err = e\n }\n\n done(err)\n}\nCipherBase.prototype._finalOrDigest = function (outputEnc) {\n var outData = this.__final() || Buffer.alloc(0)\n if (outputEnc) {\n outData = this._toString(outData, outputEnc, true)\n }\n return outData\n}\n\nCipherBase.prototype._toString = function (value, enc, fin) {\n if (!this._decoder) {\n this._decoder = new StringDecoder(enc)\n this._encoding = enc\n }\n\n if (this._encoding !== enc) throw new Error('can\\'t switch encodings')\n\n var out = this._decoder.write(value)\n if (fin) {\n out += this._decoder.end()\n }\n\n return out\n}\n\nmodule.exports = CipherBase\n","'use strict'\nvar inherits = require('inherits')\nvar MD5 = require('md5.js')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Base = require('cipher-base')\n\nfunction Hash (hash) {\n Base.call(this, 'digest')\n\n this._hash = hash\n}\n\ninherits(Hash, Base)\n\nHash.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHash.prototype._final = function () {\n return this._hash.digest()\n}\n\nmodule.exports = function createHash (alg) {\n alg = alg.toLowerCase()\n if (alg === 'md5') return new MD5()\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()\n\n return new Hash(sha(alg))\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar Base = require('cipher-base')\n\nvar ZEROS = Buffer.alloc(128)\nvar blocksize = 64\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n this._alg = alg\n this._key = key\n\n if (key.length > blocksize) {\n key = alg(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n this._hash = [ipad]\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.push(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._alg(Buffer.concat(this._hash))\n return this._alg(Buffer.concat([this._opad, h]))\n}\nmodule.exports = Hmac\n","var MD5 = require('md5.js')\n\nmodule.exports = function (buffer) {\n return new MD5().update(buffer).digest()\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Legacy = require('./legacy')\nvar Base = require('cipher-base')\nvar Buffer = require('safe-buffer').Buffer\nvar md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\n\nvar sha = require('sha.js')\n\nvar ZEROS = Buffer.alloc(128)\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n this._alg = alg\n this._key = key\n if (key.length > blocksize) {\n var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n key = hash.update(key).digest()\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n this._hash.update(ipad)\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._hash.digest()\n var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)\n return hash.update(this._opad).update(h).digest()\n}\n\nmodule.exports = function createHmac (alg, key) {\n alg = alg.toLowerCase()\n if (alg === 'rmd160' || alg === 'ripemd160') {\n return new Hmac('rmd160', key)\n }\n if (alg === 'md5') {\n return new Legacy(md5, key)\n }\n return new Hmac(alg, key)\n}\n","'use strict';\n\nmodule.exports = require('./browser/algorithms.json');\n","var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n","var defaultEncoding\n/* istanbul ignore next */\nif (global.process && global.process.browser) {\n defaultEncoding = 'utf-8'\n} else if (global.process && global.process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n","var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n","var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n","var Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar sync = require('./sync')\nvar toBuffer = require('./to-buffer')\n\nvar ZERO_BUF\nvar subtle = global.crypto && global.crypto.subtle\nvar toBrowser = {\n sha: 'SHA-1',\n 'sha-1': 'SHA-1',\n sha1: 'SHA-1',\n sha256: 'SHA-256',\n 'sha-256': 'SHA-256',\n sha384: 'SHA-384',\n 'sha-384': 'SHA-384',\n 'sha-512': 'SHA-512',\n sha512: 'SHA-512'\n}\nvar checks = []\nfunction checkNative (algo) {\n if (global.process && !global.process.browser) {\n return Promise.resolve(false)\n }\n if (!subtle || !subtle.importKey || !subtle.deriveBits) {\n return Promise.resolve(false)\n }\n if (checks[algo] !== undefined) {\n return checks[algo]\n }\n ZERO_BUF = ZERO_BUF || Buffer.alloc(8)\n var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)\n .then(function () {\n return true\n }).catch(function () {\n return false\n })\n checks[algo] = prom\n return prom\n}\nvar nextTick\nfunction getNextTick () {\n if (nextTick) {\n return nextTick\n }\n if (global.process && global.process.nextTick) {\n nextTick = global.process.nextTick\n } else if (global.queueMicrotask) {\n nextTick = global.queueMicrotask\n } else if (global.setImmediate) {\n nextTick = global.setImmediate\n } else {\n nextTick = global.setTimeout\n }\n return nextTick\n}\nfunction browserPbkdf2 (password, salt, iterations, length, algo) {\n return subtle.importKey(\n 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']\n ).then(function (key) {\n return subtle.deriveBits({\n name: 'PBKDF2',\n salt: salt,\n iterations: iterations,\n hash: {\n name: algo\n }\n }, key, length << 3)\n }).then(function (res) {\n return Buffer.from(res)\n })\n}\n\nfunction resolvePromise (promise, callback) {\n promise.then(function (out) {\n getNextTick()(function () {\n callback(null, out)\n })\n }, function (e) {\n getNextTick()(function () {\n callback(e)\n })\n })\n}\nmodule.exports = function (password, salt, iterations, keylen, digest, callback) {\n if (typeof digest === 'function') {\n callback = digest\n digest = undefined\n }\n\n digest = digest || 'sha1'\n var algo = toBrowser[digest.toLowerCase()]\n\n if (!algo || typeof global.Promise !== 'function') {\n getNextTick()(function () {\n var out\n try {\n out = sync(password, salt, iterations, keylen, digest)\n } catch (e) {\n return callback(e)\n }\n callback(null, out)\n })\n return\n }\n\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')\n\n resolvePromise(checkNative(algo).then(function (resp) {\n if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)\n\n return sync(password, salt, iterations, keylen, digest)\n }), callback)\n}\n","exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n","'use strict';\n\nexports.readUInt32BE = function readUInt32BE(bytes, off) {\n var res = (bytes[0 + off] << 24) |\n (bytes[1 + off] << 16) |\n (bytes[2 + off] << 8) |\n bytes[3 + off];\n return res >>> 0;\n};\n\nexports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {\n bytes[0 + off] = value >>> 24;\n bytes[1 + off] = (value >>> 16) & 0xff;\n bytes[2 + off] = (value >>> 8) & 0xff;\n bytes[3 + off] = value & 0xff;\n};\n\nexports.ip = function ip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n }\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.rip = function rip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 0; i < 4; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n for (var i = 4; i < 8; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.pc1 = function pc1(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n // 7, 15, 23, 31, 39, 47, 55, 63\n // 6, 14, 22, 30, 39, 47, 55, 63\n // 5, 13, 21, 29, 39, 47, 55, 63\n // 4, 12, 20, 28\n for (var i = 7; i >= 5; i--) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n\n // 1, 9, 17, 25, 33, 41, 49, 57\n // 2, 10, 18, 26, 34, 42, 50, 58\n // 3, 11, 19, 27, 35, 43, 51, 59\n // 36, 44, 52, 60\n for (var i = 1; i <= 3; i++) {\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.r28shl = function r28shl(num, shift) {\n return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));\n};\n\nvar pc2table = [\n // inL => outL\n 14, 11, 17, 4, 27, 23, 25, 0,\n 13, 22, 7, 18, 5, 9, 16, 24,\n 2, 20, 12, 21, 1, 8, 15, 26,\n\n // inR => outR\n 15, 4, 25, 19, 9, 1, 26, 16,\n 5, 11, 23, 8, 12, 7, 17, 0,\n 22, 3, 10, 14, 6, 20, 27, 24\n];\n\nexports.pc2 = function pc2(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n var len = pc2table.length >>> 1;\n for (var i = 0; i < len; i++) {\n outL <<= 1;\n outL |= (inL >>> pc2table[i]) & 0x1;\n }\n for (var i = len; i < pc2table.length; i++) {\n outR <<= 1;\n outR |= (inR >>> pc2table[i]) & 0x1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.expand = function expand(r, out, off) {\n var outL = 0;\n var outR = 0;\n\n outL = ((r & 1) << 5) | (r >>> 27);\n for (var i = 23; i >= 15; i -= 4) {\n outL <<= 6;\n outL |= (r >>> i) & 0x3f;\n }\n for (var i = 11; i >= 3; i -= 4) {\n outR |= (r >>> i) & 0x3f;\n outR <<= 6;\n }\n outR |= ((r & 0x1f) << 1) | (r >>> 31);\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nvar sTable = [\n 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,\n 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,\n 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,\n 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,\n\n 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,\n 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,\n 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,\n 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,\n\n 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,\n 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,\n 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,\n 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,\n\n 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,\n 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,\n 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,\n 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,\n\n 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,\n 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,\n 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,\n 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,\n\n 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,\n 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,\n 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,\n 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,\n\n 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,\n 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,\n 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,\n 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,\n\n 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,\n 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,\n 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,\n 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11\n];\n\nexports.substitute = function substitute(inL, inR) {\n var out = 0;\n for (var i = 0; i < 4; i++) {\n var b = (inL >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n for (var i = 0; i < 4; i++) {\n var b = (inR >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[4 * 0x40 + i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n return out >>> 0;\n};\n\nvar permuteTable = [\n 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,\n 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7\n];\n\nexports.permute = function permute(num) {\n var out = 0;\n for (var i = 0; i < permuteTable.length; i++) {\n out <<= 1;\n out |= (num >>> permuteTable[i]) & 0x1;\n }\n return out >>> 0;\n};\n\nexports.padSplit = function padSplit(num, size, group) {\n var str = num.toString(2);\n while (str.length < size)\n str = '0' + str;\n\n var out = [];\n for (var i = 0; i < size; i += group)\n out.push(str.slice(i, i + group));\n return out.join(' ');\n};\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\n\nfunction Cipher(options) {\n this.options = options;\n\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n this.padding = options.padding !== false\n}\nmodule.exports = Cipher;\n\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\n\nCipher.prototype.update = function update(data) {\n if (data.length === 0)\n return [];\n\n if (this.type === 'decrypt')\n return this._updateDecrypt(data);\n else\n return this._updateEncrypt(data);\n};\n\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++)\n this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\n\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\n\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = ((this.bufferOff + data.length) / this.blockSize) | 0;\n var out = new Array(count * this.blockSize);\n\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n\n if (this.bufferOff === this.buffer.length)\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - ((data.length - inputOff) % this.blockSize);\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++)\n this.buffer[this.bufferOff] = data[inputOff];\n\n return out;\n};\n\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n\n return out;\n};\n\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer)\n first = this.update(buffer);\n\n var last;\n if (this.type === 'encrypt')\n last = this._finalEncrypt();\n else\n last = this._finalDecrypt();\n\n if (first)\n return first.concat(last);\n else\n return last;\n};\n\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0)\n return false;\n\n while (off < buffer.length)\n buffer[off++] = 0;\n\n return true;\n};\n\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff))\n return [];\n\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\n\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\n\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n\n return this._unpad(out);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar utils = require('./utils');\nvar Cipher = require('./cipher');\n\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\n\nfunction DES(options) {\n Cipher.call(this, options);\n\n var state = new DESState();\n this._desState = state;\n\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\n\nDES.create = function create(options) {\n return new DES(options);\n};\n\nvar shiftTable = [\n 1, 1, 2, 2, 2, 2, 2, 2,\n 1, 2, 2, 2, 2, 2, 2, 1\n];\n\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\n\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n\n if (this.type === 'encrypt')\n this._encrypt(state, l, r, state.tmp, 0);\n else\n this._decrypt(state, l, r, state.tmp, 0);\n\n l = state.tmp[0];\n r = state.tmp[1];\n\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\n\nDES.prototype._pad = function _pad(buffer, off) {\n if (this.padding === false) {\n return false;\n }\n\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++)\n buffer[i] = value;\n\n return true;\n};\n\nDES.prototype._unpad = function _unpad(buffer) {\n if (this.padding === false) {\n return buffer;\n }\n\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++)\n assert.equal(buffer[i], pad);\n\n return buffer.slice(0, buffer.length - pad);\n};\n\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\n\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar proto = {};\n\nfunction CBCState(iv) {\n assert.equal(iv.length, 8, 'Invalid IV length');\n\n this.iv = new Array(8);\n for (var i = 0; i < this.iv.length; i++)\n this.iv[i] = iv[i];\n}\n\nfunction instantiate(Base) {\n function CBC(options) {\n Base.call(this, options);\n this._cbcInit();\n }\n inherits(CBC, Base);\n\n var keys = Object.keys(proto);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n CBC.prototype[key] = proto[key];\n }\n\n CBC.create = function create(options) {\n return new CBC(options);\n };\n\n return CBC;\n}\n\nexports.instantiate = instantiate;\n\nproto._cbcInit = function _cbcInit() {\n var state = new CBCState(this.options.iv);\n this._cbcState = state;\n};\n\nproto._update = function _update(inp, inOff, out, outOff) {\n var state = this._cbcState;\n var superProto = this.constructor.super_.prototype;\n\n var iv = state.iv;\n if (this.type === 'encrypt') {\n for (var i = 0; i < this.blockSize; i++)\n iv[i] ^= inp[inOff + i];\n\n superProto._update.call(this, iv, 0, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = out[outOff + i];\n } else {\n superProto._update.call(this, inp, inOff, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n out[outOff + i] ^= iv[i];\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = inp[inOff + i];\n }\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar Cipher = require('./cipher');\nvar DES = require('./des');\n\nfunction EDEState(type, key) {\n assert.equal(key.length, 24, 'Invalid key length');\n\n var k1 = key.slice(0, 8);\n var k2 = key.slice(8, 16);\n var k3 = key.slice(16, 24);\n\n if (type === 'encrypt') {\n this.ciphers = [\n DES.create({ type: 'encrypt', key: k1 }),\n DES.create({ type: 'decrypt', key: k2 }),\n DES.create({ type: 'encrypt', key: k3 })\n ];\n } else {\n this.ciphers = [\n DES.create({ type: 'decrypt', key: k3 }),\n DES.create({ type: 'encrypt', key: k2 }),\n DES.create({ type: 'decrypt', key: k1 })\n ];\n }\n}\n\nfunction EDE(options) {\n Cipher.call(this, options);\n\n var state = new EDEState(this.type, this.options.key);\n this._edeState = state;\n}\ninherits(EDE, Cipher);\n\nmodule.exports = EDE;\n\nEDE.create = function create(options) {\n return new EDE(options);\n};\n\nEDE.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._edeState;\n\n state.ciphers[0]._update(inp, inOff, out, outOff);\n state.ciphers[1]._update(out, outOff, out, outOff);\n state.ciphers[2]._update(out, outOff, out, outOff);\n};\n\nEDE.prototype._pad = DES.prototype._pad;\nEDE.prototype._unpad = DES.prototype._unpad;\n","'use strict';\n\nexports.utils = require('./des/utils');\nexports.Cipher = require('./des/cipher');\nexports.DES = require('./des/des');\nexports.CBC = require('./des/cbc');\nexports.EDE = require('./des/ede');\n","var CipherBase = require('cipher-base')\nvar des = require('des.js')\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar modes = {\n 'des-ede3-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede3': des.EDE,\n 'des-ede-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede': des.EDE,\n 'des-cbc': des.CBC.instantiate(des.DES),\n 'des-ecb': des.DES\n}\nmodes.des = modes['des-cbc']\nmodes.des3 = modes['des-ede3-cbc']\nmodule.exports = DES\ninherits(DES, CipherBase)\nfunction DES (opts) {\n CipherBase.call(this)\n var modeName = opts.mode.toLowerCase()\n var mode = modes[modeName]\n var type\n if (opts.decrypt) {\n type = 'decrypt'\n } else {\n type = 'encrypt'\n }\n var key = opts.key\n if (!Buffer.isBuffer(key)) {\n key = Buffer.from(key)\n }\n if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {\n key = Buffer.concat([key, key.slice(0, 8)])\n }\n var iv = opts.iv\n if (!Buffer.isBuffer(iv)) {\n iv = Buffer.from(iv)\n }\n this._des = mode.create({\n key: key,\n iv: iv,\n type: type\n })\n}\nDES.prototype._update = function (data) {\n return Buffer.from(this._des.update(data))\n}\nDES.prototype._final = function () {\n return Buffer.from(this._des.final())\n}\n","exports.encrypt = function (self, block) {\n return self._cipher.encryptBlock(block)\n}\n\nexports.decrypt = function (self, block) {\n return self._cipher.decryptBlock(block)\n}\n","module.exports = function xor (a, b) {\n var length = Math.min(a.length, b.length)\n var buffer = new Buffer(length)\n\n for (var i = 0; i < length; ++i) {\n buffer[i] = a[i] ^ b[i]\n }\n\n return buffer\n}\n","var xor = require('buffer-xor')\n\nexports.encrypt = function (self, block) {\n var data = xor(block, self._prev)\n\n self._prev = self._cipher.encryptBlock(data)\n return self._prev\n}\n\nexports.decrypt = function (self, block) {\n var pad = self._prev\n\n self._prev = block\n var out = self._cipher.decryptBlock(block)\n\n return xor(out, pad)\n}\n","var Buffer = require('safe-buffer').Buffer\nvar xor = require('buffer-xor')\n\nfunction encryptStart (self, data, decrypt) {\n var len = data.length\n var out = xor(data, self._cache)\n self._cache = self._cache.slice(len)\n self._prev = Buffer.concat([self._prev, decrypt ? data : out])\n return out\n}\n\nexports.encrypt = function (self, data, decrypt) {\n var out = Buffer.allocUnsafe(0)\n var len\n\n while (data.length) {\n if (self._cache.length === 0) {\n self._cache = self._cipher.encryptBlock(self._prev)\n self._prev = Buffer.allocUnsafe(0)\n }\n\n if (self._cache.length <= data.length) {\n len = self._cache.length\n out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])\n data = data.slice(len)\n } else {\n out = Buffer.concat([out, encryptStart(self, data, decrypt)])\n break\n }\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad = self._cipher.encryptBlock(self._prev)\n var out = pad[0] ^ byteParam\n\n self._prev = Buffer.concat([\n self._prev.slice(1),\n Buffer.from([decrypt ? byteParam : out])\n ])\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad\n var i = -1\n var len = 8\n var out = 0\n var bit, value\n while (++i < len) {\n pad = self._cipher.encryptBlock(self._prev)\n bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0\n value = pad[0] ^ bit\n out += ((value & 0x80) >> (i % 8))\n self._prev = shiftIn(self._prev, decrypt ? bit : value)\n }\n return out\n}\n\nfunction shiftIn (buffer, value) {\n var len = buffer.length\n var i = -1\n var out = Buffer.allocUnsafe(buffer.length)\n buffer = Buffer.concat([buffer, Buffer.from([value])])\n\n while (++i < len) {\n out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)\n }\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var xor = require('buffer-xor')\n\nfunction getBlock (self) {\n self._prev = self._cipher.encryptBlock(self._prev)\n return self._prev\n}\n\nexports.encrypt = function (self, chunk) {\n while (self._cache.length < chunk.length) {\n self._cache = Buffer.concat([self._cache, getBlock(self)])\n }\n\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","function incr32 (iv) {\n var len = iv.length\n var item\n while (len--) {\n item = iv.readUInt8(len)\n if (item === 255) {\n iv.writeUInt8(0, len)\n } else {\n item++\n iv.writeUInt8(item, len)\n break\n }\n }\n}\nmodule.exports = incr32\n","var xor = require('buffer-xor')\nvar Buffer = require('safe-buffer').Buffer\nvar incr32 = require('../incr32')\n\nfunction getBlock (self) {\n var out = self._cipher.encryptBlockRaw(self._prev)\n incr32(self._prev)\n return out\n}\n\nvar blockSize = 16\nexports.encrypt = function (self, chunk) {\n var chunkNum = Math.ceil(chunk.length / blockSize)\n var start = self._cache.length\n self._cache = Buffer.concat([\n self._cache,\n Buffer.allocUnsafe(chunkNum * blockSize)\n ])\n for (var i = 0; i < chunkNum; i++) {\n var out = getBlock(self)\n var offset = start + i * blockSize\n self._cache.writeUInt32BE(out[0], offset + 0)\n self._cache.writeUInt32BE(out[1], offset + 4)\n self._cache.writeUInt32BE(out[2], offset + 8)\n self._cache.writeUInt32BE(out[3], offset + 12)\n }\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","var modeModules = {\n ECB: require('./ecb'),\n CBC: require('./cbc'),\n CFB: require('./cfb'),\n CFB8: require('./cfb8'),\n CFB1: require('./cfb1'),\n OFB: require('./ofb'),\n CTR: require('./ctr'),\n GCM: require('./ctr')\n}\n\nvar modes = require('./list.json')\n\nfor (var key in modes) {\n modes[key].module = modeModules[modes[key].mode]\n}\n\nmodule.exports = modes\n","// based on the aes implimentation in triple sec\n// https://github.com/keybase/triplesec\n// which is in turn based on the one from crypto-js\n// https://code.google.com/p/crypto-js/\n\nvar Buffer = require('safe-buffer').Buffer\n\nfunction asUInt32Array (buf) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n\n var len = (buf.length / 4) | 0\n var out = new Array(len)\n\n for (var i = 0; i < len; i++) {\n out[i] = buf.readUInt32BE(i * 4)\n }\n\n return out\n}\n\nfunction scrubVec (v) {\n for (var i = 0; i < v.length; v++) {\n v[i] = 0\n }\n}\n\nfunction cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {\n var SUB_MIX0 = SUB_MIX[0]\n var SUB_MIX1 = SUB_MIX[1]\n var SUB_MIX2 = SUB_MIX[2]\n var SUB_MIX3 = SUB_MIX[3]\n\n var s0 = M[0] ^ keySchedule[0]\n var s1 = M[1] ^ keySchedule[1]\n var s2 = M[2] ^ keySchedule[2]\n var s3 = M[3] ^ keySchedule[3]\n var t0, t1, t2, t3\n var ksRow = 4\n\n for (var round = 1; round < nRounds; round++) {\n t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]\n t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]\n t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]\n t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]\n s0 = t0\n s1 = t1\n s2 = t2\n s3 = t3\n }\n\n t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]\n t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]\n t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]\n t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]\n t0 = t0 >>> 0\n t1 = t1 >>> 0\n t2 = t2 >>> 0\n t3 = t3 >>> 0\n\n return [t0, t1, t2, t3]\n}\n\n// AES constants\nvar RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]\nvar G = (function () {\n // Compute double table\n var d = new Array(256)\n for (var j = 0; j < 256; j++) {\n if (j < 128) {\n d[j] = j << 1\n } else {\n d[j] = (j << 1) ^ 0x11b\n }\n }\n\n var SBOX = []\n var INV_SBOX = []\n var SUB_MIX = [[], [], [], []]\n var INV_SUB_MIX = [[], [], [], []]\n\n // Walk GF(2^8)\n var x = 0\n var xi = 0\n for (var i = 0; i < 256; ++i) {\n // Compute sbox\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63\n SBOX[x] = sx\n INV_SBOX[sx] = x\n\n // Compute multiplication\n var x2 = d[x]\n var x4 = d[x2]\n var x8 = d[x4]\n\n // Compute sub bytes, mix columns tables\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100)\n SUB_MIX[0][x] = (t << 24) | (t >>> 8)\n SUB_MIX[1][x] = (t << 16) | (t >>> 16)\n SUB_MIX[2][x] = (t << 8) | (t >>> 24)\n SUB_MIX[3][x] = t\n\n // Compute inv sub bytes, inv mix columns tables\n t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)\n INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)\n INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)\n INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)\n INV_SUB_MIX[3][sx] = t\n\n if (x === 0) {\n x = xi = 1\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]]\n xi ^= d[d[xi]]\n }\n }\n\n return {\n SBOX: SBOX,\n INV_SBOX: INV_SBOX,\n SUB_MIX: SUB_MIX,\n INV_SUB_MIX: INV_SUB_MIX\n }\n})()\n\nfunction AES (key) {\n this._key = asUInt32Array(key)\n this._reset()\n}\n\nAES.blockSize = 4 * 4\nAES.keySize = 256 / 8\nAES.prototype.blockSize = AES.blockSize\nAES.prototype.keySize = AES.keySize\nAES.prototype._reset = function () {\n var keyWords = this._key\n var keySize = keyWords.length\n var nRounds = keySize + 6\n var ksRows = (nRounds + 1) * 4\n\n var keySchedule = []\n for (var k = 0; k < keySize; k++) {\n keySchedule[k] = keyWords[k]\n }\n\n for (k = keySize; k < ksRows; k++) {\n var t = keySchedule[k - 1]\n\n if (k % keySize === 0) {\n t = (t << 8) | (t >>> 24)\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n\n t ^= RCON[(k / keySize) | 0] << 24\n } else if (keySize > 6 && k % keySize === 4) {\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n }\n\n keySchedule[k] = keySchedule[k - keySize] ^ t\n }\n\n var invKeySchedule = []\n for (var ik = 0; ik < ksRows; ik++) {\n var ksR = ksRows - ik\n var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]\n\n if (ik < 4 || ksR <= 4) {\n invKeySchedule[ik] = tt\n } else {\n invKeySchedule[ik] =\n G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^\n G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^\n G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^\n G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]\n }\n }\n\n this._nRounds = nRounds\n this._keySchedule = keySchedule\n this._invKeySchedule = invKeySchedule\n}\n\nAES.prototype.encryptBlockRaw = function (M) {\n M = asUInt32Array(M)\n return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)\n}\n\nAES.prototype.encryptBlock = function (M) {\n var out = this.encryptBlockRaw(M)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[1], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[3], 12)\n return buf\n}\n\nAES.prototype.decryptBlock = function (M) {\n M = asUInt32Array(M)\n\n // swap\n var m1 = M[1]\n M[1] = M[3]\n M[3] = m1\n\n var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[3], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[1], 12)\n return buf\n}\n\nAES.prototype.scrub = function () {\n scrubVec(this._keySchedule)\n scrubVec(this._invKeySchedule)\n scrubVec(this._key)\n}\n\nmodule.exports.AES = AES\n","var Buffer = require('safe-buffer').Buffer\nvar ZEROES = Buffer.alloc(16, 0)\n\nfunction toArray (buf) {\n return [\n buf.readUInt32BE(0),\n buf.readUInt32BE(4),\n buf.readUInt32BE(8),\n buf.readUInt32BE(12)\n ]\n}\n\nfunction fromArray (out) {\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0] >>> 0, 0)\n buf.writeUInt32BE(out[1] >>> 0, 4)\n buf.writeUInt32BE(out[2] >>> 0, 8)\n buf.writeUInt32BE(out[3] >>> 0, 12)\n return buf\n}\n\nfunction GHASH (key) {\n this.h = key\n this.state = Buffer.alloc(16, 0)\n this.cache = Buffer.allocUnsafe(0)\n}\n\n// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html\n// by Juho Vähä-Herttua\nGHASH.prototype.ghash = function (block) {\n var i = -1\n while (++i < block.length) {\n this.state[i] ^= block[i]\n }\n this._multiply()\n}\n\nGHASH.prototype._multiply = function () {\n var Vi = toArray(this.h)\n var Zi = [0, 0, 0, 0]\n var j, xi, lsbVi\n var i = -1\n while (++i < 128) {\n xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0\n if (xi) {\n // Z_i+1 = Z_i ^ V_i\n Zi[0] ^= Vi[0]\n Zi[1] ^= Vi[1]\n Zi[2] ^= Vi[2]\n Zi[3] ^= Vi[3]\n }\n\n // Store the value of LSB(V_i)\n lsbVi = (Vi[3] & 1) !== 0\n\n // V_i+1 = V_i >> 1\n for (j = 3; j > 0; j--) {\n Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)\n }\n Vi[0] = Vi[0] >>> 1\n\n // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R\n if (lsbVi) {\n Vi[0] = Vi[0] ^ (0xe1 << 24)\n }\n }\n this.state = fromArray(Zi)\n}\n\nGHASH.prototype.update = function (buf) {\n this.cache = Buffer.concat([this.cache, buf])\n var chunk\n while (this.cache.length >= 16) {\n chunk = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n this.ghash(chunk)\n }\n}\n\nGHASH.prototype.final = function (abl, bl) {\n if (this.cache.length) {\n this.ghash(Buffer.concat([this.cache, ZEROES], 16))\n }\n\n this.ghash(fromArray([0, abl, 0, bl]))\n return this.state\n}\n\nmodule.exports = GHASH\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\nvar GHASH = require('./ghash')\nvar xor = require('buffer-xor')\nvar incr32 = require('./incr32')\n\nfunction xorTest (a, b) {\n var out = 0\n if (a.length !== b.length) out++\n\n var len = Math.min(a.length, b.length)\n for (var i = 0; i < len; ++i) {\n out += (a[i] ^ b[i])\n }\n\n return out\n}\n\nfunction calcIv (self, iv, ck) {\n if (iv.length === 12) {\n self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])\n return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])\n }\n var ghash = new GHASH(ck)\n var len = iv.length\n var toPad = len % 16\n ghash.update(iv)\n if (toPad) {\n toPad = 16 - toPad\n ghash.update(Buffer.alloc(toPad, 0))\n }\n ghash.update(Buffer.alloc(8, 0))\n var ivBits = len * 8\n var tail = Buffer.alloc(8)\n tail.writeUIntBE(ivBits, 0, 8)\n ghash.update(tail)\n self._finID = ghash.state\n var out = Buffer.from(self._finID)\n incr32(out)\n return out\n}\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n var h = Buffer.alloc(4, 0)\n\n this._cipher = new aes.AES(key)\n var ck = this._cipher.encryptBlock(h)\n this._ghash = new GHASH(ck)\n iv = calcIv(this, iv, ck)\n\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._alen = 0\n this._len = 0\n this._mode = mode\n\n this._authTag = null\n this._called = false\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n if (!this._called && this._alen) {\n var rump = 16 - (this._alen % 16)\n if (rump < 16) {\n rump = Buffer.alloc(rump, 0)\n this._ghash.update(rump)\n }\n }\n\n this._called = true\n var out = this._mode.encrypt(this, chunk)\n if (this._decrypt) {\n this._ghash.update(chunk)\n } else {\n this._ghash.update(out)\n }\n this._len += chunk.length\n return out\n}\n\nStreamCipher.prototype._final = function () {\n if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')\n\n var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))\n if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')\n\n this._authTag = tag\n this._cipher.scrub()\n}\n\nStreamCipher.prototype.getAuthTag = function getAuthTag () {\n if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')\n\n return this._authTag\n}\n\nStreamCipher.prototype.setAuthTag = function setAuthTag (tag) {\n if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')\n\n this._authTag = tag\n}\n\nStreamCipher.prototype.setAAD = function setAAD (buf) {\n if (this._called) throw new Error('Attempting to set AAD in unsupported state')\n\n this._ghash.update(buf)\n this._alen += buf.length\n}\n\nmodule.exports = StreamCipher\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\n\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._mode = mode\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n return this._mode.encrypt(this, chunk, this._decrypt)\n}\n\nStreamCipher.prototype._final = function () {\n this._cipher.scrub()\n}\n\nmodule.exports = StreamCipher\n","var Buffer = require('safe-buffer').Buffer\nvar MD5 = require('md5.js')\n\n/* eslint-disable camelcase */\nfunction EVP_BytesToKey (password, salt, keyBits, ivLen) {\n if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')\n if (salt) {\n if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')\n if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')\n }\n\n var keyLen = keyBits / 8\n var key = Buffer.alloc(keyLen)\n var iv = Buffer.alloc(ivLen || 0)\n var tmp = Buffer.alloc(0)\n\n while (keyLen > 0 || ivLen > 0) {\n var hash = new MD5()\n hash.update(tmp)\n hash.update(password)\n if (salt) hash.update(salt)\n tmp = hash.digest()\n\n var used = 0\n\n if (keyLen > 0) {\n var keyStart = key.length - keyLen\n used = Math.min(keyLen, tmp.length)\n tmp.copy(key, keyStart, 0, used)\n keyLen -= used\n }\n\n if (used < tmp.length && ivLen > 0) {\n var ivStart = iv.length - ivLen\n var length = Math.min(ivLen, tmp.length - used)\n tmp.copy(iv, ivStart, used, used + length)\n ivLen -= length\n }\n }\n\n tmp.fill(0)\n return { key: key, iv: iv }\n}\n\nmodule.exports = EVP_BytesToKey\n","var MODES = require('./modes')\nvar AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Cipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Cipher, Transform)\n\nCipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n\n while ((chunk = this._cache.get())) {\n thing = this._mode.encrypt(this, chunk)\n out.push(thing)\n }\n\n return Buffer.concat(out)\n}\n\nvar PADDING = Buffer.alloc(16, 0x10)\n\nCipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n chunk = this._mode.encrypt(this, chunk)\n this._cipher.scrub()\n return chunk\n }\n\n if (!chunk.equals(PADDING)) {\n this._cipher.scrub()\n throw new Error('data not multiple of block length')\n }\n}\n\nCipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function () {\n if (this.cache.length > 15) {\n var out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n return null\n}\n\nSplitter.prototype.flush = function () {\n var len = 16 - this.cache.length\n var padBuff = Buffer.allocUnsafe(len)\n\n var i = -1\n while (++i < len) {\n padBuff.writeUInt8(len, i)\n }\n\n return Buffer.concat([this.cache, padBuff])\n}\n\nfunction createCipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv)\n }\n\n return new Cipher(config.module, password, iv)\n}\n\nfunction createCipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createCipheriv = createCipheriv\nexports.createCipher = createCipher\n","var AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar MODES = require('./modes')\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Decipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._last = void 0\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Decipher, Transform)\n\nDecipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n while ((chunk = this._cache.get(this._autopadding))) {\n thing = this._mode.decrypt(this, chunk)\n out.push(thing)\n }\n return Buffer.concat(out)\n}\n\nDecipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n return unpad(this._mode.decrypt(this, chunk))\n } else if (chunk) {\n throw new Error('data not multiple of block length')\n }\n}\n\nDecipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function (autoPadding) {\n var out\n if (autoPadding) {\n if (this.cache.length > 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n } else {\n if (this.cache.length >= 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n }\n\n return null\n}\n\nSplitter.prototype.flush = function () {\n if (this.cache.length) return this.cache\n}\n\nfunction unpad (last) {\n var padded = last[15]\n if (padded < 1 || padded > 16) {\n throw new Error('unable to decrypt data')\n }\n var i = -1\n while (++i < padded) {\n if (last[(i + (16 - padded))] !== padded) {\n throw new Error('unable to decrypt data')\n }\n }\n if (padded === 16) return\n\n return last.slice(0, 16 - padded)\n}\n\nfunction createDecipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv, true)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv, true)\n }\n\n return new Decipher(config.module, password, iv)\n}\n\nfunction createDecipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createDecipher = createDecipher\nexports.createDecipheriv = createDecipheriv\n","var ciphers = require('./encrypter')\nvar deciphers = require('./decrypter')\nvar modes = require('./modes/list.json')\n\nfunction getCiphers () {\n return Object.keys(modes)\n}\n\nexports.createCipher = exports.Cipher = ciphers.createCipher\nexports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv\nexports.createDecipher = exports.Decipher = deciphers.createDecipher\nexports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","exports['des-ecb'] = {\n key: 8,\n iv: 0\n}\nexports['des-cbc'] = exports.des = {\n key: 8,\n iv: 8\n}\nexports['des-ede3-cbc'] = exports.des3 = {\n key: 24,\n iv: 8\n}\nexports['des-ede3'] = {\n key: 24,\n iv: 0\n}\nexports['des-ede-cbc'] = {\n key: 16,\n iv: 8\n}\nexports['des-ede'] = {\n key: 16,\n iv: 0\n}\n","var DES = require('browserify-des')\nvar aes = require('browserify-aes/browser')\nvar aesModes = require('browserify-aes/modes')\nvar desModes = require('browserify-des/modes')\nvar ebtk = require('evp_bytestokey')\n\nfunction createCipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createDecipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createCipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction createDecipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction getCiphers () {\n return Object.keys(desModes).concat(aes.getCiphers())\n}\n\nexports.createCipher = exports.Cipher = createCipher\nexports.createCipheriv = exports.Cipheriv = createCipheriv\nexports.createDecipher = exports.Decipher = createDecipher\nexports.createDecipheriv = exports.Decipheriv = createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","var bn = require('bn.js');\nvar brorand = require('brorand');\n\nfunction MillerRabin(rand) {\n this.rand = rand || new brorand.Rand();\n}\nmodule.exports = MillerRabin;\n\nMillerRabin.create = function create(rand) {\n return new MillerRabin(rand);\n};\n\nMillerRabin.prototype._randbelow = function _randbelow(n) {\n var len = n.bitLength();\n var min_bytes = Math.ceil(len / 8);\n\n // Generage random bytes until a number less than n is found.\n // This ensures that 0..n-1 have an equal probability of being selected.\n do\n var a = new bn(this.rand.generate(min_bytes));\n while (a.cmp(n) >= 0);\n\n return a;\n};\n\nMillerRabin.prototype._randrange = function _randrange(start, stop) {\n // Generate a random number greater than or equal to start and less than stop.\n var size = stop.sub(start);\n return start.add(this._randbelow(size));\n};\n\nMillerRabin.prototype.test = function test(n, k, cb) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n var prime = true;\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n if (cb)\n cb(a);\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return false;\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s)\n return false;\n }\n\n return prime;\n};\n\nMillerRabin.prototype.getDivisor = function getDivisor(n, k) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n\n var g = n.gcd(a);\n if (g.cmpn(1) !== 0)\n return g;\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return x.fromRed().subn(1).gcd(n);\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s) {\n x = x.redSqr();\n return x.fromRed().subn(1).gcd(n);\n }\n }\n\n return false;\n};\n","var randomBytes = require('randombytes');\nmodule.exports = findPrime;\nfindPrime.simpleSieve = simpleSieve;\nfindPrime.fermatTest = fermatTest;\nvar BN = require('bn.js');\nvar TWENTYFOUR = new BN(24);\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar ONE = new BN(1);\nvar TWO = new BN(2);\nvar FIVE = new BN(5);\nvar SIXTEEN = new BN(16);\nvar EIGHT = new BN(8);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar ELEVEN = new BN(11);\nvar FOUR = new BN(4);\nvar TWELVE = new BN(12);\nvar primes = null;\n\nfunction _getPrimes() {\n if (primes !== null)\n return primes;\n\n var limit = 0x100000;\n var res = [];\n res[0] = 2;\n for (var i = 1, k = 3; k < limit; k += 2) {\n var sqrt = Math.ceil(Math.sqrt(k));\n for (var j = 0; j < i && res[j] <= sqrt; j++)\n if (k % res[j] === 0)\n break;\n\n if (i !== j && res[j] <= sqrt)\n continue;\n\n res[i++] = k;\n }\n primes = res;\n return res;\n}\n\nfunction simpleSieve(p) {\n var primes = _getPrimes();\n\n for (var i = 0; i < primes.length; i++)\n if (p.modn(primes[i]) === 0) {\n if (p.cmpn(primes[i]) === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n return true;\n}\n\nfunction fermatTest(p) {\n var red = BN.mont(p);\n return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;\n}\n\nfunction findPrime(bits, gen) {\n if (bits < 16) {\n // this is what openssl does\n if (gen === 2 || gen === 5) {\n return new BN([0x8c, 0x7b]);\n } else {\n return new BN([0x8c, 0x27]);\n }\n }\n gen = new BN(gen);\n\n var num, n2;\n\n while (true) {\n num = new BN(randomBytes(Math.ceil(bits / 8)));\n while (num.bitLength() > bits) {\n num.ishrn(1);\n }\n if (num.isEven()) {\n num.iadd(ONE);\n }\n if (!num.testn(1)) {\n num.iadd(TWO);\n }\n if (!gen.cmp(TWO)) {\n while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {\n num.iadd(FOUR);\n }\n } else if (!gen.cmp(FIVE)) {\n while (num.mod(TEN).cmp(THREE)) {\n num.iadd(FOUR);\n }\n }\n n2 = num.shrn(1);\n if (simpleSieve(n2) && simpleSieve(num) &&\n fermatTest(n2) && fermatTest(num) &&\n millerRabin.test(n2) && millerRabin.test(num)) {\n return num;\n }\n }\n\n}\n","var BN = require('bn.js');\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar TWENTYFOUR = new BN(24);\nvar ELEVEN = new BN(11);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar primes = require('./generatePrime');\nvar randomBytes = require('randombytes');\nmodule.exports = DH;\n\nfunction setPublicKey(pub, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc);\n }\n this._pub = new BN(pub);\n return this;\n}\n\nfunction setPrivateKey(priv, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc);\n }\n this._priv = new BN(priv);\n return this;\n}\n\nvar primeCache = {};\nfunction checkPrime(prime, generator) {\n var gen = generator.toString('hex');\n var hex = [gen, prime.toString(16)].join('_');\n if (hex in primeCache) {\n return primeCache[hex];\n }\n var error = 0;\n\n if (prime.isEven() ||\n !primes.simpleSieve ||\n !primes.fermatTest(prime) ||\n !millerRabin.test(prime)) {\n //not a prime so +1\n error += 1;\n\n if (gen === '02' || gen === '05') {\n // we'd be able to check the generator\n // it would fail so +8\n error += 8;\n } else {\n //we wouldn't be able to test the generator\n // so +4\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n }\n if (!millerRabin.test(prime.shrn(1))) {\n //not a safe prime\n error += 2;\n }\n var rem;\n switch (gen) {\n case '02':\n if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {\n // unsuidable generator\n error += 8;\n }\n break;\n case '05':\n rem = prime.mod(TEN);\n if (rem.cmp(THREE) && rem.cmp(SEVEN)) {\n // prime mod 10 needs to equal 3 or 7\n error += 8;\n }\n break;\n default:\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n}\n\nfunction DH(prime, generator, malleable) {\n this.setGenerator(generator);\n this.__prime = new BN(prime);\n this._prime = BN.mont(this.__prime);\n this._primeLen = prime.length;\n this._pub = undefined;\n this._priv = undefined;\n this._primeCode = undefined;\n if (malleable) {\n this.setPublicKey = setPublicKey;\n this.setPrivateKey = setPrivateKey;\n } else {\n this._primeCode = 8;\n }\n}\nObject.defineProperty(DH.prototype, 'verifyError', {\n enumerable: true,\n get: function () {\n if (typeof this._primeCode !== 'number') {\n this._primeCode = checkPrime(this.__prime, this.__gen);\n }\n return this._primeCode;\n }\n});\nDH.prototype.generateKeys = function () {\n if (!this._priv) {\n this._priv = new BN(randomBytes(this._primeLen));\n }\n this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();\n return this.getPublicKey();\n};\n\nDH.prototype.computeSecret = function (other) {\n other = new BN(other);\n other = other.toRed(this._prime);\n var secret = other.redPow(this._priv).fromRed();\n var out = new Buffer(secret.toArray());\n var prime = this.getPrime();\n if (out.length < prime.length) {\n var front = new Buffer(prime.length - out.length);\n front.fill(0);\n out = Buffer.concat([front, out]);\n }\n return out;\n};\n\nDH.prototype.getPublicKey = function getPublicKey(enc) {\n return formatReturnValue(this._pub, enc);\n};\n\nDH.prototype.getPrivateKey = function getPrivateKey(enc) {\n return formatReturnValue(this._priv, enc);\n};\n\nDH.prototype.getPrime = function (enc) {\n return formatReturnValue(this.__prime, enc);\n};\n\nDH.prototype.getGenerator = function (enc) {\n return formatReturnValue(this._gen, enc);\n};\n\nDH.prototype.setGenerator = function (gen, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(gen)) {\n gen = new Buffer(gen, enc);\n }\n this.__gen = gen;\n this._gen = new BN(gen);\n return this;\n};\n\nfunction formatReturnValue(bn, enc) {\n var buf = new Buffer(bn.toArray());\n if (!enc) {\n return buf;\n } else {\n return buf.toString(enc);\n }\n}\n","var generatePrime = require('./lib/generatePrime')\nvar primes = require('./lib/primes.json')\n\nvar DH = require('./lib/dh')\n\nfunction getDiffieHellman (mod) {\n var prime = new Buffer(primes[mod].prime, 'hex')\n var gen = new Buffer(primes[mod].gen, 'hex')\n\n return new DH(prime, gen)\n}\n\nvar ENCODINGS = {\n 'binary': true, 'hex': true, 'base64': true\n}\n\nfunction createDiffieHellman (prime, enc, generator, genc) {\n if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {\n return createDiffieHellman(prime, 'binary', enc, generator)\n }\n\n enc = enc || 'binary'\n genc = genc || 'binary'\n generator = generator || new Buffer([2])\n\n if (!Buffer.isBuffer(generator)) {\n generator = new Buffer(generator, genc)\n }\n\n if (typeof prime === 'number') {\n return new DH(generatePrime(prime, generator), generator, true)\n }\n\n if (!Buffer.isBuffer(prime)) {\n prime = new Buffer(prime, enc)\n }\n\n return new DH(prime, generator, true)\n}\n\nexports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman\nexports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var BN = require('bn.js')\nvar randomBytes = require('randombytes')\n\nfunction blind (priv) {\n var r = getr(priv)\n var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()\n return { blinder: blinder, unblinder: r.invm(priv.modulus) }\n}\n\nfunction getr (priv) {\n var len = priv.modulus.byteLength()\n var r\n do {\n r = new BN(randomBytes(len))\n } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))\n return r\n}\n\nfunction crt (msg, priv) {\n var blinds = blind(priv)\n var len = priv.modulus.byteLength()\n var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)\n var c1 = blinded.toRed(BN.mont(priv.prime1))\n var c2 = blinded.toRed(BN.mont(priv.prime2))\n var qinv = priv.coefficient\n var p = priv.prime1\n var q = priv.prime2\n var m1 = c1.redPow(priv.exponent1).fromRed()\n var m2 = c2.redPow(priv.exponent2).fromRed()\n var h = m1.isub(m2).imul(qinv).umod(p).imul(q)\n return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)\n}\ncrt.getr = getr\n\nmodule.exports = crt\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar utils = require('../utils');\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n var e;\n var h;\n var j;\n if (this.curve.twisted) {\n // E = a * C\n e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n h = this.z.redSqr();\n // J = F - 2 * H\n j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n e = c.redAdd(d);\n // H = (c * Z1)^2\n h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',\n ],\n ],\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',\n ],\n ],\n },\n};\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array|Object} sig -\n* @param {Array|Point} [sig.R] - R point as Point or bytes\n* @param {Array|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array} [sig.Rencoded] - R point encoded\n* @param {Array} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength),\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n","'use strict';\n\nvar hash = require('hash.js');\nvar curves = require('../curves');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n","'use strict';\n\nconst inherits = require('inherits');\n\nfunction Reporter(options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n };\n}\nexports.Reporter = Reporter;\n\nReporter.prototype.isError = function isError(obj) {\n return obj instanceof ReporterError;\n};\n\nReporter.prototype.save = function save() {\n const state = this._reporterState;\n\n return { obj: state.obj, pathLen: state.path.length };\n};\n\nReporter.prototype.restore = function restore(data) {\n const state = this._reporterState;\n\n state.obj = data.obj;\n state.path = state.path.slice(0, data.pathLen);\n};\n\nReporter.prototype.enterKey = function enterKey(key) {\n return this._reporterState.path.push(key);\n};\n\nReporter.prototype.exitKey = function exitKey(index) {\n const state = this._reporterState;\n\n state.path = state.path.slice(0, index - 1);\n};\n\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n const state = this._reporterState;\n\n this.exitKey(index);\n if (state.obj !== null)\n state.obj[key] = value;\n};\n\nReporter.prototype.path = function path() {\n return this._reporterState.path.join('/');\n};\n\nReporter.prototype.enterObject = function enterObject() {\n const state = this._reporterState;\n\n const prev = state.obj;\n state.obj = {};\n return prev;\n};\n\nReporter.prototype.leaveObject = function leaveObject(prev) {\n const state = this._reporterState;\n\n const now = state.obj;\n state.obj = prev;\n return now;\n};\n\nReporter.prototype.error = function error(msg) {\n let err;\n const state = this._reporterState;\n\n const inherited = msg instanceof ReporterError;\n if (inherited) {\n err = msg;\n } else {\n err = new ReporterError(state.path.map(function(elem) {\n return '[' + JSON.stringify(elem) + ']';\n }).join(''), msg.message || msg, msg.stack);\n }\n\n if (!state.options.partial)\n throw err;\n\n if (!inherited)\n state.errors.push(err);\n\n return err;\n};\n\nReporter.prototype.wrapResult = function wrapResult(result) {\n const state = this._reporterState;\n if (!state.options.partial)\n return result;\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n };\n};\n\nfunction ReporterError(path, msg) {\n this.path = path;\n this.rethrow(msg);\n}\ninherits(ReporterError, Error);\n\nReporterError.prototype.rethrow = function rethrow(msg) {\n this.message = msg + ' at: ' + (this.path || '(shallow)');\n if (Error.captureStackTrace)\n Error.captureStackTrace(this, ReporterError);\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message);\n } catch (e) {\n this.stack = e.stack;\n }\n }\n return this;\n};\n","'use strict';\n\nconst inherits = require('inherits');\nconst Reporter = require('../base/reporter').Reporter;\nconst Buffer = require('safer-buffer').Buffer;\n\nfunction DecoderBuffer(base, options) {\n Reporter.call(this, options);\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer');\n return;\n }\n\n this.base = base;\n this.offset = 0;\n this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {\n if (data instanceof DecoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n Buffer.isBuffer(data.base) &&\n data.constructor.name === 'DecoderBuffer' &&\n typeof data.offset === 'number' &&\n typeof data.length === 'number' &&\n typeof data.save === 'function' &&\n typeof data.restore === 'function' &&\n typeof data.isEmpty === 'function' &&\n typeof data.readUInt8 === 'function' &&\n typeof data.skip === 'function' &&\n typeof data.raw === 'function';\n\n return isCompatible;\n};\n\nDecoderBuffer.prototype.save = function save() {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };\n};\n\nDecoderBuffer.prototype.restore = function restore(save) {\n // Return skipped data\n const res = new DecoderBuffer(this.base);\n res.offset = save.offset;\n res.length = this.offset;\n\n this.offset = save.offset;\n Reporter.prototype.restore.call(this, save.reporter);\n\n return res;\n};\n\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n return this.offset === this.length;\n};\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n if (this.offset + 1 <= this.length)\n return this.base.readUInt8(this.offset++, true);\n else\n return this.error(fail || 'DecoderBuffer overrun');\n};\n\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n if (!(this.offset + bytes <= this.length))\n return this.error(fail || 'DecoderBuffer overrun');\n\n const res = new DecoderBuffer(this.base);\n\n // Share reporter state\n res._reporterState = this._reporterState;\n\n res.offset = this.offset;\n res.length = this.offset + bytes;\n this.offset += bytes;\n return res;\n};\n\nDecoderBuffer.prototype.raw = function raw(save) {\n return this.base.slice(save ? save.offset : this.offset, this.length);\n};\n\nfunction EncoderBuffer(value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0;\n this.value = value.map(function(item) {\n if (!EncoderBuffer.isEncoderBuffer(item))\n item = new EncoderBuffer(item, reporter);\n this.length += item.length;\n return item;\n }, this);\n } else if (typeof value === 'number') {\n if (!(0 <= value && value <= 0xff))\n return reporter.error('non-byte EncoderBuffer value');\n this.value = value;\n this.length = 1;\n } else if (typeof value === 'string') {\n this.value = value;\n this.length = Buffer.byteLength(value);\n } else if (Buffer.isBuffer(value)) {\n this.value = value;\n this.length = value.length;\n } else {\n return reporter.error('Unsupported type: ' + typeof value);\n }\n}\nexports.EncoderBuffer = EncoderBuffer;\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {\n if (data instanceof EncoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n data.constructor.name === 'EncoderBuffer' &&\n typeof data.length === 'number' &&\n typeof data.join === 'function';\n\n return isCompatible;\n};\n\nEncoderBuffer.prototype.join = function join(out, offset) {\n if (!out)\n out = Buffer.alloc(this.length);\n if (!offset)\n offset = 0;\n\n if (this.length === 0)\n return out;\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function(item) {\n item.join(out, offset);\n offset += item.length;\n });\n } else {\n if (typeof this.value === 'number')\n out[offset] = this.value;\n else if (typeof this.value === 'string')\n out.write(this.value, offset);\n else if (Buffer.isBuffer(this.value))\n this.value.copy(out, offset);\n offset += this.length;\n }\n\n return out;\n};\n","'use strict';\n\nconst Reporter = require('../base/reporter').Reporter;\nconst EncoderBuffer = require('../base/buffer').EncoderBuffer;\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst assert = require('minimalistic-assert');\n\n// Supported tags\nconst tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n];\n\n// Public methods list\nconst methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags);\n\n// Overrided methods list\nconst overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n];\n\nfunction Node(enc, parent, name) {\n const state = {};\n this._baseState = state;\n\n state.name = name;\n state.enc = enc;\n\n state.parent = parent || null;\n state.children = null;\n\n // State\n state.tag = null;\n state.args = null;\n state.reverseArgs = null;\n state.choice = null;\n state.optional = false;\n state.any = false;\n state.obj = false;\n state.use = null;\n state.useDecoder = null;\n state.key = null;\n state['default'] = null;\n state.explicit = null;\n state.implicit = null;\n state.contains = null;\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = [];\n this._wrap();\n }\n}\nmodule.exports = Node;\n\nconst stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n];\n\nNode.prototype.clone = function clone() {\n const state = this._baseState;\n const cstate = {};\n stateProps.forEach(function(prop) {\n cstate[prop] = state[prop];\n });\n const res = new this.constructor(cstate.parent);\n res._baseState = cstate;\n return res;\n};\n\nNode.prototype._wrap = function wrap() {\n const state = this._baseState;\n methods.forEach(function(method) {\n this[method] = function _wrappedMethod() {\n const clone = new this.constructor(this);\n state.children.push(clone);\n return clone[method].apply(clone, arguments);\n };\n }, this);\n};\n\nNode.prototype._init = function init(body) {\n const state = this._baseState;\n\n assert(state.parent === null);\n body.call(this);\n\n // Filter children\n state.children = state.children.filter(function(child) {\n return child._baseState.parent === this;\n }, this);\n assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\n\nNode.prototype._useArgs = function useArgs(args) {\n const state = this._baseState;\n\n // Filter children and args\n const children = args.filter(function(arg) {\n return arg instanceof this.constructor;\n }, this);\n args = args.filter(function(arg) {\n return !(arg instanceof this.constructor);\n }, this);\n\n if (children.length !== 0) {\n assert(state.children === null);\n state.children = children;\n\n // Replace parent to maintain backward link\n children.forEach(function(child) {\n child._baseState.parent = this;\n }, this);\n }\n if (args.length !== 0) {\n assert(state.args === null);\n state.args = args;\n state.reverseArgs = args.map(function(arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object)\n return arg;\n\n const res = {};\n Object.keys(arg).forEach(function(key) {\n if (key == (key | 0))\n key |= 0;\n const value = arg[key];\n res[value] = key;\n });\n return res;\n });\n }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function(method) {\n Node.prototype[method] = function _overrided() {\n const state = this._baseState;\n throw new Error(method + ' not implemented for encoding: ' + state.enc);\n };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function(tag) {\n Node.prototype[tag] = function _tagMethod() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n assert(state.tag === null);\n state.tag = tag;\n\n this._useArgs(args);\n\n return this;\n };\n});\n\nNode.prototype.use = function use(item) {\n assert(item);\n const state = this._baseState;\n\n assert(state.use === null);\n state.use = item;\n\n return this;\n};\n\nNode.prototype.optional = function optional() {\n const state = this._baseState;\n\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.def = function def(val) {\n const state = this._baseState;\n\n assert(state['default'] === null);\n state['default'] = val;\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.explicit = function explicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.explicit = num;\n\n return this;\n};\n\nNode.prototype.implicit = function implicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.implicit = num;\n\n return this;\n};\n\nNode.prototype.obj = function obj() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n state.obj = true;\n\n if (args.length !== 0)\n this._useArgs(args);\n\n return this;\n};\n\nNode.prototype.key = function key(newKey) {\n const state = this._baseState;\n\n assert(state.key === null);\n state.key = newKey;\n\n return this;\n};\n\nNode.prototype.any = function any() {\n const state = this._baseState;\n\n state.any = true;\n\n return this;\n};\n\nNode.prototype.choice = function choice(obj) {\n const state = this._baseState;\n\n assert(state.choice === null);\n state.choice = obj;\n this._useArgs(Object.keys(obj).map(function(key) {\n return obj[key];\n }));\n\n return this;\n};\n\nNode.prototype.contains = function contains(item) {\n const state = this._baseState;\n\n assert(state.use === null);\n state.contains = item;\n\n return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return input.wrapResult(state.children[0]._decode(input, options));\n\n let result = state['default'];\n let present = true;\n\n let prevKey = null;\n if (state.key !== null)\n prevKey = input.enterKey(state.key);\n\n // Check if tag is there\n if (state.optional) {\n let tag = null;\n if (state.explicit !== null)\n tag = state.explicit;\n else if (state.implicit !== null)\n tag = state.implicit;\n else if (state.tag !== null)\n tag = state.tag;\n\n if (tag === null && !state.any) {\n // Trial and Error\n const save = input.save();\n try {\n if (state.choice === null)\n this._decodeGeneric(state.tag, input, options);\n else\n this._decodeChoice(input, options);\n present = true;\n } catch (e) {\n present = false;\n }\n input.restore(save);\n } else {\n present = this._peekTag(input, tag, state.any);\n\n if (input.isError(present))\n return present;\n }\n }\n\n // Push object on stack\n let prevObj;\n if (state.obj && present)\n prevObj = input.enterObject();\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n const explicit = this._decodeTag(input, state.explicit);\n if (input.isError(explicit))\n return explicit;\n input = explicit;\n }\n\n const start = input.offset;\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n let save;\n if (state.any)\n save = input.save();\n const body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n );\n if (input.isError(body))\n return body;\n\n if (state.any)\n result = input.raw(save);\n else\n input = body;\n }\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), start, input.length, 'tagged');\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), input.offset, input.length, 'content');\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options);\n } else {\n result = this._decodeChoice(input, options);\n }\n\n if (input.isError(result))\n return result;\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren(child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options);\n });\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n const data = new DecoderBuffer(result);\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options);\n }\n }\n\n // Pop object\n if (state.obj && present)\n result = input.leaveObject(prevObj);\n\n // Set key\n if (state.key !== null && (result !== null || present === true))\n input.leaveKey(prevKey, state.key, result);\n else if (prevKey !== null)\n input.exitKey(prevKey);\n\n return result;\n};\n\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n const state = this._baseState;\n\n if (tag === 'seq' || tag === 'set')\n return null;\n if (tag === 'seqof' || tag === 'setof')\n return this._decodeList(input, tag, state.args[0], options);\n else if (/str$/.test(tag))\n return this._decodeStr(input, tag, options);\n else if (tag === 'objid' && state.args)\n return this._decodeObjid(input, state.args[0], state.args[1], options);\n else if (tag === 'objid')\n return this._decodeObjid(input, null, null, options);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._decodeTime(input, tag, options);\n else if (tag === 'null_')\n return this._decodeNull(input, options);\n else if (tag === 'bool')\n return this._decodeBool(input, options);\n else if (tag === 'objDesc')\n return this._decodeStr(input, tag, options);\n else if (tag === 'int' || tag === 'enum')\n return this._decodeInt(input, state.args && state.args[0], options);\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options);\n } else {\n return input.error('unknown tag: ' + tag);\n }\n};\n\nNode.prototype._getUse = function _getUse(entity, obj) {\n\n const state = this._baseState;\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj);\n assert(state.useDecoder._baseState.parent === null);\n state.useDecoder = state.useDecoder._baseState.children[0];\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone();\n state.useDecoder._baseState.implicit = state.implicit;\n }\n return state.useDecoder;\n};\n\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n const state = this._baseState;\n let result = null;\n let match = false;\n\n Object.keys(state.choice).some(function(key) {\n const save = input.save();\n const node = state.choice[key];\n try {\n const value = node._decode(input, options);\n if (input.isError(value))\n return false;\n\n result = { type: key, value: value };\n match = true;\n } catch (e) {\n input.restore(save);\n return false;\n }\n return true;\n }, this);\n\n if (!match)\n return input.error('Choice not matched');\n\n return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n return new EncoderBuffer(data, this.reporter);\n};\n\nNode.prototype._encode = function encode(data, reporter, parent) {\n const state = this._baseState;\n if (state['default'] !== null && state['default'] === data)\n return;\n\n const result = this._encodeValue(data, reporter, parent);\n if (result === undefined)\n return;\n\n if (this._skipDefault(result, reporter, parent))\n return;\n\n return result;\n};\n\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return state.children[0]._encode(data, reporter || new Reporter());\n\n let result = null;\n\n // Set reporter to share it with a child class\n this.reporter = reporter;\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state['default'] !== null)\n data = state['default'];\n else\n return;\n }\n\n // Encode children first\n let content = null;\n let primitive = false;\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data);\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter);\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter);\n primitive = true;\n } else if (state.children) {\n content = state.children.map(function(child) {\n if (child._baseState.tag === 'null_')\n return child._encode(null, reporter, data);\n\n if (child._baseState.key === null)\n return reporter.error('Child should have a key');\n const prevKey = reporter.enterKey(child._baseState.key);\n\n if (typeof data !== 'object')\n return reporter.error('Child expected, but input is not object');\n\n const res = child._encode(data[child._baseState.key], reporter, data);\n reporter.leaveKey(prevKey);\n\n return res;\n }, this).filter(function(child) {\n return child;\n });\n content = this._createEncoderBuffer(content);\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n // TODO(indutny): this should be thrown on DSL level\n if (!(state.args && state.args.length === 1))\n return reporter.error('Too many args for : ' + state.tag);\n\n if (!Array.isArray(data))\n return reporter.error('seqof/setof, but data is not Array');\n\n const child = this.clone();\n child._baseState.implicit = null;\n content = this._createEncoderBuffer(data.map(function(item) {\n const state = this._baseState;\n\n return this._getUse(state.args[0], data)._encode(item, reporter);\n }, child));\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter);\n } else {\n content = this._encodePrimitive(state.tag, data);\n primitive = true;\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n const tag = state.implicit !== null ? state.implicit : state.tag;\n const cls = state.implicit === null ? 'universal' : 'context';\n\n if (tag === null) {\n if (state.use === null)\n reporter.error('Tag could be omitted only for .use()');\n } else {\n if (state.use === null)\n result = this._encodeComposite(tag, primitive, cls, content);\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null)\n result = this._encodeComposite(state.explicit, false, 'context', result);\n\n return result;\n};\n\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n const state = this._baseState;\n\n const node = state.choice[data.type];\n if (!node) {\n assert(\n false,\n data.type + ' not found in ' +\n JSON.stringify(Object.keys(state.choice)));\n }\n return node._encode(data.value, reporter);\n};\n\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n const state = this._baseState;\n\n if (/str$/.test(tag))\n return this._encodeStr(data, tag);\n else if (tag === 'objid' && state.args)\n return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);\n else if (tag === 'objid')\n return this._encodeObjid(data, null, null);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._encodeTime(data, tag);\n else if (tag === 'null_')\n return this._encodeNull();\n else if (tag === 'int' || tag === 'enum')\n return this._encodeInt(data, state.args && state.reverseArgs[0]);\n else if (tag === 'bool')\n return this._encodeBool(data);\n else if (tag === 'objDesc')\n return this._encodeStr(data, tag);\n else\n throw new Error('Unsupported tag: ' + tag);\n};\n\nNode.prototype._isNumstr = function isNumstr(str) {\n return /^[0-9 ]*$/.test(str);\n};\n\nNode.prototype._isPrintstr = function isPrintstr(str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);\n};\n","'use strict';\n\n// Helper\nfunction reverse(map) {\n const res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n const value = map[key];\n res[value] = key;\n });\n\n return res;\n}\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n};\nexports.tagClassByName = reverse(exports.tagClass);\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n};\nexports.tagByName = reverse(exports.tag);\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DEREncoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DEREncoder;\n\nDEREncoder.prototype.encode = function encode(data, reporter) {\n return this.tree._encode(data, reporter).join();\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._encodeComposite = function encodeComposite(tag,\n primitive,\n cls,\n content) {\n const encodedTag = encodeTag(tag, primitive, cls, this.reporter);\n\n // Short form\n if (content.length < 0x80) {\n const header = Buffer.alloc(2);\n header[0] = encodedTag;\n header[1] = content.length;\n return this._createEncoderBuffer([ header, content ]);\n }\n\n // Long form\n // Count octets required to store length\n let lenOctets = 1;\n for (let i = content.length; i >= 0x100; i >>= 8)\n lenOctets++;\n\n const header = Buffer.alloc(1 + 1 + lenOctets);\n header[0] = encodedTag;\n header[1] = 0x80 | lenOctets;\n\n for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)\n header[i] = j & 0xff;\n\n return this._createEncoderBuffer([ header, content ]);\n};\n\nDERNode.prototype._encodeStr = function encodeStr(str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([ str.unused | 0, str.data ]);\n } else if (tag === 'bmpstr') {\n const buf = Buffer.alloc(str.length * 2);\n for (let i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2);\n }\n return this._createEncoderBuffer(buf);\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports ' +\n 'only digits and space');\n }\n return this._createEncoderBuffer(str);\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports ' +\n 'only latin upper and lower case letters, ' +\n 'digits, space, apostrophe, left and rigth ' +\n 'parenthesis, plus sign, comma, hyphen, ' +\n 'dot, slash, colon, equal sign, ' +\n 'question mark');\n }\n return this._createEncoderBuffer(str);\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str);\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str);\n } else {\n return this.reporter.error('Encoding of string type: ' + tag +\n ' unsupported');\n }\n};\n\nDERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {\n if (typeof id === 'string') {\n if (!values)\n return this.reporter.error('string objid given, but no values map found');\n if (!values.hasOwnProperty(id))\n return this.reporter.error('objid not found in values map');\n id = values[id].split(/[\\s.]+/g);\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n } else if (Array.isArray(id)) {\n id = id.slice();\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error('objid() should be either array or string, ' +\n 'got: ' + JSON.stringify(id));\n }\n\n if (!relative) {\n if (id[1] >= 40)\n return this.reporter.error('Second objid identifier OOB');\n id.splice(0, 2, id[0] * 40 + id[1]);\n }\n\n // Count number of octets\n let size = 0;\n for (let i = 0; i < id.length; i++) {\n let ident = id[i];\n for (size++; ident >= 0x80; ident >>= 7)\n size++;\n }\n\n const objid = Buffer.alloc(size);\n let offset = objid.length - 1;\n for (let i = id.length - 1; i >= 0; i--) {\n let ident = id[i];\n objid[offset--] = ident & 0x7f;\n while ((ident >>= 7) > 0)\n objid[offset--] = 0x80 | (ident & 0x7f);\n }\n\n return this._createEncoderBuffer(objid);\n};\n\nfunction two(num) {\n if (num < 10)\n return '0' + num;\n else\n return num;\n}\n\nDERNode.prototype._encodeTime = function encodeTime(time, tag) {\n let str;\n const date = new Date(time);\n\n if (tag === 'gentime') {\n str = [\n two(date.getUTCFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else if (tag === 'utctime') {\n str = [\n two(date.getUTCFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else {\n this.reporter.error('Encoding ' + tag + ' time is not supported yet');\n }\n\n return this._encodeStr(str, 'octstr');\n};\n\nDERNode.prototype._encodeNull = function encodeNull() {\n return this._createEncoderBuffer('');\n};\n\nDERNode.prototype._encodeInt = function encodeInt(num, values) {\n if (typeof num === 'string') {\n if (!values)\n return this.reporter.error('String int or enum given, but no values map');\n if (!values.hasOwnProperty(num)) {\n return this.reporter.error('Values map doesn\\'t contain: ' +\n JSON.stringify(num));\n }\n num = values[num];\n }\n\n // Bignum, assume big endian\n if (typeof num !== 'number' && !Buffer.isBuffer(num)) {\n const numArray = num.toArray();\n if (!num.sign && numArray[0] & 0x80) {\n numArray.unshift(0);\n }\n num = Buffer.from(numArray);\n }\n\n if (Buffer.isBuffer(num)) {\n let size = num.length;\n if (num.length === 0)\n size++;\n\n const out = Buffer.alloc(size);\n num.copy(out);\n if (num.length === 0)\n out[0] = 0;\n return this._createEncoderBuffer(out);\n }\n\n if (num < 0x80)\n return this._createEncoderBuffer(num);\n\n if (num < 0x100)\n return this._createEncoderBuffer([0, num]);\n\n let size = 1;\n for (let i = num; i >= 0x100; i >>= 8)\n size++;\n\n const out = new Array(size);\n for (let i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff;\n num >>= 8;\n }\n if(out[0] & 0x80) {\n out.unshift(0);\n }\n\n return this._createEncoderBuffer(Buffer.from(out));\n};\n\nDERNode.prototype._encodeBool = function encodeBool(value) {\n return this._createEncoderBuffer(value ? 0xff : 0);\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getEncoder('der').tree;\n};\n\nDERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {\n const state = this._baseState;\n let i;\n if (state['default'] === null)\n return false;\n\n const data = dataBuffer.join();\n if (state.defaultBuffer === undefined)\n state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();\n\n if (data.length !== state.defaultBuffer.length)\n return false;\n\n for (i=0; i < data.length; i++)\n if (data[i] !== state.defaultBuffer[i])\n return false;\n\n return true;\n};\n\n// Utility methods\n\nfunction encodeTag(tag, primitive, cls, reporter) {\n let res;\n\n if (tag === 'seqof')\n tag = 'seq';\n else if (tag === 'setof')\n tag = 'set';\n\n if (der.tagByName.hasOwnProperty(tag))\n res = der.tagByName[tag];\n else if (typeof tag === 'number' && (tag | 0) === tag)\n res = tag;\n else\n return reporter.error('Unknown tag: ' + tag);\n\n if (res >= 0x1f)\n return reporter.error('Multi-octet tag encoding unsupported');\n\n if (!primitive)\n res |= 0x20;\n\n res |= (der.tagClassByName[cls || 'universal'] << 6);\n\n return res;\n}\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n DEREncoder.call(this, entity);\n this.enc = 'pem';\n}\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data);\n\n const p = buf.toString('base64');\n const out = [ '-----BEGIN ' + options.label + '-----' ];\n for (let i = 0; i < p.length; i += 64)\n out.push(p.slice(i, i + 64));\n out.push('-----END ' + options.label + '-----');\n return out.join('\\n');\n};\n","'use strict';\n\nconst encoders = exports;\n\nencoders.der = require('./der');\nencoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst bignum = require('bn.js');\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DERDecoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DERDecoder;\n\nDERDecoder.prototype.decode = function decode(data, options) {\n if (!DecoderBuffer.isDecoderBuffer(data)) {\n data = new DecoderBuffer(data, options);\n }\n\n return this.tree._decode(data, options);\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._peekTag = function peekTag(buffer, tag, any) {\n if (buffer.isEmpty())\n return false;\n\n const state = buffer.save();\n const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n buffer.restore(state);\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag ||\n (decodedTag.tagStr + 'of') === tag || any;\n};\n\nDERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {\n const decodedTag = derDecodeTag(buffer,\n 'Failed to decode tag of \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n let len = derDecodeLen(buffer,\n decodedTag.primitive,\n 'Failed to get length of \"' + tag + '\"');\n\n // Failure\n if (buffer.isError(len))\n return len;\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error('Failed to match tag: \"' + tag + '\"');\n }\n\n if (decodedTag.primitive || len !== null)\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n\n // Indefinite length... find END tag\n const state = buffer.save();\n const res = this._skipUntilEnd(\n buffer,\n 'Failed to skip indefinite length body: \"' + this.tag + '\"');\n if (buffer.isError(res))\n return res;\n\n len = buffer.offset - state.offset;\n buffer.restore(state);\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n};\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {\n for (;;) {\n const tag = derDecodeTag(buffer, fail);\n if (buffer.isError(tag))\n return tag;\n const len = derDecodeLen(buffer, tag.primitive, fail);\n if (buffer.isError(len))\n return len;\n\n let res;\n if (tag.primitive || len !== null)\n res = buffer.skip(len);\n else\n res = this._skipUntilEnd(buffer, fail);\n\n // Failure\n if (buffer.isError(res))\n return res;\n\n if (tag.tagStr === 'end')\n break;\n }\n};\n\nDERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,\n options) {\n const result = [];\n while (!buffer.isEmpty()) {\n const possibleEnd = this._peekTag(buffer, 'end');\n if (buffer.isError(possibleEnd))\n return possibleEnd;\n\n const res = decoder.decode(buffer, 'der', options);\n if (buffer.isError(res) && possibleEnd)\n break;\n result.push(res);\n }\n return result;\n};\n\nDERNode.prototype._decodeStr = function decodeStr(buffer, tag) {\n if (tag === 'bitstr') {\n const unused = buffer.readUInt8();\n if (buffer.isError(unused))\n return unused;\n return { unused: unused, data: buffer.raw() };\n } else if (tag === 'bmpstr') {\n const raw = buffer.raw();\n if (raw.length % 2 === 1)\n return buffer.error('Decoding of string type: bmpstr length mismatch');\n\n let str = '';\n for (let i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2));\n }\n return str;\n } else if (tag === 'numstr') {\n const numstr = buffer.raw().toString('ascii');\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: ' +\n 'numstr unsupported characters');\n }\n return numstr;\n } else if (tag === 'octstr') {\n return buffer.raw();\n } else if (tag === 'objDesc') {\n return buffer.raw();\n } else if (tag === 'printstr') {\n const printstr = buffer.raw().toString('ascii');\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: ' +\n 'printstr unsupported characters');\n }\n return printstr;\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString();\n } else {\n return buffer.error('Decoding of string type: ' + tag + ' unsupported');\n }\n};\n\nDERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {\n let result;\n const identifiers = [];\n let ident = 0;\n let subident = 0;\n while (!buffer.isEmpty()) {\n subident = buffer.readUInt8();\n ident <<= 7;\n ident |= subident & 0x7f;\n if ((subident & 0x80) === 0) {\n identifiers.push(ident);\n ident = 0;\n }\n }\n if (subident & 0x80)\n identifiers.push(ident);\n\n const first = (identifiers[0] / 40) | 0;\n const second = identifiers[0] % 40;\n\n if (relative)\n result = identifiers;\n else\n result = [first, second].concat(identifiers.slice(1));\n\n if (values) {\n let tmp = values[result.join(' ')];\n if (tmp === undefined)\n tmp = values[result.join('.')];\n if (tmp !== undefined)\n result = tmp;\n }\n\n return result;\n};\n\nDERNode.prototype._decodeTime = function decodeTime(buffer, tag) {\n const str = buffer.raw().toString();\n\n let year;\n let mon;\n let day;\n let hour;\n let min;\n let sec;\n if (tag === 'gentime') {\n year = str.slice(0, 4) | 0;\n mon = str.slice(4, 6) | 0;\n day = str.slice(6, 8) | 0;\n hour = str.slice(8, 10) | 0;\n min = str.slice(10, 12) | 0;\n sec = str.slice(12, 14) | 0;\n } else if (tag === 'utctime') {\n year = str.slice(0, 2) | 0;\n mon = str.slice(2, 4) | 0;\n day = str.slice(4, 6) | 0;\n hour = str.slice(6, 8) | 0;\n min = str.slice(8, 10) | 0;\n sec = str.slice(10, 12) | 0;\n if (year < 70)\n year = 2000 + year;\n else\n year = 1900 + year;\n } else {\n return buffer.error('Decoding ' + tag + ' time is not supported yet');\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0);\n};\n\nDERNode.prototype._decodeNull = function decodeNull() {\n return null;\n};\n\nDERNode.prototype._decodeBool = function decodeBool(buffer) {\n const res = buffer.readUInt8();\n if (buffer.isError(res))\n return res;\n else\n return res !== 0;\n};\n\nDERNode.prototype._decodeInt = function decodeInt(buffer, values) {\n // Bigint, return as it is (assume big endian)\n const raw = buffer.raw();\n let res = new bignum(raw);\n\n if (values)\n res = values[res.toString(10)] || res;\n\n return res;\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getDecoder('der').tree;\n};\n\n// Utility methods\n\nfunction derDecodeTag(buf, fail) {\n let tag = buf.readUInt8(fail);\n if (buf.isError(tag))\n return tag;\n\n const cls = der.tagClass[tag >> 6];\n const primitive = (tag & 0x20) === 0;\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n let oct = tag;\n tag = 0;\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail);\n if (buf.isError(oct))\n return oct;\n\n tag <<= 7;\n tag |= oct & 0x7f;\n }\n } else {\n tag &= 0x1f;\n }\n const tagStr = der.tag[tag];\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n };\n}\n\nfunction derDecodeLen(buf, primitive, fail) {\n let len = buf.readUInt8(fail);\n if (buf.isError(len))\n return len;\n\n // Indefinite form\n if (!primitive && len === 0x80)\n return null;\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len;\n }\n\n // Long form\n const num = len & 0x7f;\n if (num > 4)\n return buf.error('length octect is too long');\n\n len = 0;\n for (let i = 0; i < num; i++) {\n len <<= 8;\n const j = buf.readUInt8(fail);\n if (buf.isError(j))\n return j;\n len |= j;\n }\n\n return len;\n}\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\n\nconst DERDecoder = require('./der');\n\nfunction PEMDecoder(entity) {\n DERDecoder.call(this, entity);\n this.enc = 'pem';\n}\ninherits(PEMDecoder, DERDecoder);\nmodule.exports = PEMDecoder;\n\nPEMDecoder.prototype.decode = function decode(data, options) {\n const lines = data.toString().split(/[\\r\\n]+/g);\n\n const label = options.label.toUpperCase();\n\n const re = /^-----(BEGIN|END) ([^-]+)-----$/;\n let start = -1;\n let end = -1;\n for (let i = 0; i < lines.length; i++) {\n const match = lines[i].match(re);\n if (match === null)\n continue;\n\n if (match[2] !== label)\n continue;\n\n if (start === -1) {\n if (match[1] !== 'BEGIN')\n break;\n start = i;\n } else {\n if (match[1] !== 'END')\n break;\n end = i;\n break;\n }\n }\n if (start === -1 || end === -1)\n throw new Error('PEM section not found for: ' + label);\n\n const base64 = lines.slice(start + 1, end).join('');\n // Remove excessive symbols\n base64.replace(/[^a-z0-9+/=]+/gi, '');\n\n const input = Buffer.from(base64, 'base64');\n return DERDecoder.prototype.decode.call(this, input, options);\n};\n","'use strict';\n\nconst decoders = exports;\n\ndecoders.der = require('./der');\ndecoders.pem = require('./pem');\n","'use strict';\n\nconst encoders = require('./encoders');\nconst decoders = require('./decoders');\nconst inherits = require('inherits');\n\nconst api = exports;\n\napi.define = function define(name, body) {\n return new Entity(name, body);\n};\n\nfunction Entity(name, body) {\n this.name = name;\n this.body = body;\n\n this.decoders = {};\n this.encoders = {};\n}\n\nEntity.prototype._createNamed = function createNamed(Base) {\n const name = this.name;\n\n function Generated(entity) {\n this._initNamed(entity, name);\n }\n inherits(Generated, Base);\n Generated.prototype._initNamed = function _initNamed(entity, name) {\n Base.call(this, entity, name);\n };\n\n return new Generated(this);\n};\n\nEntity.prototype._getDecoder = function _getDecoder(enc) {\n enc = enc || 'der';\n // Lazily create decoder\n if (!this.decoders.hasOwnProperty(enc))\n this.decoders[enc] = this._createNamed(decoders[enc]);\n return this.decoders[enc];\n};\n\nEntity.prototype.decode = function decode(data, enc, options) {\n return this._getDecoder(enc).decode(data, options);\n};\n\nEntity.prototype._getEncoder = function _getEncoder(enc) {\n enc = enc || 'der';\n // Lazily create encoder\n if (!this.encoders.hasOwnProperty(enc))\n this.encoders[enc] = this._createNamed(encoders[enc]);\n return this.encoders[enc];\n};\n\nEntity.prototype.encode = function encode(data, enc, /* internal */ reporter) {\n return this._getEncoder(enc).encode(data, reporter);\n};\n","'use strict';\n\nconst base = exports;\n\nbase.Reporter = require('./reporter').Reporter;\nbase.DecoderBuffer = require('./buffer').DecoderBuffer;\nbase.EncoderBuffer = require('./buffer').EncoderBuffer;\nbase.Node = require('./node');\n","'use strict';\n\nconst constants = exports;\n\n// Helper\nconstants._reverse = function reverse(map) {\n const res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n const value = map[key];\n res[value] = key;\n });\n\n return res;\n};\n\nconstants.der = require('./der');\n","'use strict';\n\nconst asn1 = exports;\n\nasn1.bignum = require('bn.js');\n\nasn1.define = require('./asn1/api').define;\nasn1.base = require('./asn1/base');\nasn1.constants = require('./asn1/constants');\nasn1.decoders = require('./asn1/decoders');\nasn1.encoders = require('./asn1/encoders');\n","// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js\n// thanks to @Rantanen\n\n'use strict'\n\nvar asn = require('asn1.js')\n\nvar Time = asn.define('Time', function () {\n this.choice({\n utcTime: this.utctime(),\n generalTime: this.gentime()\n })\n})\n\nvar AttributeTypeValue = asn.define('AttributeTypeValue', function () {\n this.seq().obj(\n this.key('type').objid(),\n this.key('value').any()\n )\n})\n\nvar AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {\n this.seq().obj(\n this.key('algorithm').objid(),\n this.key('parameters').optional(),\n this.key('curve').objid().optional()\n )\n})\n\nvar SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPublicKey').bitstr()\n )\n})\n\nvar RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {\n this.setof(AttributeTypeValue)\n})\n\nvar RDNSequence = asn.define('RDNSequence', function () {\n this.seqof(RelativeDistinguishedName)\n})\n\nvar Name = asn.define('Name', function () {\n this.choice({\n rdnSequence: this.use(RDNSequence)\n })\n})\n\nvar Validity = asn.define('Validity', function () {\n this.seq().obj(\n this.key('notBefore').use(Time),\n this.key('notAfter').use(Time)\n )\n})\n\nvar Extension = asn.define('Extension', function () {\n this.seq().obj(\n this.key('extnID').objid(),\n this.key('critical').bool().def(false),\n this.key('extnValue').octstr()\n )\n})\n\nvar TBSCertificate = asn.define('TBSCertificate', function () {\n this.seq().obj(\n this.key('version').explicit(0).int().optional(),\n this.key('serialNumber').int(),\n this.key('signature').use(AlgorithmIdentifier),\n this.key('issuer').use(Name),\n this.key('validity').use(Validity),\n this.key('subject').use(Name),\n this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),\n this.key('issuerUniqueID').implicit(1).bitstr().optional(),\n this.key('subjectUniqueID').implicit(2).bitstr().optional(),\n this.key('extensions').explicit(3).seqof(Extension).optional()\n )\n})\n\nvar X509Certificate = asn.define('X509Certificate', function () {\n this.seq().obj(\n this.key('tbsCertificate').use(TBSCertificate),\n this.key('signatureAlgorithm').use(AlgorithmIdentifier),\n this.key('signatureValue').bitstr()\n )\n})\n\nmodule.exports = X509Certificate\n","// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n'use strict'\n\nvar asn1 = require('asn1.js')\n\nexports.certificate = require('./certificate')\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('modulus').int(),\n this.key('publicExponent').int(),\n this.key('privateExponent').int(),\n this.key('prime1').int(),\n this.key('prime2').int(),\n this.key('exponent1').int(),\n this.key('exponent2').int(),\n this.key('coefficient').int()\n )\n})\nexports.RSAPrivateKey = RSAPrivateKey\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n this.seq().obj(\n this.key('modulus').int(),\n this.key('publicExponent').int()\n )\n})\nexports.RSAPublicKey = RSAPublicKey\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPublicKey').bitstr()\n )\n})\nexports.PublicKey = PublicKey\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n this.seq().obj(\n this.key('algorithm').objid(),\n this.key('none').null_().optional(),\n this.key('curve').objid().optional(),\n this.key('params').seq().obj(\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int()\n ).optional()\n )\n})\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPrivateKey').octstr()\n )\n})\nexports.PrivateKey = PrivateKeyInfo\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').seq().obj(\n this.key('id').objid(),\n this.key('decrypt').seq().obj(\n this.key('kde').seq().obj(\n this.key('id').objid(),\n this.key('kdeparams').seq().obj(\n this.key('salt').octstr(),\n this.key('iters').int()\n )\n ),\n this.key('cipher').seq().obj(\n this.key('algo').objid(),\n this.key('iv').octstr()\n )\n )\n ),\n this.key('subjectPrivateKey').octstr()\n )\n})\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int(),\n this.key('pub_key').int(),\n this.key('priv_key').int()\n )\n})\nexports.DSAPrivateKey = DSAPrivateKey\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n this.int()\n})\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('privateKey').octstr(),\n this.key('parameters').optional().explicit(0).use(ECParameters),\n this.key('publicKey').optional().explicit(1).bitstr()\n )\n})\nexports.ECPrivateKey = ECPrivateKey\n\nvar ECParameters = asn1.define('ECParameters', function () {\n this.choice({\n namedCurve: this.objid()\n })\n})\n\nexports.signature = asn1.define('signature', function () {\n this.seq().obj(\n this.key('r').int(),\n this.key('s').int()\n )\n})\n","// adapted from https://github.com/apatil/pemstrip\nvar findProc = /Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m\nvar startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m\nvar fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m\nvar evp = require('evp_bytestokey')\nvar ciphers = require('browserify-aes')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = function (okey, password) {\n var key = okey.toString()\n var match = key.match(findProc)\n var decrypted\n if (!match) {\n var match2 = key.match(fullRegex)\n decrypted = Buffer.from(match2[2].replace(/[\\r\\n]/g, ''), 'base64')\n } else {\n var suite = 'aes' + match[1]\n var iv = Buffer.from(match[2], 'hex')\n var cipherText = Buffer.from(match[3].replace(/[\\r\\n]/g, ''), 'base64')\n var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key\n var out = []\n var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)\n out.push(cipher.update(cipherText))\n out.push(cipher.final())\n decrypted = Buffer.concat(out)\n }\n var tag = key.match(startRegex)[1]\n return {\n tag: tag,\n data: decrypted\n }\n}\n","var asn1 = require('./asn1')\nvar aesid = require('./aesid.json')\nvar fixProc = require('./fixProc')\nvar ciphers = require('browserify-aes')\nvar compat = require('pbkdf2')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = parseKeys\n\nfunction parseKeys (buffer) {\n var password\n if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n password = buffer.passphrase\n buffer = buffer.key\n }\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer)\n }\n\n var stripped = fixProc(buffer, password)\n\n var type = stripped.tag\n var data = stripped.data\n var subtype, ndata\n switch (type) {\n case 'CERTIFICATE':\n ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo\n // falls through\n case 'PUBLIC KEY':\n if (!ndata) {\n ndata = asn1.PublicKey.decode(data, 'der')\n }\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')\n case '1.2.840.10045.2.1':\n ndata.subjectPrivateKey = ndata.subjectPublicKey\n return {\n type: 'ec',\n data: ndata\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')\n return {\n type: 'dsa',\n data: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'ENCRYPTED PRIVATE KEY':\n data = asn1.EncryptedPrivateKey.decode(data, 'der')\n data = decrypt(data, password)\n // falls through\n case 'PRIVATE KEY':\n ndata = asn1.PrivateKey.decode(data, 'der')\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')\n case '1.2.840.10045.2.1':\n return {\n curve: ndata.algorithm.curve,\n privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')\n return {\n type: 'dsa',\n params: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'RSA PUBLIC KEY':\n return asn1.RSAPublicKey.decode(data, 'der')\n case 'RSA PRIVATE KEY':\n return asn1.RSAPrivateKey.decode(data, 'der')\n case 'DSA PRIVATE KEY':\n return {\n type: 'dsa',\n params: asn1.DSAPrivateKey.decode(data, 'der')\n }\n case 'EC PRIVATE KEY':\n data = asn1.ECPrivateKey.decode(data, 'der')\n return {\n curve: data.parameters.value,\n privateKey: data.privateKey\n }\n default: throw new Error('unknown key type ' + type)\n }\n}\nparseKeys.signature = asn1.signature\nfunction decrypt (data, password) {\n var salt = data.algorithm.decrypt.kde.kdeparams.salt\n var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)\n var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]\n var iv = data.algorithm.decrypt.cipher.iv\n var cipherText = data.subjectPrivateKey\n var keylen = parseInt(algo.split('-')[1], 10) / 8\n var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')\n var cipher = ciphers.createDecipheriv(algo, key, iv)\n var out = []\n out.push(cipher.update(cipherText))\n out.push(cipher.final())\n return Buffer.concat(out)\n}\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar createHmac = require('create-hmac');\nvar crt = require('browserify-rsa');\nvar EC = require('elliptic').ec;\nvar BN = require('bn.js');\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nvar RSA_PKCS1_PADDING = 1;\n\nfunction sign(hash, key, hashType, signType, tag) {\n var priv = parseKeys(key);\n if (priv.curve) {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n return ecSign(hash, priv);\n } else if (priv.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong private key type'); }\n return dsaSign(hash, priv, hashType);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n if (key.padding !== undefined && key.padding !== RSA_PKCS1_PADDING) { throw new Error('illegal or unsupported padding mode'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = priv.modulus.byteLength();\n var pad = [0, 1];\n while (hash.length + pad.length + 1 < len) { pad.push(0xff); }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) { pad.push(hash[i]); }\n\n var out = crt(pad, priv);\n return out;\n}\n\nfunction ecSign(hash, priv) {\n var curveId = curves[priv.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + priv.curve.join('.')); }\n\n var curve = new EC(curveId);\n var key = curve.keyFromPrivate(priv.privateKey);\n var out = key.sign(hash);\n\n return Buffer.from(out.toDER());\n}\n\nfunction dsaSign(hash, priv, algo) {\n var x = priv.params.priv_key;\n var p = priv.params.p;\n var q = priv.params.q;\n var g = priv.params.g;\n var r = new BN(0);\n var k;\n var H = bits2int(hash, q).mod(q);\n var s = false;\n var kv = getKey(x, q, hash, algo);\n while (s === false) {\n k = makeKey(q, kv, algo);\n r = makeR(g, k, p, q);\n s = k.invm(q).imul(H.add(x.mul(r))).mod(q);\n if (s.cmpn(0) === 0) {\n s = false;\n r = new BN(0);\n }\n }\n return toDER(r, s);\n}\n\nfunction toDER(r, s) {\n r = r.toArray();\n s = s.toArray();\n\n // Pad values\n if (r[0] & 0x80) { r = [0].concat(r); }\n if (s[0] & 0x80) { s = [0].concat(s); }\n\n var total = r.length + s.length + 4;\n var res = [\n 0x30, total, 0x02, r.length\n ];\n res = res.concat(r, [0x02, s.length], s);\n return Buffer.from(res);\n}\n\nfunction getKey(x, q, hash, algo) {\n x = Buffer.from(x.toArray());\n if (x.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - x.length);\n x = Buffer.concat([zeros, x]);\n }\n var hlen = hash.length;\n var hbits = bits2octets(hash, q);\n var v = Buffer.alloc(hlen);\n v.fill(1);\n var k = Buffer.alloc(hlen);\n k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n return { k: k, v: v };\n}\n\nfunction bits2int(obits, q) {\n var bits = new BN(obits);\n var shift = (obits.length << 3) - q.bitLength();\n if (shift > 0) { bits.ishrn(shift); }\n return bits;\n}\n\nfunction bits2octets(bits, q) {\n bits = bits2int(bits, q);\n bits = bits.mod(q);\n var out = Buffer.from(bits.toArray());\n if (out.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - out.length);\n out = Buffer.concat([zeros, out]);\n }\n return out;\n}\n\nfunction makeKey(q, kv, algo) {\n var t;\n var k;\n\n do {\n t = Buffer.alloc(0);\n\n while (t.length * 8 < q.bitLength()) {\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n t = Buffer.concat([t, kv.v]);\n }\n\n k = bits2int(t, q);\n kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest();\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n } while (k.cmp(q) !== -1);\n\n return k;\n}\n\nfunction makeR(g, k, p, q) {\n return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q);\n}\n\nmodule.exports = sign;\nmodule.exports.getKey = getKey;\nmodule.exports.makeKey = makeKey;\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar BN = require('bn.js');\nvar EC = require('elliptic').ec;\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nfunction verify(sig, hash, key, signType, tag) {\n var pub = parseKeys(key);\n if (pub.type === 'ec') {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n return ecVerify(sig, hash, pub);\n } else if (pub.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong public key type'); }\n return dsaVerify(sig, hash, pub);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = pub.modulus.byteLength();\n var pad = [1];\n var padNum = 0;\n while (hash.length + pad.length + 2 < len) {\n pad.push(0xff);\n padNum += 1;\n }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) {\n pad.push(hash[i]);\n }\n pad = Buffer.from(pad);\n var red = BN.mont(pub.modulus);\n sig = new BN(sig).toRed(red);\n\n sig = sig.redPow(new BN(pub.publicExponent));\n sig = Buffer.from(sig.fromRed().toArray());\n var out = padNum < 8 ? 1 : 0;\n len = Math.min(sig.length, pad.length);\n if (sig.length !== pad.length) { out = 1; }\n\n i = -1;\n while (++i < len) { out |= sig[i] ^ pad[i]; }\n return out === 0;\n}\n\nfunction ecVerify(sig, hash, pub) {\n var curveId = curves[pub.data.algorithm.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')); }\n\n var curve = new EC(curveId);\n var pubkey = pub.data.subjectPrivateKey.data;\n\n return curve.verify(hash, sig, pubkey);\n}\n\nfunction dsaVerify(sig, hash, pub) {\n var p = pub.data.p;\n var q = pub.data.q;\n var g = pub.data.g;\n var y = pub.data.pub_key;\n var unpacked = parseKeys.signature.decode(sig, 'der');\n var s = unpacked.s;\n var r = unpacked.r;\n checkValue(s, q);\n checkValue(r, q);\n var montp = BN.mont(p);\n var w = s.invm(q);\n var v = g.toRed(montp)\n .redPow(new BN(hash).mul(w).mod(q))\n .fromRed()\n .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())\n .mod(p)\n .mod(q);\n return v.cmp(r) === 0;\n}\n\nfunction checkValue(b, q) {\n if (b.cmpn(0) <= 0) { throw new Error('invalid sig'); }\n if (b.cmp(q) >= 0) { throw new Error('invalid sig'); }\n}\n\nmodule.exports = verify;\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar createHash = require('create-hash');\nvar stream = require('readable-stream');\nvar inherits = require('inherits');\nvar sign = require('./sign');\nvar verify = require('./verify');\n\nvar algorithms = require('./algorithms.json');\nObject.keys(algorithms).forEach(function (key) {\n algorithms[key].id = Buffer.from(algorithms[key].id, 'hex');\n algorithms[key.toLowerCase()] = algorithms[key];\n});\n\nfunction Sign(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hashType = data.hash;\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Sign, stream.Writable);\n\nSign.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nSign.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nSign.prototype.sign = function signMethod(key, enc) {\n this.end();\n var hash = this._hash.digest();\n var sig = sign(hash, key, this._hashType, this._signType, this._tag);\n\n return enc ? sig.toString(enc) : sig;\n};\n\nfunction Verify(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Verify, stream.Writable);\n\nVerify.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nVerify.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nVerify.prototype.verify = function verifyMethod(key, sig, enc) {\n var sigBuffer = typeof sig === 'string' ? Buffer.from(sig, enc) : sig;\n\n this.end();\n var hash = this._hash.digest();\n return verify(sigBuffer, hash, key, this._signType, this._tag);\n};\n\nfunction createSign(algorithm) {\n return new Sign(algorithm);\n}\n\nfunction createVerify(algorithm) {\n return new Verify(algorithm);\n}\n\nmodule.exports = {\n Sign: createSign,\n Verify: createVerify,\n createSign: createSign,\n createVerify: createVerify\n};\n","var elliptic = require('elliptic')\nvar BN = require('bn.js')\n\nmodule.exports = function createECDH (curve) {\n return new ECDH(curve)\n}\n\nvar aliases = {\n secp256k1: {\n name: 'secp256k1',\n byteLength: 32\n },\n secp224r1: {\n name: 'p224',\n byteLength: 28\n },\n prime256v1: {\n name: 'p256',\n byteLength: 32\n },\n prime192v1: {\n name: 'p192',\n byteLength: 24\n },\n ed25519: {\n name: 'ed25519',\n byteLength: 32\n },\n secp384r1: {\n name: 'p384',\n byteLength: 48\n },\n secp521r1: {\n name: 'p521',\n byteLength: 66\n }\n}\n\naliases.p224 = aliases.secp224r1\naliases.p256 = aliases.secp256r1 = aliases.prime256v1\naliases.p192 = aliases.secp192r1 = aliases.prime192v1\naliases.p384 = aliases.secp384r1\naliases.p521 = aliases.secp521r1\n\nfunction ECDH (curve) {\n this.curveType = aliases[curve]\n if (!this.curveType) {\n this.curveType = {\n name: curve\n }\n }\n this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap\n this.keys = void 0\n}\n\nECDH.prototype.generateKeys = function (enc, format) {\n this.keys = this.curve.genKeyPair()\n return this.getPublicKey(enc, format)\n}\n\nECDH.prototype.computeSecret = function (other, inenc, enc) {\n inenc = inenc || 'utf8'\n if (!Buffer.isBuffer(other)) {\n other = new Buffer(other, inenc)\n }\n var otherPub = this.curve.keyFromPublic(other).getPublic()\n var out = otherPub.mul(this.keys.getPrivate()).getX()\n return formatReturnValue(out, enc, this.curveType.byteLength)\n}\n\nECDH.prototype.getPublicKey = function (enc, format) {\n var key = this.keys.getPublic(format === 'compressed', true)\n if (format === 'hybrid') {\n if (key[key.length - 1] % 2) {\n key[0] = 7\n } else {\n key[0] = 6\n }\n }\n return formatReturnValue(key, enc)\n}\n\nECDH.prototype.getPrivateKey = function (enc) {\n return formatReturnValue(this.keys.getPrivate(), enc)\n}\n\nECDH.prototype.setPublicKey = function (pub, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc)\n }\n this.keys._importPublic(pub)\n return this\n}\n\nECDH.prototype.setPrivateKey = function (priv, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc)\n }\n\n var _priv = new BN(priv)\n _priv = _priv.toString(16)\n this.keys = this.curve.genKeyPair()\n this.keys._importPrivate(_priv)\n return this\n}\n\nfunction formatReturnValue (bn, enc, len) {\n if (!Array.isArray(bn)) {\n bn = bn.toArray()\n }\n var buf = new Buffer(bn)\n if (len && buf.length < len) {\n var zeros = new Buffer(len - buf.length)\n zeros.fill(0)\n buf = Buffer.concat([zeros, buf])\n }\n if (!enc) {\n return buf\n } else {\n return buf.toString(enc)\n }\n}\n","var createHash = require('create-hash')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (seed, len) {\n var t = Buffer.alloc(0)\n var i = 0\n var c\n while (t.length < len) {\n c = i2ops(i++)\n t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])\n }\n return t.slice(0, len)\n}\n\nfunction i2ops (c) {\n var out = Buffer.allocUnsafe(4)\n out.writeUInt32BE(c, 0)\n return out\n}\n","module.exports = function xor (a, b) {\n var len = a.length\n var i = -1\n while (++i < len) {\n a[i] ^= b[i]\n }\n return a\n}\n","var BN = require('bn.js')\nvar Buffer = require('safe-buffer').Buffer\n\nfunction withPublic (paddedMsg, key) {\n return Buffer.from(paddedMsg\n .toRed(BN.mont(key.modulus))\n .redPow(new BN(key.publicExponent))\n .fromRed()\n .toArray())\n}\n\nmodule.exports = withPublic\n","var parseKeys = require('parse-asn1')\nvar randomBytes = require('randombytes')\nvar createHash = require('create-hash')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar withPublic = require('./withPublic')\nvar crt = require('browserify-rsa')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function publicEncrypt (publicKey, msg, reverse) {\n var padding\n if (publicKey.padding) {\n padding = publicKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n var key = parseKeys(publicKey)\n var paddedMsg\n if (padding === 4) {\n paddedMsg = oaep(key, msg)\n } else if (padding === 1) {\n paddedMsg = pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n paddedMsg = new BN(msg)\n if (paddedMsg.cmp(key.modulus) >= 0) {\n throw new Error('data too long for modulus')\n }\n } else {\n throw new Error('unknown padding')\n }\n if (reverse) {\n return crt(paddedMsg, key)\n } else {\n return withPublic(paddedMsg, key)\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var mLen = msg.length\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n var hLen2 = 2 * hLen\n if (mLen > k - hLen2 - 2) {\n throw new Error('message too long')\n }\n var ps = Buffer.alloc(k - mLen - hLen2 - 2)\n var dblen = k - hLen - 1\n var seed = randomBytes(hLen)\n var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))\n var maskedSeed = xor(seed, mgf(maskedDb, hLen))\n return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))\n}\nfunction pkcs1 (key, msg, reverse) {\n var mLen = msg.length\n var k = key.modulus.byteLength()\n if (mLen > k - 11) {\n throw new Error('message too long')\n }\n var ps\n if (reverse) {\n ps = Buffer.alloc(k - mLen - 3, 0xff)\n } else {\n ps = nonZero(k - mLen - 3)\n }\n return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))\n}\nfunction nonZero (len) {\n var out = Buffer.allocUnsafe(len)\n var i = 0\n var cache = randomBytes(len * 2)\n var cur = 0\n var num\n while (i < len) {\n if (cur === cache.length) {\n cache = randomBytes(len * 2)\n cur = 0\n }\n num = cache[cur++]\n if (num) {\n out[i++] = num\n }\n }\n return out\n}\n","var parseKeys = require('parse-asn1')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar crt = require('browserify-rsa')\nvar createHash = require('create-hash')\nvar withPublic = require('./withPublic')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function privateDecrypt (privateKey, enc, reverse) {\n var padding\n if (privateKey.padding) {\n padding = privateKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n\n var key = parseKeys(privateKey)\n var k = key.modulus.byteLength()\n if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {\n throw new Error('decryption error')\n }\n var msg\n if (reverse) {\n msg = withPublic(new BN(enc), key)\n } else {\n msg = crt(enc, key)\n }\n var zBuffer = Buffer.alloc(k - msg.length)\n msg = Buffer.concat([zBuffer, msg], k)\n if (padding === 4) {\n return oaep(key, msg)\n } else if (padding === 1) {\n return pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n return msg\n } else {\n throw new Error('unknown padding')\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n if (msg[0] !== 0) {\n throw new Error('decryption error')\n }\n var maskedSeed = msg.slice(1, hLen + 1)\n var maskedDb = msg.slice(hLen + 1)\n var seed = xor(maskedSeed, mgf(maskedDb, hLen))\n var db = xor(maskedDb, mgf(seed, k - hLen - 1))\n if (compare(iHash, db.slice(0, hLen))) {\n throw new Error('decryption error')\n }\n var i = hLen\n while (db[i] === 0) {\n i++\n }\n if (db[i++] !== 1) {\n throw new Error('decryption error')\n }\n return db.slice(i)\n}\n\nfunction pkcs1 (key, msg, reverse) {\n var p1 = msg.slice(0, 2)\n var i = 2\n var status = 0\n while (msg[i++] !== 0) {\n if (i >= msg.length) {\n status++\n break\n }\n }\n var ps = msg.slice(2, i - 1)\n\n if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {\n status++\n }\n if (ps.length < 8) {\n status++\n }\n if (status) {\n throw new Error('decryption error')\n }\n return msg.slice(i)\n}\nfunction compare (a, b) {\n a = Buffer.from(a)\n b = Buffer.from(b)\n var dif = 0\n var len = a.length\n if (a.length !== b.length) {\n dif++\n len = Math.min(a.length, b.length)\n }\n var i = -1\n while (++i < len) {\n dif += (a[i] ^ b[i])\n }\n return dif\n}\n","exports.publicEncrypt = require('./publicEncrypt')\nexports.privateDecrypt = require('./privateDecrypt')\n\nexports.privateEncrypt = function privateEncrypt (key, buf) {\n return exports.publicEncrypt(key, buf, true)\n}\n\nexports.publicDecrypt = function publicDecrypt (key, buf) {\n return exports.privateDecrypt(key, buf, true)\n}\n","'use strict'\n\nfunction oldBrowser () {\n throw new Error('secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11')\n}\nvar safeBuffer = require('safe-buffer')\nvar randombytes = require('randombytes')\nvar Buffer = safeBuffer.Buffer\nvar kBufferMaxLength = safeBuffer.kMaxLength\nvar crypto = global.crypto || global.msCrypto\nvar kMaxUint32 = Math.pow(2, 32) - 1\nfunction assertOffset (offset, length) {\n if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare\n throw new TypeError('offset must be a number')\n }\n\n if (offset > kMaxUint32 || offset < 0) {\n throw new TypeError('offset must be a uint32')\n }\n\n if (offset > kBufferMaxLength || offset > length) {\n throw new RangeError('offset out of range')\n }\n}\n\nfunction assertSize (size, offset, length) {\n if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare\n throw new TypeError('size must be a number')\n }\n\n if (size > kMaxUint32 || size < 0) {\n throw new TypeError('size must be a uint32')\n }\n\n if (size + offset > length || size > kBufferMaxLength) {\n throw new RangeError('buffer too small')\n }\n}\nif ((crypto && crypto.getRandomValues) || !process.browser) {\n exports.randomFill = randomFill\n exports.randomFillSync = randomFillSync\n} else {\n exports.randomFill = oldBrowser\n exports.randomFillSync = oldBrowser\n}\nfunction randomFill (buf, offset, size, cb) {\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n if (typeof offset === 'function') {\n cb = offset\n offset = 0\n size = buf.length\n } else if (typeof size === 'function') {\n cb = size\n size = buf.length - offset\n } else if (typeof cb !== 'function') {\n throw new TypeError('\"cb\" argument must be a function')\n }\n assertOffset(offset, buf.length)\n assertSize(size, offset, buf.length)\n return actualFill(buf, offset, size, cb)\n}\n\nfunction actualFill (buf, offset, size, cb) {\n if (process.browser) {\n var ourBuf = buf.buffer\n var uint = new Uint8Array(ourBuf, offset, size)\n crypto.getRandomValues(uint)\n if (cb) {\n process.nextTick(function () {\n cb(null, buf)\n })\n return\n }\n return buf\n }\n if (cb) {\n randombytes(size, function (err, bytes) {\n if (err) {\n return cb(err)\n }\n bytes.copy(buf, offset)\n cb(null, buf)\n })\n return\n }\n var bytes = randombytes(size)\n bytes.copy(buf, offset)\n return buf\n}\nfunction randomFillSync (buf, offset, size) {\n if (typeof offset === 'undefined') {\n offset = 0\n }\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n assertOffset(offset, buf.length)\n\n if (size === undefined) size = buf.length - offset\n\n assertSize(size, offset, buf.length)\n\n return actualFill(buf, offset, size)\n}\n","'use strict'\n\nexports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')\nexports.createHash = exports.Hash = require('create-hash')\nexports.createHmac = exports.Hmac = require('create-hmac')\n\nvar algos = require('browserify-sign/algos')\nvar algoKeys = Object.keys(algos)\nvar hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)\nexports.getHashes = function () {\n return hashes\n}\n\nvar p = require('pbkdf2')\nexports.pbkdf2 = p.pbkdf2\nexports.pbkdf2Sync = p.pbkdf2Sync\n\nvar aes = require('browserify-cipher')\n\nexports.Cipher = aes.Cipher\nexports.createCipher = aes.createCipher\nexports.Cipheriv = aes.Cipheriv\nexports.createCipheriv = aes.createCipheriv\nexports.Decipher = aes.Decipher\nexports.createDecipher = aes.createDecipher\nexports.Decipheriv = aes.Decipheriv\nexports.createDecipheriv = aes.createDecipheriv\nexports.getCiphers = aes.getCiphers\nexports.listCiphers = aes.listCiphers\n\nvar dh = require('diffie-hellman')\n\nexports.DiffieHellmanGroup = dh.DiffieHellmanGroup\nexports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup\nexports.getDiffieHellman = dh.getDiffieHellman\nexports.createDiffieHellman = dh.createDiffieHellman\nexports.DiffieHellman = dh.DiffieHellman\n\nvar sign = require('browserify-sign')\n\nexports.createSign = sign.createSign\nexports.Sign = sign.Sign\nexports.createVerify = sign.createVerify\nexports.Verify = sign.Verify\n\nexports.createECDH = require('create-ecdh')\n\nvar publicEncrypt = require('public-encrypt')\n\nexports.publicEncrypt = publicEncrypt.publicEncrypt\nexports.privateEncrypt = publicEncrypt.privateEncrypt\nexports.publicDecrypt = publicEncrypt.publicDecrypt\nexports.privateDecrypt = publicEncrypt.privateDecrypt\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\n// ;[\n// 'createCredentials'\n// ].forEach(function (name) {\n// exports[name] = function () {\n// throw new Error([\n// 'sorry, ' + name + ' is not implemented yet',\n// 'we accept pull requests',\n// 'https://github.com/crypto-browserify/crypto-browserify'\n// ].join('\\n'))\n// }\n// })\n\nvar rf = require('randomfill')\n\nexports.randomFill = rf.randomFill\nexports.randomFillSync = rf.randomFillSync\n\nexports.createCredentials = function () {\n throw new Error([\n 'sorry, createCredentials is not implemented yet',\n 'we accept pull requests',\n 'https://github.com/crypto-browserify/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.constants = {\n 'DH_CHECK_P_NOT_SAFE_PRIME': 2,\n 'DH_CHECK_P_NOT_PRIME': 1,\n 'DH_UNABLE_TO_CHECK_GENERATOR': 4,\n 'DH_NOT_SUITABLE_GENERATOR': 8,\n 'NPN_ENABLED': 1,\n 'ALPN_ENABLED': 1,\n 'RSA_PKCS1_PADDING': 1,\n 'RSA_SSLV23_PADDING': 2,\n 'RSA_NO_PADDING': 3,\n 'RSA_PKCS1_OAEP_PADDING': 4,\n 'RSA_X931_PADDING': 5,\n 'RSA_PKCS1_PSS_PADDING': 6,\n 'POINT_CONVERSION_COMPRESSED': 2,\n 'POINT_CONVERSION_UNCOMPRESSED': 4,\n 'POINT_CONVERSION_HYBRID': 6\n}\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeRandomSource = void 0;\nconst wipe_1 = require(\"@stablelib/wipe\");\nclass NodeRandomSource {\n constructor() {\n this.isAvailable = false;\n this.isInstantiated = false;\n if (typeof require !== \"undefined\") {\n const nodeCrypto = require(\"crypto\");\n if (nodeCrypto && nodeCrypto.randomBytes) {\n this._crypto = nodeCrypto;\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n }\n randomBytes(length) {\n if (!this.isAvailable || !this._crypto) {\n throw new Error(\"Node.js random byte generator is not available.\");\n }\n // Get random bytes (result is Buffer).\n let buffer = this._crypto.randomBytes(length);\n // Make sure we got the length that we requested.\n if (buffer.length !== length) {\n throw new Error(\"NodeRandomSource: got fewer bytes than requested\");\n }\n // Allocate output array.\n const out = new Uint8Array(length);\n // Copy bytes from buffer to output.\n for (let i = 0; i < out.length; i++) {\n out[i] = buffer[i];\n }\n // Cleanup.\n (0, wipe_1.wipe)(buffer);\n return out;\n }\n}\nexports.NodeRandomSource = NodeRandomSource;\n//# sourceMappingURL=node.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemRandomSource = void 0;\nconst browser_1 = require(\"./browser\");\nconst node_1 = require(\"./node\");\nclass SystemRandomSource {\n constructor() {\n this.isAvailable = false;\n this.name = \"\";\n // Try browser.\n this._source = new browser_1.BrowserRandomSource();\n if (this._source.isAvailable) {\n this.isAvailable = true;\n this.name = \"Browser\";\n return;\n }\n // If no browser source, try Node.\n this._source = new node_1.NodeRandomSource();\n if (this._source.isAvailable) {\n this.isAvailable = true;\n this.name = \"Node\";\n return;\n }\n // No sources, we're out of options.\n }\n randomBytes(length) {\n if (!this.isAvailable) {\n throw new Error(\"System random byte generator is not available.\");\n }\n return this._source.randomBytes(length);\n }\n}\nexports.SystemRandomSource = SystemRandomSource;\n//# sourceMappingURL=system.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomStringForEntropy = exports.randomString = exports.randomUint32 = exports.randomBytes = exports.defaultRandomSource = void 0;\nconst system_1 = require(\"./source/system\");\nconst binary_1 = require(\"@stablelib/binary\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.defaultRandomSource = new system_1.SystemRandomSource();\nfunction randomBytes(length, prng = exports.defaultRandomSource) {\n return prng.randomBytes(length);\n}\nexports.randomBytes = randomBytes;\n/**\n * Returns a uniformly random unsigned 32-bit integer.\n */\nfunction randomUint32(prng = exports.defaultRandomSource) {\n // Generate 4-byte random buffer.\n const buf = randomBytes(4, prng);\n // Convert bytes from buffer into a 32-bit integer.\n // It's not important which byte order to use, since\n // the result is random.\n const result = (0, binary_1.readUint32LE)(buf);\n // Clean the buffer.\n (0, wipe_1.wipe)(buf);\n return result;\n}\nexports.randomUint32 = randomUint32;\n/** 62 alphanumeric characters for default charset of randomString() */\nconst ALPHANUMERIC = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n/**\n * Returns a uniform random string of the given length\n * with characters from the given charset.\n *\n * Charset must not have more than 256 characters.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomString(length, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {\n if (charset.length < 2) {\n throw new Error(\"randomString charset is too short\");\n }\n if (charset.length > 256) {\n throw new Error(\"randomString charset is too long\");\n }\n let out = '';\n const charsLen = charset.length;\n const maxByte = 256 - (256 % charsLen);\n while (length > 0) {\n const buf = randomBytes(Math.ceil(length * 256 / maxByte), prng);\n for (let i = 0; i < buf.length && length > 0; i++) {\n const randomByte = buf[i];\n if (randomByte < maxByte) {\n out += charset.charAt(randomByte % charsLen);\n length--;\n }\n }\n (0, wipe_1.wipe)(buf);\n }\n return out;\n}\nexports.randomString = randomString;\n/**\n * Returns uniform random string containing at least the given\n * number of bits of entropy.\n *\n * For example, randomStringForEntropy(128) will return a 22-character\n * alphanumeric string, while randomStringForEntropy(128, \"0123456789\")\n * will return a 39-character numeric string, both will contain at\n * least 128 bits of entropy.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomStringForEntropy(bits, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {\n const length = Math.ceil(bits / (Math.log(charset.length) / Math.LN2));\n return randomString(length, charset, prng);\n}\nexports.randomStringForEntropy = randomStringForEntropy;\n//# sourceMappingURL=random.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 32;\nexports.BLOCK_SIZE = 64;\n/**\n * SHA2-256 cryptographic hash algorithm.\n */\nvar SHA256 = /** @class */ (function () {\n function SHA256() {\n /** Length of hash output */\n this.digestLength = exports.DIGEST_LENGTH;\n /** Block size */\n this.blockSize = exports.BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this._state = new Int32Array(8); // hash state\n this._temp = new Int32Array(64); // temporary state\n this._buffer = new Uint8Array(128); // buffer for data to hash\n this._bufferLength = 0; // number of bytes in buffer\n this._bytesHashed = 0; // number of total bytes hashed\n this._finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n SHA256.prototype._initState = function () {\n this._state[0] = 0x6a09e667;\n this._state[1] = 0xbb67ae85;\n this._state[2] = 0x3c6ef372;\n this._state[3] = 0xa54ff53a;\n this._state[4] = 0x510e527f;\n this._state[5] = 0x9b05688c;\n this._state[6] = 0x1f83d9ab;\n this._state[7] = 0x5be0cd19;\n };\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n SHA256.prototype.reset = function () {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n };\n /**\n * Cleans internal buffers and resets hash state.\n */\n SHA256.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._temp);\n this.reset();\n };\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n SHA256.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this._finished) {\n throw new Error(\"SHA256: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < this.blockSize && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._temp, this._state, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._temp, this._state, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n SHA256.prototype.finish = function (out) {\n if (!this._finished) {\n var bytesHashed = this._bytesHashed;\n var left = this._bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 64 < 56) ? 64 : 128;\n this._buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);\n binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._temp, this._state, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (var i = 0; i < this.digestLength / 4; i++) {\n binary_1.writeUint32BE(this._state[i], out, i * 4);\n }\n return this;\n };\n /**\n * Returns the final hash digest.\n */\n SHA256.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization.\n * Returns hash state to be used with restoreState().\n * Only chain value is saved, not buffers or other\n * state variables.\n */\n SHA256.prototype.saveState = function () {\n if (this._finished) {\n throw new Error(\"SHA256: cannot save finished state\");\n }\n return {\n state: new Int32Array(this._state),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization.\n * Restores state saved by saveState() and sets bytesHashed\n * to the given value.\n */\n SHA256.prototype.restoreState = function (savedState) {\n this._state.set(savedState.state);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n };\n /**\n * Cleans state returned by saveState().\n */\n SHA256.prototype.cleanSavedState = function (savedState) {\n wipe_1.wipe(savedState.state);\n if (savedState.buffer) {\n wipe_1.wipe(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n };\n return SHA256;\n}());\nexports.SHA256 = SHA256;\n// Constants\nvar K = new Int32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\nfunction hashBlocks(w, v, p, pos, len) {\n while (len >= 64) {\n var a = v[0];\n var b = v[1];\n var c = v[2];\n var d = v[3];\n var e = v[4];\n var f = v[5];\n var g = v[6];\n var h = v[7];\n for (var i = 0; i < 16; i++) {\n var j = pos + i * 4;\n w[i] = binary_1.readUint32BE(p, j);\n }\n for (var i = 16; i < 64; i++) {\n var u = w[i - 2];\n var t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);\n u = w[i - 15];\n var t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);\n w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);\n }\n for (var i = 0; i < 64; i++) {\n var t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^\n (e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n var t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^\n (a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n v[0] += a;\n v[1] += b;\n v[2] += c;\n v[3] += d;\n v[4] += e;\n v[5] += f;\n v[6] += g;\n v[7] += h;\n pos += 64;\n len -= 64;\n }\n return pos;\n}\nfunction hash(data) {\n var h = new SHA256();\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n//# sourceMappingURL=sha256.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sharedKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.scalarMultBase = exports.scalarMult = exports.SHARED_KEY_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = void 0;\n/**\n * Package x25519 implements X25519 key agreement.\n */\nconst random_1 = require(\"@stablelib/random\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.PUBLIC_KEY_LENGTH = 32;\nexports.SECRET_KEY_LENGTH = 32;\nexports.SHARED_KEY_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst _121665 = gf([0xdb41, 1]);\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, inp) {\n const c = gf();\n for (let i = 0; i < 16; i++) {\n c[i] = inp[i];\n }\n for (let i = 253; i >= 0; i--) {\n square(c, c);\n if (i !== 2 && i !== 4) {\n mul(c, c, inp);\n }\n }\n for (let i = 0; i < 16; i++) {\n o[i] = c[i];\n }\n}\nfunction scalarMult(n, p) {\n const z = new Uint8Array(32);\n const x = new Float64Array(80);\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf();\n for (let i = 0; i < 31; i++) {\n z[i] = n[i];\n }\n z[31] = (n[31] & 127) | 64;\n z[0] &= 248;\n unpack25519(x, p);\n for (let i = 0; i < 16; i++) {\n b[i] = x[i];\n }\n a[0] = d[0] = 1;\n for (let i = 254; i >= 0; --i) {\n const r = (z[i >>> 3] >>> (i & 7)) & 1;\n sel25519(a, b, r);\n sel25519(c, d, r);\n add(e, a, c);\n sub(a, a, c);\n add(c, b, d);\n sub(b, b, d);\n square(d, e);\n square(f, a);\n mul(a, c, a);\n mul(c, b, e);\n add(e, a, c);\n sub(a, a, c);\n square(b, a);\n sub(c, d, f);\n mul(a, c, _121665);\n add(a, a, d);\n mul(c, c, a);\n mul(a, d, f);\n mul(d, b, x);\n square(b, e);\n sel25519(a, b, r);\n sel25519(c, d, r);\n }\n for (let i = 0; i < 16; i++) {\n x[i + 16] = a[i];\n x[i + 32] = c[i];\n x[i + 48] = b[i];\n x[i + 64] = d[i];\n }\n const x32 = x.subarray(32);\n const x16 = x.subarray(16);\n inv25519(x32, x32);\n mul(x16, x16, x32);\n const q = new Uint8Array(32);\n pack25519(q, x16);\n return q;\n}\nexports.scalarMult = scalarMult;\nfunction scalarMultBase(n) {\n return scalarMult(n, _9);\n}\nexports.scalarMultBase = scalarMultBase;\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== exports.SECRET_KEY_LENGTH) {\n throw new Error(`x25519: seed must be ${exports.SECRET_KEY_LENGTH} bytes`);\n }\n const secretKey = new Uint8Array(seed);\n const publicKey = scalarMultBase(secretKey);\n return {\n publicKey,\n secretKey\n };\n}\nexports.generateKeyPairFromSeed = generateKeyPairFromSeed;\nfunction generateKeyPair(prng) {\n const seed = (0, random_1.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0, wipe_1.wipe)(seed);\n return result;\n}\nexports.generateKeyPair = generateKeyPair;\n/**\n * Returns a shared key between our secret key and a peer's public key.\n *\n * Throws an error if the given keys are of wrong length.\n *\n * If rejectZero is true throws if the calculated shared key is all-zero.\n * From RFC 7748:\n *\n * > Protocol designers using Diffie-Hellman over the curves defined in\n * > this document must not assume \"contributory behavior\". Specially,\n * > contributory behavior means that both parties' private keys\n * > contribute to the resulting shared key. Since curve25519 and\n * > curve448 have cofactors of 8 and 4 (respectively), an input point of\n * > small order will eliminate any contribution from the other party's\n * > private key. This situation can be detected by checking for the all-\n * > zero output, which implementations MAY do, as specified in Section 6.\n * > However, a large number of existing implementations do not do this.\n *\n * IMPORTANT: the returned key is a raw result of scalar multiplication.\n * To use it as a key material, hash it with a cryptographic hash function.\n */\nfunction sharedKey(mySecretKey, theirPublicKey, rejectZero = false) {\n if (mySecretKey.length !== exports.PUBLIC_KEY_LENGTH) {\n throw new Error(\"X25519: incorrect secret key length\");\n }\n if (theirPublicKey.length !== exports.PUBLIC_KEY_LENGTH) {\n throw new Error(\"X25519: incorrect public key length\");\n }\n const result = scalarMult(mySecretKey, theirPublicKey);\n if (rejectZero) {\n let zeros = 0;\n for (let i = 0; i < result.length; i++) {\n zeros |= result[i];\n }\n if (zeros === 0) {\n throw new Error(\"X25519: invalid shared key\");\n }\n }\n return result;\n}\nexports.sharedKey = sharedKey;\n//# sourceMappingURL=x25519.js.map","export function asUint8Array(buf) {\n if (globalThis.Buffer != null) {\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n return buf;\n}","import { asUint8Array } from './util/as-uint8array.js';\nexport function alloc(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.alloc != null) {\n return asUint8Array(globalThis.Buffer.alloc(size));\n }\n return new Uint8Array(size);\n}\nexport function allocUnsafe(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {\n return asUint8Array(globalThis.Buffer.allocUnsafe(size));\n }\n return new Uint8Array(size);\n}","import { allocUnsafe } from './alloc.js';\nimport { asUint8Array } from './util/as-uint8array.js';\nexport function concat(arrays, length) {\n if (!length) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = allocUnsafe(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return asUint8Array(output);\n}","function base(ALPHABET, name) {\n if (ALPHABET.length >= 255) {\n throw new TypeError('Alphabet too long');\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + ' is ambiguous');\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (source instanceof Uint8Array);\n else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source);\n }\n if (!(source instanceof Uint8Array)) {\n throw new TypeError('Expected Uint8Array');\n }\n if (source.length === 0) {\n return '';\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i = 0;\n for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== 'string') {\n throw new TypeError('Expected String');\n }\n if (source.length === 0) {\n return new Uint8Array();\n }\n var psz = 0;\n if (source[psz] === ' ') {\n return;\n }\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (source[psz]) {\n var carry = BASE_MAP[source.charCodeAt(psz)];\n if (carry === 255) {\n return;\n }\n var i = 0;\n for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n psz++;\n }\n if (source[psz] === ' ') {\n return;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = new Uint8Array(zeroes + (size - it4));\n var j = zeroes;\n while (it4 !== size) {\n vch[j++] = b256[it4++];\n }\n return vch;\n }\n function decode(string) {\n var buffer = decodeUnsafe(string);\n if (buffer) {\n return buffer;\n }\n throw new Error(`Non-${ name } character`);\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n };\n}\nvar src = base;\nvar _brrp__multiformats_scope_baseX = src;\nexport default _brrp__multiformats_scope_baseX;","const empty = new Uint8Array(0);\nconst toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '');\nconst fromHex = hex => {\n const hexes = hex.match(/../g);\n return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty;\n};\nconst equals = (aa, bb) => {\n if (aa === bb)\n return true;\n if (aa.byteLength !== bb.byteLength) {\n return false;\n }\n for (let ii = 0; ii < aa.byteLength; ii++) {\n if (aa[ii] !== bb[ii]) {\n return false;\n }\n }\n return true;\n};\nconst coerce = o => {\n if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array')\n return o;\n if (o instanceof ArrayBuffer)\n return new Uint8Array(o);\n if (ArrayBuffer.isView(o)) {\n return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);\n }\n throw new Error('Unknown type, must be binary type');\n};\nconst isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o);\nconst fromString = str => new TextEncoder().encode(str);\nconst toString = b => new TextDecoder().decode(b);\nexport {\n equals,\n coerce,\n isBinary,\n fromHex,\n toHex,\n fromString,\n toString,\n empty\n};","import basex from '../../vendor/base-x.js';\nimport { coerce } from '../bytes.js';\nclass Encoder {\n constructor(name, prefix, baseEncode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n }\n encode(bytes) {\n if (bytes instanceof Uint8Array) {\n return `${ this.prefix }${ this.baseEncode(bytes) }`;\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}\nclass Decoder {\n constructor(name, prefix, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n if (prefix.codePointAt(0) === undefined) {\n throw new Error('Invalid prefix character');\n }\n this.prefixCodePoint = prefix.codePointAt(0);\n this.baseDecode = baseDecode;\n }\n decode(text) {\n if (typeof text === 'string') {\n if (text.codePointAt(0) !== this.prefixCodePoint) {\n throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`);\n }\n return this.baseDecode(text.slice(this.prefix.length));\n } else {\n throw Error('Can only multibase decode strings');\n }\n }\n or(decoder) {\n return or(this, decoder);\n }\n}\nclass ComposedDecoder {\n constructor(decoders) {\n this.decoders = decoders;\n }\n or(decoder) {\n return or(this, decoder);\n }\n decode(input) {\n const prefix = input[0];\n const decoder = this.decoders[prefix];\n if (decoder) {\n return decoder.decode(input);\n } else {\n throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`);\n }\n }\n}\nexport const or = (left, right) => new ComposedDecoder({\n ...left.decoders || { [left.prefix]: left },\n ...right.decoders || { [right.prefix]: right }\n});\nexport class Codec {\n constructor(name, prefix, baseEncode, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n this.baseDecode = baseDecode;\n this.encoder = new Encoder(name, prefix, baseEncode);\n this.decoder = new Decoder(name, prefix, baseDecode);\n }\n encode(input) {\n return this.encoder.encode(input);\n }\n decode(input) {\n return this.decoder.decode(input);\n }\n}\nexport const from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode);\nexport const baseX = ({prefix, name, alphabet}) => {\n const {encode, decode} = basex(alphabet, name);\n return from({\n prefix,\n name,\n encode,\n decode: text => coerce(decode(text))\n });\n};\nconst decode = (string, alphabet, bitsPerChar, name) => {\n const codes = {};\n for (let i = 0; i < alphabet.length; ++i) {\n codes[alphabet[i]] = i;\n }\n let end = string.length;\n while (string[end - 1] === '=') {\n --end;\n }\n const out = new Uint8Array(end * bitsPerChar / 8 | 0);\n let bits = 0;\n let buffer = 0;\n let written = 0;\n for (let i = 0; i < end; ++i) {\n const value = codes[string[i]];\n if (value === undefined) {\n throw new SyntaxError(`Non-${ name } character`);\n }\n buffer = buffer << bitsPerChar | value;\n bits += bitsPerChar;\n if (bits >= 8) {\n bits -= 8;\n out[written++] = 255 & buffer >> bits;\n }\n }\n if (bits >= bitsPerChar || 255 & buffer << 8 - bits) {\n throw new SyntaxError('Unexpected end of data');\n }\n return out;\n};\nconst encode = (data, alphabet, bitsPerChar) => {\n const pad = alphabet[alphabet.length - 1] === '=';\n const mask = (1 << bitsPerChar) - 1;\n let out = '';\n let bits = 0;\n let buffer = 0;\n for (let i = 0; i < data.length; ++i) {\n buffer = buffer << 8 | data[i];\n bits += 8;\n while (bits > bitsPerChar) {\n bits -= bitsPerChar;\n out += alphabet[mask & buffer >> bits];\n }\n }\n if (bits) {\n out += alphabet[mask & buffer << bitsPerChar - bits];\n }\n if (pad) {\n while (out.length * bitsPerChar & 7) {\n out += '=';\n }\n }\n return out;\n};\nexport const rfc4648 = ({name, prefix, bitsPerChar, alphabet}) => {\n return from({\n prefix,\n name,\n encode(input) {\n return encode(input, alphabet, bitsPerChar);\n },\n decode(input) {\n return decode(input, alphabet, bitsPerChar, name);\n }\n });\n};","import { from } from './base.js';\nimport {\n fromString,\n toString\n} from '../bytes.js';\nexport const identity = from({\n prefix: '\\0',\n name: 'identity',\n encode: buf => toString(buf),\n decode: str => fromString(str)\n});","import { rfc4648 } from './base.js';\nexport const base2 = rfc4648({\n prefix: '0',\n name: 'base2',\n alphabet: '01',\n bitsPerChar: 1\n});","import { rfc4648 } from './base.js';\nexport const base8 = rfc4648({\n prefix: '7',\n name: 'base8',\n alphabet: '01234567',\n bitsPerChar: 3\n});","import { baseX } from './base.js';\nexport const base10 = baseX({\n prefix: '9',\n name: 'base10',\n alphabet: '0123456789'\n});","import { rfc4648 } from './base.js';\nexport const base16 = rfc4648({\n prefix: 'f',\n name: 'base16',\n alphabet: '0123456789abcdef',\n bitsPerChar: 4\n});\nexport const base16upper = rfc4648({\n prefix: 'F',\n name: 'base16upper',\n alphabet: '0123456789ABCDEF',\n bitsPerChar: 4\n});","import { rfc4648 } from './base.js';\nexport const base32 = rfc4648({\n prefix: 'b',\n name: 'base32',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567',\n bitsPerChar: 5\n});\nexport const base32upper = rfc4648({\n prefix: 'B',\n name: 'base32upper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',\n bitsPerChar: 5\n});\nexport const base32pad = rfc4648({\n prefix: 'c',\n name: 'base32pad',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',\n bitsPerChar: 5\n});\nexport const base32padupper = rfc4648({\n prefix: 'C',\n name: 'base32padupper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',\n bitsPerChar: 5\n});\nexport const base32hex = rfc4648({\n prefix: 'v',\n name: 'base32hex',\n alphabet: '0123456789abcdefghijklmnopqrstuv',\n bitsPerChar: 5\n});\nexport const base32hexupper = rfc4648({\n prefix: 'V',\n name: 'base32hexupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',\n bitsPerChar: 5\n});\nexport const base32hexpad = rfc4648({\n prefix: 't',\n name: 'base32hexpad',\n alphabet: '0123456789abcdefghijklmnopqrstuv=',\n bitsPerChar: 5\n});\nexport const base32hexpadupper = rfc4648({\n prefix: 'T',\n name: 'base32hexpadupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',\n bitsPerChar: 5\n});\nexport const base32z = rfc4648({\n prefix: 'h',\n name: 'base32z',\n alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',\n bitsPerChar: 5\n});","import { baseX } from './base.js';\nexport const base36 = baseX({\n prefix: 'k',\n name: 'base36',\n alphabet: '0123456789abcdefghijklmnopqrstuvwxyz'\n});\nexport const base36upper = baseX({\n prefix: 'K',\n name: 'base36upper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n});","import { baseX } from './base.js';\nexport const base58btc = baseX({\n name: 'base58btc',\n prefix: 'z',\n alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n});\nexport const base58flickr = baseX({\n name: 'base58flickr',\n prefix: 'Z',\n alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'\n});","import { rfc4648 } from './base.js';\nexport const base64 = rfc4648({\n prefix: 'm',\n name: 'base64',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n bitsPerChar: 6\n});\nexport const base64pad = rfc4648({\n prefix: 'M',\n name: 'base64pad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n bitsPerChar: 6\n});\nexport const base64url = rfc4648({\n prefix: 'u',\n name: 'base64url',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n bitsPerChar: 6\n});\nexport const base64urlpad = rfc4648({\n prefix: 'U',\n name: 'base64urlpad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',\n bitsPerChar: 6\n});","import { from } from './base.js';\nconst alphabet = Array.from('\\uD83D\\uDE80\\uD83E\\uDE90\\u2604\\uD83D\\uDEF0\\uD83C\\uDF0C\\uD83C\\uDF11\\uD83C\\uDF12\\uD83C\\uDF13\\uD83C\\uDF14\\uD83C\\uDF15\\uD83C\\uDF16\\uD83C\\uDF17\\uD83C\\uDF18\\uD83C\\uDF0D\\uD83C\\uDF0F\\uD83C\\uDF0E\\uD83D\\uDC09\\u2600\\uD83D\\uDCBB\\uD83D\\uDDA5\\uD83D\\uDCBE\\uD83D\\uDCBF\\uD83D\\uDE02\\u2764\\uD83D\\uDE0D\\uD83E\\uDD23\\uD83D\\uDE0A\\uD83D\\uDE4F\\uD83D\\uDC95\\uD83D\\uDE2D\\uD83D\\uDE18\\uD83D\\uDC4D\\uD83D\\uDE05\\uD83D\\uDC4F\\uD83D\\uDE01\\uD83D\\uDD25\\uD83E\\uDD70\\uD83D\\uDC94\\uD83D\\uDC96\\uD83D\\uDC99\\uD83D\\uDE22\\uD83E\\uDD14\\uD83D\\uDE06\\uD83D\\uDE44\\uD83D\\uDCAA\\uD83D\\uDE09\\u263A\\uD83D\\uDC4C\\uD83E\\uDD17\\uD83D\\uDC9C\\uD83D\\uDE14\\uD83D\\uDE0E\\uD83D\\uDE07\\uD83C\\uDF39\\uD83E\\uDD26\\uD83C\\uDF89\\uD83D\\uDC9E\\u270C\\u2728\\uD83E\\uDD37\\uD83D\\uDE31\\uD83D\\uDE0C\\uD83C\\uDF38\\uD83D\\uDE4C\\uD83D\\uDE0B\\uD83D\\uDC97\\uD83D\\uDC9A\\uD83D\\uDE0F\\uD83D\\uDC9B\\uD83D\\uDE42\\uD83D\\uDC93\\uD83E\\uDD29\\uD83D\\uDE04\\uD83D\\uDE00\\uD83D\\uDDA4\\uD83D\\uDE03\\uD83D\\uDCAF\\uD83D\\uDE48\\uD83D\\uDC47\\uD83C\\uDFB6\\uD83D\\uDE12\\uD83E\\uDD2D\\u2763\\uD83D\\uDE1C\\uD83D\\uDC8B\\uD83D\\uDC40\\uD83D\\uDE2A\\uD83D\\uDE11\\uD83D\\uDCA5\\uD83D\\uDE4B\\uD83D\\uDE1E\\uD83D\\uDE29\\uD83D\\uDE21\\uD83E\\uDD2A\\uD83D\\uDC4A\\uD83E\\uDD73\\uD83D\\uDE25\\uD83E\\uDD24\\uD83D\\uDC49\\uD83D\\uDC83\\uD83D\\uDE33\\u270B\\uD83D\\uDE1A\\uD83D\\uDE1D\\uD83D\\uDE34\\uD83C\\uDF1F\\uD83D\\uDE2C\\uD83D\\uDE43\\uD83C\\uDF40\\uD83C\\uDF37\\uD83D\\uDE3B\\uD83D\\uDE13\\u2B50\\u2705\\uD83E\\uDD7A\\uD83C\\uDF08\\uD83D\\uDE08\\uD83E\\uDD18\\uD83D\\uDCA6\\u2714\\uD83D\\uDE23\\uD83C\\uDFC3\\uD83D\\uDC90\\u2639\\uD83C\\uDF8A\\uD83D\\uDC98\\uD83D\\uDE20\\u261D\\uD83D\\uDE15\\uD83C\\uDF3A\\uD83C\\uDF82\\uD83C\\uDF3B\\uD83D\\uDE10\\uD83D\\uDD95\\uD83D\\uDC9D\\uD83D\\uDE4A\\uD83D\\uDE39\\uD83D\\uDDE3\\uD83D\\uDCAB\\uD83D\\uDC80\\uD83D\\uDC51\\uD83C\\uDFB5\\uD83E\\uDD1E\\uD83D\\uDE1B\\uD83D\\uDD34\\uD83D\\uDE24\\uD83C\\uDF3C\\uD83D\\uDE2B\\u26BD\\uD83E\\uDD19\\u2615\\uD83C\\uDFC6\\uD83E\\uDD2B\\uD83D\\uDC48\\uD83D\\uDE2E\\uD83D\\uDE46\\uD83C\\uDF7B\\uD83C\\uDF43\\uD83D\\uDC36\\uD83D\\uDC81\\uD83D\\uDE32\\uD83C\\uDF3F\\uD83E\\uDDE1\\uD83C\\uDF81\\u26A1\\uD83C\\uDF1E\\uD83C\\uDF88\\u274C\\u270A\\uD83D\\uDC4B\\uD83D\\uDE30\\uD83E\\uDD28\\uD83D\\uDE36\\uD83E\\uDD1D\\uD83D\\uDEB6\\uD83D\\uDCB0\\uD83C\\uDF53\\uD83D\\uDCA2\\uD83E\\uDD1F\\uD83D\\uDE41\\uD83D\\uDEA8\\uD83D\\uDCA8\\uD83E\\uDD2C\\u2708\\uD83C\\uDF80\\uD83C\\uDF7A\\uD83E\\uDD13\\uD83D\\uDE19\\uD83D\\uDC9F\\uD83C\\uDF31\\uD83D\\uDE16\\uD83D\\uDC76\\uD83E\\uDD74\\u25B6\\u27A1\\u2753\\uD83D\\uDC8E\\uD83D\\uDCB8\\u2B07\\uD83D\\uDE28\\uD83C\\uDF1A\\uD83E\\uDD8B\\uD83D\\uDE37\\uD83D\\uDD7A\\u26A0\\uD83D\\uDE45\\uD83D\\uDE1F\\uD83D\\uDE35\\uD83D\\uDC4E\\uD83E\\uDD32\\uD83E\\uDD20\\uD83E\\uDD27\\uD83D\\uDCCC\\uD83D\\uDD35\\uD83D\\uDC85\\uD83E\\uDDD0\\uD83D\\uDC3E\\uD83C\\uDF52\\uD83D\\uDE17\\uD83E\\uDD11\\uD83C\\uDF0A\\uD83E\\uDD2F\\uD83D\\uDC37\\u260E\\uD83D\\uDCA7\\uD83D\\uDE2F\\uD83D\\uDC86\\uD83D\\uDC46\\uD83C\\uDFA4\\uD83D\\uDE47\\uD83C\\uDF51\\u2744\\uD83C\\uDF34\\uD83D\\uDCA3\\uD83D\\uDC38\\uD83D\\uDC8C\\uD83D\\uDCCD\\uD83E\\uDD40\\uD83E\\uDD22\\uD83D\\uDC45\\uD83D\\uDCA1\\uD83D\\uDCA9\\uD83D\\uDC50\\uD83D\\uDCF8\\uD83D\\uDC7B\\uD83E\\uDD10\\uD83E\\uDD2E\\uD83C\\uDFBC\\uD83E\\uDD75\\uD83D\\uDEA9\\uD83C\\uDF4E\\uD83C\\uDF4A\\uD83D\\uDC7C\\uD83D\\uDC8D\\uD83D\\uDCE3\\uD83E\\uDD42');\nconst alphabetBytesToChars = alphabet.reduce((p, c, i) => {\n p[i] = c;\n return p;\n}, []);\nconst alphabetCharsToBytes = alphabet.reduce((p, c, i) => {\n p[c.codePointAt(0)] = i;\n return p;\n}, []);\nfunction encode(data) {\n return data.reduce((p, c) => {\n p += alphabetBytesToChars[c];\n return p;\n }, '');\n}\nfunction decode(str) {\n const byts = [];\n for (const char of str) {\n const byt = alphabetCharsToBytes[char.codePointAt(0)];\n if (byt === undefined) {\n throw new Error(`Non-base256emoji character: ${ char }`);\n }\n byts.push(byt);\n }\n return new Uint8Array(byts);\n}\nexport const base256emoji = from({\n prefix: '\\uD83D\\uDE80',\n name: 'base256emoji',\n encode,\n decode\n});","const textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nexport const name = 'json';\nexport const code = 512;\nexport const encode = node => textEncoder.encode(JSON.stringify(node));\nexport const decode = data => JSON.parse(textDecoder.decode(data));","import * as identityBase from './bases/identity.js';\nimport * as base2 from './bases/base2.js';\nimport * as base8 from './bases/base8.js';\nimport * as base10 from './bases/base10.js';\nimport * as base16 from './bases/base16.js';\nimport * as base32 from './bases/base32.js';\nimport * as base36 from './bases/base36.js';\nimport * as base58 from './bases/base58.js';\nimport * as base64 from './bases/base64.js';\nimport * as base256emoji from './bases/base256emoji.js';\nimport * as sha2 from './hashes/sha2.js';\nimport * as identity from './hashes/identity.js';\nimport * as raw from './codecs/raw.js';\nimport * as json from './codecs/json.js';\nimport {\n CID,\n hasher,\n digest,\n varint,\n bytes\n} from './index.js';\nconst bases = {\n ...identityBase,\n ...base2,\n ...base8,\n ...base10,\n ...base16,\n ...base32,\n ...base36,\n ...base58,\n ...base64,\n ...base256emoji\n};\nconst hashes = {\n ...sha2,\n ...identity\n};\nconst codecs = {\n raw,\n json\n};\nexport {\n CID,\n hasher,\n digest,\n varint,\n bytes,\n hashes,\n bases,\n codecs\n};","import { bases } from 'multiformats/basics';\nimport { allocUnsafe } from '../alloc.js';\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: { decode }\n };\n}\nconst string = createCodec('utf8', 'u', buf => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, str => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', buf => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, str => {\n str = str.substring(1);\n const buf = allocUnsafe(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: bases.base16,\n latin1: ascii,\n ascii: ascii,\n binary: ascii,\n ...bases\n};\nexport default BASES;","import bases from './util/bases.js';\nimport { asUint8Array } from './util/as-uint8array.js';\nexport function fromString(string, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return asUint8Array(globalThis.Buffer.from(string, 'utf-8'));\n }\n return base.decoder.decode(`${ base.prefix }${ string }`);\n}","import bases from './util/bases.js';\nexport function toString(array, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8');\n }\n return base.encoder.encode(array).substring(1);\n}","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __createBinding = function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n };\r\n\r\n __exportStar = function (m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n };\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.delay = void 0;\nfunction delay(timeout) {\n return new Promise(resolve => {\n setTimeout(() => {\n resolve(true);\n }, timeout);\n });\n}\nexports.delay = delay;\n//# sourceMappingURL=delay.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_THOUSAND = exports.ONE_HUNDRED = void 0;\nexports.ONE_HUNDRED = 100;\nexports.ONE_THOUSAND = 1000;\n//# sourceMappingURL=misc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_YEAR = exports.FOUR_WEEKS = exports.THREE_WEEKS = exports.TWO_WEEKS = exports.ONE_WEEK = exports.THIRTY_DAYS = exports.SEVEN_DAYS = exports.FIVE_DAYS = exports.THREE_DAYS = exports.ONE_DAY = exports.TWENTY_FOUR_HOURS = exports.TWELVE_HOURS = exports.SIX_HOURS = exports.THREE_HOURS = exports.ONE_HOUR = exports.SIXTY_MINUTES = exports.THIRTY_MINUTES = exports.TEN_MINUTES = exports.FIVE_MINUTES = exports.ONE_MINUTE = exports.SIXTY_SECONDS = exports.THIRTY_SECONDS = exports.TEN_SECONDS = exports.FIVE_SECONDS = exports.ONE_SECOND = void 0;\nexports.ONE_SECOND = 1;\nexports.FIVE_SECONDS = 5;\nexports.TEN_SECONDS = 10;\nexports.THIRTY_SECONDS = 30;\nexports.SIXTY_SECONDS = 60;\nexports.ONE_MINUTE = exports.SIXTY_SECONDS;\nexports.FIVE_MINUTES = exports.ONE_MINUTE * 5;\nexports.TEN_MINUTES = exports.ONE_MINUTE * 10;\nexports.THIRTY_MINUTES = exports.ONE_MINUTE * 30;\nexports.SIXTY_MINUTES = exports.ONE_MINUTE * 60;\nexports.ONE_HOUR = exports.SIXTY_MINUTES;\nexports.THREE_HOURS = exports.ONE_HOUR * 3;\nexports.SIX_HOURS = exports.ONE_HOUR * 6;\nexports.TWELVE_HOURS = exports.ONE_HOUR * 12;\nexports.TWENTY_FOUR_HOURS = exports.ONE_HOUR * 24;\nexports.ONE_DAY = exports.TWENTY_FOUR_HOURS;\nexports.THREE_DAYS = exports.ONE_DAY * 3;\nexports.FIVE_DAYS = exports.ONE_DAY * 5;\nexports.SEVEN_DAYS = exports.ONE_DAY * 7;\nexports.THIRTY_DAYS = exports.ONE_DAY * 30;\nexports.ONE_WEEK = exports.SEVEN_DAYS;\nexports.TWO_WEEKS = exports.ONE_WEEK * 2;\nexports.THREE_WEEKS = exports.ONE_WEEK * 3;\nexports.FOUR_WEEKS = exports.ONE_WEEK * 4;\nexports.ONE_YEAR = exports.ONE_DAY * 365;\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./misc\"), exports);\ntslib_1.__exportStar(require(\"./time\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromMiliseconds = exports.toMiliseconds = void 0;\nconst constants_1 = require(\"../constants\");\nfunction toMiliseconds(seconds) {\n return seconds * constants_1.ONE_THOUSAND;\n}\nexports.toMiliseconds = toMiliseconds;\nfunction fromMiliseconds(miliseconds) {\n return Math.floor(miliseconds / constants_1.ONE_THOUSAND);\n}\nexports.fromMiliseconds = fromMiliseconds;\n//# sourceMappingURL=convert.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./delay\"), exports);\ntslib_1.__exportStar(require(\"./convert\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Watch = void 0;\nclass Watch {\n constructor() {\n this.timestamps = new Map();\n }\n start(label) {\n if (this.timestamps.has(label)) {\n throw new Error(`Watch already started for label: ${label}`);\n }\n this.timestamps.set(label, { started: Date.now() });\n }\n stop(label) {\n const timestamp = this.get(label);\n if (typeof timestamp.elapsed !== \"undefined\") {\n throw new Error(`Watch already stopped for label: ${label}`);\n }\n const elapsed = Date.now() - timestamp.started;\n this.timestamps.set(label, { started: timestamp.started, elapsed });\n }\n get(label) {\n const timestamp = this.timestamps.get(label);\n if (typeof timestamp === \"undefined\") {\n throw new Error(`No timestamp found for label: ${label}`);\n }\n return timestamp;\n }\n elapsed(label) {\n const timestamp = this.get(label);\n const elapsed = timestamp.elapsed || Date.now() - timestamp.started;\n return elapsed;\n }\n}\nexports.Watch = Watch;\nexports.default = Watch;\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IWatch = void 0;\nclass IWatch {\n}\nexports.IWatch = IWatch;\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./watch\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./utils\"), exports);\ntslib_1.__exportStar(require(\"./watch\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./constants\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLocalStorage = exports.getLocalStorageOrThrow = exports.getCrypto = exports.getCryptoOrThrow = exports.getLocation = exports.getLocationOrThrow = exports.getNavigator = exports.getNavigatorOrThrow = exports.getDocument = exports.getDocumentOrThrow = exports.getFromWindowOrThrow = exports.getFromWindow = void 0;\nfunction getFromWindow(name) {\n let res = undefined;\n if (typeof window !== \"undefined\" && typeof window[name] !== \"undefined\") {\n res = window[name];\n }\n return res;\n}\nexports.getFromWindow = getFromWindow;\nfunction getFromWindowOrThrow(name) {\n const res = getFromWindow(name);\n if (!res) {\n throw new Error(`${name} is not defined in Window`);\n }\n return res;\n}\nexports.getFromWindowOrThrow = getFromWindowOrThrow;\nfunction getDocumentOrThrow() {\n return getFromWindowOrThrow(\"document\");\n}\nexports.getDocumentOrThrow = getDocumentOrThrow;\nfunction getDocument() {\n return getFromWindow(\"document\");\n}\nexports.getDocument = getDocument;\nfunction getNavigatorOrThrow() {\n return getFromWindowOrThrow(\"navigator\");\n}\nexports.getNavigatorOrThrow = getNavigatorOrThrow;\nfunction getNavigator() {\n return getFromWindow(\"navigator\");\n}\nexports.getNavigator = getNavigator;\nfunction getLocationOrThrow() {\n return getFromWindowOrThrow(\"location\");\n}\nexports.getLocationOrThrow = getLocationOrThrow;\nfunction getLocation() {\n return getFromWindow(\"location\");\n}\nexports.getLocation = getLocation;\nfunction getCryptoOrThrow() {\n return getFromWindowOrThrow(\"crypto\");\n}\nexports.getCryptoOrThrow = getCryptoOrThrow;\nfunction getCrypto() {\n return getFromWindow(\"crypto\");\n}\nexports.getCrypto = getCrypto;\nfunction getLocalStorageOrThrow() {\n return getFromWindowOrThrow(\"localStorage\");\n}\nexports.getLocalStorageOrThrow = getLocalStorageOrThrow;\nfunction getLocalStorage() {\n return getFromWindow(\"localStorage\");\n}\nexports.getLocalStorage = getLocalStorage;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWindowMetadata = void 0;\nconst window_getters_1 = require(\"@walletconnect/window-getters\");\nfunction getWindowMetadata() {\n let doc;\n let loc;\n try {\n doc = window_getters_1.getDocumentOrThrow();\n loc = window_getters_1.getLocationOrThrow();\n }\n catch (e) {\n return null;\n }\n function getIcons() {\n const links = doc.getElementsByTagName(\"link\");\n const icons = [];\n for (let i = 0; i < links.length; i++) {\n const link = links[i];\n const rel = link.getAttribute(\"rel\");\n if (rel) {\n if (rel.toLowerCase().indexOf(\"icon\") > -1) {\n const href = link.getAttribute(\"href\");\n if (href) {\n if (href.toLowerCase().indexOf(\"https:\") === -1 &&\n href.toLowerCase().indexOf(\"http:\") === -1 &&\n href.indexOf(\"//\") !== 0) {\n let absoluteHref = loc.protocol + \"//\" + loc.host;\n if (href.indexOf(\"/\") === 0) {\n absoluteHref += href;\n }\n else {\n const path = loc.pathname.split(\"/\");\n path.pop();\n const finalPath = path.join(\"/\");\n absoluteHref += finalPath + \"/\" + href;\n }\n icons.push(absoluteHref);\n }\n else if (href.indexOf(\"//\") === 0) {\n const absoluteUrl = loc.protocol + href;\n icons.push(absoluteUrl);\n }\n else {\n icons.push(href);\n }\n }\n }\n }\n }\n return icons;\n }\n function getWindowMetadataOfAny(...args) {\n const metaTags = doc.getElementsByTagName(\"meta\");\n for (let i = 0; i < metaTags.length; i++) {\n const tag = metaTags[i];\n const attributes = [\"itemprop\", \"property\", \"name\"]\n .map((target) => tag.getAttribute(target))\n .filter((attr) => {\n if (attr) {\n return args.includes(attr);\n }\n return false;\n });\n if (attributes.length && attributes) {\n const content = tag.getAttribute(\"content\");\n if (content) {\n return content;\n }\n }\n }\n return \"\";\n }\n function getName() {\n let name = getWindowMetadataOfAny(\"name\", \"og:site_name\", \"og:title\", \"twitter:title\");\n if (!name) {\n name = doc.title;\n }\n return name;\n }\n function getDescription() {\n const description = getWindowMetadataOfAny(\"description\", \"og:description\", \"twitter:description\", \"keywords\");\n return description;\n }\n const name = getName();\n const description = getDescription();\n const url = loc.origin;\n const icons = getIcons();\n const meta = {\n description,\n url,\n icons,\n name,\n };\n return meta;\n}\nexports.getWindowMetadata = getWindowMetadata;\n//# sourceMappingURL=index.js.map","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher) || [];\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), ':list='].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), ':list=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","function e(s,r,i=\"string\"){if(!s[r]||typeof s[r]!==i)throw new Error(`Missing or invalid \"${r}\" param`)}function l(s,r){let i=!0;return r.forEach(t=>{t in s||(i=!1)}),i}function f(s,r){return Array.isArray(s)?s.length===r:Object.keys(s).length===r}function w(s,r){return Array.isArray(s)?s.length>=r:Object.keys(s).length>=r}function u(s,r,i){return(i.length?w(s,r.length):f(s,r.length))?l(s,r):!1}function n(s,r,i=\"_\"){const t=s.split(i);return t[t.length-1].trim().toLowerCase()===r.trim().toLowerCase()}function R(s){return b(s.method)&&a(s.params)}function b(s){return n(s,\"subscribe\")}function a(s){return u(s,[\"topic\"],[])}function P(s){return c(s.method)&&h(s.params)}function c(s){return n(s,\"publish\")}function h(s){return u(s,[\"message\",\"topic\",\"ttl\"],[\"prompt\",\"tag\"])}function _(s){return o(s.method)&&p(s.params)}function o(s){return n(s,\"unsubscribe\")}function p(s){return u(s,[\"id\",\"topic\"],[])}function S(s){return m(s.method)&&d(s.params)}function m(s){return n(s,\"subscription\")}function d(s){return u(s,[\"id\",\"data\"],[])}function g(s){if(!b(s.method))throw new Error(\"JSON-RPC Request has invalid subscribe method\");if(!a(s.params))throw new Error(\"JSON-RPC Request has invalid subscribe params\");const r=s.params;return e(r,\"topic\"),r}function q(s){if(!c(s.method))throw new Error(\"JSON-RPC Request has invalid publish method\");if(!h(s.params))throw new Error(\"JSON-RPC Request has invalid publish params\");const r=s.params;return e(r,\"topic\"),e(r,\"message\"),e(r,\"ttl\",\"number\"),r}function E(s){if(!o(s.method))throw new Error(\"JSON-RPC Request has invalid unsubscribe method\");if(!p(s.params))throw new Error(\"JSON-RPC Request has invalid unsubscribe params\");const r=s.params;return e(r,\"id\"),r}function k(s){if(!m(s.method))throw new Error(\"JSON-RPC Request has invalid subscription method\");if(!d(s.params))throw new Error(\"JSON-RPC Request has invalid subscription params\");const r=s.params;return e(r,\"id\"),e(r,\"data\"),r}const C={waku:{publish:\"waku_publish\",batchPublish:\"waku_batchPublish\",subscribe:\"waku_subscribe\",batchSubscribe:\"waku_batchSubscribe\",subscription:\"waku_subscription\",unsubscribe:\"waku_unsubscribe\",batchUnsubscribe:\"waku_batchUnsubscribe\",batchFetchMessages:\"waku_batchFetchMessages\"},irn:{publish:\"irn_publish\",batchPublish:\"irn_batchPublish\",subscribe:\"irn_subscribe\",batchSubscribe:\"irn_batchSubscribe\",subscription:\"irn_subscription\",unsubscribe:\"irn_unsubscribe\",batchUnsubscribe:\"irn_batchUnsubscribe\",batchFetchMessages:\"irn_batchFetchMessages\"},iridium:{publish:\"iridium_publish\",batchPublish:\"iridium_batchPublish\",subscribe:\"iridium_subscribe\",batchSubscribe:\"iridium_batchSubscribe\",subscription:\"iridium_subscription\",unsubscribe:\"iridium_unsubscribe\",batchUnsubscribe:\"iridium_batchUnsubscribe\",batchFetchMessages:\"iridium_batchFetchMessages\"}};export{C as RELAY_JSONRPC,c as isPublishMethod,h as isPublishParams,P as isPublishRequest,b as isSubscribeMethod,a as isSubscribeParams,R as isSubscribeRequest,m as isSubscriptionMethod,d as isSubscriptionParams,S as isSubscriptionRequest,o as isUnsubscribeMethod,p as isUnsubscribeParams,_ as isUnsubscribeRequest,q as parsePublishRequest,g as parseSubscribeRequest,k as parseSubscriptionRequest,E as parseUnsubscribeRequest};\n//# sourceMappingURL=index.es.js.map\n","import{ChaCha20Poly1305 as ue}from\"@stablelib/chacha20poly1305\";import{HKDF as On}from\"@stablelib/hkdf\";import{randomBytes as le}from\"@stablelib/random\";import{SHA256 as Sn,hash as de}from\"@stablelib/sha256\";import*as fe from\"@stablelib/x25519\";import{toString as v,fromString as E,concat as pe}from\"uint8arrays\";import{detect as wn}from\"detect-browser\";import{toMiliseconds as W,FIVE_MINUTES as me,fromMiliseconds as In}from\"@walletconnect/time\";import{getDocument as ye,getNavigator as ge,getLocation as he}from\"@walletconnect/window-getters\";import{getWindowMetadata as Tn}from\"@walletconnect/window-metadata\";import*as M from\"query-string\";import{RELAY_JSONRPC as Pn}from\"@walletconnect/relay-api\";const K=\":\";function ve(e){const[n,t]=e.split(K);return{namespace:n,reference:t}}function Ee(e){const{namespace:n,reference:t}=e;return[n,t].join(K)}function z(e){const[n,t,r]=e.split(K);return{namespace:n,reference:t,address:r}}function be(e){const{namespace:n,reference:t,address:r}=e;return[n,t,r].join(K)}function Y(e,n){const t=[];return e.forEach(r=>{const o=n(r);t.includes(o)||t.push(o)}),t}function Ne(e){const{address:n}=z(e);return n}function Oe(e){const{namespace:n,reference:t}=z(e);return Ee({namespace:n,reference:t})}function Rn(e,n){const{namespace:t,reference:r}=ve(n);return be({namespace:t,reference:r,address:e})}function An(e){return Y(e,Ne)}function Se(e){return Y(e,Oe)}function Un(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...o.accounts)}),t}function _n(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...Se(o.accounts))}),t}function $n(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...L(r,o))}),t}function L(e,n){return e.includes(\":\")?[e]:n.chains||[]}const x=e=>e?.split(\":\"),we=e=>{const n=e&&x(e);if(n)return n[3]},Cn=e=>{const n=e&&x(e);if(n)return n[2]+\":\"+n[3]},Ie=e=>{const n=e&&x(e);if(n)return n.pop()},jn=(e,n)=>{const t=`${e.domain} wants you to sign in with your Ethereum account:`,r=Ie(n),o=e.statement,s=`URI: ${e.aud}`,i=`Version: ${e.version}`,d=`Chain ID: ${we(n)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources:\n${e.resources.map(a=>`- ${a}`).join(`\n`)}`:void 0;return[t,r,\"\",o,\"\",s,i,d,l,c,u].filter(a=>a!=null).join(`\n`)},J=\"base10\",p=\"base16\",F=\"base64pad\",H=\"utf8\",Q=0,_=1,Dn=0,Te=1,Z=12,X=32;function kn(){const e=fe.generateKeyPair();return{privateKey:v(e.secretKey,p),publicKey:v(e.publicKey,p)}}function Vn(){const e=le(X);return v(e,p)}function Mn(e,n){const t=fe.sharedKey(E(e,p),E(n,p),!0),r=new On(Sn,t).expand(X);return v(r,p)}function Kn(e){const n=de(E(e,p));return v(n,p)}function Ln(e){const n=de(E(e,H));return v(n,p)}function Pe(e){return E(`${e}`,J)}function j(e){return Number(v(e,J))}function xn(e){const n=Pe(typeof e.type<\"u\"?e.type:Q);if(j(n)===_&&typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");const t=typeof e.senderPublicKey<\"u\"?E(e.senderPublicKey,p):void 0,r=typeof e.iv<\"u\"?E(e.iv,p):le(Z),o=new ue(E(e.symKey,p)).seal(r,E(e.message,H));return Re({type:n,sealed:o,iv:r,senderPublicKey:t})}function Fn(e){const n=new ue(E(e.symKey,p)),{sealed:t,iv:r}=ee(e.encoded),o=n.open(r,t);if(o===null)throw new Error(\"Failed to decrypt\");return v(o,H)}function Re(e){if(j(e.type)===_){if(typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");return v(pe([e.type,e.senderPublicKey,e.iv,e.sealed]),F)}return v(pe([e.type,e.iv,e.sealed]),F)}function ee(e){const n=E(e,F),t=n.slice(Dn,Te),r=Te;if(j(t)===_){const d=r+X,l=d+Z,c=n.slice(r,d),u=n.slice(d,l),a=n.slice(l);return{type:t,sealed:a,iv:u,senderPublicKey:c}}const o=r+Z,s=n.slice(r,o),i=n.slice(o);return{type:t,sealed:i,iv:s}}function Hn(e,n){const t=ee(e);return Ae({type:j(t.type),senderPublicKey:typeof t.senderPublicKey<\"u\"?v(t.senderPublicKey,p):void 0,receiverPublicKey:n?.receiverPublicKey})}function Ae(e){const n=e?.type||Q;if(n===_){if(typeof e?.senderPublicKey>\"u\")throw new Error(\"missing sender public key\");if(typeof e?.receiverPublicKey>\"u\")throw new Error(\"missing receiver public key\")}return{type:n,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function qn(e){return e.type===_&&typeof e.senderPublicKey==\"string\"&&typeof e.receiverPublicKey==\"string\"}var Bn=Object.defineProperty,Ue=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable,_e=(e,n,t)=>n in e?Bn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$e=(e,n)=>{for(var t in n||(n={}))Gn.call(n,t)&&_e(e,t,n[t]);if(Ue)for(var t of Ue(n))Wn.call(n,t)&&_e(e,t,n[t]);return e};const Ce=\"ReactNative\",m={reactNative:\"react-native\",node:\"node\",browser:\"browser\",unknown:\"unknown\"},q=\" \",zn=\":\",je=\"/\",ne=2,Yn=1e3,De=\"js\";function te(){return typeof process<\"u\"&&typeof process.versions<\"u\"&&typeof process.versions.node<\"u\"}function $(){return!ye()&&!!ge()&&navigator.product===Ce}function D(){return!te()&&!!ge()&&!!ye()}function R(){return $()?m.reactNative:te()?m.node:D()?m.browser:m.unknown}function Jn(){var e;try{return $()&&typeof global<\"u\"&&typeof(global==null?void 0:global.Application)<\"u\"?(e=global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function ke(e,n){let t=M.parse(e);return t=$e($e({},t),n),e=M.stringify(t),e}function Qn(){return Tn()||{name:\"\",description:\"\",url:\"\",icons:[\"\"]}}function Zn(e,n){var t;const r=R(),o={protocol:e,version:n,env:r};return r===\"browser\"&&(o.host=((t=he())==null?void 0:t.host)||\"unknown\"),o}function Ve(){if(R()===m.reactNative&&typeof global<\"u\"&&typeof(global==null?void 0:global.Platform)<\"u\"){const{OS:t,Version:r}=global.Platform;return[t,r].join(\"-\")}const e=wn();if(e===null)return\"unknown\";const n=e.os?e.os.replace(\" \",\"\").toLowerCase():\"unknown\";return e.type===\"browser\"?[n,e.name,e.version].join(\"-\"):[n,e.version].join(\"-\")}function Me(){var e;const n=R();return n===m.browser?[n,((e=he())==null?void 0:e.host)||\"unknown\"].join(\":\"):n}function Ke(e,n,t){const r=Ve(),o=Me();return[[e,n].join(\"-\"),[De,t].join(\"-\"),r,o].join(\"/\")}function Xn({protocol:e,version:n,relayUrl:t,sdkVersion:r,auth:o,projectId:s,useOnCloseEvent:i,bundleId:d}){const l=t.split(\"?\"),c=Ke(e,n,r),u={auth:o,ua:c,projectId:s,useOnCloseEvent:i||void 0,origin:d||void 0},a=ke(l[1]||\"\",u);return l[0]+\"?\"+a}function et(e){let n=(e.match(/^[^:]+(?=:\\/\\/)/gi)||[])[0];const t=typeof n<\"u\"?e.split(\"://\")[1]:e;return n=n===\"wss\"?\"https\":\"http\",[n,t].join(\"://\")}function nt(e,n,t){if(!e[n]||typeof e[n]!==t)throw new Error(`Missing or invalid \"${n}\" param`)}function Le(e,n=ne){return xe(e.split(je),n)}function tt(e){return Le(e).join(q)}function O(e,n){return e.filter(t=>n.includes(t)).length===e.length}function xe(e,n=ne){return e.slice(Math.max(e.length-n,0))}function rt(e){return Object.fromEntries(e.entries())}function ot(e){return new Map(Object.entries(e))}function st(e,n){const t={};return Object.keys(e).forEach(r=>{t[r]=n(e[r])}),t}const it=e=>e;function Fe(e){return e.trim().replace(/^\\w/,n=>n.toUpperCase())}function ct(e){return e.split(q).map(n=>Fe(n)).join(q)}function at(e=me,n){const t=W(e||me);let r,o,s;return{resolve:i=>{s&&r&&(clearTimeout(s),r(i))},reject:i=>{s&&o&&(clearTimeout(s),o(i))},done:()=>new Promise((i,d)=>{s=setTimeout(()=>{d(new Error(n))},t),r=i,o=d})}}function ut(e,n,t){return new Promise(async(r,o)=>{const s=setTimeout(()=>o(new Error(t)),n);try{const i=await e;r(i)}catch(i){o(i)}clearTimeout(s)})}function re(e,n){if(typeof n==\"string\"&&n.startsWith(`${e}:`))return n;if(e.toLowerCase()===\"topic\"){if(typeof n!=\"string\")throw new Error('Value must be \"string\" for expirer target type: topic');return`topic:${n}`}else if(e.toLowerCase()===\"id\"){if(typeof n!=\"number\")throw new Error('Value must be \"number\" for expirer target type: id');return`id:${n}`}throw new Error(`Unknown expirer target type: ${e}`)}function lt(e){return re(\"topic\",e)}function dt(e){return re(\"id\",e)}function ft(e){const[n,t]=e.split(\":\"),r={id:void 0,topic:void 0};if(n===\"topic\"&&typeof t==\"string\")r.topic=t;else if(n===\"id\"&&Number.isInteger(Number(t)))r.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${n}:${t}`);return r}function pt(e,n){return In((n||Date.now())+W(e))}function mt(e){return Date.now()>=W(e)}function yt(e,n){return`${e}${n?`:${n}`:\"\"}`}function S(e=[],n=[]){return[...new Set([...e,...n])]}async function gt({id:e,topic:n,wcDeepLink:t}){try{if(!t)return;const r=typeof t==\"string\"?JSON.parse(t):t;let o=r?.href;if(typeof o!=\"string\")return;o.endsWith(\"/\")&&(o=o.slice(0,-1));const s=`${o}/wc?requestId=${e}&sessionTopic=${n}`,i=R();i===m.browser?s.startsWith(\"https://\")?window.open(s,\"_blank\",\"noreferrer noopener\"):window.open(s,\"_self\",\"noreferrer noopener\"):i===m.reactNative&&typeof(global==null?void 0:global.Linking)<\"u\"&&await global.Linking.openURL(s)}catch(r){console.error(r)}}async function ht(e,n){try{return await e.getItem(n)||(D()?localStorage.getItem(n):void 0)}catch(t){console.error(t)}}const He=\"irn\";function vt(e){return e?.relay||{protocol:He}}function Et(e){const n=Pn[e];if(typeof n>\"u\")throw new Error(`Relay Protocol not supported: ${e}`);return n}var bt=Object.defineProperty,Nt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Be=(e,n,t)=>n in e?bt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n)=>{for(var t in n||(n={}))St.call(n,t)&&Be(e,t,n[t]);if(qe)for(var t of qe(n))wt.call(n,t)&&Be(e,t,n[t]);return e},Tt=(e,n)=>Nt(e,Ot(n));function Ge(e,n=\"-\"){const t={},r=\"relay\"+n;return Object.keys(e).forEach(o=>{if(o.startsWith(r)){const s=o.replace(r,\"\"),i=e[o];t[s]=i}}),t}function Pt(e){e=e.includes(\"wc://\")?e.replace(\"wc://\",\"\"):e,e=e.includes(\"wc:\")?e.replace(\"wc:\",\"\"):e;const n=e.indexOf(\":\"),t=e.indexOf(\"?\")!==-1?e.indexOf(\"?\"):void 0,r=e.substring(0,n),o=e.substring(n+1,t).split(\"@\"),s=typeof t<\"u\"?e.substring(t):\"\",i=M.parse(s);return{protocol:r,topic:We(o[0]),version:parseInt(o[1],10),symKey:i.symKey,relay:Ge(i),expiryTimestamp:i.expiryTimestamp?parseInt(i.expiryTimestamp,10):void 0}}function We(e){return e.startsWith(\"//\")?e.substring(2):e}function ze(e,n=\"-\"){const t=\"relay\",r={};return Object.keys(e).forEach(o=>{const s=t+n+o;e[o]&&(r[s]=e[o])}),r}function Rt(e){return`${e.protocol}:${e.topic}@${e.version}?`+M.stringify(Tt(It({symKey:e.symKey},ze(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}var At=Object.defineProperty,Ut=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Je=(e,n,t)=>n in e?At(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jt=(e,n)=>{for(var t in n||(n={}))$t.call(n,t)&&Je(e,t,n[t]);if(Ye)for(var t of Ye(n))Ct.call(n,t)&&Je(e,t,n[t]);return e},Dt=(e,n)=>Ut(e,_t(n));function A(e){const n=[];return e.forEach(t=>{const[r,o]=t.split(\":\");n.push(`${r}:${o}`)}),n}function Qe(e){const n=[];return Object.values(e).forEach(t=>{n.push(...A(t.accounts))}),n}function Ze(e,n){const t=[];return Object.values(e).forEach(r=>{A(r.accounts).includes(n)&&t.push(...r.methods)}),t}function Xe(e,n){const t=[];return Object.values(e).forEach(r=>{A(r.accounts).includes(n)&&t.push(...r.events)}),t}function kt(e,n){const t=ln(e,n);if(t)throw new Error(t.message);const r={};for(const[o,s]of Object.entries(e))r[o]={methods:s.methods,events:s.events,chains:s.accounts.map(i=>`${i.split(\":\")[0]}:${i.split(\":\")[1]}`)};return r}function Vt(e){const{proposal:{requiredNamespaces:n,optionalNamespaces:t={}},supportedNamespaces:r}=e,o=se(n),s=se(t),i={};Object.keys(r).forEach(c=>{const u=r[c].chains,a=r[c].methods,b=r[c].events,I=r[c].accounts;u.forEach(y=>{if(!I.some(f=>f.includes(y)))throw new Error(`No accounts provided for chain ${y} in namespace ${c}`)}),i[c]={chains:u,methods:a,events:b,accounts:I}});const d=fn(n,i,\"approve()\");if(d)throw new Error(d.message);const l={};return!Object.keys(n).length&&!Object.keys(t).length?i:(Object.keys(o).forEach(c=>{const u=r[c].chains.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.chains)==null?void 0:h.includes(y)}),a=r[c].methods.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.methods)==null?void 0:h.includes(y)}),b=r[c].events.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.events)==null?void 0:h.includes(y)}),I=u.map(y=>r[c].accounts.filter(f=>f.includes(`${y}:`))).flat();l[c]={chains:u,methods:a,events:b,accounts:I}}),Object.keys(s).forEach(c=>{var u,a,b,I,y,f;if(!r[c])return;const h=(a=(u=s[c])==null?void 0:u.chains)==null?void 0:a.filter(T=>r[c].chains.includes(T)),En=r[c].methods.filter(T=>{var P,C;return(C=(P=s[c])==null?void 0:P.methods)==null?void 0:C.includes(T)}),bn=r[c].events.filter(T=>{var P,C;return(C=(P=s[c])==null?void 0:P.events)==null?void 0:C.includes(T)}),Nn=h?.map(T=>r[c].accounts.filter(P=>P.includes(`${T}:`))).flat();l[c]={chains:S((b=l[c])==null?void 0:b.chains,h),methods:S((I=l[c])==null?void 0:I.methods,En),events:S((y=l[c])==null?void 0:y.events,bn),accounts:S((f=l[c])==null?void 0:f.accounts,Nn)}}),l)}function oe(e){return e.includes(\":\")}function en(e){return oe(e)?e.split(\":\")[0]:e}function se(e){var n,t,r;const o={};if(!B(e))return o;for(const[s,i]of Object.entries(e)){const d=oe(s)?[s]:i.chains,l=i.methods||[],c=i.events||[],u=en(s);o[u]=Dt(jt({},o[u]),{chains:S(d,(n=o[u])==null?void 0:n.chains),methods:S(l,(t=o[u])==null?void 0:t.methods),events:S(c,(r=o[u])==null?void 0:r.events)})}return o}const nn={INVALID_METHOD:{message:\"Invalid method.\",code:1001},INVALID_EVENT:{message:\"Invalid event.\",code:1002},INVALID_UPDATE_REQUEST:{message:\"Invalid update request.\",code:1003},INVALID_EXTEND_REQUEST:{message:\"Invalid extend request.\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\"Invalid session settle request.\",code:1005},UNAUTHORIZED_METHOD:{message:\"Unauthorized method.\",code:3001},UNAUTHORIZED_EVENT:{message:\"Unauthorized event.\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\"Unauthorized update request.\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\"Unauthorized extend request.\",code:3004},USER_REJECTED:{message:\"User rejected.\",code:5e3},USER_REJECTED_CHAINS:{message:\"User rejected chains.\",code:5001},USER_REJECTED_METHODS:{message:\"User rejected methods.\",code:5002},USER_REJECTED_EVENTS:{message:\"User rejected events.\",code:5003},UNSUPPORTED_CHAINS:{message:\"Unsupported chains.\",code:5100},UNSUPPORTED_METHODS:{message:\"Unsupported methods.\",code:5101},UNSUPPORTED_EVENTS:{message:\"Unsupported events.\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\"Unsupported accounts.\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\"Unsupported namespace key.\",code:5104},USER_DISCONNECTED:{message:\"User disconnected.\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\"Session settlement failed.\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\"Unsupported wc_ method.\",code:10001}},tn={NOT_INITIALIZED:{message:\"Not initialized.\",code:1},NO_MATCHING_KEY:{message:\"No matching key.\",code:2},RESTORE_WILL_OVERRIDE:{message:\"Restore will override.\",code:3},RESUBSCRIBED:{message:\"Resubscribed.\",code:4},MISSING_OR_INVALID:{message:\"Missing or invalid.\",code:5},EXPIRED:{message:\"Expired.\",code:6},UNKNOWN_TYPE:{message:\"Unknown type.\",code:7},MISMATCHED_TOPIC:{message:\"Mismatched topic.\",code:8},NON_CONFORMING_NAMESPACES:{message:\"Non conforming namespaces.\",code:9}};function N(e,n){const{message:t,code:r}=tn[e];return{message:n?`${t} ${n}`:t,code:r}}function U(e,n){const{message:t,code:r}=nn[e];return{message:n?`${t} ${n}`:t,code:r}}function k(e,n){return Array.isArray(e)?typeof n<\"u\"&&e.length?e.every(n):!0:!1}function B(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function w(e){return typeof e>\"u\"}function g(e,n){return n&&w(e)?!0:typeof e==\"string\"&&!!e.trim().length}function G(e,n){return n&&w(e)?!0:typeof e==\"number\"&&!isNaN(e)}function Mt(e,n){const{requiredNamespaces:t}=n,r=Object.keys(e.namespaces),o=Object.keys(t);let s=!0;return O(o,r)?(r.forEach(i=>{const{accounts:d,methods:l,events:c}=e.namespaces[i],u=A(d),a=t[i];(!O(L(i,a),u)||!O(a.methods,l)||!O(a.events,c))&&(s=!1)}),s):!1}function V(e){return g(e,!1)&&e.includes(\":\")?e.split(\":\").length===2:!1}function rn(e){if(g(e,!1)&&e.includes(\":\")){const n=e.split(\":\");if(n.length===3){const t=n[0]+\":\"+n[1];return!!n[2]&&V(t)}}return!1}function Kt(e){if(g(e,!1))try{return typeof new URL(e)<\"u\"}catch{return!1}return!1}function Lt(e){var n;return(n=e?.proposer)==null?void 0:n.publicKey}function xt(e){return e?.topic}function Ft(e,n){let t=null;return g(e?.publicKey,!1)||(t=N(\"MISSING_OR_INVALID\",`${n} controller public key should be a string`)),t}function ie(e){let n=!0;return k(e)?e.length&&(n=e.every(t=>g(t,!1))):n=!1,n}function on(e,n,t){let r=null;return k(n)&&n.length?n.forEach(o=>{r||V(o)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chain ${o} should be a string and conform to \"namespace:chainId\" format`))}):V(e)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chains must be defined as \"namespace:chainId\" e.g. \"eip155:1\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\"eip155:1\", \"eip155:5\"] }`)),r}function sn(e,n,t){let r=null;return Object.entries(e).forEach(([o,s])=>{if(r)return;const i=on(o,L(o,s),`${n} ${t}`);i&&(r=i)}),r}function cn(e,n){let t=null;return k(e)?e.forEach(r=>{t||rn(r)||(t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, account ${r} should be a string and conform to \"namespace:chainId:address\" format`))}):t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, accounts should be an array of strings conforming to \"namespace:chainId:address\" format`),t}function an(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=cn(r?.accounts,`${n} namespace`);o&&(t=o)}),t}function un(e,n){let t=null;return ie(e?.methods)?ie(e?.events)||(t=U(\"UNSUPPORTED_EVENTS\",`${n}, events should be an array of strings or empty array for no events`)):t=U(\"UNSUPPORTED_METHODS\",`${n}, methods should be an array of strings or empty array for no methods`),t}function ce(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=un(r,`${n}, namespace`);o&&(t=o)}),t}function Ht(e,n,t){let r=null;if(e&&B(e)){const o=ce(e,n);o&&(r=o);const s=sn(e,n,t);s&&(r=s)}else r=N(\"MISSING_OR_INVALID\",`${n}, ${t} should be an object with data`);return r}function ln(e,n){let t=null;if(e&&B(e)){const r=ce(e,n);r&&(t=r);const o=an(e,n);o&&(t=o)}else t=N(\"MISSING_OR_INVALID\",`${n}, namespaces should be an object with data`);return t}function dn(e){return g(e.protocol,!0)}function qt(e,n){let t=!1;return n&&!e?t=!0:e&&k(e)&&e.length&&e.forEach(r=>{t=dn(r)}),t}function Bt(e){return typeof e==\"number\"}function Gt(e){return typeof e<\"u\"&&typeof e!==null}function Wt(e){return!(!e||typeof e!=\"object\"||!e.code||!G(e.code,!1)||!e.message||!g(e.message,!1))}function zt(e){return!(w(e)||!g(e.method,!1))}function Yt(e){return!(w(e)||w(e.result)&&w(e.error)||!G(e.id,!1)||!g(e.jsonrpc,!1))}function Jt(e){return!(w(e)||!g(e.name,!1))}function Qt(e,n){return!(!V(n)||!Qe(e).includes(n))}function Zt(e,n,t){return g(t,!1)?Ze(e,n).includes(t):!1}function Xt(e,n,t){return g(t,!1)?Xe(e,n).includes(t):!1}function fn(e,n,t){let r=null;const o=er(e),s=nr(n),i=Object.keys(o),d=Object.keys(s),l=pn(Object.keys(e)),c=pn(Object.keys(n)),u=l.filter(a=>!c.includes(a));return u.length&&(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(n).toString()}`)),O(i,d)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces chains don't satisfy required namespaces.\n Required: ${i.toString()}\n Approved: ${d.toString()}`)),Object.keys(n).forEach(a=>{if(!a.includes(\":\")||r)return;const b=A(n[a].accounts);b.includes(a)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces accounts don't satisfy namespace accounts for ${a}\n Required: ${a}\n Approved: ${b.toString()}`))}),i.forEach(a=>{r||(O(o[a].methods,s[a].methods)?O(o[a].events,s[a].events)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces events don't satisfy namespace events for ${a}`)):r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces methods don't satisfy namespace methods for ${a}`))}),r}function er(e){const n={};return Object.keys(e).forEach(t=>{var r;t.includes(\":\")?n[t]=e[t]:(r=e[t].chains)==null||r.forEach(o=>{n[o]={methods:e[t].methods,events:e[t].events}})}),n}function pn(e){return[...new Set(e.map(n=>n.includes(\":\")?n.split(\":\")[0]:n))]}function nr(e){const n={};return Object.keys(e).forEach(t=>{if(t.includes(\":\"))n[t]=e[t];else{const r=A(e[t].accounts);r?.forEach(o=>{n[o]={accounts:e[t].accounts.filter(s=>s.includes(`${o}:`)),methods:e[t].methods,events:e[t].events}})}}),n}function tr(e,n){return G(e,!1)&&e<=n.max&&e>=n.min}function rr(){const e=R();return new Promise(n=>{switch(e){case m.browser:n(mn());break;case m.reactNative:n(yn());break;case m.node:n(gn());break;default:n(!0)}})}function mn(){return D()&&navigator?.onLine}async function yn(){if($()&&typeof global<\"u\"&&global!=null&&global.NetInfo){const e=await(global==null?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}function gn(){return!0}function or(e){switch(R()){case m.browser:hn(e);break;case m.reactNative:vn(e);break;case m.node:break}}function hn(e){!$()&&D()&&(window.addEventListener(\"online\",()=>e(!0)),window.addEventListener(\"offline\",()=>e(!1)))}function vn(e){$()&&typeof global<\"u\"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(n=>e(n?.isConnected))}const ae={};class sr{static get(n){return ae[n]}static set(n,t){ae[n]=t}static delete(n){delete ae[n]}}export{J as BASE10,p as BASE16,F as BASE64,zn as COLON,ne as DEFAULT_DEPTH,q as EMPTY_SPACE,m as ENV_MAP,tn as INTERNAL_ERRORS,sr as MemoryStore,Yn as ONE_THOUSAND,Ce as REACT_NATIVE_PRODUCT,He as RELAYER_DEFAULT_PROTOCOL,nn as SDK_ERRORS,De as SDK_TYPE,je as SLASH,Q as TYPE_0,_ as TYPE_1,H as UTF8,ke as appendToQueryString,nt as assertType,Vt as buildApprovedNamespaces,pt as calcExpiry,ct as capitalize,Fe as capitalizeWord,at as createDelayedPromise,ut as createExpiringPromise,j as decodeTypeByte,Fn as decrypt,Mn as deriveSymKey,ee as deserialize,Pe as encodeTypeByte,xn as encrypt,yt as engineEvent,it as enumify,be as formatAccountId,Rn as formatAccountWithChain,Ee as formatChainId,re as formatExpirerTarget,dt as formatIdTarget,jn as formatMessage,tt as formatMessageContext,ze as formatRelayParams,Xn as formatRelayRpcUrl,lt as formatTopicTarget,Ke as formatUA,Rt as formatUri,kn as generateKeyPair,Vn as generateRandomBytes32,A as getAccountsChains,Un as getAccountsFromNamespaces,Ne as getAddressFromAccount,An as getAddressesFromAccounts,Qn as getAppMetadata,mn as getBrowserOnlineStatus,Jn as getBundleId,Oe as getChainFromAccount,Se as getChainsFromAccounts,L as getChainsFromNamespace,_n as getChainsFromNamespaces,$n as getChainsFromRequiredNamespaces,ht as getDeepLink,Ie as getDidAddress,x as getDidAddressSegments,we as getDidChainId,R as getEnvironment,et as getHttpUrl,N as getInternalError,Me as getJavascriptID,Ve as getJavascriptOS,xe as getLastItems,Cn as getNamespacedDidChainId,Qe as getNamespacesChains,Xe as getNamespacesEventsForChainId,Ze as getNamespacesMethodsForChainId,gn as getNodeOnlineStatus,yn as getReactNativeOnlineStatus,Zn as getRelayClientMetadata,Et as getRelayProtocolApi,vt as getRelayProtocolName,kt as getRequiredNamespacesFromNamespaces,U as getSdkError,Y as getUniqueValues,gt as handleDeeplinkRedirect,O as hasOverlap,Kn as hashKey,Ln as hashMessage,D as isBrowser,oe as isCaipNamespace,fn as isConformingNamespaces,mt as isExpired,te as isNode,rr as isOnline,Lt as isProposalStruct,$ as isReactNative,Mt as isSessionCompatible,xt as isSessionStruct,qn as isTypeOneEnvelope,w as isUndefined,rn as isValidAccountId,cn as isValidAccounts,un as isValidActions,k as isValidArray,V as isValidChainId,on as isValidChains,Ft as isValidController,Wt as isValidErrorReason,Jt as isValidEvent,Bt as isValidId,an as isValidNamespaceAccounts,ce as isValidNamespaceActions,sn as isValidNamespaceChains,ie as isValidNamespaceMethodsOrEvents,ln as isValidNamespaces,Qt as isValidNamespacesChainId,Xt as isValidNamespacesEvent,Zt as isValidNamespacesRequest,G as isValidNumber,B as isValidObject,Gt as isValidParams,dn as isValidRelay,qt as isValidRelays,zt as isValidRequest,tr as isValidRequestExpiry,Ht as isValidRequiredNamespaces,Yt as isValidResponse,g as isValidString,Kt as isValidUrl,st as mapEntries,rt as mapToObj,S as mergeArrays,se as normalizeNamespaces,ot as objToMap,z as parseAccountId,ve as parseChainId,Le as parseContextNames,ft as parseExpirerTarget,en as parseNamespaceKey,Ge as parseRelayParams,We as parseTopic,Pt as parseUri,Re as serialize,hn as subscribeToBrowserNetworkChange,or as subscribeToNetworkChange,vn as subscribeToReactNativeNetworkChange,Hn as validateDecoding,Ae as validateEncoding};\n//# sourceMappingURL=index.es.js.map\n","const suspectProtoRx = /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(\\.\\d{1,17})?([Ee][+-]?\\d+)?\\s*$/;\nfunction jsonParseTransform(key, value) {\n if (key === \"__proto__\" || key === \"constructor\" && value && typeof value === \"object\" && \"prototype\" in value) {\n warnKeyDropped(key);\n return;\n }\n return value;\n}\nfunction warnKeyDropped(key) {\n console.warn(`[destr] Dropping \"${key}\" key to prevent prototype pollution.`);\n}\nfunction destr(value, options = {}) {\n if (typeof value !== \"string\") {\n return value;\n }\n const _value = value.trim();\n if (\n // eslint-disable-next-line unicorn/prefer-at\n value[0] === '\"' && value.endsWith('\"') && !value.includes(\"\\\\\")\n ) {\n return _value.slice(1, -1);\n }\n if (_value.length <= 9) {\n const _lval = _value.toLowerCase();\n if (_lval === \"true\") {\n return true;\n }\n if (_lval === \"false\") {\n return false;\n }\n if (_lval === \"undefined\") {\n return void 0;\n }\n if (_lval === \"null\") {\n return null;\n }\n if (_lval === \"nan\") {\n return Number.NaN;\n }\n if (_lval === \"infinity\") {\n return Number.POSITIVE_INFINITY;\n }\n if (_lval === \"-infinity\") {\n return Number.NEGATIVE_INFINITY;\n }\n }\n if (!JsonSigRx.test(value)) {\n if (options.strict) {\n throw new SyntaxError(\"[destr] Invalid JSON\");\n }\n return value;\n }\n try {\n if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {\n if (options.strict) {\n throw new Error(\"[destr] Possible prototype pollution\");\n }\n return JSON.parse(value, jsonParseTransform);\n }\n return JSON.parse(value);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value;\n }\n}\nfunction safeDestr(value, options = {}) {\n return destr(value, { ...options, strict: true });\n}\n\nexport { destr as default, destr, safeDestr };\n","function wrapToPromise(value) {\n if (!value || typeof value.then !== \"function\") {\n return Promise.resolve(value);\n }\n return value;\n}\nfunction asyncCall(function_, ...arguments_) {\n try {\n return wrapToPromise(function_(...arguments_));\n } catch (error) {\n return Promise.reject(error);\n }\n}\nfunction isPrimitive(value) {\n const type = typeof value;\n return value === null || type !== \"object\" && type !== \"function\";\n}\nfunction isPureObject(value) {\n const proto = Object.getPrototypeOf(value);\n return !proto || proto.isPrototypeOf(Object);\n}\nfunction stringify(value) {\n if (isPrimitive(value)) {\n return String(value);\n }\n if (isPureObject(value) || Array.isArray(value)) {\n return JSON.stringify(value);\n }\n if (typeof value.toJSON === \"function\") {\n return stringify(value.toJSON());\n }\n throw new Error(\"[unstorage] Cannot stringify value!\");\n}\nfunction checkBufferSupport() {\n if (typeof Buffer === void 0) {\n throw new TypeError(\"[unstorage] Buffer is not supported!\");\n }\n}\nconst BASE64_PREFIX = \"base64:\";\nfunction serializeRaw(value) {\n if (typeof value === \"string\") {\n return value;\n }\n checkBufferSupport();\n const base64 = Buffer.from(value).toString(\"base64\");\n return BASE64_PREFIX + base64;\n}\nfunction deserializeRaw(value) {\n if (typeof value !== \"string\") {\n return value;\n }\n if (!value.startsWith(BASE64_PREFIX)) {\n return value;\n }\n checkBufferSupport();\n return Buffer.from(value.slice(BASE64_PREFIX.length), \"base64\");\n}\n\nconst storageKeyProperties = [\n \"hasItem\",\n \"getItem\",\n \"getItemRaw\",\n \"setItem\",\n \"setItemRaw\",\n \"removeItem\",\n \"getMeta\",\n \"setMeta\",\n \"removeMeta\",\n \"getKeys\",\n \"clear\",\n \"mount\",\n \"unmount\"\n];\nfunction prefixStorage(storage, base) {\n base = normalizeBaseKey(base);\n if (!base) {\n return storage;\n }\n const nsStorage = { ...storage };\n for (const property of storageKeyProperties) {\n nsStorage[property] = (key = \"\", ...args) => (\n // @ts-ignore\n storage[property](base + key, ...args)\n );\n }\n nsStorage.getKeys = (key = \"\", ...arguments_) => storage.getKeys(base + key, ...arguments_).then((keys) => keys.map((key2) => key2.slice(base.length)));\n return nsStorage;\n}\nfunction normalizeKey(key) {\n if (!key) {\n return \"\";\n }\n return key.split(\"?\")[0].replace(/[/\\\\]/g, \":\").replace(/:+/g, \":\").replace(/^:|:$/g, \"\");\n}\nfunction joinKeys(...keys) {\n return normalizeKey(keys.join(\":\"));\n}\nfunction normalizeBaseKey(base) {\n base = normalizeKey(base);\n return base ? base + \":\" : \"\";\n}\n\nexport { normalizeKey as a, asyncCall as b, serializeRaw as c, deserializeRaw as d, joinKeys as j, normalizeBaseKey as n, prefixStorage as p, stringify as s };\n","import destr from 'destr';\nimport { n as normalizeBaseKey, a as normalizeKey, b as asyncCall, d as deserializeRaw, s as stringify, c as serializeRaw, j as joinKeys } from './shared/unstorage.8581f561.mjs';\nexport { p as prefixStorage } from './shared/unstorage.8581f561.mjs';\n\nfunction defineDriver(factory) {\n return factory;\n}\n\nconst DRIVER_NAME = \"memory\";\nconst memory = defineDriver(() => {\n const data = /* @__PURE__ */ new Map();\n return {\n name: DRIVER_NAME,\n options: {},\n hasItem(key) {\n return data.has(key);\n },\n getItem(key) {\n return data.get(key) ?? null;\n },\n getItemRaw(key) {\n return data.get(key) ?? null;\n },\n setItem(key, value) {\n data.set(key, value);\n },\n setItemRaw(key, value) {\n data.set(key, value);\n },\n removeItem(key) {\n data.delete(key);\n },\n getKeys() {\n return Array.from(data.keys());\n },\n clear() {\n data.clear();\n },\n dispose() {\n data.clear();\n }\n };\n});\n\nfunction createStorage(options = {}) {\n const context = {\n mounts: { \"\": options.driver || memory() },\n mountpoints: [\"\"],\n watching: false,\n watchListeners: [],\n unwatch: {}\n };\n const getMount = (key) => {\n for (const base of context.mountpoints) {\n if (key.startsWith(base)) {\n return {\n base,\n relativeKey: key.slice(base.length),\n driver: context.mounts[base]\n };\n }\n }\n return {\n base: \"\",\n relativeKey: key,\n driver: context.mounts[\"\"]\n };\n };\n const getMounts = (base, includeParent) => {\n return context.mountpoints.filter(\n (mountpoint) => mountpoint.startsWith(base) || includeParent && base.startsWith(mountpoint)\n ).map((mountpoint) => ({\n relativeBase: base.length > mountpoint.length ? base.slice(mountpoint.length) : void 0,\n mountpoint,\n driver: context.mounts[mountpoint]\n }));\n };\n const onChange = (event, key) => {\n if (!context.watching) {\n return;\n }\n key = normalizeKey(key);\n for (const listener of context.watchListeners) {\n listener(event, key);\n }\n };\n const startWatch = async () => {\n if (context.watching) {\n return;\n }\n context.watching = true;\n for (const mountpoint in context.mounts) {\n context.unwatch[mountpoint] = await watch(\n context.mounts[mountpoint],\n onChange,\n mountpoint\n );\n }\n };\n const stopWatch = async () => {\n if (!context.watching) {\n return;\n }\n for (const mountpoint in context.unwatch) {\n await context.unwatch[mountpoint]();\n }\n context.unwatch = {};\n context.watching = false;\n };\n const runBatch = (items, commonOptions, cb) => {\n const batches = /* @__PURE__ */ new Map();\n const getBatch = (mount) => {\n let batch = batches.get(mount.base);\n if (!batch) {\n batch = {\n driver: mount.driver,\n base: mount.base,\n items: []\n };\n batches.set(mount.base, batch);\n }\n return batch;\n };\n for (const item of items) {\n const isStringItem = typeof item === \"string\";\n const key = normalizeKey(isStringItem ? item : item.key);\n const value = isStringItem ? void 0 : item.value;\n const options2 = isStringItem || !item.options ? commonOptions : { ...commonOptions, ...item.options };\n const mount = getMount(key);\n getBatch(mount).items.push({\n key,\n value,\n relativeKey: mount.relativeKey,\n options: options2\n });\n }\n return Promise.all([...batches.values()].map((batch) => cb(batch))).then(\n (r) => r.flat()\n );\n };\n const storage = {\n // Item\n hasItem(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n return asyncCall(driver.hasItem, relativeKey, opts);\n },\n getItem(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n return asyncCall(driver.getItem, relativeKey, opts).then(\n (value) => destr(value)\n );\n },\n getItems(items, commonOptions) {\n return runBatch(items, commonOptions, (batch) => {\n if (batch.driver.getItems) {\n return asyncCall(\n batch.driver.getItems,\n batch.items.map((item) => ({\n key: item.relativeKey,\n options: item.options\n })),\n commonOptions\n ).then(\n (r) => r.map((item) => ({\n key: joinKeys(batch.base, item.key),\n value: destr(item.value)\n }))\n );\n }\n return Promise.all(\n batch.items.map((item) => {\n return asyncCall(\n batch.driver.getItem,\n item.relativeKey,\n item.options\n ).then((value) => ({\n key: item.key,\n value: destr(value)\n }));\n })\n );\n });\n },\n getItemRaw(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (driver.getItemRaw) {\n return asyncCall(driver.getItemRaw, relativeKey, opts);\n }\n return asyncCall(driver.getItem, relativeKey, opts).then(\n (value) => deserializeRaw(value)\n );\n },\n async setItem(key, value, opts = {}) {\n if (value === void 0) {\n return storage.removeItem(key);\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (!driver.setItem) {\n return;\n }\n await asyncCall(driver.setItem, relativeKey, stringify(value), opts);\n if (!driver.watch) {\n onChange(\"update\", key);\n }\n },\n async setItems(items, commonOptions) {\n await runBatch(items, commonOptions, async (batch) => {\n if (batch.driver.setItems) {\n return asyncCall(\n batch.driver.setItems,\n batch.items.map((item) => ({\n key: item.relativeKey,\n value: stringify(item.value),\n options: item.options\n })),\n commonOptions\n );\n }\n if (!batch.driver.setItem) {\n return;\n }\n await Promise.all(\n batch.items.map((item) => {\n return asyncCall(\n batch.driver.setItem,\n item.relativeKey,\n stringify(item.value),\n item.options\n );\n })\n );\n });\n },\n async setItemRaw(key, value, opts = {}) {\n if (value === void 0) {\n return storage.removeItem(key, opts);\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (driver.setItemRaw) {\n await asyncCall(driver.setItemRaw, relativeKey, value, opts);\n } else if (driver.setItem) {\n await asyncCall(driver.setItem, relativeKey, serializeRaw(value), opts);\n } else {\n return;\n }\n if (!driver.watch) {\n onChange(\"update\", key);\n }\n },\n async removeItem(key, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { removeMeta: opts };\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (!driver.removeItem) {\n return;\n }\n await asyncCall(driver.removeItem, relativeKey, opts);\n if (opts.removeMeta || opts.removeMata) {\n await asyncCall(driver.removeItem, relativeKey + \"$\", opts);\n }\n if (!driver.watch) {\n onChange(\"remove\", key);\n }\n },\n // Meta\n async getMeta(key, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { nativeOnly: opts };\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n const meta = /* @__PURE__ */ Object.create(null);\n if (driver.getMeta) {\n Object.assign(meta, await asyncCall(driver.getMeta, relativeKey, opts));\n }\n if (!opts.nativeOnly) {\n const value = await asyncCall(\n driver.getItem,\n relativeKey + \"$\",\n opts\n ).then((value_) => destr(value_));\n if (value && typeof value === \"object\") {\n if (typeof value.atime === \"string\") {\n value.atime = new Date(value.atime);\n }\n if (typeof value.mtime === \"string\") {\n value.mtime = new Date(value.mtime);\n }\n Object.assign(meta, value);\n }\n }\n return meta;\n },\n setMeta(key, value, opts = {}) {\n return this.setItem(key + \"$\", value, opts);\n },\n removeMeta(key, opts = {}) {\n return this.removeItem(key + \"$\", opts);\n },\n // Keys\n async getKeys(base, opts = {}) {\n base = normalizeBaseKey(base);\n const mounts = getMounts(base, true);\n let maskedMounts = [];\n const allKeys = [];\n for (const mount of mounts) {\n const rawKeys = await asyncCall(\n mount.driver.getKeys,\n mount.relativeBase,\n opts\n );\n const keys = rawKeys.map((key) => mount.mountpoint + normalizeKey(key)).filter((key) => !maskedMounts.some((p) => key.startsWith(p)));\n allKeys.push(...keys);\n maskedMounts = [\n mount.mountpoint,\n ...maskedMounts.filter((p) => !p.startsWith(mount.mountpoint))\n ];\n }\n return base ? allKeys.filter((key) => key.startsWith(base) && !key.endsWith(\"$\")) : allKeys.filter((key) => !key.endsWith(\"$\"));\n },\n // Utils\n async clear(base, opts = {}) {\n base = normalizeBaseKey(base);\n await Promise.all(\n getMounts(base, false).map(async (m) => {\n if (m.driver.clear) {\n return asyncCall(m.driver.clear, m.relativeBase, opts);\n }\n if (m.driver.removeItem) {\n const keys = await m.driver.getKeys(m.relativeBase || \"\", opts);\n return Promise.all(\n keys.map((key) => m.driver.removeItem(key, opts))\n );\n }\n })\n );\n },\n async dispose() {\n await Promise.all(\n Object.values(context.mounts).map((driver) => dispose(driver))\n );\n },\n async watch(callback) {\n await startWatch();\n context.watchListeners.push(callback);\n return async () => {\n context.watchListeners = context.watchListeners.filter(\n (listener) => listener !== callback\n );\n if (context.watchListeners.length === 0) {\n await stopWatch();\n }\n };\n },\n async unwatch() {\n context.watchListeners = [];\n await stopWatch();\n },\n // Mount\n mount(base, driver) {\n base = normalizeBaseKey(base);\n if (base && context.mounts[base]) {\n throw new Error(`already mounted at ${base}`);\n }\n if (base) {\n context.mountpoints.push(base);\n context.mountpoints.sort((a, b) => b.length - a.length);\n }\n context.mounts[base] = driver;\n if (context.watching) {\n Promise.resolve(watch(driver, onChange, base)).then((unwatcher) => {\n context.unwatch[base] = unwatcher;\n }).catch(console.error);\n }\n return storage;\n },\n async unmount(base, _dispose = true) {\n base = normalizeBaseKey(base);\n if (!base || !context.mounts[base]) {\n return;\n }\n if (context.watching && base in context.unwatch) {\n context.unwatch[base]();\n delete context.unwatch[base];\n }\n if (_dispose) {\n await dispose(context.mounts[base]);\n }\n context.mountpoints = context.mountpoints.filter((key) => key !== base);\n delete context.mounts[base];\n },\n getMount(key = \"\") {\n key = normalizeKey(key) + \":\";\n const m = getMount(key);\n return {\n driver: m.driver,\n base: m.base\n };\n },\n getMounts(base = \"\", opts = {}) {\n base = normalizeKey(base);\n const mounts = getMounts(base, opts.parents);\n return mounts.map((m) => ({\n driver: m.driver,\n base: m.mountpoint\n }));\n }\n };\n return storage;\n}\nasync function snapshot(storage, base) {\n base = normalizeBaseKey(base);\n const keys = await storage.getKeys(base);\n const snapshot2 = {};\n await Promise.all(\n keys.map(async (key) => {\n snapshot2[key.slice(base.length)] = await storage.getItem(key);\n })\n );\n return snapshot2;\n}\nasync function restoreSnapshot(driver, snapshot2, base = \"\") {\n base = normalizeBaseKey(base);\n await Promise.all(\n Object.entries(snapshot2).map((e) => driver.setItem(base + e[0], e[1]))\n );\n}\nfunction watch(driver, onChange, base) {\n return driver.watch ? driver.watch((event, key) => onChange(event, base + key)) : () => {\n };\n}\nasync function dispose(driver) {\n if (typeof driver.dispose === \"function\") {\n await asyncCall(driver.dispose);\n }\n}\n\nconst builtinDrivers = {\n azureAppConfiguration: \"unstorage/drivers/azure-app-configuration\",\n azureCosmos: \"unstorage/drivers/azure-cosmos\",\n azureKeyVault: \"unstorage/drivers/azure-key-vault\",\n azureStorageBlob: \"unstorage/drivers/azure-storage-blob\",\n azureStorageTable: \"unstorage/drivers/azure-storage-table\",\n cloudflareKVBinding: \"unstorage/drivers/cloudflare-kv-binding\",\n cloudflareKVHTTP: \"unstorage/drivers/cloudflare-kv-http\",\n cloudflareR2Binding: \"unstorage/drivers/cloudflare-r2-binding\",\n fs: \"unstorage/drivers/fs\",\n fsLite: \"unstorage/drivers/fs-lite\",\n github: \"unstorage/drivers/github\",\n http: \"unstorage/drivers/http\",\n indexedb: \"unstorage/drivers/indexedb\",\n localStorage: \"unstorage/drivers/localstorage\",\n lruCache: \"unstorage/drivers/lru-cache\",\n memory: \"unstorage/drivers/memory\",\n mongodb: \"unstorage/drivers/mongodb\",\n netlifyBlobs: \"unstorage/drivers/netlify-blobs\",\n overlay: \"unstorage/drivers/overlay\",\n planetscale: \"unstorage/drivers/planetscale\",\n redis: \"unstorage/drivers/redis\",\n sessionStorage: \"unstorage/drivers/session-storage\",\n vercelKV: \"unstorage/drivers/vercel-kv\",\n /** @deprecated */\n \"cloudflare-kv-binding\": \"unstorage/drivers/cloudflare-kv-binding\",\n /** @deprecated */\n \"cloudflare-kv-http\": \"unstorage/drivers/cloudflare-kv-http\"\n};\n\nexport { builtinDrivers, createStorage, defineDriver, joinKeys, normalizeBaseKey, normalizeKey, restoreSnapshot, snapshot };\n","function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));\n}\nlet defaultGetStoreFunc;\nfunction defaultGetStore() {\n if (!defaultGetStoreFunc) {\n defaultGetStoreFunc = createStore('keyval-store', 'keyval');\n }\n return defaultGetStoreFunc;\n}\n/**\n * Get a value by its key.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction get(key, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => promisifyRequest(store.get(key)));\n}\n/**\n * Set a value with a key.\n *\n * @param key\n * @param value\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Set multiple values at once. This is faster than calling set() multiple times.\n * It's also atomic – if one of the pairs can't be added, none will be added.\n *\n * @param entries Array of entries, where each entry is an array of `[key, value]`.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction setMany(entries, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n entries.forEach((entry) => store.put(entry[1], entry[0]));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Get multiple values by their keys\n *\n * @param keys\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction getMany(keys, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => Promise.all(keys.map((key) => promisifyRequest(store.get(key)))));\n}\n/**\n * Update a value. This lets you see the old value and update it as an atomic operation.\n *\n * @param key\n * @param updater A callback that takes the old value and returns a new value.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction update(key, updater, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => \n // Need to create the promise manually.\n // If I try to chain promises, the transaction closes in browsers\n // that use a promise polyfill (IE10/11).\n new Promise((resolve, reject) => {\n store.get(key).onsuccess = function () {\n try {\n store.put(updater(this.result), key);\n resolve(promisifyRequest(store.transaction));\n }\n catch (err) {\n reject(err);\n }\n };\n }));\n}\n/**\n * Delete a particular key from the store.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction del(key, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.delete(key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Delete multiple keys at once.\n *\n * @param keys List of keys to delete.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction delMany(keys, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n keys.forEach((key) => store.delete(key));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Clear all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction clear(customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.clear();\n return promisifyRequest(store.transaction);\n });\n}\nfunction eachCursor(store, callback) {\n store.openCursor().onsuccess = function () {\n if (!this.result)\n return;\n callback(this.result);\n this.result.continue();\n };\n return promisifyRequest(store.transaction);\n}\n/**\n * Get all keys in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction keys(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAllKeys) {\n return promisifyRequest(store.getAllKeys());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);\n });\n}\n/**\n * Get all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction values(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAll) {\n return promisifyRequest(store.getAll());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.value)).then(() => items);\n });\n}\n/**\n * Get all entries in the store. Each entry is an array of `[key, value]`.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction entries(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n // (although, hopefully we'll get a simpler path some day)\n if (store.getAll && store.getAllKeys) {\n return Promise.all([\n promisifyRequest(store.getAllKeys()),\n promisifyRequest(store.getAll()),\n ]).then(([keys, values]) => keys.map((key, i) => [key, values[i]]));\n }\n const items = [];\n return customStore('readonly', (store) => eachCursor(store, (cursor) => items.push([cursor.key, cursor.value])).then(() => items));\n });\n}\n\nexport { clear, createStore, del, delMany, entries, get, getMany, keys, promisifyRequest, set, setMany, update, values };\n","const JSONStringify = data => JSON.stringify(data, (_, value) => typeof value === \"bigint\" ? value.toString() + \"n\" : value);\nconst JSONParse = json => {\n const numbersBiggerThanMaxInt = /([\\[:])?(\\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\\}\\]])/g;\n const serializedData = json.replace(numbersBiggerThanMaxInt, \"$1\\\"$2n\\\"$3\");\n return JSON.parse(serializedData, (_, value) => {\n const isCustomFormatBigInt = typeof value === \"string\" && value.match(/^\\d+n$/);\n if (isCustomFormatBigInt)\n return BigInt(value.substring(0, value.length - 1));\n return value;\n });\n};\nexport function safeJsonParse(value) {\n if (typeof value !== \"string\") {\n throw new Error(`Cannot safe json parse value of type ${typeof value}`);\n }\n try {\n return JSONParse(value);\n }\n catch (_a) {\n return value;\n }\n}\nexport function safeJsonStringify(value) {\n return typeof value === \"string\" ? value : JSONStringify(value) || \"\";\n}\n//# sourceMappingURL=index.js.map","import{createStorage as w}from\"unstorage\";import{createStore as I,get as u,set as p,del as b,keys as v,clear as S}from\"idb-keyval\";import{safeJsonStringify as g,safeJsonParse as d}from\"@walletconnect/safe-json\";function C(i){return i}const x=\"idb-keyval\";var z=(i={})=>{const t=i.base&&i.base.length>0?`${i.base}:`:\"\",e=s=>t+s;let n;return i.dbName&&i.storeName&&(n=I(i.dbName,i.storeName)),{name:x,options:i,async hasItem(s){return!(typeof await u(e(s),n)>\"u\")},async getItem(s){return await u(e(s),n)??null},setItem(s,a){return p(e(s),a,n)},removeItem(s){return b(e(s),n)},getKeys(){return v(n)},clear(){return S(n)}}};const D=\"WALLET_CONNECT_V2_INDEXED_DB\",E=\"keyvaluestorage\";class _{constructor(){this.indexedDb=w({driver:z({dbName:D,storeName:E})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(t=>[t.key,t.value])}async getItem(t){const e=await this.indexedDb.getItem(t);if(e!==null)return e}async setItem(t,e){await this.indexedDb.setItem(t,g(e))}async removeItem(t){await this.indexedDb.removeItem(t)}}var l=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{},c={exports:{}};(function(){let i;function t(){}i=t,i.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},i.prototype.setItem=function(e,n){this[e]=String(n)},i.prototype.removeItem=function(e){delete this[e]},i.prototype.clear=function(){const e=this;Object.keys(e).forEach(function(n){e[n]=void 0,delete e[n]})},i.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},i.prototype.__defineGetter__(\"length\",function(){return Object.keys(this).length}),typeof l<\"u\"&&l.localStorage?c.exports=l.localStorage:typeof window<\"u\"&&window.localStorage?c.exports=window.localStorage:c.exports=new t})();function k(i){var t;return[i[0],d((t=i[1])!=null?t:\"\")]}class K{constructor(){this.localStorage=c.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(k)}async getItem(t){const e=this.localStorage.getItem(t);if(e!==null)return d(e)}async setItem(t,e){this.localStorage.setItem(t,g(e))}async removeItem(t){this.localStorage.removeItem(t)}}const N=\"wc_storage_version\",y=1,O=async(i,t,e)=>{const n=N,s=await t.getItem(n);if(s&&s>=y){e(t);return}const a=await i.getKeys();if(!a.length){e(t);return}const m=[];for(;a.length;){const r=a.shift();if(!r)continue;const o=r.toLowerCase();if(o.includes(\"wc@\")||o.includes(\"walletconnect\")||o.includes(\"wc_\")||o.includes(\"wallet_connect\")){const f=await i.getItem(r);await t.setItem(r,f),m.push(r)}}await t.setItem(n,y),e(t),j(i,m)},j=async(i,t)=>{t.length&&t.forEach(async e=>{await i.removeItem(e)})};class h{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const t=new K;this.storage=t;try{const e=new _;O(t,e,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(t){return await this.initialize(),this.storage.getItem(t)}async setItem(t,e){return await this.initialize(),this.storage.setItem(t,e)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const e=setInterval(()=>{this.initialized&&(clearInterval(e),t())},20)})}}export{h as KeyValueStorage,h as default};\n//# sourceMappingURL=index.es.js.map\n","export class IEvents {\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IHeartBeat = void 0;\nconst events_1 = require(\"@walletconnect/events\");\nclass IHeartBeat extends events_1.IEvents {\n constructor(opts) {\n super();\n }\n}\nexports.IHeartBeat = IHeartBeat;\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HEARTBEAT_EVENTS = exports.HEARTBEAT_INTERVAL = void 0;\nconst time_1 = require(\"@walletconnect/time\");\nexports.HEARTBEAT_INTERVAL = time_1.FIVE_SECONDS;\nexports.HEARTBEAT_EVENTS = {\n pulse: \"heartbeat_pulse\",\n};\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HeartBeat = void 0;\nconst tslib_1 = require(\"tslib\");\nconst events_1 = require(\"events\");\nconst time_1 = require(\"@walletconnect/time\");\nconst types_1 = require(\"./types\");\nconst constants_1 = require(\"./constants\");\nclass HeartBeat extends types_1.IHeartBeat {\n constructor(opts) {\n super(opts);\n this.events = new events_1.EventEmitter();\n this.interval = constants_1.HEARTBEAT_INTERVAL;\n this.interval = (opts === null || opts === void 0 ? void 0 : opts.interval) || constants_1.HEARTBEAT_INTERVAL;\n }\n static init(opts) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const heartbeat = new HeartBeat(opts);\n yield heartbeat.init();\n return heartbeat;\n });\n }\n init() {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n yield this.initialize();\n });\n }\n stop() {\n clearInterval(this.intervalRef);\n }\n on(event, listener) {\n this.events.on(event, listener);\n }\n once(event, listener) {\n this.events.once(event, listener);\n }\n off(event, listener) {\n this.events.off(event, listener);\n }\n removeListener(event, listener) {\n this.events.removeListener(event, listener);\n }\n initialize() {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n this.intervalRef = setInterval(() => this.pulse(), time_1.toMiliseconds(this.interval));\n });\n }\n pulse() {\n this.events.emit(constants_1.HEARTBEAT_EVENTS.pulse);\n }\n}\nexports.HeartBeat = HeartBeat;\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./constants\"), exports);\n//# sourceMappingURL=index.js.map","'use strict'\nfunction tryStringify (o) {\n try { return JSON.stringify(o) } catch(e) { return '\"[Circular]\"' }\n}\n\nmodule.exports = format\n\nfunction format(f, args, opts) {\n var ss = (opts && opts.stringify) || tryStringify\n var offset = 1\n if (typeof f === 'object' && f !== null) {\n var len = args.length + offset\n if (len === 1) return f\n var objects = new Array(len)\n objects[0] = ss(f)\n for (var index = 1; index < len; index++) {\n objects[index] = ss(args[index])\n }\n return objects.join(' ')\n }\n if (typeof f !== 'string') {\n return f\n }\n var argLen = args.length\n if (argLen === 0) return f\n var str = ''\n var a = 1 - offset\n var lastPos = -1\n var flen = (f && f.length) || 0\n for (var i = 0; i < flen;) {\n if (f.charCodeAt(i) === 37 && i + 1 < flen) {\n lastPos = lastPos > -1 ? lastPos : 0\n switch (f.charCodeAt(i + 1)) {\n case 100: // 'd'\n case 102: // 'f'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Number(args[a])\n lastPos = i + 2\n i++\n break\n case 105: // 'i'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Math.floor(Number(args[a]))\n lastPos = i + 2\n i++\n break\n case 79: // 'O'\n case 111: // 'o'\n case 106: // 'j'\n if (a >= argLen)\n break\n if (args[a] === undefined) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n var type = typeof args[a]\n if (type === 'string') {\n str += '\\'' + args[a] + '\\''\n lastPos = i + 2\n i++\n break\n }\n if (type === 'function') {\n str += args[a].name || ''\n lastPos = i + 2\n i++\n break\n }\n str += ss(args[a])\n lastPos = i + 2\n i++\n break\n case 115: // 's'\n if (a >= argLen)\n break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += String(args[a])\n lastPos = i + 2\n i++\n break\n case 37: // '%'\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += '%'\n lastPos = i + 2\n i++\n a--\n break\n }\n ++a\n }\n ++i\n }\n if (lastPos === -1)\n return f\n else if (lastPos < flen) {\n str += f.slice(lastPos)\n }\n\n return str\n}\n","'use strict'\n\nconst format = require('quick-format-unescaped')\n\nmodule.exports = pino\n\nconst _console = pfGlobalThisOrFallback().console || {}\nconst stdSerializers = {\n mapHttpRequest: mock,\n mapHttpResponse: mock,\n wrapRequestSerializer: passthrough,\n wrapResponseSerializer: passthrough,\n wrapErrorSerializer: passthrough,\n req: mock,\n res: mock,\n err: asErrValue\n}\n\nfunction shouldSerialize (serialize, serializers) {\n if (Array.isArray(serialize)) {\n const hasToFilter = serialize.filter(function (k) {\n return k !== '!stdSerializers.err'\n })\n return hasToFilter\n } else if (serialize === true) {\n return Object.keys(serializers)\n }\n\n return false\n}\n\nfunction pino (opts) {\n opts = opts || {}\n opts.browser = opts.browser || {}\n\n const transmit = opts.browser.transmit\n if (transmit && typeof transmit.send !== 'function') { throw Error('pino: transmit option must have a send function') }\n\n const proto = opts.browser.write || _console\n if (opts.browser.write) opts.browser.asObject = true\n const serializers = opts.serializers || {}\n const serialize = shouldSerialize(opts.browser.serialize, serializers)\n let stdErrSerialize = opts.browser.serialize\n\n if (\n Array.isArray(opts.browser.serialize) &&\n opts.browser.serialize.indexOf('!stdSerializers.err') > -1\n ) stdErrSerialize = false\n\n const levels = ['error', 'fatal', 'warn', 'info', 'debug', 'trace']\n\n if (typeof proto === 'function') {\n proto.error = proto.fatal = proto.warn =\n proto.info = proto.debug = proto.trace = proto\n }\n if (opts.enabled === false) opts.level = 'silent'\n const level = opts.level || 'info'\n const logger = Object.create(proto)\n if (!logger.log) logger.log = noop\n\n Object.defineProperty(logger, 'levelVal', {\n get: getLevelVal\n })\n Object.defineProperty(logger, 'level', {\n get: getLevel,\n set: setLevel\n })\n\n const setOpts = {\n transmit,\n serialize,\n asObject: opts.browser.asObject,\n levels,\n timestamp: getTimeFunction(opts)\n }\n logger.levels = pino.levels\n logger.level = level\n\n logger.setMaxListeners = logger.getMaxListeners =\n logger.emit = logger.addListener = logger.on =\n logger.prependListener = logger.once =\n logger.prependOnceListener = logger.removeListener =\n logger.removeAllListeners = logger.listeners =\n logger.listenerCount = logger.eventNames =\n logger.write = logger.flush = noop\n logger.serializers = serializers\n logger._serialize = serialize\n logger._stdErrSerialize = stdErrSerialize\n logger.child = child\n\n if (transmit) logger._logEvent = createLogEventShape()\n\n function getLevelVal () {\n return this.level === 'silent'\n ? Infinity\n : this.levels.values[this.level]\n }\n\n function getLevel () {\n return this._level\n }\n function setLevel (level) {\n if (level !== 'silent' && !this.levels.values[level]) {\n throw Error('unknown level ' + level)\n }\n this._level = level\n\n set(setOpts, logger, 'error', 'log') // <-- must stay first\n set(setOpts, logger, 'fatal', 'error')\n set(setOpts, logger, 'warn', 'error')\n set(setOpts, logger, 'info', 'log')\n set(setOpts, logger, 'debug', 'log')\n set(setOpts, logger, 'trace', 'log')\n }\n\n function child (bindings, childOptions) {\n if (!bindings) {\n throw new Error('missing bindings for child Pino')\n }\n childOptions = childOptions || {}\n if (serialize && bindings.serializers) {\n childOptions.serializers = bindings.serializers\n }\n const childOptionsSerializers = childOptions.serializers\n if (serialize && childOptionsSerializers) {\n var childSerializers = Object.assign({}, serializers, childOptionsSerializers)\n var childSerialize = opts.browser.serialize === true\n ? Object.keys(childSerializers)\n : serialize\n delete bindings.serializers\n applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize)\n }\n function Child (parent) {\n this._childLevel = (parent._childLevel | 0) + 1\n this.error = bind(parent, bindings, 'error')\n this.fatal = bind(parent, bindings, 'fatal')\n this.warn = bind(parent, bindings, 'warn')\n this.info = bind(parent, bindings, 'info')\n this.debug = bind(parent, bindings, 'debug')\n this.trace = bind(parent, bindings, 'trace')\n if (childSerializers) {\n this.serializers = childSerializers\n this._serialize = childSerialize\n }\n if (transmit) {\n this._logEvent = createLogEventShape(\n [].concat(parent._logEvent.bindings, bindings)\n )\n }\n }\n Child.prototype = this\n return new Child(this)\n }\n return logger\n}\n\npino.levels = {\n values: {\n fatal: 60,\n error: 50,\n warn: 40,\n info: 30,\n debug: 20,\n trace: 10\n },\n labels: {\n 10: 'trace',\n 20: 'debug',\n 30: 'info',\n 40: 'warn',\n 50: 'error',\n 60: 'fatal'\n }\n}\n\npino.stdSerializers = stdSerializers\npino.stdTimeFunctions = Object.assign({}, { nullTime, epochTime, unixTime, isoTime })\n\nfunction set (opts, logger, level, fallback) {\n const proto = Object.getPrototypeOf(logger)\n logger[level] = logger.levelVal > logger.levels.values[level]\n ? noop\n : (proto[level] ? proto[level] : (_console[level] || _console[fallback] || noop))\n\n wrap(opts, logger, level)\n}\n\nfunction wrap (opts, logger, level) {\n if (!opts.transmit && logger[level] === noop) return\n\n logger[level] = (function (write) {\n return function LOG () {\n const ts = opts.timestamp()\n const args = new Array(arguments.length)\n const proto = (Object.getPrototypeOf && Object.getPrototypeOf(this) === _console) ? _console : this\n for (var i = 0; i < args.length; i++) args[i] = arguments[i]\n\n if (opts.serialize && !opts.asObject) {\n applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize)\n }\n if (opts.asObject) write.call(proto, asObject(this, level, args, ts))\n else write.apply(proto, args)\n\n if (opts.transmit) {\n const transmitLevel = opts.transmit.level || logger.level\n const transmitValue = pino.levels.values[transmitLevel]\n const methodValue = pino.levels.values[level]\n if (methodValue < transmitValue) return\n transmit(this, {\n ts,\n methodLevel: level,\n methodValue,\n transmitLevel,\n transmitValue: pino.levels.values[opts.transmit.level || logger.level],\n send: opts.transmit.send,\n val: logger.levelVal\n }, args)\n }\n }\n })(logger[level])\n}\n\nfunction asObject (logger, level, args, ts) {\n if (logger._serialize) applySerializers(args, logger._serialize, logger.serializers, logger._stdErrSerialize)\n const argsCloned = args.slice()\n let msg = argsCloned[0]\n const o = {}\n if (ts) {\n o.time = ts\n }\n o.level = pino.levels.values[level]\n let lvl = (logger._childLevel | 0) + 1\n if (lvl < 1) lvl = 1\n // deliberate, catching objects, arrays\n if (msg !== null && typeof msg === 'object') {\n while (lvl-- && typeof argsCloned[0] === 'object') {\n Object.assign(o, argsCloned.shift())\n }\n msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : undefined\n } else if (typeof msg === 'string') msg = format(argsCloned.shift(), argsCloned)\n if (msg !== undefined) o.msg = msg\n return o\n}\n\nfunction applySerializers (args, serialize, serializers, stdErrSerialize) {\n for (const i in args) {\n if (stdErrSerialize && args[i] instanceof Error) {\n args[i] = pino.stdSerializers.err(args[i])\n } else if (typeof args[i] === 'object' && !Array.isArray(args[i])) {\n for (const k in args[i]) {\n if (serialize && serialize.indexOf(k) > -1 && k in serializers) {\n args[i][k] = serializers[k](args[i][k])\n }\n }\n }\n }\n}\n\nfunction bind (parent, bindings, level) {\n return function () {\n const args = new Array(1 + arguments.length)\n args[0] = bindings\n for (var i = 1; i < args.length; i++) {\n args[i] = arguments[i - 1]\n }\n return parent[level].apply(this, args)\n }\n}\n\nfunction transmit (logger, opts, args) {\n const send = opts.send\n const ts = opts.ts\n const methodLevel = opts.methodLevel\n const methodValue = opts.methodValue\n const val = opts.val\n const bindings = logger._logEvent.bindings\n\n applySerializers(\n args,\n logger._serialize || Object.keys(logger.serializers),\n logger.serializers,\n logger._stdErrSerialize === undefined ? true : logger._stdErrSerialize\n )\n logger._logEvent.ts = ts\n logger._logEvent.messages = args.filter(function (arg) {\n // bindings can only be objects, so reference equality check via indexOf is fine\n return bindings.indexOf(arg) === -1\n })\n\n logger._logEvent.level.label = methodLevel\n logger._logEvent.level.value = methodValue\n\n send(methodLevel, logger._logEvent, val)\n\n logger._logEvent = createLogEventShape(bindings)\n}\n\nfunction createLogEventShape (bindings) {\n return {\n ts: 0,\n messages: [],\n bindings: bindings || [],\n level: { label: '', value: 0 }\n }\n}\n\nfunction asErrValue (err) {\n const obj = {\n type: err.constructor.name,\n msg: err.message,\n stack: err.stack\n }\n for (const key in err) {\n if (obj[key] === undefined) {\n obj[key] = err[key]\n }\n }\n return obj\n}\n\nfunction getTimeFunction (opts) {\n if (typeof opts.timestamp === 'function') {\n return opts.timestamp\n }\n if (opts.timestamp === false) {\n return nullTime\n }\n return epochTime\n}\n\nfunction mock () { return {} }\nfunction passthrough (a) { return a }\nfunction noop () {}\n\nfunction nullTime () { return false }\nfunction epochTime () { return Date.now() }\nfunction unixTime () { return Math.round(Date.now() / 1000.0) }\nfunction isoTime () { return new Date(Date.now()).toISOString() } // using Date.now() for testability\n\n/* eslint-disable */\n/* istanbul ignore next */\nfunction pfGlobalThisOrFallback () {\n function defd (o) { return typeof o !== 'undefined' && o }\n try {\n if (typeof globalThis !== 'undefined') return globalThis\n Object.defineProperty(Object.prototype, 'globalThis', {\n get: function () {\n delete Object.prototype.globalThis\n return (this.globalThis = this)\n },\n configurable: true\n })\n return globalThis\n } catch (e) {\n return defd(self) || defd(window) || defd(this) || {}\n }\n}\n/* eslint-enable */\n","import h,{levels as s}from\"pino\";import{default as U}from\"pino\";import{safeJsonStringify as u}from\"@walletconnect/safe-json\";const c={level:\"info\"},n=\"custom_context\",l=1e3*1024;class O{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class d{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const t=new O(e);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}}class L{constructor(e,t=l){this.level=e??\"error\",this.levelValue=s.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new d(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===s.values.error?console.error(e):t===s.values.warn?console.warn(e):t===s.values.debug?console.debug(e):t===s.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(u({timestamp:new Date().toISOString(),log:e}));const t=typeof e==\"string\"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new d(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(u({extraMetadata:e})),new Blob(t,{type:\"application/json\"})}}class m{constructor(e,t=l){this.baseChunkLogger=new L(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),o=document.createElement(\"a\");o.href=t,o.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(t)}}class B{constructor(e,t=l){this.baseChunkLogger=new L(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var x=Object.defineProperty,S=Object.defineProperties,_=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,f=(r,e,t)=>e in r?x(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))T.call(e,t)&&f(r,t,e[t]);if(p)for(var t of p(e))z.call(e,t)&&f(r,t,e[t]);return r},g=(r,e)=>S(r,_(e));function k(r){return g(i({},r),{level:r?.level||c.level})}function v(r,e=n){return r[e]||\"\"}function b(r,e,t=n){return r[t]=e,r}function y(r,e=n){let t=\"\";return typeof r.bindings>\"u\"?t=v(r,e):t=r.bindings().context||\"\",t}function w(r,e,t=n){const o=y(r,t);return o.trim()?`${o}/${e}`:e}function E(r,e,t=n){const o=w(r,e,t),a=r.child({context:o});return b(a,o,t)}function C(r){var e,t;const o=new m((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:h(g(i({},r.opts),{level:\"trace\",browser:g(i({},(t=r.opts)==null?void 0:t.browser),{write:a=>o.write(a)})})),chunkLoggerController:o}}function I(r){var e;const t=new B((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:h(g(i({},r.opts),{level:\"trace\"}),t),chunkLoggerController:t}}function A(r){return typeof r.loggerOverride<\"u\"&&typeof r.loggerOverride!=\"string\"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<\"u\"?C(r):I(r)}export{l as MAX_LOG_SIZE_IN_BYTES_DEFAULT,n as PINO_CUSTOM_CONTEXT_KEY,c as PINO_LOGGER_DEFAULTS,w as formatChildLoggerContext,E as generateChildLogger,C as generateClientLogger,A as generatePlatformLogger,I as generateServerLogger,v as getBrowserLoggerContext,k as getDefaultLoggerOptions,y as getLoggerContext,U as pino,b as setBrowserLoggerContext};\n//# sourceMappingURL=index.es.js.map\n","import{IEvents as e}from\"@walletconnect/events\";import c,{EventEmitter as i}from\"events\";class n extends e{constructor(s){super(),this.opts=s,this.protocol=\"wc\",this.version=2}}class l{constructor(s,t,o){this.core=s,this.logger=t}}class h extends e{constructor(s,t){super(),this.core=s,this.logger=t,this.records=new Map}}class a{constructor(s,t){this.logger=s,this.core=t}}class u extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class g extends e{constructor(s){super()}}class p{constructor(s,t,o,M){this.core=s,this.logger=t,this.name=o}}class I{constructor(){this.map=new Map}}class d extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class x{constructor(s,t){this.core=s,this.logger=t}}class E extends e{constructor(s,t){super(),this.core=s,this.logger=t}}class m{constructor(s,t){this.logger=s,this.core=t}}class y{constructor(s,t){this.projectId=s,this.logger=t}}class v{constructor(s,t){this.projectId=s,this.logger=t}}class C extends c{constructor(){super()}}class b{constructor(s){this.opts=s,this.protocol=\"wc\",this.version=2}}class S extends i{constructor(){super()}}class w{constructor(s){this.client=s}}export{n as ICore,l as ICrypto,v as IEchoClient,w as IEngine,S as IEngineEvents,E as IExpirer,h as IJsonRpcHistory,x as IKeyChain,a as IMessageTracker,m as IPairing,u as IPublisher,g as IRelayer,b as ISignClient,C as ISignClientEvents,p as IStore,d as ISubscriber,I as ISubscriberTopicMap,y as IVerify};\n//# sourceMappingURL=index.es.js.map\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 64;\nexports.BLOCK_SIZE = 128;\n/**\n * SHA-2-512 cryptographic hash algorithm.\n */\nvar SHA512 = /** @class */ (function () {\n function SHA512() {\n /** Length of hash output */\n this.digestLength = exports.DIGEST_LENGTH;\n /** Block size */\n this.blockSize = exports.BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this._stateHi = new Int32Array(8); // hash state, high bytes\n this._stateLo = new Int32Array(8); // hash state, low bytes\n this._tempHi = new Int32Array(16); // temporary state, high bytes\n this._tempLo = new Int32Array(16); // temporary state, low bytes\n this._buffer = new Uint8Array(256); // buffer for data to hash\n this._bufferLength = 0; // number of bytes in buffer\n this._bytesHashed = 0; // number of total bytes hashed\n this._finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n SHA512.prototype._initState = function () {\n this._stateHi[0] = 0x6a09e667;\n this._stateHi[1] = 0xbb67ae85;\n this._stateHi[2] = 0x3c6ef372;\n this._stateHi[3] = 0xa54ff53a;\n this._stateHi[4] = 0x510e527f;\n this._stateHi[5] = 0x9b05688c;\n this._stateHi[6] = 0x1f83d9ab;\n this._stateHi[7] = 0x5be0cd19;\n this._stateLo[0] = 0xf3bcc908;\n this._stateLo[1] = 0x84caa73b;\n this._stateLo[2] = 0xfe94f82b;\n this._stateLo[3] = 0x5f1d36f1;\n this._stateLo[4] = 0xade682d1;\n this._stateLo[5] = 0x2b3e6c1f;\n this._stateLo[6] = 0xfb41bd6b;\n this._stateLo[7] = 0x137e2179;\n };\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n SHA512.prototype.reset = function () {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n };\n /**\n * Cleans internal buffers and resets hash state.\n */\n SHA512.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._tempHi);\n wipe_1.wipe(this._tempLo);\n this.reset();\n };\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n SHA512.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this._finished) {\n throw new Error(\"SHA512: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < exports.BLOCK_SIZE && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n SHA512.prototype.finish = function (out) {\n if (!this._finished) {\n var bytesHashed = this._bytesHashed;\n var left = this._bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 128 < 112) ? 128 : 256;\n this._buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);\n binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (var i = 0; i < this.digestLength / 8; i++) {\n binary_1.writeUint32BE(this._stateHi[i], out, i * 8);\n binary_1.writeUint32BE(this._stateLo[i], out, i * 8 + 4);\n }\n return this;\n };\n /**\n * Returns the final hash digest.\n */\n SHA512.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization. Returns hash state to be\n * used with restoreState(). Only chain value is saved, not buffers or\n * other state variables.\n */\n SHA512.prototype.saveState = function () {\n if (this._finished) {\n throw new Error(\"SHA256: cannot save finished state\");\n }\n return {\n stateHi: new Int32Array(this._stateHi),\n stateLo: new Int32Array(this._stateLo),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization. Restores state saved by\n * saveState() and sets bytesHashed to the given value.\n */\n SHA512.prototype.restoreState = function (savedState) {\n this._stateHi.set(savedState.stateHi);\n this._stateLo.set(savedState.stateLo);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n };\n /**\n * Cleans state returned by saveState().\n */\n SHA512.prototype.cleanSavedState = function (savedState) {\n wipe_1.wipe(savedState.stateHi);\n wipe_1.wipe(savedState.stateLo);\n if (savedState.buffer) {\n wipe_1.wipe(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n };\n return SHA512;\n}());\nexports.SHA512 = SHA512;\n// Constants\nvar K = new Int32Array([\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]);\nfunction hashBlocks(wh, wl, hh, hl, m, pos, len) {\n var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];\n var h, l;\n var th, tl;\n var a, b, c, d;\n while (len >= 128) {\n for (var i = 0; i < 16; i++) {\n var j = 8 * i + pos;\n wh[i] = binary_1.readUint32BE(m, j);\n wl[i] = binary_1.readUint32BE(m, j + 4);\n }\n for (var i = 0; i < 80; i++) {\n var bh0 = ah0;\n var bh1 = ah1;\n var bh2 = ah2;\n var bh3 = ah3;\n var bh4 = ah4;\n var bh5 = ah5;\n var bh6 = ah6;\n var bh7 = ah7;\n var bl0 = al0;\n var bl1 = al1;\n var bl2 = al2;\n var bl3 = al3;\n var bl4 = al4;\n var bl5 = al5;\n var bl6 = al6;\n var bl7 = al7;\n // add\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma1\n h = ((ah4 >>> 14) | (al4 << (32 - 14))) ^ ((ah4 >>> 18) |\n (al4 << (32 - 18))) ^ ((al4 >>> (41 - 32)) | (ah4 << (32 - (41 - 32))));\n l = ((al4 >>> 14) | (ah4 << (32 - 14))) ^ ((al4 >>> 18) |\n (ah4 << (32 - 18))) ^ ((ah4 >>> (41 - 32)) | (al4 << (32 - (41 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // K\n h = K[i * 2];\n l = K[i * 2 + 1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // w\n h = wh[i % 16];\n l = wl[i % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n th = c & 0xffff | d << 16;\n tl = a & 0xffff | b << 16;\n // add\n h = th;\n l = tl;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma0\n h = ((ah0 >>> 28) | (al0 << (32 - 28))) ^ ((al0 >>> (34 - 32)) |\n (ah0 << (32 - (34 - 32)))) ^ ((al0 >>> (39 - 32)) | (ah0 << (32 - (39 - 32))));\n l = ((al0 >>> 28) | (ah0 << (32 - 28))) ^ ((ah0 >>> (34 - 32)) |\n (al0 << (32 - (34 - 32)))) ^ ((ah0 >>> (39 - 32)) | (al0 << (32 - (39 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n // add\n h = bh3;\n l = bl3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = th;\n l = tl;\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n if (i % 16 === 15) {\n for (var j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = wh[(j + 9) % 16];\n l = wl[(j + 9) % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma0\n th = wh[(j + 1) % 16];\n tl = wl[(j + 1) % 16];\n h = ((th >>> 1) | (tl << (32 - 1))) ^ ((th >>> 8) |\n (tl << (32 - 8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32 - 1))) ^ ((tl >>> 8) |\n (th << (32 - 8))) ^ ((tl >>> 7) | (th << (32 - 7)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma1\n th = wh[(j + 14) % 16];\n tl = wl[(j + 14) % 16];\n h = ((th >>> 19) | (tl << (32 - 19))) ^ ((tl >>> (61 - 32)) |\n (th << (32 - (61 - 32)))) ^ (th >>> 6);\n l = ((tl >>> 19) | (th << (32 - 19))) ^ ((th >>> (61 - 32)) |\n (tl << (32 - (61 - 32)))) ^ ((tl >>> 6) | (th << (32 - 6)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n // add\n h = ah0;\n l = al0;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[0];\n l = hl[0];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n h = ah1;\n l = al1;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[1];\n l = hl[1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n h = ah2;\n l = al2;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[2];\n l = hl[2];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n h = ah3;\n l = al3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[3];\n l = hl[3];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n h = ah4;\n l = al4;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[4];\n l = hl[4];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n h = ah5;\n l = al5;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[5];\n l = hl[5];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n h = ah6;\n l = al6;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[6];\n l = hl[6];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[7];\n l = hl[7];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n pos += 128;\n len -= 128;\n }\n return pos;\n}\nfunction hash(data) {\n var h = new SHA512();\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n//# sourceMappingURL=sha512.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = exports.verify = exports.sign = exports.extractPublicKeyFromSecretKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.SEED_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = exports.SIGNATURE_LENGTH = void 0;\n/**\n * Package ed25519 implements Ed25519 public-key signature algorithm.\n */\nconst random_1 = require(\"@stablelib/random\");\nconst sha512_1 = require(\"@stablelib/sha512\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.SIGNATURE_LENGTH = 64;\nexports.PUBLIC_KEY_LENGTH = 32;\nexports.SECRET_KEY_LENGTH = 64;\nexports.SEED_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst gf0 = gf();\nconst gf1 = gf([1]);\nconst D = gf([\n 0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070,\n 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203\n]);\nconst D2 = gf([\n 0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0,\n 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406\n]);\nconst X = gf([\n 0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c,\n 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169\n]);\nconst Y = gf([\n 0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666,\n 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666\n]);\nconst I = gf([\n 0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43,\n 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83\n]);\nfunction set25519(r, a) {\n for (let i = 0; i < 16; i++) {\n r[i] = a[i] | 0;\n }\n}\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction verify32(x, y) {\n let d = 0;\n for (let i = 0; i < 32; i++) {\n d |= x[i] ^ y[i];\n }\n return (1 & ((d - 1) >>> 8)) - 1;\n}\nfunction neq25519(a, b) {\n const c = new Uint8Array(32);\n const d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return verify32(c, d);\n}\nfunction par25519(a) {\n const d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 253; a >= 0; a--) {\n square(c, c);\n if (a !== 2 && a !== 4) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction pow2523(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 250; a >= 0; a--) {\n square(c, c);\n if (a !== 1) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction edadd(p, q) {\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf();\n sub(a, p[1], p[0]);\n sub(t, q[1], q[0]);\n mul(a, a, t);\n add(b, p[0], p[1]);\n add(t, q[0], q[1]);\n mul(b, b, t);\n mul(c, p[3], q[3]);\n mul(c, c, D2);\n mul(d, p[2], q[2]);\n add(d, d, d);\n sub(e, b, a);\n sub(f, d, c);\n add(g, d, c);\n add(h, b, a);\n mul(p[0], e, f);\n mul(p[1], h, g);\n mul(p[2], g, f);\n mul(p[3], e, h);\n}\nfunction cswap(p, q, b) {\n for (let i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\nfunction pack(r, p) {\n const tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n mul(tx, p[0], zi);\n mul(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\nfunction scalarmult(p, q, s) {\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (let i = 255; i >= 0; --i) {\n const b = (s[(i / 8) | 0] >> (i & 7)) & 1;\n cswap(p, q, b);\n edadd(q, p);\n edadd(p, p);\n cswap(p, q, b);\n }\n}\nfunction scalarbase(p, s) {\n const q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n mul(q[3], X, Y);\n scalarmult(p, q, s);\n}\n// Generates key pair from secret 32-byte seed.\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== exports.SEED_LENGTH) {\n throw new Error(`ed25519: seed must be ${exports.SEED_LENGTH} bytes`);\n }\n const d = (0, sha512_1.hash)(seed);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const publicKey = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n scalarbase(p, d);\n pack(publicKey, p);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n}\nexports.generateKeyPairFromSeed = generateKeyPairFromSeed;\nfunction generateKeyPair(prng) {\n const seed = (0, random_1.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0, wipe_1.wipe)(seed);\n return result;\n}\nexports.generateKeyPair = generateKeyPair;\nfunction extractPublicKeyFromSecretKey(secretKey) {\n if (secretKey.length !== exports.SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${exports.SECRET_KEY_LENGTH} bytes`);\n }\n return new Uint8Array(secretKey.subarray(32));\n}\nexports.extractPublicKeyFromSecretKey = extractPublicKeyFromSecretKey;\nconst L = new Float64Array([\n 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2,\n 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10\n]);\nfunction modL(r, x) {\n let carry;\n let i;\n let j;\n let k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = Math.floor((x[j] + 128) / 256);\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++) {\n x[j] -= carry * L[j];\n }\n for (i = 0; i < 32; i++) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\nfunction reduce(r) {\n const x = new Float64Array(64);\n for (let i = 0; i < 64; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 64; i++) {\n r[i] = 0;\n }\n modL(r, x);\n}\n// Returns 64-byte signature of the message under the 64-byte secret key.\nfunction sign(secretKey, message) {\n const x = new Float64Array(64);\n const p = [gf(), gf(), gf(), gf()];\n const d = (0, sha512_1.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const signature = new Uint8Array(64);\n signature.set(d.subarray(32), 32);\n const hs = new sha512_1.SHA512();\n hs.update(signature.subarray(32));\n hs.update(message);\n const r = hs.digest();\n hs.clean();\n reduce(r);\n scalarbase(p, r);\n pack(signature, p);\n hs.reset();\n hs.update(signature.subarray(0, 32));\n hs.update(secretKey.subarray(32));\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n for (let i = 0; i < 32; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 32; i++) {\n for (let j = 0; j < 32; j++) {\n x[i + j] += h[i] * d[j];\n }\n }\n modL(signature.subarray(32), x);\n return signature;\n}\nexports.sign = sign;\nfunction unpackneg(r, p) {\n const t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n square(num, r[1]);\n mul(den, num, D);\n sub(num, num, r[2]);\n add(den, r[2], den);\n square(den2, den);\n square(den4, den2);\n mul(den6, den4, den2);\n mul(t, den6, num);\n mul(t, t, den);\n pow2523(t, t);\n mul(t, t, num);\n mul(t, t, den);\n mul(t, t, den);\n mul(r[0], t, den);\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n mul(r[0], r[0], I);\n }\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n return -1;\n }\n if (par25519(r[0]) === (p[31] >> 7)) {\n sub(r[0], gf0, r[0]);\n }\n mul(r[3], r[0], r[1]);\n return 0;\n}\nfunction verify(publicKey, message, signature) {\n const t = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n const q = [gf(), gf(), gf(), gf()];\n if (signature.length !== exports.SIGNATURE_LENGTH) {\n throw new Error(`ed25519: signature must be ${exports.SIGNATURE_LENGTH} bytes`);\n }\n if (unpackneg(q, publicKey)) {\n return false;\n }\n const hs = new sha512_1.SHA512();\n hs.update(signature.subarray(0, 32));\n hs.update(publicKey);\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n scalarmult(p, q, h);\n scalarbase(q, signature.subarray(32));\n edadd(p, q);\n pack(t, p);\n if (verify32(signature, t)) {\n return false;\n }\n return true;\n}\nexports.verify = verify;\n/**\n * Convert Ed25519 public key to X25519 public key.\n *\n * Throws if given an invalid public key.\n */\nfunction convertPublicKeyToX25519(publicKey) {\n let q = [gf(), gf(), gf(), gf()];\n if (unpackneg(q, publicKey)) {\n throw new Error(\"Ed25519: invalid public key\");\n }\n // Formula: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p\n let a = gf();\n let b = gf();\n let y = q[1];\n add(a, gf1, y);\n sub(b, gf1, y);\n inv25519(b, b);\n mul(a, a, b);\n let z = new Uint8Array(32);\n pack25519(z, a);\n return z;\n}\nexports.convertPublicKeyToX25519 = convertPublicKeyToX25519;\n/**\n * Convert Ed25519 secret (private) key to X25519 secret key.\n */\nfunction convertSecretKeyToX25519(secretKey) {\n const d = (0, sha512_1.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const o = new Uint8Array(d.subarray(0, 32));\n (0, wipe_1.wipe)(d);\n return o;\n}\nexports.convertSecretKeyToX25519 = convertSecretKeyToX25519;\n//# sourceMappingURL=ed25519.js.map","export const JWT_IRIDIUM_ALG = \"EdDSA\";\nexport const JWT_IRIDIUM_TYP = \"JWT\";\nexport const JWT_DELIMITER = \".\";\nexport const JWT_ENCODING = \"base64url\";\nexport const JSON_ENCODING = \"utf8\";\nexport const DATA_ENCODING = \"utf8\";\nexport const DID_DELIMITER = \":\";\nexport const DID_PREFIX = \"did\";\nexport const DID_METHOD = \"key\";\nexport const MULTICODEC_ED25519_ENCODING = \"base58btc\";\nexport const MULTICODEC_ED25519_BASE = \"z\";\nexport const MULTICODEC_ED25519_HEADER = \"K36\";\nexport const MULTICODEC_ED25519_LENGTH = 32;\nexport const KEY_PAIR_SEED_LENGTH = 32;\n//# sourceMappingURL=constants.js.map","import { concat } from \"uint8arrays/concat\";\nimport { toString } from \"uint8arrays/to-string\";\nimport { fromString } from \"uint8arrays/from-string\";\nimport { safeJsonParse, safeJsonStringify } from \"@walletconnect/safe-json\";\nimport { DATA_ENCODING, DID_DELIMITER, DID_METHOD, DID_PREFIX, JSON_ENCODING, JWT_DELIMITER, JWT_ENCODING, MULTICODEC_ED25519_BASE, MULTICODEC_ED25519_ENCODING, MULTICODEC_ED25519_HEADER, MULTICODEC_ED25519_LENGTH, } from \"./constants\";\nexport function decodeJSON(str) {\n return safeJsonParse(toString(fromString(str, JWT_ENCODING), JSON_ENCODING));\n}\nexport function encodeJSON(val) {\n return toString(fromString(safeJsonStringify(val), JSON_ENCODING), JWT_ENCODING);\n}\nexport function encodeIss(publicKey) {\n const header = fromString(MULTICODEC_ED25519_HEADER, MULTICODEC_ED25519_ENCODING);\n const multicodec = MULTICODEC_ED25519_BASE +\n toString(concat([header, publicKey]), MULTICODEC_ED25519_ENCODING);\n return [DID_PREFIX, DID_METHOD, multicodec].join(DID_DELIMITER);\n}\nexport function decodeIss(issuer) {\n const [prefix, method, multicodec] = issuer.split(DID_DELIMITER);\n if (prefix !== DID_PREFIX || method !== DID_METHOD) {\n throw new Error(`Issuer must be a DID with method \"key\"`);\n }\n const base = multicodec.slice(0, 1);\n if (base !== MULTICODEC_ED25519_BASE) {\n throw new Error(`Issuer must be a key in mulicodec format`);\n }\n const bytes = fromString(multicodec.slice(1), MULTICODEC_ED25519_ENCODING);\n const type = toString(bytes.slice(0, 2), MULTICODEC_ED25519_ENCODING);\n if (type !== MULTICODEC_ED25519_HEADER) {\n throw new Error(`Issuer must be a public key with type \"Ed25519\"`);\n }\n const publicKey = bytes.slice(2);\n if (publicKey.length !== MULTICODEC_ED25519_LENGTH) {\n throw new Error(`Issuer must be a public key with length 32 bytes`);\n }\n return publicKey;\n}\nexport function encodeSig(bytes) {\n return toString(bytes, JWT_ENCODING);\n}\nexport function decodeSig(encoded) {\n return fromString(encoded, JWT_ENCODING);\n}\nexport function encodeData(params) {\n return fromString([encodeJSON(params.header), encodeJSON(params.payload)].join(JWT_DELIMITER), DATA_ENCODING);\n}\nexport function decodeData(data) {\n const params = toString(data, DATA_ENCODING).split(JWT_DELIMITER);\n const header = decodeJSON(params[0]);\n const payload = decodeJSON(params[1]);\n return { header, payload };\n}\nexport function encodeJWT(params) {\n return [\n encodeJSON(params.header),\n encodeJSON(params.payload),\n encodeSig(params.signature),\n ].join(JWT_DELIMITER);\n}\nexport function decodeJWT(jwt) {\n const params = jwt.split(JWT_DELIMITER);\n const header = decodeJSON(params[0]);\n const payload = decodeJSON(params[1]);\n const signature = decodeSig(params[2]);\n const data = fromString(params.slice(0, 2).join(JWT_DELIMITER), DATA_ENCODING);\n return { header, payload, signature, data };\n}\n//# sourceMappingURL=utils.js.map","import * as ed25519 from \"@stablelib/ed25519\";\nimport { randomBytes } from \"@stablelib/random\";\nimport { fromMiliseconds } from \"@walletconnect/time\";\nimport { JWT_IRIDIUM_ALG, JWT_IRIDIUM_TYP, KEY_PAIR_SEED_LENGTH, } from \"./constants\";\nimport { decodeIss, decodeJWT, encodeData, encodeIss, encodeJWT, } from \"./utils\";\nexport function generateKeyPair(seed = randomBytes(KEY_PAIR_SEED_LENGTH)) {\n return ed25519.generateKeyPairFromSeed(seed);\n}\nexport async function signJWT(sub, aud, ttl, keyPair, iat = fromMiliseconds(Date.now())) {\n const header = { alg: JWT_IRIDIUM_ALG, typ: JWT_IRIDIUM_TYP };\n const iss = encodeIss(keyPair.publicKey);\n const exp = iat + ttl;\n const payload = { iss, sub, aud, iat, exp };\n const data = encodeData({ header, payload });\n const signature = ed25519.sign(keyPair.secretKey, data);\n return encodeJWT({ header, payload, signature });\n}\nexport async function verifyJWT(jwt) {\n const { header, payload, data, signature } = decodeJWT(jwt);\n if (header.alg !== JWT_IRIDIUM_ALG || header.typ !== JWT_IRIDIUM_TYP) {\n throw new Error(\"JWT must use EdDSA algorithm\");\n }\n const publicKey = decodeIss(payload.iss);\n return ed25519.verify(publicKey, data, signature);\n}\n//# sourceMappingURL=api.js.map","export const PARSE_ERROR = \"PARSE_ERROR\";\nexport const INVALID_REQUEST = \"INVALID_REQUEST\";\nexport const METHOD_NOT_FOUND = \"METHOD_NOT_FOUND\";\nexport const INVALID_PARAMS = \"INVALID_PARAMS\";\nexport const INTERNAL_ERROR = \"INTERNAL_ERROR\";\nexport const SERVER_ERROR = \"SERVER_ERROR\";\nexport const RESERVED_ERROR_CODES = [-32700, -32600, -32601, -32602, -32603];\nexport const SERVER_ERROR_CODE_RANGE = [-32000, -32099];\nexport const STANDARD_ERROR_MAP = {\n [PARSE_ERROR]: { code: -32700, message: \"Parse error\" },\n [INVALID_REQUEST]: { code: -32600, message: \"Invalid Request\" },\n [METHOD_NOT_FOUND]: { code: -32601, message: \"Method not found\" },\n [INVALID_PARAMS]: { code: -32602, message: \"Invalid params\" },\n [INTERNAL_ERROR]: { code: -32603, message: \"Internal error\" },\n [SERVER_ERROR]: { code: -32000, message: \"Server error\" },\n};\nexport const DEFAULT_ERROR = SERVER_ERROR;\n//# sourceMappingURL=constants.js.map","import { SERVER_ERROR_CODE_RANGE, RESERVED_ERROR_CODES, STANDARD_ERROR_MAP, DEFAULT_ERROR, } from \"./constants\";\nexport function isServerErrorCode(code) {\n return code <= SERVER_ERROR_CODE_RANGE[0] && code >= SERVER_ERROR_CODE_RANGE[1];\n}\nexport function isReservedErrorCode(code) {\n return RESERVED_ERROR_CODES.includes(code);\n}\nexport function isValidErrorCode(code) {\n return typeof code === \"number\";\n}\nexport function getError(type) {\n if (!Object.keys(STANDARD_ERROR_MAP).includes(type)) {\n return STANDARD_ERROR_MAP[DEFAULT_ERROR];\n }\n return STANDARD_ERROR_MAP[type];\n}\nexport function getErrorByCode(code) {\n const match = Object.values(STANDARD_ERROR_MAP).find(e => e.code === code);\n if (!match) {\n return STANDARD_ERROR_MAP[DEFAULT_ERROR];\n }\n return match;\n}\nexport function validateJsonRpcError(response) {\n if (typeof response.error.code === \"undefined\") {\n return { valid: false, error: \"Missing code for JSON-RPC error\" };\n }\n if (typeof response.error.message === \"undefined\") {\n return { valid: false, error: \"Missing message for JSON-RPC error\" };\n }\n if (!isValidErrorCode(response.error.code)) {\n return {\n valid: false,\n error: `Invalid error code type for JSON-RPC: ${response.error.code}`,\n };\n }\n if (isReservedErrorCode(response.error.code)) {\n const error = getErrorByCode(response.error.code);\n if (error.message !== STANDARD_ERROR_MAP[DEFAULT_ERROR].message &&\n response.error.message === error.message) {\n return {\n valid: false,\n error: `Invalid error code message for JSON-RPC: ${response.error.code}`,\n };\n }\n }\n return { valid: true };\n}\nexport function parseConnectionError(e, url, type) {\n return e.message.includes(\"getaddrinfo ENOTFOUND\") || e.message.includes(\"connect ECONNREFUSED\")\n ? new Error(`Unavailable ${type} RPC url at ${url}`)\n : e;\n}\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBrowserCryptoAvailable = exports.getSubtleCrypto = exports.getBrowerCrypto = void 0;\nfunction getBrowerCrypto() {\n return (global === null || global === void 0 ? void 0 : global.crypto) || (global === null || global === void 0 ? void 0 : global.msCrypto) || {};\n}\nexports.getBrowerCrypto = getBrowerCrypto;\nfunction getSubtleCrypto() {\n const browserCrypto = getBrowerCrypto();\n return browserCrypto.subtle || browserCrypto.webkitSubtle;\n}\nexports.getSubtleCrypto = getSubtleCrypto;\nfunction isBrowserCryptoAvailable() {\n return !!getBrowerCrypto() && !!getSubtleCrypto();\n}\nexports.isBrowserCryptoAvailable = isBrowserCryptoAvailable;\n//# sourceMappingURL=crypto.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBrowser = exports.isNode = exports.isReactNative = void 0;\nfunction isReactNative() {\n return (typeof document === \"undefined\" &&\n typeof navigator !== \"undefined\" &&\n navigator.product === \"ReactNative\");\n}\nexports.isReactNative = isReactNative;\nfunction isNode() {\n return (typeof process !== \"undefined\" &&\n typeof process.versions !== \"undefined\" &&\n typeof process.versions.node !== \"undefined\");\n}\nexports.isNode = isNode;\nfunction isBrowser() {\n return !isReactNative() && !isNode();\n}\nexports.isBrowser = isBrowser;\n//# sourceMappingURL=env.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./crypto\"), exports);\ntslib_1.__exportStar(require(\"./env\"), exports);\n//# sourceMappingURL=index.js.map","import { getError, getErrorByCode, isReservedErrorCode } from \"./error\";\nimport { INTERNAL_ERROR, SERVER_ERROR } from \"./constants\";\nexport function payloadId(entropy = 3) {\n const date = Date.now() * Math.pow(10, entropy);\n const extra = Math.floor(Math.random() * Math.pow(10, entropy));\n return date + extra;\n}\nexport function getBigIntRpcId(entropy = 6) {\n return BigInt(payloadId(entropy));\n}\nexport function formatJsonRpcRequest(method, params, id) {\n return {\n id: id || payloadId(),\n jsonrpc: \"2.0\",\n method,\n params,\n };\n}\nexport function formatJsonRpcResult(id, result) {\n return {\n id,\n jsonrpc: \"2.0\",\n result,\n };\n}\nexport function formatJsonRpcError(id, error, data) {\n return {\n id,\n jsonrpc: \"2.0\",\n error: formatErrorMessage(error, data),\n };\n}\nexport function formatErrorMessage(error, data) {\n if (typeof error === \"undefined\") {\n return getError(INTERNAL_ERROR);\n }\n if (typeof error === \"string\") {\n error = Object.assign(Object.assign({}, getError(SERVER_ERROR)), { message: error });\n }\n if (typeof data !== \"undefined\") {\n error.data = data;\n }\n if (isReservedErrorCode(error.code)) {\n error = getErrorByCode(error.code);\n }\n return error;\n}\n//# sourceMappingURL=format.js.map","export class IEvents {\n}\n//# sourceMappingURL=misc.js.map","import { IEvents } from \"./misc\";\nexport class IJsonRpcConnection extends IEvents {\n constructor(opts) {\n super();\n }\n}\nexport class IBaseJsonRpcProvider extends IEvents {\n constructor() {\n super();\n }\n}\nexport class IJsonRpcProvider extends IBaseJsonRpcProvider {\n constructor(connection) {\n super();\n }\n}\n//# sourceMappingURL=provider.js.map","const HTTP_REGEX = \"^https?:\";\nconst WS_REGEX = \"^wss?:\";\nfunction getUrlProtocol(url) {\n const matches = url.match(new RegExp(/^\\w+:/, \"gi\"));\n if (!matches || !matches.length)\n return;\n return matches[0];\n}\nfunction matchRegexProtocol(url, regex) {\n const protocol = getUrlProtocol(url);\n if (typeof protocol === \"undefined\")\n return false;\n return new RegExp(regex).test(protocol);\n}\nexport function isHttpUrl(url) {\n return matchRegexProtocol(url, HTTP_REGEX);\n}\nexport function isWsUrl(url) {\n return matchRegexProtocol(url, WS_REGEX);\n}\nexport function isLocalhostUrl(url) {\n return new RegExp(\"wss?://localhost(:d{2,5})?\").test(url);\n}\n//# sourceMappingURL=url.js.map","export function isJsonRpcPayload(payload) {\n return (typeof payload === \"object\" &&\n \"id\" in payload &&\n \"jsonrpc\" in payload &&\n payload.jsonrpc === \"2.0\");\n}\nexport function isJsonRpcRequest(payload) {\n return isJsonRpcPayload(payload) && \"method\" in payload;\n}\nexport function isJsonRpcResponse(payload) {\n return isJsonRpcPayload(payload) && (isJsonRpcResult(payload) || isJsonRpcError(payload));\n}\nexport function isJsonRpcResult(payload) {\n return \"result\" in payload;\n}\nexport function isJsonRpcError(payload) {\n return \"error\" in payload;\n}\nexport function isJsonRpcValidationInvalid(validation) {\n return \"error\" in validation && validation.valid === false;\n}\n//# sourceMappingURL=validators.js.map","import { EventEmitter } from \"events\";\nimport { IJsonRpcProvider, isJsonRpcResponse, formatJsonRpcRequest, isJsonRpcError, getBigIntRpcId, } from \"@walletconnect/jsonrpc-utils\";\nexport class JsonRpcProvider extends IJsonRpcProvider {\n constructor(connection) {\n super(connection);\n this.events = new EventEmitter();\n this.hasRegisteredEventListeners = false;\n this.connection = this.setConnection(connection);\n if (this.connection.connected) {\n this.registerEventListeners();\n }\n }\n async connect(connection = this.connection) {\n await this.open(connection);\n }\n async disconnect() {\n await this.close();\n }\n on(event, listener) {\n this.events.on(event, listener);\n }\n once(event, listener) {\n this.events.once(event, listener);\n }\n off(event, listener) {\n this.events.off(event, listener);\n }\n removeListener(event, listener) {\n this.events.removeListener(event, listener);\n }\n async request(request, context) {\n return this.requestStrict(formatJsonRpcRequest(request.method, request.params || [], request.id || getBigIntRpcId().toString()), context);\n }\n async requestStrict(request, context) {\n return new Promise(async (resolve, reject) => {\n if (!this.connection.connected) {\n try {\n await this.open();\n }\n catch (e) {\n reject(e);\n }\n }\n this.events.on(`${request.id}`, response => {\n if (isJsonRpcError(response)) {\n reject(response.error);\n }\n else {\n resolve(response.result);\n }\n });\n try {\n await this.connection.send(request, context);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n setConnection(connection = this.connection) {\n return connection;\n }\n onPayload(payload) {\n this.events.emit(\"payload\", payload);\n if (isJsonRpcResponse(payload)) {\n this.events.emit(`${payload.id}`, payload);\n }\n else {\n this.events.emit(\"message\", {\n type: payload.method,\n data: payload.params,\n });\n }\n }\n onClose(event) {\n if (event && event.code === 3000) {\n this.events.emit(\"error\", new Error(`WebSocket connection closed abnormally with code: ${event.code} ${event.reason ? `(${event.reason})` : \"\"}`));\n }\n this.events.emit(\"disconnect\");\n }\n async open(connection = this.connection) {\n if (this.connection === connection && this.connection.connected)\n return;\n if (this.connection.connected)\n this.close();\n if (typeof connection === \"string\") {\n await this.connection.open(connection);\n connection = this.connection;\n }\n this.connection = this.setConnection(connection);\n await this.connection.open();\n this.registerEventListeners();\n this.events.emit(\"connect\");\n }\n async close() {\n await this.connection.close();\n }\n registerEventListeners() {\n if (this.hasRegisteredEventListeners)\n return;\n this.connection.on(\"payload\", (payload) => this.onPayload(payload));\n this.connection.on(\"close\", (event) => this.onClose(event));\n this.connection.on(\"error\", (error) => this.events.emit(\"error\", error));\n this.connection.on(\"register_error\", (error) => this.onClose());\n this.hasRegisteredEventListeners = true;\n }\n}\nexport default JsonRpcProvider;\n//# sourceMappingURL=provider.js.map","import{EventEmitter as u}from\"events\";import{safeJsonStringify as p,safeJsonParse as g}from\"@walletconnect/safe-json\";import{isWsUrl as d,isReactNative as y,isLocalhostUrl as m,formatJsonRpcError as k,parseConnectionError as v}from\"@walletconnect/jsonrpc-utils\";const w=()=>typeof WebSocket<\"u\"?WebSocket:typeof global<\"u\"&&typeof global.WebSocket<\"u\"?global.WebSocket:typeof window<\"u\"&&typeof window.WebSocket<\"u\"?window.WebSocket:typeof self<\"u\"&&typeof self.WebSocket<\"u\"?self.WebSocket:require(\"ws\"),b=()=>typeof WebSocket<\"u\"||typeof global<\"u\"&&typeof global.WebSocket<\"u\"||typeof window<\"u\"&&typeof window.WebSocket<\"u\"||typeof self<\"u\"&&typeof self.WebSocket<\"u\",a=c=>c.split(\"?\")[0],h=10,S=w();class f{constructor(e){if(this.url=e,this.events=new u,this.registering=!1,!d(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<\"u\"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>\"u\"){t(new Error(\"Connection already closed\"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>\"u\"&&(this.socket=await this.register());try{this.socket.send(p(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!d(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount(\"register_error\")>=t||this.events.listenerCount(\"open\")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,o)=>{this.events.once(\"register_error\",s=>{this.resetMaxListeners(),o(s)}),this.events.once(\"open\",()=>{if(this.resetMaxListeners(),typeof this.socket>\"u\")return o(new Error(\"WebSocket connection is missing or invalid\"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const o=new URLSearchParams(e).get(\"origin\"),s=y()?{headers:{origin:o}}:{rejectUnauthorized:!m(e)},i=new S(e,[],s);b()?i.onerror=r=>{const l=r;n(this.emitError(l.error))}:i.on(\"error\",r=>{n(this.emitError(r))}),i.onopen=()=>{this.onOpen(i),t(i)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit(\"open\")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit(\"close\",e)}onPayload(e){if(typeof e.data>\"u\")return;const t=typeof e.data==\"string\"?g(e.data):e.data;this.events.emit(\"payload\",t)}onError(e,t){const n=this.parseError(t),o=n.message||n.toString(),s=k(e,o);this.events.emit(\"payload\",s)}parseError(e,t=this.url){return v(e,a(t),\"WS\")}resetMaxListeners(){this.events.getMaxListeners()>h&&this.events.setMaxListeners(h)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${a(this.url)}`));return this.events.emit(\"register_error\",t),t}}export{f as WsConnection,f as default};\n//# sourceMappingURL=index.es.js.map\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","export default function(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||\"get\",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t}),t(a())},s.onerror=r,s.withCredentials=\"include\"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null)})}\n//# sourceMappingURL=unfetch.module.js.map\n","module.exports = self.fetch || (self.fetch = require('unfetch').default || require('unfetch'));\n","import Xt,{EventEmitter as U}from\"events\";import Wt from\"@walletconnect/keyvaluestorage\";import{HEARTBEAT_EVENTS as G,HeartBeat as Qt}from\"@walletconnect/heartbeat\";import{generateChildLogger as b,getLoggerContext as E,pino as ye,getDefaultLoggerOptions as me}from\"@walletconnect/logger\";import{IMessageTracker as Zt,IPublisher as ei,ISubscriber as ti,IRelayer as ii,IStore as si,IJsonRpcHistory as ri,IExpirer as ni,IVerify as oi,IEchoClient as ai,ICore as hi}from\"@walletconnect/types\";import{safeJsonStringify as ci,safeJsonParse as ui}from\"@walletconnect/safe-json\";import*as Y from\"@walletconnect/relay-auth\";import{getInternalError as c,mapToObj as be,objToMap as fe,generateKeyPair as li,generateRandomBytes32 as ie,deriveSymKey as di,hashKey as gi,validateEncoding as pi,isTypeOneEnvelope as Ee,encrypt as Di,validateDecoding as yi,decrypt as mi,deserialize as we,decodeTypeByte as bi,BASE16 as fi,hashMessage as se,getRelayProtocolName as re,createExpiringPromise as k,getRelayProtocolApi as H,isUndefined as ne,getSdkError as K,isValidArray as Ei,getBundleId as wi,isOnline as ve,formatRelayRpcUrl as vi,subscribeToNetworkChange as Ii,isProposalStruct as Ci,isSessionStruct as Ri,TYPE_1 as _i,calcExpiry as J,formatUri as Ti,parseUri as Ie,createDelayedPromise as Si,engineEvent as oe,isExpired as Ce,isValidParams as ae,isValidUrl as Pi,isValidString as xi,parseExpirerTarget as Oi,formatTopicTarget as Ai,formatIdTarget as zi,isReactNative as Ni,isBrowser as Ui,isNode as Li}from\"@walletconnect/utils\";import{toString as $i}from\"uint8arrays\";import{ONE_DAY as L,SIX_HOURS as Fi,ONE_SECOND as Re,THIRTY_DAYS as X,FIVE_SECONDS as _e,THIRTY_SECONDS as Te,toMiliseconds as N,TEN_SECONDS as Mi,Watch as ki,FIVE_MINUTES as Se}from\"@walletconnect/time\";import{JsonRpcProvider as Ki}from\"@walletconnect/jsonrpc-provider\";import{getBigIntRpcId as Bi,isJsonRpcRequest as Pe,isJsonRpcResponse as xe,formatJsonRpcResult as Oe,formatJsonRpcRequest as Ae,formatJsonRpcError as Vi,isJsonRpcResult as qi,isJsonRpcError as ze}from\"@walletconnect/jsonrpc-utils\";import ji from\"@walletconnect/jsonrpc-ws-connection\";import Gi from\"lodash.isequal\";import Yi from\"isomorphic-unfetch\";function Hi(n,e){if(n.length>=255)throw new TypeError(\"Alphabet too long\");for(var t=new Uint8Array(256),i=0;i>>0,f=new Uint8Array(T);I!==_;){for(var S=u[I],A=0,C=T-1;(S!==0||A>>0,f[C]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error(\"Non-zero carry\");z=A,I++}for(var x=T-z;x!==T&&f[x]===0;)x++;for(var j=h.repeat(m);x>>0,T=new Uint8Array(_);u[m];){var f=t[u.charCodeAt(m)];if(f===255)return;for(var S=0,A=_-1;(f!==0||S>>0,T[A]=f%256>>>0,f=f/256>>>0;if(f!==0)throw new Error(\"Non-zero carry\");I=S,m++}if(u[m]!==\" \"){for(var C=_-I;C!==_&&T[C]===0;)C++;for(var x=new Uint8Array(z+(_-C)),j=z;C!==_;)x[j++]=T[C++];return x}}}function M(u){var m=y(u);if(m)return m;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:y,decode:M}}var Ji=Hi,Xi=Ji;const Ne=n=>{if(n instanceof Uint8Array&&n.constructor.name===\"Uint8Array\")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error(\"Unknown type, must be binary type\")},Wi=n=>new TextEncoder().encode(n),Qi=n=>new TextDecoder().decode(n);class Zi{constructor(e,t,i){this.name=e,this.prefix=t,this.baseEncode=i}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\"Unknown type, must be binary type\")}}class es{constructor(e,t,i){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error(\"Invalid prefix character\");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(e){if(typeof e==\"string\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\"Can only multibase decode strings\")}or(e){return Ue(this,e)}}class ts{constructor(e){this.decoders=e}or(e){return Ue(this,e)}decode(e){const t=e[0],i=this.decoders[t];if(i)return i.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ue=(n,e)=>new ts({...n.decoders||{[n.prefix]:n},...e.decoders||{[e.prefix]:e}});class is{constructor(e,t,i,s){this.name=e,this.prefix=t,this.baseEncode=i,this.baseDecode=s,this.encoder=new Zi(e,t,i),this.decoder=new es(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const W=({name:n,prefix:e,encode:t,decode:i})=>new is(n,e,t,i),B=({prefix:n,name:e,alphabet:t})=>{const{encode:i,decode:s}=Xi(t,e);return W({prefix:n,name:e,encode:i,decode:r=>Ne(s(r))})},ss=(n,e,t,i)=>{const s={};for(let d=0;d=8&&(a-=8,o[l++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError(\"Unexpected end of data\");return o},rs=(n,e,t)=>{const i=e[e.length-1]===\"=\",s=(1<t;)o-=t,r+=e[s&a>>o];if(o&&(r+=e[s&a<W({prefix:e,name:n,encode(s){return rs(s,i,t)},decode(s){return ss(s,i,t,n)}}),ns=W({prefix:\"\\0\",name:\"identity\",encode:n=>Qi(n),decode:n=>Wi(n)});var os=Object.freeze({__proto__:null,identity:ns});const as=g({prefix:\"0\",name:\"base2\",alphabet:\"01\",bitsPerChar:1});var hs=Object.freeze({__proto__:null,base2:as});const cs=g({prefix:\"7\",name:\"base8\",alphabet:\"01234567\",bitsPerChar:3});var us=Object.freeze({__proto__:null,base8:cs});const ls=B({prefix:\"9\",name:\"base10\",alphabet:\"0123456789\"});var ds=Object.freeze({__proto__:null,base10:ls});const gs=g({prefix:\"f\",name:\"base16\",alphabet:\"0123456789abcdef\",bitsPerChar:4}),ps=g({prefix:\"F\",name:\"base16upper\",alphabet:\"0123456789ABCDEF\",bitsPerChar:4});var Ds=Object.freeze({__proto__:null,base16:gs,base16upper:ps});const ys=g({prefix:\"b\",name:\"base32\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567\",bitsPerChar:5}),ms=g({prefix:\"B\",name:\"base32upper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\",bitsPerChar:5}),bs=g({prefix:\"c\",name:\"base32pad\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567=\",bitsPerChar:5}),fs=g({prefix:\"C\",name:\"base32padupper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\",bitsPerChar:5}),Es=g({prefix:\"v\",name:\"base32hex\",alphabet:\"0123456789abcdefghijklmnopqrstuv\",bitsPerChar:5}),ws=g({prefix:\"V\",name:\"base32hexupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV\",bitsPerChar:5}),vs=g({prefix:\"t\",name:\"base32hexpad\",alphabet:\"0123456789abcdefghijklmnopqrstuv=\",bitsPerChar:5}),Is=g({prefix:\"T\",name:\"base32hexpadupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\",bitsPerChar:5}),Cs=g({prefix:\"h\",name:\"base32z\",alphabet:\"ybndrfg8ejkmcpqxot1uwisza345h769\",bitsPerChar:5});var Rs=Object.freeze({__proto__:null,base32:ys,base32upper:ms,base32pad:bs,base32padupper:fs,base32hex:Es,base32hexupper:ws,base32hexpad:vs,base32hexpadupper:Is,base32z:Cs});const _s=B({prefix:\"k\",name:\"base36\",alphabet:\"0123456789abcdefghijklmnopqrstuvwxyz\"}),Ts=B({prefix:\"K\",name:\"base36upper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"});var Ss=Object.freeze({__proto__:null,base36:_s,base36upper:Ts});const Ps=B({name:\"base58btc\",prefix:\"z\",alphabet:\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"}),xs=B({name:\"base58flickr\",prefix:\"Z\",alphabet:\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"});var Os=Object.freeze({__proto__:null,base58btc:Ps,base58flickr:xs});const As=g({prefix:\"m\",name:\"base64\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",bitsPerChar:6}),zs=g({prefix:\"M\",name:\"base64pad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",bitsPerChar:6}),Ns=g({prefix:\"u\",name:\"base64url\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\",bitsPerChar:6}),Us=g({prefix:\"U\",name:\"base64urlpad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\",bitsPerChar:6});var Ls=Object.freeze({__proto__:null,base64:As,base64pad:zs,base64url:Ns,base64urlpad:Us});const Le=Array.from(\"\\u{1F680}\\u{1FA90}\\u2604\\u{1F6F0}\\u{1F30C}\\u{1F311}\\u{1F312}\\u{1F313}\\u{1F314}\\u{1F315}\\u{1F316}\\u{1F317}\\u{1F318}\\u{1F30D}\\u{1F30F}\\u{1F30E}\\u{1F409}\\u2600\\u{1F4BB}\\u{1F5A5}\\u{1F4BE}\\u{1F4BF}\\u{1F602}\\u2764\\u{1F60D}\\u{1F923}\\u{1F60A}\\u{1F64F}\\u{1F495}\\u{1F62D}\\u{1F618}\\u{1F44D}\\u{1F605}\\u{1F44F}\\u{1F601}\\u{1F525}\\u{1F970}\\u{1F494}\\u{1F496}\\u{1F499}\\u{1F622}\\u{1F914}\\u{1F606}\\u{1F644}\\u{1F4AA}\\u{1F609}\\u263A\\u{1F44C}\\u{1F917}\\u{1F49C}\\u{1F614}\\u{1F60E}\\u{1F607}\\u{1F339}\\u{1F926}\\u{1F389}\\u{1F49E}\\u270C\\u2728\\u{1F937}\\u{1F631}\\u{1F60C}\\u{1F338}\\u{1F64C}\\u{1F60B}\\u{1F497}\\u{1F49A}\\u{1F60F}\\u{1F49B}\\u{1F642}\\u{1F493}\\u{1F929}\\u{1F604}\\u{1F600}\\u{1F5A4}\\u{1F603}\\u{1F4AF}\\u{1F648}\\u{1F447}\\u{1F3B6}\\u{1F612}\\u{1F92D}\\u2763\\u{1F61C}\\u{1F48B}\\u{1F440}\\u{1F62A}\\u{1F611}\\u{1F4A5}\\u{1F64B}\\u{1F61E}\\u{1F629}\\u{1F621}\\u{1F92A}\\u{1F44A}\\u{1F973}\\u{1F625}\\u{1F924}\\u{1F449}\\u{1F483}\\u{1F633}\\u270B\\u{1F61A}\\u{1F61D}\\u{1F634}\\u{1F31F}\\u{1F62C}\\u{1F643}\\u{1F340}\\u{1F337}\\u{1F63B}\\u{1F613}\\u2B50\\u2705\\u{1F97A}\\u{1F308}\\u{1F608}\\u{1F918}\\u{1F4A6}\\u2714\\u{1F623}\\u{1F3C3}\\u{1F490}\\u2639\\u{1F38A}\\u{1F498}\\u{1F620}\\u261D\\u{1F615}\\u{1F33A}\\u{1F382}\\u{1F33B}\\u{1F610}\\u{1F595}\\u{1F49D}\\u{1F64A}\\u{1F639}\\u{1F5E3}\\u{1F4AB}\\u{1F480}\\u{1F451}\\u{1F3B5}\\u{1F91E}\\u{1F61B}\\u{1F534}\\u{1F624}\\u{1F33C}\\u{1F62B}\\u26BD\\u{1F919}\\u2615\\u{1F3C6}\\u{1F92B}\\u{1F448}\\u{1F62E}\\u{1F646}\\u{1F37B}\\u{1F343}\\u{1F436}\\u{1F481}\\u{1F632}\\u{1F33F}\\u{1F9E1}\\u{1F381}\\u26A1\\u{1F31E}\\u{1F388}\\u274C\\u270A\\u{1F44B}\\u{1F630}\\u{1F928}\\u{1F636}\\u{1F91D}\\u{1F6B6}\\u{1F4B0}\\u{1F353}\\u{1F4A2}\\u{1F91F}\\u{1F641}\\u{1F6A8}\\u{1F4A8}\\u{1F92C}\\u2708\\u{1F380}\\u{1F37A}\\u{1F913}\\u{1F619}\\u{1F49F}\\u{1F331}\\u{1F616}\\u{1F476}\\u{1F974}\\u25B6\\u27A1\\u2753\\u{1F48E}\\u{1F4B8}\\u2B07\\u{1F628}\\u{1F31A}\\u{1F98B}\\u{1F637}\\u{1F57A}\\u26A0\\u{1F645}\\u{1F61F}\\u{1F635}\\u{1F44E}\\u{1F932}\\u{1F920}\\u{1F927}\\u{1F4CC}\\u{1F535}\\u{1F485}\\u{1F9D0}\\u{1F43E}\\u{1F352}\\u{1F617}\\u{1F911}\\u{1F30A}\\u{1F92F}\\u{1F437}\\u260E\\u{1F4A7}\\u{1F62F}\\u{1F486}\\u{1F446}\\u{1F3A4}\\u{1F647}\\u{1F351}\\u2744\\u{1F334}\\u{1F4A3}\\u{1F438}\\u{1F48C}\\u{1F4CD}\\u{1F940}\\u{1F922}\\u{1F445}\\u{1F4A1}\\u{1F4A9}\\u{1F450}\\u{1F4F8}\\u{1F47B}\\u{1F910}\\u{1F92E}\\u{1F3BC}\\u{1F975}\\u{1F6A9}\\u{1F34E}\\u{1F34A}\\u{1F47C}\\u{1F48D}\\u{1F4E3}\\u{1F942}\"),$s=Le.reduce((n,e,t)=>(n[t]=e,n),[]),Fs=Le.reduce((n,e,t)=>(n[e.codePointAt(0)]=t,n),[]);function Ms(n){return n.reduce((e,t)=>(e+=$s[t],e),\"\")}function ks(n){const e=[];for(const t of n){const i=Fs[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(i)}return new Uint8Array(e)}const Ks=W({prefix:\"\\u{1F680}\",name:\"base256emoji\",encode:Ms,decode:ks});var Bs=Object.freeze({__proto__:null,base256emoji:Ks}),Vs=Fe,$e=128,qs=127,js=~qs,Gs=Math.pow(2,31);function Fe(n,e,t){e=e||[],t=t||0;for(var i=t;n>=Gs;)e[t++]=n&255|$e,n/=128;for(;n&js;)e[t++]=n&255|$e,n>>>=7;return e[t]=n|0,Fe.bytes=t-i+1,e}var Ys=he,Hs=128,Me=127;function he(n,i){var t=0,i=i||0,s=0,r=i,o,a=n.length;do{if(r>=a)throw he.bytes=0,new RangeError(\"Could not decode varint\");o=n[r++],t+=s<28?(o&Me)<=Hs);return he.bytes=r-i,t}var Js=Math.pow(2,7),Xs=Math.pow(2,14),Ws=Math.pow(2,21),Qs=Math.pow(2,28),Zs=Math.pow(2,35),er=Math.pow(2,42),tr=Math.pow(2,49),ir=Math.pow(2,56),sr=Math.pow(2,63),rr=function(n){return n(ke.encode(n,e,t),e),Be=n=>ke.encodingLength(n),ce=(n,e)=>{const t=e.byteLength,i=Be(n),s=i+Be(t),r=new Uint8Array(s+t);return Ke(n,r,0),Ke(t,r,i),r.set(e,s),new or(n,t,e,r)};class or{constructor(e,t,i,s){this.code=e,this.size=t,this.digest=i,this.bytes=s}}const Ve=({name:n,code:e,encode:t})=>new ar(n,e,t);class ar{constructor(e,t,i){this.name=e,this.code=t,this.encode=i}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ce(this.code,t):t.then(i=>ce(this.code,i))}else throw Error(\"Unknown type, must be binary type\")}}const qe=n=>async e=>new Uint8Array(await crypto.subtle.digest(n,e)),hr=Ve({name:\"sha2-256\",code:18,encode:qe(\"SHA-256\")}),cr=Ve({name:\"sha2-512\",code:19,encode:qe(\"SHA-512\")});var ur=Object.freeze({__proto__:null,sha256:hr,sha512:cr});const je=0,lr=\"identity\",Ge=Ne,dr=n=>ce(je,Ge(n)),gr={code:je,name:lr,encode:Ge,digest:dr};var pr=Object.freeze({__proto__:null,identity:gr});new TextEncoder,new TextDecoder;const Ye={...os,...hs,...us,...ds,...Ds,...Rs,...Ss,...Os,...Ls,...Bs};({...ur,...pr});function He(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function Dr(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?He(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Je(n,e,t,i){return{name:n,prefix:e,encoder:{name:n,prefix:e,encode:t},decoder:{decode:i}}}const Xe=Je(\"utf8\",\"u\",n=>\"u\"+new TextDecoder(\"utf8\").decode(n),n=>new TextEncoder().encode(n.substring(1))),ue=Je(\"ascii\",\"a\",n=>{let e=\"a\";for(let t=0;t{n=n.substring(1);const e=Dr(n.length);for(let t=0;t{if(!this.initialized){const i=await this.getKeyChain();typeof i<\"u\"&&(this.keychain=i),this.initialized=!0}},this.has=i=>(this.isInitialized(),this.keychain.has(i)),this.set=async(i,s)=>{this.isInitialized(),this.keychain.set(i,s),await this.persist()},this.get=i=>{this.isInitialized();const s=this.keychain.get(i);if(typeof s>\"u\"){const{message:r}=c(\"NO_MATCHING_KEY\",`${this.name}: ${i}`);throw new Error(r)}return s},this.del=async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()},this.core=e,this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,be(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?fe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class xt{constructor(e,t,i){this.core=e,this.logger=t,this.name=et,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=s=>(this.isInitialized(),this.keychain.has(s)),this.getClientId=async()=>{this.isInitialized();const s=await this.getClientSeed(),r=Y.generateKeyPair(s);return Y.encodeIss(r.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const s=li();return this.setPrivateKey(s.publicKey,s.privateKey)},this.signJWT=async s=>{this.isInitialized();const r=await this.getClientSeed(),o=Y.generateKeyPair(r),a=ie(),h=tt;return await Y.signJWT(a,s,h,o)},this.generateSharedKey=(s,r,o)=>{this.isInitialized();const a=this.getPrivateKey(s),h=di(a,r);return this.setSymKey(h,o)},this.setSymKey=async(s,r)=>{this.isInitialized();const o=r||gi(s);return await this.keychain.set(o,s),o},this.deleteKeyPair=async s=>{this.isInitialized(),await this.keychain.del(s)},this.deleteSymKey=async s=>{this.isInitialized(),await this.keychain.del(s)},this.encode=async(s,r,o)=>{this.isInitialized();const a=pi(o),h=ci(r);if(Ee(a)){const y=a.senderPublicKey,M=a.receiverPublicKey;s=await this.generateSharedKey(y,M)}const l=this.getSymKey(s),{type:d,senderPublicKey:p}=a;return Di({type:d,symKey:l,message:h,senderPublicKey:p})},this.decode=async(s,r,o)=>{this.isInitialized();const a=yi(r,o);if(Ee(a)){const h=a.receiverPublicKey,l=a.senderPublicKey;s=await this.generateSharedKey(h,l)}try{const h=this.getSymKey(s),l=mi({symKey:h,encoded:r});return ui(l)}catch(h){this.logger.error(`Failed to decode message from topic: '${s}', clientId: '${await this.getClientId()}'`),this.logger.error(h)}},this.getPayloadType=s=>{const r=we(s);return bi(r.type)},this.getPayloadSenderPublicKey=s=>{const r=we(s);return r.senderPublicKey?$i(r.senderPublicKey,fi):void 0},this.core=e,this.logger=b(t,this.name),this.keychain=i||new Pt(this.core,this.logger)}get context(){return E(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\"\";try{e=this.keychain.get(de)}catch{e=ie(),await this.keychain.set(de,e)}return mr(e,\"base16\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Ot extends Zt{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=rt,this.version=nt,this.initialized=!1,this.storagePrefix=O,this.init=async()=>{if(!this.initialized){this.logger.trace(\"Initialized\");try{const i=await this.getRelayerMessages();typeof i<\"u\"&&(this.messages=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}},this.set=async(i,s)=>{this.isInitialized();const r=se(s);let o=this.messages.get(i);return typeof o>\"u\"&&(o={}),typeof o[r]<\"u\"||(o[r]=s,this.messages.set(i,o),await this.persist()),r},this.get=i=>{this.isInitialized();let s=this.messages.get(i);return typeof s>\"u\"&&(s={}),s},this.has=(i,s)=>{this.isInitialized();const r=this.get(i),o=se(s);return typeof r[o]<\"u\"},this.del=async i=>{this.isInitialized(),this.messages.delete(i),await this.persist()},this.logger=b(e,this.name),this.core=t}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,be(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?fe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class vr extends ei{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new U,this.name=at,this.queue=new Map,this.publishTimeout=N(Mi*2),this.needsTransportRestart=!1,this.publish=async(i,s,r)=>{var o;this.logger.debug(\"Publishing Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:i,message:s,opts:r}});try{const a=r?.ttl||ot,h=re(r),l=r?.prompt||!1,d=r?.tag||0,p=r?.id||Bi().toString(),y={topic:i,message:s,opts:{ttl:a,relay:h,prompt:l,tag:d,id:p}},M=setTimeout(()=>this.queue.set(p,y),this.publishTimeout);try{await await k(this.rpcPublish(i,s,a,h,l,d,p),this.publishTimeout,`Failed to publish payload, please try again. id:${p} tag:${d}`),this.removeRequestFromQueue(p),this.relayer.events.emit(D.publish,y)}catch(u){if(this.logger.debug(\"Publishing Payload stalled\"),this.needsTransportRestart=!0,(o=r?.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(p),u;return}finally{clearTimeout(M)}this.logger.debug(\"Successfully Published Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:i,message:s,opts:r}})}catch(a){throw this.logger.debug(\"Failed to Publish Payload\"),this.logger.error(a),a}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.relayer=e,this.logger=b(t,this.name),this.registerEventListeners()}get context(){return E(this.logger)}rpcPublish(e,t,i,s,r,o,a){var h,l,d,p;const y={method:H(s.protocol).publish,params:{topic:e,message:t,ttl:i,prompt:r,tag:o},id:a};return ne((h=y.params)==null?void 0:h.prompt)&&((l=y.params)==null||delete l.prompt),ne((d=y.params)==null?void 0:d.tag)&&((p=y.params)==null||delete p.tag),this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"message\",direction:\"outgoing\",request:y}),this.relayer.request(y)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:i,opts:s}=e;await this.publish(t,i,s)})}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(D.connection_stalled);return}this.checkQueue()}),this.relayer.on(D.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Ir{constructor(){this.map=new Map,this.set=(e,t)=>{const i=this.get(e);this.exists(e,t)||this.map.set(e,[...i,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>\"u\"){this.map.delete(e);return}if(!this.map.has(e))return;const i=this.get(e);if(!this.exists(e,t))return;const s=i.filter(r=>r!==t);if(!s.length){this.map.delete(e);return}this.map.set(e,s)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Cr=Object.defineProperty,Rr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,zt=(n,e,t)=>e in n?Cr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e)=>{for(var t in e||(e={}))Tr.call(e,t)&&zt(n,t,e[t]);if(At)for(var t of At(e))Sr.call(e,t)&&zt(n,t,e[t]);return n},De=(n,e)=>Rr(n,_r(e));class Nt extends ti{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Ir,this.events=new U,this.name=mt,this.version=bt,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel=\"pending_sub_watch_label\",this.pollingInterval=20,this.storagePrefix=O,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug(\"Subscribing Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}});try{const r=re(s),o={topic:i,relay:r};this.pending.set(i,o);const a=await this.rpcSubscribe(i,r);return this.onSubscribe(a,o),this.logger.debug(\"Successfully Subscribed Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}}),a}catch(r){throw this.logger.debug(\"Failed to Subscribe Topic\"),this.logger.error(r),r}},this.unsubscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),typeof s?.id<\"u\"?await this.unsubscribeById(i,s.id,s):await this.unsubscribeByTopic(i,s)},this.isSubscribed=async i=>{if(this.topics.includes(i))return!0;const s=`${this.pendingSubscriptionWatchLabel}_${i}`;return await new Promise((r,o)=>{const a=new ki;a.start(s);const h=setInterval(()=>{!this.pending.has(i)&&this.topics.includes(i)&&(clearInterval(h),a.stop(s),r(!0)),a.elapsed(s)>=ft&&(clearInterval(h),a.stop(s),o(new Error(\"Subscription resolution timeout\")))},this.pollingInterval)}).catch(()=>!1)},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=b(t,this.name),this.clientId=\"\"}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\"//\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let i=!1;try{i=this.getSubscription(e).topic===t}catch{}return i}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const i=this.topicMap.get(e);await Promise.all(i.map(async s=>await this.unsubscribeById(e,s,t)))}async unsubscribeById(e,t,i){this.logger.debug(\"Unsubscribing Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}});try{const s=re(i);await this.rpcUnsubscribe(e,t,s);const r=K(\"USER_DISCONNECTED\",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,r),this.logger.debug(\"Successfully Unsubscribed Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}})}catch(s){throw this.logger.debug(\"Failed to Unsubscribe Topic\"),this.logger.error(s),s}}async rpcSubscribe(e,t){const i={method:H(t.protocol).subscribe,params:{topic:e}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{await await k(this.relayer.request(i),this.subscribeTimeout)}catch{this.logger.debug(\"Outgoing Relay Subscribe Payload stalled\"),this.relayer.events.emit(D.connection_stalled)}return se(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,i={method:H(t.protocol).batchSubscribe,params:{topics:e.map(s=>s.topic)}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{return await await k(this.relayer.request(i),this.subscribeTimeout)}catch{this.logger.debug(\"Outgoing Relay Payload stalled\"),this.relayer.events.emit(D.connection_stalled)}}rpcUnsubscribe(e,t,i){const s={method:H(i.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:s}),this.relayer.request(s)}onSubscribe(e,t){this.setSubscription(e,De(q({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,q({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,i){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,i),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug(\"Setting subscription\"),this.logger.trace({type:\"method\",method:\"setSubscription\",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,q({},t)),this.topicMap.set(t.topic,e),this.events.emit(w.created,t)}getSubscription(e){this.logger.debug(\"Getting subscription\"),this.logger.trace({type:\"method\",method:\"getSubscription\",id:e});const t=this.subscriptions.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}deleteSubscription(e,t){this.logger.debug(\"Deleting subscription\"),this.logger.trace({type:\"method\",method:\"deleteSubscription\",id:e,reason:t});const i=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(i.topic,e),this.events.emit(w.deleted,De(q({},i),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(w.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t\"u\"||!e.length)return;if(this.subscriptions.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Ei(t)&&this.onBatchSubscribe(t.map((i,s)=>De(q({},e[s]),{id:i})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,async()=>{await this.checkPending()}),this.relayer.on(D.connect,async()=>{await this.onConnect()}),this.relayer.on(D.disconnect,()=>{this.onDisconnect()}),this.events.on(w.created,async e=>{const t=w.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()}),this.events.on(w.deleted,async e=>{const t=w.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var Pr=Object.defineProperty,Ut=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Lt=(n,e,t)=>e in n?Pr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ar=(n,e)=>{for(var t in e||(e={}))xr.call(e,t)&&Lt(n,t,e[t]);if(Ut)for(var t of Ut(e))Or.call(e,t)&&Lt(n,t,e[t]);return n};class $t extends ii{constructor(e){super(e),this.protocol=\"wc\",this.version=2,this.events=new U,this.name=ut,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=[\"socket hang up\",\"socket stalled\"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async t=>{this.logger.debug(\"Publishing Request Payload\");const i=t.id,s=this.provider.request(t);this.requestsInFlight.set(i,{promise:s,request:t});try{return await this.toEstablishConnection(),await s}catch(r){throw this.logger.debug(\"Failed to Publish Request\"),this.logger.error(r),r}finally{this.requestsInFlight.delete(i)}},this.onPayloadHandler=t=>{this.onProviderPayload(t)},this.onConnectHandler=()=>{this.events.emit(D.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(D.error,t),this.logger.info(\"Fatal socket error received, closing transport\"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(P.payload,this.onPayloadHandler),this.provider.on(P.connect,this.onConnectHandler),this.provider.on(P.disconnect,this.onDisconnectHandler),this.provider.on(P.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<\"u\"&&typeof e.logger!=\"string\"?b(e.logger,this.name):ye(me({level:e.logger||ct})),this.messages=new Ot(this.logger,e.core),this.subscriber=new Nt(this,this.logger),this.publisher=new vr(this,this.logger),this.relayUrl=e?.relayUrl||ge,this.projectId=e.projectId,this.bundleId=wi(),this.provider={}}async init(){this.logger.trace(\"Initialized\"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${pe}...`),await this.restartTransport(pe)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info(\"No topics subscribed to after init, closing transport\"),await this.transportClose(),this.transportExplicitlyClosed=!1)},pt)}get context(){return E(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,i){this.isInitialized(),await this.publisher.publish(e,t,i),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var i;this.isInitialized();let s=((i=this.subscriber.topicMap.get(e))==null?void 0:i[0])||\"\";if(s)return s;let r;const o=a=>{a.topic===e&&(this.subscriber.off(w.created,o),r())};return await Promise.all([new Promise(a=>{r=a,this.subscriber.on(w.created,o)}),new Promise(async a=>{s=await this.subscriber.subscribe(e,t),a()})]),s}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug(\"Waiting for all in-flight requests to finish before closing transport...\"),this.requestsInFlight.forEach(async e=>{await e.promise})),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await k(this.provider.disconnect(),1e3,\"provider.disconnect()\").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(t=>{if(!this.initialized)return t();this.subscriber.once(w.resubscribed,()=>{t()})}),new Promise(async(t,i)=>{try{await k(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(s){i(s);return}t()})])}catch(t){this.logger.error(t);const i=t;if(!this.isConnectionStalled(i.message))throw t;this.provider.events.emit(P.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await ve())throw new Error(\"No internet connection detected. Please restart your network and try again.\")}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ki(new ji(vi({sdkVersion:gt,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:i}=e;await this.messages.set(t,i)}async shouldIgnoreMessageEvent(e){const{topic:t,message:i}=e;if(!i||i.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const s=this.messages.has(t,i);return s&&this.logger.debug(`Ignoring duplicate message: ${i}`),s}async onProviderPayload(e){if(this.logger.debug(\"Incoming Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"incoming\",payload:e}),Pe(e)){if(!e.method.endsWith(lt))return;const t=e.params,{topic:i,message:s,publishedAt:r}=t.data,o={topic:i,message:s,publishedAt:r};this.logger.debug(\"Emitting Relayer Payload\"),this.logger.trace(Ar({type:\"event\",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else xe(e)&&this.events.emit(D.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(D.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Oe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(P.payload,this.onPayloadHandler),this.provider.off(P.connect,this.onConnectHandler),this.provider.off(P.disconnect,this.onDisconnectHandler),this.provider.off(P.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(D.connection_stalled,()=>{this.restartTransport().catch(t=>this.logger.error(t))});let e=await ve();Ii(async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch(i=>this.logger.error(i)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(i=>this.logger.error(i))))})}onProviderDisconnect(){this.events.emit(D.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info(\"attemptToReconnect called. Connecting...\"),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},N(dt)))}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var zr=Object.defineProperty,Ft=Object.getOwnPropertySymbols,Nr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Mt=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kt=(n,e)=>{for(var t in e||(e={}))Nr.call(e,t)&&Mt(n,t,e[t]);if(Ft)for(var t of Ft(e))Ur.call(e,t)&&Mt(n,t,e[t]);return n};class Kt extends si{constructor(e,t,i,s=O,r=void 0){super(e,t,i,s),this.core=e,this.logger=t,this.name=i,this.map=new Map,this.version=Dt,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!ne(o)?this.map.set(this.getKey(o),o):Ci(o)?this.map.set(o.id,o):Ri(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug(\"Setting value\"),this.logger.trace({type:\"method\",method:\"set\",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug(\"Getting value\"),this.logger.trace({type:\"method\",method:\"get\",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(h=>Gi(a[h],o[h]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug(\"Updating value\"),this.logger.trace({type:\"method\",method:\"update\",key:o,update:a});const h=kt(kt({},this.getData(o)),a);this.map.set(o,h),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug(\"Deleting value\"),this.logger.trace({type:\"method\",method:\"delete\",key:o,reason:a}),this.map.delete(o),await this.persist())},this.logger=b(t,this.name),this.storagePrefix=s,this.getKey=r}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>\"u\"||!e.length)return;if(this.map.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Bt{constructor(e,t){this.core=e,this.logger=t,this.name=Et,this.version=wt,this.events=new Xt,this.initialized=!1,this.storagePrefix=O,this.ignoredPayloadTypes=[_i],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\"Initialized\"))},this.register=({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]},this.create=async()=>{this.isInitialized();const i=ie(),s=await this.core.crypto.setSymKey(i),r=J(Se),o={protocol:ht},a={topic:s,expiry:r,relay:o,active:!1},h=Ti({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:o,expiryTimestamp:r});return await this.pairings.set(s,a),await this.core.relayer.subscribe(s),this.core.expirer.set(s,r),{topic:s,uri:h}},this.pair=async i=>{this.isInitialized(),this.isValidPair(i);const{topic:s,symKey:r,relay:o,expiryTimestamp:a}=Ie(i.uri);let h;if(this.pairings.keys.includes(s)&&(h=this.pairings.get(s),h.active))throw new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);const l=a||J(Se),d={topic:s,relay:o,expiry:l,active:!1};return await this.pairings.set(s,d),this.core.expirer.set(s,l),i.activatePairing&&await this.activate({topic:s}),this.events.emit(V.create,d),this.core.crypto.keychain.has(s)||(await this.core.crypto.setSymKey(r,s),await this.core.relayer.subscribe(s,{relay:o})),d},this.activate=async({topic:i})=>{this.isInitialized();const s=J(X);await this.pairings.update(i,{active:!0,expiry:s}),this.core.expirer.set(i,s)},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:s}=i;if(this.pairings.keys.includes(s)){const r=await this.sendRequest(s,\"wc_pairingPing\",{}),{done:o,resolve:a,reject:h}=Si();this.events.once(oe(\"pairing_ping\",r),({error:l})=>{l?h(l):a()}),await o()}},this.updateExpiry=async({topic:i,expiry:s})=>{this.isInitialized(),await this.pairings.update(i,{expiry:s})},this.updateMetadata=async({topic:i,metadata:s})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:s})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:s}=i;this.pairings.keys.includes(s)&&(await this.sendRequest(s,\"wc_pairingDelete\",K(\"USER_DISCONNECTED\")),await this.deletePairing(s))},this.sendRequest=async(i,s,r)=>{const o=Ae(s,r),a=await this.core.crypto.encode(i,o),h=$[s].req;return this.core.history.set(i,o),this.core.relayer.publish(i,a,h),o.id},this.sendResult=async(i,s,r)=>{const o=Oe(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=$[h.request.method].res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.sendError=async(i,s,r)=>{const o=Vi(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=$[h.request.method]?$[h.request.method].res:$.unregistered_method.res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.deletePairing=async(i,s)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,K(\"USER_DISCONNECTED\")),this.core.crypto.deleteSymKey(i),s?Promise.resolve():this.core.expirer.del(i)])},this.cleanup=async()=>{const i=this.pairings.getAll().filter(s=>Ce(s.expiry));await Promise.all(i.map(s=>this.deletePairing(s.topic)))},this.onRelayEventRequest=i=>{const{topic:s,payload:r}=i;switch(r.method){case\"wc_pairingPing\":return this.onPairingPingRequest(s,r);case\"wc_pairingDelete\":return this.onPairingDeleteRequest(s,r);default:return this.onUnknownRpcMethodRequest(s,r)}},this.onRelayEventResponse=async i=>{const{topic:s,payload:r}=i,o=(await this.core.history.get(s,r.id)).request.method;switch(o){case\"wc_pairingPing\":return this.onPairingPingResponse(s,r);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(i,s)=>{const{id:r}=s;try{this.isValidPing({topic:i}),await this.sendResult(r,i,!0),this.events.emit(V.ping,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onPairingPingResponse=(i,s)=>{const{id:r}=s;setTimeout(()=>{qi(s)?this.events.emit(oe(\"pairing_ping\",r),{}):ze(s)&&this.events.emit(oe(\"pairing_ping\",r),{error:s.error})},500)},this.onPairingDeleteRequest=async(i,s)=>{const{id:r}=s;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(V.delete,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(i,s)=>{const{id:r,method:o}=s;try{if(this.registeredMethods.includes(o))return;const a=K(\"WC_METHOD_UNSUPPORTED\",o);await this.sendError(r,i,a),this.logger.error(a)}catch(a){await this.sendError(r,i,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=i=>{this.registeredMethods.includes(i)||this.logger.error(K(\"WC_METHOD_UNSUPPORTED\",i))},this.isValidPair=i=>{var s;if(!ae(i)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() params: ${i}`);throw new Error(o)}if(!Pi(i.uri)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() uri: ${i.uri}`);throw new Error(o)}const r=Ie(i.uri);if(!((s=r?.relay)!=null&&s.protocol)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#relay-protocol\");throw new Error(o)}if(!(r!=null&&r.symKey)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#symKey\");throw new Error(o)}if(r!=null&&r.expiryTimestamp&&N(r?.expiryTimestamp){if(!ae(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`ping() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidDisconnect=async i=>{if(!ae(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`disconnect() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidPairingTopic=async i=>{if(!xi(i,!1)){const{message:s}=c(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${i}`);throw new Error(s)}if(!this.pairings.keys.includes(i)){const{message:s}=c(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${i}`);throw new Error(s)}if(Ce(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:s}=c(\"EXPIRED\",`pairing topic: ${i}`);throw new Error(s)}},this.core=e,this.logger=b(t,this.name),this.pairings=new Kt(this.core,this.logger,this.name,this.storagePrefix)}get context(){return E(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(D.message,async e=>{const{topic:t,message:i}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))return;const s=await this.core.crypto.decode(t,i);try{Pe(s)?(this.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):xe(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.core.history.delete(t,s.id))}catch(r){this.logger.error(r)}})}registerExpirerEvents(){this.core.expirer.on(v.expired,async e=>{const{topic:t}=Oi(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(V.expire,{topic:t}))})}}class Vt extends ri{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new U,this.name=vt,this.version=It,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(i,s,r)=>{if(this.isInitialized(),this.logger.debug(\"Setting JSON-RPC request history record\"),this.logger.trace({type:\"method\",method:\"set\",topic:i,request:s,chainId:r}),this.records.has(s.id))return;const o={id:s.id,topic:i,request:{method:s.method,params:s.params||null},chainId:r,expiry:J(X)};this.records.set(o.id,o),this.events.emit(R.created,o)},this.resolve=async i=>{if(this.isInitialized(),this.logger.debug(\"Updating JSON-RPC response history record\"),this.logger.trace({type:\"method\",method:\"update\",response:i}),!this.records.has(i.id))return;const s=await this.getRecord(i.id);typeof s.response>\"u\"&&(s.response=ze(i)?{error:i.error}:{result:i.result},this.records.set(s.id,s),this.events.emit(R.updated,s))},this.get=async(i,s)=>(this.isInitialized(),this.logger.debug(\"Getting record\"),this.logger.trace({type:\"method\",method:\"get\",topic:i,id:s}),await this.getRecord(s)),this.delete=(i,s)=>{this.isInitialized(),this.logger.debug(\"Deleting record\"),this.logger.trace({type:\"method\",method:\"delete\",id:s}),this.values.forEach(r=>{if(r.topic===i){if(typeof s<\"u\"&&r.id!==s)return;this.records.delete(r.id),this.events.emit(R.deleted,r)}})},this.exists=async(i,s)=>(this.isInitialized(),this.records.has(s)?(await this.getRecord(s)).topic===i:!1),this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<\"u\")return;const i={topic:t.topic,request:Ae(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(i)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(R.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>\"u\"||!e.length)return;if(this.records.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(R.created,e=>{const t=R.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.events.on(R.updated,e=>{const t=R.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.events.on(R.deleted,e=>{const t=R.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.core.heartbeat.on(G.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{N(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class qt extends ni{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new U,this.name=Ct,this.version=Rt,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=i=>{try{const s=this.formatTarget(i);return typeof this.getExpiration(s)<\"u\"}catch{return!1}},this.set=(i,s)=>{this.isInitialized();const r=this.formatTarget(i),o={target:r,expiry:s};this.expirations.set(r,o),this.checkExpiry(r,o),this.events.emit(v.created,{target:r,expiration:o})},this.get=i=>{this.isInitialized();const s=this.formatTarget(i);return this.getExpiration(s)},this.del=i=>{if(this.isInitialized(),this.has(i)){const s=this.formatTarget(i),r=this.getExpiration(s);this.expirations.delete(s),this.events.emit(v.deleted,{target:s,expiration:r})}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\"string\")return Ai(e);if(typeof e==\"number\")return zi(e);const{message:t}=c(\"UNKNOWN_TYPE\",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(v.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>\"u\"||!e.length)return;if(this.expirations.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}checkExpiry(e,t){const{expiry:i}=t;N(i)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(v.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(G.pulse,()=>this.checkExpirations()),this.events.on(v.created,e=>{const t=v.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(v.expired,e=>{const t=v.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(v.deleted,e=>{const t=v.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class jt extends oi{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Z,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async i=>{if(this.verifyDisabled||Ni()||!Ui())return;const s=this.getVerifyUrl(i?.verifyUrl);this.verifyUrl!==s&&this.removeIframe(),this.verifyUrl=s;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r)}if(!this.initialized){this.removeIframe(),this.verifyUrl=ee;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r),this.verifyDisabled=!0}}},this.register=async i=>{this.initialized?this.sendPost(i.attestationId):(this.addToQueue(i.attestationId),await this.init())},this.resolve=async i=>{if(this.isDevEnv)return\"\";const s=this.getVerifyUrl(i?.verifyUrl);let r;try{r=await this.fetchAttestation(i.attestationId,s)}catch(o){this.logger.info(`failed to resolve attestation: ${i.attestationId} from url: ${s}`),this.logger.info(o),r=await this.fetchAttestation(i.attestationId,ee)}return r},this.fetchAttestation=async(i,s)=>{this.logger.info(`resolving attestation: ${i} from url: ${s}`);const r=this.startAbortTimer(Re*2),o=await fetch(`${s}/attestation/${i}`,{signal:this.abortController.signal});return clearTimeout(r),o.status===200?await o.json():void 0},this.addToQueue=i=>{this.queue.push(i)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(i=>this.sendPost(i)),this.queue=[])},this.sendPost=i=>{var s;try{if(!this.iframe)return;(s=this.iframe.contentWindow)==null||s.postMessage(i,\"*\"),this.logger.info(`postMessage sent: ${i} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let i;const s=r=>{r.data===\"verify_ready\"&&(this.initialized=!0,this.processQueue(),window.removeEventListener(\"message\",s),i())};await Promise.race([new Promise(r=>{if(document.getElementById(Z))return r();window.addEventListener(\"message\",s);const o=document.createElement(\"iframe\");o.id=Z,o.src=`${this.verifyUrl}/${this.projectId}`,o.style.display=\"none\",document.body.append(o),this.iframe=o,i=r}),new Promise((r,o)=>setTimeout(()=>{window.removeEventListener(\"message\",s),o(\"verify iframe load timeout\")},N(_e)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=i=>{let s=i||F;return _t.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${F}`),s=F),s},this.logger=b(t,this.name),this.verifyUrl=F,this.abortController=new AbortController,this.isDevEnv=Li()&&process.env.IS_VITEST}get context(){return E(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),N(e))}}class Gt extends ai{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=Tt,this.registerDeviceToken=async i=>{const{clientId:s,token:r,notificationType:o,enableEncrypted:a=!1}=i,h=`${St}/${this.projectId}/clients`;await Yi(h,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({client_id:s,type:o,token:r,always_raw:a})})},this.logger=b(t,this.context)}}var Lr=Object.defineProperty,Yt=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Ht=(n,e,t)=>e in n?Lr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))$r.call(e,t)&&Ht(n,t,e[t]);if(Yt)for(var t of Yt(e))Fr.call(e,t)&&Ht(n,t,e[t]);return n};class te extends hi{constructor(e){super(e),this.protocol=le,this.version=We,this.name=Q,this.events=new U,this.initialized=!1,this.on=(i,s)=>this.events.on(i,s),this.once=(i,s)=>this.events.once(i,s),this.off=(i,s)=>this.events.off(i,s),this.removeListener=(i,s)=>this.events.removeListener(i,s),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||ge,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\"\";const t=typeof e?.logger<\"u\"&&typeof e?.logger!=\"string\"?e.logger:ye(me({level:e?.logger||Qe.logger}));this.logger=b(t,this.name),this.heartbeat=new Qt,this.crypto=new xt(this,this.logger,e?.keychain),this.history=new Vt(this,this.logger),this.expirer=new qt(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Wt(Jt(Jt({},Ze),e?.storageOptions)),this.relayer=new $t({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Bt(this,this.logger),this.verify=new jt(this.projectId||\"\",this.logger),this.echoClient=new Gt(this.projectId||\"\",this.logger)}static async init(e){const t=new te(e);await t.initialize();const i=await t.crypto.getClientId();return await t.storage.setItem(yt,i),t}get context(){return E(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace(\"Initialized\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info(\"Core Initialization Success\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Mr=te;export{Q as CORE_CONTEXT,Qe as CORE_DEFAULT,le as CORE_PROTOCOL,Ze as CORE_STORAGE_OPTIONS,O as CORE_STORAGE_PREFIX,We as CORE_VERSION,de as CRYPTO_CLIENT_SEED,et as CRYPTO_CONTEXT,tt as CRYPTO_JWT_TTL,Mr as Core,xt as Crypto,Tt as ECHO_CONTEXT,St as ECHO_URL,Ct as EXPIRER_CONTEXT,wr as EXPIRER_DEFAULT_TTL,v as EXPIRER_EVENTS,Rt as EXPIRER_STORAGE_VERSION,Gt as EchoClient,qt as Expirer,vt as HISTORY_CONTEXT,R as HISTORY_EVENTS,It as HISTORY_STORAGE_VERSION,Vt as JsonRpcHistory,it as KEYCHAIN_CONTEXT,st as KEYCHAIN_STORAGE_VERSION,Pt as KeyChain,rt as MESSAGES_CONTEXT,nt as MESSAGES_STORAGE_VERSION,Ot as MessageTracker,Et as PAIRING_CONTEXT,Er as PAIRING_DEFAULT_TTL,V as PAIRING_EVENTS,$ as PAIRING_RPC_OPTS,wt as PAIRING_STORAGE_VERSION,ft as PENDING_SUB_RESOLUTION_TIMEOUT,at as PUBLISHER_CONTEXT,ot as PUBLISHER_DEFAULT_TTL,Bt as Pairing,ut as RELAYER_CONTEXT,ct as RELAYER_DEFAULT_LOGGER,ht as RELAYER_DEFAULT_PROTOCOL,ge as RELAYER_DEFAULT_RELAY_URL,D as RELAYER_EVENTS,pe as RELAYER_FAILOVER_RELAY_URL,P as RELAYER_PROVIDER_EVENTS,dt as RELAYER_RECONNECT_TIMEOUT,gt as RELAYER_SDK_VERSION,br as RELAYER_STORAGE_OPTIONS,lt as RELAYER_SUBSCRIBER_SUFFIX,pt as RELAYER_TRANSPORT_CUTOFF,$t as Relayer,Dt as STORE_STORAGE_VERSION,mt as SUBSCRIBER_CONTEXT,fr as SUBSCRIBER_DEFAULT_TTL,w as SUBSCRIBER_EVENTS,bt as SUBSCRIBER_STORAGE_VERSION,Kt as Store,Nt as Subscriber,_t as TRUSTED_VERIFY_URLS,Z as VERIFY_CONTEXT,ee as VERIFY_FALLBACK_SERVER,F as VERIFY_SERVER,jt as Verify,yt as WALLETCONNECT_CLIENT_ID,te as default};\n//# sourceMappingURL=index.es.js.map\n","import{RELAYER_DEFAULT_PROTOCOL as me,RELAYER_EVENTS as Z,VERIFY_SERVER as ye,EXPIRER_EVENTS as Se,PAIRING_EVENTS as Ee,Store as K,Core as Re}from\"@walletconnect/core\";import{pino as Ie,getDefaultLoggerOptions as _e,generateChildLogger as qe,getLoggerContext as Ne}from\"@walletconnect/logger\";import{IEngine as fe,ISignClient as Pe}from\"@walletconnect/types\";import{TYPE_1 as ve,calcExpiry as q,createDelayedPromise as C,engineEvent as u,getInternalError as l,getSdkError as S,getDeepLink as Oe,handleDeeplinkRedirect as Te,isSessionCompatible as Ve,isBrowser as xe,hashMessage as z,isExpired as V,MemoryStore as $,isValidParams as y,isUndefined as A,isValidRelays as De,isValidObject as ee,isValidRequiredNamespaces as Ce,isValidNamespaces as Y,isConformingNamespaces as se,isValidString as b,isValidErrorReason as Ae,isValidRelay as be,isValidController as Le,isValidNamespacesChainId as te,isValidRequest as $e,isValidNamespacesRequest as Ge,isValidRequestExpiry as Me,isValidResponse as Ue,isValidEvent as Qe,isValidNamespacesEvent as ke,parseExpirerTarget as Ke,isValidId as ze,getAppMetadata as Ye}from\"@walletconnect/utils\";import je,{EventEmitter as Je}from\"events\";import{THIRTY_DAYS as Fe,SEVEN_DAYS as ie,FIVE_MINUTES as E,ONE_DAY as x,THIRTY_SECONDS as re,ONE_SECOND as Xe,toMiliseconds as ne}from\"@walletconnect/time\";import{payloadId as He,isJsonRpcResult as P,isJsonRpcError as v,formatJsonRpcRequest as j,formatJsonRpcResult as We,formatJsonRpcError as Be,isJsonRpcRequest as Ze,isJsonRpcResponse as es}from\"@walletconnect/jsonrpc-utils\";const J=\"wc\",F=2,X=\"client\",G=`${J}@${F}:${X}:`,M={name:X,logger:\"error\",controller:!1,relayUrl:\"wss://relay.walletconnect.com\"},ss={session_proposal:\"session_proposal\",session_update:\"session_update\",session_extend:\"session_extend\",session_ping:\"session_ping\",session_delete:\"session_delete\",session_expire:\"session_expire\",session_request:\"session_request\",session_request_sent:\"session_request_sent\",session_event:\"session_event\",proposal_expire:\"proposal_expire\",session_request_expire:\"session_request_expire\"},ts={database:\":memory:\"},H=\"WALLETCONNECT_DEEPLINK_CHOICE\",is={created:\"history_created\",updated:\"history_updated\",deleted:\"history_deleted\",sync:\"history_sync\"},rs=\"history\",ns=\"0.3\",oe=\"proposal\",os=Fe,ae=\"Proposal expired\",ce=\"session\",L=ie,le=\"engine\",R={wc_sessionPropose:{req:{ttl:E,prompt:!0,tag:1100},res:{ttl:E,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:E,prompt:!1,tag:1102},res:{ttl:E,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:x,prompt:!1,tag:1104},res:{ttl:x,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:x,prompt:!1,tag:1106},res:{ttl:x,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:E,prompt:!0,tag:1108},res:{ttl:E,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:E,prompt:!0,tag:1110},res:{ttl:E,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:x,prompt:!1,tag:1112},res:{ttl:x,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:re,prompt:!1,tag:1114},res:{ttl:re,prompt:!1,tag:1115}}},U={min:E,max:ie},I={idle:\"IDLE\",active:\"ACTIVE\"},pe=\"request\",he=[\"wc_sessionPropose\",\"wc_sessionRequest\",\"wc_authRequest\"];var as=Object.defineProperty,cs=Object.defineProperties,ls=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,hs=Object.prototype.propertyIsEnumerable,ue=(w,r,e)=>r in w?as(w,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[r]=e,g=(w,r)=>{for(var e in r||(r={}))ps.call(r,e)&&ue(w,e,r[e]);if(de)for(var e of de(r))hs.call(r,e)&&ue(w,e,r[e]);return w},D=(w,r)=>cs(w,ls(r));class ds extends fe{constructor(r){super(r),this.name=le,this.events=new je,this.initialized=!1,this.ignoredPayloadTypes=[ve],this.requestQueue={state:I.idle,queue:[]},this.sessionRequestQueue={state:I.idle,queue:[]},this.requestQueueDelay=Xe,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(R)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ne(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const s=D(g({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(s);const{pairingTopic:t,requiredNamespaces:i,optionalNamespaces:n,sessionProperties:o,relays:a}=s;let c=t,p,d=!1;if(c&&(d=this.client.core.pairing.pairings.get(c).active),!c||!d){const{topic:T,uri:_}=await this.client.core.pairing.create();c=T,p=_}const h=await this.client.core.crypto.generateKeyPair(),N=R.wc_sessionPropose.req.ttl||E,m=q(N),f=g({requiredNamespaces:i,optionalNamespaces:n,relays:a??[{protocol:me}],proposer:{publicKey:h,metadata:this.client.metadata},expiryTimestamp:m},o&&{sessionProperties:o}),{reject:k,resolve:O,done:we}=C(N,ae);if(this.events.once(u(\"session_connect\"),async({error:T,session:_})=>{if(T)k(T);else if(_){_.self.publicKey=h;const B=D(g({},_),{requiredNamespaces:f.requiredNamespaces,optionalNamespaces:f.optionalNamespaces});await this.client.session.set(_.topic,B),await this.setExpiry(_.topic,_.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:_.peer.metadata}),O(B)}}),!c){const{message:T}=l(\"NO_MATCHING_KEY\",`connect() pairing topic: ${c}`);throw new Error(T)}const W=await this.sendRequest({topic:c,method:\"wc_sessionPropose\",params:f,throwOnFailedPublish:!0});return await this.setProposal(W,g({id:W},f)),{uri:p,approval:we}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:s,relayProtocol:t,namespaces:i,sessionProperties:n}=e,o=this.client.proposal.get(s);let{pairingTopic:a,proposer:c,requiredNamespaces:p,optionalNamespaces:d}=o;a=a||\"\";const h=await this.client.core.crypto.generateKeyPair(),N=c.publicKey,m=await this.client.core.crypto.generateSharedKey(h,N);a&&s&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:c.metadata}),await this.sendResult({id:s,topic:a,result:{relay:{protocol:t??\"irn\"},responderPublicKey:h}}),await this.client.proposal.delete(s,S(\"USER_DISCONNECTED\")),await this.client.core.pairing.activate({topic:a}));const f=g({relay:{protocol:t??\"irn\"},namespaces:i,pairingTopic:a,controller:{publicKey:h,metadata:this.client.metadata},expiry:q(L)},n&&{sessionProperties:n});await this.client.core.relayer.subscribe(m);const k=D(g({},f),{topic:m,requiredNamespaces:p,optionalNamespaces:d,pairingTopic:a,acknowledged:!1,self:f.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:h});await this.client.session.set(m,k);try{await this.sendRequest({topic:m,method:\"wc_sessionSettle\",params:f,throwOnFailedPublish:!0})}catch(O){throw this.client.logger.error(O),this.client.session.delete(m,S(\"USER_DISCONNECTED\")),await this.client.core.relayer.unsubscribe(m),O}return await this.setExpiry(m,q(L)),{topic:m,acknowledged:()=>new Promise(O=>setTimeout(()=>O(this.client.session.get(m)),500))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:s,reason:t}=e,{pairingTopic:i}=this.client.proposal.get(s);i&&(await this.sendError(s,i,t),await this.client.proposal.delete(s,S(\"USER_DISCONNECTED\")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:s,namespaces:t}=e,i=await this.sendRequest({topic:s,method:\"wc_sessionUpdate\",params:{namespaces:t}}),{done:n,resolve:o,reject:a}=C();return this.events.once(u(\"session_update\",i),({error:c})=>{c?a(c):o()}),await this.client.session.update(s,{namespaces:t}),{acknowledged:n}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:s}=e,t=await this.sendRequest({topic:s,method:\"wc_sessionExtend\",params:{}}),{done:i,resolve:n,reject:o}=C();return this.events.once(u(\"session_extend\",t),({error:a})=>{a?o(a):n()}),await this.setExpiry(s,q(L)),{acknowledged:i}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:s,request:t,topic:i,expiry:n=R.wc_sessionRequest.req.ttl}=e,o=He(),{done:a,resolve:c,reject:p}=C(n,\"Request expired. Please try again.\");return this.events.once(u(\"session_request\",o),({error:d,result:h})=>{d?p(d):c(h)}),await Promise.all([new Promise(async d=>{await this.sendRequest({clientRpcId:o,topic:i,method:\"wc_sessionRequest\",params:{request:D(g({},t),{expiryTimestamp:q(n)}),chainId:s},expiry:n,throwOnFailedPublish:!0}).catch(h=>p(h)),this.client.events.emit(\"session_request_sent\",{topic:i,request:t,chainId:s,id:o}),d()}),new Promise(async d=>{const h=await Oe(this.client.core.storage,H);Te({id:o,topic:i,wcDeepLink:h}),d()}),a()]).then(d=>d[2])},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:s,response:t}=e,{id:i}=t;P(t)?await this.sendResult({id:i,topic:s,result:t.result,throwOnFailedPublish:!0}):v(t)&&await this.sendError(i,s,t.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:s}=e;if(this.client.session.keys.includes(s)){const t=await this.sendRequest({topic:s,method:\"wc_sessionPing\",params:{}}),{done:i,resolve:n,reject:o}=C();this.events.once(u(\"session_ping\",t),({error:a})=>{a?o(a):n()}),await i()}else this.client.core.pairing.pairings.keys.includes(s)&&await this.client.core.pairing.ping({topic:s})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:s,event:t,chainId:i}=e;await this.sendRequest({topic:s,method:\"wc_sessionEvent\",params:{event:t,chainId:i}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:s}=e;if(this.client.session.keys.includes(s))await this.sendRequest({topic:s,method:\"wc_sessionDelete\",params:S(\"USER_DISCONNECTED\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:s,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(s))await this.client.core.pairing.disconnect({topic:s});else{const{message:t}=l(\"MISMATCHED_TOPIC\",`Session or pairing topic not found: ${s}`);throw new Error(t)}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter(s=>Ve(s,e))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const s=this.client.core.pairing.pairings.get(e.pairingTopic),t=this.client.core.pairing.pairings.getAll().filter(i=>{var n,o;return((n=i.peerMetadata)==null?void 0:n.url)&&((o=i.peerMetadata)==null?void 0:o.url)===e.peer.metadata.url&&i.topic&&i.topic!==s.topic});if(t.length===0)return;this.client.logger.info(`Cleaning up ${t.length} duplicate pairing(s)`),await Promise.all(t.map(i=>this.client.core.pairing.disconnect({topic:i.topic}))),this.client.logger.info(\"Duplicate pairings clean up finished\")}catch(s){this.client.logger.error(s)}},this.deleteSession=async e=>{const{topic:s,expirerHasDeleted:t=!1,emitEvent:i=!0,id:n=0}=e,{self:o}=this.client.session.get(s);await this.client.core.relayer.unsubscribe(s),await this.client.session.delete(s,S(\"USER_DISCONNECTED\")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(s)&&await this.client.core.crypto.deleteSymKey(s),t||this.client.core.expirer.del(s),this.client.core.storage.removeItem(H).catch(a=>this.client.logger.warn(a)),this.getPendingSessionRequests().forEach(a=>{a.topic===s&&this.deletePendingSessionRequest(a.id,S(\"USER_DISCONNECTED\"))}),i&&this.client.events.emit(\"session_delete\",{id:n,topic:s})},this.deleteProposal=async(e,s)=>{await Promise.all([this.client.proposal.delete(e,S(\"USER_DISCONNECTED\")),s?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,s,t=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,s),t?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==e),t&&(this.sessionRequestQueue.state=I.idle,this.client.events.emit(\"session_request_expire\",{id:e}))},this.setExpiry=async(e,s)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:s}),this.client.core.expirer.set(e,s)},this.setProposal=async(e,s)=>{await this.client.proposal.set(e,s),this.client.core.expirer.set(e,q(R.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:s,topic:t,params:i,verifyContext:n}=e,o=i.request.expiryTimestamp||q(R.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(s,{id:s,topic:t,params:i,verifyContext:n}),o&&this.client.core.expirer.set(s,o)},this.sendRequest=async e=>{const{topic:s,method:t,params:i,expiry:n,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:c}=e,p=j(t,i,a);if(xe()&&he.includes(t)){const N=z(JSON.stringify(p));this.client.core.verify.register({attestationId:N})}const d=await this.client.core.crypto.encode(s,p),h=R[t].req;return n&&(h.ttl=n),o&&(h.id=o),this.client.core.history.set(s,p),c?(h.internal=D(g({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,d,h)):this.client.core.relayer.publish(s,d,h).catch(N=>this.client.logger.error(N)),p.id},this.sendResult=async e=>{const{id:s,topic:t,result:i,throwOnFailedPublish:n}=e,o=We(s,i),a=await this.client.core.crypto.encode(t,o),c=await this.client.core.history.get(t,s),p=R[c.request.method].res;n?(p.internal=D(g({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,a,p)):this.client.core.relayer.publish(t,a,p).catch(d=>this.client.logger.error(d)),await this.client.core.history.resolve(o)},this.sendError=async(e,s,t)=>{const i=Be(e,t),n=await this.client.core.crypto.encode(s,i),o=await this.client.core.history.get(s,e),a=R[o.request.method].res;this.client.core.relayer.publish(s,n,a),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const e=[],s=[];this.client.session.getAll().forEach(t=>{let i=!1;V(t.expiry)&&(i=!0),this.client.core.crypto.keychain.has(t.topic)||(i=!0),i&&e.push(t.topic)}),this.client.proposal.getAll().forEach(t=>{V(t.expiryTimestamp)&&s.push(t.id)}),await Promise.all([...e.map(t=>this.deleteSession({topic:t})),...s.map(t=>this.deleteProposal(t))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===I.active){this.client.logger.info(\"Request queue already active, skipping...\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=I.active;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise(s=>setTimeout(s,300))}catch(s){this.client.logger.warn(s)}}this.requestQueue.state=I.idle},this.processRequest=e=>{const{topic:s,payload:t}=e,i=t.method;switch(i){case\"wc_sessionPropose\":return this.onSessionProposeRequest(s,t);case\"wc_sessionSettle\":return this.onSessionSettleRequest(s,t);case\"wc_sessionUpdate\":return this.onSessionUpdateRequest(s,t);case\"wc_sessionExtend\":return this.onSessionExtendRequest(s,t);case\"wc_sessionPing\":return this.onSessionPingRequest(s,t);case\"wc_sessionDelete\":return this.onSessionDeleteRequest(s,t);case\"wc_sessionRequest\":return this.onSessionRequest(s,t);case\"wc_sessionEvent\":return this.onSessionEventRequest(s,t);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async e=>{const{topic:s,payload:t}=e,i=(await this.client.core.history.get(s,t.id)).request.method;switch(i){case\"wc_sessionPropose\":return this.onSessionProposeResponse(s,t);case\"wc_sessionSettle\":return this.onSessionSettleResponse(s,t);case\"wc_sessionUpdate\":return this.onSessionUpdateResponse(s,t);case\"wc_sessionExtend\":return this.onSessionExtendResponse(s,t);case\"wc_sessionPing\":return this.onSessionPingResponse(s,t);case\"wc_sessionRequest\":return this.onSessionRequestResponse(s,t);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:s}=e,{message:t}=l(\"MISSING_OR_INVALID\",`Decoded payload on topic ${s} is not identifiable as a JSON-RPC request or a response.`);throw new Error(t)},this.onSessionProposeRequest=async(e,s)=>{const{params:t,id:i}=s;try{this.isValidConnect(g({},s.params));const n=t.expiryTimestamp||q(R.wc_sessionPropose.req.ttl),o=g({id:i,pairingTopic:e,expiryTimestamp:n},t);await this.setProposal(i,o);const a=z(JSON.stringify(s)),c=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit(\"session_proposal\",{id:i,params:o,verifyContext:c})}catch(n){await this.sendError(i,e,n),this.client.logger.error(n)}},this.onSessionProposeResponse=async(e,s)=>{const{id:t}=s;if(P(s)){const{result:i}=s;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",result:i});const n=this.client.proposal.get(t);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",proposal:n});const o=n.proposer.publicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",selfPublicKey:o});const a=i.responderPublicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",peerPublicKey:a});const c=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",sessionTopic:c});const p=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",subscriptionId:p}),await this.client.core.pairing.activate({topic:e})}else v(s)&&(await this.client.proposal.delete(t,S(\"USER_DISCONNECTED\")),this.events.emit(u(\"session_connect\"),{error:s.error}))},this.onSessionSettleRequest=async(e,s)=>{const{id:t,params:i}=s;try{this.isValidSessionSettleRequest(i);const{relay:n,controller:o,expiry:a,namespaces:c,sessionProperties:p,pairingTopic:d}=s.params,h=g({topic:e,relay:n,expiry:a,namespaces:c,acknowledged:!0,pairingTopic:d,requiredNamespaces:{},optionalNamespaces:{},controller:o.publicKey,self:{publicKey:\"\",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},p&&{sessionProperties:p});await this.sendResult({id:s.id,topic:e,result:!0}),this.events.emit(u(\"session_connect\"),{session:h}),this.cleanupDuplicatePairings(h)}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.onSessionSettleResponse=async(e,s)=>{const{id:t}=s;P(s)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(u(\"session_approve\",t),{})):v(s)&&(await this.client.session.delete(e,S(\"USER_DISCONNECTED\")),this.events.emit(u(\"session_approve\",t),{error:s.error}))},this.onSessionUpdateRequest=async(e,s)=>{const{params:t,id:i}=s;try{const n=`${e}_session_update`,o=$.get(n);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidUpdate(g({topic:e},t)),await this.client.session.update(e,{namespaces:t.namespaces}),await this.sendResult({id:i,topic:e,result:!0}),this.client.events.emit(\"session_update\",{id:i,topic:e,params:t}),$.set(n,i)}catch(n){await this.sendError(i,e,n),this.client.logger.error(n)}},this.isRequestOutOfSync=(e,s)=>parseInt(s.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_update\",t),{}):v(s)&&this.events.emit(u(\"session_update\",t),{error:s.error})},this.onSessionExtendRequest=async(e,s)=>{const{id:t}=s;try{this.isValidExtend({topic:e}),await this.setExpiry(e,q(L)),await this.sendResult({id:t,topic:e,result:!0}),this.client.events.emit(\"session_extend\",{id:t,topic:e})}catch(i){await this.sendError(t,e,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_extend\",t),{}):v(s)&&this.events.emit(u(\"session_extend\",t),{error:s.error})},this.onSessionPingRequest=async(e,s)=>{const{id:t}=s;try{this.isValidPing({topic:e}),await this.sendResult({id:t,topic:e,result:!0}),this.client.events.emit(\"session_ping\",{id:t,topic:e})}catch(i){await this.sendError(t,e,i),this.client.logger.error(i)}},this.onSessionPingResponse=(e,s)=>{const{id:t}=s;setTimeout(()=>{P(s)?this.events.emit(u(\"session_ping\",t),{}):v(s)&&this.events.emit(u(\"session_ping\",t),{error:s.error})},500)},this.onSessionDeleteRequest=async(e,s)=>{const{id:t}=s;try{this.isValidDisconnect({topic:e,reason:s.params}),await Promise.all([new Promise(i=>{this.client.core.relayer.once(Z.publish,async()=>{i(await this.deleteSession({topic:e,id:t}))})}),this.sendResult({id:t,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:S(\"USER_DISCONNECTED\")})])}catch(i){this.client.logger.error(i)}},this.onSessionRequest=async(e,s)=>{const{id:t,params:i}=s;try{this.isValidRequest(g({topic:e},i));const n=z(JSON.stringify(j(\"wc_sessionRequest\",i,t))),o=this.client.session.get(e),a=await this.getVerifyContext(n,o.peer.metadata),c={id:t,topic:e,params:i,verifyContext:a};await this.setPendingSessionRequest(c),this.addSessionRequestToSessionRequestQueue(c),this.processSessionRequestQueue()}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.onSessionRequestResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_request\",t),{result:s.result}):v(s)&&this.events.emit(u(\"session_request\",t),{error:s.error})},this.onSessionEventRequest=async(e,s)=>{const{id:t,params:i}=s;try{const n=`${e}_session_event_${i.event.name}`,o=$.get(n);if(o&&this.isRequestOutOfSync(o,t)){this.client.logger.info(`Discarding out of sync request - ${t}`);return}this.isValidEmit(g({topic:e},i)),this.client.events.emit(\"session_event\",{id:t,topic:e,params:i}),$.set(n,t)}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:\"fulfilled\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=I.idle,this.processSessionRequestQueue()},ne(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:s})=>{const t=this.client.core.history.pending;t.length>0&&t.filter(i=>i.topic===e&&i.request.method===\"wc_sessionRequest\").forEach(i=>{this.events.emit(u(\"session_request\",i.request.id),{error:s})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===I.active){this.client.logger.info(\"session request queue is already active.\");return}const e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info(\"session request queue is empty.\");return}try{this.sessionRequestQueue.state=I.active,this.client.events.emit(\"session_request\",e)}catch(s){this.client.logger.error(s)}},this.onPairingCreated=e=>{if(e.active)return;const s=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);s&&this.onSessionProposeRequest(e.topic,j(\"wc_sessionPropose\",{requiredNamespaces:s.requiredNamespaces,optionalNamespaces:s.optionalNamespaces,relays:s.relays,proposer:s.proposer,sessionProperties:s.sessionProperties},s.id))},this.isValidConnect=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() params: ${JSON.stringify(e)}`);throw new Error(a)}const{pairingTopic:s,requiredNamespaces:t,optionalNamespaces:i,sessionProperties:n,relays:o}=e;if(A(s)||await this.isValidPairingTopic(s),!De(o,!0)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() relays: ${o}`);throw new Error(a)}!A(t)&&ee(t)!==0&&this.validateNamespaces(t,\"requiredNamespaces\"),!A(i)&&ee(i)!==0&&this.validateNamespaces(i,\"optionalNamespaces\"),A(n)||this.validateSessionProps(n,\"sessionProperties\")},this.validateNamespaces=(e,s)=>{const t=Ce(e,\"connect()\",s);if(t)throw new Error(t.message)},this.isValidApprove=async e=>{if(!y(e))throw new Error(l(\"MISSING_OR_INVALID\",`approve() params: ${e}`).message);const{id:s,namespaces:t,relayProtocol:i,sessionProperties:n}=e;await this.isValidProposalId(s);const o=this.client.proposal.get(s),a=Y(t,\"approve()\");if(a)throw new Error(a.message);const c=se(o.requiredNamespaces,t,\"approve()\");if(c)throw new Error(c.message);if(!b(i,!0)){const{message:p}=l(\"MISSING_OR_INVALID\",`approve() relayProtocol: ${i}`);throw new Error(p)}A(n)||this.validateSessionProps(n,\"sessionProperties\")},this.isValidReject=async e=>{if(!y(e)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() params: ${e}`);throw new Error(i)}const{id:s,reason:t}=e;if(await this.isValidProposalId(s),!Ae(t)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() reason: ${JSON.stringify(t)}`);throw new Error(i)}},this.isValidSessionSettleRequest=e=>{if(!y(e)){const{message:c}=l(\"MISSING_OR_INVALID\",`onSessionSettleRequest() params: ${e}`);throw new Error(c)}const{relay:s,controller:t,namespaces:i,expiry:n}=e;if(!be(s)){const{message:c}=l(\"MISSING_OR_INVALID\",\"onSessionSettleRequest() relay protocol should be a string\");throw new Error(c)}const o=Le(t,\"onSessionSettleRequest()\");if(o)throw new Error(o.message);const a=Y(i,\"onSessionSettleRequest()\");if(a)throw new Error(a.message);if(V(n)){const{message:c}=l(\"EXPIRED\",\"onSessionSettleRequest()\");throw new Error(c)}},this.isValidUpdate=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`update() params: ${e}`);throw new Error(a)}const{topic:s,namespaces:t}=e;await this.isValidSessionTopic(s);const i=this.client.session.get(s),n=Y(t,\"update()\");if(n)throw new Error(n.message);const o=se(i.requiredNamespaces,t,\"update()\");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`extend() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionTopic(s)},this.isValidRequest=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() params: ${e}`);throw new Error(a)}const{topic:s,request:t,chainId:i,expiry:n}=e;await this.isValidSessionTopic(s);const{namespaces:o}=this.client.session.get(s);if(!te(o,i)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() chainId: ${i}`);throw new Error(a)}if(!$e(t)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() ${JSON.stringify(t)}`);throw new Error(a)}if(!Ge(o,i,t.method)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() method: ${t.method}`);throw new Error(a)}if(n&&!Me(n,U)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() expiry: ${n}. Expiry must be a number (in seconds) between ${U.min} and ${U.max}`);throw new Error(a)}},this.isValidRespond=async e=>{var s;if(!y(e)){const{message:n}=l(\"MISSING_OR_INVALID\",`respond() params: ${e}`);throw new Error(n)}const{topic:t,response:i}=e;try{await this.isValidSessionTopic(t)}catch(n){throw(s=e?.response)!=null&&s.id&&this.cleanupAfterResponse(e),n}if(!Ue(i)){const{message:n}=l(\"MISSING_OR_INVALID\",`respond() response: ${JSON.stringify(i)}`);throw new Error(n)}},this.isValidPing=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`ping() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionOrPairingTopic(s)},this.isValidEmit=async e=>{if(!y(e)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() params: ${e}`);throw new Error(o)}const{topic:s,event:t,chainId:i}=e;await this.isValidSessionTopic(s);const{namespaces:n}=this.client.session.get(s);if(!te(n,i)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() chainId: ${i}`);throw new Error(o)}if(!Qe(t)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(t)}`);throw new Error(o)}if(!ke(n,i,t.name)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(t)}`);throw new Error(o)}},this.isValidDisconnect=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`disconnect() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionOrPairingTopic(s)},this.getVerifyContext=async(e,s)=>{const t={verified:{verifyUrl:s.verifyUrl||ye,validation:\"UNKNOWN\",origin:s.url||\"\"}};try{const i=await this.client.core.verify.resolve({attestationId:e,verifyUrl:s.verifyUrl});i&&(t.verified.origin=i.origin,t.verified.isScam=i.isScam,t.verified.validation=i.origin===new URL(s.url).origin?\"VALID\":\"INVALID\")}catch(i){this.client.logger.info(i)}return this.client.logger.info(`Verify context: ${JSON.stringify(t)}`),t},this.validateSessionProps=(e,s)=>{Object.values(e).forEach(t=>{if(!b(t,!1)){const{message:i}=l(\"MISSING_OR_INVALID\",`${s} must be in Record format. Received: ${JSON.stringify(t)}`);throw new Error(i)}})}}async isInitialized(){if(!this.initialized){const{message:r}=l(\"NOT_INITIALIZED\",this.name);throw new Error(r)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Z.message,async r=>{const{topic:e,message:s}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(s)))return;const t=await this.client.core.crypto.decode(e,s);try{Ze(t)?(this.client.core.history.set(e,t),this.onRelayEventRequest({topic:e,payload:t})):es(t)?(await this.client.core.history.resolve(t),await this.onRelayEventResponse({topic:e,payload:t}),this.client.core.history.delete(e,t.id)):this.onRelayEventUnknownPayload({topic:e,payload:t})}catch(i){this.client.logger.error(i)}})}registerExpirerEvents(){this.client.core.expirer.on(Se.expired,async r=>{const{topic:e,id:s}=Ke(r.target);if(s&&this.client.pendingRequest.keys.includes(s))return await this.deletePendingSessionRequest(s,l(\"EXPIRED\"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession({topic:e,expirerHasDeleted:!0}),this.client.events.emit(\"session_expire\",{topic:e})):s&&(await this.deleteProposal(s,!0),this.client.events.emit(\"proposal_expire\",{id:s}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ee.create,r=>this.onPairingCreated(r))}isValidPairingTopic(r){if(!b(r,!1)){const{message:e}=l(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${r}`);throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.core.pairing.pairings.get(r).expiry)){const{message:e}=l(\"EXPIRED\",`pairing topic: ${r}`);throw new Error(e)}}async isValidSessionTopic(r){if(!b(r,!1)){const{message:e}=l(\"MISSING_OR_INVALID\",`session topic should be a string: ${r}`);throw new Error(e)}if(!this.client.session.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`session topic doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.session.get(r).expiry)){await this.deleteSession({topic:r});const{message:e}=l(\"EXPIRED\",`session topic: ${r}`);throw new Error(e)}if(!this.client.core.crypto.keychain.has(r)){const{message:e}=l(\"MISSING_OR_INVALID\",`session topic does not exist in keychain: ${r}`);throw await this.deleteSession({topic:r}),new Error(e)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if(b(r,!1)){const{message:e}=l(\"NO_MATCHING_KEY\",`session or pairing topic doesn't exist: ${r}`);throw new Error(e)}else{const{message:e}=l(\"MISSING_OR_INVALID\",`session or pairing topic should be a string: ${r}`);throw new Error(e)}}async isValidProposalId(r){if(!ze(r)){const{message:e}=l(\"MISSING_OR_INVALID\",`proposal id should be a number: ${r}`);throw new Error(e)}if(!this.client.proposal.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`proposal id doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.proposal.get(r).expiryTimestamp)){await this.deleteProposal(r);const{message:e}=l(\"EXPIRED\",`proposal id: ${r}`);throw new Error(e)}}}class us extends K{constructor(r,e){super(r,e,oe,G),this.core=r,this.logger=e}}class ge extends K{constructor(r,e){super(r,e,ce,G),this.core=r,this.logger=e}}class gs extends K{constructor(r,e){super(r,e,pe,G,s=>s.id),this.core=r,this.logger=e}}class Q extends Pe{constructor(r){super(r),this.protocol=J,this.version=F,this.name=M.name,this.events=new Je,this.on=(s,t)=>this.events.on(s,t),this.once=(s,t)=>this.events.once(s,t),this.off=(s,t)=>this.events.off(s,t),this.removeListener=(s,t)=>this.events.removeListener(s,t),this.removeAllListeners=s=>this.events.removeAllListeners(s),this.connect=async s=>{try{return await this.engine.connect(s)}catch(t){throw this.logger.error(t.message),t}},this.pair=async s=>{try{return await this.engine.pair(s)}catch(t){throw this.logger.error(t.message),t}},this.approve=async s=>{try{return await this.engine.approve(s)}catch(t){throw this.logger.error(t.message),t}},this.reject=async s=>{try{return await this.engine.reject(s)}catch(t){throw this.logger.error(t.message),t}},this.update=async s=>{try{return await this.engine.update(s)}catch(t){throw this.logger.error(t.message),t}},this.extend=async s=>{try{return await this.engine.extend(s)}catch(t){throw this.logger.error(t.message),t}},this.request=async s=>{try{return await this.engine.request(s)}catch(t){throw this.logger.error(t.message),t}},this.respond=async s=>{try{return await this.engine.respond(s)}catch(t){throw this.logger.error(t.message),t}},this.ping=async s=>{try{return await this.engine.ping(s)}catch(t){throw this.logger.error(t.message),t}},this.emit=async s=>{try{return await this.engine.emit(s)}catch(t){throw this.logger.error(t.message),t}},this.disconnect=async s=>{try{return await this.engine.disconnect(s)}catch(t){throw this.logger.error(t.message),t}},this.find=s=>{try{return this.engine.find(s)}catch(t){throw this.logger.error(t.message),t}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(s){throw this.logger.error(s.message),s}},this.name=r?.name||M.name,this.metadata=r?.metadata||Ye();const e=typeof r?.logger<\"u\"&&typeof r?.logger!=\"string\"?r.logger:Ie(_e({level:r?.logger||M.logger}));this.core=r?.core||new Re(r),this.logger=qe(e,this.name),this.session=new ge(this.core,this.logger),this.proposal=new us(this.core,this.logger),this.pendingRequest=new gs(this.core,this.logger),this.engine=new ds(this)}static async init(r){const e=new Q(r);return await e.initialize(),e}get context(){return Ne(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\"Initialized\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info(\"SignClient Initialization Success\")}catch(r){throw this.logger.info(\"SignClient Initialization Failure\"),this.logger.error(r.message),r}}}const ws=ge,ms=Q;export{le as ENGINE_CONTEXT,I as ENGINE_QUEUE_STATES,R as ENGINE_RPC_OPTS,rs as HISTORY_CONTEXT,is as HISTORY_EVENTS,ns as HISTORY_STORAGE_VERSION,he as METHODS_TO_VERIFY,oe as PROPOSAL_CONTEXT,os as PROPOSAL_EXPIRY,ae as PROPOSAL_EXPIRY_MESSAGE,pe as REQUEST_CONTEXT,ce as SESSION_CONTEXT,L as SESSION_EXPIRY,U as SESSION_REQUEST_EXPIRY_BOUNDARIES,X as SIGN_CLIENT_CONTEXT,M as SIGN_CLIENT_DEFAULT,ss as SIGN_CLIENT_EVENTS,J as SIGN_CLIENT_PROTOCOL,ts as SIGN_CLIENT_STORAGE_OPTIONS,G as SIGN_CLIENT_STORAGE_PREFIX,F as SIGN_CLIENT_VERSION,ws as SessionStore,ms as SignClient,H as WALLETCONNECT_DEEPLINK_CHOICE,Q as default};\n//# sourceMappingURL=index.es.js.map\n","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","import { EventEmitter } from \"events\";\nimport fetch from \"cross-fetch\";\nimport { safeJsonParse, safeJsonStringify } from \"@walletconnect/safe-json\";\nimport { formatJsonRpcError, isHttpUrl, parseConnectionError, } from \"@walletconnect/jsonrpc-utils\";\nconst DEFAULT_HTTP_HEADERS = {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n};\nconst DEFAULT_HTTP_METHOD = \"POST\";\nconst DEFAULT_FETCH_OPTS = {\n headers: DEFAULT_HTTP_HEADERS,\n method: DEFAULT_HTTP_METHOD,\n};\nconst EVENT_EMITTER_MAX_LISTENERS_DEFAULT = 10;\nexport class HttpConnection {\n constructor(url, disableProviderPing = false) {\n this.url = url;\n this.disableProviderPing = disableProviderPing;\n this.events = new EventEmitter();\n this.isAvailable = false;\n this.registering = false;\n if (!isHttpUrl(url)) {\n throw new Error(`Provided URL is not compatible with HTTP connection: ${url}`);\n }\n this.url = url;\n this.disableProviderPing = disableProviderPing;\n }\n get connected() {\n return this.isAvailable;\n }\n get connecting() {\n return this.registering;\n }\n on(event, listener) {\n this.events.on(event, listener);\n }\n once(event, listener) {\n this.events.once(event, listener);\n }\n off(event, listener) {\n this.events.off(event, listener);\n }\n removeListener(event, listener) {\n this.events.removeListener(event, listener);\n }\n async open(url = this.url) {\n await this.register(url);\n }\n async close() {\n if (!this.isAvailable) {\n throw new Error(\"Connection already closed\");\n }\n this.onClose();\n }\n async send(payload, context) {\n if (!this.isAvailable) {\n await this.register();\n }\n try {\n const body = safeJsonStringify(payload);\n const res = await fetch(this.url, Object.assign(Object.assign({}, DEFAULT_FETCH_OPTS), { body }));\n const data = await res.json();\n this.onPayload({ data });\n }\n catch (e) {\n this.onError(payload.id, e);\n }\n }\n async register(url = this.url) {\n if (!isHttpUrl(url)) {\n throw new Error(`Provided URL is not compatible with HTTP connection: ${url}`);\n }\n if (this.registering) {\n const currentMaxListeners = this.events.getMaxListeners();\n if (this.events.listenerCount(\"register_error\") >= currentMaxListeners ||\n this.events.listenerCount(\"open\") >= currentMaxListeners) {\n this.events.setMaxListeners(currentMaxListeners + 1);\n }\n return new Promise((resolve, reject) => {\n this.events.once(\"register_error\", error => {\n this.resetMaxListeners();\n reject(error);\n });\n this.events.once(\"open\", () => {\n this.resetMaxListeners();\n if (typeof this.isAvailable === \"undefined\") {\n return reject(new Error(\"HTTP connection is missing or invalid\"));\n }\n resolve();\n });\n });\n }\n this.url = url;\n this.registering = true;\n try {\n if (!this.disableProviderPing) {\n const body = safeJsonStringify({ id: 1, jsonrpc: \"2.0\", method: \"test\", params: [] });\n await fetch(url, Object.assign(Object.assign({}, DEFAULT_FETCH_OPTS), { body }));\n }\n this.onOpen();\n }\n catch (e) {\n const error = this.parseError(e);\n this.events.emit(\"register_error\", error);\n this.onClose();\n throw error;\n }\n }\n onOpen() {\n this.isAvailable = true;\n this.registering = false;\n this.events.emit(\"open\");\n }\n onClose() {\n this.isAvailable = false;\n this.registering = false;\n this.events.emit(\"close\");\n }\n onPayload(e) {\n if (typeof e.data === \"undefined\")\n return;\n const payload = typeof e.data === \"string\" ? safeJsonParse(e.data) : e.data;\n this.events.emit(\"payload\", payload);\n }\n onError(id, e) {\n const error = this.parseError(e);\n const message = error.message || error.toString();\n const payload = formatJsonRpcError(id, message);\n this.events.emit(\"payload\", payload);\n }\n parseError(e, url = this.url) {\n return parseConnectionError(e, url, \"HTTP\");\n }\n resetMaxListeners() {\n if (this.events.getMaxListeners() > EVENT_EMITTER_MAX_LISTENERS_DEFAULT) {\n this.events.setMaxListeners(EVENT_EMITTER_MAX_LISTENERS_DEFAULT);\n }\n }\n}\nexport default HttpConnection;\n//# sourceMappingURL=http.js.map","import bg,{PROPOSAL_EXPIRY_MESSAGE as Tg}from\"@walletconnect/sign-client\";import{isValidObject as Lg,isCaipNamespace as Pa,parseNamespaceKey as de,mergeArrays as $i,parseChainId as Dg,getSdkError as Aa,isValidArray as Ca}from\"@walletconnect/utils\";import{pino as Hg,getDefaultLoggerOptions as Ng}from\"@walletconnect/logger\";import At,{HttpConnection as $g}from\"@walletconnect/jsonrpc-http-connection\";import{JsonRpcProvider as ot}from\"@walletconnect/jsonrpc-provider\";import Ug from\"events\";import{formatJsonRpcResult as Wg}from\"@walletconnect/jsonrpc-utils\";const Ia=\"error\",Fg=\"wss://relay.walletconnect.com\",Mg=\"wc\",qg=\"universal_provider\",xa=`${Mg}@2:${qg}:`,Bg=\"https://rpc.walletconnect.com/v1/\",Vn={DEFAULT_CHAIN_CHANGED:\"default_chain_changed\"};var ge=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{},Ui={exports:{}};/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(A,u){(function(){var i,d=\"4.17.21\",w=200,L=\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\",D=\"Expected a function\",En=\"Invalid `variable` option passed into `_.template`\",zt=\"__lodash_hash_undefined__\",pr=500,It=\"__lodash_placeholder__\",Ln=1,Fn=2,xt=4,Et=1,ve=2,vn=1,ct=2,qi=4,Dn=8,yt=16,Hn=32,St=64,Mn=128,Kt=256,dr=512,Da=30,Ha=\"...\",Na=800,$a=16,Bi=1,Ua=2,Wa=3,ht=1/0,kn=9007199254740991,Fa=17976931348623157e292,_e=0/0,Nn=4294967295,Ma=Nn-1,qa=Nn>>>1,Ba=[[\"ary\",Mn],[\"bind\",vn],[\"bindKey\",ct],[\"curry\",Dn],[\"curryRight\",yt],[\"flip\",dr],[\"partial\",Hn],[\"partialRight\",St],[\"rearg\",Kt]],Ot=\"[object Arguments]\",me=\"[object Array]\",Ga=\"[object AsyncFunction]\",Yt=\"[object Boolean]\",Zt=\"[object Date]\",za=\"[object DOMException]\",we=\"[object Error]\",Pe=\"[object Function]\",Gi=\"[object GeneratorFunction]\",yn=\"[object Map]\",Jt=\"[object Number]\",Ka=\"[object Null]\",qn=\"[object Object]\",zi=\"[object Promise]\",Ya=\"[object Proxy]\",Xt=\"[object RegExp]\",Sn=\"[object Set]\",Qt=\"[object String]\",Ae=\"[object Symbol]\",Za=\"[object Undefined]\",Vt=\"[object WeakMap]\",Ja=\"[object WeakSet]\",kt=\"[object ArrayBuffer]\",Rt=\"[object DataView]\",gr=\"[object Float32Array]\",vr=\"[object Float64Array]\",_r=\"[object Int8Array]\",mr=\"[object Int16Array]\",wr=\"[object Int32Array]\",Pr=\"[object Uint8Array]\",Ar=\"[object Uint8ClampedArray]\",Cr=\"[object Uint16Array]\",Ir=\"[object Uint32Array]\",Xa=/\\b__p \\+= '';/g,Qa=/\\b(__p \\+=) '' \\+/g,Va=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,Ki=/&(?:amp|lt|gt|quot|#39);/g,Yi=/[&<>\"']/g,ka=RegExp(Ki.source),ja=RegExp(Yi.source),no=/<%-([\\s\\S]+?)%>/g,to=/<%([\\s\\S]+?)%>/g,Zi=/<%=([\\s\\S]+?)%>/g,eo=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ro=/^\\w*$/,io=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,xr=/[\\\\^$.*+?()[\\]{}|]/g,so=RegExp(xr.source),Er=/^\\s+/,uo=/\\s/,ao=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,oo=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,fo=/,? & /,co=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,ho=/[()=,{}\\[\\]\\/\\s]/,lo=/\\\\(\\\\)?/g,po=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Ji=/\\w*$/,go=/^[-+]0x[0-9a-f]+$/i,vo=/^0b[01]+$/i,_o=/^\\[object .+?Constructor\\]$/,mo=/^0o[0-7]+$/i,wo=/^(?:0|[1-9]\\d*)$/,Po=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ce=/($^)/,Ao=/['\\n\\r\\u2028\\u2029\\\\]/g,Ie=\"\\\\ud800-\\\\udfff\",Co=\"\\\\u0300-\\\\u036f\",Io=\"\\\\ufe20-\\\\ufe2f\",xo=\"\\\\u20d0-\\\\u20ff\",Xi=Co+Io+xo,Qi=\"\\\\u2700-\\\\u27bf\",Vi=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Eo=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\",yo=\"\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\",So=\"\\\\u2000-\\\\u206f\",Oo=\" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\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as,\"$\"].join(\"|\")+\")\",bt+\"?\"+as+\"+\"+os,bt+\"+\"+fs,No,Ho,es,$o].join(\"|\"),\"g\"),qo=RegExp(\"[\"+us+Ie+Xi+ji+\"]\"),Bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Go=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],zo=-1,B={};B[gr]=B[vr]=B[_r]=B[mr]=B[wr]=B[Pr]=B[Ar]=B[Cr]=B[Ir]=!0,B[Ot]=B[me]=B[kt]=B[Yt]=B[Rt]=B[Zt]=B[we]=B[Pe]=B[yn]=B[Jt]=B[qn]=B[Xt]=B[Sn]=B[Qt]=B[Vt]=!1;var q={};q[Ot]=q[me]=q[kt]=q[Rt]=q[Yt]=q[Zt]=q[gr]=q[vr]=q[_r]=q[mr]=q[wr]=q[yn]=q[Jt]=q[qn]=q[Xt]=q[Sn]=q[Qt]=q[Ae]=q[Pr]=q[Ar]=q[Cr]=q[Ir]=!0,q[we]=q[Pe]=q[Vt]=!1;var Ko={\\u00C0:\"A\",\\u00C1:\"A\",\\u00C2:\"A\",\\u00C3:\"A\",\\u00C4:\"A\",\\u00C5:\"A\",\\u00E0:\"a\",\\u00E1:\"a\",\\u00E2:\"a\",\\u00E3:\"a\",\\u00E4:\"a\",\\u00E5:\"a\",\\u00C7:\"C\",\\u00E7:\"c\",\\u00D0:\"D\",\\u00F0:\"d\",\\u00C8:\"E\",\\u00C9:\"E\",\\u00CA:\"E\",\\u00CB:\"E\",\\u00E8:\"e\",\\u00E9:\"e\",\\u00EA:\"e\",\\u00EB:\"e\",\\u00CC:\"I\",\\u00CD:\"I\",\\u00CE:\"I\",\\u00CF:\"I\",\\u00EC:\"i\",\\u00ED:\"i\",\\u00EE:\"i\",\\u00EF:\"i\",\\u00D1:\"N\",\\u00F1:\"n\",\\u00D2:\"O\",\\u00D3:\"O\",\\u00D4:\"O\",\\u00D5:\"O\",\\u00D6:\"O\",\\u00D8:\"O\",\\u00F2:\"o\",\\u00F3:\"o\",\\u00F4:\"o\",\\u00F5:\"o\",\\u00F6:\"o\",\\u00F8:\"o\",\\u00D9:\"U\",\\u00DA:\"U\",\\u00DB:\"U\",\\u00DC:\"U\",\\u00F9:\"u\",\\u00FA:\"u\",\\u00FB:\"u\",\\u00FC:\"u\",\\u00DD:\"Y\",\\u00FD:\"y\",\\u00FF:\"y\",\\u00C6:\"Ae\",\\u00E6:\"ae\",\\u00DE:\"Th\",\\u00FE:\"th\",\\u00DF:\"ss\",\\u0100:\"A\",\\u0102:\"A\",\\u0104:\"A\",\\u0101:\"a\",\\u0103:\"a\",\\u0105:\"a\",\\u0106:\"C\",\\u0108:\"C\",\\u010A:\"C\",\\u010C:\"C\",\\u0107:\"c\",\\u0109:\"c\",\\u010B:\"c\",\\u010D:\"c\",\\u010E:\"D\",\\u0110:\"D\",\\u010F:\"d\",\\u0111:\"d\",\\u0112:\"E\",\\u0114:\"E\",\\u0116:\"E\",\\u0118:\"E\",\\u011A:\"E\",\\u0113:\"e\",\\u0115:\"e\",\\u0117:\"e\",\\u0119:\"e\",\\u011B:\"e\",\\u011C:\"G\",\\u011E:\"G\",\\u0120:\"G\",\\u0122:\"G\",\\u011D:\"g\",\\u011F:\"g\",\\u0121:\"g\",\\u0123:\"g\",\\u0124:\"H\",\\u0126:\"H\",\\u0125:\"h\",\\u0127:\"h\",\\u0128:\"I\",\\u012A:\"I\",\\u012C:\"I\",\\u012E:\"I\",\\u0130:\"I\",\\u0129:\"i\",\\u012B:\"i\",\\u012D:\"i\",\\u012F:\"i\",\\u0131:\"i\",\\u0134:\"J\",\\u0135:\"j\",\\u0136:\"K\",\\u0137:\"k\",\\u0138:\"k\",\\u0139:\"L\",\\u013B:\"L\",\\u013D:\"L\",\\u013F:\"L\",\\u0141:\"L\",\\u013A:\"l\",\\u013C:\"l\",\\u013E:\"l\",\\u0140:\"l\",\\u0142:\"l\",\\u0143:\"N\",\\u0145:\"N\",\\u0147:\"N\",\\u014A:\"N\",\\u0144:\"n\",\\u0146:\"n\",\\u0148:\"n\",\\u014B:\"n\",\\u014C:\"O\",\\u014E:\"O\",\\u0150:\"O\",\\u014D:\"o\",\\u014F:\"o\",\\u0151:\"o\",\\u0154:\"R\",\\u0156:\"R\",\\u0158:\"R\",\\u0155:\"r\",\\u0157:\"r\",\\u0159:\"r\",\\u015A:\"S\",\\u015C:\"S\",\\u015E:\"S\",\\u0160:\"S\",\\u015B:\"s\",\\u015D:\"s\",\\u015F:\"s\",\\u0161:\"s\",\\u0162:\"T\",\\u0164:\"T\",\\u0166:\"T\",\\u0163:\"t\",\\u0165:\"t\",\\u0167:\"t\",\\u0168:\"U\",\\u016A:\"U\",\\u016C:\"U\",\\u016E:\"U\",\\u0170:\"U\",\\u0172:\"U\",\\u0169:\"u\",\\u016B:\"u\",\\u016D:\"u\",\\u016F:\"u\",\\u0171:\"u\",\\u0173:\"u\",\\u0174:\"W\",\\u0175:\"w\",\\u0176:\"Y\",\\u0177:\"y\",\\u0178:\"Y\",\\u0179:\"Z\",\\u017B:\"Z\",\\u017D:\"Z\",\\u017A:\"z\",\\u017C:\"z\",\\u017E:\"z\",\\u0132:\"IJ\",\\u0133:\"ij\",\\u0152:\"Oe\",\\u0153:\"oe\",\\u0149:\"'n\",\\u017F:\"s\"},Yo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},Zo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"},Jo={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Xo=parseFloat,Qo=parseInt,ps=typeof ge==\"object\"&&ge&&ge.Object===Object&&ge,Vo=typeof self==\"object\"&&self&&self.Object===Object&&self,k=ps||Vo||Function(\"return this\")(),Tr=u&&!u.nodeType&&u,lt=Tr&&!0&&A&&!A.nodeType&&A,ds=lt&<.exports===Tr,Lr=ds&&ps.process,_n=function(){try{var h=lt&<.require&<.require(\"util\").types;return h||Lr&&Lr.binding&&Lr.binding(\"util\")}catch{}}(),gs=_n&&_n.isArrayBuffer,vs=_n&&_n.isDate,_s=_n&&_n.isMap,ms=_n&&_n.isRegExp,ws=_n&&_n.isSet,Ps=_n&&_n.isTypedArray;function cn(h,g,p){switch(p.length){case 0:return h.call(g);case 1:return h.call(g,p[0]);case 2:return h.call(g,p[0],p[1]);case 3:return h.call(g,p[0],p[1],p[2])}return h.apply(g,p)}function ko(h,g,p,C){for(var S=-1,U=h==null?0:h.length;++S-1}function Dr(h,g,p){for(var C=-1,S=h==null?0:h.length;++C-1;);return p}function Os(h,g){for(var p=h.length;p--&&Tt(g,h[p],0)>-1;);return p}function of(h,g){for(var p=h.length,C=0;p--;)h[p]===g&&++C;return C}var ff=Ur(Ko),cf=Ur(Yo);function hf(h){return\"\\\\\"+Jo[h]}function lf(h,g){return h==null?i:h[g]}function Lt(h){return qo.test(h)}function pf(h){return Bo.test(h)}function df(h){for(var g,p=[];!(g=h.next()).done;)p.push(g.value);return p}function qr(h){var g=-1,p=Array(h.size);return h.forEach(function(C,S){p[++g]=[S,C]}),p}function Rs(h,g){return function(p){return h(g(p))}}function tt(h,g){for(var p=-1,C=h.length,S=0,U=[];++p-1}function tc(n,t){var e=this.__data__,r=Be(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}Bn.prototype.clear=Vf,Bn.prototype.delete=kf,Bn.prototype.get=jf,Bn.prototype.has=nc,Bn.prototype.set=tc;function Gn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function An(n,t,e,r,s,o){var f,c=t&Ln,l=t&Fn,v=t&xt;if(e&&(f=s?e(n,r,s,o):e(n)),f!==i)return f;if(!K(n))return n;var _=O(n);if(_){if(f=sh(n),!c)return un(n,f)}else{var m=tn(n),P=m==Pe||m==Gi;if(at(n))return hu(n,c);if(m==qn||m==Ot||P&&!s){if(f=l||P?{}:bu(n),!c)return l?Jc(n,_c(f,n)):Zc(n,qs(f,n))}else{if(!q[m])return s?n:{};f=uh(n,m,c)}}o||(o=new Rn);var I=o.get(n);if(I)return I;o.set(n,f),sa(n)?n.forEach(function(y){f.add(An(y,t,e,y,n,o))}):ra(n)&&n.forEach(function(y,H){f.set(H,An(y,t,e,H,n,o))});var E=v?l?pi:li:l?on:V,b=_?i:E(n);return mn(b||n,function(y,H){b&&(H=y,y=n[H]),se(f,H,An(y,t,e,H,n,o))}),f}function mc(n){var t=V(n);return function(e){return Bs(e,n,t)}}function Bs(n,t,e){var r=e.length;if(n==null)return!r;for(n=M(n);r--;){var s=e[r],o=t[s],f=n[s];if(f===i&&!(s in n)||!o(f))return!1}return!0}function Gs(n,t,e){if(typeof n!=\"function\")throw new wn(D);return le(function(){n.apply(i,e)},t)}function ue(n,t,e,r){var s=-1,o=Ee,f=!0,c=n.length,l=[],v=t.length;if(!c)return l;e&&(t=G(t,hn(e))),r?(o=Dr,f=!1):t.length>=w&&(o=jt,f=!1,t=new gt(t));n:for(;++ss?0:s+e),r=r===i||r>s?s:R(r),r<0&&(r+=s),r=e>r?0:aa(r);e0&&e(c)?t>1?j(c,t-1,e,r,s):nt(s,c):r||(s[s.length]=c)}return s}var Jr=_u(),Ys=_u(!0);function $n(n,t){return n&&Jr(n,t,V)}function Xr(n,t){return n&&Ys(n,t,V)}function ze(n,t){return jn(t,function(e){return Jn(n[e])})}function _t(n,t){t=st(t,n);for(var e=0,r=t.length;n!=null&&et}function Ac(n,t){return n!=null&&F.call(n,t)}function Cc(n,t){return n!=null&&t in M(n)}function Ic(n,t,e){return n>=nn(t,e)&&n=120&&_.length>=120)?new gt(f&&_):i}_=n[0];var m=-1,P=c[0];n:for(;++m-1;)c!==n&&Ne.call(c,l,1),Ne.call(n,l,1);return n}function ru(n,t){for(var e=n?t.length:0,r=e-1;e--;){var s=t[e];if(e==r||s!==o){var o=s;Zn(s)?Ne.call(n,s,1):si(n,s)}}return n}function ei(n,t){return n+We(Us()*(t-n+1))}function $c(n,t,e,r){for(var s=-1,o=Q(Ue((t-n)/(e||1)),0),f=p(o);o--;)f[r?o:++s]=n,n+=e;return f}function ri(n,t){var e=\"\";if(!n||t<1||t>kn)return e;do t%2&&(e+=n),t=We(t/2),t&&(n+=n);while(t);return e}function T(n,t){return Pi(Du(n,t,fn),n+\"\")}function Uc(n){return Ms(Gt(n))}function Wc(n,t){var e=Gt(n);return tr(e,vt(t,0,e.length))}function fe(n,t,e,r){if(!K(n))return n;t=st(t,n);for(var s=-1,o=t.length,f=o-1,c=n;c!=null&&++ss?0:s+t),e=e>s?s:e,e<0&&(e+=s),s=t>e?0:e-t>>>0,t>>>=0;for(var o=p(s);++r>>1,f=n[o];f!==null&&!pn(f)&&(e?f<=t:f=w){var v=t?null:kc(n);if(v)return Se(v);f=!1,s=jt,l=new gt}else l=t?[]:c;n:for(;++r=r?n:Cn(n,t,e)}var cu=Rf||function(n){return k.clearTimeout(n)};function hu(n,t){if(t)return n.slice();var e=n.length,r=Ls?Ls(e):new n.constructor(e);return n.copy(r),r}function fi(n){var t=new n.constructor(n.byteLength);return new De(t).set(new De(n)),t}function Gc(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function zc(n){var t=new n.constructor(n.source,Ji.exec(n));return t.lastIndex=n.lastIndex,t}function Kc(n){return ie?M(ie.call(n)):{}}function lu(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function pu(n,t){if(n!==t){var e=n!==i,r=n===null,s=n===n,o=pn(n),f=t!==i,c=t===null,l=t===t,v=pn(t);if(!c&&!v&&!o&&n>t||o&&f&&l&&!c&&!v||r&&f&&l||!e&&l||!s)return 1;if(!r&&!o&&!v&&n=c)return l;var v=e[r];return l*(v==\"desc\"?-1:1)}}return n.index-t.index}function du(n,t,e,r){for(var s=-1,o=n.length,f=e.length,c=-1,l=t.length,v=Q(o-f,0),_=p(l+v),m=!r;++c1?e[s-1]:i,f=s>2?e[2]:i;for(o=n.length>3&&typeof o==\"function\"?(s--,o):i,f&&rn(e[0],e[1],f)&&(o=s<3?i:o,s=1),t=M(t);++r-1?s[o?t[f]:f]:i}}function Pu(n){return Yn(function(t){var e=t.length,r=e,s=Pn.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if(typeof o!=\"function\")throw new wn(D);if(s&&!f&&je(o)==\"wrapper\")var f=new Pn([],!0)}for(r=f?r:e;++r1&&$.reverse(),_&&lc))return!1;var v=o.get(n),_=o.get(t);if(v&&_)return v==t&&_==n;var m=-1,P=!0,I=e&ve?new gt:i;for(o.set(n,t),o.set(t,n);++m1?\"& \":\"\")+t[r],t=t.join(e>2?\", \":\" \"),n.replace(ao,`{\n/* [wrapped with `+t+`] */\n`)}function oh(n){return O(n)||Pt(n)||!!(Ns&&n&&n[Ns])}function Zn(n,t){var e=typeof n;return t=t??kn,!!t&&(e==\"number\"||e!=\"symbol\"&&wo.test(n))&&n>-1&&n%1==0&&n0){if(++t>=Na)return arguments[0]}else t=0;return n.apply(i,arguments)}}function tr(n,t){var e=-1,r=n.length,s=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e=typeof e==\"function\"?(n.pop(),e):i,Ku(n,e)});function Yu(n){var t=a(n);return t.__chain__=!0,t}function wl(n,t){return t(n),n}function er(n,t){return t(n)}var Pl=Yn(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,s=function(o){return Zr(o,n)};return t>1||this.__actions__.length||!(r instanceof N)||!Zn(e)?this.thru(s):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:er,args:[s],thisArg:i}),new Pn(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(i),o}))});function Al(){return Yu(this)}function Cl(){return new Pn(this.value(),this.__chain__)}function Il(){this.__values__===i&&(this.__values__=ua(this.value()));var n=this.__index__>=this.__values__.length,t=n?i:this.__values__[this.__index__++];return{done:n,value:t}}function xl(){return this}function El(n){for(var t,e=this;e instanceof qe;){var r=Fu(e);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;e=e.__wrapped__}return s.__wrapped__=n,t}function yl(){var n=this.__wrapped__;if(n instanceof N){var t=n;return this.__actions__.length&&(t=new N(this)),t=t.reverse(),t.__actions__.push({func:er,args:[Ai],thisArg:i}),new Pn(t,this.__chain__)}return this.thru(Ai)}function Sl(){return ou(this.__wrapped__,this.__actions__)}var Ol=Je(function(n,t,e){F.call(n,e)?++n[e]:zn(n,e,1)});function Rl(n,t,e){var r=O(n)?As:wc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}function bl(n,t){var e=O(n)?jn:Ks;return e(n,x(t,3))}var Tl=wu(Mu),Ll=wu(qu);function Dl(n,t){return j(rr(n,t),1)}function Hl(n,t){return j(rr(n,t),ht)}function Nl(n,t,e){return e=e===i?1:R(e),j(rr(n,t),e)}function Zu(n,t){var e=O(n)?mn:rt;return e(n,x(t,3))}function Ju(n,t){var e=O(n)?jo:zs;return e(n,x(t,3))}var $l=Je(function(n,t,e){F.call(n,e)?n[e].push(t):zn(n,e,[t])});function Ul(n,t,e,r){n=an(n)?n:Gt(n),e=e&&!r?R(e):0;var s=n.length;return e<0&&(e=Q(s+e,0)),or(n)?e<=s&&n.indexOf(t,e)>-1:!!s&&Tt(n,t,e)>-1}var Wl=T(function(n,t,e){var r=-1,s=typeof t==\"function\",o=an(n)?p(n.length):[];return rt(n,function(f){o[++r]=s?cn(t,f,e):ae(f,t,e)}),o}),Fl=Je(function(n,t,e){zn(n,e,t)});function rr(n,t){var e=O(n)?G:Vs;return e(n,x(t,3))}function Ml(n,t,e,r){return n==null?[]:(O(t)||(t=t==null?[]:[t]),e=r?i:e,O(e)||(e=e==null?[]:[e]),tu(n,t,e))}var ql=Je(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function Bl(n,t,e){var r=O(n)?Hr:Es,s=arguments.length<3;return r(n,x(t,4),e,s,rt)}function Gl(n,t,e){var r=O(n)?nf:Es,s=arguments.length<3;return r(n,x(t,4),e,s,zs)}function zl(n,t){var e=O(n)?jn:Ks;return e(n,ur(x(t,3)))}function Kl(n){var t=O(n)?Ms:Uc;return t(n)}function Yl(n,t,e){(e?rn(n,t,e):t===i)?t=1:t=R(t);var r=O(n)?dc:Wc;return r(n,t)}function Zl(n){var t=O(n)?gc:Mc;return t(n)}function Jl(n){if(n==null)return 0;if(an(n))return or(n)?Dt(n):n.length;var t=tn(n);return t==yn||t==Sn?n.size:jr(n).length}function Xl(n,t,e){var r=O(n)?Nr:qc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}var Ql=T(function(n,t){if(n==null)return[];var e=t.length;return e>1&&rn(n,t[0],t[1])?t=[]:e>2&&rn(t[0],t[1],t[2])&&(t=[t[0]]),tu(n,j(t,1),[])}),ir=bf||function(){return k.Date.now()};function Vl(n,t){if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){if(--n<1)return t.apply(this,arguments)}}function Xu(n,t,e){return t=e?i:t,t=n&&t==null?n.length:t,Kn(n,Mn,i,i,i,i,t)}function Qu(n,t){var e;if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Ii=T(function(n,t,e){var r=vn;if(e.length){var s=tt(e,qt(Ii));r|=Hn}return Kn(n,r,t,e,s)}),Vu=T(function(n,t,e){var r=vn|ct;if(e.length){var s=tt(e,qt(Vu));r|=Hn}return Kn(t,r,n,e,s)});function ku(n,t,e){t=e?i:t;var r=Kn(n,Dn,i,i,i,i,i,t);return r.placeholder=ku.placeholder,r}function ju(n,t,e){t=e?i:t;var r=Kn(n,yt,i,i,i,i,i,t);return r.placeholder=ju.placeholder,r}function na(n,t,e){var r,s,o,f,c,l,v=0,_=!1,m=!1,P=!0;if(typeof n!=\"function\")throw new wn(D);t=xn(t)||0,K(e)&&(_=!!e.leading,m=\"maxWait\"in e,o=m?Q(xn(e.maxWait)||0,t):o,P=\"trailing\"in e?!!e.trailing:P);function I(J){var Tn=r,Qn=s;return r=s=i,v=J,f=n.apply(Qn,Tn),f}function E(J){return v=J,c=le(H,t),_?I(J):f}function b(J){var Tn=J-l,Qn=J-v,wa=t-Tn;return m?nn(wa,o-Qn):wa}function y(J){var Tn=J-l,Qn=J-v;return l===i||Tn>=t||Tn<0||m&&Qn>=o}function H(){var J=ir();if(y(J))return $(J);c=le(H,b(J))}function $(J){return c=i,P&&r?I(J):(r=s=i,f)}function dn(){c!==i&&cu(c),v=0,r=l=s=c=i}function sn(){return c===i?f:$(ir())}function gn(){var J=ir(),Tn=y(J);if(r=arguments,s=this,l=J,Tn){if(c===i)return E(l);if(m)return cu(c),c=le(H,t),I(l)}return c===i&&(c=le(H,t)),f}return gn.cancel=dn,gn.flush=sn,gn}var kl=T(function(n,t){return Gs(n,1,t)}),jl=T(function(n,t,e){return Gs(n,xn(t)||0,e)});function np(n){return Kn(n,dr)}function sr(n,t){if(typeof n!=\"function\"||t!=null&&typeof t!=\"function\")throw new wn(D);var e=function(){var r=arguments,s=t?t.apply(this,r):r[0],o=e.cache;if(o.has(s))return o.get(s);var f=n.apply(this,r);return e.cache=o.set(s,f)||o,f};return e.cache=new(sr.Cache||Gn),e}sr.Cache=Gn;function ur(n){if(typeof n!=\"function\")throw new wn(D);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function tp(n){return Qu(2,n)}var ep=Bc(function(n,t){t=t.length==1&&O(t[0])?G(t[0],hn(x())):G(j(t,1),hn(x()));var e=t.length;return T(function(r){for(var s=-1,o=nn(r.length,e);++s=t}),Pt=Js(function(){return arguments}())?Js:function(n){return Y(n)&&F.call(n,\"callee\")&&!Hs.call(n,\"callee\")},O=p.isArray,_p=gs?hn(gs):Ec;function an(n){return n!=null&&ar(n.length)&&!Jn(n)}function Z(n){return Y(n)&&an(n)}function mp(n){return n===!0||n===!1||Y(n)&&en(n)==Yt}var at=Lf||Ni,wp=vs?hn(vs):yc;function Pp(n){return Y(n)&&n.nodeType===1&&!pe(n)}function Ap(n){if(n==null)return!0;if(an(n)&&(O(n)||typeof n==\"string\"||typeof n.splice==\"function\"||at(n)||Bt(n)||Pt(n)))return!n.length;var t=tn(n);if(t==yn||t==Sn)return!n.size;if(he(n))return!jr(n).length;for(var e in n)if(F.call(n,e))return!1;return!0}function Cp(n,t){return oe(n,t)}function Ip(n,t,e){e=typeof e==\"function\"?e:i;var r=e?e(n,t):i;return r===i?oe(n,t,i,e):!!r}function Ei(n){if(!Y(n))return!1;var t=en(n);return t==we||t==za||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!pe(n)}function xp(n){return typeof n==\"number\"&&$s(n)}function Jn(n){if(!K(n))return!1;var t=en(n);return t==Pe||t==Gi||t==Ga||t==Ya}function ea(n){return typeof n==\"number\"&&n==R(n)}function ar(n){return typeof n==\"number\"&&n>-1&&n%1==0&&n<=kn}function K(n){var t=typeof n;return n!=null&&(t==\"object\"||t==\"function\")}function Y(n){return n!=null&&typeof n==\"object\"}var ra=_s?hn(_s):Oc;function Ep(n,t){return n===t||kr(n,t,gi(t))}function yp(n,t,e){return e=typeof e==\"function\"?e:i,kr(n,t,gi(t),e)}function Sp(n){return ia(n)&&n!=+n}function Op(n){if(hh(n))throw new S(L);return Xs(n)}function Rp(n){return n===null}function bp(n){return n==null}function ia(n){return typeof n==\"number\"||Y(n)&&en(n)==Jt}function pe(n){if(!Y(n)||en(n)!=qn)return!1;var t=He(n);if(t===null)return!0;var e=F.call(t,\"constructor\")&&t.constructor;return typeof e==\"function\"&&e instanceof e&&be.call(e)==yf}var yi=ms?hn(ms):Rc;function Tp(n){return ea(n)&&n>=-kn&&n<=kn}var sa=ws?hn(ws):bc;function or(n){return typeof n==\"string\"||!O(n)&&Y(n)&&en(n)==Qt}function pn(n){return typeof n==\"symbol\"||Y(n)&&en(n)==Ae}var Bt=Ps?hn(Ps):Tc;function Lp(n){return n===i}function Dp(n){return Y(n)&&tn(n)==Vt}function Hp(n){return Y(n)&&en(n)==Ja}var Np=ke(ni),$p=ke(function(n,t){return n<=t});function ua(n){if(!n)return[];if(an(n))return or(n)?On(n):un(n);if(ne&&n[ne])return df(n[ne]());var t=tn(n),e=t==yn?qr:t==Sn?Se:Gt;return e(n)}function Xn(n){if(!n)return n===0?n:0;if(n=xn(n),n===ht||n===-ht){var t=n<0?-1:1;return t*Fa}return n===n?n:0}function R(n){var t=Xn(n),e=t%1;return t===t?e?t-e:t:0}function aa(n){return n?vt(R(n),0,Nn):0}function xn(n){if(typeof n==\"number\")return n;if(pn(n))return _e;if(K(n)){var t=typeof n.valueOf==\"function\"?n.valueOf():n;n=K(t)?t+\"\":t}if(typeof n!=\"string\")return n===0?n:+n;n=ys(n);var e=vo.test(n);return e||mo.test(n)?Qo(n.slice(2),e?2:8):go.test(n)?_e:+n}function oa(n){return Un(n,on(n))}function Up(n){return n?vt(R(n),-kn,kn):n===0?n:0}function W(n){return n==null?\"\":ln(n)}var Wp=Ft(function(n,t){if(he(t)||an(t)){Un(t,V(t),n);return}for(var e in t)F.call(t,e)&&se(n,e,t[e])}),fa=Ft(function(n,t){Un(t,on(t),n)}),fr=Ft(function(n,t,e,r){Un(t,on(t),n,r)}),Fp=Ft(function(n,t,e,r){Un(t,V(t),n,r)}),Mp=Yn(Zr);function qp(n,t){var e=Wt(n);return t==null?e:qs(e,t)}var Bp=T(function(n,t){n=M(n);var e=-1,r=t.length,s=r>2?t[2]:i;for(s&&rn(t[0],t[1],s)&&(r=1);++e1),o}),Un(n,pi(n),e),r&&(e=An(e,Ln|Fn|xt,jc));for(var s=t.length;s--;)si(e,t[s]);return e});function ud(n,t){return ha(n,ur(x(t)))}var ad=Yn(function(n,t){return n==null?{}:Hc(n,t)});function ha(n,t){if(n==null)return{};var e=G(pi(n),function(r){return[r]});return t=x(t),eu(n,e,function(r,s){return t(r,s[0])})}function od(n,t,e){t=st(t,n);var r=-1,s=t.length;for(s||(s=1,n=i);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var s=Us();return nn(n+s*(t-n+Xo(\"1e-\"+((s+\"\").length-1))),t)}return ei(n,t)}var wd=Mt(function(n,t,e){return t=t.toLowerCase(),n+(e?da(t):t)});function da(n){return Ri(W(n).toLowerCase())}function ga(n){return n=W(n),n&&n.replace(Po,ff).replace(Fo,\"\")}function Pd(n,t,e){n=W(n),t=ln(t);var r=n.length;e=e===i?r:vt(R(e),0,r);var s=e;return e-=t.length,e>=0&&n.slice(e,s)==t}function Ad(n){return n=W(n),n&&ja.test(n)?n.replace(Yi,cf):n}function Cd(n){return n=W(n),n&&so.test(n)?n.replace(xr,\"\\\\$&\"):n}var Id=Mt(function(n,t,e){return n+(e?\"-\":\"\")+t.toLowerCase()}),xd=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toLowerCase()}),Ed=mu(\"toLowerCase\");function yd(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;if(!t||r>=t)return n;var s=(t-r)/2;return Ve(We(s),e)+n+Ve(Ue(s),e)}function Sd(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;return t&&r>>0,e?(n=W(n),n&&(typeof t==\"string\"||t!=null&&!yi(t))&&(t=ln(t),!t&&Lt(n))?ut(On(n),0,e):n.split(t,e)):[]}var Hd=Mt(function(n,t,e){return n+(e?\" \":\"\")+Ri(t)});function Nd(n,t,e){return n=W(n),e=e==null?0:vt(R(e),0,n.length),t=ln(t),n.slice(e,e+t.length)==t}function $d(n,t,e){var r=a.templateSettings;e&&rn(n,t,e)&&(t=i),n=W(n),t=fr({},t,r,Eu);var s=fr({},t.imports,r.imports,Eu),o=V(s),f=Mr(s,o),c,l,v=0,_=t.interpolate||Ce,m=\"__p += '\",P=Br((t.escape||Ce).source+\"|\"+_.source+\"|\"+(_===Zi?po:Ce).source+\"|\"+(t.evaluate||Ce).source+\"|$\",\"g\"),I=\"//# sourceURL=\"+(F.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++zo+\"]\")+`\n`;n.replace(P,function(y,H,$,dn,sn,gn){return $||($=dn),m+=n.slice(v,gn).replace(Ao,hf),H&&(c=!0,m+=`' +\n__e(`+H+`) +\n'`),sn&&(l=!0,m+=`';\n`+sn+`;\n__p += '`),$&&(m+=`' +\n((__t = (`+$+`)) == null ? '' : __t) +\n'`),v=gn+y.length,y}),m+=`';\n`;var E=F.call(t,\"variable\")&&t.variable;if(!E)m=`with (obj) {\n`+m+`\n}\n`;else if(ho.test(E))throw new S(En);m=(l?m.replace(Xa,\"\"):m).replace(Qa,\"$1\").replace(Va,\"$1;\"),m=\"function(\"+(E||\"obj\")+`) {\n`+(E?\"\":`obj || (obj = {});\n`)+\"var __t, __p = ''\"+(c?\", __e = _.escape\":\"\")+(l?`, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n`:`;\n`)+m+`return __p\n}`;var b=_a(function(){return U(o,I+\"return \"+m).apply(i,f)});if(b.source=m,Ei(b))throw b;return b}function Ud(n){return W(n).toLowerCase()}function Wd(n){return W(n).toUpperCase()}function Fd(n,t,e){if(n=W(n),n&&(e||t===i))return ys(n);if(!n||!(t=ln(t)))return n;var r=On(n),s=On(t),o=Ss(r,s),f=Os(r,s)+1;return ut(r,o,f).join(\"\")}function Md(n,t,e){if(n=W(n),n&&(e||t===i))return n.slice(0,bs(n)+1);if(!n||!(t=ln(t)))return n;var r=On(n),s=Os(r,On(t))+1;return ut(r,0,s).join(\"\")}function qd(n,t,e){if(n=W(n),n&&(e||t===i))return n.replace(Er,\"\");if(!n||!(t=ln(t)))return n;var r=On(n),s=Ss(r,On(t));return ut(r,s).join(\"\")}function Bd(n,t){var e=Da,r=Ha;if(K(t)){var s=\"separator\"in t?t.separator:s;e=\"length\"in t?R(t.length):e,r=\"omission\"in t?ln(t.omission):r}n=W(n);var o=n.length;if(Lt(n)){var f=On(n);o=f.length}if(e>=o)return n;var c=e-Dt(r);if(c<1)return r;var l=f?ut(f,0,c).join(\"\"):n.slice(0,c);if(s===i)return l+r;if(f&&(c+=l.length-c),yi(s)){if(n.slice(c).search(s)){var v,_=l;for(s.global||(s=Br(s.source,W(Ji.exec(s))+\"g\")),s.lastIndex=0;v=s.exec(_);)var m=v.index;l=l.slice(0,m===i?c:m)}}else if(n.indexOf(ln(s),c)!=c){var P=l.lastIndexOf(s);P>-1&&(l=l.slice(0,P))}return l+r}function Gd(n){return n=W(n),n&&ka.test(n)?n.replace(Ki,mf):n}var zd=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toUpperCase()}),Ri=mu(\"toUpperCase\");function va(n,t,e){return n=W(n),t=e?i:t,t===i?pf(n)?Af(n):rf(n):n.match(t)||[]}var _a=T(function(n,t){try{return cn(n,i,t)}catch(e){return Ei(e)?e:new S(e)}}),Kd=Yn(function(n,t){return mn(t,function(e){e=Wn(e),zn(n,e,Ii(n[e],n))}),n});function Yd(n){var t=n==null?0:n.length,e=x();return n=t?G(n,function(r){if(typeof r[1]!=\"function\")throw new wn(D);return[e(r[0]),r[1]]}):[],T(function(r){for(var s=-1;++skn)return[];var e=Nn,r=nn(n,Nn);t=x(t),n-=Nn;for(var s=Fr(r,t);++e0||t<0)?new N(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(t=R(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},N.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},N.prototype.toArray=function(){return this.take(Nn)},$n(N.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=a[r?\"take\"+(t==\"last\"?\"Right\":\"\"):t],o=r||/^find/.test(t);s&&(a.prototype[t]=function(){var f=this.__wrapped__,c=r?[1]:arguments,l=f instanceof N,v=c[0],_=l||O(f),m=function(H){var $=s.apply(a,nt([H],c));return r&&P?$[0]:$};_&&e&&typeof v==\"function\"&&v.length!=1&&(l=_=!1);var P=this.__chain__,I=!!this.__actions__.length,E=o&&!P,b=l&&!I;if(!o&&_){f=b?f:new N(this);var y=n.apply(f,c);return y.__actions__.push({func:er,args:[m],thisArg:i}),new Pn(y,P)}return E&&b?n.apply(this,c):(y=this.thru(m),E?r?y.value()[0]:y.value():y)})}),mn([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=Oe[n],e=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",r=/^(?:pop|shift)$/.test(n);a.prototype[n]=function(){var s=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(O(o)?o:[],s)}return this[e](function(f){return t.apply(O(f)?f:[],s)})}}),$n(N.prototype,function(n,t){var e=a[t];if(e){var r=e.name+\"\";F.call(Ut,r)||(Ut[r]=[]),Ut[r].push({name:t,func:e})}}),Ut[Xe(i,ct).name]=[{name:\"wrapper\",func:i}],N.prototype.clone=Gf,N.prototype.reverse=zf,N.prototype.value=Kf,a.prototype.at=Pl,a.prototype.chain=Al,a.prototype.commit=Cl,a.prototype.next=Il,a.prototype.plant=El,a.prototype.reverse=yl,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Sl,a.prototype.first=a.prototype.head,ne&&(a.prototype[ne]=xl),a},Ht=Cf();lt?((lt.exports=Ht)._=Ht,Tr._=Ht):k._=Ht}).call(ge)})(Ui,Ui.exports);var Gg=Object.defineProperty,zg=Object.defineProperties,Kg=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,Yg=Object.prototype.hasOwnProperty,Zg=Object.prototype.propertyIsEnumerable,ya=(A,u,i)=>u in A?Gg(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,cr=(A,u)=>{for(var i in u||(u={}))Yg.call(u,i)&&ya(A,i,u[i]);if(Ea)for(var i of Ea(u))Zg.call(u,i)&&ya(A,i,u[i]);return A},Jg=(A,u)=>zg(A,Kg(u));function ft(A,u,i){var d;const w=Dg(A);return((d=u.rpcMap)==null?void 0:d[w.reference])||`${Bg}?chainId=${w.namespace}:${w.reference}&projectId=${i}`}function Ct(A){return A.includes(\":\")?A.split(\":\")[1]:A}function Sa(A){return A.map(u=>`${u.split(\":\")[0]}:${u.split(\":\")[1]}`)}function Xg(A,u){const i=Object.keys(u.namespaces).filter(w=>w.includes(A));if(!i.length)return[];const d=[];return i.forEach(w=>{const L=u.namespaces[w].accounts;d.push(...L)}),d}function Oa(A={},u={}){const i=Ra(A),d=Ra(u);return Ui.exports.merge(i,d)}function Ra(A){var u,i,d,w;const L={};if(!Lg(A))return L;for(const[D,En]of Object.entries(A)){const zt=Pa(D)?[D]:En.chains,pr=En.methods||[],It=En.events||[],Ln=En.rpcMap||{},Fn=de(D);L[Fn]=Jg(cr(cr({},L[Fn]),En),{chains:$i(zt,(u=L[Fn])==null?void 0:u.chains),methods:$i(pr,(i=L[Fn])==null?void 0:i.methods),events:$i(It,(d=L[Fn])==null?void 0:d.events),rpcMap:cr(cr({},Ln),(w=L[Fn])==null?void 0:w.rpcMap)})}return L}function Qg(A){return A.includes(\":\")?A.split(\":\")[2]:A}function Vg(A){const u={};for(const[i,d]of Object.entries(A)){const w=d.methods||[],L=d.events||[],D=d.accounts||[],En=Pa(i)?[i]:d.chains?d.chains:Sa(d.accounts);u[i]={chains:En,methods:w,events:L,accounts:D}}return u}function Wi(A){return typeof A==\"number\"?A:A.includes(\"0x\")?parseInt(A,16):(A=A.includes(\":\")?A.split(\":\")[1]:A,isNaN(Number(A))?A:Number(A))}const ba={},z=A=>ba[A],Fi=(A,u)=>{ba[A]=u};class kg{constructor(u){this.name=\"polkadot\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class jg{constructor(u){this.name=\"eip155\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(u){switch(u.request.method){case\"eth_requestAccounts\":return this.getAccounts();case\"eth_accounts\":return this.getAccounts();case\"wallet_switchEthereumChain\":return await this.handleSwitchChain(u);case\"eth_chainId\":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(u.request.method)?await this.client.request(u):this.getHttpProvider().request(u.request)}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(parseInt(u),i),this.chainId=parseInt(u),this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}createHttpProvider(u,i){const d=i||ft(`${this.name}:${u}`,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new $g(d,z(\"disableProviderPing\")))}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=parseInt(Ct(i));u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}getHttpProvider(){const u=this.chainId,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}async handleSwitchChain(u){var i,d;let w=u.request.params?(i=u.request.params[0])==null?void 0:i.chainId:\"0x0\";w=w.startsWith(\"0x\")?w:`0x${w}`;const L=parseInt(w,16);if(this.isChainApproved(L))this.setDefaultChain(`${L}`);else if(this.namespace.methods.includes(\"wallet_switchEthereumChain\"))await this.client.request({topic:u.topic,request:{method:u.request.method,params:[{chainId:w}]},chainId:(d=this.namespace.chains)==null?void 0:d[0]}),this.setDefaultChain(`${L}`);else throw new Error(`Failed to switch to chain 'eip155:${L}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(u){return this.namespace.chains.includes(`${this.name}:${u}`)}}class nv{constructor(u){this.name=\"solana\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class tv{constructor(u){this.name=\"cosmos\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class ev{constructor(u){this.name=\"cip34\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{const d=this.getCardanoRPCUrl(i),w=Ct(i);u[w]=this.createHttpProvider(w,d)}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}getCardanoRPCUrl(u){const i=this.namespace.rpcMap;if(i)return i[u]}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||this.getCardanoRPCUrl(u);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class rv{constructor(u){this.name=\"elrond\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class iv{constructor(u){this.name=\"multiversx\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class sv{constructor(u){this.name=\"near\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){if(this.chainId=u,!this.httpProviders[u]){const d=i||ft(`${this.name}:${u}`,this.namespace);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);this.setHttpProvider(u,d)}this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;u[i]=this.createHttpProvider(i,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace);return typeof d>\"u\"?void 0:new ot(new At(d,z(\"disableProviderPing\")))}}var uv=Object.defineProperty,av=Object.defineProperties,ov=Object.getOwnPropertyDescriptors,Ta=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,La=(A,u,i)=>u in A?uv(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,hr=(A,u)=>{for(var i in u||(u={}))fv.call(u,i)&&La(A,i,u[i]);if(Ta)for(var i of Ta(u))cv.call(u,i)&&La(A,i,u[i]);return A},Mi=(A,u)=>av(A,ov(u));class lr{constructor(u){this.events=new Ug,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=u,this.logger=typeof u?.logger<\"u\"&&typeof u?.logger!=\"string\"?u.logger:Hg(Ng({level:u?.logger||Ia})),this.disableProviderPing=u?.disableProviderPing||!1}static async init(u){const i=new lr(u);return await i.initialize(),i}async request(u,i,d){const[w,L]=this.validateChain(i);if(!this.session)throw new Error(\"Please call connect() before request()\");return await this.getProvider(w).request({request:hr({},u),chainId:`${w}:${L}`,topic:this.session.topic,expiry:d})}sendAsync(u,i,d,w){const L=new Date().getTime();this.request(u,d,w).then(D=>i(null,Wg(L,D))).catch(D=>i(D,void 0))}async enable(){if(!this.client)throw new Error(\"Sign Client not initialized\");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var u;if(!this.session)throw new Error(\"Please call connect() before enable()\");await this.client.disconnect({topic:(u=this.session)==null?void 0:u.topic,reason:Aa(\"USER_DISCONNECTED\")}),await this.cleanup()}async connect(u){if(!this.client)throw new Error(\"Sign Client not initialized\");if(this.setNamespaces(u),await this.cleanupPendingPairings(),!u.skipPairing)return await this.pair(u.pairingTopic)}on(u,i){this.events.on(u,i)}once(u,i){this.events.once(u,i)}removeListener(u,i){this.events.removeListener(u,i)}off(u,i){this.events.off(u,i)}get isWalletConnect(){return!0}async pair(u){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error(\"Pairing aborted\");if(i>=this.maxPairingAttempts)throw new Error(\"Max auto pairing attempts reached\");const{uri:d,approval:w}=await this.client.connect({pairingTopic:u,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});d&&(this.uri=d,this.events.emit(\"display_uri\",d)),await w().then(L=>{this.session=L;const D=Vg(L.namespaces);this.namespaces=Oa(this.namespaces,D),this.persist(\"namespaces\",this.namespaces)}).catch(L=>{if(L.message!==Tg)throw L;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(u,i){try{if(!this.session)return;const[d,w]=this.validateChain(u);this.getProvider(d).setDefaultChain(w,i)}catch(d){if(!/Please call connect/.test(d.message))throw d}}async cleanupPendingPairings(u={}){this.logger.info(\"Cleaning up inactive pairings...\");const i=this.client.pairing.getAll();if(Ca(i)){for(const d of i)u.deletePairings?this.client.core.expirer.set(d.topic,0):await this.client.core.relayer.subscriber.unsubscribe(d.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore(\"namespaces\"),this.optionalNamespaces=await this.getFromStore(\"optionalNamespaces\")||{},this.client.session.length){const u=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[u]),this.createProviders()}}async initialize(){this.logger.trace(\"Initialized\"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await bg.init({logger:this.providerOpts.logger||Ia,relayUrl:this.providerOpts.relayUrl||Fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace(\"SignClient Initialized\")}createProviders(){if(!this.client)throw new Error(\"Sign Client not initialized\");if(!this.session)throw new Error(\"Session not initialized. Please call connect() before enable()\");const u=[...new Set(Object.keys(this.session.namespaces).map(i=>de(i)))];Fi(\"client\",this.client),Fi(\"events\",this.events),Fi(\"disableProviderPing\",this.disableProviderPing),u.forEach(i=>{if(!this.session)return;const d=Xg(i,this.session),w=Sa(d),L=Oa(this.namespaces,this.optionalNamespaces),D=Mi(hr({},L[i]),{accounts:d,chains:w});switch(i){case\"eip155\":this.rpcProviders[i]=new jg({namespace:D});break;case\"solana\":this.rpcProviders[i]=new nv({namespace:D});break;case\"cosmos\":this.rpcProviders[i]=new tv({namespace:D});break;case\"polkadot\":this.rpcProviders[i]=new kg({namespace:D});break;case\"cip34\":this.rpcProviders[i]=new ev({namespace:D});break;case\"elrond\":this.rpcProviders[i]=new rv({namespace:D});break;case\"multiversx\":this.rpcProviders[i]=new iv({namespace:D});break;case\"near\":this.rpcProviders[i]=new sv({namespace:D});break}})}registerEventListeners(){if(typeof this.client>\"u\")throw new Error(\"Sign Client is not initialized\");this.client.on(\"session_ping\",u=>{this.events.emit(\"session_ping\",u)}),this.client.on(\"session_event\",u=>{const{params:i}=u,{event:d}=i;if(d.name===\"accountsChanged\"){const w=d.data;w&&Ca(w)&&this.events.emit(\"accountsChanged\",w.map(Qg))}else if(d.name===\"chainChanged\"){const w=i.chainId,L=i.event.data,D=de(w),En=Wi(w)!==Wi(L)?`${D}:${Wi(L)}`:w;this.onChainChanged(En)}else this.events.emit(d.name,d.data);this.events.emit(\"session_event\",u)}),this.client.on(\"session_update\",({topic:u,params:i})=>{var d;const{namespaces:w}=i,L=(d=this.client)==null?void 0:d.session.get(u);this.session=Mi(hr({},L),{namespaces:w}),this.onSessionUpdate(),this.events.emit(\"session_update\",{topic:u,params:i})}),this.client.on(\"session_delete\",async u=>{await this.cleanup(),this.events.emit(\"session_delete\",u),this.events.emit(\"disconnect\",Mi(hr({},Aa(\"USER_DISCONNECTED\")),{data:u.topic}))}),this.on(Vn.DEFAULT_CHAIN_CHANGED,u=>{this.onChainChanged(u,!0)})}getProvider(u){if(!this.rpcProviders[u])throw new Error(`Provider not found: ${u}`);return this.rpcProviders[u]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(u=>{var i;this.getProvider(u).updateNamespace((i=this.session)==null?void 0:i.namespaces[u])})}setNamespaces(u){const{namespaces:i,optionalNamespaces:d,sessionProperties:w}=u;i&&Object.keys(i).length&&(this.namespaces=i),d&&Object.keys(d).length&&(this.optionalNamespaces=d),this.sessionProperties=w,this.persist(\"namespaces\",i),this.persist(\"optionalNamespaces\",d)}validateChain(u){const[i,d]=u?.split(\":\")||[\"\",\"\"];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,d];if(i&&!Object.keys(this.namespaces||{}).map(D=>de(D)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&d)return[i,d];const w=de(Object.keys(this.namespaces)[0]),L=this.rpcProviders[w].getDefaultChain();return[w,L]}async requestAccounts(){const[u]=this.validateChain();return await this.getProvider(u).requestAccounts()}onChainChanged(u,i=!1){if(!this.namespaces)return;const[d,w]=this.validateChain(u);w&&(i||this.getProvider(d).setDefaultChain(w),this.namespaces[d]?this.namespaces[d].defaultChain=w:this.namespaces[`${d}:${w}`]?this.namespaces[`${d}:${w}`].defaultChain=w:this.namespaces[`${d}:${w}`]={defaultChain:w},this.persist(\"namespaces\",this.namespaces),this.events.emit(\"chainChanged\",w))}onConnect(){this.createProviders(),this.events.emit(\"connect\",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist(\"namespaces\",void 0),this.persist(\"optionalNamespaces\",void 0),this.persist(\"sessionProperties\",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(u,i){this.client.core.storage.setItem(`${xa}/${u}`,i)}async getFromStore(u){return await this.client.core.storage.getItem(`${xa}/${u}`)}}const hv=lr;export{hv as UniversalProvider,lr as default};\n//# sourceMappingURL=index.es.js.map\n","import{EventEmitter as b}from\"events\";import{getAccountsFromNamespaces as A,getSdkError as R,isValidArray as w}from\"@walletconnect/utils\";import{UniversalProvider as T}from\"@walletconnect/universal-provider\";const P=\"wc\",S=\"ethereum_provider\",$=`${P}@2:${S}:`,j=\"https://rpc.walletconnect.com/v1/\",u=[\"eth_sendTransaction\",\"personal_sign\"],E=[\"eth_accounts\",\"eth_requestAccounts\",\"eth_sendRawTransaction\",\"eth_sign\",\"eth_signTransaction\",\"eth_signTypedData\",\"eth_signTypedData_v3\",\"eth_signTypedData_v4\",\"eth_sendTransaction\",\"personal_sign\",\"wallet_switchEthereumChain\",\"wallet_addEthereumChain\",\"wallet_getPermissions\",\"wallet_requestPermissions\",\"wallet_registerOnboarding\",\"wallet_watchAsset\",\"wallet_scanQRCode\"],m=[\"chainChanged\",\"accountsChanged\"],_=[\"chainChanged\",\"accountsChanged\",\"message\",\"disconnect\",\"connect\"];var N=Object.defineProperty,q=Object.defineProperties,D=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,O=(a,t,s)=>t in a?N(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,p=(a,t)=>{for(var s in t||(t={}))U.call(t,s)&&O(a,s,t[s]);if(y)for(var s of y(t))Q.call(t,s)&&O(a,s,t[s]);return a},M=(a,t)=>q(a,D(t));function g(a){return Number(a[0].split(\":\")[1])}function f(a){return`0x${a.toString(16)}`}function L(a){const{chains:t,optionalChains:s,methods:i,optionalMethods:n,events:e,optionalEvents:h,rpcMap:c}=a;if(!w(t))throw new Error(\"Invalid chains\");const o={chains:t,methods:i||u,events:e||m,rpcMap:p({},t.length?{[g(t)]:c[g(t)]}:{})},r=e?.filter(l=>!m.includes(l)),d=i?.filter(l=>!u.includes(l));if(!s&&!h&&!n&&!(r!=null&&r.length)&&!(d!=null&&d.length))return{required:t.length?o:void 0};const C=r?.length&&d?.length||!s,I={chains:[...new Set(C?o.chains.concat(s||[]):s)],methods:[...new Set(o.methods.concat(n!=null&&n.length?n:E))],events:[...new Set(o.events.concat(h!=null&&h.length?h:_))],rpcMap:c};return{required:t.length?o:void 0,optional:s.length?I:void 0}}class v{constructor(){this.events=new b,this.namespace=\"eip155\",this.accounts=[],this.chainId=1,this.STORAGE_KEY=$,this.on=(t,s)=>(this.events.on(t,s),this),this.once=(t,s)=>(this.events.once(t,s),this),this.removeListener=(t,s)=>(this.events.removeListener(t,s),this),this.off=(t,s)=>(this.events.off(t,s),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const s=new v;return await s.initialize(t),s}async request(t,s){return await this.signer.request(t,this.formatChainId(this.chainId),s)}sendAsync(t,s,i){this.signer.sendAsync(t,s,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:\"eth_requestAccounts\"})}async connect(t){if(!this.signer.client)throw new Error(\"Provider not initialized. Call init() first\");this.loadConnectOpts(t);const{required:s,optional:i}=L(this.rpc);try{const n=await new Promise(async(h,c)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(r=>{!r.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error(\"Connection request reset. Please try again.\")))})),await this.signer.connect(M(p({namespaces:p({},s&&{[this.namespace]:s})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:t?.pairingTopic})).then(r=>{h(r)}).catch(r=>{c(new Error(r.message))})});if(!n)return;const e=A(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit(\"connect\",{chainId:f(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on(\"session_event\",t=>{const{params:s}=t,{event:i}=s;i.name===\"accountsChanged\"?(this.accounts=this.parseAccounts(i.data),this.events.emit(\"accountsChanged\",this.accounts)):i.name===\"chainChanged\"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit(\"session_event\",t)}),this.signer.on(\"chainChanged\",t=>{const s=parseInt(t);this.chainId=s,this.events.emit(\"chainChanged\",f(this.chainId)),this.persist()}),this.signer.on(\"session_update\",t=>{this.events.emit(\"session_update\",t)}),this.signer.on(\"session_delete\",t=>{this.reset(),this.events.emit(\"session_delete\",t),this.events.emit(\"disconnect\",M(p({},R(\"USER_DISCONNECTED\")),{data:t.topic,name:\"USER_DISCONNECTED\"}))}),this.signer.on(\"display_uri\",t=>{var s,i;this.rpc.showQrModal&&((s=this.modal)==null||s.closeModal(),(i=this.modal)==null||i.openModal({uri:t})),this.events.emit(\"display_uri\",t)})}switchEthereumChain(t){this.request({method:\"wallet_switchEthereumChain\",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t==\"string\"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(\":\")[1])}setChainIds(t){const s=t.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));s.length&&(this.chainId=s[0],this.events.emit(\"chainChanged\",f(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const s=this.parseChainId(t);this.chainId=s,this.switchEthereumChain(s)}}parseAccountId(t){const[s,i,n]=t.split(\":\");return{chainId:`${s}:${i}`,address:n}}setAccounts(t){this.accounts=t.filter(s=>this.parseChainId(this.parseAccountId(s).chainId)===this.chainId).map(s=>this.parseAccountId(s).address),this.events.emit(\"accountsChanged\",this.accounts)}getRpcConfig(t){var s,i;const n=(s=t?.chains)!=null?s:[],e=(i=t?.optionalChains)!=null?i:[],h=n.concat(e);if(!h.length)throw new Error(\"No chains specified in either `chains` or `optionalChains`\");const c=n.length?t?.methods||u:[],o=n.length?t?.events||m:[],r=t?.optionalMethods||[],d=t?.optionalEvents||[],C=t?.rpcMap||this.buildRpcMap(h,t.projectId),I=t?.qrModalOptions||void 0;return{chains:n?.map(l=>this.formatChainId(l)),optionalChains:e.map(l=>this.formatChainId(l)),methods:c,events:o,optionalMethods:r,optionalEvents:d,rpcMap:C,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:I,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,s){const i={};return t.forEach(n=>{i[n]=this.getRpcUrl(n,s)}),i}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?g(this.rpc.chains):g(this.rpc.optionalChains),this.signer=await T.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let s;try{const{WalletConnectModal:i}=await import(\"@walletconnect/modal\");s=i}catch{throw new Error(\"To use QR modal, please install @walletconnect/modal package\")}if(s)try{this.modal=new s(p({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error(\"Could not generate WalletConnectModal Instance\")}}}loadConnectOpts(t){if(!t)return;const{chains:s,optionalChains:i,rpcMap:n}=t;s&&w(s)&&(this.rpc.chains=s.map(e=>this.formatChainId(e)),s.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})),i&&w(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i?.map(e=>this.formatChainId(e)),i.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))}getRpcUrl(t,s){var i;return((i=this.rpc.rpcMap)==null?void 0:i[t])||`${j}?chainId=eip155:${t}&projectId=${s||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),s=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:s?.accounts),this.setAccounts(s?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t==\"string\"||t instanceof String?[this.parseAccount(t)]:t.map(s=>this.parseAccount(s))}}const G=v;export{G as EthereumProvider,_ as OPTIONAL_EVENTS,E as OPTIONAL_METHODS,m as REQUIRED_EVENTS,u as REQUIRED_METHODS,v as default};\n//# sourceMappingURL=index.es.js.map\n","export const EthersConstantsUtil = {\n WALLET_ID: '@w3m/wallet_id',\n ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902,\n ERROR_CODE_DEFAULT: 5000\n};\n//# sourceMappingURL=EthersConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nimport { PresetsUtil } from './PresetsUtil.js';\nexport const EthersHelpersUtil = {\n getCaipDefaultChain(chain) {\n if (!chain) {\n return undefined;\n }\n return {\n id: `${ConstantsUtil.EIP155}:${chain.chainId}`,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId]\n };\n },\n hexStringToNumber(value) {\n const string = value.startsWith('0x') ? value.slice(2) : value;\n const number = parseInt(string, 16);\n return number;\n },\n numberToHexString(value) {\n return `0x${value.toString(16)}`;\n },\n async getUserInfo(provider) {\n const [address, chainId] = await Promise.all([\n EthersHelpersUtil.getAddress(provider),\n EthersHelpersUtil.getChainId(provider)\n ]);\n return { chainId, address };\n },\n async getChainId(provider) {\n const chainId = await provider.request({ method: 'eth_chainId' });\n return Number(chainId);\n },\n async getAddress(provider) {\n const [address] = await provider.request({ method: 'eth_accounts' });\n return address;\n },\n async addEthereumChain(provider, chain) {\n await provider.request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: EthersHelpersUtil.numberToHexString(chain.chainId),\n rpcUrls: [chain.rpcUrl],\n chainName: chain.name,\n nativeCurrency: {\n name: chain.currency,\n decimals: 18,\n symbol: chain.currency\n },\n blockExplorerUrls: [chain.explorerUrl],\n iconUrls: [PresetsUtil.EIP155NetworkImageIds[chain.chainId]]\n }\n ]\n });\n }\n};\n//# sourceMappingURL=EthersHelpersUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n provider: undefined,\n providerType: undefined,\n address: undefined,\n chainId: undefined,\n isConnected: false\n});\nexport const EthersStoreUtil = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setProvider(provider) {\n if (provider) {\n state.provider = ref(provider);\n }\n },\n setProviderType(providerType) {\n state.providerType = providerType;\n },\n setAddress(address) {\n state.address = address;\n },\n setPreferredAccountType(preferredAccountType) {\n state.preferredAccountType = preferredAccountType;\n },\n setChainId(chainId) {\n state.chainId = chainId;\n },\n setIsConnected(isConnected) {\n state.isConnected = isConnected;\n },\n setError(error) {\n state.error = error;\n },\n reset() {\n state.provider = undefined;\n state.address = undefined;\n state.chainId = undefined;\n state.providerType = undefined;\n state.isConnected = false;\n state.error = undefined;\n state.preferredAccountType = undefined;\n }\n};\n//# sourceMappingURL=EthersStoreUtil.js.map","import { Web3ModalScaffold } from '@web3modal/scaffold';\nimport { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils';\nimport EthereumProvider from '@walletconnect/ethereum-provider';\nimport { formatEther, JsonRpcProvider, InfuraProvider, getAddress as getOriginalAddress, parseUnits, formatUnits } from 'ethers';\nimport { EthersConstantsUtil, EthersHelpersUtil, EthersStoreUtil } from '@web3modal/scaffold-utils/ethers';\nimport { W3mFrameProvider, W3mFrameHelpers, W3mFrameRpcConstants, W3mFrameConstants } from '@web3modal/wallet';\nimport { BrowserProvider } from 'ethers';\nimport { JsonRpcSigner } from 'ethers';\nimport { NetworkUtil } from '@web3modal/common';\nexport class Web3Modal extends Web3ModalScaffold {\n constructor(options) {\n const { ethersConfig, siweConfig, chains, defaultChain, tokens, chainImages, _sdkVersion, ...w3mOptions } = options;\n if (!ethersConfig) {\n throw new Error('web3modal:constructor - ethersConfig is undefined');\n }\n if (!w3mOptions.projectId) {\n throw new Error('web3modal:constructor - projectId is undefined');\n }\n const networkControllerClient = {\n switchCaipNetwork: async (caipNetwork) => {\n const chainId = NetworkUtil.caipNetworkIdToNumber(caipNetwork?.id);\n if (chainId) {\n try {\n EthersStoreUtil.setError(undefined);\n await this.switchNetwork(chainId);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n throw new Error('networkControllerClient:switchCaipNetwork - unable to switch chain');\n }\n }\n },\n getApprovedCaipNetworksData: async () => new Promise(async (resolve) => {\n const walletChoice = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (walletChoice?.includes(ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID)) {\n const provider = await this.getWalletConnectProvider();\n if (!provider) {\n throw new Error('networkControllerClient:getApprovedCaipNetworks - connector is undefined');\n }\n const ns = provider.signer?.session?.namespaces;\n const nsMethods = ns?.[ConstantsUtil.EIP155]?.methods;\n const nsChains = ns?.[ConstantsUtil.EIP155]?.chains;\n const result = {\n supportsAllNetworks: nsMethods?.includes(ConstantsUtil.ADD_CHAIN_METHOD) ?? false,\n approvedCaipNetworkIds: nsChains\n };\n resolve(result);\n }\n else {\n const result = {\n approvedCaipNetworkIds: undefined,\n supportsAllNetworks: true\n };\n resolve(result);\n }\n })\n };\n const connectionControllerClient = {\n connectWalletConnect: async (onUri) => {\n const WalletConnectProvider = await this.getWalletConnectProvider();\n if (!WalletConnectProvider) {\n throw new Error('connectionControllerClient:getWalletConnectUri - provider is undefined');\n }\n WalletConnectProvider.on('display_uri', (uri) => {\n onUri(uri);\n });\n await WalletConnectProvider.connect();\n await this.setWalletConnectProvider();\n },\n connectExternal: async ({ id, info, provider }) => {\n if (id === ConstantsUtil.INJECTED_CONNECTOR_ID) {\n const InjectedProvider = ethersConfig.injected;\n if (!InjectedProvider) {\n throw new Error('connectionControllerClient:connectInjected - provider is undefined');\n }\n try {\n EthersStoreUtil.setError(undefined);\n await InjectedProvider.request({ method: 'eth_requestAccounts' });\n this.setInjectedProvider(ethersConfig);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.EIP6963_CONNECTOR_ID && info && provider) {\n try {\n EthersStoreUtil.setError(undefined);\n await provider.request({ method: 'eth_requestAccounts' });\n this.setEIP6963Provider(provider, info.name);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n const CoinbaseProvider = ethersConfig.coinbase;\n if (!CoinbaseProvider) {\n throw new Error('connectionControllerClient:connectCoinbase - connector is undefined');\n }\n try {\n EthersStoreUtil.setError(undefined);\n await CoinbaseProvider.request({ method: 'eth_requestAccounts' });\n this.setCoinbaseProvider(ethersConfig);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.EMAIL_CONNECTOR_ID) {\n this.setEmailProvider();\n }\n },\n checkInstalled(ids) {\n if (!ids) {\n return Boolean(window.ethereum);\n }\n if (ethersConfig.injected) {\n if (!window?.ethereum) {\n return false;\n }\n }\n return ids.some(id => Boolean(window.ethereum?.[String(id)]));\n },\n disconnect: async () => {\n const provider = EthersStoreUtil.state.provider;\n const providerType = EthersStoreUtil.state.providerType;\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n const WalletConnectProvider = provider;\n await WalletConnectProvider.disconnect();\n }\n else if (providerType !== ConstantsUtil.EMAIL_CONNECTOR_ID) {\n provider?.emit('disconnect');\n }\n else {\n await this.emailProvider?.disconnect();\n }\n },\n signMessage: async (message) => {\n const provider = EthersStoreUtil.state.provider;\n if (!provider) {\n throw new Error('connectionControllerClient:signMessage - provider is undefined');\n }\n const signature = await provider.request({\n method: 'personal_sign',\n params: [message, this.getAddress()]\n });\n return signature;\n },\n parseUnits: (value, decimals) => parseUnits(value, decimals),\n formatUnits: (value, decimals) => formatUnits(value, decimals),\n async estimateGas(data) {\n const chainId = EthersStoreUtil.state.chainId;\n const provider = EthersStoreUtil.state.provider;\n const address = EthersStoreUtil.state.address;\n if (!provider) {\n throw new Error('connectionControllerClient:sendTransaction - provider is undefined');\n }\n if (!address) {\n throw new Error('connectionControllerClient:sendTransaction - address is undefined');\n }\n const txParams = {\n from: data.address,\n to: data.to,\n data: data.data,\n type: 0\n };\n const browserProvider = new BrowserProvider(provider, chainId);\n const signer = new JsonRpcSigner(browserProvider, address);\n const gas = await signer.estimateGas(txParams);\n return gas;\n },\n sendTransaction: async (data) => {\n const chainId = EthersStoreUtil.state.chainId;\n const provider = EthersStoreUtil.state.provider;\n const address = EthersStoreUtil.state.address;\n if (!provider) {\n throw new Error('connectionControllerClient:sendTransaction - provider is undefined');\n }\n if (!address) {\n throw new Error('connectionControllerClient:sendTransaction - address is undefined');\n }\n const txParams = {\n to: data.to,\n value: data.value,\n gasLimit: data.gas,\n gasPrice: data.gasPrice,\n data: data.data,\n type: 0\n };\n const browserProvider = new BrowserProvider(provider, chainId);\n const signer = new JsonRpcSigner(browserProvider, address);\n const txResponse = await signer.sendTransaction(txParams);\n const txReceipt = await txResponse.wait();\n return txReceipt?.hash || null;\n }\n };\n super({\n networkControllerClient,\n connectionControllerClient,\n siweControllerClient: siweConfig,\n defaultChain: EthersHelpersUtil.getCaipDefaultChain(defaultChain),\n tokens: HelpersUtil.getCaipTokens(tokens),\n _sdkVersion: _sdkVersion ?? `html-ethers-${ConstantsUtil.VERSION}`,\n ...w3mOptions\n });\n this.hasSyncedConnectedAccount = false;\n this.EIP6963Providers = [];\n this.options = undefined;\n this.options = options;\n this.metadata = ethersConfig.metadata;\n this.projectId = w3mOptions.projectId;\n this.chains = chains;\n this.createProvider();\n EthersStoreUtil.subscribeKey('address', () => {\n this.syncAccount();\n });\n EthersStoreUtil.subscribeKey('chainId', () => {\n this.syncNetwork(chainImages);\n });\n this.syncRequestedNetworks(chains, chainImages);\n this.syncConnectors(ethersConfig);\n if (ethersConfig.EIP6963) {\n if (typeof window !== 'undefined') {\n this.listenConnectors(ethersConfig.EIP6963);\n this.checkActive6963Provider();\n }\n }\n if (ethersConfig.email) {\n this.syncEmailConnector(w3mOptions.projectId);\n }\n if (ethersConfig.injected) {\n this.checkActiveInjectedProvider(ethersConfig);\n }\n if (ethersConfig.coinbase) {\n this.checkActiveCoinbaseProvider(ethersConfig);\n }\n }\n getState() {\n const state = super.getState();\n return {\n ...state,\n selectedNetworkId: NetworkUtil.caipNetworkIdToNumber(state.selectedNetworkId)\n };\n }\n subscribeState(callback) {\n return super.subscribeState(state => callback({\n ...state,\n selectedNetworkId: NetworkUtil.caipNetworkIdToNumber(state.selectedNetworkId)\n }));\n }\n setAddress(address) {\n const originalAddress = address ? getOriginalAddress(address) : undefined;\n EthersStoreUtil.setAddress(originalAddress);\n }\n getAddress() {\n const { address } = EthersStoreUtil.state;\n return address ? getOriginalAddress(address) : undefined;\n }\n getError() {\n return EthersStoreUtil.state.error;\n }\n getChainId() {\n return EthersStoreUtil.state.chainId;\n }\n getIsConnected() {\n return EthersStoreUtil.state.isConnected;\n }\n getWalletProvider() {\n return EthersStoreUtil.state.provider;\n }\n getWalletProviderType() {\n return EthersStoreUtil.state.providerType;\n }\n subscribeProvider(callback) {\n return EthersStoreUtil.subscribe(callback);\n }\n async disconnect() {\n const { provider, providerType } = EthersStoreUtil.state;\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n if (providerType === 'injected' || providerType === 'eip6963') {\n provider?.emit('disconnect');\n }\n else {\n const walletConnectProvider = provider;\n if (walletConnectProvider) {\n try {\n EthersStoreUtil.setError(undefined);\n await walletConnectProvider.disconnect();\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n }\n }\n createProvider() {\n if (!this.walletConnectProviderInitPromise && typeof window !== 'undefined') {\n this.walletConnectProviderInitPromise = this.initWalletConnectProvider();\n }\n return this.walletConnectProviderInitPromise;\n }\n async initWalletConnectProvider() {\n const walletConnectProviderOptions = {\n projectId: this.projectId,\n showQrModal: false,\n rpcMap: this.chains\n ? this.chains.reduce((map, chain) => {\n map[chain.chainId] = chain.rpcUrl;\n return map;\n }, {})\n : {},\n optionalChains: [...this.chains.map(chain => chain.chainId)],\n metadata: {\n name: this.metadata ? this.metadata.name : '',\n description: this.metadata ? this.metadata.description : '',\n url: this.metadata ? this.metadata.url : '',\n icons: this.metadata ? this.metadata.icons : ['']\n }\n };\n this.walletConnectProvider = await EthereumProvider.init(walletConnectProviderOptions);\n await this.checkActiveWalletConnectProvider();\n }\n async getWalletConnectProvider() {\n if (!this.walletConnectProvider) {\n try {\n EthersStoreUtil.setError(undefined);\n await this.createProvider();\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n return this.walletConnectProvider;\n }\n syncRequestedNetworks(chains, chainImages) {\n const requestedCaipNetworks = chains?.map(chain => ({\n id: `${ConstantsUtil.EIP155}:${chain.chainId}`,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId],\n imageUrl: chainImages?.[chain.chainId]\n }));\n this.setRequestedCaipNetworks(requestedCaipNetworks ?? []);\n }\n async checkActiveWalletConnectProvider() {\n const WalletConnectProvider = await this.getWalletConnectProvider();\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (WalletConnectProvider) {\n if (walletId === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n await this.setWalletConnectProvider();\n }\n }\n }\n checkActiveInjectedProvider(config) {\n const InjectedProvider = config.injected;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (InjectedProvider) {\n if (walletId === ConstantsUtil.INJECTED_CONNECTOR_ID) {\n this.setInjectedProvider(config);\n this.watchInjected(config);\n }\n }\n }\n checkActiveCoinbaseProvider(config) {\n const CoinbaseProvider = config.coinbase;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (CoinbaseProvider) {\n if (walletId === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n if (CoinbaseProvider._addresses && CoinbaseProvider._addresses?.length > 0) {\n this.setCoinbaseProvider(config);\n this.watchCoinbase(config);\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n }\n }\n checkActive6963Provider() {\n const currentActiveWallet = window?.localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (currentActiveWallet) {\n const currentProvider = this.EIP6963Providers.find(provider => provider.info.name === currentActiveWallet);\n if (currentProvider) {\n this.setEIP6963Provider(currentProvider.provider, currentProvider.info.name);\n }\n }\n }\n async setWalletConnectProvider() {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID);\n const WalletConnectProvider = await this.getWalletConnectProvider();\n if (WalletConnectProvider) {\n EthersStoreUtil.setChainId(WalletConnectProvider.chainId);\n EthersStoreUtil.setProviderType('walletConnect');\n EthersStoreUtil.setProvider(WalletConnectProvider);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(WalletConnectProvider.accounts?.[0]);\n this.watchWalletConnect();\n }\n }\n async setInjectedProvider(config) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.INJECTED_CONNECTOR_ID);\n const InjectedProvider = config.injected;\n if (InjectedProvider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(InjectedProvider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('injected');\n EthersStoreUtil.setProvider(config.injected);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchCoinbase(config);\n }\n }\n }\n async setEIP6963Provider(provider, name) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, name);\n if (provider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(provider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('eip6963');\n EthersStoreUtil.setProvider(provider);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchEIP6963(provider);\n }\n }\n }\n async setCoinbaseProvider(config) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.COINBASE_CONNECTOR_ID);\n const CoinbaseProvider = config.coinbase;\n if (CoinbaseProvider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(CoinbaseProvider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('coinbaseWallet');\n EthersStoreUtil.setProvider(config.coinbase);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchCoinbase(config);\n }\n }\n }\n async setEmailProvider() {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.EMAIL_CONNECTOR_ID);\n if (this.emailProvider) {\n const { address, chainId, smartAccountDeployed, preferredAccountType } = await this.emailProvider.connect({ chainId: this.getChainId() });\n const { smartAccountEnabledNetworks } = await this.emailProvider.getSmartAccountEnabledNetworks();\n this.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType(ConstantsUtil.EMAIL_CONNECTOR_ID);\n EthersStoreUtil.setProvider(this.emailProvider);\n EthersStoreUtil.setIsConnected(true);\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n this.setSmartAccountDeployed(Boolean(smartAccountDeployed));\n this.watchEmail();\n this.watchModal();\n }\n super.setLoading(false);\n }\n }\n async watchWalletConnect() {\n const provider = await this.getWalletConnectProvider();\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = EthersHelpersUtil.hexStringToNumber(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n const accountsChangedHandler = async (accounts) => {\n if (accounts.length > 0) {\n await this.setWalletConnectProvider();\n }\n };\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchInjected(config) {\n const provider = config.injected;\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = typeof chainId === 'string'\n ? EthersHelpersUtil.hexStringToNumber(chainId)\n : Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchEIP6963(provider) {\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider.removeListener('disconnect', disconnectHandler);\n provider.removeListener('accountsChanged', accountsChangedHandler);\n provider.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = typeof chainId === 'string'\n ? EthersHelpersUtil.hexStringToNumber(chainId)\n : Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchCoinbase(config) {\n const provider = config.coinbase;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId && walletId === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n const chain = Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchEmail() {\n if (this.emailProvider) {\n this.emailProvider.onRpcRequest(request => {\n if (W3mFrameHelpers.checkIfRequestExists(request)) {\n if (!W3mFrameHelpers.checkIfRequestIsAllowed(request)) {\n if (super.isOpen()) {\n if (!super.isTransactionStackEmpty()) {\n super.redirect('ApproveTransaction');\n }\n }\n else {\n super.open({ view: 'ApproveTransaction' });\n }\n }\n }\n else {\n super.open();\n const method = W3mFrameHelpers.getRequestMethod(request);\n console.error(W3mFrameRpcConstants.RPC_METHOD_NOT_ALLOWED_MESSAGE, { method });\n setTimeout(() => {\n this.showErrorMessage(W3mFrameRpcConstants.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE);\n }, 300);\n }\n });\n this.emailProvider.onRpcResponse(response => {\n const responseType = W3mFrameHelpers.getResponseType(response);\n switch (responseType) {\n case W3mFrameConstants.RPC_RESPONSE_TYPE_ERROR: {\n const isModalOpen = super.isOpen();\n if (isModalOpen) {\n if (super.isTransactionStackEmpty()) {\n super.close();\n }\n else {\n super.popTransactionStack(true);\n }\n }\n break;\n }\n case W3mFrameConstants.RPC_RESPONSE_TYPE_TX: {\n if (super.isTransactionStackEmpty()) {\n super.close();\n }\n else {\n super.popTransactionStack();\n }\n break;\n }\n default:\n break;\n }\n });\n this.emailProvider.onNotConnected(() => {\n this.setIsConnected(false);\n super.setLoading(false);\n });\n this.emailProvider.onIsConnected(({ preferredAccountType }) => {\n this.setIsConnected(true);\n super.setLoading(false);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n });\n this.emailProvider.onSetPreferredAccount(({ address, type }) => {\n if (!address) {\n return;\n }\n const chainId = NetworkUtil.caipNetworkIdToNumber(this.getCaipNetwork()?.id);\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setIsConnected(true);\n EthersStoreUtil.setPreferredAccountType(type);\n this.syncAccount();\n });\n }\n }\n watchModal() {\n if (this.emailProvider) {\n this.subscribeState(val => {\n if (!val.open) {\n this.emailProvider?.rejectRpcRequest();\n }\n });\n }\n }\n async syncAccount() {\n const address = EthersStoreUtil.state.address;\n const chainId = EthersStoreUtil.state.chainId;\n const isConnected = EthersStoreUtil.state.isConnected;\n const preferredAccountType = EthersStoreUtil.state.preferredAccountType;\n this.resetAccount();\n if (isConnected && address && chainId) {\n const caipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}`;\n this.setIsConnected(isConnected);\n this.setPreferredAccountType(preferredAccountType);\n this.setCaipAddress(caipAddress);\n this.syncConnectedWalletInfo();\n await Promise.all([\n this.syncProfile(address),\n this.syncBalance(address),\n this.getApprovedCaipNetworksData()\n ]);\n this.hasSyncedConnectedAccount = true;\n }\n else if (!isConnected && this.hasSyncedConnectedAccount) {\n this.resetWcConnection();\n this.resetNetwork();\n }\n }\n async syncNetwork(chainImages) {\n const address = EthersStoreUtil.state.address;\n const chainId = EthersStoreUtil.state.chainId;\n const isConnected = EthersStoreUtil.state.isConnected;\n if (this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (chain) {\n const caipChainId = `${ConstantsUtil.EIP155}:${chain.chainId}`;\n this.setCaipNetwork({\n id: caipChainId,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId],\n imageUrl: chainImages?.[chain.chainId]\n });\n if (isConnected && address) {\n const caipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}`;\n this.setCaipAddress(caipAddress);\n if (chain.explorerUrl) {\n const url = `${chain.explorerUrl}/address/${address}`;\n this.setAddressExplorerUrl(url);\n }\n else {\n this.setAddressExplorerUrl(undefined);\n }\n if (this.hasSyncedConnectedAccount) {\n await this.syncProfile(address);\n await this.syncBalance(address);\n }\n }\n }\n else if (isConnected) {\n this.setCaipNetwork({\n id: `${ConstantsUtil.EIP155}:${chainId}`\n });\n }\n }\n }\n async syncProfile(address) {\n const chainId = EthersStoreUtil.state.chainId;\n try {\n const { name, avatar } = await this.fetchIdentity({\n address\n });\n this.setProfileName(name);\n this.setProfileImage(avatar);\n }\n catch {\n if (chainId === 1) {\n const ensProvider = new InfuraProvider('mainnet');\n const name = await ensProvider.lookupAddress(address);\n const avatar = await ensProvider.getAvatar(address);\n if (name) {\n this.setProfileName(name);\n }\n if (avatar) {\n this.setProfileImage(avatar);\n }\n }\n else {\n this.setProfileName(null);\n this.setProfileImage(null);\n }\n }\n }\n async syncBalance(address) {\n const chainId = EthersStoreUtil.state.chainId;\n if (chainId && this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (chain) {\n const jsonRpcProvider = new JsonRpcProvider(chain.rpcUrl, {\n chainId,\n name: chain.name\n });\n if (jsonRpcProvider) {\n const balance = await jsonRpcProvider.getBalance(address);\n const formattedBalance = formatEther(balance);\n this.setBalance(formattedBalance, chain.currency);\n }\n }\n }\n }\n syncConnectedWalletInfo() {\n const currentActiveWallet = window?.localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n const providerType = EthersStoreUtil.state.providerType;\n if (providerType === ConstantsUtil.EIP6963_CONNECTOR_ID) {\n if (currentActiveWallet) {\n const currentProvider = this.EIP6963Providers.find(provider => provider.info.name === currentActiveWallet);\n if (currentProvider) {\n this.setConnectedWalletInfo({\n ...currentProvider.info\n });\n }\n }\n }\n else if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n const provider = EthersStoreUtil.state.provider;\n if (provider.session) {\n this.setConnectedWalletInfo({\n ...provider.session.peer.metadata,\n name: provider.session.peer.metadata.name,\n icon: provider.session.peer.metadata.icons?.[0]\n });\n }\n }\n else if (currentActiveWallet) {\n this.setConnectedWalletInfo({\n name: currentActiveWallet\n });\n }\n }\n async switchNetwork(chainId) {\n const provider = EthersStoreUtil.state.provider;\n const providerType = EthersStoreUtil.state.providerType;\n if (this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID && chain) {\n const WalletConnectProvider = provider;\n if (WalletConnectProvider) {\n try {\n await WalletConnectProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(WalletConnectProvider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.INJECTED_CONNECTOR_ID && chain) {\n const InjectedProvider = provider;\n if (InjectedProvider) {\n try {\n await InjectedProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(InjectedProvider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.EIP6963_CONNECTOR_ID && chain) {\n const EIP6963Provider = provider;\n if (EIP6963Provider) {\n try {\n await EIP6963Provider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(EIP6963Provider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.COINBASE_CONNECTOR_ID && chain) {\n const CoinbaseProvider = provider;\n if (CoinbaseProvider) {\n try {\n await CoinbaseProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(CoinbaseProvider, chain);\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.EMAIL_CONNECTOR_ID) {\n if (this.emailProvider && chain?.chainId) {\n try {\n await this.emailProvider.switchNetwork(chain?.chainId);\n EthersStoreUtil.setChainId(chain.chainId);\n const { address, preferredAccountType } = await this.emailProvider.connect({\n chainId: chain?.chainId\n });\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n await this.syncAccount();\n }\n catch {\n throw new Error('Switching chain failed');\n }\n }\n }\n }\n }\n syncConnectors(config) {\n const w3mConnectors = [];\n const connectorType = PresetsUtil.ConnectorTypesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID];\n if (connectorType) {\n w3mConnectors.push({\n id: ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n type: connectorType\n });\n }\n if (config.injected) {\n const injectedConnectorType = PresetsUtil.ConnectorTypesMap[ConstantsUtil.INJECTED_CONNECTOR_ID];\n if (injectedConnectorType) {\n w3mConnectors.push({\n id: ConstantsUtil.INJECTED_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.INJECTED_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.INJECTED_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.INJECTED_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.INJECTED_CONNECTOR_ID],\n type: injectedConnectorType\n });\n }\n }\n if (config.coinbase) {\n w3mConnectors.push({\n id: ConstantsUtil.COINBASE_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.COINBASE_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.COINBASE_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.COINBASE_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.COINBASE_CONNECTOR_ID],\n type: 'EXTERNAL'\n });\n }\n this.setConnectors(w3mConnectors);\n }\n async syncEmailConnector(projectId) {\n if (typeof window !== 'undefined') {\n this.emailProvider = new W3mFrameProvider(projectId);\n this.addConnector({\n id: ConstantsUtil.EMAIL_CONNECTOR_ID,\n type: 'EMAIL',\n name: 'Email',\n provider: this.emailProvider\n });\n super.setLoading(true);\n const isLoginEmailUsed = this.emailProvider.getLoginEmailUsed();\n super.setLoading(isLoginEmailUsed);\n const { isConnected } = await this.emailProvider.isConnected();\n if (isConnected) {\n await this.setEmailProvider();\n }\n else {\n super.setLoading(false);\n }\n }\n }\n eip6963EventHandler(event) {\n if (event.detail) {\n const { info, provider } = event.detail;\n const connectors = this.getConnectors();\n const existingConnector = connectors.find(c => c.name === info.name);\n if (!existingConnector) {\n const type = PresetsUtil.ConnectorTypesMap[ConstantsUtil.EIP6963_CONNECTOR_ID];\n if (type) {\n this.addConnector({\n id: ConstantsUtil.EIP6963_CONNECTOR_ID,\n type,\n imageUrl: info.icon ?? this.options?.connectorImages?.[ConstantsUtil.EIP6963_CONNECTOR_ID],\n name: info.name,\n provider,\n info\n });\n const eip6963ProviderObj = {\n provider,\n info\n };\n this.EIP6963Providers.push(eip6963ProviderObj);\n }\n }\n }\n }\n listenConnectors(enableEIP6963) {\n if (typeof window !== 'undefined' && enableEIP6963) {\n const handler = this.eip6963EventHandler.bind(this);\n window.addEventListener(ConstantsUtil.EIP6963_ANNOUNCE_EVENT, handler);\n window.dispatchEvent(new Event(ConstantsUtil.EIP6963_REQUEST_EVENT));\n }\n }\n}\n//# sourceMappingURL=client.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.walletLogo = void 0;\nconst walletLogo = (type, width) => {\n let height;\n switch (type) {\n case 'standard':\n height = width;\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;\n case 'circle':\n height = width;\n return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${width}' height='${height}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;\n case 'text':\n height = (0.1 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;\n case 'textWithLogo':\n height = (0.25 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;\n case 'textLight':\n height = (0.1 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;\n case 'textWithLogoLight':\n height = (0.25 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;\n default:\n height = width;\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;\n }\n};\nexports.walletLogo = walletLogo;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LINK_API_URL = void 0;\nexports.LINK_API_URL = 'https://www.walletlink.org';\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorValues = exports.standardErrorCodes = void 0;\nexports.standardErrorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n unsupportedChain: 4902,\n },\n};\nexports.errorValues = {\n '-32700': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n },\n '-32600': {\n standard: 'JSON RPC 2.0',\n message: 'The JSON sent is not a valid Request object.',\n },\n '-32601': {\n standard: 'JSON RPC 2.0',\n message: 'The method does not exist / is not available.',\n },\n '-32602': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid method parameter(s).',\n },\n '-32603': {\n standard: 'JSON RPC 2.0',\n message: 'Internal JSON-RPC error.',\n },\n '-32000': {\n standard: 'EIP-1474',\n message: 'Invalid input.',\n },\n '-32001': {\n standard: 'EIP-1474',\n message: 'Resource not found.',\n },\n '-32002': {\n standard: 'EIP-1474',\n message: 'Resource unavailable.',\n },\n '-32003': {\n standard: 'EIP-1474',\n message: 'Transaction rejected.',\n },\n '-32004': {\n standard: 'EIP-1474',\n message: 'Method not supported.',\n },\n '-32005': {\n standard: 'EIP-1474',\n message: 'Request limit exceeded.',\n },\n '4001': {\n standard: 'EIP-1193',\n message: 'User rejected the request.',\n },\n '4100': {\n standard: 'EIP-1193',\n message: 'The requested account and/or method has not been authorized by the user.',\n },\n '4200': {\n standard: 'EIP-1193',\n message: 'The requested method is not supported by this Ethereum provider.',\n },\n '4900': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from all chains.',\n },\n '4901': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from the specified chain.',\n },\n '4902': {\n standard: 'EIP-3085',\n message: 'Unrecognized chain ID.',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serialize = exports.getErrorCode = exports.isValidCode = exports.getMessageFromCode = exports.JSON_RPC_SERVER_ERROR_MESSAGE = void 0;\nconst constants_1 = require(\"./constants\");\nconst FALLBACK_MESSAGE = 'Unspecified error message.';\nexports.JSON_RPC_SERVER_ERROR_MESSAGE = 'Unspecified server error.';\n/**\n * Gets the message for a given code, or a fallback message if the code has\n * no corresponding message.\n */\nfunction getMessageFromCode(code, fallbackMessage = FALLBACK_MESSAGE) {\n if (code && Number.isInteger(code)) {\n const codeString = code.toString();\n if (hasKey(constants_1.errorValues, codeString)) {\n return constants_1.errorValues[codeString].message;\n }\n if (isJsonRpcServerError(code)) {\n return exports.JSON_RPC_SERVER_ERROR_MESSAGE;\n }\n }\n return fallbackMessage;\n}\nexports.getMessageFromCode = getMessageFromCode;\n/**\n * Returns whether the given code is valid.\n * A code is only valid if it has a message.\n */\nfunction isValidCode(code) {\n if (!Number.isInteger(code)) {\n return false;\n }\n const codeString = code.toString();\n if (constants_1.errorValues[codeString]) {\n return true;\n }\n if (isJsonRpcServerError(code)) {\n return true;\n }\n return false;\n}\nexports.isValidCode = isValidCode;\n/**\n * Returns the error code from an error object.\n */\nfunction getErrorCode(error) {\n var _a;\n if (typeof error === 'number') {\n return error;\n }\n else if (isErrorWithCode(error)) {\n return (_a = error.code) !== null && _a !== void 0 ? _a : error.errorCode;\n }\n return undefined;\n}\nexports.getErrorCode = getErrorCode;\nfunction isErrorWithCode(error) {\n return (typeof error === 'object' &&\n error !== null &&\n (typeof error.code === 'number' ||\n typeof error.errorCode === 'number'));\n}\nfunction serialize(error, { shouldIncludeStack = false } = {}) {\n const serialized = {};\n if (error &&\n typeof error === 'object' &&\n !Array.isArray(error) &&\n hasKey(error, 'code') &&\n isValidCode(error.code)) {\n const _error = error;\n serialized.code = _error.code;\n if (_error.message && typeof _error.message === 'string') {\n serialized.message = _error.message;\n if (hasKey(_error, 'data')) {\n serialized.data = _error.data;\n }\n }\n else {\n serialized.message = getMessageFromCode(serialized.code);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n }\n else {\n serialized.code = constants_1.standardErrorCodes.rpc.internal;\n serialized.message = hasStringProperty(error, 'message') ? error.message : FALLBACK_MESSAGE;\n serialized.data = { originalError: assignOriginalError(error) };\n }\n if (shouldIncludeStack) {\n serialized.stack = hasStringProperty(error, 'stack') ? error.stack : undefined;\n }\n return serialized;\n}\nexports.serialize = serialize;\n// Internal\nfunction isJsonRpcServerError(code) {\n return code >= -32099 && code <= -32000;\n}\nfunction assignOriginalError(error) {\n if (error && typeof error === 'object' && !Array.isArray(error)) {\n return Object.assign({}, error);\n }\n return error;\n}\nfunction hasKey(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nfunction hasStringProperty(obj, prop) {\n return (typeof obj === 'object' && obj !== null && prop in obj && typeof obj[prop] === 'string');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.standardErrors = void 0;\nconst constants_1 = require(\"./constants\");\nconst utils_1 = require(\"./utils\");\nexports.standardErrors = {\n rpc: {\n parse: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.parse, arg),\n invalidRequest: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidRequest, arg),\n invalidParams: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidParams, arg),\n methodNotFound: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.methodNotFound, arg),\n internal: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.internal, arg),\n server: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum RPC Server errors must provide single object argument.');\n }\n const { code } = opts;\n if (!Number.isInteger(code) || code > -32005 || code < -32099) {\n throw new Error('\"code\" must be an integer such that: -32099 <= code <= -32005');\n }\n return getEthJsonRpcError(code, opts);\n },\n invalidInput: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidInput, arg),\n resourceNotFound: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.resourceNotFound, arg),\n resourceUnavailable: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.resourceUnavailable, arg),\n transactionRejected: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.transactionRejected, arg),\n methodNotSupported: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.methodNotSupported, arg),\n limitExceeded: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.limitExceeded, arg),\n },\n provider: {\n userRejectedRequest: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.userRejectedRequest, arg);\n },\n unauthorized: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unauthorized, arg);\n },\n unsupportedMethod: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unsupportedMethod, arg);\n },\n disconnected: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.disconnected, arg);\n },\n chainDisconnected: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.chainDisconnected, arg);\n },\n unsupportedChain: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unsupportedChain, arg);\n },\n custom: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum Provider custom errors must provide single object argument.');\n }\n const { code, message, data } = opts;\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string');\n }\n return new EthereumProviderError(code, message, data);\n },\n },\n};\n// Internal\nfunction getEthJsonRpcError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new EthereumRpcError(code, message || (0, utils_1.getMessageFromCode)(code), data);\n}\nfunction getEthProviderError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new EthereumProviderError(code, message || (0, utils_1.getMessageFromCode)(code), data);\n}\nfunction parseOpts(arg) {\n if (arg) {\n if (typeof arg === 'string') {\n return [arg];\n }\n else if (typeof arg === 'object' && !Array.isArray(arg)) {\n const { message, data } = arg;\n if (message && typeof message !== 'string') {\n throw new Error('Must specify string message.');\n }\n return [message || undefined, data];\n }\n }\n return [];\n}\nclass EthereumRpcError extends Error {\n constructor(code, message, data) {\n if (!Number.isInteger(code)) {\n throw new Error('\"code\" must be an integer.');\n }\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string.');\n }\n super(message);\n this.code = code;\n if (data !== undefined) {\n this.data = data;\n }\n }\n}\nclass EthereumProviderError extends EthereumRpcError {\n /**\n * Create an Ethereum Provider JSON-RPC error.\n * `code` must be an integer in the 1000 <= 4999 range.\n */\n constructor(code, message, data) {\n if (!isValidEthProviderCode(code)) {\n throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');\n }\n super(code, message, data);\n }\n}\nfunction isValidEthProviderCode(code) {\n return Number.isInteger(code) && code >= 1000 && code <= 4999;\n}\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isErrorResponse = void 0;\n// TODO: revisit if this is still needed\nfunction isErrorResponse(response) {\n return response.errorMessage !== undefined;\n}\nexports.isErrorResponse = isErrorResponse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LIB_VERSION = void 0;\nexports.LIB_VERSION = '3.9.1';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeError = void 0;\n// TODO: error should not depend on walletlink. revisit this.\nconst Web3Response_1 = require(\"../../relay/walletlink/type/Web3Response\");\nconst version_1 = require(\"../../version\");\nconst constants_1 = require(\"./constants\");\nconst utils_1 = require(\"./utils\");\n/**\n * Serializes an error to a format that is compatible with the Ethereum JSON RPC error format.\n * See https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\n * for more information.\n */\nfunction serializeError(error, requestOrMethod) {\n const serialized = (0, utils_1.serialize)(getErrorObject(error), {\n shouldIncludeStack: true,\n });\n const docUrl = new URL('https://docs.cloud.coinbase.com/wallet-sdk/docs/errors');\n docUrl.searchParams.set('version', version_1.LIB_VERSION);\n docUrl.searchParams.set('code', serialized.code.toString());\n const method = getMethod(serialized.data, requestOrMethod);\n if (method) {\n docUrl.searchParams.set('method', method);\n }\n docUrl.searchParams.set('message', serialized.message);\n return Object.assign(Object.assign({}, serialized), { docUrl: docUrl.href });\n}\nexports.serializeError = serializeError;\n/**\n * Converts an error to a serializable object.\n */\nfunction getErrorObject(error) {\n if (typeof error === 'string') {\n return {\n message: error,\n code: constants_1.standardErrorCodes.rpc.internal,\n };\n }\n else if ((0, Web3Response_1.isErrorResponse)(error)) {\n return Object.assign(Object.assign({}, error), { message: error.errorMessage, code: error.errorCode, data: { method: error.method } });\n }\n return error;\n}\n/**\n * Gets the method name from the serialized data or the request.\n */\nfunction getMethod(serializedData, request) {\n const methodInData = serializedData === null || serializedData === void 0 ? void 0 : serializedData.method;\n if (methodInData) {\n return methodInData;\n }\n if (request === undefined) {\n return undefined;\n }\n else if (typeof request === 'string') {\n return request;\n }\n else if (!Array.isArray(request)) {\n return request.method;\n }\n else if (request.length > 0) {\n return request[0].method;\n }\n return undefined;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.standardErrors = exports.standardErrorCodes = exports.serializeError = exports.getMessageFromCode = exports.getErrorCode = void 0;\nconst constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"standardErrorCodes\", { enumerable: true, get: function () { return constants_1.standardErrorCodes; } });\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"standardErrors\", { enumerable: true, get: function () { return errors_1.standardErrors; } });\nconst serialize_1 = require(\"./serialize\");\nObject.defineProperty(exports, \"serializeError\", { enumerable: true, get: function () { return serialize_1.serializeError; } });\nconst utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"getErrorCode\", { enumerable: true, get: function () { return utils_1.getErrorCode; } });\nObject.defineProperty(exports, \"getMessageFromCode\", { enumerable: true, get: function () { return utils_1.getMessageFromCode; } });\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProviderType = exports.RegExpString = exports.IntNumber = exports.BigIntString = exports.AddressString = exports.HexString = exports.OpaqueType = void 0;\nfunction OpaqueType() {\n return (value) => value;\n}\nexports.OpaqueType = OpaqueType;\nexports.HexString = OpaqueType();\nexports.AddressString = OpaqueType();\nexports.BigIntString = OpaqueType();\nfunction IntNumber(num) {\n return Math.floor(num);\n}\nexports.IntNumber = IntNumber;\nexports.RegExpString = OpaqueType();\nvar ProviderType;\n(function (ProviderType) {\n ProviderType[\"CoinbaseWallet\"] = \"CoinbaseWallet\";\n ProviderType[\"MetaMask\"] = \"MetaMask\";\n ProviderType[\"Unselected\"] = \"\";\n})(ProviderType || (exports.ProviderType = ProviderType = {}));\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isMobileWeb = exports.getLocation = exports.isInIFrame = exports.createQrUrl = exports.getFavicon = exports.range = exports.isBigNumber = exports.ensureParsedJSONObject = exports.ensureBN = exports.ensureRegExpString = exports.ensureIntNumber = exports.ensureBuffer = exports.ensureAddressString = exports.ensureEvenLengthHexString = exports.ensureHexString = exports.isHexString = exports.prepend0x = exports.strip0x = exports.has0xPrefix = exports.hexStringFromIntNumber = exports.intNumberFromHexString = exports.bigIntStringFromBN = exports.hexStringFromBuffer = exports.hexStringToUint8Array = exports.uint8ArrayToHex = exports.randomBytesHex = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst error_1 = require(\"./error\");\nconst type_1 = require(\"./type\");\nconst INT_STRING_REGEX = /^[0-9]*$/;\nconst HEXADECIMAL_STRING_REGEX = /^[a-f0-9]*$/;\n/**\n * @param length number of bytes\n */\nfunction randomBytesHex(length) {\n return uint8ArrayToHex(crypto.getRandomValues(new Uint8Array(length)));\n}\nexports.randomBytesHex = randomBytesHex;\nfunction uint8ArrayToHex(value) {\n return [...value].map((b) => b.toString(16).padStart(2, '0')).join('');\n}\nexports.uint8ArrayToHex = uint8ArrayToHex;\nfunction hexStringToUint8Array(hexString) {\n return new Uint8Array(hexString.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));\n}\nexports.hexStringToUint8Array = hexStringToUint8Array;\nfunction hexStringFromBuffer(buf, includePrefix = false) {\n const hex = buf.toString('hex');\n return (0, type_1.HexString)(includePrefix ? `0x${hex}` : hex);\n}\nexports.hexStringFromBuffer = hexStringFromBuffer;\nfunction bigIntStringFromBN(bn) {\n return (0, type_1.BigIntString)(bn.toString(10));\n}\nexports.bigIntStringFromBN = bigIntStringFromBN;\nfunction intNumberFromHexString(hex) {\n return (0, type_1.IntNumber)(new bn_js_1.default(ensureEvenLengthHexString(hex, false), 16).toNumber());\n}\nexports.intNumberFromHexString = intNumberFromHexString;\nfunction hexStringFromIntNumber(num) {\n return (0, type_1.HexString)(`0x${new bn_js_1.default(num).toString(16)}`);\n}\nexports.hexStringFromIntNumber = hexStringFromIntNumber;\nfunction has0xPrefix(str) {\n return str.startsWith('0x') || str.startsWith('0X');\n}\nexports.has0xPrefix = has0xPrefix;\nfunction strip0x(hex) {\n if (has0xPrefix(hex)) {\n return hex.slice(2);\n }\n return hex;\n}\nexports.strip0x = strip0x;\nfunction prepend0x(hex) {\n if (has0xPrefix(hex)) {\n return `0x${hex.slice(2)}`;\n }\n return `0x${hex}`;\n}\nexports.prepend0x = prepend0x;\nfunction isHexString(hex) {\n if (typeof hex !== 'string') {\n return false;\n }\n const s = strip0x(hex).toLowerCase();\n return HEXADECIMAL_STRING_REGEX.test(s);\n}\nexports.isHexString = isHexString;\nfunction ensureHexString(hex, includePrefix = false) {\n if (typeof hex === 'string') {\n const s = strip0x(hex).toLowerCase();\n if (HEXADECIMAL_STRING_REGEX.test(s)) {\n return (0, type_1.HexString)(includePrefix ? `0x${s}` : s);\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`\"${String(hex)}\" is not a hexadecimal string`);\n}\nexports.ensureHexString = ensureHexString;\nfunction ensureEvenLengthHexString(hex, includePrefix = false) {\n let h = ensureHexString(hex, false);\n if (h.length % 2 === 1) {\n h = (0, type_1.HexString)(`0${h}`);\n }\n return includePrefix ? (0, type_1.HexString)(`0x${h}`) : h;\n}\nexports.ensureEvenLengthHexString = ensureEvenLengthHexString;\nfunction ensureAddressString(str) {\n if (typeof str === 'string') {\n const s = strip0x(str).toLowerCase();\n if (isHexString(s) && s.length === 40) {\n return (0, type_1.AddressString)(prepend0x(s));\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(str)}`);\n}\nexports.ensureAddressString = ensureAddressString;\nfunction ensureBuffer(str) {\n if (Buffer.isBuffer(str)) {\n return str;\n }\n if (typeof str === 'string') {\n if (isHexString(str)) {\n const s = ensureEvenLengthHexString(str, false);\n return Buffer.from(s, 'hex');\n }\n return Buffer.from(str, 'utf8');\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not binary data: ${String(str)}`);\n}\nexports.ensureBuffer = ensureBuffer;\nfunction ensureIntNumber(num) {\n if (typeof num === 'number' && Number.isInteger(num)) {\n return (0, type_1.IntNumber)(num);\n }\n if (typeof num === 'string') {\n if (INT_STRING_REGEX.test(num)) {\n return (0, type_1.IntNumber)(Number(num));\n }\n if (isHexString(num)) {\n return (0, type_1.IntNumber)(new bn_js_1.default(ensureEvenLengthHexString(num, false), 16).toNumber());\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not an integer: ${String(num)}`);\n}\nexports.ensureIntNumber = ensureIntNumber;\nfunction ensureRegExpString(regExp) {\n if (regExp instanceof RegExp) {\n return (0, type_1.RegExpString)(regExp.toString());\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(regExp)}`);\n}\nexports.ensureRegExpString = ensureRegExpString;\nfunction ensureBN(val) {\n if (val !== null && (bn_js_1.default.isBN(val) || isBigNumber(val))) {\n return new bn_js_1.default(val.toString(10), 10);\n }\n if (typeof val === 'number') {\n return new bn_js_1.default(ensureIntNumber(val));\n }\n if (typeof val === 'string') {\n if (INT_STRING_REGEX.test(val)) {\n return new bn_js_1.default(val, 10);\n }\n if (isHexString(val)) {\n return new bn_js_1.default(ensureEvenLengthHexString(val, false), 16);\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not an integer: ${String(val)}`);\n}\nexports.ensureBN = ensureBN;\nfunction ensureParsedJSONObject(val) {\n if (typeof val === 'string') {\n return JSON.parse(val);\n }\n if (typeof val === 'object') {\n return val;\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(val)}`);\n}\nexports.ensureParsedJSONObject = ensureParsedJSONObject;\nfunction isBigNumber(val) {\n if (val == null || typeof val.constructor !== 'function') {\n return false;\n }\n const { constructor } = val;\n return typeof constructor.config === 'function' && typeof constructor.EUCLID === 'number';\n}\nexports.isBigNumber = isBigNumber;\nfunction range(start, stop) {\n return Array.from({ length: stop - start }, (_, i) => start + i);\n}\nexports.range = range;\nfunction getFavicon() {\n const el = document.querySelector('link[sizes=\"192x192\"]') ||\n document.querySelector('link[sizes=\"180x180\"]') ||\n document.querySelector('link[rel=\"icon\"]') ||\n document.querySelector('link[rel=\"shortcut icon\"]');\n const { protocol, host } = document.location;\n const href = el ? el.getAttribute('href') : null;\n if (!href || href.startsWith('javascript:') || href.startsWith('vbscript:')) {\n return null;\n }\n if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('data:')) {\n return href;\n }\n if (href.startsWith('//')) {\n return protocol + href;\n }\n return `${protocol}//${host}${href}`;\n}\nexports.getFavicon = getFavicon;\nfunction createQrUrl(sessionId, sessionSecret, serverUrl, isParentConnection, version, chainId) {\n const sessionIdKey = isParentConnection ? 'parent-id' : 'id';\n const query = new URLSearchParams({\n [sessionIdKey]: sessionId,\n secret: sessionSecret,\n server: serverUrl,\n v: version,\n chainId: chainId.toString(),\n }).toString();\n const qrUrl = `${serverUrl}/#/link?${query}`;\n return qrUrl;\n}\nexports.createQrUrl = createQrUrl;\nfunction isInIFrame() {\n try {\n return window.frameElement !== null;\n }\n catch (e) {\n return false;\n }\n}\nexports.isInIFrame = isInIFrame;\nfunction getLocation() {\n try {\n if (isInIFrame() && window.top) {\n return window.top.location;\n }\n return window.location;\n }\n catch (e) {\n return window.location;\n }\n}\nexports.getLocation = getLocation;\nfunction isMobileWeb() {\n var _a;\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent);\n}\nexports.isMobileWeb = isMobileWeb;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScopedLocalStorage = void 0;\nclass ScopedLocalStorage {\n // eslint-disable-next-line no-useless-constructor\n constructor(scope) {\n this.scope = scope;\n }\n setItem(key, value) {\n localStorage.setItem(this.scopedKey(key), value);\n }\n getItem(key) {\n return localStorage.getItem(this.scopedKey(key));\n }\n removeItem(key) {\n localStorage.removeItem(this.scopedKey(key));\n }\n clear() {\n const prefix = this.scopedKey('');\n const keysToRemove = [];\n for (let i = 0; i < localStorage.length; i++) {\n const key = localStorage.key(i);\n if (typeof key === 'string' && key.startsWith(prefix)) {\n keysToRemove.push(key);\n }\n }\n keysToRemove.forEach((key) => localStorage.removeItem(key));\n }\n scopedKey(key) {\n return `${this.scope}:${key}`;\n }\n}\nexports.ScopedLocalStorage = ScopedLocalStorage;\n","\"use strict\";\n// DiagnosticLogger for debugging purposes only\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EVENTS = void 0;\nexports.EVENTS = {\n STARTED_CONNECTING: 'walletlink_sdk.started.connecting',\n CONNECTED_STATE_CHANGE: 'walletlink_sdk.connected',\n DISCONNECTED: 'walletlink_sdk.disconnected',\n METADATA_DESTROYED: 'walletlink_sdk_metadata_destroyed',\n LINKED: 'walletlink_sdk.linked',\n FAILURE: 'walletlink_sdk.generic_failure',\n SESSION_CONFIG_RECEIVED: 'walletlink_sdk.session_config_event_received',\n ETH_ACCOUNTS_STATE: 'walletlink_sdk.eth_accounts_state',\n SESSION_STATE_CHANGE: 'walletlink_sdk.session_state_change',\n UNLINKED_ERROR_STATE: 'walletlink_sdk.unlinked_error_state',\n SKIPPED_CLEARING_SESSION: 'walletlink_sdk.skipped_clearing_session',\n GENERAL_ERROR: 'walletlink_sdk.general_error',\n WEB3_REQUEST: 'walletlink_sdk.web3.request',\n WEB3_REQUEST_PUBLISHED: 'walletlink_sdk.web3.request_published',\n WEB3_RESPONSE: 'walletlink_sdk.web3.response',\n METHOD_NOT_IMPLEMENTED: 'walletlink_sdk.method_not_implemented',\n UNKNOWN_ADDRESS_ENCOUNTERED: 'walletlink_sdk.unknown_address_encountered',\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RelayAbstract = exports.APP_VERSION_KEY = exports.LOCAL_STORAGE_ADDRESSES_KEY = exports.WALLET_USER_NAME_KEY = void 0;\nconst error_1 = require(\"../core/error\");\nexports.WALLET_USER_NAME_KEY = 'walletUsername';\nexports.LOCAL_STORAGE_ADDRESSES_KEY = 'Addresses';\nexports.APP_VERSION_KEY = 'AppVersion';\nclass RelayAbstract {\n async makeEthereumJSONRPCRequest(request, jsonRpcUrl) {\n if (!jsonRpcUrl)\n throw new Error('Error: No jsonRpcUrl provided');\n return window\n .fetch(jsonRpcUrl, {\n method: 'POST',\n body: JSON.stringify(request),\n mode: 'cors',\n headers: { 'Content-Type': 'application/json' },\n })\n .then((res) => res.json())\n .then((json) => {\n if (!json) {\n throw error_1.standardErrors.rpc.parse({});\n }\n const response = json;\n const { error } = response;\n if (error) {\n throw (0, error_1.serializeError)(error, request.method);\n }\n return response;\n });\n }\n}\nexports.RelayAbstract = RelayAbstract;\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n","var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n","var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n","var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Session = void 0;\nconst sha_js_1 = require(\"sha.js\");\nconst util_1 = require(\"../core/util\");\nconst STORAGE_KEY_SESSION_ID = 'session:id';\nconst STORAGE_KEY_SESSION_SECRET = 'session:secret';\nconst STORAGE_KEY_SESSION_LINKED = 'session:linked';\nclass Session {\n constructor(storage, id, secret, linked) {\n this._storage = storage;\n this._id = id || (0, util_1.randomBytesHex)(16);\n this._secret = secret || (0, util_1.randomBytesHex)(32);\n this._key = new sha_js_1.sha256()\n .update(`${this._id}, ${this._secret} WalletLink`) // ensure old sessions stay connected\n .digest('hex');\n this._linked = !!linked;\n }\n static load(storage) {\n const id = storage.getItem(STORAGE_KEY_SESSION_ID);\n const linked = storage.getItem(STORAGE_KEY_SESSION_LINKED);\n const secret = storage.getItem(STORAGE_KEY_SESSION_SECRET);\n if (id && secret) {\n return new Session(storage, id, secret, linked === '1');\n }\n return null;\n }\n /**\n * Takes in a session ID and returns the sha256 hash of it.\n * @param sessionId session ID\n */\n static hash(sessionId) {\n return new sha_js_1.sha256().update(sessionId).digest('hex');\n }\n get id() {\n return this._id;\n }\n get secret() {\n return this._secret;\n }\n get key() {\n return this._key;\n }\n get linked() {\n return this._linked;\n }\n set linked(val) {\n this._linked = val;\n this.persistLinked();\n }\n save() {\n this._storage.setItem(STORAGE_KEY_SESSION_ID, this._id);\n this._storage.setItem(STORAGE_KEY_SESSION_SECRET, this._secret);\n this.persistLinked();\n return this;\n }\n persistLinked() {\n this._storage.setItem(STORAGE_KEY_SESSION_LINKED, this._linked ? '1' : '0');\n }\n}\nexports.Session = Session;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Cipher = void 0;\nconst util_1 = require(\"../core/util\");\nclass Cipher {\n // @param secret hex representation of 32-byte secret\n constructor(secret) {\n this.secret = secret;\n }\n /**\n *\n * @param plainText string to be encrypted\n * returns hex string representation of bytes in the order: initialization vector (iv),\n * auth tag, encrypted plaintext. IV is 12 bytes. Auth tag is 16 bytes. Remaining bytes are the\n * encrypted plainText.\n */\n async encrypt(plainText) {\n const secret = this.secret;\n if (secret.length !== 64)\n throw Error(`secret must be 256 bits`);\n const ivBytes = crypto.getRandomValues(new Uint8Array(12));\n const secretKey = await crypto.subtle.importKey('raw', (0, util_1.hexStringToUint8Array)(secret), { name: 'aes-gcm' }, false, ['encrypt', 'decrypt']);\n const enc = new TextEncoder();\n // Will return encrypted plainText with auth tag (ie MAC or checksum) appended at the end\n const encryptedResult = await window.crypto.subtle.encrypt({\n name: 'AES-GCM',\n iv: ivBytes,\n }, secretKey, enc.encode(plainText));\n const tagLength = 16;\n const authTag = encryptedResult.slice(encryptedResult.byteLength - tagLength);\n const encryptedPlaintext = encryptedResult.slice(0, encryptedResult.byteLength - tagLength);\n const authTagBytes = new Uint8Array(authTag);\n const encryptedPlaintextBytes = new Uint8Array(encryptedPlaintext);\n const concatted = new Uint8Array([...ivBytes, ...authTagBytes, ...encryptedPlaintextBytes]);\n return (0, util_1.uint8ArrayToHex)(concatted);\n }\n /**\n *\n * @param cipherText hex string representation of bytes in the order: initialization vector (iv),\n * auth tag, encrypted plaintext. IV is 12 bytes. Auth tag is 16 bytes.\n */\n async decrypt(cipherText) {\n const secret = this.secret;\n if (secret.length !== 64)\n throw Error(`secret must be 256 bits`);\n return new Promise((resolve, reject) => {\n void (async function () {\n const secretKey = await crypto.subtle.importKey('raw', (0, util_1.hexStringToUint8Array)(secret), { name: 'aes-gcm' }, false, ['encrypt', 'decrypt']);\n const encrypted = (0, util_1.hexStringToUint8Array)(cipherText);\n const ivBytes = encrypted.slice(0, 12);\n const authTagBytes = encrypted.slice(12, 28);\n const encryptedPlaintextBytes = encrypted.slice(28);\n const concattedBytes = new Uint8Array([...encryptedPlaintextBytes, ...authTagBytes]);\n const algo = {\n name: 'AES-GCM',\n iv: new Uint8Array(ivBytes),\n };\n try {\n const decrypted = await window.crypto.subtle.decrypt(algo, secretKey, concattedBytes);\n const decoder = new TextDecoder();\n resolve(decoder.decode(decrypted));\n }\n catch (err) {\n reject(err);\n }\n })();\n });\n }\n}\nexports.Cipher = Cipher;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkHTTP = void 0;\nclass WalletLinkHTTP {\n constructor(linkAPIUrl, sessionId, sessionKey) {\n this.linkAPIUrl = linkAPIUrl;\n this.sessionId = sessionId;\n const credentials = `${sessionId}:${sessionKey}`;\n this.auth = `Basic ${btoa(credentials)}`;\n }\n // mark unseen events as seen\n async markUnseenEventsAsSeen(events) {\n return Promise.all(events.map((e) => fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`, {\n method: 'POST',\n headers: {\n Authorization: this.auth,\n },\n }))).catch((error) => console.error('Unabled to mark event as failed:', error));\n }\n async fetchUnseenEvents() {\n var _a;\n const response = await fetch(`${this.linkAPIUrl}/events?unseen=true`, {\n headers: {\n Authorization: this.auth,\n },\n });\n if (response.ok) {\n const { events, error } = (await response.json());\n if (error) {\n throw new Error(`Check unseen events failed: ${error}`);\n }\n const responseEvents = (_a = events === null || events === void 0 ? void 0 : events.filter((e) => e.event === 'Web3Response').map((e) => ({\n type: 'Event',\n sessionId: this.sessionId,\n eventId: e.id,\n event: e.event,\n data: e.data,\n }))) !== null && _a !== void 0 ? _a : [];\n this.markUnseenEventsAsSeen(responseEvents);\n return responseEvents;\n }\n throw new Error(`Check unseen events failed: ${response.status}`);\n }\n}\nexports.WalletLinkHTTP = WalletLinkHTTP;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkWebSocket = exports.ConnectionState = void 0;\nvar ConnectionState;\n(function (ConnectionState) {\n ConnectionState[ConnectionState[\"DISCONNECTED\"] = 0] = \"DISCONNECTED\";\n ConnectionState[ConnectionState[\"CONNECTING\"] = 1] = \"CONNECTING\";\n ConnectionState[ConnectionState[\"CONNECTED\"] = 2] = \"CONNECTED\";\n})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));\nclass WalletLinkWebSocket {\n setConnectionStateListener(listener) {\n this.connectionStateListener = listener;\n }\n setIncomingDataListener(listener) {\n this.incomingDataListener = listener;\n }\n /**\n * Constructor\n * @param url WebSocket server URL\n * @param [WebSocketClass] Custom WebSocket implementation\n */\n constructor(url, WebSocketClass = WebSocket) {\n this.WebSocketClass = WebSocketClass;\n this.webSocket = null;\n this.pendingData = [];\n this.url = url.replace(/^http/, 'ws');\n }\n /**\n * Make a websocket connection\n * @returns a Promise that resolves when connected\n */\n async connect() {\n if (this.webSocket) {\n throw new Error('webSocket object is not null');\n }\n return new Promise((resolve, reject) => {\n var _a;\n let webSocket;\n try {\n this.webSocket = webSocket = new this.WebSocketClass(this.url);\n }\n catch (err) {\n reject(err);\n return;\n }\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.CONNECTING);\n webSocket.onclose = (evt) => {\n var _a;\n this.clearWebSocket();\n reject(new Error(`websocket error ${evt.code}: ${evt.reason}`));\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.DISCONNECTED);\n };\n webSocket.onopen = (_) => {\n var _a;\n resolve();\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.CONNECTED);\n if (this.pendingData.length > 0) {\n const pending = [...this.pendingData];\n pending.forEach((data) => this.sendData(data));\n this.pendingData = [];\n }\n };\n webSocket.onmessage = (evt) => {\n var _a, _b;\n if (evt.data === 'h') {\n (_a = this.incomingDataListener) === null || _a === void 0 ? void 0 : _a.call(this, {\n type: 'Heartbeat',\n });\n }\n else {\n try {\n const message = JSON.parse(evt.data);\n (_b = this.incomingDataListener) === null || _b === void 0 ? void 0 : _b.call(this, message);\n }\n catch (_c) {\n /* empty */\n }\n }\n };\n });\n }\n /**\n * Disconnect from server\n */\n disconnect() {\n var _a;\n const { webSocket } = this;\n if (!webSocket) {\n return;\n }\n this.clearWebSocket();\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.DISCONNECTED);\n this.connectionStateListener = undefined;\n this.incomingDataListener = undefined;\n try {\n webSocket.close();\n }\n catch (_b) {\n // noop\n }\n }\n /**\n * Send data to server\n * @param data text to send\n */\n sendData(data) {\n const { webSocket } = this;\n if (!webSocket) {\n this.pendingData.push(data);\n this.connect();\n return;\n }\n webSocket.send(data);\n }\n clearWebSocket() {\n const { webSocket } = this;\n if (!webSocket) {\n return;\n }\n this.webSocket = null;\n webSocket.onclose = null;\n webSocket.onerror = null;\n webSocket.onmessage = null;\n webSocket.onopen = null;\n }\n}\nexports.WalletLinkWebSocket = WalletLinkWebSocket;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkConnection = void 0;\nconst type_1 = require(\"../../../core/type\");\nconst Cipher_1 = require(\"../../../lib/Cipher\");\nconst DiagnosticLogger_1 = require(\"../../../provider/DiagnosticLogger\");\nconst RelayAbstract_1 = require(\"../../RelayAbstract\");\nconst Session_1 = require(\"../../Session\");\nconst WalletLinkHTTP_1 = require(\"./WalletLinkHTTP\");\nconst WalletLinkWebSocket_1 = require(\"./WalletLinkWebSocket\");\nconst HEARTBEAT_INTERVAL = 10000;\nconst REQUEST_TIMEOUT = 60000;\n/**\n * Coinbase Wallet Connection\n */\nclass WalletLinkConnection {\n /**\n * Constructor\n * @param session Session\n * @param linkAPIUrl Coinbase Wallet link server URL\n * @param listener WalletLinkConnectionUpdateListener\n * @param [WebSocketClass] Custom WebSocket implementation\n */\n constructor({ session, linkAPIUrl, listener, diagnostic, WebSocketClass = WebSocket, }) {\n this.destroyed = false;\n this.lastHeartbeatResponse = 0;\n this.nextReqId = (0, type_1.IntNumber)(1);\n /**\n * true if connected and authenticated, else false\n * runs listener when connected status changes\n */\n this._connected = false;\n /**\n * true if linked (a guest has joined before)\n * runs listener when linked status changes\n */\n this._linked = false;\n this.shouldFetchUnseenEventsOnConnect = false;\n this.requestResolutions = new Map();\n this.handleSessionMetadataUpdated = (metadata) => {\n if (!metadata)\n return;\n // Map of metadata key to handler function\n const handlers = new Map([\n ['__destroyed', this.handleDestroyed],\n ['EthereumAddress', this.handleAccountUpdated],\n ['WalletUsername', this.handleWalletUsernameUpdated],\n ['AppVersion', this.handleAppVersionUpdated],\n [\n 'ChainId',\n (v) => metadata.JsonRpcUrl && this.handleChainUpdated(v, metadata.JsonRpcUrl),\n ],\n ]);\n // call handler for each metadata key if value is defined\n handlers.forEach((handler, key) => {\n const value = metadata[key];\n if (value === undefined)\n return;\n handler(value);\n });\n };\n this.handleDestroyed = (__destroyed) => {\n var _a, _b;\n if (__destroyed !== '1')\n return;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.resetAndReload();\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.METADATA_DESTROYED, {\n alreadyDestroyed: this.isDestroyed,\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n };\n this.handleAccountUpdated = async (encryptedEthereumAddress) => {\n var _a, _b;\n try {\n const address = await this.cipher.decrypt(encryptedEthereumAddress);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.accountUpdated(address);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'selectedAddress',\n });\n }\n };\n this.handleMetadataUpdated = async (key, encryptedMetadataValue) => {\n var _a, _b;\n try {\n const decryptedValue = await this.cipher.decrypt(encryptedMetadataValue);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.metadataUpdated(key, decryptedValue);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: key,\n });\n }\n };\n this.handleWalletUsernameUpdated = async (walletUsername) => {\n this.handleMetadataUpdated(RelayAbstract_1.WALLET_USER_NAME_KEY, walletUsername);\n };\n this.handleAppVersionUpdated = async (appVersion) => {\n this.handleMetadataUpdated(RelayAbstract_1.APP_VERSION_KEY, appVersion);\n };\n this.handleChainUpdated = async (encryptedChainId, encryptedJsonRpcUrl) => {\n var _a, _b;\n try {\n const chainId = await this.cipher.decrypt(encryptedChainId);\n const jsonRpcUrl = await this.cipher.decrypt(encryptedJsonRpcUrl);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.chainUpdated(chainId, jsonRpcUrl);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'chainId|jsonRpcUrl',\n });\n }\n };\n this.session = session;\n this.cipher = new Cipher_1.Cipher(session.secret);\n this.diagnostic = diagnostic;\n this.listener = listener;\n const ws = new WalletLinkWebSocket_1.WalletLinkWebSocket(`${linkAPIUrl}/rpc`, WebSocketClass);\n ws.setConnectionStateListener(async (state) => {\n var _a;\n // attempt to reconnect every 5 seconds when disconnected\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.CONNECTED_STATE_CHANGE, {\n state,\n sessionIdHash: Session_1.Session.hash(session.id),\n });\n let connected = false;\n switch (state) {\n case WalletLinkWebSocket_1.ConnectionState.DISCONNECTED:\n // if DISCONNECTED and not destroyed\n if (!this.destroyed) {\n const connect = async () => {\n // wait 5 seconds\n await new Promise((resolve) => setTimeout(resolve, 5000));\n // check whether it's destroyed again\n if (!this.destroyed) {\n // reconnect\n ws.connect().catch(() => {\n connect();\n });\n }\n };\n connect();\n }\n break;\n case WalletLinkWebSocket_1.ConnectionState.CONNECTED:\n // perform authentication upon connection\n try {\n // if CONNECTED, authenticate, and then check link status\n await this.authenticate();\n this.sendIsLinked();\n this.sendGetSessionConfig();\n connected = true;\n }\n catch (_b) {\n /* empty */\n }\n // send heartbeat every n seconds while connected\n // if CONNECTED, start the heartbeat timer\n // first timer event updates lastHeartbeat timestamp\n // subsequent calls send heartbeat message\n this.updateLastHeartbeat();\n setInterval(() => {\n this.heartbeat();\n }, HEARTBEAT_INTERVAL);\n // check for unseen events\n if (this.shouldFetchUnseenEventsOnConnect) {\n this.fetchUnseenEventsAPI();\n }\n break;\n case WalletLinkWebSocket_1.ConnectionState.CONNECTING:\n break;\n }\n // distinctUntilChanged\n if (this.connected !== connected) {\n this.connected = connected;\n }\n });\n ws.setIncomingDataListener((m) => {\n var _a, _b, _c;\n switch (m.type) {\n // handle server's heartbeat responses\n case 'Heartbeat':\n this.updateLastHeartbeat();\n return;\n // handle link status updates\n case 'IsLinkedOK':\n case 'Linked': {\n const linked = m.type === 'IsLinkedOK' ? m.linked : undefined;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.LINKED, {\n sessionIdHash: Session_1.Session.hash(session.id),\n linked,\n type: m.type,\n onlineGuests: m.onlineGuests,\n });\n this.linked = linked || m.onlineGuests > 0;\n break;\n }\n // handle session config updates\n case 'GetSessionConfigOK':\n case 'SessionConfigUpdated': {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.SESSION_CONFIG_RECEIVED, {\n sessionIdHash: Session_1.Session.hash(session.id),\n metadata_keys: m && m.metadata ? Object.keys(m.metadata) : undefined,\n });\n this.handleSessionMetadataUpdated(m.metadata);\n break;\n }\n case 'Event': {\n this.handleIncomingEvent(m);\n break;\n }\n }\n // resolve request promises\n if (m.id !== undefined) {\n (_c = this.requestResolutions.get(m.id)) === null || _c === void 0 ? void 0 : _c(m);\n }\n });\n this.ws = ws;\n this.http = new WalletLinkHTTP_1.WalletLinkHTTP(linkAPIUrl, session.id, session.key);\n }\n /**\n * Make a connection to the server\n */\n connect() {\n var _a;\n if (this.destroyed) {\n throw new Error('instance is destroyed');\n }\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.STARTED_CONNECTING, {\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n this.ws.connect();\n }\n /**\n * Terminate connection, and mark as destroyed. To reconnect, create a new\n * instance of WalletSDKConnection\n */\n destroy() {\n var _a;\n this.destroyed = true;\n this.ws.disconnect();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.DISCONNECTED, {\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n this.listener = undefined;\n }\n get isDestroyed() {\n return this.destroyed;\n }\n get connected() {\n return this._connected;\n }\n set connected(connected) {\n var _a, _b;\n this._connected = connected;\n if (connected)\n (_a = this.onceConnected) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.listener) === null || _b === void 0 ? void 0 : _b.connectedUpdated(connected);\n }\n setOnceConnected(callback) {\n return new Promise((resolve) => {\n if (this.connected) {\n callback().then(resolve);\n }\n else {\n this.onceConnected = () => {\n callback().then(resolve);\n this.onceConnected = undefined;\n };\n }\n });\n }\n get linked() {\n return this._linked;\n }\n set linked(linked) {\n var _a, _b;\n this._linked = linked;\n if (linked)\n (_a = this.onceLinked) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.listener) === null || _b === void 0 ? void 0 : _b.linkedUpdated(linked);\n }\n setOnceLinked(callback) {\n return new Promise((resolve) => {\n if (this.linked) {\n callback().then(resolve);\n }\n else {\n this.onceLinked = () => {\n callback().then(resolve);\n this.onceLinked = undefined;\n };\n }\n });\n }\n async handleIncomingEvent(m) {\n var _a, _b;\n if (m.type !== 'Event' || m.event !== 'Web3Response') {\n return;\n }\n try {\n const decryptedData = await this.cipher.decrypt(m.data);\n const message = JSON.parse(decryptedData);\n if (message.type !== 'WEB3_RESPONSE')\n return;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.handleWeb3ResponseMessage(message);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'incomingEvent',\n });\n }\n }\n async checkUnseenEvents() {\n if (!this.connected) {\n this.shouldFetchUnseenEventsOnConnect = true;\n return;\n }\n await new Promise((resolve) => setTimeout(resolve, 250));\n try {\n await this.fetchUnseenEventsAPI();\n }\n catch (e) {\n console.error('Unable to check for unseen events', e);\n }\n }\n async fetchUnseenEventsAPI() {\n this.shouldFetchUnseenEventsOnConnect = false;\n const responseEvents = await this.http.fetchUnseenEvents();\n responseEvents.forEach((e) => this.handleIncomingEvent(e));\n }\n /**\n * Set session metadata in SessionConfig object\n * @param key\n * @param value\n * @returns a Promise that completes when successful\n */\n async setSessionMetadata(key, value) {\n const message = {\n type: 'SetSessionConfig',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n metadata: { [key]: value },\n };\n return this.setOnceConnected(async () => {\n const res = await this.makeRequest(message);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to set session metadata');\n }\n });\n }\n /**\n * Publish an event and emit event ID when successful\n * @param event event name\n * @param unencryptedData unencrypted event data\n * @param callWebhook whether the webhook should be invoked\n * @returns a Promise that emits event ID when successful\n */\n async publishEvent(event, unencryptedData, callWebhook = false) {\n const data = await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({}, unencryptedData), { origin: location.origin, relaySource: window.coinbaseWalletExtension ? 'injected_sdk' : 'sdk' })));\n const message = {\n type: 'PublishEvent',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n event,\n data,\n callWebhook,\n };\n return this.setOnceLinked(async () => {\n const res = await this.makeRequest(message);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to publish event');\n }\n return res.eventId;\n });\n }\n sendData(message) {\n this.ws.sendData(JSON.stringify(message));\n }\n updateLastHeartbeat() {\n this.lastHeartbeatResponse = Date.now();\n }\n heartbeat() {\n if (Date.now() - this.lastHeartbeatResponse > HEARTBEAT_INTERVAL * 2) {\n this.ws.disconnect();\n return;\n }\n try {\n this.ws.sendData('h');\n }\n catch (_a) {\n // noop\n }\n }\n async makeRequest(message, timeout = REQUEST_TIMEOUT) {\n const reqId = message.id;\n this.sendData(message);\n // await server message with corresponding id\n let timeoutId;\n return Promise.race([\n new Promise((_, reject) => {\n timeoutId = window.setTimeout(() => {\n reject(new Error(`request ${reqId} timed out`));\n }, timeout);\n }),\n new Promise((resolve) => {\n this.requestResolutions.set(reqId, (m) => {\n clearTimeout(timeoutId); // clear the timeout\n resolve(m);\n this.requestResolutions.delete(reqId);\n });\n }),\n ]);\n }\n async authenticate() {\n const m = {\n type: 'HostSession',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n sessionKey: this.session.key,\n };\n const res = await this.makeRequest(m);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to authentcate');\n }\n }\n sendIsLinked() {\n const m = {\n type: 'IsLinked',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n };\n this.sendData(m);\n }\n sendGetSessionConfig() {\n const m = {\n type: 'GetSessionConfig',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n };\n this.sendData(m);\n }\n}\nexports.WalletLinkConnection = WalletLinkConnection;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `@namespace svg \"http://www.w3.org/2000/svg\";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Helvetica Neue\",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:\"\\\\201C\" \"\\\\201D\" \"\\\\2018\" \"\\\\2019\";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Helvetica Neue\",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.injectCssReset = void 0;\nconst cssReset_css_1 = __importDefault(require(\"./cssReset-css\"));\nfunction injectCssReset() {\n const styleEl = document.createElement('style');\n styleEl.type = 'text/css';\n styleEl.appendChild(document.createTextNode(cssReset_css_1.default));\n document.documentElement.appendChild(styleEl);\n}\nexports.injectCssReset = injectCssReset;\n","var n,l,u,t,i,o,r,f,e,c,s,a,h={},v=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function _(n){var l=n.parentNode;l&&l.removeChild(n)}function g(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return b(l,f,i,o,null)}function b(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function m(){return{current:null}}function w(n){return n.children}function k(n,l){this.props=n,this.context=l}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;lu&&i.sort(f));S.__r=0}function $(n,l,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,g=t&&t.__k||v,b=l.length;for(u.__d=e,I(u,l,g),e=u.__d,a=0;a0?b(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=A(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:f(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f2&&(e.children=arguments.length>3?n.call(arguments,2):t),b(l.type,e,i||l.key,o||l.ref,null)}function J(n,l){var u={__c:l=\"__cC\"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,P(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=v.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),P(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),P(this))},k.prototype.render=w,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},S.__r=0,e=0,c=M(!1),s=M(!0),a=0;export{k as Component,w as Fragment,G as cloneElement,J as createContext,g as createElement,m as createRef,g as h,E as hydrate,t as isValidElement,l as options,D as render,T as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t=u.__.length&&u.__.push({__V:c}),u.__[n]}function p(n){return o=1,y(D,n)}function y(n,u,i){var o=h(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function _(n,u){var i=h(t++,3);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function A(n,u){var i=h(t++,4);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function F(n){return o=5,q(function(){return{current:n}},[])}function T(n,t,r){o=6,A(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function q(n,r){var u=h(t++,7);return C(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function x(n,t){return o=8,q(function(){return n},t)}function P(n){var u=r.context[n.__c],i=h(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function V(n,t){e.useDebugValue&&e.useDebugValue(t?t(n):n)}function b(n){var u=h(t++,10),i=p();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=h(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],e.__e(t,n.__v)}}e.__b=function(n){r=null,a&&a(n)},e.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),d&&d(n,t)},e.__r=function(n){v&&v(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},e.diffed=function(n){l&&l(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===e.requestAnimationFrame||((i=e.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},e.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],e.__e(r,n.__v)}}),m&&m(n,t)},e.unmount=function(n){s&&s(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&e.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{x as useCallback,P as useContext,V as useDebugValue,_ as useEffect,b as useErrorBoundary,g as useId,T as useImperativeHandle,A as useLayoutEffect,q as useMemo,y as useReducer,F as useRef,p as useState};\n//# sourceMappingURL=hooks.module.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CloseIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction CloseIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"40\", height: \"40\", viewBox: \"0 0 40 40\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z\" })));\n}\nexports.CloseIcon = CloseIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletRound = void 0;\nconst preact_1 = require(\"preact\");\nfunction CoinbaseWalletRound(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"28\", height: \"28\", viewBox: \"0 0 28 28\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"circle\", { cx: \"14\", cy: \"14\", r: \"14\", fill: \"#0052FF\" }),\n (0, preact_1.h)(\"path\", { d: \"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z\", fill: \"white\" }),\n (0, preact_1.h)(\"path\", { d: \"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z\", fill: \"#0052FF\" })));\n}\nexports.CoinbaseWalletRound = CoinbaseWalletRound;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QRCodeIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction QRCodeIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"18\", height: \"18\", viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M3 3V8.99939L5 8.99996V5H9V3H3Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M15 21L21 21V15.0006L19 15V19L15 19V21Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M21 9H19V5H15.0006L15 3H21V9Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M3 15V21H8.99939L8.99996 19H5L5 15H3Z\" })));\n}\nexports.QRCodeIcon = QRCodeIcon;\n","/**\n * @fileoverview\n * - modified davidshimjs/qrcodejs library for use in node.js\n * - Using the 'QRCode for Javascript library'\n * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.\n * - this library has no dependencies.\n *\n * @version 0.9.1 (2016-02-12)\n * @author davidshimjs, papnkukn\n * @see http://www.d-project.com/\n * @see http://jeromeetienne.github.com/jquery-qrcode/\n * @see https://github.com/davidshimjs/qrcodejs\n */\n\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\nfunction QR8bitByte(data) {\n this.mode = QRMode.MODE_8BIT_BYTE;\n this.data = data;\n this.parsedData = [];\n\n // Added to support UTF-8 Characters\n for (var i = 0, l = this.data.length; i < l; i++) {\n var byteArray = [];\n var code = this.data.charCodeAt(i);\n\n if (code > 0x10000) {\n byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);\n byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);\n byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);\n byteArray[3] = 0x80 | (code & 0x3F);\n } else if (code > 0x800) {\n byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);\n byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);\n byteArray[2] = 0x80 | (code & 0x3F);\n } else if (code > 0x80) {\n byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);\n byteArray[1] = 0x80 | (code & 0x3F);\n } else {\n byteArray[0] = code;\n }\n\n this.parsedData.push(byteArray);\n }\n\n this.parsedData = Array.prototype.concat.apply([], this.parsedData);\n\n if (this.parsedData.length != this.data.length) {\n this.parsedData.unshift(191);\n this.parsedData.unshift(187);\n this.parsedData.unshift(239);\n }\n}\n\nQR8bitByte.prototype = {\n getLength: function (buffer) {\n return this.parsedData.length;\n },\n write: function (buffer) {\n for (var i = 0, l = this.parsedData.length; i < l; i++) {\n buffer.put(this.parsedData[i], 8);\n }\n }\n};\n\nfunction QRCodeModel(typeNumber, errorCorrectLevel) {\n this.typeNumber = typeNumber;\n this.errorCorrectLevel = errorCorrectLevel;\n this.modules = null;\n this.moduleCount = 0;\n this.dataCache = null;\n this.dataList = [];\n}\n\nQRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+\",\"+col);}\nreturn this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row=7){this.setupTypeNumber(test);}\nif(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);}\nthis.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}}\nreturn pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;}\nfor(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}}\nfor(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}}\nthis.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex>>bitIndex)&1)==1);}\nvar mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;}\nthis.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}}\nrow+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;itotalDataCount*8){throw new Error(\"code length overflow. (\"\n+buffer.getLengthInBits()\n+\">\"\n+totalDataCount*8\n+\")\");}\nif(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);}\nwhile(buffer.getLengthInBits()%8!=0){buffer.putBit(false);}\nwhile(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;}\nbuffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;}\nbuffer.put(QRCodeModel.PAD1,8);}\nreturn QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r=0)?modPoly.get(modIndex):0;}}\nvar totalCodeCount=0;for(var i=0;i=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));}\nreturn((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));}\nreturn(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;}\nreturn digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error(\"bad maskPattern:\"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i5){lostPoint+=(3+sameCount-5);}}}\nfor(var row=0;row=256){n-=255;}\nreturn QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);}\nif(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));}\nthis.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];\n\n\n/** Constructor */\nfunction QRCode(options) {\n var instance = this;\n\n //Default options\n this.options = {\n padding: 4,\n width: 256,\n height: 256,\n typeNumber: 4,\n color: \"#000000\",\n background: \"#ffffff\",\n ecl: \"M\",\n image:{\n svg:\"\",\n width:0,\n height:0\n }\n };\n\n //In case the options is string\n if (typeof options === 'string') {\n options = {\n content: options\n };\n }\n\n //Merge options\n if (options) {\n for (var i in options) {\n this.options[i] = options[i];\n }\n }\n\n if (typeof this.options.content !== 'string') {\n throw new Error(\"Expected 'content' as string!\");\n }\n\n if (this.options.content.length === 0 /* || this.options.content.length > 7089 */) {\n throw new Error(\"Expected 'content' to be non-empty!\");\n }\n\n if (!(this.options.padding >= 0)) {\n throw new Error(\"Expected 'padding' value to be non-negative!\");\n }\n\n if (!(this.options.width > 0) || !(this.options.height > 0)) {\n throw new Error(\"Expected 'width' or 'height' value to be higher than zero!\");\n }\n\n //Gets the error correction level\n function _getErrorCorrectLevel(ecl) {\n switch (ecl) {\n case \"L\":\n return QRErrorCorrectLevel.L;\n\n case \"M\":\n return QRErrorCorrectLevel.M;\n\n case \"Q\":\n return QRErrorCorrectLevel.Q;\n\n case \"H\":\n return QRErrorCorrectLevel.H;\n\n default:\n throw new Error(\"Unknwon error correction level: \" + ecl);\n }\n }\n\n //Get type number\n function _getTypeNumber(content, ecl) {\n var length = _getUTF8Length(content);\n\n var type = 1;\n var limit = 0;\n for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {\n var table = QRCodeLimitLength[i];\n if (!table) {\n throw new Error(\"Content too long: expected \" + limit + \" but got \" + length);\n }\n\n switch (ecl) {\n case \"L\":\n limit = table[0];\n break;\n\n case \"M\":\n limit = table[1];\n break;\n\n case \"Q\":\n limit = table[2];\n break;\n\n case \"H\":\n limit = table[3];\n break;\n\n default:\n throw new Error(\"Unknwon error correction level: \" + ecl);\n }\n\n if (length <= limit) {\n break;\n }\n\n type++;\n }\n\n if (type > QRCodeLimitLength.length) {\n throw new Error(\"Content too long\");\n }\n\n return type;\n }\n\n //Gets text length\n function _getUTF8Length(content) {\n var result = encodeURI(content).toString().replace(/\\%[0-9a-fA-F]{2}/g, 'a');\n return result.length + (result.length != content ? 3 : 0);\n }\n\n //Generate QR Code matrix\n var content = this.options.content;\n var type = _getTypeNumber(content, this.options.ecl);\n var ecl = _getErrorCorrectLevel(this.options.ecl);\n this.qrcode = new QRCodeModel(type, ecl);\n this.qrcode.addData(content);\n this.qrcode.make();\n}\n\n/** Generates QR Code as SVG image */\nQRCode.prototype.svg = function(opt) {\n var options = this.options || { };\n var modules = this.qrcode.modules;\n\n if (typeof opt == \"undefined\") {\n opt = { container: options.container || \"svg\" };\n }\n\n //Apply new lines and indents in SVG?\n var pretty = typeof options.pretty != \"undefined\" ? !!options.pretty : true;\n\n var indent = pretty ? ' ' : '';\n var EOL = pretty ? '\\r\\n' : '';\n var width = options.width;\n var height = options.height;\n var length = modules.length;\n var xsize = width / (length + 2 * options.padding);\n var ysize = height / (length + 2 * options.padding);\n\n //Join (union, merge) rectangles into one shape?\n var join = typeof options.join != \"undefined\" ? !!options.join : false;\n\n //Swap the X and Y modules, pull request #2\n var swap = typeof options.swap != \"undefined\" ? !!options.swap : false;\n\n //Apply declaration in SVG?\n var xmlDeclaration = typeof options.xmlDeclaration != \"undefined\" ? !!options.xmlDeclaration : true;\n\n //Populate with predefined shape instead of \"rect\" elements, thanks to @kkocdko\n var predefined = typeof options.predefined != \"undefined\" ? !!options.predefined : false;\n var defs = predefined ? indent + '' + EOL : '';\n\n //Background rectangle\n var bgrect = indent + '' + EOL;\n\n //Rectangles representing modules\n var modrect = '';\n var pathdata = '';\n\n for (var y = 0; y < length; y++) {\n for (var x = 0; x < length; x++) {\n var module = modules[x][y];\n if (module) {\n\n var px = (x * xsize + options.padding * xsize);\n var py = (y * ysize + options.padding * ysize);\n\n //Some users have had issues with the QR Code, thanks to @danioso for the solution\n if (swap) {\n var t = px;\n px = py;\n py = t;\n }\n\n if (join) {\n //Module as a part of svg path data, thanks to @danioso\n var w = xsize + px\n var h = ysize + py\n\n px = (Number.isInteger(px))? Number(px): px.toFixed(2);\n py = (Number.isInteger(py))? Number(py): py.toFixed(2);\n w = (Number.isInteger(w))? Number(w): w.toFixed(2);\n h = (Number.isInteger(h))? Number(h): h.toFixed(2);\n\n pathdata += ('M' + px + ',' + py + ' V' + h + ' H' + w + ' V' + py + ' H' + px + ' Z ');\n }\n else if (predefined) {\n //Module as a predefined shape, thanks to @kkocdko\n modrect += indent + '' + EOL;\n }\n else {\n //Module as rectangle element\n modrect += indent + '' + EOL;\n }\n }\n }\n }\n\n if (join) {\n modrect = indent + '';\n }\n let imgSvg = \"\";\n if(this.options.image !== undefined && this.options.image.svg){\n const imgWidth = width * this.options.image.width / 100;\n const imgHeight = height * this.options.image.height / 100;\n const imgX = (width/2) - imgWidth/2;\n const imgY = (height/2) - imgHeight/2;\n imgSvg += ``;\n imgSvg += this.options.image.svg + EOL;\n imgSvg += '';\n }\n\n var svg = \"\";\n switch (opt.container) {\n //Wrapped in SVG document\n case \"svg\":\n if (xmlDeclaration) {\n svg += '' + EOL;\n }\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n break;\n\n //Viewbox for responsive use in a browser, thanks to @danioso\n case \"svg-viewbox\":\n if (xmlDeclaration) {\n svg += '' + EOL;\n }\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n break;\n\n\n //Wrapped in group element\n case \"g\":\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n\n break;\n\n //Without a container\n default:\n svg += (defs + bgrect + modrect + imgSvg).replace(/^\\s+/, \"\"); //Clear indents on each line\n break;\n }\n\n return svg;\n};\n\nmodule.exports = QRCode;\n\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QRCode = void 0;\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst qrcode_svg_1 = __importDefault(require(\"../../../../vendor-js/qrcode-svg\"));\nconst QRCode = (props) => {\n const [svg, setSvg] = (0, hooks_1.useState)('');\n (0, hooks_1.useEffect)(() => {\n var _a, _b;\n const qrcode = new qrcode_svg_1.default({\n content: props.content,\n background: props.bgColor || '#ffffff',\n color: props.fgColor || '#000000',\n container: 'svg',\n ecl: 'M',\n width: (_a = props.width) !== null && _a !== void 0 ? _a : 256,\n height: (_b = props.height) !== null && _b !== void 0 ? _b : 256,\n padding: 0,\n image: props.image,\n });\n const base64 = Buffer.from(qrcode.svg(), 'utf8').toString('base64');\n setSvg(`data:image/svg+xml;base64,${base64}`);\n }, [props.bgColor, props.content, props.fgColor, props.height, props.image, props.width]);\n return svg ? (0, preact_1.h)(\"img\", { src: svg, alt: \"QR Code\" }) : null;\n};\nexports.QRCode = QRCode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Spinner = void 0;\nconst preact_1 = require(\"preact\");\nconst Spinner_css_1 = __importDefault(require(\"./Spinner-css\"));\nconst Spinner = (props) => {\n var _a;\n const size = (_a = props.size) !== null && _a !== void 0 ? _a : 64;\n const color = props.color || '#000';\n return ((0, preact_1.h)(\"div\", { class: \"-cbwsdk-spinner\" },\n (0, preact_1.h)(\"style\", null, Spinner_css_1.default),\n (0, preact_1.h)(\"svg\", { viewBox: \"0 0 100 100\", xmlns: \"http://www.w3.org/2000/svg\", style: { width: size, height: size } },\n (0, preact_1.h)(\"circle\", { style: { cx: 50, cy: 50, r: 45, stroke: color } }))));\n};\nexports.Spinner = Spinner;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletSteps = exports.ConnectContent = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst util_1 = require(\"../../../../../core/util\");\nconst version_1 = require(\"../../../../../version\");\nconst CloseIcon_1 = require(\"../icons/CloseIcon\");\nconst CoinbaseWalletRound_1 = require(\"../icons/CoinbaseWalletRound\");\nconst QRCodeIcon_1 = require(\"../icons/QRCodeIcon\");\nconst QRCode_1 = require(\"../QRCode\");\nconst Spinner_1 = require(\"../Spinner/Spinner\");\nconst ConnectContent_css_1 = __importDefault(require(\"./ConnectContent-css\"));\nconst wallet = {\n title: 'Coinbase Wallet app',\n description: 'Connect with your self-custody wallet',\n steps: CoinbaseWalletSteps,\n};\nconst makeIconColor = (theme) => {\n return theme === 'light' ? '#FFFFFF' : '#0A0B0D';\n};\nfunction ConnectContent(props) {\n const { theme } = props;\n const qrUrl = (0, util_1.createQrUrl)(props.sessionId, props.sessionSecret, props.linkAPIUrl, props.isParentConnection, props.version, props.chainId);\n const WalletSteps = wallet.steps;\n return ((0, preact_1.h)(\"div\", { \"data-testid\": \"connect-content\", className: (0, clsx_1.default)('-cbwsdk-connect-content', theme) },\n (0, preact_1.h)(\"style\", null, ConnectContent_css_1.default),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-header\" },\n (0, preact_1.h)(\"h2\", { className: (0, clsx_1.default)('-cbwsdk-connect-content-heading', theme) }, \"Scan to connect with our mobile app\"),\n props.onCancel && ((0, preact_1.h)(\"button\", { type: \"button\", className: '-cbwsdk-cancel-button', onClick: props.onCancel },\n (0, preact_1.h)(CloseIcon_1.CloseIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' })))),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-layout\" },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-column-left\" },\n (0, preact_1.h)(ConnectItem, { title: wallet.title, description: wallet.description, theme: theme })),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-column-right\" },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-qr-wrapper\" },\n (0, preact_1.h)(QRCode_1.QRCode, { content: qrUrl, width: 200, height: 200, fgColor: \"#000\", bgColor: \"transparent\" }),\n (0, preact_1.h)(\"input\", { type: \"hidden\", name: \"cbw-cbwsdk-version\", value: version_1.LIB_VERSION }),\n (0, preact_1.h)(\"input\", { type: \"hidden\", value: qrUrl })),\n (0, preact_1.h)(WalletSteps, { theme: theme }),\n !props.isConnected && ((0, preact_1.h)(\"div\", { \"data-testid\": \"connecting-spinner\", className: (0, clsx_1.default)('-cbwsdk-connect-content-qr-connecting', theme) },\n (0, preact_1.h)(Spinner_1.Spinner, { size: 36, color: theme === 'dark' ? '#FFF' : '#000' }),\n (0, preact_1.h)(\"p\", null, \"Connecting...\")))))));\n}\nexports.ConnectContent = ConnectContent;\nfunction ConnectItem({ title, description, theme }) {\n return ((0, preact_1.h)(\"div\", { className: (0, clsx_1.default)('-cbwsdk-connect-item', theme) },\n (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(CoinbaseWalletRound_1.CoinbaseWalletRound, null)),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-item-copy-wrapper\" },\n (0, preact_1.h)(\"h3\", { className: \"-cbwsdk-connect-item-title\" }, title),\n (0, preact_1.h)(\"p\", { className: \"-cbwsdk-connect-item-description\" }, description))));\n}\nfunction CoinbaseWalletSteps({ theme }) {\n return ((0, preact_1.h)(\"ol\", { className: \"-cbwsdk-wallet-steps\" },\n (0, preact_1.h)(\"li\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-item', theme) },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-wallet-steps-item-wrapper\" }, \"Open Coinbase Wallet app\")),\n (0, preact_1.h)(\"li\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-item', theme) },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-wallet-steps-item-wrapper\" },\n (0, preact_1.h)(\"span\", null,\n \"Tap \",\n (0, preact_1.h)(\"strong\", null, \"Scan\"),\n ' '),\n (0, preact_1.h)(\"span\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-pad-left', '-cbwsdk-wallet-steps-icon', theme) },\n (0, preact_1.h)(QRCodeIcon_1.QRCodeIcon, { fill: makeIconColor(theme) }))))));\n}\nexports.CoinbaseWalletSteps = CoinbaseWalletSteps;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrowLeftIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction ArrowLeftIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z\" })));\n}\nexports.ArrowLeftIcon = ArrowLeftIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LaptopIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction LaptopIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z\" })));\n}\nexports.LaptopIcon = LaptopIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SafeIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction SafeIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", d: \"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z\" })));\n}\nexports.SafeIcon = SafeIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TryExtensionContent = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst ArrowLeftIcon_1 = require(\"../icons/ArrowLeftIcon\");\nconst LaptopIcon_1 = require(\"../icons/LaptopIcon\");\nconst SafeIcon_1 = require(\"../icons/SafeIcon\");\nconst TryExtensionContent_css_1 = __importDefault(require(\"./TryExtensionContent-css\"));\nfunction TryExtensionContent({ theme }) {\n const [clicked, setClicked] = (0, hooks_1.useState)(false);\n const handleInstallClick = (0, hooks_1.useCallback)(() => {\n window.open('https://api.wallet.coinbase.com/rpc/v2/desktop/chrome', '_blank');\n }, []);\n const handleClick = (0, hooks_1.useCallback)(() => {\n if (clicked) {\n window.location.reload();\n }\n else {\n handleInstallClick();\n setClicked(true);\n }\n }, [handleInstallClick, clicked]);\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension', theme) },\n (0, preact_1.h)(\"style\", null, TryExtensionContent_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-column-half\" },\n (0, preact_1.h)(\"h3\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-heading', theme) }, \"Or try the Coinbase Wallet browser extension\"),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-cta-wrapper\" },\n (0, preact_1.h)(\"button\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-cta', theme), onClick: handleClick }, clicked ? 'Refresh' : 'Install'),\n (0, preact_1.h)(\"div\", null, !clicked && ((0, preact_1.h)(ArrowLeftIcon_1.ArrowLeftIcon, { class: \"-cbwsdk-try-extension-cta-icon\", fill: theme === 'light' ? '#0052FF' : '#588AF5' }))))),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-column-half\" },\n (0, preact_1.h)(\"ul\", { class: \"-cbwsdk-try-extension-list\" },\n (0, preact_1.h)(\"li\", { class: \"-cbwsdk-try-extension-list-item\" },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-list-item-icon-wrapper\" },\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-icon', theme) },\n (0, preact_1.h)(LaptopIcon_1.LaptopIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' }))),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-copy', theme) }, \"Connect with dapps with just one click on your desktop browser\")),\n (0, preact_1.h)(\"li\", { class: \"-cbwsdk-try-extension-list-item\" },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-list-item-icon-wrapper\" },\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-icon', theme) },\n (0, preact_1.h)(SafeIcon_1.SafeIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' }))),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-copy', theme) }, \"Add an additional layer of security by using a supported Ledger hardware wallet\"))))));\n}\nexports.TryExtensionContent = TryExtensionContent;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConnectDialog = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst ConnectContent_1 = require(\"../ConnectContent/ConnectContent\");\nconst TryExtensionContent_1 = require(\"../TryExtensionContent/TryExtensionContent\");\nconst ConnectDialog_css_1 = __importDefault(require(\"./ConnectDialog-css\"));\nconst ConnectDialog = (props) => {\n const { isOpen, darkMode } = props;\n const [containerHidden, setContainerHidden] = (0, hooks_1.useState)(!isOpen);\n const [dialogHidden, setDialogHidden] = (0, hooks_1.useState)(!isOpen);\n (0, hooks_1.useEffect)(() => {\n const timers = [\n window.setTimeout(() => {\n setDialogHidden(!isOpen);\n }, 10),\n ];\n if (isOpen) {\n setContainerHidden(false);\n }\n else {\n timers.push(window.setTimeout(() => {\n setContainerHidden(true);\n }, 360));\n }\n return () => {\n timers.forEach(window.clearTimeout);\n };\n }, [isOpen]);\n const theme = darkMode ? 'dark' : 'light';\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-container', containerHidden && '-cbwsdk-connect-dialog-container-hidden') },\n (0, preact_1.h)(\"style\", null, ConnectDialog_css_1.default),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-backdrop', theme, dialogHidden && '-cbwsdk-connect-dialog-backdrop-hidden') }),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-connect-dialog\" },\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-box', dialogHidden && '-cbwsdk-connect-dialog-box-hidden') },\n !props.connectDisabled ? ((0, preact_1.h)(ConnectContent_1.ConnectContent, { theme: theme, version: props.version, sessionId: props.sessionId, sessionSecret: props.sessionSecret, linkAPIUrl: props.linkAPIUrl, isConnected: props.isConnected, isParentConnection: props.isParentConnection, chainId: props.chainId, onCancel: props.onCancel })) : null,\n (0, preact_1.h)(TryExtensionContent_1.TryExtensionContent, { theme: theme })))));\n};\nexports.ConnectDialog = ConnectDialog;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LinkFlow = void 0;\nconst preact_1 = require(\"preact\");\nconst ConnectDialog_1 = require(\"../ConnectDialog/ConnectDialog\");\nclass LinkFlow {\n constructor(options) {\n this.connected = false;\n this.chainId = 1;\n this.isOpen = false;\n this.onCancel = null;\n this.root = null;\n // if true, hide QR code in LinkFlow (which happens if no jsonRpcUrl is provided)\n this.connectDisabled = false;\n this.darkMode = options.darkMode;\n this.version = options.version;\n this.sessionId = options.sessionId;\n this.sessionSecret = options.sessionSecret;\n this.linkAPIUrl = options.linkAPIUrl;\n this.isParentConnection = options.isParentConnection;\n }\n attach(el) {\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-link-flow-root';\n el.appendChild(this.root);\n this.render();\n }\n setConnected(v) {\n if (this.connected !== v) {\n this.connected = v;\n this.render();\n }\n }\n setChainId(chainId) {\n if (this.chainId !== chainId) {\n this.chainId = chainId;\n this.render();\n }\n }\n detach() {\n var _a;\n if (!this.root) {\n return;\n }\n (0, preact_1.render)(null, this.root);\n (_a = this.root.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.root);\n }\n setConnectDisabled(connectDisabled) {\n this.connectDisabled = connectDisabled;\n }\n open(options) {\n this.isOpen = true;\n this.onCancel = options.onCancel;\n this.render();\n }\n close() {\n this.isOpen = false;\n this.onCancel = null;\n this.render();\n }\n render() {\n if (!this.root) {\n return;\n }\n (0, preact_1.render)((0, preact_1.h)(ConnectDialog_1.ConnectDialog, { darkMode: this.darkMode, version: this.version, sessionId: this.sessionId, sessionSecret: this.sessionSecret, linkAPIUrl: this.linkAPIUrl, isOpen: this.isOpen, isConnected: this.connected, isParentConnection: this.isParentConnection, chainId: this.chainId, onCancel: this.onCancel, connectDisabled: this.connectDisabled }), this.root);\n }\n}\nexports.LinkFlow = LinkFlow;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SnackbarInstance = exports.SnackbarContainer = exports.Snackbar = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst Snackbar_css_1 = __importDefault(require(\"./Snackbar-css\"));\nconst cblogo = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04Lj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EuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=`;\nclass Snackbar {\n constructor(options) {\n this.items = new Map();\n this.nextItemKey = 0;\n this.root = null;\n this.darkMode = options.darkMode;\n }\n attach(el) {\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-snackbar-root';\n el.appendChild(this.root);\n this.render();\n }\n presentItem(itemProps) {\n const key = this.nextItemKey++;\n this.items.set(key, itemProps);\n this.render();\n return () => {\n this.items.delete(key);\n this.render();\n };\n }\n clear() {\n this.items.clear();\n this.render();\n }\n render() {\n if (!this.root) {\n return;\n }\n (0, preact_1.render)((0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(exports.SnackbarContainer, { darkMode: this.darkMode }, Array.from(this.items.entries()).map(([key, itemProps]) => ((0, preact_1.h)(exports.SnackbarInstance, Object.assign({}, itemProps, { key: key })))))), this.root);\n }\n}\nexports.Snackbar = Snackbar;\nconst SnackbarContainer = (props) => ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-container') },\n (0, preact_1.h)(\"style\", null, Snackbar_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar\" }, props.children)));\nexports.SnackbarContainer = SnackbarContainer;\nconst SnackbarInstance = ({ autoExpand, message, menuItems, }) => {\n const [hidden, setHidden] = (0, hooks_1.useState)(true);\n const [expanded, setExpanded] = (0, hooks_1.useState)(autoExpand !== null && autoExpand !== void 0 ? autoExpand : false);\n (0, hooks_1.useEffect)(() => {\n const timers = [\n window.setTimeout(() => {\n setHidden(false);\n }, 1),\n window.setTimeout(() => {\n setExpanded(true);\n }, 10000),\n ];\n return () => {\n timers.forEach(window.clearTimeout);\n };\n });\n const toggleExpanded = () => {\n setExpanded(!expanded);\n };\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance', hidden && '-cbwsdk-snackbar-instance-hidden', expanded && '-cbwsdk-snackbar-instance-expanded') },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-header\", onClick: toggleExpanded },\n (0, preact_1.h)(\"img\", { src: cblogo, class: \"-cbwsdk-snackbar-instance-header-cblogo\" }),\n ' ',\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-header-message\" }, message),\n (0, preact_1.h)(\"div\", { class: \"-gear-container\" },\n !expanded && ((0, preact_1.h)(\"svg\", { width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n (0, preact_1.h)(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"#F5F7F8\" }))),\n (0, preact_1.h)(\"img\", { src: gearIcon, class: \"-gear-icon\", title: \"Expand\" }))),\n menuItems && menuItems.length > 0 && ((0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-menu\" }, menuItems.map((action, i) => ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance-menu-item', action.isRed && '-cbwsdk-snackbar-instance-menu-item-is-red'), onClick: action.onClick, key: i },\n (0, preact_1.h)(\"svg\", { width: action.svgWidth, height: action.svgHeight, viewBox: \"0 0 10 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n (0, preact_1.h)(\"path\", { \"fill-rule\": action.defaultFillRule, \"clip-rule\": action.defaultClipRule, d: action.path, fill: \"#AAAAAA\" })),\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance-menu-item-info', action.isRed && '-cbwsdk-snackbar-instance-menu-item-info-is-red') }, action.info))))))));\n};\nexports.SnackbarInstance = SnackbarInstance;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkRelayUI = void 0;\nconst cssReset_1 = require(\"../../../lib/cssReset\");\nconst LinkFlow_1 = require(\"./components/LinkFlow/LinkFlow\");\nconst Snackbar_1 = require(\"./components/Snackbar/Snackbar\");\nclass WalletLinkRelayUI {\n constructor(options) {\n this.standalone = null;\n this.attached = false;\n this.snackbar = new Snackbar_1.Snackbar({\n darkMode: options.darkMode,\n });\n this.linkFlow = new LinkFlow_1.LinkFlow({\n darkMode: options.darkMode,\n version: options.version,\n sessionId: options.session.id,\n sessionSecret: options.session.secret,\n linkAPIUrl: options.linkAPIUrl,\n isParentConnection: false,\n });\n }\n attach() {\n if (this.attached) {\n throw new Error('Coinbase Wallet SDK UI is already attached');\n }\n const el = document.documentElement;\n const container = document.createElement('div');\n container.className = '-cbwsdk-css-reset';\n el.appendChild(container);\n this.linkFlow.attach(container);\n this.snackbar.attach(container);\n this.attached = true;\n (0, cssReset_1.injectCssReset)();\n }\n setConnected(connected) {\n this.linkFlow.setConnected(connected);\n }\n setChainId(chainId) {\n this.linkFlow.setChainId(chainId);\n }\n setConnectDisabled(connectDisabled) {\n this.linkFlow.setConnectDisabled(connectDisabled);\n }\n /* istanbul ignore next */\n addEthereumChain() { } // no-op\n /* istanbul ignore next */\n watchAsset() { } // no-op\n /* istanbul ignore next */\n switchEthereumChain() { } // no-op\n requestEthereumAccounts(options) {\n this.linkFlow.open({ onCancel: options.onCancel });\n }\n hideRequestEthereumAccounts() {\n this.linkFlow.close();\n }\n /* istanbul ignore next */\n signEthereumMessage() { } // no-op\n /* istanbul ignore next */\n signEthereumTransaction() { } // no-op\n /* istanbul ignore next */\n submitEthereumTransaction() { } // no-op\n /* istanbul ignore next */\n ethereumAddressFromSignedMessage() { } // no-op\n showConnecting(options) {\n let snackbarProps;\n if (options.isUnlinkedErrorState) {\n snackbarProps = {\n autoExpand: true,\n message: 'Connection lost',\n menuItems: [\n {\n isRed: false,\n info: 'Reset connection',\n svgWidth: '10',\n svgHeight: '11',\n path: 'M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z',\n defaultFillRule: 'evenodd',\n defaultClipRule: 'evenodd',\n onClick: options.onResetConnection,\n },\n ],\n };\n }\n else {\n snackbarProps = {\n message: 'Confirm on phone',\n menuItems: [\n {\n isRed: true,\n info: 'Cancel transaction',\n svgWidth: '11',\n svgHeight: '11',\n path: 'M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z',\n defaultFillRule: 'inherit',\n defaultClipRule: 'inherit',\n onClick: options.onCancel,\n },\n {\n isRed: false,\n info: 'Reset connection',\n svgWidth: '10',\n svgHeight: '11',\n path: 'M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z',\n defaultFillRule: 'evenodd',\n defaultClipRule: 'evenodd',\n onClick: options.onResetConnection,\n },\n ],\n };\n }\n return this.snackbar.presentItem(snackbarProps);\n }\n /* istanbul ignore next */\n reloadUI() {\n document.location.reload();\n }\n /* istanbul ignore next */\n inlineAccountsResponse() {\n return false;\n }\n /* istanbul ignore next */\n inlineAddEthereumChain() {\n return false;\n }\n /* istanbul ignore next */\n inlineWatchAsset() {\n return false;\n }\n /* istanbul ignore next */\n inlineSwitchEthereumChain() {\n return false;\n }\n /* istanbul ignore next */\n setStandalone(status) {\n this.standalone = status;\n }\n /* istanbul ignore next */\n isStandalone() {\n var _a;\n return (_a = this.standalone) !== null && _a !== void 0 ? _a : false;\n }\n}\nexports.WalletLinkRelayUI = WalletLinkRelayUI;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkRelay = void 0;\nconst error_1 = require(\"../../core/error\");\nconst type_1 = require(\"../../core/type\");\nconst util_1 = require(\"../../core/util\");\nconst DiagnosticLogger_1 = require(\"../../provider/DiagnosticLogger\");\nconst RelayAbstract_1 = require(\"../RelayAbstract\");\nconst Session_1 = require(\"../Session\");\nconst WalletLinkConnection_1 = require(\"./connection/WalletLinkConnection\");\nconst Web3Response_1 = require(\"./type/Web3Response\");\nconst WalletLinkRelayUI_1 = require(\"./ui/WalletLinkRelayUI\");\nclass WalletLinkRelay extends RelayAbstract_1.RelayAbstract {\n constructor(options) {\n var _a;\n super();\n this.accountsCallback = null;\n this.chainCallbackParams = { chainId: '', jsonRpcUrl: '' }; // to implement distinctUntilChanged\n this.chainCallback = null;\n this.dappDefaultChain = 1;\n this.appName = '';\n this.appLogoUrl = null;\n this.linkedUpdated = (linked) => {\n var _a;\n this.isLinked = linked;\n const cachedAddresses = this.storage.getItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY);\n if (linked) {\n // Only set linked session variable one way\n this.session.linked = linked;\n }\n this.isUnlinkedErrorState = false;\n if (cachedAddresses) {\n const addresses = cachedAddresses.split(' ');\n const wasConnectedViaStandalone = this.storage.getItem('IsStandaloneSigning') === 'true';\n if (addresses[0] !== '' && !linked && this.session.linked && !wasConnectedViaStandalone) {\n this.isUnlinkedErrorState = true;\n const sessionIdHash = this.getSessionIdHash();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.UNLINKED_ERROR_STATE, {\n sessionIdHash,\n });\n }\n }\n };\n this.metadataUpdated = (key, value) => {\n this.storage.setItem(key, value);\n };\n this.chainUpdated = (chainId, jsonRpcUrl) => {\n if (this.chainCallbackParams.chainId === chainId &&\n this.chainCallbackParams.jsonRpcUrl === jsonRpcUrl) {\n return;\n }\n this.chainCallbackParams = {\n chainId,\n jsonRpcUrl,\n };\n if (this.chainCallback) {\n this.chainCallback(chainId, jsonRpcUrl);\n }\n };\n this.accountUpdated = (selectedAddress) => {\n if (this.accountsCallback) {\n this.accountsCallback([selectedAddress]);\n }\n if (WalletLinkRelay.accountRequestCallbackIds.size > 0) {\n // We get the ethereum address from the metadata. If for whatever\n // reason we don't get a response via an explicit web3 message\n // we can still fulfill the eip1102 request.\n Array.from(WalletLinkRelay.accountRequestCallbackIds.values()).forEach((id) => {\n const message = {\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'requestEthereumAccounts',\n result: [selectedAddress],\n },\n };\n this.invokeCallback(Object.assign(Object.assign({}, message), { id }));\n });\n WalletLinkRelay.accountRequestCallbackIds.clear();\n }\n };\n this.connectedUpdated = (connected) => {\n this.ui.setConnected(connected);\n };\n this.resetAndReload = this.resetAndReload.bind(this);\n this.linkAPIUrl = options.linkAPIUrl;\n this.storage = options.storage;\n this.options = options;\n const { session, ui, connection } = this.subscribe();\n this._session = session;\n this.connection = connection;\n this.relayEventManager = options.relayEventManager;\n this.diagnostic = options.diagnosticLogger;\n this._reloadOnDisconnect = (_a = options.reloadOnDisconnect) !== null && _a !== void 0 ? _a : true;\n this.ui = ui;\n }\n subscribe() {\n const session = Session_1.Session.load(this.storage) || new Session_1.Session(this.storage).save();\n const { linkAPIUrl, diagnostic } = this;\n const connection = new WalletLinkConnection_1.WalletLinkConnection({\n session,\n linkAPIUrl,\n diagnostic,\n listener: this,\n });\n const { version, darkMode } = this.options;\n const ui = this.options.uiConstructor({\n linkAPIUrl,\n version,\n darkMode,\n session,\n });\n connection.connect();\n return { session, ui, connection };\n }\n attachUI() {\n this.ui.attach();\n }\n resetAndReload() {\n Promise.race([\n this.connection.setSessionMetadata('__destroyed', '1'),\n new Promise((resolve) => setTimeout(() => resolve(null), 1000)),\n ])\n .then(() => {\n var _a, _b;\n const isStandalone = this.ui.isStandalone();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.SESSION_STATE_CHANGE, {\n method: 'relay::resetAndReload',\n sessionMetadataChange: '__destroyed, 1',\n sessionIdHash: this.getSessionIdHash(),\n });\n this.connection.destroy();\n /**\n * Only clear storage if the session id we have in memory matches the one on disk\n * Otherwise, in the case where we have 2 tabs, another tab might have cleared\n * storage already. In that case if we clear storage again, the user will be in\n * a state where the first tab allows the user to connect but the session that\n * was used isn't persisted. This leaves the user in a state where they aren't\n * connected to the mobile app.\n */\n const storedSession = Session_1.Session.load(this.storage);\n if ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) === this._session.id) {\n this.storage.clear();\n }\n else if (storedSession) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.SKIPPED_CLEARING_SESSION, {\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: Session_1.Session.hash(storedSession.id),\n });\n }\n if (this._reloadOnDisconnect) {\n this.ui.reloadUI();\n return;\n }\n if (this.accountsCallback) {\n this.accountsCallback([], true);\n }\n const { session, ui, connection } = this.subscribe();\n this._session = session;\n this.connection = connection;\n this.ui = ui;\n if (isStandalone && this.ui.setStandalone)\n this.ui.setStandalone(true);\n this.attachUI();\n })\n .catch((err) => {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.FAILURE, {\n method: 'relay::resetAndReload',\n message: `failed to reset and reload with ${err}`,\n sessionIdHash: this.getSessionIdHash(),\n });\n });\n }\n setAppInfo(appName, appLogoUrl) {\n this.appName = appName;\n this.appLogoUrl = appLogoUrl;\n }\n getStorageItem(key) {\n return this.storage.getItem(key);\n }\n get session() {\n return this._session;\n }\n setStorageItem(key, value) {\n this.storage.setItem(key, value);\n }\n signEthereumMessage(message, address, addPrefix, typedDataJson) {\n return this.sendRequest({\n method: 'signEthereumMessage',\n params: {\n message: (0, util_1.hexStringFromBuffer)(message, true),\n address,\n addPrefix,\n typedDataJson: typedDataJson || null,\n },\n });\n }\n ethereumAddressFromSignedMessage(message, signature, addPrefix) {\n return this.sendRequest({\n method: 'ethereumAddressFromSignedMessage',\n params: {\n message: (0, util_1.hexStringFromBuffer)(message, true),\n signature: (0, util_1.hexStringFromBuffer)(signature, true),\n addPrefix,\n },\n });\n }\n signEthereumTransaction(params) {\n return this.sendRequest({\n method: 'signEthereumTransaction',\n params: {\n fromAddress: params.fromAddress,\n toAddress: params.toAddress,\n weiValue: (0, util_1.bigIntStringFromBN)(params.weiValue),\n data: (0, util_1.hexStringFromBuffer)(params.data, true),\n nonce: params.nonce,\n gasPriceInWei: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxFeePerGas: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxPriorityFeePerGas: params.gasPriceInWei\n ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei)\n : null,\n gasLimit: params.gasLimit ? (0, util_1.bigIntStringFromBN)(params.gasLimit) : null,\n chainId: params.chainId,\n shouldSubmit: false,\n },\n });\n }\n signAndSubmitEthereumTransaction(params) {\n return this.sendRequest({\n method: 'signEthereumTransaction',\n params: {\n fromAddress: params.fromAddress,\n toAddress: params.toAddress,\n weiValue: (0, util_1.bigIntStringFromBN)(params.weiValue),\n data: (0, util_1.hexStringFromBuffer)(params.data, true),\n nonce: params.nonce,\n gasPriceInWei: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxFeePerGas: params.maxFeePerGas ? (0, util_1.bigIntStringFromBN)(params.maxFeePerGas) : null,\n maxPriorityFeePerGas: params.maxPriorityFeePerGas\n ? (0, util_1.bigIntStringFromBN)(params.maxPriorityFeePerGas)\n : null,\n gasLimit: params.gasLimit ? (0, util_1.bigIntStringFromBN)(params.gasLimit) : null,\n chainId: params.chainId,\n shouldSubmit: true,\n },\n });\n }\n submitEthereumTransaction(signedTransaction, chainId) {\n return this.sendRequest({\n method: 'submitEthereumTransaction',\n params: {\n signedTransaction: (0, util_1.hexStringFromBuffer)(signedTransaction, true),\n chainId,\n },\n });\n }\n scanQRCode(regExp) {\n return this.sendRequest({\n method: 'scanQRCode',\n params: {\n regExp,\n },\n });\n }\n getQRCodeUrl() {\n return (0, util_1.createQrUrl)(this._session.id, this._session.secret, this.linkAPIUrl, false, this.options.version, this.dappDefaultChain);\n }\n genericRequest(data, action) {\n return this.sendRequest({\n method: 'generic',\n params: {\n action,\n data,\n },\n });\n }\n sendGenericMessage(request) {\n return this.sendRequest(request);\n }\n sendRequest(request) {\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n const promise = new Promise((resolve, reject) => {\n if (!this.ui.isStandalone()) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n if (this.ui.isStandalone()) {\n this.sendRequestStandalone(id, request);\n }\n else {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n setConnectDisabled(disabled) {\n this.ui.setConnectDisabled(disabled);\n }\n setAccountsCallback(accountsCallback) {\n this.accountsCallback = accountsCallback;\n }\n setChainCallback(chainCallback) {\n this.chainCallback = chainCallback;\n }\n setDappDefaultChainCallback(chainId) {\n this.dappDefaultChain = chainId;\n if (this.ui instanceof WalletLinkRelayUI_1.WalletLinkRelayUI) {\n this.ui.setChainId(chainId);\n }\n }\n publishWeb3RequestEvent(id, request) {\n var _a;\n const message = { type: 'WEB3_REQUEST', id, request };\n const storedSession = Session_1.Session.load(this.storage);\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_REQUEST, {\n eventId: message.id,\n method: `relay::${request.method}`,\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: storedSession ? Session_1.Session.hash(storedSession.id) : '',\n isSessionMismatched: ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) !== this._session.id).toString(),\n });\n this.publishEvent('Web3Request', message, true)\n .then((_) => {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_REQUEST_PUBLISHED, {\n eventId: message.id,\n method: `relay::${request.method}`,\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: storedSession ? Session_1.Session.hash(storedSession.id) : '',\n isSessionMismatched: ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) !== this._session.id).toString(),\n });\n })\n .catch((err) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id: message.id,\n response: {\n method: request.method,\n errorMessage: err.message,\n },\n });\n });\n }\n publishWeb3RequestCanceledEvent(id) {\n const message = {\n type: 'WEB3_REQUEST_CANCELED',\n id,\n };\n this.publishEvent('Web3RequestCanceled', message, false).then();\n }\n publishEvent(event, message, callWebhook) {\n return this.connection.publishEvent(event, message, callWebhook);\n }\n handleWeb3ResponseMessage(message) {\n var _a;\n const { response } = message;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_RESPONSE, {\n eventId: message.id,\n method: `relay::${response.method}`,\n sessionIdHash: this.getSessionIdHash(),\n });\n if (response.method === 'requestEthereumAccounts') {\n WalletLinkRelay.accountRequestCallbackIds.forEach((id) => this.invokeCallback(Object.assign(Object.assign({}, message), { id })));\n WalletLinkRelay.accountRequestCallbackIds.clear();\n return;\n }\n this.invokeCallback(message);\n }\n handleErrorResponse(id, method, error, errorCode) {\n var _a;\n const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : (0, error_1.getMessageFromCode)(errorCode);\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method,\n errorMessage,\n errorCode,\n },\n });\n }\n invokeCallback(message) {\n const callback = this.relayEventManager.callbacks.get(message.id);\n if (callback) {\n callback(message.response);\n this.relayEventManager.callbacks.delete(message.id);\n }\n }\n requestEthereumAccounts() {\n const request = {\n method: 'requestEthereumAccounts',\n params: {\n appName: this.appName,\n appLogoUrl: this.appLogoUrl || null,\n },\n };\n const hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n this.ui.hideRequestEthereumAccounts();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n if (this.ui.inlineAccountsResponse()) {\n const onAccounts = (accounts) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'requestEthereumAccounts', result: accounts },\n });\n };\n this.ui.requestEthereumAccounts({\n onCancel: cancel,\n onAccounts,\n });\n }\n else {\n // Error if user closes TryExtensionLinkDialog without connecting\n const err = error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n this.ui.requestEthereumAccounts({\n onCancel: () => cancel(err),\n });\n }\n WalletLinkRelay.accountRequestCallbackIds.add(id);\n if (!this.ui.inlineAccountsResponse() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n selectProvider(providerOptions) {\n const request = {\n method: 'selectProvider',\n params: {\n providerOptions,\n },\n };\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'selectProvider', result: type_1.ProviderType.Unselected },\n });\n };\n const approve = (selectedProviderKey) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'selectProvider', result: selectedProviderKey },\n });\n };\n if (this.ui.selectProvider)\n this.ui.selectProvider({\n onApprove: approve,\n onCancel: _cancel,\n providerOptions,\n });\n });\n return { cancel, promise };\n }\n watchAsset(type, address, symbol, decimals, image, chainId) {\n const request = {\n method: 'watchAsset',\n params: {\n type,\n options: {\n address,\n symbol,\n decimals,\n image,\n },\n chainId,\n },\n };\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n if (!this.ui.inlineWatchAsset()) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'watchAsset',\n result: false,\n },\n });\n };\n const approve = () => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'watchAsset',\n result: true,\n },\n });\n };\n if (this.ui.inlineWatchAsset()) {\n this.ui.watchAsset({\n onApprove: approve,\n onCancel: _cancel,\n type,\n address,\n symbol,\n decimals,\n image,\n chainId,\n });\n }\n if (!this.ui.inlineWatchAsset() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { cancel, promise };\n }\n addEthereumChain(chainId, rpcUrls, iconUrls, blockExplorerUrls, chainName, nativeCurrency) {\n const request = {\n method: 'addEthereumChain',\n params: {\n chainId,\n rpcUrls,\n blockExplorerUrls,\n chainName,\n iconUrls,\n nativeCurrency,\n },\n };\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n if (!this.ui.inlineAddEthereumChain(chainId)) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'addEthereumChain',\n result: {\n isApproved: false,\n rpcUrl: '',\n },\n },\n });\n };\n const approve = (rpcUrl) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'addEthereumChain',\n result: {\n isApproved: true,\n rpcUrl,\n },\n },\n });\n };\n if (this.ui.inlineAddEthereumChain(chainId)) {\n this.ui.addEthereumChain({\n onCancel: _cancel,\n onApprove: approve,\n chainId: request.params.chainId,\n rpcUrls: request.params.rpcUrls,\n blockExplorerUrls: request.params.blockExplorerUrls,\n chainName: request.params.chainName,\n iconUrls: request.params.iconUrls,\n nativeCurrency: request.params.nativeCurrency,\n });\n }\n if (!this.ui.inlineAddEthereumChain(chainId) && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n switchEthereumChain(chainId, address) {\n const request = {\n method: 'switchEthereumChain',\n params: Object.assign({ chainId }, { address }),\n };\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n if ((0, Web3Response_1.isErrorResponse)(response) && response.errorCode) {\n return reject(error_1.standardErrors.provider.custom({\n code: response.errorCode,\n message: `Unrecognized chain ID. Try adding the chain using addEthereumChain first.`,\n }));\n }\n else if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (error) => {\n var _a;\n if (error) {\n // backward compatibility\n const errorCode = (_a = (0, error_1.getErrorCode)(error)) !== null && _a !== void 0 ? _a : error_1.standardErrorCodes.provider.unsupportedChain;\n this.handleErrorResponse(id, 'switchEthereumChain', error instanceof Error ? error : error_1.standardErrors.provider.unsupportedChain(chainId), errorCode);\n }\n else {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'switchEthereumChain',\n result: {\n isApproved: false,\n rpcUrl: '',\n },\n },\n });\n }\n };\n const approve = (rpcUrl) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'switchEthereumChain',\n result: {\n isApproved: true,\n rpcUrl,\n },\n },\n });\n };\n this.ui.switchEthereumChain({\n onCancel: _cancel,\n onApprove: approve,\n chainId: request.params.chainId,\n address: request.params.address,\n });\n if (!this.ui.inlineSwitchEthereumChain() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n inlineAddEthereumChain(chainId) {\n return this.ui.inlineAddEthereumChain(chainId);\n }\n getSessionIdHash() {\n return Session_1.Session.hash(this._session.id);\n }\n sendRequestStandalone(id, request) {\n const _cancel = (error) => {\n this.handleErrorResponse(id, request.method, error);\n };\n const onSuccess = (response) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response,\n });\n };\n switch (request.method) {\n case 'signEthereumMessage':\n this.ui.signEthereumMessage({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'signEthereumTransaction':\n this.ui.signEthereumTransaction({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'submitEthereumTransaction':\n this.ui.submitEthereumTransaction({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'ethereumAddressFromSignedMessage':\n this.ui.ethereumAddressFromSignedMessage({\n request,\n onSuccess,\n });\n break;\n default:\n _cancel();\n break;\n }\n }\n}\nexports.WalletLinkRelay = WalletLinkRelay;\nWalletLinkRelay.accountRequestCallbackIds = new Set();\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Snackbar\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}`)();\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RedirectDialog = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst cssReset_1 = require(\"../../../../../lib/cssReset\");\nconst Snackbar_1 = require(\"../Snackbar\");\nconst RedirectDialog_css_1 = __importDefault(require(\"./RedirectDialog-css\"));\nclass RedirectDialog {\n constructor() {\n this.root = null;\n }\n attach() {\n const el = document.documentElement;\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-css-reset';\n el.appendChild(this.root);\n (0, cssReset_1.injectCssReset)();\n }\n present(props) {\n this.render(props);\n }\n clear() {\n this.render(null);\n }\n render(props) {\n if (!this.root)\n return;\n (0, preact_1.render)(null, this.root);\n if (!props)\n return;\n (0, preact_1.render)((0, preact_1.h)(RedirectDialogContent, Object.assign({}, props, { onDismiss: () => {\n this.clear();\n } })), this.root);\n }\n}\nexports.RedirectDialog = RedirectDialog;\nconst RedirectDialogContent = ({ title, buttonText, darkMode, onButtonClick, onDismiss }) => {\n const theme = darkMode ? 'dark' : 'light';\n return ((0, preact_1.h)(Snackbar_1.SnackbarContainer, { darkMode: darkMode },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-redirect-dialog\" },\n (0, preact_1.h)(\"style\", null, RedirectDialog_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-redirect-dialog-backdrop\", onClick: onDismiss }),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-redirect-dialog-box', theme) },\n (0, preact_1.h)(\"p\", null, title),\n (0, preact_1.h)(\"button\", { onClick: onButtonClick }, buttonText)))));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MobileRelayUI = void 0;\nconst RedirectDialog_1 = require(\"../walletlink/ui/components/RedirectDialog/RedirectDialog\");\n// TODO: Implement & present in-page wallet picker instead of navigating to www.coinbase.com/connect-dapp\nclass MobileRelayUI {\n constructor(options) {\n this.attached = false;\n this.darkMode = false;\n this.openedWindow = null;\n this.redirectDialog = new RedirectDialog_1.RedirectDialog();\n this.darkMode = options.darkMode;\n }\n attach() {\n if (this.attached) {\n throw new Error('Coinbase Wallet SDK UI is already attached');\n }\n this.redirectDialog.attach();\n this.attached = true;\n }\n setConnected(_connected) { } // no-op\n closeOpenedWindow() {\n var _a;\n (_a = this.openedWindow) === null || _a === void 0 ? void 0 : _a.close();\n this.openedWindow = null;\n }\n redirectToCoinbaseWallet(walletLinkUrl) {\n const url = new URL('https://go.cb-w.com/walletlink');\n url.searchParams.append('redirect_url', window.location.href);\n if (walletLinkUrl) {\n url.searchParams.append('wl_url', walletLinkUrl);\n }\n this.openedWindow = window.open(url.href, 'cbw-opener');\n if (this.openedWindow) {\n setTimeout(() => this.closeOpenedWindow(), 5000);\n }\n }\n openCoinbaseWalletDeeplink(walletLinkUrl) {\n this.redirectDialog.present({\n title: 'Redirecting to Coinbase Wallet...',\n buttonText: 'Open',\n darkMode: this.darkMode,\n onButtonClick: () => {\n this.redirectToCoinbaseWallet(walletLinkUrl);\n },\n });\n setTimeout(() => {\n this.redirectToCoinbaseWallet(walletLinkUrl);\n }, 99);\n }\n showConnecting(_options) {\n // it uses the return callback to clear the dialog\n return () => {\n this.closeOpenedWindow();\n this.redirectDialog.clear();\n };\n }\n hideRequestEthereumAccounts() {\n this.closeOpenedWindow();\n this.redirectDialog.clear();\n }\n // -- Methods below are not needed for mobile\n requestEthereumAccounts() { } // no-op\n addEthereumChain() { } // no-op\n watchAsset() { } // no-op\n selectProvider() { } // no-op\n switchEthereumChain() { } // no-op\n signEthereumMessage() { } // no-op\n signEthereumTransaction() { } // no-op\n submitEthereumTransaction() { } // no-op\n ethereumAddressFromSignedMessage() { } // no-op\n reloadUI() { } // no-op\n setStandalone() { } // no-op\n setConnectDisabled() { } // no-op\n inlineAccountsResponse() {\n return false;\n }\n inlineAddEthereumChain() {\n return false;\n }\n inlineWatchAsset() {\n return false;\n }\n inlineSwitchEthereumChain() {\n return false;\n }\n isStandalone() {\n return false;\n }\n}\nexports.MobileRelayUI = MobileRelayUI;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MobileRelay = void 0;\nconst util_1 = require(\"../../core/util\");\nconst WalletLinkRelay_1 = require(\"../walletlink/WalletLinkRelay\");\nconst MobileRelayUI_1 = require(\"./MobileRelayUI\");\nclass MobileRelay extends WalletLinkRelay_1.WalletLinkRelay {\n constructor(options) {\n var _a;\n super(options);\n this._enableMobileWalletLink = (_a = options.enableMobileWalletLink) !== null && _a !== void 0 ? _a : false;\n }\n // override\n requestEthereumAccounts() {\n if (this._enableMobileWalletLink) {\n return super.requestEthereumAccounts();\n }\n // TODO: Implement & present in-page wallet picker instead of navigating to www.coinbase.com/connect-dapp\n return {\n promise: new Promise(() => {\n const location = (0, util_1.getLocation)();\n location.href = `https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(location.href)}`;\n }),\n cancel: () => { },\n };\n }\n // override\n publishWeb3RequestEvent(id, request) {\n super.publishWeb3RequestEvent(id, request);\n if (!(this._enableMobileWalletLink && this.ui instanceof MobileRelayUI_1.MobileRelayUI))\n return;\n let navigatedToCBW = false;\n // For mobile relay requests, open the Coinbase Wallet app\n switch (request.method) {\n case 'requestEthereumAccounts':\n case 'connectAndSignIn':\n navigatedToCBW = true;\n this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());\n break;\n case 'switchEthereumChain':\n // switchEthereumChain doesn't need to open the app\n return;\n default:\n navigatedToCBW = true;\n this.ui.openCoinbaseWalletDeeplink();\n break;\n }\n // If the user navigated to the Coinbase Wallet app, then we need to check\n // for unseen events once the user returns to the browser\n if (navigatedToCBW) {\n window.addEventListener('blur', () => {\n window.addEventListener('focus', () => {\n this.connection.checkUnseenEvents();\n }, { once: true });\n }, { once: true });\n }\n }\n // override\n handleWeb3ResponseMessage(message) {\n super.handleWeb3ResponseMessage(message);\n if (this._enableMobileWalletLink && this.ui instanceof MobileRelayUI_1.MobileRelayUI) {\n this.ui.closeOpenedWindow();\n }\n }\n connectAndSignIn(params) {\n if (!this._enableMobileWalletLink) {\n throw new Error('connectAndSignIn is supported only when enableMobileWalletLink is on');\n }\n return this.sendRequest({\n method: 'connectAndSignIn',\n params: {\n appName: this.appName,\n appLogoUrl: this.appLogoUrl,\n domain: window.location.hostname,\n aud: window.location.href,\n version: '1',\n type: 'eip4361',\n nonce: params.nonce,\n iat: new Date().toISOString(),\n chainId: `eip155:${this.dappDefaultChain}`,\n statement: params.statement,\n resources: params.resources,\n },\n });\n }\n}\nexports.MobileRelay = MobileRelay;\n","module.exports = require('events').EventEmitter;\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","const { Transform } = require('readable-stream')\n\nmodule.exports = (KeccakState) => class Keccak extends Transform {\n constructor (rate, capacity, delimitedSuffix, hashBitLength, options) {\n super(options)\n\n this._rate = rate\n this._capacity = capacity\n this._delimitedSuffix = delimitedSuffix\n this._hashBitLength = hashBitLength\n this._options = options\n\n this._state = new KeccakState()\n this._state.initialize(rate, capacity)\n this._finalized = false\n }\n\n _transform (chunk, encoding, callback) {\n let error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n _flush (callback) {\n let error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n update (data, encoding) {\n if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n this._state.absorb(data)\n\n return this\n }\n\n digest (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)\n let digest = this._state.squeeze(this._hashBitLength / 8)\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n this._resetState()\n\n return digest\n }\n\n // remove result from memory\n _resetState () {\n this._state.initialize(this._rate, this._capacity)\n return this\n }\n\n // because sometimes we need hash right now and little later\n _clone () {\n const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)\n this._state.copy(clone._state)\n clone._finalized = this._finalized\n\n return clone\n }\n}\n","const { Transform } = require('readable-stream')\n\nmodule.exports = (KeccakState) => class Shake extends Transform {\n constructor (rate, capacity, delimitedSuffix, options) {\n super(options)\n\n this._rate = rate\n this._capacity = capacity\n this._delimitedSuffix = delimitedSuffix\n this._options = options\n\n this._state = new KeccakState()\n this._state.initialize(rate, capacity)\n this._finalized = false\n }\n\n _transform (chunk, encoding, callback) {\n let error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n _flush () {}\n\n _read (size) {\n this.push(this.squeeze(size))\n }\n\n update (data, encoding) {\n if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')\n if (this._finalized) throw new Error('Squeeze already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n this._state.absorb(data)\n\n return this\n }\n\n squeeze (dataByteLength, encoding) {\n if (!this._finalized) {\n this._finalized = true\n this._state.absorbLastFewBits(this._delimitedSuffix)\n }\n\n let data = this._state.squeeze(dataByteLength)\n if (encoding !== undefined) data = data.toString(encoding)\n\n return data\n }\n\n _resetState () {\n this._state.initialize(this._rate, this._capacity)\n return this\n }\n\n _clone () {\n const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)\n this._state.copy(clone._state)\n clone._finalized = this._finalized\n\n return clone\n }\n}\n","const createKeccak = require('./keccak')\nconst createShake = require('./shake')\n\nmodule.exports = function (KeccakState) {\n const Keccak = createKeccak(KeccakState)\n const Shake = createShake(KeccakState)\n\n return function (algorithm, options) {\n const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm\n switch (hash) {\n case 'keccak224': return new Keccak(1152, 448, null, 224, options)\n case 'keccak256': return new Keccak(1088, 512, null, 256, options)\n case 'keccak384': return new Keccak(832, 768, null, 384, options)\n case 'keccak512': return new Keccak(576, 1024, null, 512, options)\n\n case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)\n case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)\n case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)\n case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)\n\n case 'shake128': return new Shake(1344, 256, 0x1f, options)\n case 'shake256': return new Shake(1088, 512, 0x1f, options)\n\n default: throw new Error('Invald algorithm: ' + algorithm)\n }\n }\n}\n","const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]\n\nexports.p1600 = function (s) {\n for (let round = 0; round < 24; ++round) {\n // theta\n const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]\n const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]\n const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]\n const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]\n const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]\n const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]\n const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]\n const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]\n const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]\n const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]\n\n let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)\n let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)\n const t1slo0 = s[0] ^ lo\n const t1shi0 = s[1] ^ hi\n const t1slo5 = s[10] ^ lo\n const t1shi5 = s[11] ^ hi\n const t1slo10 = s[20] ^ lo\n const t1shi10 = s[21] ^ hi\n const t1slo15 = s[30] ^ lo\n const t1shi15 = s[31] ^ hi\n const t1slo20 = s[40] ^ lo\n const t1shi20 = s[41] ^ hi\n lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)\n hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)\n const t1slo1 = s[2] ^ lo\n const t1shi1 = s[3] ^ hi\n const t1slo6 = s[12] ^ lo\n const t1shi6 = s[13] ^ hi\n const t1slo11 = s[22] ^ lo\n const t1shi11 = s[23] ^ hi\n const t1slo16 = s[32] ^ lo\n const t1shi16 = s[33] ^ hi\n const t1slo21 = s[42] ^ lo\n const t1shi21 = s[43] ^ hi\n lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)\n hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)\n const t1slo2 = s[4] ^ lo\n const t1shi2 = s[5] ^ hi\n const t1slo7 = s[14] ^ lo\n const t1shi7 = s[15] ^ hi\n const t1slo12 = s[24] ^ lo\n const t1shi12 = s[25] ^ hi\n const t1slo17 = s[34] ^ lo\n const t1shi17 = s[35] ^ hi\n const t1slo22 = s[44] ^ lo\n const t1shi22 = s[45] ^ hi\n lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)\n hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)\n const t1slo3 = s[6] ^ lo\n const t1shi3 = s[7] ^ hi\n const t1slo8 = s[16] ^ lo\n const t1shi8 = s[17] ^ hi\n const t1slo13 = s[26] ^ lo\n const t1shi13 = s[27] ^ hi\n const t1slo18 = s[36] ^ lo\n const t1shi18 = s[37] ^ hi\n const t1slo23 = s[46] ^ lo\n const t1shi23 = s[47] ^ hi\n lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)\n hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)\n const t1slo4 = s[8] ^ lo\n const t1shi4 = s[9] ^ hi\n const t1slo9 = s[18] ^ lo\n const t1shi9 = s[19] ^ hi\n const t1slo14 = s[28] ^ lo\n const t1shi14 = s[29] ^ hi\n const t1slo19 = s[38] ^ lo\n const t1shi19 = s[39] ^ hi\n const t1slo24 = s[48] ^ lo\n const t1shi24 = s[49] ^ hi\n\n // rho & pi\n const t2slo0 = t1slo0\n const t2shi0 = t1shi0\n const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)\n const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)\n const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)\n const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)\n const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)\n const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)\n const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)\n const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)\n const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)\n const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)\n const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)\n const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)\n const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)\n const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)\n const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)\n const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)\n const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)\n const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)\n const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)\n const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)\n const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)\n const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)\n const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)\n const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)\n const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)\n const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)\n const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)\n const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)\n const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)\n const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)\n const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)\n const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)\n const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)\n const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)\n const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)\n const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)\n const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)\n const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)\n const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)\n const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)\n const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)\n const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)\n const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)\n const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)\n const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)\n const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)\n const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)\n const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)\n\n // chi\n s[0] = t2slo0 ^ (~t2slo1 & t2slo2)\n s[1] = t2shi0 ^ (~t2shi1 & t2shi2)\n s[10] = t2slo5 ^ (~t2slo6 & t2slo7)\n s[11] = t2shi5 ^ (~t2shi6 & t2shi7)\n s[20] = t2slo10 ^ (~t2slo11 & t2slo12)\n s[21] = t2shi10 ^ (~t2shi11 & t2shi12)\n s[30] = t2slo15 ^ (~t2slo16 & t2slo17)\n s[31] = t2shi15 ^ (~t2shi16 & t2shi17)\n s[40] = t2slo20 ^ (~t2slo21 & t2slo22)\n s[41] = t2shi20 ^ (~t2shi21 & t2shi22)\n s[2] = t2slo1 ^ (~t2slo2 & t2slo3)\n s[3] = t2shi1 ^ (~t2shi2 & t2shi3)\n s[12] = t2slo6 ^ (~t2slo7 & t2slo8)\n s[13] = t2shi6 ^ (~t2shi7 & t2shi8)\n s[22] = t2slo11 ^ (~t2slo12 & t2slo13)\n s[23] = t2shi11 ^ (~t2shi12 & t2shi13)\n s[32] = t2slo16 ^ (~t2slo17 & t2slo18)\n s[33] = t2shi16 ^ (~t2shi17 & t2shi18)\n s[42] = t2slo21 ^ (~t2slo22 & t2slo23)\n s[43] = t2shi21 ^ (~t2shi22 & t2shi23)\n s[4] = t2slo2 ^ (~t2slo3 & t2slo4)\n s[5] = t2shi2 ^ (~t2shi3 & t2shi4)\n s[14] = t2slo7 ^ (~t2slo8 & t2slo9)\n s[15] = t2shi7 ^ (~t2shi8 & t2shi9)\n s[24] = t2slo12 ^ (~t2slo13 & t2slo14)\n s[25] = t2shi12 ^ (~t2shi13 & t2shi14)\n s[34] = t2slo17 ^ (~t2slo18 & t2slo19)\n s[35] = t2shi17 ^ (~t2shi18 & t2shi19)\n s[44] = t2slo22 ^ (~t2slo23 & t2slo24)\n s[45] = t2shi22 ^ (~t2shi23 & t2shi24)\n s[6] = t2slo3 ^ (~t2slo4 & t2slo0)\n s[7] = t2shi3 ^ (~t2shi4 & t2shi0)\n s[16] = t2slo8 ^ (~t2slo9 & t2slo5)\n s[17] = t2shi8 ^ (~t2shi9 & t2shi5)\n s[26] = t2slo13 ^ (~t2slo14 & t2slo10)\n s[27] = t2shi13 ^ (~t2shi14 & t2shi10)\n s[36] = t2slo18 ^ (~t2slo19 & t2slo15)\n s[37] = t2shi18 ^ (~t2shi19 & t2shi15)\n s[46] = t2slo23 ^ (~t2slo24 & t2slo20)\n s[47] = t2shi23 ^ (~t2shi24 & t2shi20)\n s[8] = t2slo4 ^ (~t2slo0 & t2slo1)\n s[9] = t2shi4 ^ (~t2shi0 & t2shi1)\n s[18] = t2slo9 ^ (~t2slo5 & t2slo6)\n s[19] = t2shi9 ^ (~t2shi5 & t2shi6)\n s[28] = t2slo14 ^ (~t2slo10 & t2slo11)\n s[29] = t2shi14 ^ (~t2shi10 & t2shi11)\n s[38] = t2slo19 ^ (~t2slo15 & t2slo16)\n s[39] = t2shi19 ^ (~t2shi15 & t2shi16)\n s[48] = t2slo24 ^ (~t2slo20 & t2slo21)\n s[49] = t2shi24 ^ (~t2shi20 & t2shi21)\n\n // iota\n s[0] ^= P1600_ROUND_CONSTANTS[round * 2]\n s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]\n }\n}\n","const keccakState = require('./keccak-state-unroll')\n\nfunction Keccak () {\n // much faster than `new Array(50)`\n this.state = [\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0\n ]\n\n this.blockSize = null\n this.count = 0\n this.squeezing = false\n}\n\nKeccak.prototype.initialize = function (rate, capacity) {\n for (let i = 0; i < 50; ++i) this.state[i] = 0\n this.blockSize = rate / 8\n this.count = 0\n this.squeezing = false\n}\n\nKeccak.prototype.absorb = function (data) {\n for (let i = 0; i < data.length; ++i) {\n this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))\n this.count += 1\n if (this.count === this.blockSize) {\n keccakState.p1600(this.state)\n this.count = 0\n }\n }\n}\n\nKeccak.prototype.absorbLastFewBits = function (bits) {\n this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))\n if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)\n this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))\n keccakState.p1600(this.state)\n this.count = 0\n this.squeezing = true\n}\n\nKeccak.prototype.squeeze = function (length) {\n if (!this.squeezing) this.absorbLastFewBits(0x01)\n\n const output = Buffer.alloc(length)\n for (let i = 0; i < length; ++i) {\n output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff\n this.count += 1\n if (this.count === this.blockSize) {\n keccakState.p1600(this.state)\n this.count = 0\n }\n }\n\n return output\n}\n\nKeccak.prototype.copy = function (dest) {\n for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]\n dest.blockSize = this.blockSize\n dest.count = this.count\n dest.squeezing = this.squeezing\n}\n\nmodule.exports = Keccak\n","module.exports = require('./lib/api')(require('./lib/keccak'))\n","// Extracted from https://github.com/ethereumjs/ethereumjs-util and stripped out irrelevant code\n// Original code licensed under the Mozilla Public License Version 2.0\n\nconst createKeccakHash = require('keccak/js')\nconst BN = require('bn.js')\n\n/**\n * Returns a buffer filled with 0s\n * @method zeros\n * @param {Number} bytes the number of bytes the buffer should be\n * @return {Buffer}\n */\nfunction zeros (bytes) {\n return Buffer.allocUnsafe(bytes).fill(0)\n}\n\n/**\n * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.\n * Or it truncates the beginning if it exceeds.\n * @method setLength\n * @param {Buffer|Array} msg the value to pad\n * @param {Number} length the number of bytes the output should be\n * @param {Boolean} [right=false] whether to start padding form the left or right\n * @return {Buffer|Array}\n */\nfunction setLength (msg, length, right) {\n const buf = zeros(length)\n msg = toBuffer(msg)\n if (right) {\n if (msg.length < length) {\n msg.copy(buf)\n return buf\n }\n return msg.slice(0, length)\n } else {\n if (msg.length < length) {\n msg.copy(buf, length - msg.length)\n return buf\n }\n return msg.slice(-length)\n }\n}\n\n/**\n * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.\n * Or it truncates the beginning if it exceeds.\n * @param {Buffer|Array} msg the value to pad\n * @param {Number} length the number of bytes the output should be\n * @return {Buffer|Array}\n */\nfunction setLengthRight (msg, length) {\n return setLength(msg, length, true)\n}\n\n/**\n * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.\n * @param {*} v the value\n */\nfunction toBuffer (v) {\n if (!Buffer.isBuffer(v)) {\n if (Array.isArray(v)) {\n v = Buffer.from(v)\n } else if (typeof v === 'string') {\n if (isHexString(v)) {\n v = Buffer.from(padToEven(stripHexPrefix(v)), 'hex')\n } else {\n v = Buffer.from(v)\n }\n } else if (typeof v === 'number') {\n v = intToBuffer(v)\n } else if (v === null || v === undefined) {\n v = Buffer.allocUnsafe(0)\n } else if (BN.isBN(v)) {\n v = v.toArrayLike(Buffer)\n } else if (v.toArray) {\n // converts a BN to a Buffer\n v = Buffer.from(v.toArray())\n } else {\n throw new Error('invalid type')\n }\n }\n return v\n}\n\n/**\n * Converts a `Buffer` into a hex `String`\n * @param {Buffer} buf\n * @return {String}\n */\nfunction bufferToHex (buf) {\n buf = toBuffer(buf)\n return '0x' + buf.toString('hex')\n}\n\n/**\n * Creates Keccak hash of the input\n * @param {Buffer|Array|String|Number} a the input data\n * @param {Number} [bits=256] the Keccak width\n * @return {Buffer}\n */\nfunction keccak (a, bits) {\n a = toBuffer(a)\n if (!bits) bits = 256\n\n return createKeccakHash('keccak' + bits).update(a).digest()\n}\n\nfunction padToEven (str) {\n return str.length % 2 ? '0' + str : str\n}\n\nfunction isHexString (str) {\n return typeof str === 'string' && str.match(/^0x[0-9A-Fa-f]*$/)\n}\n\nfunction stripHexPrefix (str) {\n if (typeof str === 'string' && str.startsWith('0x')) {\n return str.slice(2)\n }\n return str\n}\n\nmodule.exports = {\n zeros,\n setLength,\n setLengthRight,\n isHexString,\n stripHexPrefix,\n toBuffer,\n bufferToHex,\n keccak\n}\n","// Extracted from https://github.com/ethereumjs/ethereumjs-abi and stripped out irrelevant code\n// Original code licensed under the MIT License - Copyright (c) 2015 Alex Beregszaszi\n\nconst util = require('./util')\nconst BN = require('bn.js')\n\n// Convert from short to canonical names\n// FIXME: optimise or make this nicer?\nfunction elementaryName (name) {\n if (name.startsWith('int[')) {\n return 'int256' + name.slice(3)\n } else if (name === 'int') {\n return 'int256'\n } else if (name.startsWith('uint[')) {\n return 'uint256' + name.slice(4)\n } else if (name === 'uint') {\n return 'uint256'\n } else if (name.startsWith('fixed[')) {\n return 'fixed128x128' + name.slice(5)\n } else if (name === 'fixed') {\n return 'fixed128x128'\n } else if (name.startsWith('ufixed[')) {\n return 'ufixed128x128' + name.slice(6)\n } else if (name === 'ufixed') {\n return 'ufixed128x128'\n }\n return name\n}\n\n// Parse N from type\nfunction parseTypeN (type) {\n return parseInt(/^\\D+(\\d+)$/.exec(type)[1], 10)\n}\n\n// Parse N,M from typex\nfunction parseTypeNxM (type) {\n var tmp = /^\\D+(\\d+)x(\\d+)$/.exec(type)\n return [ parseInt(tmp[1], 10), parseInt(tmp[2], 10) ]\n}\n\n// Parse N in type[] where \"type\" can itself be an array type.\nfunction parseTypeArray (type) {\n var tmp = type.match(/(.*)\\[(.*?)\\]$/)\n if (tmp) {\n return tmp[2] === '' ? 'dynamic' : parseInt(tmp[2], 10)\n }\n return null\n}\n\nfunction parseNumber (arg) {\n var type = typeof arg\n if (type === 'string') {\n if (util.isHexString(arg)) {\n return new BN(util.stripHexPrefix(arg), 16)\n } else {\n return new BN(arg, 10)\n }\n } else if (type === 'number') {\n return new BN(arg)\n } else if (arg.toArray) {\n // assume this is a BN for the moment, replace with BN.isBN soon\n return arg\n } else {\n throw new Error('Argument is not a number')\n }\n}\n\n// Encodes a single item (can be dynamic array)\n// @returns: Buffer\nfunction encodeSingle (type, arg) {\n var size, num, ret, i\n\n if (type === 'address') {\n return encodeSingle('uint160', parseNumber(arg))\n } else if (type === 'bool') {\n return encodeSingle('uint8', arg ? 1 : 0)\n } else if (type === 'string') {\n return encodeSingle('bytes', new Buffer(arg, 'utf8'))\n } else if (isArray(type)) {\n // this part handles fixed-length ([2]) and variable length ([]) arrays\n // NOTE: we catch here all calls to arrays, that simplifies the rest\n if (typeof arg.length === 'undefined') {\n throw new Error('Not an array?')\n }\n size = parseTypeArray(type)\n if (size !== 'dynamic' && size !== 0 && arg.length > size) {\n throw new Error('Elements exceed array size: ' + size)\n }\n ret = []\n type = type.slice(0, type.lastIndexOf('['))\n if (typeof arg === 'string') {\n arg = JSON.parse(arg)\n }\n for (i in arg) {\n ret.push(encodeSingle(type, arg[i]))\n }\n if (size === 'dynamic') {\n var length = encodeSingle('uint256', arg.length)\n ret.unshift(length)\n }\n return Buffer.concat(ret)\n } else if (type === 'bytes') {\n arg = new Buffer(arg)\n\n ret = Buffer.concat([ encodeSingle('uint256', arg.length), arg ])\n\n if ((arg.length % 32) !== 0) {\n ret = Buffer.concat([ ret, util.zeros(32 - (arg.length % 32)) ])\n }\n\n return ret\n } else if (type.startsWith('bytes')) {\n size = parseTypeN(type)\n if (size < 1 || size > 32) {\n throw new Error('Invalid bytes width: ' + size)\n }\n\n return util.setLengthRight(arg, 32)\n } else if (type.startsWith('uint')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid uint width: ' + size)\n }\n\n num = parseNumber(arg)\n if (num.bitLength() > size) {\n throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n if (num < 0) {\n throw new Error('Supplied uint is negative')\n }\n\n return num.toArrayLike(Buffer, 'be', 32)\n } else if (type.startsWith('int')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid int width: ' + size)\n }\n\n num = parseNumber(arg)\n if (num.bitLength() > size) {\n throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n return num.toTwos(256).toArrayLike(Buffer, 'be', 32)\n } else if (type.startsWith('ufixed')) {\n size = parseTypeNxM(type)\n\n num = parseNumber(arg)\n\n if (num < 0) {\n throw new Error('Supplied ufixed is negative')\n }\n\n return encodeSingle('uint256', num.mul(new BN(2).pow(new BN(size[1]))))\n } else if (type.startsWith('fixed')) {\n size = parseTypeNxM(type)\n\n return encodeSingle('int256', parseNumber(arg).mul(new BN(2).pow(new BN(size[1]))))\n }\n\n throw new Error('Unsupported or invalid type: ' + type)\n}\n\n// Is a type dynamic?\nfunction isDynamic (type) {\n // FIXME: handle all types? I don't think anything is missing now\n return (type === 'string') || (type === 'bytes') || (parseTypeArray(type) === 'dynamic')\n}\n\n// Is a type an array?\nfunction isArray (type) {\n return type.lastIndexOf(']') === type.length - 1\n}\n\n// Encode a method/event with arguments\n// @types an array of string type names\n// @args an array of the appropriate values\nfunction rawEncode (types, values) {\n var output = []\n var data = []\n\n var headLength = 32 * types.length\n\n for (var i in types) {\n var type = elementaryName(types[i])\n var value = values[i]\n var cur = encodeSingle(type, value)\n\n // Use the head/tail method for storing dynamic data\n if (isDynamic(type)) {\n output.push(encodeSingle('uint256', headLength))\n data.push(cur)\n headLength += cur.length\n } else {\n output.push(cur)\n }\n }\n\n return Buffer.concat(output.concat(data))\n}\n\nfunction solidityPack (types, values) {\n if (types.length !== values.length) {\n throw new Error('Number of types are not matching the values')\n }\n\n var size, num\n var ret = []\n\n for (var i = 0; i < types.length; i++) {\n var type = elementaryName(types[i])\n var value = values[i]\n\n if (type === 'bytes') {\n ret.push(value)\n } else if (type === 'string') {\n ret.push(new Buffer(value, 'utf8'))\n } else if (type === 'bool') {\n ret.push(new Buffer(value ? '01' : '00', 'hex'))\n } else if (type === 'address') {\n ret.push(util.setLength(value, 20))\n } else if (type.startsWith('bytes')) {\n size = parseTypeN(type)\n if (size < 1 || size > 32) {\n throw new Error('Invalid bytes width: ' + size)\n }\n\n ret.push(util.setLengthRight(value, size))\n } else if (type.startsWith('uint')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid uint width: ' + size)\n }\n\n num = parseNumber(value)\n if (num.bitLength() > size) {\n throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n ret.push(num.toArrayLike(Buffer, 'be', size / 8))\n } else if (type.startsWith('int')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid int width: ' + size)\n }\n\n num = parseNumber(value)\n if (num.bitLength() > size) {\n throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n ret.push(num.toTwos(size).toArrayLike(Buffer, 'be', size / 8))\n } else {\n // FIXME: support all other types\n throw new Error('Unsupported or invalid type: ' + type)\n }\n }\n\n return Buffer.concat(ret)\n}\n\nfunction soliditySHA3 (types, values) {\n return util.keccak(solidityPack(types, values))\n}\n\nmodule.exports = {\n rawEncode,\n solidityPack,\n soliditySHA3\n}\n","const util = require('./util')\nconst abi = require('./abi')\n\nconst TYPED_MESSAGE_SCHEMA = {\n type: 'object',\n properties: {\n types: {\n type: 'object',\n additionalProperties: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {type: 'string'},\n type: {type: 'string'},\n },\n required: ['name', 'type'],\n },\n },\n },\n primaryType: {type: 'string'},\n domain: {type: 'object'},\n message: {type: 'object'},\n },\n required: ['types', 'primaryType', 'domain', 'message'],\n}\n\n/**\n * A collection of utility functions used for signing typed data\n */\nconst TypedDataUtils = {\n /**\n * Encodes an object by encoding and concatenating each of its members\n *\n * @param {string} primaryType - Root type\n * @param {Object} data - Object to encode\n * @param {Object} types - Type definitions\n * @returns {string} - Encoded representation of an object\n */\n encodeData (primaryType, data, types, useV4 = true) {\n const encodedTypes = ['bytes32']\n const encodedValues = [this.hashType(primaryType, types)]\n\n if(useV4) {\n const encodeField = (name, type, value) => {\n if (types[type] !== undefined) {\n return ['bytes32', value == null ?\n '0x0000000000000000000000000000000000000000000000000000000000000000' :\n util.keccak(this.encodeData(type, value, types, useV4))]\n }\n\n if(value === undefined)\n throw new Error(`missing value for field ${name} of type ${type}`)\n\n if (type === 'bytes') {\n return ['bytes32', util.keccak(value)]\n }\n\n if (type === 'string') {\n // convert string to buffer - prevents ethUtil from interpreting strings like '0xabcd' as hex\n if (typeof value === 'string') {\n value = Buffer.from(value, 'utf8')\n }\n return ['bytes32', util.keccak(value)]\n }\n\n if (type.lastIndexOf(']') === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf('['))\n const typeValuePairs = value.map(item =>\n encodeField(name, parsedType, item))\n return ['bytes32', util.keccak(abi.rawEncode(\n typeValuePairs.map(([type]) => type),\n typeValuePairs.map(([, value]) => value),\n ))]\n }\n\n return [type, value]\n }\n\n for (const field of types[primaryType]) {\n const [type, value] = encodeField(field.name, field.type, data[field.name])\n encodedTypes.push(type)\n encodedValues.push(value)\n }\n } else {\n for (const field of types[primaryType]) {\n let value = data[field.name]\n if (value !== undefined) {\n if (field.type === 'bytes') {\n encodedTypes.push('bytes32')\n value = util.keccak(value)\n encodedValues.push(value)\n } else if (field.type === 'string') {\n encodedTypes.push('bytes32')\n // convert string to buffer - prevents ethUtil from interpreting strings like '0xabcd' as hex\n if (typeof value === 'string') {\n value = Buffer.from(value, 'utf8')\n }\n value = util.keccak(value)\n encodedValues.push(value)\n } else if (types[field.type] !== undefined) {\n encodedTypes.push('bytes32')\n value = util.keccak(this.encodeData(field.type, value, types, useV4))\n encodedValues.push(value)\n } else if (field.type.lastIndexOf(']') === field.type.length - 1) {\n throw new Error('Arrays currently unimplemented in encodeData')\n } else {\n encodedTypes.push(field.type)\n encodedValues.push(value)\n }\n }\n }\n }\n\n return abi.rawEncode(encodedTypes, encodedValues)\n },\n\n /**\n * Encodes the type of an object by encoding a comma delimited list of its members\n *\n * @param {string} primaryType - Root type to encode\n * @param {Object} types - Type definitions\n * @returns {string} - Encoded representation of the type of an object\n */\n encodeType (primaryType, types) {\n let result = ''\n let deps = this.findTypeDependencies(primaryType, types).filter(dep => dep !== primaryType)\n deps = [primaryType].concat(deps.sort())\n for (const type of deps) {\n const children = types[type]\n if (!children) {\n throw new Error('No type definition specified: ' + type)\n }\n result += type + '(' + types[type].map(({ name, type }) => type + ' ' + name).join(',') + ')'\n }\n return result\n },\n\n /**\n * Finds all types within a type defintion object\n *\n * @param {string} primaryType - Root type\n * @param {Object} types - Type definitions\n * @param {Array} results - current set of accumulated types\n * @returns {Array} - Set of all types found in the type definition\n */\n findTypeDependencies (primaryType, types, results = []) {\n primaryType = primaryType.match(/^\\w*/)[0]\n if (results.includes(primaryType) || types[primaryType] === undefined) { return results }\n results.push(primaryType)\n for (const field of types[primaryType]) {\n for (const dep of this.findTypeDependencies(field.type, types, results)) {\n !results.includes(dep) && results.push(dep)\n }\n }\n return results\n },\n\n /**\n * Hashes an object\n *\n * @param {string} primaryType - Root type\n * @param {Object} data - Object to hash\n * @param {Object} types - Type definitions\n * @returns {Buffer} - Hash of an object\n */\n hashStruct (primaryType, data, types, useV4 = true) {\n return util.keccak(this.encodeData(primaryType, data, types, useV4))\n },\n\n /**\n * Hashes the type of an object\n *\n * @param {string} primaryType - Root type to hash\n * @param {Object} types - Type definitions\n * @returns {string} - Hash of an object\n */\n hashType (primaryType, types) {\n return util.keccak(this.encodeType(primaryType, types))\n },\n\n /**\n * Removes properties from a message object that are not defined per EIP-712\n *\n * @param {Object} data - typed message object\n * @returns {Object} - typed message object with only allowed fields\n */\n sanitizeData (data) {\n const sanitizedData = {}\n for (const key in TYPED_MESSAGE_SCHEMA.properties) {\n data[key] && (sanitizedData[key] = data[key])\n }\n if (sanitizedData.types) {\n sanitizedData.types = Object.assign({ EIP712Domain: [] }, sanitizedData.types)\n }\n return sanitizedData\n },\n\n /**\n * Returns the hash of a typed message as per EIP-712 for signing\n *\n * @param {Object} typedData - Types message data to sign\n * @returns {string} - sha3 hash for signing\n */\n hash (typedData, useV4 = true) {\n const sanitizedData = this.sanitizeData(typedData)\n const parts = [Buffer.from('1901', 'hex')]\n parts.push(this.hashStruct('EIP712Domain', sanitizedData.domain, sanitizedData.types, useV4))\n if (sanitizedData.primaryType !== 'EIP712Domain') {\n parts.push(this.hashStruct(sanitizedData.primaryType, sanitizedData.message, sanitizedData.types, useV4))\n }\n return util.keccak(Buffer.concat(parts))\n },\n}\n\nmodule.exports = {\n TYPED_MESSAGE_SCHEMA,\n TypedDataUtils,\n\n hashForSignTypedDataLegacy: function (msgParams) {\n return typedSignatureHashLegacy(msgParams.data)\n },\n\n hashForSignTypedData_v3: function (msgParams) {\n return TypedDataUtils.hash(msgParams.data, false)\n },\n\n hashForSignTypedData_v4: function (msgParams) {\n return TypedDataUtils.hash(msgParams.data)\n },\n}\n\n/**\n * @param typedData - Array of data along with types, as per EIP712.\n * @returns Buffer\n */\nfunction typedSignatureHashLegacy(typedData) {\n const error = new Error('Expect argument to be non-empty array')\n if (typeof typedData !== 'object' || !typedData.length) throw error\n\n const data = typedData.map(function (e) {\n return e.type === 'bytes' ? util.toBuffer(e.value) : e.value\n })\n const types = typedData.map(function (e) { return e.type })\n const schema = typedData.map(function (e) {\n if (!e.name) throw error\n return e.type + ' ' + e.name\n })\n\n return abi.soliditySHA3(\n ['bytes32', 'bytes32'],\n [\n abi.soliditySHA3(new Array(typedData.length).fill('string'), schema),\n abi.soliditySHA3(types, data)\n ]\n )\n}\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterFromParam = exports.FilterPolyfill = void 0;\nconst type_1 = require(\"../core/type\");\nconst util_1 = require(\"../core/util\");\nconst TIMEOUT = 5 * 60 * 1000; // 5 minutes\nconst JSONRPC_TEMPLATE = {\n jsonrpc: '2.0',\n id: 0,\n};\nclass FilterPolyfill {\n constructor(provider) {\n this.logFilters = new Map(); // \n this.blockFilters = new Set(); // \n this.pendingTransactionFilters = new Set(); // \n this.cursors = new Map(); // \n this.timeouts = new Map(); // \n this.nextFilterId = (0, type_1.IntNumber)(1);\n this.REQUEST_THROTTLE_INTERVAL = 1000; // in milliseconds\n this.lastFetchTimestamp = new Date(0);\n this.resolvers = [];\n this.provider = provider;\n }\n async newFilter(param) {\n const filter = filterFromParam(param);\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, filter.fromBlock);\n console.info(`Installing new log filter(${id}):`, filter, 'initial cursor position:', cursor);\n this.logFilters.set(id, filter);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n async newBlockFilter() {\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, 'latest');\n console.info(`Installing new block filter (${id}) with initial cursor position:`, cursor);\n this.blockFilters.add(id);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n async newPendingTransactionFilter() {\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, 'latest');\n console.info(`Installing new block filter (${id}) with initial cursor position:`, cursor);\n this.pendingTransactionFilters.add(id);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n uninstallFilter(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n console.info(`Uninstalling filter (${id})`);\n this.deleteFilter(id);\n return true;\n }\n getFilterChanges(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n if (this.timeouts.has(id)) {\n // extend timeout\n this.setFilterTimeout(id);\n }\n if (this.logFilters.has(id)) {\n return this.getLogFilterChanges(id);\n }\n else if (this.blockFilters.has(id)) {\n return this.getBlockFilterChanges(id);\n }\n else if (this.pendingTransactionFilters.has(id)) {\n return this.getPendingTransactionFilterChanges(id);\n }\n return Promise.resolve(filterNotFoundError());\n }\n async getFilterLogs(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n const filter = this.logFilters.get(id);\n if (!filter) {\n return filterNotFoundError();\n }\n return this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getLogs', params: [paramFromFilter(filter)] }));\n }\n makeFilterId() {\n return (0, type_1.IntNumber)(++this.nextFilterId);\n }\n sendAsyncPromise(request) {\n return new Promise((resolve, reject) => {\n this.provider.sendAsync(request, (err, response) => {\n if (err) {\n return reject(err);\n }\n if (Array.isArray(response) || response == null) {\n return reject(new Error(`unexpected response received: ${JSON.stringify(response)}`));\n }\n resolve(response);\n });\n });\n }\n deleteFilter(id) {\n console.info(`Deleting filter (${id})`);\n this.logFilters.delete(id);\n this.blockFilters.delete(id);\n this.pendingTransactionFilters.delete(id);\n this.cursors.delete(id);\n this.timeouts.delete(id);\n }\n async getLogFilterChanges(id) {\n const filter = this.logFilters.get(id);\n const cursorPosition = this.cursors.get(id);\n if (!cursorPosition || !filter) {\n return filterNotFoundError();\n }\n const currentBlockHeight = await this.getCurrentBlockHeight();\n const toBlock = filter.toBlock === 'latest' ? currentBlockHeight : filter.toBlock;\n if (cursorPosition > currentBlockHeight) {\n return emptyResult();\n }\n if (cursorPosition > Number(filter.toBlock)) {\n return emptyResult();\n }\n console.info(`Fetching logs from ${cursorPosition} to ${toBlock} for filter ${id}`);\n const response = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getLogs', params: [\n paramFromFilter(Object.assign(Object.assign({}, filter), { fromBlock: cursorPosition, toBlock })),\n ] }));\n if (Array.isArray(response.result)) {\n const blocks = response.result.map((log) => (0, util_1.intNumberFromHexString)(log.blockNumber || '0x0'));\n const highestBlock = Math.max(...blocks);\n if (highestBlock && highestBlock > cursorPosition) {\n const newCursorPosition = (0, type_1.IntNumber)(highestBlock + 1);\n console.info(`Moving cursor position for filter (${id}) from ${cursorPosition} to ${newCursorPosition}`);\n this.cursors.set(id, newCursorPosition);\n }\n }\n return response;\n }\n async getBlockFilterChanges(id) {\n const cursorPosition = this.cursors.get(id);\n if (!cursorPosition) {\n return filterNotFoundError();\n }\n const currentBlockHeight = await this.getCurrentBlockHeight();\n if (cursorPosition > currentBlockHeight) {\n return emptyResult();\n }\n console.info(`Fetching blocks from ${cursorPosition} to ${currentBlockHeight} for filter (${id})`);\n const blocks = (await Promise.all(\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n (0, util_1.range)(cursorPosition, currentBlockHeight + 1).map((i) => this.getBlockHashByNumber((0, type_1.IntNumber)(i))))).filter((hash) => !!hash);\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n const newCursorPosition = (0, type_1.IntNumber)(cursorPosition + blocks.length);\n console.info(`Moving cursor position for filter (${id}) from ${cursorPosition} to ${newCursorPosition}`);\n this.cursors.set(id, newCursorPosition);\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { result: blocks });\n }\n async getPendingTransactionFilterChanges(_id) {\n // pending transaction filters are not supported\n return Promise.resolve(emptyResult());\n }\n async setInitialCursorPosition(id, startBlock) {\n const currentBlockHeight = await this.getCurrentBlockHeight();\n const initialCursorPosition = typeof startBlock === 'number' && startBlock > currentBlockHeight\n ? startBlock\n : currentBlockHeight;\n this.cursors.set(id, initialCursorPosition);\n return initialCursorPosition;\n }\n setFilterTimeout(id) {\n const existing = this.timeouts.get(id);\n if (existing) {\n window.clearTimeout(existing);\n }\n const timeout = window.setTimeout(() => {\n console.info(`Filter (${id}) timed out`);\n this.deleteFilter(id);\n }, TIMEOUT);\n this.timeouts.set(id, timeout);\n }\n // throttle eth_blockNumber requests\n async getCurrentBlockHeight() {\n const now = new Date();\n if (now.getTime() - this.lastFetchTimestamp.getTime() > this.REQUEST_THROTTLE_INTERVAL) {\n this.lastFetchTimestamp = now;\n const height = await this._getCurrentBlockHeight();\n this.currentBlockHeight = height;\n this.resolvers.forEach((resolve) => resolve(height));\n this.resolvers = [];\n }\n if (!this.currentBlockHeight) {\n return new Promise((resolve) => this.resolvers.push(resolve));\n }\n return this.currentBlockHeight;\n }\n async _getCurrentBlockHeight() {\n const { result } = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_blockNumber', params: [] }));\n return (0, util_1.intNumberFromHexString)((0, util_1.ensureHexString)(result));\n }\n async getBlockHashByNumber(blockNumber) {\n const response = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getBlockByNumber', params: [(0, util_1.hexStringFromIntNumber)(blockNumber), false] }));\n if (response.result && typeof response.result.hash === 'string') {\n return (0, util_1.ensureHexString)(response.result.hash);\n }\n return null;\n }\n}\nexports.FilterPolyfill = FilterPolyfill;\nfunction filterFromParam(param) {\n return {\n fromBlock: intBlockHeightFromHexBlockHeight(param.fromBlock),\n toBlock: intBlockHeightFromHexBlockHeight(param.toBlock),\n addresses: param.address === undefined\n ? null\n : Array.isArray(param.address)\n ? param.address\n : [param.address],\n topics: param.topics || [],\n };\n}\nexports.filterFromParam = filterFromParam;\nfunction paramFromFilter(filter) {\n const param = {\n fromBlock: hexBlockHeightFromIntBlockHeight(filter.fromBlock),\n toBlock: hexBlockHeightFromIntBlockHeight(filter.toBlock),\n topics: filter.topics,\n };\n if (filter.addresses !== null) {\n param.address = filter.addresses;\n }\n return param;\n}\nfunction intBlockHeightFromHexBlockHeight(value) {\n if (value === undefined || value === 'latest' || value === 'pending') {\n return 'latest';\n }\n else if (value === 'earliest') {\n return (0, type_1.IntNumber)(0);\n }\n else if ((0, util_1.isHexString)(value)) {\n return (0, util_1.intNumberFromHexString)(value);\n }\n throw new Error(`Invalid block option: ${String(value)}`);\n}\nfunction hexBlockHeightFromIntBlockHeight(value) {\n if (value === 'latest') {\n return value;\n }\n return (0, util_1.hexStringFromIntNumber)(value);\n}\nfunction filterNotFoundError() {\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { error: { code: -32000, message: 'filter not found' } });\n}\nfunction emptyResult() {\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { result: [] });\n}\n","module.exports = IdIterator\n\nfunction IdIterator(opts){\n opts = opts || {}\n var max = opts.max || Number.MAX_SAFE_INTEGER\n var idCounter = typeof opts.start !== 'undefined' ? opts.start : Math.floor(Math.random() * max)\n\n return function createRandomId () {\n idCounter = idCounter % max\n return idCounter++\n }\n\n}","'use strict';\n\nconst processFn = (fn, opts) => function () {\n\tconst P = opts.promiseModule;\n\tconst args = new Array(arguments.length);\n\n\tfor (let i = 0; i < arguments.length; i++) {\n\t\targs[i] = arguments[i];\n\t}\n\n\treturn new P((resolve, reject) => {\n\t\tif (opts.errorFirst) {\n\t\t\targs.push(function (err, result) {\n\t\t\t\tif (opts.multiArgs) {\n\t\t\t\t\tconst results = new Array(arguments.length - 1);\n\n\t\t\t\t\tfor (let i = 1; i < arguments.length; i++) {\n\t\t\t\t\t\tresults[i - 1] = arguments[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tresults.unshift(err);\n\t\t\t\t\t\treject(results);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve(results);\n\t\t\t\t\t}\n\t\t\t\t} else if (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(function (result) {\n\t\t\t\tif (opts.multiArgs) {\n\t\t\t\t\tconst results = new Array(arguments.length - 1);\n\n\t\t\t\t\tfor (let i = 0; i < arguments.length; i++) {\n\t\t\t\t\t\tresults[i] = arguments[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(results);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (obj, opts) => {\n\topts = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, opts);\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn opts.include ? opts.include.some(match) : !opts.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (typeof obj === 'function') {\n\t\tret = function () {\n\t\t\tif (opts.excludeMain) {\n\t\t\t\treturn obj.apply(this, arguments);\n\t\t\t}\n\n\t\t\treturn processFn(obj, opts).apply(this, arguments);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(obj));\n\t}\n\n\tfor (const key in obj) { // eslint-disable-line guard-for-in\n\t\tconst x = obj[key];\n\t\tret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;\n\t}\n\n\treturn ret;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nfunction safeApply(handler, context, args) {\n try {\n Reflect.apply(handler, context, args);\n }\n catch (err) {\n // Throw error after timeout so as not to interrupt the stack\n setTimeout(() => {\n throw err;\n });\n }\n}\nfunction arrayClone(arr) {\n const n = arr.length;\n const copy = new Array(n);\n for (let i = 0; i < n; i += 1) {\n copy[i] = arr[i];\n }\n return copy;\n}\nclass SafeEventEmitter extends events_1.EventEmitter {\n emit(type, ...args) {\n let doError = type === 'error';\n const events = this._events;\n if (events !== undefined) {\n doError = doError && events.error === undefined;\n }\n else if (!doError) {\n return false;\n }\n // If there is no 'error' event listener then throw.\n if (doError) {\n let er;\n if (args.length > 0) {\n [er] = args;\n }\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n const err = new Error(`Unhandled error.${er ? ` (${er.message})` : ''}`);\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n const handler = events[type];\n if (handler === undefined) {\n return false;\n }\n if (typeof handler === 'function') {\n safeApply(handler, this, args);\n }\n else {\n const len = handler.length;\n const listeners = arrayClone(handler);\n for (let i = 0; i < len; i += 1) {\n safeApply(listeners[i], this, args);\n }\n }\n return true;\n }\n}\nexports.default = SafeEventEmitter;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseBlockTracker = void 0;\nconst safe_event_emitter_1 = __importDefault(require(\"@metamask/safe-event-emitter\"));\nconst sec = 1000;\nconst calculateSum = (accumulator, currentValue) => accumulator + currentValue;\nconst blockTrackerEvents = ['sync', 'latest'];\nclass BaseBlockTracker extends safe_event_emitter_1.default {\n constructor(opts) {\n super();\n // config\n this._blockResetDuration = opts.blockResetDuration || 20 * sec;\n this._usePastBlocks = opts.usePastBlocks || false;\n // state\n this._currentBlock = null;\n this._isRunning = false;\n // bind functions for internal use\n this._onNewListener = this._onNewListener.bind(this);\n this._onRemoveListener = this._onRemoveListener.bind(this);\n this._resetCurrentBlock = this._resetCurrentBlock.bind(this);\n // listen for handler changes\n this._setupInternalEvents();\n }\n async destroy() {\n this._cancelBlockResetTimeout();\n await this._maybeEnd();\n super.removeAllListeners();\n }\n isRunning() {\n return this._isRunning;\n }\n getCurrentBlock() {\n return this._currentBlock;\n }\n async getLatestBlock() {\n // return if available\n if (this._currentBlock) {\n return this._currentBlock;\n }\n // wait for a new latest block\n const latestBlock = await new Promise((resolve) => this.once('latest', resolve));\n // return newly set current block\n return latestBlock;\n }\n // dont allow module consumer to remove our internal event listeners\n removeAllListeners(eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName);\n }\n else {\n super.removeAllListeners();\n }\n // re-add internal events\n this._setupInternalEvents();\n // trigger stop check just in case\n this._onRemoveListener();\n return this;\n }\n _setupInternalEvents() {\n // first remove listeners for idempotence\n this.removeListener('newListener', this._onNewListener);\n this.removeListener('removeListener', this._onRemoveListener);\n // then add them\n this.on('newListener', this._onNewListener);\n this.on('removeListener', this._onRemoveListener);\n }\n _onNewListener(eventName) {\n // `newListener` is called *before* the listener is added\n if (blockTrackerEvents.includes(eventName)) {\n this._maybeStart();\n }\n }\n _onRemoveListener() {\n // `removeListener` is called *after* the listener is removed\n if (this._getBlockTrackerEventCount() > 0) {\n return;\n }\n this._maybeEnd();\n }\n async _maybeStart() {\n if (this._isRunning) {\n return;\n }\n this._isRunning = true;\n // cancel setting latest block to stale\n this._cancelBlockResetTimeout();\n await this._start();\n this.emit('_started');\n }\n async _maybeEnd() {\n if (!this._isRunning) {\n return;\n }\n this._isRunning = false;\n this._setupBlockResetTimeout();\n await this._end();\n this.emit('_ended');\n }\n _getBlockTrackerEventCount() {\n return blockTrackerEvents\n .map((eventName) => this.listenerCount(eventName))\n .reduce(calculateSum);\n }\n _shouldUseNewBlock(newBlock) {\n const currentBlock = this._currentBlock;\n if (!currentBlock) {\n return true;\n }\n const newBlockInt = hexToInt(newBlock);\n const currentBlockInt = hexToInt(currentBlock);\n return ((this._usePastBlocks && newBlockInt < currentBlockInt) ||\n newBlockInt > currentBlockInt);\n }\n _newPotentialLatest(newBlock) {\n if (!this._shouldUseNewBlock(newBlock)) {\n return;\n }\n this._setCurrentBlock(newBlock);\n }\n _setCurrentBlock(newBlock) {\n const oldBlock = this._currentBlock;\n this._currentBlock = newBlock;\n this.emit('latest', newBlock);\n this.emit('sync', { oldBlock, newBlock });\n }\n _setupBlockResetTimeout() {\n // clear any existing timeout\n this._cancelBlockResetTimeout();\n // clear latest block when stale\n this._blockResetTimeout = setTimeout(this._resetCurrentBlock, this._blockResetDuration);\n // nodejs - dont hold process open\n if (this._blockResetTimeout.unref) {\n this._blockResetTimeout.unref();\n }\n }\n _cancelBlockResetTimeout() {\n if (this._blockResetTimeout) {\n clearTimeout(this._blockResetTimeout);\n }\n }\n _resetCurrentBlock() {\n this._currentBlock = null;\n }\n}\nexports.BaseBlockTracker = BaseBlockTracker;\n/**\n * Converts a number represented as a string in hexadecimal format into a native\n * number.\n *\n * @param hexInt - The hex string.\n * @returns The number.\n */\nfunction hexToInt(hexInt) {\n return Number.parseInt(hexInt, 16);\n}\n//# sourceMappingURL=BaseBlockTracker.js.map","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\nfunction print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\nfunction shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n }\n else if (result === false) {\n result = {};\n }\n else if (typeof result === 'string') {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\nfunction* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const ctx = { path, branch };\n if (coerce) {\n value = struct.coercer(value, ctx);\n if (mask &&\n struct.type !== 'type' &&\n isObject(struct.schema) &&\n isObject(value) &&\n !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n let status = 'valid';\n for (const failure of struct.validator(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask,\n message: options.message,\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? 'not_refined' : 'not_valid';\n yield [t[0], undefined];\n }\n else if (coerce) {\n v = t[1];\n if (k === undefined) {\n value = v;\n }\n else if (value instanceof Map) {\n value.set(k, v);\n }\n else if (value instanceof Set) {\n value.add(v);\n }\n else if (isObject(value)) {\n if (v !== undefined || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nclass Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () { }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\nfunction assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\nfunction create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\nfunction mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n }\n else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const isType = Structs[0].type === 'type';\n const schemas = Structs.map((s) => s.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\nfunction define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\nfunction deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\nfunction omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\nfunction partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\nfunction pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n */\nfunction bigint() {\n return define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\nfunction boolean() {\n return define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\nfunction date() {\n return define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map((v) => print(v)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n */\nfunction func() {\n return define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\nfunction instance(Class) {\n return define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\nfunction integer() {\n return define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n */\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n },\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\nfunction nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n */\nfunction number() {\n return define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\nfunction optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\nfunction regexp() {\n return define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n */\nfunction string() {\n return define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n */\nfunction tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\nfunction union(Structs) {\n const description = Structs.map((s) => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, { coerce: true });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n }\n else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (x) => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n if (x === undefined) {\n return f;\n }\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x };\n let changed = false;\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction trimmed(struct) {\n return coerce(struct, string(), (x) => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\nfunction empty(struct) {\n return refine(struct, 'empty', (value) => {\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n else {\n return value.length;\n }\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\nfunction max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\nfunction min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n */\nfunction nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\nfunction size(struct, min, max = min) {\n const expected = `Expected a ${struct.type}`;\n const of = min === max ? `of \\`${min}\\`` : `between \\`${min}\\` and \\`${max}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((min <= value && value <= max) ||\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n const { size } = value;\n return ((min <= size && size <= max) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n else {\n const { length } = value;\n return ((min <= length && length <= max) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\nfunction refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, bigint, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nonempty, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.mjs.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertExhaustive = exports.assertStruct = exports.assert = exports.AssertionError = void 0;\nconst superstruct_1 = require(\"superstruct\");\n/**\n * Type guard for determining whether the given value is an error object with a\n * `message` property, such as an instance of Error.\n *\n * @param error - The object to check.\n * @returns True or false, depending on the result.\n */\nfunction isErrorWithMessage(error) {\n return typeof error === 'object' && error !== null && 'message' in error;\n}\n/**\n * Check if a value is a constructor, i.e., a function that can be called with\n * the `new` keyword.\n *\n * @param fn - The value to check.\n * @returns `true` if the value is a constructor, or `false` otherwise.\n */\nfunction isConstructable(fn) {\n var _a, _b;\n /* istanbul ignore next */\n return Boolean(typeof ((_b = (_a = fn === null || fn === void 0 ? void 0 : fn.prototype) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'string');\n}\n/**\n * Get the error message from an unknown error object. If the error object has\n * a `message` property, that property is returned. Otherwise, the stringified\n * error object is returned.\n *\n * @param error - The error object to get the message from.\n * @returns The error message.\n */\nfunction getErrorMessage(error) {\n const message = isErrorWithMessage(error) ? error.message : String(error);\n // If the error ends with a period, remove it, as we'll add our own period.\n if (message.endsWith('.')) {\n return message.slice(0, -1);\n }\n return message;\n}\n/**\n * Initialise an {@link AssertionErrorConstructor} error.\n *\n * @param ErrorWrapper - The error class to use.\n * @param message - The error message.\n * @returns The error object.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction getError(ErrorWrapper, message) {\n if (isConstructable(ErrorWrapper)) {\n return new ErrorWrapper({\n message,\n });\n }\n return ErrorWrapper({\n message,\n });\n}\n/**\n * The default error class that is thrown if an assertion fails.\n */\nclass AssertionError extends Error {\n constructor(options) {\n super(options.message);\n this.code = 'ERR_ASSERTION';\n }\n}\nexports.AssertionError = AssertionError;\n/**\n * Same as Node.js assert.\n * If the value is falsy, throws an error, does nothing otherwise.\n *\n * @throws {@link AssertionError} If value is falsy.\n * @param value - The test that should be truthy to pass.\n * @param message - Message to be passed to {@link AssertionError} or an\n * {@link Error} instance to throw.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}. If a custom error class is provided for\n * the `message` argument, this argument is ignored.\n */\nfunction assert(value, message = 'Assertion failed.', \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper = AssertionError) {\n if (!value) {\n if (message instanceof Error) {\n throw message;\n }\n throw getError(ErrorWrapper, message);\n }\n}\nexports.assert = assert;\n/**\n * Assert a value against a Superstruct struct.\n *\n * @param value - The value to validate.\n * @param struct - The struct to validate against.\n * @param errorPrefix - A prefix to add to the error message. Defaults to\n * \"Assertion failed\".\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the value is not valid.\n */\nfunction assertStruct(value, struct, errorPrefix = 'Assertion failed', \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper = AssertionError) {\n try {\n (0, superstruct_1.assert)(value, struct);\n }\n catch (error) {\n throw getError(ErrorWrapper, `${errorPrefix}: ${getErrorMessage(error)}.`);\n }\n}\nexports.assertStruct = assertStruct;\n/**\n * Use in the default case of a switch that you want to be fully exhaustive.\n * Using this function forces the compiler to enforce exhaustivity during\n * compile-time.\n *\n * @example\n * ```\n * const number = 1;\n * switch (number) {\n * case 0:\n * ...\n * case 1:\n * ...\n * default:\n * assertExhaustive(snapPrefix);\n * }\n * ```\n * @param _object - The object on which the switch is being operated.\n */\nfunction assertExhaustive(_object) {\n throw new Error('Invalid branch reached. Should be detected during compilation.');\n}\nexports.assertExhaustive = assertExhaustive;\n//# sourceMappingURL=assert.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64 = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * Ensure that a provided string-based struct is valid base64.\n *\n * @param struct - The string based struct.\n * @param options - Optional options to specialize base64 validation. See {@link Base64Options} documentation.\n * @returns A superstruct validating base64.\n */\nconst base64 = (struct, options = {}) => {\n var _a, _b;\n const paddingRequired = (_a = options.paddingRequired) !== null && _a !== void 0 ? _a : false;\n const characterSet = (_b = options.characterSet) !== null && _b !== void 0 ? _b : 'base64';\n let letters;\n if (characterSet === 'base64') {\n letters = String.raw `[A-Za-z0-9+\\/]`;\n }\n else {\n (0, assert_1.assert)(characterSet === 'base64url');\n letters = String.raw `[-_A-Za-z0-9]`;\n }\n let re;\n if (paddingRequired) {\n re = new RegExp(`^(?:${letters}{4})*(?:${letters}{3}=|${letters}{2}==)?$`, 'u');\n }\n else {\n re = new RegExp(`^(?:${letters}{4})*(?:${letters}{2,3}|${letters}{3}=|${letters}{2}==)?$`, 'u');\n }\n return (0, superstruct_1.pattern)(struct, re);\n};\nexports.base64 = base64;\n//# sourceMappingURL=base64.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.remove0x = exports.add0x = exports.assertIsStrictHexString = exports.assertIsHexString = exports.isStrictHexString = exports.isHexString = exports.StrictHexStruct = exports.HexStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\nexports.HexStruct = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^(?:0x)?[0-9a-f]+$/iu);\nexports.StrictHexStruct = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^0x[0-9a-f]+$/iu);\n/**\n * Check if a string is a valid hex string.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid hex string.\n */\nfunction isHexString(value) {\n return (0, superstruct_1.is)(value, exports.HexStruct);\n}\nexports.isHexString = isHexString;\n/**\n * Strictly check if a string is a valid hex string. A valid hex string must\n * start with the \"0x\"-prefix.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid hex string.\n */\nfunction isStrictHexString(value) {\n return (0, superstruct_1.is)(value, exports.StrictHexStruct);\n}\nexports.isStrictHexString = isStrictHexString;\n/**\n * Assert that a value is a valid hex string.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid hex string.\n */\nfunction assertIsHexString(value) {\n (0, assert_1.assert)(isHexString(value), 'Value must be a hexadecimal string.');\n}\nexports.assertIsHexString = assertIsHexString;\n/**\n * Assert that a value is a valid hex string. A valid hex string must start with\n * the \"0x\"-prefix.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid hex string.\n */\nfunction assertIsStrictHexString(value) {\n (0, assert_1.assert)(isStrictHexString(value), 'Value must be a hexadecimal string, starting with \"0x\".');\n}\nexports.assertIsStrictHexString = assertIsStrictHexString;\n/**\n * Add the `0x`-prefix to a hexadecimal string. If the string already has the\n * prefix, it is returned as-is.\n *\n * @param hexadecimal - The hexadecimal string to add the prefix to.\n * @returns The prefixed hexadecimal string.\n */\nfunction add0x(hexadecimal) {\n if (hexadecimal.startsWith('0x')) {\n return hexadecimal;\n }\n if (hexadecimal.startsWith('0X')) {\n return `0x${hexadecimal.substring(2)}`;\n }\n return `0x${hexadecimal}`;\n}\nexports.add0x = add0x;\n/**\n * Remove the `0x`-prefix from a hexadecimal string. If the string doesn't have\n * the prefix, it is returned as-is.\n *\n * @param hexadecimal - The hexadecimal string to remove the prefix from.\n * @returns The un-prefixed hexadecimal string.\n */\nfunction remove0x(hexadecimal) {\n if (hexadecimal.startsWith('0x') || hexadecimal.startsWith('0X')) {\n return hexadecimal.substring(2);\n }\n return hexadecimal;\n}\nexports.remove0x = remove0x;\n//# sourceMappingURL=hex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDataView = exports.concatBytes = exports.valueToBytes = exports.stringToBytes = exports.numberToBytes = exports.signedBigIntToBytes = exports.bigIntToBytes = exports.hexToBytes = exports.bytesToString = exports.bytesToNumber = exports.bytesToSignedBigInt = exports.bytesToBigInt = exports.bytesToHex = exports.assertIsBytes = exports.isBytes = void 0;\nconst assert_1 = require(\"./assert\");\nconst hex_1 = require(\"./hex\");\n// '0'.charCodeAt(0) === 48\nconst HEX_MINIMUM_NUMBER_CHARACTER = 48;\n// '9'.charCodeAt(0) === 57\nconst HEX_MAXIMUM_NUMBER_CHARACTER = 58;\nconst HEX_CHARACTER_OFFSET = 87;\n/**\n * Memoized function that returns an array to be used as a lookup table for\n * converting bytes to hexadecimal values.\n *\n * The array is created lazily and then cached for future use. The benefit of\n * this approach is that the performance of converting bytes to hex is much\n * better than if we were to call `toString(16)` on each byte.\n *\n * The downside is that the array is created once and then never garbage\n * collected. This is not a problem in practice because the array is only 256\n * elements long.\n *\n * @returns A function that returns the lookup table.\n */\nfunction getPrecomputedHexValuesBuilder() {\n // To avoid issues with tree shaking, we need to use a function to return the\n // array. This is because the array is only used in the `bytesToHex` function\n // and if we were to use a global variable, the array might be removed by the\n // tree shaker.\n const lookupTable = [];\n return () => {\n if (lookupTable.length === 0) {\n for (let i = 0; i < 256; i++) {\n lookupTable.push(i.toString(16).padStart(2, '0'));\n }\n }\n return lookupTable;\n };\n}\n/**\n * Function implementation of the {@link getPrecomputedHexValuesBuilder}\n * function.\n */\nconst getPrecomputedHexValues = getPrecomputedHexValuesBuilder();\n/**\n * Check if a value is a `Uint8Array`.\n *\n * @param value - The value to check.\n * @returns Whether the value is a `Uint8Array`.\n */\nfunction isBytes(value) {\n return value instanceof Uint8Array;\n}\nexports.isBytes = isBytes;\n/**\n * Assert that a value is a `Uint8Array`.\n *\n * @param value - The value to check.\n * @throws If the value is not a `Uint8Array`.\n */\nfunction assertIsBytes(value) {\n (0, assert_1.assert)(isBytes(value), 'Value must be a Uint8Array.');\n}\nexports.assertIsBytes = assertIsBytes;\n/**\n * Convert a `Uint8Array` to a hexadecimal string.\n *\n * @param bytes - The bytes to convert to a hexadecimal string.\n * @returns The hexadecimal string.\n */\nfunction bytesToHex(bytes) {\n assertIsBytes(bytes);\n if (bytes.length === 0) {\n return '0x';\n }\n const lookupTable = getPrecomputedHexValues();\n const hexadecimal = new Array(bytes.length);\n for (let i = 0; i < bytes.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n hexadecimal[i] = lookupTable[bytes[i]];\n }\n return (0, hex_1.add0x)(hexadecimal.join(''));\n}\nexports.bytesToHex = bytesToHex;\n/**\n * Convert a `Uint8Array` to a `bigint`.\n *\n * To convert a `Uint8Array` to a `number` instead, use {@link bytesToNumber}.\n * To convert a two's complement encoded `Uint8Array` to a `bigint`, use\n * {@link bytesToSignedBigInt}.\n *\n * @param bytes - The bytes to convert to a `bigint`.\n * @returns The `bigint`.\n */\nfunction bytesToBigInt(bytes) {\n assertIsBytes(bytes);\n const hexadecimal = bytesToHex(bytes);\n return BigInt(hexadecimal);\n}\nexports.bytesToBigInt = bytesToBigInt;\n/**\n * Convert a `Uint8Array` to a signed `bigint`. This assumes that the bytes are\n * encoded in two's complement.\n *\n * To convert a `Uint8Array` to an unsigned `bigint` instead, use\n * {@link bytesToBigInt}.\n *\n * @see https://en.wikipedia.org/wiki/Two%27s_complement\n * @param bytes - The bytes to convert to a signed `bigint`.\n * @returns The signed `bigint`.\n */\nfunction bytesToSignedBigInt(bytes) {\n assertIsBytes(bytes);\n let value = BigInt(0);\n for (const byte of bytes) {\n // eslint-disable-next-line no-bitwise\n value = (value << BigInt(8)) + BigInt(byte);\n }\n return BigInt.asIntN(bytes.length * 8, value);\n}\nexports.bytesToSignedBigInt = bytesToSignedBigInt;\n/**\n * Convert a `Uint8Array` to a `number`.\n *\n * To convert a `Uint8Array` to a `bigint` instead, use {@link bytesToBigInt}.\n *\n * @param bytes - The bytes to convert to a number.\n * @returns The number.\n * @throws If the resulting number is not a safe integer.\n */\nfunction bytesToNumber(bytes) {\n assertIsBytes(bytes);\n const bigint = bytesToBigInt(bytes);\n (0, assert_1.assert)(bigint <= BigInt(Number.MAX_SAFE_INTEGER), 'Number is not a safe integer. Use `bytesToBigInt` instead.');\n return Number(bigint);\n}\nexports.bytesToNumber = bytesToNumber;\n/**\n * Convert a UTF-8 encoded `Uint8Array` to a `string`.\n *\n * @param bytes - The bytes to convert to a string.\n * @returns The string.\n */\nfunction bytesToString(bytes) {\n assertIsBytes(bytes);\n return new TextDecoder().decode(bytes);\n}\nexports.bytesToString = bytesToString;\n/**\n * Convert a hexadecimal string to a `Uint8Array`. The string can optionally be\n * prefixed with `0x`. It accepts even and odd length strings.\n *\n * If the value is \"0x\", an empty `Uint8Array` is returned.\n *\n * @param value - The hexadecimal string to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction hexToBytes(value) {\n var _a;\n // \"0x\" is often used as empty byte array.\n if (((_a = value === null || value === void 0 ? void 0 : value.toLowerCase) === null || _a === void 0 ? void 0 : _a.call(value)) === '0x') {\n return new Uint8Array();\n }\n (0, hex_1.assertIsHexString)(value);\n // Remove the `0x` prefix if it exists, and pad the string to have an even\n // number of characters.\n const strippedValue = (0, hex_1.remove0x)(value).toLowerCase();\n const normalizedValue = strippedValue.length % 2 === 0 ? strippedValue : `0${strippedValue}`;\n const bytes = new Uint8Array(normalizedValue.length / 2);\n for (let i = 0; i < bytes.length; i++) {\n // While this is not the prettiest way to convert a hexadecimal string to a\n // `Uint8Array`, it is a lot faster than using `parseInt` to convert each\n // character.\n const c1 = normalizedValue.charCodeAt(i * 2);\n const c2 = normalizedValue.charCodeAt(i * 2 + 1);\n const n1 = c1 -\n (c1 < HEX_MAXIMUM_NUMBER_CHARACTER\n ? HEX_MINIMUM_NUMBER_CHARACTER\n : HEX_CHARACTER_OFFSET);\n const n2 = c2 -\n (c2 < HEX_MAXIMUM_NUMBER_CHARACTER\n ? HEX_MINIMUM_NUMBER_CHARACTER\n : HEX_CHARACTER_OFFSET);\n bytes[i] = n1 * 16 + n2;\n }\n return bytes;\n}\nexports.hexToBytes = hexToBytes;\n/**\n * Convert a `bigint` to a `Uint8Array`.\n *\n * This assumes that the `bigint` is an unsigned integer. To convert a signed\n * `bigint` instead, use {@link signedBigIntToBytes}.\n *\n * @param value - The bigint to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction bigIntToBytes(value) {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(value >= BigInt(0), 'Value must be a non-negative bigint.');\n const hexadecimal = value.toString(16);\n return hexToBytes(hexadecimal);\n}\nexports.bigIntToBytes = bigIntToBytes;\n/**\n * Check if a `bigint` fits in a certain number of bytes.\n *\n * @param value - The `bigint` to check.\n * @param bytes - The number of bytes.\n * @returns Whether the `bigint` fits in the number of bytes.\n */\nfunction bigIntFits(value, bytes) {\n (0, assert_1.assert)(bytes > 0);\n /* eslint-disable no-bitwise */\n const mask = value >> BigInt(31);\n return !(((~value & mask) + (value & ~mask)) >> BigInt(bytes * 8 + ~0));\n /* eslint-enable no-bitwise */\n}\n/**\n * Convert a signed `bigint` to a `Uint8Array`. This uses two's complement\n * encoding to represent negative numbers.\n *\n * To convert an unsigned `bigint` to a `Uint8Array` instead, use\n * {@link bigIntToBytes}.\n *\n * @see https://en.wikipedia.org/wiki/Two%27s_complement\n * @param value - The number to convert to bytes.\n * @param byteLength - The length of the resulting `Uint8Array`. If the number\n * is larger than the maximum value that can be represented by the given length,\n * an error is thrown.\n * @returns The bytes as `Uint8Array`.\n */\nfunction signedBigIntToBytes(value, byteLength) {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(typeof byteLength === 'number', 'Byte length must be a number.');\n (0, assert_1.assert)(byteLength > 0, 'Byte length must be greater than 0.');\n (0, assert_1.assert)(bigIntFits(value, byteLength), 'Byte length is too small to represent the given value.');\n // ESLint doesn't like mutating function parameters, so to avoid having to\n // disable the rule, we create a new variable.\n let numberValue = value;\n const bytes = new Uint8Array(byteLength);\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = Number(BigInt.asUintN(8, numberValue));\n // eslint-disable-next-line no-bitwise\n numberValue >>= BigInt(8);\n }\n return bytes.reverse();\n}\nexports.signedBigIntToBytes = signedBigIntToBytes;\n/**\n * Convert a `number` to a `Uint8Array`.\n *\n * @param value - The number to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n * @throws If the number is not a safe integer.\n */\nfunction numberToBytes(value) {\n (0, assert_1.assert)(typeof value === 'number', 'Value must be a number.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative number.');\n (0, assert_1.assert)(Number.isSafeInteger(value), 'Value is not a safe integer. Use `bigIntToBytes` instead.');\n const hexadecimal = value.toString(16);\n return hexToBytes(hexadecimal);\n}\nexports.numberToBytes = numberToBytes;\n/**\n * Convert a `string` to a UTF-8 encoded `Uint8Array`.\n *\n * @param value - The string to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction stringToBytes(value) {\n (0, assert_1.assert)(typeof value === 'string', 'Value must be a string.');\n return new TextEncoder().encode(value);\n}\nexports.stringToBytes = stringToBytes;\n/**\n * Convert a byte-like value to a `Uint8Array`. The value can be a `Uint8Array`,\n * a `bigint`, a `number`, or a `string`.\n *\n * This will attempt to guess the type of the value based on its type and\n * contents. For more control over the conversion, use the more specific\n * conversion functions, such as {@link hexToBytes} or {@link stringToBytes}.\n *\n * If the value is a `string`, and it is prefixed with `0x`, it will be\n * interpreted as a hexadecimal string. Otherwise, it will be interpreted as a\n * UTF-8 string. To convert a hexadecimal string to bytes without interpreting\n * it as a UTF-8 string, use {@link hexToBytes} instead.\n *\n * If the value is a `bigint`, it is assumed to be unsigned. To convert a signed\n * `bigint` to bytes, use {@link signedBigIntToBytes} instead.\n *\n * If the value is a `Uint8Array`, it will be returned as-is.\n *\n * @param value - The value to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction valueToBytes(value) {\n if (typeof value === 'bigint') {\n return bigIntToBytes(value);\n }\n if (typeof value === 'number') {\n return numberToBytes(value);\n }\n if (typeof value === 'string') {\n if (value.startsWith('0x')) {\n return hexToBytes(value);\n }\n return stringToBytes(value);\n }\n if (isBytes(value)) {\n return value;\n }\n throw new TypeError(`Unsupported value type: \"${typeof value}\".`);\n}\nexports.valueToBytes = valueToBytes;\n/**\n * Concatenate multiple byte-like values into a single `Uint8Array`. The values\n * can be `Uint8Array`, `bigint`, `number`, or `string`. This uses\n * {@link valueToBytes} under the hood to convert each value to bytes. Refer to\n * the documentation of that function for more information.\n *\n * @param values - The values to concatenate.\n * @returns The concatenated bytes as `Uint8Array`.\n */\nfunction concatBytes(values) {\n const normalizedValues = new Array(values.length);\n let byteLength = 0;\n for (let i = 0; i < values.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const value = valueToBytes(values[i]);\n normalizedValues[i] = value;\n byteLength += value.length;\n }\n const bytes = new Uint8Array(byteLength);\n for (let i = 0, offset = 0; i < normalizedValues.length; i++) {\n // While we could simply spread the values into an array and use\n // `Uint8Array.from`, that is a lot slower than using `Uint8Array.set`.\n bytes.set(normalizedValues[i], offset);\n offset += normalizedValues[i].length;\n }\n return bytes;\n}\nexports.concatBytes = concatBytes;\n/**\n * Create a {@link DataView} from a {@link Uint8Array}. This is a convenience\n * function that avoids having to create a {@link DataView} manually, which\n * requires passing the `byteOffset` and `byteLength` parameters every time.\n *\n * Not passing the `byteOffset` and `byteLength` parameters can result in\n * unexpected behavior when the {@link Uint8Array} is a view of a larger\n * {@link ArrayBuffer}, e.g., when using {@link Uint8Array.subarray}.\n *\n * This function also supports Node.js {@link Buffer}s.\n *\n * @example\n * ```typescript\n * const bytes = new Uint8Array([1, 2, 3]);\n *\n * // This is equivalent to:\n * // const dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n * const dataView = createDataView(bytes);\n * ```\n * @param bytes - The bytes to create the {@link DataView} from.\n * @returns The {@link DataView}.\n */\nfunction createDataView(bytes) {\n // To maintain compatibility with Node.js, we need to check if the bytes are\n // a Buffer. If so, we need to slice the buffer to get the underlying\n // ArrayBuffer.\n // eslint-disable-next-line no-restricted-globals\n if (typeof Buffer !== 'undefined' && bytes instanceof Buffer) {\n const buffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);\n return new DataView(buffer);\n }\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n}\nexports.createDataView = createDataView;\n//# sourceMappingURL=bytes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst base64_1 = require(\"./base64\");\nexports.ChecksumStruct = (0, superstruct_1.size)((0, base64_1.base64)((0, superstruct_1.string)(), { paddingRequired: true }), 44, 44);\n//# sourceMappingURL=checksum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHex = exports.createBytes = exports.createBigInt = exports.createNumber = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\nconst bytes_1 = require(\"./bytes\");\nconst hex_1 = require(\"./hex\");\nconst NumberLikeStruct = (0, superstruct_1.union)([(0, superstruct_1.number)(), (0, superstruct_1.bigint)(), (0, superstruct_1.string)(), hex_1.StrictHexStruct]);\nconst NumberCoercer = (0, superstruct_1.coerce)((0, superstruct_1.number)(), NumberLikeStruct, Number);\nconst BigIntCoercer = (0, superstruct_1.coerce)((0, superstruct_1.bigint)(), NumberLikeStruct, BigInt);\nconst BytesLikeStruct = (0, superstruct_1.union)([hex_1.StrictHexStruct, (0, superstruct_1.instance)(Uint8Array)]);\nconst BytesCoercer = (0, superstruct_1.coerce)((0, superstruct_1.instance)(Uint8Array), (0, superstruct_1.union)([hex_1.StrictHexStruct]), bytes_1.hexToBytes);\nconst HexCoercer = (0, superstruct_1.coerce)(hex_1.StrictHexStruct, (0, superstruct_1.instance)(Uint8Array), bytes_1.bytesToHex);\n/**\n * Create a number from a number-like value.\n *\n * - If the value is a number, it is returned as-is.\n * - If the value is a `bigint`, it is converted to a number.\n * - If the value is a string, it is interpreted as a decimal number.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is\n * interpreted as a hexadecimal number.\n *\n * This validates that the value is a number-like value, and that the resulting\n * number is not `NaN` or `Infinity`.\n *\n * @example\n * ```typescript\n * const value = createNumber('0x010203');\n * console.log(value); // 66051\n *\n * const otherValue = createNumber(123n);\n * console.log(otherValue); // 123\n * ```\n * @param value - The value to create the number from.\n * @returns The created number.\n * @throws If the value is not a number-like value, or if the resulting number\n * is `NaN` or `Infinity`.\n */\nfunction createNumber(value) {\n try {\n const result = (0, superstruct_1.create)(value, NumberCoercer);\n (0, assert_1.assert)(Number.isFinite(result), `Expected a number-like value, got \"${value}\".`);\n return result;\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a number-like value, got \"${value}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createNumber = createNumber;\n/**\n * Create a `bigint` from a number-like value.\n *\n * - If the value is a number, it is converted to a `bigint`.\n * - If the value is a `bigint`, it is returned as-is.\n * - If the value is a string, it is interpreted as a decimal number and\n * converted to a `bigint`.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is\n * interpreted as a hexadecimal number and converted to a `bigint`.\n *\n * @example\n * ```typescript\n * const value = createBigInt('0x010203');\n * console.log(value); // 16909060n\n *\n * const otherValue = createBigInt(123);\n * console.log(otherValue); // 123n\n * ```\n * @param value - The value to create the bigint from.\n * @returns The created bigint.\n * @throws If the value is not a number-like value.\n */\nfunction createBigInt(value) {\n try {\n // The `BigInt` constructor throws if the value is not a number-like value.\n // There is no need to validate the value manually.\n return (0, superstruct_1.create)(value, BigIntCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a number-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createBigInt = createBigInt;\n/**\n * Create a byte array from a bytes-like value.\n *\n * - If the value is a byte array, it is returned as-is.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is interpreted\n * as a hexadecimal number and converted to a byte array.\n *\n * @example\n * ```typescript\n * const value = createBytes('0x010203');\n * console.log(value); // Uint8Array [ 1, 2, 3 ]\n *\n * const otherValue = createBytes('0x010203');\n * console.log(otherValue); // Uint8Array [ 1, 2, 3 ]\n * ```\n * @param value - The value to create the byte array from.\n * @returns The created byte array.\n * @throws If the value is not a bytes-like value.\n */\nfunction createBytes(value) {\n if (typeof value === 'string' && value.toLowerCase() === '0x') {\n return new Uint8Array();\n }\n try {\n return (0, superstruct_1.create)(value, BytesCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a bytes-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createBytes = createBytes;\n/**\n * Create a hexadecimal string from a bytes-like value.\n *\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is returned\n * as-is.\n * - If the value is a `Uint8Array`, it is converted to a hex string.\n *\n * @example\n * ```typescript\n * const value = createHex(new Uint8Array([1, 2, 3]));\n * console.log(value); // '0x010203'\n *\n * const otherValue = createHex('0x010203');\n * console.log(otherValue); // '0x010203'\n * ```\n * @param value - The value to create the hex string from.\n * @returns The created hex string.\n * @throws If the value is not a bytes-like value.\n */\nfunction createHex(value) {\n if ((value instanceof Uint8Array && value.length === 0) ||\n (typeof value === 'string' && value.toLowerCase() === '0x')) {\n return '0x';\n }\n try {\n return (0, superstruct_1.create)(value, HexCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a bytes-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createHex = createHex;\n//# sourceMappingURL=coercers.js.map","\"use strict\";\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _FrozenMap_map, _FrozenSet_set;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FrozenSet = exports.FrozenMap = void 0;\n/**\n * A {@link ReadonlyMap} that cannot be modified after instantiation.\n * The implementation uses an inner map hidden via a private field, and the\n * immutability guarantee relies on it being impossible to get a reference\n * to this map.\n */\nclass FrozenMap {\n constructor(entries) {\n _FrozenMap_map.set(this, void 0);\n __classPrivateFieldSet(this, _FrozenMap_map, new Map(entries), \"f\");\n Object.freeze(this);\n }\n get size() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").size;\n }\n [(_FrozenMap_map = new WeakMap(), Symbol.iterator)]() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\")[Symbol.iterator]();\n }\n entries() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").entries();\n }\n forEach(callbackfn, thisArg) {\n // We have to wrap the specified callback in order to prevent it from\n // receiving a reference to the inner map.\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").forEach((value, key, _map) => callbackfn.call(thisArg, value, key, this));\n }\n get(key) {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").get(key);\n }\n has(key) {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").has(key);\n }\n keys() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").keys();\n }\n values() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").values();\n }\n toString() {\n return `FrozenMap(${this.size}) {${this.size > 0\n ? ` ${[...this.entries()]\n .map(([key, value]) => `${String(key)} => ${String(value)}`)\n .join(', ')} `\n : ''}}`;\n }\n}\nexports.FrozenMap = FrozenMap;\n/**\n * A {@link ReadonlySet} that cannot be modified after instantiation.\n * The implementation uses an inner set hidden via a private field, and the\n * immutability guarantee relies on it being impossible to get a reference\n * to this set.\n */\nclass FrozenSet {\n constructor(values) {\n _FrozenSet_set.set(this, void 0);\n __classPrivateFieldSet(this, _FrozenSet_set, new Set(values), \"f\");\n Object.freeze(this);\n }\n get size() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").size;\n }\n [(_FrozenSet_set = new WeakMap(), Symbol.iterator)]() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\")[Symbol.iterator]();\n }\n entries() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").entries();\n }\n forEach(callbackfn, thisArg) {\n // We have to wrap the specified callback in order to prevent it from\n // receiving a reference to the inner set.\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").forEach((value, value2, _set) => callbackfn.call(thisArg, value, value2, this));\n }\n has(value) {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").has(value);\n }\n keys() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").keys();\n }\n values() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").values();\n }\n toString() {\n return `FrozenSet(${this.size}) {${this.size > 0\n ? ` ${[...this.values()].map((member) => String(member)).join(', ')} `\n : ''}}`;\n }\n}\nexports.FrozenSet = FrozenSet;\nObject.freeze(FrozenMap);\nObject.freeze(FrozenMap.prototype);\nObject.freeze(FrozenSet);\nObject.freeze(FrozenSet.prototype);\n//# sourceMappingURL=collections.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=encryption-types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getJsonRpcIdValidator = exports.assertIsJsonRpcError = exports.isJsonRpcError = exports.assertIsJsonRpcFailure = exports.isJsonRpcFailure = exports.assertIsJsonRpcSuccess = exports.isJsonRpcSuccess = exports.assertIsJsonRpcResponse = exports.isJsonRpcResponse = exports.assertIsPendingJsonRpcResponse = exports.isPendingJsonRpcResponse = exports.JsonRpcResponseStruct = exports.JsonRpcFailureStruct = exports.JsonRpcSuccessStruct = exports.PendingJsonRpcResponseStruct = exports.assertIsJsonRpcRequest = exports.isJsonRpcRequest = exports.assertIsJsonRpcNotification = exports.isJsonRpcNotification = exports.JsonRpcNotificationStruct = exports.JsonRpcRequestStruct = exports.JsonRpcParamsStruct = exports.JsonRpcErrorStruct = exports.JsonRpcIdStruct = exports.JsonRpcVersionStruct = exports.jsonrpc2 = exports.getJsonSize = exports.isValidJson = exports.JsonStruct = exports.UnsafeJsonStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * A struct to check if the given value is finite number. Superstruct's\n * `number()` struct does not check if the value is finite.\n *\n * @returns A struct to check if the given value is finite number.\n */\nconst finiteNumber = () => (0, superstruct_1.define)('finite number', (value) => {\n return (0, superstruct_1.is)(value, (0, superstruct_1.number)()) && Number.isFinite(value);\n});\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * Note that this struct is unsafe. For safe validation, use {@link JsonStruct}.\n */\n// We cannot infer the type of the struct, because it is recursive.\nexports.UnsafeJsonStruct = (0, superstruct_1.union)([\n (0, superstruct_1.literal)(null),\n (0, superstruct_1.boolean)(),\n finiteNumber(),\n (0, superstruct_1.string)(),\n (0, superstruct_1.array)((0, superstruct_1.lazy)(() => exports.UnsafeJsonStruct)),\n (0, superstruct_1.record)((0, superstruct_1.string)(), (0, superstruct_1.lazy)(() => exports.UnsafeJsonStruct)),\n]);\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * This struct sanitizes the value before validating it, so that it is safe to\n * use with untrusted input.\n */\nexports.JsonStruct = (0, superstruct_1.define)('Json', (value, context) => {\n /**\n * Helper function that runs the given struct validator and returns the\n * validation errors, if any. If the value is valid, it returns `true`.\n *\n * @param innerValue - The value to validate.\n * @param struct - The struct to use for validation.\n * @returns The validation errors, or `true` if the value is valid.\n */\n function checkStruct(innerValue, struct) {\n const iterator = struct.validator(innerValue, context);\n const errors = [...iterator];\n if (errors.length > 0) {\n return errors;\n }\n return true;\n }\n try {\n // The plain value must be a valid JSON value, but it may be altered in the\n // process of JSON serialization, so we need to validate it again after\n // serialization. This has the added benefit that the returned error messages\n // will be more helpful, as they will point to the exact location of the\n // invalid value.\n //\n // This seems overcomplicated, but without checking the plain value first,\n // there are some cases where the validation passes, even though the value is\n // not valid JSON. For example, `undefined` is not valid JSON, but serializing\n // it will remove it from the object, so the validation will pass.\n const unsafeResult = checkStruct(value, exports.UnsafeJsonStruct);\n if (unsafeResult !== true) {\n return unsafeResult;\n }\n // JavaScript engines are highly optimized for this specific use case of\n // JSON parsing and stringifying, so there should be no performance impact.\n return checkStruct(JSON.parse(JSON.stringify(value)), exports.UnsafeJsonStruct);\n }\n catch (error) {\n if (error instanceof RangeError) {\n return 'Circular reference detected';\n }\n return false;\n }\n});\n/**\n * Check if the given value is a valid {@link Json} value, i.e., a value that is\n * serializable to JSON.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid {@link Json} value.\n */\nfunction isValidJson(value) {\n return (0, superstruct_1.is)(value, exports.JsonStruct);\n}\nexports.isValidJson = isValidJson;\n/**\n * Get the size of a JSON value in bytes. This also validates the value.\n *\n * @param value - The JSON value to get the size of.\n * @returns The size of the JSON value in bytes.\n */\nfunction getJsonSize(value) {\n (0, assert_1.assertStruct)(value, exports.JsonStruct, 'Invalid JSON value');\n const json = JSON.stringify(value);\n return new TextEncoder().encode(json).byteLength;\n}\nexports.getJsonSize = getJsonSize;\n/**\n * The string '2.0'.\n */\nexports.jsonrpc2 = '2.0';\nexports.JsonRpcVersionStruct = (0, superstruct_1.literal)(exports.jsonrpc2);\nexports.JsonRpcIdStruct = (0, superstruct_1.nullable)((0, superstruct_1.union)([(0, superstruct_1.number)(), (0, superstruct_1.string)()]));\nexports.JsonRpcErrorStruct = (0, superstruct_1.object)({\n code: (0, superstruct_1.integer)(),\n message: (0, superstruct_1.string)(),\n data: (0, superstruct_1.optional)(exports.JsonStruct),\n stack: (0, superstruct_1.optional)((0, superstruct_1.string)()),\n});\nexports.JsonRpcParamsStruct = (0, superstruct_1.optional)((0, superstruct_1.union)([(0, superstruct_1.record)((0, superstruct_1.string)(), exports.JsonStruct), (0, superstruct_1.array)(exports.JsonStruct)]));\nexports.JsonRpcRequestStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n method: (0, superstruct_1.string)(),\n params: exports.JsonRpcParamsStruct,\n});\nexports.JsonRpcNotificationStruct = (0, superstruct_1.omit)(exports.JsonRpcRequestStruct, ['id']);\n/**\n * Check if the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcNotification}\n * object.\n */\nfunction isJsonRpcNotification(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcNotificationStruct);\n}\nexports.isJsonRpcNotification = isJsonRpcNotification;\n/**\n * Assert that the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcNotification} object.\n */\nfunction assertIsJsonRpcNotification(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcNotificationStruct, 'Invalid JSON-RPC notification', ErrorWrapper);\n}\nexports.assertIsJsonRpcNotification = assertIsJsonRpcNotification;\n/**\n * Check if the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcRequest} object.\n */\nfunction isJsonRpcRequest(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcRequestStruct);\n}\nexports.isJsonRpcRequest = isJsonRpcRequest;\n/**\n * Assert that the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The JSON-RPC request or notification to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcRequest} object.\n */\nfunction assertIsJsonRpcRequest(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcRequestStruct, 'Invalid JSON-RPC request', ErrorWrapper);\n}\nexports.assertIsJsonRpcRequest = assertIsJsonRpcRequest;\nexports.PendingJsonRpcResponseStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n result: (0, superstruct_1.optional)((0, superstruct_1.unknown)()),\n error: (0, superstruct_1.optional)(exports.JsonRpcErrorStruct),\n});\nexports.JsonRpcSuccessStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n result: exports.JsonStruct,\n});\nexports.JsonRpcFailureStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n error: exports.JsonRpcErrorStruct,\n});\nexports.JsonRpcResponseStruct = (0, superstruct_1.union)([\n exports.JsonRpcSuccessStruct,\n exports.JsonRpcFailureStruct,\n]);\n/**\n * Type guard to check whether specified JSON-RPC response is a\n * {@link PendingJsonRpcResponse}.\n *\n * @param response - The JSON-RPC response to check.\n * @returns Whether the specified JSON-RPC response is pending.\n */\nfunction isPendingJsonRpcResponse(response) {\n return (0, superstruct_1.is)(response, exports.PendingJsonRpcResponseStruct);\n}\nexports.isPendingJsonRpcResponse = isPendingJsonRpcResponse;\n/**\n * Assert that the given value is a valid {@link PendingJsonRpcResponse} object.\n *\n * @param response - The JSON-RPC response to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link PendingJsonRpcResponse}\n * object.\n */\nfunction assertIsPendingJsonRpcResponse(response, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(response, exports.PendingJsonRpcResponseStruct, 'Invalid pending JSON-RPC response', ErrorWrapper);\n}\nexports.assertIsPendingJsonRpcResponse = assertIsPendingJsonRpcResponse;\n/**\n * Type guard to check if a value is a {@link JsonRpcResponse}.\n *\n * @param response - The object to check.\n * @returns Whether the object is a JsonRpcResponse.\n */\nfunction isJsonRpcResponse(response) {\n return (0, superstruct_1.is)(response, exports.JsonRpcResponseStruct);\n}\nexports.isJsonRpcResponse = isJsonRpcResponse;\n/**\n * Assert that the given value is a valid {@link JsonRpcResponse} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcResponse} object.\n */\nfunction assertIsJsonRpcResponse(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcResponseStruct, 'Invalid JSON-RPC response', ErrorWrapper);\n}\nexports.assertIsJsonRpcResponse = assertIsJsonRpcResponse;\n/**\n * Check if the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcSuccess} object.\n */\nfunction isJsonRpcSuccess(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcSuccessStruct);\n}\nexports.isJsonRpcSuccess = isJsonRpcSuccess;\n/**\n * Assert that the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcSuccess} object.\n */\nfunction assertIsJsonRpcSuccess(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcSuccessStruct, 'Invalid JSON-RPC success response', ErrorWrapper);\n}\nexports.assertIsJsonRpcSuccess = assertIsJsonRpcSuccess;\n/**\n * Check if the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcFailure} object.\n */\nfunction isJsonRpcFailure(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcFailureStruct);\n}\nexports.isJsonRpcFailure = isJsonRpcFailure;\n/**\n * Assert that the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcFailure} object.\n */\nfunction assertIsJsonRpcFailure(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcFailureStruct, 'Invalid JSON-RPC failure response', ErrorWrapper);\n}\nexports.assertIsJsonRpcFailure = assertIsJsonRpcFailure;\n/**\n * Check if the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcError} object.\n */\nfunction isJsonRpcError(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcErrorStruct);\n}\nexports.isJsonRpcError = isJsonRpcError;\n/**\n * Assert that the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcError} object.\n */\nfunction assertIsJsonRpcError(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcErrorStruct, 'Invalid JSON-RPC error', ErrorWrapper);\n}\nexports.assertIsJsonRpcError = assertIsJsonRpcError;\n/**\n * Gets a function for validating JSON-RPC request / response `id` values.\n *\n * By manipulating the options of this factory, you can control the behavior\n * of the resulting validator for some edge cases. This is useful because e.g.\n * `null` should sometimes but not always be permitted.\n *\n * Note that the empty string (`''`) is always permitted by the JSON-RPC\n * specification, but that kind of sucks and you may want to forbid it in some\n * instances anyway.\n *\n * For more details, see the\n * [JSON-RPC Specification](https://www.jsonrpc.org/specification).\n *\n * @param options - An options object.\n * @param options.permitEmptyString - Whether the empty string (i.e. `''`)\n * should be treated as a valid ID. Default: `true`\n * @param options.permitFractions - Whether fractional numbers (e.g. `1.2`)\n * should be treated as valid IDs. Default: `false`\n * @param options.permitNull - Whether `null` should be treated as a valid ID.\n * Default: `true`\n * @returns The JSON-RPC ID validator function.\n */\nfunction getJsonRpcIdValidator(options) {\n const { permitEmptyString, permitFractions, permitNull } = Object.assign({ permitEmptyString: true, permitFractions: false, permitNull: true }, options);\n /**\n * Type guard for {@link JsonRpcId}.\n *\n * @param id - The JSON-RPC ID value to check.\n * @returns Whether the given ID is valid per the options given to the\n * factory.\n */\n const isValidJsonRpcId = (id) => {\n return Boolean((typeof id === 'number' && (permitFractions || Number.isInteger(id))) ||\n (typeof id === 'string' && (permitEmptyString || id.length > 0)) ||\n (permitNull && id === null));\n };\n return isValidJsonRpcId;\n}\nexports.getJsonRpcIdValidator = getJsonRpcIdValidator;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=keyring.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createModuleLogger = exports.createProjectLogger = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst globalLogger = (0, debug_1.default)('metamask');\n/**\n * Creates a logger via the `debug` library whose log messages will be tagged\n * using the name of your project. By default, such messages will be\n * suppressed, but you can reveal them by setting the `DEBUG` environment\n * variable to `metamask:`. You can also set this variable to\n * `metamask:*` if you want to see log messages from all MetaMask projects that\n * are also using this function to create their loggers.\n *\n * @param projectName - The name of your project. This should be the name of\n * your NPM package if you're developing one.\n * @returns An instance of `debug`.\n */\nfunction createProjectLogger(projectName) {\n return globalLogger.extend(projectName);\n}\nexports.createProjectLogger = createProjectLogger;\n/**\n * Creates a logger via the `debug` library which is derived from the logger for\n * the whole project whose log messages will be tagged using the name of your\n * module. By default, such messages will be suppressed, but you can reveal them\n * by setting the `DEBUG` environment variable to\n * `metamask::`. You can also set this variable to\n * `metamask::*` if you want to see log messages from the project,\n * or `metamask:*` if you want to see log messages from all MetaMask projects.\n *\n * @param projectLogger - The logger created via {@link createProjectLogger}.\n * @param moduleName - The name of your module. You could use the name of the\n * file where you're using this logger or some other name.\n * @returns An instance of `debug`.\n */\nfunction createModuleLogger(projectLogger, moduleName) {\n return projectLogger.extend(moduleName);\n}\nexports.createModuleLogger = createModuleLogger;\n//# sourceMappingURL=logging.js.map","\"use strict\";\n//\n// Types\n//\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateNumberSize = exports.calculateStringSize = exports.isASCII = exports.isPlainObject = exports.ESCAPE_CHARACTERS_REGEXP = exports.JsonSize = exports.hasProperty = exports.isObject = exports.isNullOrUndefined = exports.isNonEmptyArray = void 0;\n//\n// Type Guards\n//\n/**\n * A {@link NonEmptyArray} type guard.\n *\n * @template Element - The non-empty array member type.\n * @param value - The value to check.\n * @returns Whether the value is a non-empty array.\n */\nfunction isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\nexports.isNonEmptyArray = isNonEmptyArray;\n/**\n * Type guard for \"nullishness\".\n *\n * @param value - Any value.\n * @returns `true` if the value is null or undefined, `false` otherwise.\n */\nfunction isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n/**\n * A type guard for {@link RuntimeObject}.\n *\n * @param value - The value to check.\n * @returns Whether the specified value has a runtime type of `object` and is\n * neither `null` nor an `Array`.\n */\nfunction isObject(value) {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\nexports.isObject = isObject;\n//\n// Other utility functions\n//\n/**\n * A type guard for ensuring an object has a property.\n *\n * @param objectToCheck - The object to check.\n * @param name - The property name to check for.\n * @returns Whether the specified object has an own property with the specified\n * name, regardless of whether it is enumerable or not.\n */\nconst hasProperty = (objectToCheck, name) => Object.hasOwnProperty.call(objectToCheck, name);\nexports.hasProperty = hasProperty;\n/**\n * Predefined sizes (in Bytes) of specific parts of JSON structure.\n */\nvar JsonSize;\n(function (JsonSize) {\n JsonSize[JsonSize[\"Null\"] = 4] = \"Null\";\n JsonSize[JsonSize[\"Comma\"] = 1] = \"Comma\";\n JsonSize[JsonSize[\"Wrapper\"] = 1] = \"Wrapper\";\n JsonSize[JsonSize[\"True\"] = 4] = \"True\";\n JsonSize[JsonSize[\"False\"] = 5] = \"False\";\n JsonSize[JsonSize[\"Quote\"] = 1] = \"Quote\";\n JsonSize[JsonSize[\"Colon\"] = 1] = \"Colon\";\n // eslint-disable-next-line @typescript-eslint/no-shadow\n JsonSize[JsonSize[\"Date\"] = 24] = \"Date\";\n})(JsonSize = exports.JsonSize || (exports.JsonSize = {}));\n/**\n * Regular expression with pattern matching for (special) escaped characters.\n */\nexports.ESCAPE_CHARACTERS_REGEXP = /\"|\\\\|\\n|\\r|\\t/gu;\n/**\n * Check if the value is plain object.\n *\n * @param value - Value to be checked.\n * @returns True if an object is the plain JavaScript object,\n * false if the object is not plain (e.g. function).\n */\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n }\n catch (_) {\n return false;\n }\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Check if character is ASCII.\n *\n * @param character - Character.\n * @returns True if a character code is ASCII, false if not.\n */\nfunction isASCII(character) {\n return character.charCodeAt(0) <= 127;\n}\nexports.isASCII = isASCII;\n/**\n * Calculate string size.\n *\n * @param value - String value to calculate size.\n * @returns Number of bytes used to store whole string value.\n */\nfunction calculateStringSize(value) {\n var _a;\n const size = value.split('').reduce((total, character) => {\n if (isASCII(character)) {\n return total + 1;\n }\n return total + 2;\n }, 0);\n // Also detect characters that need backslash escape\n return size + ((_a = value.match(exports.ESCAPE_CHARACTERS_REGEXP)) !== null && _a !== void 0 ? _a : []).length;\n}\nexports.calculateStringSize = calculateStringSize;\n/**\n * Calculate size of a number ofter JSON serialization.\n *\n * @param value - Number value to calculate size.\n * @returns Number of bytes used to store whole number in JSON.\n */\nfunction calculateNumberSize(value) {\n return value.toString().length;\n}\nexports.calculateNumberSize = calculateNumberSize;\n//# sourceMappingURL=misc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBigInt = exports.hexToNumber = exports.bigIntToHex = exports.numberToHex = void 0;\nconst assert_1 = require(\"./assert\");\nconst hex_1 = require(\"./hex\");\n/**\n * Convert a number to a hexadecimal string. This verifies that the number is a\n * non-negative safe integer.\n *\n * To convert a `bigint` to a hexadecimal string instead, use\n * {@link bigIntToHex}.\n *\n * @example\n * ```typescript\n * numberToHex(0); // '0x0'\n * numberToHex(1); // '0x1'\n * numberToHex(16); // '0x10'\n * ```\n * @param value - The number to convert to a hexadecimal string.\n * @returns The hexadecimal string, with the \"0x\"-prefix.\n * @throws If the number is not a non-negative safe integer.\n */\nconst numberToHex = (value) => {\n (0, assert_1.assert)(typeof value === 'number', 'Value must be a number.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative number.');\n (0, assert_1.assert)(Number.isSafeInteger(value), 'Value is not a safe integer. Use `bigIntToHex` instead.');\n return (0, hex_1.add0x)(value.toString(16));\n};\nexports.numberToHex = numberToHex;\n/**\n * Convert a `bigint` to a hexadecimal string. This verifies that the `bigint`\n * is a non-negative integer.\n *\n * To convert a number to a hexadecimal string instead, use {@link numberToHex}.\n *\n * @example\n * ```typescript\n * bigIntToHex(0n); // '0x0'\n * bigIntToHex(1n); // '0x1'\n * bigIntToHex(16n); // '0x10'\n * ```\n * @param value - The `bigint` to convert to a hexadecimal string.\n * @returns The hexadecimal string, with the \"0x\"-prefix.\n * @throws If the `bigint` is not a non-negative integer.\n */\nconst bigIntToHex = (value) => {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative bigint.');\n return (0, hex_1.add0x)(value.toString(16));\n};\nexports.bigIntToHex = bigIntToHex;\n/**\n * Convert a hexadecimal string to a number. This verifies that the string is a\n * valid hex string, and that the resulting number is a safe integer. Both\n * \"0x\"-prefixed and unprefixed strings are supported.\n *\n * To convert a hexadecimal string to a `bigint` instead, use\n * {@link hexToBigInt}.\n *\n * @example\n * ```typescript\n * hexToNumber('0x0'); // 0\n * hexToNumber('0x1'); // 1\n * hexToNumber('0x10'); // 16\n * ```\n * @param value - The hexadecimal string to convert to a number.\n * @returns The number.\n * @throws If the value is not a valid hexadecimal string, or if the resulting\n * number is not a safe integer.\n */\nconst hexToNumber = (value) => {\n (0, hex_1.assertIsHexString)(value);\n // `parseInt` accepts values without the \"0x\"-prefix, whereas `Number` does\n // not. Using this is slightly faster than `Number(add0x(value))`.\n const numberValue = parseInt(value, 16);\n (0, assert_1.assert)(Number.isSafeInteger(numberValue), 'Value is not a safe integer. Use `hexToBigInt` instead.');\n return numberValue;\n};\nexports.hexToNumber = hexToNumber;\n/**\n * Convert a hexadecimal string to a `bigint`. This verifies that the string is\n * a valid hex string. Both \"0x\"-prefixed and unprefixed strings are supported.\n *\n * To convert a hexadecimal string to a number instead, use {@link hexToNumber}.\n *\n * @example\n * ```typescript\n * hexToBigInt('0x0'); // 0n\n * hexToBigInt('0x1'); // 1n\n * hexToBigInt('0x10'); // 16n\n * ```\n * @param value - The hexadecimal string to convert to a `bigint`.\n * @returns The `bigint`.\n * @throws If the value is not a valid hexadecimal string.\n */\nconst hexToBigInt = (value) => {\n (0, hex_1.assertIsHexString)(value);\n // The `BigInt` constructor requires the \"0x\"-prefix to parse a hex string.\n return BigInt((0, hex_1.add0x)(value));\n};\nexports.hexToBigInt = hexToBigInt;\n//# sourceMappingURL=number.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=opaque.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.timeSince = exports.inMilliseconds = exports.Duration = void 0;\n/**\n * Common duration constants, in milliseconds.\n */\nvar Duration;\n(function (Duration) {\n /**\n * A millisecond.\n */\n Duration[Duration[\"Millisecond\"] = 1] = \"Millisecond\";\n /**\n * A second, in milliseconds.\n */\n Duration[Duration[\"Second\"] = 1000] = \"Second\";\n /**\n * A minute, in milliseconds.\n */\n Duration[Duration[\"Minute\"] = 60000] = \"Minute\";\n /**\n * An hour, in milliseconds.\n */\n Duration[Duration[\"Hour\"] = 3600000] = \"Hour\";\n /**\n * A day, in milliseconds.\n */\n Duration[Duration[\"Day\"] = 86400000] = \"Day\";\n /**\n * A week, in milliseconds.\n */\n Duration[Duration[\"Week\"] = 604800000] = \"Week\";\n /**\n * A year, in milliseconds.\n */\n Duration[Duration[\"Year\"] = 31536000000] = \"Year\";\n})(Duration = exports.Duration || (exports.Duration = {}));\nconst isNonNegativeInteger = (number) => Number.isInteger(number) && number >= 0;\nconst assertIsNonNegativeInteger = (number, name) => {\n if (!isNonNegativeInteger(number)) {\n throw new Error(`\"${name}\" must be a non-negative integer. Received: \"${number}\".`);\n }\n};\n/**\n * Calculates the millisecond value of the specified number of units of time.\n *\n * @param count - The number of units of time.\n * @param duration - The unit of time to count.\n * @returns The count multiplied by the specified duration.\n */\nfunction inMilliseconds(count, duration) {\n assertIsNonNegativeInteger(count, 'count');\n return count * duration;\n}\nexports.inMilliseconds = inMilliseconds;\n/**\n * Gets the milliseconds since a particular Unix epoch timestamp.\n *\n * @param timestamp - A Unix millisecond timestamp.\n * @returns The number of milliseconds elapsed since the specified timestamp.\n */\nfunction timeSince(timestamp) {\n assertIsNonNegativeInteger(timestamp, 'timestamp');\n return Date.now() - timestamp;\n}\nexports.timeSince = timeSince;\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=transaction-types.js.map","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => comps.join(' ').trim())\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.satisfiesVersionRange = exports.gtRange = exports.gtVersion = exports.assertIsSemVerRange = exports.assertIsSemVerVersion = exports.isValidSemVerRange = exports.isValidSemVerVersion = exports.VersionRangeStruct = exports.VersionStruct = void 0;\nconst semver_1 = require(\"semver\");\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * A struct for validating a version string.\n */\nexports.VersionStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version', (value) => {\n if ((0, semver_1.valid)(value) === null) {\n return `Expected SemVer version, got \"${value}\"`;\n }\n return true;\n});\nexports.VersionRangeStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version range', (value) => {\n if ((0, semver_1.validRange)(value) === null) {\n return `Expected SemVer range, got \"${value}\"`;\n }\n return true;\n});\n/**\n * Checks whether a SemVer version is valid.\n *\n * @param version - A potential version.\n * @returns `true` if the version is valid, and `false` otherwise.\n */\nfunction isValidSemVerVersion(version) {\n return (0, superstruct_1.is)(version, exports.VersionStruct);\n}\nexports.isValidSemVerVersion = isValidSemVerVersion;\n/**\n * Checks whether a SemVer version range is valid.\n *\n * @param versionRange - A potential version range.\n * @returns `true` if the version range is valid, and `false` otherwise.\n */\nfunction isValidSemVerRange(versionRange) {\n return (0, superstruct_1.is)(versionRange, exports.VersionRangeStruct);\n}\nexports.isValidSemVerRange = isValidSemVerRange;\n/**\n * Asserts that a value is a valid concrete SemVer version.\n *\n * @param version - A potential SemVer concrete version.\n */\nfunction assertIsSemVerVersion(version) {\n (0, assert_1.assertStruct)(version, exports.VersionStruct);\n}\nexports.assertIsSemVerVersion = assertIsSemVerVersion;\n/**\n * Asserts that a value is a valid SemVer range.\n *\n * @param range - A potential SemVer range.\n */\nfunction assertIsSemVerRange(range) {\n (0, assert_1.assertStruct)(range, exports.VersionRangeStruct);\n}\nexports.assertIsSemVerRange = assertIsSemVerRange;\n/**\n * Checks whether a SemVer version is greater than another.\n *\n * @param version1 - The left-hand version.\n * @param version2 - The right-hand version.\n * @returns `version1 > version2`.\n */\nfunction gtVersion(version1, version2) {\n return (0, semver_1.gt)(version1, version2);\n}\nexports.gtVersion = gtVersion;\n/**\n * Checks whether a SemVer version is greater than all possibilities in a range.\n *\n * @param version - A SemvVer version.\n * @param range - The range to check against.\n * @returns `version > range`.\n */\nfunction gtRange(version, range) {\n return (0, semver_1.gtr)(version, range);\n}\nexports.gtRange = gtRange;\n/**\n * Returns whether a SemVer version satisfies a SemVer range.\n *\n * @param version - The SemVer version to check.\n * @param versionRange - The SemVer version range to check against.\n * @returns Whether the version satisfied the version range.\n */\nfunction satisfiesVersionRange(version, versionRange) {\n return (0, semver_1.satisfies)(version, versionRange, {\n includePrerelease: true,\n });\n}\nexports.satisfiesVersionRange = satisfiesVersionRange;\n//# sourceMappingURL=versions.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./assert\"), exports);\n__exportStar(require(\"./base64\"), exports);\n__exportStar(require(\"./bytes\"), exports);\n__exportStar(require(\"./checksum\"), exports);\n__exportStar(require(\"./coercers\"), exports);\n__exportStar(require(\"./collections\"), exports);\n__exportStar(require(\"./encryption-types\"), exports);\n__exportStar(require(\"./hex\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./keyring\"), exports);\n__exportStar(require(\"./logging\"), exports);\n__exportStar(require(\"./misc\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./opaque\"), exports);\n__exportStar(require(\"./time\"), exports);\n__exportStar(require(\"./transaction-types\"), exports);\n__exportStar(require(\"./versions\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createModuleLogger = exports.projectLogger = void 0;\nconst utils_1 = require(\"@metamask/utils\");\nObject.defineProperty(exports, \"createModuleLogger\", { enumerable: true, get: function () { return utils_1.createModuleLogger; } });\nexports.projectLogger = (0, utils_1.createProjectLogger)('eth-block-tracker');\n//# sourceMappingURL=logging-utils.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PollingBlockTracker = void 0;\nconst json_rpc_random_id_1 = __importDefault(require(\"json-rpc-random-id\"));\nconst pify_1 = __importDefault(require(\"pify\"));\nconst BaseBlockTracker_1 = require(\"./BaseBlockTracker\");\nconst logging_utils_1 = require(\"./logging-utils\");\nconst log = (0, logging_utils_1.createModuleLogger)(logging_utils_1.projectLogger, 'polling-block-tracker');\nconst createRandomId = (0, json_rpc_random_id_1.default)();\nconst sec = 1000;\nclass PollingBlockTracker extends BaseBlockTracker_1.BaseBlockTracker {\n constructor(opts = {}) {\n var _a;\n // parse + validate args\n if (!opts.provider) {\n throw new Error('PollingBlockTracker - no provider specified.');\n }\n super(Object.assign(Object.assign({}, opts), { blockResetDuration: (_a = opts.blockResetDuration) !== null && _a !== void 0 ? _a : opts.pollingInterval }));\n // config\n this._provider = opts.provider;\n this._pollingInterval = opts.pollingInterval || 20 * sec;\n this._retryTimeout = opts.retryTimeout || this._pollingInterval / 10;\n this._keepEventLoopActive =\n opts.keepEventLoopActive === undefined ? true : opts.keepEventLoopActive;\n this._setSkipCacheFlag = opts.setSkipCacheFlag || false;\n }\n // trigger block polling\n async checkForLatestBlock() {\n await this._updateLatestBlock();\n return await this.getLatestBlock();\n }\n async _start() {\n this._synchronize();\n }\n async _end() {\n // No-op\n }\n async _synchronize() {\n var _a;\n while (this._isRunning) {\n try {\n await this._updateLatestBlock();\n const promise = timeout(this._pollingInterval, !this._keepEventLoopActive);\n this.emit('_waitingForNextIteration');\n await promise;\n }\n catch (err) {\n const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\\n${(_a = err.stack) !== null && _a !== void 0 ? _a : err}`);\n try {\n this.emit('error', newErr);\n }\n catch (emitErr) {\n console.error(newErr);\n }\n const promise = timeout(this._retryTimeout, !this._keepEventLoopActive);\n this.emit('_waitingForNextIteration');\n await promise;\n }\n }\n }\n async _updateLatestBlock() {\n // fetch + set latest block\n const latestBlock = await this._fetchLatestBlock();\n this._newPotentialLatest(latestBlock);\n }\n async _fetchLatestBlock() {\n const req = {\n jsonrpc: '2.0',\n id: createRandomId(),\n method: 'eth_blockNumber',\n params: [],\n };\n if (this._setSkipCacheFlag) {\n req.skipCache = true;\n }\n log('Making request', req);\n const res = await (0, pify_1.default)((cb) => this._provider.sendAsync(req, cb))();\n log('Got response', res);\n if (res.error) {\n throw new Error(`PollingBlockTracker - encountered error fetching block:\\n${res.error.message}`);\n }\n return res.result;\n }\n}\nexports.PollingBlockTracker = PollingBlockTracker;\n/**\n * Waits for the specified amount of time.\n *\n * @param duration - The amount of time in milliseconds.\n * @param unref - Assuming this function is run in a Node context, governs\n * whether Node should wait before the `setTimeout` has completed before ending\n * the process (true for no, false for yes). Defaults to false.\n * @returns A promise that can be used to wait.\n */\nfunction timeout(duration, unref) {\n return new Promise((resolve) => {\n const timeoutRef = setTimeout(resolve, duration);\n // don't keep process open\n if (timeoutRef.unref && unref) {\n timeoutRef.unref();\n }\n });\n}\n//# sourceMappingURL=PollingBlockTracker.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubscribeBlockTracker = void 0;\nconst json_rpc_random_id_1 = __importDefault(require(\"json-rpc-random-id\"));\nconst BaseBlockTracker_1 = require(\"./BaseBlockTracker\");\nconst createRandomId = (0, json_rpc_random_id_1.default)();\nclass SubscribeBlockTracker extends BaseBlockTracker_1.BaseBlockTracker {\n constructor(opts = {}) {\n // parse + validate args\n if (!opts.provider) {\n throw new Error('SubscribeBlockTracker - no provider specified.');\n }\n // BaseBlockTracker constructor\n super(opts);\n // config\n this._provider = opts.provider;\n this._subscriptionId = null;\n }\n async checkForLatestBlock() {\n return await this.getLatestBlock();\n }\n async _start() {\n if (this._subscriptionId === undefined || this._subscriptionId === null) {\n try {\n const blockNumber = (await this._call('eth_blockNumber'));\n this._subscriptionId = (await this._call('eth_subscribe', 'newHeads'));\n this._provider.on('data', this._handleSubData.bind(this));\n this._newPotentialLatest(blockNumber);\n }\n catch (e) {\n this.emit('error', e);\n }\n }\n }\n async _end() {\n if (this._subscriptionId !== null && this._subscriptionId !== undefined) {\n try {\n await this._call('eth_unsubscribe', this._subscriptionId);\n this._subscriptionId = null;\n }\n catch (e) {\n this.emit('error', e);\n }\n }\n }\n _call(method, ...params) {\n return new Promise((resolve, reject) => {\n this._provider.sendAsync({\n id: createRandomId(),\n method,\n params,\n jsonrpc: '2.0',\n }, (err, res) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res.result);\n }\n });\n });\n }\n _handleSubData(_, response) {\n var _a;\n if (response.method === 'eth_subscription' &&\n ((_a = response.params) === null || _a === void 0 ? void 0 : _a.subscription) === this._subscriptionId) {\n this._newPotentialLatest(response.params.result.number);\n }\n }\n}\nexports.SubscribeBlockTracker = SubscribeBlockTracker;\n//# sourceMappingURL=SubscribeBlockTracker.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./PollingBlockTracker\"), exports);\n__exportStar(require(\"./SubscribeBlockTracker\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUniqueId = void 0;\n// uint32 (two's complement) max\n// more conservative than Number.MAX_SAFE_INTEGER\nconst MAX = 4294967295;\nlet idCounter = Math.floor(Math.random() * MAX);\nfunction getUniqueId() {\n idCounter = (idCounter + 1) % MAX;\n return idCounter;\n}\nexports.getUniqueId = getUniqueId;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VW5pcXVlSWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZ2V0VW5pcXVlSWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0NBQWdDO0FBQ2hDLGlEQUFpRDtBQUNqRCxNQUFNLEdBQUcsR0FBRyxVQUFVLENBQUM7QUFDdkIsSUFBSSxTQUFTLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLENBQUM7QUFFaEQsU0FBZ0IsV0FBVztJQUN6QixTQUFTLEdBQUcsQ0FBQyxTQUFTLEdBQUcsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDO0lBQ2xDLE9BQU8sU0FBUyxDQUFDO0FBQ25CLENBQUM7QUFIRCxrQ0FHQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createIdRemapMiddleware = void 0;\nconst getUniqueId_1 = require(\"./getUniqueId\");\nfunction createIdRemapMiddleware() {\n return (req, res, next, _end) => {\n const originalId = req.id;\n const newId = getUniqueId_1.getUniqueId();\n req.id = newId;\n res.id = newId;\n next((done) => {\n req.id = originalId;\n res.id = originalId;\n done();\n });\n };\n}\nexports.createIdRemapMiddleware = createIdRemapMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRSZW1hcE1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaWRSZW1hcE1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0NBQTRDO0FBRzVDLFNBQWdCLHVCQUF1QjtJQUNyQyxPQUFPLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLEVBQUU7UUFDOUIsTUFBTSxVQUFVLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQztRQUMxQixNQUFNLEtBQUssR0FBRyx5QkFBVyxFQUFFLENBQUM7UUFDNUIsR0FBRyxDQUFDLEVBQUUsR0FBRyxLQUFLLENBQUM7UUFDZixHQUFHLENBQUMsRUFBRSxHQUFHLEtBQUssQ0FBQztRQUNmLElBQUksQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFO1lBQ1osR0FBRyxDQUFDLEVBQUUsR0FBRyxVQUFVLENBQUM7WUFDcEIsR0FBRyxDQUFDLEVBQUUsR0FBRyxVQUFVLENBQUM7WUFDcEIsSUFBSSxFQUFFLENBQUM7UUFDVCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQztBQUNKLENBQUM7QUFaRCwwREFZQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAsyncMiddleware = void 0;\n/**\n * JsonRpcEngine only accepts callback-based middleware directly.\n * createAsyncMiddleware exists to enable consumers to pass in async middleware\n * functions.\n *\n * Async middleware have no \"end\" function. Instead, they \"end\" if they return\n * without calling \"next\". Rather than passing in explicit return handlers,\n * async middleware can simply await \"next\", and perform operations on the\n * response object when execution resumes.\n *\n * To accomplish this, createAsyncMiddleware passes the async middleware a\n * wrapped \"next\" function. That function calls the internal JsonRpcEngine\n * \"next\" function with a return handler that resolves a promise when called.\n *\n * The return handler will always be called. Its resolution of the promise\n * enables the control flow described above.\n */\nfunction createAsyncMiddleware(asyncMiddleware) {\n return async (req, res, next, end) => {\n // nextPromise is the key to the implementation\n // it is resolved by the return handler passed to the\n // \"next\" function\n let resolveNextPromise;\n const nextPromise = new Promise((resolve) => {\n resolveNextPromise = resolve;\n });\n let returnHandlerCallback = null;\n let nextWasCalled = false;\n // This will be called by the consumer's async middleware.\n const asyncNext = async () => {\n nextWasCalled = true;\n // We pass a return handler to next(). When it is called by the engine,\n // the consumer's async middleware will resume executing.\n // eslint-disable-next-line node/callback-return\n next((runReturnHandlersCallback) => {\n // This callback comes from JsonRpcEngine._runReturnHandlers\n returnHandlerCallback = runReturnHandlersCallback;\n resolveNextPromise();\n });\n await nextPromise;\n };\n try {\n await asyncMiddleware(req, res, asyncNext);\n if (nextWasCalled) {\n await nextPromise; // we must wait until the return handler is called\n returnHandlerCallback(null);\n }\n else {\n end(null);\n }\n }\n catch (error) {\n if (returnHandlerCallback) {\n returnHandlerCallback(error);\n }\n else {\n end(error);\n }\n }\n };\n}\nexports.createAsyncMiddleware = createAsyncMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlQXN5bmNNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NyZWF0ZUFzeW5jTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFnQkE7Ozs7Ozs7Ozs7Ozs7Ozs7R0FnQkc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UFHLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDWDtTQUNGO1FBQUMsT0FBTyxLQUFLLEVBQUU7WUFDZCxJQUFJLHFCQUFxQixFQUFFO2dCQUN4QixxQkFBK0MsQ0FBQyxLQUFLLENBQUMsQ0FBQzthQUN6RDtpQkFBTTtnQkFDTCxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7YUFDWjtTQUNGO0lBQ0gsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQS9DRCxzREErQ0MifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createScaffoldMiddleware = void 0;\nfunction createScaffoldMiddleware(handlers) {\n return (req, res, next, end) => {\n const handler = handlers[req.method];\n // if no handler, return\n if (handler === undefined) {\n return next();\n }\n // if handler is fn, call as middleware\n if (typeof handler === 'function') {\n return handler(req, res, next, end);\n }\n // if handler is some other value, use as result\n res.result = handler;\n return end();\n };\n}\nexports.createScaffoldMiddleware = createScaffoldMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlU2NhZmZvbGRNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NyZWF0ZVNjYWZmb2xkTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxTQUFnQix3QkFBd0IsQ0FBQyxRQUV4QztJQUNDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUM3QixNQUFNLE9BQU8sR0FBRyxRQUFRLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3JDLHdCQUF3QjtRQUN4QixJQUFJLE9BQU8sS0FBSyxTQUFTLEVBQUU7WUFDekIsT0FBTyxJQUFJLEVBQUUsQ0FBQztTQUNmO1FBQ0QsdUNBQXVDO1FBQ3ZDLElBQUksT0FBTyxPQUFPLEtBQUssVUFBVSxFQUFFO1lBQ2pDLE9BQU8sT0FBTyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUFFLEdBQUcsQ0FBQyxDQUFDO1NBQ3JDO1FBQ0QsZ0RBQWdEO1FBQy9DLEdBQStCLENBQUMsTUFBTSxHQUFHLE9BQU8sQ0FBQztRQUNsRCxPQUFPLEdBQUcsRUFBRSxDQUFDO0lBQ2YsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQWpCRCw0REFpQkMifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nfunction safeApply(handler, context, args) {\n try {\n Reflect.apply(handler, context, args);\n }\n catch (err) {\n // Throw error after timeout so as not to interrupt the stack\n setTimeout(() => {\n throw err;\n });\n }\n}\nfunction arrayClone(arr) {\n const n = arr.length;\n const copy = new Array(n);\n for (let i = 0; i < n; i += 1) {\n copy[i] = arr[i];\n }\n return copy;\n}\nclass SafeEventEmitter extends events_1.EventEmitter {\n emit(type, ...args) {\n let doError = type === 'error';\n const events = this._events;\n if (events !== undefined) {\n doError = doError && events.error === undefined;\n }\n else if (!doError) {\n return false;\n }\n // If there is no 'error' event listener then throw.\n if (doError) {\n let er;\n if (args.length > 0) {\n [er] = args;\n }\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n const err = new Error(`Unhandled error.${er ? ` (${er.message})` : ''}`);\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n const handler = events[type];\n if (handler === undefined) {\n return false;\n }\n if (typeof handler === 'function') {\n safeApply(handler, this, args);\n }\n else {\n const len = handler.length;\n const listeners = arrayClone(handler);\n for (let i = 0; i < len; i += 1) {\n safeApply(listeners[i], this, args);\n }\n }\n return true;\n }\n}\nexports.default = SafeEventEmitter;\n//# sourceMappingURL=index.js.map","module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar LIMIT_REPLACE_NODE = '[...]'\nvar CIRCULAR_REPLACE_NODE = '[Circular]'\n\nvar arr = []\nvar replacerStack = []\n\nfunction defaultOptions () {\n return {\n depthLimit: Number.MAX_SAFE_INTEGER,\n edgesLimit: Number.MAX_SAFE_INTEGER\n }\n}\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n decirc(obj, '', 0, [], undefined, 0, options)\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction setReplace (replace, val, k, parent) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: replace })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k, replace])\n }\n } else {\n parent[k] = replace\n arr.push([parent, k, val])\n }\n}\n\nfunction decirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, i, stack, val, depth, options)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n // Ensure that we restore the object as it was.\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n try {\n if (typeof val.toJSON === 'function') {\n return\n }\n } catch (_) {\n return\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, i, stack, val, depth, options)\n tmp[key] = val[key]\n }\n if (typeof parent !== 'undefined') {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as replaced value\nfunction replaceGetterValues (replacer) {\n replacer =\n typeof replacer !== 'undefined'\n ? replacer\n : function (k, v) {\n return v\n }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = part[2]\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EthereumProviderError = exports.EthereumRpcError = void 0;\nconst fast_safe_stringify_1 = require(\"fast-safe-stringify\");\n/**\n * Error subclass implementing JSON RPC 2.0 errors and Ethereum RPC errors\n * per EIP-1474.\n * Permits any integer error code.\n */\nclass EthereumRpcError extends Error {\n constructor(code, message, data) {\n if (!Number.isInteger(code)) {\n throw new Error('\"code\" must be an integer.');\n }\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string.');\n }\n super(message);\n this.code = code;\n if (data !== undefined) {\n this.data = data;\n }\n }\n /**\n * Returns a plain object with all public class properties.\n */\n serialize() {\n const serialized = {\n code: this.code,\n message: this.message,\n };\n if (this.data !== undefined) {\n serialized.data = this.data;\n }\n if (this.stack) {\n serialized.stack = this.stack;\n }\n return serialized;\n }\n /**\n * Return a string representation of the serialized error, omitting\n * any circular references.\n */\n toString() {\n return fast_safe_stringify_1.default(this.serialize(), stringifyReplacer, 2);\n }\n}\nexports.EthereumRpcError = EthereumRpcError;\n/**\n * Error subclass implementing Ethereum Provider errors per EIP-1193.\n * Permits integer error codes in the [ 1000 <= 4999 ] range.\n */\nclass EthereumProviderError extends EthereumRpcError {\n /**\n * Create an Ethereum Provider JSON-RPC error.\n * `code` must be an integer in the 1000 <= 4999 range.\n */\n constructor(code, message, data) {\n if (!isValidEthProviderCode(code)) {\n throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');\n }\n super(code, message, data);\n }\n}\nexports.EthereumProviderError = EthereumProviderError;\n// Internal\nfunction isValidEthProviderCode(code) {\n return Number.isInteger(code) && code >= 1000 && code <= 4999;\n}\nfunction stringifyReplacer(_, value) {\n if (value === '[Circular]') {\n return undefined;\n }\n return value;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jbGFzc2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZEQUFnRDtBQVNoRDs7OztHQUlHO0FBQ0gsTUFBYSxnQkFBb0IsU0FBUSxLQUFLO0lBTTVDLFlBQVksSUFBWSxFQUFFLE9BQWUsRUFBRSxJQUFRO1FBRWpELElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQzNCLE1BQU0sSUFBSSxLQUFLLENBQ2IsNEJBQTRCLENBQzdCLENBQUM7U0FDSDtRQUNELElBQUksQ0FBQyxPQUFPLElBQUksT0FBTyxPQUFPLEtBQUssUUFBUSxFQUFFO1lBQzNDLE1BQU0sSUFBSSxLQUFLLENBQ2Isc0NBQXNDLENBQ3ZDLENBQUM7U0FDSDtRQUVELEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUNmLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO1FB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UFFWCxTQUFTLHNCQUFzQixDQUFDLElBQVk7SUFDMUMsT0FBTyxNQUFNLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxJQUFJLElBQUksSUFBSSxJQUFJLElBQUksSUFBSSxJQUFJLElBQUksQ0FBQztBQUNoRSxDQUFDO0FBRUQsU0FBUyxpQkFBaUIsQ0FBQyxDQUFVLEVBQUUsS0FBYztJQUNuRCxJQUFJLEtBQUssS0FBSyxZQUFZLEVBQUU7UUFDMUIsT0FBTyxTQUFTLENBQUM7S0FDbEI7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUMifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorValues = exports.errorCodes = void 0;\nexports.errorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n },\n};\nexports.errorValues = {\n '-32700': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n },\n '-32600': {\n standard: 'JSON RPC 2.0',\n message: 'The JSON sent is not a valid Request object.',\n },\n '-32601': {\n standard: 'JSON RPC 2.0',\n message: 'The method does not exist / is not available.',\n },\n '-32602': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid method parameter(s).',\n },\n '-32603': {\n standard: 'JSON RPC 2.0',\n message: 'Internal JSON-RPC error.',\n },\n '-32000': {\n standard: 'EIP-1474',\n message: 'Invalid input.',\n },\n '-32001': {\n standard: 'EIP-1474',\n message: 'Resource not found.',\n },\n '-32002': {\n standard: 'EIP-1474',\n message: 'Resource unavailable.',\n },\n '-32003': {\n standard: 'EIP-1474',\n message: 'Transaction rejected.',\n },\n '-32004': {\n standard: 'EIP-1474',\n message: 'Method not supported.',\n },\n '-32005': {\n standard: 'EIP-1474',\n message: 'Request limit exceeded.',\n },\n '4001': {\n standard: 'EIP-1193',\n message: 'User rejected the request.',\n },\n '4100': {\n standard: 'EIP-1193',\n message: 'The requested account and/or method has not been authorized by the user.',\n },\n '4200': {\n standard: 'EIP-1193',\n message: 'The requested method is not supported by this Ethereum provider.',\n },\n '4900': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from all chains.',\n },\n '4901': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from the specified chain.',\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Vycm9yLWNvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF1QmEsUUFBQSxVQUFVLEdBQWU7SUFDcEMsR0FBRyxFQUFFO1FBQ0gsWUFBWSxFQUFFLENBQUMsS0FBSztRQUNwQixnQkFBZ0IsRUFBRSxDQUFDLEtBQUs7UUFDeEIsbUJBQW1CLEVBQUUsQ0FBQyxLQUFLO1FBQzNCLG1CQUFtQixFQUFFLENBQUMsS0FBSztRQUMzQixrQkFBa0IsRUFBRSxDQUFDLEtBQUs7UUFDMUIsYUFBYSxFQUFFLENBQUMsS0FBSztRQUNyQixLQUFLLEVBQUUsQ0FBQyxLQUFLO1FBQ2IsY0FBYyxFQUFFLENBQUMsS0FBSztRQUN0QixjQUFjLEVBQUUsQ0FBQyxLQUFLO1FBQ3RCLGFBQWEsRUFBRSxDQUFDLEtBQUs7UUFDckIsUUFBUSxFQUFFLENBQUMsS0FBSztLQUNqQjtJQUNELFFBQVEsRUFBRTtRQUNSLG1CQUFtQixFQUFFLElBQUk7UUFDekIsWUFBWSxFQUFFLElBQUk7UUFDbEIs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TtRQUNwQixPQUFPLEVBQUUseUJBQXlCO0tBQ25DO0lBQ0QsTUFBTSxFQUFFO1FBQ04sUUFBUSxFQUFFLFVBQVU7UUFDcEIsT0FBTyxFQUFFLDRCQUE0QjtLQUN0QztJQUNELE1BQU0sRUFBRTtRQUNOLFFBQVEsRUFBRSxVQUFVO1FBQ3BCLE9BQU8sRUFBRSwwRUFBMEU7S0FDcEY7SUFDRCxNQUFNLEVBQUU7UUFDTixRQUFRLEVBQUUsVUFBVTtRQUNwQixPQUFPLEVBQUUsa0VBQWtFO0tBQzVFO0lBQ0QsTUFBTSxFQUFFO1FBQ04sUUFBUSxFQUFFLFVBQVU7UUFDcEIsT0FBTyxFQUFFLCtDQUErQztLQUN6RDtJQUNELE1BQU0sRUFBRTtRQUNOLFFBQVEsRUFBRSxVQUFVO1FBQ3BCLE9BQU8sRUFBRSx3REFBd0Q7S0FDbEU7Q0FDRixDQUFDIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeError = exports.isValidCode = exports.getMessageFromCode = exports.JSON_RPC_SERVER_ERROR_MESSAGE = void 0;\nconst error_constants_1 = require(\"./error-constants\");\nconst classes_1 = require(\"./classes\");\nconst FALLBACK_ERROR_CODE = error_constants_1.errorCodes.rpc.internal;\nconst FALLBACK_MESSAGE = 'Unspecified error message. This is a bug, please report it.';\nconst FALLBACK_ERROR = {\n code: FALLBACK_ERROR_CODE,\n message: getMessageFromCode(FALLBACK_ERROR_CODE),\n};\nexports.JSON_RPC_SERVER_ERROR_MESSAGE = 'Unspecified server error.';\n/**\n * Gets the message for a given code, or a fallback message if the code has\n * no corresponding message.\n */\nfunction getMessageFromCode(code, fallbackMessage = FALLBACK_MESSAGE) {\n if (Number.isInteger(code)) {\n const codeString = code.toString();\n if (hasKey(error_constants_1.errorValues, codeString)) {\n return error_constants_1.errorValues[codeString].message;\n }\n if (isJsonRpcServerError(code)) {\n return exports.JSON_RPC_SERVER_ERROR_MESSAGE;\n }\n }\n return fallbackMessage;\n}\nexports.getMessageFromCode = getMessageFromCode;\n/**\n * Returns whether the given code is valid.\n * A code is only valid if it has a message.\n */\nfunction isValidCode(code) {\n if (!Number.isInteger(code)) {\n return false;\n }\n const codeString = code.toString();\n if (error_constants_1.errorValues[codeString]) {\n return true;\n }\n if (isJsonRpcServerError(code)) {\n return true;\n }\n return false;\n}\nexports.isValidCode = isValidCode;\n/**\n * Serializes the given error to an Ethereum JSON RPC-compatible error object.\n * Merely copies the given error's values if it is already compatible.\n * If the given error is not fully compatible, it will be preserved on the\n * returned object's data.originalError property.\n */\nfunction serializeError(error, { fallbackError = FALLBACK_ERROR, shouldIncludeStack = false, } = {}) {\n var _a, _b;\n if (!fallbackError ||\n !Number.isInteger(fallbackError.code) ||\n typeof fallbackError.message !== 'string') {\n throw new Error('Must provide fallback error with integer number code and string message.');\n }\n if (error instanceof classes_1.EthereumRpcError) {\n return error.serialize();\n }\n const serialized = {};\n if (error &&\n typeof error === 'object' &&\n !Array.isArray(error) &&\n hasKey(error, 'code') &&\n isValidCode(error.code)) {\n const _error = error;\n serialized.code = _error.code;\n if (_error.message && typeof _error.message === 'string') {\n serialized.message = _error.message;\n if (hasKey(_error, 'data')) {\n serialized.data = _error.data;\n }\n }\n else {\n serialized.message = getMessageFromCode(serialized.code);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n }\n else {\n serialized.code = fallbackError.code;\n const message = (_a = error) === null || _a === void 0 ? void 0 : _a.message;\n serialized.message = (message && typeof message === 'string'\n ? message\n : fallbackError.message);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n const stack = (_b = error) === null || _b === void 0 ? void 0 : _b.stack;\n if (shouldIncludeStack && error && stack && typeof stack === 'string') {\n serialized.stack = stack;\n }\n return serialized;\n}\nexports.serializeError = serializeError;\n// Internal\nfunction isJsonRpcServerError(code) {\n return code >= -32099 && code <= -32000;\n}\nfunction assignOriginalError(error) {\n if (error && typeof error === 'object' && !Array.isArray(error)) {\n return Object.assign({}, error);\n }\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CLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQztLQUNqRTtJQUVELE1BQU0sS0FBSyxTQUFJLEtBQWEsMENBQUUsS0FBSyxDQUFDO0lBRXBDLElBQUksa0JBQWtCLElBQUksS0FBSyxJQUFJLEtBQUssSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7UUFDckUsVUFBVSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7S0FDMUI7SUFDRCxPQUFPLFVBQXdDLENBQUM7QUFDbEQsQ0FBQztBQWxFRCx3Q0FrRUM7QUFFRCxXQUFXO0FBRVgsU0FBUyxvQkFBb0IsQ0FBQyxJQUFZO0lBQ3hDLE9BQU8sSUFBSSxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQztBQUMxQyxDQUFDO0FBRUQsU0FBUyxtQkFBbUIsQ0FBQyxLQUFjO0lBQ3pDLElBQUksS0FBSyxJQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsSUFBSSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDL0QsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztLQUNqQztJQUNELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQUVELFNBQVMsTUFBTSxDQUFDLEdBQTRCLEVBQUUsR0FBVztJQUN2RCxPQUFPLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDeEQsQ0FBQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ethErrors = void 0;\nconst classes_1 = require(\"./classes\");\nconst utils_1 = require(\"./utils\");\nconst error_constants_1 = require(\"./error-constants\");\nexports.ethErrors = {\n rpc: {\n /**\n * Get a JSON RPC 2.0 Parse (-32700) error.\n */\n parse: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.parse, arg),\n /**\n * Get a JSON RPC 2.0 Invalid Request (-32600) error.\n */\n invalidRequest: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidRequest, arg),\n /**\n * Get a JSON RPC 2.0 Invalid Params (-32602) error.\n */\n invalidParams: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidParams, arg),\n /**\n * Get a JSON RPC 2.0 Method Not Found (-32601) error.\n */\n methodNotFound: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotFound, arg),\n /**\n * Get a JSON RPC 2.0 Internal (-32603) error.\n */\n internal: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.internal, arg),\n /**\n * Get a JSON RPC 2.0 Server error.\n * Permits integer error codes in the [ -32099 <= -32005 ] range.\n * Codes -32000 through -32004 are reserved by EIP-1474.\n */\n server: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum RPC Server errors must provide single object argument.');\n }\n const { code } = opts;\n if (!Number.isInteger(code) || code > -32005 || code < -32099) {\n throw new Error('\"code\" must be an integer such that: -32099 <= code <= -32005');\n }\n return getEthJsonRpcError(code, opts);\n },\n /**\n * Get an Ethereum JSON RPC Invalid Input (-32000) error.\n */\n invalidInput: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidInput, arg),\n /**\n * Get an Ethereum JSON RPC Resource Not Found (-32001) error.\n */\n resourceNotFound: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceNotFound, arg),\n /**\n * Get an Ethereum JSON RPC Resource Unavailable (-32002) error.\n */\n resourceUnavailable: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceUnavailable, arg),\n /**\n * Get an Ethereum JSON RPC Transaction Rejected (-32003) error.\n */\n transactionRejected: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.transactionRejected, arg),\n /**\n * Get an Ethereum JSON RPC Method Not Supported (-32004) error.\n */\n methodNotSupported: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotSupported, arg),\n /**\n * Get an Ethereum JSON RPC Limit Exceeded (-32005) error.\n */\n limitExceeded: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.limitExceeded, arg),\n },\n provider: {\n /**\n * Get an Ethereum Provider User Rejected Request (4001) error.\n */\n userRejectedRequest: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.userRejectedRequest, arg);\n },\n /**\n * Get an Ethereum Provider Unauthorized (4100) error.\n */\n unauthorized: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.unauthorized, arg);\n },\n /**\n * Get an Ethereum Provider Unsupported Method (4200) error.\n */\n unsupportedMethod: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.unsupportedMethod, arg);\n },\n /**\n * Get an Ethereum Provider Not Connected (4900) error.\n */\n disconnected: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.disconnected, arg);\n },\n /**\n * Get an Ethereum Provider Chain Not Connected (4901) error.\n */\n chainDisconnected: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.chainDisconnected, arg);\n },\n /**\n * Get a custom Ethereum Provider error.\n */\n custom: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum Provider custom errors must provide single object argument.');\n }\n const { code, message, data } = opts;\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string');\n }\n return new classes_1.EthereumProviderError(code, message, data);\n },\n },\n};\n// Internal\nfunction getEthJsonRpcError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new classes_1.EthereumRpcError(code, message || utils_1.getMessageFromCode(code), data);\n}\nfunction getEthProviderError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new classes_1.EthereumProviderError(code, message || utils_1.getMessageFromCode(code), data);\n}\nfunction parseOpts(arg) {\n if (arg) {\n if (typeof arg === 'string') {\n return [arg];\n }\n else if (typeof arg === 'object' && !Array.isArray(arg)) {\n const { message, data } = arg;\n if (message && typeof message !== 'string') {\n throw new Error('Must specify string message.');\n }\n return [message || undefined, data];\n }\n }\n return [];\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Vycm9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1Q0FBb0U7QUFDcEUsbUNBQTZDO0FBQzdDLHVEQUErQztBQWVsQyxRQUFBLFNBQVMsR0FBRztJQUN2QixHQUFHLEVBQUU7UUFFSDs7V0FFRztRQUNILEtBQUssRUFBRSxDQUFJLEdBQXFCLEVBQUUsRUFBRSxDQUFDLGtCQUFrQixDQUNyRCw0QkFBVSxDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUMxQjtRQUVEOztXQUVHO1FBQ0gsY0FBYyxFQUFFLENBQUksR0FBcUIsRUFBRSxFQUFFLENBQUMsa0JBQWtCLENBQzlELDRCQUFVLENBQUMsR0FBRyxDQUFDLGNBQWMsRUFBRSxHQUFHLENBQ25DO1FBRUQ7O1dBRUc7UUFDSCxhQUFhLEVBQUUsQ0FBSSxHQUFxQixFQUFFLEVBQUUsQ0FBQyxrQkFBa0IsQ0FDN0QsNEJBQVUsQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLEdBQUcsQ0FDbEM7UUFFRDs7V0FFRztRQUNILGNBQWMsRUFBRSxDQUFJLEdBQXFCLEVBQUUsRUFBRSxDQUFDLGtCQUFrQixDQUM5RCw0QkFBVSxDQUFDLEdBQUcsQ0FBQyxjQUFjLEVBQUUsR0FBRyxDQUNuQztRQUVEOztXQUVHO1FBQ0gsUUFBUSxFQUFFLENBQUksR0FBcUIsRUFBRSxFQUFFLENBQUMsa0JBQWtCLENBQ3hELDRCQUFV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ports.getMessageFromCode = exports.serializeError = exports.EthereumProviderError = exports.EthereumRpcError = exports.ethErrors = exports.errorCodes = void 0;\nconst classes_1 = require(\"./classes\");\nObject.defineProperty(exports, \"EthereumRpcError\", { enumerable: true, get: function () { return classes_1.EthereumRpcError; } });\nObject.defineProperty(exports, \"EthereumProviderError\", { enumerable: true, get: function () { return classes_1.EthereumProviderError; } });\nconst utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"serializeError\", { enumerable: true, get: function () { return utils_1.serializeError; } });\nObject.defineProperty(exports, \"getMessageFromCode\", { enumerable: true, get: function () { return utils_1.getMessageFromCode; } });\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ethErrors\", { enumerable: true, get: function () { return errors_1.ethErrors; } });\nconst error_constants_1 = require(\"./error-constants\");\nObject.defineProperty(exports, \"errorCodes\", { enumerable: true, get: function () { return error_constants_1.errorCodes; } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsdUNBQW9FO0FBVWxFLGlHQVZPLDBCQUFnQixPQVVQO0FBQ2hCLHNHQVh5QiwrQkFBcUIsT0FXekI7QUFWdkIsbUNBRWlCO0FBU2YsK0ZBVkEsc0JBQWMsT0FVQTtBQUNkLG1HQVhnQiwwQkFBa0IsT0FXaEI7QUFUcEIscUNBQXFDO0FBS25DLDBGQUxPLGtCQUFTLE9BS1A7QUFKWCx1REFBK0M7QUFHN0MsMkZBSE8sNEJBQVUsT0FHUCJ9","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonRpcEngine = void 0;\nconst safe_event_emitter_1 = __importDefault(require(\"@metamask/safe-event-emitter\"));\nconst eth_rpc_errors_1 = require(\"eth-rpc-errors\");\n/**\n * A JSON-RPC request and response processor.\n * Give it a stack of middleware, pass it requests, and get back responses.\n */\nclass JsonRpcEngine extends safe_event_emitter_1.default {\n constructor() {\n super();\n this._middleware = [];\n }\n /**\n * Add a middleware function to the engine's middleware stack.\n *\n * @param middleware - The middleware function to add.\n */\n push(middleware) {\n this._middleware.push(middleware);\n }\n handle(req, cb) {\n if (cb && typeof cb !== 'function') {\n throw new Error('\"callback\" must be a function if provided.');\n }\n if (Array.isArray(req)) {\n if (cb) {\n return this._handleBatch(req, cb);\n }\n return this._handleBatch(req);\n }\n if (cb) {\n return this._handle(req, cb);\n }\n return this._promiseHandle(req);\n }\n /**\n * Returns this engine as a middleware function that can be pushed to other\n * engines.\n *\n * @returns This engine as a middleware function.\n */\n asMiddleware() {\n return async (req, res, next, end) => {\n try {\n const [middlewareError, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n if (isComplete) {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n return end(middlewareError);\n }\n return next(async (handlerCallback) => {\n try {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n }\n catch (error) {\n return handlerCallback(error);\n }\n return handlerCallback();\n });\n }\n catch (error) {\n return end(error);\n }\n };\n }\n async _handleBatch(reqs, cb) {\n // The order here is important\n try {\n // 2. Wait for all requests to finish, or throw on some kind of fatal\n // error\n const responses = await Promise.all(\n // 1. Begin executing each request in the order received\n reqs.map(this._promiseHandle.bind(this)));\n // 3. Return batch response\n if (cb) {\n return cb(null, responses);\n }\n return responses;\n }\n catch (error) {\n if (cb) {\n return cb(error);\n }\n throw error;\n }\n }\n /**\n * A promise-wrapped _handle.\n */\n _promiseHandle(req) {\n return new Promise((resolve) => {\n this._handle(req, (_err, res) => {\n // There will always be a response, and it will always have any error\n // that is caught and propagated.\n resolve(res);\n });\n });\n }\n /**\n * Ensures that the request object is valid, processes it, and passes any\n * error and the response object to the given callback.\n *\n * Does not reject.\n */\n async _handle(callerReq, cb) {\n if (!callerReq ||\n Array.isArray(callerReq) ||\n typeof callerReq !== 'object') {\n const error = new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.invalidRequest, `Requests must be plain objects. Received: ${typeof callerReq}`, { request: callerReq });\n return cb(error, { id: undefined, jsonrpc: '2.0', error });\n }\n if (typeof callerReq.method !== 'string') {\n const error = new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.invalidRequest, `Must specify a string method. Received: ${typeof callerReq.method}`, { request: callerReq });\n return cb(error, { id: callerReq.id, jsonrpc: '2.0', error });\n }\n const req = Object.assign({}, callerReq);\n const res = {\n id: req.id,\n jsonrpc: req.jsonrpc,\n };\n let error = null;\n try {\n await this._processRequest(req, res);\n }\n catch (_error) {\n // A request handler error, a re-thrown middleware error, or something\n // unexpected.\n error = _error;\n }\n if (error) {\n // Ensure no result is present on an errored response\n delete res.result;\n if (!res.error) {\n res.error = eth_rpc_errors_1.serializeError(error);\n }\n }\n return cb(error, res);\n }\n /**\n * For the given request and response, runs all middleware and their return\n * handlers, if any, and ensures that internal request processing semantics\n * are satisfied.\n */\n async _processRequest(req, res) {\n const [error, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n // Throw if \"end\" was not called, or if the response has neither a result\n // nor an error.\n JsonRpcEngine._checkForCompletion(req, res, isComplete);\n // The return handlers should run even if an error was encountered during\n // middleware processing.\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n // Now we re-throw the middleware processing error, if any, to catch it\n // further up the call chain.\n if (error) {\n throw error;\n }\n }\n /**\n * Serially executes the given stack of middleware.\n *\n * @returns An array of any error encountered during middleware execution,\n * a boolean indicating whether the request was completed, and an array of\n * middleware-defined return handlers.\n */\n static async _runAllMiddleware(req, res, middlewareStack) {\n const returnHandlers = [];\n let error = null;\n let isComplete = false;\n // Go down stack of middleware, call and collect optional returnHandlers\n for (const middleware of middlewareStack) {\n [error, isComplete] = await JsonRpcEngine._runMiddleware(req, res, middleware, returnHandlers);\n if (isComplete) {\n break;\n }\n }\n return [error, isComplete, returnHandlers.reverse()];\n }\n /**\n * Runs an individual middleware.\n *\n * @returns An array of any error encountered during middleware exection,\n * and a boolean indicating whether the request should end.\n */\n static _runMiddleware(req, res, middleware, returnHandlers) {\n return new Promise((resolve) => {\n const end = (err) => {\n const error = err || res.error;\n if (error) {\n res.error = eth_rpc_errors_1.serializeError(error);\n }\n // True indicates that the request should end\n resolve([error, true]);\n };\n const next = (returnHandler) => {\n if (res.error) {\n end(res.error);\n }\n else {\n if (returnHandler) {\n if (typeof returnHandler !== 'function') {\n end(new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: \"next\" return handlers must be functions. ` +\n `Received \"${typeof returnHandler}\" for request:\\n${jsonify(req)}`, { request: req }));\n }\n returnHandlers.push(returnHandler);\n }\n // False indicates that the request should not end\n resolve([null, false]);\n }\n };\n try {\n middleware(req, res, next, end);\n }\n catch (error) {\n end(error);\n }\n });\n }\n /**\n * Serially executes array of return handlers. The request and response are\n * assumed to be in their scope.\n */\n static async _runReturnHandlers(handlers) {\n for (const handler of handlers) {\n await new Promise((resolve, reject) => {\n handler((err) => (err ? reject(err) : resolve()));\n });\n }\n }\n /**\n * Throws an error if the response has neither a result nor an error, or if\n * the \"isComplete\" flag is falsy.\n */\n static _checkForCompletion(req, res, isComplete) {\n if (!('result' in res) && !('error' in res)) {\n throw new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: Response has no error or result for request:\\n${jsonify(req)}`, { request: req });\n }\n if (!isComplete) {\n throw new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: Nothing ended request:\\n${jsonify(req)}`, { request: req });\n }\n }\n}\nexports.JsonRpcEngine = JsonRpcEngine;\nfunction jsonify(request) {\n return J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LENBQUM7QUFDMUMsQ0FBQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeMiddleware = void 0;\nconst JsonRpcEngine_1 = require(\"./JsonRpcEngine\");\nfunction mergeMiddleware(middlewareStack) {\n const engine = new JsonRpcEngine_1.JsonRpcEngine();\n middlewareStack.forEach((middleware) => engine.push(middleware));\n return engine.asMiddleware();\n}\nexports.mergeMiddleware = mergeMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVyZ2VNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21lcmdlTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFBbUU7QUFFbkUsU0FBZ0IsZUFBZSxDQUFDLGVBQXNEO0lBQ3BGLE1BQU0sTUFBTSxHQUFHLElBQUksNkJBQWEsRUFBRSxDQUFDO0lBQ25DLGVBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxVQUFVLEVBQUUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztJQUNqRSxPQUFPLE1BQU0sQ0FBQyxZQUFZLEVBQUUsQ0FBQztBQUMvQixDQUFDO0FBSkQsMENBSUMifQ==","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./idRemapMiddleware\"), exports);\n__exportStar(require(\"./createAsyncMiddleware\"), exports);\n__exportStar(require(\"./createScaffoldMiddleware\"), exports);\n__exportStar(require(\"./getUniqueId\"), exports);\n__exportStar(require(\"./JsonRpcEngine\"), exports);\n__exportStar(require(\"./mergeMiddleware\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsc0RBQW9DO0FBQ3BDLDBEQUF3QztBQUN4Qyw2REFBMkM7QUFDM0MsZ0RBQThCO0FBQzlCLGtEQUFnQztBQUNoQyxvREFBa0MifQ==","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Semaphore = /** @class */ (function () {\n function Semaphore(_maxConcurrency) {\n this._maxConcurrency = _maxConcurrency;\n this._queue = [];\n if (_maxConcurrency <= 0) {\n throw new Error('semaphore must be initialized to a positive value');\n }\n this._value = _maxConcurrency;\n }\n Semaphore.prototype.acquire = function () {\n var _this = this;\n var locked = this.isLocked();\n var ticket = new Promise(function (r) { return _this._queue.push(r); });\n if (!locked)\n this._dispatch();\n return ticket;\n };\n Semaphore.prototype.runExclusive = function (callback) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _a, value, release;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, this.acquire()];\n case 1:\n _a = _b.sent(), value = _a[0], release = _a[1];\n _b.label = 2;\n case 2:\n _b.trys.push([2, , 4, 5]);\n return [4 /*yield*/, callback(value)];\n case 3: return [2 /*return*/, _b.sent()];\n case 4:\n release();\n return [7 /*endfinally*/];\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n Semaphore.prototype.isLocked = function () {\n return this._value <= 0;\n };\n Semaphore.prototype.release = function () {\n if (this._maxConcurrency > 1) {\n throw new Error('this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead');\n }\n if (this._currentReleaser) {\n var releaser = this._currentReleaser;\n this._currentReleaser = undefined;\n releaser();\n }\n };\n Semaphore.prototype._dispatch = function () {\n var _this = this;\n var nextConsumer = this._queue.shift();\n if (!nextConsumer)\n return;\n var released = false;\n this._currentReleaser = function () {\n if (released)\n return;\n released = true;\n _this._value++;\n _this._dispatch();\n };\n nextConsumer([this._value--, this._currentReleaser]);\n };\n return Semaphore;\n}());\nexports.default = Semaphore;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Semaphore_1 = require(\"./Semaphore\");\nvar Mutex = /** @class */ (function () {\n function Mutex() {\n this._semaphore = new Semaphore_1.default(1);\n }\n Mutex.prototype.acquire = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _a, releaser;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, this._semaphore.acquire()];\n case 1:\n _a = _b.sent(), releaser = _a[1];\n return [2 /*return*/, releaser];\n }\n });\n });\n };\n Mutex.prototype.runExclusive = function (callback) {\n return this._semaphore.runExclusive(function () { return callback(); });\n };\n Mutex.prototype.isLocked = function () {\n return this._semaphore.isLocked();\n };\n Mutex.prototype.release = function () {\n this._semaphore.release();\n };\n return Mutex;\n}());\nexports.default = Mutex;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.withTimeout = void 0;\nvar tslib_1 = require(\"tslib\");\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction withTimeout(sync, timeout, timeoutError) {\n var _this = this;\n if (timeoutError === void 0) { timeoutError = new Error('timeout'); }\n return {\n acquire: function () {\n return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var isTimeout, ticket, release;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n isTimeout = false;\n setTimeout(function () {\n isTimeout = true;\n reject(timeoutError);\n }, timeout);\n return [4 /*yield*/, sync.acquire()];\n case 1:\n ticket = _a.sent();\n if (isTimeout) {\n release = Array.isArray(ticket) ? ticket[1] : ticket;\n release();\n }\n else {\n resolve(ticket);\n }\n return [2 /*return*/];\n }\n });\n }); });\n },\n runExclusive: function (callback) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var release, ticket;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n release = function () { return undefined; };\n _a.label = 1;\n case 1:\n _a.trys.push([1, , 7, 8]);\n return [4 /*yield*/, this.acquire()];\n case 2:\n ticket = _a.sent();\n if (!Array.isArray(ticket)) return [3 /*break*/, 4];\n release = ticket[1];\n return [4 /*yield*/, callback(ticket[0])];\n case 3: return [2 /*return*/, _a.sent()];\n case 4:\n release = ticket;\n return [4 /*yield*/, callback()];\n case 5: return [2 /*return*/, _a.sent()];\n case 6: return [3 /*break*/, 8];\n case 7:\n release();\n return [7 /*endfinally*/];\n case 8: return [2 /*return*/];\n }\n });\n });\n },\n release: function () {\n sync.release();\n },\n isLocked: function () { return sync.isLocked(); },\n };\n}\nexports.withTimeout = withTimeout;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.withTimeout = exports.Semaphore = exports.Mutex = void 0;\nvar Mutex_1 = require(\"./Mutex\");\nObject.defineProperty(exports, \"Mutex\", { enumerable: true, get: function () { return Mutex_1.default; } });\nvar Semaphore_1 = require(\"./Semaphore\");\nObject.defineProperty(exports, \"Semaphore\", { enumerable: true, get: function () { return Semaphore_1.default; } });\nvar withTimeout_1 = require(\"./withTimeout\");\nObject.defineProperty(exports, \"withTimeout\", { enumerable: true, get: function () { return withTimeout_1.withTimeout; } });\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","const extend = require('xtend')\nconst createRandomId = require('json-rpc-random-id')()\n\nmodule.exports = EthQuery\n\n\nfunction EthQuery(provider){\n const self = this\n self.currentProvider = provider\n}\n\n//\n// base queries\n//\n\n// default block\nEthQuery.prototype.getBalance = generateFnWithDefaultBlockFor(2, 'eth_getBalance')\nEthQuery.prototype.getCode = generateFnWithDefaultBlockFor(2, 'eth_getCode')\nEthQuery.prototype.getTransactionCount = generateFnWithDefaultBlockFor(2, 'eth_getTransactionCount')\nEthQuery.prototype.getStorageAt = generateFnWithDefaultBlockFor(3, 'eth_getStorageAt')\nEthQuery.prototype.call = generateFnWithDefaultBlockFor(2, 'eth_call')\n// standard\nEthQuery.prototype.protocolVersion = generateFnFor('eth_protocolVersion')\nEthQuery.prototype.syncing = generateFnFor('eth_syncing')\nEthQuery.prototype.coinbase = generateFnFor('eth_coinbase')\nEthQuery.prototype.mining = generateFnFor('eth_mining')\nEthQuery.prototype.hashrate = generateFnFor('eth_hashrate')\nEthQuery.prototype.gasPrice = generateFnFor('eth_gasPrice')\nEthQuery.prototype.accounts = generateFnFor('eth_accounts')\nEthQuery.prototype.blockNumber = generateFnFor('eth_blockNumber')\nEthQuery.prototype.getBlockTransactionCountByHash = generateFnFor('eth_getBlockTransactionCountByHash')\nEthQuery.prototype.getBlockTransactionCountByNumber = generateFnFor('eth_getBlockTransactionCountByNumber')\nEthQuery.prototype.getUncleCountByBlockHash = generateFnFor('eth_getUncleCountByBlockHash')\nEthQuery.prototype.getUncleCountByBlockNumber = generateFnFor('eth_getUncleCountByBlockNumber')\nEthQuery.prototype.sign = generateFnFor('eth_sign')\nEthQuery.prototype.sendTransaction = generateFnFor('eth_sendTransaction')\nEthQuery.prototype.sendRawTransaction = generateFnFor('eth_sendRawTransaction')\nEthQuery.prototype.estimateGas = generateFnFor('eth_estimateGas')\nEthQuery.prototype.getBlockByHash = generateFnFor('eth_getBlockByHash')\nEthQuery.prototype.getBlockByNumber = generateFnFor('eth_getBlockByNumber')\nEthQuery.prototype.getTransactionByHash = generateFnFor('eth_getTransactionByHash')\nEthQuery.prototype.getTransactionByBlockHashAndIndex = generateFnFor('eth_getTransactionByBlockHashAndIndex')\nEthQuery.prototype.getTransactionByBlockNumberAndIndex = generateFnFor('eth_getTransactionByBlockNumberAndIndex')\nEthQuery.prototype.getTransactionReceipt = generateFnFor('eth_getTransactionReceipt')\nEthQuery.prototype.getUncleByBlockHashAndIndex = generateFnFor('eth_getUncleByBlockHashAndIndex')\nEthQuery.prototype.getUncleByBlockNumberAndIndex = generateFnFor('eth_getUncleByBlockNumberAndIndex')\nEthQuery.prototype.getCompilers = generateFnFor('eth_getCompilers')\nEthQuery.prototype.compileLLL = generateFnFor('eth_compileLLL')\nEthQuery.prototype.compileSolidity = generateFnFor('eth_compileSolidity')\nEthQuery.prototype.compileSerpent = generateFnFor('eth_compileSerpent')\nEthQuery.prototype.newFilter = generateFnFor('eth_newFilter')\nEthQuery.prototype.newBlockFilter = generateFnFor('eth_newBlockFilter')\nEthQuery.prototype.newPendingTransactionFilter = generateFnFor('eth_newPendingTransactionFilter')\nEthQuery.prototype.uninstallFilter = generateFnFor('eth_uninstallFilter')\nEthQuery.prototype.getFilterChanges = generateFnFor('eth_getFilterChanges')\nEthQuery.prototype.getFilterLogs = generateFnFor('eth_getFilterLogs')\nEthQuery.prototype.getLogs = generateFnFor('eth_getLogs')\nEthQuery.prototype.getWork = generateFnFor('eth_getWork')\nEthQuery.prototype.submitWork = generateFnFor('eth_submitWork')\nEthQuery.prototype.submitHashrate = generateFnFor('eth_submitHashrate')\n\n// network level\n\nEthQuery.prototype.sendAsync = function(opts, cb){\n const self = this\n self.currentProvider.sendAsync(createPayload(opts), function(err, response){\n if (!err && response.error) err = new Error('EthQuery - RPC Error - '+response.error.message)\n if (err) return cb(err)\n cb(null, response.result)\n })\n}\n\n// util\n\nfunction generateFnFor(methodName){\n return function(){\n const self = this\n var args = [].slice.call(arguments)\n var cb = args.pop()\n self.sendAsync({\n method: methodName,\n params: args,\n }, cb)\n }\n}\n\nfunction generateFnWithDefaultBlockFor(argCount, methodName){\n return function(){\n const self = this\n var args = [].slice.call(arguments)\n var cb = args.pop()\n // set optional default block param\n if (args.length < argCount) args.push('latest')\n self.sendAsync({\n method: methodName,\n params: args,\n }, cb)\n }\n}\n\nfunction createPayload(data){\n return extend({\n // defaults\n id: createRandomId(),\n jsonrpc: '2.0',\n params: [],\n // user-specified\n }, data)\n}\n","'use strict';\n\nconst processFn = (fn, options, proxy, unwrapped) => function (...arguments_) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targuments_.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targuments_.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targuments_.push(resolve);\n\t\t}\n\n\t\tconst self = this === proxy ? unwrapped : this;\n\t\tReflect.apply(fn, self, arguments_);\n\t});\n};\n\nconst filterCache = new WeakMap();\n\nmodule.exports = (input, options) => {\n\toptions = {\n\t\texclude: [/.+(?:Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise,\n\t\t...options\n\t};\n\n\tconst objectType = typeof input;\n\tif (!(input !== null && (objectType === 'object' || objectType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objectType}\\``);\n\t}\n\n\tconst filter = (target, key) => {\n\t\tlet cached = filterCache.get(target);\n\n\t\tif (!cached) {\n\t\t\tcached = {};\n\t\t\tfilterCache.set(target, cached);\n\t\t}\n\n\t\tif (key in cached) {\n\t\t\treturn cached[key];\n\t\t}\n\n\t\tconst match = pattern => (typeof pattern === 'string' || typeof key === 'symbol') ? key === pattern : pattern.test(key);\n\t\tconst desc = Reflect.getOwnPropertyDescriptor(target, key);\n\t\tconst writableOrConfigurableOwn = (desc === undefined || desc.writable || desc.configurable);\n\t\tconst included = options.include ? options.include.some(match) : !options.exclude.some(match);\n\t\tconst shouldFilter = included && writableOrConfigurableOwn;\n\t\tcached[key] = shouldFilter;\n\t\treturn shouldFilter;\n\t};\n\n\tconst cache = new WeakMap();\n\n\tconst proxy = new Proxy(input, {\n\t\tapply(target, thisArg, args) {\n\t\t\tconst cached = cache.get(target);\n\n\t\t\tif (cached) {\n\t\t\t\treturn Reflect.apply(cached, thisArg, args);\n\t\t\t}\n\n\t\t\tconst pified = options.excludeMain ? target : processFn(target, options, proxy, target);\n\t\t\tcache.set(target, pified);\n\t\t\treturn Reflect.apply(pified, thisArg, args);\n\t\t},\n\n\t\tget(target, key) {\n\t\t\tconst property = target[key];\n\n\t\t\t// eslint-disable-next-line no-use-extend-native/no-use-extend-native\n\t\t\tif (!filter(target, key) || property === Function.prototype[key]) {\n\t\t\t\treturn property;\n\t\t\t}\n\n\t\t\tconst cached = cache.get(property);\n\n\t\t\tif (cached) {\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tif (typeof property === 'function') {\n\t\t\t\tconst pified = processFn(property, options, proxy, target);\n\t\t\t\tcache.set(property, pified);\n\t\t\t\treturn pified;\n\t\t\t}\n\n\t\t\treturn property;\n\t\t}\n\t});\n\n\treturn proxy;\n};\n","const SafeEventEmitter = require('@metamask/safe-event-emitter').default\n\nclass BaseFilter extends SafeEventEmitter {\n\n constructor () {\n super()\n this.updates = []\n }\n\n async initialize () {}\n\n async update () {\n throw new Error('BaseFilter - no update method specified')\n }\n\n addResults (newResults) {\n this.updates = this.updates.concat(newResults)\n newResults.forEach(result => this.emit('update', result))\n }\n\n addInitialResults (newResults) {}\n\n getChangesAndClear () {\n const updates = this.updates\n this.updates = []\n return updates\n }\n \n}\n\nmodule.exports = BaseFilter\n","const BaseFilter = require('./base-filter')\n\n// tracks all results ever recorded\nclass BaseFilterWithHistory extends BaseFilter {\n\n constructor () {\n super()\n this.allResults = []\n }\n\n async update () {\n throw new Error('BaseFilterWithHistory - no update method specified')\n }\n\n addResults (newResults) {\n this.allResults = this.allResults.concat(newResults)\n super.addResults(newResults)\n }\n\n addInitialResults (newResults) {\n this.allResults = this.allResults.concat(newResults)\n super.addInitialResults(newResults)\n }\n\n getAllResults () {\n return this.allResults\n }\n\n}\n\nmodule.exports = BaseFilterWithHistory","\nmodule.exports = {\n minBlockRef,\n maxBlockRef,\n sortBlockRefs,\n bnToHex,\n blockRefIsNumber,\n hexToInt,\n incrementHexInt,\n intToHex,\n unsafeRandomBytes,\n}\n\nfunction minBlockRef(...refs) {\n const sortedRefs = sortBlockRefs(refs)\n return sortedRefs[0]\n}\n\nfunction maxBlockRef(...refs) {\n const sortedRefs = sortBlockRefs(refs)\n return sortedRefs[sortedRefs.length-1]\n}\n\nfunction sortBlockRefs(refs) {\n return refs.sort((refA, refB) => {\n if (refA === 'latest' || refB === 'earliest') return 1\n if (refB === 'latest' || refA === 'earliest') return -1\n return hexToInt(refA) - hexToInt(refB)\n })\n}\n\nfunction bnToHex(bn) {\n return '0x' + bn.toString(16)\n}\n\nfunction blockRefIsNumber(blockRef){\n return blockRef && !['earliest', 'latest', 'pending'].includes(blockRef)\n}\n\nfunction hexToInt(hexString) {\n if (hexString === undefined || hexString === null) return hexString\n return Number.parseInt(hexString, 16)\n}\n\nfunction incrementHexInt(hexString){\n if (hexString === undefined || hexString === null) return hexString\n const value = hexToInt(hexString)\n return intToHex(value + 1)\n}\n\nfunction intToHex(int) {\n if (int === undefined || int === null) return int\n let hexString = int.toString(16)\n const needsLeftPad = hexString.length % 2\n if (needsLeftPad) hexString = '0' + hexString\n return '0x' + hexString\n}\n\nfunction unsafeRandomBytes(byteCount) {\n let result = '0x'\n for (let i = 0; i < byteCount; i++) {\n result += unsafeRandomNibble()\n result += unsafeRandomNibble()\n }\n return result\n}\n\nfunction unsafeRandomNibble() {\n return Math.floor(Math.random() * 16).toString(16)\n}\n","const EthQuery = require('eth-query')\nconst pify = require('pify')\nconst BaseFilterWithHistory = require('./base-filter-history')\nconst { bnToHex, hexToInt, incrementHexInt, minBlockRef, blockRefIsNumber } = require('./hexUtils')\n\nclass LogFilter extends BaseFilterWithHistory {\n\n constructor ({ provider, params }) {\n super()\n this.type = 'log'\n this.ethQuery = new EthQuery(provider)\n this.params = Object.assign({\n fromBlock: 'latest',\n toBlock: 'latest',\n address: undefined,\n topics: [],\n }, params)\n // normalize address parameter\n if (this.params.address) {\n // ensure array\n if (!Array.isArray(this.params.address)) {\n this.params.address = [this.params.address]\n }\n // ensure lowercase\n this.params.address = this.params.address.map(address => address.toLowerCase())\n }\n }\n\n async initialize({ currentBlock }) {\n // resolve params.fromBlock\n let fromBlock = this.params.fromBlock\n if (['latest', 'pending'].includes(fromBlock)) fromBlock = currentBlock\n if ('earliest' === fromBlock) fromBlock = '0x0'\n this.params.fromBlock = fromBlock\n // set toBlock for initial lookup\n const toBlock = minBlockRef(this.params.toBlock, currentBlock)\n const params = Object.assign({}, this.params, { toBlock })\n // fetch logs and add to results\n const newLogs = await this._fetchLogs(params)\n this.addInitialResults(newLogs)\n }\n\n async update ({ oldBlock, newBlock }) {\n // configure params for this update\n const toBlock = newBlock\n let fromBlock\n // oldBlock is empty on first sync\n if (oldBlock) {\n fromBlock = incrementHexInt(oldBlock)\n } else {\n fromBlock = newBlock\n }\n // fetch logs\n const params = Object.assign({}, this.params, { fromBlock, toBlock })\n const newLogs = await this._fetchLogs(params)\n const matchingLogs = newLogs.filter(log => this.matchLog(log))\n\n // add to results\n this.addResults(matchingLogs)\n }\n\n async _fetchLogs (params) {\n const newLogs = await pify(cb => this.ethQuery.getLogs(params, cb))()\n // add to results\n return newLogs\n }\n\n matchLog(log) {\n // check if block number in bounds:\n if (hexToInt(this.params.fromBlock) >= hexToInt(log.blockNumber)) return false\n if (blockRefIsNumber(this.params.toBlock) && hexToInt(this.params.toBlock) <= hexToInt(log.blockNumber)) return false\n\n // address is correct:\n const normalizedLogAddress = log.address && log.address.toLowerCase()\n if (this.params.address && normalizedLogAddress && !this.params.address.includes(normalizedLogAddress)) return false\n\n // topics match:\n // topics are position-dependant\n // topics can be nested to represent `or` [[a || b], c]\n // topics can be null, representing a wild card for that position\n const topicsMatch = this.params.topics.every((topicPattern, index) => {\n // pattern is longer than actual topics\n let logTopic = log.topics[index]\n if (!logTopic) return false\n logTopic = logTopic.toLowerCase()\n // normalize subTopics\n let subtopicsToMatch = Array.isArray(topicPattern) ? topicPattern : [topicPattern]\n // check for wild card\n const subtopicsIncludeWildcard = subtopicsToMatch.includes(null)\n if (subtopicsIncludeWildcard) return true\n subtopicsToMatch = subtopicsToMatch.map(topic => topic.toLowerCase())\n // check each possible matching topic\n const topicDoesMatch = subtopicsToMatch.includes(logTopic)\n return topicDoesMatch\n })\n\n return topicsMatch\n }\n\n}\n\nmodule.exports = LogFilter\n","module.exports = getBlocksForRange\n\nasync function getBlocksForRange({ provider, fromBlock, toBlock }) {\n if (!fromBlock) fromBlock = toBlock\n\n const fromBlockNumber = hexToInt(fromBlock)\n const toBlockNumber = hexToInt(toBlock)\n const blockCountToQuery = toBlockNumber - fromBlockNumber + 1\n // load all blocks from old to new (inclusive)\n const missingBlockNumbers = Array(blockCountToQuery).fill()\n .map((_,index) => fromBlockNumber + index)\n .map(intToHex)\n let blockBodies = await Promise.all(\n missingBlockNumbers.map(blockNum => query(provider, 'eth_getBlockByNumber', [blockNum, false]))\n )\n blockBodies = blockBodies.filter(block => block !== null);\n return blockBodies\n}\n\nfunction hexToInt(hexString) {\n if (hexString === undefined || hexString === null) return hexString\n return Number.parseInt(hexString, 16)\n}\n\nfunction incrementHexInt(hexString){\n if (hexString === undefined || hexString === null) return hexString\n const value = hexToInt(hexString)\n return intToHex(value + 1)\n}\n\nfunction intToHex(int) {\n if (int === undefined || int === null) return int\n const hexString = int.toString(16)\n return '0x' + hexString\n}\n\nfunction sendAsync(provider, request) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(request, (error, response) => {\n if (error) {\n reject(error);\n } else if (response.error) {\n reject(response.error);\n } else if (response.result) {\n resolve(response.result);\n } else {\n reject(new Error(\"Result was empty\"));\n }\n });\n });\n}\n\nasync function query(provider, method, params) {\n for (let i = 0; i < 3; i++) {\n try {\n return await sendAsync(provider, {\n id: 1,\n jsonrpc: \"2.0\",\n method,\n params,\n });\n } catch (error) {\n console.error(\n `provider.sendAsync failed: ${error.stack || error.message || error}`\n );\n }\n }\n return null;\n}\n","const BaseFilter = require('./base-filter')\nconst getBlocksForRange = require('./getBlocksForRange')\nconst { incrementHexInt } = require('./hexUtils')\n\nclass BlockFilter extends BaseFilter {\n\n constructor ({ provider, params }) {\n super()\n this.type = 'block'\n this.provider = provider\n }\n\n async update ({ oldBlock, newBlock }) {\n const toBlock = newBlock\n const fromBlock = incrementHexInt(oldBlock)\n const blockBodies = await getBlocksForRange({ provider: this.provider, fromBlock, toBlock })\n const blockHashes = blockBodies.map((block) => block.hash)\n this.addResults(blockHashes)\n }\n\n}\n\nmodule.exports = BlockFilter\n","const BaseFilter = require('./base-filter')\nconst getBlocksForRange = require('./getBlocksForRange')\nconst { incrementHexInt } = require('./hexUtils')\n\nclass TxFilter extends BaseFilter {\n\n constructor ({ provider }) {\n super()\n this.type = 'tx'\n this.provider = provider\n }\n\n async update ({ oldBlock }) {\n const toBlock = oldBlock\n const fromBlock = incrementHexInt(oldBlock)\n const blocks = await getBlocksForRange({ provider: this.provider, fromBlock, toBlock })\n const blockTxHashes = []\n for (const block of blocks) {\n blockTxHashes.push(...block.transactions)\n }\n // add to results\n this.addResults(blockTxHashes)\n }\n\n}\n\nmodule.exports = TxFilter\n","const Mutex = require('async-mutex').Mutex\nconst { createAsyncMiddleware, createScaffoldMiddleware } = require('json-rpc-engine')\nconst LogFilter = require('./log-filter.js')\nconst BlockFilter = require('./block-filter.js')\nconst TxFilter = require('./tx-filter.js')\nconst { intToHex, hexToInt } = require('./hexUtils')\n\nmodule.exports = createEthFilterMiddleware\n\nfunction createEthFilterMiddleware({ blockTracker, provider }) {\n\n // create filter collection\n let filterIndex = 0\n let filters = {}\n // create update mutex\n const mutex = new Mutex()\n const waitForFree = mutexMiddlewareWrapper({ mutex })\n\n const middleware = createScaffoldMiddleware({\n // install filters\n eth_newFilter: waitForFree(toFilterCreationMiddleware(newLogFilter)),\n eth_newBlockFilter: waitForFree(toFilterCreationMiddleware(newBlockFilter)),\n eth_newPendingTransactionFilter: waitForFree(toFilterCreationMiddleware(newPendingTransactionFilter)),\n // uninstall filters\n eth_uninstallFilter: waitForFree(toAsyncRpcMiddleware(uninstallFilterHandler)),\n // checking filter changes\n eth_getFilterChanges: waitForFree(toAsyncRpcMiddleware(getFilterChanges)),\n eth_getFilterLogs: waitForFree(toAsyncRpcMiddleware(getFilterLogs)),\n })\n\n // setup filter updating and destroy handler\n const filterUpdater = async ({ oldBlock, newBlock }) => {\n if (filters.length === 0) return\n // lock update reads\n const releaseLock = await mutex.acquire()\n try {\n // process all filters in parallel\n await Promise.all(objValues(filters).map(async (filter) => {\n try {\n await filter.update({ oldBlock, newBlock })\n } catch (err) {\n // handle each error individually so filter update errors don't affect other filters\n console.error(err)\n }\n }))\n } catch (err) {\n // log error so we don't skip the releaseLock\n console.error(err)\n }\n // unlock update reads\n releaseLock()\n }\n\n // expose filter methods directly\n middleware.newLogFilter = newLogFilter\n middleware.newBlockFilter = newBlockFilter\n middleware.newPendingTransactionFilter = newPendingTransactionFilter\n middleware.uninstallFilter = uninstallFilterHandler\n middleware.getFilterChanges = getFilterChanges\n middleware.getFilterLogs = getFilterLogs\n\n // expose destroy method for cleanup\n middleware.destroy = () => {\n uninstallAllFilters()\n }\n\n return middleware\n\n //\n // new filters\n //\n\n async function newLogFilter(params) {\n const filter = new LogFilter({ provider, params })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n async function newBlockFilter() {\n const filter = new BlockFilter({ provider })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n async function newPendingTransactionFilter() {\n const filter = new TxFilter({ provider })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n //\n // get filter changes\n //\n\n async function getFilterChanges(filterIndexHex) {\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n if (!filter) {\n throw new Error(`No filter for index \"${filterIndex}\"`)\n }\n const results = filter.getChangesAndClear()\n return results\n }\n\n async function getFilterLogs(filterIndexHex) {\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n if (!filter) {\n throw new Error(`No filter for index \"${filterIndex}\"`)\n }\n // only return results for log filters\n let results = []\n if (filter.type === 'log') {\n results = filter.getAllResults()\n }\n return results\n }\n\n\n //\n // remove filters\n //\n\n\n async function uninstallFilterHandler(filterIndexHex) {\n // check filter exists\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n const result = Boolean(filter)\n // uninstall filter\n if (result) {\n await uninstallFilter(filterIndex)\n }\n return result\n }\n\n //\n // utils\n //\n\n async function installFilter(filter) {\n const prevFilterCount = objValues(filters).length\n // install filter\n const currentBlock = await blockTracker.getLatestBlock()\n await filter.initialize({ currentBlock })\n filterIndex++\n filters[filterIndex] = filter\n filter.id = filterIndex\n filter.idHex = intToHex(filterIndex)\n // update block tracker subs\n const newFilterCount = objValues(filters).length\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount })\n return filterIndex\n }\n\n async function uninstallFilter(filterIndex) {\n const prevFilterCount = objValues(filters).length\n delete filters[filterIndex]\n // update block tracker subs\n const newFilterCount = objValues(filters).length\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount })\n }\n\n async function uninstallAllFilters() {\n const prevFilterCount = objValues(filters).length\n filters = {}\n // update block tracker subs\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount: 0 })\n }\n\n function updateBlockTrackerSubs({ prevFilterCount, newFilterCount }) {\n // subscribe\n if (prevFilterCount === 0 && newFilterCount > 0) {\n blockTracker.on('sync', filterUpdater)\n return\n }\n // unsubscribe\n if (prevFilterCount > 0 && newFilterCount === 0) {\n blockTracker.removeListener('sync', filterUpdater)\n return\n }\n }\n\n}\n\n// helper for turning filter constructors into rpc middleware\nfunction toFilterCreationMiddleware(createFilterFn) {\n return toAsyncRpcMiddleware(async (...args) => {\n const filter = await createFilterFn(...args)\n const result = intToHex(filter.id)\n return result\n })\n}\n\n// helper for pulling out req.params and setting res.result\nfunction toAsyncRpcMiddleware(asyncFn) {\n return createAsyncMiddleware(async (req, res) => {\n const result = await asyncFn.apply(null, req.params)\n res.result = result\n })\n}\n\nfunction mutexMiddlewareWrapper({ mutex }) {\n return (middleware) => {\n return async (req, res, next, end) => {\n // wait for mutex available\n // we can release immediately because\n // we just need to make sure updates aren't active\n const releaseLock = await mutex.acquire()\n releaseLock()\n middleware(req, res, next, end)\n }\n }\n}\n\nfunction objValues(obj, fn){\n const values = []\n for (let key in obj) {\n values.push(obj[key])\n }\n return values\n}\n","const SafeEventEmitter = require('@metamask/safe-event-emitter').default\nconst { createAsyncMiddleware, createScaffoldMiddleware } = require('json-rpc-engine')\nconst createFilterMiddleware = require('./index.js')\nconst { unsafeRandomBytes, incrementHexInt } = require('./hexUtils.js')\nconst getBlocksForRange = require('./getBlocksForRange.js')\n\nmodule.exports = createSubscriptionMiddleware\n\n\nfunction createSubscriptionMiddleware({ blockTracker, provider }) {\n // state and utilities for handling subscriptions\n const subscriptions = {}\n const filterManager = createFilterMiddleware({ blockTracker, provider })\n\n // internal flag\n let isDestroyed = false\n\n // create subscriptionManager api object\n const events = new SafeEventEmitter()\n const middleware = createScaffoldMiddleware({\n eth_subscribe: createAsyncMiddleware(subscribe),\n eth_unsubscribe: createAsyncMiddleware(unsubscribe),\n })\n middleware.destroy = destroy\n return { events, middleware }\n\n async function subscribe(req, res) {\n\n if (isDestroyed) throw new Error(\n 'SubscriptionManager - attempting to use after destroying'\n )\n\n const subscriptionType = req.params[0]\n // subId is 16 byte hex string\n const subId = unsafeRandomBytes(16)\n\n // create sub\n let sub\n switch (subscriptionType) {\n case 'newHeads':\n sub = createSubNewHeads({ subId })\n break\n case 'logs':\n const filterParams = req.params[1]\n const filter = await filterManager.newLogFilter(filterParams)\n sub = createSubFromFilter({ subId, filter })\n break\n default:\n throw new Error(`SubscriptionManager - unsupported subscription type \"${subscriptionType}\"`)\n\n }\n subscriptions[subId] = sub\n\n res.result = subId\n return\n\n function createSubNewHeads({ subId }) {\n const sub = {\n type: subscriptionType,\n destroy: async () => {\n blockTracker.removeListener('sync', sub.update)\n },\n update: async ({ oldBlock, newBlock }) => {\n // for newHeads\n const toBlock = newBlock\n const fromBlock = incrementHexInt(oldBlock)\n const rawBlocks = await getBlocksForRange({ provider, fromBlock, toBlock })\n const results = rawBlocks.map(normalizeBlock).filter(block => block !== null)\n results.forEach((value) => {\n _emitSubscriptionResult(subId, value)\n })\n }\n }\n // check for subscription updates on new block\n blockTracker.on('sync', sub.update)\n return sub\n }\n\n function createSubFromFilter({ subId, filter }) {\n filter.on('update', result => _emitSubscriptionResult(subId, result))\n const sub = {\n type: subscriptionType,\n destroy: async () => {\n return await filterManager.uninstallFilter(filter.idHex)\n },\n }\n return sub\n }\n }\n\n async function unsubscribe(req, res) {\n\n if (isDestroyed) throw new Error(\n 'SubscriptionManager - attempting to use after destroying'\n )\n\n const id = req.params[0]\n const subscription = subscriptions[id]\n // if missing, return \"false\" to indicate it was not removed\n if (!subscription) {\n res.result = false\n return\n }\n // cleanup subscription\n delete subscriptions[id]\n await subscription.destroy()\n res.result = true\n }\n\n function _emitSubscriptionResult(filterIdHex, value) {\n events.emit('notification', {\n jsonrpc: '2.0',\n method: 'eth_subscription',\n params: {\n subscription: filterIdHex,\n result: value,\n },\n })\n }\n\n function destroy() {\n events.removeAllListeners()\n for (const id in subscriptions) {\n subscriptions[id].destroy()\n delete subscriptions[id]\n }\n isDestroyed = true\n }\n}\n\nfunction normalizeBlock(block) {\n if (block === null || block === undefined) {\n return null;\n }\n return {\n hash: block.hash,\n parentHash: block.parentHash,\n sha3Uncles: block.sha3Uncles,\n miner: block.miner,\n stateRoot: block.stateRoot,\n transactionsRoot: block.transactionsRoot,\n receiptsRoot: block.receiptsRoot,\n logsBloom: block.logsBloom,\n difficulty: block.difficulty,\n number: block.number,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n nonce: block.nonce,\n mixHash: block.mixHash,\n timestamp: block.timestamp,\n extraData: block.extraData,\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubscriptionManager = void 0;\nconst eth_block_tracker_1 = require(\"eth-block-tracker\");\n// TODO: When we update this package we should be able to fix this\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst createSubscriptionManager = require('eth-json-rpc-filters/subscriptionManager');\nconst noop = () => { };\nclass SubscriptionManager {\n constructor(provider) {\n const blockTracker = new eth_block_tracker_1.PollingBlockTracker({\n provider: provider,\n pollingInterval: 15000,\n setSkipCacheFlag: true,\n });\n const { events, middleware } = createSubscriptionManager({\n blockTracker,\n provider,\n });\n this.events = events;\n this.subscriptionMiddleware = middleware;\n }\n async handleRequest(request) {\n const result = {};\n await this.subscriptionMiddleware(request, result, noop, noop);\n return result;\n }\n destroy() {\n this.subscriptionMiddleware.destroy();\n }\n}\nexports.SubscriptionManager = SubscriptionManager;\n","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// TODO: Address linting issues\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletProvider = void 0;\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst error_1 = require(\"../core/error\");\nconst util_1 = require(\"../core/util\");\nconst MobileRelay_1 = require(\"../relay/mobile/MobileRelay\");\nconst RelayAbstract_1 = require(\"../relay/RelayAbstract\");\nconst Session_1 = require(\"../relay/Session\");\nconst Web3Response_1 = require(\"../relay/walletlink/type/Web3Response\");\nconst eth_eip712_util_1 = __importDefault(require(\"../vendor-js/eth-eip712-util\"));\nconst DiagnosticLogger_1 = require(\"./DiagnosticLogger\");\nconst FilterPolyfill_1 = require(\"./FilterPolyfill\");\nconst SubscriptionManager_1 = require(\"./SubscriptionManager\");\nconst DEFAULT_CHAIN_ID_KEY = 'DefaultChainId';\nconst DEFAULT_JSON_RPC_URL = 'DefaultJsonRpcUrl';\nclass CoinbaseWalletProvider extends eventemitter3_1.EventEmitter {\n constructor(options) {\n var _a, _b;\n super();\n this._filterPolyfill = new FilterPolyfill_1.FilterPolyfill(this);\n this._subscriptionManager = new SubscriptionManager_1.SubscriptionManager(this);\n this._relay = null;\n this._addresses = [];\n this.hasMadeFirstChainChangedEmission = false;\n this.setProviderInfo = this.setProviderInfo.bind(this);\n this.updateProviderInfo = this.updateProviderInfo.bind(this);\n this.getChainId = this.getChainId.bind(this);\n this.setAppInfo = this.setAppInfo.bind(this);\n this.enable = this.enable.bind(this);\n this.close = this.close.bind(this);\n this.send = this.send.bind(this);\n this.sendAsync = this.sendAsync.bind(this);\n this.request = this.request.bind(this);\n this._setAddresses = this._setAddresses.bind(this);\n this.scanQRCode = this.scanQRCode.bind(this);\n this.genericRequest = this.genericRequest.bind(this);\n this._chainIdFromOpts = options.chainId;\n this._jsonRpcUrlFromOpts = options.jsonRpcUrl;\n this._overrideIsMetaMask = options.overrideIsMetaMask;\n this._relayProvider = options.relayProvider;\n this._storage = options.storage;\n this._relayEventManager = options.relayEventManager;\n this.diagnostic = options.diagnosticLogger;\n this.reloadOnDisconnect = true;\n this.isCoinbaseWallet = (_a = options.overrideIsCoinbaseWallet) !== null && _a !== void 0 ? _a : true;\n this.isCoinbaseBrowser = (_b = options.overrideIsCoinbaseBrowser) !== null && _b !== void 0 ? _b : false;\n this.qrUrl = options.qrUrl;\n const chainId = this.getChainId();\n const chainIdStr = (0, util_1.prepend0x)(chainId.toString(16));\n // indicate that we've connected, for EIP-1193 compliance\n this.emit('connect', { chainIdStr });\n const cachedAddresses = this._storage.getItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY);\n if (cachedAddresses) {\n const addresses = cachedAddresses.split(' ');\n if (addresses[0] !== '') {\n this._addresses = addresses.map((address) => (0, util_1.ensureAddressString)(address));\n this.emit('accountsChanged', addresses);\n }\n }\n this._subscriptionManager.events.on('notification', (notification) => {\n this.emit('message', {\n type: notification.method,\n data: notification.params,\n });\n });\n if (this._isAuthorized()) {\n void this.initializeRelay();\n }\n window.addEventListener('message', (event) => {\n var _a;\n // Used to verify the source and window are correct before proceeding\n if (event.origin !== location.origin || event.source !== window) {\n return;\n }\n if (event.data.type !== 'walletLinkMessage')\n return; // compatibility with CBW extension\n if (event.data.data.action === 'dappChainSwitched') {\n const _chainId = event.data.data.chainId;\n const jsonRpcUrl = (_a = event.data.data.jsonRpcUrl) !== null && _a !== void 0 ? _a : this.jsonRpcUrl;\n this.updateProviderInfo(jsonRpcUrl, Number(_chainId));\n }\n });\n }\n /** @deprecated Use `.request({ method: 'eth_accounts' })` instead. */\n get selectedAddress() {\n return this._addresses[0] || undefined;\n }\n /** @deprecated Use the chain ID. If you still need the network ID, use `.request({ method: 'net_version' })`. */\n get networkVersion() {\n return this.getChainId().toString(10);\n }\n /** @deprecated Use `.request({ method: 'eth_chainId' })` instead. */\n get chainId() {\n return (0, util_1.prepend0x)(this.getChainId().toString(16));\n }\n get isWalletLink() {\n // backward compatibility\n return true;\n }\n /**\n * Some DApps (i.e. Alpha Homora) seem to require the window.ethereum object return\n * true for this method.\n */\n get isMetaMask() {\n return this._overrideIsMetaMask;\n }\n get host() {\n return this.jsonRpcUrl;\n }\n get connected() {\n return true;\n }\n isConnected() {\n return true;\n }\n get jsonRpcUrl() {\n var _a;\n return (_a = this._storage.getItem(DEFAULT_JSON_RPC_URL)) !== null && _a !== void 0 ? _a : this._jsonRpcUrlFromOpts;\n }\n set jsonRpcUrl(value) {\n this._storage.setItem(DEFAULT_JSON_RPC_URL, value);\n }\n disableReloadOnDisconnect() {\n this.reloadOnDisconnect = false;\n }\n setProviderInfo(jsonRpcUrl, chainId) {\n if (!this.isCoinbaseBrowser) {\n this._chainIdFromOpts = chainId;\n this._jsonRpcUrlFromOpts = jsonRpcUrl;\n }\n this.updateProviderInfo(this.jsonRpcUrl, this.getChainId());\n }\n updateProviderInfo(jsonRpcUrl, chainId) {\n this.jsonRpcUrl = jsonRpcUrl;\n // emit chainChanged event if necessary\n const originalChainId = this.getChainId();\n this._storage.setItem(DEFAULT_CHAIN_ID_KEY, chainId.toString(10));\n const chainChanged = (0, util_1.ensureIntNumber)(chainId) !== originalChainId;\n if (chainChanged || !this.hasMadeFirstChainChangedEmission) {\n this.emit('chainChanged', this.getChainId());\n this.hasMadeFirstChainChangedEmission = true;\n }\n }\n async watchAsset(type, address, symbol, decimals, image, chainId) {\n const relay = await this.initializeRelay();\n const result = await relay.watchAsset(type, address, symbol, decimals, image, chainId === null || chainId === void 0 ? void 0 : chainId.toString()).promise;\n if ((0, Web3Response_1.isErrorResponse)(result))\n return false;\n return !!result.result;\n }\n async addEthereumChain(chainId, rpcUrls, blockExplorerUrls, chainName, iconUrls, nativeCurrency) {\n var _a, _b;\n if ((0, util_1.ensureIntNumber)(chainId) === this.getChainId()) {\n return false;\n }\n const relay = await this.initializeRelay();\n const isWhitelistedNetworkOrStandalone = relay.inlineAddEthereumChain(chainId.toString());\n if (!this._isAuthorized() && !isWhitelistedNetworkOrStandalone) {\n await relay.requestEthereumAccounts().promise;\n }\n const res = await relay.addEthereumChain(chainId.toString(), rpcUrls, iconUrls, blockExplorerUrls, chainName, nativeCurrency).promise;\n if ((0, Web3Response_1.isErrorResponse)(res))\n return false;\n if (((_a = res.result) === null || _a === void 0 ? void 0 : _a.isApproved) === true) {\n this.updateProviderInfo(rpcUrls[0], chainId);\n }\n return ((_b = res.result) === null || _b === void 0 ? void 0 : _b.isApproved) === true;\n }\n async switchEthereumChain(chainId) {\n const relay = await this.initializeRelay();\n const res = await relay.switchEthereumChain(chainId.toString(10), this.selectedAddress || undefined).promise;\n // backward compatibility\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n if (!res.errorCode)\n return;\n if (res.errorCode === error_1.standardErrorCodes.provider.unsupportedChain) {\n throw error_1.standardErrors.provider.unsupportedChain();\n }\n else {\n throw error_1.standardErrors.provider.custom({\n message: res.errorMessage,\n code: res.errorCode,\n });\n }\n }\n const switchResponse = res.result;\n if (switchResponse.isApproved && switchResponse.rpcUrl.length > 0) {\n this.updateProviderInfo(switchResponse.rpcUrl, chainId);\n }\n }\n setAppInfo(appName, appLogoUrl) {\n void this.initializeRelay().then((relay) => relay.setAppInfo(appName, appLogoUrl));\n }\n /** @deprecated Use `.request({ method: 'eth_requestAccounts' })` instead. */\n async enable() {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::enable',\n addresses_length: this._addresses.length,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n if (this._isAuthorized()) {\n return [...this._addresses];\n }\n return await this.send('eth_requestAccounts');\n }\n async close() {\n const relay = await this.initializeRelay();\n relay.resetAndReload();\n }\n send(requestOrMethod, callbackOrParams) {\n // send(method, params): Promise\n try {\n const result = this._send(requestOrMethod, callbackOrParams);\n if (result instanceof Promise) {\n return result.catch((error) => {\n throw (0, error_1.serializeError)(error, requestOrMethod);\n });\n }\n }\n catch (error) {\n throw (0, error_1.serializeError)(error, requestOrMethod);\n }\n }\n _send(requestOrMethod, callbackOrParams) {\n if (typeof requestOrMethod === 'string') {\n const method = requestOrMethod;\n const params = Array.isArray(callbackOrParams)\n ? callbackOrParams\n : callbackOrParams !== undefined\n ? [callbackOrParams]\n : [];\n const request = {\n jsonrpc: '2.0',\n id: 0,\n method,\n params,\n };\n return this._sendRequestAsync(request).then((res) => res.result);\n }\n // send(JSONRPCRequest | JSONRPCRequest[], callback): void\n if (typeof callbackOrParams === 'function') {\n const request = requestOrMethod;\n const callback = callbackOrParams;\n return this._sendAsync(request, callback);\n }\n // send(JSONRPCRequest[]): JSONRPCResponse[]\n if (Array.isArray(requestOrMethod)) {\n const requests = requestOrMethod;\n return requests.map((r) => this._sendRequest(r));\n }\n // send(JSONRPCRequest): JSONRPCResponse\n const req = requestOrMethod;\n return this._sendRequest(req);\n }\n async sendAsync(request, callback) {\n try {\n return this._sendAsync(request, callback).catch((error) => {\n throw (0, error_1.serializeError)(error, request);\n });\n }\n catch (error) {\n return Promise.reject((0, error_1.serializeError)(error, request));\n }\n }\n async _sendAsync(request, callback) {\n if (typeof callback !== 'function') {\n throw new Error('callback is required');\n }\n // send(JSONRPCRequest[], callback): void\n if (Array.isArray(request)) {\n const arrayCb = callback;\n this._sendMultipleRequestsAsync(request)\n .then((responses) => arrayCb(null, responses))\n .catch((err) => arrayCb(err, null));\n return;\n }\n // send(JSONRPCRequest, callback): void\n const cb = callback;\n return this._sendRequestAsync(request)\n .then((response) => cb(null, response))\n .catch((err) => cb(err, null));\n }\n async request(args) {\n try {\n return this._request(args).catch((error) => {\n throw (0, error_1.serializeError)(error, args.method);\n });\n }\n catch (error) {\n return Promise.reject((0, error_1.serializeError)(error, args.method));\n }\n }\n async _request(args) {\n if (!args || typeof args !== 'object' || Array.isArray(args)) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: 'Expected a single, non-array, object argument.',\n data: args,\n });\n }\n const { method, params } = args;\n if (typeof method !== 'string' || method.length === 0) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: \"'args.method' must be a non-empty string.\",\n data: args,\n });\n }\n if (params !== undefined &&\n !Array.isArray(params) &&\n (typeof params !== 'object' || params === null)) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: \"'args.params' must be an object or array if provided.\",\n data: args,\n });\n }\n const newParams = params === undefined ? [] : params;\n // Coinbase Wallet Requests\n const id = this._relayEventManager.makeRequestId();\n const result = await this._sendRequestAsync({\n method,\n params: newParams,\n jsonrpc: '2.0',\n id,\n });\n return result.result;\n }\n async scanQRCode(match) {\n const relay = await this.initializeRelay();\n const res = await relay.scanQRCode((0, util_1.ensureRegExpString)(match)).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'scanQRCode');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'scanQRCode');\n }\n return res.result;\n }\n async genericRequest(data, action) {\n const relay = await this.initializeRelay();\n const res = await relay.genericRequest(data, action).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'generic');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'generic');\n }\n return res.result;\n }\n /**\n * @beta\n * This method is currently in beta. While it is available for use, please note that it is still under testing and may undergo significant changes.\n *\n * @remarks\n * IMPORTANT: Signature validation is not performed by this method. Users of this method are advised to perform their own signature validation.\n * Common web3 frontend libraries such as ethers.js and viem provide the `verifyMessage` utility function that can be used for signature validation.\n *\n * It combines `eth_requestAccounts` and \"Sign-In with Ethereum\" (EIP-4361) into a single call.\n * The returned account and signed message can be used to authenticate the user.\n *\n * @param {Object} params - An object with the following properties:\n * - `nonce` {string}: A unique string to prevent replay attacks.\n * - `statement` {string}: An optional human-readable ASCII assertion that the user will sign.\n * - `resources` {string[]}: An optional list of information the user wishes to have resolved as part of authentication by the relying party.\n *\n * @returns {Promise} A promise that resolves to an object with the following properties:\n * - `accounts` {string[]}: The Ethereum accounts of the user.\n * - `message` {string}: The overall message that the user signed. Hex encoded.\n * - `signature` {string}: The signature of the message, signed with the user's private key. Hex encoded.\n */\n async connectAndSignIn(params) {\n // NOTE: It was intentionally built by following the pattern of the existing eth_requestAccounts method\n // to maintain consistency and avoid introducing a new pattern.\n // We acknowledge the need for a better design, and it is planned to address and improve it in a future refactor.\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::connectAndSignIn',\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n let res;\n try {\n const relay = await this.initializeRelay();\n if (!(relay instanceof MobileRelay_1.MobileRelay)) {\n throw new Error('connectAndSignIn is only supported on mobile');\n }\n res = await relay.connectAndSignIn(params).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n }\n throw err;\n }\n if (!res.result) {\n throw new Error('accounts received is empty');\n }\n const { accounts } = res.result;\n this._setAddresses(accounts);\n if (!this.isCoinbaseBrowser) {\n await this.switchEthereumChain(this.getChainId());\n }\n return res.result;\n }\n async selectProvider(providerOptions) {\n const relay = await this.initializeRelay();\n const res = await relay.selectProvider(providerOptions).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'selectProvider');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'selectProvider');\n }\n return res.result;\n }\n supportsSubscriptions() {\n return false;\n }\n subscribe() {\n throw new Error('Subscriptions are not supported');\n }\n unsubscribe() {\n throw new Error('Subscriptions are not supported');\n }\n disconnect() {\n return true;\n }\n _sendRequest(request) {\n const response = {\n jsonrpc: '2.0',\n id: request.id,\n };\n const { method } = request;\n response.result = this._handleSynchronousMethods(request);\n if (response.result === undefined) {\n throw new Error(`Coinbase Wallet does not support calling ${method} synchronously without ` +\n `a callback. Please provide a callback parameter to call ${method} ` +\n `asynchronously.`);\n }\n return response;\n }\n _setAddresses(addresses, _) {\n if (!Array.isArray(addresses)) {\n throw new Error('addresses is not an array');\n }\n const newAddresses = addresses.map((address) => (0, util_1.ensureAddressString)(address));\n if (JSON.stringify(newAddresses) === JSON.stringify(this._addresses)) {\n return;\n }\n this._addresses = newAddresses;\n this.emit('accountsChanged', this._addresses);\n this._storage.setItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY, newAddresses.join(' '));\n }\n _sendRequestAsync(request) {\n return new Promise((resolve, reject) => {\n try {\n const syncResult = this._handleSynchronousMethods(request);\n if (syncResult !== undefined) {\n return resolve({\n jsonrpc: '2.0',\n id: request.id,\n result: syncResult,\n });\n }\n const filterPromise = this._handleAsynchronousFilterMethods(request);\n if (filterPromise !== undefined) {\n filterPromise\n .then((res) => resolve(Object.assign(Object.assign({}, res), { id: request.id })))\n .catch((err) => reject(err));\n return;\n }\n const subscriptionPromise = this._handleSubscriptionMethods(request);\n if (subscriptionPromise !== undefined) {\n subscriptionPromise\n .then((res) => resolve({\n jsonrpc: '2.0',\n id: request.id,\n result: res.result,\n }))\n .catch((err) => reject(err));\n return;\n }\n }\n catch (err) {\n return reject(err);\n }\n this._handleAsynchronousMethods(request)\n .then((res) => res && resolve(Object.assign(Object.assign({}, res), { id: request.id })))\n .catch((err) => reject(err));\n });\n }\n _sendMultipleRequestsAsync(requests) {\n return Promise.all(requests.map((r) => this._sendRequestAsync(r)));\n }\n _handleSynchronousMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_accounts':\n return this._eth_accounts();\n case 'eth_coinbase':\n return this._eth_coinbase();\n case 'eth_uninstallFilter':\n return this._eth_uninstallFilter(params);\n case 'net_version':\n return this._net_version();\n case 'eth_chainId':\n return this._eth_chainId();\n default:\n return undefined;\n }\n }\n async _handleAsynchronousMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_requestAccounts':\n return this._eth_requestAccounts();\n case 'eth_sign':\n return this._eth_sign(params);\n case 'eth_ecRecover':\n return this._eth_ecRecover(params);\n case 'personal_sign':\n return this._personal_sign(params);\n case 'personal_ecRecover':\n return this._personal_ecRecover(params);\n case 'eth_signTransaction':\n return this._eth_signTransaction(params);\n case 'eth_sendRawTransaction':\n return this._eth_sendRawTransaction(params);\n case 'eth_sendTransaction':\n return this._eth_sendTransaction(params);\n case 'eth_signTypedData_v1':\n return this._eth_signTypedData_v1(params);\n case 'eth_signTypedData_v2':\n return this._throwUnsupportedMethodError();\n case 'eth_signTypedData_v3':\n return this._eth_signTypedData_v3(params);\n case 'eth_signTypedData_v4':\n case 'eth_signTypedData':\n return this._eth_signTypedData_v4(params);\n case 'cbWallet_arbitrary':\n return this._cbwallet_arbitrary(params);\n case 'wallet_addEthereumChain':\n return this._wallet_addEthereumChain(params);\n case 'wallet_switchEthereumChain':\n return this._wallet_switchEthereumChain(params);\n case 'wallet_watchAsset':\n return this._wallet_watchAsset(params);\n }\n const relay = await this.initializeRelay();\n return relay.makeEthereumJSONRPCRequest(request, this.jsonRpcUrl).catch((err) => {\n var _a;\n if (err.code === error_1.standardErrorCodes.rpc.methodNotFound ||\n err.code === error_1.standardErrorCodes.rpc.methodNotSupported) {\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.METHOD_NOT_IMPLEMENTED, {\n method: request.method,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n }\n throw err;\n });\n }\n _handleAsynchronousFilterMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_newFilter':\n return this._eth_newFilter(params);\n case 'eth_newBlockFilter':\n return this._eth_newBlockFilter();\n case 'eth_newPendingTransactionFilter':\n return this._eth_newPendingTransactionFilter();\n case 'eth_getFilterChanges':\n return this._eth_getFilterChanges(params);\n case 'eth_getFilterLogs':\n return this._eth_getFilterLogs(params);\n }\n return undefined;\n }\n _handleSubscriptionMethods(request) {\n switch (request.method) {\n case 'eth_subscribe':\n case 'eth_unsubscribe':\n return this._subscriptionManager.handleRequest(request);\n }\n return undefined;\n }\n _isKnownAddress(addressString) {\n try {\n const addressStr = (0, util_1.ensureAddressString)(addressString);\n const lowercaseAddresses = this._addresses.map((address) => (0, util_1.ensureAddressString)(address));\n return lowercaseAddresses.includes(addressStr);\n }\n catch (_a) {\n // noop\n }\n return false;\n }\n _ensureKnownAddress(addressString) {\n var _a;\n if (!this._isKnownAddress(addressString)) {\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED);\n throw new Error('Unknown Ethereum address');\n }\n }\n _prepareTransactionParams(tx) {\n const fromAddress = tx.from ? (0, util_1.ensureAddressString)(tx.from) : this.selectedAddress;\n if (!fromAddress) {\n throw new Error('Ethereum address is unavailable');\n }\n this._ensureKnownAddress(fromAddress);\n const toAddress = tx.to ? (0, util_1.ensureAddressString)(tx.to) : null;\n const weiValue = tx.value != null ? (0, util_1.ensureBN)(tx.value) : new bn_js_1.default(0);\n const data = tx.data ? (0, util_1.ensureBuffer)(tx.data) : Buffer.alloc(0);\n const nonce = tx.nonce != null ? (0, util_1.ensureIntNumber)(tx.nonce) : null;\n const gasPriceInWei = tx.gasPrice != null ? (0, util_1.ensureBN)(tx.gasPrice) : null;\n const maxFeePerGas = tx.maxFeePerGas != null ? (0, util_1.ensureBN)(tx.maxFeePerGas) : null;\n const maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? (0, util_1.ensureBN)(tx.maxPriorityFeePerGas) : null;\n const gasLimit = tx.gas != null ? (0, util_1.ensureBN)(tx.gas) : null;\n const chainId = tx.chainId ? (0, util_1.ensureIntNumber)(tx.chainId) : this.getChainId();\n return {\n fromAddress,\n toAddress,\n weiValue,\n data,\n nonce,\n gasPriceInWei,\n maxFeePerGas,\n maxPriorityFeePerGas,\n gasLimit,\n chainId,\n };\n }\n _isAuthorized() {\n return this._addresses.length > 0;\n }\n _requireAuthorization() {\n if (!this._isAuthorized()) {\n throw error_1.standardErrors.provider.unauthorized({});\n }\n }\n _throwUnsupportedMethodError() {\n throw error_1.standardErrors.provider.unsupportedMethod({});\n }\n async _signEthereumMessage(message, address, addPrefix, typedDataJson) {\n this._ensureKnownAddress(address);\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signEthereumMessage(message, address, addPrefix, typedDataJson)\n .promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied message signature');\n }\n throw err;\n }\n }\n async _ethereumAddressFromSignedMessage(message, signature, addPrefix) {\n const relay = await this.initializeRelay();\n const res = await relay.ethereumAddressFromSignedMessage(message, signature, addPrefix).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n _eth_accounts() {\n return [...this._addresses];\n }\n _eth_coinbase() {\n return this.selectedAddress || null;\n }\n _net_version() {\n return this.getChainId().toString(10);\n }\n _eth_chainId() {\n return (0, util_1.hexStringFromIntNumber)(this.getChainId());\n }\n getChainId() {\n const chainIdStr = this._storage.getItem(DEFAULT_CHAIN_ID_KEY);\n if (!chainIdStr) {\n return (0, util_1.ensureIntNumber)(this._chainIdFromOpts);\n }\n const chainId = parseInt(chainIdStr, 10);\n return (0, util_1.ensureIntNumber)(chainId);\n }\n async _eth_requestAccounts() {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::_eth_requestAccounts',\n addresses_length: this._addresses.length,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n if (this._isAuthorized()) {\n return Promise.resolve({\n jsonrpc: '2.0',\n id: 0,\n result: this._addresses,\n });\n }\n let res;\n try {\n const relay = await this.initializeRelay();\n res = await relay.requestEthereumAccounts().promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n }\n throw err;\n }\n if (!res.result) {\n throw new Error('accounts received is empty');\n }\n this._setAddresses(res.result);\n if (!this.isCoinbaseBrowser) {\n await this.switchEthereumChain(this.getChainId());\n }\n return { jsonrpc: '2.0', id: 0, result: this._addresses };\n }\n _eth_sign(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const message = (0, util_1.ensureBuffer)(params[1]);\n return this._signEthereumMessage(message, address, false);\n }\n _eth_ecRecover(params) {\n const message = (0, util_1.ensureBuffer)(params[0]);\n const signature = (0, util_1.ensureBuffer)(params[1]);\n return this._ethereumAddressFromSignedMessage(message, signature, false);\n }\n _personal_sign(params) {\n this._requireAuthorization();\n const message = (0, util_1.ensureBuffer)(params[0]);\n const address = (0, util_1.ensureAddressString)(params[1]);\n return this._signEthereumMessage(message, address, true);\n }\n _personal_ecRecover(params) {\n const message = (0, util_1.ensureBuffer)(params[0]);\n const signature = (0, util_1.ensureBuffer)(params[1]);\n return this._ethereumAddressFromSignedMessage(message, signature, true);\n }\n async _eth_signTransaction(params) {\n this._requireAuthorization();\n const tx = this._prepareTransactionParams(params[0] || {});\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signEthereumTransaction(tx).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied transaction signature');\n }\n throw err;\n }\n }\n async _eth_sendRawTransaction(params) {\n const signedTransaction = (0, util_1.ensureBuffer)(params[0]);\n const relay = await this.initializeRelay();\n const res = await relay.submitEthereumTransaction(signedTransaction, this.getChainId()).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n async _eth_sendTransaction(params) {\n this._requireAuthorization();\n const tx = this._prepareTransactionParams(params[0] || {});\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signAndSubmitEthereumTransaction(tx).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied transaction signature');\n }\n throw err;\n }\n }\n async _eth_signTypedData_v1(params) {\n this._requireAuthorization();\n const typedData = (0, util_1.ensureParsedJSONObject)(params[0]);\n const address = (0, util_1.ensureAddressString)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedDataLegacy({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n async _eth_signTypedData_v3(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const typedData = (0, util_1.ensureParsedJSONObject)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedData_v3({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n async _eth_signTypedData_v4(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const typedData = (0, util_1.ensureParsedJSONObject)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedData_v4({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n /** @deprecated */\n async _cbwallet_arbitrary(params) {\n const action = params[0];\n const data = params[1];\n if (typeof data !== 'string') {\n throw new Error('parameter must be a string');\n }\n if (typeof action !== 'object' || action === null) {\n throw new Error('parameter must be an object');\n }\n const result = await this.genericRequest(action, data);\n return { jsonrpc: '2.0', id: 0, result };\n }\n async _wallet_addEthereumChain(params) {\n var _a, _b, _c, _d;\n const request = params[0];\n if (((_a = request.rpcUrls) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n return {\n jsonrpc: '2.0',\n id: 0,\n error: { code: 2, message: `please pass in at least 1 rpcUrl` },\n };\n }\n if (!request.chainName || request.chainName.trim() === '') {\n throw error_1.standardErrors.rpc.invalidParams('chainName is a required field');\n }\n if (!request.nativeCurrency) {\n throw error_1.standardErrors.rpc.invalidParams('nativeCurrency is a required field');\n }\n const chainIdNumber = parseInt(request.chainId, 16);\n const success = await this.addEthereumChain(chainIdNumber, (_b = request.rpcUrls) !== null && _b !== void 0 ? _b : [], (_c = request.blockExplorerUrls) !== null && _c !== void 0 ? _c : [], request.chainName, (_d = request.iconUrls) !== null && _d !== void 0 ? _d : [], request.nativeCurrency);\n if (success) {\n return { jsonrpc: '2.0', id: 0, result: null };\n }\n return {\n jsonrpc: '2.0',\n id: 0,\n error: { code: 2, message: `unable to add ethereum chain` },\n };\n }\n async _wallet_switchEthereumChain(params) {\n const request = params[0];\n await this.switchEthereumChain(parseInt(request.chainId, 16));\n return { jsonrpc: '2.0', id: 0, result: null };\n }\n async _wallet_watchAsset(params) {\n const request = (Array.isArray(params) ? params[0] : params);\n if (!request.type) {\n throw error_1.standardErrors.rpc.invalidParams('Type is required');\n }\n if ((request === null || request === void 0 ? void 0 : request.type) !== 'ERC20') {\n throw error_1.standardErrors.rpc.invalidParams(`Asset of type '${request.type}' is not supported`);\n }\n if (!(request === null || request === void 0 ? void 0 : request.options)) {\n throw error_1.standardErrors.rpc.invalidParams('Options are required');\n }\n if (!(request === null || request === void 0 ? void 0 : request.options.address)) {\n throw error_1.standardErrors.rpc.invalidParams('Address is required');\n }\n const chainId = this.getChainId();\n const { address, symbol, image, decimals } = request.options;\n const res = await this.watchAsset(request.type, address, symbol, decimals, image, chainId);\n return { jsonrpc: '2.0', id: 0, result: res };\n }\n _eth_uninstallFilter(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.uninstallFilter(filterId);\n }\n async _eth_newFilter(params) {\n const param = params[0];\n const filterId = await this._filterPolyfill.newFilter(param);\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n async _eth_newBlockFilter() {\n const filterId = await this._filterPolyfill.newBlockFilter();\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n async _eth_newPendingTransactionFilter() {\n const filterId = await this._filterPolyfill.newPendingTransactionFilter();\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n _eth_getFilterChanges(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.getFilterChanges(filterId);\n }\n _eth_getFilterLogs(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.getFilterLogs(filterId);\n }\n initializeRelay() {\n if (this._relay) {\n return Promise.resolve(this._relay);\n }\n return this._relayProvider().then((relay) => {\n relay.setAccountsCallback((accounts, isDisconnect) => this._setAddresses(accounts, isDisconnect));\n relay.setChainCallback((chainId, jsonRpcUrl) => {\n this.updateProviderInfo(jsonRpcUrl, parseInt(chainId, 10));\n });\n relay.setDappDefaultChainCallback(this._chainIdFromOpts);\n this._relay = relay;\n return relay;\n });\n }\n}\nexports.CoinbaseWalletProvider = CoinbaseWalletProvider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RelayEventManager = void 0;\nconst util_1 = require(\"../core/util\");\nclass RelayEventManager {\n constructor() {\n this._nextRequestId = 0;\n this.callbacks = new Map();\n }\n makeRequestId() {\n // max nextId == max int32 for compatibility with mobile\n this._nextRequestId = (this._nextRequestId + 1) % 0x7fffffff;\n const id = this._nextRequestId;\n const idStr = (0, util_1.prepend0x)(id.toString(16));\n // unlikely that this will ever be an issue, but just to be safe\n const callback = this.callbacks.get(idStr);\n if (callback) {\n this.callbacks.delete(idStr);\n }\n return id;\n }\n}\nexports.RelayEventManager = RelayEventManager;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletSDK = void 0;\nconst wallet_logo_1 = require(\"./assets/wallet-logo\");\nconst constants_1 = require(\"./core/constants\");\nconst util_1 = require(\"./core/util\");\nconst ScopedLocalStorage_1 = require(\"./lib/ScopedLocalStorage\");\nconst CoinbaseWalletProvider_1 = require(\"./provider/CoinbaseWalletProvider\");\nconst MobileRelay_1 = require(\"./relay/mobile/MobileRelay\");\nconst MobileRelayUI_1 = require(\"./relay/mobile/MobileRelayUI\");\nconst RelayEventManager_1 = require(\"./relay/RelayEventManager\");\nconst WalletLinkRelayUI_1 = require(\"./relay/walletlink/ui/WalletLinkRelayUI\");\nconst WalletLinkRelay_1 = require(\"./relay/walletlink/WalletLinkRelay\");\nconst version_1 = require(\"./version\");\nclass CoinbaseWalletSDK {\n /**\n * Constructor\n * @param options Coinbase Wallet SDK constructor options\n */\n constructor(options) {\n var _a, _b, _c;\n this._appName = '';\n this._appLogoUrl = null;\n this._relay = null;\n this._relayEventManager = null;\n const linkAPIUrl = options.linkAPIUrl || constants_1.LINK_API_URL;\n if (typeof options.overrideIsMetaMask === 'undefined') {\n this._overrideIsMetaMask = false;\n }\n else {\n this._overrideIsMetaMask = options.overrideIsMetaMask;\n }\n this._overrideIsCoinbaseWallet = (_a = options.overrideIsCoinbaseWallet) !== null && _a !== void 0 ? _a : true;\n this._overrideIsCoinbaseBrowser = (_b = options.overrideIsCoinbaseBrowser) !== null && _b !== void 0 ? _b : false;\n this._diagnosticLogger = options.diagnosticLogger;\n this._reloadOnDisconnect = (_c = options.reloadOnDisconnect) !== null && _c !== void 0 ? _c : true;\n const url = new URL(linkAPIUrl);\n const origin = `${url.protocol}//${url.host}`;\n this._storage = new ScopedLocalStorage_1.ScopedLocalStorage(`-walletlink:${origin}`); // needs migration to preserve local states\n this._storage.setItem('version', CoinbaseWalletSDK.VERSION);\n if (this.walletExtension || this.coinbaseBrowser) {\n return;\n }\n this._relayEventManager = new RelayEventManager_1.RelayEventManager();\n const isMobile = (0, util_1.isMobileWeb)();\n const uiConstructor = options.uiConstructor ||\n ((opts) => (isMobile ? new MobileRelayUI_1.MobileRelayUI(opts) : new WalletLinkRelayUI_1.WalletLinkRelayUI(opts)));\n const relayOption = {\n linkAPIUrl,\n version: version_1.LIB_VERSION,\n darkMode: !!options.darkMode,\n uiConstructor,\n storage: this._storage,\n relayEventManager: this._relayEventManager,\n diagnosticLogger: this._diagnosticLogger,\n reloadOnDisconnect: this._reloadOnDisconnect,\n enableMobileWalletLink: options.enableMobileWalletLink,\n };\n this._relay = isMobile ? new MobileRelay_1.MobileRelay(relayOption) : new WalletLinkRelay_1.WalletLinkRelay(relayOption);\n this.setAppInfo(options.appName, options.appLogoUrl);\n if (options.headlessMode)\n return;\n this._relay.attachUI();\n }\n /**\n * Create a Web3 Provider object\n * @param jsonRpcUrl Ethereum JSON RPC URL (Default: \"\")\n * @param chainId Ethereum Chain ID (Default: 1)\n * @returns A Web3 Provider\n */\n makeWeb3Provider(jsonRpcUrl = '', chainId = 1) {\n const extension = this.walletExtension;\n if (extension) {\n if (!this.isCipherProvider(extension)) {\n extension.setProviderInfo(jsonRpcUrl, chainId);\n }\n if (this._reloadOnDisconnect === false &&\n typeof extension.disableReloadOnDisconnect === 'function')\n extension.disableReloadOnDisconnect();\n return extension;\n }\n const dappBrowser = this.coinbaseBrowser;\n if (dappBrowser) {\n return dappBrowser;\n }\n const relay = this._relay;\n if (!relay || !this._relayEventManager || !this._storage) {\n throw new Error('Relay not initialized, should never happen');\n }\n if (!jsonRpcUrl)\n relay.setConnectDisabled(true);\n return new CoinbaseWalletProvider_1.CoinbaseWalletProvider({\n relayProvider: () => Promise.resolve(relay),\n relayEventManager: this._relayEventManager,\n storage: this._storage,\n jsonRpcUrl,\n chainId,\n qrUrl: this.getQrUrl(),\n diagnosticLogger: this._diagnosticLogger,\n overrideIsMetaMask: this._overrideIsMetaMask,\n overrideIsCoinbaseWallet: this._overrideIsCoinbaseWallet,\n overrideIsCoinbaseBrowser: this._overrideIsCoinbaseBrowser,\n });\n }\n /**\n * Set application information\n * @param appName Application name\n * @param appLogoUrl Application logo image URL\n */\n setAppInfo(appName, appLogoUrl) {\n var _a;\n this._appName = appName || 'DApp';\n this._appLogoUrl = appLogoUrl || (0, util_1.getFavicon)();\n const extension = this.walletExtension;\n if (extension) {\n if (!this.isCipherProvider(extension)) {\n extension.setAppInfo(this._appName, this._appLogoUrl);\n }\n }\n else {\n (_a = this._relay) === null || _a === void 0 ? void 0 : _a.setAppInfo(this._appName, this._appLogoUrl);\n }\n }\n /**\n * Disconnect. After disconnecting, this will reload the web page to ensure\n * all potential stale state is cleared.\n */\n disconnect() {\n var _a;\n const extension = this === null || this === void 0 ? void 0 : this.walletExtension;\n if (extension) {\n void extension.close();\n }\n else {\n (_a = this._relay) === null || _a === void 0 ? void 0 : _a.resetAndReload();\n }\n }\n /**\n * Return QR URL for mobile wallet connection, will return null if extension is installed\n */\n getQrUrl() {\n var _a, _b;\n return (_b = (_a = this._relay) === null || _a === void 0 ? void 0 : _a.getQRCodeUrl()) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Official Coinbase Wallet logo for developers to use on their frontend\n * @param type Type of wallet logo: \"standard\" | \"circle\" | \"text\" | \"textWithLogo\" | \"textLight\" | \"textWithLogoLight\"\n * @param width Width of the logo (Optional)\n * @returns SVG Data URI\n */\n getCoinbaseWalletLogo(type, width = 240) {\n return (0, wallet_logo_1.walletLogo)(type, width);\n }\n get walletExtension() {\n var _a;\n return (_a = window.coinbaseWalletExtension) !== null && _a !== void 0 ? _a : window.walletLinkExtension;\n }\n get coinbaseBrowser() {\n var _a, _b;\n try {\n // Coinbase DApp browser does not inject into iframes so grab provider from top frame if it exists\n const ethereum = (_a = window.ethereum) !== null && _a !== void 0 ? _a : (_b = window.top) === null || _b === void 0 ? void 0 : _b.ethereum;\n if (!ethereum) {\n return undefined;\n }\n if ('isCoinbaseBrowser' in ethereum && ethereum.isCoinbaseBrowser) {\n return ethereum;\n }\n return undefined;\n }\n catch (e) {\n return undefined;\n }\n }\n isCipherProvider(provider) {\n // @ts-expect-error isCipher walletlink property\n return typeof provider.isCipher === 'boolean' && provider.isCipher;\n }\n}\nexports.CoinbaseWalletSDK = CoinbaseWalletSDK;\nCoinbaseWalletSDK.VERSION = version_1.LIB_VERSION;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletProvider = exports.CoinbaseWalletSDK = void 0;\nconst CoinbaseWalletSDK_1 = require(\"./CoinbaseWalletSDK\");\nconst CoinbaseWalletProvider_1 = require(\"./provider/CoinbaseWalletProvider\");\nvar CoinbaseWalletSDK_2 = require(\"./CoinbaseWalletSDK\");\nObject.defineProperty(exports, \"CoinbaseWalletSDK\", { enumerable: true, get: function () { return CoinbaseWalletSDK_2.CoinbaseWalletSDK; } });\nvar CoinbaseWalletProvider_2 = require(\"./provider/CoinbaseWalletProvider\");\nObject.defineProperty(exports, \"CoinbaseWalletProvider\", { enumerable: true, get: function () { return CoinbaseWalletProvider_2.CoinbaseWalletProvider; } });\nexports.default = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\nif (typeof window !== 'undefined') {\n window.CoinbaseWalletSDK = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\n window.CoinbaseWalletProvider = CoinbaseWalletProvider_1.CoinbaseWalletProvider;\n /**\n * @deprecated Use `window.CoinbaseWalletSDK`\n */\n window.WalletLink = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\n /**\n * @deprecated Use `window.CoinbaseWalletProvider`\n */\n window.WalletLinkProvider = CoinbaseWalletProvider_1.CoinbaseWalletProvider;\n}\n","import '@web3modal/polyfills';\nimport { CoinbaseWalletSDK } from '@coinbase/wallet-sdk';\nexport function defaultConfig(options) {\n const { enableEIP6963 = true, enableInjected = true, enableCoinbase = true, enableEmail = false, metadata, rpcUrl, defaultChainId } = options;\n let injectedProvider = undefined;\n let coinbaseProvider = undefined;\n const providers = { metadata };\n function getInjectedProvider() {\n if (injectedProvider) {\n return injectedProvider;\n }\n if (typeof window === 'undefined') {\n return undefined;\n }\n if (!window.ethereum) {\n return undefined;\n }\n injectedProvider = window.ethereum;\n return injectedProvider;\n }\n function getCoinbaseProvider() {\n if (coinbaseProvider) {\n return coinbaseProvider;\n }\n if (typeof window === 'undefined') {\n return undefined;\n }\n const coinbaseWallet = new CoinbaseWalletSDK({\n appName: metadata.name,\n appLogoUrl: metadata.icons[0],\n darkMode: false,\n enableMobileWalletLink: true\n });\n coinbaseProvider = coinbaseWallet.makeWeb3Provider(rpcUrl, defaultChainId);\n return coinbaseProvider;\n }\n if (enableInjected) {\n providers.injected = getInjectedProvider();\n }\n if (enableCoinbase && rpcUrl && defaultChainId) {\n providers.coinbase = getCoinbaseProvider();\n }\n if (enableEIP6963) {\n providers.EIP6963 = true;\n }\n if (enableEmail) {\n providers.email = true;\n }\n return providers;\n}\n//# sourceMappingURL=defaultConfig.js.map","import { Web3Modal } from '../src/client.js';\nimport { ConstantsUtil } from '@web3modal/scaffold-utils';\nexport { defaultConfig } from '../src/utils/defaultConfig.js';\nexport function createWeb3Modal(options) {\n return new Web3Modal({ ...options, _sdkVersion: `html-ethers-${ConstantsUtil.VERSION}` });\n}\n//# sourceMappingURL=index.js.map","import icons from './icons'\nimport { networks } from '../../index'\nimport type { EIP1193Provider } from './EIP6963'\nimport type { Provider } from '../../services/Provider'\nimport type { Chain } from '@web3modal/scaffold-utils/ethers'\nimport { createWeb3Modal, defaultConfig } from '@web3modal/ethers'\nimport type { Web3Modal as Web3ModalType } from '@web3modal/ethers'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\nimport { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types'\nimport type { CustomWallet, EventsControllerState, Metadata } from '@web3modal/core'\n\ntype EventFunction = (newEvent: EventsControllerState, modal?: Web3ModalType) => void\n\nexport interface Web3ModalConfig {\n projectId: string\n themeMode?: 'dark' | 'light'\n enableEIP6963?: boolean\n enableInjected?: boolean\n enableCoinbase?: boolean\n rpcUrl?: string\n defaultChainId?: number\n metadata: Metadata\n customWallets?: CustomWallet[]\n events?: EventFunction[]\n}\n\nexport interface Web3ModalAdapterInterface\n extends WalletAdapterInterface {\n modal?: Web3ModalType\n}\n\nlet modal: Web3ModalType | undefined\nlet walletProvider: EIP1193Provider | undefined\n\nconst chains: Chain[] = networks\n .getAll()\n .map((network: any) => {\n return {\n chainId: network.id,\n name: network.name ?? network.nativeCurrency.symbol,\n currency: network.nativeCurrency.symbol,\n explorerUrl: network.explorerUrl,\n rpcUrl: network.rpcUrl\n }\n })\n .filter((network: any) => network)\n\nlet currentNetwork: Chain\nlet clickedAnyWallet = false\nlet connectRejectMethod: (reason?: any) => void\nlet connectResolveMethod: (value: EIP1193Provider | PromiseLike) => void\n\nconst web3Modal = (config: Web3ModalConfig): Web3ModalType => {\n if (modal !== undefined) {\n return modal\n }\n\n const ethersConfig = defaultConfig({\n metadata: config.metadata,\n enableEIP6963: config.enableEIP6963,\n enableInjected: config.enableInjected,\n enableCoinbase: config.enableCoinbase\n })\n\n modal = createWeb3Modal({\n chains,\n ethersConfig,\n projectId: config.projectId,\n themeMode: config.themeMode,\n customWallets: config.customWallets,\n allowUnsupportedChain: true,\n themeVariables: {\n '--w3m-z-index': 999999999999\n }\n })\n\n if (config.events !== undefined) {\n config.events.forEach((event) => {\n modal?.subscribeEvents((newEvent: EventsControllerState) => {\n event(newEvent, modal)\n })\n })\n }\n\n modal.subscribeEvents(async (event) => {\n if (event.data.event === 'SELECT_WALLET') {\n clickedAnyWallet = true\n }\n\n if (event.data.event === 'MODAL_CLOSE') {\n if (clickedAnyWallet) {\n clickedAnyWallet = false\n } else {\n connectRejectMethod(new Error(ErrorTypeEnum.CLOSED_WALLETCONNECT_MODAL))\n }\n }\n })\n\n modal.subscribeProvider(async ({ provider, chainId }) => {\n if (provider === undefined) {\n return\n }\n\n if (currentNetwork.chainId !== chainId) {\n await modal?.switchNetwork(currentNetwork.chainId).catch(() => {\n connectRejectMethod(new Error(ErrorTypeEnum.WALLET_CONNECT_REJECTED))\n })\n }\n\n connectResolveMethod((walletProvider = provider as EIP1193Provider))\n })\n\n return modal\n}\n\nconst Web3Modal: Web3ModalAdapterInterface = {\n modal,\n id: 'web3modal',\n name: 'Web3Modal',\n icon: icons.web3modal,\n provider: walletProvider,\n platforms: [WalletPlatformEnum.UNIVERSAL],\n isDetected: () => true,\n isConnected: () => {\n if (modal === undefined) {\n return false\n }\n return modal.getIsConnected()\n },\n disconnect: async () => {\n Object.keys(localStorage)\n .filter((x) => {\n return (\n x.startsWith('wc@2') ||\n x.startsWith('@w3m') ||\n x.startsWith('W3M') ||\n x.startsWith('-walletlink')\n )\n })\n .forEach((x) => {\n localStorage.removeItem(x)\n })\n\n if (modal?.disconnect !== undefined) {\n await modal.disconnect()\n }\n },\n connect: async (\n provider?: Provider,\n _config?: Web3ModalConfig | object\n ): Promise => {\n const config = _config as Web3ModalConfig\n\n if (provider === undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_REQUIRED)\n }\n\n if (config === undefined) {\n throw new Error(ErrorTypeEnum.CONFIG_IS_REQUIRED)\n }\n\n if (config.projectId === undefined) {\n throw new Error(ErrorTypeEnum.PROJECT_ID_IS_REQUIRED)\n }\n\n if (config.metadata === undefined) {\n throw new Error(ErrorTypeEnum.METADATA_IS_REQUIRED)\n }\n\n const network = provider.network\n\n currentNetwork = {\n chainId: network.id,\n name: network.name ?? network.nativeCurrency.symbol,\n currency: network.nativeCurrency.symbol,\n explorerUrl: network.explorerUrl,\n rpcUrl: network.rpcUrl\n }\n\n return await new Promise((resolve, reject) => {\n try {\n const modal = web3Modal(config)\n connectRejectMethod = async (reason) => {\n await modal.disconnect()\n reject(reason)\n }\n connectResolveMethod = resolve\n void modal.open({ view: 'Connect' })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default Web3Modal\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst OkxWallet: WalletAdapterInterface = {\n id: 'okxwallet',\n name: 'OkxWallet',\n icon: icons.okxWallet,\n provider: window?.okxwallet,\n downloadLink: 'https://www.okx.com/download',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n createDeepLink: (url: string): string => `okx://wallet/dapp/details?dappUrl=${url}`,\n isDetected: () => Boolean(window?.okxwallet),\n isConnected: async () => {\n return Boolean((await window?.okxwallet?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const okx = window?.okxwallet\n try {\n okx\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(okx, provider)\n .then(() => {\n resolve(okx)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default OkxWallet\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport type { Provider } from '../../services/Provider'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst XdefiWallet: WalletAdapterInterface = {\n id: 'xdefiwallet',\n name: 'XdefiWallet',\n icon: icons.xdefiWallet,\n provider: window?.xfi?.ethereum,\n downloadLink: 'https://www.xdefi.io/',\n platforms: [WalletPlatformEnum.BROWSER],\n isDetected: () => Boolean(window?.xfi?.ethereum),\n isConnected: async () => {\n return Boolean((await window?.xfi?.ethereum?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const xfi = window?.xfi?.ethereum\n try {\n xfi\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(xfi, provider)\n .then(() => {\n resolve(xfi)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default XdefiWallet\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { WindowEthereum } from './types'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst TrustWallet: WalletAdapterInterface = {\n id: 'trustwallet',\n name: 'TrustWallet',\n icon: icons.trustWallet,\n // eslint-disable-next-line\n provider: (window?.ethereum?.isTrust\n ? window.ethereum\n : window.trustwallet) as unknown as WindowEthereum,\n downloadLink: 'https://trustwallet.com/download',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => Boolean(window?.ethereum?.isTrust ?? window?.trustwallet),\n isConnected: async () => {\n // eslint-disable-next-line\n const trustWalletProvider = (window?.ethereum?.isTrust\n ? window.ethereum\n : window.trustwallet) as unknown as WindowEthereum\n return Boolean((await trustWalletProvider?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n try {\n // eslint-disable-next-line\n const trustWalletProvider = (window?.ethereum?.isTrust\n ? window.ethereum\n : window.trustwallet) as unknown as WindowEthereum\n trustWalletProvider\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n // because mobile wallet doesn't support testnets\n if (\n window?.ethereum?.isTrust !== undefined &&\n provider?.isTestnet() === true\n ) {\n resolve(trustWalletProvider)\n return\n }\n\n switcher(trustWalletProvider, provider)\n .then(() => {\n resolve(trustWalletProvider)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default TrustWallet\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst BitgetWallet: WalletAdapterInterface = {\n id: 'bitgetwallet',\n name: 'BitgetWallet',\n icon: icons.bitgetWallet,\n provider: window?.bitkeep?.ethereum,\n downloadLink: 'https://web3.bitget.com/en/wallet-download?type=3',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n createDeepLink: (url: string): string => `https://bkcode.vip?action=dapp&url=${url}`,\n isDetected: () => Boolean(window?.bitkeep?.ethereum),\n isConnected: async () => {\n return Boolean(\n (await window?.bitkeep?.ethereum?.request({ method: 'eth_accounts' })).length\n )\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const bitget = window?.bitkeep?.ethereum\n try {\n bitget\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(bitget, provider)\n .then(() => {\n resolve(bitget)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default BitgetWallet\n","import{detect as Do}from\"detect-browser\";import{toMiliseconds as hi,FIVE_MINUTES as nn,fromMiliseconds as Fo}from\"@walletconnect/time\";import{getDocument as fn,getNavigator as on,getLocation as sn}from\"@walletconnect/window-getters\";import{getWindowMetadata as To}from\"@walletconnect/window-metadata\";import*as Nr from\"query-string\";import{ChaCha20Poly1305 as an}from\"@stablelib/chacha20poly1305\";import{HKDF as Uo}from\"@stablelib/hkdf\";import{randomBytes as un}from\"@stablelib/random\";import{SHA256 as ko,hash as hn}from\"@stablelib/sha256\";import*as cn from\"@stablelib/x25519\";import{toString as te,fromString as ee,concat as ln}from\"uint8arrays\";import{RELAY_JSONRPC as qo}from\"@walletconnect/relay-api\";const Ir=\":\";function dn(e){const[t,r]=e.split(Ir);return{namespace:t,reference:r}}function pn(e){const{namespace:t,reference:r}=e;return[t,r].join(Ir)}function ci(e){const[t,r,i]=e.split(Ir);return{namespace:t,reference:r,address:i}}function vn(e){const{namespace:t,reference:r,address:i}=e;return[t,r,i].join(Ir)}function li(e,t){const r=[];return e.forEach(i=>{const n=t(i);r.includes(n)||r.push(n)}),r}function mn(e){const{address:t}=ci(e);return t}function gn(e){const{namespace:t,reference:r}=ci(e);return pn({namespace:t,reference:r})}function Ko(e,t){const{namespace:r,reference:i}=dn(t);return vn({namespace:r,reference:i,address:e})}function Ho(e){return li(e,mn)}function An(e){return li(e,gn)}function zo(e,t=[]){const r=[];return Object.keys(e).forEach(i=>{if(t.length&&!t.includes(i))return;const n=e[i];r.push(...n.accounts)}),r}function Lo(e,t=[]){const r=[];return Object.keys(e).forEach(i=>{if(t.length&&!t.includes(i))return;const n=e[i];r.push(...An(n.accounts))}),r}function jo(e,t=[]){const r=[];return Object.keys(e).forEach(i=>{if(t.length&&!t.includes(i))return;const n=e[i];r.push(..._r(i,n))}),r}function _r(e,t){return e.includes(\":\")?[e]:t.chains||[]}var Qo=Object.defineProperty,bn=Object.getOwnPropertySymbols,Jo=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable,yn=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wn=(e,t)=>{for(var r in t||(t={}))Jo.call(t,r)&&yn(e,r,t[r]);if(bn)for(var r of bn(t))Go.call(t,r)&&yn(e,r,t[r]);return e};const xn=\"ReactNative\",qt={reactNative:\"react-native\",node:\"node\",browser:\"browser\",unknown:\"unknown\"},Br=\" \",Yo=\":\",Mn=\"/\",di=2,Vo=1e3,En=\"js\";function pi(){return typeof process<\"u\"&&typeof process.versions<\"u\"&&typeof process.versions.node<\"u\"}function er(){return!fn()&&!!on()&&navigator.product===xn}function pr(){return!pi()&&!!on()&&!!fn()}function We(){return er()?qt.reactNative:pi()?qt.node:pr()?qt.browser:qt.unknown}function Wo(){var e;try{return er()&&typeof global<\"u\"&&typeof(global==null?void 0:global.Application)<\"u\"?(e=global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function Sn(e,t){let r=Nr.parse(e);return r=wn(wn({},r),t),e=Nr.stringify(r),e}function Xo(){return To()||{name:\"\",description:\"\",url:\"\",icons:[\"\"]}}function Zo(e,t){var r;const i=We(),n={protocol:e,version:t,env:i};return i===\"browser\"&&(n.host=((r=sn())==null?void 0:r.host)||\"unknown\"),n}function Nn(){if(We()===qt.reactNative&&typeof global<\"u\"&&typeof(global==null?void 0:global.Platform)<\"u\"){const{OS:r,Version:i}=global.Platform;return[r,i].join(\"-\")}const e=Do();if(e===null)return\"unknown\";const t=e.os?e.os.replace(\" \",\"\").toLowerCase():\"unknown\";return e.type===\"browser\"?[t,e.name,e.version].join(\"-\"):[t,e.version].join(\"-\")}function In(){var e;const t=We();return t===qt.browser?[t,((e=sn())==null?void 0:e.host)||\"unknown\"].join(\":\"):t}function _n(e,t,r){const i=Nn(),n=In();return[[e,t].join(\"-\"),[En,r].join(\"-\"),i,n].join(\"/\")}function $o({protocol:e,version:t,relayUrl:r,sdkVersion:i,auth:n,projectId:o,useOnCloseEvent:h,bundleId:p}){const b=r.split(\"?\"),m=_n(e,t,i),w={auth:n,ua:m,projectId:o,useOnCloseEvent:h||void 0,origin:p||void 0},y=Sn(b[1]||\"\",w);return b[0]+\"?\"+y}function t0(e){let t=(e.match(/^[^:]+(?=:\\/\\/)/gi)||[])[0];const r=typeof t<\"u\"?e.split(\"://\")[1]:e;return t=t===\"wss\"?\"https\":\"http\",[t,r].join(\"://\")}function e0(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid \"${t}\" param`)}function Bn(e,t=di){return Cn(e.split(Mn),t)}function r0(e){return Bn(e).join(Br)}function _e(e,t){return e.filter(r=>t.includes(r)).length===e.length}function Cn(e,t=di){return e.slice(Math.max(e.length-t,0))}function i0(e){return Object.fromEntries(e.entries())}function n0(e){return new Map(Object.entries(e))}function f0(e,t){const r={};return Object.keys(e).forEach(i=>{r[i]=t(e[i])}),r}const o0=e=>e;function Rn(e){return e.trim().replace(/^\\w/,t=>t.toUpperCase())}function s0(e){return e.split(Br).map(t=>Rn(t)).join(Br)}function a0(e=nn,t){const r=hi(e||nn);let i,n,o;return{resolve:h=>{o&&i&&(clearTimeout(o),i(h))},reject:h=>{o&&n&&(clearTimeout(o),n(h))},done:()=>new Promise((h,p)=>{o=setTimeout(()=>{p(new Error(t))},r),i=h,n=p})}}function u0(e,t,r){return new Promise(async(i,n)=>{const o=setTimeout(()=>n(new Error(r)),t);try{const h=await e;i(h)}catch(h){n(h)}clearTimeout(o)})}function vi(e,t){if(typeof t==\"string\"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()===\"topic\"){if(typeof t!=\"string\")throw new Error('Value must be \"string\" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()===\"id\"){if(typeof t!=\"number\")throw new Error('Value must be \"number\" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function h0(e){return vi(\"topic\",e)}function c0(e){return vi(\"id\",e)}function l0(e){const[t,r]=e.split(\":\"),i={id:void 0,topic:void 0};if(t===\"topic\"&&typeof r==\"string\")i.topic=r;else if(t===\"id\"&&Number.isInteger(Number(r)))i.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return i}function d0(e,t){return Fo((t||Date.now())+hi(e))}function p0(e){return Date.now()>=hi(e)}function v0(e,t){return`${e}${t?`:${t}`:\"\"}`}function ge(e=[],t=[]){return[...new Set([...e,...t])]}async function m0({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;const i=typeof r==\"string\"?JSON.parse(r):r;let n=i?.href;if(typeof n!=\"string\")return;n.endsWith(\"/\")&&(n=n.slice(0,-1));const o=`${n}/wc?requestId=${e}&sessionTopic=${t}`,h=We();h===qt.browser?o.startsWith(\"https://\")||o.startsWith(\"http://\")?window.open(o,\"_blank\",\"noreferrer noopener\"):window.open(o,\"_self\",\"noreferrer noopener\"):h===qt.reactNative&&typeof(global==null?void 0:global.Linking)<\"u\"&&await global.Linking.openURL(o)}catch(i){console.error(i)}}async function g0(e,t){try{return await e.getItem(t)||(pr()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}function mi(e,t){return e.filter(r=>t.includes(r))}var On=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{};function A0(e){var t=e.default;if(typeof t==\"function\"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,\"__esModule\",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var Pn={exports:{}};/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */(function(e){(function(){var t=\"input is invalid type\",r=\"finalize already called\",i=typeof window==\"object\",n=i?window:{};n.JS_SHA3_NO_WINDOW&&(i=!1);var o=!i&&typeof self==\"object\",h=!n.JS_SHA3_NO_NODE_JS&&typeof process==\"object\"&&process.versions&&process.versions.node;h?n=On:o&&(n=self);var p=!n.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,b=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<\"u\",m=\"0123456789abcdef\".split(\"\"),w=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],S=[1,256,65536,16777216],I=[6,1536,393216,100663296],N=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],F=[224,256,384,512],U=[128,256],J=[\"hex\",\"buffer\",\"arrayBuffer\",\"array\",\"digest\"],Bt={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(u){return Object.prototype.toString.call(u)===\"[object Array]\"}),b&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(u){return typeof u==\"object\"&&u.buffer&&u.buffer.constructor===ArrayBuffer});for(var G=function(u,E,_){return function(B){return new s(u,E,u).update(B)[_]()}},H=function(u,E,_){return function(B,R){return new s(u,E,R).update(B)[_]()}},z=function(u,E,_){return function(B,R,T,P){return f[\"cshake\"+u].update(B,R,T,P)[_]()}},Pt=function(u,E,_){return function(B,R,T,P){return f[\"kmac\"+u].update(B,R,T,P)[_]()}},W=function(u,E,_,B){for(var R=0;R>5,this.byteCount=this.blockCount<<2,this.outputBlocks=_>>5,this.extraBytes=(_&31)>>3;for(var B=0;B<50;++B)this.s[B]=0}s.prototype.update=function(u){if(this.finalized)throw new Error(r);var E,_=typeof u;if(_!==\"string\"){if(_===\"object\"){if(u===null)throw new Error(t);if(b&&u.constructor===ArrayBuffer)u=new Uint8Array(u);else if(!Array.isArray(u)&&(!b||!ArrayBuffer.isView(u)))throw new Error(t)}else throw new Error(t);E=!0}for(var B=this.blocks,R=this.byteCount,T=u.length,P=this.blockCount,O=0,Ct=this.s,D,q;O>2]|=u[O]<>2]|=q<>2]|=(192|q>>6)<>2]|=(128|q&63)<=57344?(B[D>>2]|=(224|q>>12)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<>2]|=(240|q>>18)<>2]|=(128|q>>12&63)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<=R){for(this.start=D-R,this.block=B[P],D=0;D>8,_=u&255;_>0;)R.unshift(_),u=u>>8,_=u&255,++B;return E?R.push(B):R.unshift(B),this.update(R),R.length},s.prototype.encodeString=function(u){var E,_=typeof u;if(_!==\"string\"){if(_===\"object\"){if(u===null)throw new Error(t);if(b&&u.constructor===ArrayBuffer)u=new Uint8Array(u);else if(!Array.isArray(u)&&(!b||!ArrayBuffer.isView(u)))throw new Error(t)}else throw new Error(t);E=!0}var B=0,R=u.length;if(E)B=R;else for(var T=0;T=57344?B+=3:(P=65536+((P&1023)<<10|u.charCodeAt(++T)&1023),B+=4)}return B+=this.encode(B*8),this.update(u),B},s.prototype.bytepad=function(u,E){for(var _=this.encode(E),B=0;B>2]|=this.padding[E&3],this.lastByteIndex===this.byteCount)for(u[0]=u[_],E=1;E<_+1;++E)u[E]=0;for(u[_-1]|=2147483648,E=0;E<_;++E)B[E]^=u[E];k(B)}},s.prototype.toString=s.prototype.hex=function(){this.finalize();for(var u=this.blockCount,E=this.s,_=this.outputBlocks,B=this.extraBytes,R=0,T=0,P=\"\",O;T<_;){for(R=0;R>4&15]+m[O&15]+m[O>>12&15]+m[O>>8&15]+m[O>>20&15]+m[O>>16&15]+m[O>>28&15]+m[O>>24&15];T%u===0&&(k(E),R=0)}return B&&(O=E[R],P+=m[O>>4&15]+m[O&15],B>1&&(P+=m[O>>12&15]+m[O>>8&15]),B>2&&(P+=m[O>>20&15]+m[O>>16&15])),P},s.prototype.arrayBuffer=function(){this.finalize();var u=this.blockCount,E=this.s,_=this.outputBlocks,B=this.extraBytes,R=0,T=0,P=this.outputBits>>3,O;B?O=new ArrayBuffer(_+1<<2):O=new ArrayBuffer(P);for(var Ct=new Uint32Array(O);T<_;){for(R=0;R>8&255,P[O+2]=Ct>>16&255,P[O+3]=Ct>>24&255;T%u===0&&k(E)}return B&&(O=T<<2,Ct=E[R],P[O]=Ct&255,B>1&&(P[O+1]=Ct>>8&255),B>2&&(P[O+2]=Ct>>16&255)),P};function v(u,E,_){s.call(this,u,E,_)}v.prototype=new s,v.prototype.finalize=function(){return this.encode(this.outputBits,!0),s.prototype.finalize.call(this)};var k=function(u){var E,_,B,R,T,P,O,Ct,D,q,De,X,Z,Fe,$,tt,Te,et,rt,Ue,it,nt,ke,ft,ot,qe,st,at,Ke,ut,ht,He,ct,lt,ze,dt,pt,Le,vt,mt,je,gt,At,Qe,bt,yt,Je,wt,xt,Ge,Mt,Et,Ye,St,Nt,Ve,It,_t,Me,Ee,Se,Ne,Ie;for(B=0;B<48;B+=2)R=u[0]^u[10]^u[20]^u[30]^u[40],T=u[1]^u[11]^u[21]^u[31]^u[41],P=u[2]^u[12]^u[22]^u[32]^u[42],O=u[3]^u[13]^u[23]^u[33]^u[43],Ct=u[4]^u[14]^u[24]^u[34]^u[44],D=u[5]^u[15]^u[25]^u[35]^u[45],q=u[6]^u[16]^u[26]^u[36]^u[46],De=u[7]^u[17]^u[27]^u[37]^u[47],X=u[8]^u[18]^u[28]^u[38]^u[48],Z=u[9]^u[19]^u[29]^u[39]^u[49],E=X^(P<<1|O>>>31),_=Z^(O<<1|P>>>31),u[0]^=E,u[1]^=_,u[10]^=E,u[11]^=_,u[20]^=E,u[21]^=_,u[30]^=E,u[31]^=_,u[40]^=E,u[41]^=_,E=R^(Ct<<1|D>>>31),_=T^(D<<1|Ct>>>31),u[2]^=E,u[3]^=_,u[12]^=E,u[13]^=_,u[22]^=E,u[23]^=_,u[32]^=E,u[33]^=_,u[42]^=E,u[43]^=_,E=P^(q<<1|De>>>31),_=O^(De<<1|q>>>31),u[4]^=E,u[5]^=_,u[14]^=E,u[15]^=_,u[24]^=E,u[25]^=_,u[34]^=E,u[35]^=_,u[44]^=E,u[45]^=_,E=Ct^(X<<1|Z>>>31),_=D^(Z<<1|X>>>31),u[6]^=E,u[7]^=_,u[16]^=E,u[17]^=_,u[26]^=E,u[27]^=_,u[36]^=E,u[37]^=_,u[46]^=E,u[47]^=_,E=q^(R<<1|T>>>31),_=De^(T<<1|R>>>31),u[8]^=E,u[9]^=_,u[18]^=E,u[19]^=_,u[28]^=E,u[29]^=_,u[38]^=E,u[39]^=_,u[48]^=E,u[49]^=_,Fe=u[0],$=u[1],yt=u[11]<<4|u[10]>>>28,Je=u[10]<<4|u[11]>>>28,at=u[20]<<3|u[21]>>>29,Ke=u[21]<<3|u[20]>>>29,Ee=u[31]<<9|u[30]>>>23,Se=u[30]<<9|u[31]>>>23,gt=u[40]<<18|u[41]>>>14,At=u[41]<<18|u[40]>>>14,lt=u[2]<<1|u[3]>>>31,ze=u[3]<<1|u[2]>>>31,tt=u[13]<<12|u[12]>>>20,Te=u[12]<<12|u[13]>>>20,wt=u[22]<<10|u[23]>>>22,xt=u[23]<<10|u[22]>>>22,ut=u[33]<<13|u[32]>>>19,ht=u[32]<<13|u[33]>>>19,Ne=u[42]<<2|u[43]>>>30,Ie=u[43]<<2|u[42]>>>30,St=u[5]<<30|u[4]>>>2,Nt=u[4]<<30|u[5]>>>2,dt=u[14]<<6|u[15]>>>26,pt=u[15]<<6|u[14]>>>26,et=u[25]<<11|u[24]>>>21,rt=u[24]<<11|u[25]>>>21,Ge=u[34]<<15|u[35]>>>17,Mt=u[35]<<15|u[34]>>>17,He=u[45]<<29|u[44]>>>3,ct=u[44]<<29|u[45]>>>3,ft=u[6]<<28|u[7]>>>4,ot=u[7]<<28|u[6]>>>4,Ve=u[17]<<23|u[16]>>>9,It=u[16]<<23|u[17]>>>9,Le=u[26]<<25|u[27]>>>7,vt=u[27]<<25|u[26]>>>7,Ue=u[36]<<21|u[37]>>>11,it=u[37]<<21|u[36]>>>11,Et=u[47]<<24|u[46]>>>8,Ye=u[46]<<24|u[47]>>>8,Qe=u[8]<<27|u[9]>>>5,bt=u[9]<<27|u[8]>>>5,qe=u[18]<<20|u[19]>>>12,st=u[19]<<20|u[18]>>>12,_t=u[29]<<7|u[28]>>>25,Me=u[28]<<7|u[29]>>>25,mt=u[38]<<8|u[39]>>>24,je=u[39]<<8|u[38]>>>24,nt=u[48]<<14|u[49]>>>18,ke=u[49]<<14|u[48]>>>18,u[0]=Fe^~tt&et,u[1]=$^~Te&rt,u[10]=ft^~qe&at,u[11]=ot^~st&Ke,u[20]=lt^~dt&Le,u[21]=ze^~pt&vt,u[30]=Qe^~yt&wt,u[31]=bt^~Je&xt,u[40]=St^~Ve&_t,u[41]=Nt^~It&Me,u[2]=tt^~et&Ue,u[3]=Te^~rt&it,u[12]=qe^~at&ut,u[13]=st^~Ke&ht,u[22]=dt^~Le&mt,u[23]=pt^~vt&je,u[32]=yt^~wt&Ge,u[33]=Je^~xt&Mt,u[42]=Ve^~_t&Ee,u[43]=It^~Me&Se,u[4]=et^~Ue&nt,u[5]=rt^~it&ke,u[14]=at^~ut&He,u[15]=Ke^~ht&ct,u[24]=Le^~mt>,u[25]=vt^~je&At,u[34]=wt^~Ge&Et,u[35]=xt^~Mt&Ye,u[44]=_t^~Ee&Ne,u[45]=Me^~Se&Ie,u[6]=Ue^~nt&Fe,u[7]=it^~ke&$,u[16]=ut^~He&ft,u[17]=ht^~ct&ot,u[26]=mt^~gt<,u[27]=je^~At&ze,u[36]=Ge^~Et&Qe,u[37]=Mt^~Ye&bt,u[46]=Ee^~Ne&St,u[47]=Se^~Ie&Nt,u[8]=nt^~Fe&tt,u[9]=ke^~$&Te,u[18]=He^~ft&qe,u[19]=ct^~ot&st,u[28]=gt^~lt&dt,u[29]=At^~ze&pt,u[38]=Et^~Qe&yt,u[39]=Ye^~bt&Je,u[48]=Ne^~St&Ve,u[49]=Ie^~Nt&It,u[0]^=C[B],u[1]^=C[B+1]};if(p)e.exports=f;else for(c=0;c{try{if(\"test\".normalize(t)!==\"test\")throw new Error(\"bad normalize\")}catch{e.push(t)}}),e.length)throw new Error(\"missing \"+e.join(\", \"));if(String.fromCharCode(233).normalize(\"NFD\")!==String.fromCharCode(101,769))throw new Error(\"broken implementation\")}catch(e){return e.message}return null}const Un=w0();var Ai;(function(e){e.DEBUG=\"DEBUG\",e.INFO=\"INFO\",e.WARNING=\"WARNING\",e.ERROR=\"ERROR\",e.OFF=\"OFF\"})(Ai||(Ai={}));var re;(function(e){e.UNKNOWN_ERROR=\"UNKNOWN_ERROR\",e.NOT_IMPLEMENTED=\"NOT_IMPLEMENTED\",e.UNSUPPORTED_OPERATION=\"UNSUPPORTED_OPERATION\",e.NETWORK_ERROR=\"NETWORK_ERROR\",e.SERVER_ERROR=\"SERVER_ERROR\",e.TIMEOUT=\"TIMEOUT\",e.BUFFER_OVERRUN=\"BUFFER_OVERRUN\",e.NUMERIC_FAULT=\"NUMERIC_FAULT\",e.MISSING_NEW=\"MISSING_NEW\",e.INVALID_ARGUMENT=\"INVALID_ARGUMENT\",e.MISSING_ARGUMENT=\"MISSING_ARGUMENT\",e.UNEXPECTED_ARGUMENT=\"UNEXPECTED_ARGUMENT\",e.CALL_EXCEPTION=\"CALL_EXCEPTION\",e.INSUFFICIENT_FUNDS=\"INSUFFICIENT_FUNDS\",e.NONCE_EXPIRED=\"NONCE_EXPIRED\",e.REPLACEMENT_UNDERPRICED=\"REPLACEMENT_UNDERPRICED\",e.UNPREDICTABLE_GAS_LIMIT=\"UNPREDICTABLE_GAS_LIMIT\",e.TRANSACTION_REPLACED=\"TRANSACTION_REPLACED\",e.ACTION_REJECTED=\"ACTION_REJECTED\"})(re||(re={}));const kn=\"0123456789abcdef\";class L{constructor(t){Object.defineProperty(this,\"version\",{enumerable:!0,value:t,writable:!1})}_log(t,r){const i=t.toLowerCase();Cr[i]==null&&this.throwArgumentError(\"invalid log level name\",\"logLevel\",t),!(Tn>Cr[i])&&console.log.apply(console,r)}debug(...t){this._log(L.levels.DEBUG,t)}info(...t){this._log(L.levels.INFO,t)}warn(...t){this._log(L.levels.WARNING,t)}makeError(t,r,i){if(Fn)return this.makeError(\"censored error\",r,{});r||(r=L.errors.UNKNOWN_ERROR),i||(i={});const n=[];Object.keys(i).forEach(b=>{const m=i[b];try{if(m instanceof Uint8Array){let w=\"\";for(let y=0;y>4],w+=kn[m[y]&15];n.push(b+\"=Uint8Array(0x\"+w+\")\")}else n.push(b+\"=\"+JSON.stringify(m))}catch{n.push(b+\"=\"+JSON.stringify(i[b].toString()))}}),n.push(`code=${r}`),n.push(`version=${this.version}`);const o=t;let h=\"\";switch(r){case re.NUMERIC_FAULT:{h=\"NUMERIC_FAULT\";const b=t;switch(b){case\"overflow\":case\"underflow\":case\"division-by-zero\":h+=\"-\"+b;break;case\"negative-power\":case\"negative-width\":h+=\"-unsupported\";break;case\"unbound-bitwise-result\":h+=\"-unbound-result\";break}break}case re.CALL_EXCEPTION:case re.INSUFFICIENT_FUNDS:case re.MISSING_NEW:case re.NONCE_EXPIRED:case re.REPLACEMENT_UNDERPRICED:case re.TRANSACTION_REPLACED:case re.UNPREDICTABLE_GAS_LIMIT:h=r;break}h&&(t+=\" [ See: https://links.ethers.org/v5-errors-\"+h+\" ]\"),n.length&&(t+=\" (\"+n.join(\", \")+\")\");const p=new Error(t);return p.reason=o,p.code=r,Object.keys(i).forEach(function(b){p[b]=i[b]}),p}throwError(t,r,i){throw this.makeError(t,r,i)}throwArgumentError(t,r,i){return this.throwError(t,L.errors.INVALID_ARGUMENT,{argument:r,value:i})}assert(t,r,i,n){t||this.throwError(r,i,n)}assertArgument(t,r,i,n){t||this.throwArgumentError(r,i,n)}checkNormalize(t){Un&&this.throwError(\"platform missing String.prototype.normalize\",L.errors.UNSUPPORTED_OPERATION,{operation:\"String.prototype.normalize\",form:Un})}checkSafeUint53(t,r){typeof t==\"number\"&&(r==null&&(r=\"value not safe\"),(t<0||t>=9007199254740991)&&this.throwError(r,L.errors.NUMERIC_FAULT,{operation:\"checkSafeInteger\",fault:\"out-of-safe-range\",value:t}),t%1&&this.throwError(r,L.errors.NUMERIC_FAULT,{operation:\"checkSafeInteger\",fault:\"non-integer\",value:t}))}checkArgumentCount(t,r,i){i?i=\": \"+i:i=\"\",tr&&this.throwError(\"too many arguments\"+i,L.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}checkNew(t,r){(t===Object||t==null)&&this.throwError(\"missing new\",L.errors.MISSING_NEW,{name:r.name})}checkAbstract(t,r){t===r?this.throwError(\"cannot instantiate abstract class \"+JSON.stringify(r.name)+\" directly; use a sub-class\",L.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:\"new\"}):(t===Object||t==null)&&this.throwError(\"missing new\",L.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return gi||(gi=new L(y0)),gi}static setCensorship(t,r){if(!t&&r&&this.globalLogger().throwError(\"cannot permanently disable censorship\",L.errors.UNSUPPORTED_OPERATION,{operation:\"setCensorship\"}),Dn){if(!t)return;this.globalLogger().throwError(\"error censorship permanent\",L.errors.UNSUPPORTED_OPERATION,{operation:\"setCensorship\"})}Fn=!!t,Dn=!!r}static setLogLevel(t){const r=Cr[t.toLowerCase()];if(r==null){L.globalLogger().warn(\"invalid log level - \"+t);return}Tn=r}static from(t){return new L(t)}}L.errors=re,L.levels=Ai;const x0=\"bytes/5.7.0\",Dt=new L(x0);function qn(e){return!!e.toHexString}function rr(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return rr(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function M0(e){return Qt(e)&&!(e.length%2)||ir(e)}function Kn(e){return typeof e==\"number\"&&e==e&&e%1===0}function ir(e){if(e==null)return!1;if(e.constructor===Uint8Array)return!0;if(typeof e==\"string\"||!Kn(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function Ot(e,t){if(t||(t={}),typeof e==\"number\"){Dt.checkSafeUint53(e,\"invalid arrayify value\");const r=[];for(;e;)r.unshift(e&255),e=parseInt(String(e/256));return r.length===0&&r.push(0),rr(new Uint8Array(r))}if(t.allowMissingPrefix&&typeof e==\"string\"&&e.substring(0,2)!==\"0x\"&&(e=\"0x\"+e),qn(e)&&(e=e.toHexString()),Qt(e)){let r=e.substring(2);r.length%2&&(t.hexPad===\"left\"?r=\"0\"+r:t.hexPad===\"right\"?r+=\"0\":Dt.throwArgumentError(\"hex data is odd-length\",\"value\",e));const i=[];for(let n=0;nOt(n)),r=t.reduce((n,o)=>n+o.length,0),i=new Uint8Array(r);return t.reduce((n,o)=>(i.set(o,n),n+o.length),0),rr(i)}function S0(e,t){e=Ot(e),e.length>t&&Dt.throwArgumentError(\"value out of range\",\"value\",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),rr(r)}function Qt(e,t){return!(typeof e!=\"string\"||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const bi=\"0123456789abcdef\";function Kt(e,t){if(t||(t={}),typeof e==\"number\"){Dt.checkSafeUint53(e,\"invalid hexlify value\");let r=\"\";for(;e;)r=bi[e&15]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r=\"0\"+r),\"0x\"+r):\"0x00\"}if(typeof e==\"bigint\")return e=e.toString(16),e.length%2?\"0x0\"+e:\"0x\"+e;if(t.allowMissingPrefix&&typeof e==\"string\"&&e.substring(0,2)!==\"0x\"&&(e=\"0x\"+e),qn(e))return e.toHexString();if(Qt(e))return e.length%2&&(t.hexPad===\"left\"?e=\"0x0\"+e.substring(2):t.hexPad===\"right\"?e+=\"0\":Dt.throwArgumentError(\"hex data is odd-length\",\"value\",e)),e.toLowerCase();if(ir(e)){let r=\"0x\";for(let i=0;i>4]+bi[n&15]}return r}return Dt.throwArgumentError(\"invalid hexlify value\",\"value\",e)}function N0(e){if(typeof e!=\"string\")e=Kt(e);else if(!Qt(e)||e.length%2)return null;return(e.length-2)/2}function Hn(e,t,r){return typeof e!=\"string\"?e=Kt(e):(!Qt(e)||e.length%2)&&Dt.throwArgumentError(\"invalid hexData\",\"value\",e),t=2+2*t,r!=null?\"0x\"+e.substring(t,2+2*r):\"0x\"+e.substring(t)}function oe(e,t){for(typeof e!=\"string\"?e=Kt(e):Qt(e)||Dt.throwArgumentError(\"invalid hex string\",\"value\",e),e.length>2*t+2&&Dt.throwArgumentError(\"value out of range\",\"value\",arguments[1]);e.length<2*t+2;)e=\"0x0\"+e.substring(2);return e}function zn(e){const t={r:\"0x\",s:\"0x\",_vs:\"0x\",recoveryParam:0,v:0,yParityAndS:\"0x\",compact:\"0x\"};if(M0(e)){let r=Ot(e);r.length===64?(t.v=27+(r[32]>>7),r[32]&=127,t.r=Kt(r.slice(0,32)),t.s=Kt(r.slice(32,64))):r.length===65?(t.r=Kt(r.slice(0,32)),t.s=Kt(r.slice(32,64)),t.v=r[64]):Dt.throwArgumentError(\"invalid signature string\",\"signature\",e),t.v<27&&(t.v===0||t.v===1?t.v+=27:Dt.throwArgumentError(\"signature invalid v byte\",\"signature\",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=Kt(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,t._vs!=null){const n=S0(Ot(t._vs),32);t._vs=Kt(n);const o=n[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=o:t.recoveryParam!==o&&Dt.throwArgumentError(\"signature recoveryParam mismatch _vs\",\"signature\",e),n[0]&=127;const h=Kt(n);t.s==null?t.s=h:t.s!==h&&Dt.throwArgumentError(\"signature v mismatch _vs\",\"signature\",e)}if(t.recoveryParam==null)t.v==null?Dt.throwArgumentError(\"signature missing v and recoveryParam\",\"signature\",e):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const n=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==n&&Dt.throwArgumentError(\"signature recoveryParam mismatch v\",\"signature\",e)}t.r==null||!Qt(t.r)?Dt.throwArgumentError(\"signature missing or invalid r\",\"signature\",e):t.r=oe(t.r,32),t.s==null||!Qt(t.s)?Dt.throwArgumentError(\"signature missing or invalid s\",\"signature\",e):t.s=oe(t.s,32);const r=Ot(t.s);r[0]>=128&&Dt.throwArgumentError(\"signature s out of range\",\"signature\",e),t.recoveryParam&&(r[0]|=128);const i=Kt(r);t._vs&&(Qt(t._vs)||Dt.throwArgumentError(\"signature invalid _vs\",\"signature\",e),t._vs=oe(t._vs,32)),t._vs==null?t._vs=i:t._vs!==i&&Dt.throwArgumentError(\"signature _vs mismatch v and s\",\"signature\",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function yi(e){return\"0x\"+b0.keccak_256(Ot(e))}var Ln={exports:{}},I0={},_0=Object.freeze({__proto__:null,default:I0}),B0=A0(_0);(function(e){(function(t,r){function i(A,f){if(!A)throw new Error(f||\"Assertion failed\")}function n(A,f){A.super_=f;var a=function(){};a.prototype=f.prototype,A.prototype=new a,A.prototype.constructor=A}function o(A,f,a){if(o.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((f===\"le\"||f===\"be\")&&(a=f,f=10),this._init(A||0,f||10,a||\"be\"))}typeof t==\"object\"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var h;try{typeof window<\"u\"&&typeof window.Buffer<\"u\"?h=window.Buffer:h=B0.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f==\"object\"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,a){return f.cmp(a)>0?f:a},o.min=function(f,a){return f.cmp(a)<0?f:a},o.prototype._init=function(f,a,c){if(typeof f==\"number\")return this._initNumber(f,a,c);if(typeof f==\"object\")return this._initArray(f,a,c);a===\"hex\"&&(a=16),i(a===(a|0)&&a>=2&&a<=36),f=f.toString().replace(/\\s+/g,\"\");var d=0;f[0]===\"-\"&&(d++,this.negative=1),d=0;d-=3)x=f[d]|f[d-1]<<8|f[d-2]<<16,this.words[g]|=x<>>26-M&67108863,M+=24,M>=26&&(M-=26,g++);else if(c===\"le\")for(d=0,g=0;d>>26-M&67108863,M+=24,M>=26&&(M-=26,g++);return this._strip()};function p(A,f){var a=A.charCodeAt(f);if(a>=48&&a<=57)return a-48;if(a>=65&&a<=70)return a-55;if(a>=97&&a<=102)return a-87;i(!1,\"Invalid character in \"+A)}function b(A,f,a){var c=p(A,a);return a-1>=f&&(c|=p(A,a-1)<<4),c}o.prototype._parseHex=function(f,a,c){this.length=Math.ceil((f.length-a)/6),this.words=new Array(this.length);for(var d=0;d=a;d-=2)M=b(f,a,d)<=18?(g-=18,x+=1,this.words[x]|=M>>>26):g+=8;else{var l=f.length-a;for(d=l%2===0?a+1:a;d=18?(g-=18,x+=1,this.words[x]|=M>>>26):g+=8}this._strip()};function m(A,f,a,c){for(var d=0,g=0,x=Math.min(A.length,a),M=f;M=49?g=l-49+10:l>=17?g=l-17+10:g=l,i(l>=0&&g1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<\"u\"&&typeof Symbol.for==\"function\")try{o.prototype[Symbol.for(\"nodejs.util.inspect.custom\")]=y}catch{o.prototype.inspect=y}else o.prototype.inspect=y;function y(){return(this.red?\"\"}var S=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],N=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(f,a){f=f||10,a=a|0||1;var c;if(f===16||f===\"hex\"){c=\"\";for(var d=0,g=0,x=0;x>>24-d&16777215,d+=2,d>=26&&(d-=26,x--),g!==0||x!==this.length-1?c=S[6-l.length]+l+c:c=l+c}for(g!==0&&(c=g.toString(16)+c);c.length%a!==0;)c=\"0\"+c;return this.negative!==0&&(c=\"-\"+c),c}if(f===(f|0)&&f>=2&&f<=36){var s=I[f],v=N[f];c=\"\";var k=this.clone();for(k.negative=0;!k.isZero();){var u=k.modrn(v).toString(f);k=k.idivn(v),k.isZero()?c=u+c:c=S[s-u.length]+u+c}for(this.isZero()&&(c=\"0\"+c);c.length%a!==0;)c=\"0\"+c;return this.negative!==0&&(c=\"-\"+c),c}i(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,\"Number can only safely store up to 53 bits\"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},h&&(o.prototype.toBuffer=function(f,a){return this.toArrayLike(h,f,a)}),o.prototype.toArray=function(f,a){return this.toArrayLike(Array,f,a)};var C=function(f,a){return f.allocUnsafe?f.allocUnsafe(a):new f(a)};o.prototype.toArrayLike=function(f,a,c){this._strip();var d=this.byteLength(),g=c||Math.max(1,d);i(d<=g,\"byte array longer than desired length\"),i(g>0,\"Requested array length <= 0\");var x=C(f,g),M=a===\"le\"?\"LE\":\"BE\";return this[\"_toArrayLike\"+M](x,d),x},o.prototype._toArrayLikeLE=function(f,a){for(var c=0,d=0,g=0,x=0;g>8&255),c>16&255),x===6?(c>24&255),d=0,x=0):(d=M>>>24,x+=2)}if(c=0&&(f[c--]=M>>8&255),c>=0&&(f[c--]=M>>16&255),x===6?(c>=0&&(f[c--]=M>>24&255),d=0,x=0):(d=M>>>24,x+=2)}if(c>=0)for(f[c--]=d;c>=0;)f[c--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var a=f,c=0;return a>=4096&&(c+=13,a>>>=13),a>=64&&(c+=7,a>>>=7),a>=8&&(c+=4,a>>>=4),a>=2&&(c+=2,a>>>=2),c+a},o.prototype._zeroBits=function(f){if(f===0)return 26;var a=f,c=0;return a&8191||(c+=13,a>>>=13),a&127||(c+=7,a>>>=7),a&15||(c+=4,a>>>=4),a&3||(c+=2,a>>>=2),a&1||c++,c},o.prototype.bitLength=function(){var f=this.words[this.length-1],a=this._countBits(f);return(this.length-1)*26+a};function F(A){for(var f=new Array(A.bitLength()),a=0;a>>d&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,a=0;af.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var a;this.length>f.length?a=f:a=this;for(var c=0;cf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var a,c;this.length>f.length?(a=this,c=f):(a=f,c=this);for(var d=0;df.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){i(typeof f==\"number\"&&f>=0);var a=Math.ceil(f/26)|0,c=f%26;this._expand(a),c>0&&a--;for(var d=0;d0&&(this.words[d]=~this.words[d]&67108863>>26-c),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,a){i(typeof f==\"number\"&&f>=0);var c=f/26|0,d=f%26;return this._expand(c+1),a?this.words[c]=this.words[c]|1<f.length?(c=this,d=f):(c=f,d=this);for(var g=0,x=0;x>>26;for(;g!==0&&x>>26;if(this.length=c.length,g!==0)this.words[this.length]=g,this.length++;else if(c!==this)for(;xf.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var a=this.iadd(f);return f.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var c=this.cmp(f);if(c===0)return this.negative=0,this.length=1,this.words[0]=0,this;var d,g;c>0?(d=this,g=f):(d=f,g=this);for(var x=0,M=0;M>26,this.words[M]=a&67108863;for(;x!==0&&M>26,this.words[M]=a&67108863;if(x===0&&M>>26,k=l&67108863,u=Math.min(s,f.length-1),E=Math.max(0,s-A.length+1);E<=u;E++){var _=s-E|0;d=A.words[_]|0,g=f.words[E]|0,x=d*g+k,v+=x/67108864|0,k=x&67108863}a.words[s]=k|0,l=v|0}return l!==0?a.words[s]=l|0:a.length--,a._strip()}var J=function(f,a,c){var d=f.words,g=a.words,x=c.words,M=0,l,s,v,k=d[0]|0,u=k&8191,E=k>>>13,_=d[1]|0,B=_&8191,R=_>>>13,T=d[2]|0,P=T&8191,O=T>>>13,Ct=d[3]|0,D=Ct&8191,q=Ct>>>13,De=d[4]|0,X=De&8191,Z=De>>>13,Fe=d[5]|0,$=Fe&8191,tt=Fe>>>13,Te=d[6]|0,et=Te&8191,rt=Te>>>13,Ue=d[7]|0,it=Ue&8191,nt=Ue>>>13,ke=d[8]|0,ft=ke&8191,ot=ke>>>13,qe=d[9]|0,st=qe&8191,at=qe>>>13,Ke=g[0]|0,ut=Ke&8191,ht=Ke>>>13,He=g[1]|0,ct=He&8191,lt=He>>>13,ze=g[2]|0,dt=ze&8191,pt=ze>>>13,Le=g[3]|0,vt=Le&8191,mt=Le>>>13,je=g[4]|0,gt=je&8191,At=je>>>13,Qe=g[5]|0,bt=Qe&8191,yt=Qe>>>13,Je=g[6]|0,wt=Je&8191,xt=Je>>>13,Ge=g[7]|0,Mt=Ge&8191,Et=Ge>>>13,Ye=g[8]|0,St=Ye&8191,Nt=Ye>>>13,Ve=g[9]|0,It=Ve&8191,_t=Ve>>>13;c.negative=f.negative^a.negative,c.length=19,l=Math.imul(u,ut),s=Math.imul(u,ht),s=s+Math.imul(E,ut)|0,v=Math.imul(E,ht);var Me=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Me>>>26)|0,Me&=67108863,l=Math.imul(B,ut),s=Math.imul(B,ht),s=s+Math.imul(R,ut)|0,v=Math.imul(R,ht),l=l+Math.imul(u,ct)|0,s=s+Math.imul(u,lt)|0,s=s+Math.imul(E,ct)|0,v=v+Math.imul(E,lt)|0;var Ee=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,l=Math.imul(P,ut),s=Math.imul(P,ht),s=s+Math.imul(O,ut)|0,v=Math.imul(O,ht),l=l+Math.imul(B,ct)|0,s=s+Math.imul(B,lt)|0,s=s+Math.imul(R,ct)|0,v=v+Math.imul(R,lt)|0,l=l+Math.imul(u,dt)|0,s=s+Math.imul(u,pt)|0,s=s+Math.imul(E,dt)|0,v=v+Math.imul(E,pt)|0;var Se=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Se>>>26)|0,Se&=67108863,l=Math.imul(D,ut),s=Math.imul(D,ht),s=s+Math.imul(q,ut)|0,v=Math.imul(q,ht),l=l+Math.imul(P,ct)|0,s=s+Math.imul(P,lt)|0,s=s+Math.imul(O,ct)|0,v=v+Math.imul(O,lt)|0,l=l+Math.imul(B,dt)|0,s=s+Math.imul(B,pt)|0,s=s+Math.imul(R,dt)|0,v=v+Math.imul(R,pt)|0,l=l+Math.imul(u,vt)|0,s=s+Math.imul(u,mt)|0,s=s+Math.imul(E,vt)|0,v=v+Math.imul(E,mt)|0;var Ne=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l=Math.imul(X,ut),s=Math.imul(X,ht),s=s+Math.imul(Z,ut)|0,v=Math.imul(Z,ht),l=l+Math.imul(D,ct)|0,s=s+Math.imul(D,lt)|0,s=s+Math.imul(q,ct)|0,v=v+Math.imul(q,lt)|0,l=l+Math.imul(P,dt)|0,s=s+Math.imul(P,pt)|0,s=s+Math.imul(O,dt)|0,v=v+Math.imul(O,pt)|0,l=l+Math.imul(B,vt)|0,s=s+Math.imul(B,mt)|0,s=s+Math.imul(R,vt)|0,v=v+Math.imul(R,mt)|0,l=l+Math.imul(u,gt)|0,s=s+Math.imul(u,At)|0,s=s+Math.imul(E,gt)|0,v=v+Math.imul(E,At)|0;var Ie=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,l=Math.imul($,ut),s=Math.imul($,ht),s=s+Math.imul(tt,ut)|0,v=Math.imul(tt,ht),l=l+Math.imul(X,ct)|0,s=s+Math.imul(X,lt)|0,s=s+Math.imul(Z,ct)|0,v=v+Math.imul(Z,lt)|0,l=l+Math.imul(D,dt)|0,s=s+Math.imul(D,pt)|0,s=s+Math.imul(q,dt)|0,v=v+Math.imul(q,pt)|0,l=l+Math.imul(P,vt)|0,s=s+Math.imul(P,mt)|0,s=s+Math.imul(O,vt)|0,v=v+Math.imul(O,mt)|0,l=l+Math.imul(B,gt)|0,s=s+Math.imul(B,At)|0,s=s+Math.imul(R,gt)|0,v=v+Math.imul(R,At)|0,l=l+Math.imul(u,bt)|0,s=s+Math.imul(u,yt)|0,s=s+Math.imul(E,bt)|0,v=v+Math.imul(E,yt)|0;var Wr=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,l=Math.imul(et,ut),s=Math.imul(et,ht),s=s+Math.imul(rt,ut)|0,v=Math.imul(rt,ht),l=l+Math.imul($,ct)|0,s=s+Math.imul($,lt)|0,s=s+Math.imul(tt,ct)|0,v=v+Math.imul(tt,lt)|0,l=l+Math.imul(X,dt)|0,s=s+Math.imul(X,pt)|0,s=s+Math.imul(Z,dt)|0,v=v+Math.imul(Z,pt)|0,l=l+Math.imul(D,vt)|0,s=s+Math.imul(D,mt)|0,s=s+Math.imul(q,vt)|0,v=v+Math.imul(q,mt)|0,l=l+Math.imul(P,gt)|0,s=s+Math.imul(P,At)|0,s=s+Math.imul(O,gt)|0,v=v+Math.imul(O,At)|0,l=l+Math.imul(B,bt)|0,s=s+Math.imul(B,yt)|0,s=s+Math.imul(R,bt)|0,v=v+Math.imul(R,yt)|0,l=l+Math.imul(u,wt)|0,s=s+Math.imul(u,xt)|0,s=s+Math.imul(E,wt)|0,v=v+Math.imul(E,xt)|0;var Xr=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,l=Math.imul(it,ut),s=Math.imul(it,ht),s=s+Math.imul(nt,ut)|0,v=Math.imul(nt,ht),l=l+Math.imul(et,ct)|0,s=s+Math.imul(et,lt)|0,s=s+Math.imul(rt,ct)|0,v=v+Math.imul(rt,lt)|0,l=l+Math.imul($,dt)|0,s=s+Math.imul($,pt)|0,s=s+Math.imul(tt,dt)|0,v=v+Math.imul(tt,pt)|0,l=l+Math.imul(X,vt)|0,s=s+Math.imul(X,mt)|0,s=s+Math.imul(Z,vt)|0,v=v+Math.imul(Z,mt)|0,l=l+Math.imul(D,gt)|0,s=s+Math.imul(D,At)|0,s=s+Math.imul(q,gt)|0,v=v+Math.imul(q,At)|0,l=l+Math.imul(P,bt)|0,s=s+Math.imul(P,yt)|0,s=s+Math.imul(O,bt)|0,v=v+Math.imul(O,yt)|0,l=l+Math.imul(B,wt)|0,s=s+Math.imul(B,xt)|0,s=s+Math.imul(R,wt)|0,v=v+Math.imul(R,xt)|0,l=l+Math.imul(u,Mt)|0,s=s+Math.imul(u,Et)|0,s=s+Math.imul(E,Mt)|0,v=v+Math.imul(E,Et)|0;var Zr=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,l=Math.imul(ft,ut),s=Math.imul(ft,ht),s=s+Math.imul(ot,ut)|0,v=Math.imul(ot,ht),l=l+Math.imul(it,ct)|0,s=s+Math.imul(it,lt)|0,s=s+Math.imul(nt,ct)|0,v=v+Math.imul(nt,lt)|0,l=l+Math.imul(et,dt)|0,s=s+Math.imul(et,pt)|0,s=s+Math.imul(rt,dt)|0,v=v+Math.imul(rt,pt)|0,l=l+Math.imul($,vt)|0,s=s+Math.imul($,mt)|0,s=s+Math.imul(tt,vt)|0,v=v+Math.imul(tt,mt)|0,l=l+Math.imul(X,gt)|0,s=s+Math.imul(X,At)|0,s=s+Math.imul(Z,gt)|0,v=v+Math.imul(Z,At)|0,l=l+Math.imul(D,bt)|0,s=s+Math.imul(D,yt)|0,s=s+Math.imul(q,bt)|0,v=v+Math.imul(q,yt)|0,l=l+Math.imul(P,wt)|0,s=s+Math.imul(P,xt)|0,s=s+Math.imul(O,wt)|0,v=v+Math.imul(O,xt)|0,l=l+Math.imul(B,Mt)|0,s=s+Math.imul(B,Et)|0,s=s+Math.imul(R,Mt)|0,v=v+Math.imul(R,Et)|0,l=l+Math.imul(u,St)|0,s=s+Math.imul(u,Nt)|0,s=s+Math.imul(E,St)|0,v=v+Math.imul(E,Nt)|0;var $r=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+($r>>>26)|0,$r&=67108863,l=Math.imul(st,ut),s=Math.imul(st,ht),s=s+Math.imul(at,ut)|0,v=Math.imul(at,ht),l=l+Math.imul(ft,ct)|0,s=s+Math.imul(ft,lt)|0,s=s+Math.imul(ot,ct)|0,v=v+Math.imul(ot,lt)|0,l=l+Math.imul(it,dt)|0,s=s+Math.imul(it,pt)|0,s=s+Math.imul(nt,dt)|0,v=v+Math.imul(nt,pt)|0,l=l+Math.imul(et,vt)|0,s=s+Math.imul(et,mt)|0,s=s+Math.imul(rt,vt)|0,v=v+Math.imul(rt,mt)|0,l=l+Math.imul($,gt)|0,s=s+Math.imul($,At)|0,s=s+Math.imul(tt,gt)|0,v=v+Math.imul(tt,At)|0,l=l+Math.imul(X,bt)|0,s=s+Math.imul(X,yt)|0,s=s+Math.imul(Z,bt)|0,v=v+Math.imul(Z,yt)|0,l=l+Math.imul(D,wt)|0,s=s+Math.imul(D,xt)|0,s=s+Math.imul(q,wt)|0,v=v+Math.imul(q,xt)|0,l=l+Math.imul(P,Mt)|0,s=s+Math.imul(P,Et)|0,s=s+Math.imul(O,Mt)|0,v=v+Math.imul(O,Et)|0,l=l+Math.imul(B,St)|0,s=s+Math.imul(B,Nt)|0,s=s+Math.imul(R,St)|0,v=v+Math.imul(R,Nt)|0,l=l+Math.imul(u,It)|0,s=s+Math.imul(u,_t)|0,s=s+Math.imul(E,It)|0,v=v+Math.imul(E,_t)|0;var ti=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ti>>>26)|0,ti&=67108863,l=Math.imul(st,ct),s=Math.imul(st,lt),s=s+Math.imul(at,ct)|0,v=Math.imul(at,lt),l=l+Math.imul(ft,dt)|0,s=s+Math.imul(ft,pt)|0,s=s+Math.imul(ot,dt)|0,v=v+Math.imul(ot,pt)|0,l=l+Math.imul(it,vt)|0,s=s+Math.imul(it,mt)|0,s=s+Math.imul(nt,vt)|0,v=v+Math.imul(nt,mt)|0,l=l+Math.imul(et,gt)|0,s=s+Math.imul(et,At)|0,s=s+Math.imul(rt,gt)|0,v=v+Math.imul(rt,At)|0,l=l+Math.imul($,bt)|0,s=s+Math.imul($,yt)|0,s=s+Math.imul(tt,bt)|0,v=v+Math.imul(tt,yt)|0,l=l+Math.imul(X,wt)|0,s=s+Math.imul(X,xt)|0,s=s+Math.imul(Z,wt)|0,v=v+Math.imul(Z,xt)|0,l=l+Math.imul(D,Mt)|0,s=s+Math.imul(D,Et)|0,s=s+Math.imul(q,Mt)|0,v=v+Math.imul(q,Et)|0,l=l+Math.imul(P,St)|0,s=s+Math.imul(P,Nt)|0,s=s+Math.imul(O,St)|0,v=v+Math.imul(O,Nt)|0,l=l+Math.imul(B,It)|0,s=s+Math.imul(B,_t)|0,s=s+Math.imul(R,It)|0,v=v+Math.imul(R,_t)|0;var ei=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ei>>>26)|0,ei&=67108863,l=Math.imul(st,dt),s=Math.imul(st,pt),s=s+Math.imul(at,dt)|0,v=Math.imul(at,pt),l=l+Math.imul(ft,vt)|0,s=s+Math.imul(ft,mt)|0,s=s+Math.imul(ot,vt)|0,v=v+Math.imul(ot,mt)|0,l=l+Math.imul(it,gt)|0,s=s+Math.imul(it,At)|0,s=s+Math.imul(nt,gt)|0,v=v+Math.imul(nt,At)|0,l=l+Math.imul(et,bt)|0,s=s+Math.imul(et,yt)|0,s=s+Math.imul(rt,bt)|0,v=v+Math.imul(rt,yt)|0,l=l+Math.imul($,wt)|0,s=s+Math.imul($,xt)|0,s=s+Math.imul(tt,wt)|0,v=v+Math.imul(tt,xt)|0,l=l+Math.imul(X,Mt)|0,s=s+Math.imul(X,Et)|0,s=s+Math.imul(Z,Mt)|0,v=v+Math.imul(Z,Et)|0,l=l+Math.imul(D,St)|0,s=s+Math.imul(D,Nt)|0,s=s+Math.imul(q,St)|0,v=v+Math.imul(q,Nt)|0,l=l+Math.imul(P,It)|0,s=s+Math.imul(P,_t)|0,s=s+Math.imul(O,It)|0,v=v+Math.imul(O,_t)|0;var ri=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ri>>>26)|0,ri&=67108863,l=Math.imul(st,vt),s=Math.imul(st,mt),s=s+Math.imul(at,vt)|0,v=Math.imul(at,mt),l=l+Math.imul(ft,gt)|0,s=s+Math.imul(ft,At)|0,s=s+Math.imul(ot,gt)|0,v=v+Math.imul(ot,At)|0,l=l+Math.imul(it,bt)|0,s=s+Math.imul(it,yt)|0,s=s+Math.imul(nt,bt)|0,v=v+Math.imul(nt,yt)|0,l=l+Math.imul(et,wt)|0,s=s+Math.imul(et,xt)|0,s=s+Math.imul(rt,wt)|0,v=v+Math.imul(rt,xt)|0,l=l+Math.imul($,Mt)|0,s=s+Math.imul($,Et)|0,s=s+Math.imul(tt,Mt)|0,v=v+Math.imul(tt,Et)|0,l=l+Math.imul(X,St)|0,s=s+Math.imul(X,Nt)|0,s=s+Math.imul(Z,St)|0,v=v+Math.imul(Z,Nt)|0,l=l+Math.imul(D,It)|0,s=s+Math.imul(D,_t)|0,s=s+Math.imul(q,It)|0,v=v+Math.imul(q,_t)|0;var ii=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ii>>>26)|0,ii&=67108863,l=Math.imul(st,gt),s=Math.imul(st,At),s=s+Math.imul(at,gt)|0,v=Math.imul(at,At),l=l+Math.imul(ft,bt)|0,s=s+Math.imul(ft,yt)|0,s=s+Math.imul(ot,bt)|0,v=v+Math.imul(ot,yt)|0,l=l+Math.imul(it,wt)|0,s=s+Math.imul(it,xt)|0,s=s+Math.imul(nt,wt)|0,v=v+Math.imul(nt,xt)|0,l=l+Math.imul(et,Mt)|0,s=s+Math.imul(et,Et)|0,s=s+Math.imul(rt,Mt)|0,v=v+Math.imul(rt,Et)|0,l=l+Math.imul($,St)|0,s=s+Math.imul($,Nt)|0,s=s+Math.imul(tt,St)|0,v=v+Math.imul(tt,Nt)|0,l=l+Math.imul(X,It)|0,s=s+Math.imul(X,_t)|0,s=s+Math.imul(Z,It)|0,v=v+Math.imul(Z,_t)|0;var ni=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ni>>>26)|0,ni&=67108863,l=Math.imul(st,bt),s=Math.imul(st,yt),s=s+Math.imul(at,bt)|0,v=Math.imul(at,yt),l=l+Math.imul(ft,wt)|0,s=s+Math.imul(ft,xt)|0,s=s+Math.imul(ot,wt)|0,v=v+Math.imul(ot,xt)|0,l=l+Math.imul(it,Mt)|0,s=s+Math.imul(it,Et)|0,s=s+Math.imul(nt,Mt)|0,v=v+Math.imul(nt,Et)|0,l=l+Math.imul(et,St)|0,s=s+Math.imul(et,Nt)|0,s=s+Math.imul(rt,St)|0,v=v+Math.imul(rt,Nt)|0,l=l+Math.imul($,It)|0,s=s+Math.imul($,_t)|0,s=s+Math.imul(tt,It)|0,v=v+Math.imul(tt,_t)|0;var fi=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(fi>>>26)|0,fi&=67108863,l=Math.imul(st,wt),s=Math.imul(st,xt),s=s+Math.imul(at,wt)|0,v=Math.imul(at,xt),l=l+Math.imul(ft,Mt)|0,s=s+Math.imul(ft,Et)|0,s=s+Math.imul(ot,Mt)|0,v=v+Math.imul(ot,Et)|0,l=l+Math.imul(it,St)|0,s=s+Math.imul(it,Nt)|0,s=s+Math.imul(nt,St)|0,v=v+Math.imul(nt,Nt)|0,l=l+Math.imul(et,It)|0,s=s+Math.imul(et,_t)|0,s=s+Math.imul(rt,It)|0,v=v+Math.imul(rt,_t)|0;var oi=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(oi>>>26)|0,oi&=67108863,l=Math.imul(st,Mt),s=Math.imul(st,Et),s=s+Math.imul(at,Mt)|0,v=Math.imul(at,Et),l=l+Math.imul(ft,St)|0,s=s+Math.imul(ft,Nt)|0,s=s+Math.imul(ot,St)|0,v=v+Math.imul(ot,Nt)|0,l=l+Math.imul(it,It)|0,s=s+Math.imul(it,_t)|0,s=s+Math.imul(nt,It)|0,v=v+Math.imul(nt,_t)|0;var si=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(si>>>26)|0,si&=67108863,l=Math.imul(st,St),s=Math.imul(st,Nt),s=s+Math.imul(at,St)|0,v=Math.imul(at,Nt),l=l+Math.imul(ft,It)|0,s=s+Math.imul(ft,_t)|0,s=s+Math.imul(ot,It)|0,v=v+Math.imul(ot,_t)|0;var ai=(M+l|0)+((s&8191)<<13)|0;M=(v+(s>>>13)|0)+(ai>>>26)|0,ai&=67108863,l=Math.imul(st,It),s=Math.imul(st,_t),s=s+Math.imul(at,It)|0,v=Math.imul(at,_t);var ui=(M+l|0)+((s&8191)<<13)|0;return M=(v+(s>>>13)|0)+(ui>>>26)|0,ui&=67108863,x[0]=Me,x[1]=Ee,x[2]=Se,x[3]=Ne,x[4]=Ie,x[5]=Wr,x[6]=Xr,x[7]=Zr,x[8]=$r,x[9]=ti,x[10]=ei,x[11]=ri,x[12]=ii,x[13]=ni,x[14]=fi,x[15]=oi,x[16]=si,x[17]=ai,x[18]=ui,M!==0&&(x[19]=M,c.length++),c};Math.imul||(J=U);function Bt(A,f,a){a.negative=f.negative^A.negative,a.length=A.length+f.length;for(var c=0,d=0,g=0;g>>26)|0,d+=x>>>26,x&=67108863}a.words[g]=M,c=x,x=d}return c!==0?a.words[g]=c:a.length--,a._strip()}function G(A,f,a){return Bt(A,f,a)}o.prototype.mulTo=function(f,a){var c,d=this.length+f.length;return this.length===10&&f.length===10?c=J(this,f,a):d<63?c=U(this,f,a):d<1024?c=Bt(this,f,a):c=G(this,f,a),c},o.prototype.mul=function(f){var a=new o(null);return a.words=new Array(this.length+f.length),this.mulTo(f,a)},o.prototype.mulf=function(f){var a=new o(null);return a.words=new Array(this.length+f.length),G(this,f,a)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var a=f<0;a&&(f=-f),i(typeof f==\"number\"),i(f<67108864);for(var c=0,d=0;d>=26,c+=g/67108864|0,c+=x>>>26,this.words[d]=x&67108863}return c!==0&&(this.words[d]=c,this.length++),a?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var a=F(f);if(a.length===0)return new o(1);for(var c=this,d=0;d=0);var a=f%26,c=(f-a)/26,d=67108863>>>26-a<<26-a,g;if(a!==0){var x=0;for(g=0;g>>26-a}x&&(this.words[g]=x,this.length++)}if(c!==0){for(g=this.length-1;g>=0;g--)this.words[g+c]=this.words[g];for(g=0;g=0);var d;a?d=(a-a%26)/26:d=0;var g=f%26,x=Math.min((f-g)/26,this.length),M=67108863^67108863>>>g<x)for(this.length-=x,s=0;s=0&&(v!==0||s>=d);s--){var k=this.words[s]|0;this.words[s]=v<<26-g|k>>>g,v=k&M}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,a,c){return i(this.negative===0),this.iushrn(f,a,c)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){i(typeof f==\"number\"&&f>=0);var a=f%26,c=(f-a)/26,d=1<=0);var a=f%26,c=(f-a)/26;if(i(this.negative===0,\"imaskn works only with positive numbers\"),this.length<=c)return this;if(a!==0&&c++,this.length=Math.min(c,this.length),a!==0){var d=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},o.prototype.isubn=function(f){if(i(typeof f==\"number\"),i(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(l/67108864|0),this.words[g+c]=x&67108863}for(;g>26,this.words[g+c]=x&67108863;if(M===0)return this._strip();for(i(M===-1),M=0,g=0;g>26,this.words[g]=x&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,a){var c=this.length-f.length,d=this.clone(),g=f,x=g.words[g.length-1]|0,M=this._countBits(x);c=26-M,c!==0&&(g=g.ushln(c),d.iushln(c),x=g.words[g.length-1]|0);var l=d.length-g.length,s;if(a!==\"mod\"){s=new o(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;u--){var E=(d.words[g.length+u]|0)*67108864+(d.words[g.length+u-1]|0);for(E=Math.min(E/x|0,67108863),d._ishlnsubmul(g,E,u);d.negative!==0;)E--,d.negative=0,d._ishlnsubmul(g,1,u),d.isZero()||(d.negative^=1);s&&(s.words[u]=E)}return s&&s._strip(),d._strip(),a!==\"div\"&&c!==0&&d.iushrn(c),{div:s||null,mod:d}},o.prototype.divmod=function(f,a,c){if(i(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var d,g,x;return this.negative!==0&&f.negative===0?(x=this.neg().divmod(f,a),a!==\"mod\"&&(d=x.div.neg()),a!==\"div\"&&(g=x.mod.neg(),c&&g.negative!==0&&g.iadd(f)),{div:d,mod:g}):this.negative===0&&f.negative!==0?(x=this.divmod(f.neg(),a),a!==\"mod\"&&(d=x.div.neg()),{div:d,mod:x.mod}):this.negative&f.negative?(x=this.neg().divmod(f.neg(),a),a!==\"div\"&&(g=x.mod.neg(),c&&g.negative!==0&&g.isub(f)),{div:x.div,mod:g}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?a===\"div\"?{div:this.divn(f.words[0]),mod:null}:a===\"mod\"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,a)},o.prototype.div=function(f){return this.divmod(f,\"div\",!1).div},o.prototype.mod=function(f){return this.divmod(f,\"mod\",!1).mod},o.prototype.umod=function(f){return this.divmod(f,\"mod\",!0).mod},o.prototype.divRound=function(f){var a=this.divmod(f);if(a.mod.isZero())return a.div;var c=a.div.negative!==0?a.mod.isub(f):a.mod,d=f.ushrn(1),g=f.andln(1),x=c.cmp(d);return x<0||g===1&&x===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},o.prototype.modrn=function(f){var a=f<0;a&&(f=-f),i(f<=67108863);for(var c=(1<<26)%f,d=0,g=this.length-1;g>=0;g--)d=(c*d+(this.words[g]|0))%f;return a?-d:d},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var a=f<0;a&&(f=-f),i(f<=67108863);for(var c=0,d=this.length-1;d>=0;d--){var g=(this.words[d]|0)+c*67108864;this.words[d]=g/f|0,c=g%f}return this._strip(),a?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){i(f.negative===0),i(!f.isZero());var a=this,c=f.clone();a.negative!==0?a=a.umod(f):a=a.clone();for(var d=new o(1),g=new o(0),x=new o(0),M=new o(1),l=0;a.isEven()&&c.isEven();)a.iushrn(1),c.iushrn(1),++l;for(var s=c.clone(),v=a.clone();!a.isZero();){for(var k=0,u=1;!(a.words[0]&u)&&k<26;++k,u<<=1);if(k>0)for(a.iushrn(k);k-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(s),g.isub(v)),d.iushrn(1),g.iushrn(1);for(var E=0,_=1;!(c.words[0]&_)&&E<26;++E,_<<=1);if(E>0)for(c.iushrn(E);E-- >0;)(x.isOdd()||M.isOdd())&&(x.iadd(s),M.isub(v)),x.iushrn(1),M.iushrn(1);a.cmp(c)>=0?(a.isub(c),d.isub(x),g.isub(M)):(c.isub(a),x.isub(d),M.isub(g))}return{a:x,b:M,gcd:c.iushln(l)}},o.prototype._invmp=function(f){i(f.negative===0),i(!f.isZero());var a=this,c=f.clone();a.negative!==0?a=a.umod(f):a=a.clone();for(var d=new o(1),g=new o(0),x=c.clone();a.cmpn(1)>0&&c.cmpn(1)>0;){for(var M=0,l=1;!(a.words[0]&l)&&M<26;++M,l<<=1);if(M>0)for(a.iushrn(M);M-- >0;)d.isOdd()&&d.iadd(x),d.iushrn(1);for(var s=0,v=1;!(c.words[0]&v)&&s<26;++s,v<<=1);if(s>0)for(c.iushrn(s);s-- >0;)g.isOdd()&&g.iadd(x),g.iushrn(1);a.cmp(c)>=0?(a.isub(c),d.isub(g)):(c.isub(a),g.isub(d))}var k;return a.cmpn(1)===0?k=d:k=g,k.cmpn(0)<0&&k.iadd(f),k},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var a=this.clone(),c=f.clone();a.negative=0,c.negative=0;for(var d=0;a.isEven()&&c.isEven();d++)a.iushrn(1),c.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;c.isEven();)c.iushrn(1);var g=a.cmp(c);if(g<0){var x=a;a=c,c=x}else if(g===0||c.cmpn(1)===0)break;a.isub(c)}while(!0);return c.iushln(d)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){i(typeof f==\"number\");var a=f%26,c=(f-a)/26,d=1<>>26,M&=67108863,this.words[x]=M}return g!==0&&(this.words[x]=g,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var a=f<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this._strip();var c;if(this.length>1)c=1;else{a&&(f=-f),i(f<=67108863,\"Number is too big\");var d=this.words[0]|0;c=d===f?0:df.length)return 1;if(this.length=0;c--){var d=this.words[c]|0,g=f.words[c]|0;if(d!==g){dg&&(a=1);break}}return a},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new Y(f)},o.prototype.toRed=function(f){return i(!this.red,\"Already a number in reduction context\"),i(this.negative===0,\"red works only with positives\"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return i(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return i(!this.red,\"Already a number in reduction context\"),this._forceRed(f)},o.prototype.redAdd=function(f){return i(this.red,\"redAdd works only with red numbers\"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return i(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return i(this.red,\"redSub works only with red numbers\"),this.red.sub(this,f)},o.prototype.redISub=function(f){return i(this.red,\"redISub works only with red numbers\"),this.red.isub(this,f)},o.prototype.redShl=function(f){return i(this.red,\"redShl works only with red numbers\"),this.red.shl(this,f)},o.prototype.redMul=function(f){return i(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return i(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return i(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return i(this.red&&!f.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,f)};var H={k256:null,p224:null,p192:null,p25519:null};function z(A,f){this.name=A,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},z.prototype.ireduce=function(f){var a=f,c;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),c=a.bitLength();while(c>this.n);var d=c0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},z.prototype.split=function(f,a){f.iushrn(this.n,0,a)},z.prototype.imulK=function(f){return f.imul(this.k)};function Pt(){z.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}n(Pt,z),Pt.prototype.split=function(f,a){for(var c=4194303,d=Math.min(f.length,9),g=0;g>>22,x=M}x>>>=22,f.words[g-10]=x,x===0&&f.length>10?f.length-=10:f.length-=9},Pt.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var a=0,c=0;c>>=26,f.words[c]=g,a=d}return a!==0&&(f.words[f.length++]=a),f},o._prime=function(f){if(H[f])return H[f];var a;if(f===\"k256\")a=new Pt;else if(f===\"p224\")a=new W;else if(f===\"p192\")a=new Rt;else if(f===\"p25519\")a=new Yt;else throw new Error(\"Unknown prime \"+f);return H[f]=a,a};function Y(A){if(typeof A==\"string\"){var f=o._prime(A);this.m=f.p,this.prime=f}else i(A.gtn(1),\"modulus must be greater than 1\"),this.m=A,this.prime=null}Y.prototype._verify1=function(f){i(f.negative===0,\"red works only with positives\"),i(f.red,\"red works only with red numbers\")},Y.prototype._verify2=function(f,a){i((f.negative|a.negative)===0,\"red works only with positives\"),i(f.red&&f.red===a.red,\"red works only with red numbers\")},Y.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(w(f,f.umod(this.m)._forceRed(this)),f)},Y.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},Y.prototype.add=function(f,a){this._verify2(f,a);var c=f.add(a);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},Y.prototype.iadd=function(f,a){this._verify2(f,a);var c=f.iadd(a);return c.cmp(this.m)>=0&&c.isub(this.m),c},Y.prototype.sub=function(f,a){this._verify2(f,a);var c=f.sub(a);return c.cmpn(0)<0&&c.iadd(this.m),c._forceRed(this)},Y.prototype.isub=function(f,a){this._verify2(f,a);var c=f.isub(a);return c.cmpn(0)<0&&c.iadd(this.m),c},Y.prototype.shl=function(f,a){return this._verify1(f),this.imod(f.ushln(a))},Y.prototype.imul=function(f,a){return this._verify2(f,a),this.imod(f.imul(a))},Y.prototype.mul=function(f,a){return this._verify2(f,a),this.imod(f.mul(a))},Y.prototype.isqr=function(f){return this.imul(f,f.clone())},Y.prototype.sqr=function(f){return this.mul(f,f)},Y.prototype.sqrt=function(f){if(f.isZero())return f.clone();var a=this.m.andln(3);if(i(a%2===1),a===3){var c=this.m.add(new o(1)).iushrn(2);return this.pow(f,c)}for(var d=this.m.subn(1),g=0;!d.isZero()&&d.andln(1)===0;)g++,d.iushrn(1);i(!d.isZero());var x=new o(1).toRed(this),M=x.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new o(2*s*s).toRed(this);this.pow(s,l).cmp(M)!==0;)s.redIAdd(M);for(var v=this.pow(s,d),k=this.pow(f,d.addn(1).iushrn(1)),u=this.pow(f,d),E=g;u.cmp(x)!==0;){for(var _=u,B=0;_.cmp(x)!==0;B++)_=_.redSqr();i(B=0;g--){for(var v=a.words[g],k=s-1;k>=0;k--){var u=v>>k&1;if(x!==d[0]&&(x=this.sqr(x)),u===0&&M===0){l=0;continue}M<<=1,M|=u,l++,!(l!==c&&(g!==0||k!==0))&&(x=this.mul(x,d[M]),l=0,M=0)}s=26}return x},Y.prototype.convertTo=function(f){var a=f.umod(this.m);return a===f?a.clone():a},Y.prototype.convertFrom=function(f){var a=f.clone();return a.red=null,a},o.mont=function(f){return new Vt(f)};function Vt(A){Y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Vt,Y),Vt.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},Vt.prototype.convertFrom=function(f){var a=this.imod(f.mul(this.rinv));return a.red=null,a},Vt.prototype.imul=function(f,a){if(f.isZero()||a.isZero())return f.words[0]=0,f.length=1,f;var c=f.imul(a),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=c.isub(d).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},Vt.prototype.mul=function(f,a){if(f.isZero()||a.isZero())return new o(0)._forceRed(this);var c=f.mul(a),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=c.isub(d).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},Vt.prototype.invm=function(f){var a=this.imod(f._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(e,On)})(Ln);var K=Ln.exports;const jn=\"bignumber/5.7.0\";var Rr=K.BN;const Ae=new L(jn),wi={},Qn=9007199254740991;function C0(e){return e!=null&&(V.isBigNumber(e)||typeof e==\"number\"&&e%1===0||typeof e==\"string\"&&!!e.match(/^-?[0-9]+$/)||Qt(e)||typeof e==\"bigint\"||ir(e))}let Jn=!1;class V{constructor(t,r){t!==wi&&Ae.throwError(\"cannot call constructor directly; use BigNumber.from\",L.errors.UNSUPPORTED_OPERATION,{operation:\"new (BigNumber)\"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return Lt(j(this).fromTwos(t))}toTwos(t){return Lt(j(this).toTwos(t))}abs(){return this._hex[0]===\"-\"?V.from(this._hex.substring(1)):this}add(t){return Lt(j(this).add(j(t)))}sub(t){return Lt(j(this).sub(j(t)))}div(t){return V.from(t).isZero()&&Wt(\"division-by-zero\",\"div\"),Lt(j(this).div(j(t)))}mul(t){return Lt(j(this).mul(j(t)))}mod(t){const r=j(t);return r.isNeg()&&Wt(\"division-by-zero\",\"mod\"),Lt(j(this).umod(r))}pow(t){const r=j(t);return r.isNeg()&&Wt(\"negative-power\",\"pow\"),Lt(j(this).pow(r))}and(t){const r=j(t);return(this.isNegative()||r.isNeg())&&Wt(\"unbound-bitwise-result\",\"and\"),Lt(j(this).and(r))}or(t){const r=j(t);return(this.isNegative()||r.isNeg())&&Wt(\"unbound-bitwise-result\",\"or\"),Lt(j(this).or(r))}xor(t){const r=j(t);return(this.isNegative()||r.isNeg())&&Wt(\"unbound-bitwise-result\",\"xor\"),Lt(j(this).xor(r))}mask(t){return(this.isNegative()||t<0)&&Wt(\"negative-width\",\"mask\"),Lt(j(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&Wt(\"negative-width\",\"shl\"),Lt(j(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&Wt(\"negative-width\",\"shr\"),Lt(j(this).shrn(t))}eq(t){return j(this).eq(j(t))}lt(t){return j(this).lt(j(t))}lte(t){return j(this).lte(j(t))}gt(t){return j(this).gt(j(t))}gte(t){return j(this).gte(j(t))}isNegative(){return this._hex[0]===\"-\"}isZero(){return j(this).isZero()}toNumber(){try{return j(this).toNumber()}catch{Wt(\"overflow\",\"toNumber\",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Ae.throwError(\"this platform does not support BigInt\",L.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Jn||(Jn=!0,Ae.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\")):arguments[0]===16?Ae.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\",L.errors.UNEXPECTED_ARGUMENT,{}):Ae.throwError(\"BigNumber.toString does not accept parameters\",L.errors.UNEXPECTED_ARGUMENT,{})),j(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:\"BigNumber\",hex:this.toHexString()}}static from(t){if(t instanceof V)return t;if(typeof t==\"string\")return t.match(/^-?0x[0-9a-f]+$/i)?new V(wi,vr(t)):t.match(/^-?[0-9]+$/)?new V(wi,vr(new Rr(t))):Ae.throwArgumentError(\"invalid BigNumber string\",\"value\",t);if(typeof t==\"number\")return t%1&&Wt(\"underflow\",\"BigNumber.from\",t),(t>=Qn||t<=-Qn)&&Wt(\"overflow\",\"BigNumber.from\",t),V.from(String(t));const r=t;if(typeof r==\"bigint\")return V.from(r.toString());if(ir(r))return V.from(Kt(r));if(r)if(r.toHexString){const i=r.toHexString();if(typeof i==\"string\")return V.from(i)}else{let i=r._hex;if(i==null&&r.type===\"BigNumber\"&&(i=r.hex),typeof i==\"string\"&&(Qt(i)||i[0]===\"-\"&&Qt(i.substring(1))))return V.from(i)}return Ae.throwArgumentError(\"invalid BigNumber value\",\"value\",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function vr(e){if(typeof e!=\"string\")return vr(e.toString(16));if(e[0]===\"-\")return e=e.substring(1),e[0]===\"-\"&&Ae.throwArgumentError(\"invalid hex\",\"value\",e),e=vr(e),e===\"0x00\"?e:\"-\"+e;if(e.substring(0,2)!==\"0x\"&&(e=\"0x\"+e),e===\"0x\")return\"0x00\";for(e.length%2&&(e=\"0x0\"+e.substring(2));e.length>4&&e.substring(0,4)===\"0x00\";)e=\"0x\"+e.substring(4);return e}function Lt(e){return V.from(vr(e))}function j(e){const t=V.from(e).toHexString();return t[0]===\"-\"?new Rr(\"-\"+t.substring(3),16):new Rr(t.substring(2),16)}function Wt(e,t,r){const i={fault:e,operation:t};return r!=null&&(i.value=r),Ae.throwError(e,L.errors.NUMERIC_FAULT,i)}function R0(e){return new Rr(e,36).toString(16)}const Ht=new L(jn),mr={},Gn=V.from(0),Yn=V.from(-1);function Vn(e,t,r,i){const n={fault:t,operation:r};return i!==void 0&&(n.value=i),Ht.throwError(e,L.errors.NUMERIC_FAULT,n)}let gr=\"0\";for(;gr.length<256;)gr+=gr;function xi(e){if(typeof e!=\"number\")try{e=V.from(e).toNumber()}catch{}return typeof e==\"number\"&&e>=0&&e<=256&&!(e%1)?\"1\"+gr.substring(0,e):Ht.throwArgumentError(\"invalid decimal size\",\"decimals\",e)}function Mi(e,t){t==null&&(t=0);const r=xi(t);e=V.from(e);const i=e.lt(Gn);i&&(e=e.mul(Yn));let n=e.mod(r).toString();for(;n.length2&&Ht.throwArgumentError(\"too many decimal points\",\"value\",e);let o=n[0],h=n[1];for(o||(o=\"0\"),h||(h=\"0\");h[h.length-1]===\"0\";)h=h.substring(0,h.length-1);for(h.length>r.length-1&&Vn(\"fractional component exceeds decimals\",\"underflow\",\"parseFixed\"),h===\"\"&&(h=\"0\");h.lengtht[h]==null?b:(typeof t[h]!==p&&Ht.throwArgumentError(\"invalid fixed format (\"+h+\" not \"+p+\")\",\"format.\"+h,t[h]),t[h]);r=o(\"signed\",\"boolean\",r),i=o(\"width\",\"number\",i),n=o(\"decimals\",\"number\",n)}return i%8&&Ht.throwArgumentError(\"invalid fixed format width (not byte aligned)\",\"format.width\",i),n>80&&Ht.throwArgumentError(\"invalid fixed format (decimals too large)\",\"format.decimals\",n),new dr(mr,r,i,n)}}class Ut{constructor(t,r,i,n){t!==mr&&Ht.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\",L.errors.UNSUPPORTED_OPERATION,{operation:\"new FixedFormat\"}),this.format=n,this._hex=r,this._value=i,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&Ht.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\",\"other\",t)}addUnsafe(t){this._checkFormat(t);const r=be(this._value,this.format.decimals),i=be(t._value,t.format.decimals);return Ut.fromValue(r.add(i),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);const r=be(this._value,this.format.decimals),i=be(t._value,t.format.decimals);return Ut.fromValue(r.sub(i),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);const r=be(this._value,this.format.decimals),i=be(t._value,t.format.decimals);return Ut.fromValue(r.mul(i).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);const r=be(this._value,this.format.decimals),i=be(t._value,t.format.decimals);return Ut.fromValue(r.mul(this.format._multiplier).div(i),this.format.decimals,this.format)}floor(){const t=this.toString().split(\".\");t.length===1&&t.push(\"0\");let r=Ut.from(t[0],this.format);const i=!t[1].match(/^(0*)$/);return this.isNegative()&&i&&(r=r.subUnsafe(Wn.toFormat(r.format))),r}ceiling(){const t=this.toString().split(\".\");t.length===1&&t.push(\"0\");let r=Ut.from(t[0],this.format);const i=!t[1].match(/^(0*)$/);return!this.isNegative()&&i&&(r=r.addUnsafe(Wn.toFormat(r.format))),r}round(t){t==null&&(t=0);const r=this.toString().split(\".\");if(r.length===1&&r.push(\"0\"),(t<0||t>80||t%1)&&Ht.throwArgumentError(\"invalid decimal count\",\"decimals\",t),r[1].length<=t)return this;const i=Ut.from(\"1\"+gr.substring(0,t),this.format),n=O0.toFormat(this.format);return this.mulUnsafe(i).addUnsafe(n).floor().divUnsafe(i)}isZero(){return this._value===\"0.0\"||this._value===\"0\"}isNegative(){return this._value[0]===\"-\"}toString(){return this._value}toHexString(t){if(t==null)return this._hex;t%8&&Ht.throwArgumentError(\"invalid byte width\",\"width\",t);const r=V.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return oe(r,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return Ut.fromString(this._value,t)}static fromValue(t,r,i){return i==null&&r!=null&&!C0(r)&&(i=r,r=null),r==null&&(r=0),i==null&&(i=\"fixed\"),Ut.fromString(Mi(t,r),dr.from(i))}static fromString(t,r){r==null&&(r=\"fixed\");const i=dr.from(r),n=be(t,i.decimals);!i.signed&&n.lt(Gn)&&Vn(\"unsigned value cannot be negative\",\"overflow\",\"value\",t);let o=null;i.signed?o=n.toTwos(i.width).toHexString():(o=n.toHexString(),o=oe(o,i.width/8));const h=Mi(n,i.decimals);return new Ut(mr,o,h,i)}static fromBytes(t,r){r==null&&(r=\"fixed\");const i=dr.from(r);if(Ot(t).length>i.width/8)throw new Error(\"overflow\");let n=V.from(t);i.signed&&(n=n.fromTwos(i.width));const o=n.toTwos((i.signed?0:1)+i.width).toHexString(),h=Mi(n,i.decimals);return new Ut(mr,o,h,i)}static from(t,r){if(typeof t==\"string\")return Ut.fromString(t,r);if(ir(t))return Ut.fromBytes(t,r);try{return Ut.fromValue(t,0,r)}catch(i){if(i.code!==L.errors.INVALID_ARGUMENT)throw i}return Ht.throwArgumentError(\"invalid FixedNumber value\",\"value\",t)}static isFixedNumber(t){return!!(t&&t._isFixedNumber)}}const Wn=Ut.from(1),O0=Ut.from(\"0.5\"),P0=\"strings/5.7.0\",Xn=new L(P0);var Or;(function(e){e.current=\"\",e.NFC=\"NFC\",e.NFD=\"NFD\",e.NFKC=\"NFKC\",e.NFKD=\"NFKD\"})(Or||(Or={}));var nr;(function(e){e.UNEXPECTED_CONTINUE=\"unexpected continuation byte\",e.BAD_PREFIX=\"bad codepoint prefix\",e.OVERRUN=\"string overrun\",e.MISSING_CONTINUE=\"missing continuation byte\",e.OUT_OF_RANGE=\"out of UTF-8 range\",e.UTF16_SURROGATE=\"UTF-16 surrogate\",e.OVERLONG=\"overlong representation\"})(nr||(nr={}));function D0(e,t,r,i,n){return Xn.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,\"bytes\",r)}function Zn(e,t,r,i,n){if(e===nr.BAD_PREFIX||e===nr.UNEXPECTED_CONTINUE){let o=0;for(let h=t+1;h>6===2;h++)o++;return o}return e===nr.OVERRUN?r.length-t-1:0}function F0(e,t,r,i,n){return e===nr.OVERLONG?(i.push(n),0):(i.push(65533),Zn(e,t,r))}Object.freeze({error:D0,ignore:Zn,replace:F0});function Ei(e,t=Or.current){t!=Or.current&&(Xn.checkNormalize(),e=e.normalize(t));let r=[];for(let i=0;i>6|192),r.push(n&63|128);else if((n&64512)==55296){i++;const o=e.charCodeAt(i);if(i>=e.length||(o&64512)!==56320)throw new Error(\"invalid utf-8 string\");const h=65536+((n&1023)<<10)+(o&1023);r.push(h>>18|240),r.push(h>>12&63|128),r.push(h>>6&63|128),r.push(h&63|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(n&63|128)}return Ot(r)}function T0(e){if(e.length%4!==0)throw new Error(\"bad data\");let t=[];for(let r=0;r{let o=n.split(\":\");r+=parseInt(o[0],16),i[r]=t(o[1])}),i}function $n(e){let t=0;return e.split(\",\").map(r=>{let i=r.split(\"-\");i.length===1?i[1]=\"0\":i[1]===\"\"&&(i[1]=\"1\");let n=t+parseInt(i[0],16);return t=parseInt(i[1],16),{l:n,h:t}})}$n(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\"),\"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map(e=>parseInt(e,16)),Si(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\"),Si(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\"),Si(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\",T0),$n(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");const tf=\"hash/5.7.0\";function U0(e){e=atob(e);const t=[];for(let r=0;r0&&Array.isArray(p)?n(p,h-1):r.push(p)})};return n(e,t),r}function k0(e){const t={};for(let r=0;r>--b&1}const y=31,S=Math.pow(2,y),I=S>>>1,N=I>>1,C=S-1;let F=0;for(let H=0;H1;){let Yt=z+Pt>>>1;H>>1|w(),W=W<<1^I,Rt=(Rt^I)<<1|I|1;J=W,Bt=1+Rt-W}let G=i-4;return U.map(H=>{switch(H-G){case 3:return G+65792+(e[p++]<<16|e[p++]<<8|e[p++]);case 2:return G+256+(e[p++]<<8|e[p++]);case 1:return G+e[p++];default:return H-1}})}function K0(e){let t=0;return()=>e[t++]}function H0(e){return K0(q0(e))}function z0(e){return e&1?~e>>1:e>>1}function L0(e,t){let r=Array(e);for(let i=0;it[h]):r}function Q0(e){let t=[];for(;;){let r=e();if(r==0)break;t.push(G0(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Y0(r,e))}return k0(ef(t))}function J0(e){let t=[];for(;;){let r=e();if(r==0)break;t.push(r)}return t}function nf(e,t,r){let i=Array(e).fill(void 0).map(()=>[]);for(let n=0;ni[h].push(o));return i}function G0(e,t){let r=1+t(),i=t(),n=J0(t),o=nf(n.length,1+e,t);return ef(o.map((h,p)=>{const b=h[0],m=h.slice(1);return Array(n[p]).fill(void 0).map((w,y)=>{let S=y*i;return[b+y*r,m.map(I=>I+S)]})}))}function Y0(e,t){let r=1+t();return nf(r,1+e,t).map(n=>[n[0],n.slice(1)])}function V0(e){let t=Pr(e).sort((i,n)=>i-n);return r();function r(){let i=[];for(;;){let m=Pr(e,t);if(m.length==0)break;i.push({set:new Set(m),node:r()})}i.sort((m,w)=>w.set.size-m.set.size);let n=e(),o=n%3;n=n/3|0;let h=!!(n&1);n>>=1;let p=n==1,b=n==2;return{branches:i,valid:o,fe0f:h,save:p,check:b}}}function W0(){return H0(U0(\"AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsA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ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==\"))}const Dr=W0();new Set(Pr(Dr)),new Set(Pr(Dr)),Q0(Dr),V0(Dr),new L(tf);const X0=new Uint8Array(32);X0.fill(0);const Z0=`\u0019Ethereum Signed Message:\n`;function ff(e){return typeof e==\"string\"&&(e=Ei(e)),yi(E0([Ei(Z0),Ei(String(e.length)),e]))}const $0=\"rlp/5.7.0\";new L($0);const ts=\"address/5.7.0\",Ar=new L(ts);function of(e){Qt(e,20)||Ar.throwArgumentError(\"invalid address\",\"address\",e),e=e.toLowerCase();const t=e.substring(2).split(\"\"),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const i=Ot(yi(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(i[n>>1]&15)>=8&&(t[n+1]=t[n+1].toUpperCase());return\"0x\"+t.join(\"\")}const es=9007199254740991;function rs(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}const Ni={};for(let e=0;e<10;e++)Ni[String(e)]=String(e);for(let e=0;e<26;e++)Ni[String.fromCharCode(65+e)]=String(10+e);const sf=Math.floor(rs(es));function is(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+\"00\";let t=e.split(\"\").map(i=>Ni[i]).join(\"\");for(;t.length>=sf;){let i=t.substring(0,sf);t=parseInt(i,10)%97+t.substring(i.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r=\"0\"+r;return r}function ns(e){let t=null;if(typeof e!=\"string\"&&Ar.throwArgumentError(\"invalid address\",\"address\",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))e.substring(0,2)!==\"0x\"&&(e=\"0x\"+e),t=of(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Ar.throwArgumentError(\"bad address checksum\",\"address\",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==is(e)&&Ar.throwArgumentError(\"bad icap checksum\",\"address\",e),t=R0(e.substring(4));t.length<40;)t=\"0\"+t;t=of(\"0x\"+t)}else Ar.throwArgumentError(\"invalid address\",\"address\",e);return t}const fs=\"properties/5.7.0\";new L(fs);function br(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}new L(tf);const os=new Uint8Array(32);os.fill(0),V.from(-1);const ss=V.from(0),as=V.from(1);V.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),oe(as.toHexString(),32),oe(ss.toHexString(),32);var se={},Q={},yr=af;function af(e,t){if(!e)throw new Error(t||\"Assertion failed\")}af.equal=function(t,r,i){if(t!=r)throw new Error(i||\"Assertion failed: \"+t+\" != \"+r)};var Ii={exports:{}};typeof Object.create==\"function\"?Ii.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ii.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}};var us=yr,hs=Ii.exports;Q.inherits=hs;function cs(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function ls(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==\"string\")if(t){if(t===\"hex\")for(e=e.replace(/[^a-z0-9]+/ig,\"\"),e.length%2!==0&&(e=\"0\"+e),n=0;n>6|192,r[i++]=o&63|128):cs(e,n)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else for(n=0;n>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Q.htonl=uf;function ps(e,t){for(var r=\"\",i=0;i>>0}return o}Q.join32=vs;function ms(e,t){for(var r=new Array(e.length*4),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o&255):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=o&255)}return r}Q.split32=ms;function gs(e,t){return e>>>t|e<<32-t}Q.rotr32=gs;function As(e,t){return e<>>32-t}Q.rotl32=As;function bs(e,t){return e+t>>>0}Q.sum32=bs;function ys(e,t,r){return e+t+r>>>0}Q.sum32_3=ys;function ws(e,t,r,i){return e+t+r+i>>>0}Q.sum32_4=ws;function xs(e,t,r,i,n){return e+t+r+i+n>>>0}Q.sum32_5=xs;function Ms(e,t,r,i){var n=e[t],o=e[t+1],h=i+o>>>0,p=(h>>0,e[t+1]=h}Q.sum64=Ms;function Es(e,t,r,i){var n=t+i>>>0,o=(n>>0}Q.sum64_hi=Es;function Ss(e,t,r,i){var n=t+i;return n>>>0}Q.sum64_lo=Ss;function Ns(e,t,r,i,n,o,h,p){var b=0,m=t;m=m+i>>>0,b+=m>>0,b+=m>>0,b+=m>>0}Q.sum64_4_hi=Ns;function Is(e,t,r,i,n,o,h,p){var b=t+i+o+p;return b>>>0}Q.sum64_4_lo=Is;function _s(e,t,r,i,n,o,h,p,b,m){var w=0,y=t;y=y+i>>>0,w+=y>>0,w+=y>>0,w+=y>>0,w+=y>>0}Q.sum64_5_hi=_s;function Bs(e,t,r,i,n,o,h,p,b,m){var w=t+i+o+p+m;return w>>>0}Q.sum64_5_lo=Bs;function Cs(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Q.rotr64_hi=Cs;function Rs(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Q.rotr64_lo=Rs;function Os(e,t,r){return e>>>r}Q.shr64_hi=Os;function Ps(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Q.shr64_lo=Ps;var fr={},lf=Q,Ds=yr;function Fr(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=\"big\",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}fr.BlockHash=Fr,Fr.prototype.update=function(t,r){if(t=lf.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=lf.join32(t,0,t.length-i,this.endian);for(var n=0;n>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=t&255}else for(n[o++]=t&255,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,h=8;h>>3}ae.g0_256=qs;function Ks(e){return ue(e,17)^ue(e,19)^e>>>10}ae.g1_256=Ks;var sr=Q,Hs=fr,zs=ae,_i=sr.rotl32,wr=sr.sum32,Ls=sr.sum32_5,js=zs.ft_1,mf=Hs.BlockHash,Qs=[1518500249,1859775393,2400959708,3395469782];function he(){if(!(this instanceof he))return new he;mf.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}sr.inherits(he,mf);var Js=he;he.blockSize=512,he.outSize=160,he.hmacStrength=80,he.padLength=64,he.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;nthis.blockSize&&(t=new this.Hash().update(t).digest()),Pa(t.length<=this.blockSize);for(var r=t.length;r>8,S=w&255;y?b.push(y,S):b.push(S)}return b}r.toArray=i;function n(h){return h.length===1?\"0\"+h:h}r.zero2=n;function o(h){for(var p=\"\",b=0;b(S>>1)-1?C=(S>>1)-F:C=F,I.isubn(C)):C=0,y[N]=C,I.iushrn(1)}return y}r.getNAF=i;function n(b,m){var w=[[],[]];b=b.clone(),m=m.clone();for(var y=0,S=0,I;b.cmpn(-y)>0||m.cmpn(-S)>0;){var N=b.andln(3)+y&3,C=m.andln(3)+S&3;N===3&&(N=-1),C===3&&(C=-1);var F;N&1?(I=b.andln(7)+y&7,(I===3||I===5)&&C===2?F=-N:F=N):F=0,w[0].push(F);var U;C&1?(I=m.andln(7)+S&7,(I===3||I===5)&&N===2?U=-C:U=C):U=0,w[1].push(U),2*y===F+1&&(y=1-y),2*S===U+1&&(S=1-S),b.iushrn(1),m.iushrn(1)}return w}r.getJSF=n;function o(b,m,w){var y=\"_\"+m;b.prototype[m]=function(){return this[y]!==void 0?this[y]:this[y]=w.call(this)}}r.cachedProperty=o;function h(b){return typeof b==\"string\"?r.toArray(b,\"hex\"):b}r.parseBytes=h;function p(b){return new K(b,\"hex\",\"le\")}r.intFromLE=p}),Ur=Jt.getNAF,Ta=Jt.getJSF,kr=Jt.assert;function Ce(e,t){this.type=e,this.p=new K(t.p,16),this.red=t.prime?K.red(t.prime):K.mont(this.p),this.zero=new K(0).toRed(this.red),this.one=new K(1).toRed(this.red),this.two=new K(2).toRed(this.red),this.n=t.n&&new K(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ze=Ce;Ce.prototype.point=function(){throw new Error(\"Not implemented\")},Ce.prototype.validate=function(){throw new Error(\"Not implemented\")},Ce.prototype._fixedNafMul=function(t,r){kr(t.precomputed);var i=t._getDoubles(),n=Ur(r,1,this._bitLength),o=(1<=p;m--)b=(b<<1)+n[m];h.push(b)}for(var w=this.jpoint(null,null,null),y=this.jpoint(null,null,null),S=o;S>0;S--){for(p=0;p=0;b--){for(var m=0;b>=0&&h[b]===0;b--)m++;if(b>=0&&m++,p=p.dblp(m),b<0)break;var w=h[b];kr(w!==0),t.type===\"affine\"?w>0?p=p.mixedAdd(o[w-1>>1]):p=p.mixedAdd(o[-w-1>>1].neg()):w>0?p=p.add(o[w-1>>1]):p=p.add(o[-w-1>>1].neg())}return t.type===\"affine\"?p.toP():p},Ce.prototype._wnafMulAdd=function(t,r,i,n,o){var h=this._wnafT1,p=this._wnafT2,b=this._wnafT3,m=0,w,y,S;for(w=0;w=1;w-=2){var N=w-1,C=w;if(h[N]!==1||h[C]!==1){b[N]=Ur(i[N],h[N],this._bitLength),b[C]=Ur(i[C],h[C],this._bitLength),m=Math.max(b[N].length,m),m=Math.max(b[C].length,m);continue}var F=[r[N],null,null,r[C]];r[N].y.cmp(r[C].y)===0?(F[1]=r[N].add(r[C]),F[2]=r[N].toJ().mixedAdd(r[C].neg())):r[N].y.cmp(r[C].y.redNeg())===0?(F[1]=r[N].toJ().mixedAdd(r[C]),F[2]=r[N].add(r[C].neg())):(F[1]=r[N].toJ().mixedAdd(r[C]),F[2]=r[N].toJ().mixedAdd(r[C].neg()));var U=[-3,-1,-5,-7,0,7,5,1,3],J=Ta(i[N],i[C]);for(m=Math.max(J[0].length,m),b[N]=new Array(m),b[C]=new Array(m),y=0;y=0;w--){for(var Pt=0;w>=0;){var W=!0;for(y=0;y=0&&Pt++,H=H.dblp(Pt),w<0)break;for(y=0;y0?S=p[y][Rt-1>>1]:Rt<0&&(S=p[y][-Rt-1>>1].neg()),S.type===\"affine\"?H=H.mixedAdd(S):H=H.add(S))}}for(w=0;w=Math.ceil((t.bitLength()+1)/r.step):!1},Xt.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,o=0;o=0&&(I=m,N=w),y.negative&&(y=y.neg(),S=S.neg()),I.negative&&(I=I.neg(),N=N.neg()),[{a:y,b:S},{a:I,b:N}]},Zt.prototype._endoSplit=function(t){var r=this.endo.basis,i=r[0],n=r[1],o=n.b.mul(t).divRound(this.n),h=i.b.neg().mul(t).divRound(this.n),p=o.mul(i.a),b=h.mul(n.a),m=o.mul(i.b),w=h.mul(n.b),y=t.sub(p).sub(b),S=m.add(w).neg();return{k1:y,k2:S}},Zt.prototype.pointFromX=function(t,r){t=new K(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error(\"invalid point\");var o=n.fromRed().isOdd();return(r&&!o||!r&&o)&&(n=n.redNeg()),this.point(t,n)},Zt.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,i=t.y,n=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(o).cmpn(0)===0},Zt.prototype._endoWnafMulAdd=function(t,r,i){for(var n=this._endoWnafT1,o=this._endoWnafT2,h=0;h\":\"\"},Ft.prototype.isInfinity=function(){return this.inf},Ft.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(t.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)},Ft.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=t.redInvm(),o=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),h=o.redSqr().redISub(this.x.redAdd(this.x)),p=o.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,p)},Ft.prototype.getX=function(){return this.x.fromRed()},Ft.prototype.getY=function(){return this.y.fromRed()},Ft.prototype.mul=function(t){return t=new K(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Ft.prototype.mulAdd=function(t,r,i){var n=[this,r],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},Ft.prototype.jmulAdd=function(t,r,i){var n=[this,r],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},Ft.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)},Ft.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,n=function(o){return o.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r},Ft.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Tt(e,t,r,i){Ze.BasePoint.call(this,e,\"jacobian\"),t===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new K(0)):(this.x=new K(t,16),this.y=new K(r,16),this.z=new K(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Di(Tt,Ze.BasePoint),Zt.prototype.jpoint=function(t,r,i){return new Tt(this,t,r,i)},Tt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(t);return this.curve.point(i,n)},Tt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Tt.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),o=t.x.redMul(i),h=this.y.redMul(r.redMul(t.z)),p=t.y.redMul(i.redMul(this.z)),b=n.redSub(o),m=h.redSub(p);if(b.cmpn(0)===0)return m.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=b.redSqr(),y=w.redMul(b),S=n.redMul(w),I=m.redSqr().redIAdd(y).redISub(S).redISub(S),N=m.redMul(S.redISub(I)).redISub(h.redMul(y)),C=this.z.redMul(t.z).redMul(b);return this.curve.jpoint(I,N,C)},Tt.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=t.x.redMul(r),o=this.y,h=t.y.redMul(r).redMul(this.z),p=i.redSub(n),b=o.redSub(h);if(p.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var m=p.redSqr(),w=m.redMul(p),y=i.redMul(m),S=b.redSqr().redIAdd(w).redISub(y).redISub(y),I=b.redMul(y.redISub(S)).redISub(o.redMul(w)),N=this.z.redMul(p);return this.curve.jpoint(S,I,N)},Tt.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r=0)return!1;if(i.redIAdd(o),this.x.cmp(i)===0)return!0}},Tt.prototype.inspect=function(){return this.isInfinity()?\"\":\"\"},Tt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var qr=cr(function(e,t){var r=t;r.base=Ze,r.short=ka,r.mont=null,r.edwards=null}),Kr=cr(function(e,t){var r=t,i=Jt.assert;function n(p){p.type===\"short\"?this.curve=new qr.short(p):p.type===\"edwards\"?this.curve=new qr.edwards(p):this.curve=new qr.mont(p),this.g=this.curve.g,this.n=this.curve.n,this.hash=p.hash,i(this.g.validate(),\"Invalid curve\"),i(this.g.mul(this.n).isInfinity(),\"Invalid curve, G*N != O\")}r.PresetCurve=n;function o(p,b){Object.defineProperty(r,p,{configurable:!0,enumerable:!0,get:function(){var m=new n(b);return Object.defineProperty(r,p,{configurable:!0,enumerable:!0,value:m}),m}})}o(\"p192\",{type:\"short\",prime:\"p192\",p:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",b:\"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",n:\"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",hash:se.sha256,gRed:!1,g:[\"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"]}),o(\"p224\",{type:\"short\",prime:\"p224\",p:\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",b:\"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",n:\"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",hash:se.sha256,gRed:!1,g:[\"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"]}),o(\"p256\",{type:\"short\",prime:null,p:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",a:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",b:\"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",n:\"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",hash:se.sha256,gRed:!1,g:[\"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"]}),o(\"p384\",{type:\"short\",prime:null,p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",a:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",b:\"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",n:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",hash:se.sha384,gRed:!1,g:[\"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"]}),o(\"p521\",{type:\"short\",prime:null,p:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",a:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",b:\"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",n:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",hash:se.sha512,gRed:!1,g:[\"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"]}),o(\"curve25519\",{type:\"mont\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"76d06\",b:\"1\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:se.sha256,gRed:!1,g:[\"9\"]}),o(\"ed25519\",{type:\"edwards\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"-1\",c:\"1\",d:\"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:se.sha256,gRed:!1,g:[\"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\"6666666666666666666666666666666666666666666666666666666666666658\"]});var h;try{h=null.crash()}catch{h=void 0}o(\"secp256k1\",{type:\"short\",prime:\"k256\",p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",a:\"0\",b:\"7\",n:\"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",h:\"1\",hash:se.sha256,beta:\"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",lambda:\"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",basis:[{a:\"3086d221a7d46bcde86c90e49284eb15\",b:\"-e4437ed6010e88286f547fa90abfe4c3\"},{a:\"114ca50f7a8e2f3f657c1108d9d44cfd8\",b:\"3086d221a7d46bcde86c90e49284eb15\"}],gRed:!1,g:[\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",h]})});function Re(e){if(!(this instanceof Re))return new Re(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=fe.toArray(e.entropy,e.entropyEnc||\"hex\"),r=fe.toArray(e.nonce,e.nonceEnc||\"hex\"),i=fe.toArray(e.pers,e.persEnc||\"hex\");Pi(t.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._init(t,r,i)}var Rf=Re;Re.prototype._init=function(t,r,i){var n=t.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._update(t.concat(i||[])),this._reseed=1},Re.prototype.generate=function(t,r,i,n){if(this._reseed>this.reseedInterval)throw new Error(\"Reseed is required\");typeof r!=\"string\"&&(n=i,i=r,r=null),i&&(i=fe.toArray(i,n||\"hex\"),this._update(i));for(var o=[];o.length\"};var qa=Jt.assert;function Hr(e,t){if(e instanceof Hr)return e;this._importDER(e,t)||(qa(e.r&&e.s,\"Signature without r or s\"),this.r=new K(e.r,16),this.s=new K(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var zr=Hr;function Ka(){this.place=0}function Ui(e,t){var r=e[t.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,o=0,h=t.place;o>>=0;return n<=127?!1:(t.place=h,n)}function Of(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}Hr.prototype.toDER=function(t){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=Of(r),i=Of(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];ki(n,r.length),n=n.concat(r),n.push(2),ki(n,i.length);var o=n.concat(i),h=[48];return ki(h,o.length),h=h.concat(o),Jt.encode(h,t)};var Ha=function(){throw new Error(\"unsupported\")},Pf=Jt.assert;function $t(e){if(!(this instanceof $t))return new $t(e);typeof e==\"string\"&&(Pf(Object.prototype.hasOwnProperty.call(Kr,e),\"Unknown curve \"+e),e=Kr[e]),e instanceof Kr.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var za=$t;$t.prototype.keyPair=function(t){return new Ti(this,t)},$t.prototype.keyFromPrivate=function(t,r){return Ti.fromPrivate(this,t,r)},$t.prototype.keyFromPublic=function(t,r){return Ti.fromPublic(this,t,r)},$t.prototype.genKeyPair=function(t){t||(t={});for(var r=new Rf({hash:this.hash,pers:t.pers,persEnc:t.persEnc||\"utf8\",entropy:t.entropy||Ha(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||\"utf8\",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new K(2));;){var o=new K(r.generate(i));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},$t.prototype._truncateToN=function(t,r){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t},$t.prototype.sign=function(t,r,i,n){typeof i==\"object\"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),t=this._truncateToN(new K(t,16));for(var o=this.n.byteLength(),h=r.getPrivate().toArray(\"be\",o),p=t.toArray(\"be\",o),b=new Rf({hash:this.hash,entropy:h,nonce:p,pers:n.pers,persEnc:n.persEnc||\"utf8\"}),m=this.n.sub(new K(1)),w=0;;w++){var y=n.k?n.k(w):new K(b.generate(this.n.byteLength()));if(y=this._truncateToN(y,!0),!(y.cmpn(1)<=0||y.cmp(m)>=0)){var S=this.g.mul(y);if(!S.isInfinity()){var I=S.getX(),N=I.umod(this.n);if(N.cmpn(0)!==0){var C=y.invm(this.n).mul(N.mul(r.getPrivate()).iadd(t));if(C=C.umod(this.n),C.cmpn(0)!==0){var F=(S.getY().isOdd()?1:0)|(I.cmp(N)!==0?2:0);return n.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),F^=1),new zr({r:N,s:C,recoveryParam:F})}}}}}},$t.prototype.verify=function(t,r,i,n){t=this._truncateToN(new K(t,16)),i=this.keyFromPublic(i,n),r=new zr(r,\"hex\");var o=r.r,h=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||h.cmpn(1)<0||h.cmp(this.n)>=0)return!1;var p=h.invm(this.n),b=p.mul(t).umod(this.n),m=p.mul(o).umod(this.n),w;return this.curve._maxwellTrick?(w=this.g.jmulAdd(b,i.getPublic(),m),w.isInfinity()?!1:w.eqXToP(o)):(w=this.g.mulAdd(b,i.getPublic(),m),w.isInfinity()?!1:w.getX().umod(this.n).cmp(o)===0)},$t.prototype.recoverPubKey=function(e,t,r,i){Pf((3&r)===r,\"The recovery param is more than two bits\"),t=new zr(t,i);var n=this.n,o=new K(e),h=t.r,p=t.s,b=r&1,m=r>>1;if(h.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error(\"Unable to find sencond key candinate\");m?h=this.curve.pointFromX(h.add(this.curve.n),b):h=this.curve.pointFromX(h,b);var w=t.r.invm(n),y=n.sub(o).mul(w).umod(n),S=p.mul(w).umod(n);return this.g.mulAdd(y,h,S)},$t.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new zr(t,i),t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch{continue}if(o.eq(r))return n}throw new Error(\"Unable to find valid recovery factor\")};var La=cr(function(e,t){var r=t;r.version=\"6.5.4\",r.utils=Jt,r.rand=function(){throw new Error(\"unsupported\")},r.curve=qr,r.curves=Kr,r.ec=za,r.eddsa=null}),ja=La.ec;const Qa=\"signing-key/5.7.0\",qi=new L(Qa);let Ki=null;function ve(){return Ki||(Ki=new ja(\"secp256k1\")),Ki}class Ja{constructor(t){br(this,\"curve\",\"secp256k1\"),br(this,\"privateKey\",Kt(t)),N0(this.privateKey)!==32&&qi.throwArgumentError(\"invalid private key\",\"privateKey\",\"[[ REDACTED ]]\");const r=ve().keyFromPrivate(Ot(this.privateKey));br(this,\"publicKey\",\"0x\"+r.getPublic(!1,\"hex\")),br(this,\"compressedPublicKey\",\"0x\"+r.getPublic(!0,\"hex\")),br(this,\"_isSigningKey\",!0)}_addPoint(t){const r=ve().keyFromPublic(Ot(this.publicKey)),i=ve().keyFromPublic(Ot(t));return\"0x\"+r.pub.add(i.pub).encodeCompressed(\"hex\")}signDigest(t){const r=ve().keyFromPrivate(Ot(this.privateKey)),i=Ot(t);i.length!==32&&qi.throwArgumentError(\"bad digest length\",\"digest\",t);const n=r.sign(i,{canonical:!0});return zn({recoveryParam:n.recoveryParam,r:oe(\"0x\"+n.r.toString(16),32),s:oe(\"0x\"+n.s.toString(16),32)})}computeSharedSecret(t){const r=ve().keyFromPrivate(Ot(this.privateKey)),i=ve().keyFromPublic(Ot(Df(t)));return oe(\"0x\"+r.derive(i.getPublic()).toString(16),32)}static isSigningKey(t){return!!(t&&t._isSigningKey)}}function Ga(e,t){const r=zn(t),i={r:Ot(r.r),s:Ot(r.s)};return\"0x\"+ve().recoverPubKey(Ot(e),i,r.recoveryParam).encode(\"hex\",!1)}function Df(e,t){const r=Ot(e);if(r.length===32){const i=new Ja(r);return t?\"0x\"+ve().keyFromPrivate(r).getPublic(!0,\"hex\"):i.publicKey}else{if(r.length===33)return t?Kt(r):\"0x\"+ve().keyFromPublic(r).getPublic(!1,\"hex\");if(r.length===65)return t?\"0x\"+ve().keyFromPublic(r).getPublic(!0,\"hex\"):Kt(r)}return qi.throwArgumentError(\"invalid public or private key\",\"key\",\"[REDACTED]\")}const Ya=\"transactions/5.7.0\";new L(Ya);var Ff;(function(e){e[e.legacy=0]=\"legacy\",e[e.eip2930=1]=\"eip2930\",e[e.eip1559=2]=\"eip1559\"})(Ff||(Ff={}));function Va(e){const t=Df(e);return ns(Hn(yi(Hn(t,1)),12))}function Wa(e,t){return Va(Ga(Ot(e),t))}const Xa=\"https://rpc.walletconnect.com/v1\";async function Tf(e,t,r,i,n,o){switch(r.t){case\"eip191\":return Uf(e,t,r.s);case\"eip1271\":return await kf(e,t,r.s,i,n,o);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}function Uf(e,t,r){return Wa(ff(t),r).toLowerCase()===e.toLowerCase()}async function kf(e,t,r,i,n,o){try{const h=\"0x1626ba7e\",p=\"0000000000000000000000000000000000000000000000000000000000000040\",b=\"0000000000000000000000000000000000000000000000000000000000000041\",m=r.substring(2),w=ff(t).substring(2),y=h+w+p+b+m,S=await fetch(`${o||Xa}/?chainId=${i}&projectId=${n}`,{method:\"POST\",body:JSON.stringify({id:Za(),jsonrpc:\"2.0\",method:\"eth_call\",params:[{to:e,data:y},\"latest\"]})}),{result:I}=await S.json();return I?I.slice(0,h.length).toLowerCase()===h.toLowerCase():!1}catch(h){return console.error(\"isValidEip1271Signature: \",h),!1}}function Za(){return Date.now()+Math.floor(Math.random()*1e3)}var $a=Object.defineProperty,tu=Object.defineProperties,eu=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,ru=Object.prototype.hasOwnProperty,iu=Object.prototype.propertyIsEnumerable,Kf=(e,t,r)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hi=(e,t)=>{for(var r in t||(t={}))ru.call(t,r)&&Kf(e,r,t[r]);if(qf)for(var r of qf(t))iu.call(t,r)&&Kf(e,r,t[r]);return e},Hf=(e,t)=>tu(e,eu(t));const nu=\"did:pkh:\",Lr=e=>e?.split(\":\"),zi=e=>{const t=e&&Lr(e);if(t)return e.includes(nu)?t[3]:t[1]},fu=e=>{const t=e&&Lr(e);if(t)return t[2]+\":\"+t[3]},Li=e=>{const t=e&&Lr(e);if(t)return t.pop()};async function ou(e){const{cacao:t,projectId:r}=e,{s:i,p:n}=t,o=zf(n,n.iss),h=Li(n.iss);return await Tf(h,o,i,zi(n.iss),r)}const zf=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,i=Li(t);if(!e.aud&&!e.uri)throw new Error(\"Either `aud` or `uri` is required to construct the message\");let n=e.statement||void 0;const o=`URI: ${e.aud||e.uri}`,h=`Version: ${e.version}`,p=`Chain ID: ${zi(t)}`,b=`Nonce: ${e.nonce}`,m=`Issued At: ${e.iat}`,w=e.resources?`Resources:${e.resources.map(S=>`\n- ${S}`).join(\"\")}`:void 0,y=Qr(e.resources);if(y){const S=Oe(y);n=Ji(n,S)}return[r,i,\"\",n,\"\",o,h,p,b,m,w].filter(S=>S!=null).join(`\n`)};function su(e,t,r){return r.includes(\"did:pkh:\")||(r=`did:pkh:${r}`),{h:{t:\"caip122\"},p:{iss:r,domain:e.domain,aud:e.aud,version:e.version,nonce:e.nonce,iat:e.iat,statement:e.statement,requestId:e.requestId,resources:e.resources,nbf:e.nbf,exp:e.exp},s:t}}function au(e){var t;const{authPayload:r,chains:i,methods:n}=e,o=r.statement||\"\";if(!(i!=null&&i.length))return r;const h=r.chains,p=mi(h,i);if(!(p!=null&&p.length))throw new Error(\"No supported chains\");const b=Lf(r.resources);if(!b)return r;me(b);const m=jf(b,\"eip155\");let w=r?.resources||[];if(m!=null&&m.length){const y=Qf(m),S=mi(y,n);if(!(S!=null&&S.length))throw new Error(`Supported methods don't satisfy the requested: ${JSON.stringify(y)}, supported: ${JSON.stringify(n)}`);const I=ji(\"request\",S,{chains:p}),N=Vf(b,\"eip155\",I);w=((t=r?.resources)==null?void 0:t.slice(0,-1))||[],w.push(jr(N))}return Hf(Hi({},r),{statement:Xf(o,Qr(w)),chains:p,resources:r!=null&&r.resources||w.length>0?w:void 0})}function Lf(e){const t=Qr(e);if(t&&Qi(t))return Oe(t)}function uu(e,t){var r;return(r=e?.att)==null?void 0:r.hasOwnProperty(t)}function jf(e,t){var r,i;return(r=e?.att)!=null&&r[t]?Object.keys((i=e?.att)==null?void 0:i[t]):[]}function hu(e){return e?.map(t=>Object.keys(t))||[]}function Qf(e){return e?.map(t=>{var r;return(r=t.split(\"/\"))==null?void 0:r[1]})||[]}function Jf(e){return Buffer.from(JSON.stringify(e)).toString(\"base64\")}function Gf(e){return JSON.parse(Buffer.from(e,\"base64\").toString(\"utf-8\"))}function me(e){if(!e)throw new Error(\"No recap provided, value is undefined\");if(!e.att)throw new Error(\"No `att` property found\");const t=Object.keys(e.att);if(!(t!=null&&t.length))throw new Error(\"No resources found in `att` property\");t.forEach(r=>{const i=e.att[r];if(Array.isArray(i))throw new Error(`Resource must be an object: ${r}`);if(typeof i!=\"object\")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(i).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(i).forEach(n=>{const o=i[n];if(!Array.isArray(o))throw new Error(`Ability limits ${n} must be an array of objects, found: ${o}`);if(!o.length)throw new Error(`Value of ${n} is empty array, must be an array with objects`);o.forEach(h=>{if(typeof h!=\"object\")throw new Error(`Ability limits (${n}) must be an array of objects, found: ${h}`)})})})}function Yf(e,t,r,i={}){return r?.sort((n,o)=>n.localeCompare(o)),{att:{[e]:ji(t,r,i)}}}function Vf(e,t,r){var i;return e.att[t]=Hi({},r),((i=Object.keys(e.att))==null?void 0:i.sort((n,o)=>n.localeCompare(o))).reduce((n,o)=>(n.att[o]=e.att[o],n),{att:{}})}function ji(e,t,r={}){t=t?.sort((n,o)=>n.localeCompare(o));const i=t.map(n=>({[`${e}/${n}`]:[r]}));return Object.assign({},...i)}function jr(e){return me(e),`urn:recap:${Jf(e).replace(/=/g,\"\")}`}function Oe(e){const t=Gf(e.replace(\"urn:recap:\",\"\"));return me(t),t}function cu(e,t,r){const i=Yf(e,t,r);return jr(i)}function Qi(e){return e&&e.includes(\"urn:recap:\")}function lu(e,t){const r=Oe(e),i=Oe(t),n=Wf(r,i);return jr(n)}function Wf(e,t){me(e),me(t);const r=Object.keys(e.att).concat(Object.keys(t.att)).sort((n,o)=>n.localeCompare(o)),i={att:{}};return r.forEach(n=>{var o,h;Object.keys(((o=e.att)==null?void 0:o[n])||{}).concat(Object.keys(((h=t.att)==null?void 0:h[n])||{})).sort((p,b)=>p.localeCompare(b)).forEach(p=>{var b,m;i.att[n]=Hf(Hi({},i.att[n]),{[p]:((b=e.att[n])==null?void 0:b[p])||((m=t.att[n])==null?void 0:m[p])})})}),i}function Ji(e=\"\",t){me(t);const r=\"I further authorize the stated URI to perform the following actions on my behalf: \";if(e.includes(r))return e;const i=[];let n=0;Object.keys(t.att).forEach(p=>{const b=Object.keys(t.att[p]).map(y=>({ability:y.split(\"/\")[0],action:y.split(\"/\")[1]}));b.sort((y,S)=>y.action.localeCompare(S.action));const m={};b.forEach(y=>{m[y.ability]||(m[y.ability]=[]),m[y.ability].push(y.action)});const w=Object.keys(m).map(y=>(n++,`(${n}) '${y}': '${m[y].join(\"', '\")}' for '${p}'.`));i.push(w.join(\", \").replace(\".,\",\".\"))});const o=i.join(\" \"),h=`${r}${o}`;return`${e?e+\" \":\"\"}${h}`}function du(e){var t;const r=Oe(e);me(r);const i=(t=r.att)==null?void 0:t.eip155;return i?Object.keys(i).map(n=>n.split(\"/\")[1]):[]}function pu(e){const t=Oe(e);me(t);const r=[];return Object.values(t.att).forEach(i=>{Object.values(i).forEach(n=>{var o;(o=n?.[0])!=null&&o.chains&&r.push(n[0].chains)})}),[...new Set(r.flat())]}function Xf(e,t){if(!t)return e;const r=Oe(t);return me(r),Ji(e,r)}function Qr(e){if(!e)return;const t=e?.[e.length-1];return Qi(t)?t:void 0}const Gi=\"base10\",zt=\"base16\",Jr=\"base64pad\",Gr=\"utf8\",Yi=0,lr=1,vu=0,Zf=1,Vi=12,Wi=32;function mu(){const e=cn.generateKeyPair();return{privateKey:te(e.secretKey,zt),publicKey:te(e.publicKey,zt)}}function gu(){const e=un(Wi);return te(e,zt)}function Au(e,t){const r=cn.sharedKey(ee(e,zt),ee(t,zt),!0),i=new Uo(ko,r).expand(Wi);return te(i,zt)}function bu(e){const t=hn(ee(e,zt));return te(t,zt)}function yu(e){const t=hn(ee(e,Gr));return te(t,zt)}function $f(e){return ee(`${e}`,Gi)}function Mr(e){return Number(te(e,Gi))}function wu(e){const t=$f(typeof e.type<\"u\"?e.type:Yi);if(Mr(t)===lr&&typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");const r=typeof e.senderPublicKey<\"u\"?ee(e.senderPublicKey,zt):void 0,i=typeof e.iv<\"u\"?ee(e.iv,zt):un(Vi),n=new an(ee(e.symKey,zt)).seal(i,ee(e.message,Gr));return to({type:t,sealed:n,iv:i,senderPublicKey:r})}function xu(e){const t=new an(ee(e.symKey,zt)),{sealed:r,iv:i}=Xi(e.encoded),n=t.open(i,r);if(n===null)throw new Error(\"Failed to decrypt\");return te(n,Gr)}function to(e){if(Mr(e.type)===lr){if(typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");return te(ln([e.type,e.senderPublicKey,e.iv,e.sealed]),Jr)}return te(ln([e.type,e.iv,e.sealed]),Jr)}function Xi(e){const t=ee(e,Jr),r=t.slice(vu,Zf),i=Zf;if(Mr(r)===lr){const p=i+Wi,b=p+Vi,m=t.slice(i,p),w=t.slice(p,b),y=t.slice(b);return{type:r,sealed:y,iv:w,senderPublicKey:m}}const n=i+Vi,o=t.slice(i,n),h=t.slice(n);return{type:r,sealed:h,iv:o}}function Mu(e,t){const r=Xi(e);return eo({type:Mr(r.type),senderPublicKey:typeof r.senderPublicKey<\"u\"?te(r.senderPublicKey,zt):void 0,receiverPublicKey:t?.receiverPublicKey})}function eo(e){const t=e?.type||Yi;if(t===lr){if(typeof e?.senderPublicKey>\"u\")throw new Error(\"missing sender public key\");if(typeof e?.receiverPublicKey>\"u\")throw new Error(\"missing receiver public key\")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Eu(e){return e.type===lr&&typeof e.senderPublicKey==\"string\"&&typeof e.receiverPublicKey==\"string\"}const ro=\"irn\";function Su(e){return e?.relay||{protocol:ro}}function Nu(e){const t=qo[e];if(typeof t>\"u\")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Iu=Object.defineProperty,_u=Object.defineProperties,Bu=Object.getOwnPropertyDescriptors,io=Object.getOwnPropertySymbols,Cu=Object.prototype.hasOwnProperty,Ru=Object.prototype.propertyIsEnumerable,no=(e,t,r)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fo=(e,t)=>{for(var r in t||(t={}))Cu.call(t,r)&&no(e,r,t[r]);if(io)for(var r of io(t))Ru.call(t,r)&&no(e,r,t[r]);return e},Ou=(e,t)=>_u(e,Bu(t));function oo(e,t=\"-\"){const r={},i=\"relay\"+t;return Object.keys(e).forEach(n=>{if(n.startsWith(i)){const o=n.replace(i,\"\"),h=e[n];r[o]=h}}),r}function Pu(e){e=e.includes(\"wc://\")?e.replace(\"wc://\",\"\"):e,e=e.includes(\"wc:\")?e.replace(\"wc:\",\"\"):e;const t=e.indexOf(\":\"),r=e.indexOf(\"?\")!==-1?e.indexOf(\"?\"):void 0,i=e.substring(0,t),n=e.substring(t+1,r).split(\"@\"),o=typeof r<\"u\"?e.substring(r):\"\",h=Nr.parse(o),p=typeof h.methods==\"string\"?h.methods.split(\",\"):void 0;return{protocol:i,topic:so(n[0]),version:parseInt(n[1],10),symKey:h.symKey,relay:oo(h),methods:p,expiryTimestamp:h.expiryTimestamp?parseInt(h.expiryTimestamp,10):void 0}}function so(e){return e.startsWith(\"//\")?e.substring(2):e}function ao(e,t=\"-\"){const r=\"relay\",i={};return Object.keys(e).forEach(n=>{const o=r+t+n;e[n]&&(i[o]=e[n])}),i}function Du(e){return`${e.protocol}:${e.topic}@${e.version}?`+Nr.stringify(fo(Ou(fo({symKey:e.symKey},ao(e.relay)),{expiryTimestamp:e.expiryTimestamp}),e.methods?{methods:e.methods.join(\",\")}:{}))}var Fu=Object.defineProperty,Tu=Object.defineProperties,Uu=Object.getOwnPropertyDescriptors,uo=Object.getOwnPropertySymbols,ku=Object.prototype.hasOwnProperty,qu=Object.prototype.propertyIsEnumerable,ho=(e,t,r)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ku=(e,t)=>{for(var r in t||(t={}))ku.call(t,r)&&ho(e,r,t[r]);if(uo)for(var r of uo(t))qu.call(t,r)&&ho(e,r,t[r]);return e},Hu=(e,t)=>Tu(e,Uu(t));function $e(e){const t=[];return e.forEach(r=>{const[i,n]=r.split(\":\");t.push(`${i}:${n}`)}),t}function co(e){const t=[];return Object.values(e).forEach(r=>{t.push(...$e(r.accounts))}),t}function lo(e,t){const r=[];return Object.values(e).forEach(i=>{$e(i.accounts).includes(t)&&r.push(...i.methods)}),r}function po(e,t){const r=[];return Object.values(e).forEach(i=>{$e(i.accounts).includes(t)&&r.push(...i.events)}),r}function zu(e,t){const r=So(e,t);if(r)throw new Error(r.message);const i={};for(const[n,o]of Object.entries(e))i[n]={methods:o.methods,events:o.events,chains:o.accounts.map(h=>`${h.split(\":\")[0]}:${h.split(\":\")[1]}`)};return i}function Lu(e){const{proposal:{requiredNamespaces:t,optionalNamespaces:r={}},supportedNamespaces:i}=e,n=$i(t),o=$i(r),h={};Object.keys(i).forEach(m=>{const w=i[m].chains,y=i[m].methods,S=i[m].events,I=i[m].accounts;w.forEach(N=>{if(!I.some(C=>C.includes(N)))throw new Error(`No accounts provided for chain ${N} in namespace ${m}`)}),h[m]={chains:w,methods:y,events:S,accounts:I}});const p=Io(t,h,\"approve()\");if(p)throw new Error(p.message);const b={};return!Object.keys(t).length&&!Object.keys(r).length?h:(Object.keys(n).forEach(m=>{const w=i[m].chains.filter(N=>{var C,F;return(F=(C=n[m])==null?void 0:C.chains)==null?void 0:F.includes(N)}),y=i[m].methods.filter(N=>{var C,F;return(F=(C=n[m])==null?void 0:C.methods)==null?void 0:F.includes(N)}),S=i[m].events.filter(N=>{var C,F;return(F=(C=n[m])==null?void 0:C.events)==null?void 0:F.includes(N)}),I=w.map(N=>i[m].accounts.filter(C=>C.includes(`${N}:`))).flat();b[m]={chains:w,methods:y,events:S,accounts:I}}),Object.keys(o).forEach(m=>{var w,y,S,I,N,C;if(!i[m])return;const F=(y=(w=o[m])==null?void 0:w.chains)==null?void 0:y.filter(G=>i[m].chains.includes(G)),U=i[m].methods.filter(G=>{var H,z;return(z=(H=o[m])==null?void 0:H.methods)==null?void 0:z.includes(G)}),J=i[m].events.filter(G=>{var H,z;return(z=(H=o[m])==null?void 0:H.events)==null?void 0:z.includes(G)}),Bt=F?.map(G=>i[m].accounts.filter(H=>H.includes(`${G}:`))).flat();b[m]={chains:ge((S=b[m])==null?void 0:S.chains,F),methods:ge((I=b[m])==null?void 0:I.methods,U),events:ge((N=b[m])==null?void 0:N.events,J),accounts:ge((C=b[m])==null?void 0:C.accounts,Bt)}}),b)}function Zi(e){return e.includes(\":\")}function vo(e){return Zi(e)?e.split(\":\")[0]:e}function $i(e){var t,r,i;const n={};if(!Yr(e))return n;for(const[o,h]of Object.entries(e)){const p=Zi(o)?[o]:h.chains,b=h.methods||[],m=h.events||[],w=vo(o);n[w]=Hu(Ku({},n[w]),{chains:ge(p,(t=n[w])==null?void 0:t.chains),methods:ge(b,(r=n[w])==null?void 0:r.methods),events:ge(m,(i=n[w])==null?void 0:i.events)})}return n}function mo(e){const t={};return e?.forEach(r=>{const[i,n]=r.split(\":\");t[i]||(t[i]={accounts:[],chains:[],events:[]}),t[i].accounts.push(r),t[i].chains.push(`${i}:${n}`)}),t}function ju(e,t){t=t.map(i=>i.replace(\"did:pkh:\",\"\"));const r=mo(t);for(const[i,n]of Object.entries(r))n.methods?n.methods=ge(n.methods,e):n.methods=e,n.events=[\"chainChanged\",\"accountsChanged\"];return r}const go={INVALID_METHOD:{message:\"Invalid method.\",code:1001},INVALID_EVENT:{message:\"Invalid event.\",code:1002},INVALID_UPDATE_REQUEST:{message:\"Invalid update request.\",code:1003},INVALID_EXTEND_REQUEST:{message:\"Invalid extend request.\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\"Invalid session settle request.\",code:1005},UNAUTHORIZED_METHOD:{message:\"Unauthorized method.\",code:3001},UNAUTHORIZED_EVENT:{message:\"Unauthorized event.\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\"Unauthorized update request.\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\"Unauthorized extend request.\",code:3004},USER_REJECTED:{message:\"User rejected.\",code:5e3},USER_REJECTED_CHAINS:{message:\"User rejected chains.\",code:5001},USER_REJECTED_METHODS:{message:\"User rejected methods.\",code:5002},USER_REJECTED_EVENTS:{message:\"User rejected events.\",code:5003},UNSUPPORTED_CHAINS:{message:\"Unsupported chains.\",code:5100},UNSUPPORTED_METHODS:{message:\"Unsupported methods.\",code:5101},UNSUPPORTED_EVENTS:{message:\"Unsupported events.\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\"Unsupported accounts.\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\"Unsupported namespace key.\",code:5104},USER_DISCONNECTED:{message:\"User disconnected.\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\"Session settlement failed.\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\"Unsupported wc_ method.\",code:10001}},Ao={NOT_INITIALIZED:{message:\"Not initialized.\",code:1},NO_MATCHING_KEY:{message:\"No matching key.\",code:2},RESTORE_WILL_OVERRIDE:{message:\"Restore will override.\",code:3},RESUBSCRIBED:{message:\"Resubscribed.\",code:4},MISSING_OR_INVALID:{message:\"Missing or invalid.\",code:5},EXPIRED:{message:\"Expired.\",code:6},UNKNOWN_TYPE:{message:\"Unknown type.\",code:7},MISMATCHED_TOPIC:{message:\"Mismatched topic.\",code:8},NON_CONFORMING_NAMESPACES:{message:\"Non conforming namespaces.\",code:9}};function xe(e,t){const{message:r,code:i}=Ao[e];return{message:t?`${r} ${t}`:r,code:i}}function tr(e,t){const{message:r,code:i}=go[e];return{message:t?`${r} ${t}`:r,code:i}}function Er(e,t){return Array.isArray(e)?typeof t<\"u\"&&e.length?e.every(t):!0:!1}function Yr(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Pe(e){return typeof e>\"u\"}function Gt(e,t){return t&&Pe(e)?!0:typeof e==\"string\"&&!!e.trim().length}function Vr(e,t){return t&&Pe(e)?!0:typeof e==\"number\"&&!isNaN(e)}function Qu(e,t){const{requiredNamespaces:r}=t,i=Object.keys(e.namespaces),n=Object.keys(r);let o=!0;return _e(n,i)?(i.forEach(h=>{const{accounts:p,methods:b,events:m}=e.namespaces[h],w=$e(p),y=r[h];(!_e(_r(h,y),w)||!_e(y.methods,b)||!_e(y.events,m))&&(o=!1)}),o):!1}function Sr(e){return Gt(e,!1)&&e.includes(\":\")?e.split(\":\").length===2:!1}function bo(e){if(Gt(e,!1)&&e.includes(\":\")){const t=e.split(\":\");if(t.length===3){const r=t[0]+\":\"+t[1];return!!t[2]&&Sr(r)}}return!1}function Ju(e){if(Gt(e,!1))try{return typeof new URL(e)<\"u\"}catch{return!1}return!1}function Gu(e){var t;return(t=e?.proposer)==null?void 0:t.publicKey}function Yu(e){return e?.topic}function Vu(e,t){let r=null;return Gt(e?.publicKey,!1)||(r=xe(\"MISSING_OR_INVALID\",`${t} controller public key should be a string`)),r}function tn(e){let t=!0;return Er(e)?e.length&&(t=e.every(r=>Gt(r,!1))):t=!1,t}function yo(e,t,r){let i=null;return Er(t)&&t.length?t.forEach(n=>{i||Sr(n)||(i=tr(\"UNSUPPORTED_CHAINS\",`${r}, chain ${n} should be a string and conform to \"namespace:chainId\" format`))}):Sr(e)||(i=tr(\"UNSUPPORTED_CHAINS\",`${r}, chains must be defined as \"namespace:chainId\" e.g. \"eip155:1\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\"eip155:1\", \"eip155:5\"] }`)),i}function wo(e,t,r){let i=null;return Object.entries(e).forEach(([n,o])=>{if(i)return;const h=yo(n,_r(n,o),`${t} ${r}`);h&&(i=h)}),i}function xo(e,t){let r=null;return Er(e)?e.forEach(i=>{r||bo(i)||(r=tr(\"UNSUPPORTED_ACCOUNTS\",`${t}, account ${i} should be a string and conform to \"namespace:chainId:address\" format`))}):r=tr(\"UNSUPPORTED_ACCOUNTS\",`${t}, accounts should be an array of strings conforming to \"namespace:chainId:address\" format`),r}function Mo(e,t){let r=null;return Object.values(e).forEach(i=>{if(r)return;const n=xo(i?.accounts,`${t} namespace`);n&&(r=n)}),r}function Eo(e,t){let r=null;return tn(e?.methods)?tn(e?.events)||(r=tr(\"UNSUPPORTED_EVENTS\",`${t}, events should be an array of strings or empty array for no events`)):r=tr(\"UNSUPPORTED_METHODS\",`${t}, methods should be an array of strings or empty array for no methods`),r}function en(e,t){let r=null;return Object.values(e).forEach(i=>{if(r)return;const n=Eo(i,`${t}, namespace`);n&&(r=n)}),r}function Wu(e,t,r){let i=null;if(e&&Yr(e)){const n=en(e,t);n&&(i=n);const o=wo(e,t,r);o&&(i=o)}else i=xe(\"MISSING_OR_INVALID\",`${t}, ${r} should be an object with data`);return i}function So(e,t){let r=null;if(e&&Yr(e)){const i=en(e,t);i&&(r=i);const n=Mo(e,t);n&&(r=n)}else r=xe(\"MISSING_OR_INVALID\",`${t}, namespaces should be an object with data`);return r}function No(e){return Gt(e.protocol,!0)}function Xu(e,t){let r=!1;return t&&!e?r=!0:e&&Er(e)&&e.length&&e.forEach(i=>{r=No(i)}),r}function Zu(e){return typeof e==\"number\"}function $u(e){return typeof e<\"u\"&&typeof e!==null}function th(e){return!(!e||typeof e!=\"object\"||!e.code||!Vr(e.code,!1)||!e.message||!Gt(e.message,!1))}function eh(e){return!(Pe(e)||!Gt(e.method,!1))}function rh(e){return!(Pe(e)||Pe(e.result)&&Pe(e.error)||!Vr(e.id,!1)||!Gt(e.jsonrpc,!1))}function ih(e){return!(Pe(e)||!Gt(e.name,!1))}function nh(e,t){return!(!Sr(t)||!co(e).includes(t))}function fh(e,t,r){return Gt(r,!1)?lo(e,t).includes(r):!1}function oh(e,t,r){return Gt(r,!1)?po(e,t).includes(r):!1}function Io(e,t,r){let i=null;const n=sh(e),o=ah(t),h=Object.keys(n),p=Object.keys(o),b=_o(Object.keys(e)),m=_o(Object.keys(t)),w=b.filter(y=>!m.includes(y));return w.length&&(i=xe(\"NON_CONFORMING_NAMESPACES\",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${w.toString()}\n Received: ${Object.keys(t).toString()}`)),_e(h,p)||(i=xe(\"NON_CONFORMING_NAMESPACES\",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${h.toString()}\n Approved: ${p.toString()}`)),Object.keys(t).forEach(y=>{if(!y.includes(\":\")||i)return;const S=$e(t[y].accounts);S.includes(y)||(i=xe(\"NON_CONFORMING_NAMESPACES\",`${r} namespaces accounts don't satisfy namespace accounts for ${y}\n Required: ${y}\n Approved: ${S.toString()}`))}),h.forEach(y=>{i||(_e(n[y].methods,o[y].methods)?_e(n[y].events,o[y].events)||(i=xe(\"NON_CONFORMING_NAMESPACES\",`${r} namespaces events don't satisfy namespace events for ${y}`)):i=xe(\"NON_CONFORMING_NAMESPACES\",`${r} namespaces methods don't satisfy namespace methods for ${y}`))}),i}function sh(e){const t={};return Object.keys(e).forEach(r=>{var i;r.includes(\":\")?t[r]=e[r]:(i=e[r].chains)==null||i.forEach(n=>{t[n]={methods:e[r].methods,events:e[r].events}})}),t}function _o(e){return[...new Set(e.map(t=>t.includes(\":\")?t.split(\":\")[0]:t))]}function ah(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(\":\"))t[r]=e[r];else{const i=$e(e[r].accounts);i?.forEach(n=>{t[n]={accounts:e[r].accounts.filter(o=>o.includes(`${n}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function uh(e,t){return Vr(e,!1)&&e<=t.max&&e>=t.min}function hh(){const e=We();return new Promise(t=>{switch(e){case qt.browser:t(Bo());break;case qt.reactNative:t(Co());break;case qt.node:t(Ro());break;default:t(!0)}})}function Bo(){return pr()&&navigator?.onLine}async function Co(){if(er()&&typeof global<\"u\"&&global!=null&&global.NetInfo){const e=await(global==null?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}function Ro(){return!0}function ch(e){switch(We()){case qt.browser:Oo(e);break;case qt.reactNative:Po(e);break;case qt.node:break}}function Oo(e){!er()&&pr()&&(window.addEventListener(\"online\",()=>e(!0)),window.addEventListener(\"offline\",()=>e(!1)))}function Po(e){er()&&typeof global<\"u\"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(t=>e(t?.isConnected))}const rn={};class lh{static get(t){return rn[t]}static set(t,r){rn[t]=r}static delete(t){delete rn[t]}}export{Gi as BASE10,zt as BASE16,Jr as BASE64,Yo as COLON,di as DEFAULT_DEPTH,Br as EMPTY_SPACE,qt as ENV_MAP,Ao as INTERNAL_ERRORS,lh as MemoryStore,Vo as ONE_THOUSAND,xn as REACT_NATIVE_PRODUCT,ro as RELAYER_DEFAULT_PROTOCOL,go as SDK_ERRORS,En as SDK_TYPE,Mn as SLASH,Yi as TYPE_0,lr as TYPE_1,Gr as UTF8,Vf as addResourceToRecap,Sn as appendToQueryString,e0 as assertType,ji as assignAbilityToActions,Gf as base64Decode,Jf as base64Encode,Lu as buildApprovedNamespaces,su as buildAuthObject,ju as buildNamespacesFromAuth,Xf as buildRecapStatement,d0 as calcExpiry,s0 as capitalize,Rn as capitalizeWord,a0 as createDelayedPromise,cu as createEncodedRecap,u0 as createExpiringPromise,Yf as createRecap,Oe as decodeRecap,Mr as decodeTypeByte,xu as decrypt,Au as deriveSymKey,Xi as deserialize,jr as encodeRecap,$f as encodeTypeByte,wu as encrypt,v0 as engineEvent,o0 as enumify,vn as formatAccountId,Ko as formatAccountWithChain,pn as formatChainId,vi as formatExpirerTarget,c0 as formatIdTarget,zf as formatMessage,r0 as formatMessageContext,ao as formatRelayParams,$o as formatRelayRpcUrl,Ji as formatStatementFromRecap,h0 as formatTopicTarget,_n as formatUA,Du as formatUri,mu as generateKeyPair,gu as generateRandomBytes32,$e as getAccountsChains,zo as getAccountsFromNamespaces,mn as getAddressFromAccount,Ho as getAddressesFromAccounts,Xo as getAppMetadata,Bo as getBrowserOnlineStatus,Wo as getBundleId,gn as getChainFromAccount,An as getChainsFromAccounts,_r as getChainsFromNamespace,Lo as getChainsFromNamespaces,pu as getChainsFromRecap,jo as getChainsFromRequiredNamespaces,mi as getCommonValuesInArrays,Lf as getDecodedRecapFromResources,g0 as getDeepLink,Li as getDidAddress,Lr as getDidAddressSegments,zi as getDidChainId,We as getEnvironment,t0 as getHttpUrl,xe as getInternalError,In as getJavascriptID,Nn as getJavascriptOS,Cn as getLastItems,du as getMethodsFromRecap,fu as getNamespacedDidChainId,co as getNamespacesChains,po as getNamespacesEventsForChainId,mo as getNamespacesFromAccounts,lo as getNamespacesMethodsForChainId,Ro as getNodeOnlineStatus,Qf as getReCapActions,Co as getReactNativeOnlineStatus,hu as getRecapAbilitiesFromResource,Qr as getRecapFromResources,jf as getRecapResource,Zo as getRelayClientMetadata,Nu as getRelayProtocolApi,Su as getRelayProtocolName,zu as getRequiredNamespacesFromNamespaces,tr as getSdkError,li as getUniqueValues,m0 as handleDeeplinkRedirect,_e as hasOverlap,bu as hashKey,yu as hashMessage,pr as isBrowser,Zi as isCaipNamespace,Io as isConformingNamespaces,p0 as isExpired,pi as isNode,hh as isOnline,Gu as isProposalStruct,er as isReactNative,Qi as isRecap,Qu as isSessionCompatible,Yu as isSessionStruct,Eu as isTypeOneEnvelope,Pe as isUndefined,bo as isValidAccountId,xo as isValidAccounts,Eo as isValidActions,Er as isValidArray,Sr as isValidChainId,yo as isValidChains,Vu as isValidController,kf as isValidEip1271Signature,Uf as isValidEip191Signature,th as isValidErrorReason,ih as isValidEvent,Zu as isValidId,Mo as isValidNamespaceAccounts,en as isValidNamespaceActions,wo as isValidNamespaceChains,tn as isValidNamespaceMethodsOrEvents,So as isValidNamespaces,nh as isValidNamespacesChainId,oh as isValidNamespacesEvent,fh as isValidNamespacesRequest,Vr as isValidNumber,Yr as isValidObject,$u as isValidParams,me as isValidRecap,No as isValidRelay,Xu as isValidRelays,eh as isValidRequest,uh as isValidRequestExpiry,Wu as isValidRequiredNamespaces,rh as isValidResponse,Gt as isValidString,Ju as isValidUrl,f0 as mapEntries,i0 as mapToObj,ge as mergeArrays,lu as mergeEncodedRecaps,Wf as mergeRecaps,$i as normalizeNamespaces,n0 as objToMap,ci as parseAccountId,dn as parseChainId,Bn as parseContextNames,l0 as parseExpirerTarget,vo as parseNamespaceKey,oo as parseRelayParams,so as parseTopic,Pu as parseUri,au as populateAuthPayload,uu as recapHasResource,to as serialize,Oo as subscribeToBrowserNetworkChange,ch as subscribeToNetworkChange,Po as subscribeToReactNativeNetworkChange,Mu as validateDecoding,eo as validateEncoding,ou as validateSignedCacao,Tf as verifySignature};\n//# sourceMappingURL=index.es.js.map\n","import{IEvents as e}from\"@walletconnect/events\";import c,{EventEmitter as i}from\"events\";class n extends e{constructor(s){super(),this.opts=s,this.protocol=\"wc\",this.version=2}}class l{constructor(s,t,o){this.core=s,this.logger=t}}class h extends e{constructor(s,t){super(),this.core=s,this.logger=t,this.records=new Map}}class a{constructor(s,t){this.logger=s,this.core=t}}class u extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class g extends e{constructor(s){super()}}class p{constructor(s,t,o,M){this.core=s,this.logger=t,this.name=o}}class I{constructor(){this.map=new Map}}class d extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class x{constructor(s,t){this.core=s,this.logger=t}}class E extends e{constructor(s,t){super(),this.core=s,this.logger=t}}class m{constructor(s,t){this.logger=s,this.core=t}}class y{constructor(s,t){this.projectId=s,this.logger=t}}class v{constructor(s,t){this.projectId=s,this.logger=t}}class C extends c{constructor(){super()}}class b{constructor(s){this.opts=s,this.protocol=\"wc\",this.version=2}}class S extends i{constructor(){super()}}class w{constructor(s){this.client=s}}export{n as ICore,l as ICrypto,v as IEchoClient,w as IEngine,S as IEngineEvents,E as IExpirer,h as IJsonRpcHistory,x as IKeyChain,a as IMessageTracker,m as IPairing,u as IPublisher,g as IRelayer,b as ISignClient,C as ISignClientEvents,p as IStore,d as ISubscriber,I as ISubscriberTopicMap,y as IVerify};\n//# sourceMappingURL=index.es.js.map\n","import Qt,{EventEmitter as U}from\"events\";import Zt from\"@walletconnect/keyvaluestorage\";import{HEARTBEAT_EVENTS as G,HeartBeat as ei}from\"@walletconnect/heartbeat\";import{generateChildLogger as b,getLoggerContext as w,pino as ti,getDefaultLoggerOptions as Ee,generatePlatformLogger as ii}from\"@walletconnect/logger\";import{IMessageTracker as si,IPublisher as ri,ISubscriber as ni,IRelayer as oi,IStore as ai,IJsonRpcHistory as hi,IExpirer as ci,IVerify as li,IEchoClient as ui,ICore as di}from\"@walletconnect/types\";import{safeJsonStringify as gi,safeJsonParse as pi}from\"@walletconnect/safe-json\";import*as Y from\"@walletconnect/relay-auth\";import{getInternalError as c,mapToObj as we,objToMap as ve,generateKeyPair as Di,generateRandomBytes32 as se,deriveSymKey as yi,hashKey as mi,validateEncoding as bi,isTypeOneEnvelope as Ie,encrypt as fi,validateDecoding as Ei,decrypt as wi,deserialize as Ce,decodeTypeByte as vi,BASE16 as Ii,hashMessage as re,getRelayProtocolName as ne,createExpiringPromise as B,getRelayProtocolApi as H,isUndefined as oe,getSdkError as M,isValidArray as Ci,isNode as ae,getBundleId as _i,isOnline as _e,formatRelayRpcUrl as Ri,subscribeToNetworkChange as Ti,isProposalStruct as Si,isSessionStruct as Pi,TYPE_1 as xi,calcExpiry as J,formatUri as Oi,parseUri as Re,createDelayedPromise as Ai,engineEvent as he,isExpired as Te,isValidParams as ce,isValidUrl as zi,isValidString as Ni,parseExpirerTarget as Li,formatTopicTarget as Ui,formatIdTarget as $i,isReactNative as Fi,isBrowser as ki}from\"@walletconnect/utils\";import{toString as Bi}from\"uint8arrays\";import{ONE_DAY as $,SIX_HOURS as Mi,ONE_SECOND as X,THIRTY_DAYS as W,FIVE_SECONDS as Se,THIRTY_SECONDS as le,toMiliseconds as T,ONE_MINUTE as ue,Watch as Ki,FIVE_MINUTES as Pe}from\"@walletconnect/time\";import{JsonRpcProvider as Vi}from\"@walletconnect/jsonrpc-provider\";import{getBigIntRpcId as xe,isJsonRpcRequest as Oe,isJsonRpcResponse as Ae,formatJsonRpcResult as ze,formatJsonRpcRequest as Ne,formatJsonRpcError as qi,isJsonRpcResult as ji,isJsonRpcError as Le}from\"@walletconnect/jsonrpc-utils\";import Gi from\"@walletconnect/jsonrpc-ws-connection\";import Yi from\"lodash.isequal\";import Hi from\"isomorphic-unfetch\";function Ji(n,e){if(n.length>=255)throw new TypeError(\"Alphabet too long\");for(var t=new Uint8Array(256),i=0;i>>0,E=new Uint8Array(x);D!==P;){for(var O=u[D],N=0,R=x-1;(O!==0||N<_)&&R!==-1;R--,N++)O+=256*E[R]>>>0,E[R]=O%a>>>0,O=O/a>>>0;if(O!==0)throw new Error(\"Non-zero carry\");_=N,D++}for(var A=x-_;A!==x&&E[A]===0;)A++;for(var j=h.repeat(p);A>>0,x=new Uint8Array(P);u[p];){var E=t[u.charCodeAt(p)];if(E===255)return;for(var O=0,N=P-1;(E!==0||O>>0,x[N]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error(\"Non-zero carry\");D=O,p++}if(u[p]!==\" \"){for(var R=P-D;R!==P&&x[R]===0;)R++;for(var A=new Uint8Array(_+(P-R)),j=_;R!==P;)A[j++]=x[R++];return A}}}function L(u){var p=m(u);if(p)return p;throw new Error(`Non-${e} character`)}return{encode:g,decodeUnsafe:m,decode:L}}var Xi=Ji,Wi=Xi;const Ue=n=>{if(n instanceof Uint8Array&&n.constructor.name===\"Uint8Array\")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error(\"Unknown type, must be binary type\")},Qi=n=>new TextEncoder().encode(n),Zi=n=>new TextDecoder().decode(n);class es{constructor(e,t,i){this.name=e,this.prefix=t,this.baseEncode=i}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\"Unknown type, must be binary type\")}}class ts{constructor(e,t,i){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error(\"Invalid prefix character\");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(e){if(typeof e==\"string\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\"Can only multibase decode strings\")}or(e){return $e(this,e)}}class is{constructor(e){this.decoders=e}or(e){return $e(this,e)}decode(e){const t=e[0],i=this.decoders[t];if(i)return i.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const $e=(n,e)=>new is({...n.decoders||{[n.prefix]:n},...e.decoders||{[e.prefix]:e}});class ss{constructor(e,t,i,s){this.name=e,this.prefix=t,this.baseEncode=i,this.baseDecode=s,this.encoder=new es(e,t,i),this.decoder=new ts(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Q=({name:n,prefix:e,encode:t,decode:i})=>new ss(n,e,t,i),K=({prefix:n,name:e,alphabet:t})=>{const{encode:i,decode:s}=Wi(t,e);return Q({prefix:n,name:e,encode:i,decode:r=>Ue(s(r))})},rs=(n,e,t,i)=>{const s={};for(let d=0;d=8&&(a-=8,o[l++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError(\"Unexpected end of data\");return o},ns=(n,e,t)=>{const i=e[e.length-1]===\"=\",s=(1<t;)o-=t,r+=e[s&a>>o];if(o&&(r+=e[s&a<Q({prefix:e,name:n,encode(s){return ns(s,i,t)},decode(s){return rs(s,i,t,n)}}),os=Q({prefix:\"\\0\",name:\"identity\",encode:n=>Zi(n),decode:n=>Qi(n)});var as=Object.freeze({__proto__:null,identity:os});const hs=y({prefix:\"0\",name:\"base2\",alphabet:\"01\",bitsPerChar:1});var cs=Object.freeze({__proto__:null,base2:hs});const ls=y({prefix:\"7\",name:\"base8\",alphabet:\"01234567\",bitsPerChar:3});var us=Object.freeze({__proto__:null,base8:ls});const ds=K({prefix:\"9\",name:\"base10\",alphabet:\"0123456789\"});var gs=Object.freeze({__proto__:null,base10:ds});const ps=y({prefix:\"f\",name:\"base16\",alphabet:\"0123456789abcdef\",bitsPerChar:4}),Ds=y({prefix:\"F\",name:\"base16upper\",alphabet:\"0123456789ABCDEF\",bitsPerChar:4});var ys=Object.freeze({__proto__:null,base16:ps,base16upper:Ds});const ms=y({prefix:\"b\",name:\"base32\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567\",bitsPerChar:5}),bs=y({prefix:\"B\",name:\"base32upper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\",bitsPerChar:5}),fs=y({prefix:\"c\",name:\"base32pad\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567=\",bitsPerChar:5}),Es=y({prefix:\"C\",name:\"base32padupper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\",bitsPerChar:5}),ws=y({prefix:\"v\",name:\"base32hex\",alphabet:\"0123456789abcdefghijklmnopqrstuv\",bitsPerChar:5}),vs=y({prefix:\"V\",name:\"base32hexupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV\",bitsPerChar:5}),Is=y({prefix:\"t\",name:\"base32hexpad\",alphabet:\"0123456789abcdefghijklmnopqrstuv=\",bitsPerChar:5}),Cs=y({prefix:\"T\",name:\"base32hexpadupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\",bitsPerChar:5}),_s=y({prefix:\"h\",name:\"base32z\",alphabet:\"ybndrfg8ejkmcpqxot1uwisza345h769\",bitsPerChar:5});var Rs=Object.freeze({__proto__:null,base32:ms,base32upper:bs,base32pad:fs,base32padupper:Es,base32hex:ws,base32hexupper:vs,base32hexpad:Is,base32hexpadupper:Cs,base32z:_s});const Ts=K({prefix:\"k\",name:\"base36\",alphabet:\"0123456789abcdefghijklmnopqrstuvwxyz\"}),Ss=K({prefix:\"K\",name:\"base36upper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"});var Ps=Object.freeze({__proto__:null,base36:Ts,base36upper:Ss});const xs=K({name:\"base58btc\",prefix:\"z\",alphabet:\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"}),Os=K({name:\"base58flickr\",prefix:\"Z\",alphabet:\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"});var As=Object.freeze({__proto__:null,base58btc:xs,base58flickr:Os});const zs=y({prefix:\"m\",name:\"base64\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",bitsPerChar:6}),Ns=y({prefix:\"M\",name:\"base64pad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",bitsPerChar:6}),Ls=y({prefix:\"u\",name:\"base64url\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\",bitsPerChar:6}),Us=y({prefix:\"U\",name:\"base64urlpad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\",bitsPerChar:6});var $s=Object.freeze({__proto__:null,base64:zs,base64pad:Ns,base64url:Ls,base64urlpad:Us});const Fe=Array.from(\"\\u{1F680}\\u{1FA90}\\u2604\\u{1F6F0}\\u{1F30C}\\u{1F311}\\u{1F312}\\u{1F313}\\u{1F314}\\u{1F315}\\u{1F316}\\u{1F317}\\u{1F318}\\u{1F30D}\\u{1F30F}\\u{1F30E}\\u{1F409}\\u2600\\u{1F4BB}\\u{1F5A5}\\u{1F4BE}\\u{1F4BF}\\u{1F602}\\u2764\\u{1F60D}\\u{1F923}\\u{1F60A}\\u{1F64F}\\u{1F495}\\u{1F62D}\\u{1F618}\\u{1F44D}\\u{1F605}\\u{1F44F}\\u{1F601}\\u{1F525}\\u{1F970}\\u{1F494}\\u{1F496}\\u{1F499}\\u{1F622}\\u{1F914}\\u{1F606}\\u{1F644}\\u{1F4AA}\\u{1F609}\\u263A\\u{1F44C}\\u{1F917}\\u{1F49C}\\u{1F614}\\u{1F60E}\\u{1F607}\\u{1F339}\\u{1F926}\\u{1F389}\\u{1F49E}\\u270C\\u2728\\u{1F937}\\u{1F631}\\u{1F60C}\\u{1F338}\\u{1F64C}\\u{1F60B}\\u{1F497}\\u{1F49A}\\u{1F60F}\\u{1F49B}\\u{1F642}\\u{1F493}\\u{1F929}\\u{1F604}\\u{1F600}\\u{1F5A4}\\u{1F603}\\u{1F4AF}\\u{1F648}\\u{1F447}\\u{1F3B6}\\u{1F612}\\u{1F92D}\\u2763\\u{1F61C}\\u{1F48B}\\u{1F440}\\u{1F62A}\\u{1F611}\\u{1F4A5}\\u{1F64B}\\u{1F61E}\\u{1F629}\\u{1F621}\\u{1F92A}\\u{1F44A}\\u{1F973}\\u{1F625}\\u{1F924}\\u{1F449}\\u{1F483}\\u{1F633}\\u270B\\u{1F61A}\\u{1F61D}\\u{1F634}\\u{1F31F}\\u{1F62C}\\u{1F643}\\u{1F340}\\u{1F337}\\u{1F63B}\\u{1F613}\\u2B50\\u2705\\u{1F97A}\\u{1F308}\\u{1F608}\\u{1F918}\\u{1F4A6}\\u2714\\u{1F623}\\u{1F3C3}\\u{1F490}\\u2639\\u{1F38A}\\u{1F498}\\u{1F620}\\u261D\\u{1F615}\\u{1F33A}\\u{1F382}\\u{1F33B}\\u{1F610}\\u{1F595}\\u{1F49D}\\u{1F64A}\\u{1F639}\\u{1F5E3}\\u{1F4AB}\\u{1F480}\\u{1F451}\\u{1F3B5}\\u{1F91E}\\u{1F61B}\\u{1F534}\\u{1F624}\\u{1F33C}\\u{1F62B}\\u26BD\\u{1F919}\\u2615\\u{1F3C6}\\u{1F92B}\\u{1F448}\\u{1F62E}\\u{1F646}\\u{1F37B}\\u{1F343}\\u{1F436}\\u{1F481}\\u{1F632}\\u{1F33F}\\u{1F9E1}\\u{1F381}\\u26A1\\u{1F31E}\\u{1F388}\\u274C\\u270A\\u{1F44B}\\u{1F630}\\u{1F928}\\u{1F636}\\u{1F91D}\\u{1F6B6}\\u{1F4B0}\\u{1F353}\\u{1F4A2}\\u{1F91F}\\u{1F641}\\u{1F6A8}\\u{1F4A8}\\u{1F92C}\\u2708\\u{1F380}\\u{1F37A}\\u{1F913}\\u{1F619}\\u{1F49F}\\u{1F331}\\u{1F616}\\u{1F476}\\u{1F974}\\u25B6\\u27A1\\u2753\\u{1F48E}\\u{1F4B8}\\u2B07\\u{1F628}\\u{1F31A}\\u{1F98B}\\u{1F637}\\u{1F57A}\\u26A0\\u{1F645}\\u{1F61F}\\u{1F635}\\u{1F44E}\\u{1F932}\\u{1F920}\\u{1F927}\\u{1F4CC}\\u{1F535}\\u{1F485}\\u{1F9D0}\\u{1F43E}\\u{1F352}\\u{1F617}\\u{1F911}\\u{1F30A}\\u{1F92F}\\u{1F437}\\u260E\\u{1F4A7}\\u{1F62F}\\u{1F486}\\u{1F446}\\u{1F3A4}\\u{1F647}\\u{1F351}\\u2744\\u{1F334}\\u{1F4A3}\\u{1F438}\\u{1F48C}\\u{1F4CD}\\u{1F940}\\u{1F922}\\u{1F445}\\u{1F4A1}\\u{1F4A9}\\u{1F450}\\u{1F4F8}\\u{1F47B}\\u{1F910}\\u{1F92E}\\u{1F3BC}\\u{1F975}\\u{1F6A9}\\u{1F34E}\\u{1F34A}\\u{1F47C}\\u{1F48D}\\u{1F4E3}\\u{1F942}\"),Fs=Fe.reduce((n,e,t)=>(n[t]=e,n),[]),ks=Fe.reduce((n,e,t)=>(n[e.codePointAt(0)]=t,n),[]);function Bs(n){return n.reduce((e,t)=>(e+=Fs[t],e),\"\")}function Ms(n){const e=[];for(const t of n){const i=ks[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(i)}return new Uint8Array(e)}const Ks=Q({prefix:\"\\u{1F680}\",name:\"base256emoji\",encode:Bs,decode:Ms});var Vs=Object.freeze({__proto__:null,base256emoji:Ks}),qs=Be,ke=128,js=127,Gs=~js,Ys=Math.pow(2,31);function Be(n,e,t){e=e||[],t=t||0;for(var i=t;n>=Ys;)e[t++]=n&255|ke,n/=128;for(;n&Gs;)e[t++]=n&255|ke,n>>>=7;return e[t]=n|0,Be.bytes=t-i+1,e}var Hs=de,Js=128,Me=127;function de(n,i){var t=0,i=i||0,s=0,r=i,o,a=n.length;do{if(r>=a)throw de.bytes=0,new RangeError(\"Could not decode varint\");o=n[r++],t+=s<28?(o&Me)<=Js);return de.bytes=r-i,t}var Xs=Math.pow(2,7),Ws=Math.pow(2,14),Qs=Math.pow(2,21),Zs=Math.pow(2,28),er=Math.pow(2,35),tr=Math.pow(2,42),ir=Math.pow(2,49),sr=Math.pow(2,56),rr=Math.pow(2,63),nr=function(n){return n(Ke.encode(n,e,t),e),qe=n=>Ke.encodingLength(n),ge=(n,e)=>{const t=e.byteLength,i=qe(n),s=i+qe(t),r=new Uint8Array(s+t);return Ve(n,r,0),Ve(t,r,i),r.set(e,s),new ar(n,t,e,r)};class ar{constructor(e,t,i,s){this.code=e,this.size=t,this.digest=i,this.bytes=s}}const je=({name:n,code:e,encode:t})=>new hr(n,e,t);class hr{constructor(e,t,i){this.name=e,this.code=t,this.encode=i}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ge(this.code,t):t.then(i=>ge(this.code,i))}else throw Error(\"Unknown type, must be binary type\")}}const Ge=n=>async e=>new Uint8Array(await crypto.subtle.digest(n,e)),cr=je({name:\"sha2-256\",code:18,encode:Ge(\"SHA-256\")}),lr=je({name:\"sha2-512\",code:19,encode:Ge(\"SHA-512\")});var ur=Object.freeze({__proto__:null,sha256:cr,sha512:lr});const Ye=0,dr=\"identity\",He=Ue,gr=n=>ge(Ye,He(n)),pr={code:Ye,name:dr,encode:He,digest:gr};var Dr=Object.freeze({__proto__:null,identity:pr});new TextEncoder,new TextDecoder;const Je={...as,...cs,...us,...gs,...ys,...Rs,...Ps,...As,...$s,...Vs};({...ur,...Dr});function Xe(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function yr(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Xe(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function We(n,e,t,i){return{name:n,prefix:e,encoder:{name:n,prefix:e,encode:t},decoder:{decode:i}}}const Qe=We(\"utf8\",\"u\",n=>\"u\"+new TextDecoder(\"utf8\").decode(n),n=>new TextEncoder().encode(n.substring(1))),pe=We(\"ascii\",\"a\",n=>{let e=\"a\";for(let t=0;t{n=n.substring(1);const e=yr(n.length);for(let t=0;t{if(!this.initialized){const i=await this.getKeyChain();typeof i<\"u\"&&(this.keychain=i),this.initialized=!0}},this.has=i=>(this.isInitialized(),this.keychain.has(i)),this.set=async(i,s)=>{this.isInitialized(),this.keychain.set(i,s),await this.persist()},this.get=i=>{this.isInitialized();const s=this.keychain.get(i);if(typeof s>\"u\"){const{message:r}=c(\"NO_MATCHING_KEY\",`${this.name}: ${i}`);throw new Error(r)}return s},this.del=async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()},this.core=e,this.logger=b(t,this.name)}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,we(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?ve(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class At{constructor(e,t,i){this.core=e,this.logger=t,this.name=it,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=s=>(this.isInitialized(),this.keychain.has(s)),this.getClientId=async()=>{this.isInitialized();const s=await this.getClientSeed(),r=Y.generateKeyPair(s);return Y.encodeIss(r.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const s=Di();return this.setPrivateKey(s.publicKey,s.privateKey)},this.signJWT=async s=>{this.isInitialized();const r=await this.getClientSeed(),o=Y.generateKeyPair(r),a=se(),h=st;return await Y.signJWT(a,s,h,o)},this.generateSharedKey=(s,r,o)=>{this.isInitialized();const a=this.getPrivateKey(s),h=yi(a,r);return this.setSymKey(h,o)},this.setSymKey=async(s,r)=>{this.isInitialized();const o=r||mi(s);return await this.keychain.set(o,s),o},this.deleteKeyPair=async s=>{this.isInitialized(),await this.keychain.del(s)},this.deleteSymKey=async s=>{this.isInitialized(),await this.keychain.del(s)},this.encode=async(s,r,o)=>{this.isInitialized();const a=bi(o),h=gi(r);if(Ie(a)){const m=a.senderPublicKey,L=a.receiverPublicKey;s=await this.generateSharedKey(m,L)}const l=this.getSymKey(s),{type:d,senderPublicKey:g}=a;return fi({type:d,symKey:l,message:h,senderPublicKey:g})},this.decode=async(s,r,o)=>{this.isInitialized();const a=Ei(r,o);if(Ie(a)){const h=a.receiverPublicKey,l=a.senderPublicKey;s=await this.generateSharedKey(h,l)}try{const h=this.getSymKey(s),l=wi({symKey:h,encoded:r});return pi(l)}catch(h){this.logger.error(`Failed to decode message from topic: '${s}', clientId: '${await this.getClientId()}'`),this.logger.error(h)}},this.getPayloadType=s=>{const r=Ce(s);return vi(r.type)},this.getPayloadSenderPublicKey=s=>{const r=Ce(s);return r.senderPublicKey?Bi(r.senderPublicKey,Ii):void 0},this.core=e,this.logger=b(t,this.name),this.keychain=i||new Ot(this.core,this.logger)}get context(){return w(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\"\";try{e=this.keychain.get(ye)}catch{e=se(),await this.keychain.set(ye,e)}return br(e,\"base16\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class zt extends si{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=ot,this.version=at,this.initialized=!1,this.storagePrefix=z,this.init=async()=>{if(!this.initialized){this.logger.trace(\"Initialized\");try{const i=await this.getRelayerMessages();typeof i<\"u\"&&(this.messages=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}},this.set=async(i,s)=>{this.isInitialized();const r=re(s);let o=this.messages.get(i);return typeof o>\"u\"&&(o={}),typeof o[r]<\"u\"||(o[r]=s,this.messages.set(i,o),await this.persist()),r},this.get=i=>{this.isInitialized();let s=this.messages.get(i);return typeof s>\"u\"&&(s={}),s},this.has=(i,s)=>{this.isInitialized();const r=this.get(i),o=re(s);return typeof r[o]<\"u\"},this.del=async i=>{this.isInitialized(),this.messages.delete(i),await this.persist()},this.logger=b(e,this.name),this.core=t}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,we(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?ve(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Ir extends ri{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new U,this.name=ct,this.queue=new Map,this.publishTimeout=T(ue),this.failedPublishTimeout=T(X),this.needsTransportRestart=!1,this.publish=async(i,s,r)=>{var o;this.logger.debug(\"Publishing Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:i,message:s,opts:r}});const a=r?.ttl||ht,h=ne(r),l=r?.prompt||!1,d=r?.tag||0,g=r?.id||xe().toString(),m={topic:i,message:s,opts:{ttl:a,relay:h,prompt:l,tag:d,id:g}},L=`Failed to publish payload, please try again. id:${g} tag:${d}`,u=Date.now();let p,_=1;try{for(;p===void 0;){if(Date.now()-u>this.publishTimeout)throw new Error(L);this.logger.trace({id:g,attempts:_},`publisher.publish - attempt ${_}`),p=await await B(this.rpcPublish(i,s,a,h,l,d,g).catch(D=>this.logger.warn(D)),this.publishTimeout,L),_++,p||await new Promise(D=>setTimeout(D,this.failedPublishTimeout))}this.relayer.events.emit(v.publish,m),this.logger.debug(\"Successfully Published Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{id:g,topic:i,message:s,opts:r}})}catch(D){if(this.logger.debug(\"Failed to Publish Payload\"),this.logger.error(D),(o=r?.internal)!=null&&o.throwOnFailedPublish)throw D;this.queue.set(g,m)}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.relayer=e,this.logger=b(t,this.name),this.registerEventListeners()}get context(){return w(this.logger)}rpcPublish(e,t,i,s,r,o,a){var h,l,d,g;const m={method:H(s.protocol).publish,params:{topic:e,message:t,ttl:i,prompt:r,tag:o},id:a};return oe((h=m.params)==null?void 0:h.prompt)&&((l=m.params)==null||delete l.prompt),oe((d=m.params)==null?void 0:d.tag)&&((g=m.params)==null||delete g.tag),this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"message\",direction:\"outgoing\",request:m}),this.relayer.request(m)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:i,opts:s}=e;await this.publish(t,i,s)})}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(v.connection_stalled);return}this.checkQueue()}),this.relayer.on(v.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Cr{constructor(){this.map=new Map,this.set=(e,t)=>{const i=this.get(e);this.exists(e,t)||this.map.set(e,[...i,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>\"u\"){this.map.delete(e);return}if(!this.map.has(e))return;const i=this.get(e);if(!this.exists(e,t))return;const s=i.filter(r=>r!==t);if(!s.length){this.map.delete(e);return}this.map.set(e,s)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var _r=Object.defineProperty,Rr=Object.defineProperties,Tr=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Lt=(n,e,t)=>e in n?_r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e)=>{for(var t in e||(e={}))Sr.call(e,t)&&Lt(n,t,e[t]);if(Nt)for(var t of Nt(e))Pr.call(e,t)&&Lt(n,t,e[t]);return n},fe=(n,e)=>Rr(n,Tr(e));class Ut extends ni{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Cr,this.events=new U,this.name=ft,this.version=Et,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel=\"pending_sub_watch_label\",this.pollingInterval=20,this.storagePrefix=z,this.subscribeTimeout=T(ue),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug(\"Subscribing Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}});try{const r=ne(s),o={topic:i,relay:r};this.pending.set(i,o);const a=await this.rpcSubscribe(i,r);return typeof a==\"string\"&&(this.onSubscribe(a,o),this.logger.debug(\"Successfully Subscribed Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}})),a}catch(r){throw this.logger.debug(\"Failed to Subscribe Topic\"),this.logger.error(r),r}},this.unsubscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),typeof s?.id<\"u\"?await this.unsubscribeById(i,s.id,s):await this.unsubscribeByTopic(i,s)},this.isSubscribed=async i=>{if(this.topics.includes(i))return!0;const s=`${this.pendingSubscriptionWatchLabel}_${i}`;return await new Promise((r,o)=>{const a=new Ki;a.start(s);const h=setInterval(()=>{!this.pending.has(i)&&this.topics.includes(i)&&(clearInterval(h),a.stop(s),r(!0)),a.elapsed(s)>=wt&&(clearInterval(h),a.stop(s),o(new Error(\"Subscription resolution timeout\")))},this.pollingInterval)}).catch(()=>!1)},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=b(t,this.name),this.clientId=\"\"}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\"//\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let i=!1;try{i=this.getSubscription(e).topic===t}catch{}return i}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const i=this.topicMap.get(e);await Promise.all(i.map(async s=>await this.unsubscribeById(e,s,t)))}async unsubscribeById(e,t,i){this.logger.debug(\"Unsubscribing Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}});try{const s=ne(i);await this.rpcUnsubscribe(e,t,s);const r=M(\"USER_DISCONNECTED\",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,r),this.logger.debug(\"Successfully Unsubscribed Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}})}catch(s){throw this.logger.debug(\"Failed to Unsubscribe Topic\"),this.logger.error(s),s}}async rpcSubscribe(e,t){const i={method:H(t.protocol).subscribe,params:{topic:e}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{return await await B(this.relayer.request(i).catch(s=>this.logger.warn(s)),this.subscribeTimeout)?re(e+this.clientId):null}catch{this.logger.debug(\"Outgoing Relay Subscribe Payload stalled\"),this.relayer.events.emit(v.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,i={method:H(t.protocol).batchSubscribe,params:{topics:e.map(s=>s.topic)}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{return await await B(this.relayer.request(i).catch(s=>this.logger.warn(s)),this.subscribeTimeout)}catch{this.relayer.events.emit(v.connection_stalled)}}rpcUnsubscribe(e,t,i){const s={method:H(i.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:s}),this.relayer.request(s)}onSubscribe(e,t){this.setSubscription(e,fe(q({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,q({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,i){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,i),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug(\"Setting subscription\"),this.logger.trace({type:\"method\",method:\"setSubscription\",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,q({},t)),this.topicMap.set(t.topic,e),this.events.emit(S.created,t)}getSubscription(e){this.logger.debug(\"Getting subscription\"),this.logger.trace({type:\"method\",method:\"getSubscription\",id:e});const t=this.subscriptions.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}deleteSubscription(e,t){this.logger.debug(\"Deleting subscription\"),this.logger.trace({type:\"method\",method:\"deleteSubscription\",id:e,reason:t});const i=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(i.topic,e),this.events.emit(S.deleted,fe(q({},i),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(S.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t\"u\"||!e.length)return;if(this.subscriptions.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Ci(t)&&this.onBatchSubscribe(t.map((i,s)=>fe(q({},e[s]),{id:i})))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,async()=>{await this.checkPending()}),this.events.on(S.created,async e=>{const t=S.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()}),this.events.on(S.deleted,async e=>{const t=S.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var xr=Object.defineProperty,$t=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,Ft=(n,e,t)=>e in n?xr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zr=(n,e)=>{for(var t in e||(e={}))Or.call(e,t)&&Ft(n,t,e[t]);if($t)for(var t of $t(e))Ar.call(e,t)&&Ft(n,t,e[t]);return n};class kt extends oi{constructor(e){super(e),this.protocol=\"wc\",this.version=2,this.events=new U,this.name=dt,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=[\"socket hang up\",\"socket stalled\",\"interrupted\"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=T(le+X),this.request=async t=>{var i,s;this.logger.debug(\"Publishing Request Payload\");const r=t.id||xe().toString();await this.toEstablishConnection();try{const o=this.provider.request(t);this.requestsInFlight.set(r,{promise:o,request:t}),this.logger.trace({id:r,method:t.method,topic:(i=t.params)==null?void 0:i.topic},\"relayer.request - attempt to publish...\");const a=await new Promise(async(h,l)=>{const d=()=>{l(new Error(`relayer.request - publish interrupted, id: ${r}`))};this.provider.on(f.disconnect,d);const g=await o;this.provider.off(f.disconnect,d),h(g)});return this.logger.trace({id:r,method:t.method,topic:(s=t.params)==null?void 0:s.topic},\"relayer.request - published\"),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${r}`),o}finally{this.requestsInFlight.delete(r)}},this.resetPingTimeout=()=>{if(ae())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,i,s;(s=(i=(t=this.provider)==null?void 0:t.connection)==null?void 0:i.socket)==null||s.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.startPingTimeout(),this.events.emit(v.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(v.error,t),this.logger.info(\"Fatal socket error received, closing transport\"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(f.payload,this.onPayloadHandler),this.provider.on(f.connect,this.onConnectHandler),this.provider.on(f.disconnect,this.onDisconnectHandler),this.provider.on(f.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<\"u\"&&typeof e.logger!=\"string\"?b(e.logger,this.name):ti(Ee({level:e.logger||ut})),this.messages=new zt(this.logger,e.core),this.subscriber=new Ut(this,this.logger),this.publisher=new Ir(this,this.logger),this.relayUrl=e?.relayUrl||me,this.projectId=e.projectId,this.bundleId=_i(),this.provider={}}async init(){this.logger.trace(\"Initialized\"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${be}...`),await this.restartTransport(be)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&this.subscriber.pending.size===0&&(this.logger.info(\"No topics subscribed to after init, closing transport\"),await this.transportClose(),this.transportExplicitlyClosed=!1)},yt)}get context(){return w(this.logger)}get connected(){var e,t,i;return((i=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===1}get connecting(){var e,t,i;return((i=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===0}async publish(e,t,i){this.isInitialized(),await this.publisher.publish(e,t,i),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var i;this.isInitialized();let s=((i=this.subscriber.topicMap.get(e))==null?void 0:i[0])||\"\",r;const o=a=>{a.topic===e&&(this.subscriber.off(S.created,o),r())};return await Promise.all([new Promise(a=>{r=a,this.subscriber.on(S.created,o)}),new Promise(async a=>{s=await this.subscriber.subscribe(e,t)||s,a()})]),s}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await B(this.provider.disconnect(),2e3,\"provider.disconnect()\").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect(),await this.createProvider()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,i)=>{const s=()=>{this.provider.off(f.disconnect,s),i(new Error(\"Connection interrupted while trying to subscribe\"))};this.provider.on(f.disconnect,s),await B(this.provider.connect(),T(ue),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(r=>{i(r)}),await this.subscriber.start(),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const i=t;if(!this.isConnectionStalled(i.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await _e())throw new Error(\"No internet connection detected. Please restart your network and try again.\")}startPingTimeout(){var e,t,i,s,r;if(ae())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((r=(s=(i=this.provider)==null?void 0:i.connection)==null?void 0:s.socket)==null||r.once(\"ping\",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Vi(new Gi(Ri({sdkVersion:Dt,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:i}=e;await this.messages.set(t,i)}async shouldIgnoreMessageEvent(e){const{topic:t,message:i}=e;if(!i||i.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const s=this.messages.has(t,i);return s&&this.logger.debug(`Ignoring duplicate message: ${i}`),s}async onProviderPayload(e){if(this.logger.debug(\"Incoming Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"incoming\",payload:e}),Oe(e)){if(!e.method.endsWith(gt))return;const t=e.params,{topic:i,message:s,publishedAt:r}=t.data,o={topic:i,message:s,publishedAt:r};this.logger.debug(\"Emitting Relayer Payload\"),this.logger.trace(zr({type:\"event\",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else Ae(e)&&this.events.emit(v.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(v.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=ze(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(f.payload,this.onPayloadHandler),this.provider.off(f.connect,this.onConnectHandler),this.provider.off(f.disconnect,this.onDisconnectHandler),this.provider.off(f.error,this.onProviderErrorHandler)}async registerEventListeners(){let e=await _e();Ti(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(i=>this.logger.error(i)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.events.emit(v.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},T(pt))}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var Nr=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Mt=(n,e,t)=>e in n?Nr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kt=(n,e)=>{for(var t in e||(e={}))Lr.call(e,t)&&Mt(n,t,e[t]);if(Bt)for(var t of Bt(e))Ur.call(e,t)&&Mt(n,t,e[t]);return n};class Vt extends ai{constructor(e,t,i,s=z,r=void 0){super(e,t,i,s),this.core=e,this.logger=t,this.name=i,this.map=new Map,this.version=mt,this.cached=[],this.initialized=!1,this.storagePrefix=z,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!oe(o)?this.map.set(this.getKey(o),o):Si(o)?this.map.set(o.id,o):Pi(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug(\"Setting value\"),this.logger.trace({type:\"method\",method:\"set\",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug(\"Getting value\"),this.logger.trace({type:\"method\",method:\"get\",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(h=>Yi(a[h],o[h]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug(\"Updating value\"),this.logger.trace({type:\"method\",method:\"update\",key:o,update:a});const h=Kt(Kt({},this.getData(o)),a);this.map.set(o,h),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug(\"Deleting value\"),this.logger.trace({type:\"method\",method:\"delete\",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())},this.logger=b(t,this.name),this.storagePrefix=s,this.getKey=r}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:s}=c(\"MISSING_OR_INVALID\",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>\"u\"||!e.length)return;if(this.map.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class qt{constructor(e,t){this.core=e,this.logger=t,this.name=vt,this.version=It,this.events=new Qt,this.initialized=!1,this.storagePrefix=z,this.ignoredPayloadTypes=[xi],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\"Initialized\"))},this.register=({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]},this.create=async i=>{this.isInitialized();const s=se(),r=await this.core.crypto.setSymKey(s),o=J(Pe),a={protocol:lt},h={topic:r,expiry:o,relay:a,active:!1},l=Oi({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:s,relay:a,expiryTimestamp:o,methods:i?.methods});return await this.pairings.set(r,h),await this.core.relayer.subscribe(r),this.core.expirer.set(r,o),{topic:r,uri:l}},this.pair=async i=>{this.isInitialized(),this.isValidPair(i);const{topic:s,symKey:r,relay:o,expiryTimestamp:a,methods:h}=Re(i.uri);let l;if(this.pairings.keys.includes(s)&&(l=this.pairings.get(s),l.active))throw new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);const d=a||J(Pe),g={topic:s,relay:o,expiry:d,active:!1,methods:h};return await this.pairings.set(s,g),this.core.expirer.set(s,d),i.activatePairing&&await this.activate({topic:s}),this.events.emit(V.create,g),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(r,s),await this.core.relayer.subscribe(s,{relay:o}),g},this.activate=async({topic:i})=>{this.isInitialized();const s=J(W);await this.pairings.update(i,{active:!0,expiry:s}),this.core.expirer.set(i,s)},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:s}=i;if(this.pairings.keys.includes(s)){const r=await this.sendRequest(s,\"wc_pairingPing\",{}),{done:o,resolve:a,reject:h}=Ai();this.events.once(he(\"pairing_ping\",r),({error:l})=>{l?h(l):a()}),await o()}},this.updateExpiry=async({topic:i,expiry:s})=>{this.isInitialized(),await this.pairings.update(i,{expiry:s})},this.updateMetadata=async({topic:i,metadata:s})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:s})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:s}=i;this.pairings.keys.includes(s)&&(await this.sendRequest(s,\"wc_pairingDelete\",M(\"USER_DISCONNECTED\")),await this.deletePairing(s))},this.sendRequest=async(i,s,r)=>{const o=Ne(s,r),a=await this.core.crypto.encode(i,o),h=F[s].req;return this.core.history.set(i,o),this.core.relayer.publish(i,a,h),o.id},this.sendResult=async(i,s,r)=>{const o=ze(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=F[h.request.method].res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.sendError=async(i,s,r)=>{const o=qi(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=F[h.request.method]?F[h.request.method].res:F.unregistered_method.res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.deletePairing=async(i,s)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,M(\"USER_DISCONNECTED\")),this.core.crypto.deleteSymKey(i),s?Promise.resolve():this.core.expirer.del(i)])},this.cleanup=async()=>{const i=this.pairings.getAll().filter(s=>Te(s.expiry));await Promise.all(i.map(s=>this.deletePairing(s.topic)))},this.onRelayEventRequest=i=>{const{topic:s,payload:r}=i;switch(r.method){case\"wc_pairingPing\":return this.onPairingPingRequest(s,r);case\"wc_pairingDelete\":return this.onPairingDeleteRequest(s,r);default:return this.onUnknownRpcMethodRequest(s,r)}},this.onRelayEventResponse=async i=>{const{topic:s,payload:r}=i,o=(await this.core.history.get(s,r.id)).request.method;switch(o){case\"wc_pairingPing\":return this.onPairingPingResponse(s,r);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(i,s)=>{const{id:r}=s;try{this.isValidPing({topic:i}),await this.sendResult(r,i,!0),this.events.emit(V.ping,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onPairingPingResponse=(i,s)=>{const{id:r}=s;setTimeout(()=>{ji(s)?this.events.emit(he(\"pairing_ping\",r),{}):Le(s)&&this.events.emit(he(\"pairing_ping\",r),{error:s.error})},500)},this.onPairingDeleteRequest=async(i,s)=>{const{id:r}=s;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(V.delete,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(i,s)=>{const{id:r,method:o}=s;try{if(this.registeredMethods.includes(o))return;const a=M(\"WC_METHOD_UNSUPPORTED\",o);await this.sendError(r,i,a),this.logger.error(a)}catch(a){await this.sendError(r,i,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=i=>{this.registeredMethods.includes(i)||this.logger.error(M(\"WC_METHOD_UNSUPPORTED\",i))},this.isValidPair=i=>{var s;if(!ce(i)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() params: ${i}`);throw new Error(o)}if(!zi(i.uri)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() uri: ${i.uri}`);throw new Error(o)}const r=Re(i.uri);if(!((s=r?.relay)!=null&&s.protocol)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#relay-protocol\");throw new Error(o)}if(!(r!=null&&r.symKey)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#symKey\");throw new Error(o)}if(r!=null&&r.expiryTimestamp&&T(r?.expiryTimestamp){if(!ce(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`ping() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidDisconnect=async i=>{if(!ce(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`disconnect() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidPairingTopic=async i=>{if(!Ni(i,!1)){const{message:s}=c(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${i}`);throw new Error(s)}if(!this.pairings.keys.includes(i)){const{message:s}=c(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${i}`);throw new Error(s)}if(Te(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:s}=c(\"EXPIRED\",`pairing topic: ${i}`);throw new Error(s)}},this.core=e,this.logger=b(t,this.name),this.pairings=new Vt(this.core,this.logger,this.name,this.storagePrefix)}get context(){return w(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(v.message,async e=>{const{topic:t,message:i}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))return;const s=await this.core.crypto.decode(t,i);try{Oe(s)?(this.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):Ae(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.core.history.delete(t,s.id))}catch(r){this.logger.error(r)}})}registerExpirerEvents(){this.core.expirer.on(C.expired,async e=>{const{topic:t}=Li(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(V.expire,{topic:t}))})}}class jt extends hi{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new U,this.name=Ct,this.version=_t,this.cached=[],this.initialized=!1,this.storagePrefix=z,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(i,s,r)=>{if(this.isInitialized(),this.logger.debug(\"Setting JSON-RPC request history record\"),this.logger.trace({type:\"method\",method:\"set\",topic:i,request:s,chainId:r}),this.records.has(s.id))return;const o={id:s.id,topic:i,request:{method:s.method,params:s.params||null},chainId:r,expiry:J(W)};this.records.set(o.id,o),this.persist(),this.events.emit(I.created,o)},this.resolve=async i=>{if(this.isInitialized(),this.logger.debug(\"Updating JSON-RPC response history record\"),this.logger.trace({type:\"method\",method:\"update\",response:i}),!this.records.has(i.id))return;const s=await this.getRecord(i.id);typeof s.response>\"u\"&&(s.response=Le(i)?{error:i.error}:{result:i.result},this.records.set(s.id,s),this.persist(),this.events.emit(I.updated,s))},this.get=async(i,s)=>(this.isInitialized(),this.logger.debug(\"Getting record\"),this.logger.trace({type:\"method\",method:\"get\",topic:i,id:s}),await this.getRecord(s)),this.delete=(i,s)=>{this.isInitialized(),this.logger.debug(\"Deleting record\"),this.logger.trace({type:\"method\",method:\"delete\",id:s}),this.values.forEach(r=>{if(r.topic===i){if(typeof s<\"u\"&&r.id!==s)return;this.records.delete(r.id),this.events.emit(I.deleted,r)}}),this.persist()},this.exists=async(i,s)=>(this.isInitialized(),this.records.has(s)?(await this.getRecord(s)).topic===i:!1),this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<\"u\")return;const i={topic:t.topic,request:Ne(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(i)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(I.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>\"u\"||!e.length)return;if(this.records.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(I.created,e=>{const t=I.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.events.on(I.updated,e=>{const t=I.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.events.on(I.deleted,e=>{const t=I.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.core.heartbeat.on(G.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{T(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(I.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Gt extends ci{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new U,this.name=Rt,this.version=Tt,this.cached=[],this.initialized=!1,this.storagePrefix=z,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=i=>{try{const s=this.formatTarget(i);return typeof this.getExpiration(s)<\"u\"}catch{return!1}},this.set=(i,s)=>{this.isInitialized();const r=this.formatTarget(i),o={target:r,expiry:s};this.expirations.set(r,o),this.checkExpiry(r,o),this.events.emit(C.created,{target:r,expiration:o})},this.get=i=>{this.isInitialized();const s=this.formatTarget(i);return this.getExpiration(s)},this.del=i=>{if(this.isInitialized(),this.has(i)){const s=this.formatTarget(i),r=this.getExpiration(s);this.expirations.delete(s),this.events.emit(C.deleted,{target:s,expiration:r})}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return w(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\"string\")return Ui(e);if(typeof e==\"number\")return $i(e);const{message:t}=c(\"UNKNOWN_TYPE\",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(C.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>\"u\"||!e.length)return;if(this.expirations.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.warn(i),new Error(i)}return t}checkExpiry(e,t){const{expiry:i}=t;T(i)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(C.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(G.pulse,()=>this.checkExpirations()),this.events.on(C.created,e=>{const t=C.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(C.expired,e=>{const t=C.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(C.deleted,e=>{const t=C.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Yt extends li{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=ee,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async i=>{if(this.verifyDisabled||Fi()||!ki())return;const s=this.getVerifyUrl(i?.verifyUrl);this.verifyUrl!==s&&this.removeIframe(),this.verifyUrl=s;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r)}if(!this.initialized){this.removeIframe(),this.verifyUrl=te;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r),this.verifyDisabled=!0}}},this.register=async i=>{this.initialized?this.sendPost(i.attestationId):(this.addToQueue(i.attestationId),await this.init())},this.resolve=async i=>{if(this.isDevEnv)return\"\";const s=this.getVerifyUrl(i?.verifyUrl);let r;try{r=await this.fetchAttestation(i.attestationId,s)}catch(o){this.logger.info(`failed to resolve attestation: ${i.attestationId} from url: ${s}`),this.logger.info(o),r=await this.fetchAttestation(i.attestationId,te)}return r},this.fetchAttestation=async(i,s)=>{this.logger.info(`resolving attestation: ${i} from url: ${s}`);const r=this.startAbortTimer(X*2),o=await fetch(`${s}/attestation/${i}`,{signal:this.abortController.signal});return clearTimeout(r),o.status===200?await o.json():void 0},this.addToQueue=i=>{this.queue.push(i)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(i=>this.sendPost(i)),this.queue=[])},this.sendPost=i=>{var s;try{if(!this.iframe)return;(s=this.iframe.contentWindow)==null||s.postMessage(i,\"*\"),this.logger.info(`postMessage sent: ${i} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let i;const s=r=>{r.data===\"verify_ready\"&&(this.onInit(),window.removeEventListener(\"message\",s),i())};await Promise.race([new Promise(r=>{const o=document.getElementById(ee);if(o)return this.iframe=o,this.onInit(),r();window.addEventListener(\"message\",s);const a=document.createElement(\"iframe\");a.id=ee,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display=\"none\",document.body.append(a),this.iframe=a,i=r}),new Promise((r,o)=>setTimeout(()=>{window.removeEventListener(\"message\",s),o(\"verify iframe load timeout\")},T(Se)))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=i=>{let s=i||k;return St.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${k}`),s=k),s},this.logger=b(t,this.name),this.verifyUrl=k,this.abortController=new AbortController,this.isDevEnv=ae()&&process.env.IS_VITEST}get context(){return w(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),T(e))}}class Ht extends ui{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=Pt,this.registerDeviceToken=async i=>{const{clientId:s,token:r,notificationType:o,enableEncrypted:a=!1}=i,h=`${xt}/${this.projectId}/clients`;await Hi(h,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({client_id:s,type:o,token:r,always_raw:a})})},this.logger=b(t,this.context)}}var $r=Object.defineProperty,Jt=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Xt=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wt=(n,e)=>{for(var t in e||(e={}))Fr.call(e,t)&&Xt(n,t,e[t]);if(Jt)for(var t of Jt(e))kr.call(e,t)&&Xt(n,t,e[t]);return n};class ie extends di{constructor(e){var t;super(e),this.protocol=De,this.version=Ze,this.name=Z,this.events=new U,this.initialized=!1,this.on=(o,a)=>this.events.on(o,a),this.once=(o,a)=>this.events.once(o,a),this.off=(o,a)=>this.events.off(o,a),this.removeListener=(o,a)=>this.events.removeListener(o,a),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||me,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\"\";const i=Ee({level:typeof e?.logger==\"string\"&&e.logger?e.logger:et.logger}),{logger:s,chunkLoggerController:r}=ii({opts:i,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=r,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var o,a;(o=this.logChunkController)!=null&&o.downloadLogsBlobInBrowser&&((a=this.logChunkController)==null||a.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=b(s,this.name),this.heartbeat=new ei,this.crypto=new At(this,this.logger,e?.keychain),this.history=new jt(this,this.logger),this.expirer=new Gt(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Zt(Wt(Wt({},tt),e?.storageOptions)),this.relayer=new kt({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new qt(this,this.logger),this.verify=new Yt(this.projectId||\"\",this.logger),this.echoClient=new Ht(this.projectId||\"\",this.logger)}static async init(e){const t=new ie(e);await t.initialize();const i=await t.crypto.getClientId();return await t.storage.setItem(bt,i),t}get context(){return w(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace(\"Initialized\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info(\"Core Initialization Success\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Br=ie;export{Z as CORE_CONTEXT,et as CORE_DEFAULT,De as CORE_PROTOCOL,tt as CORE_STORAGE_OPTIONS,z as CORE_STORAGE_PREFIX,Ze as CORE_VERSION,ye as CRYPTO_CLIENT_SEED,it as CRYPTO_CONTEXT,st as CRYPTO_JWT_TTL,Br as Core,At as Crypto,Pt as ECHO_CONTEXT,xt as ECHO_URL,Rt as EXPIRER_CONTEXT,vr as EXPIRER_DEFAULT_TTL,C as EXPIRER_EVENTS,Tt as EXPIRER_STORAGE_VERSION,Ht as EchoClient,Gt as Expirer,Ct as HISTORY_CONTEXT,I as HISTORY_EVENTS,_t as HISTORY_STORAGE_VERSION,jt as JsonRpcHistory,rt as KEYCHAIN_CONTEXT,nt as KEYCHAIN_STORAGE_VERSION,Ot as KeyChain,ot as MESSAGES_CONTEXT,at as MESSAGES_STORAGE_VERSION,zt as MessageTracker,vt as PAIRING_CONTEXT,wr as PAIRING_DEFAULT_TTL,V as PAIRING_EVENTS,F as PAIRING_RPC_OPTS,It as PAIRING_STORAGE_VERSION,wt as PENDING_SUB_RESOLUTION_TIMEOUT,ct as PUBLISHER_CONTEXT,ht as PUBLISHER_DEFAULT_TTL,qt as Pairing,dt as RELAYER_CONTEXT,ut as RELAYER_DEFAULT_LOGGER,lt as RELAYER_DEFAULT_PROTOCOL,me as RELAYER_DEFAULT_RELAY_URL,v as RELAYER_EVENTS,be as RELAYER_FAILOVER_RELAY_URL,f as RELAYER_PROVIDER_EVENTS,pt as RELAYER_RECONNECT_TIMEOUT,Dt as RELAYER_SDK_VERSION,fr as RELAYER_STORAGE_OPTIONS,gt as RELAYER_SUBSCRIBER_SUFFIX,yt as RELAYER_TRANSPORT_CUTOFF,kt as Relayer,mt as STORE_STORAGE_VERSION,ft as SUBSCRIBER_CONTEXT,Er as SUBSCRIBER_DEFAULT_TTL,S as SUBSCRIBER_EVENTS,Et as SUBSCRIBER_STORAGE_VERSION,Vt as Store,Ut as Subscriber,St as TRUSTED_VERIFY_URLS,ee as VERIFY_CONTEXT,te as VERIFY_FALLBACK_SERVER,k as VERIFY_SERVER,Yt as Verify,bt as WALLETCONNECT_CLIENT_ID,ie as default};\n//# sourceMappingURL=index.es.js.map\n","import{RELAYER_DEFAULT_PROTOCOL as tt,RELAYER_EVENTS as qe,VERIFY_SERVER as st,EXPIRER_EVENTS as it,PAIRING_EVENTS as Ne,Store as K,Core as rt}from\"@walletconnect/core\";import{pino as nt,getDefaultLoggerOptions as ot,generateChildLogger as at,getLoggerContext as ct}from\"@walletconnect/logger\";import{IEngine as lt,ISignClient as ht}from\"@walletconnect/types\";import{getInternalError as l,calcExpiry as N,createDelayedPromise as U,engineEvent as u,getSdkError as R,getDeepLink as pt,handleDeeplinkRedirect as dt,isSessionCompatible as ut,hashKey as ue,parseChainId as ge,createEncodedRecap as gt,getRecapFromResources as we,mergeEncodedRecaps as wt,validateSignedCacao as Pe,getNamespacedDidChainId as ve,getDidAddress as Oe,getMethodsFromRecap as Te,getChainsFromRecap as De,buildNamespacesFromAuth as xe,formatMessage as yt,isBrowser as mt,hashMessage as ee,isExpired as G,MemoryStore as H,isValidParams as T,isUndefined as Y,isValidRelays as St,isValidObject as Ae,isValidRequiredNamespaces as Et,isValidNamespaces as ye,isConformingNamespaces as Ve,isValidString as V,isValidErrorReason as _t,isValidRelay as Rt,isValidController as It,isValidNamespacesChainId as Ce,isValidRequest as ft,isValidNamespacesRequest as qt,isValidRequestExpiry as Nt,isValidResponse as Pt,isValidEvent as vt,isValidNamespacesEvent as Ot,parseExpirerTarget as Tt,isValidId as Dt,TYPE_1 as be,getAppMetadata as xt}from\"@walletconnect/utils\";import At,{EventEmitter as Vt}from\"events\";import{THIRTY_DAYS as Ct,SEVEN_DAYS as $e,FIVE_MINUTES as x,ONE_DAY as C,ONE_HOUR as Le,ONE_SECOND as bt,toMiliseconds as Me}from\"@walletconnect/time\";import{payloadId as k,getBigIntRpcId as te,isJsonRpcResult as b,isJsonRpcError as $,formatJsonRpcRequest as me,formatJsonRpcResult as $t,formatJsonRpcError as Lt,isJsonRpcRequest as Mt,isJsonRpcResponse as Kt}from\"@walletconnect/jsonrpc-utils\";const Se=\"wc\",Ee=2,_e=\"client\",se=`${Se}@${Ee}:${_e}:`,ie={name:_e,logger:\"error\",controller:!1,relayUrl:\"wss://relay.walletconnect.com\"},Ut={session_proposal:\"session_proposal\",session_update:\"session_update\",session_extend:\"session_extend\",session_ping:\"session_ping\",session_delete:\"session_delete\",session_expire:\"session_expire\",session_request:\"session_request\",session_request_sent:\"session_request_sent\",session_event:\"session_event\",proposal_expire:\"proposal_expire\",session_authenticate:\"session_authenticate\",session_request_expire:\"session_request_expire\"},Gt={database:\":memory:\"},Re=\"WALLETCONNECT_DEEPLINK_CHOICE\",kt={created:\"history_created\",updated:\"history_updated\",deleted:\"history_deleted\",sync:\"history_sync\"},Ft=\"history\",jt=\"0.3\",Ke=\"proposal\",Qt=Ct,Ue=\"Proposal expired\",Ge=\"session\",L=$e,ke=\"engine\",q={wc_sessionPropose:{req:{ttl:x,prompt:!0,tag:1100},res:{ttl:x,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:x,prompt:!1,tag:1102},res:{ttl:x,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:C,prompt:!1,tag:1104},res:{ttl:C,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:C,prompt:!1,tag:1106},res:{ttl:C,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:x,prompt:!0,tag:1108},res:{ttl:x,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:x,prompt:!0,tag:1110},res:{ttl:x,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:C,prompt:!1,tag:1112},res:{ttl:C,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:C,prompt:!1,tag:1114},res:{ttl:C,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:Le,prompt:!0,tag:1116},res:{ttl:Le,prompt:!1,tag:1117}}},re={min:x,max:$e},A={idle:\"IDLE\",active:\"ACTIVE\"},Fe=\"request\",je=[\"wc_sessionPropose\",\"wc_sessionRequest\",\"wc_authRequest\"],Qe=\"wc\",zt=1.5,ze=\"auth\",He=\"authKeys\",Ye=\"pairingTopics\",Xe=\"requests\",X=`${Qe}@${1.5}:${ze}:`,J=`${X}:PUB_KEY`;var Ht=Object.defineProperty,Yt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Be=(S,n,t)=>n in S?Ht(S,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):S[n]=t,m=(S,n)=>{for(var t in n||(n={}))Jt.call(n,t)&&Be(S,t,n[t]);if(Je)for(var t of Je(n))Bt.call(n,t)&&Be(S,t,n[t]);return S},F=(S,n)=>Yt(S,Xt(n));class Wt extends lt{constructor(n){super(n),this.name=ke,this.events=new At,this.initialized=!1,this.requestQueue={state:A.idle,queue:[]},this.sessionRequestQueue={state:A.idle,queue:[]},this.requestQueueDelay=bt,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(q)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Me(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const e=F(m({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(e);const{pairingTopic:s,requiredNamespaces:i,optionalNamespaces:r,sessionProperties:o,relays:a}=e;let c=s,d,p=!1;try{c&&(p=this.client.core.pairing.pairings.get(c).active)}catch(f){throw this.client.logger.error(`connect() -> pairing.get(${c}) failed`),f}if(!c||!p){const{topic:f,uri:v}=await this.client.core.pairing.create();c=f,d=v}if(!c){const{message:f}=l(\"NO_MATCHING_KEY\",`connect() pairing topic: ${c}`);throw new Error(f)}const g=await this.client.core.crypto.generateKeyPair(),h=q.wc_sessionPropose.req.ttl||x,y=N(h),w=m({requiredNamespaces:i,optionalNamespaces:r,relays:a??[{protocol:tt}],proposer:{publicKey:g,metadata:this.client.metadata},expiryTimestamp:y},o&&{sessionProperties:o}),{reject:I,resolve:D,done:E}=U(h,Ue);this.events.once(u(\"session_connect\"),async({error:f,session:v})=>{if(f)I(f);else if(v){v.self.publicKey=g;const j=F(m({},v),{requiredNamespaces:w.requiredNamespaces,optionalNamespaces:w.optionalNamespaces});await this.client.session.set(v.topic,j),await this.setExpiry(v.topic,v.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:v.peer.metadata}),D(j)}});const P=await this.sendRequest({topic:c,method:\"wc_sessionPropose\",params:w,throwOnFailedPublish:!0});return await this.setProposal(P,m({id:P},w)),{uri:d,approval:E}},this.pair=async t=>{await this.isInitialized();try{return await this.client.core.pairing.pair(t)}catch(e){throw this.client.logger.error(\"pair() failed\"),e}},this.approve=async t=>{await this.isInitialized();try{await this.isValidApprove(t)}catch(E){throw this.client.logger.error(\"approve() -> isValidApprove() failed\"),E}const{id:e,relayProtocol:s,namespaces:i,sessionProperties:r,sessionConfig:o}=t;let a;try{a=this.client.proposal.get(e)}catch(E){throw this.client.logger.error(`approve() -> proposal.get(${e}) failed`),E}let{pairingTopic:c,proposer:d,requiredNamespaces:p,optionalNamespaces:g}=a;c=c||\"\";const h=await this.client.core.crypto.generateKeyPair(),y=d.publicKey,w=await this.client.core.crypto.generateSharedKey(h,y),I=m(m({relay:{protocol:s??\"irn\"},namespaces:i,pairingTopic:c,controller:{publicKey:h,metadata:this.client.metadata},expiry:N(L)},r&&{sessionProperties:r}),o&&{sessionConfig:o});await this.client.core.relayer.subscribe(w);const D=F(m({},I),{topic:w,requiredNamespaces:p,optionalNamespaces:g,pairingTopic:c,acknowledged:!1,self:I.controller,peer:{publicKey:d.publicKey,metadata:d.metadata},controller:h});await this.client.session.set(w,D);try{await this.sendResult({id:e,topic:c,result:{relay:{protocol:s??\"irn\"},responderPublicKey:h},throwOnFailedPublish:!0}),await this.sendRequest({topic:w,method:\"wc_sessionSettle\",params:I,throwOnFailedPublish:!0})}catch(E){throw this.client.logger.error(E),this.client.session.delete(w,R(\"USER_DISCONNECTED\")),await this.client.core.relayer.unsubscribe(w),E}return await this.client.core.pairing.updateMetadata({topic:c,metadata:d.metadata}),await this.client.proposal.delete(e,R(\"USER_DISCONNECTED\")),await this.client.core.pairing.activate({topic:c}),await this.setExpiry(w,N(L)),{topic:w,acknowledged:()=>new Promise(E=>setTimeout(()=>E(this.client.session.get(w)),500))}},this.reject=async t=>{await this.isInitialized();try{await this.isValidReject(t)}catch(r){throw this.client.logger.error(\"reject() -> isValidReject() failed\"),r}const{id:e,reason:s}=t;let i;try{i=this.client.proposal.get(e).pairingTopic}catch(r){throw this.client.logger.error(`reject() -> proposal.get(${e}) failed`),r}i&&(await this.sendError({id:e,topic:i,error:s}),await this.client.proposal.delete(e,R(\"USER_DISCONNECTED\")))},this.update=async t=>{await this.isInitialized();try{await this.isValidUpdate(t)}catch(p){throw this.client.logger.error(\"update() -> isValidUpdate() failed\"),p}const{topic:e,namespaces:s}=t,{done:i,resolve:r,reject:o}=U(),a=k(),c=te().toString(),d=this.client.session.get(e).namespaces;return this.events.once(u(\"session_update\",a),({error:p})=>{p?o(p):r()}),await this.client.session.update(e,{namespaces:s}),this.sendRequest({topic:e,method:\"wc_sessionUpdate\",params:{namespaces:s},throwOnFailedPublish:!0,clientRpcId:a,relayRpcId:c}).catch(p=>{this.client.logger.error(p),this.client.session.update(e,{namespaces:d}),o(p)}),{acknowledged:i}},this.extend=async t=>{await this.isInitialized();try{await this.isValidExtend(t)}catch(a){throw this.client.logger.error(\"extend() -> isValidExtend() failed\"),a}const{topic:e}=t,s=k(),{done:i,resolve:r,reject:o}=U();return this.events.once(u(\"session_extend\",s),({error:a})=>{a?o(a):r()}),await this.setExpiry(e,N(L)),this.sendRequest({topic:e,method:\"wc_sessionExtend\",params:{},clientRpcId:s,throwOnFailedPublish:!0}).catch(a=>{o(a)}),{acknowledged:i}},this.request=async t=>{await this.isInitialized();try{await this.isValidRequest(t)}catch(h){throw this.client.logger.error(\"request() -> isValidRequest() failed\"),h}const{chainId:e,request:s,topic:i,expiry:r=q.wc_sessionRequest.req.ttl}=t,o=this.client.session.get(i),a=k(),c=te().toString(),{done:d,resolve:p,reject:g}=U(r,\"Request expired. Please try again.\");return this.events.once(u(\"session_request\",a),({error:h,result:y})=>{h?g(h):p(y)}),await Promise.all([new Promise(async h=>{await this.sendRequest({clientRpcId:a,relayRpcId:c,topic:i,method:\"wc_sessionRequest\",params:{request:F(m({},s),{expiryTimestamp:N(r)}),chainId:e},expiry:r,throwOnFailedPublish:!0}).catch(y=>g(y)),this.client.events.emit(\"session_request_sent\",{topic:i,request:s,chainId:e,id:a}),h()}),new Promise(async h=>{var y;if(!((y=o.sessionConfig)!=null&&y.disableDeepLink)){const w=await pt(this.client.core.storage,Re);dt({id:a,topic:i,wcDeepLink:w})}h()}),d()]).then(h=>h[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:e,response:s}=t,{id:i}=s;b(s)?await this.sendResult({id:i,topic:e,result:s.result,throwOnFailedPublish:!0}):$(s)&&await this.sendError({id:i,topic:e,error:s.error}),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized();try{await this.isValidPing(t)}catch(s){throw this.client.logger.error(\"ping() -> isValidPing() failed\"),s}const{topic:e}=t;if(this.client.session.keys.includes(e)){const s=k(),i=te().toString(),{done:r,resolve:o,reject:a}=U();this.events.once(u(\"session_ping\",s),({error:c})=>{c?a(c):o()}),await Promise.all([this.sendRequest({topic:e,method:\"wc_sessionPing\",params:{},throwOnFailedPublish:!0,clientRpcId:s,relayRpcId:i}),r()])}else this.client.core.pairing.pairings.keys.includes(e)&&await this.client.core.pairing.ping({topic:e})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:e,event:s,chainId:i}=t,r=te().toString();await this.sendRequest({topic:e,method:\"wc_sessionEvent\",params:{event:s,chainId:i},throwOnFailedPublish:!0,relayRpcId:r})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:e}=t;if(this.client.session.keys.includes(e))await this.sendRequest({topic:e,method:\"wc_sessionDelete\",params:R(\"USER_DISCONNECTED\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:e,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(e))await this.client.core.pairing.disconnect({topic:e});else{const{message:s}=l(\"MISMATCHED_TOPIC\",`Session or pairing topic not found: ${e}`);throw new Error(s)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(e=>ut(e,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async t=>{this.isInitialized(),this.isValidAuthenticate(t);const{chains:e,statement:s=\"\",uri:i,domain:r,nonce:o,type:a,exp:c,nbf:d,methods:p=[]}=t,g=[...t.resources||[]],{topic:h,uri:y}=await this.client.core.pairing.create({methods:[\"wc_sessionAuthenticate\"]});this.client.logger.info({message:\"Generated new pairing\",pairing:{topic:h,uri:y}});const w=await this.client.core.crypto.generateKeyPair(),I=ue(w);if(await Promise.all([this.client.auth.authKeys.set(J,{responseTopic:I,publicKey:w}),this.client.auth.pairingTopics.set(I,{topic:I,pairingTopic:h})]),await this.client.core.relayer.subscribe(I),this.client.logger.info(`sending request to new pairing topic: ${h}`),p.length>0){const{namespace:O}=ge(e[0]);let _=gt(O,\"request\",p);we(g)&&(_=wt(_,g.pop())),g.push(_)}const D=N(q.wc_sessionPropose.req.ttl),E={authPayload:{type:a??\"caip122\",chains:e,statement:s,aud:i,domain:r,version:\"1\",nonce:o,iat:new Date().toISOString(),exp:c,nbf:d,resources:g},requester:{publicKey:w,metadata:this.client.metadata},expiryTimestamp:D},P={eip155:{chains:e,methods:[...new Set([\"personal_sign\",...p])],events:[\"chainChanged\",\"accountsChanged\"]}},f={requiredNamespaces:{},optionalNamespaces:P,relays:[{protocol:\"irn\"}],proposer:{publicKey:w,metadata:this.client.metadata},expiryTimestamp:D},{done:v,resolve:j,reject:oe}=U(q.wc_sessionAuthenticate.req.ttl,\"Request expired\"),B=async({error:O,session:_})=>{if(this.events.off(u(\"session_request\",M),ae),O)oe(O);else if(_){_.self.publicKey=w,await this.client.session.set(_.topic,_),await this.setExpiry(_.topic,_.expiry),h&&await this.client.core.pairing.updateMetadata({topic:h,metadata:_.peer.metadata});const Q=this.client.session.get(_.topic);j({session:Q})}},ae=async O=>{if(O.error){const z=R(\"WC_METHOD_UNSUPPORTED\",\"wc_sessionAuthenticate\");return O.error.code===z.code?void 0:(this.events.off(u(\"session_connect\"),B),oe(O.error.message))}this.events.off(u(\"session_connect\"),B);const{cacaos:_,responder:Q}=O.result,le=[],Ie=[];for(const z of _){await Pe({cacao:z,projectId:this.client.core.projectId})||(this.client.logger.error(z,\"Signature verification failed\"),oe(R(\"SESSION_SETTLEMENT_FAILED\",\"Signature verification failed\")));const{p:he}=z,pe=we(he.resources),fe=[ve(he.iss)],Ze=Oe(he.iss);if(pe){const de=Te(pe),et=De(pe);le.push(...de),fe.push(...et)}for(const de of fe)Ie.push(`${de}:${Ze}`)}const W=await this.client.core.crypto.generateSharedKey(w,Q.publicKey);let Z;le.length>0&&(Z={topic:W,acknowledged:!0,self:{publicKey:w,metadata:this.client.metadata},peer:Q,controller:Q.publicKey,expiry:N(L),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\"irn\"},pairingTopic:h,namespaces:xe([...new Set(le)],[...new Set(Ie)])},await this.client.core.relayer.subscribe(W),await this.client.session.set(W,Z),Z=this.client.session.get(W)),j({auths:_,session:Z})},M=k(),ce=k();this.events.once(u(\"session_connect\"),B),this.events.once(u(\"session_request\",M),ae);try{await Promise.all([this.sendRequest({topic:h,method:\"wc_sessionAuthenticate\",params:E,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:M}),this.sendRequest({topic:h,method:\"wc_sessionPropose\",params:f,expiry:q.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:ce})])}catch(O){throw this.events.off(u(\"session_connect\"),B),this.events.off(u(\"session_request\",M),ae),O}return await this.setProposal(ce,m({id:ce},f)),await this.client.auth.requests.set(M,{authPayload:E.authPayload,requester:E.requester,expiryTimestamp:D,id:M,pairingTopic:h,verifyContext:{}}),{uri:y,response:v}},this.approveSessionAuthenticate=async t=>{this.isInitialized();const{id:e,auths:s}=t,i=this.getPendingAuthRequest(e);if(!i)throw new Error(`Could not find pending auth request with id ${e}`);const r=i.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a=ue(r),c={type:be,receiverPublicKey:r,senderPublicKey:o},d=[],p=[];for(const y of s){if(!await Pe({cacao:y,projectId:this.client.core.projectId})){const P=R(\"SESSION_SETTLEMENT_FAILED\",\"Signature verification failed\");throw await this.sendError({id:e,topic:a,error:P,encodeOpts:c}),new Error(P.message)}const{p:w}=y,I=we(w.resources),D=[ve(w.iss)],E=Oe(w.iss);if(I){const P=Te(I),f=De(I);d.push(...P),D.push(...f)}for(const P of D)p.push(`${P}:${E}`)}const g=await this.client.core.crypto.generateSharedKey(o,r);let h;return d?.length>0&&(h={topic:g,acknowledged:!0,self:{publicKey:o,metadata:this.client.metadata},peer:{publicKey:r,metadata:i.requester.metadata},controller:r,expiry:N(L),authentication:s,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\"irn\"},pairingTopic:\"\",namespaces:xe([...new Set(d)],[...new Set(p)])},await this.client.core.relayer.subscribe(g),await this.client.session.set(g,h)),await this.sendResult({topic:a,id:e,result:{cacaos:s,responder:{publicKey:o,metadata:this.client.metadata}},encodeOpts:c,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(e,{message:\"fullfilled\",code:0}),await this.client.core.pairing.activate({topic:i.pairingTopic}),{session:h}},this.rejectSessionAuthenticate=async t=>{await this.isInitialized();const{id:e,reason:s}=t,i=this.getPendingAuthRequest(e);if(!i)throw new Error(`Could not find pending auth request with id ${e}`);const r=i.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a=ue(r),c={type:be,receiverPublicKey:r,senderPublicKey:o};await this.sendError({id:e,topic:a,error:s,encodeOpts:c}),await this.client.auth.requests.delete(e,{message:\"rejected\",code:0}),await this.client.proposal.delete(e,R(\"USER_DISCONNECTED\"))},this.formatAuthMessage=t=>{this.isInitialized();const{request:e,iss:s}=t;return yt(e,s)},this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const e=this.client.core.pairing.pairings.get(t.pairingTopic),s=this.client.core.pairing.pairings.getAll().filter(i=>{var r,o;return((r=i.peerMetadata)==null?void 0:r.url)&&((o=i.peerMetadata)==null?void 0:o.url)===t.peer.metadata.url&&i.topic&&i.topic!==e.topic});if(s.length===0)return;this.client.logger.info(`Cleaning up ${s.length} duplicate pairing(s)`),await Promise.all(s.map(i=>this.client.core.pairing.disconnect({topic:i.topic}))),this.client.logger.info(\"Duplicate pairings clean up finished\")}catch(e){this.client.logger.error(e)}},this.deleteSession=async t=>{const{topic:e,expirerHasDeleted:s=!1,emitEvent:i=!0,id:r=0}=t,{self:o}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),await this.client.session.delete(e,R(\"USER_DISCONNECTED\")),this.addToRecentlyDeleted(e,\"session\"),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),s||this.client.core.expirer.del(e),this.client.core.storage.removeItem(Re).catch(a=>this.client.logger.warn(a)),this.getPendingSessionRequests().forEach(a=>{a.topic===e&&this.deletePendingSessionRequest(a.id,R(\"USER_DISCONNECTED\"))}),i&&this.client.events.emit(\"session_delete\",{id:r,topic:e})},this.deleteProposal=async(t,e)=>{await Promise.all([this.client.proposal.delete(t,R(\"USER_DISCONNECTED\")),e?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,\"proposal\")},this.deletePendingSessionRequest=async(t,e,s=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,e),s?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,\"request\"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==t),s&&(this.sessionRequestQueue.state=A.idle,this.client.events.emit(\"session_request_expire\",{id:t}))},this.setExpiry=async(t,e)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:e}),this.client.core.expirer.set(t,e)},this.setProposal=async(t,e)=>{await this.client.proposal.set(t,e),this.client.core.expirer.set(t,N(q.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async t=>{const{id:e,topic:s,params:i,verifyContext:r}=t,o=i.request.expiryTimestamp||N(q.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(e,{id:e,topic:s,params:i,verifyContext:r}),o&&this.client.core.expirer.set(e,o)},this.sendRequest=async t=>{const{topic:e,method:s,params:i,expiry:r,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:c}=t,d=me(s,i,a);if(mt()&&je.includes(s)){const h=ee(JSON.stringify(d));this.client.core.verify.register({attestationId:h})}let p;try{p=await this.client.core.crypto.encode(e,d)}catch(h){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${e} failed`),h}const g=q[s].req;return r&&(g.ttl=r),o&&(g.id=o),this.client.core.history.set(e,d),c?(g.internal=F(m({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(e,p,g)):this.client.core.relayer.publish(e,p,g).catch(h=>this.client.logger.error(h)),d.id},this.sendResult=async t=>{const{id:e,topic:s,result:i,throwOnFailedPublish:r,encodeOpts:o}=t,a=$t(e,i);let c;try{c=await this.client.core.crypto.encode(s,a,o)}catch(g){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${s} failed`),g}let d;try{d=await this.client.core.history.get(s,e)}catch(g){throw this.client.logger.error(`sendResult() -> history.get(${s}, ${e}) failed`),g}const p=q[d.request.method].res;r?(p.internal=F(m({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,c,p)):this.client.core.relayer.publish(s,c,p).catch(g=>this.client.logger.error(g)),await this.client.core.history.resolve(a)},this.sendError=async t=>{const{id:e,topic:s,error:i,encodeOpts:r}=t,o=Lt(e,i);let a;try{a=await this.client.core.crypto.encode(s,o,r)}catch(p){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${s} failed`),p}let c;try{c=await this.client.core.history.get(s,e)}catch(p){throw this.client.logger.error(`sendError() -> history.get(${s}, ${e}) failed`),p}const d=q[c.request.method].res;this.client.core.relayer.publish(s,a,d),await this.client.core.history.resolve(o)},this.cleanup=async()=>{const t=[],e=[];this.client.session.getAll().forEach(s=>{let i=!1;G(s.expiry)&&(i=!0),this.client.core.crypto.keychain.has(s.topic)||(i=!0),i&&t.push(s.topic)}),this.client.proposal.getAll().forEach(s=>{G(s.expiryTimestamp)&&e.push(s.id)}),await Promise.all([...t.map(s=>this.deleteSession({topic:s})),...e.map(s=>this.deleteProposal(s))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===A.active){this.client.logger.info(\"Request queue already active, skipping...\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=A.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise(e=>setTimeout(e,300))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=A.idle},this.processRequest=t=>{const{topic:e,payload:s}=t,i=s.method;if(!this.shouldIgnorePairingRequest({topic:e,requestMethod:i}))switch(i){case\"wc_sessionPropose\":return this.onSessionProposeRequest(e,s);case\"wc_sessionSettle\":return this.onSessionSettleRequest(e,s);case\"wc_sessionUpdate\":return this.onSessionUpdateRequest(e,s);case\"wc_sessionExtend\":return this.onSessionExtendRequest(e,s);case\"wc_sessionPing\":return this.onSessionPingRequest(e,s);case\"wc_sessionDelete\":return this.onSessionDeleteRequest(e,s);case\"wc_sessionRequest\":return this.onSessionRequest(e,s);case\"wc_sessionEvent\":return this.onSessionEventRequest(e,s);case\"wc_sessionAuthenticate\":return this.onSessionAuthenticateRequest(e,s);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async t=>{const{topic:e,payload:s}=t,i=(await this.client.core.history.get(e,s.id)).request.method;switch(i){case\"wc_sessionPropose\":return this.onSessionProposeResponse(e,s);case\"wc_sessionSettle\":return this.onSessionSettleResponse(e,s);case\"wc_sessionUpdate\":return this.onSessionUpdateResponse(e,s);case\"wc_sessionExtend\":return this.onSessionExtendResponse(e,s);case\"wc_sessionPing\":return this.onSessionPingResponse(e,s);case\"wc_sessionRequest\":return this.onSessionRequestResponse(e,s);case\"wc_sessionAuthenticate\":return this.onSessionAuthenticateResponse(e,s);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:e}=t,{message:s}=l(\"MISSING_OR_INVALID\",`Decoded payload on topic ${e} is not identifiable as a JSON-RPC request or a response.`);throw new Error(s)},this.shouldIgnorePairingRequest=t=>{const{topic:e,requestMethod:s}=t,i=this.expectedPairingMethodMap.get(e);return!i||i.includes(s)?!1:!!(i.includes(\"wc_sessionAuthenticate\")&&this.client.events.listenerCount(\"session_authenticate\")>0)},this.onSessionProposeRequest=async(t,e)=>{const{params:s,id:i}=e;try{this.isValidConnect(m({},e.params));const r=s.expiryTimestamp||N(q.wc_sessionPropose.req.ttl),o=m({id:i,pairingTopic:t,expiryTimestamp:r},s);await this.setProposal(i,o);const a=ee(JSON.stringify(e)),c=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit(\"session_proposal\",{id:i,params:o,verifyContext:c})}catch(r){await this.sendError({id:i,topic:t,error:r}),this.client.logger.error(r)}},this.onSessionProposeResponse=async(t,e)=>{const{id:s}=e;if(b(e)){const{result:i}=e;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",result:i});const r=this.client.proposal.get(s);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",proposal:r});const o=r.proposer.publicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",selfPublicKey:o});const a=i.responderPublicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",peerPublicKey:a});const c=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",sessionTopic:c});const d=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",subscriptionId:d}),await this.client.core.pairing.activate({topic:t})}else if($(e)){await this.client.proposal.delete(s,R(\"USER_DISCONNECTED\"));const i=u(\"session_connect\");if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners, 954`);this.events.emit(u(\"session_connect\"),{error:e.error})}},this.onSessionSettleRequest=async(t,e)=>{const{id:s,params:i}=e;try{this.isValidSessionSettleRequest(i);const{relay:r,controller:o,expiry:a,namespaces:c,sessionProperties:d,pairingTopic:p,sessionConfig:g}=e.params,h=m(m({topic:t,relay:r,expiry:a,namespaces:c,acknowledged:!0,pairingTopic:p,requiredNamespaces:{},optionalNamespaces:{},controller:o.publicKey,self:{publicKey:\"\",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},d&&{sessionProperties:d}),g&&{sessionConfig:g});await this.sendResult({id:e.id,topic:t,result:!0,throwOnFailedPublish:!0});const y=u(\"session_connect\");if(this.events.listenerCount(y)===0)throw new Error(`emitting ${y} without any listeners 997`);this.events.emit(u(\"session_connect\"),{session:h}),this.cleanupDuplicatePairings(h)}catch(r){await this.sendError({id:s,topic:t,error:r}),this.client.logger.error(r)}},this.onSessionSettleResponse=async(t,e)=>{const{id:s}=e;b(e)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(u(\"session_approve\",s),{})):$(e)&&(await this.client.session.delete(t,R(\"USER_DISCONNECTED\")),this.events.emit(u(\"session_approve\",s),{error:e.error}))},this.onSessionUpdateRequest=async(t,e)=>{const{params:s,id:i}=e;try{const r=`${t}_session_update`,o=H.get(r);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`),this.sendError({id:i,topic:t,error:R(\"INVALID_UPDATE_REQUEST\")});return}this.isValidUpdate(m({topic:t},s));try{H.set(r,i),await this.client.session.update(t,{namespaces:s.namespaces}),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0})}catch(a){throw H.delete(r),a}this.client.events.emit(\"session_update\",{id:i,topic:t,params:s})}catch(r){await this.sendError({id:i,topic:t,error:r}),this.client.logger.error(r)}},this.isRequestOutOfSync=(t,e)=>parseInt(e.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,e)=>{const{id:s}=e,i=u(\"session_update\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);b(e)?this.events.emit(u(\"session_update\",s),{}):$(e)&&this.events.emit(u(\"session_update\",s),{error:e.error})},this.onSessionExtendRequest=async(t,e)=>{const{id:s}=e;try{this.isValidExtend({topic:t}),await this.setExpiry(t,N(L)),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\"session_extend\",{id:s,topic:t})}catch(i){await this.sendError({id:s,topic:t,error:i}),this.client.logger.error(i)}},this.onSessionExtendResponse=(t,e)=>{const{id:s}=e,i=u(\"session_extend\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);b(e)?this.events.emit(u(\"session_extend\",s),{}):$(e)&&this.events.emit(u(\"session_extend\",s),{error:e.error})},this.onSessionPingRequest=async(t,e)=>{const{id:s}=e;try{this.isValidPing({topic:t}),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\"session_ping\",{id:s,topic:t})}catch(i){await this.sendError({id:s,topic:t,error:i}),this.client.logger.error(i)}},this.onSessionPingResponse=(t,e)=>{const{id:s}=e,i=u(\"session_ping\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);setTimeout(()=>{b(e)?this.events.emit(u(\"session_ping\",s),{}):$(e)&&this.events.emit(u(\"session_ping\",s),{error:e.error})},500)},this.onSessionDeleteRequest=async(t,e)=>{const{id:s}=e;try{this.isValidDisconnect({topic:t,reason:e.params}),await Promise.all([new Promise(i=>{this.client.core.relayer.once(qe.publish,async()=>{i(await this.deleteSession({topic:t,id:s}))})}),this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:R(\"USER_DISCONNECTED\")})])}catch(i){this.client.logger.error(i)}},this.onSessionRequest=async(t,e)=>{const{id:s,params:i}=e;try{await this.isValidRequest(m({topic:t},i));const r=ee(JSON.stringify(me(\"wc_sessionRequest\",i,s))),o=this.client.session.get(t),a=await this.getVerifyContext(r,o.peer.metadata),c={id:s,topic:t,params:i,verifyContext:a};await this.setPendingSessionRequest(c),this.addSessionRequestToSessionRequestQueue(c),this.processSessionRequestQueue()}catch(r){await this.sendError({id:s,topic:t,error:r}),this.client.logger.error(r)}},this.onSessionRequestResponse=(t,e)=>{const{id:s}=e,i=u(\"session_request\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);b(e)?this.events.emit(u(\"session_request\",s),{result:e.result}):$(e)&&this.events.emit(u(\"session_request\",s),{error:e.error})},this.onSessionEventRequest=async(t,e)=>{const{id:s,params:i}=e;try{const r=`${t}_session_event_${i.event.name}`,o=H.get(r);if(o&&this.isRequestOutOfSync(o,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidEmit(m({topic:t},i)),this.client.events.emit(\"session_event\",{id:s,topic:t,params:i}),H.set(r,s)}catch(r){await this.sendError({id:s,topic:t,error:r}),this.client.logger.error(r)}},this.onSessionAuthenticateResponse=(t,e)=>{const{id:s}=e;this.client.logger.trace({type:\"method\",method:\"onSessionAuthenticateResponse\",topic:t,payload:e}),b(e)?this.events.emit(u(\"session_request\",s),{result:e.result}):$(e)&&this.events.emit(u(\"session_request\",s),{error:e.error})},this.onSessionAuthenticateRequest=async(t,e)=>{const{requester:s,authPayload:i,expiryTimestamp:r}=e.params,o=ee(JSON.stringify(e)),a=await this.getVerifyContext(o,this.client.metadata),c={requester:s,pairingTopic:t,id:e.id,authPayload:i,verifyContext:a,expiryTimestamp:r};await this.client.auth.requests.set(e.id,c),this.client.events.emit(\"session_authenticate\",{topic:t,params:e.params,id:e.id})},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:\"fulfilled\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=A.idle,this.processSessionRequestQueue()},Me(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:e})=>{const s=this.client.core.history.pending;s.length>0&&s.filter(i=>i.topic===t&&i.request.method===\"wc_sessionRequest\").forEach(i=>{const r=i.request.id,o=u(\"session_request\",r);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);this.events.emit(u(\"session_request\",i.request.id),{error:e})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===A.active){this.client.logger.info(\"session request queue is already active.\");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info(\"session request queue is empty.\");return}try{this.sessionRequestQueue.state=A.active,this.client.events.emit(\"session_request\",t)}catch(e){this.client.logger.error(e)}},this.onPairingCreated=t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const e=this.client.proposal.getAll().find(s=>s.pairingTopic===t.topic);e&&this.onSessionProposeRequest(t.topic,me(\"wc_sessionPropose\",{requiredNamespaces:e.requiredNamespaces,optionalNamespaces:e.optionalNamespaces,relays:e.relays,proposer:e.proposer,sessionProperties:e.sessionProperties},e.id))},this.isValidConnect=async t=>{if(!T(t)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() params: ${JSON.stringify(t)}`);throw new Error(a)}const{pairingTopic:e,requiredNamespaces:s,optionalNamespaces:i,sessionProperties:r,relays:o}=t;if(Y(e)||await this.isValidPairingTopic(e),!St(o,!0)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() relays: ${o}`);throw new Error(a)}!Y(s)&&Ae(s)!==0&&this.validateNamespaces(s,\"requiredNamespaces\"),!Y(i)&&Ae(i)!==0&&this.validateNamespaces(i,\"optionalNamespaces\"),Y(r)||this.validateSessionProps(r,\"sessionProperties\")},this.validateNamespaces=(t,e)=>{const s=Et(t,\"connect()\",e);if(s)throw new Error(s.message)},this.isValidApprove=async t=>{if(!T(t))throw new Error(l(\"MISSING_OR_INVALID\",`approve() params: ${t}`).message);const{id:e,namespaces:s,relayProtocol:i,sessionProperties:r}=t;this.checkRecentlyDeleted(e),await this.isValidProposalId(e);const o=this.client.proposal.get(e),a=ye(s,\"approve()\");if(a)throw new Error(a.message);const c=Ve(o.requiredNamespaces,s,\"approve()\");if(c)throw new Error(c.message);if(!V(i,!0)){const{message:d}=l(\"MISSING_OR_INVALID\",`approve() relayProtocol: ${i}`);throw new Error(d)}Y(r)||this.validateSessionProps(r,\"sessionProperties\")},this.isValidReject=async t=>{if(!T(t)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() params: ${t}`);throw new Error(i)}const{id:e,reason:s}=t;if(this.checkRecentlyDeleted(e),await this.isValidProposalId(e),!_t(s)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() reason: ${JSON.stringify(s)}`);throw new Error(i)}},this.isValidSessionSettleRequest=t=>{if(!T(t)){const{message:c}=l(\"MISSING_OR_INVALID\",`onSessionSettleRequest() params: ${t}`);throw new Error(c)}const{relay:e,controller:s,namespaces:i,expiry:r}=t;if(!Rt(e)){const{message:c}=l(\"MISSING_OR_INVALID\",\"onSessionSettleRequest() relay protocol should be a string\");throw new Error(c)}const o=It(s,\"onSessionSettleRequest()\");if(o)throw new Error(o.message);const a=ye(i,\"onSessionSettleRequest()\");if(a)throw new Error(a.message);if(G(r)){const{message:c}=l(\"EXPIRED\",\"onSessionSettleRequest()\");throw new Error(c)}},this.isValidUpdate=async t=>{if(!T(t)){const{message:a}=l(\"MISSING_OR_INVALID\",`update() params: ${t}`);throw new Error(a)}const{topic:e,namespaces:s}=t;this.checkRecentlyDeleted(e),await this.isValidSessionTopic(e);const i=this.client.session.get(e),r=ye(s,\"update()\");if(r)throw new Error(r.message);const o=Ve(i.requiredNamespaces,s,\"update()\");if(o)throw new Error(o.message)},this.isValidExtend=async t=>{if(!T(t)){const{message:s}=l(\"MISSING_OR_INVALID\",`extend() params: ${t}`);throw new Error(s)}const{topic:e}=t;this.checkRecentlyDeleted(e),await this.isValidSessionTopic(e)},this.isValidRequest=async t=>{if(!T(t)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() params: ${t}`);throw new Error(a)}const{topic:e,request:s,chainId:i,expiry:r}=t;this.checkRecentlyDeleted(e),await this.isValidSessionTopic(e);const{namespaces:o}=this.client.session.get(e);if(!Ce(o,i)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() chainId: ${i}`);throw new Error(a)}if(!ft(s)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() ${JSON.stringify(s)}`);throw new Error(a)}if(!qt(o,i,s.method)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() method: ${s.method}`);throw new Error(a)}if(r&&!Nt(r,re)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() expiry: ${r}. Expiry must be a number (in seconds) between ${re.min} and ${re.max}`);throw new Error(a)}},this.isValidRespond=async t=>{var e;if(!T(t)){const{message:r}=l(\"MISSING_OR_INVALID\",`respond() params: ${t}`);throw new Error(r)}const{topic:s,response:i}=t;try{await this.isValidSessionTopic(s)}catch(r){throw(e=t?.response)!=null&&e.id&&this.cleanupAfterResponse(t),r}if(!Pt(i)){const{message:r}=l(\"MISSING_OR_INVALID\",`respond() response: ${JSON.stringify(i)}`);throw new Error(r)}},this.isValidPing=async t=>{if(!T(t)){const{message:s}=l(\"MISSING_OR_INVALID\",`ping() params: ${t}`);throw new Error(s)}const{topic:e}=t;await this.isValidSessionOrPairingTopic(e)},this.isValidEmit=async t=>{if(!T(t)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() params: ${t}`);throw new Error(o)}const{topic:e,event:s,chainId:i}=t;await this.isValidSessionTopic(e);const{namespaces:r}=this.client.session.get(e);if(!Ce(r,i)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() chainId: ${i}`);throw new Error(o)}if(!vt(s)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(s)}`);throw new Error(o)}if(!Ot(r,i,s.name)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(s)}`);throw new Error(o)}},this.isValidDisconnect=async t=>{if(!T(t)){const{message:s}=l(\"MISSING_OR_INVALID\",`disconnect() params: ${t}`);throw new Error(s)}const{topic:e}=t;await this.isValidSessionOrPairingTopic(e)},this.isValidAuthenticate=t=>{const{chains:e,uri:s,domain:i,nonce:r}=t;if(!Array.isArray(e)||e.length===0)throw new Error(\"chains is required and must be a non-empty array\");if(!V(s,!1))throw new Error(\"uri is required parameter\");if(!V(i,!1))throw new Error(\"domain is required parameter\");if(!V(r,!1))throw new Error(\"nonce is required parameter\");if([...new Set(e.map(a=>ge(a).namespace))].length>1)throw new Error(\"Multi-namespace requests are not supported. Please request single namespace only.\");const{namespace:o}=ge(e[0]);if(o!==\"eip155\")throw new Error(\"Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.\")},this.getVerifyContext=async(t,e)=>{const s={verified:{verifyUrl:e.verifyUrl||st,validation:\"UNKNOWN\",origin:e.url||\"\"}};try{const i=await this.client.core.verify.resolve({attestationId:t,verifyUrl:e.verifyUrl});i&&(s.verified.origin=i.origin,s.verified.isScam=i.isScam,s.verified.validation=i.origin===new URL(e.url).origin?\"VALID\":\"INVALID\")}catch(i){this.client.logger.info(i)}return this.client.logger.info(`Verify context: ${JSON.stringify(s)}`),s},this.validateSessionProps=(t,e)=>{Object.values(t).forEach(s=>{if(!V(s,!1)){const{message:i}=l(\"MISSING_OR_INVALID\",`${e} must be in Record format. Received: ${JSON.stringify(s)}`);throw new Error(i)}})},this.getPendingAuthRequest=t=>{const e=this.client.auth.requests.get(t);return typeof e==\"object\"?e:void 0},this.addToRecentlyDeleted=(t,e)=>{if(this.recentlyDeletedMap.set(t,e),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let s=0;const i=this.recentlyDeletedLimit/2;for(const r of this.recentlyDeletedMap.keys()){if(s++>=i)break;this.recentlyDeletedMap.delete(r)}}},this.checkRecentlyDeleted=t=>{const e=this.recentlyDeletedMap.get(t);if(e){const{message:s}=l(\"MISSING_OR_INVALID\",`Record was recently deleted - ${e}: ${t}`);throw new Error(s)}}}async isInitialized(){if(!this.initialized){const{message:n}=l(\"NOT_INITIALIZED\",this.name);throw new Error(n)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(qe.message,async n=>{const{topic:t,message:e}=n,{publicKey:s}=this.client.auth.authKeys.keys.includes(J)?this.client.auth.authKeys.get(J):{responseTopic:void 0,publicKey:void 0},i=await this.client.core.crypto.decode(t,e,{receiverPublicKey:s});try{Mt(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):Kt(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(r){this.client.logger.error(r)}})}registerExpirerEvents(){this.client.core.expirer.on(it.expired,async n=>{const{topic:t,id:e}=Tt(n.target);if(e&&this.client.pendingRequest.keys.includes(e))return await this.deletePendingSessionRequest(e,l(\"EXPIRED\"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit(\"session_expire\",{topic:t})):e&&(await this.deleteProposal(e,!0),this.client.events.emit(\"proposal_expire\",{id:e}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ne.create,n=>this.onPairingCreated(n)),this.client.core.pairing.events.on(Ne.delete,n=>{this.addToRecentlyDeleted(n.topic,\"pairing\")})}isValidPairingTopic(n){if(!V(n,!1)){const{message:t}=l(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${n}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(n)){const{message:t}=l(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${n}`);throw new Error(t)}if(G(this.client.core.pairing.pairings.get(n).expiry)){const{message:t}=l(\"EXPIRED\",`pairing topic: ${n}`);throw new Error(t)}}async isValidSessionTopic(n){if(!V(n,!1)){const{message:t}=l(\"MISSING_OR_INVALID\",`session topic should be a string: ${n}`);throw new Error(t)}if(this.checkRecentlyDeleted(n),!this.client.session.keys.includes(n)){const{message:t}=l(\"NO_MATCHING_KEY\",`session topic doesn't exist: ${n}`);throw new Error(t)}if(G(this.client.session.get(n).expiry)){await this.deleteSession({topic:n});const{message:t}=l(\"EXPIRED\",`session topic: ${n}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(n)){const{message:t}=l(\"MISSING_OR_INVALID\",`session topic does not exist in keychain: ${n}`);throw await this.deleteSession({topic:n}),new Error(t)}}async isValidSessionOrPairingTopic(n){if(this.checkRecentlyDeleted(n),this.client.session.keys.includes(n))await this.isValidSessionTopic(n);else if(this.client.core.pairing.pairings.keys.includes(n))this.isValidPairingTopic(n);else if(V(n,!1)){const{message:t}=l(\"NO_MATCHING_KEY\",`session or pairing topic doesn't exist: ${n}`);throw new Error(t)}else{const{message:t}=l(\"MISSING_OR_INVALID\",`session or pairing topic should be a string: ${n}`);throw new Error(t)}}async isValidProposalId(n){if(!Dt(n)){const{message:t}=l(\"MISSING_OR_INVALID\",`proposal id should be a number: ${n}`);throw new Error(t)}if(!this.client.proposal.keys.includes(n)){const{message:t}=l(\"NO_MATCHING_KEY\",`proposal id doesn't exist: ${n}`);throw new Error(t)}if(G(this.client.proposal.get(n).expiryTimestamp)){await this.deleteProposal(n);const{message:t}=l(\"EXPIRED\",`proposal id: ${n}`);throw new Error(t)}}}class Zt extends K{constructor(n,t){super(n,t,Ke,se),this.core=n,this.logger=t}}class We extends K{constructor(n,t){super(n,t,Ge,se),this.core=n,this.logger=t}}class es extends K{constructor(n,t){super(n,t,Fe,se,e=>e.id),this.core=n,this.logger=t}}class ts extends K{constructor(n,t){super(n,t,He,X,()=>J),this.core=n,this.logger=t}}class ss extends K{constructor(n,t){super(n,t,Ye,X),this.core=n,this.logger=t}}class is extends K{constructor(n,t){super(n,t,Xe,X,e=>e.id),this.core=n,this.logger=t}}class rs{constructor(n,t){this.core=n,this.logger=t,this.authKeys=new ts(this.core,this.logger),this.pairingTopics=new ss(this.core,this.logger),this.requests=new is(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class ne extends ht{constructor(n){super(n),this.protocol=Se,this.version=Ee,this.name=ie.name,this.events=new Vt,this.on=(e,s)=>this.events.on(e,s),this.once=(e,s)=>this.events.once(e,s),this.off=(e,s)=>this.events.off(e,s),this.removeListener=(e,s)=>this.events.removeListener(e,s),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(s){throw this.logger.error(s.message),s}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(s){throw this.logger.error(s.message),s}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(s){throw this.logger.error(s.message),s}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(s){throw this.logger.error(s.message),s}},this.update=async e=>{try{return await this.engine.update(e)}catch(s){throw this.logger.error(s.message),s}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(s){throw this.logger.error(s.message),s}},this.request=async e=>{try{return await this.engine.request(e)}catch(s){throw this.logger.error(s.message),s}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(s){throw this.logger.error(s.message),s}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(s){throw this.logger.error(s.message),s}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(s){throw this.logger.error(s.message),s}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(s){throw this.logger.error(s.message),s}},this.find=e=>{try{return this.engine.find(e)}catch(s){throw this.logger.error(s.message),s}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.authenticate=async e=>{try{return await this.engine.authenticate(e)}catch(s){throw this.logger.error(s.message),s}},this.formatAuthMessage=e=>{try{return this.engine.formatAuthMessage(e)}catch(s){throw this.logger.error(s.message),s}},this.approveSessionAuthenticate=async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(s){throw this.logger.error(s.message),s}},this.rejectSessionAuthenticate=async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(s){throw this.logger.error(s.message),s}},this.name=n?.name||ie.name,this.metadata=n?.metadata||xt();const t=typeof n?.logger<\"u\"&&typeof n?.logger!=\"string\"?n.logger:nt(ot({level:n?.logger||ie.logger}));this.core=n?.core||new rt(n),this.logger=at(t,this.name),this.session=new We(this.core,this.logger),this.proposal=new Zt(this.core,this.logger),this.pendingRequest=new es(this.core,this.logger),this.engine=new Wt(this),this.auth=new rs(this.core,this.logger)}static async init(n){const t=new ne(n);return await t.initialize(),t}get context(){return ct(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\"Initialized\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info(\"SignClient Initialization Success\")}catch(n){throw this.logger.info(\"SignClient Initialization Failure\"),this.logger.error(n.message),n}}}const ns=We,os=ne;export{ze as AUTH_CONTEXT,He as AUTH_KEYS_CONTEXT,Ye as AUTH_PAIRING_TOPIC_CONTEXT,Qe as AUTH_PROTOCOL,J as AUTH_PUBLIC_KEY_NAME,Xe as AUTH_REQUEST_CONTEXT,X as AUTH_STORAGE_PREFIX,zt as AUTH_VERSION,ke as ENGINE_CONTEXT,A as ENGINE_QUEUE_STATES,q as ENGINE_RPC_OPTS,Ft as HISTORY_CONTEXT,kt as HISTORY_EVENTS,jt as HISTORY_STORAGE_VERSION,je as METHODS_TO_VERIFY,Ke as PROPOSAL_CONTEXT,Qt as PROPOSAL_EXPIRY,Ue as PROPOSAL_EXPIRY_MESSAGE,Fe as REQUEST_CONTEXT,Ge as SESSION_CONTEXT,L as SESSION_EXPIRY,re as SESSION_REQUEST_EXPIRY_BOUNDARIES,_e as SIGN_CLIENT_CONTEXT,ie as SIGN_CLIENT_DEFAULT,Ut as SIGN_CLIENT_EVENTS,Se as SIGN_CLIENT_PROTOCOL,Gt as SIGN_CLIENT_STORAGE_OPTIONS,se as SIGN_CLIENT_STORAGE_PREFIX,Ee as SIGN_CLIENT_VERSION,ns as SessionStore,os as SignClient,Re as WALLETCONNECT_DEEPLINK_CHOICE,ne as default};\n//# sourceMappingURL=index.es.js.map\n","import Tg,{PROPOSAL_EXPIRY_MESSAGE as Lg}from\"@walletconnect/sign-client\";import{isValidObject as Dg,isCaipNamespace as Aa,parseNamespaceKey as de,mergeArrays as $i,parseChainId as Ng,getSdkError as Ca,isValidArray as Ia}from\"@walletconnect/utils\";import{pino as Hg,getDefaultLoggerOptions as $g}from\"@walletconnect/logger\";import At,{HttpConnection as Ug}from\"@walletconnect/jsonrpc-http-connection\";import{JsonRpcProvider as ot}from\"@walletconnect/jsonrpc-provider\";import Wg from\"events\";import{formatJsonRpcResult as Fg}from\"@walletconnect/jsonrpc-utils\";const xa=\"error\",Mg=\"wss://relay.walletconnect.com\",qg=\"wc\",Bg=\"universal_provider\",Ea=`${qg}@2:${Bg}:`,Gg=\"https://rpc.walletconnect.com/v1/\",Vn={DEFAULT_CHAIN_CHANGED:\"default_chain_changed\"};var ge=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{},Ui={exports:{}};/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(A,u){(function(){var i,p=\"4.17.21\",w=200,b=\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\",D=\"Expected a function\",En=\"Invalid `variable` option passed into `_.template`\",zt=\"__lodash_hash_undefined__\",pr=500,It=\"__lodash_placeholder__\",Ln=1,Fn=2,xt=4,Et=1,ve=2,vn=1,ct=2,Bi=4,Dn=8,yt=16,Nn=32,St=64,Mn=128,Kt=256,dr=512,Na=30,Ha=\"...\",$a=800,Ua=16,Gi=1,Wa=2,Fa=3,ht=1/0,kn=9007199254740991,Ma=17976931348623157e292,_e=0/0,Hn=4294967295,qa=Hn-1,Ba=Hn>>>1,Ga=[[\"ary\",Mn],[\"bind\",vn],[\"bindKey\",ct],[\"curry\",Dn],[\"curryRight\",yt],[\"flip\",dr],[\"partial\",Nn],[\"partialRight\",St],[\"rearg\",Kt]],Ot=\"[object Arguments]\",me=\"[object Array]\",za=\"[object AsyncFunction]\",Yt=\"[object Boolean]\",Zt=\"[object Date]\",Ka=\"[object DOMException]\",we=\"[object Error]\",Pe=\"[object Function]\",zi=\"[object GeneratorFunction]\",yn=\"[object Map]\",Jt=\"[object Number]\",Ya=\"[object Null]\",qn=\"[object Object]\",Ki=\"[object Promise]\",Za=\"[object Proxy]\",Xt=\"[object RegExp]\",Sn=\"[object Set]\",Qt=\"[object String]\",Ae=\"[object Symbol]\",Ja=\"[object Undefined]\",Vt=\"[object WeakMap]\",Xa=\"[object WeakSet]\",kt=\"[object ArrayBuffer]\",Rt=\"[object DataView]\",gr=\"[object Float32Array]\",vr=\"[object Float64Array]\",_r=\"[object Int8Array]\",mr=\"[object Int16Array]\",wr=\"[object Int32Array]\",Pr=\"[object Uint8Array]\",Ar=\"[object Uint8ClampedArray]\",Cr=\"[object Uint16Array]\",Ir=\"[object Uint32Array]\",Qa=/\\b__p \\+= '';/g,Va=/\\b(__p \\+=) '' \\+/g,ka=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,Yi=/&(?:amp|lt|gt|quot|#39);/g,Zi=/[&<>\"']/g,ja=RegExp(Yi.source),no=RegExp(Zi.source),to=/<%-([\\s\\S]+?)%>/g,eo=/<%([\\s\\S]+?)%>/g,Ji=/<%=([\\s\\S]+?)%>/g,ro=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,io=/^\\w*$/,so=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,xr=/[\\\\^$.*+?()[\\]{}|]/g,uo=RegExp(xr.source),Er=/^\\s+/,ao=/\\s/,oo=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,fo=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,co=/,? & /,ho=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,lo=/[()=,{}\\[\\]\\/\\s]/,po=/\\\\(\\\\)?/g,go=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Xi=/\\w*$/,vo=/^[-+]0x[0-9a-f]+$/i,_o=/^0b[01]+$/i,mo=/^\\[object .+?Constructor\\]$/,wo=/^0o[0-7]+$/i,Po=/^(?:0|[1-9]\\d*)$/,Ao=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ce=/($^)/,Co=/['\\n\\r\\u2028\\u2029\\\\]/g,Ie=\"\\\\ud800-\\\\udfff\",Io=\"\\\\u0300-\\\\u036f\",xo=\"\\\\ufe20-\\\\ufe2f\",Eo=\"\\\\u20d0-\\\\u20ff\",Qi=Io+xo+Eo,Vi=\"\\\\u2700-\\\\u27bf\",ki=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",yo=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\",So=\"\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\",Oo=\"\\\\u2000-\\\\u206f\",Ro=\" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",ji=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",ns=\"\\\\ufe0e\\\\ufe0f\",ts=yo+So+Oo+Ro,yr=\"['\\u2019]\",bo=\"[\"+Ie+\"]\",es=\"[\"+ts+\"]\",xe=\"[\"+Qi+\"]\",rs=\"\\\\d+\",To=\"[\"+Vi+\"]\",is=\"[\"+ki+\"]\",ss=\"[^\"+Ie+ts+rs+Vi+ki+ji+\"]\",Sr=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",Lo=\"(?:\"+xe+\"|\"+Sr+\")\",us=\"[^\"+Ie+\"]\",Or=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",Rr=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",bt=\"[\"+ji+\"]\",as=\"\\\\u200d\",os=\"(?:\"+is+\"|\"+ss+\")\",Do=\"(?:\"+bt+\"|\"+ss+\")\",fs=\"(?:\"+yr+\"(?:d|ll|m|re|s|t|ve))?\",cs=\"(?:\"+yr+\"(?:D|LL|M|RE|S|T|VE))?\",hs=Lo+\"?\",ls=\"[\"+ns+\"]?\",No=\"(?:\"+as+\"(?:\"+[us,Or,Rr].join(\"|\")+\")\"+ls+hs+\")*\",Ho=\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",$o=\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",ps=ls+hs+No,Uo=\"(?:\"+[To,Or,Rr].join(\"|\")+\")\"+ps,Wo=\"(?:\"+[us+xe+\"?\",xe,Or,Rr,bo].join(\"|\")+\")\",Fo=RegExp(yr,\"g\"),Mo=RegExp(xe,\"g\"),br=RegExp(Sr+\"(?=\"+Sr+\")|\"+Wo+ps,\"g\"),qo=RegExp([bt+\"?\"+is+\"+\"+fs+\"(?=\"+[es,bt,\"$\"].join(\"|\")+\")\",Do+\"+\"+cs+\"(?=\"+[es,bt+os,\"$\"].join(\"|\")+\")\",bt+\"?\"+os+\"+\"+fs,bt+\"+\"+cs,$o,Ho,rs,Uo].join(\"|\"),\"g\"),Bo=RegExp(\"[\"+as+Ie+Qi+ns+\"]\"),Go=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zo=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTime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y\",\\u00FF:\"y\",\\u00C6:\"Ae\",\\u00E6:\"ae\",\\u00DE:\"Th\",\\u00FE:\"th\",\\u00DF:\"ss\",\\u0100:\"A\",\\u0102:\"A\",\\u0104:\"A\",\\u0101:\"a\",\\u0103:\"a\",\\u0105:\"a\",\\u0106:\"C\",\\u0108:\"C\",\\u010A:\"C\",\\u010C:\"C\",\\u0107:\"c\",\\u0109:\"c\",\\u010B:\"c\",\\u010D:\"c\",\\u010E:\"D\",\\u0110:\"D\",\\u010F:\"d\",\\u0111:\"d\",\\u0112:\"E\",\\u0114:\"E\",\\u0116:\"E\",\\u0118:\"E\",\\u011A:\"E\",\\u0113:\"e\",\\u0115:\"e\",\\u0117:\"e\",\\u0119:\"e\",\\u011B:\"e\",\\u011C:\"G\",\\u011E:\"G\",\\u0120:\"G\",\\u0122:\"G\",\\u011D:\"g\",\\u011F:\"g\",\\u0121:\"g\",\\u0123:\"g\",\\u0124:\"H\",\\u0126:\"H\",\\u0125:\"h\",\\u0127:\"h\",\\u0128:\"I\",\\u012A:\"I\",\\u012C:\"I\",\\u012E:\"I\",\\u0130:\"I\",\\u0129:\"i\",\\u012B:\"i\",\\u012D:\"i\",\\u012F:\"i\",\\u0131:\"i\",\\u0134:\"J\",\\u0135:\"j\",\\u0136:\"K\",\\u0137:\"k\",\\u0138:\"k\",\\u0139:\"L\",\\u013B:\"L\",\\u013D:\"L\",\\u013F:\"L\",\\u0141:\"L\",\\u013A:\"l\",\\u013C:\"l\",\\u013E:\"l\",\\u0140:\"l\",\\u0142:\"l\",\\u0143:\"N\",\\u0145:\"N\",\\u0147:\"N\",\\u014A:\"N\",\\u0144:\"n\",\\u0146:\"n\",\\u0148:\"n\",\\u014B:\"n\",\\u014C:\"O\",\\u014E:\"O\",\\u0150:\"O\",\\u014D:\"o\",\\u014F:\"o\",\\u0151:\"o\",\\u0154:\"R\",\\u0156:\"R\",\\u0158:\"R\",\\u0155:\"r\",\\u0157:\"r\",\\u0159:\"r\",\\u015A:\"S\",\\u015C:\"S\",\\u015E:\"S\",\\u0160:\"S\",\\u015B:\"s\",\\u015D:\"s\",\\u015F:\"s\",\\u0161:\"s\",\\u0162:\"T\",\\u0164:\"T\",\\u0166:\"T\",\\u0163:\"t\",\\u0165:\"t\",\\u0167:\"t\",\\u0168:\"U\",\\u016A:\"U\",\\u016C:\"U\",\\u016E:\"U\",\\u0170:\"U\",\\u0172:\"U\",\\u0169:\"u\",\\u016B:\"u\",\\u016D:\"u\",\\u016F:\"u\",\\u0171:\"u\",\\u0173:\"u\",\\u0174:\"W\",\\u0175:\"w\",\\u0176:\"Y\",\\u0177:\"y\",\\u0178:\"Y\",\\u0179:\"Z\",\\u017B:\"Z\",\\u017D:\"Z\",\\u017A:\"z\",\\u017C:\"z\",\\u017E:\"z\",\\u0132:\"IJ\",\\u0133:\"ij\",\\u0152:\"Oe\",\\u0153:\"oe\",\\u0149:\"'n\",\\u017F:\"s\"},Zo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},Jo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"},Xo={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Qo=parseFloat,Vo=parseInt,ds=typeof ge==\"object\"&&ge&&ge.Object===Object&&ge,ko=typeof self==\"object\"&&self&&self.Object===Object&&self,k=ds||ko||Function(\"return this\")(),Tr=u&&!u.nodeType&&u,lt=Tr&&!0&&A&&!A.nodeType&&A,gs=lt&<.exports===Tr,Lr=gs&&ds.process,_n=function(){try{var h=lt&<.require&<.require(\"util\").types;return h||Lr&&Lr.binding&&Lr.binding(\"util\")}catch{}}(),vs=_n&&_n.isArrayBuffer,_s=_n&&_n.isDate,ms=_n&&_n.isMap,ws=_n&&_n.isRegExp,Ps=_n&&_n.isSet,As=_n&&_n.isTypedArray;function cn(h,g,d){switch(d.length){case 0:return h.call(g);case 1:return h.call(g,d[0]);case 2:return h.call(g,d[0],d[1]);case 3:return h.call(g,d[0],d[1],d[2])}return h.apply(g,d)}function jo(h,g,d,C){for(var S=-1,U=h==null?0:h.length;++S-1}function Dr(h,g,d){for(var C=-1,S=h==null?0:h.length;++C-1;);return d}function Rs(h,g){for(var d=h.length;d--&&Tt(g,h[d],0)>-1;);return d}function ff(h,g){for(var d=h.length,C=0;d--;)h[d]===g&&++C;return C}var cf=Ur(Yo),hf=Ur(Zo);function lf(h){return\"\\\\\"+Xo[h]}function pf(h,g){return h==null?i:h[g]}function Lt(h){return Bo.test(h)}function df(h){return Go.test(h)}function gf(h){for(var g,d=[];!(g=h.next()).done;)d.push(g.value);return d}function qr(h){var g=-1,d=Array(h.size);return h.forEach(function(C,S){d[++g]=[S,C]}),d}function bs(h,g){return function(d){return h(g(d))}}function tt(h,g){for(var d=-1,C=h.length,S=0,U=[];++d-1}function ec(n,t){var e=this.__data__,r=Be(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}Bn.prototype.clear=kf,Bn.prototype.delete=jf,Bn.prototype.get=nc,Bn.prototype.has=tc,Bn.prototype.set=ec;function Gn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function An(n,t,e,r,s,o){var f,c=t&Ln,l=t&Fn,v=t&xt;if(e&&(f=s?e(n,r,s,o):e(n)),f!==i)return f;if(!K(n))return n;var _=O(n);if(_){if(f=uh(n),!c)return un(n,f)}else{var m=tn(n),P=m==Pe||m==zi;if(at(n))return lu(n,c);if(m==qn||m==Ot||P&&!s){if(f=l||P?{}:Tu(n),!c)return l?Xc(n,mc(f,n)):Jc(n,Bs(f,n))}else{if(!q[m])return s?n:{};f=ah(n,m,c)}}o||(o=new Rn);var I=o.get(n);if(I)return I;o.set(n,f),ua(n)?n.forEach(function(y){f.add(An(y,t,e,y,n,o))}):ia(n)&&n.forEach(function(y,N){f.set(N,An(y,t,e,N,n,o))});var E=v?l?pi:li:l?on:V,T=_?i:E(n);return mn(T||n,function(y,N){T&&(N=y,y=n[N]),se(f,N,An(y,t,e,N,n,o))}),f}function wc(n){var t=V(n);return function(e){return Gs(e,n,t)}}function Gs(n,t,e){var r=e.length;if(n==null)return!r;for(n=M(n);r--;){var s=e[r],o=t[s],f=n[s];if(f===i&&!(s in n)||!o(f))return!1}return!0}function zs(n,t,e){if(typeof n!=\"function\")throw new wn(D);return le(function(){n.apply(i,e)},t)}function ue(n,t,e,r){var s=-1,o=Ee,f=!0,c=n.length,l=[],v=t.length;if(!c)return l;e&&(t=G(t,hn(e))),r?(o=Dr,f=!1):t.length>=w&&(o=jt,f=!1,t=new gt(t));n:for(;++ss?0:s+e),r=r===i||r>s?s:R(r),r<0&&(r+=s),r=e>r?0:oa(r);e0&&e(c)?t>1?j(c,t-1,e,r,s):nt(s,c):r||(s[s.length]=c)}return s}var Jr=mu(),Zs=mu(!0);function $n(n,t){return n&&Jr(n,t,V)}function Xr(n,t){return n&&Zs(n,t,V)}function ze(n,t){return jn(t,function(e){return Jn(n[e])})}function _t(n,t){t=st(t,n);for(var e=0,r=t.length;n!=null&&et}function Cc(n,t){return n!=null&&F.call(n,t)}function Ic(n,t){return n!=null&&t in M(n)}function xc(n,t,e){return n>=nn(t,e)&&n=120&&_.length>=120)?new gt(f&&_):i}_=n[0];var m=-1,P=c[0];n:for(;++m-1;)c!==n&&He.call(c,l,1),He.call(n,l,1);return n}function iu(n,t){for(var e=n?t.length:0,r=e-1;e--;){var s=t[e];if(e==r||s!==o){var o=s;Zn(s)?He.call(n,s,1):si(n,s)}}return n}function ei(n,t){return n+We(Ws()*(t-n+1))}function Uc(n,t,e,r){for(var s=-1,o=Q(Ue((t-n)/(e||1)),0),f=d(o);o--;)f[r?o:++s]=n,n+=e;return f}function ri(n,t){var e=\"\";if(!n||t<1||t>kn)return e;do t%2&&(e+=n),t=We(t/2),t&&(n+=n);while(t);return e}function L(n,t){return Pi(Nu(n,t,fn),n+\"\")}function Wc(n){return qs(Gt(n))}function Fc(n,t){var e=Gt(n);return tr(e,vt(t,0,e.length))}function fe(n,t,e,r){if(!K(n))return n;t=st(t,n);for(var s=-1,o=t.length,f=o-1,c=n;c!=null&&++ss?0:s+t),e=e>s?s:e,e<0&&(e+=s),s=t>e?0:e-t>>>0,t>>>=0;for(var o=d(s);++r>>1,f=n[o];f!==null&&!pn(f)&&(e?f<=t:f=w){var v=t?null:jc(n);if(v)return Se(v);f=!1,s=jt,l=new gt}else l=t?[]:c;n:for(;++r=r?n:Cn(n,t,e)}var hu=bf||function(n){return k.clearTimeout(n)};function lu(n,t){if(t)return n.slice();var e=n.length,r=Ds?Ds(e):new n.constructor(e);return n.copy(r),r}function fi(n){var t=new n.constructor(n.byteLength);return new De(t).set(new De(n)),t}function zc(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function Kc(n){var t=new n.constructor(n.source,Xi.exec(n));return t.lastIndex=n.lastIndex,t}function Yc(n){return ie?M(ie.call(n)):{}}function pu(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function du(n,t){if(n!==t){var e=n!==i,r=n===null,s=n===n,o=pn(n),f=t!==i,c=t===null,l=t===t,v=pn(t);if(!c&&!v&&!o&&n>t||o&&f&&l&&!c&&!v||r&&f&&l||!e&&l||!s)return 1;if(!r&&!o&&!v&&n=c)return l;var v=e[r];return l*(v==\"desc\"?-1:1)}}return n.index-t.index}function gu(n,t,e,r){for(var s=-1,o=n.length,f=e.length,c=-1,l=t.length,v=Q(o-f,0),_=d(l+v),m=!r;++c1?e[s-1]:i,f=s>2?e[2]:i;for(o=n.length>3&&typeof o==\"function\"?(s--,o):i,f&&rn(e[0],e[1],f)&&(o=s<3?i:o,s=1),t=M(t);++r-1?s[o?t[f]:f]:i}}function Au(n){return Yn(function(t){var e=t.length,r=e,s=Pn.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if(typeof o!=\"function\")throw new wn(D);if(s&&!f&&je(o)==\"wrapper\")var f=new Pn([],!0)}for(r=f?r:e;++r1&&$.reverse(),_&&lc))return!1;var v=o.get(n),_=o.get(t);if(v&&_)return v==t&&_==n;var m=-1,P=!0,I=e&ve?new gt:i;for(o.set(n,t),o.set(t,n);++m1?\"& \":\"\")+t[r],t=t.join(e>2?\", \":\" \"),n.replace(oo,`{\n/* [wrapped with `+t+`] */\n`)}function fh(n){return O(n)||Pt(n)||!!($s&&n&&n[$s])}function Zn(n,t){var e=typeof n;return t=t??kn,!!t&&(e==\"number\"||e!=\"symbol\"&&Po.test(n))&&n>-1&&n%1==0&&n0){if(++t>=$a)return arguments[0]}else t=0;return n.apply(i,arguments)}}function tr(n,t){var e=-1,r=n.length,s=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e=typeof e==\"function\"?(n.pop(),e):i,Yu(n,e)});function Zu(n){var t=a(n);return t.__chain__=!0,t}function Pl(n,t){return t(n),n}function er(n,t){return t(n)}var Al=Yn(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,s=function(o){return Zr(o,n)};return t>1||this.__actions__.length||!(r instanceof H)||!Zn(e)?this.thru(s):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:er,args:[s],thisArg:i}),new Pn(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(i),o}))});function Cl(){return Zu(this)}function Il(){return new Pn(this.value(),this.__chain__)}function xl(){this.__values__===i&&(this.__values__=aa(this.value()));var n=this.__index__>=this.__values__.length,t=n?i:this.__values__[this.__index__++];return{done:n,value:t}}function El(){return this}function yl(n){for(var t,e=this;e instanceof qe;){var r=Mu(e);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;e=e.__wrapped__}return s.__wrapped__=n,t}function Sl(){var n=this.__wrapped__;if(n instanceof H){var t=n;return this.__actions__.length&&(t=new H(this)),t=t.reverse(),t.__actions__.push({func:er,args:[Ai],thisArg:i}),new Pn(t,this.__chain__)}return this.thru(Ai)}function Ol(){return fu(this.__wrapped__,this.__actions__)}var Rl=Je(function(n,t,e){F.call(n,e)?++n[e]:zn(n,e,1)});function bl(n,t,e){var r=O(n)?Cs:Pc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}function Tl(n,t){var e=O(n)?jn:Ys;return e(n,x(t,3))}var Ll=Pu(qu),Dl=Pu(Bu);function Nl(n,t){return j(rr(n,t),1)}function Hl(n,t){return j(rr(n,t),ht)}function $l(n,t,e){return e=e===i?1:R(e),j(rr(n,t),e)}function Ju(n,t){var e=O(n)?mn:rt;return e(n,x(t,3))}function Xu(n,t){var e=O(n)?nf:Ks;return e(n,x(t,3))}var Ul=Je(function(n,t,e){F.call(n,e)?n[e].push(t):zn(n,e,[t])});function Wl(n,t,e,r){n=an(n)?n:Gt(n),e=e&&!r?R(e):0;var s=n.length;return e<0&&(e=Q(s+e,0)),or(n)?e<=s&&n.indexOf(t,e)>-1:!!s&&Tt(n,t,e)>-1}var Fl=L(function(n,t,e){var r=-1,s=typeof t==\"function\",o=an(n)?d(n.length):[];return rt(n,function(f){o[++r]=s?cn(t,f,e):ae(f,t,e)}),o}),Ml=Je(function(n,t,e){zn(n,e,t)});function rr(n,t){var e=O(n)?G:ks;return e(n,x(t,3))}function ql(n,t,e,r){return n==null?[]:(O(t)||(t=t==null?[]:[t]),e=r?i:e,O(e)||(e=e==null?[]:[e]),eu(n,t,e))}var Bl=Je(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function Gl(n,t,e){var r=O(n)?Nr:ys,s=arguments.length<3;return r(n,x(t,4),e,s,rt)}function zl(n,t,e){var r=O(n)?tf:ys,s=arguments.length<3;return r(n,x(t,4),e,s,Ks)}function Kl(n,t){var e=O(n)?jn:Ys;return e(n,ur(x(t,3)))}function Yl(n){var t=O(n)?qs:Wc;return t(n)}function Zl(n,t,e){(e?rn(n,t,e):t===i)?t=1:t=R(t);var r=O(n)?gc:Fc;return r(n,t)}function Jl(n){var t=O(n)?vc:qc;return t(n)}function Xl(n){if(n==null)return 0;if(an(n))return or(n)?Dt(n):n.length;var t=tn(n);return t==yn||t==Sn?n.size:jr(n).length}function Ql(n,t,e){var r=O(n)?Hr:Bc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}var Vl=L(function(n,t){if(n==null)return[];var e=t.length;return e>1&&rn(n,t[0],t[1])?t=[]:e>2&&rn(t[0],t[1],t[2])&&(t=[t[0]]),eu(n,j(t,1),[])}),ir=Tf||function(){return k.Date.now()};function kl(n,t){if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){if(--n<1)return t.apply(this,arguments)}}function Qu(n,t,e){return t=e?i:t,t=n&&t==null?n.length:t,Kn(n,Mn,i,i,i,i,t)}function Vu(n,t){var e;if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Ii=L(function(n,t,e){var r=vn;if(e.length){var s=tt(e,qt(Ii));r|=Nn}return Kn(n,r,t,e,s)}),ku=L(function(n,t,e){var r=vn|ct;if(e.length){var s=tt(e,qt(ku));r|=Nn}return Kn(t,r,n,e,s)});function ju(n,t,e){t=e?i:t;var r=Kn(n,Dn,i,i,i,i,i,t);return r.placeholder=ju.placeholder,r}function na(n,t,e){t=e?i:t;var r=Kn(n,yt,i,i,i,i,i,t);return r.placeholder=na.placeholder,r}function ta(n,t,e){var r,s,o,f,c,l,v=0,_=!1,m=!1,P=!0;if(typeof n!=\"function\")throw new wn(D);t=xn(t)||0,K(e)&&(_=!!e.leading,m=\"maxWait\"in e,o=m?Q(xn(e.maxWait)||0,t):o,P=\"trailing\"in e?!!e.trailing:P);function I(J){var Tn=r,Qn=s;return r=s=i,v=J,f=n.apply(Qn,Tn),f}function E(J){return v=J,c=le(N,t),_?I(J):f}function T(J){var Tn=J-l,Qn=J-v,Pa=t-Tn;return m?nn(Pa,o-Qn):Pa}function y(J){var Tn=J-l,Qn=J-v;return l===i||Tn>=t||Tn<0||m&&Qn>=o}function N(){var J=ir();if(y(J))return $(J);c=le(N,T(J))}function $(J){return c=i,P&&r?I(J):(r=s=i,f)}function dn(){c!==i&&hu(c),v=0,r=l=s=c=i}function sn(){return c===i?f:$(ir())}function gn(){var J=ir(),Tn=y(J);if(r=arguments,s=this,l=J,Tn){if(c===i)return E(l);if(m)return hu(c),c=le(N,t),I(l)}return c===i&&(c=le(N,t)),f}return gn.cancel=dn,gn.flush=sn,gn}var jl=L(function(n,t){return zs(n,1,t)}),np=L(function(n,t,e){return zs(n,xn(t)||0,e)});function tp(n){return Kn(n,dr)}function sr(n,t){if(typeof n!=\"function\"||t!=null&&typeof t!=\"function\")throw new wn(D);var e=function(){var r=arguments,s=t?t.apply(this,r):r[0],o=e.cache;if(o.has(s))return o.get(s);var f=n.apply(this,r);return e.cache=o.set(s,f)||o,f};return e.cache=new(sr.Cache||Gn),e}sr.Cache=Gn;function ur(n){if(typeof n!=\"function\")throw new wn(D);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function ep(n){return Vu(2,n)}var rp=Gc(function(n,t){t=t.length==1&&O(t[0])?G(t[0],hn(x())):G(j(t,1),hn(x()));var e=t.length;return L(function(r){for(var s=-1,o=nn(r.length,e);++s=t}),Pt=Xs(function(){return arguments}())?Xs:function(n){return Y(n)&&F.call(n,\"callee\")&&!Hs.call(n,\"callee\")},O=d.isArray,mp=vs?hn(vs):yc;function an(n){return n!=null&&ar(n.length)&&!Jn(n)}function Z(n){return Y(n)&&an(n)}function wp(n){return n===!0||n===!1||Y(n)&&en(n)==Yt}var at=Df||Hi,Pp=_s?hn(_s):Sc;function Ap(n){return Y(n)&&n.nodeType===1&&!pe(n)}function Cp(n){if(n==null)return!0;if(an(n)&&(O(n)||typeof n==\"string\"||typeof n.splice==\"function\"||at(n)||Bt(n)||Pt(n)))return!n.length;var t=tn(n);if(t==yn||t==Sn)return!n.size;if(he(n))return!jr(n).length;for(var e in n)if(F.call(n,e))return!1;return!0}function Ip(n,t){return oe(n,t)}function xp(n,t,e){e=typeof e==\"function\"?e:i;var r=e?e(n,t):i;return r===i?oe(n,t,i,e):!!r}function Ei(n){if(!Y(n))return!1;var t=en(n);return t==we||t==Ka||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!pe(n)}function Ep(n){return typeof n==\"number\"&&Us(n)}function Jn(n){if(!K(n))return!1;var t=en(n);return t==Pe||t==zi||t==za||t==Za}function ra(n){return typeof n==\"number\"&&n==R(n)}function ar(n){return typeof n==\"number\"&&n>-1&&n%1==0&&n<=kn}function K(n){var t=typeof n;return n!=null&&(t==\"object\"||t==\"function\")}function Y(n){return n!=null&&typeof n==\"object\"}var ia=ms?hn(ms):Rc;function yp(n,t){return n===t||kr(n,t,gi(t))}function Sp(n,t,e){return e=typeof e==\"function\"?e:i,kr(n,t,gi(t),e)}function Op(n){return sa(n)&&n!=+n}function Rp(n){if(lh(n))throw new S(b);return Qs(n)}function bp(n){return n===null}function Tp(n){return n==null}function sa(n){return typeof n==\"number\"||Y(n)&&en(n)==Jt}function pe(n){if(!Y(n)||en(n)!=qn)return!1;var t=Ne(n);if(t===null)return!0;var e=F.call(t,\"constructor\")&&t.constructor;return typeof e==\"function\"&&e instanceof e&&be.call(e)==Sf}var yi=ws?hn(ws):bc;function Lp(n){return ra(n)&&n>=-kn&&n<=kn}var ua=Ps?hn(Ps):Tc;function or(n){return typeof n==\"string\"||!O(n)&&Y(n)&&en(n)==Qt}function pn(n){return typeof n==\"symbol\"||Y(n)&&en(n)==Ae}var Bt=As?hn(As):Lc;function Dp(n){return n===i}function Np(n){return Y(n)&&tn(n)==Vt}function Hp(n){return Y(n)&&en(n)==Xa}var $p=ke(ni),Up=ke(function(n,t){return n<=t});function aa(n){if(!n)return[];if(an(n))return or(n)?On(n):un(n);if(ne&&n[ne])return gf(n[ne]());var t=tn(n),e=t==yn?qr:t==Sn?Se:Gt;return e(n)}function Xn(n){if(!n)return n===0?n:0;if(n=xn(n),n===ht||n===-ht){var t=n<0?-1:1;return t*Ma}return n===n?n:0}function R(n){var t=Xn(n),e=t%1;return t===t?e?t-e:t:0}function oa(n){return n?vt(R(n),0,Hn):0}function xn(n){if(typeof n==\"number\")return n;if(pn(n))return _e;if(K(n)){var t=typeof n.valueOf==\"function\"?n.valueOf():n;n=K(t)?t+\"\":t}if(typeof n!=\"string\")return n===0?n:+n;n=Ss(n);var e=_o.test(n);return e||wo.test(n)?Vo(n.slice(2),e?2:8):vo.test(n)?_e:+n}function fa(n){return Un(n,on(n))}function Wp(n){return n?vt(R(n),-kn,kn):n===0?n:0}function W(n){return n==null?\"\":ln(n)}var Fp=Ft(function(n,t){if(he(t)||an(t)){Un(t,V(t),n);return}for(var e in t)F.call(t,e)&&se(n,e,t[e])}),ca=Ft(function(n,t){Un(t,on(t),n)}),fr=Ft(function(n,t,e,r){Un(t,on(t),n,r)}),Mp=Ft(function(n,t,e,r){Un(t,V(t),n,r)}),qp=Yn(Zr);function Bp(n,t){var e=Wt(n);return t==null?e:Bs(e,t)}var Gp=L(function(n,t){n=M(n);var e=-1,r=t.length,s=r>2?t[2]:i;for(s&&rn(t[0],t[1],s)&&(r=1);++e1),o}),Un(n,pi(n),e),r&&(e=An(e,Ln|Fn|xt,nh));for(var s=t.length;s--;)si(e,t[s]);return e});function ad(n,t){return la(n,ur(x(t)))}var od=Yn(function(n,t){return n==null?{}:Hc(n,t)});function la(n,t){if(n==null)return{};var e=G(pi(n),function(r){return[r]});return t=x(t),ru(n,e,function(r,s){return t(r,s[0])})}function fd(n,t,e){t=st(t,n);var r=-1,s=t.length;for(s||(s=1,n=i);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var s=Ws();return nn(n+s*(t-n+Qo(\"1e-\"+((s+\"\").length-1))),t)}return ei(n,t)}var Pd=Mt(function(n,t,e){return t=t.toLowerCase(),n+(e?ga(t):t)});function ga(n){return Ri(W(n).toLowerCase())}function va(n){return n=W(n),n&&n.replace(Ao,cf).replace(Mo,\"\")}function Ad(n,t,e){n=W(n),t=ln(t);var r=n.length;e=e===i?r:vt(R(e),0,r);var s=e;return e-=t.length,e>=0&&n.slice(e,s)==t}function Cd(n){return n=W(n),n&&no.test(n)?n.replace(Zi,hf):n}function Id(n){return n=W(n),n&&uo.test(n)?n.replace(xr,\"\\\\$&\"):n}var xd=Mt(function(n,t,e){return n+(e?\"-\":\"\")+t.toLowerCase()}),Ed=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toLowerCase()}),yd=wu(\"toLowerCase\");function Sd(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;if(!t||r>=t)return n;var s=(t-r)/2;return Ve(We(s),e)+n+Ve(Ue(s),e)}function Od(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;return t&&r>>0,e?(n=W(n),n&&(typeof t==\"string\"||t!=null&&!yi(t))&&(t=ln(t),!t&&Lt(n))?ut(On(n),0,e):n.split(t,e)):[]}var Hd=Mt(function(n,t,e){return n+(e?\" \":\"\")+Ri(t)});function $d(n,t,e){return n=W(n),e=e==null?0:vt(R(e),0,n.length),t=ln(t),n.slice(e,e+t.length)==t}function Ud(n,t,e){var r=a.templateSettings;e&&rn(n,t,e)&&(t=i),n=W(n),t=fr({},t,r,yu);var s=fr({},t.imports,r.imports,yu),o=V(s),f=Mr(s,o),c,l,v=0,_=t.interpolate||Ce,m=\"__p += '\",P=Br((t.escape||Ce).source+\"|\"+_.source+\"|\"+(_===Ji?go:Ce).source+\"|\"+(t.evaluate||Ce).source+\"|$\",\"g\"),I=\"//# sourceURL=\"+(F.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++Ko+\"]\")+`\n`;n.replace(P,function(y,N,$,dn,sn,gn){return $||($=dn),m+=n.slice(v,gn).replace(Co,lf),N&&(c=!0,m+=`' +\n__e(`+N+`) +\n'`),sn&&(l=!0,m+=`';\n`+sn+`;\n__p += '`),$&&(m+=`' +\n((__t = (`+$+`)) == null ? '' : __t) +\n'`),v=gn+y.length,y}),m+=`';\n`;var E=F.call(t,\"variable\")&&t.variable;if(!E)m=`with (obj) {\n`+m+`\n}\n`;else if(lo.test(E))throw new S(En);m=(l?m.replace(Qa,\"\"):m).replace(Va,\"$1\").replace(ka,\"$1;\"),m=\"function(\"+(E||\"obj\")+`) {\n`+(E?\"\":`obj || (obj = {});\n`)+\"var __t, __p = ''\"+(c?\", __e = _.escape\":\"\")+(l?`, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n`:`;\n`)+m+`return __p\n}`;var T=ma(function(){return U(o,I+\"return \"+m).apply(i,f)});if(T.source=m,Ei(T))throw T;return T}function Wd(n){return W(n).toLowerCase()}function Fd(n){return W(n).toUpperCase()}function Md(n,t,e){if(n=W(n),n&&(e||t===i))return Ss(n);if(!n||!(t=ln(t)))return n;var r=On(n),s=On(t),o=Os(r,s),f=Rs(r,s)+1;return ut(r,o,f).join(\"\")}function qd(n,t,e){if(n=W(n),n&&(e||t===i))return n.slice(0,Ts(n)+1);if(!n||!(t=ln(t)))return n;var r=On(n),s=Rs(r,On(t))+1;return ut(r,0,s).join(\"\")}function Bd(n,t,e){if(n=W(n),n&&(e||t===i))return n.replace(Er,\"\");if(!n||!(t=ln(t)))return n;var r=On(n),s=Os(r,On(t));return ut(r,s).join(\"\")}function Gd(n,t){var e=Na,r=Ha;if(K(t)){var s=\"separator\"in t?t.separator:s;e=\"length\"in t?R(t.length):e,r=\"omission\"in t?ln(t.omission):r}n=W(n);var o=n.length;if(Lt(n)){var f=On(n);o=f.length}if(e>=o)return n;var c=e-Dt(r);if(c<1)return r;var l=f?ut(f,0,c).join(\"\"):n.slice(0,c);if(s===i)return l+r;if(f&&(c+=l.length-c),yi(s)){if(n.slice(c).search(s)){var v,_=l;for(s.global||(s=Br(s.source,W(Xi.exec(s))+\"g\")),s.lastIndex=0;v=s.exec(_);)var m=v.index;l=l.slice(0,m===i?c:m)}}else if(n.indexOf(ln(s),c)!=c){var P=l.lastIndexOf(s);P>-1&&(l=l.slice(0,P))}return l+r}function zd(n){return n=W(n),n&&ja.test(n)?n.replace(Yi,wf):n}var Kd=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toUpperCase()}),Ri=wu(\"toUpperCase\");function _a(n,t,e){return n=W(n),t=e?i:t,t===i?df(n)?Cf(n):sf(n):n.match(t)||[]}var ma=L(function(n,t){try{return cn(n,i,t)}catch(e){return Ei(e)?e:new S(e)}}),Yd=Yn(function(n,t){return mn(t,function(e){e=Wn(e),zn(n,e,Ii(n[e],n))}),n});function Zd(n){var t=n==null?0:n.length,e=x();return n=t?G(n,function(r){if(typeof r[1]!=\"function\")throw new wn(D);return[e(r[0]),r[1]]}):[],L(function(r){for(var s=-1;++skn)return[];var e=Hn,r=nn(n,Hn);t=x(t),n-=Hn;for(var s=Fr(r,t);++e0||t<0)?new H(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(t=R(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},H.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},H.prototype.toArray=function(){return this.take(Hn)},$n(H.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=a[r?\"take\"+(t==\"last\"?\"Right\":\"\"):t],o=r||/^find/.test(t);s&&(a.prototype[t]=function(){var f=this.__wrapped__,c=r?[1]:arguments,l=f instanceof H,v=c[0],_=l||O(f),m=function(N){var $=s.apply(a,nt([N],c));return r&&P?$[0]:$};_&&e&&typeof v==\"function\"&&v.length!=1&&(l=_=!1);var P=this.__chain__,I=!!this.__actions__.length,E=o&&!P,T=l&&!I;if(!o&&_){f=T?f:new H(this);var y=n.apply(f,c);return y.__actions__.push({func:er,args:[m],thisArg:i}),new Pn(y,P)}return E&&T?n.apply(this,c):(y=this.thru(m),E?r?y.value()[0]:y.value():y)})}),mn([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=Oe[n],e=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",r=/^(?:pop|shift)$/.test(n);a.prototype[n]=function(){var s=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(O(o)?o:[],s)}return this[e](function(f){return t.apply(O(f)?f:[],s)})}}),$n(H.prototype,function(n,t){var e=a[t];if(e){var r=e.name+\"\";F.call(Ut,r)||(Ut[r]=[]),Ut[r].push({name:t,func:e})}}),Ut[Xe(i,ct).name]=[{name:\"wrapper\",func:i}],H.prototype.clone=zf,H.prototype.reverse=Kf,H.prototype.value=Yf,a.prototype.at=Al,a.prototype.chain=Cl,a.prototype.commit=Il,a.prototype.next=xl,a.prototype.plant=yl,a.prototype.reverse=Sl,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Ol,a.prototype.first=a.prototype.head,ne&&(a.prototype[ne]=El),a},Nt=If();lt?((lt.exports=Nt)._=Nt,Tr._=Nt):k._=Nt}).call(ge)})(Ui,Ui.exports);var zg=Object.defineProperty,Kg=Object.defineProperties,Yg=Object.getOwnPropertyDescriptors,ya=Object.getOwnPropertySymbols,Zg=Object.prototype.hasOwnProperty,Jg=Object.prototype.propertyIsEnumerable,Sa=(A,u,i)=>u in A?zg(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,cr=(A,u)=>{for(var i in u||(u={}))Zg.call(u,i)&&Sa(A,i,u[i]);if(ya)for(var i of ya(u))Jg.call(u,i)&&Sa(A,i,u[i]);return A},Xg=(A,u)=>Kg(A,Yg(u));function ft(A,u,i){var p;const w=Ng(A);return((p=u.rpcMap)==null?void 0:p[w.reference])||`${Gg}?chainId=${w.namespace}:${w.reference}&projectId=${i}`}function Ct(A){return A.includes(\":\")?A.split(\":\")[1]:A}function Oa(A){return A.map(u=>`${u.split(\":\")[0]}:${u.split(\":\")[1]}`)}function Qg(A,u){const i=Object.keys(u.namespaces).filter(w=>w.includes(A));if(!i.length)return[];const p=[];return i.forEach(w=>{const b=u.namespaces[w].accounts;p.push(...b)}),p}function Wi(A={},u={}){const i=Ra(A),p=Ra(u);return Ui.exports.merge(i,p)}function Ra(A){var u,i,p,w;const b={};if(!Dg(A))return b;for(const[D,En]of Object.entries(A)){const zt=Aa(D)?[D]:En.chains,pr=En.methods||[],It=En.events||[],Ln=En.rpcMap||{},Fn=de(D);b[Fn]=Xg(cr(cr({},b[Fn]),En),{chains:$i(zt,(u=b[Fn])==null?void 0:u.chains),methods:$i(pr,(i=b[Fn])==null?void 0:i.methods),events:$i(It,(p=b[Fn])==null?void 0:p.events),rpcMap:cr(cr({},Ln),(w=b[Fn])==null?void 0:w.rpcMap)})}return b}function Vg(A){return A.includes(\":\")?A.split(\":\")[2]:A}function ba(A){const u={};for(const[i,p]of Object.entries(A)){const w=p.methods||[],b=p.events||[],D=p.accounts||[],En=Aa(i)?[i]:p.chains?p.chains:Oa(p.accounts);u[i]={chains:En,methods:w,events:b,accounts:D}}return u}function Fi(A){return typeof A==\"number\"?A:A.includes(\"0x\")?parseInt(A,16):(A=A.includes(\":\")?A.split(\":\")[1]:A,isNaN(Number(A))?A:Number(A))}const Ta={},z=A=>Ta[A],Mi=(A,u)=>{Ta[A]=u};class kg{constructor(u){this.name=\"polkadot\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=Ct(i);u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class jg{constructor(u){this.name=\"eip155\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(u){switch(u.request.method){case\"eth_requestAccounts\":return this.getAccounts();case\"eth_accounts\":return this.getAccounts();case\"wallet_switchEthereumChain\":return await this.handleSwitchChain(u);case\"eth_chainId\":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(u.request.method)?await this.client.request(u):this.getHttpProvider().request(u.request)}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(parseInt(u),i),this.chainId=parseInt(u),this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}createHttpProvider(u,i){const p=i||ft(`${this.name}:${u}`,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new Ug(p,z(\"disableProviderPing\")))}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=parseInt(Ct(i));u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}getHttpProvider(){const u=this.chainId,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}async handleSwitchChain(u){var i,p;let w=u.request.params?(i=u.request.params[0])==null?void 0:i.chainId:\"0x0\";w=w.startsWith(\"0x\")?w:`0x${w}`;const b=parseInt(w,16);if(this.isChainApproved(b))this.setDefaultChain(`${b}`);else if(this.namespace.methods.includes(\"wallet_switchEthereumChain\"))await this.client.request({topic:u.topic,request:{method:u.request.method,params:[{chainId:w}]},chainId:(p=this.namespace.chains)==null?void 0:p[0]}),this.setDefaultChain(`${b}`);else throw new Error(`Failed to switch to chain 'eip155:${b}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(u){return this.namespace.chains.includes(`${this.name}:${u}`)}}class nv{constructor(u){this.name=\"solana\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=Ct(i);u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class tv{constructor(u){this.name=\"cosmos\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=Ct(i);u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class ev{constructor(u){this.name=\"cip34\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{const p=this.getCardanoRPCUrl(i),w=Ct(i);u[w]=this.createHttpProvider(w,p)}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}getCardanoRPCUrl(u){const i=this.namespace.rpcMap;if(i)return i[u]}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||this.getCardanoRPCUrl(u);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class rv{constructor(u){this.name=\"elrond\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=Ct(i);u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class iv{constructor(u){this.name=\"multiversx\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;const w=Ct(i);u[w]=this.createHttpProvider(w,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace,this.client.core.projectId);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(p,z(\"disableProviderPing\")))}}class sv{constructor(u){this.name=\"near\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){if(this.chainId=u,!this.httpProviders[u]){const p=i||ft(`${this.name}:${u}`,this.namespace);if(!p)throw new Error(`No RPC url provided for chainId: ${u}`);this.setHttpProvider(u,p)}this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var p;u[i]=this.createHttpProvider(i,(p=this.namespace.rpcMap)==null?void 0:p[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const p=this.createHttpProvider(u,i);p&&(this.httpProviders[u]=p)}createHttpProvider(u,i){const p=i||ft(u,this.namespace);return typeof p>\"u\"?void 0:new ot(new At(p,z(\"disableProviderPing\")))}}var uv=Object.defineProperty,av=Object.defineProperties,ov=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,Da=(A,u,i)=>u in A?uv(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,hr=(A,u)=>{for(var i in u||(u={}))fv.call(u,i)&&Da(A,i,u[i]);if(La)for(var i of La(u))cv.call(u,i)&&Da(A,i,u[i]);return A},qi=(A,u)=>av(A,ov(u));class lr{constructor(u){this.events=new Wg,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=u,this.logger=typeof u?.logger<\"u\"&&typeof u?.logger!=\"string\"?u.logger:Hg($g({level:u?.logger||xa})),this.disableProviderPing=u?.disableProviderPing||!1}static async init(u){const i=new lr(u);return await i.initialize(),i}async request(u,i,p){const[w,b]=this.validateChain(i);if(!this.session)throw new Error(\"Please call connect() before request()\");return await this.getProvider(w).request({request:hr({},u),chainId:`${w}:${b}`,topic:this.session.topic,expiry:p})}sendAsync(u,i,p,w){const b=new Date().getTime();this.request(u,p,w).then(D=>i(null,Fg(b,D))).catch(D=>i(D,void 0))}async enable(){if(!this.client)throw new Error(\"Sign Client not initialized\");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var u;if(!this.session)throw new Error(\"Please call connect() before enable()\");await this.client.disconnect({topic:(u=this.session)==null?void 0:u.topic,reason:Ca(\"USER_DISCONNECTED\")}),await this.cleanup()}async connect(u){if(!this.client)throw new Error(\"Sign Client not initialized\");if(this.setNamespaces(u),await this.cleanupPendingPairings(),!u.skipPairing)return await this.pair(u.pairingTopic)}async authenticate(u){if(!this.client)throw new Error(\"Sign Client not initialized\");this.setNamespaces(u),await this.cleanupPendingPairings();const{uri:i,response:p}=await this.client.authenticate(u);i&&(this.uri=i,this.events.emit(\"display_uri\",i));const w=await p();if(this.session=w.session,this.session){const b=ba(this.session.namespaces);this.namespaces=Wi(this.namespaces,b),this.persist(\"namespaces\",this.namespaces),this.onConnect()}return w}on(u,i){this.events.on(u,i)}once(u,i){this.events.once(u,i)}removeListener(u,i){this.events.removeListener(u,i)}off(u,i){this.events.off(u,i)}get isWalletConnect(){return!0}async pair(u){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error(\"Pairing aborted\");if(i>=this.maxPairingAttempts)throw new Error(\"Max auto pairing attempts reached\");const{uri:p,approval:w}=await this.client.connect({pairingTopic:u,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});p&&(this.uri=p,this.events.emit(\"display_uri\",p)),await w().then(b=>{this.session=b;const D=ba(b.namespaces);this.namespaces=Wi(this.namespaces,D),this.persist(\"namespaces\",this.namespaces)}).catch(b=>{if(b.message!==Lg)throw b;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(u,i){try{if(!this.session)return;const[p,w]=this.validateChain(u);this.getProvider(p).setDefaultChain(w,i)}catch(p){if(!/Please call connect/.test(p.message))throw p}}async cleanupPendingPairings(u={}){this.logger.info(\"Cleaning up inactive pairings...\");const i=this.client.pairing.getAll();if(Ia(i)){for(const p of i)u.deletePairings?this.client.core.expirer.set(p.topic,0):await this.client.core.relayer.subscriber.unsubscribe(p.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore(\"namespaces\"),this.optionalNamespaces=await this.getFromStore(\"optionalNamespaces\")||{},this.client.session.length){const u=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[u]),this.createProviders()}}async initialize(){this.logger.trace(\"Initialized\"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Tg.init({logger:this.providerOpts.logger||xa,relayUrl:this.providerOpts.relayUrl||Mg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace(\"SignClient Initialized\")}createProviders(){if(!this.client)throw new Error(\"Sign Client not initialized\");if(!this.session)throw new Error(\"Session not initialized. Please call connect() before enable()\");const u=[...new Set(Object.keys(this.session.namespaces).map(i=>de(i)))];Mi(\"client\",this.client),Mi(\"events\",this.events),Mi(\"disableProviderPing\",this.disableProviderPing),u.forEach(i=>{if(!this.session)return;const p=Qg(i,this.session),w=Oa(p),b=Wi(this.namespaces,this.optionalNamespaces),D=qi(hr({},b[i]),{accounts:p,chains:w});switch(i){case\"eip155\":this.rpcProviders[i]=new jg({namespace:D});break;case\"solana\":this.rpcProviders[i]=new nv({namespace:D});break;case\"cosmos\":this.rpcProviders[i]=new tv({namespace:D});break;case\"polkadot\":this.rpcProviders[i]=new kg({namespace:D});break;case\"cip34\":this.rpcProviders[i]=new ev({namespace:D});break;case\"elrond\":this.rpcProviders[i]=new rv({namespace:D});break;case\"multiversx\":this.rpcProviders[i]=new iv({namespace:D});break;case\"near\":this.rpcProviders[i]=new sv({namespace:D});break}})}registerEventListeners(){if(typeof this.client>\"u\")throw new Error(\"Sign Client is not initialized\");this.client.on(\"session_ping\",u=>{this.events.emit(\"session_ping\",u)}),this.client.on(\"session_event\",u=>{const{params:i}=u,{event:p}=i;if(p.name===\"accountsChanged\"){const w=p.data;w&&Ia(w)&&this.events.emit(\"accountsChanged\",w.map(Vg))}else if(p.name===\"chainChanged\"){const w=i.chainId,b=i.event.data,D=de(w),En=Fi(w)!==Fi(b)?`${D}:${Fi(b)}`:w;this.onChainChanged(En)}else this.events.emit(p.name,p.data);this.events.emit(\"session_event\",u)}),this.client.on(\"session_update\",({topic:u,params:i})=>{var p;const{namespaces:w}=i,b=(p=this.client)==null?void 0:p.session.get(u);this.session=qi(hr({},b),{namespaces:w}),this.onSessionUpdate(),this.events.emit(\"session_update\",{topic:u,params:i})}),this.client.on(\"session_delete\",async u=>{await this.cleanup(),this.events.emit(\"session_delete\",u),this.events.emit(\"disconnect\",qi(hr({},Ca(\"USER_DISCONNECTED\")),{data:u.topic}))}),this.on(Vn.DEFAULT_CHAIN_CHANGED,u=>{this.onChainChanged(u,!0)})}getProvider(u){if(!this.rpcProviders[u])throw new Error(`Provider not found: ${u}`);return this.rpcProviders[u]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(u=>{var i;this.getProvider(u).updateNamespace((i=this.session)==null?void 0:i.namespaces[u])})}setNamespaces(u){const{namespaces:i,optionalNamespaces:p,sessionProperties:w}=u;i&&Object.keys(i).length&&(this.namespaces=i),p&&Object.keys(p).length&&(this.optionalNamespaces=p),this.sessionProperties=w,this.persist(\"namespaces\",i),this.persist(\"optionalNamespaces\",p)}validateChain(u){const[i,p]=u?.split(\":\")||[\"\",\"\"];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,p];if(i&&!Object.keys(this.namespaces||{}).map(D=>de(D)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&p)return[i,p];const w=de(Object.keys(this.namespaces)[0]),b=this.rpcProviders[w].getDefaultChain();return[w,b]}async requestAccounts(){const[u]=this.validateChain();return await this.getProvider(u).requestAccounts()}onChainChanged(u,i=!1){if(!this.namespaces)return;const[p,w]=this.validateChain(u);w&&(i||this.getProvider(p).setDefaultChain(w),this.namespaces[p]?this.namespaces[p].defaultChain=w:this.namespaces[`${p}:${w}`]?this.namespaces[`${p}:${w}`].defaultChain=w:this.namespaces[`${p}:${w}`]={defaultChain:w},this.persist(\"namespaces\",this.namespaces),this.events.emit(\"chainChanged\",w))}onConnect(){this.createProviders(),this.events.emit(\"connect\",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist(\"namespaces\",void 0),this.persist(\"optionalNamespaces\",void 0),this.persist(\"sessionProperties\",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(u,i){this.client.core.storage.setItem(`${Ea}/${u}`,i)}async getFromStore(u){return await this.client.core.storage.getItem(`${Ea}/${u}`)}}const hv=lr;export{hv as UniversalProvider,lr as default};\n//# sourceMappingURL=index.es.js.map\n","import{EventEmitter as A}from\"events\";import{getAccountsFromNamespaces as y,getSdkError as P,isValidArray as f}from\"@walletconnect/utils\";import{UniversalProvider as R}from\"@walletconnect/universal-provider\";const T=\"wc\",S=\"ethereum_provider\",$=`${T}@2:${S}:`,j=\"https://rpc.walletconnect.com/v1/\",u=[\"eth_sendTransaction\",\"personal_sign\"],_=[\"eth_accounts\",\"eth_requestAccounts\",\"eth_sendRawTransaction\",\"eth_sign\",\"eth_signTransaction\",\"eth_signTypedData\",\"eth_signTypedData_v3\",\"eth_signTypedData_v4\",\"eth_sendTransaction\",\"personal_sign\",\"wallet_switchEthereumChain\",\"wallet_addEthereumChain\",\"wallet_getPermissions\",\"wallet_requestPermissions\",\"wallet_registerOnboarding\",\"wallet_watchAsset\",\"wallet_scanQRCode\"],g=[\"chainChanged\",\"accountsChanged\"],M=[\"chainChanged\",\"accountsChanged\",\"message\",\"disconnect\",\"connect\"];var q=Object.defineProperty,N=Object.defineProperties,D=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,b=(a,t,s)=>t in a?q(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,p=(a,t)=>{for(var s in t||(t={}))U.call(t,s)&&b(a,s,t[s]);if(O)for(var s of O(t))Q.call(t,s)&&b(a,s,t[s]);return a},E=(a,t)=>N(a,D(t));function m(a){return Number(a[0].split(\":\")[1])}function v(a){return`0x${a.toString(16)}`}function L(a){const{chains:t,optionalChains:s,methods:i,optionalMethods:n,events:e,optionalEvents:o,rpcMap:r}=a;if(!f(t))throw new Error(\"Invalid chains\");const c={chains:t,methods:i||u,events:e||g,rpcMap:p({},t.length?{[m(t)]:r[m(t)]}:{})},h=e?.filter(l=>!g.includes(l)),d=i?.filter(l=>!u.includes(l));if(!s&&!o&&!n&&!(h!=null&&h.length)&&!(d!=null&&d.length))return{required:t.length?c:void 0};const I=h?.length&&d?.length||!s,w={chains:[...new Set(I?c.chains.concat(s||[]):s)],methods:[...new Set(c.methods.concat(n!=null&&n.length?n:_))],events:[...new Set(c.events.concat(o!=null&&o.length?o:M))],rpcMap:r};return{required:t.length?c:void 0,optional:s.length?w:void 0}}class C{constructor(){this.events=new A,this.namespace=\"eip155\",this.accounts=[],this.chainId=1,this.STORAGE_KEY=$,this.on=(t,s)=>(this.events.on(t,s),this),this.once=(t,s)=>(this.events.once(t,s),this),this.removeListener=(t,s)=>(this.events.removeListener(t,s),this),this.off=(t,s)=>(this.events.off(t,s),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const s=new C;return await s.initialize(t),s}async request(t,s){return await this.signer.request(t,this.formatChainId(this.chainId),s)}sendAsync(t,s,i){this.signer.sendAsync(t,s,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:\"eth_requestAccounts\"})}async connect(t){if(!this.signer.client)throw new Error(\"Provider not initialized. Call init() first\");this.loadConnectOpts(t);const{required:s,optional:i}=L(this.rpc);try{const n=await new Promise(async(o,r)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(h=>{!h.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),r(new Error(\"Connection request reset. Please try again.\")))})),await this.signer.connect(E(p({namespaces:p({},s&&{[this.namespace]:s})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:t?.pairingTopic})).then(h=>{o(h)}).catch(h=>{r(new Error(h.message))})});if(!n)return;const e=y(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit(\"connect\",{chainId:v(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async authenticate(t){if(!this.signer.client)throw new Error(\"Provider not initialized. Call init() first\");this.loadConnectOpts({chains:t?.chains});try{const s=await new Promise(async(n,e)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(r=>{!r.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),e(new Error(\"Connection request reset. Please try again.\")))})),await this.signer.authenticate(E(p({},t),{chains:this.rpc.chains})).then(r=>{n(r)}).catch(r=>{e(new Error(r.message))})}),i=s.session;if(i){const n=y(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:n),this.setAccounts(n),this.events.emit(\"connect\",{chainId:v(this.chainId)})}return s}catch(s){throw this.signer.logger.error(s),s}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on(\"session_event\",t=>{const{params:s}=t,{event:i}=s;i.name===\"accountsChanged\"?(this.accounts=this.parseAccounts(i.data),this.events.emit(\"accountsChanged\",this.accounts)):i.name===\"chainChanged\"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit(\"session_event\",t)}),this.signer.on(\"chainChanged\",t=>{const s=parseInt(t);this.chainId=s,this.events.emit(\"chainChanged\",v(this.chainId)),this.persist()}),this.signer.on(\"session_update\",t=>{this.events.emit(\"session_update\",t)}),this.signer.on(\"session_delete\",t=>{this.reset(),this.events.emit(\"session_delete\",t),this.events.emit(\"disconnect\",E(p({},P(\"USER_DISCONNECTED\")),{data:t.topic,name:\"USER_DISCONNECTED\"}))}),this.signer.on(\"display_uri\",t=>{var s,i;this.rpc.showQrModal&&((s=this.modal)==null||s.closeModal(),(i=this.modal)==null||i.openModal({uri:t})),this.events.emit(\"display_uri\",t)})}switchEthereumChain(t){this.request({method:\"wallet_switchEthereumChain\",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t==\"string\"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(\":\")[1])}setChainIds(t){const s=t.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));s.length&&(this.chainId=s[0],this.events.emit(\"chainChanged\",v(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const s=this.parseChainId(t);this.chainId=s,this.switchEthereumChain(s)}}parseAccountId(t){const[s,i,n]=t.split(\":\");return{chainId:`${s}:${i}`,address:n}}setAccounts(t){this.accounts=t.filter(s=>this.parseChainId(this.parseAccountId(s).chainId)===this.chainId).map(s=>this.parseAccountId(s).address),this.events.emit(\"accountsChanged\",this.accounts)}getRpcConfig(t){var s,i;const n=(s=t?.chains)!=null?s:[],e=(i=t?.optionalChains)!=null?i:[],o=n.concat(e);if(!o.length)throw new Error(\"No chains specified in either `chains` or `optionalChains`\");const r=n.length?t?.methods||u:[],c=n.length?t?.events||g:[],h=t?.optionalMethods||[],d=t?.optionalEvents||[],I=t?.rpcMap||this.buildRpcMap(o,t.projectId),w=t?.qrModalOptions||void 0;return{chains:n?.map(l=>this.formatChainId(l)),optionalChains:e.map(l=>this.formatChainId(l)),methods:r,events:c,optionalMethods:h,optionalEvents:d,rpcMap:I,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:w,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,s){const i={};return t.forEach(n=>{i[n]=this.getRpcUrl(n,s)}),i}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?m(this.rpc.chains):m(this.rpc.optionalChains),this.signer=await R.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let s;try{const{WalletConnectModal:i}=await import(\"@walletconnect/modal\");s=i}catch{throw new Error(\"To use QR modal, please install @walletconnect/modal package\")}if(s)try{this.modal=new s(p({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error(\"Could not generate WalletConnectModal Instance\")}}}loadConnectOpts(t){if(!t)return;const{chains:s,optionalChains:i,rpcMap:n}=t;s&&f(s)&&(this.rpc.chains=s.map(e=>this.formatChainId(e)),s.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})),i&&f(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i?.map(e=>this.formatChainId(e)),i.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))}getRpcUrl(t,s){var i;return((i=this.rpc.rpcMap)==null?void 0:i[t])||`${j}?chainId=eip155:${t}&projectId=${s||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),s=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:s?.accounts),this.setAccounts(s?.accounts)}catch(t){this.signer.logger.error(\"Failed to load persisted session, clearing state...\"),this.signer.logger.error(t),await this.disconnect().catch(s=>this.signer.logger.warn(s))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t==\"string\"||t instanceof String?[this.parseAccount(t)]:t.map(s=>this.parseAccount(s))}}const z=C;export{z as EthereumProvider,M as OPTIONAL_EVENTS,_ as OPTIONAL_METHODS,g as REQUIRED_EVENTS,u as REQUIRED_METHODS,C as default};\n//# sourceMappingURL=index.es.js.map\n","import icons from './icons'\nimport { networks } from '../../index'\nimport type { EIP1193Provider } from './EIP6963'\nimport type { EvmNetworkConfigInterface, Provider } from '../../services/Provider'\nimport { EthereumProvider } from '@walletconnect/ethereum-provider'\nimport { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types'\nimport type { WalletConnectConfig, WalletAdapterInterface } from '@multiplechain/types'\n\nlet isConnected = false\nlet walletProvider: EIP1193Provider | undefined\nlet connector: InstanceType | undefined\n\nconst initConnector = async (\n config: WalletConnectConfig,\n network: EvmNetworkConfigInterface\n): Promise> => {\n if (connector !== undefined) {\n return connector\n }\n\n const otherNetworkIds = networks\n .getAll()\n .map((x) => x.id)\n .filter((id) => id !== network.id)\n\n const chains: [number, ...number[]] = [network.id, ...otherNetworkIds]\n\n connector = await EthereumProvider.init({\n chains,\n projectId: config.projectId,\n relayUrl: 'wss://relay.walletconnect.com',\n optionalChains: chains,\n showQrModal: true,\n qrModalOptions: {\n themeMode: config.themeMode,\n themeVariables: {\n '--wcm-z-index': '999999999999'\n },\n explorerExcludedWalletIds: 'ALL',\n explorerRecommendedWalletIds: [\n 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',\n '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0',\n '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369',\n '0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150',\n '971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709',\n 'c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a',\n 'ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18',\n 'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef',\n 'bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6',\n '74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d',\n 'afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7',\n '20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66',\n '8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e',\n 'c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576',\n '38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662',\n '85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041'\n ]\n }\n })\n\n return connector\n}\n\nconst WalletConnect: WalletAdapterInterface = {\n id: 'walletconnect',\n name: 'WalletConnect',\n icon: icons.walletConnect,\n provider: walletProvider,\n platforms: [WalletPlatformEnum.UNIVERSAL],\n isDetected: () => true,\n isConnected: () => isConnected,\n disconnect: () => {\n isConnected = false\n Object.keys(localStorage)\n .filter((x) => {\n return (\n x.startsWith('wc@2') ||\n x.startsWith('@w3m') ||\n x.startsWith('W3M') ||\n x.startsWith('-walletlink')\n )\n })\n .forEach((x) => {\n localStorage.removeItem(x)\n })\n\n indexedDB.deleteDatabase('WALLET_CONNECT_V2_INDEXED_DB')\n },\n connect: async (\n provider?: Provider,\n config?: WalletConnectConfig\n ): Promise => {\n if (provider === undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_REQUIRED)\n }\n\n if (config === undefined) {\n throw new Error(ErrorTypeEnum.CONFIG_IS_REQUIRED)\n }\n\n if (config.projectId === undefined) {\n throw new Error(ErrorTypeEnum.PROJECT_ID_IS_REQUIRED)\n }\n\n const rpcIdMapping = {}\n const network = provider.network\n // @ts-expect-error allow number index\n rpcIdMapping[network.id] = network.rpcUrl\n const connector = await initConnector(config, network)\n\n return await new Promise((resolve, reject) => {\n connector\n .connect({\n rpcMap: rpcIdMapping,\n chains: [network.id],\n optionalChains: [network.id]\n })\n .then(() => {\n isConnected = true\n resolve((walletProvider = connector as EIP1193Provider))\n })\n .catch((error) => {\n reject(error)\n })\n })\n }\n}\n\nexport default WalletConnect\n","import { Wallet } from './Wallet'\nimport { switcher } from './adapters/switcher'\nimport * as adapterList from './adapters/index'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { EIP6963ProviderDetail, EIP1193Provider } from './adapters/EIP6963'\nimport type {\n WalletAdapterInterface,\n WalletAdapterListType,\n RegisterWalletAdapterType\n} from '@multiplechain/types'\nimport type { Provider } from '../services/Provider'\n\nconst EIP6963AdapterUUIDIndex: Record = {\n 'app.phantom': 'phantom',\n 'io.metamask': 'metamask',\n 'com.bitget.web3': 'bitgetwallet',\n 'com.okex.wallet': 'okxwallet',\n 'com.trustwallet.app': 'trustwallet',\n 'io.xdefi': 'xdefiwallet'\n}\n\nconst adapters: WalletAdapterListType = {}\n\nconst registerAdapter: RegisterWalletAdapterType = (\n adapter: WalletAdapterInterface\n): void => {\n if (EIP6963AdapterUUIDIndex[adapter.id] !== undefined) {\n console.warn(\n `Adapter is not registered, because it is already registered default: ${adapter.id}`\n )\n return\n }\n\n if (Object.values(adapters).find((a) => a.id === adapter.id) !== undefined) {\n throw new Error(`Adapter with id ${adapter.id} already exists`)\n }\n\n adapters[adapter.id] = adapter\n}\n\nconst fromEIP6963ProviderDetail = (\n detail: EIP6963ProviderDetail\n): WalletAdapterInterface => {\n return {\n name: detail.info.name,\n icon: detail.info.icon,\n provider: detail.provider,\n id: detail.info.rdns ?? detail.info.uuid,\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => true,\n isConnected: async () => {\n return Boolean((await detail.provider.request({ method: 'eth_accounts' })).length)\n },\n connect: async (): Promise => {\n return await new Promise((resolve, reject) => {\n try {\n detail.provider\n .request({ method: 'eth_requestAccounts' })\n .then(() => {\n resolve(detail.provider)\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n }\n}\n\nconst toEIP6963ProviderDetail = (\n adapter: WalletAdapterInterface\n): EIP6963ProviderDetail => {\n if (adapter.provider === undefined) {\n throw new Error('Cannot convert adapter without provider to EIP6963ProviderDetail')\n }\n\n return {\n info: {\n uuid: adapter.id,\n name: adapter.name,\n icon: adapter.icon\n },\n provider: adapter.provider as any\n }\n}\n\nexport * from '../index'\n\nexport const browser = {\n Wallet,\n switcher,\n registerAdapter,\n toEIP6963ProviderDetail,\n fromEIP6963ProviderDetail,\n adapters: Object.assign(adapters, adapterList)\n}\n","export const ConstantsUtil = {\n FIVE_MINUTES_IN_MS: 300000\n};\n//# sourceMappingURL=ConstantsUtil.js.map","import { AccountController, NetworkController, ConnectionController, RouterUtil } from '@web3modal/core';\nimport { NetworkUtil } from '@web3modal/common';\nimport { ConstantsUtil } from '../core/utils/ConstantsUtil.js';\nexport class Web3ModalSIWEClient {\n constructor(siweConfig) {\n const { enabled = true, nonceRefetchIntervalMs = ConstantsUtil.FIVE_MINUTES_IN_MS, sessionRefetchIntervalMs = ConstantsUtil.FIVE_MINUTES_IN_MS, signOutOnAccountChange = true, signOutOnDisconnect = true, signOutOnNetworkChange = true, ...siweConfigMethods } = siweConfig;\n this.options = {\n enabled,\n nonceRefetchIntervalMs,\n sessionRefetchIntervalMs,\n signOutOnDisconnect,\n signOutOnAccountChange,\n signOutOnNetworkChange\n };\n this.methods = siweConfigMethods;\n }\n async getNonce(address) {\n const nonce = await this.methods.getNonce(address);\n if (!nonce) {\n throw new Error('siweControllerClient:getNonce - nonce is undefined');\n }\n return nonce;\n }\n createMessage(args) {\n const message = this.methods.createMessage(args);\n if (!message) {\n throw new Error('siweControllerClient:createMessage - message is undefined');\n }\n return message;\n }\n async verifyMessage(args) {\n const isValid = await this.methods.verifyMessage(args);\n return isValid;\n }\n async getSession() {\n const session = await this.methods.getSession();\n if (!session) {\n throw new Error('siweControllerClient:getSession - session is undefined');\n }\n return session;\n }\n async signIn() {\n const { address } = AccountController.state;\n const nonce = await this.methods.getNonce(address);\n if (!address) {\n throw new Error('An address is required to create a SIWE message.');\n }\n const chainId = NetworkUtil.caipNetworkIdToNumber(NetworkController.state.caipNetwork?.id);\n if (!chainId) {\n throw new Error('A chainId is required to create a SIWE message.');\n }\n const message = this.methods.createMessage({ address, nonce, chainId });\n const signature = await ConnectionController.signMessage(message);\n const isValid = await this.methods.verifyMessage({ message, signature });\n if (!isValid) {\n throw new Error('Error verifying SIWE signature');\n }\n const session = await this.methods.getSession();\n if (!session) {\n throw new Error('Error verifying SIWE signature');\n }\n if (this.methods.onSignIn) {\n this.methods.onSignIn(session);\n }\n RouterUtil.navigateAfterNetworkSwitch();\n return session;\n }\n async signOut() {\n return this.methods.signOut();\n }\n}\n//# sourceMappingURL=client.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { OptionsController } from '@web3modal/core';\nconst state = proxy({\n status: 'uninitialized'\n});\nexport const SIWEController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n _getClient() {\n if (!state._client) {\n throw new Error('SIWEController client not set');\n }\n return state._client;\n },\n async getNonce(address) {\n const client = this._getClient();\n const nonce = await client.getNonce(address);\n this.setNonce(nonce);\n return nonce;\n },\n async getSession() {\n const client = this._getClient();\n const session = await client.getSession();\n if (session) {\n this.setSession(session);\n this.setStatus('success');\n }\n return session;\n },\n createMessage(args) {\n const client = this._getClient();\n const message = client.createMessage(args);\n this.setMessage(message);\n return message;\n },\n async verifyMessage(args) {\n const client = this._getClient();\n const isValid = await client.verifyMessage(args);\n return isValid;\n },\n async signIn() {\n const client = this._getClient();\n const session = await client.signIn();\n return session;\n },\n async signOut() {\n const client = this._getClient();\n await client.signOut();\n this.setStatus('ready');\n client.onSignOut?.();\n },\n onSignIn(args) {\n const client = this._getClient();\n client.onSignIn?.(args);\n },\n onSignOut() {\n const client = this._getClient();\n client.onSignOut?.();\n },\n setSIWEClient(client) {\n state._client = ref(client);\n state.status = 'ready';\n OptionsController.setIsSiweEnabled(client.options.enabled);\n },\n setNonce(nonce) {\n state.nonce = nonce;\n },\n setStatus(status) {\n state.status = status;\n },\n setMessage(message) {\n state.message = message;\n },\n setSession(session) {\n state.session = session;\n }\n};\n//# sourceMappingURL=SIWEController.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n gap: var(--wui-spacing-2xl);\n }\n\n wui-visual-thumbnail:nth-child(1) {\n z-index: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { OptionsController, StorageUtil } from '@web3modal/core';\nlet W3mConnectingSiwe = class W3mConnectingSiwe extends LitElement {\n constructor() {\n super(...arguments);\n this.dappImageUrl = OptionsController.state.metadata?.icons;\n this.walletImageUrl = StorageUtil.getConnectedWalletImageUrl();\n }\n firstUpdated() {\n const visuals = this.shadowRoot?.querySelectorAll('wui-visual-thumbnail');\n if (visuals?.[0]) {\n this.createAnimation(visuals[0], 'translate(18px)');\n }\n if (visuals?.[1]) {\n this.createAnimation(visuals[1], 'translate(-18px)');\n }\n }\n render() {\n return html `\n \n \n `;\n }\n createAnimation(element, translation) {\n element.animate([{ transform: 'translateX(0px)' }, { transform: translation }], {\n duration: 1600,\n easing: 'cubic-bezier(0.56, 0, 0.48, 1)',\n direction: 'alternate',\n iterations: Infinity\n });\n }\n};\nW3mConnectingSiwe.styles = styles;\nW3mConnectingSiwe = __decorate([\n customElement('w3m-connecting-siwe')\n], W3mConnectingSiwe);\nexport { W3mConnectingSiwe };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ConnectionController, EventsController, ModalController, OptionsController, RouterController, SnackController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { SIWEController } from '../../../core/controller/SIWEController.js';\nlet W3mConnectingSiweView = class W3mConnectingSiweView extends LitElement {\n constructor() {\n super(...arguments);\n this.dappName = OptionsController.state.metadata?.name;\n this.isSigning = false;\n }\n render() {\n return html `\n \n \n \n \n ${this.dappName ?? 'Dapp'} needs to connect to your wallet\n \n \n Sign this message to prove you own this wallet and proceed. Canceling will disconnect\n you.\n \n \n \n Cancel\n \n \n ${this.isSigning ? 'Signing...' : 'Sign'}\n \n \n `;\n }\n async onSign() {\n this.isSigning = true;\n EventsController.sendEvent({\n event: 'CLICK_SIGN_SIWE_MESSAGE',\n type: 'track'\n });\n try {\n SIWEController.setStatus('loading');\n const session = await SIWEController.signIn();\n SIWEController.setStatus('success');\n EventsController.sendEvent({\n event: 'SIWE_AUTH_SUCCESS',\n type: 'track'\n });\n return session;\n }\n catch (error) {\n SnackController.showError('Signature declined');\n SIWEController.setStatus('error');\n return EventsController.sendEvent({\n event: 'SIWE_AUTH_ERROR',\n type: 'track'\n });\n }\n finally {\n this.isSigning = false;\n }\n }\n async onCancel() {\n const { isConnected } = AccountController.state;\n if (isConnected) {\n await ConnectionController.disconnect();\n ModalController.close();\n }\n else {\n RouterController.push('Connect');\n }\n EventsController.sendEvent({\n event: 'CLICK_CANCEL_SIWE',\n type: 'track'\n });\n }\n};\n__decorate([\n state()\n], W3mConnectingSiweView.prototype, \"isSigning\", void 0);\nW3mConnectingSiweView = __decorate([\n customElement('w3m-connecting-siwe-view')\n], W3mConnectingSiweView);\nexport { W3mConnectingSiweView };\n//# sourceMappingURL=index.js.map","import { Web3ModalSIWEClient } from '../src/client.js';\nexport { SIWEController } from '../core/controller/SIWEController.js';\nexport function createSIWEConfig(siweConfig) {\n return new Web3ModalSIWEClient(siweConfig);\n}\nexport * from '../scaffold/partials/w3m-connecting-siwe/index.js';\nexport * from '../scaffold/views/w3m-connecting-siwe-view/index.js';\n//# sourceMappingURL=index.js.map","import{proxy as u,subscribe as h,snapshot as P}from\"valtio/vanilla\";const o=u({history:[\"ConnectWallet\"],view:\"ConnectWallet\",data:void 0}),T={state:o,subscribe(e){return h(o,()=>e(o))},push(e,t){e!==o.view&&(o.view=e,t&&(o.data=t),o.history.push(e))},reset(e){o.view=e,o.history=[e]},replace(e){o.history.length>1&&(o.history[o.history.length-1]=e,o.view=e)},goBack(){if(o.history.length>1){o.history.pop();const[e]=o.history.slice(-1);o.view=e}},setData(e){o.data=e}},a={WALLETCONNECT_DEEPLINK_CHOICE:\"WALLETCONNECT_DEEPLINK_CHOICE\",WCM_VERSION:\"WCM_VERSION\",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<\"u\"?Boolean(window.matchMedia(\"(pointer:coarse)\").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return a.isMobile()&&navigator.userAgent.toLowerCase().includes(\"android\")},isIos(){const e=navigator.userAgent.toLowerCase();return a.isMobile()&&(e.includes(\"iphone\")||e.includes(\"ipad\"))},isHttpUrl(e){return e.startsWith(\"http://\")||e.startsWith(\"https://\")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(a.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes(\"://\")||(n=e.replaceAll(\"/\",\"\").replaceAll(\":\",\"\"),n=`${n}://`),n.endsWith(\"/\")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return`${n}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!a.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith(\"/\")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return`${n}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,\"noreferrer noopener\")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info(\"Unable to set WalletConnect deep link\")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split(\"?\");localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:\"Android\"}))}catch{console.info(\"Unable to set WalletConnect android deep link\")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(a.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info(\"Unable to remove WalletConnect deep link\")}},setModalVersionInStorage(){try{typeof localStorage<\"u\"&&localStorage.setItem(a.WCM_VERSION,\"2.6.2\")}catch{console.info(\"Unable to set Web3Modal version in storage\")}},getWalletRouterData(){var e;const t=(e=T.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing \"Wallet\" view data');return t}},_=typeof location<\"u\"&&(location.hostname.includes(\"localhost\")||location.protocol.includes(\"https\")),r=u({enabled:_,userSessionId:\"\",events:[],connectedWalletId:void 0}),R={state:r,subscribe(e){return h(r.events,()=>e(P(r.events[r.events.length-1])))},initialize(){r.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<\"u\"&&(r.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){r.connectedWalletId=e},click(e){if(r.enabled){const t={type:\"CLICK\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}},track(e){if(r.enabled){const t={type:\"TRACK\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}},view(e){if(r.enabled){const t={type:\"VIEW\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}}},c=u({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),p={state:c,subscribe(e){return h(c,()=>e(c))},setChains(e){c.chains=e},setWalletConnectUri(e){c.walletConnectUri=e},setIsCustomDesktop(e){c.isCustomDesktop=e},setIsCustomMobile(e){c.isCustomMobile=e},setIsDataLoaded(e){c.isDataLoaded=e},setIsUiLoaded(e){c.isUiLoaded=e},setIsAuth(e){c.isAuth=e}},W=u({projectId:\"\",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),y={state:W,subscribe(e){return h(W,()=>e(W))},setConfig(e){var t,s;R.initialize(),p.setChains(e.chains),p.setIsAuth(Boolean(e.enableAuthMode)),p.setIsCustomMobile(Boolean((t=e.mobileWallets)==null?void 0:t.length)),p.setIsCustomDesktop(Boolean((s=e.desktopWallets)==null?void 0:s.length)),a.setModalVersionInStorage(),Object.assign(W,e)}};var V=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,M=(e,t,s)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&M(e,s,t[s]);if(D)for(var s of D(t))B.call(t,s)&&M(e,s,t[s]);return e};const L=\"https://explorer-api.walletconnect.com\",E=\"wcm\",O=\"js-2.6.2\";async function w(e,t){const s=K({sdkType:E,sdkVersion:O},t),n=new URL(e,L);return n.searchParams.append(\"projectId\",y.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&n.searchParams.append(i,String(l))}),(await fetch(n)).json()}const m={async getDesktopListings(e){return w(\"/w3m/v1/getDesktopListings\",e)},async getMobileListings(e){return w(\"/w3m/v1/getMobileListings\",e)},async getInjectedListings(e){return w(\"/w3m/v1/getInjectedListings\",e)},async getAllListings(e){return w(\"/w3m/v1/getAllListings\",e)},getWalletImageUrl(e){return`${L}/w3m/v1/getWalletImage/${e}?projectId=${y.state.projectId}&sdkType=${E}&sdkVersion=${O}`},getAssetImageUrl(e){return`${L}/w3m/v1/getAssetImage/${e}?projectId=${y.state.projectId}&sdkType=${E}&sdkVersion=${O}`}};var z=Object.defineProperty,j=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,k=(e,t,s)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))J.call(t,s)&&k(e,s,t[s]);if(j)for(var s of j(t))q.call(t,s)&&k(e,s,t[s]);return e};const N=a.isMobile(),d=u({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),te={state:d,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=y.state;if(e===\"NONE\"||t===\"ALL\"&&!e)return d.recomendedWallets;if(a.isArray(e)){const s={recommendedIds:e.join(\",\")},{listings:n}=await m.getAllListings(s),i=Object.values(n);i.sort((l,v)=>{const b=e.indexOf(l.id),f=e.indexOf(v.id);return b-f}),d.recomendedWallets=i}else{const{chains:s,isAuth:n}=p.state,i=s?.join(\",\"),l=a.isArray(t),v={page:1,sdks:n?\"auth_v1\":void 0,entries:a.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(\",\"):void 0},{listings:b}=N?await m.getMobileListings(v):await m.getDesktopListings(v);d.recomendedWallets=Object.values(b)}return d.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=y.state,{recomendedWallets:i}=d;if(n===\"ALL\")return d.wallets;i.length?t.excludedIds=i.map(x=>x.id).join(\",\"):a.isArray(s)&&(t.excludedIds=s.join(\",\")),a.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(\",\")),p.state.isAuth&&(t.sdks=\"auth_v1\");const{page:l,search:v}=e,{listings:b,total:f}=N?await m.getMobileListings(t):await m.getDesktopListings(t),A=Object.values(b),U=v?\"search\":\"wallets\";return d[U]={listings:[...d[U].listings,...A],total:f,page:l??1},{listings:A,total:f}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){d.search={listings:[],total:0,page:1}}},I=u({open:!1}),se={state:I,subscribe(e){return h(I,()=>e(I))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=p.state;if(a.removeWalletConnectDeepLink(),p.setWalletConnectUri(e?.uri),p.setChains(e?.chains),T.reset(\"ConnectWallet\"),s&&n)I.open=!0,t();else{const i=setInterval(()=>{const l=p.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I.open=!0,t())},200)}})},close(){I.open=!1}};var G=Object.defineProperty,$=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,S=(e,t,s)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Y=(e,t)=>{for(var s in t||(t={}))Q.call(t,s)&&S(e,s,t[s]);if($)for(var s of $(t))X.call(t,s)&&S(e,s,t[s]);return e};function Z(){return typeof matchMedia<\"u\"&&matchMedia(\"(prefers-color-scheme: dark)\").matches}const C=u({themeMode:Z()?\"dark\":\"light\"}),ne={state:C,subscribe(e){return h(C,()=>e(C))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(C.themeMode=t),s&&(C.themeVariables=Y({},s))}},g=u({open:!1,message:\"\",variant:\"success\"}),oe={state:g,subscribe(e){return h(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};export{y as ConfigCtrl,a as CoreUtil,R as EventsCtrl,te as ExplorerCtrl,se as ModalCtrl,p as OptionsCtrl,T as RouterCtrl,ne as ThemeCtrl,oe as ToastCtrl};\n//# sourceMappingURL=index.js.map\n","import{ModalCtrl as t,ThemeCtrl as o,ConfigCtrl as i,OptionsCtrl as n}from\"@walletconnect/modal-core\";class d{constructor(e){this.openModal=t.open,this.closeModal=t.close,this.subscribeModal=t.subscribe,this.setTheme=o.setThemeConfig,o.setThemeConfig(e),i.setConfig(e),this.initUi()}async initUi(){if(typeof window<\"u\"){await import(\"@walletconnect/modal-ui\");const e=document.createElement(\"wcm-modal\");document.body.insertAdjacentElement(\"beforeend\",e),n.setIsUiLoaded(!0)}}}export{d as WalletConnectModal};\n//# sourceMappingURL=index.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement(\"style\"),o=t.litNonce;void 0!==o&&n.setAttribute(\"nonce\",o),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window,r=e.trustedTypes,h=r?r.emptyScript:\"\",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n,reflect:!1,hasChanged:a},d=\"finalized\";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:\"open\"},null==o||o({ReactiveElement:u}),(null!==(s=e.reactiveElementVersions)&&void 0!==s?s:e.reactiveElementVersions=[]).push(\"1.6.3\");export{u as ReactiveElement,n as defaultConverter,a as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,u=()=>r.createComment(\"\"),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?\"\":\"\",u=f;for(let i=0;i\"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w)}return[P(t,r+(t[s]||\"\")+(2===i?\"\":\"\")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{j as _$LH,x as html,T as noChange,A as nothing,D as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.3.3\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=e=>n=>\"function\"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return{kind:t,elements:s,finisher(n){customElements.define(e,n)}}})(e,n);export{e as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}},e=(i,e,n)=>{e.constructor.createProperty(n,i)};function n(n){return(t,o)=>void 0!==o?e(n,t,o):i(n,t)}export{n as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as i,Directive as s,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((i=>t[i])).join(\" \")+\" \"}update(i,[s]){var r,o;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap};\n//# sourceMappingURL=class-map.js.map\n","function addUniqueItem(array, item) {\n array.indexOf(item) === -1 && array.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n\nexport { addUniqueItem, removeItem };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","const defaults = {\n duration: 0.3,\n delay: 0,\n endDelay: 0,\n repeat: 0,\n easing: \"ease\",\n};\n\nexport { defaults };\n","const isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n","import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n","import { isEasingList } from './is-easing-list.es.js';\nimport { wrap } from './wrap.es.js';\n\nfunction getEasingForSegment(easing, i) {\n return isEasingList(easing)\n ? easing[wrap(0, easing.length, i)]\n : easing;\n}\n\nexport { getEasingForSegment };\n","const mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n","const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n","const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\n","import { mix } from './mix.es.js';\nimport { progress } from './progress.es.js';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mix(min, 1, offsetProgress));\n }\n}\nfunction defaultOffset(length) {\n const offset = [0];\n fillOffset(offset, length - 1);\n return offset;\n}\n\nexport { defaultOffset, fillOffset };\n","import { mix } from './mix.es.js';\nimport { noopReturn } from './noop.es.js';\nimport { fillOffset, defaultOffset } from './offset.es.js';\nimport { progress } from './progress.es.js';\nimport { getEasingForSegment } from './easing.es.js';\nimport { clamp } from './clamp.es.js';\n\nfunction interpolate(output, input = defaultOffset(output.length), easing = noopReturn) {\n const length = output.length;\n /**\n * If the input length is lower than the output we\n * fill the input to match. This currently assumes the input\n * is an animation progress value so is a good candidate for\n * moving outside the function.\n */\n const remainder = length - input.length;\n remainder > 0 && fillOffset(input, remainder);\n return (t) => {\n let i = 0;\n for (; i < length - 2; i++) {\n if (t < input[i + 1])\n break;\n }\n let progressInRange = clamp(0, 1, progress(input[i], input[i + 1], t));\n const segmentEasing = getEasingForSegment(easing, i);\n progressInRange = segmentEasing(progressInRange);\n return mix(output[i], output[i + 1], progressInRange);\n };\n}\n\nexport { interpolate };\n","import { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n","const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n","const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n","const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n","const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n","import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noopReturn;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { clamp } from '@motionone/utils';\n\nconst steps = (steps, direction = \"end\") => (progress) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001);\n const expanded = progress * steps;\n const rounded = direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded);\n return clamp(0, 1, rounded / steps);\n};\n\nexport { steps };\n","import { cubicBezier, steps } from '@motionone/easing';\nimport { isFunction, isCubicBezier, noopReturn } from '@motionone/utils';\n\nconst namedEasings = {\n ease: cubicBezier(0.25, 0.1, 0.25, 1.0),\n \"ease-in\": cubicBezier(0.42, 0.0, 1.0, 1.0),\n \"ease-in-out\": cubicBezier(0.42, 0.0, 0.58, 1.0),\n \"ease-out\": cubicBezier(0.0, 0.0, 0.58, 1.0),\n};\nconst functionArgsRegex = /\\((.*?)\\)/;\nfunction getEasingFunction(definition) {\n // If already an easing function, return\n if (isFunction(definition))\n return definition;\n // If an easing curve definition, return bezier function\n if (isCubicBezier(definition))\n return cubicBezier(...definition);\n // If we have a predefined easing function, return\n if (namedEasings[definition])\n return namedEasings[definition];\n // If this is a steps function, attempt to create easing curve\n if (definition.startsWith(\"steps\")) {\n const args = functionArgsRegex.exec(definition);\n if (args) {\n const argsArray = args[1].split(\",\");\n return steps(parseFloat(argsArray[0]), argsArray[1].trim());\n }\n }\n return noopReturn;\n}\n\nexport { getEasingFunction };\n","import { noopReturn, defaults, isEasingGenerator, isEasingList, interpolate } from '@motionone/utils';\nimport { getEasingFunction } from './utils/easing.es.js';\n\nclass Animation {\n constructor(output, keyframes = [0, 1], { easing, duration: initialDuration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, offset, direction = \"normal\", autoplay = true, } = {}) {\n this.startTime = null;\n this.rate = 1;\n this.t = 0;\n this.cancelTimestamp = null;\n this.easing = noopReturn;\n this.duration = 0;\n this.totalDuration = 0;\n this.repeat = 0;\n this.playState = \"idle\";\n this.finished = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n easing = easing || defaults.easing;\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\n }\n this.repeat = repeat;\n this.easing = isEasingList(easing) ? noopReturn : getEasingFunction(easing);\n this.updateDuration(initialDuration);\n const interpolate$1 = interpolate(keyframes, offset, isEasingList(easing) ? easing.map(getEasingFunction) : noopReturn);\n this.tick = (timestamp) => {\n var _a;\n // TODO: Temporary fix for OptionsResolver typing\n delay = delay;\n let t = 0;\n if (this.pauseTime !== undefined) {\n t = this.pauseTime;\n }\n else {\n t = (timestamp - this.startTime) * this.rate;\n }\n this.t = t;\n // Convert to seconds\n t /= 1000;\n // Rebase on delay\n t = Math.max(t - delay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (this.playState === \"finished\" && this.pauseTime === undefined) {\n t = this.totalDuration;\n }\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = t / this.duration;\n // TODO progress += iterationStart\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n iterationProgress === 1 && currentIteration--;\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = currentIteration % 2;\n if (direction === \"reverse\" ||\n (direction === \"alternate\" && iterationIsOdd) ||\n (direction === \"alternate-reverse\" && !iterationIsOdd)) {\n iterationProgress = 1 - iterationProgress;\n }\n const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);\n const latest = interpolate$1(this.easing(p));\n output(latest);\n const isAnimationFinished = this.pauseTime === undefined &&\n (this.playState === \"finished\" || t >= this.totalDuration + endDelay);\n if (isAnimationFinished) {\n this.playState = \"finished\";\n (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);\n }\n else if (this.playState !== \"idle\") {\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n };\n if (autoplay)\n this.play();\n }\n play() {\n const now = performance.now();\n this.playState = \"running\";\n if (this.pauseTime !== undefined) {\n this.startTime = now - this.pauseTime;\n }\n else if (!this.startTime) {\n this.startTime = now;\n }\n this.cancelTimestamp = this.startTime;\n this.pauseTime = undefined;\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n pause() {\n this.playState = \"paused\";\n this.pauseTime = this.t;\n }\n finish() {\n this.playState = \"finished\";\n this.tick(0);\n }\n stop() {\n var _a;\n this.playState = \"idle\";\n if (this.frameRequestId !== undefined) {\n cancelAnimationFrame(this.frameRequestId);\n }\n (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);\n }\n cancel() {\n this.stop();\n this.tick(this.cancelTimestamp);\n }\n reverse() {\n this.rate *= -1;\n }\n commitStyles() { }\n updateDuration(duration) {\n this.duration = duration;\n this.totalDuration = duration * (this.repeat + 1);\n }\n get currentTime() {\n return this.t;\n }\n set currentTime(t) {\n if (this.pauseTime !== undefined || this.rate === 0) {\n this.pauseTime = t;\n }\n else {\n this.startTime = performance.now() - t / this.rate;\n }\n }\n get playbackRate() {\n return this.rate;\n }\n set playbackRate(rate) {\n this.rate = rate;\n }\n}\n\nexport { Animation };\n","var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\n","/**\n * The MotionValue tracks the state of a single animatable\n * value. Currently, updatedAt and current are unused. The\n * long term idea is to use this to minimise the number\n * of DOM reads, and to abstract the DOM interactions here.\n */\nclass MotionValue {\n setAnimation(animation) {\n this.animation = animation;\n animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => { });\n }\n clearAnimation() {\n this.animation = this.generator = undefined;\n }\n}\n\nexport { MotionValue };\n","import { MotionValue } from '@motionone/types';\n\nconst data = new WeakMap();\nfunction getAnimationData(element) {\n if (!data.has(element)) {\n data.set(element, {\n transforms: [],\n values: new Map(),\n });\n }\n return data.get(element);\n}\nfunction getMotionValue(motionValues, name) {\n if (!motionValues.has(name)) {\n motionValues.set(name, new MotionValue());\n }\n return motionValues.get(name);\n}\n\nexport { getAnimationData, getMotionValue };\n","import { noopReturn, addUniqueItem } from '@motionone/utils';\nimport { getAnimationData } from '../data.es.js';\n\n/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nconst axes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nconst order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\nconst transformAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n};\nconst rotation = {\n syntax: \"\",\n initialValue: \"0deg\",\n toDefaultUnit: (v) => v + \"deg\",\n};\nconst baseTransformProperties = {\n translate: {\n syntax: \"\",\n initialValue: \"0px\",\n toDefaultUnit: (v) => v + \"px\",\n },\n rotate: rotation,\n scale: {\n syntax: \"\",\n initialValue: 1,\n toDefaultUnit: noopReturn,\n },\n skew: rotation,\n};\nconst transformDefinitions = new Map();\nconst asTransformCssVar = (name) => `--motion-${name}`;\n/**\n * Generate a list of every possible transform key\n */\nconst transforms = [\"x\", \"y\", \"z\"];\norder.forEach((name) => {\n axes.forEach((axis) => {\n transforms.push(name + axis);\n transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nconst compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);\n/**\n * Provide a quick way to check if a string is the name of a transform\n */\nconst transformLookup = new Set(transforms);\nconst isTransform = (name) => transformLookup.has(name);\nconst addTransformToElement = (element, name) => {\n // Map x to translateX etc\n if (transformAlias[name])\n name = transformAlias[name];\n const { transforms } = getAnimationData(element);\n addUniqueItem(transforms, name);\n /**\n * TODO: An optimisation here could be to cache the transform in element data\n * and only update if this has changed.\n */\n element.style.transform = buildTransformTemplate(transforms);\n};\nconst buildTransformTemplate = (transforms) => transforms\n .sort(compareTransformOrder)\n .reduce(transformListToString, \"\")\n .trim();\nconst transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;\n\nexport { addTransformToElement, asTransformCssVar, axes, buildTransformTemplate, compareTransformOrder, isTransform, transformAlias, transformDefinitions };\n","import { transformDefinitions } from './transforms.es.js';\n\nconst isCssVar = (name) => name.startsWith(\"--\");\nconst registeredProperties = new Set();\nfunction registerCssVariable(name) {\n if (registeredProperties.has(name))\n return;\n registeredProperties.add(name);\n try {\n const { syntax, initialValue } = transformDefinitions.has(name)\n ? transformDefinitions.get(name)\n : {};\n CSS.registerProperty({\n name,\n inherits: false,\n syntax,\n initialValue,\n });\n }\n catch (e) { }\n}\n\nexport { isCssVar, registerCssVariable, registeredProperties };\n","const testAnimation = (keyframes, options) => document.createElement(\"div\").animate(keyframes, options);\nconst featureTests = {\n cssRegisterProperty: () => typeof CSS !== \"undefined\" &&\n Object.hasOwnProperty.call(CSS, \"registerProperty\"),\n waapi: () => Object.hasOwnProperty.call(Element.prototype, \"animate\"),\n partialKeyframes: () => {\n try {\n testAnimation({ opacity: [1] });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n finished: () => Boolean(testAnimation({ opacity: [0, 1] }, { duration: 0.001 }).finished),\n linearEasing: () => {\n try {\n testAnimation({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n};\nconst results = {};\nconst supports = {};\nfor (const key in featureTests) {\n supports[key] = () => {\n if (results[key] === undefined)\n results[key] = featureTests[key]();\n return results[key];\n };\n}\n\nexport { supports };\n","import { isFunction, defaults, isCubicBezier, progress } from '@motionone/utils';\nimport { supports } from './feature-detection.es.js';\n\n// Create a linear easing point for every x second\nconst resolution = 0.015;\nconst generateLinearEasingPoints = (easing, duration) => {\n let points = \"\";\n const numPoints = Math.round(duration / resolution);\n for (let i = 0; i < numPoints; i++) {\n points += easing(progress(0, numPoints - 1, i)) + \", \";\n }\n return points.substring(0, points.length - 2);\n};\nconst convertEasing = (easing, duration) => {\n if (isFunction(easing)) {\n return supports.linearEasing()\n ? `linear(${generateLinearEasingPoints(easing, duration)})`\n : defaults.easing;\n }\n else {\n return isCubicBezier(easing) ? cubicBezierAsString(easing) : easing;\n }\n};\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { convertEasing, cubicBezierAsString, generateLinearEasingPoints };\n","function hydrateKeyframes(keyframes, readInitialValue) {\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] === null) {\n keyframes[i] = i ? keyframes[i - 1] : readInitialValue();\n }\n }\n return keyframes;\n}\nconst keyframesList = (keyframes) => Array.isArray(keyframes) ? keyframes : [keyframes];\n\nexport { hydrateKeyframes, keyframesList };\n","import { isTransform, asTransformCssVar, transformAlias } from './transforms.es.js';\n\nfunction getStyleName(key) {\n if (transformAlias[key])\n key = transformAlias[key];\n return isTransform(key) ? asTransformCssVar(key) : key;\n}\n\nexport { getStyleName };\n","import { isCssVar } from './utils/css-var.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { transformDefinitions } from './utils/transforms.es.js';\n\nconst style = {\n get: (element, name) => {\n name = getStyleName(name);\n let value = isCssVar(name)\n ? element.style.getPropertyValue(name)\n : getComputedStyle(element)[name];\n if (!value && value !== 0) {\n const definition = transformDefinitions.get(name);\n if (definition)\n value = definition.initialValue;\n }\n return value;\n },\n set: (element, name, value) => {\n name = getStyleName(name);\n if (isCssVar(name)) {\n element.style.setProperty(name, value);\n }\n else {\n element.style[name] = value;\n }\n },\n};\n\nexport { style };\n","function stopAnimation(animation, needsCommit = true) {\n if (!animation || animation.playState === \"finished\")\n return;\n // Suppress error thrown by WAAPI\n try {\n if (animation.stop) {\n animation.stop();\n }\n else {\n needsCommit && animation.commitStyles();\n animation.cancel();\n }\n }\n catch (e) { }\n}\n\nexport { stopAnimation };\n","import { noopReturn, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n","import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\nimport { defaults, isEasingGenerator, isFunction, isEasingList, isNumber, time, noop } from '@motionone/utils';\nimport { isTransform, addTransformToElement, transformDefinitions } from './utils/transforms.es.js';\nimport { convertEasing } from './utils/easing.es.js';\nimport { supports } from './utils/feature-detection.es.js';\nimport { hydrateKeyframes, keyframesList } from './utils/keyframes.es.js';\nimport { style } from './style.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { stopAnimation } from './utils/stop-animation.es.js';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\n const record = getDevToolsRecord();\n const isRecording = options.record !== false && record;\n let animation;\n let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = options;\n const data = getAnimationData(element);\n const valueIsTransform = isTransform(key);\n let canAnimateNatively = supports.waapi();\n /**\n * If this is an individual transform, we need to map its\n * key to a CSS variable and update the element's transform style\n */\n valueIsTransform && addTransformToElement(element, key);\n const name = getStyleName(key);\n const motionValue = getMotionValue(data.values, name);\n /**\n * Get definition of value, this will be used to convert numerical\n * keyframes into the default value type.\n */\n const definition = transformDefinitions.get(name);\n /**\n * Stop the current animation, if any. Because this will trigger\n * commitStyles (DOM writes) and we might later trigger DOM reads,\n * this is fired now and we return a factory function to create\n * the actual animation that can get called in batch,\n */\n stopAnimation(motionValue.animation, !(isEasingGenerator(easing) && motionValue.generator) &&\n options.record !== false);\n /**\n * Batchable factory function containing all DOM reads.\n */\n return () => {\n const readInitialValue = () => { var _a, _b; return (_b = (_a = style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0; };\n /**\n * Replace null values with the previous keyframe value, or read\n * it from the DOM if it's the first keyframe.\n */\n let keyframes = hydrateKeyframes(keyframesList(keyframesDefinition), readInitialValue);\n /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || duration;\n }\n /**\n * If this is a CSS variable we need to register it with the browser\n * before it can be animated natively. We also set it with setProperty\n * rather than directly onto the element.style object.\n */\n if (isCssVar(name)) {\n if (supports.cssRegisterProperty()) {\n registerCssVariable(name);\n }\n else {\n canAnimateNatively = false;\n }\n }\n /**\n * If we've been passed a custom easing function, and this browser\n * does **not** support linear() easing, and the value is a transform\n * (and thus a pure number) we can still support the custom easing\n * by falling back to the animation polyfill.\n */\n if (valueIsTransform &&\n !supports.linearEasing() &&\n (isFunction(easing) || (isEasingList(easing) && easing.some(isFunction)))) {\n canAnimateNatively = false;\n }\n /**\n * If we can animate this value with WAAPI, do so.\n */\n if (canAnimateNatively) {\n /**\n * Convert numbers to default value types. Currently this only supports\n * transforms but it could also support other value types.\n */\n if (definition) {\n keyframes = keyframes.map((value) => isNumber(value) ? definition.toDefaultUnit(value) : value);\n }\n /**\n * If this browser doesn't support partial/implicit keyframes we need to\n * explicitly provide one.\n */\n if (keyframes.length === 1 &&\n (!supports.partialKeyframes() || isRecording)) {\n keyframes.unshift(readInitialValue());\n }\n const animationOptions = {\n delay: time.ms(delay),\n duration: time.ms(duration),\n endDelay: time.ms(endDelay),\n easing: !isEasingList(easing)\n ? convertEasing(easing, duration)\n : undefined,\n direction,\n iterations: repeat + 1,\n fill: \"both\",\n };\n animation = element.animate({\n [name]: keyframes,\n offset,\n easing: isEasingList(easing)\n ? easing.map((thisEasing) => convertEasing(thisEasing, duration))\n : undefined,\n }, animationOptions);\n /**\n * Polyfill finished Promise in browsers that don't support it\n */\n if (!animation.finished) {\n animation.finished = new Promise((resolve, reject) => {\n animation.onfinish = resolve;\n animation.oncancel = reject;\n });\n }\n const target = keyframes[keyframes.length - 1];\n animation.finished\n .then(() => {\n if (persist)\n return;\n // Apply styles to target\n style.set(element, name, target);\n // Ensure fill modes don't persist\n animation.cancel();\n })\n .catch(noop);\n /**\n * This forces Webkit to run animations on the main thread by exploiting\n * this condition:\n * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099\n *\n * This fixes Webkit's timing bugs, like accelerated animations falling\n * out of sync with main thread animations and massive delays in starting\n * accelerated animations in WKWebView.\n */\n if (!allowWebkitAcceleration)\n animation.playbackRate = 1.000001;\n /**\n * If we can't animate the value natively then we can fallback to the numbers-only\n * polyfill for transforms.\n */\n }\n else if (AnimationPolyfill && valueIsTransform) {\n /**\n * If any keyframe is a string (because we measured it from the DOM), we need to convert\n * it into a number before passing to the Animation polyfill.\n */\n keyframes = keyframes.map((value) => typeof value === \"string\" ? parseFloat(value) : value);\n /**\n * If we only have a single keyframe, we need to create an initial keyframe by reading\n * the current value from the DOM.\n */\n if (keyframes.length === 1) {\n keyframes.unshift(parseFloat(readInitialValue()));\n }\n animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, keyframes, Object.assign(Object.assign({}, options), { duration,\n easing }));\n }\n else {\n const target = keyframes[keyframes.length - 1];\n style.set(element, name, definition && isNumber(target)\n ? definition.toDefaultUnit(target)\n : target);\n }\n if (isRecording) {\n record(element, key, keyframes, {\n duration,\n delay: delay,\n easing,\n repeat,\n offset,\n }, \"motion-one\");\n }\n motionValue.setAnimation(animation);\n if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\n","const getOptions = (options, key) => \n/**\n * TODO: Make test for this\n * Always return a new object otherwise delay is overwritten by results of stagger\n * and this results in no stagger\n */\noptions[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);\n\nexport { getOptions };\n","function resolveElements(elements, selectorCache) {\n var _a;\n if (typeof elements === \"string\") {\n if (selectorCache) {\n (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : (selectorCache[elements] = document.querySelectorAll(elements));\n elements = selectorCache[elements];\n }\n else {\n elements = document.querySelectorAll(elements);\n }\n }\n else if (elements instanceof Element) {\n elements = [elements];\n }\n /**\n * Return an empty array\n */\n return Array.from(elements || []);\n}\n\nexport { resolveElements };\n","import { defaults, noop, time } from '@motionone/utils';\nimport { stopAnimation } from './stop-animation.es.js';\n\nconst createAnimation = (factory) => factory();\nconst withControls = (animationFactory, options, duration = defaults.duration) => {\n return new Proxy({\n animations: animationFactory.map(createAnimation).filter(Boolean),\n duration,\n options,\n }, controls);\n};\n/**\n * TODO:\n * Currently this returns the first animation, ideally it would return\n * the first active animation.\n */\nconst getActiveAnimation = (state) => state.animations[0];\nconst controls = {\n get: (target, key) => {\n const activeAnimation = getActiveAnimation(target);\n switch (key) {\n case \"duration\":\n return target.duration;\n case \"currentTime\":\n return time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);\n case \"playbackRate\":\n case \"playState\":\n return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];\n case \"finished\":\n if (!target.finished) {\n target.finished = Promise.all(target.animations.map(selectFinished)).catch(noop);\n }\n return target.finished;\n case \"stop\":\n return () => {\n target.animations.forEach((animation) => stopAnimation(animation));\n };\n case \"forEachNative\":\n /**\n * This is for internal use only, fire a callback for each\n * underlying animation.\n */\n return (callback) => {\n target.animations.forEach((animation) => callback(animation, target));\n };\n default:\n return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === \"undefined\"\n ? undefined\n : () => target.animations.forEach((animation) => animation[key]());\n }\n },\n set: (target, key, value) => {\n switch (key) {\n case \"currentTime\":\n value = time.ms(value);\n // Fall-through\n case \"playbackRate\":\n for (let i = 0; i < target.animations.length; i++) {\n target.animations[i][key] = value;\n }\n return true;\n }\n return false;\n },\n};\nconst selectFinished = (animation) => animation.finished;\n\nexport { controls, withControls };\n","import { isNumber, isFunction } from '@motionone/utils';\nimport { getEasingFunction } from '@motionone/animation';\n\nfunction stagger(duration = 0.1, { start = 0, from = 0, easing } = {}) {\n return (i, total) => {\n const fromIndex = isNumber(from) ? from : getFromIndex(from, total);\n const distance = Math.abs(fromIndex - i);\n let delay = duration * distance;\n if (easing) {\n const maxDelay = total * duration;\n const easingFunction = getEasingFunction(easing);\n delay = easingFunction(delay / maxDelay) * maxDelay;\n }\n return start + delay;\n };\n}\nfunction getFromIndex(from, total) {\n if (from === \"first\") {\n return 0;\n }\n else {\n const lastIndex = total - 1;\n return from === \"last\" ? lastIndex : lastIndex / 2;\n }\n}\nfunction resolveOption(option, i, total) {\n return isFunction(option) ? option(i, total) : option;\n}\n\nexport { getFromIndex, resolveOption, stagger };\n","import { invariant } from 'hey-listen';\nimport { animateStyle } from './animate-style.es.js';\nimport { getOptions } from './utils/options.es.js';\nimport { resolveElements } from '../utils/resolve-elements.es.js';\nimport { withControls } from './utils/controls.es.js';\nimport { resolveOption } from '../utils/stagger.es.js';\n\nfunction createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\n /**\n * Create and start new animations\n */\n const animationFactories = [];\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n for (const key in keyframes) {\n const valueOptions = getOptions(options, key);\n valueOptions.delay = resolveOption(valueOptions.delay, i, numElements);\n const animation = animateStyle(element, key, keyframes[key], valueOptions, AnimatePolyfill);\n animationFactories.push(animation);\n }\n }\n return withControls(animationFactories, options, \n /**\n * TODO:\n * If easing is set to spring or glide, duration will be dynamically\n * generated. Ideally we would dynamically generate this from\n * animation.effect.getComputedTiming().duration but this isn't\n * supported in iOS13 or our number polyfill. Perhaps it's possible\n * to Proxy animations returned from animateStyle that has duration\n * as a getter.\n */\n options.duration);\n };\n}\n\nexport { createAnimate };\n","import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\n\nexport { animate };\n","import { animate as animate$1, withControls } from '@motionone/dom';\nimport { isFunction } from '@motionone/utils';\nimport { Animation } from '@motionone/animation';\n\nfunction animateProgress(target, options = {}) {\n return withControls([\n () => {\n const animation = new Animation(target, [0, 1], options);\n animation.finished.catch(() => { });\n return animation;\n },\n ], options, options.duration);\n}\nfunction animate(target, keyframesOrOptions, options) {\n const factory = isFunction(target) ? animateProgress : animate$1;\n return factory(target, keyframesOrOptions, options);\n}\n\nexport { animate, animateProgress };\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=l=>null!=l?l:t;export{l as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import{css as g,LitElement as w,html as n,svg as pe}from\"lit\";import{property as d,customElement as p,state as I}from\"lit/decorators.js\";import{classMap as P}from\"lit/directives/class-map.js\";import{ThemeCtrl as X,ModalCtrl as ge,RouterCtrl as x,ConfigCtrl as z,ExplorerCtrl as W,CoreUtil as m,OptionsCtrl as R,ToastCtrl as N,EventsCtrl as Xe}from\"@walletconnect/modal-core\";import{svg as C}from\"lit-html\";import{animate as H}from\"motion\";import{ifDefined as k}from\"lit/directives/if-defined.js\";import Je from\"qrcode\";var et=Object.defineProperty,Be=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Ue=(e,o,r)=>o in e?et(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,ve=(e,o)=>{for(var r in o||(o={}))tt.call(o,r)&&Ue(e,r,o[r]);if(Be)for(var r of Be(o))ot.call(o,r)&&Ue(e,r,o[r]);return e};function rt(){var e;const o=(e=X.state.themeMode)!=null?e:\"dark\",r={light:{foreground:{1:\"rgb(20,20,20)\",2:\"rgb(121,134,134)\",3:\"rgb(158,169,169)\"},background:{1:\"rgb(255,255,255)\",2:\"rgb(241,243,243)\",3:\"rgb(228,231,231)\"},overlay:\"rgba(0,0,0,0.1)\"},dark:{foreground:{1:\"rgb(228,231,231)\",2:\"rgb(148,158,158)\",3:\"rgb(110,119,119)\"},background:{1:\"rgb(20,20,20)\",2:\"rgb(39,42,42)\",3:\"rgb(59,64,64)\"},overlay:\"rgba(255,255,255,0.1)\"}}[o];return{\"--wcm-color-fg-1\":r.foreground[1],\"--wcm-color-fg-2\":r.foreground[2],\"--wcm-color-fg-3\":r.foreground[3],\"--wcm-color-bg-1\":r.background[1],\"--wcm-color-bg-2\":r.background[2],\"--wcm-color-bg-3\":r.background[3],\"--wcm-color-overlay\":r.overlay}}function He(){return{\"--wcm-accent-color\":\"#3396FF\",\"--wcm-accent-fill-color\":\"#FFFFFF\",\"--wcm-z-index\":\"89\",\"--wcm-background-color\":\"#3396FF\",\"--wcm-background-border-radius\":\"8px\",\"--wcm-container-border-radius\":\"30px\",\"--wcm-wallet-icon-border-radius\":\"15px\",\"--wcm-wallet-icon-large-border-radius\":\"30px\",\"--wcm-wallet-icon-small-border-radius\":\"7px\",\"--wcm-input-border-radius\":\"28px\",\"--wcm-button-border-radius\":\"10px\",\"--wcm-notification-border-radius\":\"36px\",\"--wcm-secondary-button-border-radius\":\"28px\",\"--wcm-icon-button-border-radius\":\"50%\",\"--wcm-button-hover-highlight-border-radius\":\"10px\",\"--wcm-text-big-bold-size\":\"20px\",\"--wcm-text-big-bold-weight\":\"600\",\"--wcm-text-big-bold-line-height\":\"24px\",\"--wcm-text-big-bold-letter-spacing\":\"-0.03em\",\"--wcm-text-big-bold-text-transform\":\"none\",\"--wcm-text-xsmall-bold-size\":\"10px\",\"--wcm-text-xsmall-bold-weight\":\"700\",\"--wcm-text-xsmall-bold-line-height\":\"12px\",\"--wcm-text-xsmall-bold-letter-spacing\":\"0.02em\",\"--wcm-text-xsmall-bold-text-transform\":\"uppercase\",\"--wcm-text-xsmall-regular-size\":\"12px\",\"--wcm-text-xsmall-regular-weight\":\"600\",\"--wcm-text-xsmall-regular-line-height\":\"14px\",\"--wcm-text-xsmall-regular-letter-spacing\":\"-0.03em\",\"--wcm-text-xsmall-regular-text-transform\":\"none\",\"--wcm-text-small-thin-size\":\"14px\",\"--wcm-text-small-thin-weight\":\"500\",\"--wcm-text-small-thin-line-height\":\"16px\",\"--wcm-text-small-thin-letter-spacing\":\"-0.03em\",\"--wcm-text-small-thin-text-transform\":\"none\",\"--wcm-text-small-regular-size\":\"14px\",\"--wcm-text-small-regular-weight\":\"600\",\"--wcm-text-small-regular-line-height\":\"16px\",\"--wcm-text-small-regular-letter-spacing\":\"-0.03em\",\"--wcm-text-small-regular-text-transform\":\"none\",\"--wcm-text-medium-regular-size\":\"16px\",\"--wcm-text-medium-regular-weight\":\"600\",\"--wcm-text-medium-regular-line-height\":\"20px\",\"--wcm-text-medium-regular-letter-spacing\":\"-0.03em\",\"--wcm-text-medium-regular-text-transform\":\"none\",\"--wcm-font-family\":\"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif\",\"--wcm-font-feature-settings\":\"'tnum' on, 'lnum' on, 'case' on\",\"--wcm-success-color\":\"rgb(38,181,98)\",\"--wcm-error-color\":\"rgb(242, 90, 103)\",\"--wcm-overlay-background-color\":\"rgba(0, 0, 0, 0.3)\",\"--wcm-overlay-backdrop-filter\":\"none\"}}const h={getPreset(e){return He()[e]},setTheme(){const e=document.querySelector(\":root\"),{themeVariables:o}=X.state;if(e){const r=ve(ve(ve({},rt()),He()),o);Object.entries(r).forEach(([a,t])=>e.style.setProperty(a,t))}},globalCss:g`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},at=g`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var lt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,F=(e,o,r,a)=>{for(var t=a>1?void 0:a?it(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&<(o,r,t),t};let T=class extends w{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant=\"default\"}render(){const e={\"wcm-icon-left\":this.iconLeft!==void 0,\"wcm-icon-right\":this.iconRight!==void 0,\"wcm-ghost\":this.variant===\"ghost\",\"wcm-outline\":this.variant===\"outline\"};let o=\"inverse\";return this.variant===\"ghost\"&&(o=\"secondary\"),this.variant===\"outline\"&&(o=\"accent\"),n``}};T.styles=[h.globalCss,at],F([d({type:Boolean})],T.prototype,\"disabled\",2),F([d()],T.prototype,\"iconLeft\",2),F([d()],T.prototype,\"iconRight\",2),F([d()],T.prototype,\"onClick\",2),F([d()],T.prototype,\"variant\",2),T=F([p(\"wcm-button\")],T);const nt=g`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var ct=Object.defineProperty,st=Object.getOwnPropertyDescriptor,ue=(e,o,r,a)=>{for(var t=a>1?void 0:a?st(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&ct(o,r,t),t};let ee=class extends w{constructor(){super(...arguments),this.disabled=!1,this.variant=\"primary\"}render(){const e={\"wcm-secondary\":this.variant===\"secondary\"};return n``}};ee.styles=[h.globalCss,nt],ue([d({type:Boolean})],ee.prototype,\"disabled\",2),ue([d()],ee.prototype,\"variant\",2),ee=ue([p(\"wcm-button-big\")],ee);const dt=g`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var mt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,wt=(e,o,r,a)=>{for(var t=a>1?void 0:a?ht(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&mt(o,r,t),t};let be=class extends w{render(){return n`
      `}};be.styles=[h.globalCss,dt],be=wt([p(\"wcm-info-footer\")],be);const v={CROSS_ICON:C``,WALLET_CONNECT_LOGO:C``,WALLET_CONNECT_ICON:C``,WALLET_CONNECT_ICON_COLORED:C``,BACK_ICON:C``,COPY_ICON:C``,RETRY_ICON:C``,DESKTOP_ICON:C``,MOBILE_ICON:C``,ARROW_DOWN_ICON:C``,ARROW_UP_RIGHT_ICON:C``,ARROW_RIGHT_ICON:C``,QRCODE_ICON:C``,SCAN_ICON:C``,CHECKMARK_ICON:C``,SEARCH_ICON:C``,WALLET_PLACEHOLDER:C``,GLOBE_ICON:C``},pt=g`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var gt=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,ut=(e,o,r,a)=>{for(var t=a>1?void 0:a?vt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&>(o,r,t),t};let fe=class extends w{render(){return n`
      ${v.WALLET_CONNECT_LOGO}
      `}};fe.styles=[h.globalCss,pt],fe=ut([p(\"wcm-modal-backcard\")],fe);const bt=g`main{padding:20px;padding-top:0;width:100%}`;var ft=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,yt=(e,o,r,a)=>{for(var t=a>1?void 0:a?xt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&ft(o,r,t),t};let xe=class extends w{render(){return n`
      `}};xe.styles=[h.globalCss,bt],xe=yt([p(\"wcm-modal-content\")],xe);const $t=g`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var Ct=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Ot=(e,o,r,a)=>{for(var t=a>1?void 0:a?kt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Ct(o,r,t),t};let ye=class extends w{render(){return n`
      `}};ye.styles=[h.globalCss,$t],ye=Ot([p(\"wcm-modal-footer\")],ye);const Wt=g`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var It=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,te=(e,o,r,a)=>{for(var t=a>1?void 0:a?Et(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&It(o,r,t),t};let S=class extends w{constructor(){super(...arguments),this.title=\"\",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return n``}actionBtnTemplate(){return n``}render(){const e={\"wcm-border\":this.border},o=x.state.history.length>1,r=this.title?n`${this.title}`:n``;return n`
      ${o?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
      `}};S.styles=[h.globalCss,Wt],te([d()],S.prototype,\"title\",2),te([d()],S.prototype,\"onAction\",2),te([d()],S.prototype,\"actionIcon\",2),te([d({type:Boolean})],S.prototype,\"border\",2),S=te([p(\"wcm-modal-header\")],S);const c={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:\"WCM_RECENT_WALLET_DATA\",EXPLORER_WALLET_URL:\"https://explorer.walletconnect.com/?type=wallet\",getShadowRootElement(e,o){const r=e.renderRoot.querySelector(o);if(!r)throw new Error(`${o} not found`);return r},getWalletIcon({id:e,image_id:o}){const{walletImages:r}=z.state;return r!=null&&r[e]?r[e]:o?W.getWalletImageUrl(o):\"\"},getWalletName(e,o=!1){return o&&e.length>8?`${e.substring(0,8)}..`:e},isMobileAnimation(){return window.innerWidth<=c.MOBILE_BREAKPOINT},async preloadImage(e){const o=new Promise((r,a)=>{const t=new Image;t.onload=r,t.onerror=a,t.crossOrigin=\"anonymous\",t.src=e});return Promise.race([o,m.wait(3e3)])},getErrorMessage(e){return e instanceof Error?e.message:\"Unknown Error\"},debounce(e,o=500){let r;return(...a)=>{function t(){e(...a)}r&&clearTimeout(r),r=setTimeout(t,o)}},handleMobileLinking(e){const{walletConnectUri:o}=R.state,{mobile:r,name:a}=e,t=r?.native,l=r?.universal;c.setRecentWallet(e);function i(s){let $=\"\";t?$=m.formatUniversalUrl(t,s,a):l&&($=m.formatNativeUrl(l,s,a)),m.openHref($,\"_self\")}o&&i(o)},handleAndroidLinking(){const{walletConnectUri:e}=R.state;e&&(m.setWalletConnectAndroidDeepLink(e),m.openHref(e,\"_self\"))},async handleUriCopy(){const{walletConnectUri:e}=R.state;if(e)try{await navigator.clipboard.writeText(e),N.openToast(\"Link copied\",\"success\")}catch{N.openToast(\"Failed to copy\",\"error\")}},getCustomImageUrls(){const{walletImages:e}=z.state,o=Object.values(e??{});return Object.values(o)},truncate(e,o=8){return e.length<=o?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`},setRecentWallet(e){try{localStorage.setItem(c.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info(\"Unable to set recent wallet\")}},getRecentWallet(){try{const e=localStorage.getItem(c.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info(\"Unable to get recent wallet\")}},caseSafeIncludes(e,o){return e.toUpperCase().includes(o.toUpperCase())},openWalletExplorerUrl(){m.openHref(c.EXPLORER_WALLET_URL,\"_blank\")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:o}=m.getWalletRouterData(),r=Boolean(e?.native),a=Boolean(e?.universal),t=Boolean(o?.native)||Boolean(o?.universal);return{isDesktop:r,isMobile:t,isWeb:a}},goToConnectingView(e){x.setData({Wallet:e});const o=m.isMobile(),{isDesktop:r,isWeb:a,isMobile:t}=c.getCachedRouterWalletPlatforms();o?t?x.push(\"MobileConnecting\"):a?x.push(\"WebConnecting\"):x.push(\"InstallWallet\"):r?x.push(\"DesktopConnecting\"):a?x.push(\"WebConnecting\"):t?x.push(\"MobileQrcodeConnecting\"):x.push(\"InstallWallet\")}},Mt=g`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var Lt=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,$e=(e,o,r,a)=>{for(var t=a>1?void 0:a?Rt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Lt(o,r,t),t};let oe=class extends w{constructor(){super(),this.view=x.state.view,this.prevView=x.state.view,this.unsubscribe=void 0,this.oldHeight=\"0px\",this.resizeObserver=void 0,this.unsubscribe=x.subscribe(e=>{this.view!==e.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{const o=`${e.contentRect.height}px`;this.oldHeight!==\"0px\"&&H(this.routerEl,{height:[this.oldHeight,o]},{duration:.2}),this.oldHeight=o}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,o;(e=this.unsubscribe)==null||e.call(this),(o=this.resizeObserver)==null||o.disconnect()}get routerEl(){return c.getShadowRootElement(this,\".wcm-router\")}get contentEl(){return c.getShadowRootElement(this,\".wcm-content\")}viewTemplate(){switch(this.view){case\"ConnectWallet\":return n``;case\"DesktopConnecting\":return n``;case\"MobileConnecting\":return n``;case\"WebConnecting\":return n``;case\"MobileQrcodeConnecting\":return n``;case\"WalletExplorer\":return n``;case\"Qrcode\":return n``;case\"InstallWallet\":return n``;default:return n`
      Not Found
      `}}async onChangeRoute(){await H(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=x.state.view,H(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return n`
      ${this.viewTemplate()}
      `}};oe.styles=[h.globalCss,Mt],$e([I()],oe.prototype,\"view\",2),$e([I()],oe.prototype,\"prevView\",2),oe=$e([p(\"wcm-modal-router\")],oe);const At=g`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var Pt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,ze=(e,o,r,a)=>{for(var t=a>1?void 0:a?Tt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Pt(o,r,t),t};let ne=class extends w{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=N.subscribe(e=>{e.open?(this.open=!0,this.timeout=setTimeout(()=>N.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var e;(e=this.unsubscribe)==null||e.call(this),clearTimeout(this.timeout),N.closeToast()}render(){const{message:e,variant:o}=N.state,r={\"wcm-success\":o===\"success\",\"wcm-error\":o===\"error\"};return this.open?n`
      ${o===\"success\"?v.CHECKMARK_ICON:null} ${o===\"error\"?v.CROSS_ICON:null}${e}
      `:null}};ne.styles=[h.globalCss,At],ze([I()],ne.prototype,\"open\",2),ne=ze([p(\"wcm-modal-toast\")],ne);const jt=.1,Ve=2.5,A=7;function Ce(e,o,r){return e===o?!1:(e-o<0?o-e:e-o)<=r+jt}function _t(e,o){const r=Array.prototype.slice.call(Je.create(e,{errorCorrectionLevel:o}).modules.data,0),a=Math.sqrt(r.length);return r.reduce((t,l,i)=>(i%a===0?t.push([l]):t[t.length-1].push(l))&&t,[])}const Dt={generate(e,o,r){const a=\"#141414\",t=\"#ffffff\",l=[],i=_t(e,\"Q\"),s=o/i.length,$=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];$.forEach(({x:y,y:u})=>{const O=(i.length-A)*s*y,b=(i.length-A)*s*u,E=.45;for(let M=0;M<$.length;M+=1){const V=s*(A-M*2);l.push(pe``)}});const f=Math.floor((r+25)/s),Ne=i.length/2-f/2,Ze=i.length/2+f/2-1,Se=[];i.forEach((y,u)=>{y.forEach((O,b)=>{if(i[u][b]&&!(ui.length-(A+1)&&bi.length-(A+1))&&!(u>Ne&&uNe&&b{J[y]?J[y].push(u):J[y]=[u]}),Object.entries(J).map(([y,u])=>{const O=u.filter(b=>u.every(E=>!Ce(b,E,s)));return[Number(y),O]}).forEach(([y,u])=>{u.forEach(O=>{l.push(pe``)})}),Object.entries(J).filter(([y,u])=>u.length>1).map(([y,u])=>{const O=u.filter(b=>u.some(E=>Ce(b,E,s)));return[Number(y),O]}).map(([y,u])=>{u.sort((b,E)=>bM.some(V=>Ce(b,V,s)));E?E.push(b):O.push([b])}return[y,O.map(b=>[b[0],b[b.length-1]])]}).forEach(([y,u])=>{u.forEach(([O,b])=>{l.push(pe``)})}),l}},Nt=g`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Zt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,q=(e,o,r,a)=>{for(var t=a>1?void 0:a?St(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Zt(o,r,t),t};let j=class extends w{constructor(){super(...arguments),this.uri=\"\",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e=X.state.themeMode===\"light\"?this.size:this.size-36;return pe`${Dt.generate(this.uri,e,e/4)}`}render(){const e={\"wcm-dark\":X.state.themeMode===\"dark\"};return n`
      ${this.walletId||this.imageUrl?n``:v.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
      `}};j.styles=[h.globalCss,Nt],q([d()],j.prototype,\"uri\",2),q([d({type:Number})],j.prototype,\"size\",2),q([d()],j.prototype,\"imageId\",2),q([d()],j.prototype,\"walletId\",2),q([d()],j.prototype,\"imageUrl\",2),j=q([p(\"wcm-qrcode\")],j);const Bt=g`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ut=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Fe=(e,o,r,a)=>{for(var t=a>1?void 0:a?Ht(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Ut(o,r,t),t};let ce=class extends w{constructor(){super(...arguments),this.onChange=()=>null}render(){return n` ${v.SEARCH_ICON}`}};ce.styles=[h.globalCss,Bt],Fe([d()],ce.prototype,\"onChange\",2),ce=Fe([p(\"wcm-search-input\")],ce);const zt=g`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Vt=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,qt=(e,o,r,a)=>{for(var t=a>1?void 0:a?Ft(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Vt(o,r,t),t};let ke=class extends w{render(){return n``}};ke.styles=[h.globalCss,zt],ke=qt([p(\"wcm-spinner\")],ke);const Qt=g`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Kt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Oe=(e,o,r,a)=>{for(var t=a>1?void 0:a?Yt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Kt(o,r,t),t};let re=class extends w{constructor(){super(...arguments),this.variant=\"medium-regular\",this.color=\"primary\"}render(){const e={\"wcm-big-bold\":this.variant===\"big-bold\",\"wcm-medium-regular\":this.variant===\"medium-regular\",\"wcm-small-regular\":this.variant===\"small-regular\",\"wcm-small-thin\":this.variant===\"small-thin\",\"wcm-xsmall-regular\":this.variant===\"xsmall-regular\",\"wcm-xsmall-bold\":this.variant===\"xsmall-bold\",\"wcm-color-primary\":this.color===\"primary\",\"wcm-color-secondary\":this.color===\"secondary\",\"wcm-color-tertiary\":this.color===\"tertiary\",\"wcm-color-inverse\":this.color===\"inverse\",\"wcm-color-accnt\":this.color===\"accent\",\"wcm-color-error\":this.color===\"error\"};return n``}};re.styles=[h.globalCss,Qt],Oe([d()],re.prototype,\"variant\",2),Oe([d()],re.prototype,\"color\",2),re=Oe([p(\"wcm-text\")],re);const Gt=g`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Xt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,_=(e,o,r,a)=>{for(var t=a>1?void 0:a?Jt(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Xt(o,r,t),t};let L=class extends w{constructor(){super(...arguments),this.onClick=()=>null,this.name=\"\",this.walletId=\"\",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?n`RECENT`:this.installed?n`INSTALLED`:null}handleClick(){Xe.click({name:\"WALLET_BUTTON\",walletId:this.walletId}),this.onClick()}render(){var e;return n``}};L.styles=[h.globalCss,Gt],_([d()],L.prototype,\"onClick\",2),_([d()],L.prototype,\"name\",2),_([d()],L.prototype,\"walletId\",2),_([d()],L.prototype,\"label\",2),_([d()],L.prototype,\"imageId\",2),_([d({type:Boolean})],L.prototype,\"installed\",2),_([d({type:Boolean})],L.prototype,\"recent\",2),L=_([p(\"wcm-wallet-button\")],L);const eo=g`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var to=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,se=(e,o,r,a)=>{for(var t=a>1?void 0:a?oo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&to(o,r,t),t};let Q=class extends w{constructor(){super(...arguments),this.walletId=\"\",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const o=(e=this.imageUrl)!=null&&e.length?this.imageUrl:c.getWalletIcon({id:this.walletId,image_id:this.imageId});return n`${o.length?n`
      \"${this.id}\"
      `:v.WALLET_PLACEHOLDER}`}};Q.styles=[h.globalCss,eo],se([d()],Q.prototype,\"walletId\",2),se([d()],Q.prototype,\"imageId\",2),se([d()],Q.prototype,\"imageUrl\",2),Q=se([p(\"wcm-wallet-image\")],Q);var ro=Object.defineProperty,ao=Object.getOwnPropertyDescriptor,qe=(e,o,r,a)=>{for(var t=a>1?void 0:a?ao(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&ro(o,r,t),t};let We=class extends w{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{e!=null&&e.length&&await Promise.all(e.map(async o=>c.preloadImage(o)))}catch{console.info(\"Unsuccessful attempt at preloading some images\",e)}}async preloadListings(){if(z.state.enableExplorer){await W.getRecomendedWallets(),R.setIsDataLoaded(!0);const{recomendedWallets:e}=W.state,o=e.map(r=>c.getWalletIcon(r));await this.loadImages(o)}else R.setIsDataLoaded(!0)}async preloadCustomImages(){const e=c.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),N.openToast(\"Failed preloading\",\"error\")}}};qe([I()],We.prototype,\"preload\",2),We=qe([p(\"wcm-explorer-context\")],We);var lo=Object.defineProperty,io=Object.getOwnPropertyDescriptor,no=(e,o,r,a)=>{for(var t=a>1?void 0:a?io(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&lo(o,r,t),t};let Qe=class extends w{constructor(){super(),this.unsubscribeTheme=void 0,h.setTheme(),this.unsubscribeTheme=X.subscribe(h.setTheme)}disconnectedCallback(){var e;(e=this.unsubscribeTheme)==null||e.call(this)}};Qe=no([p(\"wcm-theme-context\")],Qe);const co=g`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var so=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,ho=(e,o,r,a)=>{for(var t=a>1?void 0:a?mo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&so(o,r,t),t};let Ie=class extends w{onGoToQrcode(){x.push(\"Qrcode\")}render(){const{recomendedWallets:e}=W.state,o=[...e,...e],r=m.RECOMMENDED_WALLET_AMOUNT*2;return n`
      ${v.MOBILE_ICON}WalletConnect
      ${[...Array(r)].map((a,t)=>{const l=o[t%o.length];return l?n``:v.WALLET_PLACEHOLDER})}
      Select Wallet
      Choose WalletConnect to see supported apps on your device`}};Ie.styles=[h.globalCss,co],Ie=ho([p(\"wcm-android-wallet-selection\")],Ie);const wo=g`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var po=Object.defineProperty,go=Object.getOwnPropertyDescriptor,K=(e,o,r,a)=>{for(var t=a>1?void 0:a?go(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&po(o,r,t),t};let D=class extends w{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=\"\"}svgLoaderTemplate(){var e,o;const r=(o=(e=X.state.themeVariables)==null?void 0:e[\"--wcm-wallet-icon-large-border-radius\"])!=null?o:h.getPreset(\"--wcm-wallet-icon-large-border-radius\");let a=0;r.includes(\"%\")?a=88/100*parseInt(r,10):a=parseInt(r,10),a*=1.17;const t=317-a*1.57,l=425-a*1.8;return n``}render(){const e={\"wcm-error\":this.isError,\"wcm-stale\":this.isStale};return n`
      ${this.svgLoaderTemplate()}
      ${this.isError?\"Connection declined\":this.label}`}};D.styles=[h.globalCss,wo],K([d()],D.prototype,\"walletId\",2),K([d()],D.prototype,\"imageId\",2),K([d({type:Boolean})],D.prototype,\"isError\",2),K([d({type:Boolean})],D.prototype,\"isStale\",2),K([d()],D.prototype,\"label\",2),D=K([p(\"wcm-connector-waiting\")],D);const G={manualWallets(){var e,o;const{mobileWallets:r,desktopWallets:a}=z.state,t=(e=G.recentWallet())==null?void 0:e.id,l=m.isMobile()?r:a,i=l?.filter(s=>t!==s.id);return(o=m.isMobile()?i?.map(({id:s,name:$,links:f})=>({id:s,name:$,mobile:f,links:f})):i?.map(({id:s,name:$,links:f})=>({id:s,name:$,desktop:f,links:f})))!=null?o:[]},recentWallet(){return c.getRecentWallet()},recomendedWallets(e=!1){var o;const r=e||(o=G.recentWallet())==null?void 0:o.id,{recomendedWallets:a}=W.state;return a.filter(t=>r!==t.id)}},Z={onConnecting(e){c.goToConnectingView(e)},manualWalletsTemplate(){return G.manualWallets().map(e=>n`this.onConnecting(e)}\">`)},recomendedWalletsTemplate(e=!1){return G.recomendedWallets(e).map(o=>n`this.onConnecting(o)}\">`)},recentWalletTemplate(){const e=G.recentWallet();if(e)return n`this.onConnecting(e)}\">`}},vo=g`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var uo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,fo=(e,o,r,a)=>{for(var t=a>1?void 0:a?bo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&uo(o,r,t),t};let Ee=class extends w{render(){const{explorerExcludedWalletIds:e,enableExplorer:o}=z.state,r=e!==\"ALL\"&&o,a=Z.manualWalletsTemplate(),t=Z.recomendedWalletsTemplate();let l=[Z.recentWalletTemplate(),...a,...t];l=l.filter(Boolean);const i=l.length>4||r;let s=[];i?s=l.slice(0,3):s=l;const $=Boolean(s.length);return n`
      ${v.MOBILE_ICON}Mobile
      ${v.SCAN_ICON}Scan with your wallet
      ${$?n`
      ${v.DESKTOP_ICON}Desktop
      ${s} ${i?n``:null}
      `:null}`}};Ee.styles=[h.globalCss,vo],Ee=fo([p(\"wcm-desktop-wallet-selection\")],Ee);const xo=g`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var yo=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,Co=(e,o,r,a)=>{for(var t=a>1?void 0:a?$o(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&yo(o,r,t),t};let Me=class extends w{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:o}=z.state;return e??o?n`
      By connecting your wallet to this app, you agree to the app's ${e?n`Terms of Service`:null} ${e&&o?\"and\":null} ${o?n`Privacy Policy`:null}
      `:null}};Me.styles=[h.globalCss,xo],Me=Co([p(\"wcm-legal-notice\")],Me);const ko=g`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var Oo=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,Io=(e,o,r,a)=>{for(var t=a>1?void 0:a?Wo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Oo(o,r,t),t};let Le=class extends w{onQrcode(){x.push(\"Qrcode\")}render(){const{explorerExcludedWalletIds:e,enableExplorer:o}=z.state,r=e!==\"ALL\"&&o,a=Z.manualWalletsTemplate(),t=Z.recomendedWalletsTemplate();let l=[Z.recentWalletTemplate(),...a,...t];l=l.filter(Boolean);const i=l.length>8||r;let s=[];i?s=l.slice(0,7):s=l;const $=Boolean(s.length);return n`${$?n`
      ${s} ${i?n``:null}
      `:null}`}};Le.styles=[h.globalCss,ko],Le=Io([p(\"wcm-mobile-wallet-selection\")],Le);const Eo=g`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var Mo=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Re=(e,o,r,a)=>{for(var t=a>1?void 0:a?Lo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Mo(o,r,t),t};let ae=class extends w{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=ge.subscribe(e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var e;(e=this.unsubscribeModal)==null||e.call(this)}get overlayEl(){return c.getShadowRootElement(this,\".wcm-overlay\")}get containerEl(){return c.getShadowRootElement(this,\".wcm-container\")}toggleBodyScroll(e){if(document.querySelector(\"body\"))if(e){const o=document.getElementById(\"wcm-styles\");o?.remove()}else document.head.insertAdjacentHTML(\"beforeend\",'')}onCloseModal(e){e.target===e.currentTarget&&ge.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const e=c.isMobileAnimation()?{y:[\"50vh\",\"0vh\"]}:{scale:[.98,1]},o=.1,r=.2;await Promise.all([H(this.overlayEl,{opacity:[0,1]},{delay:o,duration:r}).finished,H(this.containerEl,e,{delay:o,duration:r}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=c.isMobileAnimation()?{y:[\"0vh\",\"50vh\"]}:{scale:[1,.98]},o=.2;await Promise.all([H(this.overlayEl,{opacity:[1,0]},{duration:o}).finished,H(this.containerEl,e,{duration:o}).finished]),this.containerEl.removeAttribute(\"style\"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener(\"keydown\",e=>{var o;e.key===\"Escape\"?ge.close():e.key===\"Tab\"&&((o=e.target)!=null&&o.tagName.includes(\"wcm-\")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}render(){const e={\"wcm-overlay\":!0,\"wcm-active\":this.active};return n`
      ${this.open?n`
      `:null}
      `}};ae.styles=[h.globalCss,Eo],Re([I()],ae.prototype,\"open\",2),Re([I()],ae.prototype,\"active\",2),ae=Re([p(\"wcm-modal\")],ae);const Ro=g`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var Ao=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,le=(e,o,r,a)=>{for(var t=a>1?void 0:a?Po(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Ao(o,r,t),t};let B=class extends w{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){m.isMobile()?x.replace(\"MobileConnecting\"):x.replace(\"MobileQrcodeConnecting\")}onDesktop(){x.replace(\"DesktopConnecting\")}onWeb(){x.replace(\"WebConnecting\")}render(){return n`
      ${this.isRetry?n``:null} ${this.isMobile?n`Mobile`:null} ${this.isDesktop?n`Desktop`:null} ${this.isWeb?n`Web`:null}
      `}};B.styles=[h.globalCss,Ro],le([d({type:Boolean})],B.prototype,\"isMobile\",2),le([d({type:Boolean})],B.prototype,\"isDesktop\",2),le([d({type:Boolean})],B.prototype,\"isWeb\",2),le([d({type:Boolean})],B.prototype,\"isRetry\",2),B=le([p(\"wcm-platform-selection\")],B);const To=g`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var jo=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,Do=(e,o,r,a)=>{for(var t=a>1?void 0:a?_o(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&jo(o,r,t),t};let Ae=class extends w{onClick(){x.push(\"WalletExplorer\")}render(){const{recomendedWallets:e}=W.state,o=G.manualWallets(),r=[...e,...o].reverse().slice(0,4);return n``}};Ae.styles=[h.globalCss,To],Ae=Do([p(\"wcm-view-all-wallets-button\")],Ae);const No=g`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Zo=Object.defineProperty,So=Object.getOwnPropertyDescriptor,de=(e,o,r,a)=>{for(var t=a>1?void 0:a?So(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Zo(o,r,t),t};let Y=class extends w{constructor(){super(),this.walletId=\"\",this.imageId=\"\",this.uri=\"\",setTimeout(()=>{const{walletConnectUri:e}=R.state;this.uri=e},0)}get overlayEl(){return c.getShadowRootElement(this,\".wcm-qr-container\")}render(){return n`
      ${this.uri?n``:n``}
      `}};Y.styles=[h.globalCss,No],de([d()],Y.prototype,\"walletId\",2),de([d()],Y.prototype,\"imageId\",2),de([I()],Y.prototype,\"uri\",2),Y=de([p(\"wcm-walletconnect-qr\")],Y);var Bo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,Ho=(e,o,r,a)=>{for(var t=a>1?void 0:a?Uo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Bo(o,r,t),t};let Pe=class extends w{viewTemplate(){return m.isAndroid()?n``:m.isMobile()?n``:n``}render(){return n`${this.viewTemplate()}`}};Pe.styles=[h.globalCss],Pe=Ho([p(\"wcm-connect-wallet-view\")],Pe);const zo=g`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Vo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Ke=(e,o,r,a)=>{for(var t=a>1?void 0:a?Fo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Vo(o,r,t),t};let me=class extends w{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:o,name:r}=m.getWalletRouterData(),a=o?.native;if(a){const t=m.formatNativeUrl(a,e,r);m.openHref(t,\"_self\")}}openDesktopApp(){const{walletConnectUri:e}=R.state,o=m.getWalletRouterData();c.setRecentWallet(o),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:o,image_id:r}=m.getWalletRouterData(),{isMobile:a,isWeb:t}=c.getCachedRouterWalletPlatforms();return n`${`Connection can continue loading if ${e} is not installed on your device`}Retry`}};me.styles=[h.globalCss,zo],Ke([I()],me.prototype,\"isError\",2),me=Ke([p(\"wcm-desktop-connecting-view\")],me);const qo=g`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Qo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,Yo=(e,o,r,a)=>{for(var t=a>1?void 0:a?Ko(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Qo(o,r,t),t};let Te=class extends w{onInstall(e){e&&m.openHref(e,\"_blank\")}render(){const{name:e,id:o,image_id:r,homepage:a}=m.getWalletRouterData();return n`${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}this.onInstall(a)}\" .iconLeft=\"${v.ARROW_DOWN_ICON}\">Download`}};Te.styles=[h.globalCss,qo],Te=Yo([p(\"wcm-install-wallet-view\")],Te);const Go=g`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Ye=(e,o,r,a)=>{for(var t=a>1?void 0:a?Jo(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&Xo(o,r,t),t};let he=class extends w{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,o=!1){const{mobile:r,name:a}=m.getWalletRouterData(),t=r?.native,l=r?.universal;if(t&&!o){const i=m.formatNativeUrl(t,e,a);m.openHref(i,\"_self\")}else if(l){const i=m.formatUniversalUrl(l,e,a);m.openHref(i,\"_self\")}}openMobileApp(e=!1){const{walletConnectUri:o}=R.state,r=m.getWalletRouterData();c.setRecentWallet(r),o&&this.onFormatAndRedirect(o,e)}onGoToAppStore(e){e&&m.openHref(e,\"_blank\")}render(){const{name:e,id:o,image_id:r,app:a,mobile:t}=m.getWalletRouterData(),{isWeb:l}=c.getCachedRouterWalletPlatforms(),i=a?.ios,s=t?.universal;return n`this.openMobileApp(!1)}\" .iconRight=\"${v.RETRY_ICON}\">Retry${s?n`Still doesn't work? this.openMobileApp(!0)}\">Try this alternate link`:null}
      ${`Get ${e}`}
      this.onGoToAppStore(i)}\" variant=\"ghost\">App Store
      `}};he.styles=[h.globalCss,Go],Ye([I()],he.prototype,\"isError\",2),he=Ye([p(\"wcm-mobile-connecting-view\")],he);const er=g`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var tr=Object.defineProperty,or=Object.getOwnPropertyDescriptor,rr=(e,o,r,a)=>{for(var t=a>1?void 0:a?or(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&tr(o,r,t),t};let je=class extends w{render(){const{name:e,id:o,image_id:r}=m.getWalletRouterData(),{isDesktop:a,isWeb:t}=c.getCachedRouterWalletPlatforms();return n`${`Scan this QR Code with your phone's camera or inside ${e} app`}`}};je.styles=[h.globalCss,er],je=rr([p(\"wcm-mobile-qr-connecting-view\")],je);var ar=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,ir=(e,o,r,a)=>{for(var t=a>1?void 0:a?lr(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&ar(o,r,t),t};let _e=class extends w{render(){return n``}};_e.styles=[h.globalCss],_e=ir([p(\"wcm-qrcode-view\")],_e);const nr=g`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var cr=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,ie=(e,o,r,a)=>{for(var t=a>1?void 0:a?sr(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&cr(o,r,t),t};const De=40;let U=class extends w{constructor(){super(...arguments),this.loading=!W.state.wallets.listings.length,this.firstFetch=!W.state.wallets.listings.length,this.search=\"\",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=c.debounce(e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,W.resetSearch(),this.fetchWallets()):this.search&&(this.search=\"\",this.endReached=this.isLastPage(),W.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;(e=this.intersectionObserver)==null||e.disconnect()}get placeholderEl(){return c.getShadowRootElement(this,\".wcm-placeholder-block\")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([e])=>{e.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:o}=W.state,{listings:r,total:a}=this.search?o:e;return a<=De||r.length>=a}async fetchWallets(){var e;const{wallets:o,search:r}=W.state,{listings:a,total:t,page:l}=this.search?r:o;if(!this.endReached&&(this.firstFetch||t>De&&a.lengthc.getWalletIcon(f));await Promise.all([...$.map(async f=>c.preloadImage(f)),m.wait(300)]),this.endReached=this.isLastPage()}catch(i){console.error(i),N.openToast(c.getErrorMessage(i),\"error\")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){m.isAndroid()?c.handleMobileLinking(e):c.goToConnectingView(e)}onSearchChange(e){const{value:o}=e.target;this.searchDebounce(o)}render(){const{wallets:e,search:o}=W.state,{listings:r}=this.search?o:e,a=this.loading&&!r.length,t=this.search.length>=3;let l=Z.manualWalletsTemplate(),i=Z.recomendedWalletsTemplate(!0);t&&(l=l.filter(({values:f})=>c.caseSafeIncludes(f[0],this.search)),i=i.filter(({values:f})=>c.caseSafeIncludes(f[0],this.search)));const s=!this.loading&&!r.length&&!i.length,$={\"wcm-loading\":a,\"wcm-end-reached\":this.endReached||!this.loading,\"wcm-empty\":s};return n`
      ${a?null:l} ${a?null:i} ${a?null:r.map(f=>n`${f?n`this.onConnect(f)}\">`:null}`)}
      ${s?n`No results found`:null} ${!s&&this.loading?n``:null}
      `}};U.styles=[h.globalCss,nr],ie([I()],U.prototype,\"loading\",2),ie([I()],U.prototype,\"firstFetch\",2),ie([I()],U.prototype,\"search\",2),ie([I()],U.prototype,\"endReached\",2),U=ie([p(\"wcm-wallet-explorer-view\")],U);const dr=g`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var mr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,Ge=(e,o,r,a)=>{for(var t=a>1?void 0:a?hr(o,r):o,l=e.length-1,i;l>=0;l--)(i=e[l])&&(t=(a?i(o,r,t):i(t))||t);return a&&t&&mr(o,r,t),t};let we=class extends w{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:o,name:r}=m.getWalletRouterData(),a=o?.universal;if(a){const t=m.formatUniversalUrl(a,e,r);m.openHref(t,\"_blank\")}}openWebWallet(){const{walletConnectUri:e}=R.state,o=m.getWalletRouterData();c.setRecentWallet(o),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:o,image_id:r}=m.getWalletRouterData(),{isMobile:a,isDesktop:t}=c.getCachedRouterWalletPlatforms(),l=m.isMobile();return n`${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};we.styles=[h.globalCss,dr],Ge([I()],we.prototype,\"isError\",2),we=Ge([p(\"wcm-web-connecting-view\")],we);export{ae as WcmModal,j as WcmQrCode};\n//# sourceMappingURL=index.js.map\n"],"names":["AssetDirectionEnum","TransactionTypeEnum","TransactionStatusEnum","ErrorTypeEnum","WalletPlatformEnum","TransactionListenerProcessIndex","global","bind","fn","thisArg","toString","getPrototypeOf","kindOf","cache","thing","str","kindOfTest","type","typeOfTest","isArray","isUndefined","isBuffer","val","isFunction","isArrayBuffer","isArrayBufferView","result","isString","isNumber","isObject","isBoolean","isPlainObject","prototype","isDate","isFile","isBlob","isFileList","isStream","isFormData","kind","isURLSearchParams","trim","forEach","obj","allOwnKeys","i","l","keys","len","key","findKey","_key","_global","isContextDefined","context","merge","caseless","assignValue","targetKey","extend","a","b","stripBOM","content","inherits","constructor","superConstructor","props","descriptors","toFlatObject","sourceObj","destObj","filter","propFilter","prop","merged","endsWith","searchString","position","lastIndex","toArray","arr","isTypedArray","TypedArray","forEachEntry","iterator","pair","matchAll","regExp","matches","isHTMLForm","toCamelCase","m","p1","p2","hasOwnProperty","isRegExp","reduceDescriptors","reducer","reducedDescriptors","descriptor","name","ret","freezeMethods","value","toObjectSet","arrayOrString","delimiter","define","noop","toFiniteNumber","defaultValue","ALPHA","DIGIT","ALPHABET","generateString","size","alphabet","length","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","utils$b","buffer","base64Js","byteLength","toByteArray","fromByteArray","lookup","revLookup","Arr","code","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","tmp","curByte","tripletToBase64","num","encodeChunk","uint8","start","end","output","extraBytes","parts","maxChunkLength","len2","ieee754","offset","isLE","mLen","nBytes","e","eLen","eMax","eBias","nBits","d","s","c","rt","exports","base64","ieee754$1","customInspectSymbol","Buffer","SlowBuffer","K_MAX_LENGTH","GlobalUint8Array","GlobalArrayBuffer","GlobalSharedArrayBuffer","typedArraySupport","proto","createBuffer","buf","arg","encodingOrOffset","allocUnsafe","from","fromString","fromArrayView","isInstance","fromArrayBuffer","valueOf","fromObject","assertSize","alloc","fill","encoding","checked","string","actual","fromArrayLike","array","arrayView","copy","byteOffset","numberIsNaN","x","y","list","pos","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","max","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","dir","arrayIndexOf","indexSize","arrLength","valLength","read","foundIndex","found","j","hexWrite","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","out","hexSliceLookupTable","bytes","newBuf","checkOffset","ext","noAssert","mul","defineBigIntMethod","validateNumber","first","last","boundsError","lo","hi","checkInt","min","maxBytes","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","limit","sub","checkIEEE754","writeFloat","littleEndian","writeDouble","targetStart","errors","E","sym","getMessage","Base","range","input","msg","received","addNumericalSeparator","checkBounds","INVALID_BASE64_RE","base64clean","units","leadSurrogate","byteArray","src","dst","table","i16","BufferBigIntNotDefined","Blob","BlobOptions","Buffer$1","File","FileOptions","INSPECT_MAX_BYTES","TranscodeEncoding","atob","btoa","constants","isAscii","isUtf8","kMaxLength","kStringMaxLength","resolveObjectURL","transcode","AxiosError","message","config","request","response","utils","error","customProps","axiosError","httpAdapter","isVisitable","removeBrackets","renderKey","path","dots","token","isFlatArray","predicates","toFormData","formData","options","option","metaTokens","visitor","defaultVisitor","indexes","useBlob","convertValue","el","index","exposedHelpers","build","encode","charMap","match","AxiosURLSearchParams","params","encoder","_encode","buildURL","url","serializeFn","serializedParams","hashmarkIndex","InterceptorManager","fulfilled","rejected","id","h","InterceptorManager$1","transitionalDefaults","platform$1","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","platform","toURLEncodedForm","data","helpers","parsePropPath","arrayToObject","formDataToJSON","buildPath","isNumericKey","isLast","stringifySafely","rawValue","parser","defaults","headers","contentType","hasJSONContentType","isObjectPayload","_FormData","transitional","forcedJSONParsing","JSONRequested","strictJSONParsing","status","method","defaults$2","ignoreDuplicateOf","parseHeaders","rawHeaders","line","$internals","normalizeHeader","header","normalizeValue","parseTokens","tokens","tokensRE","isValidHeaderName","matchHeaderValue","isHeaderNameFilter","formatHeader","w","char","buildAccessors","accessorName","methodName","arg1","arg2","arg3","AxiosHeaders","valueOrRewrite","rewrite","self","setHeader","_value","_header","_rewrite","lHeader","setHeaders","matcher","deleted","deleteHeader","format","normalized","targets","asStrings","computed","accessors","defineAccessor","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","CanceledError","settle","resolve","reject","validateStatus","cookies","expires","domain","secure","cookie","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","isURLSameOrigin","msie","urlParsingNode","originURL","resolveURL","href","requestURL","parseProtocol","speedometer","samplesCount","timestamps","head","tail","firstSampleTS","chunkLength","now","startedAt","bytesCount","passed","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","progressBytes","rate","inRange","knownAdapters","requestData","requestHeaders","responseType","withXSRFToken","onCanceled","done","username","password","fullPath","onloadend","responseHeaders","err","timeoutErrorMessage","xsrfValue","cancel","protocol","renderReason","reason","isResolvedHandle","adapter","adapters$1","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","configValue","VERSION","validators","deprecatedWarnings","validators$1","validator","version","formatMessage","opt","desc","opts","assertOptions","schema","allowUnknown","validator$1","Axios","instanceConfig","configOrUrl","dummy","paramsSerializer","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","generateHTTPMethod","isForm","Axios$1","CancelToken","executor","resolvePromise","onfulfilled","_resolve","CancelToken$1","spread","callback","isAxiosError","payload","HttpStatusCode","HttpStatusCode$1","createInstance","defaultConfig","instance","axios","promises","axios$1","number","bool","isBytes","lengths","hash","exists","checkFinished","assert$5","U32_MASK64","_32n","fromBig","le","split","lst","Ah","Al","rotlSH","rotlSL","rotlBH","rotlBL","u32","toBytes","Hash$8","wrapConstructor","hashCons","hashC","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_0n","_1n","_2n","_7n","_256n","_0x71n","round","R","t","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","rounds","B","idx1","idx0","B0","B1","Th","Tl","curH","curL","shift","PI","Hash","blockLen","suffix","outputLen","enableXOF","take","bufferOut","to","Keccak","gen","keccak_224","keccak_256","keccak_384","keccak_512","assert","wrapHash","webCrypto","nodeRequire","keccak256","k","JSONRPC_ERR_REJECTED_REQUEST","JSONRPC_ERR_UNAUTHORIZED","JSONRPC_ERR_UNSUPPORTED_METHOD","JSONRPC_ERR_DISCONNECTED","JSONRPC_ERR_CHAIN_DISCONNECTED","ERR_INVALID_BYTES","ERR_INVALID_NUMBER","ERR_INVALID_HEX","ERR_VALIDATION","ERR_SCHEMA_FORMAT","ERR_RPC_INVALID_JSON","ERR_RPC_INVALID_REQUEST","ERR_RPC_INVALID_METHOD","ERR_RPC_INVALID_PARAMS","ERR_RPC_INTERNAL_ERROR","ERR_RPC_INVALID_INPUT","ERR_RPC_MISSING_RESOURCE","ERR_RPC_UNAVAILABLE_RESOURCE","ERR_RPC_TRANSACTION_REJECTED","ERR_RPC_UNSUPPORTED_METHOD","ERR_RPC_LIMIT_EXCEEDED","ERR_RPC_NOT_SUPPORTED","BaseWeb3Error","innerError","unquotValue","_","v","InvalidValueError","InvalidBytesError","InvalidNumberError","HexProcessingError","genericRpcErrorMessageTemplate","RpcErrorMessages","RpcError","rpcError","ParseError","InvalidRequestError","MethodNotFoundError","InvalidParamsError","InternalError","InvalidInputError","MethodNotSupported","ResourceUnavailableError","ResourcesNotFoundError","VersionNotSupportedError","TransactionRejectedError","LimitExceededError","rpcErrorsMap","SchemaFormatError","util","assertIs","_arg","assertNever","_x","items","item","validKeys","filtered","object","checker","joinValues","separator","objectUtil","second","ZodParsedType","getParsedType","ZodIssueCode","quotelessJson","ZodError","issues","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","curr","formErrors","errorMap","_ctx","overrideErrorMap","setErrorMap","map","getErrorMap","makeIssue","errorMaps","issueData","fullIssue","errorMessage","maps","EMPTY_PATH","addIssueToContext","ctx","ParseStatus","results","arrayValue","INVALID","pairs","syncPairs","finalObject","DIRTY","OK","isAborted","isDirty","isValid","isAsync","errorUtil","ParseInputLazyPath","parent","handleResult","processCreateParams","invalid_type_error","required_error","description","iss","ZodType","def","_a","maybeAsyncResult","check","getIssueProperties","setError","refinementData","refinement","ZodEffects","ZodFirstPartyTypeKind","ZodOptional","ZodNullable","ZodArray","ZodPromise","ZodUnion","incoming","ZodIntersection","transform","defaultValueFunc","ZodDefault","ZodBranded","catchValueFunc","ZodCatch","This","ZodPipeline","ZodReadonly","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","emailRegex","_emojiRegex","emojiRegex","ipv4Regex","ipv6Regex","datetimeRegex","args","isValidIP","ip","ZodString","tooBig","tooSmall","regex","validation","minLength","maxLength","ch","floatSafeRemainder","step","valDecCount","stepDecCount","decCount","valInt","stepInt","ZodNumber","inclusive","ZodBigInt","ZodBoolean","ZodDate","minDate","maxDate","ZodSymbol","ZodUndefined","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodVoid","deepPartialify","ZodObject","newShape","fieldSchema","ZodTuple","shape","shapeKeys","extraKeys","keyValidator","unknownKeys","catchall","_b","_c","_d","defaultError","augmentation","merging","mask","newField","createZodEnum","handleResults","unionErrors","childCtx","dirty","types","getDiscriminator","ZodLazy","ZodLiteral","ZodEnum","ZodNativeEnum","ZodDiscriminatedUnion","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","left","right","itemIndex","rest","schemas","ZodRecord","keyType","valueType","third","ZodMap","finalMap","ZodSet","finalizeSet","elements","parsedSet","element","minSize","maxSize","ZodFunction","makeArgsIssue","makeReturnsIssue","returns","me","parsedArgs","parsedReturns","returnType","func","getter","values","expectedValues","enumValues","nativeEnumValues","promisified","effect","checkCtx","processed","executeRefinement","acc","inner","base","preprocess","newCtx","ZodNaN","BRAND","inResult","custom","fatal","p","_fatal","late","instanceOfType","cls","stringType","numberType","nanType","bigIntType","booleanType","dateType","symbolType","undefinedType","nullType","anyType","unknownType","neverType","voidType","arrayType","objectType","strictObjectType","unionType","discriminatedUnionType","intersectionType","tupleType","recordType","mapType","setType","functionType","lazyType","literalType","enumType","nativeEnumType","promiseType","effectsType","optionalType","nullableType","preprocessType","pipelineType","z","errorFormatter","Web3ValidatorError","VALID_ETH_BASE_TYPES","isAbiParameterSchema","isHexStrict","hex","isHex","extraTypes","parseBaseType","strippedType","baseTypeSize","arraySizes","convertEthType","parentSchema","baseType","abiSchemaToJsonSchema","abis","level","abi","abiType","abiName","abiComponents","childSchema","lastSchema","nestedTuple","arraySize","ethAbiToJsonSchema","fetchArrayElement","transformJsonDataToAbiFormat","transformedData","newData","dataItem","tupleData","tupleItem","nestedItems","nestedData","nestedItem","codePointToInt","hexToNumber","negative","hexValue","numberToHex","padLeft","characterAmount","sign","prefix","uint8ArrayToHexString","uint8Array","hexString","charCodeMap","charCodeToBase16","hexToUint8Array","nibbleLeft","nibbleRight","ensureIfUint8Array","isUint8Array","valueToCheck","checkAddressCheckSum","address","updatedData","addressHash","isAddress","checkChecksum","FMT_NUMBER","FMT_BYTES","BlockTags","HardforksOrdered","this","bigintPower","expo","isUInt","isInt","isBlockNumber","isBlockTag","isBlockNumberOrTag","isBloom","bloom","isNullish","isTopic","topic","isFilterObject","expectedFilterProperties","property","nestedTopic","formats","bitSize","convertToZod","zItem","nextSchema","zodArraySchema","oneOfSchema","Validator","keyword","schemaPath","field","instancePath","Web3Validator","jsonSchema","bytesToUint8Array","validatorUtils.hexToUint8Array","validatorUtils","bytesToHex","hexstrict","updatedValue","validatorUtils.numberToHex","utf8ToHex","strWithoutNullCharacter","toHex","has","Events","EE","once","addListener","emitter","event","evt","clearEvent","EventEmitter","names","events","handlers","ee","listeners","a1","a2","a3","a4","a5","module","isNumeric","mathceil","mathfloor","bignumberError","tooManyDigits","BASE","LOG_BASE","MAX_SAFE_INTEGER","POWS_TEN","SQRT_BASE","MAX","clone","configObject","div","convertBase","parseNumeric","P","BigNumber","ONE","DECIMAL_PLACES","ROUNDING_MODE","TO_EXP_NEG","TO_EXP_POS","MIN_EXP","MAX_EXP","CRYPTO","MODULO_MODE","POW_PRECISION","FORMAT","alphabetHasNormalDecimalDigits","caseChanged","isNum","intCheck","maxOrMin","pow2_53","random53bitInt","dp","rand","sum","decimal","toBaseOut","baseIn","baseOut","arrL","callerIsToString","r","xc","rm","toFixedPoint","coeffToString","multiply","temp","xlo","xhi","carry","klo","khi","compare","aL","bL","cmp","subtract","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","yc","bitFloor","c0","ne","toExponential","normalise","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","sd","ni","rd","pows10","half","isModExp","nIsBig","nIsNeg","nIsOdd","isOdd","xLTy","xe","ye","xcL","ycL","ylo","yhi","zc","sqrtBase","rep","g1","g2","groupSeparator","intPart","fractionPart","isNeg","intDigits","md","d0","d1","d2","exp","n0","n1","zs","browser","BASE58_ALPHABET","decimals","newValue","base58Encode","base58Array","remainder","base58Decode","valueHex","bufferToString","stringToBuffer","sleep","ms","objectsEqual","o1","o2","toReadableString","coefficient","exponent","checkWebSocket","socket","NodeWebSocket","navigator","standalone","userAgent","safari","checkType","resolveProperties","accum","defineProperties","stringify","HEX","isError","isCallException","makeError","info","shortMessage","details","assertArgument","assertArgumentCount","count","expectedCount","_normalizeForms","form","expected","assertNormalize","assertPrivate","givenGuard","guard","className","operation","_getBytes","getBytes","getBytesCopy","isHexString","isBytesLike","HexCharacters","hexlify","concat","datas","dataLength","dataSlice","stripZerosLeft","zeroPad","zeroPadValue","zeroPadBytes","BN_0","BN_1","maxValue","fromTwos","_width","getUint","width","getNumber","toTwos","getBigInt","_bits","bits","Nibbles","toBigInt","toNumber","toBeHex","toBeArray","toQuantity","Alphabet","Lookup","getAlpha","letter","BN_58","encodeBase58","decodeBase58","decodeBase64","textData","encodeBase64","_data","EventPayload","__publicField","__privateAdd","_listener","__privateSet","__privateGet","errorFunc","badCodepoint","ignoreFunc","replaceFunc","Utf8ErrorFuncs","getUtf8CodePoints","_bytes","onError","extraLength","overlongMask","nextChar","toUtf8Bytes","c2","_toUtf8String","toUtf8String","toUtf8CodePoints","createGetUrl","getUrl","req","_signal","signal","controller","init","resp","respBody","body","MAX_ATTEMPTS","SLOT_INTERVAL","defaultGetUrlFunc","reData","reIpfs","locked","dataGatewayFunc","FetchResponse","unpercent","FetchRequest","getIpfsGatewayFunc","baseUrl","gatewayIpfs","Gateways","fetchSignals","FetchCancelSignal","_listeners","_cancelled","checkSignal","_FetchRequest","_send","_allowInsecure","_gzip","_headers","_method","_timeout","_url","_body","_bodyType","_creds","_preflight","_process","_retry","_throttle","_getUrlFunc","timeout","preflight","process","retry","__privateMethod","send_fn","getTime","location","current","scheme","attempt","delay","_request","_response","wait","retryAfter","_FetchResponse","statusCode","statusMessage","_statusCode","_statusMessage","_error","stall","requestUrl","responseBody","all","BN_N1","BN_5","_guard","Zeros","getTens","checkValue","safeOp","getFormat","signed","_FixedNumber","_checkFormat","_checkValue","_add","_sub","_mul","_div","_format","_val","_tens","other","add_fn","sub_fn","mul_fn","checkFormat_fn","checkValue_fn","div_fn","delta","bump","tens","_decimals","whole","FixedNumber","o","hexlifyByte","unarrayifyInteger","_decodeChildren","childOffset","decoded","_decode","lengthLength","decodeRlp","arrayifyInteger","child","nibbles","encodeRlp","formatUnits","unit","parseUnits","formatEther","wei","parseEther","ether","uuidV4","randomBytes","WordSize","Padding","passProperties","throwError","wrapped","_Result","wrap","_names","nameCounts","receiver","Result","checkResultErrors","checkErrors","childPath","getValue","Coder","localName","dynamic","Writer","_writeData","_dataLength","writer","writeData_fn","paddingOffset","_Reader","allowLoose","maxInflation","_incrementBytesRead","_peekBytes","_offset","_bytesRead","_parent","_maxInflation","reader","loose","peekBytes_fn","incrementBytesRead_fn","Reader","alignedLength","crypto","u8a","createView","rotr","word","nextTick","asyncLoop","iters","tick","cb","ts","diff","concatBytes","arrays","pad","Hash$7","toStr","checkOpts","bytesLength","assertHash","assertExists","assertBytes","oHash","iHash","finished","destroyed","hmac","HMAC","pbkdf2Init","_password","_salt","_opts","dkLen","asyncTick","assertNumber","salt","DK","PRF","PRFSalt","pbkdf2Output","prfW","u","pbkdf2","view","ti","Ti","ui","setBigUint64","_u32_max","wh","wl","SHA2","padOffset","dataView","oview","outLen","Chi","Maj","SHA256_K","IV","SHA256_W","SHA256","A","C","D","F","G","H","W15","W2","s0","s1","sigma1","T1","T2","sha256","toBig","shrSH","_l","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","_h","rotr32L","add","Bh","Bl","u64$1","Cl","low","Ch","Dl","Dh","Eh","El","SHA512_Kh","SHA512_Kl","u64","SHA512_W_H","SHA512_W_L","Fh","Fl","Gh","Gl","Hh","Hl","W15h","W15l","s0h","s0l","W2h","W2l","s1h","s1l","SUMl","SUMh","sigma1h","sigma1l","CHIh","CHIl","T1ll","T1h","T1l","sigma0h","sigma0l","MAJh","MAJl","All","sha512","SHA512","getGlobal","anyGlobal","createHash","algo","createHmac","_algo","pbkdf2Sync","iterations","keylen","_computeHmac","algorithm","__computeHmac","computeHmac","_keccak256","__keccak256","Rho","Id","Pi","idxL","idxR","shifts","shiftsL","idx","shiftsR","Kl","Kr","rotl","f","group","BUF","RIPEMD160","h0","h1","h2","h3","h4","al","ar","bl","br","cl","cr","dl","dr","er","rGroup","hbl","hbr","rl","rr","sl","sr","tl","tr","ripemd160","_ripemd160","noble_ripemd160","__ripemd160","ripemd160$1","_pbkdf2","__pbkdf2","_randomBytes","crypto_random","__randomBytes","XorAndSalsa","prev","pi","ii","oi","y00","y01","y02","y03","y04","y05","y06","y07","y08","y09","y10","y11","y12","y13","y14","y15","x00","x01","x02","x03","x04","x05","x06","x07","x08","x09","x10","x11","x12","x13","x14","x15","BlockMix","scryptInit","N","maxmem","onProgress","blockSize","blockSize32","memUsed","B32","V","blockMixCb","totalBlockMix","callbackPer","blockMixCnt","scryptOutput","scrypt","scryptAsync","lockedSync","lockedAsync","_scryptAsync","passwd","_nobleAsync","_scryptSync","_nobleSync","__scryptAsync","__scryptSync","_passwd","progress","scryptSync","_sha256","_sha512","__sha256","__sha512","locked256","locked512","sha256$4","sha512$4","hexes","numberToHexUnpadded","hexToBytes","hexByte","byte","bytesToNumberBE","bytesToNumberLE","numberToBytesBE","numberToBytesLE","numberToVarBytesBE","ensureBytes","title","expectedLength","equalBytes","b1","b2","bitLen","bitGet","bitSet","bitMask","u8n","u8fr","createHmacDrbg","hashLen","qByteLen","hmacFn","reset","reseed","seed","pred","validatorFns","validateObject","optValidators","checkField","fieldName","isOptional","checkVal","_3n","_4n","_5n","_8n","mod","pow","power","modulo","pow2","invert","tonelliShanks","legendreC","Q","S","Z","p1div4","Fp","root","Q1div2","g","t2","ge","FpSqrt","c1","n2","nv","FIELD_FIELDS","validateField","initial","FpPow","FpInvertBatch","nums","lastMultiplied","inverted","nLength","nBitLength","_nBitLength","nByteLength","Field","ORDER","redef","BITS","BYTES","sqrtP","lhs","rhs","getFieldBytesLength","fieldOrder","bitLength","getMinHashLength","mapHashToField","fieldLen","minLen","reduced","wNAF","constTimeNegate","condition","neg","W","windows","windowSize","elm","points","window","precomputes","maxNumber","shiftBy","wbits","offset1","offset2","cond1","cond2","precomputesMap","comp","validateBasic","curve","validatePointOpts","ut.validateObject","endo","b2n","h2b","ut","DER","sBytes","rBytesLeft","sig","slice","shl","rhl","weierstrassPoints","CURVE","point","_isCompressed","ut.concatBytes","fromBytes","weierstrassEquation","x2","x3","isWithinCurveOrder","assertGE","normPrivateKeyToScalar","wrapPrivateKey","ut.bytesToHex","ut.bytesToNumberBE","mod.mod","pointPrecomputes","assertPrjPoint","Point","px","py","pz","is0","toInv","privateKey","X1","Y1","Z1","X2","Y2","Z2","U1","U2","b3","X3","Y3","Z3","t0","t1","t3","t4","t5","wnaf","I","k1neg","k1","k2neg","k2","k1p","k2p","scalar","fake","f1p","f2p","iz","ax","ay","zz","cofactor","isTorsionFree","clearCofactor","isCompressed","validateOpts","weierstrass","curveDef","CURVE_ORDER","compressedLen","uncompressedLen","isValidFieldElement","modN","invN","mod.invert","cat","y2","isYOdd","numToNByteStr","ut.numberToBytesBE","isBiggerThanHalfOrder","HALF","normalizeS","slcNum","Signature","recovery","msgHash","rec","bits2int_modN","radj","ir","u1","u2","ut.hexToBytes","mod.getMinHashLength","mod.mapHashToField","getPublicKey","isProbPub","getSharedSecret","privateA","publicB","bits2int","ORDER_MASK","ut.bitMask","int2octets","prepSig","defaultSigOpts","lowS","prehash","ent","h1int","seedArgs","k2sig","kBytes","ik","normS","defaultVerOpts","privKey","ut.createHmacDrbg","verify","signature","publicKey","sg","_sig","derError","is","getHash","msgs","createCurve","defHash","create","secp256k1P","secp256k1N","divNearest","sqrtMod","_6n","_11n","_22n","_23n","_44n","_88n","b6","b9","b11","b22","b44","b88","b176","b220","b223","secp256k1","POW_2_128","ZeroAddress","ZeroHash","WeiPerEther","MaxUint256","MinInt256","MaxInt256","EtherSymbol","MessagePrefix","BN_2","BN_27","BN_28","BN_35","toUint256","_Signature","_r","_s","_v","_networkV","yParityAndS","networkV","bv","chainId","assertError","yParity","_SigningKey","_privateKey","digest","pubKey","compressed","pub","secpSig","p0","pub0","pub1","SigningKey","lock","BN_36","getChecksumAddress","chars","expanded","hashed","ibanLookup","safeDigits","ibanChecksum","block","checksum","Base36","fromBase36","getAddress","getIcapAddress","base36","getCreateAddress","tx","nonceHex","getCreate2Address","_from","_initCodeHash","initCodeHash","isAddressable","checkAddress","resolveAddress","resolver","_gaurd","Typed","_typedSymbol","_Typed","gaurd","_options","AddressCoder","AnonymousCoder","coder","pack","coders","arrayValues","unique","staticWriter","dynamicWriter","updateFuncs","dynamicOffset","updateFunc","baseOffset","unpack","baseReader","offsetReader","ArrayCoder","defaultChild","BooleanCoder","DynamicBytesCoder","BytesCoder","FixedBytesCoder","Empty","NullCoder","BN_MAX_UINT256","NumberCoder","maxUintValue","bounds","StringCoder","TupleCoder","uniqueNames","COMPRESSED$1","FENCED","NSM_MAX","decode_arithmetic","u16","symbol_count","skip","pos_payload","read_width","read_buffer","read_bit","FULL","QRTR","MASK","register","symbols","mid","read_payload","read_compressed_payload","unsafe_atob","read_deltas","next","read_sorted","read_sorted_arrays","read_array_while","read_mapped","read_linear_table","read_replacement_table","read_transposed","dx","dy","vN","ys","j_dy","read_trie","sorted","expand","decode","cps","saved","cp","hex_cp","quote_cp","explode_cp","str_from_cps","compare_arrays","COMPRESSED","S0","L0","V0","T0","L_COUNT","V_COUNT","T_COUNT","N_COUNT","S_COUNT","S1","L1","V1","unpack_cc","packed","unpack_cp","SHIFTED_RANK","EXCLUSIONS","DECOMP","RECOMP","init$1","bucket","is_hangul","compose_pair","recomp","decomposed","check_order","cc","s_index","l_index","v_index","t_index","prev_cc","composed_from_decomposed","prev_cp","composed","nfd","nfc","HYPHEN","STOP_CH","FE0F","UNIQUE_PH","Array_from","group_has_cp","Emoji","MAPPED","IGNORED","CM","NSM","ESCAPE","GROUPS","WHOLE_VALID","WHOLE_MAP","VALID","EMOJI_LIST","EMOJI_ROOT","read_sorted_array","read_sorted_set","set_add_many","set","chunks","unrestricted","read_chunked","M","wholes","recs","gs","union","complement","multi","add_to_union","node","quoted_cp","should_escape","bidi_qq","safe_str_from_cps","check_label_extension","check_leading_underscore","check_fenced","error_placement","quoter","is_combining_mark","ens_normalize","flatten","filter_fe0f","nf","ef","label","tokens_from_str","token_count","norm","determine_group","check_group","check_whole","maker","shared","groups","error_group_member","error_disallowed","quoted","gg","where","emoji","consume_emoji_reversed","eaten","checkComponent","ensNameSplit","ensNormalize","comps","isValidName","namehash","dnsEncode","_maxLength","accessSetify","addr","storageKeys","storageKey","accessListify","computeAddress","pubkey","recoverAddress","BN_MAX_UINT","handleAddress","handleAccessList","param","handleNumber","handleUint","formatNumber","formatAccessList","formatHashes","_parseLegacy","fields","_serializeLegacy","legacy","_parseEipSignature","_parseEip1559","_serializeEip1559","_parseEip2930","_serializeEip2930","_parseEip4844","_serializeEip4844","Transaction$1","_type","_to","_nonce","_gasLimit","_gasPrice","_maxPriorityFeePerGas","_maxFeePerGas","_chainId","_accessList","_maxFeePerBlobGas","_blobVersionedHashes","hasGasPrice","hasFee","hasAccessList","hasBlob","Transaction","hashMessage","verifyMessage","regexBytes","regexNumber","regexArray","_pack","solidityPacked","tight","solidityPackedKeccak256","solidityPackedSha256","padding","BN__1","hexPadRight","hexTrue","hexFalse","domainFieldTypes","domainFieldNames","checkString","domainChecks","getBaseEncoder","boundsUpper","boundsLower","encodeType","splitArray","_TypedDataEncoder","_types","_getEncoder","_fullTypes","_encoderCache","links","parents","subtypes","primaryTypes","checkCircular","subtype","st","getEncoder_fn","domainFields","resolveName","ensCache","domainValues","domainTypes","typesWithDomain","TypedDataEncoder","subEncoder","encodedType","verifyTypedData","setify","KwVisibDeploy","_kwVisib","KwVisib","_kwTypes","KwTypes","_kwModifiers","KwModifiers","_keywords","Keywords","SimpleTokens","regexWhitespacePrefix","regexNumberPrefix","regexIdPrefix","regexId","regexType","_TokenString","_subTokenString","_tokens","allowed","top","subTokenString_fn","link","__privateWrapper","TokenString","lex","text","brackets","commas","cur","allowSingle","included","consumeName","consumeKeywords","keywords","consumeMutability","modifiers","consumeParams","allowIndexed","ParamType","consumeGas","consumeEoi","regexArrayType","verifyBasicType","internal","ParamTypeInternal","ErrorFragmentInternal","EventFragmentInternal","ConstructorFragmentInternal","FallbackFragmentInternal","FunctionFragmentInternal","StructFragmentInternal","_ParamType","indexed","components","arrayLength","arrayChildren","_walkAsync","_this","walkAsync_fn","bracket","arrayMatch","setValue","childType","Fragment","inputs","ConstructorFragment","ErrorFragment","EventFragment","FallbackFragment","FunctionFragment","StructFragment","NamedFragment","joinParams","anonymous","payable","gas","stateMutability","errorObj","topIsValid","mutability","outputs","PanicReasons","paramTypeBytes","paramTypeNumber","defaultCoder","defaultMaxInflation","getBuiltinCallException","action","abiCoder","invocation","revert","transaction","_AbiCoder","_getCoder","getCoder_fn","AbiCoder","encodeBytes32String","decodeBytes32String","LogDescription","fragment","TransactionDescription","selector","ErrorDescription","Indexed","BuiltinErrors","_Interface","fragments","_getFunction","_getEvent","_errors","_events","_functions","_abiCoder","frags","fallback","receive","minimal","getFunction_fn","getEvent_fn","matching","matchStr","customPrefix","topics","encodeTopic","dataTypes","dataValues","eventTopic","nonIndexed","resultIndexed","resultNonIndexed","nonIndexedIndex","indexedIndex","log","hexData","Interface","forceUnique","lastValue","valueLength","allowOptions","lastArg","toJson","FeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","copyRequest","bigIntKeys","numberKeys","Block","provider","_transactions","TransactionResponse","txs","baseFeePerGas","difficulty","extraData","gasLimit","gasUsed","miner","nonce","parentHash","parentBeaconBlockRoot","stateRoot","receiptsRoot","timestamp","transactions","indexOrHash","createOrphanedBlockFilter","Log","blockHash","blockNumber","removed","transactionHash","transactionIndex","receipt","createRemovedLogFilter","TransactionReceipt","_logs","contractAddress","logsBloom","logs","createRemovedTransactionFilter","createReorderedTransactionFilter","_TransactionResponse","_startBlock","accessList","blobVersionedHashes","_confirms","confirms","startBlock","nextScan","stopScanning","checkReplacement","mined","checkReceipt","cancellers","timer","txListener","replaceListener","EventLog","iface","UndecodedEventLog","ContractTransactionReceipt","_iface","ContractTransactionResponse","ContractUnknownEventPayload","contract","ContractEventPayload","_log","canCall","canEstimate","canResolve","canSend","getResolver","PreparedTopicFilter","_filter","runner","getRunner","resolvedArgs","feature","getProvider","copyOverrides","_overrides","overrides","resolveArgs","_runner","buildWrappedFallback","populateTransaction","noValue","noData","staticCall","send","estimateGas","buildWrappedMethod","getFragment","staticCallResult","buildWrappedEvent","internalValues","setInternal","getInternal","isDeferred","getSubInfo","topicHashify","tag","hasSub","getSub","foundFragment","_foundFragment","emit","starting","started","lastEmit","_emit","payloadFunc","passArgs","resultPromise","_BaseContract","_deployTx","addrPromise","deployTx","filters","checkCode","fromBlock","toBlock","stop","CustomContract","BaseContract","_ContractBase","Contract$1","ContractFactory","bytecode","sentTx","getIpfsLink","MulticoinProviderPlugin","proivder","coinType","matcherIpfs","matchers","_EnsResolver","_fetch","_supports2544","_resolver","Contract","fetch_fn","ethCoinType","coinPlugin","plugin","ipfs","swarm","linkage","avatar","owner","tokenId","tokenOwner","balance","metadataUrl","metadata","imageUrl","network","ensPlugin","currentName","_getResolver","getResolver_fn","EnsResolver","funcName","ensAddr","allowNull","nullValue","arrayOf","altNames","srcKey","altKey","formatBoolean","formatData","formatHash","_formatLog","formatLog","_formatBlock","formatBlock","formatTransactionResponse","_formatReceiptLog","formatReceiptLog","_formatTransactionReceipt","formatTransactionReceipt","EnsAddress","NetworkPlugin","GasCostPlugin","effectiveBlock","costs","nullish","EnsPlugin","targetNetwork","_FeeDataNetworkPlugin","feeDataFunc","_feeDataFunc","FeeDataNetworkPlugin","FetchUrlFeeDataNetworkPlugin","processFunc","_processFunc","Networks","_Network","_name","_plugins","basename","injectCommonNetworks","networkFunc","nameOrChainId","existing","Network","frac","getGasStationPlugin","fetchFeeData","_feeData","injected","registerEth","PollingBlockSubscriber","_poll","_provider","_poller","_interval","_blockNumber","poll_fn","dropWhilePaused","OnBlockSubscriber","_running","PollingBlockTagSubscriber","_tag","_lastBlock","PollingOrphanSubscriber","PollingTransactionSubscriber","_hash","PollingEventSubscriber","MAX_CCIP_REDIRECTS","isPromise","getTag","UnmanagedSubscriber","concisify","getSubscription","_event","addresses","addAddress","defaultOptions","AbstractProvider","_network","_perform","_call","_checkNetwork","_getAccountValue","_getBlock","_hasSub","_getSub","_subs","_pausedState","_destroyed","_networkPromise","_anyNetwork","_performCache","_lastBlockNumber","_nextTimer","_timers","_disableCcipRead","calldata","urls","sender","errorMessages","perform_fn","blockTag","_address","detectNetwork","networkPromise","getFeeDataFunc","_block","priorityFee","getBlock_fn","feeData","_tx","checkNetwork_fn","call_fn","getAccountValue_fn","_position","signedTx","prefetchTxs","timerId","_func","subscriber","oldSub","newSub","getSub_fn","hasSub_fn","pause","perform","txSender","ccipArgs","parseOffchainLookup","ccipResult","encodeBytes","_blockTag","includeTransactions","emitArgs","subscription","_parseString","_parseBytes","numPad","padded","bytesPad","empty","byteCount","zeros","urlsOffset","urlsLength","urlsData","checkProvider","signer","populate","pop","AbstractSigner","hasEip1559","txObj","_VoidSigner","_throwUnsupported","throwUnsupported_fn","VoidSigner","shown","showThrottleMessage","service","FilterIdSubscriber","_teardown","_filterIdPromise","_hault","teardown_fn","filterId","filterIdPromise","FilterIdEventSubscriber","FilterIdPendingSubscriber","Primitive","deepCopy","duration","getLowerCase","isPollable","JsonRpcSigner","hexTx","timeouts","invalids","checkTx","_message","populated","JsonRpcApiProvider","_scheduleDrain","_nextId","_payloads","_drainTimer","_notReady","_pendingDetectNetwork","staticNetwork","scheduleDrain_fn","dstKey","spelunkData","spelunkMessage","unsupported","accountsPromise","accounts","account","stallTime","payloads","batch","JsonRpcApiPollingProvider","_pollingInterval","_connect","_spelunkMessage","defaultApiKey","getHost","AnkrProvider","JsonRpcProvider","apiKey","AlchemyProvider","trace","CloudflareProvider","THROTTLE","EtherscanPluginId","EtherscanPlugin","skipKeys","nextId","EtherscanProvider","_apiKey","_plugin","query","post","throttle","postData","_WebSocket","SocketSubscriber","_filterId","_paused","_emitPromise","emitPromise","SocketBlockSubscriber","SocketPendingSubscriber","SocketEventSubscriber","_logFilter","SocketProvider","_callbacks","_pending","pending","WebSocketProvider","_websocket","defaultProjectId","InfuraWebSocketProvider","projectId","InfuraProvider","projectSecret","defaultToken","QuickNodeProvider","shuffle","defaultState","waitForSync","_normalize","normalizeResult","checkQuorum","quorum","tally","weight","best","getMedian","resultWeight","bestError","getAnyResult","getFuzzyMode","bestWeight","bestResult","FallbackProvider","providers","_getNextConfig","_addRunner","_initialSync","_checkQuorum","_waitForQuorum","_configs","_height","_initialSyncPromise","broadcasts","waiting","initialSync_fn","running","inflightQuorum","addRunner_fn","waitForQuorum_fn","getNextConfig_fn","configs","allConfigs","dt","initialSync","checkQuorum_fn","mode","interesting","newRunners","isWebSocketLike","Testnets","getDefaultProvider","allowService","_NonceManager","_noncePromise","_delta","noncePromise","NonceManager","BrowserProvider","ethereum","defaultApplicationId","PocketProvider","applicationId","applicationSecret","IpcSocketProvider","_BaseWallet","_signingKey","btx","BaseWallet","subsChrs","Word","unfold","words","sep","clumps","leftover","semi","decodeOwl","Wordlist","locale","phrase","WordlistOwl","_loadWords","_checksum","_words","loadWords_fn","wordlist","LangEn","getUpperMask","getLowerMask","mnemonicToEntropy","mnemonic","entropy","bit","entropyBits","checksumBits","checksumMask","entropyToMnemonic","indices","remainingBits","Mnemonic","_entropy","__classPrivateFieldGet","__classPrivateFieldSet","_AES_key","_AES_Kd","_AES_Ke","numberOfRounds","rcon","Si","T3","T4","T5","T6","T7","T8","U3","U4","convertToInt32","AES","roundKeyCount","KC","tk","rconpointer","tt","plaintext","ciphertext","ModeOfOperation","_CBC_iv","_CBC_lastBlock","CBC","iv","_CTR_remaining","_CTR_remainingIndex","_CTR_counter","CTR","initialValue","crypttext","pkcs7Strip","padder","looseArrayify","zpad","getPassword","spelunk","_path","reqd","defaultPath","isKeystoreJson","json","decrypt","aesCtr","getAccount","computedMAC","mnemonicKey","mnemonicCiphertext","mnemonicIv","mnemonicAesCtr","getDecryptKdfParams","kdf","prf","decryptKeystoreJsonSync","decryptKeystoreJson","getEncryptKdfParams","_encryptKeystore","uuidRandom","derivedKey","macPrefix","mac","client","gethFilename","encryptKeystoreJsonSync","passwordBytes","encryptKeystoreJson","MasterSecret","HardenedBit","encodeBase58Check","ser_I","chainCode","derivePath","component","_HDNodeWallet","signingKey","parentFingerprint","depth","_account","fingerprint","progressCallback","account_fn","HDNodeVoidWallet","_index","IR","IL","ki","extendedKey","_fromSeed","fromSeed_fn","HDNodeWallet","_seed","Ki","getAccountPath","getIndexedAccountPath","isCrowdsaleJson","decryptCrowdsaleJson","encseed","encryptedSeed","aesCbc","seedHex","Wallet","_fromAccount","fromAccount_fn","wallet","Base64","decodeBits","flood","decodeOwlA","accents","accent","posOffset","positions","charCode","WordlistOwlA","_accent","wordlists","Ethers","txPromises","blockPromises","blocks","txHash","txId","_Provider","Provider","rejectMap","transactionSigner","eventName","arbitrum","arbitrumGoerli","arbitrumNova","aurora","auroraTestnet","avalanche","avalancheFuji","baseGoerli","bearNetworkChainMainnet","bearNetworkChainTestnet","boba","bronos","bronosTestnet","bsc","bscTestnet","bxn","bxnTestnet","canto","celo","celoAlfajores","celoCannoli","classic","confluxESpace","cronos","cronosTestnet","crossbell","dfk","dogechain","edgeware","edgewareTestnet","emerald","eos","eosTestnet","evmos","evmosTestnet","ekta","ektaTestnet","ewc","fantom","fantomTestnet","fibo","filecoin","filecoinCalibration","filecoinHyperspace","flare","flareTestnet","foundry","fuse","fuseSparknet","iotex","iotexTestnet","gobi","goerli","gnosis","gnosisChiado","hardhat","harmonyOne","haqqMainnet","haqqTestedge2","klaytn","linea","lineaTestnet","localhost","mainnet","mantle","mantleTestnet","metis","metisGoerli","mev","mevTestnet","modeTestnet","moonbaseAlpha","moonbeam","moonriver","neonDevnet","nexi","nexilix","oasys","okc","optimism","optimismGoerli","polygon","polygonMumbai","polygonZkEvmTestnet","polygonZkEvm","pulsechain","pulsechainV4","qMainnet","qTestnet","rollux","rolluxTestnet","ronin","saigon","scrollSepolia","scrollTestnet","sapphire","sapphireTestnet","sepolia","skaleBlockBrawlers","skaleCalypso","skaleCalypsoTestnet","skaleChaosTestnet","skaleCryptoBlades","skaleCryptoColosseum","skaleEuropa","skaleEuropaTestnet","skaleExorde","skaleHumanProtocol","skaleNebula","skaleNebulaTestnet","skaleRazor","skaleTitan","skaleTitanTestnet","songbird","songbirdTestnet","shardeumSphinx","syscoin","syscoinTestnet","taraxa","taikoTestnetSepolia","taraxaTestnet","telos","telosTestnet","thunderTestnet","volta","wanchain","wanchainTestnet","xdc","xdcTestnet","zhejiang","zkSync","zkSyncTestnet","zetachainAthensTestnet","zora","zoraTestnet","networks","wagmiChains","wagmiChain","backupRpcUrl","_e","_f","_g","_i","_k","_j","_m","networks$1","hexId","symbol","switcher","addNetwork","changeNetwork","getChainId","icons","Phantom","_n","phantom","MetaMask","metamaskProvider","ABI","TransactionSigner","rawData","NFT","ERC721","nftId","spender","Coin","amount","hexAmount","txData","Token","ERC20","totalSupply","allowance","selectors","tryNft","explorerUrl","confirmations","ContractTransaction","NftTransaction","direction","CoinTransaction","TokenTransaction","TransactionListener","transactionId","checkSigner","expectedParams","receivedParams","transactionIdOrLog","transactionLog","decodedData","proxyStateMap","refSet","buildProxyFunction","objectIs","newProxy","handler","canProxy","defaultHandlePromise","snapCache","createSnapshot","handlePromise","snap","markToTrack","target2","ensureVersion","proxyCache","versionHolder","proxyFunction","initialObject","notifyUpdate","op","nextVersion","checkVersion","nextCheckVersion","propProxyStates","propProxyState","propVersion","createPropListener","newOp","addPropListener","remove","removePropListener","entry","prevRemove","baseObject","proxyObject","prevValue","hasPrevValue","getUntracked","nextValue","childProxyState","proxyState","defaultProxyFunction","proxy","subscribe","notifyInSync","ops","isListenerActive","removeListener","snapshot","ref","subscribeKey","SECURE_SITE","ONRAMP_PROVIDERS","ConstantsUtil","CoreHelperUtil","networkName","ua","expiry","lastRetry","caipAddress","milliseconds","appUrl","wcUri","safeAppUrl","encodedWcUrl","features","imagePromise","image","formattedBalance","timeZone","capTimeZone","approvedIds","requestedNetworks","approvedIndexMap","indexA","indexB","roundedNumber","dollars","pennies","FetchUtil","OptionsController","subKey","allWallets","includeWalletIds","excludeWalletIds","featuredWalletIds","termsConditionsUrl","privacyPolicyUrl","customWallets","isSiweEnabled","enableAnalytics","sdkVersion","enableOnramp","enableWalletFeatures","DEFAULT_OPTIONS","api","BlockchainApiController","cursor","onramp","queryParams","tokenAddress","userAddress","sdkType","destinationWallets","partnerUserId","defaultNetwork","purchaseAmount","paymentAmount","purchaseCurrency","paymentCurrency","SnackController","getDefaultExportFromCjs","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","Item","browserExports","process$1","WC_DEEPLINK","W3M_RECENT","W3M_CONNECTED_WALLET_IMAGE_URL","W3M_CONNECTED_CONNECTOR","StorageUtil","deepLink","recentWallets","recent","connectorType","excluded","EventsController","TransactionsController","accountAddress","nonSpamTransactions","filteredTransactions","transactionsMap","grouped","year","month","yearTransactions","newMonthTransactions","transfer","ConnectionController","uri","ids","wcLinking","wcError","buffering","PublicStateController","newState","$","O","dayjs","relativeTime","updateLocale","DateUtil","date","NetworkUtil","caipnetworkId","NumberUtil","aBigNumber","bBigNumber","NetworkController","caipNetwork","allowUnsupportedChain","smartAccountEnabledNetworks","approvedCaipNetworkIds","requestedCaipNetworks","networkId","ModalController","ConvertApiUtil","sourceTokenAmount","sourceTokenDecimals","parsedValue","AccountController","balances","RouterController","historyIndex","INITIAL_GAS_LIMIT","ConvertController","networkAddress","loading","sourceToken","sourceTokenAddress","toToken","toTokenAddress","price","newSourceToken","newToToken","networkToken","aTokenInfo","bTokenInfo","existPrice","fungibles","allTokens","priceAsFloat","gasFee","fromAddress","toTokenDecimals","totalGasCostInWei","totalGasCostInEther","toTokenAmount","gasPriceInUSD","sourceTokenPrice","toTokenPrice","slippageToleranceDecimal","fromCaipAddress","hasAllowance","multiplier","toAmount","isSourceTokenIsNetworkToken","amountBigInt","toTokenPriceInUSD","isConnected","balanceSymbol","profileName","profileImage","isDeployed","currentTab","tokenBalance","connectedWalletInfo","preferredAccountType","AssetController","ThemeController","themeMode","emailConnector","ConnectorController","themeVariables","connectors","connector","optionsState","rdns","entries","recommendedEntries","ApiController","imageId","blob","countryCode","currencies","currency","images","exclude","recommendedImages","recentImages","page","search","isAnalyticsEnabled","connected","USDC_CURRENCY_DEFAULT","USD_CURRENCY_DEFAULT","OnRampController","quote","SendController","sendTokenAmount","receiverAddress","receiverProfileImageUrl","receiverProfileName","AssetUtil","RouterUtil","history","networkSelectIndex","n$f","b$9","T","V$7","S$b","L","M$6","R$6","k$8","H$5","I$6","L$b","s$7","_o","convertInputMaskBottomSvg","svg","convertInputMaskTopSvg","themeTag","darkModeTag","lightModeTag","initializeTheming","createRootStyles","setColorTheme","setThemeVariables","css","unsafeCSS","resetStyles","elementStyles","colorStyles","standardCustomElement","tagName","clazz","legacyCustomElement","customElement","classOrDescriptor","__decorate","decorators","WuiCard","LitElement","html","styles","allWalletsSvg","arrowBottomCircleSvg","appStoreSvg","appleSvg","arrowBottomSvg","arrowLeftSvg","arrowRightSvg","arrowTopSvg","browserSvg","checkmarkSvg","chevronBottomSvg","chevronLeftSvg","chevronRightSvg","chevronTopSvg","chromeStoreSvg","clockSvg","closeSvg","coinPlaceholderSvg","compassSvg","copySvg","addSvg","cursorSvg","desktopSvg","disconnectSvg","discordSvg","etherscanSvg","extensionSvg","externalLinkSvg","facebookSvg","filtersSvg","githubSvg","googleSvg","helpCircleSvg","infoCircleSvg","mailSvg","mobileSvg","networkPlaceholderSvg","nftPlaceholderSvg","offSvg","playStoreSvg","qrCodeIcon","refreshSvg","searchSvg","sendSvg","swapHorizontalSvg","swapHorizontalBoldSvg","swapHorizontalMediumSvg","swapHorizontalRoundedBoldSvg","swapVerticalSvg","telegramSvg","twitchSvg","twitterSvg","twitterIconSvg","verifySvg","verifyFilledSvg","walletPlaceholderSvg","walletSvg","walletConnectSvg","warningCircleSvg","recycleHorizontalSvg","bankSvg","cardSvg","plusSvg","cursorTransparentSvg","checkmarkBoldSvg","svgOptions","WuiIcon","WuiImage","WuiLoadingHexagon","WuiLoadingSpinner","WuiLoadingThumbnail","radius","radiusFactor","dashArrayStart","dashArrayEnd","dashOffset","WuiShimmer","i$8","WuiText","classes","classMap","daoSvg","defiSvg","defiAltSvg","ethSvg","layersSvg","lockSvg","loginSvg","networkSvg","nftSvg","nounSvg","profileSvg","systemSvg","coinbaseSvg","moonpaySvg","stripeSvg","paypalSvg","onrampCardSvg","pencilSvg","lightbulbSvg","WuiVisual","UiHelperUtil","spacing","charsStart","charsEnd","truncate","baseColor","rgbColor","masterBorderRadius","edge","gradientCircle","colors","tintedColor","bigint","rgb","tint","tintedR","tintedG","tintedB","character","theme","threshold","fixed","WuiFlex","WuiAvatar","cssColors","WuiIconBox","iconSize","isLg","isXl","bgMix","borderRadius","isGray","isOpaque","isColorChange","bgValueVariable","WuiAccountButton","ifDefined","networkElement","WuiWalletImage","TOTAL_IMAGES","WuiAllWalletsImage","isPlaceholders","walletName","TEXT_VARIANT_BY_SIZE","WuiButton","textVariant","networkSvgMd","WuiCardSelectLoader","networkSvgSm","networkSvgLg","WuiNetworkImage","networkImagesBySize","WuiCardSelect","WuiChip","WuiConnectButton","WuiCtaButton","WuiDetailsGroup","WuiDetailsGroupItem","f$7","h$9","WuiInputText","createRef","sizeClass","WuiEmailInput","WuiIconLink","WuiInputElement","WuiInputNumeric","WuiLink","WuiListItem","color","TransactionTypePastTense","WuiTransactionVisual","firstImage","secondImage","isLeftNFT","isRightNFT","leftRadius","rightRadius","firstImageType","icon","WuiTransactionListItem","WuiTransactionListItemLoader","WuiTag","WuiListWallet","WuiLogo","WuiLogoSelect","WuiNetworkButton","WuiOtp","inputElement","keyArr","currentCaretPos","nextIndex","numeric","numericElements","targetElement","inputValue","inputString","nextNumeric","nextInput","canPromise","toSJISFunction","CODEWORDS_COUNT","digit","utils$8","kanji","BitBuffer","BitBuffer$1","bufIndex","bitBuffer","BitMatrix","row","col","reserved","BitMatrix$1","bitMatrix","getSymbolSize","require$$0","posCount","intervals","coords","posLength","FINDER_PATTERN_SIZE","finderPattern","PenaltyScores","sameCountCol","sameCountRow","lastCol","lastRow","bitsCol","bitsRow","darkCount","modulesCount","getMaskAt","maskPattern","pattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","errorCorrectionLevel","EXP_TABLE","LOG_TABLE","galoisField","GF","coeff","divident","divisor","degree","poly","Polynomial","ReedSolomonEncoder","ReedSolomonEncoder$1","paddedData","buff","reedSolomonEncoder","versionCheck","alphanumeric","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","VersionCheck","Regex","require$$1","dataStr","Utils","ECCode","require$$2","Mode","require$$3","require$$4","G18","G18_BCH","getBestVersionForDataLength","currentVersion","getReservedBitsCount","getTotalBitsFromDataArray","segments","totalBits","reservedBits","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","seg","ecl","G15","G15_MASK","G15_BCH","formatInfo","NumericData","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","encodeUtf8","ByteData","byteData","KanjiData","kanjiData","dijkstra","graph","predecessors","open","closest","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","nodes","cost","require$$5","require$$6","require$$7","getStringByteLength","getSegments","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","s2","getSegmentBitsLength","mergeSegments","segs","prevSeg","buildNodes","buildGraph","prevNodeIds","nodeGroup","currentNodeIds","prevNodeId","buildSingleSegment","modesHint","bestMode","optimizedSegs","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","matrix","setupTimingPattern","setupAlignmentPattern","setupVersionInfo","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","hex2rgba","hexCode","margin","scale","qrSize","imgData","qr","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","canvas","getCanvasElement","qrData","canvasEl","rendererOpts","getColorAttrib","attrib","alpha","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","svgTag","qrcodesize","bg","viewBox","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","argsNum","isLastArgCb","CONNECTING_ERROR_MARGIN","CIRCLE_SIZE_MODIFIER","QRCODE_MATRIX_MARGIN","isAdjecentDots","cy","otherCy","cellSize","getMatrix","QRCodeUtil","sqrt","rows","QrCodeUtil","logoSize","dotColor","edgeColor","qrList","x1","y1","dotSize","clearArenaSize","matrixMiddleStart","matrixMiddleEnd","circles","cx","circlesToConnect","cys","newCys","WuiQrCode","WuiSearchBar","inputComponent","WuiSnackbar","WuiTabs","tab","isActive","initialAnimation","passiveBtn","activeBtn","passiveBtnText","activeBtnText","activeBtnBounds","activeBtnTextBounds","WuiTokenButton","WuiTooltip","WuiTooltipSelect","WuiTokenListItem","WuiVisualThumbnail","WuiNoticeCard","MAX_HEIGHT","WuiListAccordion","changedProperties","heightElement","textElement","scrollHeight","WuiListContent","WuiListNetwork","WuiListWalletTransaction","WuiOnRampActivityItem","WuiOnRampProviderItem","slicedNetworks","WuiPromo","WuiBalance","WuiProfileButton","WuiChipButton","WuiCompatibleNetwork","WuiBanner","WuiListToken","WuiListDescription","specialCharactersRegex","numbersRegex","WuiInputAmount","inputChar","WuiPreviewItem","WuiGrid","WuiSeparator","MathUtil","inputRange","outputRange","originalRangeMin","originalRangeMax","newRangeMin","newRangeMax","FLOAT_FIXED_VALUE","plusTypes","minusTypes","TransactionUtil","monthNumber","currentYear","monthName","transfers","secondTransfer","isAllNFT","haveMultipleTransfers","imageURL","isNFT","isFungible","haveTransfer","firstTransfer","firstDescription","secondDescription","W3mAccountButton","unsubscribe","networkImage","showBalance","W3mButton","W3mConnectButton","isLoading","SCROLL_LOCK","W3mModal","newAccountState","SIWEController","defaultThemeMode","styleTag","card","newCaipAddress","session","W3mNetworkButton","W3mRouter","height","newView","xOut","xIn","PAYMENT_CURRENCY_SYMBOLS","BUY_PRESET_AMOUNTS","W3mOnrampWidget","_p","SECURE_SITE_SDK","W3mFrameConstants","W3mFrameRpcConstants","zError","zType","z$a","AppSwitchNetworkRequest","AppConnectEmailRequest","AppConnectOtpRequest","AppGetUserRequest","AppUpdateEmailRequest","AppUpdateEmailPrimaryOtpRequest","AppUpdateEmailSecondaryOtpRequest","AppSyncThemeRequest","AppSyncDappDataRequest","AppSetPreferredAccountRequest","FrameConnectEmailResponse","FrameUpdateEmailResponse","FrameGetUserResponse","FrameIsConnectedResponse","FrameGetChainIdResponse","FrameSwitchNetworkResponse","FrameUpdateEmailSecondaryOtpResolver","FrameGetSmartAccountEnabledNetworksResponse","FrameSetPreferredAccountResponse","RpcResponse","RpcEthAccountsRequest","RpcEthBlockNumber","RpcEthCall","RpcEthChainId","RpcEthEstimateGas","RpcEthFeeHistory","RpcEthGasPrice","RpcEthGetAccount","RpcEthGetBalance","RpcEthGetBlockyByHash","RpcEthGetBlockByNumber","RpcEthGetBlockReceipts","RcpEthGetBlockTransactionCountByHash","RcpEthGetBlockTransactionCountByNumber","RpcEthGetCode","RpcEthGetFilter","RpcEthGetFilterLogs","RpcEthGetLogs","RpcEthGetProof","RpcEthGetStorageAt","RpcEthGetTransactionByBlockHashAndIndex","RpcEthGetTransactionByBlockNumberAndIndex","RpcEthGetTransactionByHash","RpcEthGetTransactionCount","RpcEthGetTransactionReceipt","RpcEthGetUncleCountByBlockHash","RpcEthGetUncleCountByBlockNumber","RpcEthMaxPriorityFeePerGas","RpcEthNewBlockFilter","RpcEthNewFilter","RpcEthNewPendingTransactionFilter","RpcEthSendRawTransaction","RpcEthSyncing","RpcUnistallFilter","RpcPersonalSignRequest","RpcEthSignTypedDataV4","RpcEthSendTransactionRequest","FrameSession","W3mFrameSchema","W3mFrameStorage","W3mFrameHelpers","RegexUtil","RESTRICTED_TIMEZONES","EMAIL_MINIMUM_TIMEOUT","lastEmailLoginTime","difference","cooldownSec","W3mFrame","isAppClient","frameEvent","appEvent","iframe","W3mFrameProvider","newEmail","email","W3mAccountSettingsView","isMultiNetwork","isValidNetwork","networkEnabled","smartAccountEnabled","accountTypeTarget","W3mAccountView","W3mAllWalletsView","isSearch","W3mBuyInProgressView","subLabel","borderRadiusMaster","PresetsUtil","HelpersUtil","caipTokens","W3mConnectView","featured","announcedRdns","featuredCount","rawCount","roundedCount","tagLabel","recommended","filteredInjected","overrideLength","maxRecommended","wallets","connectorRDNSs","recentRDNSs","allRDNSs","W3mConnectingWidget","retryButton","W3mConnectingExternalView","W3mConnectingWcView","wcPairingExpiry","recentWallet","mobile_link","desktop_link","webapp_link","injectedIds","injected_id","browserIds","isBrowser","isMobileWc","isWebWc","isBrowserInstalled","isBrowserWc","isDesktopWc","container","W3mDownloadsView","EXPLORER","W3mGetWalletView","W3mNetworkSwitchView","W3mNetworksView","supportsAllNetworks","sortedNetworks","LOADING_ITEM_COUNT","W3mOnRampActivityView","fungibleInfo","yearInt","groupTitle","today","W3mOnrampFiatSelectView","W3mOnRampProvidersView","urlPromises","assets","W3mOnrampTokensView","W3mConvertView","newCaipNetwork","isOpen","newRoute","myToken","ct","isNetworkToken","amountOfTokenGasRequires","toTokenConvertedAmount","haveNoTokenSelected","W3mConvertPreviewView","newBalanceSymbol","sourceTokenText","toTokenText","sourceTokenValue","toTokenValue","sentPrice","receivePrice","W3mConvertSelectTokenView","suggestedTokensContainer","tokensList","yourTokens","filteredYourTokens","filteredTokens","selected","W3mTransactionsView","W3mWhatIsANetworkView","W3mWhatIsAWalletView","W3mWhatIsABuyView","OTP_LENGTH","W3mEmailOtpWidget","isResendDisabled","footerLabels","W3mEmailVerifyOtpView","otp","W3mEmailVerifyDeviceView","PAGE_HEIGHT","PAGE_WIDTH","HEADER_HEIGHT","W3mApproveTransactionView","isMobile","W3mUpgradeWalletView","W3mUpgradeToSmartAccountView","W3mUpdateEmailWalletView","showSubmit","W3mUpdateEmailPrimaryOtpView","W3mUpdateEmailSecondaryOtpView","W3mUnsupportedChainView","W3mWalletReceiveView","isNetworkEnabledForSmartAccounts","imagesArray","W3mWalletCompatibleNetworksView","W3mWalletSendView","W3mSendSelectTokenView","W3mWalletSendPreviewView","totalValue","markWalletsAsInstalled","installedConnectors","acum","PAGINATOR_ID","W3mAllWalletsList","gridEl","columns","currentWallets","shimmerCount","loaderEl","W3mAllWalletsSearch","W3mConnectingHeader","tabs","W3mConnectingWcBrowser","announcedConnector","injectedConnector","W3mConnectingWcDesktop","redirect","W3mConnectingWcMobile","isIos","W3mConnectingWcQrcode","alt","inactive","W3mConnectingWcUnsupported","W3mConnectingWcWeb","WuiConvertDetails","MINIMUM_USD_VALUE_TO_CONVERT","W3mConvertInput","marketValue","isMarketValueGreaterThanZero","allowedKeys","isComma","isDot","currentValue","tokenElement","balanceValueInUSD","haveBalance","headings","connectorName","W3mHeader","isConnectHelp","shouldHideBack","headingEl","preset","buttonEl","W3mHelpWidget","W3mInputCurrency","W3mLegalFooter","W3mMobileDownloadLinks","app_store","play_store","chrome_store","homepage","isAndroid","isMultiple","shortName","W3mOnRampProvidersFooter","presets","W3mSnackBar","variant","W3mEmailLoginWidget","multipleConnectors","parsedError","W3mAccountDefaultWidget","origin","addressExplorerUrl","W3mAccountWalletFeaturesWidget","W3mAccountActivityWidget","W3mAccountNftsWidget","W3mAccountTokensWidget","W3mActivityList","sortedYearKeys","isLastGroup","isLastTransaction","descriptions","isLastTransfer","lastItem","W3mInputToken","W3mInputAddress","focus","W3mWalletSendDetails","isInitialized","Web3ModalScaffold","route","index$4","index$3","modal","ReflectApply","ReflectOwnKeys","ProcessEmitWarning","warning","NumberIsNaN","eventsModule","eventsExports","defaultMaxListeners","checkListener","_getMaxListeners","that","doError","arrayClone","_addListener","prepend","onceWrapper","_onceWrap","originalListener","spliceOne","unwrap","evlistener","unwrapListeners","listenerCount","errorListener","eventTargetAgnosticAddListener","addErrorHandlerIfEventEmitter","flags","wrapListener","imulShim","ah","bh","isIntegerShim","binary","int_1","readInt16BE","readUint16BE","readInt16LE","readUint16LE","writeUint16BE","writeUint16LE","readInt32BE","readUint32BE","readInt32LE","readUint32LE","writeUint32BE","writeUint32LE","readInt64BE","readUint64BE","readInt64LE","readUint64LE","writeUint64BE","writeUint64LE","readUintBE","readUintLE","writeUintBE","writeUintLE","readFloat32BE","readFloat32LE","readFloat64BE","readFloat64LE","writeFloat32BE","writeFloat32LE","writeFloat64BE","writeFloat64LE","wipe_1","wipe","wipe$1","chacha","binary_1","ROUNDS","core","j0","j1","j2","j3","j4","j5","j6","j7","j8","j9","j10","j11","j12","j13","j14","j15","x0","x4","x5","x6","x7","x8","x9","streamXOR","nonceInplaceCounterLength","nc","counterLength","incrementCounter","stream","counter","constantTime","select","subject","resultIfOne","resultIfZero","lessOrEqual","equal","constant_time_1","Poly1305","t6","t7","mpos","hibit","h5","h6","h7","h8","h9","r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","d3","d4","d5","d6","d7","d8","d9","macpos","want","oneTimeAuth","chacha_1","poly1305_1","ZEROS","ChaCha20Poly1305","associatedData","authKey","resultLength","sealed","calculatedTag","tagOut","isSerializableHash","hash$3","hmac_1","hash_1","savedState","hmac$2","hkdf","HKDF","okm","ctr","HKDF_1","QUOTA","BrowserRandomSource","browserCrypto","browser$h","copyProps","SafeBuffer","MAX_BYTES","MAX_UINT32","oldBrowser","browserModule","generated","inherits_browserModule","ctor","superCtor","TempCtor","streamBrowser","shams","symObj","symVal","syms","hasSymbols","esErrors","_eval","syntax","origSymbol","hasSymbolSham","test","$Object","hasProto","ERROR_MESSAGE","funcType","concatty","slicy","arrLike","joiny","joiner","implementation","bound","binder","boundLength","boundArgs","functionBind","call","$hasOwn","hasown","undefined","$Error","$EvalError","$RangeError","$ReferenceError","$SyntaxError","$TypeError","$URIError","$Function","getEvalledConstructor","expressionSyntax","$gOPD","throwTypeError","ThrowTypeError","getProto","needsEval","INTRINSICS","errorProto","doEval","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","$strSlice","$exec","rePropName","reEscapeChar","stringToPath","subString","getBaseIntrinsic","allowMissing","intrinsicName","alias","getIntrinsic","intrinsicBaseName","intrinsic","intrinsicRealName","skipFurtherCaching","isOwn","part","GetIntrinsic","$defineProperty","esDefineProperty","gopd","defineDataProperty","nonEnumerable","nonWritable","nonConfigurable","hasPropertyDescriptors","hasPropertyDescriptors_1","hasDescriptors","gOPD","$floor","setFunctionLength","functionLengthIsConfigurable","functionLengthIsWritable","$apply","$call","$reflectApply","$max","originalFunction","applyBind","callBind","$indexOf","callBound","hasToStringTag","$toString","isStandardArguments","isLegacyArguments","supportsStandardArguments","isArguments","fnToStr","isFnRegex","getGeneratorFunc","GeneratorFunction","isGeneratorFunction","generatorFunc","reflectApply","badArrayLike","isCallableMarker","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","objectClass","fnClass","genClass","ddaClass","ddaClass2","ddaClass3","isIE68","isDDA","isCallable","strClass","forEachArray","forEachString","forEachObject","forEach_1","possibleTypedArrayNames","possibleNames","availableTypedArrays","typedArrays","$slice","typedArray","superProto","tryTypedArrays","trySlices","whichTypedArray","isArgumentsObject","uncurryThis","BigIntSupported","SymbolSupported","ObjectToString","numberValue","stringValue","booleanValue","bigIntValue","symbolValue","checkBoxedPrimitive","prototypeValueOf","isDataView","isUint8ClampedArray","isUint16Array","isUint32Array","isInt8Array","isInt16Array","isInt32Array","isFloat32Array","isFloat64Array","isBigInt64Array","isBigUint64Array","isMapToString","isMap","isSetToString","isSet","isWeakMapToString","isWeakMap","isWeakSetToString","isWeakSet","isArrayBufferToString","isDataViewToString","SharedArrayBufferCopy","isSharedArrayBufferToString","isSharedArrayBuffer","isAsyncFunction","isMapIterator","isSetIterator","isGeneratorObject","isWebAssemblyCompiledModule","isNumberObject","isStringObject","isBooleanObject","isBigIntObject","isSymbolObject","isBoxedPrimitive","isAnyArrayBuffer","getOwnPropertyDescriptors","formatRegExp","objects","inspect","isNull","warned","deprecated","debugs","debugEnvRegex","debugEnv","pid","stylizeNoColor","stylizeWithColor","formatValue","styleType","style","arrayToHash","recurseTimes","primitive","formatPrimitive","visibleKeys","formatError","braces","formatArray","formatProperty","reduceToSingleString","simple","isNullOrUndefined","isSymbol","re","objectToString","isPrimitive","months","time","kCustomPromisifiedSymbol","original","promiseResolve","promiseReject","callbackifyOnRejected","newReason","callbackify","callbackified","maybeCb","rej","ownKeys","enumerableOnly","_objectSpread","_defineProperty","_toPropertyKey","_classCallCheck","Constructor","_defineProperties","_createClass","protoProps","staticProps","_toPrimitive","hint","prim","_require","_require2","copyBuffer","buffer_list","BufferList","hasStrings","nb","destroy","readableDestroyed","writableDestroyed","emitErrorNT","emitCloseNT","emitErrorAndCloseNT","undestroy","errorOrDestroy","rState","wState","destroy_1","_inheritsLoose","subClass","superClass","codes","createErrorType","NodeError","_Base","oneOf","startsWith","this_len","includes","determiner","errorsBrowser","ERR_INVALID_OPT_VALUE","highWaterMarkFrom","isDuplex","duplexKey","getHighWaterMark","hwm","deprecate","_stream_writable","Writable","CorkedRequest","onCorkedFinish","Duplex","WritableState","internalUtil","Stream","OurUint8Array","_uint8ArrayToBuffer","chunk","_isUint8Array","destroyImpl","_require$codes","ERR_INVALID_ARG_TYPE","ERR_METHOD_NOT_IMPLEMENTED","ERR_MULTIPLE_CALLBACK","ERR_STREAM_CANNOT_PIPE","ERR_STREAM_DESTROYED","ERR_STREAM_NULL_VALUES","ERR_STREAM_WRITE_AFTER_END","ERR_UNKNOWN_ENCODING","nop","noDecode","onwrite","realHasInstance","writeAfterEnd","validChunk","isBuf","writeOrBuffer","clearBuffer","decodeChunk","newChunk","doWrite","writev","onwriteError","sync","finishMaybe","onwriteStateUpdate","needFinish","afterWrite","onwriteDrain","holder","allBuffers","endWritable","callFinal","prefinish","need","corkReq","objectKeys","_stream_duplex","Readable","onend","onEndNT","isEncoding","_normalizeEncoding","enc","retried","normalizeEncoding","nenc","string_decoder","StringDecoder","utf16Text","utf16End","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","utf8End","utf8Text","utf8CheckByte","utf8CheckIncomplete","utf8CheckExtraBytes","ERR_STREAM_PREMATURE_CLOSE","called","_len","isRequest","readable","writable","onlegacyfinish","onfinish","writableEnded","readableEnded","onerror","onclose","onrequest","endOfStream","_Object$setPrototypeO","kLastResolve","kLastReject","kError","kEnded","kLastPromise","kHandlePromise","kStream","createIterResult","readAndResolve","iter","onReadable","wrapForNext","lastPromise","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","_this2","createReadableStreamAsyncIterator","_Object$create","async_iterator","fromBrowser","_stream_readable","ReadableState","EElistenerCount","debugUtil","debug","ERR_STREAM_PUSH_AFTER_EOF","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","kProxyEvents","prependListener","skipChunkCheck","readableAddChunk","addToFront","onEofChunk","chunkInvalid","addChunk","maybeReadMore","emitReadable","decoder","MAX_HWM","computeNewHighWaterMark","howMuchToRead","nOrig","endReadable","doRead","fromList","emitReadable_","flow","maybeReadMore_","dest","pipeOpts","doEnd","endFn","unpipe","onunpipe","unpipeInfo","cleanup","ondrain","pipeOnDrain","cleanedUp","ondata","indexOf","dests","ev","nReadingNextTick","updateReadableListening","resume","resume_","paused","endReadableNT","iterable","xs","_stream_transform","Transform","ERR_TRANSFORM_ALREADY_TRANSFORMING","ERR_TRANSFORM_WITH_LENGTH_0","afterTransform","err2","_stream_passthrough","PassThrough","ERR_MISSING_ARGS","destroyer","reading","writing","closed","pipe","popCallback","streams","pipeline","destroys","pipeline_1","throwIfNotStringOrBuffer","HashBase","hashBase","ARRAY16","MD5","fnF","fnG","fnH","fnI","md5_js","zl","zr","hl","hr","fn1","fn5","fn2","fn4","fn3","finalSize","assigned","lowBits","highBits","K","Sha","rotl5","rotl30","ft","sha","Sha1","rotl1","sha1","Sha256","maj","sigma0","gamma0","gamma1","Sha224","sha224","Sha512","xl","Gamma0","Gamma0l","Gamma1","Gamma1l","getCarry","dh","eh","fh","gh","hh","fl","gl","xh","gamma0l","gamma1l","Wi7h","Wi7l","Wi16h","Wi16l","Wil","Wih","majh","majl","Kih","Kil","chh","chl","t1l","t1h","t2l","t2h","writeInt64BE","Sha384","sha384","sha_jsModule","Algorithm","streamBrowserify","didOnEnd","CipherBase","hashMode","inputEnc","outputEnc","outData","fin","cipherBase","alg","blocksize","Hmac","ipad","opad","md5","Legacy","MAX_ALLOC","precondition","defaultEncoding","pVersionMajor","defaultEncoding_1","toBuffer","checkParameters","sizes","saltLen","getDigest","ipad1","shaFunc","rmd160Func","block1","destPos","hLen","U","syncBrowser","ZERO_BUF","subtle","toBrowser","checks","checkNative","prom","browserPbkdf2","getNextTick","async","off","inL","inR","outL","outR","pc2table","sTable","sb","permuteTable","minimalisticAssert","Cipher","cipher","inputOff","outputOff","DESState","DES","des","shiftTable","kL","kR","inp","inOff","outOff","lStart","rStart","keyL","keyR","CBCState","instantiate","cbc","EDEState","k3","EDE","ede","modes","browserifyDes","modeName","ecb","bufferXor","xor","encryptStart","cfb","encryptByte","byteParam","cfb8","shiftIn","cfb1","getBlock","ofb","incr32","incr32_1","chunkNum","modeModules","modes_1","asUInt32Array","scrubVec","cryptBlock","keySchedule","SUB_MIX","SBOX","nRounds","SUB_MIX0","SUB_MIX1","SUB_MIX2","SUB_MIX3","s3","ksRow","RCON","INV_SBOX","INV_SUB_MIX","sx","keyWords","keySize","ksRows","invKeySchedule","ksR","m1","aes","ZEROES","fromArray","GHASH","Vi","Zi","lsbVi","abl","ghash","xorTest","calcIv","ck","toPad","ivBits","StreamCipher","rump","authCipher","streamCipher","EVP_BytesToKey","keyBits","ivLen","keyLen","used","keyStart","ivStart","evp_bytestokey","MODES","AuthCipher","ebtk","Splitter","PADDING","setTo","padBuff","createCipheriv","suite","createCipher","encrypter","Decipher","unpad","autoPadding","createDecipheriv","createDecipher","decrypter","ciphers","deciphers","getCiphers","aesModes","desModes","BN","endian","parseHex4Bits","parseHexByte","lowerBound","parseLength","parseBase","limbLen","limbPow","groupSizes","groupBases","groupSize","groupBase","ArrayType","reqLength","toBitArray","wbit","bytesNeeded","bitsLeft","smallMulTo","ncarry","rword","maxJ","comb10MulTo","a0","al0","ah0","al1","ah1","al2","ah2","al3","ah3","al4","ah4","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","bl1","bh1","bl2","bh2","bl3","bh3","b4","bl4","bh4","b5","bl5","bh5","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","bl9","bh9","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","fftm","FFTM","rb","rbt","rws","iws","rtws","itws","rtwdf","itwdf","rtwdf_","itwdf_","ie","ro","io","rx","odd","ws","ph","rwst","iwst","nrws","nrwst","niwst","rmws","carryMask","newCarry","extended","maskedWords","bhi","bhiBits","qj","positive","dm","yp","xp","im","jm","Red","primes","MPrime","rlen","K256","P224","P192","P25519","prime","mod3","one","nOne","lpow","inv","wnd","currentLen","Mont","brorandModule","Rand","brorand","bn","MillerRabin","mr","min_bytes","red","rone","rn1","generatePrime","findPrime","simpleSieve","fermatTest","TWENTYFOUR","millerRabin","TWO","FIVE","TEN","THREE","ELEVEN","FOUR","_getPrimes","SEVEN","DH","setPublicKey","setPrivateKey","priv","primeCache","checkPrime","generator","malleable","secret","front","formatReturnValue","getDiffieHellman","ENCODINGS","createDiffieHellman","genc","move","allocate","postfix","isNegNum","blind","getr","blinder","crt","blinds","blinded","qinv","m2","browserifyRsa","zero2","minAssert","minUtils","getNAF","naf","getJSF","jsf","m8","m14","m24","cachedProperty","computer","parseBytes","intFromLE","BaseCurve","conf","adjustCount","doubles","repr","nafW","nafPoints","defW","coeffs","jacobianResult","wndWidth","comb","ja","jb","zero","BasePoint","compact","precomputed","dbl","ShortCurve","short","beta","lambda","betas","lambdas","basis","vec","tinv","ntinv","l1","l2","aprxSqrt","prevR","len1","v1","v2","q1","q2","npoints","ncoeffs","isRed","pre","endoMul","obj2point","nx","ny","ys1","dyinv","_precompute","negate","JPoint","zinv","zinv2","pz2","z2","nz","jx","jy","jz","jz4","jyd","jx2","jyd2","jyd4","dny","xx","yy","yyyy","yyyy8","c8","gamma","beta4","beta8","ggamma8","jy2","jxd4","jyd8","mm","yyu4","kbase","z3","pz3","MontCurve","mont","aa","bb","da","EdwardsCurve","edwards","nt","zi","isSurrogatePair","htonl","toHex32","zero8","join32","split32","rotr32","rotl32","sum32","sum32_3","sum32_4","sum32_5","sum64","sum64_hi","sum64_lo","sum64_4_hi","sum64_4_lo","sum64_5_hi","sum64_5_lo","rotr64_hi","rotr64_lo","shr64_hi","shr64_lo","BlockHash","common","ft_1","ch32","p32","maj32","s0_256","s1_256","g0_256","g1_256","shaCommon","sha1_K","SHA1","_1","sha256_K","_256","SHA224","_224","sha512_K","_512","c0_hi","g1_512_hi","c0_lo","g1_512_lo","c1_hi","c1_lo","c2_hi","g0_512_hi","c2_lo","g0_512_lo","c3_hi","c3_lo","s1_512_hi","s1_512_lo","ch64_hi","ch64_lo","c4_hi","c4_lo","T1_hi","T1_lo","s0_512_hi","s0_512_lo","maj64_hi","maj64_lo","T2_hi","T2_lo","yh","yl","zh","SHA384","_384","ripemd","rh","Kh","sh","curves","PresetCurve","defineCurve","HmacDRBG","pers","hmacDrbg","kmac","entropyEnc","addEnc","KeyPair","ec","Position","getLength","octetLen","rmPadding","slen","constructLength","octets","backHalf","EC","drbg","ns2","truncOnly","bkey","ns1","kp","kpX","recoveryParam","sinv","isSecondKey","rInv","Qprime","eddsa","lastIx","EDDSA","Rencoded","s_","SG","RplusAh","normed","xIsOdd","elliptic","safer","Safer","safer_1","Reporter","reporter","ReporterError","inherited","elem","DecoderBuffer","save","fail","EncoderBuffer","tags","methods","overrided","Node","stateProps","cstate","children","newKey","present","prevKey","prevObj","explicit","entity","reverse","der","DEREncoder","DERNode","der_1","encodedTag","encodeTag","lenOctets","relative","ident","objid","two","numArray","dataBuffer","PEMEncoder","pem","encoders","bignum","DERDecoder","any","decodedTag","derDecodeTag","derDecodeLen","possibleEnd","unused","raw","numstr","printstr","identifiers","subident","mon","day","hour","sec","oct","tagStr","PEMDecoder","lines","decoders","Entity","Generated","asn1","asn","Time","AttributeTypeValue","AlgorithmIdentifier","SubjectPublicKeyInfo","RelativeDistinguishedName","RDNSequence","Name","Validity","Extension","TBSCertificate","X509Certificate","certificate","asn1_1","RSAPrivateKey","RSAPublicKey","PublicKey","PrivateKeyInfo","EncryptedPrivateKeyInfo","DSAPrivateKey","ECPrivateKey","ECParameters","findProc","startRegex","fullRegex","evp","fixProc","okey","decrypted","cipherText","cipherKey","match2","aesid","compat","parseAsn1","parseKeys","stripped","ndata","RSA_PKCS1_PADDING","hashType","signType","ecSign","dsaSign","curveId","kv","getKey","makeKey","makeR","toDER","hlen","hbits","bits2octets","obits","signModule","sign_1","ecVerify","dsaVerify","padNum","unpacked","montp","verify_1","algorithms","Sign","Verify","sigBuffer","createSign","createVerify","ECDH","aliases","inenc","otherPub","_priv","mgf","i2ops","withPublic","paddedMsg","withPublic_1","publicEncrypt","oaep","pkcs1","hLen2","ps","dblen","maskedDb","maskedSeed","nonZero","privateDecrypt","zBuffer","db","dif","safeBuffer","randombytes","kBufferMaxLength","kMaxUint32","assertOffset","randomFill","randomFillSync","actualFill","ourBuf","uint","cryptoBrowserify","algos","algoKeys","hashes","rf","NodeRandomSource","require","nodeCrypto","node$1","system","browser_1","node_1","SystemRandomSource","system_1","prng","randomUint32","ALPHANUMERIC","randomString","charset","charsLen","maxByte","randomByte","randomStringForEntropy","dataPos","hashBlocks","bytesHashed","bitLenHi","bitLenLo","padLength","random_1","gf","_9","_121665","car25519","sel25519","pack25519","unpack25519","t8","t9","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","t26","t27","t28","t29","t30","b10","b12","b13","b14","b15","square","inv25519","scalarMult","x32","x16","scalarMultBase","generateKeyPairFromSeed","secretKey","generateKeyPair","sharedKey","mySecretKey","theirPublicKey","rejectZero","asUint8Array","BASE_MAP","LEADER","FACTOR","iFACTOR","zeroes","pbegin","pend","b58","it1","it2","decodeUnsafe","psz","b256","it3","it4","vch","_brrp__multiformats_scope_baseX","coerce","Encoder","baseEncode","Decoder","baseDecode","or","ComposedDecoder","Codec","baseX","basex","bitsPerChar","written","rfc4648","identity","base2","base8","base10","base16","base16upper","base32","base32upper","base32pad","base32padupper","base32hex","base32hexupper","base32hexpad","base32hexpadupper","base32z","base36upper","base58btc","base58flickr","base64pad","base64url","base64urlpad","alphabetBytesToChars","alphabetCharsToBytes","byts","byt","base256emoji","bases","identityBase","base58","createCodec","ascii","BASES","__spreadArray","BrowserInfo","os","NodeInfo","SearchBotDeviceInfo","bot","BotInfo","ReactNativeInfo","SEARCHBOX_UA_REGEX","SEARCHBOT_OS_REGEX","REQUIRED_VERSION_PARTS","userAgentRules","operatingSystemRules","detect","parseUserAgent","getNodeVersion","matchUserAgent","matched","uaMatch","matchedRule","versionParts","createVersionParts","detectOS","searchBotMatch","isNode","__extends","__assign","__rest","__param","__metadata","__awaiter","__generator","__exportStar","__values","__read","__spread","__spreadArrays","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__createBinding","factory","createExporter","previous","exporter","extendStatics","__","paramIndex","decorator","metadataKey","metadataValue","_arguments","adopt","verb","il","jl","fulfill","cooked","privateMap","delay_1","misc","tslib_1","convert","constants_1","toMiliseconds","seconds","fromMiliseconds","miliseconds","watch","Watch","elapsed","IWatch","cjs","cjs$4","getLocation_1","getNavigator_1","getDocument_1","getFromWindow","getFromWindowOrThrow","getDocumentOrThrow","getDocument","getNavigatorOrThrow","getNavigator","getLocationOrThrow","getLocation","getCryptoOrThrow","getCrypto","getLocalStorageOrThrow","getLocalStorage","getWindowMetadata_1","window_getters_1","getWindowMetadata","doc","loc","getIcons","rel","absoluteHref","finalPath","absoluteUrl","getWindowMetadataOfAny","metaTags","attributes","attr","getName","getDescription","strictUriEncode","singleMatcher","multiMatcher","decodeComponents","customDecodeURIComponent","replaceMap","decodeUriComponent","encodedURI","splitOnFirst","separatorIndex","filterObj","predicate","isArr","decodeComponent","filterObject","encodeFragmentIdentifier","encoderForArrayFormat","keyValueSep","parserForArrayFormat","accumulator","isEncodedArray","validateArrayFormatSeparator","keysSorter","removeHash","hashStart","extract","queryStart","parseValue","parse","formatter","shouldFilter","objectCopy","url_","queryFromUrl","parsedQueryFromUrl","queryString","fragmentIdentifier","exclusionFilter","ve","Un","J","Dn","Te","X","kn","fe.generateKeyPair","Vn","Mn","fe.sharedKey","On","Sn","Kn","de","Ln","Pe","xn","ue","Re","Fn","pe","Hn","Ae","qn","Bn","Ue","Gn","Wn","$e","Ce","De","te","Jn","ke","M.parse","M.stringify","Qn","Tn","Ve","wn","Me","he","Ke","Xn","ot","at","lt","pt","In","mt","yt","gt","ht","He","vt","Et","Pn","bt","Nt","Ot","qe","St","wt","Be","It","Tt","Ge","Pt","We","ze","Rt","Qe","Ze","Xe","oe","en","nn","tn","Mt","rn","Kt","Lt","xt","Ft","on","sn","cn","an","un","ce","Ht","ln","dn","qt","Bt","Gt","Wt","zt","Yt","Jt","Qt","Zt","Xt","nr","pn","mn","yn","gn","hn","vn","ae","sr$4","suspectProtoRx","suspectConstructorRx","JsonSigRx","jsonParseTransform","warnKeyDropped","destr","_lval","wrapToPromise","asyncCall","function_","arguments_","isPureObject","checkBufferSupport","BASE64_PREFIX","serializeRaw","deserializeRaw","normalizeKey","joinKeys","normalizeBaseKey","defineDriver","DRIVER_NAME","memory","createStorage","getMount","getMounts","includeParent","mountpoint","onChange","startWatch","stopWatch","runBatch","commonOptions","batches","getBatch","mount","isStringItem","options2","storage","relativeKey","driver","meta","value_","mounts","maskedMounts","allKeys","dispose","unwatcher","_dispose","promisifyRequest","createStore","dbName","storeName","dbp","txMode","defaultGetStoreFunc","defaultGetStore","get","customStore","store","del","clear","eachCursor","JSONStringify","JSONParse","numbersBiggerThanMaxInt","serializedData","safeJsonParse","safeJsonStringify","_$8","K$8","h$8","IEvents$1","heartbeat","events_1","IHeartBeat","time_1","types_1","HeartBeat","tryStringify","quickFormatUnescaped","ss","argLen","lastPos","flen","pino","_console","pfGlobalThisOrFallback","stdSerializers","mock","passthrough","asErrValue","shouldSerialize","serialize","serializers","transmit","stdErrSerialize","levels","logger","getLevelVal","getLevel","setLevel","setOpts","getTimeFunction","createLogEventShape","bindings","childOptions","childOptionsSerializers","childSerializers","childSerialize","applySerializers","Child","nullTime","epochTime","unixTime","isoTime","write","asObject","transmitLevel","transmitValue","methodValue","argsCloned","lvl","methodLevel","defd","O$5","d$8","L$9","m$7","n$8","h$7","a$7","u$7","g$9","d$7","E$6","y$7","v$9","b$6","w$7","th","sha512_1","gf0","gf1","D2","Y","set25519","verify32","neq25519","par25519","pow2523","edadd","cswap","ty","scalarmult","scalarbase","extractPublicKeyFromSecretKey","modL","reduce","hs","unpackneg","chk","den","den2","den4","den6","convertPublicKeyToX25519","convertSecretKeyToX25519","JWT_IRIDIUM_ALG","JWT_IRIDIUM_TYP","JWT_DELIMITER","JWT_ENCODING","JSON_ENCODING","DATA_ENCODING","DID_DELIMITER","DID_PREFIX","DID_METHOD","MULTICODEC_ED25519_ENCODING","MULTICODEC_ED25519_BASE","MULTICODEC_ED25519_HEADER","KEY_PAIR_SEED_LENGTH","encodeJSON","encodeIss","multicodec","encodeSig","encodeData","encodeJWT","ed25519.generateKeyPairFromSeed","signJWT","aud","ttl","keyPair","iat","ed25519.sign","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","STANDARD_ERROR_MAP","DEFAULT_ERROR","isReservedErrorCode","getError","getErrorByCode","parseConnectionError","getBrowerCrypto","getSubtleCrypto","isBrowserCryptoAvailable","env","isReactNative","payloadId","extra","getBigIntRpcId","formatJsonRpcRequest","formatJsonRpcResult","formatJsonRpcError","formatErrorMessage","IEvents","IBaseJsonRpcProvider","IJsonRpcProvider","connection","HTTP_REGEX","WS_REGEX","getUrlProtocol","matchRegexProtocol","isHttpUrl","isWsUrl","isLocalhostUrl","isJsonRpcPayload","isJsonRpcRequest","isJsonRpcResponse","isJsonRpcResult","isJsonRpcError","f$5","LARGE_ARRAY_SIZE","HASH_UNDEFINED","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","symbolTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsTypedArray","arrayFilter","resIndex","arrayPush","arraySome","baseTimes","iteratee","baseUnary","cacheHas","mapToArray","overArg","setToArray","arrayProto","funcProto","objectProto","coreJsData","funcToString","maskSrcKey","uid","nativeObjectToString","reIsNative","Symbol","Uint8Array","propertyIsEnumerable","splice","symToStringTag","nativeGetSymbols","nativeIsBuffer","nativeKeys","DataView","getNative","Map","Promise","Set","WeakMap","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","hashClear","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","arrayLikeKeys","isArg","isBuff","isType","skipIndexes","isIndex","eq","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","getRawTag","baseIsArguments","isObjectLike","baseIsEqual","bitmask","customizer","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsNative","isMasked","baseIsTypedArray","isLength","baseKeys","isPrototype","isPartial","othLength","stacked","seen","arrValue","othValue","compared","othIndex","objProps","getAllKeys","objLength","othProps","skipCtor","objValue","objCtor","othCtor","getSymbols","isKeyable","unmasked","stubArray","Ctor","ctorString","isArrayLike","stubFalse","isEqual","unfetch_module","Hi","Ji","Xi","Ne","Wi","Qi","Zi$2","ts$3","is$4","es","ns","as","cs","us","ls","ds","Ds","bs","fs","Es","vs","Is","Cs","Rs","Ts","Ss","Ps","Os","As","Ns","Us","Ls","Le","$s","Fs","Ms","ks","Ks","Bs","Vs","Fe","qs","js","Gs","Ys","Hs","Js","Xs","Ws","Qs","Zs","or$3","ar$3","ur","je","lr","pr","Ye","Dr","Je","yr","et","it","Fi","Dt","Ct","_t","Pt$2","be","fe","xt$2","Y.generateKeyPair","Y.encodeIss","li","Y.signJWT","di","gi","ci","Ee","Di","yi","mi","we","bi","$i","fi","Ot$3","se","vr$1","ei","Mi","Bi","Cr","Rr","At","Tr","Sr","Nt$2","Ir","Ei","Pr","Ut","xr","Or","Ar","vr","wi","ji","vi","Oe","Ii","Nr","Ur","kt","Kt$3","si","Ci","Ri","Gi","Bt$3","Se","Ie","qi","Oi","ri","qt$3","Ai","jt$3","Ni","Ui","Li","Gt$3","ai","Yi","Lr","$r","Fr","te$3","Vt","$t","jt","Mr","ds$2","us$2","ge$4","gs$2","__self__","support","viewClasses","normalizeName","iteratorFor","Headers","oldValue","consumed","fileReaderReady","readBlobAsArrayBuffer","readBlobAsText","readArrayBufferAsText","bufferClone","Body","normalizeMethod","upcased","Request","preProcessedHeaders","Response","bodyInit","redirectStatuses","fetch","xhr","abortXhr","DEFAULT_FETCH_OPTS","EVENT_EMITTER_MAX_LISTENERS_DEFAULT","HttpConnection","disableProviderPing","currentMaxListeners","Ia","Fg","Mg","qg","xa","Bg","En","Da","Ha","Na","$a","Ua","Wa","Fa","Nn","Ma","qa","Ba","Ga","za","Ka","Ya","Za","Ja","gr","wr","Xa","Qa","Va","ka","no","eo","so","Er","uo","ao","oo","fo","co","ho","po","go","vo","mo","wo","Po","Ao","Co","Io","xo","Eo","yo","So","Oo","Ro","bo","To","Lo","Do","Ho","No","$o","Uo","Wo","Fo","Mo","qo","Bo","Go","zo","Ko","Yo","Zo","Jo","Xo","Qo","Vo","ko","jo","jn","Hr","tf","vf","sf","Wr","uf","af","of","ff","cf","hf","lf","pf","df","wf","Pf","mf","Af","Cf","Br","If","xf","Ef","yf","Sf","Of","Rf","bf","Tf","Gr","Lf","Df","Hf","Nf","$f","Uf","Wf","Ff","Mf","qf","Bf","Fu","Gf","zf","Kf","ou","Yf","Zf","Jf","Xf","Qf","Vf","kf","jf","tc","rc","ic","sc","uc","ac","oc","Rn","fc","hc","lc","pc","Zn","dc","gc","Yr","zn","vc","Zr","An","hu","bu","Jc","Zc","uh","sa","ra","mc","vu","$n","Xr","wc","Pc","oh","Jr","_u","Qr","Ac","Cc","Ic","Vr","Hu","Ec","Sc","Su","nh","Oc","kr","Rc","bc","Tc","ma","jr","Lc","Lu","Tu","Dc","lu","oa","nu","tu","Yc","Hc","eu","Nc","ru","$c","Du","Uc","Wc","iu","Fc","Mc","Cn","su","uu","kc","au","fu","Wu","Bc","cu","Gc","Kc","pu","du","gu","Ou","Xc","mu","va","ga","Qc","Iu","wu","Pu","Yn","vh","Au","Vc","Cu","Nu","$u","xu","Eu","yu","jc","Bu","ih","Ru","lh","Uu","mh","Ph","Ih","Sh","Oh","Mu","qu","Rh","Gu","Lh","Nh","$h","Uh","Wh","Mh","zu","qh","Yh","Zh","Jh","Xh","Qh","Vh","kh","jh","nl","ul","ol","Ku","ll","pl","vl","ml","Yu","Pl","Il","Sl","Ol","Rl","Ll","Nl","Zu","Ju","$l","Ul","Wl","Ml","ql","Yl","Zl","Jl","Xl","Ql","Vl","Xu","Qu","Vu","ku","ju","na","wa","kl","np","tp","ep","ta","rp","sp","up","ap","fp","hp","lp","pp","gp","vp","mp","wp","Pp","Ap","Cp","Ip","ea","Ep","Sp","ia","Op","Rp","bp","Tp","Lp","Dp","Hp","Np","$p","Up","Wp","fa","fr","Mp","qp","Bp","Gp","ca","zp","Kp","Yp","Zp","Jp","Xp","Qp","Vp","jp","nd","td","ed","ud","ha","ad","od","fd","cd","la","pa","hd","ld","pd","dd","gd","vd","wd","Pd","Ad","Cd","xd","Ed","yd","Sd","Od","Rd","bd","Td","Ld","Dd","Hd","Nd","$d","Ud","Wd","Fd","Md","qd","Bd","Gd","zd","Kd","Yd","Zd","Jd","Xd","Qd","Vd","kd","jd","ng","tg","eg","rg","ig","ug","ag","og","fg","cg","hg","lg","pg","dg","vg","mg","wg","Pg","Ag","Cg","Ig","xg","Eg","yg","Sg","Og","Rg","Gg","zg","Kg","Ea","Yg","Zg","ya","Jg","Dg","Sa","Xg","Oa","Ra","Lg","Pa","Qg","Vg","ba","$g","rv$1","iv$1","sv$1","uv","av","ov","Ta","fv","cv","La","lr$4","Ug","Hg","Ng","Wg","Aa","Tg","Ca","jg","tv","kg","rv","sv","hv","v$7","EthersConstantsUtil","EthersHelpersUtil","EthersStoreUtil","providerType","ethersConfig","siweConfig","chains","defaultChain","chainImages","_sdkVersion","w3mOptions","networkControllerClient","walletChoice","nsMethods","nsChains","connectionControllerClient","onUri","WalletConnectProvider","InjectedProvider","CoinbaseProvider","txParams","browserProvider","txReceipt","originalAddress","getOriginalAddress","walletConnectProvider","walletConnectProviderOptions","EthereumProvider","walletId","currentActiveWallet","currentProvider","smartAccountDeployed","disconnectHandler","accountsChangedHandler","chainChangedHandler","currentAccount","caipChainId","ensProvider","jsonRpcProvider","switchError","EIP6963Provider","w3mConnectors","injectedConnectorType","isLoginEmailUsed","eip6963ProviderObj","enableEIP6963","walletLogo_1","walletLogo","walletLogo$1","constants$3","constants$2","FALLBACK_MESSAGE","getMessageFromCode","fallbackMessage","codeString","hasKey","isJsonRpcServerError","isValidCode","getErrorCode","isErrorWithCode","shouldIncludeStack","serialized","assignOriginalError","hasStringProperty","utils_1","errors$1","getEthJsonRpcError","getEthProviderError","EthereumProviderError","parseOpts","EthereumRpcError","isValidEthProviderCode","Web3Response","isErrorResponse","Web3Response_1","version_1","serializeError","requestOrMethod","getErrorObject","docUrl","getMethod","methodInData","errors_1","serialize_1","OpaqueType","type$1","IntNumber","ProviderType","util$3","bn_js_1","error_1","type_1","INT_STRING_REGEX","HEXADECIMAL_STRING_REGEX","randomBytesHex","uint8ArrayToHex","hexStringToUint8Array","hexStringFromBuffer","includePrefix","bigIntStringFromBN","intNumberFromHexString","ensureEvenLengthHexString","hexStringFromIntNumber","has0xPrefix","strip0x","prepend0x","ensureHexString","ensureAddressString","ensureBuffer","ensureIntNumber","ensureRegExpString","ensureBN","isBigNumber","ensureParsedJSONObject","getFavicon","host","createQrUrl","sessionId","sessionSecret","serverUrl","isParentConnection","sessionIdKey","isInIFrame","isMobileWeb","ScopedLocalStorage_1","ScopedLocalStorage","scope","keysToRemove","ScopedLocalStorage$1","DiagnosticLogger","RelayAbstract_1","RelayAbstract$1","RelayAbstract","jsonRpcUrl","Hash$6","exports$1","Session_1","sha_js_1","util_1","STORAGE_KEY_SESSION_ID","STORAGE_KEY_SESSION_SECRET","STORAGE_KEY_SESSION_LINKED","Session","linked","Session$1","Cipher_1","plainText","ivBytes","encryptedResult","tagLength","authTag","encryptedPlaintext","authTagBytes","encryptedPlaintextBytes","concatted","encrypted","concattedBytes","Cipher$1","WalletLinkHTTP_1","WalletLinkHTTP","linkAPIUrl","sessionKey","credentials","responseEvents","WalletLinkHTTP$1","WalletLinkWebSocket_1","WalletLinkWebSocket$1","ConnectionState","WalletLinkWebSocket","WebSocketClass","webSocket","WalletLinkConnection_1","DiagnosticLogger_1","HEARTBEAT_INTERVAL","REQUEST_TIMEOUT","WalletLinkConnection","diagnostic","__destroyed","encryptedEthereumAddress","encryptedMetadataValue","decryptedValue","walletUsername","appVersion","encryptedChainId","encryptedJsonRpcUrl","connect","decryptedData","unencryptedData","callWebhook","reqId","timeoutId","WalletLinkConnection$1","cssResetCss","cssReset","cssReset_css_1","injectCssReset","styleEl","clsx","CloseIcon_1","preact_1","CloseIcon","CloseIcon$1","CoinbaseWalletRound_1","CoinbaseWalletRound","CoinbaseWalletRound$1","QRCodeIcon_1","QRCodeIcon","QRCodeIcon$1","QR8bitByte","QRMode","QRCodeModel","typeNumber","errorCorrectLevel","minLostPoint","lostPoint","QRUtil","target_mc","instance_name","qr_mc","dataList","rsBlocks","QRRSBlock","QRBitBuffer","totalDataCount","maxDcCount","maxEcCount","dcdata","ecdata","dcCount","rsPoly","rawPoly","QRPolynomial","modPoly","modIndex","totalCodeCount","QRErrorCorrectLevel","QRMaskPattern","errorCorrectLength","QRMath","qrCode","sameCount","ratio","totalCount","dataCount","rsBlock","QRCodeLimitLength","_getErrorCorrectLevel","_getTypeNumber","_getUTF8Length","pretty","indent","EOL","xsize","ysize","join","xmlDeclaration","predefined","defs","bgrect","modrect","pathdata","imgSvg","imgWidth","imgHeight","imgX","imgY","qrcodeSvg","QRCode_1","hooks_1","qrcode_svg_1","setSvg","QRCode$2","SpinnerCss","Spinner_1","Spinner_css_1","Spinner","Spinner$1","ConnectContentCss","ConnectContent_1","ConnectContent$1","clsx_1","ConnectContent_css_1","CoinbaseWalletSteps","makeIconColor","ConnectContent","qrUrl","WalletSteps","ConnectItem","ArrowLeftIcon_1","ArrowLeftIcon","ArrowLeftIcon$1","LaptopIcon_1","LaptopIcon","LaptopIcon$1","SafeIcon_1","SafeIcon","SafeIcon$1","TryExtensionContentCss","TryExtensionContent_1","TryExtensionContent_css_1","TryExtensionContent","clicked","setClicked","handleInstallClick","handleClick","TryExtensionContent$1","ConnectDialogCss","ConnectDialog_1","ConnectDialog_css_1","ConnectDialog","darkMode","containerHidden","setContainerHidden","dialogHidden","setDialogHidden","timers","ConnectDialog$1","LinkFlow_1","LinkFlow","connectDisabled","LinkFlow$1","SnackbarCss","Snackbar_css_1","cblogo","gearIcon","Snackbar","itemProps","SnackbarContainer","SnackbarInstance","autoExpand","menuItems","hidden","setHidden","setExpanded","toggleExpanded","WalletLinkRelayUI_1","cssReset_1","Snackbar_1","WalletLinkRelayUI","snackbarProps","WalletLinkRelayUI$1","WalletLinkRelay_1","WalletLinkRelay","cachedAddresses","wasConnectedViaStandalone","sessionIdHash","selectedAddress","isStandalone","storedSession","appName","appLogoUrl","addPrefix","typedDataJson","signedTransaction","hideSnackbarItem","disabled","accountsCallback","chainCallback","errorCode","onAccounts","providerOptions","_cancel","approve","selectedProviderKey","rpcUrls","iconUrls","blockExplorerUrls","chainName","nativeCurrency","rpcUrl","onSuccess","RedirectDialogCss","RedirectDialog_1","RedirectDialog_css_1","RedirectDialog","RedirectDialogContent","buttonText","onButtonClick","onDismiss","MobileRelayUI_1","MobileRelayUI","_connected","walletLinkUrl","MobileRelayUI$1","MobileRelay_1","MobileRelay","navigatedToCBW","MobileRelay$1","Transform$3","keccak","KeccakState","capacity","delimitedSuffix","hashBitLength","shake","Shake","dataByteLength","createKeccak","createShake","P1600_ROUND_CONSTANTS","keccakStateUnroll","lo0","hi0","lo1","hi1","lo2","hi2","lo3","hi3","lo4","hi4","t1slo0","t1shi0","t1slo5","t1shi5","t1slo10","t1shi10","t1slo15","t1shi15","t1slo20","t1shi20","t1slo1","t1shi1","t1slo6","t1shi6","t1slo11","t1shi11","t1slo16","t1shi16","t1slo21","t1shi21","t1slo2","t1shi2","t1slo7","t1shi7","t1slo12","t1shi12","t1slo17","t1shi17","t1slo22","t1shi22","t1slo3","t1shi3","t1slo8","t1shi8","t1slo13","t1shi13","t1slo18","t1shi18","t1slo23","t1shi23","t1slo4","t1shi4","t1slo9","t1shi9","t1slo14","t1shi14","t1slo19","t1shi19","t1slo24","t1shi24","t2slo0","t2shi0","t2slo16","t2shi16","t2slo7","t2shi7","t2slo23","t2shi23","t2slo14","t2shi14","t2slo10","t2shi10","t2slo1","t2shi1","t2slo17","t2shi17","t2slo8","t2shi8","t2slo24","t2shi24","t2slo20","t2shi20","t2slo11","t2shi11","t2slo2","t2shi2","t2slo18","t2shi18","t2slo9","t2shi9","t2slo5","t2shi5","t2slo21","t2shi21","t2slo12","t2shi12","t2slo3","t2shi3","t2slo19","t2shi19","t2slo15","t2shi15","t2slo6","t2shi6","t2slo22","t2shi22","t2slo13","t2shi13","t2slo4","t2shi4","keccakState","createKeccakHash","setLength","setLengthRight","padToEven","stripHexPrefix","bufferToHex","elementaryName","parseTypeN","parseTypeNxM","parseTypeArray","parseNumber","encodeSingle","isDynamic","rawEncode","headLength","solidityPack","soliditySHA3","TYPED_MESSAGE_SCHEMA","TypedDataUtils","primaryType","useV4","encodedTypes","encodedValues","encodeField","parsedType","typeValuePairs","deps","dep","sanitizedData","typedData","ethEip712Util","msgParams","typedSignatureHashLegacy","FilterPolyfill_1","FilterPolyfill$1","TIMEOUT","JSONRPC_TEMPLATE","FilterPolyfill","filterFromParam","filterNotFoundError","paramFromFilter","cursorPosition","currentBlockHeight","emptyResult","highestBlock","newCursorPosition","_id","initialCursorPosition","intBlockHeightFromHexBlockHeight","hexBlockHeightFromIntBlockHeight","jsonRpcRandomId","IdIterator","idCounter","processFn","pify","safeApply","SafeEventEmitter$3","SafeEventEmitter","BaseBlockTracker_1","safe_event_emitter_1","calculateSum","blockTrackerEvents","BaseBlockTracker","newBlock","currentBlock","newBlockInt","hexToInt","currentBlockInt","oldBlock","hexInt","StructError","failure","failures","cached","explanation","isIterable","print","shiftIterator","toFailure","struct","branch","toFailures","run","Struct","refiner","coercer","validate","tuples","tuple","assign","Structs","lazy","omit","subschema","partial","isStruct","optional","pick","Element","boolean","enums","Class","integer","intersection","literal","constant","Key","Value","never","nullable","knowns","Never","unknowns","record","regexp","coerced","unknown","defaulted","changed","trimmed","refine","getSize","exclusive","nonempty","assert_1","superstruct_1","isErrorWithMessage","isConstructable","getErrorMessage","ErrorWrapper","AssertionError","assert$2","assertStruct","errorPrefix","assertExhaustive","_object","base64_1","paddingRequired","characterSet","letters","base64$1","isStrictHexString","assertIsHexString","assertIsStrictHexString","add0x","hexadecimal","remove0x","hex_1","HEX_MINIMUM_NUMBER_CHARACTER","HEX_MAXIMUM_NUMBER_CHARACTER","HEX_CHARACTER_OFFSET","getPrecomputedHexValuesBuilder","lookupTable","getPrecomputedHexValues","assertIsBytes","bytesToBigInt","bytesToSignedBigInt","bytesToNumber","bytesToString","strippedValue","normalizedValue","bigIntToBytes","bigIntFits","signedBigIntToBytes","numberToBytes","stringToBytes","valueToBytes","normalizedValues","createDataView","coercers","bytes_1","NumberLikeStruct","NumberCoercer","BigIntCoercer","BytesCoercer","HexCoercer","createNumber","createBigInt","createBytes","createHex","_FrozenMap_map","_FrozenSet_set","collections","FrozenMap","callbackfn","_map","FrozenSet","value2","_set","member","encryptionTypes","finiteNumber","checkStruct","innerValue","unsafeResult","isValidJson","getJsonSize","isJsonRpcNotification","assertIsJsonRpcNotification","assertIsJsonRpcRequest","isPendingJsonRpcResponse","assertIsPendingJsonRpcResponse","assertIsJsonRpcResponse","isJsonRpcSuccess","assertIsJsonRpcSuccess","isJsonRpcFailure","assertIsJsonRpcFailure","assertIsJsonRpcError","getJsonRpcIdValidator","permitEmptyString","permitFractions","permitNull","keyring","fmtLong","fmtShort","msAbs","plural","isPlural","setup","createDebug","disable","enable","enabled","selectColor","namespace","prevTime","enableOverride","namespacesCache","enabledCache","newDebug","namespaces","toNamespace","formatArgs","load","useColors","localstorage","lastC","formatters","logging","globalLogger","createProjectLogger","projectName","createModuleLogger","projectLogger","moduleName","isNonEmptyArray","hasProperty","objectToCheck","JsonSize","isASCII","calculateStringSize","calculateNumberSize","bigIntToHex","hexToBigInt","opaque","Duration","isNonNegativeInteger","assertIsNonNegativeInteger","inMilliseconds","timeSince","transactionTypes","SEMVER_SPEC_VERSION","MAX_LENGTH","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","debug_1","safeRe","LETTERDASHNUMBER","safeRegexReplacements","makeSafeRegex","createToken","isGlobal","safe","looseOption","emptyOpts","parseOptions_1","compareIdentifiers","anum","bnum","parseOptions","SemVer$d","SemVer","release","identifier","identifierBase","prerelease","semver","parse_1","throwErrors","valid_1","clean_1","inc_1","diff_1","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","major_1","minor_1","patch_1","prerelease_1","compare_1","rcompare_1","compareLoose_1","compareBuild_1","versionA","versionB","compareBuild","sort_1","rsort_1","gt_1","lt_1","eq_1","neq_1","gte_1","lte_1","neq","gte","lte","cmp_1","coerce_1","coerceRtlRegex","major","minor","patch","Yallist","walker","yallist","Yallist$1","push","unshift","thisp","deleteCount","insert","inserted","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","mL","allowStale","mA","lC","hit","forEachStep","isStale","maxAge","Entry","expiresAt","doUse","lruCache","Range","Comparator","isNullSet","isAny","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","hyphenReplace","comparatorTrimReplace","tildeTrimReplace","caretTrimReplace","rangeList","parseComparator","replaceGTE0","rangeMap","comparators","thisComparators","isSatisfiable","rangeComparators","thisComparator","rangeComparator","testSet","LRU","remainingComparators","testComparator","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","replaceCaret","replaceXRange","gtlt","xM","xm","anyX","incPr","$0","fM","fm","fpr","fb","tM","tm","tpr","tb","ANY","comparator","satisfies_1","toComparators_1","maxSatisfying_1","versions","maxSV","rangeObj","minSatisfying_1","minSV","minVersion_1","minver","setMin","compver","valid","satisfies","outside_1","hilo","gtfn","ltefn","ltfn","ecomp","high","outside","gtr_1","ltr_1","intersects_1","simplify","ranges","simplified","subset","dom","sawNonNull","OUTER","simpleSub","simpleDom","isSub","simpleSubset","minimumVersionWithPreRelease","minimumVersion","eqSet","higherGT","lowerLT","gtltComp","higher","lower","hasDomLT","hasDomGT","needDomLTPre","needDomGTPre","subset_1","internalRe","clean","require$$13","rcompare","require$$14","compareLoose","require$$15","require$$16","sort","require$$17","rsort","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","require$$33","require$$34","require$$35","require$$36","require$$37","require$$38","require$$39","require$$40","semver_1","isValidSemVerVersion","isValidSemVerRange","versionRange","assertIsSemVerVersion","assertIsSemVerRange","gtVersion","gtRange","satisfiesVersionRange","PollingBlockTracker_1","json_rpc_random_id_1","pify_1","logging_utils_1","createRandomId","PollingBlockTracker","newErr","latestBlock","unref","timeoutRef","SubscribeBlockTracker_1","SubscribeBlockTracker","SubscribeBlockTracker$1","getUniqueId_1","getUniqueId","getUniqueId$1","idRemapMiddleware","createIdRemapMiddleware","_end","originalId","newId","createAsyncMiddleware_1","createAsyncMiddleware","asyncMiddleware","resolveNextPromise","nextPromise","returnHandlerCallback","nextWasCalled","asyncNext","runReturnHandlersCallback","createAsyncMiddleware$3","createScaffoldMiddleware_1","createScaffoldMiddleware","createScaffoldMiddleware$3","safeEventEmitter","SafeEventEmitter$2","fastSafeStringify","deterministicStringify","LIMIT_REPLACE_NODE","CIRCULAR_REPLACE_NODE","replacerStack","replacer","spacer","decirc","replaceGetterValues","setReplace","replace","propertyDescriptor","edgeIndex","compareFunction","deterministicDecirc","fast_safe_stringify_1","stringifyReplacer","errorConstants","error_constants_1","classes_1","FALLBACK_ERROR_CODE","FALLBACK_ERROR","fallbackError","JsonRpcEngine_1","eth_rpc_errors_1","JsonRpcEngine","middleware","middlewareError","isComplete","returnHandlers","handlerCallback","reqs","responses","_err","callerReq","middlewareStack","returnHandler","jsonify","mergeMiddleware_1","mergeMiddleware","engine","mergeMiddleware$1","__setModuleDefault","__classPrivateFieldIn","Semaphore_1","Semaphore","_maxConcurrency","ticket","releaser","nextConsumer","released","Semaphore$1","Mutex_1","Mutex","Mutex$2","withTimeout_1","withTimeout","timeoutError","isTimeout","withTimeout$1","immutable","ethQuery","EthQuery","EthQuery$1","generateFnWithDefaultBlockFor","generateFnFor","createPayload","argCount","unwrapped","filterCache","writableOrConfigurableOwn","pified","baseFilter","newResults","updates","BaseFilter","baseFilterHistory","hexUtils","minBlockRef","maxBlockRef","sortBlockRefs","bnToHex","blockRefIsNumber","incrementHexInt","intToHex","unsafeRandomBytes","refs","sortedRefs","refA","refB","blockRef","int","unsafeRandomNibble","BaseFilterWithHistory","logFilter","newLogs","matchingLogs","normalizedLogAddress","topicPattern","logTopic","subtopicsToMatch","getBlocksForRange_1","getBlocksForRange","fromBlockNumber","blockCountToQuery","missingBlockNumbers","blockBodies","blockNum","sendAsync","blockFilter","blockHashes","txFilter","blockTxHashes","LogFilter","BlockFilter","TxFilter","ethJsonRpcFilters","createEthFilterMiddleware","blockTracker","filterIndex","mutex","waitForFree","mutexMiddlewareWrapper","toFilterCreationMiddleware","newLogFilter","newBlockFilter","newPendingTransactionFilter","toAsyncRpcMiddleware","uninstallFilterHandler","getFilterChanges","getFilterLogs","filterUpdater","releaseLock","objValues","uninstallAllFilters","installFilter","filterIndexHex","uninstallFilter","prevFilterCount","newFilterCount","updateBlockTrackerSubs","createFilterFn","asyncFn","createFilterMiddleware","subscriptionManager","createSubscriptionMiddleware","subscriptions","filterManager","isDestroyed","subscriptionType","subId","createSubNewHeads","filterParams","createSubFromFilter","normalizeBlock","_emitSubscriptionResult","filterIdHex","SubscriptionManager_1","eth_block_tracker_1","createSubscriptionManager","SubscriptionManager","SubscriptionManager$1","CoinbaseWalletProvider_1","eventemitter3_1","eth_eip712_util_1","DEFAULT_CHAIN_ID_KEY","DEFAULT_JSON_RPC_URL","CoinbaseWalletProvider","chainIdStr","notification","originalChainId","relay","isWhitelistedNetworkOrStandalone","switchResponse","callbackOrParams","arrayCb","newParams","newAddresses","syncResult","filterPromise","subscriptionPromise","requests","addressString","addressStr","toAddress","weiValue","gasPriceInWei","typedDataJSON","chainIdNumber","isDisconnect","CoinbaseWalletProvider$1","RelayEventManager_1","RelayEventManager","idStr","RelayEventManager$1","CoinbaseWalletSDK_1","wallet_logo_1","CoinbaseWalletSDK","uiConstructor","relayOption","extension","dappBrowser","CoinbaseWalletSDK_2","CoinbaseWalletProvider_2","enableInjected","enableCoinbase","enableEmail","defaultChainId","injectedProvider","coinbaseProvider","getInjectedProvider","getCoinbaseProvider","createWeb3Modal","Web3Modal","walletProvider","currentNetwork","clickedAnyWallet","connectRejectMethod","connectResolveMethod","web3Modal","newEvent","_config","OkxWallet","okx","XdefiWallet","_q","xfi","TrustWallet","trustWalletProvider","BitgetWallet","bitget","Nr.parse","Nr.stringify","i0","u0","l0","v0","m0","g0","A0","y0","L$5","M0","E0","N0","I0","_0","C0","V$3","R0","dr$2","Ut$2","O0","P0","U0","k0","q0","K0","H0","z0","Q0","G0","Y0","J0","W0","Z0","cn.generateKeyPair","cn.sharedKey","n$6","h$3","a$3","u$3","g$3","d$4","E$3","y$3","v$4","b$2","w$2","es$1","ts$1","is$1","ss$1","ar$1","hr$2","Ot$1","At$1","zt$1","Ut$1","kt$1","Vt$1","qt$1","jt$1","Yt$2","Ht$2","Wt$1","Zt$1","We$1","ne$2","lr$1","index$1","initConnector","otherNetworkIds","WalletConnect","rpcIdMapping","EIP6963AdapterUUIDIndex","detail","adapterList","Web3ModalSIWEClient","nonceRefetchIntervalMs","sessionRefetchIntervalMs","signOutOnAccountChange","signOutOnDisconnect","signOutOnNetworkChange","siweConfigMethods","W3mConnectingSiwe","visuals","translation","W3mConnectingSiweView","createSIWEConfig","o$4","u$1","L$1","Z$1","addUniqueItem","clamp","isEasingList","easing","rangeSize","getEasingForSegment","mix","noopReturn","fillOffset","offsetProgress","defaultOffset","interpolate","progressInRange","isCubicBezier","isEasingGenerator","calcBezier","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","steps","rounded","namedEasings","functionArgsRegex","getEasingFunction","definition","argsArray","Animation","keyframes","initialDuration","endDelay","repeat","autoplay","interpolate$1","currentIteration","iterationProgress","iterationIsOdd","latest","invariant","MotionValue","animation","getAnimationData","getMotionValue","motionValues","axes","order","transformAlias","rotation","baseTransformProperties","transformDefinitions","asTransformCssVar","transforms","axis","compareTransformOrder","transformLookup","isTransform","addTransformToElement","buildTransformTemplate","transformListToString","template","isCssVar","registeredProperties","registerCssVariable","testAnimation","featureTests","supports","resolution","generateLinearEasingPoints","numPoints","convertEasing","cubicBezierAsString","hydrateKeyframes","readInitialValue","keyframesList","getStyleName","stopAnimation","needsCommit","getUnitConverter","toUnit","finalKeyframe","getDevToolsRecord","animateStyle","keyframesDefinition","AnimationPolyfill","isRecording","persist","allowWebkitAcceleration","valueIsTransform","canAnimateNatively","motionValue","animationOptions","thisEasing","getOptions","resolveElements","selectorCache","createAnimation","withControls","animationFactory","controls","getActiveAnimation","activeAnimation","selectFinished","resolveOption","createAnimate","AnimatePolyfill","numElements","animationFactories","valueOptions","animate","animateProgress","keyframesOrOptions","animate$1"],"mappings":"guDAGY,IAAAA,IAAAA,IACRA,EAAA,SAAW,WACXA,EAAA,SAAW,WAFHA,IAAAA,IAAA,CAAA,CAAA,EASAC,IAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QAC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9D,IAAIT,EAAYD,EAAY5yG,CAAG,EAC/B,OAAOqzG,GACLT,EACA,IAAM,CACJ,MAAMI,EAAYJ,EAAY5yG,CAAG,EAC5B,OAAO,GAAG6yG,EAAWG,CAAS,GACjC5xF,EAASyxF,EAAYG,CAAS,CAEjC,EACDM,CACJ,CACA,CCdA,MAAMO,GAAc,mCACPC,GAAmB,CAC5B,CACI,MAAO,WACP,KAAM,WACN,SAAU,OACV,IAAK,EACR,CACL,EACaC,GAAgB,CACzB,gBAAiB,KACjB,WAAY,IACZ,WAAY,IACZ,YAAAF,GACA,sBAAuB,GAAGA,eAC1B,oBAAqB,GAAGA,wBACxB,qBAAsB,CAClB,gBACA,cACA,iBACA,cACA,eACA,aACA,iBACA,aACA,eACA,aACH,EACD,2BAA4B,CACxB,WACA,WACA,UACA,oBACA,WACA,OACA,MACH,EACD,mCAAoC,WACpC,mCAAoC,CAChC,SAAU,WACV,eAAgB,WAChB,QAAS,UACT,UAAW,oBACX,aAAc,WACd,KAAM,OACN,KAAM,MACT,EACD,0BAA2B,uCAC3B,iBAAkB,CACd,MACA,MACA,QACA,OACA,MACA,MACA,OACA,MACA,OACA,QACA,OACA,OACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,MACA,QACA,IACH,EACD,eAAgB,CACZ,MACA,MACA,QACA,OACA,MACA,MACA,OACA,MACA,OACA,QACA,OACA,OACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,MACA,QACA,KACA,MACA,QACA,OACA,OACA,MACA,OACA,OACA,QACA,QACA,MACA,OACA,QACA,MACA,SACA,QACA,MACA,MACA,KACA,OACA,MACA,SACA,SACA,MACA,QACA,MACA,OACA,SACA,KACA,KACH,EACD,qBAAsB,6CACtB,2BAA4B,CAChC,ECxIaG,GAAiB,CAC1B,UAAW,CACP,OAAI,OAAO,OAAW,IACX,QAAQ,OAAO,WAAW,kBAAkB,EAAE,SACjD,wDAAwD,K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AOI,CAAG,EAGlCJ,EAAI,EAAGA,EAAII,EAAI,OAAQJ,IAC1BI,EAAIJ,CAAC,GAAK,IACZ,KAAK,MAAQ,IAAI,KAAK,KAAI,EAAG,OAAOI,CAAG,CACzC,EAEAqmK,EAAK,UAAU,OAAS,SAAgB92J,EAAK2pJ,EAAK,CAChD,YAAK,MAAM,OAAO3pJ,EAAK2pJ,CAAG,EACnB,IACT,EAEAmN,EAAK,UAAU,OAAS,SAAgBnN,EAAK,CAC3C,YAAK,MAAM,OAAO,KAAK,MAAM,OAAM,CAAE,EAC9B,KAAK,MAAM,OAAOA,CAAG,2DC7C9B,IAAI/2I,EAAO1a,EAEX0a,EAAK,MAAQuvG,KACbvvG,EAAK,OAAS0yG,KACd1yG,EAAK,IAAM8yG,MACX9yG,EAAK,OAASgzG,MACdhzG,EAAK,KAAOizG,MAGZjzG,EAAK,KAAOA,EAAK,IAAI,KACrBA,EAAK,OAASA,EAAK,IAAI,OACvBA,EAAK,OAASA,EAAK,IAAI,OACvBA,EAAK,OAASA,EAAK,IAAI,OACvBA,EAAK,OAASA,EAAK,IAAI,OACvBA,EAAK,UAAYA,EAAK,OAAO,gECd7B07C,GAAiB,CACf,QAAS,CACP,KAAM,EACN,OAAQ,CACN,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,gEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,CACF,CACF,EACD,IAAK,CACH,IAAK,EACL,OAAQ,CACN,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,iEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,kEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,iEACD,EACD,CACE,mEACA,kEACD,EACD,CACE,mEACA,kEACD,E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AAE,yBAAyB,CAAC,EAAEw1L,EAAE"} \ No newline at end of file +{"version":3,"file":"index.umd.js","sources":["../node_modules/.pnpm/@multiplechain+types@0.1.70/node_modules/@multiplechain/types/src/enums.ts","../node_modules/.pnpm/@multiplechain+types@0.1.70/node_modules/@multiplechain/types/src/services/TransactionListenerInterface.ts","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_rollup@4.12.0_vite@5.1.4_@types+node@20.11.20_/node_modules/vite-plugin-node-polyfills/shims/global/dist/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/bind.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/utils.js","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_rollup@4.12.0_vite@5.1.4_@types+node@20.11.20_/node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/AxiosError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/null.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/toFormData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/buildURL.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/InterceptorManager.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/defaults/transitional.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/browser/classes/Blob.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/common/utils.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/platform/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/defaults/index.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/transformData.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/isCancel.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/CanceledError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/settle.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/cookies.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/combineURLs.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/buildFullPath.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/speedometer.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/adapters/xhr.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/adapters/adapters.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/dispatchRequest.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/mergeConfig.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/env/data.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/validator.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/core/Axios.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/cancel/CancelToken.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/spread.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/helpers/HttpStatusCode.js","../node_modules/.pnpm/axios@1.6.8/node_modules/axios/lib/axios.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/ethereum-cryptography@2.1.3/node_modules/ethereum-cryptography/esm/utils.js","../node_modules/.pnpm/ethereum-cryptography@2.1.3/node_modules/ethereum-cryptography/esm/keccak.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/error_codes.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/web3_error_base.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/utils_errors.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/rpc_error_messages.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/rpc_errors.js","../node_modules/.pnpm/web3-errors@1.1.4/node_modules/web3-errors/lib/esm/errors/schema_errors.js","../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/errors.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/constants.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/abi.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/string.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/utils.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/bytes.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/address.js","../node_modules/.pnpm/web3-types@1.5.0/node_modules/web3-types/lib/esm/data_format_types.js","../node_modules/.pnpm/web3-types@1.5.0/node_modules/web3-types/lib/esm/eth_types.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/numbers.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/block.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/bloom.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/boolean.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/object.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/topic.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validation/filter.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/formats.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/validator.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/web3_validator.js","../node_modules/.pnpm/web3-validator@2.0.5/node_modules/web3-validator/lib/esm/default_validator.js","../node_modules/.pnpm/web3-utils@4.2.2/node_modules/web3-utils/lib/esm/uint8array.js","../node_modules/.pnpm/web3-utils@4.2.2/node_modules/web3-utils/lib/esm/converters.js","../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js","../node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.mjs","../node_modules/.pnpm/ws@8.16.0_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ws/browser.js","../node_modules/.pnpm/@multiplechain+utils@0.1.21_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@multiplechain/utils/src/index.ts","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/_version.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/properties.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/errors.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/data.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/maths.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/base58.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/base64-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/events.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/utf8.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/geturl-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/fetch.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/fixednumber.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/rlp-decode.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/rlp-encode.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/units.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/utils/uuid.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/abstract-coder.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/crypto.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/hmac.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/pbkdf2.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_sha2.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha256.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha512.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/crypto-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/hmac.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/keccak.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/ripemd160.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/ripemd160.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/pbkdf2.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/random.js","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/scrypt.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/scrypt.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/sha2.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/utils.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/modular.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/curve.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/_shortw_utils.js","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/secp256k1.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/constants/addresses.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/constants/hashes.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/constants/numbers.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/constants/strings.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/signature.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/signing-key.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/crypto/index.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/address/address.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/address/contract-address.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/address/checks.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/typed.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/address.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/anonymous.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/array.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/boolean.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/bytes.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/fixed-bytes.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/null.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/number.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/string.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/coders/tuple.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/hash/id.js","../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.mjs","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/hash/namehash.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/transaction/accesslist.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/transaction/address.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/transaction/transaction.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/hash/message.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/hash/solidity.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/hash/typed-data.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/fragments.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/abi-coder.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/bytes32.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/abi/interface.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/contract/wrappers.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/contract/contract.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/contract/factory.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/ens-resolver.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/format.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/plugins-network.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/network.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/subscriber-polling.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/abstract-provider.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/abstract-signer.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/community.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/subscriber-filterid.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-jsonrpc.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-ankr.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-alchemy.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-chainstack.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-cloudflare.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-etherscan.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/ws-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-socket.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-websocket.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-infura.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-quicknode.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-fallback.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/default-provider.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/signer-noncemanager.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-pocket.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/providers/provider-ipcsocket-browser.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/base-wallet.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/decode-owl.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/wordlist.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/wordlist-owl.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/lang-en.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/mnemonic.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/aes.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode-cbc.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/mode-ctr.js","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.esm/padding.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/utils.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/json-keystore.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/hdwallet.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/json-crowdsale.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wallet/wallet.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/bit-reader.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/decode-owla.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/wordlist-owla.js","../node_modules/.pnpm/ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/ethers/lib.esm/wordlists/wordlists-browser.js","../src/services/Ethers.ts","../src/services/Provider.ts","../src/browser/Wallet.ts","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/chain/defineChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/version.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/base.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/encoding.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/isHex.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/size.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/trim.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/data.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/pad.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/encoding/toHex.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/encoding/toBytes.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/encoding/fromHex.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/formatter.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/transaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/block.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/log.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/transactionReceipt.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/transactionRequest.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/constants/number.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/constants/number.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/formatters.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/concat.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/cursor.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/cursor.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/encoding/toRlp.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/constants/unit.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/unit/formatUnits.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/unit/formatEther.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/unit/formatGwei.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/transaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/blobsToCommitments.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/blobsToProofs.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_md.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/sha256.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/hash/sha256.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/constants/blob.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/constants/kzg.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/blob.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/toBlobs.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/blob/toBlobSidecars.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/address.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/chain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/node.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/lru.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/hash/keccak256.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/address/getAddress.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/address/isAddress.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/data/slice.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/transaction/assertTransaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/transaction/getTransactionType.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/transaction/serializeAccessList.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/transaction/serializeTransaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/errors/transaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/utils/isEip712Transaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/utils/assertEip712Transaction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/serializers.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/errors/bytecode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/utils/hashBytecode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/utils/getEip712Domain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/zksync/chainConfig.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/abstractTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/acala.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/acria.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/aioz.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/alienX.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/alienXHalTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/op-stack/contracts.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/op-stack/formatters.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/op-stack/serializers.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/op-stack/chainConfig.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ancient8.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ancient8Sepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/anvil.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/apeChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/apexTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/arbitrum.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/arbitrumNova.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/areonNetwork.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/areonNetworkTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/artelaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/assetChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/assetChainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/astar.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/astarZkEVM.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/astarZkyoto.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/atletaOlympia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/aurora.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/auroraTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/auroria.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/avalanche.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/avalancheFuji.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/b3.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/b3Sepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bahamut.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/base.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/baseGoerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/baseSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/beam.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/beamTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bearNetworkChainMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bearNetworkChainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/berachainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/berachainTestnetbArtio.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bevmMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bifrost.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitkub.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitkubTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitlayer.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitlayerTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitrock.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitTorrent.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bitTorrentTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/blast.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/blastSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bob.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/boba.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bobaSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bobSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/botanixTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bounceBit.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bounceBitTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bronos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bronosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bsc.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bscGreenfield.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bscTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bsquared.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bsquaredTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/btr.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/btrTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bxn.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/bxnTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cannon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/canto.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/celo/fees.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/celo/utils.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/celo/formatters.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/celo/serializers.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/celo/chainConfig.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/celo.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/celoAlfajores.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/chang.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/chiliz.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/chips.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/classic.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/coinex.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/confluxESpace.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/confluxESpaceTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/coreDao.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/crab.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cronos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cronosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cronoszkEVM.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cronoszkEVMTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/crossbell.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/curtis.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cyber.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/cyberTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/darwinia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dchain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dchainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/defichainEvm.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/defichainEvmTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/degen.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dfk.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/diode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dodochainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dogechain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dosChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dosChainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dreyerxMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dreyerxTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dustboyIoT.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/dymension.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/edgeless.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/edgelessTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/edgeware.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/edgewareTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ekta.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ektaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/elastos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/elastosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/electroneum.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/electroneumTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/elysiumTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/enuls.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/eon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/eos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/eosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/etherlink.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/etherlinkTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/evmos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/evmosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/excelonMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fantom.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fantomSonicTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fantomTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fibo.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/filecoin.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/filecoinCalibration.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/filecoinHyperspace.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/flare.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/flareTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/flowMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/flowPreviewnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/flowTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fluence.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fluenceStage.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fluenceTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/forma.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/foundry.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fraxtal.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fraxtalTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/funkiMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/funkiSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fuse.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fuseSparknet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fusion.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/fusionTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/garnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/genesys.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/glideL1Protocol.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/glideL2Protocol.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/gnosis.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/gnosisChiado.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/gobi.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/goChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/godwoken.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/goerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/gravity.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/guruTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ham.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/haqqMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/haqqTestedge2.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hardhat.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/harmonyOne.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hashkeyChainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hedera.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hederaPreviewnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hederaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hela.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hemiSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/holesky.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hychain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/hychainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/immutableZkEvm.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/immutableZkEvmTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/inEVM.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/inkSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/iota.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/iotaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/iotex.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/iotexTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/jbc.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/jbcTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/karura.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kakarotSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kakarotStarknetSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kardiaChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kava.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kavaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kcc.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kinto.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/klaytn.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kaia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kairos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/klaytnBaobab.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/koi.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kroma.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/kromaSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/l3x.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/l3xTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lavita.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lightlinkPegasus.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lightlinkPhoenix.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/accounts/utils/parseAccount.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/account.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/stateOverride.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/errors/contract.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/errors/getNodeError.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/errors/getCallError.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/formatters/extract.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/utils/transaction/assertRequest.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/linea/actions/estimateGas.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/linea/chainConfig.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/linea.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lineaGoerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lineaSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lineaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lisk.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/liskSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/localhost.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/loop.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lukso.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/luksoTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lycan.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/lyra.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mandala.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/manta.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mantaSepoliaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mantaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mantle.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mantleSepoliaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mantleTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mapProtocol.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/matchain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/matchainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mekong.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/meld.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/merlin.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/metachain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/metachainIstanbul.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/metalL2.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/meter.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/meterTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/metis.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/metisGoerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mev.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mevTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mint.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mintSepoliaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/mode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/modeTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/moonbaseAlpha.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/moonbeam.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/moonbeamDev.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/moonriver.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/morph.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/morphHolesky.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/morphSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/nautilus.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/neonDevnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/neonMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/nexi.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/nexilix.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/oasisTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/oasys.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/odysseyTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/okc.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/oortmainnetDev.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/opBNB.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/opBNBTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/optimism.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/optimismGoerli.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/optimismSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/optopia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/optopiaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/orderly.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/orderlySepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/otimDevnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/palm.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/palmTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/pgn.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/pgnTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/phoenix.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/playfiAlbireo.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/plinga.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/plumeTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygonAmoy.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygonMumbai.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygonZkEvm.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygonZkEvmCardona.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/polygonZkEvmTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/pulsechain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/pulsechainV4.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ql1.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/qMainnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/qTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/real.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/redbellyTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/redstone.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/reyaNetwork.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rollux.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rolluxTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ronin.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/root.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rootPorcini.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rootstock.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rootstockTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rss3.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/rss3Sepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/saakuru.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/saigon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sanko.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sapphire.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sapphireTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/satoshivm.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/satoshivmTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/scroll.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/scrollSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sei.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/seiDevnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/seiTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shape.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shapeSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shardeumSphinx.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shibarium.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shibariumTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shiden.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shimmer.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/shimmerTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/silicon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/siliconSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/brawl.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/calypso.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/calypsoTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/cryptoBlades.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/cryptoColosseum.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/europa.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/europaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/exorde.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/humanProtocol.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/nebula.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/nebulaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/razor.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/titan.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/skale/titanTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sketchpad.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/snax.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/snaxTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/soneiumMinato.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/songbird.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/songbirdTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sophon.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/sophonTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/spicy.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/step.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/storyTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/stratis.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/superlumio.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/superposition.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/swan.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/swanProximaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/swanSaturnTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/syscoin.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/syscoinTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taiko.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taikoHekla.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taikoJolnir.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taikoKatla.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taikoTestnetSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taraxa.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/taraxaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/telcoinTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/telos.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/telosTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/tenet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/thaiChain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/that.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/theta.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/thetaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/thunderCore.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/thunderTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/tiktrixTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/tomb.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/tron.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ubiq.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ultron.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/ultronTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/unichainSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/unique.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/uniqueOpal.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/uniqueQuartz.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/unreal.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/vechain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/velas.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/viction.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/victionTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/vision.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/visionTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/wanchain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/wanchainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/weavevmAlphanet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/wemix.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/wemixTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/worldchain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/worldchainSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xai.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xaiTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xdc.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xdcTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xLayer.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xLayerTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/xrSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/yooldoVerse.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/yooldoVerseTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zenchainTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zeniq.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zetachain.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zetachainAthensTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zhejiang.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zilliqa.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zilliqaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zircuit.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zircuitTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zkFair.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zkFairTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zkLinkNova.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zkLinkNovaSepoliaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zksync.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zksyncInMemoryNode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zksyncLocalNode.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zksyncSepoliaTestnet.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zora.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zoraSepolia.js","../node_modules/.pnpm/viem@2.21.43_bufferutil@4.0.8_utf-8-validate@5.0.10_zod@3.22.4/node_modules/viem/_esm/chains/definitions/zoraTestnet.js","../src/services/Networks.ts","../src/browser/adapters/switcher.ts","../src/browser/adapters/icons.ts","../src/browser/adapters/Phantom.ts","../src/browser/adapters/MetaMask.ts","../src/browser/adapters/OkxWallet.ts","../src/browser/adapters/XdefiWallet.ts","../src/browser/adapters/TrustWallet.ts","../src/assets/Contract.ts","../src/services/TransactionSigner.ts","../src/assets/NFT.ts","../src/assets/Coin.ts","../src/assets/Token.ts","../src/models/Transaction.ts","../src/models/ContractTransaction.ts","../src/models/NftTransaction.ts","../src/models/CoinTransaction.ts","../src/models/TokenTransaction.ts","../src/services/TransactionListener.ts","../node_modules/.pnpm/proxy-compare@2.5.1/node_modules/proxy-compare/dist/index.modern.js","../node_modules/.pnpm/valtio@1.11.2_react@18.2.0/node_modules/valtio/esm/vanilla.mjs","../node_modules/.pnpm/valtio@1.11.2_react@18.2.0/node_modules/valtio/esm/vanilla/utils.mjs","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/CoreHelperUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/FetchUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/OptionsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/BlockchainApiController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/SnackController.js","../../../../node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_rollup@4.12.0_vite@5.1.4_@types+node@20.11.20_/node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/StorageUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/EventsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/TransactionsController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConnectionController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/PublicStateController.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/dayjs.min.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/updateLocale.js","../node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/relativeTime.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/DateUtil.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/NetworkUtil.js","../node_modules/.pnpm/@web3modal+common@4.1.11/node_modules/@web3modal/common/dist/esm/src/utils/NumberUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/NetworkController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/ConvertApiUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/RouterController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConvertController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/AccountController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/AssetController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ThemeController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ConnectorController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ApiController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/ModalController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/OnRampController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/controllers/SendController.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/AssetUtil.js","../node_modules/.pnpm/@web3modal+core@4.1.11_react@18.2.0/node_modules/@web3modal/core/dist/esm/src/utils/RouterUtil.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/lit-html.js","../node_modules/.pnpm/lit-element@4.1.1/node_modules/lit-element/lit-element.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/convert-input-mask-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/convert-input-mask-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/ThemeUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/WebComponentsUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-card/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-card/index.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js","../node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-icon/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/all-wallets.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-bottom-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/app-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/apple.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-left.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-right.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/arrow-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/checkmark.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-bottom.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-left.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-right.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chevron-top.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/chrome-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/clock.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/close.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/coinPlaceholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/compass.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/copy.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/add.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/cursor.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/desktop.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/disconnect.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/discord.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/etherscan.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/extension.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/external-link.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/facebook.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/filters.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/github.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/google.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/help-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/info-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/mail.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/mobile.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/network-placeholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/nftPlaceholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/off.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/play-store.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/qr-code.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/refresh.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/search.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/send.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalBold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalMedium.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapHorizontalRoundedBold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/swapVertical.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/telegram.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitch.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitter.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/twitterIcon.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/verify.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/verify-filled.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/wallet-placeholder.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/wallet.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/walletconnect.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/warning-circle.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/recycle-horizontal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/bank.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/card.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/plus.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/cursor-transparent.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/checkmark-bold.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-icon/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-hexagon/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-hexagon/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-spinner/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-spinner/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-thumbnail/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-loading-thumbnail/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-shimmer/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-shimmer/index.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/directive.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/directives/class-map.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-text/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-text/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/dao.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/defi.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/defiAlt.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/eth.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/layers.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/lock.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/login.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/network.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/nft.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/noun.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/profile.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/system.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/coinbase.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/moonpay.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/stripe.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/paypal.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/onramp-card.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/google.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/pencil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/visual/lightbulb.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-visual/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/components/wui-visual/index.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/directives/if-defined.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/UiHelperUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-flex/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-flex/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-avatar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-avatar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-box/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-box/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-account-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-account-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-wallet-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-wallet-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-all-wallets-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-all-wallets-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkMd.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select-loader/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select-loader/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkSm.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/assets/svg/networkLg.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-image/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-image/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-card-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-connect-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-connect-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-cta-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-cta-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-details-group-item/index.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/directive-helpers.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/async-directive.js","../node_modules/.pnpm/lit-html@3.2.1/node_modules/lit-html/directives/ref.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-text/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-text/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-email-input/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-email-input/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-link/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-icon-link/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-element/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-element/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-numeric/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-numeric/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-link/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-link/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/TypeUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-visual/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-visual/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item-loader/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-transaction-list-item-loader/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tag/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tag/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-logo-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-network-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-otp/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-otp/index.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js","../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js","../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js","../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/QrCode.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-qr-code/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-qr-code/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-search-bar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-search-bar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-snackbar/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-snackbar/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tabs/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tabs/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip-select/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-tooltip-select/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-list-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-token-list-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-visual-thumbnail/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-visual-thumbnail/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-notice-card/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-notice-card/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-accordion/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-accordion/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-content/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-content/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-network/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-network/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet-transaction/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-wallet-transaction/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-activity-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-activity-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-provider-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-onramp-provider-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-promo/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-promo/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-balance/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-balance/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-profile-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-profile-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip-button/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-chip-button/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-compatible-network/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-compatible-network/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-banner/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-banner/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-token/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-token/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-description/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-list-description/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-amount/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-input-amount/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-preview-item/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/composites/wui-preview-item/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-grid/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-grid/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-separator/styles.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/layout/wui-separator/index.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/MathUtil.js","../node_modules/.pnpm/@web3modal+ui@4.1.11/node_modules/@web3modal/ui/dist/esm/src/utils/TransactionUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-account-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-button/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-connect-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-modal/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-modal/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-network-button/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-network-button/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-router/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-router/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-onramp-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/modal/w3m-onramp-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-settings-view/styles.js","../node_modules/.pnpm/@web3modal+polyfills@4.1.11/node_modules/@web3modal/polyfills/dist/esm/index.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameConstants.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameSchema.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameStorage.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/RegexUtil.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameHelpers.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrame.js","../node_modules/.pnpm/@web3modal+wallet@4.1.11/node_modules/@web3modal/wallet/dist/esm/src/W3mFrameProvider.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-settings-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-account-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-all-wallets-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-buy-in-progress-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-buy-in-progress-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connect-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/PresetsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/HelpersUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connect-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-connecting-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-connecting-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connecting-external-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-connecting-wc-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-downloads-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-get-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-network-switch-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-network-switch-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-networks-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-networks-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-activity-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-activity-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-fiat-select-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-fiat-select-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-providers-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-tokens-select-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-onramp-tokens-select-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-preview-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-preview-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-select-token-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-convert-select-token-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-transactions-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-transactions-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-network-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-what-is-a-buy-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-email-otp-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/w3m-email-otp-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-device-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-email-verify-device-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-approve-transaction-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-approve-transaction-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-upgrade-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-upgrade-to-smart-account-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-wallet-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-wallet-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-primary-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-update-email-secondary-otp-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-unsupported-chain-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-unsupported-chain-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-receive-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-receive-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-compatible-networks-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-compatible-networks-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-select-token-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-select-token-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-preview-view/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/views/w3m-wallet-send-preview-view/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-list/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/markWalletsAsInstalled.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-list/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-search/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-all-wallets-search/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-header/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-browser/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-desktop/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-mobile/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-qrcode/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-qrcode/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-unsupported/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-connecting-wc-web/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-details/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-details/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-input/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-convert-input/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-header/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-header/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-help-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-swap-input/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-swap-input/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-legal-footer/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-legal-footer/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-mobile-download-links/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-mobile-download-links/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-onramp-providers-footer/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-onramp-providers-footer/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-snackbar/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-snackbar/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-email-login-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-email-login-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-default-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-default-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-wallet-features-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/utils/ConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-wallet-features-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-activity-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-activity-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-nfts-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-nfts-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-tokens-widget/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-account-tokens-widget/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-activity-list/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-activity-list/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-token/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-token/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-address/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-input-address/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-wallet-send-details/styles.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/partials/w3m-wallet-send-details/index.js","../node_modules/.pnpm/@web3modal+scaffold@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold/dist/esm/src/client.js","../../../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js","../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js","../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js","../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js","../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js","../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js","../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js","../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js","../node_modules/.pnpm/@stablelib+hash@1.0.1/node_modules/@stablelib/hash/lib/hash.js","../node_modules/.pnpm/@stablelib+hmac@1.0.1/node_modules/@stablelib/hmac/lib/hmac.js","../node_modules/.pnpm/@stablelib+hkdf@1.0.1/node_modules/@stablelib/hkdf/lib/hkdf.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js","../../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../../../node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/browser.js","../../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js","../../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","../../../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js","../../../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js","../../../../node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","../../../../node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js","../../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","../../../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","../../../../node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js","../../../../node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js","../../../../node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js","../../../../node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","../../../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js","../../../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js","../../../../node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js","../../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js","../../../../node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js","../../../../node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js","../../../../node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js","../../../../node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","../../../../node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js","../../../../node_modules/.pnpm/possible-typed-array-names@1.0.0/node_modules/possible-typed-array-names/index.js","../../../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js","../../../../node_modules/.pnpm/which-typed-array@1.1.14/node_modules/which-typed-array/index.js","../../../../node_modules/.pnpm/is-typed-array@1.1.13/node_modules/is-typed-array/index.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js","../../../../node_modules/.pnpm/util@0.12.5/node_modules/util/util.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js","../../../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js","../../../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js","../../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js","../../../../node_modules/.pnpm/hash-base@3.1.0/node_modules/hash-base/index.js","../../../../node_modules/.pnpm/md5.js@1.3.5/node_modules/md5.js/index.js","../../../../node_modules/.pnpm/ripemd160@2.0.2/node_modules/ripemd160/index.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha256.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha224.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha512.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha384.js","../../../../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/index.js","../../../../node_modules/.pnpm/stream-browserify@3.0.0/node_modules/stream-browserify/index.js","../../../../node_modules/.pnpm/cipher-base@1.0.4/node_modules/cipher-base/index.js","../../../../node_modules/.pnpm/create-hash@1.2.0/node_modules/create-hash/browser.js","../../../../node_modules/.pnpm/create-hmac@1.1.7/node_modules/create-hmac/legacy.js","../../../../node_modules/.pnpm/create-hash@1.2.0/node_modules/create-hash/md5.js","../../../../node_modules/.pnpm/create-hmac@1.1.7/node_modules/create-hmac/browser.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/algos.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/precondition.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/default-encoding.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/to-buffer.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/sync-browser.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/lib/async.js","../../../../node_modules/.pnpm/pbkdf2@3.1.2/node_modules/pbkdf2/browser.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/utils.js","../../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/cipher.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/des.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/cbc.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des/ede.js","../../../../node_modules/.pnpm/des.js@1.1.0/node_modules/des.js/lib/des.js","../../../../node_modules/.pnpm/browserify-des@1.0.2/node_modules/browserify-des/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ecb.js","../../../../node_modules/.pnpm/buffer-xor@1.0.3/node_modules/buffer-xor/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cbc.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb8.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/cfb1.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ofb.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/incr32.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ctr.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/aes.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/ghash.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/authCipher.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/streamCipher.js","../../../../node_modules/.pnpm/evp_bytestokey@1.0.3/node_modules/evp_bytestokey/index.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/encrypter.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/decrypter.js","../../../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/browser.js","../../../../node_modules/.pnpm/browserify-des@1.0.2/node_modules/browserify-des/modes.js","../../../../node_modules/.pnpm/browserify-cipher@1.0.1/node_modules/browserify-cipher/browser.js","../../../../node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js","../../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js","../../../../node_modules/.pnpm/miller-rabin@4.0.1/node_modules/miller-rabin/lib/mr.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/generatePrime.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/dh.js","../../../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/browser.js","../../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../../node_modules/.pnpm/browserify-rsa@4.1.0/node_modules/browserify-rsa/index.js","../../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/utils.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/base.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/short.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/mont.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/edwards.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/index.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curves.js","../../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/key.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/signature.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/index.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/key.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/signature.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/index.js","../../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic.js","../../../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/reporter.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/buffer.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/node.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/constants/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/pem.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/encoders/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/der.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/pem.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/decoders/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/api.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/base/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1/constants/index.js","../../../../node_modules/.pnpm/asn1.js@5.4.1/node_modules/asn1.js/lib/asn1.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/certificate.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/asn1.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/fixProc.js","../../../../node_modules/.pnpm/parse-asn1@5.1.6/node_modules/parse-asn1/index.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/sign.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/verify.js","../../../../node_modules/.pnpm/browserify-sign@4.2.2/node_modules/browserify-sign/browser/index.js","../../../../node_modules/.pnpm/create-ecdh@4.0.4/node_modules/create-ecdh/browser.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/mgf.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/xor.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/withPublic.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/publicEncrypt.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/privateDecrypt.js","../../../../node_modules/.pnpm/public-encrypt@4.0.3/node_modules/public-encrypt/browser.js","../../../../node_modules/.pnpm/randomfill@1.0.4/node_modules/randomfill/browser.js","../../../../node_modules/.pnpm/crypto-browserify@3.12.0/node_modules/crypto-browserify/index.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js","../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js","../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js","../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/as-uint8array.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/alloc.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/concat.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/vendor/base-x.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bytes.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/identity.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base2.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base8.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base10.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base16.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base32.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base36.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base58.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base64.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/bases/base256emoji.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/codecs/json.js","../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js","../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/to-string.js","../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/delay.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/misc.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/time.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/constants/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/convert.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/utils/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/watch.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/watch.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/types/index.js","../node_modules/.pnpm/@walletconnect+time@1.0.2/node_modules/@walletconnect/time/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+window-getters@1.0.1/node_modules/@walletconnect/window-getters/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+window-metadata@1.0.1/node_modules/@walletconnect/window-metadata/dist/cjs/index.js","../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js","../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js","../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js","../node_modules/.pnpm/filter-obj@1.1.0/node_modules/filter-obj/index.js","../node_modules/.pnpm/query-string@7.1.3/node_modules/query-string/index.js","../node_modules/.pnpm/@walletconnect+relay-api@1.0.11/node_modules/@walletconnect/relay-api/dist/index.es.js","../node_modules/.pnpm/@walletconnect+utils@2.11.1/node_modules/@walletconnect/utils/dist/index.es.js","../node_modules/.pnpm/destr@2.0.3/node_modules/destr/dist/index.mjs","../node_modules/.pnpm/unstorage@1.10.2_idb-keyval@6.2.1/node_modules/unstorage/dist/shared/unstorage.8581f561.mjs","../node_modules/.pnpm/unstorage@1.10.2_idb-keyval@6.2.1/node_modules/unstorage/dist/index.mjs","../node_modules/.pnpm/idb-keyval@6.2.1/node_modules/idb-keyval/dist/index.js","../node_modules/.pnpm/@walletconnect+safe-json@1.0.2/node_modules/@walletconnect/safe-json/dist/esm/index.js","../node_modules/.pnpm/@walletconnect+keyvaluestorage@1.1.1/node_modules/@walletconnect/keyvaluestorage/dist/index.es.js","../node_modules/.pnpm/@walletconnect+events@1.0.1/node_modules/@walletconnect/events/dist/esm/events.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/types/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/types/index.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/constants/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/constants/index.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/heartbeat.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.1/node_modules/@walletconnect/heartbeat/dist/cjs/index.js","../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js","../node_modules/.pnpm/pino@7.11.0/node_modules/pino/browser.js","../node_modules/.pnpm/@walletconnect+logger@2.1.2/node_modules/@walletconnect/logger/dist/index.es.js","../node_modules/.pnpm/@walletconnect+types@2.11.1/node_modules/@walletconnect/types/dist/index.es.js","../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js","../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/constants.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/utils.js","../node_modules/.pnpm/@walletconnect+relay-auth@1.0.4/node_modules/@walletconnect/relay-auth/dist/esm/api.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/constants.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/error.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js","../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/format.js","../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.4/node_modules/@walletconnect/jsonrpc-types/dist/index.es.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/url.js","../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/validators.js","../node_modules/.pnpm/@walletconnect+jsonrpc-provider@1.0.13/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js","../node_modules/.pnpm/@walletconnect+jsonrpc-ws-connection@1.0.14_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/jsonrpc-ws-connection/dist/index.es.js","../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js","../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js","../node_modules/.pnpm/isomorphic-unfetch@3.1.0/node_modules/isomorphic-unfetch/browser.js","../node_modules/.pnpm/@walletconnect+core@2.11.1_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/core/dist/index.es.js","../node_modules/.pnpm/@walletconnect+sign-client@2.11.1_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/sign-client/dist/index.es.js","../node_modules/.pnpm/cross-fetch@3.1.8/node_modules/cross-fetch/dist/browser-ponyfill.js","../node_modules/.pnpm/@walletconnect+jsonrpc-http-connection@1.0.8/node_modules/@walletconnect/jsonrpc-http-connection/dist/index.es.js","../node_modules/.pnpm/@walletconnect+universal-provider@2.11.1_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/universal-provider/dist/index.es.js","../node_modules/.pnpm/@walletconnect+ethereum-provider@2.11.1_bufferutil@4.0.8_react@18.2.0_utf-8-validate@5.0.10/node_modules/@walletconnect/ethereum-provider/dist/index.es.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersConstantsUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersHelpersUtil.js","../node_modules/.pnpm/@web3modal+scaffold-utils@4.1.11_react@18.2.0/node_modules/@web3modal/scaffold-utils/dist/esm/src/EthersStoreUtil.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_bufferutil@4.0.8_ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.1_wviz3fiabhpgllyqnq6zgmexju/node_modules/@web3modal/ethers/dist/esm/src/client.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/assets/wallet-logo.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/constants.js","../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/constants.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/utils.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/errors.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/type/Web3Response.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/version.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/serialize.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/error/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/type.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/core/util.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/ScopedLocalStorage.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/DiagnosticLogger.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/RelayAbstract.js","../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha256.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha224.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha512.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha384.js","../node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/Session.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/Cipher.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkHTTP.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkWebSocket.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/connection/WalletLinkConnection.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/cssReset-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/lib/cssReset.js","../node_modules/.pnpm/preact@10.25.0/node_modules/preact/dist/preact.module.js","../node_modules/.pnpm/clsx@1.2.1/node_modules/clsx/dist/clsx.m.js","../node_modules/.pnpm/preact@10.25.0/node_modules/preact/hooks/dist/hooks.module.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/CloseIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/CoinbaseWalletRound.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/QRCodeIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/qrcode-svg/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/QRCode.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Spinner/Spinner-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Spinner/Spinner.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectContent/ConnectContent-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectContent/ConnectContent.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/ArrowLeftIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/LaptopIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/icons/SafeIcon.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/TryExtensionContent/TryExtensionContent-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/TryExtensionContent/TryExtensionContent.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectDialog/ConnectDialog-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/ConnectDialog/ConnectDialog.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/LinkFlow/LinkFlow.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/Snackbar-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/Snackbar.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/WalletLinkRelayUI.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/WalletLinkRelay.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/Snackbar/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/RedirectDialog/RedirectDialog-css.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/walletlink/ui/components/RedirectDialog/RedirectDialog.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/mobile/MobileRelayUI.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/mobile/MobileRelay.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js","../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js","../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/keccak.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/shake.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/api/index.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/keccak-state-unroll.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/lib/keccak.js","../node_modules/.pnpm/keccak@3.0.4/node_modules/keccak/js.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/util.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/abi.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/vendor-js/eth-eip712-util/index.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/FilterPolyfill.js","../node_modules/.pnpm/json-rpc-random-id@1.0.1/node_modules/json-rpc-random-id/index.js","../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js","../node_modules/.pnpm/@metamask+safe-event-emitter@3.1.2/node_modules/@metamask/safe-event-emitter/dist/cjs/index.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/BaseBlockTracker.js","../node_modules/.pnpm/superstruct@1.0.4/node_modules/superstruct/dist/index.mjs","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/assert.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/base64.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/hex.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/bytes.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/checksum.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/coercers.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/collections.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/encryption-types.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/json.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/keyring.js","../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js","../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/logging.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/misc.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/number.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/opaque.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/time.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/transaction-types.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/versions.js","../node_modules/.pnpm/@metamask+utils@5.0.2/node_modules/@metamask/utils/dist/index.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/logging-utils.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/PollingBlockTracker.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/SubscribeBlockTracker.js","../node_modules/.pnpm/eth-block-tracker@7.1.0/node_modules/eth-block-tracker/dist/index.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/getUniqueId.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/idRemapMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/createAsyncMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/createScaffoldMiddleware.js","../node_modules/.pnpm/@metamask+safe-event-emitter@2.0.0/node_modules/@metamask/safe-event-emitter/index.js","../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/classes.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/error-constants.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/utils.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/errors.js","../node_modules/.pnpm/eth-rpc-errors@4.0.3/node_modules/eth-rpc-errors/dist/index.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/JsonRpcEngine.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/mergeMiddleware.js","../node_modules/.pnpm/json-rpc-engine@6.1.0/node_modules/json-rpc-engine/dist/index.js","../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/Semaphore.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/Mutex.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/withTimeout.js","../node_modules/.pnpm/async-mutex@0.2.6/node_modules/async-mutex/lib/index.js","../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js","../node_modules/.pnpm/eth-query@2.1.2/node_modules/eth-query/index.js","../node_modules/.pnpm/pify@5.0.0/node_modules/pify/index.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/base-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/base-filter-history.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/hexUtils.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/log-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/getBlocksForRange.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/block-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/tx-filter.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/index.js","../node_modules/.pnpm/eth-json-rpc-filters@6.0.1/node_modules/eth-json-rpc-filters/subscriptionManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/SubscriptionManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/provider/CoinbaseWalletProvider.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/relay/RelayEventManager.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/CoinbaseWalletSDK.js","../node_modules/.pnpm/@coinbase+wallet-sdk@3.9.1/node_modules/@coinbase/wallet-sdk/dist/index.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_bufferutil@4.0.8_ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.1_wviz3fiabhpgllyqnq6zgmexju/node_modules/@web3modal/ethers/dist/esm/src/utils/defaultConfig.js","../node_modules/.pnpm/@web3modal+ethers@4.1.11_bufferutil@4.0.8_ethers@6.13.4_bufferutil@4.0.8_utf-8-validate@5.0.1_wviz3fiabhpgllyqnq6zgmexju/node_modules/@web3modal/ethers/dist/esm/exports/index.js","../src/browser/adapters/Web3Wallets.ts","../src/browser/adapters/BitgetWallet.ts","../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js","../node_modules/.pnpm/@ethersproject+logger@5.7.0/node_modules/@ethersproject/logger/lib.esm/_version.js","../node_modules/.pnpm/@ethersproject+logger@5.7.0/node_modules/@ethersproject/logger/lib.esm/index.js","../node_modules/.pnpm/@ethersproject+bytes@5.7.0/node_modules/@ethersproject/bytes/lib.esm/_version.js","../node_modules/.pnpm/@ethersproject+bytes@5.7.0/node_modules/@ethersproject/bytes/lib.esm/index.js","../node_modules/.pnpm/@ethersproject+keccak256@5.7.0/node_modules/@ethersproject/keccak256/lib.esm/index.js","../node_modules/.pnpm/@ethersproject+bignumber@5.7.0/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js","../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/_version.js","../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/utf8.js","../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/message.js","../node_modules/.pnpm/@ethersproject+address@5.7.0/node_modules/@ethersproject/address/lib.esm/_version.js","../node_modules/.pnpm/@ethersproject+address@5.7.0/node_modules/@ethersproject/address/lib.esm/index.js","../node_modules/.pnpm/@ethersproject+properties@5.7.0/node_modules/@ethersproject/properties/lib.esm/index.js","../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js","../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js","../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js","../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/_version.js","../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/index.js","../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/index.js","../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/alloc.js","../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/concat.js","../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/util/bases.js","../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/from-string.js","../node_modules/.pnpm/uint8arrays@3.1.0/node_modules/uint8arrays/esm/src/to-string.js","../node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js","../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/utils.js","../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curve/base.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curve/short.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curve/mont.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curve/edwards.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curve/index.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/curves.js","../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/ec/key.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/ec/signature.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/ec/index.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/eddsa/key.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/eddsa/signature.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic/eddsa/index.js","../node_modules/.pnpm/elliptic@6.6.0/node_modules/elliptic/lib/elliptic.js","../node_modules/.pnpm/@walletconnect+utils@2.17.2/node_modules/@walletconnect/utils/dist/index.es.js","../node_modules/.pnpm/@walletconnect+heartbeat@1.2.2/node_modules/@walletconnect/heartbeat/dist/index.es.js","../node_modules/.pnpm/@walletconnect+types@2.17.2/node_modules/@walletconnect/types/dist/index.es.js","../node_modules/.pnpm/@walletconnect+jsonrpc-provider@1.0.14/node_modules/@walletconnect/jsonrpc-provider/dist/index.es.js","../node_modules/.pnpm/@walletconnect+core@2.17.2_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/core/dist/index.es.js","../node_modules/.pnpm/@walletconnect+sign-client@2.17.2_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/sign-client/dist/index.es.js","../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js","../node_modules/.pnpm/@walletconnect+universal-provider@2.17.2_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@walletconnect/universal-provider/dist/index.es.js","../node_modules/.pnpm/@walletconnect+ethereum-provider@2.17.2_bufferutil@4.0.8_react@18.2.0_utf-8-validate@5.0.10/node_modules/@walletconnect/ethereum-provider/dist/index.es.js","../src/browser/adapters/WalletConnect.ts","../src/browser/index.ts","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/core/controller/SIWEController.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/styles.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/index.js","../node_modules/.pnpm/@web3modal+siwe@4.1.11_react@18.2.0/node_modules/@web3modal/siwe/dist/esm/scaffold/views/w3m-connecting-siwe-view/index.js","../node_modules/.pnpm/@walletconnect+modal-core@2.7.0_react@18.2.0/node_modules/@walletconnect/modal-core/dist/index.js","../node_modules/.pnpm/@walletconnect+modal@2.7.0_react@18.2.0/node_modules/@walletconnect/modal/dist/index.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/css-tag.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/reactive-element.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/lit-html.js","../node_modules/.pnpm/lit-element@3.3.3/node_modules/lit-element/lit-element.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/property.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/state.js","../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directive.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/class-map.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/array.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/clamp.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/defaults.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-number.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-easing-list.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/wrap.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/easing.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/mix.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/noop.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/progress.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/offset.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/interpolate.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-easing-generator.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-function.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/is-string.es.js","../node_modules/.pnpm/@motionone+utils@10.17.0/node_modules/@motionone/utils/dist/time.es.js","../node_modules/.pnpm/@motionone+easing@10.17.0/node_modules/@motionone/easing/dist/cubic-bezier.es.js","../node_modules/.pnpm/@motionone+easing@10.17.0/node_modules/@motionone/easing/dist/steps.es.js","../node_modules/.pnpm/@motionone+animation@10.17.0/node_modules/@motionone/animation/dist/utils/easing.es.js","../node_modules/.pnpm/@motionone+animation@10.17.0/node_modules/@motionone/animation/dist/Animation.es.js","../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js","../node_modules/.pnpm/@motionone+types@10.17.0/node_modules/@motionone/types/dist/MotionValue.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/data.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/easing.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/style.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/animate-style.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/options.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/utils/controls.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/utils/stagger.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/create-animate.es.js","../node_modules/.pnpm/@motionone+dom@10.17.0/node_modules/@motionone/dom/dist/animate/index.es.js","../node_modules/.pnpm/motion@10.16.2/node_modules/motion/dist/animate.es.js","../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/directives/if-defined.js","../node_modules/.pnpm/@walletconnect+modal-ui@2.7.0_react@18.2.0/node_modules/@walletconnect/modal-ui/dist/index.js"],"sourcesContent":["/**\n * Asset transactions (COIN, TOKEN, NFT) has two directions\n */\nexport enum AssetDirectionEnum {\n INCOMING = 'INCOMING',\n OUTGOING = 'OUTGOING'\n}\n\n/**\n * There are six types of transactions at the moment.\n * COIN, TOKEN, and NFT transactions are called ASSET transactions\n */\nexport enum TransactionTypeEnum {\n GENERAL = 'GENERAL',\n CONTRACT = 'CONTRACT',\n COIN = 'COIN',\n TOKEN = 'TOKEN',\n NFT = 'NFT'\n}\n\n/**\n * There are 3 available transaction statuses:\n * FAILED --> When a transaction is failed\n * PENDING --> When a transaction has not been concluded\n * CONFIRMED --> When a transaction is confirmed\n */\nexport enum TransactionStatusEnum {\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n CONFIRMED = 'CONFIRMED'\n}\n\nexport enum ErrorTypeEnum {\n RPC_TIMEOUT = 'RPC_TIMEOUT',\n RPC_REQUEST_ERROR = 'RPC_REQUEST_ERROR',\n RPC_ACCESS_DENIED = 'RPC_ACCESS_DENIED',\n WS_URL_NOT_DEFINED = 'WS_URL_NOT_DEFINED',\n WS_CONNECTION_FAILED = 'WS_CONNECTION_FAILED',\n UNACCEPTED_CHAIN = 'UNACCEPTED_CHAIN',\n UNAUTHORIZED_ADDRESS = 'UNAUTHORIZED_ADDRESS',\n INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE',\n INVALID_AMOUNT = 'INVALID_AMOUNT',\n INVALID_ADDRESS = 'INVALID_ADDRESS',\n INVALID_PRIVATE_KEY = 'INVALID_PRIVATE_KEY',\n INVALID_PUBLIC_KEY = 'INVALID_PUBLIC_KEY',\n INVALID_TRANSACTION_ID = 'INVALID_TRANSACTION_ID',\n PROVIDER_IS_REQUIRED = 'PROVIDER_IS_REQUIRED',\n PROVIDER_IS_NOT_INITIALIZED = 'PROVIDER_IS_NOT_INITIALIZED',\n PROVIDER_IS_ALREADY_INITIALIZED = 'PROVIDER_IS_ALREADY_INITIALIZED',\n WALLET_ALREADY_PROCESSING = 'WALLET_ALREADY_PROCESSING',\n WALLET_CONNECT_REJECTED = 'WALLET_CONNECT_REJECTED',\n WALLET_REQUEST_REJECTED = 'WALLET_REQUEST_REJECTED',\n WALLET_CONNECTION_FAILED = 'WALLET_CONNECTION_FAILED',\n WALLET_CONNECTION_TIMEOUT = 'WALLET_CONNECTION_TIMEOUT',\n TRANSACTION_CREATION_FAILED = 'TRANSACTION_CREATION_FAILED',\n TRANSACTION_NOT_FOUND = 'TRANSACTION_NOT_FOUND',\n CLOSED_WALLETCONNECT_MODAL = 'CLOSED_WALLETCONNECT_MODAL',\n PROJECT_ID_IS_REQUIRED = 'PROJECT_ID_IS_REQUIRED',\n METADATA_IS_REQUIRED = 'METADATA_IS_REQUIRED',\n CONFIG_IS_REQUIRED = 'CONFIG_IS_REQUIRED'\n}\n\nexport enum WalletPlatformEnum {\n BROWSER = 'BROWSER',\n MOBILE = 'MOBILE',\n DESKTOP = 'DESKTOP',\n UNIVERSAL = 'UNIVERSAL'\n}\n","import type {\n NftId,\n ContractAddress,\n TransactionId,\n TransferAmount,\n WalletAddress\n} from '../defines'\nimport { TransactionTypeEnum } from '../enums'\n\n/**\n * Filter types for each transaction type in TransactionListenerInterface\n */\nexport interface TransactionListenerFilterInterface {\n signer?: WalletAddress\n}\n\nexport interface ContractTransactionListenerFilterInterface\n extends TransactionListenerFilterInterface {\n address?: ContractAddress\n}\n\nexport interface AssetTransactionListenerFilterInterface\n extends TransactionListenerFilterInterface {\n sender?: WalletAddress\n receiver?: WalletAddress\n}\n\nexport interface CoinTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface {\n amount?: TransferAmount\n}\n\nexport interface TokenTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface,\n ContractTransactionListenerFilterInterface {\n amount?: TransferAmount\n}\n\nexport interface NftTransactionListenerFilterInterface\n extends AssetTransactionListenerFilterInterface,\n ContractTransactionListenerFilterInterface {\n nftId?: NftId\n}\n/**\n * Filter types for each transaction type in TransactionListenerInterface\n */\n\n/**\n * 'DynamicTransactionListenerFilterInterface' connects transaction types to their corresponding filter interfaces\n * Every type of transaction has its own unique filter values.\n * A sender's wallet address is a common value.\n */\nexport type DynamicTransactionListenerFilterType =\n T extends TransactionTypeEnum.GENERAL\n ? TransactionListenerFilterInterface\n : T extends TransactionTypeEnum.CONTRACT\n ? ContractTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.COIN\n ? CoinTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.TOKEN\n ? TokenTransactionListenerFilterInterface\n : T extends TransactionTypeEnum.NFT\n ? NftTransactionListenerFilterInterface\n : never\n\n/**\n * 'TransactionListenerProcessIndex' is an object that connects transaction types to their corresponding process methods.\n * Example: this[TransactionListenerProcessIndex[type]]()\n */\nexport const TransactionListenerProcessIndex = {\n [TransactionTypeEnum.GENERAL]: 'generalProcess',\n [TransactionTypeEnum.CONTRACT]: 'contractProcess',\n [TransactionTypeEnum.COIN]: 'coinProcess',\n [TransactionTypeEnum.TOKEN]: 'tokenProcess',\n [TransactionTypeEnum.NFT]: 'nftProcess'\n}\n\n/**\n * 'DynamicTransactionType' connects transaction types to their corresponding transaction interfaces\n * Every type of transaction has its own unique transaction interface.\n */\nexport type DynamicTransactionType<\n T extends TransactionTypeEnum,\n Transaction,\n ContractTransaction,\n CoinTransaction,\n TokenTransaction,\n NftTransaction\n> = T extends TransactionTypeEnum.GENERAL\n ? Transaction\n : T extends TransactionTypeEnum.CONTRACT\n ? ContractTransaction\n : T extends TransactionTypeEnum.COIN\n ? CoinTransaction\n : T extends TransactionTypeEnum.TOKEN\n ? TokenTransaction\n : T extends TransactionTypeEnum.NFT\n ? NftTransaction\n : never\n\nexport interface TransactionListenerInterface<\n T extends TransactionTypeEnum,\n Transaction,\n CallBackType\n> {\n /**\n * The 'type' property is a generic type that is used to define the type of transaction listener.\n */\n type: T\n\n /**\n * 'status' is a boolean that shows the status of the listener.\n * If 'status' is true, the listener is active.\n * If 'status' is false, the listener is inactive.\n */\n status: boolean\n\n /**\n * 'callback' is an array of callback functions that are triggered when a transaction is detected.\n */\n callbacks: CallBackType[]\n\n /**\n * Triggered transactions are stored in the 'triggeredTransactions' array.\n */\n triggeredTransactions: TransactionId[]\n\n /**\n * 'filter' is an object that has values depending on transaction listener type.\n * E.g. no matter which type of transaction is listening, 'filter' has to have a 'signer' value\n */\n filter?: DynamicTransactionListenerFilterType | Record\n\n /**\n * If the listener is active, the 'stop' method deactivates the listener.\n * @returns {void}\n */\n stop: () => void\n\n /**\n * If the listener is inactive, the 'start' method activates the listener.\n * @returns {void}\n */\n start: () => void\n\n /**\n * The 'getStatus' method returns the status of the listener.\n * @returns {boolean}\n */\n getStatus: () => boolean\n\n /**\n * The 'on' method adds a callback function to the 'callbacks' array and starts the listener.\n * @param {CallBackType} callback - a function that is triggered when a transaction is detected.\n * @returns {Promise}\n */\n on: (callback: CallBackType) => Promise\n\n /**\n * The 'trigger' method is triggered when a transaction is detected.\n * @param {Transaction} transaction - a transaction that is detected.\n * @returns {void}\n */\n trigger: (transaction: Transaction) => void\n\n /**\n * listener methods for each transaction type\n */\n generalProcess: () => void\n\n contractProcess: () => void\n\n coinProcess: () => void\n\n tokenProcess: () => void\n\n nftProcess: () => void\n}\n","const global = globalThis || void 0 || self;\n\nexport { global as default, global };\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","var buffer = {};\n\nvar base64Js = {};\n\nbase64Js.byteLength = byteLength;\nbase64Js.toByteArray = toByteArray;\nbase64Js.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens (b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4);\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = (tmp >> 16) & 0xFF;\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n );\n }\n\n return parts.join('')\n}\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n(function (exports) {\n\n\tconst base64 = base64Js;\n\tconst ieee754$1 = ieee754;\n\tconst customInspectSymbol =\n\t (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n\t ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n\t : null;\n\n\texports.Buffer = Buffer;\n\texports.SlowBuffer = SlowBuffer;\n\texports.INSPECT_MAX_BYTES = 50;\n\n\tconst K_MAX_LENGTH = 0x7fffffff;\n\texports.kMaxLength = K_MAX_LENGTH;\n\tconst { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;\n\n\t/**\n\t * If `Buffer.TYPED_ARRAY_SUPPORT`:\n\t * === true Use Uint8Array implementation (fastest)\n\t * === false Print warning and recommend using `buffer` v4.x which has an Object\n\t * implementation (most compatible, even IE6)\n\t *\n\t * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n\t * Opera 11.6+, iOS 4.2+.\n\t *\n\t * We report that the browser does not support typed arrays if the are not subclassable\n\t * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n\t * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n\t * for __proto__ and has a buggy typed array implementation.\n\t */\n\tBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\n\tif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n\t typeof console.error === 'function') {\n\t console.error(\n\t 'This browser lacks typed array (Uint8Array) support which is required by ' +\n\t '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n\t );\n\t}\n\n\tfunction typedArraySupport () {\n\t // Can typed array instances can be augmented?\n\t try {\n\t const arr = new GlobalUint8Array(1);\n\t const proto = { foo: function () { return 42 } };\n\t Object.setPrototypeOf(proto, GlobalUint8Array.prototype);\n\t Object.setPrototypeOf(arr, proto);\n\t return arr.foo() === 42\n\t } catch (e) {\n\t return false\n\t }\n\t}\n\n\tObject.defineProperty(Buffer.prototype, 'parent', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.buffer\n\t }\n\t});\n\n\tObject.defineProperty(Buffer.prototype, 'offset', {\n\t enumerable: true,\n\t get: function () {\n\t if (!Buffer.isBuffer(this)) return undefined\n\t return this.byteOffset\n\t }\n\t});\n\n\tfunction createBuffer (length) {\n\t if (length > K_MAX_LENGTH) {\n\t throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n\t }\n\t // Return an augmented `Uint8Array` instance\n\t const buf = new GlobalUint8Array(length);\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\t return buf\n\t}\n\n\t/**\n\t * The Buffer constructor returns instances of `Uint8Array` that have their\n\t * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n\t * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n\t * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n\t * returns a single octet.\n\t *\n\t * The `Uint8Array` prototype remains unmodified.\n\t */\n\n\tfunction Buffer (arg, encodingOrOffset, length) {\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be of type string. Received type number'\n\t )\n\t }\n\t return allocUnsafe(arg)\n\t }\n\t return from(arg, encodingOrOffset, length)\n\t}\n\n\tBuffer.poolSize = 8192; // not used by this implementation\n\n\tfunction from (value, encodingOrOffset, length) {\n\t if (typeof value === 'string') {\n\t return fromString(value, encodingOrOffset)\n\t }\n\n\t if (GlobalArrayBuffer.isView(value)) {\n\t return fromArrayView(value)\n\t }\n\n\t if (value == null) {\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t }\n\n\t if (isInstance(value, GlobalArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalArrayBuffer))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof GlobalSharedArrayBuffer !== 'undefined' &&\n\t (isInstance(value, GlobalSharedArrayBuffer) ||\n\t (value && isInstance(value.buffer, GlobalSharedArrayBuffer)))) {\n\t return fromArrayBuffer(value, encodingOrOffset, length)\n\t }\n\n\t if (typeof value === 'number') {\n\t throw new TypeError(\n\t 'The \"value\" argument must not be of type number. Received type number'\n\t )\n\t }\n\n\t const valueOf = value.valueOf && value.valueOf();\n\t if (valueOf != null && valueOf !== value) {\n\t return Buffer.from(valueOf, encodingOrOffset, length)\n\t }\n\n\t const b = fromObject(value);\n\t if (b) return b\n\n\t if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n\t typeof value[Symbol.toPrimitive] === 'function') {\n\t return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n\t }\n\n\t throw new TypeError(\n\t 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n\t 'or Array-like Object. Received type ' + (typeof value)\n\t )\n\t}\n\n\t/**\n\t * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n\t * if value is a number.\n\t * Buffer.from(str[, encoding])\n\t * Buffer.from(array)\n\t * Buffer.from(buffer)\n\t * Buffer.from(arrayBuffer[, byteOffset[, length]])\n\t **/\n\tBuffer.from = function (value, encodingOrOffset, length) {\n\t return from(value, encodingOrOffset, length)\n\t};\n\n\t// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n\t// https://github.com/feross/buffer/pull/148\n\tObject.setPrototypeOf(Buffer.prototype, GlobalUint8Array.prototype);\n\tObject.setPrototypeOf(Buffer, GlobalUint8Array);\n\n\tfunction assertSize (size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be of type number')\n\t } else if (size < 0) {\n\t throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n\t }\n\t}\n\n\tfunction alloc (size, fill, encoding) {\n\t assertSize(size);\n\t if (size <= 0) {\n\t return createBuffer(size)\n\t }\n\t if (fill !== undefined) {\n\t // Only pay attention to encoding if it's a string. This\n\t // prevents accidentally sending in a number that would\n\t // be interpreted as a start offset.\n\t return typeof encoding === 'string'\n\t ? createBuffer(size).fill(fill, encoding)\n\t : createBuffer(size).fill(fill)\n\t }\n\t return createBuffer(size)\n\t}\n\n\t/**\n\t * Creates a new filled Buffer instance.\n\t * alloc(size[, fill[, encoding]])\n\t **/\n\tBuffer.alloc = function (size, fill, encoding) {\n\t return alloc(size, fill, encoding)\n\t};\n\n\tfunction allocUnsafe (size) {\n\t assertSize(size);\n\t return createBuffer(size < 0 ? 0 : checked(size) | 0)\n\t}\n\n\t/**\n\t * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n\t * */\n\tBuffer.allocUnsafe = function (size) {\n\t return allocUnsafe(size)\n\t};\n\t/**\n\t * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n\t */\n\tBuffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(size)\n\t};\n\n\tfunction fromString (string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8';\n\t }\n\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\n\t const length = byteLength(string, encoding) | 0;\n\t let buf = createBuffer(length);\n\n\t const actual = buf.write(string, encoding);\n\n\t if (actual !== length) {\n\t // Writing a hex string, for example, that contains invalid characters will\n\t // cause everything after the first invalid character to be ignored. (e.g.\n\t // 'abxxcd' will be treated as 'ab')\n\t buf = buf.slice(0, actual);\n\t }\n\n\t return buf\n\t}\n\n\tfunction fromArrayLike (array) {\n\t const length = array.length < 0 ? 0 : checked(array.length) | 0;\n\t const buf = createBuffer(length);\n\t for (let i = 0; i < length; i += 1) {\n\t buf[i] = array[i] & 255;\n\t }\n\t return buf\n\t}\n\n\tfunction fromArrayView (arrayView) {\n\t if (isInstance(arrayView, GlobalUint8Array)) {\n\t const copy = new GlobalUint8Array(arrayView);\n\t return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n\t }\n\t return fromArrayLike(arrayView)\n\t}\n\n\tfunction fromArrayBuffer (array, byteOffset, length) {\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\"offset\" is outside of buffer bounds')\n\t }\n\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\"length\" is outside of buffer bounds')\n\t }\n\n\t let buf;\n\t if (byteOffset === undefined && length === undefined) {\n\t buf = new GlobalUint8Array(array);\n\t } else if (length === undefined) {\n\t buf = new GlobalUint8Array(array, byteOffset);\n\t } else {\n\t buf = new GlobalUint8Array(array, byteOffset, length);\n\t }\n\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(buf, Buffer.prototype);\n\n\t return buf\n\t}\n\n\tfunction fromObject (obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t const len = checked(obj.length) | 0;\n\t const buf = createBuffer(len);\n\n\t if (buf.length === 0) {\n\t return buf\n\t }\n\n\t obj.copy(buf, 0, 0, len);\n\t return buf\n\t }\n\n\t if (obj.length !== undefined) {\n\t if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n\t return createBuffer(0)\n\t }\n\t return fromArrayLike(obj)\n\t }\n\n\t if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n\t return fromArrayLike(obj.data)\n\t }\n\t}\n\n\tfunction checked (length) {\n\t // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n\t // length is NaN (which is otherwise coerced to zero.)\n\t if (length >= K_MAX_LENGTH) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n\t 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n\t }\n\t return length | 0\n\t}\n\n\tfunction SlowBuffer (length) {\n\t if (+length != length) { // eslint-disable-line eqeqeq\n\t length = 0;\n\t }\n\t return Buffer.alloc(+length)\n\t}\n\n\tBuffer.isBuffer = function isBuffer (b) {\n\t return b != null && b._isBuffer === true &&\n\t b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n\t};\n\n\tBuffer.compare = function compare (a, b) {\n\t if (isInstance(a, GlobalUint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n\t if (isInstance(b, GlobalUint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError(\n\t 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n\t )\n\t }\n\n\t if (a === b) return 0\n\n\t let x = a.length;\n\t let y = b.length;\n\n\t for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i];\n\t y = b[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\tBuffer.isEncoding = function isEncoding (encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true\n\t default:\n\t return false\n\t }\n\t};\n\n\tBuffer.concat = function concat (list, length) {\n\t if (!Array.isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\n\t if (list.length === 0) {\n\t return Buffer.alloc(0)\n\t }\n\n\t let i;\n\t if (length === undefined) {\n\t length = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length;\n\t }\n\t }\n\n\t const buffer = Buffer.allocUnsafe(length);\n\t let pos = 0;\n\t for (i = 0; i < list.length; ++i) {\n\t let buf = list[i];\n\t if (isInstance(buf, GlobalUint8Array)) {\n\t if (pos + buf.length > buffer.length) {\n\t if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n\t buf.copy(buffer, pos);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t buffer,\n\t buf,\n\t pos\n\t );\n\t }\n\t } else if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t } else {\n\t buf.copy(buffer, pos);\n\t }\n\t pos += buf.length;\n\t }\n\t return buffer\n\t};\n\n\tfunction byteLength (string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length\n\t }\n\t if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {\n\t return string.byteLength\n\t }\n\t if (typeof string !== 'string') {\n\t throw new TypeError(\n\t 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n\t 'Received type ' + typeof string\n\t )\n\t }\n\n\t const len = string.length;\n\t const mustMatch = (arguments.length > 2 && arguments[2] === true);\n\t if (!mustMatch && len === 0) return 0\n\n\t // Use a for loop to avoid recursion\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8ToBytes(string).length\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2\n\t case 'hex':\n\t return len >>> 1\n\t case 'base64':\n\t return base64ToBytes(string).length\n\t default:\n\t if (loweredCase) {\n\t return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n\t }\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\tBuffer.byteLength = byteLength;\n\n\tfunction slowToString (encoding, start, end) {\n\t let loweredCase = false;\n\n\t // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n\t // property of a typed array.\n\n\t // This behaves neither like String nor Uint8Array in that we set start/end\n\t // to their upper/lower bounds if the value passed is out of range.\n\t // undefined is handled specially as per ECMA-262 6th Edition,\n\t // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\t if (start === undefined || start < 0) {\n\t start = 0;\n\t }\n\t // Return early if start > this.length. Done here to prevent potential uint32\n\t // coercion fail below.\n\t if (start > this.length) {\n\t return ''\n\t }\n\n\t if (end === undefined || end > this.length) {\n\t end = this.length;\n\t }\n\n\t if (end <= 0) {\n\t return ''\n\t }\n\n\t // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n\t end >>>= 0;\n\t start >>>= 0;\n\n\t if (end <= start) {\n\t return ''\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end)\n\n\t case 'ascii':\n\t return asciiSlice(this, start, end)\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end)\n\n\t case 'base64':\n\t return base64Slice(this, start, end)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = (encoding + '').toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t}\n\n\t// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n\t// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n\t// reliably in a browserify context because there could be multiple different\n\t// copies of the 'buffer' package in use. This method works even for Buffer\n\t// instances that were created from another copy of the `buffer` package.\n\t// See: https://github.com/feross/buffer/issues/154\n\tBuffer.prototype._isBuffer = true;\n\n\tfunction swap (b, n, m) {\n\t const i = b[n];\n\t b[n] = b[m];\n\t b[m] = i;\n\t}\n\n\tBuffer.prototype.swap16 = function swap16 () {\n\t const len = this.length;\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits')\n\t }\n\t for (let i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap32 = function swap32 () {\n\t const len = this.length;\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits')\n\t }\n\t for (let i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3);\n\t swap(this, i + 1, i + 2);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.swap64 = function swap64 () {\n\t const len = this.length;\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits')\n\t }\n\t for (let i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7);\n\t swap(this, i + 1, i + 6);\n\t swap(this, i + 2, i + 5);\n\t swap(this, i + 3, i + 4);\n\t }\n\t return this\n\t};\n\n\tBuffer.prototype.toString = function toString () {\n\t const length = this.length;\n\t if (length === 0) return ''\n\t if (arguments.length === 0) return utf8Slice(this, 0, length)\n\t return slowToString.apply(this, arguments)\n\t};\n\n\tBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\n\tBuffer.prototype.equals = function equals (b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n\t if (this === b) return true\n\t return Buffer.compare(this, b) === 0\n\t};\n\n\tBuffer.prototype.inspect = function inspect () {\n\t let str = '';\n\t const max = exports.INSPECT_MAX_BYTES;\n\t str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n\t if (this.length > max) str += ' ... ';\n\t return ''\n\t};\n\tif (customInspectSymbol) {\n\t Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n\t}\n\n\tBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n\t if (isInstance(target, GlobalUint8Array)) {\n\t target = Buffer.from(target, target.offset, target.byteLength);\n\t }\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError(\n\t 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n\t 'Received type ' + (typeof target)\n\t )\n\t }\n\n\t if (start === undefined) {\n\t start = 0;\n\t }\n\t if (end === undefined) {\n\t end = target ? target.length : 0;\n\t }\n\t if (thisStart === undefined) {\n\t thisStart = 0;\n\t }\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length;\n\t }\n\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index')\n\t }\n\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0\n\t }\n\t if (thisStart >= thisEnd) {\n\t return -1\n\t }\n\t if (start >= end) {\n\t return 1\n\t }\n\n\t start >>>= 0;\n\t end >>>= 0;\n\t thisStart >>>= 0;\n\t thisEnd >>>= 0;\n\n\t if (this === target) return 0\n\n\t let x = thisEnd - thisStart;\n\t let y = end - start;\n\t const len = Math.min(x, y);\n\n\t const thisCopy = this.slice(thisStart, thisEnd);\n\t const targetCopy = target.slice(start, end);\n\n\t for (let i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i];\n\t y = targetCopy[i];\n\t break\n\t }\n\t }\n\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t};\n\n\t// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n\t// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n\t//\n\t// Arguments:\n\t// - buffer - a Buffer to search\n\t// - val - a string, Buffer, or number\n\t// - byteOffset - an index into `buffer`; will be clamped to an int32\n\t// - encoding - an optional encoding, relevant is val is a string\n\t// - dir - true for indexOf, false for lastIndexOf\n\tfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n\t // Empty buffer means no match\n\t if (buffer.length === 0) return -1\n\n\t // Normalize byteOffset\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset;\n\t byteOffset = 0;\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff;\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000;\n\t }\n\t byteOffset = +byteOffset; // Coerce to Number.\n\t if (numberIsNaN(byteOffset)) {\n\t // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\t byteOffset = dir ? 0 : (buffer.length - 1);\n\t }\n\n\t // Normalize byteOffset: negative offsets start from the end of the buffer\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1\n\t else byteOffset = buffer.length - 1;\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0;\n\t else return -1\n\t }\n\n\t // Normalize val\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding);\n\t }\n\n\t // Finally, search either indexOf (if dir is true) or lastIndexOf\n\t if (Buffer.isBuffer(val)) {\n\t // Special case: looking for empty string/buffer always fails\n\t if (val.length === 0) {\n\t return -1\n\t }\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF; // Search for a byte value [0-255]\n\t if (typeof GlobalUint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return GlobalUint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n\t } else {\n\t return GlobalUint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n\t }\n\t }\n\t return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n\t }\n\n\t throw new TypeError('val must be string, number or Buffer')\n\t}\n\n\tfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n\t let indexSize = 1;\n\t let arrLength = arr.length;\n\t let valLength = val.length;\n\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase();\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n\t encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1\n\t }\n\t indexSize = 2;\n\t arrLength /= 2;\n\t valLength /= 2;\n\t byteOffset /= 2;\n\t }\n\t }\n\n\t function read (buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i]\n\t } else {\n\t return buf.readUInt16BE(i * indexSize)\n\t }\n\t }\n\n\t let i;\n\t if (dir) {\n\t let foundIndex = -1;\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i;\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex;\n\t foundIndex = -1;\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\t for (i = byteOffset; i >= 0; i--) {\n\t let found = true;\n\t for (let j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false;\n\t break\n\t }\n\t }\n\t if (found) return i\n\t }\n\t }\n\n\t return -1\n\t}\n\n\tBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1\n\t};\n\n\tBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n\t};\n\n\tBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n\t};\n\n\tfunction hexWrite (buf, string, offset, length) {\n\t offset = Number(offset) || 0;\n\t const remaining = buf.length - offset;\n\t if (!length) {\n\t length = remaining;\n\t } else {\n\t length = Number(length);\n\t if (length > remaining) {\n\t length = remaining;\n\t }\n\t }\n\n\t const strLen = string.length;\n\n\t if (length > strLen / 2) {\n\t length = strLen / 2;\n\t }\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t const parsed = parseInt(string.substr(i * 2, 2), 16);\n\t if (numberIsNaN(parsed)) return i\n\t buf[offset + i] = parsed;\n\t }\n\t return i\n\t}\n\n\tfunction utf8Write (buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tfunction asciiWrite (buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length)\n\t}\n\n\tfunction base64Write (buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length)\n\t}\n\n\tfunction ucs2Write (buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\n\tBuffer.prototype.write = function write (string, offset, length, encoding) {\n\t // Buffer#write(string)\n\t if (offset === undefined) {\n\t encoding = 'utf8';\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, encoding)\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset;\n\t length = this.length;\n\t offset = 0;\n\t // Buffer#write(string, offset[, length][, encoding])\n\t } else if (isFinite(offset)) {\n\t offset = offset >>> 0;\n\t if (isFinite(length)) {\n\t length = length >>> 0;\n\t if (encoding === undefined) encoding = 'utf8';\n\t } else {\n\t encoding = length;\n\t length = undefined;\n\t }\n\t } else {\n\t throw new Error(\n\t 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n\t )\n\t }\n\n\t const remaining = this.length - offset;\n\t if (length === undefined || length > remaining) length = remaining;\n\n\t if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds')\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t let loweredCase = false;\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length)\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length)\n\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return asciiWrite(this, string, offset, length)\n\n\t case 'base64':\n\t // Warning: maxLength not taken into account in base64Write\n\t return base64Write(this, string, offset, length)\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length)\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t};\n\n\tBuffer.prototype.toJSON = function toJSON () {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t }\n\t};\n\n\tfunction base64Slice (buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64.fromByteArray(buf)\n\t } else {\n\t return base64.fromByteArray(buf.slice(start, end))\n\t }\n\t}\n\n\tfunction utf8Slice (buf, start, end) {\n\t end = Math.min(buf.length, end);\n\t const res = [];\n\n\t let i = start;\n\t while (i < end) {\n\t const firstByte = buf[i];\n\t let codePoint = null;\n\t let bytesPerSequence = (firstByte > 0xEF)\n\t ? 4\n\t : (firstByte > 0xDF)\n\t ? 3\n\t : (firstByte > 0xBF)\n\t ? 2\n\t : 1;\n\n\t if (i + bytesPerSequence <= end) {\n\t let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte;\n\t }\n\t break\n\t case 2:\n\t secondByte = buf[i + 1];\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 3:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t break\n\t case 4:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t fourthByte = buf[i + 3];\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\t }\n\t }\n\n\t if (codePoint === null) {\n\t // we did not generate a valid codePoint so insert a\n\t // replacement char (U+FFFD) and advance only 1 byte\n\t codePoint = 0xFFFD;\n\t bytesPerSequence = 1;\n\t } else if (codePoint > 0xFFFF) {\n\t // encode to utf16 (surrogate pair dance)\n\t codePoint -= 0x10000;\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n\t codePoint = 0xDC00 | codePoint & 0x3FF;\n\t }\n\n\t res.push(codePoint);\n\t i += bytesPerSequence;\n\t }\n\n\t return decodeCodePointsArray(res)\n\t}\n\n\t// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n\t// the lowest limit is Chrome, with 0x10000 args.\n\t// We go 1 magnitude less, for safety\n\tconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\n\tfunction decodeCodePointsArray (codePoints) {\n\t const len = codePoints.length;\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n\t }\n\n\t // Decode in chunks to avoid \"call stack size exceeded\".\n\t let res = '';\n\t let i = 0;\n\t while (i < len) {\n\t res += String.fromCharCode.apply(\n\t String,\n\t codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n\t );\n\t }\n\t return res\n\t}\n\n\tfunction asciiSlice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F);\n\t }\n\t return ret\n\t}\n\n\tfunction latin1Slice (buf, start, end) {\n\t let ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (let i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i]);\n\t }\n\t return ret\n\t}\n\n\tfunction hexSlice (buf, start, end) {\n\t const len = buf.length;\n\n\t if (!start || start < 0) start = 0;\n\t if (!end || end < 0 || end > len) end = len;\n\n\t let out = '';\n\t for (let i = start; i < end; ++i) {\n\t out += hexSliceLookupTable[buf[i]];\n\t }\n\t return out\n\t}\n\n\tfunction utf16leSlice (buf, start, end) {\n\t const bytes = buf.slice(start, end);\n\t let res = '';\n\t // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n\t for (let i = 0; i < bytes.length - 1; i += 2) {\n\t res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n\t }\n\t return res\n\t}\n\n\tBuffer.prototype.slice = function slice (start, end) {\n\t const len = this.length;\n\t start = ~~start;\n\t end = end === undefined ? len : ~~end;\n\n\t if (start < 0) {\n\t start += len;\n\t if (start < 0) start = 0;\n\t } else if (start > len) {\n\t start = len;\n\t }\n\n\t if (end < 0) {\n\t end += len;\n\t if (end < 0) end = 0;\n\t } else if (end > len) {\n\t end = len;\n\t }\n\n\t if (end < start) end = start;\n\n\t const newBuf = this.subarray(start, end);\n\t // Return an augmented `Uint8Array` instance\n\t Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n\t return newBuf\n\t};\n\n\t/*\n\t * Need to make sure that buffer isn't trying to write out of bounds.\n\t */\n\tfunction checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}\n\n\tBuffer.prototype.readUintLE =\n\tBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUintBE =\n\tBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length);\n\t }\n\n\t let val = this[offset + --byteLength];\n\t let mul = 1;\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul;\n\t }\n\n\t return val\n\t};\n\n\tBuffer.prototype.readUint8 =\n\tBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t return this[offset]\n\t};\n\n\tBuffer.prototype.readUint16LE =\n\tBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] | (this[offset + 1] << 8)\n\t};\n\n\tBuffer.prototype.readUint16BE =\n\tBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return (this[offset] << 8) | this[offset + 1]\n\t};\n\n\tBuffer.prototype.readUint32LE =\n\tBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return ((this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16)) +\n\t (this[offset + 3] * 0x1000000)\n\t};\n\n\tBuffer.prototype.readUint32BE =\n\tBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] * 0x1000000) +\n\t ((this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const lo = first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24;\n\n\t const hi = this[++offset] +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t last * 2 ** 24;\n\n\t return BigInt(lo) + (BigInt(hi) << BigInt(32))\n\t});\n\n\tBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const hi = first * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t const lo = this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last;\n\n\t return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n\t});\n\n\tBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let val = this[offset];\n\t let mul = 1;\n\t let i = 0;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n\t let i = byteLength;\n\t let mul = 1;\n\t let val = this[offset + --i];\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul;\n\t }\n\t mul *= 0x80;\n\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n\t return val\n\t};\n\n\tBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t if (!(this[offset] & 0x80)) return (this[offset])\n\t return ((0xff - this[offset] + 1) * -1)\n\t};\n\n\tBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset] | (this[offset + 1] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t const val = this[offset + 1] | (this[offset] << 8);\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t};\n\n\tBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16) |\n\t (this[offset + 3] << 24)\n\t};\n\n\tBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\n\t return (this[offset] << 24) |\n\t (this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t (this[offset + 3])\n\t};\n\n\tBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = this[offset + 4] +\n\t this[offset + 5] * 2 ** 8 +\n\t this[offset + 6] * 2 ** 16 +\n\t (last << 24); // Overflow\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(first +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 24)\n\t});\n\n\tBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n\t offset = offset >>> 0;\n\t validateNumber(offset, 'offset');\n\t const first = this[offset];\n\t const last = this[offset + 7];\n\t if (first === undefined || last === undefined) {\n\t boundsError(offset, this.length - 8);\n\t }\n\n\t const val = (first << 24) + // Overflow\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t this[++offset];\n\n\t return (BigInt(val) << BigInt(32)) +\n\t BigInt(this[++offset] * 2 ** 24 +\n\t this[++offset] * 2 ** 16 +\n\t this[++offset] * 2 ** 8 +\n\t last)\n\t});\n\n\tBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, true, 23, 4)\n\t};\n\n\tBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754$1.read(this, offset, false, 23, 4)\n\t};\n\n\tBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, true, 52, 8)\n\t};\n\n\tBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754$1.read(this, offset, false, 52, 8)\n\t};\n\n\tfunction checkInt (buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t}\n\n\tBuffer.prototype.writeUintLE =\n\tBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let mul = 1;\n\t let i = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUintBE =\n\tBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) {\n\t const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeUint8 =\n\tBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeUint16LE =\n\tBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint16BE =\n\tBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeUint32LE =\n\tBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset + 3] = (value >>> 24);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeUint32BE =\n\tBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t lo = lo >> 8;\n\t buf[offset++] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t hi = hi >> 8;\n\t buf[offset++] = hi;\n\t return offset\n\t}\n\n\tfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n\t checkIntBI(value, min, max, buf, offset, 7);\n\n\t let lo = Number(value & BigInt(0xffffffff));\n\t buf[offset + 7] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 6] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 5] = lo;\n\t lo = lo >> 8;\n\t buf[offset + 4] = lo;\n\t let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n\t buf[offset + 3] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 2] = hi;\n\t hi = hi >> 8;\n\t buf[offset + 1] = hi;\n\t hi = hi >> 8;\n\t buf[offset] = hi;\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = 0;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset] = value & 0xFF;\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t const limit = Math.pow(2, (8 * byteLength) - 1);\n\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t let i = byteLength - 1;\n\t let mul = 1;\n\t let sub = 0;\n\t this[offset + i] = value & 0xFF;\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1;\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength\n\t};\n\n\tBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n\t if (value < 0) value = 0xff + value + 1;\n\t this[offset] = (value & 0xff);\n\t return offset + 1\n\t};\n\n\tBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = (value >>> 8);\n\t this[offset + 1] = (value & 0xff);\n\t return offset + 2\n\t};\n\n\tBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t this[offset] = (value & 0xff);\n\t this[offset + 1] = (value >>> 8);\n\t this[offset + 2] = (value >>> 16);\n\t this[offset + 3] = (value >>> 24);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t if (value < 0) value = 0xffffffff + value + 1;\n\t this[offset] = (value >>> 24);\n\t this[offset + 1] = (value >>> 16);\n\t this[offset + 2] = (value >>> 8);\n\t this[offset + 3] = (value & 0xff);\n\t return offset + 4\n\t};\n\n\tBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n\t return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n\t return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n\t});\n\n\tfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t if (offset < 0) throw new RangeError('Index out of range')\n\t}\n\n\tfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 23, 4);\n\t return offset + 4\n\t}\n\n\tBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert)\n\t};\n\n\tfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8);\n\t }\n\t ieee754$1.write(buf, value, offset, littleEndian, 52, 8);\n\t return offset + 8\n\t}\n\n\tBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert)\n\t};\n\n\tBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert)\n\t};\n\n\t// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\tBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n\t if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n\t if (!start) start = 0;\n\t if (!end && end !== 0) end = this.length;\n\t if (targetStart >= target.length) targetStart = target.length;\n\t if (!targetStart) targetStart = 0;\n\t if (end > 0 && end < start) end = start;\n\n\t // Copy 0 bytes; we're done\n\t if (end === start) return 0\n\t if (target.length === 0 || this.length === 0) return 0\n\n\t // Fatal error conditions\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds')\n\t }\n\t if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n\t // Are we oob?\n\t if (end > this.length) end = this.length;\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start;\n\t }\n\n\t const len = end - start;\n\n\t if (this === target && typeof GlobalUint8Array.prototype.copyWithin === 'function') {\n\t // Use built-in when available, missing from IE11\n\t this.copyWithin(targetStart, start, end);\n\t } else {\n\t GlobalUint8Array.prototype.set.call(\n\t target,\n\t this.subarray(start, end),\n\t targetStart\n\t );\n\t }\n\n\t return len\n\t};\n\n\t// Usage:\n\t// buffer.fill(number[, offset[, end]])\n\t// buffer.fill(buffer[, offset[, end]])\n\t// buffer.fill(string[, offset[, end]][, encoding])\n\tBuffer.prototype.fill = function fill (val, start, end, encoding) {\n\t // Handle string cases:\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start;\n\t start = 0;\n\t end = this.length;\n\t } else if (typeof end === 'string') {\n\t encoding = end;\n\t end = this.length;\n\t }\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string')\n\t }\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\t if (val.length === 1) {\n\t const code = val.charCodeAt(0);\n\t if ((encoding === 'utf8' && code < 128) ||\n\t encoding === 'latin1') {\n\t // Fast path: If `val` fits into a single byte, use that numeric value.\n\t val = code;\n\t }\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255;\n\t } else if (typeof val === 'boolean') {\n\t val = Number(val);\n\t }\n\n\t // Invalid ranges are not set to a default, so can range check early.\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index')\n\t }\n\n\t if (end <= start) {\n\t return this\n\t }\n\n\t start = start >>> 0;\n\t end = end === undefined ? this.length : end >>> 0;\n\n\t if (!val) val = 0;\n\n\t let i;\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val;\n\t }\n\t } else {\n\t const bytes = Buffer.isBuffer(val)\n\t ? val\n\t : Buffer.from(val, encoding);\n\t const len = bytes.length;\n\t if (len === 0) {\n\t throw new TypeError('The value \"' + val +\n\t '\" is invalid for argument \"value\"')\n\t }\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len];\n\t }\n\t }\n\n\t return this\n\t};\n\n\t// CUSTOM ERRORS\n\t// =============\n\n\t// Simplified versions from Node, changed for Buffer-only usage\n\tconst errors = {};\n\tfunction E (sym, getMessage, Base) {\n\t errors[sym] = class NodeError extends Base {\n\t constructor () {\n\t super();\n\n\t Object.defineProperty(this, 'message', {\n\t value: getMessage.apply(this, arguments),\n\t writable: true,\n\t configurable: true\n\t });\n\n\t // Add the error code to the name to include it in the stack trace.\n\t this.name = `${this.name} [${sym}]`;\n\t // Access the stack to generate the error message including the error code\n\t // from the name.\n\t this.stack; // eslint-disable-line no-unused-expressions\n\t // Reset the name to the actual name.\n\t delete this.name;\n\t }\n\n\t get code () {\n\t return sym\n\t }\n\n\t set code (value) {\n\t Object.defineProperty(this, 'code', {\n\t configurable: true,\n\t enumerable: true,\n\t value,\n\t writable: true\n\t });\n\t }\n\n\t toString () {\n\t return `${this.name} [${sym}]: ${this.message}`\n\t }\n\t };\n\t}\n\n\tE('ERR_BUFFER_OUT_OF_BOUNDS',\n\t function (name) {\n\t if (name) {\n\t return `${name} is outside of buffer bounds`\n\t }\n\n\t return 'Attempt to access memory outside buffer bounds'\n\t }, RangeError);\n\tE('ERR_INVALID_ARG_TYPE',\n\t function (name, actual) {\n\t return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n\t }, TypeError);\n\tE('ERR_OUT_OF_RANGE',\n\t function (str, range, input) {\n\t let msg = `The value of \"${str}\" is out of range.`;\n\t let received = input;\n\t if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n\t received = addNumericalSeparator(String(input));\n\t } else if (typeof input === 'bigint') {\n\t received = String(input);\n\t if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n\t received = addNumericalSeparator(received);\n\t }\n\t received += 'n';\n\t }\n\t msg += ` It must be ${range}. Received ${received}`;\n\t return msg\n\t }, RangeError);\n\n\tfunction addNumericalSeparator (val) {\n\t let res = '';\n\t let i = val.length;\n\t const start = val[0] === '-' ? 1 : 0;\n\t for (; i >= start + 4; i -= 3) {\n\t res = `_${val.slice(i - 3, i)}${res}`;\n\t }\n\t return `${val.slice(0, i)}${res}`\n\t}\n\n\t// CHECK FUNCTIONS\n\t// ===============\n\n\tfunction checkBounds (buf, offset, byteLength) {\n\t validateNumber(offset, 'offset');\n\t if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n\t boundsError(offset, buf.length - (byteLength + 1));\n\t }\n\t}\n\n\tfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n\t if (value > max || value < min) {\n\t const n = typeof min === 'bigint' ? 'n' : '';\n\t let range;\n\t if (byteLength > 3) {\n\t if (min === 0 || min === BigInt(0)) {\n\t range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n\t } else {\n\t range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n\t `${(byteLength + 1) * 8 - 1}${n}`;\n\t }\n\t } else {\n\t range = `>= ${min}${n} and <= ${max}${n}`;\n\t }\n\t throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n\t }\n\t checkBounds(buf, offset, byteLength);\n\t}\n\n\tfunction validateNumber (value, name) {\n\t if (typeof value !== 'number') {\n\t throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n\t }\n\t}\n\n\tfunction boundsError (value, length, type) {\n\t if (Math.floor(value) !== value) {\n\t validateNumber(value, type);\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n\t }\n\n\t if (length < 0) {\n\t throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n\t }\n\n\t throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n\t `>= ${type ? 1 : 0} and <= ${length}`,\n\t value)\n\t}\n\n\t// HELPER FUNCTIONS\n\t// ================\n\n\tconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\n\tfunction base64clean (str) {\n\t // Node takes equal signs as end of the Base64 encoding\n\t str = str.split('=')[0];\n\t // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n\t str = str.trim().replace(INVALID_BASE64_RE, '');\n\t // Node converts strings with length < 2 to ''\n\t if (str.length < 2) return ''\n\t // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\t while (str.length % 4 !== 0) {\n\t str = str + '=';\n\t }\n\t return str\n\t}\n\n\tfunction utf8ToBytes (string, units) {\n\t units = units || Infinity;\n\t let codePoint;\n\t const length = string.length;\n\t let leadSurrogate = null;\n\t const bytes = [];\n\n\t for (let i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i);\n\n\t // is surrogate component\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t // last char was a lead\n\t if (!leadSurrogate) {\n\t // no lead yet\n\t if (codePoint > 0xDBFF) {\n\t // unexpected trail\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t } else if (i + 1 === length) {\n\t // unpaired lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue\n\t }\n\n\t // valid lead\n\t leadSurrogate = codePoint;\n\n\t continue\n\t }\n\n\t // 2 leads in a row\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t leadSurrogate = codePoint;\n\t continue\n\t }\n\n\t // valid surrogate pair\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n\t } else if (leadSurrogate) {\n\t // valid bmp char, but last char was a lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t }\n\n\t leadSurrogate = null;\n\n\t // encode utf8\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break\n\t bytes.push(codePoint);\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break\n\t bytes.push(\n\t codePoint >> 0x6 | 0xC0,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break\n\t bytes.push(\n\t codePoint >> 0xC | 0xE0,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break\n\t bytes.push(\n\t codePoint >> 0x12 | 0xF0,\n\t codePoint >> 0xC & 0x3F | 0x80,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t );\n\t } else {\n\t throw new Error('Invalid code point')\n\t }\n\t }\n\n\t return bytes\n\t}\n\n\tfunction asciiToBytes (str) {\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t // Node's code seems to be doing this and not & 0x7F..\n\t byteArray.push(str.charCodeAt(i) & 0xFF);\n\t }\n\t return byteArray\n\t}\n\n\tfunction utf16leToBytes (str, units) {\n\t let c, hi, lo;\n\t const byteArray = [];\n\t for (let i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break\n\n\t c = str.charCodeAt(i);\n\t hi = c >> 8;\n\t lo = c % 256;\n\t byteArray.push(lo);\n\t byteArray.push(hi);\n\t }\n\n\t return byteArray\n\t}\n\n\tfunction base64ToBytes (str) {\n\t return base64.toByteArray(base64clean(str))\n\t}\n\n\tfunction blitBuffer (src, dst, offset, length) {\n\t let i;\n\t for (i = 0; i < length; ++i) {\n\t if ((i + offset >= dst.length) || (i >= src.length)) break\n\t dst[i + offset] = src[i];\n\t }\n\t return i\n\t}\n\n\t// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n\t// the `instanceof` check but they should be treated as of that type.\n\t// See: https://github.com/feross/buffer/issues/166\n\tfunction isInstance (obj, type) {\n\t return obj instanceof type ||\n\t (obj != null && obj.constructor != null && obj.constructor.name != null &&\n\t obj.constructor.name === type.name)\n\t}\n\tfunction numberIsNaN (obj) {\n\t // For IE11 support\n\t return obj !== obj // eslint-disable-line no-self-compare\n\t}\n\n\t// Create lookup table for `toString('hex')`\n\t// See: https://github.com/feross/buffer/issues/219\n\tconst hexSliceLookupTable = (function () {\n\t const alphabet = '0123456789abcdef';\n\t const table = new Array(256);\n\t for (let i = 0; i < 16; ++i) {\n\t const i16 = i * 16;\n\t for (let j = 0; j < 16; ++j) {\n\t table[i16 + j] = alphabet[i] + alphabet[j];\n\t }\n\t }\n\t return table\n\t})();\n\n\t// Return not function with Error if BigInt not supported\n\tfunction defineBigIntMethod (fn) {\n\t return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n\t}\n\n\tfunction BufferBigIntNotDefined () {\n\t throw new Error('BigInt not supported')\n\t} \n} (buffer));\n\nconst Buffer = buffer.Buffer;\n\nconst Blob = buffer.Blob;\nconst BlobOptions = buffer.BlobOptions;\nconst Buffer$1 = buffer.Buffer;\nconst File = buffer.File;\nconst FileOptions = buffer.FileOptions;\nconst INSPECT_MAX_BYTES = buffer.INSPECT_MAX_BYTES;\nconst SlowBuffer = buffer.SlowBuffer;\nconst TranscodeEncoding = buffer.TranscodeEncoding;\nconst atob = buffer.atob;\nconst btoa = buffer.btoa;\nconst constants = buffer.constants;\nconst isAscii = buffer.isAscii;\nconst isUtf8 = buffer.isUtf8;\nconst kMaxLength = buffer.kMaxLength;\nconst kStringMaxLength = buffer.kStringMaxLength;\nconst resolveObjectURL = buffer.resolveObjectURL;\nconst transcode = buffer.transcode;\nexport { Blob, BlobOptions, Buffer$1 as Buffer, File, FileOptions, INSPECT_MAX_BYTES, SlowBuffer, TranscodeEncoding, atob, btoa, constants, Buffer as default, isAscii, isUtf8, kMaxLength, kStringMaxLength, resolveObjectURL, transcode };\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.8\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\n// copied from utils\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\n// Other libraries would silently corrupt the data instead of throwing an error,\n// when they don't support it.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!isBytes(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!isBytes(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n if (!isBytes(a))\n throw new Error('Uint8Array expected');\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import assert from \"@noble/hashes/_assert\";\nimport { hexToBytes as _hexToBytes } from \"@noble/hashes/utils\";\nconst assertBool = assert.bool;\nconst assertBytes = assert.bytes;\nexport { assertBool, assertBytes };\nexport { bytesToHex, bytesToHex as toHex, concatBytes, createView, utf8ToBytes } from \"@noble/hashes/utils\";\n// buf.toString('utf8') -> bytesToUtf8(buf)\nexport function bytesToUtf8(data) {\n if (!(data instanceof Uint8Array)) {\n throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof data}`);\n }\n return new TextDecoder().decode(data);\n}\nexport function hexToBytes(data) {\n const sliced = data.startsWith(\"0x\") ? data.substring(2) : data;\n return _hexToBytes(sliced);\n}\n// buf.equals(buf2) -> equalsBytes(buf, buf2)\nexport function equalsBytes(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n// Internal utils\nexport function wrapHash(hash) {\n return (msg) => {\n assert.bytes(msg);\n return hash(msg);\n };\n}\n// TODO(v3): switch away from node crypto, remove this unnecessary variable.\nexport const crypto = (() => {\n const webCrypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : undefined;\n const nodeRequire = typeof module !== \"undefined\" &&\n typeof module.require === \"function\" &&\n module.require.bind(module);\n return {\n node: nodeRequire && !webCrypto ? nodeRequire(\"crypto\") : undefined,\n web: webCrypto\n };\n})();\n","import { keccak_224, keccak_256, keccak_384, keccak_512 } from \"@noble/hashes/sha3\";\nimport { wrapHash } from \"./utils.js\";\nexport const keccak224 = wrapHash(keccak_224);\nexport const keccak256 = (() => {\n const k = wrapHash(keccak_256);\n k.create = keccak_256.create;\n return k;\n})();\nexport const keccak384 = wrapHash(keccak_384);\nexport const keccak512 = wrapHash(keccak_512);\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n// Response error\nexport const ERR_RESPONSE = 100;\nexport const ERR_INVALID_RESPONSE = 101;\n// Generic errors\nexport const ERR_PARAM = 200;\nexport const ERR_FORMATTERS = 201;\nexport const ERR_METHOD_NOT_IMPLEMENTED = 202;\nexport const ERR_OPERATION_TIMEOUT = 203;\nexport const ERR_OPERATION_ABORT = 204;\nexport const ERR_ABI_ENCODING = 205;\nexport const ERR_EXISTING_PLUGIN_NAMESPACE = 206;\nexport const ERR_INVALID_METHOD_PARAMS = 207;\n// Contract error codes\nexport const ERR_CONTRACT = 300;\nexport const ERR_CONTRACT_RESOLVER_MISSING = 301;\nexport const ERR_CONTRACT_ABI_MISSING = 302;\nexport const ERR_CONTRACT_REQUIRED_CALLBACK = 303;\nexport const ERR_CONTRACT_EVENT_NOT_EXISTS = 304;\nexport const ERR_CONTRACT_RESERVED_EVENT = 305;\nexport const ERR_CONTRACT_MISSING_DEPLOY_DATA = 306;\nexport const ERR_CONTRACT_MISSING_ADDRESS = 307;\nexport const ERR_CONTRACT_MISSING_FROM_ADDRESS = 308;\nexport const ERR_CONTRACT_INSTANTIATION = 309;\nexport const ERR_CONTRACT_EXECUTION_REVERTED = 310;\nexport const ERR_CONTRACT_TX_DATA_AND_INPUT = 311;\n// Transaction error codes\nexport const ERR_TX = 400;\nexport const ERR_TX_REVERT_INSTRUCTION = 401;\nexport const ERR_TX_REVERT_TRANSACTION = 402;\nexport const ERR_TX_NO_CONTRACT_ADDRESS = 403;\nexport const ERR_TX_CONTRACT_NOT_STORED = 404;\nexport const ERR_TX_REVERT_WITHOUT_REASON = 405;\nexport const ERR_TX_OUT_OF_GAS = 406;\nexport const ERR_RAW_TX_UNDEFINED = 407;\nexport const ERR_TX_INVALID_SENDER = 408;\nexport const ERR_TX_INVALID_CALL = 409;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN = 410;\nexport const ERR_TX_MISSING_CUSTOM_CHAIN_ID = 411;\nexport const ERR_TX_CHAIN_ID_MISMATCH = 412;\nexport const ERR_TX_INVALID_CHAIN_INFO = 413;\nexport const ERR_TX_MISSING_CHAIN_INFO = 414;\nexport const ERR_TX_MISSING_GAS = 415;\nexport const ERR_TX_INVALID_LEGACY_GAS = 416;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS = 417;\nexport const ERR_TX_INVALID_FEE_MARKET_GAS_PRICE = 418;\nexport const ERR_TX_INVALID_LEGACY_FEE_MARKET = 419;\nexport const ERR_TX_INVALID_OBJECT = 420;\nexport const ERR_TX_INVALID_NONCE_OR_CHAIN_ID = 421;\nexport const ERR_TX_UNABLE_TO_POPULATE_NONCE = 422;\nexport const ERR_TX_UNSUPPORTED_EIP_1559 = 423;\nexport const ERR_TX_UNSUPPORTED_TYPE = 424;\nexport const ERR_TX_DATA_AND_INPUT = 425;\nexport const ERR_TX_POLLING_TIMEOUT = 426;\nexport const ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL = 427;\nexport const ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = 428;\nexport const ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = 429;\nexport const ERR_TX_NOT_FOUND = 430;\nexport const ERR_TX_SEND_TIMEOUT = 431;\nexport const ERR_TX_BLOCK_TIMEOUT = 432;\nexport const ERR_TX_SIGNING = 433;\nexport const ERR_TX_GAS_MISMATCH = 434;\nexport const ERR_TX_CHAIN_MISMATCH = 435;\nexport const ERR_TX_HARDFORK_MISMATCH = 436;\nexport const ERR_TX_INVALID_RECEIVER = 437;\nexport const ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = 438;\nexport const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439;\nexport const ERR_TX_MISSING_GAS_INNER_ERROR = 440;\nexport const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441;\n// Connection error codes\nexport const ERR_CONN = 500;\nexport const ERR_CONN_INVALID = 501;\nexport const ERR_CONN_TIMEOUT = 502;\nexport const ERR_CONN_NOT_OPEN = 503;\nexport const ERR_CONN_CLOSE = 504;\nexport const ERR_CONN_MAX_ATTEMPTS = 505;\nexport const ERR_CONN_PENDING_REQUESTS = 506;\nexport const ERR_REQ_ALREADY_SENT = 507;\n// Provider error codes\nexport const ERR_PROVIDER = 600;\nexport const ERR_INVALID_PROVIDER = 601;\nexport const ERR_INVALID_CLIENT = 602;\nexport const ERR_SUBSCRIPTION = 603;\nexport const ERR_WS_PROVIDER = 604;\n// Account error codes\nexport const ERR_PRIVATE_KEY_LENGTH = 701;\nexport const ERR_INVALID_PRIVATE_KEY = 702;\nexport const ERR_UNSUPPORTED_KDF = 703;\nexport const ERR_KEY_DERIVATION_FAIL = 704;\nexport const ERR_KEY_VERSION_UNSUPPORTED = 705;\nexport const ERR_INVALID_PASSWORD = 706;\nexport const ERR_IV_LENGTH = 707;\nexport const ERR_INVALID_KEYSTORE = 708;\nexport const ERR_PBKDF2_ITERATIONS = 709;\n// Signature error codes\nexport const ERR_SIGNATURE_FAILED = 801;\nexport const ERR_INVALID_SIGNATURE = 802;\nexport const GENESIS_BLOCK_NUMBER = '0x0';\n// RPC error codes (EIP-1193)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\nexport const JSONRPC_ERR_REJECTED_REQUEST = 4001;\nexport const JSONRPC_ERR_UNAUTHORIZED = 4100;\nexport const JSONRPC_ERR_UNSUPPORTED_METHOD = 4200;\nexport const JSONRPC_ERR_DISCONNECTED = 4900;\nexport const JSONRPC_ERR_CHAIN_DISCONNECTED = 4901;\n// ENS error codes\nexport const ERR_ENS_CHECK_INTERFACE_SUPPORT = 901;\nexport const ERR_ENS_UNSUPPORTED_NETWORK = 902;\nexport const ERR_ENS_NETWORK_NOT_SYNCED = 903;\n// Utils error codes\nexport const ERR_INVALID_STRING = 1001;\nexport const ERR_INVALID_BYTES = 1002;\nexport const ERR_INVALID_NUMBER = 1003;\nexport const ERR_INVALID_UNIT = 1004;\nexport const ERR_INVALID_ADDRESS = 1005;\nexport const ERR_INVALID_HEX = 1006;\nexport const ERR_INVALID_TYPE = 1007;\nexport const ERR_INVALID_BOOLEAN = 1008;\nexport const ERR_INVALID_UNSIGNED_INTEGER = 1009;\nexport const ERR_INVALID_SIZE = 1010;\nexport const ERR_INVALID_LARGE_VALUE = 1011;\nexport const ERR_INVALID_BLOCK = 1012;\nexport const ERR_INVALID_TYPE_ABI = 1013;\nexport const ERR_INVALID_NIBBLE_WIDTH = 1014;\n// Validation error codes\nexport const ERR_VALIDATION = 1100;\n// Core error codes\nexport const ERR_CORE_HARDFORK_MISMATCH = 1101;\nexport const ERR_CORE_CHAIN_MISMATCH = 1102;\n// Schema error codes\nexport const ERR_SCHEMA_FORMAT = 1200;\n// RPC error codes (EIP-1474)\n// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\nexport const ERR_RPC_INVALID_JSON = -32700;\nexport const ERR_RPC_INVALID_REQUEST = -32600;\nexport const ERR_RPC_INVALID_METHOD = -32601;\nexport const ERR_RPC_INVALID_PARAMS = -32602;\nexport const ERR_RPC_INTERNAL_ERROR = -32603;\nexport const ERR_RPC_INVALID_INPUT = -32000;\nexport const ERR_RPC_MISSING_RESOURCE = -32001;\nexport const ERR_RPC_UNAVAILABLE_RESOURCE = -32002;\nexport const ERR_RPC_TRANSACTION_REJECTED = -32003;\nexport const ERR_RPC_UNSUPPORTED_METHOD = -32004;\nexport const ERR_RPC_LIMIT_EXCEEDED = -32005;\nexport const ERR_RPC_NOT_SUPPORTED = -32006;\n//# sourceMappingURL=error_codes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport class BaseWeb3Error extends Error {\n constructor(msg, innerError) {\n super(msg);\n this.innerError = innerError;\n this.name = this.constructor.name;\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(new.target.constructor);\n }\n else {\n this.stack = new Error().stack;\n }\n }\n static convertToString(value, unquotValue = false) {\n // Using \"null\" value intentionally for validation\n // eslint-disable-next-line no-null/no-null\n if (value === null || value === undefined)\n return 'undefined';\n const result = JSON.stringify(value, (_, v) => (typeof v === 'bigint' ? v.toString() : v));\n return unquotValue && ['bigint', 'string'].includes(typeof value)\n ? result.replace(/['\\\\\"]+/g, '')\n : result;\n }\n toJSON() {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n innerError: this.innerError,\n };\n }\n}\nexport class InvalidValueError extends BaseWeb3Error {\n constructor(value, msg) {\n super(`Invalid value given \"${BaseWeb3Error.convertToString(value, true)}\". Error: ${msg}.`);\n this.name = this.constructor.name;\n }\n}\n//# sourceMappingURL=web3_error_base.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/* eslint-disable max-classes-per-file */\nimport { ERR_INVALID_BYTES, ERR_INVALID_NUMBER, ERR_INVALID_ADDRESS, ERR_INVALID_BLOCK, ERR_INVALID_BOOLEAN, ERR_INVALID_HEX, ERR_INVALID_LARGE_VALUE, ERR_INVALID_NIBBLE_WIDTH, ERR_INVALID_SIZE, ERR_INVALID_STRING, ERR_INVALID_TYPE, ERR_INVALID_TYPE_ABI, ERR_INVALID_UNIT, ERR_INVALID_UNSIGNED_INTEGER, } from '../error_codes.js';\nimport { InvalidValueError } from '../web3_error_base.js';\nexport class InvalidBytesError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not parse as byte data');\n this.code = ERR_INVALID_BYTES;\n }\n}\nexport class InvalidNumberError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not parse as number data');\n this.code = ERR_INVALID_NUMBER;\n }\n}\nexport class InvalidAddressError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid ethereum address');\n this.code = ERR_INVALID_ADDRESS;\n }\n}\nexport class InvalidStringError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid string');\n this.code = ERR_INVALID_STRING;\n }\n}\nexport class InvalidUnitError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid unit');\n this.code = ERR_INVALID_UNIT;\n }\n}\nexport class HexProcessingError extends InvalidValueError {\n constructor(value) {\n super(value, 'can not be converted to hex');\n this.code = ERR_INVALID_HEX;\n }\n}\nexport class NibbleWidthError extends InvalidValueError {\n constructor(value) {\n super(value, 'value greater than the nibble width');\n this.code = ERR_INVALID_NIBBLE_WIDTH;\n }\n}\nexport class InvalidTypeError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid type, type not supported');\n this.code = ERR_INVALID_TYPE;\n }\n}\nexport class InvalidBooleanError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid boolean.');\n this.code = ERR_INVALID_BOOLEAN;\n }\n}\nexport class InvalidUnsignedIntegerError extends InvalidValueError {\n constructor(value) {\n super(value, 'not a valid unsigned integer.');\n this.code = ERR_INVALID_UNSIGNED_INTEGER;\n }\n}\nexport class InvalidSizeError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid size given.');\n this.code = ERR_INVALID_SIZE;\n }\n}\nexport class InvalidLargeValueError extends InvalidValueError {\n constructor(value) {\n super(value, 'value is larger than size.');\n this.code = ERR_INVALID_LARGE_VALUE;\n }\n}\nexport class InvalidBlockError extends InvalidValueError {\n constructor(value) {\n super(value, 'invalid string given');\n this.code = ERR_INVALID_BLOCK;\n }\n}\nexport class InvalidTypeAbiInputError extends InvalidValueError {\n constructor(value) {\n super(value, 'components found but type is not tuple');\n this.code = ERR_INVALID_TYPE_ABI;\n }\n}\n//# sourceMappingURL=utils_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, JSONRPC_ERR_CHAIN_DISCONNECTED, JSONRPC_ERR_DISCONNECTED, JSONRPC_ERR_REJECTED_REQUEST, JSONRPC_ERR_UNAUTHORIZED, JSONRPC_ERR_UNSUPPORTED_METHOD, } from '../error_codes.js';\n/**\n * A template string for a generic Rpc Error. The `*code*` will be replaced with the code number.\n * Note: consider in next version that a spelling mistake could be corrected for `occured` and the value could be:\n * \t`An Rpc error has occurred with a code of *code*`\n */\nexport const genericRpcErrorMessageTemplate = 'An Rpc error has occured with a code of *code*';\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const RpcErrorMessages = {\n // EIP-1474 & JSON RPC 2.0\n // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md\n [ERR_RPC_INVALID_JSON]: {\n message: 'Parse error',\n description: 'Invalid JSON',\n },\n [ERR_RPC_INVALID_REQUEST]: {\n message: 'Invalid request',\n description: 'JSON is not a valid request object\t',\n },\n [ERR_RPC_INVALID_METHOD]: {\n message: 'Method not found',\n description: 'Method does not exist\t',\n },\n [ERR_RPC_INVALID_PARAMS]: {\n message: 'Invalid params',\n description: 'Invalid method parameters',\n },\n [ERR_RPC_INTERNAL_ERROR]: {\n message: 'Internal error',\n description: 'Internal JSON-RPC error',\n },\n [ERR_RPC_INVALID_INPUT]: {\n message: 'Invalid input',\n description: 'Missing or invalid parameters',\n },\n [ERR_RPC_MISSING_RESOURCE]: {\n message: 'Resource not found',\n description: 'Requested resource not found',\n },\n [ERR_RPC_UNAVAILABLE_RESOURCE]: {\n message: 'Resource unavailable',\n description: 'Requested resource not available',\n },\n [ERR_RPC_TRANSACTION_REJECTED]: {\n message: 'Transaction rejected',\n description: 'Transaction creation failed',\n },\n [ERR_RPC_UNSUPPORTED_METHOD]: {\n message: 'Method not supported',\n description: 'Method is not implemented',\n },\n [ERR_RPC_LIMIT_EXCEEDED]: {\n message: 'Limit exceeded',\n description: 'Request exceeds defined limit',\n },\n [ERR_RPC_NOT_SUPPORTED]: {\n message: 'JSON-RPC version not supported',\n description: 'Version of JSON-RPC protocol is not supported',\n },\n // EIP-1193\n // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors\n [JSONRPC_ERR_REJECTED_REQUEST]: {\n name: 'User Rejected Request',\n message: 'The user rejected the request.',\n },\n [JSONRPC_ERR_UNAUTHORIZED]: {\n name: 'Unauthorized',\n message: 'The requested method and/or account has not been authorized by the user.',\n },\n [JSONRPC_ERR_UNSUPPORTED_METHOD]: {\n name: 'Unsupported Method',\n message: 'The Provider does not support the requested method.',\n },\n [JSONRPC_ERR_DISCONNECTED]: {\n name: 'Disconnected',\n message: 'The Provider is disconnected from all chains.',\n },\n [JSONRPC_ERR_CHAIN_DISCONNECTED]: {\n name: 'Chain Disconnected',\n message: 'The Provider is not connected to the requested chain.',\n },\n // EIP-1193 - CloseEvent\n // https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code\n '0-999': {\n name: '',\n message: 'Not used.',\n },\n 1000: {\n name: 'Normal Closure',\n message: 'The connection successfully completed the purpose for which it was created.',\n },\n 1001: {\n name: 'Going Away',\n message: 'The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.',\n },\n 1002: {\n name: 'Protocol error',\n message: 'The endpoint is terminating the connection due to a protocol error.',\n },\n 1003: {\n name: 'Unsupported Data',\n message: 'The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)',\n },\n 1004: {\n name: 'Reserved',\n message: 'Reserved. A meaning might be defined in the future.',\n },\n 1005: {\n name: 'No Status Rcvd',\n message: 'Reserved. Indicates that no status code was provided even though one was expected.',\n },\n 1006: {\n name: 'Abnormal Closure',\n message: 'Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.',\n },\n 1007: {\n name: 'Invalid frame payload data',\n message: 'The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).',\n },\n 1008: {\n name: 'Policy Violation',\n message: 'The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.',\n },\n 1009: {\n name: 'Message Too Big',\n message: 'The endpoint is terminating the connection because a data frame was received that is too large.',\n },\n 1010: {\n name: 'Mandatory Ext.',\n message: \"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.\",\n },\n 1011: {\n name: 'Internal Error',\n message: 'The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.',\n },\n 1012: {\n name: 'Service Restart',\n message: 'The server is terminating the connection because it is restarting.',\n },\n 1013: {\n name: 'Try Again Later',\n message: 'The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.',\n },\n 1014: {\n name: 'Bad Gateway',\n message: 'The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.',\n },\n 1015: {\n name: 'TLS handshake',\n message: \"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).\",\n },\n '1016-2999': {\n name: '',\n message: 'For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications.',\n },\n '3000-3999': {\n name: '',\n message: 'For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol.',\n },\n '4000-4999': {\n name: '',\n message: \"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol.\",\n },\n};\n//# sourceMappingURL=rpc_error_messages.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BaseWeb3Error } from '../web3_error_base.js';\nimport { ERR_RPC_INTERNAL_ERROR, ERR_RPC_INVALID_INPUT, ERR_RPC_INVALID_JSON, ERR_RPC_INVALID_METHOD, ERR_RPC_INVALID_PARAMS, ERR_RPC_INVALID_REQUEST, ERR_RPC_LIMIT_EXCEEDED, ERR_RPC_MISSING_RESOURCE, ERR_RPC_NOT_SUPPORTED, ERR_RPC_TRANSACTION_REJECTED, ERR_RPC_UNAVAILABLE_RESOURCE, ERR_RPC_UNSUPPORTED_METHOD, } from '../error_codes.js';\nimport { RpcErrorMessages, genericRpcErrorMessageTemplate } from './rpc_error_messages.js';\nexport class RpcError extends BaseWeb3Error {\n constructor(rpcError, message) {\n super(message !== null && message !== void 0 ? message : genericRpcErrorMessageTemplate.replace('*code*', rpcError.error.code.toString()));\n this.code = rpcError.error.code;\n this.id = rpcError.id;\n this.jsonrpc = rpcError.jsonrpc;\n this.jsonRpcError = rpcError.error;\n }\n toJSON() {\n return Object.assign(Object.assign({}, super.toJSON()), { error: this.jsonRpcError, id: this.id, jsonRpc: this.jsonrpc });\n }\n}\nexport class EIP1193ProviderRpcError extends BaseWeb3Error {\n constructor(code, data) {\n var _a, _b, _c, _d;\n if (!code) {\n // this case should ideally not happen\n super();\n }\n else if ((_a = RpcErrorMessages[code]) === null || _a === void 0 ? void 0 : _a.message) {\n super(RpcErrorMessages[code].message);\n }\n else {\n // Retrieve the status code object for the given code from the table, by searching through the appropriate range\n const statusCodeRange = Object.keys(RpcErrorMessages).find(statusCode => typeof statusCode === 'string' &&\n code >= parseInt(statusCode.split('-')[0], 10) &&\n code <= parseInt(statusCode.split('-')[1], 10));\n super((_c = (_b = RpcErrorMessages[statusCodeRange !== null && statusCodeRange !== void 0 ? statusCodeRange : '']) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : genericRpcErrorMessageTemplate.replace('*code*', (_d = code === null || code === void 0 ? void 0 : code.toString()) !== null && _d !== void 0 ? _d : '\"\"'));\n }\n this.code = code;\n this.data = data;\n }\n}\nexport class ParseError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_JSON].message);\n this.code = ERR_RPC_INVALID_JSON;\n }\n}\nexport class InvalidRequestError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_REQUEST].message);\n this.code = ERR_RPC_INVALID_REQUEST;\n }\n}\nexport class MethodNotFoundError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_METHOD].message);\n this.code = ERR_RPC_INVALID_METHOD;\n }\n}\nexport class InvalidParamsError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_PARAMS].message);\n this.code = ERR_RPC_INVALID_PARAMS;\n }\n}\nexport class InternalError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INTERNAL_ERROR].message);\n this.code = ERR_RPC_INTERNAL_ERROR;\n }\n}\nexport class InvalidInputError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_INVALID_INPUT].message);\n this.code = ERR_RPC_INVALID_INPUT;\n }\n}\nexport class MethodNotSupported extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_UNSUPPORTED_METHOD].message);\n this.code = ERR_RPC_UNSUPPORTED_METHOD;\n }\n}\nexport class ResourceUnavailableError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_UNAVAILABLE_RESOURCE].message);\n this.code = ERR_RPC_UNAVAILABLE_RESOURCE;\n }\n}\nexport class ResourcesNotFoundError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_MISSING_RESOURCE].message);\n this.code = ERR_RPC_MISSING_RESOURCE;\n }\n}\nexport class VersionNotSupportedError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_NOT_SUPPORTED].message);\n this.code = ERR_RPC_NOT_SUPPORTED;\n }\n}\nexport class TransactionRejectedError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_TRANSACTION_REJECTED].message);\n this.code = ERR_RPC_TRANSACTION_REJECTED;\n }\n}\nexport class LimitExceededError extends RpcError {\n constructor(rpcError) {\n super(rpcError, RpcErrorMessages[ERR_RPC_LIMIT_EXCEEDED].message);\n this.code = ERR_RPC_LIMIT_EXCEEDED;\n }\n}\nexport const rpcErrorsMap = new Map();\nrpcErrorsMap.set(ERR_RPC_INVALID_JSON, { error: ParseError });\nrpcErrorsMap.set(ERR_RPC_INVALID_REQUEST, {\n error: InvalidRequestError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_METHOD, {\n error: MethodNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_INVALID_PARAMS, { error: InvalidParamsError });\nrpcErrorsMap.set(ERR_RPC_INTERNAL_ERROR, { error: InternalError });\nrpcErrorsMap.set(ERR_RPC_INVALID_INPUT, { error: InvalidInputError });\nrpcErrorsMap.set(ERR_RPC_UNSUPPORTED_METHOD, {\n error: MethodNotSupported,\n});\nrpcErrorsMap.set(ERR_RPC_UNAVAILABLE_RESOURCE, {\n error: ResourceUnavailableError,\n});\nrpcErrorsMap.set(ERR_RPC_TRANSACTION_REJECTED, {\n error: TransactionRejectedError,\n});\nrpcErrorsMap.set(ERR_RPC_MISSING_RESOURCE, {\n error: ResourcesNotFoundError,\n});\nrpcErrorsMap.set(ERR_RPC_NOT_SUPPORTED, {\n error: VersionNotSupportedError,\n});\nrpcErrorsMap.set(ERR_RPC_LIMIT_EXCEEDED, { error: LimitExceededError });\n//# sourceMappingURL=rpc_errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { ERR_SCHEMA_FORMAT } from '../error_codes.js';\nimport { BaseWeb3Error } from '../web3_error_base.js';\nexport class SchemaFormatError extends BaseWeb3Error {\n constructor(type) {\n super(`Format for the type ${type} is unsupported`);\n this.type = type;\n this.code = ERR_SCHEMA_FORMAT;\n }\n toJSON() {\n return Object.assign(Object.assign({}, super.toJSON()), { type: this.type });\n }\n}\n//# sourceMappingURL=schema_errors.js.map","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.issues.length) {\n return {\n status: \"dirty\",\n value: ctx.data,\n };\n }\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n if (isValid(result)) {\n result.value = Object.freeze(result.value);\n }\n return result;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nconst custom = (check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BaseWeb3Error, ERR_VALIDATION } from 'web3-errors';\nconst errorFormatter = (error) => {\n if (error.message) {\n return error.message;\n }\n return 'unspecified error';\n};\nexport class Web3ValidatorError extends BaseWeb3Error {\n constructor(errors) {\n super();\n this.code = ERR_VALIDATION;\n this.errors = errors;\n super.message = `Web3 validator found ${errors.length} error[s]:\\n${this._compileErrors().join('\\n')}`;\n }\n _compileErrors() {\n return this.errors.map(errorFormatter);\n }\n}\n//# sourceMappingURL=errors.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport const VALID_ETH_BASE_TYPES = ['bool', 'int', 'uint', 'bytes', 'string', 'address', 'tuple'];\n//# sourceMappingURL=constants.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport const isAbiParameterSchema = (schema) => typeof schema === 'object' && 'type' in schema && 'name' in schema;\n//# sourceMappingURL=abi.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/**\n * checks input if typeof data is valid string input\n */\nexport const isString = (value) => typeof value === 'string';\nexport const isHexStrict = (hex) => typeof hex === 'string' && /^((-)?0x[0-9a-f]+|(0x))$/i.test(hex);\n/**\n * Is the string a hex string.\n *\n * @param value\n * @param length\n * @returns output the string is a hex string\n */\nexport function isHexString(value, length) {\n if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/))\n return false;\n if (typeof length !== 'undefined' && length > 0 && value.length !== 2 + 2 * length)\n return false;\n return true;\n}\nexport const isHex = (hex) => typeof hex === 'number' ||\n typeof hex === 'bigint' ||\n (typeof hex === 'string' && /^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(hex));\nexport const isHexString8Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 18 : isHex(value) && value.length === 16;\nexport const isHexString32Bytes = (value, prefixed = true) => prefixed ? isHexStrict(value) && value.length === 66 : isHex(value) && value.length === 64;\n/**\n * Returns a `Boolean` on whether or not the a `String` starts with '0x'\n * @param str the string input value\n * @return a boolean if it is or is not hex prefixed\n * @throws if the str input is not a string\n */\nexport function isHexPrefixed(str) {\n if (typeof str !== 'string') {\n throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof str}`);\n }\n return str.startsWith('0x');\n}\n/**\n * Checks provided Uint8Array for leading zeroes and throws if found.\n *\n * Examples:\n *\n * Valid values: 0x1, 0x, 0x01, 0x1234\n * Invalid values: 0x0, 0x00, 0x001, 0x0001\n *\n * Note: This method is useful for validating that RLP encoded integers comply with the rule that all\n * integer values encoded to RLP must be in the most compact form and contain no leading zero bytes\n * @param values An object containing string keys and Uint8Array values\n * @throws if any provided value is found to have leading zero bytes\n */\nexport const validateNoLeadingZeroes = function (values) {\n for (const [k, v] of Object.entries(values)) {\n if (v !== undefined && v.length > 0 && v[0] === 0) {\n throw new Error(`${k} cannot have leading zeroes, received: ${v.toString()}`);\n }\n }\n};\n//# sourceMappingURL=string.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { InvalidBytesError, InvalidNumberError } from 'web3-errors';\nimport { VALID_ETH_BASE_TYPES } from './constants.js';\nimport { isAbiParameterSchema } from './validation/abi.js';\nimport { isHexStrict } from './validation/string.js';\nimport { Web3ValidatorError } from './errors.js';\nconst extraTypes = ['hex', 'number', 'blockNumber', 'blockNumberOrTag', 'filter', 'bloom'];\nexport const parseBaseType = (type) => {\n // Remove all empty spaces to avoid any parsing issue.\n let strippedType = type.replace(/ /, '');\n let baseTypeSize;\n let isArray = false;\n let arraySizes = [];\n if (type.includes('[')) {\n // Extract the array type\n strippedType = strippedType.slice(0, strippedType.indexOf('['));\n // Extract array indexes\n arraySizes = [...type.matchAll(/(?:\\[(\\d*)\\])/g)]\n .map(match => parseInt(match[1], 10))\n .map(size => (Number.isNaN(size) ? -1 : size));\n isArray = arraySizes.length > 0;\n }\n if (VALID_ETH_BASE_TYPES.includes(strippedType)) {\n return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n }\n if (strippedType.startsWith('int')) {\n baseTypeSize = parseInt(strippedType.substring(3), 10);\n strippedType = 'int';\n }\n else if (strippedType.startsWith('uint')) {\n baseTypeSize = parseInt(type.substring(4), 10);\n strippedType = 'uint';\n }\n else if (strippedType.startsWith('bytes')) {\n baseTypeSize = parseInt(strippedType.substring(5), 10);\n strippedType = 'bytes';\n }\n else {\n return { baseType: undefined, isArray: false, baseTypeSize: undefined, arraySizes };\n }\n return { baseType: strippedType, isArray, baseTypeSize, arraySizes };\n};\nconst convertEthType = (type, parentSchema = {}) => {\n const typePropertyPresent = Object.keys(parentSchema).includes('type');\n if (typePropertyPresent) {\n throw new Web3ValidatorError([\n {\n keyword: 'eth',\n message: 'Either \"eth\" or \"type\" can be presented in schema',\n params: { eth: type },\n instancePath: '',\n schemaPath: '',\n },\n ]);\n }\n const { baseType, baseTypeSize } = parseBaseType(type);\n if (!baseType && !extraTypes.includes(type)) {\n throw new Web3ValidatorError([\n {\n keyword: 'eth',\n message: `Eth data type \"${type}\" is not valid`,\n params: { eth: type },\n instancePath: '',\n schemaPath: '',\n },\n ]);\n }\n if (baseType) {\n if (baseType === 'tuple') {\n throw new Error('\"tuple\" type is not implemented directly.');\n }\n return { format: `${baseType}${baseTypeSize !== null && baseTypeSize !== void 0 ? baseTypeSize : ''}`, required: true };\n }\n if (type) {\n return { format: type, required: true };\n }\n return {};\n};\nexport const abiSchemaToJsonSchema = (abis, level = '/0') => {\n const schema = {\n type: 'array',\n items: [],\n maxItems: abis.length,\n minItems: abis.length,\n };\n for (const [index, abi] of abis.entries()) {\n // eslint-disable-next-line no-nested-ternary\n let abiType;\n let abiName;\n let abiComponents = [];\n // If it's a complete Abi Parameter\n // e.g. {name: 'a', type: 'uint'}\n if (isAbiParameterSchema(abi)) {\n abiType = abi.type;\n abiName = abi.name;\n abiComponents = abi.components;\n // If its short form string value e.g. ['uint']\n }\n else if (typeof abi === 'string') {\n abiType = abi;\n abiName = `${level}/${index}`;\n // If it's provided in short form of tuple e.g. [['uint', 'string']]\n }\n else if (Array.isArray(abi)) {\n // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n if (abi[0] &&\n typeof abi[0] === 'string' &&\n abi[0].startsWith('tuple') &&\n !Array.isArray(abi[0]) &&\n abi[1] &&\n Array.isArray(abi[1])) {\n // eslint-disable-next-line prefer-destructuring\n abiType = abi[0];\n abiName = `${level}/${index}`;\n abiComponents = abi[1];\n }\n else {\n abiType = 'tuple';\n abiName = `${level}/${index}`;\n abiComponents = abi;\n }\n }\n const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n let childSchema;\n let lastSchema = schema;\n for (let i = arraySizes.length - 1; i > 0; i -= 1) {\n childSchema = {\n type: 'array',\n $id: abiName,\n items: [],\n maxItems: arraySizes[i],\n minItems: arraySizes[i],\n };\n if (arraySizes[i] < 0) {\n delete childSchema.maxItems;\n delete childSchema.minItems;\n }\n // lastSchema.items is a Schema, concat with 'childSchema'\n if (!Array.isArray(lastSchema.items)) {\n lastSchema.items = [lastSchema.items, childSchema];\n } // lastSchema.items is an empty Scheme array, set it to 'childSchema'\n else if (lastSchema.items.length === 0) {\n lastSchema.items = [childSchema];\n } // lastSchema.items is a non-empty Scheme array, append 'childSchema'\n else {\n lastSchema.items.push(childSchema);\n }\n lastSchema = childSchema;\n }\n if (baseType === 'tuple' && !isArray) {\n const nestedTuple = abiSchemaToJsonSchema(abiComponents, abiName);\n nestedTuple.$id = abiName;\n lastSchema.items.push(nestedTuple);\n }\n else if (baseType === 'tuple' && isArray) {\n const arraySize = arraySizes[0];\n const item = Object.assign({ type: 'array', $id: abiName, items: abiSchemaToJsonSchema(abiComponents, abiName) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n lastSchema.items.push(item);\n }\n else if (isArray) {\n const arraySize = arraySizes[0];\n const item = Object.assign({ type: 'array', $id: abiName, items: convertEthType(abiType) }, (arraySize >= 0 && { minItems: arraySize, maxItems: arraySize }));\n lastSchema.items.push(item);\n }\n else if (Array.isArray(lastSchema.items)) {\n // Array of non-tuple items\n lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n }\n else {\n // Nested object\n lastSchema.items.push(Object.assign({ $id: abiName }, convertEthType(abiType)));\n }\n lastSchema = schema;\n }\n return schema;\n};\nexport const ethAbiToJsonSchema = (abis) => abiSchemaToJsonSchema(abis);\nexport const fetchArrayElement = (data, level) => {\n if (level === 1) {\n return data;\n }\n return fetchArrayElement(data[0], level - 1);\n};\nexport const transformJsonDataToAbiFormat = (abis, data, transformedData) => {\n const newData = [];\n for (const [index, abi] of abis.entries()) {\n // eslint-disable-next-line no-nested-ternary\n let abiType;\n let abiName;\n let abiComponents = [];\n // If it's a complete Abi Parameter\n // e.g. {name: 'a', type: 'uint'}\n if (isAbiParameterSchema(abi)) {\n abiType = abi.type;\n abiName = abi.name;\n abiComponents = abi.components;\n // If its short form string value e.g. ['uint']\n }\n else if (typeof abi === 'string') {\n abiType = abi;\n // If it's provided in short form of tuple e.g. [['uint', 'string']]\n }\n else if (Array.isArray(abi)) {\n // If its custom tuple e.g. ['tuple[2]', ['uint', 'string']]\n if (abi[1] && Array.isArray(abi[1])) {\n abiType = abi[0];\n abiComponents = abi[1];\n }\n else {\n abiType = 'tuple';\n abiComponents = abi;\n }\n }\n const { baseType, isArray, arraySizes } = parseBaseType(abiType);\n const dataItem = Array.isArray(data)\n ? data[index]\n : data[abiName];\n if (baseType === 'tuple' && !isArray) {\n newData.push(transformJsonDataToAbiFormat(abiComponents, dataItem, transformedData));\n }\n else if (baseType === 'tuple' && isArray) {\n const tupleData = [];\n for (const tupleItem of dataItem) {\n // Nested array\n if (arraySizes.length > 1) {\n const nestedItems = fetchArrayElement(tupleItem, arraySizes.length - 1);\n const nestedData = [];\n for (const nestedItem of nestedItems) {\n nestedData.push(transformJsonDataToAbiFormat(abiComponents, nestedItem, transformedData));\n }\n tupleData.push(nestedData);\n }\n else {\n tupleData.push(transformJsonDataToAbiFormat(abiComponents, tupleItem, transformedData));\n }\n }\n newData.push(tupleData);\n }\n else {\n newData.push(dataItem);\n }\n }\n // Have to reassign before pushing to transformedData\n // eslint-disable-next-line no-param-reassign\n transformedData = transformedData !== null && transformedData !== void 0 ? transformedData : [];\n transformedData.push(...newData);\n return transformedData;\n};\n/**\n * Code points to int\n */\nexport const codePointToInt = (codePoint) => {\n if (codePoint >= 48 && codePoint <= 57) {\n /* ['0'..'9'] -> [0..9] */\n return codePoint - 48;\n }\n if (codePoint >= 65 && codePoint <= 70) {\n /* ['A'..'F'] -> [10..15] */\n return codePoint - 55;\n }\n if (codePoint >= 97 && codePoint <= 102) {\n /* ['a'..'f'] -> [10..15] */\n return codePoint - 87;\n }\n throw new Error(`Invalid code point: ${codePoint}`);\n};\n/**\n * Converts value to it's number representation\n */\nexport const hexToNumber = (value) => {\n if (!isHexStrict(value)) {\n throw new Error('Invalid hex string');\n }\n const [negative, hexValue] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n const num = BigInt(hexValue);\n if (num > Number.MAX_SAFE_INTEGER) {\n return negative ? -num : num;\n }\n if (num < Number.MIN_SAFE_INTEGER) {\n return num;\n }\n return negative ? -1 * Number(num) : Number(num);\n};\n/**\n * Converts value to it's hex representation\n */\nexport const numberToHex = (value) => {\n if ((typeof value === 'number' || typeof value === 'bigint') && value < 0) {\n return `-0x${value.toString(16).slice(1)}`;\n }\n if ((typeof value === 'number' || typeof value === 'bigint') && value >= 0) {\n return `0x${value.toString(16)}`;\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n const [negative, hex] = value.startsWith('-') ? [true, value.slice(1)] : [false, value];\n const hexValue = hex.split(/^(-)?0(x|X)/).slice(-1)[0];\n return `${negative ? '-' : ''}0x${hexValue.replace(/^0+/, '').toLowerCase()}`;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return numberToHex(BigInt(value));\n }\n throw new InvalidNumberError(value);\n};\n/**\n * Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string.\n */\nexport const padLeft = (value, characterAmount, sign = '0') => {\n if (typeof value === 'string' && !isHexStrict(value)) {\n return value.padStart(characterAmount, sign);\n }\n const hex = typeof value === 'string' && isHexStrict(value) ? value : numberToHex(value);\n const [prefix, hexValue] = hex.startsWith('-') ? ['-0x', hex.slice(3)] : ['0x', hex.slice(2)];\n return `${prefix}${hexValue.padStart(characterAmount, sign)}`;\n};\nexport function uint8ArrayToHexString(uint8Array) {\n let hexString = '0x';\n for (const e of uint8Array) {\n const hex = e.toString(16);\n hexString += hex.length === 1 ? `0${hex}` : hex;\n }\n return hexString;\n}\n// for optimized technique for hex to bytes conversion\nconst charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102,\n};\nfunction charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return undefined;\n}\nexport function hexToUint8Array(hex) {\n let offset = 0;\n if (hex.startsWith('0') && (hex[1] === 'x' || hex[1] === 'X')) {\n offset = 2;\n }\n if (hex.length % 2 !== 0) {\n throw new InvalidBytesError(`hex string has odd length: ${hex}`);\n }\n const length = (hex.length - offset) / 2;\n const bytes = new Uint8Array(length);\n for (let index = 0, j = offset; index < length; index += 1) {\n // eslint-disable-next-line no-plusplus\n const nibbleLeft = charCodeToBase16(hex.charCodeAt(j++));\n // eslint-disable-next-line no-plusplus\n const nibbleRight = charCodeToBase16(hex.charCodeAt(j++));\n if (nibbleLeft === undefined || nibbleRight === undefined) {\n throw new InvalidBytesError(`Invalid byte sequence (\"${hex[j - 2]}${hex[j - 1]}\" in \"${hex}\").`);\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n}\n// @TODO: Remove this function and its usages once all sub dependencies uses version 1.3.3 or above of @noble/hashes\nexport function ensureIfUint8Array(data) {\n var _a;\n if (!(data instanceof Uint8Array) &&\n ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array') {\n return Uint8Array.from(data);\n }\n return data;\n}\n//# sourceMappingURL=utils.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { hexToUint8Array, parseBaseType } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * checks input if typeof data is valid Uint8Array input\n */\nexport const isUint8Array = (data) => { var _a; return data instanceof Uint8Array || ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array'; };\nexport const isBytes = (value, options = {\n abiType: 'bytes',\n}) => {\n if (typeof value !== 'string' && !Array.isArray(value) && !isUint8Array(value)) {\n return false;\n }\n // isHexStrict also accepts - prefix which can not exists in bytes\n if (typeof value === 'string' && isHexStrict(value) && value.startsWith('-')) {\n return false;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return false;\n }\n let valueToCheck;\n if (typeof value === 'string') {\n if (value.length % 2 !== 0) {\n // odd length hex\n return false;\n }\n valueToCheck = hexToUint8Array(value);\n }\n else if (Array.isArray(value)) {\n if (value.some(d => d < 0 || d > 255 || !Number.isInteger(d))) {\n return false;\n }\n valueToCheck = new Uint8Array(value);\n }\n else {\n valueToCheck = value;\n }\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize } = parseBaseType(options.abiType);\n return baseTypeSize ? valueToCheck.length === baseTypeSize : true;\n }\n if (options === null || options === void 0 ? void 0 : options.size) {\n return valueToCheck.length === (options === null || options === void 0 ? void 0 : options.size);\n }\n return true;\n};\n//# sourceMappingURL=bytes.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { utf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { ensureIfUint8Array, uint8ArrayToHexString } from '../utils.js';\nimport { isHexStrict } from './string.js';\nimport { isUint8Array } from './bytes.js';\n/**\n * Checks the checksum of a given address. Will also return false on non-checksum addresses.\n */\nexport const checkAddressCheckSum = (data) => {\n if (!/^(0x)?[0-9a-f]{40}$/i.test(data))\n return false;\n const address = data.slice(2);\n const updatedData = utf8ToBytes(address.toLowerCase());\n const addressHash = uint8ArrayToHexString(keccak256(ensureIfUint8Array(updatedData))).slice(2);\n for (let i = 0; i < 40; i += 1) {\n // the nth letter should be uppercase if the nth digit of casemap is 1\n if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) ||\n (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {\n return false;\n }\n }\n return true;\n};\n/**\n * Checks if a given string is a valid Ethereum address. It will also check the checksum, if the address has upper and lowercase letters.\n */\nexport const isAddress = (value, checkChecksum = true) => {\n if (typeof value !== 'string' && !isUint8Array(value)) {\n return false;\n }\n let valueToCheck;\n if (isUint8Array(value)) {\n valueToCheck = uint8ArrayToHexString(value);\n }\n else if (typeof value === 'string' && !isHexStrict(value)) {\n valueToCheck = value.toLowerCase().startsWith('0x') ? value : `0x${value}`;\n }\n else {\n valueToCheck = value;\n }\n // check if it has the basic requirements of an address\n if (!/^(0x)?[0-9a-f]{40}$/i.test(valueToCheck)) {\n return false;\n }\n // If it's ALL lowercase or ALL upppercase\n if (/^(0x|0X)?[0-9a-f]{40}$/.test(valueToCheck) ||\n /^(0x|0X)?[0-9A-F]{40}$/.test(valueToCheck)) {\n return true;\n // Otherwise check each case\n }\n return checkChecksum ? checkAddressCheckSum(valueToCheck) : true;\n};\n//# sourceMappingURL=address.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport var FMT_NUMBER;\n(function (FMT_NUMBER) {\n FMT_NUMBER[\"NUMBER\"] = \"NUMBER_NUMBER\";\n FMT_NUMBER[\"HEX\"] = \"NUMBER_HEX\";\n FMT_NUMBER[\"STR\"] = \"NUMBER_STR\";\n FMT_NUMBER[\"BIGINT\"] = \"NUMBER_BIGINT\";\n})(FMT_NUMBER || (FMT_NUMBER = {}));\nexport var FMT_BYTES;\n(function (FMT_BYTES) {\n FMT_BYTES[\"HEX\"] = \"BYTES_HEX\";\n FMT_BYTES[\"UINT8ARRAY\"] = \"BYTES_UINT8ARRAY\";\n})(FMT_BYTES || (FMT_BYTES = {}));\nexport const DEFAULT_RETURN_FORMAT = { number: FMT_NUMBER.BIGINT, bytes: FMT_BYTES.HEX };\nexport const ETH_DATA_FORMAT = { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX };\n//# sourceMappingURL=data_format_types.js.map","export var BlockTags;\n(function (BlockTags) {\n BlockTags[\"EARLIEST\"] = \"earliest\";\n BlockTags[\"LATEST\"] = \"latest\";\n BlockTags[\"PENDING\"] = \"pending\";\n BlockTags[\"SAFE\"] = \"safe\";\n BlockTags[\"FINALIZED\"] = \"finalized\";\n})(BlockTags || (BlockTags = {}));\n// This list of hardforks is expected to be in order\n// keep this in mind when making changes to it\nexport var HardforksOrdered;\n(function (HardforksOrdered) {\n HardforksOrdered[\"chainstart\"] = \"chainstart\";\n HardforksOrdered[\"frontier\"] = \"frontier\";\n HardforksOrdered[\"homestead\"] = \"homestead\";\n HardforksOrdered[\"dao\"] = \"dao\";\n HardforksOrdered[\"tangerineWhistle\"] = \"tangerineWhistle\";\n HardforksOrdered[\"spuriousDragon\"] = \"spuriousDragon\";\n HardforksOrdered[\"byzantium\"] = \"byzantium\";\n HardforksOrdered[\"constantinople\"] = \"constantinople\";\n HardforksOrdered[\"petersburg\"] = \"petersburg\";\n HardforksOrdered[\"istanbul\"] = \"istanbul\";\n HardforksOrdered[\"muirGlacier\"] = \"muirGlacier\";\n HardforksOrdered[\"berlin\"] = \"berlin\";\n HardforksOrdered[\"london\"] = \"london\";\n HardforksOrdered[\"altair\"] = \"altair\";\n HardforksOrdered[\"arrowGlacier\"] = \"arrowGlacier\";\n HardforksOrdered[\"grayGlacier\"] = \"grayGlacier\";\n HardforksOrdered[\"bellatrix\"] = \"bellatrix\";\n HardforksOrdered[\"merge\"] = \"merge\";\n HardforksOrdered[\"capella\"] = \"capella\";\n HardforksOrdered[\"shanghai\"] = \"shanghai\";\n})(HardforksOrdered || (HardforksOrdered = {}));\n//# sourceMappingURL=eth_types.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { parseBaseType, hexToNumber } from '../utils.js';\nimport { isHexStrict } from './string.js';\n/**\n * Checks if a given value is a valid big int\n */\nexport const isBigInt = (value) => typeof value === 'bigint';\n// Note: this could be simplified using ** operator, but babel does not handle it well\n// \tyou can find more at: https://github.com/babel/babel/issues/13109 and https://github.com/web3/web3.js/issues/6187\n/** @internal */\nexport const bigintPower = (base, expo) => {\n let res = base;\n for (let index = 1; index < expo; index += 1) {\n res *= base;\n }\n return res;\n};\nexport const isUInt = (value, options = {\n abiType: 'uint',\n}) => {\n if (!['number', 'string', 'bigint'].includes(typeof value) ||\n (typeof value === 'string' && value.length === 0)) {\n return false;\n }\n let size;\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize } = parseBaseType(options.abiType);\n if (baseTypeSize) {\n size = baseTypeSize;\n }\n }\n else if (options.bitSize) {\n size = options.bitSize;\n }\n const maxSize = bigintPower(BigInt(2), BigInt(size !== null && size !== void 0 ? size : 256)) - BigInt(1);\n try {\n const valueToCheck = typeof value === 'string' && isHexStrict(value)\n ? BigInt(hexToNumber(value))\n : BigInt(value);\n return valueToCheck >= 0 && valueToCheck <= maxSize;\n }\n catch (error) {\n // Some invalid number value given which can not be converted via BigInt\n return false;\n }\n};\nexport const isInt = (value, options = {\n abiType: 'int',\n}) => {\n if (!['number', 'string', 'bigint'].includes(typeof value)) {\n return false;\n }\n if (typeof value === 'number' && value > Number.MAX_SAFE_INTEGER) {\n return false;\n }\n let size;\n if (options === null || options === void 0 ? void 0 : options.abiType) {\n const { baseTypeSize, baseType } = parseBaseType(options.abiType);\n if (baseType !== 'int') {\n return false;\n }\n if (baseTypeSize) {\n size = baseTypeSize;\n }\n }\n else if (options.bitSize) {\n size = options.bitSize;\n }\n const maxSize = bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n const minSize = BigInt(-1) * bigintPower(BigInt(2), BigInt((size !== null && size !== void 0 ? size : 256) - 1));\n try {\n const valueToCheck = typeof value === 'string' && isHexStrict(value)\n ? BigInt(hexToNumber(value))\n : BigInt(value);\n return valueToCheck >= minSize && valueToCheck <= maxSize;\n }\n catch (error) {\n // Some invalid number value given which can not be converted via BigInt\n return false;\n }\n};\nexport const isNumber = (value) => {\n if (isInt(value)) {\n return true;\n }\n // It would be a decimal number\n if (typeof value === 'string' &&\n /[0-9.]/.test(value) &&\n value.indexOf('.') === value.lastIndexOf('.')) {\n return true;\n }\n if (typeof value === 'number') {\n return true;\n }\n return false;\n};\n//# sourceMappingURL=numbers.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { BlockTags } from 'web3-types';\nimport { isUInt } from './numbers.js';\nexport const isBlockNumber = (value) => isUInt(value);\n/**\n * Returns true if the given blockNumber is 'latest', 'pending', 'earliest, 'safe' or 'finalized'\n */\nexport const isBlockTag = (value) => Object.values(BlockTags).includes(value);\n/**\n * Returns true if given value is valid hex string and not negative, or is a valid BlockTag\n */\nexport const isBlockNumberOrTag = (value) => isBlockTag(value) || isBlockNumber(value);\n//# sourceMappingURL=block.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { codePointToInt, hexToUint8Array, padLeft, uint8ArrayToHexString } from '../utils.js';\nimport { isAddress } from './address.js';\nimport { isHexStrict } from './string.js';\n/**\n * Returns true if the bloom is a valid bloom\n * https://github.com/joshstevens19/ethereum-bloom-filters/blob/fbeb47b70b46243c3963fe1c2988d7461ef17236/src/index.ts#L7\n */\nexport const isBloom = (bloom) => {\n if (typeof bloom !== 'string') {\n return false;\n }\n if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) {\n return false;\n }\n if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if the value is part of the given bloom\n * note: false positives are possible.\n */\nexport const isInBloom = (bloom, value) => {\n if (typeof value === 'string' && !isHexStrict(value)) {\n return false;\n }\n if (!isBloom(bloom)) {\n return false;\n }\n const uint8Array = typeof value === 'string' ? hexToUint8Array(value) : value;\n const hash = uint8ArrayToHexString(keccak256(uint8Array)).slice(2);\n for (let i = 0; i < 12; i += 4) {\n // calculate bit position in bloom filter that must be active\n const bitpos = \n // eslint-disable-next-line no-bitwise\n ((parseInt(hash.slice(i, i + 2), 16) << 8) + parseInt(hash.slice(i + 2, i + 4), 16)) &\n 2047;\n // test if bitpos in bloom is active\n const code = codePointToInt(bloom.charCodeAt(bloom.length - 1 - Math.floor(bitpos / 4)));\n // eslint-disable-next-line no-bitwise\n const offset = 1 << bitpos % 4;\n // eslint-disable-next-line no-bitwise\n if ((code & offset) !== offset) {\n return false;\n }\n }\n return true;\n};\n/**\n * Returns true if the ethereum users address is part of the given bloom note: false positives are possible.\n */\nexport const isUserEthereumAddressInBloom = (bloom, ethereumAddress) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isAddress(ethereumAddress)) {\n return false;\n }\n // you have to pad the ethereum address to 32 bytes\n // else the bloom filter does not work\n // this is only if your matching the USERS\n // ethereum address. Contract address do not need this\n // hence why we have 2 methods\n // (0x is not in the 2nd parameter of padleft so 64 chars is fine)\n const address = padLeft(ethereumAddress, 64);\n return isInBloom(bloom, address);\n};\n/**\n * Returns true if the contract address is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isContractAddressInBloom = (bloom, contractAddress) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isAddress(contractAddress)) {\n return false;\n }\n return isInBloom(bloom, contractAddress);\n};\n//# sourceMappingURL=bloom.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isHexStrict } from './string.js';\nexport const isBoolean = (value) => {\n if (!['number', 'string', 'boolean'].includes(typeof value)) {\n return false;\n }\n if (typeof value === 'boolean') {\n return true;\n }\n if (typeof value === 'string' && !isHexStrict(value)) {\n return value === '1' || value === '0';\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n return value === '0x1' || value === '0x0';\n }\n // type === number\n return value === 1 || value === 0;\n};\n//# sourceMappingURL=boolean.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { TypedArray } from 'web3-types';\n// Explicitly check for the\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isNullish = (item) => \n// Using \"null\" value intentionally for validation\n// eslint-disable-next-line no-null/no-null\nitem === undefined || item === null;\nexport const isObject = (item) => typeof item === 'object' &&\n !isNullish(item) &&\n !Array.isArray(item) &&\n !(item instanceof TypedArray);\n//# sourceMappingURL=object.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isBloom, isInBloom } from './bloom.js';\n/**\n * Checks if its a valid topic\n */\nexport const isTopic = (topic) => {\n if (typeof topic !== 'string') {\n return false;\n }\n if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) {\n return false;\n }\n if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if the topic is part of the given bloom.\n * note: false positives are possible.\n */\nexport const isTopicInBloom = (bloom, topic) => {\n if (!isBloom(bloom)) {\n return false;\n }\n if (!isTopic(topic)) {\n return false;\n }\n return isInBloom(bloom, topic);\n};\n//# sourceMappingURL=topic.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { isAddress } from './address.js';\nimport { isBlockNumberOrTag } from './block.js';\nimport { isNullish } from './object.js';\nimport { isTopic } from './topic.js';\n/**\n * First we check if all properties in the provided value are expected,\n * then because all Filter properties are optional, we check if the expected properties\n * are defined. If defined and they're not the expected type, we immediately return false,\n * otherwise we return true after all checks pass.\n */\nexport const isFilterObject = (value) => {\n const expectedFilterProperties = [\n 'fromBlock',\n 'toBlock',\n 'address',\n 'topics',\n 'blockHash',\n ];\n if (isNullish(value) || typeof value !== 'object')\n return false;\n if (!Object.keys(value).every(property => expectedFilterProperties.includes(property)))\n return false;\n if ((!isNullish(value.fromBlock) && !isBlockNumberOrTag(value.fromBlock)) ||\n (!isNullish(value.toBlock) && !isBlockNumberOrTag(value.toBlock)))\n return false;\n if (!isNullish(value.address)) {\n if (Array.isArray(value.address)) {\n if (!value.address.every(address => isAddress(address)))\n return false;\n }\n else if (!isAddress(value.address))\n return false;\n }\n if (!isNullish(value.topics)) {\n if (!value.topics.every(topic => {\n if (isNullish(topic))\n return true;\n if (Array.isArray(topic)) {\n return topic.every(nestedTopic => isTopic(nestedTopic));\n }\n if (isTopic(topic))\n return true;\n return false;\n }))\n return false;\n }\n return true;\n};\n//# sourceMappingURL=filter.js.map","import { isAddress } from './validation/address.js';\nimport { isBlockNumber, isBlockNumberOrTag, isBlockTag } from './validation/block.js';\nimport { isBloom } from './validation/bloom.js';\nimport { isBoolean } from './validation/boolean.js';\nimport { isBytes } from './validation/bytes.js';\nimport { isFilterObject } from './validation/filter.js';\nimport { isHexStrict, isString } from './validation/string.js';\nimport { isNumber, isInt, isUInt } from './validation/numbers.js';\nconst formats = {\n address: (data) => isAddress(data),\n bloom: (data) => isBloom(data),\n blockNumber: (data) => isBlockNumber(data),\n blockTag: (data) => isBlockTag(data),\n blockNumberOrTag: (data) => isBlockNumberOrTag(data),\n bool: (data) => isBoolean(data),\n bytes: (data) => isBytes(data),\n filter: (data) => isFilterObject(data),\n hex: (data) => isHexStrict(data),\n uint: (data) => isUInt(data),\n int: (data) => isInt(data),\n number: (data) => isNumber(data),\n string: (data) => isString(data),\n};\n// generate formats for all numbers types\nfor (let bitSize = 8; bitSize <= 256; bitSize += 8) {\n formats[`int${bitSize}`] = data => isInt(data, { bitSize });\n formats[`uint${bitSize}`] = data => isUInt(data, { bitSize });\n}\n// generate bytes\nfor (let size = 1; size <= 32; size += 1) {\n formats[`bytes${size}`] = data => isBytes(data, { size });\n}\nformats.bytes256 = formats.bytes;\nexport default formats;\n//# sourceMappingURL=formats.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { SchemaFormatError } from 'web3-errors';\nimport { z, ZodIssueCode } from 'zod';\nimport { Web3ValidatorError } from './errors.js';\nimport formats from './formats.js';\nconst convertToZod = (schema) => {\n if ((!(schema === null || schema === void 0 ? void 0 : schema.type) || (schema === null || schema === void 0 ? void 0 : schema.type) === 'object') && (schema === null || schema === void 0 ? void 0 : schema.properties)) {\n const obj = {};\n for (const name of Object.keys(schema.properties)) {\n const zItem = convertToZod(schema.properties[name]);\n if (zItem) {\n obj[name] = zItem;\n }\n }\n if (Array.isArray(schema.required)) {\n return z\n .object(obj)\n .partial()\n .required(schema.required.reduce((acc, v) => (Object.assign(Object.assign({}, acc), { [v]: true })), {}));\n }\n return z.object(obj).partial();\n }\n if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'array' && (schema === null || schema === void 0 ? void 0 : schema.items)) {\n if (Array.isArray(schema.items) && schema.items.length > 1\n && schema.maxItems !== undefined\n && new Set(schema.items.map((item) => item.$id)).size === schema.items.length) {\n const arr = [];\n for (const item of schema.items) {\n const zItem = convertToZod(item);\n if (zItem) {\n arr.push(zItem);\n }\n }\n return z.tuple(arr);\n }\n const nextSchema = Array.isArray(schema.items) ? schema.items[0] : schema.items;\n let zodArraySchema = z.array(convertToZod(nextSchema));\n zodArraySchema = schema.minItems !== undefined ? zodArraySchema.min(schema.minItems) : zodArraySchema;\n zodArraySchema = schema.maxItems !== undefined ? zodArraySchema.max(schema.maxItems) : zodArraySchema;\n return zodArraySchema;\n }\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n return z.union(schema.oneOf.map(oneOfSchema => convertToZod(oneOfSchema)));\n }\n if (schema === null || schema === void 0 ? void 0 : schema.format) {\n if (!formats[schema.format]) {\n throw new SchemaFormatError(schema.format);\n }\n return z.any().refine(formats[schema.format], (value) => ({\n params: { value, format: schema.format },\n }));\n }\n if ((schema === null || schema === void 0 ? void 0 : schema.type) &&\n (schema === null || schema === void 0 ? void 0 : schema.type) !== 'object' &&\n typeof z[String(schema.type)] === 'function') {\n return z[String(schema.type)]();\n }\n return z.object({ data: z.any() }).partial();\n};\nexport class Validator {\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n static factory() {\n if (!Validator.validatorInstance) {\n Validator.validatorInstance = new Validator();\n }\n return Validator.validatorInstance;\n }\n validate(schema, data, options) {\n var _a, _b;\n const zod = convertToZod(schema);\n const result = zod.safeParse(data);\n if (!result.success) {\n const errors = this.convertErrors((_b = (_a = result.error) === null || _a === void 0 ? void 0 : _a.issues) !== null && _b !== void 0 ? _b : []);\n if (errors) {\n if (options === null || options === void 0 ? void 0 : options.silent) {\n return errors;\n }\n throw new Web3ValidatorError(errors);\n }\n }\n return undefined;\n }\n // eslint-disable-next-line class-methods-use-this\n convertErrors(errors) {\n if (errors && Array.isArray(errors) && errors.length > 0) {\n return errors.map((error) => {\n var _a;\n let message;\n let keyword;\n let params;\n let schemaPath;\n schemaPath = error.path.join('/');\n const field = String(error.path[error.path.length - 1]);\n const instancePath = error.path.join('/');\n if (error.code === ZodIssueCode.too_big) {\n keyword = 'maxItems';\n schemaPath = `${instancePath}/maxItems`;\n params = { limit: error.maximum };\n message = `must NOT have more than ${error.maximum} items`;\n }\n else if (error.code === ZodIssueCode.too_small) {\n keyword = 'minItems';\n schemaPath = `${instancePath}/minItems`;\n params = { limit: error.minimum };\n message = `must NOT have fewer than ${error.minimum} items`;\n }\n else if (error.code === ZodIssueCode.custom) {\n const { value, format } = ((_a = error.params) !== null && _a !== void 0 ? _a : {});\n if (typeof value === 'undefined') {\n message = `value at \"/${schemaPath}\" is required`;\n }\n else {\n message = `value \"${\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n typeof value === 'object' ? JSON.stringify(value) : value}\" at \"/${schemaPath}\" must pass \"${format}\" validation`;\n }\n params = { value };\n }\n return {\n keyword: keyword !== null && keyword !== void 0 ? keyword : field,\n instancePath: instancePath ? `/${instancePath}` : '',\n schemaPath: schemaPath ? `#${schemaPath}` : '#',\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params: params !== null && params !== void 0 ? params : { value: error.message },\n message: message !== null && message !== void 0 ? message : error.message,\n };\n });\n }\n return undefined;\n }\n}\n//# sourceMappingURL=validator.js.map","import { Validator } from './validator.js';\nimport { ethAbiToJsonSchema } from './utils.js';\nimport { Web3ValidatorError } from './errors.js';\nexport class Web3Validator {\n constructor() {\n this._validator = Validator.factory();\n }\n validateJSONSchema(schema, data, options) {\n return this._validator.validate(schema, data, options);\n }\n validate(schema, data, options = { silent: false }) {\n var _a, _b;\n const jsonSchema = ethAbiToJsonSchema(schema);\n if (Array.isArray(jsonSchema.items) &&\n ((_a = jsonSchema.items) === null || _a === void 0 ? void 0 : _a.length) === 0 &&\n data.length === 0) {\n return undefined;\n }\n if (Array.isArray(jsonSchema.items) &&\n ((_b = jsonSchema.items) === null || _b === void 0 ? void 0 : _b.length) === 0 &&\n data.length !== 0) {\n throw new Web3ValidatorError([\n {\n instancePath: '/0',\n schemaPath: '/',\n keyword: 'required',\n message: 'empty schema against data can not be validated',\n params: data,\n },\n ]);\n }\n return this._validator.validate(jsonSchema, data, options);\n }\n}\n//# sourceMappingURL=web3_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nimport { Web3Validator } from './web3_validator.js';\nexport const validator = new Web3Validator();\n//# sourceMappingURL=default_validator.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\nexport function isUint8Array(data) {\n var _a;\n return (data instanceof Uint8Array ||\n ((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array');\n}\nexport function uint8ArrayConcat(...parts) {\n const length = parts.reduce((prev, part) => {\n const agg = prev + part.length;\n return agg;\n }, 0);\n const result = new Uint8Array(length);\n let offset = 0;\n for (const part of parts) {\n result.set(part, offset);\n offset += part.length;\n }\n return result;\n}\n/**\n * Returns true if the two passed Uint8Arrays have the same content\n */\nexport function uint8ArrayEquals(a, b) {\n if (a === b) {\n return true;\n }\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (let i = 0; i < a.byteLength; i += 1) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=uint8array.js.map","/*\nThis file is part of web3.js.\n\nweb3.js is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nweb3.js is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with web3.js. If not, see .\n*/\n/**\n * @module Utils\n */\nimport { keccak256 } from 'ethereum-cryptography/keccak.js';\nimport { bytesToUtf8, utf8ToBytes as ecUtf8ToBytes } from 'ethereum-cryptography/utils.js';\nimport { isAddress, isHex, isHexStrict, isInt, isUInt, isNullish, utils, utils as validatorUtils, validator, } from 'web3-validator';\nimport { HexProcessingError, InvalidAddressError, InvalidBooleanError, InvalidBytesError, InvalidNumberError, InvalidUnitError, } from 'web3-errors';\nimport { isUint8Array } from './uint8array.js';\n// Ref: https://ethdocs.org/en/latest/ether.html\n// Note: this could be simplified using ** operator, but babel does not handle it well (https://github.com/babel/babel/issues/13109)\n/** @internal */\nexport const ethUnitMap = {\n noether: BigInt(0),\n wei: BigInt(1),\n kwei: BigInt(1000),\n Kwei: BigInt(1000),\n babbage: BigInt(1000),\n femtoether: BigInt(1000),\n mwei: BigInt(1000000),\n Mwei: BigInt(1000000),\n lovelace: BigInt(1000000),\n picoether: BigInt(1000000),\n gwei: BigInt(1000000000),\n Gwei: BigInt(1000000000),\n shannon: BigInt(1000000000),\n nanoether: BigInt(1000000000),\n nano: BigInt(1000000000),\n szabo: BigInt(1000000000000),\n microether: BigInt(1000000000000),\n micro: BigInt(1000000000000),\n finney: BigInt(1000000000000000),\n milliether: BigInt(1000000000000000),\n milli: BigInt(1000000000000000),\n ether: BigInt('1000000000000000000'),\n kether: BigInt('1000000000000000000000'),\n grand: BigInt('1000000000000000000000'),\n mether: BigInt('1000000000000000000000000'),\n gether: BigInt('1000000000000000000000000000'),\n tether: BigInt('1000000000000000000000000000000'),\n};\n/**\n * Convert a value from bytes to Uint8Array\n * @param data - Data to be converted\n * @returns - The Uint8Array representation of the input data\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToUint8Array(\"0xab\")));\n * > Uint8Array(1) [ 171 ]\n * ```\n */\nexport const bytesToUint8Array = (data) => {\n validator.validate(['bytes'], [data]);\n if (isUint8Array(data)) {\n return data;\n }\n if (Array.isArray(data)) {\n return new Uint8Array(data);\n }\n if (typeof data === 'string') {\n return validatorUtils.hexToUint8Array(data);\n }\n throw new InvalidBytesError(data);\n};\n/**\n * @internal\n */\nconst { uint8ArrayToHexString } = validatorUtils;\n/**\n * Convert a byte array to a hex string\n * @param bytes - Byte array to be converted\n * @returns - The hex string representation of the input byte array\n *\n * @example\n * ```ts\n * console.log(web3.utils.bytesToHex(new Uint8Array([72, 12])));\n * > \"0x480c\"\n *\n */\nexport const bytesToHex = (bytes) => uint8ArrayToHexString(bytesToUint8Array(bytes));\n/**\n * Convert a hex string to a byte array\n * @param hex - Hex string to be converted\n * @returns - The byte array representation of the input hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToBytes('0x74657374'));\n * > Uint8Array(4) [ 116, 101, 115, 116 ]\n * ```\n */\nexport const hexToBytes = (bytes) => {\n if (typeof bytes === 'string' && bytes.slice(0, 2).toLowerCase() !== '0x') {\n return bytesToUint8Array(`0x${bytes}`);\n }\n return bytesToUint8Array(bytes);\n};\n/**\n * Converts value to it's number representation\n * @param value - Hex string to be converted\n * @returns - The number representation of the input value\n *\n * @example\n * ```ts\n * conoslle.log(web3.utils.hexToNumber('0xa'));\n * > 10\n * ```\n */\nexport const hexToNumber = (value) => {\n validator.validate(['hex'], [value]);\n // To avoid duplicate code and circular dependency we will\n // use `hexToNumber` implementation from `web3-validator`\n return validatorUtils.hexToNumber(value);\n};\n/**\n * Converts value to it's number representation @alias `hexToNumber`\n */\nexport const toDecimal = hexToNumber;\n/**\n * Converts value to it's hex representation\n * @param value - Value to be converted\n * @param hexstrict - Add padding to converted value if odd, to make it hexstrict\n * @returns - The hex representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.numberToHex(10));\n * > \"0xa\"\n * ```\n */\nexport const numberToHex = (value, hexstrict) => {\n if (typeof value !== 'bigint')\n validator.validate(['int'], [value]);\n // To avoid duplicate code and circular dependency we will\n // use `numberToHex` implementation from `web3-validator`\n let updatedValue = validatorUtils.numberToHex(value);\n if (hexstrict) {\n if (!updatedValue.startsWith('-') && updatedValue.length % 2 === 1) {\n // To avoid duplicate a circular dependency we will not be using the padLeft method\n updatedValue = '0x0'.concat(updatedValue.slice(2));\n }\n else if (updatedValue.length % 2 === 0 && updatedValue.startsWith('-'))\n updatedValue = '-0x0'.concat(updatedValue.slice(3));\n }\n return updatedValue;\n};\n/**\n * Converts value to it's hex representation @alias `numberToHex`\n *\n */\nexport const fromDecimal = numberToHex;\n/**\n * Converts value to it's decimal representation in string\n * @param value - Hex string to be converted\n * @returns - The decimal representation of the input value\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToNumberString('0xa'));\n * > \"10\"\n * ```\n */\nexport const hexToNumberString = (data) => hexToNumber(data).toString();\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n * @param str - Utf8 string to be converted\n * @returns - The hex representation of the input string\n *\n * @example\n * ```ts\n * console.log(utf8ToHex('web3.js'));\n * > \"0x776562332e6a73\"\n * ```\n *\n */\nexport const utf8ToHex = (str) => {\n validator.validate(['string'], [str]);\n // To be compatible with 1.x trim null character\n // eslint-disable-next-line no-control-regex\n let strWithoutNullCharacter = str.replace(/^(?:\\u0000)/, '');\n // eslint-disable-next-line no-control-regex\n strWithoutNullCharacter = strWithoutNullCharacter.replace(/(?:\\u0000)$/, '');\n return bytesToHex(new TextEncoder().encode(strWithoutNullCharacter));\n};\n/**\n * @alias utf8ToHex\n */\nexport const fromUtf8 = utf8ToHex;\n/**\n * @alias utf8ToHex\n */\nexport const stringToHex = utf8ToHex;\n/**\n * Should be called to get utf8 from it's hex representation\n * @param str - Hex string to be converted\n * @returns - Utf8 string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToUtf8('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToUtf8 = (str) => bytesToUtf8(hexToBytes(str));\n/**\n * @alias hexToUtf8\n */\nexport const toUtf8 = (input) => {\n if (typeof input === 'string') {\n return hexToUtf8(input);\n }\n validator.validate(['bytes'], [input]);\n return bytesToUtf8(input);\n};\nexport const utf8ToBytes = ecUtf8ToBytes;\n/**\n * @alias hexToUtf8\n */\nexport const hexToString = hexToUtf8;\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n * @param str - String to be converted to hex\n * @returns - Hex string\n *\n * @example\n * ```ts\n * console.log(web3.utils.asciiToHex('Hello World'));\n * > 0x48656c6c6f20576f726c64\n * ```\n */\nexport const asciiToHex = (str) => {\n validator.validate(['string'], [str]);\n let hexString = '';\n for (let i = 0; i < str.length; i += 1) {\n const hexCharCode = str.charCodeAt(i).toString(16);\n // might need a leading 0\n hexString += hexCharCode.length % 2 !== 0 ? `0${hexCharCode}` : hexCharCode;\n }\n return `0x${hexString}`;\n};\n/**\n * @alias asciiToHex\n */\nexport const fromAscii = asciiToHex;\n/**\n * Should be called to get ascii from it's hex representation\n * @param str - Hex string to be converted to ascii\n * @returns - Ascii string\n *\n * @example\n * ```ts\n * console.log(web3.utils.hexToAscii('0x48656c6c6f20576f726c64'));\n * > Hello World\n * ```\n */\nexport const hexToAscii = (str) => {\n const decoder = new TextDecoder('ascii');\n return decoder.decode(hexToBytes(str));\n};\n/**\n * @alias hexToAscii\n */\nexport const toAscii = hexToAscii;\n/**\n * Auto converts any given value into it's hex representation.\n * @param value - Value to be converted to hex\n * @param returnType - If true, it will return the type of the value\n *\n * @example\n * ```ts\n * console.log(web3.utils.toHex(10));\n * > 0xa\n *\n * console.log(web3.utils.toHex('0x123', true));\n * > bytes\n *```\n */\nexport const toHex = (value, returnType) => {\n if (typeof value === 'string' && isAddress(value)) {\n return returnType ? 'address' : `0x${value.toLowerCase().replace(/^0x/i, '')}`;\n }\n if (typeof value === 'boolean') {\n // eslint-disable-next-line no-nested-ternary\n return returnType ? 'bool' : value ? '0x01' : '0x00';\n }\n if (typeof value === 'number') {\n // eslint-disable-next-line no-nested-ternary\n return returnType ? (value < 0 ? 'int256' : 'uint256') : numberToHex(value);\n }\n if (typeof value === 'bigint') {\n return returnType ? 'bigint' : numberToHex(value);\n }\n if (typeof value === 'object' && !!value) {\n return returnType ? 'string' : utf8ToHex(JSON.stringify(value));\n }\n if (typeof value === 'string') {\n if (value.startsWith('-0x') || value.startsWith('-0X')) {\n return returnType ? 'int256' : numberToHex(value);\n }\n if (isHexStrict(value)) {\n return returnType ? 'bytes' : value;\n }\n if (isHex(value) && !isInt(value) && !isUInt(value)) {\n return returnType ? 'bytes' : `0x${value}`;\n }\n if (isHex(value) && !isInt(value) && isUInt(value)) {\n return returnType ? 'uint' : numberToHex(value);\n }\n if (!Number.isFinite(value)) {\n return returnType ? 'string' : utf8ToHex(value);\n }\n }\n throw new HexProcessingError(value);\n};\n/**\n * Converts any given value into it's number representation, if possible, else into it's bigint representation.\n * @param value - The value to convert\n * @returns - Returns the value in number or bigint representation\n *\n * @example\n * ```ts\n * console.log(web3.utils.toNumber(1));\n * > 1\n * console.log(web3.utils.toNumber(Number.MAX_SAFE_INTEGER));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER)));\n * > 9007199254740991\n *\n * console.log(web3.utils.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)));\n * > 9007199254740992n\n *\n * ```\n */\nexport const toNumber = (value) => {\n if (typeof value === 'number') {\n if (value > 1e+20) {\n // JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,\n // leading to potential parsing errors and incorrect representations.\n // For instance, String(10000000000000000000000) yields '1e+22'.\n // Using BigInt prevents this\n return BigInt(value);\n }\n return value;\n }\n if (typeof value === 'bigint') {\n return value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER\n ? Number(value)\n : value;\n }\n if (typeof value === 'string' && isHexStrict(value)) {\n return hexToNumber(value);\n }\n try {\n return toNumber(BigInt(value));\n }\n catch (_a) {\n throw new InvalidNumberError(value);\n }\n};\n/**\n * Auto converts any given value into it's bigint representation\n *\n * @param value - The value to convert\n * @returns - Returns the value in bigint representation\n\n * @example\n * ```ts\n * console.log(web3.utils.toBigInt(1));\n * > 1n\n * ```\n */\nexport const toBigInt = (value) => {\n if (typeof value === 'number') {\n return BigInt(value);\n }\n if (typeof value === 'bigint') {\n return value;\n }\n // isHex passes for dec, too\n if (typeof value === 'string' && isHex(value)) {\n if (value.startsWith('-')) {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n }\n throw new InvalidNumberError(value);\n};\n/**\n * Takes a number of wei and converts it to any other ether unit.\n * @param number - The value in wei\n * @param unit - The unit to convert to\n * @returns - Returns the converted value in the given unit\n *\n * @example\n * ```ts\n * console.log(web3.utils.fromWei(\"1\", \"ether\"));\n * > 0.000000000000000001\n *\n * console.log(web3.utils.fromWei(\"1\", \"shannon\"));\n * > 0.000000001\n * ```\n */\nexport const fromWei = (number, unit) => {\n const denomination = ethUnitMap[unit];\n if (!denomination) {\n throw new InvalidUnitError(unit);\n }\n // value in wei would always be integer\n // 13456789, 1234\n const value = String(toNumber(number));\n // count number of zeros in denomination\n // 1000000 -> 6\n const numberOfZerosInDenomination = denomination.toString().length - 1;\n if (numberOfZerosInDenomination <= 0) {\n return value.toString();\n }\n // pad the value with required zeros\n // 13456789 -> 13456789, 1234 -> 001234\n const zeroPaddedValue = value.padStart(numberOfZerosInDenomination, '0');\n // get the integer part of value by counting number of zeros from start\n // 13456789 -> '13'\n // 001234 -> ''\n const integer = zeroPaddedValue.slice(0, -numberOfZerosInDenomination);\n // get the fraction part of value by counting number of zeros backward\n // 13456789 -> '456789'\n // 001234 -> '001234'\n const fraction = zeroPaddedValue.slice(-numberOfZerosInDenomination).replace(/\\.?0+$/, '');\n if (integer === '') {\n return `0.${fraction}`;\n }\n if (fraction === '') {\n return integer;\n }\n return `${integer}.${fraction}`;\n};\n/**\n * Takes a number of a unit and converts it to wei.\n *\n * @param number - The number to convert.\n * @param unit - {@link EtherUnits} The unit of the number passed.\n * @returns The number converted to wei.\n *\n * @example\n * ```ts\n * console.log(web3.utils.toWei(\"0.001\", \"ether\"));\n * > 1000000000000000 //(wei)\n * ```\n */\n// todo in 1.x unit defaults to 'ether'\nexport const toWei = (number, unit) => {\n validator.validate(['number'], [number]);\n const denomination = ethUnitMap[unit];\n if (!denomination) {\n throw new InvalidUnitError(unit);\n }\n // if value is decimal e.g. 24.56 extract `integer` and `fraction` part\n // to avoid `fraction` to be null use `concat` with empty string\n const [integer, fraction] = String(typeof number === 'string' && !isHexStrict(number) ? number : toNumber(number))\n .split('.')\n .concat('');\n // join the value removing `.` from\n // 24.56 -> 2456\n const value = BigInt(`${integer}${fraction}`);\n // multiply value with denomination\n // 2456 * 1000000 -> 2456000000\n const updatedValue = value * denomination;\n // count number of zeros in denomination\n const numberOfZerosInDenomination = denomination.toString().length - 1;\n // check which either `fraction` or `denomination` have lower number of zeros\n const decimals = Math.min(fraction.length, numberOfZerosInDenomination);\n if (decimals === 0) {\n return updatedValue.toString();\n }\n // Add zeros to make length equal to required decimal points\n // If string is larger than decimal points required then remove last zeros\n return updatedValue.toString().padStart(decimals, '0').slice(0, -decimals);\n};\n/**\n * Will convert an upper or lowercase Ethereum address to a checksum address.\n * @param address - An address string\n * @returns\tThe checksum address\n * @example\n * ```ts\n * web3.utils.toChecksumAddress('0xc1912fee45d61c87cc5ea59dae31190fffff232d');\n * > \"0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d\"\n * ```\n */\nexport const toChecksumAddress = (address) => {\n if (!isAddress(address, false)) {\n throw new InvalidAddressError(address);\n }\n const lowerCaseAddress = address.toLowerCase().replace(/^0x/i, '');\n // calling `Uint8Array.from` because `noble-hashes` checks with `instanceof Uint8Array` that fails in some edge cases:\n // \thttps://github.com/paulmillr/noble-hashes/issues/25#issuecomment-1750106284\n const hash = utils.uint8ArrayToHexString(keccak256(validatorUtils.ensureIfUint8Array(utf8ToBytes(lowerCaseAddress))));\n if (isNullish(hash) ||\n hash === '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470')\n return ''; // // EIP-1052 if hash is equal to c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, keccak was given empty data\n let checksumAddress = '0x';\n const addressHash = hash.replace(/^0x/i, '');\n for (let i = 0; i < lowerCaseAddress.length; i += 1) {\n // If ith character is 8 to f then make it uppercase\n if (parseInt(addressHash[i], 16) > 7) {\n checksumAddress += lowerCaseAddress[i].toUpperCase();\n }\n else {\n checksumAddress += lowerCaseAddress[i];\n }\n }\n return checksumAddress;\n};\nexport const toBool = (value) => {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'number' && (value === 0 || value === 1)) {\n return Boolean(value);\n }\n if (typeof value === 'bigint' && (value === BigInt(0) || value === BigInt(1))) {\n return Boolean(value);\n }\n if (typeof value === 'string' &&\n !isHexStrict(value) &&\n (value === '1' || value === '0' || value === 'false' || value === 'true')) {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n return Boolean(Number(value));\n }\n if (typeof value === 'string' && isHexStrict(value) && (value === '0x1' || value === '0x0')) {\n return Boolean(toNumber(value));\n }\n throw new InvalidBooleanError(value);\n};\n//# sourceMappingURL=converters.js.map","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\nvar\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n/*\r\n * Create and return a BigNumber constructor.\r\n */\r\nfunction clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n P[Symbol.toStringTag] = 'BigNumber';\r\n\r\n // Node.js v10.12.0+\r\n P[Symbol.for('nodejs.util.inspect.custom')] = P.valueOf;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n}\r\n\r\n\r\n// PRIVATE HELPER FUNCTIONS\r\n\r\n// These functions don't need access to variables,\r\n// e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\nfunction bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n}\r\n\r\n\r\n// Return a coefficient array as a string of base 10 digits.\r\nfunction coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n}\r\n\r\n\r\n// Compare the value of BigNumbers x and y.\r\nfunction compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n}\r\n\r\n\r\n/*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\nfunction intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n}\r\n\r\n\r\n// Assumes finite n.\r\nfunction isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n}\r\n\r\n\r\nfunction toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n}\r\n\r\n\r\nfunction toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n}\r\n\r\n\r\n// EXPORT\r\n\r\n\r\nexport var BigNumber = clone();\r\n\r\nexport default BigNumber;\r\n","'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n","import { toHex } from 'web3-utils'\nimport BigNumber from 'bignumber.js'\nimport { WebSocket as NodeWebSocket, type ErrorEvent } from 'ws'\n\nconst BASE58_ALPHABET: string = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\n/**\n * Converts the decimal to hexadecimal\n */\nexport const numberToHex = (value: number | string | BigNumber, decimals: number): string => {\n const length = '1' + '0'.repeat(decimals)\n const newValue = new BigNumber(value.toString(10), 10)\n return toHex(newValue.times(length).toString(16))\n}\n\n/**\n * Converts the hexadecimal to decimal\n */\nexport const hexToNumber = (value: string, decimals: number): number => {\n const length = '1' + '0'.repeat(decimals)\n const newValue = new BigNumber(value.toString(), 10)\n return parseFloat(newValue.dividedBy(length).toString())\n}\n\n/**\n * Converts the given data to Base58 string. Given data may be string or an Uint8Array\n * If the given data is a string, it'll be converted to Uint8Array inside of the method\n */\nexport const base58Encode = (input: Uint8Array | string): string => {\n // Convert input to bytes if it's a string\n if (typeof input === 'string') input = new Uint8Array(Buffer.from(input))\n\n const base58Array: string[] = []\n\n // Convert the byte array to a BigInt\n let value = BigInt('0x' + Buffer.from(input).toString('hex'))\n\n // Base58 encoding\n while (value > BigInt(0)) {\n const remainder = Number(value % BigInt(58))\n base58Array.unshift(BASE58_ALPHABET[remainder])\n value = value / BigInt(58)\n }\n\n // Add '1' characters for leading zero bytes\n for (let i = 0; i < input.length; i++) {\n if (input[i] !== 0) break\n base58Array.unshift(BASE58_ALPHABET[0])\n }\n\n return base58Array.join('')\n}\n\n/**\n * Converts the given string to Base58 as an Uint8Array\n */\nexport const base58Decode = (input: string): Uint8Array => {\n let value = BigInt(0)\n\n for (let i = 0; i < input.length; i++)\n value = value * BigInt(58) + BigInt(BASE58_ALPHABET.indexOf(input[i]))\n\n const valueHex: string = value.toString(16)\n\n // Make the string's length even\n const hexString = valueHex.length % 2 === 0 ? valueHex : '0' + valueHex\n\n return new Uint8Array(Buffer.from(hexString, 'hex'))\n}\n\n/**\n * Converts the given buffer to a string\n */\nexport const bufferToString = (input: Buffer): string => {\n return Buffer.from(input).toString('utf8')\n}\n\n/**\n * Converts the given string to a buffer\n */\nexport const stringToBuffer = (input: string): Buffer => {\n return Buffer.from(input, 'utf8')\n}\n\n/**\n * Checks if given value is numeric\n */\nexport const isNumeric = (value: string | number): boolean => {\n return !isNaN(Number(value))\n}\n\n/**\n * Sleeps the given milliseconds\n * @param {number} ms\n * @returns Promise\n */\nexport const sleep = async (ms: number): Promise => {\n await new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Checks if the given objects are equal\n * @param {object} o1\n * @param {object} o2\n * @returns boolean\n */\nexport const objectsEqual = (o1: object, o2: object): boolean => {\n return JSON.stringify(o1) === JSON.stringify(o2)\n}\n\n/**\n * Converts the given number to a readable string\n * @param {number} num\n * @returns string\n */\nexport const toReadableString = (num: number): string => {\n const [coefficient, exponent] = num\n .toExponential()\n .split('e')\n .map((item) => parseFloat(item))\n\n let result = (coefficient * Math.pow(10, exponent)).toString()\n\n result = parseFloat(result).toString()\n\n return result\n}\n\n/**\n * checks if the given url is a valid websocket url\n * @param {string} url\n * @returns {Promise}\n */\nexport const checkWebSocket = async (url: string): Promise => {\n return await new Promise((resolve, reject) => {\n let socket: WebSocket | NodeWebSocket\n\n if (typeof window !== 'undefined') {\n socket = new WebSocket(url)\n } else {\n socket = new NodeWebSocket(url)\n }\n\n socket.onopen = () => {\n resolve(true)\n socket.close()\n }\n\n socket.onerror = (error: ErrorEvent) => {\n reject(new Error(error.message))\n socket.close()\n }\n })\n}\n\nexport const math = {\n add: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).plus(new BigNumber(b)).toFixed(decimals))\n },\n sub: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).minus(new BigNumber(b)).toFixed(decimals))\n },\n mul: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).times(new BigNumber(b)).toFixed(decimals))\n },\n div: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).div(new BigNumber(b)).toFixed(decimals))\n },\n pow: (a: number, b: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).pow(b).toFixed(decimals))\n },\n sqrt: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).sqrt().toFixed(decimals))\n },\n abs: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).absoluteValue().toFixed(decimals))\n },\n ceil: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_CEIL).toFixed(decimals))\n },\n floor: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_FLOOR).toFixed(decimals))\n },\n round: (a: number, decimals: number = 18): number => {\n return parseFloat(new BigNumber(a).integerValue(BigNumber.ROUND_HALF_UP).toFixed(decimals))\n }\n}\n\ndeclare global {\n interface Window {\n opera?: any\n WebViewJavascriptBridge?: any\n webkit?: any\n }\n interface Navigator {\n standalone?: any\n }\n}\n\nexport const isMobile = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n /* eslint-disable */\n return (function (a) {\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(\n a\n ) ||\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\\\-(n|u)|c55\\/|capi|ccwa|cdm\\\\-|cell|chtm|cldc|cmd\\\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\\\-|_)|g1 u|g560|gene|gf\\\\-5|g\\\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\\\-(m|p|t)|hei\\\\-|hi(pt|ta)|hp( i|ip)|hs\\\\-c|ht(c(\\\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\\\-(20|go|ma)|i230|iac( |\\\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\\\-[a-w])|libw|lynx|m1\\\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\\\-2|po(ck|rt|se)|prox|psio|pt\\\\-g|qa\\\\-a|qc(07|12|21|32|60|\\\\-[2-7]|i\\\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\\\-|oo|p\\\\-)|sdk\\/|se(c(\\\\-|0|1)|47|mc|nd|ri)|sgh\\\\-|shar|sie(\\\\-|m)|sk\\\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\\\-|v\\\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\\\-|tdg\\\\-|tel(i|m)|tim\\\\-|t\\\\-mo|to(pl|sh)|ts(70|m\\\\-|m3|m5)|tx\\\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\\\-|your|zeto|zte\\\\-/i.test(\n a.substr(0, 4)\n )\n ? true\n : false\n })(navigator.userAgent || navigator.vendor || window.opera)\n /* eslint-enable */\n}\n\nexport const isWebview = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n\n const navigator = window.navigator\n\n /* eslint-disable */\n if (window.WebViewJavascriptBridge) {\n return true\n }\n\n if (window.webkit && window.webkit.messageHandlers) {\n return true\n }\n\n if (navigator.userAgent.match(/WebView/i)) {\n return true\n }\n\n const standalone = navigator.standalone\n const userAgent = navigator.userAgent.toLowerCase()\n const safari = /safari/.test(userAgent)\n const ios = /iphone|ipod|ipad/.test(userAgent)\n\n return ios ? !standalone && !safari : userAgent.includes('wv')\n /* eslint-enable */\n}\n\nexport { toHex }\n","/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */\n/**\n * The current version of Ethers.\n */\nexport const version = \"6.13.4\";\n//# sourceMappingURL=_version.js.map","/**\n * Property helper functions.\n *\n * @_subsection api/utils:Properties [about-properties]\n */\nfunction checkType(value, type, name) {\n const types = type.split(\"|\").map(t => t.trim());\n for (let i = 0; i < types.length; i++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof (value) === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n}\n/**\n * Resolves to a new object that is a copy of %%value%%, but with all\n * values resolved.\n */\nexport async function resolveProperties(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k) => Promise.resolve(value[k])));\n return results.reduce((accum, v, index) => {\n accum[keys[index]] = v;\n return accum;\n }, {});\n}\n/**\n * Assigns the %%values%% to %%target%% as read-only values.\n *\n * It %%types%% is specified, the values are checked.\n */\nexport function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = (types ? types[key] : null);\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n}\n//# sourceMappingURL=properties.js.map","/**\n * All errors in ethers include properties to ensure they are both\n * human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``).\n *\n * The [[isError]] function can be used to check the error ``code`` and\n * provide a type guard for the properties present on that error interface.\n *\n * @_section: api/utils/errors:Errors [about-errors]\n */\nimport { version } from \"../_version.js\";\nimport { defineProperties } from \"./properties.js\";\nfunction stringify(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[ \" + (value.map(stringify)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n result += HEX[value[i] >> 4];\n result += HEX[value[i] & 0xf];\n }\n return result;\n }\n if (typeof (value) === \"object\" && typeof (value.toJSON) === \"function\") {\n return stringify(value.toJSON());\n }\n switch (typeof (value)) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"number\":\n return (value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k) => `${stringify(k)}: ${stringify(value[k])}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n}\n/**\n * Returns true if the %%error%% matches an error thrown by ethers\n * that matches the error %%code%%.\n *\n * In TypeScript environments, this can be used to check that %%error%%\n * matches an EthersError type, which means the expected properties will\n * be set.\n *\n * @See [ErrorCodes](api:ErrorCode)\n * @example\n * try {\n * // code....\n * } catch (e) {\n * if (isError(e, \"CALL_EXCEPTION\")) {\n * // The Type Guard has validated this object\n * console.log(e.data);\n * }\n * }\n */\nexport function isError(error, code) {\n return (error && error.code === code);\n}\n/**\n * Returns true if %%error%% is a [[CallExceptionError].\n */\nexport function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n}\n/**\n * Returns a new Error configured to the format ethers emits errors, with\n * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties\n * for the corresponding EthersError.\n *\n * Each error in ethers includes the version of ethers, a\n * machine-readable [[ErrorCode]], and depending on %%code%%, additional\n * required properties. The error message will also include the %%message%%,\n * ethers version, %%code%% and all additional properties, serialized.\n */\nexport function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = (info[key]);\n // try {\n details.push(key + \"=\" + stringify(value));\n // } catch (error: any) {\n // console.log(\"MMM\", error.message);\n // details.push(key + \"=[could not serialize object]\");\n // }\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n defineProperties(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n defineProperties(error, { shortMessage });\n }\n return error;\n}\n/**\n * Throws an EthersError with %%message%%, %%code%% and additional error\n * %%info%% when %%check%% is falsish..\n *\n * @see [[api:makeError]]\n */\nexport function assert(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n}\n/**\n * A simple helper to simply ensuring provided arguments match expected\n * constraints, throwing if not.\n *\n * In TypeScript environments, the %%check%% has been asserted true, so\n * any further code does not need additional compile-time checks.\n */\nexport function assertArgument(check, message, name, value) {\n assert(check, message, \"INVALID_ARGUMENT\", { argument: name, value: value });\n}\nexport function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert(count >= expectedCount, \"missing arguemnt\" + message, \"MISSING_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n assert(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count: count,\n expectedCount: expectedCount\n });\n}\nconst _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n // General test for normalize\n /* c8 ignore start */\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n /* c8 ignore stop */\n if (form === \"NFD\") {\n const check = String.fromCharCode(0xe9).normalize(\"NFD\");\n const expected = String.fromCharCode(0x65, 0x0301);\n /* c8 ignore start */\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n /* c8 ignore stop */\n }\n accum.push(form);\n }\n catch (error) { }\n return accum;\n}, []);\n/**\n * Throws if the normalization %%form%% is not supported.\n */\nexport function assertNormalize(form) {\n assert(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\", info: { form }\n });\n}\n/**\n * Many classes use file-scoped values to guard the constructor,\n * making it effectively private. This facilitates that pattern\n * by ensuring the %%givenGaurd%% matches the file-scoped %%guard%%,\n * throwing if not, indicating the %%className%% if provided.\n */\nexport function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n}\n//# sourceMappingURL=errors.js.map","/**\n * Some data helpers.\n *\n *\n * @_subsection api/utils:Data Helpers [about-data]\n */\nimport { assert, assertArgument } from \"./errors.js\";\nfunction _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof (value) === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i = 0; i < result.length; i++) {\n result[i] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n assertArgument(false, \"invalid BytesLike value\", name || \"value\", value);\n}\n/**\n * Get a typed Uint8Array for %%value%%. If already a Uint8Array\n * the original %%value%% is returned; if a copy is required use\n * [[getBytesCopy]].\n *\n * @see: getBytesCopy\n */\nexport function getBytes(value, name) {\n return _getBytes(value, name, false);\n}\n/**\n * Get a typed Uint8Array for %%value%%, creating a copy if necessary\n * to prevent any modifications of the returned value from being\n * reflected elsewhere.\n *\n * @see: getBytes\n */\nexport function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n}\n/**\n * Returns true if %%value%% is a valid [[HexString]].\n *\n * If %%length%% is ``true`` or a //number//, it also checks that\n * %%value%% is a valid [[DataHexString]] of %%length%% (if a //number//)\n * bytes of data (e.g. ``0x1234`` is 2 bytes).\n */\nexport function isHexString(value, length) {\n if (typeof (value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof (length) === \"number\" && value.length !== 2 + 2 * length) {\n return false;\n }\n if (length === true && (value.length % 2) !== 0) {\n return false;\n }\n return true;\n}\n/**\n * Returns true if %%value%% is a valid representation of arbitrary\n * data (i.e. a valid [[DataHexString]] or a Uint8Array).\n */\nexport function isBytesLike(value) {\n return (isHexString(value, true) || (value instanceof Uint8Array));\n}\nconst HexCharacters = \"0123456789abcdef\";\n/**\n * Returns a [[DataHexString]] representation of %%data%%.\n */\nexport function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i = 0; i < bytes.length; i++) {\n const v = bytes[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n}\n/**\n * Returns a [[DataHexString]] by concatenating all values\n * within %%data%%.\n */\nexport function concat(datas) {\n return \"0x\" + datas.map((d) => hexlify(d).substring(2)).join(\"\");\n}\n/**\n * Returns the length of %%data%%, in bytes.\n */\nexport function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n}\n/**\n * Returns a [[DataHexString]] by slicing %%data%% from the %%start%%\n * offset to the %%end%% offset.\n *\n * By default %%start%% is 0 and %%end%% is the length of %%data%%.\n */\nexport function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n assert(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes, length: bytes.length, offset: end\n });\n }\n return hexlify(bytes.slice((start == null) ? 0 : start, (end == null) ? bytes.length : end));\n}\n/**\n * Return the [[DataHexString]] result by stripping all **leading**\n ** zero bytes from %%data%%.\n */\nexport function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n}\nfunction zeroPad(data, length, left) {\n const bytes = getBytes(data);\n assert(length >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length: length,\n offset: length + 1\n });\n const result = new Uint8Array(length);\n result.fill(0);\n if (left) {\n result.set(bytes, length - bytes.length);\n }\n else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **left**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **values** are in Solidity\n * (e.g. ``uint128``).\n */\nexport function zeroPadValue(data, length) {\n return zeroPad(data, length, true);\n}\n/**\n * Return the [[DataHexString]] of %%data%% padded on the **right**\n * to %%length%% bytes.\n *\n * If %%data%% already exceeds %%length%%, a [[BufferOverrunError]] is\n * thrown.\n *\n * This pads data the same as **bytes** are in Solidity\n * (e.g. ``bytes16``).\n */\nexport function zeroPadBytes(data, length) {\n return zeroPad(data, length, false);\n}\n//# sourceMappingURL=data.js.map","/**\n * Some mathematic operations.\n *\n * @_subsection: api/utils:Math Helpers [about-maths]\n */\nimport { hexlify, isBytesLike } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\n//const BN_Max256 = (BN_1 << BigInt(256)) - BN_1;\n// IEEE 754 support 53-bits of mantissa\nconst maxValue = 0x1fffffffffffff;\n/**\n * Convert %%value%% from a twos-compliment representation of %%width%%\n * bits to its value.\n *\n * If the highest bit is ``1``, the result will be negative.\n */\nexport function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n assert((value >> width) === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\", fault: \"overflow\", value: _value\n });\n // Top bit set; treat as a negative value\n if (value >> (width - BN_1)) {\n const mask = (BN_1 << width) - BN_1;\n return -(((~value) & mask) + BN_1);\n }\n return value;\n}\n/**\n * Convert %%value%% to a twos-compliment representation of\n * %%width%% bits.\n *\n * The result will always be positive.\n */\nexport function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = (BN_1 << (width - BN_1));\n if (value < BN_0) {\n value = -value;\n assert(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n const mask = (BN_1 << width) - BN_1;\n return ((~value) & mask) + BN_1;\n }\n else {\n assert(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\", fault: \"overflow\", value: _value\n });\n }\n return value;\n}\n/**\n * Mask %%value%% with a bitmask of %%bits%% ones.\n */\nexport function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & ((BN_1 << bits) - BN_1);\n}\n/**\n * Gets a BigInt from %%value%%. If it is an invalid value for\n * a BigInt, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getBigInt(value, name) {\n switch (typeof (value)) {\n case \"bigint\": return value;\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n }\n catch (e) {\n assertArgument(false, `invalid BigNumberish string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid BigNumberish value\", name || \"value\", value);\n}\n/**\n * Returns %%value%% as a bigint, validating it is valid as a bigint\n * value and that it is positive.\n */\nexport function getUint(value, name) {\n const result = getBigInt(value, name);\n assert(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\", operation: \"getUint\", value\n });\n return result;\n}\nconst Nibbles = \"0123456789abcdef\";\n/*\n * Converts %%value%% to a BigInt. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data.\n */\nexport function toBigInt(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v of value) {\n result += Nibbles[v >> 4];\n result += Nibbles[v & 0x0f];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n}\n/**\n * Gets a //number// from %%value%%. If it is an invalid value for\n * a //number//, then an ArgumentError will be thrown for %%name%%.\n */\nexport function getNumber(value, name) {\n switch (typeof (value)) {\n case \"bigint\":\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n assertArgument(Number.isInteger(value), \"underflow\", name || \"value\", value);\n assertArgument(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n }\n catch (e) {\n assertArgument(false, `invalid numeric string: ${e.message}`, name || \"value\", value);\n }\n }\n assertArgument(false, \"invalid numeric value\", name || \"value\", value);\n}\n/**\n * Converts %%value%% to a number. If %%value%% is a Uint8Array, it\n * is treated as Big Endian data. Throws if the value is not safe.\n */\nexport function toNumber(value) {\n return getNumber(toBigInt(value));\n}\n/**\n * Converts %%value%% to a Big Endian hexstring, optionally padded to\n * %%width%% bytes.\n */\nexport function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n // Ensure the value is of even length\n if (result.length % 2) {\n result = \"0\" + result;\n }\n }\n else {\n const width = getNumber(_width, \"width\");\n assert(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n // Pad the value to the required width\n while (result.length < (width * 2)) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n}\n/**\n * Converts %%value%% to a Big Endian Uint8Array.\n */\nexport function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i = 0; i < result.length; i++) {\n const offset = i * 2;\n result[i] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n}\n/**\n * Returns a [[HexString]] for %%value%% safe to use as a //Quantity//.\n *\n * A //Quantity// does not have and leading 0 values unless the value is\n * the literal value `0x0`. This is most commonly used for JSSON-RPC\n * numeric values.\n */\nexport function toQuantity(value) {\n let result = hexlify(isBytesLike(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n}\n//# sourceMappingURL=maths.js.map","/**\n * The [Base58 Encoding](link-base58) scheme allows a **numeric** value\n * to be encoded as a compact string using a radix of 58 using only\n * alpha-numeric characters. Confusingly similar characters are omitted\n * (i.e. ``\"l0O\"``).\n *\n * Note that Base58 encodes a **numeric** value, not arbitrary bytes,\n * since any zero-bytes on the left would get removed. To mitigate this\n * issue most schemes that use Base58 choose specific high-order values\n * to ensure non-zero prefixes.\n *\n * @_subsection: api/utils:Base58 Encoding [about-base58]\n */\nimport { getBytes } from \"./data.js\";\nimport { assertArgument } from \"./errors.js\";\nimport { toBigInt } from \"./maths.js\";\nconst Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\nlet Lookup = null;\nfunction getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i = 0; i < Alphabet.length; i++) {\n Lookup[Alphabet[i]] = BigInt(i);\n }\n }\n const result = Lookup[letter];\n assertArgument(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n}\nconst BN_0 = BigInt(0);\nconst BN_58 = BigInt(58);\n/**\n * Encode %%value%% as a Base58-encoded string.\n */\nexport function encodeBase58(_value) {\n const bytes = getBytes(_value);\n let value = toBigInt(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n // Account for leading padding zeros\n for (let i = 0; i < bytes.length; i++) {\n if (bytes[i]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n}\n/**\n * Decode the Base58-encoded %%value%%.\n */\nexport function decodeBase58(value) {\n let result = BN_0;\n for (let i = 0; i < value.length; i++) {\n result *= BN_58;\n result += getAlpha(value[i]);\n }\n return result;\n}\n//# sourceMappingURL=base58.js.map","// utils/base64-browser\nimport { getBytes } from \"./data.js\";\nexport function decodeBase64(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i = 0; i < textData.length; i++) {\n data[i] = textData.charCodeAt(i);\n }\n return getBytes(data);\n}\nexport function encodeBase64(_data) {\n const data = getBytes(_data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n//# sourceMappingURL=base64-browser.js.map","/**\n * Events allow for applications to use the observer pattern, which\n * allows subscribing and publishing events, outside the normal\n * execution paths.\n *\n * @_section api/utils/events:Events [about-events]\n */\nimport { defineProperties } from \"./properties.js\";\n/**\n * When an [[EventEmitterable]] triggers a [[Listener]], the\n * callback always ahas one additional argument passed, which is\n * an **EventPayload**.\n */\nexport class EventPayload {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n defineProperties(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n}\n//# sourceMappingURL=events.js.map","/**\n * Using strings in Ethereum (or any security-basd system) requires\n * additional care. These utilities attempt to mitigate some of the\n * safety issues as well as provide the ability to recover and analyse\n * strings.\n *\n * @_subsection api/utils:Strings and UTF-8 [about-strings]\n */\nimport { getBytes } from \"./data.js\";\nimport { assertArgument, assertNormalize } from \"./errors.js\";\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === \"OVERLONG\") {\n assertArgument(typeof (badCodepoint) === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n/**\n * A handful of popular, built-in UTF-8 error handling strategies.\n *\n * **``\"error\"``** - throws on ANY illegal UTF-8 sequence or\n * non-canonical (overlong) codepoints (this is the default)\n *\n * **``\"ignore\"``** - silently drops any illegal UTF-8 sequence\n * and accepts non-canonical (overlong) codepoints\n *\n * **``\"replace\"``** - replace any illegal UTF-8 sequence with the\n * UTF-8 replacement character (i.e. ``\"\\\\ufffd\"``) and accepts\n * non-canonical (overlong) codepoints\n *\n * @returns: Record<\"error\" | \"ignore\" | \"replace\", Utf8ErrorFunc>\n */\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n const bytes = getBytes(_bytes, \"bytes\");\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(\"UNEXPECTED_CONTINUE\", i - 1, bytes, result);\n }\n else {\n i += onError(\"BAD_PREFIX\", i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(\"OVERRUN\", i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(\"MISSING_CONTINUE\", i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(\"OUT_OF_RANGE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(\"UTF16_SURROGATE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(\"OVERLONG\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n/**\n * Returns the UTF-8 byte representation of %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8Bytes(str, form) {\n assertArgument(typeof (str) === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n assertNormalize(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n assertArgument(i < str.length && ((c2 & 0xfc00) === 0xdc00), \"invalid surrogate pair\", \"str\", str);\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return new Uint8Array(result);\n}\n;\n//export \nfunction _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\n/**\n * Returns the string represented by the UTF-8 data %%bytes%%.\n *\n * When %%onError%% function is specified, it is called on UTF-8\n * errors allowing recovery using the [[Utf8ErrorFunc]] API.\n * (default: [error](Utf8ErrorFuncs))\n */\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n/**\n * Returns the UTF-8 code-points for %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","import { assert, makeError } from \"./errors.js\";\nexport function createGetUrl(options) {\n async function getUrl(req, _signal) {\n assert(_signal == null || !_signal.cancelled, \"request cancelled before sending\", \"CANCELLED\");\n const protocol = req.url.split(\":\")[0].toLowerCase();\n assert(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n assert(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let error = null;\n const controller = new AbortController();\n const timer = setTimeout(() => {\n error = makeError(\"request timeout\", \"TIMEOUT\");\n controller.abort();\n }, req.timeout);\n if (_signal) {\n _signal.addListener(() => {\n error = makeError(\"request cancelled\", \"CANCELLED\");\n controller.abort();\n });\n }\n const init = {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || undefined,\n signal: controller.signal\n };\n let resp;\n try {\n resp = await fetch(req.url, init);\n }\n catch (_error) {\n clearTimeout(timer);\n if (error) {\n throw error;\n }\n throw _error;\n }\n clearTimeout(timer);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = (respBody == null) ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers, body\n };\n }\n return getUrl;\n}\n// @TODO: remove in v7; provided for backwards compat\nconst defaultGetUrl = createGetUrl({});\nexport async function getUrl(req, _signal) {\n return defaultGetUrl(req, _signal);\n}\n//# sourceMappingURL=geturl-browser.js.map","/**\n * Fetching content from the web is environment-specific, so Ethers\n * provides an abstraction that each environment can implement to provide\n * this service.\n *\n * On [Node.js](link-node), the ``http`` and ``https`` libs are used to\n * create a request object, register event listeners and process data\n * and populate the [[FetchResponse]].\n *\n * In a browser, the [DOM fetch](link-js-fetch) is used, and the resulting\n * ``Promise`` is waited on to retrieve the payload.\n *\n * The [[FetchRequest]] is responsible for handling many common situations,\n * such as redirects, server throttling, authentication, etc.\n *\n * It also handles common gateways, such as IPFS and data URIs.\n *\n * @_section api/utils/fetching:Fetching Web Content [about-fetch]\n */\nimport { decodeBase64, encodeBase64 } from \"./base64.js\";\nimport { hexlify } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nimport { defineProperties } from \"./properties.js\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8.js\";\nimport { createGetUrl } from \"./geturl.js\";\nconst MAX_ATTEMPTS = 12;\nconst SLOT_INTERVAL = 250;\n// The global FetchGetUrlFunc implementation.\nlet defaultGetUrlFunc = createGetUrl();\nconst reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\nconst reIpfs = new RegExp(\"^ipfs:/\\/(ipfs/)?(.*)$\", \"i\");\n// If locked, new Gateways cannot be added\nlet locked = false;\n// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs\nasync function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": (match[1] || \"text/plain\"),\n }, (match[2] ? decodeBase64(match[3]) : unpercent(match[3])));\n }\n catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n}\n/**\n * Returns a [[FetchGatewayFunc]] for fetching content from a standard\n * IPFS gateway hosted at %%baseUrl%%.\n */\nfunction getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n }\n catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n}\nconst Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https:/\\/gateway.ipfs.io/ipfs/\")\n};\nconst fetchSignals = new WeakMap();\n/**\n * @_ignore\n */\nexport class FetchCancelSignal {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => { listener(); }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n assert(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() { return this.#cancelled; }\n checkSignal() {\n assert(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n}\n// Check the signal, throwing if it is cancelled\nfunction checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n}\n/**\n * Represents a request for a resource using a URI.\n *\n * By default, the supported schemes are ``HTTP``, ``HTTPS``, ``data:``,\n * and ``IPFS:``.\n *\n * Additional schemes can be added globally using [[registerGateway]].\n *\n * @example:\n * req = new FetchRequest(\"https://www.ricmoo.com\")\n * resp = await req.send()\n * resp.body.length\n * //_result:\n */\nexport class FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() { return this.#url; }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = undefined;\n this.#bodyType = undefined;\n }\n else if (typeof (body) === \"string\") {\n this.#body = toUtf8Bytes(body);\n this.#bodyType = \"text/plain\";\n }\n else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n }\n else if (typeof (body) === \"object\") {\n this.#body = toUtf8Bytes(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n }\n else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return (this.#body != null);\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${encodeBase64(toUtf8Bytes(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index = 0;\n return {\n next: () => {\n if (index < keys.length) {\n const key = keys[index++];\n return {\n value: [key, headers[key]], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n assertArgument(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() { return this.#timeout; }\n set timeout(timeout) {\n assertArgument(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process) {\n this.#process = process;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 300000;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n assert(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\", reason: \"timeout\", request: _request\n });\n if (delay > 0) {\n await wait(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n // Process any Gateways\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n }\n catch (error) {\n // Something went wrong during processing; throw a 5xx server error\n if (error.throttle == null || typeof (error.stall) !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n // Ignore throttling\n }\n }\n return response;\n }\n req = result;\n }\n // We have a preflight function; update the request\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirect\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n }\n catch (error) { }\n // Things won't get any better on another attempt; abort\n return response;\n }\n else if (response.statusCode === 429) {\n // Throttle\n if (this.retryFunc == null || (await this.retryFunc(req, response, attempt))) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof (retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n }\n catch (error) {\n // Something went wrong during processing; throw a 5xx server error\n if (error.throttle == null || typeof (error.stall) !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n // Throttle\n let delay = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n assert(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n assert(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n // Redirection; for now we only support absolute locations\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n // Don't allow redirecting:\n // - non-GET requests\n // - downgrading the security (e.g. https => http)\n // - to non-HTTP (or non-HTTPS) protocols [this could be relaxed?]\n assert(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n // Create a copy of this request, with a new URL\n const req = new FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n // Do not forward credentials unless on the same domain; only absolute\n //req.allowInsecure = false;\n // paths are currently supported; may want a way to specify to forward?\n //setStore(req.#props, \"creds\", getStore(this.#pros, \"creds\"));\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone = new FetchRequest(this.url);\n // Preserve \"default method\" (i.e. null)\n clone.#method = this.#method;\n // Preserve \"default body\" with type, copying the Uint8Array is present\n if (this.#body) {\n clone.#body = this.#body;\n }\n clone.#bodyType = this.#bodyType;\n // Preserve \"default headers\"\n clone.#headers = Object.assign({}, this.#headers);\n // Credentials is readonly, so we copy internally\n clone.#creds = this.#creds;\n if (this.allowGzip) {\n clone.allowGzip = true;\n }\n clone.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone.allowInsecureAuthentication = true;\n }\n clone.#preflight = this.#preflight;\n clone.#process = this.#process;\n clone.#retry = this.#retry;\n clone.#throttle = Object.assign({}, this.#throttle);\n clone.#getUrlFunc = this.#getUrlFunc;\n return clone;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return createGetUrl(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n}\n;\n/**\n * The response for a FetchRequest.\n */\nexport class FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() { return this.#statusCode; }\n /**\n * The response status message.\n */\n get statusMessage() { return this.#statusMessage; }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() { return Object.assign({}, this.#headers); }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return (this.#body == null) ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return (this.#body == null) ? \"\" : toUtf8String(this.#body);\n }\n catch (error) {\n assert(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\", info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n }\n catch (error) {\n assert(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\", info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index = 0;\n return {\n next: () => {\n if (index < keys.length) {\n const key = keys[index++];\n return {\n value: [key, headers[key]], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k) => {\n accum[k.toLowerCase()] = String(headers[k]);\n return accum;\n }, {});\n this.#body = ((body == null) ? null : new Uint8Array(body));\n this.#request = (request || null);\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message, error) {\n let statusMessage;\n if (!message) {\n message = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message})`;\n }\n else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message})`;\n }\n const response = new FetchResponse(599, statusMessage, this.headers, this.body, this.#request || undefined);\n response.#error = { message, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message, stall) {\n if (stall == null) {\n stall = -1;\n }\n else {\n assertArgument(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message || \"throttling requests\");\n defineProperties(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return (this.#body != null);\n }\n /**\n * The request made for this response.\n */\n get request() { return this.#request; }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return (this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300);\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message, error } = this.#error;\n if (message === \"\") {\n message = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = toUtf8String(this.#body);\n }\n }\n catch (e) { }\n assert(false, message, \"SERVER_ERROR\", {\n request: (this.request || \"unknown request\"), response: this, error,\n info: {\n requestUrl, responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n}\nfunction getTime() { return (new Date()).getTime(); }\nfunction unpercent(value) {\n return toUtf8Bytes(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n}\nfunction wait(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n}\n//# sourceMappingURL=fetch.js.map","/**\n * The **FixedNumber** class permits using values with decimal places,\n * using fixed-pont math.\n *\n * Fixed-point math is still based on integers under-the-hood, but uses an\n * internal offset to store fractional components below, and each operation\n * corrects for this after each operation.\n *\n * @_section: api/utils/fixed-point-math:Fixed-Point Maths [about-fixed-point-math]\n */\nimport { getBytes } from \"./data.js\";\nimport { assert, assertArgument, assertPrivate } from \"./errors.js\";\nimport { getBigInt, getNumber, fromTwos, mask, toBigInt } from \"./maths.js\";\nimport { defineProperties } from \"./properties.js\";\nconst BN_N1 = BigInt(-1);\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_5 = BigInt(5);\nconst _guard = {};\n// Constant to pull zeros from for multipliers\nlet Zeros = \"0000\";\nwhile (Zeros.length < 80) {\n Zeros += Zeros;\n}\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n}\nfunction checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n }\n else {\n val = -fromTwos(mask(-val, width), width);\n }\n }\n else {\n const limit = (BN_1 << width);\n assert(safeOp == null || (val >= 0 && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n val = (((val % limit) + limit) % limit) & (limit - BN_1);\n }\n return val;\n}\nfunction getFormat(value) {\n if (typeof (value) === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof (value) === \"string\") {\n // Parse the format string\n if (value === \"fixed\") {\n // defaults...\n }\n else if (value === \"ufixed\") {\n signed = false;\n }\n else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n assertArgument(match, \"invalid fixed format\", \"format\", value);\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n }\n else if (value) {\n // Extract the values from the object\n const v = value;\n const check = (key, type, defaultValue) => {\n if (v[key] == null) {\n return defaultValue;\n }\n assertArgument(typeof (v[key]) === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v[key]);\n return v[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n assertArgument((width % 8) === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n assertArgument(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n}\nfunction toString(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n // No decimal point for whole values\n if (decimals === 0) {\n return (negative + str);\n }\n // Pad out to the whole component (including a whole digit)\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n // Insert the decimal point\n const index = str.length - decimals;\n str = str.substring(0, index) + \".\" + str.substring(index);\n // Trim the whole component (leaving at least one 0)\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n // Trim the decimal component (leaving at least one 0)\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return (negative + str);\n}\n/**\n * A FixedNumber represents a value over its [[FixedFormat]]\n * arithmetic field.\n *\n * A FixedNumber can be used to perform math, losslessly, on\n * values which have decmial places.\n *\n * A FixedNumber has a fixed bit-width to store values in, and stores all\n * values internally by multiplying the value by 10 raised to the power of\n * %%decimals%%.\n *\n * If operations are performed that cause a value to grow too high (close to\n * positive infinity) or too low (close to negative infinity), the value\n * is said to //overflow//.\n *\n * For example, an 8-bit signed value, with 0 decimals may only be within\n * the range ``-128`` to ``127``; so ``-128 - 1`` will overflow and become\n * ``127``. Likewise, ``127 + 1`` will overflow and become ``-127``.\n *\n * Many operation have a normal and //unsafe// variant. The normal variant\n * will throw a [[NumericFaultError]] on any overflow, while the //unsafe//\n * variant will silently allow overflow, corrupting its value value.\n *\n * If operations are performed that cause a value to become too small\n * (close to zero), the value loses precison and is said to //underflow//.\n *\n * For example, an value with 1 decimal place may store a number as small\n * as ``0.1``, but the value of ``0.1 / 2`` is ``0.05``, which cannot fit\n * into 1 decimal place, so underflow occurs which means precision is lost\n * and the value becomes ``0``.\n *\n * Some operations have a normal and //signalling// variant. The normal\n * variant will silently ignore underflow, while the //signalling// variant\n * will thow a [[NumericFaultError]] on underflow.\n */\nexport class FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n assertPrivate(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString(value, format.decimals);\n defineProperties(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() { return this.#format.signed; }\n /**\n * The number of bits available to store the value.\n */\n get width() { return this.#format.width; }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() { return this.#format.decimals; }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() { return this.#val; }\n #checkFormat(other) {\n assertArgument(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n /*\n const width = BigInt(this.width);\n if (this.signed) {\n const limit = (BN_1 << (width - BN_1));\n assert(safeOp == null || (val >= -limit && val < limit), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n \n if (val > BN_0) {\n val = fromTwos(mask(val, width), width);\n } else {\n val = -fromTwos(mask(-val, width), width);\n }\n \n } else {\n const masked = mask(val, width);\n assert(safeOp == null || (val >= 0 && val === masked), \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp, fault: \"overflow\", value: val\n });\n val = masked;\n }\n */\n val = checkValue(val, this.#format, safeOp);\n return new FixedNumber(_guard, val, this.#format);\n }\n #add(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val + o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) { return this.#add(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) { return this.#add(other, \"add\"); }\n #sub(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue(this.#val - o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) { return this.#sub(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) { return this.#sub(other, \"sub\"); }\n #mul(o, safeOp) {\n this.#checkFormat(o);\n return this.#checkValue((this.#val * o.#val) / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) { return this.#mul(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) { return this.#mul(other, \"mul\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n assert((value % this.#tens) === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o, safeOp) {\n assert(o.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(o);\n return this.#checkValue((this.#val * this.#tens) / o.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) { return this.#div(other); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) { return this.#div(other, \"div\"); }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n assert(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\", fault: \"divide-by-zero\", value: this\n });\n this.#checkFormat(other);\n const value = (this.#val * this.#tens);\n assert((value % other.#val) === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\", fault: \"underflow\", value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a = this.value, b = other.value;\n // Coerce a and b to the same magnitude\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b *= getTens(delta);\n }\n else if (delta < 0) {\n a *= getTens(-delta);\n }\n // Comnpare\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) { return this.cmp(other) === 0; }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) { return this.cmp(other) < 0; }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) { return this.cmp(other) <= 0; }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) { return this.cmp(other) > 0; }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) { return this.cmp(other) >= 0; }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = (this.#val / this.#tens) * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n // Not enough precision to not already be rounded\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = (value / tens) * tens;\n checkValue(value, this.#format, \"round\");\n return new FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() { return (this.#val === BN_0); }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() { return (this.#val < BN_0); }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() { return this._value; }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() { return parseFloat(this.toString()); }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = (_decimals == null) ? 0 : getNumber(_decimals);\n const format = getFormat(_format);\n let value = getBigInt(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n assert((value % tens) === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\", fault: \"underflow\", value: _value\n });\n value /= tens;\n }\n else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n assertArgument(match && (match[2].length + match[3].length) > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = (match[2] || \"0\"), decimal = (match[3] || \"\");\n // Pad out the decimals\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n // Check precision is safe\n assert(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\", fault: \"underflow\", value: _value\n });\n // Remove extra padding\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = toBigInt(getBytes(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = fromTwos(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new FixedNumber(_guard, value, format);\n }\n}\n//const f1 = FixedNumber.fromString(\"12.56\", \"fixed16x2\");\n//const f2 = FixedNumber.fromString(\"0.3\", \"fixed16x2\");\n//console.log(f1.divSignal(f2));\n//const BUMP = FixedNumber.from(\"0.5\");\n//# sourceMappingURL=fixednumber.js.map","//See: https://github.com/ethereum/wiki/wiki/RLP\nimport { hexlify } from \"./data.js\";\nimport { assert, assertArgument } from \"./errors.js\";\nimport { getBytes } from \"./data.js\";\nfunction hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n}\nfunction unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\nfunction _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n assert(childOffset <= offset + 1 + length, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length, offset\n });\n }\n return { consumed: (1 + length), result: result };\n}\n// returns { consumed: number, result: Object }\nfunction _decode(data, offset) {\n assert(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length: 0, offset: 1\n });\n const checkOffset = (offset) => {\n assert(offset <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data, length: data.length, offset\n });\n };\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n }\n else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n checkOffset(offset + 1 + length);\n return _decodeChildren(data, offset, offset + 1, length);\n }\n else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result };\n }\n else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n checkOffset(offset + 1 + length);\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n}\n/**\n * Decodes %%data%% into the structured data it represents.\n */\nexport function decodeRlp(_data) {\n const data = getBytes(_data, \"data\");\n const decoded = _decode(data, 0);\n assertArgument(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n}\n//# sourceMappingURL=rlp-decode.js.map","//See: https://github.com/ethereum/wiki/wiki/RLP\nimport { getBytes } from \"./data.js\";\nfunction arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\nfunction _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function (child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length);\n return payload;\n }\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n return length.concat(payload);\n }\n const data = Array.prototype.slice.call(getBytes(object, \"object\"));\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n }\n else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n return length.concat(data);\n}\nconst nibbles = \"0123456789abcdef\";\n/**\n * Encodes %%object%% as an RLP-encoded [[DataHexString]].\n */\nexport function encodeRlp(object) {\n let result = \"0x\";\n for (const v of _encode(object)) {\n result += nibbles[v >> 4];\n result += nibbles[v & 0xf];\n }\n return result;\n}\n//# sourceMappingURL=rlp-encode.js.map","/**\n * Most interactions with Ethereum requires integer values, which use\n * the smallest magnitude unit.\n *\n * For example, imagine dealing with dollars and cents. Since dollars\n * are divisible, non-integer values are possible, such as ``$10.77``.\n * By using the smallest indivisible unit (i.e. cents), the value can\n * be kept as the integer ``1077``.\n *\n * When receiving decimal input from the user (as a decimal string),\n * the value should be converted to an integer and when showing a user\n * a value, the integer value should be converted to a decimal string.\n *\n * This creates a clear distinction, between values to be used by code\n * (integers) and values used for display logic to users (decimals).\n *\n * The native unit in Ethereum, //ether// is divisible to 18 decimal places,\n * where each individual unit is called a //wei//.\n *\n * @_subsection api/utils:Unit Conversion [about-units]\n */\nimport { assertArgument } from \"./errors.js\";\nimport { FixedNumber } from \"./fixednumber.js\";\nimport { getNumber } from \"./maths.js\";\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n/**\n * Converts %%value%% into a //decimal string//, assuming %%unit%% decimal\n * places. The %%unit%% may be the number of decimal places or the name of\n * a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n *\n */\nexport function formatUnits(value, unit) {\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n}\n/**\n * Converts the //decimal string// %%value%% to a BigInt, assuming\n * %%unit%% decimal places. The %%unit%% may the number of decimal places\n * or the name of a unit (e.g. ``\"gwei\"`` for 9 decimal places).\n */\nexport function parseUnits(value, unit) {\n assertArgument(typeof (value) === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof (unit) === \"string\") {\n const index = names.indexOf(unit);\n assertArgument(index >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index;\n }\n else if (unit != null) {\n decimals = getNumber(unit, \"unit\");\n }\n return FixedNumber.fromString(value, { decimals, width: 512 }).value;\n}\n/**\n * Converts %%value%% into a //decimal string// using 18 decimal places.\n */\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\n/**\n * Converts the //decimal string// %%ether%% to a BigInt, using 18\n * decimal places.\n */\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=units.js.map","/**\n * Explain UUID and link to RFC here.\n *\n * @_subsection: api/utils:UUID [about-uuid]\n */\nimport { getBytes, hexlify } from \"./data.js\";\n/**\n * Returns the version 4 [[link-uuid]] for the %%randomBytes%%.\n *\n * @see: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\n */\nexport function uuidV4(randomBytes) {\n const bytes = getBytes(randomBytes, \"randomBytes\");\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const value = hexlify(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n//# sourceMappingURL=uuid.js.map","import { defineProperties, concat, getBytesCopy, getNumber, hexlify, toBeArray, toBigInt, toNumber, assert, assertArgument\n/*, isError*/\n } from \"../../utils/index.js\";\n/**\n * @_ignore:\n */\nexport const WordSize = 32;\nconst Padding = new Uint8Array(WordSize);\n// Properties used to immediate pass through to the underlying object\n// - `then` is used to detect if an object is a Promise for await\nconst passProperties = [\"then\"];\nconst _guard = {};\nconst resultNames = new WeakMap();\nfunction getNames(result) {\n return resultNames.get(result);\n}\nfunction setNames(result, names) {\n resultNames.set(result, names);\n}\nfunction throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n}\nfunction toObject(names, items, deep) {\n if (names.indexOf(null) >= 0) {\n return items.map((item, index) => {\n if (item instanceof Result) {\n return toObject(getNames(item), item, deep);\n }\n return item;\n });\n }\n return names.reduce((accum, name, index) => {\n let item = items.getValue(name);\n if (!(name in accum)) {\n if (deep && item instanceof Result) {\n item = toObject(getNames(item), item, deep);\n }\n accum[name] = item;\n }\n return accum;\n }, {});\n}\n/**\n * A [[Result]] is a sub-class of Array, which allows accessing any\n * of its values either positionally by its index or, if keys are\n * provided by its name.\n *\n * @_docloc: api/abi\n */\nexport class Result extends Array {\n // No longer used; but cannot be removed as it will remove the\n // #private field from the .d.ts which may break backwards\n // compatibility\n #names;\n /**\n * @private\n */\n constructor(...args) {\n // To properly sub-class Array so the other built-in\n // functions work, the constructor has to behave fairly\n // well. So, in the event we are created via fromItems()\n // we build the read-only Result object we want, but on\n // any other input, we use the default constructor\n // constructor(guard: any, items: Array, keys?: Array);\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap = false;\n }\n // Can't just pass in ...items since an array of length 1\n // is a special case in the super.\n super(items.length);\n items.forEach((item, index) => { this[index] = item; });\n // Find all unique keys\n const nameCounts = names.reduce((accum, name) => {\n if (typeof (name) === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, (new Map()));\n // Remove any key thats not unique\n setNames(this, Object.freeze(items.map((item, index) => {\n const name = names[index];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n })));\n // Dummy operations to prevent TypeScript from complaining\n this.#names = [];\n if (this.#names == null) {\n void (this.#names);\n }\n if (!wrap) {\n return;\n }\n // A wrapped Result is immutable\n Object.freeze(this);\n // Proxy indices and names so we can trap deferred errors\n const proxy = new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof (prop) === \"string\") {\n // Index accessor\n if (prop.match(/^[0-9]+$/)) {\n const index = getNumber(prop, \"%index\");\n if (index < 0 || index >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index];\n if (item instanceof Error) {\n throwError(`index ${index}`, item);\n }\n return item;\n }\n // Pass important checks (like `then` for Promise) through\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n // Make sure functions work with private variables\n // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding\n return function (...args) {\n return value.apply((this === receiver) ? target : this, args);\n };\n }\n else if (!(prop in target)) {\n // Possible name accessor\n return target.getValue.apply((this === receiver) ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n setNames(proxy, getNames(this));\n return proxy;\n }\n /**\n * Returns the Result as a normal Array. If %%deep%%, any children\n * which are Result objects are also converted to a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray(deep) {\n const result = [];\n this.forEach((item, index) => {\n if (item instanceof Error) {\n throwError(`index ${index}`, item);\n }\n if (deep && item instanceof Result) {\n item = item.toArray(deep);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair. If\n * %%deep%%, any children which are Result objects are also\n * converted to an Object.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject(deep) {\n const names = getNames(this);\n return names.reduce((accum, name, index) => {\n assert(name != null, `value at index ${index} unnamed`, \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n return toObject(names, this, deep);\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const _names = getNames(this);\n const result = [], names = [];\n for (let i = start; i < end; i++) {\n result.push(this[i]);\n names.push(_names[i]);\n }\n return new Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const _names = getNames(this);\n const result = [], names = [];\n for (let i = 0; i < this.length; i++) {\n const item = this[i];\n if (item instanceof Error) {\n throwError(`index ${i}`, item);\n }\n if (callback.call(thisArg, item, i, this)) {\n result.push(item);\n names.push(_names[i]);\n }\n }\n return new Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i = 0; i < this.length; i++) {\n const item = this[i];\n if (item instanceof Error) {\n throwError(`index ${i}`, item);\n }\n result.push(callback.call(thisArg, item, i, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index = getNames(this).indexOf(name);\n if (index === -1) {\n return undefined;\n }\n const value = this[index];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new Result(_guard, items, keys);\n }\n}\n/**\n * Returns all errors found in a [[Result]].\n *\n * Since certain errors encountered when creating a [[Result]] do\n * not impact the ability to continue parsing data, they are\n * deferred until they are actually accessed. Hence a faulty string\n * in an Event that is never used does not impact the program flow.\n *\n * However, sometimes it may be useful to access, identify or\n * validate correctness of a [[Result]].\n *\n * @_docloc api/abi\n */\nexport function checkResultErrors(result) {\n // Find the first error (if any)\n const errors = [];\n const checkErrors = function (path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n }\n catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n}\nfunction getValue(value) {\n let bytes = toBeArray(value);\n assert(bytes.length <= WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: WordSize, offset: bytes.length });\n if (bytes.length !== WordSize) {\n bytes = getBytesCopy(concat([Padding.slice(bytes.length % WordSize), bytes]));\n }\n return bytes;\n}\n/**\n * @_ignore\n */\nexport class Coder {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n defineProperties(this, { name, type, localName, dynamic }, {\n name: \"string\", type: \"string\", localName: \"string\", dynamic: \"boolean\"\n });\n }\n _throwError(message, value) {\n assertArgument(false, message, this.localName, value);\n }\n}\n/**\n * @_ignore\n */\nexport class Writer {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return concat(this.#data);\n }\n get length() { return this.#dataLength; }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData(getBytesCopy(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = getBytesCopy(value);\n const paddingOffset = bytes.length % WordSize;\n if (paddingOffset) {\n bytes = getBytesCopy(concat([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n}\n/**\n * @_ignore\n */\nexport class Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n defineProperties(this, { allowLoose: !!allowLoose });\n this.#data = getBytesCopy(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = (maxInflation != null) ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() { return hexlify(this.#data); }\n get dataLength() { return this.#data.length; }\n get consumed() { return this.#offset; }\n get bytes() { return new Uint8Array(this.#data); }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n // Check for excessive inflation (see: #4537)\n assert(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https:/\\/github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: getBytesCopy(this.#data), offset: this.#offset,\n length: count, info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length, loose) {\n let alignedLength = Math.ceil(length / WordSize) * WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length <= this.#data.length) {\n alignedLength = length;\n }\n else {\n assert(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: getBytesCopy(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length, loose) {\n let bytes = this.#peekBytes(0, length, !!loose);\n this.#incrementBytesRead(length);\n this.#offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n // Read a numeric values\n readValue() {\n return toBigInt(this.readBytes(WordSize));\n }\n readIndex() {\n return toNumber(this.readBytes(WordSize));\n }\n}\n//# sourceMappingURL=abstract-coder.js.map","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assertHash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assertExists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assertExists(this);\n assertBytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","import { hash as assertHash, number as assertNumber } from './_assert.js';\nimport { hmac } from './hmac.js';\nimport { createView, toBytes, checkOpts, asyncLoop } from './utils.js';\n// Common prologue and epilogue for sync/async functions\nfunction pbkdf2Init(hash, _password, _salt, _opts) {\n assertHash(hash);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c, dkLen, asyncTick } = opts;\n assertNumber(c);\n assertNumber(dkLen);\n assertNumber(asyncTick);\n if (c < 1)\n throw new Error('PBKDF2: iterations (c) should be >= 1');\n const password = toBytes(_password);\n const salt = toBytes(_salt);\n // DK = PBKDF2(PRF, Password, Salt, c, dkLen);\n const DK = new Uint8Array(dkLen);\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n const PRF = hmac.create(hash, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c, dkLen, asyncTick, DK, PRF, PRFSalt };\n}\nfunction pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u.fill(0);\n return DK;\n}\n/**\n * PBKDF2-HMAC: RFC 2898 key derivation function\n * @param hash - hash function that would be used e.g. sha256\n * @param password - password from which a derived key is generated\n * @param salt - cryptographic salt\n * @param opts - {c, dkLen} where c is work factor and dkLen is output message size\n */\nexport function pbkdf2(hash, password, salt, opts) {\n const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n for (let ui = 1; ui < c; ui++) {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\nexport async function pbkdf2Async(hash, password, salt, opts) {\n const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n await asyncLoop(c - 1, asyncTick, () => {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n });\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\n//# sourceMappingURL=pbkdf2.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { SHA2 } from './_sha2.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nexport class SHA512 extends SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = /* @__PURE__ */ wrapConstructor(() => new SHA512());\nexport const sha512_224 = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());\nexport const sha384 = /* @__PURE__ */ wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/* Browser Crypto Shims */\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { pbkdf2 } from \"@noble/hashes/pbkdf2\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { sha512 } from \"@noble/hashes/sha512\";\nimport { assert, assertArgument } from \"../utils/index.js\";\nfunction getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n}\n;\nconst anyGlobal = getGlobal();\nconst crypto = anyGlobal.crypto || anyGlobal.msCrypto;\nexport function createHash(algo) {\n switch (algo) {\n case \"sha256\": return sha256.create();\n case \"sha512\": return sha512.create();\n }\n assertArgument(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n}\nexport function createHmac(_algo, key) {\n const algo = ({ sha256, sha512 }[_algo]);\n assertArgument(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac.create(algo, key);\n}\nexport function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = ({ sha256, sha512 }[_algo]);\n assertArgument(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return pbkdf2(algo, password, salt, { c: iterations, dkLen: keylen });\n}\nexport function randomBytes(length) {\n assert(crypto != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n assertArgument(Number.isInteger(length) && length > 0 && length <= 1024, \"invalid length\", \"length\", length);\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return result;\n}\n//# sourceMappingURL=crypto-browser.js.map","/**\n * An **HMAC** enables verification that a given key was used\n * to authenticate a payload.\n *\n * See: [[link-wiki-hmac]]\n *\n * @_subsection: api/crypto:HMAC [about-hmac]\n */\nimport { createHmac } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _computeHmac = function (algorithm, key, data) {\n return createHmac(algorithm, key).update(data).digest();\n};\nlet __computeHmac = _computeHmac;\n/**\n * Return the HMAC for %%data%% using the %%key%% key with the underlying\n * %%algo%% used for compression.\n *\n * @example:\n * key = id(\"some-secret\")\n *\n * // Compute the HMAC\n * computeHmac(\"sha256\", key, \"0x1337\")\n * //_result:\n *\n * // To compute the HMAC of UTF-8 data, the data must be\n * // converted to UTF-8 bytes\n * computeHmac(\"sha256\", key, toUtf8Bytes(\"Hello World\"))\n * //_result:\n *\n */\nexport function computeHmac(algorithm, _key, _data) {\n const key = getBytes(_key, \"key\");\n const data = getBytes(_data, \"data\");\n return hexlify(__computeHmac(algorithm, key, data));\n}\ncomputeHmac._ = _computeHmac;\ncomputeHmac.lock = function () { locked = true; };\ncomputeHmac.register = function (func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n};\nObject.freeze(computeHmac);\n//# sourceMappingURL=hmac.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","/**\n * Cryptographic hashing functions\n *\n * @_subsection: api/crypto:Hash Functions [about-crypto-hashing]\n */\nimport { keccak_256 } from \"@noble/hashes/sha3\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _keccak256 = function (data) {\n return keccak_256(data);\n};\nlet __keccak256 = _keccak256;\n/**\n * Compute the cryptographic KECCAK256 hash of %%data%%.\n *\n * The %%data%% **must** be a data representation, to compute the\n * hash of UTF-8 data use the [[id]] function.\n *\n * @returns DataHexstring\n * @example:\n * keccak256(\"0x\")\n * //_result:\n *\n * keccak256(\"0x1337\")\n * //_result:\n *\n * keccak256(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n * // Strings are assumed to be DataHexString, otherwise it will\n * // throw. To hash UTF-8 data, see the note above.\n * keccak256(\"Hello World\")\n * //_error:\n */\nexport function keccak256(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__keccak256(data));\n}\nkeccak256._ = _keccak256;\nkeccak256.lock = function () { locked = true; };\nkeccak256.register = function (func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n};\nObject.freeze(keccak256);\n//# sourceMappingURL=keccak.js.map","import { SHA2 } from './_sha2.js';\nimport { wrapConstructor } from './utils.js';\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html\n// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf\nconst Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\nconst Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_, i) => i);\nconst Pi = /* @__PURE__ */ Id.map((i) => (9 * i + 5) % 16);\nlet idxL = [Id];\nlet idxR = [Pi];\nfor (let i = 0; i < 4; i++)\n for (let j of [idxL, idxR])\n j.push(j[i].map((k) => Rho[k]));\nconst shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5],\n].map((i) => new Uint8Array(i));\nconst shiftsL = /* @__PURE__ */ idxL.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst shiftsR = /* @__PURE__ */ idxR.map((idx, i) => idx.map((j) => shifts[i][j]));\nconst Kl = /* @__PURE__ */ new Uint32Array([\n 0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e,\n]);\nconst Kr = /* @__PURE__ */ new Uint32Array([\n 0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000,\n]);\n// The rotate left (circular left shift) operation for uint32\nconst rotl = (word, shift) => (word << shift) | (word >>> (32 - shift));\n// It's called f() in spec.\nfunction f(group, x, y, z) {\n if (group === 0)\n return x ^ y ^ z;\n else if (group === 1)\n return (x & y) | (~x & z);\n else if (group === 2)\n return (x | ~y) ^ z;\n else if (group === 3)\n return (x & z) | (y & ~z);\n else\n return x ^ (y | ~z);\n}\n// Temporary buffer, not used to store anything between runs\nconst BUF = /* @__PURE__ */ new Uint32Array(16);\nexport class RIPEMD160 extends SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 0x67452301 | 0;\n this.h1 = 0xefcdab89 | 0;\n this.h2 = 0x98badcfe | 0;\n this.h3 = 0x10325476 | 0;\n this.h4 = 0xc3d2e1f0 | 0;\n }\n get() {\n const { h0, h1, h2, h3, h4 } = this;\n return [h0, h1, h2, h3, h4];\n }\n set(h0, h1, h2, h3, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h2 | 0;\n this.h3 = h3 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i = 0; i < 16; i++, offset += 4)\n BUF[i] = view.getUint32(offset, true);\n // prettier-ignore\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n // Instead of iterating 0 to 80, we split it into 5 groups\n // And use the groups in constants, functions, etc. Much simpler\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group]; // prettier-ignore\n const rl = idxL[group], rr = idxR[group]; // prettier-ignore\n const sl = shiftsL[group], sr = shiftsR[group]; // prettier-ignore\n for (let i = 0; i < 16; i++) {\n const tl = (rotl(al + f(group, bl, cl, dl) + BUF[rl[i]] + hbl, sl[i]) + el) | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore\n }\n // 2 loops are 10% faster\n for (let i = 0; i < 16; i++) {\n const tr = (rotl(ar + f(rGroup, br, cr, dr) + BUF[rr[i]] + hbr, sr[i]) + er) | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr; // prettier-ignore\n }\n }\n // Add the compressed chunk to the current hash value\n this.set((this.h1 + cl + dr) | 0, (this.h2 + dl + er) | 0, (this.h3 + el + ar) | 0, (this.h4 + al + br) | 0, (this.h0 + bl + cr) | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n}\n/**\n * RIPEMD-160 - a hash function from 1990s.\n * @param message - msg that would be hashed\n */\nexport const ripemd160 = /* @__PURE__ */ wrapConstructor(() => new RIPEMD160());\n//# sourceMappingURL=ripemd160.js.map","import { ripemd160 as noble_ripemd160 } from \"@noble/hashes/ripemd160\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _ripemd160 = function (data) {\n return noble_ripemd160(data);\n};\nlet __ripemd160 = _ripemd160;\n/**\n * Compute the cryptographic RIPEMD-160 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * ripemd160(\"0x\")\n * //_result:\n *\n * ripemd160(\"0x1337\")\n * //_result:\n *\n * ripemd160(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n */\nexport function ripemd160(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__ripemd160(data));\n}\nripemd160._ = _ripemd160;\nripemd160.lock = function () { locked = true; };\nripemd160.register = function (func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n};\nObject.freeze(ripemd160);\n//# sourceMappingURL=ripemd160.js.map","/**\n * A **Password-Based Key-Derivation Function** is designed to create\n * a sequence of bytes suitible as a **key** from a human-rememberable\n * password.\n *\n * @_subsection: api/crypto:Passwords [about-pbkdf]\n */\nimport { pbkdf2Sync } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nlet locked = false;\nconst _pbkdf2 = function (password, salt, iterations, keylen, algo) {\n return pbkdf2Sync(password, salt, iterations, keylen, algo);\n};\nlet __pbkdf2 = _pbkdf2;\n/**\n * Return the [[link-pbkdf2]] for %%keylen%% bytes for %%password%% using\n * the %%salt%% and using %%iterations%% of %%algo%%.\n *\n * This PBKDF is outdated and should not be used in new projects, but is\n * required to decrypt older files.\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the PBKDF2\n * pbkdf2(passwordBytes, salt, 1024, 16, \"sha256\")\n * //_result:\n */\nexport function pbkdf2(_password, _salt, iterations, keylen, algo) {\n const password = getBytes(_password, \"password\");\n const salt = getBytes(_salt, \"salt\");\n return hexlify(__pbkdf2(password, salt, iterations, keylen, algo));\n}\npbkdf2._ = _pbkdf2;\npbkdf2.lock = function () { locked = true; };\npbkdf2.register = function (func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n};\nObject.freeze(pbkdf2);\n//# sourceMappingURL=pbkdf2.js.map","/**\n * A **Cryptographically Secure Random Value** is one that has been\n * generated with additional care take to prevent side-channels\n * from allowing others to detect it and prevent others from through\n * coincidence generate the same values.\n *\n * @_subsection: api/crypto:Random Values [about-crypto-random]\n */\nimport { randomBytes as crypto_random } from \"./crypto.js\";\nlet locked = false;\nconst _randomBytes = function (length) {\n return new Uint8Array(crypto_random(length));\n};\nlet __randomBytes = _randomBytes;\n/**\n * Return %%length%% bytes of cryptographically secure random data.\n *\n * @example:\n * randomBytes(8)\n * //_result:\n */\nexport function randomBytes(length) {\n return __randomBytes(length);\n}\nrandomBytes._ = _randomBytes;\nrandomBytes.lock = function () { locked = true; };\nrandomBytes.register = function (func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n};\nObject.freeze(randomBytes);\n//# sourceMappingURL=random.js.map","import { number as assertNumber } from './_assert.js';\nimport { sha256 } from './sha256.js';\nimport { pbkdf2 } from './pbkdf2.js';\nimport { asyncLoop, checkOpts, u32 } from './utils.js';\n// RFC 7914 Scrypt KDF\n// Left rotate for uint32\nconst rotl = (a, b) => (a << b) | (a >>> (32 - b));\n// The main Scrypt loop: uses Salsa extensively.\n// Six versions of the function were tried, this is the fastest one.\n// prettier-ignore\nfunction XorAndSalsa(prev, pi, input, ii, out, oi) {\n // Based on https://cr.yp.to/salsa20.html\n // Xor blocks\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n // Save state to temporary variables (salsa)\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n // Main loop (salsa)\n for (let i = 0; i < 8; i += 2) {\n x04 ^= rotl(x00 + x12 | 0, 7);\n x08 ^= rotl(x04 + x00 | 0, 9);\n x12 ^= rotl(x08 + x04 | 0, 13);\n x00 ^= rotl(x12 + x08 | 0, 18);\n x09 ^= rotl(x05 + x01 | 0, 7);\n x13 ^= rotl(x09 + x05 | 0, 9);\n x01 ^= rotl(x13 + x09 | 0, 13);\n x05 ^= rotl(x01 + x13 | 0, 18);\n x14 ^= rotl(x10 + x06 | 0, 7);\n x02 ^= rotl(x14 + x10 | 0, 9);\n x06 ^= rotl(x02 + x14 | 0, 13);\n x10 ^= rotl(x06 + x02 | 0, 18);\n x03 ^= rotl(x15 + x11 | 0, 7);\n x07 ^= rotl(x03 + x15 | 0, 9);\n x11 ^= rotl(x07 + x03 | 0, 13);\n x15 ^= rotl(x11 + x07 | 0, 18);\n x01 ^= rotl(x00 + x03 | 0, 7);\n x02 ^= rotl(x01 + x00 | 0, 9);\n x03 ^= rotl(x02 + x01 | 0, 13);\n x00 ^= rotl(x03 + x02 | 0, 18);\n x06 ^= rotl(x05 + x04 | 0, 7);\n x07 ^= rotl(x06 + x05 | 0, 9);\n x04 ^= rotl(x07 + x06 | 0, 13);\n x05 ^= rotl(x04 + x07 | 0, 18);\n x11 ^= rotl(x10 + x09 | 0, 7);\n x08 ^= rotl(x11 + x10 | 0, 9);\n x09 ^= rotl(x08 + x11 | 0, 13);\n x10 ^= rotl(x09 + x08 | 0, 18);\n x12 ^= rotl(x15 + x14 | 0, 7);\n x13 ^= rotl(x12 + x15 | 0, 9);\n x14 ^= rotl(x13 + x12 | 0, 13);\n x15 ^= rotl(x14 + x13 | 0, 18);\n }\n // Write output (salsa)\n out[oi++] = (y00 + x00) | 0;\n out[oi++] = (y01 + x01) | 0;\n out[oi++] = (y02 + x02) | 0;\n out[oi++] = (y03 + x03) | 0;\n out[oi++] = (y04 + x04) | 0;\n out[oi++] = (y05 + x05) | 0;\n out[oi++] = (y06 + x06) | 0;\n out[oi++] = (y07 + x07) | 0;\n out[oi++] = (y08 + x08) | 0;\n out[oi++] = (y09 + x09) | 0;\n out[oi++] = (y10 + x10) | 0;\n out[oi++] = (y11 + x11) | 0;\n out[oi++] = (y12 + x12) | 0;\n out[oi++] = (y13 + x13) | 0;\n out[oi++] = (y14 + x14) | 0;\n out[oi++] = (y15 + x15) | 0;\n}\nfunction BlockMix(input, ii, out, oi, r) {\n // The block B is r 128-byte chunks (which is equivalent of 2r 64-byte chunks)\n let head = oi + 0;\n let tail = oi + 16 * r;\n for (let i = 0; i < 16; i++)\n out[tail + i] = input[ii + (2 * r - 1) * 16 + i]; // X ← B[2r−1]\n for (let i = 0; i < r; i++, head += 16, ii += 16) {\n // We write odd & even Yi at same time. Even: 0bXXXXX0 Odd: 0bXXXXX1\n XorAndSalsa(out, tail, input, ii, out, head); // head[i] = Salsa(blockIn[2*i] ^ tail[i-1])\n if (i > 0)\n tail += 16; // First iteration overwrites tmp value in tail\n XorAndSalsa(out, head, input, (ii += 16), out, tail); // tail[i] = Salsa(blockIn[2*i+1] ^ head[i])\n }\n}\n// Common prologue and epilogue for sync/async functions\nfunction scryptInit(password, salt, _opts) {\n // Maxmem - 1GB+1KB by default\n const opts = checkOpts({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024,\n }, _opts);\n const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = opts;\n assertNumber(N);\n assertNumber(r);\n assertNumber(p);\n assertNumber(dkLen);\n assertNumber(asyncTick);\n assertNumber(maxmem);\n if (onProgress !== undefined && typeof onProgress !== 'function')\n throw new Error('progressCb should be function');\n const blockSize = 128 * r;\n const blockSize32 = blockSize / 4;\n if (N <= 1 || (N & (N - 1)) !== 0 || N >= 2 ** (blockSize / 8) || N > 2 ** 32) {\n // NOTE: we limit N to be less than 2**32 because of 32 bit variant of Integrify function\n // There is no JS engines that allows alocate more than 4GB per single Uint8Array for now, but can change in future.\n throw new Error('Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32');\n }\n if (p < 0 || p > ((2 ** 32 - 1) * 32) / blockSize) {\n throw new Error('Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)');\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error('Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32');\n }\n const memUsed = blockSize * (N + p);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n // [B0...Bp−1] ← PBKDF2HMAC-SHA256(Passphrase, Salt, 1, blockSize*ParallelizationFactor)\n // Since it has only one iteration there is no reason to use async variant\n const B = pbkdf2(sha256, password, salt, { c: 1, dkLen: blockSize * p });\n const B32 = u32(B);\n // Re-used between parallel iterations. Array(iterations) of B\n const V = u32(new Uint8Array(blockSize * N));\n const tmp = u32(new Uint8Array(blockSize));\n let blockMixCb = () => { };\n if (onProgress) {\n const totalBlockMix = 2 * N * p;\n // Invoke callback if progress changes from 10.01 to 10.02\n // Allows to draw smooth progress bar on up to 8K screen\n const callbackPer = Math.max(Math.floor(totalBlockMix / 10000), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick };\n}\nfunction scryptOutput(password, dkLen, B, V, tmp) {\n const res = pbkdf2(sha256, password, B, { c: 1, dkLen });\n B.fill(0);\n V.fill(0);\n tmp.fill(0);\n return res;\n}\n/**\n * Scrypt KDF from RFC 7914.\n * @param password - pass\n * @param salt - salt\n * @param opts - parameters\n * - `N` is cpu/mem work factor (power of 2 e.g. 2**18)\n * - `r` is block size (8 is common), fine-tunes sequential memory read size and performance\n * - `p` is parallelization factor (1 is common)\n * - `dkLen` is output key length in bytes e.g. 32.\n * - `asyncTick` - (default: 10) max time in ms for which async function can block execution\n * - `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt\n * - `onProgress` - callback function that would be executed for progress report\n * @returns Derived key\n */\nexport function scrypt(password, salt, opts) {\n const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p; pi++) {\n const Pi = blockSize32 * pi;\n for (let i = 0; i < blockSize32; i++)\n V[i] = B32[Pi + i]; // V[0] = B[i]\n for (let i = 0, pos = 0; i < N - 1; i++) {\n BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n blockMixCb();\n }\n BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n blockMixCb();\n for (let i = 0; i < N; i++) {\n // First u32 of the last 64-byte block (u32 is LE)\n const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n for (let k = 0; k < blockSize32; k++)\n tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B, V, tmp);\n}\n/**\n * Scrypt KDF from RFC 7914.\n */\nexport async function scryptAsync(password, salt, opts) {\n const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p; pi++) {\n const Pi = blockSize32 * pi;\n for (let i = 0; i < blockSize32; i++)\n V[i] = B32[Pi + i]; // V[0] = B[i]\n let pos = 0;\n await asyncLoop(N - 1, asyncTick, () => {\n BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);\n blockMixCb();\n });\n BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element\n blockMixCb();\n await asyncLoop(N, asyncTick, () => {\n // First u32 of the last 64-byte block (u32 is LE)\n const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations\n for (let k = 0; k < blockSize32; k++)\n tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]\n BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B, V, tmp);\n}\n//# sourceMappingURL=scrypt.js.map","import { scrypt as _nobleSync, scryptAsync as _nobleAsync } from \"@noble/hashes/scrypt\";\nimport { getBytes, hexlify as H } from \"../utils/index.js\";\nlet lockedSync = false, lockedAsync = false;\nconst _scryptAsync = async function (passwd, salt, N, r, p, dkLen, onProgress) {\n return await _nobleAsync(passwd, salt, { N, r, p, dkLen, onProgress });\n};\nconst _scryptSync = function (passwd, salt, N, r, p, dkLen) {\n return _nobleSync(passwd, salt, { N, r, p, dkLen });\n};\nlet __scryptAsync = _scryptAsync;\nlet __scryptSync = _scryptSync;\n/**\n * The [[link-wiki-scrypt]] uses a memory and cpu hard method of\n * derivation to increase the resource cost to brute-force a password\n * for a given key.\n *\n * This means this algorithm is intentionally slow, and can be tuned to\n * become slower. As computation and memory speed improve over time,\n * increasing the difficulty maintains the cost of an attacker.\n *\n * For example, if a target time of 5 seconds is used, a legitimate user\n * which knows their password requires only 5 seconds to unlock their\n * account. A 6 character password has 68 billion possibilities, which\n * would require an attacker to invest over 10,000 years of CPU time. This\n * is of course a crude example (as password generally aren't random),\n * but demonstrates to value of imposing large costs to decryption.\n *\n * For this reason, if building a UI which involved decrypting or\n * encrypting datsa using scrypt, it is recommended to use a\n * [[ProgressCallback]] (as event short periods can seem lik an eternity\n * if the UI freezes). Including the phrase //\"decrypting\"// in the UI\n * can also help, assuring the user their waiting is for a good reason.\n *\n * @_docloc: api/crypto:Passwords\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the scrypt\n * scrypt(passwordBytes, salt, 1024, 8, 1, 16)\n * //_result:\n */\nexport async function scrypt(_passwd, _salt, N, r, p, dkLen, progress) {\n const passwd = getBytes(_passwd, \"passwd\");\n const salt = getBytes(_salt, \"salt\");\n return H(await __scryptAsync(passwd, salt, N, r, p, dkLen, progress));\n}\nscrypt._ = _scryptAsync;\nscrypt.lock = function () { lockedAsync = true; };\nscrypt.register = function (func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n};\nObject.freeze(scrypt);\n/**\n * Provides a synchronous variant of [[scrypt]].\n *\n * This will completely lock up and freeze the UI in a browser and will\n * prevent any event loop from progressing. For this reason, it is\n * preferred to use the [async variant](scrypt).\n *\n * @_docloc: api/crypto:Passwords\n *\n * @example:\n * // The password must be converted to bytes, and it is generally\n * // best practices to ensure the string has been normalized. Many\n * // formats explicitly indicate the normalization form to use.\n * password = \"hello\"\n * passwordBytes = toUtf8Bytes(password, \"NFKC\")\n *\n * salt = id(\"some-salt\")\n *\n * // Compute the scrypt\n * scryptSync(passwordBytes, salt, 1024, 8, 1, 16)\n * //_result:\n */\nexport function scryptSync(_passwd, _salt, N, r, p, dkLen) {\n const passwd = getBytes(_passwd, \"passwd\");\n const salt = getBytes(_salt, \"salt\");\n return H(__scryptSync(passwd, salt, N, r, p, dkLen));\n}\nscryptSync._ = _scryptSync;\nscryptSync.lock = function () { lockedSync = true; };\nscryptSync.register = function (func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n};\nObject.freeze(scryptSync);\n//# sourceMappingURL=scrypt.js.map","import { createHash } from \"./crypto.js\";\nimport { getBytes, hexlify } from \"../utils/index.js\";\nconst _sha256 = function (data) {\n return createHash(\"sha256\").update(data).digest();\n};\nconst _sha512 = function (data) {\n return createHash(\"sha512\").update(data).digest();\n};\nlet __sha256 = _sha256;\nlet __sha512 = _sha512;\nlet locked256 = false, locked512 = false;\n/**\n * Compute the cryptographic SHA2-256 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * sha256(\"0x\")\n * //_result:\n *\n * sha256(\"0x1337\")\n * //_result:\n *\n * sha256(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n *\n */\nexport function sha256(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__sha256(data));\n}\nsha256._ = _sha256;\nsha256.lock = function () { locked256 = true; };\nsha256.register = function (func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n};\nObject.freeze(sha256);\n/**\n * Compute the cryptographic SHA2-512 hash of %%data%%.\n *\n * @_docloc: api/crypto:Hash Functions\n * @returns DataHexstring\n *\n * @example:\n * sha512(\"0x\")\n * //_result:\n *\n * sha512(\"0x1337\")\n * //_result:\n *\n * sha512(new Uint8Array([ 0x13, 0x37 ]))\n * //_result:\n */\nexport function sha512(_data) {\n const data = getBytes(_data, \"data\");\n return hexlify(__sha512(data));\n}\nsha512._ = _sha512;\nsha512.lock = function () { locked512 = true; };\nsha512.register = function (func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n};\nObject.freeze(sha256);\n//# sourceMappingURL=sha2.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport const bitSet = (n, pos, value) => {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n};\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = mod(num, fieldOrder - _1n) + _1n;\n return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","/**\n * A constant for the zero address.\n *\n * (**i.e.** ``\"0x0000000000000000000000000000000000000000\"``)\n */\nexport const ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n//# sourceMappingURL=addresses.js.map","/**\n * A constant for the zero hash.\n *\n * (**i.e.** ``\"0x0000000000000000000000000000000000000000000000000000000000000000\"``)\n */\nexport const ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n//# sourceMappingURL=hashes.js.map","/**\n * A constant for the order N for the secp256k1 curve.\n *\n * (**i.e.** ``0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n``)\n */\nexport const N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n/**\n * A constant for the number of wei in a single ether.\n *\n * (**i.e.** ``1000000000000000000n``)\n */\nexport const WeiPerEther = BigInt(\"1000000000000000000\");\n/**\n * A constant for the maximum value for a ``uint256``.\n *\n * (**i.e.** ``0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)\n */\nexport const MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n/**\n * A constant for the minimum value for an ``int256``.\n *\n * (**i.e.** ``-8000000000000000000000000000000000000000000000000000000000000000n``)\n */\nexport const MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n/**\n * A constant for the maximum value for an ``int256``.\n *\n * (**i.e.** ``0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)\n */\nexport const MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n//# sourceMappingURL=numbers.js.map","// NFKC (composed) // (decomposed)\n/**\n * A constant for the ether symbol (normalized using NFKC).\n *\n * (**i.e.** ``\"\\\\u039e\"``)\n */\nexport const EtherSymbol = \"\\u039e\"; // \"\\uD835\\uDF63\";\n/**\n * A constant for the [[link-eip-191]] personal message prefix.\n *\n * (**i.e.** ``\"\\\\x19Ethereum Signed Message:\\\\n\"``)\n */\nexport const MessagePrefix = \"\\x19Ethereum Signed Message:\\n\";\n//# sourceMappingURL=strings.js.map","import { ZeroHash } from \"../constants/index.js\";\nimport { concat, dataLength, getBigInt, getBytes, getNumber, hexlify, toBeArray, isHexString, zeroPadValue, assertArgument, assertPrivate } from \"../utils/index.js\";\n// Constants\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_2 = BigInt(2);\nconst BN_27 = BigInt(27);\nconst BN_28 = BigInt(28);\nconst BN_35 = BigInt(35);\nconst _guard = {};\nfunction toUint256(value) {\n return zeroPadValue(toBeArray(value), 32);\n}\n/**\n * A Signature @TODO\n *\n *\n * @_docloc: api/crypto:Signing\n */\nexport class Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signautre.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() { return this.#r; }\n set r(value) {\n assertArgument(dataLength(value) === 32, \"invalid r\", \"value\", value);\n this.#r = hexlify(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() { return this.#s; }\n set s(_value) {\n assertArgument(dataLength(_value) === 32, \"invalid s\", \"value\", _value);\n const value = hexlify(_value);\n assertArgument(parseInt(value.substring(0, 3)) < 8, \"non-canonical s\", \"value\", value);\n this.#s = value;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() { return this.#v; }\n set v(value) {\n const v = getNumber(value, \"value\");\n assertArgument(v === 27 || v === 28, \"invalid v\", \"v\", value);\n this.#v = v;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() { return this.#networkV; }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v = this.networkV;\n if (v == null) {\n return null;\n }\n return Signature.getChainId(v);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return (this.v === 27) ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n // The EIP-2098 compact representation\n const yParityAndS = getBytes(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 0x80;\n }\n return hexlify(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return concat([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return concat([this.r, this.s, (this.yParity ? \"0x1c\" : \"0x1b\")]);\n }\n /**\n * @private\n */\n constructor(guard, r, s, v) {\n assertPrivate(guard, _guard, \"Signature\");\n this.#r = r;\n this.#s = s;\n this.#v = v;\n this.#networkV = null;\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return `Signature { r: \"${this.r}\", s: \"${this.s}\", yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone = new Signature(_guard, this.r, this.s, this.v);\n if (this.networkV) {\n clone.#networkV = this.networkV;\n }\n return clone;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: ((networkV != null) ? networkV.toString() : null),\n r: this.r, s: this.s, v: this.v,\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v) {\n const bv = getBigInt(v, \"v\");\n // The v is not an EIP-155 v, so it is the unspecified chain ID\n if ((bv == BN_27) || (bv == BN_28)) {\n return BN_0;\n }\n // Bad value for an EIP-155 v\n assertArgument(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v) {\n return (getBigInt(chainId) * BN_2) + BigInt(35 + v - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v) {\n const bv = getBigInt(v);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n assertArgument(bv >= BN_35, \"invalid v\", \"v\", v);\n // Otherwise, EIP-155 v means odd is 27 and even is 28\n return (bv & BN_1) ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check, message) {\n assertArgument(check, message, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new Signature(_guard, ZeroHash, ZeroHash, 27);\n }\n if (typeof (sig) === \"string\") {\n const bytes = getBytes(sig, \"signature\");\n if (bytes.length === 64) {\n const r = hexlify(bytes.slice(0, 32));\n const s = bytes.slice(32, 64);\n const v = (s[0] & 0x80) ? 28 : 27;\n s[0] &= 0x7f;\n return new Signature(_guard, r, hexlify(s), v);\n }\n if (bytes.length === 65) {\n const r = hexlify(bytes.slice(0, 32));\n const s = bytes.slice(32, 64);\n assertError((s[0] & 0x80) === 0, \"non-canonical s\");\n const v = Signature.getNormalizedV(bytes[64]);\n return new Signature(_guard, r, hexlify(s), v);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof Signature) {\n return sig.clone();\n }\n // Get r\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r = toUint256(_r);\n // Get s; by any means necessary (we check consistency below)\n const s = (function (s, yParityAndS) {\n if (s != null) {\n return toUint256(s);\n }\n if (yParityAndS != null) {\n assertError(isHexString(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = getBytes(yParityAndS);\n bytes[0] &= 0x7f;\n return hexlify(bytes);\n }\n assertError(false, \"missing s\");\n })(sig.s, sig.yParityAndS);\n assertError((getBytes(s)[0] & 0x80) == 0, \"non-canonical s\");\n // Get v; by any means necessary (we check consistency below)\n const { networkV, v } = (function (_v, yParityAndS, yParity) {\n if (_v != null) {\n const v = getBigInt(_v);\n return {\n networkV: ((v >= BN_35) ? v : undefined),\n v: Signature.getNormalizedV(v)\n };\n }\n if (yParityAndS != null) {\n assertError(isHexString(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: ((getBytes(yParityAndS)[0] & 0x80) ? 28 : 27) };\n }\n if (yParity != null) {\n switch (getNumber(yParity, \"sig.yParity\")) {\n case 0: return { v: 27 };\n case 1: return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n })(sig.v, sig.yParityAndS, sig.yParity);\n const result = new Signature(_guard, r, s, v);\n if (networkV) {\n result.#networkV = networkV;\n }\n // If multiple of v, yParity, yParityAndS we given, check they match\n assertError(sig.yParity == null || getNumber(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n}\n//# sourceMappingURL=signature.js.map","/**\n * Add details about signing here.\n *\n * @_subsection: api/crypto:Signing [about-signing]\n */\nimport { secp256k1 } from \"@noble/curves/secp256k1\";\nimport { concat, dataLength, getBytes, getBytesCopy, hexlify, toBeHex, assertArgument } from \"../utils/index.js\";\nimport { Signature } from \"./signature.js\";\n/**\n * A **SigningKey** provides high-level access to the elliptic curve\n * cryptography (ECC) operations and key management.\n */\nexport class SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n assertArgument(dataLength(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = hexlify(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() { return this.#privateKey; }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() { return SigningKey.computePublicKey(this.#privateKey); }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() { return SigningKey.computePublicKey(this.#privateKey, true); }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest) {\n assertArgument(dataLength(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = secp256k1.sign(getBytesCopy(digest), getBytesCopy(this.#privateKey), {\n lowS: true\n });\n return Signature.from({\n r: toBeHex(sig.r, 32),\n s: toBeHex(sig.s, 32),\n v: (sig.recovery ? 0x1c : 0x1b)\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = SigningKey.computePublicKey(other);\n return hexlify(secp256k1.getSharedSecret(getBytesCopy(this.#privateKey), getBytes(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = getBytes(key, \"key\");\n // private key\n if (bytes.length === 32) {\n const pubKey = secp256k1.getPublicKey(bytes, !!compressed);\n return hexlify(pubKey);\n }\n // raw public key; use uncompressed key with 0x04 prefix\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 0x04;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1.ProjectivePoint.fromHex(bytes);\n return hexlify(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest, signature) {\n assertArgument(dataLength(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = Signature.from(signature);\n let secpSig = secp256k1.Signature.fromCompact(getBytesCopy(concat([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey(getBytesCopy(digest));\n assertArgument(pubKey != null, \"invalid signautre for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1.ProjectivePoint.fromHex(SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n}\n//# sourceMappingURL=signing-key.js.map","/**\n * A fundamental building block of Ethereum is the underlying\n * cryptographic primitives.\n *\n * @_section: api/crypto:Cryptographic Functions [about-crypto]\n */\nnull;\n// We import all these so we can export lock()\nimport { computeHmac } from \"./hmac.js\";\nimport { keccak256 } from \"./keccak.js\";\nimport { ripemd160 } from \"./ripemd160.js\";\nimport { pbkdf2 } from \"./pbkdf2.js\";\nimport { randomBytes } from \"./random.js\";\nimport { scrypt, scryptSync } from \"./scrypt.js\";\nimport { sha256, sha512 } from \"./sha2.js\";\nexport { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync };\nexport { SigningKey } from \"./signing-key.js\";\nexport { Signature } from \"./signature.js\";\n/**\n * Once called, prevents any future change to the underlying cryptographic\n * primitives using the ``.register`` feature for hooks.\n */\nfunction lock() {\n computeHmac.lock();\n keccak256.lock();\n pbkdf2.lock();\n randomBytes.lock();\n ripemd160.lock();\n scrypt.lock();\n scryptSync.lock();\n sha256.lock();\n sha512.lock();\n randomBytes.lock();\n}\nexport { lock };\n//# sourceMappingURL=index.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { getBytes, assertArgument } from \"../utils/index.js\";\nconst BN_0 = BigInt(0);\nconst BN_36 = BigInt(36);\nfunction getChecksumAddress(address) {\n // if (!isHexString(address, 20)) {\n // logger.throwArgumentError(\"invalid address\", \"address\", address);\n // }\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n const hashed = getBytes(keccak256(expanded));\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n}\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n// Create lookup table\nconst ibanLookup = {};\nfor (let i = 0; i < 10; i++) {\n ibanLookup[String(i)] = String(i);\n}\nfor (let i = 0; i < 26; i++) {\n ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);\n}\n// How many decimal digits can we process? (for 64-bit float, this is 15)\n// i.e. Math.floor(Math.log10(Number.MAX_SAFE_INTEGER));\nconst safeDigits = 15;\nfunction ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) {\n checksum = \"0\" + checksum;\n }\n return checksum;\n}\n;\nconst Base36 = (function () {\n ;\n const result = {};\n for (let i = 0; i < 36; i++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i];\n result[key] = BigInt(i);\n }\n return result;\n})();\nfunction fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i = 0; i < value.length; i++) {\n result = result * BN_36 + Base36[value[i]];\n }\n return result;\n}\n/**\n * Returns a normalized and checksumed address for %%address%%.\n * This accepts non-checksum addresses, checksum addresses and\n * [[getIcapAddress]] formats.\n *\n * The checksum in Ethereum uses the capitalization (upper-case\n * vs lower-case) of the characters within an address to encode\n * its checksum, which offers, on average, a checksum of 15-bits.\n *\n * If %%address%% contains both upper-case and lower-case, it is\n * assumed to already be a checksum address and its checksum is\n * validated, and if the address fails its expected checksum an\n * error is thrown.\n *\n * If you wish the checksum of %%address%% to be ignore, it should\n * be converted to lower-case (i.e. ``.toLowercase()``) before\n * being passed in. This should be a very rare situation though,\n * that you wish to bypass the safegaurds in place to protect\n * against an address that has been incorrectly copied from another\n * source.\n *\n * @example:\n * // Adds the checksum (via upper-casing specific letters)\n * getAddress(\"0x8ba1f109551bd432803012645ac136ddd64dba72\")\n * //_result:\n *\n * // Converts ICAP address and adds checksum\n * getAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\");\n * //_result:\n *\n * // Throws an error if an address contains mixed case,\n * // but the checksum fails\n * getAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_error:\n */\nexport function getAddress(address) {\n assertArgument(typeof (address) === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n // Missing the 0x prefix\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n // It is a checksummed address with a bad checksum\n assertArgument(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n // Maybe ICAP? (we only support direct mode)\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n // It is an ICAP address with a bad checksum\n assertArgument(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n assertArgument(false, \"invalid address\", \"address\", address);\n}\n/**\n * The [ICAP Address format](link-icap) format is an early checksum\n * format which attempts to be compatible with the banking\n * industry [IBAN format](link-wiki-iban) for bank accounts.\n *\n * It is no longer common or a recommended format.\n *\n * @example:\n * getIcapAddress(\"0x8ba1f109551bd432803012645ac136ddd64dba72\");\n * //_result:\n *\n * getIcapAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\");\n * //_result:\n *\n * // Throws an error if the ICAP checksum is wrong\n * getIcapAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK37\");\n * //_error:\n */\nexport function getIcapAddress(address) {\n //let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n let base36 = BigInt(getAddress(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n//# sourceMappingURL=address.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { concat, dataSlice, getBigInt, getBytes, encodeRlp, assertArgument } from \"../utils/index.js\";\nimport { getAddress } from \"./address.js\";\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\n/**\n * Returns the address that would result from a ``CREATE`` for %%tx%%.\n *\n * This can be used to compute the address a contract will be\n * deployed to by an EOA when sending a deployment transaction (i.e.\n * when the ``to`` address is ``null``).\n *\n * This can also be used to compute the address a contract will be\n * deployed to by a contract, by using the contract's address as the\n * ``to`` and the contract's nonce.\n *\n * @example\n * from = \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\";\n * nonce = 5;\n *\n * getCreateAddress({ from, nonce });\n * //_result:\n */\nexport function getCreateAddress(tx) {\n const from = getAddress(tx.from);\n const nonce = getBigInt(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n }\n else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n }\n else {\n nonceHex = \"0x\" + nonceHex;\n }\n return getAddress(dataSlice(keccak256(encodeRlp([from, nonceHex])), 12));\n}\n/**\n * Returns the address that would result from a ``CREATE2`` operation\n * with the given %%from%%, %%salt%% and %%initCodeHash%%.\n *\n * To compute the %%initCodeHash%% from a contract's init code, use\n * the [[keccak256]] function.\n *\n * For a quick overview and example of ``CREATE2``, see [[link-ricmoo-wisps]].\n *\n * @example\n * // The address of the contract\n * from = \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\"\n *\n * // The salt\n * salt = id(\"HelloWorld\")\n *\n * // The hash of the initCode\n * initCode = \"0x6394198df16000526103ff60206004601c335afa6040516060f3\";\n * initCodeHash = keccak256(initCode)\n *\n * getCreate2Address(from, salt, initCodeHash)\n * //_result:\n */\nexport function getCreate2Address(_from, _salt, _initCodeHash) {\n const from = getAddress(_from);\n const salt = getBytes(_salt, \"salt\");\n const initCodeHash = getBytes(_initCodeHash, \"initCodeHash\");\n assertArgument(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n assertArgument(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return getAddress(dataSlice(keccak256(concat([\"0xff\", from, salt, initCodeHash])), 12));\n}\n//# sourceMappingURL=contract-address.js.map","import { assert, assertArgument } from \"../utils/index.js\";\nimport { getAddress } from \"./address.js\";\n/**\n * Returns true if %%value%% is an object which implements the\n * [[Addressable]] interface.\n *\n * @example:\n * // Wallets and AbstractSigner sub-classes\n * isAddressable(Wallet.createRandom())\n * //_result:\n *\n * // Contracts\n * contract = new Contract(\"dai.tokens.ethers.eth\", [ ], provider)\n * isAddressable(contract)\n * //_result:\n */\nexport function isAddressable(value) {\n return (value && typeof (value.getAddress) === \"function\");\n}\n/**\n * Returns true if %%value%% is a valid address.\n *\n * @example:\n * // Valid address\n * isAddress(\"0x8ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_result:\n *\n * // Valid ICAP address\n * isAddress(\"XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36\")\n * //_result:\n *\n * // Invalid checksum\n * isAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBa72\")\n * //_result:\n *\n * // Invalid ICAP checksum\n * isAddress(\"0x8Ba1f109551bD432803012645Ac136ddd64DBA72\")\n * //_result:\n *\n * // Not an address (an ENS name requires a provided and an\n * // asynchronous API to access)\n * isAddress(\"ricmoo.eth\")\n * //_result:\n */\nexport function isAddress(value) {\n try {\n getAddress(value);\n return true;\n }\n catch (error) { }\n return false;\n}\nasync function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n assert(typeof (target) !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n assertArgument(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return getAddress(result);\n}\n/**\n * Resolves to an address for the %%target%%, which may be any\n * supported address type, an [[Addressable]] or a Promise which\n * resolves to an address.\n *\n * If an ENS name is provided, but that name has not been correctly\n * configured a [[UnconfiguredNameError]] is thrown.\n *\n * @example:\n * addr = \"0x6B175474E89094C44Da98b954EedeAC495271d0F\"\n *\n * // Addresses are return synchronously\n * resolveAddress(addr, provider)\n * //_result:\n *\n * // Address promises are resolved asynchronously\n * resolveAddress(Promise.resolve(addr))\n * //_result:\n *\n * // ENS names are resolved asynchronously\n * resolveAddress(\"dai.tokens.ethers.eth\", provider)\n * //_result:\n *\n * // Addressable objects are resolved asynchronously\n * contract = new Contract(addr, [ ])\n * resolveAddress(contract, provider)\n * //_result:\n *\n * // Unconfigured ENS names reject\n * resolveAddress(\"nothing-here.ricmoo.eth\", provider)\n * //_error:\n *\n * // ENS names require a NameResolver object passed in\n * // (notice the provider was omitted)\n * resolveAddress(\"nothing-here.ricmoo.eth\")\n * //_error:\n */\nexport function resolveAddress(target, resolver) {\n if (typeof (target) === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return getAddress(target);\n }\n assert(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n }\n else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n }\n else if (target && typeof (target.then) === \"function\") {\n return checkAddress(target, target);\n }\n assertArgument(false, \"unsupported addressable value\", \"target\", target);\n}\n//# sourceMappingURL=checks.js.map","/**\n * A Typed object allows a value to have its type explicitly\n * specified.\n *\n * For example, in Solidity, the value ``45`` could represent a\n * ``uint8`` or a ``uint256``. The value ``0x1234`` could represent\n * a ``bytes2`` or ``bytes``.\n *\n * Since JavaScript has no meaningful way to explicitly inform any\n * APIs which what the type is, this allows transparent interoperation\n * with Soldity.\n *\n * @_subsection: api/abi:Typed Values\n */\nimport { assertPrivate, defineProperties } from \"../utils/index.js\";\nconst _gaurd = {};\nfunction n(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n}\nfunction b(value, size) {\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `bytes${(size) ? size : \"\"}`, value, { size });\n}\nconst _typedSymbol = Symbol.for(\"_ethers_typed\");\n/**\n * The **Typed** class to wrap values providing explicit type information.\n */\nexport class Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n assertPrivate(_gaurd, gaurd, \"Typed\");\n defineProperties(this, { _typedSymbol, type, value });\n this.#options = options;\n // Check the value is valid\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n }\n else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n }\n else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v) => v.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!(this.type.match(/^u?int[0-9]+$/));\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return (this.type === \"string\");\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return (this.value).length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v) { return n(v, 8); }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v) { return n(v, 16); }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v) { return n(v, 24); }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v) { return n(v, 32); }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v) { return n(v, 40); }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v) { return n(v, 48); }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v) { return n(v, 56); }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v) { return n(v, 64); }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v) { return n(v, 72); }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v) { return n(v, 80); }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v) { return n(v, 88); }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v) { return n(v, 96); }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v) { return n(v, 104); }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v) { return n(v, 112); }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v) { return n(v, 120); }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v) { return n(v, 128); }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v) { return n(v, 136); }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v) { return n(v, 144); }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v) { return n(v, 152); }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v) { return n(v, 160); }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v) { return n(v, 168); }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v) { return n(v, 176); }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v) { return n(v, 184); }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v) { return n(v, 192); }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v) { return n(v, 200); }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v) { return n(v, 208); }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v) { return n(v, 216); }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v) { return n(v, 224); }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v) { return n(v, 232); }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v) { return n(v, 240); }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v) { return n(v, 248); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v) { return n(v, 256); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v) { return n(v, 256); }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v) { return n(v, -8); }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v) { return n(v, -16); }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v) { return n(v, -24); }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v) { return n(v, -32); }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v) { return n(v, -40); }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v) { return n(v, -48); }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v) { return n(v, -56); }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v) { return n(v, -64); }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v) { return n(v, -72); }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v) { return n(v, -80); }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v) { return n(v, -88); }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v) { return n(v, -96); }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v) { return n(v, -104); }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v) { return n(v, -112); }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v) { return n(v, -120); }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v) { return n(v, -128); }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v) { return n(v, -136); }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v) { return n(v, -144); }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v) { return n(v, -152); }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v) { return n(v, -160); }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v) { return n(v, -168); }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v) { return n(v, -176); }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v) { return n(v, -184); }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v) { return n(v, -192); }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v) { return n(v, -200); }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v) { return n(v, -208); }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v) { return n(v, -216); }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v) { return n(v, -224); }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v) { return n(v, -232); }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v) { return n(v, -240); }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v) { return n(v, -248); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v) { return n(v, -256); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v) { return n(v, -256); }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v) { return b(v, 1); }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v) { return b(v, 2); }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v) { return b(v, 3); }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v) { return b(v, 4); }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v) { return b(v, 5); }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v) { return b(v, 6); }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v) { return b(v, 7); }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v) { return b(v, 8); }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v) { return b(v, 9); }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v) { return b(v, 10); }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v) { return b(v, 11); }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v) { return b(v, 12); }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v) { return b(v, 13); }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v) { return b(v, 14); }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v) { return b(v, 15); }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v) { return b(v, 16); }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v) { return b(v, 17); }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v) { return b(v, 18); }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v) { return b(v, 19); }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v) { return b(v, 20); }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v) { return b(v, 21); }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v) { return b(v, 22); }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v) { return b(v, 23); }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v) { return b(v, 24); }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v) { return b(v, 25); }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v) { return b(v, 26); }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v) { return b(v, 27); }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v) { return b(v, 28); }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v) { return b(v, 29); }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v) { return b(v, 30); }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v) { return b(v, 31); }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v) { return b(v, 32); }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v) { return new Typed(_gaurd, \"address\", v); }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v) { return new Typed(_gaurd, \"bool\", !!v); }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v) { return new Typed(_gaurd, \"bytes\", v); }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v) { return new Typed(_gaurd, \"string\", v); }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v, dynamic) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"array\", v, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v, name) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"tuple\", v, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v) {\n return new Typed(_gaurd, \"overrides\", Object.assign({}, v));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return (value\n && typeof (value) === \"object\"\n && \"_typedSymbol\" in value\n && value._typedSymbol === _typedSymbol);\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n}\n//# sourceMappingURL=typed.js.map","import { getAddress } from \"../../address/index.js\";\nimport { toBeHex } from \"../../utils/maths.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class AddressCoder extends Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = Typed.dereference(_value, \"string\");\n try {\n value = getAddress(value);\n }\n catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return getAddress(toBeHex(reader.readValue(), 20));\n }\n}\n//# sourceMappingURL=address.js.map","import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map","import { defineProperties, isError, assert, assertArgument, assertArgumentCount } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder, Result, WordSize, Writer } from \"./abstract-coder.js\";\nimport { AnonymousCoder } from \"./anonymous.js\";\n/**\n * @_ignore\n */\nexport function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n }\n else if (values && typeof (values) === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n assert(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n assert(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n }\n else {\n assertArgument(false, \"invalid tuple value\", \"tuple\", values);\n }\n assertArgument(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new Writer();\n let dynamicWriter = new Writer();\n let updateFuncs = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n }\n else {\n coder.encode(staticWriter, value);\n }\n });\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\n/**\n * @_ignore\n */\nexport function unpack(reader, coders) {\n let values = [];\n let keys = [];\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n }\n catch (error) {\n // Cannot recover from this\n if (isError(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n else {\n try {\n value = coder.decode(reader);\n }\n catch (error) {\n // Cannot recover from this\n if (isError(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == undefined) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return Result.fromItems(values, keys);\n}\n/**\n * @_ignore\n */\nexport class ArrayCoder extends Coder {\n coder;\n length;\n constructor(coder, length, localName) {\n const type = (coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n defineProperties(this, { coder, length });\n }\n defaultValue() {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n assertArgumentCount(value.length, count, \"coder array\" + (this.localName ? (\" \" + this.localName) : \"\"));\n let coders = [];\n for (let i = 0; i < value.length; i++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n assert(count * WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i = 0; i < count; i++) {\n coders.push(new AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n}\n//# sourceMappingURL=array.js.map","import { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class BooleanCoder extends Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n}\n//# sourceMappingURL=boolean.js.map","import { getBytesCopy, hexlify } from \"../../utils/index.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class DynamicBytesCoder extends Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = getBytesCopy(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n}\n/**\n * @_ignore\n */\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return hexlify(super.decode(reader));\n }\n}\n//# sourceMappingURL=bytes.js.map","import { defineProperties, getBytesCopy, hexlify } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class FixedBytesCoder extends Coder {\n size;\n constructor(size, localName) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n defineProperties(this, { size }, { size: \"number\" });\n }\n defaultValue() {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = getBytesCopy(Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return hexlify(reader.readBytes(this.size));\n }\n}\n//# sourceMappingURL=fixed-bytes.js.map","import { Coder } from \"./abstract-coder.js\";\nconst Empty = new Uint8Array([]);\n/**\n * @_ignore\n */\nexport class NullCoder extends Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n}\n//# sourceMappingURL=null.js.map","import { defineProperties, fromTwos, getBigInt, mask, toTwos } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder, WordSize } from \"./abstract-coder.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n/**\n * @_ignore\n */\nexport class NumberCoder extends Coder {\n size;\n signed;\n constructor(size, signed, localName) {\n const name = ((signed ? \"int\" : \"uint\") + (size * 8));\n super(name, name, localName, false);\n defineProperties(this, { size, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = getBigInt(Typed.dereference(_value, this.type));\n // Check bounds are safe for encoding\n let maxUintValue = mask(BN_MAX_UINT256, WordSize * 8);\n if (this.signed) {\n let bounds = mask(maxUintValue, (this.size * 8) - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = toTwos(value, 8 * WordSize);\n }\n else if (value < BN_0 || value > mask(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = mask(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = fromTwos(value, this.size * 8);\n }\n return value;\n }\n}\n//# sourceMappingURL=number.js.map","import { toUtf8Bytes, toUtf8String } from \"../../utils/utf8.js\";\nimport { Typed } from \"../typed.js\";\nimport { DynamicBytesCoder } from \"./bytes.js\";\n/**\n * @_ignore\n */\nexport class StringCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, toUtf8Bytes(Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return toUtf8String(super.decode(reader));\n }\n}\n//# sourceMappingURL=string.js.map","import { defineProperties } from \"../../utils/properties.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\nimport { pack, unpack } from \"./array.js\";\n/**\n * @_ignore\n */\nexport class TupleCoder extends Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n super(\"tuple\", type, localName, dynamic);\n defineProperties(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n // Add named values\n this.coders.forEach((coder, index) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = Typed.dereference(_value, \"tuple\");\n return pack(writer, this.coders, value);\n }\n decode(reader) {\n return unpack(reader, this.coders);\n }\n}\n//# sourceMappingURL=tuple.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { toUtf8Bytes } from \"../utils/index.js\";\n/**\n * A simple hashing function which operates on UTF-8 strings to\n * compute an 32-byte identifier.\n *\n * This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes\n * the [[keccak256]].\n *\n * @example:\n * id(\"hello world\")\n * //_result:\n */\nexport function id(value) {\n return keccak256(toUtf8Bytes(value));\n}\n//# sourceMappingURL=id.js.map","// created 2023-09-25T01:01:55.148Z\n// compressed base64-encoded blob for include-ens data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: 0565ed049b9cf1614bb9e11ba7d8ac6a6fb96c893253d890f7e2b2884b9ded32\nvar COMPRESSED$1 = 'AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRAN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jYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI';\nconst FENCED = new Map([[8217,\"apostrophe\"],[8260,\"fraction slash\"],[12539,\"middle dot\"]]);\nconst NSM_MAX = 4;\n\nfunction decode_arithmetic(bytes) {\r\n\tlet pos = 0;\r\n\tfunction u16() { return (bytes[pos++] << 8) | bytes[pos++]; }\r\n\t\r\n\t// decode the frequency table\r\n\tlet symbol_count = u16();\r\n\tlet total = 1;\r\n\tlet acc = [0, 1]; // first symbol has frequency 1\r\n\tfor (let i = 1; i < symbol_count; i++) {\r\n\t\tacc.push(total += u16());\r\n\t}\r\n\r\n\t// skip the sized-payload that the last 3 symbols index into\r\n\tlet skip = u16();\r\n\tlet pos_payload = pos;\r\n\tpos += skip;\r\n\r\n\tlet read_width = 0;\r\n\tlet read_buffer = 0; \r\n\tfunction read_bit() {\r\n\t\tif (read_width == 0) {\r\n\t\t\t// this will read beyond end of buffer\r\n\t\t\t// but (undefined|0) => zero pad\r\n\t\t\tread_buffer = (read_buffer << 8) | bytes[pos++];\r\n\t\t\tread_width = 8;\r\n\t\t}\r\n\t\treturn (read_buffer >> --read_width) & 1;\r\n\t}\r\n\r\n\tconst N = 31;\r\n\tconst FULL = 2**N;\r\n\tconst HALF = FULL >>> 1;\r\n\tconst QRTR = HALF >> 1;\r\n\tconst MASK = FULL - 1;\r\n\r\n\t// fill register\r\n\tlet register = 0;\r\n\tfor (let i = 0; i < N; i++) register = (register << 1) | read_bit();\r\n\r\n\tlet symbols = [];\r\n\tlet low = 0;\r\n\tlet range = FULL; // treat like a float\r\n\twhile (true) {\r\n\t\tlet value = Math.floor((((register - low + 1) * total) - 1) / range);\r\n\t\tlet start = 0;\r\n\t\tlet end = symbol_count;\r\n\t\twhile (end - start > 1) { // binary search\r\n\t\t\tlet mid = (start + end) >>> 1;\r\n\t\t\tif (value < acc[mid]) {\r\n\t\t\t\tend = mid;\r\n\t\t\t} else {\r\n\t\t\t\tstart = mid;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (start == 0) break; // first symbol is end mark\r\n\t\tsymbols.push(start);\r\n\t\tlet a = low + Math.floor(range * acc[start] / total);\r\n\t\tlet b = low + Math.floor(range * acc[start+1] / total) - 1;\r\n\t\twhile (((a ^ b) & HALF) == 0) {\r\n\t\t\tregister = (register << 1) & MASK | read_bit();\r\n\t\t\ta = (a << 1) & MASK;\r\n\t\t\tb = (b << 1) & MASK | 1;\r\n\t\t}\r\n\t\twhile (a & ~b & QRTR) {\r\n\t\t\tregister = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit();\r\n\t\t\ta = (a << 1) ^ HALF;\r\n\t\t\tb = ((b ^ HALF) << 1) | HALF | 1;\r\n\t\t}\r\n\t\tlow = a;\r\n\t\trange = 1 + b - a;\r\n\t}\r\n\tlet offset = symbol_count - 4;\r\n\treturn symbols.map(x => { // index into payload\r\n\t\tswitch (x - offset) {\r\n\t\t\tcase 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]);\r\n\t\t\tcase 1: return offset + bytes[pos_payload++];\r\n\t\t\tdefault: return x - 1;\r\n\t\t}\r\n\t});\r\n}\t\r\n\r\n// returns an iterator which returns the next symbol\r\nfunction read_payload(v) {\r\n\tlet pos = 0;\r\n\treturn () => v[pos++];\r\n}\r\nfunction read_compressed_payload(s) {\r\n\treturn read_payload(decode_arithmetic(unsafe_atob(s)));\r\n}\r\n\r\n// unsafe in the sense:\r\n// expected well-formed Base64 w/o padding \r\n// 20220922: added for https://github.com/adraffy/ens-normalize.js/issues/4\r\nfunction unsafe_atob(s) {\r\n\tlet lookup = [];\r\n\t[...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'].forEach((c, i) => lookup[c.charCodeAt(0)] = i);\r\n\tlet n = s.length;\r\n\tlet ret = new Uint8Array((6 * n) >> 3);\r\n\tfor (let i = 0, pos = 0, width = 0, carry = 0; i < n; i++) {\r\n\t\tcarry = (carry << 6) | lookup[s.charCodeAt(i)];\r\n\t\twidth += 6;\r\n\t\tif (width >= 8) {\r\n\t\t\tret[pos++] = (carry >> (width -= 8));\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// eg. [0,1,2,3...] => [0,-1,1,-2,...]\r\nfunction signed(i) { \r\n\treturn (i & 1) ? (~i >> 1) : (i >> 1);\r\n}\r\n\r\nfunction read_deltas(n, next) {\r\n\tlet v = Array(n);\r\n\tfor (let i = 0, x = 0; i < n; i++) v[i] = x += signed(next());\r\n\treturn v;\r\n}\r\n\r\n// [123][5] => [0 3] [1 1] [0 0]\r\nfunction read_sorted(next, prev = 0) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet x = next();\r\n\t\tlet n = next();\r\n\t\tif (!n) break;\r\n\t\tprev += x;\r\n\t\tfor (let i = 0; i < n; i++) {\r\n\t\t\tret.push(prev + i);\r\n\t\t}\r\n\t\tprev += n + 1;\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction read_sorted_arrays(next) {\r\n\treturn read_array_while(() => { \r\n\t\tlet v = read_sorted(next);\r\n\t\tif (v.length) return v;\r\n\t});\r\n}\r\n\r\n// returns map of x => ys\r\nfunction read_mapped(next) {\r\n\tlet ret = [];\r\n\twhile (true) {\r\n\t\tlet w = next();\r\n\t\tif (w == 0) break;\r\n\t\tret.push(read_linear_table(w, next));\r\n\t}\r\n\twhile (true) {\r\n\t\tlet w = next() - 1;\r\n\t\tif (w < 0) break;\r\n\t\tret.push(read_replacement_table(w, next));\r\n\t}\r\n\treturn ret.flat();\r\n}\r\n\r\n// read until next is falsy\r\n// return array of read values\r\nfunction read_array_while(next) {\r\n\tlet v = [];\r\n\twhile (true) {\r\n\t\tlet x = next(v.length);\r\n\t\tif (!x) break;\r\n\t\tv.push(x);\r\n\t}\r\n\treturn v;\r\n}\r\n\r\n// read w columns of length n\r\n// return as n rows of length w\r\nfunction read_transposed(n, w, next) {\r\n\tlet m = Array(n).fill().map(() => []);\r\n\tfor (let i = 0; i < w; i++) {\r\n\t\tread_deltas(n, next).forEach((x, j) => m[j].push(x));\r\n\t}\r\n\treturn m;\r\n}\r\n \r\n// returns [[x, ys], [x+dx, ys+dy], [x+2*dx, ys+2*dy], ...]\r\n// where dx/dy = steps, n = run size, w = length of y\r\nfunction read_linear_table(w, next) {\r\n\tlet dx = 1 + next();\r\n\tlet dy = next();\r\n\tlet vN = read_array_while(next);\r\n\tlet m = read_transposed(vN.length, 1+w, next);\r\n\treturn m.flatMap((v, i) => {\r\n\t\tlet [x, ...ys] = v;\r\n\t\treturn Array(vN[i]).fill().map((_, j) => {\r\n\t\t\tlet j_dy = j * dy;\r\n\t\t\treturn [x + j * dx, ys.map(y => y + j_dy)];\r\n\t\t});\r\n\t});\r\n}\r\n\r\n// return [[x, ys...], ...]\r\n// where w = length of y\r\nfunction read_replacement_table(w, next) { \r\n\tlet n = 1 + next();\r\n\tlet m = read_transposed(n, 1+w, next);\r\n\treturn m.map(v => [v[0], v.slice(1)]);\r\n}\r\n\r\n\r\nfunction read_trie(next) {\r\n\tlet ret = [];\r\n\tlet sorted = read_sorted(next); \r\n\texpand(decode([]), []);\r\n\treturn ret; // not sorted\r\n\tfunction decode(Q) { // characters that lead into this node\r\n\t\tlet S = next(); // state: valid, save, check\r\n\t\tlet B = read_array_while(() => { // buckets leading to new nodes\r\n\t\t\tlet cps = read_sorted(next).map(i => sorted[i]);\r\n\t\t\tif (cps.length) return decode(cps);\r\n\t\t});\r\n\t\treturn {S, B, Q};\r\n\t}\r\n\tfunction expand({S, B}, cps, saved) {\r\n\t\tif (S & 4 && saved === cps[cps.length-1]) return;\r\n\t\tif (S & 2) saved = cps[cps.length-1];\r\n\t\tif (S & 1) ret.push(cps); \r\n\t\tfor (let br of B) {\r\n\t\t\tfor (let cp of br.Q) {\r\n\t\t\t\texpand(br, [...cps, cp], saved);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\n\nfunction hex_cp(cp) {\r\n\treturn cp.toString(16).toUpperCase().padStart(2, '0');\r\n}\r\n\r\nfunction quote_cp(cp) {\r\n\treturn `{${hex_cp(cp)}}`; // raffy convention: like \"\\u{X}\" w/o the \"\\u\"\r\n}\r\n\r\n/*\r\nexport function explode_cp(s) {\r\n\treturn [...s].map(c => c.codePointAt(0));\r\n}\r\n*/\r\nfunction explode_cp(s) { // this is about 2x faster\r\n\tlet cps = [];\r\n\tfor (let pos = 0, len = s.length; pos < len; ) {\r\n\t\tlet cp = s.codePointAt(pos);\r\n\t\tpos += cp < 0x10000 ? 1 : 2;\r\n\t\tcps.push(cp);\r\n\t}\r\n\treturn cps;\r\n}\r\n\r\nfunction str_from_cps(cps) {\r\n\tconst chunk = 4096;\r\n\tlet len = cps.length;\r\n\tif (len < chunk) return String.fromCodePoint(...cps);\r\n\tlet buf = [];\r\n\tfor (let i = 0; i < len; ) {\r\n\t\tbuf.push(String.fromCodePoint(...cps.slice(i, i += chunk)));\r\n\t}\r\n\treturn buf.join('');\r\n}\r\n\r\nfunction compare_arrays(a, b) {\r\n\tlet n = a.length;\r\n\tlet c = n - b.length;\r\n\tfor (let i = 0; c == 0 && i < n; i++) c = a[i] - b[i];\r\n\treturn c;\r\n}\n\n// created 2023-09-25T01:01:55.148Z\n// compressed base64-encoded blob for include-nf data\n// source: https://github.com/adraffy/ens-normalize.js/blob/main/src/make.js\n// see: https://github.com/adraffy/ens-normalize.js#security\n// SHA-256: a974b6f8541fc29d919bc85118af0a44015851fab5343f8679cb31be2bdb209e\nvar COMPRESSED = 'AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCO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AllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g';\n\n// https://unicode.org/reports/tr15/\r\n// for reference implementation\r\n// see: /derive/nf.js\r\n\r\n\r\n// algorithmic hangul\r\n// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf (page 144)\r\nconst S0 = 0xAC00;\r\nconst L0 = 0x1100;\r\nconst V0 = 0x1161;\r\nconst T0 = 0x11A7;\r\nconst L_COUNT = 19;\r\nconst V_COUNT = 21;\r\nconst T_COUNT = 28;\r\nconst N_COUNT = V_COUNT * T_COUNT;\r\nconst S_COUNT = L_COUNT * N_COUNT;\r\nconst S1 = S0 + S_COUNT;\r\nconst L1 = L0 + L_COUNT;\r\nconst V1 = V0 + V_COUNT;\r\nconst T1 = T0 + T_COUNT;\r\n\r\nfunction unpack_cc(packed) {\r\n\treturn (packed >> 24) & 0xFF;\r\n}\r\nfunction unpack_cp(packed) {\r\n\treturn packed & 0xFFFFFF;\r\n}\r\n\r\nlet SHIFTED_RANK, EXCLUSIONS, DECOMP, RECOMP;\r\n\r\nfunction init$1() {\r\n\t//console.time('nf');\r\n\tlet r = read_compressed_payload(COMPRESSED);\r\n\tSHIFTED_RANK = new Map(read_sorted_arrays(r).flatMap((v, i) => v.map(x => [x, (i+1) << 24]))); // pre-shifted\r\n\tEXCLUSIONS = new Set(read_sorted(r));\r\n\tDECOMP = new Map();\r\n\tRECOMP = new Map();\r\n\tfor (let [cp, cps] of read_mapped(r)) {\r\n\t\tif (!EXCLUSIONS.has(cp) && cps.length == 2) {\r\n\t\t\tlet [a, b] = cps;\r\n\t\t\tlet bucket = RECOMP.get(a);\r\n\t\t\tif (!bucket) {\r\n\t\t\t\tbucket = new Map();\r\n\t\t\t\tRECOMP.set(a, bucket);\r\n\t\t\t}\r\n\t\t\tbucket.set(b, cp);\r\n\t\t}\r\n\t\tDECOMP.set(cp, cps.reverse()); // stored reversed\r\n\t}\r\n\t//console.timeEnd('nf');\r\n\t// 20230905: 11ms\r\n}\r\n\r\nfunction is_hangul(cp) {\r\n\treturn cp >= S0 && cp < S1;\r\n}\r\n\r\nfunction compose_pair(a, b) {\r\n\tif (a >= L0 && a < L1 && b >= V0 && b < V1) {\r\n\t\treturn S0 + (a - L0) * N_COUNT + (b - V0) * T_COUNT;\r\n\t} else if (is_hangul(a) && b > T0 && b < T1 && (a - S0) % T_COUNT == 0) {\r\n\t\treturn a + (b - T0);\r\n\t} else {\r\n\t\tlet recomp = RECOMP.get(a);\r\n\t\tif (recomp) {\r\n\t\t\trecomp = recomp.get(b);\r\n\t\t\tif (recomp) {\r\n\t\t\t\treturn recomp;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}\r\n}\r\n\r\nfunction decomposed(cps) {\r\n\tif (!SHIFTED_RANK) init$1();\r\n\tlet ret = [];\r\n\tlet buf = [];\r\n\tlet check_order = false;\r\n\tfunction add(cp) {\r\n\t\tlet cc = SHIFTED_RANK.get(cp);\r\n\t\tif (cc) {\r\n\t\t\tcheck_order = true;\r\n\t\t\tcp |= cc;\r\n\t\t}\r\n\t\tret.push(cp);\r\n\t}\r\n\tfor (let cp of cps) {\r\n\t\twhile (true) {\r\n\t\t\tif (cp < 0x80) {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t} else if (is_hangul(cp)) {\r\n\t\t\t\tlet s_index = cp - S0;\r\n\t\t\t\tlet l_index = s_index / N_COUNT | 0;\r\n\t\t\t\tlet v_index = (s_index % N_COUNT) / T_COUNT | 0;\r\n\t\t\t\tlet t_index = s_index % T_COUNT;\r\n\t\t\t\tadd(L0 + l_index);\r\n\t\t\t\tadd(V0 + v_index);\r\n\t\t\t\tif (t_index > 0) add(T0 + t_index);\r\n\t\t\t} else {\r\n\t\t\t\tlet mapped = DECOMP.get(cp);\r\n\t\t\t\tif (mapped) {\r\n\t\t\t\t\tbuf.push(...mapped);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tadd(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!buf.length) break;\r\n\t\t\tcp = buf.pop();\r\n\t\t}\r\n\t}\r\n\tif (check_order && ret.length > 1) {\r\n\t\tlet prev_cc = unpack_cc(ret[0]);\r\n\t\tfor (let i = 1; i < ret.length; i++) {\r\n\t\t\tlet cc = unpack_cc(ret[i]);\r\n\t\t\tif (cc == 0 || prev_cc <= cc) {\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tlet j = i-1;\r\n\t\t\twhile (true) {\r\n\t\t\t\tlet tmp = ret[j+1];\r\n\t\t\t\tret[j+1] = ret[j];\r\n\t\t\t\tret[j] = tmp;\r\n\t\t\t\tif (!j) break;\r\n\t\t\t\tprev_cc = unpack_cc(ret[--j]);\r\n\t\t\t\tif (prev_cc <= cc) break;\r\n\t\t\t}\r\n\t\t\tprev_cc = unpack_cc(ret[i]);\r\n\t\t}\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction composed_from_decomposed(v) {\r\n\tlet ret = [];\r\n\tlet stack = [];\r\n\tlet prev_cp = -1;\r\n\tlet prev_cc = 0;\r\n\tfor (let packed of v) {\r\n\t\tlet cc = unpack_cc(packed);\r\n\t\tlet cp = unpack_cp(packed);\r\n\t\tif (prev_cp == -1) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tret.push(cp);\r\n\t\t\t}\r\n\t\t} else if (prev_cc > 0 && prev_cc >= cc) {\r\n\t\t\tif (cc == 0) {\r\n\t\t\t\tret.push(prev_cp, ...stack);\r\n\t\t\t\tstack.length = 0;\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t}\r\n\t\t\tprev_cc = cc;\r\n\t\t} else {\r\n\t\t\tlet composed = compose_pair(prev_cp, cp);\r\n\t\t\tif (composed >= 0) {\r\n\t\t\t\tprev_cp = composed;\r\n\t\t\t} else if (prev_cc == 0 && cc == 0) {\r\n\t\t\t\tret.push(prev_cp);\r\n\t\t\t\tprev_cp = cp;\r\n\t\t\t} else {\r\n\t\t\t\tstack.push(cp);\r\n\t\t\t\tprev_cc = cc;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (prev_cp >= 0) {\r\n\t\tret.push(prev_cp, ...stack);\t\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\n// note: cps can be iterable\r\nfunction nfd(cps) {\r\n\treturn decomposed(cps).map(unpack_cp);\r\n}\r\nfunction nfc(cps) {\r\n\treturn composed_from_decomposed(decomposed(cps));\r\n}\n\nconst HYPHEN = 0x2D;\r\nconst STOP = 0x2E;\r\nconst STOP_CH = '.';\r\nconst FE0F = 0xFE0F;\r\nconst UNIQUE_PH = 1;\r\n\r\n// 20230913: replace [...v] with Array_from(v) to avoid large spreads\r\nconst Array_from = x => Array.from(x); // Array.from.bind(Array);\r\n\r\nfunction group_has_cp(g, cp) {\r\n\t// 20230913: keep primary and secondary distinct instead of creating valid union\r\n\treturn g.P.has(cp) || g.Q.has(cp);\r\n}\r\n\r\nclass Emoji extends Array {\r\n\tget is_emoji() { return true; } // free tagging system\r\n}\r\n\r\nlet MAPPED, IGNORED, CM, NSM, ESCAPE, NFC_CHECK, GROUPS, WHOLE_VALID, WHOLE_MAP, VALID, EMOJI_LIST, EMOJI_ROOT;\r\n\r\nfunction init() {\r\n\tif (MAPPED) return;\r\n\t\r\n\tlet r = read_compressed_payload(COMPRESSED$1);\r\n\tconst read_sorted_array = () => read_sorted(r);\r\n\tconst read_sorted_set = () => new Set(read_sorted_array());\r\n\tconst set_add_many = (set, v) => v.forEach(x => set.add(x));\r\n\r\n\tMAPPED = new Map(read_mapped(r)); \r\n\tIGNORED = read_sorted_set(); // ignored characters are not valid, so just read raw codepoints\r\n\r\n\t/*\r\n\t// direct include from payload is smaller than the decompression code\r\n\tconst FENCED = new Map(read_array_while(() => {\r\n\t\tlet cp = r();\r\n\t\tif (cp) return [cp, read_str(r())];\r\n\t}));\r\n\t*/\r\n\t// 20230217: we still need all CM for proper error formatting\r\n\t// but norm only needs NSM subset that are potentially-valid\r\n\tCM = read_sorted_array();\r\n\tNSM = new Set(read_sorted_array().map(i => CM[i]));\r\n\tCM = new Set(CM);\r\n\t\r\n\tESCAPE = read_sorted_set(); // characters that should not be printed\r\n\tNFC_CHECK = read_sorted_set(); // only needed to illustrate ens_tokenize() transformations\r\n\r\n\tlet chunks = read_sorted_arrays(r);\r\n\tlet unrestricted = r();\r\n\t//const read_chunked = () => new Set(read_sorted_array().flatMap(i => chunks[i]).concat(read_sorted_array()));\r\n\tconst read_chunked = () => {\r\n\t\t// 20230921: build set in parts, 2x faster\r\n\t\tlet set = new Set();\r\n\t\tread_sorted_array().forEach(i => set_add_many(set, chunks[i]));\r\n\t\tset_add_many(set, read_sorted_array());\r\n\t\treturn set; \r\n\t};\r\n\tGROUPS = read_array_while(i => {\r\n\t\t// minifier property mangling seems unsafe\r\n\t\t// so these are manually renamed to single chars\r\n\t\tlet N = read_array_while(r).map(x => x+0x60);\r\n\t\tif (N.length) {\r\n\t\t\tlet R = i >= unrestricted; // unrestricted then restricted\r\n\t\t\tN[0] -= 32; // capitalize\r\n\t\t\tN = str_from_cps(N);\r\n\t\t\tif (R) N=`Restricted[${N}]`;\r\n\t\t\tlet P = read_chunked(); // primary\r\n\t\t\tlet Q = read_chunked(); // secondary\r\n\t\t\tlet M = !r(); // not-whitelisted, check for NSM\r\n\t\t\t// *** this code currently isn't needed ***\r\n\t\t\t/*\r\n\t\t\tlet V = [...P, ...Q].sort((a, b) => a-b); // derive: sorted valid\r\n\t\t\tlet M = r()-1; // number of combining mark\r\n\t\t\tif (M < 0) { // whitelisted\r\n\t\t\t\tM = new Map(read_array_while(() => {\r\n\t\t\t\t\tlet i = r();\r\n\t\t\t\t\tif (i) return [V[i-1], read_array_while(() => {\r\n\t\t\t\t\t\tlet v = read_array_while(r);\r\n\t\t\t\t\t\tif (v.length) return v.map(x => x-1);\r\n\t\t\t\t\t})];\r\n\t\t\t\t}));\r\n\t\t\t}*/\r\n\t\t\treturn {N, P, Q, M, R};\r\n\t\t}\r\n\t});\r\n\r\n\t// decode compressed wholes\r\n\tWHOLE_VALID = read_sorted_set();\r\n\tWHOLE_MAP = new Map();\r\n\tlet wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a, b) => a-b); // must be sorted\r\n\twholes.forEach((cp, i) => {\r\n\t\tlet d = r(); \r\n\t\tlet w = wholes[i] = d ? wholes[i-d] : {V: [], M: new Map()};\r\n\t\tw.V.push(cp); // add to member set\r\n\t\tif (!WHOLE_VALID.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, w); // register with whole map\r\n\t\t}\r\n\t});\r\n\r\n\t// compute confusable-extent complements\r\n\t// usage: WHOLE_MAP.get(cp).M.get(cp) = complement set\r\n\tfor (let {V, M} of new Set(WHOLE_MAP.values())) {\r\n\t\t// connect all groups that have each whole character\r\n\t\tlet recs = [];\r\n\t\tfor (let cp of V) {\r\n\t\t\tlet gs = GROUPS.filter(g => group_has_cp(g, cp));\r\n\t\t\tlet rec = recs.find(({G}) => gs.some(g => G.has(g)));\r\n\t\t\tif (!rec) {\r\n\t\t\t\trec = {G: new Set(), V: []};\r\n\t\t\t\trecs.push(rec);\r\n\t\t\t}\r\n\t\t\trec.V.push(cp);\r\n\t\t\tset_add_many(rec.G, gs);\r\n\t\t}\r\n\t\t// per character cache groups which are not a member of the extent\r\n\t\tlet union = recs.flatMap(x => Array_from(x.G)); // all of the groups used by this whole\r\n\t\tfor (let {G, V} of recs) {\r\n\t\t\tlet complement = new Set(union.filter(g => !G.has(g))); // groups not covered by the extent\r\n\t\t\tfor (let cp of V) {\r\n\t\t\t\tM.set(cp, complement); // this is the same reference\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// compute valid set\r\n\t// 20230924: VALID was union but can be re-used\r\n\tVALID = new Set(); // exists in 1+ groups\r\n\tlet multi = new Set(); // exists in 2+ groups\r\n\tconst add_to_union = cp => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\r\n\tfor (let g of GROUPS) {\r\n\t\tfor (let cp of g.P) add_to_union(cp);\r\n\t\tfor (let cp of g.Q) add_to_union(cp);\r\n\t}\r\n\t// dual purpose WHOLE_MAP: return placeholder if unique non-confusable\r\n\tfor (let cp of VALID) {\r\n\t\tif (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\r\n\t\t\tWHOLE_MAP.set(cp, UNIQUE_PH);\r\n\t\t}\r\n\t}\r\n\t// add all decomposed parts\r\n\t// see derive: \"Valid is Closed (via Brute-force)\"\r\n\tset_add_many(VALID, nfd(VALID));\r\n\t\r\n\t// decode emoji\r\n\t// 20230719: emoji are now fully-expanded to avoid quirk logic \r\n\tEMOJI_LIST = read_trie(r).map(v => Emoji.from(v)).sort(compare_arrays);\r\n\tEMOJI_ROOT = new Map(); // this has approx 7K nodes (2+ per emoji)\r\n\tfor (let cps of EMOJI_LIST) {\r\n\t\t// 20230719: change to *slightly* stricter algorithm which disallows \r\n\t\t// insertion of misplaced FE0F in emoji sequences (matching ENSIP-15)\r\n\t\t// example: beautified [A B] (eg. flag emoji) \r\n\t\t// before: allow: [A FE0F B], error: [A FE0F FE0F B] \r\n\t\t// after: error: both\r\n\t\t// note: this code now matches ENSNormalize.{cs,java} logic\r\n\t\tlet prev = [EMOJI_ROOT];\r\n\t\tfor (let cp of cps) {\r\n\t\t\tlet next = prev.map(node => {\r\n\t\t\t\tlet child = node.get(cp);\r\n\t\t\t\tif (!child) {\r\n\t\t\t\t\t// should this be object? \r\n\t\t\t\t\t// (most have 1-2 items, few have many)\r\n\t\t\t\t\t// 20230719: no, v8 default map is 4?\r\n\t\t\t\t\tchild = new Map();\r\n\t\t\t\t\tnode.set(cp, child);\r\n\t\t\t\t}\r\n\t\t\t\treturn child;\r\n\t\t\t});\r\n\t\t\tif (cp === FE0F) {\r\n\t\t\t\tprev.push(...next); // less than 20 elements\r\n\t\t\t} else {\r\n\t\t\t\tprev = next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let x of prev) {\r\n\t\t\tx.V = cps;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// if escaped: {HEX}\r\n// else: \"x\" {HEX}\r\nfunction quoted_cp(cp) {\r\n\treturn (should_escape(cp) ? '' : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\r\n}\r\n\r\n// 20230211: some messages can be mixed-directional and result in spillover\r\n// use 200E after a quoted string to force the remainder of a string from \r\n// acquring the direction of the quote\r\n// https://www.w3.org/International/questions/qa-bidi-unicode-controls#exceptions\r\nfunction bidi_qq(s) {\r\n\treturn `\"${s}\"\\u200E`; // strong LTR\r\n}\r\n\r\nfunction check_label_extension(cps) {\r\n\tif (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\r\n\t\tthrow new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`); // this can only be ascii so cant be bidi\r\n\t}\r\n}\r\nfunction check_leading_underscore(cps) {\r\n\tconst UNDERSCORE = 0x5F;\r\n\tfor (let i = cps.lastIndexOf(UNDERSCORE); i > 0; ) {\r\n\t\tif (cps[--i] !== UNDERSCORE) {\r\n\t\t\tthrow new Error('underscore allowed only at start');\r\n\t\t}\r\n\t}\r\n}\r\n// check that a fenced cp is not leading, trailing, or touching another fenced cp\r\nfunction check_fenced(cps) {\r\n\tlet cp = cps[0];\r\n\tlet prev = FENCED.get(cp);\r\n\tif (prev) throw error_placement(`leading ${prev}`);\r\n\tlet n = cps.length;\r\n\tlet last = -1; // prevents trailing from throwing\r\n\tfor (let i = 1; i < n; i++) {\r\n\t\tcp = cps[i];\r\n\t\tlet match = FENCED.get(cp);\r\n\t\tif (match) {\r\n\t\t\t// since cps[0] isn't fenced, cps[1] cannot throw\r\n\t\t\tif (last == i) throw error_placement(`${prev} + ${match}`);\r\n\t\t\tlast = i + 1;\r\n\t\t\tprev = match;\r\n\t\t}\r\n\t}\r\n\tif (last == n) throw error_placement(`trailing ${prev}`);\r\n}\r\n\r\n// create a safe to print string \r\n// invisibles are escaped\r\n// leading cm uses placeholder\r\n// if cps exceed max, middle truncate with ellipsis\r\n// quoter(cp) => string, eg. 3000 => \"{3000}\"\r\n// note: in html, you'd call this function then replace [<>&] with entities\r\nfunction safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\r\n\t//if (Number.isInteger(cps)) cps = [cps];\r\n\t//if (!Array.isArray(cps)) throw new TypeError(`expected codepoints`);\r\n\tlet buf = [];\r\n\tif (is_combining_mark(cps[0])) buf.push('◌');\r\n\tif (cps.length > max) {\r\n\t\tmax >>= 1;\r\n\t\tcps = [...cps.slice(0, max), 0x2026, ...cps.slice(-max)];\r\n\t}\r\n\tlet prev = 0;\r\n\tlet n = cps.length;\r\n\tfor (let i = 0; i < n; i++) {\r\n\t\tlet cp = cps[i];\r\n\t\tif (should_escape(cp)) {\r\n\t\t\tbuf.push(str_from_cps(cps.slice(prev, i)));\r\n\t\t\tbuf.push(quoter(cp));\r\n\t\t\tprev = i + 1;\r\n\t\t}\r\n\t}\r\n\tbuf.push(str_from_cps(cps.slice(prev, n)));\r\n\treturn buf.join('');\r\n}\r\n\r\n// note: set(s) cannot be exposed because they can be modified\r\n// note: Object.freeze() doesn't work\r\nfunction is_combining_mark(cp) {\r\n\tinit();\r\n\treturn CM.has(cp);\r\n}\r\nfunction should_escape(cp) {\r\n\tinit();\r\n\treturn ESCAPE.has(cp);\r\n}\r\n\r\n// return all supported emoji as fully-qualified emoji \r\n// ordered by length then lexicographic \r\nfunction ens_emoji() {\r\n\tinit();\r\n\treturn EMOJI_LIST.map(x => x.slice()); // emoji are exposed so copy\r\n}\r\n\r\nfunction ens_normalize_fragment(frag, decompose) {\r\n\tinit();\r\n\tlet nf = decompose ? nfd : nfc;\r\n\treturn frag.split(STOP_CH).map(label => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\r\n}\r\n\r\nfunction ens_normalize(name) {\r\n\treturn flatten(split(name, nfc, filter_fe0f));\r\n}\r\n\r\nfunction ens_beautify(name) {\r\n\tlet labels = split(name, nfc, x => x); // emoji not exposed\r\n\tfor (let {type, output, error} of labels) {\r\n\t\tif (error) break; // flatten will throw\r\n\r\n\t\t// replace leading/trailing hyphen\r\n\t\t// 20230121: consider beautifing all or leading/trailing hyphen to unicode variant\r\n\t\t// not exactly the same in every font, but very similar: \"-\" vs \"‐\"\r\n\t\t/*\r\n\t\tconst UNICODE_HYPHEN = 0x2010;\r\n\t\t// maybe this should replace all for visual consistancy?\r\n\t\t// `node tools/reg-count.js regex ^-\\{2,\\}` => 592\r\n\t\t//for (let i = 0; i < output.length; i++) if (output[i] == 0x2D) output[i] = 0x2010;\r\n\t\tif (output[0] == HYPHEN) output[0] = UNICODE_HYPHEN;\r\n\t\tlet end = output.length-1;\r\n\t\tif (output[end] == HYPHEN) output[end] = UNICODE_HYPHEN;\r\n\t\t*/\r\n\t\t// 20230123: WHATWG URL uses \"CheckHyphens\" false\r\n\t\t// https://url.spec.whatwg.org/#idna\r\n\r\n\t\t// update ethereum symbol\r\n\t\t// ξ => Ξ if not greek\r\n\t\tif (type !== 'Greek') array_replace(output, 0x3BE, 0x39E);\r\n\r\n\t\t// 20221213: fixes bidi subdomain issue, but breaks invariant (200E is disallowed)\r\n\t\t// could be fixed with special case for: 2D (.) + 200E (LTR)\r\n\t\t// https://discuss.ens.domains/t/bidi-label-ordering-spoof/15824\r\n\t\t//output.splice(0, 0, 0x200E);\r\n\t}\r\n\treturn flatten(labels);\r\n}\r\n\r\nfunction array_replace(v, a, b) {\r\n\tlet prev = 0;\r\n\twhile (true) {\r\n\t\tlet next = v.indexOf(a, prev);\r\n\t\tif (next < 0) break;\r\n\t\tv[next] = b; \r\n\t\tprev = next + 1;\r\n\t}\r\n}\r\n\r\nfunction ens_split(name, preserve_emoji) {\r\n\treturn split(name, nfc, preserve_emoji ? x => x.slice() : filter_fe0f); // emoji are exposed so copy\r\n}\r\n\r\nfunction split(name, nf, ef) {\r\n\tif (!name) return []; // 20230719: empty name allowance\r\n\tinit();\r\n\tlet offset = 0;\r\n\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t// 4.) \"The label must not contain a U+002E ( . ) FULL STOP.\"\r\n\treturn name.split(STOP_CH).map(label => {\r\n\t\tlet input = explode_cp(label);\r\n\t\tlet info = {\r\n\t\t\tinput,\r\n\t\t\toffset, // codepoint, not substring!\r\n\t\t};\r\n\t\toffset += input.length + 1; // + stop\r\n\t\ttry {\r\n\t\t\t// 1.) \"The label must be in Unicode Normalization Form NFC\"\r\n\t\t\tlet tokens = info.tokens = tokens_from_str(input, nf, ef);\r\n\t\t\tlet token_count = tokens.length;\r\n\t\t\tlet type;\r\n\t\t\tif (!token_count) { // the label was effectively empty (could of had ignored characters)\r\n\t\t\t\t//norm = [];\r\n\t\t\t\t//type = 'None'; // use this instead of next match, \"ASCII\"\r\n\t\t\t\t// 20230120: change to strict\r\n\t\t\t\t// https://discuss.ens.domains/t/ens-name-normalization-2nd/14564/59\r\n\t\t\t\tthrow new Error(`empty label`);\r\n\t\t\t} \r\n\t\t\tlet norm = info.output = tokens.flat();\r\n\t\t\tcheck_leading_underscore(norm);\r\n\t\t\tlet emoji = info.emoji = token_count > 1 || tokens[0].is_emoji; // same as: tokens.some(x => x.is_emoji);\r\n\t\t\tif (!emoji && norm.every(cp => cp < 0x80)) { // special case for ascii\r\n\t\t\t\t// 20230123: matches matches WHATWG, see note 3.3\r\n\t\t\t\tcheck_label_extension(norm); // only needed for ascii\r\n\t\t\t\t// cant have fenced\r\n\t\t\t\t// cant have cm\r\n\t\t\t\t// cant have wholes\r\n\t\t\t\t// see derive: \"Fastpath ASCII\"\r\n\t\t\t\ttype = 'ASCII';\r\n\t\t\t} else {\r\n\t\t\t\tlet chars = tokens.flatMap(x => x.is_emoji ? [] : x); // all of the nfc tokens concat together\r\n\t\t\t\tif (!chars.length) { // theres no text, just emoji\r\n\t\t\t\t\ttype = 'Emoji';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 5.) \"The label must not begin with a combining mark, that is: General_Category=Mark.\"\r\n\t\t\t\t\tif (CM.has(norm[0])) throw error_placement('leading combining mark');\r\n\t\t\t\t\tfor (let i = 1; i < token_count; i++) { // we've already checked the first token\r\n\t\t\t\t\t\tlet cps = tokens[i];\r\n\t\t\t\t\t\tif (!cps.is_emoji && CM.has(cps[0])) { // every text token has emoji neighbors, eg. EtEEEtEt...\r\n\t\t\t\t\t\t\t// bidi_qq() not needed since emoji is LTR and cps is a CM\r\n\t\t\t\t\t\t\tthrow error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i-1])} + ${safe_str_from_cps([cps[0]])}\"`); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcheck_fenced(norm);\r\n\t\t\t\t\tlet unique = Array_from(new Set(chars));\r\n\t\t\t\t\tlet [g] = determine_group(unique); // take the first match\r\n\t\t\t\t\t// see derive: \"Matching Groups have Same CM Style\"\r\n\t\t\t\t\t// alternative: could form a hybrid type: Latin/Japanese/...\t\r\n\t\t\t\t\tcheck_group(g, chars); // need text in order\r\n\t\t\t\t\tcheck_whole(g, unique); // only need unique text (order would be required for multiple-char confusables)\r\n\t\t\t\t\ttype = g.N;\r\n\t\t\t\t\t// 20230121: consider exposing restricted flag\r\n\t\t\t\t\t// it's simpler to just check for 'Restricted'\r\n\t\t\t\t\t// or even better: type.endsWith(']')\r\n\t\t\t\t\t//if (g.R) info.restricted = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tinfo.type = type;\r\n\t\t} catch (err) {\r\n\t\t\tinfo.error = err; // use full error object\r\n\t\t}\r\n\t\treturn info;\r\n\t});\r\n}\r\n\r\nfunction check_whole(group, unique) {\r\n\tlet maker;\r\n\tlet shared = [];\r\n\tfor (let cp of unique) {\r\n\t\tlet whole = WHOLE_MAP.get(cp);\r\n\t\tif (whole === UNIQUE_PH) return; // unique, non-confusable\r\n\t\tif (whole) {\r\n\t\t\tlet set = whole.M.get(cp); // groups which have a character that look-like this character\r\n\t\t\tmaker = maker ? maker.filter(g => set.has(g)) : Array_from(set);\r\n\t\t\tif (!maker.length) return; // confusable intersection is empty\r\n\t\t} else {\r\n\t\t\tshared.push(cp); \r\n\t\t}\r\n\t}\r\n\tif (maker) {\r\n\t\t// we have 1+ confusable\r\n\t\t// check if any of the remaining groups\r\n\t\t// contain the shared characters too\r\n\t\tfor (let g of maker) {\r\n\t\t\tif (shared.every(cp => group_has_cp(g, cp))) {\r\n\t\t\t\tthrow new Error(`whole-script confusable: ${group.N}/${g.N}`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// assumption: unique.size > 0\r\n// returns list of matching groups\r\nfunction determine_group(unique) {\r\n\tlet groups = GROUPS;\r\n\tfor (let cp of unique) {\r\n\t\t// note: we need to dodge CM that are whitelisted\r\n\t\t// but that code isn't currently necessary\r\n\t\tlet gs = groups.filter(g => group_has_cp(g, cp));\r\n\t\tif (!gs.length) {\r\n\t\t\tif (!GROUPS.some(g => group_has_cp(g, cp))) { \r\n\t\t\t\t// the character was composed of valid parts\r\n\t\t\t\t// but it's NFC form is invalid\r\n\t\t\t\t// 20230716: change to more exact statement, see: ENSNormalize.{cs,java}\r\n\t\t\t\t// note: this doesn't have to be a composition\r\n\t\t\t\t// 20230720: change to full check\r\n\t\t\t\tthrow error_disallowed(cp); // this should be rare\r\n\t\t\t} else {\r\n\t\t\t\t// there is no group that contains all these characters\r\n\t\t\t\t// throw using the highest priority group that matched\r\n\t\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\t\tthrow error_group_member(groups[0], cp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tgroups = gs;\r\n\t\tif (gs.length == 1) break; // there is only one group left\r\n\t}\r\n\t// there are at least 1 group(s) with all of these characters\r\n\treturn groups;\r\n}\r\n\r\n// throw on first error\r\nfunction flatten(split) {\r\n\treturn split.map(({input, error, output}) => {\r\n\t\tif (error) {\r\n\t\t\t// don't print label again if just a single label\r\n\t\t\tlet msg = error.message;\r\n\t\t\t// bidi_qq() only necessary if msg is digits\r\n\t\t\tthrow new Error(split.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`); \r\n\t\t}\r\n\t\treturn str_from_cps(output);\r\n\t}).join(STOP_CH);\r\n}\r\n\r\nfunction error_disallowed(cp) {\r\n\t// TODO: add cp to error?\r\n\treturn new Error(`disallowed character: ${quoted_cp(cp)}`); \r\n}\r\nfunction error_group_member(g, cp) {\r\n\tlet quoted = quoted_cp(cp);\r\n\tlet gg = GROUPS.find(g => g.P.has(cp)); // only check primary\r\n\tif (gg) {\r\n\t\tquoted = `${gg.N} ${quoted}`;\r\n\t}\r\n\treturn new Error(`illegal mixture: ${g.N} + ${quoted}`);\r\n}\r\nfunction error_placement(where) {\r\n\treturn new Error(`illegal placement: ${where}`);\r\n}\r\n\r\n// assumption: cps.length > 0\r\n// assumption: cps[0] isn't a CM\r\n// assumption: the previous character isn't an emoji\r\nfunction check_group(g, cps) {\r\n\tfor (let cp of cps) {\r\n\t\tif (!group_has_cp(g, cp)) {\r\n\t\t\t// for whitelisted scripts, this will throw illegal mixture on invalid cm, eg. \"e{300}{300}\"\r\n\t\t\t// at the moment, it's unnecessary to introduce an extra error type\r\n\t\t\t// until there exists a whitelisted multi-character\r\n\t\t\t// eg. if (M < 0 && is_combining_mark(cp)) { ... }\r\n\t\t\t// there are 3 cases:\r\n\t\t\t// 1. illegal cm for wrong group => mixture error\r\n\t\t\t// 2. illegal cm for same group => cm error\r\n\t\t\t// requires set of whitelist cm per group: \r\n\t\t\t// eg. new Set([...g.P, ...g.Q].flatMap(nfc).filter(cp => CM.has(cp)))\r\n\t\t\t// 3. wrong group => mixture error\r\n\t\t\tthrow error_group_member(g, cp);\r\n\t\t}\r\n\t}\r\n\t//if (M >= 0) { // we have a known fixed cm count\r\n\tif (g.M) { // we need to check for NSM\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // see: assumption\r\n\t\t\t// 20230210: bugfix: using cps instead of decomposed h/t Carbon225\r\n\t\t\t/*\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: ${g.N} ${bidi_qq(str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\t// 20230217: switch to NSM counting\r\n\t\t\t// https://www.unicode.org/reports/tr39/#Optional_Detection\r\n\t\t\tif (NSM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\tfor (let cp; j < e && NSM.has(cp = decomposed[j]); j++) {\r\n\t\t\t\t\t// a. Forbid sequences of the same nonspacing mark.\r\n\t\t\t\t\tfor (let k = i; k < j; k++) { // O(n^2) but n < 100\r\n\t\t\t\t\t\tif (decomposed[k] == cp) {\r\n\t\t\t\t\t\t\tthrow new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// parse to end so we have full nsm count\r\n\t\t\t\t// b. Forbid sequences of more than 4 nonspacing marks (gc=Mn or gc=Me).\r\n\t\t\t\tif (j - i > NSM_MAX) {\r\n\t\t\t\t\t// note: this slice starts with a base char or spacing-mark cm\r\n\t\t\t\t\tthrow new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed.slice(i-1, j)))} (${j-i}/${NSM_MAX})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// *** this code currently isn't needed ***\r\n\t/*\r\n\tlet cm_whitelist = M instanceof Map;\r\n\tfor (let i = 0, e = cps.length; i < e; ) {\r\n\t\tlet cp = cps[i++];\r\n\t\tlet seqs = cm_whitelist && M.get(cp);\r\n\t\tif (seqs) { \r\n\t\t\t// list of codepoints that can follow\r\n\t\t\t// if this exists, this will always be 1+\r\n\t\t\tlet j = i;\r\n\t\t\twhile (j < e && CM.has(cps[j])) j++;\r\n\t\t\tlet cms = cps.slice(i, j);\r\n\t\t\tlet match = seqs.find(seq => !compare_arrays(seq, cms));\r\n\t\t\tif (!match) throw new Error(`disallowed combining mark sequence: \"${safe_str_from_cps([cp, ...cms])}\"`);\r\n\t\t\ti = j;\r\n\t\t} else if (!V.has(cp)) {\r\n\t\t\t// https://www.unicode.org/reports/tr39/#mixed_script_confusables\r\n\t\t\tlet quoted = quoted_cp(cp);\r\n\t\t\tfor (let cp of cps) {\r\n\t\t\t\tlet u = UNIQUE.get(cp);\r\n\t\t\t\tif (u && u !== g) {\r\n\t\t\t\t\t// if both scripts are restricted this error is confusing\r\n\t\t\t\t\t// because we don't differentiate RestrictedA from RestrictedB \r\n\t\t\t\t\tif (!u.R) quoted = `${quoted} is ${u.N}`;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new Error(`disallowed ${g.N} character: ${quoted}`);\r\n\t\t\t//throw new Error(`disallowed character: ${quoted} (expected ${g.N})`);\r\n\t\t\t//throw new Error(`${g.N} does not allow: ${quoted}`);\r\n\t\t}\r\n\t}\r\n\tif (!cm_whitelist) {\r\n\t\tlet decomposed = nfd(cps);\r\n\t\tfor (let i = 1, e = decomposed.length; i < e; i++) { // we know it can't be cm leading\r\n\t\t\tif (CM.has(decomposed[i])) {\r\n\t\t\t\tlet j = i + 1;\r\n\t\t\t\twhile (j < e && CM.has(decomposed[j])) j++;\r\n\t\t\t\tif (j - i > M) {\r\n\t\t\t\t\tthrow new Error(`too many combining marks: \"${str_from_cps(decomposed.slice(i-1, j))}\" (${j-i}/${M})`);\r\n\t\t\t\t}\r\n\t\t\t\ti = j;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t*/\r\n}\r\n\r\n// given a list of codepoints\r\n// returns a list of lists, where emoji are a fully-qualified (as Array subclass)\r\n// eg. explode_cp(\"abc💩d\") => [[61, 62, 63], Emoji[1F4A9, FE0F], [64]]\r\n// 20230818: rename for 'process' name collision h/t Javarome\r\n// https://github.com/adraffy/ens-normalize.js/issues/23\r\nfunction tokens_from_str(input, nf, ef) {\r\n\tlet ret = [];\r\n\tlet chars = [];\r\n\tinput = input.slice().reverse(); // flip so we can pop\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input);\r\n\t\tif (emoji) {\r\n\t\t\tif (chars.length) {\r\n\t\t\t\tret.push(nf(chars));\r\n\t\t\t\tchars = [];\r\n\t\t\t}\r\n\t\t\tret.push(ef(emoji));\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (VALID.has(cp)) {\r\n\t\t\t\tchars.push(cp);\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\tchars.push(...cps); // less than 10 elements\r\n\t\t\t\t} else if (!IGNORED.has(cp)) {\r\n\t\t\t\t\t// 20230912: unicode 15.1 changed the order of processing such that\r\n\t\t\t\t\t// disallowed parts are only rejected after NFC\r\n\t\t\t\t\t// https://unicode.org/reports/tr46/#Validity_Criteria\r\n\t\t\t\t\t// this doesn't impact normalization as of today\r\n\t\t\t\t\t// technically, this error can be removed as the group logic will apply similar logic\r\n\t\t\t\t\t// however the error type might be less clear\r\n\t\t\t\t\tthrow error_disallowed(cp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (chars.length) {\r\n\t\tret.push(nf(chars));\r\n\t}\r\n\treturn ret;\r\n}\r\n\r\nfunction filter_fe0f(cps) {\r\n\treturn cps.filter(cp => cp != FE0F);\r\n}\r\n\r\n// given array of codepoints\r\n// returns the longest valid emoji sequence (or undefined if no match)\r\n// *MUTATES* the supplied array\r\n// disallows interleaved ignored characters\r\n// fills (optional) eaten array with matched codepoints\r\nfunction consume_emoji_reversed(cps, eaten) {\r\n\tlet node = EMOJI_ROOT;\r\n\tlet emoji;\r\n\tlet pos = cps.length;\r\n\twhile (pos) {\r\n\t\tnode = node.get(cps[--pos]);\r\n\t\tif (!node) break;\r\n\t\tlet {V} = node;\r\n\t\tif (V) { // this is a valid emoji (so far)\r\n\t\t\temoji = V;\r\n\t\t\tif (eaten) eaten.push(...cps.slice(pos).reverse()); // (optional) copy input, used for ens_tokenize()\r\n\t\t\tcps.length = pos; // truncate\r\n\t\t}\r\n\t}\r\n\treturn emoji;\r\n}\r\n\r\n// ************************************************************\r\n// tokenizer \r\n\r\nconst TY_VALID = 'valid';\r\nconst TY_MAPPED = 'mapped';\r\nconst TY_IGNORED = 'ignored';\r\nconst TY_DISALLOWED = 'disallowed';\r\nconst TY_EMOJI = 'emoji';\r\nconst TY_NFC = 'nfc';\r\nconst TY_STOP = 'stop';\r\n\r\nfunction ens_tokenize(name, {\r\n\tnf = true, // collapse unnormalized runs into a single token\r\n} = {}) {\r\n\tinit();\r\n\tlet input = explode_cp(name).reverse();\r\n\tlet eaten = [];\r\n\tlet tokens = [];\r\n\twhile (input.length) {\r\n\t\tlet emoji = consume_emoji_reversed(input, eaten);\r\n\t\tif (emoji) {\r\n\t\t\ttokens.push({\r\n\t\t\t\ttype: TY_EMOJI,\r\n\t\t\t\temoji: emoji.slice(), // copy emoji\r\n\t\t\t\tinput: eaten,\r\n\t\t\t\tcps: filter_fe0f(emoji)\r\n\t\t\t});\r\n\t\t\teaten = []; // reset buffer\r\n\t\t} else {\r\n\t\t\tlet cp = input.pop();\r\n\t\t\tif (cp == STOP) {\r\n\t\t\t\ttokens.push({type: TY_STOP, cp});\r\n\t\t\t} else if (VALID.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_VALID, cps: [cp]});\r\n\t\t\t} else if (IGNORED.has(cp)) {\r\n\t\t\t\ttokens.push({type: TY_IGNORED, cp});\r\n\t\t\t} else {\r\n\t\t\t\tlet cps = MAPPED.get(cp);\r\n\t\t\t\tif (cps) {\r\n\t\t\t\t\ttokens.push({type: TY_MAPPED, cp, cps: cps.slice()});\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttokens.push({type: TY_DISALLOWED, cp});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (nf) {\r\n\t\tfor (let i = 0, start = -1; i < tokens.length; i++) {\r\n\t\t\tlet token = tokens[i];\r\n\t\t\tif (is_valid_or_mapped(token.type)) {\r\n\t\t\t\tif (requires_check(token.cps)) { // normalization might be needed\r\n\t\t\t\t\tlet end = i + 1;\r\n\t\t\t\t\tfor (let pos = end; pos < tokens.length; pos++) { // find adjacent text\r\n\t\t\t\t\t\tlet {type, cps} = tokens[pos];\r\n\t\t\t\t\t\tif (is_valid_or_mapped(type)) {\r\n\t\t\t\t\t\t\tif (!requires_check(cps)) break;\r\n\t\t\t\t\t\t\tend = pos + 1;\r\n\t\t\t\t\t\t} else if (type !== TY_IGNORED) { // || type !== TY_DISALLOWED) { \r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (start < 0) start = i;\r\n\t\t\t\t\tlet slice = tokens.slice(start, end);\r\n\t\t\t\t\tlet cps0 = slice.flatMap(x => is_valid_or_mapped(x.type) ? x.cps : []); // strip junk tokens\r\n\t\t\t\t\tlet cps = nfc(cps0);\r\n\t\t\t\t\tif (compare_arrays(cps, cps0)) { // bundle into an nfc token\r\n\t\t\t\t\t\ttokens.splice(start, end - start, {\r\n\t\t\t\t\t\t\ttype: TY_NFC, \r\n\t\t\t\t\t\t\tinput: cps0, // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\r\n\t\t\t\t\t\t\tcps, \r\n\t\t\t\t\t\t\ttokens0: collapse_valid_tokens(slice),\r\n\t\t\t\t\t\t\ttokens: ens_tokenize(str_from_cps(cps), {nf: false})\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\ti = start;\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\ti = end - 1; // skip to end of slice\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart = -1; // reset\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstart = i; // remember last\r\n\t\t\t\t}\r\n\t\t\t} else if (token.type !== TY_IGNORED) { // 20221024: is this correct?\r\n\t\t\t\tstart = -1; // reset\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn collapse_valid_tokens(tokens);\r\n}\r\n\r\nfunction is_valid_or_mapped(type) {\r\n\treturn type == TY_VALID || type == TY_MAPPED;\r\n}\r\n\r\nfunction requires_check(cps) {\r\n\treturn cps.some(cp => NFC_CHECK.has(cp));\r\n}\r\n\r\nfunction collapse_valid_tokens(tokens) {\r\n\tfor (let i = 0; i < tokens.length; i++) {\r\n\t\tif (tokens[i].type == TY_VALID) {\r\n\t\t\tlet j = i + 1;\r\n\t\t\twhile (j < tokens.length && tokens[j].type == TY_VALID) j++;\r\n\t\t\ttokens.splice(i, j - i, {type: TY_VALID, cps: tokens.slice(i, j).flatMap(x => x.cps)});\r\n\t\t}\r\n\t}\r\n\treturn tokens;\r\n}\n\nexport { ens_beautify, ens_emoji, ens_normalize, ens_normalize_fragment, ens_split, ens_tokenize, is_combining_mark, nfc, nfd, safe_str_from_cps, should_escape };\n","import { keccak256 } from \"../crypto/index.js\";\nimport { concat, hexlify, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nimport { ens_normalize } from \"@adraffy/ens-normalize\";\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\nfunction checkComponent(comp) {\n assertArgument(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n}\nfunction ensNameSplit(name) {\n const bytes = toUtf8Bytes(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i = 0; i < bytes.length; i++) {\n const d = bytes[i];\n // A separator (i.e. \".\"); copy this component\n if (d === 0x2e) {\n comps.push(checkComponent(bytes.slice(last, i)));\n last = i + 1;\n }\n }\n // There was a stray separator at the end of the name\n assertArgument(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n}\n/**\n * Returns the ENS %%name%% normalized.\n */\nexport function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return ens_normalize(name);\n }\n catch (error) {\n assertArgument(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n}\n/**\n * Returns ``true`` if %%name%% is a valid ENS name.\n */\nexport function isValidName(name) {\n try {\n return (ensNameSplit(name).length !== 0);\n }\n catch (error) { }\n return false;\n}\n/**\n * Returns the [[link-namehash]] for %%name%%.\n */\nexport function namehash(name) {\n assertArgument(typeof (name) === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n assertArgument(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = keccak256(concat([result, keccak256((comps.pop()))]));\n }\n return hexlify(result);\n}\n/**\n * Returns the DNS encoded %%name%%.\n *\n * This is used for various parts of ENS name resolution, such\n * as the wildcard resolution.\n */\nexport function dnsEncode(name, _maxLength) {\n const length = (_maxLength != null) ? _maxLength : 63;\n assertArgument(length <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length);\n return hexlify(concat(ensNameSplit(name).map((comp) => {\n assertArgument(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n}\n//# sourceMappingURL=namehash.js.map","import { getAddress } from \"../address/index.js\";\nimport { assertArgument, isHexString } from \"../utils/index.js\";\nfunction accessSetify(addr, storageKeys) {\n return {\n address: getAddress(addr),\n storageKeys: storageKeys.map((storageKey, index) => {\n assertArgument(isHexString(storageKey, 32), \"invalid slot\", `storageKeys[${index}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n}\n/**\n * Returns a [[AccessList]] from any ethers-supported access-list structure.\n */\nexport function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index) => {\n if (Array.isArray(set)) {\n assertArgument(set.length === 2, \"invalid slot set\", `value[${index}]`, set);\n return accessSetify(set[0], set[1]);\n }\n assertArgument(set != null && typeof (set) === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n assertArgument(value != null && typeof (value) === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\n//# sourceMappingURL=accesslist.js.map","import { getAddress } from \"../address/index.js\";\nimport { keccak256, SigningKey } from \"../crypto/index.js\";\n/**\n * Returns the address for the %%key%%.\n *\n * The key may be any standard form of public key or a private key.\n */\nexport function computeAddress(key) {\n let pubkey;\n if (typeof (key) === \"string\") {\n pubkey = SigningKey.computePublicKey(key, false);\n }\n else {\n pubkey = key.publicKey;\n }\n return getAddress(keccak256(\"0x\" + pubkey.substring(4)).substring(26));\n}\n/**\n * Returns the recovered address for the private key that was\n * used to sign %%digest%% that resulted in %%signature%%.\n */\nexport function recoverAddress(digest, signature) {\n return computeAddress(SigningKey.recoverPublicKey(digest, signature));\n}\n//# sourceMappingURL=address.js.map","import { getAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/addresses.js\";\nimport { keccak256, sha256, Signature, SigningKey } from \"../crypto/index.js\";\nimport { concat, decodeRlp, encodeRlp, getBytes, getBigInt, getNumber, hexlify, assert, assertArgument, isBytesLike, isHexString, toBeArray, zeroPadValue } from \"../utils/index.js\";\nimport { accessListify } from \"./accesslist.js\";\nimport { recoverAddress } from \"./address.js\";\nconst BN_0 = BigInt(0);\nconst BN_2 = BigInt(2);\nconst BN_27 = BigInt(27);\nconst BN_28 = BigInt(28);\nconst BN_35 = BigInt(35);\nconst BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\nconst BLOB_SIZE = 4096 * 32;\nfunction getVersionedHash(version, hash) {\n let versioned = version.toString(16);\n while (versioned.length < 2) {\n versioned = \"0\" + versioned;\n }\n versioned += sha256(hash).substring(4);\n return \"0x\" + versioned;\n}\nfunction handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return getAddress(value);\n}\nfunction handleAccessList(value, param) {\n try {\n return accessListify(value);\n }\n catch (error) {\n assertArgument(false, error.message, param, value);\n }\n}\nfunction handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return getNumber(_value, param);\n}\nfunction handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = getBigInt(_value, param);\n assertArgument(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n}\nfunction formatNumber(_value, name) {\n const value = getBigInt(_value, \"value\");\n const result = toBeArray(value);\n assertArgument(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n}\nfunction formatAccessList(value) {\n return accessListify(value).map((set) => [set.address, set.storageKeys]);\n}\nfunction formatHashes(value, param) {\n assertArgument(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i = 0; i < value.length; i++) {\n assertArgument(isHexString(value[i], 32), \"invalid ${ param } hash\", `value[${i}]`, value[i]);\n }\n return value;\n}\nfunction _parseLegacy(data) {\n const fields = decodeRlp(data);\n assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: hexlify(fields[5]),\n chainId: BN_0\n };\n // Legacy unsigned transaction\n if (fields.length === 6) {\n return tx;\n }\n const v = handleUint(fields[6], \"v\");\n const r = handleUint(fields[7], \"r\");\n const s = handleUint(fields[8], \"s\");\n if (r === BN_0 && s === BN_0) {\n // EIP-155 unsigned transaction\n tx.chainId = v;\n }\n else {\n // Compute the EIP-155 chain ID (or 0 for legacy)\n let chainId = (v - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n // Signed Legacy Transaction\n assertArgument(chainId !== BN_0 || (v === BN_27 || v === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = Signature.from({\n r: zeroPadValue(fields[7], 32),\n s: zeroPadValue(fields[8], 32),\n v\n });\n //tx.hash = keccak256(data);\n }\n return tx;\n}\nfunction _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = getBigInt(tx.chainId, \"tx.chainId\");\n // We have a chainId in the tx and an EIP-155 v in the signature,\n // make sure they agree with each other\n assertArgument(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n else if (tx.signature) {\n // No explicit chainId, but EIP-155 have a derived implicit chainId\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n // Requesting an unsigned transaction\n if (!sig) {\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== BN_0) {\n fields.push(toBeArray(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return encodeRlp(fields);\n }\n // @TODO: We should probably check that tx.signature, chainId, and sig\n // match but that logic could break existing code, so schedule\n // this for the next major bump.\n // Compute the EIP-155 v\n let v = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v = Signature.getChainIdV(chainId, sig.v);\n }\n else if (BigInt(sig.v) !== v) {\n assertArgument(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n // Add the signature\n fields.push(toBeArray(v));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n return encodeRlp(fields);\n}\nfunction _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n }\n catch (error) {\n assertArgument(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r = zeroPadValue(fields[1], 32);\n const s = zeroPadValue(fields[2], 32);\n const signature = Signature.from({ r, s, yParity });\n tx.signature = signature;\n}\nfunction _parseEip1559(data) {\n const fields = decodeRlp(getBytes(data).slice(1));\n assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", hexlify(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: hexlify(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n };\n // Unsigned EIP-1559 Transaction\n if (fields.length === 9) {\n return tx;\n }\n //tx.hash = keccak256(data);\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n}\nfunction _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n }\n return concat([\"0x02\", encodeRlp(fields)]);\n}\nfunction _parseEip2930(data) {\n const fields = decodeRlp(getBytes(data).slice(1));\n assertArgument(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", hexlify(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: hexlify(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n // Unsigned EIP-2930 Transaction\n if (fields.length === 8) {\n return tx;\n }\n //tx.hash = keccak256(data);\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n}\nfunction _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || \"0x\"),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n }\n return concat([\"0x01\", encodeRlp(fields)]);\n}\nfunction _parseEip4844(data) {\n let fields = decodeRlp(getBytes(data).slice(1));\n let typeName = \"3\";\n let blobs = null;\n // Parse the network format\n if (fields.length === 4 && Array.isArray(fields[0])) {\n typeName = \"3 (network format)\";\n const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];\n assertArgument(Array.isArray(fBlobs), \"invalid network format: blobs not an array\", \"fields[1]\", fBlobs);\n assertArgument(Array.isArray(fCommits), \"invalid network format: commitments not an array\", \"fields[2]\", fCommits);\n assertArgument(Array.isArray(fProofs), \"invalid network format: proofs not an array\", \"fields[3]\", fProofs);\n assertArgument(fBlobs.length === fCommits.length, \"invalid network format: blobs/commitments length mismatch\", \"fields\", fields);\n assertArgument(fBlobs.length === fProofs.length, \"invalid network format: blobs/proofs length mismatch\", \"fields\", fields);\n blobs = [];\n for (let i = 0; i < fields[1].length; i++) {\n blobs.push({\n data: fBlobs[i],\n commitment: fCommits[i],\n proof: fProofs[i],\n });\n }\n fields = fields[0];\n }\n assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, \"data\", hexlify(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: hexlify(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n if (blobs) {\n tx.blobs = blobs;\n }\n assertArgument(tx.to != null, `invalid address for transaction type: ${typeName}`, \"data\", data);\n assertArgument(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i = 0; i < tx.blobVersionedHashes.length; i++) {\n assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, \"data\", data);\n }\n // Unsigned EIP-4844 Transaction\n if (fields.length === 11) {\n return tx;\n }\n // @TODO: Do we need to do this? This is only called internally\n // and used to verify hashes; it might save time to not do this\n //tx.hash = keccak256(concat([ \"0x03\", encodeRlp(fields) ]));\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n}\nfunction _serializeEip4844(tx, sig, blobs) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n (tx.to || ZeroAddress),\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push(toBeArray(sig.r));\n fields.push(toBeArray(sig.s));\n // We have blobs; return the network wrapped format\n if (blobs) {\n return concat([\n \"0x03\",\n encodeRlp([\n fields,\n blobs.map((b) => b.data),\n blobs.map((b) => b.commitment),\n blobs.map((b) => b.proof),\n ])\n ]);\n }\n }\n return concat([\"0x03\", encodeRlp(fields)]);\n}\n/**\n * A **Transaction** describes an operation to be executed on\n * Ethereum by an Externally Owned Account (EOA). It includes\n * who (the [[to]] address), what (the [[data]]) and how much (the\n * [[value]] in ether) the operation should entail.\n *\n * @example:\n * tx = new Transaction()\n * //_result:\n *\n * tx.data = \"0x1234\";\n * //_result:\n */\nexport class Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n #kzg;\n #blobs;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() { return this.#type; }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n default:\n assertArgument(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0: return \"legacy\";\n case 1: return \"eip-2930\";\n case 2: return \"eip-1559\";\n case 3: return \"eip-4844\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = (value == null) ? null : getAddress(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() { return this.#nonce; }\n set nonce(value) { this.#nonce = getNumber(value, \"value\"); }\n /**\n * The gas limit.\n */\n get gasLimit() { return this.#gasLimit; }\n set gasLimit(value) { this.#gasLimit = getBigInt(value); }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = (value == null) ? null : getBigInt(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = (value == null) ? null : getBigInt(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = (value == null) ? null : getBigInt(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() { return this.#data; }\n set data(value) { this.#data = hexlify(value); }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() { return this.#value; }\n set value(value) {\n this.#value = getBigInt(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() { return this.#chainId; }\n set chainId(value) { this.#chainId = getBigInt(value); }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() { return this.#sig || null; }\n set signature(value) {\n this.#sig = (value == null) ? null : Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n // @TODO: in v7, this should assign the value or become\n // a live object itself, otherwise mutation is inconsistent\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = (value == null) ? null : accessListify(value);\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOb versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n // @TODO: Mutation is inconsistent; if unset, the returned value\n // cannot mutate the object, if set it can\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n assertArgument(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i = 0; i < value.length; i++) {\n assertArgument(isHexString(value[i], 32), \"invalid blobVersionedHash\", `value[${i}]`, value[i]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * The BLObs for the Transaction, if any.\n *\n * If ``blobs`` is non-``null``, then the [[seriailized]]\n * will return the network formatted sidecar, otherwise it\n * will return the standard [[link-eip-2718]] payload. The\n * [[unsignedSerialized]] is unaffected regardless.\n *\n * When setting ``blobs``, either fully valid [[Blob]] objects\n * may be specified (i.e. correctly padded, with correct\n * committments and proofs) or a raw [[BytesLike]] may\n * be provided.\n *\n * If raw [[BytesLike]] are provided, the [[kzg]] property **must**\n * be already set. The blob will be correctly padded and the\n * [[KzgLibrary]] will be used to compute the committment and\n * proof for the blob.\n *\n * A BLOb is a sequence of field elements, each of which must\n * be within the BLS field modulo, so some additional processing\n * may be required to encode arbitrary data to ensure each 32 byte\n * field is within the valid range.\n *\n * Setting this automatically populates [[blobVersionedHashes]],\n * overwriting any existing values. Setting this to ``null``\n * does **not** remove the [[blobVersionedHashes]], leaving them\n * present.\n */\n get blobs() {\n if (this.#blobs == null) {\n return null;\n }\n return this.#blobs.map((b) => Object.assign({}, b));\n }\n set blobs(_blobs) {\n if (_blobs == null) {\n this.#blobs = null;\n return;\n }\n const blobs = [];\n const versionedHashes = [];\n for (let i = 0; i < _blobs.length; i++) {\n const blob = _blobs[i];\n if (isBytesLike(blob)) {\n assert(this.#kzg, \"adding a raw blob requires a KZG library\", \"UNSUPPORTED_OPERATION\", {\n operation: \"set blobs()\"\n });\n let data = getBytes(blob);\n assertArgument(data.length <= BLOB_SIZE, \"blob is too large\", `blobs[${i}]`, blob);\n // Pad blob if necessary\n if (data.length !== BLOB_SIZE) {\n const padded = new Uint8Array(BLOB_SIZE);\n padded.set(data);\n data = padded;\n }\n const commit = this.#kzg.blobToKzgCommitment(data);\n const proof = hexlify(this.#kzg.computeBlobKzgProof(data, commit));\n blobs.push({\n data: hexlify(data),\n commitment: hexlify(commit),\n proof\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n else {\n const commit = hexlify(blob.commitment);\n blobs.push({\n data: hexlify(blob.data),\n commitment: commit,\n proof: hexlify(blob.proof)\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n }\n this.#blobs = blobs;\n this.#blobVersionedHashes = versionedHashes;\n }\n get kzg() { return this.#kzg; }\n set kzg(kzg) {\n this.#kzg = kzg;\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n this.#blobs = null;\n this.#kzg = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return keccak256(this.#getSerialized(true, false));\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return keccak256(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return recoverAddress(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n #getSerialized(signed, sidecar) {\n assert(!signed || this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n const sig = signed ? this.signature : null;\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, sig);\n case 1:\n return _serializeEip2930(this, sig);\n case 2:\n return _serializeEip1559(this, sig);\n case 3:\n return _serializeEip4844(this, sig, sidecar ? this.blobs : null);\n }\n assert(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n return this.#getSerialized(true, true);\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n return this.#getSerialized(false, false);\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types = this.inferTypes();\n // Prefer London (EIP-1559) over Cancun (BLOb)\n if (types.indexOf(2) >= 0) {\n return 2;\n }\n // Return the highest inferred type\n return (types.pop());\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n // Checks that there are no conflicting properties set\n const hasGasPrice = this.gasPrice != null;\n const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);\n const hasAccessList = (this.accessList != null);\n const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);\n //if (hasGasPrice && hasFee) {\n // throw new Error(\"transaction cannot have gasPrice and maxFeePerGas\");\n //}\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n assert(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n //if (this.type === 2 && hasGasPrice) {\n // throw new Error(\"eip-1559 transaction cannot have gasPrice\");\n //}\n assert(!hasFee || (this.type !== 0 && this.type !== 1), \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n assert(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types = [];\n // Explicit type\n if (this.type != null) {\n types.push(this.type);\n }\n else {\n if (hasFee) {\n types.push(2);\n }\n else if (hasGasPrice) {\n types.push(1);\n if (!hasAccessList) {\n types.push(0);\n }\n }\n else if (hasAccessList) {\n types.push(1);\n types.push(2);\n }\n else if (hasBlob && this.to) {\n types.push(3);\n }\n else {\n types.push(0);\n types.push(1);\n types.push(2);\n types.push(3);\n }\n }\n types.sort();\n return types;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return (this.type === 0);\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return (this.type === 1);\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return (this.type === 2);\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return (this.type === 3);\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s = (v) => {\n if (v == null) {\n return null;\n }\n return v.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s(this.gasLimit),\n gasPrice: s(this.gasPrice),\n maxPriorityFeePerGas: s(this.maxPriorityFeePerGas),\n maxFeePerGas: s(this.maxFeePerGas),\n value: s(this.value),\n chainId: s(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new Transaction();\n }\n if (typeof (tx) === \"string\") {\n const payload = getBytes(tx);\n if (payload[0] >= 0x7f) { // @TODO: > vs >= ??\n return Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1: return Transaction.from(_parseEip2930(payload));\n case 2: return Transaction.from(_parseEip1559(payload));\n case 3: return Transaction.from(_parseEip4844(payload));\n }\n assert(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n // This will get overwritten by blobs, if present\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n // Make sure we assign the kzg before assigning blobs, which\n // require the library in the event raw blob data is provided.\n if (tx.kzg != null) {\n result.kzg = tx.kzg;\n }\n if (tx.blobs != null) {\n result.blobs = tx.blobs;\n }\n if (tx.hash != null) {\n assertArgument(result.isSigned(), \"unsigned transaction cannot define '.hash'\", \"tx\", tx);\n assertArgument(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n assertArgument(result.isSigned(), \"unsigned transaction cannot define '.from'\", \"tx\", tx);\n assertArgument(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n}\n//# sourceMappingURL=transaction.js.map","import { keccak256 } from \"../crypto/index.js\";\nimport { MessagePrefix } from \"../constants/index.js\";\nimport { recoverAddress } from \"../transaction/index.js\";\nimport { concat, toUtf8Bytes } from \"../utils/index.js\";\n/**\n * Computes the [[link-eip-191]] personal-sign message digest to sign.\n *\n * This prefixes the message with [[MessagePrefix]] and the decimal length\n * of %%message%% and computes the [[keccak256]] digest.\n *\n * If %%message%% is a string, it is converted to its UTF-8 bytes\n * first. To compute the digest of a [[DataHexString]], it must be converted\n * to [bytes](getBytes).\n *\n * @example:\n * hashMessage(\"Hello World\")\n * //_result:\n *\n * // Hashes the SIX (6) string characters, i.e.\n * // [ \"0\", \"x\", \"4\", \"2\", \"4\", \"3\" ]\n * hashMessage(\"0x4243\")\n * //_result:\n *\n * // Hashes the TWO (2) bytes [ 0x42, 0x43 ]...\n * hashMessage(getBytes(\"0x4243\"))\n * //_result:\n *\n * // ...which is equal to using data\n * hashMessage(new Uint8Array([ 0x42, 0x43 ]))\n * //_result:\n *\n */\nexport function hashMessage(message) {\n if (typeof (message) === \"string\") {\n message = toUtf8Bytes(message);\n }\n return keccak256(concat([\n toUtf8Bytes(MessagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n/**\n * Return the address of the private key that produced\n * the signature %%sig%% during signing for %%message%%.\n */\nexport function verifyMessage(message, sig) {\n const digest = hashMessage(message);\n return recoverAddress(digest, sig);\n}\n//# sourceMappingURL=message.js.map","import { getAddress } from \"../address/index.js\";\nimport { keccak256 as _keccak256, sha256 as _sha256 } from \"../crypto/index.js\";\nimport { concat, dataLength, getBytes, hexlify, toBeArray, toTwos, toUtf8Bytes, zeroPadBytes, zeroPadValue, assertArgument } from \"../utils/index.js\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return getBytes(zeroPadValue(value, 32));\n }\n return getBytes(getAddress(value));\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return getBytes(value);\n case \"bool\":\n value = (!!value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return getBytes(zeroPadValue(value, 32));\n }\n return getBytes(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = (match[1] === \"int\");\n let size = parseInt(match[2] || \"256\");\n assertArgument((!match[2] || match[2] === String(size)) && (size % 8 === 0) && size !== 0 && size <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size = 256;\n }\n if (signed) {\n value = toTwos(value, size);\n }\n return getBytes(zeroPadValue(toBeArray(value), size / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n assertArgument(String(size) === match[1] && size !== 0 && size <= 32, \"invalid bytes type\", \"type\", type);\n assertArgument(dataLength(value) === size, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return getBytes(zeroPadBytes(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n assertArgument(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return getBytes(concat(result));\n }\n assertArgument(false, \"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\n/**\n * Computes the [[link-solc-packed]] representation of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPacked([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPacked(types, values) {\n assertArgument(types.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\n/**\n * Computes the [[link-solc-packed]] [[keccak256]] hash of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPackedKeccak256([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPackedKeccak256(types, values) {\n return _keccak256(solidityPacked(types, values));\n}\n/**\n * Computes the [[link-solc-packed]] [[sha256]] hash of %%values%%\n * respectively to their %%types%%.\n *\n * @example:\n * addr = \"0x8ba1f109551bd432803012645ac136ddd64dba72\"\n * solidityPackedSha256([ \"address\", \"uint\" ], [ addr, 45 ]);\n * //_result:\n */\nexport function solidityPackedSha256(types, values) {\n return _sha256(solidityPacked(types, values));\n}\n//# sourceMappingURL=solidity.js.map","//import { TypedDataDomain, TypedDataField } from \"@ethersproject/providerabstract-signer\";\nimport { getAddress } from \"../address/index.js\";\nimport { keccak256 } from \"../crypto/index.js\";\nimport { recoverAddress } from \"../transaction/index.js\";\nimport { concat, defineProperties, getBigInt, getBytes, hexlify, isHexString, mask, toBeHex, toQuantity, toTwos, zeroPadValue, assertArgument } from \"../utils/index.js\";\nimport { id } from \"./id.js\";\nconst padding = new Uint8Array(32);\npadding.fill(0);\nconst BN__1 = BigInt(-1);\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n;\n;\nfunction hexPadRight(value) {\n const bytes = getBytes(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return concat([bytes, padding.slice(padOffset)]);\n }\n return hexlify(bytes);\n}\nconst hexTrue = toBeHex(BN_1, 32);\nconst hexFalse = toBeHex(BN_0, 32);\nconst domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\nconst domainFieldNames = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\nfunction checkString(key) {\n return function (value) {\n assertArgument(typeof (value) === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n}\nconst domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function (_value) {\n const value = getBigInt(_value, \"domain.chainId\");\n assertArgument(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return toQuantity(value);\n },\n verifyingContract: function (value) {\n try {\n return getAddress(value).toLowerCase();\n }\n catch (error) { }\n assertArgument(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function (value) {\n const bytes = getBytes(value, \"domain.salt\");\n assertArgument(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return hexlify(bytes);\n }\n};\nfunction getBaseEncoder(type) {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = (match[1] === \"\");\n const width = parseInt(match[2]);\n assertArgument(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = mask(BN_MAX_UINT256, signed ? (width - 1) : width);\n const boundsLower = signed ? ((boundsUpper + BN_1) * BN__1) : BN_0;\n return function (_value) {\n const value = getBigInt(_value, \"value\");\n assertArgument(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return toBeHex(signed ? toTwos(value, 256) : value, 32);\n };\n }\n }\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n assertArgument(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function (value) {\n const bytes = getBytes(value);\n assertArgument(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\": return function (value) {\n return zeroPadValue(getAddress(value), 32);\n };\n case \"bool\": return function (value) {\n return ((!value) ? hexFalse : hexTrue);\n };\n case \"bytes\": return function (value) {\n return keccak256(value);\n };\n case \"string\": return function (value) {\n return id(value);\n };\n }\n return null;\n}\nfunction encodeType(name, fields) {\n return `${name}(${fields.map(({ name, type }) => (type + \" \" + name)).join(\",\")})`;\n}\n// foo[][3] => { base: \"foo\", index: \"[][3]\", array: {\n// base: \"foo\", prefix: \"foo[]\", count: 3 } }\nfunction splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: (match[2] + match[4]),\n array: {\n base: match[1],\n prefix: (match[1] + match[2]),\n count: (match[5] ? parseInt(match[5]) : -1),\n }\n };\n }\n return { base: type };\n}\n/**\n * A **TypedDataEncode** prepares and encodes [[link-eip-712]] payloads\n * for signed typed data.\n *\n * This is useful for those that wish to compute various components of a\n * typed data hash, primary types, or sub-components, but generally the\n * higher level [[Signer-signTypedData]] is more useful.\n */\nexport class TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = new Map();\n this.#encoderCache = new Map();\n // Link struct types to their direct child structs\n const links = new Map();\n // Link structs to structs which contain them as a child\n const parents = new Map();\n // Link all subtypes within a given struct\n const subtypes = new Map();\n const types = {};\n Object.keys(_types).forEach((type) => {\n types[type] = _types[type].map(({ name, type }) => {\n // Normalize the base type (unless name conflict)\n let { base, index } = splitArray(type);\n if (base === \"int\" && !_types[\"int\"]) {\n base = \"int256\";\n }\n if (base === \"uint\" && !_types[\"uint\"]) {\n base = \"uint256\";\n }\n return { name, type: (base + (index || \"\")) };\n });\n links.set(type, new Set());\n parents.set(type, []);\n subtypes.set(type, new Set());\n });\n this.#types = JSON.stringify(types);\n for (const name in types) {\n const uniqueNames = new Set();\n for (const field of types[name]) {\n // Check each field has a unique name\n assertArgument(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n // Get the base type (drop any array specifiers)\n const baseType = splitArray(field.type).base;\n assertArgument(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) {\n continue;\n }\n assertArgument(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n // Add linkage\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n // Deduce the primary type\n const primaryTypes = Array.from(parents.keys()).filter((n) => (parents.get(n).length === 0));\n assertArgument(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n assertArgument(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(\", \")}`, \"types\", _types);\n defineProperties(this, { primaryType: primaryTypes[0] });\n // Check for circular type references\n function checkCircular(type, found) {\n assertArgument(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n // Recursively check children\n checkCircular(child, found);\n // Mark all ancestors as having this decendant\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, new Set());\n // Compute each fully describe type\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder = this.#encoderCache.get(type);\n if (!encoder) {\n encoder = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder);\n }\n return encoder;\n }\n #getEncoder(type) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return encoder;\n }\n }\n // Array\n const array = splitArray(type).array;\n if (array) {\n const subtype = array.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n assertArgument(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(keccak256);\n }\n return keccak256(concat(result));\n };\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this.#fullTypes.has(type)) {\n return keccak256(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return concat(values);\n };\n }\n assertArgument(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n assertArgument(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return keccak256(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return callback(type, value);\n }\n }\n // Array\n const array = splitArray(type).array;\n if (array) {\n assertArgument(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n return value.map((v) => this._visit(array.prefix, v, callback));\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, {});\n }\n assertArgument(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types) {\n return new TypedDataEncoder(types);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types) {\n return TypedDataEncoder.from(types).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types, value) {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain) {\n const domainFields = [];\n for (const name in domain) {\n if (domain[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n assertArgument(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain);\n domainFields.push({ name, type });\n }\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain, types, value) {\n return concat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain, types, value) {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain, types, value, resolveName) {\n // Make a copy to isolate it from the object passed in\n domain = Object.assign({}, domain);\n // Allow passing null to ignore value\n for (const key in domain) {\n if (domain[key] == null) {\n delete domain[key];\n }\n }\n // Look up all ENS names\n const ensCache = {};\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n // Get a list of all the addresses\n encoder.visit(value, (type, value) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n // Replace all ENS names with their address\n value = encoder.visit(value, (type, value) => {\n if (type === \"address\" && ensCache[value]) {\n return ensCache[value];\n }\n return value;\n });\n return { domain, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain, types, value) {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n // Derive the EIP712Domain Struct reference type\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value = domain[name];\n if (value == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder = TypedDataEncoder.from(types);\n // Get the normalized types\n types = encoder.types;\n const typesWithDomain = Object.assign({}, types);\n assertArgument(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n typesWithDomain.EIP712Domain = domainTypes;\n // Validate the data structures and types\n encoder.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type, value) => {\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(getBytes(value));\n }\n // uint or int\n if (type.match(/^u?int/)) {\n return getBigInt(value).toString();\n }\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n assertArgument(typeof (value) === \"string\", \"invalid string\", \"value\", value);\n return value;\n }\n assertArgument(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n}\n/**\n * Compute the address used to sign the typed data for the %%signature%%.\n */\nexport function verifyTypedData(domain, types, value, signature) {\n return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature);\n}\n//# sourceMappingURL=typed-data.js.map","/**\n * A fragment is a single item from an ABI, which may represent any of:\n *\n * - [Functions](FunctionFragment)\n * - [Events](EventFragment)\n * - [Constructors](ConstructorFragment)\n * - Custom [Errors](ErrorFragment)\n * - [Fallback or Receive](FallbackFragment) functions\n *\n * @_subsection api/abi/abi-coder:Fragments [about-fragments]\n */\nimport { defineProperties, getBigInt, getNumber, assert, assertPrivate, assertArgument } from \"../utils/index.js\";\nimport { id } from \"../hash/index.js\";\n;\n// [ \"a\", \"b\" ] => { \"a\": 1, \"b\": 1 }\nfunction setify(items) {\n const result = new Set();\n items.forEach((k) => result.add(k));\n return Object.freeze(result);\n}\nconst _kwVisibDeploy = \"external public payable override\";\nconst KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n// Visibility Keywords\nconst _kwVisib = \"constant external internal payable private public pure view override\";\nconst KwVisib = setify(_kwVisib.split(\" \"));\nconst _kwTypes = \"constructor error event fallback function receive struct\";\nconst KwTypes = setify(_kwTypes.split(\" \"));\nconst _kwModifiers = \"calldata memory storage payable indexed\";\nconst KwModifiers = setify(_kwModifiers.split(\" \"));\nconst _kwOther = \"tuple returns\";\n// All Keywords\nconst _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\nconst Keywords = setify(_keywords.split(\" \"));\n// Single character tokens\nconst SimpleTokens = {\n \"(\": \"OPEN_PAREN\", \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\", \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\", \"@\": \"AT\"\n};\n// Parser regexes to consume the next token\nconst regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\nconst regexNumberPrefix = new RegExp(\"^([0-9]+)\");\nconst regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n// Parser regexs to check validity\nconst regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\nconst regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\nclass TokenString {\n #offset;\n #tokens;\n get offset() { return this.#offset; }\n get length() { return this.#tokens.length - this.#offset; }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() { return new TokenString(this.#tokens); }\n reset() { this.#offset = 0; }\n #subTokenString(from = 0, to = 0) {\n return new TokenString(this.#tokens.slice(from, to).map((t) => {\n return Object.freeze(Object.assign({}, t, {\n match: (t.match - from),\n linkBack: (t.linkBack - from),\n linkNext: (t.linkNext - from),\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return (top != null && allowed.has(top)) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return (top.type === type) ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i = this.#offset; i < this.#tokens.length; i++) {\n const token = this.#tokens[i];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n}\nfunction lex(text) {\n const tokens = [];\n const throwError = (message) => {\n const token = (offset < text.length) ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n // Strip off any leading whitespace\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = (SimpleTokens[cur[0]] || \"\");\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n }\n else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n (tokens[token.match]).match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n (tokens[token.linkBack]).linkNext = tokens.length - 1;\n }\n else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n (tokens[token.linkBack]).linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n }\n else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n }\n else if (type === \"CLOSE_BRACKET\") {\n // Remove the CLOSE_BRACKET\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n (tokens[tokens.length - 1]).value = getNumber(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n (tokens[tokens.length - 1]).text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t) => Object.freeze(t)));\n}\n// Check only one of `allowed` is in `set`\nfunction allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n}\n// Functions to process a Solidity Signature TokenString from left-to-right for...\n// ...the name with an optional type, returning the name\nfunction consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n}\n// ...all keywords matching allowed, returning the keywords\nfunction consumeKeywords(tokens, allowed) {\n const keywords = new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || (allowed && !allowed.has(keyword))) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n}\n// ...all visibility keywords, returning the coalesced mutability\nfunction consumeMutability(tokens) {\n let modifiers = consumeKeywords(tokens, KwVisib);\n // Detect conflicting modifiers\n allowSingle(modifiers, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers, setify(\"pure view payable nonpayable\".split(\" \")));\n // Process mutability states\n if (modifiers.has(\"view\")) {\n return \"view\";\n }\n if (modifiers.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n // Process legacy `constant` last\n if (modifiers.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n}\n// ...a parameter list, returning the ParamType list\nfunction consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t) => ParamType.from(t, allowIndexed));\n}\n// ...a gas limit, returning a BigNumber or null if none\nfunction consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return getBigInt(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n}\nfunction consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n}\nconst regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\nfunction verifyBasicType(type) {\n const match = type.match(regexType);\n assertArgument(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n // bytesXX\n const length = parseInt(match[2]);\n assertArgument(length !== 0 && length <= 32, \"invalid bytes length\", \"type\", type);\n }\n else if (match[3]) {\n // intXX or uintXX\n const size = parseInt(match[3]);\n assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n}\n// Make the Fragment constructors effectively private\nconst _guard = {};\nconst internal = Symbol.for(\"_ethers_internal\");\nconst ParamTypeInternal = \"_ParamTypeInternal\";\nconst ErrorFragmentInternal = \"_ErrorInternal\";\nconst EventFragmentInternal = \"_EventInternal\";\nconst ConstructorFragmentInternal = \"_ConstructorInternal\";\nconst FallbackFragmentInternal = \"_FallbackInternal\";\nconst FunctionFragmentInternal = \"_FunctionInternal\";\nconst StructFragmentInternal = \"_StructInternal\";\n/**\n * Each input and output of a [[Fragment]] is an Array of **ParamType**.\n */\nexport class ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n assertPrivate(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n }\n else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n }\n else if (components != null) {\n throw new Error(\"\");\n }\n defineProperties(this, {\n name, type, baseType, indexed, components, arrayLength, arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result = JSON.parse(this.arrayChildren.format(\"json\"));\n result.name = name;\n result.type += `[${(this.arrayLength < 0 ? \"\" : String(this.arrayLength))}]`;\n return JSON.stringify(result);\n }\n const result = {\n type: ((this.baseType === \"tuple\") ? \"tuple\" : this.type),\n name\n };\n if (typeof (this.indexed) === \"boolean\") {\n result.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result.components = this.components.map((c) => JSON.parse(c.format(format)));\n }\n return JSON.stringify(result);\n }\n let result = \"\";\n // Array\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${(this.arrayLength < 0 ? \"\" : String(this.arrayLength))}]`;\n }\n else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join((format === \"full\") ? \", \" : \",\") + \")\";\n }\n else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return (this.baseType === \"array\");\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return (this.baseType === \"tuple\");\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return (this.indexed != null);\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v) => (_this.arrayChildren.walk(v, process)));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v, i) => (_this.components[i].walk(v, process)));\n }\n return process(this.type, value);\n }\n #walkAsync(promises, value, process, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result = value.slice();\n result.forEach((value, index) => {\n childType.#walkAsync(promises, value, process, (value) => {\n result[index] = value;\n });\n });\n setValue(result);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n // Convert the object into an array\n let result;\n if (Array.isArray(value)) {\n result = value.slice();\n }\n else {\n if (value == null || typeof (value) !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result.forEach((value, index) => {\n components[index].#walkAsync(promises, value, process, (value) => {\n result[index] = value;\n });\n });\n setValue(result);\n return;\n }\n const result = process(this.type, value);\n if (result.then) {\n promises.push((async function () { setValue(await result); })());\n }\n else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS names by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process, (value) => {\n result[0] = value;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return ParamType.from(lex(obj), allowIndexed);\n }\n catch (error) {\n assertArgument(false, \"invalid param type\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n let type = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n // Tuple\n baseType = \"tuple\";\n comps = obj.popParams().map((t) => ParamType.from(t));\n type = `tuple(${comps.map((c) => c.format()).join(\",\")})`;\n }\n else {\n // Normal\n type = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type;\n }\n // Check for Array\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop(); //arrays[i];\n arrayChildren = new ParamType(_guard, \"\", type, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed = true;\n }\n const name = (obj.peekType(\"ID\") ? obj.pop().text : \"\");\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new ParamType(_guard, name, type, baseType, indexed, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n assertArgument(!name || (typeof (name) === \"string\" && name.match(regexId)), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n assertArgument(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\"tuple(\" /* fix: ) */) || type.startsWith(\"(\" /* fix: ) */)) {\n const comps = (obj.components != null) ? obj.components.map((c) => ParamType.from(c)) : null;\n const tuple = new ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n // @TODO: use lexer to validate and normalize type\n return tuple;\n }\n type = verifyBasicType(obj.type);\n return new ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return (value && value[internal] === ParamTypeInternal);\n }\n}\n/**\n * An abstract class to represent An individual fragment from a parse ABI.\n */\nexport class Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n assertPrivate(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n defineProperties(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof (obj) === \"string\") {\n // Try parsing JSON...\n try {\n Fragment.from(JSON.parse(obj));\n }\n catch (e) { }\n // ...otherwise, use the human-readable lexer\n return Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n // Human-readable ABI (already lexed)\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\": return ConstructorFragment.from(obj);\n case \"error\": return ErrorFragment.from(obj);\n case \"event\": return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\": return FunctionFragment.from(obj);\n case \"struct\": return StructFragment.from(obj);\n }\n }\n else if (typeof (obj) === \"object\") {\n // JSON ABI\n switch (obj.type) {\n case \"constructor\": return ConstructorFragment.from(obj);\n case \"error\": return ErrorFragment.from(obj);\n case \"event\": return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\": return FunctionFragment.from(obj);\n case \"struct\": return StructFragment.from(obj);\n }\n assert(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n assertArgument(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n}\n/**\n * An abstract class to represent An individual fragment\n * which has a name from a parse ABI.\n */\nexport class NamedFragment extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n assertArgument(typeof (name) === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n defineProperties(this, { name });\n }\n}\nfunction joinParams(format, params) {\n return \"(\" + params.map((p) => p.format(format)).join((format === \"full\") ? \", \" : \",\") + \")\";\n}\n/**\n * A Fragment which represents a //Custom Error//.\n */\nexport class ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return id(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n return ErrorFragment.from(lex(obj));\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new ErrorFragment(_guard, name, inputs);\n }\n return new ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === ErrorFragmentInternal);\n }\n}\n/**\n * A Fragment which represents an Event.\n */\nexport class EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n defineProperties(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return id(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i) => JSON.parse(i.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p) => ParamType.from(p));\n const fragment = new EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return EventFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid event fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new EventFragment(_guard, name, inputs, anonymous);\n }\n return new EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p) => ParamType.from(p, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === EventFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a constructor.\n */\nexport class ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n defineProperties(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n assert(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: (this.payable ? \"payable\" : \"undefined\"),\n payable: this.payable,\n gas: ((this.gas != null) ? this.gas : undefined),\n inputs: this.inputs.map((i) => JSON.parse(i.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return ConstructorFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, (obj.gas != null) ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === ConstructorFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a method.\n */\nexport class FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n defineProperties(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = ((this.inputs.length === 0) ? \"receive\" : \"fallback\");\n if (format === \"json\") {\n const stateMutability = (this.payable ? \"payable\" : \"nonpayable\");\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return FallbackFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n assertArgument(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n // receive()\n if (type === \"receive\") {\n const inputs = consumeParams(obj);\n assertArgument(inputs.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new FallbackFragment(_guard, [], true);\n }\n // fallback() [payable]\n // fallback(bytes) [payable] returns (bytes)\n let inputs = consumeParams(obj);\n if (inputs.length) {\n assertArgument(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i) => i.format(\"minimal\")).join(\", \"));\n }\n else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n assertArgument(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n assertArgument(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i) => i.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = (obj.stateMutability === \"payable\");\n return new FallbackFragment(_guard, inputs, payable);\n }\n assertArgument(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === FallbackFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a method.\n */\nexport class FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = (stateMutability === \"view\" || stateMutability === \"pure\");\n const payable = (stateMutability === \"payable\");\n defineProperties(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return id(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability : undefined),\n payable: this.payable,\n gas: ((this.gas != null) ? this.gas : undefined),\n inputs: this.inputs.map((i) => JSON.parse(i.format(format))),\n outputs: this.outputs.map((o) => JSON.parse(o.format(format))),\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p) => ParamType.from(p));\n const fragment = new FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof (obj) === \"string\") {\n try {\n return FunctionFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid function fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n // Use legacy Solidity ABI logic if stateMutability is missing\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof (obj.constant) === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof (obj.payable) === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n }\n else if (typeof (obj.payable) === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n // @TODO: verifyState for stateMutability (e.g. throw if\n // payable: false but stateMutability is \"nonpayable\")\n return new FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], (obj.gas != null) ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === FunctionFragmentInternal);\n }\n}\n/**\n * A Fragment which represents a structure.\n */\nexport class StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof (obj) === \"string\") {\n try {\n return StructFragment.from(lex(obj));\n }\n catch (error) {\n assertArgument(false, \"invalid struct fragment\", \"obj\", obj);\n }\n }\n else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new StructFragment(_guard, name, inputs);\n }\n return new StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return (value && value[internal] === StructFragmentInternal);\n }\n}\n//# sourceMappingURL=fragments.js.map","/**\n * When sending values to or receiving values from a [[Contract]], the\n * data is generally encoded using the [ABI standard](link-solc-abi).\n *\n * The AbiCoder provides a utility to encode values to ABI data and\n * decode values from ABI data.\n *\n * Most of the time, developers should favour the [[Contract]] class,\n * which further abstracts a lot of the finer details of ABI data.\n *\n * @_section api/abi/abi-coder:ABI Encoding\n */\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\nimport { assertArgumentCount, assertArgument } from \"../utils/index.js\";\nimport { Reader, Writer } from \"./coders/abstract-coder.js\";\nimport { AddressCoder } from \"./coders/address.js\";\nimport { ArrayCoder } from \"./coders/array.js\";\nimport { BooleanCoder } from \"./coders/boolean.js\";\nimport { BytesCoder } from \"./coders/bytes.js\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes.js\";\nimport { NullCoder } from \"./coders/null.js\";\nimport { NumberCoder } from \"./coders/number.js\";\nimport { StringCoder } from \"./coders/string.js\";\nimport { TupleCoder } from \"./coders/tuple.js\";\nimport { ParamType } from \"./fragments.js\";\nimport { getAddress } from \"../address/index.js\";\nimport { getBytes, hexlify, makeError } from \"../utils/index.js\";\n// https://docs.soliditylang.org/en/v0.8.17/control-structures.html\nconst PanicReasons = new Map();\nPanicReasons.set(0x00, \"GENERIC_PANIC\");\nPanicReasons.set(0x01, \"ASSERT_FALSE\");\nPanicReasons.set(0x11, \"OVERFLOW\");\nPanicReasons.set(0x12, \"DIVIDE_BY_ZERO\");\nPanicReasons.set(0x21, \"ENUM_RANGE_ERROR\");\nPanicReasons.set(0x22, \"BAD_STORAGE_DATA\");\nPanicReasons.set(0x31, \"STACK_UNDERFLOW\");\nPanicReasons.set(0x32, \"ARRAY_RANGE_ERROR\");\nPanicReasons.set(0x41, \"OUT_OF_MEMORY\");\nPanicReasons.set(0x51, \"UNINITIALIZED_FUNCTION_CALL\");\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\nlet defaultCoder = null;\nlet defaultMaxInflation = 1024;\nfunction getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = getBytes(data);\n data = hexlify(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n }\n else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x08c379a0\") {\n // Error(string)\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n }\n catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x4e487b71\") {\n // Panic(uint256)\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n }\n catch (error) {\n message += \" (could not decode panic code)\";\n }\n }\n else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: (tx.to ? getAddress(tx.to) : null),\n data: (tx.data || \"0x\")\n };\n if (tx.from) {\n transaction.from = getAddress(tx.from);\n }\n return makeError(message, \"CALL_EXCEPTION\", {\n action, data, reason, transaction, invocation, revert\n });\n}\n/**\n * The **AbiCoder** is a low-level class responsible for encoding JavaScript\n * values into binary data and decoding binary data into JavaScript values.\n */\nexport class AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new TupleCoder(param.components.map((c) => this.#getCoder(c)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n assertArgument(size !== 0 && size <= 32, \"invalid bytes length\", \"param\", param);\n return new FixedBytesCoder(size, param.name);\n }\n assertArgument(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n assertArgumentCount(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n const writer = new Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(new Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n assertArgument(typeof (value) === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, AbiCoder.defaultAbiCoder());\n }\n}\n//# sourceMappingURL=abi-coder.js.map","/**\n * About bytes32 strings...\n *\n * @_docloc: api/utils:Bytes32 Strings\n */\nimport { getBytes, toUtf8Bytes, toUtf8String, zeroPadBytes } from \"../utils/index.js\";\n/**\n * Encodes %%text%% as a Bytes32 string.\n */\nexport function encodeBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return zeroPadBytes(bytes, 32);\n}\n/**\n * Encodes the Bytes32-encoded %%bytes%% into a string.\n */\nexport function decodeBytes32String(_bytes) {\n const data = getBytes(_bytes, \"bytes\");\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","/**\n * The Interface class is a low-level class that accepts an\n * ABI and provides all the necessary functionality to encode\n * and decode paramaters to and results from methods, events\n * and errors.\n *\n * It also provides several convenience methods to automatically\n * search and find matching transactions and events to parse them.\n *\n * @_subsection api/abi:Interfaces [interfaces]\n */\nimport { keccak256 } from \"../crypto/index.js\";\nimport { id } from \"../hash/index.js\";\nimport { concat, dataSlice, getBigInt, getBytes, getBytesCopy, hexlify, zeroPadBytes, zeroPadValue, isHexString, defineProperties, assertArgument, toBeHex, assert } from \"../utils/index.js\";\nimport { AbiCoder } from \"./abi-coder.js\";\nimport { checkResultErrors, Result } from \"./coders/abstract-coder.js\";\nimport { ConstructorFragment, ErrorFragment, EventFragment, Fragment, FunctionFragment, ParamType } from \"./fragments.js\";\nimport { Typed } from \"./typed.js\";\nexport { checkResultErrors, Result };\n/**\n * When using the [[Interface-parseLog]] to automatically match a Log to its event\n * for parsing, a **LogDescription** is returned.\n */\nexport class LogDescription {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, signature, topic, args\n });\n }\n}\n/**\n * When using the [[Interface-parseTransaction]] to automatically match\n * a transaction data to its function for parsing,\n * a **TransactionDescription** is returned.\n */\nexport class TransactionDescription {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, args, signature, selector, value\n });\n }\n}\n/**\n * When using the [[Interface-parseError]] to automatically match an\n * error for a call result for parsing, an **ErrorDescription** is returned.\n */\nexport class ErrorDescription {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n defineProperties(this, {\n fragment, name, args, signature, selector\n });\n }\n}\n/**\n * An **Indexed** is used as a value when a value that does not\n * fit within a topic (i.e. not a fixed-length, 32-byte type). It\n * is the ``keccak256`` of the value, and used for types such as\n * arrays, tuples, bytes and strings.\n */\nexport class Indexed {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash) {\n defineProperties(this, { hash, _isIndexed: true });\n }\n}\n// https://docs.soliditylang.org/en/v0.8.13/control-structures.html?highlight=panic#panic-via-assert-and-error-via-require\nconst PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\",\n};\nconst BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message) => {\n return `reverted with reason string ${JSON.stringify(message)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 0xff && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n};\n/**\n * An Interface abstracts many of the low-level details for\n * encoding and decoding the data on the blockchain.\n *\n * An ABI provides information on how to encode data to send to\n * a Contract, how to decode the results and events and how to\n * interpret revert errors.\n *\n * The ABI can be specified by [any supported format](InterfaceAbi).\n */\nexport class Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi = [];\n if (typeof (fragments) === \"string\") {\n abi = JSON.parse(fragments);\n }\n else {\n abi = fragments;\n }\n this.#functions = new Map();\n this.#errors = new Map();\n this.#events = new Map();\n // this.#structs = new Map();\n const frags = [];\n for (const a of abi) {\n try {\n frags.push(Fragment.from(a));\n }\n catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);\n }\n }\n defineProperties(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n // Add all fragments by their signature\n this.fragments.forEach((fragment, index) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineProperties(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n }\n else {\n assertArgument(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.#functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n // Two identical entries; ignore it\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineProperties(this, {\n deploy: ConstructorFragment.from(\"constructor()\")\n });\n }\n defineProperties(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = (minimal ? \"minimal\" : \"full\");\n const abi = this.fragments.map((f) => f.format(format));\n return abi;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi = this.fragments.map((f) => f.format(\"json\"));\n // We need to re-bundle the JSON fragments a bit\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n // Selector\n if (isHexString(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = (values.length > 0) ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n // Remove all matches that don't have a compatible length. The args\n // may contain an overrides, so the match may have n or n - 1 parameters\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i, 1);\n }\n }\n // Remove all matches that don't match the Typed signature\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs;\n for (let j = 0; j < values.length; j++) {\n // Not a typed value\n if (!Typed.isTyped(values[j])) {\n continue;\n }\n // We are past the inputs\n if (j >= inputs.length) {\n if (values[j].type === \"overrides\") {\n continue;\n }\n matching.splice(i, 1);\n break;\n }\n // Make sure the value type matches the input type\n if (values[j].type !== inputs[j].baseType) {\n matching.splice(i, 1);\n break;\n }\n }\n }\n }\n // We found a single matching signature with an overrides, but the\n // last value is something that cannot possibly be an options\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof (lastArg) !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n const result = this.#functions.get(FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n assertArgument(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#functions.get(name)), i);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n // EventTopic\n if (isHexString(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n // Remove all matches that don't have a compatible length.\n for (let i = matching.length - 1; i >= 0; i--) {\n if (matching[i].inputs.length < values.length) {\n matching.splice(i, 1);\n }\n }\n // Remove all matches that don't match the Typed signature\n for (let i = matching.length - 1; i >= 0; i--) {\n const inputs = matching[i].inputs;\n for (let j = 0; j < values.length; j++) {\n // Not a typed value\n if (!Typed.isTyped(values[j])) {\n continue;\n }\n // Make sure the value type matches the input type\n if (values[j].type !== inputs[j].baseType) {\n matching.splice(i, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n const result = this.#events.get(EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n assertArgument(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#events.get(name)), i);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if (isHexString(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\"(\" /* fix:) */)[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n }\n else if (matching.length > 1) {\n const matchStr = matching.map((m) => JSON.stringify(m.format())).join(\", \");\n assertArgument(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n // Normalize the signature and lookup the function\n key = ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#errors.get(name)), i);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\ngetSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n\n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n\n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n\n fragment = matches[0];\n }\n\n return dataSlice(id(fragment.format()), 0, 4);\n}\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getError(fragment);\n assertArgument(f, \"unknown error\", \"fragment\", fragment);\n fragment = f;\n }\n assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, dataSlice(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getError(fragment);\n assertArgument(f, \"unknown error\", \"fragment\", fragment);\n fragment = f;\n }\n return concat([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n assertArgument(dataSlice(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, dataSlice(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n return concat([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n let message = \"invalid length for result data\";\n const bytes = getBytesCopy(data);\n if ((bytes.length % 32) === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n }\n catch (error) {\n message = \"could not decode result data\";\n }\n }\n // Call returned data with no error, but the data is junk\n assert(false, message, \"BAD_DATA\", {\n value: hexlify(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = getBytes(_data, \"data\");\n const error = AbiCoder.getBuiltinCallException(\"call\", tx, data);\n // Not a built-in error; try finding a custom error\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = hexlify(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name, signature: ef.format(), args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n }\n catch (e) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n // Add the invocation, if available\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getFunction(fragment);\n assertArgument(f, \"unknown function\", \"fragment\", fragment);\n fragment = f;\n }\n return hexlify(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n assert(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n // @TODO: Use the coders for this; to properly support tuples, etc.\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return id(value);\n }\n else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n if (param.type === \"bool\" && typeof (value) === \"boolean\") {\n value = (value ? \"0x01\" : \"0x00\");\n }\n else if (param.type.match(/^u?int/)) {\n value = toBeHex(value); // @TODO: Should this toTwos??\n }\n else if (param.type.match(/^bytes/)) {\n value = zeroPadBytes(value, 32);\n }\n else if (param.type === \"address\") {\n // Check addresses are valid\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return zeroPadValue(hexlify(value), 32);\n };\n values.forEach((value, index) => {\n const param = fragment.inputs[index];\n if (!param.indexed) {\n assertArgument(value == null, \"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n return;\n }\n if (value == null) {\n topics.push(null);\n }\n else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n assertArgument(false, \"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n }\n else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n }\n else {\n topics.push(encodeTopic(param, value));\n }\n });\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n assertArgument(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value));\n }\n else if (param.type === \"bytes\") {\n topics.push(keccak256(value));\n }\n else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n }\n else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n }\n else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics: topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof (fragment) === \"string\") {\n const f = this.getEvent(fragment);\n assertArgument(f, \"unknown event\", \"eventFragment\", fragment);\n fragment = f;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n assertArgument(isHexString(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = (topics != null) ? this.#abiCoder.decode(indexed, concat(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n //const result: (Array & { [ key: string ]: any }) = [ ];\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n }\n else if (dynamic[index]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n }\n else {\n try {\n value = resultIndexed[indexedIndex++];\n }\n catch (error) {\n value = error;\n }\n }\n }\n else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = getBytes(tx.data, \"tx.data\");\n const value = getBigInt((tx.value != null) ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction(hexlify(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = hexlify(data);\n const fragment = this.getError(dataSlice(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, dataSlice(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n // Already an Interface, which is immutable\n if (value instanceof Interface) {\n return value;\n }\n // JSON\n if (typeof (value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n // An Interface; possibly from another v6 instance\n if (typeof (value.formatJson) === \"function\") {\n return new Interface(value.formatJson());\n }\n // A legacy Interface; from an older version\n if (typeof (value.format) === \"function\") {\n return new Interface(value.format(\"json\"));\n }\n // Array of fragments\n return new Interface(value);\n }\n}\n//# sourceMappingURL=interface.js.map","//import { resolveAddress } from \"@ethersproject/address\";\nimport { defineProperties, getBigInt, getNumber, hexlify, isBytesLike, resolveProperties, assert, assertArgument, isError, makeError } from \"../utils/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nconst BN_0 = BigInt(0);\n// -----------------------\nfunction getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n}\nfunction toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n}\n// @TODO? implements Required\n/**\n * A **FeeData** wraps all the fee-related values associated with\n * the network.\n */\nexport class FeeData {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n defineProperties(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas),\n };\n }\n}\n;\n/**\n * Returns a copy of %%req%% with all properties coerced to their strict\n * types.\n */\nexport function copyRequest(req) {\n const result = {};\n // These could be addresses, ENS names or Addressables\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = hexlify(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = getBigInt(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = getNumber(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = accessListify(req.accessList);\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n if (\"blobVersionedHashes\" in req && req.blobVersionedHashes) {\n result.blobVersionedHashes = req.blobVersionedHashes.slice();\n }\n if (\"kzg\" in req) {\n result.kzg = req.kzg;\n }\n if (\"blobs\" in req && req.blobs) {\n result.blobs = req.blobs.map((b) => {\n if (isBytesLike(b)) {\n return hexlify(b);\n }\n return Object.assign({}, b);\n });\n }\n return result;\n}\n/**\n * A **Block** represents the data associated with a full block on\n * Ethereum.\n */\nexport class Block {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * The latest RANDAO mix of the post beacon state of\n * the previous block.\n */\n prevRandao;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof (tx) !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n defineProperties(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n prevRandao: getValue(block.prevRandao),\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot,\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof (tx) === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n // Doesn't matter...\n if (txs.length === 0) {\n return [];\n }\n // Make sure we prefetched the transactions\n assert(typeof (txs[0]) === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash, miner, prevRandao, nonce, number, parentHash, timestamp,\n parentBeaconBlockRoot, stateRoot, receiptsRoot,\n transactions,\n };\n }\n [Symbol.iterator]() {\n let index = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index < this.length) {\n return {\n value: txs[index++], done: false\n };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() { return this.#transactions.length; }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1000);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n // Find the internal value by its index or hash\n let tx = undefined;\n if (typeof (indexOrHash) === \"number\") {\n tx = this.#transactions[indexOrHash];\n }\n else {\n const hash = indexOrHash.toLowerCase();\n for (const v of this.#transactions) {\n if (typeof (v) === \"string\") {\n if (v !== hash) {\n continue;\n }\n tx = v;\n break;\n }\n else {\n if (v.hash === hash) {\n continue;\n }\n tx = v;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof (tx) === \"string\") {\n return (await this.provider.getTransaction(tx));\n }\n else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof (indexOrHash) === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n assertArgument(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() { return !!this.hash; }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n}\n//////////////////////\n// Log\n/**\n * A **Log** in Ethereum represents an event that has been included in a\n * transaction using the ``LOG*`` opcodes, which are most commonly used by\n * Solidity's emit for announcing events.\n */\nexport class Log {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n defineProperties(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex,\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address, blockHash, blockNumber, data, index,\n removed, topics, transactionHash, transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n assert(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n assert(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n assert(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n}\n//////////////////////\n// Transaction Receipt\n/*\nexport interface LegacyTransactionReceipt {\n byzantium: false;\n status: null;\n root: string;\n}\n\nexport interface ByzantiumTransactionReceipt {\n byzantium: true;\n status: number;\n root: null;\n}\n*/\n/**\n * A **TransactionReceipt** includes additional information about a\n * transaction that is only available after it has been mined.\n */\nexport class TransactionReceipt {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n }\n else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n defineProperties(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() { return this.#logs; }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const { to, from, contractAddress, hash, index, blockHash, blockNumber, logsBloom, logs, //byzantium, \n status, root } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash, blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash, index, logs, logsBloom, root, status, to\n };\n }\n /**\n * @_ignore:\n */\n get length() { return this.logs.length; }\n [Symbol.iterator]() {\n let index = 0;\n return {\n next: () => {\n if (index < this.length) {\n return { value: this.logs[index++], done: false };\n }\n return { value: undefined, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return (await this.provider.getTransactionResult(this.hash));\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return (await this.provider.getBlockNumber()) - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n assert(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n}\n/**\n * A **TransactionResponse** includes all properties about a transaction\n * that was sent to the network, which may or may not be included in a\n * block.\n *\n * The [[TransactionResponse-isMined]] can be used to check if the\n * transaction has been mined as well as type guard that the otherwise\n * possibly ``null`` properties are defined.\n */\nexport class TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = (tx.blockNumber != null) ? tx.blockNumber : null;\n this.blockHash = (tx.blockHash != null) ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = (tx.accessList != null) ? tx.accessList : null;\n this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList, blockNumber, blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data, from,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce, signature, to, index, type,\n value: toJson(this.value),\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber } = await resolveProperties({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n // Not mined yet...\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = (_confirms == null) ? 1 : _confirms;\n const timeout = (_timeout == null) ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = (startBlock === -1) ? true : false;\n const checkReplacement = async () => {\n // Get the current transaction count for this sender\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await resolveProperties({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n // No transaction or our nonce has not been mined yet; but we\n // can start scanning later when we do start\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n // We were mined; no replacement\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n // We were replaced; start scanning for that transaction\n // Starting to scan; look back a few extra blocks for safety\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n // Get the next block to scan\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n // This should not happen; but we'll try again shortly\n if (block == null) {\n return;\n }\n // We were mined; no replacement\n for (const hash of block) {\n if (hash === this.hash) {\n return;\n }\n }\n // Search for the transaction that replaced us\n for (let i = 0; i < block.length; i++) {\n const tx = await block.getTransaction(i);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n // Get the receipt\n if (stopScanning) {\n return null;\n }\n const receipt = await this.provider.getTransactionReceipt(tx.hash);\n // This should not happen; but we'll try again shortly\n if (receipt == null) {\n return;\n }\n // We will retry this on the next block (this case could be optimized)\n if ((blockNumber - receipt.blockNumber + 1) < confirms) {\n return;\n }\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n }\n else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n assert(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt) => {\n if (receipt == null || receipt.status !== 0) {\n return receipt;\n }\n assert(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null, reason: null, invocation: null, revert: null,\n transaction: {\n to: receipt.to,\n from: receipt.from,\n data: \"\" // @TODO: in v7, split out sendTransaction properties\n }, receipt\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if ((await receipt.confirmations()) >= confirms) {\n return checkReceipt(receipt);\n }\n }\n else {\n // Check for a replacement; throws if a replacement was found\n await checkReplacement();\n // Allow null only when the confirms is 0\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n // List of things to cancel when we have a result (one way or the other)\n const cancellers = [];\n const cancel = () => { cancellers.forEach((c) => c()); };\n // On cancel, stop scanning for replacements\n cancellers.push(() => { stopScanning = true; });\n // Set up any timeout requested\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel();\n reject(makeError(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => { clearTimeout(timer); });\n }\n const txListener = async (receipt) => {\n // Done; return it!\n if ((await receipt.confirmations()) >= confirms) {\n cancel();\n try {\n resolve(checkReceipt(receipt));\n }\n catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => { this.provider.off(this.hash, txListener); });\n this.provider.on(this.hash, txListener);\n // We support replacement detection; start checking\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n // Check for a replacement; this throws only if one is found\n await checkReplacement();\n }\n catch (error) {\n // We were replaced (with enough confirms); re-throw the error\n if (isError(error, \"TRANSACTION_REPLACED\")) {\n cancel();\n reject(error);\n return;\n }\n }\n // Rescheudle a check on the next block\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => { this.provider.off(\"block\", replaceListener); });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return (this.blockHash != null);\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return (this.type === 0);\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return (this.type === 1);\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return (this.type === 2);\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return (this.type === 3);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n assert(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n assert(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n assert(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n assertArgument(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n}\nfunction createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n}\nfunction createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n}\nfunction createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n}\nfunction createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n}\n//# sourceMappingURL=provider.js.map","// import from provider.ts instead of index.ts to prevent circular dep\n// from EtherscanProvider\nimport { Log, TransactionReceipt, TransactionResponse } from \"../providers/provider.js\";\nimport { defineProperties, EventPayload } from \"../utils/index.js\";\n/**\n * An **EventLog** contains additional properties parsed from the [[Log]].\n */\nexport class EventLog extends Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n defineProperties(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() { return this.fragment.name; }\n /**\n * The signature of the event.\n */\n get eventSignature() { return this.fragment.format(); }\n}\n/**\n * An **EventLog** contains additional properties parsed from the [[Log]].\n */\nexport class UndecodedEventLog extends Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n defineProperties(this, { error });\n }\n}\n/**\n * A **ContractTransactionReceipt** includes the parsed logs from a\n * [[TransactionReceipt]].\n */\nexport class ContractTransactionReceipt extends TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n }\n catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n}\n/**\n * A **ContractTransactionResponse** will return a\n * [[ContractTransactionReceipt]] when waited on.\n */\nexport class ContractTransactionResponse extends TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n}\n/**\n * A **ContractUnknownEventPayload** is included as the last parameter to\n * Contract Events when the event does not match any events in the ABI.\n */\nexport class ContractUnknownEventPayload extends EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n defineProperties(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n}\n/**\n * A **ContractEventPayload** is included as the last parameter to\n * Contract Events when the event is known.\n */\nexport class ContractEventPayload extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n defineProperties(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n}\n//# sourceMappingURL=wrappers.js.map","import { Interface, Typed } from \"../abi/index.js\";\nimport { isAddressable, resolveAddress } from \"../address/index.js\";\n// import from provider.ts instead of index.ts to prevent circular dep\n// from EtherscanProvider\nimport { copyRequest, Log } from \"../providers/provider.js\";\nimport { defineProperties, getBigInt, isCallException, isHexString, resolveProperties, isError, makeError, assert, assertArgument } from \"../utils/index.js\";\nimport { ContractEventPayload, ContractUnknownEventPayload, ContractTransactionResponse, EventLog, UndecodedEventLog } from \"./wrappers.js\";\nconst BN_0 = BigInt(0);\nfunction canCall(value) {\n return (value && typeof (value.call) === \"function\");\n}\nfunction canEstimate(value) {\n return (value && typeof (value.estimateGas) === \"function\");\n}\nfunction canResolve(value) {\n return (value && typeof (value.resolveName) === \"function\");\n}\nfunction canSend(value) {\n return (value && typeof (value.sendTransaction) === \"function\");\n}\nfunction getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return undefined;\n}\nclass PreparedTopicFilter {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n defineProperties(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n // Recursively descend into args and resolve any addresses\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = (async function () {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index) => {\n const arg = args[index];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v) => resolveAddress(v, resolver)));\n }\n return resolveAddress(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n })();\n }\n getTopicFilter() {\n return this.#filter;\n }\n}\n// A = Arguments passed in as a tuple\n// R = The result type of the call (i.e. if only one return type,\n// the qualified type, otherwise Result)\n// D = The type the default call will return (i.e. R for view/pure,\n// TransactionResponse otherwise)\n//export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = ContractTransactionResponse> {\nfunction getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof (value[feature]) === \"function\") {\n return value;\n }\n if (value.provider && typeof (value.provider[feature]) === \"function\") {\n return value.provider;\n }\n return null;\n}\nfunction getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n}\n/**\n * @_ignore:\n */\nexport async function copyOverrides(arg, allowed) {\n // Make sure the overrides passed in are a valid overrides object\n const _overrides = Typed.dereference(arg, \"overrides\");\n assertArgument(typeof (_overrides) === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n // Create a shallow copy (we'll deep-ify anything needed during normalizing)\n const overrides = copyRequest(_overrides);\n assertArgument(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n assertArgument(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n // Resolve any from\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n}\n/**\n * @_ignore:\n */\nexport async function resolveArgs(_runner, inputs, args) {\n // Recursively descend into args and resolve any addresses\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index) => {\n return param.walkAsync(args[index], (type, value) => {\n value = Typed.dereference(value, type);\n if (type === \"address\") {\n return resolveAddress(value, resolver);\n }\n return value;\n });\n }));\n}\nfunction buildWrappedFallback(contract) {\n const populateTransaction = async function (overrides) {\n // If an overrides was passed in, copy it and normalize the values\n const tx = (await copyOverrides(overrides, [\"data\"]));\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await resolveAddress(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (getBigInt((tx.value || BN_0), \"overrides.value\") === BN_0);\n const noData = ((tx.data || \"0x\") === \"0x\");\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n assertArgument(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n assertArgument(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n // Only allow payable contracts to set non-zero value\n const payable = iface.receive || (iface.fallback && iface.fallback.payable);\n assertArgument(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n // Only allow fallback contracts to set non-empty data\n assertArgument(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function (overrides) {\n const runner = getRunner(contract.runner, \"call\");\n assert(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(overrides);\n try {\n return await runner.call(tx);\n }\n catch (error) {\n if (isCallException(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function (overrides) {\n const runner = contract.runner;\n assert(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(overrides));\n const provider = getProvider(contract.runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n return new ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas = async function (overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n assert(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n defineProperties(method, {\n _contract: contract,\n estimateGas,\n populateTransaction,\n send, staticCall\n });\n return method;\n}\nfunction buildWrappedMethod(contract, key) {\n const getFragment = function (...args) {\n const fragment = contract.interface.getFunction(key, args);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction = async function (...args) {\n const fragment = getFragment(...args);\n // If an overrides was passed in, copy it and normalize the values\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await resolveAddress(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await resolveProperties({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function (...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function (...args) {\n const runner = contract.runner;\n assert(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(...args));\n const provider = getProvider(contract.runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n return new ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas = async function (...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n assert(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(...args));\n };\n const staticCallResult = async function (...args) {\n const runner = getRunner(contract.runner, \"call\");\n assert(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n }\n catch (error) {\n if (isCallException(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n defineProperties(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract, _key: key,\n getFragment,\n estimateGas,\n populateTransaction,\n send, staticCall, staticCallResult,\n });\n // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n}\nfunction buildWrappedEvent(contract, key) {\n const getFragment = function (...args) {\n const fragment = contract.interface.getEvent(key, args);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function (...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n defineProperties(method, {\n name: contract.interface.getEventName(key),\n _contract: contract, _key: key,\n getFragment\n });\n // Only works on non-ambiguous keys (refined fragment is always non-ambiguous)\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n assert(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n}\n// The combination of TypeScrype, Private Fields and Proxies makes\n// the world go boom; so we hide variables with some trickery keeping\n// a symbol attached to each BaseContract which its sub-class (even\n// via a Proxy) can reach and use to look up its internal values.\nconst internal = Symbol.for(\"_ethersInternal_contract\");\nconst internalValues = new WeakMap();\nfunction setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n}\nfunction getInternal(contract) {\n return internalValues.get(contract[internal]);\n}\nfunction isDeferred(value) {\n return (value && typeof (value) === \"object\" && (\"getTopicFilter\" in value) &&\n (typeof (value.getTopicFilter) === \"function\") && value.fragment);\n}\nasync function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n // Convert named events to topicHash and get the fragment for\n // events which need deconstructing.\n if (Array.isArray(event)) {\n const topicHashify = function (name) {\n if (isHexString(name, 32)) {\n return name;\n }\n const fragment = contract.interface.getEvent(name);\n assertArgument(fragment, \"unknown fragment\", \"name\", name);\n return fragment.topicHash;\n };\n // Array of Topics and Names; e.g. `[ \"0x1234...89ab\", \"Transfer(address)\" ]`\n topics = event.map((e) => {\n if (e == null) {\n return null;\n }\n if (Array.isArray(e)) {\n return e.map(topicHashify);\n }\n return topicHashify(e);\n });\n }\n else if (event === \"*\") {\n topics = [null];\n }\n else if (typeof (event) === \"string\") {\n if (isHexString(event, 32)) {\n // Topic Hash\n topics = [event];\n }\n else {\n // Name or Signature; e.g. `\"Transfer\", `\"Transfer(address)\"`\n fragment = contract.interface.getEvent(event);\n assertArgument(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n }\n else if (isDeferred(event)) {\n // Deferred Topic Filter; e.g. `contract.filter.Transfer(from)`\n topics = await event.getTopicFilter();\n }\n else if (\"fragment\" in event) {\n // ContractEvent; e.g. `contract.filter.Transfer`\n fragment = event.fragment;\n topics = [fragment.topicHash];\n }\n else {\n assertArgument(false, \"unknown event name\", \"event\", event);\n }\n // Normalize topics and sort TopicSets\n topics = topics.map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n const items = Array.from(new Set(t.map((t) => t.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t.toLowerCase();\n });\n const tag = topics.map((t) => {\n if (t == null) {\n return \"null\";\n }\n if (Array.isArray(t)) {\n return t.join(\"|\");\n }\n return t;\n }).join(\"&\");\n return { fragment, tag, topics };\n}\nasync function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n}\nasync function getSub(contract, operation, event) {\n // Make sure our runner can actually subscribe to events\n const provider = getProvider(contract.runner);\n assert(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = (addr ? addr : contract);\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n }\n catch (error) { }\n }\n // If fragment is null, we do not deconstruct the args to emit\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit(contract, event, args, (listener) => {\n return new ContractEventPayload(contract, listener, event, _foundFragment, log);\n });\n }\n else {\n emit(contract, event, [], (listener) => {\n return new ContractUnknownEventPayload(contract, listener, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n}\n// We use this to ensure one emit resolves before firing the next to\n// ensure correct ordering (note this cannot throw and just adds the\n// notice to the event queu using setTimeout).\nlet lastEmit = Promise.resolve();\nasync function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n }\n catch (error) { }\n return !once;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return (count > 0);\n}\nasync function emit(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n }\n catch (error) { }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n}\nconst passProperties = [\"then\"];\nexport class BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi, runner, _deployTx) {\n assertArgument(typeof (target) === \"string\" || isAddressable(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = Interface.from(abi);\n defineProperties(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n // @TODO: the provider can be null; make a custom dummy provider that will throw a\n // meaningful error\n deployTx = new ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = new Map();\n // Resolve the target as the address\n if (typeof (target) === \"string\") {\n if (isHexString(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n }\n else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw makeError(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr) => {\n if (addr == null) {\n throw makeError(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr;\n return addr;\n });\n }\n }\n else {\n addrPromise = target.getAddress().then((addr) => {\n if (addr == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr;\n return addr;\n });\n }\n // Set our private values\n setInternal(this, { addrPromise, addr, deployTx, subs });\n // Add the event filters\n const filters = new Proxy({}, {\n get: (target, prop, receiver) => {\n // Pass important checks (like `then` for Promise) through\n if (typeof (prop) === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n }\n catch (error) {\n if (!isError(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return undefined;\n },\n has: (target, prop) => {\n // Pass important checks (like `then` for Promise) through\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target, prop);\n }\n return Reflect.has(target, prop) || this.interface.hasEvent(String(prop));\n }\n });\n defineProperties(this, { filters });\n defineProperties(this, {\n fallback: ((iface.receive || iface.fallback) ? (buildWrappedFallback(this)) : null)\n });\n // Return a Proxy that will respond to functions\n return new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof (prop) === \"symbol\" || prop in target || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n // Undefined properties should return undefined\n try {\n return target.getFunction(prop);\n }\n catch (error) {\n if (!isError(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return undefined;\n },\n has: (target, prop) => {\n if (typeof (prop) === \"symbol\" || prop in target || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target, prop);\n }\n return target.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() { return await getInternal(this).addrPromise; }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n assert(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n // We have the deployement transaction; just use that (throws if deployement fails)\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n // Check for code\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n // Make sure we can subscribe to a provider event\n const provider = getProvider(this.runner);\n assert(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code = await this.getDeployedCode();\n if (code != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n }\n catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof (key) !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof (key) !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n\n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n\n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = (addr ? addr : (await addrPromise));\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n }\n catch (error) { }\n }\n if (foundFragment) {\n try {\n return new EventLog(log, this.interface, foundFragment);\n }\n catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return new Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners } of subs.values()) {\n total += listeners.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners } of subs.values()) {\n result = result.concat(listeners.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);\n if (index >= 0) {\n sub.listeners.splice(index, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi) {\n class CustomContract extends BaseContract {\n constructor(address, runner = null) {\n super(address, abi, runner);\n }\n }\n return CustomContract;\n }\n ;\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi, runner);\n return contract;\n }\n}\nfunction _ContractBase() {\n return BaseContract;\n}\n/**\n * A [[BaseContract]] with no type guards on its methods or events.\n */\nexport class Contract extends _ContractBase() {\n}\n//# sourceMappingURL=contract.js.map","import { Interface } from \"../abi/index.js\";\nimport { getCreateAddress } from \"../address/index.js\";\nimport { concat, defineProperties, getBytes, hexlify, assert, assertArgument } from \"../utils/index.js\";\nimport { BaseContract, copyOverrides, resolveArgs } from \"./contract.js\";\n// A = Arguments to the constructor\n// I = Interface of deployed contracts\n/**\n * A **ContractFactory** is used to deploy a Contract to the blockchain.\n */\nexport class ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi, bytecode, runner) {\n const iface = Interface.from(abi);\n // Dereference Solidity bytecode objects and allow a missing `0x`-prefix\n if (bytecode instanceof Uint8Array) {\n bytecode = hexlify(getBytes(bytecode));\n }\n else {\n if (typeof (bytecode) === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = hexlify(getBytes(bytecode));\n }\n defineProperties(this, {\n bytecode, interface: iface, runner: (runner || null)\n });\n }\n attach(target) {\n return new BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await resolveArgs(this.runner, fragment.inputs, args);\n const data = concat([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n assert(this.runner && typeof (this.runner.sendTransaction) === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = getCreateAddress(sentTx);\n return new BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n assertArgument(output != null, \"bad compiler output\", \"output\", output);\n if (typeof (output) === \"string\") {\n output = JSON.parse(output);\n }\n const abi = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n }\n else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi, bytecode, runner);\n }\n}\n//# sourceMappingURL=factory.js.map","/**\n * ENS is a service which allows easy-to-remember names to map to\n * network addresses.\n *\n * @_section: api/providers/ens-resolver:ENS Resolver [about-ens-rsolver]\n */\nimport { getAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { dnsEncode, namehash } from \"../hash/index.js\";\nimport { hexlify, isHexString, toBeHex, defineProperties, encodeBase58, assert, assertArgument, isError, FetchRequest } from \"../utils/index.js\";\n// @TODO: This should use the fetch-data:ipfs gateway\n// Trim off the ipfs:// prefix and return the default gateway URL\nfunction getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n }\n else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n }\n else {\n assertArgument(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https:/\\/gateway.ipfs.io/ipfs/${link}`;\n}\n;\n;\n/**\n * A provider plugin super-class for processing multicoin address types.\n */\nexport class MulticoinProviderPlugin {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n defineProperties(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resolves to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resolves to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n}\nconst BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n/**\n * A **BasicMulticoinProviderPlugin** provides service for common\n * coin types, which do not require additional libraries to encode or\n * decode.\n */\nexport class BasicMulticoinProviderPlugin extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n}\nconst matcherIpfs = new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\");\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\n/**\n * A connected object to a resolved ENS name resolver, which can be\n * used to query additional details.\n */\nexport class EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n defineProperties(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\",\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n }\n catch (error) {\n // Wildcard resolvers must understand supportsInterface\n // and return true.\n if (isError(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n // Let future attempts try again...\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n // The first parameters is always the nodehash\n params.unshift(namehash(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n assert(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n dnsEncode(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n }\n catch (error) {\n if (!isError(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n // No address\n if (result == null || result === ZeroAddress) {\n return null;\n }\n return result;\n }\n catch (error) {\n if (isError(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n // Try decoding its EVM canonical chain as an EVM chain address first\n if (coinType >= 0 && coinType < 0x80000000) {\n let ethCoinType = coinType + 0x80000000;\n const data = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if (isHexString(data, 20)) {\n return getAddress(data);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n // keccak256(\"addr(bytes32,uint256\")\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n // No address\n if (data == null || data === \"0x\") {\n return null;\n }\n // Compute the address\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n assert(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n // keccak256(\"contenthash()\")\n const data = await this.#fetch(\"contenthash(bytes32)\");\n // No contenthash\n if (data == null || data === \"0x\") {\n return null;\n }\n // IPFS (CID: 1, Type: 70=DAG-PB, 72=libp2p-key)\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = (ipfs[1] === \"e3010170\") ? \"ipfs\" : \"ipns\";\n const length = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length * 2) {\n return `${scheme}:/\\/${encodeBase58(\"0x\" + ipfs[2])}`;\n }\n }\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz:/\\/${swarm[1]}`;\n }\n assert(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (scheme === \"erc721\") ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n // The owner of this name\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: (match[2] || \"\") });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n // Check that this account owns the token\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n }\n else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n // Call the token contract for the metadata URL\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n // ERC-1155 allows a generic {id} in the URL\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", toBeHex(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n // Transform IPFS metadata links\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n // Get the token metadata\n let metadata = {};\n const response = await (new FetchRequest(metadataUrl)).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n }\n catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n }\n catch (error) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: hexlify(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n // Pull the image URL out\n let imageUrl = metadata.image;\n if (typeof (imageUrl) !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n // Allow\n }\n else {\n // Transform IPFS link to gateway\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n }\n catch (error) { }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n // No ENS...\n assert(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\", info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await EnsResolver.getEnsAddress(provider);\n try {\n const contract = new Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver(namehash(name), {\n enableCcipRead: true\n });\n if (addr === ZeroAddress) {\n return null;\n }\n return addr;\n }\n catch (error) {\n // ENS registry cannot throw errors on resolver(bytes32),\n // so probably a link error\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n // Optimization since the eth node cannot change and does\n // not have a wildcard resolver\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n // Check the current node for a resolver\n const addr = await EnsResolver.#getResolver(provider, currentName);\n // Found a resolver!\n if (addr != null) {\n const resolver = new EnsResolver(provider, addr, name);\n // Legacy resolver found, using EIP-2544 so it isn't safe to use\n if (currentName !== name && !(await resolver.supportsWildcard())) {\n return null;\n }\n return resolver;\n }\n // Get the parent node\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n}\n//# sourceMappingURL=ens-resolver.js.map","/**\n * @_ignore\n */\nimport { getAddress, getCreateAddress } from \"../address/index.js\";\nimport { Signature } from \"../crypto/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nimport { getBigInt, getNumber, hexlify, isHexString, zeroPadValue, assert, assertArgument } from \"../utils/index.js\";\nconst BN_0 = BigInt(0);\nexport function allowNull(format, nullValue) {\n return (function (value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n });\n}\nexport function arrayOf(format, allowNull) {\n return ((array) => {\n if (allowNull && array == null) {\n return null;\n }\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n return array.map((i) => format(i));\n });\n}\n// Requires an object which matches a fleet of other formatters\n// Any FormatFunc may return `undefined` to have the value omitted\n// from the result object. Calls preserve `this`.\nexport function object(format, altNames) {\n return ((value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== undefined) {\n result[key] = nv;\n }\n }\n catch (error) {\n const message = (error instanceof Error) ? error.message : \"not-an-error\";\n assert(false, `invalid value for value.${key} (${message})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n });\n}\nexport function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n assertArgument(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n}\nexport function formatData(value) {\n assertArgument(isHexString(value, true), \"invalid data\", \"value\", value);\n return value;\n}\nexport function formatHash(value) {\n assertArgument(isHexString(value, 32), \"invalid hash\", \"value\", value);\n return value;\n}\nexport function formatUint256(value) {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return zeroPadValue(value, 32);\n}\nconst _formatLog = object({\n address: getAddress,\n blockHash: formatHash,\n blockNumber: getNumber,\n data: formatData,\n index: getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: getNumber,\n}, {\n index: [\"logIndex\"]\n});\nexport function formatLog(value) {\n return _formatLog(value);\n}\nconst _formatBlock = object({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: getNumber,\n timestamp: getNumber,\n nonce: allowNull(formatData),\n difficulty: getBigInt,\n gasLimit: getBigInt,\n gasUsed: getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(getBigInt, null),\n excessBlobGas: allowNull(getBigInt, null),\n miner: allowNull(getAddress),\n prevRandao: allowNull(formatHash, null),\n extraData: formatData,\n baseFeePerGas: allowNull(getBigInt)\n}, {\n prevRandao: [\"mixHash\"]\n});\nexport function formatBlock(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof (tx) === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n}\nconst _formatReceiptLog = object({\n transactionIndex: getNumber,\n blockNumber: getNumber,\n transactionHash: formatHash,\n address: getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: getNumber,\n blockHash: formatHash,\n}, {\n index: [\"logIndex\"]\n});\nexport function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n}\nconst _formatTransactionReceipt = object({\n to: allowNull(getAddress, null),\n from: allowNull(getAddress, null),\n contractAddress: allowNull(getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: getNumber,\n root: allowNull(hexlify),\n gasUsed: getBigInt,\n blobGasUsed: allowNull(getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: getBigInt,\n effectiveGasPrice: allowNull(getBigInt),\n blobGasPrice: allowNull(getBigInt, null),\n status: allowNull(getNumber),\n type: allowNull(getNumber, 0)\n}, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"],\n});\nexport function formatTransactionReceipt(value) {\n return _formatTransactionReceipt(value);\n}\nexport function formatTransactionResponse(value) {\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (value.to && getBigInt(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(getNumber, undefined),\n type: (value) => {\n if (value === \"0x\" || value == null) {\n return 0;\n }\n return getNumber(value);\n },\n accessList: allowNull(accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(getNumber, null),\n transactionIndex: allowNull(getNumber, null),\n from: getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(getBigInt),\n maxPriorityFeePerGas: allowNull(getBigInt),\n maxFeePerGas: allowNull(getBigInt),\n maxFeePerBlobGas: allowNull(getBigInt, null),\n gasLimit: getBigInt,\n to: allowNull(getAddress, null),\n value: getBigInt,\n nonce: getNumber,\n data: formatData,\n creates: allowNull(getAddress, null),\n chainId: allowNull(getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n // If to and creates are empty, populate the creates from the value\n if (result.to == null && result.creates == null) {\n result.creates = getCreateAddress(result);\n }\n // @TODO: Check fee data\n // Add an access list to supported transaction types\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n // Compute the signature\n if (value.signature) {\n result.signature = Signature.from(value.signature);\n }\n else {\n result.signature = Signature.from(value);\n }\n // Some backends omit ChainId on legacy transactions, but we can compute it\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n // @TODO: check chainID\n /*\n if (value.chainId != null) {\n let chainId = value.chainId;\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n result.chainId = chainId;\n\n } else {\n let chainId = value.networkId;\n\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = value.chainId;\n }\n\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n\n if (typeof(chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) { chainId = 0; }\n chainId = parseInt(chainId);\n }\n\n if (typeof(chainId) !== \"number\") { chainId = 0; }\n\n result.chainId = chainId;\n }\n */\n // 0x0000... should actually be null\n if (result.blockHash && getBigInt(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n}\n//# sourceMappingURL=format.js.map","import { defineProperties } from \"../utils/properties.js\";\nimport { assertArgument } from \"../utils/index.js\";\nconst EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n/**\n * A **NetworkPlugin** provides additional functionality on a [[Network]].\n */\nexport class NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n defineProperties(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new NetworkPlugin(this.name);\n }\n}\n/**\n * A **GasCostPlugin** allows a network to provide alternative values when\n * computing the intrinsic gas required for a transaction.\n */\nexport class GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${(effectiveBlock || 0)}`);\n const props = { effectiveBlock };\n function set(name, nullish) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish;\n }\n assertArgument(typeof (value) === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21000);\n set(\"txCreate\", 32000);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n defineProperties(this, props);\n }\n clone() {\n return new GasCostPlugin(this.effectiveBlock, this);\n }\n}\n/**\n * An **EnsPlugin** allows a [[Network]] to specify the ENS Registry\n * Contract address and the target network to use when using that\n * contract.\n *\n * Various testnets have their own instance of the contract to use, but\n * in general, the mainnet instance supports multi-chain addresses and\n * should be used.\n */\nexport class EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n defineProperties(this, {\n address: (address || EnsAddress),\n targetNetwork: ((targetNetwork == null) ? 1 : targetNetwork)\n });\n }\n clone() {\n return new EnsPlugin(this.address, this.targetNetwork);\n }\n}\n/**\n * A **FeeDataNetworkPlugin** allows a network to provide and alternate\n * means to specify its fee data.\n *\n * For example, a network which does not support [[link-eip-1559]] may\n * choose to use a Gas Station site to approximate the gas price.\n */\nexport class FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n}\nexport class FetchUrlFeeDataNetworkPlugin extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() { return this.#url; }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() { return this.#processFunc; }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() { return this; }\n}\n/*\nexport class CustomBlockNetworkPlugin extends NetworkPlugin {\n readonly #blockFunc: (provider: Provider, block: BlockParams) => Block;\n readonly #blockWithTxsFunc: (provider: Provider, block: BlockParams) => Block;\n\n constructor(blockFunc: (provider: Provider, block: BlockParams) => Block, blockWithTxsFunc: (provider: Provider, block: BlockParams) => Block) {\n super(\"org.ethers.network-plugins.custom-block\");\n this.#blockFunc = blockFunc;\n this.#blockWithTxsFunc = blockWithTxsFunc;\n }\n\n async getBlock(provider: Provider, block: BlockParams): Promise> {\n return await this.#blockFunc(provider, block);\n }\n\n async getBlockions(provider: Provider, block: BlockParams): Promise> {\n return await this.#blockWithTxsFunc(provider, block);\n }\n\n clone(): CustomBlockNetworkPlugin {\n return new CustomBlockNetworkPlugin(this.#blockFunc, this.#blockWithTxsFunc);\n }\n}\n*/\n//# sourceMappingURL=plugins-network.js.map","/**\n * A **Network** encapsulates the various properties required to\n * interact with a specific chain.\n *\n * @_subsection: api/providers:Networks [networks]\n */\nimport { accessListify } from \"../transaction/index.js\";\nimport { getBigInt, assert, assertArgument } from \"../utils/index.js\";\nimport { EnsPlugin, FetchUrlFeeDataNetworkPlugin, GasCostPlugin } from \"./plugins-network.js\";\n/* * * *\n// Networks which operation against an L2 can use this plugin to\n// specify how to access L1, for the purpose of resolving ENS,\n// for example.\nexport class LayerOneConnectionPlugin extends NetworkPlugin {\n readonly provider!: Provider;\n// @TODO: Rename to ChainAccess and allow for connecting to any chain\n constructor(provider: Provider) {\n super(\"org.ethers.plugins.layer-one-connection\");\n defineProperties(this, { provider });\n }\n\n clone(): LayerOneConnectionPlugin {\n return new LayerOneConnectionPlugin(this.provider);\n }\n}\n*/\nconst Networks = new Map();\n/**\n * A **Network** provides access to a chain's properties and allows\n * for plug-ins to extend functionality.\n */\nexport class Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = getBigInt(chainId);\n this.#plugins = new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() { return this.#name; }\n set name(value) { this.#name = value; }\n /**\n * The network chain ID.\n */\n get chainId() { return this.#chainId; }\n set chainId(value) { this.#chainId = getBigInt(value, \"chainId\"); }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof (other) === \"string\") {\n try {\n return (this.chainId === getBigInt(other));\n }\n catch (error) { }\n return (this.name === other);\n }\n if (typeof (other) === \"number\" || typeof (other) === \"bigint\") {\n try {\n return (this.chainId === getBigInt(other));\n }\n catch (error) { }\n return false;\n }\n if (typeof (other) === \"object\") {\n if (other.chainId != null) {\n try {\n return (this.chainId === getBigInt(other.chainId));\n }\n catch (error) { }\n return false;\n }\n if (other.name != null) {\n return (this.name === other.name);\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return (this.#plugins.get(name)) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return (this.plugins.filter((p) => (p.name.split(\"#\")[0] === basename)));\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone = new Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone.attachPlugin(plugin.clone());\n });\n return clone;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || (new GasCostPlugin());\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i = 2; i < tx.data.length; i += 2) {\n if (tx.data.substring(i, i + 2) === \"00\") {\n gas += costs.txDataZero;\n }\n else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = accessListify(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n // Default network\n if (network == null) {\n return Network.from(\"mainnet\");\n }\n // Canonical name or chain ID\n if (typeof (network) === \"number\") {\n network = BigInt(network);\n }\n if (typeof (network) === \"string\" || typeof (network) === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof (network) === \"bigint\") {\n return new Network(\"unknown\", network);\n }\n assertArgument(false, \"unknown network\", \"network\", network);\n }\n // Clonable with network-like abilities\n if (typeof (network.clone) === \"function\") {\n const clone = network.clone();\n //if (typeof(network.name) !== \"string\" || typeof(network.chainId) !== \"number\") {\n //}\n return clone;\n }\n // Networkish\n if (typeof (network) === \"object\") {\n assertArgument(typeof (network.name) === \"string\" && typeof (network.chainId) === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom = new Network((network.name), (network.chainId));\n if (network.ensAddress || network.ensNetwork != null) {\n custom.attachPlugin(new EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n //if ((network).layerOneConnection) {\n // custom.attachPlugin(new LayerOneConnectionPlugin((network).layerOneConnection));\n //}\n return custom;\n }\n assertArgument(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof (nameOrChainId) === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n assertArgument(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n}\n// We don't want to bring in formatUnits because it is backed by\n// FixedNumber and we want to keep Networks tiny. The values\n// included by the Gas Stations are also IEEE 754 with lots of\n// rounding issues and exceed the strict checks formatUnits has.\nfunction parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n // Break into [ whole, fraction ]\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n // More than 1 decimal point or too many fractional positions\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n // Pad the fraction to 9 decimalplaces\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n // Too many decimals and some non-zero ending, take the ceiling\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n}\n// Used by Polygon to use a gas station for fee data\nfunction getGasStationPlugin(url) {\n return new FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n // Prevent Cloudflare from blocking our request in node.js\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(), fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9),\n };\n return feeData;\n }\n catch (error) {\n assert(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n}\n// See: https://chainlist.org\nlet injected = false;\nfunction injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n /// Register popular Ethereum networks\n function registerEth(name, chainId, options) {\n const func = function () {\n const network = new Network(name, chainId);\n // We use 0 to disable ENS\n if (options.ensNetwork != null) {\n network.attachPlugin(new EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n // Register the network by name and chain ID\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name) => {\n Network.register(name, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17000, { ensNetwork: 17000 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1,\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"linea-sepolia\", 59141, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https:/\\/gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-amoy\", 80002, {});\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https:/\\/gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n}\n//# sourceMappingURL=network.js.map","import { assert, isHexString } from \"../utils/index.js\";\nfunction copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n/**\n * Return the polling subscriber for common events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if (isHexString(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n assert(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\", info: { event }\n });\n}\n// @TODO: refactor this\n/**\n * A **PollingBlockSubscriber** polls at a regular interval for a change\n * in the block number.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingBlockSubscriber {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4000;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() { return this.#interval; }\n set pollingInterval(value) { this.#interval = value; }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n // Bootstrap poll to setup our initial block number\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n // @TODO: Put a cap on the maximum number of events per loop?\n if (blockNumber !== this.#blockNumber) {\n for (let b = this.#blockNumber + 1; b <= blockNumber; b++) {\n // We have been stopped\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b);\n }\n this.#blockNumber = blockNumber;\n }\n }\n catch (error) {\n // @TODO: Minor bump, add an \"error\" event to let subscribers\n // know things went awry.\n //console.log(error);\n }\n // We have been stopped\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n}\n/**\n * An **OnBlockSubscriber** can be sub-classed, with a [[_poll]]\n * implmentation which will be called on every new block.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class OnBlockSubscriber {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) { this.stop(); }\n resume() { this.start(); }\n}\nexport class PollingBlockTagSubscriber extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n }\n else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n}\n/**\n * @_ignore:\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingOrphanSubscriber extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n}\n/**\n * A **PollingTransactionSubscriber** will poll for a given transaction\n * hash for its receipt.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingTransactionSubscriber extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash) {\n super(provider);\n this.#hash = hash;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n}\n/**\n * A **PollingEventSubscriber** will poll for a given filter for its logs.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class PollingEventSubscriber {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n // The initial block hasn't been determined yet\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n // No logs could just mean the node has not indexed them yet,\n // so we keep a sliding window of 60 blocks to keep scanning\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n // Only advance the block number when logs were found to\n // account for networks (like BNB and Polygon) which may\n // sacrifice event consistency for block event speed\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n}\n//# sourceMappingURL=subscriber-polling.js.map","/**\n * The available providers should suffice for most developers purposes,\n * but the [[AbstractProvider]] class has many features which enable\n * sub-classing it for specific purposes.\n *\n * @_section: api/providers/abstract-provider: Subclassing Provider [abstract-provider]\n */\n// @TODO\n// Event coalescence\n// When we register an event with an async value (e.g. address is a Signer\n// or ENS name), we need to add it immeidately for the Event API, but also\n// need time to resolve the address. Upon resolving the address, we need to\n// migrate the listener to the static event. We also need to maintain a map\n// of Signer/ENS name to address so we can sync respond to listenerCount.\nimport { getAddress, resolveAddress } from \"../address/index.js\";\nimport { ZeroAddress } from \"../constants/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { namehash } from \"../hash/index.js\";\nimport { Transaction } from \"../transaction/index.js\";\nimport { concat, dataLength, dataSlice, hexlify, isHexString, getBigInt, getBytes, getNumber, isCallException, isError, makeError, assert, assertArgument, FetchRequest, toBeArray, toQuantity, defineProperties, EventPayload, resolveProperties, toUtf8String } from \"../utils/index.js\";\nimport { EnsResolver } from \"./ens-resolver.js\";\nimport { formatBlock, formatLog, formatTransactionReceipt, formatTransactionResponse } from \"./format.js\";\nimport { Network } from \"./network.js\";\nimport { copyRequest, Block, FeeData, Log, TransactionReceipt, TransactionResponse } from \"./provider.js\";\nimport { PollingBlockSubscriber, PollingBlockTagSubscriber, PollingEventSubscriber, PollingOrphanSubscriber, PollingTransactionSubscriber } from \"./subscriber-polling.js\";\n// Constants\nconst BN_2 = BigInt(2);\nconst MAX_CCIP_REDIRECTS = 10;\nfunction isPromise(value) {\n return (value && typeof (value.then) === \"function\");\n}\nfunction getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k, v) => {\n if (v == null) {\n return \"null\";\n }\n if (typeof (v) === \"bigint\") {\n return `bigint:${v.toString()}`;\n }\n if (typeof (v) === \"string\") {\n return v.toLowerCase();\n }\n // Sort object keys\n if (typeof (v) === \"object\" && !Array.isArray(v)) {\n const keys = Object.keys(v);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v[key];\n return accum;\n }, {});\n }\n return v;\n });\n}\n/**\n * An **UnmanagedSubscriber** is useful for events which do not require\n * any additional management, such as ``\"debug\"`` which only requires\n * emit in synchronous event loop triggered calls.\n */\nexport class UnmanagedSubscriber {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) { defineProperties(this, { name }); }\n start() { }\n stop() { }\n pause(dropWhilePaused) { }\n resume() { }\n}\nfunction copy(value) {\n return JSON.parse(JSON.stringify(value));\n}\nfunction concisify(items) {\n items = Array.from((new Set(items)).values());\n items.sort();\n return items;\n}\nasync function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n // Normalize topic array info an EventFilter\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof (_event) === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if (isHexString(_event, 32)) {\n const hash = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash }), hash };\n }\n if (_event.orphan) {\n const event = _event;\n // @TODO: Should lowercase and whatnot things here instead of copy...\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if ((_event.address || _event.topics)) {\n const event = _event;\n const filter = {\n topics: ((event.topics || []).map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n return concisify(t.map((t) => t.toLowerCase()));\n }\n return t.toLowerCase();\n }))\n };\n if (event.address) {\n const addresses = [];\n const promises = [];\n const addAddress = (addr) => {\n if (isHexString(addr)) {\n addresses.push(addr);\n }\n else {\n promises.push((async () => {\n addresses.push(await resolveAddress(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n }\n else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses.map((a) => a.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n assertArgument(false, \"unknown ProviderEvent\", \"event\", _event);\n}\nfunction getTime() { return (new Date()).getTime(); }\nconst defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4000\n};\n/**\n * An **AbstractProvider** provides a base class for other sub-classes to\n * implement the [[Provider]] API by normalizing input arguments and\n * formatting output results as well as tracking events for consistent\n * behaviour on an eventually-consistent network.\n */\nexport class AbstractProvider {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n }\n else if (_network) {\n const network = Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => { this.emit(\"network\", network, null); }, 0);\n }\n else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = new Map();\n this.#subs = new Map();\n this.#plugins = new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() { return this.#options.pollingInterval; }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() { return this; }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return (this.#plugins.get(name)) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() { return this.#disableCcipRead; }\n set disableCcipRead(value) { this.#disableCcipRead = !!value; }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n // Caching disabled\n if (timeout < 0) {\n return await this._perform(req);\n }\n // Create a tag\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n // URL expansion\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n // If no {data} is present, use POST; otherwise GET\n //const json: string | null = (url.indexOf(\"{data}\") >= 0) ? null: JSON.stringify({ data, sender });\n //const result = await fetchJson({ url: href, errorPassThrough: true }, json, (value, response) => {\n // value.status = response.statusCode;\n // return value;\n //});\n const request = new FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i, urls });\n let errorMessage = \"unknown error\";\n // Fetch the resource...\n let resp;\n try {\n resp = await request.send();\n }\n catch (error) {\n // ...low-level fetch error (missing host, bad SSL, etc.),\n // so try next URL\n errorMessages.push(error.message);\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result: { error } });\n continue;\n }\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n }\n catch (error) { }\n // 4xx indicates the result is not present; stop\n assert(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n // 5xx indicates server issue; try the next url\n errorMessages.push(errorMessage);\n }\n assert(false, `error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx, info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new Block(formatBlock(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new Log(formatLog(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new TransactionReceipt(formatTransactionReceipt(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new TransactionResponse(formatTransactionResponse(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n assert(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n assert(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = getNumber(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return resolveAddress(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if (isHexString(blockTag)) {\n if (isHexString(blockTag, 32)) {\n return blockTag;\n }\n return toQuantity(blockTag);\n }\n if (typeof (blockTag) === \"bigint\") {\n blockTag = getNumber(blockTag, \"blockTag\");\n }\n if (typeof (blockTag) === \"number\") {\n if (blockTag >= 0) {\n return toQuantity(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return toQuantity(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b) => toQuantity(b + blockTag));\n }\n assertArgument(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n // Create a canonical representation of the topics\n const topics = (filter.topics || []).map((t) => {\n if (t == null) {\n return null;\n }\n if (Array.isArray(t)) {\n return concisify(t.map((t) => t.toLowerCase()));\n }\n return t.toLowerCase();\n });\n const blockHash = (\"blockHash\" in filter) ? filter.blockHash : undefined;\n const resolve = (_address, fromBlock, toBlock) => {\n let address = undefined;\n switch (_address.length) {\n case 0: break;\n case 1:\n address = _address[0];\n break;\n default:\n _address.sort();\n address = _address;\n }\n if (blockHash) {\n if (fromBlock != null || toBlock != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter = {};\n if (address) {\n filter.address = address;\n }\n if (topics.length) {\n filter.topics = topics;\n }\n if (fromBlock) {\n filter.fromBlock = fromBlock;\n }\n if (toBlock) {\n filter.toBlock = toBlock;\n }\n if (blockHash) {\n filter.blockHash = blockHash;\n }\n return filter;\n };\n // Addresses could be async (ENS names or Addressables)\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n }\n else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = undefined;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = undefined;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a) => (typeof (a) !== \"string\")).length ||\n (fromBlock != null && typeof (fromBlock) !== \"string\") ||\n (toBlock != null && typeof (toBlock) !== \"string\")) {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resolves to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = copyRequest(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = resolveAddress(request[key], this);\n if (isPromise(addr)) {\n promises.push((async function () { request[key] = await addr; })());\n }\n else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push((async function () { request.blockTag = await blockTag; })());\n }\n else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return (async function () {\n await Promise.all(promises);\n return request;\n })();\n }\n return request;\n }\n async getNetwork() {\n // No explicit network was set and this is our first time\n if (this.#networkPromise == null) {\n // Detect the current network (shared with all calls)\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n }\n catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork() // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n // The \"any\" network can change, so notify listeners\n this.emit(\"network\", actual, expected);\n // Update the network if something else hasn't already changed it\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n }\n else {\n // Otherwise, we do not allow changes to the underlying network\n assert(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await resolveProperties({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: ((async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return getBigInt(value, \"%response\");\n }\n catch (error) { }\n return null;\n })()),\n priorityFee: ((async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return getBigInt(value, \"%response\");\n }\n catch (error) { }\n return null;\n })())\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n // These are the recommended EIP-1559 heuristics for fee data\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = (priorityFee != null) ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = (block.baseFeePerGas * BN_2) + maxPriorityFeePerGas;\n }\n return new FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n // Check for a FeeDataNetWorkPlugin\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return getBigInt(await this.#perform({\n method: \"estimateGas\", transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n assert(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n // This came in as a PerformActionTransaction, so to/from are safe; we can cast\n const transaction = copyRequest(tx);\n try {\n return hexlify(await this._perform({ method: \"call\", transaction, blockTag }));\n }\n catch (error) {\n // CCIP Read OffchainLookup\n if (!this.disableCcipRead && isCallException(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && dataSlice(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await resolveAddress(transaction.to, this);\n // Parse the CCIP Read Arguments\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup(dataSlice(error.data, 4));\n }\n catch (error) {\n assert(false, error.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\", transaction, info: { data }\n });\n }\n // Check the sender of the OffchainLookup matches the transaction\n assert(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction: transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n assert(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\", transaction, info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx = {\n to: txSender,\n data: concat([ccipArgs.selector, encodeBytes([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx });\n try {\n const result = await this.#call(tx, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx), result });\n return result;\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx), error });\n throw error;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await resolveProperties({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await resolveProperties({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof (address) !== \"string\" || typeof (blockTag) !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return getBigInt(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return getNumber(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return hexlify(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = getBigInt(_position, \"position\");\n return hexlify(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash, network } = await resolveProperties({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = Transaction.from(signedTx);\n if (tx.hash !== hash) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n // @TODO: Add CustomBlockPlugin check\n if (isHexString(block, 32)) {\n return await this.#perform({\n method: \"getBlock\", blockHash: block, includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof (blockTag) !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\", blockTag, includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash) {\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash })\n });\n if (params == null) {\n return null;\n }\n // Some backends did not backfill the effectiveGasPrice into old transactions\n // in the receipt, so we look it up manually and inject it.\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash) {\n const { result } = await resolveProperties({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash })\n });\n if (result == null) {\n return null;\n }\n return hexlify(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await resolveProperties({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p) => this._wrapLog(p, network));\n }\n // ENS\n _getProvider(chainId) {\n assert(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = getAddress(address);\n const node = namehash(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await EnsResolver.getEnsAddress(this);\n const ensContract = new Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === ZeroAddress) {\n return null;\n }\n const resolverContract = new Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n // Failed forward resolution\n const check = await this.resolveName(name);\n if (check !== address) {\n return null;\n }\n return name;\n }\n catch (error) {\n // No data was returned from the resolver\n if (isError(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n // Something reerted\n if (isError(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash, _confirms, timeout) {\n const confirms = (_confirms != null) ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = (async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n //this.off(\"block\", listener);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n }\n catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n });\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject(makeError(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n assert(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n }\n else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n // This is a log that is removing an existing log; we actually want\n // to emit an orphan event for the removed log\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n // Prevent tampering with our tag in any subclass' _getSubscriber\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = new WeakMap();\n const nameMap = new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n // If there is not subscription or if a recent emit removed\n // the last of them (which also deleted the sub) do nothing\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once }) => {\n const payload = new EventPayload(this, (once ? null : listener), event);\n try {\n listener.call(this, ...args, payload);\n }\n catch (error) { }\n return !once;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return (count > 0);\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners } of this.#subs.values()) {\n total += listeners.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners } of this.#subs.values()) {\n result = result.concat(listeners.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index = sub.listeners.map(({ listener }) => listener).indexOf(listener);\n if (index >= 0) {\n sub.listeners.splice(index, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n // Stop all listeners\n this.removeAllListeners();\n // Shut down all tiemrs\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() { return (this.#pausedState != null); }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n }\n else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n assert(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s) => s.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n // Clear the timer\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n // Remaining time needed for when we become unpaused\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s) => s.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n // Remaining time when we were paused\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n // Start time (in cause paused, so we con compute remaininf time)\n timer.time = getTime();\n // Start the timer\n setTimeout(timer.func, timeout);\n }\n }\n}\nfunction _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return toUtf8String(bytes);\n }\n }\n catch (error) { }\n return null;\n}\nfunction _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = getNumber(dataSlice(result, start, start + 32));\n const length = getNumber(dataSlice(result, offset, offset + 32));\n return dataSlice(result, offset + 32, offset + 32 + length);\n }\n catch (error) { }\n return null;\n}\nfunction numPad(value) {\n const result = toBeArray(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n}\nfunction bytesPad(value) {\n if ((value.length % 32) === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n}\nconst empty = new Uint8Array([]);\n// ABI Encodes a series of (bytes, bytes, ...)\nfunction encodeBytes(datas) {\n const result = [];\n let byteCount = 0;\n // Add place-holders for pointers as we add items\n for (let i = 0; i < datas.length; i++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i = 0; i < datas.length; i++) {\n const data = getBytes(datas[i]);\n // Update the bytes offset\n result[i] = numPad(byteCount);\n // The length and padded value of data\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return concat(result);\n}\nconst zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\nfunction parseOffchainLookup(data) {\n const result = {\n sender: \"\", urls: [], calldata: \"\", selector: \"\", extraData: \"\", errorArgs: []\n };\n assert(dataLength(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = dataSlice(data, 0, 32);\n assert(dataSlice(sender, 0, 12) === dataSlice(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = dataSlice(sender, 12);\n // Read the URLs from the response\n try {\n const urls = [];\n const urlsOffset = getNumber(dataSlice(data, 32, 64));\n const urlsLength = getNumber(dataSlice(data, urlsOffset, urlsOffset + 32));\n const urlsData = dataSlice(data, urlsOffset + 32);\n for (let u = 0; u < urlsLength; u++) {\n const url = _parseString(urlsData, u * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n // Get the CCIP calldata to forward\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n // Get the callbackSelector (bytes4)\n assert(dataSlice(data, 100, 128) === dataSlice(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = dataSlice(data, 96, 100);\n // Get the extra data to send back to the contract as context\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n }\n catch (error) {\n assert(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k) => result[k]);\n return result;\n}\n//# sourceMappingURL=abstract-provider.js.map","/**\n * Generally the [[Wallet]] and [[JsonRpcSigner]] and their sub-classes\n * are sufficent for most developers, but this is provided to\n * fascilitate more complex Signers.\n *\n * @_section: api/providers/abstract-signer: Subclassing Signer [abstract-signer]\n */\nimport { resolveAddress } from \"../address/index.js\";\nimport { Transaction } from \"../transaction/index.js\";\nimport { defineProperties, getBigInt, resolveProperties, assert, assertArgument } from \"../utils/index.js\";\nimport { copyRequest } from \"./provider.js\";\nfunction checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n assert(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n}\nasync function populate(signer, tx) {\n let pop = copyRequest(tx);\n if (pop.to != null) {\n pop.to = resolveAddress(pop.to, signer);\n }\n if (pop.from != null) {\n const from = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n resolveAddress(from, signer)\n ]).then(([address, from]) => {\n assertArgument(address.toLowerCase() === from.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from);\n return address;\n });\n }\n else {\n pop.from = signer.getAddress();\n }\n return await resolveProperties(pop);\n}\n/**\n * An **AbstractSigner** includes most of teh functionality required\n * to get a [[Signer]] working as expected, but requires a few\n * Signer-specific methods be overridden.\n *\n */\nexport class AbstractSigner {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n defineProperties(this, { provider: (provider || null) });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n // Populate the chain ID\n const network = await (this.provider).getNetwork();\n if (pop.chainId != null) {\n const chainId = getBigInt(pop.chainId);\n assertArgument(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n }\n else {\n pop.chainId = network.chainId;\n }\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null);\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n assertArgument(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n }\n else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n assertArgument(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n pop.type = 2;\n }\n else if (pop.type === 0 || pop.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n // We need to get fee data to determine things\n const feeData = await provider.getFeeData();\n assert(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n // Populate missing gasPrice\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n }\n else {\n // We need to get fee data to determine things\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n // We need to auto-detect the intended type of this transaction...\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n // Upgrade transaction from null to eip-1559\n pop.type = 2;\n if (pop.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n }\n else {\n // Populate missing fee data\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n // ...but they are trying to use EIP-1559 properties\n assert(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n // Populate missing fee data\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n // Explicitly set untyped transaction to legacy\n // @TODO: Maybe this shold allow type 1?\n pop.type = 0;\n }\n else {\n // getFeeData has failed us.\n assert(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n }\n else if (pop.type === 2 || pop.type === 3) {\n // Explicitly using EIP-1559 or EIP-4844\n // Populate missing fee data\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n //@TOOD: Don't await all over the place; save them up for\n // the end for better batching\n return await resolveProperties(pop);\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n}\n/**\n * A **VoidSigner** is a class deisgned to allow an address to be used\n * in any API which accepts a Signer, but for which there are no\n * credentials available to perform any actual signing.\n *\n * This for example allow impersonating an account for the purpose of\n * static calls or estimating gas, but does not allow sending transactions.\n */\nexport class VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n defineProperties(this, { address });\n }\n async getAddress() { return this.address; }\n connect(provider) {\n return new VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n assert(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain, types, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n}\n//# sourceMappingURL=abstract-signer.js.map","/**\n * There are many awesome community services that provide Ethereum\n * nodes both for developers just starting out and for large-scale\n * communities.\n *\n * @_section: api/providers/thirdparty: Community Providers [thirdparty]\n */\n// Show the throttle message only once per service\nconst shown = new Set();\n/**\n * Displays a warning in tht console when the community resource is\n * being used too heavily by the app, recommending the developer\n * acquire their own credentials instead of using the community\n * credentials.\n *\n * The notification will only occur once per service.\n */\nexport function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n}\n//# sourceMappingURL=community.js.map","import { isError } from \"../utils/index.js\";\nimport { PollingEventSubscriber } from \"./subscriber-polling.js\";\nfunction copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n/**\n * Some backends support subscribing to events using a Filter ID.\n *\n * When subscribing with this technique, the node issues a unique\n * //Filter ID//. At this point the node dedicates resources to\n * the filter, so that periodic calls to follow up on the //Filter ID//\n * will receive any events since the last call.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdSubscriber {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n // Subscribe if necessary\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n // Get the Filter ID\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n }\n catch (error) {\n if (!isError(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n // The backend does not support Filter ID; downgrade to\n // polling\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n }\n catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() { this.start(); }\n}\n/**\n * A **FilterIdSubscriber** for receiving contract events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdEventSubscriber extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n}\n/**\n * A **FilterIdSubscriber** for receiving pending transactions events.\n *\n * @_docloc: api/providers/abstract-provider\n */\nexport class FilterIdPendingSubscriber extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n}\n//# sourceMappingURL=subscriber-filterid.js.map","/**\n * One of the most common ways to interact with the blockchain is\n * by a node running a JSON-RPC interface which can be connected to,\n * based on the transport, using:\n *\n * - HTTP or HTTPS - [[JsonRpcProvider]]\n * - WebSocket - [[WebSocketProvider]]\n * - IPC - [[IpcSocketProvider]]\n *\n * @_section: api/providers/jsonrpc:JSON-RPC Provider [about-jsonrpcProvider]\n */\n// @TODO:\n// - Add the batching API\n// https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/ethereum/eth1.0-apis/assembled-spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:splitView%5D=true&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false\nimport { AbiCoder } from \"../abi/index.js\";\nimport { getAddress, resolveAddress } from \"../address/index.js\";\nimport { TypedDataEncoder } from \"../hash/index.js\";\nimport { accessListify } from \"../transaction/index.js\";\nimport { defineProperties, getBigInt, hexlify, isHexString, toQuantity, toUtf8Bytes, isError, makeError, assert, assertArgument, FetchRequest, resolveProperties } from \"../utils/index.js\";\nimport { AbstractProvider, UnmanagedSubscriber } from \"./abstract-provider.js\";\nimport { AbstractSigner } from \"./abstract-signer.js\";\nimport { Network } from \"./network.js\";\nimport { FilterIdEventSubscriber, FilterIdPendingSubscriber } from \"./subscriber-filterid.js\";\nimport { PollingEventSubscriber } from \"./subscriber-polling.js\";\nconst Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n//const Methods = \"getAddress,then\".split(/,/g);\nfunction deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof (value)) >= 0) {\n return value;\n }\n // Keep any Addressable\n if (typeof (value.getAddress) === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return (value.map(deepCopy));\n }\n if (typeof (value) === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof (value)})`);\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(resolve, duration); });\n}\nfunction getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n}\nfunction isPollable(value) {\n return (value && typeof (value.pollingInterval) === \"number\");\n}\nconst defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: (1 << 20),\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4000\n};\n// @TODO: Unchecked Signers\nexport class JsonRpcSigner extends AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = getAddress(address);\n defineProperties(this, { address });\n }\n connect(provider) {\n assert(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n // Make sure the from matches the sender\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from = await resolveAddress(_from, this.provider);\n assertArgument(from != null && from.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from;\n })());\n }\n else {\n tx.from = this.address;\n }\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n // The address may be an ENS name or Addressable\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await resolveAddress(_to, this.provider);\n })());\n }\n // Wait until all of our properties are filled in\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n // This cannot be mined any earlier than any recent block\n const blockNumber = await this.provider.getBlockNumber();\n // Send the transaction\n const hash = await this.sendUncheckedTransaction(tx);\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return await (new Promise((resolve, reject) => {\n const timeouts = [1000, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n // Try getting the transaction\n const tx = await this.provider.getTransaction(hash);\n if (tx != null) {\n resolve(tx.replaceableTransaction(blockNumber));\n return;\n }\n }\n catch (error) {\n // If we were cancelled: stop polling.\n // If the data is bad: the node returns bad transactions\n // If the network changed: calling again will also fail\n // If unsupported: likely destroyed\n if (isError(error, \"CANCELLED\") || isError(error, \"BAD_DATA\") ||\n isError(error, \"NETWORK_ERROR\") || isError(error, \"UNSUPPORTED_OPERATION\")) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash;\n reject(error);\n return;\n }\n // Stop-gap for misbehaving backends; see #4513\n if (isError(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n // Notify anyone that cares; but we will try again, since\n // it is likely an intermittent service error\n this.provider.emit(\"error\", makeError(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n // Wait another 4 seconds\n this.provider._setTimeout(() => { checkTx(); }, timeouts.pop() || 4000);\n };\n checkTx();\n }));\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n // Make sure the from matches the sender\n if (tx.from) {\n const from = await resolveAddress(tx.from, this.provider);\n assertArgument(from != null && from.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from;\n }\n else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message = ((typeof (_message) === \"string\") ? toUtf8Bytes(_message) : _message);\n return await this.provider.send(\"personal_sign\", [\n hexlify(message), this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain, types, _value) {\n const value = deepCopy(_value);\n // Populate any ENS names (in-place)\n const populated = await TypedDataEncoder.resolveNames(domain, types, value, async (value) => {\n const address = await resolveAddress(value);\n assertArgument(address != null, \"TypedData does not support null address\", \"value\", value);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(), password, null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message = ((typeof (_message) === \"string\") ? toUtf8Bytes(_message) : _message);\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(), hexlify(message)\n ]);\n }\n}\n/**\n * The JsonRpcApiProvider is an abstract class and **MUST** be\n * sub-classed.\n *\n * It provides the base for all JSON-RPC-based Provider interaction.\n *\n * Sub-classing Notes:\n * - a sub-class MUST override _send\n * - a sub-class MUST call the `_start()` method once connected\n */\nexport class JsonRpcApiProvider extends AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n // If we aren't using batching, no harm in sending it immediately\n const stallTime = (this._getOption(\"batchMaxCount\") === 1) ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n // Create payload batches that satisfy our batch constraints\n const batch = [(payloads.shift())];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push((payloads.shift()));\n const bytes = JSON.stringify(batch.map((p) => p.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift((batch.pop()));\n break;\n }\n }\n // Process the result to each payload\n (async () => {\n const payload = ((batch.length === 1) ? batch[0].payload : batch.map((p) => p.payload));\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n // Process results in batch order\n for (const { resolve, reject, payload } of batch) {\n if (this.destroyed) {\n reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n continue;\n }\n // Find the matching result\n const resp = result.filter((r) => (r.id === payload.id))[0];\n // No result; the node failed us in unexpected ways\n if (resp == null) {\n const error = makeError(\"missing response for request\", \"BAD_DATA\", {\n value: result, info: { payload }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n // The response is an error\n if (\"error\" in resp) {\n reject(this.getRpcError(payload, resp));\n continue;\n }\n // All good; send the result\n resolve(resp.result);\n }\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n // @TODO: augment the error with the payload\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof (staticNetwork) === \"boolean\") {\n assertArgument(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = Network.from(network);\n }\n }\n else if (staticNetwork) {\n // Make sure any static network is compatbile with the provided netwrok\n assertArgument(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n assert(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && getBigInt(tx.type)) {\n // If there are no EIP-1559 or newer properties, it might be pre-EIP-1559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: undefined })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n }\n else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n // If we are ready, use ``send``, which enabled requests to be batched\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = Network.from(getBigInt(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n }\n catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n // We are not ready yet; use the primitive _send\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++, method: \"eth_chainId\", params: [], jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n }\n catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return Network.from(getBigInt(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n // Bootstrap the network\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n }\n catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", makeError(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1000);\n }\n }\n // Start dispatching requests\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n // Pending Filters aren't availble via polling\n if (sub.type === \"pending\") {\n return new FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new PollingEventSubscriber(this, sub.filter);\n }\n return new FilterIdEventSubscriber(this, sub.filter);\n }\n // Orphaned Logs are handled automatically, by the filter, since\n // logs with removed are emitted by it\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() { return this.#notReady == null; }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n // JSON-RPC now requires numeric values to be \"quantity\" values\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = toQuantity(getBigInt(tx[key], `tx.${key}`));\n });\n // Make sure addresses and data are lowercase\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = hexlify(tx[key]);\n });\n // Normalize the access list object\n if (tx.accessList) {\n result[\"accessList\"] = accessListify(tx.accessList);\n }\n if (tx.blobVersionedHashes) {\n // @TODO: Remove this case once EIP-4844 added to prepared tx\n result[\"blobVersionedHashes\"] = tx.blobVersionedHashes.map(h => h.toLowerCase());\n }\n // @TODO: blobs should probably also be copied over, optionally\n // accounting for the kzg property to backfill blobVersionedHashes\n // using the commitment. Or should that be left as an exercise to\n // the caller?\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n (\"0x\" + req.position.toString(16)),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n }\n else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n }\n else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return makeError(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: (payload.params[0]),\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e = AbiCoder.getBuiltinCallException((method === \"eth_call\") ? \"call\" : \"estimateGas\", (payload.params[0]), (result ? result.data : null));\n e.info = { error, payload };\n return e;\n }\n // Only estimateGas and call can return arbitrary contract-defined text, so now we\n // we can process text safely.\n const message = JSON.stringify(spelunkMessage(error));\n if (typeof (error.message) === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\",\n };\n return makeError(`user rejected action`, \"ACTION_REJECTED\", {\n action: (actionMap[method] || \"unknown\"),\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = (payload.params[0]);\n if (message.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return makeError(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction, info: { error }\n });\n }\n if (message.match(/nonce/i) && message.match(/too low/i)) {\n return makeError(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction/i) && message.match(/underpriced/i)) {\n return makeError(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message.match(/only replay-protected/i)) {\n return makeError(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method, info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return makeError(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method, info: { error, payload }\n });\n }\n return makeError(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n // @TODO: cache chainId?? purge on switch_networks\n // We have been destroyed; no operations are supported anymore\n if (this.destroyed) {\n return Promise.reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve, reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n // If there is not a pending drainTimer, set one\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n // Account index\n if (typeof (address) === \"number\") {\n const accounts = (await accountsPromise);\n if (address >= accounts.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts[address]);\n }\n const { accounts } = await resolveProperties({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n // Account address\n address = getAddress(address);\n for (const account of accounts) {\n if (getAddress(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a) => new JsonRpcSigner(this, a));\n }\n destroy() {\n // Stop processing requests\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n // Cancel all pending requests\n for (const { payload, reject } of this.#payloads) {\n reject(makeError(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n // Parent clean-up\n super.destroy();\n }\n}\n// @TODO: remove this in v7, it is not exported because this functionality\n// is exposed in the JsonRpcApiProvider by setting polling to true. It should\n// be safe to remove regardless, because it isn't reachable, but just in case.\n/**\n * @_ignore:\n */\nexport class JsonRpcApiPollingProvider extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n let pollingInterval = this._getOption(\"pollingInterval\");\n if (pollingInterval == null) {\n pollingInterval = defaultOptions.pollingInterval;\n }\n this.#pollingInterval = pollingInterval;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() { return this.#pollingInterval; }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n}\n/**\n * The JsonRpcProvider is one of the most common Providers,\n * which performs all operations over HTTP (or HTTPS) requests.\n *\n * Events are processed by polling the backend for the current block\n * number; when it advances, all block-base events are then checked\n * for updates.\n */\nexport class JsonRpcProvider extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http:/\\/localhost:8545\";\n }\n super(network, options);\n if (typeof (url) === \"string\") {\n this.#connect = new FetchRequest(url);\n }\n else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n // All requests are over HTTP, so we can just start handling requests\n // We do this here rather than the constructor so that we don't send any\n // requests to the network (i.e. eth_chainId) until we absolutely have to.\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n // Configure a POST connection for the requested method\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n}\nfunction spelunkData(value) {\n if (value == null) {\n return null;\n }\n // These *are* the droids we're looking for.\n if (typeof (value.message) === \"string\" && value.message.match(/revert/i) && isHexString(value.data)) {\n return { message: value.message, data: value.data };\n }\n // Spelunk further...\n if (typeof (value) === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n // Might be a JSON string we can further descend...\n if (typeof (value) === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n }\n catch (error) { }\n }\n return null;\n}\nfunction _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n // These *are* the droids we're looking for.\n if (typeof (value.message) === \"string\") {\n result.push(value.message);\n }\n // Spelunk further...\n if (typeof (value) === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n // Might be a JSON string we can further descend...\n if (typeof (value) === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n }\n catch (error) { }\n }\n}\nfunction spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n}\n//# sourceMappingURL=provider-jsonrpc.js.map","/**\n * [[link-ankr]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - BNB (``bnb``)\n * - BNB Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:Ankr [providers-ankr]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **AnkrProvider** connects to the [[link-ankr]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-ankr-signup).\n */\nexport class AnkrProvider extends JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n // Ankr does not support filterId, so we force polling\n const options = { polling: true, staticNetwork: network };\n const request = AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n defineProperties(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new AnkrProvider(chainId, this.apiKey);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return (this.apiKey === defaultApiKey);\n }\n}\n//# sourceMappingURL=provider-ankr.js.map","/**\n * [[link-alchemy]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Amoy Testnet (``matic-amoy``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]\n */\nimport { defineProperties, resolveProperties, assert, assertArgument, FetchRequest } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-amoy\":\n return \"polygon-amoy.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **AlchemyProvider** connects to the [[link-alchemy]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-alchemy-signup).\n *\n * @_docloc: api/providers/thirdparty\n */\nexport class AlchemyProvider extends JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new AlchemyProvider(chainId, this.apiKey);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n // https://docs.alchemy.com/reference/trace-transaction\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await resolveProperties({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = (trace[0].error === \"Reverted\");\n }\n catch (error) { }\n if (data) {\n assert(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null // @TODO\n });\n return data;\n }\n assert(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return (this.apiKey === defaultApiKey);\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-alchemy.js.map","/**\n * [[link-chainstack]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Arbitrum (``arbitrum``)\n * - BNB Smart Chain Mainnet (``bnb``)\n * - Polygon (``matic``)\n *\n * @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nfunction getApiKey(name) {\n switch (name) {\n case \"mainnet\": return \"39f1d67cedf8b7831010a665328c9197\";\n case \"arbitrum\": return \"0550c209db33c3abf4cc927e1e18cea1\";\n case \"bnb\": return \"98b5a77e531614387366f6fc5da097f8\";\n case \"matic\": return \"cd9d4d70377471aa7c142ec4a4205249\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethereum-mainnet.core.chainstack.com\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.core.chainstack.com\";\n case \"bnb\":\n return \"bsc-mainnet.core.chainstack.com\";\n case \"matic\":\n return \"polygon-mainnet.core.chainstack.com\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **ChainstackProvider** connects to the [[link-chainstack]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-chainstack).\n */\nexport class ChainstackProvider extends JsonRpcProvider {\n /**\n * The API key for the Chainstack connection.\n */\n apiKey;\n /**\n * Creates a new **ChainstackProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = ChainstackProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new ChainstackProvider(chainId, this.apiKey);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return (this.apiKey === getApiKey(this._network.name));\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%% and %%projectSecret%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === getApiKey(network.name)) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"ChainstackProvider\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-chainstack.js.map","/**\n * About Cloudflare\n *\n * @_subsection: api/providers/thirdparty:Cloudflare [providers-cloudflare]\n */\nimport { assertArgument } from \"../utils/index.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\n/**\n * About Cloudflare...\n */\nexport class CloudflareProvider extends JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n assertArgument(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https:/\\/cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n}\n//# sourceMappingURL=provider-cloudflare.js.map","/**\n * [[link-etherscan]] provides a third-party service for connecting to\n * various blockchains over a combination of JSON-RPC and custom API\n * endpoints.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Holesky Testnet (``holesky``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Base (``base``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n * - Polygon Amoy Testnet (``matic-amoy``)\n *\n * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan]\n */\nimport { AbiCoder } from \"../abi/index.js\";\nimport { Contract } from \"../contract/index.js\";\nimport { accessListify, Transaction } from \"../transaction/index.js\";\nimport { defineProperties, hexlify, toQuantity, FetchRequest, assert, assertArgument, isError, \n// parseUnits,\ntoUtf8String } from \"../utils/index.js\";\nimport { AbstractProvider } from \"./abstract-provider.js\";\nimport { Network } from \"./network.js\";\nimport { NetworkPlugin } from \"./plugins-network.js\";\nimport { showThrottleMessage } from \"./community.js\";\nconst THROTTLE = 2000;\nfunction isPromise(value) {\n return (value && typeof (value.then) === \"function\");\n}\nconst EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n/**\n * A Network can include an **EtherscanPlugin** to provide\n * a custom base URL.\n *\n * @_docloc: api/providers/thirdparty:Etherscan\n */\nexport class EtherscanPlugin extends NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n defineProperties(this, { baseUrl });\n }\n clone() {\n return new EtherscanPlugin(this.baseUrl);\n }\n}\nconst skipKeys = [\"enableCcipRead\"];\nlet nextId = 1;\n/**\n * The **EtherscanBaseProvider** is the super-class of\n * [[EtherscanProvider]], which should generally be used instead.\n *\n * Since the **EtherscanProvider** includes additional code for\n * [[Contract]] access, in //rare cases// that contracts are not\n * used, this class can reduce code size.\n *\n * @_docloc: api/providers/thirdparty:Etherscan\n */\nexport class EtherscanProvider extends AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = (_apiKey != null) ? _apiKey : null;\n super();\n const network = Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n defineProperties(this, { apiKey, network });\n // Test that the network is supported by Etherscan\n this.getBaseUrl();\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https:/\\/api.etherscan.io\";\n case \"goerli\":\n return \"https:/\\/api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https:/\\/api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https:/\\/api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https:/\\/api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https:/\\/api-goerli.arbiscan.io\";\n case \"base\":\n return \"https:/\\/api.basescan.org\";\n case \"base-sepolia\":\n return \"https:/\\/api-sepolia.basescan.org\";\n case \"bnb\":\n return \"https:/\\/api.bscscan.com\";\n case \"bnbt\":\n return \"https:/\\/api-testnet.bscscan.com\";\n case \"matic\":\n return \"https:/\\/api.polygonscan.com\";\n case \"matic-amoy\":\n return \"https:/\\/api-amoy.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https:/\\/api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https:/\\/api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https:/\\/api-goerli-optimistic.etherscan.io\";\n default:\n }\n assertArgument(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module, params) {\n const query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n const apiKey = ((this.apiKey) ? `&apikey=${this.apiKey}` : \"\");\n return `${this.getBaseUrl()}/api?module=${module}${query}${apiKey}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `${this.getBaseUrl()}/api`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module, params) {\n params.module = module;\n params.apikey = this.apiKey;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module, params, post) {\n const id = nextId++;\n const url = (post ? this.getPostUrl() : this.getUrl(module, params));\n const payload = (post ? this.getPostData(module, params) : null);\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload: payload });\n const request = new FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1000 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n showThrottleMessage(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request, response) => {\n const result = response.hasBody() ? JSON.parse(toUtf8String(response.body)) : {};\n const throttle = ((typeof (result.result) === \"string\") ? result.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module === \"proxy\") {\n // This JSON response indicates we are being throttled\n if (result && result.status == 0 && result.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result });\n response.throwThrottleError(result.result, THROTTLE);\n }\n }\n else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result.result });\n response.throwThrottleError(result.result, THROTTLE);\n }\n }\n return response;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k) => `${k}=${payload[k]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n }\n catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n assert(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n assert(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse(toUtf8String(response.body));\n if (module === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n assert(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n assert(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n else {\n // getLogs, getHistory have weird success responses\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || (typeof (result.message) === \"string\" && !result.message.match(/^OK/))) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n assert(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n // Quantity-types require no leading zero, unless 0\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = toQuantity(value);\n }\n else if (key === \"accessList\") {\n value = \"[\" + accessListify(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n }\n else if (key === \"blobVersionedHashes\") {\n if (value.length === 0) {\n continue;\n }\n // @TODO: update this once the API supports blobs\n assert(false, \"Etherscan API does not support blobVersionedHashes\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getTransactionPostData\",\n info: { transaction }\n });\n }\n else {\n value = hexlify(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n // Pull any message out if, possible\n let message = \"\";\n if (isError(error, \"SERVER_ERROR\")) {\n // Check for an error emitted by a proxy call\n try {\n message = error.info.result.error.message;\n }\n catch (e) { }\n if (!message) {\n try {\n message = error.info.message;\n }\n catch (e) { }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message.match(/revert/i) && message.match(/insufficient funds/i)) {\n assert(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n }\n catch (error) { }\n const e = AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e.info = { request: req, error };\n throw e;\n }\n }\n if (message) {\n if (req.method === \"broadcastTransaction\") {\n const transaction = Transaction.from(req.signedTransaction);\n if (message.match(/replacement/i) && message.match(/underpriced/i)) {\n assert(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction\n });\n }\n if (message.match(/insufficient funds/)) {\n assert(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n assert(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction\n });\n }\n }\n }\n // Something we could not process\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n // This is temporary until Etherscan completes support\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n }\n else if (this.network.name === \"optimism\") {\n return \"1000000\";\n }\n else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n /* Working with Etherscan to get this added:\n try {\n const test = await this.fetch(\"proxy\", {\n action: \"eth_maxPriorityFeePerGas\"\n });\n console.log(test);\n return test;\n } catch (e) {\n console.log(\"DEBUG\", e);\n throw e;\n }\n */\n /* This might be safe; but due to rounding neither myself\n or Etherscan are necessarily comfortable with this. :)\n try {\n const result = await this.fetch(\"gastracker\", { action: \"gasoracle\" });\n console.log(result);\n const gasPrice = parseUnits(result.SafeGasPrice, \"gwei\");\n const baseFee = parseUnits(result.suggestBaseFee, \"gwei\");\n const priorityFee = gasPrice - baseFee;\n if (priorityFee < 0) { throw new Error(\"negative priority fee; defer to abstract provider default\"); }\n return priorityFee;\n } catch (error) {\n console.log(\"DEBUG\", error);\n throw error;\n }\n */\n case \"getBalance\":\n // Returns base-10 result\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: (req.includeTransactions ? \"true\" : \"false\")\n });\n }\n assert(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n }\n catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n }\n catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n /*\n case \"getLogs\": {\n // Needs to complain if more than one address is passed in\n const args: Record = { action: \"getLogs\" }\n \n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n \n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n \n if (params.filter.address) {\n args.address = params.filter.address;\n }\n \n // @TODO: We can handle slightly more complicated logs using the logs API\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", Logger.Errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n const topic0 = params.filter.topics[0];\n if (typeof(topic0) !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", Logger.Errors.UNSUPPORTED_OPERATION, { topic0: topic0 });\n }\n args.topic0 = topic0;\n }\n }\n \n const logs: Array = await this.fetch(\"logs\", args);\n \n // Cache txHash => blockHash\n let blocks: { [tag: string]: string } = {};\n \n // Add any missing blockHash to the logs\n for (let i = 0; i < logs.length; i++) {\n const log = logs[i];\n if (log.blockHash != null) { continue; }\n if (blocks[log.blockNumber] == null) {\n const block = await this.getBlock(log.blockNumber);\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n }\n \n log.blockHash = blocks[log.blockNumber];\n }\n \n return logs;\n }\n */\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0.0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\", address\n });\n const abi = JSON.parse(resp);\n return new Contract(address, abi, this);\n }\n catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return (this.apiKey == null);\n }\n}\n//# sourceMappingURL=provider-etherscan.js.map","function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n}\n;\nconst _WebSocket = getGlobal().WebSocket;\nexport { _WebSocket as WebSocket };\n//# sourceMappingURL=ws-browser.js.map","/**\n * Generic long-lived socket provider.\n *\n * Sub-classing notes\n * - a sub-class MUST call the `_start()` method once connected\n * - a sub-class MUST override the `_write(string)` method\n * - a sub-class MUST call `_processMessage(string)` for each message\n *\n * @_subsection: api/providers/abstract-provider:Socket Providers [about-socketProvider]\n */\nimport { UnmanagedSubscriber } from \"./abstract-provider.js\";\nimport { assert, assertArgument, makeError } from \"../utils/index.js\";\nimport { JsonRpcApiProvider } from \"./provider-jsonrpc.js\";\n/**\n * A **SocketSubscriber** uses a socket transport to handle events and\n * should use [[_emit]] to manage the events.\n */\nexport class SocketSubscriber {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() { return JSON.parse(this.#filter); }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n (this.#filterId).then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n assert(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message);\n }\n else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n}\n/**\n * A **SocketBlockSubscriber** listens for ``newHeads`` events and emits\n * ``\"block\"`` events.\n */\nexport class SocketBlockSubscriber extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"block\", parseInt(message.number));\n }\n}\n/**\n * A **SocketPendingSubscriber** listens for pending transacitons and emits\n * ``\"pending\"`` events.\n */\nexport class SocketPendingSubscriber extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"pending\", message);\n }\n}\n/**\n * A **SocketEventSubscriber** listens for event logs.\n */\nexport class SocketEventSubscriber extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() { return JSON.parse(this.#logFilter); }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message) {\n provider.emit(this.logFilter, provider._wrapLog(message, provider._network));\n }\n}\n/**\n * A **SocketProvider** is backed by a long-lived connection over a\n * socket, which can subscribe and receive real-time messages over\n * its communication channel.\n */\nexport class SocketProvider extends JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n // Copy the options\n const options = Object.assign({}, (_options != null) ? _options : {});\n // Support for batches is generally not supported for\n // connection-base providers; if this changes in the future\n // the _send should be updated to reflect this\n assertArgument(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n // Socket-based Providers (generally) cannot change their network,\n // since they have a long-lived connection; but let people override\n // this if they have just cause.\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = new Map();\n this.#subs = new Map();\n this.#pending = new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n // Handled auto-matically within AbstractProvider\n // when the log.removed = true\n if (sub.filter.orphan === \"drop-log\") {\n return new UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message of pending) {\n subscriber._handleMessage(message);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n // WebSocket provider doesn't accept batches\n assertArgument(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n // @TODO: stringify payloads here and store to prevent mutations\n // Prepare a promise to respond to\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n // Wait until the socket is connected before writing to it\n await this._waitUntilReady();\n // Write the request to the socket\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n\n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n\n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message) {\n const result = (JSON.parse(message));\n if (result && typeof (result) === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", makeError(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n }\n else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n }\n else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n }\n else {\n this.emit(\"error\", makeError(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message) {\n throw new Error(\"sub-classes must override this\");\n }\n}\n//# sourceMappingURL=provider-socket.js.map","import { WebSocket as _WebSocket } from \"./ws.js\"; /*-browser*/\nimport { SocketProvider } from \"./provider-socket.js\";\n/**\n * A JSON-RPC provider which is backed by a WebSocket.\n *\n * WebSockets are often preferred because they retain a live connection\n * to a server, which permits more instant access to events.\n *\n * However, this incurs higher server infrasturture costs, so additional\n * resources may be required to host your own WebSocket nodes and many\n * third-party services charge additional fees for WebSocket endpoints.\n */\nexport class WebSocketProvider extends SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof (url) === \"string\") {\n this.#connect = () => { return new _WebSocket(url); };\n this.#websocket = this.#connect();\n }\n else if (typeof (url) === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n }\n else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n }\n catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n // @TODO: now what? Attempt reconnect?\n }\n };\n this.websocket.onmessage = (message) => {\n this._processMessage(message.data);\n };\n /*\n this.websocket.onclose = (event) => {\n // @TODO: What event.code should we reconnect on?\n const reconnect = false;\n if (reconnect) {\n this.pause(true);\n if (this.#connect) {\n this.#websocket = this.#connect();\n this.#websocket.onopen = ...\n // @TODO: this requires the super class to rebroadcast; move it there\n }\n this._reconnect();\n }\n };\n */\n }\n async _write(message) {\n this.websocket.send(message);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n}\n//# sourceMappingURL=provider-websocket.js.map","/**\n * [[link-infura]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base (``base``)\n * - Base Goerlia Testnet (``base-goerli``)\n * - Base Sepolia Testnet (``base-sepolia``)\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Linea (``linea``)\n * - Linea Goerli Testnet (``linea-goerli``)\n * - Linea Sepolia Testnet (``linea-sepolia``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Amoy Testnet (``matic-amoy``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:INFURA [providers-infura]\n */\nimport { defineProperties, FetchRequest, assert, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nimport { WebSocketProvider } from \"./provider-websocket.js\";\nconst defaultProjectId = \"84842078b09946638c03157f83405213\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bnbsmartchain-mainnet.infura.io\";\n case \"bnbt\":\n return \"bnbsmartchain-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"linea-sepolia\":\n return \"linea-sepolia.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-amoy\":\n return \"polygon-amoy.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **InfuraWebSocketProvider** connects to the [[link-infura]]\n * WebSocket end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-infura-signup).\n */\nexport class InfuraWebSocketProvider extends WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n assert(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, provider._network);\n defineProperties(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return (this.projectId === defaultProjectId);\n }\n}\n/**\n * The **InfuraProvider** connects to the [[link-infura]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-infura-signup).\n */\nexport class InfuraProvider extends JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new InfuraProvider(chainId, this.projectId, this.projectSecret);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return (this.projectId === defaultProjectId);\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-infura.js.map","/**\n * [[link-quicknode]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Sepolia Testnet (``sepolia``)\n * - Holesky Testnet (``holesky``)\n * - Arbitrum (``arbitrum``)\n * - Arbitrum Goerli Testnet (``arbitrum-goerli``)\n * - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)\n * - Base Mainnet (``base``);\n * - Base Goerli Testnet (``base-goerli``);\n * - Base Sepolia Testnet (``base-sepolia``);\n * - BNB Smart Chain Mainnet (``bnb``)\n * - BNB Smart Chain Testnet (``bnbt``)\n * - Optimism (``optimism``)\n * - Optimism Goerli Testnet (``optimism-goerli``)\n * - Optimism Sepolia Testnet (``optimism-sepolia``)\n * - Polygon (``matic``)\n * - Polygon Mumbai Testnet (``matic-mumbai``)\n *\n * @_subsection: api/providers/thirdparty:QuickNode [providers-quicknode]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/*\n@TODO:\n These networks are not currently present in the Network\n default included networks. Research them and ensure they\n are EVM compatible and work with ethers\n\n http://ethers.matic-amoy.quiknode.pro\n\n http://ethers.avalanche-mainnet.quiknode.pro\n http://ethers.avalanche-testnet.quiknode.pro\n http://ethers.blast-sepolia.quiknode.pro\n http://ethers.celo-mainnet.quiknode.pro\n http://ethers.fantom.quiknode.pro\n http://ethers.imx-demo.quiknode.pro\n http://ethers.imx-mainnet.quiknode.pro\n http://ethers.imx-testnet.quiknode.pro\n http://ethers.near-mainnet.quiknode.pro\n http://ethers.near-testnet.quiknode.pro\n http://ethers.nova-mainnet.quiknode.pro\n http://ethers.scroll-mainnet.quiknode.pro\n http://ethers.scroll-testnet.quiknode.pro\n http://ethers.tron-mainnet.quiknode.pro\n http://ethers.zkevm-mainnet.quiknode.pro\n http://ethers.zkevm-testnet.quiknode.pro\n http://ethers.zksync-mainnet.quiknode.pro\n http://ethers.zksync-testnet.quiknode.pro\n*/\n/**\n * The **QuickNodeProvider** connects to the [[link-quicknode]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API token is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-quicknode).\n */\nexport class QuickNodeProvider extends JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n defineProperties(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new QuickNodeProvider(chainId, this.token);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return (this.token === defaultToken);\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n //if (projectSecret) { request.setCredentials(\"\", projectSecret); }\n if (token === defaultToken) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n}\n//# sourceMappingURL=provider-quicknode.js.map","/**\n * A **FallbackProvider** provides resilience, security and performance\n * in a way that is customizable and configurable.\n *\n * @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]\n */\nimport { assert, assertArgument, getBigInt, getNumber, isError } from \"../utils/index.js\";\nimport { AbstractProvider } from \"./abstract-provider.js\";\nimport { Network } from \"./network.js\";\nconst BN_1 = BigInt(\"1\");\nconst BN_2 = BigInt(\"2\");\nfunction shuffle(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(resolve, duration); });\n}\nfunction getTime() { return (new Date()).getTime(); }\nfunction stringify(value) {\n return JSON.stringify(value, (key, value) => {\n if (typeof (value) === \"bigint\") {\n return { type: \"bigint\", value: value.toString() };\n }\n return value;\n });\n}\n;\nconst defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\nconst defaultState = {\n blockNumber: -2, requests: 0, lateResponses: 0, errorResponses: 0,\n outOfSync: -1, unsupportedEvents: 0, rollingDuration: 0, score: 0,\n _network: null, _updateNumber: null, _totalTime: 0,\n _lastFatalError: null, _lastFatalErrorTimestamp: 0\n};\nasync function waitForSync(config, blockNumber) {\n while (config.blockNumber < 0 || config.blockNumber < blockNumber) {\n if (!config._updateNumber) {\n config._updateNumber = (async () => {\n try {\n const blockNumber = await config.provider.getBlockNumber();\n if (blockNumber > config.blockNumber) {\n config.blockNumber = blockNumber;\n }\n }\n catch (error) {\n config.blockNumber = -2;\n config._lastFatalError = error;\n config._lastFatalErrorTimestamp = getTime();\n }\n config._updateNumber = null;\n })();\n }\n await config._updateNumber;\n config.outOfSync++;\n if (config._lastFatalError) {\n break;\n }\n }\n}\nfunction _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + (value.map(_normalize)).join(\",\") + \"]\";\n }\n if (typeof (value) === \"object\" && typeof (value.toJSON) === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof (value)) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k) => `${JSON.stringify(k)}:${_normalize(value[k])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n}\nfunction normalizeResult(value) {\n if (\"error\" in value) {\n const error = value.error;\n return { tag: _normalize(error), value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n}\n// This strategy picks the highest weight result, as long as the weight is\n// equal to or greater than quorum\nfunction checkQuorum(quorum, results) {\n const tally = new Map();\n for (const { value, tag, weight } of results) {\n const t = tally.get(tag) || { value, weight: 0 };\n t.weight += weight;\n tally.set(tag, t);\n }\n let best = null;\n for (const r of tally.values()) {\n if (r.weight >= quorum && (!best || r.weight > best.weight)) {\n best = r;\n }\n }\n if (best) {\n return best.value;\n }\n return undefined;\n}\nfunction getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap = new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e = errorMap.get(tag) || { value, weight: 0 };\n e.weight += weight;\n errorMap.set(tag, e);\n if (bestError == null || e.weight > bestError.weight) {\n bestError = e;\n }\n }\n else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n // We have quorum for an error\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n // We do not have quorum for a result\n return undefined;\n }\n // Get the sorted values\n values.sort((a, b) => ((a < b) ? -1 : (b > a) ? 1 : 0));\n const mid = Math.floor(values.length / 2);\n // Odd-length; take the middle value\n if (values.length % 2) {\n return values[mid];\n }\n // Even length; take the ceiling of the mean of the center two values\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n}\nfunction getAnyResult(quorum, results) {\n // If any value or error meets quorum, that is our preferred result\n const result = checkQuorum(quorum, results);\n if (result !== undefined) {\n return result;\n }\n // Otherwise, do we have any result?\n for (const r of results) {\n if (r.value) {\n return r.value;\n }\n }\n // Nope!\n return undefined;\n}\nfunction getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return getNumber(getMedian(quorum, results), \"%internal\");\n }\n const tally = new Map();\n const add = (result, weight) => {\n const t = tally.get(result) || { result, weight: 0 };\n t.weight += weight;\n tally.set(result, t);\n };\n for (const { weight, value } of results) {\n const r = getNumber(value);\n add(r - 1, weight);\n add(r, weight);\n add(r + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = undefined;\n for (const { weight, result } of tally.values()) {\n // Use this result, if this result meets quorum and has either:\n // - a better weight\n // - or equal weight, but the result is larger\n if (weight >= quorum && (weight > bestWeight || (bestResult != null && weight === bestWeight && result > bestResult))) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n}\n/**\n * A **FallbackProvider** manages several [[Providers]] providing\n * resilience by switching between slow or misbehaving nodes, security\n * by requiring multiple backends to aggree and performance by allowing\n * faster backends to respond earlier.\n *\n */\nexport class FallbackProvider extends AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p) => {\n if (p instanceof AbstractProvider) {\n return Object.assign({ provider: p }, defaultConfig, defaultState);\n }\n else {\n return Object.assign({}, defaultConfig, p, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n }\n else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config) => {\n accum += config.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n assertArgument(this.quorum <= this.#configs.reduce((a, c) => (a + c.weight), 0), \"quorum exceed provider weight\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c) => {\n const result = Object.assign({}, c);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return Network.from(getBigInt(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = (\"blockHash\" in req) ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n // @TODO: Maybe do a check here to favour (heavily) providers that\n // do not require waitForSync and disfavour providers that\n // seem down-ish or are behaving slowly\n const configs = Array.from(running).map((r) => r.config);\n // Shuffle the states, sorted by priority\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a, b) => (a.priority - b.priority));\n for (const config of allConfigs) {\n if (config._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config) === -1) {\n return config;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config = this.#getNextConfig(running);\n // No runners available\n if (config == null) {\n return null;\n }\n // Create a new runner\n const runner = {\n config, result: null, didBump: false,\n perform: null, staller: null\n };\n const now = getTime();\n // Start performing this operation\n runner.perform = (async () => {\n try {\n config.requests++;\n const result = await this._translatePerform(config.provider, req);\n runner.result = { result };\n }\n catch (error) {\n config.errorResponses++;\n runner.result = { error };\n }\n const dt = (getTime() - now);\n config._totalTime += dt;\n config.rollingDuration = 0.95 * config.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n // Start a staller; when this times out, it's time to force\n // kicking off another runner because we are taking too long\n runner.staller = (async () => {\n await stall(config.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config) => {\n promises.push((async () => {\n await waitForSync(config, 0);\n if (!config._lastFatalError) {\n config._network = await config.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n // Wait for all providers to have a block number and network\n await Promise.all(promises);\n // Check all the networks match\n let chainId = null;\n for (const config of this.#configs) {\n if (config._lastFatalError) {\n continue;\n }\n const network = (config._network);\n if (chainId == null) {\n chainId = network.chainId;\n }\n else if (network.chainId !== chainId) {\n assert(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n // Get all the result objects\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n // Are there enough results to event meet quorum?\n if (results.reduce((a, r) => (a + r.weight), 0) < this.quorum) {\n return undefined;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n // We need to get the bootstrap block height\n if (this.#height === -2) {\n this.#height = Math.ceil(getNumber(getMedian(this.quorum, this.#configs.filter((c) => (!c._lastFatalError)).map((c) => ({\n value: c.blockNumber,\n tag: getNumber(c.blockNumber).toString(),\n weight: c.weight\n })))));\n }\n // Find the mode across all the providers, allowing for\n // a little drift between block heights\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === undefined) {\n return undefined;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n // Pending blocks are in the mempool and already\n // quite untrustworthy; just grab anything\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n assert(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n // Any promises that are interesting to watch for; an expired stall\n // or a successful perform\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n // No responses, yet; keep an eye on it\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n // Still stalling...\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n // This runner has already triggered another runner\n if (runner.didBump) {\n continue;\n }\n // Got a response (result or error) or stalled; kick off another runner\n runner.didBump = true;\n newRunners++;\n }\n // Check if we have reached quorum on a result (or error)\n const value = await this.#checkQuorum(running, req);\n if (value !== undefined) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n // Add any new runners, because a staller timed out or a result\n // or error response came in.\n for (let i = 0; i < newRunners; i++) {\n this.#addRunner(running, req);\n }\n // All providers have returned, and we have no result\n assert(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r) => stringify(r.result)) }\n });\n // Wait for someone to either complete its perform or stall out\n await Promise.race(interesting);\n // This is recursive, but at worst case the depth is 2x the\n // number of providers (each has a perform and a staller)\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n // Broadcasting a transaction is rare (ish) and already incurs\n // a cost on the user, so spamming is safe-ish. Just send it to\n // every backend.\n if (req.method === \"broadcastTransaction\") {\n // Once any broadcast provides a positive result, use it. No\n // need to wait for anyone else\n const results = this.#configs.map((c) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index) => {\n try {\n const result = await provider._perform(req);\n results[index] = Object.assign(normalizeResult({ result }), { weight });\n }\n catch (error) {\n results[index] = Object.assign(normalizeResult({ error }), { weight });\n }\n });\n // As each promise finishes...\n while (true) {\n // Check for a valid broadcast result\n const done = results.filter((r) => (r != null));\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n // Check for a legit broadcast error (one which we cannot\n // recover from; some nodes may return the following red\n // herring events:\n // - alredy seend (UNKNOWN_ERROR)\n // - NONCE_EXPIRED\n // - REPLACEMENT_UNDERPRICED\n const result = checkQuorum(this.quorum, results.filter((r) => (r != null)));\n if (isError(result, \"INSUFFICIENT_FUNDS\")) {\n throw result;\n }\n // Kick off the next provider (if any)\n const waiting = broadcasts.filter((b, i) => (results[i] == null));\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n // Use standard quorum results; any result was returned above,\n // so this will find any error that met quorum if any\n const result = getAnyResult(this.quorum, results);\n assert(result !== undefined, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify) }\n });\n if (result instanceof Error) {\n throw result;\n }\n return result;\n }\n await this.#initialSync();\n // Bootstrap enough runners to meet quorum\n const running = new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n // Track requests sent to a provider that are still\n // outstanding after quorum has been otherwise found\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n}\n//# sourceMappingURL=provider-fallback.js.map","import { assert } from \"../utils/index.js\";\nimport { AnkrProvider } from \"./provider-ankr.js\";\nimport { AlchemyProvider } from \"./provider-alchemy.js\";\nimport { ChainstackProvider } from \"./provider-chainstack.js\";\nimport { CloudflareProvider } from \"./provider-cloudflare.js\";\nimport { EtherscanProvider } from \"./provider-etherscan.js\";\nimport { InfuraProvider } from \"./provider-infura.js\";\n//import { PocketProvider } from \"./provider-pocket.js\";\nimport { QuickNodeProvider } from \"./provider-quicknode.js\";\nimport { FallbackProvider } from \"./provider-fallback.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nimport { Network } from \"./network.js\";\nimport { WebSocketProvider } from \"./provider-websocket.js\";\nfunction isWebSocketLike(value) {\n return (value && typeof (value.send) === \"function\" &&\n typeof (value.close) === \"function\");\n}\nconst Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n/**\n * Returns a default provider for %%network%%.\n *\n * If %%network%% is a [[WebSocketLike]] or string that begins with\n * ``\"ws:\"`` or ``\"wss:\"``, a [[WebSocketProvider]] is returned backed\n * by that WebSocket or URL.\n *\n * If %%network%% is a string that begins with ``\"HTTP:\"`` or ``\"HTTPS:\"``,\n * a [[JsonRpcProvider]] is returned connected to that URL.\n *\n * Otherwise, a default provider is created backed by well-known public\n * Web3 backends (such as [[link-infura]]) using community-provided API\n * keys.\n *\n * The %%options%% allows specifying custom API keys per backend (setting\n * an API key to ``\"-\"`` will omit that provider) and ``options.exclusive``\n * can be set to either a backend name or and array of backend names, which\n * will whitelist **only** those backends.\n *\n * Current backend strings supported are:\n * - ``\"alchemy\"``\n * - ``\"ankr\"``\n * - ``\"cloudflare\"``\n * - ``\"chainstack\"``\n * - ``\"etherscan\"``\n * - ``\"infura\"``\n * - ``\"publicPolygon\"``\n * - ``\"quicknode\"``\n *\n * @example:\n * // Connect to a local Geth node\n * provider = getDefaultProvider(\"http://localhost:8545/\");\n *\n * // Connect to Ethereum mainnet with any current and future\n * // third-party services available\n * provider = getDefaultProvider(\"mainnet\");\n *\n * // Connect to Polygon, but only allow Etherscan and\n * // INFURA and use \"MY_API_KEY\" in calls to Etherscan.\n * provider = getDefaultProvider(\"matic\", {\n * etherscan: \"MY_API_KEY\",\n * exclusive: [ \"etherscan\", \"infura\" ]\n * });\n */\nexport function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof (options.exclusive) === \"string\") {\n return (name === options.exclusive);\n }\n if (Array.isArray(options.exclusive)) {\n return (options.exclusive.indexOf(name) !== -1);\n }\n return true;\n };\n if (typeof (network) === \"string\" && network.match(/^https?:/)) {\n return new JsonRpcProvider(network);\n }\n if (typeof (network) === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new WebSocketProvider(network);\n }\n // Get the network and name, if possible\n let staticNetwork = null;\n try {\n staticNetwork = Network.from(network);\n }\n catch (error) { }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new JsonRpcProvider(\"https:/\\/polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n }\n else if (staticNetwork.name === \"matic-amoy\") {\n providers.push(new JsonRpcProvider(\"https:/\\/rpc-amoy.polygon.technology/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new AlchemyProvider(network, options.alchemy));\n }\n catch (error) { }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new AnkrProvider(network, options.ankr));\n }\n catch (error) { }\n }\n if (allowService(\"chainstack\")) {\n try {\n providers.push(new ChainstackProvider(network, options.chainstack));\n }\n catch (error) { }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new CloudflareProvider(network));\n }\n catch (error) { }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new EtherscanProvider(network, options.etherscan));\n }\n catch (error) { }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = undefined;\n if (typeof (projectId) === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new InfuraProvider(network, projectId, projectSecret));\n }\n catch (error) { }\n }\n /*\n if (options.pocket !== \"-\") {\n try {\n let appId = options.pocket;\n let secretKey: undefined | string = undefined;\n let loadBalancer: undefined | boolean = undefined;\n if (typeof(appId) === \"object\") {\n loadBalancer = !!appId.loadBalancer;\n secretKey = appId.secretKey;\n appId = appId.appId;\n }\n providers.push(new PocketProvider(network, appId, secretKey, loadBalancer));\n } catch (error) { console.log(error); }\n }\n */\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new QuickNodeProvider(network, token));\n }\n catch (error) { }\n }\n assert(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n // No need for a FallbackProvider\n if (providers.length === 1) {\n return providers[0];\n }\n // We use the floor because public third-party providers can be unreliable,\n // so a low number of providers with a large quorum will fail too often\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n // Testnets don't need as strong a security gaurantee and speed is\n // more useful during testing\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n // Provided override qorum takes priority\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new FallbackProvider(providers, undefined, { quorum });\n}\n//# sourceMappingURL=default-provider.js.map","import { defineProperties } from \"../utils/index.js\";\nimport { AbstractSigner } from \"./abstract-signer.js\";\n/**\n * A **NonceManager** wraps another [[Signer]] and automatically manages\n * the nonce, ensuring serialized and sequential nonces are used during\n * transaction.\n */\nexport class NonceManager extends AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n defineProperties(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return (await this.#noncePromise) + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n // @TODO: Maybe handle interesting/recoverable errors?\n // Like don't increment if the tx was certainly not sent\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message) {\n return this.signer.signMessage(message);\n }\n signTypedData(domain, types, value) {\n return this.signer.signTypedData(domain, types, value);\n }\n}\n//# sourceMappingURL=signer-noncemanager.js.map","import { assertArgument } from \"../utils/index.js\";\nimport { JsonRpcApiPollingProvider } from \"./provider-jsonrpc.js\";\n;\n/**\n * A **BrowserProvider** is intended to wrap an injected provider which\n * adheres to the [[link-eip-1193]] standard, which most (if not all)\n * currently do.\n */\nexport class BrowserProvider extends JsonRpcApiPollingProvider {\n #request;\n /**\n * Connnect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network, _options) {\n // Copy the options\n const options = Object.assign({}, ((_options != null) ? _options : {}), { batchMaxCount: 1 });\n assertArgument(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, options);\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n }\n catch (e) {\n const error = new Error(e.message);\n error.code = e.code;\n error.data = e.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n assertArgument(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n }\n catch (e) {\n return [{\n id: payload.id,\n error: { code: e.code, data: e.data, message: e.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n // EIP-1193 gives us some machine-readable error codes, so rewrite\n // them into \n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof (address) === \"number\") {\n return (accounts.length > address);\n }\n address = address.toLowerCase();\n return accounts.filter((a) => (a.toLowerCase() === address)).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!(await this.hasSigner(address))) {\n try {\n //const resp = \n await this.#request(\"eth_requestAccounts\", []);\n //console.log(\"RESP\", resp);\n }\n catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n}\n//# sourceMappingURL=provider-browser.js.map","/**\n * [[link-pocket]] provides a third-party service for connecting to\n * various blockchains over JSON-RPC.\n *\n * **Supported Networks**\n *\n * - Ethereum Mainnet (``mainnet``)\n * - Goerli Testnet (``goerli``)\n * - Polygon (``matic``)\n * - Arbitrum (``arbitrum``)\n *\n * @_subsection: api/providers/thirdparty:Pocket [providers-pocket]\n */\nimport { defineProperties, FetchRequest, assertArgument } from \"../utils/index.js\";\nimport { showThrottleMessage } from \"./community.js\";\nimport { Network } from \"./network.js\";\nimport { JsonRpcProvider } from \"./provider-jsonrpc.js\";\nconst defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\nfunction getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n assertArgument(false, \"unsupported network\", \"network\", name);\n}\n/**\n * The **PocketProvider** connects to the [[link-pocket]]\n * JSON-RPC end-points.\n *\n * By default, a highly-throttled API key is used, which is\n * appropriate for quick prototypes and simple scripts. To\n * gain access to an increased rate-limit, it is highly\n * recommended to [sign up here](link-pocket-signup).\n */\nexport class PocketProvider extends JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n defineProperties(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new PocketProvider(chainId, this.applicationId, this.applicationSecret);\n }\n catch (error) { }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new FetchRequest(`https:/\\/${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request, response, attempt) => {\n showThrottleMessage(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return (this.applicationId === defaultApplicationId);\n }\n}\n//# sourceMappingURL=provider-pocket.js.map","const IpcSocketProvider = undefined;\nexport { IpcSocketProvider };\n//# sourceMappingURL=provider-ipcsocket-browser.js.map","import { getAddress, resolveAddress } from \"../address/index.js\";\nimport { hashMessage, TypedDataEncoder } from \"../hash/index.js\";\nimport { AbstractSigner, copyRequest } from \"../providers/index.js\";\nimport { computeAddress, Transaction } from \"../transaction/index.js\";\nimport { defineProperties, resolveProperties, assert, assertArgument } from \"../utils/index.js\";\n/**\n * The **BaseWallet** is a stream-lined implementation of a\n * [[Signer]] that operates with a private key.\n *\n * It is preferred to use the [[Wallet]] class, as it offers\n * additional functionality and simplifies loading a variety\n * of JSON formats, Mnemonic Phrases, etc.\n *\n * This class may be of use for those attempting to implement\n * a minimal Signer.\n */\nexport class BaseWallet extends AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n assertArgument(privateKey && typeof (privateKey.sign) === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = computeAddress(this.signingKey.publicKey);\n defineProperties(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() { return this.#signingKey; }\n /**\n * The private key for this wallet.\n */\n get privateKey() { return this.signingKey.privateKey; }\n async getAddress() { return this.address; }\n connect(provider) {\n return new BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n tx = copyRequest(tx);\n // Replace any Addressable or ENS name with an address\n const { to, from } = await resolveProperties({\n to: (tx.to ? resolveAddress(tx.to, this.provider) : undefined),\n from: (tx.from ? resolveAddress(tx.from, this.provider) : undefined)\n });\n if (to != null) {\n tx.to = to;\n }\n if (from != null) {\n tx.from = from;\n }\n if (tx.from != null) {\n assertArgument(getAddress((tx.from)) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n // Build the transaction\n const btx = Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message) {\n return this.signMessageSync(message);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message) {\n return this.signingKey.sign(hashMessage(message)).serialized;\n }\n async signTypedData(domain, types, value) {\n // Populate any ENS names\n const populated = await TypedDataEncoder.resolveNames(domain, types, value, async (name) => {\n // @TODO: this should use resolveName; addresses don't\n // need a provider\n assert(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n assert(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(TypedDataEncoder.hash(populated.domain, types, populated.value)).serialized;\n }\n}\n//# sourceMappingURL=base-wallet.js.map","import { assertArgument } from \"../utils/index.js\";\nconst subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\nconst Word = /^[a-z]*$/i;\nfunction unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n }\n else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n }\n else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n}\n/**\n * @_ignore\n */\nexport function decode(data, subs) {\n // Replace all the substitutions with their expanded form\n for (let i = subsChrs.length - 1; i >= 0; i--) {\n data = data.split(subsChrs[i]).join(subs.substring(2 * i, 2 * i + 2));\n }\n // Get all tle clumps; each suffix, first-increment and second-increment\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i = parseInt(semi); i >= 0; i--) {\n clumps.push(\";\");\n }\n }\n else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n /* c8 ignore start */\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n /* c8 ignore stop */\n return unfold(unfold(clumps, \";\"), \":\");\n}\n/**\n * @_ignore\n */\nexport function decodeOwl(data) {\n assertArgument(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n}\n//# sourceMappingURL=decode-owl.js.map","import { defineProperties } from \"../utils/index.js\";\n/**\n * A Wordlist represents a collection of language-specific\n * words used to encode and devoce [[link-bip-39]] encoded data\n * by mapping words to 11-bit values and vice versa.\n */\nexport class Wordlist {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n defineProperties(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n}\n//# sourceMappingURL=wordlist.js.map","// Use the encode-latin.js script to create the necessary\n// data files to be consumed by this class\nimport { id } from \"../hash/index.js\";\nimport { assertArgument } from \"../utils/index.js\";\nimport { decodeOwl } from \"./decode-owl.js\";\nimport { Wordlist } from \"./wordlist.js\";\n/**\n * An OWL format Wordlist is an encoding method that exploits\n * the general locality of alphabetically sorted words to\n * achieve a simple but effective means of compression.\n *\n * This class is generally not useful to most developers as\n * it is used mainly internally to keep Wordlists for languages\n * based on ASCII-7 small.\n *\n * If necessary, there are tools within the ``generation/`` folder\n * to create the necessary data.\n */\nexport class WordlistOwl extends Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() { return this.#data; }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return decodeOwl(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n // Verify the computed list matches the official list\n const checksum = id(words.join(\"\\n\") + \"\\n\");\n /* c8 ignore start */\n if (checksum !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n /* c8 ignore stop */\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index) {\n const words = this.#loadWords();\n assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, \"index\", index);\n return words[index];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n}\n//# sourceMappingURL=wordlist-owl.js.map","import { WordlistOwl } from \"./wordlist-owl.js\";\nconst words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)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pk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\nconst checksum = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\nlet wordlist = null;\n/**\n * The [[link-bip39-en]] for [mnemonic phrases](link-bip-39).\n *\n * @_docloc: api/wordlists\n */\nexport class LangEn extends WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() { super(\"en\", words, checksum); }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new LangEn();\n }\n return wordlist;\n }\n}\n//# sourceMappingURL=lang-en.js.map","import { pbkdf2, sha256 } from \"../crypto/index.js\";\nimport { defineProperties, getBytes, hexlify, assertNormalize, assertPrivate, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nimport { LangEn } from \"../wordlists/lang-en.js\";\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits) {\n return ((1 << bits) - 1) << (8 - bits) & 0xff;\n}\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits) {\n return ((1 << bits) - 1) & 0xff;\n}\nfunction mnemonicToEntropy(mnemonic, wordlist) {\n assertNormalize(\"NFKD\");\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n assertArgument((words.length % 3) === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n assertArgument(index >= 0, `invalid mnemonic word at index ${i}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum = getBytes(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n assertArgument(checksum === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\nfunction entropyToMnemonic(entropy, wordlist) {\n assertArgument((entropy.length % 4) === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n remainingBits -= 8;\n // This byte will complete an 11-bit index\n }\n else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = parseInt(sha256(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n return wordlist.join(indices.map((index) => wordlist.getWord(index)));\n}\nconst _guard = {};\n/**\n * A **Mnemonic** wraps all properties required to compute [[link-bip-39]]\n * seeds and convert between phrases and entropy.\n */\nexport class Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n assertPrivate(guard, _guard, \"Mnemonic\");\n defineProperties(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = toUtf8Bytes(\"mnemonic\" + this.password, \"NFKD\");\n return pbkdf2(toUtf8Bytes(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n // Normalize the case and space; throws if invalid\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic(getBytes(entropy), wordlist);\n return new Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = getBytes(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new Mnemonic(_guard, hexlify(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = getBytes(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n }\n catch (error) { }\n return false;\n }\n}\n//# sourceMappingURL=mnemonic.js.map","/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _AES_key, _AES_Kd, _AES_Ke;\n// Number of rounds by keysize\nconst numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n// Round constant words\nconst rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n// S-box and Inverse S-box (S is for Substitution)\nconst S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b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b, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n// Transformations for encryption\nconst T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\nconst T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\nconst T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\nconst T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n// Transformations for decryption\nconst T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\nconst T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\nconst T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\nconst T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n// Transformations for decryption key expansion\nconst U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\nconst U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\nconst U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\nconst U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\nfunction convertToInt32(bytes) {\n const result = [];\n for (let i = 0; i < bytes.length; i += 4) {\n result.push((bytes[i] << 24) | (bytes[i + 1] << 16) | (bytes[i + 2] << 8) | bytes[i + 3]);\n }\n return result;\n}\nexport class AES {\n get key() { return __classPrivateFieldGet(this, _AES_key, \"f\").slice(); }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n __classPrivateFieldSet(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError('invalid key size (must be 16, 24 or 32 bytes)');\n }\n // encryption round keys\n __classPrivateFieldSet(this, _AES_Ke, [], \"f\");\n // decryption round keys\n __classPrivateFieldSet(this, _AES_Kd, [], \"f\");\n for (let i = 0; i <= rounds; i++) {\n __classPrivateFieldGet(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n // convert the key into ints\n const tk = convertToInt32(this.key);\n // copy values into round key arrays\n let index;\n for (let i = 0; i < KC; i++) {\n index = i >> 2;\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[index][i % 4] = tk[i];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds - index][i % 4] = tk[i];\n }\n // key expansion (fips-197 section 5.2)\n let rconpointer = 0;\n let t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (let i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n }\n else {\n for (let i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n tk[KC / 2] ^= (S[tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n for (let i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n // copy values into round key arrays\n let i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[r][c] = tk[i];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds - r][c] = tk[i++];\n t++;\n }\n }\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (let r = 1; r < rounds; r++) {\n for (let c = 0; c < 4; c++) {\n tt = __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][c];\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[tt & 0xFF]);\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError('invalid plaintext size (must be 16 bytes)');\n }\n const rounds = __classPrivateFieldGet(this, _AES_Ke, \"f\").length - 1;\n const a = [0, 0, 0, 0];\n // convert plaintext to (ints ^ key)\n let t = convertToInt32(plaintext);\n for (let i = 0; i < 4; i++) {\n t[i] ^= __classPrivateFieldGet(this, _AES_Ke, \"f\")[0][i];\n }\n // apply round transforms\n for (let r = 1; r < rounds; r++) {\n for (let i = 0; i < 4; i++) {\n a[i] = (T1[(t[i] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[t[(i + 3) % 4] & 0xff] ^\n __classPrivateFieldGet(this, _AES_Ke, \"f\")[r][i]);\n }\n t = a.slice();\n }\n // the last round is special\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i = 0; i < 4; i++) {\n tt = __classPrivateFieldGet(this, _AES_Ke, \"f\")[rounds][i];\n result[4 * i] = (S[(t[i] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[t[(i + 3) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError('invalid ciphertext size (must be 16 bytes)');\n }\n const rounds = __classPrivateFieldGet(this, _AES_Kd, \"f\").length - 1;\n const a = [0, 0, 0, 0];\n // convert plaintext to (ints ^ key)\n let t = convertToInt32(ciphertext);\n for (let i = 0; i < 4; i++) {\n t[i] ^= __classPrivateFieldGet(this, _AES_Kd, \"f\")[0][i];\n }\n // apply round transforms\n for (let r = 1; r < rounds; r++) {\n for (let i = 0; i < 4; i++) {\n a[i] = (T5[(t[i] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[t[(i + 1) % 4] & 0xff] ^\n __classPrivateFieldGet(this, _AES_Kd, \"f\")[r][i]);\n }\n t = a.slice();\n }\n // the last round is special\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i = 0; i < 4; i++) {\n tt = __classPrivateFieldGet(this, _AES_Kd, \"f\")[rounds][i];\n result[4 * i] = (Si[(t[i] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[t[(i + 1) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n }\n}\n_AES_key = new WeakMap(), _AES_Kd = new WeakMap(), _AES_Ke = new WeakMap();\n//# sourceMappingURL=aes.js.map","import { AES } from \"./aes.js\";\nexport class ModeOfOperation {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n}\n//# sourceMappingURL=mode.js.map","// Cipher Block Chaining\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _CBC_iv, _CBC_lastBlock;\nimport { ModeOfOperation } from \"./mode.js\";\nexport class CBC extends ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet(this, _CBC_iv, new Uint8Array(iv), \"f\");\n }\n else {\n __classPrivateFieldSet(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() { return new Uint8Array(__classPrivateFieldGet(this, _CBC_iv, \"f\")); }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i = 0; i < plaintext.length; i += 16) {\n for (let j = 0; j < 16; j++) {\n __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j] ^= plaintext[i + j];\n }\n __classPrivateFieldSet(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet(this, _CBC_lastBlock, \"f\"), i);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i = 0; i < ciphertext.length; i += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i, i + 16));\n for (let j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j];\n __classPrivateFieldGet(this, _CBC_lastBlock, \"f\")[j] = ciphertext[i + j];\n }\n }\n return plaintext;\n }\n}\n_CBC_iv = new WeakMap(), _CBC_lastBlock = new WeakMap();\n//# sourceMappingURL=mode-cbc.js.map","// Counter Mode\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _CTR_remaining, _CTR_remainingIndex, _CTR_counter;\nimport { ModeOfOperation } from \"./mode.js\";\nexport class CTR extends ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, CTR);\n // Remaining bytes for the one-time pad\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n // The current counter\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet(this, _CTR_remaining, __classPrivateFieldGet(this, _CTR_counter, \"f\"), \"f\"); // This will be discarded immediately\n __classPrivateFieldSet(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof (initialValue) === \"number\") {\n this.setCounterValue(initialValue);\n }\n else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() { return new Uint8Array(__classPrivateFieldGet(this, _CTR_counter, \"f\")); }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index = 15; index >= 0; --index) {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[index] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i = 15; i >= 0; i--) {\n if (__classPrivateFieldGet(this, _CTR_counter, \"f\")[i] === 255) {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[i] = 0;\n }\n else {\n __classPrivateFieldGet(this, _CTR_counter, \"f\")[i]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i = 0; i < crypttext.length; i++) {\n if (__classPrivateFieldGet(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i] ^= __classPrivateFieldGet(this, _CTR_remaining, \"f\")[__classPrivateFieldSet(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n}\n_CTR_remaining = new WeakMap(), _CTR_remainingIndex = new WeakMap(), _CTR_counter = new WeakMap();\n//# sourceMappingURL=mode-ctr.js.map","export function pkcs7Pad(data) {\n const padder = 16 - (data.length % 16);\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n}\nexport function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError('PKCS#7 invalid length');\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError('PKCS#7 padding byte out of range');\n }\n const length = data.length - padder;\n for (let i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new TypeError('PKCS#7 invalid padding byte');\n }\n }\n return new Uint8Array(data.subarray(0, length));\n}\n//# sourceMappingURL=padding.js.map","/**\n * @_ignore\n */\nimport { getBytesCopy, assertArgument, toUtf8Bytes } from \"../utils/index.js\";\nexport function looseArrayify(hexString) {\n if (typeof (hexString) === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return getBytesCopy(hexString);\n}\nexport function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = '0' + value;\n }\n return value;\n}\nexport function getPassword(password) {\n if (typeof (password) === 'string') {\n return toUtf8Bytes(password, \"NFKC\");\n }\n return getBytesCopy(password);\n}\nexport function spelunk(object, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n assertArgument(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = (match[4] === \"!\");\n let cur = object;\n for (const comp of path.toLowerCase().split('.')) {\n // Search for a child object with a case-insensitive matching key\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n }\n else if (typeof (cur) === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n }\n else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n assertArgument(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof (cur) === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n }\n else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof (cur) === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof (cur) === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof (cur)) {\n return cur;\n }\n assertArgument(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n}\n/*\nexport function follow(object: any, path: string): null | string {\n let currentChild = object;\n\n for (const comp of path.toLowerCase().split('/')) {\n\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comp) {\n matchingChild = currentChild[key];\n break;\n }\n }\n\n if (matchingChild === null) { return null; }\n\n currentChild = matchingChild;\n }\n\n return currentChild;\n}\n\n// \"path/to/something:type!\"\nexport function followRequired(data: any, path: string): string {\n const value = follow(data, path);\n if (value != null) { return value; }\n return logger.throwArgumentError(\"invalid value\", `data:${ path }`,\n JSON.stringify(data));\n}\n*/\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\n/*\nexport function uuidV4(randomBytes: BytesLike): string {\n const bytes = getBytes(randomBytes, \"randomBytes\");\n\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n const value = hexlify(bytes);\n\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n*/\n//# sourceMappingURL=utils.js.map","/**\n * The JSON Wallet formats allow a simple way to store the private\n * keys needed in Ethereum along with related information and allows\n * for extensible forms of encryption.\n *\n * These utilities facilitate decrypting and encrypting the most common\n * JSON Wallet formats.\n *\n * @_subsection: api/wallet:JSON Wallets [json-wallets]\n */\nimport { CTR } from \"aes-js\";\nimport { getAddress } from \"../address/index.js\";\nimport { keccak256, pbkdf2, randomBytes, scrypt, scryptSync } from \"../crypto/index.js\";\nimport { computeAddress } from \"../transaction/index.js\";\nimport { concat, getBytes, hexlify, uuidV4, assert, assertArgument } from \"../utils/index.js\";\nimport { getPassword, spelunk, zpad } from \"./utils.js\";\nimport { version } from \"../_version.js\";\nconst defaultPath = \"m/44'/60'/0'/0/0\";\n/**\n * Returns true if %%json%% is a valid JSON Keystore Wallet.\n */\nexport function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version = ((data.version != null) ? parseInt(data.version) : 0);\n if (version === 3) {\n return true;\n }\n }\n catch (error) { }\n return false;\n}\nfunction decrypt(data, key, ciphertext) {\n const cipher = spelunk(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = spelunk(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new CTR(key, iv);\n return hexlify(aesCtr.decrypt(ciphertext));\n }\n assert(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n}\nfunction getAccount(data, _key) {\n const key = getBytes(_key);\n const ciphertext = spelunk(data, \"crypto.ciphertext:data!\");\n const computedMAC = hexlify(keccak256(concat([key.slice(16, 32), ciphertext]))).substring(2);\n assertArgument(computedMAC === spelunk(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt(data, key.slice(0, 16), ciphertext);\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (!check.startsWith(\"0x\")) {\n check = \"0x\" + check;\n }\n assertArgument(getAddress(check) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n const version = spelunk(data, \"x-ethers.version:string\");\n if (version === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = spelunk(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = spelunk(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (spelunk(data, \"x-ethers.path:string\") || defaultPath),\n locale: (spelunk(data, \"x-ethers.locale:string\") || \"en\"),\n entropy: hexlify(getBytes(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n}\nfunction getDecryptKdfParams(data) {\n const kdf = spelunk(data, \"crypto.kdf:string\");\n if (kdf && typeof (kdf) === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = spelunk(data, \"crypto.kdfparams.salt:data!\");\n const N = spelunk(data, \"crypto.kdfparams.n:int!\");\n const r = spelunk(data, \"crypto.kdfparams.r:int!\");\n const p = spelunk(data, \"crypto.kdfparams.p:int!\");\n // Make sure N is a power of 2\n assertArgument(N > 0 && (N & (N - 1)) === 0, \"invalid kdf.N\", \"kdf.N\", N);\n assertArgument(r > 0 && p > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = spelunk(data, \"crypto.kdfparams.dklen:int!\");\n assertArgument(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N, r, p, dkLen: 64 };\n }\n else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = spelunk(data, \"crypto.kdfparams.salt:data!\");\n const prf = spelunk(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n assertArgument(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = spelunk(data, \"crypto.kdfparams.c:int!\");\n const dkLen = spelunk(data, \"crypto.kdfparams.dklen:int!\");\n assertArgument(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n assertArgument(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n}\n/**\n * Returns the account details for the JSON Keystore Wallet %%json%%\n * using %%password%%.\n *\n * It is preferred to use the [async version](decryptKeystoreJson)\n * instead, which allows a [[ProgressCallback]] to keep the user informed\n * as to the decryption status.\n *\n * This method will block the event loop (freezing all UI) until decryption\n * is complete, which can take quite some time, depending on the wallet\n * paramters and platform.\n */\nexport function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt, count, dkLen, algorithm } = params;\n const key = pbkdf2(password, salt, count, dkLen, algorithm);\n return getAccount(data, key);\n }\n assert(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N, r, p, dkLen } = params;\n const key = scryptSync(password, salt, N, r, p, dkLen);\n return getAccount(data, key);\n}\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(() => { resolve(); }, duration); });\n}\n/**\n * Resolves to the decrypted JSON Keystore Wallet %%json%% using the\n * %%password%%.\n *\n * If provided, %%progress%% will be called periodically during the\n * decrpytion to provide feedback, and if the function returns\n * ``false`` will halt decryption.\n *\n * The %%progressCallback%% will **always** receive ``0`` before\n * decryption begins and ``1`` when complete.\n */\nexport async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt, count, dkLen, algorithm } = params;\n const key = pbkdf2(password, salt, count, dkLen, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key);\n }\n assert(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N, r, p, dkLen } = params;\n const key = await scrypt(password, salt, N, r, p, dkLen, progress);\n return getAccount(data, key);\n}\nfunction getEncryptKdfParams(options) {\n // Check/generate the salt\n const salt = (options.salt != null) ? getBytes(options.salt, \"options.salt\") : randomBytes(32);\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p = options.scrypt.p;\n }\n }\n assertArgument(typeof (N) === \"number\" && N > 0 && Number.isSafeInteger(N) && (BigInt(N) & BigInt(N - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N);\n assertArgument(typeof (r) === \"number\" && r > 0 && Number.isSafeInteger(r), \"invalid scrypt r parameter\", \"options.r\", r);\n assertArgument(typeof (p) === \"number\" && p > 0 && Number.isSafeInteger(p), \"invalid scrypt p parameter\", \"options.p\", p);\n return { name: \"scrypt\", dkLen: 32, salt, N, r, p };\n}\nfunction _encryptKeystore(key, kdf, account, options) {\n const privateKey = getBytes(account.privateKey, \"privateKey\");\n // Override initialization vector\n const iv = (options.iv != null) ? getBytes(options.iv, \"options.iv\") : randomBytes(16);\n assertArgument(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n // Override the uuid\n const uuidRandom = (options.uuid != null) ? getBytes(options.uuid, \"options.uuid\") : randomBytes(16);\n assertArgument(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n // Encrypt the private key\n const aesCtr = new CTR(derivedKey, iv);\n const ciphertext = getBytes(aesCtr.encrypt(privateKey));\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]));\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (account.mnemonic) {\n const client = (options.client != null) ? options.client : `ethers/${version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = getBytes(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = randomBytes(16);\n const mnemonicAesCtr = new CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = getBytes(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\");\n const gethFilename = (\"UTC--\" + timestamp + \"--\" + data.address);\n data[\"x-ethers\"] = {\n client, gethFilename, path, locale,\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n}\n/**\n * Return the JSON Keystore Wallet for %%account%% encrypted with\n * %%password%%.\n *\n * The %%options%% can be used to tune the password-based key\n * derivation function parameters, explicitly set the random values\n * used. Any provided [[ProgressCallback]] is ignord.\n */\nexport function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = getPassword(password);\n const kdf = getEncryptKdfParams(options);\n const key = scryptSync(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore(getBytes(key), kdf, account, options);\n}\n/**\n * Resolved to the JSON Keystore Wallet for %%account%% encrypted\n * with %%password%%.\n *\n * The %%options%% can be used to tune the password-based key\n * derivation function parameters, explicitly set the random values\n * used and provide a [[ProgressCallback]] to receive periodic updates\n * on the completion status..\n */\nexport async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = getPassword(password);\n const kdf = getEncryptKdfParams(options);\n const key = await scrypt(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore(getBytes(key), kdf, account, options);\n}\n//# sourceMappingURL=json-keystore.js.map","/**\n * Explain HD Wallets..\n *\n * @_subsection: api/wallet:HD Wallets [hd-wallets]\n */\nimport { computeHmac, randomBytes, ripemd160, SigningKey, sha256 } from \"../crypto/index.js\";\nimport { VoidSigner } from \"../providers/index.js\";\nimport { computeAddress } from \"../transaction/index.js\";\nimport { concat, dataSlice, decodeBase58, defineProperties, encodeBase58, getBytes, hexlify, isBytesLike, getNumber, toBeArray, toBigInt, toBeHex, assertPrivate, assert, assertArgument } from \"../utils/index.js\";\nimport { LangEn } from \"../wordlists/lang-en.js\";\nimport { BaseWallet } from \"./base-wallet.js\";\nimport { Mnemonic } from \"./mnemonic.js\";\nimport { encryptKeystoreJson, encryptKeystoreJsonSync, } from \"./json-keystore.js\";\n/**\n * The default derivation path for Ethereum HD Nodes. (i.e. ``\"m/44'/60'/0'/0/0\"``)\n */\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n// \"Bitcoin seed\"\nconst MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\nconst HardenedBit = 0x80000000;\nconst N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\nconst Nibbles = \"0123456789abcdef\";\nfunction zpad(value, length) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n}\nfunction encodeBase58Check(_value) {\n const value = getBytes(_value);\n const check = dataSlice(sha256(sha256(value)), 0, 4);\n const bytes = concat([value, check]);\n return encodeBase58(bytes);\n}\nconst _guard = {};\nfunction ser_I(index, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index & HardenedBit) {\n assert(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n // Data = 0x00 || ser_256(k_par)\n data.set(getBytes(privateKey), 1);\n }\n else {\n // Data = ser_p(point(k_par))\n data.set(getBytes(publicKey));\n }\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) {\n data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff);\n }\n const I = getBytes(computeHmac(\"sha512\", chainCode, data));\n return { IL: I.slice(0, 32), IR: I.slice(32) };\n}\nfunction derivePath(node, path) {\n const components = path.split(\"/\");\n assertArgument(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n assertArgument(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n assertArgument(index < HardenedBit, \"invalid path index\", `path[${i}]`, component);\n result = result.deriveChild(HardenedBit + index);\n }\n else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n assertArgument(index < HardenedBit, \"invalid path index\", `path[${i}]`, component);\n result = result.deriveChild(index);\n }\n else {\n assertArgument(false, \"invalid path component\", `path[${i}]`, component);\n }\n }\n return result;\n}\n/**\n * An **HDNodeWallet** is a [[Signer]] backed by the private key derived\n * from an HD Node using the [[link-bip-32]] stantard.\n *\n * An HD Node forms a hierarchal structure with each HD Node having a\n * private key and the ability to derive child HD Nodes, defined by\n * a path indicating the index of each child.\n */\nexport class HDNodeWallet extends BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provide full path details, this\n * may be ``null``, if instantiated from a source that does not\n * encode it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index, depth, mnemonic, provider) {\n super(signingKey, provider);\n assertPrivate(guard, _guard, \"HDNodeWallet\");\n defineProperties(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = dataSlice(ripemd160(sha256(this.publicKey)), 0, 4);\n defineProperties(this, {\n parentFingerprint, fingerprint,\n chainCode, path, index, depth\n });\n defineProperties(this, { mnemonic });\n }\n connect(provider) {\n return new HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m = this.mnemonic;\n if (this.path && m && m.wordlist.locale === \"en\" && m.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await encryptKeystoreJson(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return encryptKeystoreJsonSync(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n assert(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check(concat([\n \"0x0488ADE4\", zpad(this.depth, 1), this.parentFingerprint,\n zpad(this.index, 4), this.chainCode,\n concat([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() { return (this.path != null); }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index <= 0xffffffff, \"invalid index\", \"index\", index);\n // Base path\n let path = this.path;\n if (path) {\n path += \"/\" + (index & ~HardenedBit);\n if (index & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, this.privateKey);\n const ki = new SigningKey(toBeHex((toBigInt(IL) + BigInt(this.privateKey)) % N, 32));\n return new HDNodeWallet(_guard, ki, this.fingerprint, hexlify(IR), path, index, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n assertArgument(isBytesLike(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = getBytes(_seed, \"seed\");\n assertArgument(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I = getBytes(computeHmac(\"sha512\", MasterSecret, seed));\n const signingKey = new SigningKey(hexlify(I.slice(0, 32)));\n return new HDNodeWallet(_guard, signingKey, \"0x00000000\", hexlify(I.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = toBeArray(decodeBase58(extendedKey)); // @TODO: redact\n assertArgument(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = hexlify(key);\n return new HDNodeVoidWallet(_guard, computeAddress(publicKey), publicKey, parentFingerprint, chainCode, null, index, depth, null);\n }\n // Private Key\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNodeWallet(_guard, new SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index, depth, null, null);\n }\n assertArgument(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = defaultPath;\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const mnemonic = Mnemonic.fromEntropy(randomBytes(16), password, wordlist);\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = defaultPath;\n }\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = defaultPath;\n }\n if (wordlist == null) {\n wordlist = LangEn.wordlist();\n }\n const mnemonic = Mnemonic.fromPhrase(phrase, password, wordlist);\n return HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return HDNodeWallet.#fromSeed(seed, null);\n }\n}\n/**\n * A **HDNodeVoidWallet** cannot sign, but provides access to\n * the children nodes of a [[link-bip-32]] HD wallet addresses.\n *\n * The can be created by using an extended ``xpub`` key to\n * [[HDNodeWallet_fromExtendedKey]] or by\n * [nuetering](HDNodeWallet-neuter) a [[HDNodeWallet]].\n */\nexport class HDNodeVoidWallet extends VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index, depth, provider) {\n super(address, provider);\n assertPrivate(guard, _guard, \"HDNodeVoidWallet\");\n defineProperties(this, { publicKey });\n const fingerprint = dataSlice(ripemd160(sha256(publicKey)), 0, 4);\n defineProperties(this, {\n publicKey, fingerprint, parentFingerprint, chainCode, path, index, depth\n });\n }\n connect(provider) {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n assert(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check(concat([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey,\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() { return (this.path != null); }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index <= 0xffffffff, \"invalid index\", \"index\", index);\n // Base path\n let path = this.path;\n if (path) {\n path += \"/\" + (index & ~HardenedBit);\n if (index & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index, this.chainCode, this.publicKey, null);\n const Ki = SigningKey.addPoints(IL, this.publicKey, true);\n const address = computeAddress(Ki);\n return new HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, hexlify(IR), path, index, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n}\n/*\nexport class HDNodeWalletManager {\n #root: HDNodeWallet;\n\n constructor(phrase: string, password?: null | string, path?: null | string, locale?: null | Wordlist) {\n if (password == null) { password = \"\"; }\n if (path == null) { path = \"m/44'/60'/0'/0\"; }\n if (locale == null) { locale = LangEn.wordlist(); }\n this.#root = HDNodeWallet.fromPhrase(phrase, password, path, locale);\n }\n\n getSigner(index?: number): HDNodeWallet {\n return this.#root.deriveChild((index == null) ? 0: index);\n }\n}\n*/\n/**\n * Returns the [[link-bip-32]] path for the account at %%index%%.\n *\n * This is the pattern used by wallets like Ledger.\n *\n * There is also an [alternate pattern](getIndexedAccountPath) used by\n * some software.\n */\nexport function getAccountPath(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index >= 0 && index < HardenedBit, \"invalid account index\", \"index\", index);\n return `m/44'/60'/${index}'/0/0`;\n}\n/**\n * Returns the path using an alternative pattern for deriving accounts,\n * at %%index%%.\n *\n * This derivation path uses the //index// component rather than the\n * //account// component to derive sequential accounts.\n *\n * This is the pattern used by wallets like MetaMask.\n */\nexport function getIndexedAccountPath(_index) {\n const index = getNumber(_index, \"index\");\n assertArgument(index >= 0 && index < HardenedBit, \"invalid account index\", \"index\", index);\n return `m/44'/60'/0'/0/${index}`;\n}\n//# sourceMappingURL=hdwallet.js.map","/**\n * @_subsection: api/wallet:JSON Wallets [json-wallets]\n */\nimport { CBC, pkcs7Strip } from \"aes-js\";\nimport { getAddress } from \"../address/index.js\";\nimport { pbkdf2 } from \"../crypto/index.js\";\nimport { id } from \"../hash/index.js\";\nimport { getBytes, assertArgument } from \"../utils/index.js\";\nimport { getPassword, looseArrayify, spelunk } from \"./utils.js\";\n/**\n * Returns true if %%json%% is a valid JSON Crowdsale wallet.\n */\nexport function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n }\n catch (error) { }\n return false;\n}\n// See: https://github.com/ethereum/pyethsaletool\n/**\n * Before Ethereum launched, it was necessary to create a wallet\n * format for backers to use, which would be used to receive ether\n * as a reward for contributing to the project.\n *\n * The [[link-crowdsale]] format is now obsolete, but it is still\n * useful to support and the additional code is fairly trivial as\n * all the primitives required are used through core portions of\n * the library.\n */\nexport function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = getPassword(_password);\n // Ethereum Address\n const address = getAddress(spelunk(data, \"ethaddr:string!\"));\n // Encrypted Seed\n const encseed = looseArrayify(spelunk(data, \"encseed:string!\"));\n assertArgument(encseed && (encseed.length % 16) === 0, \"invalid encseed\", \"json\", json);\n const key = getBytes(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n // Decrypt the seed\n const aesCbc = new CBC(key, iv);\n const seed = pkcs7Strip(getBytes(aesCbc.decrypt(encryptedSeed)));\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n return { address, privateKey: id(seedHex) };\n}\n//# sourceMappingURL=json-crowdsale.js.map","import { SigningKey } from \"../crypto/index.js\";\nimport { assertArgument } from \"../utils/index.js\";\nimport { BaseWallet } from \"./base-wallet.js\";\nimport { HDNodeWallet } from \"./hdwallet.js\";\nimport { decryptCrowdsaleJson, isCrowdsaleJson } from \"./json-crowdsale.js\";\nimport { decryptKeystoreJson, decryptKeystoreJsonSync, encryptKeystoreJson, encryptKeystoreJsonSync, isKeystoreJson } from \"./json-keystore.js\";\nimport { Mnemonic } from \"./mnemonic.js\";\nfunction stall(duration) {\n return new Promise((resolve) => { setTimeout(() => { resolve(); }, duration); });\n}\n/**\n * A **Wallet** manages a single private key which is used to sign\n * transactions, messages and other common payloads.\n *\n * This class is generally the main entry point for developers\n * that wish to use a private key directly, as it can create\n * instances from a large variety of common sources, including\n * raw private key, [[link-bip-39]] mnemonics and encrypte JSON\n * wallets.\n */\nexport class Wallet extends BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof (key) === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = (typeof (key) === \"string\") ? new SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await encryptKeystoreJson(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return encryptKeystoreJsonSync(account, password);\n }\n static #fromAccount(account) {\n assertArgument(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet = HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet.address === account.address && wallet.privateKey === account.privateKey) {\n return wallet;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new Wallet(account.privateKey);\n assertArgument(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if (isKeystoreJson(json)) {\n account = await decryptKeystoreJson(json, password, progress);\n }\n else if (isCrowdsaleJson(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = decryptCrowdsaleJson(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if (isKeystoreJson(json)) {\n account = decryptKeystoreJsonSync(json, password);\n }\n else if (isCrowdsaleJson(json)) {\n account = decryptCrowdsaleJson(json, password);\n }\n else {\n assertArgument(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n}\n//# sourceMappingURL=wallet.js.map","const Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n/**\n * @_ignore\n */\nexport function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i = 0; i < data.length; i++) {\n // Accumulate 6 bits of data\n accum = ((accum << 6) | Base64.indexOf(data[i]));\n bits += 6;\n // While we have enough for a word...\n while (bits >= width) {\n // ...read the word\n const value = (accum >> (bits - width));\n accum &= (1 << (bits - width)) - 1;\n bits -= width;\n // A value of 0 indicates we exceeded maxValue, it\n // floods over into the next value\n if (value === 0) {\n flood += maxValue;\n }\n else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n}\n//# sourceMappingURL=bit-reader.js.map","import { assertArgument } from \"../utils/index.js\";\nimport { decodeBits } from \"./bit-reader.js\";\nimport { decodeOwl } from \"./decode-owl.js\";\n/**\n * @_ignore\n */\nexport function decodeOwlA(data, accents) {\n let words = decodeOwl(data).join(\",\");\n // Inject the accents\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n assertArgument(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = decodeBits(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n}\n//# sourceMappingURL=decode-owla.js.map","import { WordlistOwl } from \"./wordlist-owl.js\";\nimport { decodeOwlA } from \"./decode-owla.js\";\n/**\n * An OWL-A format Wordlist extends the OWL format to add an\n * overlay onto an OWL format Wordlist to support diacritic\n * marks.\n *\n * This class is generally not useful to most developers as\n * it is used mainly internally to keep Wordlists for languages\n * based on latin-1 small.\n *\n * If necessary, there are tools within the ``generation/`` folder\n * to create the necessary data.\n */\nexport class WordlistOwlA extends WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum) {\n super(locale, data, checksum);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() { return this.#accent; }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return decodeOwlA(this._data, this._accent);\n }\n}\n//# sourceMappingURL=wordlist-owla.js.map","import { LangEn } from \"./lang-en.js\";\nexport const wordlists = {\n en: LangEn.wordlist(),\n};\n//# sourceMappingURL=wordlists-browser.js.map","import type {\n Block,\n BlockTag,\n EthersError,\n InterfaceAbi,\n JsonRpcSigner,\n TransactionReceipt,\n TransactionResponse\n} from 'ethers'\nimport {\n ErrorTypeEnum,\n type BlockNumber,\n type ContractAddress,\n type PrivateKey,\n type TransactionId,\n type WalletAddress\n} from '@multiplechain/types'\nimport { sleep, checkWebSocket } from '@multiplechain/utils'\nimport type { EvmNetworkConfigInterface } from './Provider'\nimport type { TransactionData } from '../services/TransactionSigner'\nimport { Wallet, Contract, ContractFactory, JsonRpcProvider, WebSocketProvider } from 'ethers'\n\nexport type { EthersError } from 'ethers'\n\nexport class Ethers {\n /**\n * Network configuration of the provider\n */\n network: EvmNetworkConfigInterface\n\n /**\n * JSON RPC provider\n */\n jsonRpcProvider: JsonRpcProvider\n\n /**\n * WebSocket provider\n */\n webSocketProvider?: WebSocketProvider\n\n /**\n * @param network - Network configuration of the provider\n */\n constructor(network: EvmNetworkConfigInterface) {\n this.network = network\n this.jsonRpcProvider = new JsonRpcProvider(network.rpcUrl)\n }\n\n /**\n * @returns Ethers jsonRpc provider\n */\n public get jsonRpc(): JsonRpcProvider {\n return this.jsonRpcProvider\n }\n\n /**\n * @returns Ethers webSocket provider\n */\n public get webSocket(): WebSocketProvider | undefined {\n return this.webSocketProvider\n }\n\n /**\n * @returns Ethers webSocket provider\n */\n public async connectWebSocket(): Promise {\n return await new Promise((resolve, reject) => {\n if (this.network.wsUrl === undefined) {\n reject(new Error(ErrorTypeEnum.WS_URL_NOT_DEFINED))\n } else {\n const url = this.network.wsUrl\n checkWebSocket(url)\n .then((status: any) => {\n if (status instanceof Error) {\n reject(status)\n } else {\n resolve((this.webSocketProvider = new WebSocketProvider(url)))\n }\n })\n .catch(reject)\n }\n })\n }\n\n /**\n * @param address contract address\n * @param abi contract abi\n * @param signer signer of the contract\n * @returns contract instance\n */\n public contract(\n address: string,\n abi: InterfaceAbi,\n signer?: JsonRpcSigner | JsonRpcProvider\n ): Contract {\n return new Contract(address, abi, signer)\n }\n\n /**\n * @param privateKey private key of the wallet\n * @param provider provider of the blockchain network\n * @returns wallet instance\n */\n public wallet(privateKey: PrivateKey, provider?: JsonRpcProvider): Wallet {\n return new Wallet(privateKey, provider ?? this.jsonRpc)\n }\n\n /**\n * @param abi contract abi\n * @param bytecode contract bytecode\n * @param signer signer of the contract\n * @returns contract factory instance\n */\n public contractFactory(\n abi: InterfaceAbi,\n bytecode: string,\n signer?: JsonRpcSigner | JsonRpcProvider\n ): ContractFactory {\n return new ContractFactory(abi, bytecode, signer)\n }\n\n /**\n * @param address contract address\n * @returns contract bytecode\n */\n async getByteCode(address: ContractAddress): Promise {\n try {\n return await this.jsonRpc.getCode(address)\n } catch (error) {\n const e = error as EthersError\n if (e.code === 'UNCONFIGURED_NAME') {\n await sleep(1000)\n return await this.getByteCode(address)\n } else {\n throw error\n }\n }\n }\n\n /**\n * @param data transaction data\n * @returns transaction estimate gas\n */\n public async getEstimateGas(data: TransactionData): Promise {\n return Number(await this.jsonRpcProvider.estimateGas(data))\n }\n\n /**\n * @returns gas price\n */\n public async getGasPrice(): Promise {\n return (await this.jsonRpc.send('eth_gasPrice', [])).toString() as string\n }\n\n /**\n * @param address wallet address\n * @returns nonce of the wallet\n */\n public async getNonce(address: WalletAddress): Promise {\n return await this.jsonRpcProvider.getTransactionCount(address)\n }\n\n /**\n * @param block block number or block hash\n * @param prefetchTxs whether to prefetch transactions\n * @returns block information\n */\n public async getBlock(block: BlockTag | string, prefetchTxs?: boolean): Promise {\n return await this.jsonRpcProvider.getBlock(block, prefetchTxs)\n }\n\n /**\n * @returns block number\n */\n async getBlockNumber(): Promise {\n return await this.jsonRpcProvider.getBlockNumber()\n }\n\n /**\n * @param id transaction id\n * @returns transaction information\n */\n async getTransaction(id: TransactionId): Promise {\n return await this.jsonRpcProvider.getTransaction(id)\n }\n\n /**\n * @param id transaction id\n * @returns transaction receipt\n */\n async getTransactionReceipt(id: TransactionId): Promise {\n return await this.jsonRpcProvider.getTransactionReceipt(id)\n }\n\n /**\n * @param address wallet address\n * @param limit how many block to go back\n * @returns transactions\n */\n async getLastTransactions(\n address: WalletAddress,\n limit: number = 0\n ): Promise {\n const txPromises = []\n const blockPromises = []\n const transactions: TransactionResponse[] = []\n\n const block = await this.getBlock('pending')\n const blockNumber = block?.number ?? (await this.getBlockNumber())\n\n for (let i = blockNumber; i > blockNumber - limit; i--) {\n const block = await this.getBlock(i, true)\n if (block === null) {\n continue\n }\n blockPromises.push(block)\n }\n\n const blocks = await Promise.all(blockPromises)\n for (const block of blocks) {\n for (const txHash of block.transactions) {\n txPromises.push(this.getTransaction(txHash))\n }\n }\n\n const txs = await Promise.all(txPromises)\n for (const tx of txs) {\n if (\n tx?.from.toLowerCase() === address.toLowerCase() ||\n tx?.to?.toLowerCase() === address.toLowerCase()\n ) {\n transactions.push(tx)\n }\n }\n\n return transactions\n }\n\n /**\n * @param address wallet address\n * @param limit how many block to go back\n * @returns last transaction\n */\n async getLastTransaction(\n address: WalletAddress,\n limit: number = 0\n ): Promise {\n const block = await this.getBlock('pending')\n const blockNumber = block?.number ?? (await this.getBlockNumber())\n for (let i = blockNumber; i > blockNumber - limit; i--) {\n const block = await this.getBlock(i, true)\n if (block === null) {\n continue\n }\n for (const txId of block.transactions) {\n const tx = await this.getTransaction(txId)\n if (\n tx?.from.toLowerCase() === address.toLowerCase() ||\n tx?.to?.toLowerCase() === address.toLowerCase()\n ) {\n return tx\n }\n }\n }\n\n return null\n }\n\n /**\n * @param address wallet address\n * @returns balance of the wallet\n */\n async getBalance(address: WalletAddress): Promise {\n return await this.jsonRpcProvider.getBalance(address)\n }\n}\n","import axios from 'axios'\nimport { Ethers } from './Ethers'\nimport {\n ErrorTypeEnum,\n type NetworkConfigInterface,\n type ProviderInterface\n} from '@multiplechain/types'\n\nimport { checkWebSocket } from '@multiplechain/utils'\n\nexport interface EvmNetworkConfigInterface extends NetworkConfigInterface {\n id: number\n hexId?: string\n rpcUrl: string\n name?: string\n mainnetId?: number\n explorerUrl: string\n nativeCurrency: {\n name?: string\n symbol: string\n decimals: number\n }\n}\n\nexport class Provider implements ProviderInterface {\n /**\n * Network configuration of the provider\n */\n public network: EvmNetworkConfigInterface\n\n /**\n * Ethers service\n */\n public ethers: Ethers\n\n /**\n * Static instance of the provider\n */\n private static _instance: Provider\n\n /**\n * @param network - Network configuration of the provider\n */\n constructor(network: EvmNetworkConfigInterface) {\n this.update(network)\n }\n\n /**\n * Get the static instance of the provider\n * @returns Provider\n */\n static get instance(): Provider {\n if (Provider._instance === undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_NOT_INITIALIZED)\n }\n return Provider._instance\n }\n\n /**\n * Initialize the static instance of the provider\n * @param network - Network configuration of the provider\n */\n static initialize(network: EvmNetworkConfigInterface): void {\n if (Provider._instance !== undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_ALREADY_INITIALIZED)\n }\n Provider._instance = new Provider(network)\n }\n\n /**\n * Check RPC connection\n * @param url - RPC URL\n * @returns RPC connection status\n */\n async checkRpcConnection(url?: string): Promise {\n try {\n const response = await axios.post(url ?? this.network.rpcUrl, {\n jsonrpc: '2.0',\n method: 'eth_blockNumber',\n params: [],\n id: 1\n })\n\n if (response.status !== 200) {\n return new Error(response.statusText + ': ' + JSON.stringify(response.data))\n }\n\n return true\n } catch (error) {\n return error as any\n }\n }\n\n /**\n * Check WS connection\n * @param url - Websocket URL\n * @returns WS connection status\n */\n async checkWsConnection(url?: string): Promise {\n try {\n const result: any = await checkWebSocket(url ?? this.network.wsUrl ?? '')\n\n if (result instanceof Error) {\n return result\n }\n\n return true\n } catch (error) {\n return error as Error\n }\n }\n\n /**\n * Update network configuration of the provider\n * @param network - Network configuration of the provider\n */\n update(network: EvmNetworkConfigInterface): void {\n this.network = network\n Provider._instance = this\n this.ethers = new Ethers(network)\n }\n\n /**\n * Get the current network configuration is testnet or not\n * @returns Testnet status\n */\n isTestnet(): boolean {\n return this.network?.testnet ?? false\n }\n}\n","import {\n type WalletInterface,\n type WalletAdapterInterface,\n type WalletPlatformEnum,\n ErrorTypeEnum,\n type ConnectConfig,\n type UnknownConfig,\n type TransactionId,\n type SignedMessage,\n type WalletAddress\n} from '@multiplechain/types'\nimport { Provider } from '../services/Provider'\nimport type { EIP1193Provider } from './adapters/EIP6963'\nimport { toHex } from '@multiplechain/utils'\nimport type { TransactionSigner } from '../services/TransactionSigner'\n\nconst rejectMap = (error: any, reject: (a: any) => any): any => {\n console.error('MultipleChain EVM Wallet Error:', error)\n\n const errorMessage = String(error.message ?? '')\n if (\n errorMessage === 'Not supported chainId' ||\n errorMessage.includes('chain ID') ||\n errorMessage.includes('networkConfigurationId') ||\n errorMessage.includes('The Provider is not connected to the requested chain.')\n ) {\n return reject(new Error(ErrorTypeEnum.UNACCEPTED_CHAIN))\n } else if (\n error.code === 4001 ||\n error.error === 'Rejected by user' ||\n errorMessage === 'cancelled' ||\n errorMessage === 'User canceled' ||\n errorMessage === 'user reject this request' ||\n errorMessage === 'User rejected the transaction' ||\n errorMessage === 'An unexpected error occurred' ||\n errorMessage === 'User disapproved requested chains'\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_REQUEST_REJECTED))\n } else if (\n errorMessage.includes('User') ||\n errorMessage.includes('Rejected') ||\n errorMessage.includes('cancelled') ||\n errorMessage.includes('canceled') ||\n errorMessage.includes('rejected') ||\n errorMessage.includes('disapproved requested chains')\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_REQUEST_REJECTED))\n } else if (errorMessage.includes('Invalid RPC URL')) {\n return reject(new Error(ErrorTypeEnum.RPC_REQUEST_ERROR))\n } else if (\n error.code === -32000 ||\n errorMessage.includes('timeout') ||\n errorMessage.includes('request timed out')\n ) {\n return reject(new Error(ErrorTypeEnum.RPC_TIMEOUT))\n } else if (error.code === -32603 || error.code === -32602) {\n return reject(new Error(ErrorTypeEnum.TRANSACTION_CREATION_FAILED))\n } else if (error.code === -32601) {\n return reject(new Error(ErrorTypeEnum.RPC_REQUEST_ERROR))\n } else if (\n error.code === -32002 ||\n error.message === 'Already processing eth_requestAccounts. Please wait.'\n ) {\n return reject(new Error(ErrorTypeEnum.WALLET_ALREADY_PROCESSING))\n } else if (error.message === 'User closed modal') {\n return reject(new Error(ErrorTypeEnum.CLOSED_WALLETCONNECT_MODAL))\n } else if (error.message === 'transaction underpriced') {\n return reject(new Error(ErrorTypeEnum.TRANSACTION_CREATION_FAILED))\n }\n\n return reject(error)\n}\n\ntype WalletAdapter = WalletAdapterInterface & {\n provider?:\n | EIP1193Provider\n | { on: (eventName: string, callback: (...args: any[]) => void) => void }\n}\n\nexport interface RequestType {\n method: string\n params?: any[] | object\n}\n\nexport class Wallet implements WalletInterface {\n adapter: WalletAdapter\n\n walletProvider: EIP1193Provider\n\n networkProvider: Provider\n\n /**\n * @param adapter - Wallet adapter\n * @param provider - Blockchain network provider\n */\n constructor(adapter: WalletAdapter, provider?: Provider) {\n this.adapter = adapter\n this.networkProvider = provider ?? Provider.instance\n }\n\n /**\n * @param payload RequestType\n * @returns any\n */\n async request(payload: RequestType): Promise {\n const res = await this.walletProvider.request(payload)\n if (res?.error !== undefined) {\n const error = res.error as {\n code: number\n message: string\n }\n if (error.code === -32000) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(error.message)\n }\n return res\n }\n\n /**\n * @returns Wallet ID\n */\n getId(): string {\n return this.adapter.id\n }\n\n /**\n * @returns Wallet name\n */\n getName(): string {\n return this.adapter.name\n }\n\n /**\n * @returns Wallet icon\n */\n getIcon(): string {\n return this.adapter.icon\n }\n\n /**\n * @returns Wallet platforms\n */\n getPlatforms(): WalletPlatformEnum[] {\n return this.adapter.platforms\n }\n\n /**\n * @returns Wallet download link\n */\n getDownloadLink(): string | undefined {\n return this.adapter.downloadLink\n }\n\n /**\n * @param url - Deep link URL\n * @param config - Deep link configuration\n * @returns Deep link\n */\n createDeepLink(url: string, config?: UnknownConfig): string | null {\n if (this.adapter.createDeepLink === undefined) {\n return null\n }\n\n return this.adapter.createDeepLink(url, config)\n }\n\n /**\n * @param config - Connection configuration\n * @returns WalletAddress\n */\n async connect(config?: ConnectConfig): Promise {\n return await new Promise((resolve, reject) => {\n this.adapter\n .connect(this.networkProvider, config)\n .then(async (provider) => {\n this.walletProvider = provider\n\n const chainId = await this.getChainId()\n\n if (this.networkProvider.network.id !== chainId) {\n reject(ErrorTypeEnum.UNACCEPTED_CHAIN)\n return\n }\n\n resolve(await this.getAddress())\n })\n .catch((error) => {\n const customReject = (error: any): void => {\n if (error.message === ErrorTypeEnum.WALLET_REQUEST_REJECTED) {\n reject(new Error(ErrorTypeEnum.WALLET_CONNECT_REJECTED))\n } else {\n reject(error)\n }\n }\n rejectMap(error, customReject)\n })\n })\n }\n\n /**\n * @returns boolean\n */\n async isDetected(): Promise {\n return await this.adapter.isDetected()\n }\n\n /**\n * @returns boolean\n */\n async isConnected(): Promise {\n return await this.adapter.isConnected()\n }\n\n /**\n * @returns number\n */\n async getChainId(): Promise {\n const chainId = await this.request({ method: 'eth_chainId' })\n return typeof chainId === 'number' ? chainId : parseInt(chainId as string, 16)\n }\n\n /**\n * @returns WalletAddress\n */\n async getAddress(): Promise {\n return (await this.walletProvider.request({ method: 'eth_accounts' }))[0]\n }\n\n /**\n * @param message - Message to sign\n * @returns SignedMessage\n */\n async signMessage(message: string): Promise {\n const address = await this.getAddress()\n return await new Promise((resolve, reject) => {\n this.walletProvider\n .request({\n method: 'personal_sign',\n params: [message, address]\n })\n .then((signature: string) => {\n resolve(signature)\n })\n .catch((error) => {\n rejectMap(error, reject)\n })\n })\n }\n\n /**\n * @param transactionSigner - Transaction signer\n * @returns TransactionId\n */\n async sendTransaction(transactionSigner: TransactionSigner): Promise {\n return await new Promise((resolve, reject) => {\n const data = transactionSigner.getRawData()\n data.gas = toHex(data.gasLimit as number)\n delete data.chainId\n delete data.nonce\n delete data.gasLimit\n delete data.gasPrice\n this.walletProvider\n .request({\n method: 'eth_sendTransaction',\n params: [data]\n })\n .then((txHash: string) => {\n resolve(txHash)\n })\n .catch((error) => {\n rejectMap(error, reject)\n })\n })\n }\n\n /**\n * @param eventName - Event name\n * @param callback - Event callback\n */\n on(eventName: string, callback: (...args: any[]) => void): void {\n if (typeof this.walletProvider.on === 'function') {\n this.walletProvider.on(eventName, callback)\n }\n }\n}\n","export function defineChain(chain) {\n return {\n formatters: undefined,\n fees: undefined,\n serializers: undefined,\n ...chain,\n };\n}\n//# sourceMappingURL=defineChain.js.map","export const version = '2.21.43';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nlet errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath\n ? `${docsBaseUrl ?? 'https://viem.sh'}${docsPath}${docsSlug ? `#${docsSlug}` : ''}`\n : undefined,\n version: `viem@${version}`,\n};\nexport function setErrorConfig(config) {\n errorConfig = config;\n}\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath = (() => {\n if (args.cause instanceof BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsUrl ? [`Docs: ${docsUrl}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n ...(errorConfig.version ? [`Version: ${errorConfig.version}`] : []),\n ].join('\\n');\n super(message, args.cause ? { cause: args.cause } : undefined);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'BaseError'\n });\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version;\n }\n walk(fn) {\n return walk(this, fn);\n }\n}\nfunction walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err &&\n typeof err === 'object' &&\n 'cause' in err &&\n err.cause !== undefined)\n return walk(err.cause, fn);\n return fn ? null : err;\n}\n//# sourceMappingURL=base.js.map","import { BaseError } from './base.js';\nexport class IntegerOutOfRangeError extends BaseError {\n constructor({ max, min, signed, size, value, }) {\n super(`Number \"${value}\" is not in safe ${size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: 'IntegerOutOfRangeError' });\n }\n}\nexport class InvalidBytesBooleanError extends BaseError {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: 'InvalidBytesBooleanError',\n });\n }\n}\nexport class InvalidHexBooleanError extends BaseError {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: 'InvalidHexBooleanError' });\n }\n}\nexport class InvalidHexValueError extends BaseError {\n constructor(value) {\n super(`Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`, { name: 'InvalidHexValueError' });\n }\n}\nexport class SizeOverflowError extends BaseError {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: 'SizeOverflowError' });\n }\n}\n//# sourceMappingURL=encoding.js.map","export function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== 'string')\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n//# sourceMappingURL=isHex.js.map","import { isHex } from './isHex.js';\n/**\n * @description Retrieves the size of the value (in bytes).\n *\n * @param value The value (hex or byte array) to retrieve the size of.\n * @returns The size of the value (in bytes).\n */\nexport function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n}\n//# sourceMappingURL=size.js.map","export function trim(hexOrBytes, { dir = 'left' } = {}) {\n let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;\n let sliceLength = 0;\n for (let i = 0; i < data.length - 1; i++) {\n if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n sliceLength++;\n else\n break;\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right')\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n}\n//# sourceMappingURL=trim.js.map","import { BaseError } from './base.js';\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n constructor({ offset, position, size, }) {\n super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \"${offset}\" is out-of-bounds (size: ${size}).`, { name: 'SliceOffsetOutOfBoundsError' });\n }\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`, { name: 'SizeExceedsPaddingSizeError' });\n }\n}\nexport class InvalidBytesLengthError extends BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`, { name: 'InvalidBytesLengthError' });\n }\n}\n//# sourceMappingURL=data.js.map","import { SizeExceedsPaddingSizeError, } from '../../errors/data.js';\nexport function pad(hexOrBytes, { dir, size = 32 } = {}) {\n if (typeof hexOrBytes === 'string')\n return padHex(hexOrBytes, { dir, size });\n return padBytes(hexOrBytes, { dir, size });\n}\nexport function padHex(hex_, { dir, size = 32 } = {}) {\n if (size === null)\n return hex_;\n const hex = hex_.replace('0x', '');\n if (hex.length > size * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size,\n type: 'hex',\n });\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\nexport function padBytes(bytes, { dir, size = 32 } = {}) {\n if (size === null)\n return bytes;\n if (bytes.length > size)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size,\n type: 'bytes',\n });\n const paddedBytes = new Uint8Array(size);\n for (let i = 0; i < size; i++) {\n const padEnd = dir === 'right';\n paddedBytes[padEnd ? i : size - i - 1] =\n bytes[padEnd ? i : bytes.length - i - 1];\n }\n return paddedBytes;\n}\n//# sourceMappingURL=pad.js.map","import { IntegerOutOfRangeError, } from '../../errors/encoding.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Encodes a string, number, bigint, or ByteArray into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex\n * - Example: https://viem.sh/docs/utilities/toHex#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world')\n * // '0x48656c6c6f20776f726c6421'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex(420)\n * // '0x1a4'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world', { size: 32 })\n * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'\n */\nexport function toHex(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToHex(value, opts);\n if (typeof value === 'string') {\n return stringToHex(value, opts);\n }\n if (typeof value === 'boolean')\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n}\n/**\n * Encodes a boolean into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#booltohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true)\n * // '0x1'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(false)\n * // '0x0'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true, { size: 32 })\n * // '0x0000000000000000000000000000000000000000000000000000000000000001'\n */\nexport function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a bytes array into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#bytestohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function bytesToHex(value, opts = {}) {\n let string = '';\n for (let i = 0; i < value.length; i++) {\n string += hexes[value[i]];\n }\n const hex = `0x${string}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: 'right', size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a number or bigint into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#numbertohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420)\n * // '0x1a4'\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420, { size: 32 })\n * // '0x00000000000000000000000000000000000000000000000000000000000001a4'\n */\nexport function numberToHex(value_, opts = {}) {\n const { signed, size } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size) {\n if (signed)\n maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n else\n maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n }\n else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n if ((maxValue && value > maxValue) || value < minValue) {\n const suffix = typeof value_ === 'bigint' ? 'n' : '';\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : undefined,\n min: `${minValue}${suffix}`,\n signed,\n size,\n value: `${value_}${suffix}`,\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value).toString(16)}`;\n if (size)\n return pad(hex, { size });\n return hex;\n}\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#stringtohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n}\n//# sourceMappingURL=toHex.js.map","import { BaseError } from '../../errors/base.js';\nimport { isHex } from '../data/isHex.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nimport { numberToHex, } from './toHex.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes\n * - Example: https://viem.sh/docs/utilities/toBytes#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes('Hello world')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function toBytes(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts);\n if (typeof value === 'boolean')\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n}\n/**\n * Encodes a boolean into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes\n *\n * @param value Boolean value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true)\n * // Uint8Array([1])\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true, { size: 32 })\n * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n */\nexport function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n}\n// We use very optimized technique to convert hex string to byte array\nconst charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102,\n};\nfunction charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return undefined;\n}\n/**\n * Encodes a hex string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes\n *\n * @param hex Hex string to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: 'right', size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index = 0, j = 0; index < length; index++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));\n if (nibbleLeft === undefined || nibbleRight === undefined) {\n throw new BaseError(`Invalid byte sequence (\"${hexString[j - 2]}${hexString[j - 1]}\" in \"${hexString}\").`);\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n}\n/**\n * Encodes a number into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes\n *\n * @param value Number to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n}\n/**\n * Encodes a UTF-8 string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes\n *\n * @param value String to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function stringToBytes(value, opts = {}) {\n const bytes = encoder.encode(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: 'right', size: opts.size });\n }\n return bytes;\n}\n//# sourceMappingURL=toBytes.js.map","import { InvalidHexBooleanError, SizeOverflowError, } from '../../errors/encoding.js';\nimport { size as size_ } from '../data/size.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBytes } from './toBytes.js';\nexport function assertSize(hexOrBytes, { size }) {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n });\n}\n/**\n * Decodes a hex string into a string, number, bigint, boolean, or byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex\n * - Example: https://viem.sh/docs/utilities/fromHex#usage\n *\n * @param hex Hex string to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x1a4', 'number')\n * // 420\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c6421', 'string')\n * // 'Hello world'\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * to: 'string'\n * })\n * // 'Hello world'\n */\nexport function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return hexToNumber(hex, opts);\n if (to === 'bigint')\n return hexToBigInt(hex, opts);\n if (to === 'string')\n return hexToString(hex, opts);\n if (to === 'boolean')\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n}\n/**\n * Decodes a hex value into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x1a4', { signed: true })\n * // 420n\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420n\n */\nexport function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size = (hex.length - 2) / 2;\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;\n}\n/**\n * Decodes a hex value into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobool\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x01')\n * // true\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // true\n */\nexport function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === '0x00')\n return false;\n if (trim(hex) === '0x01')\n return true;\n throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a hex string into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x1a4')\n * // 420\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420\n */\nexport function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n}\n/**\n * Decodes a hex value into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextostring\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c6421')\n * // 'Hello world!'\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * })\n * // 'Hello world'\n */\nexport function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromHex.js.map","export function defineFormatter(type, format) {\n return ({ exclude, format: overrides, }) => {\n return {\n exclude,\n format: (args) => {\n const formatted = format(args);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args),\n };\n },\n type,\n };\n };\n}\n//# sourceMappingURL=formatter.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n};\nexport function formatTransaction(transaction) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber\n ? BigInt(transaction.blockNumber)\n : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas\n ? BigInt(transaction.maxFeePerBlobGas)\n : undefined,\n maxFeePerGas: transaction.maxFeePerGas\n ? BigInt(transaction.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n ? BigInt(transaction.maxPriorityFeePerGas)\n : undefined,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex\n ? Number(transaction.transactionIndex)\n : null,\n type: transaction.type\n ? transactionType[transaction.type]\n : undefined,\n typeHex: transaction.type ? transaction.type : undefined,\n value: transaction.value ? BigInt(transaction.value) : undefined,\n v: transaction.v ? BigInt(transaction.v) : undefined,\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(transaction.authorizationList);\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity)\n return Number(transaction.yParity);\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return undefined;\n })();\n if (transaction_.type === 'legacy') {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === 'eip2930') {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === 'eip1559') {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n contractAddress: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity),\n }));\n}\n//# sourceMappingURL=transaction.js.map","import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block) {\n const transactions = block.transactions?.map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : undefined,\n difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n excessBlobGas: block.excessBlobGas\n ? BigInt(block.excessBlobGas)\n : undefined,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : undefined,\n timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n transactions,\n totalDifficulty: block.totalDifficulty\n ? BigInt(block.totalDifficulty)\n : null,\n };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map","export function formatLog(log, { args, eventName, } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex\n ? Number(log.transactionIndex)\n : null,\n ...(eventName ? { args, eventName } : {}),\n };\n}\n//# sourceMappingURL=log.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nimport { formatLog } from './log.js';\nimport { transactionType } from './transaction.js';\nexport const receiptStatuses = {\n '0x0': 'reverted',\n '0x1': 'success',\n};\nexport function formatTransactionReceipt(transactionReceipt) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber\n ? BigInt(transactionReceipt.blockNumber)\n : null,\n contractAddress: transactionReceipt.contractAddress\n ? transactionReceipt.contractAddress\n : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed\n ? BigInt(transactionReceipt.cumulativeGasUsed)\n : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice\n ? BigInt(transactionReceipt.effectiveGasPrice)\n : null,\n gasUsed: transactionReceipt.gasUsed\n ? BigInt(transactionReceipt.gasUsed)\n : null,\n logs: transactionReceipt.logs\n ? transactionReceipt.logs.map((log) => formatLog(log))\n : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex\n ? hexToNumber(transactionReceipt.transactionIndex)\n : null,\n status: transactionReceipt.status\n ? receiptStatuses[transactionReceipt.status]\n : null,\n type: transactionReceipt.type\n ? transactionType[transactionReceipt.type] || transactionReceipt.type\n : null,\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n}\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter('transactionReceipt', formatTransactionReceipt);\n//# sourceMappingURL=transactionReceipt.js.map","import { bytesToHex, numberToHex } from '../encoding/toHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n};\nexport function formatTransactionRequest(request) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = request.blobs.map((x) => bytesToHex(x));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== 'undefined')\n rpcRequest.data = request.data;\n if (typeof request.from !== 'undefined')\n rpcRequest.from = request.from;\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== 'undefined')\n rpcRequest.to = request.to;\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n}\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter('transactionRequest', formatTransactionRequest);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.contractAddress,\n r: authorization.r,\n s: authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }));\n}\n//# sourceMappingURL=transactionRequest.js.map","export const maxInt8 = 2n ** (8n - 1n) - 1n;\nexport const maxInt16 = 2n ** (16n - 1n) - 1n;\nexport const maxInt24 = 2n ** (24n - 1n) - 1n;\nexport const maxInt32 = 2n ** (32n - 1n) - 1n;\nexport const maxInt40 = 2n ** (40n - 1n) - 1n;\nexport const maxInt48 = 2n ** (48n - 1n) - 1n;\nexport const maxInt56 = 2n ** (56n - 1n) - 1n;\nexport const maxInt64 = 2n ** (64n - 1n) - 1n;\nexport const maxInt72 = 2n ** (72n - 1n) - 1n;\nexport const maxInt80 = 2n ** (80n - 1n) - 1n;\nexport const maxInt88 = 2n ** (88n - 1n) - 1n;\nexport const maxInt96 = 2n ** (96n - 1n) - 1n;\nexport const maxInt104 = 2n ** (104n - 1n) - 1n;\nexport const maxInt112 = 2n ** (112n - 1n) - 1n;\nexport const maxInt120 = 2n ** (120n - 1n) - 1n;\nexport const maxInt128 = 2n ** (128n - 1n) - 1n;\nexport const maxInt136 = 2n ** (136n - 1n) - 1n;\nexport const maxInt144 = 2n ** (144n - 1n) - 1n;\nexport const maxInt152 = 2n ** (152n - 1n) - 1n;\nexport const maxInt160 = 2n ** (160n - 1n) - 1n;\nexport const maxInt168 = 2n ** (168n - 1n) - 1n;\nexport const maxInt176 = 2n ** (176n - 1n) - 1n;\nexport const maxInt184 = 2n ** (184n - 1n) - 1n;\nexport const maxInt192 = 2n ** (192n - 1n) - 1n;\nexport const maxInt200 = 2n ** (200n - 1n) - 1n;\nexport const maxInt208 = 2n ** (208n - 1n) - 1n;\nexport const maxInt216 = 2n ** (216n - 1n) - 1n;\nexport const maxInt224 = 2n ** (224n - 1n) - 1n;\nexport const maxInt232 = 2n ** (232n - 1n) - 1n;\nexport const maxInt240 = 2n ** (240n - 1n) - 1n;\nexport const maxInt248 = 2n ** (248n - 1n) - 1n;\nexport const maxInt256 = 2n ** (256n - 1n) - 1n;\nexport const minInt8 = -(2n ** (8n - 1n));\nexport const minInt16 = -(2n ** (16n - 1n));\nexport const minInt24 = -(2n ** (24n - 1n));\nexport const minInt32 = -(2n ** (32n - 1n));\nexport const minInt40 = -(2n ** (40n - 1n));\nexport const minInt48 = -(2n ** (48n - 1n));\nexport const minInt56 = -(2n ** (56n - 1n));\nexport const minInt64 = -(2n ** (64n - 1n));\nexport const minInt72 = -(2n ** (72n - 1n));\nexport const minInt80 = -(2n ** (80n - 1n));\nexport const minInt88 = -(2n ** (88n - 1n));\nexport const minInt96 = -(2n ** (96n - 1n));\nexport const minInt104 = -(2n ** (104n - 1n));\nexport const minInt112 = -(2n ** (112n - 1n));\nexport const minInt120 = -(2n ** (120n - 1n));\nexport const minInt128 = -(2n ** (128n - 1n));\nexport const minInt136 = -(2n ** (136n - 1n));\nexport const minInt144 = -(2n ** (144n - 1n));\nexport const minInt152 = -(2n ** (152n - 1n));\nexport const minInt160 = -(2n ** (160n - 1n));\nexport const minInt168 = -(2n ** (168n - 1n));\nexport const minInt176 = -(2n ** (176n - 1n));\nexport const minInt184 = -(2n ** (184n - 1n));\nexport const minInt192 = -(2n ** (192n - 1n));\nexport const minInt200 = -(2n ** (200n - 1n));\nexport const minInt208 = -(2n ** (208n - 1n));\nexport const minInt216 = -(2n ** (216n - 1n));\nexport const minInt224 = -(2n ** (224n - 1n));\nexport const minInt232 = -(2n ** (232n - 1n));\nexport const minInt240 = -(2n ** (240n - 1n));\nexport const minInt248 = -(2n ** (248n - 1n));\nexport const minInt256 = -(2n ** (256n - 1n));\nexport const maxUint8 = 2n ** 8n - 1n;\nexport const maxUint16 = 2n ** 16n - 1n;\nexport const maxUint24 = 2n ** 24n - 1n;\nexport const maxUint32 = 2n ** 32n - 1n;\nexport const maxUint40 = 2n ** 40n - 1n;\nexport const maxUint48 = 2n ** 48n - 1n;\nexport const maxUint56 = 2n ** 56n - 1n;\nexport const maxUint64 = 2n ** 64n - 1n;\nexport const maxUint72 = 2n ** 72n - 1n;\nexport const maxUint80 = 2n ** 80n - 1n;\nexport const maxUint88 = 2n ** 88n - 1n;\nexport const maxUint96 = 2n ** 96n - 1n;\nexport const maxUint104 = 2n ** 104n - 1n;\nexport const maxUint112 = 2n ** 112n - 1n;\nexport const maxUint120 = 2n ** 120n - 1n;\nexport const maxUint128 = 2n ** 128n - 1n;\nexport const maxUint136 = 2n ** 136n - 1n;\nexport const maxUint144 = 2n ** 144n - 1n;\nexport const maxUint152 = 2n ** 152n - 1n;\nexport const maxUint160 = 2n ** 160n - 1n;\nexport const maxUint168 = 2n ** 168n - 1n;\nexport const maxUint176 = 2n ** 176n - 1n;\nexport const maxUint184 = 2n ** 184n - 1n;\nexport const maxUint192 = 2n ** 192n - 1n;\nexport const maxUint200 = 2n ** 200n - 1n;\nexport const maxUint208 = 2n ** 208n - 1n;\nexport const maxUint216 = 2n ** 216n - 1n;\nexport const maxUint224 = 2n ** 224n - 1n;\nexport const maxUint232 = 2n ** 232n - 1n;\nexport const maxUint240 = 2n ** 240n - 1n;\nexport const maxUint248 = 2n ** 248n - 1n;\nexport const maxUint256 = 2n ** 256n - 1n;\n//# sourceMappingURL=number.js.map","import { maxUint16 } from '../../constants/number.js';\nexport const gasPerPubdataDefault = 50000n;\nexport const maxBytecodeSize = maxUint16 * 32n;\n//# sourceMappingURL=number.js.map","import { hexToBigInt, hexToNumber } from '../utils/encoding/fromHex.js';\nimport { hexToBytes } from '../utils/encoding/toBytes.js';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { defineBlock } from '../utils/formatters/block.js';\nimport { formatLog } from '../utils/formatters/log.js';\nimport { defineTransaction } from '../utils/formatters/transaction.js';\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js';\nimport { defineTransactionRequest } from '../utils/formatters/transactionRequest.js';\nimport { gasPerPubdataDefault } from './constants/number.js';\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n const formatted = formatters.transaction?.format(transaction);\n if (formatted.typeHex === '0x71')\n formatted.type = 'eip712';\n else if (formatted.typeHex === '0xff')\n formatted.type = 'priority';\n return formatted;\n });\n return {\n l1BatchNumber: args.l1BatchNumber\n ? hexToBigInt(args.l1BatchNumber)\n : null,\n l1BatchTimestamp: args.l1BatchTimestamp\n ? hexToBigInt(args.l1BatchTimestamp)\n : null,\n transactions,\n };\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === '0x71')\n transaction.type = 'eip712';\n else if (args.type === '0xff')\n transaction.type = 'priority';\n return {\n ...transaction,\n l1BatchNumber: args.l1BatchNumber\n ? hexToBigInt(args.l1BatchNumber)\n : null,\n l1BatchTxIndex: args.l1BatchTxIndex\n ? hexToBigInt(args.l1BatchTxIndex)\n : null,\n };\n },\n }),\n transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({\n format(args) {\n return {\n l1BatchNumber: args.l1BatchNumber\n ? hexToBigInt(args.l1BatchNumber)\n : null,\n l1BatchTxIndex: args.l1BatchTxIndex\n ? hexToBigInt(args.l1BatchTxIndex)\n : null,\n logs: args.logs.map((log) => {\n return {\n ...formatLog(log),\n l1BatchNumber: log.l1BatchNumber\n ? hexToBigInt(log.l1BatchNumber)\n : null,\n transactionLogIndex: hexToNumber(log.transactionLogIndex),\n logType: log.logType,\n };\n }),\n l2ToL1Logs: args.l2ToL1Logs.map((l2ToL1Log) => {\n return {\n blockNumber: hexToBigInt(l2ToL1Log.blockHash),\n blockHash: l2ToL1Log.blockHash,\n l1BatchNumber: hexToBigInt(l2ToL1Log.l1BatchNumber),\n transactionIndex: hexToBigInt(l2ToL1Log.transactionIndex),\n shardId: hexToBigInt(l2ToL1Log.shardId),\n isService: l2ToL1Log.isService,\n sender: l2ToL1Log.sender,\n key: l2ToL1Log.key,\n value: l2ToL1Log.value,\n transactionHash: l2ToL1Log.transactionHash,\n logIndex: hexToBigInt(l2ToL1Log.logIndex),\n };\n }),\n };\n },\n }),\n transactionRequest: /*#__PURE__*/ defineTransactionRequest({\n exclude: [\n 'customSignature',\n 'factoryDeps',\n 'gasPerPubdata',\n 'paymaster',\n 'paymasterInput',\n ],\n format(args) {\n if (args.gasPerPubdata ||\n (args.paymaster && args.paymasterInput) ||\n args.factoryDeps ||\n args.customSignature)\n return {\n eip712Meta: {\n ...(args.gasPerPubdata\n ? { gasPerPubdata: toHex(args.gasPerPubdata) }\n : { gasPerPubdata: toHex(gasPerPubdataDefault) }),\n ...(args.paymaster && args.paymasterInput\n ? {\n paymasterParams: {\n paymaster: args.paymaster,\n paymasterInput: Array.from(hexToBytes(args.paymasterInput)),\n },\n }\n : {}),\n ...(args.factoryDeps\n ? {\n factoryDeps: args.factoryDeps.map((dep) => Array.from(hexToBytes(dep))),\n }\n : {}),\n ...(args.customSignature\n ? {\n customSignature: Array.from(hexToBytes(args.customSignature)),\n }\n : {}),\n },\n type: '0x71',\n };\n return {};\n },\n }),\n};\n//# sourceMappingURL=formatters.js.map","export function concat(values) {\n if (typeof values[0] === 'string')\n return concatHex(values);\n return concatBytes(values);\n}\nexport function concatBytes(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n}\nexport function concatHex(values) {\n return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n//# sourceMappingURL=concat.js.map","import { BaseError } from './base.js';\nexport class NegativeOffsetError extends BaseError {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: 'NegativeOffsetError',\n });\n }\n}\nexport class PositionOutOfBoundsError extends BaseError {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: 'PositionOutOfBoundsError' });\n }\n}\nexport class RecursiveReadLimitExceededError extends BaseError {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: 'RecursiveReadLimitExceededError' });\n }\n}\n//# sourceMappingURL=cursor.js.map","import { NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError, } from '../errors/cursor.js';\nconst staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit,\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position,\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return ((this.dataView.getUint16(position) << 8) +\n this.dataView.getUint8(position + 2));\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => (this.position = oldPosition);\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n },\n};\nexport function createCursor(bytes, { recursiveReadLimit = 8_192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n}\n//# sourceMappingURL=cursor.js.map","import { BaseError } from '../../errors/base.js';\nimport { createCursor, } from '../cursor.js';\nimport { hexToBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nexport function toRlp(bytes, to = 'hex') {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === 'hex')\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n}\nexport function bytesToRlp(bytes, to = 'bytes') {\n return toRlp(bytes, to);\n}\nexport function hexToRlp(hex, to = 'hex') {\n return toRlp(hex, to);\n}\nfunction getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)));\n return getEncodableBytes(bytes);\n}\nfunction getEncodableList(list) {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength);\n }\n else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode } of list) {\n encode(cursor);\n }\n },\n };\n}\nfunction getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes);\n }\n else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length);\n cursor.pushBytes(bytes);\n }\n else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n },\n };\n}\nfunction getSizeOfLength(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError('Length is too large.');\n}\n//# sourceMappingURL=toRlp.js.map","export const etherUnits = {\n gwei: 9,\n wei: 18,\n};\nexport const gweiUnits = {\n ether: -9,\n wei: 9,\n};\nexport const weiUnits = {\n ether: -18,\n gwei: -9,\n};\n//# sourceMappingURL=unit.js.map","/**\n * Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..\n *\n * - Docs: https://viem.sh/docs/utilities/formatUnits\n *\n * @example\n * import { formatUnits } from 'viem'\n *\n * formatUnits(420000000000n, 9)\n * // '420'\n */\nexport function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith('-');\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, '0');\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals),\n ];\n fraction = fraction.replace(/(0+)$/, '');\n return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n//# sourceMappingURL=formatUnits.js.map","import { etherUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\n/**\n * Converts numerical wei to a string representation of ether.\n *\n * - Docs: https://viem.sh/docs/utilities/formatEther\n *\n * @example\n * import { formatEther } from 'viem'\n *\n * formatEther(1000000000000000000n)\n * // '1'\n */\nexport function formatEther(wei, unit = 'wei') {\n return formatUnits(wei, etherUnits[unit]);\n}\n//# sourceMappingURL=formatEther.js.map","import { gweiUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\n/**\n * Converts numerical wei to a string representation of gwei.\n *\n * - Docs: https://viem.sh/docs/utilities/formatGwei\n *\n * @example\n * import { formatGwei } from 'viem'\n *\n * formatGwei(1000000000n)\n * // '1'\n */\nexport function formatGwei(wei, unit = 'wei') {\n return formatUnits(wei, gweiUnits[unit]);\n}\n//# sourceMappingURL=formatGwei.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport function prettyPrint(args) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false)\n return null;\n return [key, value];\n })\n .filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n');\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super([\n 'Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.',\n 'Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.',\n ].join('\\n'), { name: 'FeeConflictError' });\n }\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n name: 'InvalidLegacyVError',\n });\n }\n}\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }) {\n super('Cannot infer a transaction type from provided transaction.', {\n metaMessages: [\n 'Provided Transaction:',\n '{',\n prettyPrint(transaction),\n '}',\n '',\n 'To infer the type, either provide:',\n '- a `type` to the Transaction, or',\n '- an EIP-1559 Transaction with `maxFeePerGas`, or',\n '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',\n '- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or',\n '- an EIP-7702 Transaction with `authorizationList`, or',\n '- a Legacy Transaction with `gasPrice`',\n ],\n name: 'InvalidSerializableTransactionError',\n });\n }\n}\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n constructor({ serializedType }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n name: 'InvalidSerializedTransactionType',\n });\n Object.defineProperty(this, \"serializedType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedType = serializedType;\n }\n}\nexport class InvalidSerializedTransactionError extends BaseError {\n constructor({ attributes, serializedTransaction, type, }) {\n const missing = Object.entries(attributes)\n .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n .filter(Boolean);\n super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n metaMessages: [\n `Serialized Transaction: \"${serializedTransaction}\"`,\n missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n ].filter(Boolean),\n name: 'InvalidSerializedTransactionError',\n });\n Object.defineProperty(this, \"serializedTransaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedTransaction = serializedTransaction;\n this.type = type;\n }\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: 'InvalidStorageKeySizeError' });\n }\n}\nexport class TransactionExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'TransactionExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, blockTag, hash, index, }) {\n let identifier = 'Transaction';\n if (blockTag && index !== undefined)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index}\"`;\n if (blockHash && index !== undefined)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index}\"`;\n if (blockNumber && index !== undefined)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index}\"`;\n if (hash)\n identifier = `Transaction with hash \"${hash}\"`;\n super(`${identifier} could not be found.`, {\n name: 'TransactionNotFoundError',\n });\n }\n}\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }) {\n super(`Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: 'TransactionReceiptNotFoundError',\n });\n }\n}\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }) {\n super(`Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`, { name: 'WaitForTransactionReceiptTimeoutError' });\n }\n}\n//# sourceMappingURL=transaction.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute commitments from a list of blobs.\n *\n * @example\n * ```ts\n * import { blobsToCommitments, toBlobs } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * ```\n */\nexport function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n const blobs = (typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x))\n : parameters.blobs);\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return (to === 'bytes'\n ? commitments\n : commitments.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToCommitments.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute the proofs for a list of blobs and their commitments.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n * ```\n */\nexport function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n const blobs = (typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x))\n : parameters.blobs);\n const commitments = (typeof parameters.commitments[0] === 'string'\n ? parameters.commitments.map((x) => hexToBytes(x))\n : parameters.commitments);\n const proofs = [];\n for (let i = 0; i < blobs.length; i++) {\n const blob = blobs[i];\n const commitment = commitments[i];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return (to === 'bytes'\n ? proofs\n : proofs.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToProofs.js.map","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nexport const byteSwapIfBE = isLE ? (n) => n : (n) => byteSwap(n);\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto && typeof crypto.randomBytes === 'function') {\n return crypto.randomBytes(bytesLength);\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n/**\n * Polyfill for Safari 14\n */\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n/**\n * Choice: a ? b : c\n */\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n/**\n * Majority function, true if any two inputs is true\n */\nexport const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_md.js.map","import { HashMD, Chi, Maj } from './_md.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nexport class SHA256 extends HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\n/**\n * SHA2-224 hash function\n */\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { sha256 as noble_sha256 } from '@noble/hashes/sha256';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function sha256(value, to_) {\n const to = to_ || 'hex';\n const bytes = noble_sha256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=sha256.js.map","import { bytesToHex } from '../encoding/toHex.js';\nimport { sha256 } from '../hash/sha256.js';\n/**\n * Transform a commitment to it's versioned hash.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * commitmentToVersionedHash,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const [commitment] = blobsToCommitments({ blobs, kzg })\n * const versionedHash = commitmentToVersionedHash({ commitment })\n * ```\n */\nexport function commitmentToVersionedHash(parameters) {\n const { commitment, version = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === 'string' ? 'hex' : 'bytes');\n const versionedHash = sha256(commitment, 'bytes');\n versionedHash.set([version], 0);\n return (to === 'bytes' ? versionedHash : bytesToHex(versionedHash));\n}\n//# sourceMappingURL=commitmentToVersionedHash.js.map","import { commitmentToVersionedHash, } from './commitmentToVersionedHash.js';\n/**\n * Transform a list of commitments to their versioned hashes.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * commitmentsToVersionedHashes,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const versionedHashes = commitmentsToVersionedHashes({ commitments })\n * ```\n */\nexport function commitmentsToVersionedHashes(parameters) {\n const { commitments, version } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === 'string' ? 'hex' : 'bytes');\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version,\n }));\n }\n return hashes;\n}\n//# sourceMappingURL=commitmentsToVersionedHashes.js.map","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n/** Blob limit per transaction. */\nconst blobsPerTransaction = 6;\n/** The number of bytes in a BLS scalar field element. */\nexport const bytesPerFieldElement = 32;\n/** The number of field elements in a blob. */\nexport const fieldElementsPerBlob = 4096;\n/** The number of bytes in a blob. */\nexport const bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n/** Blob bytes limit per transaction. */\nexport const maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction -\n // terminator byte (0x80).\n 1 -\n // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n//# sourceMappingURL=blob.js.map","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\nexport const versionedHashVersionKzg = 1;\n//# sourceMappingURL=kzg.js.map","import { versionedHashVersionKzg } from '../constants/kzg.js';\nimport { BaseError } from './base.js';\nexport class BlobSizeTooLargeError extends BaseError {\n constructor({ maxSize, size }) {\n super('Blob size is too large.', {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size} bytes`],\n name: 'BlobSizeTooLargeError',\n });\n }\n}\nexport class EmptyBlobError extends BaseError {\n constructor() {\n super('Blob data must not be empty.', { name: 'EmptyBlobError' });\n }\n}\nexport class InvalidVersionedHashSizeError extends BaseError {\n constructor({ hash, size, }) {\n super(`Versioned hash \"${hash}\" size is invalid.`, {\n metaMessages: ['Expected: 32', `Received: ${size}`],\n name: 'InvalidVersionedHashSizeError',\n });\n }\n}\nexport class InvalidVersionedHashVersionError extends BaseError {\n constructor({ hash, version, }) {\n super(`Versioned hash \"${hash}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version}`,\n ],\n name: 'InvalidVersionedHashVersionError',\n });\n }\n}\n//# sourceMappingURL=blob.js.map","import { bytesPerBlob, bytesPerFieldElement, fieldElementsPerBlob, maxBytesPerTransaction, } from '../../constants/blob.js';\nimport { BlobSizeTooLargeError, EmptyBlobError, } from '../../errors/blob.js';\nimport { createCursor } from '../cursor.js';\nimport { size } from '../data/size.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Transforms arbitrary data to blobs.\n *\n * @example\n * ```ts\n * import { toBlobs, stringToHex } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * ```\n */\nexport function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === 'string' ? 'hex' : 'bytes');\n const data = (typeof parameters.data === 'string'\n ? hexToBytes(parameters.data)\n : parameters.data);\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_,\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size = 0;\n while (size < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n // Push a zero byte so the field element doesn't overflow the BLS modulus.\n blob.pushByte(0x00);\n // Push the current segment of data bytes.\n blob.pushBytes(bytes);\n // If we detect that the current segment of data bytes is less than 31 bytes,\n // we can stop processing and push a terminator byte to indicate the end of the blob.\n if (bytes.length < 31) {\n blob.pushByte(0x80);\n active = false;\n break;\n }\n size++;\n position += 31;\n }\n blobs.push(blob);\n }\n return (to === 'bytes'\n ? blobs.map((x) => x.bytes)\n : blobs.map((x) => bytesToHex(x.bytes)));\n}\n//# sourceMappingURL=toBlobs.js.map","import { blobsToCommitments, } from './blobsToCommitments.js';\nimport { blobsToProofs } from './blobsToProofs.js';\nimport { toBlobs } from './toBlobs.js';\n/**\n * Transforms arbitrary data (or blobs, commitments, & proofs) into a sidecar array.\n *\n * @example\n * ```ts\n * import { toBlobSidecars, stringToHex } from 'viem'\n *\n * const sidecars = toBlobSidecars({ data: stringToHex('hello world') })\n * ```\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * toBlobs,\n * blobsToProofs,\n * toBlobSidecars,\n * stringToHex\n * } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n *\n * const sidecars = toBlobSidecars({ blobs, commitments, proofs })\n * ```\n */\nexport function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data: data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg: kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg: kzg, to });\n const sidecars = [];\n for (let i = 0; i < blobs.length; i++)\n sidecars.push({\n blob: blobs[i],\n commitment: commitments[i],\n proof: proofs[i],\n });\n return sidecars;\n}\n//# sourceMappingURL=toBlobSidecars.js.map","import { toHex } from '../../../utils/encoding/toHex.js';\nimport { toYParitySignatureArray } from '../../../utils/transaction/serializeTransaction.js';\n/*\n * Serializes an EIP-7702 authorization list.\n */\nexport function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { contractAddress, chainId, nonce, ...signature } = authorization;\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : '0x',\n contractAddress,\n nonce ? toHex(nonce) : '0x',\n ...toYParitySignatureArray({}, signature),\n ]);\n }\n return serializedAuthorizationList;\n}\n//# sourceMappingURL=serializeAuthorizationList.js.map","import { BaseError } from './base.js';\nexport class InvalidAddressError extends BaseError {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n '- Address must be a hex value of 20 bytes (40 hex characters).',\n '- Address must match its checksum counterpart.',\n ],\n name: 'InvalidAddressError',\n });\n }\n}\n//# sourceMappingURL=address.js.map","import { BaseError } from './base.js';\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({ blockNumber, chain, contract, }) {\n super(`Chain \"${chain.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ...(blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber\n ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,\n ]\n : [\n `- The chain does not have the contract \"${contract.name}\" configured.`,\n ]),\n ],\n name: 'ChainDoesNotSupportContract',\n });\n }\n}\nexport class ChainMismatchError extends BaseError {\n constructor({ chain, currentChainId, }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n name: 'ChainMismatchError',\n });\n }\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super([\n 'No chain was provided to the request.',\n 'Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.',\n ].join('\\n'), {\n name: 'ChainNotFoundError',\n });\n }\n}\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.', {\n name: 'ClientChainNotConfiguredError',\n });\n }\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }) {\n super(typeof chainId === 'number'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.', { name: 'InvalidChainIdError' });\n }\n}\n//# sourceMappingURL=chain.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport class ExecutionRevertedError extends BaseError {\n constructor({ cause, message, } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '');\n super(`Execution reverted ${reason ? `with reason: ${reason}` : 'for an unknown reason'}.`, {\n cause,\n name: 'ExecutionRevertedError',\n });\n }\n}\nObject.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n});\nObject.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n});\nexport class FeeCapTooHighError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: 'FeeCapTooHighError',\n });\n }\n}\nObject.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n});\nexport class FeeCapTooLowError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: 'FeeCapTooLowError',\n });\n }\n}\nObject.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n});\nexport class NonceTooHighError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause, name: 'NonceTooHighError' });\n }\n}\nObject.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n});\nexport class NonceTooLowError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'), { cause, name: 'NonceTooLowError' });\n }\n}\nObject.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n});\nexport class NonceMaxValueError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause, name: 'NonceMaxValueError' });\n }\n}\nObject.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n});\nexport class InsufficientFundsError extends BaseError {\n constructor({ cause } = {}) {\n super([\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'), {\n cause,\n metaMessages: [\n 'This error could arise when the account does not have enough funds to:',\n ' - pay for the total gas fee,',\n ' - pay for the value to send.',\n ' ',\n 'The cost of the transaction is calculated as `gas * gas fee + value`, where:',\n ' - `gas` is the amount of gas needed for transaction to execute,',\n ' - `gas fee` is the gas fee,',\n ' - `value` is the amount of ether to send to the recipient.',\n ],\n name: 'InsufficientFundsError',\n });\n }\n}\nObject.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n});\nexport class IntrinsicGasTooHighError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: 'IntrinsicGasTooHighError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n});\nexport class IntrinsicGasTooLowError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {\n cause,\n name: 'IntrinsicGasTooLowError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n});\nexport class TransactionTypeNotSupportedError extends BaseError {\n constructor({ cause }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n name: 'TransactionTypeNotSupportedError',\n });\n }\n}\nObject.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n});\nexport class TipAboveFeeCapError extends BaseError {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}).`,\n ].join('\\n'), {\n cause,\n name: 'TipAboveFeeCapError',\n });\n }\n}\nObject.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n});\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: 'UnknownNodeError',\n });\n }\n}\n//# sourceMappingURL=node.js.map","/**\n * Map with a LRU (Least recently used) policy.\n *\n * @link https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU\n */\nexport class LruMap extends Map {\n constructor(size) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== undefined) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n}\n//# sourceMappingURL=lru.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, isLE, byteSwap32, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n if (!isLE)\n byteSwap32(this.state32);\n keccakP(this.state32, this.rounds);\n if (!isLE)\n byteSwap32(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { keccak_256 } from '@noble/hashes/sha3';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function keccak256(value, to_) {\n const to = to_ || 'hex';\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=keccak256.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { stringToBytes, } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { LruMap } from '../lru.js';\nimport { isAddress } from './isAddress.js';\nconst checksumAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function checksumAddress(address_, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId\n ? `${chainId}${address_.toLowerCase()}`\n : address_.substring(2).toLowerCase();\n const hash = keccak256(stringToBytes(hexAddress), 'bytes');\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split('');\n for (let i = 0; i < 40; i += 2) {\n if (hash[i >> 1] >> 4 >= 8 && address[i]) {\n address[i] = address[i].toUpperCase();\n }\n if ((hash[i >> 1] & 0x0f) >= 8 && address[i + 1]) {\n address[i + 1] = address[i + 1].toUpperCase();\n }\n }\n const result = `0x${address.join('')}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n}\nexport function getAddress(address, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n}\n//# sourceMappingURL=getAddress.js.map","import { LruMap } from '../lru.js';\nimport { checksumAddress } from './getAddress.js';\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/;\n/** @internal */\nexport const isAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey))\n return isAddressCache.get(cacheKey);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey, result);\n return result;\n}\n//# sourceMappingURL=isAddress.js.map","import { SliceOffsetOutOfBoundsError, } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict,\n });\n return sliceBytes(value, start, end, {\n strict,\n });\n}\nfunction assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: size(value),\n });\n}\nfunction assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n });\n }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n//# sourceMappingURL=slice.js.map","import { versionedHashVersionKzg } from '../../constants/kzg.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError, } from '../../errors/blob.js';\nimport { InvalidChainIdError, } from '../../errors/chain.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { hexToNumber } from '../encoding/fromHex.js';\nexport function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { contractAddress, chainId } = authorization;\n if (!isAddress(contractAddress))\n throw new InvalidAddressError({ address: contractAddress });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash of blobVersionedHashes) {\n const size_ = size(hash);\n const version = hexToNumber(slice(hash, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash, size: size_ });\n if (version !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash,\n version,\n });\n }\n }\n assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\nexport function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.');\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\nexport function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== 'undefined' && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.');\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\n//# sourceMappingURL=assertTransaction.js.map","import { InvalidSerializableTransactionError, } from '../../errors/transaction.js';\nexport function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== 'undefined')\n return 'eip7702';\n if (typeof transaction.blobs !== 'undefined' ||\n typeof transaction.blobVersionedHashes !== 'undefined' ||\n typeof transaction.maxFeePerBlobGas !== 'undefined' ||\n typeof transaction.sidecars !== 'undefined')\n return 'eip4844';\n if (typeof transaction.maxFeePerGas !== 'undefined' ||\n typeof transaction.maxPriorityFeePerGas !== 'undefined') {\n return 'eip1559';\n }\n if (typeof transaction.gasPrice !== 'undefined') {\n if (typeof transaction.accessList !== 'undefined')\n return 'eip2930';\n return 'legacy';\n }\n throw new InvalidSerializableTransactionError({ transaction });\n}\n//# sourceMappingURL=getTransactionType.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { InvalidStorageKeySizeError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\n/*\n * Serialize an EIP-2930 access list\n * @remarks\n * Use to create a transaction serializer with support for EIP-2930 access lists\n *\n * @param accessList - Array of objects of address and arrays of Storage Keys\n * @throws InvalidAddressError, InvalidStorageKeySizeError\n * @returns Array of hex strings\n */\nexport function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i = 0; i < accessList.length; i++) {\n const { address, storageKeys } = accessList[i];\n for (let j = 0; j < storageKeys.length; j++) {\n if (storageKeys[j].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n}\n//# sourceMappingURL=serializeAccessList.js.map","import { InvalidLegacyVError, } from '../../errors/transaction.js';\nimport { blobsToCommitments, } from '../blob/blobsToCommitments.js';\nimport { blobsToProofs, } from '../blob/blobsToProofs.js';\nimport { commitmentsToVersionedHashes, } from '../blob/commitmentsToVersionedHashes.js';\nimport { toBlobSidecars, } from '../blob/toBlobSidecars.js';\nimport { concatHex } from '../data/concat.js';\nimport { trim } from '../data/trim.js';\nimport { bytesToHex, toHex } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { serializeAuthorizationList, } from '../../experimental/eip7702/utils/serializeAuthorizationList.js';\nimport { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionEIP4844, assertTransactionEIP7702, assertTransactionLegacy, } from './assertTransaction.js';\nimport { getTransactionType, } from './getTransactionType.js';\nimport { serializeAccessList, } from './serializeAccessList.js';\nexport function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === 'eip1559')\n return serializeTransactionEIP1559(transaction, signature);\n if (type === 'eip2930')\n return serializeTransactionEIP2930(transaction, signature);\n if (type === 'eip4844')\n return serializeTransactionEIP4844(transaction, signature);\n if (type === 'eip7702')\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n}\nfunction serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n '0x04',\n toRlp([\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature),\n ]),\n ]);\n}\nfunction serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n // If `blobs` are passed, we will need to compute the KZG commitments & proofs.\n if (transaction.blobs &&\n (typeof blobVersionedHashes === 'undefined' ||\n typeof sidecars === 'undefined')) {\n const blobs = (typeof transaction.blobs[0] === 'string'\n ? transaction.blobs\n : transaction.blobs.map((x) => bytesToHex(x)));\n const kzg = transaction.kzg;\n const commitments = blobsToCommitments({\n blobs,\n kzg,\n });\n if (typeof blobVersionedHashes === 'undefined')\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments,\n });\n if (typeof sidecars === 'undefined') {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n sidecars = toBlobSidecars({ blobs, commitments, proofs });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n maxFeePerBlobGas ? toHex(maxFeePerBlobGas) : '0x',\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature),\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i = 0; i < sidecars.length; i++) {\n const { blob, commitment, proof } = sidecars[i];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n '0x03',\n sidecars\n ? // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n : // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ];\n return concatHex([\n '0x02',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n gasPrice ? toHex(gasPrice) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ];\n return concatHex([\n '0x01',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? toHex(nonce) : '0x',\n gasPrice ? toHex(gasPrice) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n ];\n if (signature) {\n const v = (() => {\n // EIP-155 (inferred chainId)\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n // EIP-155 (explicit chainId)\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n // Pre-EIP-155 (no chainId)\n const v = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v)\n throw new InvalidLegacyVError({ v: signature.v });\n return v;\n })();\n const r = trim(signature.r);\n const s = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n toHex(v),\n r === '0x00' ? '0x' : r,\n s === '0x00' ? '0x' : s,\n ];\n }\n else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n toHex(chainId),\n '0x',\n '0x',\n ];\n }\n return toRlp(serializedTransaction);\n}\nexport function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v, yParity } = signature;\n if (typeof signature.r === 'undefined')\n return [];\n if (typeof signature.s === 'undefined')\n return [];\n if (typeof v === 'undefined' && typeof yParity === 'undefined')\n return [];\n const r = trim(signature.r);\n const s = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === 'number')\n return yParity ? toHex(1) : '0x';\n if (v === 0n)\n return '0x';\n if (v === 1n)\n return toHex(1);\n return v === 27n ? '0x' : toHex(1);\n })();\n return [yParity_, r === '0x00' ? '0x' : r, s === '0x00' ? '0x' : s];\n}\n//# sourceMappingURL=serializeTransaction.js.map","import { BaseError } from '../../errors/base.js';\nexport class InvalidEip712TransactionError extends BaseError {\n constructor() {\n super([\n 'Transaction is not an EIP712 transaction.',\n '',\n 'Transaction must:',\n ' - include `type: \"eip712\"`',\n ' - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`',\n ].join('\\n'), { name: 'InvalidEip712TransactionError' });\n }\n}\n//# sourceMappingURL=transaction.js.map","export function isEIP712Transaction(transaction) {\n if (transaction.type === 'eip712')\n return true;\n if (('customSignature' in transaction && transaction.customSignature) ||\n ('paymaster' in transaction && transaction.paymaster) ||\n ('paymasterInput' in transaction && transaction.paymasterInput) ||\n ('gasPerPubdata' in transaction &&\n typeof transaction.gasPerPubdata === 'bigint') ||\n ('factoryDeps' in transaction && transaction.factoryDeps))\n return true;\n return false;\n}\n//# sourceMappingURL=isEip712Transaction.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { InvalidChainIdError } from '../../errors/chain.js';\nimport { isAddress } from '../../utils/address/isAddress.js';\nimport { InvalidEip712TransactionError } from '../errors/transaction.js';\nimport { isEIP712Transaction } from './isEip712Transaction.js';\nexport function assertEip712Transaction(transaction) {\n const { chainId, to, from, paymaster, paymasterInput } = transaction;\n if (!isEIP712Transaction(transaction))\n throw new InvalidEip712TransactionError();\n if (!chainId || chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (from && !isAddress(from))\n throw new InvalidAddressError({ address: from });\n if (paymaster && !isAddress(paymaster))\n throw new InvalidAddressError({ address: paymaster });\n if (paymaster && !paymasterInput) {\n throw new BaseError('`paymasterInput` must be provided when `paymaster` is defined');\n }\n if (!paymaster && paymasterInput) {\n throw new BaseError('`paymaster` must be provided when `paymasterInput` is defined');\n }\n}\n//# sourceMappingURL=assertEip712Transaction.js.map","import { concatHex } from '../utils/data/concat.js';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { toRlp } from '../utils/encoding/toRlp.js';\nimport { serializeTransaction as serializeTransaction_ } from '../utils/transaction/serializeTransaction.js';\nimport { gasPerPubdataDefault } from './constants/number.js';\nimport { assertEip712Transaction } from './utils/assertEip712Transaction.js';\nimport { isEIP712Transaction } from './utils/isEip712Transaction.js';\nexport function serializeTransaction(transaction, signature) {\n if (isEIP712Transaction(transaction))\n return serializeTransactionEIP712(transaction);\n return serializeTransaction_(transaction, signature);\n}\nexport const serializers = {\n transaction: serializeTransaction,\n};\nfunction serializeTransactionEIP712(transaction) {\n const { chainId, gas, nonce, to, from, value, maxFeePerGas, maxPriorityFeePerGas, customSignature, factoryDeps, paymaster, paymasterInput, gasPerPubdata, data, } = transaction;\n assertEip712Transaction(transaction);\n const serializedTransaction = [\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x0',\n toHex(chainId),\n toHex(''),\n toHex(''),\n toHex(chainId),\n from ?? '0x',\n gasPerPubdata ? toHex(gasPerPubdata) : toHex(gasPerPubdataDefault),\n factoryDeps ?? [],\n customSignature ?? '0x', // EIP712 signature\n paymaster && paymasterInput ? [paymaster, paymasterInput] : [],\n ];\n return concatHex([\n '0x71',\n toRlp(serializedTransaction),\n ]);\n}\n//# sourceMappingURL=serializers.js.map","import { BaseError } from '../../errors/base.js';\nexport class BytecodeLengthExceedsMaxSizeError extends BaseError {\n constructor({ givenLength, maxBytecodeSize, }) {\n super(`Bytecode cannot be longer than ${maxBytecodeSize} bytes. Given length: ${givenLength}`, { name: 'BytecodeLengthExceedsMaxSizeError' });\n }\n}\nexport class BytecodeLengthInWordsMustBeOddError extends BaseError {\n constructor({ givenLengthInWords }) {\n super(`Bytecode length in 32-byte words must be odd. Given length in words: ${givenLengthInWords}`, { name: 'BytecodeLengthInWordsMustBeOddError' });\n }\n}\nexport class BytecodeLengthMustBeDivisibleBy32Error extends BaseError {\n constructor({ givenLength }) {\n super(`The bytecode length in bytes must be divisible by 32. Given length: ${givenLength}`, { name: 'BytecodeLengthMustBeDivisibleBy32Error' });\n }\n}\n//# sourceMappingURL=bytecode.js.map","import { pad } from '../../utils/data/pad.js';\nimport { toBytes } from '../../utils/encoding/toBytes.js';\nimport { sha256 } from '../../utils/hash/sha256.js';\nimport { maxBytecodeSize } from '../constants/number.js';\nimport { BytecodeLengthExceedsMaxSizeError, BytecodeLengthInWordsMustBeOddError, BytecodeLengthMustBeDivisibleBy32Error, } from '../errors/bytecode.js';\nexport function hashBytecode(bytecode) {\n const bytecodeBytes = toBytes(bytecode);\n if (bytecodeBytes.length % 32 !== 0)\n throw new BytecodeLengthMustBeDivisibleBy32Error({\n givenLength: bytecodeBytes.length,\n });\n if (bytecodeBytes.length > maxBytecodeSize)\n throw new BytecodeLengthExceedsMaxSizeError({\n givenLength: bytecodeBytes.length,\n maxBytecodeSize,\n });\n const hashStr = sha256(bytecodeBytes);\n const hash = toBytes(hashStr);\n // Note that the length of the bytecode\n // should be provided in 32-byte words.\n const bytecodeLengthInWords = bytecodeBytes.length / 32;\n if (bytecodeLengthInWords % 2 === 0) {\n throw new BytecodeLengthInWordsMustBeOddError({\n givenLengthInWords: bytecodeLengthInWords,\n });\n }\n const bytecodeLength = toBytes(bytecodeLengthInWords);\n // The bytecode should always take the first 2 bytes of the bytecode hash,\n // so we pad it from the left in case the length is smaller than 2 bytes.\n const bytecodeLengthPadded = pad(bytecodeLength, { size: 2 });\n const codeHashVersion = new Uint8Array([1, 0]);\n hash.set(codeHashVersion, 0);\n hash.set(bytecodeLengthPadded, 2);\n return hash;\n}\n//# sourceMappingURL=hashBytecode.js.map","import { toHex } from '../../utils/encoding/toHex.js';\nimport { gasPerPubdataDefault } from '../constants/number.js';\nimport { assertEip712Transaction } from './assertEip712Transaction.js';\nimport { hashBytecode } from './hashBytecode.js';\nexport const getEip712Domain = (transaction) => {\n assertEip712Transaction(transaction);\n const message = transactionToMessage(transaction);\n return {\n domain: {\n name: 'zkSync',\n version: '2',\n chainId: transaction.chainId,\n },\n types: {\n Transaction: [\n { name: 'txType', type: 'uint256' },\n { name: 'from', type: 'uint256' },\n { name: 'to', type: 'uint256' },\n { name: 'gasLimit', type: 'uint256' },\n { name: 'gasPerPubdataByteLimit', type: 'uint256' },\n { name: 'maxFeePerGas', type: 'uint256' },\n { name: 'maxPriorityFeePerGas', type: 'uint256' },\n { name: 'paymaster', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'value', type: 'uint256' },\n { name: 'data', type: 'bytes' },\n { name: 'factoryDeps', type: 'bytes32[]' },\n { name: 'paymasterInput', type: 'bytes' },\n ],\n },\n primaryType: 'Transaction',\n message: message,\n };\n};\n//////////////////////////////////////////////////////////////////////////////\n// Utilities\nfunction transactionToMessage(transaction) {\n const { gas, nonce, to, from, value, maxFeePerGas, maxPriorityFeePerGas, factoryDeps, paymaster, paymasterInput, gasPerPubdata, data, } = transaction;\n return {\n txType: 113n,\n from: BigInt(from),\n to: to ? BigInt(to) : 0n,\n gasLimit: gas ?? 0n,\n gasPerPubdataByteLimit: gasPerPubdata ?? gasPerPubdataDefault,\n maxFeePerGas: maxFeePerGas ?? 0n,\n maxPriorityFeePerGas: maxPriorityFeePerGas ?? 0n,\n paymaster: paymaster ? BigInt(paymaster) : 0n,\n nonce: nonce ? BigInt(nonce) : 0n,\n value: value ?? 0n,\n data: data ? data : '0x0',\n factoryDeps: factoryDeps?.map((dep) => toHex(hashBytecode(dep))) ?? [],\n paymasterInput: paymasterInput ? paymasterInput : '0x',\n };\n}\n//# sourceMappingURL=getEip712Domain.js.map","import { formatters } from './formatters.js';\nimport { serializers } from './serializers.js';\nimport { getEip712Domain } from './utils/getEip712Domain.js';\nexport const chainConfig = {\n formatters,\n serializers,\n custom: {\n getEip712Domain,\n },\n};\n//# sourceMappingURL=chainConfig.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const abstractTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 11_124,\n name: 'Abstract Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://api.testnet.abs.xyz'] },\n },\n blockExplorers: {\n default: {\n name: 'Abstract Block Explorer',\n url: 'https://explorer.testnet.abs.xyz',\n },\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: '0xF9cda624FBC7e059355ce98a31693d299FACd963',\n blockCreated: 358349,\n },\n universalSignatureVerifier: {\n address: '0xfB688330379976DA81eB64Fe4BF50d7401763B9C',\n blockCreated: 431682,\n },\n },\n});\n//# sourceMappingURL=abstractTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const acala = /*#__PURE__*/ defineChain({\n id: 787,\n name: 'Acala',\n network: 'acala',\n nativeCurrency: {\n name: 'Acala',\n symbol: 'ACA',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://eth-rpc-acala.aca-api.network'],\n webSocket: ['wss://eth-rpc-acala.aca-api.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Acala Blockscout',\n url: 'https://blockscout.acala.network',\n apiUrl: 'https://blockscout.acala.network/api',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=acala.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const acria = /*#__PURE__*/ defineChain({\n id: 47,\n name: 'Acria IntelliChain',\n nativeCurrency: {\n decimals: 18,\n name: 'ACRIA',\n symbol: 'ACRIA',\n },\n rpcUrls: {\n default: {\n http: ['https://aic.acria.ai'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Acria Explorer',\n url: 'https://explorer.acria.ai',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=acria.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const aioz = /*#__PURE__*/ defineChain({\n id: 168,\n name: 'AIOZ Network',\n nativeCurrency: {\n decimals: 18,\n name: 'AIOZ',\n symbol: 'AIOZ',\n },\n rpcUrls: {\n default: {\n http: ['https://eth-dataseed.aioz.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'AIOZ Explorer',\n url: 'https://explorer.aioz.network',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=aioz.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const alienx = /*#__PURE__*/ defineChain({\n id: 10241024,\n name: 'AlienX Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.alienxchain.io/http'] },\n },\n blockExplorers: {\n default: {\n name: 'AlienX Explorer',\n url: 'https://explorer.alienxchain.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=alienX.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const alienxHalTestnet = /*#__PURE__*/ defineChain({\n id: 10241025,\n name: 'ALIENX Hal Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://hal-rpc.alienxchain.io/http'] },\n },\n blockExplorers: {\n default: {\n name: 'AlienX Explorer',\n url: 'https://hal-explorer.alienxchain.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=alienXHalTestnet.js.map","/**\n * Predeploy contracts for OP Stack.\n * @see https://github.com/ethereum-optimism/optimism/blob/develop/specs/predeploys.md\n */\nexport const contracts = {\n gasPriceOracle: { address: '0x420000000000000000000000000000000000000F' },\n l1Block: { address: '0x4200000000000000000000000000000000000015' },\n l2CrossDomainMessenger: {\n address: '0x4200000000000000000000000000000000000007',\n },\n l2Erc721Bridge: { address: '0x4200000000000000000000000000000000000014' },\n l2StandardBridge: { address: '0x4200000000000000000000000000000000000010' },\n l2ToL1MessagePasser: {\n address: '0x4200000000000000000000000000000000000016',\n },\n};\n//# sourceMappingURL=contracts.js.map","import { hexToBigInt } from '../utils/encoding/fromHex.js';\nimport { defineBlock } from '../utils/formatters/block.js';\nimport { defineTransaction, formatTransaction, } from '../utils/formatters/transaction.js';\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js';\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n const formatted = formatTransaction(transaction);\n if (formatted.typeHex === '0x7e') {\n formatted.isSystemTx = transaction.isSystemTx;\n formatted.mint = transaction.mint\n ? hexToBigInt(transaction.mint)\n : undefined;\n formatted.sourceHash = transaction.sourceHash;\n formatted.type = 'deposit';\n }\n return formatted;\n });\n return {\n transactions,\n stateRoot: args.stateRoot,\n };\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === '0x7e') {\n transaction.isSystemTx = args.isSystemTx;\n transaction.mint = args.mint ? hexToBigInt(args.mint) : undefined;\n transaction.sourceHash = args.sourceHash;\n transaction.type = 'deposit';\n }\n return transaction;\n },\n }),\n transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({\n format(args) {\n return {\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null,\n };\n },\n }),\n};\n//# sourceMappingURL=formatters.js.map","import { InvalidAddressError } from '../errors/address.js';\nimport { isAddress } from '../utils/address/isAddress.js';\nimport { concatHex } from '../utils/data/concat.js';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { toRlp } from '../utils/encoding/toRlp.js';\nimport { serializeTransaction as serializeTransaction_, } from '../utils/transaction/serializeTransaction.js';\nexport function serializeTransaction(transaction, signature) {\n if (isDeposit(transaction))\n return serializeTransactionDeposit(transaction);\n return serializeTransaction_(transaction, signature);\n}\nexport const serializers = {\n transaction: serializeTransaction,\n};\nfunction serializeTransactionDeposit(transaction) {\n assertTransactionDeposit(transaction);\n const { sourceHash, data, from, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from,\n to ?? '0x',\n mint ? toHex(mint) : '0x',\n value ? toHex(value) : '0x',\n gas ? toHex(gas) : '0x',\n isSystemTx ? '0x1' : '0x',\n data ?? '0x',\n ];\n return concatHex([\n '0x7e',\n toRlp(serializedTransaction),\n ]);\n}\nfunction isDeposit(transaction) {\n if (transaction.type === 'deposit')\n return true;\n if (typeof transaction.sourceHash !== 'undefined')\n return true;\n return false;\n}\nexport function assertTransactionDeposit(transaction) {\n const { from, to } = transaction;\n if (from && !isAddress(from))\n throw new InvalidAddressError({ address: from });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n}\n//# sourceMappingURL=serializers.js.map","import { contracts } from './contracts.js';\nimport { formatters } from './formatters.js';\nimport { serializers } from './serializers.js';\nexport const chainConfig = {\n contracts,\n formatters,\n serializers,\n};\n//# sourceMappingURL=chainConfig.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const ancient8 = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 888888888,\n name: 'Ancient8',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.ancient8.gg'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ancient8 explorer',\n url: 'https://scan.ancient8.gg',\n apiUrl: 'https://scan.ancient8.gg/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0xB09DC08428C8b4EFB4ff9C0827386CDF34277996',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68',\n blockCreated: 19070571,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xd5e3eDf5b68135D559D572E26bF863FBC1950033',\n blockCreated: 19070571,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=ancient8.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const ancient8Sepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 28122024,\n name: 'Ancient8 Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpcv2-testnet.ancient8.gg'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ancient8 Celestia Testnet explorer',\n url: 'https://scanv2-testnet.ancient8.gg',\n apiUrl: 'https://scanv2-testnet.ancient8.gg/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB',\n },\n },\n portal: {\n [sourceId]: {\n address: '0xfa1d9E26A6aCD7b22115D27572c1221B9803c960',\n blockCreated: 4972908,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xF6Bc0146d3c74D48306e79Ae134A260E418C9335',\n blockCreated: 4972908,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=ancient8Sepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const anvil = /*#__PURE__*/ defineChain({\n id: 31_337,\n name: 'Anvil',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['http://127.0.0.1:8545'],\n webSocket: ['ws://127.0.0.1:8545'],\n },\n },\n});\n//# sourceMappingURL=anvil.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 42_161; // Arbitrum One\nexport const apeChain = /*#__PURE__*/ defineChain({\n id: 33139,\n name: 'Ape Chain',\n nativeCurrency: {\n name: 'ApeCoin',\n symbol: 'APE',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.apechain.com/http'],\n webSocket: ['wss://rpc.apechain.com/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Apescan',\n url: 'https://apescan.io',\n apiUrl: 'https://api.apescan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 20889,\n },\n },\n sourceId,\n});\n//# sourceMappingURL=apeChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const apexTestnet = /*#__PURE__*/ defineChain({\n id: 3993,\n name: 'APEX Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.apexlayer.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://exp-testnet.apexlayer.xyz',\n apiUrl: 'https://exp-testnet.apexlayer.xyz/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xf7642be33a6b18D16a995657adb5a68CD0438aE2',\n blockCreated: 283775,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=apexTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const arbitrum = /*#__PURE__*/ defineChain({\n id: 42_161,\n name: 'Arbitrum One',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://arb1.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://arbiscan.io',\n apiUrl: 'https://api.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 7654707,\n },\n },\n});\n//# sourceMappingURL=arbitrum.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const arbitrumGoerli = /*#__PURE__*/ defineChain({\n id: 421_613,\n name: 'Arbitrum Goerli',\n nativeCurrency: {\n name: 'Arbitrum Goerli Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://goerli-rollup.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://goerli.arbiscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 88114,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=arbitrumGoerli.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const arbitrumNova = /*#__PURE__*/ defineChain({\n id: 42_170,\n name: 'Arbitrum Nova',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://nova.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://nova.arbiscan.io',\n apiUrl: 'https://api-nova.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1746963,\n },\n },\n});\n//# sourceMappingURL=arbitrumNova.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const arbitrumSepolia = /*#__PURE__*/ defineChain({\n id: 421_614,\n name: 'Arbitrum Sepolia',\n nativeCurrency: {\n name: 'Arbitrum Sepolia Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rollup.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://sepolia.arbiscan.io',\n apiUrl: 'https://api-sepolia.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 81930,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=arbitrumSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const areonNetwork = /*#__PURE__*/ defineChain({\n id: 463,\n name: 'Areon Network',\n nativeCurrency: { decimals: 18, name: 'AREA', symbol: 'AREA' },\n rpcUrls: {\n default: {\n http: ['https://mainnet-rpc.areon.network'],\n webSocket: ['wss://mainnet-ws.areon.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Areonscan',\n url: 'https://areonscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 353286,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=areonNetwork.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const areonNetworkTestnet = /*#__PURE__*/ defineChain({\n id: 462,\n name: 'Areon Network Testnet',\n nativeCurrency: { decimals: 18, name: 'TAREA', symbol: 'TAREA' },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.areon.network'],\n webSocket: ['wss://testnet-ws.areon.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Areonscan',\n url: 'https://areonscan.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=areonNetworkTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const artelaTestnet = /*#__PURE__*/ defineChain({\n id: 11822,\n name: 'Artela Testnet',\n nativeCurrency: { name: 'ART', symbol: 'ART', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://betanet-rpc1.artela.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Artela',\n url: 'https://betanet-scan.artela.network',\n apiUrl: 'https://betanet-scan.artela.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7',\n blockCreated: 7001871,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=artelaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const assetChain = /*#__PURE__*/ defineChain({\n id: 42_420,\n name: 'AssetChain Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Real World Asset',\n symbol: 'RWA',\n },\n rpcUrls: {\n default: { http: ['https://mainnet-rpc.assetchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Asset Chain Explorer',\n url: 'https://scan.assetchain.org',\n apiUrl: 'https://scan.assetchain.org/api',\n },\n },\n testnet: false,\n contracts: {},\n});\n//# sourceMappingURL=assetChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const assetChainTestnet = /*#__PURE__*/ defineChain({\n id: 42_421,\n name: 'AssetChain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Real World Asset',\n symbol: 'RWA',\n },\n rpcUrls: {\n default: { http: ['https://enugu-rpc.assetchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Asset Chain Testnet Explorer',\n url: 'https://scan-testnet.assetchain.org',\n apiUrl: 'https://scan-testnet.assetchain.org/api',\n },\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: '0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea',\n blockCreated: 17177,\n },\n },\n});\n//# sourceMappingURL=assetChainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const astar = /*#__PURE__*/ defineChain({\n id: 592,\n name: 'Astar',\n network: 'astar-mainnet',\n nativeCurrency: {\n name: 'Astar',\n symbol: 'ASTR',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://astar.api.onfinality.io/public'] },\n },\n blockExplorers: {\n default: {\n name: 'Astar Subscan',\n url: 'https://astar.subscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 761794,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=astar.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const astarZkEVM = /*#__PURE__*/ defineChain({\n id: 3_776,\n name: 'Astar zkEVM',\n network: 'AstarZkEVM',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-zkevm.astar.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Astar zkEVM Explorer',\n url: 'https://astar-zkevm.explorer.startale.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 93528,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=astarZkEVM.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const astarZkyoto = /*#__PURE__*/ defineChain({\n id: 6_038_361,\n name: 'Astar zkEVM Testnet zKyoto',\n network: 'zKyoto',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.startale.com/zkyoto'],\n },\n },\n blockExplorers: {\n default: {\n name: 'zKyoto Explorer',\n url: 'https://zkyoto.explorer.startale.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 196153,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=astarZkyoto.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const atletaOlympia = /*#__PURE__*/ defineChain({\n id: 2340,\n name: 'Atleta Olympia',\n nativeCurrency: { decimals: 18, name: 'Atla', symbol: 'ATLA' },\n rpcUrls: {\n default: {\n http: [\n 'https://testnet-rpc.atleta.network:9944',\n 'https://testnet-rpc.atleta.network',\n ],\n ws: ['wss://testnet-rpc.atleta.network:9944'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Atleta Olympia Explorer',\n url: 'https://blockscout.atleta.network',\n apiUrl: 'https://blockscout.atleta.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x1472ec6392180fb84F345d2455bCC75B26577115',\n blockCreated: 1076473,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=atletaOlympia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const aurora = /*#__PURE__*/ defineChain({\n id: 1313161554,\n name: 'Aurora',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://mainnet.aurora.dev'] },\n },\n blockExplorers: {\n default: {\n name: 'Aurorascan',\n url: 'https://aurorascan.dev',\n apiUrl: 'https://aurorascan.dev/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 62907816,\n },\n },\n});\n//# sourceMappingURL=aurora.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const auroraTestnet = /*#__PURE__*/ defineChain({\n id: 1313161555,\n name: 'Aurora Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://testnet.aurora.dev'] },\n },\n blockExplorers: {\n default: {\n name: 'Aurorascan',\n url: 'https://testnet.aurorascan.dev',\n apiUrl: 'https://testnet.aurorascan.dev/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=auroraTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const auroria = /*#__PURE__*/ defineChain({\n id: 205205,\n name: 'Auroria Testnet',\n network: 'auroria',\n nativeCurrency: {\n name: 'Auroria Stratis',\n symbol: 'tSTRAX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://auroria.rpc.stratisevm.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Auroria Testnet Explorer',\n url: 'https://auroria.explorer.stratisevm.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=auroria.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const avalanche = /*#__PURE__*/ defineChain({\n id: 43_114,\n name: 'Avalanche',\n nativeCurrency: {\n decimals: 18,\n name: 'Avalanche',\n symbol: 'AVAX',\n },\n rpcUrls: {\n default: { http: ['https://api.avax.network/ext/bc/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'SnowTrace',\n url: 'https://snowtrace.io',\n apiUrl: 'https://api.snowtrace.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 11907934,\n },\n },\n});\n//# sourceMappingURL=avalanche.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const avalancheFuji = /*#__PURE__*/ defineChain({\n id: 43_113,\n name: 'Avalanche Fuji',\n nativeCurrency: {\n decimals: 18,\n name: 'Avalanche Fuji',\n symbol: 'AVAX',\n },\n rpcUrls: {\n default: { http: ['https://api.avax-test.network/ext/bc/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'SnowTrace',\n url: 'https://testnet.snowtrace.io',\n apiUrl: 'https://api-testnet.snowtrace.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 7096959,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=avalancheFuji.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 8453; // base\nexport const b3 = /*#__PURE__*/ defineChain({\n id: 8333,\n name: 'B3',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://mainnet-rpc.b3.fun/http'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer.b3.fun',\n },\n },\n sourceId,\n});\n//# sourceMappingURL=b3.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 168_587_773; // base-sepolia\nexport const b3Sepolia = /*#__PURE__*/ defineChain({\n id: 1993,\n name: 'B3 Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia.b3.fun/http'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://sepolia.explorer.b3.fun',\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=b3Sepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bahamut = /*#__PURE__*/ defineChain({\n id: 5165,\n network: 'bahamut',\n name: 'Bahamut',\n nativeCurrency: { name: 'Fasttoken', symbol: 'FTN', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc1.bahamut.io',\n 'https://bahamut-rpc.publicnode.com',\n 'https://rpc2.bahamut.io',\n ],\n webSocket: [\n 'wss://ws1.sahara.bahamutchain.com',\n 'wss://bahamut-rpc.publicnode.com',\n 'wss://ws2.sahara.bahamutchain.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ftnscan',\n url: 'https://www.ftnscan.com',\n apiUrl: 'https://www.ftnscan.com/api',\n },\n },\n});\n//# sourceMappingURL=bahamut.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const base = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 8453,\n name: 'Base',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.base.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://basescan.org',\n apiUrl: 'https://api.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x56315b90c40730925ec5485cf004d835058518A0',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 5022,\n },\n portal: {\n [sourceId]: {\n address: '0x49048044D57e1C92A77f79988d21Fa8fAF74E97e',\n blockCreated: 17482143,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x3154Cf16ccdb4C6d922629664174b904d80F2C35',\n blockCreated: 17482143,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=base.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 5; // goerli\nexport const baseGoerli = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 84531,\n name: 'Base Goerli',\n nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://goerli.base.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://goerli.basescan.org',\n apiUrl: 'https://goerli.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x2A35891ff30313CcFa6CE88dcf3858bb075A2298',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1376988,\n },\n portal: {\n [sourceId]: {\n address: '0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=baseGoerli.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const baseSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 84532,\n network: 'base-sepolia',\n name: 'Base Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.base.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://sepolia.basescan.org',\n apiUrl: 'https://api-sepolia.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x49f53e41452c74589e85ca1677426ba426459e85',\n blockCreated: 4446677,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xfd0Bf71F60660E2f608ed56e1659C450eB113120',\n blockCreated: 4446677,\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1059647,\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=baseSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const beam = /*#__PURE__*/ defineChain({\n id: 4337,\n name: 'Beam',\n network: 'beam',\n nativeCurrency: {\n decimals: 18,\n name: 'Beam',\n symbol: 'BEAM',\n },\n rpcUrls: {\n default: {\n http: ['https://build.onbeam.com/rpc'],\n webSocket: ['wss://build.onbeam.com/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Beam Explorer',\n url: 'https://subnets.avax.network/beam',\n },\n },\n contracts: {\n multicall3: {\n address: '0x4956f15efdc3dc16645e90cc356eafa65ffc65ec',\n blockCreated: 1,\n },\n },\n});\n//# sourceMappingURL=beam.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const beamTestnet = /*#__PURE__*/ defineChain({\n id: 13337,\n name: 'Beam Testnet',\n network: 'beam',\n nativeCurrency: {\n decimals: 18,\n name: 'Beam',\n symbol: 'BEAM',\n },\n rpcUrls: {\n default: {\n http: ['https://build.onbeam.com/rpc/testnet'],\n webSocket: ['wss://build.onbeam.com/ws/testnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Beam Explorer',\n url: 'https://subnets-test.avax.network/beam',\n },\n },\n contracts: {\n multicall3: {\n address: '0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e',\n blockCreated: 3,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=beamTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bearNetworkChainMainnet = /*#__PURE__*/ defineChain({\n id: 641230,\n name: 'Bear Network Chain Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'BearNetworkChain',\n symbol: 'BRNKC',\n },\n rpcUrls: {\n default: { http: ['https://brnkc-mainnet.bearnetwork.net'] },\n },\n blockExplorers: {\n default: {\n name: 'BrnkScan',\n url: 'https://brnkscan.bearnetwork.net',\n apiUrl: 'https://brnkscan.bearnetwork.net/api',\n },\n },\n});\n//# sourceMappingURL=bearNetworkChainMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bearNetworkChainTestnet = /*#__PURE__*/ defineChain({\n id: 751230,\n name: 'Bear Network Chain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'tBRNKC',\n symbol: 'tBRNKC',\n },\n rpcUrls: {\n default: { http: ['https://brnkc-test.bearnetwork.net'] },\n },\n blockExplorers: {\n default: {\n name: 'BrnkTestScan',\n url: 'https://brnktest-scan.bearnetwork.net',\n apiUrl: 'https://brnktest-scan.bearnetwork.net/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bearNetworkChainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const berachainTestnet = /*#__PURE__*/ defineChain({\n id: 80085,\n name: 'Berachain Artio',\n nativeCurrency: {\n decimals: 18,\n name: 'BERA Token',\n symbol: 'BERA',\n },\n rpcUrls: {\n default: { http: ['https://artio.rpc.berachain.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Berachain',\n url: 'https://artio.beratrail.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=berachainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const berachainTestnetbArtio = /*#__PURE__*/ defineChain({\n id: 80084,\n name: 'Berachain bArtio',\n nativeCurrency: {\n decimals: 18,\n name: 'BERA Token',\n symbol: 'BERA',\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 109269,\n },\n },\n rpcUrls: {\n default: { http: ['https://bartio.rpc.berachain.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Berachain bArtio Beratrail',\n url: 'https://bartio.beratrail.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=berachainTestnetbArtio.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bevmMainnet = /*#__PURE__*/ defineChain({\n id: 11501,\n name: 'BEVM Mainnet',\n nativeCurrency: { name: 'Bitcoin', symbol: 'BTC', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc-mainnet-1.bevm.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Bevmscan',\n url: 'https://scan-mainnet.bevm.io',\n apiUrl: 'https://scan-mainnet-api.bevm.io/api',\n },\n },\n});\n//# sourceMappingURL=bevmMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bifrost = /*#__PURE__*/ defineChain({\n id: 3068,\n name: 'Bifrost Mainnet',\n nativeCurrency: { name: 'BFC', symbol: 'BFC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://public-01.mainnet.bifrostnetwork.com/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bifrost Blockscout',\n url: 'https://explorer.mainnet.bifrostnetwork.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=bifrost.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitkub = /*#__PURE__*/ defineChain({\n id: 96,\n name: 'Bitkub',\n nativeCurrency: { name: 'Bitkub', symbol: 'KUB', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.bitkubchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bitkub Chain Mainnet Explorer',\n url: 'https://www.bkcscan.com',\n apiUrl: 'https://www.bkcscan.com/api',\n },\n },\n});\n//# sourceMappingURL=bitkub.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitkubTestnet = /*#__PURE__*/ defineChain({\n id: 25925,\n name: 'Bitkub Testnet',\n network: 'Bitkub Testnet',\n nativeCurrency: { name: 'Bitkub Test', symbol: 'tKUB', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.bitkubchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bitkub Chain Testnet Explorer',\n url: 'https://testnet.bkcscan.com',\n apiUrl: 'https://testnet.bkcscan.com/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bitkubTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitlayer = /*#__PURE__*/ defineChain({\n id: 200901,\n name: 'Bitlayer Mainnet',\n nativeCurrency: {\n name: 'BTC',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.bitlayer.org'],\n webSocket: ['wss://ws.bitlayer.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'bitlayer mainnet scan',\n url: 'https://www.btrscan.com',\n },\n },\n});\n//# sourceMappingURL=bitlayer.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitlayerTestnet = /*#__PURE__*/ defineChain({\n id: 200810,\n name: 'Bitlayer Testnet',\n nativeCurrency: {\n name: 'BTC',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.bitlayer.org'],\n webSocket: ['wss://testnet-ws.bitlayer.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'bitlayer testnet scan',\n url: 'https://testnet.btrscan.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bitlayerTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitrock = /*#__PURE__*/ defineChain({\n id: 7171,\n name: 'Bitrock Mainnet',\n nativeCurrency: { name: 'BROCK', symbol: 'BROCK', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://brockrpc.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bitrock Explorer',\n url: 'https://explorer.bit-rock.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=bitrock.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitTorrent = /*#__PURE__*/ defineChain({\n id: 199,\n name: 'BitTorrent',\n network: 'bittorrent-chain-mainnet',\n nativeCurrency: { name: 'BitTorrent', symbol: 'BTT', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.bittorrentchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Bttcscan',\n url: 'https://bttcscan.com',\n apiUrl: 'https://api.bttcscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 31078552,\n },\n },\n});\n//# sourceMappingURL=bitTorrent.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bitTorrentTestnet = /*#__PURE__*/ defineChain({\n id: 1028,\n name: 'BitTorrent Chain Testnet',\n network: 'bittorrent-chain-testnet',\n nativeCurrency: { name: 'BitTorrent', symbol: 'BTT', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://testrpc.bittorrentchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Bttcscan',\n url: 'https://testnet.bttcscan.com',\n apiUrl: 'https://testnet.bttcscan.com/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bitTorrentTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const blast = /*#__PURE__*/ defineChain({\n id: 81457,\n name: 'Blast',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://rpc.blast.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Blastscan',\n url: 'https://blastscan.io',\n apiUrl: 'https://api.blastscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 212929,\n },\n },\n sourceId,\n});\n//# sourceMappingURL=blast.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const blastSepolia = /*#__PURE__*/ defineChain({\n id: 168_587_773,\n name: 'Blast Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia.blast.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blastscan',\n url: 'https://sepolia.blastscan.io',\n apiUrl: 'https://api-sepolia.blastscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 756690,\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=blastSepolia.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const bob = defineChain({\n ...chainConfig,\n id: 60808,\n name: 'BOB',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.gobob.xyz'],\n webSocket: ['wss://rpc.gobob.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'BOB Explorer',\n url: 'https://explorer.gobob.xyz',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 23131,\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xdDa53E23f8a32640b04D7256e651C1db98dB11C1',\n blockCreated: 4462615,\n },\n },\n portal: {\n [sourceId]: {\n address: '0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E',\n blockCreated: 4462615,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=bob.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const boba = /*#__PURE__*/ defineChain({\n id: 288,\n name: 'Boba Network',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://mainnet.boba.network'] },\n },\n blockExplorers: {\n default: {\n name: 'BOBAScan',\n url: 'https://bobascan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 446859,\n },\n },\n});\n//# sourceMappingURL=boba.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bobaSepolia = /*#__PURE__*/ defineChain({\n id: 28882,\n name: 'Boba Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://sepolia.boba.network'] },\n },\n blockExplorers: {\n default: {\n name: 'BOBAScan',\n url: 'https://testnet.bobascan.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bobaSepolia.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const bobSepolia = defineChain({\n ...chainConfig,\n id: 808813,\n name: 'BOB Sepolia',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://bob-sepolia.rpc.gobob.xyz'],\n webSocket: ['wss://bob-sepolia.rpc.gobob.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'BOB Sepolia Explorer',\n url: 'https://bob-sepolia.explorer.gobob.xyz',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 35677,\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x14D0069452b4AE2b250B395b8adAb771E4267d2f',\n blockCreated: 4462615,\n },\n },\n portal: {\n [sourceId]: {\n address: '0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4',\n blockCreated: 4462615,\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=bobSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const botanixTestnet = /*#__PURE__*/ defineChain({\n id: 3636,\n name: 'Botanix Testnet',\n nativeCurrency: { name: 'Botanix', symbol: 'BTC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://poa-node.botanixlabs.dev'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://blockscout.botanixlabs.dev',\n apiUrl: 'https://blockscout.botanixlabs.dev',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=botanixTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bounceBit = /*#__PURE__*/ defineChain({\n id: 6001,\n name: 'BounceBit Mainnet',\n nativeCurrency: { name: 'BounceBit', symbol: 'BB', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://fullnode-mainnet.bouncebitapi.com'] },\n },\n blockExplorers: {\n default: {\n name: 'BB Scan',\n url: 'https://bbscan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=bounceBit.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bounceBitTestnet = /*#__PURE__*/ defineChain({\n id: 6000,\n name: 'BounceBit Testnet',\n nativeCurrency: { name: 'BounceBit', symbol: 'BB', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://fullnode-testnet.bouncebitapi.com'] },\n },\n blockExplorers: {\n default: {\n name: 'BB Scan',\n url: 'https://testnet.bbscan.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bounceBitTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bronos = /*#__PURE__*/ defineChain({\n id: 1039,\n name: 'Bronos',\n nativeCurrency: {\n decimals: 18,\n name: 'BRO',\n symbol: 'BRO',\n },\n rpcUrls: {\n default: { http: ['https://evm.bronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'BronoScan',\n url: 'https://broscan.bronos.org',\n },\n },\n});\n//# sourceMappingURL=bronos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bronosTestnet = /*#__PURE__*/ defineChain({\n id: 1038,\n name: 'Bronos Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Bronos Coin',\n symbol: 'tBRO',\n },\n rpcUrls: {\n default: { http: ['https://evm-testnet.bronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'BronoScan',\n url: 'https://tbroscan.bronos.org',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bronosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bsc = /*#__PURE__*/ defineChain({\n id: 56,\n name: 'BNB Smart Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'BNB',\n symbol: 'BNB',\n },\n rpcUrls: {\n default: { http: ['https://rpc.ankr.com/bsc'] },\n },\n blockExplorers: {\n default: {\n name: 'BscScan',\n url: 'https://bscscan.com',\n apiUrl: 'https://api.bscscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 15921452,\n },\n },\n});\n//# sourceMappingURL=bsc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bscGreenfield = /*#__PURE__*/ defineChain({\n id: 1017,\n name: 'BNB Greenfield Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'BNB',\n symbol: 'BNB',\n },\n rpcUrls: {\n default: { http: ['https://greenfield-chain.bnbchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'BNB Greenfield Mainnet Scan',\n url: 'https://greenfieldscan.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=bscGreenfield.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bscTestnet = /*#__PURE__*/ defineChain({\n id: 97,\n name: 'Binance Smart Chain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'BNB',\n symbol: 'tBNB',\n },\n rpcUrls: {\n default: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] },\n },\n blockExplorers: {\n default: {\n name: 'BscScan',\n url: 'https://testnet.bscscan.com',\n apiUrl: 'https://api-testnet.bscscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 17422483,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bscTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bsquared = /*#__PURE__*/ defineChain({\n id: 223,\n name: 'B2',\n nativeCurrency: {\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.bsquared.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://explorer.bsquared.network',\n },\n },\n});\n//# sourceMappingURL=bsquared.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bsquaredTestnet = /*#__PURE__*/ defineChain({\n id: 1123,\n name: 'B2 Testnet',\n nativeCurrency: {\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.bsquared.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://testnet-explorer.bsquared.network',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bsquaredTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const btr = /*#__PURE__*/ defineChain({\n id: 200901,\n name: 'Bitlayer',\n nativeCurrency: {\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc.bitlayer.org',\n 'https://rpc.bitlayer-rpc.com',\n 'https://rpc.ankr.com/bitlayer',\n ],\n webSocket: ['wss://ws.bitlayer.org', 'wss://ws.bitlayer-rpc.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bitlayer(BTR) Scan',\n url: 'https://www.btrscan.com',\n },\n },\n});\n//# sourceMappingURL=btr.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const btrTestnet = /*#__PURE__*/ defineChain({\n id: 200810,\n name: 'Bitlayer Testnet',\n nativeCurrency: {\n name: 'Bitcoin',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.bitlayer.org'],\n webSocket: [\n 'wss://testnet-ws.bitlayer.org',\n 'wss://testnet-ws.bitlayer-rpc.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Bitlayer(BTR) Scan',\n url: 'https://testnet.btrscan.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=btrTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bxn = /*#__PURE__*/ defineChain({\n id: 4999,\n name: 'BlackFort Exchange Network',\n nativeCurrency: { name: 'BlackFort Token', symbol: 'BXN', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.blackfort.network/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer.blackfort.network',\n apiUrl: 'https://explorer.blackfort.network/api',\n },\n },\n});\n//# sourceMappingURL=bxn.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bxnTestnet = /*#__PURE__*/ defineChain({\n id: 4777,\n name: 'BlackFort Exchange Network Testnet',\n nativeCurrency: {\n name: 'BlackFort Testnet Token',\n symbol: 'TBXN',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet.blackfort.network/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://testnet-explorer.blackfort.network',\n apiUrl: 'https://testnet-explorer.blackfort.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=bxnTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cannon = /*#__PURE__*/ defineChain({\n id: 13_370,\n name: 'Cannon',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['http://127.0.0.1:8545'] },\n },\n});\n//# sourceMappingURL=cannon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const canto = /*#__PURE__*/ defineChain({\n id: 7_700,\n name: 'Canto',\n nativeCurrency: {\n decimals: 18,\n name: 'Canto',\n symbol: 'CANTO',\n },\n rpcUrls: {\n default: { http: ['https://canto.gravitychain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Tuber.Build (Blockscout)',\n url: 'https://tuber.build',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 2905789,\n },\n },\n});\n//# sourceMappingURL=canto.js.map","export const fees = {\n /*\n * Estimates the fees per gas for a transaction.\n \n * If the transaction is to be paid in a token (feeCurrency is present) then the fees\n * are estimated in the value of the token. Otherwise falls back to the default\n * estimation by returning null.\n *\n * @param params fee estimation function parameters\n */\n estimateFeesPerGas: async (params) => {\n if (!params.request?.feeCurrency)\n return null;\n const [maxFeePerGas, maxPriorityFeePerGas] = await Promise.all([\n estimateFeePerGasInFeeCurrency(params.client, params.request.feeCurrency),\n estimateMaxPriorityFeePerGasInFeeCurrency(params.client, params.request.feeCurrency),\n ]);\n const suggestedMaxFeePerGas = params.multiply(maxFeePerGas) + maxPriorityFeePerGas;\n return {\n maxFeePerGas: suggestedMaxFeePerGas,\n maxPriorityFeePerGas,\n };\n },\n};\n/*\n * Estimate the fee per gas in the value of the fee token\n\n *\n * @param client - Client to use\n * @param feeCurrency - Address of a whitelisted fee token\n * @returns The fee per gas in wei in the value of the fee token\n *\n */\nasync function estimateFeePerGasInFeeCurrency(client, feeCurrency) {\n const fee = await client.request({\n method: 'eth_gasPrice',\n params: [feeCurrency],\n });\n return BigInt(fee);\n}\n/*\n * Estimate the max priority fee per gas in the value of the fee token\n\n *\n * @param client - Client to use\n * @param feeCurrency - Address of a whitelisted fee token\n * @returns The fee per gas in wei in the value of the fee token\n *\n */\nasync function estimateMaxPriorityFeePerGasInFeeCurrency(client, feeCurrency) {\n const feesPerGas = await client.request({\n method: 'eth_maxPriorityFeePerGas',\n params: [feeCurrency],\n });\n return BigInt(feesPerGas);\n}\n//# sourceMappingURL=fees.js.map","import { trim } from '../utils/data/trim.js';\nexport function isEmpty(value) {\n return (value === 0 ||\n value === 0n ||\n value === undefined ||\n value === null ||\n value === '0' ||\n value === '' ||\n (typeof value === 'string' &&\n (trim(value).toLowerCase() === '0x' ||\n trim(value).toLowerCase() === '0x00')));\n}\nexport function isPresent(value) {\n return !isEmpty(value);\n}\n/** @internal */\nexport function isEIP1559(transaction) {\n return (typeof transaction.maxFeePerGas !== 'undefined' &&\n typeof transaction.maxPriorityFeePerGas !== 'undefined');\n}\nexport function isCIP64(transaction) {\n /*\n * Enable end user to force the tx to be considered as a CIP-64.\n *\n * The preliminary type will be determined as \"eip1559\" by src/utils/transaction/getTransactionType.ts\n * and so we need the logic below to check for the specific value instead of checking if just any\n * transaction type is provided. If that's anything else than \"cip64\" then we need to reevaluate the\n * type based on the transaction fields.\n *\n * Modify with caution and according to https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0064.md\n */\n if (transaction.type === 'cip64') {\n return true;\n }\n return isEIP1559(transaction) && isPresent(transaction.feeCurrency);\n}\n//# sourceMappingURL=utils.js.map","import { hexToBigInt } from '../utils/encoding/fromHex.js';\nimport { defineBlock } from '../utils/formatters/block.js';\nimport { defineTransaction, formatTransaction, } from '../utils/formatters/transaction.js';\nimport { defineTransactionRequest } from '../utils/formatters/transactionRequest.js';\nimport { isCIP64 } from './utils.js';\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n const formatted = formatTransaction(transaction);\n return {\n ...formatted,\n ...(transaction.gatewayFee\n ? {\n gatewayFee: hexToBigInt(transaction.gatewayFee),\n gatewayFeeRecipient: transaction.gatewayFeeRecipient,\n }\n : {}),\n feeCurrency: transaction.feeCurrency,\n };\n });\n return {\n transactions,\n ...(args.randomness ? { randomness: args.randomness } : {}),\n };\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args) {\n if (args.type === '0x7e')\n return {\n isSystemTx: args.isSystemTx,\n mint: args.mint ? hexToBigInt(args.mint) : undefined,\n sourceHash: args.sourceHash,\n type: 'deposit',\n };\n const transaction = { feeCurrency: args.feeCurrency };\n if (args.type === '0x7b')\n transaction.type = 'cip64';\n else {\n if (args.type === '0x7c')\n transaction.type = 'cip42';\n transaction.gatewayFee = args.gatewayFee\n ? hexToBigInt(args.gatewayFee)\n : null;\n transaction.gatewayFeeRecipient = args.gatewayFeeRecipient;\n }\n return transaction;\n },\n }),\n transactionRequest: /*#__PURE__*/ defineTransactionRequest({\n format(args) {\n const request = {};\n if (args.feeCurrency)\n request.feeCurrency = args.feeCurrency;\n if (isCIP64(args))\n request.type = '0x7b';\n return request;\n },\n }),\n};\n//# sourceMappingURL=formatters.js.map","import { maxUint256 } from '../constants/number.js';\nimport { InvalidAddressError } from '../errors/address.js';\nimport { BaseError } from '../errors/base.js';\nimport { InvalidChainIdError } from '../errors/chain.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError } from '../errors/node.js';\nimport { serializeTransaction as serializeTransaction_op } from '../op-stack/serializers.js';\nimport { isAddress } from '../utils/address/isAddress.js';\nimport { concatHex } from '../utils/data/concat.js';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { toRlp } from '../utils/encoding/toRlp.js';\nimport { serializeAccessList } from '../utils/transaction/serializeAccessList.js';\nimport { toYParitySignatureArray } from '../utils/transaction/serializeTransaction.js';\nimport { isCIP64, isEmpty, isPresent } from './utils.js';\nexport function serializeTransaction(transaction, signature) {\n if (isCIP64(transaction))\n return serializeTransactionCIP64(transaction, signature);\n return serializeTransaction_op(transaction, signature);\n}\nexport const serializers = {\n transaction: serializeTransaction,\n};\nfunction serializeTransactionCIP64(transaction, signature) {\n assertTransactionCIP64(transaction);\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, feeCurrency, data, } = transaction;\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializeAccessList(accessList),\n feeCurrency,\n ...toYParitySignatureArray(transaction, signature),\n ];\n return concatHex([\n '0x7b',\n toRlp(serializedTransaction),\n ]);\n}\n// maxFeePerGas must be less than maxUint256\nconst MAX_MAX_FEE_PER_GAS = maxUint256;\nexport function assertTransactionCIP42(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to, feeCurrency, gatewayFee, gatewayFeeRecipient, } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (gasPrice)\n throw new BaseError('`gasPrice` is not a valid CIP-42 Transaction attribute.');\n if (isPresent(maxFeePerGas) && maxFeePerGas > MAX_MAX_FEE_PER_GAS)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (isPresent(maxPriorityFeePerGas) &&\n isPresent(maxFeePerGas) &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n if ((isPresent(gatewayFee) && isEmpty(gatewayFeeRecipient)) ||\n (isPresent(gatewayFeeRecipient) && isEmpty(gatewayFee))) {\n throw new BaseError('`gatewayFee` and `gatewayFeeRecipient` must be provided together.');\n }\n if (isPresent(feeCurrency) && !isAddress(feeCurrency)) {\n throw new BaseError('`feeCurrency` MUST be a token address for CIP-42 transactions.');\n }\n if (isPresent(gatewayFeeRecipient) && !isAddress(gatewayFeeRecipient)) {\n throw new InvalidAddressError(gatewayFeeRecipient);\n }\n if (isEmpty(feeCurrency) && isEmpty(gatewayFeeRecipient)) {\n throw new BaseError('Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.');\n }\n}\nexport function assertTransactionCIP64(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to, feeCurrency, } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (gasPrice)\n throw new BaseError('`gasPrice` is not a valid CIP-64 Transaction attribute.');\n if (isPresent(maxFeePerGas) && maxFeePerGas > MAX_MAX_FEE_PER_GAS)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (isPresent(maxPriorityFeePerGas) &&\n isPresent(maxFeePerGas) &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n if (isPresent(feeCurrency) && !isAddress(feeCurrency)) {\n throw new BaseError('`feeCurrency` MUST be a token address for CIP-64 transactions.');\n }\n if (isEmpty(feeCurrency)) {\n throw new BaseError('`feeCurrency` must be provided for CIP-64 transactions.');\n }\n}\n//# sourceMappingURL=serializers.js.map","import { contracts } from '../op-stack/contracts.js';\nimport { fees } from './fees.js';\nimport { formatters } from './formatters.js';\nimport { serializers } from './serializers.js';\nexport const chainConfig = {\n contracts,\n formatters,\n serializers,\n fees,\n};\n//# sourceMappingURL=chainConfig.js.map","import { chainConfig } from '../../celo/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const celo = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 42_220,\n name: 'Celo',\n nativeCurrency: {\n decimals: 18,\n name: 'CELO',\n symbol: 'CELO',\n },\n rpcUrls: {\n default: { http: ['https://forno.celo.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Celo Explorer',\n url: 'https://celoscan.io',\n apiUrl: 'https://api.celoscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 13112599,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=celo.js.map","import { chainConfig } from '../../celo/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 17000; // holsky\n// source https://storage.googleapis.com/cel2-rollup-files/alfajores/deployment-l1.json\nexport const celoAlfajores = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 44_787,\n name: 'Alfajores',\n nativeCurrency: {\n decimals: 18,\n name: 'CELO',\n symbol: 'A-CELO',\n },\n rpcUrls: {\n default: {\n http: ['https://alfajores-forno.celo-testnet.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Celo Alfajores Explorer',\n url: 'https://celo-alfajores.blockscout.com',\n apiUrl: 'https://celo-alfajores.blockscout.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 14569001,\n },\n portal: {\n [sourceId]: {\n address: '0x82527353927d8D069b3B452904c942dA149BA381',\n blockCreated: 2411324,\n },\n },\n disputeGameFactory: {\n [sourceId]: {\n address: '0xE28AAdcd9883746c0e5068F58f9ea06027b214cb',\n blockCreated: 2411324,\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x4a2635e9e4f6e45817b1D402ac4904c1d1752438',\n blockCreated: 2411324,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xD1B0E0581973c9eB7f886967A606b9441A897037',\n blockCreated: 2411324,\n },\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=celoAlfajores.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const chang = /*#__PURE__*/ defineChain({\n id: 5858,\n name: 'Chang Chain Foundation Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'CTH',\n symbol: 'CTH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.cthscan.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Chang Chain explorer',\n url: 'https://cthscan.com',\n },\n },\n});\n//# sourceMappingURL=chang.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const chiliz = /*#__PURE__*/ defineChain({\n id: 88_888,\n name: 'Chiliz Chain',\n network: 'chiliz-chain',\n nativeCurrency: {\n decimals: 18,\n name: 'CHZ',\n symbol: 'CHZ',\n },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc.ankr.com/chiliz',\n 'https://chiliz-rpc.publicnode.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Chiliz Explorer',\n url: 'https://scan.chiliz.com',\n apiUrl: 'https://scan.chiliz.com/api',\n },\n },\n});\n//# sourceMappingURL=chiliz.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const chips = /*#__PURE__*/ defineChain({\n id: 2882,\n name: 'Chips Network',\n network: 'CHIPS',\n nativeCurrency: {\n decimals: 18,\n name: 'IOTA',\n symbol: 'IOTA',\n },\n rpcUrls: {\n default: {\n http: [\n 'https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm',\n ],\n },\n },\n});\n//# sourceMappingURL=chips.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const classic = /*#__PURE__*/ defineChain({\n id: 61,\n name: 'Ethereum Classic',\n nativeCurrency: {\n decimals: 18,\n name: 'ETC',\n symbol: 'ETC',\n },\n rpcUrls: {\n default: { http: ['https://etc.rivet.link'] },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.com/etc/mainnet',\n },\n },\n});\n//# sourceMappingURL=classic.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const coinex = /*#__PURE__*/ defineChain({\n id: 52,\n name: 'CoinEx Mainnet',\n nativeCurrency: { name: 'cet', symbol: 'cet', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.coinex.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'CoinEx Explorer',\n url: 'https://www.coinex.net',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=coinex.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const confluxESpace = /*#__PURE__*/ defineChain({\n id: 1_030,\n name: 'Conflux eSpace',\n nativeCurrency: { name: 'Conflux', symbol: 'CFX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evm.confluxrpc.com'],\n webSocket: ['wss://evm.confluxrpc.com/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'ConfluxScan',\n url: 'https://evm.confluxscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xEFf0078910f638cd81996cc117bccD3eDf2B072F',\n blockCreated: 68602935,\n },\n },\n});\n//# sourceMappingURL=confluxESpace.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const confluxESpaceTestnet = /*#__PURE__*/ defineChain({\n id: 71,\n name: 'Conflux eSpace Testnet',\n network: 'cfx-espace-testnet',\n testnet: true,\n nativeCurrency: { name: 'Conflux', symbol: 'CFX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evmtestnet.confluxrpc.com'],\n webSocket: ['wss://evmtestnet.confluxrpc.com/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'ConfluxScan',\n url: 'https://evmtestnet.confluxscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xEFf0078910f638cd81996cc117bccD3eDf2B072F',\n blockCreated: 117499050,\n },\n },\n});\n//# sourceMappingURL=confluxESpaceTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const coreDao = /*#__PURE__*/ defineChain({\n id: 1116,\n name: 'Core Dao',\n nativeCurrency: {\n decimals: 18,\n name: 'Core',\n symbol: 'CORE',\n },\n rpcUrls: {\n default: { http: ['https://rpc.coredao.org'] },\n },\n blockExplorers: {\n default: {\n name: 'CoreDao',\n url: 'https://scan.coredao.org',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 11_907_934,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=coreDao.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const crab = defineChain({\n id: 44,\n name: 'Crab Network',\n nativeCurrency: {\n decimals: 18,\n name: 'Crab Network Native Token',\n symbol: 'CRAB',\n },\n rpcUrls: {\n default: {\n http: ['https://crab-rpc.darwinia.network'],\n webSocket: ['wss://crab-rpc.darwinia.network'],\n },\n },\n blockExplorers: {\n default: { name: 'Blockscout', url: 'https://crab-scan.darwinia.network' },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 3032593,\n },\n },\n});\n//# sourceMappingURL=crab.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cronos = /*#__PURE__*/ defineChain({\n id: 25,\n name: 'Cronos Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Cronos',\n symbol: 'CRO',\n },\n rpcUrls: {\n default: { http: ['https://evm.cronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Cronos Explorer',\n url: 'https://explorer.cronos.org',\n apiUrl: 'https://explorer-api.cronos.org/mainnet/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1963112,\n },\n },\n});\n//# sourceMappingURL=cronos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cronosTestnet = /*#__PURE__*/ defineChain({\n id: 338,\n name: 'Cronos Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'CRO',\n symbol: 'tCRO',\n },\n rpcUrls: {\n default: { http: ['https://evm-t3.cronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Cronos Explorer',\n url: 'https://cronos.org/explorer/testnet3',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 10191251,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=cronosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cronoszkEVM = /*#__PURE__*/ defineChain({\n id: 388,\n name: 'Cronos zkEVM Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Cronos zkEVM CRO',\n symbol: 'zkCRO',\n },\n rpcUrls: {\n default: { http: ['https://mainnet.zkevm.cronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Cronos zkEVM (Mainnet) Chain Explorer',\n url: 'https://explorer.zkevm.cronos.org',\n },\n },\n});\n//# sourceMappingURL=cronoszkEVM.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cronoszkEVMTestnet = /*#__PURE__*/ defineChain({\n id: 282,\n name: 'Cronos zkEVM Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Cronos zkEVM Test Coin',\n symbol: 'zkTCRO',\n },\n rpcUrls: {\n default: { http: ['https://testnet.zkevm.cronos.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Cronos zkEVM Testnet Explorer',\n url: 'https://explorer.zkevm.cronos.org/testnet',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=cronoszkEVMTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const crossbell = /*#__PURE__*/ defineChain({\n id: 3_737,\n name: 'Crossbell',\n nativeCurrency: {\n decimals: 18,\n name: 'CSB',\n symbol: 'CSB',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.crossbell.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'CrossScan',\n url: 'https://scan.crossbell.io',\n apiUrl: 'https://scan.crossbell.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 38_246_031,\n },\n },\n});\n//# sourceMappingURL=crossbell.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const curtis = /*#__PURE__*/ defineChain({\n id: 33_111,\n name: 'Curtis',\n nativeCurrency: { name: 'ApeCoin', symbol: 'APE', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.curtis.apechain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Curtis Explorer',\n url: 'https://explorer.curtis.apechain.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=curtis.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cyber = /*#__PURE__*/ defineChain({\n id: 7_560,\n name: 'Cyber',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://cyber.alt.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://cyberscan.co',\n apiUrl: 'https://cyberscan.co/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 0,\n },\n },\n});\n//# sourceMappingURL=cyber.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const cyberTestnet = /*#__PURE__*/ defineChain({\n id: 111_557_560,\n name: 'Cyber Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://cyber-testnet.alt.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://testnet.cyberscan.co',\n apiUrl: 'https://testnet.cyberscan.co/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xffc391F0018269d4758AEA1a144772E8FB99545E',\n blockCreated: 304545,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=cyberTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const darwinia = /*#__PURE__*/ defineChain({\n id: 46,\n name: 'Darwinia Network',\n nativeCurrency: {\n decimals: 18,\n name: 'RING',\n symbol: 'RING',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.darwinia.network'],\n webSocket: ['wss://rpc.darwinia.network'],\n },\n },\n blockExplorers: {\n default: { name: 'Explorer', url: 'https://explorer.darwinia.network' },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 69420,\n },\n },\n});\n//# sourceMappingURL=darwinia.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const dchain = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 2716446429837000,\n name: 'Dchain',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://dchain-2716446429837000-1.jsonrpc.sagarpc.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Dchain Explorer',\n url: 'https://dchain-2716446429837000-1.sagaexplorer.io',\n apiUrl: 'https://api-dchain-2716446429837000-1.sagaexplorer.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n },\n});\n//# sourceMappingURL=dchain.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const dchainTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 2713017997578000,\n name: 'Dchain Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Dchain Explorer',\n url: 'https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io',\n apiUrl: 'https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n },\n});\n//# sourceMappingURL=dchainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const defichainEvm = /*#__PURE__*/ defineChain({\n id: 1130,\n network: 'defichain-evm',\n name: 'DeFiChain EVM Mainnet',\n nativeCurrency: {\n name: 'DeFiChain',\n symbol: 'DFI',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://eth.mainnet.ocean.jellyfishsdk.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DeFiScan',\n url: 'https://meta.defiscan.live',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 137852,\n },\n },\n});\n//# sourceMappingURL=defichainEvm.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const defichainEvmTestnet = /*#__PURE__*/ defineChain({\n id: 1131,\n network: 'defichain-evm-testnet',\n name: 'DeFiChain EVM Testnet',\n nativeCurrency: {\n name: 'DeFiChain',\n symbol: 'DFI',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://eth.testnet.ocean.jellyfishsdk.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DeFiScan',\n url: 'https://meta.defiscan.live/?network=TestNet',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 156462,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=defichainEvmTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const degen = /*#__PURE__*/ defineChain({\n id: 666666666,\n name: 'Degen',\n nativeCurrency: {\n decimals: 18,\n name: 'Degen',\n symbol: 'DEGEN',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.degen.tips'],\n webSocket: ['wss://rpc.degen.tips'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Degen Chain Explorer',\n url: 'https://explorer.degen.tips',\n apiUrl: 'https://explorer.degen.tips/api/v2',\n },\n },\n});\n//# sourceMappingURL=degen.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dfk = /*#__PURE__*/ defineChain({\n id: 53_935,\n name: 'DFK Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'Jewel',\n symbol: 'JEWEL',\n },\n rpcUrls: {\n default: {\n http: ['https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DFKSubnetScan',\n url: 'https://subnets.avax.network/defi-kingdoms',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14790551,\n },\n },\n});\n//# sourceMappingURL=dfk.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const diode = /*#__PURE__*/ defineChain({\n id: 15,\n name: 'Diode Prenet',\n nativeCurrency: {\n decimals: 18,\n name: 'DIODE',\n symbol: 'DIODE',\n },\n rpcUrls: {\n default: {\n http: ['https://prenet.diode.io:8443'],\n webSocket: ['wss://prenet.diode.io:8443/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Diode Explorer',\n url: 'https://diode.io/prenet',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=diode.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dodochainTestnet = defineChain({\n id: 53457,\n name: 'DODOchain Testnet',\n nativeCurrency: { decimals: 18, name: 'DODO', symbol: 'DODO' },\n rpcUrls: {\n default: {\n http: ['https://dodochain-testnet.alt.technology'],\n webSocket: ['wss://dodochain-testnet.alt.technology/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DODOchain Testnet (Sepolia) Explorer',\n url: 'https://testnet-scan.dodochain.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=dodochainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dogechain = /*#__PURE__*/ defineChain({\n id: 2_000,\n name: 'Dogechain',\n nativeCurrency: {\n decimals: 18,\n name: 'Wrapped Dogecoin',\n symbol: 'WDOGE',\n },\n rpcUrls: {\n default: { http: ['https://rpc.dogechain.dog'] },\n },\n blockExplorers: {\n default: {\n name: 'DogeChainExplorer',\n url: 'https://explorer.dogechain.dog',\n apiUrl: 'https://explorer.dogechain.dog/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x68a8609a60a008EFA633dfdec592c03B030cC508',\n blockCreated: 25384031,\n },\n },\n});\n//# sourceMappingURL=dogechain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dosChain = /*#__PURE__*/ defineChain({\n id: 7979,\n name: 'DOS Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'DOS Chain',\n symbol: 'DOS',\n },\n rpcUrls: {\n default: { http: ['https://main.doschain.com'] },\n },\n blockExplorers: {\n default: {\n name: 'DOS Chain Explorer',\n url: 'https://doscan.io',\n apiUrl: 'https://api.doscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 161908,\n },\n },\n});\n//# sourceMappingURL=dosChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dosChainTestnet = /*#__PURE__*/ defineChain({\n id: 3939,\n name: 'DOS Chain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'DOS Chain Testnet',\n symbol: 'DOS',\n },\n rpcUrls: {\n default: { http: ['https://test.doschain.com'] },\n },\n blockExplorers: {\n default: {\n name: 'DOS Chain Testnet Explorer',\n url: 'https://test.doscan.io',\n apiUrl: 'https://api-test.doscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 69623,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=dosChainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dreyerxMainnet = /*#__PURE__*/ defineChain({\n id: 23451,\n name: 'DreyerX Mainnet',\n nativeCurrency: {\n name: 'DreyerX',\n symbol: 'DRX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.dreyerx.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DreyerX Scan',\n url: 'https://scan.dreyerx.com',\n },\n },\n});\n//# sourceMappingURL=dreyerxMainnet.js.map","import { defineChain } from '../utils.js';\nexport const dreyerxTestnet = /*#__PURE__*/ defineChain({\n id: 23452,\n name: 'DreyerX Testnet',\n nativeCurrency: {\n name: 'DreyerX',\n symbol: 'DRX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['http://testnet-rpc.dreyerx.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'DreyerX Testnet Scan',\n url: 'https://testnet-scan.dreyerx.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=dreyerxTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const dustboyIoT = /*#__PURE__*/ defineChain({\n id: 555888,\n name: 'DustBoy IoT',\n nativeCurrency: { name: 'Ether', symbol: 'DST', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://dustboy-rpc.jibl2.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://dustboy.jibl2.com',\n apiUrl: 'https://dustboy.jibl2.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a',\n blockCreated: 526569,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=dustboyIoT.js.map","import { defineChain } from '../utils.js';\nexport const dymension = /*#__PURE__*/ defineChain({\n id: 1100,\n name: 'Dymension',\n nativeCurrency: {\n name: 'DYM',\n symbol: 'DYM',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://dymension-evm-rpc.publicnode.com'],\n webSocket: ['wss://dymension-evm-rpc.publicnode.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Dym FYI',\n url: 'https://dym.fyi',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=dymension.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const edgeless = /*#__PURE__*/ defineChain({\n id: 2_026,\n name: 'Edgeless Network',\n nativeCurrency: {\n name: 'Edgeless Wrapped ETH',\n symbol: 'EwETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.edgeless.network/http'],\n webSocket: ['wss://rpc.edgeless.network/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Edgeless Explorer',\n url: 'https://explorer.edgeless.network',\n },\n },\n});\n//# sourceMappingURL=edgeless.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const edgelessTestnet = /*#__PURE__*/ defineChain({\n id: 202,\n name: 'Edgeless Testnet',\n nativeCurrency: {\n name: 'Edgeless Wrapped ETH',\n symbol: 'EwETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://edgeless-testnet.rpc.caldera.xyz/http'],\n webSocket: ['wss://edgeless-testnet.rpc.caldera.xyz/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Edgeless Testnet Explorer',\n url: 'https://testnet.explorer.edgeless.network',\n },\n },\n});\n//# sourceMappingURL=edgelessTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const edgeware = /*#__PURE__*/ defineChain({\n id: 2021,\n name: 'Edgeware EdgeEVM Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Edgeware',\n symbol: 'EDG',\n },\n rpcUrls: {\n default: { http: ['https://edgeware-evm.jelliedowl.net'] },\n },\n blockExplorers: {\n default: {\n name: 'Edgscan by Bharathcoorg',\n url: 'https://edgscan.live',\n apiUrl: 'https://edgscan.live/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 18117872,\n },\n },\n});\n//# sourceMappingURL=edgeware.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const edgewareTestnet = /*#__PURE__*/ defineChain({\n id: 2022,\n name: 'Beresheet BereEVM Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Testnet EDG',\n symbol: 'tEDG',\n },\n rpcUrls: {\n default: { http: ['https://beresheet-evm.jelliedowl.net'] },\n },\n blockExplorers: {\n default: {\n name: 'Edgscan by Bharathcoorg',\n url: 'https://testnet.edgscan.live',\n apiUrl: 'https://testnet.edgscan.live/api',\n },\n },\n});\n//# sourceMappingURL=edgewareTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ekta = /*#__PURE__*/ defineChain({\n id: 1994,\n name: 'Ekta',\n nativeCurrency: {\n decimals: 18,\n name: 'EKTA',\n symbol: 'EKTA',\n },\n rpcUrls: {\n default: { http: ['https://main.ekta.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Ektascan',\n url: 'https://ektascan.io',\n apiUrl: 'https://ektascan.io/api',\n },\n },\n});\n//# sourceMappingURL=ekta.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ektaTestnet = /*#__PURE__*/ defineChain({\n id: 1004,\n name: 'Ekta Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'EKTA',\n symbol: 'EKTA',\n },\n rpcUrls: {\n default: { http: ['https://test.ekta.io:8545'] },\n },\n blockExplorers: {\n default: {\n name: 'Test Ektascan',\n url: 'https://test.ektascan.io',\n apiUrl: 'https://test.ektascan.io/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=ektaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const elastos = /*#__PURE__*/ defineChain({\n id: 20,\n name: 'Elastos Smart Chain',\n nativeCurrency: { name: 'ELA', symbol: 'ELA', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api2.elastos.io/eth'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Elastos Explorer',\n url: 'https://esc.elastos.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=elastos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const elastosTestnet = /*#__PURE__*/ defineChain({\n id: 21,\n name: 'Elastos Smart Chain Testnet',\n nativeCurrency: { name: 'tELA', symbol: 'tELA', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api-testnet.elastos.io/eth'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Elastos Explorer',\n url: 'https://esc-testnet.elastos.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=elastosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const electroneum = /*#__PURE__*/ defineChain({\n id: 52014,\n name: 'Electroneum Mainnet',\n nativeCurrency: {\n name: 'ETN',\n symbol: 'ETN',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.electroneum.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Electroneum Block Explorer',\n url: 'https://blockexplorer.electroneum.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=electroneum.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const electroneumTestnet = /*#__PURE__*/ defineChain({\n id: 5201420,\n name: 'Electroneum Testnet',\n nativeCurrency: {\n name: 'ETN',\n symbol: 'ETN',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.electroneum.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Electroneum Block Explorer',\n url: 'https://blockexplorer.thesecurityteam.rocks',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=electroneumTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const elysiumTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1338,\n name: 'Elysium Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'LAVA',\n symbol: 'LAVA',\n },\n rpcUrls: {\n default: {\n http: ['https://elysium-test-rpc.vulcanforged.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Elysium testnet explorer',\n url: 'https://elysium-explorer.vulcanforged.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=elysiumTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const enuls = /*#__PURE__*/ defineChain({\n id: 119,\n name: 'ENULS Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'NULS',\n symbol: 'NULS',\n },\n rpcUrls: {\n default: { http: ['https://evmapi2.nuls.io'] },\n },\n blockExplorers: {\n default: {\n name: 'ENULS Explorer',\n url: 'https://evmscan.nuls.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=enuls.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const eon = /*#__PURE__*/ defineChain({\n id: 7_332,\n name: 'Horizen EON',\n nativeCurrency: {\n decimals: 18,\n name: 'ZEN',\n symbol: 'ZEN',\n },\n rpcUrls: {\n default: { http: ['https://eon-rpc.horizenlabs.io/ethv1'] },\n },\n blockExplorers: {\n default: {\n name: 'EON Explorer',\n url: 'https://eon-explorer.horizenlabs.io',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=eon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const eos = /*#__PURE__*/ defineChain({\n id: 17777,\n name: 'EOS EVM',\n nativeCurrency: {\n decimals: 18,\n name: 'EOS',\n symbol: 'EOS',\n },\n rpcUrls: {\n default: { http: ['https://api.evm.eosnetwork.com'] },\n },\n blockExplorers: {\n default: {\n name: 'EOS EVM Explorer',\n url: 'https://explorer.evm.eosnetwork.com',\n apiUrl: 'https://explorer.evm.eosnetwork.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 7943933,\n },\n },\n});\n//# sourceMappingURL=eos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const eosTestnet = /*#__PURE__*/ defineChain({\n id: 15557,\n name: 'EOS EVM Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'EOS',\n symbol: 'EOS',\n },\n rpcUrls: {\n default: { http: ['https://api.testnet.evm.eosnetwork.com'] },\n },\n blockExplorers: {\n default: {\n name: 'EOS EVM Testnet Explorer',\n url: 'https://explorer.testnet.evm.eosnetwork.com',\n apiUrl: 'https://explorer.testnet.evm.eosnetwork.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 9067940,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=eosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const etherlink = /*#__PURE__*/ defineChain({\n id: 42793,\n name: 'Etherlink',\n nativeCurrency: {\n decimals: 18,\n name: 'Tez',\n symbol: 'XTZ',\n },\n rpcUrls: {\n default: { http: ['https://node.mainnet.etherlink.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Etherlink',\n url: 'https://explorer.etherlink.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 33899,\n },\n },\n});\n//# sourceMappingURL=etherlink.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const etherlinkTestnet = /*#__PURE__*/ defineChain({\n id: 128123,\n name: 'Etherlink Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Tez',\n symbol: 'XTZ',\n },\n rpcUrls: {\n default: { http: ['https://node.ghostnet.etherlink.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Etherlink Testnet',\n url: 'https://testnet-explorer.etherlink.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=etherlinkTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const evmos = /*#__PURE__*/ defineChain({\n id: 9_001,\n name: 'Evmos',\n nativeCurrency: {\n decimals: 18,\n name: 'Evmos',\n symbol: 'EVMOS',\n },\n rpcUrls: {\n default: { http: ['https://eth.bd.evmos.org:8545'] },\n },\n blockExplorers: {\n default: {\n name: 'Evmos Block Explorer',\n url: 'https://escan.live',\n },\n },\n});\n//# sourceMappingURL=evmos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const evmosTestnet = /*#__PURE__*/ defineChain({\n id: 9_000,\n name: 'Evmos Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Evmos',\n symbol: 'EVMOS',\n },\n rpcUrls: {\n default: { http: ['https://eth.bd.evmos.dev:8545'] },\n },\n blockExplorers: {\n default: {\n name: 'Evmos Testnet Block Explorer',\n url: 'https://evm.evmos.dev/',\n },\n },\n});\n//# sourceMappingURL=evmosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const excelonMainnet = /*#__PURE__*/ defineChain({\n id: 22052002,\n name: 'Excelon Mainnet',\n network: 'XLON',\n nativeCurrency: {\n decimals: 18,\n name: 'Excelon',\n symbol: 'xlon',\n },\n rpcUrls: {\n default: {\n http: ['https://edgewallet1.xlon.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Excelon explorer',\n url: 'https://explorer.excelon.io',\n },\n },\n});\n//# sourceMappingURL=excelonMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fantom = /*#__PURE__*/ defineChain({\n id: 250,\n name: 'Fantom',\n nativeCurrency: {\n decimals: 18,\n name: 'Fantom',\n symbol: 'FTM',\n },\n rpcUrls: {\n default: { http: ['https://rpc.ankr.com/fantom'] },\n },\n blockExplorers: {\n default: {\n name: 'FTMScan',\n url: 'https://ftmscan.com',\n apiUrl: 'https://api.ftmscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 33001987,\n },\n },\n});\n//# sourceMappingURL=fantom.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fantomSonicTestnet = /*#__PURE__*/ defineChain({\n id: 64_240,\n name: 'Fantom Sonic Open Testnet',\n network: 'fantom-sonic-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Fantom',\n symbol: 'FTM',\n },\n rpcUrls: {\n default: { http: ['https://rpcapi.sonic.fantom.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Fantom Sonic Open Testnet Explorer',\n url: 'https://public-sonic.fantom.network',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=fantomSonicTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fantomTestnet = /*#__PURE__*/ defineChain({\n id: 4_002,\n name: 'Fantom Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Fantom',\n symbol: 'FTM',\n },\n rpcUrls: {\n default: { http: ['https://rpc.testnet.fantom.network'] },\n },\n blockExplorers: {\n default: {\n name: 'FTMScan',\n url: 'https://testnet.ftmscan.com',\n apiUrl: 'https://testnet.ftmscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 8328688,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=fantomTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fibo = /*#__PURE__*/ defineChain({\n id: 12306,\n name: 'Fibo Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'fibo',\n symbol: 'FIBO',\n },\n rpcUrls: {\n default: { http: ['https://network.hzroc.art'] },\n },\n blockExplorers: {\n default: {\n name: 'FiboScan',\n url: 'https://scan.fibochain.org',\n },\n },\n});\n//# sourceMappingURL=fibo.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const filecoin = /*#__PURE__*/ defineChain({\n id: 314,\n name: 'Filecoin Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'filecoin',\n symbol: 'FIL',\n },\n rpcUrls: {\n default: { http: ['https://api.node.glif.io/rpc/v1'] },\n },\n blockExplorers: {\n default: {\n name: 'Filfox',\n url: 'https://filfox.info/en',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3328594,\n },\n },\n});\n//# sourceMappingURL=filecoin.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const filecoinCalibration = /*#__PURE__*/ defineChain({\n id: 314_159,\n name: 'Filecoin Calibration',\n nativeCurrency: {\n decimals: 18,\n name: 'testnet filecoin',\n symbol: 'tFIL',\n },\n rpcUrls: {\n default: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },\n },\n blockExplorers: {\n default: {\n name: 'Filscan',\n url: 'https://calibration.filscan.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=filecoinCalibration.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const filecoinHyperspace = /*#__PURE__*/ defineChain({\n id: 314_1,\n name: 'Filecoin Hyperspace',\n nativeCurrency: {\n decimals: 18,\n name: 'testnet filecoin',\n symbol: 'tFIL',\n },\n rpcUrls: {\n default: { http: ['https://api.hyperspace.node.glif.io/rpc/v1'] },\n },\n blockExplorers: {\n default: {\n name: 'Filfox',\n url: 'https://hyperspace.filfox.info/en',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=filecoinHyperspace.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const flare = /*#__PURE__*/ defineChain({\n id: 14,\n name: 'Flare Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Flare',\n symbol: 'FLR',\n },\n rpcUrls: {\n default: { http: ['https://flare-api.flare.network/ext/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'Flare Explorer',\n url: 'https://flare-explorer.flare.network',\n apiUrl: 'https://flare-explorer.flare.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3002461,\n },\n },\n});\n//# sourceMappingURL=flare.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const flareTestnet = /*#__PURE__*/ defineChain({\n id: 114,\n name: 'Flare Testnet Coston2',\n nativeCurrency: {\n decimals: 18,\n name: 'Coston2 Flare',\n symbol: 'C2FLR',\n },\n rpcUrls: {\n default: { http: ['https://coston2-api.flare.network/ext/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'Coston2 Explorer',\n url: 'https://coston2-explorer.flare.network',\n apiUrl: 'https://coston2-explorer.flare.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=flareTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const flowMainnet = /*#__PURE__*/ defineChain({\n id: 747,\n name: 'FlowEVM Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Flow',\n symbol: 'FLOW',\n },\n rpcUrls: {\n default: {\n http: ['https://mainnet.evm.nodes.onflow.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Mainnet Explorer',\n url: 'https://flowdiver.io',\n },\n },\n});\n//# sourceMappingURL=flowMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const flowPreviewnet = /*#__PURE__*/ defineChain({\n id: 646,\n name: 'FlowEVM Previewnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Flow',\n symbol: 'FLOW',\n },\n rpcUrls: {\n default: {\n http: ['https://previewnet.evm.nodes.onflow.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Previewnet Explorer',\n url: 'https://previewnet.flowdiver.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 6205,\n },\n },\n});\n//# sourceMappingURL=flowPreviewnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const flowTestnet = /*#__PURE__*/ defineChain({\n id: 545,\n name: 'FlowEVM Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Flow',\n symbol: 'FLOW',\n },\n rpcUrls: {\n default: {\n http: ['https://testnet.evm.nodes.onflow.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Flow Diver',\n url: 'https://testnet.flowdiver.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 137518,\n },\n },\n});\n//# sourceMappingURL=flowTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fluence = /*#__PURE__*/ defineChain({\n id: 9_999_999,\n name: 'Fluence',\n nativeCurrency: { name: 'FLT', symbol: 'FLT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.mainnet.fluence.dev'],\n webSocket: ['wss://ws.mainnet.fluence.dev'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.mainnet.fluence.dev',\n apiUrl: 'https://blockscout.mainnet.fluence.dev/api',\n },\n },\n});\n//# sourceMappingURL=fluence.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fluenceStage = /*#__PURE__*/ defineChain({\n id: 123_420_000_220,\n name: 'Fluence Stage',\n nativeCurrency: { name: 'tFLT', symbol: 'tFLT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.stage.fluence.dev'],\n webSocket: ['wss://ws.stage.fluence.dev'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.stage.fluence.dev',\n apiUrl: 'https://blockscout.stage.fluence.dev/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=fluenceStage.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fluenceTestnet = /*#__PURE__*/ defineChain({\n id: 52_164_803,\n name: 'Fluence Testnet',\n nativeCurrency: { name: 'tFLT', symbol: 'tFLT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.fluence.dev'],\n webSocket: ['wss://ws.testnet.fluence.dev'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.testnet.fluence.dev',\n apiUrl: 'https://blockscout.testnet.fluence.dev/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=fluenceTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const forma = /*#__PURE__*/ defineChain({\n id: 984122,\n name: 'Forma',\n network: 'forma',\n nativeCurrency: {\n symbol: 'TIA',\n name: 'TIA',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.forma.art'],\n webSocket: ['wss://ws.forma.art'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Forma Explorer',\n url: 'https://explorer.forma.art',\n },\n },\n contracts: {\n multicall3: {\n address: '0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079',\n blockCreated: 252705,\n },\n },\n});\n//# sourceMappingURL=forma.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const foundry = /*#__PURE__*/ defineChain({\n id: 31_337,\n name: 'Foundry',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['http://127.0.0.1:8545'],\n webSocket: ['ws://127.0.0.1:8545'],\n },\n },\n});\n//# sourceMappingURL=foundry.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const fraxtal = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 252,\n name: 'Fraxtal',\n nativeCurrency: { name: 'Frax Ether', symbol: 'frxETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.frax.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'fraxscan',\n url: 'https://fraxscan.com',\n apiUrl: 'https://api.fraxscan.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D',\n blockCreated: 19135323,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2',\n blockCreated: 19135323,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=fraxtal.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 17000; // holesky\nexport const fraxtalTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 2522,\n name: 'Fraxtal Testnet',\n nativeCurrency: { name: 'Frax Ether', symbol: 'frxETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.frax.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'fraxscan testnet',\n url: 'https://holesky.fraxscan.com',\n apiUrl: 'https://api-holesky.fraxscan.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d',\n blockCreated: 318416,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x0BaafC217162f64930909aD9f2B27125121d6332',\n blockCreated: 318416,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=fraxtalTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const funkiMainnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 33979,\n name: 'Funki',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-mainnet.funkichain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Funki Mainnet Explorer',\n url: 'https://funkiscan.io',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n },\n sourceId,\n});\n//# sourceMappingURL=funkiMainnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const funkiSepolia = defineChain({\n ...chainConfig,\n id: 3397901,\n network: 'funkiSepolia',\n name: 'Funki Sepolia Sandbox',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://funki-testnet.alt.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Funki Sepolia Sandbox Explorer',\n url: 'https://sepolia-sandbox.funkichain.com/',\n },\n },\n testnet: true,\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1620204,\n },\n },\n sourceId,\n});\n//# sourceMappingURL=funkiSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fuse = /*#__PURE__*/ defineChain({\n id: 122,\n name: 'Fuse',\n nativeCurrency: { name: 'Fuse', symbol: 'FUSE', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.fuse.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Fuse Explorer',\n url: 'https://explorer.fuse.io',\n apiUrl: 'https://explorer.fuse.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 16146628,\n },\n },\n});\n//# sourceMappingURL=fuse.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fuseSparknet = /*#__PURE__*/ defineChain({\n id: 123,\n name: 'Fuse Sparknet',\n nativeCurrency: { name: 'Spark', symbol: 'SPARK', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.fusespark.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Sparkent Explorer',\n url: 'https://explorer.fusespark.io',\n apiUrl: 'https://explorer.fusespark.io/api',\n },\n },\n});\n//# sourceMappingURL=fuseSparknet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fusion = /*#__PURE__*/ defineChain({\n id: 32659,\n name: 'Fusion Mainnet',\n nativeCurrency: { name: 'Fusion', symbol: 'FSN', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.fusionnetwork.io'],\n webSocket: ['wss://mainnet.fusionnetwork.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'FSNscan',\n url: 'https://fsnscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 10441605,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=fusion.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const fusionTestnet = /*#__PURE__*/ defineChain({\n id: 46688,\n name: 'Fusion Testnet',\n nativeCurrency: { name: 'Fusion', symbol: 'FSN', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.fusionnetwork.io'],\n webSocket: ['wss://testnet.fusionnetwork.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'FSNscan',\n url: 'https://testnet.fsnscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 10428309,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=fusionTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 17000; // Holesky testnet\nexport const garnet = defineChain({\n ...chainConfig,\n name: 'Garnet Testnet',\n testnet: true,\n id: 17069,\n sourceId,\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.garnetchain.com'],\n webSocket: ['wss://rpc.garnetchain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer.garnetchain.com',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0x57ee40586fbE286AfC75E67cb69511A6D9aF5909',\n blockCreated: 1274684,\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B',\n blockCreated: 1274684,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x09bcDd311FE398F80a78BE37E489f5D440DB95DE',\n blockCreated: 1274684,\n },\n },\n },\n});\n//# sourceMappingURL=garnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const genesys = /*#__PURE__*/ defineChain({\n id: 16507,\n name: 'Genesys Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'GSYS',\n symbol: 'GSYS',\n },\n rpcUrls: {\n default: { http: ['https://rpc.genesys.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Genesys Explorer',\n url: 'https://gchainexplorer.genesys.network',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=genesys.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const glideL1Protocol = /*#__PURE__*/ defineChain({\n id: 251,\n name: 'Glide L1 Protocol XP',\n nativeCurrency: { name: 'GLXP', symbol: 'GLXP', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-api.glideprotocol.xyz/l1-rpc'],\n webSocket: ['wss://rpc-api.glideprotocol.xyz/l1-rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Glide Protocol Explore',\n url: 'https://blockchain-explorer.glideprotocol.xyz',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=glideL1Protocol.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const glideL2Protocol = /*#__PURE__*/ defineChain({\n id: 253,\n name: 'Glide L2 Protocol XP',\n nativeCurrency: { name: 'GLXP', symbol: 'GLXP', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-api.glideprotocol.xyz/l2-rpc'],\n webSocket: ['wss://rpc-api.glideprotocol.xyz/l2-rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Glide Protocol Explore',\n url: 'https://blockchain-explorer.glideprotocol.xyz',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=glideL2Protocol.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const gnosis = /*#__PURE__*/ defineChain({\n id: 100,\n name: 'Gnosis',\n nativeCurrency: {\n decimals: 18,\n name: 'Gnosis',\n symbol: 'xDAI',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.gnosischain.com'],\n webSocket: ['wss://rpc.gnosischain.com/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Gnosisscan',\n url: 'https://gnosisscan.io',\n apiUrl: 'https://api.gnosisscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 21022491,\n },\n },\n});\n//# sourceMappingURL=gnosis.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const gnosisChiado = /*#__PURE__*/ defineChain({\n id: 10_200,\n name: 'Gnosis Chiado',\n nativeCurrency: {\n decimals: 18,\n name: 'Gnosis',\n symbol: 'xDAI',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.chiadochain.net'],\n webSocket: ['wss://rpc.chiadochain.net/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.chiadochain.net',\n apiUrl: 'https://blockscout.chiadochain.net/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 4967313,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=gnosisChiado.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const gobi = /*#__PURE__*/ defineChain({\n id: 1_663,\n name: 'Horizen Gobi Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Test ZEN',\n symbol: 'tZEN',\n },\n rpcUrls: {\n default: { http: ['https://gobi-testnet.horizenlabs.io/ethv1'] },\n },\n blockExplorers: {\n default: {\n name: 'Gobi Explorer',\n url: 'https://gobi-explorer.horizen.io',\n },\n },\n contracts: {},\n testnet: true,\n});\n//# sourceMappingURL=gobi.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const goChain = /*#__PURE__*/ defineChain({\n id: 60,\n name: 'GoChain',\n nativeCurrency: {\n decimals: 18,\n name: 'GO',\n symbol: 'GO',\n },\n rpcUrls: {\n default: { http: ['https://rpc.gochain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'GoChain Explorer',\n url: 'https://explorer.gochain.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=goChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const godwoken = /*#__PURE__*/ defineChain({\n id: 71402,\n name: 'Godwoken Mainnet',\n nativeCurrency: { decimals: 18, name: 'pCKB', symbol: 'pCKB' },\n rpcUrls: {\n default: {\n http: ['https://v1.mainnet.godwoken.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'GW Scan',\n url: 'https://v1.gwscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 15034,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=godwoken.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const goerli = /*#__PURE__*/ defineChain({\n id: 5,\n name: 'Goerli',\n nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.ankr.com/eth_goerli'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://goerli.etherscan.io',\n apiUrl: 'https://api-goerli.etherscan.io/api',\n },\n },\n contracts: {\n ensRegistry: {\n address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n },\n ensUniversalResolver: {\n address: '0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1',\n blockCreated: 10_339_206,\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 6507670,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=goerli.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const gravity = /*#__PURE__*/ defineChain({\n id: 1625,\n name: 'Gravity Alpha Mainnet',\n nativeCurrency: { name: 'G', symbol: 'G', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.gravity.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Gravity Explorer',\n url: 'https://explorer.gravity.xyz',\n apiUrl: 'https://explorer.gravity.xyz/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c',\n blockCreated: 16851,\n },\n },\n});\n//# sourceMappingURL=gravity.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const guruTestnet = /*#__PURE__*/ defineChain({\n id: 261,\n name: 'Guru Network Testnet',\n nativeCurrency: {\n name: 'testGURU',\n symbol: 'tGURU',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.gurunetwork.ai/archive/261'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Guruscan',\n url: 'https://scan.gurunetwork.ai',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=guruTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ham = /*#__PURE__*/ defineChain({\n id: 5112,\n name: 'Ham',\n nativeCurrency: {\n decimals: 18,\n name: 'Ham',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.ham.fun'],\n webSocket: ['wss://rpc.ham.fun'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ham Chain Explorer',\n url: 'https://explorer.ham.fun',\n apiUrl: 'https://explorer.ham.fun/api/v2',\n },\n },\n});\n//# sourceMappingURL=ham.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const haqqMainnet = /*#__PURE__*/ defineChain({\n id: 11235,\n name: 'HAQQ Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Islamic Coin',\n symbol: 'ISLM',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.eth.haqq.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'HAQQ Explorer',\n url: 'https://explorer.haqq.network',\n apiUrl: 'https://explorer.haqq.network/api',\n },\n },\n});\n//# sourceMappingURL=haqqMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const haqqTestedge2 = /*#__PURE__*/ defineChain({\n id: 54211,\n name: 'HAQQ Testedge 2',\n nativeCurrency: {\n decimals: 18,\n name: 'Islamic Coin',\n symbol: 'ISLMT',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.eth.testedge2.haqq.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'HAQQ Explorer',\n url: 'https://explorer.testedge2.haqq.network',\n apiUrl: 'https://explorer.testedge2.haqq.network/api',\n },\n },\n});\n//# sourceMappingURL=haqqTestedge2.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hardhat = /*#__PURE__*/ defineChain({\n id: 31_337,\n name: 'Hardhat',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['http://127.0.0.1:8545'] },\n },\n});\n//# sourceMappingURL=hardhat.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const harmonyOne = /*#__PURE__*/ defineChain({\n id: 1_666_600_000,\n name: 'Harmony One',\n nativeCurrency: {\n name: 'Harmony',\n symbol: 'ONE',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://rpc.ankr.com/harmony'] },\n },\n blockExplorers: {\n default: {\n name: 'Harmony Explorer',\n url: 'https://explorer.harmony.one',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 24185753,\n },\n },\n});\n//# sourceMappingURL=harmonyOne.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hashkeyTestnet = /*#__PURE__*/ defineChain({\n id: 133,\n name: 'HashKey Chain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'HashKey EcoPoints',\n symbol: 'HSK',\n },\n rpcUrls: {\n default: {\n http: ['https://hashkeychain-testnet.alt.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'HashKey Chain Explorer',\n url: 'https://hashkeychain-testnet-explorer.alt.technology',\n },\n },\n});\n//# sourceMappingURL=hashkeyChainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hedera = /*#__PURE__*/ defineChain({\n id: 295,\n name: 'Hedera Mainnet',\n network: 'hedera-mainnet',\n nativeCurrency: {\n symbol: 'HBAR',\n name: 'HBAR',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://mainnet.hashio.io/api'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Hashscan',\n url: 'https://hashscan.io/mainnet',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=hedera.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hederaPreviewnet = /*#__PURE__*/ defineChain({\n id: 297,\n name: 'Hedera Previewnet',\n network: 'hedera-previewnet',\n nativeCurrency: {\n symbol: 'HBAR',\n name: 'HBAR',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://previewnet.hashio.io/api'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Hashscan',\n url: 'https://hashscan.io/previewnet',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=hederaPreviewnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hederaTestnet = /*#__PURE__*/ defineChain({\n id: 296,\n name: 'Hedera Testnet',\n network: 'hedera-testnet',\n nativeCurrency: {\n symbol: 'HBAR',\n name: 'HBAR',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet.hashio.io/api'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Hashscan',\n url: 'https://hashscan.io/testnet',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=hederaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hela = /*#__PURE__*/ defineChain({\n id: 8668,\n name: 'Hela Mainnet',\n nativeCurrency: {\n name: 'HLUSD',\n symbol: 'HLUSD',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://mainnet-rpc.helachain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Hela explorer',\n url: 'https://mainnet-blockexplorer.helachain.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=hela.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hemiSepolia = /*#__PURE__*/ defineChain({\n id: 743111,\n name: 'Hemi Sepolia',\n network: 'Hemi Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet.rpc.hemi.network/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Hemi Sepolia explorer',\n url: 'https://testnet.explorer.hemi.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=hemiSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const holesky = /*#__PURE__*/ defineChain({\n id: 17000,\n name: 'Holesky',\n nativeCurrency: { name: 'Holesky Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://ethereum-holesky-rpc.publicnode.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://holesky.etherscan.io',\n apiUrl: 'https://api-holesky.etherscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 77,\n },\n ensRegistry: {\n address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n blockCreated: 801613,\n },\n ensUniversalResolver: {\n address: '0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b',\n blockCreated: 973484,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=holesky.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hychain = /*#__PURE__*/ defineChain({\n id: 2911,\n name: 'HYCHAIN',\n nativeCurrency: { name: 'HYTOPIA', symbol: 'TOPIA', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.hychain.com/http'] },\n },\n blockExplorers: {\n default: {\n name: 'HYCHAIN Explorer',\n url: 'https://explorer.hychain.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=hychain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const hychainTestnet = /*#__PURE__*/ defineChain({\n id: 29112,\n name: 'HYCHAIN Testnet',\n nativeCurrency: { name: 'HYTOPIA', symbol: 'TOPIA', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.hychain.com/http'] },\n },\n blockExplorers: {\n default: {\n name: 'HYCHAIN Explorer',\n url: 'https://testnet-rpc.hychain.com/http',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=hychainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const immutableZkEvm = /*#__PURE__*/ defineChain({\n id: 13371,\n name: 'Immutable zkEVM',\n nativeCurrency: {\n decimals: 18,\n name: 'Immutable Coin',\n symbol: 'IMX',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.immutable.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Immutable Explorer',\n url: 'https://explorer.immutable.com',\n apiUrl: 'https://explorer.immutable.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0',\n blockCreated: 4335972,\n },\n },\n});\n//# sourceMappingURL=immutableZkEvm.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const immutableZkEvmTestnet = /*#__PURE__*/ defineChain({\n id: 13473,\n name: 'Immutable zkEVM Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Immutable Coin',\n symbol: 'IMX',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.immutable.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Immutable Testnet Explorer',\n url: 'https://explorer.testnet.immutable.com/',\n },\n },\n contracts: {\n multicall3: {\n address: '0x2CC787Ed364600B0222361C4188308Fa8E68bA60',\n blockCreated: 5977391,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=immutableZkEvmTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const inEVM = /*#__PURE__*/ defineChain({\n id: 2525,\n name: 'inEVM Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Injective',\n symbol: 'INJ',\n },\n rpcUrls: {\n default: { http: ['https://mainnet.rpc.inevm.com/http'] },\n },\n blockExplorers: {\n default: {\n name: 'inEVM Explorer',\n url: 'https://inevm.calderaexplorer.xyz',\n apiUrl: 'https://inevm.calderaexplorer.xyz/api/v2',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 118606,\n },\n },\n});\n//# sourceMappingURL=inEVM.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const inkSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 763373,\n name: 'Ink Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-gel-sepolia.inkonchain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer-sepolia.inkonchain.com/',\n apiUrl: 'https://explorer-sepolia.inkonchain.com/api/v2',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x860e626c700af381133d9f4af31412a2d1db3d5d',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x33f60714bbd74d62b66d79213c348614de51901c',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=inkSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const iota = /*#__PURE__*/ defineChain({\n id: 8822,\n name: 'IOTA EVM',\n network: 'iotaevm',\n nativeCurrency: {\n decimals: 18,\n name: 'IOTA',\n symbol: 'IOTA',\n },\n rpcUrls: {\n default: {\n http: ['https://json-rpc.evm.iotaledger.net'],\n webSocket: ['wss://ws.json-rpc.evm.iotaledger.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://explorer.evm.iota.org',\n apiUrl: 'https://explorer.evm.iota.org/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 25022,\n },\n },\n});\n//# sourceMappingURL=iota.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const iotaTestnet = /*#__PURE__*/ defineChain({\n id: 1075,\n name: 'IOTA EVM Testnet',\n network: 'iotaevm-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'IOTA',\n symbol: 'IOTA',\n },\n rpcUrls: {\n default: {\n http: ['https://json-rpc.evm.testnet.iotaledger.net'],\n webSocket: ['wss://ws.json-rpc.evm.testnet.iotaledger.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://explorer.evm.testnet.iotaledger.net',\n apiUrl: 'https://explorer.evm.testnet.iotaledger.net/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=iotaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const iotex = /*#__PURE__*/ defineChain({\n id: 4_689,\n name: 'IoTeX',\n nativeCurrency: {\n decimals: 18,\n name: 'IoTeX',\n symbol: 'IOTX',\n },\n rpcUrls: {\n default: {\n http: ['https://babel-api.mainnet.iotex.io'],\n webSocket: ['wss://babel-api.mainnet.iotex.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'IoTeXScan',\n url: 'https://iotexscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 22163670,\n },\n },\n});\n//# sourceMappingURL=iotex.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const iotexTestnet = /*#__PURE__*/ defineChain({\n id: 4_690,\n name: 'IoTeX Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'IoTeX',\n symbol: 'IOTX',\n },\n rpcUrls: {\n default: {\n http: ['https://babel-api.testnet.iotex.io'],\n webSocket: ['wss://babel-api.testnet.iotex.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'IoTeXScan',\n url: 'https://testnet.iotexscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xb5cecD6894c6f473Ec726A176f1512399A2e355d',\n blockCreated: 24347592,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=iotexTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const jbc = /*#__PURE__*/ defineChain({\n id: 8899,\n name: 'JIBCHAIN L1',\n network: 'jbc',\n nativeCurrency: { name: 'JBC', symbol: 'JBC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-l1.jibchain.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://exp-l1.jibchain.net',\n apiUrl: 'https://exp-l1.jibchain.net/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC',\n blockCreated: 2299048,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=jbc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const jbcTestnet = /*#__PURE__*/ defineChain({\n id: 88991,\n name: 'Jibchain Testnet',\n nativeCurrency: { name: 'tJBC', symbol: 'tJBC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.jibchain.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://exp.testnet.jibchain.net',\n apiUrl: 'https://exp.testnet.jibchain.net/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xa1a858ad9041B4741e620355a3F96B3c78e70ecE',\n blockCreated: 32848,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=jbcTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const karura = /*#__PURE__*/ defineChain({\n id: 686,\n name: 'Karura',\n network: 'karura',\n nativeCurrency: {\n name: 'Karura',\n symbol: 'KAR',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://eth-rpc-karura.aca-api.network'],\n webSocket: ['wss://eth-rpc-karura.aca-api.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Karura Blockscout',\n url: 'https://blockscout.karura.network',\n apiUrl: 'https://blockscout.karura.network/api',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=karura.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kakarotSepolia = /*#__PURE__*/ defineChain({\n id: 1802203764,\n name: 'Kakarot Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rpc.kakarot.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Kakarot Scan',\n url: 'https://sepolia.kakarotscan.org',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=kakarotSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kakarotStarknetSepolia = /*#__PURE__*/ defineChain({\n id: 920637907288165,\n name: 'Kakarot Starknet Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rpc.kakarot.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Kakarot Scan',\n url: 'https://sepolia.kakarotscan.org',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=kakarotStarknetSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kardiaChain = /*#__PURE__*/ defineChain({\n id: 24,\n name: 'KardiaChain Mainnet',\n nativeCurrency: { name: 'KAI', symbol: 'KAI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.kardiachain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'KardiaChain Explorer',\n url: 'https://explorer.kardiachain.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=kardiaChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kava = /*#__PURE__*/ defineChain({\n id: 2222,\n name: 'Kava EVM',\n network: 'kava-mainnet',\n nativeCurrency: {\n name: 'Kava',\n symbol: 'KAVA',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://evm.kava.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Kava EVM Explorer',\n url: 'https://kavascan.com',\n apiUrl: 'https://kavascan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 3661165,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=kava.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kavaTestnet = /*#__PURE__*/ defineChain({\n id: 2221,\n name: 'Kava EVM Testnet',\n network: 'kava-testnet',\n nativeCurrency: {\n name: 'Kava',\n symbol: 'KAVA',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://evm.testnet.kava.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Kava EVM Testnet Explorer',\n url: 'https://testnet.kavascan.com/',\n apiUrl: 'https://testnet.kavascan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6',\n blockCreated: 7242179,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=kavaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kcc = /*#__PURE__*/ defineChain({\n id: 321,\n name: 'KCC Mainnet',\n network: 'KCC Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'KCS',\n symbol: 'KCS',\n },\n rpcUrls: {\n default: {\n http: ['https://kcc-rpc.com'],\n },\n },\n blockExplorers: {\n default: { name: 'KCC Explorer', url: 'https://explorer.kcc.io' },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 11760430,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=kcc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kinto = /*#__PURE__*/ defineChain({\n id: 7887,\n name: 'Kinto Mainnet',\n network: 'Kinto Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.kinto.xyz/http'] },\n },\n blockExplorers: {\n default: {\n name: 'Kinto Explorer',\n url: 'https://explorer.kinto.xyz',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=kinto.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const klaytn = /*#__PURE__*/ defineChain({\n id: 8_217,\n name: 'Klaytn',\n nativeCurrency: {\n decimals: 18,\n name: 'Klaytn',\n symbol: 'KLAY',\n },\n rpcUrls: {\n default: { http: ['https://public-en-cypress.klaytn.net'] },\n },\n blockExplorers: {\n default: {\n name: 'KlaytnScope',\n url: 'https://scope.klaytn.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 96002415,\n },\n },\n});\n//# sourceMappingURL=klaytn.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kaia = /*#__PURE__*/ defineChain({\n id: 8_217,\n name: 'Kaia',\n nativeCurrency: {\n decimals: 18,\n name: 'Kaia',\n symbol: 'KAIA',\n },\n rpcUrls: {\n default: { http: ['https://public-en.node.kaia.io'] },\n },\n blockExplorers: {\n default: {\n name: 'KaiaScan',\n url: 'https://kaiascan.io',\n apiUrl: 'https://api-cypress.klaytnscope.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 96002415,\n },\n },\n});\n//# sourceMappingURL=kaia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kairos = /*#__PURE__*/ defineChain({\n id: 1_001,\n name: 'Kairos Testnet',\n network: 'kairos',\n nativeCurrency: {\n decimals: 18,\n name: 'Kairos KAIA',\n symbol: 'KAIA',\n },\n rpcUrls: {\n default: { http: ['https://public-en-kairos.node.kaia.io'] },\n },\n blockExplorers: {\n default: {\n name: 'KaiaScan',\n url: 'https://kairos.kaiascan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 123390593,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=kairos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const klaytnBaobab = /*#__PURE__*/ defineChain({\n id: 1_001,\n name: 'Klaytn Baobab Testnet',\n network: 'klaytn-baobab',\n nativeCurrency: {\n decimals: 18,\n name: 'Baobab Klaytn',\n symbol: 'KLAY',\n },\n rpcUrls: {\n default: { http: ['https://public-en-baobab.klaytn.net'] },\n },\n blockExplorers: {\n default: {\n name: 'KlaytnScope',\n url: 'https://baobab.klaytnscope.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 123390593,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=klaytnBaobab.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const koi = defineChain({\n id: 701,\n name: 'Koi Network',\n nativeCurrency: {\n decimals: 18,\n name: 'Koi Network Native Token',\n symbol: 'KRING',\n },\n rpcUrls: {\n default: {\n http: ['https://koi-rpc.darwinia.network'],\n webSocket: ['wss://koi-rpc.darwinia.network'],\n },\n },\n blockExplorers: {\n default: { name: 'Blockscout', url: 'https://koi-scan.darwinia.network' },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 180001,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=koi.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kroma = /*#__PURE__*/ defineChain({\n id: 255,\n name: 'Kroma',\n nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.kroma.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Kroma Explorer',\n url: 'https://blockscout.kroma.network',\n apiUrl: 'https://blockscout.kroma.network/api',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=kroma.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const kromaSepolia = /*#__PURE__*/ defineChain({\n id: 2358,\n name: 'Kroma Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.sepolia.kroma.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Kroma Sepolia Explorer',\n url: 'https://blockscout.sepolia.kroma.network',\n apiUrl: 'https://blockscout.sepolia.kroma.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=kromaSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const l3x = /*#__PURE__*/ defineChain({\n id: 12324,\n name: 'L3X Protocol',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-mainnet.l3x.com'],\n webSocket: ['wss://rpc-mainnet.l3x.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'L3X Mainnet Explorer',\n url: 'https://explorer.l3x.com',\n apiUrl: 'https://explorer.l3x.com/api/v2',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=l3x.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const l3xTestnet = /*#__PURE__*/ defineChain({\n id: 12325,\n name: 'L3X Protocol Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.l3x.com'],\n webSocket: ['wss://rpc-testnet.l3x.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'L3X Testnet Explorer',\n url: 'https://explorer-testnet.l3x.com',\n apiUrl: 'https://explorer-testnet.l3x.com/api/v2',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=l3xTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lavita = /*#__PURE__*/ defineChain({\n id: 360890,\n name: 'LAVITA Mainnet',\n nativeCurrency: { name: 'vTFUEL', symbol: 'vTFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://tsub360890-eth-rpc.thetatoken.org/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LAVITA Explorer',\n url: 'https://tsub360890-explorer.thetatoken.org',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=lavita.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lightlinkPegasus = /*#__PURE__*/ defineChain({\n id: 1_891,\n name: 'LightLink Pegasus Testnet',\n network: 'lightlink-pegasus',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://replicator.pegasus.lightlink.io/rpc/v1'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LightLink Pegasus Explorer',\n url: 'https://pegasus.lightlink.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=lightlinkPegasus.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lightlinkPhoenix = /*#__PURE__*/ defineChain({\n id: 1_890,\n name: 'LightLink Phoenix Mainnet',\n network: 'lightlink-phoenix',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://replicator.phoenix.lightlink.io/rpc/v1'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LightLink Phoenix Explorer',\n url: 'https://phoenix.lightlink.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=lightlinkPhoenix.js.map","export function parseAccount(account) {\n if (typeof account === 'string')\n return { address: account, type: 'json-rpc' };\n return account;\n}\n//# sourceMappingURL=parseAccount.js.map","import { BaseError } from './base.js';\nexport class AccountNotFoundError extends BaseError {\n constructor({ docsPath } = {}) {\n super([\n 'Could not find an Account to execute with this Action.',\n 'Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.',\n ].join('\\n'), {\n docsPath,\n docsSlug: 'account',\n name: 'AccountNotFoundError',\n });\n }\n}\nexport class AccountTypeNotSupportedError extends BaseError {\n constructor({ docsPath, metaMessages, type, }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath,\n metaMessages,\n name: 'AccountTypeNotSupportedError',\n });\n }\n}\n//# sourceMappingURL=account.js.map","import { BaseError } from './base.js';\nexport class AccountStateConflictError extends BaseError {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: 'AccountStateConflictError',\n });\n }\n}\nexport class StateAssignmentConflictError extends BaseError {\n constructor() {\n super('state and stateDiff are set on the same account.', {\n name: 'StateAssignmentConflictError',\n });\n }\n}\n/** @internal */\nexport function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\\n`;\n }, '');\n}\nexport function prettyStateOverride(stateOverride) {\n return stateOverride\n .reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\\n`;\n if (state.code)\n val += ` code: ${state.code}\\n`;\n if (state.state) {\n val += ' state:\\n';\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += ' stateDiff:\\n';\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, ' State Override:\\n')\n .slice(0, -1);\n}\n//# sourceMappingURL=stateOverride.js.map","import { parseAccount } from '../accounts/utils/parseAccount.js';\nimport { panicReasons } from '../constants/solidity.js';\nimport { decodeErrorResult, } from '../utils/abi/decodeErrorResult.js';\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js';\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js';\nimport { getAbiItem } from '../utils/abi/getAbiItem.js';\nimport { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { AbiErrorSignatureNotFoundError } from './abi.js';\nimport { BaseError } from './base.js';\nimport { prettyStateOverride } from './stateOverride.js';\nimport { prettyPrint } from './transaction.js';\nimport { getContractAddress } from './utils.js';\nexport class CallExecutionError extends BaseError {\n constructor(cause, { account: account_, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, }) {\n const account = account_ ? parseAccount(account_) : undefined;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n if (stateOverride) {\n prettyArgs += `\\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'CallExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class ContractFunctionExecutionError extends BaseError {\n constructor(cause, { abi, args, contractAddress, docsPath, functionName, sender, }) {\n const abiItem = getAbiItem({ abi, args, name: functionName });\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n });\n super(cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n prettyArgs && 'Contract Call:',\n prettyArgs,\n ].filter(Boolean),\n name: 'ContractFunctionExecutionError',\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n}\nexport class ContractFunctionRevertedError extends BaseError {\n constructor({ abi, data, functionName, message, }) {\n let cause;\n let decodedData = undefined;\n let metaMessages;\n let reason;\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === 'Error') {\n reason = errorArgs[0];\n }\n else if (errorName === 'Panic') {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n }\n else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const formattedArgs = abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ];\n }\n }\n catch (err) {\n cause = err;\n }\n }\n else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ];\n }\n super((reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? 'signature' : 'reason'}:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: 'ContractFunctionRevertedError',\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.reason = reason;\n this.signature = signature;\n }\n}\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n name: 'ContractFunctionZeroDataError',\n });\n }\n}\nexport class CounterfactualDeploymentFailedError extends BaseError {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : ''}`, {\n metaMessages: [\n 'Please ensure:',\n '- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).',\n '- The `factoryData` is a valid encoded function call for contract deployment function on the factory.',\n ],\n name: 'CounterfactualDeploymentFailedError',\n });\n }\n}\nexport class RawContractError extends BaseError {\n constructor({ data, message, }) {\n super(message || '', { name: 'RawContractError' });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n}\n//# sourceMappingURL=contract.js.map","import { BaseError } from '../../errors/base.js';\nimport { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from '../../errors/node.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InvalidInputRpcError, TransactionRejectedRpcError, } from '../../errors/rpc.js';\nexport function containsNodeError(err) {\n return (err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code));\n}\nexport function getNodeError(err, args) {\n const message = (err.details || '').toLowerCase();\n const executionRevertedError = err instanceof BaseError\n ? err.walk((e) => e?.code ===\n ExecutionRevertedError.code)\n : err;\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n });\n return new UnknownNodeError({\n cause: err,\n });\n}\n//# sourceMappingURL=getNodeError.js.map","import { CallExecutionError, } from '../../errors/contract.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getCallError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getCallError.js.map","/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted) {\n const keys = Object.keys(formatted);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key]))\n extract_(formatted[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n}\n//# sourceMappingURL=extract.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { FeeConflictError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\nexport function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== 'undefined' &&\n (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined'))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\n//# sourceMappingURL=assertRequest.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { getCallError } from '../../utils/errors/getCallError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest } from '../../utils/formatters/transactionRequest.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\n/**\n * Estimates the gas and fees per gas necessary to complete a transaction without submitting it to the network.\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateGasParameters}\n * @returns A gas estimate and fees per gas (in wei). {@link EstimateGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseEther } from 'viem'\n * import { linea } from 'viem/chains'\n * import { estimateGas } from 'viem/linea'\n *\n * const client = createPublicClient({\n * chain: linea,\n * transport: http(),\n * })\n * const gasEstimate = await estimateGas(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 0n,\n * })\n */\nexport async function estimateGas(client, args) {\n const { account: account_ = client.account } = args;\n if (!account_)\n throw new AccountNotFoundError();\n const account = parseAccount(account_);\n try {\n const { accessList, blockNumber, blockTag, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = args;\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n from: account?.address,\n accessList,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n });\n const { baseFeePerGas, gasLimit, priorityFeePerGas } = await client.request({\n method: 'linea_estimateGas',\n params: block ? [request, block] : [request],\n });\n return {\n baseFeePerGas: BigInt(baseFeePerGas),\n gasLimit: BigInt(gasLimit),\n priorityFeePerGas: BigInt(priorityFeePerGas),\n };\n }\n catch (err) {\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n//# sourceMappingURL=estimateGas.js.map","import { estimateGas } from './actions/estimateGas.js';\nexport const chainConfig = {\n fees: {\n estimateFeesPerGas,\n async maxPriorityFeePerGas({ block, client, request }) {\n const response = await estimateFeesPerGas({\n block,\n client,\n multiply: (x) => x,\n request,\n type: 'eip1559',\n });\n // Returning `null` will trigger the base `estimateMaxPriorityFeePerGas` to perform\n // fallback mechanisms to estimate priority fee.\n if (!response?.maxPriorityFeePerGas)\n return null;\n return response.maxPriorityFeePerGas;\n },\n },\n};\n///////////////////////////////////////////////////////////////////////////\n// Internal\n///////////////////////////////////////////////////////////////////////////\nasync function estimateFeesPerGas({ client, multiply, request, type, }) {\n try {\n const response = await estimateGas(client, {\n ...request,\n account: request?.account,\n });\n const { priorityFeePerGas: maxPriorityFeePerGas } = response;\n const baseFeePerGas = multiply(BigInt(response.baseFeePerGas));\n const maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas;\n if (type === 'legacy')\n return { gasPrice: maxFeePerGas };\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n };\n }\n catch {\n // Returning `null` will trigger the base `estimateFeesPerGas` to perform\n // fallback mechanisms to estimate fees.\n return null;\n }\n}\n//# sourceMappingURL=chainConfig.js.map","import { chainConfig } from '../../linea/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const linea = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_144,\n name: 'Linea Mainnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.linea.build'],\n webSocket: ['wss://rpc.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://lineascan.build',\n apiUrl: 'https://api.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 42,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=linea.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lineaGoerli = /*#__PURE__*/ defineChain({\n id: 59_140,\n name: 'Linea Goerli Testnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.goerli.linea.build'],\n webSocket: ['wss://rpc.goerli.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://goerli.lineascan.build',\n apiUrl: 'https://api-goerli.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 498623,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=lineaGoerli.js.map","import { chainConfig } from '../../linea/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const lineaSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_141,\n name: 'Linea Sepolia Testnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.sepolia.linea.build'],\n webSocket: ['wss://rpc.sepolia.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.lineascan.build',\n apiUrl: 'https://api-sepolia.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 227427,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=lineaSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lineaTestnet = /*#__PURE__*/ defineChain({\n id: 59_140,\n name: 'Linea Goerli Testnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.goerli.linea.build'],\n webSocket: ['wss://rpc.goerli.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://goerli.lineascan.build',\n apiUrl: 'https://goerli.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 498623,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=lineaTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const lisk = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1135,\n name: 'Lisk',\n network: 'lisk',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.api.lisk.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://blockscout.lisk.com',\n apiUrl: 'https://blockscout.lisk.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0',\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x113cB99283AF242Da0A0C54347667edF531Aa7d6',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x26dB93F8b8b4f7016240af62F7730979d353f9A7',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x2658723Bf70c7667De6B25F99fcce13A16D25d08',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=lisk.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const liskSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 4202,\n network: 'lisk-sepolia',\n name: 'Lisk Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.sepolia-api.lisk.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://sepolia-blockscout.lisk.com',\n apiUrl: 'https://sepolia-blockscout.lisk.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0xe3d90F21490686Ec7eF37BE788E02dfC12787264',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=liskSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const localhost = /*#__PURE__*/ defineChain({\n id: 1_337,\n name: 'Localhost',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['http://127.0.0.1:8545'] },\n },\n});\n//# sourceMappingURL=localhost.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const loop = /*#__PURE__*/ defineChain({\n id: 15551,\n name: 'LoopNetwork Mainnet',\n nativeCurrency: {\n name: 'LOOP',\n symbol: 'LOOP',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://api.mainnetloop.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LoopNetwork Blockchain Explorer',\n url: 'https://explorer.mainnetloop.com/',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=loop.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lukso = /*#__PURE__*/ defineChain({\n id: 42,\n network: 'lukso',\n name: 'LUKSO',\n nativeCurrency: {\n name: 'LUKSO',\n symbol: 'LYX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.mainnet.lukso.network'],\n webSocket: ['wss://ws-rpc.mainnet.lukso.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LUKSO Mainnet Explorer',\n url: 'https://explorer.execution.mainnet.lukso.network',\n apiUrl: 'https://api.explorer.execution.mainnet.lukso.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 468183,\n },\n },\n});\n//# sourceMappingURL=lukso.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const luksoTestnet = /*#__PURE__*/ defineChain({\n id: 4201,\n name: 'LUKSO Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'LUKSO Testnet',\n symbol: 'LYXt',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.lukso.network'],\n webSocket: ['wss://ws-rpc.testnet.lukso.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'LUKSO Testnet Explorer',\n url: 'https://explorer.execution.testnet.lukso.network',\n apiUrl: 'https://api.explorer.execution.testnet.lukso.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 605348,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=luksoTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lycan = /*#__PURE__*/ defineChain({\n id: 721,\n name: 'Lycan',\n nativeCurrency: {\n decimals: 18,\n name: 'Lycan',\n symbol: 'LYC',\n },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc.lycanchain.com',\n 'https://us-east.lycanchain.com',\n 'https://us-west.lycanchain.com',\n 'https://eu-north.lycanchain.com',\n 'https://eu-west.lycanchain.com',\n 'https://asia-southeast.lycanchain.com',\n ],\n webSocket: [\n 'wss://rpc.lycanchain.com',\n 'wss://us-east.lycanchain.com',\n 'wss://us-west.lycanchain.com',\n 'wss://eu-north.lycanchain.com',\n 'wss://eu-west.lycanchain.com',\n 'wss://asia-southeast.lycanchain.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Lycan Explorer',\n url: 'https://explorer.lycanchain.com',\n },\n },\n});\n//# sourceMappingURL=lycan.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const lyra = /*#__PURE__*/ defineChain({\n id: 957,\n name: 'Lyra Chain',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.lyra.finance'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Lyra Explorer',\n url: 'https://explorer.lyra.finance',\n apiUrl: 'https://explorer.lyra.finance/api/v2',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1935198,\n },\n },\n});\n//# sourceMappingURL=lyra.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mainnet = /*#__PURE__*/ defineChain({\n id: 1,\n name: 'Ethereum',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://cloudflare-eth.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://etherscan.io',\n apiUrl: 'https://api.etherscan.io/api',\n },\n },\n contracts: {\n ensRegistry: {\n address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n },\n ensUniversalResolver: {\n address: '0xce01f8eee7E479C928F8919abD53E553a36CeF67',\n blockCreated: 19_258_213,\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14_353_601,\n },\n },\n});\n//# sourceMappingURL=mainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mandala = /*#__PURE__*/ defineChain({\n id: 595,\n name: 'Mandala TC9',\n network: 'mandala',\n nativeCurrency: {\n name: 'Mandala',\n symbol: 'mACA',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://eth-rpc-tc9.aca-staging.network'],\n webSocket: ['wss://eth-rpc-tc9.aca-staging.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Mandala Blockscout',\n url: 'https://blockscout.mandala.aca-staging.network',\n apiUrl: 'https://blockscout.mandala.aca-staging.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mandala.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const manta = /*#__PURE__*/ defineChain({\n id: 169,\n name: 'Manta Pacific Mainnet',\n network: 'manta',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://pacific-rpc.manta.network/http'] },\n },\n blockExplorers: {\n default: {\n name: 'Manta Explorer',\n url: 'https://pacific-explorer.manta.network',\n apiUrl: 'https://pacific-explorer.manta.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 332890,\n },\n },\n});\n//# sourceMappingURL=manta.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mantaSepoliaTestnet = /*#__PURE__*/ defineChain({\n id: 3_441_006,\n name: 'Manta Pacific Sepolia Testnet',\n network: 'manta-sepolia',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://pacific-rpc.sepolia-testnet.manta.network/http'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Manta Sepolia Testnet Explorer',\n url: 'https://pacific-explorer.sepolia-testnet.manta.network',\n apiUrl: 'https://pacific-explorer.sepolia-testnet.manta.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca54918f7B525C8df894668846506767412b53E3',\n blockCreated: 479584,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mantaSepoliaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mantaTestnet = /*#__PURE__*/ defineChain({\n id: 3_441_005,\n name: 'Manta Pacific Testnet',\n network: 'manta-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://manta-testnet.calderachain.xyz/http'] },\n },\n blockExplorers: {\n default: {\n name: 'Manta Testnet Explorer',\n url: 'https://pacific-explorer.testnet.manta.network',\n apiUrl: 'https://pacific-explorer.testnet.manta.network/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C',\n blockCreated: 419915,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mantaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mantle = /*#__PURE__*/ defineChain({\n id: 5000,\n name: 'Mantle',\n nativeCurrency: {\n decimals: 18,\n name: 'MNT',\n symbol: 'MNT',\n },\n rpcUrls: {\n default: { http: ['https://rpc.mantle.xyz'] },\n },\n blockExplorers: {\n default: {\n name: 'Mantle Explorer',\n url: 'https://mantlescan.xyz/',\n apiUrl: 'https://api.mantlescan.xyz/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 304717,\n },\n },\n});\n//# sourceMappingURL=mantle.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mantleSepoliaTestnet = /*#__PURE__*/ defineChain({\n id: 5003,\n name: 'Mantle Sepolia Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'MNT',\n symbol: 'MNT',\n },\n rpcUrls: {\n default: { http: ['https://rpc.sepolia.mantle.xyz'] },\n },\n blockExplorers: {\n default: {\n name: 'Mantle Testnet Explorer',\n url: 'https://explorer.sepolia.mantle.xyz/',\n apiUrl: 'https://explorer.sepolia.mantle.xyz/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 4584012,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mantleSepoliaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mantleTestnet = /*#__PURE__*/ defineChain({\n id: 5001,\n name: 'Mantle Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'MNT',\n symbol: 'MNT',\n },\n rpcUrls: {\n default: { http: ['https://rpc.testnet.mantle.xyz'] },\n },\n blockExplorers: {\n default: {\n name: 'Mantle Testnet Explorer',\n url: 'https://explorer.testnet.mantle.xyz',\n apiUrl: 'https://explorer.testnet.mantle.xyz/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 561333,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mantleTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mapProtocol = /*#__PURE__*/ defineChain({\n id: 22776,\n name: 'MAP Protocol',\n nativeCurrency: {\n decimals: 18,\n name: 'MAPO',\n symbol: 'MAPO',\n },\n rpcUrls: {\n default: { http: ['https://rpc.maplabs.io'] },\n },\n blockExplorers: {\n default: {\n name: 'MAPO Scan',\n url: 'https://maposcan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=mapProtocol.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const matchain = /*#__PURE__*/ defineChain({\n id: 698,\n name: 'Matchain',\n nativeCurrency: {\n name: 'BNB',\n symbol: 'BNB',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://rpc.matchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Matchain Scan',\n url: 'https://matchscan.io',\n },\n },\n});\n//# sourceMappingURL=matchain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const matchainTestnet = /*#__PURE__*/ defineChain({\n id: 699,\n name: 'Matchain Testnet',\n nativeCurrency: {\n name: 'BNB',\n symbol: 'BNB',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://testnet-rpc.matchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Matchain Scan',\n url: 'https://testnet.matchscan.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=matchainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mekong = /*#__PURE__*/ defineChain({\n id: 7078815900,\n name: 'Mekong Pectra Devnet',\n nativeCurrency: { name: 'eth', symbol: 'eth', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.mekong.ethpandaops.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Block Explorer',\n url: 'https://explorer.mekong.ethpandaops.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mekong.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const meld = /*#__PURE__*/ defineChain({\n id: 333000333,\n name: 'Meld',\n nativeCurrency: {\n decimals: 18,\n name: 'Meld',\n symbol: 'MELD',\n },\n rpcUrls: {\n default: { http: ['https://rpc-1.meld.com'] },\n },\n blockExplorers: {\n default: { name: 'MELDscan', url: 'https://meldscan.io' },\n },\n contracts: {\n multicall3: {\n address: '0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5',\n blockCreated: 360069,\n },\n },\n});\n//# sourceMappingURL=meld.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const merlin = /*#__PURE__*/ defineChain({\n id: 4200,\n name: 'Merlin',\n nativeCurrency: {\n name: 'BTC',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://rpc.merlinchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://scan.merlinchain.io',\n apiUrl: 'https://scan.merlinchain.io/api',\n },\n },\n});\n//# sourceMappingURL=merlin.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const metachain = /*#__PURE__*/ defineChain({\n id: 571,\n name: 'MetaChain Mainnet',\n nativeCurrency: { name: 'Metatime Coin', symbol: 'MTC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.metatime.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'MetaExplorer',\n url: 'https://explorer.metatime.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0000000000000000000000000000000000003001',\n blockCreated: 0,\n },\n },\n});\n//# sourceMappingURL=metachain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const metachainIstanbul = /*#__PURE__*/ defineChain({\n id: 1_453,\n name: 'MetaChain Istanbul',\n nativeCurrency: { name: 'Metatime Coin', symbol: 'MTC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://istanbul-rpc.metachain.dev'],\n },\n },\n blockExplorers: {\n default: {\n name: 'MetaExplorer',\n url: 'https://istanbul-explorer.metachain.dev',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0000000000000000000000000000000000003001',\n blockCreated: 0,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=metachainIstanbul.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const metalL2 = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1750,\n name: 'Metal L2',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.metall2.com'],\n webSocket: ['wss://rpc.metall2.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://explorer.metall2.com',\n apiUrl: 'https://explorer.metall2.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426',\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 0,\n },\n portal: {\n [sourceId]: {\n address: '0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=metalL2.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const meter = /*#__PURE__*/ defineChain({\n id: 82,\n name: 'Meter',\n nativeCurrency: {\n decimals: 18,\n name: 'MTR',\n symbol: 'MTR',\n },\n rpcUrls: {\n default: { http: ['https://rpc.meter.io'] },\n },\n blockExplorers: {\n default: {\n name: 'MeterScan',\n url: 'https://scan.meter.io',\n },\n },\n});\n//# sourceMappingURL=meter.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const meterTestnet = /*#__PURE__*/ defineChain({\n id: 83,\n name: 'Meter Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'MTR',\n symbol: 'MTR',\n },\n rpcUrls: {\n default: { http: ['https://rpctest.meter.io'] },\n },\n blockExplorers: {\n default: {\n name: 'MeterTestnetScan',\n url: 'https://scan-warringstakes.meter.io',\n },\n },\n});\n//# sourceMappingURL=meterTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const metis = /*#__PURE__*/ defineChain({\n id: 1_088,\n name: 'Metis',\n nativeCurrency: {\n decimals: 18,\n name: 'Metis',\n symbol: 'METIS',\n },\n rpcUrls: {\n default: { http: ['https://andromeda.metis.io/?owner=1088'] },\n },\n blockExplorers: {\n default: {\n name: 'Metis Explorer',\n url: 'https://explorer.metis.io',\n apiUrl: 'https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 2338552,\n },\n },\n});\n//# sourceMappingURL=metis.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const metisGoerli = /*#__PURE__*/ defineChain({\n id: 599,\n name: 'Metis Goerli',\n nativeCurrency: {\n decimals: 18,\n name: 'Metis Goerli',\n symbol: 'METIS',\n },\n rpcUrls: {\n default: { http: ['https://goerli.gateway.metisdevops.link'] },\n },\n blockExplorers: {\n default: {\n name: 'Metis Goerli Explorer',\n url: 'https://goerli.explorer.metisdevops.link',\n apiUrl: 'https://goerli.explorer.metisdevops.link/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1006207,\n },\n },\n});\n//# sourceMappingURL=metisGoerli.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mev = /*#__PURE__*/ defineChain({\n id: 7518,\n name: 'MEVerse Chain Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'MEVerse',\n symbol: 'MEV',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.meversemainnet.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://www.meversescan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 86881340,\n },\n },\n});\n//# sourceMappingURL=mev.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mevTestnet = /*#__PURE__*/ defineChain({\n id: 4759,\n name: 'MEVerse Chain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'MEVerse',\n symbol: 'MEV',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.meversetestnet.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://testnet.meversescan.io/',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 64371115,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mevTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mint = /*#__PURE__*/ defineChain({\n id: 185,\n name: 'Mint Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.mintchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Mintchain explorer',\n url: 'https://explorer.mintchain.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=mint.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mintSepoliaTestnet = /*#__PURE__*/ defineChain({\n id: 1686,\n name: 'Mint Sepolia Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.mintchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Mintchain Testnet explorer',\n url: 'https://testnet-explorer.mintchain.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=mintSepoliaTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const mode = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 34443,\n name: 'Mode Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.mode.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Modescan',\n url: 'https://modescan.io',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 2465882,\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x4317ba146D4933D889518a3e5E11Fe7a53199b04',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x735aDBbE72226BD52e818E7181953f42E3b0FF21',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=mode.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const modeTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 919,\n name: 'Mode Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.mode.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://sepolia.explorer.mode.network',\n apiUrl: 'https://sepolia.explorer.mode.network/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x2634BD65ba27AB63811c74A63118ACb312701Bfa',\n blockCreated: 3778393,\n },\n },\n portal: {\n [sourceId]: {\n address: '0x320e1580effF37E008F1C92700d1eBa47c1B23fD',\n blockCreated: 3778395,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xbC5C679879B2965296756CD959C3C739769995E2',\n blockCreated: 3778392,\n },\n },\n multicall3: {\n address: '0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF',\n blockCreated: 3019007,\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=modeTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const moonbaseAlpha = /*#__PURE__*/ defineChain({\n id: 1287,\n name: 'Moonbase Alpha',\n nativeCurrency: {\n decimals: 18,\n name: 'DEV',\n symbol: 'DEV',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.api.moonbase.moonbeam.network'],\n webSocket: ['wss://wss.api.moonbase.moonbeam.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Moonscan',\n url: 'https://moonbase.moonscan.io',\n apiUrl: 'https://moonbase.moonscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1850686,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=moonbaseAlpha.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const moonbeam = /*#__PURE__*/ defineChain({\n id: 1284,\n name: 'Moonbeam',\n nativeCurrency: {\n decimals: 18,\n name: 'GLMR',\n symbol: 'GLMR',\n },\n rpcUrls: {\n default: {\n http: ['https://moonbeam.public.blastapi.io'],\n webSocket: ['wss://moonbeam.public.blastapi.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Moonscan',\n url: 'https://moonscan.io',\n apiUrl: 'https://api-moonbeam.moonscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 609002,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=moonbeam.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const moonbeamDev = /*#__PURE__*/ defineChain({\n id: 1281,\n name: 'Moonbeam Development Node',\n nativeCurrency: {\n decimals: 18,\n name: 'DEV',\n symbol: 'DEV',\n },\n rpcUrls: {\n default: {\n http: ['http://127.0.0.1:9944'],\n webSocket: ['wss://127.0.0.1:9944'],\n },\n },\n});\n//# sourceMappingURL=moonbeamDev.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const moonriver = /*#__PURE__*/ defineChain({\n id: 1285,\n name: 'Moonriver',\n nativeCurrency: {\n decimals: 18,\n name: 'MOVR',\n symbol: 'MOVR',\n },\n rpcUrls: {\n default: {\n http: ['https://moonriver.public.blastapi.io'],\n webSocket: ['wss://moonriver.public.blastapi.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Moonscan',\n url: 'https://moonriver.moonscan.io',\n apiUrl: 'https://api-moonriver.moonscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1597904,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=moonriver.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const morph = /*#__PURE__*/ defineChain({\n id: 2818,\n name: 'Morph',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.morphl2.io'],\n webSocket: ['wss://rpc.morphl2.io:8443'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Morph Explorer',\n url: 'https://explorer.morphl2.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=morph.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const morphHolesky = /*#__PURE__*/ defineChain({\n id: 2810,\n name: 'Morph Holesky',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-quicknode-holesky.morphl2.io'],\n webSocket: ['wss://rpc-quicknode-holesky.morphl2.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Morph Holesky Explorer',\n url: 'https://explorer-holesky.morphl2.io',\n apiUrl: 'https://explorer-api-holesky.morphl2.io/api?',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=morphHolesky.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const morphSepolia = /*#__PURE__*/ defineChain({\n id: 2710,\n name: 'Morph Sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.morphl2.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Morph Testnet Explorer',\n url: 'https://explorer-testnet.morphl2.io',\n apiUrl: 'https://explorer-api-testnet.morphl2.io/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=morphSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const nautilus = /*#__PURE__*/ defineChain({\n id: 22222,\n name: 'Nautilus Mainnet',\n nativeCurrency: { name: 'ZBC', symbol: 'ZBC', decimals: 9 },\n rpcUrls: {\n default: {\n http: ['https://api.nautilus.nautchain.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'NautScan',\n url: 'https://nautscan.com',\n },\n },\n});\n//# sourceMappingURL=nautilus.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const neonDevnet = /*#__PURE__*/ defineChain({\n id: 245_022_926,\n name: 'Neon EVM DevNet',\n nativeCurrency: { name: 'NEON', symbol: 'NEON', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://devnet.neonevm.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Neonscan',\n url: 'https://devnet.neonscan.org',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 205206112,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=neonDevnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const neonMainnet = /*#__PURE__*/ defineChain({\n id: 245_022_934,\n network: 'neonMainnet',\n name: 'Neon EVM MainNet',\n nativeCurrency: { name: 'NEON', symbol: 'NEON', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://neon-proxy-mainnet.solana.p2p.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Neonscan',\n url: 'https://neonscan.org',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 206545524,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=neonMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const nexi = /*#__PURE__*/ defineChain({\n id: 4242,\n name: 'Nexi',\n nativeCurrency: { name: 'Nexi', symbol: 'NEXI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.chain.nexi.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'NexiScan',\n url: 'https://www.nexiscan.com',\n apiUrl: 'https://www.nexiscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E',\n blockCreated: 25770160,\n },\n },\n});\n//# sourceMappingURL=nexi.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const nexilix = /*#__PURE__*/ defineChain({\n id: 240,\n name: 'Nexilix Smart Chain',\n nativeCurrency: {\n decimals: 18,\n name: 'Nexilix',\n symbol: 'NEXILIX',\n },\n rpcUrls: {\n default: { http: ['https://rpcurl.pos.nexilix.com'] },\n },\n blockExplorers: {\n default: {\n name: 'NexilixScan',\n url: 'https://scan.nexilix.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244',\n blockCreated: 74448,\n },\n },\n});\n//# sourceMappingURL=nexilix.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const oasisTestnet = /*#__PURE__*/ defineChain({\n id: 4090,\n network: 'oasis-testnet',\n name: 'Oasis Testnet',\n nativeCurrency: { name: 'Fasttoken', symbol: 'FTN', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc1.oasis.bahamutchain.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Ftnscan',\n url: 'https://oasis.ftnscan.com',\n apiUrl: 'https://oasis.ftnscan.com/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=oasisTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const oasys = /*#__PURE__*/ defineChain({\n id: 248,\n name: 'Oasys',\n nativeCurrency: { name: 'Oasys', symbol: 'OAS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.mainnet.oasys.games'],\n },\n },\n blockExplorers: {\n default: {\n name: 'OasysScan',\n url: 'https://scan.oasys.games',\n apiUrl: 'https://scan.oasys.games/api',\n },\n },\n});\n//# sourceMappingURL=oasys.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const odysseyTestnet = /*#__PURE__*/ defineChain({\n id: 911867,\n name: 'Odyssey Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://odyssey.ithaca.xyz'] },\n },\n blockExplorers: {\n default: {\n name: 'Odyssey Explorer',\n url: 'https://odyssey-explorer.ithaca.xyz',\n apiUrl: 'https://odyssey-explorer.ithaca.xyz/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=odysseyTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const okc = /*#__PURE__*/ defineChain({\n id: 66,\n name: 'OKC',\n nativeCurrency: {\n decimals: 18,\n name: 'OKT',\n symbol: 'OKT',\n },\n rpcUrls: {\n default: { http: ['https://exchainrpc.okex.org'] },\n },\n blockExplorers: {\n default: {\n name: 'oklink',\n url: 'https://www.oklink.com/okc',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 10364792,\n },\n },\n});\n//# sourceMappingURL=okc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const oortMainnetDev = /*#__PURE__*/ defineChain({\n id: 9700,\n name: 'OORT MainnetDev',\n nativeCurrency: {\n decimals: 18,\n name: 'OORT',\n symbol: 'OORT',\n },\n rpcUrls: {\n default: { http: ['https://dev-rpc.oortech.com'] },\n },\n blockExplorers: {\n default: {\n name: 'OORT MainnetDev Explorer',\n url: 'https://dev-scan.oortech.com',\n },\n },\n});\n//# sourceMappingURL=oortmainnetDev.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 56; // bsc mainnet\nexport const opBNB = /*#__PURE__*/ defineChain({\n id: 204,\n name: 'opBNB',\n nativeCurrency: {\n name: 'BNB',\n symbol: 'BNB',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://opbnb-mainnet-rpc.bnbchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'opBNB (BSCScan)',\n url: 'https://opbnb.bscscan.com',\n apiUrl: 'https://api-opbnb.bscscan.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 512881,\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x153CAB79f4767E2ff862C94aa49573294B13D169',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=opBNB.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 97; // bsc testnet\nexport const opBNBTestnet = /*#__PURE__*/ defineChain({\n id: 5611,\n name: 'opBNB Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'tBNB',\n symbol: 'tBNB',\n },\n rpcUrls: {\n default: { http: ['https://opbnb-testnet-rpc.bnbchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'opbnbscan',\n url: 'https://testnet.opbnbscan.com',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3705108,\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xFf2394Bb843012562f4349C6632a0EcB92fC8810',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x4386C8ABf2009aC0c263462Da568DD9d46e52a31',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=opBNBTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const optimism = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 10,\n name: 'OP Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Optimism Explorer',\n url: 'https://optimistic.etherscan.io',\n apiUrl: 'https://api-optimistic.etherscan.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xe5965Ab5962eDc7477C8520243A95517CD252fA9',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xdfe97868233d1aa22e815a266982f2cf17685a27',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 4286263,\n },\n portal: {\n [sourceId]: {\n address: '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=optimism.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 5; // goerli\nexport const optimismGoerli = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 420,\n name: 'Optimism Goerli',\n nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://goerli.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://goerli-optimism.etherscan.io',\n apiUrl: 'https://goerli-optimism.etherscan.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 49461,\n },\n portal: {\n [sourceId]: {\n address: '0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x636Af16bf2f682dD3109e60102b8E1A089FedAa8',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=optimismGoerli.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const optimismSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 11155420,\n name: 'OP Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://optimism-sepolia.blockscout.com',\n apiUrl: 'https://optimism-sepolia.blockscout.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1620204,\n },\n portal: {\n [sourceId]: {\n address: '0x16Fc5058F25648194471939df75CF27A2fdC48BC',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=optimismSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const optopia = /*#__PURE__*/ defineChain({\n id: 62050,\n name: 'Optopia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc-mainnet.optopia.ai'] },\n },\n blockExplorers: {\n default: {\n name: 'Optopia Explorer',\n url: 'https://scan.optopia.ai',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=optopia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const optopiaTestnet = /*#__PURE__*/ defineChain({\n id: 62049,\n name: 'Optopia Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc-testnet.optopia.ai'] },\n },\n blockExplorers: {\n default: {\n name: 'Optopia Explorer',\n url: 'https://scan-testnet.optopia.ai',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=optopiaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const orderly = /*#__PURE__*/ defineChain({\n id: 291,\n name: 'Orderly',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.orderly.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Orderly Explorer',\n url: 'https://explorer.orderly.network',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=orderly.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const orderlySepolia = /*#__PURE__*/ defineChain({\n id: 4460,\n name: 'Orderly Sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Orderly Explorer',\n url: 'https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=orderlySepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const otimDevnet = /*#__PURE__*/ defineChain({\n id: 41144114,\n name: 'Otim Devnet',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['http://devnet.otim.xyz'],\n },\n },\n contracts: {\n batchInvoker: {\n address: '0x5FbDB2315678afecb367f032d93F642f64180aa3',\n },\n },\n});\n//# sourceMappingURL=otimDevnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const palm = /*#__PURE__*/ defineChain({\n id: 11_297_108_109,\n name: 'Palm',\n nativeCurrency: {\n decimals: 18,\n name: 'PALM',\n symbol: 'PALM',\n },\n rpcUrls: {\n default: {\n http: ['https://palm-mainnet.public.blastapi.io'],\n webSocket: ['wss://palm-mainnet.public.blastapi.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Chainlens',\n url: 'https://palm.chainlens.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 15429248,\n },\n },\n});\n//# sourceMappingURL=palm.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const palmTestnet = /*#__PURE__*/ defineChain({\n id: 11_297_108_099,\n name: 'Palm Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'PALM',\n symbol: 'PALM',\n },\n rpcUrls: {\n default: {\n http: ['https://palm-mainnet.public.blastapi.io'],\n webSocket: ['wss://palm-mainnet.public.blastapi.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Chainlens',\n url: 'https://palm.chainlens.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 15429248,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=palmTestnet.js.map","import { formatters } from '../../op-stack/formatters.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const pgn = /*#__PURE__*/ defineChain({\n id: 424,\n network: 'pgn',\n name: 'PGN',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.publicgoods.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PGN Explorer',\n url: 'https://explorer.publicgoods.network',\n apiUrl: 'https://explorer.publicgoods.network/api',\n },\n },\n contracts: {\n l2OutputOracle: {\n [sourceId]: {\n address: '0x9E6204F750cD866b299594e2aC9eA824E2e5f95c',\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3380209,\n },\n portal: {\n [sourceId]: {\n address: '0xb26Fd985c5959bBB382BAFdD0b879E149e48116c',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b',\n },\n },\n },\n formatters,\n sourceId,\n});\n//# sourceMappingURL=pgn.js.map","import { formatters } from '../../op-stack/formatters.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const pgnTestnet = /*#__PURE__*/ defineChain({\n id: 58008,\n network: 'pgn-testnet',\n name: 'PGN ',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.publicgoods.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PGN Testnet Explorer',\n url: 'https://explorer.sepolia.publicgoods.network',\n apiUrl: 'https://explorer.sepolia.publicgoods.network/api',\n },\n },\n contracts: {\n l2OutputOracle: {\n [sourceId]: {\n address: '0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe',\n },\n },\n portal: {\n [sourceId]: {\n address: '0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3',\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3754925,\n },\n },\n formatters,\n sourceId,\n testnet: true,\n});\n//# sourceMappingURL=pgnTestnet.js.map","// src/chains/definitions/phoenix.ts\nimport { defineChain } from '../../utils/chain/defineChain.js';\nexport const phoenix = /*#__PURE__*/ defineChain({\n id: 13381,\n name: 'Phoenix Blockchain',\n nativeCurrency: { name: 'Phoenix', symbol: 'PHX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.phoenixplorer.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Phoenixplorer',\n url: 'https://phoenixplorer.com',\n apiUrl: 'https://phoenixplorer.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x498cF757a575cFF2c2Ed9f532f56Efa797f86442',\n blockCreated: 5620192,\n },\n },\n});\n//# sourceMappingURL=phoenix.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const playfiAlbireo = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1_612_127,\n name: 'PlayFi Albireo Testnet',\n network: 'albireo',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://albireo-rpc.playfi.ai'],\n webSocket: ['wss://albireo-rpc-ws.playfi.ai/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PlayFi Albireo Explorer',\n url: 'https://albireo-explorer.playfi.ai',\n },\n },\n contracts: {\n multicall3: {\n address: '0xF9cda624FBC7e059355ce98a31693d299FACd963',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=playfiAlbireo.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const plinga = /*#__PURE__*/ defineChain({\n id: 242,\n name: 'Plinga',\n nativeCurrency: { name: 'Plinga', symbol: 'PLINGA', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpcurl.mainnet.plgchain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Plgscan',\n url: 'https://www.plgscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0989576160f2e7092908BB9479631b901060b6e4',\n blockCreated: 204489,\n },\n },\n});\n//# sourceMappingURL=plinga.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const plumeTestnet = /*#__PURE__*/ defineChain({\n id: 161_221_135,\n name: 'Plume Testnet',\n nativeCurrency: {\n name: 'Plume Sepolia Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.plumenetwork.xyz/http'],\n webSocket: ['wss://testnet-rpc.plumenetwork.xyz/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://testnet-explorer.plumenetwork.xyz',\n apiUrl: 'https://testnet-explorer.plumenetwork.xyz/api',\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=plumeTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygon = /*#__PURE__*/ defineChain({\n id: 137,\n name: 'Polygon',\n nativeCurrency: { name: 'POL', symbol: 'POL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://polygon-rpc.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://polygonscan.com',\n apiUrl: 'https://api.polygonscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 25770160,\n },\n },\n});\n//# sourceMappingURL=polygon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygonAmoy = /*#__PURE__*/ defineChain({\n id: 80_002,\n name: 'Polygon Amoy',\n nativeCurrency: { name: 'POL', symbol: 'POL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-amoy.polygon.technology'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://amoy.polygonscan.com',\n apiUrl: 'https://api-amoy.polygonscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 3127388,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=polygonAmoy.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygonMumbai = /*#__PURE__*/ defineChain({\n id: 80_001,\n name: 'Polygon Mumbai',\n nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.ankr.com/polygon_mumbai'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://mumbai.polygonscan.com',\n apiUrl: 'https://api-testnet.polygonscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 25770160,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=polygonMumbai.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygonZkEvm = /*#__PURE__*/ defineChain({\n id: 1101,\n name: 'Polygon zkEVM',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://zkevm-rpc.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://zkevm.polygonscan.com',\n apiUrl: 'https://api-zkevm.polygonscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 57746,\n },\n },\n});\n//# sourceMappingURL=polygonZkEvm.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygonZkEvmCardona = /*#__PURE__*/ defineChain({\n id: 2442,\n name: 'Polygon zkEVM Cardona',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.cardona.zkevm-rpc.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://cardona-zkevm.polygonscan.com',\n apiUrl: 'https://cardona-zkevm.polygonscan.com/api',\n },\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 114091,\n },\n },\n});\n//# sourceMappingURL=polygonZkEvmCardona.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const polygonZkEvmTestnet = /*#__PURE__*/ defineChain({\n id: 1442,\n name: 'Polygon zkEVM Testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.public.zkevm-test.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PolygonScan',\n url: 'https://testnet-zkevm.polygonscan.com',\n apiUrl: 'https://testnet-zkevm.polygonscan.com/api',\n },\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 525686,\n },\n },\n});\n//# sourceMappingURL=polygonZkEvmTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const pulsechain = /*#__PURE__*/ defineChain({\n id: 369,\n name: 'PulseChain',\n nativeCurrency: { name: 'Pulse', symbol: 'PLS', decimals: 18 },\n testnet: false,\n rpcUrls: {\n default: {\n http: ['https://rpc.pulsechain.com'],\n webSocket: ['wss://ws.pulsechain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PulseScan',\n url: 'https://scan.pulsechain.com',\n apiUrl: 'https://api.scan.pulsechain.com/api',\n },\n },\n contracts: {\n ensRegistry: {\n address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14353601,\n },\n },\n});\n//# sourceMappingURL=pulsechain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const pulsechainV4 = /*#__PURE__*/ defineChain({\n id: 943,\n name: 'PulseChain V4',\n testnet: true,\n nativeCurrency: { name: 'V4 Pulse', symbol: 'v4PLS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.v4.testnet.pulsechain.com'],\n webSocket: ['wss://ws.v4.testnet.pulsechain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'PulseScan',\n url: 'https://scan.v4.testnet.pulsechain.com',\n apiUrl: 'https://scan.v4.testnet.pulsechain.com/api',\n },\n },\n contracts: {\n ensRegistry: {\n address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14353601,\n },\n },\n});\n//# sourceMappingURL=pulsechainV4.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ql1 = /*#__PURE__*/ defineChain({\n id: 766,\n name: 'QL1',\n nativeCurrency: {\n decimals: 18,\n name: 'QOM',\n symbol: 'QOM',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.qom.one'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ql1 Explorer',\n url: 'https://scan.qom.one',\n },\n },\n contracts: {\n multicall3: {\n address: '0x7A52370716ea730585884F5BDB0f6E60C39b8C64',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=ql1.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const qMainnet = /*#__PURE__*/ defineChain({\n id: 35441,\n name: 'Q Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Q',\n symbol: 'Q',\n },\n rpcUrls: {\n default: { http: ['https://rpc.q.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Q Mainnet Explorer',\n url: 'https://explorer.q.org',\n apiUrl: 'https://explorer.q.org/api',\n },\n },\n});\n//# sourceMappingURL=qMainnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const qTestnet = /*#__PURE__*/ defineChain({\n id: 35443,\n name: 'Q Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Q',\n symbol: 'Q',\n },\n rpcUrls: {\n default: { http: ['https://rpc.qtestnet.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Q Testnet Explorer',\n url: 'https://explorer.qtestnet.org',\n apiUrl: 'https://explorer.qtestnet.org/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=qTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const real = /*#__PURE__*/ defineChain({\n id: 111188,\n name: 're.al',\n nativeCurrency: {\n name: 'reETH',\n decimals: 18,\n symbol: 'reETH',\n },\n rpcUrls: {\n default: { http: ['https://real.drpc.org'] },\n },\n blockExplorers: {\n default: {\n name: 're.al Explorer',\n url: 'https://explorer.re.al',\n apiUrl: 'https://explorer.re.al/api/v2',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 695,\n },\n },\n});\n//# sourceMappingURL=real.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const redbellyTestnet = /*#__PURE__*/ defineChain({\n id: 153,\n name: 'Redbelly Network Testnet',\n nativeCurrency: {\n name: 'Redbelly Native Coin',\n symbol: 'RBNT',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://governors.testnet.redbelly.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ethernal',\n url: 'https://explorer.testnet.redbelly.network',\n apiUrl: 'https://ethernal.fly.dev/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=redbellyTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // Ethereum mainnet\nexport const redstone = defineChain({\n ...chainConfig,\n name: 'Redstone',\n id: 690,\n sourceId,\n nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' },\n rpcUrls: {\n default: {\n http: ['https://rpc.redstonechain.com'],\n webSocket: ['wss://rpc.redstonechain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer.redstone.xyz',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae',\n blockCreated: 19578329,\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xa426A052f657AEEefc298b3B5c35a470e4739d69',\n blockCreated: 19578337,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69',\n blockCreated: 19578331,\n },\n },\n },\n});\n//# sourceMappingURL=redstone.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const reyaNetwork = /*#__PURE__*/ defineChain({\n id: 1729,\n name: 'Reya Network',\n nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' },\n rpcUrls: {\n default: {\n http: ['https://rpc.reya.network'],\n webSocket: ['wss://ws.reya.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Reya Network Explorer',\n url: 'https://explorer.reya.network',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=reyaNetwork.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const rollux = /*#__PURE__*/ defineChain({\n id: 570,\n name: 'Rollux Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Syscoin',\n symbol: 'SYS',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.rollux.com'],\n webSocket: ['wss://rpc.rollux.com/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'RolluxExplorer',\n url: 'https://explorer.rollux.com',\n apiUrl: 'https://explorer.rollux.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 119222,\n },\n },\n});\n//# sourceMappingURL=rollux.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const rolluxTestnet = /*#__PURE__*/ defineChain({\n id: 57000,\n name: 'Rollux Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Syscoin',\n symbol: 'SYS',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc-tanenbaum.rollux.com/'],\n webSocket: ['wss://rpc-tanenbaum.rollux.com/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'RolluxTestnetExplorer',\n url: 'https://rollux.tanenbaum.io',\n apiUrl: 'https://rollux.tanenbaum.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1813675,\n },\n },\n});\n//# sourceMappingURL=rolluxTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ronin = /*#__PURE__*/ defineChain({\n id: 2020,\n name: 'Ronin',\n nativeCurrency: { name: 'RON', symbol: 'RON', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.roninchain.com/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ronin Explorer',\n url: 'https://app.roninchain.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 26023535,\n },\n },\n});\n//# sourceMappingURL=ronin.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const root = /*#__PURE__*/ defineChain({\n id: 7668,\n name: 'The Root Network',\n nativeCurrency: {\n decimals: 18,\n name: 'XRP',\n symbol: 'XRP',\n },\n rpcUrls: {\n default: {\n http: ['https://root.rootnet.live/archive'],\n webSocket: ['wss://root.rootnet.live/archive/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Rootscan',\n url: 'https://rootscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xc9C2E2429AeC354916c476B30d729deDdC94988d',\n blockCreated: 9218338,\n },\n },\n});\n//# sourceMappingURL=root.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const rootPorcini = /*#__PURE__*/ defineChain({\n id: 7672,\n name: 'The Root Network - Porcini',\n nativeCurrency: {\n decimals: 18,\n name: 'XRP',\n symbol: 'XRP',\n },\n rpcUrls: {\n default: {\n http: ['https://porcini.rootnet.app/archive'],\n webSocket: ['wss://porcini.rootnet.app/archive/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Rootscan',\n url: 'https://porcini.rootscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xc9C2E2429AeC354916c476B30d729deDdC94988d',\n blockCreated: 10555692,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=rootPorcini.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const rootstock = /*#__PURE__*/ defineChain({\n id: 30,\n name: 'Rootstock Mainnet',\n network: 'rootstock',\n nativeCurrency: {\n decimals: 18,\n name: 'Rootstock Bitcoin',\n symbol: 'RBTC',\n },\n rpcUrls: {\n default: { http: ['https://public-node.rsk.co'] },\n },\n blockExplorers: {\n default: {\n name: 'RSK Explorer',\n url: 'https://explorer.rsk.co',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 4249540,\n },\n },\n});\n//# sourceMappingURL=rootstock.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const rootstockTestnet = /*#__PURE__*/ defineChain({\n id: 31,\n name: 'Rootstock Testnet',\n network: 'rootstock',\n nativeCurrency: {\n decimals: 18,\n name: 'Rootstock Bitcoin',\n symbol: 'tRBTC',\n },\n rpcUrls: {\n default: { http: ['https://public-node.testnet.rsk.co'] },\n },\n blockExplorers: {\n default: {\n name: 'RSK Explorer',\n url: 'https://explorer.testnet.rootstock.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=rootstockTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const rss3 = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 12_553,\n name: 'RSS3 VSL Mainnet',\n nativeCurrency: { name: 'RSS3', symbol: 'RSS3', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.rss3.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'RSS3 VSL Mainnet Scan',\n url: 'https://scan.rss3.io',\n apiUrl: 'https://scan.rss3.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14193,\n },\n portal: {\n [sourceId]: {\n address: '0x6A12432491bbbE8d3babf75F759766774C778Db4',\n blockCreated: 19387057,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x4cbab69108Aa72151EDa5A3c164eA86845f18438',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=rss3.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const rss3Sepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 2_331,\n name: 'RSS3 VSL Sepolia Testnet',\n nativeCurrency: { name: 'RSS3', symbol: 'RSS3', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.rss3.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'RSS3 VSL Sepolia Testnet Scan',\n url: 'https://scan.testnet.rss3.io',\n apiUrl: 'https://scan.testnet.rss3.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 55697,\n },\n portal: {\n [sourceId]: {\n address: '0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57',\n blockCreated: 5345035,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=rss3Sepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const saakuru = /*#__PURE__*/ defineChain({\n id: 7225878,\n name: 'Saakuru Mainnet',\n nativeCurrency: { name: 'OAS', symbol: 'OAS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.saakuru.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Saakuru Explorer',\n url: 'https://explorer.saakuru.network',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=saakuru.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const saigon = /*#__PURE__*/ defineChain({\n id: 2021,\n name: 'Saigon Testnet',\n nativeCurrency: { name: 'RON', symbol: 'RON', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://saigon-testnet.roninchain.com/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Saigon Explorer',\n url: 'https://saigon-app.roninchain.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 18736871,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=saigon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sanko = /*#__PURE__*/ defineChain({\n id: 1996,\n name: 'Sanko',\n nativeCurrency: { name: 'DMT', symbol: 'DMT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.sanko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Sanko Explorer',\n url: 'https://explorer.sanko.xyz',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=sanko.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sapphire = /*#__PURE__*/ defineChain({\n id: 23294,\n name: 'Oasis Sapphire',\n network: 'sapphire',\n nativeCurrency: { name: 'Sapphire Rose', symbol: 'ROSE', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sapphire.oasis.io'],\n webSocket: ['wss://sapphire.oasis.io/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Oasis Explorer',\n url: 'https://explorer.oasis.io/mainnet/sapphire',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 734531,\n },\n },\n});\n//# sourceMappingURL=sapphire.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sapphireTestnet = /*#__PURE__*/ defineChain({\n id: 23295,\n name: 'Oasis Sapphire Testnet',\n network: 'sapphire-testnet',\n nativeCurrency: { name: 'Sapphire Test Rose', symbol: 'TEST', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.sapphire.oasis.dev'],\n webSocket: ['wss://testnet.sapphire.oasis.dev/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Oasis Explorer',\n url: 'https://explorer.oasis.io/testnet/sapphire',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=sapphireTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const satoshiVM = /*#__PURE__*/ defineChain({\n id: 3109,\n name: 'SatoshiVM Alpha Mainnet',\n nativeCurrency: {\n name: 'BTC',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://alpha-rpc-node-http.svmscan.io'] },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://svmscan.io',\n apiUrl: 'https://svmscan.io/api',\n },\n },\n});\n//# sourceMappingURL=satoshivm.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const satoshiVMTestnet = /*#__PURE__*/ defineChain({\n id: 3110,\n name: 'SatoshiVM Testnet',\n nativeCurrency: {\n name: 'BTC',\n symbol: 'BTC',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://test-rpc-node-http.svmscan.io'] },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://testnet.svmscan.io',\n apiUrl: 'https://testnet.svmscan.io/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=satoshivmTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const scroll = /*#__PURE__*/ defineChain({\n id: 534_352,\n name: 'Scroll',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.scroll.io'],\n webSocket: ['wss://wss-rpc.scroll.io/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://scrollscan.com',\n apiUrl: 'https://api.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=scroll.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const scrollSepolia = /*#__PURE__*/ defineChain({\n id: 534_351,\n name: 'Scroll Sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rpc.scroll.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://sepolia.scrollscan.com',\n apiUrl: 'https://api-sepolia.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 9473,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=scrollSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sei = /*#__PURE__*/ defineChain({\n id: 1329,\n name: 'Sei Network',\n nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evm-rpc.sei-apis.com/'],\n webSocket: ['wss://evm-ws.sei-apis.com/'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Seitrace',\n url: 'https://seitrace.com',\n apiUrl: 'https://seitrace.com/pacific-1/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n },\n },\n});\n//# sourceMappingURL=sei.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const seiDevnet = /*#__PURE__*/ defineChain({\n id: 713_715,\n name: 'Sei Devnet',\n nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evm-rpc-arctic-1.sei-apis.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Seitrace',\n url: 'https://seitrace.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=seiDevnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const seiTestnet = /*#__PURE__*/ defineChain({\n id: 1328,\n name: 'Sei Testnet',\n nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evm-rpc-testnet.sei-apis.com'],\n webSocket: ['wss://evm-ws-testnet.sei-apis.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Seitrace',\n url: 'https://seitrace.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=seiTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sepolia = /*#__PURE__*/ defineChain({\n id: 11_155_111,\n name: 'Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.drpc.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.etherscan.io',\n apiUrl: 'https://api-sepolia.etherscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 751532,\n },\n ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' },\n ensUniversalResolver: {\n address: '0xc8Af999e38273D658BE1b921b88A9Ddf005769cC',\n blockCreated: 5_317_080,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=sepolia.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const shape = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 360,\n name: 'Shape',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.shape.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'shapescan',\n url: 'https://shapescan.xyz',\n apiUrl: 'https://shapescan.xyz/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x6Ef8c69CfE4635d866e3E02732068022c06e724D',\n blockCreated: 20369940,\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1,\n },\n portal: {\n [sourceId]: {\n address: '0xEB06fFa16011B5628BaB98E29776361c83741dd3',\n blockCreated: 20369933,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B',\n blockCreated: 20369935,\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=shape.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const shapeSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 11_011,\n name: 'Shape Sepolia Testnet',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.shape.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://explorer-sepolia.shape.network/',\n apiUrl: 'https://explorer-sepolia.shape.network/api/v2',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1,\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=shapeSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shardeumSphinx = /*#__PURE__*/ defineChain({\n id: 8082,\n name: 'Shardeum Sphinx',\n nativeCurrency: { name: 'SHARDEUM', symbol: 'SHM', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sphinx.shardeum.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Shardeum Explorer',\n url: 'https://explorer-sphinx.shardeum.org',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=shardeumSphinx.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shibarium = /*#__PURE__*/ defineChain({\n id: 109,\n name: 'Shibarium',\n network: 'shibarium',\n nativeCurrency: { name: 'Bone', symbol: 'BONE', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.shibrpc.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://shibariumscan.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0x864Bf681ADD6052395188A89101A1B37d3B4C961',\n blockCreated: 265900,\n },\n },\n});\n//# sourceMappingURL=shibarium.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shibariumTestnet = /*#__PURE__*/ defineChain({\n id: 157,\n name: 'Puppynet Shibarium',\n nativeCurrency: {\n decimals: 18,\n name: 'Bone',\n symbol: 'BONE',\n },\n rpcUrls: {\n default: { http: ['https://puppynet.shibrpc.com'] },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://puppyscan.shib.io',\n apiUrl: 'https://puppyscan.shib.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c',\n blockCreated: 3035769,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=shibariumTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shiden = /*#__PURE__*/ defineChain({\n id: 336,\n name: 'Shiden',\n nativeCurrency: {\n decimals: 18,\n name: 'SDN',\n symbol: 'SDN',\n },\n rpcUrls: {\n default: {\n http: ['https://shiden.public.blastapi.io'],\n webSocket: ['wss://shiden-rpc.dwellir.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Shiden Scan',\n url: 'https://shiden.subscan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=shiden.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shimmer = /*#__PURE__*/ defineChain({\n id: 148,\n name: 'Shimmer',\n network: 'shimmer',\n nativeCurrency: {\n decimals: 18,\n name: 'Shimmer',\n symbol: 'SMR',\n },\n rpcUrls: {\n default: {\n http: ['https://json-rpc.evm.shimmer.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Shimmer Network Explorer',\n url: 'https://explorer.evm.shimmer.network',\n apiUrl: 'https://explorer.evm.shimmer.network/api',\n },\n },\n});\n//# sourceMappingURL=shimmer.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const shimmerTestnet = /*#__PURE__*/ defineChain({\n id: 1073,\n name: 'Shimmer Testnet',\n network: 'shimmer-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Shimmer',\n symbol: 'SMR',\n },\n rpcUrls: {\n default: {\n http: ['https://json-rpc.evm.testnet.shimmer.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Shimmer Network Explorer',\n url: 'https://explorer.evm.testnet.shimmer.network',\n apiUrl: 'https://explorer.evm.testnet.shimmer.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=shimmerTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const silicon = /*#__PURE__*/ defineChain({\n id: 2355,\n name: 'Silicon zkEVM',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc.silicon.network',\n 'https://silicon-mainnet.nodeinfra.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'SiliconScope',\n url: 'https://scope.silicon.network',\n },\n },\n});\n//# sourceMappingURL=silicon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const siliconSepolia = /*#__PURE__*/ defineChain({\n id: 1722641160,\n name: 'Silicon Sepolia zkEVM',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://rpc-sepolia.silicon.network',\n 'https://silicon-testnet.nodeinfra.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'SiliconSepoliaScope',\n url: 'https://scope-sepolia.silicon.network',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=siliconSepolia.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleBlockBrawlers = /*#__PURE__*/ defineChain({\n id: 391_845_894,\n name: 'SKALE | Block Brawlers',\n nativeCurrency: { name: 'BRAWL', symbol: 'BRAWL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/frayed-decent-antares'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://frayed-decent-antares.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=brawl.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleCalypso = /*#__PURE__*/ defineChain({\n id: 1_564_830_818,\n name: 'SKALE | Calypso NFT Hub',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague'],\n webSocket: [\n 'wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3107626,\n },\n },\n});\n//# sourceMappingURL=calypso.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleCalypsoTestnet = /*#__PURE__*/ defineChain({\n id: 974_399_131,\n name: 'SKALE Calypso Testnet',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.skalenodes.com/v1/giant-half-dual-testnet'],\n webSocket: ['wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://giant-half-dual-testnet.explorer.testnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 103_220,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=calypsoTestnet.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleCryptoBlades = /*#__PURE__*/ defineChain({\n id: 1_026_062_157,\n name: 'SKALE | CryptoBlades',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux'],\n webSocket: [\n 'wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=cryptoBlades.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleCryptoColosseum = /*#__PURE__*/ defineChain({\n id: 1_032_942_172,\n name: 'SKALE | Crypto Colosseum',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/haunting-devoted-deneb'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=cryptoColosseum.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleEuropa = /*#__PURE__*/ defineChain({\n id: 2_046_399_126,\n name: 'SKALE | Europa Liquidity Hub',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/elated-tan-skat'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://elated-tan-skat.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 3113495,\n },\n },\n});\n//# sourceMappingURL=europa.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleEuropaTestnet = /*#__PURE__*/ defineChain({\n id: 1_444_673_419,\n name: 'SKALE Europa Testnet',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.skalenodes.com/v1/juicy-low-small-testnet'],\n webSocket: ['wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://juicy-low-small-testnet.explorer.testnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 110_858,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=europaTestnet.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleExorde = /*#__PURE__*/ defineChain({\n id: 2_139_927_552,\n name: 'SKALE | Exorde',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/light-vast-diphda'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://light-vast-diphda.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=exorde.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleHumanProtocol = /*#__PURE__*/ defineChain({\n id: 1_273_227_453,\n name: 'SKALE | Human Protocol',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/wan-red-ain'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/wan-red-ain'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://wan-red-ain.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=humanProtocol.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleNebula = /*#__PURE__*/ defineChain({\n id: 1_482_601_649,\n name: 'SKALE | Nebula Gaming Hub',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/green-giddy-denebola'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://green-giddy-denebola.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 2372986,\n },\n },\n});\n//# sourceMappingURL=nebula.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleNebulaTestnet = /*#__PURE__*/ defineChain({\n id: 37_084_624,\n name: 'SKALE Nebula Testnet',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet'],\n webSocket: ['wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 105_141,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=nebulaTestnet.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleRazor = /*#__PURE__*/ defineChain({\n id: 278_611_351,\n name: 'SKALE | Razor Network',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/turbulent-unique-scheat'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {},\n});\n//# sourceMappingURL=razor.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleTitan = /*#__PURE__*/ defineChain({\n id: 1_350_216_234,\n name: 'SKALE | Titan Community Hub',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.skalenodes.com/v1/parallel-stormy-spica'],\n webSocket: ['wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://parallel-stormy-spica.explorer.mainnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 2076458,\n },\n },\n});\n//# sourceMappingURL=titan.js.map","import { defineChain } from '../../../utils/chain/defineChain.js';\nexport const skaleTitanTestnet = /*#__PURE__*/ defineChain({\n id: 1_020_352_220,\n name: 'SKALE Titan Hub',\n nativeCurrency: { name: 'sFUEL', symbol: 'sFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.skalenodes.com/v1/aware-fake-trim-testnet'],\n webSocket: ['wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SKALE Explorer',\n url: 'https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 104_072,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=titanTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const sketchpad = /*#__PURE__*/ defineChain({\n id: 984123,\n name: 'Forma Sketchpad',\n network: 'sketchpad',\n nativeCurrency: {\n symbol: 'TIA',\n name: 'TIA',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.sketchpad-1.forma.art'],\n webSocket: ['wss://ws.sketchpad-1.forma.art'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Sketchpad Explorer',\n url: 'https://explorer.sketchpad-1.forma.art',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=sketchpad.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const snax = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 2192,\n network: 'snaxchain-mainnet',\n name: 'SnaxChain',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.snaxchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Snax Explorer',\n url: 'https://explorer.snaxchain.io',\n apiUrl: 'https://explorer.snaxchain.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x2172e492Fc807F5d5645D0E3543f139ECF539294',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0x79f446D024d74D0Bb6E699C131c703463c5D65E9',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=snax.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const snaxTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 13001,\n network: 'snaxchain-testnet',\n name: 'SnaxChain Testnet',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet.snaxchain.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Snax Explorer',\n url: 'https://testnet-explorer.snaxchain.io',\n apiUrl: 'https://testnet-explorer.snaxchain.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x206a75d89d45F146C54020F132FF93bEDD09f55E',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x60e3A368a4cdCEf85ffB964e372726F56A46221e',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n },\n portal: {\n [sourceId]: {\n address: '0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=snaxTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const soneiumMinato = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1946,\n name: 'Soneium Minato Testnet',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.minato.soneium.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://soneium-minato.blockscout.com',\n apiUrl: 'https://soneium-minato.blockscout.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x710e5286C746eC38beeB7538d0146f60D27be343',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3',\n blockCreated: 6466136,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2',\n blockCreated: 6466136,\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1,\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=soneiumMinato.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const songbird = /*#__PURE__*/ defineChain({\n id: 19,\n name: 'Songbird Canary-Network',\n nativeCurrency: {\n decimals: 18,\n name: 'Songbird',\n symbol: 'SGB',\n },\n rpcUrls: {\n default: { http: ['https://songbird-api.flare.network/ext/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'Songbird Explorer',\n url: 'https://songbird-explorer.flare.network',\n apiUrl: 'https://songbird-explorer.flare.network/api',\n },\n },\n});\n//# sourceMappingURL=songbird.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const songbirdTestnet = /*#__PURE__*/ defineChain({\n id: 16,\n name: 'Songbird Testnet Coston',\n nativeCurrency: {\n decimals: 18,\n name: 'Coston Flare',\n symbol: 'CFLR',\n },\n rpcUrls: {\n default: { http: ['https://coston-api.flare.network/ext/C/rpc'] },\n },\n blockExplorers: {\n default: {\n name: 'Coston Explorer',\n url: 'https://coston-explorer.flare.network',\n apiUrl: 'https://coston-explorer.flare.network/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=songbirdTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const sophon = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 50104,\n name: 'Sophon',\n nativeCurrency: {\n decimals: 18,\n name: 'Sophon',\n symbol: 'SOPH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.sophon.xyz'],\n webSocket: ['wss://rpc.sophon.xyz/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Sophon Block Explorer',\n url: 'https://explorer.sophon.xyz',\n },\n },\n contracts: {\n multicall3: {\n address: '0x5f4867441d2416cA88B1b3fd38f21811680CD2C8',\n blockCreated: 116,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=sophon.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const sophonTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 531_050_104,\n name: 'Sophon Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Sophon',\n symbol: 'SOPH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.sophon.xyz'],\n webSocket: ['wss://rpc.testnet.sophon.xyz/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Sophon Block Explorer',\n url: 'https://explorer.testnet.sophon.xyz',\n },\n },\n contracts: {\n multicall3: {\n address: '0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af',\n blockCreated: 15_642,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=sophonTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const spicy = /*#__PURE__*/ defineChain({\n id: 88_882,\n name: 'Chiliz Spicy Testnet',\n network: 'chiliz-spicy-Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'CHZ',\n symbol: 'CHZ',\n },\n rpcUrls: {\n default: {\n http: [\n 'https://spicy-rpc.chiliz.com',\n 'https://chiliz-spicy-rpc.publicnode.com',\n ],\n webSocket: [\n 'wss://spicy-rpc-ws.chiliz.com',\n 'wss://chiliz-spicy-rpc.publicnode.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Chiliz Explorer',\n url: 'http://spicy-explorer.chiliz.com',\n apiUrl: 'http://spicy-explorer.chiliz.com/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=spicy.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const step = /*#__PURE__*/ defineChain({\n id: 1234,\n name: 'Step Network',\n nativeCurrency: { name: 'FITFI', symbol: 'FITFI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.step.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Step Scan',\n url: 'https://stepscan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=step.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const storyTestnet = /*#__PURE__*/ defineChain({\n id: 1513,\n name: 'Story Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'IP',\n symbol: 'IP',\n },\n rpcUrls: {\n default: { http: ['https://testnet.storyrpc.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Story Testnet Explorer',\n url: 'https://testnet.storyscan.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=storyTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const stratis = /*#__PURE__*/ defineChain({\n id: 105105,\n name: 'Stratis Mainnet',\n network: 'stratis',\n nativeCurrency: {\n name: 'Stratis',\n symbol: 'STRAX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.stratisevm.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Stratis Explorer',\n url: 'https://explorer.stratisevm.com',\n },\n },\n});\n//# sourceMappingURL=stratis.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const superlumio = /*#__PURE__*/ defineChain({\n id: 8866,\n name: 'SuperLumio',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.lumio.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Lumio explorer',\n url: 'https://explorer.lumio.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=superlumio.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const superposition = /*#__PURE__*/ defineChain({\n id: 55244,\n name: 'Superposition',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc.superposition.so'] },\n },\n blockExplorers: {\n default: {\n name: 'Superposition Explorer',\n url: 'https://explorer.superposition.so',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=superposition.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const swan = /*#__PURE__*/ defineChain({\n id: 254,\n name: 'Swan Chain Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://mainnet-rpc.swanchain.org'] },\n },\n blockExplorers: {\n default: {\n name: 'Swan Explorer',\n url: 'https://swanscan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=swan.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const swanProximaTestnet = /*#__PURE__*/ defineChain({\n id: 20241133,\n name: 'Swan Proxima Testnet',\n nativeCurrency: { name: 'Swan Ether', symbol: 'sETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://rpc-proxima.swanchain.io\t'] },\n },\n blockExplorers: {\n default: {\n name: 'Swan Explorer',\n url: 'https://proxima-explorer.swanchain.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=swanProximaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const swanSaturnTestnet = /*#__PURE__*/ defineChain({\n id: 2024,\n name: 'Swan Saturn Testnet',\n nativeCurrency: { name: 'Swan Ether', symbol: 'sETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://saturn-rpc.swanchain.io'] },\n },\n blockExplorers: {\n default: {\n name: 'Swan Explorer',\n url: 'https://saturn-explorer.swanchain.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=swanSaturnTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const syscoin = /*#__PURE__*/ defineChain({\n id: 57,\n name: 'Syscoin Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Syscoin',\n symbol: 'SYS',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.syscoin.org'],\n webSocket: ['wss://rpc.syscoin.org/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SyscoinExplorer',\n url: 'https://explorer.syscoin.org',\n apiUrl: 'https://explorer.syscoin.org/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 287139,\n },\n },\n});\n//# sourceMappingURL=syscoin.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const syscoinTestnet = /*#__PURE__*/ defineChain({\n id: 5700,\n name: 'Syscoin Tanenbaum Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Syscoin',\n symbol: 'SYS',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.tanenbaum.io'],\n webSocket: ['wss://rpc.tanenbaum.io/wss'],\n },\n },\n blockExplorers: {\n default: {\n name: 'SyscoinTestnetExplorer',\n url: 'https://tanenbaum.io',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 271288,\n },\n },\n});\n//# sourceMappingURL=syscoinTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taiko = /*#__PURE__*/ defineChain({\n id: 167000,\n name: 'Taiko Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.mainnet.taiko.xyz'],\n webSocket: ['wss://ws.mainnet.taiko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Taikoscan',\n url: 'https://taikoscan.io',\n apiUrl: 'https://api.taikoscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcb2436774C3e191c85056d248EF4260ce5f27A9D',\n },\n },\n});\n//# sourceMappingURL=taiko.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taikoHekla = /*#__PURE__*/ defineChain({\n id: 167_009,\n name: 'Taiko Hekla L2',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.hekla.taiko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Taikoscan',\n url: 'https://hekla.taikoscan.network',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=taikoHekla.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taikoJolnir = /*#__PURE__*/ defineChain({\n id: 167007,\n name: 'Taiko Jolnir (Alpha-5 Testnet)',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.jolnir.taiko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://explorer.jolnir.taiko.xyz',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 732706,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=taikoJolnir.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taikoKatla = /*#__PURE__*/ defineChain({\n id: 167008,\n name: 'Taiko Katla (Alpha-6 Testnet)',\n network: 'tko-katla',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.katla.taiko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://explorer.katla.taiko.xyz',\n },\n },\n});\n//# sourceMappingURL=taikoKatla.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taikoTestnetSepolia = /*#__PURE__*/ defineChain({\n id: 167005,\n name: 'Taiko (Alpha-3 Testnet)',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.test.taiko.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'blockscout',\n url: 'https://explorer.test.taiko.xyz',\n },\n },\n});\n//# sourceMappingURL=taikoTestnetSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taraxa = /*#__PURE__*/ defineChain({\n id: 841,\n name: 'Taraxa Mainnet',\n nativeCurrency: { name: 'Tara', symbol: 'TARA', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.mainnet.taraxa.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Taraxa Explorer',\n url: 'https://explorer.mainnet.taraxa.io',\n },\n },\n});\n//# sourceMappingURL=taraxa.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const taraxaTestnet = /*#__PURE__*/ defineChain({\n id: 842,\n name: 'Taraxa Testnet',\n nativeCurrency: { name: 'Tara', symbol: 'TARA', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.taraxa.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Taraxa Explorer',\n url: 'https://explorer.testnet.taraxa.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=taraxaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const telcoinTestnet = /*#__PURE__*/ defineChain({\n id: 2017,\n name: 'Telcoin Adiri Testnet',\n nativeCurrency: { name: 'Telcoin', symbol: 'TEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.telcoin.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'telscan',\n url: 'https://telscan.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=telcoinTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const telos = /*#__PURE__*/ defineChain({\n id: 40,\n name: 'Telos',\n nativeCurrency: {\n decimals: 18,\n name: 'Telos',\n symbol: 'TLOS',\n },\n rpcUrls: {\n default: { http: ['https://mainnet.telos.net/evm'] },\n },\n blockExplorers: {\n default: {\n name: 'Teloscan',\n url: 'https://www.teloscan.io/',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 246530709,\n },\n },\n});\n//# sourceMappingURL=telos.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const telosTestnet = /*#__PURE__*/ defineChain({\n id: 41,\n name: 'Telos',\n nativeCurrency: {\n decimals: 18,\n name: 'Telos',\n symbol: 'TLOS',\n },\n rpcUrls: {\n default: { http: ['https://testnet.telos.net/evm'] },\n },\n blockExplorers: {\n default: {\n name: 'Teloscan (testnet)',\n url: 'https://testnet.teloscan.io/',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=telosTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const tenet = /*#__PURE__*/ defineChain({\n id: 1559,\n name: 'Tenet',\n network: 'tenet-mainnet',\n nativeCurrency: {\n name: 'TENET',\n symbol: 'TENET',\n decimals: 18,\n },\n rpcUrls: {\n default: { http: ['https://rpc.tenet.org'] },\n },\n blockExplorers: {\n default: {\n name: 'TenetScan Mainnet',\n url: 'https://tenetscan.io',\n apiUrl: 'https://tenetscan.io/api',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=tenet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const thaiChain = /*#__PURE__*/ defineChain({\n id: 7,\n name: 'ThaiChain',\n nativeCurrency: { name: 'TCH', symbol: 'TCH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.thaichain.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://exp.thaichain.org',\n apiUrl: 'https://exp.thaichain.org/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0DaD6130e832c21719C5CE3bae93454E16A84826',\n blockCreated: 4806386,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=thaiChain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const that = /*#__PURE__*/ defineChain({\n id: 8428,\n name: 'THAT Mainnet',\n nativeCurrency: { name: 'THAT', symbol: 'THAT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.thatchain.io/mainnet'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://that.blockscout.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=that.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const theta = /*#__PURE__*/ defineChain({\n id: 361,\n name: 'Theta Mainnet',\n nativeCurrency: { name: 'TFUEL', symbol: 'TFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://eth-rpc-api.thetatoken.org/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Theta Explorer',\n url: 'https://explorer.thetatoken.org',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=theta.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const thetaTestnet = /*#__PURE__*/ defineChain({\n id: 365,\n name: 'Theta Testnet',\n nativeCurrency: { name: 'TFUEL', symbol: 'TFUEL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://eth-rpc-api-testnet.thetatoken.org/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Theta Explorer',\n url: 'https://testnet-explorer.thetatoken.org',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=thetaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const thunderCore = /*#__PURE__*/ defineChain({\n id: 108,\n name: 'ThunderCore Mainnet',\n nativeCurrency: { name: 'TT', symbol: 'TT', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet-rpc.thundercore.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'ThunderCore Explorer',\n url: 'https://viewblock.io/thundercore',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=thunderCore.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const thunderTestnet = /*#__PURE__*/ defineChain({\n id: 997,\n name: '5ireChain Thunder Testnet',\n nativeCurrency: { name: '5ire Token', symbol: '5IRE', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.5ire.network'],\n },\n },\n blockExplorers: {\n default: {\n name: '5ireChain Explorer',\n url: 'https://explorer.5ire.network',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=thunderTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const tiktrixTestnet = /*#__PURE__*/ defineChain({\n id: 62092,\n name: 'TikTrix Testnet',\n nativeCurrency: {\n name: 'tTTX',\n symbol: 'tTTX',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://tiktrix-rpc.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'TikTrix Testnet Explorer',\n url: 'https://tiktrix.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=tiktrixTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const tomb = /*#__PURE__*/ defineChain({\n id: 6969,\n name: 'Tomb Mainnet',\n nativeCurrency: { name: 'TOMB', symbol: 'TOMB', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.tombchain.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Tomb Explorer',\n url: 'https://tombscout.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=tomb.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const tron = /*#__PURE__*/ defineChain({\n id: 728126428,\n name: 'Tron',\n nativeCurrency: { name: 'TRON', symbol: 'TRX', decimals: 6 },\n rpcUrls: {\n default: {\n http: ['https://api.trongrid.io/jsonrpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Tronscan',\n url: 'https://tronscan.org',\n apiUrl: 'https://apilist.tronscanapi.com/api',\n },\n },\n});\n//# sourceMappingURL=tron.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ubiq = /*#__PURE__*/ defineChain({\n id: 8,\n name: 'Ubiq Mainnet',\n nativeCurrency: { name: 'UBQ', symbol: 'UBQ', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://pyrus2.ubiqscan.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ubiq Scan',\n url: 'https://ubiqscan.io',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=ubiq.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ultron = /*#__PURE__*/ defineChain({\n id: 1231,\n name: 'Ultron Mainnet',\n nativeCurrency: { name: 'ULX', symbol: 'ULX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://ultron-rpc.net'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ultron Scan',\n url: 'https://ulxscan.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=ultron.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const ultronTestnet = /*#__PURE__*/ defineChain({\n id: 1230,\n name: 'Ultron Testnet',\n nativeCurrency: { name: 'ULX', symbol: 'ULX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://ultron-dev.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ultron Scan',\n url: 'https://explorer.ultron-dev.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=ultronTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const unichainSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 1301,\n name: 'Unichain Sepolia',\n nativeCurrency: {\n name: 'Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia.unichain.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Uniscan',\n url: 'https://sepolia.uniscan.xyz',\n apiUrl: 'https://api-sepolia.uniscan.xyz/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 0,\n },\n portal: {\n [sourceId]: {\n address: '0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2',\n },\n },\n disputeGameFactory: {\n [sourceId]: {\n address: '0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=unichainSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const unique = /*#__PURE__*/ defineChain({\n id: 8880,\n name: 'Unique Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'UNQ',\n symbol: 'UNQ',\n },\n rpcUrls: {\n default: { http: ['https://rpc.unique.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Unique Subscan',\n url: 'https://unique.subscan.io/',\n },\n },\n});\n//# sourceMappingURL=unique.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const uniqueOpal = /*#__PURE__*/ defineChain({\n id: 8882,\n name: 'Opal Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'OPL',\n symbol: 'OPL',\n },\n rpcUrls: {\n default: { http: ['https://rpc-opal.unique.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Opal Subscan',\n url: 'https://opal.subscan.io/',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=uniqueOpal.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const uniqueQuartz = /*#__PURE__*/ defineChain({\n id: 8881,\n name: 'Quartz Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'QTZ',\n symbol: 'QTZ',\n },\n rpcUrls: {\n default: { http: ['https://rpc-quartz.unique.network'] },\n },\n blockExplorers: {\n default: {\n name: 'Quartz Subscan',\n url: 'https://quartz.subscan.io/',\n },\n },\n});\n//# sourceMappingURL=uniqueQuartz.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const unreal = /*#__PURE__*/ defineChain({\n id: 18233,\n name: 'Unreal',\n nativeCurrency: {\n name: 'reETH',\n decimals: 18,\n symbol: 'reETH',\n },\n rpcUrls: {\n default: { http: ['https://rpc.unreal-orbit.gelato.digital'] },\n },\n blockExplorers: {\n default: {\n name: 'Unreal Explorer',\n url: 'https://unreal.blockscout.com',\n apiUrl: 'https://unreal.blockscout.com/api/v2',\n },\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: '0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677',\n blockCreated: 1745,\n },\n },\n});\n//# sourceMappingURL=unreal.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const vechain = /*#__PURE__*/ defineChain({\n id: 100009,\n name: 'Vechain',\n nativeCurrency: { name: 'VeChain', symbol: 'VET', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.vechain.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Vechain Explorer',\n url: 'https://explore.vechain.org',\n },\n vechainStats: {\n name: 'Vechain Stats',\n url: 'https://vechainstats.com',\n },\n },\n});\n//# sourceMappingURL=vechain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const velas = /*#__PURE__*/ defineChain({\n id: 106,\n name: 'Velas EVM Mainnet',\n nativeCurrency: { name: 'VLX', symbol: 'VLX', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://evmexplorer.velas.com/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Velas Explorer',\n url: 'https://evmexplorer.velas.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=velas.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const viction = /*#__PURE__*/ defineChain({\n id: 88,\n name: 'Viction',\n nativeCurrency: { name: 'Viction', symbol: 'VIC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.viction.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'VIC Scan',\n url: 'https://vicscan.xyz',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=viction.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const victionTestnet = /*#__PURE__*/ defineChain({\n id: 89,\n name: 'Viction Testnet',\n nativeCurrency: { name: 'Viction', symbol: 'VIC', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc-testnet.viction.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'VIC Scan',\n url: 'https://testnet.vicscan.xyz',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 12170179,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=victionTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const vision = /*#__PURE__*/ defineChain({\n id: 888888,\n name: 'Vision',\n nativeCurrency: { name: 'VISION', symbol: 'VS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://infragrid.v.network/ethereum/compatible'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Vision Scan',\n url: 'https://visionscan.org',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=vision.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const visionTestnet = /*#__PURE__*/ defineChain({\n id: 666666,\n name: 'Vision Testnet',\n nativeCurrency: { name: 'VISION', symbol: 'VS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://vpioneer.infragrid.v.network/ethereum/compatible'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Vision Scan',\n url: 'https://visionscan.org/?chain=vpioneer',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=visionTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const wanchain = /*#__PURE__*/ defineChain({\n id: 888,\n name: 'Wanchain',\n nativeCurrency: { name: 'WANCHAIN', symbol: 'WAN', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://gwan-ssl.wandevs.org:56891',\n 'https://gwan2-ssl.wandevs.org',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'WanScan',\n url: 'https://wanscan.org',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB',\n blockCreated: 25312390,\n },\n },\n});\n//# sourceMappingURL=wanchain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const wanchainTestnet = /*#__PURE__*/ defineChain({\n id: 999,\n name: 'Wanchain Testnet',\n nativeCurrency: { name: 'WANCHAIN', symbol: 'WANt', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://gwan-ssl.wandevs.org:46891'],\n },\n },\n blockExplorers: {\n default: {\n name: 'WanScanTest',\n url: 'https://wanscan.org',\n },\n },\n contracts: {\n multicall3: {\n address: '0x11c89bF4496c39FB80535Ffb4c92715839CC5324',\n blockCreated: 24743448,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=wanchainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const weaveVMAlphanet = /*#__PURE__*/ defineChain({\n id: 9496,\n name: 'WeaveVM Alphanet',\n nativeCurrency: { name: 'Testnet WeaveVM', symbol: 'tWVM', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://testnet-rpc.wvm.dev'] },\n },\n blockExplorers: {\n default: {\n name: 'WeaveVM Alphanet Explorer',\n url: 'https://explorer.wvm.dev',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=weavevmAlphanet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const wemix = /*#__PURE__*/ defineChain({\n id: 1111,\n name: 'WEMIX',\n network: 'wemix-mainnet',\n nativeCurrency: { name: 'WEMIX', symbol: 'WEMIX', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://api.wemix.com'] },\n },\n blockExplorers: {\n default: {\n name: 'wemixExplorer',\n url: 'https://explorer.wemix.com',\n },\n },\n});\n//# sourceMappingURL=wemix.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const wemixTestnet = /*#__PURE__*/ defineChain({\n id: 1112,\n name: 'WEMIX Testnet',\n network: 'wemix-testnet',\n nativeCurrency: { name: 'WEMIX', symbol: 'tWEMIX', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://api.test.wemix.com'] },\n },\n blockExplorers: {\n default: {\n name: 'wemixExplorer',\n url: 'https://testnet.wemixscan.com',\n apiUrl: 'https://testnet.wemixscan.com/api',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=wemixTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const worldchain = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 480,\n name: 'World Chain',\n network: 'worldchain',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://worldchain-mainnet.g.alchemy.com/public'] },\n },\n blockExplorers: {\n default: {\n name: 'Worldscan',\n url: 'https://worldscan.org',\n apiUrl: 'https://api.worldscan.org/api',\n },\n blockscout: {\n name: 'Blockscout',\n url: 'https://worldchain-mainnet.explorer.alchemy.com',\n apiUrl: 'https://worldchain-mainnet.explorer.alchemy.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 0,\n },\n disputeGameFactory: {\n [sourceId]: {\n address: '0x0E90dCAFBC242D2C861A20Bb20EC8E7182965a52',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x19A6d1E9034596196295CF148509796978343c5D',\n },\n },\n portal: {\n [sourceId]: {\n address: '0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x470458C91978D2d929704489Ad730DC3E3001113',\n },\n },\n },\n testnet: false,\n sourceId,\n});\n//# sourceMappingURL=worldchain.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const worldchainSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 4801,\n name: 'World Chain Sepolia',\n network: 'worldchain-sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: { http: ['https://worldchain-sepolia.g.alchemy.com/public'] },\n public: { http: ['https://worldchain-sepolia.g.alchemy.com/public'] },\n },\n blockExplorers: {\n default: {\n name: 'Worldscan Sepolia',\n url: 'https://sepolia.worldscan.org',\n },\n blockscout: {\n name: 'Blockscout',\n url: 'https://worldchain-sepolia.explorer.alchemy.com',\n apiUrl: 'https://worldchain-sepolia.explorer.alchemy.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 0,\n },\n disputeGameFactory: {\n [sourceId]: {\n address: '0x8cF97Ee616C986a070F5020d973b456D0120C253',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e',\n },\n },\n portal: {\n [sourceId]: {\n address: '0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE',\n },\n },\n },\n testnet: true,\n sourceId,\n});\n//# sourceMappingURL=worldchainSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xai = /*#__PURE__*/ defineChain({\n id: 660279,\n name: 'Xai Mainnet',\n nativeCurrency: { name: 'Xai', symbol: 'XAI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://xai-chain.net/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://explorer.xai-chain.net',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 222549,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=xai.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xaiTestnet = /*#__PURE__*/ defineChain({\n id: 37714555429,\n name: 'Xai Testnet',\n nativeCurrency: { name: 'sXai', symbol: 'sXAI', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://testnet-v2.xai-chain.net/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://testnet-explorer-v2.xai-chain.net',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=xaiTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xdc = /*#__PURE__*/ defineChain({\n id: 50,\n name: 'XinFin Network',\n nativeCurrency: {\n decimals: 18,\n name: 'XDC',\n symbol: 'XDC',\n },\n rpcUrls: {\n default: { http: ['https://rpc.xdcrpc.com'] },\n },\n blockExplorers: {\n default: {\n name: 'XDCScan',\n url: 'https://xdcscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF',\n blockCreated: 75884020,\n },\n },\n});\n//# sourceMappingURL=xdc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xdcTestnet = /*#__PURE__*/ defineChain({\n id: 51,\n name: 'Apothem Network',\n nativeCurrency: {\n decimals: 18,\n name: 'TXDC',\n symbol: 'TXDC',\n },\n rpcUrls: {\n default: { http: ['https://erpc.apothem.network'] },\n },\n blockExplorers: {\n default: {\n name: 'XDCScan',\n url: 'https://testnet.xdcscan.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 59765389,\n },\n },\n});\n//# sourceMappingURL=xdcTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xLayer = /*#__PURE__*/ defineChain({\n id: 196,\n name: 'X Layer Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'OKB',\n symbol: 'OKB',\n },\n rpcUrls: {\n default: { http: ['https://rpc.xlayer.tech'] },\n },\n blockExplorers: {\n default: {\n name: 'OKLink',\n url: 'https://www.oklink.com/xlayer',\n apiUrl: 'https://www.oklink.com/api/v5/explorer/xlayer/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 47416,\n },\n },\n});\n//# sourceMappingURL=xLayer.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xLayerTestnet = /*#__PURE__*/ defineChain({\n id: 195,\n name: 'X1 Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'OKB',\n symbol: 'OKB',\n },\n rpcUrls: {\n default: { http: ['https://xlayertestrpc.okx.com'] },\n },\n blockExplorers: {\n default: {\n name: 'OKLink',\n url: 'https://www.oklink.com/xlayer-test',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 624344,\n },\n },\n testnet: true,\n});\nexport { xLayerTestnet as x1Testnet };\n//# sourceMappingURL=xLayerTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const xrSepolia = /*#__PURE__*/ defineChain({\n id: 2730,\n name: 'XR Sepolia',\n nativeCurrency: {\n decimals: 18,\n name: 'tXR',\n symbol: 'tXR',\n },\n rpcUrls: {\n default: { http: ['https://xr-sepolia-testnet.rpc.caldera.xyz/http'] },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://xr-sepolia-testnet.explorer.caldera.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=xrSepolia.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const yooldoVerse = /*#__PURE__*/ defineChain({\n id: 50_005,\n name: 'Yooldo Verse',\n nativeCurrency: { name: 'OAS', symbol: 'OAS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.yooldo-verse.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Yooldo Verse Explorer',\n url: 'https://explorer.yooldo-verse.xyz',\n },\n },\n});\n//# sourceMappingURL=yooldoVerse.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const yooldoVerseTestnet = /*#__PURE__*/ defineChain({\n id: 50_006,\n name: 'Yooldo Verse Testnet',\n nativeCurrency: { name: 'OAS', symbol: 'OAS', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.testnet.yooldo-verse.xyz'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Yooldo Verse Testnet Explorer',\n url: 'https://explorer.testnet.yooldo-verse.xyz',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=yooldoVerseTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zenchainTestnet = /*#__PURE__*/ defineChain({\n id: 8408,\n name: 'Zenchain Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'ZCX',\n symbol: 'ZCX',\n },\n rpcUrls: {\n default: {\n http: ['https://zenchain-testnet.api.onfinality.io/public'],\n webSocket: ['wss://zenchain-testnet.api.onfinality.io/public-ws'],\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 230019,\n },\n },\n blockExplorers: {\n default: {\n name: 'Zentrace',\n url: 'https://zentrace.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zenchainTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zeniq = /*#__PURE__*/ defineChain({\n id: 383414847825,\n name: 'Zeniq Mainnet',\n nativeCurrency: { name: 'ZENIQ', symbol: 'ZENIQ', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.zeniq.network'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Zeniq Explorer',\n url: 'https://zeniqscan.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=zeniq.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zetachain = /*#__PURE__*/ defineChain({\n id: 7000,\n name: 'ZetaChain',\n nativeCurrency: {\n decimals: 18,\n name: 'Zeta',\n symbol: 'ZETA',\n },\n rpcUrls: {\n default: {\n http: ['https://zetachain-evm.blockpi.network/v1/rpc/public'],\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 1632781,\n },\n },\n blockExplorers: {\n default: {\n name: 'ZetaScan',\n url: 'https://explorer.zetachain.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=zetachain.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zetachainAthensTestnet = /*#__PURE__*/ defineChain({\n id: 7001,\n name: 'ZetaChain Athens Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Zeta',\n symbol: 'aZETA',\n },\n rpcUrls: {\n default: {\n http: ['https://zetachain-athens-evm.blockpi.network/v1/rpc/public'],\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 2715217,\n },\n },\n blockExplorers: {\n default: {\n name: 'ZetaScan',\n url: 'https://athens.explorer.zetachain.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zetachainAthensTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zhejiang = /*#__PURE__*/ defineChain({\n id: 1_337_803,\n name: 'Zhejiang',\n nativeCurrency: { name: 'Zhejiang Ether', symbol: 'ZhejETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.zhejiang.ethpandaops.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Beaconchain',\n url: 'https://zhejiang.beaconcha.in',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zhejiang.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zilliqa = /*#__PURE__*/ defineChain({\n id: 32769,\n name: 'Zilliqa',\n network: 'zilliqa',\n nativeCurrency: { name: 'Zilliqa', symbol: 'ZIL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://api.zilliqa.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ethernal',\n url: 'https://evmx.zilliqa.com',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=zilliqa.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zilliqaTestnet = /*#__PURE__*/ defineChain({\n id: 33101,\n name: 'Zilliqa Testnet',\n network: 'zilliqa-testnet',\n nativeCurrency: { name: 'Zilliqa', symbol: 'ZIL', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://dev-api.zilliqa.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Ethernal',\n url: 'https://evmx.testnet.zilliqa.com',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zilliqaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zircuit = /*#__PURE__*/ defineChain({\n id: 48900,\n name: 'Zircuit Mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: [\n 'https://zircuit1-mainnet.p2pify.com',\n 'https://zircuit1-mainnet.liquify.com',\n 'https://zircuit-mainnet.drpc.org',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Zircuit Explorer',\n url: 'https://explorer.zircuit.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=zircuit.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zircuitTestnet = /*#__PURE__*/ defineChain({\n id: 48899,\n name: 'Zircuit Testnet',\n nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n 'https://zircuit1-testnet.p2pify.com',\n 'https://zircuit1-testnet.liquify.com',\n ],\n },\n },\n blockExplorers: {\n default: {\n name: 'Zircuit Testnet Explorer',\n url: 'https://explorer.testnet.zircuit.com',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 6040287,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zircuitTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zkFair = /*#__PURE__*/ defineChain({\n id: 42766,\n name: 'ZKFair Mainnet',\n network: 'zkfair-mainnet',\n nativeCurrency: {\n decimals: 18,\n name: 'USD Coin',\n symbol: 'USDC',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.zkfair.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'zkFair Explorer',\n url: 'https://scan.zkfair.io',\n apiUrl: 'https://scan.zkfair.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 6090959,\n },\n },\n testnet: false,\n});\n//# sourceMappingURL=zkFair.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zkFairTestnet = /*#__PURE__*/ defineChain({\n id: 43851,\n name: 'ZKFair Testnet',\n network: 'zkfair-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'USD Coin',\n symbol: 'USDC',\n },\n rpcUrls: {\n default: {\n http: ['https://testnet-rpc.zkfair.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'zkFair Explorer',\n url: 'https://testnet-scan.zkfair.io',\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zkFairTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zkLinkNova = /*#__PURE__*/ defineChain({\n id: 810180,\n name: 'zkLink Nova',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://rpc.zklink.io'] },\n },\n blockExplorers: {\n default: {\n name: 'zkLink Nova Block Explorer',\n url: 'https://explorer.zklink.io',\n },\n },\n});\n//# sourceMappingURL=zkLinkNova.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const zkLinkNovaSepoliaTestnet = /*#__PURE__*/ defineChain({\n id: 810181,\n name: 'zkLink Nova Sepolia Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'ETH',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: { http: ['https://sepolia.rpc.zklink.io'] },\n },\n blockExplorers: {\n default: {\n name: 'zkLink Nova Block Explorer',\n url: 'https://sepolia.explorer.zklink.io',\n },\n },\n});\n//# sourceMappingURL=zkLinkNovaSepoliaTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const zksync = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 324,\n name: 'ZKsync Era',\n network: 'zksync-era',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://mainnet.era.zksync.io'],\n webSocket: ['wss://mainnet.era.zksync.io/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://era.zksync.network/',\n apiUrl: 'https://api-era.zksync.network/api',\n },\n native: {\n name: 'ZKsync Explorer',\n url: 'https://explorer.zksync.io/',\n apiUrl: 'https://block-explorer-api.mainnet.zksync.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xF9cda624FBC7e059355ce98a31693d299FACd963',\n },\n universalSignatureVerifier: {\n address: '0xfB688330379976DA81eB64Fe4BF50d7401763B9C',\n blockCreated: 45659388,\n },\n },\n});\n//# sourceMappingURL=zksync.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const zksyncInMemoryNode = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 260,\n name: 'ZKsync InMemory Node',\n network: 'zksync-in-memory-node',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['http://localhost:8011'],\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zksyncInMemoryNode.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const zksyncLocalNode = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 270,\n name: 'ZKsync CLI Local Node',\n network: 'zksync-cli-local-node',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['http://localhost:3050'],\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zksyncLocalNode.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nimport { chainConfig } from '../../zksync/chainConfig.js';\nexport const zksyncSepoliaTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 300,\n name: 'ZKsync Sepolia Testnet',\n network: 'zksync-sepolia-testnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.era.zksync.dev'],\n webSocket: ['wss://sepolia.era.zksync.dev/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia-era.zksync.network/',\n apiUrl: 'https://api-sepolia-era.zksync.network/api',\n },\n native: {\n name: 'ZKsync Explorer',\n url: 'https://sepolia.explorer.zksync.io/',\n blockExplorerApi: 'https://block-explorer-api.sepolia.zksync.dev/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xF9cda624FBC7e059355ce98a31693d299FACd963',\n },\n universalSignatureVerifier: {\n address: '0xfB688330379976DA81eB64Fe4BF50d7401763B9C',\n blockCreated: 3855712,\n },\n },\n testnet: true,\n});\n//# sourceMappingURL=zksyncSepoliaTestnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const zora = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 7777777,\n name: 'Zora',\n nativeCurrency: {\n decimals: 18,\n name: 'Ether',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://rpc.zora.energy'],\n webSocket: ['wss://rpc.zora.energy'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://explorer.zora.energy',\n apiUrl: 'https://explorer.zora.energy/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x9E6204F750cD866b299594e2aC9eA824E2e5f95c',\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 5882,\n },\n portal: {\n [sourceId]: {\n address: '0x1a0ad011913A150f69f6A19DF447A0CfD9551054',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x3e2Ea9B92B7E48A52296fD261dc26fd995284631',\n },\n },\n },\n sourceId,\n});\n//# sourceMappingURL=zora.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const zoraSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 999999999,\n name: 'Zora Sepolia',\n network: 'zora-sepolia',\n nativeCurrency: {\n decimals: 18,\n name: 'Zora Sepolia',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia.rpc.zora.energy'],\n webSocket: ['wss://sepolia.rpc.zora.energy'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Zora Sepolia Explorer',\n url: 'https://sepolia.explorer.zora.energy/',\n apiUrl: 'https://sepolia.explorer.zora.energy/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId]: {\n address: '0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9',\n },\n },\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 83160,\n },\n portal: {\n [sourceId]: {\n address: '0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB',\n },\n },\n },\n sourceId,\n testnet: true,\n});\n//# sourceMappingURL=zoraSepolia.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 5; // goerli\nexport const zoraTestnet = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 999,\n name: 'Zora Goerli Testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'Zora Goerli',\n symbol: 'ETH',\n },\n rpcUrls: {\n default: {\n http: ['https://testnet.rpc.zora.energy'],\n webSocket: ['wss://testnet.rpc.zora.energy'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Explorer',\n url: 'https://testnet.explorer.zora.energy',\n apiUrl: 'https://testnet.explorer.zora.energy/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 189123,\n },\n portal: {\n [sourceId]: {\n address: '0xDb9F51790365e7dc196e7D072728df39Be958ACe',\n },\n },\n },\n sourceId,\n testnet: true,\n});\n//# sourceMappingURL=zoraTestnet.js.map","import * as allEvmChains from 'viem/chains'\nimport type { EvmNetworkConfigInterface } from './Provider'\nconst networks: Record = {}\n\nfor (const key of Object.keys(allEvmChains)) {\n const chain: allEvmChains.Chain = allEvmChains[key as keyof typeof allEvmChains]\n\n if (chain.id === undefined) {\n continue\n }\n\n let backupRpcUrl = ''\n if (chain.rpcUrls?.infura !== undefined) {\n backupRpcUrl = chain.rpcUrls.infura.http[0]\n } else if (chain.rpcUrls?.alchemy !== undefined) {\n backupRpcUrl = chain.rpcUrls.alchemy.http[0]\n }\n\n const network: EvmNetworkConfigInterface = {\n id: chain.id,\n name: chain.name,\n testnet: chain.testnet ?? false,\n nativeCurrency: chain.nativeCurrency,\n hexId: '0x' + Number(chain.id).toString(16),\n explorerUrl: chain.blockExplorers?.default.url ?? '',\n rpcUrl: chain.rpcUrls?.default.http[0] ?? backupRpcUrl\n }\n\n if (chain.rpcUrls?.default.webSocket !== undefined) {\n network.wsUrl = chain.rpcUrls.default.webSocket[0]\n }\n\n if (chain.rpcUrls?.infura?.webSocket !== undefined && network.wsUrl === undefined) {\n network.wsUrl = chain.rpcUrls.infura.webSocket[0]\n }\n\n if (chain.rpcUrls?.alchemy?.webSocket !== undefined && network.wsUrl === undefined) {\n network.wsUrl = chain.rpcUrls.alchemy.webSocket[0]\n }\n\n if (network.wsUrl === undefined) {\n delete network.wsUrl\n }\n\n networks[key === 'mainnet' ? 'ethereum' : key] = network\n}\n\nconst findById = (id: number): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.id === id)\n}\n\nconst findByKey = (key: string): EvmNetworkConfigInterface | undefined => {\n return networks[key]\n}\n\nconst findByName = (name: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.name?.includes(name))\n}\n\nconst findByHexId = (hexId: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.hexId === hexId)\n}\n\nconst findBySymbol = (symbol: string): EvmNetworkConfigInterface | undefined => {\n return Object.values(networks).find((network) => network.nativeCurrency.symbol === symbol)\n}\n\nconst getTestnets = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks).filter((network) => network.testnet ?? false)\n}\n\nconst getMainnets = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks).filter((network) => !(network.testnet ?? false))\n}\n\nconst getAll = (): EvmNetworkConfigInterface[] => {\n return Object.values(networks)\n}\n\nconst add = (key: string, network: EvmNetworkConfigInterface): void => {\n networks[key] = network\n}\n\nexport default {\n add,\n getAll,\n findById,\n findByKey,\n findByName,\n findByHexId,\n findBySymbol,\n getTestnets,\n getMainnets,\n ...networks\n}\n","import type { RequestType } from '../Wallet'\nimport networks from '../../services/Networks'\nimport type { EIP1193Provider } from './EIP6963'\nimport { ErrorTypeEnum } from '@multiplechain/types'\nimport type { EvmNetworkConfigInterface, Provider } from '../../services/Provider'\n\nexport const switcher = async (wallet: EIP1193Provider, provider?: Provider): Promise => {\n const network = provider?.network\n\n const request = async (params: RequestType): Promise => {\n const res = await wallet.request(params)\n if (res?.error !== undefined) {\n const error = res.error as {\n code: number\n message: string\n }\n if (error.code === -32000) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(error.message)\n }\n\n return res\n }\n\n const addNetwork = async (network: EvmNetworkConfigInterface): Promise => {\n return await new Promise((resolve, reject) => {\n try {\n request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: network.hexId,\n chainName: network.name,\n rpcUrls: [network.rpcUrl],\n nativeCurrency: network.nativeCurrency,\n blockExplorerUrls: [network.explorerUrl]\n }\n ]\n })\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n\n const changeNetwork = async (_network: EvmNetworkConfigInterface): Promise => {\n return await new Promise((resolve, reject) => {\n const chainId = `0x${_network.id.toString(16)}`\n request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId }]\n })\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n if (\n error.code === 4902 ||\n String(error.message).includes('wallet_addEthereumChain')\n ) {\n const network = networks.findById(_network.id)\n if (network === undefined) {\n resolve(true)\n return\n }\n addNetwork(network)\n .then(() => {\n resolve(true)\n })\n .catch((error) => {\n reject(error)\n })\n } else {\n if (\n (typeof error === 'object' ? error : {}).message.includes(\n 'wallet_switchEthereumChain'\n ) === true\n ) {\n return\n }\n reject(error)\n }\n })\n })\n }\n\n const getChainId = async (): Promise => {\n return parseInt((await request({ method: 'eth_chainId' })) as string, 16)\n }\n\n const maybeSwitch = async (): Promise => {\n return await new Promise((resolve, reject) => {\n if (network === undefined) {\n resolve(true)\n return\n }\n try {\n const check = async (): Promise => {\n if ((await getChainId()) !== network.id) {\n changeNetwork(network)\n .then(() => {\n setTimeout(() => {\n resolve(true)\n }, 1000)\n })\n .catch((error) => {\n reject(error)\n })\n } else {\n resolve(true)\n }\n }\n void check()\n } catch (error) {\n reject(error)\n }\n })\n }\n\n return await maybeSwitch()\n}\n","export default {\n metaMask:\n 'data:image/svg+xml,%3Csvg%20fill%3D%22none%22%20height%3D%2233%22%20viewBox%3D%220%200%2035%2033%22%20width%3D%2235%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%22.25%22%3E%3Cpath%20d%3D%22m32.9582%201-13.1341%209.7183%202.4424-5.72731z%22%20fill%3D%22%23e17726%22%20stroke%3D%22%23e17726%22%2F%3E%3Cg%20fill%3D%22%23e27625%22%20stroke%3D%22%23e27625%22%3E%3Cpath%20d%3D%22m2.66296%201%2013.01714%209.809-2.3254-5.81802z%22%2F%3E%3Cpath%20d%3D%22m28.2295%2023.5335-3.4947%205.3386%207.4829%202.0603%202.1436-7.2823z%22%2F%3E%3Cpath%20d%3D%22m1.27281%2023.6501%202.13055%207.2823%207.46994-2.0603-3.48166-5.3386z%22%2F%3E%3Cpath%20d%3D%22m10.4706%2014.5149-2.0786%203.1358%207.405.3369-.2469-7.969z%22%2F%3E%3Cpath%20d%3D%22m25.1505%2014.5149-5.1575-4.58704-.1688%208.05974%207.4049-.3369z%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721%204.4819-2.1639-3.8583-3.0062z%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082%204.4689%202.1639-.6105-5.1701z%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m24.7348%2028.8721-4.469-2.1639.3638%202.9025-.039%201.231z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m10.8732%2028.8721%204.1572%201.9696-.026-1.231.3508-2.9025z%22%20fill%3D%22%23d5bfb2%22%20stroke%3D%22%23d5bfb2%22%2F%3E%3Cpath%20d%3D%22m15.1084%2021.7842-3.7155-1.0884%202.6243-1.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m20.5126%2021.7842%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23233447%22%20stroke%3D%22%23233447%22%2F%3E%3Cpath%20d%3D%22m10.8733%2028.8721.6495-5.3386-4.13117.1167z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m24.0982%2023.5335.6366%205.3386%203.4946-5.2219z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m27.2291%2017.6507-7.405.3369.6885%203.7966%201.0913-2.2935%202.6372%201.2051z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958%202.6242-1.2051%201.0913%202.2935.6885-3.7966-7.40495-.3369z%22%20fill%3D%22%23cc6228%22%20stroke%3D%22%23cc6228%22%2F%3E%3Cpath%20d%3D%22m8.392%2017.6507%203.1049%206.0513-.1039-3.0062z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m24.2412%2020.6958-.1169%203.0062%203.1049-6.0513z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m15.797%2017.9876-.6886%203.7967.8704%204.4833.1949-5.9087z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m19.8242%2017.9876-.3638%202.3584.1819%205.9216.8704-4.4833z%22%20fill%3D%22%23e27525%22%20stroke%3D%22%23e27525%22%2F%3E%3Cpath%20d%3D%22m20.5127%2021.7842-.8704%204.4834.6236.4406%203.8584-3.0062.1169-3.0062z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m11.3929%2020.6958.104%203.0062%203.8583%203.0062.6236-.4406-.8704-4.4834z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m20.5906%2030.8417.039-1.231-.3378-.2851h-4.9626l-.3248.2851.026%201.231-4.1572-1.9696%201.4551%201.1921%202.9489%202.0344h5.0536l2.962-2.0344%201.442-1.1921z%22%20fill%3D%22%23c0ac9d%22%20stroke%3D%22%23c0ac9d%22%2F%3E%3Cpath%20d%3D%22m20.2659%2026.7082-.6236-.4406h-3.6635l-.6236.4406-.3508%202.9025.3248-.2851h4.9626l.3378.2851z%22%20fill%3D%22%23161616%22%20stroke%3D%22%23161616%22%2F%3E%3Cpath%20d%3D%22m33.5168%2011.3532%201.1043-5.36447-1.6629-4.98873-12.6923%209.3944%204.8846%204.1205%206.8983%202.0085%201.52-1.7752-.6626-.4795%201.0523-.9588-.8054-.622%201.0523-.8034z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m1%205.98873%201.11724%205.36447-.71451.5313%201.06527.8034-.80545.622%201.05228.9588-.66255.4795%201.51997%201.7752%206.89835-2.0085%204.8846-4.1205-12.69233-9.3944z%22%20fill%3D%22%23763e1a%22%20stroke%3D%22%23763e1a%22%2F%3E%3Cpath%20d%3D%22m32.0489%2016.5234-6.8983-2.0085%202.0786%203.1358-3.1049%206.0513%204.1052-.0519h6.1318z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m10.4705%2014.5149-6.89828%202.0085-2.29944%207.1267h6.11883l4.10519.0519-3.10487-6.0513z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3Cpath%20d%3D%22m19.8241%2017.9876.4417-7.5932%202.0007-5.4034h-8.9119l2.0006%205.4034.4417%207.5932.1689%202.3842.013%205.8958h3.6635l.013-5.8958z%22%20fill%3D%22%23f5841f%22%20stroke%3D%22%23f5841f%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E',\n walletConnect:\n 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIgaWQ9IkxheWVyXzEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD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Lz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMTkxXzQyOTAiPgo8cmVjdCB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K'\n}\n","import icons from './icons'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst Phantom: WalletAdapterInterface = {\n id: 'phantom',\n name: 'Phantom',\n icon: icons.phantom,\n downloadLink: 'https://phantom.app/',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => Boolean(window?.phantom?.ethereum),\n createDeepLink: (url: string): string => `https://phantom.app/ul/browse/${url}?ref=${url}`,\n isConnected: async () => {\n return Boolean(\n (await window?.phantom?.ethereum?.request({ method: 'eth_accounts' })).length\n )\n },\n connect: async (): Promise => {\n return await new Promise((resolve, reject) => {\n const phantom = window?.phantom?.ethereum\n try {\n phantom\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n resolve(phantom)\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default Phantom\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { WindowEthereum } from './types'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst MetaMask: WalletAdapterInterface = {\n id: 'metamask',\n name: 'MetaMask',\n icon: icons.metaMask,\n downloadLink: 'https://metamask.io/download/',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => {\n return Boolean((window?.ethereum as unknown as WindowEthereum)?.isMetaMask)\n },\n createDeepLink: (url: string): string => `https://metamask.app.link/dapp/${url}`,\n isConnected: async () => {\n return Boolean(\n (\n await (window?.ethereum as unknown as WindowEthereum).request({\n method: 'eth_accounts'\n })\n ).length\n )\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const metamaskProvider = window?.ethereum as unknown as WindowEthereum\n try {\n metamaskProvider\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(metamaskProvider, provider)\n .then(() => {\n resolve(metamaskProvider)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default MetaMask\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst OkxWallet: WalletAdapterInterface = {\n id: 'okxwallet',\n name: 'OkxWallet',\n icon: icons.okxWallet,\n downloadLink: 'https://www.okx.com/download',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n createDeepLink: (url: string): string => `okx://wallet/dapp/details?dappUrl=${url}`,\n isDetected: () => Boolean(window?.okxwallet),\n isConnected: async () => {\n return Boolean((await window?.okxwallet?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const okx = window?.okxwallet\n try {\n okx\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(okx, provider)\n .then(() => {\n resolve(okx)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default OkxWallet\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport type { Provider } from '../../services/Provider'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst XdefiWallet: WalletAdapterInterface = {\n id: 'xdefiwallet',\n name: 'XdefiWallet',\n icon: icons.xdefiWallet,\n downloadLink: 'https://www.xdefi.io/',\n platforms: [WalletPlatformEnum.BROWSER],\n isDetected: () => Boolean(window?.xfi?.ethereum),\n isConnected: async () => {\n return Boolean((await window?.xfi?.ethereum?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const xfi = window?.xfi?.ethereum\n try {\n xfi\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(xfi, provider)\n .then(() => {\n resolve(xfi)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default XdefiWallet\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { WindowEthereum } from './types'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst TrustWallet: WalletAdapterInterface = {\n id: 'trustwallet',\n name: 'TrustWallet',\n icon: icons.trustWallet,\n downloadLink: 'https://trustwallet.com/download',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n isDetected: () => Boolean(window?.ethereum?.isTrust ?? window?.trustwallet),\n isConnected: async () => {\n // eslint-disable-next-line\n const trustWalletProvider = (window?.ethereum?.isTrust\n ? window.ethereum\n : window.trustwallet) as unknown as WindowEthereum\n return Boolean((await trustWalletProvider?.request({ method: 'eth_accounts' })).length)\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n try {\n // eslint-disable-next-line\n const trustWalletProvider = (window?.ethereum?.isTrust\n ? window.ethereum\n : window.trustwallet) as unknown as WindowEthereum\n trustWalletProvider\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n // because mobile wallet doesn't support testnets\n if (\n window?.ethereum?.isTrust !== undefined &&\n provider?.isTestnet() === true\n ) {\n resolve(trustWalletProvider)\n return\n }\n\n switcher(trustWalletProvider, provider)\n .then(() => {\n resolve(trustWalletProvider)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default TrustWallet\n","import { Provider } from '../services/Provider'\nimport type { Ethers } from '../services/Ethers'\nimport type { ContractAddress, ContractInterface, WalletAddress } from '@multiplechain/types'\nimport type { Contract as EthersContract, InterfaceAbi } from 'ethers'\nimport type { TransactionData } from '../services/TransactionSigner'\n\nexport class Contract implements ContractInterface {\n /**\n * Contract address\n */\n address: ContractAddress\n\n /**\n * Cached static methods\n */\n cachedMethods: Record = {}\n\n /**\n * Contract ABI\n */\n ABI: InterfaceAbi\n\n /**\n * Ethers contract\n */\n ethersContract: EthersContract\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * Ethers service\n */\n ethers: Ethers\n\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n this.ABI = ABI ?? []\n this.address = address\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n this.ethersContract = this.ethers.contract(address, this.ABI, this.ethers.jsonRpc)\n }\n\n /**\n * @returns Contract address\n */\n getAddress(): ContractAddress {\n return this.address\n }\n\n /**\n * @param method Method name\n * @param args Method parameters\n * @returns Method result\n */\n async callMethod(method: string, ...args: unknown[]): Promise {\n return this.ethersContract[method](...args) // eslint-disable-line\n }\n\n /**\n * @param method Method name\n * @param args Method parameters\n * @returns Method result\n */\n async callMethodWithCache(method: string, ...args: unknown[]): Promise {\n if (this.cachedMethods[method] !== undefined) {\n return this.cachedMethods[method]\n }\n\n return (this.cachedMethods[method] = await this.callMethod(method, ...args))\n }\n\n /**\n * @param method Method name\n * @param args Sender wallet address\n * @returns Encoded method data\n */\n async getMethodData(method: string, ...args: unknown[]): Promise {\n return this.ethersContract.interface.encodeFunctionData(method, args)\n }\n\n /**\n * @param method Method name\n * @param from Sender wallet address\n * @param args Method parameters\n * @returns Gas limit\n */\n async getMethodEstimateGas(\n method: string,\n from: WalletAddress,\n ...args: unknown[]\n ): Promise {\n return Number(await this.ethersContract[method].estimateGas(...args, { from })) // eslint-disable-line\n }\n\n /**\n * @param method Method name\n * @param from Sender wallet address\n * @param args Method parameters\n * @returns Transaction data\n */\n async createTransactionData(\n method: string,\n from: WalletAddress,\n ...args: unknown[]\n ): Promise {\n const [gasPrice, nonce, data, gasLimit] = await Promise.all([\n this.provider.ethers.getGasPrice(),\n this.provider.ethers.getNonce(from),\n this.getMethodData(method, ...args), // eslint-disable-line\n this.getMethodEstimateGas(method, from, ...args) // eslint-disable-line\n ])\n\n return {\n from,\n data,\n nonce,\n gasPrice,\n gasLimit,\n value: '0x0',\n to: this.getAddress(),\n chainId: this.provider.network.id\n }\n }\n}\n","import type { EthersError } from './Ethers'\nimport { Provider } from '../services/Provider'\nimport type { TransactionRequest, Wallet, BigNumberish } from 'ethers'\nimport {\n ErrorTypeEnum,\n type PrivateKey,\n type TransactionId,\n type TransactionSignerInterface\n} from '@multiplechain/types'\n\nexport interface TransactionData extends TransactionRequest {\n gas?: BigNumberish\n}\n\nexport class TransactionSigner implements TransactionSignerInterface {\n /**\n * Transaction data from the blockchain network\n */\n rawData: TransactionData\n\n /**\n * Signed transaction data\n */\n signedData: string\n\n /**\n * Wallet instance from ethers with the private key\n */\n wallet: Wallet\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * @param rawData Transaction data\n * @param provider Blockchain network provider\n */\n constructor(rawData: TransactionData, provider?: Provider) {\n this.rawData = rawData\n this.provider = provider ?? Provider.instance\n }\n\n /**\n * Sign the transaction\n * @param privateKey - Transaction data\n * @returns Signed transaction data\n */\n public async sign(privateKey: PrivateKey): Promise {\n try {\n this.wallet = this.provider.ethers.wallet(privateKey)\n this.signedData = await this.wallet.signTransaction(this.rawData)\n return this\n } catch (error) {\n const e = error as EthersError\n if (e?.shortMessage.includes('transaction from address mismatch')) {\n throw new Error(ErrorTypeEnum.INVALID_PRIVATE_KEY)\n }\n\n throw error\n }\n }\n\n /**\n * Send the transaction to the blockchain network\n * @returns Transaction data\n */\n async send(): Promise {\n return (await this.provider.ethers.jsonRpc.send('eth_sendRawTransaction', [\n this.signedData\n ])) as TransactionId\n }\n\n /**\n * Get the raw transaction data\n * @returns Transaction data\n */\n getRawData(): TransactionData {\n return this.rawData\n }\n\n /**\n * Get the signed transaction data\n * @returns Signed transaction data\n */\n getSignedData(): string {\n return this.signedData\n }\n}\n","import { Contract } from './Contract'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC721 from '../../resources/ERC721.json'\nimport type { Provider } from '../services/Provider'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type ContractAddress,\n type NftId,\n type NftInterface,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class NFT extends Contract implements NftInterface {\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n super(address, provider, ABI ?? ERC721)\n }\n\n /**\n * @returns NFT name\n */\n async getName(): Promise {\n return (await this.callMethodWithCache('name')) as string\n }\n\n /**\n * @returns NFT symbol\n */\n async getSymbol(): Promise {\n return (await this.callMethodWithCache('symbol')) as string\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of NFT\n */\n async getBalance(owner: WalletAddress): Promise {\n return Number(await this.callMethod('balanceOf', owner))\n }\n\n /**\n * @param nftId NFT ID\n * @returns Wallet address of the owner of the NFT\n */\n async getOwner(nftId: NftId): Promise {\n return (await this.callMethod('ownerOf', nftId)) as WalletAddress\n }\n\n /**\n * @param nftId NFT ID\n * @returns URI of the NFT\n */\n async getTokenURI(nftId: NftId): Promise {\n return (await this.callMethodWithCache('tokenURI', nftId)) as string\n }\n\n /**\n * @param nftId ID of the NFT that will be transferred\n * @returns Wallet address of the approved spender\n */\n async getApproved(nftId: NftId): Promise {\n const address = (await this.callMethod('getApproved', nftId)) as WalletAddress\n return address === '0x0000000000000000000000000000000000000000' ? null : address\n }\n\n /**\n * @param sender Sender address\n * @param receiver Receiver address\n * @param nftId NFT ID\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n nftId: NftId\n ): Promise {\n return await this.transferFrom(sender, sender, receiver, nftId)\n }\n\n /**\n * @param spender Spender address\n * @param owner Owner address\n * @param receiver Receiver address\n * @param nftId NFT ID\n * @returns Transaction signer\n */\n async transferFrom(\n spender: WalletAddress,\n owner: WalletAddress,\n receiver: WalletAddress,\n nftId: NftId\n ): Promise {\n // Check if tokens exist\n const balance = await this.getBalance(owner)\n\n if (balance <= 0) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n // Check ownership\n const originalOwner = await this.getOwner(nftId)\n if (originalOwner !== owner) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n // check if spender different from owner\n if (spender !== owner) {\n const approved = await this.getApproved(nftId)\n if (approved !== spender) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n }\n\n return new TransactionSigner(\n await this.createTransactionData('transferFrom', spender, owner, receiver, nftId)\n )\n }\n\n /**\n * Gives permission to the spender to spend owner's tokens\n * @param owner Address of owner of the tokens that will be used\n * @param spender Address of the spender that will use the tokens of owner\n * @param nftId ID of the NFT that will be transferred\n * @returns Transaction signer\n */\n async approve(\n owner: WalletAddress,\n spender: WalletAddress,\n nftId: NftId\n ): Promise {\n // Check if tokens exist\n const balance = await this.getBalance(owner)\n\n if (balance <= 0) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n // Check ownership\n const originalOwner = await this.getOwner(nftId)\n if (originalOwner !== owner) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n return new TransactionSigner(\n await this.createTransactionData('approve', owner, spender, nftId)\n )\n }\n}\n","import { Provider } from '../services/Provider'\nimport { hexToNumber, numberToHex } from '@multiplechain/utils'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport type { TransactionData } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type CoinInterface,\n type TransferAmount,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class Coin implements CoinInterface {\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * @param provider network provider\n */\n constructor(provider?: Provider) {\n this.provider = provider ?? Provider.instance\n }\n\n /**\n * @returns Coin name\n */\n getName(): string {\n return (\n this.provider.network.nativeCurrency.name ?? this.provider.network.nativeCurrency.symbol\n )\n }\n\n /**\n * @returns Coin symbol\n */\n getSymbol(): string {\n return this.provider.network.nativeCurrency.symbol\n }\n\n /**\n * @returns Decimal value of the coin\n */\n getDecimals(): number {\n return this.provider.network.nativeCurrency.decimals\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of COIN\n */\n async getBalance(owner: WalletAddress): Promise {\n const balance = await this.provider.ethers.getBalance(owner)\n return hexToNumber(balance.toString(), this.getDecimals())\n }\n\n /**\n * @param sender Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of assets that will be transferred\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n if (amount > (await this.getBalance(sender))) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, this.getDecimals())\n\n const txData: TransactionData = {\n data: '0x',\n to: receiver,\n from: sender,\n value: hexAmount,\n chainId: this.provider.network.id\n }\n\n const [gasPrice, nonce, gasLimit] = await Promise.all([\n this.provider.ethers.getGasPrice(),\n this.provider.ethers.getNonce(sender),\n this.provider.ethers.getEstimateGas(txData)\n ])\n\n txData.nonce = nonce\n txData.gasPrice = gasPrice\n txData.gasLimit = gasLimit\n\n return new TransactionSigner(txData)\n }\n}\n","import { Contract } from './Contract'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC20 from '../../resources/ERC20.json'\nimport type { Provider } from '../services/Provider'\nimport { hexToNumber, numberToHex } from '@multiplechain/utils'\nimport { TransactionSigner } from '../services/TransactionSigner'\nimport {\n ErrorTypeEnum,\n type ContractAddress,\n type TokenInterface,\n type TransferAmount,\n type WalletAddress\n} from '@multiplechain/types'\n\nexport class Token extends Contract implements TokenInterface {\n /**\n * @param address Contract address\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(address: ContractAddress, provider?: Provider, ABI?: InterfaceAbi) {\n super(address, provider, ABI ?? ERC20)\n }\n\n /**\n * @returns Token name\n */\n async getName(): Promise {\n return (await this.callMethodWithCache('name')) as string\n }\n\n /**\n * @returns Token symbol\n */\n async getSymbol(): Promise {\n return (await this.callMethodWithCache('symbol')) as string\n }\n\n /**\n * @returns Decimal value of the token\n */\n async getDecimals(): Promise {\n return Number(await this.callMethodWithCache('decimals'))\n }\n\n /**\n * @param owner Wallet address\n * @returns Wallet balance as currency of TOKEN\n */\n async getBalance(owner: WalletAddress): Promise {\n const [decimals, balance] = await Promise.all([\n this.getDecimals(),\n this.callMethod('balanceOf', owner)\n ])\n return hexToNumber(balance as string, decimals)\n }\n\n /**\n * @returns Total supply of the token\n */\n async getTotalSupply(): Promise {\n const [decimals, totalSupply] = await Promise.all([\n this.getDecimals(),\n this.callMethod('totalSupply')\n ])\n return hexToNumber(totalSupply as string, decimals)\n }\n\n /**\n * @param owner Address of owner of the tokens that is being used\n * @param spender Address of the spender that is using the tokens of owner\n * @returns Amount of tokens that the spender is allowed to spend\n */\n async getAllowance(owner: WalletAddress, spender: WalletAddress): Promise {\n const [decimals, allowance] = await Promise.all([\n this.getDecimals(),\n await this.callMethod('allowance', owner, spender)\n ])\n return hexToNumber(allowance as string, decimals)\n }\n\n /**\n * transfer() method is the main method for processing transfers for fungible assets (TOKEN, COIN)\n * @param sender Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of assets that will be transferred\n * @returns Transaction signer\n */\n async transfer(\n sender: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount <= 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(sender)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('transfer', sender, receiver, hexAmount)\n )\n }\n\n /**\n * @param spender Address of the spender of transaction\n * @param owner Sender wallet address\n * @param receiver Receiver wallet address\n * @param amount Amount of tokens that will be transferred\n * @returns Transaction signer\n */\n async transferFrom(\n spender: WalletAddress,\n owner: WalletAddress,\n receiver: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(owner)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const allowance = await this.getAllowance(owner, spender)\n\n if (allowance === 0) {\n throw new Error(ErrorTypeEnum.UNAUTHORIZED_ADDRESS)\n }\n\n if (amount > allowance) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('transferFrom', spender, owner, receiver, hexAmount)\n )\n }\n\n /**\n * Gives permission to the spender to spend owner's tokens\n * @param owner Address of owner of the tokens that will be used\n * @param spender Address of the spender that will use the tokens of owner\n * @param amount Amount of the tokens that will be used\n * @returns Transaction signer\n */\n async approve(\n owner: WalletAddress,\n spender: WalletAddress,\n amount: TransferAmount\n ): Promise {\n if (amount < 0) {\n throw new Error(ErrorTypeEnum.INVALID_AMOUNT)\n }\n\n const balance = await this.getBalance(owner)\n\n if (amount > balance) {\n throw new Error(ErrorTypeEnum.INSUFFICIENT_BALANCE)\n }\n\n const hexAmount = numberToHex(amount, await this.getDecimals())\n\n return new TransactionSigner(\n await this.createTransactionData('approve', owner, spender, hexAmount)\n )\n }\n}\n","import { Provider } from '../services/Provider'\nimport { ErrorTypeEnum, TransactionStatusEnum } from '@multiplechain/types'\nimport {\n TransactionTypeEnum,\n type BlockConfirmationCount,\n type BlockNumber,\n type BlockTimestamp,\n type TransactionFee,\n type TransactionId,\n type TransactionInterface,\n type WalletAddress\n} from '@multiplechain/types'\nimport type { TransactionReceipt, TransactionResponse } from 'ethers'\nimport type { Ethers } from '../services/Ethers'\nimport { hexToNumber } from '@multiplechain/utils'\nimport { NFT } from '../assets/NFT'\n\nconst selectors = {\n // ERC20\n [TransactionTypeEnum.TOKEN]: [\n '0xa9059cbb', // transfer(address,uint256)\n '0x095ea7b3', // approve(address,uint256)\n '0x23b872dd' // transferFrom(address,address,uint256)\n ],\n // ERC721, ERC1155\n [TransactionTypeEnum.NFT]: [\n // ERC721\n '0x23b872dd', // transferFrom(address,address,uint256)\n '0x095ea7b3', // approve(address,uint256)\n '0x42842e0e', // safeTransferFrom(address,address,uint256)\n '0xb88d4fde', // safeTransferFrom(address,address,uint256,bytes)\n // ERC1155\n '0xf242432a', // safeTransferFrom(address,address,uint256,uint256,bytes)\n '0x2eb2c2d6', // safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\n '0x29535c7e' // setApprovalForAll(address,bool)\n ]\n}\n\ninterface TransactionData {\n response: TransactionResponse\n receipt: TransactionReceipt | null\n}\n\nexport class Transaction implements TransactionInterface {\n /**\n * Each transaction has its own unique ID defined by the user\n */\n id: TransactionId\n\n /**\n * Blockchain network provider\n */\n provider: Provider\n\n /**\n * Ethers service\n */\n ethers: Ethers\n\n /**\n * Transaction data after completed\n */\n data: TransactionData\n\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n */\n constructor(id: TransactionId, provider?: Provider) {\n this.id = id\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n }\n\n /**\n * @returns Transaction data\n */\n async getData(): Promise {\n if (this.data?.response !== undefined && this.data?.receipt !== null) {\n return this.data\n }\n try {\n const response = await this.ethers.getTransaction(this.id)\n if (response === null) {\n return null\n }\n const receipt = await this.ethers.getTransactionReceipt(this.id)\n return (this.data = { response, receipt })\n } catch (error) {\n if (error instanceof Error && String(error.message).includes('timeout')) {\n throw new Error(ErrorTypeEnum.RPC_TIMEOUT)\n }\n throw new Error(ErrorTypeEnum.RPC_REQUEST_ERROR)\n }\n }\n\n /**\n * @param ms - Milliseconds to wait for the transaction to be confirmed. Default is 4000ms\n * @returns Status of the transaction\n */\n async wait(ms: number = 4000): Promise {\n return await new Promise((resolve, reject) => {\n const check = async (): Promise => {\n try {\n await this.provider.ethers.jsonRpc.waitForTransaction(this.id, 1)\n const status = await this.getStatus()\n if (status !== TransactionStatusEnum.PENDING) {\n resolve(status)\n return\n }\n setTimeout(check, ms)\n } catch (error) {\n reject(TransactionStatusEnum.FAILED)\n }\n }\n void check()\n })\n }\n\n /**\n * @returns Transaction id from the blockchain network\n */\n getId(): TransactionId {\n return this.id\n }\n\n /**\n * @returns Type of the transaction\n */\n async getType(): Promise {\n const txData = await this.getData()\n\n if (txData === null) {\n return TransactionTypeEnum.GENERAL\n }\n\n const contractBytecode = await this.provider.ethers.getByteCode(txData.response.to ?? '')\n\n if (contractBytecode === '0x' || txData.response.data === '0x') {\n return TransactionTypeEnum.COIN\n }\n\n const type = Object.entries(selectors).find(([_key, values]) => {\n return values.includes(txData.response.data.slice(0, 10))\n })\n\n if (type !== undefined) {\n const tryNft = new NFT(txData.response.to ?? '')\n try {\n await tryNft.getApproved(1)\n return TransactionTypeEnum.NFT\n } catch {\n return TransactionTypeEnum.TOKEN\n }\n }\n\n return TransactionTypeEnum.CONTRACT\n }\n\n /**\n * @returns URL of the transaction on the blockchain explorer\n */\n getUrl(): string {\n let explorerUrl = this.provider.network.explorerUrl\n explorerUrl += explorerUrl.endsWith('/') ? '' : '/'\n explorerUrl += 'tx/' + this.id\n return explorerUrl\n }\n\n /**\n * @returns Signer wallet address of the transaction\n */\n async getSigner(): Promise {\n const data = await this.getData()\n return data?.response.from ?? ''\n }\n\n /**\n * @returns Fee of the transaction\n */\n async getFee(): Promise {\n const data = await this.getData()\n if (data?.response?.gasPrice === undefined || data?.receipt?.gasUsed === undefined) {\n return 0\n }\n return hexToNumber(\n (data?.response.gasPrice * data?.receipt.gasUsed).toString(),\n this.provider.network.nativeCurrency.decimals\n )\n }\n\n /**\n * @returns Block number that transaction\n */\n async getBlockNumber(): Promise {\n const data = await this.getData()\n return data?.response.blockNumber ?? 0\n }\n\n /**\n * @returns Timestamp of the block that transaction\n */\n async getBlockTimestamp(): Promise {\n const blockNumber = await this.getBlockNumber()\n const block = await this.ethers.getBlock(blockNumber)\n return block?.timestamp ?? 0\n }\n\n /**\n * @returns Confirmation count of the block that transaction\n */\n async getBlockConfirmationCount(): Promise {\n const blockNumber = await this.getBlockNumber()\n const blockCount = await this.ethers.getBlockNumber()\n const confirmations = blockCount - blockNumber\n return confirmations < 0 ? 0 : confirmations\n }\n\n /**\n * @returns Status of the transaction\n */\n async getStatus(): Promise {\n const data = await this.getData()\n if (data?.response.blockNumber !== null && data?.receipt !== null) {\n if (data?.receipt.status === 1) {\n return TransactionStatusEnum.CONFIRMED\n } else {\n return TransactionStatusEnum.FAILED\n }\n }\n return TransactionStatusEnum.PENDING\n }\n}\n","import { Transaction } from './Transaction'\nimport type {\n ContractAddress,\n ContractTransactionInterface,\n TransactionId\n} from '@multiplechain/types'\nimport {\n Interface,\n type InterfaceAbi,\n type TransactionResponse,\n type TransactionDescription\n} from 'ethers'\nimport type { Provider } from '../services/Provider'\n\nexport class ContractTransaction extends Transaction implements ContractTransactionInterface {\n ABI: InterfaceAbi\n\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider)\n this.ABI = ABI ?? []\n }\n\n /**\n * @returns Contract address of the transaction\n */\n async getAddress(): Promise {\n const data = await this.getData()\n return data?.response.to ?? ''\n }\n\n /**\n * @param response Transaction response\n * @returns Decoded transaction data\n */\n async decodeData(response?: TransactionResponse): Promise {\n if (response === undefined) {\n const data = await this.getData()\n if (data === null) return null\n response = data.response\n }\n\n return new Interface(this.ABI).parseTransaction({\n data: response.data ?? '',\n value: response.value ?? 0\n })\n }\n}\n","import type { InterfaceAbi } from 'ethers'\nimport ERC721 from '../../resources/ERC721.json'\nimport type { Provider } from '../services/Provider'\nimport { ContractTransaction } from './ContractTransaction'\nimport type {\n NftId,\n NftTransactionInterface,\n TransactionId,\n WalletAddress\n} from '@multiplechain/types'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\n\nexport class NftTransaction extends ContractTransaction implements NftTransactionInterface {\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider, ABI ?? (ERC721 as InterfaceAbi))\n }\n\n /**\n * @returns Receiver wallet address\n */\n async getReceiver(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[1]\n }\n\n return decoded.args[0]\n }\n\n /**\n * @returns Sender wallet address\n */\n async getSender(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[0]\n }\n\n return await this.getSigner()\n }\n\n /**\n * @returns NFT ID\n */\n async getNftId(): Promise {\n return Number((await this.decodeData())?.args[2] ?? 0)\n }\n\n /**\n * @param direction - Direction of the transaction (nft)\n * @param address - Wallet address of the receiver or sender of the transaction, dependant on direction\n * @param nftId ID of the NFT that will be transferred\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n nftId: NftId\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getNftId()) !== nftId) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import { Transaction } from './Transaction'\nimport { hexToNumber } from '@multiplechain/utils'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\nimport type { WalletAddress, CoinTransactionInterface, TransferAmount } from '@multiplechain/types'\n\nexport class CoinTransaction extends Transaction implements CoinTransactionInterface {\n /**\n * @returns Wallet address of the receiver of transaction\n */\n async getReceiver(): Promise {\n const data = await this.getData()\n return data?.response.to ?? ''\n }\n\n /**\n * @returns Wallet address of the sender of transaction\n */\n async getSender(): Promise {\n return await this.getSigner()\n }\n\n /**\n * @returns Amount of coin that will be transferred\n */\n async getAmount(): Promise {\n const data = await this.getData()\n const { decimals } = this.provider.network.nativeCurrency\n return hexToNumber((data?.response.value ?? 0).toString(), decimals)\n }\n\n /**\n * @param direction - Direction of the transaction (asset)\n * @param address - Wallet address of the receiver or sender of the transaction, dependant on direction\n * @param amount Amount of assets that will be transferred\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n amount: TransferAmount\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getAmount()) !== amount) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import { Token } from '../assets/Token'\nimport type { InterfaceAbi } from 'ethers'\nimport ERC20 from '../../resources/ERC20.json'\nimport { hexToNumber } from '@multiplechain/utils'\nimport type { Provider } from '../services/Provider'\nimport { ContractTransaction } from './ContractTransaction'\nimport { TransactionStatusEnum, AssetDirectionEnum } from '@multiplechain/types'\nimport type {\n TransactionId,\n TokenTransactionInterface,\n WalletAddress,\n TransferAmount\n} from '@multiplechain/types'\n\nexport class TokenTransaction extends ContractTransaction implements TokenTransactionInterface {\n /**\n * @param id Transaction id\n * @param provider Blockchain network provider\n * @param ABI Contract ABI\n */\n constructor(id: TransactionId, provider?: Provider, ABI?: InterfaceAbi) {\n super(id, provider, ABI ?? (ERC20 as InterfaceAbi))\n }\n\n /**\n * @returns Receiver wallet address\n */\n async getReceiver(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[1]\n }\n\n return decoded.args[0]\n }\n\n /**\n * @returns Wallet address of the sender of transaction\n */\n async getSender(): Promise {\n const decoded = await this.decodeData()\n\n if (decoded === null) {\n return ''\n }\n\n if (decoded.name === 'transferFrom') {\n return decoded.args[0]\n }\n\n return await this.getSigner()\n }\n\n /**\n * @returns Amount of tokens that will be transferred\n */\n async getAmount(): Promise {\n const token = new Token(await this.getAddress())\n const decoded = await this.decodeData()\n if (decoded === null) {\n return 0\n }\n\n if (decoded.name === 'transferFrom') {\n return hexToNumber((decoded.args[2] as bigint).toString(), await token.getDecimals())\n }\n\n return hexToNumber((decoded.args[1] as bigint).toString(), await token.getDecimals())\n }\n\n /**\n * @param direction - Direction of the transaction (token)\n * @param address - Wallet address of the owner or spender of the transaction, dependant on direction\n * @param amount Amount of tokens that will be approved\n * @returns Status of the transaction\n */\n async verifyTransfer(\n direction: AssetDirectionEnum,\n address: WalletAddress,\n amount: TransferAmount\n ): Promise {\n const status = await this.getStatus()\n\n if (status === TransactionStatusEnum.PENDING) {\n return TransactionStatusEnum.PENDING\n }\n\n if ((await this.getAmount()) !== amount) {\n return TransactionStatusEnum.FAILED\n }\n\n if (direction === AssetDirectionEnum.INCOMING) {\n if ((await this.getReceiver()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n } else {\n if ((await this.getSender()).toLowerCase() !== address.toLowerCase()) {\n return TransactionStatusEnum.FAILED\n }\n }\n\n return TransactionStatusEnum.CONFIRMED\n }\n}\n","import type {\n TransactionTypeEnum,\n DynamicTransactionType,\n TransactionListenerInterface,\n DynamicTransactionListenerFilterType,\n TransactionId\n} from '@multiplechain/types'\n\nimport { Provider } from './Provider'\nimport type { Ethers } from './Ethers'\nimport { id, zeroPadValue } from 'ethers'\nimport { objectsEqual } from '@multiplechain/utils'\nimport { Transaction } from '../models/Transaction'\nimport { NftTransaction } from '../models/NftTransaction'\nimport { CoinTransaction } from '../models/CoinTransaction'\nimport { TokenTransaction } from '../models/TokenTransaction'\nimport { ErrorTypeEnum, TransactionListenerProcessIndex } from '@multiplechain/types'\nimport { ContractTransaction } from '../models/ContractTransaction'\nimport {\n type WebSocketProvider,\n type JsonRpcApiProvider,\n type EventFilter,\n type Log,\n type TransactionResponse\n} from 'ethers'\n\ntype TransactionListenerTriggerType = DynamicTransactionType<\n T,\n Transaction,\n ContractTransaction,\n CoinTransaction,\n TokenTransaction,\n NftTransaction\n>\n\ntype TransactionListenerCallbackType<\n T extends TransactionTypeEnum,\n Transaction = TransactionListenerTriggerType\n> = (transaction: Transaction) => void\n\nexport class TransactionListener<\n T extends TransactionTypeEnum,\n DTransaction extends TransactionListenerTriggerType,\n CallBackType extends TransactionListenerCallbackType\n> implements TransactionListenerInterface\n{\n /**\n * Transaction type\n */\n type: T\n\n /**\n * Provider\n */\n provider: Provider\n\n /**\n * Listener status\n */\n status: boolean = false\n\n /**\n * JSON-RPC provider\n */\n ethers: Ethers\n\n /**\n * JSON-RPC provider\n */\n jsonRpc: JsonRpcApiProvider\n\n /**\n * WebSocket provider\n */\n webSocket: WebSocketProvider\n\n /**\n * Transaction listener callback\n */\n callbacks: CallBackType[] = []\n\n /**\n * Dynamic stop method\n */\n dynamicStop: () => void = () => {}\n\n /**\n * Triggered transactions\n */\n triggeredTransactions: TransactionId[] = []\n\n /**\n * Transaction listener filter\n */\n filter?: DynamicTransactionListenerFilterType | Record\n\n /**\n * @param type - Transaction type\n * @param filter - Transaction listener filter\n * @param provider - Provider\n */\n constructor(type: T, filter?: DynamicTransactionListenerFilterType, provider?: Provider) {\n this.type = type\n this.filter = filter ?? {}\n this.provider = provider ?? Provider.instance\n this.ethers = this.provider.ethers\n this.jsonRpc = this.provider.ethers.jsonRpc\n }\n\n /**\n * Close the listener\n */\n stop(): void {\n if (this.status) {\n this.status = false\n this.dynamicStop()\n }\n }\n\n /**\n * Start the listener\n */\n start(): void {\n if (!this.status) {\n this.status = true\n // @ts-expect-error allow dynamic access\n this[TransactionListenerProcessIndex[this.type]]()\n }\n }\n\n /**\n * Get the listener status\n * @returns - Listener status\n */\n getStatus(): boolean {\n return this.status\n }\n\n /**\n * Listen to the transaction events\n * @param callback - Callback function\n * @returns - listener status\n */\n async on(callback: CallBackType): Promise {\n if (this.webSocket === undefined) {\n const socket = await this.provider.ethers.connectWebSocket()\n if (typeof socket === 'string') {\n throw new Error(ErrorTypeEnum.WS_CONNECTION_FAILED)\n } else {\n this.webSocket = socket\n }\n }\n\n this.start()\n this.callbacks.push(callback)\n\n return true\n }\n\n /**\n * Trigger the event when a transaction is detected\n * @param transaction - Transaction data\n */\n trigger(transaction: TransactionListenerTriggerType): void {\n if (!this.triggeredTransactions.includes(transaction.id)) {\n this.triggeredTransactions.push(transaction.id)\n this.callbacks.forEach((callback) => {\n callback(transaction as unknown as DTransaction)\n })\n }\n }\n\n /**\n * General transaction process\n */\n generalProcess(): void {\n const callback = async (transactionId: string): Promise => {\n if (this.filter?.signer !== undefined) {\n const transaction = await this.ethers.getTransaction(transactionId)\n if (transaction?.from.toLowerCase() !== this.filter.signer.toLowerCase()) {\n return\n }\n }\n\n this.trigger(new Transaction(transactionId))\n }\n\n void this.webSocket.on('pending', callback)\n this.dynamicStop = () => {\n void this.webSocket.off('pending', callback)\n }\n }\n\n /**\n * Contract transaction process\n */\n contractProcess(): void {\n const filter = this\n .filter as DynamicTransactionListenerFilterType\n\n let params: string | EventFilter\n if (filter.address === undefined) {\n params = 'pending'\n } else {\n params = {\n address: filter.address\n }\n }\n\n const checkSigner = (transaction: TransactionResponse | null): boolean => {\n if (transaction === null) {\n return false\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = transaction.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return false\n }\n\n return true\n }\n\n const callback = async (transactionIdOrLog: string | Log): Promise => {\n let transaction: TransactionResponse | null\n if (typeof transactionIdOrLog === 'string') {\n transaction = await this.ethers.getTransaction(transactionIdOrLog)\n\n if (!checkSigner(transaction)) {\n return\n }\n\n const contractBytecode = await this.ethers.getByteCode(transaction?.to ?? '')\n\n if (contractBytecode === '0x') {\n return\n }\n } else {\n transaction = await this.ethers.getTransaction(transactionIdOrLog.transactionHash)\n }\n\n if (!checkSigner(transaction)) {\n return\n }\n\n // @ts-expect-error already checking ing checkSigner\n this.trigger(new ContractTransaction(transaction.hash))\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n\n /**\n * Coin transaction process\n */\n coinProcess(): void {\n const filter = this.filter as DynamicTransactionListenerFilterType\n\n if (\n filter.signer !== undefined &&\n filter.sender !== undefined &&\n filter.signer !== filter.sender\n ) {\n throw new Error(\n 'Sender and signer must be the same in coin transactions. Or only one of them can be defined.'\n )\n }\n\n const callback = async (transactionId: string): Promise => {\n const tx = await this.ethers.getTransaction(transactionId)\n\n if (tx === null) {\n return\n }\n\n const sender = filter.sender ?? filter.signer\n\n interface ParamsType {\n sender?: string\n receiver?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (sender !== undefined) {\n expectedParams.sender = sender.toLowerCase()\n receivedParams.sender = tx.from.toLowerCase()\n }\n\n if (filter.receiver !== undefined) {\n expectedParams.receiver = filter.receiver.toLowerCase()\n receivedParams.receiver = tx.to?.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n const contractBytecode = await this.ethers.getByteCode(tx?.to ?? '')\n\n if (contractBytecode !== '0x') {\n return\n }\n\n const transaction = new CoinTransaction(transactionId)\n\n if (filter.amount !== undefined) {\n await transaction.wait()\n const amount = await transaction.getAmount()\n if (amount !== filter.amount) {\n return\n }\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on('pending', callback)\n this.dynamicStop = () => {\n void this.webSocket.off('pending', callback)\n }\n }\n\n /**\n * Token transaction process\n */\n tokenProcess(): void {\n const filter = this\n .filter as DynamicTransactionListenerFilterType\n\n const params: EventFilter = {\n address: filter.address,\n topics: [\n id('Transfer(address,address,uint256)'),\n filter.sender !== undefined ? zeroPadValue(filter.sender, 32) : null,\n filter.receiver !== undefined ? zeroPadValue(filter.receiver, 32) : null\n ]\n }\n\n const callback = async (transactionLog: Log): Promise => {\n const transaction = new TokenTransaction(transactionLog.transactionHash)\n const data = await transaction.getData()\n\n if (data === null) {\n return\n }\n\n const decodedData = await transaction.decodeData(data.response)\n\n if (decodedData === null) {\n return\n }\n\n if (decodedData.name !== 'transfer' && decodedData.name !== 'transferFrom') {\n return\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = data.response.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n if (filter.amount !== undefined) {\n await transaction.wait()\n const amount = await transaction.getAmount()\n if (amount !== filter.amount) {\n return\n }\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n\n /**\n * NFT transaction process\n */\n nftProcess(): void {\n const filter = this.filter as DynamicTransactionListenerFilterType\n\n const params: EventFilter = {\n address: filter.address,\n topics: [\n id('Transfer(address,address,uint256)'),\n filter.sender !== undefined ? zeroPadValue(filter.sender, 32) : null,\n filter.receiver !== undefined ? zeroPadValue(filter.receiver, 32) : null,\n filter.nftId !== undefined\n ? zeroPadValue(`0x0${filter.nftId.toString(16)}`, 32)\n : null\n ]\n }\n\n const callback = async (transactionLog: Log): Promise => {\n const transaction = new NftTransaction(transactionLog.transactionHash)\n const data = await transaction.getData()\n\n if (data === null) {\n return\n }\n\n const decodedData = await transaction.decodeData(data.response)\n\n if (decodedData === null) {\n return\n }\n\n if (decodedData.name !== 'transferFrom') {\n return\n }\n\n interface ParamsType {\n signer?: string\n }\n\n const expectedParams: ParamsType = {}\n const receivedParams: ParamsType = {}\n\n if (filter.signer !== undefined) {\n expectedParams.signer = filter.signer.toLowerCase()\n receivedParams.signer = data.response.from.toLowerCase()\n }\n\n if (!objectsEqual(expectedParams, receivedParams)) {\n return\n }\n\n this.trigger(transaction)\n }\n\n void this.webSocket.on(params, callback)\n this.dynamicStop = () => {\n void this.webSocket.off(params, callback)\n }\n }\n}\n","const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(snap, key)) {\n return;\n }\n const value = Reflect.get(target, key);\n const desc = {\n value,\n enumerable: true,\n // This is intentional to avoid copying with proxy-compare.\n // It's still non-writable, so it avoids assigning a value.\n configurable: true\n };\n if (refSet.has(value)) {\n markToTrack(value, false);\n } else if (value instanceof Promise) {\n delete desc.value;\n desc.get = () => handlePromise(value);\n } else if (proxyStateMap.has(value)) {\n const [target2, ensureVersion] = proxyStateMap.get(\n value\n );\n desc.value = createSnapshot(\n target2,\n ensureVersion(),\n handlePromise\n );\n }\n Object.defineProperty(snap, key, desc);\n });\n return Object.preventExtensions(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxyFunction(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (\"value\" in desc) {\n proxyObject[key] = initialObject[key];\n delete desc.value;\n delete desc.writable;\n }\n Object.defineProperty(baseObject, key, desc);\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [defaultProxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return defaultProxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import { subscribe, snapshot, proxy, getVersion, ref, unstable_buildProxyFunction } from 'valtio/vanilla';\n\nfunction subscribeKey(proxyObject, key, callback, notifyInSync) {\n let prevValue = proxyObject[key];\n return subscribe(\n proxyObject,\n () => {\n const nextValue = proxyObject[key];\n if (!Object.is(prevValue, nextValue)) {\n callback(prevValue = nextValue);\n }\n },\n notifyInSync\n );\n}\n\nlet currentCleanups;\nfunction watch(callback, options) {\n let alive = true;\n const cleanups = /* @__PURE__ */ new Set();\n const subscriptions = /* @__PURE__ */ new Map();\n const cleanup = () => {\n if (alive) {\n alive = false;\n cleanups.forEach((clean) => clean());\n cleanups.clear();\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions.clear();\n }\n };\n const revalidate = () => {\n if (!alive) {\n return;\n }\n cleanups.forEach((clean) => clean());\n cleanups.clear();\n const proxiesToSubscribe = /* @__PURE__ */ new Set();\n const parent = currentCleanups;\n currentCleanups = cleanups;\n try {\n const cleanupReturn = callback((proxyObject) => {\n proxiesToSubscribe.add(proxyObject);\n return proxyObject;\n });\n if (cleanupReturn) {\n cleanups.add(cleanupReturn);\n }\n } finally {\n currentCleanups = parent;\n }\n subscriptions.forEach((unsubscribe, proxyObject) => {\n if (proxiesToSubscribe.has(proxyObject)) {\n proxiesToSubscribe.delete(proxyObject);\n } else {\n subscriptions.delete(proxyObject);\n unsubscribe();\n }\n });\n proxiesToSubscribe.forEach((proxyObject) => {\n const unsubscribe = subscribe(proxyObject, revalidate, options == null ? void 0 : options.sync);\n subscriptions.set(proxyObject, unsubscribe);\n });\n };\n if (currentCleanups) {\n currentCleanups.add(cleanup);\n }\n revalidate();\n return cleanup;\n}\n\nconst DEVTOOLS = Symbol();\nfunction devtools(proxyObject, options) {\n if (typeof options === \"string\") {\n console.warn(\n \"string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400\"\n );\n options = { name: options };\n }\n const { enabled, name = \"\", ...rest } = options || {};\n let extension;\n try {\n extension = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch {\n }\n if (!extension) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && enabled) {\n console.warn(\"[Warning] Please install/enable Redux devtools extension\");\n }\n return;\n }\n let isTimeTraveling = false;\n const devtools2 = extension.connect({ name, ...rest });\n const unsub1 = subscribe(proxyObject, (ops) => {\n const action = ops.filter(([_, path]) => path[0] !== DEVTOOLS).map(([op, path]) => `${op}:${path.map(String).join(\".\")}`).join(\", \");\n if (!action) {\n return;\n }\n if (isTimeTraveling) {\n isTimeTraveling = false;\n } else {\n const snapWithoutDevtools = Object.assign({}, snapshot(proxyObject));\n delete snapWithoutDevtools[DEVTOOLS];\n devtools2.send(\n {\n type: action,\n updatedAt: (/* @__PURE__ */ new Date()).toLocaleString()\n },\n snapWithoutDevtools\n );\n }\n });\n const unsub2 = devtools2.subscribe((message) => {\n var _a, _b, _c, _d, _e, _f;\n if (message.type === \"ACTION\" && message.payload) {\n try {\n Object.assign(proxyObject, JSON.parse(message.payload));\n } catch (e) {\n console.error(\n \"please dispatch a serializable value that JSON.parse() and proxy() support\\n\",\n e\n );\n }\n }\n if (message.type === \"DISPATCH\" && message.state) {\n if (((_a = message.payload) == null ? void 0 : _a.type) === \"JUMP_TO_ACTION\" || ((_b = message.payload) == null ? void 0 : _b.type) === \"JUMP_TO_STATE\") {\n isTimeTraveling = true;\n const state = JSON.parse(message.state);\n Object.assign(proxyObject, state);\n }\n proxyObject[DEVTOOLS] = message;\n } else if (message.type === \"DISPATCH\" && ((_c = message.payload) == null ? void 0 : _c.type) === \"COMMIT\") {\n devtools2.init(snapshot(proxyObject));\n } else if (message.type === \"DISPATCH\" && ((_d = message.payload) == null ? void 0 : _d.type) === \"IMPORT_STATE\") {\n const actions = (_e = message.payload.nextLiftedState) == null ? void 0 : _e.actionsById;\n const computedStates = ((_f = message.payload.nextLiftedState) == null ? void 0 : _f.computedStates) || [];\n isTimeTraveling = true;\n computedStates.forEach(({ state }, index) => {\n const action = actions[index] || \"No action found\";\n Object.assign(proxyObject, state);\n if (index === 0) {\n devtools2.init(snapshot(proxyObject));\n } else {\n devtools2.send(action, snapshot(proxyObject));\n }\n });\n }\n });\n devtools2.init(snapshot(proxyObject));\n return () => {\n unsub1();\n unsub2 == null ? void 0 : unsub2();\n };\n}\n\nconst sourceObjectMap = /* @__PURE__ */ new WeakMap();\nconst derivedObjectMap = /* @__PURE__ */ new WeakMap();\nconst markPending = (sourceObject, callback) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n sourceObjectEntry[0].forEach((subscription) => {\n const { d: derivedObject } = subscription;\n if (sourceObject !== derivedObject) {\n markPending(derivedObject);\n }\n });\n ++sourceObjectEntry[2];\n if (callback) {\n sourceObjectEntry[3].add(callback);\n }\n }\n};\nconst checkPending = (sourceObject, callback) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry == null ? void 0 : sourceObjectEntry[2]) {\n sourceObjectEntry[3].add(callback);\n return true;\n }\n return false;\n};\nconst unmarkPending = (sourceObject) => {\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n --sourceObjectEntry[2];\n if (!sourceObjectEntry[2]) {\n sourceObjectEntry[3].forEach((callback) => callback());\n sourceObjectEntry[3].clear();\n }\n sourceObjectEntry[0].forEach((subscription) => {\n const { d: derivedObject } = subscription;\n if (sourceObject !== derivedObject) {\n unmarkPending(derivedObject);\n }\n });\n }\n};\nconst addSubscription = (subscription) => {\n const { s: sourceObject, d: derivedObject } = subscription;\n let derivedObjectEntry = derivedObjectMap.get(derivedObject);\n if (!derivedObjectEntry) {\n derivedObjectEntry = [/* @__PURE__ */ new Set()];\n derivedObjectMap.set(subscription.d, derivedObjectEntry);\n }\n derivedObjectEntry[0].add(subscription);\n let sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (!sourceObjectEntry) {\n const subscriptions = /* @__PURE__ */ new Set();\n const unsubscribe = subscribe(\n sourceObject,\n (ops) => {\n subscriptions.forEach((subscription2) => {\n const {\n d: derivedObject2,\n c: callback,\n n: notifyInSync,\n i: ignoreKeys\n } = subscription2;\n if (sourceObject === derivedObject2 && ops.every(\n (op) => op[1].length === 1 && ignoreKeys.includes(op[1][0])\n )) {\n return;\n }\n if (subscription2.p) {\n return;\n }\n markPending(sourceObject, callback);\n if (notifyInSync) {\n unmarkPending(sourceObject);\n } else {\n subscription2.p = Promise.resolve().then(() => {\n delete subscription2.p;\n unmarkPending(sourceObject);\n });\n }\n });\n },\n true\n );\n sourceObjectEntry = [subscriptions, unsubscribe, 0, /* @__PURE__ */ new Set()];\n sourceObjectMap.set(sourceObject, sourceObjectEntry);\n }\n sourceObjectEntry[0].add(subscription);\n};\nconst removeSubscription = (subscription) => {\n const { s: sourceObject, d: derivedObject } = subscription;\n const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].delete(subscription);\n if ((derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].size) === 0) {\n derivedObjectMap.delete(derivedObject);\n }\n const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n if (sourceObjectEntry) {\n const [subscriptions, unsubscribe] = sourceObjectEntry;\n subscriptions.delete(subscription);\n if (!subscriptions.size) {\n unsubscribe();\n sourceObjectMap.delete(sourceObject);\n }\n }\n};\nconst listSubscriptions = (derivedObject) => {\n const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n if (derivedObjectEntry) {\n return Array.from(derivedObjectEntry[0]);\n }\n return [];\n};\nconst unstable_deriveSubscriptions = {\n add: addSubscription,\n remove: removeSubscription,\n list: listSubscriptions\n};\nfunction derive(derivedFns, options) {\n const proxyObject = (options == null ? void 0 : options.proxy) || proxy({});\n const notifyInSync = !!(options == null ? void 0 : options.sync);\n const derivedKeys = Object.keys(derivedFns);\n derivedKeys.forEach((key) => {\n if (Object.getOwnPropertyDescriptor(proxyObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const fn = derivedFns[key];\n let lastDependencies = null;\n const evaluate = () => {\n if (lastDependencies) {\n if (Array.from(lastDependencies).map(([p]) => checkPending(p, evaluate)).some((isPending) => isPending)) {\n return;\n }\n if (Array.from(lastDependencies).every(\n ([p, entry]) => getVersion(p) === entry.v\n )) {\n return;\n }\n }\n const dependencies = /* @__PURE__ */ new Map();\n const get = (p) => {\n dependencies.set(p, { v: getVersion(p) });\n return p;\n };\n const value = fn(get);\n const subscribeToDependencies = () => {\n dependencies.forEach((entry, p) => {\n var _a;\n const lastSubscription = (_a = lastDependencies == null ? void 0 : lastDependencies.get(p)) == null ? void 0 : _a.s;\n if (lastSubscription) {\n entry.s = lastSubscription;\n } else {\n const subscription = {\n s: p,\n // sourceObject\n d: proxyObject,\n // derivedObject\n k: key,\n // derived key\n c: evaluate,\n // callback\n n: notifyInSync,\n i: derivedKeys\n // ignoringKeys\n };\n addSubscription(subscription);\n entry.s = subscription;\n }\n });\n lastDependencies == null ? void 0 : lastDependencies.forEach((entry, p) => {\n if (!dependencies.has(p) && entry.s) {\n removeSubscription(entry.s);\n }\n });\n lastDependencies = dependencies;\n };\n if (value instanceof Promise) {\n value.finally(subscribeToDependencies);\n } else {\n subscribeToDependencies();\n }\n proxyObject[key] = value;\n };\n evaluate();\n });\n return proxyObject;\n}\nfunction underive(proxyObject, options) {\n const keysToDelete = (options == null ? void 0 : options.delete) ? /* @__PURE__ */ new Set() : null;\n listSubscriptions(proxyObject).forEach((subscription) => {\n const { k: key } = subscription;\n if (!(options == null ? void 0 : options.keys) || options.keys.includes(key)) {\n removeSubscription(subscription);\n if (keysToDelete) {\n keysToDelete.add(key);\n }\n }\n });\n if (keysToDelete) {\n keysToDelete.forEach((key) => {\n delete proxyObject[key];\n });\n }\n}\n\nfunction addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"addComputed is deprecated. Please consider using `derive`. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201\"\n );\n }\n const derivedFns = {};\n Object.keys(computedFns_FAKE).forEach((key) => {\n derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject));\n });\n return derive(derivedFns, { proxy: targetObject });\n}\n\nfunction proxyWithComputed_DEPRECATED(initialObject, computedFns) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n 'proxyWithComputed is deprecated. Please follow \"Computed Properties\" guide in docs.'\n );\n }\n Object.keys(computedFns).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const computedFn = computedFns[key];\n const { get, set } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n const desc = {};\n desc.get = () => get(snapshot(proxyObject));\n if (set) {\n desc.set = (newValue) => set(proxyObject, newValue);\n }\n Object.defineProperty(initialObject, key, desc);\n });\n const proxyObject = proxy(initialObject);\n return proxyObject;\n}\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nlet refSet;\nconst deepClone = (obj) => {\n if (!refSet) {\n refSet = unstable_buildProxyFunction()[2];\n }\n if (!isObject(obj) || refSet.has(obj)) {\n return obj;\n }\n const baseObject = Array.isArray(obj) ? [] : Object.create(Object.getPrototypeOf(obj));\n Reflect.ownKeys(obj).forEach((key) => {\n baseObject[key] = deepClone(obj[key]);\n });\n return baseObject;\n};\nfunction proxyWithHistory(initialValue, skipSubscribe = false) {\n const proxyObject = proxy({\n value: initialValue,\n history: ref({\n wip: void 0,\n // to avoid infinite loop\n snapshots: [],\n index: -1\n }),\n clone: deepClone,\n canUndo: () => proxyObject.history.index > 0,\n undo: () => {\n if (proxyObject.canUndo()) {\n proxyObject.value = proxyObject.history.wip = proxyObject.clone(\n proxyObject.history.snapshots[--proxyObject.history.index]\n );\n }\n },\n canRedo: () => proxyObject.history.index < proxyObject.history.snapshots.length - 1,\n redo: () => {\n if (proxyObject.canRedo()) {\n proxyObject.value = proxyObject.history.wip = proxyObject.clone(\n proxyObject.history.snapshots[++proxyObject.history.index]\n );\n }\n },\n saveHistory: () => {\n proxyObject.history.snapshots.splice(proxyObject.history.index + 1);\n proxyObject.history.snapshots.push(snapshot(proxyObject).value);\n ++proxyObject.history.index;\n },\n subscribe: () => subscribe(proxyObject, (ops) => {\n if (ops.every(\n (op) => op[1][0] === \"value\" && (op[0] !== \"set\" || op[2] !== proxyObject.history.wip)\n )) {\n proxyObject.saveHistory();\n }\n })\n });\n proxyObject.saveHistory();\n if (!skipSubscribe) {\n proxyObject.subscribe();\n }\n return proxyObject;\n}\n\nfunction proxySet(initialValues) {\n const set = proxy({\n data: Array.from(new Set(initialValues)),\n has(value) {\n return this.data.indexOf(value) !== -1;\n },\n add(value) {\n let hasProxy = false;\n if (typeof value === \"object\" && value !== null) {\n hasProxy = this.data.indexOf(proxy(value)) !== -1;\n }\n if (this.data.indexOf(value) === -1 && !hasProxy) {\n this.data.push(value);\n }\n return this;\n },\n delete(value) {\n const index = this.data.indexOf(value);\n if (index === -1) {\n return false;\n }\n this.data.splice(index, 1);\n return true;\n },\n clear() {\n this.data.splice(0);\n },\n get size() {\n return this.data.length;\n },\n forEach(cb) {\n this.data.forEach((value) => {\n cb(value, value, this);\n });\n },\n get [Symbol.toStringTag]() {\n return \"Set\";\n },\n toJSON() {\n return new Set(this.data);\n },\n [Symbol.iterator]() {\n return this.data[Symbol.iterator]();\n },\n values() {\n return this.data.values();\n },\n keys() {\n return this.data.values();\n },\n entries() {\n return new Set(this.data).entries();\n }\n });\n Object.defineProperties(set, {\n data: {\n enumerable: false\n },\n size: {\n enumerable: false\n },\n toJSON: {\n enumerable: false\n }\n });\n Object.seal(set);\n return set;\n}\n\nfunction proxyMap(entries) {\n const map = proxy({\n data: Array.from(entries || []),\n has(key) {\n return this.data.some((p) => p[0] === key);\n },\n set(key, value) {\n const record = this.data.find((p) => p[0] === key);\n if (record) {\n record[1] = value;\n } else {\n this.data.push([key, value]);\n }\n return this;\n },\n get(key) {\n var _a;\n return (_a = this.data.find((p) => p[0] === key)) == null ? void 0 : _a[1];\n },\n delete(key) {\n const index = this.data.findIndex((p) => p[0] === key);\n if (index === -1) {\n return false;\n }\n this.data.splice(index, 1);\n return true;\n },\n clear() {\n this.data.splice(0);\n },\n get size() {\n return this.data.length;\n },\n toJSON() {\n return new Map(this.data);\n },\n forEach(cb) {\n this.data.forEach((p) => {\n cb(p[1], p[0], this);\n });\n },\n keys() {\n return this.data.map((p) => p[0]).values();\n },\n values() {\n return this.data.map((p) => p[1]).values();\n },\n entries() {\n return new Map(this.data).entries();\n },\n get [Symbol.toStringTag]() {\n return \"Map\";\n },\n [Symbol.iterator]() {\n return this.entries();\n }\n });\n Object.defineProperties(map, {\n data: {\n enumerable: false\n },\n size: {\n enumerable: false\n },\n toJSON: {\n enumerable: false\n }\n });\n Object.seal(map);\n return map;\n}\n\nexport { addComputed_DEPRECATED as addComputed, derive, devtools, proxyMap, proxySet, proxyWithComputed_DEPRECATED as proxyWithComputed, proxyWithHistory, subscribeKey, underive, unstable_deriveSubscriptions, watch };\n","const SECURE_SITE = 'https://secure.walletconnect.com';\nexport const ONRAMP_PROVIDERS = [\n {\n label: 'Coinbase',\n name: 'coinbase',\n feeRange: '1-2%',\n url: ''\n }\n];\nexport const ConstantsUtil = {\n FOUR_MINUTES_MS: 240000,\n TEN_SEC_MS: 10000,\n ONE_SEC_MS: 1000,\n SECURE_SITE,\n SECURE_SITE_DASHBOARD: `${SECURE_SITE}/dashboard`,\n SECURE_SITE_FAVICON: `${SECURE_SITE}/images/favicon.png`,\n RESTRICTED_TIMEZONES: [\n 'ASIA/SHANGHAI',\n 'ASIA/URUMQI',\n 'ASIA/CHONGQING',\n 'ASIA/HARBIN',\n 'ASIA/KASHGAR',\n 'ASIA/MACAU',\n 'ASIA/HONG_KONG',\n 'ASIA/MACAO',\n 'ASIA/BEIJING',\n 'ASIA/HARBIN'\n ],\n WC_COINBASE_PAY_SDK_CHAINS: [\n 'ethereum',\n 'arbitrum',\n 'polygon',\n 'avalanche-c-chain',\n 'optimism',\n 'celo',\n 'base'\n ],\n WC_COINBASE_PAY_SDK_FALLBACK_CHAIN: 'ethereum',\n WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP: {\n Ethereum: 'ethereum',\n 'Arbitrum One': 'arbitrum',\n Polygon: 'polygon',\n Avalanche: 'avalanche-c-chain',\n 'OP Mainnet': 'optimism',\n Celo: 'celo',\n Base: 'base'\n },\n WC_COINBASE_ONRAMP_APP_ID: 'bf18c88d-495a-463b-b249-0b9d3656cf5e',\n SUGGESTED_TOKENS: [\n 'ETH',\n 'UNI',\n '1INCH',\n 'AAVE',\n 'SOL',\n 'ADA',\n 'AVAX',\n 'DOT',\n 'LINK',\n 'NITRO',\n 'GAIA',\n 'MILK',\n 'TRX',\n 'NEAR',\n 'GNO',\n 'WBTC',\n 'DAI',\n 'WETH',\n 'USDC',\n 'USDT',\n 'ARB',\n 'BAL',\n 'BICO',\n 'CRV',\n 'ENS',\n 'MATIC',\n 'OP'\n ],\n POPULAR_TOKENS: [\n 'ETH',\n 'UNI',\n '1INCH',\n 'AAVE',\n 'SOL',\n 'ADA',\n 'AVAX',\n 'DOT',\n 'LINK',\n 'NITRO',\n 'GAIA',\n 'MILK',\n 'TRX',\n 'NEAR',\n 'GNO',\n 'WBTC',\n 'DAI',\n 'WETH',\n 'USDC',\n 'USDT',\n 'ARB',\n 'BAL',\n 'BICO',\n 'CRV',\n 'ENS',\n 'MATIC',\n 'OP',\n 'DAI',\n 'CHAMP',\n 'WOLF',\n 'SALE',\n 'BAL',\n 'BUSD',\n 'MUST',\n 'BTCpx',\n 'ROUTE',\n 'HEX',\n 'WELT',\n 'amDAI',\n 'VSQ',\n 'VISION',\n 'AURUM',\n 'pSP',\n 'SNX',\n 'VC',\n 'LINK',\n 'CHP',\n 'amUSDT',\n 'SPHERE',\n 'FOX',\n 'GIDDY',\n 'GFC',\n 'OMEN',\n 'OX_OLD',\n 'DE',\n 'WNT'\n ],\n NATIVE_TOKEN_ADDRESS: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n CONVERT_SLIPPAGE_TOLERANCE: 1\n};\n//# sourceMappingURL=ConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const CoreHelperUtil = {\n isMobile() {\n if (typeof window !== 'undefined') {\n return Boolean(window.matchMedia('(pointer:coarse)').matches ||\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent));\n }\n return false;\n },\n checkCaipNetwork(network, networkName = '') {\n return network?.id.toLocaleLowerCase().includes(networkName.toLowerCase());\n },\n isAndroid() {\n const ua = window.navigator.userAgent.toLowerCase();\n return CoreHelperUtil.isMobile() && ua.includes('android');\n },\n isIos() {\n const ua = window.navigator.userAgent.toLowerCase();\n return CoreHelperUtil.isMobile() && (ua.includes('iphone') || ua.includes('ipad'));\n },\n isClient() {\n return typeof window !== 'undefined';\n },\n isPairingExpired(expiry) {\n return expiry ? expiry - Date.now() <= ConstantsUtil.TEN_SEC_MS : true;\n },\n isAllowedRetry(lastRetry) {\n return Date.now() - lastRetry >= ConstantsUtil.ONE_SEC_MS;\n },\n copyToClopboard(text) {\n navigator.clipboard.writeText(text);\n },\n getPairingExpiry() {\n return Date.now() + ConstantsUtil.FOUR_MINUTES_MS;\n },\n getPlainAddress(caipAddress) {\n return caipAddress.split(':')[2];\n },\n async wait(milliseconds) {\n return new Promise(resolve => {\n setTimeout(resolve, milliseconds);\n });\n },\n debounce(func, timeout = 500) {\n let timer = undefined;\n return (...args) => {\n function next() {\n func(...args);\n }\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(next, timeout);\n };\n },\n isHttpUrl(url) {\n return url.startsWith('http://') || url.startsWith('https://');\n },\n formatNativeUrl(appUrl, wcUri) {\n if (CoreHelperUtil.isHttpUrl(appUrl)) {\n return this.formatUniversalUrl(appUrl, wcUri);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.includes('://')) {\n safeAppUrl = appUrl.replaceAll('/', '').replaceAll(':', '');\n safeAppUrl = `${safeAppUrl}://`;\n }\n if (!safeAppUrl.endsWith('/')) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n const encodedWcUrl = encodeURIComponent(wcUri);\n return {\n redirect: `${safeAppUrl}wc?uri=${encodedWcUrl}`,\n href: safeAppUrl\n };\n },\n formatUniversalUrl(appUrl, wcUri) {\n if (!CoreHelperUtil.isHttpUrl(appUrl)) {\n return this.formatNativeUrl(appUrl, wcUri);\n }\n let safeAppUrl = appUrl;\n if (!safeAppUrl.endsWith('/')) {\n safeAppUrl = `${safeAppUrl}/`;\n }\n const encodedWcUrl = encodeURIComponent(wcUri);\n return {\n redirect: `${safeAppUrl}wc?uri=${encodedWcUrl}`,\n href: safeAppUrl\n };\n },\n openHref(href, target, features) {\n window.open(href, target, features || 'noreferrer noopener');\n },\n async preloadImage(src) {\n const imagePromise = new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = resolve;\n image.onerror = reject;\n image.crossOrigin = 'anonymous';\n image.src = src;\n });\n return Promise.race([imagePromise, CoreHelperUtil.wait(2000)]);\n },\n formatBalance(balance, symbol) {\n let formattedBalance = undefined;\n if (balance === '0') {\n formattedBalance = '0.000';\n }\n else if (typeof balance === 'string') {\n const number = Number(balance);\n if (number) {\n formattedBalance = number.toString().match(/^-?\\d+(?:\\.\\d{0,3})?/u)?.[0];\n }\n }\n return formattedBalance ? `${formattedBalance} ${symbol ?? ''}` : `0.000 ${symbol ?? ''}`;\n },\n formatBalance2(balance, symbol) {\n let formattedBalance = undefined;\n if (balance === '0') {\n formattedBalance = '0';\n }\n else if (typeof balance === 'string') {\n const number = Number(balance);\n if (number) {\n formattedBalance = number.toString().match(/^-?\\d+(?:\\.\\d{0,3})?/u)?.[0];\n }\n }\n return {\n value: formattedBalance ?? '0',\n rest: formattedBalance === '0' ? '000' : '',\n symbol\n };\n },\n isRestrictedRegion() {\n try {\n const { timeZone } = new Intl.DateTimeFormat().resolvedOptions();\n const capTimeZone = timeZone.toUpperCase();\n return ConstantsUtil.RESTRICTED_TIMEZONES.includes(capTimeZone);\n }\n catch {\n return false;\n }\n },\n getApiUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://api.web3modal.org'\n : 'https://api.web3modal.com';\n },\n getBlockchainApiUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://rpc.walletconnect.org'\n : 'https://rpc.walletconnect.com';\n },\n getAnalyticsUrl() {\n return CoreHelperUtil.isRestrictedRegion()\n ? 'https://pulse.walletconnect.org'\n : 'https://pulse.walletconnect.com';\n },\n getUUID() {\n if (crypto?.randomUUID) {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/gu, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n },\n parseError(error) {\n if (typeof error === 'string') {\n return error;\n }\n else if (typeof error?.issues?.[0]?.message === 'string') {\n return error.issues[0].message;\n }\n else if (error instanceof Error) {\n return error.message;\n }\n return 'Unknown error';\n },\n sortRequestedNetworks(approvedIds, requestedNetworks = []) {\n const approvedIndexMap = {};\n if (requestedNetworks && approvedIds) {\n approvedIds.forEach((id, index) => {\n approvedIndexMap[id] = index;\n });\n requestedNetworks.sort((a, b) => {\n const indexA = approvedIndexMap[a.id];\n const indexB = approvedIndexMap[b.id];\n if (indexA !== undefined && indexB !== undefined) {\n return indexA - indexB;\n }\n else if (indexA !== undefined) {\n return -1;\n }\n else if (indexB !== undefined) {\n return 1;\n }\n return 0;\n });\n }\n return requestedNetworks;\n },\n calculateBalance(array) {\n let sum = 0;\n for (const item of array) {\n sum += item.value ?? 0;\n }\n return sum;\n },\n formatTokenBalance(number) {\n const roundedNumber = number.toFixed(2);\n const [dollars, pennies] = roundedNumber.split('.');\n return { dollars, pennies };\n },\n isAddress(address) {\n if (!/^(?:0x)?[0-9a-f]{40}$/iu.test(address)) {\n return false;\n }\n else if (/^(?:0x)?[0-9a-f]{40}$/iu.test(address) || /^(?:0x)?[0-9A-F]{40}$/iu.test(address)) {\n return true;\n }\n return false;\n }\n};\n//# sourceMappingURL=CoreHelperUtil.js.map","export class FetchUtil {\n constructor({ baseUrl }) {\n this.baseUrl = baseUrl;\n }\n async get({ headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, { method: 'GET', headers, signal, cache: 'no-cache' });\n return response.json();\n }\n async getBlob({ headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, { method: 'GET', headers, signal });\n return response.blob();\n }\n async post({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'POST',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n async put({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'PUT',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n async delete({ body, headers, signal, ...args }) {\n const url = this.createUrl(args);\n const response = await fetch(url, {\n method: 'DELETE',\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal\n });\n return response.json();\n }\n createUrl({ path, params }) {\n const url = new URL(path, this.baseUrl);\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value) {\n url.searchParams.append(key, value);\n }\n });\n }\n return url;\n }\n}\n//# sourceMappingURL=FetchUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nconst state = proxy({\n projectId: '',\n sdkType: 'w3m',\n sdkVersion: 'html-wagmi-undefined'\n});\nexport const OptionsController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setProjectId(projectId) {\n state.projectId = projectId;\n },\n setAllWallets(allWallets) {\n state.allWallets = allWallets;\n },\n setIncludeWalletIds(includeWalletIds) {\n state.includeWalletIds = includeWalletIds;\n },\n setExcludeWalletIds(excludeWalletIds) {\n state.excludeWalletIds = excludeWalletIds;\n },\n setFeaturedWalletIds(featuredWalletIds) {\n state.featuredWalletIds = featuredWalletIds;\n },\n setTokens(tokens) {\n state.tokens = tokens;\n },\n setTermsConditionsUrl(termsConditionsUrl) {\n state.termsConditionsUrl = termsConditionsUrl;\n },\n setPrivacyPolicyUrl(privacyPolicyUrl) {\n state.privacyPolicyUrl = privacyPolicyUrl;\n },\n setCustomWallets(customWallets) {\n state.customWallets = customWallets;\n },\n setIsSiweEnabled(isSiweEnabled) {\n state.isSiweEnabled = isSiweEnabled;\n },\n setEnableAnalytics(enableAnalytics) {\n state.enableAnalytics = enableAnalytics;\n },\n setSdkVersion(sdkVersion) {\n state.sdkVersion = sdkVersion;\n },\n setMetadata(metadata) {\n state.metadata = metadata;\n },\n setOnrampEnabled(enableOnramp) {\n state.enableOnramp = enableOnramp;\n },\n setWalletFeaturesEnabled(enableWalletFeatures) {\n state.enableWalletFeatures = enableWalletFeatures;\n }\n};\n//# sourceMappingURL=OptionsController.js.map","import { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { OptionsController } from './OptionsController.js';\nconst DEFAULT_OPTIONS = {\n purchaseCurrencies: [\n {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'USD Coin',\n symbol: 'USDC',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n },\n {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'Ether',\n symbol: 'ETH',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n }\n ],\n paymentCurrencies: [\n {\n id: 'USD',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n },\n {\n id: 'EUR',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n }\n ]\n};\nconst baseUrl = CoreHelperUtil.getBlockchainApiUrl();\nconst api = new FetchUtil({ baseUrl });\nexport const BlockchainApiController = {\n fetchIdentity({ address }) {\n return api.get({\n path: `/v1/identity/${address}`,\n params: {\n projectId: OptionsController.state.projectId\n }\n });\n },\n fetchTransactions({ account, projectId, cursor, onramp, signal }) {\n const queryParams = cursor ? { cursor } : {};\n return api.get({\n path: `/v1/account/${account}/history?projectId=${projectId}${onramp ? `&onramp=${onramp}` : ''}`,\n params: queryParams,\n signal\n });\n },\n fetchConvertTokens({ projectId, chainId }) {\n return api.get({\n path: `/v1/convert/tokens?projectId=${projectId}&chainId=${chainId}`\n });\n },\n fetchTokenPrice({ projectId, addresses }) {\n return api.post({\n path: '/v1/fungible/price',\n body: {\n projectId,\n currency: 'usd',\n addresses\n },\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n },\n fetchConvertAllowance({ projectId, tokenAddress, userAddress }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/allowance?projectId=${projectId}&tokenAddress=${tokenAddress}&userAddress=${userAddress}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n fetchGasPrice({ projectId, chainId }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/gas-price?projectId=${projectId}&chainId=${chainId}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n generateConvertCalldata({ amount, from, projectId, to, userAddress }) {\n return api.post({\n path: '/v1/convert/build-transaction',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: {\n amount,\n eip155: {\n slippage: ConstantsUtil.CONVERT_SLIPPAGE_TOLERANCE\n },\n from,\n projectId,\n to,\n userAddress\n }\n });\n },\n generateApproveCalldata({ from, projectId, to, userAddress }) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/convert/build-approve?projectId=${projectId}&userAddress=${userAddress}&from=${from}&to=${to}`,\n headers: {\n 'Content-Type': 'application/json',\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n }\n });\n },\n async getBalance(address, chainId) {\n const { sdkType, sdkVersion } = OptionsController.state;\n return api.get({\n path: `/v1/account/${address}/balance`,\n headers: {\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n },\n params: {\n currency: 'usd',\n projectId: OptionsController.state.projectId,\n chainId\n }\n });\n },\n async generateOnRampURL({ destinationWallets, partnerUserId, defaultNetwork, purchaseAmount, paymentAmount }) {\n const response = await api.post({\n path: `/v1/generators/onrampurl?projectId=${OptionsController.state.projectId}`,\n body: {\n destinationWallets,\n defaultNetwork,\n partnerUserId,\n defaultExperience: 'buy',\n presetCryptoAmount: purchaseAmount,\n presetFiatAmount: paymentAmount\n }\n });\n return response.url;\n },\n async getOnrampOptions() {\n try {\n const response = await api.get({\n path: `/v1/onramp/options?projectId=${OptionsController.state.projectId}`\n });\n return response;\n }\n catch (e) {\n return DEFAULT_OPTIONS;\n }\n },\n async getOnrampQuote({ purchaseCurrency, paymentCurrency, amount, network }) {\n try {\n const response = await api.post({\n path: `/v1/onramp/quote?projectId=${OptionsController.state.projectId}`,\n body: {\n purchaseCurrency,\n paymentCurrency,\n amount,\n network\n }\n });\n return response;\n }\n catch (e) {\n return {\n coinbaseFee: { amount, currency: paymentCurrency.id },\n networkFee: { amount, currency: paymentCurrency.id },\n paymentSubtotal: { amount, currency: paymentCurrency.id },\n paymentTotal: { amount, currency: paymentCurrency.id },\n purchaseAmount: { amount, currency: paymentCurrency.id },\n quoteId: 'mocked-quote-id'\n };\n }\n }\n};\n//# sourceMappingURL=BlockchainApiController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nconst state = proxy({\n message: '',\n variant: 'success',\n open: false\n});\nexport const SnackController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n showSuccess(message) {\n state.message = message;\n state.variant = 'success';\n state.open = true;\n },\n showError(message) {\n const errorMessage = CoreHelperUtil.parseError(message);\n state.message = errorMessage;\n state.variant = 'error';\n state.open = true;\n },\n hide() {\n state.open = false;\n }\n};\n//# sourceMappingURL=SnackController.js.map","function getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar browser = {exports: {}};\n\n// shim for using process in browser\nvar process = browser.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ());\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] };\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\nvar browserExports = browser.exports;\nconst process$1 = /*@__PURE__*/getDefaultExportFromCjs(browserExports);\n\nexport { process$1 as default, process$1 as process };\n//# sourceMappingURL=index.js.map\n","const WC_DEEPLINK = 'WALLETCONNECT_DEEPLINK_CHOICE';\nconst W3M_RECENT = '@w3m/recent';\nconst W3M_CONNECTED_WALLET_IMAGE_URL = '@w3m/connected_wallet_image_url';\nconst W3M_CONNECTED_CONNECTOR = '@w3m/connected_connector';\nexport const StorageUtil = {\n setWalletConnectDeepLink({ href, name }) {\n try {\n localStorage.setItem(WC_DEEPLINK, JSON.stringify({ href, name }));\n }\n catch {\n console.info('Unable to set WalletConnect deep link');\n }\n },\n getWalletConnectDeepLink() {\n try {\n const deepLink = localStorage.getItem(WC_DEEPLINK);\n if (deepLink) {\n return JSON.parse(deepLink);\n }\n }\n catch {\n console.info('Unable to get WalletConnect deep link');\n }\n return undefined;\n },\n deleteWalletConnectDeepLink() {\n try {\n localStorage.removeItem(WC_DEEPLINK);\n }\n catch {\n console.info('Unable to delete WalletConnect deep link');\n }\n },\n setWeb3ModalRecent(wallet) {\n try {\n const recentWallets = StorageUtil.getRecentWallets();\n const exists = recentWallets.find(w => w.id === wallet.id);\n if (!exists) {\n recentWallets.unshift(wallet);\n if (recentWallets.length > 2) {\n recentWallets.pop();\n }\n localStorage.setItem(W3M_RECENT, JSON.stringify(recentWallets));\n }\n }\n catch {\n console.info('Unable to set Web3Modal recent');\n }\n },\n getRecentWallets() {\n try {\n const recent = localStorage.getItem(W3M_RECENT);\n return recent ? JSON.parse(recent) : [];\n }\n catch {\n console.info('Unable to get Web3Modal recent');\n }\n return [];\n },\n setConnectedWalletImageUrl(imageUrl) {\n try {\n localStorage.setItem(W3M_CONNECTED_WALLET_IMAGE_URL, imageUrl);\n }\n catch {\n console.info('Unable to set Connected Wallet Image Url');\n }\n },\n getConnectedWalletImageUrl() {\n try {\n return localStorage.getItem(W3M_CONNECTED_WALLET_IMAGE_URL);\n }\n catch {\n console.info('Unable to set Connected Wallet Image Url');\n }\n return undefined;\n },\n setConnectedConnector(connectorType) {\n try {\n localStorage.setItem(W3M_CONNECTED_CONNECTOR, connectorType);\n }\n catch {\n console.info('Unable to set Connected Connector');\n }\n },\n getConnectedConnector() {\n try {\n return localStorage.getItem(W3M_CONNECTED_CONNECTOR);\n }\n catch {\n console.info('Unable to get Connected Connector');\n }\n return undefined;\n }\n};\n//# sourceMappingURL=StorageUtil.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { OptionsController } from './OptionsController.js';\nconst baseUrl = CoreHelperUtil.getAnalyticsUrl();\nconst api = new FetchUtil({ baseUrl });\nconst excluded = ['MODAL_CREATED'];\nconst state = proxy({\n timestamp: Date.now(),\n data: {\n type: 'track',\n event: 'MODAL_CREATED'\n }\n});\nexport const EventsController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n _getApiHeaders() {\n const { projectId, sdkType, sdkVersion } = OptionsController.state;\n return {\n 'x-project-id': projectId,\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n };\n },\n async _sendAnalyticsEvent(payload) {\n try {\n if (excluded.includes(payload.data.event) || typeof window === 'undefined') {\n return;\n }\n await api.post({\n path: '/e',\n headers: EventsController._getApiHeaders(),\n body: {\n eventId: CoreHelperUtil.getUUID(),\n url: window.location.href,\n domain: window.location.hostname,\n timestamp: payload.timestamp,\n props: payload.data\n }\n });\n }\n catch {\n }\n },\n sendEvent(data) {\n state.timestamp = Date.now();\n state.data = data;\n if (OptionsController.state.enableAnalytics) {\n EventsController._sendAnalyticsEvent(state);\n }\n }\n};\n//# sourceMappingURL=EventsController.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { OptionsController } from './OptionsController.js';\nimport { EventsController } from './EventsController.js';\nimport { SnackController } from './SnackController.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nconst state = proxy({\n transactions: [],\n coinbaseTransactions: {},\n transactionsByYear: {},\n loading: false,\n empty: false,\n next: undefined\n});\nexport const TransactionsController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n async fetchTransactions(accountAddress, onramp) {\n const { projectId } = OptionsController.state;\n if (!projectId || !accountAddress) {\n throw new Error(\"Transactions can't be fetched without a projectId and an accountAddress\");\n }\n state.loading = true;\n try {\n const response = await BlockchainApiController.fetchTransactions({\n account: accountAddress,\n projectId,\n cursor: state.next,\n onramp\n });\n const nonSpamTransactions = this.filterSpamTransactions(response.data);\n const filteredTransactions = [...state.transactions, ...nonSpamTransactions];\n state.loading = false;\n if (onramp === 'coinbase') {\n state.coinbaseTransactions = this.groupTransactionsByYearAndMonth(state.coinbaseTransactions, response.data);\n }\n else {\n state.transactions = filteredTransactions;\n state.transactionsByYear = this.groupTransactionsByYearAndMonth(state.transactionsByYear, nonSpamTransactions);\n }\n state.empty = filteredTransactions.length === 0;\n state.next = response.next ? response.next : undefined;\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'ERROR_FETCH_TRANSACTIONS',\n properties: {\n address: accountAddress,\n projectId,\n cursor: state.next\n }\n });\n SnackController.showError('Failed to fetch transactions');\n state.loading = false;\n state.empty = true;\n state.next = undefined;\n }\n },\n groupTransactionsByYearAndMonth(transactionsMap = {}, transactions = []) {\n const grouped = transactionsMap;\n transactions.forEach(transaction => {\n const year = new Date(transaction.metadata.minedAt).getFullYear();\n const month = new Date(transaction.metadata.minedAt).getMonth();\n const yearTransactions = grouped[year] ?? {};\n const monthTransactions = yearTransactions[month] ?? [];\n const newMonthTransactions = monthTransactions.filter(tx => tx.id !== transaction.id);\n grouped[year] = {\n ...yearTransactions,\n [month]: [...newMonthTransactions, transaction].sort((a, b) => new Date(b.metadata.minedAt).getTime() - new Date(a.metadata.minedAt).getTime())\n };\n });\n return grouped;\n },\n filterSpamTransactions(transactions) {\n return transactions.filter(transaction => {\n const isAllSpam = transaction.transfers.every(transfer => transfer.nft_info?.flags.is_spam === true);\n return !isAllSpam;\n });\n },\n clearCursor() {\n state.next = undefined;\n },\n resetTransactions() {\n state.transactions = [];\n state.transactionsByYear = {};\n state.loading = false;\n state.empty = false;\n state.next = undefined;\n }\n};\n//# sourceMappingURL=TransactionsController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { StorageUtil } from '../utils/StorageUtil.js';\nimport { TransactionsController } from './TransactionsController.js';\nconst state = proxy({\n wcError: false,\n buffering: false\n});\nexport const ConnectionController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getClient() {\n if (!state._client) {\n throw new Error('ConnectionController client not set');\n }\n return state._client;\n },\n setClient(client) {\n state._client = ref(client);\n },\n connectWalletConnect() {\n state.wcPromise = this._getClient().connectWalletConnect(uri => {\n state.wcUri = uri;\n state.wcPairingExpiry = CoreHelperUtil.getPairingExpiry();\n });\n StorageUtil.setConnectedConnector('WALLET_CONNECT');\n },\n async connectExternal(options) {\n await this._getClient().connectExternal?.(options);\n StorageUtil.setConnectedConnector(options.type);\n },\n async signMessage(message) {\n return this._getClient().signMessage(message);\n },\n parseUnits(value, decimals) {\n return this._getClient().parseUnits(value, decimals);\n },\n formatUnits(value, decimals) {\n return this._getClient().formatUnits(value, decimals);\n },\n async sendTransaction(args) {\n return this._getClient().sendTransaction(args);\n },\n async estimateGas(args) {\n return this._getClient().estimateGas(args);\n },\n checkInstalled(ids) {\n return this._getClient().checkInstalled?.(ids);\n },\n resetWcConnection() {\n state.wcUri = undefined;\n state.wcPairingExpiry = undefined;\n state.wcPromise = undefined;\n state.wcLinking = undefined;\n state.recentWallet = undefined;\n TransactionsController.resetTransactions();\n StorageUtil.deleteWalletConnectDeepLink();\n },\n setWcLinking(wcLinking) {\n state.wcLinking = wcLinking;\n },\n setWcError(wcError) {\n state.wcError = wcError;\n state.buffering = false;\n },\n setRecentWallet(wallet) {\n state.recentWallet = wallet;\n },\n setBuffering(buffering) {\n state.buffering = buffering;\n },\n async disconnect() {\n await this._getClient().disconnect();\n this.resetWcConnection();\n }\n};\n//# sourceMappingURL=ConnectionController.js.map","import { proxy, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n loading: false,\n open: false,\n selectedNetworkId: undefined\n});\nexport const PublicStateController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n set(newState) {\n Object.assign(state, { ...state, ...newState });\n }\n};\n//# sourceMappingURL=PublicStateController.js.map","!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).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={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\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.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()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","import dayjs from 'dayjs';\nimport updateLocale from 'dayjs/plugin/updateLocale.js';\nimport relativeTime from 'dayjs/plugin/relativeTime.js';\ndayjs.extend(relativeTime);\ndayjs.extend(updateLocale);\ndayjs.updateLocale('en', {\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: '%s sec',\n m: '1 min',\n mm: '%d min',\n h: '1 hr',\n hh: '%d hrs',\n d: '1 d',\n dd: '%d d',\n M: '1 mo',\n MM: '%d mo',\n y: '1 yr',\n yy: '%d yr'\n }\n});\nexport const DateUtil = {\n getYear(date = new Date().toISOString()) {\n return dayjs(date).year();\n },\n getRelativeDateFromNow(date) {\n return dayjs(date).fromNow(true);\n },\n formatDate(date, format = 'DD MMM') {\n return dayjs(date).format(format);\n }\n};\n//# sourceMappingURL=DateUtil.js.map","export const NetworkUtil = {\n caipNetworkIdToNumber(caipnetworkId) {\n return caipnetworkId ? Number(caipnetworkId.split(':')[1]) : undefined;\n }\n};\n//# sourceMappingURL=NetworkUtil.js.map","import BigNumber from 'bignumber.js';\nexport const NumberUtil = {\n bigNumber(value) {\n return new BigNumber(value);\n },\n multiply(a, b) {\n if (a === undefined || b === undefined) {\n return BigNumber(0);\n }\n const aBigNumber = new BigNumber(a);\n const bBigNumber = new BigNumber(b);\n return aBigNumber.multipliedBy(bBigNumber);\n }\n};\n//# sourceMappingURL=NumberUtil.js.map","import { subscribeKey as subKey } from 'valtio/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { PublicStateController } from './PublicStateController.js';\nimport { EventsController } from './EventsController.js';\nimport { ModalController } from './ModalController.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { NetworkUtil } from '@web3modal/common';\nconst state = proxy({\n supportsAllNetworks: true,\n isDefaultCaipNetwork: false,\n smartAccountEnabledNetworks: []\n});\nexport const NetworkController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getClient() {\n if (!state._client) {\n throw new Error('NetworkController client not set');\n }\n return state._client;\n },\n setClient(client) {\n state._client = ref(client);\n },\n setCaipNetwork(caipNetwork) {\n state.caipNetwork = caipNetwork;\n PublicStateController.set({ selectedNetworkId: caipNetwork?.id });\n if (!this.state.allowUnsupportedChain) {\n this.checkIfSupportedNetwork();\n }\n },\n setDefaultCaipNetwork(caipNetwork) {\n state.caipNetwork = caipNetwork;\n PublicStateController.set({ selectedNetworkId: caipNetwork?.id });\n state.isDefaultCaipNetwork = true;\n },\n setRequestedCaipNetworks(requestedNetworks) {\n state.requestedCaipNetworks = requestedNetworks;\n },\n setAllowUnsupportedChain(allowUnsupportedChain) {\n state.allowUnsupportedChain = allowUnsupportedChain;\n },\n setSmartAccountEnabledNetworks(smartAccountEnabledNetworks) {\n state.smartAccountEnabledNetworks = smartAccountEnabledNetworks;\n },\n getRequestedCaipNetworks() {\n const { approvedCaipNetworkIds, requestedCaipNetworks } = state;\n const approvedIds = approvedCaipNetworkIds;\n const requestedNetworks = requestedCaipNetworks;\n return CoreHelperUtil.sortRequestedNetworks(approvedIds, requestedNetworks);\n },\n async getApprovedCaipNetworksData() {\n const data = await this._getClient().getApprovedCaipNetworksData();\n state.supportsAllNetworks = data.supportsAllNetworks;\n state.approvedCaipNetworkIds = data.approvedCaipNetworkIds;\n },\n async switchActiveNetwork(network) {\n await this._getClient().switchCaipNetwork(network);\n state.caipNetwork = network;\n if (network) {\n EventsController.sendEvent({\n type: 'track',\n event: 'SWITCH_NETWORK',\n properties: { network: network.id }\n });\n }\n },\n checkIfSupportedNetwork() {\n state.isUnsupportedChain = !state.requestedCaipNetworks?.some(network => network.id === state.caipNetwork?.id);\n if (state.isUnsupportedChain) {\n this.showUnsupportedChainUI();\n }\n },\n checkIfSmartAccountEnabled() {\n const networkId = NetworkUtil.caipNetworkIdToNumber(state.caipNetwork?.id);\n if (!networkId) {\n return false;\n }\n return Boolean(state.smartAccountEnabledNetworks?.includes(networkId));\n },\n resetNetwork() {\n if (!state.isDefaultCaipNetwork) {\n state.caipNetwork = undefined;\n }\n state.approvedCaipNetworkIds = undefined;\n state.supportsAllNetworks = true;\n state.smartAccountEnabledNetworks = [];\n },\n showUnsupportedChainUI() {\n setTimeout(() => {\n ModalController.open({ view: 'UnsupportedChain' });\n }, 300);\n }\n};\n//# sourceMappingURL=NetworkController.js.map","import { NetworkController } from '../controllers/NetworkController.js';\nimport { AccountController } from '../controllers/AccountController.js';\nimport { ConnectionController } from '../controllers/ConnectionController.js';\nimport { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { BlockchainApiController } from '../controllers/BlockchainApiController.js';\nimport { OptionsController } from '../controllers/OptionsController.js';\nexport const ConvertApiUtil = {\n async getTokenList() {\n const response = await BlockchainApiController.fetchConvertTokens({\n chainId: NetworkController.state.caipNetwork?.id,\n projectId: OptionsController.state.projectId\n });\n const tokens = response.tokens.map(token => {\n return {\n ...token,\n eip2612: false,\n quantity: {\n decimals: '0',\n numeric: '0'\n },\n price: 0,\n value: 0\n };\n });\n return tokens;\n },\n async fetchGasPrice() {\n const projectId = OptionsController.state.projectId;\n const caipNetwork = NetworkController.state.caipNetwork;\n if (!caipNetwork) {\n return null;\n }\n return await BlockchainApiController.fetchGasPrice({\n projectId,\n chainId: caipNetwork.id\n });\n },\n async fetchConvertAllowance({ tokenAddress, userAddress, sourceTokenAmount, sourceTokenDecimals }) {\n const projectId = OptionsController.state.projectId;\n const response = await BlockchainApiController.fetchConvertAllowance({\n projectId,\n tokenAddress,\n userAddress\n });\n if (response?.allowance && sourceTokenAmount && sourceTokenDecimals) {\n const parsedValue = ConnectionController.parseUnits(sourceTokenAmount, sourceTokenDecimals);\n const hasAllowance = BigInt(response.allowance) >= parsedValue;\n return hasAllowance;\n }\n return false;\n },\n async getMyTokensWithBalance() {\n const address = AccountController.state.address;\n const caipNetwork = NetworkController.state.caipNetwork;\n if (!address || !caipNetwork) {\n return [];\n }\n const response = await BlockchainApiController.getBalance(address, caipNetwork.id);\n const balances = response.balances;\n return this.mapBalancesToConvertTokens(balances);\n },\n mapBalancesToConvertTokens(balances) {\n return balances.map(token => {\n return {\n symbol: token.symbol,\n name: token.name,\n address: token?.address\n ? token.address\n : `${NetworkController.state.caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}`,\n decimals: parseInt(token.quantity.decimals, 10),\n logoUri: token.iconUrl,\n eip2612: false,\n quantity: token.quantity,\n price: token.price,\n value: token.value\n };\n });\n }\n};\n//# sourceMappingURL=ConvertApiUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nconst state = proxy({\n view: 'Connect',\n history: ['Connect'],\n transactionStack: []\n});\nexport const RouterController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n pushTransactionStack(action) {\n state.transactionStack.push(action);\n },\n popTransactionStack(cancel) {\n const action = state.transactionStack.pop();\n if (!action) {\n return;\n }\n if (cancel) {\n this.goBack();\n action?.onCancel?.();\n }\n else {\n if (action.goBack) {\n this.goBack();\n }\n else if (action.view) {\n this.reset(action.view);\n }\n action?.onSuccess?.();\n }\n },\n push(view, data) {\n if (view !== state.view) {\n state.view = view;\n state.history.push(view);\n state.data = data;\n }\n },\n reset(view) {\n state.view = view;\n state.history = [view];\n },\n replace(view, data) {\n if (state.history.length > 1 && state.history.at(-1) !== view) {\n state.view = view;\n state.history[state.history.length - 1] = view;\n state.data = data;\n }\n },\n goBack() {\n if (state.history.length > 1) {\n state.history.pop();\n const [last] = state.history.slice(-1);\n if (last) {\n state.view = last;\n }\n }\n },\n goBackToIndex(historyIndex) {\n if (state.history.length > 1) {\n state.history = state.history.slice(0, historyIndex + 1);\n const [last] = state.history.slice(-1);\n if (last) {\n state.view = last;\n }\n }\n }\n};\n//# sourceMappingURL=RouterController.js.map","import { subscribeKey as subKey } from 'valtio/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { AccountController } from './AccountController.js';\nimport { ConstantsUtil } from '../utils/ConstantsUtil.js';\nimport { ConnectionController } from './ConnectionController.js';\nimport { ConvertApiUtil } from '../utils/ConvertApiUtil.js';\nimport { SnackController } from './SnackController.js';\nimport { RouterController } from './RouterController.js';\nimport { NumberUtil } from '@web3modal/common';\nimport { NetworkController } from './NetworkController.js';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { OptionsController } from './OptionsController.js';\nexport const INITIAL_GAS_LIMIT = 150000;\nclass TransactionError extends Error {\n constructor(message, shortMessage) {\n super(message);\n this.name = 'TransactionError';\n this.shortMessage = shortMessage;\n }\n}\nconst state = proxy({\n initialized: false,\n loading: false,\n loadingPrices: false,\n approvalTransaction: undefined,\n convertTransaction: undefined,\n transactionError: undefined,\n transactionLoading: false,\n sourceToken: undefined,\n sourceTokenAmount: '',\n sourceTokenPriceInUSD: 0,\n toToken: undefined,\n toTokenAmount: '',\n toTokenPriceInUSD: 0,\n networkPrice: '0',\n networkBalanceInUSD: '0',\n inputError: undefined,\n slippage: ConstantsUtil.CONVERT_SLIPPAGE_TOLERANCE,\n tokens: undefined,\n popularTokens: undefined,\n suggestedTokens: undefined,\n foundTokens: undefined,\n myTokensWithBalance: undefined,\n tokensPriceMap: {},\n gasFee: BigInt(0),\n gasPriceInUSD: 0,\n priceImpact: undefined,\n maxSlippage: undefined\n});\nexport const ConvertController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n getParams() {\n const { address } = AccountController.state;\n const networkAddress = `${NetworkController.state.caipNetwork?.id}:${ConstantsUtil.NATIVE_TOKEN_ADDRESS}`;\n if (!address) {\n throw new Error('No address found to swap the tokens from.');\n }\n return {\n networkAddress,\n fromAddress: address,\n fromCaipAddress: AccountController.state.caipAddress,\n sourceTokenAddress: state.sourceToken?.address,\n toTokenAddress: state.toToken?.address,\n toTokenAmount: state.toTokenAmount,\n toTokenDecimals: state.toToken?.decimals,\n sourceTokenAmount: state.sourceTokenAmount,\n sourceTokenDecimals: state.sourceToken?.decimals\n };\n },\n setLoading(loading) {\n state.loading = loading;\n },\n setSourceToken(sourceToken) {\n if (!sourceToken) {\n return;\n }\n state.sourceToken = sourceToken;\n this.setTokenValues(sourceToken.address, 'sourceToken');\n },\n setSourceTokenAmount(amount) {\n const { sourceTokenAddress } = this.getParams();\n state.sourceTokenAmount = amount;\n if (sourceTokenAddress) {\n this.setTokenValues(sourceTokenAddress, 'sourceToken');\n }\n },\n setToToken(toToken) {\n const { sourceTokenAddress, sourceTokenAmount } = this.getParams();\n if (!toToken) {\n state.toTokenAmount = '0';\n state.toTokenPriceInUSD = 0;\n return;\n }\n state.toToken = toToken;\n this.setTokenValues(toToken.address, 'toToken');\n if (sourceTokenAddress && sourceTokenAmount) {\n this.makeChecks();\n }\n },\n setToTokenAmount(amount) {\n const { toTokenAddress } = this.getParams();\n state.toTokenAmount = amount;\n if (toTokenAddress) {\n this.setTokenValues(toTokenAddress, 'toToken');\n }\n },\n async setTokenValues(address, target) {\n let price = state.tokensPriceMap[address] || 0;\n if (!price) {\n price = await this.getAddressPrice(address);\n }\n if (target === 'sourceToken') {\n state.sourceTokenPriceInUSD = price;\n }\n else if (target === 'toToken') {\n state.toTokenPriceInUSD = price;\n }\n },\n switchTokens() {\n const newSourceToken = state.toToken ? { ...state.toToken } : undefined;\n const newToToken = state.sourceToken ? { ...state.sourceToken } : undefined;\n this.setSourceToken(newSourceToken);\n this.setToToken(newToToken);\n this.setSourceTokenAmount(state.toTokenAmount || '0');\n ConvertController.convertTokens();\n },\n resetTokens() {\n state.tokens = undefined;\n state.popularTokens = undefined;\n state.myTokensWithBalance = undefined;\n state.initialized = false;\n },\n resetValues() {\n const { networkAddress } = this.getParams();\n const networkToken = state.tokens?.find(token => token.address === networkAddress);\n this.setSourceToken(networkToken);\n state.sourceTokenPriceInUSD = state.tokensPriceMap[networkAddress] || 0;\n state.sourceTokenAmount = '0';\n this.setToToken(undefined);\n state.gasPriceInUSD = 0;\n },\n clearError() {\n state.transactionError = undefined;\n },\n async initializeState() {\n if (!state.initialized) {\n await this.fetchTokens();\n state.initialized = true;\n }\n },\n async fetchTokens() {\n const { networkAddress } = this.getParams();\n await this.getTokenList();\n await this.getNetworkTokenPrice();\n await this.getMyTokensWithBalance();\n const networkToken = state.tokens?.find(token => token.address === networkAddress);\n if (networkToken) {\n this.setSourceToken(networkToken);\n }\n },\n async getTokenList() {\n const tokens = await ConvertApiUtil.getTokenList();\n state.tokens = tokens;\n state.popularTokens = tokens\n .sort((aTokenInfo, bTokenInfo) => {\n if (aTokenInfo.symbol < bTokenInfo.symbol) {\n return -1;\n }\n if (aTokenInfo.symbol > bTokenInfo.symbol) {\n return 1;\n }\n return 0;\n })\n .filter(token => {\n if (ConstantsUtil.POPULAR_TOKENS.includes(token.symbol)) {\n return true;\n }\n return false;\n }, {});\n state.suggestedTokens = tokens.filter(token => {\n if (ConstantsUtil.SUGGESTED_TOKENS.includes(token.symbol)) {\n return true;\n }\n return false;\n }, {});\n },\n async getAddressPrice(address) {\n const existPrice = state.tokensPriceMap[address];\n if (existPrice) {\n return existPrice;\n }\n const response = await BlockchainApiController.fetchTokenPrice({\n projectId: OptionsController.state.projectId,\n addresses: [address]\n });\n const fungibles = response.fungibles || [];\n const allTokens = [...(state.tokens || []), ...(state.myTokensWithBalance || [])];\n const symbol = allTokens?.find(token => token.address === address)?.symbol;\n const price = fungibles.find(p => p.symbol === symbol)?.price || '0';\n const priceAsFloat = parseFloat(price);\n state.tokensPriceMap[address] = priceAsFloat;\n return priceAsFloat;\n },\n async getNetworkTokenPrice() {\n const { networkAddress } = this.getParams();\n const response = await BlockchainApiController.fetchTokenPrice({\n projectId: OptionsController.state.projectId,\n addresses: [networkAddress]\n });\n const token = response.fungibles?.[0];\n const price = token?.price || '0';\n state.tokensPriceMap[networkAddress] = parseFloat(price);\n state.networkPrice = price;\n },\n async getMyTokensWithBalance() {\n const balances = await ConvertApiUtil.getMyTokensWithBalance();\n if (!balances) {\n return;\n }\n await this.getInitialGasPrice();\n this.setBalances(balances);\n },\n setBalances(balances) {\n const { networkAddress } = this.getParams();\n const networkToken = balances.find(token => token.address === networkAddress);\n balances.forEach(token => {\n state.tokensPriceMap[token.address] = token.price || 0;\n });\n state.myTokensWithBalance = balances;\n state.networkBalanceInUSD = networkToken\n ? NumberUtil.multiply(networkToken.quantity.numeric, networkToken.price).toString()\n : '0';\n },\n async getInitialGasPrice() {\n const res = await ConvertApiUtil.fetchGasPrice();\n if (!res) {\n return;\n }\n const value = res.instant;\n const gasFee = BigInt(value);\n const gasLimit = BigInt(INITIAL_GAS_LIMIT);\n const gasPrice = this.calculateGasPriceInUSD(gasLimit, gasFee);\n state.gasPriceInUSD = gasPrice;\n },\n async refreshConvertValues() {\n const { fromAddress, toTokenDecimals, toTokenAddress } = this.getParams();\n if (fromAddress && toTokenAddress && toTokenDecimals && !state.loading) {\n const transaction = await this.getTransaction();\n this.setTransactionDetails(transaction);\n }\n },\n calculateGasPriceInEther(gas, gasPrice) {\n const totalGasCostInWei = gasPrice * gas;\n const totalGasCostInEther = Number(totalGasCostInWei) / 1e18;\n return totalGasCostInEther;\n },\n calculateGasPriceInUSD(gas, gasPrice) {\n const totalGasCostInEther = this.calculateGasPriceInEther(gas, gasPrice);\n const networkPriceInUSD = NumberUtil.bigNumber(state.networkPrice);\n const gasCostInUSD = networkPriceInUSD.multipliedBy(totalGasCostInEther);\n return gasCostInUSD.toNumber();\n },\n calculatePriceImpact(toTokenAmount, gasPriceInUSD) {\n const sourceTokenAmount = state.sourceTokenAmount;\n const sourceTokenPrice = state.sourceTokenPriceInUSD;\n const toTokenPrice = state.toTokenPriceInUSD;\n const totalCostInUSD = NumberUtil.bigNumber(sourceTokenAmount)\n .multipliedBy(sourceTokenPrice)\n .plus(gasPriceInUSD);\n const effectivePricePerToToken = totalCostInUSD.dividedBy(toTokenAmount);\n const priceImpact = effectivePricePerToToken\n .minus(toTokenPrice)\n .dividedBy(toTokenPrice)\n .multipliedBy(100);\n return priceImpact.toNumber();\n },\n calculateMaxSlippage() {\n const slippageToleranceDecimal = NumberUtil.bigNumber(state.slippage).dividedBy(100);\n const maxSlippageAmount = NumberUtil.multiply(state.sourceTokenAmount, slippageToleranceDecimal);\n return maxSlippageAmount.toNumber();\n },\n async convertTokens() {\n const { sourceTokenAddress, toTokenAddress } = this.getParams();\n if (!sourceTokenAddress || !toTokenAddress) {\n return;\n }\n await this.makeChecks();\n },\n async makeChecks() {\n const { toTokenDecimals, toTokenAddress } = this.getParams();\n if (!toTokenDecimals || !toTokenAddress) {\n return;\n }\n state.loading = true;\n const transaction = await this.getTransaction();\n this.setTransactionDetails(transaction);\n state.loading = false;\n },\n async getTransaction() {\n const { fromCaipAddress, sourceTokenAddress, sourceTokenAmount, sourceTokenDecimals } = this.getParams();\n if (!fromCaipAddress ||\n !sourceTokenAddress ||\n !sourceTokenAmount ||\n parseFloat(sourceTokenAmount) === 0 ||\n !sourceTokenDecimals) {\n return undefined;\n }\n const hasAllowance = await ConvertApiUtil.fetchConvertAllowance({\n userAddress: fromCaipAddress,\n tokenAddress: sourceTokenAddress,\n sourceTokenAmount,\n sourceTokenDecimals\n });\n let transaction = undefined;\n if (hasAllowance) {\n state.approvalTransaction = undefined;\n transaction = await this.createConvert();\n state.convertTransaction = transaction;\n }\n else {\n state.convertTransaction = undefined;\n transaction = await this.createTokenAllowance();\n state.approvalTransaction = transaction;\n }\n return transaction;\n },\n getToAmount() {\n const { sourceTokenDecimals } = this.getParams();\n const decimals = sourceTokenDecimals || 18;\n const multiplier = 10 ** decimals;\n const toTokenConvertedAmount = state.sourceTokenPriceInUSD && state.toTokenPriceInUSD && state.sourceTokenAmount\n ? NumberUtil.bigNumber(state.sourceTokenAmount)\n .multipliedBy(state.sourceTokenPriceInUSD)\n .dividedBy(state.toTokenPriceInUSD)\n : NumberUtil.bigNumber(0);\n return toTokenConvertedAmount.multipliedBy(multiplier).toString();\n },\n async createTokenAllowance() {\n const { fromCaipAddress, fromAddress, sourceTokenAddress, toTokenAddress } = this.getParams();\n if (!fromCaipAddress || !toTokenAddress) {\n return undefined;\n }\n if (!sourceTokenAddress) {\n throw new Error('>>> createTokenAllowance - No source token address found.');\n }\n const response = await BlockchainApiController.generateApproveCalldata({\n projectId: OptionsController.state.projectId,\n from: sourceTokenAddress,\n to: toTokenAddress,\n userAddress: fromCaipAddress\n });\n const gasLimit = await ConnectionController.estimateGas({\n address: fromAddress,\n to: CoreHelperUtil.getPlainAddress(response.tx.to),\n data: response.tx.data\n });\n const toAmount = this.getToAmount();\n const transaction = {\n data: response.tx.data,\n to: CoreHelperUtil.getPlainAddress(response.tx.from),\n gas: gasLimit,\n gasPrice: BigInt(response.tx.eip155.gasPrice),\n value: BigInt(response.tx.value),\n toAmount\n };\n return transaction;\n },\n async sendTransactionForApproval(data) {\n const { fromAddress } = this.getParams();\n state.transactionLoading = true;\n RouterController.pushTransactionStack({\n view: null,\n goBack: true\n });\n try {\n await ConnectionController.sendTransaction({\n address: fromAddress,\n to: data.to,\n data: data.data,\n value: BigInt(data.value),\n gasPrice: BigInt(data.gasPrice)\n });\n state.approvalTransaction = undefined;\n state.transactionLoading = false;\n this.makeChecks();\n }\n catch (err) {\n const error = err;\n state.transactionError = error?.shortMessage;\n state.transactionLoading = false;\n }\n },\n async createConvert() {\n const { networkAddress, fromCaipAddress, sourceTokenAddress, sourceTokenDecimals, sourceTokenAmount, toTokenAddress } = this.getParams();\n if (!fromCaipAddress ||\n !sourceTokenAmount ||\n !sourceTokenAddress ||\n !toTokenAddress ||\n !sourceTokenDecimals) {\n return undefined;\n }\n try {\n const amount = ConnectionController.parseUnits(sourceTokenAmount, sourceTokenDecimals).toString();\n const response = await BlockchainApiController.generateConvertCalldata({\n projectId: OptionsController.state.projectId,\n userAddress: fromCaipAddress,\n from: sourceTokenAddress,\n to: toTokenAddress,\n amount\n });\n const isSourceTokenIsNetworkToken = sourceTokenAddress === networkAddress;\n const toAmount = this.getToAmount();\n const gas = BigInt(response.tx.eip155.gas);\n const gasPrice = BigInt(response.tx.eip155.gasPrice);\n const transaction = {\n data: response.tx.data,\n to: CoreHelperUtil.getPlainAddress(response.tx.to),\n gas,\n gasPrice,\n value: isSourceTokenIsNetworkToken ? BigInt(amount) : BigInt('0'),\n toAmount\n };\n state.gasPriceInUSD = this.calculateGasPriceInUSD(gas, gasPrice);\n return transaction;\n }\n catch (error) {\n return undefined;\n }\n },\n async sendTransactionForConvert(data) {\n if (!data) {\n return undefined;\n }\n const { fromAddress } = this.getParams();\n state.transactionLoading = true;\n RouterController.pushTransactionStack({\n view: 'Account',\n goBack: false,\n onSuccess() {\n ConvertController.resetValues();\n }\n });\n try {\n const transactionHash = await ConnectionController.sendTransaction({\n address: fromAddress,\n to: data.to,\n data: data.data,\n gas: data.gas,\n gasPrice: BigInt(data.gasPrice),\n value: data.value\n });\n state.transactionLoading = false;\n setTimeout(() => {\n this.resetValues();\n this.getMyTokensWithBalance();\n }, 1000);\n return transactionHash;\n }\n catch (err) {\n const error = err;\n state.transactionError = error?.shortMessage;\n state.transactionLoading = false;\n SnackController.showError(error?.shortMessage || 'Transaction error');\n return undefined;\n }\n },\n getToTokenValues(amountBigInt, decimals) {\n const { toTokenAddress } = this.getParams();\n if (!toTokenAddress) {\n return {\n toTokenAmount: '0',\n toTokenPriceInUSD: 0\n };\n }\n const toTokenAmount = NumberUtil.bigNumber(amountBigInt)\n .dividedBy(10 ** decimals)\n .toFixed(20);\n const toTokenPrice = state.tokensPriceMap[toTokenAddress] || '0';\n const toTokenPriceInUSD = NumberUtil.bigNumber(toTokenPrice).toNumber();\n return {\n toTokenAmount,\n toTokenPriceInUSD\n };\n },\n isInsufficientNetworkTokenForGas() {\n return NumberUtil.bigNumber(NumberUtil.bigNumber(state.gasPriceInUSD || '0')).isGreaterThan(state.networkBalanceInUSD);\n },\n setTransactionDetails(transaction) {\n const { toTokenAddress, toTokenDecimals } = this.getParams();\n if (!transaction || !toTokenAddress || !toTokenDecimals) {\n return;\n }\n const insufficientNetworkToken = this.isInsufficientNetworkTokenForGas();\n if (insufficientNetworkToken) {\n state.inputError = 'Insufficient balance';\n }\n else {\n state.inputError = undefined;\n }\n const { toTokenAmount, toTokenPriceInUSD } = this.getToTokenValues(transaction.toAmount, toTokenDecimals);\n state.toTokenAmount = toTokenAmount;\n state.toTokenPriceInUSD = toTokenPriceInUSD;\n state.gasPriceInUSD = this.calculateGasPriceInUSD(transaction.gas, transaction.gasPrice);\n state.priceImpact = this.calculatePriceImpact(state.toTokenAmount, state.gasPriceInUSD);\n state.maxSlippage = this.calculateMaxSlippage();\n }\n};\n//# sourceMappingURL=ConvertController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { SnackController } from './SnackController.js';\nimport { ConvertController } from './ConvertController.js';\nimport { ConvertApiUtil } from '../utils/ConvertApiUtil.js';\nconst state = proxy({\n isConnected: false,\n currentTab: 0,\n tokenBalance: [],\n smartAccountDeployed: false\n});\nexport const AccountController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setIsConnected(isConnected) {\n state.isConnected = isConnected;\n },\n setCaipAddress(caipAddress) {\n state.caipAddress = caipAddress;\n state.address = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined;\n },\n setBalance(balance, balanceSymbol) {\n state.balance = balance;\n state.balanceSymbol = balanceSymbol;\n },\n setProfileName(profileName) {\n state.profileName = profileName;\n },\n setProfileImage(profileImage) {\n state.profileImage = profileImage;\n },\n setAddressExplorerUrl(explorerUrl) {\n state.addressExplorerUrl = explorerUrl;\n },\n setSmartAccountDeployed(isDeployed) {\n state.smartAccountDeployed = isDeployed;\n },\n setCurrentTab(currentTab) {\n state.currentTab = currentTab;\n },\n setTokenBalance(tokenBalance) {\n if (tokenBalance) {\n state.tokenBalance = ref(tokenBalance);\n }\n },\n setConnectedWalletInfo(connectedWalletInfo) {\n state.connectedWalletInfo = connectedWalletInfo;\n },\n setPreferredAccountType(preferredAccountType) {\n state.preferredAccountType = preferredAccountType;\n },\n async fetchTokenBalance() {\n try {\n if (state.address) {\n const response = await BlockchainApiController.getBalance(state.address);\n this.setTokenBalance(response.balances);\n ConvertController.setBalances(ConvertApiUtil.mapBalancesToConvertTokens(response.balances));\n }\n }\n catch (error) {\n SnackController.showError('Failed to fetch token balance');\n }\n },\n resetAccount() {\n state.isConnected = false;\n state.smartAccountDeployed = false;\n state.currentTab = 0;\n state.caipAddress = undefined;\n state.address = undefined;\n state.balance = undefined;\n state.balanceSymbol = undefined;\n state.profileName = undefined;\n state.profileImage = undefined;\n state.addressExplorerUrl = undefined;\n state.tokenBalance = [];\n state.connectedWalletInfo = undefined;\n state.preferredAccountType = undefined;\n }\n};\n//# sourceMappingURL=AccountController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n walletImages: {},\n networkImages: {},\n connectorImages: {},\n tokenImages: {},\n currencyImages: {}\n});\nexport const AssetController = {\n state,\n subscribeNetworkImages(callback) {\n return sub(state.networkImages, () => callback(state.networkImages));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setWalletImage(key, value) {\n state.walletImages[key] = value;\n },\n setNetworkImage(key, value) {\n state.networkImages[key] = value;\n },\n setConnectorImage(key, value) {\n state.connectorImages[key] = value;\n },\n setTokenImage(key, value) {\n state.tokenImages[key] = value;\n },\n setCurrencyImage(key, value) {\n state.currencyImages[key] = value;\n }\n};\n//# sourceMappingURL=AssetController.js.map","import { proxy, subscribe as sub, snapshot } from 'valtio/vanilla';\nimport { ConnectorController } from './ConnectorController.js';\nconst state = proxy({\n themeMode: 'dark',\n themeVariables: {}\n});\nexport const ThemeController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setThemeMode(themeMode) {\n state.themeMode = themeMode;\n try {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n emailConnector.provider.syncTheme({\n themeMode: ThemeController.getSnapshot().themeMode\n });\n }\n }\n catch {\n console.info('Unable to sync theme to email connector');\n }\n },\n setThemeVariables(themeVariables) {\n state.themeVariables = { ...state.themeVariables, ...themeVariables };\n try {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n emailConnector.provider.syncTheme({\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n }\n catch {\n console.info('Unable to sync theme to email connector');\n }\n },\n getSnapshot() {\n return snapshot(state);\n }\n};\n//# sourceMappingURL=ThemeController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, snapshot } from 'valtio/vanilla';\nimport { OptionsController } from './OptionsController.js';\nimport { ThemeController } from './ThemeController.js';\nconst state = proxy({\n connectors: []\n});\nexport const ConnectorController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setConnectors(connectors) {\n state.connectors = connectors.map(c => ref(c));\n },\n addConnector(connector) {\n state.connectors.push(ref(connector));\n if (connector.id === 'w3mEmail') {\n const emailConnector = connector;\n const optionsState = snapshot(OptionsController.state);\n emailConnector?.provider?.syncDappData?.({\n metadata: optionsState.metadata,\n sdkVersion: optionsState.sdkVersion,\n projectId: optionsState.projectId\n });\n emailConnector.provider.syncTheme({\n themeMode: ThemeController.getSnapshot().themeMode,\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n },\n getEmailConnector() {\n return state.connectors.find(c => c.type === 'EMAIL');\n },\n getAnnouncedConnectorRdns() {\n return state.connectors.filter(c => c.type === 'ANNOUNCED').map(c => c.info?.rdns);\n },\n getConnectors() {\n return state.connectors;\n },\n getConnector(id, rdns) {\n return state.connectors.find(c => c.explorerId === id || c.info?.rdns === rdns);\n }\n};\n//# sourceMappingURL=ConnectorController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy } from 'valtio/vanilla';\nimport { CoreHelperUtil } from '../utils/CoreHelperUtil.js';\nimport { FetchUtil } from '../utils/FetchUtil.js';\nimport { StorageUtil } from '../utils/StorageUtil.js';\nimport { AssetController } from './AssetController.js';\nimport { ConnectorController } from './ConnectorController.js';\nimport { NetworkController } from './NetworkController.js';\nimport { OptionsController } from './OptionsController.js';\nconst baseUrl = CoreHelperUtil.getApiUrl();\nexport const api = new FetchUtil({ baseUrl });\nconst entries = '40';\nconst recommendedEntries = '4';\nconst state = proxy({\n page: 1,\n count: 0,\n featured: [],\n recommended: [],\n wallets: [],\n search: [],\n isAnalyticsEnabled: false\n});\nexport const ApiController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n _getApiHeaders() {\n const { projectId, sdkType, sdkVersion } = OptionsController.state;\n return {\n 'x-project-id': projectId,\n 'x-sdk-type': sdkType,\n 'x-sdk-version': sdkVersion\n };\n },\n async _fetchWalletImage(imageId) {\n const imageUrl = `${api.baseUrl}/getWalletImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setWalletImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchNetworkImage(imageId) {\n const imageUrl = `${api.baseUrl}/public/getAssetImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setNetworkImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchConnectorImage(imageId) {\n const imageUrl = `${api.baseUrl}/public/getAssetImage/${imageId}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setConnectorImage(imageId, URL.createObjectURL(blob));\n },\n async _fetchCurrencyImage(countryCode) {\n const imageUrl = `${api.baseUrl}/public/getCurrencyImage/${countryCode}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setCurrencyImage(countryCode, URL.createObjectURL(blob));\n },\n async _fetchTokenImage(symbol) {\n const imageUrl = `${api.baseUrl}/public/getTokenImage/${symbol}`;\n const blob = await api.getBlob({ path: imageUrl, headers: ApiController._getApiHeaders() });\n AssetController.setTokenImage(symbol, URL.createObjectURL(blob));\n },\n async fetchNetworkImages() {\n const { requestedCaipNetworks } = NetworkController.state;\n const ids = requestedCaipNetworks?.map(({ imageId }) => imageId).filter(Boolean);\n if (ids) {\n await Promise.allSettled(ids.map(id => ApiController._fetchNetworkImage(id)));\n }\n },\n async fetchConnectorImages() {\n const { connectors } = ConnectorController.state;\n const ids = connectors.map(({ imageId }) => imageId).filter(Boolean);\n await Promise.allSettled(ids.map(id => ApiController._fetchConnectorImage(id)));\n },\n async fetchCurrencyImages(currencies = []) {\n await Promise.allSettled(currencies.map(currency => ApiController._fetchCurrencyImage(currency)));\n },\n async fetchTokenImages(tokens = []) {\n await Promise.allSettled(tokens.map(token => ApiController._fetchTokenImage(token)));\n },\n async fetchFeaturedWallets() {\n const { featuredWalletIds } = OptionsController.state;\n if (featuredWalletIds?.length) {\n const { data } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n entries: featuredWalletIds?.length\n ? String(featuredWalletIds.length)\n : recommendedEntries,\n include: featuredWalletIds?.join(',')\n }\n });\n data.sort((a, b) => featuredWalletIds.indexOf(a.id) - featuredWalletIds.indexOf(b.id));\n const images = data.map(d => d.image_id).filter(Boolean);\n await Promise.allSettled(images.map(id => ApiController._fetchWalletImage(id)));\n state.featured = data;\n }\n },\n async fetchRecommendedWallets() {\n const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;\n const exclude = [...(excludeWalletIds ?? []), ...(featuredWalletIds ?? [])].filter(Boolean);\n const { data, count } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n chains: NetworkController.state.caipNetwork?.id,\n entries: recommendedEntries,\n include: includeWalletIds?.join(','),\n exclude: exclude?.join(',')\n }\n });\n const recent = StorageUtil.getRecentWallets();\n const recommendedImages = data.map(d => d.image_id).filter(Boolean);\n const recentImages = recent.map(r => r.image_id).filter(Boolean);\n await Promise.allSettled([...recommendedImages, ...recentImages].map(id => ApiController._fetchWalletImage(id)));\n state.recommended = data;\n state.count = count ?? 0;\n },\n async fetchWallets({ page }) {\n const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;\n const exclude = [\n ...state.recommended.map(({ id }) => id),\n ...(excludeWalletIds ?? []),\n ...(featuredWalletIds ?? [])\n ].filter(Boolean);\n const { data, count } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: String(page),\n entries,\n chains: NetworkController.state.caipNetwork?.id,\n include: includeWalletIds?.join(','),\n exclude: exclude.join(',')\n }\n });\n const images = data.map(w => w.image_id).filter(Boolean);\n await Promise.allSettled([\n ...images.map(id => ApiController._fetchWalletImage(id)),\n CoreHelperUtil.wait(300)\n ]);\n state.wallets = [...state.wallets, ...data];\n state.count = count > state.count ? count : state.count;\n state.page = page;\n },\n async searchWallet({ search }) {\n const { includeWalletIds, excludeWalletIds } = OptionsController.state;\n state.search = [];\n const { data } = await api.get({\n path: '/getWallets',\n headers: ApiController._getApiHeaders(),\n params: {\n page: '1',\n entries: '100',\n search,\n chains: NetworkController.state.caipNetwork?.id,\n include: includeWalletIds?.join(','),\n exclude: excludeWalletIds?.join(',')\n }\n });\n const images = data.map(w => w.image_id).filter(Boolean);\n await Promise.allSettled([\n ...images.map(id => ApiController._fetchWalletImage(id)),\n CoreHelperUtil.wait(300)\n ]);\n state.search = data;\n },\n async reFetchWallets() {\n state.page = 1;\n state.wallets = [];\n await ApiController.fetchFeaturedWallets();\n await ApiController.fetchRecommendedWallets();\n },\n prefetch() {\n const promises = [\n ApiController.fetchFeaturedWallets(),\n ApiController.fetchRecommendedWallets(),\n ApiController.fetchNetworkImages(),\n ApiController.fetchConnectorImages()\n ];\n if (OptionsController.state.enableAnalytics === undefined) {\n promises.push(ApiController.fetchAnalyticsConfig());\n }\n state.prefetchPromise = Promise.race([Promise.allSettled(promises), CoreHelperUtil.wait(3000)]);\n },\n async fetchAnalyticsConfig() {\n const { isAnalyticsEnabled } = await api.get({\n path: '/getAnalyticsConfig',\n headers: ApiController._getApiHeaders()\n });\n OptionsController.setEnableAnalytics(isAnalyticsEnabled);\n }\n};\n//# sourceMappingURL=ApiController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { AccountController } from './AccountController.js';\nimport { ApiController } from './ApiController.js';\nimport { EventsController } from './EventsController.js';\nimport { PublicStateController } from './PublicStateController.js';\nimport { RouterController } from './RouterController.js';\nconst state = proxy({\n loading: false,\n open: false\n});\nexport const ModalController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n async open(options) {\n await ApiController.state.prefetchPromise;\n const connected = AccountController.state.isConnected;\n if (options?.view) {\n RouterController.reset(options.view);\n }\n else if (connected) {\n RouterController.reset('Account');\n }\n else {\n RouterController.reset('Connect');\n }\n state.open = true;\n PublicStateController.set({ open: true });\n EventsController.sendEvent({\n type: 'track',\n event: 'MODAL_OPEN',\n properties: { connected }\n });\n },\n close() {\n const connected = AccountController.state.isConnected;\n state.open = false;\n PublicStateController.set({ open: false });\n EventsController.sendEvent({\n type: 'track',\n event: 'MODAL_CLOSE',\n properties: { connected }\n });\n },\n setLoading(loading) {\n state.loading = loading;\n PublicStateController.set({ loading });\n }\n};\n//# sourceMappingURL=ModalController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, subscribe as sub } from 'valtio/vanilla';\nimport { ONRAMP_PROVIDERS } from '../utils/ConstantsUtil.js';\nimport { BlockchainApiController } from './BlockchainApiController.js';\nimport { ApiController } from './ApiController.js';\nexport const USDC_CURRENCY_DEFAULT = {\n id: '2b92315d-eab7-5bef-84fa-089a131333f5',\n name: 'USD Coin',\n symbol: 'USDC',\n networks: [\n {\n name: 'ethereum-mainnet',\n display_name: 'Ethereum',\n chain_id: '1',\n contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'\n },\n {\n name: 'polygon-mainnet',\n display_name: 'Polygon',\n chain_id: '137',\n contract_address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'\n }\n ]\n};\nexport const USD_CURRENCY_DEFAULT = {\n id: 'USD',\n payment_method_limits: [\n {\n id: 'card',\n min: '10.00',\n max: '7500.00'\n },\n {\n id: 'ach_bank_account',\n min: '10.00',\n max: '25000.00'\n }\n ]\n};\nconst defaultState = {\n providers: ONRAMP_PROVIDERS,\n selectedProvider: null,\n error: null,\n purchaseCurrency: USDC_CURRENCY_DEFAULT,\n paymentCurrency: USD_CURRENCY_DEFAULT,\n purchaseCurrencies: [USDC_CURRENCY_DEFAULT],\n paymentCurrencies: [],\n quotesLoading: false\n};\nconst state = proxy(defaultState);\nexport const OnRampController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setSelectedProvider(provider) {\n state.selectedProvider = provider;\n },\n setPurchaseCurrency(currency) {\n state.purchaseCurrency = currency;\n },\n setPaymentCurrency(currency) {\n state.paymentCurrency = currency;\n },\n setPurchaseAmount(amount) {\n this.state.purchaseAmount = amount;\n },\n setPaymentAmount(amount) {\n this.state.paymentAmount = amount;\n },\n async getAvailableCurrencies() {\n const options = await BlockchainApiController.getOnrampOptions();\n state.purchaseCurrencies = options.purchaseCurrencies;\n state.paymentCurrencies = options.paymentCurrencies;\n state.paymentCurrency = options.paymentCurrencies[0] || USD_CURRENCY_DEFAULT;\n state.purchaseCurrency = options.purchaseCurrencies[0] || USDC_CURRENCY_DEFAULT;\n await ApiController.fetchCurrencyImages(options.paymentCurrencies.map(currency => currency.id));\n await ApiController.fetchTokenImages(options.purchaseCurrencies.map(currency => currency.symbol));\n },\n async getQuote() {\n state.quotesLoading = true;\n try {\n const quote = await BlockchainApiController.getOnrampQuote({\n purchaseCurrency: state.purchaseCurrency,\n paymentCurrency: state.paymentCurrency,\n amount: state.paymentAmount?.toString() || '0',\n network: state.purchaseCurrency?.symbol\n });\n state.quotesLoading = false;\n state.purchaseAmount = Number(quote.purchaseAmount.amount);\n return quote;\n }\n catch (error) {\n state.error = error.message;\n state.quotesLoading = false;\n return null;\n }\n finally {\n state.quotesLoading = false;\n }\n },\n resetState() {\n state.providers = ONRAMP_PROVIDERS;\n state.selectedProvider = null;\n state.error = null;\n state.purchaseCurrency = USDC_CURRENCY_DEFAULT;\n state.paymentCurrency = USD_CURRENCY_DEFAULT;\n state.purchaseCurrencies = [USDC_CURRENCY_DEFAULT];\n state.paymentCurrencies = [];\n state.paymentAmount = undefined;\n state.purchaseAmount = undefined;\n state.quotesLoading = false;\n }\n};\n//# sourceMappingURL=OnRampController.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({});\nexport const SendController = {\n state,\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n setToken(token) {\n if (token) {\n state.token = ref(token);\n }\n },\n setTokenAmount(sendTokenAmount) {\n state.sendTokenAmount = sendTokenAmount;\n },\n setReceiverAddress(receiverAddress) {\n state.receiverAddress = receiverAddress;\n },\n setReceiverProfileImageUrl(receiverProfileImageUrl) {\n state.receiverProfileImageUrl = receiverProfileImageUrl;\n },\n setReceiverProfileName(receiverProfileName) {\n state.receiverProfileName = receiverProfileName;\n },\n resetSend() {\n state.token = undefined;\n state.sendTokenAmount = undefined;\n state.receiverAddress = undefined;\n state.receiverProfileImageUrl = undefined;\n state.receiverProfileName = undefined;\n }\n};\n//# sourceMappingURL=SendController.js.map","import { AssetController } from '../controllers/AssetController.js';\nexport const AssetUtil = {\n getWalletImage(wallet) {\n if (wallet?.image_url) {\n return wallet?.image_url;\n }\n if (wallet?.image_id) {\n return AssetController.state.walletImages[wallet.image_id];\n }\n return undefined;\n },\n getNetworkImage(network) {\n if (network?.imageUrl) {\n return network?.imageUrl;\n }\n if (network?.imageId) {\n return AssetController.state.networkImages[network.imageId];\n }\n return undefined;\n },\n getConnectorImage(connector) {\n if (connector?.imageUrl) {\n return connector.imageUrl;\n }\n if (connector?.imageId) {\n return AssetController.state.connectorImages[connector.imageId];\n }\n return undefined;\n }\n};\n//# sourceMappingURL=AssetUtil.js.map","import { RouterController } from '../controllers/RouterController.js';\nimport { ModalController } from '../controllers/ModalController.js';\nexport const RouterUtil = {\n goBackOrCloseModal() {\n if (RouterController.state.history.length > 1) {\n RouterController.goBack();\n }\n else {\n ModalController.close();\n }\n },\n navigateAfterNetworkSwitch() {\n const { history } = RouterController.state;\n const networkSelectIndex = history.findIndex(name => name === 'Networks');\n if (networkSelectIndex >= 1) {\n RouterController.goBackToIndex(networkSelectIndex - 1);\n }\n else {\n ModalController.close();\n }\n }\n};\n//# sourceMappingURL=RouterUtil.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"\":3===i?\"\":\"\",c=f;for(let i=0;i\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"\")+(2===i?\"\":3===i?\"\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as s}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class r extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s}}r._$litElement$=!0,r[\"finalized\"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r});const o={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.1.1\");export{r as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","import { svg } from 'lit';\nexport const convertInputMaskBottomSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=convert-input-mask-bottom.js.map","import { svg } from 'lit';\nexport const convertInputMaskTopSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=convert-input-mask-top.js.map","import { css, unsafeCSS } from 'lit';\nlet themeTag = undefined;\nlet darkModeTag = undefined;\nlet lightModeTag = undefined;\nexport function initializeTheming(themeVariables, themeMode) {\n themeTag = document.createElement('style');\n darkModeTag = document.createElement('style');\n lightModeTag = document.createElement('style');\n themeTag.textContent = createRootStyles(themeVariables).core.cssText;\n darkModeTag.textContent = createRootStyles(themeVariables).dark.cssText;\n lightModeTag.textContent = createRootStyles(themeVariables).light.cssText;\n document.head.appendChild(themeTag);\n document.head.appendChild(darkModeTag);\n document.head.appendChild(lightModeTag);\n setColorTheme(themeMode);\n}\nexport function setColorTheme(themeMode) {\n if (darkModeTag && lightModeTag) {\n if (themeMode === 'light') {\n darkModeTag.removeAttribute('media');\n lightModeTag.media = 'enabled';\n }\n else {\n lightModeTag.removeAttribute('media');\n darkModeTag.media = 'enabled';\n }\n }\n}\nexport function setThemeVariables(themeVariables) {\n if (themeTag && darkModeTag && lightModeTag) {\n themeTag.textContent = createRootStyles(themeVariables).core.cssText;\n darkModeTag.textContent = createRootStyles(themeVariables).dark.cssText;\n lightModeTag.textContent = createRootStyles(themeVariables).light.cssText;\n }\n}\nfunction createRootStyles(themeVariables) {\n return {\n core: css `\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');\n :root {\n --w3m-color-mix-strength: ${unsafeCSS(themeVariables?.['--w3m-color-mix-strength']\n ? `${themeVariables['--w3m-color-mix-strength']}%`\n : '0%')};\n --w3m-font-family: ${unsafeCSS(themeVariables?.['--w3m-font-family'] ||\n 'Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;')};\n --w3m-font-size-master: ${unsafeCSS(themeVariables?.['--w3m-font-size-master'] || '10px')};\n --w3m-border-radius-master: ${unsafeCSS(themeVariables?.['--w3m-border-radius-master'] || '4px')};\n --w3m-z-index: ${unsafeCSS(themeVariables?.['--w3m-z-index'] || 999)};\n\n --wui-font-family: var(--w3m-font-family);\n\n --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);\n --wui-font-size-micro: var(--w3m-font-size-master);\n --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);\n --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);\n --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);\n --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);\n --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);\n --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);\n --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);\n\n --wui-border-radius-5xs: var(--w3m-border-radius-master);\n --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);\n --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);\n --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);\n --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);\n --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);\n --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);\n --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);\n --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);\n\n --wui-font-weight-light: 400;\n --wui-font-weight-regular: 500;\n --wui-font-weight-medium: 600;\n --wui-font-weight-bold: 700;\n\n --wui-letter-spacing-2xl: -1.6px;\n --wui-letter-spacing-medium-title: -0.96px;\n --wui-letter-spacing-large: -0.8px;\n --wui-letter-spacing-medium: -0.72px;\n --wui-letter-spacing-paragraph: -0.64px;\n --wui-letter-spacing-small: -0.56px;\n --wui-letter-spacing-tiny: -0.48px;\n --wui-letter-spacing-micro: -0.2px;\n --wui-letter-spacing-mini: -0.16px;\n\n --wui-spacing-0: 0px;\n --wui-spacing-4xs: 2px;\n --wui-spacing-3xs: 4px;\n --wui-spacing-xxs: 6px;\n --wui-spacing-2xs: 7px;\n --wui-spacing-xs: 8px;\n --wui-spacing-1xs: 10px;\n --wui-spacing-s: 12px;\n --wui-spacing-m: 14px;\n --wui-spacing-l: 16px;\n --wui-spacing-2l: 18px;\n --wui-spacing-xl: 20px;\n --wui-spacing-xxl: 24px;\n --wui-spacing-2xl: 32px;\n --wui-spacing-3xl: 40px;\n --wui-spacing-4xl: 90px;\n\n --wui-icon-box-size-xxs: 14px;\n --wui-icon-box-size-xs: 20px;\n --wui-icon-box-size-sm: 24px;\n --wui-icon-box-size-md: 32px;\n --wui-icon-box-size-lg: 40px;\n --wui-icon-box-size-xl: 64px;\n\n --wui-icon-size-inherit: inherit;\n --wui-icon-size-xxs: 10px;\n --wui-icon-size-xs: 12px;\n --wui-icon-size-sm: 14px;\n --wui-icon-size-md: 16px;\n --wui-icon-size-mdl: 18px;\n --wui-icon-size-lg: 20px;\n --wui-icon-size-xl: 24px;\n\n --wui-wallet-image-size-inherit: inherit;\n --wui-wallet-image-size-sm: 40px;\n --wui-wallet-image-size-md: 56px;\n --wui-wallet-image-size-lg: 80px;\n\n --wui-visual-size-size-inherit: inherit;\n --wui-visual-size-sm: 40px;\n --wui-visual-size-md: 55px;\n --wui-visual-size-lg: 80px;\n\n --wui-box-size-md: 100px;\n --wui-box-size-lg: 120px;\n\n --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);\n --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);\n\n --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);\n --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);\n --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);\n\n --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);\n\n --wui-duration-lg: 200ms;\n --wui-duration-md: 125ms;\n --wui-duration-sm: 75ms;\n\n --wui-path-network-sm: path(\n 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'\n );\n\n --wui-path-network-md: path(\n 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'\n );\n\n --wui-path-network-lg: path(\n 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'\n );\n\n --wui-width-network-sm: 36px;\n --wui-width-network-md: 48px;\n --wui-width-network-lg: 86px;\n\n --wui-height-network-sm: 40px;\n --wui-height-network-md: 54px;\n --wui-height-network-lg: 96px;\n\n --wui-icon-size-network-xs: 12px;\n --wui-icon-size-network-sm: 16px;\n --wui-icon-size-network-md: 24px;\n --wui-icon-size-network-lg: 42px;\n\n --wui-color-inherit: inherit;\n\n --wui-color-inverse-100: #fff;\n --wui-color-inverse-000: #000;\n\n --wui-cover: rgba(20, 20, 20, 0.8);\n\n --wui-color-modal-bg: var(--wui-color-modal-bg-base);\n\n --wui-color-blue-100: var(--wui-color-blue-base-100);\n\n --wui-color-accent-100: var(--wui-color-accent-base-100);\n --wui-color-accent-090: var(--wui-color-accent-base-090);\n --wui-color-accent-080: var(--wui-color-accent-base-080);\n\n --wui-accent-glass-090: var(--wui-accent-glass-base-090);\n --wui-accent-glass-080: var(--wui-accent-glass-base-080);\n --wui-accent-glass-020: var(--wui-accent-glass-base-020);\n --wui-accent-glass-015: var(--wui-accent-glass-base-015);\n --wui-accent-glass-010: var(--wui-accent-glass-base-010);\n --wui-accent-glass-005: var(--wui-accent-glass-base-005);\n --wui-accent-glass-002: var(--wui-accent-glass-base-002);\n\n --wui-color-fg-100: var(--wui-color-fg-base-100);\n --wui-color-fg-125: var(--wui-color-fg-base-125);\n --wui-color-fg-150: var(--wui-color-fg-base-150);\n --wui-color-fg-175: var(--wui-color-fg-base-175);\n --wui-color-fg-200: var(--wui-color-fg-base-200);\n --wui-color-fg-225: var(--wui-color-fg-base-225);\n --wui-color-fg-250: var(--wui-color-fg-base-250);\n --wui-color-fg-275: var(--wui-color-fg-base-275);\n --wui-color-fg-300: var(--wui-color-fg-base-300);\n\n --wui-color-bg-100: var(--wui-color-bg-base-100);\n --wui-color-bg-125: var(--wui-color-bg-base-125);\n --wui-color-bg-150: var(--wui-color-bg-base-150);\n --wui-color-bg-175: var(--wui-color-bg-base-175);\n --wui-color-bg-200: var(--wui-color-bg-base-200);\n --wui-color-bg-225: var(--wui-color-bg-base-225);\n --wui-color-bg-250: var(--wui-color-bg-base-250);\n --wui-color-bg-275: var(--wui-color-bg-base-275);\n --wui-color-bg-300: var(--wui-color-bg-base-300);\n\n --wui-color-success-100: var(--wui-color-success-base-100);\n --wui-color-error-100: var(--wui-color-error-base-100);\n\n --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);\n --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);\n --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);\n --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);\n\n --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-base-100);\n\n --wui-avatar-border: var(--wui-avatar-border-base);\n\n --wui-thumbnail-border: var(--wui-thumbnail-border-base);\n\n --wui-box-shadow-blue: rgba(71, 161, 255, 0.16);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :root {\n --wui-color-modal-bg: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-modal-bg-base)\n );\n\n --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 16%, transparent);\n\n --wui-color-accent-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n var(--w3m-default)\n );\n --wui-color-accent-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n var(--w3m-default)\n );\n\n --wui-color-accent-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n transparent\n );\n --wui-color-accent-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n transparent\n );\n\n --wui-accent-glass-090: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 90%,\n transparent\n );\n --wui-accent-glass-080: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 80%,\n transparent\n );\n --wui-accent-glass-020: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 20%,\n transparent\n );\n --wui-accent-glass-015: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 15%,\n transparent\n );\n --wui-accent-glass-010: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 10%,\n transparent\n );\n --wui-accent-glass-005: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 5%,\n transparent\n );\n --wui-color-accent-002: color-mix(\n in srgb,\n var(--wui-color-accent-base-100) 2%,\n transparent\n );\n\n --wui-color-fg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-100)\n );\n --wui-color-fg-125: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-125)\n );\n --wui-color-fg-150: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-150)\n );\n --wui-color-fg-175: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-175)\n );\n --wui-color-fg-200: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-200)\n );\n --wui-color-fg-225: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-225)\n );\n --wui-color-fg-250: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-250)\n );\n --wui-color-fg-275: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-275)\n );\n --wui-color-fg-300: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-fg-base-300)\n );\n\n --wui-color-bg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-100)\n );\n --wui-color-bg-125: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-125)\n );\n --wui-color-bg-150: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-150)\n );\n --wui-color-bg-175: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-175)\n );\n --wui-color-bg-200: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-200)\n );\n --wui-color-bg-225: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-225)\n );\n --wui-color-bg-250: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-250)\n );\n --wui-color-bg-275: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-275)\n );\n --wui-color-bg-300: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-bg-base-300)\n );\n\n --wui-color-success-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-success-base-100)\n );\n --wui-color-error-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-color-error-base-100)\n );\n\n --wui-icon-box-bg-error-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-error-base-100)\n );\n --wui-icon-box-bg-accent-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-blue-base-100)\n );\n --wui-icon-box-bg-success-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-success-base-100)\n );\n --wui-icon-box-bg-inverse-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-icon-box-bg-inverse-base-100)\n );\n\n --wui-all-wallets-bg-100: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-all-wallets-bg-base-100)\n );\n\n --wui-avatar-border: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-avatar-border-base)\n );\n\n --wui-thumbnail-border: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--wui-thumbnail-border-base)\n );\n }\n }\n `,\n light: css `\n :root {\n --w3m-color-mix: ${unsafeCSS(themeVariables?.['--w3m-color-mix'] || '#fff')};\n --w3m-accent: ${unsafeCSS(themeVariables?.['--w3m-accent'] || '#47a1ff')};\n --w3m-default: #fff;\n\n --wui-color-modal-bg-base: #191a1a;\n\n --wui-color-blue-base-100: #47a1ff;\n\n --wui-color-accent-base-100: var(--w3m-accent);\n --wui-color-accent-base-090: #59aaff;\n --wui-color-accent-base-080: #6cb4ff;\n\n --wui-accent-glass-base-090: rgba(71, 161, 255, 0.9);\n --wui-accent-glass-base-080: rgba(71, 161, 255, 0.8);\n --wui-accent-glass-base-020: rgba(71, 161, 255, 0.2);\n --wui-accent-glass-base-015: rgba(71, 161, 255, 0.15);\n --wui-accent-glass-base-010: rgba(71, 161, 255, 0.1);\n --wui-accent-glass-base-005: rgba(71, 161, 255, 0.05);\n --wui-accent-glass-base-002: rgba(71, 161, 255, 0.02);\n\n --wui-color-fg-base-100: #e4e7e7;\n --wui-color-fg-base-125: #d0d5d5;\n --wui-color-fg-base-150: #a8b1b1;\n --wui-color-fg-base-175: #a8b0b0;\n --wui-color-fg-base-200: #949e9e;\n --wui-color-fg-base-225: #868f8f;\n --wui-color-fg-base-250: #788080;\n --wui-color-fg-base-275: #788181;\n --wui-color-fg-base-300: #6e7777;\n\n --wui-color-bg-base-100: #141414;\n --wui-color-bg-base-125: #191a1a;\n --wui-color-bg-base-150: #1e1f1f;\n --wui-color-bg-base-175: #222525;\n --wui-color-bg-base-200: #272a2a;\n --wui-color-bg-base-225: #2c3030;\n --wui-color-bg-base-250: #313535;\n --wui-color-bg-base-275: #363b3b;\n --wui-color-bg-base-300: #3b4040;\n\n --wui-color-success-base-100: #26d962;\n --wui-color-error-base-100: #f25a67;\n\n --wui-success-glass-001: rgba(38, 217, 98, 0.01);\n --wui-success-glass-002: rgba(38, 217, 98, 0.02);\n --wui-success-glass-005: rgba(38, 217, 98, 0.05);\n --wui-success-glass-010: rgba(38, 217, 98, 0.1);\n --wui-success-glass-015: rgba(38, 217, 98, 0.15);\n --wui-success-glass-020: rgba(38, 217, 98, 0.2);\n --wui-success-glass-025: rgba(38, 217, 98, 0.25);\n --wui-success-glass-030: rgba(38, 217, 98, 0.3);\n --wui-success-glass-060: rgba(38, 217, 98, 0.6);\n --wui-success-glass-080: rgba(38, 217, 98, 0.8);\n\n --wui-error-glass-001: rgba(242, 90, 103, 0.01);\n --wui-error-glass-002: rgba(242, 90, 103, 0.02);\n --wui-error-glass-005: rgba(242, 90, 103, 0.05);\n --wui-error-glass-010: rgba(242, 90, 103, 0.1);\n --wui-error-glass-015: rgba(242, 90, 103, 0.15);\n --wui-error-glass-020: rgba(242, 90, 103, 0.2);\n --wui-error-glass-025: rgba(242, 90, 103, 0.25);\n --wui-error-glass-030: rgba(242, 90, 103, 0.3);\n --wui-error-glass-060: rgba(242, 90, 103, 0.6);\n --wui-error-glass-080: rgba(242, 90, 103, 0.8);\n\n --wui-icon-box-bg-error-base-100: #3c2426;\n --wui-icon-box-bg-blue-base-100: #20303f;\n --wui-icon-box-bg-success-base-100: #1f3a28;\n --wui-icon-box-bg-inverse-base-100: #243240;\n\n --wui-all-wallets-bg-base-100: #222b35;\n\n --wui-avatar-border-base: #252525;\n\n --wui-thumbnail-border-base: #252525;\n\n --wui-gray-glass-001: rgba(255, 255, 255, 0.01);\n --wui-gray-glass-002: rgba(255, 255, 255, 0.02);\n --wui-gray-glass-005: rgba(255, 255, 255, 0.05);\n --wui-gray-glass-010: rgba(255, 255, 255, 0.1);\n --wui-gray-glass-015: rgba(255, 255, 255, 0.15);\n --wui-gray-glass-020: rgba(255, 255, 255, 0.2);\n --wui-gray-glass-025: rgba(255, 255, 255, 0.25);\n --wui-gray-glass-030: rgba(255, 255, 255, 0.3);\n --wui-gray-glass-060: rgba(255, 255, 255, 0.6);\n --wui-gray-glass-080: rgba(255, 255, 255, 0.8);\n --wui-gray-glass-090: rgba(255, 255, 255, 0.9);\n }\n `,\n dark: css `\n :root {\n --w3m-color-mix: ${unsafeCSS(themeVariables?.['--w3m-color-mix'] || '#000')};\n --w3m-accent: ${unsafeCSS(themeVariables?.['--w3m-accent'] || '#3396ff')};\n --w3m-default: #000;\n\n --wui-color-modal-bg-base: #fff;\n\n --wui-color-blue-base-100: #3396ff;\n\n --wui-color-accent-base-100: var(--w3m-accent);\n --wui-color-accent-base-090: #2d7dd2;\n --wui-color-accent-base-080: #2978cc;\n\n --wui-accent-glass-base-090: rgba(51, 150, 255, 0.9);\n --wui-accent-glass-base-080: rgba(51, 150, 255, 0.8);\n --wui-accent-glass-base-020: rgba(51, 150, 255, 0.2);\n --wui-accent-glass-base-015: rgba(51, 150, 255, 0.15);\n --wui-accent-glass-base-010: rgba(51, 150, 255, 0.1);\n --wui-accent-glass-base-005: rgba(51, 150, 255, 0.05);\n --wui-accent-glass-base-002: rgba(51, 150, 255, 0.02);\n\n --wui-color-fg-base-100: #141414;\n --wui-color-fg-base-125: #2d3131;\n --wui-color-fg-base-150: #474d4d;\n --wui-color-fg-base-175: #636d6d;\n --wui-color-fg-base-200: #798686;\n --wui-color-fg-base-225: #828f8f;\n --wui-color-fg-base-250: #8b9797;\n --wui-color-fg-base-275: #95a0a0;\n --wui-color-fg-base-300: #9ea9a9;\n\n --wui-color-bg-base-100: #ffffff;\n --wui-color-bg-base-125: #f5fafa;\n --wui-color-bg-base-150: #f3f8f8;\n --wui-color-bg-base-175: #eef4f4;\n --wui-color-bg-base-200: #eaf1f1;\n --wui-color-bg-base-225: #e5eded;\n --wui-color-bg-base-250: #e1e9e9;\n --wui-color-bg-base-275: #dce7e7;\n --wui-color-bg-base-300: #d8e3e3;\n\n --wui-color-success-base-100: #26b562;\n --wui-color-error-base-100: #f05142;\n\n --wui-success-glass-001: rgba(38, 181, 98, 0.01);\n --wui-success-glass-002: rgba(38, 181, 98, 0.02);\n --wui-success-glass-005: rgba(38, 181, 98, 0.05);\n --wui-success-glass-010: rgba(38, 181, 98, 0.1);\n --wui-success-glass-015: rgba(38, 181, 98, 0.15);\n --wui-success-glass-020: rgba(38, 181, 98, 0.2);\n --wui-success-glass-025: rgba(38, 181, 98, 0.25);\n --wui-success-glass-030: rgba(38, 181, 98, 0.3);\n --wui-success-glass-060: rgba(38, 181, 98, 0.6);\n --wui-success-glass-080: rgba(38, 181, 98, 0.8);\n\n --wui-error-glass-001: rgba(240, 81, 66, 0.01);\n --wui-error-glass-002: rgba(240, 81, 66, 0.02);\n --wui-error-glass-005: rgba(240, 81, 66, 0.05);\n --wui-error-glass-010: rgba(240, 81, 66, 0.1);\n --wui-error-glass-015: rgba(240, 81, 66, 0.15);\n --wui-error-glass-020: rgba(240, 81, 66, 0.2);\n --wui-error-glass-025: rgba(240, 81, 66, 0.25);\n --wui-error-glass-030: rgba(240, 81, 66, 0.3);\n --wui-error-glass-060: rgba(240, 81, 66, 0.6);\n --wui-error-glass-080: rgba(240, 81, 66, 0.8);\n\n --wui-icon-box-bg-error-base-100: #f4dfdd;\n --wui-icon-box-bg-blue-base-100: #d9ecfb;\n --wui-icon-box-bg-success-base-100: #daf0e4;\n --wui-icon-box-bg-inverse-base-100: #dcecfc;\n\n --wui-all-wallets-bg-base-100: #e8f1fa;\n\n --wui-avatar-border-base: #f3f4f4;\n\n --wui-thumbnail-border-base: #eaefef;\n\n --wui-gray-glass-001: rgba(0, 0, 0, 0.01);\n --wui-gray-glass-002: rgba(0, 0, 0, 0.02);\n --wui-gray-glass-005: rgba(0, 0, 0, 0.05);\n --wui-gray-glass-010: rgba(0, 0, 0, 0.1);\n --wui-gray-glass-015: rgba(0, 0, 0, 0.15);\n --wui-gray-glass-020: rgba(0, 0, 0, 0.2);\n --wui-gray-glass-025: rgba(0, 0, 0, 0.25);\n --wui-gray-glass-030: rgba(0, 0, 0, 0.3);\n --wui-gray-glass-060: rgba(0, 0, 0, 0.6);\n --wui-gray-glass-080: rgba(0, 0, 0, 0.8);\n --wui-gray-glass-090: rgba(0, 0, 0, 0.9);\n }\n `\n };\n}\nexport const resetStyles = css `\n *,\n *::after,\n *::before,\n :host {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n font-style: normal;\n text-rendering: optimizeSpeed;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n font-family: var(--wui-font-family);\n backface-visibility: hidden;\n }\n`;\nexport const elementStyles = css `\n button,\n a {\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, color;\n outline: none;\n border: 1px solid transparent;\n column-gap: var(--wui-spacing-3xs);\n background-color: transparent;\n text-decoration: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-005);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill']:hover:enabled {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='accentBg']:hover:enabled {\n background: var(--wui-accent-glass-015);\n }\n\n button[data-variant='accentBg']:active:enabled {\n background: var(--wui-accent-glass-020);\n }\n }\n\n button:disabled {\n cursor: not-allowed;\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='shade']:disabled,\n button[data-variant='accent']:disabled,\n button[data-variant='accentBg']:disabled {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-gray-glass-015);\n filter: grayscale(1);\n }\n\n button:disabled > wui-wallet-image,\n button:disabled > wui-all-wallets-image,\n button:disabled > wui-network-image,\n button:disabled > wui-image,\n button:disabled > wui-icon-box,\n button:disabled > wui-transaction-visual,\n button:disabled > wui-logo {\n filter: grayscale(1);\n }\n\n button:focus-visible,\n a:focus-visible {\n border: 1px solid var(--wui-color-accent-100);\n background-color: var(--wui-gray-glass-005);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n button[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n button[data-variant='fill']:disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='fill']:disabled > wui-icon {\n color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='shade'] {\n color: var(--wui-color-fg-200);\n }\n\n button[data-variant='accent'],\n button[data-variant='accentBg'] {\n color: var(--wui-color-accent-100);\n }\n\n button[data-variant='accentBg'] {\n background: var(--wui-accent-glass-010);\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n button[data-variant='fullWidth'] {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n height: 56px;\n border: none;\n background-color: var(--wui-gray-glass-002);\n color: var(--wui-color-fg-200);\n gap: var(--wui-spacing-xs);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill']:active:enabled {\n background-color: var(--wui-color-accent-080);\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n input {\n border: none;\n outline: none;\n appearance: none;\n }\n`;\nexport const colorStyles = css `\n .wui-color-inherit {\n color: var(--wui-color-inherit);\n }\n\n .wui-color-accent-100 {\n color: var(--wui-color-accent-100);\n }\n\n .wui-color-error-100 {\n color: var(--wui-color-error-100);\n }\n\n .wui-color-success-100 {\n color: var(--wui-color-success-100);\n }\n\n .wui-color-inverse-100 {\n color: var(--wui-color-inverse-100);\n }\n\n .wui-color-inverse-000 {\n color: var(--wui-color-inverse-000);\n }\n\n .wui-color-fg-100 {\n color: var(--wui-color-fg-100);\n }\n\n .wui-color-fg-200 {\n color: var(--wui-color-fg-200);\n }\n\n .wui-color-fg-300 {\n color: var(--wui-color-fg-300);\n }\n\n .wui-bg-color-inherit {\n background-color: var(--wui-color-inherit);\n }\n\n .wui-bg-color-blue-100 {\n background-color: var(--wui-color-accent-100);\n }\n\n .wui-bg-color-error-100 {\n background-color: var(--wui-color-error-100);\n }\n\n .wui-bg-color-success-100 {\n background-color: var(--wui-color-success-100);\n }\n\n .wui-bg-color-inverse-100 {\n background-color: var(--wui-color-inverse-100);\n }\n\n .wui-bg-color-inverse-000 {\n background-color: var(--wui-color-inverse-000);\n }\n\n .wui-bg-color-fg-100 {\n background-color: var(--wui-color-fg-100);\n }\n\n .wui-bg-color-fg-200 {\n background-color: var(--wui-color-fg-200);\n }\n\n .wui-bg-color-fg-300 {\n background-color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=ThemeUtil.js.map","function standardCustomElement(tagName, descriptor) {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n finisher(clazz) {\n if (!customElements.get(tagName)) {\n customElements.define(tagName, clazz);\n }\n }\n };\n}\nfunction legacyCustomElement(tagName, clazz) {\n if (!customElements.get(tagName)) {\n customElements.define(tagName, clazz);\n }\n return clazz;\n}\nexport function customElement(tagName) {\n return function create(classOrDescriptor) {\n return typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor);\n };\n}\n//# sourceMappingURL=WebComponentsUtil.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n border-radius: clamp(0px, var(--wui-border-radius-l), 44px);\n box-shadow: 0 0 0 1px var(--wui-gray-glass-005);\n background-color: var(--wui-color-modal-bg);\n overflow: hidden;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCard = class WuiCard extends LitElement {\n render() {\n return html ``;\n }\n};\nWuiCard.styles = [resetStyles, styles];\nWuiCard = __decorate([\n customElement('wui-card')\n], WuiCard);\nexport { WuiCard };\n//# sourceMappingURL=index.js.map","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n aspect-ratio: 1 / 1;\n color: var(--local-color);\n width: var(--local-width);\n }\n\n svg {\n width: inherit;\n height: inherit;\n object-fit: contain;\n object-position: center;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { svg } from 'lit';\nexport const allWalletsSvg = svg `\n \n`;\n//# sourceMappingURL=all-wallets.js.map","import { svg } from 'lit';\nexport const arrowBottomCircleSvg = svg `\n `;\n//# sourceMappingURL=arrow-bottom-circle.js.map","import { svg } from 'lit';\nexport const appStoreSvg = svg `\n\n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=app-store.js.map","import { svg } from 'lit';\nexport const appleSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=apple.js.map","import { svg } from 'lit';\nexport const arrowBottomSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-bottom.js.map","import { svg } from 'lit';\nexport const arrowLeftSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-left.js.map","import { svg } from 'lit';\nexport const arrowRightSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-right.js.map","import { svg } from 'lit';\nexport const arrowTopSvg = svg `\n \n`;\n//# sourceMappingURL=arrow-top.js.map","import { svg } from 'lit';\nexport const browserSvg = svg `\n \n \n`;\n//# sourceMappingURL=browser.js.map","import { svg } from 'lit';\nexport const checkmarkSvg = svg `\n `;\n//# sourceMappingURL=checkmark.js.map","import { svg } from 'lit';\nexport const chevronBottomSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-bottom.js.map","import { svg } from 'lit';\nexport const chevronLeftSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-left.js.map","import { svg } from 'lit';\nexport const chevronRightSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-right.js.map","import { svg } from 'lit';\nexport const chevronTopSvg = svg `\n \n`;\n//# sourceMappingURL=chevron-top.js.map","import { svg } from 'lit';\nexport const chromeStoreSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=chrome-store.js.map","import { svg } from 'lit';\nexport const clockSvg = svg `\n \n`;\n//# sourceMappingURL=clock.js.map","import { svg } from 'lit';\nexport const closeSvg = svg `\n \n`;\n//# sourceMappingURL=close.js.map","import { svg } from 'lit';\nexport const coinPlaceholderSvg = svg `\n \n`;\n//# sourceMappingURL=coinPlaceholder.js.map","import { svg } from 'lit';\nexport const compassSvg = svg `\n \n`;\n//# sourceMappingURL=compass.js.map","import { svg } from 'lit';\nexport const copySvg = svg `\n `;\n//# sourceMappingURL=copy.js.map","import { svg } from 'lit';\nexport const addSvg = svg `\n `;\n//# sourceMappingURL=add.js.map","import { svg } from 'lit';\nexport const cursorSvg = svg ` \n \n`;\n//# sourceMappingURL=cursor.js.map","import { svg } from 'lit';\nexport const desktopSvg = svg `\n \n \n`;\n//# sourceMappingURL=desktop.js.map","import { svg } from 'lit';\nexport const disconnectSvg = svg `\n \n`;\n//# sourceMappingURL=disconnect.js.map","import { svg } from 'lit';\nexport const discordSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=discord.js.map","import { svg } from 'lit';\nexport const etherscanSvg = svg `\n \n`;\n//# sourceMappingURL=etherscan.js.map","import { svg } from 'lit';\nexport const extensionSvg = svg `\n \n`;\n//# sourceMappingURL=extension.js.map","import { svg } from 'lit';\nexport const externalLinkSvg = svg `\n \n`;\n//# sourceMappingURL=external-link.js.map","import { svg } from 'lit';\nexport const facebookSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=facebook.js.map","import { svg } from 'lit';\nexport const filtersSvg = svg `\n \n`;\n//# sourceMappingURL=filters.js.map","import { svg } from 'lit';\nexport const githubSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=github.js.map","import { svg } from 'lit';\nexport const googleSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=google.js.map","import { svg } from 'lit';\nexport const helpCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=help-circle.js.map","import { svg } from 'lit';\nexport const infoCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=info-circle.js.map","import { svg } from 'lit';\nexport const mailSvg = svg `\n \n`;\n//# sourceMappingURL=mail.js.map","import { svg } from 'lit';\nexport const mobileSvg = svg `\n \n \n`;\n//# sourceMappingURL=mobile.js.map","import { svg } from 'lit';\nexport const networkPlaceholderSvg = svg `\n \n \n`;\n//# sourceMappingURL=network-placeholder.js.map","import { svg } from 'lit';\nexport const nftPlaceholderSvg = svg `\n \n`;\n//# sourceMappingURL=nftPlaceholder.js.map","import { svg } from 'lit';\nexport const offSvg = svg `\n \n`;\n//# sourceMappingURL=off.js.map","import { svg } from 'lit';\nexport const playStoreSvg = svg ` \n \n \n \n \n \n \n`;\n//# sourceMappingURL=play-store.js.map","import { svg } from 'lit';\nexport const qrCodeIcon = svg `\n \n`;\n//# sourceMappingURL=qr-code.js.map","import { svg } from 'lit';\nexport const refreshSvg = svg `\n \n`;\n//# sourceMappingURL=refresh.js.map","import { svg } from 'lit';\nexport const searchSvg = svg `\n \n`;\n//# sourceMappingURL=search.js.map","import { svg } from 'lit';\nexport const sendSvg = svg `\n \n `;\n//# sourceMappingURL=send.js.map","import { svg } from 'lit';\nexport const swapHorizontalSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontal.js.map","import { svg } from 'lit';\nexport const swapHorizontalBoldSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontalBold.js.map","import { svg } from 'lit';\nexport const swapHorizontalMediumSvg = svg `\n \n\n\n`;\n//# sourceMappingURL=swapHorizontalMedium.js.map","import { svg } from 'lit';\nexport const swapHorizontalRoundedBoldSvg = svg `\n \n`;\n//# sourceMappingURL=swapHorizontalRoundedBold.js.map","import { svg } from 'lit';\nexport const swapVerticalSvg = svg `\n \n`;\n//# sourceMappingURL=swapVertical.js.map","import { svg } from 'lit';\nexport const telegramSvg = svg `\n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=telegram.js.map","import { svg } from 'lit';\nexport const twitchSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=twitch.js.map","import { svg } from 'lit';\nexport const twitterSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=twitter.js.map","import { svg } from 'lit';\nexport const twitterIconSvg = svg `\n \n`;\n//# sourceMappingURL=twitterIcon.js.map","import { svg } from 'lit';\nexport const verifySvg = svg `\n \n`;\n//# sourceMappingURL=verify.js.map","import { svg } from 'lit';\nexport const verifyFilledSvg = svg `\n \n`;\n//# sourceMappingURL=verify-filled.js.map","import { svg } from 'lit';\nexport const walletPlaceholderSvg = svg `\n \n \n \n \n`;\n//# sourceMappingURL=wallet-placeholder.js.map","import { svg } from 'lit';\nexport const walletSvg = svg `\n \n`;\n//# sourceMappingURL=wallet.js.map","import { svg } from 'lit';\nexport const walletConnectSvg = svg `\n \n \n`;\n//# sourceMappingURL=walletconnect.js.map","import { svg } from 'lit';\nexport const warningCircleSvg = svg `\n \n \n`;\n//# sourceMappingURL=warning-circle.js.map","import { svg } from 'lit';\nexport const recycleHorizontalSvg = svg `\n `;\n//# sourceMappingURL=recycle-horizontal.js.map","import { svg } from 'lit';\nexport const bankSvg = svg `\n `;\n//# sourceMappingURL=bank.js.map","import { svg } from 'lit';\nexport const cardSvg = svg `\n `;\n//# sourceMappingURL=card.js.map","import { svg } from 'lit';\nexport const plusSvg = svg `\n `;\n//# sourceMappingURL=plus.js.map","import { svg } from 'lit';\nexport const cursorTransparentSvg = svg `\n \n \n \n `;\n//# sourceMappingURL=cursor-transparent.js.map","import { svg } from 'lit';\nexport const checkmarkBoldSvg = svg `\n \n`;\n//# sourceMappingURL=checkmark-bold.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { colorStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { allWalletsSvg } from '../../assets/svg/all-wallets.js';\nimport { arrowBottomCircleSvg } from '../../assets/svg/arrow-bottom-circle.js';\nimport { appStoreSvg } from '../../assets/svg/app-store.js';\nimport { appleSvg } from '../../assets/svg/apple.js';\nimport { arrowBottomSvg } from '../../assets/svg/arrow-bottom.js';\nimport { arrowLeftSvg } from '../../assets/svg/arrow-left.js';\nimport { arrowRightSvg } from '../../assets/svg/arrow-right.js';\nimport { arrowTopSvg } from '../../assets/svg/arrow-top.js';\nimport { browserSvg } from '../../assets/svg/browser.js';\nimport { checkmarkSvg } from '../../assets/svg/checkmark.js';\nimport { chevronBottomSvg } from '../../assets/svg/chevron-bottom.js';\nimport { chevronLeftSvg } from '../../assets/svg/chevron-left.js';\nimport { chevronRightSvg } from '../../assets/svg/chevron-right.js';\nimport { chevronTopSvg } from '../../assets/svg/chevron-top.js';\nimport { chromeStoreSvg } from '../../assets/svg/chrome-store.js';\nimport { clockSvg } from '../../assets/svg/clock.js';\nimport { closeSvg } from '../../assets/svg/close.js';\nimport { coinPlaceholderSvg } from '../../assets/svg/coinPlaceholder.js';\nimport { compassSvg } from '../../assets/svg/compass.js';\nimport { copySvg } from '../../assets/svg/copy.js';\nimport { addSvg } from '../../assets/svg/add.js';\nimport { cursorSvg } from '../../assets/svg/cursor.js';\nimport { desktopSvg } from '../../assets/svg/desktop.js';\nimport { disconnectSvg } from '../../assets/svg/disconnect.js';\nimport { discordSvg } from '../../assets/svg/discord.js';\nimport { etherscanSvg } from '../../assets/svg/etherscan.js';\nimport { extensionSvg } from '../../assets/svg/extension.js';\nimport { externalLinkSvg } from '../../assets/svg/external-link.js';\nimport { facebookSvg } from '../../assets/svg/facebook.js';\nimport { filtersSvg } from '../../assets/svg/filters.js';\nimport { githubSvg } from '../../assets/svg/github.js';\nimport { googleSvg } from '../../assets/svg/google.js';\nimport { helpCircleSvg } from '../../assets/svg/help-circle.js';\nimport { infoCircleSvg } from '../../assets/svg/info-circle.js';\nimport { mailSvg } from '../../assets/svg/mail.js';\nimport { mobileSvg } from '../../assets/svg/mobile.js';\nimport { networkPlaceholderSvg } from '../../assets/svg/network-placeholder.js';\nimport { nftPlaceholderSvg } from '../../assets/svg/nftPlaceholder.js';\nimport { offSvg } from '../../assets/svg/off.js';\nimport { playStoreSvg } from '../../assets/svg/play-store.js';\nimport { qrCodeIcon } from '../../assets/svg/qr-code.js';\nimport { refreshSvg } from '../../assets/svg/refresh.js';\nimport { searchSvg } from '../../assets/svg/search.js';\nimport { sendSvg } from '../../assets/svg/send.js';\nimport { swapHorizontalSvg } from '../../assets/svg/swapHorizontal.js';\nimport { swapHorizontalBoldSvg } from '../../assets/svg/swapHorizontalBold.js';\nimport { swapHorizontalMediumSvg } from '../../assets/svg/swapHorizontalMedium.js';\nimport { swapHorizontalRoundedBoldSvg } from '../../assets/svg/swapHorizontalRoundedBold.js';\nimport { swapVerticalSvg } from '../../assets/svg/swapVertical.js';\nimport { telegramSvg } from '../../assets/svg/telegram.js';\nimport { twitchSvg } from '../../assets/svg/twitch.js';\nimport { twitterSvg } from '../../assets/svg/twitter.js';\nimport { twitterIconSvg } from '../../assets/svg/twitterIcon.js';\nimport { verifySvg } from '../../assets/svg/verify.js';\nimport { verifyFilledSvg } from '../../assets/svg/verify-filled.js';\nimport { walletPlaceholderSvg } from '../../assets/svg/wallet-placeholder.js';\nimport { walletSvg } from '../../assets/svg/wallet.js';\nimport { walletConnectSvg } from '../../assets/svg/walletconnect.js';\nimport { warningCircleSvg } from '../../assets/svg/warning-circle.js';\nimport { recycleHorizontalSvg } from '../../assets/svg/recycle-horizontal.js';\nimport { bankSvg } from '../../assets/svg/bank.js';\nimport { cardSvg } from '../../assets/svg/card.js';\nimport { plusSvg } from '../../assets/svg/plus.js';\nimport { cursorTransparentSvg } from '../../assets/svg/cursor-transparent.js';\nimport { checkmarkBoldSvg } from '../../assets/svg/checkmark-bold.js';\nconst svgOptions = {\n add: addSvg,\n allWallets: allWalletsSvg,\n arrowBottomCircle: arrowBottomCircleSvg,\n appStore: appStoreSvg,\n apple: appleSvg,\n arrowBottom: arrowBottomSvg,\n arrowLeft: arrowLeftSvg,\n arrowRight: arrowRightSvg,\n arrowTop: arrowTopSvg,\n bank: bankSvg,\n browser: browserSvg,\n card: cardSvg,\n checkmark: checkmarkSvg,\n checkmarkBold: checkmarkBoldSvg,\n chevronBottom: chevronBottomSvg,\n chevronLeft: chevronLeftSvg,\n chevronRight: chevronRightSvg,\n chevronTop: chevronTopSvg,\n chromeStore: chromeStoreSvg,\n clock: clockSvg,\n close: closeSvg,\n compass: compassSvg,\n coinPlaceholder: coinPlaceholderSvg,\n copy: copySvg,\n cursor: cursorSvg,\n cursorTransparent: cursorTransparentSvg,\n desktop: desktopSvg,\n disconnect: disconnectSvg,\n discord: discordSvg,\n etherscan: etherscanSvg,\n extension: extensionSvg,\n externalLink: externalLinkSvg,\n facebook: facebookSvg,\n filters: filtersSvg,\n github: githubSvg,\n google: googleSvg,\n helpCircle: helpCircleSvg,\n infoCircle: infoCircleSvg,\n mail: mailSvg,\n mobile: mobileSvg,\n networkPlaceholder: networkPlaceholderSvg,\n nftPlaceholder: nftPlaceholderSvg,\n off: offSvg,\n playStore: playStoreSvg,\n plus: plusSvg,\n qrCode: qrCodeIcon,\n recycleHorizontal: recycleHorizontalSvg,\n refresh: refreshSvg,\n search: searchSvg,\n send: sendSvg,\n swapHorizontal: swapHorizontalSvg,\n swapHorizontalMedium: swapHorizontalMediumSvg,\n swapHorizontalBold: swapHorizontalBoldSvg,\n swapHorizontalRoundedBold: swapHorizontalRoundedBoldSvg,\n swapVertical: swapVerticalSvg,\n telegram: telegramSvg,\n twitch: twitchSvg,\n twitter: twitterSvg,\n twitterIcon: twitterIconSvg,\n verify: verifySvg,\n verifyFilled: verifyFilledSvg,\n wallet: walletSvg,\n walletConnect: walletConnectSvg,\n walletPlaceholder: walletPlaceholderSvg,\n warningCircle: warningCircleSvg\n};\nlet WuiIcon = class WuiIcon extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = 'copy';\n this.color = 'fg-300';\n }\n render() {\n this.style.cssText = `\n --local-color: ${`var(--wui-color-${this.color});`}\n --local-width: ${`var(--wui-icon-size-${this.size});`}\n `;\n return html `${svgOptions[this.name]}`;\n }\n};\nWuiIcon.styles = [resetStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiIcon.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiIcon.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiIcon.prototype, \"color\", void 0);\nWuiIcon = __decorate([\n customElement('wui-icon')\n], WuiIcon);\nexport { WuiIcon };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--local-width);\n height: var(--local-height);\n }\n\n img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center center;\n border-radius: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { colorStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiImage = class WuiImage extends LitElement {\n constructor() {\n super(...arguments);\n this.src = './path/to/image.jpg';\n this.alt = 'Image';\n this.size = undefined;\n }\n render() {\n this.style.cssText = `\n --local-width: ${this.size ? `var(--wui-icon-size-${this.size});` : '100%'};\n --local-height: ${this.size ? `var(--wui-icon-size-${this.size});` : '100%'};\n `;\n return html `${this.alt}`;\n }\n};\nWuiImage.styles = [resetStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiImage.prototype, \"src\", void 0);\n__decorate([\n property()\n], WuiImage.prototype, \"alt\", void 0);\n__decorate([\n property()\n], WuiImage.prototype, \"size\", void 0);\nWuiImage = __decorate([\n customElement('wui-image')\n], WuiImage);\nexport { WuiImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-box-size-lg);\n height: var(--wui-box-size-lg);\n }\n\n svg {\n width: var(--wui-box-size-lg);\n height: var(--wui-box-size-lg);\n fill: none;\n stroke: transparent;\n stroke-linecap: round;\n }\n\n use {\n stroke: var(--wui-color-accent-100);\n stroke-width: 2px;\n stroke-dasharray: 54, 118;\n stroke-dashoffset: 172;\n animation: dash 1s linear infinite;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0px;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingHexagon = class WuiLoadingHexagon extends LitElement {\n render() {\n return html `\n \n \n \n \n `;\n }\n};\nWuiLoadingHexagon.styles = [resetStyles, styles];\nWuiLoadingHexagon = __decorate([\n customElement('wui-loading-hexagon')\n], WuiLoadingHexagon);\nexport { WuiLoadingHexagon };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n }\n\n :host([data-size='sm']) > svg {\n width: 12px;\n height: 12px;\n }\n\n :host([data-size='md']) > svg {\n width: 16px;\n height: 16px;\n }\n\n :host([data-size='lg']) > svg {\n width: 24px;\n height: 24px;\n }\n\n :host([data-size='xl']) > svg {\n width: 32px;\n height: 32px;\n }\n\n svg {\n animation: rotate 2s linear infinite;\n }\n\n circle {\n fill: none;\n stroke: var(--local-color);\n stroke-width: 4px;\n stroke-dasharray: 1, 124;\n stroke-dashoffset: 0;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n }\n\n :host([data-size='md']) > svg > circle {\n stroke-width: 6px;\n }\n\n :host([data-size='sm']) > svg > circle {\n stroke-width: 8px;\n }\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 124;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 90, 124;\n stroke-dashoffset: -35;\n }\n\n 100% {\n stroke-dashoffset: -125;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingSpinner = class WuiLoadingSpinner extends LitElement {\n constructor() {\n super(...arguments);\n this.color = 'accent-100';\n this.size = 'lg';\n }\n render() {\n this.style.cssText = `--local-color: var(--wui-color-${this.color});`;\n this.dataset['size'] = this.size;\n return html `\n \n `;\n }\n};\nWuiLoadingSpinner.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiLoadingSpinner.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiLoadingSpinner.prototype, \"size\", void 0);\nWuiLoadingSpinner = __decorate([\n customElement('wui-loading-spinner')\n], WuiLoadingSpinner);\nexport { WuiLoadingSpinner };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-box-size-md);\n height: var(--wui-box-size-md);\n }\n\n svg {\n width: var(--wui-box-size-md);\n height: var(--wui-box-size-md);\n }\n\n rect {\n fill: none;\n stroke: var(--wui-color-accent-100);\n stroke-width: 4px;\n stroke-linecap: round;\n animation: dash 1s linear infinite;\n }\n\n @keyframes dash {\n to {\n stroke-dashoffset: 0px;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLoadingThumbnail = class WuiLoadingThumbnail extends LitElement {\n constructor() {\n super(...arguments);\n this.radius = 36;\n }\n render() {\n return this.svgLoaderTemplate();\n }\n svgLoaderTemplate() {\n const radius = this.radius > 50 ? 50 : this.radius;\n const standardValue = 36;\n const radiusFactor = standardValue - radius;\n const dashArrayStart = 116 + radiusFactor;\n const dashArrayEnd = 245 + radiusFactor;\n const dashOffset = 360 + radiusFactor * 1.75;\n return html `\n \n \n \n `;\n }\n};\nWuiLoadingThumbnail.styles = [resetStyles, styles];\n__decorate([\n property({ type: Number })\n], WuiLoadingThumbnail.prototype, \"radius\", void 0);\nWuiLoadingThumbnail = __decorate([\n customElement('wui-loading-thumbnail')\n], WuiLoadingThumbnail);\nexport { WuiLoadingThumbnail };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background: linear-gradient(\n 120deg,\n var(--wui-color-bg-200) 5%,\n var(--wui-color-bg-200) 48%,\n var(--wui-color-bg-300) 55%,\n var(--wui-color-bg-300) 60%,\n var(--wui-color-bg-300) calc(60% + 10px),\n var(--wui-color-bg-200) calc(60% + 12px),\n var(--wui-color-bg-200) 100%\n );\n background-size: 250%;\n animation: shimmer 3s linear infinite reverse;\n }\n\n @keyframes shimmer {\n from {\n background-position: -250% 0;\n }\n to {\n background-position: 250% 0;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiShimmer = class WuiShimmer extends LitElement {\n constructor() {\n super(...arguments);\n this.width = '';\n this.height = '';\n this.borderRadius = 'm';\n }\n render() {\n this.style.cssText = `\n width: ${this.width};\n height: ${this.height};\n border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};\n `;\n return html ``;\n }\n};\nWuiShimmer.styles = [styles];\n__decorate([\n property()\n], WuiShimmer.prototype, \"width\", void 0);\n__decorate([\n property()\n], WuiShimmer.prototype, \"height\", void 0);\n__decorate([\n property()\n], WuiShimmer.prototype, \"borderRadius\", void 0);\nWuiShimmer = __decorate([\n customElement('wui-shimmer')\n], WuiShimmer);\nexport { WuiShimmer };\n//# sourceMappingURL=index.js.map","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex !important;\n }\n\n slot {\n width: 100%;\n display: inline-block;\n font-style: normal;\n font-family: var(--wui-font-family);\n font-feature-settings:\n 'tnum' on,\n 'lnum' on,\n 'case' on;\n line-height: 130%;\n font-weight: var(--wui-font-weight-regular);\n overflow: inherit;\n text-overflow: inherit;\n text-align: var(--local-align);\n color: var(--local-color);\n }\n\n .wui-font-medium-400 {\n font-size: var(--wui-font-size-medium);\n font-weight: var(--wui-font-weight-light);\n letter-spacing: var(--wui-letter-spacing-medium);\n }\n\n .wui-font-medium-600 {\n font-size: var(--wui-font-size-medium);\n letter-spacing: var(--wui-letter-spacing-medium);\n }\n\n .wui-font-medium-title-600 {\n font-size: var(--wui-font-size-medium-title);\n letter-spacing: var(--wui-letter-spacing-medium-title);\n }\n\n .wui-font-mini-700 {\n font-size: var(--wui-font-size-mini);\n letter-spacing: var(--wui-letter-spacing-mini);\n text-transform: uppercase;\n }\n\n .wui-font-large-500,\n .wui-font-large-600,\n .wui-font-large-700 {\n font-size: var(--wui-font-size-large);\n letter-spacing: var(--wui-letter-spacing-large);\n }\n\n .wui-font-2xl-500,\n .wui-font-2xl-600,\n .wui-font-2xl-700 {\n font-size: var(--wui-font-size-2xl);\n letter-spacing: var(--wui-letter-spacing-2xl);\n }\n\n .wui-font-paragraph-400,\n .wui-font-paragraph-500,\n .wui-font-paragraph-600,\n .wui-font-paragraph-700 {\n font-size: var(--wui-font-size-paragraph);\n letter-spacing: var(--wui-letter-spacing-paragraph);\n }\n\n .wui-font-small-400,\n .wui-font-small-500,\n .wui-font-small-600 {\n font-size: var(--wui-font-size-small);\n letter-spacing: var(--wui-letter-spacing-small);\n }\n\n .wui-font-tiny-400,\n .wui-font-tiny-500,\n .wui-font-tiny-600 {\n font-size: var(--wui-font-size-tiny);\n letter-spacing: var(--wui-letter-spacing-tiny);\n }\n\n .wui-font-micro-700,\n .wui-font-micro-600 {\n font-size: var(--wui-font-size-micro);\n letter-spacing: var(--wui-letter-spacing-micro);\n text-transform: uppercase;\n }\n\n .wui-font-tiny-400,\n .wui-font-small-400,\n .wui-font-paragraph-400 {\n font-weight: var(--wui-font-weight-light);\n }\n\n .wui-font-large-700,\n .wui-font-paragraph-700,\n .wui-font-micro-700,\n .wui-font-mini-700 {\n font-weight: var(--wui-font-weight-bold);\n }\n\n .wui-font-medium-600,\n .wui-font-medium-title-600,\n .wui-font-large-600,\n .wui-font-paragraph-600,\n .wui-font-small-600,\n .wui-font-tiny-600,\n .wui-font-micro-600 {\n font-weight: var(--wui-font-weight-medium);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiText = class WuiText extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'paragraph-500';\n this.color = 'fg-300';\n this.align = 'left';\n }\n render() {\n const classes = {\n [`wui-font-${this.variant}`]: true,\n [`wui-color-${this.color}`]: true\n };\n this.style.cssText = `\n --local-align: ${this.align};\n --local-color: var(--wui-color-${this.color});\n `;\n return html ``;\n }\n};\nWuiText.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiText.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiText.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiText.prototype, \"align\", void 0);\nWuiText = __decorate([\n customElement('wui-text')\n], WuiText);\nexport { WuiText };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const browserSvg = svg `\n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=browser.js.map","import { svg } from 'lit';\nexport const daoSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=dao.js.map","import { svg } from 'lit';\nexport const defiSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=defi.js.map","import { svg } from 'lit';\nexport const defiAltSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=defiAlt.js.map","import { svg } from 'lit';\nexport const ethSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=eth.js.map","import { svg } from 'lit';\nexport const layersSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=layers.js.map","import { svg } from 'lit';\nexport const lockSvg = svg `\n \n \n \n \n \n`;\n//# sourceMappingURL=lock.js.map","import { svg } from 'lit';\nexport const loginSvg = svg `\n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=login.js.map","import { svg } from 'lit';\nexport const networkSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=network.js.map","import { svg } from 'lit';\nexport const nftSvg = svg `\n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=nft.js.map","import { svg } from 'lit';\nexport const nounSvg = svg `\n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=noun.js.map","import { svg } from 'lit';\nexport const profileSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=profile.js.map","import { svg } from 'lit';\nexport const systemSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n//# sourceMappingURL=system.js.map","import { svg } from 'lit';\nexport const coinbaseSvg = svg `\n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=coinbase.js.map","import { svg } from 'lit';\nexport const moonpaySvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=moonpay.js.map","import { svg } from 'lit';\nexport const stripeSvg = svg `\n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=stripe.js.map","import { svg } from 'lit';\nexport const paypalSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n`;\n//# sourceMappingURL=paypal.js.map","import { svg } from 'lit';\nexport const onrampCardSvg = svg `\n\n \n \n \n \n \n\n\n \n \n \n\n`;\n//# sourceMappingURL=onramp-card.js.map","import { svg } from 'lit';\nexport const googleSvg = svg `\n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=google.js.map","import { svg } from 'lit';\nexport const pencilSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=pencil.js.map","import { svg } from 'lit';\nexport const lightbulbSvg = svg `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n//# sourceMappingURL=lightbulb.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--local-size);\n height: var(--local-size);\n }\n\n :host svg {\n width: 100%;\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { browserSvg } from '../../assets/visual/browser.js';\nimport { daoSvg } from '../../assets/visual/dao.js';\nimport { defiSvg } from '../../assets/visual/defi.js';\nimport { defiAltSvg } from '../../assets/visual/defiAlt.js';\nimport { ethSvg } from '../../assets/visual/eth.js';\nimport { layersSvg } from '../../assets/visual/layers.js';\nimport { lockSvg } from '../../assets/visual/lock.js';\nimport { loginSvg } from '../../assets/visual/login.js';\nimport { networkSvg } from '../../assets/visual/network.js';\nimport { nftSvg } from '../../assets/visual/nft.js';\nimport { nounSvg } from '../../assets/visual/noun.js';\nimport { profileSvg } from '../../assets/visual/profile.js';\nimport { systemSvg } from '../../assets/visual/system.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { coinbaseSvg } from '../../assets/visual/coinbase.js';\nimport { moonpaySvg } from '../../assets/visual/moonpay.js';\nimport { stripeSvg } from '../../assets/visual/stripe.js';\nimport { paypalSvg } from '../../assets/visual/paypal.js';\nimport { onrampCardSvg } from '../../assets/visual/onramp-card.js';\nimport { googleSvg } from '../../assets/visual/google.js';\nimport { pencilSvg } from '../../assets/visual/pencil.js';\nimport { lightbulbSvg } from '../../assets/visual/lightbulb.js';\nimport styles from './styles.js';\nconst svgOptions = {\n browser: browserSvg,\n dao: daoSvg,\n defi: defiSvg,\n defiAlt: defiAltSvg,\n eth: ethSvg,\n layers: layersSvg,\n lock: lockSvg,\n login: loginSvg,\n network: networkSvg,\n nft: nftSvg,\n noun: nounSvg,\n profile: profileSvg,\n system: systemSvg,\n coinbase: coinbaseSvg,\n onrampCard: onrampCardSvg,\n moonpay: moonpaySvg,\n stripe: stripeSvg,\n paypal: paypalSvg,\n google: googleSvg,\n pencil: pencilSvg,\n lightbulb: lightbulbSvg\n};\nlet WuiVisual = class WuiVisual extends LitElement {\n constructor() {\n super(...arguments);\n this.name = 'browser';\n this.size = 'md';\n }\n render() {\n this.style.cssText = `\n --local-size: var(--wui-visual-size-${this.size});\n `;\n return html `${svgOptions[this.name]}`;\n }\n};\nWuiVisual.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiVisual.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiVisual.prototype, \"size\", void 0);\nWuiVisual = __decorate([\n customElement('wui-visual')\n], WuiVisual);\nexport { WuiVisual };\n//# sourceMappingURL=index.js.map","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","export const UiHelperUtil = {\n getSpacingStyles(spacing, index) {\n if (Array.isArray(spacing)) {\n return spacing[index] ? `var(--wui-spacing-${spacing[index]})` : undefined;\n }\n else if (typeof spacing === 'string') {\n return `var(--wui-spacing-${spacing})`;\n }\n return undefined;\n },\n getFormattedDate(date) {\n return new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric' }).format(date);\n },\n getHostName(url) {\n const newUrl = new URL(url);\n return newUrl.hostname;\n },\n getTruncateString({ string, charsStart, charsEnd, truncate }) {\n if (string.length <= charsStart + charsEnd) {\n return string;\n }\n if (truncate === 'end') {\n return `${string.substring(0, charsStart)}...`;\n }\n else if (truncate === 'start') {\n return `...${string.substring(string.length - charsEnd)}`;\n }\n return `${string.substring(0, Math.floor(charsStart))}...${string.substring(string.length - Math.floor(charsEnd))}`;\n },\n generateAvatarColors(address) {\n const hash = address.toLowerCase().replace(/^0x/iu, '');\n const baseColor = hash.substring(0, 6);\n const rgbColor = this.hexToRgb(baseColor);\n const masterBorderRadius = getComputedStyle(document.documentElement).getPropertyValue('--w3m-border-radius-master');\n const radius = Number(masterBorderRadius?.replace('px', ''));\n const edge = 100 - 3 * radius;\n const gradientCircle = `${edge}% ${edge}% at 65% 40%`;\n const colors = [];\n for (let i = 0; i < 5; i += 1) {\n const tintedColor = this.tintColor(rgbColor, 0.15 * i);\n colors.push(`rgb(${tintedColor[0]}, ${tintedColor[1]}, ${tintedColor[2]})`);\n }\n return `\n --local-color-1: ${colors[0]};\n --local-color-2: ${colors[1]};\n --local-color-3: ${colors[2]};\n --local-color-4: ${colors[3]};\n --local-color-5: ${colors[4]};\n --local-radial-circle: ${gradientCircle}\n `;\n },\n hexToRgb(hex) {\n const bigint = parseInt(hex, 16);\n const r = (bigint >> 16) & 255;\n const g = (bigint >> 8) & 255;\n const b = bigint & 255;\n return [r, g, b];\n },\n tintColor(rgb, tint) {\n const [r, g, b] = rgb;\n const tintedR = Math.round(r + (255 - r) * tint);\n const tintedG = Math.round(g + (255 - g) * tint);\n const tintedB = Math.round(b + (255 - b) * tint);\n return [tintedR, tintedG, tintedB];\n },\n isNumber(character) {\n const regex = {\n number: /^[0-9]+$/u\n };\n return regex.number.test(character);\n },\n getColorTheme(theme) {\n if (theme) {\n return theme;\n }\n else if (typeof window !== 'undefined' && window.matchMedia) {\n if (window.matchMedia('(prefers-color-scheme: dark)').matches) {\n return 'dark';\n }\n return 'light';\n }\n return 'dark';\n },\n splitBalance(input) {\n const parts = input.split('.');\n if (parts.length === 2) {\n return [parts[0], parts[1]];\n }\n return ['0', '00'];\n },\n roundNumber(number, threshold, fixed) {\n const roundedNumber = Math.abs(number) >= threshold ? Number(number.toFixed(fixed)) : number;\n return roundedNumber;\n },\n formatNumberToLocalString(value, decimals = 2) {\n if (value === undefined) {\n return '0.00';\n }\n if (typeof value === 'number') {\n return value.toLocaleString('en-US', {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals\n });\n }\n return parseFloat(value).toLocaleString('en-US', {\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals\n });\n }\n};\n//# sourceMappingURL=UiHelperUtil.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n width: inherit;\n height: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiFlex = class WuiFlex extends LitElement {\n render() {\n this.style.cssText = `\n flex-direction: ${this.flexDirection};\n flex-wrap: ${this.flexWrap};\n flex-basis: ${this.flexBasis};\n flex-grow: ${this.flexGrow};\n flex-shrink: ${this.flexShrink};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n column-gap: ${this.columnGap && `var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap && `var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap && `var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 0)};\n padding-right: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 1)};\n padding-bottom: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 2)};\n padding-left: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 3)};\n margin-top: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 0)};\n margin-right: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 1)};\n margin-bottom: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 2)};\n margin-left: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 3)};\n `;\n return html ``;\n }\n};\nWuiFlex.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiFlex.prototype, \"flexDirection\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexWrap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexBasis\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexGrow\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"flexShrink\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"alignItems\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"justifyContent\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"columnGap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"rowGap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"gap\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"padding\", void 0);\n__decorate([\n property()\n], WuiFlex.prototype, \"margin\", void 0);\nWuiFlex = __decorate([\n customElement('wui-flex')\n], WuiFlex);\nexport { WuiFlex };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: var(--wui-icon-box-size-xl);\n height: var(--wui-icon-box-size-xl);\n border-radius: var(--wui-border-radius-3xl);\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n overflow: hidden;\n position: relative;\n }\n\n :host([data-variant='generated']) {\n --mixed-local-color-1: var(--local-color-1);\n --mixed-local-color-2: var(--local-color-2);\n --mixed-local-color-3: var(--local-color-3);\n --mixed-local-color-4: var(--local-color-4);\n --mixed-local-color-5: var(--local-color-5);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :host([data-variant='generated']) {\n --mixed-local-color-1: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-1)\n );\n --mixed-local-color-2: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-2)\n );\n --mixed-local-color-3: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-3)\n );\n --mixed-local-color-4: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-4)\n );\n --mixed-local-color-5: color-mix(\n in srgb,\n var(--w3m-color-mix) var(--w3m-color-mix-strength),\n var(--local-color-5)\n );\n }\n }\n\n :host([data-variant='generated']) {\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n background: radial-gradient(\n var(--local-radial-circle),\n #fff 0.52%,\n var(--mixed-local-color-5) 31.25%,\n var(--mixed-local-color-3) 51.56%,\n var(--mixed-local-color-2) 65.63%,\n var(--mixed-local-color-1) 82.29%,\n var(--mixed-local-color-4) 100%\n );\n }\n\n :host([data-variant='default']) {\n box-shadow: 0 0 0 8px var(--wui-gray-glass-005);\n background: radial-gradient(\n 75.29% 75.29% at 64.96% 24.36%,\n #fff 0.52%,\n #f5ccfc 31.25%,\n #dba4f5 51.56%,\n #9a8ee8 65.63%,\n #6493da 82.29%,\n #6ebdea 100%\n );\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiAvatar = class WuiAvatar extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.alt = undefined;\n this.address = undefined;\n }\n render() {\n return html `${this.visualTemplate()}`;\n }\n visualTemplate() {\n if (this.imageSrc) {\n this.dataset['variant'] = 'image';\n return html ``;\n }\n else if (this.address) {\n this.dataset['variant'] = 'generated';\n const cssColors = UiHelperUtil.generateAvatarColors(this.address);\n this.style.cssText = cssColors;\n return null;\n }\n this.dataset['variant'] = 'default';\n return null;\n }\n};\nWuiAvatar.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiAvatar.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiAvatar.prototype, \"alt\", void 0);\n__decorate([\n property()\n], WuiAvatar.prototype, \"address\", void 0);\nWuiAvatar = __decorate([\n customElement('wui-avatar')\n], WuiAvatar);\nexport { WuiAvatar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n background-color: var(--wui-gray-glass-020);\n border-radius: var(--local-border-radius);\n border: var(--local-border);\n box-sizing: content-box;\n width: var(--local-size);\n height: var(--local-size);\n min-height: var(--local-size);\n min-width: var(--local-size);\n }\n\n @supports (background: color-mix(in srgb, white 50%, black)) {\n :host {\n background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiIconBox = class WuiIconBox extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.backgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.background = 'transparent';\n this.border = false;\n this.borderColor = 'wui-color-bg-125';\n this.icon = 'copy';\n }\n render() {\n const iconSize = this.iconSize || this.size;\n const isLg = this.size === 'lg';\n const isXl = this.size === 'xl';\n const bgMix = isLg ? '12%' : '16%';\n const borderRadius = isLg ? 'xxs' : isXl ? 's' : '3xl';\n const isGray = this.background === 'gray';\n const isOpaque = this.background === 'opaque';\n const isColorChange = (this.backgroundColor === 'accent-100' && isOpaque) ||\n (this.backgroundColor === 'success-100' && isOpaque) ||\n (this.backgroundColor === 'error-100' && isOpaque) ||\n (this.backgroundColor === 'inverse-100' && isOpaque);\n let bgValueVariable = `var(--wui-color-${this.backgroundColor})`;\n if (isColorChange) {\n bgValueVariable = `var(--wui-icon-box-bg-${this.backgroundColor})`;\n }\n else if (isGray) {\n bgValueVariable = `var(--wui-gray-${this.backgroundColor})`;\n }\n this.style.cssText = `\n --local-bg-value: ${bgValueVariable};\n --local-bg-mix: ${isColorChange || isGray ? `100%` : bgMix};\n --local-border-radius: var(--wui-border-radius-${borderRadius});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${this.borderColor === 'wui-color-bg-125' ? `2px` : `1px`} solid ${this.border ? `var(--${this.borderColor})` : `transparent`}\n `;\n return html ` `;\n }\n};\nWuiIconBox.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiIconBox.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"backgroundColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"iconColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"iconSize\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"background\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiIconBox.prototype, \"border\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"borderColor\", void 0);\n__decorate([\n property()\n], WuiIconBox.prototype, \"icon\", void 0);\nWuiIconBox = __decorate([\n customElement('wui-icon-box')\n], WuiIconBox);\nexport { WuiIconBox };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n background: var(--wui-gray-glass-002);\n display: flex;\n gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)\n var(--wui-spacing-xs);\n border: 1px solid var(--wui-gray-glass-005);\n }\n\n button:disabled {\n background: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-flex > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-image,\n button:disabled > wui-icon-box,\n button:disabled > wui-flex > wui-avatar {\n filter: grayscale(1);\n }\n\n button:has(wui-image) {\n padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs)\n var(--wui-spacing-xs);\n }\n\n wui-text {\n color: var(--wui-color-fg-100);\n }\n\n wui-flex > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n wui-image,\n wui-icon-box {\n border-radius: var(--wui-border-radius-3xl);\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n wui-flex {\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-005);\n background: var(--wui-gray-glass-005);\n padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);\n }\n\n button.local-no-balance {\n border-radius: 0px;\n border: none;\n background: transparent;\n }\n\n wui-avatar {\n width: 20px;\n height: 20px;\n box-shadow: 0 0 0 2px var(--wui-accent-glass-010);\n }\n\n @media (max-width: 500px) {\n button {\n gap: 0px;\n padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important;\n height: 32px;\n }\n wui-image,\n wui-icon-box,\n button > wui-text {\n visibility: hidden;\n width: 0px;\n height: 0px;\n }\n button {\n border-radius: 0px;\n border: none;\n background: transparent;\n padding: 0px;\n }\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled > wui-flex > wui-text {\n color: var(--wui-color-fg-175);\n }\n\n button:active:enabled > wui-flex > wui-text {\n color: var(--wui-color-fg-175);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-avatar/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiAccountButton = class WuiAccountButton extends LitElement {\n constructor() {\n super(...arguments);\n this.networkSrc = undefined;\n this.avatarSrc = undefined;\n this.balance = undefined;\n this.isUnsupportedChain = undefined;\n this.disabled = false;\n this.isProfileName = false;\n this.address = '';\n this.profileName = '';\n this.charsStart = 4;\n this.charsEnd = 6;\n }\n render() {\n return html `\n \n ${this.balanceTemplate()}\n \n \n \n ${this.address\n ? UiHelperUtil.getTruncateString({\n string: this.isProfileName ? this.profileName : this.address,\n charsStart: this.isProfileName ? 18 : this.charsStart,\n charsEnd: this.isProfileName ? 0 : this.charsEnd,\n truncate: this.isProfileName ? 'end' : 'middle'\n })\n : null}\n \n \n \n `;\n }\n balanceTemplate() {\n if (this.isUnsupportedChain) {\n return html ` \n Switch Network`;\n }\n if (this.balance) {\n const networkElement = this.networkSrc\n ? html ``\n : html `\n \n `;\n return html `\n ${networkElement}\n ${this.balance}\n `;\n }\n return null;\n }\n};\nWuiAccountButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiAccountButton.prototype, \"networkSrc\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"avatarSrc\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"balance\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"isUnsupportedChain\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiAccountButton.prototype, \"isProfileName\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"profileName\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], WuiAccountButton.prototype, \"charsEnd\", void 0);\nWuiAccountButton = __decorate([\n customElement('wui-account-button')\n], WuiAccountButton);\nexport { WuiAccountButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n background-color: var(--wui-gray-glass-002);\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--local-size);\n height: var(--local-size);\n border-radius: inherit;\n border-radius: var(--local-border-radius);\n }\n\n :host > wui-flex {\n overflow: hidden;\n border-radius: inherit;\n border-radius: var(--local-border-radius);\n }\n\n :host::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n :host([name='Extension'])::after {\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n :host([data-wallet-icon='allWallets']) {\n background-color: var(--wui-all-wallets-bg-100);\n }\n\n :host([data-wallet-icon='allWallets'])::after {\n border: 1px solid var(--wui-accent-glass-010);\n }\n\n wui-icon[data-parent-size='inherit'] {\n width: 75%;\n height: 75%;\n align-items: center;\n }\n\n wui-icon[data-parent-size='sm'] {\n width: 18px;\n height: 18px;\n }\n\n wui-icon[data-parent-size='md'] {\n width: 24px;\n height: 24px;\n }\n\n wui-icon[data-parent-size='lg'] {\n width: 42px;\n height: 42px;\n }\n\n wui-icon[data-parent-size='full'] {\n width: 100%;\n height: 100%;\n }\n\n :host > wui-icon-box {\n position: absolute;\n overflow: hidden;\n right: -1px;\n bottom: -2px;\n z-index: 1;\n border: 2px solid var(--wui-color-bg-base-150, #1e1f1f);\n padding: 1px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiWalletImage = class WuiWalletImage extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = '';\n this.installed = false;\n this.badgeSize = 'xs';\n }\n render() {\n let borderRadius = 'xxs';\n if (this.size === 'lg') {\n borderRadius = 'm';\n }\n else if (this.size === 'md') {\n borderRadius = 'xs';\n }\n else {\n borderRadius = 'xxs';\n }\n this.style.cssText = `\n --local-border-radius: var(--wui-border-radius-${borderRadius});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `;\n if (this.walletIcon) {\n this.dataset['walletIcon'] = this.walletIcon;\n }\n return html `\n ${this.templateVisual()} \n `;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n else if (this.walletIcon) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiWalletImage.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiWalletImage.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"walletIcon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiWalletImage.prototype, \"installed\", void 0);\n__decorate([\n property()\n], WuiWalletImage.prototype, \"badgeSize\", void 0);\nWuiWalletImage = __decorate([\n customElement('wui-wallet-image')\n], WuiWalletImage);\nexport { WuiWalletImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n border-radius: var(--wui-border-radius-xxs);\n width: 40px;\n height: 40px;\n overflow: hidden;\n background: var(--wui-gray-glass-002);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--wui-spacing-4xs);\n padding: 3.75px !important;\n }\n\n :host::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n :host > wui-wallet-image {\n width: 14px;\n height: 14px;\n border-radius: var(--wui-border-radius-5xs);\n }\n\n :host > wui-flex {\n padding: 2px;\n position: fixed;\n overflow: hidden;\n left: 34px;\n bottom: 8px;\n background: var(--dark-background-150, #1e1f1f);\n border-radius: 50%;\n z-index: 2;\n display: flex;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-wallet-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nconst TOTAL_IMAGES = 4;\nlet WuiAllWalletsImage = class WuiAllWalletsImage extends LitElement {\n constructor() {\n super(...arguments);\n this.walletImages = [];\n }\n render() {\n const isPlaceholders = this.walletImages.length < TOTAL_IMAGES;\n return html `${this.walletImages\n .slice(0, TOTAL_IMAGES)\n .map(({ src, walletName }) => html `\n \n `)}\n ${isPlaceholders\n ? [...Array(TOTAL_IMAGES - this.walletImages.length)].map(() => html ` `)\n : null}\n \n \n `;\n }\n};\nWuiAllWalletsImage.styles = [resetStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiAllWalletsImage.prototype, \"walletImages\", void 0);\nWuiAllWalletsImage = __decorate([\n customElement('wui-all-wallets-image')\n], WuiAllWalletsImage);\nexport { WuiAllWalletsImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: var(--local-width);\n position: relative;\n }\n\n button {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--local-border-radius);\n width: var(--local-width);\n white-space: nowrap;\n }\n\n button:disabled {\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n /* xs settings */\n button[data-size='xs'] {\n padding: var(--wui-spacing-xs) var(--wui-spacing-1xs);\n }\n\n button[data-size='xs'][data-icon-left='true'][data-icon-right='false'] {\n padding-left: var(--wui-spacing-xxs);\n }\n\n button[data-size='xs'][data-icon-right='true'][data-icon-left='false'] {\n padding-right: var(--wui-spacing-xxs);\n }\n\n /* sm settings */\n button[data-size='sm'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-s);\n }\n\n button[data-size='sm'][data-icon-left='true'][data-icon-right='false'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-s) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n button[data-size='sm'][data-icon-right='true'][data-icon-left='false'] {\n padding: var(--wui-spacing-xxs) var(--wui-spacing-xs) var(--wui-spacing-xxs)\n var(--wui-spacing-s);\n }\n\n /* md settings */\n button[data-size='md'] {\n padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);\n }\n\n button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {\n padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);\n }\n\n button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {\n padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);\n }\n\n /* lg settings */\n button[data-size='lg'] {\n padding: var(--wui-spacing-m) var(--wui-spacing-2l);\n }\n\n button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {\n padding-left: var(--wui-spacing-m);\n }\n\n button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {\n padding-right: var(--wui-spacing-m);\n }\n\n button > wui-text {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n ::slotted(*) {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n wui-loading-spinner {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n opacity: var(--local-opacity-000);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nconst TEXT_VARIANT_BY_SIZE = {\n xs: 'small-600',\n sm: 'paragraph-600',\n md: 'small-600',\n mdl: 'small-600',\n lg: 'paragraph-600'\n};\nlet WuiButton = class WuiButton extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.disabled = false;\n this.fullWidth = false;\n this.loading = false;\n this.variant = 'fill';\n this.hasIconLeft = false;\n this.hasIconRight = false;\n this.borderRadius = 'm';\n }\n render() {\n this.style.cssText = `\n --local-width: ${this.fullWidth ? '100%' : 'auto'};\n --local-opacity-100: ${this.loading ? 0 : 1};\n --local-opacity-000: ${this.loading ? 1 : 0};\n --local-border-radius: var(--wui-border-radius-${this.borderRadius});\n `;\n const textVariant = this.textVariant ?? TEXT_VARIANT_BY_SIZE[this.size];\n return html `\n \n ${this.loadingTemplate()}\n this.handleSlotLeftChange()}>\n \n \n \n this.handleSlotRightChange()}>\n \n `;\n }\n handleSlotLeftChange() {\n this.hasIconLeft = true;\n }\n handleSlotRightChange() {\n this.hasIconRight = true;\n }\n loadingTemplate() {\n if (this.loading) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiButton.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"fullWidth\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"loading\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"variant\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"hasIconLeft\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiButton.prototype, \"hasIconRight\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"borderRadius\", void 0);\n__decorate([\n property()\n], WuiButton.prototype, \"textVariant\", void 0);\nWuiButton = __decorate([\n customElement('wui-button')\n], WuiButton);\nexport { WuiButton };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const networkSvgMd = svg `\n \n`;\n//# sourceMappingURL=networkMd.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 76px;\n row-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xs) 10px;\n background-color: var(--wui-gray-glass-002);\n border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\n position: relative;\n }\n\n wui-shimmer[data-type='network'] {\n border: none;\n -webkit-clip-path: var(--wui-path-network);\n clip-path: var(--wui-path-network);\n }\n\n svg {\n position: absolute;\n width: 48px;\n height: 54px;\n z-index: 1;\n }\n\n svg > path {\n stroke: var(--wui-gray-glass-010);\n stroke-width: 1px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { networkSvgMd } from '../../assets/svg/networkMd.js';\nimport '../../components/wui-shimmer/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCardSelectLoader = class WuiCardSelectLoader extends LitElement {\n constructor() {\n super(...arguments);\n this.type = 'wallet';\n }\n render() {\n return html `\n ${this.shimmerTemplate()}\n \n `;\n }\n shimmerTemplate() {\n if (this.type === 'network') {\n return html ` \n ${networkSvgMd}`;\n }\n return html ``;\n }\n};\nWuiCardSelectLoader.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiCardSelectLoader.prototype, \"type\", void 0);\nWuiCardSelectLoader = __decorate([\n customElement('wui-card-select-loader')\n], WuiCardSelectLoader);\nexport { WuiCardSelectLoader };\n//# sourceMappingURL=index.js.map","import { svg } from 'lit';\nexport const networkSvgSm = svg `\n \n \n \n`;\n//# sourceMappingURL=networkSm.js.map","import { svg } from 'lit';\nexport const networkSvgLg = svg `\n \n`;\n//# sourceMappingURL=networkLg.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n border-radius: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--local-width);\n height: var(--local-height);\n }\n\n svg {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n fill: var(--wui-gray-glass-002);\n }\n\n svg > path {\n stroke: var(--local-stroke);\n }\n\n wui-image {\n width: 100%;\n height: 100%;\n -webkit-clip-path: var(--local-path);\n clip-path: var(--local-path);\n background: var(--wui-gray-glass-002);\n }\n\n wui-icon {\n transform: translateY(-5%);\n width: var(--local-icon-size);\n height: var(--local-icon-size);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { networkSvgSm } from '../../assets/svg/networkSm.js';\nimport { networkSvgMd } from '../../assets/svg/networkMd.js';\nimport { networkSvgLg } from '../../assets/svg/networkLg.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiNetworkImage = class WuiNetworkImage extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.name = 'uknown';\n this.selected = false;\n }\n render() {\n const networkImagesBySize = { sm: networkSvgSm, md: networkSvgMd, lg: networkSvgLg };\n this.style.cssText = `\n --local-stroke: ${this.selected ? 'var(--wui-color-accent-100)' : 'var(--wui-gray-glass-010)'};\n --local-path: var(--wui-path-network-${this.size});\n --local-width: var(--wui-width-network-${this.size});\n --local-height: var(--wui-height-network-${this.size});\n --local-icon-size: var(--wui-icon-size-network-${this.size});\n `;\n return html `${this.templateVisual()} ${networkImagesBySize[this.size]}`;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiNetworkImage.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiNetworkImage.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkImage.prototype, \"selected\", void 0);\nWuiNetworkImage = __decorate([\n customElement('wui-network-image')\n], WuiNetworkImage);\nexport { WuiNetworkImage };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n flex-direction: column;\n width: 76px;\n row-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xs) var(--wui-spacing-0);\n background-color: var(--wui-gray-glass-002);\n border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\n }\n\n button > wui-text {\n color: var(--wui-color-fg-100);\n max-width: var(--wui-icon-box-size-xl);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n justify-content: center;\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n [data-selected='true'] {\n background-color: var(--wui-accent-glass-020);\n }\n\n @media (hover: hover) and (pointer: fine) {\n [data-selected='true']:hover:enabled {\n background-color: var(--wui-accent-glass-015);\n }\n }\n\n [data-selected='true']:active:enabled {\n background-color: var(--wui-accent-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-network-image/index.js';\nimport '../wui-wallet-image/index.js';\nimport styles from './styles.js';\nlet WuiCardSelect = class WuiCardSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.name = 'Unknown';\n this.type = 'wallet';\n this.imageSrc = undefined;\n this.disabled = false;\n this.selected = false;\n this.installed = false;\n }\n render() {\n return html `\n \n `;\n }\n imageTemplate() {\n if (this.type === 'network') {\n return html `\n \n \n `;\n }\n return html `\n \n \n `;\n }\n};\nWuiCardSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiCardSelect.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiCardSelect.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiCardSelect.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiCardSelect.prototype, \"installed\", void 0);\nWuiCardSelect = __decorate([\n customElement('wui-card-select')\n], WuiCardSelect);\nexport { WuiCardSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n a {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-image {\n border-radius: var(--wui-border-radius-3xl);\n overflow: hidden;\n }\n\n a.disabled > wui-icon,\n a.disabled > wui-image {\n filter: grayscale(1);\n }\n\n a[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n a[data-variant='shade'],\n a[data-variant='shadeSmall'] {\n background-color: transparent;\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n a[data-variant='success'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-success-glass-010);\n background-color: var(--wui-success-glass-010);\n color: var(--wui-color-success-100);\n }\n\n a[data-variant='error'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-error-glass-010);\n background-color: var(--wui-error-glass-010);\n color: var(--wui-color-error-100);\n }\n\n a[data-variant='transparent'] {\n column-gap: var(--wui-spacing-xxs);\n background-color: transparent;\n color: var(--wui-color-fg-150);\n }\n\n a[data-variant='transparent'],\n a[data-variant='success'],\n a[data-variant='shadeSmall'],\n a[data-variant='error'] {\n padding: 7px var(--wui-spacing-s) 7px 10px;\n }\n\n a[data-variant='transparent']:has(wui-text:first-child),\n a[data-variant='success']:has(wui-text:first-child),\n a[data-variant='shadeSmall']:has(wui-text:first-child),\n a[data-variant='error']:has(wui-text:first-child) {\n padding: 7px var(--wui-spacing-s);\n }\n\n a[data-variant='fill'],\n a[data-variant='shade'] {\n column-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n a[data-variant='fill']:has(wui-text:first-child),\n a[data-variant='shade']:has(wui-text:first-child) {\n padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);\n }\n\n a[data-variant='fill'] > wui-image,\n a[data-variant='shade'] > wui-image {\n width: 24px;\n height: 24px;\n }\n\n a[data-variant='fill'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);\n }\n\n a[data-variant='shade'] > wui-image,\n a[data-variant='shadeSmall'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n a[data-variant='fill'] > wui-icon,\n a[data-variant='shade'] > wui-icon {\n width: 14px;\n height: 14px;\n }\n\n a[data-variant='transparent'] > wui-image,\n a[data-variant='success'] > wui-image,\n a[data-variant='shadeSmall'] > wui-image,\n a[data-variant='error'] > wui-image {\n width: 14px;\n height: 14px;\n }\n\n a[data-variant='transparent'] > wui-icon,\n a[data-variant='success'] > wui-icon,\n a[data-variant='shadeSmall'] > wui-icon,\n a[data-variant='error'] > wui-icon {\n width: 12px;\n height: 12px;\n }\n\n a[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n a[data-variant='shade']:focus-visible,\n a[data-variant='shadeSmall']:focus-visible {\n background-color: var(--wui-gray-glass-015);\n }\n\n a[data-variant='transparent']:focus-visible {\n background-color: var(--wui-gray-glass-005);\n }\n\n a[data-variant='success']:focus-visible {\n background-color: var(--wui-success-glass-015);\n }\n\n a[data-variant='error']:focus-visible {\n background-color: var(--wui-error-glass-015);\n }\n\n a.disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n pointer-events: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n a[data-variant='fill']:hover {\n background-color: var(--wui-color-accent-090);\n }\n\n a[data-variant='shade']:hover,\n a[data-variant='shadeSmall']:hover {\n background-color: var(--wui-gray-glass-015);\n }\n\n a[data-variant='transparent']:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n a[data-variant='success']:hover {\n background-color: var(--wui-success-glass-015);\n }\n\n a[data-variant='error']:hover {\n background-color: var(--wui-error-glass-015);\n }\n }\n\n a[data-variant='fill']:active {\n background-color: var(--wui-color-accent-080);\n }\n\n a[data-variant='shade']:active,\n a[data-variant='shadeSmall']:active {\n background-color: var(--wui-gray-glass-020);\n }\n\n a[data-variant='transparent']:active {\n background-color: var(--wui-gray-glass-010);\n }\n\n a[data-variant='success']:active {\n background-color: var(--wui-success-glass-020);\n }\n\n a[data-variant='error']:active {\n background-color: var(--wui-error-glass-020);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiChip = class WuiChip extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'fill';\n this.imageSrc = undefined;\n this.disabled = false;\n this.icon = 'externalLink';\n this.href = '';\n this.text = undefined;\n }\n render() {\n const isSmall = this.variant === 'success' || this.variant === 'transparent' || this.variant === 'shadeSmall';\n const textVariant = isSmall ? 'small-600' : 'paragraph-600';\n return html `\n \n ${this.imageTemplate()}\n \n ${this.title ? this.title : UiHelperUtil.getHostName(this.href)}\n \n \n \n `;\n }\n imageTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiChip.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiChip.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiChip.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"href\", void 0);\n__decorate([\n property()\n], WuiChip.prototype, \"text\", void 0);\nWuiChip = __decorate([\n customElement('wui-chip')\n], WuiChip);\nexport { WuiChip };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: block;\n }\n\n button {\n background: var(--wui-color-accent-100);\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-m);\n gap: var(--wui-spacing-xs);\n }\n\n button.loading {\n background: var(--wui-gray-glass-010);\n border: 1px solid var(--wui-gray-glass-010);\n pointer-events: none;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n button:disabled > wui-text {\n color: var(--wui-gray-glass-015);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-color-accent-090);\n }\n\n button:active:enabled {\n background-color: var(--wui-color-accent-080);\n }\n }\n\n button:focus-visible {\n border: 1px solid var(--wui-gray-glass-010);\n background-color: var(--wui-color-accent-090);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n button[data-size='sm'] {\n padding: 6.75px 10px 7.25px;\n }\n\n ::slotted(*) {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n }\n\n button > wui-text {\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n opacity: var(--local-opacity-100);\n color: var(--wui-color-inverse-100);\n }\n\n button[data-size='md'] {\n padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l);\n }\n\n button[data-size='md'] + wui-text {\n padding-left: var(--wui-spacing-3xs);\n }\n\n @media (max-width: 500px) {\n button[data-size='md'] {\n height: 32px;\n padding: 5px 12px;\n }\n\n button[data-size='md'] > wui-text > slot {\n font-size: 14px !important;\n }\n }\n\n wui-loading-spinner {\n width: 14px;\n height: 14px;\n }\n\n wui-loading-spinner::slotted(svg) {\n width: 10px !important;\n height: 10px !important;\n }\n\n button[data-size='sm'] > wui-loading-spinner {\n width: 12px;\n height: 12px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiConnectButton = class WuiConnectButton extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.loading = false;\n }\n render() {\n const textVariant = this.size === 'md' ? 'paragraph-600' : 'small-600';\n return html `\n \n `;\n }\n loadingTemplate() {\n if (!this.loading) {\n return null;\n }\n return html ``;\n }\n};\nWuiConnectButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiConnectButton.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiConnectButton.prototype, \"loading\", void 0);\nWuiConnectButton = __decorate([\n customElement('wui-connect-button')\n], WuiConnectButton);\nexport { WuiConnectButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../composites/wui-button/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCtaButton = class WuiCtaButton extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.label = '';\n this.buttonLabel = '';\n }\n render() {\n return html `\n \n ${this.label}\n \n ${this.buttonLabel}\n \n \n \n `;\n }\n};\nWuiCtaButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiCtaButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiCtaButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiCtaButton.prototype, \"buttonLabel\", void 0);\nWuiCtaButton = __decorate([\n customElement('wui-cta-button')\n], WuiCtaButton);\nexport { WuiCtaButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: var(--wui-spacing-l) var(--wui-spacing-m);\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiDetailsGroup = class WuiDetailsGroup extends LitElement {\n render() {\n return html `\n \n \n \n `;\n }\n};\nWuiDetailsGroup.styles = [resetStyles, elementStyles, styles];\nWuiDetailsGroup = __decorate([\n customElement('wui-details-group')\n], WuiDetailsGroup);\nexport { WuiDetailsGroup };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: row;\n gap: var(--wui-spacing-l);\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiDetailsGroupItem = class WuiDetailsGroupItem extends LitElement {\n constructor() {\n super(...arguments);\n this.name = '';\n }\n render() {\n return html `\n \n ${this.name}\n \n \n \n \n `;\n }\n};\nWuiDetailsGroupItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiDetailsGroupItem.prototype, \"name\", void 0);\nWuiDetailsGroupItem = __decorate([\n customElement('wui-details-group-item')\n], WuiDetailsGroupItem);\nexport { WuiDetailsGroupItem };\n//# sourceMappingURL=index.js.map","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2,MATHML:3},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,d=o=>o?._$litDirective$,f=o=>void 0===o.strings,s=()=>document.createComment(\"\"),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,M=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},h=o=>{o._$AR()};export{n as TemplateResultType,h as clearPart,p as getCommittedValue,d as getDirectiveClass,r as insertPart,l as isCompiledTemplateResult,c as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,M as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective,t as Directive,e as PartType};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as t}from\"../lit-html.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new h;class h{}const o=new WeakMap,n=s(class extends i{render(i){return t}update(i,[s]){const e=s!==this.Y;return e&&void 0!==this.Y&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),t}rt(t){if(this.isConnected||(t=void 0),\"function\"==typeof this.Y){const i=this.ht??globalThis;let s=o.get(i);void 0===s&&(s=new WeakMap,o.set(i,s)),void 0!==s.get(this.Y)&&this.Y.call(this.ht,void 0),s.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return\"function\"==typeof this.Y?o.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n width: 100%;\n display: inline-block;\n color: var(--wui-color-fg-275);\n }\n\n input {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-gray-glass-005);\n background: var(--wui-gray-glass-005);\n font-size: var(--wui-font-size-paragraph);\n font-weight: var(--wui-font-weight-light);\n letter-spacing: var(--wui-letter-spacing-paragraph);\n color: var(--wui-color-fg-100);\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, border-color, box-shadow;\n caret-color: var(--wui-color-accent-100);\n }\n\n input:disabled {\n cursor: not-allowed;\n border: 1px solid var(--wui-gray-glass-010);\n }\n\n input:disabled::placeholder,\n input:disabled + wui-icon {\n color: var(--wui-color-fg-300);\n }\n\n input::placeholder {\n color: var(--wui-color-fg-275);\n }\n\n input:focus:enabled {\n background-color: var(--wui-gray-glass-010);\n border: 1px solid var(--wui-color-accent-100);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n input:hover:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n wui-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n }\n\n .wui-size-sm {\n padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);\n }\n\n wui-icon + .wui-size-sm {\n padding: 9px var(--wui-spacing-m) 10px 36px;\n }\n\n wui-icon[data-input='sm'] {\n left: var(--wui-spacing-s);\n }\n\n .wui-size-md {\n padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);\n }\n\n wui-icon + .wui-size-md,\n wui-loading-spinner + .wui-size-md {\n padding: 10.5px var(--wui-spacing-3xl) 10.5px 40px;\n }\n\n wui-icon[data-input='md'] {\n left: var(--wui-spacing-l);\n }\n\n .wui-size-lg {\n padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);\n letter-spacing: var(--wui-letter-spacing-medium-title);\n font-size: var(--wui-font-size-medium-title);\n font-weight: var(--wui-font-weight-light);\n line-height: 130%;\n color: var(--wui-color-fg-100);\n height: 64px;\n }\n\n wui-icon + .wui-size-lg,\n wui-loading-spinner + .wui-size-lg {\n padding-left: 50px;\n }\n\n wui-icon[data-input='lg'] {\n left: var(--wui-spacing-l);\n }\n\n input:placeholder-shown ~ ::slotted(wui-input-element),\n input:placeholder-shown ~ ::slotted(wui-icon) {\n opacity: 0;\n pointer-events: none;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n ::slotted(wui-input-element),\n ::slotted(wui-icon) {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n ::slotted(wui-input-element) {\n right: var(--wui-spacing-m);\n }\n\n ::slotted(wui-icon) {\n right: 0px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputText = class WuiInputText extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.size = 'md';\n this.disabled = false;\n this.placeholder = '';\n this.type = 'text';\n this.value = '';\n }\n render() {\n const sizeClass = `wui-size-${this.size}`;\n return html ` ${this.templateIcon()}\n \n `;\n }\n templateIcon() {\n if (this.icon) {\n return html ``;\n }\n return null;\n }\n dispatchInputChangeEvent() {\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: this.inputElementRef.value?.value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiInputText.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiInputText.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"icon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiInputText.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"placeholder\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"keyHint\", void 0);\n__decorate([\n property()\n], WuiInputText.prototype, \"value\", void 0);\nWuiInputText = __decorate([\n customElement('wui-input-text')\n], WuiInputText);\nexport { WuiInputText };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n wui-text {\n margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-text/index.js';\nimport styles from './styles.js';\nlet WuiEmailInput = class WuiEmailInput extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n }\n render() {\n return html `\n \n ${this.templateError()}\n `;\n }\n templateError() {\n if (this.errorMessage) {\n return html `${this.errorMessage}`;\n }\n return null;\n }\n};\nWuiEmailInput.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiEmailInput.prototype, \"errorMessage\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiEmailInput.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiEmailInput.prototype, \"value\", void 0);\nWuiEmailInput = __decorate([\n customElement('wui-email-input')\n], WuiEmailInput);\nexport { WuiEmailInput };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n border-radius: var(--local-border-radius);\n color: var(--wui-color-fg-100);\n padding: var(--local-padding);\n }\n\n @media (max-width: 700px) {\n button {\n padding: var(--wui-spacing-s);\n }\n }\n\n button > wui-icon {\n pointer-events: none;\n }\n\n button:disabled > wui-icon {\n color: var(--wui-color-bg-300) !important;\n }\n\n button:disabled {\n background-color: transparent;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { colorStyles, elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiIconLink = class WuiIconLink extends LitElement {\n constructor() {\n super(...arguments);\n this.size = 'md';\n this.disabled = false;\n this.icon = 'copy';\n this.iconColor = 'inherit';\n }\n render() {\n const borderRadius = this.size === 'lg' ? '--wui-border-radius-xs' : '--wui-border-radius-xxs';\n const padding = this.size === 'lg' ? '--wui-spacing-1xs' : '--wui-spacing-2xs';\n this.style.cssText = `\n --local-border-radius: var(${borderRadius});\n --local-padding: var(${padding});\n`;\n return html `\n \n `;\n }\n};\nWuiIconLink.styles = [resetStyles, elementStyles, colorStyles, styles];\n__decorate([\n property()\n], WuiIconLink.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiIconLink.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiIconLink.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiIconLink.prototype, \"iconColor\", void 0);\nWuiIconLink = __decorate([\n customElement('wui-icon-link')\n], WuiIconLink);\nexport { WuiIconLink };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n background-color: var(--wui-color-fg-300);\n border-radius: var(--wui-border-radius-4xs);\n width: 16px;\n height: 16px;\n }\n\n button:disabled {\n background-color: var(--wui-color-bg-300);\n }\n\n wui-icon {\n color: var(--wui-color-bg-200) !important;\n }\n\n button:focus-visible {\n background-color: var(--wui-color-fg-250);\n border: 1px solid var(--wui-color-accent-100);\n }\n\n button:active:enabled {\n background-color: var(--wui-color-fg-225);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-color-fg-250);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputElement = class WuiInputElement extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'copy';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiInputElement.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiInputElement.prototype, \"icon\", void 0);\nWuiInputElement = __decorate([\n customElement('wui-input-element')\n], WuiInputElement);\nexport { WuiInputElement };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n input {\n width: 50px;\n height: 50px;\n background: var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-gray-glass-005);\n font-family: var(--wui-font-family);\n font-size: var(--wui-font-size-large);\n font-weight: var(--wui-font-weight-regular);\n letter-spacing: var(--wui-letter-spacing-large);\n text-align: center;\n color: var(--wui-color-fg-100);\n caret-color: var(--wui-color-accent-100);\n transition:\n background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\n box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\n will-change: background-color, border-color, box-shadow;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n input:disabled {\n cursor: not-allowed;\n border: 1px solid var(--wui-gray-glass-010);\n background: var(--wui-gray-glass-005);\n }\n\n input:focus:enabled {\n background-color: var(--wui-gray-glass-015);\n border: 1px solid var(--wui-color-accent-100);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n @media (hover: hover) and (pointer: fine) {\n input:hover:enabled {\n background-color: var(--wui-gray-glass-015);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiInputNumeric = class WuiInputNumeric extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.value = '';\n }\n render() {\n return html ` `;\n }\n};\nWuiInputNumeric.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiInputNumeric.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputNumeric.prototype, \"value\", void 0);\nWuiInputNumeric = __decorate([\n customElement('wui-input-numeric')\n], WuiInputNumeric);\nexport { WuiInputNumeric };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);\n border-radius: var(--wui-border-radius-3xs);\n background-color: transparent;\n color: var(--wui-color-accent-100);\n }\n\n button:disabled {\n background-color: transparent;\n color: var(--wui-gray-glass-015);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLink = class WuiLink extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiLink.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiLink.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiLink.prototype, \"color\", void 0);\nWuiLink = __decorate([\n customElement('wui-link')\n], WuiLink);\nexport { WuiLink };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 11px 18px 11px var(--wui-spacing-s);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n transition:\n color var(--wui-ease-out-power-1) var(--wui-duration-md),\n background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: color, background-color;\n }\n\n button[data-iconvariant='square'],\n button[data-iconvariant='square-blue'] {\n padding: 6px 18px 6px 9px;\n }\n\n button > wui-flex {\n flex: 1;\n }\n\n button > wui-image {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n button > wui-icon {\n width: 36px;\n height: 36px;\n transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: opacity;\n }\n\n button > wui-icon-box[data-variant='blue'] {\n box-shadow: 0 0 0 2px var(--wui-accent-glass-005);\n }\n\n button > wui-icon-box[data-variant='overlay'] {\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n button > wui-icon-box[data-variant='square-blue'] {\n border-radius: var(--wui-border-radius-3xs);\n position: relative;\n border: none;\n width: 36px;\n height: 36px;\n }\n\n button > wui-icon-box[data-variant='square-blue']::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: inherit;\n border: 1px solid var(--wui-accent-glass-010);\n pointer-events: none;\n }\n\n button > wui-icon:last-child {\n width: 14px;\n height: 14px;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button[data-loading='true'] > wui-icon {\n opacity: 0;\n }\n\n wui-loading-spinner {\n position: absolute;\n right: 18px;\n top: 50%;\n transform: translateY(-50%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiListItem = class WuiListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'icon';\n this.disabled = false;\n this.imageSrc = undefined;\n this.alt = undefined;\n this.chevron = false;\n this.loading = false;\n }\n render() {\n return html `\n \n ${this.loadingTemplate()} ${this.visualTemplate()}\n \n \n \n ${this.chevronTemplate()}\n \n `;\n }\n visualTemplate() {\n if (this.variant === 'image' && this.imageSrc) {\n return html ``;\n }\n if (this.iconVariant === 'square' && this.icon && this.variant === 'icon') {\n return html ``;\n }\n if (this.variant === 'icon' && this.icon && this.iconVariant) {\n const color = ['blue', 'square-blue'].includes(this.iconVariant) ? 'accent-100' : 'fg-200';\n const size = this.iconVariant === 'square-blue' ? 'mdl' : 'md';\n const iconSize = this.iconSize ? this.iconSize : size;\n return html `\n \n `;\n }\n return null;\n }\n loadingTemplate() {\n if (this.loading) {\n return html ``;\n }\n return html ``;\n }\n chevronTemplate() {\n if (this.chevron) {\n return html ``;\n }\n return null;\n }\n};\nWuiListItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListItem.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"iconSize\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"iconVariant\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListItem.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"chevron\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListItem.prototype, \"loading\", void 0);\nWuiListItem = __decorate([\n customElement('wui-list-item')\n], WuiListItem);\nexport { WuiListItem };\n//# sourceMappingURL=index.js.map","export var TransactionTypePastTense;\n(function (TransactionTypePastTense) {\n TransactionTypePastTense[\"approve\"] = \"approved\";\n TransactionTypePastTense[\"bought\"] = \"bought\";\n TransactionTypePastTense[\"borrow\"] = \"borrowed\";\n TransactionTypePastTense[\"burn\"] = \"burnt\";\n TransactionTypePastTense[\"cancel\"] = \"canceled\";\n TransactionTypePastTense[\"claim\"] = \"claimed\";\n TransactionTypePastTense[\"deploy\"] = \"deployed\";\n TransactionTypePastTense[\"deposit\"] = \"deposited\";\n TransactionTypePastTense[\"execute\"] = \"executed\";\n TransactionTypePastTense[\"mint\"] = \"minted\";\n TransactionTypePastTense[\"receive\"] = \"received\";\n TransactionTypePastTense[\"repay\"] = \"repaid\";\n TransactionTypePastTense[\"send\"] = \"sent\";\n TransactionTypePastTense[\"sell\"] = \"sold\";\n TransactionTypePastTense[\"stake\"] = \"staked\";\n TransactionTypePastTense[\"trade\"] = \"swapped\";\n TransactionTypePastTense[\"unstake\"] = \"unstaked\";\n TransactionTypePastTense[\"withdraw\"] = \"withdrawn\";\n})(TransactionTypePastTense || (TransactionTypePastTense = {}));\n//# sourceMappingURL=TypeUtil.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 40px;\n height: 40px;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background-color: var(--wui-gray-glass-005);\n }\n\n :host > wui-flex wui-image {\n display: block;\n }\n\n :host > wui-flex,\n :host > wui-flex wui-image,\n .swap-images-container,\n .swap-images-container.nft,\n wui-image.nft {\n border-top-left-radius: var(--local-left-border-radius);\n border-top-right-radius: var(--local-right-border-radius);\n border-bottom-left-radius: var(--local-left-border-radius);\n border-bottom-right-radius: var(--local-right-border-radius);\n }\n\n wui-icon {\n width: 20px;\n height: 20px;\n }\n\n wui-icon-box {\n position: absolute;\n right: 0;\n bottom: 0;\n transform: translate(20%, 20%);\n }\n\n .swap-images-container {\n position: relative;\n width: 40px;\n height: 40px;\n overflow: hidden;\n }\n\n .swap-images-container wui-image:first-child {\n position: absolute;\n width: 40px;\n height: 40px;\n top: 0;\n left: 0%;\n clip-path: inset(0px calc(50% + 2px) 0px 0%);\n }\n\n .swap-images-container wui-image:last-child {\n clip-path: inset(0px 0px 0px calc(50% + 2px));\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../../components/wui-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiTransactionVisual = class WuiTransactionVisual extends LitElement {\n constructor() {\n super(...arguments);\n this.images = [];\n this.secondImage = {\n type: undefined,\n url: ''\n };\n }\n render() {\n const [firstImage, secondImage] = this.images;\n const isLeftNFT = firstImage?.type === 'NFT';\n const isRightNFT = secondImage?.url ? secondImage.type === 'NFT' : isLeftNFT;\n const leftRadius = isLeftNFT ? 'var(--wui-border-radius-xxs)' : 'var(--wui-border-radius-s)';\n const rightRadius = isRightNFT ? 'var(--wui-border-radius-xxs)' : 'var(--wui-border-radius-s)';\n this.style.cssText = `\n --local-left-border-radius: ${leftRadius};\n --local-right-border-radius: ${rightRadius};\n `;\n return html ` ${this.templateVisual()} ${this.templateIcon()} `;\n }\n templateVisual() {\n const [firstImage, secondImage] = this.images;\n const firstImageType = firstImage?.type;\n const haveTwoImages = this.images.length === 2;\n if (haveTwoImages && (firstImage?.url || secondImage?.url)) {\n return html `
      \n ${firstImage?.url\n ? html ``\n : null}\n ${secondImage?.url\n ? html ``\n : null}\n
      `;\n }\n else if (firstImage?.url) {\n return html ``;\n }\n else if (firstImageType === 'NFT') {\n return html ``;\n }\n return html ``;\n }\n templateIcon() {\n let color = 'accent-100';\n let icon = undefined;\n icon = this.getIcon();\n if (this.status) {\n color = this.getStatusColor();\n }\n if (!icon) {\n return null;\n }\n return html `\n \n `;\n }\n getDirectionIcon() {\n switch (this.direction) {\n case 'in':\n return 'arrowBottom';\n case 'out':\n return 'arrowTop';\n default:\n return undefined;\n }\n }\n getIcon() {\n if (this.onlyDirectionIcon) {\n return this.getDirectionIcon();\n }\n if (this.type === 'trade') {\n return 'swapHorizontalBold';\n }\n else if (this.type === 'approve') {\n return 'checkmark';\n }\n else if (this.type === 'cancel') {\n return 'close';\n }\n return this.getDirectionIcon();\n }\n getStatusColor() {\n switch (this.status) {\n case 'confirmed':\n return 'success-100';\n case 'failed':\n return 'error-100';\n case 'pending':\n return 'inverse-100';\n default:\n return 'accent-100';\n }\n }\n};\nWuiTransactionVisual.styles = [styles];\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"type\", void 0);\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"status\", void 0);\n__decorate([\n property()\n], WuiTransactionVisual.prototype, \"direction\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTransactionVisual.prototype, \"onlyDirectionIcon\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionVisual.prototype, \"images\", void 0);\n__decorate([\n property({ type: Object })\n], WuiTransactionVisual.prototype, \"secondImage\", void 0);\nWuiTransactionVisual = __decorate([\n customElement('wui-transaction-visual')\n], WuiTransactionVisual);\nexport { WuiTransactionVisual };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n align-items: center;\n column-gap: var(--wui-spacing-s);\n padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);\n width: 100%;\n }\n\n :host > wui-flex:first-child wui-text:nth-child(1) {\n text-transform: capitalize;\n }\n\n wui-transaction-visual {\n width: 40px;\n height: 40px;\n }\n\n wui-flex {\n flex: 1;\n }\n\n :host wui-flex wui-flex {\n overflow: hidden;\n }\n\n :host .description-container wui-text span {\n word-break: break-all;\n }\n\n :host .description-container wui-text {\n overflow: hidden;\n }\n\n :host .description-separator-icon {\n margin: 0px 6px;\n }\n\n :host wui-text > span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { TransactionTypePastTense } from '../../utils/TypeUtil.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-transaction-visual/index.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet WuiTransactionListItem = class WuiTransactionListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.type = 'approve';\n this.onlyDirectionIcon = false;\n this.images = [];\n this.price = [];\n this.amount = [];\n this.symbol = [];\n }\n render() {\n return html `\n \n \n \n \n ${TransactionTypePastTense[this.type] || this.type}\n \n \n ${this.templateDescription()} ${this.templateSecondDescription()}\n \n \n ${this.date}\n \n `;\n }\n templateDescription() {\n const description = this.descriptions?.[0];\n return description\n ? html `\n \n ${description}\n \n `\n : null;\n }\n templateSecondDescription() {\n const description = this.descriptions?.[1];\n return description\n ? html `\n \n \n ${description}\n \n `\n : null;\n }\n};\nWuiTransactionListItem.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"type\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"descriptions\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"date\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTransactionListItem.prototype, \"onlyDirectionIcon\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"status\", void 0);\n__decorate([\n property()\n], WuiTransactionListItem.prototype, \"direction\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"images\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"price\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"amount\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTransactionListItem.prototype, \"symbol\", void 0);\nWuiTransactionListItem = __decorate([\n customElement('wui-transaction-list-item')\n], WuiTransactionListItem);\nexport { WuiTransactionListItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n }\n\n wui-flex {\n display: flex;\n flex: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-transaction-visual/index.js';\nimport styles from './styles.js';\nlet WuiTransactionListItemLoader = class WuiTransactionListItemLoader extends LitElement {\n render() {\n return html `\n \n \n \n \n \n \n \n \n `;\n }\n};\nWuiTransactionListItemLoader.styles = [resetStyles, styles];\nWuiTransactionListItemLoader = __decorate([\n customElement('wui-transaction-list-item-loader')\n], WuiTransactionListItemLoader);\nexport { WuiTransactionListItemLoader };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n align-items: center;\n height: var(--wui-spacing-m);\n padding: 0 var(--wui-spacing-3xs) !important;\n border-radius: var(--wui-border-radius-5xs);\n }\n\n :host > wui-text {\n transform: translateY(5%);\n }\n\n :host([data-variant='main']) {\n background-color: var(--wui-accent-glass-015);\n color: var(--wui-color-accent-100);\n }\n\n :host([data-variant='shade']) {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n :host([data-variant='success']) {\n background-color: var(--wui-icon-box-bg-success-100);\n color: var(--wui-color-success-100);\n }\n\n :host([data-variant='error']) {\n background-color: var(--wui-icon-box-bg-error-100);\n color: var(--wui-color-error-100);\n }\n\n :host([data-size='lg']) {\n padding: 9px 5px !important;\n }\n\n :host([data-size='lg']) > wui-text {\n transform: translateY(2%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTag = class WuiTag extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'main';\n this.size = 'lg';\n }\n render() {\n this.dataset['variant'] = this.variant;\n this.dataset['size'] = this.size;\n const textVariant = this.size === 'md' ? 'mini-700' : 'micro-700';\n return html `\n \n \n \n `;\n }\n};\nWuiTag.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiTag.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiTag.prototype, \"size\", void 0);\nWuiTag = __decorate([\n customElement('wui-tag')\n], WuiTag);\nexport { WuiTag };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-100);\n }\n\n button > wui-text:nth-child(2) {\n display: flex;\n flex: 1;\n }\n\n wui-icon {\n color: var(--wui-color-fg-200) !important;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-tag {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../composites/wui-icon-box/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-all-wallets-image/index.js';\nimport '../wui-tag/index.js';\nimport '../wui-wallet-image/index.js';\nimport styles from './styles.js';\nlet WuiListWallet = class WuiListWallet extends LitElement {\n constructor() {\n super(...arguments);\n this.walletImages = [];\n this.imageSrc = '';\n this.name = '';\n this.installed = false;\n this.disabled = false;\n this.showAllWallets = false;\n }\n render() {\n return html `\n \n `;\n }\n templateAllWallets() {\n if (this.showAllWallets && this.imageSrc) {\n return html ` `;\n }\n else if (this.showAllWallets && this.walletIcon) {\n return html ` `;\n }\n return null;\n }\n templateWalletImage() {\n if (!this.showAllWallets && this.imageSrc) {\n return html ``;\n }\n else if (!this.showAllWallets && !this.imageSrc) {\n return html ``;\n }\n return null;\n }\n templateStatus() {\n if (this.tagLabel && this.tagVariant) {\n return html `${this.tagLabel}`;\n }\n else if (this.icon) {\n return html ``;\n }\n return null;\n }\n};\nWuiListWallet.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiListWallet.prototype, \"walletImages\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"tagLabel\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"tagVariant\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListWallet.prototype, \"walletIcon\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"installed\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListWallet.prototype, \"showAllWallets\", void 0);\nWuiListWallet = __decorate([\n customElement('wui-list-wallet')\n], WuiListWallet);\nexport { WuiListWallet };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-010);\n overflow: hidden;\n }\n\n wui-icon {\n width: 100%;\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiLogo = class WuiLogo extends LitElement {\n constructor() {\n super(...arguments);\n this.logo = 'google';\n }\n render() {\n return html ` `;\n }\n};\nWuiLogo.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiLogo.prototype, \"logo\", void 0);\nWuiLogo = __decorate([\n customElement('wui-logo')\n], WuiLogo);\nexport { WuiLogo };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n width: 50px;\n height: 50px;\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-logo/index.js';\nimport styles from './styles.js';\nlet WuiLogoSelect = class WuiLogoSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.logo = 'google';\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiLogoSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiLogoSelect.prototype, \"logo\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiLogoSelect.prototype, \"disabled\", void 0);\nWuiLogoSelect = __decorate([\n customElement('wui-logo-select')\n], WuiLogoSelect);\nexport { WuiLogoSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n display: flex;\n gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs)\n var(--wui-spacing-xs);\n border: 1px solid var(--wui-gray-glass-010);\n background-color: var(--wui-gray-glass-005);\n color: var(--wui-color-fg-100);\n }\n\n button:disabled {\n border: 1px solid var(--wui-gray-glass-005);\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-010);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-015);\n }\n }\n\n wui-image,\n wui-icon-box {\n border-radius: var(--wui-border-radius-3xl);\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiNetworkButton = class WuiNetworkButton extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.isUnsupportedChain = undefined;\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n visualTemplate() {\n if (this.isUnsupportedChain) {\n return html `\n \n `;\n }\n if (this.imageSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiNetworkButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiNetworkButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkButton.prototype, \"isUnsupportedChain\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiNetworkButton.prototype, \"disabled\", void 0);\nWuiNetworkButton = __decorate([\n customElement('wui-network-button')\n], WuiNetworkButton);\nexport { WuiNetworkButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: block;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport '../../layout/wui-flex/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-numeric/index.js';\nimport { WuiInputNumeric } from '../wui-input-numeric/index.js';\nimport styles from './styles.js';\nlet WuiOtp = class WuiOtp extends LitElement {\n constructor() {\n super(...arguments);\n this.length = 6;\n this.otp = '';\n this.values = Array.from({ length: this.length }).map(() => '');\n this.numerics = [];\n this.shouldInputBeEnabled = (index) => {\n const previousInputs = this.values.slice(0, index);\n return previousInputs.every(input => input !== '');\n };\n this.handleKeyDown = (e, index) => {\n const inputElement = e.target;\n const input = this.getInputElement(inputElement);\n const keyArr = ['ArrowLeft', 'ArrowRight', 'Shift', 'Delete'];\n if (!input) {\n return;\n }\n if (keyArr.includes(e.key)) {\n e.preventDefault();\n }\n const currentCaretPos = input.selectionStart;\n switch (e.key) {\n case 'ArrowLeft':\n if (currentCaretPos) {\n input.setSelectionRange(currentCaretPos + 1, currentCaretPos + 1);\n }\n this.focusInputField('prev', index);\n break;\n case 'ArrowRight':\n this.focusInputField('next', index);\n break;\n case 'Shift':\n this.focusInputField('next', index);\n break;\n case 'Delete':\n if (input.value === '') {\n this.focusInputField('prev', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n break;\n case 'Backspace':\n if (input.value === '') {\n this.focusInputField('prev', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n break;\n default:\n }\n };\n this.focusInputField = (dir, index) => {\n if (dir === 'next') {\n const nextIndex = index + 1;\n if (!this.shouldInputBeEnabled(nextIndex)) {\n return;\n }\n const numeric = this.numerics[nextIndex < this.length ? nextIndex : index];\n const input = numeric ? this.getInputElement(numeric) : undefined;\n if (input) {\n input.disabled = false;\n input.focus();\n }\n }\n if (dir === 'prev') {\n const nextIndex = index - 1;\n const numeric = this.numerics[nextIndex > -1 ? nextIndex : index];\n const input = numeric ? this.getInputElement(numeric) : undefined;\n if (input) {\n input.focus();\n }\n }\n };\n }\n firstUpdated() {\n if (this.otp) {\n this.values = this.otp.split('');\n }\n const numericElements = this.shadowRoot?.querySelectorAll('wui-input-numeric');\n if (numericElements) {\n this.numerics = Array.from(numericElements);\n }\n this.numerics[0]?.focus();\n }\n render() {\n return html `\n \n ${Array.from({ length: this.length }).map((_, index) => html `\n this.handleInput(e, index)}\n @click=${(e) => this.selectInput(e)}\n @keydown=${(e) => this.handleKeyDown(e, index)}\n .disabled=${!this.shouldInputBeEnabled(index)}\n .value=${this.values[index] || ''}\n >\n \n `)}\n \n `;\n }\n updateInput(element, index, value) {\n const numeric = this.numerics[index];\n const input = element || (numeric ? this.getInputElement(numeric) : undefined);\n if (input) {\n input.value = value;\n this.values = this.values.map((val, i) => (i === index ? value : val));\n }\n }\n selectInput(e) {\n const targetElement = e.target;\n if (targetElement) {\n const inputElement = this.getInputElement(targetElement);\n inputElement?.select();\n }\n }\n handleInput(e, index) {\n const inputElement = e.target;\n const input = this.getInputElement(inputElement);\n if (input) {\n const inputValue = input.value;\n if (e.inputType === 'insertFromPaste') {\n this.handlePaste(input, inputValue, index);\n }\n else {\n const isValid = UiHelperUtil.isNumber(inputValue);\n if (isValid && e.data) {\n this.updateInput(input, index, e.data);\n this.focusInputField('next', index);\n }\n else {\n this.updateInput(input, index, '');\n }\n }\n }\n this.dispatchInputChangeEvent();\n }\n handlePaste(input, inputValue, index) {\n const value = inputValue[0];\n const isValid = value && UiHelperUtil.isNumber(value);\n if (isValid) {\n this.updateInput(input, index, value);\n const inputString = inputValue.substring(1);\n if (index + 1 < this.length && inputString.length) {\n const nextNumeric = this.numerics[index + 1];\n const nextInput = nextNumeric ? this.getInputElement(nextNumeric) : undefined;\n if (nextInput) {\n this.handlePaste(nextInput, inputString, index + 1);\n }\n }\n else {\n this.focusInputField('next', index);\n }\n }\n else {\n this.updateInput(input, index, '');\n }\n }\n getInputElement(el) {\n if (el.shadowRoot?.querySelector('input')) {\n return el.shadowRoot.querySelector('input');\n }\n return null;\n }\n dispatchInputChangeEvent() {\n const value = this.values.join('');\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiOtp.styles = [resetStyles, styles];\n__decorate([\n property({ type: Number })\n], WuiOtp.prototype, \"length\", void 0);\n__decorate([\n property({ type: String })\n], WuiOtp.prototype, \"otp\", void 0);\n__decorate([\n state()\n], WuiOtp.prototype, \"values\", void 0);\nWuiOtp = __decorate([\n customElement('wui-otp')\n], WuiOtp);\nexport { WuiOtp };\n//# sourceMappingURL=index.js.map","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","'use strict'\n\nmodule.exports = function encodeUtf8 (input) {\n var result = []\n var size = input.length\n\n for (var index = 0; index < size; index++) {\n var point = input.charCodeAt(index)\n\n if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {\n var second = input.charCodeAt(index + 1)\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000\n index += 1\n }\n }\n\n // US-ASCII\n if (point < 0x80) {\n result.push(point)\n continue\n }\n\n // 2-byte UTF-8\n if (point < 0x800) {\n result.push((point >> 6) | 192)\n result.push((point & 63) | 128)\n continue\n }\n\n // 3-byte UTF-8\n if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {\n result.push((point >> 12) | 224)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // 4-byte UTF-8\n if (point >= 0x10000 && point <= 0x10FFFF) {\n result.push((point >> 18) | 240)\n result.push(((point >> 12) & 63) | 128)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // Invalid character\n result.push(0xEF, 0xBF, 0xBD)\n }\n\n return new Uint8Array(result).buffer\n}\n","const encodeUtf8 = require('encode-utf8')\nconst Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n data = encodeUtf8(data)\n }\n this.data = new Uint8Array(data)\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : ''\n\n const path =\n ''\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '' + bg + path + '\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","import { svg } from 'lit';\nimport QRCodeUtil from 'qrcode';\nconst CONNECTING_ERROR_MARGIN = 0.1;\nconst CIRCLE_SIZE_MODIFIER = 2.5;\nconst QRCODE_MATRIX_MARGIN = 7;\nfunction isAdjecentDots(cy, otherCy, cellSize) {\n if (cy === otherCy) {\n return false;\n }\n const diff = cy - otherCy < 0 ? otherCy - cy : cy - otherCy;\n return diff <= cellSize + CONNECTING_ERROR_MARGIN;\n}\nfunction getMatrix(value, errorCorrectionLevel) {\n const arr = Array.prototype.slice.call(QRCodeUtil.create(value, { errorCorrectionLevel }).modules.data, 0);\n const sqrt = Math.sqrt(arr.length);\n return arr.reduce((rows, key, index) => (index % sqrt === 0 ? rows.push([key]) : rows[rows.length - 1].push(key)) && rows, []);\n}\nexport const QrCodeUtil = {\n generate(uri, size, logoSize) {\n const dotColor = '#141414';\n const edgeColor = 'transparent';\n const strokeWidth = 5;\n const dots = [];\n const matrix = getMatrix(uri, 'Q');\n const cellSize = size / matrix.length;\n const qrList = [\n { x: 0, y: 0 },\n { x: 1, y: 0 },\n { x: 0, y: 1 }\n ];\n qrList.forEach(({ x, y }) => {\n const x1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * x;\n const y1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * y;\n const borderRadius = 0.45;\n for (let i = 0; i < qrList.length; i += 1) {\n const dotSize = cellSize * (QRCODE_MATRIX_MARGIN - i * 2);\n dots.push(svg `\n \n `);\n }\n });\n const clearArenaSize = Math.floor((logoSize + 25) / cellSize);\n const matrixMiddleStart = matrix.length / 2 - clearArenaSize / 2;\n const matrixMiddleEnd = matrix.length / 2 + clearArenaSize / 2 - 1;\n const circles = [];\n matrix.forEach((row, i) => {\n row.forEach((_, j) => {\n if (matrix[i][j]) {\n if (!((i < QRCODE_MATRIX_MARGIN && j < QRCODE_MATRIX_MARGIN) ||\n (i > matrix.length - (QRCODE_MATRIX_MARGIN + 1) && j < QRCODE_MATRIX_MARGIN) ||\n (i < QRCODE_MATRIX_MARGIN && j > matrix.length - (QRCODE_MATRIX_MARGIN + 1)))) {\n if (!(i > matrixMiddleStart &&\n i < matrixMiddleEnd &&\n j > matrixMiddleStart &&\n j < matrixMiddleEnd)) {\n const cx = i * cellSize + cellSize / 2;\n const cy = j * cellSize + cellSize / 2;\n circles.push([cx, cy]);\n }\n }\n }\n });\n });\n const circlesToConnect = {};\n circles.forEach(([cx, cy]) => {\n if (circlesToConnect[cx]) {\n circlesToConnect[cx]?.push(cy);\n }\n else {\n circlesToConnect[cx] = [cy];\n }\n });\n Object.entries(circlesToConnect)\n .map(([cx, cys]) => {\n const newCys = cys.filter(cy => cys.every(otherCy => !isAdjecentDots(cy, otherCy, cellSize)));\n return [Number(cx), newCys];\n })\n .forEach(([cx, cys]) => {\n cys.forEach(cy => {\n dots.push(svg ``);\n });\n });\n Object.entries(circlesToConnect)\n .filter(([_, cys]) => cys.length > 1)\n .map(([cx, cys]) => {\n const newCys = cys.filter(cy => cys.some(otherCy => isAdjecentDots(cy, otherCy, cellSize)));\n return [Number(cx), newCys];\n })\n .map(([cx, cys]) => {\n cys.sort((a, b) => (a < b ? -1 : 1));\n const groups = [];\n for (const cy of cys) {\n const group = groups.find(item => item.some(otherCy => isAdjecentDots(cy, otherCy, cellSize)));\n if (group) {\n group.push(cy);\n }\n else {\n groups.push([cy]);\n }\n }\n return [cx, groups.map(item => [item[0], item[item.length - 1]])];\n })\n .forEach(([cx, groups]) => {\n groups.forEach(([y1, y2]) => {\n dots.push(svg `\n \n `);\n });\n });\n return dots;\n }\n};\n//# sourceMappingURL=QrCode.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n user-select: none;\n display: block;\n overflow: hidden;\n aspect-ratio: 1 / 1;\n width: var(--local-size);\n }\n\n :host([data-theme='dark']) {\n border-radius: clamp(0px, var(--wui-border-radius-l), 40px);\n background-color: var(--wui-color-inverse-100);\n padding: var(--wui-spacing-l);\n }\n\n :host([data-theme='light']) {\n box-shadow: 0 0 0 1px var(--wui-color-bg-125);\n background-color: var(--wui-color-bg-125);\n }\n\n :host([data-clear='true']) > wui-icon {\n display: none;\n }\n\n svg:first-child,\n wui-image,\n wui-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateY(-50%) translateX(-50%);\n }\n\n wui-image {\n width: 25%;\n height: 25%;\n border-radius: var(--wui-border-radius-xs);\n }\n\n wui-icon {\n width: 100%;\n height: 100%;\n color: #3396ff !important;\n transform: translateY(-50%) translateX(-50%) scale(0.25);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement, svg } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport { QrCodeUtil } from '../../utils/QrCode.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiQrCode = class WuiQrCode extends LitElement {\n constructor() {\n super(...arguments);\n this.uri = '';\n this.size = 0;\n this.theme = 'dark';\n this.imageSrc = undefined;\n this.alt = undefined;\n this.arenaClear = undefined;\n }\n render() {\n this.dataset['theme'] = this.theme;\n this.dataset['clear'] = String(this.arenaClear);\n this.style.cssText = `--local-size: ${this.size}px`;\n return html `${this.templateVisual()} ${this.templateSvg()}`;\n }\n templateSvg() {\n const size = this.theme === 'light' ? this.size : this.size - 16 * 2;\n return svg `\n \n ${QrCodeUtil.generate(this.uri, size, this.arenaClear ? 0 : size / 4)}\n \n `;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiQrCode.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiQrCode.prototype, \"uri\", void 0);\n__decorate([\n property({ type: Number })\n], WuiQrCode.prototype, \"size\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"theme\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiQrCode.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiQrCode.prototype, \"arenaClear\", void 0);\nWuiQrCode = __decorate([\n customElement('wui-qr-code')\n], WuiQrCode);\nexport { WuiQrCode };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport '../../composites/wui-input-element/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-input-text/index.js';\nimport styles from './styles.js';\nlet WuiSearchBar = class WuiSearchBar extends LitElement {\n constructor() {\n super(...arguments);\n this.inputComponentRef = createRef();\n }\n render() {\n return html `\n \n \n \n `;\n }\n clearValue() {\n const inputComponent = this.inputComponentRef.value;\n const inputElement = inputComponent?.inputElementRef.value;\n if (inputElement) {\n inputElement.value = '';\n inputElement.focus();\n inputElement.dispatchEvent(new Event('input'));\n }\n }\n};\nWuiSearchBar.styles = [resetStyles, styles];\nWuiSearchBar = __decorate([\n customElement('wui-search-bar')\n], WuiSearchBar);\nexport { WuiSearchBar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n column-gap: var(--wui-spacing-xs);\n align-items: center;\n padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-005);\n box-sizing: border-box;\n max-height: 40px;\n background-color: var(--wui-color-bg-175);\n box-shadow:\n 0px 14px 64px -4px rgba(0, 0, 0, 0.15),\n 0px 8px 22px -6px rgba(0, 0, 0, 0.15);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiSnackbar = class WuiSnackbar extends LitElement {\n constructor() {\n super(...arguments);\n this.backgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.icon = 'checkmark';\n this.message = '';\n }\n render() {\n return html `\n \n ${this.message}\n `;\n }\n};\nWuiSnackbar.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiSnackbar.prototype, \"backgroundColor\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"iconColor\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiSnackbar.prototype, \"message\", void 0);\nWuiSnackbar = __decorate([\n customElement('wui-snackbar')\n], WuiSnackbar);\nexport { WuiSnackbar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: inline-flex;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n padding: var(--wui-spacing-3xs);\n position: relative;\n height: 36px;\n overflow: hidden;\n }\n\n :host::before {\n content: '';\n position: absolute;\n pointer-events: none;\n top: 4px;\n left: 4px;\n display: block;\n width: var(--local-tab-width);\n height: 28px;\n border-radius: var(--wui-border-radius-3xl);\n background-color: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));\n transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color, opacity;\n }\n\n :host([data-type='flex'])::before {\n left: 3px;\n transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));\n }\n\n :host([data-type='flex']) {\n display: flex;\n padding: 0px 0px 0px 12px;\n gap: 4px;\n }\n\n :host([data-type='flex']) > button > wui-text {\n position: absolute;\n left: 18px;\n opacity: 0;\n }\n\n button[data-active='true'] > wui-icon,\n button[data-active='true'] > wui-text {\n color: var(--wui-color-fg-100);\n }\n\n button[data-active='false'] > wui-icon,\n button[data-active='false'] > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n button[data-active='true']:disabled,\n button[data-active='false']:disabled {\n background-color: transparent;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n button[data-active='true']:disabled > wui-text {\n color: var(--wui-color-fg-200);\n }\n\n button[data-active='false']:disabled > wui-text {\n color: var(--wui-color-fg-300);\n }\n\n button > wui-icon,\n button > wui-text {\n pointer-events: none;\n transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);\n will-change: color;\n }\n\n button {\n width: var(--local-tab-width);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n :host([data-type='flex']) > button {\n width: 34px;\n position: relative;\n display: flex;\n justify-content: flex-start;\n }\n\n button:hover:enabled,\n button:active:enabled {\n background-color: transparent !important;\n }\n\n button:hover:enabled > wui-icon,\n button:active:enabled > wui-icon {\n color: var(--wui-color-fg-125);\n }\n\n button:hover:enabled > wui-text,\n button:active:enabled > wui-text {\n color: var(--wui-color-fg-125);\n }\n\n button {\n border-radius: var(--wui-border-radius-3xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-icon/index.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTabs = class WuiTabs extends LitElement {\n constructor() {\n super(...arguments);\n this.tabs = [];\n this.onTabChange = () => null;\n this.buttons = [];\n this.disabled = false;\n this.localTabWidth = '100px';\n this.activeTab = 0;\n this.isDense = false;\n }\n render() {\n this.isDense = this.tabs.length > 3;\n this.style.cssText = `\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `;\n this.dataset['type'] = this.isDense ? 'flex' : 'block';\n return this.tabs.map((tab, index) => {\n const isActive = index === this.activeTab;\n return html `\n this.onTabClick(index)}\n data-active=${isActive}\n data-testid=\"tab-${tab.label?.toLowerCase()}\"\n >\n ${this.iconTemplate(tab)}\n ${tab.label} \n \n `;\n });\n }\n firstUpdated() {\n if (this.shadowRoot && this.isDense) {\n this.buttons = [...this.shadowRoot.querySelectorAll('button')];\n setTimeout(() => {\n this.animateTabs(0, true);\n }, 0);\n }\n }\n iconTemplate(tab) {\n if (tab.icon) {\n return html ``;\n }\n return null;\n }\n onTabClick(index) {\n if (this.buttons) {\n this.animateTabs(index, false);\n }\n this.activeTab = index;\n this.onTabChange(index);\n }\n animateTabs(index, initialAnimation) {\n const passiveBtn = this.buttons[this.activeTab];\n const activeBtn = this.buttons[index];\n const passiveBtnText = passiveBtn?.querySelector('wui-text');\n const activeBtnText = activeBtn?.querySelector('wui-text');\n const activeBtnBounds = activeBtn?.getBoundingClientRect();\n const activeBtnTextBounds = activeBtnText?.getBoundingClientRect();\n if (passiveBtn && passiveBtnText && !initialAnimation && index !== this.activeTab) {\n passiveBtnText.animate([{ opacity: 0 }], {\n duration: 50,\n easing: 'ease',\n fill: 'forwards'\n });\n passiveBtn.animate([{ width: `34px` }], {\n duration: 500,\n easing: 'ease',\n fill: 'forwards'\n });\n }\n if (activeBtn && activeBtnBounds && activeBtnTextBounds && activeBtnText) {\n if (index !== this.activeTab || initialAnimation) {\n this.localTabWidth = `${Math.round(activeBtnBounds.width + activeBtnTextBounds.width) + 6}px`;\n activeBtn.animate([{ width: `${activeBtnBounds.width + activeBtnTextBounds.width}px` }], {\n duration: initialAnimation ? 0 : 500,\n fill: 'forwards',\n easing: 'ease'\n });\n activeBtnText.animate([{ opacity: 1 }], {\n duration: initialAnimation ? 0 : 125,\n delay: initialAnimation ? 0 : 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n }\n};\nWuiTabs.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiTabs.prototype, \"tabs\", void 0);\n__decorate([\n property()\n], WuiTabs.prototype, \"onTabChange\", void 0);\n__decorate([\n property({ type: Array })\n], WuiTabs.prototype, \"buttons\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiTabs.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiTabs.prototype, \"localTabWidth\", void 0);\n__decorate([\n state()\n], WuiTabs.prototype, \"activeTab\", void 0);\n__decorate([\n state()\n], WuiTabs.prototype, \"isDense\", void 0);\nWuiTabs = __decorate([\n customElement('wui-tabs')\n], WuiTabs);\nexport { WuiTabs };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n :host > button {\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-1xs);\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n background: var(--wui-gray-glass-002);\n border-width: 0px;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n }\n\n :host > button wui-image {\n width: 24px;\n height: 24px;\n border-radius: var(--wui-border-radius-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nlet WuiTokenButton = class WuiTokenButton extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html `\n \n `;\n }\n tokenTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiTokenButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTokenButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiTokenButton.prototype, \"text\", void 0);\nWuiTokenButton = __decorate([\n customElement('wui-token-button')\n], WuiTokenButton);\nexport { WuiTokenButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n\n color: var(--wui-color-bg-100);\n position: relative;\n }\n\n :host([data-variant='shade']) {\n background-color: var(--wui-color-bg-150);\n border: 1px solid var(--wui-gray-glass-005);\n }\n\n :host([data-variant='shade']) > wui-text {\n color: var(--wui-color-fg-150);\n }\n\n :host([data-variant='fill']) {\n background-color: var(--wui-color-fg-100);\n border: none;\n }\n\n wui-icon {\n position: absolute;\n width: 12px !important;\n height: 4px !important;\n }\n\n wui-icon[data-placement='top'] {\n bottom: 0px;\n left: 50%;\n transform: translate(-50%, 95%);\n }\n\n wui-icon[data-placement='bottom'] {\n top: 0;\n left: 50%;\n transform: translate(-50%, -95%) rotate(180deg);\n }\n\n wui-icon[data-placement='right'] {\n top: 50%;\n left: 0;\n transform: translate(-65%, -50%) rotate(90deg);\n }\n\n wui-icon[data-placement='left'] {\n top: 50%;\n right: 0%;\n transform: translate(65%, -50%) rotate(270deg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiTooltip = class WuiTooltip extends LitElement {\n constructor() {\n super(...arguments);\n this.placement = 'top';\n this.variant = 'fill';\n this.message = '';\n }\n render() {\n this.dataset['variant'] = this.variant;\n return html `\n ${this.message}`;\n }\n};\nWuiTooltip.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTooltip.prototype, \"placement\", void 0);\n__decorate([\n property()\n], WuiTooltip.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiTooltip.prototype, \"message\", void 0);\nWuiTooltip = __decorate([\n customElement('wui-tooltip')\n], WuiTooltip);\nexport { WuiTooltip };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n }\n\n button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n width: 100%;\n background-color: var(--wui-accent-glass-010);\n border-radius: var(--wui-border-radius-xs);\n border: 1px solid var(--wui-accent-glass-010);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n wui-tooltip {\n padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s);\n position: absolute;\n top: -8px;\n left: 50%;\n transform: translate(-50%, -100%);\n opacity: 0;\n display: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-accent-glass-015);\n }\n\n button:active:enabled {\n background-color: var(--wui-accent-glass-020);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport '../wui-tooltip/index.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiTooltipSelect = class WuiTooltipSelect extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n this.icon = 'card';\n }\n render() {\n return html `\n \n \n `;\n }\n onMouseEnter() {\n const element = this.shadowRoot?.querySelector('wui-tooltip');\n if (element) {\n element.style.display = 'flex';\n element?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease',\n duration: 250\n });\n }\n }\n onMouseLeave() {\n const element = this.shadowRoot?.querySelector('wui-tooltip');\n if (element) {\n element.style.display = 'none';\n element?.animate([{ opacity: 1 }, { opacity: 0 }], {\n fill: 'forwards',\n easing: 'ease',\n duration: 200\n });\n }\n }\n};\nWuiTooltipSelect.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTooltipSelect.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiTooltipSelect.prototype, \"icon\", void 0);\nWuiTooltipSelect = __decorate([\n customElement('wui-tooltip-select')\n], WuiTooltipSelect);\nexport { WuiTooltipSelect };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n cursor: pointer;\n display: flex;\n column-gap: var(--wui-spacing-s);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-l);\n width: 100%;\n background-color: transparent;\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n transition: background-color 0.2s linear;\n }\n\n :host > wui-flex:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n :host([disabled]) > wui-flex {\n opacity: 0.6;\n }\n\n :host([disabled]) > wui-flex:hover {\n background-color: transparent;\n }\n\n :host > wui-flex > wui-flex {\n flex: 1;\n }\n\n :host > wui-flex > wui-image {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-3xl);\n position: relative;\n }\n\n :host > wui-flex > wui-image::after {\n position: absolute;\n content: '';\n inset: 0;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-l);\n }\n\n button > wui-icon-box[data-variant='square-blue'] {\n border-radius: var(--wui-border-radius-3xs);\n position: relative;\n border: none;\n width: 36px;\n height: 36px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-loading-spinner/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-icon-box/index.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { NumberUtil } from '@web3modal/common';\nlet WuiTokenListItem = class WuiTokenListItem extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.name = undefined;\n this.symbol = undefined;\n this.price = undefined;\n this.amount = undefined;\n }\n render() {\n const value = NumberUtil.multiply(this.price, this.amount)?.toFixed(3);\n return html `\n \n ${this.visualTemplate()}\n \n \n ${this.name}\n ${value\n ? html `\n \n $${UiHelperUtil.formatNumberToLocalString(value, 3)}\n \n `\n : null}\n \n \n ${this.symbol}\n ${this.amount &&\n html `${UiHelperUtil.formatNumberToLocalString(this.amount, 4)}`}\n \n \n \n `;\n }\n visualTemplate() {\n if (this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiTokenListItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"symbol\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"price\", void 0);\n__decorate([\n property()\n], WuiTokenListItem.prototype, \"amount\", void 0);\nWuiTokenListItem = __decorate([\n customElement('wui-token-list-item')\n], WuiTokenListItem);\nexport { WuiTokenListItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n align-items: center;\n width: var(--wui-icon-box-size-xl);\n height: var(--wui-icon-box-size-xl);\n box-shadow: 0 0 0 8px var(--wui-thumbnail-border);\n border-radius: var(--local-border-radius);\n overflow: hidden;\n }\n\n wui-icon {\n width: 32px;\n height: 32px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-icon/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiVisualThumbnail = class WuiVisualThumbnail extends LitElement {\n render() {\n this.style.cssText = `--local-border-radius: ${this.borderRadiusFull ? '1000px' : '20px'};`;\n return html `${this.templateVisual()}`;\n }\n templateVisual() {\n if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiVisualThumbnail.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiVisualThumbnail.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiVisualThumbnail.prototype, \"alt\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiVisualThumbnail.prototype, \"borderRadiusFull\", void 0);\nWuiVisualThumbnail = __decorate([\n customElement('wui-visual-thumbnail')\n], WuiVisualThumbnail);\nexport { WuiVisualThumbnail };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n button {\n width: 100%;\n display: block;\n padding-top: var(--wui-spacing-l);\n padding-bottom: var(--wui-spacing-l);\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-2l);\n border-radius: var(--wui-border-radius-s);\n background-color: var(--wui-accent-glass-015);\n }\n\n button:hover {\n background-color: var(--wui-accent-glass-010) !important;\n }\n\n button:active {\n background-color: var(--wui-accent-glass-020) !important;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport '../../layout/wui-flex/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../composites/wui-button/index.js';\nimport '../../composites/wui-icon-box/index.js';\nimport { resetStyles, elementStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nlet WuiNoticeCard = class WuiNoticeCard extends LitElement {\n constructor() {\n super(...arguments);\n this.label = '';\n this.description = '';\n this.icon = 'wallet';\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiNoticeCard.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"description\", void 0);\n__decorate([\n property()\n], WuiNoticeCard.prototype, \"icon\", void 0);\nWuiNoticeCard = __decorate([\n customElement('wui-notice-card')\n], WuiNoticeCard);\nexport { WuiNoticeCard };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n height: auto;\n position: relative;\n flex-direction: column;\n gap: var(--wui-spacing-s);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n .overflowedContent {\n width: 100%;\n overflow: hidden;\n }\n\n .overflowedContent[data-active='false']:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(to top, var(--wui-color-bg-200), transparent);\n border-bottom-left-radius: var(--wui-border-radius-xs);\n border-bottom-right-radius: var(--wui-border-radius-xs);\n }\n\n .heightContent {\n max-height: 100px;\n }\n\n pre {\n text-align: left;\n white-space: pre-wrap;\n height: auto;\n overflow-x: auto;\n overflow-wrap: anywhere;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nconst MAX_HEIGHT = 100;\nlet WuiListAccordion = class WuiListAccordion extends LitElement {\n constructor() {\n super(...arguments);\n this.textTitle = '';\n this.overflowedContent = '';\n this.toggled = false;\n this.enableAccordion = false;\n this.scrollElement = undefined;\n this.scrollHeightElement = 0;\n }\n updated(changedProperties) {\n super.updated(changedProperties);\n if (changedProperties.has('textTitle') || changedProperties.has('overflowedContent')) {\n setTimeout(() => {\n this.checkHeight();\n }, 1);\n }\n }\n checkHeight() {\n this.updateComplete.then(() => {\n const heightElement = this.shadowRoot?.querySelector('.heightContent');\n const textElement = this.shadowRoot?.querySelector('.textContent');\n if (heightElement && textElement) {\n this.scrollElement = heightElement;\n const scrollHeight = textElement?.scrollHeight;\n if (scrollHeight && scrollHeight > MAX_HEIGHT) {\n this.enableAccordion = true;\n this.scrollHeightElement = scrollHeight;\n this.requestUpdate();\n }\n }\n });\n }\n render() {\n return html `\n

      \n \n `;\n }\n onClick() {\n const icon = this.shadowRoot?.querySelector('wui-icon');\n if (this.enableAccordion) {\n this.toggled = !this.toggled;\n this.requestUpdate();\n if (this.scrollElement) {\n this.scrollElement.animate([\n { maxHeight: this.toggled ? `${MAX_HEIGHT}px` : `${this.scrollHeightElement}px` },\n { maxHeight: this.toggled ? `${this.scrollHeightElement}px` : `${MAX_HEIGHT}px` }\n ], {\n duration: 300,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n if (icon) {\n icon.animate([\n { transform: this.toggled ? `rotate(0deg)` : `rotate(180deg)` },\n { transform: this.toggled ? `rotate(180deg)` : `rotate(0deg)` }\n ], {\n duration: 300,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n }\n chevronTemplate() {\n if (this.enableAccordion) {\n return html ` `;\n }\n return null;\n }\n};\nWuiListAccordion.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListAccordion.prototype, \"textTitle\", void 0);\n__decorate([\n property()\n], WuiListAccordion.prototype, \"overflowedContent\", void 0);\nWuiListAccordion = __decorate([\n customElement('wui-list-accordion')\n], WuiListAccordion);\nexport { WuiListAccordion };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n column-gap: var(--wui-spacing-s);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n wui-image {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-icon {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListContent = class WuiListContent extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = undefined;\n this.textTitle = '';\n this.textValue = undefined;\n }\n render() {\n return html `\n \n \n ${this.textTitle}\n \n ${this.templateContent()}\n \n `;\n }\n templateContent() {\n if (this.imageSrc) {\n return html ``;\n }\n else if (this.textValue) {\n return html ` ${this.textValue} `;\n }\n return html ``;\n }\n};\nWuiListContent.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListContent.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListContent.prototype, \"textTitle\", void 0);\n__decorate([\n property()\n], WuiListContent.prototype, \"textValue\", void 0);\nWuiListContent = __decorate([\n customElement('wui-list-content')\n], WuiListContent);\nexport { WuiListContent };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n column-gap: var(--wui-spacing-s);\n padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-100);\n }\n\n button > wui-text:nth-child(2) {\n display: flex;\n flex: 1;\n }\n\n button[data-transparent='true'] {\n pointer-events: none;\n background-color: transparent;\n }\n\n wui-icon {\n color: var(--wui-color-fg-200) !important;\n }\n\n button:disabled {\n background-color: var(--wui-gray-glass-015);\n color: var(--wui-gray-glass-015);\n }\n\n button:disabled > wui-tag {\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-300);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport '../wui-network-image/index.js';\nimport styles from './styles.js';\nlet WuiListNetwork = class WuiListNetwork extends LitElement {\n constructor() {\n super(...arguments);\n this.imageSrc = '';\n this.name = '';\n this.disabled = false;\n this.transparent = false;\n }\n render() {\n return html `\n \n `;\n }\n templateNetworkImage() {\n if (this.imageSrc) {\n return html ``;\n }\n if (!this.imageSrc) {\n return html ``;\n }\n return null;\n }\n};\nWuiListNetwork.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListNetwork.prototype, \"imageSrc\", void 0);\n__decorate([\n property()\n], WuiListNetwork.prototype, \"name\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListNetwork.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListNetwork.prototype, \"transparent\", void 0);\nWuiListNetwork = __decorate([\n customElement('wui-list-network')\n], WuiListNetwork);\nexport { WuiListNetwork };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n flex-direction: column;\n gap: var(--wui-spacing-l);\n padding: 17px 18px 17px var(--wui-spacing-m);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n color: var(--wui-color-fg-250);\n }\n\n wui-image {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-icon {\n width: var(--wui-icon-size-lg);\n height: var(--wui-icon-size-lg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-chip/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListWalletTransaction = class WuiListWalletTransaction extends LitElement {\n constructor() {\n super(...arguments);\n this.amount = '';\n this.networkCurreny = '';\n this.networkImageUrl = '';\n this.receiverAddress = '';\n this.addressExplorerUrl = '';\n }\n render() {\n return html `\n \n Sending\n \n \n ${this.amount} ${this.networkCurreny}\n \n ${this.templateNetworkVisual()}\n \n \n \n To\n \n \n `;\n }\n templateNetworkVisual() {\n if (this.networkImageUrl) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiListWalletTransaction.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"amount\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"networkCurreny\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"networkImageUrl\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"receiverAddress\", void 0);\n__decorate([\n property()\n], WuiListWalletTransaction.prototype, \"addressExplorerUrl\", void 0);\nWuiListWalletTransaction = __decorate([\n customElement('wui-list-wallet-transaction')\n], WuiListWalletTransaction);\nexport { WuiListWalletTransaction };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n :host > wui-flex {\n width: 100%;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xs);\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--wui-spacing-s);\n }\n\n :host > wui-flex:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n .purchase-image-container {\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: var(--wui-icon-box-size-lg);\n height: var(--wui-icon-box-size-lg);\n }\n\n .purchase-image-container wui-image {\n width: 100%;\n height: 100%;\n position: relative;\n border-radius: calc(var(--wui-icon-box-size-lg) / 2);\n }\n\n .purchase-image-container wui-image::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-icon-box-size-lg) / 2);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n .purchase-image-container wui-icon-box {\n position: absolute;\n right: 0;\n bottom: 0;\n transform: translate(20%, 20%);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { ApiController } from '@web3modal/core';\nlet WuiOnRampActivityItem = class WuiOnRampActivityItem extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n this.label = 'Bought';\n this.purchaseValue = '';\n this.purchaseCurrency = '';\n this.date = '';\n this.completed = false;\n this.inProgress = false;\n this.failed = false;\n this.onClick = null;\n this.symbol = '';\n }\n firstUpdated() {\n if (!this.icon) {\n this.fetchTokenImage();\n }\n }\n render() {\n return html `\n \n ${this.imageTemplate()}\n \n \n ${this.statusIconTemplate()}\n ${this.label}\n \n \n + ${this.purchaseValue} ${this.purchaseCurrency}\n \n \n ${this.inProgress\n ? html ``\n : html `${this.date}`}\n \n `;\n }\n async fetchTokenImage() {\n await ApiController._fetchTokenImage(this.purchaseCurrency);\n }\n statusIconTemplate() {\n if (this.inProgress) {\n return null;\n }\n return this.completed ? this.boughtIconTemplate() : this.errorIconTemplate();\n }\n errorIconTemplate() {\n return html ``;\n }\n imageTemplate() {\n const icon = this.icon || `https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;\n return html `\n \n `;\n }\n boughtIconTemplate() {\n return html ``;\n }\n};\nWuiOnRampActivityItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"purchaseValue\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"purchaseCurrency\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"date\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"completed\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"inProgress\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampActivityItem.prototype, \"failed\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"onClick\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"symbol\", void 0);\n__decorate([\n property()\n], WuiOnRampActivityItem.prototype, \"icon\", void 0);\nWuiOnRampActivityItem = __decorate([\n customElement('wui-onramp-activity-item')\n], WuiOnRampActivityItem);\nexport { WuiOnRampActivityItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xs);\n background-color: var(--wui-gray-glass-002);\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--wui-spacing-s);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n button:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .provider-image {\n width: var(--wui-spacing-3xl);\n min-width: var(--wui-spacing-3xl);\n height: var(--wui-spacing-3xl);\n border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));\n position: relative;\n overflow: hidden;\n }\n\n .provider-image::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n .network-icon {\n width: var(--wui-spacing-m);\n height: var(--wui-spacing-m);\n border-radius: calc(var(--wui-spacing-m) / 2);\n overflow: hidden;\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-002),\n 0 0 0 3px var(--wui-color-modal-bg);\n transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: box-shadow;\n }\n\n button:hover .network-icon {\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-005),\n 0 0 0 3px var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { AssetUtil, NetworkController } from '@web3modal/core';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet WuiOnRampProviderItem = class WuiOnRampProviderItem extends LitElement {\n constructor() {\n super(...arguments);\n this.disabled = false;\n this.color = 'inherit';\n this.label = '';\n this.feeRange = '';\n this.loading = false;\n this.onClick = null;\n }\n render() {\n return html `\n \n `;\n }\n networksTemplate() {\n const networks = NetworkController.getRequestedCaipNetworks();\n const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5);\n return html `\n \n ${slicedNetworks?.map(network => html `\n \n \n \n `)}\n \n `;\n }\n};\nWuiOnRampProviderItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiOnRampProviderItem.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"color\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"name\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"label\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"feeRange\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiOnRampProviderItem.prototype, \"loading\", void 0);\n__decorate([\n property()\n], WuiOnRampProviderItem.prototype, \"onClick\", void 0);\nWuiOnRampProviderItem = __decorate([\n customElement('wui-onramp-provider-item')\n], WuiOnRampProviderItem);\nexport { WuiOnRampProviderItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n display: flex;\n gap: var(--wui-spacing-3xs);\n align-items: center;\n padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s);\n background-color: var(--wui-gray-glass-090);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-060);\n transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1);\n will-change: background-color;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button:hover:enabled {\n background-color: var(--wui-gray-glass-080);\n }\n\n button:active:enabled {\n background-color: var(--wui-gray-glass-060);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-icon/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiPromo = class WuiPromo extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html ``;\n }\n};\nWuiPromo.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiPromo.prototype, \"text\", void 0);\nWuiPromo = __decorate([\n customElement('wui-promo')\n], WuiPromo);\nexport { WuiPromo };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n span {\n font-weight: 500;\n font-size: 40px;\n color: var(--wui-color-fg-100);\n line-height: 130%; /* 52px */\n letter-spacing: -1.6px;\n text-align: center;\n }\n\n .pennies {\n color: var(--wui-color-fg-200);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nlet WuiBalance = class WuiBalance extends LitElement {\n constructor() {\n super(...arguments);\n this.dollars = '0';\n this.pennies = '00';\n }\n render() {\n return html `$${this.dollars}.${this.pennies}`;\n }\n};\nWuiBalance.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiBalance.prototype, \"dollars\", void 0);\n__decorate([\n property()\n], WuiBalance.prototype, \"pennies\", void 0);\nWuiBalance = __decorate([\n customElement('wui-balance')\n], WuiBalance);\nexport { WuiBalance };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-002);\n padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs);\n position: relative;\n }\n\n wui-avatar {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 0;\n outline: 3px solid var(--wui-gray-glass-005);\n }\n\n wui-icon-box,\n wui-image {\n width: 16px;\n height: 16px;\n border-radius: var(--wui-border-radius-3xl);\n position: absolute;\n left: 26px;\n top: 24px;\n }\n\n wui-image {\n outline: 2px solid var(--wui-color-bg-125);\n }\n\n wui-icon-box {\n outline: 2px solid var(--wui-color-bg-200);\n background-color: var(--wui-color-bg-250);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport '../wui-avatar/index.js';\nimport '../wui-icon-box/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nlet WuiProfileButton = class WuiProfileButton extends LitElement {\n constructor() {\n super(...arguments);\n this.networkSrc = undefined;\n this.avatarSrc = undefined;\n this.isProfileName = false;\n this.address = '';\n this.icon = 'chevronBottom';\n }\n render() {\n return html ``;\n }\n networkImageTemplate() {\n if (this.networkSrc) {\n return html ``;\n }\n return html `\n \n `;\n }\n};\nWuiProfileButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiProfileButton.prototype, \"networkSrc\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"avatarSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiProfileButton.prototype, \"isProfileName\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiProfileButton.prototype, \"icon\", void 0);\nWuiProfileButton = __decorate([\n customElement('wui-profile-button')\n], WuiProfileButton);\nexport { WuiProfileButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n border: 1px solid var(--wui-gray-glass-010);\n border-radius: var(--wui-border-radius-3xl);\n }\n\n wui-image {\n border-radius: var(--wui-border-radius-3xl);\n overflow: hidden;\n }\n\n button.disabled > wui-icon,\n button.disabled > wui-image {\n filter: grayscale(1);\n }\n\n button[data-variant='fill'] {\n color: var(--wui-color-inverse-100);\n background-color: var(--wui-color-accent-100);\n }\n\n button[data-variant='shade'],\n button[data-variant='shadeSmall'] {\n background-color: transparent;\n background-color: var(--wui-gray-glass-010);\n color: var(--wui-color-fg-200);\n }\n\n button[data-variant='success'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-success-glass-010);\n background-color: var(--wui-success-glass-010);\n color: var(--wui-color-success-100);\n }\n\n button[data-variant='error'] {\n column-gap: var(--wui-spacing-xxs);\n border: 1px solid var(--wui-error-glass-010);\n background-color: var(--wui-error-glass-010);\n color: var(--wui-color-error-100);\n }\n\n button[data-variant='transparent'] {\n column-gap: var(--wui-spacing-xxs);\n background-color: transparent;\n color: var(--wui-color-fg-150);\n }\n\n button[data-variant='transparent'],\n button[data-variant='success'],\n button[data-variant='shadeSmall'],\n button[data-variant='error'] {\n padding: 7px var(--wui-spacing-s) 7px 8px;\n }\n\n button[data-variant='transparent']:has(wui-text:first-child),\n button[data-variant='success']:has(wui-text:first-child),\n button[data-variant='shadeSmall']:has(wui-text:first-child),\n button[data-variant='error']:has(wui-text:first-child) {\n padding: 7px var(--wui-spacing-s);\n }\n\n button[data-variant='fill'],\n button[data-variant='shade'] {\n column-gap: var(--wui-spacing-xs);\n padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)\n var(--wui-spacing-xs);\n }\n\n button[data-variant='fill']:has(wui-text:first-child),\n button[data-variant='shade']:has(wui-text:first-child) {\n padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);\n }\n\n button[data-variant='fill'] > wui-image,\n button[data-variant='shade'] > wui-image {\n width: 24px;\n height: 24px;\n }\n\n button[data-variant='fill'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);\n }\n\n button[data-variant='shade'] > wui-image,\n button[data-variant='shadeSmall'] > wui-image {\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n button[data-variant='fill'] > wui-icon,\n button[data-variant='shade'] > wui-icon {\n width: 14px;\n height: 14px;\n }\n\n button[data-variant='transparent'] > wui-image,\n button[data-variant='success'] > wui-image,\n button[data-variant='shadeSmall'] > wui-image,\n button[data-variant='error'] > wui-image {\n width: 14px;\n height: 14px;\n }\n\n button[data-variant='transparent'] > wui-icon,\n button[data-variant='success'] > wui-icon,\n button[data-variant='shadeSmall'] > wui-icon,\n button[data-variant='error'] > wui-icon {\n width: 12px;\n height: 12px;\n }\n\n button[data-variant='fill']:focus-visible {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='shade']:focus-visible,\n button[data-variant='shadeSmall']:focus-visible {\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='transparent']:focus-visible {\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='success']:focus-visible {\n background-color: var(--wui-success-glass-015);\n }\n\n button[data-variant='error']:focus-visible {\n background-color: var(--wui-error-glass-015);\n }\n\n button.disabled {\n color: var(--wui-gray-glass-015);\n background-color: var(--wui-gray-glass-015);\n pointer-events: none;\n }\n\n @media (hover: hover) and (pointer: fine) {\n button[data-variant='fill']:hover {\n background-color: var(--wui-color-accent-090);\n }\n\n button[data-variant='shade']:hover,\n button[data-variant='shadeSmall']:hover {\n background-color: var(--wui-gray-glass-015);\n }\n\n button[data-variant='transparent']:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n button[data-variant='success']:hover {\n background-color: var(--wui-success-glass-015);\n }\n\n button[data-variant='error']:hover {\n background-color: var(--wui-error-glass-015);\n }\n }\n\n button[data-variant='fill']:active {\n background-color: var(--wui-color-accent-080);\n }\n\n button[data-variant='shade']:active,\n button[data-variant='shadeSmall']:active {\n background-color: var(--wui-gray-glass-020);\n }\n\n button[data-variant='transparent']:active {\n background-color: var(--wui-gray-glass-010);\n }\n\n button[data-variant='success']:active {\n background-color: var(--wui-success-glass-020);\n }\n\n button[data-variant='error']:active {\n background-color: var(--wui-error-glass-020);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-text/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiChipButton = class WuiChipButton extends LitElement {\n constructor() {\n super(...arguments);\n this.variant = 'fill';\n this.imageSrc = '';\n this.disabled = false;\n this.icon = 'externalLink';\n this.text = '';\n }\n render() {\n const isSmall = this.variant === 'success' || this.variant === 'transparent' || this.variant === 'shadeSmall';\n const textVariant = isSmall ? 'small-600' : 'paragraph-600';\n return html `\n \n `;\n }\n};\nWuiChipButton.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiChipButton.prototype, \"variant\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiChipButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiChipButton.prototype, \"text\", void 0);\nWuiChipButton = __decorate([\n customElement('wui-chip-button')\n], WuiChipButton);\nexport { WuiChipButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n display: flex;\n gap: var(--wui-spacing-xl);\n width: 100%;\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n padding: var(--wui-spacing-m) var(--wui-spacing-s);\n }\n\n wui-text {\n width: 100%;\n }\n\n wui-flex {\n width: auto;\n }\n\n .network-icon {\n width: var(--wui-spacing-2l);\n height: var(--wui-spacing-2l);\n border-radius: calc(var(--wui-spacing-2l) / 2);\n overflow: hidden;\n box-shadow:\n 0 0 0 3px var(--wui-gray-glass-002),\n 0 0 0 3px var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-icon/index.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiCompatibleNetwork = class WuiCompatibleNetwork extends LitElement {\n constructor() {\n super(...arguments);\n this.networkImages = [''];\n this.text = '';\n }\n render() {\n return html `\n \n `;\n }\n networksTemplate() {\n const slicedNetworks = this.networkImages.slice(0, 5);\n return html ` \n ${slicedNetworks?.map(network => html ` `)}\n `;\n }\n};\nWuiCompatibleNetwork.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Array })\n], WuiCompatibleNetwork.prototype, \"networkImages\", void 0);\n__decorate([\n property()\n], WuiCompatibleNetwork.prototype, \"text\", void 0);\nWuiCompatibleNetwork = __decorate([\n customElement('wui-compatible-network')\n], WuiCompatibleNetwork);\nexport { WuiCompatibleNetwork };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n background-color: var(--wui-gray-glass-005);\n border-radius: var(--wui-border-radius-s);\n padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)\n var(--wui-spacing-1xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../wui-icon-box/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiBanner = class WuiBanner extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'externalLink';\n this.text = '';\n }\n render() {\n return html `\n \n \n ${this.text}\n \n `;\n }\n};\nWuiBanner.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiBanner.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiBanner.prototype, \"text\", void 0);\nWuiBanner = __decorate([\n customElement('wui-banner')\n], WuiBanner);\nexport { WuiBanner };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);\n display: flex;\n justify-content: space-between;\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n background-color: var(--wui-gray-glass-002);\n }\n\n button[data-clickable='false'] {\n pointer-events: none;\n background-color: transparent;\n }\n\n wui-image {\n width: var(--wui-spacing-3xl);\n height: var(--wui-spacing-3xl);\n border-radius: var(--wui-border-radius-3xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nlet WuiListToken = class WuiListToken extends LitElement {\n constructor() {\n super(...arguments);\n this.tokenName = '';\n this.tokenImageUrl = '';\n this.tokenValue = 0.0;\n this.tokenAmount = '0.0';\n this.tokenCurrency = '';\n this.clickable = false;\n }\n render() {\n return html `\n \n `;\n }\n};\nWuiListToken.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenName\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenImageUrl\", void 0);\n__decorate([\n property({ type: Number })\n], WuiListToken.prototype, \"tokenValue\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenAmount\", void 0);\n__decorate([\n property()\n], WuiListToken.prototype, \"tokenCurrency\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListToken.prototype, \"clickable\", void 0);\nWuiListToken = __decorate([\n customElement('wui-list-token')\n], WuiListToken);\nexport { WuiListToken };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n button {\n width: 100%;\n display: flex;\n gap: var(--wui-spacing-s);\n align-items: center;\n justify-content: flex-start;\n padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s);\n background-color: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xs);\n }\n\n wui-icon-box {\n width: var(--wui-spacing-2xl);\n height: var(--wui-spacing-2xl);\n }\n\n wui-flex {\n width: auto;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiListDescription = class WuiListDescription extends LitElement {\n constructor() {\n super(...arguments);\n this.icon = 'card';\n this.text = '';\n this.description = '';\n this.tag = undefined;\n this.iconBackgroundColor = 'accent-100';\n this.iconColor = 'accent-100';\n this.disabled = false;\n }\n render() {\n return html `\n \n `;\n }\n titleTemplate() {\n if (this.tag) {\n return html ` ${this.text}${this.tag}\n `;\n }\n return html `${this.text}`;\n }\n};\nWuiListDescription.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiListDescription.prototype, \"icon\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"description\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"tag\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"iconBackgroundColor\", void 0);\n__decorate([\n property()\n], WuiListDescription.prototype, \"iconColor\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiListDescription.prototype, \"disabled\", void 0);\nWuiListDescription = __decorate([\n customElement('wui-list-description')\n], WuiListDescription);\nexport { WuiListDescription };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: inline-block;\n }\n\n input {\n background: transparent;\n width: 100%;\n height: auto;\n font-family: var(--wui-font-family);\n color: var(--wui-color-fg-100);\n\n font-feature-settings: 'case' on;\n font-size: 32px;\n font-weight: var(--wui-font-weight-light);\n caret-color: var(--wui-color-accent-100);\n line-height: 130%;\n letter-spacing: -1.28px;\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input::placeholder {\n color: var(--wui-color-fg-275);\n }\n`;\n//# sourceMappingURL=styles.js.map","export const specialCharactersRegex = /[.*+?^${}()|[\\]\\\\]/gu;\nexport const numbersRegex = /[0-9,.]/u;\n//# sourceMappingURL=ConstantsUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { numbersRegex, specialCharactersRegex } from '../../utils/ConstantsUtil.js';\nlet WuiInputAmount = class WuiInputAmount extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.disabled = false;\n this.value = '';\n this.placeholder = '0';\n }\n render() {\n if (this.inputElementRef?.value && this.value) {\n this.inputElementRef.value.value = this.value;\n }\n return html ` `;\n }\n dispatchInputChangeEvent(e) {\n const inputChar = e.data;\n if (inputChar) {\n if (!numbersRegex.test(inputChar) && this.inputElementRef?.value) {\n this.inputElementRef.value.value = this.value.replace(new RegExp(inputChar.replace(specialCharactersRegex, '\\\\$&'), 'gu'), '');\n }\n }\n this.dispatchEvent(new CustomEvent('inputChange', {\n detail: this.inputElementRef.value?.value,\n bubbles: true,\n composed: true\n }));\n }\n};\nWuiInputAmount.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property({ type: Boolean })\n], WuiInputAmount.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputAmount.prototype, \"value\", void 0);\n__decorate([\n property({ type: String })\n], WuiInputAmount.prototype, \"placeholder\", void 0);\nWuiInputAmount = __decorate([\n customElement('wui-input-amount')\n], WuiInputAmount);\nexport { WuiInputAmount };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n gap: var(--wui-spacing-xs);\n border-radius: var(--wui-border-radius-3xl);\n border: 1px solid var(--wui-gray-glass-002);\n background: var(--wui-gray-glass-002);\n padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)\n var(--wui-spacing-s);\n align-items: center;\n }\n\n wui-avatar,\n wui-icon,\n wui-image {\n width: 32px;\n height: 32px;\n border: 1px solid var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-3xl);\n box-shadow: 0 0 0 2px var(--wui-gray-glass-002);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport '../../components/wui-image/index.js';\nimport '../../components/wui-icon/index.js';\nimport '../wui-avatar/index.js';\nimport '../../layout/wui-flex/index.js';\nimport { elementStyles, resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiPreviewItem = class WuiPreviewItem extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n this.address = '';\n this.isAddress = false;\n }\n render() {\n return html `${this.text}\n ${this.imageTemplate()}`;\n }\n imageTemplate() {\n if (this.isAddress) {\n return html ``;\n }\n else if (this.imageSrc) {\n return html ``;\n }\n return html ``;\n }\n};\nWuiPreviewItem.styles = [resetStyles, elementStyles, styles];\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"text\", void 0);\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"address\", void 0);\n__decorate([\n property()\n], WuiPreviewItem.prototype, \"imageSrc\", void 0);\n__decorate([\n property({ type: Boolean })\n], WuiPreviewItem.prototype, \"isAddress\", void 0);\nWuiPreviewItem = __decorate([\n customElement('wui-preview-item')\n], WuiPreviewItem);\nexport { WuiPreviewItem };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: grid;\n width: inherit;\n height: inherit;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { UiHelperUtil } from '../../utils/UiHelperUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiGrid = class WuiGrid extends LitElement {\n render() {\n this.style.cssText = `\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap && `var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap && `var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap && `var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 0)};\n padding-right: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 1)};\n padding-bottom: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 2)};\n padding-left: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 3)};\n margin-top: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 0)};\n margin-right: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 1)};\n margin-bottom: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 2)};\n margin-left: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 3)};\n `;\n return html ``;\n }\n};\nWuiGrid.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiGrid.prototype, \"gridTemplateRows\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"gridTemplateColumns\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"justifyItems\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"alignItems\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"justifyContent\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"alignContent\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"columnGap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"rowGap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"gap\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"padding\", void 0);\n__decorate([\n property()\n], WuiGrid.prototype, \"margin\", void 0);\nWuiGrid = __decorate([\n customElement('wui-grid')\n], WuiGrid);\nexport { WuiGrid };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n position: relative;\n display: flex;\n width: 100%;\n height: 1px;\n background-color: var(--wui-gray-glass-005);\n justify-content: center;\n align-items: center;\n }\n\n :host > wui-text {\n position: absolute;\n padding: 0px 10px;\n background-color: var(--wui-color-modal-bg);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../../components/wui-text/index.js';\nimport { resetStyles } from '../../utils/ThemeUtil.js';\nimport { customElement } from '../../utils/WebComponentsUtil.js';\nimport styles from './styles.js';\nlet WuiSeparator = class WuiSeparator extends LitElement {\n constructor() {\n super(...arguments);\n this.text = '';\n }\n render() {\n return html `${this.template()}`;\n }\n template() {\n if (this.text) {\n return html `${this.text}`;\n }\n return null;\n }\n};\nWuiSeparator.styles = [resetStyles, styles];\n__decorate([\n property()\n], WuiSeparator.prototype, \"text\", void 0);\nWuiSeparator = __decorate([\n customElement('wui-separator')\n], WuiSeparator);\nexport { WuiSeparator };\n//# sourceMappingURL=index.js.map","export const MathUtil = {\n interpolate(inputRange, outputRange, value) {\n if (inputRange.length !== 2 || outputRange.length !== 2) {\n throw new Error('inputRange and outputRange must be an array of length 2');\n }\n const originalRangeMin = inputRange[0] || 0;\n const originalRangeMax = inputRange[1] || 0;\n const newRangeMin = outputRange[0] || 0;\n const newRangeMax = outputRange[1] || 0;\n if (value < originalRangeMin) {\n return newRangeMin;\n }\n if (value > originalRangeMax) {\n return newRangeMax;\n }\n return (((newRangeMax - newRangeMin) / (originalRangeMax - originalRangeMin)) *\n (value - originalRangeMin) +\n newRangeMin);\n }\n};\n//# sourceMappingURL=MathUtil.js.map","import { DateUtil } from '@web3modal/common';\nimport { UiHelperUtil } from './UiHelperUtil.js';\nconst FLOAT_FIXED_VALUE = 3;\nconst plusTypes = ['receive', 'deposit', 'borrow', 'claim'];\nconst minusTypes = ['withdraw', 'repay', 'burn'];\nexport const TransactionUtil = {\n getMonthName(monthNumber) {\n const date = new Date();\n date.setMonth(monthNumber);\n return date.toLocaleString('en-US', {\n month: 'long'\n });\n },\n getTransactionGroupTitle(year, month) {\n const currentYear = DateUtil.getYear();\n const monthName = this.getMonthName(month);\n const isCurrentYear = year === currentYear;\n const groupTitle = isCurrentYear ? monthName : `${monthName} ${year}`;\n return groupTitle;\n },\n getTransactionImages(transfers) {\n const [transfer, secondTransfer] = transfers;\n const isAllNFT = Boolean(transfer) && transfers?.every(item => Boolean(item.nft_info));\n const haveMultipleTransfers = transfers?.length > 1;\n const haveTwoTransfers = transfers?.length === 2;\n if (haveTwoTransfers && !isAllNFT) {\n return [this.getTransactionImage(transfer), this.getTransactionImage(secondTransfer)];\n }\n if (haveMultipleTransfers) {\n return transfers.map(item => this.getTransactionImage(item));\n }\n return [this.getTransactionImage(transfer)];\n },\n getTransactionImage(transfer) {\n return {\n type: TransactionUtil.getTransactionTransferTokenType(transfer),\n url: TransactionUtil.getTransactionImageURL(transfer)\n };\n },\n getTransactionImageURL(transfer) {\n let imageURL = undefined;\n const isNFT = Boolean(transfer?.nft_info);\n const isFungible = Boolean(transfer?.fungible_info);\n if (transfer && isNFT) {\n imageURL = transfer?.nft_info?.content?.preview?.url;\n }\n else if (transfer && isFungible) {\n imageURL = transfer?.fungible_info?.icon?.url;\n }\n return imageURL;\n },\n getTransactionTransferTokenType(transfer) {\n if (transfer?.fungible_info) {\n return 'FUNGIBLE';\n }\n else if (transfer?.nft_info) {\n return 'NFT';\n }\n return undefined;\n },\n getTransactionDescriptions(transaction) {\n const type = transaction?.metadata?.operationType;\n const transfers = transaction?.transfers;\n const haveTransfer = transaction?.transfers?.length > 0;\n const haveMultipleTransfers = transaction?.transfers?.length > 1;\n const isFungible = haveTransfer && transfers?.every(transfer => Boolean(transfer?.fungible_info));\n const [firstTransfer, secondTransfer] = transfers;\n let firstDescription = this.getTransferDescription(firstTransfer);\n let secondDescription = this.getTransferDescription(secondTransfer);\n if (!haveTransfer) {\n const isSendOrReceive = type === 'send' || type === 'receive';\n if (isSendOrReceive && isFungible) {\n firstDescription = UiHelperUtil.getTruncateString({\n string: transaction?.metadata.sentFrom,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n });\n secondDescription = UiHelperUtil.getTruncateString({\n string: transaction?.metadata.sentTo,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n });\n return [firstDescription, secondDescription];\n }\n return [transaction.metadata.status];\n }\n if (haveMultipleTransfers) {\n return transfers.map(item => this.getTransferDescription(item));\n }\n let prefix = '';\n if (plusTypes.includes(type)) {\n prefix = '+';\n }\n else if (minusTypes.includes(type)) {\n prefix = '-';\n }\n firstDescription = prefix.concat(firstDescription);\n return [firstDescription];\n },\n getTransferDescription(transfer) {\n let description = '';\n if (!transfer) {\n return description;\n }\n if (transfer?.nft_info) {\n description = transfer?.nft_info?.name || '-';\n }\n else if (transfer?.fungible_info) {\n description = this.getFungibleTransferDescription(transfer) || '-';\n }\n return description;\n },\n getFungibleTransferDescription(transfer) {\n if (!transfer) {\n return null;\n }\n const quantity = this.getQuantityFixedValue(transfer?.quantity.numeric);\n const description = [quantity, transfer?.fungible_info?.symbol].join(' ').trim();\n return description;\n },\n getQuantityFixedValue(value) {\n if (!value) {\n return null;\n }\n const parsedValue = parseFloat(value);\n return parsedValue.toFixed(FLOAT_FIXED_VALUE);\n }\n};\n//# sourceMappingURL=TransactionUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, ModalController, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mAccountButton = class W3mAccountButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.balance = 'show';\n this.charsStart = 4;\n this.charsEnd = 6;\n this.address = AccountController.state.address;\n this.balanceVal = AccountController.state.balance;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.profileName = AccountController.state.profileName;\n this.profileImage = AccountController.state.profileImage;\n this.network = NetworkController.state.caipNetwork;\n this.isUnsupportedChain = NetworkController.state.isUnsupportedChain;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.isConnected) {\n this.address = val.address;\n this.balanceVal = val.balance;\n this.profileName = val.profileName;\n this.profileImage = val.profileImage;\n this.balanceSymbol = val.balanceSymbol;\n }\n else {\n this.address = '';\n this.balanceVal = '';\n this.profileName = '';\n this.profileImage = '';\n this.balanceSymbol = '';\n }\n }),\n NetworkController.subscribeKey('caipNetwork', val => (this.network = val)),\n NetworkController.subscribeKey('isUnsupportedChain', val => (this.isUnsupportedChain = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const networkImage = AssetUtil.getNetworkImage(this.network);\n const showBalance = this.balance === 'show';\n return html `\n \n \n `;\n }\n onClick() {\n if (this.isUnsupportedChain) {\n ModalController.open({ view: 'UnsupportedChain' });\n }\n else {\n ModalController.open();\n }\n }\n};\n__decorate([\n property({ type: Boolean })\n], W3mAccountButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], W3mAccountButton.prototype, \"charsEnd\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"balanceVal\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"balanceSymbol\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountButton.prototype, \"isUnsupportedChain\", void 0);\nW3mAccountButton = __decorate([\n customElement('w3m-account-button')\n], W3mAccountButton);\nexport { W3mAccountButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mButton = class W3mButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.balance = undefined;\n this.size = undefined;\n this.label = undefined;\n this.loadingLabel = undefined;\n this.charsStart = 4;\n this.charsEnd = 6;\n this.isAccount = AccountController.state.isConnected;\n this.unsubscribe.push(AccountController.subscribeKey('isConnected', val => {\n this.isAccount = val;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return this.isAccount\n ? html `\n \n \n `\n : html `\n \n `;\n }\n};\nW3mButton.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mButton.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"size\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"loadingLabel\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"charsStart\", void 0);\n__decorate([\n property()\n], W3mButton.prototype, \"charsEnd\", void 0);\n__decorate([\n state()\n], W3mButton.prototype, \"isAccount\", void 0);\nW3mButton = __decorate([\n customElement('w3m-button')\n], W3mButton);\nexport { W3mButton };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ModalController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mConnectButton = class W3mConnectButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.size = 'md';\n this.label = 'Connect Wallet';\n this.loadingLabel = 'Connecting...';\n this.open = ModalController.state.open;\n this.loading = ModalController.state.loading;\n this.unsubscribe.push(ModalController.subscribe(val => {\n this.open = val.open;\n this.loading = val.loading;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const isLoading = this.loading || this.open;\n return html `\n \n ${isLoading ? this.loadingLabel : this.label}\n \n `;\n }\n onClick() {\n if (this.open) {\n ModalController.close();\n }\n else if (!this.loading) {\n ModalController.open();\n }\n }\n};\n__decorate([\n property()\n], W3mConnectButton.prototype, \"size\", void 0);\n__decorate([\n property()\n], W3mConnectButton.prototype, \"label\", void 0);\n__decorate([\n property()\n], W3mConnectButton.prototype, \"loadingLabel\", void 0);\n__decorate([\n state()\n], W3mConnectButton.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mConnectButton.prototype, \"loading\", void 0);\nW3mConnectButton = __decorate([\n customElement('w3m-connect-button')\n], W3mConnectButton);\nexport { W3mConnectButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n z-index: var(--w3m-z-index);\n display: block;\n backface-visibility: hidden;\n will-change: opacity;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n opacity: 0;\n background-color: var(--wui-cover);\n }\n\n @keyframes zoom-in {\n 0% {\n transform: scale(0.95) translateY(0);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes slide-in {\n 0% {\n transform: scale(1) translateY(50px);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n wui-card {\n max-width: 360px;\n width: 100%;\n position: relative;\n animation-duration: 0.2s;\n animation-name: zoom-in;\n animation-fill-mode: backwards;\n animation-timing-function: var(--wui-ease-out-power-2);\n outline: none;\n }\n\n wui-flex {\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n @media (max-height: 700px) and (min-width: 431px) {\n wui-flex {\n align-items: flex-start;\n }\n\n wui-card {\n margin: var(--wui-spacing-xxl) 0px;\n }\n }\n\n @media (max-width: 430px) {\n wui-flex {\n align-items: flex-end;\n }\n\n wui-card {\n max-width: 100%;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: none;\n animation-name: slide-in;\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ApiController, ConnectionController, EventsController, ModalController, OptionsController, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { UiHelperUtil, customElement, initializeTheming } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst SCROLL_LOCK = 'scroll-lock';\nlet W3mModal = class W3mModal extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.abortController = undefined;\n this.open = ModalController.state.open;\n this.caipAddress = AccountController.state.caipAddress;\n this.isSiweEnabled = OptionsController.state.isSiweEnabled;\n this.initializeTheming();\n ApiController.prefetch();\n this.unsubscribe.push(ModalController.subscribeKey('open', val => (val ? this.onOpen() : this.onClose())), AccountController.subscribe(newAccountState => this.onNewAccountState(newAccountState)));\n EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' });\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.onRemoveKeyboardListener();\n }\n render() {\n return this.open\n ? html `\n \n \n \n \n \n \n \n `\n : null;\n }\n async onOverlayClick(event) {\n if (event.target === event.currentTarget) {\n await this.handleClose();\n }\n }\n async handleClose() {\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (SIWEController.state.status !== 'success') {\n await ConnectionController.disconnect();\n }\n }\n ModalController.close();\n }\n initializeTheming() {\n const { themeVariables, themeMode } = ThemeController.state;\n const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);\n initializeTheming(themeVariables, defaultThemeMode);\n }\n async onClose() {\n this.onScrollUnlock();\n await this.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n SnackController.hide();\n this.open = false;\n this.onRemoveKeyboardListener();\n }\n async onOpen() {\n this.onScrollLock();\n this.open = true;\n await this.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n this.onAddKeyboardListener();\n }\n onScrollLock() {\n const styleTag = document.createElement('style');\n styleTag.dataset['w3m'] = SCROLL_LOCK;\n styleTag.textContent = `\n html, body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n `;\n document.head.appendChild(styleTag);\n }\n onScrollUnlock() {\n const styleTag = document.head.querySelector(`style[data-w3m=\"${SCROLL_LOCK}\"]`);\n if (styleTag) {\n styleTag.remove();\n }\n }\n onAddKeyboardListener() {\n this.abortController = new AbortController();\n const card = this.shadowRoot?.querySelector('wui-card');\n card?.focus();\n window.addEventListener('keydown', event => {\n if (event.key === 'Escape') {\n this.handleClose();\n }\n else if (event.key === 'Tab') {\n const { tagName } = event.target;\n if (tagName && !tagName.includes('W3M-') && !tagName.includes('WUI-')) {\n card?.focus();\n }\n }\n }, this.abortController);\n }\n onRemoveKeyboardListener() {\n this.abortController?.abort();\n this.abortController = undefined;\n }\n async onNewAccountState(newState) {\n const { isConnected, caipAddress: newCaipAddress } = newState;\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (isConnected && !this.caipAddress) {\n this.caipAddress = newCaipAddress;\n }\n if (isConnected && newCaipAddress && this.caipAddress !== newCaipAddress) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n this.caipAddress = newCaipAddress;\n }\n try {\n const session = await SIWEController.getSession();\n if (session && !isConnected) {\n await SIWEController.signOut();\n }\n else if (isConnected && !session) {\n this.onSiweNavigation();\n }\n }\n catch (error) {\n if (isConnected) {\n this.onSiweNavigation();\n }\n }\n }\n }\n onSiweNavigation() {\n if (this.open) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.open({\n view: 'ConnectingSiwe'\n });\n }\n }\n};\nW3mModal.styles = styles;\n__decorate([\n state()\n], W3mModal.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipAddress\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"isSiweEnabled\", void 0);\nW3mModal = __decorate([\n customElement('w3m-modal')\n], W3mModal);\nexport { W3mModal };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, EventsController, ModalController, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworkButton = class W3mNetworkButton extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.network = NetworkController.state.caipNetwork;\n this.connected = AccountController.state.isConnected;\n this.loading = ModalController.state.loading;\n this.isUnsupportedChain = NetworkController.state.isUnsupportedChain;\n this.unsubscribe.push(...[\n NetworkController.subscribeKey('caipNetwork', val => (this.network = val)),\n AccountController.subscribeKey('isConnected', val => (this.connected = val)),\n ModalController.subscribeKey('loading', val => (this.loading = val)),\n NetworkController.subscribeKey('isUnsupportedChain', val => (this.isUnsupportedChain = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.isUnsupportedChain\n ? 'Switch Network'\n : this.network?.name ?? (this.connected ? 'Unknown Network' : 'Select Network')}\n \n `;\n }\n onClick() {\n if (!this.loading) {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORKS' });\n ModalController.open({ view: 'Networks' });\n }\n }\n};\nW3mNetworkButton.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mNetworkButton.prototype, \"disabled\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"connected\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mNetworkButton.prototype, \"isUnsupportedChain\", void 0);\nW3mNetworkButton = __decorate([\n customElement('w3m-network-button')\n], W3mNetworkButton);\nexport { W3mNetworkButton };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n will-change: transform, opacity;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nlet W3mRouter = class W3mRouter extends LitElement {\n constructor() {\n super();\n this.resizeObserver = undefined;\n this.prevHeight = '0px';\n this.prevHistoryLength = 1;\n this.unsubscribe = [];\n this.view = RouterController.state.view;\n this.unsubscribe.push(RouterController.subscribeKey('view', val => this.onViewChange(val)));\n }\n firstUpdated() {\n this.resizeObserver = new ResizeObserver(async ([content]) => {\n const height = `${content?.contentRect.height}px`;\n if (this.prevHeight !== '0px') {\n await this.animate([{ height: this.prevHeight }, { height }], {\n duration: 150,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n this.style.height = 'auto';\n }\n this.prevHeight = height;\n });\n this.resizeObserver.observe(this.getWrapper());\n }\n disconnectedCallback() {\n this.resizeObserver?.unobserve(this.getWrapper());\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `
      ${this.viewTemplate()}
      `;\n }\n viewTemplate() {\n switch (this.view) {\n case 'Connect':\n return html ``;\n case 'ConnectingWalletConnect':\n return html ``;\n case 'ConnectingExternal':\n return html ``;\n case 'ConnectingSiwe':\n return html ``;\n case 'AllWallets':\n return html ``;\n case 'Networks':\n return html ``;\n case 'SwitchNetwork':\n return html ``;\n case 'Account':\n return html ``;\n case 'AccountSettings':\n return html ``;\n case 'WhatIsAWallet':\n return html ``;\n case 'WhatIsANetwork':\n return html ``;\n case 'GetWallet':\n return html ``;\n case 'Downloads':\n return html ``;\n case 'EmailVerifyOtp':\n return html ``;\n case 'EmailVerifyDevice':\n return html ``;\n case 'ApproveTransaction':\n return html ``;\n case 'Transactions':\n return html ``;\n case 'UpgradeEmailWallet':\n return html ``;\n case 'UpgradeToSmartAccount':\n return html ``;\n case 'UpdateEmailWallet':\n return html ``;\n case 'UpdateEmailPrimaryOtp':\n return html ``;\n case 'UpdateEmailSecondaryOtp':\n return html ``;\n case 'UnsupportedChain':\n return html ``;\n case 'OnRampProviders':\n return html ``;\n case 'OnRampActivity':\n return html ``;\n case 'OnRampTokenSelect':\n return html ``;\n case 'OnRampFiatSelect':\n return html ``;\n case 'WhatIsABuy':\n return html ``;\n case 'BuyInProgress':\n return html ``;\n case 'WalletReceive':\n return html ``;\n case 'WalletCompatibleNetworks':\n return html ``;\n case 'Convert':\n return html ``;\n case 'ConvertSelectToken':\n return html ``;\n case 'ConvertPreview':\n return html ``;\n case 'WalletSend':\n return html ``;\n case 'WalletSendSelectToken':\n return html ``;\n case 'WalletSendPreview':\n return html ``;\n default:\n return html ``;\n }\n }\n async onViewChange(newView) {\n const { history } = RouterController.state;\n let xOut = -10;\n let xIn = 10;\n if (history.length < this.prevHistoryLength) {\n xOut = 10;\n xIn = -10;\n }\n this.prevHistoryLength = history.length;\n await this.animate([\n { opacity: 1, transform: 'translateX(0px)' },\n { opacity: 0, transform: `translateX(${xOut}px)` }\n ], { duration: 150, easing: 'ease', fill: 'forwards' }).finished;\n this.view = newView;\n await this.animate([\n { opacity: 0, transform: `translateX(${xIn}px)` },\n { opacity: 1, transform: 'translateX(0px)' }\n ], { duration: 150, easing: 'ease', fill: 'forwards', delay: 50 }).finished;\n }\n getWrapper() {\n return this.shadowRoot?.querySelector('div');\n }\n};\nW3mRouter.styles = styles;\n__decorate([\n state()\n], W3mRouter.prototype, \"view\", void 0);\nW3mRouter = __decorate([\n customElement('w3m-router')\n], W3mRouter);\nexport { W3mRouter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n width: 100%;\n max-width: 360px;\n }\n\n :host > wui-flex > wui-flex {\n border-radius: var(--wui-border-radius-l);\n width: 100%;\n }\n\n .amounts-container {\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ModalController, OnRampController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst PAYMENT_CURRENCY_SYMBOLS = {\n USD: '$',\n EUR: '€',\n GBP: '£'\n};\nconst BUY_PRESET_AMOUNTS = [100, 250, 500, 1000];\nlet W3mOnrampWidget = class W3mOnrampWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.disabled = false;\n this.connected = AccountController.state.isConnected;\n this.loading = ModalController.state.loading;\n this.paymentCurrency = OnRampController.state.paymentCurrency;\n this.paymentAmount = OnRampController.state.paymentAmount;\n this.purchaseAmount = OnRampController.state.purchaseAmount;\n this.quoteLoading = OnRampController.state.quotesLoading;\n this.unsubscribe.push(...[\n AccountController.subscribeKey('isConnected', val => {\n this.connected = val;\n }),\n ModalController.subscribeKey('loading', val => {\n this.loading = val;\n }),\n OnRampController.subscribe(val => {\n this.paymentCurrency = val.paymentCurrency;\n this.paymentAmount = val.paymentAmount;\n this.purchaseAmount = val.purchaseAmount;\n this.quoteLoading = val.quotesLoading;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n \n \n \n \n ${BUY_PRESET_AMOUNTS.map(amount => html ` this.selectPresetAmount(amount)}\n >${`${PAYMENT_CURRENCY_SYMBOLS[this.paymentCurrency?.id || 'USD']} ${amount}`}`)}\n \n ${this.templateButton()}\n \n \n `;\n }\n templateButton() {\n return this.connected\n ? html `\n Get quotes\n `\n : html `\n Connect wallet\n `;\n }\n getQuotes() {\n if (!this.loading) {\n ModalController.open({ view: 'OnRampProviders' });\n }\n }\n openModal() {\n ModalController.open({ view: 'Connect' });\n }\n async onPaymentAmountChange(event) {\n OnRampController.setPaymentAmount(Number(event.detail));\n await OnRampController.getQuote();\n }\n async selectPresetAmount(amount) {\n OnRampController.setPaymentAmount(amount);\n await OnRampController.getQuote();\n }\n};\nW3mOnrampWidget.styles = styles;\n__decorate([\n property({ type: Boolean })\n], W3mOnrampWidget.prototype, \"disabled\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"connected\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"paymentCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"paymentAmount\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"purchaseAmount\", void 0);\n__decorate([\n state()\n], W3mOnrampWidget.prototype, \"quoteLoading\", void 0);\nW3mOnrampWidget = __decorate([\n customElement('w3m-onramp-widget')\n], W3mOnrampWidget);\nexport { W3mOnrampWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n wui-icon-link {\n margin-right: calc(var(--wui-icon-box-size-md) * -1);\n }\n\n .account-links {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .account-links wui-flex {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n background: red;\n align-items: center;\n justify-content: center;\n height: 48px;\n padding: 10px;\n flex: 1 0 0;\n\n border-radius: var(--XS, 16px);\n border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n .account-links wui-flex:hover {\n background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));\n }\n\n .account-links wui-flex wui-icon {\n width: var(--S, 20px);\n height: var(--S, 20px);\n }\n\n .account-links wui-flex wui-icon svg path {\n stroke: #47a1ff;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { Buffer } from 'buffer';\nif (typeof window !== 'undefined') {\n if (!window.Buffer) {\n window.Buffer = Buffer;\n }\n if (!window.global) {\n window.global = window;\n }\n if (!window.process) {\n window.process = {};\n }\n if (!window.process?.env) {\n window.process = { env: {} };\n }\n}\n//# sourceMappingURL=index.js.map","export const SECURE_SITE_SDK = process.env['NEXT_PUBLIC_SECURE_SITE_SDK_URL'] || 'https://secure.walletconnect.com/sdk';\nexport const W3mFrameConstants = {\n APP_EVENT_KEY: '@w3m-app/',\n FRAME_EVENT_KEY: '@w3m-frame/',\n RPC_METHOD_KEY: 'RPC_',\n STORAGE_KEY: '@w3m-storage/',\n SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',\n EMAIL_LOGIN_USED_KEY: 'EMAIL_LOGIN_USED_KEY',\n LAST_USED_CHAIN_KEY: 'LAST_USED_CHAIN_KEY',\n LAST_EMAIL_LOGIN_TIME: 'LAST_EMAIL_LOGIN_TIME',\n EMAIL: 'EMAIL',\n PREFERRED_ACCOUNT_TYPE: 'PREFERRED_ACCOUNT_TYPE',\n SMART_ACCOUNT_ENABLED: 'SMART_ACCOUNT_ENABLED',\n SMART_ACCOUNT_ENABLED_NETWORKS: 'SMART_ACCOUNT_ENABLED_NETWORKS',\n APP_SWITCH_NETWORK: '@w3m-app/SWITCH_NETWORK',\n APP_CONNECT_EMAIL: '@w3m-app/CONNECT_EMAIL',\n APP_CONNECT_DEVICE: '@w3m-app/CONNECT_DEVICE',\n APP_CONNECT_OTP: '@w3m-app/CONNECT_OTP',\n APP_GET_USER: '@w3m-app/GET_USER',\n APP_SIGN_OUT: '@w3m-app/SIGN_OUT',\n APP_IS_CONNECTED: '@w3m-app/IS_CONNECTED',\n APP_GET_CHAIN_ID: '@w3m-app/GET_CHAIN_ID',\n APP_RPC_REQUEST: '@w3m-app/RPC_REQUEST',\n APP_UPDATE_EMAIL: '@w3m-app/UPDATE_EMAIL',\n APP_UPDATE_EMAIL_PRIMARY_OTP: '@w3m-app/UPDATE_EMAIL_PRIMARY_OTP',\n APP_UPDATE_EMAIL_SECONDARY_OTP: '@w3m-app/UPDATE_EMAIL_SECONDARY_OTP',\n APP_AWAIT_UPDATE_EMAIL: '@w3m-app/AWAIT_UPDATE_EMAIL',\n APP_SYNC_THEME: '@w3m-app/SYNC_THEME',\n APP_SYNC_DAPP_DATA: '@w3m-app/SYNC_DAPP_DATA',\n APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS: '@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS',\n APP_INIT_SMART_ACCOUNT: '@w3m-app/INIT_SMART_ACCOUNT',\n APP_SET_PREFERRED_ACCOUNT: '@w3m-app/SET_PREFERRED_ACCOUNT',\n FRAME_SWITCH_NETWORK_ERROR: '@w3m-frame/SWITCH_NETWORK_ERROR',\n FRAME_SWITCH_NETWORK_SUCCESS: '@w3m-frame/SWITCH_NETWORK_SUCCESS',\n FRAME_CONNECT_EMAIL_ERROR: '@w3m-frame/CONNECT_EMAIL_ERROR',\n FRAME_CONNECT_EMAIL_SUCCESS: '@w3m-frame/CONNECT_EMAIL_SUCCESS',\n FRAME_CONNECT_DEVICE_ERROR: '@w3m-frame/CONNECT_DEVICE_ERROR',\n FRAME_CONNECT_DEVICE_SUCCESS: '@w3m-frame/CONNECT_DEVICE_SUCCESS',\n FRAME_CONNECT_OTP_SUCCESS: '@w3m-frame/CONNECT_OTP_SUCCESS',\n FRAME_CONNECT_OTP_ERROR: '@w3m-frame/CONNECT_OTP_ERROR',\n FRAME_GET_USER_SUCCESS: '@w3m-frame/GET_USER_SUCCESS',\n FRAME_GET_USER_ERROR: '@w3m-frame/GET_USER_ERROR',\n FRAME_SIGN_OUT_SUCCESS: '@w3m-frame/SIGN_OUT_SUCCESS',\n FRAME_SIGN_OUT_ERROR: '@w3m-frame/SIGN_OUT_ERROR',\n FRAME_IS_CONNECTED_SUCCESS: '@w3m-frame/IS_CONNECTED_SUCCESS',\n FRAME_IS_CONNECTED_ERROR: '@w3m-frame/IS_CONNECTED_ERROR',\n FRAME_GET_CHAIN_ID_SUCCESS: '@w3m-frame/GET_CHAIN_ID_SUCCESS',\n FRAME_GET_CHAIN_ID_ERROR: '@w3m-frame/GET_CHAIN_ID_ERROR',\n FRAME_RPC_REQUEST_SUCCESS: '@w3m-frame/RPC_REQUEST_SUCCESS',\n FRAME_RPC_REQUEST_ERROR: '@w3m-frame/RPC_REQUEST_ERROR',\n FRAME_SESSION_UPDATE: '@w3m-frame/SESSION_UPDATE',\n FRAME_UPDATE_EMAIL_SUCCESS: '@w3m-frame/UPDATE_EMAIL_SUCCESS',\n FRAME_UPDATE_EMAIL_ERROR: '@w3m-frame/UPDATE_EMAIL_ERROR',\n FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS: '@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS',\n FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR: '@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR',\n FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS: '@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS',\n FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR: '@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR',\n FRAME_SYNC_THEME_SUCCESS: '@w3m-frame/SYNC_THEME_SUCCESS',\n FRAME_SYNC_THEME_ERROR: '@w3m-frame/SYNC_THEME_ERROR',\n FRAME_SYNC_DAPP_DATA_SUCCESS: '@w3m-frame/SYNC_DAPP_DATA_SUCCESS',\n FRAME_SYNC_DAPP_DATA_ERROR: '@w3m-frame/SYNC_DAPP_DATA_ERROR',\n FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS: '@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS',\n FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR: '@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR',\n FRAME_INIT_SMART_ACCOUNT_SUCCESS: '@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS',\n FRAME_INIT_SMART_ACCOUNT_ERROR: '@w3m-frame/INIT_SMART_ACCOUNT_ERROR',\n FRAME_SET_PREFERRED_ACCOUNT_SUCCESS: '@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS',\n FRAME_SET_PREFERRED_ACCOUNT_ERROR: '@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR',\n RPC_RESPONSE_TYPE_ERROR: 'RPC_RESPONSE_ERROR',\n RPC_RESPONSE_TYPE_TX: 'RPC_RESPONSE_TRANSACTION_HASH',\n RPC_RESPONSE_TYPE_OBJECT: 'RPC_RESPONSE_OBJECT'\n};\nexport const W3mFrameRpcConstants = {\n SAFE_RPC_METHODS: [\n 'eth_accounts',\n 'eth_blockNumber',\n 'eth_call',\n 'eth_chainId',\n 'eth_estimateGas',\n 'eth_feeHistory',\n 'eth_gasPrice',\n 'eth_getAccount',\n 'eth_getBalance',\n 'eth_getBlockByHash',\n 'eth_getBlockByNumber',\n 'eth_getBlockReceipts',\n 'eth_getBlockTransactionCountByHash',\n 'eth_getBlockTransactionCountByNumber',\n 'eth_getCode',\n 'eth_getFilterChanges',\n 'eth_getFilterLogs',\n 'eth_getLogs',\n 'eth_getProof',\n 'eth_getStorageAt',\n 'eth_getTransactionByBlockHashAndIndex',\n 'eth_getTransactionByBlockNumberAndIndex',\n 'eth_getTransactionByHash',\n 'eth_getTransactionCount',\n 'eth_getTransactionReceipt',\n 'eth_getUncleCountByBlockHash',\n 'eth_getUncleCountByBlockNumber',\n 'eth_maxPriorityFeePerGas',\n 'eth_newBlockFilter',\n 'eth_newFilter',\n 'eth_newPendingTransactionFilter',\n 'eth_sendRawTransaction',\n 'eth_syncing',\n 'eth_uninstallFilter'\n ],\n NOT_SAFE_RPC_METHODS: ['personal_sign', 'eth_signTypedData_v4', 'eth_sendTransaction'],\n GET_CHAIN_ID: 'eth_chainId',\n RPC_METHOD_NOT_ALLOWED_MESSAGE: 'Requested RPC call is not allowed',\n RPC_METHOD_NOT_ALLOWED_UI_MESSAGE: 'Action not allowed',\n ACCOUNT_TYPES: {\n EOA: 'eoa',\n SMART_ACCOUNT: 'smartAccount'\n }\n};\n//# sourceMappingURL=W3mFrameConstants.js.map","import { z } from 'zod';\nimport { W3mFrameConstants } from './W3mFrameConstants.js';\nconst zError = z.object({ message: z.string() });\nfunction zType(key) {\n return z.literal(W3mFrameConstants[key]);\n}\nexport const GetTransactionByHashResponse = z.object({\n accessList: z.array(z.string()),\n blockHash: z.string().nullable(),\n blockNumber: z.string().nullable(),\n chainId: z.string(),\n from: z.string(),\n gas: z.string(),\n hash: z.string(),\n input: z.string().nullable(),\n maxFeePerGas: z.string(),\n maxPriorityFeePerGas: z.string(),\n nonce: z.string(),\n r: z.string(),\n s: z.string(),\n to: z.string(),\n transactionIndex: z.string().nullable(),\n type: z.string(),\n v: z.string(),\n value: z.string()\n});\nexport const AppSwitchNetworkRequest = z.object({ chainId: z.number() });\nexport const AppConnectEmailRequest = z.object({ email: z.string().email() });\nexport const AppConnectOtpRequest = z.object({ otp: z.string() });\nexport const AppGetUserRequest = z.object({\n chainId: z.optional(z.number()),\n preferredAccountType: z.optional(z.string())\n});\nexport const AppUpdateEmailRequest = z.object({ email: z.string().email() });\nexport const AppUpdateEmailPrimaryOtpRequest = z.object({ otp: z.string() });\nexport const AppUpdateEmailSecondaryOtpRequest = z.object({ otp: z.string() });\nexport const AppSyncThemeRequest = z.object({\n themeMode: z.optional(z.enum(['light', 'dark'])),\n themeVariables: z.optional(z.record(z.string(), z.string().or(z.number())))\n});\nexport const AppSyncDappDataRequest = z.object({\n metadata: z\n .object({\n name: z.string(),\n description: z.string(),\n url: z.string(),\n icons: z.array(z.string())\n })\n .optional(),\n sdkVersion: z.string(),\n projectId: z.string()\n});\nexport const AppSetPreferredAccountRequest = z.object({ type: z.string() });\nexport const FrameConnectEmailResponse = z.object({\n action: z.enum(['VERIFY_DEVICE', 'VERIFY_OTP'])\n});\nexport const FrameUpdateEmailResponse = z.object({\n action: z.enum(['VERIFY_PRIMARY_OTP', 'VERIFY_SECONDARY_OTP'])\n});\nexport const FrameGetUserResponse = z.object({\n email: z.string().email(),\n address: z.string(),\n chainId: z.number(),\n smartAccountDeployed: z.optional(z.boolean()),\n preferredAccountType: z.optional(z.string())\n});\nexport const FrameIsConnectedResponse = z.object({ isConnected: z.boolean() });\nexport const FrameGetChainIdResponse = z.object({ chainId: z.number() });\nexport const FrameSwitchNetworkResponse = z.object({ chainId: z.number() });\nexport const FrameUpdateEmailSecondaryOtpResolver = z.object({ newEmail: z.string().email() });\nexport const FrameGetSmartAccountEnabledNetworksResponse = z.object({\n smartAccountEnabledNetworks: z.array(z.number())\n});\nexport const FrameInitSmartAccountResponse = z.object({\n address: z.string(),\n isDeployed: z.boolean()\n});\nexport const FrameSetPreferredAccountResponse = z.object({ type: z.string(), address: z.string() });\nexport const RpcResponse = z.any();\nexport const RpcEthAccountsRequest = z.object({\n method: z.literal('eth_accounts')\n});\nexport const RpcEthBlockNumber = z.object({\n method: z.literal('eth_blockNumber')\n});\nexport const RpcEthCall = z.object({\n method: z.literal('eth_call'),\n params: z.array(z.any())\n});\nexport const RpcEthChainId = z.object({\n method: z.literal('eth_chainId')\n});\nexport const RpcEthEstimateGas = z.object({\n method: z.literal('eth_estimateGas'),\n params: z.array(z.any())\n});\nexport const RpcEthFeeHistory = z.object({\n method: z.literal('eth_feeHistory'),\n params: z.array(z.any())\n});\nexport const RpcEthGasPrice = z.object({\n method: z.literal('eth_gasPrice')\n});\nexport const RpcEthGetAccount = z.object({\n method: z.literal('eth_getAccount'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBalance = z.object({\n method: z.literal('eth_getBalance'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockyByHash = z.object({\n method: z.literal('eth_getBlockByHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockByNumber = z.object({\n method: z.literal('eth_getBlockByNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthGetBlockReceipts = z.object({\n method: z.literal('eth_getBlockReceipts'),\n params: z.array(z.any())\n});\nexport const RcpEthGetBlockTransactionCountByHash = z.object({\n method: z.literal('eth_getBlockTransactionCountByHash'),\n params: z.array(z.any())\n});\nexport const RcpEthGetBlockTransactionCountByNumber = z.object({\n method: z.literal('eth_getBlockTransactionCountByNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthGetCode = z.object({\n method: z.literal('eth_getCode'),\n params: z.array(z.any())\n});\nexport const RpcEthGetFilter = z.object({\n method: z.literal('eth_getFilterChanges'),\n params: z.array(z.any())\n});\nexport const RpcEthGetFilterLogs = z.object({\n method: z.literal('eth_getFilterLogs'),\n params: z.array(z.any())\n});\nexport const RpcEthGetLogs = z.object({\n method: z.literal('eth_getLogs'),\n params: z.array(z.any())\n});\nexport const RpcEthGetProof = z.object({\n method: z.literal('eth_getProof'),\n params: z.array(z.any())\n});\nexport const RpcEthGetStorageAt = z.object({\n method: z.literal('eth_getStorageAt'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByBlockHashAndIndex = z.object({\n method: z.literal('eth_getTransactionByBlockHashAndIndex'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByBlockNumberAndIndex = z.object({\n method: z.literal('eth_getTransactionByBlockNumberAndIndex'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionByHash = z.object({\n method: z.literal('eth_getTransactionByHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionCount = z.object({\n method: z.literal('eth_getTransactionCount'),\n params: z.array(z.any())\n});\nexport const RpcEthGetTransactionReceipt = z.object({\n method: z.literal('eth_getTransactionReceipt'),\n params: z.array(z.any())\n});\nexport const RpcEthGetUncleCountByBlockHash = z.object({\n method: z.literal('eth_getUncleCountByBlockHash'),\n params: z.array(z.any())\n});\nexport const RpcEthGetUncleCountByBlockNumber = z.object({\n method: z.literal('eth_getUncleCountByBlockNumber'),\n params: z.array(z.any())\n});\nexport const RpcEthMaxPriorityFeePerGas = z.object({\n method: z.literal('eth_maxPriorityFeePerGas')\n});\nexport const RpcEthNewBlockFilter = z.object({\n method: z.literal('eth_newBlockFilter')\n});\nexport const RpcEthNewFilter = z.object({\n method: z.literal('eth_newFilter'),\n params: z.array(z.any())\n});\nexport const RpcEthNewPendingTransactionFilter = z.object({\n method: z.literal('eth_newPendingTransactionFilter')\n});\nexport const RpcEthSendRawTransaction = z.object({\n method: z.literal('eth_sendRawTransaction'),\n params: z.array(z.any())\n});\nexport const RpcEthSyncing = z.object({\n method: z.literal('eth_syncing'),\n params: z.array(z.any())\n});\nexport const RpcUnistallFilter = z.object({\n method: z.literal('eth_uninstallFilter'),\n params: z.array(z.any())\n});\nexport const RpcPersonalSignRequest = z.object({\n method: z.literal('personal_sign'),\n params: z.array(z.any())\n});\nexport const RpcEthSignTypedDataV4 = z.object({\n method: z.literal('eth_signTypedData_v4'),\n params: z.array(z.any())\n});\nexport const RpcEthSendTransactionRequest = z.object({\n method: z.literal('eth_sendTransaction'),\n params: z.array(z.any())\n});\nexport const FrameSession = z.object({\n token: z.string()\n});\nexport const W3mFrameSchema = {\n appEvent: z\n .object({ type: zType('APP_SWITCH_NETWORK'), payload: AppSwitchNetworkRequest })\n .or(z.object({ type: zType('APP_CONNECT_EMAIL'), payload: AppConnectEmailRequest }))\n .or(z.object({ type: zType('APP_CONNECT_DEVICE') }))\n .or(z.object({ type: zType('APP_CONNECT_OTP'), payload: AppConnectOtpRequest }))\n .or(z.object({ type: zType('APP_GET_USER'), payload: z.optional(AppGetUserRequest) }))\n .or(z.object({ type: zType('APP_SIGN_OUT') }))\n .or(z.object({ type: zType('APP_IS_CONNECTED'), payload: z.optional(FrameSession) }))\n .or(z.object({ type: zType('APP_GET_CHAIN_ID') }))\n .or(z.object({ type: zType('APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS') }))\n .or(z.object({ type: zType('APP_INIT_SMART_ACCOUNT') }))\n .or(z.object({ type: zType('APP_SET_PREFERRED_ACCOUNT'), payload: AppSetPreferredAccountRequest }))\n .or(z.object({\n type: zType('APP_RPC_REQUEST'),\n payload: RpcPersonalSignRequest.or(RpcEthSendTransactionRequest)\n .or(RpcEthAccountsRequest)\n .or(RpcEthBlockNumber)\n .or(RpcEthCall)\n .or(RpcEthChainId)\n .or(RpcEthEstimateGas)\n .or(RpcEthFeeHistory)\n .or(RpcEthGasPrice)\n .or(RpcEthGetAccount)\n .or(RpcEthGetBalance)\n .or(RpcEthGetBlockyByHash)\n .or(RpcEthGetBlockByNumber)\n .or(RpcEthGetBlockReceipts)\n .or(RcpEthGetBlockTransactionCountByHash)\n .or(RcpEthGetBlockTransactionCountByNumber)\n .or(RpcEthGetCode)\n .or(RpcEthGetFilter)\n .or(RpcEthGetFilterLogs)\n .or(RpcEthGetLogs)\n .or(RpcEthGetProof)\n .or(RpcEthGetStorageAt)\n .or(RpcEthGetTransactionByBlockHashAndIndex)\n .or(RpcEthGetTransactionByBlockNumberAndIndex)\n .or(RpcEthGetTransactionByHash)\n .or(RpcEthGetTransactionCount)\n .or(RpcEthGetTransactionReceipt)\n .or(RpcEthGetUncleCountByBlockHash)\n .or(RpcEthGetUncleCountByBlockNumber)\n .or(RpcEthMaxPriorityFeePerGas)\n .or(RpcEthNewBlockFilter)\n .or(RpcEthNewFilter)\n .or(RpcEthNewPendingTransactionFilter)\n .or(RpcEthSendRawTransaction)\n .or(RpcEthSyncing)\n .or(RpcUnistallFilter)\n .or(RpcPersonalSignRequest)\n .or(RpcEthSignTypedDataV4)\n .or(RpcEthSendTransactionRequest)\n }))\n .or(z.object({ type: zType('APP_UPDATE_EMAIL'), payload: AppUpdateEmailRequest }))\n .or(z.object({\n type: zType('APP_UPDATE_EMAIL_PRIMARY_OTP'),\n payload: AppUpdateEmailPrimaryOtpRequest\n }))\n .or(z.object({\n type: zType('APP_UPDATE_EMAIL_SECONDARY_OTP'),\n payload: AppUpdateEmailSecondaryOtpRequest\n }))\n .or(z.object({ type: zType('APP_SYNC_THEME'), payload: AppSyncThemeRequest }))\n .or(z.object({ type: zType('APP_SYNC_DAPP_DATA'), payload: AppSyncDappDataRequest })),\n frameEvent: z\n .object({ type: zType('FRAME_SWITCH_NETWORK_ERROR'), payload: zError })\n .or(z.object({ type: zType('FRAME_SWITCH_NETWORK_SUCCESS'), payload: FrameSwitchNetworkResponse }))\n .or(z.object({ type: zType('FRAME_CONNECT_EMAIL_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_EMAIL_SUCCESS'), payload: FrameConnectEmailResponse }))\n .or(z.object({ type: zType('FRAME_CONNECT_OTP_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_OTP_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_CONNECT_DEVICE_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_CONNECT_DEVICE_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_GET_USER_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_GET_USER_SUCCESS'), payload: FrameGetUserResponse }))\n .or(z.object({ type: zType('FRAME_SIGN_OUT_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SIGN_OUT_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_IS_CONNECTED_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_IS_CONNECTED_SUCCESS'), payload: FrameIsConnectedResponse }))\n .or(z.object({ type: zType('FRAME_GET_CHAIN_ID_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_GET_CHAIN_ID_SUCCESS'), payload: FrameGetChainIdResponse }))\n .or(z.object({ type: zType('FRAME_RPC_REQUEST_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_RPC_REQUEST_SUCCESS'), payload: RpcResponse }))\n .or(z.object({ type: zType('FRAME_SESSION_UPDATE'), payload: FrameSession }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_SUCCESS'), payload: FrameUpdateEmailResponse }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR'), payload: zError }))\n .or(z.object({\n type: zType('FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS'),\n payload: FrameUpdateEmailSecondaryOtpResolver\n }))\n .or(z.object({ type: zType('FRAME_SYNC_THEME_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SYNC_THEME_SUCCESS') }))\n .or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_ERROR'), payload: zError }))\n .or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_SUCCESS') }))\n .or(z.object({\n type: zType('FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS'),\n payload: FrameGetSmartAccountEnabledNetworksResponse\n }))\n .or(z.object({\n type: zType('FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR'),\n payload: zError\n }))\n .or(z.object({ type: zType('FRAME_INIT_SMART_ACCOUNT_ERROR'), payload: zError }))\n .or(z.object({\n type: zType('FRAME_SET_PREFERRED_ACCOUNT_SUCCESS'),\n payload: FrameSetPreferredAccountResponse\n }))\n .or(z.object({ type: zType('FRAME_SET_PREFERRED_ACCOUNT_ERROR'), payload: zError }))\n};\n//# sourceMappingURL=W3mFrameSchema.js.map","import { W3mFrameConstants } from './W3mFrameConstants.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport const W3mFrameStorage = {\n set(key, value) {\n if (W3mFrameHelpers.isClient) {\n localStorage.setItem(`${W3mFrameConstants.STORAGE_KEY}${key}`, value);\n }\n },\n get(key) {\n if (W3mFrameHelpers.isClient) {\n return localStorage.getItem(`${W3mFrameConstants.STORAGE_KEY}${key}`);\n }\n return null;\n },\n delete(key) {\n if (W3mFrameHelpers.isClient) {\n localStorage.removeItem(`${W3mFrameConstants.STORAGE_KEY}${key}`);\n }\n }\n};\n//# sourceMappingURL=W3mFrameStorage.js.map","export const RegexUtil = {\n address: /^0x(?:[A-Fa-f0-9]{40})$/u,\n transactionHash: /^0x(?:[A-Fa-f0-9]{64})$/u,\n signedMessage: /^0x(?:[A-Fa-f0-9]{130})$/u\n};\n//# sourceMappingURL=RegexUtil.js.map","import { W3mFrameStorage } from './W3mFrameStorage.js';\nimport { W3mFrameConstants, W3mFrameRpcConstants } from './W3mFrameConstants.js';\nimport { RegexUtil } from './RegexUtil.js';\nconst RESTRICTED_TIMEZONES = [\n 'ASIA/SHANGHAI',\n 'ASIA/URUMQI',\n 'ASIA/CHONGQING',\n 'ASIA/HARBIN',\n 'ASIA/KASHGAR',\n 'ASIA/MACAU',\n 'ASIA/HONG_KONG',\n 'ASIA/MACAO',\n 'ASIA/BEIJING',\n 'ASIA/HARBIN'\n];\nconst EMAIL_MINIMUM_TIMEOUT = 30 * 1000;\nexport const W3mFrameHelpers = {\n getBlockchainApiUrl() {\n try {\n const { timeZone } = new Intl.DateTimeFormat().resolvedOptions();\n const capTimeZone = timeZone.toUpperCase();\n return RESTRICTED_TIMEZONES.includes(capTimeZone)\n ? 'https://rpc.walletconnect.org'\n : 'https://rpc.walletconnect.com';\n }\n catch {\n return false;\n }\n },\n checkIfAllowedToTriggerEmail() {\n const lastEmailLoginTime = W3mFrameStorage.get(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n if (lastEmailLoginTime) {\n const difference = Date.now() - Number(lastEmailLoginTime);\n if (difference < EMAIL_MINIMUM_TIMEOUT) {\n const cooldownSec = Math.ceil((EMAIL_MINIMUM_TIMEOUT - difference) / 1000);\n throw new Error(`Please try again after ${cooldownSec} seconds`);\n }\n }\n },\n getTimeToNextEmailLogin() {\n const lastEmailLoginTime = W3mFrameStorage.get(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n if (lastEmailLoginTime) {\n const difference = Date.now() - Number(lastEmailLoginTime);\n if (difference < EMAIL_MINIMUM_TIMEOUT) {\n return Math.ceil((EMAIL_MINIMUM_TIMEOUT - difference) / 1000);\n }\n }\n return 0;\n },\n checkIfRequestExists(request) {\n const method = this.getRequestMethod(request);\n return (W3mFrameRpcConstants.NOT_SAFE_RPC_METHODS.includes(method) ||\n W3mFrameRpcConstants.SAFE_RPC_METHODS.includes(method));\n },\n getRequestMethod(request) {\n return request?.payload?.method;\n },\n getResponseType(response) {\n const { type, payload } = response;\n const isError = type === W3mFrameConstants.FRAME_RPC_REQUEST_ERROR;\n if (isError) {\n return W3mFrameConstants.RPC_RESPONSE_TYPE_ERROR;\n }\n const isPayloadString = typeof payload === 'string';\n const isTransactionHash = isPayloadString &&\n (payload.match(RegexUtil.transactionHash) || payload.match(RegexUtil.signedMessage));\n if (isTransactionHash) {\n return W3mFrameConstants.RPC_RESPONSE_TYPE_TX;\n }\n return W3mFrameConstants.RPC_RESPONSE_TYPE_OBJECT;\n },\n checkIfRequestIsAllowed(request) {\n const method = this.getRequestMethod(request);\n return W3mFrameRpcConstants.SAFE_RPC_METHODS.includes(method);\n },\n isClient: typeof window !== 'undefined'\n};\n//# sourceMappingURL=W3mFrameHelpers.js.map","import { SECURE_SITE_SDK, W3mFrameConstants } from './W3mFrameConstants.js';\nimport { W3mFrameSchema } from './W3mFrameSchema.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport class W3mFrame {\n constructor(projectId, isAppClient = false) {\n this.iframe = null;\n this.rpcUrl = W3mFrameHelpers.getBlockchainApiUrl();\n this.events = {\n onFrameEvent: (callback) => {\n if (W3mFrameHelpers.isClient) {\n window.addEventListener('message', ({ data }) => {\n if (!data.type?.includes(W3mFrameConstants.FRAME_EVENT_KEY)) {\n return;\n }\n const frameEvent = W3mFrameSchema.frameEvent.parse(data);\n callback(frameEvent);\n });\n }\n },\n onAppEvent: (callback) => {\n if (W3mFrameHelpers.isClient) {\n window.addEventListener('message', ({ data }) => {\n if (!data.type?.includes(W3mFrameConstants.APP_EVENT_KEY)) {\n return;\n }\n const appEvent = W3mFrameSchema.appEvent.parse(data);\n callback(appEvent);\n });\n }\n },\n postAppEvent: (event) => {\n if (W3mFrameHelpers.isClient) {\n if (!this.iframe?.contentWindow) {\n throw new Error('W3mFrame: iframe is not set');\n }\n W3mFrameSchema.appEvent.parse(event);\n window.postMessage(event);\n this.iframe.contentWindow.postMessage(event, '*');\n }\n },\n postFrameEvent: (event) => {\n if (W3mFrameHelpers.isClient) {\n if (!parent) {\n throw new Error('W3mFrame: parent is not set');\n }\n W3mFrameSchema.frameEvent.parse(event);\n parent.postMessage(event, '*');\n }\n }\n };\n this.projectId = projectId;\n this.frameLoadPromise = new Promise((resolve, reject) => {\n this.frameLoadPromiseResolver = { resolve, reject };\n });\n if (isAppClient) {\n this.frameLoadPromise = new Promise((resolve, reject) => {\n this.frameLoadPromiseResolver = { resolve, reject };\n });\n if (W3mFrameHelpers.isClient) {\n const iframe = document.createElement('iframe');\n iframe.id = 'w3m-iframe';\n iframe.src = `${SECURE_SITE_SDK}?projectId=${projectId}`;\n iframe.style.position = 'fixed';\n iframe.style.zIndex = '999999';\n iframe.style.display = 'none';\n iframe.style.borderBottomLeftRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.borderBottomRightRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.opacity = '0';\n iframe.style.borderBottomLeftRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n iframe.style.borderBottomRightRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`;\n document.body.appendChild(iframe);\n this.iframe = iframe;\n this.iframe.onload = () => {\n this.frameLoadPromiseResolver?.resolve(undefined);\n };\n this.iframe.onerror = () => {\n this.frameLoadPromiseResolver?.reject('Unable to load email login dependency');\n };\n }\n }\n }\n get networks() {\n const data = [\n 1, 5, 11155111, 10, 420, 42161, 421613, 137, 80001, 42220, 1313161554, 1313161555, 56, 97,\n 43114, 43113, 324, 280, 100, 8453, 84531, 7777777, 999\n ].map(id => ({\n [id]: {\n rpcUrl: `${this.rpcUrl}/v1/?chainId=eip155:${id}&projectId=${this.projectId}`,\n chainId: id\n }\n }));\n return Object.assign({}, ...data);\n }\n}\n//# sourceMappingURL=W3mFrame.js.map","import { W3mFrame } from './W3mFrame.js';\nimport { W3mFrameConstants, W3mFrameRpcConstants } from './W3mFrameConstants.js';\nimport { W3mFrameStorage } from './W3mFrameStorage.js';\nimport { W3mFrameHelpers } from './W3mFrameHelpers.js';\nexport class W3mFrameProvider {\n constructor(projectId) {\n this.connectEmailResolver = undefined;\n this.connectDeviceResolver = undefined;\n this.connectOtpResolver = undefined;\n this.connectResolver = undefined;\n this.disconnectResolver = undefined;\n this.isConnectedResolver = undefined;\n this.getChainIdResolver = undefined;\n this.switchChainResolver = undefined;\n this.rpcRequestResolver = undefined;\n this.updateEmailResolver = undefined;\n this.updateEmailPrimaryOtpResolver = undefined;\n this.updateEmailSecondaryOtpResolver = undefined;\n this.syncThemeResolver = undefined;\n this.syncDappDataResolver = undefined;\n this.smartAccountEnabledNetworksResolver = undefined;\n this.setPreferredAccountResolver = undefined;\n this.w3mFrame = new W3mFrame(projectId, true);\n this.w3mFrame.events.onFrameEvent(event => {\n console.log('💻 received', event);\n switch (event.type) {\n case W3mFrameConstants.FRAME_CONNECT_EMAIL_SUCCESS:\n return this.onConnectEmailSuccess(event);\n case W3mFrameConstants.FRAME_CONNECT_EMAIL_ERROR:\n return this.onConnectEmailError(event);\n case W3mFrameConstants.FRAME_CONNECT_DEVICE_SUCCESS:\n return this.onConnectDeviceSuccess();\n case W3mFrameConstants.FRAME_CONNECT_DEVICE_ERROR:\n return this.onConnectDeviceError(event);\n case W3mFrameConstants.FRAME_CONNECT_OTP_SUCCESS:\n return this.onConnectOtpSuccess();\n case W3mFrameConstants.FRAME_CONNECT_OTP_ERROR:\n return this.onConnectOtpError(event);\n case W3mFrameConstants.FRAME_GET_USER_SUCCESS:\n return this.onConnectSuccess(event);\n case W3mFrameConstants.FRAME_GET_USER_ERROR:\n return this.onConnectError(event);\n case W3mFrameConstants.FRAME_IS_CONNECTED_SUCCESS:\n return this.onIsConnectedSuccess(event);\n case W3mFrameConstants.FRAME_IS_CONNECTED_ERROR:\n return this.onIsConnectedError(event);\n case W3mFrameConstants.FRAME_GET_CHAIN_ID_SUCCESS:\n return this.onGetChainIdSuccess(event);\n case W3mFrameConstants.FRAME_GET_CHAIN_ID_ERROR:\n return this.onGetChainIdError(event);\n case W3mFrameConstants.FRAME_SIGN_OUT_SUCCESS:\n return this.onSignOutSuccess();\n case W3mFrameConstants.FRAME_SIGN_OUT_ERROR:\n return this.onSignOutError(event);\n case W3mFrameConstants.FRAME_SWITCH_NETWORK_SUCCESS:\n return this.onSwitchChainSuccess(event);\n case W3mFrameConstants.FRAME_SWITCH_NETWORK_ERROR:\n return this.onSwitchChainError(event);\n case W3mFrameConstants.FRAME_RPC_REQUEST_SUCCESS:\n return this.onRpcRequestSuccess(event);\n case W3mFrameConstants.FRAME_RPC_REQUEST_ERROR:\n return this.onRpcRequestError(event);\n case W3mFrameConstants.FRAME_SESSION_UPDATE:\n return this.onSessionUpdate(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SUCCESS:\n return this.onUpdateEmailSuccess(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_ERROR:\n return this.onUpdateEmailError(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:\n return this.onUpdateEmailPrimaryOtpSuccess();\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:\n return this.onUpdateEmailPrimaryOtpError(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:\n return this.onUpdateEmailSecondaryOtpSuccess(event);\n case W3mFrameConstants.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:\n return this.onUpdateEmailSecondaryOtpError(event);\n case W3mFrameConstants.FRAME_SYNC_THEME_SUCCESS:\n return this.onSyncThemeSuccess();\n case W3mFrameConstants.FRAME_SYNC_THEME_ERROR:\n return this.onSyncThemeError(event);\n case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_SUCCESS:\n return this.onSyncDappDataSuccess();\n case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_ERROR:\n return this.onSyncDappDataError(event);\n case W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:\n return this.onSmartAccountEnabledNetworksSuccess(event);\n case W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:\n return this.onSmartAccountEnabledNetworksError(event);\n case W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:\n return this.onSetPreferredAccountSuccess();\n case W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_ERROR:\n return this.onSetPreferredAccountError();\n default:\n return null;\n }\n });\n }\n getLoginEmailUsed() {\n return Boolean(W3mFrameStorage.get(W3mFrameConstants.EMAIL_LOGIN_USED_KEY));\n }\n getEmail() {\n return W3mFrameStorage.get(W3mFrameConstants.EMAIL);\n }\n rejectRpcRequest() {\n this.rpcRequestResolver?.reject();\n }\n async connectEmail(payload) {\n await this.w3mFrame.frameLoadPromise;\n W3mFrameHelpers.checkIfAllowedToTriggerEmail();\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_EMAIL, payload });\n return new Promise((resolve, reject) => {\n this.connectEmailResolver = { resolve, reject };\n });\n }\n async connectDevice() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_DEVICE });\n return new Promise((resolve, reject) => {\n this.connectDeviceResolver = { resolve, reject };\n });\n }\n async connectOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_OTP, payload });\n return new Promise((resolve, reject) => {\n this.connectOtpResolver = { resolve, reject };\n });\n }\n async isConnected() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_IS_CONNECTED,\n payload: undefined\n });\n return new Promise((resolve, reject) => {\n this.isConnectedResolver = { resolve, reject };\n });\n }\n async getChainId() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_GET_CHAIN_ID });\n return new Promise((resolve, reject) => {\n this.getChainIdResolver = { resolve, reject };\n });\n }\n async updateEmail(payload) {\n await this.w3mFrame.frameLoadPromise;\n W3mFrameHelpers.checkIfAllowedToTriggerEmail();\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_UPDATE_EMAIL, payload });\n return new Promise((resolve, reject) => {\n this.updateEmailResolver = { resolve, reject };\n });\n }\n async updateEmailPrimaryOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_UPDATE_EMAIL_PRIMARY_OTP,\n payload\n });\n return new Promise((resolve, reject) => {\n this.updateEmailPrimaryOtpResolver = { resolve, reject };\n });\n }\n async updateEmailSecondaryOtp(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_UPDATE_EMAIL_SECONDARY_OTP,\n payload\n });\n return new Promise((resolve, reject) => {\n this.updateEmailSecondaryOtpResolver = { resolve, reject };\n });\n }\n async syncTheme(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SYNC_THEME, payload });\n return new Promise((resolve, reject) => {\n this.syncThemeResolver = { resolve, reject };\n });\n }\n async syncDappData(payload) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SYNC_DAPP_DATA, payload });\n return new Promise((resolve, reject) => {\n this.syncDappDataResolver = { resolve, reject };\n });\n }\n async getSmartAccountEnabledNetworks() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS\n });\n return new Promise((resolve, reject) => {\n this.smartAccountEnabledNetworksResolver = { resolve, reject };\n });\n }\n async setPreferredAccount(type) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_SET_PREFERRED_ACCOUNT,\n payload: { type }\n });\n return new Promise((resolve, reject) => {\n this.setPreferredAccountResolver = { resolve, reject };\n });\n }\n async connect(payload) {\n const chainId = payload?.chainId ?? this.getLastUsedChainId() ?? 1;\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_GET_USER,\n payload: { chainId }\n });\n return new Promise((resolve, reject) => {\n this.connectResolver = { resolve, reject };\n });\n }\n async switchNetwork(chainId) {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_SWITCH_NETWORK,\n payload: { chainId }\n });\n return new Promise((resolve, reject) => {\n this.switchChainResolver = { resolve, reject };\n });\n }\n async disconnect() {\n await this.w3mFrame.frameLoadPromise;\n this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SIGN_OUT });\n return new Promise((resolve, reject) => {\n this.disconnectResolver = { resolve, reject };\n });\n }\n async request(req) {\n await this.w3mFrame.frameLoadPromise;\n if (W3mFrameRpcConstants.GET_CHAIN_ID === req.method) {\n return this.getLastUsedChainId();\n }\n this.w3mFrame.events.postAppEvent({\n type: W3mFrameConstants.APP_RPC_REQUEST,\n payload: req\n });\n return new Promise((resolve, reject) => {\n this.rpcRequestResolver = { resolve, reject };\n });\n }\n onRpcRequest(callback) {\n this.w3mFrame.events.onAppEvent(event => {\n if (event.type.includes(W3mFrameConstants.RPC_METHOD_KEY)) {\n callback(event);\n }\n });\n }\n onRpcResponse(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type.includes(W3mFrameConstants.RPC_METHOD_KEY)) {\n callback(event);\n }\n });\n }\n onIsConnected(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_GET_USER_SUCCESS) {\n callback(event.payload);\n }\n });\n }\n onNotConnected(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_IS_CONNECTED_ERROR) {\n callback();\n }\n if (event.type === W3mFrameConstants.FRAME_IS_CONNECTED_SUCCESS &&\n !event.payload.isConnected) {\n callback();\n }\n });\n }\n onSetPreferredAccount(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS) {\n callback(event.payload);\n }\n else if (event.type === W3mFrameConstants.FRAME_SET_PREFERRED_ACCOUNT_ERROR) {\n callback({ type: W3mFrameRpcConstants.ACCOUNT_TYPES.EOA });\n }\n });\n }\n onGetSmartAccountEnabledNetworks(callback) {\n this.w3mFrame.events.onFrameEvent(event => {\n if (event.type === W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS) {\n callback(event.payload.smartAccountEnabledNetworks);\n }\n else if (event.type === W3mFrameConstants.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR) {\n callback([]);\n }\n });\n }\n onConnectEmailSuccess(event) {\n this.connectEmailResolver?.resolve(event.payload);\n this.setNewLastEmailLoginTime();\n }\n onConnectEmailError(event) {\n this.connectEmailResolver?.reject(event.payload.message);\n }\n onConnectDeviceSuccess() {\n this.connectDeviceResolver?.resolve(undefined);\n }\n onConnectDeviceError(event) {\n this.connectDeviceResolver?.reject(event.payload.message);\n }\n onConnectOtpSuccess() {\n this.connectOtpResolver?.resolve(undefined);\n }\n onConnectOtpError(event) {\n this.connectOtpResolver?.reject(event.payload.message);\n }\n onConnectSuccess(event) {\n this.setEmailLoginSuccess(event.payload.email);\n this.setLastUsedChainId(event.payload.chainId);\n this.connectResolver?.resolve(event.payload);\n }\n onConnectError(event) {\n this.connectResolver?.reject(event.payload.message);\n }\n onIsConnectedSuccess(event) {\n if (!event.payload.isConnected) {\n this.deleteEmailLoginCache();\n }\n this.isConnectedResolver?.resolve(event.payload);\n }\n onIsConnectedError(event) {\n this.isConnectedResolver?.reject(event.payload.message);\n }\n onGetChainIdSuccess(event) {\n this.setLastUsedChainId(event.payload.chainId);\n this.getChainIdResolver?.resolve(event.payload);\n }\n onGetChainIdError(event) {\n this.getChainIdResolver?.reject(event.payload.message);\n }\n onSignOutSuccess() {\n this.disconnectResolver?.resolve(undefined);\n this.deleteEmailLoginCache();\n }\n onSignOutError(event) {\n this.disconnectResolver?.reject(event.payload.message);\n }\n onSwitchChainSuccess(event) {\n this.setLastUsedChainId(event.payload.chainId);\n this.switchChainResolver?.resolve(event.payload);\n }\n onSwitchChainError(event) {\n this.switchChainResolver?.reject(event.payload.message);\n }\n onRpcRequestSuccess(event) {\n this.rpcRequestResolver?.resolve(event.payload);\n }\n onRpcRequestError(event) {\n this.rpcRequestResolver?.reject(event.payload.message);\n }\n onSessionUpdate(event) {\n const { payload } = event;\n if (payload) {\n }\n }\n onUpdateEmailSuccess(event) {\n this.updateEmailResolver?.resolve(event.payload);\n this.setNewLastEmailLoginTime();\n }\n onUpdateEmailError(event) {\n this.updateEmailResolver?.reject(event.payload.message);\n }\n onUpdateEmailPrimaryOtpSuccess() {\n this.updateEmailPrimaryOtpResolver?.resolve(undefined);\n }\n onUpdateEmailPrimaryOtpError(event) {\n this.updateEmailPrimaryOtpResolver?.reject(event.payload.message);\n }\n onUpdateEmailSecondaryOtpSuccess(event) {\n const { newEmail } = event.payload;\n this.setEmailLoginSuccess(newEmail);\n this.updateEmailSecondaryOtpResolver?.resolve({ newEmail });\n }\n onUpdateEmailSecondaryOtpError(event) {\n this.updateEmailSecondaryOtpResolver?.reject(event.payload.message);\n }\n onSyncThemeSuccess() {\n this.syncThemeResolver?.resolve(undefined);\n }\n onSyncThemeError(event) {\n this.syncThemeResolver?.reject(event.payload.message);\n }\n onSyncDappDataSuccess() {\n this.syncDappDataResolver?.resolve(undefined);\n }\n onSyncDappDataError(event) {\n this.syncDappDataResolver?.reject(event.payload.message);\n }\n onSmartAccountEnabledNetworksSuccess(event) {\n this.persistSmartAccountEnabledNetworks(event.payload.smartAccountEnabledNetworks);\n this.smartAccountEnabledNetworksResolver?.resolve(event.payload);\n }\n onSmartAccountEnabledNetworksError(event) {\n this.persistSmartAccountEnabledNetworks([]);\n this.smartAccountEnabledNetworksResolver?.reject(event.payload.message);\n }\n onSetPreferredAccountSuccess() {\n this.setPreferredAccountResolver?.resolve(undefined);\n }\n onSetPreferredAccountError() {\n this.setPreferredAccountResolver?.reject();\n }\n setNewLastEmailLoginTime() {\n W3mFrameStorage.set(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME, Date.now().toString());\n }\n setEmailLoginSuccess(email) {\n W3mFrameStorage.set(W3mFrameConstants.EMAIL, email);\n W3mFrameStorage.set(W3mFrameConstants.EMAIL_LOGIN_USED_KEY, 'true');\n W3mFrameStorage.delete(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME);\n }\n deleteEmailLoginCache() {\n W3mFrameStorage.delete(W3mFrameConstants.EMAIL_LOGIN_USED_KEY);\n W3mFrameStorage.delete(W3mFrameConstants.EMAIL);\n W3mFrameStorage.delete(W3mFrameConstants.LAST_USED_CHAIN_KEY);\n }\n setLastUsedChainId(chainId) {\n W3mFrameStorage.set(W3mFrameConstants.LAST_USED_CHAIN_KEY, String(chainId));\n }\n getLastUsedChainId() {\n return Number(W3mFrameStorage.get(W3mFrameConstants.LAST_USED_CHAIN_KEY));\n }\n persistSmartAccountEnabledNetworks(networks) {\n W3mFrameStorage.set(W3mFrameConstants.SMART_ACCOUNT_ENABLED_NETWORKS, networks.join(','));\n }\n}\n//# sourceMappingURL=W3mFrameProvider.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ConnectionController, AssetController, CoreHelperUtil, EventsController, ModalController, NetworkController, RouterController, SnackController, StorageUtil, ConnectorController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mAccountSettingsView = class W3mAccountSettingsView extends LitElement {\n constructor() {\n super();\n this.usubscribe = [];\n this.networkImages = AssetController.state.networkImages;\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.disconnecting = false;\n this.loading = false;\n this.usubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n ModalController.close();\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.usubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-settings-view: No account provided');\n }\n const networkImage = this.networkImages[this.network?.imageId ?? ''];\n return html `\n \n \n \n \n \n ${this.profileName\n ? UiHelperUtil.getTruncateString({\n string: this.profileName,\n charsStart: 20,\n charsEnd: 0,\n truncate: 'end'\n })\n : UiHelperUtil.getTruncateString({\n string: this.address,\n charsStart: 4,\n charsEnd: 6,\n truncate: 'middle'\n })}\n \n \n \n \n \n\n \n \n ${this.emailBtnTemplate()}\n \n \n ${this.network?.name ?? 'Unknown'}\n \n \n ${this.togglePreferredAccountBtnTemplate()}\n \n Disconnect\n \n \n \n `;\n }\n isAllowedNetworkSwitch() {\n const { requestedCaipNetworks } = NetworkController.state;\n const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;\n const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id);\n return isMultiNetwork || !isValidNetwork;\n }\n onCopyAddress() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n emailBtnTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL') {\n return null;\n }\n const email = emailConnector.provider.getEmail() ?? '';\n return html `\n this.onGoToUpdateEmail(email)}\n >\n ${email}\n \n `;\n }\n togglePreferredAccountBtnTemplate() {\n const networkEnabled = NetworkController.checkIfSmartAccountEnabled();\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL' || !networkEnabled) {\n return null;\n }\n const text = this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT\n ? 'Switch to your EOA'\n : 'Switch to your smart account';\n return html `\n \n ${text}\n \n `;\n }\n async changePreferredAccountType() {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n const accountTypeTarget = this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT ||\n !smartAccountEnabled\n ? W3mFrameRpcConstants.ACCOUNT_TYPES.EOA\n : W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n return;\n }\n this.loading = true;\n await emailConnector?.provider.setPreferredAccount(accountTypeTarget);\n this.loading = false;\n this.requestUpdate();\n }\n onGoToUpdateEmail(email) {\n RouterController.push('UpdateEmailWallet', { email });\n }\n onNetworks() {\n if (this.isAllowedNetworkSwitch()) {\n RouterController.push('Networks');\n }\n }\n async onDisconnect() {\n try {\n this.disconnecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_SUCCESS' });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconnecting = false;\n }\n }\n};\nW3mAccountSettingsView.styles = styles;\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"preferredAccountType\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"disconnecting\", void 0);\n__decorate([\n state()\n], W3mAccountSettingsView.prototype, \"loading\", void 0);\nW3mAccountSettingsView = __decorate([\n customElement('w3m-account-settings-view')\n], W3mAccountSettingsView);\nexport { W3mAccountSettingsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nlet W3mAccountView = class W3mAccountView extends LitElement {\n render() {\n const type = StorageUtil.getConnectedConnector();\n return html `\n ${OptionsController.state.enableWalletFeatures && type === 'EMAIL'\n ? this.walletFeaturesTemplate()\n : this.defaultTemplate()}\n `;\n }\n walletFeaturesTemplate() {\n return html ``;\n }\n defaultTemplate() {\n return html ``;\n }\n};\nW3mAccountView = __decorate([\n customElement('w3m-account-view')\n], W3mAccountView);\nexport { W3mAccountView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mAllWalletsView = class W3mAllWalletsView extends LitElement {\n constructor() {\n super(...arguments);\n this.search = '';\n this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {\n this.search = value;\n });\n }\n render() {\n const isSearch = this.search.length >= 2;\n return html `\n \n \n ${this.qrButtonTemplate()}\n \n ${isSearch\n ? html ``\n : html ``}\n `;\n }\n onInputChange(event) {\n this.onDebouncedSearch(event.detail);\n }\n qrButtonTemplate() {\n if (CoreHelperUtil.isMobile()) {\n return html `\n \n `;\n }\n return null;\n }\n onWalletConnectQr() {\n RouterController.push('ConnectingWalletConnect');\n }\n};\n__decorate([\n state()\n], W3mAllWalletsView.prototype, \"search\", void 0);\nW3mAllWalletsView = __decorate([\n customElement('w3m-all-wallets-view')\n], W3mAllWalletsView);\nexport { W3mAllWalletsView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-thumbnail {\n position: absolute;\n }\n\n wui-visual {\n width: var(--wui-wallet-image-size-lg);\n height: var(--wui-wallet-image-size-lg);\n border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));\n position: relative;\n overflow: hidden;\n }\n\n wui-visual::after {\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n inset: 0;\n border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n }\n\n wui-icon-box {\n position: absolute;\n right: calc(var(--wui-spacing-3xs) * -1);\n bottom: calc(var(--wui-spacing-3xs) * -1);\n opacity: 0;\n transform: scale(0.5);\n transition:\n opacity var(--wui-ease-out-power-2) var(--wui-duration-lg),\n transform var(--wui-ease-out-power-2) var(--wui-duration-lg);\n will-change: opacity, transform;\n }\n\n wui-text[align='center'] {\n width: 100%;\n padding: 0px var(--wui-spacing-l);\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n [data-retry='false'] wui-link {\n display: none;\n }\n\n [data-retry='true'] wui-link {\n display: block;\n opacity: 1;\n }\n\n wui-link {\n padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ConnectionController, CoreHelperUtil, OnRampController, RouterController, SnackController, ThemeController, BlockchainApiController, OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mBuyInProgressView = class W3mBuyInProgressView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedOnRampProvider = OnRampController.state.selectedProvider;\n this.uri = ConnectionController.state.wcUri;\n this.ready = false;\n this.showRetry = false;\n this.buffering = false;\n this.error = false;\n this.startTime = null;\n this.isMobile = false;\n this.onRetry = undefined;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('selectedProvider', val => {\n this.selectedOnRampProvider = val;\n })\n ]);\n this.watchTransactions();\n }\n disconnectedCallback() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n render() {\n let label = 'Continue in external window';\n if (this.error) {\n label = 'Buy failed';\n }\n else if (this.selectedOnRampProvider) {\n label = `Buy in ${this.selectedOnRampProvider?.label}`;\n }\n const subLabel = this.error\n ? 'Buy can be declined from your side or due to and error on the provider app'\n : `We’ll notify you once your Buy is processed`;\n return html `\n \n \n \n \n\n ${this.error ? null : this.loaderTemplate()}\n\n \n \n\n \n \n ${label}\n \n ${subLabel}\n \n\n ${this.error ? this.tryAgainTemplate() : null}\n \n\n \n \n \n Copy link\n \n \n `;\n }\n watchTransactions() {\n if (!this.selectedOnRampProvider) {\n return;\n }\n switch (this.selectedOnRampProvider.name) {\n case 'coinbase':\n this.startTime = Date.now();\n this.initializeCoinbaseTransactions();\n break;\n default:\n break;\n }\n }\n async initializeCoinbaseTransactions() {\n await this.watchCoinbaseTransactions();\n this.intervalId = setInterval(() => this.watchCoinbaseTransactions(), 4000);\n }\n async watchCoinbaseTransactions() {\n try {\n const address = AccountController.state.address;\n const projectId = OptionsController.state.projectId;\n if (!address) {\n throw new Error('No address found');\n }\n const coinbaseResponse = await BlockchainApiController.fetchTransactions({\n account: address,\n onramp: 'coinbase',\n projectId\n });\n const newTransactions = coinbaseResponse.data.filter(tx => new Date(tx.metadata.minedAt) > new Date(this.startTime) ||\n tx.metadata.status === 'ONRAMP_TRANSACTION_STATUS_IN_PROGRESS');\n if (newTransactions.length) {\n clearInterval(this.intervalId);\n RouterController.replace('OnRampActivity');\n }\n else if (this.startTime && Date.now() - this.startTime >= 180000) {\n clearInterval(this.intervalId);\n this.error = true;\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n }\n onTryAgain() {\n if (!this.selectedOnRampProvider) {\n return;\n }\n this.error = false;\n CoreHelperUtil.openHref(this.selectedOnRampProvider.url, 'popupWindow', 'width=600,height=800,scrollbars=yes');\n }\n tryAgainTemplate() {\n if (!this.selectedOnRampProvider?.url) {\n return null;\n }\n return html `\n \n Try again\n `;\n }\n loaderTemplate() {\n const borderRadiusMaster = ThemeController.state.themeVariables['--w3m-border-radius-master'];\n const radius = borderRadiusMaster ? parseInt(borderRadiusMaster.replace('px', ''), 10) : 4;\n return html ``;\n }\n onCopyUri() {\n if (!this.selectedOnRampProvider?.url) {\n SnackController.showError('No link found');\n RouterController.goBack();\n return;\n }\n try {\n CoreHelperUtil.copyToClopboard(this.selectedOnRampProvider.url);\n SnackController.showSuccess('Link copied');\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n};\nW3mBuyInProgressView.styles = styles;\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"selectedOnRampProvider\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"uri\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"ready\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"buffering\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"error\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"intervalId\", void 0);\n__decorate([\n state()\n], W3mBuyInProgressView.prototype, \"startTime\", void 0);\n__decorate([\n property({ type: Boolean })\n], W3mBuyInProgressView.prototype, \"isMobile\", void 0);\n__decorate([\n property()\n], W3mBuyInProgressView.prototype, \"onRetry\", void 0);\nW3mBuyInProgressView = __decorate([\n customElement('w3m-buy-in-progress-view')\n], W3mBuyInProgressView);\nexport { W3mBuyInProgressView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","export const ConstantsUtil = {\n WALLET_CONNECT_CONNECTOR_ID: 'walletConnect',\n INJECTED_CONNECTOR_ID: 'injected',\n COINBASE_CONNECTOR_ID: 'coinbaseWallet',\n COINBASE_SDK_CONNECTOR_ID: 'coinbaseWalletSDK',\n SAFE_CONNECTOR_ID: 'safe',\n LEDGER_CONNECTOR_ID: 'ledger',\n EIP6963_CONNECTOR_ID: 'eip6963',\n EMAIL_CONNECTOR_ID: 'w3mEmail',\n EIP155: 'eip155',\n ADD_CHAIN_METHOD: 'wallet_addEthereumChain',\n EIP6963_ANNOUNCE_EVENT: 'eip6963:announceProvider',\n EIP6963_REQUEST_EVENT: 'eip6963:requestProvider',\n CONNECTOR_RDNS_MAP: {\n coinbaseWallet: 'com.coinbase.wallet'\n },\n VERSION: '4.1.11'\n};\n//# sourceMappingURL=ConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const PresetsUtil = {\n ConnectorExplorerIds: {\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: '225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: '19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927'\n },\n EIP155NetworkImageIds: {\n 1: '692ed6ba-e569-459a-556a-776476829e00',\n 42161: '3bff954d-5cb0-47a0-9a23-d20192e74600',\n 43114: '30c46e53-e989-45fb-4549-be3bd4eb3b00',\n 56: '93564157-2e8e-4ce7-81df-b264dbee9b00',\n 250: '06b26297-fe0c-4733-5d6b-ffa5498aac00',\n 10: 'ab9c186a-c52f-464b-2906-ca59d760a400',\n 137: '41d04d42-da3b-4453-8506-668cc0727900',\n 100: '02b53f6a-e3d4-479e-1cb4-21178987d100',\n 9001: 'f926ff41-260d-4028-635e-91913fc28e00',\n 324: 'b310f07f-4ef7-49f3-7073-2a0a39685800',\n 314: '5a73b3dd-af74-424e-cae0-0de859ee9400',\n 4689: '34e68754-e536-40da-c153-6ef2e7188a00',\n 1088: '3897a66d-40b9-4833-162f-a2c90531c900',\n 1284: '161038da-44ae-4ec7-1208-0ea569454b00',\n 1285: 'f1d73bb6-5450-4e18-38f7-fb6484264a00',\n 7777777: '845c60df-d429-4991-e687-91ae45791600',\n 42220: 'ab781bbc-ccc6-418d-d32d-789b15da1f00',\n 8453: '7289c336-3981-4081-c5f4-efc26ac64a00',\n 1313161554: '3ff73439-a619-4894-9262-4470c773a100',\n 2020: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',\n 2021: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',\n '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': 'a1b58899-f671-4276-6a5e-56ca5bd59700',\n '4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z': 'a1b58899-f671-4276-6a5e-56ca5bd59700',\n EtWTRABZaYq6iMfeYKouRu166VU2xqa1: 'a1b58899-f671-4276-6a5e-56ca5bd59700'\n },\n ConnectorImageIds: {\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: '0c2840c3-5b04-4c44-9661-fbd4b49e1800',\n [ConstantsUtil.COINBASE_SDK_CONNECTOR_ID]: '0c2840c3-5b04-4c44-9661-fbd4b49e1800',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: '461db637-8616-43ce-035a-d89b8a1d5800',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: '54a1aa77-d202-4f8d-0fb2-5d2bb6db0300',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400',\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: '07ba87ed-43aa-4adf-4540-9e6a2b9cae00'\n },\n ConnectorNamesMap: {\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: 'Browser Wallet',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'WalletConnect',\n [ConstantsUtil.COINBASE_CONNECTOR_ID]: 'Coinbase',\n [ConstantsUtil.COINBASE_SDK_CONNECTOR_ID]: 'Coinbase',\n [ConstantsUtil.LEDGER_CONNECTOR_ID]: 'Ledger',\n [ConstantsUtil.SAFE_CONNECTOR_ID]: 'Safe'\n },\n ConnectorTypesMap: {\n [ConstantsUtil.INJECTED_CONNECTOR_ID]: 'INJECTED',\n [ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID]: 'WALLET_CONNECT',\n [ConstantsUtil.EIP6963_CONNECTOR_ID]: 'ANNOUNCED',\n [ConstantsUtil.EMAIL_CONNECTOR_ID]: 'EMAIL'\n },\n WalletConnectRpcChainIds: [\n 1,\n 5,\n 11155111,\n 10,\n 420,\n 42161,\n 421613,\n 137,\n 80001,\n 42220,\n 1313161554,\n 1313161555,\n 56,\n 97,\n 43114,\n 43113,\n 100,\n 8453,\n 84531,\n 7777777,\n 999,\n 324,\n 280\n ]\n};\n//# sourceMappingURL=PresetsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nexport const HelpersUtil = {\n getCaipTokens(tokens) {\n if (!tokens) {\n return undefined;\n }\n const caipTokens = {};\n Object.entries(tokens).forEach(([id, token]) => {\n caipTokens[`${ConstantsUtil.EIP155}:${id}`] = token;\n });\n return caipTokens;\n }\n};\n//# sourceMappingURL=HelpersUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, OptionsController, RouterController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '@web3modal/scaffold-utils';\nlet W3mConnectView = class W3mConnectView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.connectors = ConnectorController.state.connectors;\n this.count = ApiController.state.count;\n this.unsubscribe.push(ConnectorController.subscribeKey('connectors', val => (this.connectors = val)), ApiController.subscribeKey('count', val => (this.count = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n \n\n ${this.walletConnectConnectorTemplate()} ${this.recentTemplate()}\n ${this.announcedTemplate()} ${this.injectedTemplate()} ${this.featuredTemplate()}\n ${this.customTemplate()} ${this.recommendedTemplate()} ${this.externalTemplate()}\n ${this.allWalletsTemplate()}\n \n \n `;\n }\n walletConnectConnectorTemplate() {\n if (CoreHelperUtil.isMobile()) {\n return null;\n }\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n tagLabel=\"qr code\"\n tagVariant=\"main\"\n data-testid=\"wallet-selector-walletconnect\"\n >\n \n `;\n }\n customTemplate() {\n const { customWallets } = OptionsController.state;\n if (!customWallets?.length) {\n return null;\n }\n const wallets = this.filterOutDuplicateWallets(customWallets);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n data-testid=${`wallet-selector-${wallet.id}`}\n >\n \n `);\n }\n featuredTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n const { featured } = ApiController.state;\n if (!featured.length) {\n return null;\n }\n const wallets = this.filterOutDuplicateWallets(featured);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n >\n \n `);\n }\n recentTemplate() {\n const recent = StorageUtil.getRecentWallets();\n return recent.map(wallet => html `\n this.onConnectWallet(wallet)}\n tagLabel=\"recent\"\n tagVariant=\"shade\"\n >\n \n `);\n }\n announcedTemplate() {\n return this.connectors.map(connector => {\n if (connector.type !== 'ANNOUNCED') {\n return null;\n }\n return html `\n this.onConnector(connector)}\n tagVariant=\"success\"\n .installed=${true}\n >\n \n `;\n });\n }\n injectedTemplate() {\n return this.connectors.map(connector => {\n if (connector.type !== 'INJECTED') {\n return null;\n }\n if (!ConnectionController.checkInstalled()) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n >\n \n `;\n });\n }\n externalTemplate() {\n const announcedRdns = ConnectorController.getAnnouncedConnectorRdns();\n return this.connectors.map(connector => {\n if (['WALLET_CONNECT', 'INJECTED', 'ANNOUNCED', 'EMAIL'].includes(connector.type)) {\n return null;\n }\n if (announcedRdns.includes(ConstantsUtil.CONNECTOR_RDNS_MAP[connector.id])) {\n return null;\n }\n return html `\n this.onConnector(connector)}\n >\n \n `;\n });\n }\n allWalletsTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n const { allWallets } = OptionsController.state;\n if (!connector || allWallets === 'HIDE') {\n return null;\n }\n if (allWallets === 'ONLY_MOBILE' && !CoreHelperUtil.isMobile()) {\n return null;\n }\n const featuredCount = ApiController.state.featured.length;\n const rawCount = this.count + featuredCount;\n const roundedCount = rawCount < 10 ? rawCount : Math.floor(rawCount / 10) * 10;\n const tagLabel = roundedCount < rawCount ? `${roundedCount}+` : `${roundedCount}`;\n return html `\n \n `;\n }\n recommendedTemplate() {\n const connector = this.connectors.find(c => c.type === 'WALLET_CONNECT');\n if (!connector) {\n return null;\n }\n const { recommended } = ApiController.state;\n const { customWallets, featuredWalletIds } = OptionsController.state;\n const { connectors } = ConnectorController.state;\n const recent = StorageUtil.getRecentWallets();\n const injected = connectors.filter(c => c.type === 'INJECTED');\n const filteredInjected = injected.filter(i => i.name !== 'Browser Wallet');\n if (featuredWalletIds || customWallets || !recommended.length) {\n return null;\n }\n const overrideLength = filteredInjected.length + recent.length;\n const maxRecommended = Math.max(0, 2 - overrideLength);\n const wallets = this.filterOutDuplicateWallets(recommended).slice(0, maxRecommended);\n return wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n >\n \n `);\n }\n onConnector(connector) {\n if (connector.type === 'WALLET_CONNECT') {\n if (CoreHelperUtil.isMobile()) {\n RouterController.push('AllWallets');\n }\n else {\n RouterController.push('ConnectingWalletConnect');\n }\n }\n else {\n RouterController.push('ConnectingExternal', { connector });\n }\n }\n filterOutDuplicateWallets(wallets) {\n const recent = StorageUtil.getRecentWallets();\n const connectorRDNSs = this.connectors\n .map(connector => connector.info?.rdns)\n .filter(Boolean);\n const recentRDNSs = recent.map(wallet => wallet.rdns).filter(Boolean);\n const allRDNSs = connectorRDNSs.concat(recentRDNSs);\n const filtered = wallets.filter(wallet => !allRDNSs.includes(String(wallet?.rdns)));\n return filtered;\n }\n onAllWallets() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_ALL_WALLETS' });\n RouterController.push('AllWallets');\n }\n onConnectWallet(wallet) {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n};\nW3mConnectView.styles = styles;\n__decorate([\n state()\n], W3mConnectView.prototype, \"connectors\", void 0);\n__decorate([\n state()\n], W3mConnectView.prototype, \"count\", void 0);\nW3mConnectView = __decorate([\n customElement('w3m-connect-view')\n], W3mConnectView);\nexport { W3mConnectView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-thumbnail {\n position: absolute;\n }\n\n wui-icon-box {\n position: absolute;\n right: calc(var(--wui-spacing-3xs) * -1);\n bottom: calc(var(--wui-spacing-3xs) * -1);\n opacity: 0;\n transform: scale(0.5);\n transition-property: opacity, transform;\n transition-duration: var(--wui-duration-lg);\n transition-timing-function: var(--wui-ease-out-power-2);\n will-change: opacity, transform;\n }\n\n wui-text[align='center'] {\n width: 100%;\n padding: 0px var(--wui-spacing-l);\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n [data-retry='false'] wui-link {\n display: none;\n }\n\n [data-retry='true'] wui-link {\n display: block;\n opacity: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, CoreHelperUtil, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nexport class W3mConnectingWidget extends LitElement {\n constructor() {\n super();\n this.wallet = RouterController.state.data?.wallet;\n this.connector = RouterController.state.data?.connector;\n this.timeout = undefined;\n this.secondaryBtnLabel = 'Try again';\n this.secondaryBtnIcon = 'refresh';\n this.secondaryLabel = 'Accept connection request in the wallet';\n this.onConnect = undefined;\n this.onRender = undefined;\n this.onAutoConnect = undefined;\n this.isWalletConnect = true;\n this.unsubscribe = [];\n this.imageSrc = AssetUtil.getWalletImage(this.wallet) ?? AssetUtil.getConnectorImage(this.connector);\n this.name = this.wallet?.name ?? this.connector?.name ?? 'Wallet';\n this.isRetrying = false;\n this.uri = ConnectionController.state.wcUri;\n this.error = ConnectionController.state.wcError;\n this.ready = false;\n this.showRetry = false;\n this.buffering = false;\n this.isMobile = false;\n this.onRetry = undefined;\n this.unsubscribe.push(...[\n ConnectionController.subscribeKey('wcUri', val => {\n this.uri = val;\n if (this.isRetrying && this.onRetry) {\n this.isRetrying = false;\n this.onConnect?.();\n }\n }),\n ConnectionController.subscribeKey('wcError', val => (this.error = val)),\n ConnectionController.subscribeKey('buffering', val => (this.buffering = val))\n ]);\n }\n firstUpdated() {\n this.onAutoConnect?.();\n this.showRetry = !this.onAutoConnect;\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n clearTimeout(this.timeout);\n }\n render() {\n this.onRender?.();\n this.onShowRetry();\n const subLabel = this.error\n ? 'Connection can be declined if a previous request is still active'\n : this.secondaryLabel;\n let label = `Continue in ${this.name}`;\n if (this.buffering) {\n label = 'Connecting...';\n }\n if (this.error) {\n label = 'Connection declined';\n }\n return html `\n \n \n \n\n ${this.error ? null : this.loaderTemplate()}\n\n \n \n\n \n \n ${label}\n \n ${subLabel}\n \n\n \n \n ${this.secondaryBtnLabel}\n \n \n\n ${this.isWalletConnect\n ? html `\n \n \n \n Copy link\n \n \n `\n : null}\n\n \n `;\n }\n onShowRetry() {\n if (this.error && !this.showRetry) {\n this.showRetry = true;\n const retryButton = this.shadowRoot?.querySelector('wui-button');\n retryButton?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n onTryAgain() {\n if (!this.buffering) {\n ConnectionController.setWcError(false);\n if (this.onRetry) {\n this.isRetrying = true;\n this.onRetry?.();\n }\n else {\n this.onConnect?.();\n }\n }\n }\n loaderTemplate() {\n const borderRadiusMaster = ThemeController.state.themeVariables['--w3m-border-radius-master'];\n const radius = borderRadiusMaster ? parseInt(borderRadiusMaster.replace('px', ''), 10) : 4;\n return html ``;\n }\n onCopyUri() {\n try {\n if (this.uri) {\n CoreHelperUtil.copyToClopboard(this.uri);\n SnackController.showSuccess('Link copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n}\nW3mConnectingWidget.styles = styles;\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"uri\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"error\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"ready\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mConnectingWidget.prototype, \"buffering\", void 0);\n__decorate([\n property({ type: Boolean })\n], W3mConnectingWidget.prototype, \"isMobile\", void 0);\n__decorate([\n property()\n], W3mConnectingWidget.prototype, \"onRetry\", void 0);\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, EventsController, ModalController, OptionsController, RouterController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingExternalView = class W3mConnectingExternalView extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.connector) {\n throw new Error('w3m-connecting-view: No connector provided');\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: {\n name: this.connector.name ?? 'Unknown',\n platform: 'browser'\n }\n });\n this.onConnect = this.onConnectProxy.bind(this);\n this.onAutoConnect = this.onConnectProxy.bind(this);\n this.isWalletConnect = false;\n }\n async onConnectProxy() {\n try {\n this.error = false;\n if (this.connector) {\n if (this.connector.imageUrl) {\n StorageUtil.setConnectedWalletImageUrl(this.connector.imageUrl);\n }\n await ConnectionController.connectExternal(this.connector);\n if (OptionsController.state.isSiweEnabled) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.close();\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'browser', name: this.connector.name || 'Unknown' }\n });\n }\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n this.error = true;\n }\n }\n};\nW3mConnectingExternalView = __decorate([\n customElement('w3m-connecting-external-view')\n], W3mConnectingExternalView);\nexport { W3mConnectingExternalView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, ConnectorController, ConstantsUtil, CoreHelperUtil, EventsController, ModalController, OptionsController, RouterController, SnackController, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mConnectingWcView = class W3mConnectingWcView extends LitElement {\n constructor() {\n super();\n this.interval = undefined;\n this.lastRetry = Date.now();\n this.wallet = RouterController.state.data?.wallet;\n this.platform = undefined;\n this.platforms = [];\n this.initializeConnection();\n this.interval = setInterval(this.initializeConnection.bind(this), ConstantsUtil.TEN_SEC_MS);\n }\n disconnectedCallback() {\n clearTimeout(this.interval);\n }\n render() {\n if (!this.wallet) {\n return html ``;\n }\n this.determinePlatforms();\n return html `\n ${this.headerTemplate()}\n
      ${this.platformTemplate()}
      \n `;\n }\n async initializeConnection(retry = false) {\n try {\n const { wcPairingExpiry } = ConnectionController.state;\n if (retry || CoreHelperUtil.isPairingExpired(wcPairingExpiry)) {\n ConnectionController.connectWalletConnect();\n if (this.wallet) {\n const url = AssetUtil.getWalletImage(this.wallet);\n if (url) {\n StorageUtil.setConnectedWalletImageUrl(url);\n }\n }\n else {\n const connectors = ConnectorController.state.connectors;\n const connector = connectors.find(c => c.type === 'WALLET_CONNECT');\n const url = AssetUtil.getConnectorImage(connector);\n if (url) {\n StorageUtil.setConnectedWalletImageUrl(url);\n }\n }\n await ConnectionController.state.wcPromise;\n this.finalizeConnection();\n if (OptionsController.state.isSiweEnabled) {\n RouterController.push('ConnectingSiwe');\n }\n else {\n ModalController.close();\n }\n }\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n ConnectionController.setWcError(true);\n if (CoreHelperUtil.isAllowedRetry(this.lastRetry)) {\n SnackController.showError('Declined');\n this.lastRetry = Date.now();\n this.initializeConnection(true);\n }\n }\n }\n finalizeConnection() {\n const { wcLinking, recentWallet } = ConnectionController.state;\n if (wcLinking) {\n StorageUtil.setWalletConnectDeepLink(wcLinking);\n }\n if (recentWallet) {\n StorageUtil.setWeb3ModalRecent(recentWallet);\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: {\n method: wcLinking ? 'mobile' : 'qrcode',\n name: this.wallet?.name || 'Unknown'\n }\n });\n }\n determinePlatforms() {\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-view:determinePlatforms No wallet');\n }\n if (this.platform) {\n return;\n }\n const { mobile_link, desktop_link, webapp_link, injected, rdns } = this.wallet;\n const injectedIds = injected?.map(({ injected_id }) => injected_id).filter(Boolean);\n const browserIds = rdns ? [rdns] : injectedIds ?? [];\n const isBrowser = browserIds.length;\n const isMobileWc = mobile_link;\n const isWebWc = webapp_link;\n const isBrowserInstalled = ConnectionController.checkInstalled(browserIds);\n const isBrowserWc = isBrowser && isBrowserInstalled;\n const isDesktopWc = desktop_link && !CoreHelperUtil.isMobile();\n if (isBrowserWc) {\n this.platforms.push('browser');\n }\n if (isMobileWc) {\n this.platforms.push(CoreHelperUtil.isMobile() ? 'mobile' : 'qrcode');\n }\n if (isWebWc) {\n this.platforms.push('web');\n }\n if (isDesktopWc) {\n this.platforms.push('desktop');\n }\n if (!isBrowserWc && isBrowser) {\n this.platforms.push('unsupported');\n }\n this.platform = this.platforms[0];\n }\n platformTemplate() {\n switch (this.platform) {\n case 'browser':\n return html ``;\n case 'desktop':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'web':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'mobile':\n return html `\n this.initializeConnection(true)}>\n \n `;\n case 'qrcode':\n return html ``;\n default:\n return html ``;\n }\n }\n headerTemplate() {\n const multiPlatform = this.platforms.length > 1;\n if (!multiPlatform) {\n return null;\n }\n return html `\n \n \n `;\n }\n async onSelectPlatform(platform) {\n const container = this.shadowRoot?.querySelector('div');\n if (container) {\n await container.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.platform = platform;\n container.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n};\n__decorate([\n state()\n], W3mConnectingWcView.prototype, \"platform\", void 0);\n__decorate([\n state()\n], W3mConnectingWcView.prototype, \"platforms\", void 0);\nW3mConnectingWcView = __decorate([\n customElement('w3m-connecting-wc-view')\n], W3mConnectingWcView);\nexport { W3mConnectingWcView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nlet W3mDownloadsView = class W3mDownloadsView extends LitElement {\n constructor() {\n super(...arguments);\n this.wallet = RouterController.state.data?.wallet;\n }\n render() {\n if (!this.wallet) {\n throw new Error('w3m-downloads-view');\n }\n return html `\n \n ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}\n ${this.homepageTemplate()}\n \n `;\n }\n chromeTemplate() {\n if (!this.wallet?.chrome_store) {\n return null;\n }\n return html `\n Chrome Extension\n `;\n }\n iosTemplate() {\n if (!this.wallet?.app_store) {\n return null;\n }\n return html `\n iOS App\n `;\n }\n androidTemplate() {\n if (!this.wallet?.play_store) {\n return null;\n }\n return html `\n Android App\n `;\n }\n homepageTemplate() {\n if (!this.wallet?.homepage) {\n return null;\n }\n return html `\n \n Website\n \n `;\n }\n onChromeStore() {\n if (this.wallet?.chrome_store) {\n CoreHelperUtil.openHref(this.wallet.chrome_store, '_blank');\n }\n }\n onAppStore() {\n if (this.wallet?.app_store) {\n CoreHelperUtil.openHref(this.wallet.app_store, '_blank');\n }\n }\n onPlayStore() {\n if (this.wallet?.play_store) {\n CoreHelperUtil.openHref(this.wallet.play_store, '_blank');\n }\n }\n onHomePage() {\n if (this.wallet?.homepage) {\n CoreHelperUtil.openHref(this.wallet.homepage, '_blank');\n }\n }\n};\nW3mDownloadsView = __decorate([\n customElement('w3m-downloads-view')\n], W3mDownloadsView);\nexport { W3mDownloadsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, CoreHelperUtil, OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nconst EXPLORER = 'https://walletconnect.com/explorer';\nlet W3mGetWalletView = class W3mGetWalletView extends LitElement {\n render() {\n return html `\n \n ${this.recommendedWalletsTemplate()}\n {\n CoreHelperUtil.openHref('https://walletconnect.com/explorer?type=wallet', '_blank');\n }}\n >\n \n `;\n }\n recommendedWalletsTemplate() {\n const { recommended, featured } = ApiController.state;\n const { customWallets } = OptionsController.state;\n const wallets = [...featured, ...(customWallets ?? []), ...recommended].slice(0, 4);\n return wallets.map(wallet => html `\n {\n CoreHelperUtil.openHref(wallet.homepage ?? EXPLORER, '_blank');\n }}\n >\n `);\n }\n};\nW3mGetWalletView = __decorate([\n customElement('w3m-get-wallet-view')\n], W3mGetWalletView);\nexport { W3mGetWalletView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(3px);\n }\n 50% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n 100% {\n transform: translateX(0);\n }\n }\n\n wui-flex:first-child:not(:only-child) {\n position: relative;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n wui-icon-box {\n position: absolute;\n right: 4px;\n bottom: 0;\n opacity: 0;\n transform: scale(0.5);\n z-index: 1;\n }\n\n wui-button {\n display: none;\n }\n\n [data-error='true'] wui-icon-box {\n opacity: 1;\n transform: scale(1);\n }\n\n [data-error='true'] > wui-flex:first-child {\n animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\n }\n\n wui-button[data-retry='true'] {\n display: block;\n opacity: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectorController, NetworkController, OptionsController, RouterController, RouterUtil, StorageUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworkSwitchView = class W3mNetworkSwitchView extends LitElement {\n constructor() {\n super();\n this.network = RouterController.state.data?.network;\n this.unsubscribe = [];\n this.showRetry = false;\n this.error = false;\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n firstUpdated() {\n this.onSwitchNetwork();\n }\n render() {\n if (!this.network) {\n throw new Error('w3m-network-switch-view: No network provided');\n }\n this.onShowRetry();\n const label = this.getLabel();\n const subLabel = this.getSubLabel();\n return html `\n \n \n \n\n ${this.error ? null : html ``}\n\n \n \n\n \n ${label}\n ${subLabel}\n \n\n \n \n Try again\n \n \n `;\n }\n getSubLabel() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector && type === 'EMAIL') {\n return '';\n }\n return this.error\n ? 'Switch can be declined if chain is not supported by a wallet or previous request is still active'\n : 'Accept connection request in your wallet';\n }\n getLabel() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector && type === 'EMAIL') {\n return `Switching to ${this.network?.name ?? 'Unknown'} network...`;\n }\n return this.error ? 'Switch declined' : 'Approve in wallet';\n }\n onShowRetry() {\n if (this.error && !this.showRetry) {\n this.showRetry = true;\n const retryButton = this.shadowRoot?.querySelector('wui-button');\n retryButton?.animate([{ opacity: 0 }, { opacity: 1 }], {\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n async onSwitchNetwork() {\n try {\n this.error = false;\n if (this.network) {\n await NetworkController.switchActiveNetwork(this.network);\n if (!OptionsController.state.isSiweEnabled) {\n RouterUtil.navigateAfterNetworkSwitch();\n }\n }\n }\n catch {\n this.error = true;\n }\n }\n};\nW3mNetworkSwitchView.styles = styles;\n__decorate([\n state()\n], W3mNetworkSwitchView.prototype, \"showRetry\", void 0);\n__decorate([\n state()\n], W3mNetworkSwitchView.prototype, \"error\", void 0);\nW3mNetworkSwitchView = __decorate([\n customElement('w3m-network-switch-view')\n], W3mNetworkSwitchView);\nexport { W3mNetworkSwitchView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, EventsController, NetworkController, RouterController, RouterUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mNetworksView = class W3mNetworksView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.unsubscribe.push(NetworkController.subscribeKey('caipNetwork', val => (this.caipNetwork = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.networksTemplate()}\n \n\n \n\n \n \n Your connected wallet may not support some of the networks available for this dApp\n \n \n \n What is a network\n \n \n `;\n }\n onNetworkHelp() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORK_HELP' });\n RouterController.push('WhatIsANetwork');\n }\n networksTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks, supportsAllNetworks } = NetworkController.state;\n const sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n return sortedNetworks?.map(network => html `\n this.onSwitchNetwork(network)}\n .disabled=${!supportsAllNetworks && !approvedCaipNetworkIds?.includes(network.id)}\n data-testid=${`w3m-network-switch-${network.name ?? network.id}`}\n >\n `);\n }\n async onSwitchNetwork(network) {\n const { isConnected } = AccountController.state;\n const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state;\n const { data } = RouterController.state;\n if (isConnected && caipNetwork?.id !== network.id) {\n if (approvedCaipNetworkIds?.includes(network.id)) {\n await NetworkController.switchActiveNetwork(network);\n RouterUtil.navigateAfterNetworkSwitch();\n }\n else if (supportsAllNetworks) {\n RouterController.push('SwitchNetwork', { ...data, network });\n }\n }\n else if (!isConnected) {\n NetworkController.setCaipNetwork(network);\n RouterController.push('Connect');\n }\n }\n};\nW3mNetworksView.styles = styles;\n__decorate([\n state()\n], W3mNetworksView.prototype, \"caipNetwork\", void 0);\nW3mNetworksView = __decorate([\n customElement('w3m-networks-view')\n], W3mNetworksView);\nexport { W3mNetworksView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n padding: var(--wui-spacing-m);\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n\n :host > wui-flex > wui-flex {\n width: 100%;\n }\n\n wui-transaction-list-item-loader {\n width: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DateUtil } from '@web3modal/common';\nimport { AccountController, AssetController, OnRampController, OptionsController, TransactionsController } from '@web3modal/core';\nimport { TransactionUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nconst LOADING_ITEM_COUNT = 7;\nlet W3mOnRampActivityView = class W3mOnRampActivityView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.refetchTimeout = undefined;\n this.selectedOnRampProvider = OnRampController.state.selectedProvider;\n this.loading = false;\n this.coinbaseTransactions = TransactionsController.state.coinbaseTransactions;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('selectedProvider', val => {\n this.selectedOnRampProvider = val;\n }),\n AssetController.subscribeKey('tokenImages', val => (this.tokenImages = val)),\n () => {\n clearTimeout(this.refetchTimeout);\n },\n TransactionsController.subscribe(val => {\n this.coinbaseTransactions = { ...val.coinbaseTransactions };\n })\n ]);\n TransactionsController.clearCursor();\n this.fetchTransactions();\n }\n render() {\n return html `\n \n ${this.loading ? this.templateLoading() : this.templateTransactionsByYear()}\n \n `;\n }\n templateTransactions(transactions) {\n return transactions?.map(transaction => {\n const date = DateUtil.formatDate(transaction?.metadata?.minedAt);\n const transfer = transaction.transfers[0];\n const fungibleInfo = transfer?.fungible_info;\n if (!fungibleInfo) {\n return null;\n }\n const icon = fungibleInfo?.icon?.url || this.tokenImages?.[fungibleInfo.symbol || ''];\n return html `\n \n `;\n });\n }\n templateTransactionsByYear() {\n const sortedYearKeys = Object.keys(this.coinbaseTransactions).sort().reverse();\n return sortedYearKeys.map(year => {\n const yearInt = parseInt(year, 10);\n const sortedMonthIndexes = new Array(12)\n .fill(null)\n .map((_, idx) => idx)\n .reverse();\n return sortedMonthIndexes.map(month => {\n const groupTitle = TransactionUtil.getTransactionGroupTitle(yearInt, month);\n const transactions = this.coinbaseTransactions[yearInt]?.[month];\n if (!transactions) {\n return null;\n }\n return html `\n \n \n ${groupTitle}\n \n \n ${this.templateTransactions(transactions)}\n \n \n `;\n });\n });\n }\n async fetchTransactions() {\n const provider = 'coinbase';\n if (provider === 'coinbase') {\n await this.fetchCoinbaseTransactions();\n }\n }\n async fetchCoinbaseTransactions() {\n const address = AccountController.state.address;\n const projectId = OptionsController.state.projectId;\n if (!address) {\n throw new Error('No address found');\n }\n if (!projectId) {\n throw new Error('No projectId found');\n }\n this.loading = true;\n await TransactionsController.fetchTransactions(address, 'coinbase');\n this.loading = false;\n this.refetchLoadingTransactions();\n }\n refetchLoadingTransactions() {\n const today = new Date();\n const currentMonthTxs = this.coinbaseTransactions[today.getFullYear()]?.[today.getMonth()] || [];\n const loadingTransactions = currentMonthTxs.filter(transaction => transaction.metadata.status === 'ONRAMP_TRANSACTION_STATUS_IN_PROGRESS');\n if (loadingTransactions.length === 0) {\n clearTimeout(this.refetchTimeout);\n return;\n }\n this.refetchTimeout = setTimeout(async () => {\n const address = AccountController.state.address;\n await TransactionsController.fetchTransactions(address, 'coinbase');\n this.refetchLoadingTransactions();\n }, 3000);\n }\n templateLoading() {\n return Array(LOADING_ITEM_COUNT)\n .fill(html ` `)\n .map(item => item);\n }\n};\nW3mOnRampActivityView.styles = styles;\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"selectedOnRampProvider\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"coinbaseTransactions\", void 0);\n__decorate([\n state()\n], W3mOnRampActivityView.prototype, \"tokenImages\", void 0);\nW3mOnRampActivityView = __decorate([\n customElement('w3m-onramp-activity-view')\n], W3mOnRampActivityView);\nexport { W3mOnRampActivityView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OnRampController, ModalController, AssetController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mOnrampFiatSelectView = class W3mOnrampFiatSelectView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedCurrency = OnRampController.state.paymentCurrency;\n this.currencies = OnRampController.state.paymentCurrencies;\n this.currencyImages = AssetController.state.currencyImages;\n this.unsubscribe.push(...[\n OnRampController.subscribe(val => {\n this.selectedCurrency = val.paymentCurrency;\n this.currencies = val.paymentCurrencies;\n }),\n AssetController.subscribeKey('currencyImages', val => (this.currencyImages = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.currenciesTemplate()}\n \n \n `;\n }\n currenciesTemplate() {\n return this.currencies.map(currency => html `\n this.selectCurrency(currency)}\n variant=\"image\"\n >\n ${currency.id}\n \n `);\n }\n selectCurrency(currency) {\n if (!currency) {\n return;\n }\n OnRampController.setPaymentCurrency(currency);\n ModalController.close();\n }\n};\nW3mOnrampFiatSelectView.styles = styles;\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"currencies\", void 0);\n__decorate([\n state()\n], W3mOnrampFiatSelectView.prototype, \"currencyImages\", void 0);\nW3mOnrampFiatSelectView = __decorate([\n customElement('w3m-onramp-fiat-select-view')\n], W3mOnrampFiatSelectView);\nexport { W3mOnrampFiatSelectView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, AccountController, ConstantsUtil, OnRampController, RouterController, NetworkController, BlockchainApiController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nlet W3mOnRampProvidersView = class W3mOnRampProvidersView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.providers = OnRampController.state.providers;\n this.unsubscribe.push(...[\n OnRampController.subscribeKey('providers', val => {\n this.providers = val;\n })\n ]);\n }\n firstUpdated() {\n const urlPromises = this.providers.map(async (provider) => {\n if (provider.name === 'coinbase') {\n return await this.getCoinbaseOnRampURL();\n }\n return Promise.resolve(provider?.url);\n });\n Promise.all(urlPromises).then(urls => {\n this.providers = this.providers.map((provider, index) => ({\n ...provider,\n url: urls[index] || ''\n }));\n });\n }\n render() {\n return html `\n \n ${this.onRampProvidersTemplate()}\n \n \n `;\n }\n onRampProvidersTemplate() {\n return this.providers.map(provider => html `\n {\n this.onClickProvider(provider);\n }}\n ?disabled=${!provider.url}\n >\n `);\n }\n onClickProvider(provider) {\n OnRampController.setSelectedProvider(provider);\n RouterController.push('BuyInProgress');\n CoreHelperUtil.openHref(provider.url, 'popupWindow', 'width=600,height=800,scrollbars=yes');\n }\n async getCoinbaseOnRampURL() {\n const address = AccountController.state.address;\n const network = NetworkController.state.caipNetwork;\n if (!address) {\n throw new Error('No address found');\n }\n if (!network?.name) {\n throw new Error('No network found');\n }\n const defaultNetwork = ConstantsUtil.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[network.name] ?? ConstantsUtil.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN;\n const purchaseCurrency = OnRampController.state.purchaseCurrency;\n const assets = purchaseCurrency\n ? [purchaseCurrency.symbol]\n : OnRampController.state.purchaseCurrencies.map(currency => currency.symbol);\n return await BlockchainApiController.generateOnRampURL({\n defaultNetwork,\n destinationWallets: [\n { address, blockchains: ConstantsUtil.WC_COINBASE_PAY_SDK_CHAINS, assets }\n ],\n partnerUserId: address,\n purchaseAmount: OnRampController.state.purchaseAmount\n });\n }\n};\n__decorate([\n state()\n], W3mOnRampProvidersView.prototype, \"providers\", void 0);\nW3mOnRampProvidersView = __decorate([\n customElement('w3m-onramp-providers-view')\n], W3mOnRampProvidersView);\nexport { W3mOnRampProvidersView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-grid {\n max-height: 360px;\n overflow: auto;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OnRampController, ModalController, AssetController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mOnrampTokensView = class W3mOnrampTokensView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.selectedCurrency = OnRampController.state.purchaseCurrencies;\n this.tokens = OnRampController.state.purchaseCurrencies;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(...[\n OnRampController.subscribe(val => {\n this.selectedCurrency = val.purchaseCurrencies;\n this.tokens = val.purchaseCurrencies;\n }),\n AssetController.subscribeKey('tokenImages', val => (this.tokenImages = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.currenciesTemplate()}\n \n \n `;\n }\n currenciesTemplate() {\n return this.tokens.map(token => html `\n this.selectToken(token)}\n variant=\"image\"\n >\n \n ${token.name}\n ${token.symbol}\n \n \n `);\n }\n selectToken(currency) {\n if (!currency) {\n return;\n }\n OnRampController.setPurchaseCurrency(currency);\n ModalController.close();\n }\n};\nW3mOnrampTokensView.styles = styles;\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"tokens\", void 0);\n__decorate([\n state()\n], W3mOnrampTokensView.prototype, \"tokenImages\", void 0);\nW3mOnrampTokensView = __decorate([\n customElement('w3m-onramp-token-select-view')\n], W3mOnrampTokensView);\nexport { W3mOnrampTokensView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .action-button {\n width: 100%;\n border-radius: var(--wui-border-radius-xs);\n }\n\n .action-button:disabled {\n border-color: 1px solid var(--wui-gray-glass-005);\n }\n\n .convert-inputs-container {\n position: relative;\n }\n\n .replace-tokens-button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n gap: var(--wui-spacing-1xs);\n height: 40px;\n width: 40px;\n padding: var(--wui-spacing-xs);\n border: none;\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-005);\n transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1);\n will-change: background-color;\n z-index: 20;\n }\n\n .replace-tokens-button:hover {\n background: var(--wui-gray-glass-010);\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n transition: background 0.2s linear;\n }\n\n .details-container > wui-flex > button:hover {\n background: var(--wui-gray-glass-002);\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ConvertController, RouterController, CoreHelperUtil, NetworkController, ModalController, ConstantsUtil } from '@web3modal/core';\nimport { NumberUtil } from '@web3modal/common';\nlet W3mConvertView = class W3mConvertView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.detailsOpen = false;\n this.caipNetworkId = NetworkController.state.caipNetwork?.id;\n this.initialized = ConvertController.state.initialized;\n this.loading = ConvertController.state.loading;\n this.loadingPrices = ConvertController.state.loadingPrices;\n this.sourceToken = ConvertController.state.sourceToken;\n this.sourceTokenAmount = ConvertController.state.sourceTokenAmount;\n this.sourceTokenPriceInUSD = ConvertController.state.sourceTokenPriceInUSD;\n this.toToken = ConvertController.state.toToken;\n this.toTokenAmount = ConvertController.state.toTokenAmount;\n this.toTokenPriceInUSD = ConvertController.state.toTokenPriceInUSD;\n this.inputError = ConvertController.state.inputError;\n this.gasPriceInUSD = ConvertController.state.gasPriceInUSD;\n this.priceImpact = ConvertController.state.priceImpact;\n this.maxSlippage = ConvertController.state.maxSlippage;\n this.transactionLoading = ConvertController.state.transactionLoading;\n this.onDebouncedGetSwapCalldata = CoreHelperUtil.debounce(async () => {\n await ConvertController.convertTokens();\n }, 500);\n NetworkController.subscribeKey('caipNetwork', newCaipNetwork => {\n if (this.caipNetworkId !== newCaipNetwork?.id) {\n this.caipNetworkId = newCaipNetwork?.id;\n ConvertController.resetTokens();\n ConvertController.resetValues();\n ConvertController.initializeState();\n }\n });\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', isOpen => {\n if (!isOpen) {\n ConvertController.resetValues();\n }\n }),\n RouterController.subscribeKey('view', newRoute => {\n if (!newRoute.includes('Convert')) {\n ConvertController.resetValues();\n }\n }),\n ConvertController.subscribe(newState => {\n this.initialized = newState.initialized;\n this.loading = newState.loading;\n this.loadingPrices = newState.loadingPrices;\n this.transactionLoading = newState.transactionLoading;\n this.sourceToken = newState.sourceToken;\n this.sourceTokenAmount = newState.sourceTokenAmount;\n this.sourceTokenPriceInUSD = newState.sourceTokenPriceInUSD;\n this.toToken = newState.toToken;\n this.toTokenAmount = newState.toTokenAmount;\n this.toTokenPriceInUSD = newState.toTokenPriceInUSD;\n this.inputError = newState.inputError;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.priceImpact = newState.priceImpact;\n this.maxSlippage = newState.maxSlippage;\n })\n ]);\n this.watchTokensAndValues();\n }\n firstUpdated() {\n if (!this.initialized) {\n ConvertController.initializeState();\n }\n }\n disconnectedCallback() {\n ConvertController.setLoading(false);\n this.unsubscribe.forEach(unsubscribe => unsubscribe?.());\n clearInterval(this.interval);\n }\n render() {\n return html `\n \n ${this.initialized ? this.templateSwap() : this.templateLoading()}\n \n `;\n }\n watchTokensAndValues() {\n this.interval = setInterval(() => {\n ConvertController.getNetworkTokenPrice();\n ConvertController.getMyTokensWithBalance();\n ConvertController.refreshConvertValues();\n }, 20000);\n }\n templateSwap() {\n return html `\n \n \n ${this.templateTokenInput('sourceToken', this.sourceToken)}\n ${this.templateTokenInput('toToken', this.toToken)} ${this.templateReplaceTokensButton()}\n \n ${this.templateDetails()} ${this.templateActionButton()}\n \n `;\n }\n actionButtonLabel() {\n if (this.inputError) {\n return this.inputError;\n }\n return 'Review convert';\n }\n templateReplaceTokensButton() {\n return html `\n \n `;\n }\n templateLoading() {\n return html `\n \n\n \n `;\n }\n templateTokenInput(target, token) {\n const myToken = ConvertController.state.myTokensWithBalance?.find(ct => ct?.address === token?.address);\n const amount = target === 'toToken' ? this.toTokenAmount : this.sourceTokenAmount;\n const price = target === 'toToken' ? this.toTokenPriceInUSD : this.sourceTokenPriceInUSD;\n let value = parseFloat(amount) * price;\n if (target === 'toToken') {\n value -= this.gasPriceInUSD || 0;\n }\n return html ``;\n }\n onSetMaxValue(target, balance) {\n const token = target === 'sourceToken' ? this.sourceToken : this.toToken;\n const isNetworkToken = token?.address === ConstantsUtil.NATIVE_TOKEN_ADDRESS;\n let value = '0';\n if (!balance) {\n value = '0';\n this.handleChangeAmount(target, value);\n return;\n }\n if (!this.gasPriceInUSD) {\n value = balance;\n this.handleChangeAmount(target, value);\n return;\n }\n const amountOfTokenGasRequires = NumberUtil.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD);\n const maxValue = isNetworkToken\n ? NumberUtil.bigNumber(balance).minus(amountOfTokenGasRequires)\n : NumberUtil.bigNumber(balance);\n this.handleChangeAmount(target, maxValue.isGreaterThan(0) ? maxValue.toFixed(20) : '0');\n }\n templateDetails() {\n if (this.loading || this.inputError) {\n return null;\n }\n if (!this.sourceToken || !this.toToken || !this.sourceTokenAmount || !this.toTokenAmount) {\n return null;\n }\n const toTokenConvertedAmount = this.sourceTokenPriceInUSD && this.toTokenPriceInUSD\n ? (1 / this.toTokenPriceInUSD) * this.sourceTokenPriceInUSD\n : 0;\n return html `\n \n `;\n }\n handleChangeAmount(target, value) {\n ConvertController.clearError();\n if (target === 'sourceToken') {\n ConvertController.setSourceTokenAmount(value);\n }\n else {\n ConvertController.setToTokenAmount(value);\n }\n this.onDebouncedGetSwapCalldata();\n }\n templateActionButton() {\n const haveNoTokenSelected = !this.toToken || !this.sourceToken;\n const loading = this.loading || this.loadingPrices || this.transactionLoading;\n return html ` \n \n ${this.actionButtonLabel()}\n \n `;\n }\n onSwitchTokens() {\n ConvertController.switchTokens();\n }\n onConvertPreview() {\n RouterController.push('ConvertPreview');\n }\n};\nW3mConvertView.styles = styles;\n__decorate([\n state()\n], W3mConvertView.prototype, \"interval\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"detailsOpen\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"caipNetworkId\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"initialized\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"loadingPrices\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"sourceTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"toTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"inputError\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"priceImpact\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"maxSlippage\", void 0);\n__decorate([\n state()\n], W3mConvertView.prototype, \"transactionLoading\", void 0);\nW3mConvertView = __decorate([\n customElement('w3m-convert-view')\n], W3mConvertView);\nexport { W3mConvertView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n .preview-container,\n .details-container {\n width: 100%;\n }\n\n .token-image {\n width: 24px;\n height: 24px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n border-radius: 12px;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .token-item {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n height: 40px;\n border: none;\n border-radius: 80px;\n background: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n cursor: pointer;\n transition: background 0.2s linear;\n }\n\n .token-item:hover {\n background: var(--wui-gray-glass-005);\n }\n\n .preview-token-details-container {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .action-buttons-container {\n width: 100%;\n gap: var(--wui-spacing-xs);\n }\n\n .action-buttons-container > button {\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n height: 48px;\n border-radius: var(--wui-border-radius-xs);\n border: none;\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n .action-buttons-container > button:disabled {\n opacity: 0.8;\n cursor: not-allowed;\n }\n\n .cancel-button:hover,\n .convert-button:hover {\n cursor: pointer;\n }\n\n .action-buttons-container > button.cancel-button {\n flex: 2;\n }\n\n .action-buttons-container > button.convert-button {\n flex: 4;\n background-color: var(--wui-color-accent-090);\n }\n\n .action-buttons-container > button.convert-button > wui-text {\n color: white;\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n transition: background 0.2s linear;\n }\n\n .details-container > wui-flex > button:hover {\n background: var(--wui-gray-glass-002);\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s) var(--wui-spacing-xl);\n border-radius: var(--wui-border-radius-xxs);\n background: var(--wui-gray-glass-002);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { AccountController, NetworkController, RouterController, ConvertController, ConstantsUtil } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mConvertPreviewView = class W3mConvertPreviewView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.detailsOpen = true;\n this.approvalTransaction = ConvertController.state.approvalTransaction;\n this.convertTransaction = ConvertController.state.convertTransaction;\n this.sourceToken = ConvertController.state.sourceToken;\n this.sourceTokenAmount = ConvertController.state.sourceTokenAmount ?? '';\n this.sourceTokenPriceInUSD = ConvertController.state.sourceTokenPriceInUSD;\n this.toToken = ConvertController.state.toToken;\n this.toTokenAmount = ConvertController.state.toTokenAmount ?? '';\n this.toTokenPriceInUSD = ConvertController.state.toTokenPriceInUSD;\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.transactionLoading = ConvertController.state.transactionLoading;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.gasPriceInUSD = ConvertController.state.gasPriceInUSD;\n this.priceImpact = ConvertController.state.priceImpact;\n this.maxSlippage = ConvertController.state.maxSlippage;\n this.unsubscribe.push(...[\n AccountController.subscribeKey('balanceSymbol', newBalanceSymbol => {\n if (this.balanceSymbol !== newBalanceSymbol) {\n RouterController.goBack();\n }\n }),\n NetworkController.subscribeKey('caipNetwork', newCaipNetwork => {\n if (this.caipNetwork !== newCaipNetwork) {\n this.caipNetwork = newCaipNetwork;\n }\n }),\n ConvertController.subscribe(newState => {\n this.approvalTransaction = newState.approvalTransaction;\n this.convertTransaction = newState.convertTransaction;\n this.sourceToken = newState.sourceToken;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.toToken = newState.toToken;\n this.transactionLoading = newState.transactionLoading;\n this.gasPriceInUSD = newState.gasPriceInUSD;\n this.toTokenPriceInUSD = newState.toTokenPriceInUSD;\n this.sourceTokenAmount = newState.sourceTokenAmount ?? '';\n this.toTokenAmount = newState.toTokenAmount ?? '';\n this.priceImpact = newState.priceImpact;\n this.maxSlippage = newState.maxSlippage;\n })\n ]);\n }\n render() {\n return html `\n ${this.templateSwap()}\n `;\n }\n templateSwap() {\n const sourceTokenText = `${UiHelperUtil.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`;\n const toTokenText = `${UiHelperUtil.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`;\n const sourceTokenValue = parseFloat(this.sourceTokenAmount) * this.sourceTokenPriceInUSD;\n const toTokenValue = parseFloat(this.toTokenAmount) * this.toTokenPriceInUSD - (this.gasPriceInUSD || 0);\n const sentPrice = UiHelperUtil.formatNumberToLocalString(sourceTokenValue);\n const receivePrice = UiHelperUtil.formatNumberToLocalString(toTokenValue);\n return html `\n \n \n \n \n Send\n $${sentPrice}\n \n \n \n \n \n \n \n Receive\n $${receivePrice}\n \n \n \n \n \n\n ${this.templateDetails()}\n\n \n \n Review transaction carefully\n \n\n \n \n Cancel\n \n \n ${this.transactionLoading\n ? html ``\n : html `\n ${this.actionButtonLabel()}\n `}\n \n \n \n `;\n }\n templateDetails() {\n const toTokenConvertedAmount = this.sourceTokenPriceInUSD && this.toTokenPriceInUSD\n ? (1 / this.toTokenPriceInUSD) * this.sourceTokenPriceInUSD\n : 0;\n return html `\n \n `;\n }\n actionButtonLabel() {\n if (this.approvalTransaction) {\n return 'Approve';\n }\n return 'Convert';\n }\n onCancelTransaction() {\n RouterController.goBack();\n }\n onSendTransaction() {\n if (this.approvalTransaction) {\n ConvertController.sendTransactionForApproval(this.approvalTransaction);\n }\n else {\n ConvertController.sendTransactionForConvert(this.convertTransaction);\n }\n }\n};\nW3mConvertPreviewView.styles = styles;\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"detailsOpen\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"approvalTransaction\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"convertTransaction\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"sourceTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toTokenAmount\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"toTokenPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"caipNetwork\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"transactionLoading\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"balanceSymbol\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"priceImpact\", void 0);\n__decorate([\n state()\n], W3mConvertPreviewView.prototype, \"maxSlippage\", void 0);\nW3mConvertPreviewView = __decorate([\n customElement('w3m-convert-preview-view')\n], W3mConvertPreviewView);\nexport { W3mConvertPreviewView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n --tokens-scroll--top-opacity: 0;\n --tokens-scroll--bottom-opacity: 1;\n --suggested-tokens-scroll--left-opacity: 0;\n --suggested-tokens-scroll--right-opacity: 1;\n }\n\n :host > wui-flex:first-child {\n overflow-y: hidden;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-height: none;\n }\n\n wui-loading-hexagon {\n position: absolute;\n }\n\n .search-input-container,\n .suggested-tokens-container {\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-s);\n }\n\n .tokens-container .tokens {\n padding: 0px var(--wui-spacing-s);\n padding-bottom: var(--wui-spacing-s);\n }\n\n .search-input-container {\n padding-top: var(--wui-spacing-s);\n }\n\n .suggested-tokens-container {\n overflow-x: auto;\n mask-image: linear-gradient(\n to right,\n rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px,\n rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px,\n black 50px,\n black 90px,\n black calc(100% - 90px),\n black calc(100% - 50px),\n rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px),\n rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100%\n );\n }\n\n .suggested-tokens-container::-webkit-scrollbar {\n display: none;\n }\n\n .tokens-container {\n border-top: 1px solid var(--wui-gray-glass-005);\n height: 100%;\n max-height: 390px;\n }\n\n .tokens {\n width: 100%;\n overflow-y: auto;\n mask-image: linear-gradient(\n to bottom,\n rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px,\n rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px,\n black 50px,\n black 90px,\n black calc(100% - 90px),\n black calc(100% - 50px),\n rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px),\n rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100%\n );\n }\n\n .network-search-input,\n .select-network-button {\n height: 40px;\n }\n\n .select-network-button {\n border: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xs);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);\n background-color: transparent;\n border-radius: var(--wui-border-radius-xxs);\n padding: var(--wui-spacing-xs);\n align-items: center;\n transition: background-color 0.2s linear;\n }\n\n .select-network-button:hover {\n background-color: var(--wui-gray-glass-002);\n }\n\n .select-network-button > wui-image {\n width: 26px;\n height: 26px;\n border-radius: var(--wui-border-radius-xs);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, MathUtil } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { RouterController, ConvertController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mConvertSelectTokenView = class W3mConvertSelectTokenView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.targetToken = RouterController.state.data?.target;\n this.sourceToken = ConvertController.state.sourceToken;\n this.toToken = ConvertController.state.toToken;\n this.searchValue = '';\n this.unsubscribe.push(...[\n ConvertController.subscribe(newState => {\n this.sourceToken = newState.sourceToken;\n this.toToken = newState.toToken;\n })\n ]);\n this.watchTokens();\n }\n updated() {\n const suggestedTokensContainer = this.renderRoot?.querySelector('.suggested-tokens-container');\n suggestedTokensContainer?.addEventListener('scroll', this.handleSuggestedTokensScroll.bind(this));\n const tokensList = this.renderRoot?.querySelector('.tokens');\n tokensList?.addEventListener('scroll', this.handleTokenListScroll.bind(this));\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n const suggestedTokensContainer = this.renderRoot?.querySelector('.suggested-tokens-container');\n const tokensList = this.renderRoot?.querySelector('.tokens');\n suggestedTokensContainer?.removeEventListener('scroll', this.handleSuggestedTokensScroll.bind(this));\n tokensList?.removeEventListener('scroll', this.handleTokenListScroll.bind(this));\n clearInterval(this.interval);\n }\n render() {\n return html `\n \n ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()}\n \n `;\n }\n watchTokens() {\n this.interval = setInterval(() => {\n ConvertController.getNetworkTokenPrice();\n ConvertController.getMyTokensWithBalance();\n }, 5000);\n }\n onSelectToken(token) {\n if (this.targetToken === 'sourceToken') {\n ConvertController.setSourceToken(token);\n }\n else {\n ConvertController.setToToken(token);\n }\n RouterController.goBack();\n }\n templateSearchInput() {\n return html `\n \n \n \n `;\n }\n templateTokens() {\n const yourTokens = ConvertController.state.myTokensWithBalance\n ? Object.values(ConvertController.state.myTokensWithBalance)\n : [];\n const tokens = ConvertController.state.popularTokens\n ? ConvertController.state.popularTokens\n : [];\n const filteredYourTokens = this.filterTokensWithText(yourTokens, this.searchValue);\n const filteredTokens = this.filterTokensWithText(tokens, this.searchValue);\n return html `\n \n \n ${filteredYourTokens?.length > 0\n ? html `\n \n Your tokens\n \n ${filteredYourTokens.map(token => {\n const selected = token.symbol === this.sourceToken?.symbol ||\n token.symbol === this.toToken?.symbol;\n return html `\n {\n if (!selected) {\n this.onSelectToken(token);\n }\n }}\n >\n \n `;\n })}\n `\n : null}\n\n \n Popular tokens\n \n\n ${filteredTokens?.length > 0\n ? filteredTokens.map(token => html `\n this.onSelectToken(token)}\n >\n \n `)\n : null}\n \n \n `;\n }\n templateSuggestedTokens() {\n const tokens = ConvertController.state.suggestedTokens\n ? ConvertController.state.suggestedTokens.slice(0, 8)\n : null;\n if (!tokens) {\n return null;\n }\n return html `\n \n ${tokens.map(token => html `\n this.onSelectToken(token)}\n >\n \n `)}\n \n `;\n }\n onSearchInputChange(event) {\n this.searchValue = event.detail;\n }\n handleSuggestedTokensScroll() {\n const container = this.renderRoot?.querySelector('.suggested-tokens-container');\n if (!container) {\n return;\n }\n container.style.setProperty('--suggested-tokens-scroll--left-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollLeft).toString());\n container.style.setProperty('--suggested-tokens-scroll--right-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollWidth - container.scrollLeft - container.offsetWidth).toString());\n }\n handleTokenListScroll() {\n const container = this.renderRoot?.querySelector('.tokens');\n if (!container) {\n return;\n }\n container.style.setProperty('--tokens-scroll--top-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollTop).toString());\n container.style.setProperty('--tokens-scroll--bottom-opacity', MathUtil.interpolate([0, 100], [0, 1], container.scrollHeight - container.scrollTop - container.offsetHeight).toString());\n }\n filterTokensWithText(tokens, text) {\n return tokens.filter(token => `${token.symbol} ${token.name} ${token.address}`.toLowerCase().includes(text.toLowerCase()));\n }\n};\nW3mConvertSelectTokenView.styles = styles;\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"interval\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"targetToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"sourceToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"toToken\", void 0);\n__decorate([\n state()\n], W3mConvertSelectTokenView.prototype, \"searchValue\", void 0);\nW3mConvertSelectTokenView = __decorate([\n customElement('w3m-convert-select-token-view')\n], W3mConvertSelectTokenView);\nexport { W3mConvertSelectTokenView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex:first-child {\n height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n padding: var(--wui-spacing-m);\n }\n\n :host > wui-flex:first-child::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mTransactionsView = class W3mTransactionsView extends LitElement {\n render() {\n return html `\n \n \n \n `;\n }\n};\nW3mTransactionsView.styles = styles;\nW3mTransactionsView = __decorate([\n customElement('w3m-transactions-view')\n], W3mTransactionsView);\nexport { W3mTransactionsView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nconst data = [\n {\n images: ['network', 'layers', 'system'],\n title: 'The system’s nuts and bolts',\n text: 'A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services.'\n },\n {\n images: ['noun', 'defiAlt', 'dao'],\n title: 'Designed for different uses',\n text: 'Each network is designed differently, and may therefore suit certain apps and experiences.'\n }\n];\nlet W3mWhatIsANetworkView = class W3mWhatIsANetworkView extends LitElement {\n render() {\n return html `\n \n \n {\n CoreHelperUtil.openHref('https://ethereum.org/en/developers/docs/networks/', '_blank');\n }}\n >\n Learn more\n \n \n \n `;\n }\n};\nW3mWhatIsANetworkView = __decorate([\n customElement('w3m-what-is-a-network-view')\n], W3mWhatIsANetworkView);\nexport { W3mWhatIsANetworkView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { EventsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nconst data = [\n {\n images: ['login', 'profile', 'lock'],\n title: 'One login for all of web3',\n text: 'Log in to any app by connecting your wallet. Say goodbye to countless passwords!'\n },\n {\n images: ['defi', 'nft', 'eth'],\n title: 'A home for your digital assets',\n text: 'A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.'\n },\n {\n images: ['browser', 'noun', 'dao'],\n title: 'Your gateway to a new web',\n text: 'With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.'\n }\n];\nlet W3mWhatIsAWalletView = class W3mWhatIsAWalletView extends LitElement {\n render() {\n return html `\n \n \n \n \n Get a wallet\n \n \n `;\n }\n onGetWallet() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_GET_WALLET' });\n RouterController.push('GetWallet');\n }\n};\nW3mWhatIsAWalletView = __decorate([\n customElement('w3m-what-is-a-wallet-view')\n], W3mWhatIsAWalletView);\nexport { W3mWhatIsAWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { RouterController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nlet W3mWhatIsABuyView = class W3mWhatIsABuyView extends LitElement {\n render() {\n return html `\n \n \n \n \n Quickly and easily buy digital assets!\n \n \n Simply select your preferred onramp provider and add digital assets to your account\n using your credit card or bank transfer\n \n \n \n \n Buy\n \n \n `;\n }\n};\nW3mWhatIsABuyView = __decorate([\n customElement('w3m-what-is-a-buy-view')\n], W3mWhatIsABuyView);\nexport { W3mWhatIsABuyView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-loading-spinner {\n margin: 9px auto;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { RouterController, SnackController, ConnectorController, CoreHelperUtil } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { W3mFrameHelpers } from '@web3modal/wallet';\nconst OTP_LENGTH = 6;\nlet W3mEmailOtpWidget = class W3mEmailOtpWidget extends LitElement {\n firstUpdated() {\n this.startOTPTimeout();\n }\n disconnectedCallback() {\n clearTimeout(this.OTPTimeout);\n }\n constructor() {\n super();\n this.loading = false;\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n this.error = '';\n this.otp = '';\n this.email = RouterController.state.data?.email;\n this.emailConnector = ConnectorController.getEmailConnector();\n }\n render() {\n if (!this.email) {\n throw new Error('w3m-email-otp-widget: No email provided');\n }\n const isResendDisabled = Boolean(this.timeoutTimeLeft);\n const footerLabels = this.getFooterLabels(isResendDisabled);\n return html `\n \n \n Enter the code we sent to\n ${this.email}\n \n\n The code expires in 20 minutes\n\n ${this.loading\n ? html ``\n : html ` \n \n ${this.error\n ? html `\n \n ${this.error}. Try Again\n \n `\n : null}\n `}\n\n \n ${footerLabels.title}\n \n ${footerLabels.action}\n \n \n \n `;\n }\n startOTPTimeout() {\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n this.OTPTimeout = setInterval(() => {\n if (this.timeoutTimeLeft > 0) {\n this.timeoutTimeLeft = W3mFrameHelpers.getTimeToNextEmailLogin();\n }\n else {\n clearInterval(this.OTPTimeout);\n }\n }, 1000);\n }\n async onOtpInputChange(event) {\n try {\n if (!this.loading) {\n this.otp = event.detail;\n if (this.emailConnector && this.otp.length === OTP_LENGTH) {\n this.loading = true;\n await this.onOtpSubmit?.(this.otp);\n }\n }\n }\n catch (error) {\n this.error = CoreHelperUtil.parseError(error);\n this.loading = false;\n }\n }\n async onResendCode() {\n try {\n if (this.onOtpResend) {\n if (!this.loading && !this.timeoutTimeLeft) {\n this.error = '';\n this.otp = '';\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || !this.email) {\n throw new Error('w3m-email-otp-widget: Unable to resend email');\n }\n this.loading = true;\n await this.onOtpResend(this.email);\n this.startOTPTimeout();\n SnackController.showSuccess('Code email resent');\n }\n }\n else if (this.onStartOver) {\n this.onStartOver();\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n finally {\n this.loading = false;\n }\n }\n getFooterLabels(isResendDisabled) {\n if (this.onStartOver) {\n return {\n title: 'Something wrong?',\n action: `Try again ${isResendDisabled ? `in ${this.timeoutTimeLeft}s` : ''}`\n };\n }\n return {\n title: `Didn't receive it?`,\n action: `Resend ${isResendDisabled ? `in ${this.timeoutTimeLeft}s` : 'Code'}`\n };\n }\n};\nW3mEmailOtpWidget.styles = styles;\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"timeoutTimeLeft\", void 0);\n__decorate([\n state()\n], W3mEmailOtpWidget.prototype, \"error\", void 0);\nW3mEmailOtpWidget = __decorate([\n customElement('w3m-email-otp-widget')\n], W3mEmailOtpWidget);\nexport { W3mEmailOtpWidget };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, ConnectionController, ModalController, NetworkController, RouterController, AccountController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mEmailVerifyOtpView = class W3mEmailVerifyOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.unsubscribe = [];\n this.smartAccountDeployed = AccountController.state.smartAccountDeployed;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n await this.emailConnector.provider.connectOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n await ConnectionController.connectExternal(this.emailConnector);\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'email', name: this.emailConnector.name || 'Unknown' }\n });\n if (smartAccountEnabled && !this.smartAccountDeployed) {\n RouterController.push('UpgradeToSmartAccount');\n }\n else {\n ModalController.close();\n }\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onOtpResend = async (email) => {\n if (this.emailConnector) {\n await this.emailConnector.provider.connectEmail({ email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n }\n };\n this.unsubscribe.push(AccountController.subscribeKey('smartAccountDeployed', val => {\n this.smartAccountDeployed = val;\n }));\n }\n};\n__decorate([\n state()\n], W3mEmailVerifyOtpView.prototype, \"smartAccountDeployed\", void 0);\nW3mEmailVerifyOtpView = __decorate([\n customElement('w3m-email-verify-otp-view')\n], W3mEmailVerifyOtpView);\nexport { W3mEmailVerifyOtpView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-icon-box {\n height: var(--wui-icon-box-size-xl);\n width: var(--wui-icon-box-size-xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { RouterController, ConnectorController, SnackController, EventsController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mEmailVerifyDeviceView = class W3mEmailVerifyDeviceView extends LitElement {\n constructor() {\n super();\n this.email = RouterController.state.data?.email;\n this.emailConnector = ConnectorController.getEmailConnector();\n this.loading = false;\n this.listenForDeviceApproval();\n }\n render() {\n if (!this.email) {\n throw new Error('w3m-email-verify-device-view: No email provided');\n }\n if (!this.emailConnector) {\n throw new Error('w3m-email-verify-device-view: No email connector provided');\n }\n return html `\n \n \n\n \n \n \n Approve the login link we sent to\n \n ${this.email}\n \n\n \n The code expires in 20 minutes\n \n\n \n \n Didn't receive it?\n \n \n Resend email\n \n \n \n \n `;\n }\n async listenForDeviceApproval() {\n if (this.emailConnector) {\n try {\n await this.emailConnector.provider.connectDevice();\n EventsController.sendEvent({ type: 'track', event: 'DEVICE_REGISTERED_FOR_EMAIL' });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n RouterController.replace('EmailVerifyOtp', { email: this.email });\n }\n catch (error) {\n RouterController.goBack();\n }\n }\n }\n async onResendCode() {\n try {\n if (!this.loading) {\n if (!this.emailConnector || !this.email) {\n throw new Error('w3m-email-login-widget: Unable to resend email');\n }\n this.loading = true;\n await this.emailConnector.provider.connectEmail({ email: this.email });\n this.listenForDeviceApproval();\n SnackController.showSuccess('Code email resent');\n }\n }\n catch (error) {\n SnackController.showError(error);\n }\n finally {\n this.loading = false;\n }\n }\n};\nW3mEmailVerifyDeviceView.styles = styles;\n__decorate([\n state()\n], W3mEmailVerifyDeviceView.prototype, \"loading\", void 0);\nW3mEmailVerifyDeviceView = __decorate([\n customElement('w3m-email-verify-device-view')\n], W3mEmailVerifyDeviceView);\nexport { W3mEmailVerifyDeviceView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n div {\n width: 100%;\n height: 400px;\n }\n\n [data-ready='false'] {\n transform: scale(1.05);\n }\n\n @media (max-width: 430px) {\n [data-ready='false'] {\n transform: translateY(-50px);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ModalController, ConnectorController, ThemeController, RouterController } from '@web3modal/core';\nconst PAGE_HEIGHT = 400;\nconst PAGE_WIDTH = 360;\nconst HEADER_HEIGHT = 64;\nlet W3mApproveTransactionView = class W3mApproveTransactionView extends LitElement {\n constructor() {\n super();\n this.bodyObserver = undefined;\n this.unsubscribe = [];\n this.iframe = document.getElementById('w3m-iframe');\n this.ready = false;\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', isOpen => {\n if (!isOpen) {\n this.onHideIframe();\n RouterController.popTransactionStack();\n }\n })\n ]);\n }\n disconnectedCallback() {\n this.onHideIframe();\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.bodyObserver?.unobserve(window.document.body);\n }\n async firstUpdated() {\n await this.syncTheme();\n this.iframe.style.display = 'block';\n this.bodyObserver = new ResizeObserver(() => {\n this.iframe.style.width = `${PAGE_WIDTH}px`;\n this.iframe.style.height = `${PAGE_HEIGHT}px`;\n this.iframe.style.left = `calc(50% - ${PAGE_WIDTH / 2}px)`;\n this.iframe.style.top = `calc(50% - ${PAGE_HEIGHT / 2}px + ${HEADER_HEIGHT / 2}px)`;\n this.ready = true;\n });\n this.bodyObserver.observe(window.document.body);\n }\n render() {\n if (this.ready) {\n this.onShowIframe();\n }\n return html `
      `;\n }\n onShowIframe() {\n const isMobile = window.innerWidth <= 430;\n this.iframe.animate([\n { opacity: 0, transform: isMobile ? 'translateY(50px)' : 'scale(.95)' },\n { opacity: 1, transform: isMobile ? 'translateY(0)' : 'scale(1)' }\n ], { duration: 200, easing: 'ease', fill: 'forwards' });\n }\n async onHideIframe() {\n this.iframe.style.display = 'none';\n await this.iframe.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n }\n async syncTheme() {\n const emailConnector = ConnectorController.getEmailConnector();\n if (emailConnector) {\n await emailConnector.provider.syncTheme({\n themeVariables: ThemeController.getSnapshot().themeVariables\n });\n }\n }\n};\nW3mApproveTransactionView.styles = styles;\n__decorate([\n state()\n], W3mApproveTransactionView.prototype, \"ready\", void 0);\nW3mApproveTransactionView = __decorate([\n customElement('w3m-approve-transaction-view')\n], W3mApproveTransactionView);\nexport { W3mApproveTransactionView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { ConstantsUtil } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nlet W3mUpgradeWalletView = class W3mUpgradeWalletView extends LitElement {\n render() {\n return html `\n \n Follow the instructions on\n \n \n \n You will have to reconnect for security reasons\n \n \n `;\n }\n};\nW3mUpgradeWalletView = __decorate([\n customElement('w3m-upgrade-wallet-view')\n], W3mUpgradeWalletView);\nexport { W3mUpgradeWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { ConnectorController, RouterController, SnackController } from '@web3modal/core';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mUpgradeToSmartAccountView = class W3mUpgradeToSmartAccountView extends LitElement {\n constructor() {\n super(...arguments);\n this.emailConnector = ConnectorController.getEmailConnector();\n this.loading = false;\n this.setPreferSmartAccount = async () => {\n if (this.emailConnector) {\n try {\n this.loading = true;\n await this.emailConnector.provider.setPreferredAccount(W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT);\n await this.emailConnector.provider.connect();\n this.loading = false;\n RouterController.push('Account');\n }\n catch (e) {\n SnackController.showError('Error upgrading to smart account');\n }\n }\n };\n }\n render() {\n return html `\n \n ${this.onboardingTemplate()} ${this.buttonsTemplate()}\n \n Learn more\n \n \n \n `;\n }\n onboardingTemplate() {\n return html ` \n \n \n \n \n \n \n \n Discover Smart Accounts\n \n \n Access advanced features such as username, social login, improved security and a smoother\n user experience!\n \n \n `;\n }\n buttonsTemplate() {\n return html `\n \n Do it later\n \n Continue\n \n `;\n }\n redirectToAccount() {\n RouterController.push('Account');\n }\n};\n__decorate([\n state()\n], W3mUpgradeToSmartAccountView.prototype, \"emailConnector\", void 0);\n__decorate([\n state()\n], W3mUpgradeToSmartAccountView.prototype, \"loading\", void 0);\nW3mUpgradeToSmartAccountView = __decorate([\n customElement('w3m-upgrade-to-smart-account-view')\n], W3mUpgradeToSmartAccountView);\nexport { W3mUpgradeToSmartAccountView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-email-input {\n width: 100%;\n }\n\n form {\n width: 100%;\n display: block;\n position: relative;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectorController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ref, createRef } from 'lit/directives/ref.js';\nimport styles from './styles.js';\nimport { SnackController, RouterController, EventsController } from '@web3modal/core';\nlet W3mUpdateEmailWalletView = class W3mUpdateEmailWalletView extends LitElement {\n constructor() {\n super(...arguments);\n this.formRef = createRef();\n this.initialEmail = RouterController.state.data?.email ?? '';\n this.email = '';\n this.loading = false;\n }\n firstUpdated() {\n this.formRef.value?.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n this.onSubmitEmail(event);\n }\n });\n }\n render() {\n const showSubmit = !this.loading && this.email.length > 3 && this.email !== this.initialEmail;\n return html `\n \n
      \n \n \n \n \n\n \n \n Cancel\n \n\n \n Save\n \n \n
      \n `;\n }\n onEmailInputChange(event) {\n this.email = event.detail;\n }\n async onSubmitEmail(event) {\n try {\n if (this.loading) {\n return;\n }\n this.loading = true;\n event.preventDefault();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n throw new Error('w3m-update-email-wallet: Email connector not found');\n }\n const response = await emailConnector.provider.updateEmail({ email: this.email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_EDIT' });\n if (response.action === 'VERIFY_SECONDARY_OTP') {\n RouterController.push('UpdateEmailSecondaryOtp', {\n email: this.initialEmail,\n newEmail: this.email\n });\n }\n else {\n RouterController.push('UpdateEmailPrimaryOtp', {\n email: this.initialEmail,\n newEmail: this.email\n });\n }\n }\n catch (error) {\n SnackController.showError(error);\n this.loading = false;\n }\n }\n};\nW3mUpdateEmailWalletView.styles = styles;\n__decorate([\n state()\n], W3mUpdateEmailWalletView.prototype, \"email\", void 0);\n__decorate([\n state()\n], W3mUpdateEmailWalletView.prototype, \"loading\", void 0);\nW3mUpdateEmailWalletView = __decorate([\n customElement('w3m-update-email-wallet-view')\n], W3mUpdateEmailWalletView);\nexport { W3mUpdateEmailWalletView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nlet W3mUpdateEmailPrimaryOtpView = class W3mUpdateEmailPrimaryOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.email = RouterController.state.data?.email;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n await this.emailConnector.provider.updateEmailPrimaryOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n RouterController.replace('UpdateEmailSecondaryOtp', RouterController.state.data);\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onStartOver = () => {\n RouterController.replace('UpdateEmailWallet', RouterController.state.data);\n };\n }\n};\nW3mUpdateEmailPrimaryOtpView = __decorate([\n customElement('w3m-update-email-primary-otp-view')\n], W3mUpdateEmailPrimaryOtpView);\nexport { W3mUpdateEmailPrimaryOtpView };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { W3mEmailOtpWidget } from '../../utils/w3m-email-otp-widget/index.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nlet W3mUpdateEmailSecondaryOtpView = class W3mUpdateEmailSecondaryOtpView extends W3mEmailOtpWidget {\n constructor() {\n super();\n this.email = RouterController.state.data?.newEmail;\n this.onOtpSubmit = async (otp) => {\n try {\n if (this.emailConnector) {\n await this.emailConnector.provider.updateEmailSecondaryOtp({ otp });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });\n RouterController.reset('Account');\n }\n }\n catch (error) {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });\n throw error;\n }\n };\n this.onStartOver = () => {\n RouterController.replace('UpdateEmailWallet', RouterController.state.data);\n };\n }\n};\nW3mUpdateEmailSecondaryOtpView = __decorate([\n customElement('w3m-update-email-secondary-otp-view')\n], W3mUpdateEmailSecondaryOtpView);\nexport { W3mUpdateEmailSecondaryOtpView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n :host > wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, ConnectionController, CoreHelperUtil, EventsController, ModalController, NetworkController, RouterController, RouterUtil, SnackController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mUnsupportedChainView = class W3mUnsupportedChainView extends LitElement {\n constructor() {\n super(...arguments);\n this.disconecting = false;\n }\n render() {\n return html `\n \n \n \n This app doesn’t support your current network. Switch to an available option following\n to continue.\n \n \n\n \n ${this.networksTemplate()}\n \n\n \n \n \n Disconnect\n \n \n \n `;\n }\n networksTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks } = NetworkController.state;\n const sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n return sortedNetworks.map(network => html `\n this.onSwitchNetwork(network)}\n >\n \n `);\n }\n async onDisconnect() {\n try {\n this.disconecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({\n type: 'track',\n event: 'DISCONNECT_SUCCESS'\n });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconecting = false;\n }\n }\n async onSwitchNetwork(network) {\n const { isConnected } = AccountController.state;\n const { approvedCaipNetworkIds, supportsAllNetworks, caipNetwork } = NetworkController.state;\n const { data } = RouterController.state;\n if (isConnected && caipNetwork?.id !== network.id) {\n if (approvedCaipNetworkIds?.includes(network.id)) {\n await NetworkController.switchActiveNetwork(network);\n RouterUtil.navigateAfterNetworkSwitch();\n }\n else if (supportsAllNetworks) {\n RouterController.push('SwitchNetwork', { ...data, network });\n }\n }\n else if (!isConnected) {\n NetworkController.setCaipNetwork(network);\n RouterController.push('Connect');\n }\n }\n};\nW3mUnsupportedChainView.styles = styles;\n__decorate([\n state()\n], W3mUnsupportedChainView.prototype, \"disconecting\", void 0);\nW3mUnsupportedChainView = __decorate([\n customElement('w3m-unsupported-chain-view')\n], W3mUnsupportedChainView);\nexport { W3mUnsupportedChainView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-compatible-network {\n margin-top: var(--wui-spacing-l);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, NetworkController, RouterController, SnackController, ThemeController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mWalletReceiveView = class W3mWalletReceiveView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileName = val.profileName;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n SnackController.showError('Account not found');\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-wallet-receive-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html ` \n \n \n \n \n Copy your address or scan this QR code\n \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n const networks = NetworkController.getRequestedCaipNetworks();\n const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled();\n const caipNetwork = NetworkController.state.caipNetwork;\n if (this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT &&\n isNetworkEnabledForSmartAccounts) {\n if (!caipNetwork) {\n return null;\n }\n return html ``;\n }\n const slicedNetworks = networks?.filter(network => network?.imageId)?.slice(0, 5);\n const imagesArray = slicedNetworks.map(AssetUtil.getNetworkImage).filter(Boolean);\n return html ``;\n }\n onReceiveClick() {\n RouterController.push('WalletCompatibleNetworks');\n }\n onCopyClick() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n};\nW3mWalletReceiveView.styles = styles;\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mWalletReceiveView.prototype, \"preferredAccountType\", void 0);\nW3mWalletReceiveView = __decorate([\n customElement('w3m-wallet-receive-view')\n], W3mWalletReceiveView);\nexport { W3mWalletReceiveView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n max-height: clamp(360px, 540px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n }\n\n :host > wui-flex::-webkit-scrollbar {\n display: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, AssetUtil, CoreHelperUtil, NetworkController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nimport { state } from 'lit/decorators.js';\nlet W3mWalletCompatibleNetworksView = class W3mWalletCompatibleNetworksView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(AccountController.subscribeKey('preferredAccountType', val => {\n this.preferredAccountType = val;\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n const { approvedCaipNetworkIds, requestedCaipNetworks, caipNetwork } = NetworkController.state;\n const isNetworkEnabledForSmartAccounts = NetworkController.checkIfSmartAccountEnabled();\n let sortedNetworks = CoreHelperUtil.sortRequestedNetworks(approvedCaipNetworkIds, requestedCaipNetworks);\n if (isNetworkEnabledForSmartAccounts &&\n this.preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT) {\n if (!caipNetwork) {\n return null;\n }\n sortedNetworks = [caipNetwork];\n }\n return sortedNetworks.map(network => html `\n \n \n `);\n }\n};\nW3mWalletCompatibleNetworksView.styles = styles;\n__decorate([\n state()\n], W3mWalletCompatibleNetworksView.prototype, \"preferredAccountType\", void 0);\nW3mWalletCompatibleNetworksView = __decorate([\n customElement('w3m-wallet-compatible-networks-view')\n], W3mWalletCompatibleNetworksView);\nexport { W3mWalletCompatibleNetworksView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n }\n\n wui-flex {\n position: relative;\n }\n\n wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xs) !important;\n border: 5px solid var(--wui-color-bg-125);\n background: var(--wui-color-bg-175);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n }\n\n wui-button {\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n\n .inputContainer {\n height: fit-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { CoreHelperUtil, RouterController, SendController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mWalletSendView = class W3mWalletSendView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.token = SendController.state.token;\n this.sendTokenAmount = SendController.state.sendTokenAmount;\n this.receiverAddress = SendController.state.receiverAddress;\n this.message = 'Preview Send';\n this.unsubscribe.push(...[\n SendController.subscribe(val => {\n this.token = val.token;\n this.sendTokenAmount = val.sendTokenAmount;\n this.receiverAddress = val.receiverAddress;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n this.getMessage();\n return html ` \n \n \n \n \n \n \n \n ${this.message}\n \n \n `;\n }\n onButtonClick() {\n RouterController.push('WalletSendPreview');\n }\n getMessage() {\n this.message = 'Preview Send';\n if (this.receiverAddress && !CoreHelperUtil.isAddress(this.receiverAddress)) {\n this.message = 'Invalid Address';\n }\n if (!this.receiverAddress) {\n this.message = 'Add Address';\n }\n if (this.sendTokenAmount &&\n this.token &&\n this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n this.message = 'Insufficient Funds';\n }\n if (!this.sendTokenAmount) {\n this.message = 'Add Amount';\n }\n if (!this.token) {\n this.message = 'Select Token';\n }\n }\n};\nW3mWalletSendView.styles = styles;\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"token\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"sendTokenAmount\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mWalletSendView.prototype, \"message\", void 0);\nW3mWalletSendView = __decorate([\n customElement('w3m-wallet-send-view')\n], W3mWalletSendView);\nexport { W3mWalletSendView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n .contentContainer {\n height: 440px;\n overflow: scroll;\n scrollbar-width: none;\n }\n\n wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { AccountController, CoreHelperUtil, RouterController, SendController } from '@web3modal/core';\nimport { state } from 'lit/decorators.js';\nlet W3mSendSelectTokenView = class W3mSendSelectTokenView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.tokenBalance = AccountController.state.tokenBalance;\n this.search = '';\n this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {\n this.search = value;\n });\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n this.tokenBalance = val.tokenBalance;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.templateSearchInput()} ${this.templateTokens()}\n \n `;\n }\n templateSearchInput() {\n return html `\n \n \n \n `;\n }\n templateTokens() {\n if (this.search) {\n this.tokens = this.tokenBalance?.filter(token => token.name.toLowerCase().includes(this.search.toLowerCase()));\n }\n else {\n this.tokens = this.tokenBalance;\n }\n return html `\n \n \n Your tokens\n \n \n ${this.tokens && this.tokens.length > 0\n ? this.tokens.map(token => html ``)\n : html `\n \n \n No tokens found\n Your tokens will appear here\n \n Buy\n `}\n \n \n `;\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n onInputChange(event) {\n this.onDebouncedSearch(event.detail);\n }\n handleTokenClick(token) {\n SendController.setToken(token);\n SendController.setTokenAmount(undefined);\n RouterController.goBack();\n }\n};\nW3mSendSelectTokenView.styles = styles;\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"tokenBalance\", void 0);\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"tokens\", void 0);\n__decorate([\n state()\n], W3mSendSelectTokenView.prototype, \"search\", void 0);\nW3mSendSelectTokenView = __decorate([\n customElement('w3m-wallet-send-select-token-view')\n], W3mSendSelectTokenView);\nexport { W3mSendSelectTokenView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-avatar,\n wui-image {\n display: ruby;\n width: 32px;\n height: 32px;\n border-radius: var(--wui-border-radius-3xl);\n }\n\n .sendButton {\n width: 70%;\n --local-width: 100% !important;\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n\n .cancelButton {\n width: 30%;\n --local-width: 100% !important;\n --local-border-radius: var(--wui-border-radius-xs) !important;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nimport { NetworkController, RouterController, SendController } from '@web3modal/core';\nlet W3mWalletSendPreviewView = class W3mWalletSendPreviewView extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.token = SendController.state.token;\n this.sendTokenAmount = SendController.state.sendTokenAmount;\n this.receiverAddress = SendController.state.receiverAddress;\n this.caipNetwork = NetworkController.state.caipNetwork;\n this.unsubscribe.push(...[\n SendController.subscribe(val => {\n this.token = val.token;\n this.sendTokenAmount = val.sendTokenAmount;\n this.receiverAddress = val.receiverAddress;\n }),\n NetworkController.subscribeKey('caipNetwork', val => (this.caipNetwork = val))\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` \n \n \n \n Send\n ${this.sendValueTemplate()}\n \n \n \n \n \n \n \n To\n \n \n \n \n \n \n \n Review transaction carefully\n \n \n \n Cancel\n \n \n Send\n \n \n `;\n }\n sendValueTemplate() {\n if (this.token && this.sendTokenAmount) {\n const price = this.token.price;\n const totalValue = price * this.sendTokenAmount;\n return html `$${totalValue.toFixed(2)}`;\n }\n return null;\n }\n onSendClick() {\n RouterController.reset('Account');\n setTimeout(() => {\n SendController.resetSend();\n }, 200);\n }\n onCancelClick() {\n RouterController.goBack();\n }\n};\nW3mWalletSendPreviewView.styles = styles;\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"token\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"sendTokenAmount\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mWalletSendPreviewView.prototype, \"caipNetwork\", void 0);\nW3mWalletSendPreviewView = __decorate([\n customElement('w3m-wallet-send-preview-view')\n], W3mWalletSendPreviewView);\nexport { W3mWalletSendPreviewView };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-grid {\n max-height: clamp(360px, 400px, 80vh);\n overflow: scroll;\n scrollbar-width: none;\n grid-auto-rows: min-content;\n grid-template-columns: repeat(auto-fill, 76px);\n }\n\n @media (max-width: 435px) {\n wui-grid {\n grid-template-columns: repeat(auto-fill, 77px);\n }\n }\n\n wui-grid[data-scroll='false'] {\n overflow: hidden;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n\n wui-loading-spinner {\n padding-top: var(--wui-spacing-l);\n padding-bottom: var(--wui-spacing-l);\n justify-content: center;\n grid-column: 1 / span 4;\n }\n`;\n//# sourceMappingURL=styles.js.map","import { ConnectorController } from '@web3modal/core';\nexport function markWalletsAsInstalled(wallets) {\n const { connectors } = ConnectorController.state;\n const installedConnectors = connectors\n .filter(c => c.type === 'ANNOUNCED')\n .reduce((acum, val) => {\n if (!val.info?.rdns) {\n return acum;\n }\n acum[val.info.rdns] = true;\n return acum;\n }, {});\n const walletsWithInstalled = wallets.map(wallet => ({\n ...wallet,\n installed: Boolean(wallet.rdns) && Boolean(installedConnectors[wallet.rdns ?? ''])\n }));\n const sortedWallets = walletsWithInstalled.sort((a, b) => Number(b.installed) - Number(a.installed));\n return sortedWallets;\n}\n//# sourceMappingURL=markWalletsAsInstalled.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectorController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { markWalletsAsInstalled } from '../../utils/markWalletsAsInstalled.js';\nconst PAGINATOR_ID = 'local-paginator';\nlet W3mAllWalletsList = class W3mAllWalletsList extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.paginationObserver = undefined;\n this.initial = !ApiController.state.wallets.length;\n this.wallets = ApiController.state.wallets;\n this.recommended = ApiController.state.recommended;\n this.featured = ApiController.state.featured;\n this.unsubscribe.push(...[\n ApiController.subscribeKey('wallets', val => (this.wallets = val)),\n ApiController.subscribeKey('recommended', val => (this.recommended = val)),\n ApiController.subscribeKey('featured', val => (this.featured = val))\n ]);\n }\n firstUpdated() {\n this.initialFetch();\n this.createPaginationObserver();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.paginationObserver?.disconnect();\n }\n render() {\n return html `\n \n ${this.initial ? this.shimmerTemplate(16) : this.walletsTemplate()}\n ${this.paginationLoaderTemplate()}\n \n `;\n }\n async initialFetch() {\n const gridEl = this.shadowRoot?.querySelector('wui-grid');\n if (this.initial && gridEl) {\n await ApiController.fetchWallets({ page: 1 });\n await gridEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.initial = false;\n gridEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n shimmerTemplate(items, id) {\n return [...Array(items)].map(() => html `\n \n `);\n }\n walletsTemplate() {\n const wallets = [...this.featured, ...this.recommended, ...this.wallets];\n const walletsWithInstalled = markWalletsAsInstalled(wallets);\n return walletsWithInstalled.map(wallet => html `\n this.onConnectWallet(wallet)}\n .installed=${wallet.installed}\n >\n `);\n }\n paginationLoaderTemplate() {\n const { wallets, recommended, featured, count } = ApiController.state;\n const columns = window.innerWidth < 352 ? 3 : 4;\n const currentWallets = wallets.length + recommended.length;\n const minimumRows = Math.ceil(currentWallets / columns);\n let shimmerCount = minimumRows * columns - currentWallets + columns;\n shimmerCount -= wallets.length ? featured.length % columns : 0;\n if (count === 0 && featured.length > 0) {\n return null;\n }\n if (count === 0 || [...featured, ...wallets, ...recommended].length < count) {\n return this.shimmerTemplate(shimmerCount, PAGINATOR_ID);\n }\n return null;\n }\n createPaginationObserver() {\n const loaderEl = this.shadowRoot?.querySelector(`#${PAGINATOR_ID}`);\n if (loaderEl) {\n this.paginationObserver = new IntersectionObserver(([element]) => {\n if (element?.isIntersecting && !this.initial) {\n const { page, count, wallets } = ApiController.state;\n if (wallets.length < count) {\n ApiController.fetchWallets({ page: page + 1 });\n }\n }\n });\n this.paginationObserver.observe(loaderEl);\n }\n }\n onConnectWallet(wallet) {\n const connector = ConnectorController.getConnector(wallet.id, wallet.rdns);\n if (connector) {\n RouterController.push('ConnectingExternal', { connector });\n }\n else {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n }\n};\nW3mAllWalletsList.styles = styles;\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"initial\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"wallets\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"recommended\", void 0);\n__decorate([\n state()\n], W3mAllWalletsList.prototype, \"featured\", void 0);\nW3mAllWalletsList = __decorate([\n customElement('w3m-all-wallets-list')\n], W3mAllWalletsList);\nexport { W3mAllWalletsList };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-grid,\n wui-loading-spinner,\n wui-flex {\n height: 360px;\n }\n\n wui-grid {\n overflow: scroll;\n scrollbar-width: none;\n grid-auto-rows: min-content;\n }\n\n wui-grid[data-scroll='false'] {\n overflow: hidden;\n }\n\n wui-grid::-webkit-scrollbar {\n display: none;\n }\n\n wui-loading-spinner {\n justify-content: center;\n align-items: center;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ApiController, AssetUtil, ConnectorController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { markWalletsAsInstalled } from '../../utils/markWalletsAsInstalled.js';\nlet W3mAllWalletsSearch = class W3mAllWalletsSearch extends LitElement {\n constructor() {\n super(...arguments);\n this.prevQuery = '';\n this.loading = true;\n this.query = '';\n }\n render() {\n this.onSearch();\n return this.loading\n ? html ``\n : this.walletsTemplate();\n }\n async onSearch() {\n if (this.query !== this.prevQuery) {\n this.prevQuery = this.query;\n this.loading = true;\n await ApiController.searchWallet({ search: this.query });\n this.loading = false;\n }\n }\n walletsTemplate() {\n const { search } = ApiController.state;\n const wallets = markWalletsAsInstalled(search);\n if (!search.length) {\n return html `\n \n \n No Wallet found\n \n `;\n }\n return html `\n \n ${wallets.map(wallet => html `\n this.onConnectWallet(wallet)}\n .installed=${wallet.installed}\n >\n `)}\n \n `;\n }\n onConnectWallet(wallet) {\n const connector = ConnectorController.getConnector(wallet.id, wallet.rdns);\n if (connector) {\n RouterController.push('ConnectingExternal', { connector });\n }\n else {\n RouterController.push('ConnectingWalletConnect', { wallet });\n }\n }\n};\nW3mAllWalletsSearch.styles = styles;\n__decorate([\n state()\n], W3mAllWalletsSearch.prototype, \"loading\", void 0);\n__decorate([\n property()\n], W3mAllWalletsSearch.prototype, \"query\", void 0);\nW3mAllWalletsSearch = __decorate([\n customElement('w3m-all-wallets-search')\n], W3mAllWalletsSearch);\nexport { W3mAllWalletsSearch };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nlet W3mConnectingHeader = class W3mConnectingHeader extends LitElement {\n constructor() {\n super();\n this.platformTabs = [];\n this.unsubscribe = [];\n this.platforms = [];\n this.onSelectPlatfrom = undefined;\n this.buffering = false;\n this.unsubscribe.push(ConnectionController.subscribeKey('buffering', val => (this.buffering = val)));\n }\n disconnectCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const tabs = this.generateTabs();\n return html `\n \n \n \n `;\n }\n generateTabs() {\n const tabs = this.platforms.map(platform => {\n if (platform === 'browser') {\n return { label: 'Browser', icon: 'extension', platform: 'browser' };\n }\n else if (platform === 'mobile') {\n return { label: 'Mobile', icon: 'mobile', platform: 'mobile' };\n }\n else if (platform === 'qrcode') {\n return { label: 'Mobile', icon: 'mobile', platform: 'qrcode' };\n }\n else if (platform === 'web') {\n return { label: 'Webapp', icon: 'browser', platform: 'web' };\n }\n else if (platform === 'desktop') {\n return { label: 'Desktop', icon: 'desktop', platform: 'desktop' };\n }\n return { label: 'Browser', icon: 'extension', platform: 'unsupported' };\n });\n this.platformTabs = tabs.map(({ platform }) => platform);\n return tabs;\n }\n onTabChange(index) {\n const tab = this.platformTabs[index];\n if (tab) {\n this.onSelectPlatfrom?.(tab);\n }\n }\n};\n__decorate([\n property({ type: Array })\n], W3mConnectingHeader.prototype, \"platforms\", void 0);\n__decorate([\n property()\n], W3mConnectingHeader.prototype, \"onSelectPlatfrom\", void 0);\n__decorate([\n state()\n], W3mConnectingHeader.prototype, \"buffering\", void 0);\nW3mConnectingHeader = __decorate([\n customElement('w3m-connecting-header')\n], W3mConnectingHeader);\nexport { W3mConnectingHeader };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, ConnectorController, EventsController, ModalController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcBrowser = class W3mConnectingWcBrowser extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-browser: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onAutoConnect = this.onConnectProxy.bind(this);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'browser' }\n });\n }\n async onConnectProxy() {\n try {\n this.error = false;\n const { connectors } = ConnectorController.state;\n const announcedConnector = connectors.find(c => c.type === 'ANNOUNCED' && c.info?.rdns === this.wallet?.rdns);\n const injectedConnector = connectors.find(c => c.type === 'INJECTED');\n if (announcedConnector) {\n await ConnectionController.connectExternal(announcedConnector);\n }\n else if (injectedConnector) {\n await ConnectionController.connectExternal(injectedConnector);\n }\n ModalController.close();\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_SUCCESS',\n properties: { method: 'browser', name: this.wallet?.name || 'Unknown' }\n });\n }\n catch (error) {\n EventsController.sendEvent({\n type: 'track',\n event: 'CONNECT_ERROR',\n properties: { message: error?.message ?? 'Unknown' }\n });\n this.error = true;\n }\n }\n};\nW3mConnectingWcBrowser = __decorate([\n customElement('w3m-connecting-wc-browser')\n], W3mConnectingWcBrowser);\nexport { W3mConnectingWcBrowser };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcDesktop = class W3mConnectingWcDesktop extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-desktop: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onRender = this.onRenderProxy.bind(this);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'desktop' }\n });\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.ready = true;\n this.timeout = setTimeout(() => {\n this.onConnect?.();\n }, 200);\n }\n }\n onConnectProxy() {\n if (this.wallet?.desktop_link && this.uri) {\n try {\n this.error = false;\n const { desktop_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatNativeUrl(desktop_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_blank');\n }\n catch {\n this.error = true;\n }\n }\n }\n};\nW3mConnectingWcDesktop = __decorate([\n customElement('w3m-connecting-wc-desktop')\n], W3mConnectingWcDesktop);\nexport { W3mConnectingWcDesktop };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcMobile = class W3mConnectingWcMobile extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-mobile: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.onRender = this.onRenderProxy.bind(this);\n document.addEventListener('visibilitychange', this.onBuffering.bind(this));\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'mobile' }\n });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('visibilitychange', this.onBuffering.bind(this));\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.ready = true;\n this.onConnect?.();\n }\n }\n onConnectProxy() {\n if (this.wallet?.mobile_link && this.uri) {\n try {\n this.error = false;\n const { mobile_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatNativeUrl(mobile_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_self');\n }\n catch {\n this.error = true;\n }\n }\n }\n onBuffering() {\n const isIos = CoreHelperUtil.isIos();\n if (document?.visibilityState === 'visible' && !this.error && isIos) {\n ConnectionController.setBuffering(true);\n setTimeout(() => {\n ConnectionController.setBuffering(false);\n }, 5000);\n }\n }\n};\nW3mConnectingWcMobile = __decorate([\n customElement('w3m-connecting-wc-mobile')\n], W3mConnectingWcMobile);\nexport { W3mConnectingWcMobile };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n wui-shimmer {\n width: 100%;\n aspect-ratio: 1 / 1;\n border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;\n }\n\n wui-qr-code {\n opacity: 0;\n animation-duration: 200ms;\n animation-timing-function: ease;\n animation-name: fadein;\n animation-fill-mode: forwards;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, ConnectionController, EventsController, ThemeController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nimport styles from './styles.js';\nlet W3mConnectingWcQrcode = class W3mConnectingWcQrcode extends W3mConnectingWidget {\n constructor() {\n super();\n this.forceUpdate = () => {\n this.requestUpdate();\n };\n window.addEventListener('resize', this.forceUpdate);\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet?.name ?? 'WalletConnect', platform: 'qrcode' }\n });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('resize', this.forceUpdate);\n }\n render() {\n this.onRenderProxy();\n return html `\n \n ${this.qrCodeTemplate()} \n\n \n Scan this QR Code with your phone\n \n ${this.copyTemplate()}\n \n\n \n `;\n }\n onRenderProxy() {\n if (!this.ready && this.uri) {\n this.timeout = setTimeout(() => {\n this.ready = true;\n }, 200);\n }\n }\n qrCodeTemplate() {\n if (!this.uri || !this.ready) {\n return null;\n }\n const size = this.getBoundingClientRect().width - 40;\n const alt = this.wallet ? this.wallet.name : undefined;\n ConnectionController.setWcLinking(undefined);\n ConnectionController.setRecentWallet(this.wallet);\n return html ` `;\n }\n copyTemplate() {\n const inactive = !this.uri || !this.ready;\n return html `\n \n Copy link\n `;\n }\n};\nW3mConnectingWcQrcode.styles = styles;\nW3mConnectingWcQrcode = __decorate([\n customElement('w3m-connecting-wc-qrcode')\n], W3mConnectingWcQrcode);\nexport { W3mConnectingWcQrcode };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AssetUtil, EventsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mConnectingWcUnsupported = class W3mConnectingWcUnsupported extends LitElement {\n constructor() {\n super();\n this.wallet = RouterController.state.data?.wallet;\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-unsupported: No wallet provided');\n }\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'browser' }\n });\n }\n render() {\n return html `\n \n \n\n Not Detected\n \n\n \n `;\n }\n};\nW3mConnectingWcUnsupported = __decorate([\n customElement('w3m-connecting-wc-unsupported')\n], W3mConnectingWcUnsupported);\nexport { W3mConnectingWcUnsupported };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, CoreHelperUtil, EventsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js';\nlet W3mConnectingWcWeb = class W3mConnectingWcWeb extends W3mConnectingWidget {\n constructor() {\n super();\n if (!this.wallet) {\n throw new Error('w3m-connecting-wc-web: No wallet provided');\n }\n this.onConnect = this.onConnectProxy.bind(this);\n this.secondaryBtnLabel = 'Open';\n this.secondaryLabel = 'Open and continue in a new browser tab';\n this.secondaryBtnIcon = 'externalLink';\n EventsController.sendEvent({\n type: 'track',\n event: 'SELECT_WALLET',\n properties: { name: this.wallet.name, platform: 'web' }\n });\n }\n onConnectProxy() {\n if (this.wallet?.webapp_link && this.uri) {\n try {\n this.error = false;\n const { webapp_link, name } = this.wallet;\n const { redirect, href } = CoreHelperUtil.formatUniversalUrl(webapp_link, this.uri);\n ConnectionController.setWcLinking({ name, href });\n ConnectionController.setRecentWallet(this.wallet);\n CoreHelperUtil.openHref(redirect, '_blank');\n }\n catch {\n this.error = true;\n }\n }\n }\n};\nW3mConnectingWcWeb = __decorate([\n customElement('w3m-connecting-wc-web')\n], W3mConnectingWcWeb);\nexport { W3mConnectingWcWeb };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n .details-container > wui-flex {\n background: var(--wui-gray-glass-002);\n border-radius: var(--wui-border-radius-xxs);\n width: 100%;\n }\n\n .details-container > wui-flex > button {\n border: none;\n background: none;\n padding: var(--wui-spacing-s);\n border-radius: var(--wui-border-radius-xxs);\n cursor: pointer;\n }\n\n .details-content-container {\n padding: var(--wui-spacing-1xs);\n padding-top: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .details-content-container > wui-flex {\n width: 100%;\n }\n\n .details-row {\n width: 100%;\n padding: var(--wui-spacing-s);\n padding-left: var(--wui-spacing-s);\n padding-right: var(--wui-spacing-1xs);\n border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs));\n background: var(--wui-gray-glass-002);\n }\n\n .details-row.provider-free-row {\n padding-right: var(--wui-spacing-xs);\n }\n\n .free-badge {\n background: rgba(38, 217, 98, 0.15);\n border-radius: var(--wui-border-radius-4xs);\n padding: 4.5px 6px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nlet WuiConvertDetails = class WuiConvertDetails extends LitElement {\n constructor() {\n super(...arguments);\n this.detailsOpen = false;\n this.slippageRate = 1;\n }\n render() {\n return html `\n \n \n \n ${this.detailsOpen\n ? html `\n \n \n \n Network cost\n \n $${UiHelperUtil.formatNumberToLocalString(this.gasPriceInUSD, 3)}\n \n \n \n ${this.priceImpact\n ? html ` \n \n Price impact\n \n \n ${UiHelperUtil.formatNumberToLocalString(this.priceImpact, 3)}%\n \n \n \n `\n : null}\n ${this.maxSlippage && this.sourceTokenSymbol\n ? html `\n \n Max. slippage\n \n \n ${UiHelperUtil.formatNumberToLocalString(this.maxSlippage, 6)}\n ${this.sourceTokenSymbol} ${this.slippageRate}%\n \n \n \n `\n : null}\n \n \n Provider fee\n \n Free\n \n \n \n \n `\n : null}\n \n \n `;\n }\n toggleDetails() {\n this.detailsOpen = !this.detailsOpen;\n }\n};\nWuiConvertDetails.styles = [styles];\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"detailsOpen\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"sourceTokenSymbol\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"sourceTokenPrice\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"toTokenSymbol\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"toTokenConvertedAmount\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"gasPriceInUSD\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"priceImpact\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"slippageRate\", void 0);\n__decorate([\n property()\n], WuiConvertDetails.prototype, \"maxSlippage\", void 0);\nWuiConvertDetails = __decorate([\n customElement('w3m-convert-details')\n], WuiConvertDetails);\nexport { WuiConvertDetails };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host > wui-flex {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-radius: var(--wui-border-radius-s);\n padding: var(--wui-spacing-xl);\n padding-right: var(--wui-spacing-s);\n width: 100%;\n height: 100px;\n box-sizing: border-box;\n position: relative;\n }\n\n :host > wui-flex > svg.input_mask {\n position: absolute;\n inset: 0;\n z-index: 5;\n }\n\n :host wui-flex .input_mask__border,\n :host wui-flex .input_mask__background {\n transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1);\n will-change: fill;\n }\n\n :host wui-flex .input_mask__border {\n fill: var(--wui-gray-glass-005);\n }\n\n :host wui-flex .input_mask__background {\n fill: var(--wui-gray-glass-002);\n }\n\n :host wui-flex.focus .input_mask__border {\n fill: var(--wui-gray-glass-020);\n }\n\n :host > wui-flex .swap-input,\n :host > wui-flex .swap-token-button {\n z-index: 10;\n }\n\n :host > wui-flex .swap-input {\n -webkit-mask-image: linear-gradient(\n 270deg,\n transparent 0px,\n transparent 8px,\n black 24px,\n black 25px,\n black 32px,\n black 100%\n );\n mask-image: linear-gradient(\n 270deg,\n transparent 0px,\n transparent 8px,\n black 24px,\n black 25px,\n black 32px,\n black 100%\n );\n }\n\n :host > wui-flex .swap-input input {\n background: none;\n border: none;\n height: 42px;\n width: 100%;\n font-size: 32px;\n font-style: normal;\n font-weight: 400;\n line-height: 130%;\n letter-spacing: -1.28px;\n outline: none;\n caret-color: var(--wui-color-accent-100);\n color: var(--wui-color-fg-100);\n }\n\n :host > wui-flex .swap-input input:focus-visible {\n outline: none;\n }\n\n :host > wui-flex .swap-input input::-webkit-outer-spin-button,\n :host > wui-flex .swap-input input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .token-select-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-xxs);\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-1xs);\n height: 40px;\n border: none;\n border-radius: 80px;\n background: var(--wui-gray-glass-002);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n cursor: pointer;\n transition: background 0.2s linear;\n }\n\n .token-select-button:hover {\n background: var(--wui-gray-glass-005);\n }\n\n .token-select-button wui-image {\n width: 24px;\n height: 24px;\n border-radius: var(--wui-border-radius-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);\n }\n\n .max-value-button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n color: var(--wui-gray-glass-020);\n padding-left: 0px;\n }\n\n .market-value {\n min-height: 18px;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { EventsController, RouterController } from '@web3modal/core';\nimport { NumberUtil } from '@web3modal/common';\nimport { UiHelperUtil, customElement, convertInputMaskBottomSvg, convertInputMaskTopSvg } from '@web3modal/ui';\nimport styles from './styles.js';\nconst MINIMUM_USD_VALUE_TO_CONVERT = 0.00005;\nlet W3mConvertInput = class W3mConvertInput extends LitElement {\n constructor() {\n super(...arguments);\n this.focused = false;\n this.price = 0;\n this.marketValue = '$1.0345,00';\n this.target = 'sourceToken';\n this.onSetAmount = null;\n this.onSetMaxValue = null;\n }\n render() {\n const marketValue = this.marketValue || '0';\n const isMarketValueGreaterThanZero = NumberUtil.bigNumber(marketValue).isGreaterThan(0);\n return html `\n \n ${this.target === 'sourceToken' ? convertInputMaskTopSvg : convertInputMaskBottomSvg}\n \n this.onFocusChange(true)}\n @focusout=${() => this.onFocusChange(false)}\n ?disabled=${this.disabled}\n .value=${this.value}\n @input=${this.dispatchInputChangeEvent}\n @keydown=${this.handleKeydown}\n placeholder=\"0\"\n />\n \n ${isMarketValueGreaterThanZero ? `$${this.marketValue}` : null}\n \n \n ${this.templateTokenSelectButton()}\n \n `;\n }\n handleKeydown(event) {\n const allowedKeys = [\n 'Backspace',\n 'Meta',\n 'Ctrl',\n 'a',\n 'c',\n 'v',\n 'ArrowLeft',\n 'ArrowRight',\n 'Tab'\n ];\n const isComma = event.key === ',';\n const isDot = event.key === '.';\n const isNumericKey = event.key >= '0' && event.key <= '9';\n const currentValue = this.value;\n if (!isNumericKey && !allowedKeys.includes(event.key) && !isDot && !isComma) {\n event.preventDefault();\n }\n if (isComma || isDot) {\n if (currentValue?.includes('.') || currentValue?.includes(',')) {\n event.preventDefault();\n }\n }\n }\n dispatchInputChangeEvent(event) {\n if (!this.onSetAmount) {\n return;\n }\n const value = event.target.value;\n if (value === ',' || value === '.') {\n this.onSetAmount(this.target, '0.');\n }\n else if (value.endsWith(',')) {\n this.onSetAmount(this.target, value.replace(',', '.'));\n }\n else {\n this.onSetAmount(this.target, value);\n }\n }\n setMaxValueToInput() {\n this.onSetMaxValue?.(this.target, this.balance);\n }\n templateTokenSelectButton() {\n if (!this.token) {\n return html ` \n Select token\n `;\n }\n const tokenElement = this.token.logoUri\n ? html ``\n : html `\n \n `;\n return html `\n \n \n ${tokenElement}\n ${this.token.symbol}\n \n ${this.tokenBalanceTemplate()} \n \n `;\n }\n tokenBalanceTemplate() {\n const balanceValueInUSD = NumberUtil.multiply(this.balance, this.price);\n const haveBalance = balanceValueInUSD\n ? balanceValueInUSD?.isGreaterThan(MINIMUM_USD_VALUE_TO_CONVERT)\n : false;\n return html `\n ${haveBalance\n ? html `\n ${UiHelperUtil.formatNumberToLocalString(this.balance, 3)}\n `\n : null}\n ${this.target === 'sourceToken' ? this.tokenActionButtonTemplate(haveBalance) : null}\n `;\n }\n tokenActionButtonTemplate(haveBalance) {\n if (haveBalance) {\n return html ` `;\n }\n return html ` `;\n }\n onFocusChange(state) {\n this.focused = state;\n }\n onSelectToken() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_SELECT_TOKEN_TO_SWAP' });\n RouterController.push('ConvertSelectToken', {\n target: this.target\n });\n }\n onBuyToken() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mConvertInput.styles = [styles];\n__decorate([\n property()\n], W3mConvertInput.prototype, \"focused\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"balance\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"value\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"price\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"marketValue\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"target\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"token\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"onSetAmount\", void 0);\n__decorate([\n property()\n], W3mConvertInput.prototype, \"onSetMaxValue\", void 0);\nW3mConvertInput = __decorate([\n customElement('w3m-convert-input')\n], W3mConvertInput);\nexport { W3mConvertInput };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-icon-link[data-hidden='true'] {\n opacity: 0 !important;\n pointer-events: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectionController, ConnectorController, EventsController, ModalController, OptionsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nfunction headings() {\n const connectorName = RouterController.state.data?.connector?.name;\n const walletName = RouterController.state.data?.wallet?.name;\n const networkName = RouterController.state.data?.network?.name;\n const name = walletName ?? connectorName;\n const connectors = ConnectorController.getConnectors();\n const isEmail = connectors.length === 1 && connectors[0]?.id === 'w3m-email';\n return {\n Connect: `Connect ${isEmail ? 'Email' : ''} Wallet`,\n Account: undefined,\n AccountSettings: undefined,\n ConnectingExternal: name ?? 'Connect Wallet',\n ConnectingWalletConnect: name ?? 'WalletConnect',\n ConnectingSiwe: 'Sign In',\n Networks: 'Choose Network',\n SwitchNetwork: networkName ?? 'Switch Network',\n AllWallets: 'All Wallets',\n WhatIsANetwork: 'What is a network?',\n WhatIsAWallet: 'What is a wallet?',\n GetWallet: 'Get a wallet',\n Downloads: name ? `Get ${name}` : 'Downloads',\n EmailVerifyOtp: 'Confirm Email',\n EmailVerifyDevice: 'Register Device',\n ApproveTransaction: 'Approve Transaction',\n Transactions: 'Activity',\n UpgradeEmailWallet: 'Upgrade your Wallet',\n UpgradeToSmartAccount: undefined,\n UpdateEmailWallet: 'Edit Email',\n UpdateEmailPrimaryOtp: 'Confirm Current Email',\n UpdateEmailSecondaryOtp: 'Confirm New Email',\n UnsupportedChain: 'Switch Network',\n OnRampProviders: 'Choose Provider',\n OnRampActivity: 'Activity',\n WhatIsABuy: 'What is Buy?',\n BuyInProgress: 'Buy',\n OnRampTokenSelect: 'Select Token',\n OnRampFiatSelect: 'Select Currency',\n WalletReceive: 'Receive',\n WalletCompatibleNetworks: 'Compatible Networks',\n Convert: 'Convert',\n ConvertSelectToken: 'Select token',\n ConvertPreview: 'Preview convert',\n WalletSend: 'Send',\n WalletSendPreview: 'Review send',\n WalletSendSelectToken: 'Select Token'\n };\n}\nlet W3mHeader = class W3mHeader extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.heading = headings()[RouterController.state.view];\n this.buffering = false;\n this.showBack = false;\n this.unsubscribe.push(RouterController.subscribeKey('view', val => {\n this.onViewChange(val);\n this.onHistoryChange();\n }), ConnectionController.subscribeKey('buffering', val => (this.buffering = val)));\n }\n disconnectCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `\n \n ${this.dynamicButtonTemplate()} ${this.titleTemplate()}\n \n \n ${this.separatorTemplate()}\n `;\n }\n onWalletHelp() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_WALLET_HELP' });\n RouterController.push('WhatIsAWallet');\n }\n async onClose() {\n if (OptionsController.state.isSiweEnabled) {\n const { SIWEController } = await import('@web3modal/siwe');\n if (SIWEController.state.status !== 'success') {\n await ConnectionController.disconnect();\n }\n }\n ModalController.close();\n }\n titleTemplate() {\n return html `${this.heading}`;\n }\n dynamicButtonTemplate() {\n const { view } = RouterController.state;\n const isConnectHelp = view === 'Connect';\n const isApproveTransaction = view === 'ApproveTransaction';\n const isUpgradeToSmartAccounts = view === 'UpgradeToSmartAccount';\n const shouldHideBack = isApproveTransaction || isUpgradeToSmartAccounts;\n if (this.showBack && !shouldHideBack) {\n return html ``;\n }\n return html ``;\n }\n separatorTemplate() {\n if (!this.heading) {\n return null;\n }\n return html ``;\n }\n getPadding() {\n if (this.heading) {\n return ['l', '2l', 'l', '2l'];\n }\n return ['l', '2l', '0', '2l'];\n }\n async onViewChange(view) {\n const headingEl = this.shadowRoot?.querySelector('wui-text');\n if (headingEl) {\n const preset = headings()[view];\n await headingEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.heading = preset;\n headingEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n async onHistoryChange() {\n const { history } = RouterController.state;\n const buttonEl = this.shadowRoot?.querySelector('#dynamic');\n if (history.length > 1 && !this.showBack && buttonEl) {\n await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.showBack = true;\n buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n else if (history.length <= 1 && this.showBack && buttonEl) {\n await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n }).finished;\n this.showBack = false;\n buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: 200,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n onGoBack() {\n if (RouterController.state.view === 'ConnectingSiwe') {\n RouterController.push('Connect');\n }\n else {\n RouterController.goBack();\n }\n }\n};\nW3mHeader.styles = [styles];\n__decorate([\n state()\n], W3mHeader.prototype, \"heading\", void 0);\n__decorate([\n state()\n], W3mHeader.prototype, \"buffering\", void 0);\n__decorate([\n state()\n], W3mHeader.prototype, \"showBack\", void 0);\nW3mHeader = __decorate([\n customElement('w3m-header')\n], W3mHeader);\nexport { W3mHeader };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nlet W3mHelpWidget = class W3mHelpWidget extends LitElement {\n constructor() {\n super(...arguments);\n this.data = [];\n }\n render() {\n return html `\n \n ${this.data.map(item => html `\n \n \n ${item.images.map(image => html ``)}\n \n \n \n \n ${item.title}\n \n ${item.text}\n \n `)}\n \n `;\n }\n};\n__decorate([\n property({ type: Array })\n], W3mHelpWidget.prototype, \"data\", void 0);\nW3mHelpWidget = __decorate([\n customElement('w3m-help-widget')\n], W3mHelpWidget);\nexport { W3mHelpWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n wui-loading-spinner {\n position: absolute;\n top: 50%;\n right: 20px;\n transform: translateY(-50%);\n }\n\n .currency-container {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: var(--wui-spacing-1xs);\n height: 40px;\n padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)\n var(--wui-spacing-xs);\n min-width: 95px;\n border-radius: var(--FULL, 1000px);\n border: 1px solid var(--wui-gray-glass-002);\n background: var(--wui-gray-glass-002);\n cursor: pointer;\n }\n\n .currency-container > wui-image {\n height: 24px;\n width: 24px;\n border-radius: 50%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { customElement } from '@web3modal/ui';\nimport styles from './styles.js';\nimport { AssetController, ModalController, OnRampController } from '@web3modal/core';\nlet W3mInputCurrency = class W3mInputCurrency extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.type = 'Token';\n this.value = 0;\n this.currencies = [];\n this.selectedCurrency = this.currencies?.[0];\n this.currencyImages = AssetController.state.currencyImages;\n this.tokenImages = AssetController.state.tokenImages;\n this.unsubscribe.push(OnRampController.subscribeKey('purchaseCurrency', val => {\n if (!val || this.type === 'Fiat') {\n return;\n }\n this.selectedCurrency = this.formatPurchaseCurrency(val);\n }), OnRampController.subscribeKey('paymentCurrency', val => {\n if (!val || this.type === 'Token') {\n return;\n }\n this.selectedCurrency = this.formatPaymentCurrency(val);\n }), OnRampController.subscribe(val => {\n if (this.type === 'Fiat') {\n this.currencies = val.purchaseCurrencies.map(this.formatPurchaseCurrency);\n }\n else {\n this.currencies = val.paymentCurrencies.map(this.formatPaymentCurrency);\n }\n }), AssetController.subscribe(val => {\n this.currencyImages = { ...val.currencyImages };\n this.tokenImages = { ...val.tokenImages };\n }));\n }\n firstUpdated() {\n OnRampController.getAvailableCurrencies();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const symbol = this.selectedCurrency?.symbol || '';\n const image = this.currencyImages[symbol] || this.tokenImages[symbol];\n return html `\n ${this.selectedCurrency\n ? html ` ModalController.open({ view: `OnRamp${this.type}Select` })}\n >\n \n ${this.selectedCurrency.symbol}\n `\n : html ``}\n `;\n }\n formatPaymentCurrency(currency) {\n return {\n name: currency.id,\n symbol: currency.id\n };\n }\n formatPurchaseCurrency(currency) {\n return {\n name: currency.name,\n symbol: currency.symbol\n };\n }\n};\nW3mInputCurrency.styles = styles;\n__decorate([\n property({ type: String })\n], W3mInputCurrency.prototype, \"type\", void 0);\n__decorate([\n property({ type: Number })\n], W3mInputCurrency.prototype, \"value\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"currencies\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"selectedCurrency\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"currencyImages\", void 0);\n__decorate([\n state()\n], W3mInputCurrency.prototype, \"tokenImages\", void 0);\nW3mInputCurrency = __decorate([\n customElement('w3m-swap-input')\n], W3mInputCurrency);\nexport { W3mInputCurrency };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n background-color: var(--wui-gray-glass-005);\n }\n\n a {\n text-decoration: none;\n color: var(--wui-color-fg-175);\n font-weight: 500;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mLegalFooter = class W3mLegalFooter extends LitElement {\n render() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n if (!termsConditionsUrl && !privacyPolicyUrl) {\n return null;\n }\n return html `\n \n \n By connecting your wallet, you agree to our
      \n ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}\n
      \n
      \n `;\n }\n andTemplate() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n return termsConditionsUrl && privacyPolicyUrl ? 'and' : '';\n }\n termsTemplate() {\n const { termsConditionsUrl } = OptionsController.state;\n if (!termsConditionsUrl) {\n return null;\n }\n return html `Terms of Service`;\n }\n privacyTemplate() {\n const { privacyPolicyUrl } = OptionsController.state;\n if (!privacyPolicyUrl) {\n return null;\n }\n return html `Privacy Policy`;\n }\n};\nW3mLegalFooter.styles = [styles];\nW3mLegalFooter = __decorate([\n customElement('w3m-legal-footer')\n], W3mLegalFooter);\nexport { W3mLegalFooter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { CoreHelperUtil, RouterController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './styles.js';\nlet W3mMobileDownloadLinks = class W3mMobileDownloadLinks extends LitElement {\n constructor() {\n super(...arguments);\n this.wallet = undefined;\n }\n render() {\n if (!this.wallet) {\n this.style.display = 'none';\n return null;\n }\n const { name, app_store, play_store, chrome_store, homepage } = this.wallet;\n const isMobile = CoreHelperUtil.isMobile();\n const isIos = CoreHelperUtil.isIos();\n const isAndroid = CoreHelperUtil.isAndroid();\n const isMultiple = [app_store, play_store, homepage, chrome_store].filter(Boolean).length > 1;\n const shortName = UiHelperUtil.getTruncateString({\n string: name,\n charsStart: 12,\n charsEnd: 0,\n truncate: 'end'\n });\n if (isMultiple && !isMobile) {\n return html `\n RouterController.push('Downloads', { wallet: this.wallet })}\n >\n `;\n }\n if (!isMultiple && homepage) {\n return html `\n \n `;\n }\n if (app_store && isIos) {\n return html `\n \n `;\n }\n if (play_store && isAndroid) {\n return html `\n \n `;\n }\n this.style.display = 'none';\n return null;\n }\n onAppStore() {\n if (this.wallet?.app_store) {\n CoreHelperUtil.openHref(this.wallet.app_store, '_blank');\n }\n }\n onPlayStore() {\n if (this.wallet?.play_store) {\n CoreHelperUtil.openHref(this.wallet.play_store, '_blank');\n }\n }\n onHomePage() {\n if (this.wallet?.homepage) {\n CoreHelperUtil.openHref(this.wallet.homepage, '_blank');\n }\n }\n};\nW3mMobileDownloadLinks.styles = [styles];\n__decorate([\n property({ type: Object })\n], W3mMobileDownloadLinks.prototype, \"wallet\", void 0);\nW3mMobileDownloadLinks = __decorate([\n customElement('w3m-mobile-download-links')\n], W3mMobileDownloadLinks);\nexport { W3mMobileDownloadLinks };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n border-top: 1px solid var(--wui-gray-glass-005);\n }\n\n a {\n text-decoration: none;\n color: var(--wui-color-fg-175);\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-3xs);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { OptionsController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mOnRampProvidersFooter = class W3mOnRampProvidersFooter extends LitElement {\n render() {\n const { termsConditionsUrl, privacyPolicyUrl } = OptionsController.state;\n if (!termsConditionsUrl && !privacyPolicyUrl) {\n return null;\n }\n return html `\n \n \n We work with the best providers to give you the lowest fees and best support. More options\n coming soon!\n \n\n ${this.howDoesItWorkTemplate()}\n \n `;\n }\n howDoesItWorkTemplate() {\n return html ` \n \n How does it work?\n `;\n }\n onWhatIsBuy() {\n RouterController.push('WhatIsABuy');\n }\n};\nW3mOnRampProvidersFooter.styles = [styles];\nW3mOnRampProvidersFooter = __decorate([\n customElement('w3m-onramp-providers-footer')\n], W3mOnRampProvidersFooter);\nexport { W3mOnRampProvidersFooter };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: block;\n position: absolute;\n opacity: 0;\n pointer-events: none;\n top: 11px;\n left: 50%;\n width: max-content;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { SnackController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst presets = {\n success: {\n backgroundColor: 'success-100',\n iconColor: 'success-100',\n icon: 'checkmark'\n },\n error: {\n backgroundColor: 'error-100',\n iconColor: 'error-100',\n icon: 'close'\n }\n};\nlet W3mSnackBar = class W3mSnackBar extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.timeout = undefined;\n this.open = SnackController.state.open;\n this.unsubscribe.push(SnackController.subscribeKey('open', val => {\n this.open = val;\n this.onOpen();\n }));\n }\n disconnectedCallback() {\n clearTimeout(this.timeout);\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n const { message, variant } = SnackController.state;\n const preset = presets[variant];\n return html `\n \n `;\n }\n onOpen() {\n clearTimeout(this.timeout);\n if (this.open) {\n this.animate([\n { opacity: 0, transform: 'translateX(-50%) scale(0.85)' },\n { opacity: 1, transform: 'translateX(-50%) scale(1)' }\n ], {\n duration: 150,\n fill: 'forwards',\n easing: 'ease'\n });\n this.timeout = setTimeout(() => SnackController.hide(), 2500);\n }\n else {\n this.animate([\n { opacity: 1, transform: 'translateX(-50%) scale(1)' },\n { opacity: 0, transform: 'translateX(-50%) scale(0.85)' }\n ], {\n duration: 150,\n fill: 'forwards',\n easing: 'ease'\n });\n }\n }\n};\nW3mSnackBar.styles = styles;\n__decorate([\n state()\n], W3mSnackBar.prototype, \"open\", void 0);\nW3mSnackBar = __decorate([\n customElement('w3m-snackbar')\n], W3mSnackBar);\nexport { W3mSnackBar };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-separator {\n margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1);\n width: calc(100% + var(--wui-spacing-s) * 2);\n }\n\n wui-email-input {\n width: 100%;\n }\n\n form {\n width: 100%;\n display: block;\n position: relative;\n }\n\n wui-icon-link,\n wui-loading-spinner {\n position: absolute;\n top: 21px;\n transform: translateY(-50%);\n }\n\n wui-icon-link {\n right: var(--wui-spacing-xs);\n }\n\n wui-loading-spinner {\n right: var(--wui-spacing-m);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { ConnectorController, CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ref, createRef } from 'lit/directives/ref.js';\nimport styles from './styles.js';\nimport { SnackController, RouterController, EventsController } from '@web3modal/core';\nlet W3mEmailLoginWidget = class W3mEmailLoginWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.formRef = createRef();\n this.connectors = ConnectorController.state.connectors;\n this.email = '';\n this.loading = false;\n this.error = '';\n this.unsubscribe.push(ConnectorController.subscribeKey('connectors', val => (this.connectors = val)));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n firstUpdated() {\n this.formRef.value?.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n this.onSubmitEmail(event);\n }\n });\n }\n render() {\n const multipleConnectors = this.connectors.length > 1;\n const connector = this.connectors.find(c => c.type === 'EMAIL');\n if (!connector) {\n return null;\n }\n return html `\n
      \n \n \n\n ${this.submitButtonTemplate()}${this.loadingTemplate()}\n \n \n\n ${multipleConnectors ? html `` : null}\n `;\n }\n submitButtonTemplate() {\n const showSubmit = !this.loading && this.email.length > 3;\n return showSubmit\n ? html `\n \n \n `\n : null;\n }\n loadingTemplate() {\n return this.loading\n ? html ``\n : null;\n }\n onEmailInputChange(event) {\n this.email = event.detail.trim();\n this.error = '';\n }\n async onSubmitEmail(event) {\n try {\n if (this.loading) {\n return;\n }\n this.loading = true;\n event.preventDefault();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector) {\n throw new Error('w3m-email-login-widget: Email connector not found');\n }\n const { action } = await emailConnector.provider.connectEmail({ email: this.email });\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_SUBMITTED' });\n if (action === 'VERIFY_OTP') {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_SENT' });\n RouterController.push('EmailVerifyOtp', { email: this.email });\n }\n else if (action === 'VERIFY_DEVICE') {\n RouterController.push('EmailVerifyDevice', { email: this.email });\n }\n }\n catch (error) {\n const parsedError = CoreHelperUtil.parseError(error);\n if (parsedError?.includes('Invalid email')) {\n this.error = 'Invalid email. Try again.';\n }\n else {\n SnackController.showError(error);\n }\n }\n finally {\n this.loading = false;\n }\n }\n onFocusEvent() {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_LOGIN_SELECTED' });\n }\n};\nW3mEmailLoginWidget.styles = styles;\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"connectors\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"email\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mEmailLoginWidget.prototype, \"error\", void 0);\nW3mEmailLoginWidget = __decorate([\n customElement('w3m-email-login-widget')\n], W3mEmailLoginWidget);\nexport { W3mEmailLoginWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n :host > wui-flex:first-child {\n transform: translateY(calc(var(--wui-spacing-xxs) * -1));\n }\n\n wui-icon-link {\n margin-right: calc(var(--wui-icon-box-size-md) * -1);\n }\n\n wui-notice-card {\n margin-bottom: var(--wui-spacing-3xs);\n }\n\n w3m-transactions-view {\n max-height: 200px;\n }\n\n .tab-content-container {\n height: 300px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n }\n\n .account-button {\n width: auto;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--wui-spacing-s);\n height: 48px;\n padding: var(--wui-spacing-xs);\n padding-right: var(--wui-spacing-s);\n box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n border-radius: 24px;\n transaction: background-color 0.2s linear;\n }\n\n .account-button:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .avatar-container {\n position: relative;\n }\n\n wui-avatar.avatar {\n width: 32px;\n height: 32px;\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n wui-avatar.network-avatar {\n width: 16px;\n height: 16px;\n position: absolute;\n left: 100%;\n top: 100%;\n transform: translate(-75%, -75%);\n box-shadow: 0 0 0 2px var(--wui-gray-glass-005);\n }\n\n .account-links {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .account-links wui-flex {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n background: red;\n align-items: center;\n justify-content: center;\n height: 48px;\n padding: 10px;\n flex: 1 0 0;\n border-radius: var(--XS, 16px);\n border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\n will-change: background-color;\n }\n\n .account-links wui-flex:hover {\n background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));\n }\n\n .account-links wui-flex wui-icon {\n width: var(--S, 20px);\n height: var(--S, 20px);\n }\n\n .account-links wui-flex wui-icon svg path {\n stroke: #47a1ff;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, CoreHelperUtil, ModalController, NetworkController, RouterController, AssetUtil, StorageUtil, ConnectorController, EventsController, ConnectionController, SnackController, ConstantsUtil, OptionsController } from '@web3modal/core';\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nlet W3mAccountDefaultWidget = class W3mAccountDefaultWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.network = NetworkController.state.caipNetwork;\n this.disconnecting = false;\n this.balance = AccountController.state.balance;\n this.balanceSymbol = AccountController.state.balanceSymbol;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.balance = val.balance;\n this.balanceSymbol = val.balanceSymbol;\n }\n else if (!this.disconnecting) {\n SnackController.showError('Account not found');\n }\n })\n ], NetworkController.subscribeKey('caipNetwork', val => {\n if (val?.id) {\n this.network = val;\n }\n }));\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html `\n \n \n \n \n ${this.profileName\n ? UiHelperUtil.getTruncateString({\n string: this.profileName,\n charsStart: 20,\n charsEnd: 0,\n truncate: 'end'\n })\n : UiHelperUtil.getTruncateString({\n string: this.address ? this.address : '',\n charsStart: 4,\n charsEnd: 4,\n truncate: 'middle'\n })}\n \n \n \n ${CoreHelperUtil.formatBalance(this.balance, this.balanceSymbol)}\n \n ${this.explorerBtnTemplate()}\n \n\n \n ${this.emailCardTemplate()} ${this.emailBtnTemplate()}\n\n \n \n ${this.network?.name ?? 'Unknown'}\n \n \n ${this.onrampTemplate()}\n \n Activity\n \n \n Disconnect\n \n `;\n }\n onrampTemplate() {\n const { enableOnramp } = OptionsController.state;\n if (!enableOnramp) {\n return null;\n }\n return html `\n \n Buy crypto\n \n `;\n }\n emailCardTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n const { origin } = location;\n if (!emailConnector || type !== 'EMAIL' || origin.includes(ConstantsUtil.SECURE_SITE)) {\n return null;\n }\n return html `\n \n `;\n }\n handleClickPay() {\n RouterController.push('OnRampProviders');\n }\n explorerBtnTemplate() {\n const { addressExplorerUrl } = AccountController.state;\n if (!addressExplorerUrl) {\n return null;\n }\n return html `\n \n \n Block Explorer\n \n \n `;\n }\n emailBtnTemplate() {\n const type = StorageUtil.getConnectedConnector();\n const emailConnector = ConnectorController.getEmailConnector();\n if (!emailConnector || type !== 'EMAIL') {\n return null;\n }\n const email = emailConnector.provider.getEmail() ?? '';\n return html `\n this.onGoToUpdateEmail(email)}\n >\n ${email}\n \n `;\n }\n isAllowedNetworkSwitch() {\n const { requestedCaipNetworks } = NetworkController.state;\n const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;\n const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id);\n return isMultiNetwork || !isValidNetwork;\n }\n onCopyAddress() {\n try {\n if (this.address) {\n CoreHelperUtil.copyToClopboard(this.address);\n SnackController.showSuccess('Address copied');\n }\n }\n catch {\n SnackController.showError('Failed to copy');\n }\n }\n onNetworks() {\n if (this.isAllowedNetworkSwitch()) {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORKS' });\n RouterController.push('Networks');\n }\n }\n onTransactions() {\n EventsController.sendEvent({ type: 'track', event: 'CLICK_TRANSACTIONS' });\n RouterController.push('Transactions');\n }\n async onDisconnect() {\n try {\n this.disconnecting = true;\n await ConnectionController.disconnect();\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_SUCCESS' });\n ModalController.close();\n }\n catch {\n EventsController.sendEvent({ type: 'track', event: 'DISCONNECT_ERROR' });\n SnackController.showError('Failed to disconnect');\n }\n finally {\n this.disconnecting = false;\n }\n }\n onExplorer() {\n const { addressExplorerUrl } = AccountController.state;\n if (addressExplorerUrl) {\n CoreHelperUtil.openHref(addressExplorerUrl, '_blank');\n }\n }\n onGoToUpgradeView() {\n EventsController.sendEvent({ type: 'track', event: 'EMAIL_UPGRADE_FROM_MODAL' });\n RouterController.push('UpgradeEmailWallet');\n }\n onGoToUpdateEmail(email) {\n RouterController.push('UpdateEmailWallet', { email });\n }\n};\nW3mAccountDefaultWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"disconnecting\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"balance\", void 0);\n__decorate([\n state()\n], W3mAccountDefaultWidget.prototype, \"balanceSymbol\", void 0);\nW3mAccountDefaultWidget = __decorate([\n customElement('w3m-account-default-widget')\n], W3mAccountDefaultWidget);\nexport { W3mAccountDefaultWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n wui-flex {\n width: 100%;\n }\n\n wui-promo {\n position: absolute;\n top: -32px;\n }\n\n wui-profile-button {\n margin-top: calc(-1 * var(--wui-spacing-2l));\n }\n\n wui-promo + wui-profile-button {\n margin-top: var(--wui-spacing-2l);\n }\n\n wui-tooltip-select {\n width: 100%;\n }\n\n wui-tabs {\n width: 100%;\n }\n\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n`;\n//# sourceMappingURL=styles.js.map","export const ConstantsUtil = {\n ACCOUNT_TABS: [{ label: 'Tokens' }, { label: 'NFTs' }, { label: 'Activity' }]\n};\n//# sourceMappingURL=ConstantsUtil.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ModalController, NetworkController, AssetUtil, RouterController, CoreHelperUtil } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '../../utils/ConstantsUtil.js';\nimport { W3mFrameRpcConstants } from '@web3modal/wallet';\nlet W3mAccountWalletFeaturesWidget = class W3mAccountWalletFeaturesWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.address = AccountController.state.address;\n this.profileImage = AccountController.state.profileImage;\n this.profileName = AccountController.state.profileName;\n this.smartAccountDeployed = AccountController.state.smartAccountDeployed;\n this.network = NetworkController.state.caipNetwork;\n this.currentTab = AccountController.state.currentTab;\n this.tokenBalance = AccountController.state.tokenBalance;\n this.preferredAccountType = AccountController.state.preferredAccountType;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.address) {\n this.address = val.address;\n this.profileImage = val.profileImage;\n this.profileName = val.profileName;\n this.currentTab = val.currentTab;\n this.tokenBalance = val.tokenBalance;\n this.smartAccountDeployed = val.smartAccountDeployed;\n this.preferredAccountType = val.preferredAccountType;\n }\n else {\n ModalController.close();\n }\n })\n ], NetworkController.subscribe(val => {\n this.network = val.caipNetwork;\n }));\n this.watchConvertValues();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n clearInterval(this.watchTokenBalance);\n }\n firstUpdated() {\n AccountController.fetchTokenBalance();\n }\n render() {\n if (!this.address) {\n throw new Error('w3m-account-view: No account provided');\n }\n const networkImage = AssetUtil.getNetworkImage(this.network);\n return html `\n ${this.activateAccountTemplate()}\n \n ${this.tokenBalanceTemplate()}\n \n \n \n \n \n \n\n \n ${this.listContentTemplate()}\n `;\n }\n watchConvertValues() {\n this.watchTokenBalance = setInterval(() => AccountController.fetchTokenBalance(), 10000);\n }\n listContentTemplate() {\n if (this.currentTab === 0) {\n return html ``;\n }\n if (this.currentTab === 1) {\n return html ``;\n }\n if (this.currentTab === 2) {\n return html ``;\n }\n return html ``;\n }\n tokenBalanceTemplate() {\n if (this.tokenBalance && this.tokenBalance?.length >= 0) {\n const value = CoreHelperUtil.calculateBalance(this.tokenBalance);\n const { dollars = '0', pennies = '00' } = CoreHelperUtil.formatTokenBalance(value);\n return html ``;\n }\n return html ``;\n }\n activateAccountTemplate() {\n const smartAccountEnabled = NetworkController.checkIfSmartAccountEnabled();\n if (!smartAccountEnabled ||\n this.preferredAccountType !== W3mFrameRpcConstants.ACCOUNT_TYPES.EOA ||\n this.smartAccountDeployed) {\n return null;\n }\n return html ` `;\n }\n onTabChange(index) {\n AccountController.setCurrentTab(index);\n }\n onProfileButtonClick() {\n RouterController.push('AccountSettings');\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n onConvertClick() {\n RouterController.push('Convert');\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n onSendClick() {\n RouterController.push('WalletSend');\n }\n onUpdateToSmartAccount() {\n RouterController.push('UpgradeToSmartAccount');\n }\n};\nW3mAccountWalletFeaturesWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"watchTokenBalance\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"profileImage\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"profileName\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"smartAccountDeployed\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"network\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"currentTab\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"tokenBalance\", void 0);\n__decorate([\n state()\n], W3mAccountWalletFeaturesWidget.prototype, \"preferredAccountType\", void 0);\nW3mAccountWalletFeaturesWidget = __decorate([\n customElement('w3m-account-wallet-features-widget')\n], W3mAccountWalletFeaturesWidget);\nexport { W3mAccountWalletFeaturesWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n max-height: 280px;\n overflow: scroll;\n scrollbar-width: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mAccountActivityWidget = class W3mAccountActivityWidget extends LitElement {\n render() {\n return html ``;\n }\n};\nW3mAccountActivityWidget.styles = styles;\nW3mAccountActivityWidget = __decorate([\n customElement('w3m-account-activity-widget')\n], W3mAccountActivityWidget);\nexport { W3mAccountActivityWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nlet W3mAccountNftsWidget = class W3mAccountNftsWidget extends LitElement {\n render() {\n return html `${this.nftTemplate()}`;\n }\n nftTemplate() {\n return html ` \n \n \n No NFTs yet\n Transfer from another wallets to get started\n \n Receive NFTs\n `;\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n};\nW3mAccountNftsWidget.styles = styles;\nW3mAccountNftsWidget = __decorate([\n customElement('w3m-account-nfts-widget')\n], W3mAccountNftsWidget);\nexport { W3mAccountNftsWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n }\n\n wui-flex {\n width: 100%;\n }\n\n .contentContainer {\n max-height: 280px;\n overflow: scroll;\n scrollbar-width: none;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, RouterController } from '@web3modal/core';\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { state } from 'lit/decorators.js';\nlet W3mAccountTokensWidget = class W3mAccountTokensWidget extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.tokenBalance = AccountController.state.tokenBalance;\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n this.tokenBalance = val.tokenBalance;\n })\n ]);\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html `${this.tokenTemplate()}`;\n }\n tokenTemplate() {\n if (this.tokenBalance && this.tokenBalance?.length > 0) {\n return html `\n ${this.tokenItemTemplate()}\n `;\n }\n return html ` `;\n }\n tokenItemTemplate() {\n return this.tokenBalance?.map(token => html ``);\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mAccountTokensWidget.styles = styles;\n__decorate([\n state()\n], W3mAccountTokensWidget.prototype, \"tokenBalance\", void 0);\nW3mAccountTokensWidget = __decorate([\n customElement('w3m-account-tokens-widget')\n], W3mAccountTokensWidget);\nexport { W3mAccountTokensWidget };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n min-height: 100%;\n }\n\n .contentContainer {\n height: 280px;\n }\n\n .contentContainer > wui-icon-box {\n width: 40px;\n height: 40px;\n border-radius: var(--wui-border-radius-xxs);\n }\n\n .contentContainer > .textContent {\n width: 65%;\n }\n\n .emptyContainer {\n height: 100%;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DateUtil } from '@web3modal/common';\nimport { AccountController, EventsController, OptionsController, RouterController, TransactionsController } from '@web3modal/core';\nimport { TransactionUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './styles.js';\nconst PAGINATOR_ID = 'last-transaction';\nconst LOADING_ITEM_COUNT = 7;\nlet W3mActivityList = class W3mActivityList extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.paginationObserver = undefined;\n this.page = 'activity';\n this.address = AccountController.state.address;\n this.transactionsByYear = TransactionsController.state.transactionsByYear;\n this.loading = TransactionsController.state.loading;\n this.empty = TransactionsController.state.empty;\n this.next = TransactionsController.state.next;\n TransactionsController.clearCursor();\n this.unsubscribe.push(...[\n AccountController.subscribe(val => {\n if (val.isConnected) {\n if (this.address !== val.address) {\n this.address = val.address;\n TransactionsController.resetTransactions();\n TransactionsController.fetchTransactions(val.address);\n }\n }\n }),\n TransactionsController.subscribe(val => {\n this.transactionsByYear = val.transactionsByYear;\n this.loading = val.loading;\n this.empty = val.empty;\n this.next = val.next;\n })\n ]);\n }\n firstUpdated() {\n TransactionsController.fetchTransactions(this.address);\n this.createPaginationObserver();\n }\n updated() {\n this.setPaginationObserver();\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n }\n render() {\n return html ` ${this.empty ? null : this.templateTransactionsByYear()}\n ${this.loading ? this.templateLoading() : null}\n ${!this.loading && this.empty ? this.templateEmpty() : null}`;\n }\n templateTransactionsByYear() {\n const sortedYearKeys = Object.keys(this.transactionsByYear).sort().reverse();\n return sortedYearKeys.map((year, index) => {\n const isLastGroup = index === sortedYearKeys.length - 1;\n const yearInt = parseInt(year, 10);\n const sortedMonthIndexes = new Array(12)\n .fill(null)\n .map((_, idx) => idx)\n .reverse();\n return sortedMonthIndexes.map(month => {\n const groupTitle = TransactionUtil.getTransactionGroupTitle(yearInt, month);\n const transactions = this.transactionsByYear[yearInt]?.[month];\n if (!transactions) {\n return null;\n }\n return html `\n \n \n ${groupTitle}\n \n \n ${this.templateTransactions(transactions, isLastGroup)}\n \n \n `;\n });\n });\n }\n templateRenderTransaction(transaction, isLastTransaction) {\n const { date, descriptions, direction, isAllNFT, images, status, transfers, type } = this.getTransactionListItemProps(transaction);\n const haveMultipleTransfers = transfers?.length > 1;\n const haveTwoTransfers = transfers?.length === 2;\n if (haveTwoTransfers && !isAllNFT) {\n return html `\n \n `;\n }\n if (haveMultipleTransfers) {\n return transfers.map((transfer, index) => {\n const description = TransactionUtil.getTransferDescription(transfer);\n const isLastTransfer = isLastTransaction && index === transfers.length - 1;\n return html ` `;\n });\n }\n return html `\n \n `;\n }\n templateTransactions(transactions, isLastGroup) {\n return transactions.map((transaction, index) => {\n const isLastTransaction = isLastGroup && index === transactions.length - 1;\n return html `${this.templateRenderTransaction(transaction, isLastTransaction)}`;\n });\n }\n emptyStateActivity() {\n return html `\n \n \n No Transactions yet\n Start trading on dApps
      \n to grow your wallet!\n
      \n `;\n }\n emptyStateAccount() {\n return html `\n \n \n No activity yet\n Your next transactions will appear here\n \n Trade\n `;\n }\n templateEmpty() {\n if (this.page === 'account') {\n return html `${this.emptyStateAccount()}`;\n }\n return html `${this.emptyStateActivity()}`;\n }\n templateLoading() {\n if (this.page === 'activity') {\n return Array(LOADING_ITEM_COUNT)\n .fill(html ` `)\n .map(item => item);\n }\n return null;\n }\n onReceiveClick() {\n RouterController.push('WalletReceive');\n }\n createPaginationObserver() {\n const { projectId } = OptionsController.state;\n this.paginationObserver = new IntersectionObserver(([element]) => {\n if (element?.isIntersecting && !this.loading) {\n TransactionsController.fetchTransactions(this.address);\n EventsController.sendEvent({\n type: 'track',\n event: 'LOAD_MORE_TRANSACTIONS',\n properties: {\n address: this.address,\n projectId,\n cursor: this.next\n }\n });\n }\n }, {});\n this.setPaginationObserver();\n }\n setPaginationObserver() {\n this.paginationObserver?.disconnect();\n const lastItem = this.shadowRoot?.querySelector(`#${PAGINATOR_ID}`);\n if (lastItem) {\n this.paginationObserver?.observe(lastItem);\n }\n }\n getTransactionListItemProps(transaction) {\n const date = DateUtil.formatDate(transaction?.metadata?.minedAt);\n const descriptions = TransactionUtil.getTransactionDescriptions(transaction);\n const transfers = transaction?.transfers;\n const transfer = transaction?.transfers?.[0];\n const isAllNFT = Boolean(transfer) && transaction?.transfers?.every(item => Boolean(item.nft_info));\n const images = TransactionUtil.getTransactionImages(transfers);\n return {\n date,\n direction: transfer?.direction,\n descriptions,\n isAllNFT,\n images,\n status: transaction.metadata?.status,\n transfers,\n type: transaction.metadata?.operationType\n };\n }\n};\nW3mActivityList.styles = styles;\n__decorate([\n property()\n], W3mActivityList.prototype, \"page\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"address\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"transactionsByYear\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"loading\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"empty\", void 0);\n__decorate([\n state()\n], W3mActivityList.prototype, \"next\", void 0);\nW3mActivityList = __decorate([\n customElement('w3m-activity-list')\n], W3mActivityList);\nexport { W3mActivityList };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n height: 100px;\n border-radius: var(--wui-border-radius-s);\n border: 1px solid var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n }\n\n :host(:hover) {\n background-color: var(--wui-gray-glass-005);\n }\n\n wui-flex {\n width: 100%;\n height: fit-content;\n }\n\n wui-button {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nimport { RouterController, SendController } from '@web3modal/core';\nlet W3mInputToken = class W3mInputToken extends LitElement {\n render() {\n return html ` \n \n \n ${this.buttonTemplate()}\n \n \n ${this.sendValueTemplate()}\n \n ${this.maxAmountTemplate()} ${this.actionTemplate()}\n \n \n `;\n }\n buttonTemplate() {\n if (this.token) {\n return html `Select token`;\n }\n return html `Select token`;\n }\n handleSelectButtonClick() {\n RouterController.push('WalletSendSelectToken');\n }\n sendValueTemplate() {\n if (this.token && this.sendTokenAmount) {\n const price = this.token.price;\n const totalValue = price * this.sendTokenAmount;\n return html `$${totalValue.toFixed(2)}`;\n }\n return null;\n }\n maxAmountTemplate() {\n if (this.token) {\n if (this.sendTokenAmount && this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n return html ` \n ${UiHelperUtil.roundNumber(Number(this.token.quantity.numeric), 6, 5)}\n `;\n }\n return html ` \n ${UiHelperUtil.roundNumber(Number(this.token.quantity.numeric), 6, 5)}\n `;\n }\n return null;\n }\n actionTemplate() {\n if (this.token) {\n if (this.sendTokenAmount && this.sendTokenAmount > Number(this.token.quantity.numeric)) {\n return html `Buy`;\n }\n return html `Max`;\n }\n return null;\n }\n onInputChange(event) {\n SendController.setTokenAmount(event.detail);\n }\n onMaxClick() {\n if (this.token) {\n SendController.setTokenAmount(Number(this.token?.quantity.numeric));\n }\n }\n onBuyClick() {\n RouterController.push('OnRampProviders');\n }\n};\nW3mInputToken.styles = styles;\n__decorate([\n property({ type: Object })\n], W3mInputToken.prototype, \"token\", void 0);\n__decorate([\n property({ type: Number })\n], W3mInputToken.prototype, \"sendTokenAmount\", void 0);\nW3mInputToken = __decorate([\n customElement('w3m-input-token')\n], W3mInputToken);\nexport { W3mInputToken };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n width: 100%;\n height: 100px;\n border-radius: var(--wui-border-radius-s);\n border: 1px solid var(--wui-gray-glass-002);\n background-color: var(--wui-gray-glass-002);\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n position: relative;\n }\n\n :host(:hover) {\n background-color: var(--wui-gray-glass-005);\n }\n\n wui-flex {\n width: 100%;\n height: fit-content;\n }\n\n wui-button {\n display: ruby;\n color: var(--wui-color-fg-100);\n margin: 0 var(--wui-spacing-xs);\n }\n\n .instruction {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n\n textarea {\n background: transparent;\n width: 100%;\n font-family: var(--w3m-font-family);\n font-size: var(--wui-font-size-medium);\n font-style: normal;\n font-weight: var(--wui-font-weight-light);\n line-height: 130%;\n letter-spacing: var(--wui-letter-spacing-medium);\n color: var(--wui-color-fg-100);\n caret-color: var(--wui-color-accent-100);\n box-sizing: border-box;\n -webkit-appearance: none;\n -moz-appearance: textfield;\n padding: 0px;\n border: none;\n outline: none;\n appearance: none;\n resize: none;\n overflow: hidden;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property, state } from 'lit/decorators.js';\nimport { SendController } from '@web3modal/core';\nimport { createRef, ref } from 'lit/directives/ref.js';\nlet W3mInputAddress = class W3mInputAddress extends LitElement {\n constructor() {\n super(...arguments);\n this.inputElementRef = createRef();\n this.instructionElementRef = createRef();\n this.instructionHidden = Boolean(this.receiverAddress);\n }\n firstUpdated() {\n if (this.receiverAddress) {\n this.instructionHidden = true;\n }\n this.checkHidden();\n }\n render() {\n return html ` \n \n Type or\n \n \n Paste\n \n address\n \n \n${this.receiverAddress ?? ''}\n `;\n }\n async focusInput() {\n if (this.instructionElementRef.value) {\n this.instructionHidden = true;\n await this.toggleInstructionFocus(false);\n this.instructionElementRef.value.style.pointerEvents = 'none';\n this.inputElementRef.value?.focus();\n if (this.inputElementRef.value) {\n this.inputElementRef.value.selectionStart = this.inputElementRef.value.selectionEnd =\n this.inputElementRef.value.value.length;\n }\n }\n }\n async focusInstruction() {\n if (this.instructionElementRef.value) {\n this.instructionHidden = false;\n await this.toggleInstructionFocus(true);\n this.instructionElementRef.value.style.pointerEvents = 'auto';\n this.inputElementRef.value?.blur();\n }\n }\n async toggleInstructionFocus(focus) {\n if (this.instructionElementRef.value) {\n await this.instructionElementRef.value.animate([{ opacity: focus ? 0 : 1 }, { opacity: focus ? 1 : 0 }], {\n duration: 100,\n easing: 'ease',\n fill: 'forwards'\n }).finished;\n }\n }\n onBoxClick() {\n if (!this.receiverAddress && !this.instructionHidden) {\n this.focusInput();\n }\n }\n onBlur() {\n if (!this.receiverAddress && this.instructionHidden) {\n this.focusInstruction();\n }\n }\n checkHidden() {\n if (this.instructionHidden) {\n this.focusInput();\n }\n }\n async onPasteClick() {\n const text = await navigator.clipboard.readText();\n SendController.setReceiverAddress(text);\n }\n onInputChange(e) {\n const element = e.target;\n if (element.value && !this.instructionHidden) {\n this.focusInput();\n }\n SendController.setReceiverAddress(element.value);\n }\n};\nW3mInputAddress.styles = styles;\n__decorate([\n property()\n], W3mInputAddress.prototype, \"receiverAddress\", void 0);\n__decorate([\n state()\n], W3mInputAddress.prototype, \"instructionHidden\", void 0);\nW3mInputAddress = __decorate([\n customElement('w3m-input-address')\n], W3mInputAddress);\nexport { W3mInputAddress };\n//# sourceMappingURL=index.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n width: 100%;\n flex-direction: column;\n gap: var(--wui-border-radius-1xs);\n border-radius: var(--wui-border-radius-s);\n background: var(--wui-gray-glass-002);\n padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs)\n var(--wui-spacing-1xs);\n }\n\n wui-text {\n padding: 0 var(--wui-spacing-1xs);\n }\n\n wui-flex {\n margin-top: var(--wui-spacing-1xs);\n }\n\n .network {\n cursor: pointer;\n transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);\n will-change: background-color;\n }\n\n .network:focus-visible {\n border: 1px solid var(--wui-color-accent-100);\n background-color: var(--wui-gray-glass-005);\n -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);\n }\n\n .network:hover {\n background-color: var(--wui-gray-glass-005);\n }\n\n .network:active {\n background-color: var(--wui-gray-glass-010);\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { UiHelperUtil, customElement } from '@web3modal/ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { property } from 'lit/decorators.js';\nimport { AssetUtil, RouterController } from '@web3modal/core';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nlet W3mWalletSendDetails = class W3mWalletSendDetails extends LitElement {\n render() {\n return html ` Details\n \n \n \n \n ${this.networkTemplate()}\n `;\n }\n networkTemplate() {\n if (this.caipNetwork?.name) {\n return html ` this.onNetworkClick(this.caipNetwork)}\n class=\"network\"\n textTitle=\"Network\"\n imageSrc=${ifDefined(AssetUtil.getNetworkImage(this.caipNetwork))}\n >`;\n }\n return null;\n }\n onNetworkClick(network) {\n if (network) {\n RouterController.push('Networks', { network });\n }\n }\n};\nW3mWalletSendDetails.styles = styles;\n__decorate([\n property()\n], W3mWalletSendDetails.prototype, \"receiverAddress\", void 0);\n__decorate([\n property({ type: Object })\n], W3mWalletSendDetails.prototype, \"caipNetwork\", void 0);\nW3mWalletSendDetails = __decorate([\n customElement('w3m-wallet-send-details')\n], W3mWalletSendDetails);\nexport { W3mWalletSendDetails };\n//# sourceMappingURL=index.js.map","import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, CoreHelperUtil, EventsController, ModalController, NetworkController, OptionsController, PublicStateController, ThemeController, SnackController, RouterController } from '@web3modal/core';\nimport { setColorTheme, setThemeVariables } from '@web3modal/ui';\nlet isInitialized = false;\nexport class Web3ModalScaffold {\n constructor(options) {\n this.initPromise = undefined;\n this.setIsConnected = isConnected => {\n AccountController.setIsConnected(isConnected);\n };\n this.getIsConnectedState = () => AccountController.state.isConnected;\n this.setCaipAddress = caipAddress => {\n AccountController.setCaipAddress(caipAddress);\n };\n this.setBalance = (balance, balanceSymbol) => {\n AccountController.setBalance(balance, balanceSymbol);\n };\n this.setProfileName = profileName => {\n AccountController.setProfileName(profileName);\n };\n this.setProfileImage = profileImage => {\n AccountController.setProfileImage(profileImage);\n };\n this.resetAccount = () => {\n AccountController.resetAccount();\n };\n this.setCaipNetwork = caipNetwork => {\n NetworkController.setCaipNetwork(caipNetwork);\n };\n this.getCaipNetwork = () => NetworkController.state.caipNetwork;\n this.setRequestedCaipNetworks = requestedCaipNetworks => {\n NetworkController.setRequestedCaipNetworks(requestedCaipNetworks);\n };\n this.getApprovedCaipNetworksData = () => NetworkController.getApprovedCaipNetworksData();\n this.resetNetwork = () => {\n NetworkController.resetNetwork();\n };\n this.setConnectors = connectors => {\n ConnectorController.setConnectors(connectors);\n };\n this.addConnector = connector => {\n ConnectorController.addConnector(connector);\n };\n this.getConnectors = () => ConnectorController.getConnectors();\n this.resetWcConnection = () => {\n ConnectionController.resetWcConnection();\n };\n this.fetchIdentity = request => BlockchainApiController.fetchIdentity(request);\n this.setAddressExplorerUrl = addressExplorerUrl => {\n AccountController.setAddressExplorerUrl(addressExplorerUrl);\n };\n this.setSmartAccountDeployed = isDeployed => {\n AccountController.setSmartAccountDeployed(isDeployed);\n };\n this.setConnectedWalletInfo = connectedWalletInfo => {\n AccountController.setConnectedWalletInfo(connectedWalletInfo);\n };\n this.setSmartAccountEnabledNetworks = smartAccountEnabledNetworks => {\n NetworkController.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks);\n };\n this.setPreferredAccountType = preferredAccountType => {\n AccountController.setPreferredAccountType(preferredAccountType);\n };\n this.initControllers(options);\n this.initOrContinue();\n }\n async open(options) {\n await this.initOrContinue();\n ModalController.open(options);\n }\n async close() {\n await this.initOrContinue();\n ModalController.close();\n }\n setLoading(loading) {\n ModalController.setLoading(loading);\n }\n getThemeMode() {\n return ThemeController.state.themeMode;\n }\n getThemeVariables() {\n return ThemeController.state.themeVariables;\n }\n setThemeMode(themeMode) {\n ThemeController.setThemeMode(themeMode);\n setColorTheme(ThemeController.state.themeMode);\n }\n setThemeVariables(themeVariables) {\n ThemeController.setThemeVariables(themeVariables);\n setThemeVariables(ThemeController.state.themeVariables);\n }\n subscribeTheme(callback) {\n return ThemeController.subscribe(callback);\n }\n getWalletInfo() {\n return AccountController.state.connectedWalletInfo;\n }\n subscribeWalletInfo(callback) {\n return AccountController.subscribeKey('connectedWalletInfo', callback);\n }\n getState() {\n return PublicStateController.state;\n }\n subscribeState(callback) {\n return PublicStateController.subscribe(callback);\n }\n showErrorMessage(message) {\n SnackController.showError(message);\n }\n showSuccessMessage(message) {\n SnackController.showSuccess(message);\n }\n getEvent() {\n return { ...EventsController.state };\n }\n subscribeEvents(callback) {\n return EventsController.subscribe(callback);\n }\n redirect(route) {\n RouterController.push(route);\n }\n popTransactionStack(cancel) {\n RouterController.popTransactionStack(cancel);\n }\n isOpen() {\n return ModalController.state.open;\n }\n isTransactionStackEmpty() {\n return RouterController.state.transactionStack.length === 0;\n }\n async initControllers(options) {\n NetworkController.setClient(options.networkControllerClient);\n NetworkController.setDefaultCaipNetwork(options.defaultChain);\n OptionsController.setProjectId(options.projectId);\n OptionsController.setAllWallets(options.allWallets);\n OptionsController.setIncludeWalletIds(options.includeWalletIds);\n OptionsController.setExcludeWalletIds(options.excludeWalletIds);\n OptionsController.setFeaturedWalletIds(options.featuredWalletIds);\n OptionsController.setTokens(options.tokens);\n OptionsController.setTermsConditionsUrl(options.termsConditionsUrl);\n OptionsController.setPrivacyPolicyUrl(options.privacyPolicyUrl);\n OptionsController.setCustomWallets(options.customWallets);\n OptionsController.setEnableAnalytics(options.enableAnalytics);\n OptionsController.setSdkVersion(options._sdkVersion);\n ConnectionController.setClient(options.connectionControllerClient);\n if (options.siweControllerClient) {\n const { SIWEController } = await import('@web3modal/siwe');\n SIWEController.setSIWEClient(options.siweControllerClient);\n }\n if (options.metadata) {\n OptionsController.setMetadata(options.metadata);\n }\n if (options.themeMode) {\n ThemeController.setThemeMode(options.themeMode);\n }\n if (options.themeVariables) {\n ThemeController.setThemeVariables(options.themeVariables);\n }\n if (options.enableOnramp) {\n OptionsController.setOnrampEnabled(Boolean(options.enableOnramp));\n }\n if (options.enableWalletFeatures) {\n OptionsController.setWalletFeaturesEnabled(Boolean(options.enableWalletFeatures));\n }\n if (options.allowUnsupportedChain) {\n NetworkController.setAllowUnsupportedChain(options.allowUnsupportedChain);\n }\n }\n async initOrContinue() {\n if (!this.initPromise && !isInitialized && CoreHelperUtil.isClient()) {\n isInitialized = true;\n this.initPromise = new Promise(async (resolve) => {\n await Promise.all([import('@web3modal/ui'), import('./modal/w3m-modal/index.js')]);\n const modal = document.createElement('w3m-modal');\n document.body.insertAdjacentElement('beforeend', modal);\n resolve();\n });\n }\n return this.initPromise;\n }\n}\n//# sourceMappingURL=client.js.map","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package int provides helper functions for integerss.\n */\n// Shim using 16-bit pieces.\nfunction imulShim(a, b) {\n var ah = (a >>> 16) & 0xffff, al = a & 0xffff;\n var bh = (b >>> 16) & 0xffff, bl = b & 0xffff;\n return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);\n}\n/** 32-bit integer multiplication. */\n// Use system Math.imul if available, otherwise use our shim.\nexports.mul = Math.imul || imulShim;\n/** 32-bit integer addition. */\nfunction add(a, b) {\n return (a + b) | 0;\n}\nexports.add = add;\n/** 32-bit integer subtraction. */\nfunction sub(a, b) {\n return (a - b) | 0;\n}\nexports.sub = sub;\n/** 32-bit integer left rotation */\nfunction rotl(x, n) {\n return x << n | x >>> (32 - n);\n}\nexports.rotl = rotl;\n/** 32-bit integer left rotation */\nfunction rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}\nexports.rotr = rotr;\nfunction isIntegerShim(n) {\n return typeof n === \"number\" && isFinite(n) && Math.floor(n) === n;\n}\n/**\n * Returns true if the argument is an integer number.\n *\n * In ES2015, Number.isInteger.\n */\nexports.isInteger = Number.isInteger || isIntegerShim;\n/**\n * Math.pow(2, 53) - 1\n *\n * In ES2015 Number.MAX_SAFE_INTEGER.\n */\nexports.MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * Returns true if the argument is a safe integer number\n * (-MIN_SAFE_INTEGER < number <= MAX_SAFE_INTEGER)\n *\n * In ES2015, Number.isSafeInteger.\n */\nexports.isSafeInteger = function (n) {\n return exports.isInteger(n) && (n >= -exports.MAX_SAFE_INTEGER && n <= exports.MAX_SAFE_INTEGER);\n};\n//# sourceMappingURL=int.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package binary provides functions for encoding and decoding numbers in byte arrays.\n */\nvar int_1 = require(\"@stablelib/int\");\n// TODO(dchest): add asserts for correct value ranges and array offsets.\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (((array[offset + 0] << 8) | array[offset + 1]) << 16) >> 16;\n}\nexports.readInt16BE = readInt16BE;\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 0] << 8) | array[offset + 1]) >>> 0;\n}\nexports.readUint16BE = readUint16BE;\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (((array[offset + 1] << 8) | array[offset]) << 16) >> 16;\n}\nexports.readInt16LE = readInt16LE;\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 1] << 8) | array[offset]) >>> 0;\n}\nexports.readUint16LE = readUint16LE;\n/**\n * Writes 2-byte big-endian representation of 16-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(2); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 8;\n out[offset + 1] = value >>> 0;\n return out;\n}\nexports.writeUint16BE = writeUint16BE;\nexports.writeInt16BE = writeUint16BE;\n/**\n * Writes 2-byte little-endian representation of 16-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(2); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n return out;\n}\nexports.writeUint16LE = writeUint16LE;\nexports.writeInt16LE = writeUint16LE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3];\n}\nexports.readInt32BE = readInt32BE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3]) >>> 0;\n}\nexports.readUint32BE = readUint32BE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return (array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset];\n}\nexports.readInt32LE = readInt32LE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n return ((array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset]) >>> 0;\n}\nexports.readUint32LE = readUint32LE;\n/**\n * Writes 4-byte big-endian representation of 32-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 24;\n out[offset + 1] = value >>> 16;\n out[offset + 2] = value >>> 8;\n out[offset + 3] = value >>> 0;\n return out;\n}\nexports.writeUint32BE = writeUint32BE;\nexports.writeInt32BE = writeUint32BE;\n/**\n * Writes 4-byte little-endian representation of 32-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n out[offset + 2] = value >>> 16;\n out[offset + 3] = value >>> 24;\n return out;\n}\nexports.writeUint32LE = writeUint32LE;\nexports.writeInt32LE = writeUint32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var hi = readInt32BE(array, offset);\n var lo = readInt32BE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\nexports.readInt64BE = readInt64BE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var hi = readUint32BE(array, offset);\n var lo = readUint32BE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\nexports.readUint64BE = readUint64BE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var lo = readInt32LE(array, offset);\n var hi = readInt32LE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\nexports.readInt64LE = readInt64LE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var lo = readUint32LE(array, offset);\n var hi = readUint32LE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\nexports.readUint64LE = readUint64LE;\n/**\n * Writes 8-byte big-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n writeUint32BE(value / 0x100000000 >>> 0, out, offset);\n writeUint32BE(value >>> 0, out, offset + 4);\n return out;\n}\nexports.writeUint64BE = writeUint64BE;\nexports.writeInt64BE = writeUint64BE;\n/**\n * Writes 8-byte little-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n writeUint32LE(value >>> 0, out, offset);\n writeUint32LE(value / 0x100000000 >>> 0, out, offset + 4);\n return out;\n}\nexports.writeUint64LE = writeUint64LE;\nexports.writeInt64LE = writeUint64LE;\n/**\n * Reads bytes from array starting at offset as big-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintBE(bitLength, array, offset) {\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"readUintBE supports only bitLengths divisible by 8\");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error(\"readUintBE: array is too short for the given bitLength\");\n }\n var result = 0;\n var mul = 1;\n for (var i = bitLength / 8 + offset - 1; i >= offset; i--) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\nexports.readUintBE = readUintBE;\n/**\n * Reads bytes from array starting at offset as little-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintLE(bitLength, array, offset) {\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"readUintLE supports only bitLengths divisible by 8\");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error(\"readUintLE: array is too short for the given bitLength\");\n }\n var result = 0;\n var mul = 1;\n for (var i = offset; i < offset + bitLength / 8; i++) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\nexports.readUintLE = readUintLE;\n/**\n * Writes a big-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintBE(bitLength, value, out, offset) {\n if (out === void 0) { out = new Uint8Array(bitLength / 8); }\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"writeUintBE supports only bitLengths divisible by 8\");\n }\n if (!int_1.isSafeInteger(value)) {\n throw new Error(\"writeUintBE value must be an integer\");\n }\n var div = 1;\n for (var i = bitLength / 8 + offset - 1; i >= offset; i--) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\nexports.writeUintBE = writeUintBE;\n/**\n * Writes a little-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintLE(bitLength, value, out, offset) {\n if (out === void 0) { out = new Uint8Array(bitLength / 8); }\n if (offset === void 0) { offset = 0; }\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error(\"writeUintLE supports only bitLengths divisible by 8\");\n }\n if (!int_1.isSafeInteger(value)) {\n throw new Error(\"writeUintLE value must be an integer\");\n }\n var div = 1;\n for (var i = offset; i < offset + bitLength / 8; i++) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\nexports.writeUintLE = writeUintLE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset);\n}\nexports.readFloat32BE = readFloat32BE;\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset, true);\n}\nexports.readFloat32LE = readFloat32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * 64-bit floating-point number (\"double\") and returns it.\n */\nfunction readFloat64BE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset);\n}\nexports.readFloat64BE = readFloat64BE;\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * 64-bit floating-point number (\"double\") and returns it.\n */\nfunction readFloat64LE(array, offset) {\n if (offset === void 0) { offset = 0; }\n var view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset, true);\n}\nexports.readFloat64LE = readFloat64LE;\n/**\n * Writes 4-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value);\n return out;\n}\nexports.writeFloat32BE = writeFloat32BE;\n/**\n * Writes 4-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(4); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value, true);\n return out;\n}\nexports.writeFloat32LE = writeFloat32LE;\n/**\n * Writes 8-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64BE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value);\n return out;\n}\nexports.writeFloat64BE = writeFloat64BE;\n/**\n * Writes 8-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64LE(value, out, offset) {\n if (out === void 0) { out = new Uint8Array(8); }\n if (offset === void 0) { offset = 0; }\n var view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value, true);\n return out;\n}\nexports.writeFloat64LE = writeFloat64LE;\n//# sourceMappingURL=binary.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sets all values in the given array to zero and returns it.\n *\n * The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\nfunction wipe(array) {\n // Right now it's similar to array.fill(0). If it turns\n // out that runtimes optimize this call away, maybe\n // we can try something else.\n for (var i = 0; i < array.length; i++) {\n array[i] = 0;\n }\n return array;\n}\nexports.wipe = wipe;\n//# sourceMappingURL=wipe.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package chacha implements ChaCha stream cipher.\n */\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n// Number of ChaCha rounds (ChaCha20).\nvar ROUNDS = 20;\n// Applies the ChaCha core function to 16-byte input,\n// 32-byte key key, and puts the result into 64-byte array out.\nfunction core(out, input, key) {\n var j0 = 0x61707865; // \"expa\" -- ChaCha's \"sigma\" constant\n var j1 = 0x3320646E; // \"nd 3\" for 32-byte keys\n var j2 = 0x79622D32; // \"2-by\"\n var j3 = 0x6B206574; // \"te k\"\n var j4 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n var j5 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n var j6 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n var j7 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n var j8 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n var j9 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n var j10 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n var j11 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n var j12 = (input[3] << 24) | (input[2] << 16) | (input[1] << 8) | input[0];\n var j13 = (input[7] << 24) | (input[6] << 16) | (input[5] << 8) | input[4];\n var j14 = (input[11] << 24) | (input[10] << 16) | (input[9] << 8) | input[8];\n var j15 = (input[15] << 24) | (input[14] << 16) | (input[13] << 8) | input[12];\n var x0 = j0;\n var x1 = j1;\n var x2 = j2;\n var x3 = j3;\n var x4 = j4;\n var x5 = j5;\n var x6 = j6;\n var x7 = j7;\n var x8 = j8;\n var x9 = j9;\n var x10 = j10;\n var x11 = j11;\n var x12 = j12;\n var x13 = j13;\n var x14 = j14;\n var x15 = j15;\n for (var i = 0; i < ROUNDS; i += 2) {\n x0 = x0 + x4 | 0;\n x12 ^= x0;\n x12 = x12 >>> (32 - 16) | x12 << 16;\n x8 = x8 + x12 | 0;\n x4 ^= x8;\n x4 = x4 >>> (32 - 12) | x4 << 12;\n x1 = x1 + x5 | 0;\n x13 ^= x1;\n x13 = x13 >>> (32 - 16) | x13 << 16;\n x9 = x9 + x13 | 0;\n x5 ^= x9;\n x5 = x5 >>> (32 - 12) | x5 << 12;\n x2 = x2 + x6 | 0;\n x14 ^= x2;\n x14 = x14 >>> (32 - 16) | x14 << 16;\n x10 = x10 + x14 | 0;\n x6 ^= x10;\n x6 = x6 >>> (32 - 12) | x6 << 12;\n x3 = x3 + x7 | 0;\n x15 ^= x3;\n x15 = x15 >>> (32 - 16) | x15 << 16;\n x11 = x11 + x15 | 0;\n x7 ^= x11;\n x7 = x7 >>> (32 - 12) | x7 << 12;\n x2 = x2 + x6 | 0;\n x14 ^= x2;\n x14 = x14 >>> (32 - 8) | x14 << 8;\n x10 = x10 + x14 | 0;\n x6 ^= x10;\n x6 = x6 >>> (32 - 7) | x6 << 7;\n x3 = x3 + x7 | 0;\n x15 ^= x3;\n x15 = x15 >>> (32 - 8) | x15 << 8;\n x11 = x11 + x15 | 0;\n x7 ^= x11;\n x7 = x7 >>> (32 - 7) | x7 << 7;\n x1 = x1 + x5 | 0;\n x13 ^= x1;\n x13 = x13 >>> (32 - 8) | x13 << 8;\n x9 = x9 + x13 | 0;\n x5 ^= x9;\n x5 = x5 >>> (32 - 7) | x5 << 7;\n x0 = x0 + x4 | 0;\n x12 ^= x0;\n x12 = x12 >>> (32 - 8) | x12 << 8;\n x8 = x8 + x12 | 0;\n x4 ^= x8;\n x4 = x4 >>> (32 - 7) | x4 << 7;\n x0 = x0 + x5 | 0;\n x15 ^= x0;\n x15 = x15 >>> (32 - 16) | x15 << 16;\n x10 = x10 + x15 | 0;\n x5 ^= x10;\n x5 = x5 >>> (32 - 12) | x5 << 12;\n x1 = x1 + x6 | 0;\n x12 ^= x1;\n x12 = x12 >>> (32 - 16) | x12 << 16;\n x11 = x11 + x12 | 0;\n x6 ^= x11;\n x6 = x6 >>> (32 - 12) | x6 << 12;\n x2 = x2 + x7 | 0;\n x13 ^= x2;\n x13 = x13 >>> (32 - 16) | x13 << 16;\n x8 = x8 + x13 | 0;\n x7 ^= x8;\n x7 = x7 >>> (32 - 12) | x7 << 12;\n x3 = x3 + x4 | 0;\n x14 ^= x3;\n x14 = x14 >>> (32 - 16) | x14 << 16;\n x9 = x9 + x14 | 0;\n x4 ^= x9;\n x4 = x4 >>> (32 - 12) | x4 << 12;\n x2 = x2 + x7 | 0;\n x13 ^= x2;\n x13 = x13 >>> (32 - 8) | x13 << 8;\n x8 = x8 + x13 | 0;\n x7 ^= x8;\n x7 = x7 >>> (32 - 7) | x7 << 7;\n x3 = x3 + x4 | 0;\n x14 ^= x3;\n x14 = x14 >>> (32 - 8) | x14 << 8;\n x9 = x9 + x14 | 0;\n x4 ^= x9;\n x4 = x4 >>> (32 - 7) | x4 << 7;\n x1 = x1 + x6 | 0;\n x12 ^= x1;\n x12 = x12 >>> (32 - 8) | x12 << 8;\n x11 = x11 + x12 | 0;\n x6 ^= x11;\n x6 = x6 >>> (32 - 7) | x6 << 7;\n x0 = x0 + x5 | 0;\n x15 ^= x0;\n x15 = x15 >>> (32 - 8) | x15 << 8;\n x10 = x10 + x15 | 0;\n x5 ^= x10;\n x5 = x5 >>> (32 - 7) | x5 << 7;\n }\n binary_1.writeUint32LE(x0 + j0 | 0, out, 0);\n binary_1.writeUint32LE(x1 + j1 | 0, out, 4);\n binary_1.writeUint32LE(x2 + j2 | 0, out, 8);\n binary_1.writeUint32LE(x3 + j3 | 0, out, 12);\n binary_1.writeUint32LE(x4 + j4 | 0, out, 16);\n binary_1.writeUint32LE(x5 + j5 | 0, out, 20);\n binary_1.writeUint32LE(x6 + j6 | 0, out, 24);\n binary_1.writeUint32LE(x7 + j7 | 0, out, 28);\n binary_1.writeUint32LE(x8 + j8 | 0, out, 32);\n binary_1.writeUint32LE(x9 + j9 | 0, out, 36);\n binary_1.writeUint32LE(x10 + j10 | 0, out, 40);\n binary_1.writeUint32LE(x11 + j11 | 0, out, 44);\n binary_1.writeUint32LE(x12 + j12 | 0, out, 48);\n binary_1.writeUint32LE(x13 + j13 | 0, out, 52);\n binary_1.writeUint32LE(x14 + j14 | 0, out, 56);\n binary_1.writeUint32LE(x15 + j15 | 0, out, 60);\n}\n/**\n * Encrypt src with ChaCha20 stream generated for the given 32-byte key and\n * 8-byte (as in original implementation) or 12-byte (as in RFC7539) nonce and\n * write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * If nonce is 12 bytes, users should not encrypt more than 256 GiB with the\n * same key and nonce, otherwise the stream will repeat. The function will\n * throw error if counter overflows to prevent this.\n *\n * If nonce is 8 bytes, the output is practically unlimited (2^70 bytes, which\n * is more than a million petabytes). However, it is not recommended to\n * generate 8-byte nonces randomly, as the chance of collision is high.\n *\n * Never use the same key and nonce to encrypt more than one message.\n *\n * If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte\n * array with stream counter in first nonceInplaceCounterLength bytes and nonce\n * in the last remaining bytes. The counter will be incremented inplace for\n * each ChaCha block. This is useful if you need to encrypt one stream of data\n * in chunks.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength) {\n if (nonceInplaceCounterLength === void 0) { nonceInplaceCounterLength = 0; }\n // We only support 256-bit keys.\n if (key.length !== 32) {\n throw new Error(\"ChaCha: key size must be 32 bytes\");\n }\n if (dst.length < src.length) {\n throw new Error(\"ChaCha: destination is shorter than source\");\n }\n var nc;\n var counterLength;\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 8 && nonce.length !== 12) {\n throw new Error(\"ChaCha nonce must be 8 or 12 bytes\");\n }\n nc = new Uint8Array(16);\n // First counterLength bytes of nc are counter, starting with zero.\n counterLength = nc.length - nonce.length;\n // Last bytes of nc after counterLength are nonce, set them.\n nc.set(nonce, counterLength);\n }\n else {\n if (nonce.length !== 16) {\n throw new Error(\"ChaCha nonce with counter must be 16 bytes\");\n }\n // This will update passed nonce with counter inplace.\n nc = nonce;\n counterLength = nonceInplaceCounterLength;\n }\n // Allocate temporary space for ChaCha block.\n var block = new Uint8Array(64);\n for (var i = 0; i < src.length; i += 64) {\n // Generate a block.\n core(block, nc, key);\n // XOR block bytes with src into dst.\n for (var j = i; j < i + 64 && j < src.length; j++) {\n dst[j] = src[j] ^ block[j - i];\n }\n // Increment counter.\n incrementCounter(nc, 0, counterLength);\n }\n // Cleanup temporary space.\n wipe_1.wipe(block);\n if (nonceInplaceCounterLength === 0) {\n // Cleanup counter.\n wipe_1.wipe(nc);\n }\n return dst;\n}\nexports.streamXOR = streamXOR;\n/**\n * Generate ChaCha20 stream for the given 32-byte key and 8-byte or 12-byte\n * nonce and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * If nonceInplaceCounterLength is not 0, it behaves the same with respect to\n * the nonce as described in the streamXOR documentation.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength) {\n if (nonceInplaceCounterLength === void 0) { nonceInplaceCounterLength = 0; }\n wipe_1.wipe(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\nexports.stream = stream;\nfunction incrementCounter(counter, pos, len) {\n var carry = 1;\n while (len--) {\n carry = carry + (counter[pos] & 0xff) | 0;\n counter[pos] = carry & 0xff;\n carry >>>= 8;\n pos++;\n }\n if (carry > 0) {\n throw new Error(\"ChaCha: counter overflow\");\n }\n}\n//# sourceMappingURL=chacha.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package constant-time provides functions for performing algorithmically constant-time operations.\n */\n/**\n * NOTE! Due to the inability to guarantee real constant time evaluation of\n * anything in JavaScript VM, this is module is the best effort.\n */\n/**\n * Returns resultIfOne if subject is 1, or resultIfZero if subject is 0.\n *\n * Supports only 32-bit integers, so resultIfOne or resultIfZero are not\n * integers, they'll be converted to them with bitwise operations.\n */\nfunction select(subject, resultIfOne, resultIfZero) {\n return (~(subject - 1) & resultIfOne) | ((subject - 1) & resultIfZero);\n}\nexports.select = select;\n/**\n * Returns 1 if a <= b, or 0 if not.\n * Arguments must be positive 32-bit integers less than or equal to 2^31 - 1.\n */\nfunction lessOrEqual(a, b) {\n return (((a | 0) - (b | 0) - 1) >>> 31) & 1;\n}\nexports.lessOrEqual = lessOrEqual;\n/**\n * Returns 1 if a and b are of equal length and their contents\n * are equal, or 0 otherwise.\n *\n * Note that unlike in equal(), zero-length inputs are considered\n * the same, so this function will return 1.\n */\nfunction compare(a, b) {\n if (a.length !== b.length) {\n return 0;\n }\n var result = 0;\n for (var i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return (1 & ((result - 1) >>> 8));\n}\nexports.compare = compare;\n/**\n * Returns true if a and b are of equal non-zero length,\n * and their contents are equal, or false otherwise.\n *\n * Note that unlike in compare() zero-length inputs are considered\n * _not_ equal, so this function will return false.\n */\nfunction equal(a, b) {\n if (a.length === 0 || b.length === 0) {\n return false;\n }\n return compare(a, b) !== 0;\n}\nexports.equal = equal;\n//# sourceMappingURL=constant-time.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package poly1305 implements Poly1305 one-time message authentication algorithm.\n */\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 16;\n// Port of Andrew Moon's Poly1305-donna-16. Public domain.\n// https://github.com/floodyberry/poly1305-donna\n/**\n * Poly1305 computes 16-byte authenticator of message using\n * a one-time 32-byte key.\n *\n * Important: key should be used for only one message,\n * it should never repeat.\n */\nvar Poly1305 = /** @class */ (function () {\n function Poly1305(key) {\n this.digestLength = exports.DIGEST_LENGTH;\n this._buffer = new Uint8Array(16);\n this._r = new Uint16Array(10);\n this._h = new Uint16Array(10);\n this._pad = new Uint16Array(8);\n this._leftover = 0;\n this._fin = 0;\n this._finished = false;\n var t0 = key[0] | key[1] << 8;\n this._r[0] = (t0) & 0x1fff;\n var t1 = key[2] | key[3] << 8;\n this._r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n var t2 = key[4] | key[5] << 8;\n this._r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n var t3 = key[6] | key[7] << 8;\n this._r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n var t4 = key[8] | key[9] << 8;\n this._r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this._r[5] = ((t4 >>> 1)) & 0x1ffe;\n var t5 = key[10] | key[11] << 8;\n this._r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n var t6 = key[12] | key[13] << 8;\n this._r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n var t7 = key[14] | key[15] << 8;\n this._r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this._r[9] = ((t7 >>> 5)) & 0x007f;\n this._pad[0] = key[16] | key[17] << 8;\n this._pad[1] = key[18] | key[19] << 8;\n this._pad[2] = key[20] | key[21] << 8;\n this._pad[3] = key[22] | key[23] << 8;\n this._pad[4] = key[24] | key[25] << 8;\n this._pad[5] = key[26] | key[27] << 8;\n this._pad[6] = key[28] | key[29] << 8;\n this._pad[7] = key[30] | key[31] << 8;\n }\n Poly1305.prototype._blocks = function (m, mpos, bytes) {\n var hibit = this._fin ? 0 : 1 << 11;\n var h0 = this._h[0], h1 = this._h[1], h2 = this._h[2], h3 = this._h[3], h4 = this._h[4], h5 = this._h[5], h6 = this._h[6], h7 = this._h[7], h8 = this._h[8], h9 = this._h[9];\n var r0 = this._r[0], r1 = this._r[1], r2 = this._r[2], r3 = this._r[3], r4 = this._r[4], r5 = this._r[5], r6 = this._r[6], r7 = this._r[7], r8 = this._r[8], r9 = this._r[9];\n while (bytes >= 16) {\n var t0 = m[mpos + 0] | m[mpos + 1] << 8;\n h0 += (t0) & 0x1fff;\n var t1 = m[mpos + 2] | m[mpos + 3] << 8;\n h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n var t2 = m[mpos + 4] | m[mpos + 5] << 8;\n h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;\n var t3 = m[mpos + 6] | m[mpos + 7] << 8;\n h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n var t4 = m[mpos + 8] | m[mpos + 9] << 8;\n h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;\n h5 += ((t4 >>> 1)) & 0x1fff;\n var t5 = m[mpos + 10] | m[mpos + 11] << 8;\n h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n var t6 = m[mpos + 12] | m[mpos + 13] << 8;\n h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;\n var t7 = m[mpos + 14] | m[mpos + 15] << 8;\n h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n h9 += ((t7 >>> 5)) | hibit;\n var c = 0;\n var d0 = c;\n d0 += h0 * r0;\n d0 += h1 * (5 * r9);\n d0 += h2 * (5 * r8);\n d0 += h3 * (5 * r7);\n d0 += h4 * (5 * r6);\n c = (d0 >>> 13);\n d0 &= 0x1fff;\n d0 += h5 * (5 * r5);\n d0 += h6 * (5 * r4);\n d0 += h7 * (5 * r3);\n d0 += h8 * (5 * r2);\n d0 += h9 * (5 * r1);\n c += (d0 >>> 13);\n d0 &= 0x1fff;\n var d1 = c;\n d1 += h0 * r1;\n d1 += h1 * r0;\n d1 += h2 * (5 * r9);\n d1 += h3 * (5 * r8);\n d1 += h4 * (5 * r7);\n c = (d1 >>> 13);\n d1 &= 0x1fff;\n d1 += h5 * (5 * r6);\n d1 += h6 * (5 * r5);\n d1 += h7 * (5 * r4);\n d1 += h8 * (5 * r3);\n d1 += h9 * (5 * r2);\n c += (d1 >>> 13);\n d1 &= 0x1fff;\n var d2 = c;\n d2 += h0 * r2;\n d2 += h1 * r1;\n d2 += h2 * r0;\n d2 += h3 * (5 * r9);\n d2 += h4 * (5 * r8);\n c = (d2 >>> 13);\n d2 &= 0x1fff;\n d2 += h5 * (5 * r7);\n d2 += h6 * (5 * r6);\n d2 += h7 * (5 * r5);\n d2 += h8 * (5 * r4);\n d2 += h9 * (5 * r3);\n c += (d2 >>> 13);\n d2 &= 0x1fff;\n var d3 = c;\n d3 += h0 * r3;\n d3 += h1 * r2;\n d3 += h2 * r1;\n d3 += h3 * r0;\n d3 += h4 * (5 * r9);\n c = (d3 >>> 13);\n d3 &= 0x1fff;\n d3 += h5 * (5 * r8);\n d3 += h6 * (5 * r7);\n d3 += h7 * (5 * r6);\n d3 += h8 * (5 * r5);\n d3 += h9 * (5 * r4);\n c += (d3 >>> 13);\n d3 &= 0x1fff;\n var d4 = c;\n d4 += h0 * r4;\n d4 += h1 * r3;\n d4 += h2 * r2;\n d4 += h3 * r1;\n d4 += h4 * r0;\n c = (d4 >>> 13);\n d4 &= 0x1fff;\n d4 += h5 * (5 * r9);\n d4 += h6 * (5 * r8);\n d4 += h7 * (5 * r7);\n d4 += h8 * (5 * r6);\n d4 += h9 * (5 * r5);\n c += (d4 >>> 13);\n d4 &= 0x1fff;\n var d5 = c;\n d5 += h0 * r5;\n d5 += h1 * r4;\n d5 += h2 * r3;\n d5 += h3 * r2;\n d5 += h4 * r1;\n c = (d5 >>> 13);\n d5 &= 0x1fff;\n d5 += h5 * r0;\n d5 += h6 * (5 * r9);\n d5 += h7 * (5 * r8);\n d5 += h8 * (5 * r7);\n d5 += h9 * (5 * r6);\n c += (d5 >>> 13);\n d5 &= 0x1fff;\n var d6 = c;\n d6 += h0 * r6;\n d6 += h1 * r5;\n d6 += h2 * r4;\n d6 += h3 * r3;\n d6 += h4 * r2;\n c = (d6 >>> 13);\n d6 &= 0x1fff;\n d6 += h5 * r1;\n d6 += h6 * r0;\n d6 += h7 * (5 * r9);\n d6 += h8 * (5 * r8);\n d6 += h9 * (5 * r7);\n c += (d6 >>> 13);\n d6 &= 0x1fff;\n var d7 = c;\n d7 += h0 * r7;\n d7 += h1 * r6;\n d7 += h2 * r5;\n d7 += h3 * r4;\n d7 += h4 * r3;\n c = (d7 >>> 13);\n d7 &= 0x1fff;\n d7 += h5 * r2;\n d7 += h6 * r1;\n d7 += h7 * r0;\n d7 += h8 * (5 * r9);\n d7 += h9 * (5 * r8);\n c += (d7 >>> 13);\n d7 &= 0x1fff;\n var d8 = c;\n d8 += h0 * r8;\n d8 += h1 * r7;\n d8 += h2 * r6;\n d8 += h3 * r5;\n d8 += h4 * r4;\n c = (d8 >>> 13);\n d8 &= 0x1fff;\n d8 += h5 * r3;\n d8 += h6 * r2;\n d8 += h7 * r1;\n d8 += h8 * r0;\n d8 += h9 * (5 * r9);\n c += (d8 >>> 13);\n d8 &= 0x1fff;\n var d9 = c;\n d9 += h0 * r9;\n d9 += h1 * r8;\n d9 += h2 * r7;\n d9 += h3 * r6;\n d9 += h4 * r5;\n c = (d9 >>> 13);\n d9 &= 0x1fff;\n d9 += h5 * r4;\n d9 += h6 * r3;\n d9 += h7 * r2;\n d9 += h8 * r1;\n d9 += h9 * r0;\n c += (d9 >>> 13);\n d9 &= 0x1fff;\n c = (((c << 2) + c)) | 0;\n c = (c + d0) | 0;\n d0 = c & 0x1fff;\n c = (c >>> 13);\n d1 += c;\n h0 = d0;\n h1 = d1;\n h2 = d2;\n h3 = d3;\n h4 = d4;\n h5 = d5;\n h6 = d6;\n h7 = d7;\n h8 = d8;\n h9 = d9;\n mpos += 16;\n bytes -= 16;\n }\n this._h[0] = h0;\n this._h[1] = h1;\n this._h[2] = h2;\n this._h[3] = h3;\n this._h[4] = h4;\n this._h[5] = h5;\n this._h[6] = h6;\n this._h[7] = h7;\n this._h[8] = h8;\n this._h[9] = h9;\n };\n Poly1305.prototype.finish = function (mac, macpos) {\n if (macpos === void 0) { macpos = 0; }\n var g = new Uint16Array(10);\n var c;\n var mask;\n var f;\n var i;\n if (this._leftover) {\n i = this._leftover;\n this._buffer[i++] = 1;\n for (; i < 16; i++) {\n this._buffer[i] = 0;\n }\n this._fin = 1;\n this._blocks(this._buffer, 0, 16);\n }\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n for (i = 2; i < 10; i++) {\n this._h[i] += c;\n c = this._h[i] >>> 13;\n this._h[i] &= 0x1fff;\n }\n this._h[0] += (c * 5);\n c = this._h[0] >>> 13;\n this._h[0] &= 0x1fff;\n this._h[1] += c;\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n this._h[2] += c;\n g[0] = this._h[0] + 5;\n c = g[0] >>> 13;\n g[0] &= 0x1fff;\n for (i = 1; i < 10; i++) {\n g[i] = this._h[i] + c;\n c = g[i] >>> 13;\n g[i] &= 0x1fff;\n }\n g[9] -= (1 << 13);\n mask = (c ^ 1) - 1;\n for (i = 0; i < 10; i++) {\n g[i] &= mask;\n }\n mask = ~mask;\n for (i = 0; i < 10; i++) {\n this._h[i] = (this._h[i] & mask) | g[i];\n }\n this._h[0] = ((this._h[0]) | (this._h[1] << 13)) & 0xffff;\n this._h[1] = ((this._h[1] >>> 3) | (this._h[2] << 10)) & 0xffff;\n this._h[2] = ((this._h[2] >>> 6) | (this._h[3] << 7)) & 0xffff;\n this._h[3] = ((this._h[3] >>> 9) | (this._h[4] << 4)) & 0xffff;\n this._h[4] = ((this._h[4] >>> 12) | (this._h[5] << 1) | (this._h[6] << 14)) & 0xffff;\n this._h[5] = ((this._h[6] >>> 2) | (this._h[7] << 11)) & 0xffff;\n this._h[6] = ((this._h[7] >>> 5) | (this._h[8] << 8)) & 0xffff;\n this._h[7] = ((this._h[8] >>> 8) | (this._h[9] << 5)) & 0xffff;\n f = this._h[0] + this._pad[0];\n this._h[0] = f & 0xffff;\n for (i = 1; i < 8; i++) {\n f = (((this._h[i] + this._pad[i]) | 0) + (f >>> 16)) | 0;\n this._h[i] = f & 0xffff;\n }\n mac[macpos + 0] = this._h[0] >>> 0;\n mac[macpos + 1] = this._h[0] >>> 8;\n mac[macpos + 2] = this._h[1] >>> 0;\n mac[macpos + 3] = this._h[1] >>> 8;\n mac[macpos + 4] = this._h[2] >>> 0;\n mac[macpos + 5] = this._h[2] >>> 8;\n mac[macpos + 6] = this._h[3] >>> 0;\n mac[macpos + 7] = this._h[3] >>> 8;\n mac[macpos + 8] = this._h[4] >>> 0;\n mac[macpos + 9] = this._h[4] >>> 8;\n mac[macpos + 10] = this._h[5] >>> 0;\n mac[macpos + 11] = this._h[5] >>> 8;\n mac[macpos + 12] = this._h[6] >>> 0;\n mac[macpos + 13] = this._h[6] >>> 8;\n mac[macpos + 14] = this._h[7] >>> 0;\n mac[macpos + 15] = this._h[7] >>> 8;\n this._finished = true;\n return this;\n };\n Poly1305.prototype.update = function (m) {\n var mpos = 0;\n var bytes = m.length;\n var want;\n if (this._leftover) {\n want = (16 - this._leftover);\n if (want > bytes) {\n want = bytes;\n }\n for (var i = 0; i < want; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n bytes -= want;\n mpos += want;\n this._leftover += want;\n if (this._leftover < 16) {\n return this;\n }\n this._blocks(this._buffer, 0, 16);\n this._leftover = 0;\n }\n if (bytes >= 16) {\n want = bytes - (bytes % 16);\n this._blocks(m, mpos, want);\n mpos += want;\n bytes -= want;\n }\n if (bytes) {\n for (var i = 0; i < bytes; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n this._leftover += bytes;\n }\n return this;\n };\n Poly1305.prototype.digest = function () {\n // TODO(dchest): it behaves differently than other hashes/HMAC,\n // because it throws when finished — others just return saved result.\n if (this._finished) {\n throw new Error(\"Poly1305 was finished\");\n }\n var mac = new Uint8Array(16);\n this.finish(mac);\n return mac;\n };\n Poly1305.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._r);\n wipe_1.wipe(this._h);\n wipe_1.wipe(this._pad);\n this._leftover = 0;\n this._fin = 0;\n this._finished = true; // mark as finished even if not\n return this;\n };\n return Poly1305;\n}());\nexports.Poly1305 = Poly1305;\n/**\n * Returns 16-byte authenticator of data using a one-time 32-byte key.\n *\n * Important: key should be used for only one message, it should never repeat.\n */\nfunction oneTimeAuth(key, data) {\n var h = new Poly1305(key);\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.oneTimeAuth = oneTimeAuth;\n/**\n * Returns true if two authenticators are 16-byte long and equal.\n * Uses contant-time comparison to avoid leaking timing information.\n */\nfunction equal(a, b) {\n if (a.length !== exports.DIGEST_LENGTH || b.length !== exports.DIGEST_LENGTH) {\n return false;\n }\n return constant_time_1.equal(a, b);\n}\nexports.equal = equal;\n//# sourceMappingURL=poly1305.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar chacha_1 = require(\"@stablelib/chacha\");\nvar poly1305_1 = require(\"@stablelib/poly1305\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nvar binary_1 = require(\"@stablelib/binary\");\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nexports.KEY_LENGTH = 32;\nexports.NONCE_LENGTH = 12;\nexports.TAG_LENGTH = 16;\nvar ZEROS = new Uint8Array(16);\n/**\n * ChaCha20-Poly1305 Authenticated Encryption with Associated Data.\n *\n * Defined in RFC7539.\n */\nvar ChaCha20Poly1305 = /** @class */ (function () {\n /**\n * Creates a new instance with the given 32-byte key.\n */\n function ChaCha20Poly1305(key) {\n this.nonceLength = exports.NONCE_LENGTH;\n this.tagLength = exports.TAG_LENGTH;\n if (key.length !== exports.KEY_LENGTH) {\n throw new Error(\"ChaCha20Poly1305 needs 32-byte key\");\n }\n // Copy key.\n this._key = new Uint8Array(key);\n }\n /**\n * Encrypts and authenticates plaintext, authenticates associated data,\n * and returns sealed ciphertext, which includes authentication tag.\n *\n * RFC7539 specifies 12 bytes for nonce. It may be this 12-byte nonce\n * (\"IV\"), or full 16-byte counter (called \"32-bit fixed-common part\")\n * and nonce.\n *\n * If dst is given (it must be the size of plaintext + the size of tag\n * length) the result will be put into it. Dst and plaintext must not\n * overlap.\n */\n ChaCha20Poly1305.prototype.seal = function (nonce, plaintext, associatedData, dst) {\n if (nonce.length > 16) {\n throw new Error(\"ChaCha20Poly1305: incorrect nonce length\");\n }\n // Allocate space for counter, and set nonce as last bytes of it.\n var counter = new Uint8Array(16);\n counter.set(nonce, counter.length - nonce.length);\n // Generate authentication key by taking first 32-bytes of stream.\n // We pass full counter, which has 12-byte nonce and 4-byte block counter,\n // and it will get incremented after generating the block, which is\n // exactly what we need: we only use the first 32 bytes of 64-byte\n // ChaCha block and discard the next 32 bytes.\n var authKey = new Uint8Array(32);\n chacha_1.stream(this._key, counter, authKey, 4);\n // Allocate space for sealed ciphertext.\n var resultLength = plaintext.length + this.tagLength;\n var result;\n if (dst) {\n if (dst.length !== resultLength) {\n throw new Error(\"ChaCha20Poly1305: incorrect destination length\");\n }\n result = dst;\n }\n else {\n result = new Uint8Array(resultLength);\n }\n // Encrypt plaintext.\n chacha_1.streamXOR(this._key, counter, plaintext, result, 4);\n // Authenticate.\n // XXX: can \"simplify\" here: pass full result (which is already padded\n // due to zeroes prepared for tag), and ciphertext length instead of\n // subarray of result.\n this._authenticate(result.subarray(result.length - this.tagLength, result.length), authKey, result.subarray(0, result.length - this.tagLength), associatedData);\n // Cleanup.\n wipe_1.wipe(counter);\n return result;\n };\n /**\n * Authenticates sealed ciphertext (which includes authentication tag) and\n * associated data, decrypts ciphertext and returns decrypted plaintext.\n *\n * RFC7539 specifies 12 bytes for nonce. It may be this 12-byte nonce\n * (\"IV\"), or full 16-byte counter (called \"32-bit fixed-common part\")\n * and nonce.\n *\n * If authentication fails, it returns null.\n *\n * If dst is given (it must be of ciphertext length minus tag length),\n * the result will be put into it. Dst and plaintext must not overlap.\n */\n ChaCha20Poly1305.prototype.open = function (nonce, sealed, associatedData, dst) {\n if (nonce.length > 16) {\n throw new Error(\"ChaCha20Poly1305: incorrect nonce length\");\n }\n // Sealed ciphertext should at least contain tag.\n if (sealed.length < this.tagLength) {\n // TODO(dchest): should we throw here instead?\n return null;\n }\n // Allocate space for counter, and set nonce as last bytes of it.\n var counter = new Uint8Array(16);\n counter.set(nonce, counter.length - nonce.length);\n // Generate authentication key by taking first 32-bytes of stream.\n var authKey = new Uint8Array(32);\n chacha_1.stream(this._key, counter, authKey, 4);\n // Authenticate.\n // XXX: can simplify and avoid allocation: since authenticate()\n // already allocates tag (from Poly1305.digest(), it can return)\n // it instead of copying to calculatedTag. But then in seal()\n // we'll need to copy it.\n var calculatedTag = new Uint8Array(this.tagLength);\n this._authenticate(calculatedTag, authKey, sealed.subarray(0, sealed.length - this.tagLength), associatedData);\n // Constant-time compare tags and return null if they differ.\n if (!constant_time_1.equal(calculatedTag, sealed.subarray(sealed.length - this.tagLength, sealed.length))) {\n return null;\n }\n // Allocate space for decrypted plaintext.\n var resultLength = sealed.length - this.tagLength;\n var result;\n if (dst) {\n if (dst.length !== resultLength) {\n throw new Error(\"ChaCha20Poly1305: incorrect destination length\");\n }\n result = dst;\n }\n else {\n result = new Uint8Array(resultLength);\n }\n // Decrypt.\n chacha_1.streamXOR(this._key, counter, sealed.subarray(0, sealed.length - this.tagLength), result, 4);\n // Cleanup.\n wipe_1.wipe(counter);\n return result;\n };\n ChaCha20Poly1305.prototype.clean = function () {\n wipe_1.wipe(this._key);\n return this;\n };\n ChaCha20Poly1305.prototype._authenticate = function (tagOut, authKey, ciphertext, associatedData) {\n // Initialize Poly1305 with authKey.\n var h = new poly1305_1.Poly1305(authKey);\n // Authenticate padded associated data.\n if (associatedData) {\n h.update(associatedData);\n if (associatedData.length % 16 > 0) {\n h.update(ZEROS.subarray(associatedData.length % 16));\n }\n }\n // Authenticate padded ciphertext.\n h.update(ciphertext);\n if (ciphertext.length % 16 > 0) {\n h.update(ZEROS.subarray(ciphertext.length % 16));\n }\n // Authenticate length of associated data.\n // XXX: can avoid allocation here?\n var length = new Uint8Array(8);\n if (associatedData) {\n binary_1.writeUint64LE(associatedData.length, length);\n }\n h.update(length);\n // Authenticate length of ciphertext.\n binary_1.writeUint64LE(ciphertext.length, length);\n h.update(length);\n // Get tag and copy it into tagOut.\n var tag = h.digest();\n for (var i = 0; i < tag.length; i++) {\n tagOut[i] = tag[i];\n }\n // Cleanup.\n h.clean();\n wipe_1.wipe(tag);\n wipe_1.wipe(length);\n };\n return ChaCha20Poly1305;\n}());\nexports.ChaCha20Poly1305 = ChaCha20Poly1305;\n//# sourceMappingURL=chacha20poly1305.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isSerializableHash(h) {\n return (typeof h.saveState !== \"undefined\" &&\n typeof h.restoreState !== \"undefined\" &&\n typeof h.cleanSavedState !== \"undefined\");\n}\nexports.isSerializableHash = isSerializableHash;\n// TODO(dchest): figure out the standardized interface for XOF such as\n// SHAKE and BLAKE2X.\n//# sourceMappingURL=hash.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package hmac implements HMAC algorithm.\n */\nvar hash_1 = require(\"@stablelib/hash\");\nvar constant_time_1 = require(\"@stablelib/constant-time\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n/**\n * HMAC implements hash-based message authentication algorithm.\n */\nvar HMAC = /** @class */ (function () {\n /**\n * Constructs a new HMAC with the given Hash and secret key.\n */\n function HMAC(hash, key) {\n this._finished = false; // true if HMAC was finalized\n // Initialize inner and outer hashes.\n this._inner = new hash();\n this._outer = new hash();\n // Set block and digest sizes for this HMAC\n // instance to values from the hash.\n this.blockSize = this._outer.blockSize;\n this.digestLength = this._outer.digestLength;\n // Pad temporary stores a key (or its hash) padded with zeroes.\n var pad = new Uint8Array(this.blockSize);\n if (key.length > this.blockSize) {\n // If key is bigger than hash block size, it must be\n // hashed and this hash is used as a key instead.\n this._inner.update(key).finish(pad).clean();\n }\n else {\n // Otherwise, copy the key into pad.\n pad.set(key);\n }\n // Now two different keys are derived from padded key\n // by xoring a different byte value to each.\n // To make inner hash key, xor byte 0x36 into pad.\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36;\n }\n // Update inner hash with the result.\n this._inner.update(pad);\n // To make outer hash key, xor byte 0x5c into pad.\n // But since we already xored 0x36 there, we must\n // first undo this by xoring it again.\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36 ^ 0x5c;\n }\n // Update outer hash with the result.\n this._outer.update(pad);\n // Save states of both hashes, so that we can quickly restore\n // them later in reset() without the need to remember the actual\n // key and perform this initialization again.\n if (hash_1.isSerializableHash(this._inner) && hash_1.isSerializableHash(this._outer)) {\n this._innerKeyedState = this._inner.saveState();\n this._outerKeyedState = this._outer.saveState();\n }\n // Clean pad.\n wipe_1.wipe(pad);\n }\n /**\n * Returns HMAC state to the state initialized with key\n * to make it possible to run HMAC over the other data with the same\n * key without creating a new instance.\n */\n HMAC.prototype.reset = function () {\n if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {\n throw new Error(\"hmac: can't reset() because hash doesn't implement restoreState()\");\n }\n // Restore keyed states of inner and outer hashes.\n this._inner.restoreState(this._innerKeyedState);\n this._outer.restoreState(this._outerKeyedState);\n this._finished = false;\n return this;\n };\n /**\n * Cleans HMAC state.\n */\n HMAC.prototype.clean = function () {\n if (hash_1.isSerializableHash(this._inner)) {\n this._inner.cleanSavedState(this._innerKeyedState);\n }\n if (hash_1.isSerializableHash(this._outer)) {\n this._outer.cleanSavedState(this._outerKeyedState);\n }\n this._inner.clean();\n this._outer.clean();\n };\n /**\n * Updates state with provided data.\n */\n HMAC.prototype.update = function (data) {\n this._inner.update(data);\n return this;\n };\n /**\n * Finalizes HMAC and puts the result in out.\n */\n HMAC.prototype.finish = function (out) {\n if (this._finished) {\n // If HMAC was finalized, outer hash is also finalized,\n // so it produces the same digest it produced when it\n // was finalized.\n this._outer.finish(out);\n return this;\n }\n // Finalize inner hash and store the result temporarily.\n this._inner.finish(out);\n // Update outer hash with digest of inner hash and and finalize it.\n this._outer.update(out.subarray(0, this.digestLength)).finish(out);\n this._finished = true;\n return this;\n };\n /**\n * Returns the computed message authentication code.\n */\n HMAC.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Saves HMAC state.\n * This function is needed for PBKDF2 optimization.\n */\n HMAC.prototype.saveState = function () {\n if (!hash_1.isSerializableHash(this._inner)) {\n throw new Error(\"hmac: can't saveState() because hash doesn't implement it\");\n }\n return this._inner.saveState();\n };\n HMAC.prototype.restoreState = function (savedState) {\n if (!hash_1.isSerializableHash(this._inner) || !hash_1.isSerializableHash(this._outer)) {\n throw new Error(\"hmac: can't restoreState() because hash doesn't implement it\");\n }\n this._inner.restoreState(savedState);\n this._outer.restoreState(this._outerKeyedState);\n this._finished = false;\n return this;\n };\n HMAC.prototype.cleanSavedState = function (savedState) {\n if (!hash_1.isSerializableHash(this._inner)) {\n throw new Error(\"hmac: can't cleanSavedState() because hash doesn't implement it\");\n }\n this._inner.cleanSavedState(savedState);\n };\n return HMAC;\n}());\nexports.HMAC = HMAC;\n/**\n * Returns HMAC using the given hash constructor for the key over data.\n */\nfunction hmac(hash, key, data) {\n var h = new HMAC(hash, key);\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hmac = hmac;\n/**\n * Returns true if two HMAC digests are equal.\n * Uses constant-time comparison to avoid leaking timing information.\n *\n * Example:\n *\n * const receivedDigest = ...\n * const realDigest = hmac(SHA256, key, data);\n * if (!equal(receivedDigest, realDigest)) {\n * throw new Error(\"Authentication error\");\n * }\n */\nexports.equal = constant_time_1.equal;\n//# sourceMappingURL=hmac.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar hmac_1 = require(\"@stablelib/hmac\");\nvar wipe_1 = require(\"@stablelib/wipe\");\n/**\n * HMAC-based Extract-and-Expand Key Derivation Function.\n *\n * Implements HKDF from RFC5869.\n *\n * Expands the given master key with salt and info into\n * a limited stream of key material.\n */\nvar HKDF = /** @class */ (function () {\n /**\n * Create a new HKDF instance for the given hash function\n * with the master key, optional salt, and info.\n *\n * - Master key is a high-entropy secret key (not a password).\n * - Salt is a non-secret random value.\n * - Info is application- and/or context-specific information.\n */\n function HKDF(hash, key, salt, info) {\n if (salt === void 0) { salt = new Uint8Array(0); }\n this._counter = new Uint8Array(1); // starts with zero\n this._hash = hash;\n this._info = info;\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac_1.hmac(this._hash, salt, key);\n // Initialize HMAC for expanding with extracted key.\n this._hmac = new hmac_1.HMAC(hash, okm);\n // Allocate buffer.\n this._buffer = new Uint8Array(this._hmac.digestLength);\n this._bufpos = this._buffer.length;\n }\n // Fill buffer with new block of HKDF-Extract output.\n HKDF.prototype._fillBuffer = function () {\n // Increment counter.\n this._counter[0]++;\n var ctr = this._counter[0];\n // Check if counter overflowed.\n if (ctr === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n this._hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (ctr > 1) {\n this._hmac.update(this._buffer);\n }\n // Hash in info if it exists.\n if (this._info) {\n this._hmac.update(this._info);\n }\n // Hash in the counter.\n this._hmac.update(this._counter);\n // Output result to buffer and clean HMAC instance.\n this._hmac.finish(this._buffer);\n // Reset buffer position.\n this._bufpos = 0;\n };\n /**\n * Expand returns next key material of the given length.\n *\n * It throws if expansion limit is reached (which is\n * 254 digests of the underlying HMAC function).\n */\n HKDF.prototype.expand = function (length) {\n var out = new Uint8Array(length);\n for (var i = 0; i < out.length; i++) {\n if (this._bufpos === this._buffer.length) {\n this._fillBuffer();\n }\n out[i] = this._buffer[this._bufpos++];\n }\n return out;\n };\n HKDF.prototype.clean = function () {\n this._hmac.clean();\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._counter);\n this._bufpos = 0;\n };\n return HKDF;\n}());\nexports.HKDF = HKDF;\n// TODO(dchest): maybe implement deriveKey?\n//# sourceMappingURL=hkdf.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowserRandomSource = void 0;\nconst QUOTA = 65536;\nclass BrowserRandomSource {\n constructor() {\n this.isAvailable = false;\n this.isInstantiated = false;\n const browserCrypto = typeof self !== 'undefined'\n ? (self.crypto || self.msCrypto) // IE11 has msCrypto\n : null;\n if (browserCrypto && browserCrypto.getRandomValues !== undefined) {\n this._crypto = browserCrypto;\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n randomBytes(length) {\n if (!this.isAvailable || !this._crypto) {\n throw new Error(\"Browser random byte generator is not available.\");\n }\n const out = new Uint8Array(length);\n for (let i = 0; i < out.length; i += QUOTA) {\n this._crypto.getRandomValues(out.subarray(i, i + Math.min(out.length - i, QUOTA)));\n }\n return out;\n }\n}\nexports.BrowserRandomSource = BrowserRandomSource;\n//# sourceMappingURL=browser.js.map","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict'\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295\n\nfunction oldBrowser () {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11')\n}\n\nvar Buffer = require('safe-buffer').Buffer\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n\n var bytes = Buffer.allocUnsafe(size)\n\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","module.exports = require('events').EventEmitter;\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @typedef {(...args: unknown[]) => unknown} Func */\n\n/** @type {(fn: T, length: number, loose?: boolean) => T} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */\n/** @typedef {'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array'} TypedArrayName */\n/** @type {{ [k in `\\$${TypedArrayName}`]?: (receiver: TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call } & { __proto__: null }} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(fn);\n\t\t}\n\t});\n}\n\n/** @type {import('.')} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, typeof cache>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${TypedArrayName}`) => void} */ function (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = $slice(name, 1);\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","'use strict'\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('readable-stream').Transform\nvar inherits = require('inherits')\n\nfunction throwIfNotStringOrBuffer (val, prefix) {\n if (!Buffer.isBuffer(val) && typeof val !== 'string') {\n throw new TypeError(prefix + ' must be a string or a buffer')\n }\n}\n\nfunction HashBase (blockSize) {\n Transform.call(this)\n\n this._block = Buffer.allocUnsafe(blockSize)\n this._blockSize = blockSize\n this._blockOffset = 0\n this._length = [0, 0, 0, 0]\n\n this._finalized = false\n}\n\ninherits(HashBase, Transform)\n\nHashBase.prototype._transform = function (chunk, encoding, callback) {\n var error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype._flush = function (callback) {\n var error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n}\n\nHashBase.prototype.update = function (data, encoding) {\n throwIfNotStringOrBuffer(data, 'Data')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n // consume data\n var block = this._block\n var offset = 0\n while (this._blockOffset + data.length - offset >= this._blockSize) {\n for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]\n this._update()\n this._blockOffset = 0\n }\n while (offset < data.length) block[this._blockOffset++] = data[offset++]\n\n // update length\n for (var j = 0, carry = data.length * 8; carry > 0; ++j) {\n this._length[j] += carry\n carry = (this._length[j] / 0x0100000000) | 0\n if (carry > 0) this._length[j] -= 0x0100000000 * carry\n }\n\n return this\n}\n\nHashBase.prototype._update = function () {\n throw new Error('_update is not implemented')\n}\n\nHashBase.prototype.digest = function (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n var digest = this._digest()\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n // reset state\n this._block.fill(0)\n this._blockOffset = 0\n for (var i = 0; i < 4; ++i) this._length[i] = 0\n\n return digest\n}\n\nHashBase.prototype._digest = function () {\n throw new Error('_digest is not implemented')\n}\n\nmodule.exports = HashBase\n","'use strict'\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\nvar Buffer = require('safe-buffer').Buffer\n\nvar ARRAY16 = new Array(16)\n\nfunction MD5 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n}\n\ninherits(MD5, HashBase)\n\nMD5.prototype._update = function () {\n var M = ARRAY16\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)\n\n var a = this._a\n var b = this._b\n var c = this._c\n var d = this._d\n\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)\n c = fnF(c, d, a, b, M[2], 0x242070db, 17)\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17)\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22)\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7)\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7)\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12)\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17)\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22)\n\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9)\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)\n d = fnG(d, a, b, c, M[10], 0x02441453, 9)\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)\n\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11)\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23)\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)\n\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6)\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10)\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15)\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)\n\n this._a = (this._a + a) | 0\n this._b = (this._b + b) | 0\n this._c = (this._c + c) | 0\n this._d = (this._d + d) | 0\n}\n\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.allocUnsafe(16)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fnF (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnG (a, b, c, d, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnH (a, b, c, d, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0\n}\n\nfunction fnI (a, b, c, d, m, k, s) {\n return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0\n}\n\nmodule.exports = MD5\n","'use strict'\nvar Buffer = require('buffer').Buffer\nvar inherits = require('inherits')\nvar HashBase = require('hash-base')\n\nvar ARRAY16 = new Array(16)\n\nvar zl = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n]\n\nvar zr = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n]\n\nvar sl = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n]\n\nvar sr = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n]\n\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]\n\nfunction RIPEMD160 () {\n HashBase.call(this, 64)\n\n // state\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n}\n\ninherits(RIPEMD160, HashBase)\n\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)\n\n var al = this._a | 0\n var bl = this._b | 0\n var cl = this._c | 0\n var dl = this._d | 0\n var el = this._e | 0\n\n var ar = this._a | 0\n var br = this._b | 0\n var cr = this._c | 0\n var dr = this._d | 0\n var er = this._e | 0\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl\n var tr\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])\n } else { // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])\n }\n\n al = el\n el = dl\n dl = rotl(cl, 10)\n cl = bl\n bl = tl\n\n ar = er\n er = dr\n dr = rotl(cr, 10)\n cr = br\n br = tr\n }\n\n // update state\n var t = (this._b + cl + dr) | 0\n this._b = (this._c + dl + er) | 0\n this._c = (this._d + el + ar) | 0\n this._d = (this._e + al + br) | 0\n this._e = (this._a + bl + cr) | 0\n this._a = t\n}\n\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64)\n this._update()\n this._blockOffset = 0\n }\n\n this._block.fill(0, this._blockOffset, 56)\n this._block.writeUInt32LE(this._length[0], 56)\n this._block.writeUInt32LE(this._length[1], 60)\n this._update()\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)\n buffer.writeInt32LE(this._a, 0)\n buffer.writeInt32LE(this._b, 4)\n buffer.writeInt32LE(this._c, 8)\n buffer.writeInt32LE(this._d, 12)\n buffer.writeInt32LE(this._e, 16)\n return buffer\n}\n\nfunction rotl (x, n) {\n return (x << n) | (x >>> (32 - n))\n}\n\nfunction fn1 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn2 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn3 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn4 (a, b, c, d, e, m, k, s) {\n return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0\n}\n\nfunction fn5 (a, b, c, d, e, m, k, s) {\n return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0\n}\n\nmodule.exports = RIPEMD160\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n","var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n","var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n","var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/lib/_stream_readable.js');\nStream.Writable = require('readable-stream/lib/_stream_writable.js');\nStream.Duplex = require('readable-stream/lib/_stream_duplex.js');\nStream.Transform = require('readable-stream/lib/_stream_transform.js');\nStream.PassThrough = require('readable-stream/lib/_stream_passthrough.js');\nStream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js')\nStream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js')\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","var Buffer = require('safe-buffer').Buffer\nvar Transform = require('stream').Transform\nvar StringDecoder = require('string_decoder').StringDecoder\nvar inherits = require('inherits')\n\nfunction CipherBase (hashMode) {\n Transform.call(this)\n this.hashMode = typeof hashMode === 'string'\n if (this.hashMode) {\n this[hashMode] = this._finalOrDigest\n } else {\n this.final = this._finalOrDigest\n }\n if (this._final) {\n this.__final = this._final\n this._final = null\n }\n this._decoder = null\n this._encoding = null\n}\ninherits(CipherBase, Transform)\n\nCipherBase.prototype.update = function (data, inputEnc, outputEnc) {\n if (typeof data === 'string') {\n data = Buffer.from(data, inputEnc)\n }\n\n var outData = this._update(data)\n if (this.hashMode) return this\n\n if (outputEnc) {\n outData = this._toString(outData, outputEnc)\n }\n\n return outData\n}\n\nCipherBase.prototype.setAutoPadding = function () {}\nCipherBase.prototype.getAuthTag = function () {\n throw new Error('trying to get auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAuthTag = function () {\n throw new Error('trying to set auth tag in unsupported state')\n}\n\nCipherBase.prototype.setAAD = function () {\n throw new Error('trying to set aad in unsupported state')\n}\n\nCipherBase.prototype._transform = function (data, _, next) {\n var err\n try {\n if (this.hashMode) {\n this._update(data)\n } else {\n this.push(this._update(data))\n }\n } catch (e) {\n err = e\n } finally {\n next(err)\n }\n}\nCipherBase.prototype._flush = function (done) {\n var err\n try {\n this.push(this.__final())\n } catch (e) {\n err = e\n }\n\n done(err)\n}\nCipherBase.prototype._finalOrDigest = function (outputEnc) {\n var outData = this.__final() || Buffer.alloc(0)\n if (outputEnc) {\n outData = this._toString(outData, outputEnc, true)\n }\n return outData\n}\n\nCipherBase.prototype._toString = function (value, enc, fin) {\n if (!this._decoder) {\n this._decoder = new StringDecoder(enc)\n this._encoding = enc\n }\n\n if (this._encoding !== enc) throw new Error('can\\'t switch encodings')\n\n var out = this._decoder.write(value)\n if (fin) {\n out += this._decoder.end()\n }\n\n return out\n}\n\nmodule.exports = CipherBase\n","'use strict'\nvar inherits = require('inherits')\nvar MD5 = require('md5.js')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Base = require('cipher-base')\n\nfunction Hash (hash) {\n Base.call(this, 'digest')\n\n this._hash = hash\n}\n\ninherits(Hash, Base)\n\nHash.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHash.prototype._final = function () {\n return this._hash.digest()\n}\n\nmodule.exports = function createHash (alg) {\n alg = alg.toLowerCase()\n if (alg === 'md5') return new MD5()\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()\n\n return new Hash(sha(alg))\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar Base = require('cipher-base')\n\nvar ZEROS = Buffer.alloc(128)\nvar blocksize = 64\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n this._alg = alg\n this._key = key\n\n if (key.length > blocksize) {\n key = alg(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n this._hash = [ipad]\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.push(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._alg(Buffer.concat(this._hash))\n return this._alg(Buffer.concat([this._opad, h]))\n}\nmodule.exports = Hmac\n","var MD5 = require('md5.js')\n\nmodule.exports = function (buffer) {\n return new MD5().update(buffer).digest()\n}\n","'use strict'\nvar inherits = require('inherits')\nvar Legacy = require('./legacy')\nvar Base = require('cipher-base')\nvar Buffer = require('safe-buffer').Buffer\nvar md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\n\nvar sha = require('sha.js')\n\nvar ZEROS = Buffer.alloc(128)\n\nfunction Hmac (alg, key) {\n Base.call(this, 'digest')\n if (typeof key === 'string') {\n key = Buffer.from(key)\n }\n\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n this._alg = alg\n this._key = key\n if (key.length > blocksize) {\n var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n key = hash.update(key).digest()\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = this._ipad = Buffer.allocUnsafe(blocksize)\n var opad = this._opad = Buffer.allocUnsafe(blocksize)\n\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)\n this._hash.update(ipad)\n}\n\ninherits(Hmac, Base)\n\nHmac.prototype._update = function (data) {\n this._hash.update(data)\n}\n\nHmac.prototype._final = function () {\n var h = this._hash.digest()\n var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)\n return hash.update(this._opad).update(h).digest()\n}\n\nmodule.exports = function createHmac (alg, key) {\n alg = alg.toLowerCase()\n if (alg === 'rmd160' || alg === 'ripemd160') {\n return new Hmac('rmd160', key)\n }\n if (alg === 'md5') {\n return new Legacy(md5, key)\n }\n return new Hmac(alg, key)\n}\n","'use strict';\n\nmodule.exports = require('./browser/algorithms.json');\n","var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n","var defaultEncoding\n/* istanbul ignore next */\nif (global.process && global.process.browser) {\n defaultEncoding = 'utf-8'\n} else if (global.process && global.process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n","var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n","var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n","var Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar sync = require('./sync')\nvar toBuffer = require('./to-buffer')\n\nvar ZERO_BUF\nvar subtle = global.crypto && global.crypto.subtle\nvar toBrowser = {\n sha: 'SHA-1',\n 'sha-1': 'SHA-1',\n sha1: 'SHA-1',\n sha256: 'SHA-256',\n 'sha-256': 'SHA-256',\n sha384: 'SHA-384',\n 'sha-384': 'SHA-384',\n 'sha-512': 'SHA-512',\n sha512: 'SHA-512'\n}\nvar checks = []\nfunction checkNative (algo) {\n if (global.process && !global.process.browser) {\n return Promise.resolve(false)\n }\n if (!subtle || !subtle.importKey || !subtle.deriveBits) {\n return Promise.resolve(false)\n }\n if (checks[algo] !== undefined) {\n return checks[algo]\n }\n ZERO_BUF = ZERO_BUF || Buffer.alloc(8)\n var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)\n .then(function () {\n return true\n }).catch(function () {\n return false\n })\n checks[algo] = prom\n return prom\n}\nvar nextTick\nfunction getNextTick () {\n if (nextTick) {\n return nextTick\n }\n if (global.process && global.process.nextTick) {\n nextTick = global.process.nextTick\n } else if (global.queueMicrotask) {\n nextTick = global.queueMicrotask\n } else if (global.setImmediate) {\n nextTick = global.setImmediate\n } else {\n nextTick = global.setTimeout\n }\n return nextTick\n}\nfunction browserPbkdf2 (password, salt, iterations, length, algo) {\n return subtle.importKey(\n 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']\n ).then(function (key) {\n return subtle.deriveBits({\n name: 'PBKDF2',\n salt: salt,\n iterations: iterations,\n hash: {\n name: algo\n }\n }, key, length << 3)\n }).then(function (res) {\n return Buffer.from(res)\n })\n}\n\nfunction resolvePromise (promise, callback) {\n promise.then(function (out) {\n getNextTick()(function () {\n callback(null, out)\n })\n }, function (e) {\n getNextTick()(function () {\n callback(e)\n })\n })\n}\nmodule.exports = function (password, salt, iterations, keylen, digest, callback) {\n if (typeof digest === 'function') {\n callback = digest\n digest = undefined\n }\n\n digest = digest || 'sha1'\n var algo = toBrowser[digest.toLowerCase()]\n\n if (!algo || typeof global.Promise !== 'function') {\n getNextTick()(function () {\n var out\n try {\n out = sync(password, salt, iterations, keylen, digest)\n } catch (e) {\n return callback(e)\n }\n callback(null, out)\n })\n return\n }\n\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')\n\n resolvePromise(checkNative(algo).then(function (resp) {\n if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)\n\n return sync(password, salt, iterations, keylen, digest)\n }), callback)\n}\n","exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n","'use strict';\n\nexports.readUInt32BE = function readUInt32BE(bytes, off) {\n var res = (bytes[0 + off] << 24) |\n (bytes[1 + off] << 16) |\n (bytes[2 + off] << 8) |\n bytes[3 + off];\n return res >>> 0;\n};\n\nexports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {\n bytes[0 + off] = value >>> 24;\n bytes[1 + off] = (value >>> 16) & 0xff;\n bytes[2 + off] = (value >>> 8) & 0xff;\n bytes[3 + off] = value & 0xff;\n};\n\nexports.ip = function ip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n\n for (var i = 6; i >= 0; i -= 2) {\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n }\n for (var j = 1; j <= 25; j += 8) {\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.rip = function rip(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n for (var i = 0; i < 4; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outL <<= 1;\n outL |= (inR >>> (j + i)) & 1;\n outL <<= 1;\n outL |= (inL >>> (j + i)) & 1;\n }\n }\n for (var i = 4; i < 8; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n outR <<= 1;\n outR |= (inR >>> (j + i)) & 1;\n outR <<= 1;\n outR |= (inL >>> (j + i)) & 1;\n }\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.pc1 = function pc1(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n // 7, 15, 23, 31, 39, 47, 55, 63\n // 6, 14, 22, 30, 39, 47, 55, 63\n // 5, 13, 21, 29, 39, 47, 55, 63\n // 4, 12, 20, 28\n for (var i = 7; i >= 5; i--) {\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outL <<= 1;\n outL |= (inR >> (j + i)) & 1;\n }\n\n // 1, 9, 17, 25, 33, 41, 49, 57\n // 2, 10, 18, 26, 34, 42, 50, 58\n // 3, 11, 19, 27, 35, 43, 51, 59\n // 36, 44, 52, 60\n for (var i = 1; i <= 3; i++) {\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inR >> (j + i)) & 1;\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n }\n for (var j = 0; j <= 24; j += 8) {\n outR <<= 1;\n outR |= (inL >> (j + i)) & 1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.r28shl = function r28shl(num, shift) {\n return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));\n};\n\nvar pc2table = [\n // inL => outL\n 14, 11, 17, 4, 27, 23, 25, 0,\n 13, 22, 7, 18, 5, 9, 16, 24,\n 2, 20, 12, 21, 1, 8, 15, 26,\n\n // inR => outR\n 15, 4, 25, 19, 9, 1, 26, 16,\n 5, 11, 23, 8, 12, 7, 17, 0,\n 22, 3, 10, 14, 6, 20, 27, 24\n];\n\nexports.pc2 = function pc2(inL, inR, out, off) {\n var outL = 0;\n var outR = 0;\n\n var len = pc2table.length >>> 1;\n for (var i = 0; i < len; i++) {\n outL <<= 1;\n outL |= (inL >>> pc2table[i]) & 0x1;\n }\n for (var i = len; i < pc2table.length; i++) {\n outR <<= 1;\n outR |= (inR >>> pc2table[i]) & 0x1;\n }\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nexports.expand = function expand(r, out, off) {\n var outL = 0;\n var outR = 0;\n\n outL = ((r & 1) << 5) | (r >>> 27);\n for (var i = 23; i >= 15; i -= 4) {\n outL <<= 6;\n outL |= (r >>> i) & 0x3f;\n }\n for (var i = 11; i >= 3; i -= 4) {\n outR |= (r >>> i) & 0x3f;\n outR <<= 6;\n }\n outR |= ((r & 0x1f) << 1) | (r >>> 31);\n\n out[off + 0] = outL >>> 0;\n out[off + 1] = outR >>> 0;\n};\n\nvar sTable = [\n 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,\n 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,\n 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,\n 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,\n\n 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,\n 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,\n 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,\n 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,\n\n 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,\n 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,\n 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,\n 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,\n\n 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,\n 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,\n 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,\n 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,\n\n 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,\n 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,\n 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,\n 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,\n\n 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,\n 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,\n 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,\n 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,\n\n 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,\n 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,\n 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,\n 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,\n\n 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,\n 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,\n 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,\n 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11\n];\n\nexports.substitute = function substitute(inL, inR) {\n var out = 0;\n for (var i = 0; i < 4; i++) {\n var b = (inL >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n for (var i = 0; i < 4; i++) {\n var b = (inR >>> (18 - i * 6)) & 0x3f;\n var sb = sTable[4 * 0x40 + i * 0x40 + b];\n\n out <<= 4;\n out |= sb;\n }\n return out >>> 0;\n};\n\nvar permuteTable = [\n 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,\n 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7\n];\n\nexports.permute = function permute(num) {\n var out = 0;\n for (var i = 0; i < permuteTable.length; i++) {\n out <<= 1;\n out |= (num >>> permuteTable[i]) & 0x1;\n }\n return out >>> 0;\n};\n\nexports.padSplit = function padSplit(num, size, group) {\n var str = num.toString(2);\n while (str.length < size)\n str = '0' + str;\n\n var out = [];\n for (var i = 0; i < size; i += group)\n out.push(str.slice(i, i + group));\n return out.join(' ');\n};\n","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\n\nfunction Cipher(options) {\n this.options = options;\n\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n this.padding = options.padding !== false\n}\nmodule.exports = Cipher;\n\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\n\nCipher.prototype.update = function update(data) {\n if (data.length === 0)\n return [];\n\n if (this.type === 'decrypt')\n return this._updateDecrypt(data);\n else\n return this._updateEncrypt(data);\n};\n\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++)\n this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\n\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\n\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = ((this.bufferOff + data.length) / this.blockSize) | 0;\n var out = new Array(count * this.blockSize);\n\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n\n if (this.bufferOff === this.buffer.length)\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - ((data.length - inputOff) % this.blockSize);\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++)\n this.buffer[this.bufferOff] = data[inputOff];\n\n return out;\n};\n\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n\n return out;\n};\n\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer)\n first = this.update(buffer);\n\n var last;\n if (this.type === 'encrypt')\n last = this._finalEncrypt();\n else\n last = this._finalDecrypt();\n\n if (first)\n return first.concat(last);\n else\n return last;\n};\n\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0)\n return false;\n\n while (off < buffer.length)\n buffer[off++] = 0;\n\n return true;\n};\n\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff))\n return [];\n\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\n\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\n\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n\n return this._unpad(out);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar utils = require('./utils');\nvar Cipher = require('./cipher');\n\nfunction DESState() {\n this.tmp = new Array(2);\n this.keys = null;\n}\n\nfunction DES(options) {\n Cipher.call(this, options);\n\n var state = new DESState();\n this._desState = state;\n\n this.deriveKeys(state, options.key);\n}\ninherits(DES, Cipher);\nmodule.exports = DES;\n\nDES.create = function create(options) {\n return new DES(options);\n};\n\nvar shiftTable = [\n 1, 1, 2, 2, 2, 2, 2, 2,\n 1, 2, 2, 2, 2, 2, 2, 1\n];\n\nDES.prototype.deriveKeys = function deriveKeys(state, key) {\n state.keys = new Array(16 * 2);\n\n assert.equal(key.length, this.blockSize, 'Invalid key length');\n\n var kL = utils.readUInt32BE(key, 0);\n var kR = utils.readUInt32BE(key, 4);\n\n utils.pc1(kL, kR, state.tmp, 0);\n kL = state.tmp[0];\n kR = state.tmp[1];\n for (var i = 0; i < state.keys.length; i += 2) {\n var shift = shiftTable[i >>> 1];\n kL = utils.r28shl(kL, shift);\n kR = utils.r28shl(kR, shift);\n utils.pc2(kL, kR, state.keys, i);\n }\n};\n\nDES.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._desState;\n\n var l = utils.readUInt32BE(inp, inOff);\n var r = utils.readUInt32BE(inp, inOff + 4);\n\n // Initial Permutation\n utils.ip(l, r, state.tmp, 0);\n l = state.tmp[0];\n r = state.tmp[1];\n\n if (this.type === 'encrypt')\n this._encrypt(state, l, r, state.tmp, 0);\n else\n this._decrypt(state, l, r, state.tmp, 0);\n\n l = state.tmp[0];\n r = state.tmp[1];\n\n utils.writeUInt32BE(out, l, outOff);\n utils.writeUInt32BE(out, r, outOff + 4);\n};\n\nDES.prototype._pad = function _pad(buffer, off) {\n if (this.padding === false) {\n return false;\n }\n\n var value = buffer.length - off;\n for (var i = off; i < buffer.length; i++)\n buffer[i] = value;\n\n return true;\n};\n\nDES.prototype._unpad = function _unpad(buffer) {\n if (this.padding === false) {\n return buffer;\n }\n\n var pad = buffer[buffer.length - 1];\n for (var i = buffer.length - pad; i < buffer.length; i++)\n assert.equal(buffer[i], pad);\n\n return buffer.slice(0, buffer.length - pad);\n};\n\nDES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {\n var l = lStart;\n var r = rStart;\n\n // Apply f() x16 times\n for (var i = 0; i < state.keys.length; i += 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(r, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = r;\n r = (l ^ f) >>> 0;\n l = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(r, l, out, off);\n};\n\nDES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {\n var l = rStart;\n var r = lStart;\n\n // Apply f() x16 times\n for (var i = state.keys.length - 2; i >= 0; i -= 2) {\n var keyL = state.keys[i];\n var keyR = state.keys[i + 1];\n\n // f(r, k)\n utils.expand(l, state.tmp, 0);\n\n keyL ^= state.tmp[0];\n keyR ^= state.tmp[1];\n var s = utils.substitute(keyL, keyR);\n var f = utils.permute(s);\n\n var t = l;\n l = (r ^ f) >>> 0;\n r = t;\n }\n\n // Reverse Initial Permutation\n utils.rip(l, r, out, off);\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar proto = {};\n\nfunction CBCState(iv) {\n assert.equal(iv.length, 8, 'Invalid IV length');\n\n this.iv = new Array(8);\n for (var i = 0; i < this.iv.length; i++)\n this.iv[i] = iv[i];\n}\n\nfunction instantiate(Base) {\n function CBC(options) {\n Base.call(this, options);\n this._cbcInit();\n }\n inherits(CBC, Base);\n\n var keys = Object.keys(proto);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n CBC.prototype[key] = proto[key];\n }\n\n CBC.create = function create(options) {\n return new CBC(options);\n };\n\n return CBC;\n}\n\nexports.instantiate = instantiate;\n\nproto._cbcInit = function _cbcInit() {\n var state = new CBCState(this.options.iv);\n this._cbcState = state;\n};\n\nproto._update = function _update(inp, inOff, out, outOff) {\n var state = this._cbcState;\n var superProto = this.constructor.super_.prototype;\n\n var iv = state.iv;\n if (this.type === 'encrypt') {\n for (var i = 0; i < this.blockSize; i++)\n iv[i] ^= inp[inOff + i];\n\n superProto._update.call(this, iv, 0, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = out[outOff + i];\n } else {\n superProto._update.call(this, inp, inOff, out, outOff);\n\n for (var i = 0; i < this.blockSize; i++)\n out[outOff + i] ^= iv[i];\n\n for (var i = 0; i < this.blockSize; i++)\n iv[i] = inp[inOff + i];\n }\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nvar Cipher = require('./cipher');\nvar DES = require('./des');\n\nfunction EDEState(type, key) {\n assert.equal(key.length, 24, 'Invalid key length');\n\n var k1 = key.slice(0, 8);\n var k2 = key.slice(8, 16);\n var k3 = key.slice(16, 24);\n\n if (type === 'encrypt') {\n this.ciphers = [\n DES.create({ type: 'encrypt', key: k1 }),\n DES.create({ type: 'decrypt', key: k2 }),\n DES.create({ type: 'encrypt', key: k3 })\n ];\n } else {\n this.ciphers = [\n DES.create({ type: 'decrypt', key: k3 }),\n DES.create({ type: 'encrypt', key: k2 }),\n DES.create({ type: 'decrypt', key: k1 })\n ];\n }\n}\n\nfunction EDE(options) {\n Cipher.call(this, options);\n\n var state = new EDEState(this.type, this.options.key);\n this._edeState = state;\n}\ninherits(EDE, Cipher);\n\nmodule.exports = EDE;\n\nEDE.create = function create(options) {\n return new EDE(options);\n};\n\nEDE.prototype._update = function _update(inp, inOff, out, outOff) {\n var state = this._edeState;\n\n state.ciphers[0]._update(inp, inOff, out, outOff);\n state.ciphers[1]._update(out, outOff, out, outOff);\n state.ciphers[2]._update(out, outOff, out, outOff);\n};\n\nEDE.prototype._pad = DES.prototype._pad;\nEDE.prototype._unpad = DES.prototype._unpad;\n","'use strict';\n\nexports.utils = require('./des/utils');\nexports.Cipher = require('./des/cipher');\nexports.DES = require('./des/des');\nexports.CBC = require('./des/cbc');\nexports.EDE = require('./des/ede');\n","var CipherBase = require('cipher-base')\nvar des = require('des.js')\nvar inherits = require('inherits')\nvar Buffer = require('safe-buffer').Buffer\n\nvar modes = {\n 'des-ede3-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede3': des.EDE,\n 'des-ede-cbc': des.CBC.instantiate(des.EDE),\n 'des-ede': des.EDE,\n 'des-cbc': des.CBC.instantiate(des.DES),\n 'des-ecb': des.DES\n}\nmodes.des = modes['des-cbc']\nmodes.des3 = modes['des-ede3-cbc']\nmodule.exports = DES\ninherits(DES, CipherBase)\nfunction DES (opts) {\n CipherBase.call(this)\n var modeName = opts.mode.toLowerCase()\n var mode = modes[modeName]\n var type\n if (opts.decrypt) {\n type = 'decrypt'\n } else {\n type = 'encrypt'\n }\n var key = opts.key\n if (!Buffer.isBuffer(key)) {\n key = Buffer.from(key)\n }\n if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {\n key = Buffer.concat([key, key.slice(0, 8)])\n }\n var iv = opts.iv\n if (!Buffer.isBuffer(iv)) {\n iv = Buffer.from(iv)\n }\n this._des = mode.create({\n key: key,\n iv: iv,\n type: type\n })\n}\nDES.prototype._update = function (data) {\n return Buffer.from(this._des.update(data))\n}\nDES.prototype._final = function () {\n return Buffer.from(this._des.final())\n}\n","exports.encrypt = function (self, block) {\n return self._cipher.encryptBlock(block)\n}\n\nexports.decrypt = function (self, block) {\n return self._cipher.decryptBlock(block)\n}\n","module.exports = function xor (a, b) {\n var length = Math.min(a.length, b.length)\n var buffer = new Buffer(length)\n\n for (var i = 0; i < length; ++i) {\n buffer[i] = a[i] ^ b[i]\n }\n\n return buffer\n}\n","var xor = require('buffer-xor')\n\nexports.encrypt = function (self, block) {\n var data = xor(block, self._prev)\n\n self._prev = self._cipher.encryptBlock(data)\n return self._prev\n}\n\nexports.decrypt = function (self, block) {\n var pad = self._prev\n\n self._prev = block\n var out = self._cipher.decryptBlock(block)\n\n return xor(out, pad)\n}\n","var Buffer = require('safe-buffer').Buffer\nvar xor = require('buffer-xor')\n\nfunction encryptStart (self, data, decrypt) {\n var len = data.length\n var out = xor(data, self._cache)\n self._cache = self._cache.slice(len)\n self._prev = Buffer.concat([self._prev, decrypt ? data : out])\n return out\n}\n\nexports.encrypt = function (self, data, decrypt) {\n var out = Buffer.allocUnsafe(0)\n var len\n\n while (data.length) {\n if (self._cache.length === 0) {\n self._cache = self._cipher.encryptBlock(self._prev)\n self._prev = Buffer.allocUnsafe(0)\n }\n\n if (self._cache.length <= data.length) {\n len = self._cache.length\n out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])\n data = data.slice(len)\n } else {\n out = Buffer.concat([out, encryptStart(self, data, decrypt)])\n break\n }\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad = self._cipher.encryptBlock(self._prev)\n var out = pad[0] ^ byteParam\n\n self._prev = Buffer.concat([\n self._prev.slice(1),\n Buffer.from([decrypt ? byteParam : out])\n ])\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var Buffer = require('safe-buffer').Buffer\n\nfunction encryptByte (self, byteParam, decrypt) {\n var pad\n var i = -1\n var len = 8\n var out = 0\n var bit, value\n while (++i < len) {\n pad = self._cipher.encryptBlock(self._prev)\n bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0\n value = pad[0] ^ bit\n out += ((value & 0x80) >> (i % 8))\n self._prev = shiftIn(self._prev, decrypt ? bit : value)\n }\n return out\n}\n\nfunction shiftIn (buffer, value) {\n var len = buffer.length\n var i = -1\n var out = Buffer.allocUnsafe(buffer.length)\n buffer = Buffer.concat([buffer, Buffer.from([value])])\n\n while (++i < len) {\n out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)\n }\n\n return out\n}\n\nexports.encrypt = function (self, chunk, decrypt) {\n var len = chunk.length\n var out = Buffer.allocUnsafe(len)\n var i = -1\n\n while (++i < len) {\n out[i] = encryptByte(self, chunk[i], decrypt)\n }\n\n return out\n}\n","var xor = require('buffer-xor')\n\nfunction getBlock (self) {\n self._prev = self._cipher.encryptBlock(self._prev)\n return self._prev\n}\n\nexports.encrypt = function (self, chunk) {\n while (self._cache.length < chunk.length) {\n self._cache = Buffer.concat([self._cache, getBlock(self)])\n }\n\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","function incr32 (iv) {\n var len = iv.length\n var item\n while (len--) {\n item = iv.readUInt8(len)\n if (item === 255) {\n iv.writeUInt8(0, len)\n } else {\n item++\n iv.writeUInt8(item, len)\n break\n }\n }\n}\nmodule.exports = incr32\n","var xor = require('buffer-xor')\nvar Buffer = require('safe-buffer').Buffer\nvar incr32 = require('../incr32')\n\nfunction getBlock (self) {\n var out = self._cipher.encryptBlockRaw(self._prev)\n incr32(self._prev)\n return out\n}\n\nvar blockSize = 16\nexports.encrypt = function (self, chunk) {\n var chunkNum = Math.ceil(chunk.length / blockSize)\n var start = self._cache.length\n self._cache = Buffer.concat([\n self._cache,\n Buffer.allocUnsafe(chunkNum * blockSize)\n ])\n for (var i = 0; i < chunkNum; i++) {\n var out = getBlock(self)\n var offset = start + i * blockSize\n self._cache.writeUInt32BE(out[0], offset + 0)\n self._cache.writeUInt32BE(out[1], offset + 4)\n self._cache.writeUInt32BE(out[2], offset + 8)\n self._cache.writeUInt32BE(out[3], offset + 12)\n }\n var pad = self._cache.slice(0, chunk.length)\n self._cache = self._cache.slice(chunk.length)\n return xor(chunk, pad)\n}\n","var modeModules = {\n ECB: require('./ecb'),\n CBC: require('./cbc'),\n CFB: require('./cfb'),\n CFB8: require('./cfb8'),\n CFB1: require('./cfb1'),\n OFB: require('./ofb'),\n CTR: require('./ctr'),\n GCM: require('./ctr')\n}\n\nvar modes = require('./list.json')\n\nfor (var key in modes) {\n modes[key].module = modeModules[modes[key].mode]\n}\n\nmodule.exports = modes\n","// based on the aes implimentation in triple sec\n// https://github.com/keybase/triplesec\n// which is in turn based on the one from crypto-js\n// https://code.google.com/p/crypto-js/\n\nvar Buffer = require('safe-buffer').Buffer\n\nfunction asUInt32Array (buf) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n\n var len = (buf.length / 4) | 0\n var out = new Array(len)\n\n for (var i = 0; i < len; i++) {\n out[i] = buf.readUInt32BE(i * 4)\n }\n\n return out\n}\n\nfunction scrubVec (v) {\n for (var i = 0; i < v.length; v++) {\n v[i] = 0\n }\n}\n\nfunction cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {\n var SUB_MIX0 = SUB_MIX[0]\n var SUB_MIX1 = SUB_MIX[1]\n var SUB_MIX2 = SUB_MIX[2]\n var SUB_MIX3 = SUB_MIX[3]\n\n var s0 = M[0] ^ keySchedule[0]\n var s1 = M[1] ^ keySchedule[1]\n var s2 = M[2] ^ keySchedule[2]\n var s3 = M[3] ^ keySchedule[3]\n var t0, t1, t2, t3\n var ksRow = 4\n\n for (var round = 1; round < nRounds; round++) {\n t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]\n t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]\n t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]\n t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]\n s0 = t0\n s1 = t1\n s2 = t2\n s3 = t3\n }\n\n t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]\n t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]\n t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]\n t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]\n t0 = t0 >>> 0\n t1 = t1 >>> 0\n t2 = t2 >>> 0\n t3 = t3 >>> 0\n\n return [t0, t1, t2, t3]\n}\n\n// AES constants\nvar RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]\nvar G = (function () {\n // Compute double table\n var d = new Array(256)\n for (var j = 0; j < 256; j++) {\n if (j < 128) {\n d[j] = j << 1\n } else {\n d[j] = (j << 1) ^ 0x11b\n }\n }\n\n var SBOX = []\n var INV_SBOX = []\n var SUB_MIX = [[], [], [], []]\n var INV_SUB_MIX = [[], [], [], []]\n\n // Walk GF(2^8)\n var x = 0\n var xi = 0\n for (var i = 0; i < 256; ++i) {\n // Compute sbox\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63\n SBOX[x] = sx\n INV_SBOX[sx] = x\n\n // Compute multiplication\n var x2 = d[x]\n var x4 = d[x2]\n var x8 = d[x4]\n\n // Compute sub bytes, mix columns tables\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100)\n SUB_MIX[0][x] = (t << 24) | (t >>> 8)\n SUB_MIX[1][x] = (t << 16) | (t >>> 16)\n SUB_MIX[2][x] = (t << 8) | (t >>> 24)\n SUB_MIX[3][x] = t\n\n // Compute inv sub bytes, inv mix columns tables\n t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)\n INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)\n INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)\n INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)\n INV_SUB_MIX[3][sx] = t\n\n if (x === 0) {\n x = xi = 1\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]]\n xi ^= d[d[xi]]\n }\n }\n\n return {\n SBOX: SBOX,\n INV_SBOX: INV_SBOX,\n SUB_MIX: SUB_MIX,\n INV_SUB_MIX: INV_SUB_MIX\n }\n})()\n\nfunction AES (key) {\n this._key = asUInt32Array(key)\n this._reset()\n}\n\nAES.blockSize = 4 * 4\nAES.keySize = 256 / 8\nAES.prototype.blockSize = AES.blockSize\nAES.prototype.keySize = AES.keySize\nAES.prototype._reset = function () {\n var keyWords = this._key\n var keySize = keyWords.length\n var nRounds = keySize + 6\n var ksRows = (nRounds + 1) * 4\n\n var keySchedule = []\n for (var k = 0; k < keySize; k++) {\n keySchedule[k] = keyWords[k]\n }\n\n for (k = keySize; k < ksRows; k++) {\n var t = keySchedule[k - 1]\n\n if (k % keySize === 0) {\n t = (t << 8) | (t >>> 24)\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n\n t ^= RCON[(k / keySize) | 0] << 24\n } else if (keySize > 6 && k % keySize === 4) {\n t =\n (G.SBOX[t >>> 24] << 24) |\n (G.SBOX[(t >>> 16) & 0xff] << 16) |\n (G.SBOX[(t >>> 8) & 0xff] << 8) |\n (G.SBOX[t & 0xff])\n }\n\n keySchedule[k] = keySchedule[k - keySize] ^ t\n }\n\n var invKeySchedule = []\n for (var ik = 0; ik < ksRows; ik++) {\n var ksR = ksRows - ik\n var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]\n\n if (ik < 4 || ksR <= 4) {\n invKeySchedule[ik] = tt\n } else {\n invKeySchedule[ik] =\n G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^\n G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^\n G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^\n G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]\n }\n }\n\n this._nRounds = nRounds\n this._keySchedule = keySchedule\n this._invKeySchedule = invKeySchedule\n}\n\nAES.prototype.encryptBlockRaw = function (M) {\n M = asUInt32Array(M)\n return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)\n}\n\nAES.prototype.encryptBlock = function (M) {\n var out = this.encryptBlockRaw(M)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[1], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[3], 12)\n return buf\n}\n\nAES.prototype.decryptBlock = function (M) {\n M = asUInt32Array(M)\n\n // swap\n var m1 = M[1]\n M[1] = M[3]\n M[3] = m1\n\n var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0], 0)\n buf.writeUInt32BE(out[3], 4)\n buf.writeUInt32BE(out[2], 8)\n buf.writeUInt32BE(out[1], 12)\n return buf\n}\n\nAES.prototype.scrub = function () {\n scrubVec(this._keySchedule)\n scrubVec(this._invKeySchedule)\n scrubVec(this._key)\n}\n\nmodule.exports.AES = AES\n","var Buffer = require('safe-buffer').Buffer\nvar ZEROES = Buffer.alloc(16, 0)\n\nfunction toArray (buf) {\n return [\n buf.readUInt32BE(0),\n buf.readUInt32BE(4),\n buf.readUInt32BE(8),\n buf.readUInt32BE(12)\n ]\n}\n\nfunction fromArray (out) {\n var buf = Buffer.allocUnsafe(16)\n buf.writeUInt32BE(out[0] >>> 0, 0)\n buf.writeUInt32BE(out[1] >>> 0, 4)\n buf.writeUInt32BE(out[2] >>> 0, 8)\n buf.writeUInt32BE(out[3] >>> 0, 12)\n return buf\n}\n\nfunction GHASH (key) {\n this.h = key\n this.state = Buffer.alloc(16, 0)\n this.cache = Buffer.allocUnsafe(0)\n}\n\n// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html\n// by Juho Vähä-Herttua\nGHASH.prototype.ghash = function (block) {\n var i = -1\n while (++i < block.length) {\n this.state[i] ^= block[i]\n }\n this._multiply()\n}\n\nGHASH.prototype._multiply = function () {\n var Vi = toArray(this.h)\n var Zi = [0, 0, 0, 0]\n var j, xi, lsbVi\n var i = -1\n while (++i < 128) {\n xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0\n if (xi) {\n // Z_i+1 = Z_i ^ V_i\n Zi[0] ^= Vi[0]\n Zi[1] ^= Vi[1]\n Zi[2] ^= Vi[2]\n Zi[3] ^= Vi[3]\n }\n\n // Store the value of LSB(V_i)\n lsbVi = (Vi[3] & 1) !== 0\n\n // V_i+1 = V_i >> 1\n for (j = 3; j > 0; j--) {\n Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)\n }\n Vi[0] = Vi[0] >>> 1\n\n // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R\n if (lsbVi) {\n Vi[0] = Vi[0] ^ (0xe1 << 24)\n }\n }\n this.state = fromArray(Zi)\n}\n\nGHASH.prototype.update = function (buf) {\n this.cache = Buffer.concat([this.cache, buf])\n var chunk\n while (this.cache.length >= 16) {\n chunk = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n this.ghash(chunk)\n }\n}\n\nGHASH.prototype.final = function (abl, bl) {\n if (this.cache.length) {\n this.ghash(Buffer.concat([this.cache, ZEROES], 16))\n }\n\n this.ghash(fromArray([0, abl, 0, bl]))\n return this.state\n}\n\nmodule.exports = GHASH\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\nvar GHASH = require('./ghash')\nvar xor = require('buffer-xor')\nvar incr32 = require('./incr32')\n\nfunction xorTest (a, b) {\n var out = 0\n if (a.length !== b.length) out++\n\n var len = Math.min(a.length, b.length)\n for (var i = 0; i < len; ++i) {\n out += (a[i] ^ b[i])\n }\n\n return out\n}\n\nfunction calcIv (self, iv, ck) {\n if (iv.length === 12) {\n self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])\n return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])\n }\n var ghash = new GHASH(ck)\n var len = iv.length\n var toPad = len % 16\n ghash.update(iv)\n if (toPad) {\n toPad = 16 - toPad\n ghash.update(Buffer.alloc(toPad, 0))\n }\n ghash.update(Buffer.alloc(8, 0))\n var ivBits = len * 8\n var tail = Buffer.alloc(8)\n tail.writeUIntBE(ivBits, 0, 8)\n ghash.update(tail)\n self._finID = ghash.state\n var out = Buffer.from(self._finID)\n incr32(out)\n return out\n}\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n var h = Buffer.alloc(4, 0)\n\n this._cipher = new aes.AES(key)\n var ck = this._cipher.encryptBlock(h)\n this._ghash = new GHASH(ck)\n iv = calcIv(this, iv, ck)\n\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._alen = 0\n this._len = 0\n this._mode = mode\n\n this._authTag = null\n this._called = false\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n if (!this._called && this._alen) {\n var rump = 16 - (this._alen % 16)\n if (rump < 16) {\n rump = Buffer.alloc(rump, 0)\n this._ghash.update(rump)\n }\n }\n\n this._called = true\n var out = this._mode.encrypt(this, chunk)\n if (this._decrypt) {\n this._ghash.update(chunk)\n } else {\n this._ghash.update(out)\n }\n this._len += chunk.length\n return out\n}\n\nStreamCipher.prototype._final = function () {\n if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')\n\n var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))\n if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')\n\n this._authTag = tag\n this._cipher.scrub()\n}\n\nStreamCipher.prototype.getAuthTag = function getAuthTag () {\n if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')\n\n return this._authTag\n}\n\nStreamCipher.prototype.setAuthTag = function setAuthTag (tag) {\n if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')\n\n this._authTag = tag\n}\n\nStreamCipher.prototype.setAAD = function setAAD (buf) {\n if (this._called) throw new Error('Attempting to set AAD in unsupported state')\n\n this._ghash.update(buf)\n this._alen += buf.length\n}\n\nmodule.exports = StreamCipher\n","var aes = require('./aes')\nvar Buffer = require('safe-buffer').Buffer\nvar Transform = require('cipher-base')\nvar inherits = require('inherits')\n\nfunction StreamCipher (mode, key, iv, decrypt) {\n Transform.call(this)\n\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._cache = Buffer.allocUnsafe(0)\n this._secCache = Buffer.allocUnsafe(0)\n this._decrypt = decrypt\n this._mode = mode\n}\n\ninherits(StreamCipher, Transform)\n\nStreamCipher.prototype._update = function (chunk) {\n return this._mode.encrypt(this, chunk, this._decrypt)\n}\n\nStreamCipher.prototype._final = function () {\n this._cipher.scrub()\n}\n\nmodule.exports = StreamCipher\n","var Buffer = require('safe-buffer').Buffer\nvar MD5 = require('md5.js')\n\n/* eslint-disable camelcase */\nfunction EVP_BytesToKey (password, salt, keyBits, ivLen) {\n if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')\n if (salt) {\n if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')\n if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')\n }\n\n var keyLen = keyBits / 8\n var key = Buffer.alloc(keyLen)\n var iv = Buffer.alloc(ivLen || 0)\n var tmp = Buffer.alloc(0)\n\n while (keyLen > 0 || ivLen > 0) {\n var hash = new MD5()\n hash.update(tmp)\n hash.update(password)\n if (salt) hash.update(salt)\n tmp = hash.digest()\n\n var used = 0\n\n if (keyLen > 0) {\n var keyStart = key.length - keyLen\n used = Math.min(keyLen, tmp.length)\n tmp.copy(key, keyStart, 0, used)\n keyLen -= used\n }\n\n if (used < tmp.length && ivLen > 0) {\n var ivStart = iv.length - ivLen\n var length = Math.min(ivLen, tmp.length - used)\n tmp.copy(iv, ivStart, used, used + length)\n ivLen -= length\n }\n }\n\n tmp.fill(0)\n return { key: key, iv: iv }\n}\n\nmodule.exports = EVP_BytesToKey\n","var MODES = require('./modes')\nvar AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Cipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Cipher, Transform)\n\nCipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n\n while ((chunk = this._cache.get())) {\n thing = this._mode.encrypt(this, chunk)\n out.push(thing)\n }\n\n return Buffer.concat(out)\n}\n\nvar PADDING = Buffer.alloc(16, 0x10)\n\nCipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n chunk = this._mode.encrypt(this, chunk)\n this._cipher.scrub()\n return chunk\n }\n\n if (!chunk.equals(PADDING)) {\n this._cipher.scrub()\n throw new Error('data not multiple of block length')\n }\n}\n\nCipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function () {\n if (this.cache.length > 15) {\n var out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n return null\n}\n\nSplitter.prototype.flush = function () {\n var len = 16 - this.cache.length\n var padBuff = Buffer.allocUnsafe(len)\n\n var i = -1\n while (++i < len) {\n padBuff.writeUInt8(len, i)\n }\n\n return Buffer.concat([this.cache, padBuff])\n}\n\nfunction createCipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv)\n }\n\n return new Cipher(config.module, password, iv)\n}\n\nfunction createCipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createCipheriv = createCipheriv\nexports.createCipher = createCipher\n","var AuthCipher = require('./authCipher')\nvar Buffer = require('safe-buffer').Buffer\nvar MODES = require('./modes')\nvar StreamCipher = require('./streamCipher')\nvar Transform = require('cipher-base')\nvar aes = require('./aes')\nvar ebtk = require('evp_bytestokey')\nvar inherits = require('inherits')\n\nfunction Decipher (mode, key, iv) {\n Transform.call(this)\n\n this._cache = new Splitter()\n this._last = void 0\n this._cipher = new aes.AES(key)\n this._prev = Buffer.from(iv)\n this._mode = mode\n this._autopadding = true\n}\n\ninherits(Decipher, Transform)\n\nDecipher.prototype._update = function (data) {\n this._cache.add(data)\n var chunk\n var thing\n var out = []\n while ((chunk = this._cache.get(this._autopadding))) {\n thing = this._mode.decrypt(this, chunk)\n out.push(thing)\n }\n return Buffer.concat(out)\n}\n\nDecipher.prototype._final = function () {\n var chunk = this._cache.flush()\n if (this._autopadding) {\n return unpad(this._mode.decrypt(this, chunk))\n } else if (chunk) {\n throw new Error('data not multiple of block length')\n }\n}\n\nDecipher.prototype.setAutoPadding = function (setTo) {\n this._autopadding = !!setTo\n return this\n}\n\nfunction Splitter () {\n this.cache = Buffer.allocUnsafe(0)\n}\n\nSplitter.prototype.add = function (data) {\n this.cache = Buffer.concat([this.cache, data])\n}\n\nSplitter.prototype.get = function (autoPadding) {\n var out\n if (autoPadding) {\n if (this.cache.length > 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n } else {\n if (this.cache.length >= 16) {\n out = this.cache.slice(0, 16)\n this.cache = this.cache.slice(16)\n return out\n }\n }\n\n return null\n}\n\nSplitter.prototype.flush = function () {\n if (this.cache.length) return this.cache\n}\n\nfunction unpad (last) {\n var padded = last[15]\n if (padded < 1 || padded > 16) {\n throw new Error('unable to decrypt data')\n }\n var i = -1\n while (++i < padded) {\n if (last[(i + (16 - padded))] !== padded) {\n throw new Error('unable to decrypt data')\n }\n }\n if (padded === 16) return\n\n return last.slice(0, 16 - padded)\n}\n\nfunction createDecipheriv (suite, password, iv) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n if (typeof iv === 'string') iv = Buffer.from(iv)\n if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)\n\n if (typeof password === 'string') password = Buffer.from(password)\n if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)\n\n if (config.type === 'stream') {\n return new StreamCipher(config.module, password, iv, true)\n } else if (config.type === 'auth') {\n return new AuthCipher(config.module, password, iv, true)\n }\n\n return new Decipher(config.module, password, iv)\n}\n\nfunction createDecipher (suite, password) {\n var config = MODES[suite.toLowerCase()]\n if (!config) throw new TypeError('invalid suite type')\n\n var keys = ebtk(password, false, config.key, config.iv)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nexports.createDecipher = createDecipher\nexports.createDecipheriv = createDecipheriv\n","var ciphers = require('./encrypter')\nvar deciphers = require('./decrypter')\nvar modes = require('./modes/list.json')\n\nfunction getCiphers () {\n return Object.keys(modes)\n}\n\nexports.createCipher = exports.Cipher = ciphers.createCipher\nexports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv\nexports.createDecipher = exports.Decipher = deciphers.createDecipher\nexports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","exports['des-ecb'] = {\n key: 8,\n iv: 0\n}\nexports['des-cbc'] = exports.des = {\n key: 8,\n iv: 8\n}\nexports['des-ede3-cbc'] = exports.des3 = {\n key: 24,\n iv: 8\n}\nexports['des-ede3'] = {\n key: 24,\n iv: 0\n}\nexports['des-ede-cbc'] = {\n key: 16,\n iv: 8\n}\nexports['des-ede'] = {\n key: 16,\n iv: 0\n}\n","var DES = require('browserify-des')\nvar aes = require('browserify-aes/browser')\nvar aesModes = require('browserify-aes/modes')\nvar desModes = require('browserify-des/modes')\nvar ebtk = require('evp_bytestokey')\n\nfunction createCipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createCipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createDecipher (suite, password) {\n suite = suite.toLowerCase()\n\n var keyLen, ivLen\n if (aesModes[suite]) {\n keyLen = aesModes[suite].key\n ivLen = aesModes[suite].iv\n } else if (desModes[suite]) {\n keyLen = desModes[suite].key * 8\n ivLen = desModes[suite].iv\n } else {\n throw new TypeError('invalid suite type')\n }\n\n var keys = ebtk(password, false, keyLen, ivLen)\n return createDecipheriv(suite, keys.key, keys.iv)\n}\n\nfunction createCipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction createDecipheriv (suite, key, iv) {\n suite = suite.toLowerCase()\n if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)\n if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })\n\n throw new TypeError('invalid suite type')\n}\n\nfunction getCiphers () {\n return Object.keys(desModes).concat(aes.getCiphers())\n}\n\nexports.createCipher = exports.Cipher = createCipher\nexports.createCipheriv = exports.Cipheriv = createCipheriv\nexports.createDecipher = exports.Decipher = createDecipher\nexports.createDecipheriv = exports.Decipheriv = createDecipheriv\nexports.listCiphers = exports.getCiphers = getCiphers\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","var bn = require('bn.js');\nvar brorand = require('brorand');\n\nfunction MillerRabin(rand) {\n this.rand = rand || new brorand.Rand();\n}\nmodule.exports = MillerRabin;\n\nMillerRabin.create = function create(rand) {\n return new MillerRabin(rand);\n};\n\nMillerRabin.prototype._randbelow = function _randbelow(n) {\n var len = n.bitLength();\n var min_bytes = Math.ceil(len / 8);\n\n // Generage random bytes until a number less than n is found.\n // This ensures that 0..n-1 have an equal probability of being selected.\n do\n var a = new bn(this.rand.generate(min_bytes));\n while (a.cmp(n) >= 0);\n\n return a;\n};\n\nMillerRabin.prototype._randrange = function _randrange(start, stop) {\n // Generate a random number greater than or equal to start and less than stop.\n var size = stop.sub(start);\n return start.add(this._randbelow(size));\n};\n\nMillerRabin.prototype.test = function test(n, k, cb) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n var prime = true;\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n if (cb)\n cb(a);\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return false;\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s)\n return false;\n }\n\n return prime;\n};\n\nMillerRabin.prototype.getDivisor = function getDivisor(n, k) {\n var len = n.bitLength();\n var red = bn.mont(n);\n var rone = new bn(1).toRed(red);\n\n if (!k)\n k = Math.max(1, (len / 48) | 0);\n\n // Find d and s, (n - 1) = (2 ^ s) * d;\n var n1 = n.subn(1);\n for (var s = 0; !n1.testn(s); s++) {}\n var d = n.shrn(s);\n\n var rn1 = n1.toRed(red);\n\n for (; k > 0; k--) {\n var a = this._randrange(new bn(2), n1);\n\n var g = n.gcd(a);\n if (g.cmpn(1) !== 0)\n return g;\n\n var x = a.toRed(red).redPow(d);\n if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)\n continue;\n\n for (var i = 1; i < s; i++) {\n x = x.redSqr();\n\n if (x.cmp(rone) === 0)\n return x.fromRed().subn(1).gcd(n);\n if (x.cmp(rn1) === 0)\n break;\n }\n\n if (i === s) {\n x = x.redSqr();\n return x.fromRed().subn(1).gcd(n);\n }\n }\n\n return false;\n};\n","var randomBytes = require('randombytes');\nmodule.exports = findPrime;\nfindPrime.simpleSieve = simpleSieve;\nfindPrime.fermatTest = fermatTest;\nvar BN = require('bn.js');\nvar TWENTYFOUR = new BN(24);\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar ONE = new BN(1);\nvar TWO = new BN(2);\nvar FIVE = new BN(5);\nvar SIXTEEN = new BN(16);\nvar EIGHT = new BN(8);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar ELEVEN = new BN(11);\nvar FOUR = new BN(4);\nvar TWELVE = new BN(12);\nvar primes = null;\n\nfunction _getPrimes() {\n if (primes !== null)\n return primes;\n\n var limit = 0x100000;\n var res = [];\n res[0] = 2;\n for (var i = 1, k = 3; k < limit; k += 2) {\n var sqrt = Math.ceil(Math.sqrt(k));\n for (var j = 0; j < i && res[j] <= sqrt; j++)\n if (k % res[j] === 0)\n break;\n\n if (i !== j && res[j] <= sqrt)\n continue;\n\n res[i++] = k;\n }\n primes = res;\n return res;\n}\n\nfunction simpleSieve(p) {\n var primes = _getPrimes();\n\n for (var i = 0; i < primes.length; i++)\n if (p.modn(primes[i]) === 0) {\n if (p.cmpn(primes[i]) === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n return true;\n}\n\nfunction fermatTest(p) {\n var red = BN.mont(p);\n return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;\n}\n\nfunction findPrime(bits, gen) {\n if (bits < 16) {\n // this is what openssl does\n if (gen === 2 || gen === 5) {\n return new BN([0x8c, 0x7b]);\n } else {\n return new BN([0x8c, 0x27]);\n }\n }\n gen = new BN(gen);\n\n var num, n2;\n\n while (true) {\n num = new BN(randomBytes(Math.ceil(bits / 8)));\n while (num.bitLength() > bits) {\n num.ishrn(1);\n }\n if (num.isEven()) {\n num.iadd(ONE);\n }\n if (!num.testn(1)) {\n num.iadd(TWO);\n }\n if (!gen.cmp(TWO)) {\n while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {\n num.iadd(FOUR);\n }\n } else if (!gen.cmp(FIVE)) {\n while (num.mod(TEN).cmp(THREE)) {\n num.iadd(FOUR);\n }\n }\n n2 = num.shrn(1);\n if (simpleSieve(n2) && simpleSieve(num) &&\n fermatTest(n2) && fermatTest(num) &&\n millerRabin.test(n2) && millerRabin.test(num)) {\n return num;\n }\n }\n\n}\n","var BN = require('bn.js');\nvar MillerRabin = require('miller-rabin');\nvar millerRabin = new MillerRabin();\nvar TWENTYFOUR = new BN(24);\nvar ELEVEN = new BN(11);\nvar TEN = new BN(10);\nvar THREE = new BN(3);\nvar SEVEN = new BN(7);\nvar primes = require('./generatePrime');\nvar randomBytes = require('randombytes');\nmodule.exports = DH;\n\nfunction setPublicKey(pub, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc);\n }\n this._pub = new BN(pub);\n return this;\n}\n\nfunction setPrivateKey(priv, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc);\n }\n this._priv = new BN(priv);\n return this;\n}\n\nvar primeCache = {};\nfunction checkPrime(prime, generator) {\n var gen = generator.toString('hex');\n var hex = [gen, prime.toString(16)].join('_');\n if (hex in primeCache) {\n return primeCache[hex];\n }\n var error = 0;\n\n if (prime.isEven() ||\n !primes.simpleSieve ||\n !primes.fermatTest(prime) ||\n !millerRabin.test(prime)) {\n //not a prime so +1\n error += 1;\n\n if (gen === '02' || gen === '05') {\n // we'd be able to check the generator\n // it would fail so +8\n error += 8;\n } else {\n //we wouldn't be able to test the generator\n // so +4\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n }\n if (!millerRabin.test(prime.shrn(1))) {\n //not a safe prime\n error += 2;\n }\n var rem;\n switch (gen) {\n case '02':\n if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {\n // unsuidable generator\n error += 8;\n }\n break;\n case '05':\n rem = prime.mod(TEN);\n if (rem.cmp(THREE) && rem.cmp(SEVEN)) {\n // prime mod 10 needs to equal 3 or 7\n error += 8;\n }\n break;\n default:\n error += 4;\n }\n primeCache[hex] = error;\n return error;\n}\n\nfunction DH(prime, generator, malleable) {\n this.setGenerator(generator);\n this.__prime = new BN(prime);\n this._prime = BN.mont(this.__prime);\n this._primeLen = prime.length;\n this._pub = undefined;\n this._priv = undefined;\n this._primeCode = undefined;\n if (malleable) {\n this.setPublicKey = setPublicKey;\n this.setPrivateKey = setPrivateKey;\n } else {\n this._primeCode = 8;\n }\n}\nObject.defineProperty(DH.prototype, 'verifyError', {\n enumerable: true,\n get: function () {\n if (typeof this._primeCode !== 'number') {\n this._primeCode = checkPrime(this.__prime, this.__gen);\n }\n return this._primeCode;\n }\n});\nDH.prototype.generateKeys = function () {\n if (!this._priv) {\n this._priv = new BN(randomBytes(this._primeLen));\n }\n this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();\n return this.getPublicKey();\n};\n\nDH.prototype.computeSecret = function (other) {\n other = new BN(other);\n other = other.toRed(this._prime);\n var secret = other.redPow(this._priv).fromRed();\n var out = new Buffer(secret.toArray());\n var prime = this.getPrime();\n if (out.length < prime.length) {\n var front = new Buffer(prime.length - out.length);\n front.fill(0);\n out = Buffer.concat([front, out]);\n }\n return out;\n};\n\nDH.prototype.getPublicKey = function getPublicKey(enc) {\n return formatReturnValue(this._pub, enc);\n};\n\nDH.prototype.getPrivateKey = function getPrivateKey(enc) {\n return formatReturnValue(this._priv, enc);\n};\n\nDH.prototype.getPrime = function (enc) {\n return formatReturnValue(this.__prime, enc);\n};\n\nDH.prototype.getGenerator = function (enc) {\n return formatReturnValue(this._gen, enc);\n};\n\nDH.prototype.setGenerator = function (gen, enc) {\n enc = enc || 'utf8';\n if (!Buffer.isBuffer(gen)) {\n gen = new Buffer(gen, enc);\n }\n this.__gen = gen;\n this._gen = new BN(gen);\n return this;\n};\n\nfunction formatReturnValue(bn, enc) {\n var buf = new Buffer(bn.toArray());\n if (!enc) {\n return buf;\n } else {\n return buf.toString(enc);\n }\n}\n","var generatePrime = require('./lib/generatePrime')\nvar primes = require('./lib/primes.json')\n\nvar DH = require('./lib/dh')\n\nfunction getDiffieHellman (mod) {\n var prime = new Buffer(primes[mod].prime, 'hex')\n var gen = new Buffer(primes[mod].gen, 'hex')\n\n return new DH(prime, gen)\n}\n\nvar ENCODINGS = {\n 'binary': true, 'hex': true, 'base64': true\n}\n\nfunction createDiffieHellman (prime, enc, generator, genc) {\n if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {\n return createDiffieHellman(prime, 'binary', enc, generator)\n }\n\n enc = enc || 'binary'\n genc = genc || 'binary'\n generator = generator || new Buffer([2])\n\n if (!Buffer.isBuffer(generator)) {\n generator = new Buffer(generator, genc)\n }\n\n if (typeof prime === 'number') {\n return new DH(generatePrime(prime, generator), generator, true)\n }\n\n if (!Buffer.isBuffer(prime)) {\n prime = new Buffer(prime, enc)\n }\n\n return new DH(prime, generator, true)\n}\n\nexports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman\nexports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","var BN = require('bn.js')\nvar randomBytes = require('randombytes')\n\nfunction blind (priv) {\n var r = getr(priv)\n var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()\n return { blinder: blinder, unblinder: r.invm(priv.modulus) }\n}\n\nfunction getr (priv) {\n var len = priv.modulus.byteLength()\n var r\n do {\n r = new BN(randomBytes(len))\n } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))\n return r\n}\n\nfunction crt (msg, priv) {\n var blinds = blind(priv)\n var len = priv.modulus.byteLength()\n var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)\n var c1 = blinded.toRed(BN.mont(priv.prime1))\n var c2 = blinded.toRed(BN.mont(priv.prime2))\n var qinv = priv.coefficient\n var p = priv.prime1\n var q = priv.prime2\n var m1 = c1.redPow(priv.exponent1).fromRed()\n var m2 = c2.redPow(priv.exponent2).fromRed()\n var h = m1.isub(m2).imul(qinv).umod(p).imul(q)\n return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)\n}\ncrt.getr = getr\n\nmodule.exports = crt\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar utils = require('../utils');\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n var e;\n var h;\n var j;\n if (this.curve.twisted) {\n // E = a * C\n e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n h = this.z.redSqr();\n // J = F - 2 * H\n j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n e = c.redAdd(d);\n // H = (c * Z1)^2\n h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',\n ],\n ],\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',\n ],\n ],\n },\n};\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array|Object} sig -\n* @param {Array|Point} [sig.R] - R point as Point or bytes\n* @param {Array|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array} [sig.Rencoded] - R point encoded\n* @param {Array} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength),\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n","'use strict';\n\nvar hash = require('hash.js');\nvar curves = require('../curves');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n","'use strict';\n\nconst inherits = require('inherits');\n\nfunction Reporter(options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n };\n}\nexports.Reporter = Reporter;\n\nReporter.prototype.isError = function isError(obj) {\n return obj instanceof ReporterError;\n};\n\nReporter.prototype.save = function save() {\n const state = this._reporterState;\n\n return { obj: state.obj, pathLen: state.path.length };\n};\n\nReporter.prototype.restore = function restore(data) {\n const state = this._reporterState;\n\n state.obj = data.obj;\n state.path = state.path.slice(0, data.pathLen);\n};\n\nReporter.prototype.enterKey = function enterKey(key) {\n return this._reporterState.path.push(key);\n};\n\nReporter.prototype.exitKey = function exitKey(index) {\n const state = this._reporterState;\n\n state.path = state.path.slice(0, index - 1);\n};\n\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n const state = this._reporterState;\n\n this.exitKey(index);\n if (state.obj !== null)\n state.obj[key] = value;\n};\n\nReporter.prototype.path = function path() {\n return this._reporterState.path.join('/');\n};\n\nReporter.prototype.enterObject = function enterObject() {\n const state = this._reporterState;\n\n const prev = state.obj;\n state.obj = {};\n return prev;\n};\n\nReporter.prototype.leaveObject = function leaveObject(prev) {\n const state = this._reporterState;\n\n const now = state.obj;\n state.obj = prev;\n return now;\n};\n\nReporter.prototype.error = function error(msg) {\n let err;\n const state = this._reporterState;\n\n const inherited = msg instanceof ReporterError;\n if (inherited) {\n err = msg;\n } else {\n err = new ReporterError(state.path.map(function(elem) {\n return '[' + JSON.stringify(elem) + ']';\n }).join(''), msg.message || msg, msg.stack);\n }\n\n if (!state.options.partial)\n throw err;\n\n if (!inherited)\n state.errors.push(err);\n\n return err;\n};\n\nReporter.prototype.wrapResult = function wrapResult(result) {\n const state = this._reporterState;\n if (!state.options.partial)\n return result;\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n };\n};\n\nfunction ReporterError(path, msg) {\n this.path = path;\n this.rethrow(msg);\n}\ninherits(ReporterError, Error);\n\nReporterError.prototype.rethrow = function rethrow(msg) {\n this.message = msg + ' at: ' + (this.path || '(shallow)');\n if (Error.captureStackTrace)\n Error.captureStackTrace(this, ReporterError);\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message);\n } catch (e) {\n this.stack = e.stack;\n }\n }\n return this;\n};\n","'use strict';\n\nconst inherits = require('inherits');\nconst Reporter = require('../base/reporter').Reporter;\nconst Buffer = require('safer-buffer').Buffer;\n\nfunction DecoderBuffer(base, options) {\n Reporter.call(this, options);\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer');\n return;\n }\n\n this.base = base;\n this.offset = 0;\n this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {\n if (data instanceof DecoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n Buffer.isBuffer(data.base) &&\n data.constructor.name === 'DecoderBuffer' &&\n typeof data.offset === 'number' &&\n typeof data.length === 'number' &&\n typeof data.save === 'function' &&\n typeof data.restore === 'function' &&\n typeof data.isEmpty === 'function' &&\n typeof data.readUInt8 === 'function' &&\n typeof data.skip === 'function' &&\n typeof data.raw === 'function';\n\n return isCompatible;\n};\n\nDecoderBuffer.prototype.save = function save() {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };\n};\n\nDecoderBuffer.prototype.restore = function restore(save) {\n // Return skipped data\n const res = new DecoderBuffer(this.base);\n res.offset = save.offset;\n res.length = this.offset;\n\n this.offset = save.offset;\n Reporter.prototype.restore.call(this, save.reporter);\n\n return res;\n};\n\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n return this.offset === this.length;\n};\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n if (this.offset + 1 <= this.length)\n return this.base.readUInt8(this.offset++, true);\n else\n return this.error(fail || 'DecoderBuffer overrun');\n};\n\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n if (!(this.offset + bytes <= this.length))\n return this.error(fail || 'DecoderBuffer overrun');\n\n const res = new DecoderBuffer(this.base);\n\n // Share reporter state\n res._reporterState = this._reporterState;\n\n res.offset = this.offset;\n res.length = this.offset + bytes;\n this.offset += bytes;\n return res;\n};\n\nDecoderBuffer.prototype.raw = function raw(save) {\n return this.base.slice(save ? save.offset : this.offset, this.length);\n};\n\nfunction EncoderBuffer(value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0;\n this.value = value.map(function(item) {\n if (!EncoderBuffer.isEncoderBuffer(item))\n item = new EncoderBuffer(item, reporter);\n this.length += item.length;\n return item;\n }, this);\n } else if (typeof value === 'number') {\n if (!(0 <= value && value <= 0xff))\n return reporter.error('non-byte EncoderBuffer value');\n this.value = value;\n this.length = 1;\n } else if (typeof value === 'string') {\n this.value = value;\n this.length = Buffer.byteLength(value);\n } else if (Buffer.isBuffer(value)) {\n this.value = value;\n this.length = value.length;\n } else {\n return reporter.error('Unsupported type: ' + typeof value);\n }\n}\nexports.EncoderBuffer = EncoderBuffer;\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {\n if (data instanceof EncoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n data.constructor.name === 'EncoderBuffer' &&\n typeof data.length === 'number' &&\n typeof data.join === 'function';\n\n return isCompatible;\n};\n\nEncoderBuffer.prototype.join = function join(out, offset) {\n if (!out)\n out = Buffer.alloc(this.length);\n if (!offset)\n offset = 0;\n\n if (this.length === 0)\n return out;\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function(item) {\n item.join(out, offset);\n offset += item.length;\n });\n } else {\n if (typeof this.value === 'number')\n out[offset] = this.value;\n else if (typeof this.value === 'string')\n out.write(this.value, offset);\n else if (Buffer.isBuffer(this.value))\n this.value.copy(out, offset);\n offset += this.length;\n }\n\n return out;\n};\n","'use strict';\n\nconst Reporter = require('../base/reporter').Reporter;\nconst EncoderBuffer = require('../base/buffer').EncoderBuffer;\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst assert = require('minimalistic-assert');\n\n// Supported tags\nconst tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n];\n\n// Public methods list\nconst methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags);\n\n// Overrided methods list\nconst overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n];\n\nfunction Node(enc, parent, name) {\n const state = {};\n this._baseState = state;\n\n state.name = name;\n state.enc = enc;\n\n state.parent = parent || null;\n state.children = null;\n\n // State\n state.tag = null;\n state.args = null;\n state.reverseArgs = null;\n state.choice = null;\n state.optional = false;\n state.any = false;\n state.obj = false;\n state.use = null;\n state.useDecoder = null;\n state.key = null;\n state['default'] = null;\n state.explicit = null;\n state.implicit = null;\n state.contains = null;\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = [];\n this._wrap();\n }\n}\nmodule.exports = Node;\n\nconst stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n];\n\nNode.prototype.clone = function clone() {\n const state = this._baseState;\n const cstate = {};\n stateProps.forEach(function(prop) {\n cstate[prop] = state[prop];\n });\n const res = new this.constructor(cstate.parent);\n res._baseState = cstate;\n return res;\n};\n\nNode.prototype._wrap = function wrap() {\n const state = this._baseState;\n methods.forEach(function(method) {\n this[method] = function _wrappedMethod() {\n const clone = new this.constructor(this);\n state.children.push(clone);\n return clone[method].apply(clone, arguments);\n };\n }, this);\n};\n\nNode.prototype._init = function init(body) {\n const state = this._baseState;\n\n assert(state.parent === null);\n body.call(this);\n\n // Filter children\n state.children = state.children.filter(function(child) {\n return child._baseState.parent === this;\n }, this);\n assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\n\nNode.prototype._useArgs = function useArgs(args) {\n const state = this._baseState;\n\n // Filter children and args\n const children = args.filter(function(arg) {\n return arg instanceof this.constructor;\n }, this);\n args = args.filter(function(arg) {\n return !(arg instanceof this.constructor);\n }, this);\n\n if (children.length !== 0) {\n assert(state.children === null);\n state.children = children;\n\n // Replace parent to maintain backward link\n children.forEach(function(child) {\n child._baseState.parent = this;\n }, this);\n }\n if (args.length !== 0) {\n assert(state.args === null);\n state.args = args;\n state.reverseArgs = args.map(function(arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object)\n return arg;\n\n const res = {};\n Object.keys(arg).forEach(function(key) {\n if (key == (key | 0))\n key |= 0;\n const value = arg[key];\n res[value] = key;\n });\n return res;\n });\n }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function(method) {\n Node.prototype[method] = function _overrided() {\n const state = this._baseState;\n throw new Error(method + ' not implemented for encoding: ' + state.enc);\n };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function(tag) {\n Node.prototype[tag] = function _tagMethod() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n assert(state.tag === null);\n state.tag = tag;\n\n this._useArgs(args);\n\n return this;\n };\n});\n\nNode.prototype.use = function use(item) {\n assert(item);\n const state = this._baseState;\n\n assert(state.use === null);\n state.use = item;\n\n return this;\n};\n\nNode.prototype.optional = function optional() {\n const state = this._baseState;\n\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.def = function def(val) {\n const state = this._baseState;\n\n assert(state['default'] === null);\n state['default'] = val;\n state.optional = true;\n\n return this;\n};\n\nNode.prototype.explicit = function explicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.explicit = num;\n\n return this;\n};\n\nNode.prototype.implicit = function implicit(num) {\n const state = this._baseState;\n\n assert(state.explicit === null && state.implicit === null);\n state.implicit = num;\n\n return this;\n};\n\nNode.prototype.obj = function obj() {\n const state = this._baseState;\n const args = Array.prototype.slice.call(arguments);\n\n state.obj = true;\n\n if (args.length !== 0)\n this._useArgs(args);\n\n return this;\n};\n\nNode.prototype.key = function key(newKey) {\n const state = this._baseState;\n\n assert(state.key === null);\n state.key = newKey;\n\n return this;\n};\n\nNode.prototype.any = function any() {\n const state = this._baseState;\n\n state.any = true;\n\n return this;\n};\n\nNode.prototype.choice = function choice(obj) {\n const state = this._baseState;\n\n assert(state.choice === null);\n state.choice = obj;\n this._useArgs(Object.keys(obj).map(function(key) {\n return obj[key];\n }));\n\n return this;\n};\n\nNode.prototype.contains = function contains(item) {\n const state = this._baseState;\n\n assert(state.use === null);\n state.contains = item;\n\n return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return input.wrapResult(state.children[0]._decode(input, options));\n\n let result = state['default'];\n let present = true;\n\n let prevKey = null;\n if (state.key !== null)\n prevKey = input.enterKey(state.key);\n\n // Check if tag is there\n if (state.optional) {\n let tag = null;\n if (state.explicit !== null)\n tag = state.explicit;\n else if (state.implicit !== null)\n tag = state.implicit;\n else if (state.tag !== null)\n tag = state.tag;\n\n if (tag === null && !state.any) {\n // Trial and Error\n const save = input.save();\n try {\n if (state.choice === null)\n this._decodeGeneric(state.tag, input, options);\n else\n this._decodeChoice(input, options);\n present = true;\n } catch (e) {\n present = false;\n }\n input.restore(save);\n } else {\n present = this._peekTag(input, tag, state.any);\n\n if (input.isError(present))\n return present;\n }\n }\n\n // Push object on stack\n let prevObj;\n if (state.obj && present)\n prevObj = input.enterObject();\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n const explicit = this._decodeTag(input, state.explicit);\n if (input.isError(explicit))\n return explicit;\n input = explicit;\n }\n\n const start = input.offset;\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n let save;\n if (state.any)\n save = input.save();\n const body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n );\n if (input.isError(body))\n return body;\n\n if (state.any)\n result = input.raw(save);\n else\n input = body;\n }\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), start, input.length, 'tagged');\n\n if (options && options.track && state.tag !== null)\n options.track(input.path(), input.offset, input.length, 'content');\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options);\n } else {\n result = this._decodeChoice(input, options);\n }\n\n if (input.isError(result))\n return result;\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren(child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options);\n });\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n const data = new DecoderBuffer(result);\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options);\n }\n }\n\n // Pop object\n if (state.obj && present)\n result = input.leaveObject(prevObj);\n\n // Set key\n if (state.key !== null && (result !== null || present === true))\n input.leaveKey(prevKey, state.key, result);\n else if (prevKey !== null)\n input.exitKey(prevKey);\n\n return result;\n};\n\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n const state = this._baseState;\n\n if (tag === 'seq' || tag === 'set')\n return null;\n if (tag === 'seqof' || tag === 'setof')\n return this._decodeList(input, tag, state.args[0], options);\n else if (/str$/.test(tag))\n return this._decodeStr(input, tag, options);\n else if (tag === 'objid' && state.args)\n return this._decodeObjid(input, state.args[0], state.args[1], options);\n else if (tag === 'objid')\n return this._decodeObjid(input, null, null, options);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._decodeTime(input, tag, options);\n else if (tag === 'null_')\n return this._decodeNull(input, options);\n else if (tag === 'bool')\n return this._decodeBool(input, options);\n else if (tag === 'objDesc')\n return this._decodeStr(input, tag, options);\n else if (tag === 'int' || tag === 'enum')\n return this._decodeInt(input, state.args && state.args[0], options);\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options);\n } else {\n return input.error('unknown tag: ' + tag);\n }\n};\n\nNode.prototype._getUse = function _getUse(entity, obj) {\n\n const state = this._baseState;\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj);\n assert(state.useDecoder._baseState.parent === null);\n state.useDecoder = state.useDecoder._baseState.children[0];\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone();\n state.useDecoder._baseState.implicit = state.implicit;\n }\n return state.useDecoder;\n};\n\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n const state = this._baseState;\n let result = null;\n let match = false;\n\n Object.keys(state.choice).some(function(key) {\n const save = input.save();\n const node = state.choice[key];\n try {\n const value = node._decode(input, options);\n if (input.isError(value))\n return false;\n\n result = { type: key, value: value };\n match = true;\n } catch (e) {\n input.restore(save);\n return false;\n }\n return true;\n }, this);\n\n if (!match)\n return input.error('Choice not matched');\n\n return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n return new EncoderBuffer(data, this.reporter);\n};\n\nNode.prototype._encode = function encode(data, reporter, parent) {\n const state = this._baseState;\n if (state['default'] !== null && state['default'] === data)\n return;\n\n const result = this._encodeValue(data, reporter, parent);\n if (result === undefined)\n return;\n\n if (this._skipDefault(result, reporter, parent))\n return;\n\n return result;\n};\n\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n const state = this._baseState;\n\n // Decode root node\n if (state.parent === null)\n return state.children[0]._encode(data, reporter || new Reporter());\n\n let result = null;\n\n // Set reporter to share it with a child class\n this.reporter = reporter;\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state['default'] !== null)\n data = state['default'];\n else\n return;\n }\n\n // Encode children first\n let content = null;\n let primitive = false;\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data);\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter);\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter);\n primitive = true;\n } else if (state.children) {\n content = state.children.map(function(child) {\n if (child._baseState.tag === 'null_')\n return child._encode(null, reporter, data);\n\n if (child._baseState.key === null)\n return reporter.error('Child should have a key');\n const prevKey = reporter.enterKey(child._baseState.key);\n\n if (typeof data !== 'object')\n return reporter.error('Child expected, but input is not object');\n\n const res = child._encode(data[child._baseState.key], reporter, data);\n reporter.leaveKey(prevKey);\n\n return res;\n }, this).filter(function(child) {\n return child;\n });\n content = this._createEncoderBuffer(content);\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n // TODO(indutny): this should be thrown on DSL level\n if (!(state.args && state.args.length === 1))\n return reporter.error('Too many args for : ' + state.tag);\n\n if (!Array.isArray(data))\n return reporter.error('seqof/setof, but data is not Array');\n\n const child = this.clone();\n child._baseState.implicit = null;\n content = this._createEncoderBuffer(data.map(function(item) {\n const state = this._baseState;\n\n return this._getUse(state.args[0], data)._encode(item, reporter);\n }, child));\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter);\n } else {\n content = this._encodePrimitive(state.tag, data);\n primitive = true;\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n const tag = state.implicit !== null ? state.implicit : state.tag;\n const cls = state.implicit === null ? 'universal' : 'context';\n\n if (tag === null) {\n if (state.use === null)\n reporter.error('Tag could be omitted only for .use()');\n } else {\n if (state.use === null)\n result = this._encodeComposite(tag, primitive, cls, content);\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null)\n result = this._encodeComposite(state.explicit, false, 'context', result);\n\n return result;\n};\n\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n const state = this._baseState;\n\n const node = state.choice[data.type];\n if (!node) {\n assert(\n false,\n data.type + ' not found in ' +\n JSON.stringify(Object.keys(state.choice)));\n }\n return node._encode(data.value, reporter);\n};\n\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n const state = this._baseState;\n\n if (/str$/.test(tag))\n return this._encodeStr(data, tag);\n else if (tag === 'objid' && state.args)\n return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);\n else if (tag === 'objid')\n return this._encodeObjid(data, null, null);\n else if (tag === 'gentime' || tag === 'utctime')\n return this._encodeTime(data, tag);\n else if (tag === 'null_')\n return this._encodeNull();\n else if (tag === 'int' || tag === 'enum')\n return this._encodeInt(data, state.args && state.reverseArgs[0]);\n else if (tag === 'bool')\n return this._encodeBool(data);\n else if (tag === 'objDesc')\n return this._encodeStr(data, tag);\n else\n throw new Error('Unsupported tag: ' + tag);\n};\n\nNode.prototype._isNumstr = function isNumstr(str) {\n return /^[0-9 ]*$/.test(str);\n};\n\nNode.prototype._isPrintstr = function isPrintstr(str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);\n};\n","'use strict';\n\n// Helper\nfunction reverse(map) {\n const res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n const value = map[key];\n res[value] = key;\n });\n\n return res;\n}\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n};\nexports.tagClassByName = reverse(exports.tagClass);\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n};\nexports.tagByName = reverse(exports.tag);\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DEREncoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DEREncoder;\n\nDEREncoder.prototype.encode = function encode(data, reporter) {\n return this.tree._encode(data, reporter).join();\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._encodeComposite = function encodeComposite(tag,\n primitive,\n cls,\n content) {\n const encodedTag = encodeTag(tag, primitive, cls, this.reporter);\n\n // Short form\n if (content.length < 0x80) {\n const header = Buffer.alloc(2);\n header[0] = encodedTag;\n header[1] = content.length;\n return this._createEncoderBuffer([ header, content ]);\n }\n\n // Long form\n // Count octets required to store length\n let lenOctets = 1;\n for (let i = content.length; i >= 0x100; i >>= 8)\n lenOctets++;\n\n const header = Buffer.alloc(1 + 1 + lenOctets);\n header[0] = encodedTag;\n header[1] = 0x80 | lenOctets;\n\n for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)\n header[i] = j & 0xff;\n\n return this._createEncoderBuffer([ header, content ]);\n};\n\nDERNode.prototype._encodeStr = function encodeStr(str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([ str.unused | 0, str.data ]);\n } else if (tag === 'bmpstr') {\n const buf = Buffer.alloc(str.length * 2);\n for (let i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2);\n }\n return this._createEncoderBuffer(buf);\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports ' +\n 'only digits and space');\n }\n return this._createEncoderBuffer(str);\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports ' +\n 'only latin upper and lower case letters, ' +\n 'digits, space, apostrophe, left and rigth ' +\n 'parenthesis, plus sign, comma, hyphen, ' +\n 'dot, slash, colon, equal sign, ' +\n 'question mark');\n }\n return this._createEncoderBuffer(str);\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str);\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str);\n } else {\n return this.reporter.error('Encoding of string type: ' + tag +\n ' unsupported');\n }\n};\n\nDERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {\n if (typeof id === 'string') {\n if (!values)\n return this.reporter.error('string objid given, but no values map found');\n if (!values.hasOwnProperty(id))\n return this.reporter.error('objid not found in values map');\n id = values[id].split(/[\\s.]+/g);\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n } else if (Array.isArray(id)) {\n id = id.slice();\n for (let i = 0; i < id.length; i++)\n id[i] |= 0;\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error('objid() should be either array or string, ' +\n 'got: ' + JSON.stringify(id));\n }\n\n if (!relative) {\n if (id[1] >= 40)\n return this.reporter.error('Second objid identifier OOB');\n id.splice(0, 2, id[0] * 40 + id[1]);\n }\n\n // Count number of octets\n let size = 0;\n for (let i = 0; i < id.length; i++) {\n let ident = id[i];\n for (size++; ident >= 0x80; ident >>= 7)\n size++;\n }\n\n const objid = Buffer.alloc(size);\n let offset = objid.length - 1;\n for (let i = id.length - 1; i >= 0; i--) {\n let ident = id[i];\n objid[offset--] = ident & 0x7f;\n while ((ident >>= 7) > 0)\n objid[offset--] = 0x80 | (ident & 0x7f);\n }\n\n return this._createEncoderBuffer(objid);\n};\n\nfunction two(num) {\n if (num < 10)\n return '0' + num;\n else\n return num;\n}\n\nDERNode.prototype._encodeTime = function encodeTime(time, tag) {\n let str;\n const date = new Date(time);\n\n if (tag === 'gentime') {\n str = [\n two(date.getUTCFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else if (tag === 'utctime') {\n str = [\n two(date.getUTCFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('');\n } else {\n this.reporter.error('Encoding ' + tag + ' time is not supported yet');\n }\n\n return this._encodeStr(str, 'octstr');\n};\n\nDERNode.prototype._encodeNull = function encodeNull() {\n return this._createEncoderBuffer('');\n};\n\nDERNode.prototype._encodeInt = function encodeInt(num, values) {\n if (typeof num === 'string') {\n if (!values)\n return this.reporter.error('String int or enum given, but no values map');\n if (!values.hasOwnProperty(num)) {\n return this.reporter.error('Values map doesn\\'t contain: ' +\n JSON.stringify(num));\n }\n num = values[num];\n }\n\n // Bignum, assume big endian\n if (typeof num !== 'number' && !Buffer.isBuffer(num)) {\n const numArray = num.toArray();\n if (!num.sign && numArray[0] & 0x80) {\n numArray.unshift(0);\n }\n num = Buffer.from(numArray);\n }\n\n if (Buffer.isBuffer(num)) {\n let size = num.length;\n if (num.length === 0)\n size++;\n\n const out = Buffer.alloc(size);\n num.copy(out);\n if (num.length === 0)\n out[0] = 0;\n return this._createEncoderBuffer(out);\n }\n\n if (num < 0x80)\n return this._createEncoderBuffer(num);\n\n if (num < 0x100)\n return this._createEncoderBuffer([0, num]);\n\n let size = 1;\n for (let i = num; i >= 0x100; i >>= 8)\n size++;\n\n const out = new Array(size);\n for (let i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff;\n num >>= 8;\n }\n if(out[0] & 0x80) {\n out.unshift(0);\n }\n\n return this._createEncoderBuffer(Buffer.from(out));\n};\n\nDERNode.prototype._encodeBool = function encodeBool(value) {\n return this._createEncoderBuffer(value ? 0xff : 0);\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getEncoder('der').tree;\n};\n\nDERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {\n const state = this._baseState;\n let i;\n if (state['default'] === null)\n return false;\n\n const data = dataBuffer.join();\n if (state.defaultBuffer === undefined)\n state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();\n\n if (data.length !== state.defaultBuffer.length)\n return false;\n\n for (i=0; i < data.length; i++)\n if (data[i] !== state.defaultBuffer[i])\n return false;\n\n return true;\n};\n\n// Utility methods\n\nfunction encodeTag(tag, primitive, cls, reporter) {\n let res;\n\n if (tag === 'seqof')\n tag = 'seq';\n else if (tag === 'setof')\n tag = 'set';\n\n if (der.tagByName.hasOwnProperty(tag))\n res = der.tagByName[tag];\n else if (typeof tag === 'number' && (tag | 0) === tag)\n res = tag;\n else\n return reporter.error('Unknown tag: ' + tag);\n\n if (res >= 0x1f)\n return reporter.error('Multi-octet tag encoding unsupported');\n\n if (!primitive)\n res |= 0x20;\n\n res |= (der.tagClassByName[cls || 'universal'] << 6);\n\n return res;\n}\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst DEREncoder = require('./der');\n\nfunction PEMEncoder(entity) {\n DEREncoder.call(this, entity);\n this.enc = 'pem';\n}\ninherits(PEMEncoder, DEREncoder);\nmodule.exports = PEMEncoder;\n\nPEMEncoder.prototype.encode = function encode(data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data);\n\n const p = buf.toString('base64');\n const out = [ '-----BEGIN ' + options.label + '-----' ];\n for (let i = 0; i < p.length; i += 64)\n out.push(p.slice(i, i + 64));\n out.push('-----END ' + options.label + '-----');\n return out.join('\\n');\n};\n","'use strict';\n\nconst encoders = exports;\n\nencoders.der = require('./der');\nencoders.pem = require('./pem');\n","'use strict';\n\nconst inherits = require('inherits');\n\nconst bignum = require('bn.js');\nconst DecoderBuffer = require('../base/buffer').DecoderBuffer;\nconst Node = require('../base/node');\n\n// Import DER constants\nconst der = require('../constants/der');\n\nfunction DERDecoder(entity) {\n this.enc = 'der';\n this.name = entity.name;\n this.entity = entity;\n\n // Construct base tree\n this.tree = new DERNode();\n this.tree._init(entity.body);\n}\nmodule.exports = DERDecoder;\n\nDERDecoder.prototype.decode = function decode(data, options) {\n if (!DecoderBuffer.isDecoderBuffer(data)) {\n data = new DecoderBuffer(data, options);\n }\n\n return this.tree._decode(data, options);\n};\n\n// Tree methods\n\nfunction DERNode(parent) {\n Node.call(this, 'der', parent);\n}\ninherits(DERNode, Node);\n\nDERNode.prototype._peekTag = function peekTag(buffer, tag, any) {\n if (buffer.isEmpty())\n return false;\n\n const state = buffer.save();\n const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n buffer.restore(state);\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag ||\n (decodedTag.tagStr + 'of') === tag || any;\n};\n\nDERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {\n const decodedTag = derDecodeTag(buffer,\n 'Failed to decode tag of \"' + tag + '\"');\n if (buffer.isError(decodedTag))\n return decodedTag;\n\n let len = derDecodeLen(buffer,\n decodedTag.primitive,\n 'Failed to get length of \"' + tag + '\"');\n\n // Failure\n if (buffer.isError(len))\n return len;\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error('Failed to match tag: \"' + tag + '\"');\n }\n\n if (decodedTag.primitive || len !== null)\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n\n // Indefinite length... find END tag\n const state = buffer.save();\n const res = this._skipUntilEnd(\n buffer,\n 'Failed to skip indefinite length body: \"' + this.tag + '\"');\n if (buffer.isError(res))\n return res;\n\n len = buffer.offset - state.offset;\n buffer.restore(state);\n return buffer.skip(len, 'Failed to match body of: \"' + tag + '\"');\n};\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {\n for (;;) {\n const tag = derDecodeTag(buffer, fail);\n if (buffer.isError(tag))\n return tag;\n const len = derDecodeLen(buffer, tag.primitive, fail);\n if (buffer.isError(len))\n return len;\n\n let res;\n if (tag.primitive || len !== null)\n res = buffer.skip(len);\n else\n res = this._skipUntilEnd(buffer, fail);\n\n // Failure\n if (buffer.isError(res))\n return res;\n\n if (tag.tagStr === 'end')\n break;\n }\n};\n\nDERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,\n options) {\n const result = [];\n while (!buffer.isEmpty()) {\n const possibleEnd = this._peekTag(buffer, 'end');\n if (buffer.isError(possibleEnd))\n return possibleEnd;\n\n const res = decoder.decode(buffer, 'der', options);\n if (buffer.isError(res) && possibleEnd)\n break;\n result.push(res);\n }\n return result;\n};\n\nDERNode.prototype._decodeStr = function decodeStr(buffer, tag) {\n if (tag === 'bitstr') {\n const unused = buffer.readUInt8();\n if (buffer.isError(unused))\n return unused;\n return { unused: unused, data: buffer.raw() };\n } else if (tag === 'bmpstr') {\n const raw = buffer.raw();\n if (raw.length % 2 === 1)\n return buffer.error('Decoding of string type: bmpstr length mismatch');\n\n let str = '';\n for (let i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2));\n }\n return str;\n } else if (tag === 'numstr') {\n const numstr = buffer.raw().toString('ascii');\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: ' +\n 'numstr unsupported characters');\n }\n return numstr;\n } else if (tag === 'octstr') {\n return buffer.raw();\n } else if (tag === 'objDesc') {\n return buffer.raw();\n } else if (tag === 'printstr') {\n const printstr = buffer.raw().toString('ascii');\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: ' +\n 'printstr unsupported characters');\n }\n return printstr;\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString();\n } else {\n return buffer.error('Decoding of string type: ' + tag + ' unsupported');\n }\n};\n\nDERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {\n let result;\n const identifiers = [];\n let ident = 0;\n let subident = 0;\n while (!buffer.isEmpty()) {\n subident = buffer.readUInt8();\n ident <<= 7;\n ident |= subident & 0x7f;\n if ((subident & 0x80) === 0) {\n identifiers.push(ident);\n ident = 0;\n }\n }\n if (subident & 0x80)\n identifiers.push(ident);\n\n const first = (identifiers[0] / 40) | 0;\n const second = identifiers[0] % 40;\n\n if (relative)\n result = identifiers;\n else\n result = [first, second].concat(identifiers.slice(1));\n\n if (values) {\n let tmp = values[result.join(' ')];\n if (tmp === undefined)\n tmp = values[result.join('.')];\n if (tmp !== undefined)\n result = tmp;\n }\n\n return result;\n};\n\nDERNode.prototype._decodeTime = function decodeTime(buffer, tag) {\n const str = buffer.raw().toString();\n\n let year;\n let mon;\n let day;\n let hour;\n let min;\n let sec;\n if (tag === 'gentime') {\n year = str.slice(0, 4) | 0;\n mon = str.slice(4, 6) | 0;\n day = str.slice(6, 8) | 0;\n hour = str.slice(8, 10) | 0;\n min = str.slice(10, 12) | 0;\n sec = str.slice(12, 14) | 0;\n } else if (tag === 'utctime') {\n year = str.slice(0, 2) | 0;\n mon = str.slice(2, 4) | 0;\n day = str.slice(4, 6) | 0;\n hour = str.slice(6, 8) | 0;\n min = str.slice(8, 10) | 0;\n sec = str.slice(10, 12) | 0;\n if (year < 70)\n year = 2000 + year;\n else\n year = 1900 + year;\n } else {\n return buffer.error('Decoding ' + tag + ' time is not supported yet');\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0);\n};\n\nDERNode.prototype._decodeNull = function decodeNull() {\n return null;\n};\n\nDERNode.prototype._decodeBool = function decodeBool(buffer) {\n const res = buffer.readUInt8();\n if (buffer.isError(res))\n return res;\n else\n return res !== 0;\n};\n\nDERNode.prototype._decodeInt = function decodeInt(buffer, values) {\n // Bigint, return as it is (assume big endian)\n const raw = buffer.raw();\n let res = new bignum(raw);\n\n if (values)\n res = values[res.toString(10)] || res;\n\n return res;\n};\n\nDERNode.prototype._use = function use(entity, obj) {\n if (typeof entity === 'function')\n entity = entity(obj);\n return entity._getDecoder('der').tree;\n};\n\n// Utility methods\n\nfunction derDecodeTag(buf, fail) {\n let tag = buf.readUInt8(fail);\n if (buf.isError(tag))\n return tag;\n\n const cls = der.tagClass[tag >> 6];\n const primitive = (tag & 0x20) === 0;\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n let oct = tag;\n tag = 0;\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail);\n if (buf.isError(oct))\n return oct;\n\n tag <<= 7;\n tag |= oct & 0x7f;\n }\n } else {\n tag &= 0x1f;\n }\n const tagStr = der.tag[tag];\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n };\n}\n\nfunction derDecodeLen(buf, primitive, fail) {\n let len = buf.readUInt8(fail);\n if (buf.isError(len))\n return len;\n\n // Indefinite form\n if (!primitive && len === 0x80)\n return null;\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len;\n }\n\n // Long form\n const num = len & 0x7f;\n if (num > 4)\n return buf.error('length octect is too long');\n\n len = 0;\n for (let i = 0; i < num; i++) {\n len <<= 8;\n const j = buf.readUInt8(fail);\n if (buf.isError(j))\n return j;\n len |= j;\n }\n\n return len;\n}\n","'use strict';\n\nconst inherits = require('inherits');\nconst Buffer = require('safer-buffer').Buffer;\n\nconst DERDecoder = require('./der');\n\nfunction PEMDecoder(entity) {\n DERDecoder.call(this, entity);\n this.enc = 'pem';\n}\ninherits(PEMDecoder, DERDecoder);\nmodule.exports = PEMDecoder;\n\nPEMDecoder.prototype.decode = function decode(data, options) {\n const lines = data.toString().split(/[\\r\\n]+/g);\n\n const label = options.label.toUpperCase();\n\n const re = /^-----(BEGIN|END) ([^-]+)-----$/;\n let start = -1;\n let end = -1;\n for (let i = 0; i < lines.length; i++) {\n const match = lines[i].match(re);\n if (match === null)\n continue;\n\n if (match[2] !== label)\n continue;\n\n if (start === -1) {\n if (match[1] !== 'BEGIN')\n break;\n start = i;\n } else {\n if (match[1] !== 'END')\n break;\n end = i;\n break;\n }\n }\n if (start === -1 || end === -1)\n throw new Error('PEM section not found for: ' + label);\n\n const base64 = lines.slice(start + 1, end).join('');\n // Remove excessive symbols\n base64.replace(/[^a-z0-9+/=]+/gi, '');\n\n const input = Buffer.from(base64, 'base64');\n return DERDecoder.prototype.decode.call(this, input, options);\n};\n","'use strict';\n\nconst decoders = exports;\n\ndecoders.der = require('./der');\ndecoders.pem = require('./pem');\n","'use strict';\n\nconst encoders = require('./encoders');\nconst decoders = require('./decoders');\nconst inherits = require('inherits');\n\nconst api = exports;\n\napi.define = function define(name, body) {\n return new Entity(name, body);\n};\n\nfunction Entity(name, body) {\n this.name = name;\n this.body = body;\n\n this.decoders = {};\n this.encoders = {};\n}\n\nEntity.prototype._createNamed = function createNamed(Base) {\n const name = this.name;\n\n function Generated(entity) {\n this._initNamed(entity, name);\n }\n inherits(Generated, Base);\n Generated.prototype._initNamed = function _initNamed(entity, name) {\n Base.call(this, entity, name);\n };\n\n return new Generated(this);\n};\n\nEntity.prototype._getDecoder = function _getDecoder(enc) {\n enc = enc || 'der';\n // Lazily create decoder\n if (!this.decoders.hasOwnProperty(enc))\n this.decoders[enc] = this._createNamed(decoders[enc]);\n return this.decoders[enc];\n};\n\nEntity.prototype.decode = function decode(data, enc, options) {\n return this._getDecoder(enc).decode(data, options);\n};\n\nEntity.prototype._getEncoder = function _getEncoder(enc) {\n enc = enc || 'der';\n // Lazily create encoder\n if (!this.encoders.hasOwnProperty(enc))\n this.encoders[enc] = this._createNamed(encoders[enc]);\n return this.encoders[enc];\n};\n\nEntity.prototype.encode = function encode(data, enc, /* internal */ reporter) {\n return this._getEncoder(enc).encode(data, reporter);\n};\n","'use strict';\n\nconst base = exports;\n\nbase.Reporter = require('./reporter').Reporter;\nbase.DecoderBuffer = require('./buffer').DecoderBuffer;\nbase.EncoderBuffer = require('./buffer').EncoderBuffer;\nbase.Node = require('./node');\n","'use strict';\n\nconst constants = exports;\n\n// Helper\nconstants._reverse = function reverse(map) {\n const res = {};\n\n Object.keys(map).forEach(function(key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key)\n key = key | 0;\n\n const value = map[key];\n res[value] = key;\n });\n\n return res;\n};\n\nconstants.der = require('./der');\n","'use strict';\n\nconst asn1 = exports;\n\nasn1.bignum = require('bn.js');\n\nasn1.define = require('./asn1/api').define;\nasn1.base = require('./asn1/base');\nasn1.constants = require('./asn1/constants');\nasn1.decoders = require('./asn1/decoders');\nasn1.encoders = require('./asn1/encoders');\n","// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js\n// thanks to @Rantanen\n\n'use strict'\n\nvar asn = require('asn1.js')\n\nvar Time = asn.define('Time', function () {\n this.choice({\n utcTime: this.utctime(),\n generalTime: this.gentime()\n })\n})\n\nvar AttributeTypeValue = asn.define('AttributeTypeValue', function () {\n this.seq().obj(\n this.key('type').objid(),\n this.key('value').any()\n )\n})\n\nvar AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {\n this.seq().obj(\n this.key('algorithm').objid(),\n this.key('parameters').optional(),\n this.key('curve').objid().optional()\n )\n})\n\nvar SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPublicKey').bitstr()\n )\n})\n\nvar RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {\n this.setof(AttributeTypeValue)\n})\n\nvar RDNSequence = asn.define('RDNSequence', function () {\n this.seqof(RelativeDistinguishedName)\n})\n\nvar Name = asn.define('Name', function () {\n this.choice({\n rdnSequence: this.use(RDNSequence)\n })\n})\n\nvar Validity = asn.define('Validity', function () {\n this.seq().obj(\n this.key('notBefore').use(Time),\n this.key('notAfter').use(Time)\n )\n})\n\nvar Extension = asn.define('Extension', function () {\n this.seq().obj(\n this.key('extnID').objid(),\n this.key('critical').bool().def(false),\n this.key('extnValue').octstr()\n )\n})\n\nvar TBSCertificate = asn.define('TBSCertificate', function () {\n this.seq().obj(\n this.key('version').explicit(0).int().optional(),\n this.key('serialNumber').int(),\n this.key('signature').use(AlgorithmIdentifier),\n this.key('issuer').use(Name),\n this.key('validity').use(Validity),\n this.key('subject').use(Name),\n this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),\n this.key('issuerUniqueID').implicit(1).bitstr().optional(),\n this.key('subjectUniqueID').implicit(2).bitstr().optional(),\n this.key('extensions').explicit(3).seqof(Extension).optional()\n )\n})\n\nvar X509Certificate = asn.define('X509Certificate', function () {\n this.seq().obj(\n this.key('tbsCertificate').use(TBSCertificate),\n this.key('signatureAlgorithm').use(AlgorithmIdentifier),\n this.key('signatureValue').bitstr()\n )\n})\n\nmodule.exports = X509Certificate\n","// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n'use strict'\n\nvar asn1 = require('asn1.js')\n\nexports.certificate = require('./certificate')\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('modulus').int(),\n this.key('publicExponent').int(),\n this.key('privateExponent').int(),\n this.key('prime1').int(),\n this.key('prime2').int(),\n this.key('exponent1').int(),\n this.key('exponent2').int(),\n this.key('coefficient').int()\n )\n})\nexports.RSAPrivateKey = RSAPrivateKey\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n this.seq().obj(\n this.key('modulus').int(),\n this.key('publicExponent').int()\n )\n})\nexports.RSAPublicKey = RSAPublicKey\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPublicKey').bitstr()\n )\n})\nexports.PublicKey = PublicKey\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n this.seq().obj(\n this.key('algorithm').objid(),\n this.key('none').null_().optional(),\n this.key('curve').objid().optional(),\n this.key('params').seq().obj(\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int()\n ).optional()\n )\n})\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPrivateKey').octstr()\n )\n})\nexports.PrivateKey = PrivateKeyInfo\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').seq().obj(\n this.key('id').objid(),\n this.key('decrypt').seq().obj(\n this.key('kde').seq().obj(\n this.key('id').objid(),\n this.key('kdeparams').seq().obj(\n this.key('salt').octstr(),\n this.key('iters').int()\n )\n ),\n this.key('cipher').seq().obj(\n this.key('algo').objid(),\n this.key('iv').octstr()\n )\n )\n ),\n this.key('subjectPrivateKey').octstr()\n )\n})\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int(),\n this.key('pub_key').int(),\n this.key('priv_key').int()\n )\n})\nexports.DSAPrivateKey = DSAPrivateKey\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n this.int()\n})\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('privateKey').octstr(),\n this.key('parameters').optional().explicit(0).use(ECParameters),\n this.key('publicKey').optional().explicit(1).bitstr()\n )\n})\nexports.ECPrivateKey = ECPrivateKey\n\nvar ECParameters = asn1.define('ECParameters', function () {\n this.choice({\n namedCurve: this.objid()\n })\n})\n\nexports.signature = asn1.define('signature', function () {\n this.seq().obj(\n this.key('r').int(),\n this.key('s').int()\n )\n})\n","// adapted from https://github.com/apatil/pemstrip\nvar findProc = /Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m\nvar startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m\nvar fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m\nvar evp = require('evp_bytestokey')\nvar ciphers = require('browserify-aes')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = function (okey, password) {\n var key = okey.toString()\n var match = key.match(findProc)\n var decrypted\n if (!match) {\n var match2 = key.match(fullRegex)\n decrypted = Buffer.from(match2[2].replace(/[\\r\\n]/g, ''), 'base64')\n } else {\n var suite = 'aes' + match[1]\n var iv = Buffer.from(match[2], 'hex')\n var cipherText = Buffer.from(match[3].replace(/[\\r\\n]/g, ''), 'base64')\n var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key\n var out = []\n var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)\n out.push(cipher.update(cipherText))\n out.push(cipher.final())\n decrypted = Buffer.concat(out)\n }\n var tag = key.match(startRegex)[1]\n return {\n tag: tag,\n data: decrypted\n }\n}\n","var asn1 = require('./asn1')\nvar aesid = require('./aesid.json')\nvar fixProc = require('./fixProc')\nvar ciphers = require('browserify-aes')\nvar compat = require('pbkdf2')\nvar Buffer = require('safe-buffer').Buffer\nmodule.exports = parseKeys\n\nfunction parseKeys (buffer) {\n var password\n if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n password = buffer.passphrase\n buffer = buffer.key\n }\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer)\n }\n\n var stripped = fixProc(buffer, password)\n\n var type = stripped.tag\n var data = stripped.data\n var subtype, ndata\n switch (type) {\n case 'CERTIFICATE':\n ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo\n // falls through\n case 'PUBLIC KEY':\n if (!ndata) {\n ndata = asn1.PublicKey.decode(data, 'der')\n }\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')\n case '1.2.840.10045.2.1':\n ndata.subjectPrivateKey = ndata.subjectPublicKey\n return {\n type: 'ec',\n data: ndata\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')\n return {\n type: 'dsa',\n data: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'ENCRYPTED PRIVATE KEY':\n data = asn1.EncryptedPrivateKey.decode(data, 'der')\n data = decrypt(data, password)\n // falls through\n case 'PRIVATE KEY':\n ndata = asn1.PrivateKey.decode(data, 'der')\n subtype = ndata.algorithm.algorithm.join('.')\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')\n case '1.2.840.10045.2.1':\n return {\n curve: ndata.algorithm.curve,\n privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n }\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')\n return {\n type: 'dsa',\n params: ndata.algorithm.params\n }\n default: throw new Error('unknown key id ' + subtype)\n }\n // throw new Error('unknown key type ' + type)\n case 'RSA PUBLIC KEY':\n return asn1.RSAPublicKey.decode(data, 'der')\n case 'RSA PRIVATE KEY':\n return asn1.RSAPrivateKey.decode(data, 'der')\n case 'DSA PRIVATE KEY':\n return {\n type: 'dsa',\n params: asn1.DSAPrivateKey.decode(data, 'der')\n }\n case 'EC PRIVATE KEY':\n data = asn1.ECPrivateKey.decode(data, 'der')\n return {\n curve: data.parameters.value,\n privateKey: data.privateKey\n }\n default: throw new Error('unknown key type ' + type)\n }\n}\nparseKeys.signature = asn1.signature\nfunction decrypt (data, password) {\n var salt = data.algorithm.decrypt.kde.kdeparams.salt\n var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)\n var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]\n var iv = data.algorithm.decrypt.cipher.iv\n var cipherText = data.subjectPrivateKey\n var keylen = parseInt(algo.split('-')[1], 10) / 8\n var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')\n var cipher = ciphers.createDecipheriv(algo, key, iv)\n var out = []\n out.push(cipher.update(cipherText))\n out.push(cipher.final())\n return Buffer.concat(out)\n}\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar createHmac = require('create-hmac');\nvar crt = require('browserify-rsa');\nvar EC = require('elliptic').ec;\nvar BN = require('bn.js');\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nvar RSA_PKCS1_PADDING = 1;\n\nfunction sign(hash, key, hashType, signType, tag) {\n var priv = parseKeys(key);\n if (priv.curve) {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n return ecSign(hash, priv);\n } else if (priv.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong private key type'); }\n return dsaSign(hash, priv, hashType);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong private key type'); }\n if (key.padding !== undefined && key.padding !== RSA_PKCS1_PADDING) { throw new Error('illegal or unsupported padding mode'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = priv.modulus.byteLength();\n var pad = [0, 1];\n while (hash.length + pad.length + 1 < len) { pad.push(0xff); }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) { pad.push(hash[i]); }\n\n var out = crt(pad, priv);\n return out;\n}\n\nfunction ecSign(hash, priv) {\n var curveId = curves[priv.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + priv.curve.join('.')); }\n\n var curve = new EC(curveId);\n var key = curve.keyFromPrivate(priv.privateKey);\n var out = key.sign(hash);\n\n return Buffer.from(out.toDER());\n}\n\nfunction dsaSign(hash, priv, algo) {\n var x = priv.params.priv_key;\n var p = priv.params.p;\n var q = priv.params.q;\n var g = priv.params.g;\n var r = new BN(0);\n var k;\n var H = bits2int(hash, q).mod(q);\n var s = false;\n var kv = getKey(x, q, hash, algo);\n while (s === false) {\n k = makeKey(q, kv, algo);\n r = makeR(g, k, p, q);\n s = k.invm(q).imul(H.add(x.mul(r))).mod(q);\n if (s.cmpn(0) === 0) {\n s = false;\n r = new BN(0);\n }\n }\n return toDER(r, s);\n}\n\nfunction toDER(r, s) {\n r = r.toArray();\n s = s.toArray();\n\n // Pad values\n if (r[0] & 0x80) { r = [0].concat(r); }\n if (s[0] & 0x80) { s = [0].concat(s); }\n\n var total = r.length + s.length + 4;\n var res = [\n 0x30, total, 0x02, r.length\n ];\n res = res.concat(r, [0x02, s.length], s);\n return Buffer.from(res);\n}\n\nfunction getKey(x, q, hash, algo) {\n x = Buffer.from(x.toArray());\n if (x.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - x.length);\n x = Buffer.concat([zeros, x]);\n }\n var hlen = hash.length;\n var hbits = bits2octets(hash, q);\n var v = Buffer.alloc(hlen);\n v.fill(1);\n var k = Buffer.alloc(hlen);\n k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest();\n v = createHmac(algo, k).update(v).digest();\n return { k: k, v: v };\n}\n\nfunction bits2int(obits, q) {\n var bits = new BN(obits);\n var shift = (obits.length << 3) - q.bitLength();\n if (shift > 0) { bits.ishrn(shift); }\n return bits;\n}\n\nfunction bits2octets(bits, q) {\n bits = bits2int(bits, q);\n bits = bits.mod(q);\n var out = Buffer.from(bits.toArray());\n if (out.length < q.byteLength()) {\n var zeros = Buffer.alloc(q.byteLength() - out.length);\n out = Buffer.concat([zeros, out]);\n }\n return out;\n}\n\nfunction makeKey(q, kv, algo) {\n var t;\n var k;\n\n do {\n t = Buffer.alloc(0);\n\n while (t.length * 8 < q.bitLength()) {\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n t = Buffer.concat([t, kv.v]);\n }\n\n k = bits2int(t, q);\n kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest();\n kv.v = createHmac(algo, kv.k).update(kv.v).digest();\n } while (k.cmp(q) !== -1);\n\n return k;\n}\n\nfunction makeR(g, k, p, q) {\n return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q);\n}\n\nmodule.exports = sign;\nmodule.exports.getKey = getKey;\nmodule.exports.makeKey = makeKey;\n","'use strict';\n\n// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js\nvar Buffer = require('safe-buffer').Buffer;\nvar BN = require('bn.js');\nvar EC = require('elliptic').ec;\nvar parseKeys = require('parse-asn1');\nvar curves = require('./curves.json');\n\nfunction verify(sig, hash, key, signType, tag) {\n var pub = parseKeys(key);\n if (pub.type === 'ec') {\n // rsa keys can be interpreted as ecdsa ones in openssl\n if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n return ecVerify(sig, hash, pub);\n } else if (pub.type === 'dsa') {\n if (signType !== 'dsa') { throw new Error('wrong public key type'); }\n return dsaVerify(sig, hash, pub);\n }\n if (signType !== 'rsa' && signType !== 'ecdsa/rsa') { throw new Error('wrong public key type'); }\n\n hash = Buffer.concat([tag, hash]);\n var len = pub.modulus.byteLength();\n var pad = [1];\n var padNum = 0;\n while (hash.length + pad.length + 2 < len) {\n pad.push(0xff);\n padNum += 1;\n }\n pad.push(0x00);\n var i = -1;\n while (++i < hash.length) {\n pad.push(hash[i]);\n }\n pad = Buffer.from(pad);\n var red = BN.mont(pub.modulus);\n sig = new BN(sig).toRed(red);\n\n sig = sig.redPow(new BN(pub.publicExponent));\n sig = Buffer.from(sig.fromRed().toArray());\n var out = padNum < 8 ? 1 : 0;\n len = Math.min(sig.length, pad.length);\n if (sig.length !== pad.length) { out = 1; }\n\n i = -1;\n while (++i < len) { out |= sig[i] ^ pad[i]; }\n return out === 0;\n}\n\nfunction ecVerify(sig, hash, pub) {\n var curveId = curves[pub.data.algorithm.curve.join('.')];\n if (!curveId) { throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')); }\n\n var curve = new EC(curveId);\n var pubkey = pub.data.subjectPrivateKey.data;\n\n return curve.verify(hash, sig, pubkey);\n}\n\nfunction dsaVerify(sig, hash, pub) {\n var p = pub.data.p;\n var q = pub.data.q;\n var g = pub.data.g;\n var y = pub.data.pub_key;\n var unpacked = parseKeys.signature.decode(sig, 'der');\n var s = unpacked.s;\n var r = unpacked.r;\n checkValue(s, q);\n checkValue(r, q);\n var montp = BN.mont(p);\n var w = s.invm(q);\n var v = g.toRed(montp)\n .redPow(new BN(hash).mul(w).mod(q))\n .fromRed()\n .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())\n .mod(p)\n .mod(q);\n return v.cmp(r) === 0;\n}\n\nfunction checkValue(b, q) {\n if (b.cmpn(0) <= 0) { throw new Error('invalid sig'); }\n if (b.cmp(q) >= 0) { throw new Error('invalid sig'); }\n}\n\nmodule.exports = verify;\n","'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar createHash = require('create-hash');\nvar stream = require('readable-stream');\nvar inherits = require('inherits');\nvar sign = require('./sign');\nvar verify = require('./verify');\n\nvar algorithms = require('./algorithms.json');\nObject.keys(algorithms).forEach(function (key) {\n algorithms[key].id = Buffer.from(algorithms[key].id, 'hex');\n algorithms[key.toLowerCase()] = algorithms[key];\n});\n\nfunction Sign(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hashType = data.hash;\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Sign, stream.Writable);\n\nSign.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nSign.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nSign.prototype.sign = function signMethod(key, enc) {\n this.end();\n var hash = this._hash.digest();\n var sig = sign(hash, key, this._hashType, this._signType, this._tag);\n\n return enc ? sig.toString(enc) : sig;\n};\n\nfunction Verify(algorithm) {\n stream.Writable.call(this);\n\n var data = algorithms[algorithm];\n if (!data) { throw new Error('Unknown message digest'); }\n\n this._hash = createHash(data.hash);\n this._tag = data.id;\n this._signType = data.sign;\n}\ninherits(Verify, stream.Writable);\n\nVerify.prototype._write = function _write(data, _, done) {\n this._hash.update(data);\n done();\n};\n\nVerify.prototype.update = function update(data, enc) {\n this._hash.update(typeof data === 'string' ? Buffer.from(data, enc) : data);\n\n return this;\n};\n\nVerify.prototype.verify = function verifyMethod(key, sig, enc) {\n var sigBuffer = typeof sig === 'string' ? Buffer.from(sig, enc) : sig;\n\n this.end();\n var hash = this._hash.digest();\n return verify(sigBuffer, hash, key, this._signType, this._tag);\n};\n\nfunction createSign(algorithm) {\n return new Sign(algorithm);\n}\n\nfunction createVerify(algorithm) {\n return new Verify(algorithm);\n}\n\nmodule.exports = {\n Sign: createSign,\n Verify: createVerify,\n createSign: createSign,\n createVerify: createVerify\n};\n","var elliptic = require('elliptic')\nvar BN = require('bn.js')\n\nmodule.exports = function createECDH (curve) {\n return new ECDH(curve)\n}\n\nvar aliases = {\n secp256k1: {\n name: 'secp256k1',\n byteLength: 32\n },\n secp224r1: {\n name: 'p224',\n byteLength: 28\n },\n prime256v1: {\n name: 'p256',\n byteLength: 32\n },\n prime192v1: {\n name: 'p192',\n byteLength: 24\n },\n ed25519: {\n name: 'ed25519',\n byteLength: 32\n },\n secp384r1: {\n name: 'p384',\n byteLength: 48\n },\n secp521r1: {\n name: 'p521',\n byteLength: 66\n }\n}\n\naliases.p224 = aliases.secp224r1\naliases.p256 = aliases.secp256r1 = aliases.prime256v1\naliases.p192 = aliases.secp192r1 = aliases.prime192v1\naliases.p384 = aliases.secp384r1\naliases.p521 = aliases.secp521r1\n\nfunction ECDH (curve) {\n this.curveType = aliases[curve]\n if (!this.curveType) {\n this.curveType = {\n name: curve\n }\n }\n this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap\n this.keys = void 0\n}\n\nECDH.prototype.generateKeys = function (enc, format) {\n this.keys = this.curve.genKeyPair()\n return this.getPublicKey(enc, format)\n}\n\nECDH.prototype.computeSecret = function (other, inenc, enc) {\n inenc = inenc || 'utf8'\n if (!Buffer.isBuffer(other)) {\n other = new Buffer(other, inenc)\n }\n var otherPub = this.curve.keyFromPublic(other).getPublic()\n var out = otherPub.mul(this.keys.getPrivate()).getX()\n return formatReturnValue(out, enc, this.curveType.byteLength)\n}\n\nECDH.prototype.getPublicKey = function (enc, format) {\n var key = this.keys.getPublic(format === 'compressed', true)\n if (format === 'hybrid') {\n if (key[key.length - 1] % 2) {\n key[0] = 7\n } else {\n key[0] = 6\n }\n }\n return formatReturnValue(key, enc)\n}\n\nECDH.prototype.getPrivateKey = function (enc) {\n return formatReturnValue(this.keys.getPrivate(), enc)\n}\n\nECDH.prototype.setPublicKey = function (pub, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(pub)) {\n pub = new Buffer(pub, enc)\n }\n this.keys._importPublic(pub)\n return this\n}\n\nECDH.prototype.setPrivateKey = function (priv, enc) {\n enc = enc || 'utf8'\n if (!Buffer.isBuffer(priv)) {\n priv = new Buffer(priv, enc)\n }\n\n var _priv = new BN(priv)\n _priv = _priv.toString(16)\n this.keys = this.curve.genKeyPair()\n this.keys._importPrivate(_priv)\n return this\n}\n\nfunction formatReturnValue (bn, enc, len) {\n if (!Array.isArray(bn)) {\n bn = bn.toArray()\n }\n var buf = new Buffer(bn)\n if (len && buf.length < len) {\n var zeros = new Buffer(len - buf.length)\n zeros.fill(0)\n buf = Buffer.concat([zeros, buf])\n }\n if (!enc) {\n return buf\n } else {\n return buf.toString(enc)\n }\n}\n","var createHash = require('create-hash')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (seed, len) {\n var t = Buffer.alloc(0)\n var i = 0\n var c\n while (t.length < len) {\n c = i2ops(i++)\n t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])\n }\n return t.slice(0, len)\n}\n\nfunction i2ops (c) {\n var out = Buffer.allocUnsafe(4)\n out.writeUInt32BE(c, 0)\n return out\n}\n","module.exports = function xor (a, b) {\n var len = a.length\n var i = -1\n while (++i < len) {\n a[i] ^= b[i]\n }\n return a\n}\n","var BN = require('bn.js')\nvar Buffer = require('safe-buffer').Buffer\n\nfunction withPublic (paddedMsg, key) {\n return Buffer.from(paddedMsg\n .toRed(BN.mont(key.modulus))\n .redPow(new BN(key.publicExponent))\n .fromRed()\n .toArray())\n}\n\nmodule.exports = withPublic\n","var parseKeys = require('parse-asn1')\nvar randomBytes = require('randombytes')\nvar createHash = require('create-hash')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar withPublic = require('./withPublic')\nvar crt = require('browserify-rsa')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function publicEncrypt (publicKey, msg, reverse) {\n var padding\n if (publicKey.padding) {\n padding = publicKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n var key = parseKeys(publicKey)\n var paddedMsg\n if (padding === 4) {\n paddedMsg = oaep(key, msg)\n } else if (padding === 1) {\n paddedMsg = pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n paddedMsg = new BN(msg)\n if (paddedMsg.cmp(key.modulus) >= 0) {\n throw new Error('data too long for modulus')\n }\n } else {\n throw new Error('unknown padding')\n }\n if (reverse) {\n return crt(paddedMsg, key)\n } else {\n return withPublic(paddedMsg, key)\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var mLen = msg.length\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n var hLen2 = 2 * hLen\n if (mLen > k - hLen2 - 2) {\n throw new Error('message too long')\n }\n var ps = Buffer.alloc(k - mLen - hLen2 - 2)\n var dblen = k - hLen - 1\n var seed = randomBytes(hLen)\n var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))\n var maskedSeed = xor(seed, mgf(maskedDb, hLen))\n return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))\n}\nfunction pkcs1 (key, msg, reverse) {\n var mLen = msg.length\n var k = key.modulus.byteLength()\n if (mLen > k - 11) {\n throw new Error('message too long')\n }\n var ps\n if (reverse) {\n ps = Buffer.alloc(k - mLen - 3, 0xff)\n } else {\n ps = nonZero(k - mLen - 3)\n }\n return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))\n}\nfunction nonZero (len) {\n var out = Buffer.allocUnsafe(len)\n var i = 0\n var cache = randomBytes(len * 2)\n var cur = 0\n var num\n while (i < len) {\n if (cur === cache.length) {\n cache = randomBytes(len * 2)\n cur = 0\n }\n num = cache[cur++]\n if (num) {\n out[i++] = num\n }\n }\n return out\n}\n","var parseKeys = require('parse-asn1')\nvar mgf = require('./mgf')\nvar xor = require('./xor')\nvar BN = require('bn.js')\nvar crt = require('browserify-rsa')\nvar createHash = require('create-hash')\nvar withPublic = require('./withPublic')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function privateDecrypt (privateKey, enc, reverse) {\n var padding\n if (privateKey.padding) {\n padding = privateKey.padding\n } else if (reverse) {\n padding = 1\n } else {\n padding = 4\n }\n\n var key = parseKeys(privateKey)\n var k = key.modulus.byteLength()\n if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {\n throw new Error('decryption error')\n }\n var msg\n if (reverse) {\n msg = withPublic(new BN(enc), key)\n } else {\n msg = crt(enc, key)\n }\n var zBuffer = Buffer.alloc(k - msg.length)\n msg = Buffer.concat([zBuffer, msg], k)\n if (padding === 4) {\n return oaep(key, msg)\n } else if (padding === 1) {\n return pkcs1(key, msg, reverse)\n } else if (padding === 3) {\n return msg\n } else {\n throw new Error('unknown padding')\n }\n}\n\nfunction oaep (key, msg) {\n var k = key.modulus.byteLength()\n var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()\n var hLen = iHash.length\n if (msg[0] !== 0) {\n throw new Error('decryption error')\n }\n var maskedSeed = msg.slice(1, hLen + 1)\n var maskedDb = msg.slice(hLen + 1)\n var seed = xor(maskedSeed, mgf(maskedDb, hLen))\n var db = xor(maskedDb, mgf(seed, k - hLen - 1))\n if (compare(iHash, db.slice(0, hLen))) {\n throw new Error('decryption error')\n }\n var i = hLen\n while (db[i] === 0) {\n i++\n }\n if (db[i++] !== 1) {\n throw new Error('decryption error')\n }\n return db.slice(i)\n}\n\nfunction pkcs1 (key, msg, reverse) {\n var p1 = msg.slice(0, 2)\n var i = 2\n var status = 0\n while (msg[i++] !== 0) {\n if (i >= msg.length) {\n status++\n break\n }\n }\n var ps = msg.slice(2, i - 1)\n\n if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {\n status++\n }\n if (ps.length < 8) {\n status++\n }\n if (status) {\n throw new Error('decryption error')\n }\n return msg.slice(i)\n}\nfunction compare (a, b) {\n a = Buffer.from(a)\n b = Buffer.from(b)\n var dif = 0\n var len = a.length\n if (a.length !== b.length) {\n dif++\n len = Math.min(a.length, b.length)\n }\n var i = -1\n while (++i < len) {\n dif += (a[i] ^ b[i])\n }\n return dif\n}\n","exports.publicEncrypt = require('./publicEncrypt')\nexports.privateDecrypt = require('./privateDecrypt')\n\nexports.privateEncrypt = function privateEncrypt (key, buf) {\n return exports.publicEncrypt(key, buf, true)\n}\n\nexports.publicDecrypt = function publicDecrypt (key, buf) {\n return exports.privateDecrypt(key, buf, true)\n}\n","'use strict'\n\nfunction oldBrowser () {\n throw new Error('secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11')\n}\nvar safeBuffer = require('safe-buffer')\nvar randombytes = require('randombytes')\nvar Buffer = safeBuffer.Buffer\nvar kBufferMaxLength = safeBuffer.kMaxLength\nvar crypto = global.crypto || global.msCrypto\nvar kMaxUint32 = Math.pow(2, 32) - 1\nfunction assertOffset (offset, length) {\n if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare\n throw new TypeError('offset must be a number')\n }\n\n if (offset > kMaxUint32 || offset < 0) {\n throw new TypeError('offset must be a uint32')\n }\n\n if (offset > kBufferMaxLength || offset > length) {\n throw new RangeError('offset out of range')\n }\n}\n\nfunction assertSize (size, offset, length) {\n if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare\n throw new TypeError('size must be a number')\n }\n\n if (size > kMaxUint32 || size < 0) {\n throw new TypeError('size must be a uint32')\n }\n\n if (size + offset > length || size > kBufferMaxLength) {\n throw new RangeError('buffer too small')\n }\n}\nif ((crypto && crypto.getRandomValues) || !process.browser) {\n exports.randomFill = randomFill\n exports.randomFillSync = randomFillSync\n} else {\n exports.randomFill = oldBrowser\n exports.randomFillSync = oldBrowser\n}\nfunction randomFill (buf, offset, size, cb) {\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n if (typeof offset === 'function') {\n cb = offset\n offset = 0\n size = buf.length\n } else if (typeof size === 'function') {\n cb = size\n size = buf.length - offset\n } else if (typeof cb !== 'function') {\n throw new TypeError('\"cb\" argument must be a function')\n }\n assertOffset(offset, buf.length)\n assertSize(size, offset, buf.length)\n return actualFill(buf, offset, size, cb)\n}\n\nfunction actualFill (buf, offset, size, cb) {\n if (process.browser) {\n var ourBuf = buf.buffer\n var uint = new Uint8Array(ourBuf, offset, size)\n crypto.getRandomValues(uint)\n if (cb) {\n process.nextTick(function () {\n cb(null, buf)\n })\n return\n }\n return buf\n }\n if (cb) {\n randombytes(size, function (err, bytes) {\n if (err) {\n return cb(err)\n }\n bytes.copy(buf, offset)\n cb(null, buf)\n })\n return\n }\n var bytes = randombytes(size)\n bytes.copy(buf, offset)\n return buf\n}\nfunction randomFillSync (buf, offset, size) {\n if (typeof offset === 'undefined') {\n offset = 0\n }\n if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {\n throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array')\n }\n\n assertOffset(offset, buf.length)\n\n if (size === undefined) size = buf.length - offset\n\n assertSize(size, offset, buf.length)\n\n return actualFill(buf, offset, size)\n}\n","'use strict'\n\nexports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')\nexports.createHash = exports.Hash = require('create-hash')\nexports.createHmac = exports.Hmac = require('create-hmac')\n\nvar algos = require('browserify-sign/algos')\nvar algoKeys = Object.keys(algos)\nvar hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)\nexports.getHashes = function () {\n return hashes\n}\n\nvar p = require('pbkdf2')\nexports.pbkdf2 = p.pbkdf2\nexports.pbkdf2Sync = p.pbkdf2Sync\n\nvar aes = require('browserify-cipher')\n\nexports.Cipher = aes.Cipher\nexports.createCipher = aes.createCipher\nexports.Cipheriv = aes.Cipheriv\nexports.createCipheriv = aes.createCipheriv\nexports.Decipher = aes.Decipher\nexports.createDecipher = aes.createDecipher\nexports.Decipheriv = aes.Decipheriv\nexports.createDecipheriv = aes.createDecipheriv\nexports.getCiphers = aes.getCiphers\nexports.listCiphers = aes.listCiphers\n\nvar dh = require('diffie-hellman')\n\nexports.DiffieHellmanGroup = dh.DiffieHellmanGroup\nexports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup\nexports.getDiffieHellman = dh.getDiffieHellman\nexports.createDiffieHellman = dh.createDiffieHellman\nexports.DiffieHellman = dh.DiffieHellman\n\nvar sign = require('browserify-sign')\n\nexports.createSign = sign.createSign\nexports.Sign = sign.Sign\nexports.createVerify = sign.createVerify\nexports.Verify = sign.Verify\n\nexports.createECDH = require('create-ecdh')\n\nvar publicEncrypt = require('public-encrypt')\n\nexports.publicEncrypt = publicEncrypt.publicEncrypt\nexports.privateEncrypt = publicEncrypt.privateEncrypt\nexports.publicDecrypt = publicEncrypt.publicDecrypt\nexports.privateDecrypt = publicEncrypt.privateDecrypt\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\n// ;[\n// 'createCredentials'\n// ].forEach(function (name) {\n// exports[name] = function () {\n// throw new Error([\n// 'sorry, ' + name + ' is not implemented yet',\n// 'we accept pull requests',\n// 'https://github.com/crypto-browserify/crypto-browserify'\n// ].join('\\n'))\n// }\n// })\n\nvar rf = require('randomfill')\n\nexports.randomFill = rf.randomFill\nexports.randomFillSync = rf.randomFillSync\n\nexports.createCredentials = function () {\n throw new Error([\n 'sorry, createCredentials is not implemented yet',\n 'we accept pull requests',\n 'https://github.com/crypto-browserify/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.constants = {\n 'DH_CHECK_P_NOT_SAFE_PRIME': 2,\n 'DH_CHECK_P_NOT_PRIME': 1,\n 'DH_UNABLE_TO_CHECK_GENERATOR': 4,\n 'DH_NOT_SUITABLE_GENERATOR': 8,\n 'NPN_ENABLED': 1,\n 'ALPN_ENABLED': 1,\n 'RSA_PKCS1_PADDING': 1,\n 'RSA_SSLV23_PADDING': 2,\n 'RSA_NO_PADDING': 3,\n 'RSA_PKCS1_OAEP_PADDING': 4,\n 'RSA_X931_PADDING': 5,\n 'RSA_PKCS1_PSS_PADDING': 6,\n 'POINT_CONVERSION_COMPRESSED': 2,\n 'POINT_CONVERSION_UNCOMPRESSED': 4,\n 'POINT_CONVERSION_HYBRID': 6\n}\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeRandomSource = void 0;\nconst wipe_1 = require(\"@stablelib/wipe\");\nclass NodeRandomSource {\n constructor() {\n this.isAvailable = false;\n this.isInstantiated = false;\n if (typeof require !== \"undefined\") {\n const nodeCrypto = require(\"crypto\");\n if (nodeCrypto && nodeCrypto.randomBytes) {\n this._crypto = nodeCrypto;\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n }\n randomBytes(length) {\n if (!this.isAvailable || !this._crypto) {\n throw new Error(\"Node.js random byte generator is not available.\");\n }\n // Get random bytes (result is Buffer).\n let buffer = this._crypto.randomBytes(length);\n // Make sure we got the length that we requested.\n if (buffer.length !== length) {\n throw new Error(\"NodeRandomSource: got fewer bytes than requested\");\n }\n // Allocate output array.\n const out = new Uint8Array(length);\n // Copy bytes from buffer to output.\n for (let i = 0; i < out.length; i++) {\n out[i] = buffer[i];\n }\n // Cleanup.\n (0, wipe_1.wipe)(buffer);\n return out;\n }\n}\nexports.NodeRandomSource = NodeRandomSource;\n//# sourceMappingURL=node.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SystemRandomSource = void 0;\nconst browser_1 = require(\"./browser\");\nconst node_1 = require(\"./node\");\nclass SystemRandomSource {\n constructor() {\n this.isAvailable = false;\n this.name = \"\";\n // Try browser.\n this._source = new browser_1.BrowserRandomSource();\n if (this._source.isAvailable) {\n this.isAvailable = true;\n this.name = \"Browser\";\n return;\n }\n // If no browser source, try Node.\n this._source = new node_1.NodeRandomSource();\n if (this._source.isAvailable) {\n this.isAvailable = true;\n this.name = \"Node\";\n return;\n }\n // No sources, we're out of options.\n }\n randomBytes(length) {\n if (!this.isAvailable) {\n throw new Error(\"System random byte generator is not available.\");\n }\n return this._source.randomBytes(length);\n }\n}\nexports.SystemRandomSource = SystemRandomSource;\n//# sourceMappingURL=system.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomStringForEntropy = exports.randomString = exports.randomUint32 = exports.randomBytes = exports.defaultRandomSource = void 0;\nconst system_1 = require(\"./source/system\");\nconst binary_1 = require(\"@stablelib/binary\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.defaultRandomSource = new system_1.SystemRandomSource();\nfunction randomBytes(length, prng = exports.defaultRandomSource) {\n return prng.randomBytes(length);\n}\nexports.randomBytes = randomBytes;\n/**\n * Returns a uniformly random unsigned 32-bit integer.\n */\nfunction randomUint32(prng = exports.defaultRandomSource) {\n // Generate 4-byte random buffer.\n const buf = randomBytes(4, prng);\n // Convert bytes from buffer into a 32-bit integer.\n // It's not important which byte order to use, since\n // the result is random.\n const result = (0, binary_1.readUint32LE)(buf);\n // Clean the buffer.\n (0, wipe_1.wipe)(buf);\n return result;\n}\nexports.randomUint32 = randomUint32;\n/** 62 alphanumeric characters for default charset of randomString() */\nconst ALPHANUMERIC = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n/**\n * Returns a uniform random string of the given length\n * with characters from the given charset.\n *\n * Charset must not have more than 256 characters.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomString(length, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {\n if (charset.length < 2) {\n throw new Error(\"randomString charset is too short\");\n }\n if (charset.length > 256) {\n throw new Error(\"randomString charset is too long\");\n }\n let out = '';\n const charsLen = charset.length;\n const maxByte = 256 - (256 % charsLen);\n while (length > 0) {\n const buf = randomBytes(Math.ceil(length * 256 / maxByte), prng);\n for (let i = 0; i < buf.length && length > 0; i++) {\n const randomByte = buf[i];\n if (randomByte < maxByte) {\n out += charset.charAt(randomByte % charsLen);\n length--;\n }\n }\n (0, wipe_1.wipe)(buf);\n }\n return out;\n}\nexports.randomString = randomString;\n/**\n * Returns uniform random string containing at least the given\n * number of bits of entropy.\n *\n * For example, randomStringForEntropy(128) will return a 22-character\n * alphanumeric string, while randomStringForEntropy(128, \"0123456789\")\n * will return a 39-character numeric string, both will contain at\n * least 128 bits of entropy.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomStringForEntropy(bits, charset = ALPHANUMERIC, prng = exports.defaultRandomSource) {\n const length = Math.ceil(bits / (Math.log(charset.length) / Math.LN2));\n return randomString(length, charset, prng);\n}\nexports.randomStringForEntropy = randomStringForEntropy;\n//# sourceMappingURL=random.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 32;\nexports.BLOCK_SIZE = 64;\n/**\n * SHA2-256 cryptographic hash algorithm.\n */\nvar SHA256 = /** @class */ (function () {\n function SHA256() {\n /** Length of hash output */\n this.digestLength = exports.DIGEST_LENGTH;\n /** Block size */\n this.blockSize = exports.BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this._state = new Int32Array(8); // hash state\n this._temp = new Int32Array(64); // temporary state\n this._buffer = new Uint8Array(128); // buffer for data to hash\n this._bufferLength = 0; // number of bytes in buffer\n this._bytesHashed = 0; // number of total bytes hashed\n this._finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n SHA256.prototype._initState = function () {\n this._state[0] = 0x6a09e667;\n this._state[1] = 0xbb67ae85;\n this._state[2] = 0x3c6ef372;\n this._state[3] = 0xa54ff53a;\n this._state[4] = 0x510e527f;\n this._state[5] = 0x9b05688c;\n this._state[6] = 0x1f83d9ab;\n this._state[7] = 0x5be0cd19;\n };\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n SHA256.prototype.reset = function () {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n };\n /**\n * Cleans internal buffers and resets hash state.\n */\n SHA256.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._temp);\n this.reset();\n };\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n SHA256.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this._finished) {\n throw new Error(\"SHA256: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < this.blockSize && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._temp, this._state, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._temp, this._state, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n SHA256.prototype.finish = function (out) {\n if (!this._finished) {\n var bytesHashed = this._bytesHashed;\n var left = this._bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 64 < 56) ? 64 : 128;\n this._buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);\n binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._temp, this._state, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (var i = 0; i < this.digestLength / 4; i++) {\n binary_1.writeUint32BE(this._state[i], out, i * 4);\n }\n return this;\n };\n /**\n * Returns the final hash digest.\n */\n SHA256.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization.\n * Returns hash state to be used with restoreState().\n * Only chain value is saved, not buffers or other\n * state variables.\n */\n SHA256.prototype.saveState = function () {\n if (this._finished) {\n throw new Error(\"SHA256: cannot save finished state\");\n }\n return {\n state: new Int32Array(this._state),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization.\n * Restores state saved by saveState() and sets bytesHashed\n * to the given value.\n */\n SHA256.prototype.restoreState = function (savedState) {\n this._state.set(savedState.state);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n };\n /**\n * Cleans state returned by saveState().\n */\n SHA256.prototype.cleanSavedState = function (savedState) {\n wipe_1.wipe(savedState.state);\n if (savedState.buffer) {\n wipe_1.wipe(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n };\n return SHA256;\n}());\nexports.SHA256 = SHA256;\n// Constants\nvar K = new Int32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\nfunction hashBlocks(w, v, p, pos, len) {\n while (len >= 64) {\n var a = v[0];\n var b = v[1];\n var c = v[2];\n var d = v[3];\n var e = v[4];\n var f = v[5];\n var g = v[6];\n var h = v[7];\n for (var i = 0; i < 16; i++) {\n var j = pos + i * 4;\n w[i] = binary_1.readUint32BE(p, j);\n }\n for (var i = 16; i < 64; i++) {\n var u = w[i - 2];\n var t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);\n u = w[i - 15];\n var t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);\n w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);\n }\n for (var i = 0; i < 64; i++) {\n var t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^\n (e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n var t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^\n (a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n v[0] += a;\n v[1] += b;\n v[2] += c;\n v[3] += d;\n v[4] += e;\n v[5] += f;\n v[6] += g;\n v[7] += h;\n pos += 64;\n len -= 64;\n }\n return pos;\n}\nfunction hash(data) {\n var h = new SHA256();\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n//# sourceMappingURL=sha256.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sharedKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.scalarMultBase = exports.scalarMult = exports.SHARED_KEY_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = void 0;\n/**\n * Package x25519 implements X25519 key agreement.\n */\nconst random_1 = require(\"@stablelib/random\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.PUBLIC_KEY_LENGTH = 32;\nexports.SECRET_KEY_LENGTH = 32;\nexports.SHARED_KEY_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst _121665 = gf([0xdb41, 1]);\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, inp) {\n const c = gf();\n for (let i = 0; i < 16; i++) {\n c[i] = inp[i];\n }\n for (let i = 253; i >= 0; i--) {\n square(c, c);\n if (i !== 2 && i !== 4) {\n mul(c, c, inp);\n }\n }\n for (let i = 0; i < 16; i++) {\n o[i] = c[i];\n }\n}\nfunction scalarMult(n, p) {\n const z = new Uint8Array(32);\n const x = new Float64Array(80);\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf();\n for (let i = 0; i < 31; i++) {\n z[i] = n[i];\n }\n z[31] = (n[31] & 127) | 64;\n z[0] &= 248;\n unpack25519(x, p);\n for (let i = 0; i < 16; i++) {\n b[i] = x[i];\n }\n a[0] = d[0] = 1;\n for (let i = 254; i >= 0; --i) {\n const r = (z[i >>> 3] >>> (i & 7)) & 1;\n sel25519(a, b, r);\n sel25519(c, d, r);\n add(e, a, c);\n sub(a, a, c);\n add(c, b, d);\n sub(b, b, d);\n square(d, e);\n square(f, a);\n mul(a, c, a);\n mul(c, b, e);\n add(e, a, c);\n sub(a, a, c);\n square(b, a);\n sub(c, d, f);\n mul(a, c, _121665);\n add(a, a, d);\n mul(c, c, a);\n mul(a, d, f);\n mul(d, b, x);\n square(b, e);\n sel25519(a, b, r);\n sel25519(c, d, r);\n }\n for (let i = 0; i < 16; i++) {\n x[i + 16] = a[i];\n x[i + 32] = c[i];\n x[i + 48] = b[i];\n x[i + 64] = d[i];\n }\n const x32 = x.subarray(32);\n const x16 = x.subarray(16);\n inv25519(x32, x32);\n mul(x16, x16, x32);\n const q = new Uint8Array(32);\n pack25519(q, x16);\n return q;\n}\nexports.scalarMult = scalarMult;\nfunction scalarMultBase(n) {\n return scalarMult(n, _9);\n}\nexports.scalarMultBase = scalarMultBase;\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== exports.SECRET_KEY_LENGTH) {\n throw new Error(`x25519: seed must be ${exports.SECRET_KEY_LENGTH} bytes`);\n }\n const secretKey = new Uint8Array(seed);\n const publicKey = scalarMultBase(secretKey);\n return {\n publicKey,\n secretKey\n };\n}\nexports.generateKeyPairFromSeed = generateKeyPairFromSeed;\nfunction generateKeyPair(prng) {\n const seed = (0, random_1.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0, wipe_1.wipe)(seed);\n return result;\n}\nexports.generateKeyPair = generateKeyPair;\n/**\n * Returns a shared key between our secret key and a peer's public key.\n *\n * Throws an error if the given keys are of wrong length.\n *\n * If rejectZero is true throws if the calculated shared key is all-zero.\n * From RFC 7748:\n *\n * > Protocol designers using Diffie-Hellman over the curves defined in\n * > this document must not assume \"contributory behavior\". Specially,\n * > contributory behavior means that both parties' private keys\n * > contribute to the resulting shared key. Since curve25519 and\n * > curve448 have cofactors of 8 and 4 (respectively), an input point of\n * > small order will eliminate any contribution from the other party's\n * > private key. This situation can be detected by checking for the all-\n * > zero output, which implementations MAY do, as specified in Section 6.\n * > However, a large number of existing implementations do not do this.\n *\n * IMPORTANT: the returned key is a raw result of scalar multiplication.\n * To use it as a key material, hash it with a cryptographic hash function.\n */\nfunction sharedKey(mySecretKey, theirPublicKey, rejectZero = false) {\n if (mySecretKey.length !== exports.PUBLIC_KEY_LENGTH) {\n throw new Error(\"X25519: incorrect secret key length\");\n }\n if (theirPublicKey.length !== exports.PUBLIC_KEY_LENGTH) {\n throw new Error(\"X25519: incorrect public key length\");\n }\n const result = scalarMult(mySecretKey, theirPublicKey);\n if (rejectZero) {\n let zeros = 0;\n for (let i = 0; i < result.length; i++) {\n zeros |= result[i];\n }\n if (zeros === 0) {\n throw new Error(\"X25519: invalid shared key\");\n }\n }\n return result;\n}\nexports.sharedKey = sharedKey;\n//# sourceMappingURL=x25519.js.map","export function asUint8Array(buf) {\n if (globalThis.Buffer != null) {\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n return buf;\n}","import { asUint8Array } from './util/as-uint8array.js';\nexport function alloc(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.alloc != null) {\n return asUint8Array(globalThis.Buffer.alloc(size));\n }\n return new Uint8Array(size);\n}\nexport function allocUnsafe(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {\n return asUint8Array(globalThis.Buffer.allocUnsafe(size));\n }\n return new Uint8Array(size);\n}","import { allocUnsafe } from './alloc.js';\nimport { asUint8Array } from './util/as-uint8array.js';\nexport function concat(arrays, length) {\n if (!length) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = allocUnsafe(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return asUint8Array(output);\n}","function base(ALPHABET, name) {\n if (ALPHABET.length >= 255) {\n throw new TypeError('Alphabet too long');\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + ' is ambiguous');\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (source instanceof Uint8Array);\n else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source);\n }\n if (!(source instanceof Uint8Array)) {\n throw new TypeError('Expected Uint8Array');\n }\n if (source.length === 0) {\n return '';\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i = 0;\n for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== 'string') {\n throw new TypeError('Expected String');\n }\n if (source.length === 0) {\n return new Uint8Array();\n }\n var psz = 0;\n if (source[psz] === ' ') {\n return;\n }\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (source[psz]) {\n var carry = BASE_MAP[source.charCodeAt(psz)];\n if (carry === 255) {\n return;\n }\n var i = 0;\n for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n psz++;\n }\n if (source[psz] === ' ') {\n return;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = new Uint8Array(zeroes + (size - it4));\n var j = zeroes;\n while (it4 !== size) {\n vch[j++] = b256[it4++];\n }\n return vch;\n }\n function decode(string) {\n var buffer = decodeUnsafe(string);\n if (buffer) {\n return buffer;\n }\n throw new Error(`Non-${ name } character`);\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n };\n}\nvar src = base;\nvar _brrp__multiformats_scope_baseX = src;\nexport default _brrp__multiformats_scope_baseX;","const empty = new Uint8Array(0);\nconst toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '');\nconst fromHex = hex => {\n const hexes = hex.match(/../g);\n return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty;\n};\nconst equals = (aa, bb) => {\n if (aa === bb)\n return true;\n if (aa.byteLength !== bb.byteLength) {\n return false;\n }\n for (let ii = 0; ii < aa.byteLength; ii++) {\n if (aa[ii] !== bb[ii]) {\n return false;\n }\n }\n return true;\n};\nconst coerce = o => {\n if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array')\n return o;\n if (o instanceof ArrayBuffer)\n return new Uint8Array(o);\n if (ArrayBuffer.isView(o)) {\n return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);\n }\n throw new Error('Unknown type, must be binary type');\n};\nconst isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o);\nconst fromString = str => new TextEncoder().encode(str);\nconst toString = b => new TextDecoder().decode(b);\nexport {\n equals,\n coerce,\n isBinary,\n fromHex,\n toHex,\n fromString,\n toString,\n empty\n};","import basex from '../../vendor/base-x.js';\nimport { coerce } from '../bytes.js';\nclass Encoder {\n constructor(name, prefix, baseEncode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n }\n encode(bytes) {\n if (bytes instanceof Uint8Array) {\n return `${ this.prefix }${ this.baseEncode(bytes) }`;\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}\nclass Decoder {\n constructor(name, prefix, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n if (prefix.codePointAt(0) === undefined) {\n throw new Error('Invalid prefix character');\n }\n this.prefixCodePoint = prefix.codePointAt(0);\n this.baseDecode = baseDecode;\n }\n decode(text) {\n if (typeof text === 'string') {\n if (text.codePointAt(0) !== this.prefixCodePoint) {\n throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`);\n }\n return this.baseDecode(text.slice(this.prefix.length));\n } else {\n throw Error('Can only multibase decode strings');\n }\n }\n or(decoder) {\n return or(this, decoder);\n }\n}\nclass ComposedDecoder {\n constructor(decoders) {\n this.decoders = decoders;\n }\n or(decoder) {\n return or(this, decoder);\n }\n decode(input) {\n const prefix = input[0];\n const decoder = this.decoders[prefix];\n if (decoder) {\n return decoder.decode(input);\n } else {\n throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`);\n }\n }\n}\nexport const or = (left, right) => new ComposedDecoder({\n ...left.decoders || { [left.prefix]: left },\n ...right.decoders || { [right.prefix]: right }\n});\nexport class Codec {\n constructor(name, prefix, baseEncode, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n this.baseDecode = baseDecode;\n this.encoder = new Encoder(name, prefix, baseEncode);\n this.decoder = new Decoder(name, prefix, baseDecode);\n }\n encode(input) {\n return this.encoder.encode(input);\n }\n decode(input) {\n return this.decoder.decode(input);\n }\n}\nexport const from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode);\nexport const baseX = ({prefix, name, alphabet}) => {\n const {encode, decode} = basex(alphabet, name);\n return from({\n prefix,\n name,\n encode,\n decode: text => coerce(decode(text))\n });\n};\nconst decode = (string, alphabet, bitsPerChar, name) => {\n const codes = {};\n for (let i = 0; i < alphabet.length; ++i) {\n codes[alphabet[i]] = i;\n }\n let end = string.length;\n while (string[end - 1] === '=') {\n --end;\n }\n const out = new Uint8Array(end * bitsPerChar / 8 | 0);\n let bits = 0;\n let buffer = 0;\n let written = 0;\n for (let i = 0; i < end; ++i) {\n const value = codes[string[i]];\n if (value === undefined) {\n throw new SyntaxError(`Non-${ name } character`);\n }\n buffer = buffer << bitsPerChar | value;\n bits += bitsPerChar;\n if (bits >= 8) {\n bits -= 8;\n out[written++] = 255 & buffer >> bits;\n }\n }\n if (bits >= bitsPerChar || 255 & buffer << 8 - bits) {\n throw new SyntaxError('Unexpected end of data');\n }\n return out;\n};\nconst encode = (data, alphabet, bitsPerChar) => {\n const pad = alphabet[alphabet.length - 1] === '=';\n const mask = (1 << bitsPerChar) - 1;\n let out = '';\n let bits = 0;\n let buffer = 0;\n for (let i = 0; i < data.length; ++i) {\n buffer = buffer << 8 | data[i];\n bits += 8;\n while (bits > bitsPerChar) {\n bits -= bitsPerChar;\n out += alphabet[mask & buffer >> bits];\n }\n }\n if (bits) {\n out += alphabet[mask & buffer << bitsPerChar - bits];\n }\n if (pad) {\n while (out.length * bitsPerChar & 7) {\n out += '=';\n }\n }\n return out;\n};\nexport const rfc4648 = ({name, prefix, bitsPerChar, alphabet}) => {\n return from({\n prefix,\n name,\n encode(input) {\n return encode(input, alphabet, bitsPerChar);\n },\n decode(input) {\n return decode(input, alphabet, bitsPerChar, name);\n }\n });\n};","import { from } from './base.js';\nimport {\n fromString,\n toString\n} from '../bytes.js';\nexport const identity = from({\n prefix: '\\0',\n name: 'identity',\n encode: buf => toString(buf),\n decode: str => fromString(str)\n});","import { rfc4648 } from './base.js';\nexport const base2 = rfc4648({\n prefix: '0',\n name: 'base2',\n alphabet: '01',\n bitsPerChar: 1\n});","import { rfc4648 } from './base.js';\nexport const base8 = rfc4648({\n prefix: '7',\n name: 'base8',\n alphabet: '01234567',\n bitsPerChar: 3\n});","import { baseX } from './base.js';\nexport const base10 = baseX({\n prefix: '9',\n name: 'base10',\n alphabet: '0123456789'\n});","import { rfc4648 } from './base.js';\nexport const base16 = rfc4648({\n prefix: 'f',\n name: 'base16',\n alphabet: '0123456789abcdef',\n bitsPerChar: 4\n});\nexport const base16upper = rfc4648({\n prefix: 'F',\n name: 'base16upper',\n alphabet: '0123456789ABCDEF',\n bitsPerChar: 4\n});","import { rfc4648 } from './base.js';\nexport const base32 = rfc4648({\n prefix: 'b',\n name: 'base32',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567',\n bitsPerChar: 5\n});\nexport const base32upper = rfc4648({\n prefix: 'B',\n name: 'base32upper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',\n bitsPerChar: 5\n});\nexport const base32pad = rfc4648({\n prefix: 'c',\n name: 'base32pad',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',\n bitsPerChar: 5\n});\nexport const base32padupper = rfc4648({\n prefix: 'C',\n name: 'base32padupper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',\n bitsPerChar: 5\n});\nexport const base32hex = rfc4648({\n prefix: 'v',\n name: 'base32hex',\n alphabet: '0123456789abcdefghijklmnopqrstuv',\n bitsPerChar: 5\n});\nexport const base32hexupper = rfc4648({\n prefix: 'V',\n name: 'base32hexupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',\n bitsPerChar: 5\n});\nexport const base32hexpad = rfc4648({\n prefix: 't',\n name: 'base32hexpad',\n alphabet: '0123456789abcdefghijklmnopqrstuv=',\n bitsPerChar: 5\n});\nexport const base32hexpadupper = rfc4648({\n prefix: 'T',\n name: 'base32hexpadupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',\n bitsPerChar: 5\n});\nexport const base32z = rfc4648({\n prefix: 'h',\n name: 'base32z',\n alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',\n bitsPerChar: 5\n});","import { baseX } from './base.js';\nexport const base36 = baseX({\n prefix: 'k',\n name: 'base36',\n alphabet: '0123456789abcdefghijklmnopqrstuvwxyz'\n});\nexport const base36upper = baseX({\n prefix: 'K',\n name: 'base36upper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n});","import { baseX } from './base.js';\nexport const base58btc = baseX({\n name: 'base58btc',\n prefix: 'z',\n alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n});\nexport const base58flickr = baseX({\n name: 'base58flickr',\n prefix: 'Z',\n alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'\n});","import { rfc4648 } from './base.js';\nexport const base64 = rfc4648({\n prefix: 'm',\n name: 'base64',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n bitsPerChar: 6\n});\nexport const base64pad = rfc4648({\n prefix: 'M',\n name: 'base64pad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n bitsPerChar: 6\n});\nexport const base64url = rfc4648({\n prefix: 'u',\n name: 'base64url',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n bitsPerChar: 6\n});\nexport const base64urlpad = rfc4648({\n prefix: 'U',\n name: 'base64urlpad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',\n bitsPerChar: 6\n});","import { from } from './base.js';\nconst alphabet = Array.from('\\uD83D\\uDE80\\uD83E\\uDE90\\u2604\\uD83D\\uDEF0\\uD83C\\uDF0C\\uD83C\\uDF11\\uD83C\\uDF12\\uD83C\\uDF13\\uD83C\\uDF14\\uD83C\\uDF15\\uD83C\\uDF16\\uD83C\\uDF17\\uD83C\\uDF18\\uD83C\\uDF0D\\uD83C\\uDF0F\\uD83C\\uDF0E\\uD83D\\uDC09\\u2600\\uD83D\\uDCBB\\uD83D\\uDDA5\\uD83D\\uDCBE\\uD83D\\uDCBF\\uD83D\\uDE02\\u2764\\uD83D\\uDE0D\\uD83E\\uDD23\\uD83D\\uDE0A\\uD83D\\uDE4F\\uD83D\\uDC95\\uD83D\\uDE2D\\uD83D\\uDE18\\uD83D\\uDC4D\\uD83D\\uDE05\\uD83D\\uDC4F\\uD83D\\uDE01\\uD83D\\uDD25\\uD83E\\uDD70\\uD83D\\uDC94\\uD83D\\uDC96\\uD83D\\uDC99\\uD83D\\uDE22\\uD83E\\uDD14\\uD83D\\uDE06\\uD83D\\uDE44\\uD83D\\uDCAA\\uD83D\\uDE09\\u263A\\uD83D\\uDC4C\\uD83E\\uDD17\\uD83D\\uDC9C\\uD83D\\uDE14\\uD83D\\uDE0E\\uD83D\\uDE07\\uD83C\\uDF39\\uD83E\\uDD26\\uD83C\\uDF89\\uD83D\\uDC9E\\u270C\\u2728\\uD83E\\uDD37\\uD83D\\uDE31\\uD83D\\uDE0C\\uD83C\\uDF38\\uD83D\\uDE4C\\uD83D\\uDE0B\\uD83D\\uDC97\\uD83D\\uDC9A\\uD83D\\uDE0F\\uD83D\\uDC9B\\uD83D\\uDE42\\uD83D\\uDC93\\uD83E\\uDD29\\uD83D\\uDE04\\uD83D\\uDE00\\uD83D\\uDDA4\\uD83D\\uDE03\\uD83D\\uDCAF\\uD83D\\uDE48\\uD83D\\uDC47\\uD83C\\uDFB6\\uD83D\\uDE12\\uD83E\\uDD2D\\u2763\\uD83D\\uDE1C\\uD83D\\uDC8B\\uD83D\\uDC40\\uD83D\\uDE2A\\uD83D\\uDE11\\uD83D\\uDCA5\\uD83D\\uDE4B\\uD83D\\uDE1E\\uD83D\\uDE29\\uD83D\\uDE21\\uD83E\\uDD2A\\uD83D\\uDC4A\\uD83E\\uDD73\\uD83D\\uDE25\\uD83E\\uDD24\\uD83D\\uDC49\\uD83D\\uDC83\\uD83D\\uDE33\\u270B\\uD83D\\uDE1A\\uD83D\\uDE1D\\uD83D\\uDE34\\uD83C\\uDF1F\\uD83D\\uDE2C\\uD83D\\uDE43\\uD83C\\uDF40\\uD83C\\uDF37\\uD83D\\uDE3B\\uD83D\\uDE13\\u2B50\\u2705\\uD83E\\uDD7A\\uD83C\\uDF08\\uD83D\\uDE08\\uD83E\\uDD18\\uD83D\\uDCA6\\u2714\\uD83D\\uDE23\\uD83C\\uDFC3\\uD83D\\uDC90\\u2639\\uD83C\\uDF8A\\uD83D\\uDC98\\uD83D\\uDE20\\u261D\\uD83D\\uDE15\\uD83C\\uDF3A\\uD83C\\uDF82\\uD83C\\uDF3B\\uD83D\\uDE10\\uD83D\\uDD95\\uD83D\\uDC9D\\uD83D\\uDE4A\\uD83D\\uDE39\\uD83D\\uDDE3\\uD83D\\uDCAB\\uD83D\\uDC80\\uD83D\\uDC51\\uD83C\\uDFB5\\uD83E\\uDD1E\\uD83D\\uDE1B\\uD83D\\uDD34\\uD83D\\uDE24\\uD83C\\uDF3C\\uD83D\\uDE2B\\u26BD\\uD83E\\uDD19\\u2615\\uD83C\\uDFC6\\uD83E\\uDD2B\\uD83D\\uDC48\\uD83D\\uDE2E\\uD83D\\uDE46\\uD83C\\uDF7B\\uD83C\\uDF43\\uD83D\\uDC36\\uD83D\\uDC81\\uD83D\\uDE32\\uD83C\\uDF3F\\uD83E\\uDDE1\\uD83C\\uDF81\\u26A1\\uD83C\\uDF1E\\uD83C\\uDF88\\u274C\\u270A\\uD83D\\uDC4B\\uD83D\\uDE30\\uD83E\\uDD28\\uD83D\\uDE36\\uD83E\\uDD1D\\uD83D\\uDEB6\\uD83D\\uDCB0\\uD83C\\uDF53\\uD83D\\uDCA2\\uD83E\\uDD1F\\uD83D\\uDE41\\uD83D\\uDEA8\\uD83D\\uDCA8\\uD83E\\uDD2C\\u2708\\uD83C\\uDF80\\uD83C\\uDF7A\\uD83E\\uDD13\\uD83D\\uDE19\\uD83D\\uDC9F\\uD83C\\uDF31\\uD83D\\uDE16\\uD83D\\uDC76\\uD83E\\uDD74\\u25B6\\u27A1\\u2753\\uD83D\\uDC8E\\uD83D\\uDCB8\\u2B07\\uD83D\\uDE28\\uD83C\\uDF1A\\uD83E\\uDD8B\\uD83D\\uDE37\\uD83D\\uDD7A\\u26A0\\uD83D\\uDE45\\uD83D\\uDE1F\\uD83D\\uDE35\\uD83D\\uDC4E\\uD83E\\uDD32\\uD83E\\uDD20\\uD83E\\uDD27\\uD83D\\uDCCC\\uD83D\\uDD35\\uD83D\\uDC85\\uD83E\\uDDD0\\uD83D\\uDC3E\\uD83C\\uDF52\\uD83D\\uDE17\\uD83E\\uDD11\\uD83C\\uDF0A\\uD83E\\uDD2F\\uD83D\\uDC37\\u260E\\uD83D\\uDCA7\\uD83D\\uDE2F\\uD83D\\uDC86\\uD83D\\uDC46\\uD83C\\uDFA4\\uD83D\\uDE47\\uD83C\\uDF51\\u2744\\uD83C\\uDF34\\uD83D\\uDCA3\\uD83D\\uDC38\\uD83D\\uDC8C\\uD83D\\uDCCD\\uD83E\\uDD40\\uD83E\\uDD22\\uD83D\\uDC45\\uD83D\\uDCA1\\uD83D\\uDCA9\\uD83D\\uDC50\\uD83D\\uDCF8\\uD83D\\uDC7B\\uD83E\\uDD10\\uD83E\\uDD2E\\uD83C\\uDFBC\\uD83E\\uDD75\\uD83D\\uDEA9\\uD83C\\uDF4E\\uD83C\\uDF4A\\uD83D\\uDC7C\\uD83D\\uDC8D\\uD83D\\uDCE3\\uD83E\\uDD42');\nconst alphabetBytesToChars = alphabet.reduce((p, c, i) => {\n p[i] = c;\n return p;\n}, []);\nconst alphabetCharsToBytes = alphabet.reduce((p, c, i) => {\n p[c.codePointAt(0)] = i;\n return p;\n}, []);\nfunction encode(data) {\n return data.reduce((p, c) => {\n p += alphabetBytesToChars[c];\n return p;\n }, '');\n}\nfunction decode(str) {\n const byts = [];\n for (const char of str) {\n const byt = alphabetCharsToBytes[char.codePointAt(0)];\n if (byt === undefined) {\n throw new Error(`Non-base256emoji character: ${ char }`);\n }\n byts.push(byt);\n }\n return new Uint8Array(byts);\n}\nexport const base256emoji = from({\n prefix: '\\uD83D\\uDE80',\n name: 'base256emoji',\n encode,\n decode\n});","const textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nexport const name = 'json';\nexport const code = 512;\nexport const encode = node => textEncoder.encode(JSON.stringify(node));\nexport const decode = data => JSON.parse(textDecoder.decode(data));","import * as identityBase from './bases/identity.js';\nimport * as base2 from './bases/base2.js';\nimport * as base8 from './bases/base8.js';\nimport * as base10 from './bases/base10.js';\nimport * as base16 from './bases/base16.js';\nimport * as base32 from './bases/base32.js';\nimport * as base36 from './bases/base36.js';\nimport * as base58 from './bases/base58.js';\nimport * as base64 from './bases/base64.js';\nimport * as base256emoji from './bases/base256emoji.js';\nimport * as sha2 from './hashes/sha2.js';\nimport * as identity from './hashes/identity.js';\nimport * as raw from './codecs/raw.js';\nimport * as json from './codecs/json.js';\nimport {\n CID,\n hasher,\n digest,\n varint,\n bytes\n} from './index.js';\nconst bases = {\n ...identityBase,\n ...base2,\n ...base8,\n ...base10,\n ...base16,\n ...base32,\n ...base36,\n ...base58,\n ...base64,\n ...base256emoji\n};\nconst hashes = {\n ...sha2,\n ...identity\n};\nconst codecs = {\n raw,\n json\n};\nexport {\n CID,\n hasher,\n digest,\n varint,\n bytes,\n hashes,\n bases,\n codecs\n};","import { bases } from 'multiformats/basics';\nimport { allocUnsafe } from '../alloc.js';\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: { decode }\n };\n}\nconst string = createCodec('utf8', 'u', buf => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, str => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', buf => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, str => {\n str = str.substring(1);\n const buf = allocUnsafe(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: bases.base16,\n latin1: ascii,\n ascii: ascii,\n binary: ascii,\n ...bases\n};\nexport default BASES;","import bases from './util/bases.js';\nimport { asUint8Array } from './util/as-uint8array.js';\nexport function fromString(string, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return asUint8Array(globalThis.Buffer.from(string, 'utf-8'));\n }\n return base.decoder.decode(`${ base.prefix }${ string }`);\n}","import bases from './util/bases.js';\nexport function toString(array, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8');\n }\n return base.encoder.encode(array).substring(1);\n}","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.delay = void 0;\nfunction delay(timeout) {\n return new Promise(resolve => {\n setTimeout(() => {\n resolve(true);\n }, timeout);\n });\n}\nexports.delay = delay;\n//# sourceMappingURL=delay.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_THOUSAND = exports.ONE_HUNDRED = void 0;\nexports.ONE_HUNDRED = 100;\nexports.ONE_THOUSAND = 1000;\n//# sourceMappingURL=misc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_YEAR = exports.FOUR_WEEKS = exports.THREE_WEEKS = exports.TWO_WEEKS = exports.ONE_WEEK = exports.THIRTY_DAYS = exports.SEVEN_DAYS = exports.FIVE_DAYS = exports.THREE_DAYS = exports.ONE_DAY = exports.TWENTY_FOUR_HOURS = exports.TWELVE_HOURS = exports.SIX_HOURS = exports.THREE_HOURS = exports.ONE_HOUR = exports.SIXTY_MINUTES = exports.THIRTY_MINUTES = exports.TEN_MINUTES = exports.FIVE_MINUTES = exports.ONE_MINUTE = exports.SIXTY_SECONDS = exports.THIRTY_SECONDS = exports.TEN_SECONDS = exports.FIVE_SECONDS = exports.ONE_SECOND = void 0;\nexports.ONE_SECOND = 1;\nexports.FIVE_SECONDS = 5;\nexports.TEN_SECONDS = 10;\nexports.THIRTY_SECONDS = 30;\nexports.SIXTY_SECONDS = 60;\nexports.ONE_MINUTE = exports.SIXTY_SECONDS;\nexports.FIVE_MINUTES = exports.ONE_MINUTE * 5;\nexports.TEN_MINUTES = exports.ONE_MINUTE * 10;\nexports.THIRTY_MINUTES = exports.ONE_MINUTE * 30;\nexports.SIXTY_MINUTES = exports.ONE_MINUTE * 60;\nexports.ONE_HOUR = exports.SIXTY_MINUTES;\nexports.THREE_HOURS = exports.ONE_HOUR * 3;\nexports.SIX_HOURS = exports.ONE_HOUR * 6;\nexports.TWELVE_HOURS = exports.ONE_HOUR * 12;\nexports.TWENTY_FOUR_HOURS = exports.ONE_HOUR * 24;\nexports.ONE_DAY = exports.TWENTY_FOUR_HOURS;\nexports.THREE_DAYS = exports.ONE_DAY * 3;\nexports.FIVE_DAYS = exports.ONE_DAY * 5;\nexports.SEVEN_DAYS = exports.ONE_DAY * 7;\nexports.THIRTY_DAYS = exports.ONE_DAY * 30;\nexports.ONE_WEEK = exports.SEVEN_DAYS;\nexports.TWO_WEEKS = exports.ONE_WEEK * 2;\nexports.THREE_WEEKS = exports.ONE_WEEK * 3;\nexports.FOUR_WEEKS = exports.ONE_WEEK * 4;\nexports.ONE_YEAR = exports.ONE_DAY * 365;\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./misc\"), exports);\ntslib_1.__exportStar(require(\"./time\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromMiliseconds = exports.toMiliseconds = void 0;\nconst constants_1 = require(\"../constants\");\nfunction toMiliseconds(seconds) {\n return seconds * constants_1.ONE_THOUSAND;\n}\nexports.toMiliseconds = toMiliseconds;\nfunction fromMiliseconds(miliseconds) {\n return Math.floor(miliseconds / constants_1.ONE_THOUSAND);\n}\nexports.fromMiliseconds = fromMiliseconds;\n//# sourceMappingURL=convert.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./delay\"), exports);\ntslib_1.__exportStar(require(\"./convert\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Watch = void 0;\nclass Watch {\n constructor() {\n this.timestamps = new Map();\n }\n start(label) {\n if (this.timestamps.has(label)) {\n throw new Error(`Watch already started for label: ${label}`);\n }\n this.timestamps.set(label, { started: Date.now() });\n }\n stop(label) {\n const timestamp = this.get(label);\n if (typeof timestamp.elapsed !== \"undefined\") {\n throw new Error(`Watch already stopped for label: ${label}`);\n }\n const elapsed = Date.now() - timestamp.started;\n this.timestamps.set(label, { started: timestamp.started, elapsed });\n }\n get(label) {\n const timestamp = this.timestamps.get(label);\n if (typeof timestamp === \"undefined\") {\n throw new Error(`No timestamp found for label: ${label}`);\n }\n return timestamp;\n }\n elapsed(label) {\n const timestamp = this.get(label);\n const elapsed = timestamp.elapsed || Date.now() - timestamp.started;\n return elapsed;\n }\n}\nexports.Watch = Watch;\nexports.default = Watch;\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IWatch = void 0;\nclass IWatch {\n}\nexports.IWatch = IWatch;\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./watch\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./utils\"), exports);\ntslib_1.__exportStar(require(\"./watch\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./constants\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLocalStorage = exports.getLocalStorageOrThrow = exports.getCrypto = exports.getCryptoOrThrow = exports.getLocation = exports.getLocationOrThrow = exports.getNavigator = exports.getNavigatorOrThrow = exports.getDocument = exports.getDocumentOrThrow = exports.getFromWindowOrThrow = exports.getFromWindow = void 0;\nfunction getFromWindow(name) {\n let res = undefined;\n if (typeof window !== \"undefined\" && typeof window[name] !== \"undefined\") {\n res = window[name];\n }\n return res;\n}\nexports.getFromWindow = getFromWindow;\nfunction getFromWindowOrThrow(name) {\n const res = getFromWindow(name);\n if (!res) {\n throw new Error(`${name} is not defined in Window`);\n }\n return res;\n}\nexports.getFromWindowOrThrow = getFromWindowOrThrow;\nfunction getDocumentOrThrow() {\n return getFromWindowOrThrow(\"document\");\n}\nexports.getDocumentOrThrow = getDocumentOrThrow;\nfunction getDocument() {\n return getFromWindow(\"document\");\n}\nexports.getDocument = getDocument;\nfunction getNavigatorOrThrow() {\n return getFromWindowOrThrow(\"navigator\");\n}\nexports.getNavigatorOrThrow = getNavigatorOrThrow;\nfunction getNavigator() {\n return getFromWindow(\"navigator\");\n}\nexports.getNavigator = getNavigator;\nfunction getLocationOrThrow() {\n return getFromWindowOrThrow(\"location\");\n}\nexports.getLocationOrThrow = getLocationOrThrow;\nfunction getLocation() {\n return getFromWindow(\"location\");\n}\nexports.getLocation = getLocation;\nfunction getCryptoOrThrow() {\n return getFromWindowOrThrow(\"crypto\");\n}\nexports.getCryptoOrThrow = getCryptoOrThrow;\nfunction getCrypto() {\n return getFromWindow(\"crypto\");\n}\nexports.getCrypto = getCrypto;\nfunction getLocalStorageOrThrow() {\n return getFromWindowOrThrow(\"localStorage\");\n}\nexports.getLocalStorageOrThrow = getLocalStorageOrThrow;\nfunction getLocalStorage() {\n return getFromWindow(\"localStorage\");\n}\nexports.getLocalStorage = getLocalStorage;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWindowMetadata = void 0;\nconst window_getters_1 = require(\"@walletconnect/window-getters\");\nfunction getWindowMetadata() {\n let doc;\n let loc;\n try {\n doc = window_getters_1.getDocumentOrThrow();\n loc = window_getters_1.getLocationOrThrow();\n }\n catch (e) {\n return null;\n }\n function getIcons() {\n const links = doc.getElementsByTagName(\"link\");\n const icons = [];\n for (let i = 0; i < links.length; i++) {\n const link = links[i];\n const rel = link.getAttribute(\"rel\");\n if (rel) {\n if (rel.toLowerCase().indexOf(\"icon\") > -1) {\n const href = link.getAttribute(\"href\");\n if (href) {\n if (href.toLowerCase().indexOf(\"https:\") === -1 &&\n href.toLowerCase().indexOf(\"http:\") === -1 &&\n href.indexOf(\"//\") !== 0) {\n let absoluteHref = loc.protocol + \"//\" + loc.host;\n if (href.indexOf(\"/\") === 0) {\n absoluteHref += href;\n }\n else {\n const path = loc.pathname.split(\"/\");\n path.pop();\n const finalPath = path.join(\"/\");\n absoluteHref += finalPath + \"/\" + href;\n }\n icons.push(absoluteHref);\n }\n else if (href.indexOf(\"//\") === 0) {\n const absoluteUrl = loc.protocol + href;\n icons.push(absoluteUrl);\n }\n else {\n icons.push(href);\n }\n }\n }\n }\n }\n return icons;\n }\n function getWindowMetadataOfAny(...args) {\n const metaTags = doc.getElementsByTagName(\"meta\");\n for (let i = 0; i < metaTags.length; i++) {\n const tag = metaTags[i];\n const attributes = [\"itemprop\", \"property\", \"name\"]\n .map((target) => tag.getAttribute(target))\n .filter((attr) => {\n if (attr) {\n return args.includes(attr);\n }\n return false;\n });\n if (attributes.length && attributes) {\n const content = tag.getAttribute(\"content\");\n if (content) {\n return content;\n }\n }\n }\n return \"\";\n }\n function getName() {\n let name = getWindowMetadataOfAny(\"name\", \"og:site_name\", \"og:title\", \"twitter:title\");\n if (!name) {\n name = doc.title;\n }\n return name;\n }\n function getDescription() {\n const description = getWindowMetadataOfAny(\"description\", \"og:description\", \"twitter:description\", \"keywords\");\n return description;\n }\n const name = getName();\n const description = getDescription();\n const url = loc.origin;\n const icons = getIcons();\n const meta = {\n description,\n url,\n icons,\n name,\n };\n return meta;\n}\nexports.getWindowMetadata = getWindowMetadata;\n//# sourceMappingURL=index.js.map","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher) || [];\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), ':list='].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), ':list=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","function e(s,r,i=\"string\"){if(!s[r]||typeof s[r]!==i)throw new Error(`Missing or invalid \"${r}\" param`)}function l(s,r){let i=!0;return r.forEach(t=>{t in s||(i=!1)}),i}function f(s,r){return Array.isArray(s)?s.length===r:Object.keys(s).length===r}function w(s,r){return Array.isArray(s)?s.length>=r:Object.keys(s).length>=r}function u(s,r,i){return(i.length?w(s,r.length):f(s,r.length))?l(s,r):!1}function n(s,r,i=\"_\"){const t=s.split(i);return t[t.length-1].trim().toLowerCase()===r.trim().toLowerCase()}function R(s){return b(s.method)&&a(s.params)}function b(s){return n(s,\"subscribe\")}function a(s){return u(s,[\"topic\"],[])}function P(s){return c(s.method)&&h(s.params)}function c(s){return n(s,\"publish\")}function h(s){return u(s,[\"message\",\"topic\",\"ttl\"],[\"prompt\",\"tag\"])}function _(s){return o(s.method)&&p(s.params)}function o(s){return n(s,\"unsubscribe\")}function p(s){return u(s,[\"id\",\"topic\"],[])}function S(s){return m(s.method)&&d(s.params)}function m(s){return n(s,\"subscription\")}function d(s){return u(s,[\"id\",\"data\"],[])}function g(s){if(!b(s.method))throw new Error(\"JSON-RPC Request has invalid subscribe method\");if(!a(s.params))throw new Error(\"JSON-RPC Request has invalid subscribe params\");const r=s.params;return e(r,\"topic\"),r}function q(s){if(!c(s.method))throw new Error(\"JSON-RPC Request has invalid publish method\");if(!h(s.params))throw new Error(\"JSON-RPC Request has invalid publish params\");const r=s.params;return e(r,\"topic\"),e(r,\"message\"),e(r,\"ttl\",\"number\"),r}function E(s){if(!o(s.method))throw new Error(\"JSON-RPC Request has invalid unsubscribe method\");if(!p(s.params))throw new Error(\"JSON-RPC Request has invalid unsubscribe params\");const r=s.params;return e(r,\"id\"),r}function k(s){if(!m(s.method))throw new Error(\"JSON-RPC Request has invalid subscription method\");if(!d(s.params))throw new Error(\"JSON-RPC Request has invalid subscription params\");const r=s.params;return e(r,\"id\"),e(r,\"data\"),r}const C={waku:{publish:\"waku_publish\",batchPublish:\"waku_batchPublish\",subscribe:\"waku_subscribe\",batchSubscribe:\"waku_batchSubscribe\",subscription:\"waku_subscription\",unsubscribe:\"waku_unsubscribe\",batchUnsubscribe:\"waku_batchUnsubscribe\",batchFetchMessages:\"waku_batchFetchMessages\"},irn:{publish:\"irn_publish\",batchPublish:\"irn_batchPublish\",subscribe:\"irn_subscribe\",batchSubscribe:\"irn_batchSubscribe\",subscription:\"irn_subscription\",unsubscribe:\"irn_unsubscribe\",batchUnsubscribe:\"irn_batchUnsubscribe\",batchFetchMessages:\"irn_batchFetchMessages\"},iridium:{publish:\"iridium_publish\",batchPublish:\"iridium_batchPublish\",subscribe:\"iridium_subscribe\",batchSubscribe:\"iridium_batchSubscribe\",subscription:\"iridium_subscription\",unsubscribe:\"iridium_unsubscribe\",batchUnsubscribe:\"iridium_batchUnsubscribe\",batchFetchMessages:\"iridium_batchFetchMessages\"}};export{C as RELAY_JSONRPC,c as isPublishMethod,h as isPublishParams,P as isPublishRequest,b as isSubscribeMethod,a as isSubscribeParams,R as isSubscribeRequest,m as isSubscriptionMethod,d as isSubscriptionParams,S as isSubscriptionRequest,o as isUnsubscribeMethod,p as isUnsubscribeParams,_ as isUnsubscribeRequest,q as parsePublishRequest,g as parseSubscribeRequest,k as parseSubscriptionRequest,E as parseUnsubscribeRequest};\n//# sourceMappingURL=index.es.js.map\n","import{ChaCha20Poly1305 as ue}from\"@stablelib/chacha20poly1305\";import{HKDF as On}from\"@stablelib/hkdf\";import{randomBytes as le}from\"@stablelib/random\";import{SHA256 as Sn,hash as de}from\"@stablelib/sha256\";import*as fe from\"@stablelib/x25519\";import{toString as v,fromString as E,concat as pe}from\"uint8arrays\";import{detect as wn}from\"detect-browser\";import{toMiliseconds as W,FIVE_MINUTES as me,fromMiliseconds as In}from\"@walletconnect/time\";import{getDocument as ye,getNavigator as ge,getLocation as he}from\"@walletconnect/window-getters\";import{getWindowMetadata as Tn}from\"@walletconnect/window-metadata\";import*as M from\"query-string\";import{RELAY_JSONRPC as Pn}from\"@walletconnect/relay-api\";const K=\":\";function ve(e){const[n,t]=e.split(K);return{namespace:n,reference:t}}function Ee(e){const{namespace:n,reference:t}=e;return[n,t].join(K)}function z(e){const[n,t,r]=e.split(K);return{namespace:n,reference:t,address:r}}function be(e){const{namespace:n,reference:t,address:r}=e;return[n,t,r].join(K)}function Y(e,n){const t=[];return e.forEach(r=>{const o=n(r);t.includes(o)||t.push(o)}),t}function Ne(e){const{address:n}=z(e);return n}function Oe(e){const{namespace:n,reference:t}=z(e);return Ee({namespace:n,reference:t})}function Rn(e,n){const{namespace:t,reference:r}=ve(n);return be({namespace:t,reference:r,address:e})}function An(e){return Y(e,Ne)}function Se(e){return Y(e,Oe)}function Un(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...o.accounts)}),t}function _n(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...Se(o.accounts))}),t}function $n(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...L(r,o))}),t}function L(e,n){return e.includes(\":\")?[e]:n.chains||[]}const x=e=>e?.split(\":\"),we=e=>{const n=e&&x(e);if(n)return n[3]},Cn=e=>{const n=e&&x(e);if(n)return n[2]+\":\"+n[3]},Ie=e=>{const n=e&&x(e);if(n)return n.pop()},jn=(e,n)=>{const t=`${e.domain} wants you to sign in with your Ethereum account:`,r=Ie(n),o=e.statement,s=`URI: ${e.aud}`,i=`Version: ${e.version}`,d=`Chain ID: ${we(n)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources:\n${e.resources.map(a=>`- ${a}`).join(`\n`)}`:void 0;return[t,r,\"\",o,\"\",s,i,d,l,c,u].filter(a=>a!=null).join(`\n`)},J=\"base10\",p=\"base16\",F=\"base64pad\",H=\"utf8\",Q=0,_=1,Dn=0,Te=1,Z=12,X=32;function kn(){const e=fe.generateKeyPair();return{privateKey:v(e.secretKey,p),publicKey:v(e.publicKey,p)}}function Vn(){const e=le(X);return v(e,p)}function Mn(e,n){const t=fe.sharedKey(E(e,p),E(n,p),!0),r=new On(Sn,t).expand(X);return v(r,p)}function Kn(e){const n=de(E(e,p));return v(n,p)}function Ln(e){const n=de(E(e,H));return v(n,p)}function Pe(e){return E(`${e}`,J)}function j(e){return Number(v(e,J))}function xn(e){const n=Pe(typeof e.type<\"u\"?e.type:Q);if(j(n)===_&&typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");const t=typeof e.senderPublicKey<\"u\"?E(e.senderPublicKey,p):void 0,r=typeof e.iv<\"u\"?E(e.iv,p):le(Z),o=new ue(E(e.symKey,p)).seal(r,E(e.message,H));return Re({type:n,sealed:o,iv:r,senderPublicKey:t})}function Fn(e){const n=new ue(E(e.symKey,p)),{sealed:t,iv:r}=ee(e.encoded),o=n.open(r,t);if(o===null)throw new Error(\"Failed to decrypt\");return v(o,H)}function Re(e){if(j(e.type)===_){if(typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");return v(pe([e.type,e.senderPublicKey,e.iv,e.sealed]),F)}return v(pe([e.type,e.iv,e.sealed]),F)}function ee(e){const n=E(e,F),t=n.slice(Dn,Te),r=Te;if(j(t)===_){const d=r+X,l=d+Z,c=n.slice(r,d),u=n.slice(d,l),a=n.slice(l);return{type:t,sealed:a,iv:u,senderPublicKey:c}}const o=r+Z,s=n.slice(r,o),i=n.slice(o);return{type:t,sealed:i,iv:s}}function Hn(e,n){const t=ee(e);return Ae({type:j(t.type),senderPublicKey:typeof t.senderPublicKey<\"u\"?v(t.senderPublicKey,p):void 0,receiverPublicKey:n?.receiverPublicKey})}function Ae(e){const n=e?.type||Q;if(n===_){if(typeof e?.senderPublicKey>\"u\")throw new Error(\"missing sender public key\");if(typeof e?.receiverPublicKey>\"u\")throw new Error(\"missing receiver public key\")}return{type:n,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function qn(e){return e.type===_&&typeof e.senderPublicKey==\"string\"&&typeof e.receiverPublicKey==\"string\"}var Bn=Object.defineProperty,Ue=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable,_e=(e,n,t)=>n in e?Bn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$e=(e,n)=>{for(var t in n||(n={}))Gn.call(n,t)&&_e(e,t,n[t]);if(Ue)for(var t of Ue(n))Wn.call(n,t)&&_e(e,t,n[t]);return e};const Ce=\"ReactNative\",m={reactNative:\"react-native\",node:\"node\",browser:\"browser\",unknown:\"unknown\"},q=\" \",zn=\":\",je=\"/\",ne=2,Yn=1e3,De=\"js\";function te(){return typeof process<\"u\"&&typeof process.versions<\"u\"&&typeof process.versions.node<\"u\"}function $(){return!ye()&&!!ge()&&navigator.product===Ce}function D(){return!te()&&!!ge()&&!!ye()}function R(){return $()?m.reactNative:te()?m.node:D()?m.browser:m.unknown}function Jn(){var e;try{return $()&&typeof global<\"u\"&&typeof(global==null?void 0:global.Application)<\"u\"?(e=global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function ke(e,n){let t=M.parse(e);return t=$e($e({},t),n),e=M.stringify(t),e}function Qn(){return Tn()||{name:\"\",description:\"\",url:\"\",icons:[\"\"]}}function Zn(e,n){var t;const r=R(),o={protocol:e,version:n,env:r};return r===\"browser\"&&(o.host=((t=he())==null?void 0:t.host)||\"unknown\"),o}function Ve(){if(R()===m.reactNative&&typeof global<\"u\"&&typeof(global==null?void 0:global.Platform)<\"u\"){const{OS:t,Version:r}=global.Platform;return[t,r].join(\"-\")}const e=wn();if(e===null)return\"unknown\";const n=e.os?e.os.replace(\" \",\"\").toLowerCase():\"unknown\";return e.type===\"browser\"?[n,e.name,e.version].join(\"-\"):[n,e.version].join(\"-\")}function Me(){var e;const n=R();return n===m.browser?[n,((e=he())==null?void 0:e.host)||\"unknown\"].join(\":\"):n}function Ke(e,n,t){const r=Ve(),o=Me();return[[e,n].join(\"-\"),[De,t].join(\"-\"),r,o].join(\"/\")}function Xn({protocol:e,version:n,relayUrl:t,sdkVersion:r,auth:o,projectId:s,useOnCloseEvent:i,bundleId:d}){const l=t.split(\"?\"),c=Ke(e,n,r),u={auth:o,ua:c,projectId:s,useOnCloseEvent:i||void 0,origin:d||void 0},a=ke(l[1]||\"\",u);return l[0]+\"?\"+a}function et(e){let n=(e.match(/^[^:]+(?=:\\/\\/)/gi)||[])[0];const t=typeof n<\"u\"?e.split(\"://\")[1]:e;return n=n===\"wss\"?\"https\":\"http\",[n,t].join(\"://\")}function nt(e,n,t){if(!e[n]||typeof e[n]!==t)throw new Error(`Missing or invalid \"${n}\" param`)}function Le(e,n=ne){return xe(e.split(je),n)}function tt(e){return Le(e).join(q)}function O(e,n){return e.filter(t=>n.includes(t)).length===e.length}function xe(e,n=ne){return e.slice(Math.max(e.length-n,0))}function rt(e){return Object.fromEntries(e.entries())}function ot(e){return new Map(Object.entries(e))}function st(e,n){const t={};return Object.keys(e).forEach(r=>{t[r]=n(e[r])}),t}const it=e=>e;function Fe(e){return e.trim().replace(/^\\w/,n=>n.toUpperCase())}function ct(e){return e.split(q).map(n=>Fe(n)).join(q)}function at(e=me,n){const t=W(e||me);let r,o,s;return{resolve:i=>{s&&r&&(clearTimeout(s),r(i))},reject:i=>{s&&o&&(clearTimeout(s),o(i))},done:()=>new Promise((i,d)=>{s=setTimeout(()=>{d(new Error(n))},t),r=i,o=d})}}function ut(e,n,t){return new Promise(async(r,o)=>{const s=setTimeout(()=>o(new Error(t)),n);try{const i=await e;r(i)}catch(i){o(i)}clearTimeout(s)})}function re(e,n){if(typeof n==\"string\"&&n.startsWith(`${e}:`))return n;if(e.toLowerCase()===\"topic\"){if(typeof n!=\"string\")throw new Error('Value must be \"string\" for expirer target type: topic');return`topic:${n}`}else if(e.toLowerCase()===\"id\"){if(typeof n!=\"number\")throw new Error('Value must be \"number\" for expirer target type: id');return`id:${n}`}throw new Error(`Unknown expirer target type: ${e}`)}function lt(e){return re(\"topic\",e)}function dt(e){return re(\"id\",e)}function ft(e){const[n,t]=e.split(\":\"),r={id:void 0,topic:void 0};if(n===\"topic\"&&typeof t==\"string\")r.topic=t;else if(n===\"id\"&&Number.isInteger(Number(t)))r.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${n}:${t}`);return r}function pt(e,n){return In((n||Date.now())+W(e))}function mt(e){return Date.now()>=W(e)}function yt(e,n){return`${e}${n?`:${n}`:\"\"}`}function S(e=[],n=[]){return[...new Set([...e,...n])]}async function gt({id:e,topic:n,wcDeepLink:t}){try{if(!t)return;const r=typeof t==\"string\"?JSON.parse(t):t;let o=r?.href;if(typeof o!=\"string\")return;o.endsWith(\"/\")&&(o=o.slice(0,-1));const s=`${o}/wc?requestId=${e}&sessionTopic=${n}`,i=R();i===m.browser?s.startsWith(\"https://\")?window.open(s,\"_blank\",\"noreferrer noopener\"):window.open(s,\"_self\",\"noreferrer noopener\"):i===m.reactNative&&typeof(global==null?void 0:global.Linking)<\"u\"&&await global.Linking.openURL(s)}catch(r){console.error(r)}}async function ht(e,n){try{return await e.getItem(n)||(D()?localStorage.getItem(n):void 0)}catch(t){console.error(t)}}const He=\"irn\";function vt(e){return e?.relay||{protocol:He}}function Et(e){const n=Pn[e];if(typeof n>\"u\")throw new Error(`Relay Protocol not supported: ${e}`);return n}var bt=Object.defineProperty,Nt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Be=(e,n,t)=>n in e?bt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,It=(e,n)=>{for(var t in n||(n={}))St.call(n,t)&&Be(e,t,n[t]);if(qe)for(var t of qe(n))wt.call(n,t)&&Be(e,t,n[t]);return e},Tt=(e,n)=>Nt(e,Ot(n));function Ge(e,n=\"-\"){const t={},r=\"relay\"+n;return Object.keys(e).forEach(o=>{if(o.startsWith(r)){const s=o.replace(r,\"\"),i=e[o];t[s]=i}}),t}function Pt(e){e=e.includes(\"wc://\")?e.replace(\"wc://\",\"\"):e,e=e.includes(\"wc:\")?e.replace(\"wc:\",\"\"):e;const n=e.indexOf(\":\"),t=e.indexOf(\"?\")!==-1?e.indexOf(\"?\"):void 0,r=e.substring(0,n),o=e.substring(n+1,t).split(\"@\"),s=typeof t<\"u\"?e.substring(t):\"\",i=M.parse(s);return{protocol:r,topic:We(o[0]),version:parseInt(o[1],10),symKey:i.symKey,relay:Ge(i),expiryTimestamp:i.expiryTimestamp?parseInt(i.expiryTimestamp,10):void 0}}function We(e){return e.startsWith(\"//\")?e.substring(2):e}function ze(e,n=\"-\"){const t=\"relay\",r={};return Object.keys(e).forEach(o=>{const s=t+n+o;e[o]&&(r[s]=e[o])}),r}function Rt(e){return`${e.protocol}:${e.topic}@${e.version}?`+M.stringify(Tt(It({symKey:e.symKey},ze(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}var At=Object.defineProperty,Ut=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Je=(e,n,t)=>n in e?At(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jt=(e,n)=>{for(var t in n||(n={}))$t.call(n,t)&&Je(e,t,n[t]);if(Ye)for(var t of Ye(n))Ct.call(n,t)&&Je(e,t,n[t]);return e},Dt=(e,n)=>Ut(e,_t(n));function A(e){const n=[];return e.forEach(t=>{const[r,o]=t.split(\":\");n.push(`${r}:${o}`)}),n}function Qe(e){const n=[];return Object.values(e).forEach(t=>{n.push(...A(t.accounts))}),n}function Ze(e,n){const t=[];return Object.values(e).forEach(r=>{A(r.accounts).includes(n)&&t.push(...r.methods)}),t}function Xe(e,n){const t=[];return Object.values(e).forEach(r=>{A(r.accounts).includes(n)&&t.push(...r.events)}),t}function kt(e,n){const t=ln(e,n);if(t)throw new Error(t.message);const r={};for(const[o,s]of Object.entries(e))r[o]={methods:s.methods,events:s.events,chains:s.accounts.map(i=>`${i.split(\":\")[0]}:${i.split(\":\")[1]}`)};return r}function Vt(e){const{proposal:{requiredNamespaces:n,optionalNamespaces:t={}},supportedNamespaces:r}=e,o=se(n),s=se(t),i={};Object.keys(r).forEach(c=>{const u=r[c].chains,a=r[c].methods,b=r[c].events,I=r[c].accounts;u.forEach(y=>{if(!I.some(f=>f.includes(y)))throw new Error(`No accounts provided for chain ${y} in namespace ${c}`)}),i[c]={chains:u,methods:a,events:b,accounts:I}});const d=fn(n,i,\"approve()\");if(d)throw new Error(d.message);const l={};return!Object.keys(n).length&&!Object.keys(t).length?i:(Object.keys(o).forEach(c=>{const u=r[c].chains.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.chains)==null?void 0:h.includes(y)}),a=r[c].methods.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.methods)==null?void 0:h.includes(y)}),b=r[c].events.filter(y=>{var f,h;return(h=(f=o[c])==null?void 0:f.events)==null?void 0:h.includes(y)}),I=u.map(y=>r[c].accounts.filter(f=>f.includes(`${y}:`))).flat();l[c]={chains:u,methods:a,events:b,accounts:I}}),Object.keys(s).forEach(c=>{var u,a,b,I,y,f;if(!r[c])return;const h=(a=(u=s[c])==null?void 0:u.chains)==null?void 0:a.filter(T=>r[c].chains.includes(T)),En=r[c].methods.filter(T=>{var P,C;return(C=(P=s[c])==null?void 0:P.methods)==null?void 0:C.includes(T)}),bn=r[c].events.filter(T=>{var P,C;return(C=(P=s[c])==null?void 0:P.events)==null?void 0:C.includes(T)}),Nn=h?.map(T=>r[c].accounts.filter(P=>P.includes(`${T}:`))).flat();l[c]={chains:S((b=l[c])==null?void 0:b.chains,h),methods:S((I=l[c])==null?void 0:I.methods,En),events:S((y=l[c])==null?void 0:y.events,bn),accounts:S((f=l[c])==null?void 0:f.accounts,Nn)}}),l)}function oe(e){return e.includes(\":\")}function en(e){return oe(e)?e.split(\":\")[0]:e}function se(e){var n,t,r;const o={};if(!B(e))return o;for(const[s,i]of Object.entries(e)){const d=oe(s)?[s]:i.chains,l=i.methods||[],c=i.events||[],u=en(s);o[u]=Dt(jt({},o[u]),{chains:S(d,(n=o[u])==null?void 0:n.chains),methods:S(l,(t=o[u])==null?void 0:t.methods),events:S(c,(r=o[u])==null?void 0:r.events)})}return o}const nn={INVALID_METHOD:{message:\"Invalid method.\",code:1001},INVALID_EVENT:{message:\"Invalid event.\",code:1002},INVALID_UPDATE_REQUEST:{message:\"Invalid update request.\",code:1003},INVALID_EXTEND_REQUEST:{message:\"Invalid extend request.\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\"Invalid session settle request.\",code:1005},UNAUTHORIZED_METHOD:{message:\"Unauthorized method.\",code:3001},UNAUTHORIZED_EVENT:{message:\"Unauthorized event.\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\"Unauthorized update request.\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\"Unauthorized extend request.\",code:3004},USER_REJECTED:{message:\"User rejected.\",code:5e3},USER_REJECTED_CHAINS:{message:\"User rejected chains.\",code:5001},USER_REJECTED_METHODS:{message:\"User rejected methods.\",code:5002},USER_REJECTED_EVENTS:{message:\"User rejected events.\",code:5003},UNSUPPORTED_CHAINS:{message:\"Unsupported chains.\",code:5100},UNSUPPORTED_METHODS:{message:\"Unsupported methods.\",code:5101},UNSUPPORTED_EVENTS:{message:\"Unsupported events.\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\"Unsupported accounts.\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\"Unsupported namespace key.\",code:5104},USER_DISCONNECTED:{message:\"User disconnected.\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\"Session settlement failed.\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\"Unsupported wc_ method.\",code:10001}},tn={NOT_INITIALIZED:{message:\"Not initialized.\",code:1},NO_MATCHING_KEY:{message:\"No matching key.\",code:2},RESTORE_WILL_OVERRIDE:{message:\"Restore will override.\",code:3},RESUBSCRIBED:{message:\"Resubscribed.\",code:4},MISSING_OR_INVALID:{message:\"Missing or invalid.\",code:5},EXPIRED:{message:\"Expired.\",code:6},UNKNOWN_TYPE:{message:\"Unknown type.\",code:7},MISMATCHED_TOPIC:{message:\"Mismatched topic.\",code:8},NON_CONFORMING_NAMESPACES:{message:\"Non conforming namespaces.\",code:9}};function N(e,n){const{message:t,code:r}=tn[e];return{message:n?`${t} ${n}`:t,code:r}}function U(e,n){const{message:t,code:r}=nn[e];return{message:n?`${t} ${n}`:t,code:r}}function k(e,n){return Array.isArray(e)?typeof n<\"u\"&&e.length?e.every(n):!0:!1}function B(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function w(e){return typeof e>\"u\"}function g(e,n){return n&&w(e)?!0:typeof e==\"string\"&&!!e.trim().length}function G(e,n){return n&&w(e)?!0:typeof e==\"number\"&&!isNaN(e)}function Mt(e,n){const{requiredNamespaces:t}=n,r=Object.keys(e.namespaces),o=Object.keys(t);let s=!0;return O(o,r)?(r.forEach(i=>{const{accounts:d,methods:l,events:c}=e.namespaces[i],u=A(d),a=t[i];(!O(L(i,a),u)||!O(a.methods,l)||!O(a.events,c))&&(s=!1)}),s):!1}function V(e){return g(e,!1)&&e.includes(\":\")?e.split(\":\").length===2:!1}function rn(e){if(g(e,!1)&&e.includes(\":\")){const n=e.split(\":\");if(n.length===3){const t=n[0]+\":\"+n[1];return!!n[2]&&V(t)}}return!1}function Kt(e){if(g(e,!1))try{return typeof new URL(e)<\"u\"}catch{return!1}return!1}function Lt(e){var n;return(n=e?.proposer)==null?void 0:n.publicKey}function xt(e){return e?.topic}function Ft(e,n){let t=null;return g(e?.publicKey,!1)||(t=N(\"MISSING_OR_INVALID\",`${n} controller public key should be a string`)),t}function ie(e){let n=!0;return k(e)?e.length&&(n=e.every(t=>g(t,!1))):n=!1,n}function on(e,n,t){let r=null;return k(n)&&n.length?n.forEach(o=>{r||V(o)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chain ${o} should be a string and conform to \"namespace:chainId\" format`))}):V(e)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chains must be defined as \"namespace:chainId\" e.g. \"eip155:1\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\"eip155:1\", \"eip155:5\"] }`)),r}function sn(e,n,t){let r=null;return Object.entries(e).forEach(([o,s])=>{if(r)return;const i=on(o,L(o,s),`${n} ${t}`);i&&(r=i)}),r}function cn(e,n){let t=null;return k(e)?e.forEach(r=>{t||rn(r)||(t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, account ${r} should be a string and conform to \"namespace:chainId:address\" format`))}):t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, accounts should be an array of strings conforming to \"namespace:chainId:address\" format`),t}function an(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=cn(r?.accounts,`${n} namespace`);o&&(t=o)}),t}function un(e,n){let t=null;return ie(e?.methods)?ie(e?.events)||(t=U(\"UNSUPPORTED_EVENTS\",`${n}, events should be an array of strings or empty array for no events`)):t=U(\"UNSUPPORTED_METHODS\",`${n}, methods should be an array of strings or empty array for no methods`),t}function ce(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=un(r,`${n}, namespace`);o&&(t=o)}),t}function Ht(e,n,t){let r=null;if(e&&B(e)){const o=ce(e,n);o&&(r=o);const s=sn(e,n,t);s&&(r=s)}else r=N(\"MISSING_OR_INVALID\",`${n}, ${t} should be an object with data`);return r}function ln(e,n){let t=null;if(e&&B(e)){const r=ce(e,n);r&&(t=r);const o=an(e,n);o&&(t=o)}else t=N(\"MISSING_OR_INVALID\",`${n}, namespaces should be an object with data`);return t}function dn(e){return g(e.protocol,!0)}function qt(e,n){let t=!1;return n&&!e?t=!0:e&&k(e)&&e.length&&e.forEach(r=>{t=dn(r)}),t}function Bt(e){return typeof e==\"number\"}function Gt(e){return typeof e<\"u\"&&typeof e!==null}function Wt(e){return!(!e||typeof e!=\"object\"||!e.code||!G(e.code,!1)||!e.message||!g(e.message,!1))}function zt(e){return!(w(e)||!g(e.method,!1))}function Yt(e){return!(w(e)||w(e.result)&&w(e.error)||!G(e.id,!1)||!g(e.jsonrpc,!1))}function Jt(e){return!(w(e)||!g(e.name,!1))}function Qt(e,n){return!(!V(n)||!Qe(e).includes(n))}function Zt(e,n,t){return g(t,!1)?Ze(e,n).includes(t):!1}function Xt(e,n,t){return g(t,!1)?Xe(e,n).includes(t):!1}function fn(e,n,t){let r=null;const o=er(e),s=nr(n),i=Object.keys(o),d=Object.keys(s),l=pn(Object.keys(e)),c=pn(Object.keys(n)),u=l.filter(a=>!c.includes(a));return u.length&&(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(n).toString()}`)),O(i,d)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces chains don't satisfy required namespaces.\n Required: ${i.toString()}\n Approved: ${d.toString()}`)),Object.keys(n).forEach(a=>{if(!a.includes(\":\")||r)return;const b=A(n[a].accounts);b.includes(a)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces accounts don't satisfy namespace accounts for ${a}\n Required: ${a}\n Approved: ${b.toString()}`))}),i.forEach(a=>{r||(O(o[a].methods,s[a].methods)?O(o[a].events,s[a].events)||(r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces events don't satisfy namespace events for ${a}`)):r=N(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces methods don't satisfy namespace methods for ${a}`))}),r}function er(e){const n={};return Object.keys(e).forEach(t=>{var r;t.includes(\":\")?n[t]=e[t]:(r=e[t].chains)==null||r.forEach(o=>{n[o]={methods:e[t].methods,events:e[t].events}})}),n}function pn(e){return[...new Set(e.map(n=>n.includes(\":\")?n.split(\":\")[0]:n))]}function nr(e){const n={};return Object.keys(e).forEach(t=>{if(t.includes(\":\"))n[t]=e[t];else{const r=A(e[t].accounts);r?.forEach(o=>{n[o]={accounts:e[t].accounts.filter(s=>s.includes(`${o}:`)),methods:e[t].methods,events:e[t].events}})}}),n}function tr(e,n){return G(e,!1)&&e<=n.max&&e>=n.min}function rr(){const e=R();return new Promise(n=>{switch(e){case m.browser:n(mn());break;case m.reactNative:n(yn());break;case m.node:n(gn());break;default:n(!0)}})}function mn(){return D()&&navigator?.onLine}async function yn(){if($()&&typeof global<\"u\"&&global!=null&&global.NetInfo){const e=await(global==null?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}function gn(){return!0}function or(e){switch(R()){case m.browser:hn(e);break;case m.reactNative:vn(e);break;case m.node:break}}function hn(e){!$()&&D()&&(window.addEventListener(\"online\",()=>e(!0)),window.addEventListener(\"offline\",()=>e(!1)))}function vn(e){$()&&typeof global<\"u\"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(n=>e(n?.isConnected))}const ae={};class sr{static get(n){return ae[n]}static set(n,t){ae[n]=t}static delete(n){delete ae[n]}}export{J as BASE10,p as BASE16,F as BASE64,zn as COLON,ne as DEFAULT_DEPTH,q as EMPTY_SPACE,m as ENV_MAP,tn as INTERNAL_ERRORS,sr as MemoryStore,Yn as ONE_THOUSAND,Ce as REACT_NATIVE_PRODUCT,He as RELAYER_DEFAULT_PROTOCOL,nn as SDK_ERRORS,De as SDK_TYPE,je as SLASH,Q as TYPE_0,_ as TYPE_1,H as UTF8,ke as appendToQueryString,nt as assertType,Vt as buildApprovedNamespaces,pt as calcExpiry,ct as capitalize,Fe as capitalizeWord,at as createDelayedPromise,ut as createExpiringPromise,j as decodeTypeByte,Fn as decrypt,Mn as deriveSymKey,ee as deserialize,Pe as encodeTypeByte,xn as encrypt,yt as engineEvent,it as enumify,be as formatAccountId,Rn as formatAccountWithChain,Ee as formatChainId,re as formatExpirerTarget,dt as formatIdTarget,jn as formatMessage,tt as formatMessageContext,ze as formatRelayParams,Xn as formatRelayRpcUrl,lt as formatTopicTarget,Ke as formatUA,Rt as formatUri,kn as generateKeyPair,Vn as generateRandomBytes32,A as getAccountsChains,Un as getAccountsFromNamespaces,Ne as getAddressFromAccount,An as getAddressesFromAccounts,Qn as getAppMetadata,mn as getBrowserOnlineStatus,Jn as getBundleId,Oe as getChainFromAccount,Se as getChainsFromAccounts,L as getChainsFromNamespace,_n as getChainsFromNamespaces,$n as getChainsFromRequiredNamespaces,ht as getDeepLink,Ie as getDidAddress,x as getDidAddressSegments,we as getDidChainId,R as getEnvironment,et as getHttpUrl,N as getInternalError,Me as getJavascriptID,Ve as getJavascriptOS,xe as getLastItems,Cn as getNamespacedDidChainId,Qe as getNamespacesChains,Xe as getNamespacesEventsForChainId,Ze as getNamespacesMethodsForChainId,gn as getNodeOnlineStatus,yn as getReactNativeOnlineStatus,Zn as getRelayClientMetadata,Et as getRelayProtocolApi,vt as getRelayProtocolName,kt as getRequiredNamespacesFromNamespaces,U as getSdkError,Y as getUniqueValues,gt as handleDeeplinkRedirect,O as hasOverlap,Kn as hashKey,Ln as hashMessage,D as isBrowser,oe as isCaipNamespace,fn as isConformingNamespaces,mt as isExpired,te as isNode,rr as isOnline,Lt as isProposalStruct,$ as isReactNative,Mt as isSessionCompatible,xt as isSessionStruct,qn as isTypeOneEnvelope,w as isUndefined,rn as isValidAccountId,cn as isValidAccounts,un as isValidActions,k as isValidArray,V as isValidChainId,on as isValidChains,Ft as isValidController,Wt as isValidErrorReason,Jt as isValidEvent,Bt as isValidId,an as isValidNamespaceAccounts,ce as isValidNamespaceActions,sn as isValidNamespaceChains,ie as isValidNamespaceMethodsOrEvents,ln as isValidNamespaces,Qt as isValidNamespacesChainId,Xt as isValidNamespacesEvent,Zt as isValidNamespacesRequest,G as isValidNumber,B as isValidObject,Gt as isValidParams,dn as isValidRelay,qt as isValidRelays,zt as isValidRequest,tr as isValidRequestExpiry,Ht as isValidRequiredNamespaces,Yt as isValidResponse,g as isValidString,Kt as isValidUrl,st as mapEntries,rt as mapToObj,S as mergeArrays,se as normalizeNamespaces,ot as objToMap,z as parseAccountId,ve as parseChainId,Le as parseContextNames,ft as parseExpirerTarget,en as parseNamespaceKey,Ge as parseRelayParams,We as parseTopic,Pt as parseUri,Re as serialize,hn as subscribeToBrowserNetworkChange,or as subscribeToNetworkChange,vn as subscribeToReactNativeNetworkChange,Hn as validateDecoding,Ae as validateEncoding};\n//# sourceMappingURL=index.es.js.map\n","const suspectProtoRx = /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(\\.\\d{1,17})?([Ee][+-]?\\d+)?\\s*$/;\nfunction jsonParseTransform(key, value) {\n if (key === \"__proto__\" || key === \"constructor\" && value && typeof value === \"object\" && \"prototype\" in value) {\n warnKeyDropped(key);\n return;\n }\n return value;\n}\nfunction warnKeyDropped(key) {\n console.warn(`[destr] Dropping \"${key}\" key to prevent prototype pollution.`);\n}\nfunction destr(value, options = {}) {\n if (typeof value !== \"string\") {\n return value;\n }\n const _value = value.trim();\n if (\n // eslint-disable-next-line unicorn/prefer-at\n value[0] === '\"' && value.endsWith('\"') && !value.includes(\"\\\\\")\n ) {\n return _value.slice(1, -1);\n }\n if (_value.length <= 9) {\n const _lval = _value.toLowerCase();\n if (_lval === \"true\") {\n return true;\n }\n if (_lval === \"false\") {\n return false;\n }\n if (_lval === \"undefined\") {\n return void 0;\n }\n if (_lval === \"null\") {\n return null;\n }\n if (_lval === \"nan\") {\n return Number.NaN;\n }\n if (_lval === \"infinity\") {\n return Number.POSITIVE_INFINITY;\n }\n if (_lval === \"-infinity\") {\n return Number.NEGATIVE_INFINITY;\n }\n }\n if (!JsonSigRx.test(value)) {\n if (options.strict) {\n throw new SyntaxError(\"[destr] Invalid JSON\");\n }\n return value;\n }\n try {\n if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {\n if (options.strict) {\n throw new Error(\"[destr] Possible prototype pollution\");\n }\n return JSON.parse(value, jsonParseTransform);\n }\n return JSON.parse(value);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value;\n }\n}\nfunction safeDestr(value, options = {}) {\n return destr(value, { ...options, strict: true });\n}\n\nexport { destr as default, destr, safeDestr };\n","function wrapToPromise(value) {\n if (!value || typeof value.then !== \"function\") {\n return Promise.resolve(value);\n }\n return value;\n}\nfunction asyncCall(function_, ...arguments_) {\n try {\n return wrapToPromise(function_(...arguments_));\n } catch (error) {\n return Promise.reject(error);\n }\n}\nfunction isPrimitive(value) {\n const type = typeof value;\n return value === null || type !== \"object\" && type !== \"function\";\n}\nfunction isPureObject(value) {\n const proto = Object.getPrototypeOf(value);\n return !proto || proto.isPrototypeOf(Object);\n}\nfunction stringify(value) {\n if (isPrimitive(value)) {\n return String(value);\n }\n if (isPureObject(value) || Array.isArray(value)) {\n return JSON.stringify(value);\n }\n if (typeof value.toJSON === \"function\") {\n return stringify(value.toJSON());\n }\n throw new Error(\"[unstorage] Cannot stringify value!\");\n}\nfunction checkBufferSupport() {\n if (typeof Buffer === void 0) {\n throw new TypeError(\"[unstorage] Buffer is not supported!\");\n }\n}\nconst BASE64_PREFIX = \"base64:\";\nfunction serializeRaw(value) {\n if (typeof value === \"string\") {\n return value;\n }\n checkBufferSupport();\n const base64 = Buffer.from(value).toString(\"base64\");\n return BASE64_PREFIX + base64;\n}\nfunction deserializeRaw(value) {\n if (typeof value !== \"string\") {\n return value;\n }\n if (!value.startsWith(BASE64_PREFIX)) {\n return value;\n }\n checkBufferSupport();\n return Buffer.from(value.slice(BASE64_PREFIX.length), \"base64\");\n}\n\nconst storageKeyProperties = [\n \"hasItem\",\n \"getItem\",\n \"getItemRaw\",\n \"setItem\",\n \"setItemRaw\",\n \"removeItem\",\n \"getMeta\",\n \"setMeta\",\n \"removeMeta\",\n \"getKeys\",\n \"clear\",\n \"mount\",\n \"unmount\"\n];\nfunction prefixStorage(storage, base) {\n base = normalizeBaseKey(base);\n if (!base) {\n return storage;\n }\n const nsStorage = { ...storage };\n for (const property of storageKeyProperties) {\n nsStorage[property] = (key = \"\", ...args) => (\n // @ts-ignore\n storage[property](base + key, ...args)\n );\n }\n nsStorage.getKeys = (key = \"\", ...arguments_) => storage.getKeys(base + key, ...arguments_).then((keys) => keys.map((key2) => key2.slice(base.length)));\n return nsStorage;\n}\nfunction normalizeKey(key) {\n if (!key) {\n return \"\";\n }\n return key.split(\"?\")[0].replace(/[/\\\\]/g, \":\").replace(/:+/g, \":\").replace(/^:|:$/g, \"\");\n}\nfunction joinKeys(...keys) {\n return normalizeKey(keys.join(\":\"));\n}\nfunction normalizeBaseKey(base) {\n base = normalizeKey(base);\n return base ? base + \":\" : \"\";\n}\n\nexport { normalizeKey as a, asyncCall as b, serializeRaw as c, deserializeRaw as d, joinKeys as j, normalizeBaseKey as n, prefixStorage as p, stringify as s };\n","import destr from 'destr';\nimport { n as normalizeBaseKey, a as normalizeKey, b as asyncCall, d as deserializeRaw, s as stringify, c as serializeRaw, j as joinKeys } from './shared/unstorage.8581f561.mjs';\nexport { p as prefixStorage } from './shared/unstorage.8581f561.mjs';\n\nfunction defineDriver(factory) {\n return factory;\n}\n\nconst DRIVER_NAME = \"memory\";\nconst memory = defineDriver(() => {\n const data = /* @__PURE__ */ new Map();\n return {\n name: DRIVER_NAME,\n options: {},\n hasItem(key) {\n return data.has(key);\n },\n getItem(key) {\n return data.get(key) ?? null;\n },\n getItemRaw(key) {\n return data.get(key) ?? null;\n },\n setItem(key, value) {\n data.set(key, value);\n },\n setItemRaw(key, value) {\n data.set(key, value);\n },\n removeItem(key) {\n data.delete(key);\n },\n getKeys() {\n return Array.from(data.keys());\n },\n clear() {\n data.clear();\n },\n dispose() {\n data.clear();\n }\n };\n});\n\nfunction createStorage(options = {}) {\n const context = {\n mounts: { \"\": options.driver || memory() },\n mountpoints: [\"\"],\n watching: false,\n watchListeners: [],\n unwatch: {}\n };\n const getMount = (key) => {\n for (const base of context.mountpoints) {\n if (key.startsWith(base)) {\n return {\n base,\n relativeKey: key.slice(base.length),\n driver: context.mounts[base]\n };\n }\n }\n return {\n base: \"\",\n relativeKey: key,\n driver: context.mounts[\"\"]\n };\n };\n const getMounts = (base, includeParent) => {\n return context.mountpoints.filter(\n (mountpoint) => mountpoint.startsWith(base) || includeParent && base.startsWith(mountpoint)\n ).map((mountpoint) => ({\n relativeBase: base.length > mountpoint.length ? base.slice(mountpoint.length) : void 0,\n mountpoint,\n driver: context.mounts[mountpoint]\n }));\n };\n const onChange = (event, key) => {\n if (!context.watching) {\n return;\n }\n key = normalizeKey(key);\n for (const listener of context.watchListeners) {\n listener(event, key);\n }\n };\n const startWatch = async () => {\n if (context.watching) {\n return;\n }\n context.watching = true;\n for (const mountpoint in context.mounts) {\n context.unwatch[mountpoint] = await watch(\n context.mounts[mountpoint],\n onChange,\n mountpoint\n );\n }\n };\n const stopWatch = async () => {\n if (!context.watching) {\n return;\n }\n for (const mountpoint in context.unwatch) {\n await context.unwatch[mountpoint]();\n }\n context.unwatch = {};\n context.watching = false;\n };\n const runBatch = (items, commonOptions, cb) => {\n const batches = /* @__PURE__ */ new Map();\n const getBatch = (mount) => {\n let batch = batches.get(mount.base);\n if (!batch) {\n batch = {\n driver: mount.driver,\n base: mount.base,\n items: []\n };\n batches.set(mount.base, batch);\n }\n return batch;\n };\n for (const item of items) {\n const isStringItem = typeof item === \"string\";\n const key = normalizeKey(isStringItem ? item : item.key);\n const value = isStringItem ? void 0 : item.value;\n const options2 = isStringItem || !item.options ? commonOptions : { ...commonOptions, ...item.options };\n const mount = getMount(key);\n getBatch(mount).items.push({\n key,\n value,\n relativeKey: mount.relativeKey,\n options: options2\n });\n }\n return Promise.all([...batches.values()].map((batch) => cb(batch))).then(\n (r) => r.flat()\n );\n };\n const storage = {\n // Item\n hasItem(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n return asyncCall(driver.hasItem, relativeKey, opts);\n },\n getItem(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n return asyncCall(driver.getItem, relativeKey, opts).then(\n (value) => destr(value)\n );\n },\n getItems(items, commonOptions) {\n return runBatch(items, commonOptions, (batch) => {\n if (batch.driver.getItems) {\n return asyncCall(\n batch.driver.getItems,\n batch.items.map((item) => ({\n key: item.relativeKey,\n options: item.options\n })),\n commonOptions\n ).then(\n (r) => r.map((item) => ({\n key: joinKeys(batch.base, item.key),\n value: destr(item.value)\n }))\n );\n }\n return Promise.all(\n batch.items.map((item) => {\n return asyncCall(\n batch.driver.getItem,\n item.relativeKey,\n item.options\n ).then((value) => ({\n key: item.key,\n value: destr(value)\n }));\n })\n );\n });\n },\n getItemRaw(key, opts = {}) {\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (driver.getItemRaw) {\n return asyncCall(driver.getItemRaw, relativeKey, opts);\n }\n return asyncCall(driver.getItem, relativeKey, opts).then(\n (value) => deserializeRaw(value)\n );\n },\n async setItem(key, value, opts = {}) {\n if (value === void 0) {\n return storage.removeItem(key);\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (!driver.setItem) {\n return;\n }\n await asyncCall(driver.setItem, relativeKey, stringify(value), opts);\n if (!driver.watch) {\n onChange(\"update\", key);\n }\n },\n async setItems(items, commonOptions) {\n await runBatch(items, commonOptions, async (batch) => {\n if (batch.driver.setItems) {\n return asyncCall(\n batch.driver.setItems,\n batch.items.map((item) => ({\n key: item.relativeKey,\n value: stringify(item.value),\n options: item.options\n })),\n commonOptions\n );\n }\n if (!batch.driver.setItem) {\n return;\n }\n await Promise.all(\n batch.items.map((item) => {\n return asyncCall(\n batch.driver.setItem,\n item.relativeKey,\n stringify(item.value),\n item.options\n );\n })\n );\n });\n },\n async setItemRaw(key, value, opts = {}) {\n if (value === void 0) {\n return storage.removeItem(key, opts);\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (driver.setItemRaw) {\n await asyncCall(driver.setItemRaw, relativeKey, value, opts);\n } else if (driver.setItem) {\n await asyncCall(driver.setItem, relativeKey, serializeRaw(value), opts);\n } else {\n return;\n }\n if (!driver.watch) {\n onChange(\"update\", key);\n }\n },\n async removeItem(key, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { removeMeta: opts };\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n if (!driver.removeItem) {\n return;\n }\n await asyncCall(driver.removeItem, relativeKey, opts);\n if (opts.removeMeta || opts.removeMata) {\n await asyncCall(driver.removeItem, relativeKey + \"$\", opts);\n }\n if (!driver.watch) {\n onChange(\"remove\", key);\n }\n },\n // Meta\n async getMeta(key, opts = {}) {\n if (typeof opts === \"boolean\") {\n opts = { nativeOnly: opts };\n }\n key = normalizeKey(key);\n const { relativeKey, driver } = getMount(key);\n const meta = /* @__PURE__ */ Object.create(null);\n if (driver.getMeta) {\n Object.assign(meta, await asyncCall(driver.getMeta, relativeKey, opts));\n }\n if (!opts.nativeOnly) {\n const value = await asyncCall(\n driver.getItem,\n relativeKey + \"$\",\n opts\n ).then((value_) => destr(value_));\n if (value && typeof value === \"object\") {\n if (typeof value.atime === \"string\") {\n value.atime = new Date(value.atime);\n }\n if (typeof value.mtime === \"string\") {\n value.mtime = new Date(value.mtime);\n }\n Object.assign(meta, value);\n }\n }\n return meta;\n },\n setMeta(key, value, opts = {}) {\n return this.setItem(key + \"$\", value, opts);\n },\n removeMeta(key, opts = {}) {\n return this.removeItem(key + \"$\", opts);\n },\n // Keys\n async getKeys(base, opts = {}) {\n base = normalizeBaseKey(base);\n const mounts = getMounts(base, true);\n let maskedMounts = [];\n const allKeys = [];\n for (const mount of mounts) {\n const rawKeys = await asyncCall(\n mount.driver.getKeys,\n mount.relativeBase,\n opts\n );\n const keys = rawKeys.map((key) => mount.mountpoint + normalizeKey(key)).filter((key) => !maskedMounts.some((p) => key.startsWith(p)));\n allKeys.push(...keys);\n maskedMounts = [\n mount.mountpoint,\n ...maskedMounts.filter((p) => !p.startsWith(mount.mountpoint))\n ];\n }\n return base ? allKeys.filter((key) => key.startsWith(base) && !key.endsWith(\"$\")) : allKeys.filter((key) => !key.endsWith(\"$\"));\n },\n // Utils\n async clear(base, opts = {}) {\n base = normalizeBaseKey(base);\n await Promise.all(\n getMounts(base, false).map(async (m) => {\n if (m.driver.clear) {\n return asyncCall(m.driver.clear, m.relativeBase, opts);\n }\n if (m.driver.removeItem) {\n const keys = await m.driver.getKeys(m.relativeBase || \"\", opts);\n return Promise.all(\n keys.map((key) => m.driver.removeItem(key, opts))\n );\n }\n })\n );\n },\n async dispose() {\n await Promise.all(\n Object.values(context.mounts).map((driver) => dispose(driver))\n );\n },\n async watch(callback) {\n await startWatch();\n context.watchListeners.push(callback);\n return async () => {\n context.watchListeners = context.watchListeners.filter(\n (listener) => listener !== callback\n );\n if (context.watchListeners.length === 0) {\n await stopWatch();\n }\n };\n },\n async unwatch() {\n context.watchListeners = [];\n await stopWatch();\n },\n // Mount\n mount(base, driver) {\n base = normalizeBaseKey(base);\n if (base && context.mounts[base]) {\n throw new Error(`already mounted at ${base}`);\n }\n if (base) {\n context.mountpoints.push(base);\n context.mountpoints.sort((a, b) => b.length - a.length);\n }\n context.mounts[base] = driver;\n if (context.watching) {\n Promise.resolve(watch(driver, onChange, base)).then((unwatcher) => {\n context.unwatch[base] = unwatcher;\n }).catch(console.error);\n }\n return storage;\n },\n async unmount(base, _dispose = true) {\n base = normalizeBaseKey(base);\n if (!base || !context.mounts[base]) {\n return;\n }\n if (context.watching && base in context.unwatch) {\n context.unwatch[base]();\n delete context.unwatch[base];\n }\n if (_dispose) {\n await dispose(context.mounts[base]);\n }\n context.mountpoints = context.mountpoints.filter((key) => key !== base);\n delete context.mounts[base];\n },\n getMount(key = \"\") {\n key = normalizeKey(key) + \":\";\n const m = getMount(key);\n return {\n driver: m.driver,\n base: m.base\n };\n },\n getMounts(base = \"\", opts = {}) {\n base = normalizeKey(base);\n const mounts = getMounts(base, opts.parents);\n return mounts.map((m) => ({\n driver: m.driver,\n base: m.mountpoint\n }));\n }\n };\n return storage;\n}\nasync function snapshot(storage, base) {\n base = normalizeBaseKey(base);\n const keys = await storage.getKeys(base);\n const snapshot2 = {};\n await Promise.all(\n keys.map(async (key) => {\n snapshot2[key.slice(base.length)] = await storage.getItem(key);\n })\n );\n return snapshot2;\n}\nasync function restoreSnapshot(driver, snapshot2, base = \"\") {\n base = normalizeBaseKey(base);\n await Promise.all(\n Object.entries(snapshot2).map((e) => driver.setItem(base + e[0], e[1]))\n );\n}\nfunction watch(driver, onChange, base) {\n return driver.watch ? driver.watch((event, key) => onChange(event, base + key)) : () => {\n };\n}\nasync function dispose(driver) {\n if (typeof driver.dispose === \"function\") {\n await asyncCall(driver.dispose);\n }\n}\n\nconst builtinDrivers = {\n azureAppConfiguration: \"unstorage/drivers/azure-app-configuration\",\n azureCosmos: \"unstorage/drivers/azure-cosmos\",\n azureKeyVault: \"unstorage/drivers/azure-key-vault\",\n azureStorageBlob: \"unstorage/drivers/azure-storage-blob\",\n azureStorageTable: \"unstorage/drivers/azure-storage-table\",\n cloudflareKVBinding: \"unstorage/drivers/cloudflare-kv-binding\",\n cloudflareKVHTTP: \"unstorage/drivers/cloudflare-kv-http\",\n cloudflareR2Binding: \"unstorage/drivers/cloudflare-r2-binding\",\n fs: \"unstorage/drivers/fs\",\n fsLite: \"unstorage/drivers/fs-lite\",\n github: \"unstorage/drivers/github\",\n http: \"unstorage/drivers/http\",\n indexedb: \"unstorage/drivers/indexedb\",\n localStorage: \"unstorage/drivers/localstorage\",\n lruCache: \"unstorage/drivers/lru-cache\",\n memory: \"unstorage/drivers/memory\",\n mongodb: \"unstorage/drivers/mongodb\",\n netlifyBlobs: \"unstorage/drivers/netlify-blobs\",\n overlay: \"unstorage/drivers/overlay\",\n planetscale: \"unstorage/drivers/planetscale\",\n redis: \"unstorage/drivers/redis\",\n sessionStorage: \"unstorage/drivers/session-storage\",\n vercelKV: \"unstorage/drivers/vercel-kv\",\n /** @deprecated */\n \"cloudflare-kv-binding\": \"unstorage/drivers/cloudflare-kv-binding\",\n /** @deprecated */\n \"cloudflare-kv-http\": \"unstorage/drivers/cloudflare-kv-http\"\n};\n\nexport { builtinDrivers, createStorage, defineDriver, joinKeys, normalizeBaseKey, normalizeKey, restoreSnapshot, snapshot };\n","function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));\n}\nlet defaultGetStoreFunc;\nfunction defaultGetStore() {\n if (!defaultGetStoreFunc) {\n defaultGetStoreFunc = createStore('keyval-store', 'keyval');\n }\n return defaultGetStoreFunc;\n}\n/**\n * Get a value by its key.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction get(key, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => promisifyRequest(store.get(key)));\n}\n/**\n * Set a value with a key.\n *\n * @param key\n * @param value\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Set multiple values at once. This is faster than calling set() multiple times.\n * It's also atomic – if one of the pairs can't be added, none will be added.\n *\n * @param entries Array of entries, where each entry is an array of `[key, value]`.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction setMany(entries, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n entries.forEach((entry) => store.put(entry[1], entry[0]));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Get multiple values by their keys\n *\n * @param keys\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction getMany(keys, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => Promise.all(keys.map((key) => promisifyRequest(store.get(key)))));\n}\n/**\n * Update a value. This lets you see the old value and update it as an atomic operation.\n *\n * @param key\n * @param updater A callback that takes the old value and returns a new value.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction update(key, updater, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => \n // Need to create the promise manually.\n // If I try to chain promises, the transaction closes in browsers\n // that use a promise polyfill (IE10/11).\n new Promise((resolve, reject) => {\n store.get(key).onsuccess = function () {\n try {\n store.put(updater(this.result), key);\n resolve(promisifyRequest(store.transaction));\n }\n catch (err) {\n reject(err);\n }\n };\n }));\n}\n/**\n * Delete a particular key from the store.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction del(key, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.delete(key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Delete multiple keys at once.\n *\n * @param keys List of keys to delete.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction delMany(keys, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n keys.forEach((key) => store.delete(key));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Clear all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction clear(customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.clear();\n return promisifyRequest(store.transaction);\n });\n}\nfunction eachCursor(store, callback) {\n store.openCursor().onsuccess = function () {\n if (!this.result)\n return;\n callback(this.result);\n this.result.continue();\n };\n return promisifyRequest(store.transaction);\n}\n/**\n * Get all keys in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction keys(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAllKeys) {\n return promisifyRequest(store.getAllKeys());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);\n });\n}\n/**\n * Get all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction values(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAll) {\n return promisifyRequest(store.getAll());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.value)).then(() => items);\n });\n}\n/**\n * Get all entries in the store. Each entry is an array of `[key, value]`.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction entries(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n // (although, hopefully we'll get a simpler path some day)\n if (store.getAll && store.getAllKeys) {\n return Promise.all([\n promisifyRequest(store.getAllKeys()),\n promisifyRequest(store.getAll()),\n ]).then(([keys, values]) => keys.map((key, i) => [key, values[i]]));\n }\n const items = [];\n return customStore('readonly', (store) => eachCursor(store, (cursor) => items.push([cursor.key, cursor.value])).then(() => items));\n });\n}\n\nexport { clear, createStore, del, delMany, entries, get, getMany, keys, promisifyRequest, set, setMany, update, values };\n","const JSONStringify = data => JSON.stringify(data, (_, value) => typeof value === \"bigint\" ? value.toString() + \"n\" : value);\nconst JSONParse = json => {\n const numbersBiggerThanMaxInt = /([\\[:])?(\\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\\}\\]])/g;\n const serializedData = json.replace(numbersBiggerThanMaxInt, \"$1\\\"$2n\\\"$3\");\n return JSON.parse(serializedData, (_, value) => {\n const isCustomFormatBigInt = typeof value === \"string\" && value.match(/^\\d+n$/);\n if (isCustomFormatBigInt)\n return BigInt(value.substring(0, value.length - 1));\n return value;\n });\n};\nexport function safeJsonParse(value) {\n if (typeof value !== \"string\") {\n throw new Error(`Cannot safe json parse value of type ${typeof value}`);\n }\n try {\n return JSONParse(value);\n }\n catch (_a) {\n return value;\n }\n}\nexport function safeJsonStringify(value) {\n return typeof value === \"string\" ? value : JSONStringify(value) || \"\";\n}\n//# sourceMappingURL=index.js.map","import{createStorage as w}from\"unstorage\";import{createStore as I,get as u,set as p,del as b,keys as v,clear as S}from\"idb-keyval\";import{safeJsonStringify as g,safeJsonParse as d}from\"@walletconnect/safe-json\";function C(i){return i}const x=\"idb-keyval\";var z=(i={})=>{const t=i.base&&i.base.length>0?`${i.base}:`:\"\",e=s=>t+s;let n;return i.dbName&&i.storeName&&(n=I(i.dbName,i.storeName)),{name:x,options:i,async hasItem(s){return!(typeof await u(e(s),n)>\"u\")},async getItem(s){return await u(e(s),n)??null},setItem(s,a){return p(e(s),a,n)},removeItem(s){return b(e(s),n)},getKeys(){return v(n)},clear(){return S(n)}}};const D=\"WALLET_CONNECT_V2_INDEXED_DB\",E=\"keyvaluestorage\";class _{constructor(){this.indexedDb=w({driver:z({dbName:D,storeName:E})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(t=>[t.key,t.value])}async getItem(t){const e=await this.indexedDb.getItem(t);if(e!==null)return e}async setItem(t,e){await this.indexedDb.setItem(t,g(e))}async removeItem(t){await this.indexedDb.removeItem(t)}}var l=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{},c={exports:{}};(function(){let i;function t(){}i=t,i.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},i.prototype.setItem=function(e,n){this[e]=String(n)},i.prototype.removeItem=function(e){delete this[e]},i.prototype.clear=function(){const e=this;Object.keys(e).forEach(function(n){e[n]=void 0,delete e[n]})},i.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},i.prototype.__defineGetter__(\"length\",function(){return Object.keys(this).length}),typeof l<\"u\"&&l.localStorage?c.exports=l.localStorage:typeof window<\"u\"&&window.localStorage?c.exports=window.localStorage:c.exports=new t})();function k(i){var t;return[i[0],d((t=i[1])!=null?t:\"\")]}class K{constructor(){this.localStorage=c.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(k)}async getItem(t){const e=this.localStorage.getItem(t);if(e!==null)return d(e)}async setItem(t,e){this.localStorage.setItem(t,g(e))}async removeItem(t){this.localStorage.removeItem(t)}}const N=\"wc_storage_version\",y=1,O=async(i,t,e)=>{const n=N,s=await t.getItem(n);if(s&&s>=y){e(t);return}const a=await i.getKeys();if(!a.length){e(t);return}const m=[];for(;a.length;){const r=a.shift();if(!r)continue;const o=r.toLowerCase();if(o.includes(\"wc@\")||o.includes(\"walletconnect\")||o.includes(\"wc_\")||o.includes(\"wallet_connect\")){const f=await i.getItem(r);await t.setItem(r,f),m.push(r)}}await t.setItem(n,y),e(t),j(i,m)},j=async(i,t)=>{t.length&&t.forEach(async e=>{await i.removeItem(e)})};class h{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const t=new K;this.storage=t;try{const e=new _;O(t,e,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(t){return await this.initialize(),this.storage.getItem(t)}async setItem(t,e){return await this.initialize(),this.storage.setItem(t,e)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const e=setInterval(()=>{this.initialized&&(clearInterval(e),t())},20)})}}export{h as KeyValueStorage,h as default};\n//# sourceMappingURL=index.es.js.map\n","export class IEvents {\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IHeartBeat = void 0;\nconst events_1 = require(\"@walletconnect/events\");\nclass IHeartBeat extends events_1.IEvents {\n constructor(opts) {\n super();\n }\n}\nexports.IHeartBeat = IHeartBeat;\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HEARTBEAT_EVENTS = exports.HEARTBEAT_INTERVAL = void 0;\nconst time_1 = require(\"@walletconnect/time\");\nexports.HEARTBEAT_INTERVAL = time_1.FIVE_SECONDS;\nexports.HEARTBEAT_EVENTS = {\n pulse: \"heartbeat_pulse\",\n};\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HeartBeat = void 0;\nconst tslib_1 = require(\"tslib\");\nconst events_1 = require(\"events\");\nconst time_1 = require(\"@walletconnect/time\");\nconst types_1 = require(\"./types\");\nconst constants_1 = require(\"./constants\");\nclass HeartBeat extends types_1.IHeartBeat {\n constructor(opts) {\n super(opts);\n this.events = new events_1.EventEmitter();\n this.interval = constants_1.HEARTBEAT_INTERVAL;\n this.interval = (opts === null || opts === void 0 ? void 0 : opts.interval) || constants_1.HEARTBEAT_INTERVAL;\n }\n static init(opts) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const heartbeat = new HeartBeat(opts);\n yield heartbeat.init();\n return heartbeat;\n });\n }\n init() {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n yield this.initialize();\n });\n }\n stop() {\n clearInterval(this.intervalRef);\n }\n on(event, listener) {\n this.events.on(event, listener);\n }\n once(event, listener) {\n this.events.once(event, listener);\n }\n off(event, listener) {\n this.events.off(event, listener);\n }\n removeListener(event, listener) {\n this.events.removeListener(event, listener);\n }\n initialize() {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n this.intervalRef = setInterval(() => this.pulse(), time_1.toMiliseconds(this.interval));\n });\n }\n pulse() {\n this.events.emit(constants_1.HEARTBEAT_EVENTS.pulse);\n }\n}\nexports.HeartBeat = HeartBeat;\n//# sourceMappingURL=heartbeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./heartbeat\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./constants\"), exports);\n//# sourceMappingURL=index.js.map","'use strict'\nfunction tryStringify (o) {\n try { return JSON.stringify(o) } catch(e) { return '\"[Circular]\"' }\n}\n\nmodule.exports = format\n\nfunction format(f, args, opts) {\n var ss = (opts && opts.stringify) || tryStringify\n var offset = 1\n if (typeof f === 'object' && f !== null) {\n var len = args.length + offset\n if (len === 1) return f\n var objects = new Array(len)\n objects[0] = ss(f)\n for (var index = 1; index < len; index++) {\n objects[index] = ss(args[index])\n }\n return objects.join(' ')\n }\n if (typeof f !== 'string') {\n return f\n }\n var argLen = args.length\n if (argLen === 0) return f\n var str = ''\n var a = 1 - offset\n var lastPos = -1\n var flen = (f && f.length) || 0\n for (var i = 0; i < flen;) {\n if (f.charCodeAt(i) === 37 && i + 1 < flen) {\n lastPos = lastPos > -1 ? lastPos : 0\n switch (f.charCodeAt(i + 1)) {\n case 100: // 'd'\n case 102: // 'f'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Number(args[a])\n lastPos = i + 2\n i++\n break\n case 105: // 'i'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Math.floor(Number(args[a]))\n lastPos = i + 2\n i++\n break\n case 79: // 'O'\n case 111: // 'o'\n case 106: // 'j'\n if (a >= argLen)\n break\n if (args[a] === undefined) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n var type = typeof args[a]\n if (type === 'string') {\n str += '\\'' + args[a] + '\\''\n lastPos = i + 2\n i++\n break\n }\n if (type === 'function') {\n str += args[a].name || ''\n lastPos = i + 2\n i++\n break\n }\n str += ss(args[a])\n lastPos = i + 2\n i++\n break\n case 115: // 's'\n if (a >= argLen)\n break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += String(args[a])\n lastPos = i + 2\n i++\n break\n case 37: // '%'\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += '%'\n lastPos = i + 2\n i++\n a--\n break\n }\n ++a\n }\n ++i\n }\n if (lastPos === -1)\n return f\n else if (lastPos < flen) {\n str += f.slice(lastPos)\n }\n\n return str\n}\n","'use strict'\n\nconst format = require('quick-format-unescaped')\n\nmodule.exports = pino\n\nconst _console = pfGlobalThisOrFallback().console || {}\nconst stdSerializers = {\n mapHttpRequest: mock,\n mapHttpResponse: mock,\n wrapRequestSerializer: passthrough,\n wrapResponseSerializer: passthrough,\n wrapErrorSerializer: passthrough,\n req: mock,\n res: mock,\n err: asErrValue\n}\n\nfunction shouldSerialize (serialize, serializers) {\n if (Array.isArray(serialize)) {\n const hasToFilter = serialize.filter(function (k) {\n return k !== '!stdSerializers.err'\n })\n return hasToFilter\n } else if (serialize === true) {\n return Object.keys(serializers)\n }\n\n return false\n}\n\nfunction pino (opts) {\n opts = opts || {}\n opts.browser = opts.browser || {}\n\n const transmit = opts.browser.transmit\n if (transmit && typeof transmit.send !== 'function') { throw Error('pino: transmit option must have a send function') }\n\n const proto = opts.browser.write || _console\n if (opts.browser.write) opts.browser.asObject = true\n const serializers = opts.serializers || {}\n const serialize = shouldSerialize(opts.browser.serialize, serializers)\n let stdErrSerialize = opts.browser.serialize\n\n if (\n Array.isArray(opts.browser.serialize) &&\n opts.browser.serialize.indexOf('!stdSerializers.err') > -1\n ) stdErrSerialize = false\n\n const levels = ['error', 'fatal', 'warn', 'info', 'debug', 'trace']\n\n if (typeof proto === 'function') {\n proto.error = proto.fatal = proto.warn =\n proto.info = proto.debug = proto.trace = proto\n }\n if (opts.enabled === false) opts.level = 'silent'\n const level = opts.level || 'info'\n const logger = Object.create(proto)\n if (!logger.log) logger.log = noop\n\n Object.defineProperty(logger, 'levelVal', {\n get: getLevelVal\n })\n Object.defineProperty(logger, 'level', {\n get: getLevel,\n set: setLevel\n })\n\n const setOpts = {\n transmit,\n serialize,\n asObject: opts.browser.asObject,\n levels,\n timestamp: getTimeFunction(opts)\n }\n logger.levels = pino.levels\n logger.level = level\n\n logger.setMaxListeners = logger.getMaxListeners =\n logger.emit = logger.addListener = logger.on =\n logger.prependListener = logger.once =\n logger.prependOnceListener = logger.removeListener =\n logger.removeAllListeners = logger.listeners =\n logger.listenerCount = logger.eventNames =\n logger.write = logger.flush = noop\n logger.serializers = serializers\n logger._serialize = serialize\n logger._stdErrSerialize = stdErrSerialize\n logger.child = child\n\n if (transmit) logger._logEvent = createLogEventShape()\n\n function getLevelVal () {\n return this.level === 'silent'\n ? Infinity\n : this.levels.values[this.level]\n }\n\n function getLevel () {\n return this._level\n }\n function setLevel (level) {\n if (level !== 'silent' && !this.levels.values[level]) {\n throw Error('unknown level ' + level)\n }\n this._level = level\n\n set(setOpts, logger, 'error', 'log') // <-- must stay first\n set(setOpts, logger, 'fatal', 'error')\n set(setOpts, logger, 'warn', 'error')\n set(setOpts, logger, 'info', 'log')\n set(setOpts, logger, 'debug', 'log')\n set(setOpts, logger, 'trace', 'log')\n }\n\n function child (bindings, childOptions) {\n if (!bindings) {\n throw new Error('missing bindings for child Pino')\n }\n childOptions = childOptions || {}\n if (serialize && bindings.serializers) {\n childOptions.serializers = bindings.serializers\n }\n const childOptionsSerializers = childOptions.serializers\n if (serialize && childOptionsSerializers) {\n var childSerializers = Object.assign({}, serializers, childOptionsSerializers)\n var childSerialize = opts.browser.serialize === true\n ? Object.keys(childSerializers)\n : serialize\n delete bindings.serializers\n applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize)\n }\n function Child (parent) {\n this._childLevel = (parent._childLevel | 0) + 1\n this.error = bind(parent, bindings, 'error')\n this.fatal = bind(parent, bindings, 'fatal')\n this.warn = bind(parent, bindings, 'warn')\n this.info = bind(parent, bindings, 'info')\n this.debug = bind(parent, bindings, 'debug')\n this.trace = bind(parent, bindings, 'trace')\n if (childSerializers) {\n this.serializers = childSerializers\n this._serialize = childSerialize\n }\n if (transmit) {\n this._logEvent = createLogEventShape(\n [].concat(parent._logEvent.bindings, bindings)\n )\n }\n }\n Child.prototype = this\n return new Child(this)\n }\n return logger\n}\n\npino.levels = {\n values: {\n fatal: 60,\n error: 50,\n warn: 40,\n info: 30,\n debug: 20,\n trace: 10\n },\n labels: {\n 10: 'trace',\n 20: 'debug',\n 30: 'info',\n 40: 'warn',\n 50: 'error',\n 60: 'fatal'\n }\n}\n\npino.stdSerializers = stdSerializers\npino.stdTimeFunctions = Object.assign({}, { nullTime, epochTime, unixTime, isoTime })\n\nfunction set (opts, logger, level, fallback) {\n const proto = Object.getPrototypeOf(logger)\n logger[level] = logger.levelVal > logger.levels.values[level]\n ? noop\n : (proto[level] ? proto[level] : (_console[level] || _console[fallback] || noop))\n\n wrap(opts, logger, level)\n}\n\nfunction wrap (opts, logger, level) {\n if (!opts.transmit && logger[level] === noop) return\n\n logger[level] = (function (write) {\n return function LOG () {\n const ts = opts.timestamp()\n const args = new Array(arguments.length)\n const proto = (Object.getPrototypeOf && Object.getPrototypeOf(this) === _console) ? _console : this\n for (var i = 0; i < args.length; i++) args[i] = arguments[i]\n\n if (opts.serialize && !opts.asObject) {\n applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize)\n }\n if (opts.asObject) write.call(proto, asObject(this, level, args, ts))\n else write.apply(proto, args)\n\n if (opts.transmit) {\n const transmitLevel = opts.transmit.level || logger.level\n const transmitValue = pino.levels.values[transmitLevel]\n const methodValue = pino.levels.values[level]\n if (methodValue < transmitValue) return\n transmit(this, {\n ts,\n methodLevel: level,\n methodValue,\n transmitLevel,\n transmitValue: pino.levels.values[opts.transmit.level || logger.level],\n send: opts.transmit.send,\n val: logger.levelVal\n }, args)\n }\n }\n })(logger[level])\n}\n\nfunction asObject (logger, level, args, ts) {\n if (logger._serialize) applySerializers(args, logger._serialize, logger.serializers, logger._stdErrSerialize)\n const argsCloned = args.slice()\n let msg = argsCloned[0]\n const o = {}\n if (ts) {\n o.time = ts\n }\n o.level = pino.levels.values[level]\n let lvl = (logger._childLevel | 0) + 1\n if (lvl < 1) lvl = 1\n // deliberate, catching objects, arrays\n if (msg !== null && typeof msg === 'object') {\n while (lvl-- && typeof argsCloned[0] === 'object') {\n Object.assign(o, argsCloned.shift())\n }\n msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : undefined\n } else if (typeof msg === 'string') msg = format(argsCloned.shift(), argsCloned)\n if (msg !== undefined) o.msg = msg\n return o\n}\n\nfunction applySerializers (args, serialize, serializers, stdErrSerialize) {\n for (const i in args) {\n if (stdErrSerialize && args[i] instanceof Error) {\n args[i] = pino.stdSerializers.err(args[i])\n } else if (typeof args[i] === 'object' && !Array.isArray(args[i])) {\n for (const k in args[i]) {\n if (serialize && serialize.indexOf(k) > -1 && k in serializers) {\n args[i][k] = serializers[k](args[i][k])\n }\n }\n }\n }\n}\n\nfunction bind (parent, bindings, level) {\n return function () {\n const args = new Array(1 + arguments.length)\n args[0] = bindings\n for (var i = 1; i < args.length; i++) {\n args[i] = arguments[i - 1]\n }\n return parent[level].apply(this, args)\n }\n}\n\nfunction transmit (logger, opts, args) {\n const send = opts.send\n const ts = opts.ts\n const methodLevel = opts.methodLevel\n const methodValue = opts.methodValue\n const val = opts.val\n const bindings = logger._logEvent.bindings\n\n applySerializers(\n args,\n logger._serialize || Object.keys(logger.serializers),\n logger.serializers,\n logger._stdErrSerialize === undefined ? true : logger._stdErrSerialize\n )\n logger._logEvent.ts = ts\n logger._logEvent.messages = args.filter(function (arg) {\n // bindings can only be objects, so reference equality check via indexOf is fine\n return bindings.indexOf(arg) === -1\n })\n\n logger._logEvent.level.label = methodLevel\n logger._logEvent.level.value = methodValue\n\n send(methodLevel, logger._logEvent, val)\n\n logger._logEvent = createLogEventShape(bindings)\n}\n\nfunction createLogEventShape (bindings) {\n return {\n ts: 0,\n messages: [],\n bindings: bindings || [],\n level: { label: '', value: 0 }\n }\n}\n\nfunction asErrValue (err) {\n const obj = {\n type: err.constructor.name,\n msg: err.message,\n stack: err.stack\n }\n for (const key in err) {\n if (obj[key] === undefined) {\n obj[key] = err[key]\n }\n }\n return obj\n}\n\nfunction getTimeFunction (opts) {\n if (typeof opts.timestamp === 'function') {\n return opts.timestamp\n }\n if (opts.timestamp === false) {\n return nullTime\n }\n return epochTime\n}\n\nfunction mock () { return {} }\nfunction passthrough (a) { return a }\nfunction noop () {}\n\nfunction nullTime () { return false }\nfunction epochTime () { return Date.now() }\nfunction unixTime () { return Math.round(Date.now() / 1000.0) }\nfunction isoTime () { return new Date(Date.now()).toISOString() } // using Date.now() for testability\n\n/* eslint-disable */\n/* istanbul ignore next */\nfunction pfGlobalThisOrFallback () {\n function defd (o) { return typeof o !== 'undefined' && o }\n try {\n if (typeof globalThis !== 'undefined') return globalThis\n Object.defineProperty(Object.prototype, 'globalThis', {\n get: function () {\n delete Object.prototype.globalThis\n return (this.globalThis = this)\n },\n configurable: true\n })\n return globalThis\n } catch (e) {\n return defd(self) || defd(window) || defd(this) || {}\n }\n}\n/* eslint-enable */\n","import h,{levels as s}from\"pino\";import{default as U}from\"pino\";import{safeJsonStringify as u}from\"@walletconnect/safe-json\";const c={level:\"info\"},n=\"custom_context\",l=1e3*1024;class O{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class d{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const t=new O(e);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}}class L{constructor(e,t=l){this.level=e??\"error\",this.levelValue=s.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new d(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===s.values.error?console.error(e):t===s.values.warn?console.warn(e):t===s.values.debug?console.debug(e):t===s.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(u({timestamp:new Date().toISOString(),log:e}));const t=typeof e==\"string\"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new d(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(u({extraMetadata:e})),new Blob(t,{type:\"application/json\"})}}class m{constructor(e,t=l){this.baseChunkLogger=new L(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),o=document.createElement(\"a\");o.href=t,o.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(t)}}class B{constructor(e,t=l){this.baseChunkLogger=new L(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var x=Object.defineProperty,S=Object.defineProperties,_=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,f=(r,e,t)=>e in r?x(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))T.call(e,t)&&f(r,t,e[t]);if(p)for(var t of p(e))z.call(e,t)&&f(r,t,e[t]);return r},g=(r,e)=>S(r,_(e));function k(r){return g(i({},r),{level:r?.level||c.level})}function v(r,e=n){return r[e]||\"\"}function b(r,e,t=n){return r[t]=e,r}function y(r,e=n){let t=\"\";return typeof r.bindings>\"u\"?t=v(r,e):t=r.bindings().context||\"\",t}function w(r,e,t=n){const o=y(r,t);return o.trim()?`${o}/${e}`:e}function E(r,e,t=n){const o=w(r,e,t),a=r.child({context:o});return b(a,o,t)}function C(r){var e,t;const o=new m((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:h(g(i({},r.opts),{level:\"trace\",browser:g(i({},(t=r.opts)==null?void 0:t.browser),{write:a=>o.write(a)})})),chunkLoggerController:o}}function I(r){var e;const t=new B((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:h(g(i({},r.opts),{level:\"trace\"}),t),chunkLoggerController:t}}function A(r){return typeof r.loggerOverride<\"u\"&&typeof r.loggerOverride!=\"string\"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<\"u\"?C(r):I(r)}export{l as MAX_LOG_SIZE_IN_BYTES_DEFAULT,n as PINO_CUSTOM_CONTEXT_KEY,c as PINO_LOGGER_DEFAULTS,w as formatChildLoggerContext,E as generateChildLogger,C as generateClientLogger,A as generatePlatformLogger,I as generateServerLogger,v as getBrowserLoggerContext,k as getDefaultLoggerOptions,y as getLoggerContext,U as pino,b as setBrowserLoggerContext};\n//# sourceMappingURL=index.es.js.map\n","import{IEvents as e}from\"@walletconnect/events\";import c,{EventEmitter as i}from\"events\";class n extends e{constructor(s){super(),this.opts=s,this.protocol=\"wc\",this.version=2}}class l{constructor(s,t,o){this.core=s,this.logger=t}}class h extends e{constructor(s,t){super(),this.core=s,this.logger=t,this.records=new Map}}class a{constructor(s,t){this.logger=s,this.core=t}}class u extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class g extends e{constructor(s){super()}}class p{constructor(s,t,o,M){this.core=s,this.logger=t,this.name=o}}class I{constructor(){this.map=new Map}}class d extends e{constructor(s,t){super(),this.relayer=s,this.logger=t}}class x{constructor(s,t){this.core=s,this.logger=t}}class E extends e{constructor(s,t){super(),this.core=s,this.logger=t}}class m{constructor(s,t){this.logger=s,this.core=t}}class y{constructor(s,t){this.projectId=s,this.logger=t}}class v{constructor(s,t){this.projectId=s,this.logger=t}}class C extends c{constructor(){super()}}class b{constructor(s){this.opts=s,this.protocol=\"wc\",this.version=2}}class S extends i{constructor(){super()}}class w{constructor(s){this.client=s}}export{n as ICore,l as ICrypto,v as IEchoClient,w as IEngine,S as IEngineEvents,E as IExpirer,h as IJsonRpcHistory,x as IKeyChain,a as IMessageTracker,m as IPairing,u as IPublisher,g as IRelayer,b as ISignClient,C as ISignClientEvents,p as IStore,d as ISubscriber,I as ISubscriberTopicMap,y as IVerify};\n//# sourceMappingURL=index.es.js.map\n","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binary_1 = require(\"@stablelib/binary\");\nvar wipe_1 = require(\"@stablelib/wipe\");\nexports.DIGEST_LENGTH = 64;\nexports.BLOCK_SIZE = 128;\n/**\n * SHA-2-512 cryptographic hash algorithm.\n */\nvar SHA512 = /** @class */ (function () {\n function SHA512() {\n /** Length of hash output */\n this.digestLength = exports.DIGEST_LENGTH;\n /** Block size */\n this.blockSize = exports.BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this._stateHi = new Int32Array(8); // hash state, high bytes\n this._stateLo = new Int32Array(8); // hash state, low bytes\n this._tempHi = new Int32Array(16); // temporary state, high bytes\n this._tempLo = new Int32Array(16); // temporary state, low bytes\n this._buffer = new Uint8Array(256); // buffer for data to hash\n this._bufferLength = 0; // number of bytes in buffer\n this._bytesHashed = 0; // number of total bytes hashed\n this._finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n SHA512.prototype._initState = function () {\n this._stateHi[0] = 0x6a09e667;\n this._stateHi[1] = 0xbb67ae85;\n this._stateHi[2] = 0x3c6ef372;\n this._stateHi[3] = 0xa54ff53a;\n this._stateHi[4] = 0x510e527f;\n this._stateHi[5] = 0x9b05688c;\n this._stateHi[6] = 0x1f83d9ab;\n this._stateHi[7] = 0x5be0cd19;\n this._stateLo[0] = 0xf3bcc908;\n this._stateLo[1] = 0x84caa73b;\n this._stateLo[2] = 0xfe94f82b;\n this._stateLo[3] = 0x5f1d36f1;\n this._stateLo[4] = 0xade682d1;\n this._stateLo[5] = 0x2b3e6c1f;\n this._stateLo[6] = 0xfb41bd6b;\n this._stateLo[7] = 0x137e2179;\n };\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n SHA512.prototype.reset = function () {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n };\n /**\n * Cleans internal buffers and resets hash state.\n */\n SHA512.prototype.clean = function () {\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._tempHi);\n wipe_1.wipe(this._tempLo);\n this.reset();\n };\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n SHA512.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this._finished) {\n throw new Error(\"SHA512: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < exports.BLOCK_SIZE && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n SHA512.prototype.finish = function (out) {\n if (!this._finished) {\n var bytesHashed = this._bytesHashed;\n var left = this._bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 128 < 112) ? 128 : 256;\n this._buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n binary_1.writeUint32BE(bitLenHi, this._buffer, padLength - 8);\n binary_1.writeUint32BE(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (var i = 0; i < this.digestLength / 8; i++) {\n binary_1.writeUint32BE(this._stateHi[i], out, i * 8);\n binary_1.writeUint32BE(this._stateLo[i], out, i * 8 + 4);\n }\n return this;\n };\n /**\n * Returns the final hash digest.\n */\n SHA512.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization. Returns hash state to be\n * used with restoreState(). Only chain value is saved, not buffers or\n * other state variables.\n */\n SHA512.prototype.saveState = function () {\n if (this._finished) {\n throw new Error(\"SHA256: cannot save finished state\");\n }\n return {\n stateHi: new Int32Array(this._stateHi),\n stateLo: new Int32Array(this._stateLo),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n };\n /**\n * Function useful for HMAC/PBKDF2 optimization. Restores state saved by\n * saveState() and sets bytesHashed to the given value.\n */\n SHA512.prototype.restoreState = function (savedState) {\n this._stateHi.set(savedState.stateHi);\n this._stateLo.set(savedState.stateLo);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n };\n /**\n * Cleans state returned by saveState().\n */\n SHA512.prototype.cleanSavedState = function (savedState) {\n wipe_1.wipe(savedState.stateHi);\n wipe_1.wipe(savedState.stateLo);\n if (savedState.buffer) {\n wipe_1.wipe(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n };\n return SHA512;\n}());\nexports.SHA512 = SHA512;\n// Constants\nvar K = new Int32Array([\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]);\nfunction hashBlocks(wh, wl, hh, hl, m, pos, len) {\n var ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];\n var h, l;\n var th, tl;\n var a, b, c, d;\n while (len >= 128) {\n for (var i = 0; i < 16; i++) {\n var j = 8 * i + pos;\n wh[i] = binary_1.readUint32BE(m, j);\n wl[i] = binary_1.readUint32BE(m, j + 4);\n }\n for (var i = 0; i < 80; i++) {\n var bh0 = ah0;\n var bh1 = ah1;\n var bh2 = ah2;\n var bh3 = ah3;\n var bh4 = ah4;\n var bh5 = ah5;\n var bh6 = ah6;\n var bh7 = ah7;\n var bl0 = al0;\n var bl1 = al1;\n var bl2 = al2;\n var bl3 = al3;\n var bl4 = al4;\n var bl5 = al5;\n var bl6 = al6;\n var bl7 = al7;\n // add\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma1\n h = ((ah4 >>> 14) | (al4 << (32 - 14))) ^ ((ah4 >>> 18) |\n (al4 << (32 - 18))) ^ ((al4 >>> (41 - 32)) | (ah4 << (32 - (41 - 32))));\n l = ((al4 >>> 14) | (ah4 << (32 - 14))) ^ ((al4 >>> 18) |\n (ah4 << (32 - 18))) ^ ((ah4 >>> (41 - 32)) | (al4 << (32 - (41 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // K\n h = K[i * 2];\n l = K[i * 2 + 1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // w\n h = wh[i % 16];\n l = wl[i % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n th = c & 0xffff | d << 16;\n tl = a & 0xffff | b << 16;\n // add\n h = th;\n l = tl;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma0\n h = ((ah0 >>> 28) | (al0 << (32 - 28))) ^ ((al0 >>> (34 - 32)) |\n (ah0 << (32 - (34 - 32)))) ^ ((al0 >>> (39 - 32)) | (ah0 << (32 - (39 - 32))));\n l = ((al0 >>> 28) | (ah0 << (32 - 28))) ^ ((ah0 >>> (34 - 32)) |\n (al0 << (32 - (34 - 32)))) ^ ((ah0 >>> (39 - 32)) | (al0 << (32 - (39 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n // add\n h = bh3;\n l = bl3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = th;\n l = tl;\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n if (i % 16 === 15) {\n for (var j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = wh[(j + 9) % 16];\n l = wl[(j + 9) % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma0\n th = wh[(j + 1) % 16];\n tl = wl[(j + 1) % 16];\n h = ((th >>> 1) | (tl << (32 - 1))) ^ ((th >>> 8) |\n (tl << (32 - 8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32 - 1))) ^ ((tl >>> 8) |\n (th << (32 - 8))) ^ ((tl >>> 7) | (th << (32 - 7)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma1\n th = wh[(j + 14) % 16];\n tl = wl[(j + 14) % 16];\n h = ((th >>> 19) | (tl << (32 - 19))) ^ ((tl >>> (61 - 32)) |\n (th << (32 - (61 - 32)))) ^ (th >>> 6);\n l = ((tl >>> 19) | (th << (32 - 19))) ^ ((th >>> (61 - 32)) |\n (tl << (32 - (61 - 32)))) ^ ((tl >>> 6) | (th << (32 - 6)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n // add\n h = ah0;\n l = al0;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[0];\n l = hl[0];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n h = ah1;\n l = al1;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[1];\n l = hl[1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n h = ah2;\n l = al2;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[2];\n l = hl[2];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n h = ah3;\n l = al3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[3];\n l = hl[3];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n h = ah4;\n l = al4;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[4];\n l = hl[4];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n h = ah5;\n l = al5;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[5];\n l = hl[5];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n h = ah6;\n l = al6;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[6];\n l = hl[6];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[7];\n l = hl[7];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n pos += 128;\n len -= 128;\n }\n return pos;\n}\nfunction hash(data) {\n var h = new SHA512();\n h.update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n//# sourceMappingURL=sha512.js.map","\"use strict\";\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = exports.verify = exports.sign = exports.extractPublicKeyFromSecretKey = exports.generateKeyPair = exports.generateKeyPairFromSeed = exports.SEED_LENGTH = exports.SECRET_KEY_LENGTH = exports.PUBLIC_KEY_LENGTH = exports.SIGNATURE_LENGTH = void 0;\n/**\n * Package ed25519 implements Ed25519 public-key signature algorithm.\n */\nconst random_1 = require(\"@stablelib/random\");\nconst sha512_1 = require(\"@stablelib/sha512\");\nconst wipe_1 = require(\"@stablelib/wipe\");\nexports.SIGNATURE_LENGTH = 64;\nexports.PUBLIC_KEY_LENGTH = 32;\nexports.SECRET_KEY_LENGTH = 64;\nexports.SEED_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst gf0 = gf();\nconst gf1 = gf([1]);\nconst D = gf([\n 0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070,\n 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203\n]);\nconst D2 = gf([\n 0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0,\n 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406\n]);\nconst X = gf([\n 0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c,\n 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169\n]);\nconst Y = gf([\n 0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666,\n 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666\n]);\nconst I = gf([\n 0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43,\n 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83\n]);\nfunction set25519(r, a) {\n for (let i = 0; i < 16; i++) {\n r[i] = a[i] | 0;\n }\n}\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction verify32(x, y) {\n let d = 0;\n for (let i = 0; i < 32; i++) {\n d |= x[i] ^ y[i];\n }\n return (1 & ((d - 1) >>> 8)) - 1;\n}\nfunction neq25519(a, b) {\n const c = new Uint8Array(32);\n const d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return verify32(c, d);\n}\nfunction par25519(a) {\n const d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 253; a >= 0; a--) {\n square(c, c);\n if (a !== 2 && a !== 4) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction pow2523(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 250; a >= 0; a--) {\n square(c, c);\n if (a !== 1) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction edadd(p, q) {\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf();\n sub(a, p[1], p[0]);\n sub(t, q[1], q[0]);\n mul(a, a, t);\n add(b, p[0], p[1]);\n add(t, q[0], q[1]);\n mul(b, b, t);\n mul(c, p[3], q[3]);\n mul(c, c, D2);\n mul(d, p[2], q[2]);\n add(d, d, d);\n sub(e, b, a);\n sub(f, d, c);\n add(g, d, c);\n add(h, b, a);\n mul(p[0], e, f);\n mul(p[1], h, g);\n mul(p[2], g, f);\n mul(p[3], e, h);\n}\nfunction cswap(p, q, b) {\n for (let i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\nfunction pack(r, p) {\n const tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n mul(tx, p[0], zi);\n mul(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\nfunction scalarmult(p, q, s) {\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (let i = 255; i >= 0; --i) {\n const b = (s[(i / 8) | 0] >> (i & 7)) & 1;\n cswap(p, q, b);\n edadd(q, p);\n edadd(p, p);\n cswap(p, q, b);\n }\n}\nfunction scalarbase(p, s) {\n const q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n mul(q[3], X, Y);\n scalarmult(p, q, s);\n}\n// Generates key pair from secret 32-byte seed.\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== exports.SEED_LENGTH) {\n throw new Error(`ed25519: seed must be ${exports.SEED_LENGTH} bytes`);\n }\n const d = (0, sha512_1.hash)(seed);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const publicKey = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n scalarbase(p, d);\n pack(publicKey, p);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n}\nexports.generateKeyPairFromSeed = generateKeyPairFromSeed;\nfunction generateKeyPair(prng) {\n const seed = (0, random_1.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0, wipe_1.wipe)(seed);\n return result;\n}\nexports.generateKeyPair = generateKeyPair;\nfunction extractPublicKeyFromSecretKey(secretKey) {\n if (secretKey.length !== exports.SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${exports.SECRET_KEY_LENGTH} bytes`);\n }\n return new Uint8Array(secretKey.subarray(32));\n}\nexports.extractPublicKeyFromSecretKey = extractPublicKeyFromSecretKey;\nconst L = new Float64Array([\n 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2,\n 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10\n]);\nfunction modL(r, x) {\n let carry;\n let i;\n let j;\n let k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = Math.floor((x[j] + 128) / 256);\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++) {\n x[j] -= carry * L[j];\n }\n for (i = 0; i < 32; i++) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\nfunction reduce(r) {\n const x = new Float64Array(64);\n for (let i = 0; i < 64; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 64; i++) {\n r[i] = 0;\n }\n modL(r, x);\n}\n// Returns 64-byte signature of the message under the 64-byte secret key.\nfunction sign(secretKey, message) {\n const x = new Float64Array(64);\n const p = [gf(), gf(), gf(), gf()];\n const d = (0, sha512_1.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const signature = new Uint8Array(64);\n signature.set(d.subarray(32), 32);\n const hs = new sha512_1.SHA512();\n hs.update(signature.subarray(32));\n hs.update(message);\n const r = hs.digest();\n hs.clean();\n reduce(r);\n scalarbase(p, r);\n pack(signature, p);\n hs.reset();\n hs.update(signature.subarray(0, 32));\n hs.update(secretKey.subarray(32));\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n for (let i = 0; i < 32; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 32; i++) {\n for (let j = 0; j < 32; j++) {\n x[i + j] += h[i] * d[j];\n }\n }\n modL(signature.subarray(32), x);\n return signature;\n}\nexports.sign = sign;\nfunction unpackneg(r, p) {\n const t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n square(num, r[1]);\n mul(den, num, D);\n sub(num, num, r[2]);\n add(den, r[2], den);\n square(den2, den);\n square(den4, den2);\n mul(den6, den4, den2);\n mul(t, den6, num);\n mul(t, t, den);\n pow2523(t, t);\n mul(t, t, num);\n mul(t, t, den);\n mul(t, t, den);\n mul(r[0], t, den);\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n mul(r[0], r[0], I);\n }\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n return -1;\n }\n if (par25519(r[0]) === (p[31] >> 7)) {\n sub(r[0], gf0, r[0]);\n }\n mul(r[3], r[0], r[1]);\n return 0;\n}\nfunction verify(publicKey, message, signature) {\n const t = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n const q = [gf(), gf(), gf(), gf()];\n if (signature.length !== exports.SIGNATURE_LENGTH) {\n throw new Error(`ed25519: signature must be ${exports.SIGNATURE_LENGTH} bytes`);\n }\n if (unpackneg(q, publicKey)) {\n return false;\n }\n const hs = new sha512_1.SHA512();\n hs.update(signature.subarray(0, 32));\n hs.update(publicKey);\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n scalarmult(p, q, h);\n scalarbase(q, signature.subarray(32));\n edadd(p, q);\n pack(t, p);\n if (verify32(signature, t)) {\n return false;\n }\n return true;\n}\nexports.verify = verify;\n/**\n * Convert Ed25519 public key to X25519 public key.\n *\n * Throws if given an invalid public key.\n */\nfunction convertPublicKeyToX25519(publicKey) {\n let q = [gf(), gf(), gf(), gf()];\n if (unpackneg(q, publicKey)) {\n throw new Error(\"Ed25519: invalid public key\");\n }\n // Formula: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p\n let a = gf();\n let b = gf();\n let y = q[1];\n add(a, gf1, y);\n sub(b, gf1, y);\n inv25519(b, b);\n mul(a, a, b);\n let z = new Uint8Array(32);\n pack25519(z, a);\n return z;\n}\nexports.convertPublicKeyToX25519 = convertPublicKeyToX25519;\n/**\n * Convert Ed25519 secret (private) key to X25519 secret key.\n */\nfunction convertSecretKeyToX25519(secretKey) {\n const d = (0, sha512_1.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const o = new Uint8Array(d.subarray(0, 32));\n (0, wipe_1.wipe)(d);\n return o;\n}\nexports.convertSecretKeyToX25519 = convertSecretKeyToX25519;\n//# sourceMappingURL=ed25519.js.map","export const JWT_IRIDIUM_ALG = \"EdDSA\";\nexport const JWT_IRIDIUM_TYP = \"JWT\";\nexport const JWT_DELIMITER = \".\";\nexport const JWT_ENCODING = \"base64url\";\nexport const JSON_ENCODING = \"utf8\";\nexport const DATA_ENCODING = \"utf8\";\nexport const DID_DELIMITER = \":\";\nexport const DID_PREFIX = \"did\";\nexport const DID_METHOD = \"key\";\nexport const MULTICODEC_ED25519_ENCODING = \"base58btc\";\nexport const MULTICODEC_ED25519_BASE = \"z\";\nexport const MULTICODEC_ED25519_HEADER = \"K36\";\nexport const MULTICODEC_ED25519_LENGTH = 32;\nexport const KEY_PAIR_SEED_LENGTH = 32;\n//# sourceMappingURL=constants.js.map","import { concat } from \"uint8arrays/concat\";\nimport { toString } from \"uint8arrays/to-string\";\nimport { fromString } from \"uint8arrays/from-string\";\nimport { safeJsonParse, safeJsonStringify } from \"@walletconnect/safe-json\";\nimport { DATA_ENCODING, DID_DELIMITER, DID_METHOD, DID_PREFIX, JSON_ENCODING, JWT_DELIMITER, JWT_ENCODING, MULTICODEC_ED25519_BASE, MULTICODEC_ED25519_ENCODING, MULTICODEC_ED25519_HEADER, MULTICODEC_ED25519_LENGTH, } from \"./constants\";\nexport function decodeJSON(str) {\n return safeJsonParse(toString(fromString(str, JWT_ENCODING), JSON_ENCODING));\n}\nexport function encodeJSON(val) {\n return toString(fromString(safeJsonStringify(val), JSON_ENCODING), JWT_ENCODING);\n}\nexport function encodeIss(publicKey) {\n const header = fromString(MULTICODEC_ED25519_HEADER, MULTICODEC_ED25519_ENCODING);\n const multicodec = MULTICODEC_ED25519_BASE +\n toString(concat([header, publicKey]), MULTICODEC_ED25519_ENCODING);\n return [DID_PREFIX, DID_METHOD, multicodec].join(DID_DELIMITER);\n}\nexport function decodeIss(issuer) {\n const [prefix, method, multicodec] = issuer.split(DID_DELIMITER);\n if (prefix !== DID_PREFIX || method !== DID_METHOD) {\n throw new Error(`Issuer must be a DID with method \"key\"`);\n }\n const base = multicodec.slice(0, 1);\n if (base !== MULTICODEC_ED25519_BASE) {\n throw new Error(`Issuer must be a key in mulicodec format`);\n }\n const bytes = fromString(multicodec.slice(1), MULTICODEC_ED25519_ENCODING);\n const type = toString(bytes.slice(0, 2), MULTICODEC_ED25519_ENCODING);\n if (type !== MULTICODEC_ED25519_HEADER) {\n throw new Error(`Issuer must be a public key with type \"Ed25519\"`);\n }\n const publicKey = bytes.slice(2);\n if (publicKey.length !== MULTICODEC_ED25519_LENGTH) {\n throw new Error(`Issuer must be a public key with length 32 bytes`);\n }\n return publicKey;\n}\nexport function encodeSig(bytes) {\n return toString(bytes, JWT_ENCODING);\n}\nexport function decodeSig(encoded) {\n return fromString(encoded, JWT_ENCODING);\n}\nexport function encodeData(params) {\n return fromString([encodeJSON(params.header), encodeJSON(params.payload)].join(JWT_DELIMITER), DATA_ENCODING);\n}\nexport function decodeData(data) {\n const params = toString(data, DATA_ENCODING).split(JWT_DELIMITER);\n const header = decodeJSON(params[0]);\n const payload = decodeJSON(params[1]);\n return { header, payload };\n}\nexport function encodeJWT(params) {\n return [\n encodeJSON(params.header),\n encodeJSON(params.payload),\n encodeSig(params.signature),\n ].join(JWT_DELIMITER);\n}\nexport function decodeJWT(jwt) {\n const params = jwt.split(JWT_DELIMITER);\n const header = decodeJSON(params[0]);\n const payload = decodeJSON(params[1]);\n const signature = decodeSig(params[2]);\n const data = fromString(params.slice(0, 2).join(JWT_DELIMITER), DATA_ENCODING);\n return { header, payload, signature, data };\n}\n//# sourceMappingURL=utils.js.map","import * as ed25519 from \"@stablelib/ed25519\";\nimport { randomBytes } from \"@stablelib/random\";\nimport { fromMiliseconds } from \"@walletconnect/time\";\nimport { JWT_IRIDIUM_ALG, JWT_IRIDIUM_TYP, KEY_PAIR_SEED_LENGTH, } from \"./constants\";\nimport { decodeIss, decodeJWT, encodeData, encodeIss, encodeJWT, } from \"./utils\";\nexport function generateKeyPair(seed = randomBytes(KEY_PAIR_SEED_LENGTH)) {\n return ed25519.generateKeyPairFromSeed(seed);\n}\nexport async function signJWT(sub, aud, ttl, keyPair, iat = fromMiliseconds(Date.now())) {\n const header = { alg: JWT_IRIDIUM_ALG, typ: JWT_IRIDIUM_TYP };\n const iss = encodeIss(keyPair.publicKey);\n const exp = iat + ttl;\n const payload = { iss, sub, aud, iat, exp };\n const data = encodeData({ header, payload });\n const signature = ed25519.sign(keyPair.secretKey, data);\n return encodeJWT({ header, payload, signature });\n}\nexport async function verifyJWT(jwt) {\n const { header, payload, data, signature } = decodeJWT(jwt);\n if (header.alg !== JWT_IRIDIUM_ALG || header.typ !== JWT_IRIDIUM_TYP) {\n throw new Error(\"JWT must use EdDSA algorithm\");\n }\n const publicKey = decodeIss(payload.iss);\n return ed25519.verify(publicKey, data, signature);\n}\n//# sourceMappingURL=api.js.map","export const PARSE_ERROR = \"PARSE_ERROR\";\nexport const INVALID_REQUEST = \"INVALID_REQUEST\";\nexport const METHOD_NOT_FOUND = \"METHOD_NOT_FOUND\";\nexport const INVALID_PARAMS = \"INVALID_PARAMS\";\nexport const INTERNAL_ERROR = \"INTERNAL_ERROR\";\nexport const SERVER_ERROR = \"SERVER_ERROR\";\nexport const RESERVED_ERROR_CODES = [-32700, -32600, -32601, -32602, -32603];\nexport const SERVER_ERROR_CODE_RANGE = [-32000, -32099];\nexport const STANDARD_ERROR_MAP = {\n [PARSE_ERROR]: { code: -32700, message: \"Parse error\" },\n [INVALID_REQUEST]: { code: -32600, message: \"Invalid Request\" },\n [METHOD_NOT_FOUND]: { code: -32601, message: \"Method not found\" },\n [INVALID_PARAMS]: { code: -32602, message: \"Invalid params\" },\n [INTERNAL_ERROR]: { code: -32603, message: \"Internal error\" },\n [SERVER_ERROR]: { code: -32000, message: \"Server error\" },\n};\nexport const DEFAULT_ERROR = SERVER_ERROR;\n//# sourceMappingURL=constants.js.map","import { SERVER_ERROR_CODE_RANGE, RESERVED_ERROR_CODES, STANDARD_ERROR_MAP, DEFAULT_ERROR, } from \"./constants\";\nexport function isServerErrorCode(code) {\n return code <= SERVER_ERROR_CODE_RANGE[0] && code >= SERVER_ERROR_CODE_RANGE[1];\n}\nexport function isReservedErrorCode(code) {\n return RESERVED_ERROR_CODES.includes(code);\n}\nexport function isValidErrorCode(code) {\n return typeof code === \"number\";\n}\nexport function getError(type) {\n if (!Object.keys(STANDARD_ERROR_MAP).includes(type)) {\n return STANDARD_ERROR_MAP[DEFAULT_ERROR];\n }\n return STANDARD_ERROR_MAP[type];\n}\nexport function getErrorByCode(code) {\n const match = Object.values(STANDARD_ERROR_MAP).find(e => e.code === code);\n if (!match) {\n return STANDARD_ERROR_MAP[DEFAULT_ERROR];\n }\n return match;\n}\nexport function validateJsonRpcError(response) {\n if (typeof response.error.code === \"undefined\") {\n return { valid: false, error: \"Missing code for JSON-RPC error\" };\n }\n if (typeof response.error.message === \"undefined\") {\n return { valid: false, error: \"Missing message for JSON-RPC error\" };\n }\n if (!isValidErrorCode(response.error.code)) {\n return {\n valid: false,\n error: `Invalid error code type for JSON-RPC: ${response.error.code}`,\n };\n }\n if (isReservedErrorCode(response.error.code)) {\n const error = getErrorByCode(response.error.code);\n if (error.message !== STANDARD_ERROR_MAP[DEFAULT_ERROR].message &&\n response.error.message === error.message) {\n return {\n valid: false,\n error: `Invalid error code message for JSON-RPC: ${response.error.code}`,\n };\n }\n }\n return { valid: true };\n}\nexport function parseConnectionError(e, url, type) {\n return e.message.includes(\"getaddrinfo ENOTFOUND\") || e.message.includes(\"connect ECONNREFUSED\")\n ? new Error(`Unavailable ${type} RPC url at ${url}`)\n : e;\n}\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBrowserCryptoAvailable = exports.getSubtleCrypto = exports.getBrowerCrypto = void 0;\nfunction getBrowerCrypto() {\n return (global === null || global === void 0 ? void 0 : global.crypto) || (global === null || global === void 0 ? void 0 : global.msCrypto) || {};\n}\nexports.getBrowerCrypto = getBrowerCrypto;\nfunction getSubtleCrypto() {\n const browserCrypto = getBrowerCrypto();\n return browserCrypto.subtle || browserCrypto.webkitSubtle;\n}\nexports.getSubtleCrypto = getSubtleCrypto;\nfunction isBrowserCryptoAvailable() {\n return !!getBrowerCrypto() && !!getSubtleCrypto();\n}\nexports.isBrowserCryptoAvailable = isBrowserCryptoAvailable;\n//# sourceMappingURL=crypto.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBrowser = exports.isNode = exports.isReactNative = void 0;\nfunction isReactNative() {\n return (typeof document === \"undefined\" &&\n typeof navigator !== \"undefined\" &&\n navigator.product === \"ReactNative\");\n}\nexports.isReactNative = isReactNative;\nfunction isNode() {\n return (typeof process !== \"undefined\" &&\n typeof process.versions !== \"undefined\" &&\n typeof process.versions.node !== \"undefined\");\n}\nexports.isNode = isNode;\nfunction isBrowser() {\n return !isReactNative() && !isNode();\n}\nexports.isBrowser = isBrowser;\n//# sourceMappingURL=env.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./crypto\"), exports);\ntslib_1.__exportStar(require(\"./env\"), exports);\n//# sourceMappingURL=index.js.map","import { getError, getErrorByCode, isReservedErrorCode } from \"./error\";\nimport { INTERNAL_ERROR, SERVER_ERROR } from \"./constants\";\nexport function payloadId(entropy = 3) {\n const date = Date.now() * Math.pow(10, entropy);\n const extra = Math.floor(Math.random() * Math.pow(10, entropy));\n return date + extra;\n}\nexport function getBigIntRpcId(entropy = 6) {\n return BigInt(payloadId(entropy));\n}\nexport function formatJsonRpcRequest(method, params, id) {\n return {\n id: id || payloadId(),\n jsonrpc: \"2.0\",\n method,\n params,\n };\n}\nexport function formatJsonRpcResult(id, result) {\n return {\n id,\n jsonrpc: \"2.0\",\n result,\n };\n}\nexport function formatJsonRpcError(id, error, data) {\n return {\n id,\n jsonrpc: \"2.0\",\n error: formatErrorMessage(error, data),\n };\n}\nexport function formatErrorMessage(error, data) {\n if (typeof error === \"undefined\") {\n return getError(INTERNAL_ERROR);\n }\n if (typeof error === \"string\") {\n error = Object.assign(Object.assign({}, getError(SERVER_ERROR)), { message: error });\n }\n if (typeof data !== \"undefined\") {\n error.data = data;\n }\n if (isReservedErrorCode(error.code)) {\n error = getErrorByCode(error.code);\n }\n return error;\n}\n//# sourceMappingURL=format.js.map","class e{}class o extends e{constructor(c){super()}}class n extends e{constructor(){super()}}class r extends n{constructor(c){super()}}export{n as IBaseJsonRpcProvider,e as IEvents,o as IJsonRpcConnection,r as IJsonRpcProvider};\n//# sourceMappingURL=index.es.js.map\n","const HTTP_REGEX = \"^https?:\";\nconst WS_REGEX = \"^wss?:\";\nfunction getUrlProtocol(url) {\n const matches = url.match(new RegExp(/^\\w+:/, \"gi\"));\n if (!matches || !matches.length)\n return;\n return matches[0];\n}\nfunction matchRegexProtocol(url, regex) {\n const protocol = getUrlProtocol(url);\n if (typeof protocol === \"undefined\")\n return false;\n return new RegExp(regex).test(protocol);\n}\nexport function isHttpUrl(url) {\n return matchRegexProtocol(url, HTTP_REGEX);\n}\nexport function isWsUrl(url) {\n return matchRegexProtocol(url, WS_REGEX);\n}\nexport function isLocalhostUrl(url) {\n return new RegExp(\"wss?://localhost(:d{2,5})?\").test(url);\n}\n//# sourceMappingURL=url.js.map","export function isJsonRpcPayload(payload) {\n return (typeof payload === \"object\" &&\n \"id\" in payload &&\n \"jsonrpc\" in payload &&\n payload.jsonrpc === \"2.0\");\n}\nexport function isJsonRpcRequest(payload) {\n return isJsonRpcPayload(payload) && \"method\" in payload;\n}\nexport function isJsonRpcResponse(payload) {\n return isJsonRpcPayload(payload) && (isJsonRpcResult(payload) || isJsonRpcError(payload));\n}\nexport function isJsonRpcResult(payload) {\n return \"result\" in payload;\n}\nexport function isJsonRpcError(payload) {\n return \"error\" in payload;\n}\nexport function isJsonRpcValidationInvalid(validation) {\n return \"error\" in validation && validation.valid === false;\n}\n//# sourceMappingURL=validators.js.map","import { EventEmitter } from \"events\";\nimport { IJsonRpcProvider, isJsonRpcResponse, formatJsonRpcRequest, isJsonRpcError, getBigIntRpcId, } from \"@walletconnect/jsonrpc-utils\";\nexport class JsonRpcProvider extends IJsonRpcProvider {\n constructor(connection) {\n super(connection);\n this.events = new EventEmitter();\n this.hasRegisteredEventListeners = false;\n this.connection = this.setConnection(connection);\n if (this.connection.connected) {\n this.registerEventListeners();\n }\n }\n async connect(connection = this.connection) {\n await this.open(connection);\n }\n async disconnect() {\n await this.close();\n }\n on(event, listener) {\n this.events.on(event, listener);\n }\n once(event, listener) {\n this.events.once(event, listener);\n }\n off(event, listener) {\n this.events.off(event, listener);\n }\n removeListener(event, listener) {\n this.events.removeListener(event, listener);\n }\n async request(request, context) {\n return this.requestStrict(formatJsonRpcRequest(request.method, request.params || [], request.id || getBigIntRpcId().toString()), context);\n }\n async requestStrict(request, context) {\n return new Promise(async (resolve, reject) => {\n if (!this.connection.connected) {\n try {\n await this.open();\n }\n catch (e) {\n reject(e);\n }\n }\n this.events.on(`${request.id}`, response => {\n if (isJsonRpcError(response)) {\n reject(response.error);\n }\n else {\n resolve(response.result);\n }\n });\n try {\n await this.connection.send(request, context);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n setConnection(connection = this.connection) {\n return connection;\n }\n onPayload(payload) {\n this.events.emit(\"payload\", payload);\n if (isJsonRpcResponse(payload)) {\n this.events.emit(`${payload.id}`, payload);\n }\n else {\n this.events.emit(\"message\", {\n type: payload.method,\n data: payload.params,\n });\n }\n }\n onClose(event) {\n if (event && event.code === 3000) {\n this.events.emit(\"error\", new Error(`WebSocket connection closed abnormally with code: ${event.code} ${event.reason ? `(${event.reason})` : \"\"}`));\n }\n this.events.emit(\"disconnect\");\n }\n async open(connection = this.connection) {\n if (this.connection === connection && this.connection.connected)\n return;\n if (this.connection.connected)\n this.close();\n if (typeof connection === \"string\") {\n await this.connection.open(connection);\n connection = this.connection;\n }\n this.connection = this.setConnection(connection);\n await this.connection.open();\n this.registerEventListeners();\n this.events.emit(\"connect\");\n }\n async close() {\n await this.connection.close();\n }\n registerEventListeners() {\n if (this.hasRegisteredEventListeners)\n return;\n this.connection.on(\"payload\", (payload) => this.onPayload(payload));\n this.connection.on(\"close\", (event) => this.onClose(event));\n this.connection.on(\"error\", (error) => this.events.emit(\"error\", error));\n this.connection.on(\"register_error\", (error) => this.onClose());\n this.hasRegisteredEventListeners = true;\n }\n}\nexport default JsonRpcProvider;\n//# sourceMappingURL=provider.js.map","import{EventEmitter as u}from\"events\";import{safeJsonStringify as p,safeJsonParse as g}from\"@walletconnect/safe-json\";import{isWsUrl as d,isReactNative as y,isLocalhostUrl as m,formatJsonRpcError as k,parseConnectionError as v}from\"@walletconnect/jsonrpc-utils\";const w=()=>typeof WebSocket<\"u\"?WebSocket:typeof global<\"u\"&&typeof global.WebSocket<\"u\"?global.WebSocket:typeof window<\"u\"&&typeof window.WebSocket<\"u\"?window.WebSocket:typeof self<\"u\"&&typeof self.WebSocket<\"u\"?self.WebSocket:require(\"ws\"),b=()=>typeof WebSocket<\"u\"||typeof global<\"u\"&&typeof global.WebSocket<\"u\"||typeof window<\"u\"&&typeof window.WebSocket<\"u\"||typeof self<\"u\"&&typeof self.WebSocket<\"u\",a=c=>c.split(\"?\")[0],h=10,S=w();class f{constructor(e){if(this.url=e,this.events=new u,this.registering=!1,!d(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<\"u\"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>\"u\"){t(new Error(\"Connection already closed\"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>\"u\"&&(this.socket=await this.register());try{this.socket.send(p(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!d(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount(\"register_error\")>=t||this.events.listenerCount(\"open\")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,o)=>{this.events.once(\"register_error\",s=>{this.resetMaxListeners(),o(s)}),this.events.once(\"open\",()=>{if(this.resetMaxListeners(),typeof this.socket>\"u\")return o(new Error(\"WebSocket connection is missing or invalid\"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const o=new URLSearchParams(e).get(\"origin\"),s=y()?{headers:{origin:o}}:{rejectUnauthorized:!m(e)},i=new S(e,[],s);b()?i.onerror=r=>{const l=r;n(this.emitError(l.error))}:i.on(\"error\",r=>{n(this.emitError(r))}),i.onopen=()=>{this.onOpen(i),t(i)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit(\"open\")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit(\"close\",e)}onPayload(e){if(typeof e.data>\"u\")return;const t=typeof e.data==\"string\"?g(e.data):e.data;this.events.emit(\"payload\",t)}onError(e,t){const n=this.parseError(t),o=n.message||n.toString(),s=k(e,o);this.events.emit(\"payload\",s)}parseError(e,t=this.url){return v(e,a(t),\"WS\")}resetMaxListeners(){this.events.getMaxListeners()>h&&this.events.setMaxListeners(h)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${a(this.url)}`));return this.events.emit(\"register_error\",t),t}}export{f as WsConnection,f as default};\n//# sourceMappingURL=index.es.js.map\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","export default function(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||\"get\",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t}),t(a())},s.onerror=r,s.withCredentials=\"include\"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null)})}\n//# sourceMappingURL=unfetch.module.js.map\n","module.exports = self.fetch || (self.fetch = require('unfetch').default || require('unfetch'));\n","import Xt,{EventEmitter as U}from\"events\";import Wt from\"@walletconnect/keyvaluestorage\";import{HEARTBEAT_EVENTS as G,HeartBeat as Qt}from\"@walletconnect/heartbeat\";import{generateChildLogger as b,getLoggerContext as E,pino as ye,getDefaultLoggerOptions as me}from\"@walletconnect/logger\";import{IMessageTracker as Zt,IPublisher as ei,ISubscriber as ti,IRelayer as ii,IStore as si,IJsonRpcHistory as ri,IExpirer as ni,IVerify as oi,IEchoClient as ai,ICore as hi}from\"@walletconnect/types\";import{safeJsonStringify as ci,safeJsonParse as ui}from\"@walletconnect/safe-json\";import*as Y from\"@walletconnect/relay-auth\";import{getInternalError as c,mapToObj as be,objToMap as fe,generateKeyPair as li,generateRandomBytes32 as ie,deriveSymKey as di,hashKey as gi,validateEncoding as pi,isTypeOneEnvelope as Ee,encrypt as Di,validateDecoding as yi,decrypt as mi,deserialize as we,decodeTypeByte as bi,BASE16 as fi,hashMessage as se,getRelayProtocolName as re,createExpiringPromise as k,getRelayProtocolApi as H,isUndefined as ne,getSdkError as K,isValidArray as Ei,getBundleId as wi,isOnline as ve,formatRelayRpcUrl as vi,subscribeToNetworkChange as Ii,isProposalStruct as Ci,isSessionStruct as Ri,TYPE_1 as _i,calcExpiry as J,formatUri as Ti,parseUri as Ie,createDelayedPromise as Si,engineEvent as oe,isExpired as Ce,isValidParams as ae,isValidUrl as Pi,isValidString as xi,parseExpirerTarget as Oi,formatTopicTarget as Ai,formatIdTarget as zi,isReactNative as Ni,isBrowser as Ui,isNode as Li}from\"@walletconnect/utils\";import{toString as $i}from\"uint8arrays\";import{ONE_DAY as L,SIX_HOURS as Fi,ONE_SECOND as Re,THIRTY_DAYS as X,FIVE_SECONDS as _e,THIRTY_SECONDS as Te,toMiliseconds as N,TEN_SECONDS as Mi,Watch as ki,FIVE_MINUTES as Se}from\"@walletconnect/time\";import{JsonRpcProvider as Ki}from\"@walletconnect/jsonrpc-provider\";import{getBigIntRpcId as Bi,isJsonRpcRequest as Pe,isJsonRpcResponse as xe,formatJsonRpcResult as Oe,formatJsonRpcRequest as Ae,formatJsonRpcError as Vi,isJsonRpcResult as qi,isJsonRpcError as ze}from\"@walletconnect/jsonrpc-utils\";import ji from\"@walletconnect/jsonrpc-ws-connection\";import Gi from\"lodash.isequal\";import Yi from\"isomorphic-unfetch\";function Hi(n,e){if(n.length>=255)throw new TypeError(\"Alphabet too long\");for(var t=new Uint8Array(256),i=0;i>>0,f=new Uint8Array(T);I!==_;){for(var S=u[I],A=0,C=T-1;(S!==0||A>>0,f[C]=S%a>>>0,S=S/a>>>0;if(S!==0)throw new Error(\"Non-zero carry\");z=A,I++}for(var x=T-z;x!==T&&f[x]===0;)x++;for(var j=h.repeat(m);x>>0,T=new Uint8Array(_);u[m];){var f=t[u.charCodeAt(m)];if(f===255)return;for(var S=0,A=_-1;(f!==0||S>>0,T[A]=f%256>>>0,f=f/256>>>0;if(f!==0)throw new Error(\"Non-zero carry\");I=S,m++}if(u[m]!==\" \"){for(var C=_-I;C!==_&&T[C]===0;)C++;for(var x=new Uint8Array(z+(_-C)),j=z;C!==_;)x[j++]=T[C++];return x}}}function M(u){var m=y(u);if(m)return m;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:y,decode:M}}var Ji=Hi,Xi=Ji;const Ne=n=>{if(n instanceof Uint8Array&&n.constructor.name===\"Uint8Array\")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error(\"Unknown type, must be binary type\")},Wi=n=>new TextEncoder().encode(n),Qi=n=>new TextDecoder().decode(n);class Zi{constructor(e,t,i){this.name=e,this.prefix=t,this.baseEncode=i}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\"Unknown type, must be binary type\")}}class es{constructor(e,t,i){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error(\"Invalid prefix character\");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(e){if(typeof e==\"string\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\"Can only multibase decode strings\")}or(e){return Ue(this,e)}}class ts{constructor(e){this.decoders=e}or(e){return Ue(this,e)}decode(e){const t=e[0],i=this.decoders[t];if(i)return i.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ue=(n,e)=>new ts({...n.decoders||{[n.prefix]:n},...e.decoders||{[e.prefix]:e}});class is{constructor(e,t,i,s){this.name=e,this.prefix=t,this.baseEncode=i,this.baseDecode=s,this.encoder=new Zi(e,t,i),this.decoder=new es(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const W=({name:n,prefix:e,encode:t,decode:i})=>new is(n,e,t,i),B=({prefix:n,name:e,alphabet:t})=>{const{encode:i,decode:s}=Xi(t,e);return W({prefix:n,name:e,encode:i,decode:r=>Ne(s(r))})},ss=(n,e,t,i)=>{const s={};for(let d=0;d=8&&(a-=8,o[l++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError(\"Unexpected end of data\");return o},rs=(n,e,t)=>{const i=e[e.length-1]===\"=\",s=(1<t;)o-=t,r+=e[s&a>>o];if(o&&(r+=e[s&a<W({prefix:e,name:n,encode(s){return rs(s,i,t)},decode(s){return ss(s,i,t,n)}}),ns=W({prefix:\"\\0\",name:\"identity\",encode:n=>Qi(n),decode:n=>Wi(n)});var os=Object.freeze({__proto__:null,identity:ns});const as=g({prefix:\"0\",name:\"base2\",alphabet:\"01\",bitsPerChar:1});var hs=Object.freeze({__proto__:null,base2:as});const cs=g({prefix:\"7\",name:\"base8\",alphabet:\"01234567\",bitsPerChar:3});var us=Object.freeze({__proto__:null,base8:cs});const ls=B({prefix:\"9\",name:\"base10\",alphabet:\"0123456789\"});var ds=Object.freeze({__proto__:null,base10:ls});const gs=g({prefix:\"f\",name:\"base16\",alphabet:\"0123456789abcdef\",bitsPerChar:4}),ps=g({prefix:\"F\",name:\"base16upper\",alphabet:\"0123456789ABCDEF\",bitsPerChar:4});var Ds=Object.freeze({__proto__:null,base16:gs,base16upper:ps});const ys=g({prefix:\"b\",name:\"base32\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567\",bitsPerChar:5}),ms=g({prefix:\"B\",name:\"base32upper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\",bitsPerChar:5}),bs=g({prefix:\"c\",name:\"base32pad\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567=\",bitsPerChar:5}),fs=g({prefix:\"C\",name:\"base32padupper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\",bitsPerChar:5}),Es=g({prefix:\"v\",name:\"base32hex\",alphabet:\"0123456789abcdefghijklmnopqrstuv\",bitsPerChar:5}),ws=g({prefix:\"V\",name:\"base32hexupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV\",bitsPerChar:5}),vs=g({prefix:\"t\",name:\"base32hexpad\",alphabet:\"0123456789abcdefghijklmnopqrstuv=\",bitsPerChar:5}),Is=g({prefix:\"T\",name:\"base32hexpadupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\",bitsPerChar:5}),Cs=g({prefix:\"h\",name:\"base32z\",alphabet:\"ybndrfg8ejkmcpqxot1uwisza345h769\",bitsPerChar:5});var Rs=Object.freeze({__proto__:null,base32:ys,base32upper:ms,base32pad:bs,base32padupper:fs,base32hex:Es,base32hexupper:ws,base32hexpad:vs,base32hexpadupper:Is,base32z:Cs});const _s=B({prefix:\"k\",name:\"base36\",alphabet:\"0123456789abcdefghijklmnopqrstuvwxyz\"}),Ts=B({prefix:\"K\",name:\"base36upper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"});var Ss=Object.freeze({__proto__:null,base36:_s,base36upper:Ts});const Ps=B({name:\"base58btc\",prefix:\"z\",alphabet:\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"}),xs=B({name:\"base58flickr\",prefix:\"Z\",alphabet:\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"});var Os=Object.freeze({__proto__:null,base58btc:Ps,base58flickr:xs});const As=g({prefix:\"m\",name:\"base64\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",bitsPerChar:6}),zs=g({prefix:\"M\",name:\"base64pad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",bitsPerChar:6}),Ns=g({prefix:\"u\",name:\"base64url\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\",bitsPerChar:6}),Us=g({prefix:\"U\",name:\"base64urlpad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\",bitsPerChar:6});var Ls=Object.freeze({__proto__:null,base64:As,base64pad:zs,base64url:Ns,base64urlpad:Us});const Le=Array.from(\"\\u{1F680}\\u{1FA90}\\u2604\\u{1F6F0}\\u{1F30C}\\u{1F311}\\u{1F312}\\u{1F313}\\u{1F314}\\u{1F315}\\u{1F316}\\u{1F317}\\u{1F318}\\u{1F30D}\\u{1F30F}\\u{1F30E}\\u{1F409}\\u2600\\u{1F4BB}\\u{1F5A5}\\u{1F4BE}\\u{1F4BF}\\u{1F602}\\u2764\\u{1F60D}\\u{1F923}\\u{1F60A}\\u{1F64F}\\u{1F495}\\u{1F62D}\\u{1F618}\\u{1F44D}\\u{1F605}\\u{1F44F}\\u{1F601}\\u{1F525}\\u{1F970}\\u{1F494}\\u{1F496}\\u{1F499}\\u{1F622}\\u{1F914}\\u{1F606}\\u{1F644}\\u{1F4AA}\\u{1F609}\\u263A\\u{1F44C}\\u{1F917}\\u{1F49C}\\u{1F614}\\u{1F60E}\\u{1F607}\\u{1F339}\\u{1F926}\\u{1F389}\\u{1F49E}\\u270C\\u2728\\u{1F937}\\u{1F631}\\u{1F60C}\\u{1F338}\\u{1F64C}\\u{1F60B}\\u{1F497}\\u{1F49A}\\u{1F60F}\\u{1F49B}\\u{1F642}\\u{1F493}\\u{1F929}\\u{1F604}\\u{1F600}\\u{1F5A4}\\u{1F603}\\u{1F4AF}\\u{1F648}\\u{1F447}\\u{1F3B6}\\u{1F612}\\u{1F92D}\\u2763\\u{1F61C}\\u{1F48B}\\u{1F440}\\u{1F62A}\\u{1F611}\\u{1F4A5}\\u{1F64B}\\u{1F61E}\\u{1F629}\\u{1F621}\\u{1F92A}\\u{1F44A}\\u{1F973}\\u{1F625}\\u{1F924}\\u{1F449}\\u{1F483}\\u{1F633}\\u270B\\u{1F61A}\\u{1F61D}\\u{1F634}\\u{1F31F}\\u{1F62C}\\u{1F643}\\u{1F340}\\u{1F337}\\u{1F63B}\\u{1F613}\\u2B50\\u2705\\u{1F97A}\\u{1F308}\\u{1F608}\\u{1F918}\\u{1F4A6}\\u2714\\u{1F623}\\u{1F3C3}\\u{1F490}\\u2639\\u{1F38A}\\u{1F498}\\u{1F620}\\u261D\\u{1F615}\\u{1F33A}\\u{1F382}\\u{1F33B}\\u{1F610}\\u{1F595}\\u{1F49D}\\u{1F64A}\\u{1F639}\\u{1F5E3}\\u{1F4AB}\\u{1F480}\\u{1F451}\\u{1F3B5}\\u{1F91E}\\u{1F61B}\\u{1F534}\\u{1F624}\\u{1F33C}\\u{1F62B}\\u26BD\\u{1F919}\\u2615\\u{1F3C6}\\u{1F92B}\\u{1F448}\\u{1F62E}\\u{1F646}\\u{1F37B}\\u{1F343}\\u{1F436}\\u{1F481}\\u{1F632}\\u{1F33F}\\u{1F9E1}\\u{1F381}\\u26A1\\u{1F31E}\\u{1F388}\\u274C\\u270A\\u{1F44B}\\u{1F630}\\u{1F928}\\u{1F636}\\u{1F91D}\\u{1F6B6}\\u{1F4B0}\\u{1F353}\\u{1F4A2}\\u{1F91F}\\u{1F641}\\u{1F6A8}\\u{1F4A8}\\u{1F92C}\\u2708\\u{1F380}\\u{1F37A}\\u{1F913}\\u{1F619}\\u{1F49F}\\u{1F331}\\u{1F616}\\u{1F476}\\u{1F974}\\u25B6\\u27A1\\u2753\\u{1F48E}\\u{1F4B8}\\u2B07\\u{1F628}\\u{1F31A}\\u{1F98B}\\u{1F637}\\u{1F57A}\\u26A0\\u{1F645}\\u{1F61F}\\u{1F635}\\u{1F44E}\\u{1F932}\\u{1F920}\\u{1F927}\\u{1F4CC}\\u{1F535}\\u{1F485}\\u{1F9D0}\\u{1F43E}\\u{1F352}\\u{1F617}\\u{1F911}\\u{1F30A}\\u{1F92F}\\u{1F437}\\u260E\\u{1F4A7}\\u{1F62F}\\u{1F486}\\u{1F446}\\u{1F3A4}\\u{1F647}\\u{1F351}\\u2744\\u{1F334}\\u{1F4A3}\\u{1F438}\\u{1F48C}\\u{1F4CD}\\u{1F940}\\u{1F922}\\u{1F445}\\u{1F4A1}\\u{1F4A9}\\u{1F450}\\u{1F4F8}\\u{1F47B}\\u{1F910}\\u{1F92E}\\u{1F3BC}\\u{1F975}\\u{1F6A9}\\u{1F34E}\\u{1F34A}\\u{1F47C}\\u{1F48D}\\u{1F4E3}\\u{1F942}\"),$s=Le.reduce((n,e,t)=>(n[t]=e,n),[]),Fs=Le.reduce((n,e,t)=>(n[e.codePointAt(0)]=t,n),[]);function Ms(n){return n.reduce((e,t)=>(e+=$s[t],e),\"\")}function ks(n){const e=[];for(const t of n){const i=Fs[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(i)}return new Uint8Array(e)}const Ks=W({prefix:\"\\u{1F680}\",name:\"base256emoji\",encode:Ms,decode:ks});var Bs=Object.freeze({__proto__:null,base256emoji:Ks}),Vs=Fe,$e=128,qs=127,js=~qs,Gs=Math.pow(2,31);function Fe(n,e,t){e=e||[],t=t||0;for(var i=t;n>=Gs;)e[t++]=n&255|$e,n/=128;for(;n&js;)e[t++]=n&255|$e,n>>>=7;return e[t]=n|0,Fe.bytes=t-i+1,e}var Ys=he,Hs=128,Me=127;function he(n,i){var t=0,i=i||0,s=0,r=i,o,a=n.length;do{if(r>=a)throw he.bytes=0,new RangeError(\"Could not decode varint\");o=n[r++],t+=s<28?(o&Me)<=Hs);return he.bytes=r-i,t}var Js=Math.pow(2,7),Xs=Math.pow(2,14),Ws=Math.pow(2,21),Qs=Math.pow(2,28),Zs=Math.pow(2,35),er=Math.pow(2,42),tr=Math.pow(2,49),ir=Math.pow(2,56),sr=Math.pow(2,63),rr=function(n){return n(ke.encode(n,e,t),e),Be=n=>ke.encodingLength(n),ce=(n,e)=>{const t=e.byteLength,i=Be(n),s=i+Be(t),r=new Uint8Array(s+t);return Ke(n,r,0),Ke(t,r,i),r.set(e,s),new or(n,t,e,r)};class or{constructor(e,t,i,s){this.code=e,this.size=t,this.digest=i,this.bytes=s}}const Ve=({name:n,code:e,encode:t})=>new ar(n,e,t);class ar{constructor(e,t,i){this.name=e,this.code=t,this.encode=i}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ce(this.code,t):t.then(i=>ce(this.code,i))}else throw Error(\"Unknown type, must be binary type\")}}const qe=n=>async e=>new Uint8Array(await crypto.subtle.digest(n,e)),hr=Ve({name:\"sha2-256\",code:18,encode:qe(\"SHA-256\")}),cr=Ve({name:\"sha2-512\",code:19,encode:qe(\"SHA-512\")});var ur=Object.freeze({__proto__:null,sha256:hr,sha512:cr});const je=0,lr=\"identity\",Ge=Ne,dr=n=>ce(je,Ge(n)),gr={code:je,name:lr,encode:Ge,digest:dr};var pr=Object.freeze({__proto__:null,identity:gr});new TextEncoder,new TextDecoder;const Ye={...os,...hs,...us,...ds,...Ds,...Rs,...Ss,...Os,...Ls,...Bs};({...ur,...pr});function He(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function Dr(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?He(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Je(n,e,t,i){return{name:n,prefix:e,encoder:{name:n,prefix:e,encode:t},decoder:{decode:i}}}const Xe=Je(\"utf8\",\"u\",n=>\"u\"+new TextDecoder(\"utf8\").decode(n),n=>new TextEncoder().encode(n.substring(1))),ue=Je(\"ascii\",\"a\",n=>{let e=\"a\";for(let t=0;t{n=n.substring(1);const e=Dr(n.length);for(let t=0;t{if(!this.initialized){const i=await this.getKeyChain();typeof i<\"u\"&&(this.keychain=i),this.initialized=!0}},this.has=i=>(this.isInitialized(),this.keychain.has(i)),this.set=async(i,s)=>{this.isInitialized(),this.keychain.set(i,s),await this.persist()},this.get=i=>{this.isInitialized();const s=this.keychain.get(i);if(typeof s>\"u\"){const{message:r}=c(\"NO_MATCHING_KEY\",`${this.name}: ${i}`);throw new Error(r)}return s},this.del=async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()},this.core=e,this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,be(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?fe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class xt{constructor(e,t,i){this.core=e,this.logger=t,this.name=et,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=s=>(this.isInitialized(),this.keychain.has(s)),this.getClientId=async()=>{this.isInitialized();const s=await this.getClientSeed(),r=Y.generateKeyPair(s);return Y.encodeIss(r.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const s=li();return this.setPrivateKey(s.publicKey,s.privateKey)},this.signJWT=async s=>{this.isInitialized();const r=await this.getClientSeed(),o=Y.generateKeyPair(r),a=ie(),h=tt;return await Y.signJWT(a,s,h,o)},this.generateSharedKey=(s,r,o)=>{this.isInitialized();const a=this.getPrivateKey(s),h=di(a,r);return this.setSymKey(h,o)},this.setSymKey=async(s,r)=>{this.isInitialized();const o=r||gi(s);return await this.keychain.set(o,s),o},this.deleteKeyPair=async s=>{this.isInitialized(),await this.keychain.del(s)},this.deleteSymKey=async s=>{this.isInitialized(),await this.keychain.del(s)},this.encode=async(s,r,o)=>{this.isInitialized();const a=pi(o),h=ci(r);if(Ee(a)){const y=a.senderPublicKey,M=a.receiverPublicKey;s=await this.generateSharedKey(y,M)}const l=this.getSymKey(s),{type:d,senderPublicKey:p}=a;return Di({type:d,symKey:l,message:h,senderPublicKey:p})},this.decode=async(s,r,o)=>{this.isInitialized();const a=yi(r,o);if(Ee(a)){const h=a.receiverPublicKey,l=a.senderPublicKey;s=await this.generateSharedKey(h,l)}try{const h=this.getSymKey(s),l=mi({symKey:h,encoded:r});return ui(l)}catch(h){this.logger.error(`Failed to decode message from topic: '${s}', clientId: '${await this.getClientId()}'`),this.logger.error(h)}},this.getPayloadType=s=>{const r=we(s);return bi(r.type)},this.getPayloadSenderPublicKey=s=>{const r=we(s);return r.senderPublicKey?$i(r.senderPublicKey,fi):void 0},this.core=e,this.logger=b(t,this.name),this.keychain=i||new Pt(this.core,this.logger)}get context(){return E(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\"\";try{e=this.keychain.get(de)}catch{e=ie(),await this.keychain.set(de,e)}return mr(e,\"base16\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Ot extends Zt{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=rt,this.version=nt,this.initialized=!1,this.storagePrefix=O,this.init=async()=>{if(!this.initialized){this.logger.trace(\"Initialized\");try{const i=await this.getRelayerMessages();typeof i<\"u\"&&(this.messages=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}},this.set=async(i,s)=>{this.isInitialized();const r=se(s);let o=this.messages.get(i);return typeof o>\"u\"&&(o={}),typeof o[r]<\"u\"||(o[r]=s,this.messages.set(i,o),await this.persist()),r},this.get=i=>{this.isInitialized();let s=this.messages.get(i);return typeof s>\"u\"&&(s={}),s},this.has=(i,s)=>{this.isInitialized();const r=this.get(i),o=se(s);return typeof r[o]<\"u\"},this.del=async i=>{this.isInitialized(),this.messages.delete(i),await this.persist()},this.logger=b(e,this.name),this.core=t}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,be(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?fe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class vr extends ei{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new U,this.name=at,this.queue=new Map,this.publishTimeout=N(Mi*2),this.needsTransportRestart=!1,this.publish=async(i,s,r)=>{var o;this.logger.debug(\"Publishing Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:i,message:s,opts:r}});try{const a=r?.ttl||ot,h=re(r),l=r?.prompt||!1,d=r?.tag||0,p=r?.id||Bi().toString(),y={topic:i,message:s,opts:{ttl:a,relay:h,prompt:l,tag:d,id:p}},M=setTimeout(()=>this.queue.set(p,y),this.publishTimeout);try{await await k(this.rpcPublish(i,s,a,h,l,d,p),this.publishTimeout,`Failed to publish payload, please try again. id:${p} tag:${d}`),this.removeRequestFromQueue(p),this.relayer.events.emit(D.publish,y)}catch(u){if(this.logger.debug(\"Publishing Payload stalled\"),this.needsTransportRestart=!0,(o=r?.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(p),u;return}finally{clearTimeout(M)}this.logger.debug(\"Successfully Published Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:i,message:s,opts:r}})}catch(a){throw this.logger.debug(\"Failed to Publish Payload\"),this.logger.error(a),a}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.relayer=e,this.logger=b(t,this.name),this.registerEventListeners()}get context(){return E(this.logger)}rpcPublish(e,t,i,s,r,o,a){var h,l,d,p;const y={method:H(s.protocol).publish,params:{topic:e,message:t,ttl:i,prompt:r,tag:o},id:a};return ne((h=y.params)==null?void 0:h.prompt)&&((l=y.params)==null||delete l.prompt),ne((d=y.params)==null?void 0:d.tag)&&((p=y.params)==null||delete p.tag),this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"message\",direction:\"outgoing\",request:y}),this.relayer.request(y)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:i,opts:s}=e;await this.publish(t,i,s)})}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(D.connection_stalled);return}this.checkQueue()}),this.relayer.on(D.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Ir{constructor(){this.map=new Map,this.set=(e,t)=>{const i=this.get(e);this.exists(e,t)||this.map.set(e,[...i,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>\"u\"){this.map.delete(e);return}if(!this.map.has(e))return;const i=this.get(e);if(!this.exists(e,t))return;const s=i.filter(r=>r!==t);if(!s.length){this.map.delete(e);return}this.map.set(e,s)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Cr=Object.defineProperty,Rr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,zt=(n,e,t)=>e in n?Cr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e)=>{for(var t in e||(e={}))Tr.call(e,t)&&zt(n,t,e[t]);if(At)for(var t of At(e))Sr.call(e,t)&&zt(n,t,e[t]);return n},De=(n,e)=>Rr(n,_r(e));class Nt extends ti{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Ir,this.events=new U,this.name=mt,this.version=bt,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel=\"pending_sub_watch_label\",this.pollingInterval=20,this.storagePrefix=O,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug(\"Subscribing Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}});try{const r=re(s),o={topic:i,relay:r};this.pending.set(i,o);const a=await this.rpcSubscribe(i,r);return this.onSubscribe(a,o),this.logger.debug(\"Successfully Subscribed Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:i,opts:s}}),a}catch(r){throw this.logger.debug(\"Failed to Subscribe Topic\"),this.logger.error(r),r}},this.unsubscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),typeof s?.id<\"u\"?await this.unsubscribeById(i,s.id,s):await this.unsubscribeByTopic(i,s)},this.isSubscribed=async i=>{if(this.topics.includes(i))return!0;const s=`${this.pendingSubscriptionWatchLabel}_${i}`;return await new Promise((r,o)=>{const a=new ki;a.start(s);const h=setInterval(()=>{!this.pending.has(i)&&this.topics.includes(i)&&(clearInterval(h),a.stop(s),r(!0)),a.elapsed(s)>=ft&&(clearInterval(h),a.stop(s),o(new Error(\"Subscription resolution timeout\")))},this.pollingInterval)}).catch(()=>!1)},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=b(t,this.name),this.clientId=\"\"}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\"//\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let i=!1;try{i=this.getSubscription(e).topic===t}catch{}return i}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const i=this.topicMap.get(e);await Promise.all(i.map(async s=>await this.unsubscribeById(e,s,t)))}async unsubscribeById(e,t,i){this.logger.debug(\"Unsubscribing Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}});try{const s=re(i);await this.rpcUnsubscribe(e,t,s);const r=K(\"USER_DISCONNECTED\",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,r),this.logger.debug(\"Successfully Unsubscribed Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:i}})}catch(s){throw this.logger.debug(\"Failed to Unsubscribe Topic\"),this.logger.error(s),s}}async rpcSubscribe(e,t){const i={method:H(t.protocol).subscribe,params:{topic:e}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{await await k(this.relayer.request(i),this.subscribeTimeout)}catch{this.logger.debug(\"Outgoing Relay Subscribe Payload stalled\"),this.relayer.events.emit(D.connection_stalled)}return se(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,i={method:H(t.protocol).batchSubscribe,params:{topics:e.map(s=>s.topic)}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i});try{return await await k(this.relayer.request(i),this.subscribeTimeout)}catch{this.logger.debug(\"Outgoing Relay Payload stalled\"),this.relayer.events.emit(D.connection_stalled)}}rpcUnsubscribe(e,t,i){const s={method:H(i.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:s}),this.relayer.request(s)}onSubscribe(e,t){this.setSubscription(e,De(q({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,q({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,i){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,i),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug(\"Setting subscription\"),this.logger.trace({type:\"method\",method:\"setSubscription\",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,q({},t)),this.topicMap.set(t.topic,e),this.events.emit(w.created,t)}getSubscription(e){this.logger.debug(\"Getting subscription\"),this.logger.trace({type:\"method\",method:\"getSubscription\",id:e});const t=this.subscriptions.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}deleteSubscription(e,t){this.logger.debug(\"Deleting subscription\"),this.logger.trace({type:\"method\",method:\"deleteSubscription\",id:e,reason:t});const i=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(i.topic,e),this.events.emit(w.deleted,De(q({},i),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(w.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t\"u\"||!e.length)return;if(this.subscriptions.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Ei(t)&&this.onBatchSubscribe(t.map((i,s)=>De(q({},e[s]),{id:i})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(G.pulse,async()=>{await this.checkPending()}),this.relayer.on(D.connect,async()=>{await this.onConnect()}),this.relayer.on(D.disconnect,()=>{this.onDisconnect()}),this.events.on(w.created,async e=>{const t=w.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()}),this.events.on(w.deleted,async e=>{const t=w.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var Pr=Object.defineProperty,Ut=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Lt=(n,e,t)=>e in n?Pr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ar=(n,e)=>{for(var t in e||(e={}))xr.call(e,t)&&Lt(n,t,e[t]);if(Ut)for(var t of Ut(e))Or.call(e,t)&&Lt(n,t,e[t]);return n};class $t extends ii{constructor(e){super(e),this.protocol=\"wc\",this.version=2,this.events=new U,this.name=ut,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=[\"socket hang up\",\"socket stalled\"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async t=>{this.logger.debug(\"Publishing Request Payload\");const i=t.id,s=this.provider.request(t);this.requestsInFlight.set(i,{promise:s,request:t});try{return await this.toEstablishConnection(),await s}catch(r){throw this.logger.debug(\"Failed to Publish Request\"),this.logger.error(r),r}finally{this.requestsInFlight.delete(i)}},this.onPayloadHandler=t=>{this.onProviderPayload(t)},this.onConnectHandler=()=>{this.events.emit(D.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(D.error,t),this.logger.info(\"Fatal socket error received, closing transport\"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(P.payload,this.onPayloadHandler),this.provider.on(P.connect,this.onConnectHandler),this.provider.on(P.disconnect,this.onDisconnectHandler),this.provider.on(P.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<\"u\"&&typeof e.logger!=\"string\"?b(e.logger,this.name):ye(me({level:e.logger||ct})),this.messages=new Ot(this.logger,e.core),this.subscriber=new Nt(this,this.logger),this.publisher=new vr(this,this.logger),this.relayUrl=e?.relayUrl||ge,this.projectId=e.projectId,this.bundleId=wi(),this.provider={}}async init(){this.logger.trace(\"Initialized\"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${pe}...`),await this.restartTransport(pe)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info(\"No topics subscribed to after init, closing transport\"),await this.transportClose(),this.transportExplicitlyClosed=!1)},pt)}get context(){return E(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,i){this.isInitialized(),await this.publisher.publish(e,t,i),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var i;this.isInitialized();let s=((i=this.subscriber.topicMap.get(e))==null?void 0:i[0])||\"\";if(s)return s;let r;const o=a=>{a.topic===e&&(this.subscriber.off(w.created,o),r())};return await Promise.all([new Promise(a=>{r=a,this.subscriber.on(w.created,o)}),new Promise(async a=>{s=await this.subscriber.subscribe(e,t),a()})]),s}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug(\"Waiting for all in-flight requests to finish before closing transport...\"),this.requestsInFlight.forEach(async e=>{await e.promise})),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await k(this.provider.disconnect(),1e3,\"provider.disconnect()\").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(t=>{if(!this.initialized)return t();this.subscriber.once(w.resubscribed,()=>{t()})}),new Promise(async(t,i)=>{try{await k(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(s){i(s);return}t()})])}catch(t){this.logger.error(t);const i=t;if(!this.isConnectionStalled(i.message))throw t;this.provider.events.emit(P.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await ve())throw new Error(\"No internet connection detected. Please restart your network and try again.\")}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ki(new ji(vi({sdkVersion:gt,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:i}=e;await this.messages.set(t,i)}async shouldIgnoreMessageEvent(e){const{topic:t,message:i}=e;if(!i||i.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const s=this.messages.has(t,i);return s&&this.logger.debug(`Ignoring duplicate message: ${i}`),s}async onProviderPayload(e){if(this.logger.debug(\"Incoming Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"incoming\",payload:e}),Pe(e)){if(!e.method.endsWith(lt))return;const t=e.params,{topic:i,message:s,publishedAt:r}=t.data,o={topic:i,message:s,publishedAt:r};this.logger.debug(\"Emitting Relayer Payload\"),this.logger.trace(Ar({type:\"event\",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else xe(e)&&this.events.emit(D.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(D.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Oe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(P.payload,this.onPayloadHandler),this.provider.off(P.connect,this.onConnectHandler),this.provider.off(P.disconnect,this.onDisconnectHandler),this.provider.off(P.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(D.connection_stalled,()=>{this.restartTransport().catch(t=>this.logger.error(t))});let e=await ve();Ii(async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch(i=>this.logger.error(i)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(i=>this.logger.error(i))))})}onProviderDisconnect(){this.events.emit(D.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info(\"attemptToReconnect called. Connecting...\"),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},N(dt)))}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var zr=Object.defineProperty,Ft=Object.getOwnPropertySymbols,Nr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Mt=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kt=(n,e)=>{for(var t in e||(e={}))Nr.call(e,t)&&Mt(n,t,e[t]);if(Ft)for(var t of Ft(e))Ur.call(e,t)&&Mt(n,t,e[t]);return n};class Kt extends si{constructor(e,t,i,s=O,r=void 0){super(e,t,i,s),this.core=e,this.logger=t,this.name=i,this.map=new Map,this.version=Dt,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!ne(o)?this.map.set(this.getKey(o),o):Ci(o)?this.map.set(o.id,o):Ri(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug(\"Setting value\"),this.logger.trace({type:\"method\",method:\"set\",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug(\"Getting value\"),this.logger.trace({type:\"method\",method:\"get\",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(h=>Gi(a[h],o[h]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug(\"Updating value\"),this.logger.trace({type:\"method\",method:\"update\",key:o,update:a});const h=kt(kt({},this.getData(o)),a);this.map.set(o,h),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug(\"Deleting value\"),this.logger.trace({type:\"method\",method:\"delete\",key:o,reason:a}),this.map.delete(o),await this.persist())},this.logger=b(t,this.name),this.storagePrefix=s,this.getKey=r}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>\"u\"||!e.length)return;if(this.map.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Bt{constructor(e,t){this.core=e,this.logger=t,this.name=Et,this.version=wt,this.events=new Xt,this.initialized=!1,this.storagePrefix=O,this.ignoredPayloadTypes=[_i],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\"Initialized\"))},this.register=({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]},this.create=async()=>{this.isInitialized();const i=ie(),s=await this.core.crypto.setSymKey(i),r=J(Se),o={protocol:ht},a={topic:s,expiry:r,relay:o,active:!1},h=Ti({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:o,expiryTimestamp:r});return await this.pairings.set(s,a),await this.core.relayer.subscribe(s),this.core.expirer.set(s,r),{topic:s,uri:h}},this.pair=async i=>{this.isInitialized(),this.isValidPair(i);const{topic:s,symKey:r,relay:o,expiryTimestamp:a}=Ie(i.uri);let h;if(this.pairings.keys.includes(s)&&(h=this.pairings.get(s),h.active))throw new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);const l=a||J(Se),d={topic:s,relay:o,expiry:l,active:!1};return await this.pairings.set(s,d),this.core.expirer.set(s,l),i.activatePairing&&await this.activate({topic:s}),this.events.emit(V.create,d),this.core.crypto.keychain.has(s)||(await this.core.crypto.setSymKey(r,s),await this.core.relayer.subscribe(s,{relay:o})),d},this.activate=async({topic:i})=>{this.isInitialized();const s=J(X);await this.pairings.update(i,{active:!0,expiry:s}),this.core.expirer.set(i,s)},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:s}=i;if(this.pairings.keys.includes(s)){const r=await this.sendRequest(s,\"wc_pairingPing\",{}),{done:o,resolve:a,reject:h}=Si();this.events.once(oe(\"pairing_ping\",r),({error:l})=>{l?h(l):a()}),await o()}},this.updateExpiry=async({topic:i,expiry:s})=>{this.isInitialized(),await this.pairings.update(i,{expiry:s})},this.updateMetadata=async({topic:i,metadata:s})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:s})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:s}=i;this.pairings.keys.includes(s)&&(await this.sendRequest(s,\"wc_pairingDelete\",K(\"USER_DISCONNECTED\")),await this.deletePairing(s))},this.sendRequest=async(i,s,r)=>{const o=Ae(s,r),a=await this.core.crypto.encode(i,o),h=$[s].req;return this.core.history.set(i,o),this.core.relayer.publish(i,a,h),o.id},this.sendResult=async(i,s,r)=>{const o=Oe(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=$[h.request.method].res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.sendError=async(i,s,r)=>{const o=Vi(i,r),a=await this.core.crypto.encode(s,o),h=await this.core.history.get(s,i),l=$[h.request.method]?$[h.request.method].res:$.unregistered_method.res;await this.core.relayer.publish(s,a,l),await this.core.history.resolve(o)},this.deletePairing=async(i,s)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,K(\"USER_DISCONNECTED\")),this.core.crypto.deleteSymKey(i),s?Promise.resolve():this.core.expirer.del(i)])},this.cleanup=async()=>{const i=this.pairings.getAll().filter(s=>Ce(s.expiry));await Promise.all(i.map(s=>this.deletePairing(s.topic)))},this.onRelayEventRequest=i=>{const{topic:s,payload:r}=i;switch(r.method){case\"wc_pairingPing\":return this.onPairingPingRequest(s,r);case\"wc_pairingDelete\":return this.onPairingDeleteRequest(s,r);default:return this.onUnknownRpcMethodRequest(s,r)}},this.onRelayEventResponse=async i=>{const{topic:s,payload:r}=i,o=(await this.core.history.get(s,r.id)).request.method;switch(o){case\"wc_pairingPing\":return this.onPairingPingResponse(s,r);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(i,s)=>{const{id:r}=s;try{this.isValidPing({topic:i}),await this.sendResult(r,i,!0),this.events.emit(V.ping,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onPairingPingResponse=(i,s)=>{const{id:r}=s;setTimeout(()=>{qi(s)?this.events.emit(oe(\"pairing_ping\",r),{}):ze(s)&&this.events.emit(oe(\"pairing_ping\",r),{error:s.error})},500)},this.onPairingDeleteRequest=async(i,s)=>{const{id:r}=s;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(V.delete,{id:r,topic:i})}catch(o){await this.sendError(r,i,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(i,s)=>{const{id:r,method:o}=s;try{if(this.registeredMethods.includes(o))return;const a=K(\"WC_METHOD_UNSUPPORTED\",o);await this.sendError(r,i,a),this.logger.error(a)}catch(a){await this.sendError(r,i,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=i=>{this.registeredMethods.includes(i)||this.logger.error(K(\"WC_METHOD_UNSUPPORTED\",i))},this.isValidPair=i=>{var s;if(!ae(i)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() params: ${i}`);throw new Error(o)}if(!Pi(i.uri)){const{message:o}=c(\"MISSING_OR_INVALID\",`pair() uri: ${i.uri}`);throw new Error(o)}const r=Ie(i.uri);if(!((s=r?.relay)!=null&&s.protocol)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#relay-protocol\");throw new Error(o)}if(!(r!=null&&r.symKey)){const{message:o}=c(\"MISSING_OR_INVALID\",\"pair() uri#symKey\");throw new Error(o)}if(r!=null&&r.expiryTimestamp&&N(r?.expiryTimestamp){if(!ae(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`ping() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidDisconnect=async i=>{if(!ae(i)){const{message:r}=c(\"MISSING_OR_INVALID\",`disconnect() params: ${i}`);throw new Error(r)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidPairingTopic=async i=>{if(!xi(i,!1)){const{message:s}=c(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${i}`);throw new Error(s)}if(!this.pairings.keys.includes(i)){const{message:s}=c(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${i}`);throw new Error(s)}if(Ce(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:s}=c(\"EXPIRED\",`pairing topic: ${i}`);throw new Error(s)}},this.core=e,this.logger=b(t,this.name),this.pairings=new Kt(this.core,this.logger,this.name,this.storagePrefix)}get context(){return E(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(D.message,async e=>{const{topic:t,message:i}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))return;const s=await this.core.crypto.decode(t,i);try{Pe(s)?(this.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):xe(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.core.history.delete(t,s.id))}catch(r){this.logger.error(r)}})}registerExpirerEvents(){this.core.expirer.on(v.expired,async e=>{const{topic:t}=Oi(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(V.expire,{topic:t}))})}}class Vt extends ri{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new U,this.name=vt,this.version=It,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(i,s,r)=>{if(this.isInitialized(),this.logger.debug(\"Setting JSON-RPC request history record\"),this.logger.trace({type:\"method\",method:\"set\",topic:i,request:s,chainId:r}),this.records.has(s.id))return;const o={id:s.id,topic:i,request:{method:s.method,params:s.params||null},chainId:r,expiry:J(X)};this.records.set(o.id,o),this.events.emit(R.created,o)},this.resolve=async i=>{if(this.isInitialized(),this.logger.debug(\"Updating JSON-RPC response history record\"),this.logger.trace({type:\"method\",method:\"update\",response:i}),!this.records.has(i.id))return;const s=await this.getRecord(i.id);typeof s.response>\"u\"&&(s.response=ze(i)?{error:i.error}:{result:i.result},this.records.set(s.id,s),this.events.emit(R.updated,s))},this.get=async(i,s)=>(this.isInitialized(),this.logger.debug(\"Getting record\"),this.logger.trace({type:\"method\",method:\"get\",topic:i,id:s}),await this.getRecord(s)),this.delete=(i,s)=>{this.isInitialized(),this.logger.debug(\"Deleting record\"),this.logger.trace({type:\"method\",method:\"delete\",id:s}),this.values.forEach(r=>{if(r.topic===i){if(typeof s<\"u\"&&r.id!==s)return;this.records.delete(r.id),this.events.emit(R.deleted,r)}})},this.exists=async(i,s)=>(this.isInitialized(),this.records.has(s)?(await this.getRecord(s)).topic===i:!1),this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<\"u\")return;const i={topic:t.topic,request:Ae(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(i)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(i)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(R.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>\"u\"||!e.length)return;if(this.records.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(R.created,e=>{const t=R.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.events.on(R.updated,e=>{const t=R.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.events.on(R.deleted,e=>{const t=R.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e}),this.persist()}),this.core.heartbeat.on(G.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{N(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class qt extends ni{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new U,this.name=Ct,this.version=Rt,this.cached=[],this.initialized=!1,this.storagePrefix=O,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=i=>{try{const s=this.formatTarget(i);return typeof this.getExpiration(s)<\"u\"}catch{return!1}},this.set=(i,s)=>{this.isInitialized();const r=this.formatTarget(i),o={target:r,expiry:s};this.expirations.set(r,o),this.checkExpiry(r,o),this.events.emit(v.created,{target:r,expiration:o})},this.get=i=>{this.isInitialized();const s=this.formatTarget(i);return this.getExpiration(s)},this.del=i=>{if(this.isInitialized(),this.has(i)){const s=this.formatTarget(i),r=this.getExpiration(s);this.expirations.delete(s),this.events.emit(v.deleted,{target:s,expiration:r})}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=b(t,this.name)}get context(){return E(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\"string\")return Ai(e);if(typeof e==\"number\")return zi(e);const{message:t}=c(\"UNKNOWN_TYPE\",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(v.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>\"u\"||!e.length)return;if(this.expirations.size){const{message:t}=c(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:i}=c(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}checkExpiry(e,t){const{expiry:i}=t;N(i)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(v.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(G.pulse,()=>this.checkExpirations()),this.events.on(v.created,e=>{const t=v.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(v.expired,e=>{const t=v.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(v.deleted,e=>{const t=v.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=c(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class jt extends oi{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Z,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async i=>{if(this.verifyDisabled||Ni()||!Ui())return;const s=this.getVerifyUrl(i?.verifyUrl);this.verifyUrl!==s&&this.removeIframe(),this.verifyUrl=s;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r)}if(!this.initialized){this.removeIframe(),this.verifyUrl=ee;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r),this.verifyDisabled=!0}}},this.register=async i=>{this.initialized?this.sendPost(i.attestationId):(this.addToQueue(i.attestationId),await this.init())},this.resolve=async i=>{if(this.isDevEnv)return\"\";const s=this.getVerifyUrl(i?.verifyUrl);let r;try{r=await this.fetchAttestation(i.attestationId,s)}catch(o){this.logger.info(`failed to resolve attestation: ${i.attestationId} from url: ${s}`),this.logger.info(o),r=await this.fetchAttestation(i.attestationId,ee)}return r},this.fetchAttestation=async(i,s)=>{this.logger.info(`resolving attestation: ${i} from url: ${s}`);const r=this.startAbortTimer(Re*2),o=await fetch(`${s}/attestation/${i}`,{signal:this.abortController.signal});return clearTimeout(r),o.status===200?await o.json():void 0},this.addToQueue=i=>{this.queue.push(i)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(i=>this.sendPost(i)),this.queue=[])},this.sendPost=i=>{var s;try{if(!this.iframe)return;(s=this.iframe.contentWindow)==null||s.postMessage(i,\"*\"),this.logger.info(`postMessage sent: ${i} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let i;const s=r=>{r.data===\"verify_ready\"&&(this.initialized=!0,this.processQueue(),window.removeEventListener(\"message\",s),i())};await Promise.race([new Promise(r=>{if(document.getElementById(Z))return r();window.addEventListener(\"message\",s);const o=document.createElement(\"iframe\");o.id=Z,o.src=`${this.verifyUrl}/${this.projectId}`,o.style.display=\"none\",document.body.append(o),this.iframe=o,i=r}),new Promise((r,o)=>setTimeout(()=>{window.removeEventListener(\"message\",s),o(\"verify iframe load timeout\")},N(_e)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=i=>{let s=i||F;return _t.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${F}`),s=F),s},this.logger=b(t,this.name),this.verifyUrl=F,this.abortController=new AbortController,this.isDevEnv=Li()&&process.env.IS_VITEST}get context(){return E(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),N(e))}}class Gt extends ai{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=Tt,this.registerDeviceToken=async i=>{const{clientId:s,token:r,notificationType:o,enableEncrypted:a=!1}=i,h=`${St}/${this.projectId}/clients`;await Yi(h,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({client_id:s,type:o,token:r,always_raw:a})})},this.logger=b(t,this.context)}}var Lr=Object.defineProperty,Yt=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Ht=(n,e,t)=>e in n?Lr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))$r.call(e,t)&&Ht(n,t,e[t]);if(Yt)for(var t of Yt(e))Fr.call(e,t)&&Ht(n,t,e[t]);return n};class te extends hi{constructor(e){super(e),this.protocol=le,this.version=We,this.name=Q,this.events=new U,this.initialized=!1,this.on=(i,s)=>this.events.on(i,s),this.once=(i,s)=>this.events.once(i,s),this.off=(i,s)=>this.events.off(i,s),this.removeListener=(i,s)=>this.events.removeListener(i,s),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||ge,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\"\";const t=typeof e?.logger<\"u\"&&typeof e?.logger!=\"string\"?e.logger:ye(me({level:e?.logger||Qe.logger}));this.logger=b(t,this.name),this.heartbeat=new Qt,this.crypto=new xt(this,this.logger,e?.keychain),this.history=new Vt(this,this.logger),this.expirer=new qt(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Wt(Jt(Jt({},Ze),e?.storageOptions)),this.relayer=new $t({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Bt(this,this.logger),this.verify=new jt(this.projectId||\"\",this.logger),this.echoClient=new Gt(this.projectId||\"\",this.logger)}static async init(e){const t=new te(e);await t.initialize();const i=await t.crypto.getClientId();return await t.storage.setItem(yt,i),t}get context(){return E(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace(\"Initialized\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info(\"Core Initialization Success\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Mr=te;export{Q as CORE_CONTEXT,Qe as CORE_DEFAULT,le as CORE_PROTOCOL,Ze as CORE_STORAGE_OPTIONS,O as CORE_STORAGE_PREFIX,We as CORE_VERSION,de as CRYPTO_CLIENT_SEED,et as CRYPTO_CONTEXT,tt as CRYPTO_JWT_TTL,Mr as Core,xt as Crypto,Tt as ECHO_CONTEXT,St as ECHO_URL,Ct as EXPIRER_CONTEXT,wr as EXPIRER_DEFAULT_TTL,v as EXPIRER_EVENTS,Rt as EXPIRER_STORAGE_VERSION,Gt as EchoClient,qt as Expirer,vt as HISTORY_CONTEXT,R as HISTORY_EVENTS,It as HISTORY_STORAGE_VERSION,Vt as JsonRpcHistory,it as KEYCHAIN_CONTEXT,st as KEYCHAIN_STORAGE_VERSION,Pt as KeyChain,rt as MESSAGES_CONTEXT,nt as MESSAGES_STORAGE_VERSION,Ot as MessageTracker,Et as PAIRING_CONTEXT,Er as PAIRING_DEFAULT_TTL,V as PAIRING_EVENTS,$ as PAIRING_RPC_OPTS,wt as PAIRING_STORAGE_VERSION,ft as PENDING_SUB_RESOLUTION_TIMEOUT,at as PUBLISHER_CONTEXT,ot as PUBLISHER_DEFAULT_TTL,Bt as Pairing,ut as RELAYER_CONTEXT,ct as RELAYER_DEFAULT_LOGGER,ht as RELAYER_DEFAULT_PROTOCOL,ge as RELAYER_DEFAULT_RELAY_URL,D as RELAYER_EVENTS,pe as RELAYER_FAILOVER_RELAY_URL,P as RELAYER_PROVIDER_EVENTS,dt as RELAYER_RECONNECT_TIMEOUT,gt as RELAYER_SDK_VERSION,br as RELAYER_STORAGE_OPTIONS,lt as RELAYER_SUBSCRIBER_SUFFIX,pt as RELAYER_TRANSPORT_CUTOFF,$t as Relayer,Dt as STORE_STORAGE_VERSION,mt as SUBSCRIBER_CONTEXT,fr as SUBSCRIBER_DEFAULT_TTL,w as SUBSCRIBER_EVENTS,bt as SUBSCRIBER_STORAGE_VERSION,Kt as Store,Nt as Subscriber,_t as TRUSTED_VERIFY_URLS,Z as VERIFY_CONTEXT,ee as VERIFY_FALLBACK_SERVER,F as VERIFY_SERVER,jt as Verify,yt as WALLETCONNECT_CLIENT_ID,te as default};\n//# sourceMappingURL=index.es.js.map\n","import{RELAYER_DEFAULT_PROTOCOL as me,RELAYER_EVENTS as Z,VERIFY_SERVER as ye,EXPIRER_EVENTS as Se,PAIRING_EVENTS as Ee,Store as K,Core as Re}from\"@walletconnect/core\";import{pino as Ie,getDefaultLoggerOptions as _e,generateChildLogger as qe,getLoggerContext as Ne}from\"@walletconnect/logger\";import{IEngine as fe,ISignClient as Pe}from\"@walletconnect/types\";import{TYPE_1 as ve,calcExpiry as q,createDelayedPromise as C,engineEvent as u,getInternalError as l,getSdkError as S,getDeepLink as Oe,handleDeeplinkRedirect as Te,isSessionCompatible as Ve,isBrowser as xe,hashMessage as z,isExpired as V,MemoryStore as $,isValidParams as y,isUndefined as A,isValidRelays as De,isValidObject as ee,isValidRequiredNamespaces as Ce,isValidNamespaces as Y,isConformingNamespaces as se,isValidString as b,isValidErrorReason as Ae,isValidRelay as be,isValidController as Le,isValidNamespacesChainId as te,isValidRequest as $e,isValidNamespacesRequest as Ge,isValidRequestExpiry as Me,isValidResponse as Ue,isValidEvent as Qe,isValidNamespacesEvent as ke,parseExpirerTarget as Ke,isValidId as ze,getAppMetadata as Ye}from\"@walletconnect/utils\";import je,{EventEmitter as Je}from\"events\";import{THIRTY_DAYS as Fe,SEVEN_DAYS as ie,FIVE_MINUTES as E,ONE_DAY as x,THIRTY_SECONDS as re,ONE_SECOND as Xe,toMiliseconds as ne}from\"@walletconnect/time\";import{payloadId as He,isJsonRpcResult as P,isJsonRpcError as v,formatJsonRpcRequest as j,formatJsonRpcResult as We,formatJsonRpcError as Be,isJsonRpcRequest as Ze,isJsonRpcResponse as es}from\"@walletconnect/jsonrpc-utils\";const J=\"wc\",F=2,X=\"client\",G=`${J}@${F}:${X}:`,M={name:X,logger:\"error\",controller:!1,relayUrl:\"wss://relay.walletconnect.com\"},ss={session_proposal:\"session_proposal\",session_update:\"session_update\",session_extend:\"session_extend\",session_ping:\"session_ping\",session_delete:\"session_delete\",session_expire:\"session_expire\",session_request:\"session_request\",session_request_sent:\"session_request_sent\",session_event:\"session_event\",proposal_expire:\"proposal_expire\",session_request_expire:\"session_request_expire\"},ts={database:\":memory:\"},H=\"WALLETCONNECT_DEEPLINK_CHOICE\",is={created:\"history_created\",updated:\"history_updated\",deleted:\"history_deleted\",sync:\"history_sync\"},rs=\"history\",ns=\"0.3\",oe=\"proposal\",os=Fe,ae=\"Proposal expired\",ce=\"session\",L=ie,le=\"engine\",R={wc_sessionPropose:{req:{ttl:E,prompt:!0,tag:1100},res:{ttl:E,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:E,prompt:!1,tag:1102},res:{ttl:E,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:x,prompt:!1,tag:1104},res:{ttl:x,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:x,prompt:!1,tag:1106},res:{ttl:x,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:E,prompt:!0,tag:1108},res:{ttl:E,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:E,prompt:!0,tag:1110},res:{ttl:E,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:x,prompt:!1,tag:1112},res:{ttl:x,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:re,prompt:!1,tag:1114},res:{ttl:re,prompt:!1,tag:1115}}},U={min:E,max:ie},I={idle:\"IDLE\",active:\"ACTIVE\"},pe=\"request\",he=[\"wc_sessionPropose\",\"wc_sessionRequest\",\"wc_authRequest\"];var as=Object.defineProperty,cs=Object.defineProperties,ls=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,hs=Object.prototype.propertyIsEnumerable,ue=(w,r,e)=>r in w?as(w,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[r]=e,g=(w,r)=>{for(var e in r||(r={}))ps.call(r,e)&&ue(w,e,r[e]);if(de)for(var e of de(r))hs.call(r,e)&&ue(w,e,r[e]);return w},D=(w,r)=>cs(w,ls(r));class ds extends fe{constructor(r){super(r),this.name=le,this.events=new je,this.initialized=!1,this.ignoredPayloadTypes=[ve],this.requestQueue={state:I.idle,queue:[]},this.sessionRequestQueue={state:I.idle,queue:[]},this.requestQueueDelay=Xe,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(R)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ne(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const s=D(g({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(s);const{pairingTopic:t,requiredNamespaces:i,optionalNamespaces:n,sessionProperties:o,relays:a}=s;let c=t,p,d=!1;if(c&&(d=this.client.core.pairing.pairings.get(c).active),!c||!d){const{topic:T,uri:_}=await this.client.core.pairing.create();c=T,p=_}const h=await this.client.core.crypto.generateKeyPair(),N=R.wc_sessionPropose.req.ttl||E,m=q(N),f=g({requiredNamespaces:i,optionalNamespaces:n,relays:a??[{protocol:me}],proposer:{publicKey:h,metadata:this.client.metadata},expiryTimestamp:m},o&&{sessionProperties:o}),{reject:k,resolve:O,done:we}=C(N,ae);if(this.events.once(u(\"session_connect\"),async({error:T,session:_})=>{if(T)k(T);else if(_){_.self.publicKey=h;const B=D(g({},_),{requiredNamespaces:f.requiredNamespaces,optionalNamespaces:f.optionalNamespaces});await this.client.session.set(_.topic,B),await this.setExpiry(_.topic,_.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:_.peer.metadata}),O(B)}}),!c){const{message:T}=l(\"NO_MATCHING_KEY\",`connect() pairing topic: ${c}`);throw new Error(T)}const W=await this.sendRequest({topic:c,method:\"wc_sessionPropose\",params:f,throwOnFailedPublish:!0});return await this.setProposal(W,g({id:W},f)),{uri:p,approval:we}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:s,relayProtocol:t,namespaces:i,sessionProperties:n}=e,o=this.client.proposal.get(s);let{pairingTopic:a,proposer:c,requiredNamespaces:p,optionalNamespaces:d}=o;a=a||\"\";const h=await this.client.core.crypto.generateKeyPair(),N=c.publicKey,m=await this.client.core.crypto.generateSharedKey(h,N);a&&s&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:c.metadata}),await this.sendResult({id:s,topic:a,result:{relay:{protocol:t??\"irn\"},responderPublicKey:h}}),await this.client.proposal.delete(s,S(\"USER_DISCONNECTED\")),await this.client.core.pairing.activate({topic:a}));const f=g({relay:{protocol:t??\"irn\"},namespaces:i,pairingTopic:a,controller:{publicKey:h,metadata:this.client.metadata},expiry:q(L)},n&&{sessionProperties:n});await this.client.core.relayer.subscribe(m);const k=D(g({},f),{topic:m,requiredNamespaces:p,optionalNamespaces:d,pairingTopic:a,acknowledged:!1,self:f.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:h});await this.client.session.set(m,k);try{await this.sendRequest({topic:m,method:\"wc_sessionSettle\",params:f,throwOnFailedPublish:!0})}catch(O){throw this.client.logger.error(O),this.client.session.delete(m,S(\"USER_DISCONNECTED\")),await this.client.core.relayer.unsubscribe(m),O}return await this.setExpiry(m,q(L)),{topic:m,acknowledged:()=>new Promise(O=>setTimeout(()=>O(this.client.session.get(m)),500))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:s,reason:t}=e,{pairingTopic:i}=this.client.proposal.get(s);i&&(await this.sendError(s,i,t),await this.client.proposal.delete(s,S(\"USER_DISCONNECTED\")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:s,namespaces:t}=e,i=await this.sendRequest({topic:s,method:\"wc_sessionUpdate\",params:{namespaces:t}}),{done:n,resolve:o,reject:a}=C();return this.events.once(u(\"session_update\",i),({error:c})=>{c?a(c):o()}),await this.client.session.update(s,{namespaces:t}),{acknowledged:n}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:s}=e,t=await this.sendRequest({topic:s,method:\"wc_sessionExtend\",params:{}}),{done:i,resolve:n,reject:o}=C();return this.events.once(u(\"session_extend\",t),({error:a})=>{a?o(a):n()}),await this.setExpiry(s,q(L)),{acknowledged:i}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:s,request:t,topic:i,expiry:n=R.wc_sessionRequest.req.ttl}=e,o=He(),{done:a,resolve:c,reject:p}=C(n,\"Request expired. Please try again.\");return this.events.once(u(\"session_request\",o),({error:d,result:h})=>{d?p(d):c(h)}),await Promise.all([new Promise(async d=>{await this.sendRequest({clientRpcId:o,topic:i,method:\"wc_sessionRequest\",params:{request:D(g({},t),{expiryTimestamp:q(n)}),chainId:s},expiry:n,throwOnFailedPublish:!0}).catch(h=>p(h)),this.client.events.emit(\"session_request_sent\",{topic:i,request:t,chainId:s,id:o}),d()}),new Promise(async d=>{const h=await Oe(this.client.core.storage,H);Te({id:o,topic:i,wcDeepLink:h}),d()}),a()]).then(d=>d[2])},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:s,response:t}=e,{id:i}=t;P(t)?await this.sendResult({id:i,topic:s,result:t.result,throwOnFailedPublish:!0}):v(t)&&await this.sendError(i,s,t.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:s}=e;if(this.client.session.keys.includes(s)){const t=await this.sendRequest({topic:s,method:\"wc_sessionPing\",params:{}}),{done:i,resolve:n,reject:o}=C();this.events.once(u(\"session_ping\",t),({error:a})=>{a?o(a):n()}),await i()}else this.client.core.pairing.pairings.keys.includes(s)&&await this.client.core.pairing.ping({topic:s})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:s,event:t,chainId:i}=e;await this.sendRequest({topic:s,method:\"wc_sessionEvent\",params:{event:t,chainId:i}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:s}=e;if(this.client.session.keys.includes(s))await this.sendRequest({topic:s,method:\"wc_sessionDelete\",params:S(\"USER_DISCONNECTED\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:s,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(s))await this.client.core.pairing.disconnect({topic:s});else{const{message:t}=l(\"MISMATCHED_TOPIC\",`Session or pairing topic not found: ${s}`);throw new Error(t)}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter(s=>Ve(s,e))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const s=this.client.core.pairing.pairings.get(e.pairingTopic),t=this.client.core.pairing.pairings.getAll().filter(i=>{var n,o;return((n=i.peerMetadata)==null?void 0:n.url)&&((o=i.peerMetadata)==null?void 0:o.url)===e.peer.metadata.url&&i.topic&&i.topic!==s.topic});if(t.length===0)return;this.client.logger.info(`Cleaning up ${t.length} duplicate pairing(s)`),await Promise.all(t.map(i=>this.client.core.pairing.disconnect({topic:i.topic}))),this.client.logger.info(\"Duplicate pairings clean up finished\")}catch(s){this.client.logger.error(s)}},this.deleteSession=async e=>{const{topic:s,expirerHasDeleted:t=!1,emitEvent:i=!0,id:n=0}=e,{self:o}=this.client.session.get(s);await this.client.core.relayer.unsubscribe(s),await this.client.session.delete(s,S(\"USER_DISCONNECTED\")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(s)&&await this.client.core.crypto.deleteSymKey(s),t||this.client.core.expirer.del(s),this.client.core.storage.removeItem(H).catch(a=>this.client.logger.warn(a)),this.getPendingSessionRequests().forEach(a=>{a.topic===s&&this.deletePendingSessionRequest(a.id,S(\"USER_DISCONNECTED\"))}),i&&this.client.events.emit(\"session_delete\",{id:n,topic:s})},this.deleteProposal=async(e,s)=>{await Promise.all([this.client.proposal.delete(e,S(\"USER_DISCONNECTED\")),s?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,s,t=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,s),t?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==e),t&&(this.sessionRequestQueue.state=I.idle,this.client.events.emit(\"session_request_expire\",{id:e}))},this.setExpiry=async(e,s)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:s}),this.client.core.expirer.set(e,s)},this.setProposal=async(e,s)=>{await this.client.proposal.set(e,s),this.client.core.expirer.set(e,q(R.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{const{id:s,topic:t,params:i,verifyContext:n}=e,o=i.request.expiryTimestamp||q(R.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(s,{id:s,topic:t,params:i,verifyContext:n}),o&&this.client.core.expirer.set(s,o)},this.sendRequest=async e=>{const{topic:s,method:t,params:i,expiry:n,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:c}=e,p=j(t,i,a);if(xe()&&he.includes(t)){const N=z(JSON.stringify(p));this.client.core.verify.register({attestationId:N})}const d=await this.client.core.crypto.encode(s,p),h=R[t].req;return n&&(h.ttl=n),o&&(h.id=o),this.client.core.history.set(s,p),c?(h.internal=D(g({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,d,h)):this.client.core.relayer.publish(s,d,h).catch(N=>this.client.logger.error(N)),p.id},this.sendResult=async e=>{const{id:s,topic:t,result:i,throwOnFailedPublish:n}=e,o=We(s,i),a=await this.client.core.crypto.encode(t,o),c=await this.client.core.history.get(t,s),p=R[c.request.method].res;n?(p.internal=D(g({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,a,p)):this.client.core.relayer.publish(t,a,p).catch(d=>this.client.logger.error(d)),await this.client.core.history.resolve(o)},this.sendError=async(e,s,t)=>{const i=Be(e,t),n=await this.client.core.crypto.encode(s,i),o=await this.client.core.history.get(s,e),a=R[o.request.method].res;this.client.core.relayer.publish(s,n,a),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const e=[],s=[];this.client.session.getAll().forEach(t=>{let i=!1;V(t.expiry)&&(i=!0),this.client.core.crypto.keychain.has(t.topic)||(i=!0),i&&e.push(t.topic)}),this.client.proposal.getAll().forEach(t=>{V(t.expiryTimestamp)&&s.push(t.id)}),await Promise.all([...e.map(t=>this.deleteSession({topic:t})),...s.map(t=>this.deleteProposal(t))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===I.active){this.client.logger.info(\"Request queue already active, skipping...\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=I.active;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise(s=>setTimeout(s,300))}catch(s){this.client.logger.warn(s)}}this.requestQueue.state=I.idle},this.processRequest=e=>{const{topic:s,payload:t}=e,i=t.method;switch(i){case\"wc_sessionPropose\":return this.onSessionProposeRequest(s,t);case\"wc_sessionSettle\":return this.onSessionSettleRequest(s,t);case\"wc_sessionUpdate\":return this.onSessionUpdateRequest(s,t);case\"wc_sessionExtend\":return this.onSessionExtendRequest(s,t);case\"wc_sessionPing\":return this.onSessionPingRequest(s,t);case\"wc_sessionDelete\":return this.onSessionDeleteRequest(s,t);case\"wc_sessionRequest\":return this.onSessionRequest(s,t);case\"wc_sessionEvent\":return this.onSessionEventRequest(s,t);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async e=>{const{topic:s,payload:t}=e,i=(await this.client.core.history.get(s,t.id)).request.method;switch(i){case\"wc_sessionPropose\":return this.onSessionProposeResponse(s,t);case\"wc_sessionSettle\":return this.onSessionSettleResponse(s,t);case\"wc_sessionUpdate\":return this.onSessionUpdateResponse(s,t);case\"wc_sessionExtend\":return this.onSessionExtendResponse(s,t);case\"wc_sessionPing\":return this.onSessionPingResponse(s,t);case\"wc_sessionRequest\":return this.onSessionRequestResponse(s,t);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:s}=e,{message:t}=l(\"MISSING_OR_INVALID\",`Decoded payload on topic ${s} is not identifiable as a JSON-RPC request or a response.`);throw new Error(t)},this.onSessionProposeRequest=async(e,s)=>{const{params:t,id:i}=s;try{this.isValidConnect(g({},s.params));const n=t.expiryTimestamp||q(R.wc_sessionPropose.req.ttl),o=g({id:i,pairingTopic:e,expiryTimestamp:n},t);await this.setProposal(i,o);const a=z(JSON.stringify(s)),c=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit(\"session_proposal\",{id:i,params:o,verifyContext:c})}catch(n){await this.sendError(i,e,n),this.client.logger.error(n)}},this.onSessionProposeResponse=async(e,s)=>{const{id:t}=s;if(P(s)){const{result:i}=s;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",result:i});const n=this.client.proposal.get(t);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",proposal:n});const o=n.proposer.publicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",selfPublicKey:o});const a=i.responderPublicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",peerPublicKey:a});const c=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",sessionTopic:c});const p=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",subscriptionId:p}),await this.client.core.pairing.activate({topic:e})}else v(s)&&(await this.client.proposal.delete(t,S(\"USER_DISCONNECTED\")),this.events.emit(u(\"session_connect\"),{error:s.error}))},this.onSessionSettleRequest=async(e,s)=>{const{id:t,params:i}=s;try{this.isValidSessionSettleRequest(i);const{relay:n,controller:o,expiry:a,namespaces:c,sessionProperties:p,pairingTopic:d}=s.params,h=g({topic:e,relay:n,expiry:a,namespaces:c,acknowledged:!0,pairingTopic:d,requiredNamespaces:{},optionalNamespaces:{},controller:o.publicKey,self:{publicKey:\"\",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},p&&{sessionProperties:p});await this.sendResult({id:s.id,topic:e,result:!0}),this.events.emit(u(\"session_connect\"),{session:h}),this.cleanupDuplicatePairings(h)}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.onSessionSettleResponse=async(e,s)=>{const{id:t}=s;P(s)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(u(\"session_approve\",t),{})):v(s)&&(await this.client.session.delete(e,S(\"USER_DISCONNECTED\")),this.events.emit(u(\"session_approve\",t),{error:s.error}))},this.onSessionUpdateRequest=async(e,s)=>{const{params:t,id:i}=s;try{const n=`${e}_session_update`,o=$.get(n);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidUpdate(g({topic:e},t)),await this.client.session.update(e,{namespaces:t.namespaces}),await this.sendResult({id:i,topic:e,result:!0}),this.client.events.emit(\"session_update\",{id:i,topic:e,params:t}),$.set(n,i)}catch(n){await this.sendError(i,e,n),this.client.logger.error(n)}},this.isRequestOutOfSync=(e,s)=>parseInt(s.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_update\",t),{}):v(s)&&this.events.emit(u(\"session_update\",t),{error:s.error})},this.onSessionExtendRequest=async(e,s)=>{const{id:t}=s;try{this.isValidExtend({topic:e}),await this.setExpiry(e,q(L)),await this.sendResult({id:t,topic:e,result:!0}),this.client.events.emit(\"session_extend\",{id:t,topic:e})}catch(i){await this.sendError(t,e,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_extend\",t),{}):v(s)&&this.events.emit(u(\"session_extend\",t),{error:s.error})},this.onSessionPingRequest=async(e,s)=>{const{id:t}=s;try{this.isValidPing({topic:e}),await this.sendResult({id:t,topic:e,result:!0}),this.client.events.emit(\"session_ping\",{id:t,topic:e})}catch(i){await this.sendError(t,e,i),this.client.logger.error(i)}},this.onSessionPingResponse=(e,s)=>{const{id:t}=s;setTimeout(()=>{P(s)?this.events.emit(u(\"session_ping\",t),{}):v(s)&&this.events.emit(u(\"session_ping\",t),{error:s.error})},500)},this.onSessionDeleteRequest=async(e,s)=>{const{id:t}=s;try{this.isValidDisconnect({topic:e,reason:s.params}),await Promise.all([new Promise(i=>{this.client.core.relayer.once(Z.publish,async()=>{i(await this.deleteSession({topic:e,id:t}))})}),this.sendResult({id:t,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:S(\"USER_DISCONNECTED\")})])}catch(i){this.client.logger.error(i)}},this.onSessionRequest=async(e,s)=>{const{id:t,params:i}=s;try{this.isValidRequest(g({topic:e},i));const n=z(JSON.stringify(j(\"wc_sessionRequest\",i,t))),o=this.client.session.get(e),a=await this.getVerifyContext(n,o.peer.metadata),c={id:t,topic:e,params:i,verifyContext:a};await this.setPendingSessionRequest(c),this.addSessionRequestToSessionRequestQueue(c),this.processSessionRequestQueue()}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.onSessionRequestResponse=(e,s)=>{const{id:t}=s;P(s)?this.events.emit(u(\"session_request\",t),{result:s.result}):v(s)&&this.events.emit(u(\"session_request\",t),{error:s.error})},this.onSessionEventRequest=async(e,s)=>{const{id:t,params:i}=s;try{const n=`${e}_session_event_${i.event.name}`,o=$.get(n);if(o&&this.isRequestOutOfSync(o,t)){this.client.logger.info(`Discarding out of sync request - ${t}`);return}this.isValidEmit(g({topic:e},i)),this.client.events.emit(\"session_event\",{id:t,topic:e,params:i}),$.set(n,t)}catch(n){await this.sendError(t,e,n),this.client.logger.error(n)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:\"fulfilled\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=I.idle,this.processSessionRequestQueue()},ne(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:s})=>{const t=this.client.core.history.pending;t.length>0&&t.filter(i=>i.topic===e&&i.request.method===\"wc_sessionRequest\").forEach(i=>{this.events.emit(u(\"session_request\",i.request.id),{error:s})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===I.active){this.client.logger.info(\"session request queue is already active.\");return}const e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info(\"session request queue is empty.\");return}try{this.sessionRequestQueue.state=I.active,this.client.events.emit(\"session_request\",e)}catch(s){this.client.logger.error(s)}},this.onPairingCreated=e=>{if(e.active)return;const s=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);s&&this.onSessionProposeRequest(e.topic,j(\"wc_sessionPropose\",{requiredNamespaces:s.requiredNamespaces,optionalNamespaces:s.optionalNamespaces,relays:s.relays,proposer:s.proposer,sessionProperties:s.sessionProperties},s.id))},this.isValidConnect=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() params: ${JSON.stringify(e)}`);throw new Error(a)}const{pairingTopic:s,requiredNamespaces:t,optionalNamespaces:i,sessionProperties:n,relays:o}=e;if(A(s)||await this.isValidPairingTopic(s),!De(o,!0)){const{message:a}=l(\"MISSING_OR_INVALID\",`connect() relays: ${o}`);throw new Error(a)}!A(t)&&ee(t)!==0&&this.validateNamespaces(t,\"requiredNamespaces\"),!A(i)&&ee(i)!==0&&this.validateNamespaces(i,\"optionalNamespaces\"),A(n)||this.validateSessionProps(n,\"sessionProperties\")},this.validateNamespaces=(e,s)=>{const t=Ce(e,\"connect()\",s);if(t)throw new Error(t.message)},this.isValidApprove=async e=>{if(!y(e))throw new Error(l(\"MISSING_OR_INVALID\",`approve() params: ${e}`).message);const{id:s,namespaces:t,relayProtocol:i,sessionProperties:n}=e;await this.isValidProposalId(s);const o=this.client.proposal.get(s),a=Y(t,\"approve()\");if(a)throw new Error(a.message);const c=se(o.requiredNamespaces,t,\"approve()\");if(c)throw new Error(c.message);if(!b(i,!0)){const{message:p}=l(\"MISSING_OR_INVALID\",`approve() relayProtocol: ${i}`);throw new Error(p)}A(n)||this.validateSessionProps(n,\"sessionProperties\")},this.isValidReject=async e=>{if(!y(e)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() params: ${e}`);throw new Error(i)}const{id:s,reason:t}=e;if(await this.isValidProposalId(s),!Ae(t)){const{message:i}=l(\"MISSING_OR_INVALID\",`reject() reason: ${JSON.stringify(t)}`);throw new Error(i)}},this.isValidSessionSettleRequest=e=>{if(!y(e)){const{message:c}=l(\"MISSING_OR_INVALID\",`onSessionSettleRequest() params: ${e}`);throw new Error(c)}const{relay:s,controller:t,namespaces:i,expiry:n}=e;if(!be(s)){const{message:c}=l(\"MISSING_OR_INVALID\",\"onSessionSettleRequest() relay protocol should be a string\");throw new Error(c)}const o=Le(t,\"onSessionSettleRequest()\");if(o)throw new Error(o.message);const a=Y(i,\"onSessionSettleRequest()\");if(a)throw new Error(a.message);if(V(n)){const{message:c}=l(\"EXPIRED\",\"onSessionSettleRequest()\");throw new Error(c)}},this.isValidUpdate=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`update() params: ${e}`);throw new Error(a)}const{topic:s,namespaces:t}=e;await this.isValidSessionTopic(s);const i=this.client.session.get(s),n=Y(t,\"update()\");if(n)throw new Error(n.message);const o=se(i.requiredNamespaces,t,\"update()\");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`extend() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionTopic(s)},this.isValidRequest=async e=>{if(!y(e)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() params: ${e}`);throw new Error(a)}const{topic:s,request:t,chainId:i,expiry:n}=e;await this.isValidSessionTopic(s);const{namespaces:o}=this.client.session.get(s);if(!te(o,i)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() chainId: ${i}`);throw new Error(a)}if(!$e(t)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() ${JSON.stringify(t)}`);throw new Error(a)}if(!Ge(o,i,t.method)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() method: ${t.method}`);throw new Error(a)}if(n&&!Me(n,U)){const{message:a}=l(\"MISSING_OR_INVALID\",`request() expiry: ${n}. Expiry must be a number (in seconds) between ${U.min} and ${U.max}`);throw new Error(a)}},this.isValidRespond=async e=>{var s;if(!y(e)){const{message:n}=l(\"MISSING_OR_INVALID\",`respond() params: ${e}`);throw new Error(n)}const{topic:t,response:i}=e;try{await this.isValidSessionTopic(t)}catch(n){throw(s=e?.response)!=null&&s.id&&this.cleanupAfterResponse(e),n}if(!Ue(i)){const{message:n}=l(\"MISSING_OR_INVALID\",`respond() response: ${JSON.stringify(i)}`);throw new Error(n)}},this.isValidPing=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`ping() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionOrPairingTopic(s)},this.isValidEmit=async e=>{if(!y(e)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() params: ${e}`);throw new Error(o)}const{topic:s,event:t,chainId:i}=e;await this.isValidSessionTopic(s);const{namespaces:n}=this.client.session.get(s);if(!te(n,i)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() chainId: ${i}`);throw new Error(o)}if(!Qe(t)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(t)}`);throw new Error(o)}if(!ke(n,i,t.name)){const{message:o}=l(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(t)}`);throw new Error(o)}},this.isValidDisconnect=async e=>{if(!y(e)){const{message:t}=l(\"MISSING_OR_INVALID\",`disconnect() params: ${e}`);throw new Error(t)}const{topic:s}=e;await this.isValidSessionOrPairingTopic(s)},this.getVerifyContext=async(e,s)=>{const t={verified:{verifyUrl:s.verifyUrl||ye,validation:\"UNKNOWN\",origin:s.url||\"\"}};try{const i=await this.client.core.verify.resolve({attestationId:e,verifyUrl:s.verifyUrl});i&&(t.verified.origin=i.origin,t.verified.isScam=i.isScam,t.verified.validation=i.origin===new URL(s.url).origin?\"VALID\":\"INVALID\")}catch(i){this.client.logger.info(i)}return this.client.logger.info(`Verify context: ${JSON.stringify(t)}`),t},this.validateSessionProps=(e,s)=>{Object.values(e).forEach(t=>{if(!b(t,!1)){const{message:i}=l(\"MISSING_OR_INVALID\",`${s} must be in Record format. Received: ${JSON.stringify(t)}`);throw new Error(i)}})}}async isInitialized(){if(!this.initialized){const{message:r}=l(\"NOT_INITIALIZED\",this.name);throw new Error(r)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Z.message,async r=>{const{topic:e,message:s}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(s)))return;const t=await this.client.core.crypto.decode(e,s);try{Ze(t)?(this.client.core.history.set(e,t),this.onRelayEventRequest({topic:e,payload:t})):es(t)?(await this.client.core.history.resolve(t),await this.onRelayEventResponse({topic:e,payload:t}),this.client.core.history.delete(e,t.id)):this.onRelayEventUnknownPayload({topic:e,payload:t})}catch(i){this.client.logger.error(i)}})}registerExpirerEvents(){this.client.core.expirer.on(Se.expired,async r=>{const{topic:e,id:s}=Ke(r.target);if(s&&this.client.pendingRequest.keys.includes(s))return await this.deletePendingSessionRequest(s,l(\"EXPIRED\"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession({topic:e,expirerHasDeleted:!0}),this.client.events.emit(\"session_expire\",{topic:e})):s&&(await this.deleteProposal(s,!0),this.client.events.emit(\"proposal_expire\",{id:s}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ee.create,r=>this.onPairingCreated(r))}isValidPairingTopic(r){if(!b(r,!1)){const{message:e}=l(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${r}`);throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.core.pairing.pairings.get(r).expiry)){const{message:e}=l(\"EXPIRED\",`pairing topic: ${r}`);throw new Error(e)}}async isValidSessionTopic(r){if(!b(r,!1)){const{message:e}=l(\"MISSING_OR_INVALID\",`session topic should be a string: ${r}`);throw new Error(e)}if(!this.client.session.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`session topic doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.session.get(r).expiry)){await this.deleteSession({topic:r});const{message:e}=l(\"EXPIRED\",`session topic: ${r}`);throw new Error(e)}if(!this.client.core.crypto.keychain.has(r)){const{message:e}=l(\"MISSING_OR_INVALID\",`session topic does not exist in keychain: ${r}`);throw await this.deleteSession({topic:r}),new Error(e)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if(b(r,!1)){const{message:e}=l(\"NO_MATCHING_KEY\",`session or pairing topic doesn't exist: ${r}`);throw new Error(e)}else{const{message:e}=l(\"MISSING_OR_INVALID\",`session or pairing topic should be a string: ${r}`);throw new Error(e)}}async isValidProposalId(r){if(!ze(r)){const{message:e}=l(\"MISSING_OR_INVALID\",`proposal id should be a number: ${r}`);throw new Error(e)}if(!this.client.proposal.keys.includes(r)){const{message:e}=l(\"NO_MATCHING_KEY\",`proposal id doesn't exist: ${r}`);throw new Error(e)}if(V(this.client.proposal.get(r).expiryTimestamp)){await this.deleteProposal(r);const{message:e}=l(\"EXPIRED\",`proposal id: ${r}`);throw new Error(e)}}}class us extends K{constructor(r,e){super(r,e,oe,G),this.core=r,this.logger=e}}class ge extends K{constructor(r,e){super(r,e,ce,G),this.core=r,this.logger=e}}class gs extends K{constructor(r,e){super(r,e,pe,G,s=>s.id),this.core=r,this.logger=e}}class Q extends Pe{constructor(r){super(r),this.protocol=J,this.version=F,this.name=M.name,this.events=new Je,this.on=(s,t)=>this.events.on(s,t),this.once=(s,t)=>this.events.once(s,t),this.off=(s,t)=>this.events.off(s,t),this.removeListener=(s,t)=>this.events.removeListener(s,t),this.removeAllListeners=s=>this.events.removeAllListeners(s),this.connect=async s=>{try{return await this.engine.connect(s)}catch(t){throw this.logger.error(t.message),t}},this.pair=async s=>{try{return await this.engine.pair(s)}catch(t){throw this.logger.error(t.message),t}},this.approve=async s=>{try{return await this.engine.approve(s)}catch(t){throw this.logger.error(t.message),t}},this.reject=async s=>{try{return await this.engine.reject(s)}catch(t){throw this.logger.error(t.message),t}},this.update=async s=>{try{return await this.engine.update(s)}catch(t){throw this.logger.error(t.message),t}},this.extend=async s=>{try{return await this.engine.extend(s)}catch(t){throw this.logger.error(t.message),t}},this.request=async s=>{try{return await this.engine.request(s)}catch(t){throw this.logger.error(t.message),t}},this.respond=async s=>{try{return await this.engine.respond(s)}catch(t){throw this.logger.error(t.message),t}},this.ping=async s=>{try{return await this.engine.ping(s)}catch(t){throw this.logger.error(t.message),t}},this.emit=async s=>{try{return await this.engine.emit(s)}catch(t){throw this.logger.error(t.message),t}},this.disconnect=async s=>{try{return await this.engine.disconnect(s)}catch(t){throw this.logger.error(t.message),t}},this.find=s=>{try{return this.engine.find(s)}catch(t){throw this.logger.error(t.message),t}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(s){throw this.logger.error(s.message),s}},this.name=r?.name||M.name,this.metadata=r?.metadata||Ye();const e=typeof r?.logger<\"u\"&&typeof r?.logger!=\"string\"?r.logger:Ie(_e({level:r?.logger||M.logger}));this.core=r?.core||new Re(r),this.logger=qe(e,this.name),this.session=new ge(this.core,this.logger),this.proposal=new us(this.core,this.logger),this.pendingRequest=new gs(this.core,this.logger),this.engine=new ds(this)}static async init(r){const e=new Q(r);return await e.initialize(),e}get context(){return Ne(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\"Initialized\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info(\"SignClient Initialization Success\")}catch(r){throw this.logger.info(\"SignClient Initialization Failure\"),this.logger.error(r.message),r}}}const ws=ge,ms=Q;export{le as ENGINE_CONTEXT,I as ENGINE_QUEUE_STATES,R as ENGINE_RPC_OPTS,rs as HISTORY_CONTEXT,is as HISTORY_EVENTS,ns as HISTORY_STORAGE_VERSION,he as METHODS_TO_VERIFY,oe as PROPOSAL_CONTEXT,os as PROPOSAL_EXPIRY,ae as PROPOSAL_EXPIRY_MESSAGE,pe as REQUEST_CONTEXT,ce as SESSION_CONTEXT,L as SESSION_EXPIRY,U as SESSION_REQUEST_EXPIRY_BOUNDARIES,X as SIGN_CLIENT_CONTEXT,M as SIGN_CLIENT_DEFAULT,ss as SIGN_CLIENT_EVENTS,J as SIGN_CLIENT_PROTOCOL,ts as SIGN_CLIENT_STORAGE_OPTIONS,G as SIGN_CLIENT_STORAGE_PREFIX,F as SIGN_CLIENT_VERSION,ws as SessionStore,ms as SignClient,H as WALLETCONNECT_DEEPLINK_CHOICE,Q as default};\n//# sourceMappingURL=index.es.js.map\n","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","import{EventEmitter as m}from\"events\";import o from\"cross-fetch\";import{safeJsonStringify as a,safeJsonParse as y}from\"@walletconnect/safe-json\";import{isHttpUrl as h,formatJsonRpcError as b,parseConnectionError as u}from\"@walletconnect/jsonrpc-utils\";var P=Object.defineProperty,w=Object.defineProperties,E=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,l=(r,t,e)=>t in r?P(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,p=(r,t)=>{for(var e in t||(t={}))L.call(t,e)&&l(r,e,t[e]);if(c)for(var e of c(t))O.call(t,e)&&l(r,e,t[e]);return r},v=(r,t)=>w(r,E(t));const j={Accept:\"application/json\",\"Content-Type\":\"application/json\"},T=\"POST\",d={headers:j,method:T},g=10;class f{constructor(t,e=!1){if(this.url=t,this.disableProviderPing=e,this.events=new m,this.isAvailable=!1,this.registering=!1,!h(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error(\"Connection already closed\");this.onClose()}async send(t){this.isAvailable||await this.register();try{const e=a(t),s=await(await o(this.url,v(p({},d),{body:e}))).json();this.onPayload({data:s})}catch(e){this.onError(t.id,e)}}async register(t=this.url){if(!h(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount(\"register_error\")>=e||this.events.listenerCount(\"open\")>=e)&&this.events.setMaxListeners(e+1),new Promise((s,i)=>{this.events.once(\"register_error\",n=>{this.resetMaxListeners(),i(n)}),this.events.once(\"open\",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>\"u\")return i(new Error(\"HTTP connection is missing or invalid\"));s()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const e=a({id:1,jsonrpc:\"2.0\",method:\"test\",params:[]});await o(t,v(p({},d),{body:e}))}this.onOpen()}catch(e){const s=this.parseError(e);throw this.events.emit(\"register_error\",s),this.onClose(),s}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit(\"open\")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit(\"close\")}onPayload(t){if(typeof t.data>\"u\")return;const e=typeof t.data==\"string\"?y(t.data):t.data;this.events.emit(\"payload\",e)}onError(t,e){const s=this.parseError(e),i=s.message||s.toString(),n=b(t,i);this.events.emit(\"payload\",n)}parseError(t,e=this.url){return u(t,e,\"HTTP\")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{f as HttpConnection,f as default};\n//# sourceMappingURL=index.es.js.map\n","import bg,{PROPOSAL_EXPIRY_MESSAGE as Tg}from\"@walletconnect/sign-client\";import{isValidObject as Lg,isCaipNamespace as Pa,parseNamespaceKey as de,mergeArrays as $i,parseChainId as Dg,getSdkError as Aa,isValidArray as Ca}from\"@walletconnect/utils\";import{pino as Hg,getDefaultLoggerOptions as Ng}from\"@walletconnect/logger\";import At,{HttpConnection as $g}from\"@walletconnect/jsonrpc-http-connection\";import{JsonRpcProvider as ot}from\"@walletconnect/jsonrpc-provider\";import Ug from\"events\";import{formatJsonRpcResult as Wg}from\"@walletconnect/jsonrpc-utils\";const Ia=\"error\",Fg=\"wss://relay.walletconnect.com\",Mg=\"wc\",qg=\"universal_provider\",xa=`${Mg}@2:${qg}:`,Bg=\"https://rpc.walletconnect.com/v1/\",Vn={DEFAULT_CHAIN_CHANGED:\"default_chain_changed\"};var ge=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{},Ui={exports:{}};/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(A,u){(function(){var i,d=\"4.17.21\",w=200,L=\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\",D=\"Expected a function\",En=\"Invalid `variable` option passed into `_.template`\",zt=\"__lodash_hash_undefined__\",pr=500,It=\"__lodash_placeholder__\",Ln=1,Fn=2,xt=4,Et=1,ve=2,vn=1,ct=2,qi=4,Dn=8,yt=16,Hn=32,St=64,Mn=128,Kt=256,dr=512,Da=30,Ha=\"...\",Na=800,$a=16,Bi=1,Ua=2,Wa=3,ht=1/0,kn=9007199254740991,Fa=17976931348623157e292,_e=0/0,Nn=4294967295,Ma=Nn-1,qa=Nn>>>1,Ba=[[\"ary\",Mn],[\"bind\",vn],[\"bindKey\",ct],[\"curry\",Dn],[\"curryRight\",yt],[\"flip\",dr],[\"partial\",Hn],[\"partialRight\",St],[\"rearg\",Kt]],Ot=\"[object Arguments]\",me=\"[object Array]\",Ga=\"[object AsyncFunction]\",Yt=\"[object Boolean]\",Zt=\"[object Date]\",za=\"[object DOMException]\",we=\"[object Error]\",Pe=\"[object Function]\",Gi=\"[object GeneratorFunction]\",yn=\"[object Map]\",Jt=\"[object Number]\",Ka=\"[object Null]\",qn=\"[object Object]\",zi=\"[object Promise]\",Ya=\"[object Proxy]\",Xt=\"[object RegExp]\",Sn=\"[object Set]\",Qt=\"[object String]\",Ae=\"[object Symbol]\",Za=\"[object Undefined]\",Vt=\"[object WeakMap]\",Ja=\"[object WeakSet]\",kt=\"[object ArrayBuffer]\",Rt=\"[object DataView]\",gr=\"[object Float32Array]\",vr=\"[object Float64Array]\",_r=\"[object Int8Array]\",mr=\"[object Int16Array]\",wr=\"[object Int32Array]\",Pr=\"[object Uint8Array]\",Ar=\"[object Uint8ClampedArray]\",Cr=\"[object Uint16Array]\",Ir=\"[object Uint32Array]\",Xa=/\\b__p \\+= '';/g,Qa=/\\b(__p \\+=) '' \\+/g,Va=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,Ki=/&(?:amp|lt|gt|quot|#39);/g,Yi=/[&<>\"']/g,ka=RegExp(Ki.source),ja=RegExp(Yi.source),no=/<%-([\\s\\S]+?)%>/g,to=/<%([\\s\\S]+?)%>/g,Zi=/<%=([\\s\\S]+?)%>/g,eo=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ro=/^\\w*$/,io=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,xr=/[\\\\^$.*+?()[\\]{}|]/g,so=RegExp(xr.source),Er=/^\\s+/,uo=/\\s/,ao=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,oo=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,fo=/,? & /,co=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,ho=/[()=,{}\\[\\]\\/\\s]/,lo=/\\\\(\\\\)?/g,po=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Ji=/\\w*$/,go=/^[-+]0x[0-9a-f]+$/i,vo=/^0b[01]+$/i,_o=/^\\[object .+?Constructor\\]$/,mo=/^0o[0-7]+$/i,wo=/^(?:0|[1-9]\\d*)$/,Po=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ce=/($^)/,Ao=/['\\n\\r\\u2028\\u2029\\\\]/g,Ie=\"\\\\ud800-\\\\udfff\",Co=\"\\\\u0300-\\\\u036f\",Io=\"\\\\ufe20-\\\\ufe2f\",xo=\"\\\\u20d0-\\\\u20ff\",Xi=Co+Io+xo,Qi=\"\\\\u2700-\\\\u27bf\",Vi=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Eo=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\",yo=\"\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\",So=\"\\\\u2000-\\\\u206f\",Oo=\" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",ki=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",ji=\"\\\\ufe0e\\\\ufe0f\",ns=Eo+yo+So+Oo,yr=\"['\\u2019]\",Ro=\"[\"+Ie+\"]\",ts=\"[\"+ns+\"]\",xe=\"[\"+Xi+\"]\",es=\"\\\\d+\",bo=\"[\"+Qi+\"]\",rs=\"[\"+Vi+\"]\",is=\"[^\"+Ie+ns+es+Qi+Vi+ki+\"]\",Sr=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",To=\"(?:\"+xe+\"|\"+Sr+\")\",ss=\"[^\"+Ie+\"]\",Or=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",Rr=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",bt=\"[\"+ki+\"]\",us=\"\\\\u200d\",as=\"(?:\"+rs+\"|\"+is+\")\",Lo=\"(?:\"+bt+\"|\"+is+\")\",os=\"(?:\"+yr+\"(?:d|ll|m|re|s|t|ve))?\",fs=\"(?:\"+yr+\"(?:D|LL|M|RE|S|T|VE))?\",cs=To+\"?\",hs=\"[\"+ji+\"]?\",Do=\"(?:\"+us+\"(?:\"+[ss,Or,Rr].join(\"|\")+\")\"+hs+cs+\")*\",Ho=\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",No=\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",ls=hs+cs+Do,$o=\"(?:\"+[bo,Or,Rr].join(\"|\")+\")\"+ls,Uo=\"(?:\"+[ss+xe+\"?\",xe,Or,Rr,Ro].join(\"|\")+\")\",Wo=RegExp(yr,\"g\"),Fo=RegExp(xe,\"g\"),br=RegExp(Sr+\"(?=\"+Sr+\")|\"+Uo+ls,\"g\"),Mo=RegExp([bt+\"?\"+rs+\"+\"+os+\"(?=\"+[ts,bt,\"$\"].join(\"|\")+\")\",Lo+\"+\"+fs+\"(?=\"+[ts,bt+as,\"$\"].join(\"|\")+\")\",bt+\"?\"+as+\"+\"+os,bt+\"+\"+fs,No,Ho,es,$o].join(\"|\"),\"g\"),qo=RegExp(\"[\"+us+Ie+Xi+ji+\"]\"),Bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Go=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],zo=-1,B={};B[gr]=B[vr]=B[_r]=B[mr]=B[wr]=B[Pr]=B[Ar]=B[Cr]=B[Ir]=!0,B[Ot]=B[me]=B[kt]=B[Yt]=B[Rt]=B[Zt]=B[we]=B[Pe]=B[yn]=B[Jt]=B[qn]=B[Xt]=B[Sn]=B[Qt]=B[Vt]=!1;var q={};q[Ot]=q[me]=q[kt]=q[Rt]=q[Yt]=q[Zt]=q[gr]=q[vr]=q[_r]=q[mr]=q[wr]=q[yn]=q[Jt]=q[qn]=q[Xt]=q[Sn]=q[Qt]=q[Ae]=q[Pr]=q[Ar]=q[Cr]=q[Ir]=!0,q[we]=q[Pe]=q[Vt]=!1;var Ko={\\u00C0:\"A\",\\u00C1:\"A\",\\u00C2:\"A\",\\u00C3:\"A\",\\u00C4:\"A\",\\u00C5:\"A\",\\u00E0:\"a\",\\u00E1:\"a\",\\u00E2:\"a\",\\u00E3:\"a\",\\u00E4:\"a\",\\u00E5:\"a\",\\u00C7:\"C\",\\u00E7:\"c\",\\u00D0:\"D\",\\u00F0:\"d\",\\u00C8:\"E\",\\u00C9:\"E\",\\u00CA:\"E\",\\u00CB:\"E\",\\u00E8:\"e\",\\u00E9:\"e\",\\u00EA:\"e\",\\u00EB:\"e\",\\u00CC:\"I\",\\u00CD:\"I\",\\u00CE:\"I\",\\u00CF:\"I\",\\u00EC:\"i\",\\u00ED:\"i\",\\u00EE:\"i\",\\u00EF:\"i\",\\u00D1:\"N\",\\u00F1:\"n\",\\u00D2:\"O\",\\u00D3:\"O\",\\u00D4:\"O\",\\u00D5:\"O\",\\u00D6:\"O\",\\u00D8:\"O\",\\u00F2:\"o\",\\u00F3:\"o\",\\u00F4:\"o\",\\u00F5:\"o\",\\u00F6:\"o\",\\u00F8:\"o\",\\u00D9:\"U\",\\u00DA:\"U\",\\u00DB:\"U\",\\u00DC:\"U\",\\u00F9:\"u\",\\u00FA:\"u\",\\u00FB:\"u\",\\u00FC:\"u\",\\u00DD:\"Y\",\\u00FD:\"y\",\\u00FF:\"y\",\\u00C6:\"Ae\",\\u00E6:\"ae\",\\u00DE:\"Th\",\\u00FE:\"th\",\\u00DF:\"ss\",\\u0100:\"A\",\\u0102:\"A\",\\u0104:\"A\",\\u0101:\"a\",\\u0103:\"a\",\\u0105:\"a\",\\u0106:\"C\",\\u0108:\"C\",\\u010A:\"C\",\\u010C:\"C\",\\u0107:\"c\",\\u0109:\"c\",\\u010B:\"c\",\\u010D:\"c\",\\u010E:\"D\",\\u0110:\"D\",\\u010F:\"d\",\\u0111:\"d\",\\u0112:\"E\",\\u0114:\"E\",\\u0116:\"E\",\\u0118:\"E\",\\u011A:\"E\",\\u0113:\"e\",\\u0115:\"e\",\\u0117:\"e\",\\u0119:\"e\",\\u011B:\"e\",\\u011C:\"G\",\\u011E:\"G\",\\u0120:\"G\",\\u0122:\"G\",\\u011D:\"g\",\\u011F:\"g\",\\u0121:\"g\",\\u0123:\"g\",\\u0124:\"H\",\\u0126:\"H\",\\u0125:\"h\",\\u0127:\"h\",\\u0128:\"I\",\\u012A:\"I\",\\u012C:\"I\",\\u012E:\"I\",\\u0130:\"I\",\\u0129:\"i\",\\u012B:\"i\",\\u012D:\"i\",\\u012F:\"i\",\\u0131:\"i\",\\u0134:\"J\",\\u0135:\"j\",\\u0136:\"K\",\\u0137:\"k\",\\u0138:\"k\",\\u0139:\"L\",\\u013B:\"L\",\\u013D:\"L\",\\u013F:\"L\",\\u0141:\"L\",\\u013A:\"l\",\\u013C:\"l\",\\u013E:\"l\",\\u0140:\"l\",\\u0142:\"l\",\\u0143:\"N\",\\u0145:\"N\",\\u0147:\"N\",\\u014A:\"N\",\\u0144:\"n\",\\u0146:\"n\",\\u0148:\"n\",\\u014B:\"n\",\\u014C:\"O\",\\u014E:\"O\",\\u0150:\"O\",\\u014D:\"o\",\\u014F:\"o\",\\u0151:\"o\",\\u0154:\"R\",\\u0156:\"R\",\\u0158:\"R\",\\u0155:\"r\",\\u0157:\"r\",\\u0159:\"r\",\\u015A:\"S\",\\u015C:\"S\",\\u015E:\"S\",\\u0160:\"S\",\\u015B:\"s\",\\u015D:\"s\",\\u015F:\"s\",\\u0161:\"s\",\\u0162:\"T\",\\u0164:\"T\",\\u0166:\"T\",\\u0163:\"t\",\\u0165:\"t\",\\u0167:\"t\",\\u0168:\"U\",\\u016A:\"U\",\\u016C:\"U\",\\u016E:\"U\",\\u0170:\"U\",\\u0172:\"U\",\\u0169:\"u\",\\u016B:\"u\",\\u016D:\"u\",\\u016F:\"u\",\\u0171:\"u\",\\u0173:\"u\",\\u0174:\"W\",\\u0175:\"w\",\\u0176:\"Y\",\\u0177:\"y\",\\u0178:\"Y\",\\u0179:\"Z\",\\u017B:\"Z\",\\u017D:\"Z\",\\u017A:\"z\",\\u017C:\"z\",\\u017E:\"z\",\\u0132:\"IJ\",\\u0133:\"ij\",\\u0152:\"Oe\",\\u0153:\"oe\",\\u0149:\"'n\",\\u017F:\"s\"},Yo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},Zo={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"},Jo={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Xo=parseFloat,Qo=parseInt,ps=typeof ge==\"object\"&&ge&&ge.Object===Object&&ge,Vo=typeof self==\"object\"&&self&&self.Object===Object&&self,k=ps||Vo||Function(\"return this\")(),Tr=u&&!u.nodeType&&u,lt=Tr&&!0&&A&&!A.nodeType&&A,ds=lt&<.exports===Tr,Lr=ds&&ps.process,_n=function(){try{var h=lt&<.require&<.require(\"util\").types;return h||Lr&&Lr.binding&&Lr.binding(\"util\")}catch{}}(),gs=_n&&_n.isArrayBuffer,vs=_n&&_n.isDate,_s=_n&&_n.isMap,ms=_n&&_n.isRegExp,ws=_n&&_n.isSet,Ps=_n&&_n.isTypedArray;function cn(h,g,p){switch(p.length){case 0:return h.call(g);case 1:return h.call(g,p[0]);case 2:return h.call(g,p[0],p[1]);case 3:return h.call(g,p[0],p[1],p[2])}return h.apply(g,p)}function ko(h,g,p,C){for(var S=-1,U=h==null?0:h.length;++S-1}function Dr(h,g,p){for(var C=-1,S=h==null?0:h.length;++C-1;);return p}function Os(h,g){for(var p=h.length;p--&&Tt(g,h[p],0)>-1;);return p}function of(h,g){for(var p=h.length,C=0;p--;)h[p]===g&&++C;return C}var ff=Ur(Ko),cf=Ur(Yo);function hf(h){return\"\\\\\"+Jo[h]}function lf(h,g){return h==null?i:h[g]}function Lt(h){return qo.test(h)}function pf(h){return Bo.test(h)}function df(h){for(var g,p=[];!(g=h.next()).done;)p.push(g.value);return p}function qr(h){var g=-1,p=Array(h.size);return h.forEach(function(C,S){p[++g]=[S,C]}),p}function Rs(h,g){return function(p){return h(g(p))}}function tt(h,g){for(var p=-1,C=h.length,S=0,U=[];++p-1}function tc(n,t){var e=this.__data__,r=Be(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}Bn.prototype.clear=Vf,Bn.prototype.delete=kf,Bn.prototype.get=jf,Bn.prototype.has=nc,Bn.prototype.set=tc;function Gn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function An(n,t,e,r,s,o){var f,c=t&Ln,l=t&Fn,v=t&xt;if(e&&(f=s?e(n,r,s,o):e(n)),f!==i)return f;if(!K(n))return n;var _=O(n);if(_){if(f=sh(n),!c)return un(n,f)}else{var m=tn(n),P=m==Pe||m==Gi;if(at(n))return hu(n,c);if(m==qn||m==Ot||P&&!s){if(f=l||P?{}:bu(n),!c)return l?Jc(n,_c(f,n)):Zc(n,qs(f,n))}else{if(!q[m])return s?n:{};f=uh(n,m,c)}}o||(o=new Rn);var I=o.get(n);if(I)return I;o.set(n,f),sa(n)?n.forEach(function(y){f.add(An(y,t,e,y,n,o))}):ra(n)&&n.forEach(function(y,H){f.set(H,An(y,t,e,H,n,o))});var E=v?l?pi:li:l?on:V,b=_?i:E(n);return mn(b||n,function(y,H){b&&(H=y,y=n[H]),se(f,H,An(y,t,e,H,n,o))}),f}function mc(n){var t=V(n);return function(e){return Bs(e,n,t)}}function Bs(n,t,e){var r=e.length;if(n==null)return!r;for(n=M(n);r--;){var s=e[r],o=t[s],f=n[s];if(f===i&&!(s in n)||!o(f))return!1}return!0}function Gs(n,t,e){if(typeof n!=\"function\")throw new wn(D);return le(function(){n.apply(i,e)},t)}function ue(n,t,e,r){var s=-1,o=Ee,f=!0,c=n.length,l=[],v=t.length;if(!c)return l;e&&(t=G(t,hn(e))),r?(o=Dr,f=!1):t.length>=w&&(o=jt,f=!1,t=new gt(t));n:for(;++ss?0:s+e),r=r===i||r>s?s:R(r),r<0&&(r+=s),r=e>r?0:aa(r);e0&&e(c)?t>1?j(c,t-1,e,r,s):nt(s,c):r||(s[s.length]=c)}return s}var Jr=_u(),Ys=_u(!0);function $n(n,t){return n&&Jr(n,t,V)}function Xr(n,t){return n&&Ys(n,t,V)}function ze(n,t){return jn(t,function(e){return Jn(n[e])})}function _t(n,t){t=st(t,n);for(var e=0,r=t.length;n!=null&&et}function Ac(n,t){return n!=null&&F.call(n,t)}function Cc(n,t){return n!=null&&t in M(n)}function Ic(n,t,e){return n>=nn(t,e)&&n=120&&_.length>=120)?new gt(f&&_):i}_=n[0];var m=-1,P=c[0];n:for(;++m-1;)c!==n&&Ne.call(c,l,1),Ne.call(n,l,1);return n}function ru(n,t){for(var e=n?t.length:0,r=e-1;e--;){var s=t[e];if(e==r||s!==o){var o=s;Zn(s)?Ne.call(n,s,1):si(n,s)}}return n}function ei(n,t){return n+We(Us()*(t-n+1))}function $c(n,t,e,r){for(var s=-1,o=Q(Ue((t-n)/(e||1)),0),f=p(o);o--;)f[r?o:++s]=n,n+=e;return f}function ri(n,t){var e=\"\";if(!n||t<1||t>kn)return e;do t%2&&(e+=n),t=We(t/2),t&&(n+=n);while(t);return e}function T(n,t){return Pi(Du(n,t,fn),n+\"\")}function Uc(n){return Ms(Gt(n))}function Wc(n,t){var e=Gt(n);return tr(e,vt(t,0,e.length))}function fe(n,t,e,r){if(!K(n))return n;t=st(t,n);for(var s=-1,o=t.length,f=o-1,c=n;c!=null&&++ss?0:s+t),e=e>s?s:e,e<0&&(e+=s),s=t>e?0:e-t>>>0,t>>>=0;for(var o=p(s);++r>>1,f=n[o];f!==null&&!pn(f)&&(e?f<=t:f=w){var v=t?null:kc(n);if(v)return Se(v);f=!1,s=jt,l=new gt}else l=t?[]:c;n:for(;++r=r?n:Cn(n,t,e)}var cu=Rf||function(n){return k.clearTimeout(n)};function hu(n,t){if(t)return n.slice();var e=n.length,r=Ls?Ls(e):new n.constructor(e);return n.copy(r),r}function fi(n){var t=new n.constructor(n.byteLength);return new De(t).set(new De(n)),t}function Gc(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function zc(n){var t=new n.constructor(n.source,Ji.exec(n));return t.lastIndex=n.lastIndex,t}function Kc(n){return ie?M(ie.call(n)):{}}function lu(n,t){var e=t?fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function pu(n,t){if(n!==t){var e=n!==i,r=n===null,s=n===n,o=pn(n),f=t!==i,c=t===null,l=t===t,v=pn(t);if(!c&&!v&&!o&&n>t||o&&f&&l&&!c&&!v||r&&f&&l||!e&&l||!s)return 1;if(!r&&!o&&!v&&n=c)return l;var v=e[r];return l*(v==\"desc\"?-1:1)}}return n.index-t.index}function du(n,t,e,r){for(var s=-1,o=n.length,f=e.length,c=-1,l=t.length,v=Q(o-f,0),_=p(l+v),m=!r;++c1?e[s-1]:i,f=s>2?e[2]:i;for(o=n.length>3&&typeof o==\"function\"?(s--,o):i,f&&rn(e[0],e[1],f)&&(o=s<3?i:o,s=1),t=M(t);++r-1?s[o?t[f]:f]:i}}function Pu(n){return Yn(function(t){var e=t.length,r=e,s=Pn.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if(typeof o!=\"function\")throw new wn(D);if(s&&!f&&je(o)==\"wrapper\")var f=new Pn([],!0)}for(r=f?r:e;++r1&&$.reverse(),_&&lc))return!1;var v=o.get(n),_=o.get(t);if(v&&_)return v==t&&_==n;var m=-1,P=!0,I=e&ve?new gt:i;for(o.set(n,t),o.set(t,n);++m1?\"& \":\"\")+t[r],t=t.join(e>2?\", \":\" \"),n.replace(ao,`{\n/* [wrapped with `+t+`] */\n`)}function oh(n){return O(n)||Pt(n)||!!(Ns&&n&&n[Ns])}function Zn(n,t){var e=typeof n;return t=t??kn,!!t&&(e==\"number\"||e!=\"symbol\"&&wo.test(n))&&n>-1&&n%1==0&&n0){if(++t>=Na)return arguments[0]}else t=0;return n.apply(i,arguments)}}function tr(n,t){var e=-1,r=n.length,s=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e=typeof e==\"function\"?(n.pop(),e):i,Ku(n,e)});function Yu(n){var t=a(n);return t.__chain__=!0,t}function wl(n,t){return t(n),n}function er(n,t){return t(n)}var Pl=Yn(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,s=function(o){return Zr(o,n)};return t>1||this.__actions__.length||!(r instanceof N)||!Zn(e)?this.thru(s):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:er,args:[s],thisArg:i}),new Pn(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(i),o}))});function Al(){return Yu(this)}function Cl(){return new Pn(this.value(),this.__chain__)}function Il(){this.__values__===i&&(this.__values__=ua(this.value()));var n=this.__index__>=this.__values__.length,t=n?i:this.__values__[this.__index__++];return{done:n,value:t}}function xl(){return this}function El(n){for(var t,e=this;e instanceof qe;){var r=Fu(e);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;e=e.__wrapped__}return s.__wrapped__=n,t}function yl(){var n=this.__wrapped__;if(n instanceof N){var t=n;return this.__actions__.length&&(t=new N(this)),t=t.reverse(),t.__actions__.push({func:er,args:[Ai],thisArg:i}),new Pn(t,this.__chain__)}return this.thru(Ai)}function Sl(){return ou(this.__wrapped__,this.__actions__)}var Ol=Je(function(n,t,e){F.call(n,e)?++n[e]:zn(n,e,1)});function Rl(n,t,e){var r=O(n)?As:wc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}function bl(n,t){var e=O(n)?jn:Ks;return e(n,x(t,3))}var Tl=wu(Mu),Ll=wu(qu);function Dl(n,t){return j(rr(n,t),1)}function Hl(n,t){return j(rr(n,t),ht)}function Nl(n,t,e){return e=e===i?1:R(e),j(rr(n,t),e)}function Zu(n,t){var e=O(n)?mn:rt;return e(n,x(t,3))}function Ju(n,t){var e=O(n)?jo:zs;return e(n,x(t,3))}var $l=Je(function(n,t,e){F.call(n,e)?n[e].push(t):zn(n,e,[t])});function Ul(n,t,e,r){n=an(n)?n:Gt(n),e=e&&!r?R(e):0;var s=n.length;return e<0&&(e=Q(s+e,0)),or(n)?e<=s&&n.indexOf(t,e)>-1:!!s&&Tt(n,t,e)>-1}var Wl=T(function(n,t,e){var r=-1,s=typeof t==\"function\",o=an(n)?p(n.length):[];return rt(n,function(f){o[++r]=s?cn(t,f,e):ae(f,t,e)}),o}),Fl=Je(function(n,t,e){zn(n,e,t)});function rr(n,t){var e=O(n)?G:Vs;return e(n,x(t,3))}function Ml(n,t,e,r){return n==null?[]:(O(t)||(t=t==null?[]:[t]),e=r?i:e,O(e)||(e=e==null?[]:[e]),tu(n,t,e))}var ql=Je(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function Bl(n,t,e){var r=O(n)?Hr:Es,s=arguments.length<3;return r(n,x(t,4),e,s,rt)}function Gl(n,t,e){var r=O(n)?nf:Es,s=arguments.length<3;return r(n,x(t,4),e,s,zs)}function zl(n,t){var e=O(n)?jn:Ks;return e(n,ur(x(t,3)))}function Kl(n){var t=O(n)?Ms:Uc;return t(n)}function Yl(n,t,e){(e?rn(n,t,e):t===i)?t=1:t=R(t);var r=O(n)?dc:Wc;return r(n,t)}function Zl(n){var t=O(n)?gc:Mc;return t(n)}function Jl(n){if(n==null)return 0;if(an(n))return or(n)?Dt(n):n.length;var t=tn(n);return t==yn||t==Sn?n.size:jr(n).length}function Xl(n,t,e){var r=O(n)?Nr:qc;return e&&rn(n,t,e)&&(t=i),r(n,x(t,3))}var Ql=T(function(n,t){if(n==null)return[];var e=t.length;return e>1&&rn(n,t[0],t[1])?t=[]:e>2&&rn(t[0],t[1],t[2])&&(t=[t[0]]),tu(n,j(t,1),[])}),ir=bf||function(){return k.Date.now()};function Vl(n,t){if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){if(--n<1)return t.apply(this,arguments)}}function Xu(n,t,e){return t=e?i:t,t=n&&t==null?n.length:t,Kn(n,Mn,i,i,i,i,t)}function Qu(n,t){var e;if(typeof t!=\"function\")throw new wn(D);return n=R(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Ii=T(function(n,t,e){var r=vn;if(e.length){var s=tt(e,qt(Ii));r|=Hn}return Kn(n,r,t,e,s)}),Vu=T(function(n,t,e){var r=vn|ct;if(e.length){var s=tt(e,qt(Vu));r|=Hn}return Kn(t,r,n,e,s)});function ku(n,t,e){t=e?i:t;var r=Kn(n,Dn,i,i,i,i,i,t);return r.placeholder=ku.placeholder,r}function ju(n,t,e){t=e?i:t;var r=Kn(n,yt,i,i,i,i,i,t);return r.placeholder=ju.placeholder,r}function na(n,t,e){var r,s,o,f,c,l,v=0,_=!1,m=!1,P=!0;if(typeof n!=\"function\")throw new wn(D);t=xn(t)||0,K(e)&&(_=!!e.leading,m=\"maxWait\"in e,o=m?Q(xn(e.maxWait)||0,t):o,P=\"trailing\"in e?!!e.trailing:P);function I(J){var Tn=r,Qn=s;return r=s=i,v=J,f=n.apply(Qn,Tn),f}function E(J){return v=J,c=le(H,t),_?I(J):f}function b(J){var Tn=J-l,Qn=J-v,wa=t-Tn;return m?nn(wa,o-Qn):wa}function y(J){var Tn=J-l,Qn=J-v;return l===i||Tn>=t||Tn<0||m&&Qn>=o}function H(){var J=ir();if(y(J))return $(J);c=le(H,b(J))}function $(J){return c=i,P&&r?I(J):(r=s=i,f)}function dn(){c!==i&&cu(c),v=0,r=l=s=c=i}function sn(){return c===i?f:$(ir())}function gn(){var J=ir(),Tn=y(J);if(r=arguments,s=this,l=J,Tn){if(c===i)return E(l);if(m)return cu(c),c=le(H,t),I(l)}return c===i&&(c=le(H,t)),f}return gn.cancel=dn,gn.flush=sn,gn}var kl=T(function(n,t){return Gs(n,1,t)}),jl=T(function(n,t,e){return Gs(n,xn(t)||0,e)});function np(n){return Kn(n,dr)}function sr(n,t){if(typeof n!=\"function\"||t!=null&&typeof t!=\"function\")throw new wn(D);var e=function(){var r=arguments,s=t?t.apply(this,r):r[0],o=e.cache;if(o.has(s))return o.get(s);var f=n.apply(this,r);return e.cache=o.set(s,f)||o,f};return e.cache=new(sr.Cache||Gn),e}sr.Cache=Gn;function ur(n){if(typeof n!=\"function\")throw new wn(D);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function tp(n){return Qu(2,n)}var ep=Bc(function(n,t){t=t.length==1&&O(t[0])?G(t[0],hn(x())):G(j(t,1),hn(x()));var e=t.length;return T(function(r){for(var s=-1,o=nn(r.length,e);++s=t}),Pt=Js(function(){return arguments}())?Js:function(n){return Y(n)&&F.call(n,\"callee\")&&!Hs.call(n,\"callee\")},O=p.isArray,_p=gs?hn(gs):Ec;function an(n){return n!=null&&ar(n.length)&&!Jn(n)}function Z(n){return Y(n)&&an(n)}function mp(n){return n===!0||n===!1||Y(n)&&en(n)==Yt}var at=Lf||Ni,wp=vs?hn(vs):yc;function Pp(n){return Y(n)&&n.nodeType===1&&!pe(n)}function Ap(n){if(n==null)return!0;if(an(n)&&(O(n)||typeof n==\"string\"||typeof n.splice==\"function\"||at(n)||Bt(n)||Pt(n)))return!n.length;var t=tn(n);if(t==yn||t==Sn)return!n.size;if(he(n))return!jr(n).length;for(var e in n)if(F.call(n,e))return!1;return!0}function Cp(n,t){return oe(n,t)}function Ip(n,t,e){e=typeof e==\"function\"?e:i;var r=e?e(n,t):i;return r===i?oe(n,t,i,e):!!r}function Ei(n){if(!Y(n))return!1;var t=en(n);return t==we||t==za||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!pe(n)}function xp(n){return typeof n==\"number\"&&$s(n)}function Jn(n){if(!K(n))return!1;var t=en(n);return t==Pe||t==Gi||t==Ga||t==Ya}function ea(n){return typeof n==\"number\"&&n==R(n)}function ar(n){return typeof n==\"number\"&&n>-1&&n%1==0&&n<=kn}function K(n){var t=typeof n;return n!=null&&(t==\"object\"||t==\"function\")}function Y(n){return n!=null&&typeof n==\"object\"}var ra=_s?hn(_s):Oc;function Ep(n,t){return n===t||kr(n,t,gi(t))}function yp(n,t,e){return e=typeof e==\"function\"?e:i,kr(n,t,gi(t),e)}function Sp(n){return ia(n)&&n!=+n}function Op(n){if(hh(n))throw new S(L);return Xs(n)}function Rp(n){return n===null}function bp(n){return n==null}function ia(n){return typeof n==\"number\"||Y(n)&&en(n)==Jt}function pe(n){if(!Y(n)||en(n)!=qn)return!1;var t=He(n);if(t===null)return!0;var e=F.call(t,\"constructor\")&&t.constructor;return typeof e==\"function\"&&e instanceof e&&be.call(e)==yf}var yi=ms?hn(ms):Rc;function Tp(n){return ea(n)&&n>=-kn&&n<=kn}var sa=ws?hn(ws):bc;function or(n){return typeof n==\"string\"||!O(n)&&Y(n)&&en(n)==Qt}function pn(n){return typeof n==\"symbol\"||Y(n)&&en(n)==Ae}var Bt=Ps?hn(Ps):Tc;function Lp(n){return n===i}function Dp(n){return Y(n)&&tn(n)==Vt}function Hp(n){return Y(n)&&en(n)==Ja}var Np=ke(ni),$p=ke(function(n,t){return n<=t});function ua(n){if(!n)return[];if(an(n))return or(n)?On(n):un(n);if(ne&&n[ne])return df(n[ne]());var t=tn(n),e=t==yn?qr:t==Sn?Se:Gt;return e(n)}function Xn(n){if(!n)return n===0?n:0;if(n=xn(n),n===ht||n===-ht){var t=n<0?-1:1;return t*Fa}return n===n?n:0}function R(n){var t=Xn(n),e=t%1;return t===t?e?t-e:t:0}function aa(n){return n?vt(R(n),0,Nn):0}function xn(n){if(typeof n==\"number\")return n;if(pn(n))return _e;if(K(n)){var t=typeof n.valueOf==\"function\"?n.valueOf():n;n=K(t)?t+\"\":t}if(typeof n!=\"string\")return n===0?n:+n;n=ys(n);var e=vo.test(n);return e||mo.test(n)?Qo(n.slice(2),e?2:8):go.test(n)?_e:+n}function oa(n){return Un(n,on(n))}function Up(n){return n?vt(R(n),-kn,kn):n===0?n:0}function W(n){return n==null?\"\":ln(n)}var Wp=Ft(function(n,t){if(he(t)||an(t)){Un(t,V(t),n);return}for(var e in t)F.call(t,e)&&se(n,e,t[e])}),fa=Ft(function(n,t){Un(t,on(t),n)}),fr=Ft(function(n,t,e,r){Un(t,on(t),n,r)}),Fp=Ft(function(n,t,e,r){Un(t,V(t),n,r)}),Mp=Yn(Zr);function qp(n,t){var e=Wt(n);return t==null?e:qs(e,t)}var Bp=T(function(n,t){n=M(n);var e=-1,r=t.length,s=r>2?t[2]:i;for(s&&rn(t[0],t[1],s)&&(r=1);++e1),o}),Un(n,pi(n),e),r&&(e=An(e,Ln|Fn|xt,jc));for(var s=t.length;s--;)si(e,t[s]);return e});function ud(n,t){return ha(n,ur(x(t)))}var ad=Yn(function(n,t){return n==null?{}:Hc(n,t)});function ha(n,t){if(n==null)return{};var e=G(pi(n),function(r){return[r]});return t=x(t),eu(n,e,function(r,s){return t(r,s[0])})}function od(n,t,e){t=st(t,n);var r=-1,s=t.length;for(s||(s=1,n=i);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var s=Us();return nn(n+s*(t-n+Xo(\"1e-\"+((s+\"\").length-1))),t)}return ei(n,t)}var wd=Mt(function(n,t,e){return t=t.toLowerCase(),n+(e?da(t):t)});function da(n){return Ri(W(n).toLowerCase())}function ga(n){return n=W(n),n&&n.replace(Po,ff).replace(Fo,\"\")}function Pd(n,t,e){n=W(n),t=ln(t);var r=n.length;e=e===i?r:vt(R(e),0,r);var s=e;return e-=t.length,e>=0&&n.slice(e,s)==t}function Ad(n){return n=W(n),n&&ja.test(n)?n.replace(Yi,cf):n}function Cd(n){return n=W(n),n&&so.test(n)?n.replace(xr,\"\\\\$&\"):n}var Id=Mt(function(n,t,e){return n+(e?\"-\":\"\")+t.toLowerCase()}),xd=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toLowerCase()}),Ed=mu(\"toLowerCase\");function yd(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;if(!t||r>=t)return n;var s=(t-r)/2;return Ve(We(s),e)+n+Ve(Ue(s),e)}function Sd(n,t,e){n=W(n),t=R(t);var r=t?Dt(n):0;return t&&r>>0,e?(n=W(n),n&&(typeof t==\"string\"||t!=null&&!yi(t))&&(t=ln(t),!t&&Lt(n))?ut(On(n),0,e):n.split(t,e)):[]}var Hd=Mt(function(n,t,e){return n+(e?\" \":\"\")+Ri(t)});function Nd(n,t,e){return n=W(n),e=e==null?0:vt(R(e),0,n.length),t=ln(t),n.slice(e,e+t.length)==t}function $d(n,t,e){var r=a.templateSettings;e&&rn(n,t,e)&&(t=i),n=W(n),t=fr({},t,r,Eu);var s=fr({},t.imports,r.imports,Eu),o=V(s),f=Mr(s,o),c,l,v=0,_=t.interpolate||Ce,m=\"__p += '\",P=Br((t.escape||Ce).source+\"|\"+_.source+\"|\"+(_===Zi?po:Ce).source+\"|\"+(t.evaluate||Ce).source+\"|$\",\"g\"),I=\"//# sourceURL=\"+(F.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++zo+\"]\")+`\n`;n.replace(P,function(y,H,$,dn,sn,gn){return $||($=dn),m+=n.slice(v,gn).replace(Ao,hf),H&&(c=!0,m+=`' +\n__e(`+H+`) +\n'`),sn&&(l=!0,m+=`';\n`+sn+`;\n__p += '`),$&&(m+=`' +\n((__t = (`+$+`)) == null ? '' : __t) +\n'`),v=gn+y.length,y}),m+=`';\n`;var E=F.call(t,\"variable\")&&t.variable;if(!E)m=`with (obj) {\n`+m+`\n}\n`;else if(ho.test(E))throw new S(En);m=(l?m.replace(Xa,\"\"):m).replace(Qa,\"$1\").replace(Va,\"$1;\"),m=\"function(\"+(E||\"obj\")+`) {\n`+(E?\"\":`obj || (obj = {});\n`)+\"var __t, __p = ''\"+(c?\", __e = _.escape\":\"\")+(l?`, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n`:`;\n`)+m+`return __p\n}`;var b=_a(function(){return U(o,I+\"return \"+m).apply(i,f)});if(b.source=m,Ei(b))throw b;return b}function Ud(n){return W(n).toLowerCase()}function Wd(n){return W(n).toUpperCase()}function Fd(n,t,e){if(n=W(n),n&&(e||t===i))return ys(n);if(!n||!(t=ln(t)))return n;var r=On(n),s=On(t),o=Ss(r,s),f=Os(r,s)+1;return ut(r,o,f).join(\"\")}function Md(n,t,e){if(n=W(n),n&&(e||t===i))return n.slice(0,bs(n)+1);if(!n||!(t=ln(t)))return n;var r=On(n),s=Os(r,On(t))+1;return ut(r,0,s).join(\"\")}function qd(n,t,e){if(n=W(n),n&&(e||t===i))return n.replace(Er,\"\");if(!n||!(t=ln(t)))return n;var r=On(n),s=Ss(r,On(t));return ut(r,s).join(\"\")}function Bd(n,t){var e=Da,r=Ha;if(K(t)){var s=\"separator\"in t?t.separator:s;e=\"length\"in t?R(t.length):e,r=\"omission\"in t?ln(t.omission):r}n=W(n);var o=n.length;if(Lt(n)){var f=On(n);o=f.length}if(e>=o)return n;var c=e-Dt(r);if(c<1)return r;var l=f?ut(f,0,c).join(\"\"):n.slice(0,c);if(s===i)return l+r;if(f&&(c+=l.length-c),yi(s)){if(n.slice(c).search(s)){var v,_=l;for(s.global||(s=Br(s.source,W(Ji.exec(s))+\"g\")),s.lastIndex=0;v=s.exec(_);)var m=v.index;l=l.slice(0,m===i?c:m)}}else if(n.indexOf(ln(s),c)!=c){var P=l.lastIndexOf(s);P>-1&&(l=l.slice(0,P))}return l+r}function Gd(n){return n=W(n),n&&ka.test(n)?n.replace(Ki,mf):n}var zd=Mt(function(n,t,e){return n+(e?\" \":\"\")+t.toUpperCase()}),Ri=mu(\"toUpperCase\");function va(n,t,e){return n=W(n),t=e?i:t,t===i?pf(n)?Af(n):rf(n):n.match(t)||[]}var _a=T(function(n,t){try{return cn(n,i,t)}catch(e){return Ei(e)?e:new S(e)}}),Kd=Yn(function(n,t){return mn(t,function(e){e=Wn(e),zn(n,e,Ii(n[e],n))}),n});function Yd(n){var t=n==null?0:n.length,e=x();return n=t?G(n,function(r){if(typeof r[1]!=\"function\")throw new wn(D);return[e(r[0]),r[1]]}):[],T(function(r){for(var s=-1;++skn)return[];var e=Nn,r=nn(n,Nn);t=x(t),n-=Nn;for(var s=Fr(r,t);++e0||t<0)?new N(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(t=R(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},N.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},N.prototype.toArray=function(){return this.take(Nn)},$n(N.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=a[r?\"take\"+(t==\"last\"?\"Right\":\"\"):t],o=r||/^find/.test(t);s&&(a.prototype[t]=function(){var f=this.__wrapped__,c=r?[1]:arguments,l=f instanceof N,v=c[0],_=l||O(f),m=function(H){var $=s.apply(a,nt([H],c));return r&&P?$[0]:$};_&&e&&typeof v==\"function\"&&v.length!=1&&(l=_=!1);var P=this.__chain__,I=!!this.__actions__.length,E=o&&!P,b=l&&!I;if(!o&&_){f=b?f:new N(this);var y=n.apply(f,c);return y.__actions__.push({func:er,args:[m],thisArg:i}),new Pn(y,P)}return E&&b?n.apply(this,c):(y=this.thru(m),E?r?y.value()[0]:y.value():y)})}),mn([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=Oe[n],e=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",r=/^(?:pop|shift)$/.test(n);a.prototype[n]=function(){var s=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(O(o)?o:[],s)}return this[e](function(f){return t.apply(O(f)?f:[],s)})}}),$n(N.prototype,function(n,t){var e=a[t];if(e){var r=e.name+\"\";F.call(Ut,r)||(Ut[r]=[]),Ut[r].push({name:t,func:e})}}),Ut[Xe(i,ct).name]=[{name:\"wrapper\",func:i}],N.prototype.clone=Gf,N.prototype.reverse=zf,N.prototype.value=Kf,a.prototype.at=Pl,a.prototype.chain=Al,a.prototype.commit=Cl,a.prototype.next=Il,a.prototype.plant=El,a.prototype.reverse=yl,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Sl,a.prototype.first=a.prototype.head,ne&&(a.prototype[ne]=xl),a},Ht=Cf();lt?((lt.exports=Ht)._=Ht,Tr._=Ht):k._=Ht}).call(ge)})(Ui,Ui.exports);var Gg=Object.defineProperty,zg=Object.defineProperties,Kg=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,Yg=Object.prototype.hasOwnProperty,Zg=Object.prototype.propertyIsEnumerable,ya=(A,u,i)=>u in A?Gg(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,cr=(A,u)=>{for(var i in u||(u={}))Yg.call(u,i)&&ya(A,i,u[i]);if(Ea)for(var i of Ea(u))Zg.call(u,i)&&ya(A,i,u[i]);return A},Jg=(A,u)=>zg(A,Kg(u));function ft(A,u,i){var d;const w=Dg(A);return((d=u.rpcMap)==null?void 0:d[w.reference])||`${Bg}?chainId=${w.namespace}:${w.reference}&projectId=${i}`}function Ct(A){return A.includes(\":\")?A.split(\":\")[1]:A}function Sa(A){return A.map(u=>`${u.split(\":\")[0]}:${u.split(\":\")[1]}`)}function Xg(A,u){const i=Object.keys(u.namespaces).filter(w=>w.includes(A));if(!i.length)return[];const d=[];return i.forEach(w=>{const L=u.namespaces[w].accounts;d.push(...L)}),d}function Oa(A={},u={}){const i=Ra(A),d=Ra(u);return Ui.exports.merge(i,d)}function Ra(A){var u,i,d,w;const L={};if(!Lg(A))return L;for(const[D,En]of Object.entries(A)){const zt=Pa(D)?[D]:En.chains,pr=En.methods||[],It=En.events||[],Ln=En.rpcMap||{},Fn=de(D);L[Fn]=Jg(cr(cr({},L[Fn]),En),{chains:$i(zt,(u=L[Fn])==null?void 0:u.chains),methods:$i(pr,(i=L[Fn])==null?void 0:i.methods),events:$i(It,(d=L[Fn])==null?void 0:d.events),rpcMap:cr(cr({},Ln),(w=L[Fn])==null?void 0:w.rpcMap)})}return L}function Qg(A){return A.includes(\":\")?A.split(\":\")[2]:A}function Vg(A){const u={};for(const[i,d]of Object.entries(A)){const w=d.methods||[],L=d.events||[],D=d.accounts||[],En=Pa(i)?[i]:d.chains?d.chains:Sa(d.accounts);u[i]={chains:En,methods:w,events:L,accounts:D}}return u}function Wi(A){return typeof A==\"number\"?A:A.includes(\"0x\")?parseInt(A,16):(A=A.includes(\":\")?A.split(\":\")[1]:A,isNaN(Number(A))?A:Number(A))}const ba={},z=A=>ba[A],Fi=(A,u)=>{ba[A]=u};class kg{constructor(u){this.name=\"polkadot\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class jg{constructor(u){this.name=\"eip155\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(u){switch(u.request.method){case\"eth_requestAccounts\":return this.getAccounts();case\"eth_accounts\":return this.getAccounts();case\"wallet_switchEthereumChain\":return await this.handleSwitchChain(u);case\"eth_chainId\":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(u.request.method)?await this.client.request(u):this.getHttpProvider().request(u.request)}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(parseInt(u),i),this.chainId=parseInt(u),this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}createHttpProvider(u,i){const d=i||ft(`${this.name}:${u}`,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new $g(d,z(\"disableProviderPing\")))}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=parseInt(Ct(i));u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}getHttpProvider(){const u=this.chainId,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}async handleSwitchChain(u){var i,d;let w=u.request.params?(i=u.request.params[0])==null?void 0:i.chainId:\"0x0\";w=w.startsWith(\"0x\")?w:`0x${w}`;const L=parseInt(w,16);if(this.isChainApproved(L))this.setDefaultChain(`${L}`);else if(this.namespace.methods.includes(\"wallet_switchEthereumChain\"))await this.client.request({topic:u.topic,request:{method:u.request.method,params:[{chainId:w}]},chainId:(d=this.namespace.chains)==null?void 0:d[0]}),this.setDefaultChain(`${L}`);else throw new Error(`Failed to switch to chain 'eip155:${L}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(u){return this.namespace.chains.includes(`${this.name}:${u}`)}}class nv{constructor(u){this.name=\"solana\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class tv{constructor(u){this.name=\"cosmos\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class ev{constructor(u){this.name=\"cip34\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{const d=this.getCardanoRPCUrl(i),w=Ct(i);u[w]=this.createHttpProvider(w,d)}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}getCardanoRPCUrl(u){const i=this.namespace.rpcMap;if(i)return i[u]}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||this.getCardanoRPCUrl(u);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class rv{constructor(u){this.name=\"elrond\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class iv{constructor(u){this.name=\"multiversx\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){this.httpProviders[u]||this.setHttpProvider(u,i),this.chainId=u,this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${u}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}getAccounts(){const u=this.namespace.accounts;return u?[...new Set(u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2]))]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;const w=Ct(i);u[w]=this.createHttpProvider(w,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace,this.client.core.projectId);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);return new ot(new At(d,z(\"disableProviderPing\")))}}class sv{constructor(u){this.name=\"near\",this.namespace=u.namespace,this.events=z(\"events\"),this.client=z(\"client\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(u){this.namespace=Object.assign(this.namespace,u)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const u=this.namespace.chains[0];if(!u)throw new Error(\"ChainId not found\");return u.split(\":\")[1]}request(u){return this.namespace.methods.includes(u.request.method)?this.client.request(u):this.getHttpProvider().request(u.request)}setDefaultChain(u,i){if(this.chainId=u,!this.httpProviders[u]){const d=i||ft(`${this.name}:${u}`,this.namespace);if(!d)throw new Error(`No RPC url provided for chainId: ${u}`);this.setHttpProvider(u,d)}this.events.emit(Vn.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const u=this.namespace.accounts;return u?u.filter(i=>i.split(\":\")[1]===this.chainId.toString()).map(i=>i.split(\":\")[2])||[]:[]}createHttpProviders(){const u={};return this.namespace.chains.forEach(i=>{var d;u[i]=this.createHttpProvider(i,(d=this.namespace.rpcMap)==null?void 0:d[i])}),u}getHttpProvider(){const u=`${this.name}:${this.chainId}`,i=this.httpProviders[u];if(typeof i>\"u\")throw new Error(`JSON-RPC provider for ${u} not found`);return i}setHttpProvider(u,i){const d=this.createHttpProvider(u,i);d&&(this.httpProviders[u]=d)}createHttpProvider(u,i){const d=i||ft(u,this.namespace);return typeof d>\"u\"?void 0:new ot(new At(d,z(\"disableProviderPing\")))}}var uv=Object.defineProperty,av=Object.defineProperties,ov=Object.getOwnPropertyDescriptors,Ta=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,La=(A,u,i)=>u in A?uv(A,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):A[u]=i,hr=(A,u)=>{for(var i in u||(u={}))fv.call(u,i)&&La(A,i,u[i]);if(Ta)for(var i of Ta(u))cv.call(u,i)&&La(A,i,u[i]);return A},Mi=(A,u)=>av(A,ov(u));class lr{constructor(u){this.events=new Ug,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=u,this.logger=typeof u?.logger<\"u\"&&typeof u?.logger!=\"string\"?u.logger:Hg(Ng({level:u?.logger||Ia})),this.disableProviderPing=u?.disableProviderPing||!1}static async init(u){const i=new lr(u);return await i.initialize(),i}async request(u,i,d){const[w,L]=this.validateChain(i);if(!this.session)throw new Error(\"Please call connect() before request()\");return await this.getProvider(w).request({request:hr({},u),chainId:`${w}:${L}`,topic:this.session.topic,expiry:d})}sendAsync(u,i,d,w){const L=new Date().getTime();this.request(u,d,w).then(D=>i(null,Wg(L,D))).catch(D=>i(D,void 0))}async enable(){if(!this.client)throw new Error(\"Sign Client not initialized\");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var u;if(!this.session)throw new Error(\"Please call connect() before enable()\");await this.client.disconnect({topic:(u=this.session)==null?void 0:u.topic,reason:Aa(\"USER_DISCONNECTED\")}),await this.cleanup()}async connect(u){if(!this.client)throw new Error(\"Sign Client not initialized\");if(this.setNamespaces(u),await this.cleanupPendingPairings(),!u.skipPairing)return await this.pair(u.pairingTopic)}on(u,i){this.events.on(u,i)}once(u,i){this.events.once(u,i)}removeListener(u,i){this.events.removeListener(u,i)}off(u,i){this.events.off(u,i)}get isWalletConnect(){return!0}async pair(u){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error(\"Pairing aborted\");if(i>=this.maxPairingAttempts)throw new Error(\"Max auto pairing attempts reached\");const{uri:d,approval:w}=await this.client.connect({pairingTopic:u,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});d&&(this.uri=d,this.events.emit(\"display_uri\",d)),await w().then(L=>{this.session=L;const D=Vg(L.namespaces);this.namespaces=Oa(this.namespaces,D),this.persist(\"namespaces\",this.namespaces)}).catch(L=>{if(L.message!==Tg)throw L;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(u,i){try{if(!this.session)return;const[d,w]=this.validateChain(u);this.getProvider(d).setDefaultChain(w,i)}catch(d){if(!/Please call connect/.test(d.message))throw d}}async cleanupPendingPairings(u={}){this.logger.info(\"Cleaning up inactive pairings...\");const i=this.client.pairing.getAll();if(Ca(i)){for(const d of i)u.deletePairings?this.client.core.expirer.set(d.topic,0):await this.client.core.relayer.subscriber.unsubscribe(d.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore(\"namespaces\"),this.optionalNamespaces=await this.getFromStore(\"optionalNamespaces\")||{},this.client.session.length){const u=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[u]),this.createProviders()}}async initialize(){this.logger.trace(\"Initialized\"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await bg.init({logger:this.providerOpts.logger||Ia,relayUrl:this.providerOpts.relayUrl||Fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace(\"SignClient Initialized\")}createProviders(){if(!this.client)throw new Error(\"Sign Client not initialized\");if(!this.session)throw new Error(\"Session not initialized. Please call connect() before enable()\");const u=[...new Set(Object.keys(this.session.namespaces).map(i=>de(i)))];Fi(\"client\",this.client),Fi(\"events\",this.events),Fi(\"disableProviderPing\",this.disableProviderPing),u.forEach(i=>{if(!this.session)return;const d=Xg(i,this.session),w=Sa(d),L=Oa(this.namespaces,this.optionalNamespaces),D=Mi(hr({},L[i]),{accounts:d,chains:w});switch(i){case\"eip155\":this.rpcProviders[i]=new jg({namespace:D});break;case\"solana\":this.rpcProviders[i]=new nv({namespace:D});break;case\"cosmos\":this.rpcProviders[i]=new tv({namespace:D});break;case\"polkadot\":this.rpcProviders[i]=new kg({namespace:D});break;case\"cip34\":this.rpcProviders[i]=new ev({namespace:D});break;case\"elrond\":this.rpcProviders[i]=new rv({namespace:D});break;case\"multiversx\":this.rpcProviders[i]=new iv({namespace:D});break;case\"near\":this.rpcProviders[i]=new sv({namespace:D});break}})}registerEventListeners(){if(typeof this.client>\"u\")throw new Error(\"Sign Client is not initialized\");this.client.on(\"session_ping\",u=>{this.events.emit(\"session_ping\",u)}),this.client.on(\"session_event\",u=>{const{params:i}=u,{event:d}=i;if(d.name===\"accountsChanged\"){const w=d.data;w&&Ca(w)&&this.events.emit(\"accountsChanged\",w.map(Qg))}else if(d.name===\"chainChanged\"){const w=i.chainId,L=i.event.data,D=de(w),En=Wi(w)!==Wi(L)?`${D}:${Wi(L)}`:w;this.onChainChanged(En)}else this.events.emit(d.name,d.data);this.events.emit(\"session_event\",u)}),this.client.on(\"session_update\",({topic:u,params:i})=>{var d;const{namespaces:w}=i,L=(d=this.client)==null?void 0:d.session.get(u);this.session=Mi(hr({},L),{namespaces:w}),this.onSessionUpdate(),this.events.emit(\"session_update\",{topic:u,params:i})}),this.client.on(\"session_delete\",async u=>{await this.cleanup(),this.events.emit(\"session_delete\",u),this.events.emit(\"disconnect\",Mi(hr({},Aa(\"USER_DISCONNECTED\")),{data:u.topic}))}),this.on(Vn.DEFAULT_CHAIN_CHANGED,u=>{this.onChainChanged(u,!0)})}getProvider(u){if(!this.rpcProviders[u])throw new Error(`Provider not found: ${u}`);return this.rpcProviders[u]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(u=>{var i;this.getProvider(u).updateNamespace((i=this.session)==null?void 0:i.namespaces[u])})}setNamespaces(u){const{namespaces:i,optionalNamespaces:d,sessionProperties:w}=u;i&&Object.keys(i).length&&(this.namespaces=i),d&&Object.keys(d).length&&(this.optionalNamespaces=d),this.sessionProperties=w,this.persist(\"namespaces\",i),this.persist(\"optionalNamespaces\",d)}validateChain(u){const[i,d]=u?.split(\":\")||[\"\",\"\"];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,d];if(i&&!Object.keys(this.namespaces||{}).map(D=>de(D)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&d)return[i,d];const w=de(Object.keys(this.namespaces)[0]),L=this.rpcProviders[w].getDefaultChain();return[w,L]}async requestAccounts(){const[u]=this.validateChain();return await this.getProvider(u).requestAccounts()}onChainChanged(u,i=!1){if(!this.namespaces)return;const[d,w]=this.validateChain(u);w&&(i||this.getProvider(d).setDefaultChain(w),this.namespaces[d]?this.namespaces[d].defaultChain=w:this.namespaces[`${d}:${w}`]?this.namespaces[`${d}:${w}`].defaultChain=w:this.namespaces[`${d}:${w}`]={defaultChain:w},this.persist(\"namespaces\",this.namespaces),this.events.emit(\"chainChanged\",w))}onConnect(){this.createProviders(),this.events.emit(\"connect\",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist(\"namespaces\",void 0),this.persist(\"optionalNamespaces\",void 0),this.persist(\"sessionProperties\",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(u,i){this.client.core.storage.setItem(`${xa}/${u}`,i)}async getFromStore(u){return await this.client.core.storage.getItem(`${xa}/${u}`)}}const hv=lr;export{hv as UniversalProvider,lr as default};\n//# sourceMappingURL=index.es.js.map\n","import{EventEmitter as b}from\"events\";import{getAccountsFromNamespaces as A,getSdkError as R,isValidArray as w}from\"@walletconnect/utils\";import{UniversalProvider as T}from\"@walletconnect/universal-provider\";const P=\"wc\",S=\"ethereum_provider\",$=`${P}@2:${S}:`,j=\"https://rpc.walletconnect.com/v1/\",u=[\"eth_sendTransaction\",\"personal_sign\"],E=[\"eth_accounts\",\"eth_requestAccounts\",\"eth_sendRawTransaction\",\"eth_sign\",\"eth_signTransaction\",\"eth_signTypedData\",\"eth_signTypedData_v3\",\"eth_signTypedData_v4\",\"eth_sendTransaction\",\"personal_sign\",\"wallet_switchEthereumChain\",\"wallet_addEthereumChain\",\"wallet_getPermissions\",\"wallet_requestPermissions\",\"wallet_registerOnboarding\",\"wallet_watchAsset\",\"wallet_scanQRCode\"],m=[\"chainChanged\",\"accountsChanged\"],_=[\"chainChanged\",\"accountsChanged\",\"message\",\"disconnect\",\"connect\"];var N=Object.defineProperty,q=Object.defineProperties,D=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,O=(a,t,s)=>t in a?N(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,p=(a,t)=>{for(var s in t||(t={}))U.call(t,s)&&O(a,s,t[s]);if(y)for(var s of y(t))Q.call(t,s)&&O(a,s,t[s]);return a},M=(a,t)=>q(a,D(t));function g(a){return Number(a[0].split(\":\")[1])}function f(a){return`0x${a.toString(16)}`}function L(a){const{chains:t,optionalChains:s,methods:i,optionalMethods:n,events:e,optionalEvents:h,rpcMap:c}=a;if(!w(t))throw new Error(\"Invalid chains\");const o={chains:t,methods:i||u,events:e||m,rpcMap:p({},t.length?{[g(t)]:c[g(t)]}:{})},r=e?.filter(l=>!m.includes(l)),d=i?.filter(l=>!u.includes(l));if(!s&&!h&&!n&&!(r!=null&&r.length)&&!(d!=null&&d.length))return{required:t.length?o:void 0};const C=r?.length&&d?.length||!s,I={chains:[...new Set(C?o.chains.concat(s||[]):s)],methods:[...new Set(o.methods.concat(n!=null&&n.length?n:E))],events:[...new Set(o.events.concat(h!=null&&h.length?h:_))],rpcMap:c};return{required:t.length?o:void 0,optional:s.length?I:void 0}}class v{constructor(){this.events=new b,this.namespace=\"eip155\",this.accounts=[],this.chainId=1,this.STORAGE_KEY=$,this.on=(t,s)=>(this.events.on(t,s),this),this.once=(t,s)=>(this.events.once(t,s),this),this.removeListener=(t,s)=>(this.events.removeListener(t,s),this),this.off=(t,s)=>(this.events.off(t,s),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const s=new v;return await s.initialize(t),s}async request(t,s){return await this.signer.request(t,this.formatChainId(this.chainId),s)}sendAsync(t,s,i){this.signer.sendAsync(t,s,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:\"eth_requestAccounts\"})}async connect(t){if(!this.signer.client)throw new Error(\"Provider not initialized. Call init() first\");this.loadConnectOpts(t);const{required:s,optional:i}=L(this.rpc);try{const n=await new Promise(async(h,c)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(r=>{!r.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error(\"Connection request reset. Please try again.\")))})),await this.signer.connect(M(p({namespaces:p({},s&&{[this.namespace]:s})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:t?.pairingTopic})).then(r=>{h(r)}).catch(r=>{c(new Error(r.message))})});if(!n)return;const e=A(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:e),this.setAccounts(e),this.events.emit(\"connect\",{chainId:f(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on(\"session_event\",t=>{const{params:s}=t,{event:i}=s;i.name===\"accountsChanged\"?(this.accounts=this.parseAccounts(i.data),this.events.emit(\"accountsChanged\",this.accounts)):i.name===\"chainChanged\"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit(\"session_event\",t)}),this.signer.on(\"chainChanged\",t=>{const s=parseInt(t);this.chainId=s,this.events.emit(\"chainChanged\",f(this.chainId)),this.persist()}),this.signer.on(\"session_update\",t=>{this.events.emit(\"session_update\",t)}),this.signer.on(\"session_delete\",t=>{this.reset(),this.events.emit(\"session_delete\",t),this.events.emit(\"disconnect\",M(p({},R(\"USER_DISCONNECTED\")),{data:t.topic,name:\"USER_DISCONNECTED\"}))}),this.signer.on(\"display_uri\",t=>{var s,i;this.rpc.showQrModal&&((s=this.modal)==null||s.closeModal(),(i=this.modal)==null||i.openModal({uri:t})),this.events.emit(\"display_uri\",t)})}switchEthereumChain(t){this.request({method:\"wallet_switchEthereumChain\",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t==\"string\"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(\":\")[1])}setChainIds(t){const s=t.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));s.length&&(this.chainId=s[0],this.events.emit(\"chainChanged\",f(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const s=this.parseChainId(t);this.chainId=s,this.switchEthereumChain(s)}}parseAccountId(t){const[s,i,n]=t.split(\":\");return{chainId:`${s}:${i}`,address:n}}setAccounts(t){this.accounts=t.filter(s=>this.parseChainId(this.parseAccountId(s).chainId)===this.chainId).map(s=>this.parseAccountId(s).address),this.events.emit(\"accountsChanged\",this.accounts)}getRpcConfig(t){var s,i;const n=(s=t?.chains)!=null?s:[],e=(i=t?.optionalChains)!=null?i:[],h=n.concat(e);if(!h.length)throw new Error(\"No chains specified in either `chains` or `optionalChains`\");const c=n.length?t?.methods||u:[],o=n.length?t?.events||m:[],r=t?.optionalMethods||[],d=t?.optionalEvents||[],C=t?.rpcMap||this.buildRpcMap(h,t.projectId),I=t?.qrModalOptions||void 0;return{chains:n?.map(l=>this.formatChainId(l)),optionalChains:e.map(l=>this.formatChainId(l)),methods:c,events:o,optionalMethods:r,optionalEvents:d,rpcMap:C,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:I,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,s){const i={};return t.forEach(n=>{i[n]=this.getRpcUrl(n,s)}),i}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?g(this.rpc.chains):g(this.rpc.optionalChains),this.signer=await T.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let s;try{const{WalletConnectModal:i}=await import(\"@walletconnect/modal\");s=i}catch{throw new Error(\"To use QR modal, please install @walletconnect/modal package\")}if(s)try{this.modal=new s(p({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error(\"Could not generate WalletConnectModal Instance\")}}}loadConnectOpts(t){if(!t)return;const{chains:s,optionalChains:i,rpcMap:n}=t;s&&w(s)&&(this.rpc.chains=s.map(e=>this.formatChainId(e)),s.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})),i&&w(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i?.map(e=>this.formatChainId(e)),i.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))}getRpcUrl(t,s){var i;return((i=this.rpc.rpcMap)==null?void 0:i[t])||`${j}?chainId=eip155:${t}&projectId=${s||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),s=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:s?.accounts),this.setAccounts(s?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t==\"string\"||t instanceof String?[this.parseAccount(t)]:t.map(s=>this.parseAccount(s))}}const G=v;export{G as EthereumProvider,_ as OPTIONAL_EVENTS,E as OPTIONAL_METHODS,m as REQUIRED_EVENTS,u as REQUIRED_METHODS,v as default};\n//# sourceMappingURL=index.es.js.map\n","export const EthersConstantsUtil = {\n WALLET_ID: '@w3m/wallet_id',\n ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902,\n ERROR_CODE_DEFAULT: 5000\n};\n//# sourceMappingURL=EthersConstantsUtil.js.map","import { ConstantsUtil } from './ConstantsUtil.js';\nimport { PresetsUtil } from './PresetsUtil.js';\nexport const EthersHelpersUtil = {\n getCaipDefaultChain(chain) {\n if (!chain) {\n return undefined;\n }\n return {\n id: `${ConstantsUtil.EIP155}:${chain.chainId}`,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId]\n };\n },\n hexStringToNumber(value) {\n const string = value.startsWith('0x') ? value.slice(2) : value;\n const number = parseInt(string, 16);\n return number;\n },\n numberToHexString(value) {\n return `0x${value.toString(16)}`;\n },\n async getUserInfo(provider) {\n const [address, chainId] = await Promise.all([\n EthersHelpersUtil.getAddress(provider),\n EthersHelpersUtil.getChainId(provider)\n ]);\n return { chainId, address };\n },\n async getChainId(provider) {\n const chainId = await provider.request({ method: 'eth_chainId' });\n return Number(chainId);\n },\n async getAddress(provider) {\n const [address] = await provider.request({ method: 'eth_accounts' });\n return address;\n },\n async addEthereumChain(provider, chain) {\n await provider.request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: EthersHelpersUtil.numberToHexString(chain.chainId),\n rpcUrls: [chain.rpcUrl],\n chainName: chain.name,\n nativeCurrency: {\n name: chain.currency,\n decimals: 18,\n symbol: chain.currency\n },\n blockExplorerUrls: [chain.explorerUrl],\n iconUrls: [PresetsUtil.EIP155NetworkImageIds[chain.chainId]]\n }\n ]\n });\n }\n};\n//# sourceMappingURL=EthersHelpersUtil.js.map","import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nconst state = proxy({\n provider: undefined,\n providerType: undefined,\n address: undefined,\n chainId: undefined,\n isConnected: false\n});\nexport const EthersStoreUtil = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n setProvider(provider) {\n if (provider) {\n state.provider = ref(provider);\n }\n },\n setProviderType(providerType) {\n state.providerType = providerType;\n },\n setAddress(address) {\n state.address = address;\n },\n setPreferredAccountType(preferredAccountType) {\n state.preferredAccountType = preferredAccountType;\n },\n setChainId(chainId) {\n state.chainId = chainId;\n },\n setIsConnected(isConnected) {\n state.isConnected = isConnected;\n },\n setError(error) {\n state.error = error;\n },\n reset() {\n state.provider = undefined;\n state.address = undefined;\n state.chainId = undefined;\n state.providerType = undefined;\n state.isConnected = false;\n state.error = undefined;\n state.preferredAccountType = undefined;\n }\n};\n//# sourceMappingURL=EthersStoreUtil.js.map","import { Web3ModalScaffold } from '@web3modal/scaffold';\nimport { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils';\nimport EthereumProvider from '@walletconnect/ethereum-provider';\nimport { formatEther, JsonRpcProvider, InfuraProvider, getAddress as getOriginalAddress, parseUnits, formatUnits } from 'ethers';\nimport { EthersConstantsUtil, EthersHelpersUtil, EthersStoreUtil } from '@web3modal/scaffold-utils/ethers';\nimport { W3mFrameProvider, W3mFrameHelpers, W3mFrameRpcConstants, W3mFrameConstants } from '@web3modal/wallet';\nimport { BrowserProvider } from 'ethers';\nimport { JsonRpcSigner } from 'ethers';\nimport { NetworkUtil } from '@web3modal/common';\nexport class Web3Modal extends Web3ModalScaffold {\n constructor(options) {\n const { ethersConfig, siweConfig, chains, defaultChain, tokens, chainImages, _sdkVersion, ...w3mOptions } = options;\n if (!ethersConfig) {\n throw new Error('web3modal:constructor - ethersConfig is undefined');\n }\n if (!w3mOptions.projectId) {\n throw new Error('web3modal:constructor - projectId is undefined');\n }\n const networkControllerClient = {\n switchCaipNetwork: async (caipNetwork) => {\n const chainId = NetworkUtil.caipNetworkIdToNumber(caipNetwork?.id);\n if (chainId) {\n try {\n EthersStoreUtil.setError(undefined);\n await this.switchNetwork(chainId);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n throw new Error('networkControllerClient:switchCaipNetwork - unable to switch chain');\n }\n }\n },\n getApprovedCaipNetworksData: async () => new Promise(async (resolve) => {\n const walletChoice = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (walletChoice?.includes(ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID)) {\n const provider = await this.getWalletConnectProvider();\n if (!provider) {\n throw new Error('networkControllerClient:getApprovedCaipNetworks - connector is undefined');\n }\n const ns = provider.signer?.session?.namespaces;\n const nsMethods = ns?.[ConstantsUtil.EIP155]?.methods;\n const nsChains = ns?.[ConstantsUtil.EIP155]?.chains;\n const result = {\n supportsAllNetworks: nsMethods?.includes(ConstantsUtil.ADD_CHAIN_METHOD) ?? false,\n approvedCaipNetworkIds: nsChains\n };\n resolve(result);\n }\n else {\n const result = {\n approvedCaipNetworkIds: undefined,\n supportsAllNetworks: true\n };\n resolve(result);\n }\n })\n };\n const connectionControllerClient = {\n connectWalletConnect: async (onUri) => {\n const WalletConnectProvider = await this.getWalletConnectProvider();\n if (!WalletConnectProvider) {\n throw new Error('connectionControllerClient:getWalletConnectUri - provider is undefined');\n }\n WalletConnectProvider.on('display_uri', (uri) => {\n onUri(uri);\n });\n await WalletConnectProvider.connect();\n await this.setWalletConnectProvider();\n },\n connectExternal: async ({ id, info, provider }) => {\n if (id === ConstantsUtil.INJECTED_CONNECTOR_ID) {\n const InjectedProvider = ethersConfig.injected;\n if (!InjectedProvider) {\n throw new Error('connectionControllerClient:connectInjected - provider is undefined');\n }\n try {\n EthersStoreUtil.setError(undefined);\n await InjectedProvider.request({ method: 'eth_requestAccounts' });\n this.setInjectedProvider(ethersConfig);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.EIP6963_CONNECTOR_ID && info && provider) {\n try {\n EthersStoreUtil.setError(undefined);\n await provider.request({ method: 'eth_requestAccounts' });\n this.setEIP6963Provider(provider, info.name);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n const CoinbaseProvider = ethersConfig.coinbase;\n if (!CoinbaseProvider) {\n throw new Error('connectionControllerClient:connectCoinbase - connector is undefined');\n }\n try {\n EthersStoreUtil.setError(undefined);\n await CoinbaseProvider.request({ method: 'eth_requestAccounts' });\n this.setCoinbaseProvider(ethersConfig);\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n else if (id === ConstantsUtil.EMAIL_CONNECTOR_ID) {\n this.setEmailProvider();\n }\n },\n checkInstalled(ids) {\n if (!ids) {\n return Boolean(window.ethereum);\n }\n if (ethersConfig.injected) {\n if (!window?.ethereum) {\n return false;\n }\n }\n return ids.some(id => Boolean(window.ethereum?.[String(id)]));\n },\n disconnect: async () => {\n const provider = EthersStoreUtil.state.provider;\n const providerType = EthersStoreUtil.state.providerType;\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n const WalletConnectProvider = provider;\n await WalletConnectProvider.disconnect();\n }\n else if (providerType !== ConstantsUtil.EMAIL_CONNECTOR_ID) {\n provider?.emit('disconnect');\n }\n else {\n await this.emailProvider?.disconnect();\n }\n },\n signMessage: async (message) => {\n const provider = EthersStoreUtil.state.provider;\n if (!provider) {\n throw new Error('connectionControllerClient:signMessage - provider is undefined');\n }\n const signature = await provider.request({\n method: 'personal_sign',\n params: [message, this.getAddress()]\n });\n return signature;\n },\n parseUnits: (value, decimals) => parseUnits(value, decimals),\n formatUnits: (value, decimals) => formatUnits(value, decimals),\n async estimateGas(data) {\n const chainId = EthersStoreUtil.state.chainId;\n const provider = EthersStoreUtil.state.provider;\n const address = EthersStoreUtil.state.address;\n if (!provider) {\n throw new Error('connectionControllerClient:sendTransaction - provider is undefined');\n }\n if (!address) {\n throw new Error('connectionControllerClient:sendTransaction - address is undefined');\n }\n const txParams = {\n from: data.address,\n to: data.to,\n data: data.data,\n type: 0\n };\n const browserProvider = new BrowserProvider(provider, chainId);\n const signer = new JsonRpcSigner(browserProvider, address);\n const gas = await signer.estimateGas(txParams);\n return gas;\n },\n sendTransaction: async (data) => {\n const chainId = EthersStoreUtil.state.chainId;\n const provider = EthersStoreUtil.state.provider;\n const address = EthersStoreUtil.state.address;\n if (!provider) {\n throw new Error('connectionControllerClient:sendTransaction - provider is undefined');\n }\n if (!address) {\n throw new Error('connectionControllerClient:sendTransaction - address is undefined');\n }\n const txParams = {\n to: data.to,\n value: data.value,\n gasLimit: data.gas,\n gasPrice: data.gasPrice,\n data: data.data,\n type: 0\n };\n const browserProvider = new BrowserProvider(provider, chainId);\n const signer = new JsonRpcSigner(browserProvider, address);\n const txResponse = await signer.sendTransaction(txParams);\n const txReceipt = await txResponse.wait();\n return txReceipt?.hash || null;\n }\n };\n super({\n networkControllerClient,\n connectionControllerClient,\n siweControllerClient: siweConfig,\n defaultChain: EthersHelpersUtil.getCaipDefaultChain(defaultChain),\n tokens: HelpersUtil.getCaipTokens(tokens),\n _sdkVersion: _sdkVersion ?? `html-ethers-${ConstantsUtil.VERSION}`,\n ...w3mOptions\n });\n this.hasSyncedConnectedAccount = false;\n this.EIP6963Providers = [];\n this.options = undefined;\n this.options = options;\n this.metadata = ethersConfig.metadata;\n this.projectId = w3mOptions.projectId;\n this.chains = chains;\n this.createProvider();\n EthersStoreUtil.subscribeKey('address', () => {\n this.syncAccount();\n });\n EthersStoreUtil.subscribeKey('chainId', () => {\n this.syncNetwork(chainImages);\n });\n this.syncRequestedNetworks(chains, chainImages);\n this.syncConnectors(ethersConfig);\n if (ethersConfig.EIP6963) {\n if (typeof window !== 'undefined') {\n this.listenConnectors(ethersConfig.EIP6963);\n this.checkActive6963Provider();\n }\n }\n if (ethersConfig.email) {\n this.syncEmailConnector(w3mOptions.projectId);\n }\n if (ethersConfig.injected) {\n this.checkActiveInjectedProvider(ethersConfig);\n }\n if (ethersConfig.coinbase) {\n this.checkActiveCoinbaseProvider(ethersConfig);\n }\n }\n getState() {\n const state = super.getState();\n return {\n ...state,\n selectedNetworkId: NetworkUtil.caipNetworkIdToNumber(state.selectedNetworkId)\n };\n }\n subscribeState(callback) {\n return super.subscribeState(state => callback({\n ...state,\n selectedNetworkId: NetworkUtil.caipNetworkIdToNumber(state.selectedNetworkId)\n }));\n }\n setAddress(address) {\n const originalAddress = address ? getOriginalAddress(address) : undefined;\n EthersStoreUtil.setAddress(originalAddress);\n }\n getAddress() {\n const { address } = EthersStoreUtil.state;\n return address ? getOriginalAddress(address) : undefined;\n }\n getError() {\n return EthersStoreUtil.state.error;\n }\n getChainId() {\n return EthersStoreUtil.state.chainId;\n }\n getIsConnected() {\n return EthersStoreUtil.state.isConnected;\n }\n getWalletProvider() {\n return EthersStoreUtil.state.provider;\n }\n getWalletProviderType() {\n return EthersStoreUtil.state.providerType;\n }\n subscribeProvider(callback) {\n return EthersStoreUtil.subscribe(callback);\n }\n async disconnect() {\n const { provider, providerType } = EthersStoreUtil.state;\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n if (providerType === 'injected' || providerType === 'eip6963') {\n provider?.emit('disconnect');\n }\n else {\n const walletConnectProvider = provider;\n if (walletConnectProvider) {\n try {\n EthersStoreUtil.setError(undefined);\n await walletConnectProvider.disconnect();\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n }\n }\n createProvider() {\n if (!this.walletConnectProviderInitPromise && typeof window !== 'undefined') {\n this.walletConnectProviderInitPromise = this.initWalletConnectProvider();\n }\n return this.walletConnectProviderInitPromise;\n }\n async initWalletConnectProvider() {\n const walletConnectProviderOptions = {\n projectId: this.projectId,\n showQrModal: false,\n rpcMap: this.chains\n ? this.chains.reduce((map, chain) => {\n map[chain.chainId] = chain.rpcUrl;\n return map;\n }, {})\n : {},\n optionalChains: [...this.chains.map(chain => chain.chainId)],\n metadata: {\n name: this.metadata ? this.metadata.name : '',\n description: this.metadata ? this.metadata.description : '',\n url: this.metadata ? this.metadata.url : '',\n icons: this.metadata ? this.metadata.icons : ['']\n }\n };\n this.walletConnectProvider = await EthereumProvider.init(walletConnectProviderOptions);\n await this.checkActiveWalletConnectProvider();\n }\n async getWalletConnectProvider() {\n if (!this.walletConnectProvider) {\n try {\n EthersStoreUtil.setError(undefined);\n await this.createProvider();\n }\n catch (error) {\n EthersStoreUtil.setError(error);\n }\n }\n return this.walletConnectProvider;\n }\n syncRequestedNetworks(chains, chainImages) {\n const requestedCaipNetworks = chains?.map(chain => ({\n id: `${ConstantsUtil.EIP155}:${chain.chainId}`,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId],\n imageUrl: chainImages?.[chain.chainId]\n }));\n this.setRequestedCaipNetworks(requestedCaipNetworks ?? []);\n }\n async checkActiveWalletConnectProvider() {\n const WalletConnectProvider = await this.getWalletConnectProvider();\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (WalletConnectProvider) {\n if (walletId === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n await this.setWalletConnectProvider();\n }\n }\n }\n checkActiveInjectedProvider(config) {\n const InjectedProvider = config.injected;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (InjectedProvider) {\n if (walletId === ConstantsUtil.INJECTED_CONNECTOR_ID) {\n this.setInjectedProvider(config);\n this.watchInjected(config);\n }\n }\n }\n checkActiveCoinbaseProvider(config) {\n const CoinbaseProvider = config.coinbase;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (CoinbaseProvider) {\n if (walletId === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n if (CoinbaseProvider._addresses && CoinbaseProvider._addresses?.length > 0) {\n this.setCoinbaseProvider(config);\n this.watchCoinbase(config);\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n }\n }\n checkActive6963Provider() {\n const currentActiveWallet = window?.localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n if (currentActiveWallet) {\n const currentProvider = this.EIP6963Providers.find(provider => provider.info.name === currentActiveWallet);\n if (currentProvider) {\n this.setEIP6963Provider(currentProvider.provider, currentProvider.info.name);\n }\n }\n }\n async setWalletConnectProvider() {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID);\n const WalletConnectProvider = await this.getWalletConnectProvider();\n if (WalletConnectProvider) {\n EthersStoreUtil.setChainId(WalletConnectProvider.chainId);\n EthersStoreUtil.setProviderType('walletConnect');\n EthersStoreUtil.setProvider(WalletConnectProvider);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(WalletConnectProvider.accounts?.[0]);\n this.watchWalletConnect();\n }\n }\n async setInjectedProvider(config) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.INJECTED_CONNECTOR_ID);\n const InjectedProvider = config.injected;\n if (InjectedProvider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(InjectedProvider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('injected');\n EthersStoreUtil.setProvider(config.injected);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchCoinbase(config);\n }\n }\n }\n async setEIP6963Provider(provider, name) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, name);\n if (provider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(provider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('eip6963');\n EthersStoreUtil.setProvider(provider);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchEIP6963(provider);\n }\n }\n }\n async setCoinbaseProvider(config) {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.COINBASE_CONNECTOR_ID);\n const CoinbaseProvider = config.coinbase;\n if (CoinbaseProvider) {\n const { address, chainId } = await EthersHelpersUtil.getUserInfo(CoinbaseProvider);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType('coinbaseWallet');\n EthersStoreUtil.setProvider(config.coinbase);\n EthersStoreUtil.setIsConnected(true);\n this.setAddress(address);\n this.watchCoinbase(config);\n }\n }\n }\n async setEmailProvider() {\n window?.localStorage.setItem(EthersConstantsUtil.WALLET_ID, ConstantsUtil.EMAIL_CONNECTOR_ID);\n if (this.emailProvider) {\n const { address, chainId, smartAccountDeployed, preferredAccountType } = await this.emailProvider.connect({ chainId: this.getChainId() });\n const { smartAccountEnabledNetworks } = await this.emailProvider.getSmartAccountEnabledNetworks();\n this.setSmartAccountEnabledNetworks(smartAccountEnabledNetworks);\n if (address && chainId) {\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setProviderType(ConstantsUtil.EMAIL_CONNECTOR_ID);\n EthersStoreUtil.setProvider(this.emailProvider);\n EthersStoreUtil.setIsConnected(true);\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n this.setSmartAccountDeployed(Boolean(smartAccountDeployed));\n this.watchEmail();\n this.watchModal();\n }\n super.setLoading(false);\n }\n }\n async watchWalletConnect() {\n const provider = await this.getWalletConnectProvider();\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = EthersHelpersUtil.hexStringToNumber(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n const accountsChangedHandler = async (accounts) => {\n if (accounts.length > 0) {\n await this.setWalletConnectProvider();\n }\n };\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchInjected(config) {\n const provider = config.injected;\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = typeof chainId === 'string'\n ? EthersHelpersUtil.hexStringToNumber(chainId)\n : Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchEIP6963(provider) {\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider.removeListener('disconnect', disconnectHandler);\n provider.removeListener('accountsChanged', accountsChangedHandler);\n provider.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId) {\n const chain = typeof chainId === 'string'\n ? EthersHelpersUtil.hexStringToNumber(chainId)\n : Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchCoinbase(config) {\n const provider = config.coinbase;\n const walletId = localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n function disconnectHandler() {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n provider?.removeListener('disconnect', disconnectHandler);\n provider?.removeListener('accountsChanged', accountsChangedHandler);\n provider?.removeListener('chainChanged', chainChangedHandler);\n }\n function accountsChangedHandler(accounts) {\n const currentAccount = accounts?.[0];\n if (currentAccount) {\n EthersStoreUtil.setAddress(getOriginalAddress(currentAccount));\n }\n else {\n localStorage.removeItem(EthersConstantsUtil.WALLET_ID);\n EthersStoreUtil.reset();\n }\n }\n function chainChangedHandler(chainId) {\n if (chainId && walletId === ConstantsUtil.COINBASE_CONNECTOR_ID) {\n const chain = Number(chainId);\n EthersStoreUtil.setChainId(chain);\n }\n }\n if (provider) {\n provider.on('disconnect', disconnectHandler);\n provider.on('accountsChanged', accountsChangedHandler);\n provider.on('chainChanged', chainChangedHandler);\n }\n }\n watchEmail() {\n if (this.emailProvider) {\n this.emailProvider.onRpcRequest(request => {\n if (W3mFrameHelpers.checkIfRequestExists(request)) {\n if (!W3mFrameHelpers.checkIfRequestIsAllowed(request)) {\n if (super.isOpen()) {\n if (!super.isTransactionStackEmpty()) {\n super.redirect('ApproveTransaction');\n }\n }\n else {\n super.open({ view: 'ApproveTransaction' });\n }\n }\n }\n else {\n super.open();\n const method = W3mFrameHelpers.getRequestMethod(request);\n console.error(W3mFrameRpcConstants.RPC_METHOD_NOT_ALLOWED_MESSAGE, { method });\n setTimeout(() => {\n this.showErrorMessage(W3mFrameRpcConstants.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE);\n }, 300);\n }\n });\n this.emailProvider.onRpcResponse(response => {\n const responseType = W3mFrameHelpers.getResponseType(response);\n switch (responseType) {\n case W3mFrameConstants.RPC_RESPONSE_TYPE_ERROR: {\n const isModalOpen = super.isOpen();\n if (isModalOpen) {\n if (super.isTransactionStackEmpty()) {\n super.close();\n }\n else {\n super.popTransactionStack(true);\n }\n }\n break;\n }\n case W3mFrameConstants.RPC_RESPONSE_TYPE_TX: {\n if (super.isTransactionStackEmpty()) {\n super.close();\n }\n else {\n super.popTransactionStack();\n }\n break;\n }\n default:\n break;\n }\n });\n this.emailProvider.onNotConnected(() => {\n this.setIsConnected(false);\n super.setLoading(false);\n });\n this.emailProvider.onIsConnected(({ preferredAccountType }) => {\n this.setIsConnected(true);\n super.setLoading(false);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n });\n this.emailProvider.onSetPreferredAccount(({ address, type }) => {\n if (!address) {\n return;\n }\n const chainId = NetworkUtil.caipNetworkIdToNumber(this.getCaipNetwork()?.id);\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setChainId(chainId);\n EthersStoreUtil.setIsConnected(true);\n EthersStoreUtil.setPreferredAccountType(type);\n this.syncAccount();\n });\n }\n }\n watchModal() {\n if (this.emailProvider) {\n this.subscribeState(val => {\n if (!val.open) {\n this.emailProvider?.rejectRpcRequest();\n }\n });\n }\n }\n async syncAccount() {\n const address = EthersStoreUtil.state.address;\n const chainId = EthersStoreUtil.state.chainId;\n const isConnected = EthersStoreUtil.state.isConnected;\n const preferredAccountType = EthersStoreUtil.state.preferredAccountType;\n this.resetAccount();\n if (isConnected && address && chainId) {\n const caipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}`;\n this.setIsConnected(isConnected);\n this.setPreferredAccountType(preferredAccountType);\n this.setCaipAddress(caipAddress);\n this.syncConnectedWalletInfo();\n await Promise.all([\n this.syncProfile(address),\n this.syncBalance(address),\n this.getApprovedCaipNetworksData()\n ]);\n this.hasSyncedConnectedAccount = true;\n }\n else if (!isConnected && this.hasSyncedConnectedAccount) {\n this.resetWcConnection();\n this.resetNetwork();\n }\n }\n async syncNetwork(chainImages) {\n const address = EthersStoreUtil.state.address;\n const chainId = EthersStoreUtil.state.chainId;\n const isConnected = EthersStoreUtil.state.isConnected;\n if (this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (chain) {\n const caipChainId = `${ConstantsUtil.EIP155}:${chain.chainId}`;\n this.setCaipNetwork({\n id: caipChainId,\n name: chain.name,\n imageId: PresetsUtil.EIP155NetworkImageIds[chain.chainId],\n imageUrl: chainImages?.[chain.chainId]\n });\n if (isConnected && address) {\n const caipAddress = `${ConstantsUtil.EIP155}:${chainId}:${address}`;\n this.setCaipAddress(caipAddress);\n if (chain.explorerUrl) {\n const url = `${chain.explorerUrl}/address/${address}`;\n this.setAddressExplorerUrl(url);\n }\n else {\n this.setAddressExplorerUrl(undefined);\n }\n if (this.hasSyncedConnectedAccount) {\n await this.syncProfile(address);\n await this.syncBalance(address);\n }\n }\n }\n else if (isConnected) {\n this.setCaipNetwork({\n id: `${ConstantsUtil.EIP155}:${chainId}`\n });\n }\n }\n }\n async syncProfile(address) {\n const chainId = EthersStoreUtil.state.chainId;\n try {\n const { name, avatar } = await this.fetchIdentity({\n address\n });\n this.setProfileName(name);\n this.setProfileImage(avatar);\n }\n catch {\n if (chainId === 1) {\n const ensProvider = new InfuraProvider('mainnet');\n const name = await ensProvider.lookupAddress(address);\n const avatar = await ensProvider.getAvatar(address);\n if (name) {\n this.setProfileName(name);\n }\n if (avatar) {\n this.setProfileImage(avatar);\n }\n }\n else {\n this.setProfileName(null);\n this.setProfileImage(null);\n }\n }\n }\n async syncBalance(address) {\n const chainId = EthersStoreUtil.state.chainId;\n if (chainId && this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (chain) {\n const jsonRpcProvider = new JsonRpcProvider(chain.rpcUrl, {\n chainId,\n name: chain.name\n });\n if (jsonRpcProvider) {\n const balance = await jsonRpcProvider.getBalance(address);\n const formattedBalance = formatEther(balance);\n this.setBalance(formattedBalance, chain.currency);\n }\n }\n }\n }\n syncConnectedWalletInfo() {\n const currentActiveWallet = window?.localStorage.getItem(EthersConstantsUtil.WALLET_ID);\n const providerType = EthersStoreUtil.state.providerType;\n if (providerType === ConstantsUtil.EIP6963_CONNECTOR_ID) {\n if (currentActiveWallet) {\n const currentProvider = this.EIP6963Providers.find(provider => provider.info.name === currentActiveWallet);\n if (currentProvider) {\n this.setConnectedWalletInfo({\n ...currentProvider.info\n });\n }\n }\n }\n else if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID) {\n const provider = EthersStoreUtil.state.provider;\n if (provider.session) {\n this.setConnectedWalletInfo({\n ...provider.session.peer.metadata,\n name: provider.session.peer.metadata.name,\n icon: provider.session.peer.metadata.icons?.[0]\n });\n }\n }\n else if (currentActiveWallet) {\n this.setConnectedWalletInfo({\n name: currentActiveWallet\n });\n }\n }\n async switchNetwork(chainId) {\n const provider = EthersStoreUtil.state.provider;\n const providerType = EthersStoreUtil.state.providerType;\n if (this.chains) {\n const chain = this.chains.find(c => c.chainId === chainId);\n if (providerType === ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID && chain) {\n const WalletConnectProvider = provider;\n if (WalletConnectProvider) {\n try {\n await WalletConnectProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(WalletConnectProvider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.INJECTED_CONNECTOR_ID && chain) {\n const InjectedProvider = provider;\n if (InjectedProvider) {\n try {\n await InjectedProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(InjectedProvider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.EIP6963_CONNECTOR_ID && chain) {\n const EIP6963Provider = provider;\n if (EIP6963Provider) {\n try {\n await EIP6963Provider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(EIP6963Provider, chain);\n }\n else {\n throw new Error('Chain is not supported');\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.COINBASE_CONNECTOR_ID && chain) {\n const CoinbaseProvider = provider;\n if (CoinbaseProvider) {\n try {\n await CoinbaseProvider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: EthersHelpersUtil.numberToHexString(chain.chainId) }]\n });\n EthersStoreUtil.setChainId(chain.chainId);\n }\n catch (switchError) {\n if (switchError.code === EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID ||\n switchError.code === EthersConstantsUtil.ERROR_CODE_DEFAULT ||\n switchError?.data?.originalError?.code ===\n EthersConstantsUtil.ERROR_CODE_UNRECOGNIZED_CHAIN_ID) {\n await EthersHelpersUtil.addEthereumChain(CoinbaseProvider, chain);\n }\n }\n }\n }\n else if (providerType === ConstantsUtil.EMAIL_CONNECTOR_ID) {\n if (this.emailProvider && chain?.chainId) {\n try {\n await this.emailProvider.switchNetwork(chain?.chainId);\n EthersStoreUtil.setChainId(chain.chainId);\n const { address, preferredAccountType } = await this.emailProvider.connect({\n chainId: chain?.chainId\n });\n EthersStoreUtil.setAddress(address);\n EthersStoreUtil.setPreferredAccountType(preferredAccountType);\n await this.syncAccount();\n }\n catch {\n throw new Error('Switching chain failed');\n }\n }\n }\n }\n }\n syncConnectors(config) {\n const w3mConnectors = [];\n const connectorType = PresetsUtil.ConnectorTypesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID];\n if (connectorType) {\n w3mConnectors.push({\n id: ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.WALLET_CONNECT_CONNECTOR_ID],\n type: connectorType\n });\n }\n if (config.injected) {\n const injectedConnectorType = PresetsUtil.ConnectorTypesMap[ConstantsUtil.INJECTED_CONNECTOR_ID];\n if (injectedConnectorType) {\n w3mConnectors.push({\n id: ConstantsUtil.INJECTED_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.INJECTED_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.INJECTED_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.INJECTED_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.INJECTED_CONNECTOR_ID],\n type: injectedConnectorType\n });\n }\n }\n if (config.coinbase) {\n w3mConnectors.push({\n id: ConstantsUtil.COINBASE_CONNECTOR_ID,\n explorerId: PresetsUtil.ConnectorExplorerIds[ConstantsUtil.COINBASE_CONNECTOR_ID],\n imageId: PresetsUtil.ConnectorImageIds[ConstantsUtil.COINBASE_CONNECTOR_ID],\n imageUrl: this.options?.connectorImages?.[ConstantsUtil.COINBASE_CONNECTOR_ID],\n name: PresetsUtil.ConnectorNamesMap[ConstantsUtil.COINBASE_CONNECTOR_ID],\n type: 'EXTERNAL'\n });\n }\n this.setConnectors(w3mConnectors);\n }\n async syncEmailConnector(projectId) {\n if (typeof window !== 'undefined') {\n this.emailProvider = new W3mFrameProvider(projectId);\n this.addConnector({\n id: ConstantsUtil.EMAIL_CONNECTOR_ID,\n type: 'EMAIL',\n name: 'Email',\n provider: this.emailProvider\n });\n super.setLoading(true);\n const isLoginEmailUsed = this.emailProvider.getLoginEmailUsed();\n super.setLoading(isLoginEmailUsed);\n const { isConnected } = await this.emailProvider.isConnected();\n if (isConnected) {\n await this.setEmailProvider();\n }\n else {\n super.setLoading(false);\n }\n }\n }\n eip6963EventHandler(event) {\n if (event.detail) {\n const { info, provider } = event.detail;\n const connectors = this.getConnectors();\n const existingConnector = connectors.find(c => c.name === info.name);\n if (!existingConnector) {\n const type = PresetsUtil.ConnectorTypesMap[ConstantsUtil.EIP6963_CONNECTOR_ID];\n if (type) {\n this.addConnector({\n id: ConstantsUtil.EIP6963_CONNECTOR_ID,\n type,\n imageUrl: info.icon ?? this.options?.connectorImages?.[ConstantsUtil.EIP6963_CONNECTOR_ID],\n name: info.name,\n provider,\n info\n });\n const eip6963ProviderObj = {\n provider,\n info\n };\n this.EIP6963Providers.push(eip6963ProviderObj);\n }\n }\n }\n }\n listenConnectors(enableEIP6963) {\n if (typeof window !== 'undefined' && enableEIP6963) {\n const handler = this.eip6963EventHandler.bind(this);\n window.addEventListener(ConstantsUtil.EIP6963_ANNOUNCE_EVENT, handler);\n window.dispatchEvent(new Event(ConstantsUtil.EIP6963_REQUEST_EVENT));\n }\n }\n}\n//# sourceMappingURL=client.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.walletLogo = void 0;\nconst walletLogo = (type, width) => {\n let height;\n switch (type) {\n case 'standard':\n height = width;\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;\n case 'circle':\n height = width;\n return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${width}' height='${height}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;\n case 'text':\n height = (0.1 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;\n case 'textWithLogo':\n height = (0.25 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;\n case 'textLight':\n height = (0.1 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;\n case 'textWithLogoLight':\n height = (0.25 * width).toFixed(2);\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;\n default:\n height = width;\n return `data:image/svg+xml,%3Csvg width='${width}' height='${height}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;\n }\n};\nexports.walletLogo = walletLogo;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LINK_API_URL = void 0;\nexports.LINK_API_URL = 'https://www.walletlink.org';\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorValues = exports.standardErrorCodes = void 0;\nexports.standardErrorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n unsupportedChain: 4902,\n },\n};\nexports.errorValues = {\n '-32700': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n },\n '-32600': {\n standard: 'JSON RPC 2.0',\n message: 'The JSON sent is not a valid Request object.',\n },\n '-32601': {\n standard: 'JSON RPC 2.0',\n message: 'The method does not exist / is not available.',\n },\n '-32602': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid method parameter(s).',\n },\n '-32603': {\n standard: 'JSON RPC 2.0',\n message: 'Internal JSON-RPC error.',\n },\n '-32000': {\n standard: 'EIP-1474',\n message: 'Invalid input.',\n },\n '-32001': {\n standard: 'EIP-1474',\n message: 'Resource not found.',\n },\n '-32002': {\n standard: 'EIP-1474',\n message: 'Resource unavailable.',\n },\n '-32003': {\n standard: 'EIP-1474',\n message: 'Transaction rejected.',\n },\n '-32004': {\n standard: 'EIP-1474',\n message: 'Method not supported.',\n },\n '-32005': {\n standard: 'EIP-1474',\n message: 'Request limit exceeded.',\n },\n '4001': {\n standard: 'EIP-1193',\n message: 'User rejected the request.',\n },\n '4100': {\n standard: 'EIP-1193',\n message: 'The requested account and/or method has not been authorized by the user.',\n },\n '4200': {\n standard: 'EIP-1193',\n message: 'The requested method is not supported by this Ethereum provider.',\n },\n '4900': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from all chains.',\n },\n '4901': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from the specified chain.',\n },\n '4902': {\n standard: 'EIP-3085',\n message: 'Unrecognized chain ID.',\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serialize = exports.getErrorCode = exports.isValidCode = exports.getMessageFromCode = exports.JSON_RPC_SERVER_ERROR_MESSAGE = void 0;\nconst constants_1 = require(\"./constants\");\nconst FALLBACK_MESSAGE = 'Unspecified error message.';\nexports.JSON_RPC_SERVER_ERROR_MESSAGE = 'Unspecified server error.';\n/**\n * Gets the message for a given code, or a fallback message if the code has\n * no corresponding message.\n */\nfunction getMessageFromCode(code, fallbackMessage = FALLBACK_MESSAGE) {\n if (code && Number.isInteger(code)) {\n const codeString = code.toString();\n if (hasKey(constants_1.errorValues, codeString)) {\n return constants_1.errorValues[codeString].message;\n }\n if (isJsonRpcServerError(code)) {\n return exports.JSON_RPC_SERVER_ERROR_MESSAGE;\n }\n }\n return fallbackMessage;\n}\nexports.getMessageFromCode = getMessageFromCode;\n/**\n * Returns whether the given code is valid.\n * A code is only valid if it has a message.\n */\nfunction isValidCode(code) {\n if (!Number.isInteger(code)) {\n return false;\n }\n const codeString = code.toString();\n if (constants_1.errorValues[codeString]) {\n return true;\n }\n if (isJsonRpcServerError(code)) {\n return true;\n }\n return false;\n}\nexports.isValidCode = isValidCode;\n/**\n * Returns the error code from an error object.\n */\nfunction getErrorCode(error) {\n var _a;\n if (typeof error === 'number') {\n return error;\n }\n else if (isErrorWithCode(error)) {\n return (_a = error.code) !== null && _a !== void 0 ? _a : error.errorCode;\n }\n return undefined;\n}\nexports.getErrorCode = getErrorCode;\nfunction isErrorWithCode(error) {\n return (typeof error === 'object' &&\n error !== null &&\n (typeof error.code === 'number' ||\n typeof error.errorCode === 'number'));\n}\nfunction serialize(error, { shouldIncludeStack = false } = {}) {\n const serialized = {};\n if (error &&\n typeof error === 'object' &&\n !Array.isArray(error) &&\n hasKey(error, 'code') &&\n isValidCode(error.code)) {\n const _error = error;\n serialized.code = _error.code;\n if (_error.message && typeof _error.message === 'string') {\n serialized.message = _error.message;\n if (hasKey(_error, 'data')) {\n serialized.data = _error.data;\n }\n }\n else {\n serialized.message = getMessageFromCode(serialized.code);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n }\n else {\n serialized.code = constants_1.standardErrorCodes.rpc.internal;\n serialized.message = hasStringProperty(error, 'message') ? error.message : FALLBACK_MESSAGE;\n serialized.data = { originalError: assignOriginalError(error) };\n }\n if (shouldIncludeStack) {\n serialized.stack = hasStringProperty(error, 'stack') ? error.stack : undefined;\n }\n return serialized;\n}\nexports.serialize = serialize;\n// Internal\nfunction isJsonRpcServerError(code) {\n return code >= -32099 && code <= -32000;\n}\nfunction assignOriginalError(error) {\n if (error && typeof error === 'object' && !Array.isArray(error)) {\n return Object.assign({}, error);\n }\n return error;\n}\nfunction hasKey(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nfunction hasStringProperty(obj, prop) {\n return (typeof obj === 'object' && obj !== null && prop in obj && typeof obj[prop] === 'string');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.standardErrors = void 0;\nconst constants_1 = require(\"./constants\");\nconst utils_1 = require(\"./utils\");\nexports.standardErrors = {\n rpc: {\n parse: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.parse, arg),\n invalidRequest: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidRequest, arg),\n invalidParams: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidParams, arg),\n methodNotFound: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.methodNotFound, arg),\n internal: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.internal, arg),\n server: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum RPC Server errors must provide single object argument.');\n }\n const { code } = opts;\n if (!Number.isInteger(code) || code > -32005 || code < -32099) {\n throw new Error('\"code\" must be an integer such that: -32099 <= code <= -32005');\n }\n return getEthJsonRpcError(code, opts);\n },\n invalidInput: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.invalidInput, arg),\n resourceNotFound: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.resourceNotFound, arg),\n resourceUnavailable: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.resourceUnavailable, arg),\n transactionRejected: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.transactionRejected, arg),\n methodNotSupported: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.methodNotSupported, arg),\n limitExceeded: (arg) => getEthJsonRpcError(constants_1.standardErrorCodes.rpc.limitExceeded, arg),\n },\n provider: {\n userRejectedRequest: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.userRejectedRequest, arg);\n },\n unauthorized: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unauthorized, arg);\n },\n unsupportedMethod: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unsupportedMethod, arg);\n },\n disconnected: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.disconnected, arg);\n },\n chainDisconnected: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.chainDisconnected, arg);\n },\n unsupportedChain: (arg) => {\n return getEthProviderError(constants_1.standardErrorCodes.provider.unsupportedChain, arg);\n },\n custom: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum Provider custom errors must provide single object argument.');\n }\n const { code, message, data } = opts;\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string');\n }\n return new EthereumProviderError(code, message, data);\n },\n },\n};\n// Internal\nfunction getEthJsonRpcError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new EthereumRpcError(code, message || (0, utils_1.getMessageFromCode)(code), data);\n}\nfunction getEthProviderError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new EthereumProviderError(code, message || (0, utils_1.getMessageFromCode)(code), data);\n}\nfunction parseOpts(arg) {\n if (arg) {\n if (typeof arg === 'string') {\n return [arg];\n }\n else if (typeof arg === 'object' && !Array.isArray(arg)) {\n const { message, data } = arg;\n if (message && typeof message !== 'string') {\n throw new Error('Must specify string message.');\n }\n return [message || undefined, data];\n }\n }\n return [];\n}\nclass EthereumRpcError extends Error {\n constructor(code, message, data) {\n if (!Number.isInteger(code)) {\n throw new Error('\"code\" must be an integer.');\n }\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string.');\n }\n super(message);\n this.code = code;\n if (data !== undefined) {\n this.data = data;\n }\n }\n}\nclass EthereumProviderError extends EthereumRpcError {\n /**\n * Create an Ethereum Provider JSON-RPC error.\n * `code` must be an integer in the 1000 <= 4999 range.\n */\n constructor(code, message, data) {\n if (!isValidEthProviderCode(code)) {\n throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');\n }\n super(code, message, data);\n }\n}\nfunction isValidEthProviderCode(code) {\n return Number.isInteger(code) && code >= 1000 && code <= 4999;\n}\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isErrorResponse = void 0;\n// TODO: revisit if this is still needed\nfunction isErrorResponse(response) {\n return response.errorMessage !== undefined;\n}\nexports.isErrorResponse = isErrorResponse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LIB_VERSION = void 0;\nexports.LIB_VERSION = '3.9.1';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeError = void 0;\n// TODO: error should not depend on walletlink. revisit this.\nconst Web3Response_1 = require(\"../../relay/walletlink/type/Web3Response\");\nconst version_1 = require(\"../../version\");\nconst constants_1 = require(\"./constants\");\nconst utils_1 = require(\"./utils\");\n/**\n * Serializes an error to a format that is compatible with the Ethereum JSON RPC error format.\n * See https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\n * for more information.\n */\nfunction serializeError(error, requestOrMethod) {\n const serialized = (0, utils_1.serialize)(getErrorObject(error), {\n shouldIncludeStack: true,\n });\n const docUrl = new URL('https://docs.cloud.coinbase.com/wallet-sdk/docs/errors');\n docUrl.searchParams.set('version', version_1.LIB_VERSION);\n docUrl.searchParams.set('code', serialized.code.toString());\n const method = getMethod(serialized.data, requestOrMethod);\n if (method) {\n docUrl.searchParams.set('method', method);\n }\n docUrl.searchParams.set('message', serialized.message);\n return Object.assign(Object.assign({}, serialized), { docUrl: docUrl.href });\n}\nexports.serializeError = serializeError;\n/**\n * Converts an error to a serializable object.\n */\nfunction getErrorObject(error) {\n if (typeof error === 'string') {\n return {\n message: error,\n code: constants_1.standardErrorCodes.rpc.internal,\n };\n }\n else if ((0, Web3Response_1.isErrorResponse)(error)) {\n return Object.assign(Object.assign({}, error), { message: error.errorMessage, code: error.errorCode, data: { method: error.method } });\n }\n return error;\n}\n/**\n * Gets the method name from the serialized data or the request.\n */\nfunction getMethod(serializedData, request) {\n const methodInData = serializedData === null || serializedData === void 0 ? void 0 : serializedData.method;\n if (methodInData) {\n return methodInData;\n }\n if (request === undefined) {\n return undefined;\n }\n else if (typeof request === 'string') {\n return request;\n }\n else if (!Array.isArray(request)) {\n return request.method;\n }\n else if (request.length > 0) {\n return request[0].method;\n }\n return undefined;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.standardErrors = exports.standardErrorCodes = exports.serializeError = exports.getMessageFromCode = exports.getErrorCode = void 0;\nconst constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"standardErrorCodes\", { enumerable: true, get: function () { return constants_1.standardErrorCodes; } });\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"standardErrors\", { enumerable: true, get: function () { return errors_1.standardErrors; } });\nconst serialize_1 = require(\"./serialize\");\nObject.defineProperty(exports, \"serializeError\", { enumerable: true, get: function () { return serialize_1.serializeError; } });\nconst utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"getErrorCode\", { enumerable: true, get: function () { return utils_1.getErrorCode; } });\nObject.defineProperty(exports, \"getMessageFromCode\", { enumerable: true, get: function () { return utils_1.getMessageFromCode; } });\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProviderType = exports.RegExpString = exports.IntNumber = exports.BigIntString = exports.AddressString = exports.HexString = exports.OpaqueType = void 0;\nfunction OpaqueType() {\n return (value) => value;\n}\nexports.OpaqueType = OpaqueType;\nexports.HexString = OpaqueType();\nexports.AddressString = OpaqueType();\nexports.BigIntString = OpaqueType();\nfunction IntNumber(num) {\n return Math.floor(num);\n}\nexports.IntNumber = IntNumber;\nexports.RegExpString = OpaqueType();\nvar ProviderType;\n(function (ProviderType) {\n ProviderType[\"CoinbaseWallet\"] = \"CoinbaseWallet\";\n ProviderType[\"MetaMask\"] = \"MetaMask\";\n ProviderType[\"Unselected\"] = \"\";\n})(ProviderType || (exports.ProviderType = ProviderType = {}));\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isMobileWeb = exports.getLocation = exports.isInIFrame = exports.createQrUrl = exports.getFavicon = exports.range = exports.isBigNumber = exports.ensureParsedJSONObject = exports.ensureBN = exports.ensureRegExpString = exports.ensureIntNumber = exports.ensureBuffer = exports.ensureAddressString = exports.ensureEvenLengthHexString = exports.ensureHexString = exports.isHexString = exports.prepend0x = exports.strip0x = exports.has0xPrefix = exports.hexStringFromIntNumber = exports.intNumberFromHexString = exports.bigIntStringFromBN = exports.hexStringFromBuffer = exports.hexStringToUint8Array = exports.uint8ArrayToHex = exports.randomBytesHex = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst error_1 = require(\"./error\");\nconst type_1 = require(\"./type\");\nconst INT_STRING_REGEX = /^[0-9]*$/;\nconst HEXADECIMAL_STRING_REGEX = /^[a-f0-9]*$/;\n/**\n * @param length number of bytes\n */\nfunction randomBytesHex(length) {\n return uint8ArrayToHex(crypto.getRandomValues(new Uint8Array(length)));\n}\nexports.randomBytesHex = randomBytesHex;\nfunction uint8ArrayToHex(value) {\n return [...value].map((b) => b.toString(16).padStart(2, '0')).join('');\n}\nexports.uint8ArrayToHex = uint8ArrayToHex;\nfunction hexStringToUint8Array(hexString) {\n return new Uint8Array(hexString.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));\n}\nexports.hexStringToUint8Array = hexStringToUint8Array;\nfunction hexStringFromBuffer(buf, includePrefix = false) {\n const hex = buf.toString('hex');\n return (0, type_1.HexString)(includePrefix ? `0x${hex}` : hex);\n}\nexports.hexStringFromBuffer = hexStringFromBuffer;\nfunction bigIntStringFromBN(bn) {\n return (0, type_1.BigIntString)(bn.toString(10));\n}\nexports.bigIntStringFromBN = bigIntStringFromBN;\nfunction intNumberFromHexString(hex) {\n return (0, type_1.IntNumber)(new bn_js_1.default(ensureEvenLengthHexString(hex, false), 16).toNumber());\n}\nexports.intNumberFromHexString = intNumberFromHexString;\nfunction hexStringFromIntNumber(num) {\n return (0, type_1.HexString)(`0x${new bn_js_1.default(num).toString(16)}`);\n}\nexports.hexStringFromIntNumber = hexStringFromIntNumber;\nfunction has0xPrefix(str) {\n return str.startsWith('0x') || str.startsWith('0X');\n}\nexports.has0xPrefix = has0xPrefix;\nfunction strip0x(hex) {\n if (has0xPrefix(hex)) {\n return hex.slice(2);\n }\n return hex;\n}\nexports.strip0x = strip0x;\nfunction prepend0x(hex) {\n if (has0xPrefix(hex)) {\n return `0x${hex.slice(2)}`;\n }\n return `0x${hex}`;\n}\nexports.prepend0x = prepend0x;\nfunction isHexString(hex) {\n if (typeof hex !== 'string') {\n return false;\n }\n const s = strip0x(hex).toLowerCase();\n return HEXADECIMAL_STRING_REGEX.test(s);\n}\nexports.isHexString = isHexString;\nfunction ensureHexString(hex, includePrefix = false) {\n if (typeof hex === 'string') {\n const s = strip0x(hex).toLowerCase();\n if (HEXADECIMAL_STRING_REGEX.test(s)) {\n return (0, type_1.HexString)(includePrefix ? `0x${s}` : s);\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`\"${String(hex)}\" is not a hexadecimal string`);\n}\nexports.ensureHexString = ensureHexString;\nfunction ensureEvenLengthHexString(hex, includePrefix = false) {\n let h = ensureHexString(hex, false);\n if (h.length % 2 === 1) {\n h = (0, type_1.HexString)(`0${h}`);\n }\n return includePrefix ? (0, type_1.HexString)(`0x${h}`) : h;\n}\nexports.ensureEvenLengthHexString = ensureEvenLengthHexString;\nfunction ensureAddressString(str) {\n if (typeof str === 'string') {\n const s = strip0x(str).toLowerCase();\n if (isHexString(s) && s.length === 40) {\n return (0, type_1.AddressString)(prepend0x(s));\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(str)}`);\n}\nexports.ensureAddressString = ensureAddressString;\nfunction ensureBuffer(str) {\n if (Buffer.isBuffer(str)) {\n return str;\n }\n if (typeof str === 'string') {\n if (isHexString(str)) {\n const s = ensureEvenLengthHexString(str, false);\n return Buffer.from(s, 'hex');\n }\n return Buffer.from(str, 'utf8');\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not binary data: ${String(str)}`);\n}\nexports.ensureBuffer = ensureBuffer;\nfunction ensureIntNumber(num) {\n if (typeof num === 'number' && Number.isInteger(num)) {\n return (0, type_1.IntNumber)(num);\n }\n if (typeof num === 'string') {\n if (INT_STRING_REGEX.test(num)) {\n return (0, type_1.IntNumber)(Number(num));\n }\n if (isHexString(num)) {\n return (0, type_1.IntNumber)(new bn_js_1.default(ensureEvenLengthHexString(num, false), 16).toNumber());\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not an integer: ${String(num)}`);\n}\nexports.ensureIntNumber = ensureIntNumber;\nfunction ensureRegExpString(regExp) {\n if (regExp instanceof RegExp) {\n return (0, type_1.RegExpString)(regExp.toString());\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(regExp)}`);\n}\nexports.ensureRegExpString = ensureRegExpString;\nfunction ensureBN(val) {\n if (val !== null && (bn_js_1.default.isBN(val) || isBigNumber(val))) {\n return new bn_js_1.default(val.toString(10), 10);\n }\n if (typeof val === 'number') {\n return new bn_js_1.default(ensureIntNumber(val));\n }\n if (typeof val === 'string') {\n if (INT_STRING_REGEX.test(val)) {\n return new bn_js_1.default(val, 10);\n }\n if (isHexString(val)) {\n return new bn_js_1.default(ensureEvenLengthHexString(val, false), 16);\n }\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not an integer: ${String(val)}`);\n}\nexports.ensureBN = ensureBN;\nfunction ensureParsedJSONObject(val) {\n if (typeof val === 'string') {\n return JSON.parse(val);\n }\n if (typeof val === 'object') {\n return val;\n }\n throw error_1.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(val)}`);\n}\nexports.ensureParsedJSONObject = ensureParsedJSONObject;\nfunction isBigNumber(val) {\n if (val == null || typeof val.constructor !== 'function') {\n return false;\n }\n const { constructor } = val;\n return typeof constructor.config === 'function' && typeof constructor.EUCLID === 'number';\n}\nexports.isBigNumber = isBigNumber;\nfunction range(start, stop) {\n return Array.from({ length: stop - start }, (_, i) => start + i);\n}\nexports.range = range;\nfunction getFavicon() {\n const el = document.querySelector('link[sizes=\"192x192\"]') ||\n document.querySelector('link[sizes=\"180x180\"]') ||\n document.querySelector('link[rel=\"icon\"]') ||\n document.querySelector('link[rel=\"shortcut icon\"]');\n const { protocol, host } = document.location;\n const href = el ? el.getAttribute('href') : null;\n if (!href || href.startsWith('javascript:') || href.startsWith('vbscript:')) {\n return null;\n }\n if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('data:')) {\n return href;\n }\n if (href.startsWith('//')) {\n return protocol + href;\n }\n return `${protocol}//${host}${href}`;\n}\nexports.getFavicon = getFavicon;\nfunction createQrUrl(sessionId, sessionSecret, serverUrl, isParentConnection, version, chainId) {\n const sessionIdKey = isParentConnection ? 'parent-id' : 'id';\n const query = new URLSearchParams({\n [sessionIdKey]: sessionId,\n secret: sessionSecret,\n server: serverUrl,\n v: version,\n chainId: chainId.toString(),\n }).toString();\n const qrUrl = `${serverUrl}/#/link?${query}`;\n return qrUrl;\n}\nexports.createQrUrl = createQrUrl;\nfunction isInIFrame() {\n try {\n return window.frameElement !== null;\n }\n catch (e) {\n return false;\n }\n}\nexports.isInIFrame = isInIFrame;\nfunction getLocation() {\n try {\n if (isInIFrame() && window.top) {\n return window.top.location;\n }\n return window.location;\n }\n catch (e) {\n return window.location;\n }\n}\nexports.getLocation = getLocation;\nfunction isMobileWeb() {\n var _a;\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent);\n}\nexports.isMobileWeb = isMobileWeb;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScopedLocalStorage = void 0;\nclass ScopedLocalStorage {\n // eslint-disable-next-line no-useless-constructor\n constructor(scope) {\n this.scope = scope;\n }\n setItem(key, value) {\n localStorage.setItem(this.scopedKey(key), value);\n }\n getItem(key) {\n return localStorage.getItem(this.scopedKey(key));\n }\n removeItem(key) {\n localStorage.removeItem(this.scopedKey(key));\n }\n clear() {\n const prefix = this.scopedKey('');\n const keysToRemove = [];\n for (let i = 0; i < localStorage.length; i++) {\n const key = localStorage.key(i);\n if (typeof key === 'string' && key.startsWith(prefix)) {\n keysToRemove.push(key);\n }\n }\n keysToRemove.forEach((key) => localStorage.removeItem(key));\n }\n scopedKey(key) {\n return `${this.scope}:${key}`;\n }\n}\nexports.ScopedLocalStorage = ScopedLocalStorage;\n","\"use strict\";\n// DiagnosticLogger for debugging purposes only\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EVENTS = void 0;\nexports.EVENTS = {\n STARTED_CONNECTING: 'walletlink_sdk.started.connecting',\n CONNECTED_STATE_CHANGE: 'walletlink_sdk.connected',\n DISCONNECTED: 'walletlink_sdk.disconnected',\n METADATA_DESTROYED: 'walletlink_sdk_metadata_destroyed',\n LINKED: 'walletlink_sdk.linked',\n FAILURE: 'walletlink_sdk.generic_failure',\n SESSION_CONFIG_RECEIVED: 'walletlink_sdk.session_config_event_received',\n ETH_ACCOUNTS_STATE: 'walletlink_sdk.eth_accounts_state',\n SESSION_STATE_CHANGE: 'walletlink_sdk.session_state_change',\n UNLINKED_ERROR_STATE: 'walletlink_sdk.unlinked_error_state',\n SKIPPED_CLEARING_SESSION: 'walletlink_sdk.skipped_clearing_session',\n GENERAL_ERROR: 'walletlink_sdk.general_error',\n WEB3_REQUEST: 'walletlink_sdk.web3.request',\n WEB3_REQUEST_PUBLISHED: 'walletlink_sdk.web3.request_published',\n WEB3_RESPONSE: 'walletlink_sdk.web3.response',\n METHOD_NOT_IMPLEMENTED: 'walletlink_sdk.method_not_implemented',\n UNKNOWN_ADDRESS_ENCOUNTERED: 'walletlink_sdk.unknown_address_encountered',\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RelayAbstract = exports.APP_VERSION_KEY = exports.LOCAL_STORAGE_ADDRESSES_KEY = exports.WALLET_USER_NAME_KEY = void 0;\nconst error_1 = require(\"../core/error\");\nexports.WALLET_USER_NAME_KEY = 'walletUsername';\nexports.LOCAL_STORAGE_ADDRESSES_KEY = 'Addresses';\nexports.APP_VERSION_KEY = 'AppVersion';\nclass RelayAbstract {\n async makeEthereumJSONRPCRequest(request, jsonRpcUrl) {\n if (!jsonRpcUrl)\n throw new Error('Error: No jsonRpcUrl provided');\n return window\n .fetch(jsonRpcUrl, {\n method: 'POST',\n body: JSON.stringify(request),\n mode: 'cors',\n headers: { 'Content-Type': 'application/json' },\n })\n .then((res) => res.json())\n .then((json) => {\n if (!json) {\n throw error_1.standardErrors.rpc.parse({});\n }\n const response = json;\n const { error } = response;\n if (error) {\n throw (0, error_1.serializeError)(error, request.method);\n }\n return response;\n });\n }\n}\nexports.RelayAbstract = RelayAbstract;\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha, Hash)\n\nSha.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,\n 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,\n 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,\n 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,\n 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,\n 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,\n 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,\n 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,\n 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,\n 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,\n 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,\n 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,\n 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,\n 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,\n 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,\n 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2\n]\n\nvar W = new Array(64)\n\nfunction Sha256 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha256, Hash)\n\nSha256.prototype.init = function () {\n this._a = 0x6a09e667\n this._b = 0xbb67ae85\n this._c = 0x3c6ef372\n this._d = 0xa54ff53a\n this._e = 0x510e527f\n this._f = 0x9b05688c\n this._g = 0x1f83d9ab\n this._h = 0x5be0cd19\n\n return this\n}\n\nfunction ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x) {\n return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)\n}\n\nfunction sigma1 (x) {\n return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)\n}\n\nfunction gamma0 (x) {\n return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)\n}\n\nfunction gamma1 (x) {\n return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)\n}\n\nSha256.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n var f = this._f | 0\n var g = this._g | 0\n var h = this._h | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0\n\n for (var j = 0; j < 64; ++j) {\n var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0\n var T2 = (sigma0(a) + maj(a, b, c)) | 0\n\n h = g\n g = f\n f = e\n e = (d + T1) | 0\n d = c\n c = b\n b = a\n a = (T1 + T2) | 0\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n this._f = (f + this._f) | 0\n this._g = (g + this._g) | 0\n this._h = (h + this._h) | 0\n}\n\nSha256.prototype._hash = function () {\n var H = Buffer.allocUnsafe(32)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n H.writeInt32BE(this._h, 28)\n\n return H\n}\n\nmodule.exports = Sha256\n","/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits')\nvar Sha256 = require('./sha256')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(64)\n\nfunction Sha224 () {\n this.init()\n\n this._w = W // new Array(64)\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha224, Sha256)\n\nSha224.prototype.init = function () {\n this._a = 0xc1059ed8\n this._b = 0x367cd507\n this._c = 0x3070dd17\n this._d = 0xf70e5939\n this._e = 0xffc00b31\n this._f = 0x68581511\n this._g = 0x64f98fa7\n this._h = 0xbefa4fa4\n\n return this\n}\n\nSha224.prototype._hash = function () {\n var H = Buffer.allocUnsafe(28)\n\n H.writeInt32BE(this._a, 0)\n H.writeInt32BE(this._b, 4)\n H.writeInt32BE(this._c, 8)\n H.writeInt32BE(this._d, 12)\n H.writeInt32BE(this._e, 16)\n H.writeInt32BE(this._f, 20)\n H.writeInt32BE(this._g, 24)\n\n return H\n}\n\nmodule.exports = Sha224\n","var inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]\n\nvar W = new Array(160)\n\nfunction Sha512 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha512, Hash)\n\nSha512.prototype.init = function () {\n this._ah = 0x6a09e667\n this._bh = 0xbb67ae85\n this._ch = 0x3c6ef372\n this._dh = 0xa54ff53a\n this._eh = 0x510e527f\n this._fh = 0x9b05688c\n this._gh = 0x1f83d9ab\n this._hh = 0x5be0cd19\n\n this._al = 0xf3bcc908\n this._bl = 0x84caa73b\n this._cl = 0xfe94f82b\n this._dl = 0x5f1d36f1\n this._el = 0xade682d1\n this._fl = 0x2b3e6c1f\n this._gl = 0xfb41bd6b\n this._hl = 0x137e2179\n\n return this\n}\n\nfunction Ch (x, y, z) {\n return z ^ (x & (y ^ z))\n}\n\nfunction maj (x, y, z) {\n return (x & y) | (z & (x | y))\n}\n\nfunction sigma0 (x, xl) {\n return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)\n}\n\nfunction sigma1 (x, xl) {\n return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)\n}\n\nfunction Gamma0 (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)\n}\n\nfunction Gamma0l (x, xl) {\n return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)\n}\n\nfunction Gamma1 (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)\n}\n\nfunction Gamma1l (x, xl) {\n return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)\n}\n\nfunction getCarry (a, b) {\n return (a >>> 0) < (b >>> 0) ? 1 : 0\n}\n\nSha512.prototype._update = function (M) {\n var W = this._w\n\n var ah = this._ah | 0\n var bh = this._bh | 0\n var ch = this._ch | 0\n var dh = this._dh | 0\n var eh = this._eh | 0\n var fh = this._fh | 0\n var gh = this._gh | 0\n var hh = this._hh | 0\n\n var al = this._al | 0\n var bl = this._bl | 0\n var cl = this._cl | 0\n var dl = this._dl | 0\n var el = this._el | 0\n var fl = this._fl | 0\n var gl = this._gl | 0\n var hl = this._hl | 0\n\n for (var i = 0; i < 32; i += 2) {\n W[i] = M.readInt32BE(i * 4)\n W[i + 1] = M.readInt32BE(i * 4 + 4)\n }\n for (; i < 160; i += 2) {\n var xh = W[i - 15 * 2]\n var xl = W[i - 15 * 2 + 1]\n var gamma0 = Gamma0(xh, xl)\n var gamma0l = Gamma0l(xl, xh)\n\n xh = W[i - 2 * 2]\n xl = W[i - 2 * 2 + 1]\n var gamma1 = Gamma1(xh, xl)\n var gamma1l = Gamma1l(xl, xh)\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7h = W[i - 7 * 2]\n var Wi7l = W[i - 7 * 2 + 1]\n\n var Wi16h = W[i - 16 * 2]\n var Wi16l = W[i - 16 * 2 + 1]\n\n var Wil = (gamma0l + Wi7l) | 0\n var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0\n Wil = (Wil + gamma1l) | 0\n Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0\n Wil = (Wil + Wi16l) | 0\n Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0\n\n W[i] = Wih\n W[i + 1] = Wil\n }\n\n for (var j = 0; j < 160; j += 2) {\n Wih = W[j]\n Wil = W[j + 1]\n\n var majh = maj(ah, bh, ch)\n var majl = maj(al, bl, cl)\n\n var sigma0h = sigma0(ah, al)\n var sigma0l = sigma0(al, ah)\n var sigma1h = sigma1(eh, el)\n var sigma1l = sigma1(el, eh)\n\n // t1 = h + sigma1 + ch + K[j] + W[j]\n var Kih = K[j]\n var Kil = K[j + 1]\n\n var chh = Ch(eh, fh, gh)\n var chl = Ch(el, fl, gl)\n\n var t1l = (hl + sigma1l) | 0\n var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0\n t1l = (t1l + chl) | 0\n t1h = (t1h + chh + getCarry(t1l, chl)) | 0\n t1l = (t1l + Kil) | 0\n t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0\n t1l = (t1l + Wil) | 0\n t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0\n\n // t2 = sigma0 + maj\n var t2l = (sigma0l + majl) | 0\n var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0\n\n hh = gh\n hl = gl\n gh = fh\n gl = fl\n fh = eh\n fl = el\n el = (dl + t1l) | 0\n eh = (dh + t1h + getCarry(el, dl)) | 0\n dh = ch\n dl = cl\n ch = bh\n cl = bl\n bh = ah\n bl = al\n al = (t1l + t2l) | 0\n ah = (t1h + t2h + getCarry(al, t1l)) | 0\n }\n\n this._al = (this._al + al) | 0\n this._bl = (this._bl + bl) | 0\n this._cl = (this._cl + cl) | 0\n this._dl = (this._dl + dl) | 0\n this._el = (this._el + el) | 0\n this._fl = (this._fl + fl) | 0\n this._gl = (this._gl + gl) | 0\n this._hl = (this._hl + hl) | 0\n\n this._ah = (this._ah + ah + getCarry(this._al, al)) | 0\n this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0\n this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0\n this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0\n this._eh = (this._eh + eh + getCarry(this._el, el)) | 0\n this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0\n this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0\n this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0\n}\n\nSha512.prototype._hash = function () {\n var H = Buffer.allocUnsafe(64)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n writeInt64BE(this._gh, this._gl, 48)\n writeInt64BE(this._hh, this._hl, 56)\n\n return H\n}\n\nmodule.exports = Sha512\n","var inherits = require('inherits')\nvar SHA512 = require('./sha512')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar W = new Array(160)\n\nfunction Sha384 () {\n this.init()\n this._w = W\n\n Hash.call(this, 128, 112)\n}\n\ninherits(Sha384, SHA512)\n\nSha384.prototype.init = function () {\n this._ah = 0xcbbb9d5d\n this._bh = 0x629a292a\n this._ch = 0x9159015a\n this._dh = 0x152fecd8\n this._eh = 0x67332667\n this._fh = 0x8eb44a87\n this._gh = 0xdb0c2e0d\n this._hh = 0x47b5481d\n\n this._al = 0xc1059ed8\n this._bl = 0x367cd507\n this._cl = 0x3070dd17\n this._dl = 0xf70e5939\n this._el = 0xffc00b31\n this._fl = 0x68581511\n this._gl = 0x64f98fa7\n this._hl = 0xbefa4fa4\n\n return this\n}\n\nSha384.prototype._hash = function () {\n var H = Buffer.allocUnsafe(48)\n\n function writeInt64BE (h, l, offset) {\n H.writeInt32BE(h, offset)\n H.writeInt32BE(l, offset + 4)\n }\n\n writeInt64BE(this._ah, this._al, 0)\n writeInt64BE(this._bh, this._bl, 8)\n writeInt64BE(this._ch, this._cl, 16)\n writeInt64BE(this._dh, this._dl, 24)\n writeInt64BE(this._eh, this._el, 32)\n writeInt64BE(this._fh, this._fl, 40)\n\n return H\n}\n\nmodule.exports = Sha384\n","var exports = module.exports = function SHA (algorithm) {\n algorithm = algorithm.toLowerCase()\n\n var Algorithm = exports[algorithm]\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')\n\n return new Algorithm()\n}\n\nexports.sha = require('./sha')\nexports.sha1 = require('./sha1')\nexports.sha224 = require('./sha224')\nexports.sha256 = require('./sha256')\nexports.sha384 = require('./sha384')\nexports.sha512 = require('./sha512')\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Session = void 0;\nconst sha_js_1 = require(\"sha.js\");\nconst util_1 = require(\"../core/util\");\nconst STORAGE_KEY_SESSION_ID = 'session:id';\nconst STORAGE_KEY_SESSION_SECRET = 'session:secret';\nconst STORAGE_KEY_SESSION_LINKED = 'session:linked';\nclass Session {\n constructor(storage, id, secret, linked) {\n this._storage = storage;\n this._id = id || (0, util_1.randomBytesHex)(16);\n this._secret = secret || (0, util_1.randomBytesHex)(32);\n this._key = new sha_js_1.sha256()\n .update(`${this._id}, ${this._secret} WalletLink`) // ensure old sessions stay connected\n .digest('hex');\n this._linked = !!linked;\n }\n static load(storage) {\n const id = storage.getItem(STORAGE_KEY_SESSION_ID);\n const linked = storage.getItem(STORAGE_KEY_SESSION_LINKED);\n const secret = storage.getItem(STORAGE_KEY_SESSION_SECRET);\n if (id && secret) {\n return new Session(storage, id, secret, linked === '1');\n }\n return null;\n }\n /**\n * Takes in a session ID and returns the sha256 hash of it.\n * @param sessionId session ID\n */\n static hash(sessionId) {\n return new sha_js_1.sha256().update(sessionId).digest('hex');\n }\n get id() {\n return this._id;\n }\n get secret() {\n return this._secret;\n }\n get key() {\n return this._key;\n }\n get linked() {\n return this._linked;\n }\n set linked(val) {\n this._linked = val;\n this.persistLinked();\n }\n save() {\n this._storage.setItem(STORAGE_KEY_SESSION_ID, this._id);\n this._storage.setItem(STORAGE_KEY_SESSION_SECRET, this._secret);\n this.persistLinked();\n return this;\n }\n persistLinked() {\n this._storage.setItem(STORAGE_KEY_SESSION_LINKED, this._linked ? '1' : '0');\n }\n}\nexports.Session = Session;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Cipher = void 0;\nconst util_1 = require(\"../core/util\");\nclass Cipher {\n // @param secret hex representation of 32-byte secret\n constructor(secret) {\n this.secret = secret;\n }\n /**\n *\n * @param plainText string to be encrypted\n * returns hex string representation of bytes in the order: initialization vector (iv),\n * auth tag, encrypted plaintext. IV is 12 bytes. Auth tag is 16 bytes. Remaining bytes are the\n * encrypted plainText.\n */\n async encrypt(plainText) {\n const secret = this.secret;\n if (secret.length !== 64)\n throw Error(`secret must be 256 bits`);\n const ivBytes = crypto.getRandomValues(new Uint8Array(12));\n const secretKey = await crypto.subtle.importKey('raw', (0, util_1.hexStringToUint8Array)(secret), { name: 'aes-gcm' }, false, ['encrypt', 'decrypt']);\n const enc = new TextEncoder();\n // Will return encrypted plainText with auth tag (ie MAC or checksum) appended at the end\n const encryptedResult = await window.crypto.subtle.encrypt({\n name: 'AES-GCM',\n iv: ivBytes,\n }, secretKey, enc.encode(plainText));\n const tagLength = 16;\n const authTag = encryptedResult.slice(encryptedResult.byteLength - tagLength);\n const encryptedPlaintext = encryptedResult.slice(0, encryptedResult.byteLength - tagLength);\n const authTagBytes = new Uint8Array(authTag);\n const encryptedPlaintextBytes = new Uint8Array(encryptedPlaintext);\n const concatted = new Uint8Array([...ivBytes, ...authTagBytes, ...encryptedPlaintextBytes]);\n return (0, util_1.uint8ArrayToHex)(concatted);\n }\n /**\n *\n * @param cipherText hex string representation of bytes in the order: initialization vector (iv),\n * auth tag, encrypted plaintext. IV is 12 bytes. Auth tag is 16 bytes.\n */\n async decrypt(cipherText) {\n const secret = this.secret;\n if (secret.length !== 64)\n throw Error(`secret must be 256 bits`);\n return new Promise((resolve, reject) => {\n void (async function () {\n const secretKey = await crypto.subtle.importKey('raw', (0, util_1.hexStringToUint8Array)(secret), { name: 'aes-gcm' }, false, ['encrypt', 'decrypt']);\n const encrypted = (0, util_1.hexStringToUint8Array)(cipherText);\n const ivBytes = encrypted.slice(0, 12);\n const authTagBytes = encrypted.slice(12, 28);\n const encryptedPlaintextBytes = encrypted.slice(28);\n const concattedBytes = new Uint8Array([...encryptedPlaintextBytes, ...authTagBytes]);\n const algo = {\n name: 'AES-GCM',\n iv: new Uint8Array(ivBytes),\n };\n try {\n const decrypted = await window.crypto.subtle.decrypt(algo, secretKey, concattedBytes);\n const decoder = new TextDecoder();\n resolve(decoder.decode(decrypted));\n }\n catch (err) {\n reject(err);\n }\n })();\n });\n }\n}\nexports.Cipher = Cipher;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkHTTP = void 0;\nclass WalletLinkHTTP {\n constructor(linkAPIUrl, sessionId, sessionKey) {\n this.linkAPIUrl = linkAPIUrl;\n this.sessionId = sessionId;\n const credentials = `${sessionId}:${sessionKey}`;\n this.auth = `Basic ${btoa(credentials)}`;\n }\n // mark unseen events as seen\n async markUnseenEventsAsSeen(events) {\n return Promise.all(events.map((e) => fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`, {\n method: 'POST',\n headers: {\n Authorization: this.auth,\n },\n }))).catch((error) => console.error('Unabled to mark event as failed:', error));\n }\n async fetchUnseenEvents() {\n var _a;\n const response = await fetch(`${this.linkAPIUrl}/events?unseen=true`, {\n headers: {\n Authorization: this.auth,\n },\n });\n if (response.ok) {\n const { events, error } = (await response.json());\n if (error) {\n throw new Error(`Check unseen events failed: ${error}`);\n }\n const responseEvents = (_a = events === null || events === void 0 ? void 0 : events.filter((e) => e.event === 'Web3Response').map((e) => ({\n type: 'Event',\n sessionId: this.sessionId,\n eventId: e.id,\n event: e.event,\n data: e.data,\n }))) !== null && _a !== void 0 ? _a : [];\n this.markUnseenEventsAsSeen(responseEvents);\n return responseEvents;\n }\n throw new Error(`Check unseen events failed: ${response.status}`);\n }\n}\nexports.WalletLinkHTTP = WalletLinkHTTP;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkWebSocket = exports.ConnectionState = void 0;\nvar ConnectionState;\n(function (ConnectionState) {\n ConnectionState[ConnectionState[\"DISCONNECTED\"] = 0] = \"DISCONNECTED\";\n ConnectionState[ConnectionState[\"CONNECTING\"] = 1] = \"CONNECTING\";\n ConnectionState[ConnectionState[\"CONNECTED\"] = 2] = \"CONNECTED\";\n})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));\nclass WalletLinkWebSocket {\n setConnectionStateListener(listener) {\n this.connectionStateListener = listener;\n }\n setIncomingDataListener(listener) {\n this.incomingDataListener = listener;\n }\n /**\n * Constructor\n * @param url WebSocket server URL\n * @param [WebSocketClass] Custom WebSocket implementation\n */\n constructor(url, WebSocketClass = WebSocket) {\n this.WebSocketClass = WebSocketClass;\n this.webSocket = null;\n this.pendingData = [];\n this.url = url.replace(/^http/, 'ws');\n }\n /**\n * Make a websocket connection\n * @returns a Promise that resolves when connected\n */\n async connect() {\n if (this.webSocket) {\n throw new Error('webSocket object is not null');\n }\n return new Promise((resolve, reject) => {\n var _a;\n let webSocket;\n try {\n this.webSocket = webSocket = new this.WebSocketClass(this.url);\n }\n catch (err) {\n reject(err);\n return;\n }\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.CONNECTING);\n webSocket.onclose = (evt) => {\n var _a;\n this.clearWebSocket();\n reject(new Error(`websocket error ${evt.code}: ${evt.reason}`));\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.DISCONNECTED);\n };\n webSocket.onopen = (_) => {\n var _a;\n resolve();\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.CONNECTED);\n if (this.pendingData.length > 0) {\n const pending = [...this.pendingData];\n pending.forEach((data) => this.sendData(data));\n this.pendingData = [];\n }\n };\n webSocket.onmessage = (evt) => {\n var _a, _b;\n if (evt.data === 'h') {\n (_a = this.incomingDataListener) === null || _a === void 0 ? void 0 : _a.call(this, {\n type: 'Heartbeat',\n });\n }\n else {\n try {\n const message = JSON.parse(evt.data);\n (_b = this.incomingDataListener) === null || _b === void 0 ? void 0 : _b.call(this, message);\n }\n catch (_c) {\n /* empty */\n }\n }\n };\n });\n }\n /**\n * Disconnect from server\n */\n disconnect() {\n var _a;\n const { webSocket } = this;\n if (!webSocket) {\n return;\n }\n this.clearWebSocket();\n (_a = this.connectionStateListener) === null || _a === void 0 ? void 0 : _a.call(this, ConnectionState.DISCONNECTED);\n this.connectionStateListener = undefined;\n this.incomingDataListener = undefined;\n try {\n webSocket.close();\n }\n catch (_b) {\n // noop\n }\n }\n /**\n * Send data to server\n * @param data text to send\n */\n sendData(data) {\n const { webSocket } = this;\n if (!webSocket) {\n this.pendingData.push(data);\n this.connect();\n return;\n }\n webSocket.send(data);\n }\n clearWebSocket() {\n const { webSocket } = this;\n if (!webSocket) {\n return;\n }\n this.webSocket = null;\n webSocket.onclose = null;\n webSocket.onerror = null;\n webSocket.onmessage = null;\n webSocket.onopen = null;\n }\n}\nexports.WalletLinkWebSocket = WalletLinkWebSocket;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkConnection = void 0;\nconst type_1 = require(\"../../../core/type\");\nconst Cipher_1 = require(\"../../../lib/Cipher\");\nconst DiagnosticLogger_1 = require(\"../../../provider/DiagnosticLogger\");\nconst RelayAbstract_1 = require(\"../../RelayAbstract\");\nconst Session_1 = require(\"../../Session\");\nconst WalletLinkHTTP_1 = require(\"./WalletLinkHTTP\");\nconst WalletLinkWebSocket_1 = require(\"./WalletLinkWebSocket\");\nconst HEARTBEAT_INTERVAL = 10000;\nconst REQUEST_TIMEOUT = 60000;\n/**\n * Coinbase Wallet Connection\n */\nclass WalletLinkConnection {\n /**\n * Constructor\n * @param session Session\n * @param linkAPIUrl Coinbase Wallet link server URL\n * @param listener WalletLinkConnectionUpdateListener\n * @param [WebSocketClass] Custom WebSocket implementation\n */\n constructor({ session, linkAPIUrl, listener, diagnostic, WebSocketClass = WebSocket, }) {\n this.destroyed = false;\n this.lastHeartbeatResponse = 0;\n this.nextReqId = (0, type_1.IntNumber)(1);\n /**\n * true if connected and authenticated, else false\n * runs listener when connected status changes\n */\n this._connected = false;\n /**\n * true if linked (a guest has joined before)\n * runs listener when linked status changes\n */\n this._linked = false;\n this.shouldFetchUnseenEventsOnConnect = false;\n this.requestResolutions = new Map();\n this.handleSessionMetadataUpdated = (metadata) => {\n if (!metadata)\n return;\n // Map of metadata key to handler function\n const handlers = new Map([\n ['__destroyed', this.handleDestroyed],\n ['EthereumAddress', this.handleAccountUpdated],\n ['WalletUsername', this.handleWalletUsernameUpdated],\n ['AppVersion', this.handleAppVersionUpdated],\n [\n 'ChainId',\n (v) => metadata.JsonRpcUrl && this.handleChainUpdated(v, metadata.JsonRpcUrl),\n ],\n ]);\n // call handler for each metadata key if value is defined\n handlers.forEach((handler, key) => {\n const value = metadata[key];\n if (value === undefined)\n return;\n handler(value);\n });\n };\n this.handleDestroyed = (__destroyed) => {\n var _a, _b;\n if (__destroyed !== '1')\n return;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.resetAndReload();\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.METADATA_DESTROYED, {\n alreadyDestroyed: this.isDestroyed,\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n };\n this.handleAccountUpdated = async (encryptedEthereumAddress) => {\n var _a, _b;\n try {\n const address = await this.cipher.decrypt(encryptedEthereumAddress);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.accountUpdated(address);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'selectedAddress',\n });\n }\n };\n this.handleMetadataUpdated = async (key, encryptedMetadataValue) => {\n var _a, _b;\n try {\n const decryptedValue = await this.cipher.decrypt(encryptedMetadataValue);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.metadataUpdated(key, decryptedValue);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: key,\n });\n }\n };\n this.handleWalletUsernameUpdated = async (walletUsername) => {\n this.handleMetadataUpdated(RelayAbstract_1.WALLET_USER_NAME_KEY, walletUsername);\n };\n this.handleAppVersionUpdated = async (appVersion) => {\n this.handleMetadataUpdated(RelayAbstract_1.APP_VERSION_KEY, appVersion);\n };\n this.handleChainUpdated = async (encryptedChainId, encryptedJsonRpcUrl) => {\n var _a, _b;\n try {\n const chainId = await this.cipher.decrypt(encryptedChainId);\n const jsonRpcUrl = await this.cipher.decrypt(encryptedJsonRpcUrl);\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.chainUpdated(chainId, jsonRpcUrl);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'chainId|jsonRpcUrl',\n });\n }\n };\n this.session = session;\n this.cipher = new Cipher_1.Cipher(session.secret);\n this.diagnostic = diagnostic;\n this.listener = listener;\n const ws = new WalletLinkWebSocket_1.WalletLinkWebSocket(`${linkAPIUrl}/rpc`, WebSocketClass);\n ws.setConnectionStateListener(async (state) => {\n var _a;\n // attempt to reconnect every 5 seconds when disconnected\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.CONNECTED_STATE_CHANGE, {\n state,\n sessionIdHash: Session_1.Session.hash(session.id),\n });\n let connected = false;\n switch (state) {\n case WalletLinkWebSocket_1.ConnectionState.DISCONNECTED:\n // if DISCONNECTED and not destroyed\n if (!this.destroyed) {\n const connect = async () => {\n // wait 5 seconds\n await new Promise((resolve) => setTimeout(resolve, 5000));\n // check whether it's destroyed again\n if (!this.destroyed) {\n // reconnect\n ws.connect().catch(() => {\n connect();\n });\n }\n };\n connect();\n }\n break;\n case WalletLinkWebSocket_1.ConnectionState.CONNECTED:\n // perform authentication upon connection\n try {\n // if CONNECTED, authenticate, and then check link status\n await this.authenticate();\n this.sendIsLinked();\n this.sendGetSessionConfig();\n connected = true;\n }\n catch (_b) {\n /* empty */\n }\n // send heartbeat every n seconds while connected\n // if CONNECTED, start the heartbeat timer\n // first timer event updates lastHeartbeat timestamp\n // subsequent calls send heartbeat message\n this.updateLastHeartbeat();\n setInterval(() => {\n this.heartbeat();\n }, HEARTBEAT_INTERVAL);\n // check for unseen events\n if (this.shouldFetchUnseenEventsOnConnect) {\n this.fetchUnseenEventsAPI();\n }\n break;\n case WalletLinkWebSocket_1.ConnectionState.CONNECTING:\n break;\n }\n // distinctUntilChanged\n if (this.connected !== connected) {\n this.connected = connected;\n }\n });\n ws.setIncomingDataListener((m) => {\n var _a, _b, _c;\n switch (m.type) {\n // handle server's heartbeat responses\n case 'Heartbeat':\n this.updateLastHeartbeat();\n return;\n // handle link status updates\n case 'IsLinkedOK':\n case 'Linked': {\n const linked = m.type === 'IsLinkedOK' ? m.linked : undefined;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.LINKED, {\n sessionIdHash: Session_1.Session.hash(session.id),\n linked,\n type: m.type,\n onlineGuests: m.onlineGuests,\n });\n this.linked = linked || m.onlineGuests > 0;\n break;\n }\n // handle session config updates\n case 'GetSessionConfigOK':\n case 'SessionConfigUpdated': {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.SESSION_CONFIG_RECEIVED, {\n sessionIdHash: Session_1.Session.hash(session.id),\n metadata_keys: m && m.metadata ? Object.keys(m.metadata) : undefined,\n });\n this.handleSessionMetadataUpdated(m.metadata);\n break;\n }\n case 'Event': {\n this.handleIncomingEvent(m);\n break;\n }\n }\n // resolve request promises\n if (m.id !== undefined) {\n (_c = this.requestResolutions.get(m.id)) === null || _c === void 0 ? void 0 : _c(m);\n }\n });\n this.ws = ws;\n this.http = new WalletLinkHTTP_1.WalletLinkHTTP(linkAPIUrl, session.id, session.key);\n }\n /**\n * Make a connection to the server\n */\n connect() {\n var _a;\n if (this.destroyed) {\n throw new Error('instance is destroyed');\n }\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.STARTED_CONNECTING, {\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n this.ws.connect();\n }\n /**\n * Terminate connection, and mark as destroyed. To reconnect, create a new\n * instance of WalletSDKConnection\n */\n destroy() {\n var _a;\n this.destroyed = true;\n this.ws.disconnect();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.DISCONNECTED, {\n sessionIdHash: Session_1.Session.hash(this.session.id),\n });\n this.listener = undefined;\n }\n get isDestroyed() {\n return this.destroyed;\n }\n get connected() {\n return this._connected;\n }\n set connected(connected) {\n var _a, _b;\n this._connected = connected;\n if (connected)\n (_a = this.onceConnected) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.listener) === null || _b === void 0 ? void 0 : _b.connectedUpdated(connected);\n }\n setOnceConnected(callback) {\n return new Promise((resolve) => {\n if (this.connected) {\n callback().then(resolve);\n }\n else {\n this.onceConnected = () => {\n callback().then(resolve);\n this.onceConnected = undefined;\n };\n }\n });\n }\n get linked() {\n return this._linked;\n }\n set linked(linked) {\n var _a, _b;\n this._linked = linked;\n if (linked)\n (_a = this.onceLinked) === null || _a === void 0 ? void 0 : _a.call(this);\n (_b = this.listener) === null || _b === void 0 ? void 0 : _b.linkedUpdated(linked);\n }\n setOnceLinked(callback) {\n return new Promise((resolve) => {\n if (this.linked) {\n callback().then(resolve);\n }\n else {\n this.onceLinked = () => {\n callback().then(resolve);\n this.onceLinked = undefined;\n };\n }\n });\n }\n async handleIncomingEvent(m) {\n var _a, _b;\n if (m.type !== 'Event' || m.event !== 'Web3Response') {\n return;\n }\n try {\n const decryptedData = await this.cipher.decrypt(m.data);\n const message = JSON.parse(decryptedData);\n if (message.type !== 'WEB3_RESPONSE')\n return;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.handleWeb3ResponseMessage(message);\n }\n catch (_c) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.GENERAL_ERROR, {\n message: 'Had error decrypting',\n value: 'incomingEvent',\n });\n }\n }\n async checkUnseenEvents() {\n if (!this.connected) {\n this.shouldFetchUnseenEventsOnConnect = true;\n return;\n }\n await new Promise((resolve) => setTimeout(resolve, 250));\n try {\n await this.fetchUnseenEventsAPI();\n }\n catch (e) {\n console.error('Unable to check for unseen events', e);\n }\n }\n async fetchUnseenEventsAPI() {\n this.shouldFetchUnseenEventsOnConnect = false;\n const responseEvents = await this.http.fetchUnseenEvents();\n responseEvents.forEach((e) => this.handleIncomingEvent(e));\n }\n /**\n * Set session metadata in SessionConfig object\n * @param key\n * @param value\n * @returns a Promise that completes when successful\n */\n async setSessionMetadata(key, value) {\n const message = {\n type: 'SetSessionConfig',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n metadata: { [key]: value },\n };\n return this.setOnceConnected(async () => {\n const res = await this.makeRequest(message);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to set session metadata');\n }\n });\n }\n /**\n * Publish an event and emit event ID when successful\n * @param event event name\n * @param unencryptedData unencrypted event data\n * @param callWebhook whether the webhook should be invoked\n * @returns a Promise that emits event ID when successful\n */\n async publishEvent(event, unencryptedData, callWebhook = false) {\n const data = await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({}, unencryptedData), { origin: location.origin, relaySource: window.coinbaseWalletExtension ? 'injected_sdk' : 'sdk' })));\n const message = {\n type: 'PublishEvent',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n event,\n data,\n callWebhook,\n };\n return this.setOnceLinked(async () => {\n const res = await this.makeRequest(message);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to publish event');\n }\n return res.eventId;\n });\n }\n sendData(message) {\n this.ws.sendData(JSON.stringify(message));\n }\n updateLastHeartbeat() {\n this.lastHeartbeatResponse = Date.now();\n }\n heartbeat() {\n if (Date.now() - this.lastHeartbeatResponse > HEARTBEAT_INTERVAL * 2) {\n this.ws.disconnect();\n return;\n }\n try {\n this.ws.sendData('h');\n }\n catch (_a) {\n // noop\n }\n }\n async makeRequest(message, timeout = REQUEST_TIMEOUT) {\n const reqId = message.id;\n this.sendData(message);\n // await server message with corresponding id\n let timeoutId;\n return Promise.race([\n new Promise((_, reject) => {\n timeoutId = window.setTimeout(() => {\n reject(new Error(`request ${reqId} timed out`));\n }, timeout);\n }),\n new Promise((resolve) => {\n this.requestResolutions.set(reqId, (m) => {\n clearTimeout(timeoutId); // clear the timeout\n resolve(m);\n this.requestResolutions.delete(reqId);\n });\n }),\n ]);\n }\n async authenticate() {\n const m = {\n type: 'HostSession',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n sessionKey: this.session.key,\n };\n const res = await this.makeRequest(m);\n if (res.type === 'Fail') {\n throw new Error(res.error || 'failed to authentcate');\n }\n }\n sendIsLinked() {\n const m = {\n type: 'IsLinked',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n };\n this.sendData(m);\n }\n sendGetSessionConfig() {\n const m = {\n type: 'GetSessionConfig',\n id: (0, type_1.IntNumber)(this.nextReqId++),\n sessionId: this.session.id,\n };\n this.sendData(m);\n }\n}\nexports.WalletLinkConnection = WalletLinkConnection;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `@namespace svg \"http://www.w3.org/2000/svg\";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Helvetica Neue\",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:\"\\\\201C\" \"\\\\201D\" \"\\\\2018\" \"\\\\2019\";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Helvetica Neue\",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.injectCssReset = void 0;\nconst cssReset_css_1 = __importDefault(require(\"./cssReset-css\"));\nfunction injectCssReset() {\n const styleEl = document.createElement('style');\n styleEl.type = 'text/css';\n styleEl.appendChild(document.createTextNode(cssReset_css_1.default));\n document.documentElement.appendChild(styleEl);\n}\nexports.injectCssReset = injectCssReset;\n","var n,l,u,t,i,o,r,f,e,c,s,a,h={},v=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function m(){return{current:null}}function b(n){return n.children}function k(n,l){this.props=n,this.context=l}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;lu&&i.sort(f));M.__r=0}function P(n,l,u,t,i,o,r,f,e,c,s){var a,p,y,d,w,_=t&&t.__k||v,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=n,i.__b=n.__b+1,o=null,-1!==(f=i.__i=L(i,u,r,s))&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a--:f==r+1?a++:(f>r?a--:a++,i.__u|=65536))):i=n.__k[t]=null;if(s)for(t=0;t(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f2&&(e.children=arguments.length>3?n.call(arguments,2):t),g(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.forEach(function(n){n.__e=!0,S(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=v.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),S(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),S(this))},k.prototype.render=b,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},M.__r=0,e=0,c=F(!1),s=F(!0),a=0;export{k as Component,b as Fragment,D as cloneElement,G as createContext,_ as createElement,m as createRef,_ as h,B as hydrate,t as isValidElement,l as options,q as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t=u.__.length&&u.__.push({}),u.__[n]}function h(n){return o=1,p(D,n)}function p(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=d(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function _(n,u){var i=d(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function T(n,r){var u=d(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,p as useReducer,A as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CloseIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction CloseIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"40\", height: \"40\", viewBox: \"0 0 40 40\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z\" })));\n}\nexports.CloseIcon = CloseIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletRound = void 0;\nconst preact_1 = require(\"preact\");\nfunction CoinbaseWalletRound(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"28\", height: \"28\", viewBox: \"0 0 28 28\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"circle\", { cx: \"14\", cy: \"14\", r: \"14\", fill: \"#0052FF\" }),\n (0, preact_1.h)(\"path\", { d: \"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z\", fill: \"white\" }),\n (0, preact_1.h)(\"path\", { d: \"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z\", fill: \"#0052FF\" })));\n}\nexports.CoinbaseWalletRound = CoinbaseWalletRound;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QRCodeIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction QRCodeIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"18\", height: \"18\", viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M3 3V8.99939L5 8.99996V5H9V3H3Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M15 21L21 21V15.0006L19 15V19L15 19V21Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M21 9H19V5H15.0006L15 3H21V9Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M3 15V21H8.99939L8.99996 19H5L5 15H3Z\" })));\n}\nexports.QRCodeIcon = QRCodeIcon;\n","/**\n * @fileoverview\n * - modified davidshimjs/qrcodejs library for use in node.js\n * - Using the 'QRCode for Javascript library'\n * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.\n * - this library has no dependencies.\n *\n * @version 0.9.1 (2016-02-12)\n * @author davidshimjs, papnkukn\n * @see http://www.d-project.com/\n * @see http://jeromeetienne.github.com/jquery-qrcode/\n * @see https://github.com/davidshimjs/qrcodejs\n */\n\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\nfunction QR8bitByte(data) {\n this.mode = QRMode.MODE_8BIT_BYTE;\n this.data = data;\n this.parsedData = [];\n\n // Added to support UTF-8 Characters\n for (var i = 0, l = this.data.length; i < l; i++) {\n var byteArray = [];\n var code = this.data.charCodeAt(i);\n\n if (code > 0x10000) {\n byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);\n byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);\n byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);\n byteArray[3] = 0x80 | (code & 0x3F);\n } else if (code > 0x800) {\n byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);\n byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);\n byteArray[2] = 0x80 | (code & 0x3F);\n } else if (code > 0x80) {\n byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);\n byteArray[1] = 0x80 | (code & 0x3F);\n } else {\n byteArray[0] = code;\n }\n\n this.parsedData.push(byteArray);\n }\n\n this.parsedData = Array.prototype.concat.apply([], this.parsedData);\n\n if (this.parsedData.length != this.data.length) {\n this.parsedData.unshift(191);\n this.parsedData.unshift(187);\n this.parsedData.unshift(239);\n }\n}\n\nQR8bitByte.prototype = {\n getLength: function (buffer) {\n return this.parsedData.length;\n },\n write: function (buffer) {\n for (var i = 0, l = this.parsedData.length; i < l; i++) {\n buffer.put(this.parsedData[i], 8);\n }\n }\n};\n\nfunction QRCodeModel(typeNumber, errorCorrectLevel) {\n this.typeNumber = typeNumber;\n this.errorCorrectLevel = errorCorrectLevel;\n this.modules = null;\n this.moduleCount = 0;\n this.dataCache = null;\n this.dataList = [];\n}\n\nQRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+\",\"+col);}\nreturn this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row=7){this.setupTypeNumber(test);}\nif(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);}\nthis.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}}\nreturn pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;}\nfor(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}}\nfor(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}}\nthis.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex>>bitIndex)&1)==1);}\nvar mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;}\nthis.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}}\nrow+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;itotalDataCount*8){throw new Error(\"code length overflow. (\"\n+buffer.getLengthInBits()\n+\">\"\n+totalDataCount*8\n+\")\");}\nif(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);}\nwhile(buffer.getLengthInBits()%8!=0){buffer.putBit(false);}\nwhile(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;}\nbuffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;}\nbuffer.put(QRCodeModel.PAD1,8);}\nreturn QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r=0)?modPoly.get(modIndex):0;}}\nvar totalCodeCount=0;for(var i=0;i=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));}\nreturn((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));}\nreturn(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;}\nreturn digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error(\"bad maskPattern:\"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i5){lostPoint+=(3+sameCount-5);}}}\nfor(var row=0;row=256){n-=255;}\nreturn QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);}\nif(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));}\nthis.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];\n\n\n/** Constructor */\nfunction QRCode(options) {\n var instance = this;\n\n //Default options\n this.options = {\n padding: 4,\n width: 256,\n height: 256,\n typeNumber: 4,\n color: \"#000000\",\n background: \"#ffffff\",\n ecl: \"M\",\n image:{\n svg:\"\",\n width:0,\n height:0\n }\n };\n\n //In case the options is string\n if (typeof options === 'string') {\n options = {\n content: options\n };\n }\n\n //Merge options\n if (options) {\n for (var i in options) {\n this.options[i] = options[i];\n }\n }\n\n if (typeof this.options.content !== 'string') {\n throw new Error(\"Expected 'content' as string!\");\n }\n\n if (this.options.content.length === 0 /* || this.options.content.length > 7089 */) {\n throw new Error(\"Expected 'content' to be non-empty!\");\n }\n\n if (!(this.options.padding >= 0)) {\n throw new Error(\"Expected 'padding' value to be non-negative!\");\n }\n\n if (!(this.options.width > 0) || !(this.options.height > 0)) {\n throw new Error(\"Expected 'width' or 'height' value to be higher than zero!\");\n }\n\n //Gets the error correction level\n function _getErrorCorrectLevel(ecl) {\n switch (ecl) {\n case \"L\":\n return QRErrorCorrectLevel.L;\n\n case \"M\":\n return QRErrorCorrectLevel.M;\n\n case \"Q\":\n return QRErrorCorrectLevel.Q;\n\n case \"H\":\n return QRErrorCorrectLevel.H;\n\n default:\n throw new Error(\"Unknwon error correction level: \" + ecl);\n }\n }\n\n //Get type number\n function _getTypeNumber(content, ecl) {\n var length = _getUTF8Length(content);\n\n var type = 1;\n var limit = 0;\n for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {\n var table = QRCodeLimitLength[i];\n if (!table) {\n throw new Error(\"Content too long: expected \" + limit + \" but got \" + length);\n }\n\n switch (ecl) {\n case \"L\":\n limit = table[0];\n break;\n\n case \"M\":\n limit = table[1];\n break;\n\n case \"Q\":\n limit = table[2];\n break;\n\n case \"H\":\n limit = table[3];\n break;\n\n default:\n throw new Error(\"Unknwon error correction level: \" + ecl);\n }\n\n if (length <= limit) {\n break;\n }\n\n type++;\n }\n\n if (type > QRCodeLimitLength.length) {\n throw new Error(\"Content too long\");\n }\n\n return type;\n }\n\n //Gets text length\n function _getUTF8Length(content) {\n var result = encodeURI(content).toString().replace(/\\%[0-9a-fA-F]{2}/g, 'a');\n return result.length + (result.length != content ? 3 : 0);\n }\n\n //Generate QR Code matrix\n var content = this.options.content;\n var type = _getTypeNumber(content, this.options.ecl);\n var ecl = _getErrorCorrectLevel(this.options.ecl);\n this.qrcode = new QRCodeModel(type, ecl);\n this.qrcode.addData(content);\n this.qrcode.make();\n}\n\n/** Generates QR Code as SVG image */\nQRCode.prototype.svg = function(opt) {\n var options = this.options || { };\n var modules = this.qrcode.modules;\n\n if (typeof opt == \"undefined\") {\n opt = { container: options.container || \"svg\" };\n }\n\n //Apply new lines and indents in SVG?\n var pretty = typeof options.pretty != \"undefined\" ? !!options.pretty : true;\n\n var indent = pretty ? ' ' : '';\n var EOL = pretty ? '\\r\\n' : '';\n var width = options.width;\n var height = options.height;\n var length = modules.length;\n var xsize = width / (length + 2 * options.padding);\n var ysize = height / (length + 2 * options.padding);\n\n //Join (union, merge) rectangles into one shape?\n var join = typeof options.join != \"undefined\" ? !!options.join : false;\n\n //Swap the X and Y modules, pull request #2\n var swap = typeof options.swap != \"undefined\" ? !!options.swap : false;\n\n //Apply declaration in SVG?\n var xmlDeclaration = typeof options.xmlDeclaration != \"undefined\" ? !!options.xmlDeclaration : true;\n\n //Populate with predefined shape instead of \"rect\" elements, thanks to @kkocdko\n var predefined = typeof options.predefined != \"undefined\" ? !!options.predefined : false;\n var defs = predefined ? indent + '' + EOL : '';\n\n //Background rectangle\n var bgrect = indent + '' + EOL;\n\n //Rectangles representing modules\n var modrect = '';\n var pathdata = '';\n\n for (var y = 0; y < length; y++) {\n for (var x = 0; x < length; x++) {\n var module = modules[x][y];\n if (module) {\n\n var px = (x * xsize + options.padding * xsize);\n var py = (y * ysize + options.padding * ysize);\n\n //Some users have had issues with the QR Code, thanks to @danioso for the solution\n if (swap) {\n var t = px;\n px = py;\n py = t;\n }\n\n if (join) {\n //Module as a part of svg path data, thanks to @danioso\n var w = xsize + px\n var h = ysize + py\n\n px = (Number.isInteger(px))? Number(px): px.toFixed(2);\n py = (Number.isInteger(py))? Number(py): py.toFixed(2);\n w = (Number.isInteger(w))? Number(w): w.toFixed(2);\n h = (Number.isInteger(h))? Number(h): h.toFixed(2);\n\n pathdata += ('M' + px + ',' + py + ' V' + h + ' H' + w + ' V' + py + ' H' + px + ' Z ');\n }\n else if (predefined) {\n //Module as a predefined shape, thanks to @kkocdko\n modrect += indent + '' + EOL;\n }\n else {\n //Module as rectangle element\n modrect += indent + '' + EOL;\n }\n }\n }\n }\n\n if (join) {\n modrect = indent + '';\n }\n let imgSvg = \"\";\n if(this.options.image !== undefined && this.options.image.svg){\n const imgWidth = width * this.options.image.width / 100;\n const imgHeight = height * this.options.image.height / 100;\n const imgX = (width/2) - imgWidth/2;\n const imgY = (height/2) - imgHeight/2;\n imgSvg += ``;\n imgSvg += this.options.image.svg + EOL;\n imgSvg += '';\n }\n\n var svg = \"\";\n switch (opt.container) {\n //Wrapped in SVG document\n case \"svg\":\n if (xmlDeclaration) {\n svg += '' + EOL;\n }\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n break;\n\n //Viewbox for responsive use in a browser, thanks to @danioso\n case \"svg-viewbox\":\n if (xmlDeclaration) {\n svg += '' + EOL;\n }\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n break;\n\n\n //Wrapped in group element\n case \"g\":\n svg += '' + EOL;\n svg += defs + bgrect + modrect;\n svg += imgSvg;\n svg += '';\n\n break;\n\n //Without a container\n default:\n svg += (defs + bgrect + modrect + imgSvg).replace(/^\\s+/, \"\"); //Clear indents on each line\n break;\n }\n\n return svg;\n};\n\nmodule.exports = QRCode;\n\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QRCode = void 0;\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst qrcode_svg_1 = __importDefault(require(\"../../../../vendor-js/qrcode-svg\"));\nconst QRCode = (props) => {\n const [svg, setSvg] = (0, hooks_1.useState)('');\n (0, hooks_1.useEffect)(() => {\n var _a, _b;\n const qrcode = new qrcode_svg_1.default({\n content: props.content,\n background: props.bgColor || '#ffffff',\n color: props.fgColor || '#000000',\n container: 'svg',\n ecl: 'M',\n width: (_a = props.width) !== null && _a !== void 0 ? _a : 256,\n height: (_b = props.height) !== null && _b !== void 0 ? _b : 256,\n padding: 0,\n image: props.image,\n });\n const base64 = Buffer.from(qrcode.svg(), 'utf8').toString('base64');\n setSvg(`data:image/svg+xml;base64,${base64}`);\n }, [props.bgColor, props.content, props.fgColor, props.height, props.image, props.width]);\n return svg ? (0, preact_1.h)(\"img\", { src: svg, alt: \"QR Code\" }) : null;\n};\nexports.QRCode = QRCode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Spinner = void 0;\nconst preact_1 = require(\"preact\");\nconst Spinner_css_1 = __importDefault(require(\"./Spinner-css\"));\nconst Spinner = (props) => {\n var _a;\n const size = (_a = props.size) !== null && _a !== void 0 ? _a : 64;\n const color = props.color || '#000';\n return ((0, preact_1.h)(\"div\", { class: \"-cbwsdk-spinner\" },\n (0, preact_1.h)(\"style\", null, Spinner_css_1.default),\n (0, preact_1.h)(\"svg\", { viewBox: \"0 0 100 100\", xmlns: \"http://www.w3.org/2000/svg\", style: { width: size, height: size } },\n (0, preact_1.h)(\"circle\", { style: { cx: 50, cy: 50, r: 45, stroke: color } }))));\n};\nexports.Spinner = Spinner;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletSteps = exports.ConnectContent = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst util_1 = require(\"../../../../../core/util\");\nconst version_1 = require(\"../../../../../version\");\nconst CloseIcon_1 = require(\"../icons/CloseIcon\");\nconst CoinbaseWalletRound_1 = require(\"../icons/CoinbaseWalletRound\");\nconst QRCodeIcon_1 = require(\"../icons/QRCodeIcon\");\nconst QRCode_1 = require(\"../QRCode\");\nconst Spinner_1 = require(\"../Spinner/Spinner\");\nconst ConnectContent_css_1 = __importDefault(require(\"./ConnectContent-css\"));\nconst wallet = {\n title: 'Coinbase Wallet app',\n description: 'Connect with your self-custody wallet',\n steps: CoinbaseWalletSteps,\n};\nconst makeIconColor = (theme) => {\n return theme === 'light' ? '#FFFFFF' : '#0A0B0D';\n};\nfunction ConnectContent(props) {\n const { theme } = props;\n const qrUrl = (0, util_1.createQrUrl)(props.sessionId, props.sessionSecret, props.linkAPIUrl, props.isParentConnection, props.version, props.chainId);\n const WalletSteps = wallet.steps;\n return ((0, preact_1.h)(\"div\", { \"data-testid\": \"connect-content\", className: (0, clsx_1.default)('-cbwsdk-connect-content', theme) },\n (0, preact_1.h)(\"style\", null, ConnectContent_css_1.default),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-header\" },\n (0, preact_1.h)(\"h2\", { className: (0, clsx_1.default)('-cbwsdk-connect-content-heading', theme) }, \"Scan to connect with our mobile app\"),\n props.onCancel && ((0, preact_1.h)(\"button\", { type: \"button\", className: '-cbwsdk-cancel-button', onClick: props.onCancel },\n (0, preact_1.h)(CloseIcon_1.CloseIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' })))),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-layout\" },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-column-left\" },\n (0, preact_1.h)(ConnectItem, { title: wallet.title, description: wallet.description, theme: theme })),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-column-right\" },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-content-qr-wrapper\" },\n (0, preact_1.h)(QRCode_1.QRCode, { content: qrUrl, width: 200, height: 200, fgColor: \"#000\", bgColor: \"transparent\" }),\n (0, preact_1.h)(\"input\", { type: \"hidden\", name: \"cbw-cbwsdk-version\", value: version_1.LIB_VERSION }),\n (0, preact_1.h)(\"input\", { type: \"hidden\", value: qrUrl })),\n (0, preact_1.h)(WalletSteps, { theme: theme }),\n !props.isConnected && ((0, preact_1.h)(\"div\", { \"data-testid\": \"connecting-spinner\", className: (0, clsx_1.default)('-cbwsdk-connect-content-qr-connecting', theme) },\n (0, preact_1.h)(Spinner_1.Spinner, { size: 36, color: theme === 'dark' ? '#FFF' : '#000' }),\n (0, preact_1.h)(\"p\", null, \"Connecting...\")))))));\n}\nexports.ConnectContent = ConnectContent;\nfunction ConnectItem({ title, description, theme }) {\n return ((0, preact_1.h)(\"div\", { className: (0, clsx_1.default)('-cbwsdk-connect-item', theme) },\n (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(CoinbaseWalletRound_1.CoinbaseWalletRound, null)),\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-connect-item-copy-wrapper\" },\n (0, preact_1.h)(\"h3\", { className: \"-cbwsdk-connect-item-title\" }, title),\n (0, preact_1.h)(\"p\", { className: \"-cbwsdk-connect-item-description\" }, description))));\n}\nfunction CoinbaseWalletSteps({ theme }) {\n return ((0, preact_1.h)(\"ol\", { className: \"-cbwsdk-wallet-steps\" },\n (0, preact_1.h)(\"li\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-item', theme) },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-wallet-steps-item-wrapper\" }, \"Open Coinbase Wallet app\")),\n (0, preact_1.h)(\"li\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-item', theme) },\n (0, preact_1.h)(\"div\", { className: \"-cbwsdk-wallet-steps-item-wrapper\" },\n (0, preact_1.h)(\"span\", null,\n \"Tap \",\n (0, preact_1.h)(\"strong\", null, \"Scan\"),\n ' '),\n (0, preact_1.h)(\"span\", { className: (0, clsx_1.default)('-cbwsdk-wallet-steps-pad-left', '-cbwsdk-wallet-steps-icon', theme) },\n (0, preact_1.h)(QRCodeIcon_1.QRCodeIcon, { fill: makeIconColor(theme) }))))));\n}\nexports.CoinbaseWalletSteps = CoinbaseWalletSteps;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrowLeftIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction ArrowLeftIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z\" })));\n}\nexports.ArrowLeftIcon = ArrowLeftIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LaptopIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction LaptopIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { d: \"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z\" }),\n (0, preact_1.h)(\"path\", { d: \"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z\" })));\n}\nexports.LaptopIcon = LaptopIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SafeIcon = void 0;\nconst preact_1 = require(\"preact\");\nfunction SafeIcon(props) {\n return ((0, preact_1.h)(\"svg\", Object.assign({ width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" }, props),\n (0, preact_1.h)(\"path\", { \"fill-rule\": \"evenodd\", \"clip-rule\": \"evenodd\", d: \"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z\" })));\n}\nexports.SafeIcon = SafeIcon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TryExtensionContent = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst ArrowLeftIcon_1 = require(\"../icons/ArrowLeftIcon\");\nconst LaptopIcon_1 = require(\"../icons/LaptopIcon\");\nconst SafeIcon_1 = require(\"../icons/SafeIcon\");\nconst TryExtensionContent_css_1 = __importDefault(require(\"./TryExtensionContent-css\"));\nfunction TryExtensionContent({ theme }) {\n const [clicked, setClicked] = (0, hooks_1.useState)(false);\n const handleInstallClick = (0, hooks_1.useCallback)(() => {\n window.open('https://api.wallet.coinbase.com/rpc/v2/desktop/chrome', '_blank');\n }, []);\n const handleClick = (0, hooks_1.useCallback)(() => {\n if (clicked) {\n window.location.reload();\n }\n else {\n handleInstallClick();\n setClicked(true);\n }\n }, [handleInstallClick, clicked]);\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension', theme) },\n (0, preact_1.h)(\"style\", null, TryExtensionContent_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-column-half\" },\n (0, preact_1.h)(\"h3\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-heading', theme) }, \"Or try the Coinbase Wallet browser extension\"),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-cta-wrapper\" },\n (0, preact_1.h)(\"button\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-cta', theme), onClick: handleClick }, clicked ? 'Refresh' : 'Install'),\n (0, preact_1.h)(\"div\", null, !clicked && ((0, preact_1.h)(ArrowLeftIcon_1.ArrowLeftIcon, { class: \"-cbwsdk-try-extension-cta-icon\", fill: theme === 'light' ? '#0052FF' : '#588AF5' }))))),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-column-half\" },\n (0, preact_1.h)(\"ul\", { class: \"-cbwsdk-try-extension-list\" },\n (0, preact_1.h)(\"li\", { class: \"-cbwsdk-try-extension-list-item\" },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-list-item-icon-wrapper\" },\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-icon', theme) },\n (0, preact_1.h)(LaptopIcon_1.LaptopIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' }))),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-copy', theme) }, \"Connect with dapps with just one click on your desktop browser\")),\n (0, preact_1.h)(\"li\", { class: \"-cbwsdk-try-extension-list-item\" },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-try-extension-list-item-icon-wrapper\" },\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-icon', theme) },\n (0, preact_1.h)(SafeIcon_1.SafeIcon, { fill: theme === 'light' ? '#0A0B0D' : '#FFFFFF' }))),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-try-extension-list-item-copy', theme) }, \"Add an additional layer of security by using a supported Ledger hardware wallet\"))))));\n}\nexports.TryExtensionContent = TryExtensionContent;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConnectDialog = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst ConnectContent_1 = require(\"../ConnectContent/ConnectContent\");\nconst TryExtensionContent_1 = require(\"../TryExtensionContent/TryExtensionContent\");\nconst ConnectDialog_css_1 = __importDefault(require(\"./ConnectDialog-css\"));\nconst ConnectDialog = (props) => {\n const { isOpen, darkMode } = props;\n const [containerHidden, setContainerHidden] = (0, hooks_1.useState)(!isOpen);\n const [dialogHidden, setDialogHidden] = (0, hooks_1.useState)(!isOpen);\n (0, hooks_1.useEffect)(() => {\n const timers = [\n window.setTimeout(() => {\n setDialogHidden(!isOpen);\n }, 10),\n ];\n if (isOpen) {\n setContainerHidden(false);\n }\n else {\n timers.push(window.setTimeout(() => {\n setContainerHidden(true);\n }, 360));\n }\n return () => {\n timers.forEach(window.clearTimeout);\n };\n }, [isOpen]);\n const theme = darkMode ? 'dark' : 'light';\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-container', containerHidden && '-cbwsdk-connect-dialog-container-hidden') },\n (0, preact_1.h)(\"style\", null, ConnectDialog_css_1.default),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-backdrop', theme, dialogHidden && '-cbwsdk-connect-dialog-backdrop-hidden') }),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-connect-dialog\" },\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-connect-dialog-box', dialogHidden && '-cbwsdk-connect-dialog-box-hidden') },\n !props.connectDisabled ? ((0, preact_1.h)(ConnectContent_1.ConnectContent, { theme: theme, version: props.version, sessionId: props.sessionId, sessionSecret: props.sessionSecret, linkAPIUrl: props.linkAPIUrl, isConnected: props.isConnected, isParentConnection: props.isParentConnection, chainId: props.chainId, onCancel: props.onCancel })) : null,\n (0, preact_1.h)(TryExtensionContent_1.TryExtensionContent, { theme: theme })))));\n};\nexports.ConnectDialog = ConnectDialog;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LinkFlow = void 0;\nconst preact_1 = require(\"preact\");\nconst ConnectDialog_1 = require(\"../ConnectDialog/ConnectDialog\");\nclass LinkFlow {\n constructor(options) {\n this.connected = false;\n this.chainId = 1;\n this.isOpen = false;\n this.onCancel = null;\n this.root = null;\n // if true, hide QR code in LinkFlow (which happens if no jsonRpcUrl is provided)\n this.connectDisabled = false;\n this.darkMode = options.darkMode;\n this.version = options.version;\n this.sessionId = options.sessionId;\n this.sessionSecret = options.sessionSecret;\n this.linkAPIUrl = options.linkAPIUrl;\n this.isParentConnection = options.isParentConnection;\n }\n attach(el) {\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-link-flow-root';\n el.appendChild(this.root);\n this.render();\n }\n setConnected(v) {\n if (this.connected !== v) {\n this.connected = v;\n this.render();\n }\n }\n setChainId(chainId) {\n if (this.chainId !== chainId) {\n this.chainId = chainId;\n this.render();\n }\n }\n detach() {\n var _a;\n if (!this.root) {\n return;\n }\n (0, preact_1.render)(null, this.root);\n (_a = this.root.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.root);\n }\n setConnectDisabled(connectDisabled) {\n this.connectDisabled = connectDisabled;\n }\n open(options) {\n this.isOpen = true;\n this.onCancel = options.onCancel;\n this.render();\n }\n close() {\n this.isOpen = false;\n this.onCancel = null;\n this.render();\n }\n render() {\n if (!this.root) {\n return;\n }\n (0, preact_1.render)((0, preact_1.h)(ConnectDialog_1.ConnectDialog, { darkMode: this.darkMode, version: this.version, sessionId: this.sessionId, sessionSecret: this.sessionSecret, linkAPIUrl: this.linkAPIUrl, isOpen: this.isOpen, isConnected: this.connected, isParentConnection: this.isParentConnection, chainId: this.chainId, onCancel: this.onCancel, connectDisabled: this.connectDisabled }), this.root);\n }\n}\nexports.LinkFlow = LinkFlow;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}`)();\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SnackbarInstance = exports.SnackbarContainer = exports.Snackbar = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst hooks_1 = require(\"preact/hooks\");\nconst Snackbar_css_1 = __importDefault(require(\"./Snackbar-css\"));\nconst cblogo = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC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hMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=`;\nclass Snackbar {\n constructor(options) {\n this.items = new Map();\n this.nextItemKey = 0;\n this.root = null;\n this.darkMode = options.darkMode;\n }\n attach(el) {\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-snackbar-root';\n el.appendChild(this.root);\n this.render();\n }\n presentItem(itemProps) {\n const key = this.nextItemKey++;\n this.items.set(key, itemProps);\n this.render();\n return () => {\n this.items.delete(key);\n this.render();\n };\n }\n clear() {\n this.items.clear();\n this.render();\n }\n render() {\n if (!this.root) {\n return;\n }\n (0, preact_1.render)((0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(exports.SnackbarContainer, { darkMode: this.darkMode }, Array.from(this.items.entries()).map(([key, itemProps]) => ((0, preact_1.h)(exports.SnackbarInstance, Object.assign({}, itemProps, { key: key })))))), this.root);\n }\n}\nexports.Snackbar = Snackbar;\nconst SnackbarContainer = (props) => ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-container') },\n (0, preact_1.h)(\"style\", null, Snackbar_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar\" }, props.children)));\nexports.SnackbarContainer = SnackbarContainer;\nconst SnackbarInstance = ({ autoExpand, message, menuItems, }) => {\n const [hidden, setHidden] = (0, hooks_1.useState)(true);\n const [expanded, setExpanded] = (0, hooks_1.useState)(autoExpand !== null && autoExpand !== void 0 ? autoExpand : false);\n (0, hooks_1.useEffect)(() => {\n const timers = [\n window.setTimeout(() => {\n setHidden(false);\n }, 1),\n window.setTimeout(() => {\n setExpanded(true);\n }, 10000),\n ];\n return () => {\n timers.forEach(window.clearTimeout);\n };\n });\n const toggleExpanded = () => {\n setExpanded(!expanded);\n };\n return ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance', hidden && '-cbwsdk-snackbar-instance-hidden', expanded && '-cbwsdk-snackbar-instance-expanded') },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-header\", onClick: toggleExpanded },\n (0, preact_1.h)(\"img\", { src: cblogo, class: \"-cbwsdk-snackbar-instance-header-cblogo\" }),\n ' ',\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-header-message\" }, message),\n (0, preact_1.h)(\"div\", { class: \"-gear-container\" },\n !expanded && ((0, preact_1.h)(\"svg\", { width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n (0, preact_1.h)(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"#F5F7F8\" }))),\n (0, preact_1.h)(\"img\", { src: gearIcon, class: \"-gear-icon\", title: \"Expand\" }))),\n menuItems && menuItems.length > 0 && ((0, preact_1.h)(\"div\", { class: \"-cbwsdk-snackbar-instance-menu\" }, menuItems.map((action, i) => ((0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance-menu-item', action.isRed && '-cbwsdk-snackbar-instance-menu-item-is-red'), onClick: action.onClick, key: i },\n (0, preact_1.h)(\"svg\", { width: action.svgWidth, height: action.svgHeight, viewBox: \"0 0 10 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n (0, preact_1.h)(\"path\", { \"fill-rule\": action.defaultFillRule, \"clip-rule\": action.defaultClipRule, d: action.path, fill: \"#AAAAAA\" })),\n (0, preact_1.h)(\"span\", { class: (0, clsx_1.default)('-cbwsdk-snackbar-instance-menu-item-info', action.isRed && '-cbwsdk-snackbar-instance-menu-item-info-is-red') }, action.info))))))));\n};\nexports.SnackbarInstance = SnackbarInstance;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkRelayUI = void 0;\nconst cssReset_1 = require(\"../../../lib/cssReset\");\nconst LinkFlow_1 = require(\"./components/LinkFlow/LinkFlow\");\nconst Snackbar_1 = require(\"./components/Snackbar/Snackbar\");\nclass WalletLinkRelayUI {\n constructor(options) {\n this.standalone = null;\n this.attached = false;\n this.snackbar = new Snackbar_1.Snackbar({\n darkMode: options.darkMode,\n });\n this.linkFlow = new LinkFlow_1.LinkFlow({\n darkMode: options.darkMode,\n version: options.version,\n sessionId: options.session.id,\n sessionSecret: options.session.secret,\n linkAPIUrl: options.linkAPIUrl,\n isParentConnection: false,\n });\n }\n attach() {\n if (this.attached) {\n throw new Error('Coinbase Wallet SDK UI is already attached');\n }\n const el = document.documentElement;\n const container = document.createElement('div');\n container.className = '-cbwsdk-css-reset';\n el.appendChild(container);\n this.linkFlow.attach(container);\n this.snackbar.attach(container);\n this.attached = true;\n (0, cssReset_1.injectCssReset)();\n }\n setConnected(connected) {\n this.linkFlow.setConnected(connected);\n }\n setChainId(chainId) {\n this.linkFlow.setChainId(chainId);\n }\n setConnectDisabled(connectDisabled) {\n this.linkFlow.setConnectDisabled(connectDisabled);\n }\n /* istanbul ignore next */\n addEthereumChain() { } // no-op\n /* istanbul ignore next */\n watchAsset() { } // no-op\n /* istanbul ignore next */\n switchEthereumChain() { } // no-op\n requestEthereumAccounts(options) {\n this.linkFlow.open({ onCancel: options.onCancel });\n }\n hideRequestEthereumAccounts() {\n this.linkFlow.close();\n }\n /* istanbul ignore next */\n signEthereumMessage() { } // no-op\n /* istanbul ignore next */\n signEthereumTransaction() { } // no-op\n /* istanbul ignore next */\n submitEthereumTransaction() { } // no-op\n /* istanbul ignore next */\n ethereumAddressFromSignedMessage() { } // no-op\n showConnecting(options) {\n let snackbarProps;\n if (options.isUnlinkedErrorState) {\n snackbarProps = {\n autoExpand: true,\n message: 'Connection lost',\n menuItems: [\n {\n isRed: false,\n info: 'Reset connection',\n svgWidth: '10',\n svgHeight: '11',\n path: 'M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z',\n defaultFillRule: 'evenodd',\n defaultClipRule: 'evenodd',\n onClick: options.onResetConnection,\n },\n ],\n };\n }\n else {\n snackbarProps = {\n message: 'Confirm on phone',\n menuItems: [\n {\n isRed: true,\n info: 'Cancel transaction',\n svgWidth: '11',\n svgHeight: '11',\n path: 'M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z',\n defaultFillRule: 'inherit',\n defaultClipRule: 'inherit',\n onClick: options.onCancel,\n },\n {\n isRed: false,\n info: 'Reset connection',\n svgWidth: '10',\n svgHeight: '11',\n path: 'M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z',\n defaultFillRule: 'evenodd',\n defaultClipRule: 'evenodd',\n onClick: options.onResetConnection,\n },\n ],\n };\n }\n return this.snackbar.presentItem(snackbarProps);\n }\n /* istanbul ignore next */\n reloadUI() {\n document.location.reload();\n }\n /* istanbul ignore next */\n inlineAccountsResponse() {\n return false;\n }\n /* istanbul ignore next */\n inlineAddEthereumChain() {\n return false;\n }\n /* istanbul ignore next */\n inlineWatchAsset() {\n return false;\n }\n /* istanbul ignore next */\n inlineSwitchEthereumChain() {\n return false;\n }\n /* istanbul ignore next */\n setStandalone(status) {\n this.standalone = status;\n }\n /* istanbul ignore next */\n isStandalone() {\n var _a;\n return (_a = this.standalone) !== null && _a !== void 0 ? _a : false;\n }\n}\nexports.WalletLinkRelayUI = WalletLinkRelayUI;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WalletLinkRelay = void 0;\nconst error_1 = require(\"../../core/error\");\nconst type_1 = require(\"../../core/type\");\nconst util_1 = require(\"../../core/util\");\nconst DiagnosticLogger_1 = require(\"../../provider/DiagnosticLogger\");\nconst RelayAbstract_1 = require(\"../RelayAbstract\");\nconst Session_1 = require(\"../Session\");\nconst WalletLinkConnection_1 = require(\"./connection/WalletLinkConnection\");\nconst Web3Response_1 = require(\"./type/Web3Response\");\nconst WalletLinkRelayUI_1 = require(\"./ui/WalletLinkRelayUI\");\nclass WalletLinkRelay extends RelayAbstract_1.RelayAbstract {\n constructor(options) {\n var _a;\n super();\n this.accountsCallback = null;\n this.chainCallbackParams = { chainId: '', jsonRpcUrl: '' }; // to implement distinctUntilChanged\n this.chainCallback = null;\n this.dappDefaultChain = 1;\n this.appName = '';\n this.appLogoUrl = null;\n this.linkedUpdated = (linked) => {\n var _a;\n this.isLinked = linked;\n const cachedAddresses = this.storage.getItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY);\n if (linked) {\n // Only set linked session variable one way\n this.session.linked = linked;\n }\n this.isUnlinkedErrorState = false;\n if (cachedAddresses) {\n const addresses = cachedAddresses.split(' ');\n const wasConnectedViaStandalone = this.storage.getItem('IsStandaloneSigning') === 'true';\n if (addresses[0] !== '' && !linked && this.session.linked && !wasConnectedViaStandalone) {\n this.isUnlinkedErrorState = true;\n const sessionIdHash = this.getSessionIdHash();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.UNLINKED_ERROR_STATE, {\n sessionIdHash,\n });\n }\n }\n };\n this.metadataUpdated = (key, value) => {\n this.storage.setItem(key, value);\n };\n this.chainUpdated = (chainId, jsonRpcUrl) => {\n if (this.chainCallbackParams.chainId === chainId &&\n this.chainCallbackParams.jsonRpcUrl === jsonRpcUrl) {\n return;\n }\n this.chainCallbackParams = {\n chainId,\n jsonRpcUrl,\n };\n if (this.chainCallback) {\n this.chainCallback(chainId, jsonRpcUrl);\n }\n };\n this.accountUpdated = (selectedAddress) => {\n if (this.accountsCallback) {\n this.accountsCallback([selectedAddress]);\n }\n if (WalletLinkRelay.accountRequestCallbackIds.size > 0) {\n // We get the ethereum address from the metadata. If for whatever\n // reason we don't get a response via an explicit web3 message\n // we can still fulfill the eip1102 request.\n Array.from(WalletLinkRelay.accountRequestCallbackIds.values()).forEach((id) => {\n const message = {\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'requestEthereumAccounts',\n result: [selectedAddress],\n },\n };\n this.invokeCallback(Object.assign(Object.assign({}, message), { id }));\n });\n WalletLinkRelay.accountRequestCallbackIds.clear();\n }\n };\n this.connectedUpdated = (connected) => {\n this.ui.setConnected(connected);\n };\n this.resetAndReload = this.resetAndReload.bind(this);\n this.linkAPIUrl = options.linkAPIUrl;\n this.storage = options.storage;\n this.options = options;\n const { session, ui, connection } = this.subscribe();\n this._session = session;\n this.connection = connection;\n this.relayEventManager = options.relayEventManager;\n this.diagnostic = options.diagnosticLogger;\n this._reloadOnDisconnect = (_a = options.reloadOnDisconnect) !== null && _a !== void 0 ? _a : true;\n this.ui = ui;\n }\n subscribe() {\n const session = Session_1.Session.load(this.storage) || new Session_1.Session(this.storage).save();\n const { linkAPIUrl, diagnostic } = this;\n const connection = new WalletLinkConnection_1.WalletLinkConnection({\n session,\n linkAPIUrl,\n diagnostic,\n listener: this,\n });\n const { version, darkMode } = this.options;\n const ui = this.options.uiConstructor({\n linkAPIUrl,\n version,\n darkMode,\n session,\n });\n connection.connect();\n return { session, ui, connection };\n }\n attachUI() {\n this.ui.attach();\n }\n resetAndReload() {\n Promise.race([\n this.connection.setSessionMetadata('__destroyed', '1'),\n new Promise((resolve) => setTimeout(() => resolve(null), 1000)),\n ])\n .then(() => {\n var _a, _b;\n const isStandalone = this.ui.isStandalone();\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.SESSION_STATE_CHANGE, {\n method: 'relay::resetAndReload',\n sessionMetadataChange: '__destroyed, 1',\n sessionIdHash: this.getSessionIdHash(),\n });\n this.connection.destroy();\n /**\n * Only clear storage if the session id we have in memory matches the one on disk\n * Otherwise, in the case where we have 2 tabs, another tab might have cleared\n * storage already. In that case if we clear storage again, the user will be in\n * a state where the first tab allows the user to connect but the session that\n * was used isn't persisted. This leaves the user in a state where they aren't\n * connected to the mobile app.\n */\n const storedSession = Session_1.Session.load(this.storage);\n if ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) === this._session.id) {\n this.storage.clear();\n }\n else if (storedSession) {\n (_b = this.diagnostic) === null || _b === void 0 ? void 0 : _b.log(DiagnosticLogger_1.EVENTS.SKIPPED_CLEARING_SESSION, {\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: Session_1.Session.hash(storedSession.id),\n });\n }\n if (this._reloadOnDisconnect) {\n this.ui.reloadUI();\n return;\n }\n if (this.accountsCallback) {\n this.accountsCallback([], true);\n }\n const { session, ui, connection } = this.subscribe();\n this._session = session;\n this.connection = connection;\n this.ui = ui;\n if (isStandalone && this.ui.setStandalone)\n this.ui.setStandalone(true);\n this.attachUI();\n })\n .catch((err) => {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.FAILURE, {\n method: 'relay::resetAndReload',\n message: `failed to reset and reload with ${err}`,\n sessionIdHash: this.getSessionIdHash(),\n });\n });\n }\n setAppInfo(appName, appLogoUrl) {\n this.appName = appName;\n this.appLogoUrl = appLogoUrl;\n }\n getStorageItem(key) {\n return this.storage.getItem(key);\n }\n get session() {\n return this._session;\n }\n setStorageItem(key, value) {\n this.storage.setItem(key, value);\n }\n signEthereumMessage(message, address, addPrefix, typedDataJson) {\n return this.sendRequest({\n method: 'signEthereumMessage',\n params: {\n message: (0, util_1.hexStringFromBuffer)(message, true),\n address,\n addPrefix,\n typedDataJson: typedDataJson || null,\n },\n });\n }\n ethereumAddressFromSignedMessage(message, signature, addPrefix) {\n return this.sendRequest({\n method: 'ethereumAddressFromSignedMessage',\n params: {\n message: (0, util_1.hexStringFromBuffer)(message, true),\n signature: (0, util_1.hexStringFromBuffer)(signature, true),\n addPrefix,\n },\n });\n }\n signEthereumTransaction(params) {\n return this.sendRequest({\n method: 'signEthereumTransaction',\n params: {\n fromAddress: params.fromAddress,\n toAddress: params.toAddress,\n weiValue: (0, util_1.bigIntStringFromBN)(params.weiValue),\n data: (0, util_1.hexStringFromBuffer)(params.data, true),\n nonce: params.nonce,\n gasPriceInWei: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxFeePerGas: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxPriorityFeePerGas: params.gasPriceInWei\n ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei)\n : null,\n gasLimit: params.gasLimit ? (0, util_1.bigIntStringFromBN)(params.gasLimit) : null,\n chainId: params.chainId,\n shouldSubmit: false,\n },\n });\n }\n signAndSubmitEthereumTransaction(params) {\n return this.sendRequest({\n method: 'signEthereumTransaction',\n params: {\n fromAddress: params.fromAddress,\n toAddress: params.toAddress,\n weiValue: (0, util_1.bigIntStringFromBN)(params.weiValue),\n data: (0, util_1.hexStringFromBuffer)(params.data, true),\n nonce: params.nonce,\n gasPriceInWei: params.gasPriceInWei ? (0, util_1.bigIntStringFromBN)(params.gasPriceInWei) : null,\n maxFeePerGas: params.maxFeePerGas ? (0, util_1.bigIntStringFromBN)(params.maxFeePerGas) : null,\n maxPriorityFeePerGas: params.maxPriorityFeePerGas\n ? (0, util_1.bigIntStringFromBN)(params.maxPriorityFeePerGas)\n : null,\n gasLimit: params.gasLimit ? (0, util_1.bigIntStringFromBN)(params.gasLimit) : null,\n chainId: params.chainId,\n shouldSubmit: true,\n },\n });\n }\n submitEthereumTransaction(signedTransaction, chainId) {\n return this.sendRequest({\n method: 'submitEthereumTransaction',\n params: {\n signedTransaction: (0, util_1.hexStringFromBuffer)(signedTransaction, true),\n chainId,\n },\n });\n }\n scanQRCode(regExp) {\n return this.sendRequest({\n method: 'scanQRCode',\n params: {\n regExp,\n },\n });\n }\n getQRCodeUrl() {\n return (0, util_1.createQrUrl)(this._session.id, this._session.secret, this.linkAPIUrl, false, this.options.version, this.dappDefaultChain);\n }\n genericRequest(data, action) {\n return this.sendRequest({\n method: 'generic',\n params: {\n action,\n data,\n },\n });\n }\n sendGenericMessage(request) {\n return this.sendRequest(request);\n }\n sendRequest(request) {\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n const promise = new Promise((resolve, reject) => {\n if (!this.ui.isStandalone()) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n if (this.ui.isStandalone()) {\n this.sendRequestStandalone(id, request);\n }\n else {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n setConnectDisabled(disabled) {\n this.ui.setConnectDisabled(disabled);\n }\n setAccountsCallback(accountsCallback) {\n this.accountsCallback = accountsCallback;\n }\n setChainCallback(chainCallback) {\n this.chainCallback = chainCallback;\n }\n setDappDefaultChainCallback(chainId) {\n this.dappDefaultChain = chainId;\n if (this.ui instanceof WalletLinkRelayUI_1.WalletLinkRelayUI) {\n this.ui.setChainId(chainId);\n }\n }\n publishWeb3RequestEvent(id, request) {\n var _a;\n const message = { type: 'WEB3_REQUEST', id, request };\n const storedSession = Session_1.Session.load(this.storage);\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_REQUEST, {\n eventId: message.id,\n method: `relay::${request.method}`,\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: storedSession ? Session_1.Session.hash(storedSession.id) : '',\n isSessionMismatched: ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) !== this._session.id).toString(),\n });\n this.publishEvent('Web3Request', message, true)\n .then((_) => {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_REQUEST_PUBLISHED, {\n eventId: message.id,\n method: `relay::${request.method}`,\n sessionIdHash: this.getSessionIdHash(),\n storedSessionIdHash: storedSession ? Session_1.Session.hash(storedSession.id) : '',\n isSessionMismatched: ((storedSession === null || storedSession === void 0 ? void 0 : storedSession.id) !== this._session.id).toString(),\n });\n })\n .catch((err) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id: message.id,\n response: {\n method: request.method,\n errorMessage: err.message,\n },\n });\n });\n }\n publishWeb3RequestCanceledEvent(id) {\n const message = {\n type: 'WEB3_REQUEST_CANCELED',\n id,\n };\n this.publishEvent('Web3RequestCanceled', message, false).then();\n }\n publishEvent(event, message, callWebhook) {\n return this.connection.publishEvent(event, message, callWebhook);\n }\n handleWeb3ResponseMessage(message) {\n var _a;\n const { response } = message;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.WEB3_RESPONSE, {\n eventId: message.id,\n method: `relay::${response.method}`,\n sessionIdHash: this.getSessionIdHash(),\n });\n if (response.method === 'requestEthereumAccounts') {\n WalletLinkRelay.accountRequestCallbackIds.forEach((id) => this.invokeCallback(Object.assign(Object.assign({}, message), { id })));\n WalletLinkRelay.accountRequestCallbackIds.clear();\n return;\n }\n this.invokeCallback(message);\n }\n handleErrorResponse(id, method, error, errorCode) {\n var _a;\n const errorMessage = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : (0, error_1.getMessageFromCode)(errorCode);\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method,\n errorMessage,\n errorCode,\n },\n });\n }\n invokeCallback(message) {\n const callback = this.relayEventManager.callbacks.get(message.id);\n if (callback) {\n callback(message.response);\n this.relayEventManager.callbacks.delete(message.id);\n }\n }\n requestEthereumAccounts() {\n const request = {\n method: 'requestEthereumAccounts',\n params: {\n appName: this.appName,\n appLogoUrl: this.appLogoUrl || null,\n },\n };\n const hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n this.ui.hideRequestEthereumAccounts();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n if (this.ui.inlineAccountsResponse()) {\n const onAccounts = (accounts) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'requestEthereumAccounts', result: accounts },\n });\n };\n this.ui.requestEthereumAccounts({\n onCancel: cancel,\n onAccounts,\n });\n }\n else {\n // Error if user closes TryExtensionLinkDialog without connecting\n const err = error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n this.ui.requestEthereumAccounts({\n onCancel: () => cancel(err),\n });\n }\n WalletLinkRelay.accountRequestCallbackIds.add(id);\n if (!this.ui.inlineAccountsResponse() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n selectProvider(providerOptions) {\n const request = {\n method: 'selectProvider',\n params: {\n providerOptions,\n },\n };\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'selectProvider', result: type_1.ProviderType.Unselected },\n });\n };\n const approve = (selectedProviderKey) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: { method: 'selectProvider', result: selectedProviderKey },\n });\n };\n if (this.ui.selectProvider)\n this.ui.selectProvider({\n onApprove: approve,\n onCancel: _cancel,\n providerOptions,\n });\n });\n return { cancel, promise };\n }\n watchAsset(type, address, symbol, decimals, image, chainId) {\n const request = {\n method: 'watchAsset',\n params: {\n type,\n options: {\n address,\n symbol,\n decimals,\n image,\n },\n chainId,\n },\n };\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n if (!this.ui.inlineWatchAsset()) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'watchAsset',\n result: false,\n },\n });\n };\n const approve = () => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'watchAsset',\n result: true,\n },\n });\n };\n if (this.ui.inlineWatchAsset()) {\n this.ui.watchAsset({\n onApprove: approve,\n onCancel: _cancel,\n type,\n address,\n symbol,\n decimals,\n image,\n chainId,\n });\n }\n if (!this.ui.inlineWatchAsset() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { cancel, promise };\n }\n addEthereumChain(chainId, rpcUrls, iconUrls, blockExplorerUrls, chainName, nativeCurrency) {\n const request = {\n method: 'addEthereumChain',\n params: {\n chainId,\n rpcUrls,\n blockExplorerUrls,\n chainName,\n iconUrls,\n nativeCurrency,\n },\n };\n let hideSnackbarItem = null;\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n };\n if (!this.ui.inlineAddEthereumChain(chainId)) {\n hideSnackbarItem = this.ui.showConnecting({\n isUnlinkedErrorState: this.isUnlinkedErrorState,\n onCancel: cancel,\n onResetConnection: this.resetAndReload, // eslint-disable-line @typescript-eslint/unbound-method\n });\n }\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n hideSnackbarItem === null || hideSnackbarItem === void 0 ? void 0 : hideSnackbarItem();\n if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (_error) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'addEthereumChain',\n result: {\n isApproved: false,\n rpcUrl: '',\n },\n },\n });\n };\n const approve = (rpcUrl) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'addEthereumChain',\n result: {\n isApproved: true,\n rpcUrl,\n },\n },\n });\n };\n if (this.ui.inlineAddEthereumChain(chainId)) {\n this.ui.addEthereumChain({\n onCancel: _cancel,\n onApprove: approve,\n chainId: request.params.chainId,\n rpcUrls: request.params.rpcUrls,\n blockExplorerUrls: request.params.blockExplorerUrls,\n chainName: request.params.chainName,\n iconUrls: request.params.iconUrls,\n nativeCurrency: request.params.nativeCurrency,\n });\n }\n if (!this.ui.inlineAddEthereumChain(chainId) && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n switchEthereumChain(chainId, address) {\n const request = {\n method: 'switchEthereumChain',\n params: Object.assign({ chainId }, { address }),\n };\n const id = (0, util_1.randomBytesHex)(8);\n const cancel = (error) => {\n this.publishWeb3RequestCanceledEvent(id);\n this.handleErrorResponse(id, request.method, error);\n };\n const promise = new Promise((resolve, reject) => {\n this.relayEventManager.callbacks.set(id, (response) => {\n if ((0, Web3Response_1.isErrorResponse)(response) && response.errorCode) {\n return reject(error_1.standardErrors.provider.custom({\n code: response.errorCode,\n message: `Unrecognized chain ID. Try adding the chain using addEthereumChain first.`,\n }));\n }\n else if ((0, Web3Response_1.isErrorResponse)(response)) {\n return reject(new Error(response.errorMessage));\n }\n resolve(response);\n });\n const _cancel = (error) => {\n var _a;\n if (error) {\n // backward compatibility\n const errorCode = (_a = (0, error_1.getErrorCode)(error)) !== null && _a !== void 0 ? _a : error_1.standardErrorCodes.provider.unsupportedChain;\n this.handleErrorResponse(id, 'switchEthereumChain', error instanceof Error ? error : error_1.standardErrors.provider.unsupportedChain(chainId), errorCode);\n }\n else {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'switchEthereumChain',\n result: {\n isApproved: false,\n rpcUrl: '',\n },\n },\n });\n }\n };\n const approve = (rpcUrl) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response: {\n method: 'switchEthereumChain',\n result: {\n isApproved: true,\n rpcUrl,\n },\n },\n });\n };\n this.ui.switchEthereumChain({\n onCancel: _cancel,\n onApprove: approve,\n chainId: request.params.chainId,\n address: request.params.address,\n });\n if (!this.ui.inlineSwitchEthereumChain() && !this.ui.isStandalone()) {\n this.publishWeb3RequestEvent(id, request);\n }\n });\n return { promise, cancel };\n }\n inlineAddEthereumChain(chainId) {\n return this.ui.inlineAddEthereumChain(chainId);\n }\n getSessionIdHash() {\n return Session_1.Session.hash(this._session.id);\n }\n sendRequestStandalone(id, request) {\n const _cancel = (error) => {\n this.handleErrorResponse(id, request.method, error);\n };\n const onSuccess = (response) => {\n this.handleWeb3ResponseMessage({\n type: 'WEB3_RESPONSE',\n id,\n response,\n });\n };\n switch (request.method) {\n case 'signEthereumMessage':\n this.ui.signEthereumMessage({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'signEthereumTransaction':\n this.ui.signEthereumTransaction({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'submitEthereumTransaction':\n this.ui.submitEthereumTransaction({\n request,\n onSuccess,\n onCancel: _cancel,\n });\n break;\n case 'ethereumAddressFromSignedMessage':\n this.ui.ethereumAddressFromSignedMessage({\n request,\n onSuccess,\n });\n break;\n default:\n _cancel();\n break;\n }\n }\n}\nexports.WalletLinkRelay = WalletLinkRelay;\nWalletLinkRelay.accountRequestCallbackIds = new Set();\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Snackbar\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (() => `.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}`)();\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RedirectDialog = void 0;\nconst clsx_1 = __importDefault(require(\"clsx\"));\nconst preact_1 = require(\"preact\");\nconst cssReset_1 = require(\"../../../../../lib/cssReset\");\nconst Snackbar_1 = require(\"../Snackbar\");\nconst RedirectDialog_css_1 = __importDefault(require(\"./RedirectDialog-css\"));\nclass RedirectDialog {\n constructor() {\n this.root = null;\n }\n attach() {\n const el = document.documentElement;\n this.root = document.createElement('div');\n this.root.className = '-cbwsdk-css-reset';\n el.appendChild(this.root);\n (0, cssReset_1.injectCssReset)();\n }\n present(props) {\n this.render(props);\n }\n clear() {\n this.render(null);\n }\n render(props) {\n if (!this.root)\n return;\n (0, preact_1.render)(null, this.root);\n if (!props)\n return;\n (0, preact_1.render)((0, preact_1.h)(RedirectDialogContent, Object.assign({}, props, { onDismiss: () => {\n this.clear();\n } })), this.root);\n }\n}\nexports.RedirectDialog = RedirectDialog;\nconst RedirectDialogContent = ({ title, buttonText, darkMode, onButtonClick, onDismiss }) => {\n const theme = darkMode ? 'dark' : 'light';\n return ((0, preact_1.h)(Snackbar_1.SnackbarContainer, { darkMode: darkMode },\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-redirect-dialog\" },\n (0, preact_1.h)(\"style\", null, RedirectDialog_css_1.default),\n (0, preact_1.h)(\"div\", { class: \"-cbwsdk-redirect-dialog-backdrop\", onClick: onDismiss }),\n (0, preact_1.h)(\"div\", { class: (0, clsx_1.default)('-cbwsdk-redirect-dialog-box', theme) },\n (0, preact_1.h)(\"p\", null, title),\n (0, preact_1.h)(\"button\", { onClick: onButtonClick }, buttonText)))));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MobileRelayUI = void 0;\nconst RedirectDialog_1 = require(\"../walletlink/ui/components/RedirectDialog/RedirectDialog\");\n// TODO: Implement & present in-page wallet picker instead of navigating to www.coinbase.com/connect-dapp\nclass MobileRelayUI {\n constructor(options) {\n this.attached = false;\n this.darkMode = false;\n this.openedWindow = null;\n this.redirectDialog = new RedirectDialog_1.RedirectDialog();\n this.darkMode = options.darkMode;\n }\n attach() {\n if (this.attached) {\n throw new Error('Coinbase Wallet SDK UI is already attached');\n }\n this.redirectDialog.attach();\n this.attached = true;\n }\n setConnected(_connected) { } // no-op\n closeOpenedWindow() {\n var _a;\n (_a = this.openedWindow) === null || _a === void 0 ? void 0 : _a.close();\n this.openedWindow = null;\n }\n redirectToCoinbaseWallet(walletLinkUrl) {\n const url = new URL('https://go.cb-w.com/walletlink');\n url.searchParams.append('redirect_url', window.location.href);\n if (walletLinkUrl) {\n url.searchParams.append('wl_url', walletLinkUrl);\n }\n this.openedWindow = window.open(url.href, 'cbw-opener');\n if (this.openedWindow) {\n setTimeout(() => this.closeOpenedWindow(), 5000);\n }\n }\n openCoinbaseWalletDeeplink(walletLinkUrl) {\n this.redirectDialog.present({\n title: 'Redirecting to Coinbase Wallet...',\n buttonText: 'Open',\n darkMode: this.darkMode,\n onButtonClick: () => {\n this.redirectToCoinbaseWallet(walletLinkUrl);\n },\n });\n setTimeout(() => {\n this.redirectToCoinbaseWallet(walletLinkUrl);\n }, 99);\n }\n showConnecting(_options) {\n // it uses the return callback to clear the dialog\n return () => {\n this.closeOpenedWindow();\n this.redirectDialog.clear();\n };\n }\n hideRequestEthereumAccounts() {\n this.closeOpenedWindow();\n this.redirectDialog.clear();\n }\n // -- Methods below are not needed for mobile\n requestEthereumAccounts() { } // no-op\n addEthereumChain() { } // no-op\n watchAsset() { } // no-op\n selectProvider() { } // no-op\n switchEthereumChain() { } // no-op\n signEthereumMessage() { } // no-op\n signEthereumTransaction() { } // no-op\n submitEthereumTransaction() { } // no-op\n ethereumAddressFromSignedMessage() { } // no-op\n reloadUI() { } // no-op\n setStandalone() { } // no-op\n setConnectDisabled() { } // no-op\n inlineAccountsResponse() {\n return false;\n }\n inlineAddEthereumChain() {\n return false;\n }\n inlineWatchAsset() {\n return false;\n }\n inlineSwitchEthereumChain() {\n return false;\n }\n isStandalone() {\n return false;\n }\n}\nexports.MobileRelayUI = MobileRelayUI;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MobileRelay = void 0;\nconst util_1 = require(\"../../core/util\");\nconst WalletLinkRelay_1 = require(\"../walletlink/WalletLinkRelay\");\nconst MobileRelayUI_1 = require(\"./MobileRelayUI\");\nclass MobileRelay extends WalletLinkRelay_1.WalletLinkRelay {\n constructor(options) {\n var _a;\n super(options);\n this._enableMobileWalletLink = (_a = options.enableMobileWalletLink) !== null && _a !== void 0 ? _a : false;\n }\n // override\n requestEthereumAccounts() {\n if (this._enableMobileWalletLink) {\n return super.requestEthereumAccounts();\n }\n // TODO: Implement & present in-page wallet picker instead of navigating to www.coinbase.com/connect-dapp\n return {\n promise: new Promise(() => {\n const location = (0, util_1.getLocation)();\n location.href = `https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(location.href)}`;\n }),\n cancel: () => { },\n };\n }\n // override\n publishWeb3RequestEvent(id, request) {\n super.publishWeb3RequestEvent(id, request);\n if (!(this._enableMobileWalletLink && this.ui instanceof MobileRelayUI_1.MobileRelayUI))\n return;\n let navigatedToCBW = false;\n // For mobile relay requests, open the Coinbase Wallet app\n switch (request.method) {\n case 'requestEthereumAccounts':\n case 'connectAndSignIn':\n navigatedToCBW = true;\n this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());\n break;\n case 'switchEthereumChain':\n // switchEthereumChain doesn't need to open the app\n return;\n default:\n navigatedToCBW = true;\n this.ui.openCoinbaseWalletDeeplink();\n break;\n }\n // If the user navigated to the Coinbase Wallet app, then we need to check\n // for unseen events once the user returns to the browser\n if (navigatedToCBW) {\n window.addEventListener('blur', () => {\n window.addEventListener('focus', () => {\n this.connection.checkUnseenEvents();\n }, { once: true });\n }, { once: true });\n }\n }\n // override\n handleWeb3ResponseMessage(message) {\n super.handleWeb3ResponseMessage(message);\n if (this._enableMobileWalletLink && this.ui instanceof MobileRelayUI_1.MobileRelayUI) {\n this.ui.closeOpenedWindow();\n }\n }\n connectAndSignIn(params) {\n if (!this._enableMobileWalletLink) {\n throw new Error('connectAndSignIn is supported only when enableMobileWalletLink is on');\n }\n return this.sendRequest({\n method: 'connectAndSignIn',\n params: {\n appName: this.appName,\n appLogoUrl: this.appLogoUrl,\n domain: window.location.hostname,\n aud: window.location.href,\n version: '1',\n type: 'eip4361',\n nonce: params.nonce,\n iat: new Date().toISOString(),\n chainId: `eip155:${this.dappDefaultChain}`,\n statement: params.statement,\n resources: params.resources,\n },\n });\n }\n}\nexports.MobileRelay = MobileRelay;\n","module.exports = require('events').EventEmitter;\n","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('util'),\n inspect = _require2.inspect;\nvar custom = inspect && inspect.custom || 'inspect';\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\nmodule.exports = /*#__PURE__*/function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) ret += s + p.data;\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread(_objectSpread({}, options), {}, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n}();","'use strict';\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n}\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n\n // Default value\n return state.objectMode ? 16 : 16 * 1024;\n}\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nrequire('inherits')(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'finish' (and potentially 'end')\n this.autoDestroy = !!options.autoDestroy;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n // TODO: defer error events consistently everywhere, not just the cb\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n return true;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state) || stream.destroyed;\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n // reuse the free corkReq.\n state.corkedRequestsFree.next = corkReq;\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar _Object$setPrototypeO;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar finished = require('./end-of-stream');\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n if (resolve !== null) {\n var data = iter[kStream].read();\n // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n }\n\n // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject];\n // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve = iterator[kLastResolve];\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\nmodule.exports = createReadableStreamAsyncIterator;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\nvar Buffer = require('buffer').Buffer;\nvar OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\nvar debugUtil = require('util');\nvar debug;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/buffer_list');\nvar destroyImpl = require('./internal/streams/destroy');\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n\n// Lazy loaded to improve the startup performance.\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\nrequire('inherits')(Readable, Stream);\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n\n // Should close be emitted on destroy. Defaults to true.\n this.emitClose = options.emitClose !== false;\n\n // Should .destroy() be called after 'end' (and potentially 'finish')\n this.autoDestroy = !!options.autoDestroy;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex);\n\n // legacy\n this.readable = true;\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n Stream.call(this);\n}\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n }\n\n // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n return er;\n}\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n // If setEncoding(null), decoder.encoding equals utf8\n this._readableState.encoding = this._readableState.decoder.encoding;\n\n // Iterate over current buffer to convert already stored Buffers:\n var p = this._readableState.buffer.head;\n var content = '';\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n};\n\n// Don't raise the hwm > 1GB\nvar MAX_HWM = 0x40000000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n if (ret === null) {\n state.needReadable = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\n }\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n if (!state.emittedReadable) {\n state.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n }\n\n // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n if (ret === false) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', state.awaitDrain);\n state.awaitDrain++;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n return dest;\n};\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, {\n hasUnpiped: false\n });\n return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0;\n\n // Try start flowing on next tick if stream isn't explicitly paused\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n return res;\n};\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true;\n\n // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n state.paused = false;\n return this;\n};\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n if (!state.reading) {\n stream.read(0);\n }\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n this._readableState.paused = true;\n return this;\n};\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null);\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n};\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n return createReadableStreamAsyncIterator(this);\n };\n}\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n});\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length);\n\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n return from(Readable, iterable, opts);\n };\n}\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\nvar Duplex = require('./_stream_duplex');\nrequire('inherits')(Transform, Duplex);\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\nfunction prefinish() {\n var _this = this;\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null)\n // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\nvar Transform = require('./_stream_transform');\nrequire('inherits')(PassThrough, Transform);\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n'use strict';\n\nvar eos;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true;\n\n // request.destroy just do .end - .abort is what we want\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\nfunction call(fn) {\n fn();\n}\nfunction pipe(from, to) {\n return from.pipe(to);\n}\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\nmodule.exports = pipeline;","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","const { Transform } = require('readable-stream')\n\nmodule.exports = (KeccakState) => class Keccak extends Transform {\n constructor (rate, capacity, delimitedSuffix, hashBitLength, options) {\n super(options)\n\n this._rate = rate\n this._capacity = capacity\n this._delimitedSuffix = delimitedSuffix\n this._hashBitLength = hashBitLength\n this._options = options\n\n this._state = new KeccakState()\n this._state.initialize(rate, capacity)\n this._finalized = false\n }\n\n _transform (chunk, encoding, callback) {\n let error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n _flush (callback) {\n let error = null\n try {\n this.push(this.digest())\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n update (data, encoding) {\n if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')\n if (this._finalized) throw new Error('Digest already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n this._state.absorb(data)\n\n return this\n }\n\n digest (encoding) {\n if (this._finalized) throw new Error('Digest already called')\n this._finalized = true\n\n if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)\n let digest = this._state.squeeze(this._hashBitLength / 8)\n if (encoding !== undefined) digest = digest.toString(encoding)\n\n this._resetState()\n\n return digest\n }\n\n // remove result from memory\n _resetState () {\n this._state.initialize(this._rate, this._capacity)\n return this\n }\n\n // because sometimes we need hash right now and little later\n _clone () {\n const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)\n this._state.copy(clone._state)\n clone._finalized = this._finalized\n\n return clone\n }\n}\n","const { Transform } = require('readable-stream')\n\nmodule.exports = (KeccakState) => class Shake extends Transform {\n constructor (rate, capacity, delimitedSuffix, options) {\n super(options)\n\n this._rate = rate\n this._capacity = capacity\n this._delimitedSuffix = delimitedSuffix\n this._options = options\n\n this._state = new KeccakState()\n this._state.initialize(rate, capacity)\n this._finalized = false\n }\n\n _transform (chunk, encoding, callback) {\n let error = null\n try {\n this.update(chunk, encoding)\n } catch (err) {\n error = err\n }\n\n callback(error)\n }\n\n _flush () {}\n\n _read (size) {\n this.push(this.squeeze(size))\n }\n\n update (data, encoding) {\n if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')\n if (this._finalized) throw new Error('Squeeze already called')\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)\n\n this._state.absorb(data)\n\n return this\n }\n\n squeeze (dataByteLength, encoding) {\n if (!this._finalized) {\n this._finalized = true\n this._state.absorbLastFewBits(this._delimitedSuffix)\n }\n\n let data = this._state.squeeze(dataByteLength)\n if (encoding !== undefined) data = data.toString(encoding)\n\n return data\n }\n\n _resetState () {\n this._state.initialize(this._rate, this._capacity)\n return this\n }\n\n _clone () {\n const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)\n this._state.copy(clone._state)\n clone._finalized = this._finalized\n\n return clone\n }\n}\n","const createKeccak = require('./keccak')\nconst createShake = require('./shake')\n\nmodule.exports = function (KeccakState) {\n const Keccak = createKeccak(KeccakState)\n const Shake = createShake(KeccakState)\n\n return function (algorithm, options) {\n const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm\n switch (hash) {\n case 'keccak224': return new Keccak(1152, 448, null, 224, options)\n case 'keccak256': return new Keccak(1088, 512, null, 256, options)\n case 'keccak384': return new Keccak(832, 768, null, 384, options)\n case 'keccak512': return new Keccak(576, 1024, null, 512, options)\n\n case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)\n case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)\n case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)\n case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)\n\n case 'shake128': return new Shake(1344, 256, 0x1f, options)\n case 'shake256': return new Shake(1088, 512, 0x1f, options)\n\n default: throw new Error('Invald algorithm: ' + algorithm)\n }\n }\n}\n","const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]\n\nexports.p1600 = function (s) {\n for (let round = 0; round < 24; ++round) {\n // theta\n const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]\n const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]\n const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]\n const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]\n const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]\n const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]\n const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]\n const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]\n const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]\n const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]\n\n let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)\n let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)\n const t1slo0 = s[0] ^ lo\n const t1shi0 = s[1] ^ hi\n const t1slo5 = s[10] ^ lo\n const t1shi5 = s[11] ^ hi\n const t1slo10 = s[20] ^ lo\n const t1shi10 = s[21] ^ hi\n const t1slo15 = s[30] ^ lo\n const t1shi15 = s[31] ^ hi\n const t1slo20 = s[40] ^ lo\n const t1shi20 = s[41] ^ hi\n lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)\n hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)\n const t1slo1 = s[2] ^ lo\n const t1shi1 = s[3] ^ hi\n const t1slo6 = s[12] ^ lo\n const t1shi6 = s[13] ^ hi\n const t1slo11 = s[22] ^ lo\n const t1shi11 = s[23] ^ hi\n const t1slo16 = s[32] ^ lo\n const t1shi16 = s[33] ^ hi\n const t1slo21 = s[42] ^ lo\n const t1shi21 = s[43] ^ hi\n lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)\n hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)\n const t1slo2 = s[4] ^ lo\n const t1shi2 = s[5] ^ hi\n const t1slo7 = s[14] ^ lo\n const t1shi7 = s[15] ^ hi\n const t1slo12 = s[24] ^ lo\n const t1shi12 = s[25] ^ hi\n const t1slo17 = s[34] ^ lo\n const t1shi17 = s[35] ^ hi\n const t1slo22 = s[44] ^ lo\n const t1shi22 = s[45] ^ hi\n lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)\n hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)\n const t1slo3 = s[6] ^ lo\n const t1shi3 = s[7] ^ hi\n const t1slo8 = s[16] ^ lo\n const t1shi8 = s[17] ^ hi\n const t1slo13 = s[26] ^ lo\n const t1shi13 = s[27] ^ hi\n const t1slo18 = s[36] ^ lo\n const t1shi18 = s[37] ^ hi\n const t1slo23 = s[46] ^ lo\n const t1shi23 = s[47] ^ hi\n lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)\n hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)\n const t1slo4 = s[8] ^ lo\n const t1shi4 = s[9] ^ hi\n const t1slo9 = s[18] ^ lo\n const t1shi9 = s[19] ^ hi\n const t1slo14 = s[28] ^ lo\n const t1shi14 = s[29] ^ hi\n const t1slo19 = s[38] ^ lo\n const t1shi19 = s[39] ^ hi\n const t1slo24 = s[48] ^ lo\n const t1shi24 = s[49] ^ hi\n\n // rho & pi\n const t2slo0 = t1slo0\n const t2shi0 = t1shi0\n const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)\n const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)\n const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)\n const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)\n const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)\n const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)\n const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)\n const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)\n const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)\n const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)\n const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)\n const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)\n const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)\n const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)\n const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)\n const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)\n const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)\n const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)\n const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)\n const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)\n const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)\n const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)\n const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)\n const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)\n const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)\n const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)\n const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)\n const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)\n const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)\n const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)\n const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)\n const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)\n const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)\n const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)\n const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)\n const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)\n const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)\n const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)\n const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)\n const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)\n const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)\n const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)\n const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)\n const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)\n const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)\n const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)\n const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)\n const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)\n\n // chi\n s[0] = t2slo0 ^ (~t2slo1 & t2slo2)\n s[1] = t2shi0 ^ (~t2shi1 & t2shi2)\n s[10] = t2slo5 ^ (~t2slo6 & t2slo7)\n s[11] = t2shi5 ^ (~t2shi6 & t2shi7)\n s[20] = t2slo10 ^ (~t2slo11 & t2slo12)\n s[21] = t2shi10 ^ (~t2shi11 & t2shi12)\n s[30] = t2slo15 ^ (~t2slo16 & t2slo17)\n s[31] = t2shi15 ^ (~t2shi16 & t2shi17)\n s[40] = t2slo20 ^ (~t2slo21 & t2slo22)\n s[41] = t2shi20 ^ (~t2shi21 & t2shi22)\n s[2] = t2slo1 ^ (~t2slo2 & t2slo3)\n s[3] = t2shi1 ^ (~t2shi2 & t2shi3)\n s[12] = t2slo6 ^ (~t2slo7 & t2slo8)\n s[13] = t2shi6 ^ (~t2shi7 & t2shi8)\n s[22] = t2slo11 ^ (~t2slo12 & t2slo13)\n s[23] = t2shi11 ^ (~t2shi12 & t2shi13)\n s[32] = t2slo16 ^ (~t2slo17 & t2slo18)\n s[33] = t2shi16 ^ (~t2shi17 & t2shi18)\n s[42] = t2slo21 ^ (~t2slo22 & t2slo23)\n s[43] = t2shi21 ^ (~t2shi22 & t2shi23)\n s[4] = t2slo2 ^ (~t2slo3 & t2slo4)\n s[5] = t2shi2 ^ (~t2shi3 & t2shi4)\n s[14] = t2slo7 ^ (~t2slo8 & t2slo9)\n s[15] = t2shi7 ^ (~t2shi8 & t2shi9)\n s[24] = t2slo12 ^ (~t2slo13 & t2slo14)\n s[25] = t2shi12 ^ (~t2shi13 & t2shi14)\n s[34] = t2slo17 ^ (~t2slo18 & t2slo19)\n s[35] = t2shi17 ^ (~t2shi18 & t2shi19)\n s[44] = t2slo22 ^ (~t2slo23 & t2slo24)\n s[45] = t2shi22 ^ (~t2shi23 & t2shi24)\n s[6] = t2slo3 ^ (~t2slo4 & t2slo0)\n s[7] = t2shi3 ^ (~t2shi4 & t2shi0)\n s[16] = t2slo8 ^ (~t2slo9 & t2slo5)\n s[17] = t2shi8 ^ (~t2shi9 & t2shi5)\n s[26] = t2slo13 ^ (~t2slo14 & t2slo10)\n s[27] = t2shi13 ^ (~t2shi14 & t2shi10)\n s[36] = t2slo18 ^ (~t2slo19 & t2slo15)\n s[37] = t2shi18 ^ (~t2shi19 & t2shi15)\n s[46] = t2slo23 ^ (~t2slo24 & t2slo20)\n s[47] = t2shi23 ^ (~t2shi24 & t2shi20)\n s[8] = t2slo4 ^ (~t2slo0 & t2slo1)\n s[9] = t2shi4 ^ (~t2shi0 & t2shi1)\n s[18] = t2slo9 ^ (~t2slo5 & t2slo6)\n s[19] = t2shi9 ^ (~t2shi5 & t2shi6)\n s[28] = t2slo14 ^ (~t2slo10 & t2slo11)\n s[29] = t2shi14 ^ (~t2shi10 & t2shi11)\n s[38] = t2slo19 ^ (~t2slo15 & t2slo16)\n s[39] = t2shi19 ^ (~t2shi15 & t2shi16)\n s[48] = t2slo24 ^ (~t2slo20 & t2slo21)\n s[49] = t2shi24 ^ (~t2shi20 & t2shi21)\n\n // iota\n s[0] ^= P1600_ROUND_CONSTANTS[round * 2]\n s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]\n }\n}\n","const keccakState = require('./keccak-state-unroll')\n\nfunction Keccak () {\n // much faster than `new Array(50)`\n this.state = [\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0\n ]\n\n this.blockSize = null\n this.count = 0\n this.squeezing = false\n}\n\nKeccak.prototype.initialize = function (rate, capacity) {\n for (let i = 0; i < 50; ++i) this.state[i] = 0\n this.blockSize = rate / 8\n this.count = 0\n this.squeezing = false\n}\n\nKeccak.prototype.absorb = function (data) {\n for (let i = 0; i < data.length; ++i) {\n this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))\n this.count += 1\n if (this.count === this.blockSize) {\n keccakState.p1600(this.state)\n this.count = 0\n }\n }\n}\n\nKeccak.prototype.absorbLastFewBits = function (bits) {\n this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))\n if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)\n this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))\n keccakState.p1600(this.state)\n this.count = 0\n this.squeezing = true\n}\n\nKeccak.prototype.squeeze = function (length) {\n if (!this.squeezing) this.absorbLastFewBits(0x01)\n\n const output = Buffer.alloc(length)\n for (let i = 0; i < length; ++i) {\n output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff\n this.count += 1\n if (this.count === this.blockSize) {\n keccakState.p1600(this.state)\n this.count = 0\n }\n }\n\n return output\n}\n\nKeccak.prototype.copy = function (dest) {\n for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]\n dest.blockSize = this.blockSize\n dest.count = this.count\n dest.squeezing = this.squeezing\n}\n\nmodule.exports = Keccak\n","module.exports = require('./lib/api')(require('./lib/keccak'))\n","// Extracted from https://github.com/ethereumjs/ethereumjs-util and stripped out irrelevant code\n// Original code licensed under the Mozilla Public License Version 2.0\n\nconst createKeccakHash = require('keccak/js')\nconst BN = require('bn.js')\n\n/**\n * Returns a buffer filled with 0s\n * @method zeros\n * @param {Number} bytes the number of bytes the buffer should be\n * @return {Buffer}\n */\nfunction zeros (bytes) {\n return Buffer.allocUnsafe(bytes).fill(0)\n}\n\n/**\n * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.\n * Or it truncates the beginning if it exceeds.\n * @method setLength\n * @param {Buffer|Array} msg the value to pad\n * @param {Number} length the number of bytes the output should be\n * @param {Boolean} [right=false] whether to start padding form the left or right\n * @return {Buffer|Array}\n */\nfunction setLength (msg, length, right) {\n const buf = zeros(length)\n msg = toBuffer(msg)\n if (right) {\n if (msg.length < length) {\n msg.copy(buf)\n return buf\n }\n return msg.slice(0, length)\n } else {\n if (msg.length < length) {\n msg.copy(buf, length - msg.length)\n return buf\n }\n return msg.slice(-length)\n }\n}\n\n/**\n * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.\n * Or it truncates the beginning if it exceeds.\n * @param {Buffer|Array} msg the value to pad\n * @param {Number} length the number of bytes the output should be\n * @return {Buffer|Array}\n */\nfunction setLengthRight (msg, length) {\n return setLength(msg, length, true)\n}\n\n/**\n * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.\n * @param {*} v the value\n */\nfunction toBuffer (v) {\n if (!Buffer.isBuffer(v)) {\n if (Array.isArray(v)) {\n v = Buffer.from(v)\n } else if (typeof v === 'string') {\n if (isHexString(v)) {\n v = Buffer.from(padToEven(stripHexPrefix(v)), 'hex')\n } else {\n v = Buffer.from(v)\n }\n } else if (typeof v === 'number') {\n v = intToBuffer(v)\n } else if (v === null || v === undefined) {\n v = Buffer.allocUnsafe(0)\n } else if (BN.isBN(v)) {\n v = v.toArrayLike(Buffer)\n } else if (v.toArray) {\n // converts a BN to a Buffer\n v = Buffer.from(v.toArray())\n } else {\n throw new Error('invalid type')\n }\n }\n return v\n}\n\n/**\n * Converts a `Buffer` into a hex `String`\n * @param {Buffer} buf\n * @return {String}\n */\nfunction bufferToHex (buf) {\n buf = toBuffer(buf)\n return '0x' + buf.toString('hex')\n}\n\n/**\n * Creates Keccak hash of the input\n * @param {Buffer|Array|String|Number} a the input data\n * @param {Number} [bits=256] the Keccak width\n * @return {Buffer}\n */\nfunction keccak (a, bits) {\n a = toBuffer(a)\n if (!bits) bits = 256\n\n return createKeccakHash('keccak' + bits).update(a).digest()\n}\n\nfunction padToEven (str) {\n return str.length % 2 ? '0' + str : str\n}\n\nfunction isHexString (str) {\n return typeof str === 'string' && str.match(/^0x[0-9A-Fa-f]*$/)\n}\n\nfunction stripHexPrefix (str) {\n if (typeof str === 'string' && str.startsWith('0x')) {\n return str.slice(2)\n }\n return str\n}\n\nmodule.exports = {\n zeros,\n setLength,\n setLengthRight,\n isHexString,\n stripHexPrefix,\n toBuffer,\n bufferToHex,\n keccak\n}\n","// Extracted from https://github.com/ethereumjs/ethereumjs-abi and stripped out irrelevant code\n// Original code licensed under the MIT License - Copyright (c) 2015 Alex Beregszaszi\n\nconst util = require('./util')\nconst BN = require('bn.js')\n\n// Convert from short to canonical names\n// FIXME: optimise or make this nicer?\nfunction elementaryName (name) {\n if (name.startsWith('int[')) {\n return 'int256' + name.slice(3)\n } else if (name === 'int') {\n return 'int256'\n } else if (name.startsWith('uint[')) {\n return 'uint256' + name.slice(4)\n } else if (name === 'uint') {\n return 'uint256'\n } else if (name.startsWith('fixed[')) {\n return 'fixed128x128' + name.slice(5)\n } else if (name === 'fixed') {\n return 'fixed128x128'\n } else if (name.startsWith('ufixed[')) {\n return 'ufixed128x128' + name.slice(6)\n } else if (name === 'ufixed') {\n return 'ufixed128x128'\n }\n return name\n}\n\n// Parse N from type\nfunction parseTypeN (type) {\n return parseInt(/^\\D+(\\d+)$/.exec(type)[1], 10)\n}\n\n// Parse N,M from typex\nfunction parseTypeNxM (type) {\n var tmp = /^\\D+(\\d+)x(\\d+)$/.exec(type)\n return [ parseInt(tmp[1], 10), parseInt(tmp[2], 10) ]\n}\n\n// Parse N in type[] where \"type\" can itself be an array type.\nfunction parseTypeArray (type) {\n var tmp = type.match(/(.*)\\[(.*?)\\]$/)\n if (tmp) {\n return tmp[2] === '' ? 'dynamic' : parseInt(tmp[2], 10)\n }\n return null\n}\n\nfunction parseNumber (arg) {\n var type = typeof arg\n if (type === 'string') {\n if (util.isHexString(arg)) {\n return new BN(util.stripHexPrefix(arg), 16)\n } else {\n return new BN(arg, 10)\n }\n } else if (type === 'number') {\n return new BN(arg)\n } else if (arg.toArray) {\n // assume this is a BN for the moment, replace with BN.isBN soon\n return arg\n } else {\n throw new Error('Argument is not a number')\n }\n}\n\n// Encodes a single item (can be dynamic array)\n// @returns: Buffer\nfunction encodeSingle (type, arg) {\n var size, num, ret, i\n\n if (type === 'address') {\n return encodeSingle('uint160', parseNumber(arg))\n } else if (type === 'bool') {\n return encodeSingle('uint8', arg ? 1 : 0)\n } else if (type === 'string') {\n return encodeSingle('bytes', new Buffer(arg, 'utf8'))\n } else if (isArray(type)) {\n // this part handles fixed-length ([2]) and variable length ([]) arrays\n // NOTE: we catch here all calls to arrays, that simplifies the rest\n if (typeof arg.length === 'undefined') {\n throw new Error('Not an array?')\n }\n size = parseTypeArray(type)\n if (size !== 'dynamic' && size !== 0 && arg.length > size) {\n throw new Error('Elements exceed array size: ' + size)\n }\n ret = []\n type = type.slice(0, type.lastIndexOf('['))\n if (typeof arg === 'string') {\n arg = JSON.parse(arg)\n }\n for (i in arg) {\n ret.push(encodeSingle(type, arg[i]))\n }\n if (size === 'dynamic') {\n var length = encodeSingle('uint256', arg.length)\n ret.unshift(length)\n }\n return Buffer.concat(ret)\n } else if (type === 'bytes') {\n arg = new Buffer(arg)\n\n ret = Buffer.concat([ encodeSingle('uint256', arg.length), arg ])\n\n if ((arg.length % 32) !== 0) {\n ret = Buffer.concat([ ret, util.zeros(32 - (arg.length % 32)) ])\n }\n\n return ret\n } else if (type.startsWith('bytes')) {\n size = parseTypeN(type)\n if (size < 1 || size > 32) {\n throw new Error('Invalid bytes width: ' + size)\n }\n\n return util.setLengthRight(arg, 32)\n } else if (type.startsWith('uint')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid uint width: ' + size)\n }\n\n num = parseNumber(arg)\n if (num.bitLength() > size) {\n throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n if (num < 0) {\n throw new Error('Supplied uint is negative')\n }\n\n return num.toArrayLike(Buffer, 'be', 32)\n } else if (type.startsWith('int')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid int width: ' + size)\n }\n\n num = parseNumber(arg)\n if (num.bitLength() > size) {\n throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n return num.toTwos(256).toArrayLike(Buffer, 'be', 32)\n } else if (type.startsWith('ufixed')) {\n size = parseTypeNxM(type)\n\n num = parseNumber(arg)\n\n if (num < 0) {\n throw new Error('Supplied ufixed is negative')\n }\n\n return encodeSingle('uint256', num.mul(new BN(2).pow(new BN(size[1]))))\n } else if (type.startsWith('fixed')) {\n size = parseTypeNxM(type)\n\n return encodeSingle('int256', parseNumber(arg).mul(new BN(2).pow(new BN(size[1]))))\n }\n\n throw new Error('Unsupported or invalid type: ' + type)\n}\n\n// Is a type dynamic?\nfunction isDynamic (type) {\n // FIXME: handle all types? I don't think anything is missing now\n return (type === 'string') || (type === 'bytes') || (parseTypeArray(type) === 'dynamic')\n}\n\n// Is a type an array?\nfunction isArray (type) {\n return type.lastIndexOf(']') === type.length - 1\n}\n\n// Encode a method/event with arguments\n// @types an array of string type names\n// @args an array of the appropriate values\nfunction rawEncode (types, values) {\n var output = []\n var data = []\n\n var headLength = 32 * types.length\n\n for (var i in types) {\n var type = elementaryName(types[i])\n var value = values[i]\n var cur = encodeSingle(type, value)\n\n // Use the head/tail method for storing dynamic data\n if (isDynamic(type)) {\n output.push(encodeSingle('uint256', headLength))\n data.push(cur)\n headLength += cur.length\n } else {\n output.push(cur)\n }\n }\n\n return Buffer.concat(output.concat(data))\n}\n\nfunction solidityPack (types, values) {\n if (types.length !== values.length) {\n throw new Error('Number of types are not matching the values')\n }\n\n var size, num\n var ret = []\n\n for (var i = 0; i < types.length; i++) {\n var type = elementaryName(types[i])\n var value = values[i]\n\n if (type === 'bytes') {\n ret.push(value)\n } else if (type === 'string') {\n ret.push(new Buffer(value, 'utf8'))\n } else if (type === 'bool') {\n ret.push(new Buffer(value ? '01' : '00', 'hex'))\n } else if (type === 'address') {\n ret.push(util.setLength(value, 20))\n } else if (type.startsWith('bytes')) {\n size = parseTypeN(type)\n if (size < 1 || size > 32) {\n throw new Error('Invalid bytes width: ' + size)\n }\n\n ret.push(util.setLengthRight(value, size))\n } else if (type.startsWith('uint')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid uint width: ' + size)\n }\n\n num = parseNumber(value)\n if (num.bitLength() > size) {\n throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n ret.push(num.toArrayLike(Buffer, 'be', size / 8))\n } else if (type.startsWith('int')) {\n size = parseTypeN(type)\n if ((size % 8) || (size < 8) || (size > 256)) {\n throw new Error('Invalid int width: ' + size)\n }\n\n num = parseNumber(value)\n if (num.bitLength() > size) {\n throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())\n }\n\n ret.push(num.toTwos(size).toArrayLike(Buffer, 'be', size / 8))\n } else {\n // FIXME: support all other types\n throw new Error('Unsupported or invalid type: ' + type)\n }\n }\n\n return Buffer.concat(ret)\n}\n\nfunction soliditySHA3 (types, values) {\n return util.keccak(solidityPack(types, values))\n}\n\nmodule.exports = {\n rawEncode,\n solidityPack,\n soliditySHA3\n}\n","const util = require('./util')\nconst abi = require('./abi')\n\nconst TYPED_MESSAGE_SCHEMA = {\n type: 'object',\n properties: {\n types: {\n type: 'object',\n additionalProperties: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {type: 'string'},\n type: {type: 'string'},\n },\n required: ['name', 'type'],\n },\n },\n },\n primaryType: {type: 'string'},\n domain: {type: 'object'},\n message: {type: 'object'},\n },\n required: ['types', 'primaryType', 'domain', 'message'],\n}\n\n/**\n * A collection of utility functions used for signing typed data\n */\nconst TypedDataUtils = {\n /**\n * Encodes an object by encoding and concatenating each of its members\n *\n * @param {string} primaryType - Root type\n * @param {Object} data - Object to encode\n * @param {Object} types - Type definitions\n * @returns {string} - Encoded representation of an object\n */\n encodeData (primaryType, data, types, useV4 = true) {\n const encodedTypes = ['bytes32']\n const encodedValues = [this.hashType(primaryType, types)]\n\n if(useV4) {\n const encodeField = (name, type, value) => {\n if (types[type] !== undefined) {\n return ['bytes32', value == null ?\n '0x0000000000000000000000000000000000000000000000000000000000000000' :\n util.keccak(this.encodeData(type, value, types, useV4))]\n }\n\n if(value === undefined)\n throw new Error(`missing value for field ${name} of type ${type}`)\n\n if (type === 'bytes') {\n return ['bytes32', util.keccak(value)]\n }\n\n if (type === 'string') {\n // convert string to buffer - prevents ethUtil from interpreting strings like '0xabcd' as hex\n if (typeof value === 'string') {\n value = Buffer.from(value, 'utf8')\n }\n return ['bytes32', util.keccak(value)]\n }\n\n if (type.lastIndexOf(']') === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf('['))\n const typeValuePairs = value.map(item =>\n encodeField(name, parsedType, item))\n return ['bytes32', util.keccak(abi.rawEncode(\n typeValuePairs.map(([type]) => type),\n typeValuePairs.map(([, value]) => value),\n ))]\n }\n\n return [type, value]\n }\n\n for (const field of types[primaryType]) {\n const [type, value] = encodeField(field.name, field.type, data[field.name])\n encodedTypes.push(type)\n encodedValues.push(value)\n }\n } else {\n for (const field of types[primaryType]) {\n let value = data[field.name]\n if (value !== undefined) {\n if (field.type === 'bytes') {\n encodedTypes.push('bytes32')\n value = util.keccak(value)\n encodedValues.push(value)\n } else if (field.type === 'string') {\n encodedTypes.push('bytes32')\n // convert string to buffer - prevents ethUtil from interpreting strings like '0xabcd' as hex\n if (typeof value === 'string') {\n value = Buffer.from(value, 'utf8')\n }\n value = util.keccak(value)\n encodedValues.push(value)\n } else if (types[field.type] !== undefined) {\n encodedTypes.push('bytes32')\n value = util.keccak(this.encodeData(field.type, value, types, useV4))\n encodedValues.push(value)\n } else if (field.type.lastIndexOf(']') === field.type.length - 1) {\n throw new Error('Arrays currently unimplemented in encodeData')\n } else {\n encodedTypes.push(field.type)\n encodedValues.push(value)\n }\n }\n }\n }\n\n return abi.rawEncode(encodedTypes, encodedValues)\n },\n\n /**\n * Encodes the type of an object by encoding a comma delimited list of its members\n *\n * @param {string} primaryType - Root type to encode\n * @param {Object} types - Type definitions\n * @returns {string} - Encoded representation of the type of an object\n */\n encodeType (primaryType, types) {\n let result = ''\n let deps = this.findTypeDependencies(primaryType, types).filter(dep => dep !== primaryType)\n deps = [primaryType].concat(deps.sort())\n for (const type of deps) {\n const children = types[type]\n if (!children) {\n throw new Error('No type definition specified: ' + type)\n }\n result += type + '(' + types[type].map(({ name, type }) => type + ' ' + name).join(',') + ')'\n }\n return result\n },\n\n /**\n * Finds all types within a type defintion object\n *\n * @param {string} primaryType - Root type\n * @param {Object} types - Type definitions\n * @param {Array} results - current set of accumulated types\n * @returns {Array} - Set of all types found in the type definition\n */\n findTypeDependencies (primaryType, types, results = []) {\n primaryType = primaryType.match(/^\\w*/)[0]\n if (results.includes(primaryType) || types[primaryType] === undefined) { return results }\n results.push(primaryType)\n for (const field of types[primaryType]) {\n for (const dep of this.findTypeDependencies(field.type, types, results)) {\n !results.includes(dep) && results.push(dep)\n }\n }\n return results\n },\n\n /**\n * Hashes an object\n *\n * @param {string} primaryType - Root type\n * @param {Object} data - Object to hash\n * @param {Object} types - Type definitions\n * @returns {Buffer} - Hash of an object\n */\n hashStruct (primaryType, data, types, useV4 = true) {\n return util.keccak(this.encodeData(primaryType, data, types, useV4))\n },\n\n /**\n * Hashes the type of an object\n *\n * @param {string} primaryType - Root type to hash\n * @param {Object} types - Type definitions\n * @returns {string} - Hash of an object\n */\n hashType (primaryType, types) {\n return util.keccak(this.encodeType(primaryType, types))\n },\n\n /**\n * Removes properties from a message object that are not defined per EIP-712\n *\n * @param {Object} data - typed message object\n * @returns {Object} - typed message object with only allowed fields\n */\n sanitizeData (data) {\n const sanitizedData = {}\n for (const key in TYPED_MESSAGE_SCHEMA.properties) {\n data[key] && (sanitizedData[key] = data[key])\n }\n if (sanitizedData.types) {\n sanitizedData.types = Object.assign({ EIP712Domain: [] }, sanitizedData.types)\n }\n return sanitizedData\n },\n\n /**\n * Returns the hash of a typed message as per EIP-712 for signing\n *\n * @param {Object} typedData - Types message data to sign\n * @returns {string} - sha3 hash for signing\n */\n hash (typedData, useV4 = true) {\n const sanitizedData = this.sanitizeData(typedData)\n const parts = [Buffer.from('1901', 'hex')]\n parts.push(this.hashStruct('EIP712Domain', sanitizedData.domain, sanitizedData.types, useV4))\n if (sanitizedData.primaryType !== 'EIP712Domain') {\n parts.push(this.hashStruct(sanitizedData.primaryType, sanitizedData.message, sanitizedData.types, useV4))\n }\n return util.keccak(Buffer.concat(parts))\n },\n}\n\nmodule.exports = {\n TYPED_MESSAGE_SCHEMA,\n TypedDataUtils,\n\n hashForSignTypedDataLegacy: function (msgParams) {\n return typedSignatureHashLegacy(msgParams.data)\n },\n\n hashForSignTypedData_v3: function (msgParams) {\n return TypedDataUtils.hash(msgParams.data, false)\n },\n\n hashForSignTypedData_v4: function (msgParams) {\n return TypedDataUtils.hash(msgParams.data)\n },\n}\n\n/**\n * @param typedData - Array of data along with types, as per EIP712.\n * @returns Buffer\n */\nfunction typedSignatureHashLegacy(typedData) {\n const error = new Error('Expect argument to be non-empty array')\n if (typeof typedData !== 'object' || !typedData.length) throw error\n\n const data = typedData.map(function (e) {\n return e.type === 'bytes' ? util.toBuffer(e.value) : e.value\n })\n const types = typedData.map(function (e) { return e.type })\n const schema = typedData.map(function (e) {\n if (!e.name) throw error\n return e.type + ' ' + e.name\n })\n\n return abi.soliditySHA3(\n ['bytes32', 'bytes32'],\n [\n abi.soliditySHA3(new Array(typedData.length).fill('string'), schema),\n abi.soliditySHA3(types, data)\n ]\n )\n}\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterFromParam = exports.FilterPolyfill = void 0;\nconst type_1 = require(\"../core/type\");\nconst util_1 = require(\"../core/util\");\nconst TIMEOUT = 5 * 60 * 1000; // 5 minutes\nconst JSONRPC_TEMPLATE = {\n jsonrpc: '2.0',\n id: 0,\n};\nclass FilterPolyfill {\n constructor(provider) {\n this.logFilters = new Map(); // \n this.blockFilters = new Set(); // \n this.pendingTransactionFilters = new Set(); // \n this.cursors = new Map(); // \n this.timeouts = new Map(); // \n this.nextFilterId = (0, type_1.IntNumber)(1);\n this.REQUEST_THROTTLE_INTERVAL = 1000; // in milliseconds\n this.lastFetchTimestamp = new Date(0);\n this.resolvers = [];\n this.provider = provider;\n }\n async newFilter(param) {\n const filter = filterFromParam(param);\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, filter.fromBlock);\n console.info(`Installing new log filter(${id}):`, filter, 'initial cursor position:', cursor);\n this.logFilters.set(id, filter);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n async newBlockFilter() {\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, 'latest');\n console.info(`Installing new block filter (${id}) with initial cursor position:`, cursor);\n this.blockFilters.add(id);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n async newPendingTransactionFilter() {\n const id = this.makeFilterId();\n const cursor = await this.setInitialCursorPosition(id, 'latest');\n console.info(`Installing new block filter (${id}) with initial cursor position:`, cursor);\n this.pendingTransactionFilters.add(id);\n this.setFilterTimeout(id);\n return (0, util_1.hexStringFromIntNumber)(id);\n }\n uninstallFilter(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n console.info(`Uninstalling filter (${id})`);\n this.deleteFilter(id);\n return true;\n }\n getFilterChanges(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n if (this.timeouts.has(id)) {\n // extend timeout\n this.setFilterTimeout(id);\n }\n if (this.logFilters.has(id)) {\n return this.getLogFilterChanges(id);\n }\n else if (this.blockFilters.has(id)) {\n return this.getBlockFilterChanges(id);\n }\n else if (this.pendingTransactionFilters.has(id)) {\n return this.getPendingTransactionFilterChanges(id);\n }\n return Promise.resolve(filterNotFoundError());\n }\n async getFilterLogs(filterId) {\n const id = (0, util_1.intNumberFromHexString)(filterId);\n const filter = this.logFilters.get(id);\n if (!filter) {\n return filterNotFoundError();\n }\n return this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getLogs', params: [paramFromFilter(filter)] }));\n }\n makeFilterId() {\n return (0, type_1.IntNumber)(++this.nextFilterId);\n }\n sendAsyncPromise(request) {\n return new Promise((resolve, reject) => {\n this.provider.sendAsync(request, (err, response) => {\n if (err) {\n return reject(err);\n }\n if (Array.isArray(response) || response == null) {\n return reject(new Error(`unexpected response received: ${JSON.stringify(response)}`));\n }\n resolve(response);\n });\n });\n }\n deleteFilter(id) {\n console.info(`Deleting filter (${id})`);\n this.logFilters.delete(id);\n this.blockFilters.delete(id);\n this.pendingTransactionFilters.delete(id);\n this.cursors.delete(id);\n this.timeouts.delete(id);\n }\n async getLogFilterChanges(id) {\n const filter = this.logFilters.get(id);\n const cursorPosition = this.cursors.get(id);\n if (!cursorPosition || !filter) {\n return filterNotFoundError();\n }\n const currentBlockHeight = await this.getCurrentBlockHeight();\n const toBlock = filter.toBlock === 'latest' ? currentBlockHeight : filter.toBlock;\n if (cursorPosition > currentBlockHeight) {\n return emptyResult();\n }\n if (cursorPosition > Number(filter.toBlock)) {\n return emptyResult();\n }\n console.info(`Fetching logs from ${cursorPosition} to ${toBlock} for filter ${id}`);\n const response = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getLogs', params: [\n paramFromFilter(Object.assign(Object.assign({}, filter), { fromBlock: cursorPosition, toBlock })),\n ] }));\n if (Array.isArray(response.result)) {\n const blocks = response.result.map((log) => (0, util_1.intNumberFromHexString)(log.blockNumber || '0x0'));\n const highestBlock = Math.max(...blocks);\n if (highestBlock && highestBlock > cursorPosition) {\n const newCursorPosition = (0, type_1.IntNumber)(highestBlock + 1);\n console.info(`Moving cursor position for filter (${id}) from ${cursorPosition} to ${newCursorPosition}`);\n this.cursors.set(id, newCursorPosition);\n }\n }\n return response;\n }\n async getBlockFilterChanges(id) {\n const cursorPosition = this.cursors.get(id);\n if (!cursorPosition) {\n return filterNotFoundError();\n }\n const currentBlockHeight = await this.getCurrentBlockHeight();\n if (cursorPosition > currentBlockHeight) {\n return emptyResult();\n }\n console.info(`Fetching blocks from ${cursorPosition} to ${currentBlockHeight} for filter (${id})`);\n const blocks = (await Promise.all(\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n (0, util_1.range)(cursorPosition, currentBlockHeight + 1).map((i) => this.getBlockHashByNumber((0, type_1.IntNumber)(i))))).filter((hash) => !!hash);\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n const newCursorPosition = (0, type_1.IntNumber)(cursorPosition + blocks.length);\n console.info(`Moving cursor position for filter (${id}) from ${cursorPosition} to ${newCursorPosition}`);\n this.cursors.set(id, newCursorPosition);\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { result: blocks });\n }\n async getPendingTransactionFilterChanges(_id) {\n // pending transaction filters are not supported\n return Promise.resolve(emptyResult());\n }\n async setInitialCursorPosition(id, startBlock) {\n const currentBlockHeight = await this.getCurrentBlockHeight();\n const initialCursorPosition = typeof startBlock === 'number' && startBlock > currentBlockHeight\n ? startBlock\n : currentBlockHeight;\n this.cursors.set(id, initialCursorPosition);\n return initialCursorPosition;\n }\n setFilterTimeout(id) {\n const existing = this.timeouts.get(id);\n if (existing) {\n window.clearTimeout(existing);\n }\n const timeout = window.setTimeout(() => {\n console.info(`Filter (${id}) timed out`);\n this.deleteFilter(id);\n }, TIMEOUT);\n this.timeouts.set(id, timeout);\n }\n // throttle eth_blockNumber requests\n async getCurrentBlockHeight() {\n const now = new Date();\n if (now.getTime() - this.lastFetchTimestamp.getTime() > this.REQUEST_THROTTLE_INTERVAL) {\n this.lastFetchTimestamp = now;\n const height = await this._getCurrentBlockHeight();\n this.currentBlockHeight = height;\n this.resolvers.forEach((resolve) => resolve(height));\n this.resolvers = [];\n }\n if (!this.currentBlockHeight) {\n return new Promise((resolve) => this.resolvers.push(resolve));\n }\n return this.currentBlockHeight;\n }\n async _getCurrentBlockHeight() {\n const { result } = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_blockNumber', params: [] }));\n return (0, util_1.intNumberFromHexString)((0, util_1.ensureHexString)(result));\n }\n async getBlockHashByNumber(blockNumber) {\n const response = await this.sendAsyncPromise(Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { method: 'eth_getBlockByNumber', params: [(0, util_1.hexStringFromIntNumber)(blockNumber), false] }));\n if (response.result && typeof response.result.hash === 'string') {\n return (0, util_1.ensureHexString)(response.result.hash);\n }\n return null;\n }\n}\nexports.FilterPolyfill = FilterPolyfill;\nfunction filterFromParam(param) {\n return {\n fromBlock: intBlockHeightFromHexBlockHeight(param.fromBlock),\n toBlock: intBlockHeightFromHexBlockHeight(param.toBlock),\n addresses: param.address === undefined\n ? null\n : Array.isArray(param.address)\n ? param.address\n : [param.address],\n topics: param.topics || [],\n };\n}\nexports.filterFromParam = filterFromParam;\nfunction paramFromFilter(filter) {\n const param = {\n fromBlock: hexBlockHeightFromIntBlockHeight(filter.fromBlock),\n toBlock: hexBlockHeightFromIntBlockHeight(filter.toBlock),\n topics: filter.topics,\n };\n if (filter.addresses !== null) {\n param.address = filter.addresses;\n }\n return param;\n}\nfunction intBlockHeightFromHexBlockHeight(value) {\n if (value === undefined || value === 'latest' || value === 'pending') {\n return 'latest';\n }\n else if (value === 'earliest') {\n return (0, type_1.IntNumber)(0);\n }\n else if ((0, util_1.isHexString)(value)) {\n return (0, util_1.intNumberFromHexString)(value);\n }\n throw new Error(`Invalid block option: ${String(value)}`);\n}\nfunction hexBlockHeightFromIntBlockHeight(value) {\n if (value === 'latest') {\n return value;\n }\n return (0, util_1.hexStringFromIntNumber)(value);\n}\nfunction filterNotFoundError() {\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { error: { code: -32000, message: 'filter not found' } });\n}\nfunction emptyResult() {\n return Object.assign(Object.assign({}, JSONRPC_TEMPLATE), { result: [] });\n}\n","module.exports = IdIterator\n\nfunction IdIterator(opts){\n opts = opts || {}\n var max = opts.max || Number.MAX_SAFE_INTEGER\n var idCounter = typeof opts.start !== 'undefined' ? opts.start : Math.floor(Math.random() * max)\n\n return function createRandomId () {\n idCounter = idCounter % max\n return idCounter++\n }\n\n}","'use strict';\n\nconst processFn = (fn, opts) => function () {\n\tconst P = opts.promiseModule;\n\tconst args = new Array(arguments.length);\n\n\tfor (let i = 0; i < arguments.length; i++) {\n\t\targs[i] = arguments[i];\n\t}\n\n\treturn new P((resolve, reject) => {\n\t\tif (opts.errorFirst) {\n\t\t\targs.push(function (err, result) {\n\t\t\t\tif (opts.multiArgs) {\n\t\t\t\t\tconst results = new Array(arguments.length - 1);\n\n\t\t\t\t\tfor (let i = 1; i < arguments.length; i++) {\n\t\t\t\t\t\tresults[i - 1] = arguments[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tresults.unshift(err);\n\t\t\t\t\t\treject(results);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve(results);\n\t\t\t\t\t}\n\t\t\t\t} else if (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(function (result) {\n\t\t\t\tif (opts.multiArgs) {\n\t\t\t\t\tconst results = new Array(arguments.length - 1);\n\n\t\t\t\t\tfor (let i = 0; i < arguments.length; i++) {\n\t\t\t\t\t\tresults[i] = arguments[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(results);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (obj, opts) => {\n\topts = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, opts);\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn opts.include ? opts.include.some(match) : !opts.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (typeof obj === 'function') {\n\t\tret = function () {\n\t\t\tif (opts.excludeMain) {\n\t\t\t\treturn obj.apply(this, arguments);\n\t\t\t}\n\n\t\t\treturn processFn(obj, opts).apply(this, arguments);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(obj));\n\t}\n\n\tfor (const key in obj) { // eslint-disable-line guard-for-in\n\t\tconst x = obj[key];\n\t\tret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;\n\t}\n\n\treturn ret;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nfunction safeApply(handler, context, args) {\n try {\n Reflect.apply(handler, context, args);\n }\n catch (err) {\n // Throw error after timeout so as not to interrupt the stack\n setTimeout(() => {\n throw err;\n });\n }\n}\nfunction arrayClone(arr) {\n const n = arr.length;\n const copy = new Array(n);\n for (let i = 0; i < n; i += 1) {\n copy[i] = arr[i];\n }\n return copy;\n}\nclass SafeEventEmitter extends events_1.EventEmitter {\n emit(type, ...args) {\n let doError = type === 'error';\n const events = this._events;\n if (events !== undefined) {\n doError = doError && events.error === undefined;\n }\n else if (!doError) {\n return false;\n }\n // If there is no 'error' event listener then throw.\n if (doError) {\n let er;\n if (args.length > 0) {\n [er] = args;\n }\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n const err = new Error(`Unhandled error.${er ? ` (${er.message})` : ''}`);\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n const handler = events[type];\n if (handler === undefined) {\n return false;\n }\n if (typeof handler === 'function') {\n safeApply(handler, this, args);\n }\n else {\n const len = handler.length;\n const listeners = arrayClone(handler);\n for (let i = 0; i < len; i += 1) {\n safeApply(listeners[i], this, args);\n }\n }\n return true;\n }\n}\nexports.default = SafeEventEmitter;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseBlockTracker = void 0;\nconst safe_event_emitter_1 = __importDefault(require(\"@metamask/safe-event-emitter\"));\nconst sec = 1000;\nconst calculateSum = (accumulator, currentValue) => accumulator + currentValue;\nconst blockTrackerEvents = ['sync', 'latest'];\nclass BaseBlockTracker extends safe_event_emitter_1.default {\n constructor(opts) {\n super();\n // config\n this._blockResetDuration = opts.blockResetDuration || 20 * sec;\n this._usePastBlocks = opts.usePastBlocks || false;\n // state\n this._currentBlock = null;\n this._isRunning = false;\n // bind functions for internal use\n this._onNewListener = this._onNewListener.bind(this);\n this._onRemoveListener = this._onRemoveListener.bind(this);\n this._resetCurrentBlock = this._resetCurrentBlock.bind(this);\n // listen for handler changes\n this._setupInternalEvents();\n }\n async destroy() {\n this._cancelBlockResetTimeout();\n await this._maybeEnd();\n super.removeAllListeners();\n }\n isRunning() {\n return this._isRunning;\n }\n getCurrentBlock() {\n return this._currentBlock;\n }\n async getLatestBlock() {\n // return if available\n if (this._currentBlock) {\n return this._currentBlock;\n }\n // wait for a new latest block\n const latestBlock = await new Promise((resolve) => this.once('latest', resolve));\n // return newly set current block\n return latestBlock;\n }\n // dont allow module consumer to remove our internal event listeners\n removeAllListeners(eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName);\n }\n else {\n super.removeAllListeners();\n }\n // re-add internal events\n this._setupInternalEvents();\n // trigger stop check just in case\n this._onRemoveListener();\n return this;\n }\n _setupInternalEvents() {\n // first remove listeners for idempotence\n this.removeListener('newListener', this._onNewListener);\n this.removeListener('removeListener', this._onRemoveListener);\n // then add them\n this.on('newListener', this._onNewListener);\n this.on('removeListener', this._onRemoveListener);\n }\n _onNewListener(eventName) {\n // `newListener` is called *before* the listener is added\n if (blockTrackerEvents.includes(eventName)) {\n this._maybeStart();\n }\n }\n _onRemoveListener() {\n // `removeListener` is called *after* the listener is removed\n if (this._getBlockTrackerEventCount() > 0) {\n return;\n }\n this._maybeEnd();\n }\n async _maybeStart() {\n if (this._isRunning) {\n return;\n }\n this._isRunning = true;\n // cancel setting latest block to stale\n this._cancelBlockResetTimeout();\n await this._start();\n this.emit('_started');\n }\n async _maybeEnd() {\n if (!this._isRunning) {\n return;\n }\n this._isRunning = false;\n this._setupBlockResetTimeout();\n await this._end();\n this.emit('_ended');\n }\n _getBlockTrackerEventCount() {\n return blockTrackerEvents\n .map((eventName) => this.listenerCount(eventName))\n .reduce(calculateSum);\n }\n _shouldUseNewBlock(newBlock) {\n const currentBlock = this._currentBlock;\n if (!currentBlock) {\n return true;\n }\n const newBlockInt = hexToInt(newBlock);\n const currentBlockInt = hexToInt(currentBlock);\n return ((this._usePastBlocks && newBlockInt < currentBlockInt) ||\n newBlockInt > currentBlockInt);\n }\n _newPotentialLatest(newBlock) {\n if (!this._shouldUseNewBlock(newBlock)) {\n return;\n }\n this._setCurrentBlock(newBlock);\n }\n _setCurrentBlock(newBlock) {\n const oldBlock = this._currentBlock;\n this._currentBlock = newBlock;\n this.emit('latest', newBlock);\n this.emit('sync', { oldBlock, newBlock });\n }\n _setupBlockResetTimeout() {\n // clear any existing timeout\n this._cancelBlockResetTimeout();\n // clear latest block when stale\n this._blockResetTimeout = setTimeout(this._resetCurrentBlock, this._blockResetDuration);\n // nodejs - dont hold process open\n if (this._blockResetTimeout.unref) {\n this._blockResetTimeout.unref();\n }\n }\n _cancelBlockResetTimeout() {\n if (this._blockResetTimeout) {\n clearTimeout(this._blockResetTimeout);\n }\n }\n _resetCurrentBlock() {\n this._currentBlock = null;\n }\n}\nexports.BaseBlockTracker = BaseBlockTracker;\n/**\n * Converts a number represented as a string in hexadecimal format into a native\n * number.\n *\n * @param hexInt - The hex string.\n * @returns The number.\n */\nfunction hexToInt(hexInt) {\n return Number.parseInt(hexInt, 16);\n}\n//# sourceMappingURL=BaseBlockTracker.js.map","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\nfunction print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\nfunction shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n }\n else if (result === false) {\n result = {};\n }\n else if (typeof result === 'string') {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\nfunction* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const ctx = { path, branch };\n if (coerce) {\n value = struct.coercer(value, ctx);\n if (mask &&\n struct.type !== 'type' &&\n isObject(struct.schema) &&\n isObject(value) &&\n !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n let status = 'valid';\n for (const failure of struct.validator(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask,\n message: options.message,\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? 'not_refined' : 'not_valid';\n yield [t[0], undefined];\n }\n else if (coerce) {\n v = t[1];\n if (k === undefined) {\n value = v;\n }\n else if (value instanceof Map) {\n value.set(k, v);\n }\n else if (value instanceof Set) {\n value.add(v);\n }\n else if (isObject(value)) {\n if (v !== undefined || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nclass Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () { }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\nfunction assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\nfunction create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\nfunction mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n }\n else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const isType = Structs[0].type === 'type';\n const schemas = Structs.map((s) => s.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\nfunction define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\nfunction deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\nfunction omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\nfunction partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\nfunction pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n */\nfunction bigint() {\n return define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\nfunction boolean() {\n return define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\nfunction date() {\n return define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map((v) => print(v)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n */\nfunction func() {\n return define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\nfunction instance(Class) {\n return define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\nfunction integer() {\n return define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n */\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n },\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\nfunction nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n */\nfunction number() {\n return define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\nfunction optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\nfunction regexp() {\n return define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n */\nfunction string() {\n return define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n */\nfunction tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\nfunction union(Structs) {\n const description = Structs.map((s) => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, { coerce: true });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n }\n else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (x) => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n if (x === undefined) {\n return f;\n }\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x };\n let changed = false;\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction trimmed(struct) {\n return coerce(struct, string(), (x) => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\nfunction empty(struct) {\n return refine(struct, 'empty', (value) => {\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n else {\n return value.length;\n }\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\nfunction max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\nfunction min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n */\nfunction nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\nfunction size(struct, min, max = min) {\n const expected = `Expected a ${struct.type}`;\n const of = min === max ? `of \\`${min}\\`` : `between \\`${min}\\` and \\`${max}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((min <= value && value <= max) ||\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n const { size } = value;\n return ((min <= size && size <= max) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n else {\n const { length } = value;\n return ((min <= length && length <= max) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\nfunction refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, bigint, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nonempty, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.mjs.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertExhaustive = exports.assertStruct = exports.assert = exports.AssertionError = void 0;\nconst superstruct_1 = require(\"superstruct\");\n/**\n * Type guard for determining whether the given value is an error object with a\n * `message` property, such as an instance of Error.\n *\n * @param error - The object to check.\n * @returns True or false, depending on the result.\n */\nfunction isErrorWithMessage(error) {\n return typeof error === 'object' && error !== null && 'message' in error;\n}\n/**\n * Check if a value is a constructor, i.e., a function that can be called with\n * the `new` keyword.\n *\n * @param fn - The value to check.\n * @returns `true` if the value is a constructor, or `false` otherwise.\n */\nfunction isConstructable(fn) {\n var _a, _b;\n /* istanbul ignore next */\n return Boolean(typeof ((_b = (_a = fn === null || fn === void 0 ? void 0 : fn.prototype) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'string');\n}\n/**\n * Get the error message from an unknown error object. If the error object has\n * a `message` property, that property is returned. Otherwise, the stringified\n * error object is returned.\n *\n * @param error - The error object to get the message from.\n * @returns The error message.\n */\nfunction getErrorMessage(error) {\n const message = isErrorWithMessage(error) ? error.message : String(error);\n // If the error ends with a period, remove it, as we'll add our own period.\n if (message.endsWith('.')) {\n return message.slice(0, -1);\n }\n return message;\n}\n/**\n * Initialise an {@link AssertionErrorConstructor} error.\n *\n * @param ErrorWrapper - The error class to use.\n * @param message - The error message.\n * @returns The error object.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction getError(ErrorWrapper, message) {\n if (isConstructable(ErrorWrapper)) {\n return new ErrorWrapper({\n message,\n });\n }\n return ErrorWrapper({\n message,\n });\n}\n/**\n * The default error class that is thrown if an assertion fails.\n */\nclass AssertionError extends Error {\n constructor(options) {\n super(options.message);\n this.code = 'ERR_ASSERTION';\n }\n}\nexports.AssertionError = AssertionError;\n/**\n * Same as Node.js assert.\n * If the value is falsy, throws an error, does nothing otherwise.\n *\n * @throws {@link AssertionError} If value is falsy.\n * @param value - The test that should be truthy to pass.\n * @param message - Message to be passed to {@link AssertionError} or an\n * {@link Error} instance to throw.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}. If a custom error class is provided for\n * the `message` argument, this argument is ignored.\n */\nfunction assert(value, message = 'Assertion failed.', \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper = AssertionError) {\n if (!value) {\n if (message instanceof Error) {\n throw message;\n }\n throw getError(ErrorWrapper, message);\n }\n}\nexports.assert = assert;\n/**\n * Assert a value against a Superstruct struct.\n *\n * @param value - The value to validate.\n * @param struct - The struct to validate against.\n * @param errorPrefix - A prefix to add to the error message. Defaults to\n * \"Assertion failed\".\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the value is not valid.\n */\nfunction assertStruct(value, struct, errorPrefix = 'Assertion failed', \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper = AssertionError) {\n try {\n (0, superstruct_1.assert)(value, struct);\n }\n catch (error) {\n throw getError(ErrorWrapper, `${errorPrefix}: ${getErrorMessage(error)}.`);\n }\n}\nexports.assertStruct = assertStruct;\n/**\n * Use in the default case of a switch that you want to be fully exhaustive.\n * Using this function forces the compiler to enforce exhaustivity during\n * compile-time.\n *\n * @example\n * ```\n * const number = 1;\n * switch (number) {\n * case 0:\n * ...\n * case 1:\n * ...\n * default:\n * assertExhaustive(snapPrefix);\n * }\n * ```\n * @param _object - The object on which the switch is being operated.\n */\nfunction assertExhaustive(_object) {\n throw new Error('Invalid branch reached. Should be detected during compilation.');\n}\nexports.assertExhaustive = assertExhaustive;\n//# sourceMappingURL=assert.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64 = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * Ensure that a provided string-based struct is valid base64.\n *\n * @param struct - The string based struct.\n * @param options - Optional options to specialize base64 validation. See {@link Base64Options} documentation.\n * @returns A superstruct validating base64.\n */\nconst base64 = (struct, options = {}) => {\n var _a, _b;\n const paddingRequired = (_a = options.paddingRequired) !== null && _a !== void 0 ? _a : false;\n const characterSet = (_b = options.characterSet) !== null && _b !== void 0 ? _b : 'base64';\n let letters;\n if (characterSet === 'base64') {\n letters = String.raw `[A-Za-z0-9+\\/]`;\n }\n else {\n (0, assert_1.assert)(characterSet === 'base64url');\n letters = String.raw `[-_A-Za-z0-9]`;\n }\n let re;\n if (paddingRequired) {\n re = new RegExp(`^(?:${letters}{4})*(?:${letters}{3}=|${letters}{2}==)?$`, 'u');\n }\n else {\n re = new RegExp(`^(?:${letters}{4})*(?:${letters}{2,3}|${letters}{3}=|${letters}{2}==)?$`, 'u');\n }\n return (0, superstruct_1.pattern)(struct, re);\n};\nexports.base64 = base64;\n//# sourceMappingURL=base64.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.remove0x = exports.add0x = exports.assertIsStrictHexString = exports.assertIsHexString = exports.isStrictHexString = exports.isHexString = exports.StrictHexStruct = exports.HexStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\nexports.HexStruct = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^(?:0x)?[0-9a-f]+$/iu);\nexports.StrictHexStruct = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^0x[0-9a-f]+$/iu);\n/**\n * Check if a string is a valid hex string.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid hex string.\n */\nfunction isHexString(value) {\n return (0, superstruct_1.is)(value, exports.HexStruct);\n}\nexports.isHexString = isHexString;\n/**\n * Strictly check if a string is a valid hex string. A valid hex string must\n * start with the \"0x\"-prefix.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid hex string.\n */\nfunction isStrictHexString(value) {\n return (0, superstruct_1.is)(value, exports.StrictHexStruct);\n}\nexports.isStrictHexString = isStrictHexString;\n/**\n * Assert that a value is a valid hex string.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid hex string.\n */\nfunction assertIsHexString(value) {\n (0, assert_1.assert)(isHexString(value), 'Value must be a hexadecimal string.');\n}\nexports.assertIsHexString = assertIsHexString;\n/**\n * Assert that a value is a valid hex string. A valid hex string must start with\n * the \"0x\"-prefix.\n *\n * @param value - The value to check.\n * @throws If the value is not a valid hex string.\n */\nfunction assertIsStrictHexString(value) {\n (0, assert_1.assert)(isStrictHexString(value), 'Value must be a hexadecimal string, starting with \"0x\".');\n}\nexports.assertIsStrictHexString = assertIsStrictHexString;\n/**\n * Add the `0x`-prefix to a hexadecimal string. If the string already has the\n * prefix, it is returned as-is.\n *\n * @param hexadecimal - The hexadecimal string to add the prefix to.\n * @returns The prefixed hexadecimal string.\n */\nfunction add0x(hexadecimal) {\n if (hexadecimal.startsWith('0x')) {\n return hexadecimal;\n }\n if (hexadecimal.startsWith('0X')) {\n return `0x${hexadecimal.substring(2)}`;\n }\n return `0x${hexadecimal}`;\n}\nexports.add0x = add0x;\n/**\n * Remove the `0x`-prefix from a hexadecimal string. If the string doesn't have\n * the prefix, it is returned as-is.\n *\n * @param hexadecimal - The hexadecimal string to remove the prefix from.\n * @returns The un-prefixed hexadecimal string.\n */\nfunction remove0x(hexadecimal) {\n if (hexadecimal.startsWith('0x') || hexadecimal.startsWith('0X')) {\n return hexadecimal.substring(2);\n }\n return hexadecimal;\n}\nexports.remove0x = remove0x;\n//# sourceMappingURL=hex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDataView = exports.concatBytes = exports.valueToBytes = exports.stringToBytes = exports.numberToBytes = exports.signedBigIntToBytes = exports.bigIntToBytes = exports.hexToBytes = exports.bytesToString = exports.bytesToNumber = exports.bytesToSignedBigInt = exports.bytesToBigInt = exports.bytesToHex = exports.assertIsBytes = exports.isBytes = void 0;\nconst assert_1 = require(\"./assert\");\nconst hex_1 = require(\"./hex\");\n// '0'.charCodeAt(0) === 48\nconst HEX_MINIMUM_NUMBER_CHARACTER = 48;\n// '9'.charCodeAt(0) === 57\nconst HEX_MAXIMUM_NUMBER_CHARACTER = 58;\nconst HEX_CHARACTER_OFFSET = 87;\n/**\n * Memoized function that returns an array to be used as a lookup table for\n * converting bytes to hexadecimal values.\n *\n * The array is created lazily and then cached for future use. The benefit of\n * this approach is that the performance of converting bytes to hex is much\n * better than if we were to call `toString(16)` on each byte.\n *\n * The downside is that the array is created once and then never garbage\n * collected. This is not a problem in practice because the array is only 256\n * elements long.\n *\n * @returns A function that returns the lookup table.\n */\nfunction getPrecomputedHexValuesBuilder() {\n // To avoid issues with tree shaking, we need to use a function to return the\n // array. This is because the array is only used in the `bytesToHex` function\n // and if we were to use a global variable, the array might be removed by the\n // tree shaker.\n const lookupTable = [];\n return () => {\n if (lookupTable.length === 0) {\n for (let i = 0; i < 256; i++) {\n lookupTable.push(i.toString(16).padStart(2, '0'));\n }\n }\n return lookupTable;\n };\n}\n/**\n * Function implementation of the {@link getPrecomputedHexValuesBuilder}\n * function.\n */\nconst getPrecomputedHexValues = getPrecomputedHexValuesBuilder();\n/**\n * Check if a value is a `Uint8Array`.\n *\n * @param value - The value to check.\n * @returns Whether the value is a `Uint8Array`.\n */\nfunction isBytes(value) {\n return value instanceof Uint8Array;\n}\nexports.isBytes = isBytes;\n/**\n * Assert that a value is a `Uint8Array`.\n *\n * @param value - The value to check.\n * @throws If the value is not a `Uint8Array`.\n */\nfunction assertIsBytes(value) {\n (0, assert_1.assert)(isBytes(value), 'Value must be a Uint8Array.');\n}\nexports.assertIsBytes = assertIsBytes;\n/**\n * Convert a `Uint8Array` to a hexadecimal string.\n *\n * @param bytes - The bytes to convert to a hexadecimal string.\n * @returns The hexadecimal string.\n */\nfunction bytesToHex(bytes) {\n assertIsBytes(bytes);\n if (bytes.length === 0) {\n return '0x';\n }\n const lookupTable = getPrecomputedHexValues();\n const hexadecimal = new Array(bytes.length);\n for (let i = 0; i < bytes.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n hexadecimal[i] = lookupTable[bytes[i]];\n }\n return (0, hex_1.add0x)(hexadecimal.join(''));\n}\nexports.bytesToHex = bytesToHex;\n/**\n * Convert a `Uint8Array` to a `bigint`.\n *\n * To convert a `Uint8Array` to a `number` instead, use {@link bytesToNumber}.\n * To convert a two's complement encoded `Uint8Array` to a `bigint`, use\n * {@link bytesToSignedBigInt}.\n *\n * @param bytes - The bytes to convert to a `bigint`.\n * @returns The `bigint`.\n */\nfunction bytesToBigInt(bytes) {\n assertIsBytes(bytes);\n const hexadecimal = bytesToHex(bytes);\n return BigInt(hexadecimal);\n}\nexports.bytesToBigInt = bytesToBigInt;\n/**\n * Convert a `Uint8Array` to a signed `bigint`. This assumes that the bytes are\n * encoded in two's complement.\n *\n * To convert a `Uint8Array` to an unsigned `bigint` instead, use\n * {@link bytesToBigInt}.\n *\n * @see https://en.wikipedia.org/wiki/Two%27s_complement\n * @param bytes - The bytes to convert to a signed `bigint`.\n * @returns The signed `bigint`.\n */\nfunction bytesToSignedBigInt(bytes) {\n assertIsBytes(bytes);\n let value = BigInt(0);\n for (const byte of bytes) {\n // eslint-disable-next-line no-bitwise\n value = (value << BigInt(8)) + BigInt(byte);\n }\n return BigInt.asIntN(bytes.length * 8, value);\n}\nexports.bytesToSignedBigInt = bytesToSignedBigInt;\n/**\n * Convert a `Uint8Array` to a `number`.\n *\n * To convert a `Uint8Array` to a `bigint` instead, use {@link bytesToBigInt}.\n *\n * @param bytes - The bytes to convert to a number.\n * @returns The number.\n * @throws If the resulting number is not a safe integer.\n */\nfunction bytesToNumber(bytes) {\n assertIsBytes(bytes);\n const bigint = bytesToBigInt(bytes);\n (0, assert_1.assert)(bigint <= BigInt(Number.MAX_SAFE_INTEGER), 'Number is not a safe integer. Use `bytesToBigInt` instead.');\n return Number(bigint);\n}\nexports.bytesToNumber = bytesToNumber;\n/**\n * Convert a UTF-8 encoded `Uint8Array` to a `string`.\n *\n * @param bytes - The bytes to convert to a string.\n * @returns The string.\n */\nfunction bytesToString(bytes) {\n assertIsBytes(bytes);\n return new TextDecoder().decode(bytes);\n}\nexports.bytesToString = bytesToString;\n/**\n * Convert a hexadecimal string to a `Uint8Array`. The string can optionally be\n * prefixed with `0x`. It accepts even and odd length strings.\n *\n * If the value is \"0x\", an empty `Uint8Array` is returned.\n *\n * @param value - The hexadecimal string to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction hexToBytes(value) {\n var _a;\n // \"0x\" is often used as empty byte array.\n if (((_a = value === null || value === void 0 ? void 0 : value.toLowerCase) === null || _a === void 0 ? void 0 : _a.call(value)) === '0x') {\n return new Uint8Array();\n }\n (0, hex_1.assertIsHexString)(value);\n // Remove the `0x` prefix if it exists, and pad the string to have an even\n // number of characters.\n const strippedValue = (0, hex_1.remove0x)(value).toLowerCase();\n const normalizedValue = strippedValue.length % 2 === 0 ? strippedValue : `0${strippedValue}`;\n const bytes = new Uint8Array(normalizedValue.length / 2);\n for (let i = 0; i < bytes.length; i++) {\n // While this is not the prettiest way to convert a hexadecimal string to a\n // `Uint8Array`, it is a lot faster than using `parseInt` to convert each\n // character.\n const c1 = normalizedValue.charCodeAt(i * 2);\n const c2 = normalizedValue.charCodeAt(i * 2 + 1);\n const n1 = c1 -\n (c1 < HEX_MAXIMUM_NUMBER_CHARACTER\n ? HEX_MINIMUM_NUMBER_CHARACTER\n : HEX_CHARACTER_OFFSET);\n const n2 = c2 -\n (c2 < HEX_MAXIMUM_NUMBER_CHARACTER\n ? HEX_MINIMUM_NUMBER_CHARACTER\n : HEX_CHARACTER_OFFSET);\n bytes[i] = n1 * 16 + n2;\n }\n return bytes;\n}\nexports.hexToBytes = hexToBytes;\n/**\n * Convert a `bigint` to a `Uint8Array`.\n *\n * This assumes that the `bigint` is an unsigned integer. To convert a signed\n * `bigint` instead, use {@link signedBigIntToBytes}.\n *\n * @param value - The bigint to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction bigIntToBytes(value) {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(value >= BigInt(0), 'Value must be a non-negative bigint.');\n const hexadecimal = value.toString(16);\n return hexToBytes(hexadecimal);\n}\nexports.bigIntToBytes = bigIntToBytes;\n/**\n * Check if a `bigint` fits in a certain number of bytes.\n *\n * @param value - The `bigint` to check.\n * @param bytes - The number of bytes.\n * @returns Whether the `bigint` fits in the number of bytes.\n */\nfunction bigIntFits(value, bytes) {\n (0, assert_1.assert)(bytes > 0);\n /* eslint-disable no-bitwise */\n const mask = value >> BigInt(31);\n return !(((~value & mask) + (value & ~mask)) >> BigInt(bytes * 8 + ~0));\n /* eslint-enable no-bitwise */\n}\n/**\n * Convert a signed `bigint` to a `Uint8Array`. This uses two's complement\n * encoding to represent negative numbers.\n *\n * To convert an unsigned `bigint` to a `Uint8Array` instead, use\n * {@link bigIntToBytes}.\n *\n * @see https://en.wikipedia.org/wiki/Two%27s_complement\n * @param value - The number to convert to bytes.\n * @param byteLength - The length of the resulting `Uint8Array`. If the number\n * is larger than the maximum value that can be represented by the given length,\n * an error is thrown.\n * @returns The bytes as `Uint8Array`.\n */\nfunction signedBigIntToBytes(value, byteLength) {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(typeof byteLength === 'number', 'Byte length must be a number.');\n (0, assert_1.assert)(byteLength > 0, 'Byte length must be greater than 0.');\n (0, assert_1.assert)(bigIntFits(value, byteLength), 'Byte length is too small to represent the given value.');\n // ESLint doesn't like mutating function parameters, so to avoid having to\n // disable the rule, we create a new variable.\n let numberValue = value;\n const bytes = new Uint8Array(byteLength);\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = Number(BigInt.asUintN(8, numberValue));\n // eslint-disable-next-line no-bitwise\n numberValue >>= BigInt(8);\n }\n return bytes.reverse();\n}\nexports.signedBigIntToBytes = signedBigIntToBytes;\n/**\n * Convert a `number` to a `Uint8Array`.\n *\n * @param value - The number to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n * @throws If the number is not a safe integer.\n */\nfunction numberToBytes(value) {\n (0, assert_1.assert)(typeof value === 'number', 'Value must be a number.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative number.');\n (0, assert_1.assert)(Number.isSafeInteger(value), 'Value is not a safe integer. Use `bigIntToBytes` instead.');\n const hexadecimal = value.toString(16);\n return hexToBytes(hexadecimal);\n}\nexports.numberToBytes = numberToBytes;\n/**\n * Convert a `string` to a UTF-8 encoded `Uint8Array`.\n *\n * @param value - The string to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction stringToBytes(value) {\n (0, assert_1.assert)(typeof value === 'string', 'Value must be a string.');\n return new TextEncoder().encode(value);\n}\nexports.stringToBytes = stringToBytes;\n/**\n * Convert a byte-like value to a `Uint8Array`. The value can be a `Uint8Array`,\n * a `bigint`, a `number`, or a `string`.\n *\n * This will attempt to guess the type of the value based on its type and\n * contents. For more control over the conversion, use the more specific\n * conversion functions, such as {@link hexToBytes} or {@link stringToBytes}.\n *\n * If the value is a `string`, and it is prefixed with `0x`, it will be\n * interpreted as a hexadecimal string. Otherwise, it will be interpreted as a\n * UTF-8 string. To convert a hexadecimal string to bytes without interpreting\n * it as a UTF-8 string, use {@link hexToBytes} instead.\n *\n * If the value is a `bigint`, it is assumed to be unsigned. To convert a signed\n * `bigint` to bytes, use {@link signedBigIntToBytes} instead.\n *\n * If the value is a `Uint8Array`, it will be returned as-is.\n *\n * @param value - The value to convert to bytes.\n * @returns The bytes as `Uint8Array`.\n */\nfunction valueToBytes(value) {\n if (typeof value === 'bigint') {\n return bigIntToBytes(value);\n }\n if (typeof value === 'number') {\n return numberToBytes(value);\n }\n if (typeof value === 'string') {\n if (value.startsWith('0x')) {\n return hexToBytes(value);\n }\n return stringToBytes(value);\n }\n if (isBytes(value)) {\n return value;\n }\n throw new TypeError(`Unsupported value type: \"${typeof value}\".`);\n}\nexports.valueToBytes = valueToBytes;\n/**\n * Concatenate multiple byte-like values into a single `Uint8Array`. The values\n * can be `Uint8Array`, `bigint`, `number`, or `string`. This uses\n * {@link valueToBytes} under the hood to convert each value to bytes. Refer to\n * the documentation of that function for more information.\n *\n * @param values - The values to concatenate.\n * @returns The concatenated bytes as `Uint8Array`.\n */\nfunction concatBytes(values) {\n const normalizedValues = new Array(values.length);\n let byteLength = 0;\n for (let i = 0; i < values.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const value = valueToBytes(values[i]);\n normalizedValues[i] = value;\n byteLength += value.length;\n }\n const bytes = new Uint8Array(byteLength);\n for (let i = 0, offset = 0; i < normalizedValues.length; i++) {\n // While we could simply spread the values into an array and use\n // `Uint8Array.from`, that is a lot slower than using `Uint8Array.set`.\n bytes.set(normalizedValues[i], offset);\n offset += normalizedValues[i].length;\n }\n return bytes;\n}\nexports.concatBytes = concatBytes;\n/**\n * Create a {@link DataView} from a {@link Uint8Array}. This is a convenience\n * function that avoids having to create a {@link DataView} manually, which\n * requires passing the `byteOffset` and `byteLength` parameters every time.\n *\n * Not passing the `byteOffset` and `byteLength` parameters can result in\n * unexpected behavior when the {@link Uint8Array} is a view of a larger\n * {@link ArrayBuffer}, e.g., when using {@link Uint8Array.subarray}.\n *\n * This function also supports Node.js {@link Buffer}s.\n *\n * @example\n * ```typescript\n * const bytes = new Uint8Array([1, 2, 3]);\n *\n * // This is equivalent to:\n * // const dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n * const dataView = createDataView(bytes);\n * ```\n * @param bytes - The bytes to create the {@link DataView} from.\n * @returns The {@link DataView}.\n */\nfunction createDataView(bytes) {\n // To maintain compatibility with Node.js, we need to check if the bytes are\n // a Buffer. If so, we need to slice the buffer to get the underlying\n // ArrayBuffer.\n // eslint-disable-next-line no-restricted-globals\n if (typeof Buffer !== 'undefined' && bytes instanceof Buffer) {\n const buffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);\n return new DataView(buffer);\n }\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n}\nexports.createDataView = createDataView;\n//# sourceMappingURL=bytes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst base64_1 = require(\"./base64\");\nexports.ChecksumStruct = (0, superstruct_1.size)((0, base64_1.base64)((0, superstruct_1.string)(), { paddingRequired: true }), 44, 44);\n//# sourceMappingURL=checksum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHex = exports.createBytes = exports.createBigInt = exports.createNumber = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\nconst bytes_1 = require(\"./bytes\");\nconst hex_1 = require(\"./hex\");\nconst NumberLikeStruct = (0, superstruct_1.union)([(0, superstruct_1.number)(), (0, superstruct_1.bigint)(), (0, superstruct_1.string)(), hex_1.StrictHexStruct]);\nconst NumberCoercer = (0, superstruct_1.coerce)((0, superstruct_1.number)(), NumberLikeStruct, Number);\nconst BigIntCoercer = (0, superstruct_1.coerce)((0, superstruct_1.bigint)(), NumberLikeStruct, BigInt);\nconst BytesLikeStruct = (0, superstruct_1.union)([hex_1.StrictHexStruct, (0, superstruct_1.instance)(Uint8Array)]);\nconst BytesCoercer = (0, superstruct_1.coerce)((0, superstruct_1.instance)(Uint8Array), (0, superstruct_1.union)([hex_1.StrictHexStruct]), bytes_1.hexToBytes);\nconst HexCoercer = (0, superstruct_1.coerce)(hex_1.StrictHexStruct, (0, superstruct_1.instance)(Uint8Array), bytes_1.bytesToHex);\n/**\n * Create a number from a number-like value.\n *\n * - If the value is a number, it is returned as-is.\n * - If the value is a `bigint`, it is converted to a number.\n * - If the value is a string, it is interpreted as a decimal number.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is\n * interpreted as a hexadecimal number.\n *\n * This validates that the value is a number-like value, and that the resulting\n * number is not `NaN` or `Infinity`.\n *\n * @example\n * ```typescript\n * const value = createNumber('0x010203');\n * console.log(value); // 66051\n *\n * const otherValue = createNumber(123n);\n * console.log(otherValue); // 123\n * ```\n * @param value - The value to create the number from.\n * @returns The created number.\n * @throws If the value is not a number-like value, or if the resulting number\n * is `NaN` or `Infinity`.\n */\nfunction createNumber(value) {\n try {\n const result = (0, superstruct_1.create)(value, NumberCoercer);\n (0, assert_1.assert)(Number.isFinite(result), `Expected a number-like value, got \"${value}\".`);\n return result;\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a number-like value, got \"${value}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createNumber = createNumber;\n/**\n * Create a `bigint` from a number-like value.\n *\n * - If the value is a number, it is converted to a `bigint`.\n * - If the value is a `bigint`, it is returned as-is.\n * - If the value is a string, it is interpreted as a decimal number and\n * converted to a `bigint`.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is\n * interpreted as a hexadecimal number and converted to a `bigint`.\n *\n * @example\n * ```typescript\n * const value = createBigInt('0x010203');\n * console.log(value); // 16909060n\n *\n * const otherValue = createBigInt(123);\n * console.log(otherValue); // 123n\n * ```\n * @param value - The value to create the bigint from.\n * @returns The created bigint.\n * @throws If the value is not a number-like value.\n */\nfunction createBigInt(value) {\n try {\n // The `BigInt` constructor throws if the value is not a number-like value.\n // There is no need to validate the value manually.\n return (0, superstruct_1.create)(value, BigIntCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a number-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createBigInt = createBigInt;\n/**\n * Create a byte array from a bytes-like value.\n *\n * - If the value is a byte array, it is returned as-is.\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is interpreted\n * as a hexadecimal number and converted to a byte array.\n *\n * @example\n * ```typescript\n * const value = createBytes('0x010203');\n * console.log(value); // Uint8Array [ 1, 2, 3 ]\n *\n * const otherValue = createBytes('0x010203');\n * console.log(otherValue); // Uint8Array [ 1, 2, 3 ]\n * ```\n * @param value - The value to create the byte array from.\n * @returns The created byte array.\n * @throws If the value is not a bytes-like value.\n */\nfunction createBytes(value) {\n if (typeof value === 'string' && value.toLowerCase() === '0x') {\n return new Uint8Array();\n }\n try {\n return (0, superstruct_1.create)(value, BytesCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a bytes-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createBytes = createBytes;\n/**\n * Create a hexadecimal string from a bytes-like value.\n *\n * - If the value is a hex string (i.e., it starts with \"0x\"), it is returned\n * as-is.\n * - If the value is a `Uint8Array`, it is converted to a hex string.\n *\n * @example\n * ```typescript\n * const value = createHex(new Uint8Array([1, 2, 3]));\n * console.log(value); // '0x010203'\n *\n * const otherValue = createHex('0x010203');\n * console.log(otherValue); // '0x010203'\n * ```\n * @param value - The value to create the hex string from.\n * @returns The created hex string.\n * @throws If the value is not a bytes-like value.\n */\nfunction createHex(value) {\n if ((value instanceof Uint8Array && value.length === 0) ||\n (typeof value === 'string' && value.toLowerCase() === '0x')) {\n return '0x';\n }\n try {\n return (0, superstruct_1.create)(value, HexCoercer);\n }\n catch (error) {\n if (error instanceof superstruct_1.StructError) {\n throw new Error(`Expected a bytes-like value, got \"${String(error.value)}\".`);\n }\n /* istanbul ignore next */\n throw error;\n }\n}\nexports.createHex = createHex;\n//# sourceMappingURL=coercers.js.map","\"use strict\";\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _FrozenMap_map, _FrozenSet_set;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FrozenSet = exports.FrozenMap = void 0;\n/**\n * A {@link ReadonlyMap} that cannot be modified after instantiation.\n * The implementation uses an inner map hidden via a private field, and the\n * immutability guarantee relies on it being impossible to get a reference\n * to this map.\n */\nclass FrozenMap {\n constructor(entries) {\n _FrozenMap_map.set(this, void 0);\n __classPrivateFieldSet(this, _FrozenMap_map, new Map(entries), \"f\");\n Object.freeze(this);\n }\n get size() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").size;\n }\n [(_FrozenMap_map = new WeakMap(), Symbol.iterator)]() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\")[Symbol.iterator]();\n }\n entries() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").entries();\n }\n forEach(callbackfn, thisArg) {\n // We have to wrap the specified callback in order to prevent it from\n // receiving a reference to the inner map.\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").forEach((value, key, _map) => callbackfn.call(thisArg, value, key, this));\n }\n get(key) {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").get(key);\n }\n has(key) {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").has(key);\n }\n keys() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").keys();\n }\n values() {\n return __classPrivateFieldGet(this, _FrozenMap_map, \"f\").values();\n }\n toString() {\n return `FrozenMap(${this.size}) {${this.size > 0\n ? ` ${[...this.entries()]\n .map(([key, value]) => `${String(key)} => ${String(value)}`)\n .join(', ')} `\n : ''}}`;\n }\n}\nexports.FrozenMap = FrozenMap;\n/**\n * A {@link ReadonlySet} that cannot be modified after instantiation.\n * The implementation uses an inner set hidden via a private field, and the\n * immutability guarantee relies on it being impossible to get a reference\n * to this set.\n */\nclass FrozenSet {\n constructor(values) {\n _FrozenSet_set.set(this, void 0);\n __classPrivateFieldSet(this, _FrozenSet_set, new Set(values), \"f\");\n Object.freeze(this);\n }\n get size() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").size;\n }\n [(_FrozenSet_set = new WeakMap(), Symbol.iterator)]() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\")[Symbol.iterator]();\n }\n entries() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").entries();\n }\n forEach(callbackfn, thisArg) {\n // We have to wrap the specified callback in order to prevent it from\n // receiving a reference to the inner set.\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").forEach((value, value2, _set) => callbackfn.call(thisArg, value, value2, this));\n }\n has(value) {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").has(value);\n }\n keys() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").keys();\n }\n values() {\n return __classPrivateFieldGet(this, _FrozenSet_set, \"f\").values();\n }\n toString() {\n return `FrozenSet(${this.size}) {${this.size > 0\n ? ` ${[...this.values()].map((member) => String(member)).join(', ')} `\n : ''}}`;\n }\n}\nexports.FrozenSet = FrozenSet;\nObject.freeze(FrozenMap);\nObject.freeze(FrozenMap.prototype);\nObject.freeze(FrozenSet);\nObject.freeze(FrozenSet.prototype);\n//# sourceMappingURL=collections.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=encryption-types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getJsonRpcIdValidator = exports.assertIsJsonRpcError = exports.isJsonRpcError = exports.assertIsJsonRpcFailure = exports.isJsonRpcFailure = exports.assertIsJsonRpcSuccess = exports.isJsonRpcSuccess = exports.assertIsJsonRpcResponse = exports.isJsonRpcResponse = exports.assertIsPendingJsonRpcResponse = exports.isPendingJsonRpcResponse = exports.JsonRpcResponseStruct = exports.JsonRpcFailureStruct = exports.JsonRpcSuccessStruct = exports.PendingJsonRpcResponseStruct = exports.assertIsJsonRpcRequest = exports.isJsonRpcRequest = exports.assertIsJsonRpcNotification = exports.isJsonRpcNotification = exports.JsonRpcNotificationStruct = exports.JsonRpcRequestStruct = exports.JsonRpcParamsStruct = exports.JsonRpcErrorStruct = exports.JsonRpcIdStruct = exports.JsonRpcVersionStruct = exports.jsonrpc2 = exports.getJsonSize = exports.isValidJson = exports.JsonStruct = exports.UnsafeJsonStruct = void 0;\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * A struct to check if the given value is finite number. Superstruct's\n * `number()` struct does not check if the value is finite.\n *\n * @returns A struct to check if the given value is finite number.\n */\nconst finiteNumber = () => (0, superstruct_1.define)('finite number', (value) => {\n return (0, superstruct_1.is)(value, (0, superstruct_1.number)()) && Number.isFinite(value);\n});\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * Note that this struct is unsafe. For safe validation, use {@link JsonStruct}.\n */\n// We cannot infer the type of the struct, because it is recursive.\nexports.UnsafeJsonStruct = (0, superstruct_1.union)([\n (0, superstruct_1.literal)(null),\n (0, superstruct_1.boolean)(),\n finiteNumber(),\n (0, superstruct_1.string)(),\n (0, superstruct_1.array)((0, superstruct_1.lazy)(() => exports.UnsafeJsonStruct)),\n (0, superstruct_1.record)((0, superstruct_1.string)(), (0, superstruct_1.lazy)(() => exports.UnsafeJsonStruct)),\n]);\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * This struct sanitizes the value before validating it, so that it is safe to\n * use with untrusted input.\n */\nexports.JsonStruct = (0, superstruct_1.define)('Json', (value, context) => {\n /**\n * Helper function that runs the given struct validator and returns the\n * validation errors, if any. If the value is valid, it returns `true`.\n *\n * @param innerValue - The value to validate.\n * @param struct - The struct to use for validation.\n * @returns The validation errors, or `true` if the value is valid.\n */\n function checkStruct(innerValue, struct) {\n const iterator = struct.validator(innerValue, context);\n const errors = [...iterator];\n if (errors.length > 0) {\n return errors;\n }\n return true;\n }\n try {\n // The plain value must be a valid JSON value, but it may be altered in the\n // process of JSON serialization, so we need to validate it again after\n // serialization. This has the added benefit that the returned error messages\n // will be more helpful, as they will point to the exact location of the\n // invalid value.\n //\n // This seems overcomplicated, but without checking the plain value first,\n // there are some cases where the validation passes, even though the value is\n // not valid JSON. For example, `undefined` is not valid JSON, but serializing\n // it will remove it from the object, so the validation will pass.\n const unsafeResult = checkStruct(value, exports.UnsafeJsonStruct);\n if (unsafeResult !== true) {\n return unsafeResult;\n }\n // JavaScript engines are highly optimized for this specific use case of\n // JSON parsing and stringifying, so there should be no performance impact.\n return checkStruct(JSON.parse(JSON.stringify(value)), exports.UnsafeJsonStruct);\n }\n catch (error) {\n if (error instanceof RangeError) {\n return 'Circular reference detected';\n }\n return false;\n }\n});\n/**\n * Check if the given value is a valid {@link Json} value, i.e., a value that is\n * serializable to JSON.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid {@link Json} value.\n */\nfunction isValidJson(value) {\n return (0, superstruct_1.is)(value, exports.JsonStruct);\n}\nexports.isValidJson = isValidJson;\n/**\n * Get the size of a JSON value in bytes. This also validates the value.\n *\n * @param value - The JSON value to get the size of.\n * @returns The size of the JSON value in bytes.\n */\nfunction getJsonSize(value) {\n (0, assert_1.assertStruct)(value, exports.JsonStruct, 'Invalid JSON value');\n const json = JSON.stringify(value);\n return new TextEncoder().encode(json).byteLength;\n}\nexports.getJsonSize = getJsonSize;\n/**\n * The string '2.0'.\n */\nexports.jsonrpc2 = '2.0';\nexports.JsonRpcVersionStruct = (0, superstruct_1.literal)(exports.jsonrpc2);\nexports.JsonRpcIdStruct = (0, superstruct_1.nullable)((0, superstruct_1.union)([(0, superstruct_1.number)(), (0, superstruct_1.string)()]));\nexports.JsonRpcErrorStruct = (0, superstruct_1.object)({\n code: (0, superstruct_1.integer)(),\n message: (0, superstruct_1.string)(),\n data: (0, superstruct_1.optional)(exports.JsonStruct),\n stack: (0, superstruct_1.optional)((0, superstruct_1.string)()),\n});\nexports.JsonRpcParamsStruct = (0, superstruct_1.optional)((0, superstruct_1.union)([(0, superstruct_1.record)((0, superstruct_1.string)(), exports.JsonStruct), (0, superstruct_1.array)(exports.JsonStruct)]));\nexports.JsonRpcRequestStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n method: (0, superstruct_1.string)(),\n params: exports.JsonRpcParamsStruct,\n});\nexports.JsonRpcNotificationStruct = (0, superstruct_1.omit)(exports.JsonRpcRequestStruct, ['id']);\n/**\n * Check if the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcNotification}\n * object.\n */\nfunction isJsonRpcNotification(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcNotificationStruct);\n}\nexports.isJsonRpcNotification = isJsonRpcNotification;\n/**\n * Assert that the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcNotification} object.\n */\nfunction assertIsJsonRpcNotification(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcNotificationStruct, 'Invalid JSON-RPC notification', ErrorWrapper);\n}\nexports.assertIsJsonRpcNotification = assertIsJsonRpcNotification;\n/**\n * Check if the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcRequest} object.\n */\nfunction isJsonRpcRequest(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcRequestStruct);\n}\nexports.isJsonRpcRequest = isJsonRpcRequest;\n/**\n * Assert that the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The JSON-RPC request or notification to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcRequest} object.\n */\nfunction assertIsJsonRpcRequest(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcRequestStruct, 'Invalid JSON-RPC request', ErrorWrapper);\n}\nexports.assertIsJsonRpcRequest = assertIsJsonRpcRequest;\nexports.PendingJsonRpcResponseStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n result: (0, superstruct_1.optional)((0, superstruct_1.unknown)()),\n error: (0, superstruct_1.optional)(exports.JsonRpcErrorStruct),\n});\nexports.JsonRpcSuccessStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n result: exports.JsonStruct,\n});\nexports.JsonRpcFailureStruct = (0, superstruct_1.object)({\n id: exports.JsonRpcIdStruct,\n jsonrpc: exports.JsonRpcVersionStruct,\n error: exports.JsonRpcErrorStruct,\n});\nexports.JsonRpcResponseStruct = (0, superstruct_1.union)([\n exports.JsonRpcSuccessStruct,\n exports.JsonRpcFailureStruct,\n]);\n/**\n * Type guard to check whether specified JSON-RPC response is a\n * {@link PendingJsonRpcResponse}.\n *\n * @param response - The JSON-RPC response to check.\n * @returns Whether the specified JSON-RPC response is pending.\n */\nfunction isPendingJsonRpcResponse(response) {\n return (0, superstruct_1.is)(response, exports.PendingJsonRpcResponseStruct);\n}\nexports.isPendingJsonRpcResponse = isPendingJsonRpcResponse;\n/**\n * Assert that the given value is a valid {@link PendingJsonRpcResponse} object.\n *\n * @param response - The JSON-RPC response to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link PendingJsonRpcResponse}\n * object.\n */\nfunction assertIsPendingJsonRpcResponse(response, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(response, exports.PendingJsonRpcResponseStruct, 'Invalid pending JSON-RPC response', ErrorWrapper);\n}\nexports.assertIsPendingJsonRpcResponse = assertIsPendingJsonRpcResponse;\n/**\n * Type guard to check if a value is a {@link JsonRpcResponse}.\n *\n * @param response - The object to check.\n * @returns Whether the object is a JsonRpcResponse.\n */\nfunction isJsonRpcResponse(response) {\n return (0, superstruct_1.is)(response, exports.JsonRpcResponseStruct);\n}\nexports.isJsonRpcResponse = isJsonRpcResponse;\n/**\n * Assert that the given value is a valid {@link JsonRpcResponse} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcResponse} object.\n */\nfunction assertIsJsonRpcResponse(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcResponseStruct, 'Invalid JSON-RPC response', ErrorWrapper);\n}\nexports.assertIsJsonRpcResponse = assertIsJsonRpcResponse;\n/**\n * Check if the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcSuccess} object.\n */\nfunction isJsonRpcSuccess(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcSuccessStruct);\n}\nexports.isJsonRpcSuccess = isJsonRpcSuccess;\n/**\n * Assert that the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcSuccess} object.\n */\nfunction assertIsJsonRpcSuccess(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcSuccessStruct, 'Invalid JSON-RPC success response', ErrorWrapper);\n}\nexports.assertIsJsonRpcSuccess = assertIsJsonRpcSuccess;\n/**\n * Check if the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcFailure} object.\n */\nfunction isJsonRpcFailure(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcFailureStruct);\n}\nexports.isJsonRpcFailure = isJsonRpcFailure;\n/**\n * Assert that the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcFailure} object.\n */\nfunction assertIsJsonRpcFailure(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcFailureStruct, 'Invalid JSON-RPC failure response', ErrorWrapper);\n}\nexports.assertIsJsonRpcFailure = assertIsJsonRpcFailure;\n/**\n * Check if the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcError} object.\n */\nfunction isJsonRpcError(value) {\n return (0, superstruct_1.is)(value, exports.JsonRpcErrorStruct);\n}\nexports.isJsonRpcError = isJsonRpcError;\n/**\n * Assert that the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcError} object.\n */\nfunction assertIsJsonRpcError(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n (0, assert_1.assertStruct)(value, exports.JsonRpcErrorStruct, 'Invalid JSON-RPC error', ErrorWrapper);\n}\nexports.assertIsJsonRpcError = assertIsJsonRpcError;\n/**\n * Gets a function for validating JSON-RPC request / response `id` values.\n *\n * By manipulating the options of this factory, you can control the behavior\n * of the resulting validator for some edge cases. This is useful because e.g.\n * `null` should sometimes but not always be permitted.\n *\n * Note that the empty string (`''`) is always permitted by the JSON-RPC\n * specification, but that kind of sucks and you may want to forbid it in some\n * instances anyway.\n *\n * For more details, see the\n * [JSON-RPC Specification](https://www.jsonrpc.org/specification).\n *\n * @param options - An options object.\n * @param options.permitEmptyString - Whether the empty string (i.e. `''`)\n * should be treated as a valid ID. Default: `true`\n * @param options.permitFractions - Whether fractional numbers (e.g. `1.2`)\n * should be treated as valid IDs. Default: `false`\n * @param options.permitNull - Whether `null` should be treated as a valid ID.\n * Default: `true`\n * @returns The JSON-RPC ID validator function.\n */\nfunction getJsonRpcIdValidator(options) {\n const { permitEmptyString, permitFractions, permitNull } = Object.assign({ permitEmptyString: true, permitFractions: false, permitNull: true }, options);\n /**\n * Type guard for {@link JsonRpcId}.\n *\n * @param id - The JSON-RPC ID value to check.\n * @returns Whether the given ID is valid per the options given to the\n * factory.\n */\n const isValidJsonRpcId = (id) => {\n return Boolean((typeof id === 'number' && (permitFractions || Number.isInteger(id))) ||\n (typeof id === 'string' && (permitEmptyString || id.length > 0)) ||\n (permitNull && id === null));\n };\n return isValidJsonRpcId;\n}\nexports.getJsonRpcIdValidator = getJsonRpcIdValidator;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=keyring.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createModuleLogger = exports.createProjectLogger = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst globalLogger = (0, debug_1.default)('metamask');\n/**\n * Creates a logger via the `debug` library whose log messages will be tagged\n * using the name of your project. By default, such messages will be\n * suppressed, but you can reveal them by setting the `DEBUG` environment\n * variable to `metamask:`. You can also set this variable to\n * `metamask:*` if you want to see log messages from all MetaMask projects that\n * are also using this function to create their loggers.\n *\n * @param projectName - The name of your project. This should be the name of\n * your NPM package if you're developing one.\n * @returns An instance of `debug`.\n */\nfunction createProjectLogger(projectName) {\n return globalLogger.extend(projectName);\n}\nexports.createProjectLogger = createProjectLogger;\n/**\n * Creates a logger via the `debug` library which is derived from the logger for\n * the whole project whose log messages will be tagged using the name of your\n * module. By default, such messages will be suppressed, but you can reveal them\n * by setting the `DEBUG` environment variable to\n * `metamask::`. You can also set this variable to\n * `metamask::*` if you want to see log messages from the project,\n * or `metamask:*` if you want to see log messages from all MetaMask projects.\n *\n * @param projectLogger - The logger created via {@link createProjectLogger}.\n * @param moduleName - The name of your module. You could use the name of the\n * file where you're using this logger or some other name.\n * @returns An instance of `debug`.\n */\nfunction createModuleLogger(projectLogger, moduleName) {\n return projectLogger.extend(moduleName);\n}\nexports.createModuleLogger = createModuleLogger;\n//# sourceMappingURL=logging.js.map","\"use strict\";\n//\n// Types\n//\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateNumberSize = exports.calculateStringSize = exports.isASCII = exports.isPlainObject = exports.ESCAPE_CHARACTERS_REGEXP = exports.JsonSize = exports.hasProperty = exports.isObject = exports.isNullOrUndefined = exports.isNonEmptyArray = void 0;\n//\n// Type Guards\n//\n/**\n * A {@link NonEmptyArray} type guard.\n *\n * @template Element - The non-empty array member type.\n * @param value - The value to check.\n * @returns Whether the value is a non-empty array.\n */\nfunction isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\nexports.isNonEmptyArray = isNonEmptyArray;\n/**\n * Type guard for \"nullishness\".\n *\n * @param value - Any value.\n * @returns `true` if the value is null or undefined, `false` otherwise.\n */\nfunction isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n/**\n * A type guard for {@link RuntimeObject}.\n *\n * @param value - The value to check.\n * @returns Whether the specified value has a runtime type of `object` and is\n * neither `null` nor an `Array`.\n */\nfunction isObject(value) {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\nexports.isObject = isObject;\n//\n// Other utility functions\n//\n/**\n * A type guard for ensuring an object has a property.\n *\n * @param objectToCheck - The object to check.\n * @param name - The property name to check for.\n * @returns Whether the specified object has an own property with the specified\n * name, regardless of whether it is enumerable or not.\n */\nconst hasProperty = (objectToCheck, name) => Object.hasOwnProperty.call(objectToCheck, name);\nexports.hasProperty = hasProperty;\n/**\n * Predefined sizes (in Bytes) of specific parts of JSON structure.\n */\nvar JsonSize;\n(function (JsonSize) {\n JsonSize[JsonSize[\"Null\"] = 4] = \"Null\";\n JsonSize[JsonSize[\"Comma\"] = 1] = \"Comma\";\n JsonSize[JsonSize[\"Wrapper\"] = 1] = \"Wrapper\";\n JsonSize[JsonSize[\"True\"] = 4] = \"True\";\n JsonSize[JsonSize[\"False\"] = 5] = \"False\";\n JsonSize[JsonSize[\"Quote\"] = 1] = \"Quote\";\n JsonSize[JsonSize[\"Colon\"] = 1] = \"Colon\";\n // eslint-disable-next-line @typescript-eslint/no-shadow\n JsonSize[JsonSize[\"Date\"] = 24] = \"Date\";\n})(JsonSize = exports.JsonSize || (exports.JsonSize = {}));\n/**\n * Regular expression with pattern matching for (special) escaped characters.\n */\nexports.ESCAPE_CHARACTERS_REGEXP = /\"|\\\\|\\n|\\r|\\t/gu;\n/**\n * Check if the value is plain object.\n *\n * @param value - Value to be checked.\n * @returns True if an object is the plain JavaScript object,\n * false if the object is not plain (e.g. function).\n */\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n }\n catch (_) {\n return false;\n }\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Check if character is ASCII.\n *\n * @param character - Character.\n * @returns True if a character code is ASCII, false if not.\n */\nfunction isASCII(character) {\n return character.charCodeAt(0) <= 127;\n}\nexports.isASCII = isASCII;\n/**\n * Calculate string size.\n *\n * @param value - String value to calculate size.\n * @returns Number of bytes used to store whole string value.\n */\nfunction calculateStringSize(value) {\n var _a;\n const size = value.split('').reduce((total, character) => {\n if (isASCII(character)) {\n return total + 1;\n }\n return total + 2;\n }, 0);\n // Also detect characters that need backslash escape\n return size + ((_a = value.match(exports.ESCAPE_CHARACTERS_REGEXP)) !== null && _a !== void 0 ? _a : []).length;\n}\nexports.calculateStringSize = calculateStringSize;\n/**\n * Calculate size of a number ofter JSON serialization.\n *\n * @param value - Number value to calculate size.\n * @returns Number of bytes used to store whole number in JSON.\n */\nfunction calculateNumberSize(value) {\n return value.toString().length;\n}\nexports.calculateNumberSize = calculateNumberSize;\n//# sourceMappingURL=misc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBigInt = exports.hexToNumber = exports.bigIntToHex = exports.numberToHex = void 0;\nconst assert_1 = require(\"./assert\");\nconst hex_1 = require(\"./hex\");\n/**\n * Convert a number to a hexadecimal string. This verifies that the number is a\n * non-negative safe integer.\n *\n * To convert a `bigint` to a hexadecimal string instead, use\n * {@link bigIntToHex}.\n *\n * @example\n * ```typescript\n * numberToHex(0); // '0x0'\n * numberToHex(1); // '0x1'\n * numberToHex(16); // '0x10'\n * ```\n * @param value - The number to convert to a hexadecimal string.\n * @returns The hexadecimal string, with the \"0x\"-prefix.\n * @throws If the number is not a non-negative safe integer.\n */\nconst numberToHex = (value) => {\n (0, assert_1.assert)(typeof value === 'number', 'Value must be a number.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative number.');\n (0, assert_1.assert)(Number.isSafeInteger(value), 'Value is not a safe integer. Use `bigIntToHex` instead.');\n return (0, hex_1.add0x)(value.toString(16));\n};\nexports.numberToHex = numberToHex;\n/**\n * Convert a `bigint` to a hexadecimal string. This verifies that the `bigint`\n * is a non-negative integer.\n *\n * To convert a number to a hexadecimal string instead, use {@link numberToHex}.\n *\n * @example\n * ```typescript\n * bigIntToHex(0n); // '0x0'\n * bigIntToHex(1n); // '0x1'\n * bigIntToHex(16n); // '0x10'\n * ```\n * @param value - The `bigint` to convert to a hexadecimal string.\n * @returns The hexadecimal string, with the \"0x\"-prefix.\n * @throws If the `bigint` is not a non-negative integer.\n */\nconst bigIntToHex = (value) => {\n (0, assert_1.assert)(typeof value === 'bigint', 'Value must be a bigint.');\n (0, assert_1.assert)(value >= 0, 'Value must be a non-negative bigint.');\n return (0, hex_1.add0x)(value.toString(16));\n};\nexports.bigIntToHex = bigIntToHex;\n/**\n * Convert a hexadecimal string to a number. This verifies that the string is a\n * valid hex string, and that the resulting number is a safe integer. Both\n * \"0x\"-prefixed and unprefixed strings are supported.\n *\n * To convert a hexadecimal string to a `bigint` instead, use\n * {@link hexToBigInt}.\n *\n * @example\n * ```typescript\n * hexToNumber('0x0'); // 0\n * hexToNumber('0x1'); // 1\n * hexToNumber('0x10'); // 16\n * ```\n * @param value - The hexadecimal string to convert to a number.\n * @returns The number.\n * @throws If the value is not a valid hexadecimal string, or if the resulting\n * number is not a safe integer.\n */\nconst hexToNumber = (value) => {\n (0, hex_1.assertIsHexString)(value);\n // `parseInt` accepts values without the \"0x\"-prefix, whereas `Number` does\n // not. Using this is slightly faster than `Number(add0x(value))`.\n const numberValue = parseInt(value, 16);\n (0, assert_1.assert)(Number.isSafeInteger(numberValue), 'Value is not a safe integer. Use `hexToBigInt` instead.');\n return numberValue;\n};\nexports.hexToNumber = hexToNumber;\n/**\n * Convert a hexadecimal string to a `bigint`. This verifies that the string is\n * a valid hex string. Both \"0x\"-prefixed and unprefixed strings are supported.\n *\n * To convert a hexadecimal string to a number instead, use {@link hexToNumber}.\n *\n * @example\n * ```typescript\n * hexToBigInt('0x0'); // 0n\n * hexToBigInt('0x1'); // 1n\n * hexToBigInt('0x10'); // 16n\n * ```\n * @param value - The hexadecimal string to convert to a `bigint`.\n * @returns The `bigint`.\n * @throws If the value is not a valid hexadecimal string.\n */\nconst hexToBigInt = (value) => {\n (0, hex_1.assertIsHexString)(value);\n // The `BigInt` constructor requires the \"0x\"-prefix to parse a hex string.\n return BigInt((0, hex_1.add0x)(value));\n};\nexports.hexToBigInt = hexToBigInt;\n//# sourceMappingURL=number.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=opaque.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.timeSince = exports.inMilliseconds = exports.Duration = void 0;\n/**\n * Common duration constants, in milliseconds.\n */\nvar Duration;\n(function (Duration) {\n /**\n * A millisecond.\n */\n Duration[Duration[\"Millisecond\"] = 1] = \"Millisecond\";\n /**\n * A second, in milliseconds.\n */\n Duration[Duration[\"Second\"] = 1000] = \"Second\";\n /**\n * A minute, in milliseconds.\n */\n Duration[Duration[\"Minute\"] = 60000] = \"Minute\";\n /**\n * An hour, in milliseconds.\n */\n Duration[Duration[\"Hour\"] = 3600000] = \"Hour\";\n /**\n * A day, in milliseconds.\n */\n Duration[Duration[\"Day\"] = 86400000] = \"Day\";\n /**\n * A week, in milliseconds.\n */\n Duration[Duration[\"Week\"] = 604800000] = \"Week\";\n /**\n * A year, in milliseconds.\n */\n Duration[Duration[\"Year\"] = 31536000000] = \"Year\";\n})(Duration = exports.Duration || (exports.Duration = {}));\nconst isNonNegativeInteger = (number) => Number.isInteger(number) && number >= 0;\nconst assertIsNonNegativeInteger = (number, name) => {\n if (!isNonNegativeInteger(number)) {\n throw new Error(`\"${name}\" must be a non-negative integer. Received: \"${number}\".`);\n }\n};\n/**\n * Calculates the millisecond value of the specified number of units of time.\n *\n * @param count - The number of units of time.\n * @param duration - The unit of time to count.\n * @returns The count multiplied by the specified duration.\n */\nfunction inMilliseconds(count, duration) {\n assertIsNonNegativeInteger(count, 'count');\n return count * duration;\n}\nexports.inMilliseconds = inMilliseconds;\n/**\n * Gets the milliseconds since a particular Unix epoch timestamp.\n *\n * @param timestamp - A Unix millisecond timestamp.\n * @returns The number of milliseconds elapsed since the specified timestamp.\n */\nfunction timeSince(timestamp) {\n assertIsNonNegativeInteger(timestamp, 'timestamp');\n return Date.now() - timestamp;\n}\nexports.timeSince = timeSince;\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=transaction-types.js.map","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.satisfiesVersionRange = exports.gtRange = exports.gtVersion = exports.assertIsSemVerRange = exports.assertIsSemVerVersion = exports.isValidSemVerRange = exports.isValidSemVerVersion = exports.VersionRangeStruct = exports.VersionStruct = void 0;\nconst semver_1 = require(\"semver\");\nconst superstruct_1 = require(\"superstruct\");\nconst assert_1 = require(\"./assert\");\n/**\n * A struct for validating a version string.\n */\nexports.VersionStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version', (value) => {\n if ((0, semver_1.valid)(value) === null) {\n return `Expected SemVer version, got \"${value}\"`;\n }\n return true;\n});\nexports.VersionRangeStruct = (0, superstruct_1.refine)((0, superstruct_1.string)(), 'Version range', (value) => {\n if ((0, semver_1.validRange)(value) === null) {\n return `Expected SemVer range, got \"${value}\"`;\n }\n return true;\n});\n/**\n * Checks whether a SemVer version is valid.\n *\n * @param version - A potential version.\n * @returns `true` if the version is valid, and `false` otherwise.\n */\nfunction isValidSemVerVersion(version) {\n return (0, superstruct_1.is)(version, exports.VersionStruct);\n}\nexports.isValidSemVerVersion = isValidSemVerVersion;\n/**\n * Checks whether a SemVer version range is valid.\n *\n * @param versionRange - A potential version range.\n * @returns `true` if the version range is valid, and `false` otherwise.\n */\nfunction isValidSemVerRange(versionRange) {\n return (0, superstruct_1.is)(versionRange, exports.VersionRangeStruct);\n}\nexports.isValidSemVerRange = isValidSemVerRange;\n/**\n * Asserts that a value is a valid concrete SemVer version.\n *\n * @param version - A potential SemVer concrete version.\n */\nfunction assertIsSemVerVersion(version) {\n (0, assert_1.assertStruct)(version, exports.VersionStruct);\n}\nexports.assertIsSemVerVersion = assertIsSemVerVersion;\n/**\n * Asserts that a value is a valid SemVer range.\n *\n * @param range - A potential SemVer range.\n */\nfunction assertIsSemVerRange(range) {\n (0, assert_1.assertStruct)(range, exports.VersionRangeStruct);\n}\nexports.assertIsSemVerRange = assertIsSemVerRange;\n/**\n * Checks whether a SemVer version is greater than another.\n *\n * @param version1 - The left-hand version.\n * @param version2 - The right-hand version.\n * @returns `version1 > version2`.\n */\nfunction gtVersion(version1, version2) {\n return (0, semver_1.gt)(version1, version2);\n}\nexports.gtVersion = gtVersion;\n/**\n * Checks whether a SemVer version is greater than all possibilities in a range.\n *\n * @param version - A SemvVer version.\n * @param range - The range to check against.\n * @returns `version > range`.\n */\nfunction gtRange(version, range) {\n return (0, semver_1.gtr)(version, range);\n}\nexports.gtRange = gtRange;\n/**\n * Returns whether a SemVer version satisfies a SemVer range.\n *\n * @param version - The SemVer version to check.\n * @param versionRange - The SemVer version range to check against.\n * @returns Whether the version satisfied the version range.\n */\nfunction satisfiesVersionRange(version, versionRange) {\n return (0, semver_1.satisfies)(version, versionRange, {\n includePrerelease: true,\n });\n}\nexports.satisfiesVersionRange = satisfiesVersionRange;\n//# sourceMappingURL=versions.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./assert\"), exports);\n__exportStar(require(\"./base64\"), exports);\n__exportStar(require(\"./bytes\"), exports);\n__exportStar(require(\"./checksum\"), exports);\n__exportStar(require(\"./coercers\"), exports);\n__exportStar(require(\"./collections\"), exports);\n__exportStar(require(\"./encryption-types\"), exports);\n__exportStar(require(\"./hex\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./keyring\"), exports);\n__exportStar(require(\"./logging\"), exports);\n__exportStar(require(\"./misc\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./opaque\"), exports);\n__exportStar(require(\"./time\"), exports);\n__exportStar(require(\"./transaction-types\"), exports);\n__exportStar(require(\"./versions\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createModuleLogger = exports.projectLogger = void 0;\nconst utils_1 = require(\"@metamask/utils\");\nObject.defineProperty(exports, \"createModuleLogger\", { enumerable: true, get: function () { return utils_1.createModuleLogger; } });\nexports.projectLogger = (0, utils_1.createProjectLogger)('eth-block-tracker');\n//# sourceMappingURL=logging-utils.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PollingBlockTracker = void 0;\nconst json_rpc_random_id_1 = __importDefault(require(\"json-rpc-random-id\"));\nconst pify_1 = __importDefault(require(\"pify\"));\nconst BaseBlockTracker_1 = require(\"./BaseBlockTracker\");\nconst logging_utils_1 = require(\"./logging-utils\");\nconst log = (0, logging_utils_1.createModuleLogger)(logging_utils_1.projectLogger, 'polling-block-tracker');\nconst createRandomId = (0, json_rpc_random_id_1.default)();\nconst sec = 1000;\nclass PollingBlockTracker extends BaseBlockTracker_1.BaseBlockTracker {\n constructor(opts = {}) {\n var _a;\n // parse + validate args\n if (!opts.provider) {\n throw new Error('PollingBlockTracker - no provider specified.');\n }\n super(Object.assign(Object.assign({}, opts), { blockResetDuration: (_a = opts.blockResetDuration) !== null && _a !== void 0 ? _a : opts.pollingInterval }));\n // config\n this._provider = opts.provider;\n this._pollingInterval = opts.pollingInterval || 20 * sec;\n this._retryTimeout = opts.retryTimeout || this._pollingInterval / 10;\n this._keepEventLoopActive =\n opts.keepEventLoopActive === undefined ? true : opts.keepEventLoopActive;\n this._setSkipCacheFlag = opts.setSkipCacheFlag || false;\n }\n // trigger block polling\n async checkForLatestBlock() {\n await this._updateLatestBlock();\n return await this.getLatestBlock();\n }\n async _start() {\n this._synchronize();\n }\n async _end() {\n // No-op\n }\n async _synchronize() {\n var _a;\n while (this._isRunning) {\n try {\n await this._updateLatestBlock();\n const promise = timeout(this._pollingInterval, !this._keepEventLoopActive);\n this.emit('_waitingForNextIteration');\n await promise;\n }\n catch (err) {\n const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\\n${(_a = err.stack) !== null && _a !== void 0 ? _a : err}`);\n try {\n this.emit('error', newErr);\n }\n catch (emitErr) {\n console.error(newErr);\n }\n const promise = timeout(this._retryTimeout, !this._keepEventLoopActive);\n this.emit('_waitingForNextIteration');\n await promise;\n }\n }\n }\n async _updateLatestBlock() {\n // fetch + set latest block\n const latestBlock = await this._fetchLatestBlock();\n this._newPotentialLatest(latestBlock);\n }\n async _fetchLatestBlock() {\n const req = {\n jsonrpc: '2.0',\n id: createRandomId(),\n method: 'eth_blockNumber',\n params: [],\n };\n if (this._setSkipCacheFlag) {\n req.skipCache = true;\n }\n log('Making request', req);\n const res = await (0, pify_1.default)((cb) => this._provider.sendAsync(req, cb))();\n log('Got response', res);\n if (res.error) {\n throw new Error(`PollingBlockTracker - encountered error fetching block:\\n${res.error.message}`);\n }\n return res.result;\n }\n}\nexports.PollingBlockTracker = PollingBlockTracker;\n/**\n * Waits for the specified amount of time.\n *\n * @param duration - The amount of time in milliseconds.\n * @param unref - Assuming this function is run in a Node context, governs\n * whether Node should wait before the `setTimeout` has completed before ending\n * the process (true for no, false for yes). Defaults to false.\n * @returns A promise that can be used to wait.\n */\nfunction timeout(duration, unref) {\n return new Promise((resolve) => {\n const timeoutRef = setTimeout(resolve, duration);\n // don't keep process open\n if (timeoutRef.unref && unref) {\n timeoutRef.unref();\n }\n });\n}\n//# sourceMappingURL=PollingBlockTracker.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubscribeBlockTracker = void 0;\nconst json_rpc_random_id_1 = __importDefault(require(\"json-rpc-random-id\"));\nconst BaseBlockTracker_1 = require(\"./BaseBlockTracker\");\nconst createRandomId = (0, json_rpc_random_id_1.default)();\nclass SubscribeBlockTracker extends BaseBlockTracker_1.BaseBlockTracker {\n constructor(opts = {}) {\n // parse + validate args\n if (!opts.provider) {\n throw new Error('SubscribeBlockTracker - no provider specified.');\n }\n // BaseBlockTracker constructor\n super(opts);\n // config\n this._provider = opts.provider;\n this._subscriptionId = null;\n }\n async checkForLatestBlock() {\n return await this.getLatestBlock();\n }\n async _start() {\n if (this._subscriptionId === undefined || this._subscriptionId === null) {\n try {\n const blockNumber = (await this._call('eth_blockNumber'));\n this._subscriptionId = (await this._call('eth_subscribe', 'newHeads'));\n this._provider.on('data', this._handleSubData.bind(this));\n this._newPotentialLatest(blockNumber);\n }\n catch (e) {\n this.emit('error', e);\n }\n }\n }\n async _end() {\n if (this._subscriptionId !== null && this._subscriptionId !== undefined) {\n try {\n await this._call('eth_unsubscribe', this._subscriptionId);\n this._subscriptionId = null;\n }\n catch (e) {\n this.emit('error', e);\n }\n }\n }\n _call(method, ...params) {\n return new Promise((resolve, reject) => {\n this._provider.sendAsync({\n id: createRandomId(),\n method,\n params,\n jsonrpc: '2.0',\n }, (err, res) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res.result);\n }\n });\n });\n }\n _handleSubData(_, response) {\n var _a;\n if (response.method === 'eth_subscription' &&\n ((_a = response.params) === null || _a === void 0 ? void 0 : _a.subscription) === this._subscriptionId) {\n this._newPotentialLatest(response.params.result.number);\n }\n }\n}\nexports.SubscribeBlockTracker = SubscribeBlockTracker;\n//# sourceMappingURL=SubscribeBlockTracker.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./PollingBlockTracker\"), exports);\n__exportStar(require(\"./SubscribeBlockTracker\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUniqueId = void 0;\n// uint32 (two's complement) max\n// more conservative than Number.MAX_SAFE_INTEGER\nconst MAX = 4294967295;\nlet idCounter = Math.floor(Math.random() * MAX);\nfunction getUniqueId() {\n idCounter = (idCounter + 1) % MAX;\n return idCounter;\n}\nexports.getUniqueId = getUniqueId;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VW5pcXVlSWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZ2V0VW5pcXVlSWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsZ0NBQWdDO0FBQ2hDLGlEQUFpRDtBQUNqRCxNQUFNLEdBQUcsR0FBRyxVQUFVLENBQUM7QUFDdkIsSUFBSSxTQUFTLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLENBQUM7QUFFaEQsU0FBZ0IsV0FBVztJQUN6QixTQUFTLEdBQUcsQ0FBQyxTQUFTLEdBQUcsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDO0lBQ2xDLE9BQU8sU0FBUyxDQUFDO0FBQ25CLENBQUM7QUFIRCxrQ0FHQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createIdRemapMiddleware = void 0;\nconst getUniqueId_1 = require(\"./getUniqueId\");\nfunction createIdRemapMiddleware() {\n return (req, res, next, _end) => {\n const originalId = req.id;\n const newId = getUniqueId_1.getUniqueId();\n req.id = newId;\n res.id = newId;\n next((done) => {\n req.id = originalId;\n res.id = originalId;\n done();\n });\n };\n}\nexports.createIdRemapMiddleware = createIdRemapMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRSZW1hcE1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaWRSZW1hcE1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0NBQTRDO0FBRzVDLFNBQWdCLHVCQUF1QjtJQUNyQyxPQUFPLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLEVBQUU7UUFDOUIsTUFBTSxVQUFVLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQztRQUMxQixNQUFNLEtBQUssR0FBRyx5QkFBVyxFQUFFLENBQUM7UUFDNUIsR0FBRyxDQUFDLEVBQUUsR0FBRyxLQUFLLENBQUM7UUFDZixHQUFHLENBQUMsRUFBRSxHQUFHLEtBQUssQ0FBQztRQUNmLElBQUksQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFO1lBQ1osR0FBRyxDQUFDLEVBQUUsR0FBRyxVQUFVLENBQUM7WUFDcEIsR0FBRyxDQUFDLEVBQUUsR0FBRyxVQUFVLENBQUM7WUFDcEIsSUFBSSxFQUFFLENBQUM7UUFDVCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQztBQUNKLENBQUM7QUFaRCwwREFZQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAsyncMiddleware = void 0;\n/**\n * JsonRpcEngine only accepts callback-based middleware directly.\n * createAsyncMiddleware exists to enable consumers to pass in async middleware\n * functions.\n *\n * Async middleware have no \"end\" function. Instead, they \"end\" if they return\n * without calling \"next\". Rather than passing in explicit return handlers,\n * async middleware can simply await \"next\", and perform operations on the\n * response object when execution resumes.\n *\n * To accomplish this, createAsyncMiddleware passes the async middleware a\n * wrapped \"next\" function. That function calls the internal JsonRpcEngine\n * \"next\" function with a return handler that resolves a promise when called.\n *\n * The return handler will always be called. Its resolution of the promise\n * enables the control flow described above.\n */\nfunction createAsyncMiddleware(asyncMiddleware) {\n return async (req, res, next, end) => {\n // nextPromise is the key to the implementation\n // it is resolved by the return handler passed to the\n // \"next\" function\n let resolveNextPromise;\n const nextPromise = new Promise((resolve) => {\n resolveNextPromise = resolve;\n });\n let returnHandlerCallback = null;\n let nextWasCalled = false;\n // This will be called by the consumer's async middleware.\n const asyncNext = async () => {\n nextWasCalled = true;\n // We pass a return handler to next(). When it is called by the engine,\n // the consumer's async middleware will resume executing.\n // eslint-disable-next-line node/callback-return\n next((runReturnHandlersCallback) => {\n // This callback comes from JsonRpcEngine._runReturnHandlers\n returnHandlerCallback = runReturnHandlersCallback;\n resolveNextPromise();\n });\n await nextPromise;\n };\n try {\n await asyncMiddleware(req, res, asyncNext);\n if (nextWasCalled) {\n await nextPromise; // we must wait until the return handler is called\n returnHandlerCallback(null);\n }\n else {\n end(null);\n }\n }\n catch (error) {\n if (returnHandlerCallback) {\n returnHandlerCallback(error);\n }\n else {\n end(error);\n }\n }\n };\n}\nexports.createAsyncMiddleware = createAsyncMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlQXN5bmNNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NyZWF0ZUFzeW5jTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFnQkE7Ozs7Ozs7Ozs7Ozs7Ozs7R0FnQkc7QUFDSCxTQUFnQixxQkFBcUIsQ0FDbkMsZUFBNkM7SUFFN0MsT0FBTyxLQUFLLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsR0FBRyxFQ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FBQyxLQUFLLENBQUMsQ0FBQzthQUN6RDtpQkFBTTtnQkFDTCxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7YUFDWjtTQUNGO0lBQ0gsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQS9DRCxzREErQ0MifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createScaffoldMiddleware = void 0;\nfunction createScaffoldMiddleware(handlers) {\n return (req, res, next, end) => {\n const handler = handlers[req.method];\n // if no handler, return\n if (handler === undefined) {\n return next();\n }\n // if handler is fn, call as middleware\n if (typeof handler === 'function') {\n return handler(req, res, next, end);\n }\n // if handler is some other value, use as result\n res.result = handler;\n return end();\n };\n}\nexports.createScaffoldMiddleware = createScaffoldMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlU2NhZmZvbGRNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NyZWF0ZVNjYWZmb2xkTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxTQUFnQix3QkFBd0IsQ0FBQyxRQUV4QztJQUNDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUM3QixNQUFNLE9BQU8sR0FBRyxRQUFRLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3JDLHdCQUF3QjtRQUN4QixJQUFJLE9BQU8sS0FBSyxTQUFTLEVBQUU7WUFDekIsT0FBTyxJQUFJLEVBQUUsQ0FBQztTQUNmO1FBQ0QsdUNBQXVDO1FBQ3ZDLElBQUksT0FBTyxPQUFPLEtBQUssVUFBVSxFQUFFO1lBQ2pDLE9BQU8sT0FBTyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUFFLEdBQUcsQ0FBQyxDQUFDO1NBQ3JDO1FBQ0QsZ0RBQWdEO1FBQy9DLEdBQStCLENBQUMsTUFBTSxHQUFHLE9BQU8sQ0FBQztRQUNsRCxPQUFPLEdBQUcsRUFBRSxDQUFDO0lBQ2YsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQWpCRCw0REFpQkMifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nfunction safeApply(handler, context, args) {\n try {\n Reflect.apply(handler, context, args);\n }\n catch (err) {\n // Throw error after timeout so as not to interrupt the stack\n setTimeout(() => {\n throw err;\n });\n }\n}\nfunction arrayClone(arr) {\n const n = arr.length;\n const copy = new Array(n);\n for (let i = 0; i < n; i += 1) {\n copy[i] = arr[i];\n }\n return copy;\n}\nclass SafeEventEmitter extends events_1.EventEmitter {\n emit(type, ...args) {\n let doError = type === 'error';\n const events = this._events;\n if (events !== undefined) {\n doError = doError && events.error === undefined;\n }\n else if (!doError) {\n return false;\n }\n // If there is no 'error' event listener then throw.\n if (doError) {\n let er;\n if (args.length > 0) {\n [er] = args;\n }\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n const err = new Error(`Unhandled error.${er ? ` (${er.message})` : ''}`);\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n const handler = events[type];\n if (handler === undefined) {\n return false;\n }\n if (typeof handler === 'function') {\n safeApply(handler, this, args);\n }\n else {\n const len = handler.length;\n const listeners = arrayClone(handler);\n for (let i = 0; i < len; i += 1) {\n safeApply(listeners[i], this, args);\n }\n }\n return true;\n }\n}\nexports.default = SafeEventEmitter;\n//# sourceMappingURL=index.js.map","module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar LIMIT_REPLACE_NODE = '[...]'\nvar CIRCULAR_REPLACE_NODE = '[Circular]'\n\nvar arr = []\nvar replacerStack = []\n\nfunction defaultOptions () {\n return {\n depthLimit: Number.MAX_SAFE_INTEGER,\n edgesLimit: Number.MAX_SAFE_INTEGER\n }\n}\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n decirc(obj, '', 0, [], undefined, 0, options)\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction setReplace (replace, val, k, parent) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: replace })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k, replace])\n }\n } else {\n parent[k] = replace\n arr.push([parent, k, val])\n }\n}\n\nfunction decirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, i, stack, val, depth, options)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n // Ensure that we restore the object as it was.\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n try {\n if (typeof val.toJSON === 'function') {\n return\n }\n } catch (_) {\n return\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, i, stack, val, depth, options)\n tmp[key] = val[key]\n }\n if (typeof parent !== 'undefined') {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as replaced value\nfunction replaceGetterValues (replacer) {\n replacer =\n typeof replacer !== 'undefined'\n ? replacer\n : function (k, v) {\n return v\n }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = part[2]\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EthereumProviderError = exports.EthereumRpcError = void 0;\nconst fast_safe_stringify_1 = require(\"fast-safe-stringify\");\n/**\n * Error subclass implementing JSON RPC 2.0 errors and Ethereum RPC errors\n * per EIP-1474.\n * Permits any integer error code.\n */\nclass EthereumRpcError extends Error {\n constructor(code, message, data) {\n if (!Number.isInteger(code)) {\n throw new Error('\"code\" must be an integer.');\n }\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string.');\n }\n super(message);\n this.code = code;\n if (data !== undefined) {\n this.data = data;\n }\n }\n /**\n * Returns a plain object with all public class properties.\n */\n serialize() {\n const serialized = {\n code: this.code,\n message: this.message,\n };\n if (this.data !== undefined) {\n serialized.data = this.data;\n }\n if (this.stack) {\n serialized.stack = this.stack;\n }\n return serialized;\n }\n /**\n * Return a string representation of the serialized error, omitting\n * any circular references.\n */\n toString() {\n return fast_safe_stringify_1.default(this.serialize(), stringifyReplacer, 2);\n }\n}\nexports.EthereumRpcError = EthereumRpcError;\n/**\n * Error subclass implementing Ethereum Provider errors per EIP-1193.\n * Permits integer error codes in the [ 1000 <= 4999 ] range.\n */\nclass EthereumProviderError extends EthereumRpcError {\n /**\n * Create an Ethereum Provider JSON-RPC error.\n * `code` must be an integer in the 1000 <= 4999 range.\n */\n constructor(code, message, data) {\n if (!isValidEthProviderCode(code)) {\n throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');\n }\n super(code, message, data);\n }\n}\nexports.EthereumProviderError = EthereumProviderError;\n// Internal\nfunction isValidEthProviderCode(code) {\n return Number.isInteger(code) && code >= 1000 && code <= 4999;\n}\nfunction stringifyReplacer(_, value) {\n if (value === '[Circular]') {\n return undefined;\n }\n return value;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jbGFzc2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZEQUFnRDtBQVNoRDs7OztHQUlHO0FBQ0gsTUFBYSxnQkFBb0IsU0FBUSxLQUFLO0lBTTVDLFlBQVksSUFBWSxFQUFFLE9BQWUsRUFBRSxJQUFRO1FBRWpELElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQzNCLE1BQU0sSUFBSSxLQUFLLENBQ2IsNEJBQTRCLENBQzdCLENBQUM7U0FDSDtRQUNELElBQUksQ0FBQyxPQUFPLElBQUksT0FBTyxPQUFPLEtBQUssUUFBUSxFQUFFO1lBQzNDLE1BQU0sSUFBSSxLQUFLLENBQ2Isc0NBQXNDLENBQ3ZDLENBQUM7U0FDSDtRQUVELEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUNmLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO1FBQ2pCLElBQUksSUFBSSxLQUFLLFNBQVMsRUFBRTtZQUN0QixJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQztTQUNsQjtJQUNILENBQUM7SUFFRDs7T0FFRztJQU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BSSxJQUFJLElBQUksQ0FBQztBQUNoRSxDQUFDO0FBRUQsU0FBUyxpQkFBaUIsQ0FBQyxDQUFVLEVBQUUsS0FBYztJQUNuRCxJQUFJLEtBQUssS0FBSyxZQUFZLEVBQUU7UUFDMUIsT0FBTyxTQUFTLENBQUM7S0FDbEI7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUMifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorValues = exports.errorCodes = void 0;\nexports.errorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n },\n};\nexports.errorValues = {\n '-32700': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n },\n '-32600': {\n standard: 'JSON RPC 2.0',\n message: 'The JSON sent is not a valid Request object.',\n },\n '-32601': {\n standard: 'JSON RPC 2.0',\n message: 'The method does not exist / is not available.',\n },\n '-32602': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid method parameter(s).',\n },\n '-32603': {\n standard: 'JSON RPC 2.0',\n message: 'Internal JSON-RPC error.',\n },\n '-32000': {\n standard: 'EIP-1474',\n message: 'Invalid input.',\n },\n '-32001': {\n standard: 'EIP-1474',\n message: 'Resource not found.',\n },\n '-32002': {\n standard: 'EIP-1474',\n message: 'Resource unavailable.',\n },\n '-32003': {\n standard: 'EIP-1474',\n message: 'Transaction rejected.',\n },\n '-32004': {\n standard: 'EIP-1474',\n message: 'Method not supported.',\n },\n '-32005': {\n standard: 'EIP-1474',\n message: 'Request limit exceeded.',\n },\n '4001': {\n standard: 'EIP-1193',\n message: 'User rejected the request.',\n },\n '4100': {\n standard: 'EIP-1193',\n message: 'The requested account and/or method has not been authorized by the user.',\n },\n '4200': {\n standard: 'EIP-1193',\n message: 'The requested method is not supported by this Ethereum provider.',\n },\n '4900': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from all chains.',\n },\n '4901': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from the specified chain.',\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Vycm9yLWNvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF1QmEsUUFBQSxVQUFVLEdBQWU7SUFDcEMsR0FBRyxFQUFFO1FBQ0gsWUFBWSxFQUFFLENBQUMsS0FBSztRQUNwQixnQkFBZ0IsRUFBRSxDQUFDLEtBQUs7UUFDeEIsbUJBQW1CLEVBQUUsQ0FBQyxLQUFLO1FBQzNCLG1CQUFtQixFQUFFLENBQUMsS0FBSztRQUMzQixrQkFBa0IsRUFBRSxDQUFDLEtBQUs7UUFDMUIsYUFBYSxFQUFFLENBQUMsS0FBSztRQUNyQixLQUFLLEVBQUUsQ0FBQyxLQUFLO1FBQ2IsY0FBYyxFQUFFLENBQUMsS0FBSztRQUN0QixjQUFjLEVBQUUsQ0FBQyxLQUFLO1FBQ3RCLGFBQWEsRUFBRSxDQUFDLEtBQUs7UUFDckIsUUFBUSxFQUFFLENBQUMsS0FBSztLQUNqQjtJQUNELFFBQVEsRUFBRTtRQUNSLG1CQUFtQixFQUFFLElBQUk7UUFDekIsWUFBWSxFQUFFLElBQUk7UUFDbEIsaUJBQWlCLEVBQUUsSUFBSTtRQUN2QixZQUFZLEVBQUUsSUFBSTtRQUNsQixpQkFBaUIsRUFBRSxJQUFJO0tBQ3hCO0NBQ0YsQ0FBQztBQUVXLFFBQUEsV0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QUN0QztJQUNELE1BQU0sRUFBRTtRQUNOLFFBQVEsRUFBRSxVQUFVO1FBQ3BCLE9BQU8sRUFBRSwwRUFBMEU7S0FDcEY7SUFDRCxNQUFNLEVBQUU7UUFDTixRQUFRLEVBQUUsVUFBVTtRQUNwQixPQUFPLEVBQUUsa0VBQWtFO0tBQzVFO0lBQ0QsTUFBTSxFQUFFO1FBQ04sUUFBUSxFQUFFLFVBQVU7UUFDcEIsT0FBTyxFQUFFLCtDQUErQztLQUN6RDtJQUNELE1BQU0sRUFBRTtRQUNOLFFBQVEsRUFBRSxVQUFVO1FBQ3BCLE9BQU8sRUFBRSx3REFBd0Q7S0FDbEU7Q0FDRixDQUFDIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeError = exports.isValidCode = exports.getMessageFromCode = exports.JSON_RPC_SERVER_ERROR_MESSAGE = void 0;\nconst error_constants_1 = require(\"./error-constants\");\nconst classes_1 = require(\"./classes\");\nconst FALLBACK_ERROR_CODE = error_constants_1.errorCodes.rpc.internal;\nconst FALLBACK_MESSAGE = 'Unspecified error message. This is a bug, please report it.';\nconst FALLBACK_ERROR = {\n code: FALLBACK_ERROR_CODE,\n message: getMessageFromCode(FALLBACK_ERROR_CODE),\n};\nexports.JSON_RPC_SERVER_ERROR_MESSAGE = 'Unspecified server error.';\n/**\n * Gets the message for a given code, or a fallback message if the code has\n * no corresponding message.\n */\nfunction getMessageFromCode(code, fallbackMessage = FALLBACK_MESSAGE) {\n if (Number.isInteger(code)) {\n const codeString = code.toString();\n if (hasKey(error_constants_1.errorValues, codeString)) {\n return error_constants_1.errorValues[codeString].message;\n }\n if (isJsonRpcServerError(code)) {\n return exports.JSON_RPC_SERVER_ERROR_MESSAGE;\n }\n }\n return fallbackMessage;\n}\nexports.getMessageFromCode = getMessageFromCode;\n/**\n * Returns whether the given code is valid.\n * A code is only valid if it has a message.\n */\nfunction isValidCode(code) {\n if (!Number.isInteger(code)) {\n return false;\n }\n const codeString = code.toString();\n if (error_constants_1.errorValues[codeString]) {\n return true;\n }\n if (isJsonRpcServerError(code)) {\n return true;\n }\n return false;\n}\nexports.isValidCode = isValidCode;\n/**\n * Serializes the given error to an Ethereum JSON RPC-compatible error object.\n * Merely copies the given error's values if it is already compatible.\n * If the given error is not fully compatible, it will be preserved on the\n * returned object's data.originalError property.\n */\nfunction serializeError(error, { fallbackError = FALLBACK_ERROR, shouldIncludeStack = false, } = {}) {\n var _a, _b;\n if (!fallbackError ||\n !Number.isInteger(fallbackError.code) ||\n typeof fallbackError.message !== 'string') {\n throw new Error('Must provide fallback error with integer number code and string message.');\n }\n if (error instanceof classes_1.EthereumRpcError) {\n return error.serialize();\n }\n const serialized = {};\n if (error &&\n typeof error === 'object' &&\n !Array.isArray(error) &&\n hasKey(error, 'code') &&\n isValidCode(error.code)) {\n const _error = error;\n serialized.code = _error.code;\n if (_error.message && typeof _error.message === 'string') {\n serialized.message = _error.message;\n if (hasKey(_error, 'data')) {\n serialized.data = _error.data;\n }\n }\n else {\n serialized.message = getMessageFromCode(serialized.code);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n }\n else {\n serialized.code = fallbackError.code;\n const message = (_a = error) === null || _a === void 0 ? void 0 : _a.message;\n serialized.message = (message && typeof message === 'string'\n ? message\n : fallbackError.message);\n serialized.data = { originalError: assignOriginalError(error) };\n }\n const stack = (_b = error) === null || _b === void 0 ? void 0 : _b.stack;\n if (shouldIncludeStack && error && stack && typeof stack === 'string') {\n serialized.stack = stack;\n }\n return serialized;\n}\nexports.serializeError = serializeError;\n// Internal\nfunction isJsonRpcServerError(code) {\n return code >= -32099 && code <= -32000;\n}\nfunction assignOriginalError(error) {\n if (error && typeof error === 'object' && !Array.isArray(error)) {\n return Object.assign({}, error);\n }\n return error;\n}\nfunction hasKey(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb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BQUksS0FBSyxJQUFJLEtBQUssSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7UUFDckUsVUFBVSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7S0FDMUI7SUFDRCxPQUFPLFVBQXdDLENBQUM7QUFDbEQsQ0FBQztBQWxFRCx3Q0FrRUM7QUFFRCxXQUFXO0FBRVgsU0FBUyxvQkFBb0IsQ0FBQyxJQUFZO0lBQ3hDLE9BQU8sSUFBSSxJQUFJLENBQUMsS0FBSyxJQUFJLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQztBQUMxQyxDQUFDO0FBRUQsU0FBUyxtQkFBbUIsQ0FBQyxLQUFjO0lBQ3pDLElBQUksS0FBSyxJQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsSUFBSSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDL0QsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztLQUNqQztJQUNELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQUVELFNBQVMsTUFBTSxDQUFDLEdBQTRCLEVBQUUsR0FBVztJQUN2RCxPQUFPLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDeEQsQ0FBQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ethErrors = void 0;\nconst classes_1 = require(\"./classes\");\nconst utils_1 = require(\"./utils\");\nconst error_constants_1 = require(\"./error-constants\");\nexports.ethErrors = {\n rpc: {\n /**\n * Get a JSON RPC 2.0 Parse (-32700) error.\n */\n parse: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.parse, arg),\n /**\n * Get a JSON RPC 2.0 Invalid Request (-32600) error.\n */\n invalidRequest: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidRequest, arg),\n /**\n * Get a JSON RPC 2.0 Invalid Params (-32602) error.\n */\n invalidParams: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidParams, arg),\n /**\n * Get a JSON RPC 2.0 Method Not Found (-32601) error.\n */\n methodNotFound: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotFound, arg),\n /**\n * Get a JSON RPC 2.0 Internal (-32603) error.\n */\n internal: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.internal, arg),\n /**\n * Get a JSON RPC 2.0 Server error.\n * Permits integer error codes in the [ -32099 <= -32005 ] range.\n * Codes -32000 through -32004 are reserved by EIP-1474.\n */\n server: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum RPC Server errors must provide single object argument.');\n }\n const { code } = opts;\n if (!Number.isInteger(code) || code > -32005 || code < -32099) {\n throw new Error('\"code\" must be an integer such that: -32099 <= code <= -32005');\n }\n return getEthJsonRpcError(code, opts);\n },\n /**\n * Get an Ethereum JSON RPC Invalid Input (-32000) error.\n */\n invalidInput: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.invalidInput, arg),\n /**\n * Get an Ethereum JSON RPC Resource Not Found (-32001) error.\n */\n resourceNotFound: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceNotFound, arg),\n /**\n * Get an Ethereum JSON RPC Resource Unavailable (-32002) error.\n */\n resourceUnavailable: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.resourceUnavailable, arg),\n /**\n * Get an Ethereum JSON RPC Transaction Rejected (-32003) error.\n */\n transactionRejected: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.transactionRejected, arg),\n /**\n * Get an Ethereum JSON RPC Method Not Supported (-32004) error.\n */\n methodNotSupported: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.methodNotSupported, arg),\n /**\n * Get an Ethereum JSON RPC Limit Exceeded (-32005) error.\n */\n limitExceeded: (arg) => getEthJsonRpcError(error_constants_1.errorCodes.rpc.limitExceeded, arg),\n },\n provider: {\n /**\n * Get an Ethereum Provider User Rejected Request (4001) error.\n */\n userRejectedRequest: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.userRejectedRequest, arg);\n },\n /**\n * Get an Ethereum Provider Unauthorized (4100) error.\n */\n unauthorized: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.unauthorized, arg);\n },\n /**\n * Get an Ethereum Provider Unsupported Method (4200) error.\n */\n unsupportedMethod: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.unsupportedMethod, arg);\n },\n /**\n * Get an Ethereum Provider Not Connected (4900) error.\n */\n disconnected: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.disconnected, arg);\n },\n /**\n * Get an Ethereum Provider Chain Not Connected (4901) error.\n */\n chainDisconnected: (arg) => {\n return getEthProviderError(error_constants_1.errorCodes.provider.chainDisconnected, arg);\n },\n /**\n * Get a custom Ethereum Provider error.\n */\n custom: (opts) => {\n if (!opts || typeof opts !== 'object' || Array.isArray(opts)) {\n throw new Error('Ethereum Provider custom errors must provide single object argument.');\n }\n const { code, message, data } = opts;\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a nonempty string');\n }\n return new classes_1.EthereumProviderError(code, message, data);\n },\n },\n};\n// Internal\nfunction getEthJsonRpcError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new classes_1.EthereumRpcError(code, message || utils_1.getMessageFromCode(code), data);\n}\nfunction getEthProviderError(code, arg) {\n const [message, data] = parseOpts(arg);\n return new classes_1.EthereumProviderError(code, message || utils_1.getMessageFromCode(code), data);\n}\nfunction parseOpts(arg) {\n if (arg) {\n if (typeof arg === 'string') {\n return [arg];\n }\n else if (typeof arg === 'object' && !Array.isArray(arg)) {\n const { message, data } = arg;\n if (message && typeof message !== 'string') {\n throw new Error('Must specify string message.');\n }\n return [message || undefined, data];\n }\n }\n return [];\n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BSSxDQUNMLENBQUM7QUFDSixDQUFDO0FBRUQsU0FBUyxtQkFBbUIsQ0FBSSxJQUFZLEVBQUUsR0FBcUI7SUFDakUsTUFBTSxDQUFDLE9BQU8sRUFBRSxJQUFJLENBQUMsR0FBRyxTQUFTLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDdkMsT0FBTyxJQUFJLCtCQUFxQixDQUM5QixJQUFJLEVBQ0osT0FBTyxJQUFJLDBCQUFrQixDQUFDLElBQUksQ0FBQyxFQUNuQyxJQUFJLENBQ0wsQ0FBQztBQUNKLENBQUM7QUFFRCxTQUFTLFNBQVMsQ0FBSSxHQUFxQjtJQUN6QyxJQUFJLEdBQUcsRUFBRTtRQUNQLElBQUksT0FBTyxHQUFHLEtBQUssUUFBUSxFQUFFO1lBQzNCLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQztTQUNkO2FBQU0sSUFBSSxPQUFPLEdBQUcsS0FBSyxRQUFRLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQ3pELE1BQU0sRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLEdBQUcsR0FBRyxDQUFDO1lBRTlCLElBQUksT0FBTyxJQUFJLE9BQU8sT0FBTyxLQUFLLFFBQVEsRUFBRTtnQkFDMUMsTUFBTSxJQUFJLEtBQUssQ0FBQyw4QkFBOEIsQ0FBQyxDQUFDO2FBQ2pEO1lBQ0QsT0FBTyxDQUFDLE9BQU8sSUFBSSxTQUFTLEVBQUUsSUFBSSxDQUFDLENBQUM7U0FDckM7S0FDRjtJQUNELE9BQU8sRUFBRSxDQUFDO0FBQ1osQ0FBQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMessageFromCode = exports.serializeError = exports.EthereumProviderError = exports.EthereumRpcError = exports.ethErrors = exports.errorCodes = void 0;\nconst classes_1 = require(\"./classes\");\nObject.defineProperty(exports, \"EthereumRpcError\", { enumerable: true, get: function () { return classes_1.EthereumRpcError; } });\nObject.defineProperty(exports, \"EthereumProviderError\", { enumerable: true, get: function () { return classes_1.EthereumProviderError; } });\nconst utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"serializeError\", { enumerable: true, get: function () { return utils_1.serializeError; } });\nObject.defineProperty(exports, \"getMessageFromCode\", { enumerable: true, get: function () { return utils_1.getMessageFromCode; } });\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ethErrors\", { enumerable: true, get: function () { return errors_1.ethErrors; } });\nconst error_constants_1 = require(\"./error-constants\");\nObject.defineProperty(exports, \"errorCodes\", { enumerable: true, get: function () { return error_constants_1.errorCodes; } });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsdUNBQW9FO0FBVWxFLGlHQVZPLDBCQUFnQixPQVVQO0FBQ2hCLHNHQVh5QiwrQkFBcUIsT0FXekI7QUFWdkIsbUNBRWlCO0FBU2YsK0ZBVkEsc0JBQWMsT0FVQTtBQUNkLG1HQVhnQiwwQkFBa0IsT0FXaEI7QUFUcEIscUNBQXFDO0FBS25DLDBGQUxPLGtCQUFTLE9BS1A7QUFKWCx1REFBK0M7QUFHN0MsMkZBSE8sNEJBQVUsT0FHUCJ9","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonRpcEngine = void 0;\nconst safe_event_emitter_1 = __importDefault(require(\"@metamask/safe-event-emitter\"));\nconst eth_rpc_errors_1 = require(\"eth-rpc-errors\");\n/**\n * A JSON-RPC request and response processor.\n * Give it a stack of middleware, pass it requests, and get back responses.\n */\nclass JsonRpcEngine extends safe_event_emitter_1.default {\n constructor() {\n super();\n this._middleware = [];\n }\n /**\n * Add a middleware function to the engine's middleware stack.\n *\n * @param middleware - The middleware function to add.\n */\n push(middleware) {\n this._middleware.push(middleware);\n }\n handle(req, cb) {\n if (cb && typeof cb !== 'function') {\n throw new Error('\"callback\" must be a function if provided.');\n }\n if (Array.isArray(req)) {\n if (cb) {\n return this._handleBatch(req, cb);\n }\n return this._handleBatch(req);\n }\n if (cb) {\n return this._handle(req, cb);\n }\n return this._promiseHandle(req);\n }\n /**\n * Returns this engine as a middleware function that can be pushed to other\n * engines.\n *\n * @returns This engine as a middleware function.\n */\n asMiddleware() {\n return async (req, res, next, end) => {\n try {\n const [middlewareError, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n if (isComplete) {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n return end(middlewareError);\n }\n return next(async (handlerCallback) => {\n try {\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n }\n catch (error) {\n return handlerCallback(error);\n }\n return handlerCallback();\n });\n }\n catch (error) {\n return end(error);\n }\n };\n }\n async _handleBatch(reqs, cb) {\n // The order here is important\n try {\n // 2. Wait for all requests to finish, or throw on some kind of fatal\n // error\n const responses = await Promise.all(\n // 1. Begin executing each request in the order received\n reqs.map(this._promiseHandle.bind(this)));\n // 3. Return batch response\n if (cb) {\n return cb(null, responses);\n }\n return responses;\n }\n catch (error) {\n if (cb) {\n return cb(error);\n }\n throw error;\n }\n }\n /**\n * A promise-wrapped _handle.\n */\n _promiseHandle(req) {\n return new Promise((resolve) => {\n this._handle(req, (_err, res) => {\n // There will always be a response, and it will always have any error\n // that is caught and propagated.\n resolve(res);\n });\n });\n }\n /**\n * Ensures that the request object is valid, processes it, and passes any\n * error and the response object to the given callback.\n *\n * Does not reject.\n */\n async _handle(callerReq, cb) {\n if (!callerReq ||\n Array.isArray(callerReq) ||\n typeof callerReq !== 'object') {\n const error = new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.invalidRequest, `Requests must be plain objects. Received: ${typeof callerReq}`, { request: callerReq });\n return cb(error, { id: undefined, jsonrpc: '2.0', error });\n }\n if (typeof callerReq.method !== 'string') {\n const error = new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.invalidRequest, `Must specify a string method. Received: ${typeof callerReq.method}`, { request: callerReq });\n return cb(error, { id: callerReq.id, jsonrpc: '2.0', error });\n }\n const req = Object.assign({}, callerReq);\n const res = {\n id: req.id,\n jsonrpc: req.jsonrpc,\n };\n let error = null;\n try {\n await this._processRequest(req, res);\n }\n catch (_error) {\n // A request handler error, a re-thrown middleware error, or something\n // unexpected.\n error = _error;\n }\n if (error) {\n // Ensure no result is present on an errored response\n delete res.result;\n if (!res.error) {\n res.error = eth_rpc_errors_1.serializeError(error);\n }\n }\n return cb(error, res);\n }\n /**\n * For the given request and response, runs all middleware and their return\n * handlers, if any, and ensures that internal request processing semantics\n * are satisfied.\n */\n async _processRequest(req, res) {\n const [error, isComplete, returnHandlers,] = await JsonRpcEngine._runAllMiddleware(req, res, this._middleware);\n // Throw if \"end\" was not called, or if the response has neither a result\n // nor an error.\n JsonRpcEngine._checkForCompletion(req, res, isComplete);\n // The return handlers should run even if an error was encountered during\n // middleware processing.\n await JsonRpcEngine._runReturnHandlers(returnHandlers);\n // Now we re-throw the middleware processing error, if any, to catch it\n // further up the call chain.\n if (error) {\n throw error;\n }\n }\n /**\n * Serially executes the given stack of middleware.\n *\n * @returns An array of any error encountered during middleware execution,\n * a boolean indicating whether the request was completed, and an array of\n * middleware-defined return handlers.\n */\n static async _runAllMiddleware(req, res, middlewareStack) {\n const returnHandlers = [];\n let error = null;\n let isComplete = false;\n // Go down stack of middleware, call and collect optional returnHandlers\n for (const middleware of middlewareStack) {\n [error, isComplete] = await JsonRpcEngine._runMiddleware(req, res, middleware, returnHandlers);\n if (isComplete) {\n break;\n }\n }\n return [error, isComplete, returnHandlers.reverse()];\n }\n /**\n * Runs an individual middleware.\n *\n * @returns An array of any error encountered during middleware exection,\n * and a boolean indicating whether the request should end.\n */\n static _runMiddleware(req, res, middleware, returnHandlers) {\n return new Promise((resolve) => {\n const end = (err) => {\n const error = err || res.error;\n if (error) {\n res.error = eth_rpc_errors_1.serializeError(error);\n }\n // True indicates that the request should end\n resolve([error, true]);\n };\n const next = (returnHandler) => {\n if (res.error) {\n end(res.error);\n }\n else {\n if (returnHandler) {\n if (typeof returnHandler !== 'function') {\n end(new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: \"next\" return handlers must be functions. ` +\n `Received \"${typeof returnHandler}\" for request:\\n${jsonify(req)}`, { request: req }));\n }\n returnHandlers.push(returnHandler);\n }\n // False indicates that the request should not end\n resolve([null, false]);\n }\n };\n try {\n middleware(req, res, next, end);\n }\n catch (error) {\n end(error);\n }\n });\n }\n /**\n * Serially executes array of return handlers. The request and response are\n * assumed to be in their scope.\n */\n static async _runReturnHandlers(handlers) {\n for (const handler of handlers) {\n await new Promise((resolve, reject) => {\n handler((err) => (err ? reject(err) : resolve()));\n });\n }\n }\n /**\n * Throws an error if the response has neither a result nor an error, or if\n * the \"isComplete\" flag is falsy.\n */\n static _checkForCompletion(req, res, isComplete) {\n if (!('result' in res) && !('error' in res)) {\n throw new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: Response has no error or result for request:\\n${jsonify(req)}`, { request: req });\n }\n if (!isComplete) {\n throw new eth_rpc_errors_1.EthereumRpcError(eth_rpc_errors_1.errorCodes.rpc.internal, `JsonRpcEngine: Nothing ended request:\\n${jsonify(req)}`, { request: req });\n }\n }\n}\nexports.JsonRpcEngine = JsonRpcEngine;\nfunction jsonify(request) {\n return JSON.stringify(request, null, 2);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSnNvblJwY0VuZ2luZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3Vy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eMiddleware(middlewareStack) {\n const engine = new JsonRpcEngine_1.JsonRpcEngine();\n middlewareStack.forEach((middleware) => engine.push(middleware));\n return engine.asMiddleware();\n}\nexports.mergeMiddleware = mergeMiddleware;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVyZ2VNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21lcmdlTWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFBbUU7QUFFbkUsU0FBZ0IsZUFBZSxDQUFDLGVBQXNEO0lBQ3BGLE1BQU0sTUFBTSxHQUFHLElBQUksNkJBQWEsRUFBRSxDQUFDO0lBQ25DLGVBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxVQUFVLEVBQUUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztJQUNqRSxPQUFPLE1BQU0sQ0FBQyxZQUFZLEVBQUUsQ0FBQztBQUMvQixDQUFDO0FBSkQsMENBSUMifQ==","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./idRemapMiddleware\"), exports);\n__exportStar(require(\"./createAsyncMiddleware\"), exports);\n__exportStar(require(\"./createScaffoldMiddleware\"), exports);\n__exportStar(require(\"./getUniqueId\"), exports);\n__exportStar(require(\"./JsonRpcEngine\"), exports);\n__exportStar(require(\"./mergeMiddleware\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsc0RBQW9DO0FBQ3BDLDBEQUF3QztBQUN4Qyw2REFBMkM7QUFDM0MsZ0RBQThCO0FBQzlCLGtEQUFnQztBQUNoQyxvREFBa0MifQ==","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Semaphore = /** @class */ (function () {\n function Semaphore(_maxConcurrency) {\n this._maxConcurrency = _maxConcurrency;\n this._queue = [];\n if (_maxConcurrency <= 0) {\n throw new Error('semaphore must be initialized to a positive value');\n }\n this._value = _maxConcurrency;\n }\n Semaphore.prototype.acquire = function () {\n var _this = this;\n var locked = this.isLocked();\n var ticket = new Promise(function (r) { return _this._queue.push(r); });\n if (!locked)\n this._dispatch();\n return ticket;\n };\n Semaphore.prototype.runExclusive = function (callback) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _a, value, release;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, this.acquire()];\n case 1:\n _a = _b.sent(), value = _a[0], release = _a[1];\n _b.label = 2;\n case 2:\n _b.trys.push([2, , 4, 5]);\n return [4 /*yield*/, callback(value)];\n case 3: return [2 /*return*/, _b.sent()];\n case 4:\n release();\n return [7 /*endfinally*/];\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n Semaphore.prototype.isLocked = function () {\n return this._value <= 0;\n };\n Semaphore.prototype.release = function () {\n if (this._maxConcurrency > 1) {\n throw new Error('this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead');\n }\n if (this._currentReleaser) {\n var releaser = this._currentReleaser;\n this._currentReleaser = undefined;\n releaser();\n }\n };\n Semaphore.prototype._dispatch = function () {\n var _this = this;\n var nextConsumer = this._queue.shift();\n if (!nextConsumer)\n return;\n var released = false;\n this._currentReleaser = function () {\n if (released)\n return;\n released = true;\n _this._value++;\n _this._dispatch();\n };\n nextConsumer([this._value--, this._currentReleaser]);\n };\n return Semaphore;\n}());\nexports.default = Semaphore;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar Semaphore_1 = require(\"./Semaphore\");\nvar Mutex = /** @class */ (function () {\n function Mutex() {\n this._semaphore = new Semaphore_1.default(1);\n }\n Mutex.prototype.acquire = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _a, releaser;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, this._semaphore.acquire()];\n case 1:\n _a = _b.sent(), releaser = _a[1];\n return [2 /*return*/, releaser];\n }\n });\n });\n };\n Mutex.prototype.runExclusive = function (callback) {\n return this._semaphore.runExclusive(function () { return callback(); });\n };\n Mutex.prototype.isLocked = function () {\n return this._semaphore.isLocked();\n };\n Mutex.prototype.release = function () {\n this._semaphore.release();\n };\n return Mutex;\n}());\nexports.default = Mutex;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.withTimeout = void 0;\nvar tslib_1 = require(\"tslib\");\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction withTimeout(sync, timeout, timeoutError) {\n var _this = this;\n if (timeoutError === void 0) { timeoutError = new Error('timeout'); }\n return {\n acquire: function () {\n return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var isTimeout, ticket, release;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n isTimeout = false;\n setTimeout(function () {\n isTimeout = true;\n reject(timeoutError);\n }, timeout);\n return [4 /*yield*/, sync.acquire()];\n case 1:\n ticket = _a.sent();\n if (isTimeout) {\n release = Array.isArray(ticket) ? ticket[1] : ticket;\n release();\n }\n else {\n resolve(ticket);\n }\n return [2 /*return*/];\n }\n });\n }); });\n },\n runExclusive: function (callback) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var release, ticket;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n release = function () { return undefined; };\n _a.label = 1;\n case 1:\n _a.trys.push([1, , 7, 8]);\n return [4 /*yield*/, this.acquire()];\n case 2:\n ticket = _a.sent();\n if (!Array.isArray(ticket)) return [3 /*break*/, 4];\n release = ticket[1];\n return [4 /*yield*/, callback(ticket[0])];\n case 3: return [2 /*return*/, _a.sent()];\n case 4:\n release = ticket;\n return [4 /*yield*/, callback()];\n case 5: return [2 /*return*/, _a.sent()];\n case 6: return [3 /*break*/, 8];\n case 7:\n release();\n return [7 /*endfinally*/];\n case 8: return [2 /*return*/];\n }\n });\n });\n },\n release: function () {\n sync.release();\n },\n isLocked: function () { return sync.isLocked(); },\n };\n}\nexports.withTimeout = withTimeout;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.withTimeout = exports.Semaphore = exports.Mutex = void 0;\nvar Mutex_1 = require(\"./Mutex\");\nObject.defineProperty(exports, \"Mutex\", { enumerable: true, get: function () { return Mutex_1.default; } });\nvar Semaphore_1 = require(\"./Semaphore\");\nObject.defineProperty(exports, \"Semaphore\", { enumerable: true, get: function () { return Semaphore_1.default; } });\nvar withTimeout_1 = require(\"./withTimeout\");\nObject.defineProperty(exports, \"withTimeout\", { enumerable: true, get: function () { return withTimeout_1.withTimeout; } });\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","const extend = require('xtend')\nconst createRandomId = require('json-rpc-random-id')()\n\nmodule.exports = EthQuery\n\n\nfunction EthQuery(provider){\n const self = this\n self.currentProvider = provider\n}\n\n//\n// base queries\n//\n\n// default block\nEthQuery.prototype.getBalance = generateFnWithDefaultBlockFor(2, 'eth_getBalance')\nEthQuery.prototype.getCode = generateFnWithDefaultBlockFor(2, 'eth_getCode')\nEthQuery.prototype.getTransactionCount = generateFnWithDefaultBlockFor(2, 'eth_getTransactionCount')\nEthQuery.prototype.getStorageAt = generateFnWithDefaultBlockFor(3, 'eth_getStorageAt')\nEthQuery.prototype.call = generateFnWithDefaultBlockFor(2, 'eth_call')\n// standard\nEthQuery.prototype.protocolVersion = generateFnFor('eth_protocolVersion')\nEthQuery.prototype.syncing = generateFnFor('eth_syncing')\nEthQuery.prototype.coinbase = generateFnFor('eth_coinbase')\nEthQuery.prototype.mining = generateFnFor('eth_mining')\nEthQuery.prototype.hashrate = generateFnFor('eth_hashrate')\nEthQuery.prototype.gasPrice = generateFnFor('eth_gasPrice')\nEthQuery.prototype.accounts = generateFnFor('eth_accounts')\nEthQuery.prototype.blockNumber = generateFnFor('eth_blockNumber')\nEthQuery.prototype.getBlockTransactionCountByHash = generateFnFor('eth_getBlockTransactionCountByHash')\nEthQuery.prototype.getBlockTransactionCountByNumber = generateFnFor('eth_getBlockTransactionCountByNumber')\nEthQuery.prototype.getUncleCountByBlockHash = generateFnFor('eth_getUncleCountByBlockHash')\nEthQuery.prototype.getUncleCountByBlockNumber = generateFnFor('eth_getUncleCountByBlockNumber')\nEthQuery.prototype.sign = generateFnFor('eth_sign')\nEthQuery.prototype.sendTransaction = generateFnFor('eth_sendTransaction')\nEthQuery.prototype.sendRawTransaction = generateFnFor('eth_sendRawTransaction')\nEthQuery.prototype.estimateGas = generateFnFor('eth_estimateGas')\nEthQuery.prototype.getBlockByHash = generateFnFor('eth_getBlockByHash')\nEthQuery.prototype.getBlockByNumber = generateFnFor('eth_getBlockByNumber')\nEthQuery.prototype.getTransactionByHash = generateFnFor('eth_getTransactionByHash')\nEthQuery.prototype.getTransactionByBlockHashAndIndex = generateFnFor('eth_getTransactionByBlockHashAndIndex')\nEthQuery.prototype.getTransactionByBlockNumberAndIndex = generateFnFor('eth_getTransactionByBlockNumberAndIndex')\nEthQuery.prototype.getTransactionReceipt = generateFnFor('eth_getTransactionReceipt')\nEthQuery.prototype.getUncleByBlockHashAndIndex = generateFnFor('eth_getUncleByBlockHashAndIndex')\nEthQuery.prototype.getUncleByBlockNumberAndIndex = generateFnFor('eth_getUncleByBlockNumberAndIndex')\nEthQuery.prototype.getCompilers = generateFnFor('eth_getCompilers')\nEthQuery.prototype.compileLLL = generateFnFor('eth_compileLLL')\nEthQuery.prototype.compileSolidity = generateFnFor('eth_compileSolidity')\nEthQuery.prototype.compileSerpent = generateFnFor('eth_compileSerpent')\nEthQuery.prototype.newFilter = generateFnFor('eth_newFilter')\nEthQuery.prototype.newBlockFilter = generateFnFor('eth_newBlockFilter')\nEthQuery.prototype.newPendingTransactionFilter = generateFnFor('eth_newPendingTransactionFilter')\nEthQuery.prototype.uninstallFilter = generateFnFor('eth_uninstallFilter')\nEthQuery.prototype.getFilterChanges = generateFnFor('eth_getFilterChanges')\nEthQuery.prototype.getFilterLogs = generateFnFor('eth_getFilterLogs')\nEthQuery.prototype.getLogs = generateFnFor('eth_getLogs')\nEthQuery.prototype.getWork = generateFnFor('eth_getWork')\nEthQuery.prototype.submitWork = generateFnFor('eth_submitWork')\nEthQuery.prototype.submitHashrate = generateFnFor('eth_submitHashrate')\n\n// network level\n\nEthQuery.prototype.sendAsync = function(opts, cb){\n const self = this\n self.currentProvider.sendAsync(createPayload(opts), function(err, response){\n if (!err && response.error) err = new Error('EthQuery - RPC Error - '+response.error.message)\n if (err) return cb(err)\n cb(null, response.result)\n })\n}\n\n// util\n\nfunction generateFnFor(methodName){\n return function(){\n const self = this\n var args = [].slice.call(arguments)\n var cb = args.pop()\n self.sendAsync({\n method: methodName,\n params: args,\n }, cb)\n }\n}\n\nfunction generateFnWithDefaultBlockFor(argCount, methodName){\n return function(){\n const self = this\n var args = [].slice.call(arguments)\n var cb = args.pop()\n // set optional default block param\n if (args.length < argCount) args.push('latest')\n self.sendAsync({\n method: methodName,\n params: args,\n }, cb)\n }\n}\n\nfunction createPayload(data){\n return extend({\n // defaults\n id: createRandomId(),\n jsonrpc: '2.0',\n params: [],\n // user-specified\n }, data)\n}\n","'use strict';\n\nconst processFn = (fn, options, proxy, unwrapped) => function (...arguments_) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targuments_.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targuments_.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targuments_.push(resolve);\n\t\t}\n\n\t\tconst self = this === proxy ? unwrapped : this;\n\t\tReflect.apply(fn, self, arguments_);\n\t});\n};\n\nconst filterCache = new WeakMap();\n\nmodule.exports = (input, options) => {\n\toptions = {\n\t\texclude: [/.+(?:Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise,\n\t\t...options\n\t};\n\n\tconst objectType = typeof input;\n\tif (!(input !== null && (objectType === 'object' || objectType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objectType}\\``);\n\t}\n\n\tconst filter = (target, key) => {\n\t\tlet cached = filterCache.get(target);\n\n\t\tif (!cached) {\n\t\t\tcached = {};\n\t\t\tfilterCache.set(target, cached);\n\t\t}\n\n\t\tif (key in cached) {\n\t\t\treturn cached[key];\n\t\t}\n\n\t\tconst match = pattern => (typeof pattern === 'string' || typeof key === 'symbol') ? key === pattern : pattern.test(key);\n\t\tconst desc = Reflect.getOwnPropertyDescriptor(target, key);\n\t\tconst writableOrConfigurableOwn = (desc === undefined || desc.writable || desc.configurable);\n\t\tconst included = options.include ? options.include.some(match) : !options.exclude.some(match);\n\t\tconst shouldFilter = included && writableOrConfigurableOwn;\n\t\tcached[key] = shouldFilter;\n\t\treturn shouldFilter;\n\t};\n\n\tconst cache = new WeakMap();\n\n\tconst proxy = new Proxy(input, {\n\t\tapply(target, thisArg, args) {\n\t\t\tconst cached = cache.get(target);\n\n\t\t\tif (cached) {\n\t\t\t\treturn Reflect.apply(cached, thisArg, args);\n\t\t\t}\n\n\t\t\tconst pified = options.excludeMain ? target : processFn(target, options, proxy, target);\n\t\t\tcache.set(target, pified);\n\t\t\treturn Reflect.apply(pified, thisArg, args);\n\t\t},\n\n\t\tget(target, key) {\n\t\t\tconst property = target[key];\n\n\t\t\t// eslint-disable-next-line no-use-extend-native/no-use-extend-native\n\t\t\tif (!filter(target, key) || property === Function.prototype[key]) {\n\t\t\t\treturn property;\n\t\t\t}\n\n\t\t\tconst cached = cache.get(property);\n\n\t\t\tif (cached) {\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tif (typeof property === 'function') {\n\t\t\t\tconst pified = processFn(property, options, proxy, target);\n\t\t\t\tcache.set(property, pified);\n\t\t\t\treturn pified;\n\t\t\t}\n\n\t\t\treturn property;\n\t\t}\n\t});\n\n\treturn proxy;\n};\n","const SafeEventEmitter = require('@metamask/safe-event-emitter').default\n\nclass BaseFilter extends SafeEventEmitter {\n\n constructor () {\n super()\n this.updates = []\n }\n\n async initialize () {}\n\n async update () {\n throw new Error('BaseFilter - no update method specified')\n }\n\n addResults (newResults) {\n this.updates = this.updates.concat(newResults)\n newResults.forEach(result => this.emit('update', result))\n }\n\n addInitialResults (newResults) {}\n\n getChangesAndClear () {\n const updates = this.updates\n this.updates = []\n return updates\n }\n \n}\n\nmodule.exports = BaseFilter\n","const BaseFilter = require('./base-filter')\n\n// tracks all results ever recorded\nclass BaseFilterWithHistory extends BaseFilter {\n\n constructor () {\n super()\n this.allResults = []\n }\n\n async update () {\n throw new Error('BaseFilterWithHistory - no update method specified')\n }\n\n addResults (newResults) {\n this.allResults = this.allResults.concat(newResults)\n super.addResults(newResults)\n }\n\n addInitialResults (newResults) {\n this.allResults = this.allResults.concat(newResults)\n super.addInitialResults(newResults)\n }\n\n getAllResults () {\n return this.allResults\n }\n\n}\n\nmodule.exports = BaseFilterWithHistory","\nmodule.exports = {\n minBlockRef,\n maxBlockRef,\n sortBlockRefs,\n bnToHex,\n blockRefIsNumber,\n hexToInt,\n incrementHexInt,\n intToHex,\n unsafeRandomBytes,\n}\n\nfunction minBlockRef(...refs) {\n const sortedRefs = sortBlockRefs(refs)\n return sortedRefs[0]\n}\n\nfunction maxBlockRef(...refs) {\n const sortedRefs = sortBlockRefs(refs)\n return sortedRefs[sortedRefs.length-1]\n}\n\nfunction sortBlockRefs(refs) {\n return refs.sort((refA, refB) => {\n if (refA === 'latest' || refB === 'earliest') return 1\n if (refB === 'latest' || refA === 'earliest') return -1\n return hexToInt(refA) - hexToInt(refB)\n })\n}\n\nfunction bnToHex(bn) {\n return '0x' + bn.toString(16)\n}\n\nfunction blockRefIsNumber(blockRef){\n return blockRef && !['earliest', 'latest', 'pending'].includes(blockRef)\n}\n\nfunction hexToInt(hexString) {\n if (hexString === undefined || hexString === null) return hexString\n return Number.parseInt(hexString, 16)\n}\n\nfunction incrementHexInt(hexString){\n if (hexString === undefined || hexString === null) return hexString\n const value = hexToInt(hexString)\n return intToHex(value + 1)\n}\n\nfunction intToHex(int) {\n if (int === undefined || int === null) return int\n let hexString = int.toString(16)\n const needsLeftPad = hexString.length % 2\n if (needsLeftPad) hexString = '0' + hexString\n return '0x' + hexString\n}\n\nfunction unsafeRandomBytes(byteCount) {\n let result = '0x'\n for (let i = 0; i < byteCount; i++) {\n result += unsafeRandomNibble()\n result += unsafeRandomNibble()\n }\n return result\n}\n\nfunction unsafeRandomNibble() {\n return Math.floor(Math.random() * 16).toString(16)\n}\n","const EthQuery = require('eth-query')\nconst pify = require('pify')\nconst BaseFilterWithHistory = require('./base-filter-history')\nconst { bnToHex, hexToInt, incrementHexInt, minBlockRef, blockRefIsNumber } = require('./hexUtils')\n\nclass LogFilter extends BaseFilterWithHistory {\n\n constructor ({ provider, params }) {\n super()\n this.type = 'log'\n this.ethQuery = new EthQuery(provider)\n this.params = Object.assign({\n fromBlock: 'latest',\n toBlock: 'latest',\n address: undefined,\n topics: [],\n }, params)\n // normalize address parameter\n if (this.params.address) {\n // ensure array\n if (!Array.isArray(this.params.address)) {\n this.params.address = [this.params.address]\n }\n // ensure lowercase\n this.params.address = this.params.address.map(address => address.toLowerCase())\n }\n }\n\n async initialize({ currentBlock }) {\n // resolve params.fromBlock\n let fromBlock = this.params.fromBlock\n if (['latest', 'pending'].includes(fromBlock)) fromBlock = currentBlock\n if ('earliest' === fromBlock) fromBlock = '0x0'\n this.params.fromBlock = fromBlock\n // set toBlock for initial lookup\n const toBlock = minBlockRef(this.params.toBlock, currentBlock)\n const params = Object.assign({}, this.params, { toBlock })\n // fetch logs and add to results\n const newLogs = await this._fetchLogs(params)\n this.addInitialResults(newLogs)\n }\n\n async update ({ oldBlock, newBlock }) {\n // configure params for this update\n const toBlock = newBlock\n let fromBlock\n // oldBlock is empty on first sync\n if (oldBlock) {\n fromBlock = incrementHexInt(oldBlock)\n } else {\n fromBlock = newBlock\n }\n // fetch logs\n const params = Object.assign({}, this.params, { fromBlock, toBlock })\n const newLogs = await this._fetchLogs(params)\n const matchingLogs = newLogs.filter(log => this.matchLog(log))\n\n // add to results\n this.addResults(matchingLogs)\n }\n\n async _fetchLogs (params) {\n const newLogs = await pify(cb => this.ethQuery.getLogs(params, cb))()\n // add to results\n return newLogs\n }\n\n matchLog(log) {\n // check if block number in bounds:\n if (hexToInt(this.params.fromBlock) >= hexToInt(log.blockNumber)) return false\n if (blockRefIsNumber(this.params.toBlock) && hexToInt(this.params.toBlock) <= hexToInt(log.blockNumber)) return false\n\n // address is correct:\n const normalizedLogAddress = log.address && log.address.toLowerCase()\n if (this.params.address && normalizedLogAddress && !this.params.address.includes(normalizedLogAddress)) return false\n\n // topics match:\n // topics are position-dependant\n // topics can be nested to represent `or` [[a || b], c]\n // topics can be null, representing a wild card for that position\n const topicsMatch = this.params.topics.every((topicPattern, index) => {\n // pattern is longer than actual topics\n let logTopic = log.topics[index]\n if (!logTopic) return false\n logTopic = logTopic.toLowerCase()\n // normalize subTopics\n let subtopicsToMatch = Array.isArray(topicPattern) ? topicPattern : [topicPattern]\n // check for wild card\n const subtopicsIncludeWildcard = subtopicsToMatch.includes(null)\n if (subtopicsIncludeWildcard) return true\n subtopicsToMatch = subtopicsToMatch.map(topic => topic.toLowerCase())\n // check each possible matching topic\n const topicDoesMatch = subtopicsToMatch.includes(logTopic)\n return topicDoesMatch\n })\n\n return topicsMatch\n }\n\n}\n\nmodule.exports = LogFilter\n","module.exports = getBlocksForRange\n\nasync function getBlocksForRange({ provider, fromBlock, toBlock }) {\n if (!fromBlock) fromBlock = toBlock\n\n const fromBlockNumber = hexToInt(fromBlock)\n const toBlockNumber = hexToInt(toBlock)\n const blockCountToQuery = toBlockNumber - fromBlockNumber + 1\n // load all blocks from old to new (inclusive)\n const missingBlockNumbers = Array(blockCountToQuery).fill()\n .map((_,index) => fromBlockNumber + index)\n .map(intToHex)\n let blockBodies = await Promise.all(\n missingBlockNumbers.map(blockNum => query(provider, 'eth_getBlockByNumber', [blockNum, false]))\n )\n blockBodies = blockBodies.filter(block => block !== null);\n return blockBodies\n}\n\nfunction hexToInt(hexString) {\n if (hexString === undefined || hexString === null) return hexString\n return Number.parseInt(hexString, 16)\n}\n\nfunction incrementHexInt(hexString){\n if (hexString === undefined || hexString === null) return hexString\n const value = hexToInt(hexString)\n return intToHex(value + 1)\n}\n\nfunction intToHex(int) {\n if (int === undefined || int === null) return int\n const hexString = int.toString(16)\n return '0x' + hexString\n}\n\nfunction sendAsync(provider, request) {\n return new Promise((resolve, reject) => {\n provider.sendAsync(request, (error, response) => {\n if (error) {\n reject(error);\n } else if (response.error) {\n reject(response.error);\n } else if (response.result) {\n resolve(response.result);\n } else {\n reject(new Error(\"Result was empty\"));\n }\n });\n });\n}\n\nasync function query(provider, method, params) {\n for (let i = 0; i < 3; i++) {\n try {\n return await sendAsync(provider, {\n id: 1,\n jsonrpc: \"2.0\",\n method,\n params,\n });\n } catch (error) {\n console.error(\n `provider.sendAsync failed: ${error.stack || error.message || error}`\n );\n }\n }\n return null;\n}\n","const BaseFilter = require('./base-filter')\nconst getBlocksForRange = require('./getBlocksForRange')\nconst { incrementHexInt } = require('./hexUtils')\n\nclass BlockFilter extends BaseFilter {\n\n constructor ({ provider, params }) {\n super()\n this.type = 'block'\n this.provider = provider\n }\n\n async update ({ oldBlock, newBlock }) {\n const toBlock = newBlock\n const fromBlock = incrementHexInt(oldBlock)\n const blockBodies = await getBlocksForRange({ provider: this.provider, fromBlock, toBlock })\n const blockHashes = blockBodies.map((block) => block.hash)\n this.addResults(blockHashes)\n }\n\n}\n\nmodule.exports = BlockFilter\n","const BaseFilter = require('./base-filter')\nconst getBlocksForRange = require('./getBlocksForRange')\nconst { incrementHexInt } = require('./hexUtils')\n\nclass TxFilter extends BaseFilter {\n\n constructor ({ provider }) {\n super()\n this.type = 'tx'\n this.provider = provider\n }\n\n async update ({ oldBlock }) {\n const toBlock = oldBlock\n const fromBlock = incrementHexInt(oldBlock)\n const blocks = await getBlocksForRange({ provider: this.provider, fromBlock, toBlock })\n const blockTxHashes = []\n for (const block of blocks) {\n blockTxHashes.push(...block.transactions)\n }\n // add to results\n this.addResults(blockTxHashes)\n }\n\n}\n\nmodule.exports = TxFilter\n","const Mutex = require('async-mutex').Mutex\nconst { createAsyncMiddleware, createScaffoldMiddleware } = require('json-rpc-engine')\nconst LogFilter = require('./log-filter.js')\nconst BlockFilter = require('./block-filter.js')\nconst TxFilter = require('./tx-filter.js')\nconst { intToHex, hexToInt } = require('./hexUtils')\n\nmodule.exports = createEthFilterMiddleware\n\nfunction createEthFilterMiddleware({ blockTracker, provider }) {\n\n // create filter collection\n let filterIndex = 0\n let filters = {}\n // create update mutex\n const mutex = new Mutex()\n const waitForFree = mutexMiddlewareWrapper({ mutex })\n\n const middleware = createScaffoldMiddleware({\n // install filters\n eth_newFilter: waitForFree(toFilterCreationMiddleware(newLogFilter)),\n eth_newBlockFilter: waitForFree(toFilterCreationMiddleware(newBlockFilter)),\n eth_newPendingTransactionFilter: waitForFree(toFilterCreationMiddleware(newPendingTransactionFilter)),\n // uninstall filters\n eth_uninstallFilter: waitForFree(toAsyncRpcMiddleware(uninstallFilterHandler)),\n // checking filter changes\n eth_getFilterChanges: waitForFree(toAsyncRpcMiddleware(getFilterChanges)),\n eth_getFilterLogs: waitForFree(toAsyncRpcMiddleware(getFilterLogs)),\n })\n\n // setup filter updating and destroy handler\n const filterUpdater = async ({ oldBlock, newBlock }) => {\n if (filters.length === 0) return\n // lock update reads\n const releaseLock = await mutex.acquire()\n try {\n // process all filters in parallel\n await Promise.all(objValues(filters).map(async (filter) => {\n try {\n await filter.update({ oldBlock, newBlock })\n } catch (err) {\n // handle each error individually so filter update errors don't affect other filters\n console.error(err)\n }\n }))\n } catch (err) {\n // log error so we don't skip the releaseLock\n console.error(err)\n }\n // unlock update reads\n releaseLock()\n }\n\n // expose filter methods directly\n middleware.newLogFilter = newLogFilter\n middleware.newBlockFilter = newBlockFilter\n middleware.newPendingTransactionFilter = newPendingTransactionFilter\n middleware.uninstallFilter = uninstallFilterHandler\n middleware.getFilterChanges = getFilterChanges\n middleware.getFilterLogs = getFilterLogs\n\n // expose destroy method for cleanup\n middleware.destroy = () => {\n uninstallAllFilters()\n }\n\n return middleware\n\n //\n // new filters\n //\n\n async function newLogFilter(params) {\n const filter = new LogFilter({ provider, params })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n async function newBlockFilter() {\n const filter = new BlockFilter({ provider })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n async function newPendingTransactionFilter() {\n const filter = new TxFilter({ provider })\n const filterIndex = await installFilter(filter)\n return filter\n }\n\n //\n // get filter changes\n //\n\n async function getFilterChanges(filterIndexHex) {\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n if (!filter) {\n throw new Error(`No filter for index \"${filterIndex}\"`)\n }\n const results = filter.getChangesAndClear()\n return results\n }\n\n async function getFilterLogs(filterIndexHex) {\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n if (!filter) {\n throw new Error(`No filter for index \"${filterIndex}\"`)\n }\n // only return results for log filters\n let results = []\n if (filter.type === 'log') {\n results = filter.getAllResults()\n }\n return results\n }\n\n\n //\n // remove filters\n //\n\n\n async function uninstallFilterHandler(filterIndexHex) {\n // check filter exists\n const filterIndex = hexToInt(filterIndexHex)\n const filter = filters[filterIndex]\n const result = Boolean(filter)\n // uninstall filter\n if (result) {\n await uninstallFilter(filterIndex)\n }\n return result\n }\n\n //\n // utils\n //\n\n async function installFilter(filter) {\n const prevFilterCount = objValues(filters).length\n // install filter\n const currentBlock = await blockTracker.getLatestBlock()\n await filter.initialize({ currentBlock })\n filterIndex++\n filters[filterIndex] = filter\n filter.id = filterIndex\n filter.idHex = intToHex(filterIndex)\n // update block tracker subs\n const newFilterCount = objValues(filters).length\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount })\n return filterIndex\n }\n\n async function uninstallFilter(filterIndex) {\n const prevFilterCount = objValues(filters).length\n delete filters[filterIndex]\n // update block tracker subs\n const newFilterCount = objValues(filters).length\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount })\n }\n\n async function uninstallAllFilters() {\n const prevFilterCount = objValues(filters).length\n filters = {}\n // update block tracker subs\n updateBlockTrackerSubs({ prevFilterCount, newFilterCount: 0 })\n }\n\n function updateBlockTrackerSubs({ prevFilterCount, newFilterCount }) {\n // subscribe\n if (prevFilterCount === 0 && newFilterCount > 0) {\n blockTracker.on('sync', filterUpdater)\n return\n }\n // unsubscribe\n if (prevFilterCount > 0 && newFilterCount === 0) {\n blockTracker.removeListener('sync', filterUpdater)\n return\n }\n }\n\n}\n\n// helper for turning filter constructors into rpc middleware\nfunction toFilterCreationMiddleware(createFilterFn) {\n return toAsyncRpcMiddleware(async (...args) => {\n const filter = await createFilterFn(...args)\n const result = intToHex(filter.id)\n return result\n })\n}\n\n// helper for pulling out req.params and setting res.result\nfunction toAsyncRpcMiddleware(asyncFn) {\n return createAsyncMiddleware(async (req, res) => {\n const result = await asyncFn.apply(null, req.params)\n res.result = result\n })\n}\n\nfunction mutexMiddlewareWrapper({ mutex }) {\n return (middleware) => {\n return async (req, res, next, end) => {\n // wait for mutex available\n // we can release immediately because\n // we just need to make sure updates aren't active\n const releaseLock = await mutex.acquire()\n releaseLock()\n middleware(req, res, next, end)\n }\n }\n}\n\nfunction objValues(obj, fn){\n const values = []\n for (let key in obj) {\n values.push(obj[key])\n }\n return values\n}\n","const SafeEventEmitter = require('@metamask/safe-event-emitter').default\nconst { createAsyncMiddleware, createScaffoldMiddleware } = require('json-rpc-engine')\nconst createFilterMiddleware = require('./index.js')\nconst { unsafeRandomBytes, incrementHexInt } = require('./hexUtils.js')\nconst getBlocksForRange = require('./getBlocksForRange.js')\n\nmodule.exports = createSubscriptionMiddleware\n\n\nfunction createSubscriptionMiddleware({ blockTracker, provider }) {\n // state and utilities for handling subscriptions\n const subscriptions = {}\n const filterManager = createFilterMiddleware({ blockTracker, provider })\n\n // internal flag\n let isDestroyed = false\n\n // create subscriptionManager api object\n const events = new SafeEventEmitter()\n const middleware = createScaffoldMiddleware({\n eth_subscribe: createAsyncMiddleware(subscribe),\n eth_unsubscribe: createAsyncMiddleware(unsubscribe),\n })\n middleware.destroy = destroy\n return { events, middleware }\n\n async function subscribe(req, res) {\n\n if (isDestroyed) throw new Error(\n 'SubscriptionManager - attempting to use after destroying'\n )\n\n const subscriptionType = req.params[0]\n // subId is 16 byte hex string\n const subId = unsafeRandomBytes(16)\n\n // create sub\n let sub\n switch (subscriptionType) {\n case 'newHeads':\n sub = createSubNewHeads({ subId })\n break\n case 'logs':\n const filterParams = req.params[1]\n const filter = await filterManager.newLogFilter(filterParams)\n sub = createSubFromFilter({ subId, filter })\n break\n default:\n throw new Error(`SubscriptionManager - unsupported subscription type \"${subscriptionType}\"`)\n\n }\n subscriptions[subId] = sub\n\n res.result = subId\n return\n\n function createSubNewHeads({ subId }) {\n const sub = {\n type: subscriptionType,\n destroy: async () => {\n blockTracker.removeListener('sync', sub.update)\n },\n update: async ({ oldBlock, newBlock }) => {\n // for newHeads\n const toBlock = newBlock\n const fromBlock = incrementHexInt(oldBlock)\n const rawBlocks = await getBlocksForRange({ provider, fromBlock, toBlock })\n const results = rawBlocks.map(normalizeBlock).filter(block => block !== null)\n results.forEach((value) => {\n _emitSubscriptionResult(subId, value)\n })\n }\n }\n // check for subscription updates on new block\n blockTracker.on('sync', sub.update)\n return sub\n }\n\n function createSubFromFilter({ subId, filter }) {\n filter.on('update', result => _emitSubscriptionResult(subId, result))\n const sub = {\n type: subscriptionType,\n destroy: async () => {\n return await filterManager.uninstallFilter(filter.idHex)\n },\n }\n return sub\n }\n }\n\n async function unsubscribe(req, res) {\n\n if (isDestroyed) throw new Error(\n 'SubscriptionManager - attempting to use after destroying'\n )\n\n const id = req.params[0]\n const subscription = subscriptions[id]\n // if missing, return \"false\" to indicate it was not removed\n if (!subscription) {\n res.result = false\n return\n }\n // cleanup subscription\n delete subscriptions[id]\n await subscription.destroy()\n res.result = true\n }\n\n function _emitSubscriptionResult(filterIdHex, value) {\n events.emit('notification', {\n jsonrpc: '2.0',\n method: 'eth_subscription',\n params: {\n subscription: filterIdHex,\n result: value,\n },\n })\n }\n\n function destroy() {\n events.removeAllListeners()\n for (const id in subscriptions) {\n subscriptions[id].destroy()\n delete subscriptions[id]\n }\n isDestroyed = true\n }\n}\n\nfunction normalizeBlock(block) {\n if (block === null || block === undefined) {\n return null;\n }\n return {\n hash: block.hash,\n parentHash: block.parentHash,\n sha3Uncles: block.sha3Uncles,\n miner: block.miner,\n stateRoot: block.stateRoot,\n transactionsRoot: block.transactionsRoot,\n receiptsRoot: block.receiptsRoot,\n logsBloom: block.logsBloom,\n difficulty: block.difficulty,\n number: block.number,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n nonce: block.nonce,\n mixHash: block.mixHash,\n timestamp: block.timestamp,\n extraData: block.extraData,\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SubscriptionManager = void 0;\nconst eth_block_tracker_1 = require(\"eth-block-tracker\");\n// TODO: When we update this package we should be able to fix this\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst createSubscriptionManager = require('eth-json-rpc-filters/subscriptionManager');\nconst noop = () => { };\nclass SubscriptionManager {\n constructor(provider) {\n const blockTracker = new eth_block_tracker_1.PollingBlockTracker({\n provider: provider,\n pollingInterval: 15000,\n setSkipCacheFlag: true,\n });\n const { events, middleware } = createSubscriptionManager({\n blockTracker,\n provider,\n });\n this.events = events;\n this.subscriptionMiddleware = middleware;\n }\n async handleRequest(request) {\n const result = {};\n await this.subscriptionMiddleware(request, result, noop, noop);\n return result;\n }\n destroy() {\n this.subscriptionMiddleware.destroy();\n }\n}\nexports.SubscriptionManager = SubscriptionManager;\n","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// TODO: Address linting issues\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletProvider = void 0;\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst eventemitter3_1 = require(\"eventemitter3\");\nconst error_1 = require(\"../core/error\");\nconst util_1 = require(\"../core/util\");\nconst MobileRelay_1 = require(\"../relay/mobile/MobileRelay\");\nconst RelayAbstract_1 = require(\"../relay/RelayAbstract\");\nconst Session_1 = require(\"../relay/Session\");\nconst Web3Response_1 = require(\"../relay/walletlink/type/Web3Response\");\nconst eth_eip712_util_1 = __importDefault(require(\"../vendor-js/eth-eip712-util\"));\nconst DiagnosticLogger_1 = require(\"./DiagnosticLogger\");\nconst FilterPolyfill_1 = require(\"./FilterPolyfill\");\nconst SubscriptionManager_1 = require(\"./SubscriptionManager\");\nconst DEFAULT_CHAIN_ID_KEY = 'DefaultChainId';\nconst DEFAULT_JSON_RPC_URL = 'DefaultJsonRpcUrl';\nclass CoinbaseWalletProvider extends eventemitter3_1.EventEmitter {\n constructor(options) {\n var _a, _b;\n super();\n this._filterPolyfill = new FilterPolyfill_1.FilterPolyfill(this);\n this._subscriptionManager = new SubscriptionManager_1.SubscriptionManager(this);\n this._relay = null;\n this._addresses = [];\n this.hasMadeFirstChainChangedEmission = false;\n this.setProviderInfo = this.setProviderInfo.bind(this);\n this.updateProviderInfo = this.updateProviderInfo.bind(this);\n this.getChainId = this.getChainId.bind(this);\n this.setAppInfo = this.setAppInfo.bind(this);\n this.enable = this.enable.bind(this);\n this.close = this.close.bind(this);\n this.send = this.send.bind(this);\n this.sendAsync = this.sendAsync.bind(this);\n this.request = this.request.bind(this);\n this._setAddresses = this._setAddresses.bind(this);\n this.scanQRCode = this.scanQRCode.bind(this);\n this.genericRequest = this.genericRequest.bind(this);\n this._chainIdFromOpts = options.chainId;\n this._jsonRpcUrlFromOpts = options.jsonRpcUrl;\n this._overrideIsMetaMask = options.overrideIsMetaMask;\n this._relayProvider = options.relayProvider;\n this._storage = options.storage;\n this._relayEventManager = options.relayEventManager;\n this.diagnostic = options.diagnosticLogger;\n this.reloadOnDisconnect = true;\n this.isCoinbaseWallet = (_a = options.overrideIsCoinbaseWallet) !== null && _a !== void 0 ? _a : true;\n this.isCoinbaseBrowser = (_b = options.overrideIsCoinbaseBrowser) !== null && _b !== void 0 ? _b : false;\n this.qrUrl = options.qrUrl;\n const chainId = this.getChainId();\n const chainIdStr = (0, util_1.prepend0x)(chainId.toString(16));\n // indicate that we've connected, for EIP-1193 compliance\n this.emit('connect', { chainIdStr });\n const cachedAddresses = this._storage.getItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY);\n if (cachedAddresses) {\n const addresses = cachedAddresses.split(' ');\n if (addresses[0] !== '') {\n this._addresses = addresses.map((address) => (0, util_1.ensureAddressString)(address));\n this.emit('accountsChanged', addresses);\n }\n }\n this._subscriptionManager.events.on('notification', (notification) => {\n this.emit('message', {\n type: notification.method,\n data: notification.params,\n });\n });\n if (this._isAuthorized()) {\n void this.initializeRelay();\n }\n window.addEventListener('message', (event) => {\n var _a;\n // Used to verify the source and window are correct before proceeding\n if (event.origin !== location.origin || event.source !== window) {\n return;\n }\n if (event.data.type !== 'walletLinkMessage')\n return; // compatibility with CBW extension\n if (event.data.data.action === 'dappChainSwitched') {\n const _chainId = event.data.data.chainId;\n const jsonRpcUrl = (_a = event.data.data.jsonRpcUrl) !== null && _a !== void 0 ? _a : this.jsonRpcUrl;\n this.updateProviderInfo(jsonRpcUrl, Number(_chainId));\n }\n });\n }\n /** @deprecated Use `.request({ method: 'eth_accounts' })` instead. */\n get selectedAddress() {\n return this._addresses[0] || undefined;\n }\n /** @deprecated Use the chain ID. If you still need the network ID, use `.request({ method: 'net_version' })`. */\n get networkVersion() {\n return this.getChainId().toString(10);\n }\n /** @deprecated Use `.request({ method: 'eth_chainId' })` instead. */\n get chainId() {\n return (0, util_1.prepend0x)(this.getChainId().toString(16));\n }\n get isWalletLink() {\n // backward compatibility\n return true;\n }\n /**\n * Some DApps (i.e. Alpha Homora) seem to require the window.ethereum object return\n * true for this method.\n */\n get isMetaMask() {\n return this._overrideIsMetaMask;\n }\n get host() {\n return this.jsonRpcUrl;\n }\n get connected() {\n return true;\n }\n isConnected() {\n return true;\n }\n get jsonRpcUrl() {\n var _a;\n return (_a = this._storage.getItem(DEFAULT_JSON_RPC_URL)) !== null && _a !== void 0 ? _a : this._jsonRpcUrlFromOpts;\n }\n set jsonRpcUrl(value) {\n this._storage.setItem(DEFAULT_JSON_RPC_URL, value);\n }\n disableReloadOnDisconnect() {\n this.reloadOnDisconnect = false;\n }\n setProviderInfo(jsonRpcUrl, chainId) {\n if (!this.isCoinbaseBrowser) {\n this._chainIdFromOpts = chainId;\n this._jsonRpcUrlFromOpts = jsonRpcUrl;\n }\n this.updateProviderInfo(this.jsonRpcUrl, this.getChainId());\n }\n updateProviderInfo(jsonRpcUrl, chainId) {\n this.jsonRpcUrl = jsonRpcUrl;\n // emit chainChanged event if necessary\n const originalChainId = this.getChainId();\n this._storage.setItem(DEFAULT_CHAIN_ID_KEY, chainId.toString(10));\n const chainChanged = (0, util_1.ensureIntNumber)(chainId) !== originalChainId;\n if (chainChanged || !this.hasMadeFirstChainChangedEmission) {\n this.emit('chainChanged', this.getChainId());\n this.hasMadeFirstChainChangedEmission = true;\n }\n }\n async watchAsset(type, address, symbol, decimals, image, chainId) {\n const relay = await this.initializeRelay();\n const result = await relay.watchAsset(type, address, symbol, decimals, image, chainId === null || chainId === void 0 ? void 0 : chainId.toString()).promise;\n if ((0, Web3Response_1.isErrorResponse)(result))\n return false;\n return !!result.result;\n }\n async addEthereumChain(chainId, rpcUrls, blockExplorerUrls, chainName, iconUrls, nativeCurrency) {\n var _a, _b;\n if ((0, util_1.ensureIntNumber)(chainId) === this.getChainId()) {\n return false;\n }\n const relay = await this.initializeRelay();\n const isWhitelistedNetworkOrStandalone = relay.inlineAddEthereumChain(chainId.toString());\n if (!this._isAuthorized() && !isWhitelistedNetworkOrStandalone) {\n await relay.requestEthereumAccounts().promise;\n }\n const res = await relay.addEthereumChain(chainId.toString(), rpcUrls, iconUrls, blockExplorerUrls, chainName, nativeCurrency).promise;\n if ((0, Web3Response_1.isErrorResponse)(res))\n return false;\n if (((_a = res.result) === null || _a === void 0 ? void 0 : _a.isApproved) === true) {\n this.updateProviderInfo(rpcUrls[0], chainId);\n }\n return ((_b = res.result) === null || _b === void 0 ? void 0 : _b.isApproved) === true;\n }\n async switchEthereumChain(chainId) {\n const relay = await this.initializeRelay();\n const res = await relay.switchEthereumChain(chainId.toString(10), this.selectedAddress || undefined).promise;\n // backward compatibility\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n if (!res.errorCode)\n return;\n if (res.errorCode === error_1.standardErrorCodes.provider.unsupportedChain) {\n throw error_1.standardErrors.provider.unsupportedChain();\n }\n else {\n throw error_1.standardErrors.provider.custom({\n message: res.errorMessage,\n code: res.errorCode,\n });\n }\n }\n const switchResponse = res.result;\n if (switchResponse.isApproved && switchResponse.rpcUrl.length > 0) {\n this.updateProviderInfo(switchResponse.rpcUrl, chainId);\n }\n }\n setAppInfo(appName, appLogoUrl) {\n void this.initializeRelay().then((relay) => relay.setAppInfo(appName, appLogoUrl));\n }\n /** @deprecated Use `.request({ method: 'eth_requestAccounts' })` instead. */\n async enable() {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::enable',\n addresses_length: this._addresses.length,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n if (this._isAuthorized()) {\n return [...this._addresses];\n }\n return await this.send('eth_requestAccounts');\n }\n async close() {\n const relay = await this.initializeRelay();\n relay.resetAndReload();\n }\n send(requestOrMethod, callbackOrParams) {\n // send(method, params): Promise\n try {\n const result = this._send(requestOrMethod, callbackOrParams);\n if (result instanceof Promise) {\n return result.catch((error) => {\n throw (0, error_1.serializeError)(error, requestOrMethod);\n });\n }\n }\n catch (error) {\n throw (0, error_1.serializeError)(error, requestOrMethod);\n }\n }\n _send(requestOrMethod, callbackOrParams) {\n if (typeof requestOrMethod === 'string') {\n const method = requestOrMethod;\n const params = Array.isArray(callbackOrParams)\n ? callbackOrParams\n : callbackOrParams !== undefined\n ? [callbackOrParams]\n : [];\n const request = {\n jsonrpc: '2.0',\n id: 0,\n method,\n params,\n };\n return this._sendRequestAsync(request).then((res) => res.result);\n }\n // send(JSONRPCRequest | JSONRPCRequest[], callback): void\n if (typeof callbackOrParams === 'function') {\n const request = requestOrMethod;\n const callback = callbackOrParams;\n return this._sendAsync(request, callback);\n }\n // send(JSONRPCRequest[]): JSONRPCResponse[]\n if (Array.isArray(requestOrMethod)) {\n const requests = requestOrMethod;\n return requests.map((r) => this._sendRequest(r));\n }\n // send(JSONRPCRequest): JSONRPCResponse\n const req = requestOrMethod;\n return this._sendRequest(req);\n }\n async sendAsync(request, callback) {\n try {\n return this._sendAsync(request, callback).catch((error) => {\n throw (0, error_1.serializeError)(error, request);\n });\n }\n catch (error) {\n return Promise.reject((0, error_1.serializeError)(error, request));\n }\n }\n async _sendAsync(request, callback) {\n if (typeof callback !== 'function') {\n throw new Error('callback is required');\n }\n // send(JSONRPCRequest[], callback): void\n if (Array.isArray(request)) {\n const arrayCb = callback;\n this._sendMultipleRequestsAsync(request)\n .then((responses) => arrayCb(null, responses))\n .catch((err) => arrayCb(err, null));\n return;\n }\n // send(JSONRPCRequest, callback): void\n const cb = callback;\n return this._sendRequestAsync(request)\n .then((response) => cb(null, response))\n .catch((err) => cb(err, null));\n }\n async request(args) {\n try {\n return this._request(args).catch((error) => {\n throw (0, error_1.serializeError)(error, args.method);\n });\n }\n catch (error) {\n return Promise.reject((0, error_1.serializeError)(error, args.method));\n }\n }\n async _request(args) {\n if (!args || typeof args !== 'object' || Array.isArray(args)) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: 'Expected a single, non-array, object argument.',\n data: args,\n });\n }\n const { method, params } = args;\n if (typeof method !== 'string' || method.length === 0) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: \"'args.method' must be a non-empty string.\",\n data: args,\n });\n }\n if (params !== undefined &&\n !Array.isArray(params) &&\n (typeof params !== 'object' || params === null)) {\n throw error_1.standardErrors.rpc.invalidRequest({\n message: \"'args.params' must be an object or array if provided.\",\n data: args,\n });\n }\n const newParams = params === undefined ? [] : params;\n // Coinbase Wallet Requests\n const id = this._relayEventManager.makeRequestId();\n const result = await this._sendRequestAsync({\n method,\n params: newParams,\n jsonrpc: '2.0',\n id,\n });\n return result.result;\n }\n async scanQRCode(match) {\n const relay = await this.initializeRelay();\n const res = await relay.scanQRCode((0, util_1.ensureRegExpString)(match)).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'scanQRCode');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'scanQRCode');\n }\n return res.result;\n }\n async genericRequest(data, action) {\n const relay = await this.initializeRelay();\n const res = await relay.genericRequest(data, action).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'generic');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'generic');\n }\n return res.result;\n }\n /**\n * @beta\n * This method is currently in beta. While it is available for use, please note that it is still under testing and may undergo significant changes.\n *\n * @remarks\n * IMPORTANT: Signature validation is not performed by this method. Users of this method are advised to perform their own signature validation.\n * Common web3 frontend libraries such as ethers.js and viem provide the `verifyMessage` utility function that can be used for signature validation.\n *\n * It combines `eth_requestAccounts` and \"Sign-In with Ethereum\" (EIP-4361) into a single call.\n * The returned account and signed message can be used to authenticate the user.\n *\n * @param {Object} params - An object with the following properties:\n * - `nonce` {string}: A unique string to prevent replay attacks.\n * - `statement` {string}: An optional human-readable ASCII assertion that the user will sign.\n * - `resources` {string[]}: An optional list of information the user wishes to have resolved as part of authentication by the relying party.\n *\n * @returns {Promise} A promise that resolves to an object with the following properties:\n * - `accounts` {string[]}: The Ethereum accounts of the user.\n * - `message` {string}: The overall message that the user signed. Hex encoded.\n * - `signature` {string}: The signature of the message, signed with the user's private key. Hex encoded.\n */\n async connectAndSignIn(params) {\n // NOTE: It was intentionally built by following the pattern of the existing eth_requestAccounts method\n // to maintain consistency and avoid introducing a new pattern.\n // We acknowledge the need for a better design, and it is planned to address and improve it in a future refactor.\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::connectAndSignIn',\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n let res;\n try {\n const relay = await this.initializeRelay();\n if (!(relay instanceof MobileRelay_1.MobileRelay)) {\n throw new Error('connectAndSignIn is only supported on mobile');\n }\n res = await relay.connectAndSignIn(params).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n }\n throw err;\n }\n if (!res.result) {\n throw new Error('accounts received is empty');\n }\n const { accounts } = res.result;\n this._setAddresses(accounts);\n if (!this.isCoinbaseBrowser) {\n await this.switchEthereumChain(this.getChainId());\n }\n return res.result;\n }\n async selectProvider(providerOptions) {\n const relay = await this.initializeRelay();\n const res = await relay.selectProvider(providerOptions).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw (0, error_1.serializeError)(res.errorMessage, 'selectProvider');\n }\n else if (typeof res.result !== 'string') {\n throw (0, error_1.serializeError)('result was not a string', 'selectProvider');\n }\n return res.result;\n }\n supportsSubscriptions() {\n return false;\n }\n subscribe() {\n throw new Error('Subscriptions are not supported');\n }\n unsubscribe() {\n throw new Error('Subscriptions are not supported');\n }\n disconnect() {\n return true;\n }\n _sendRequest(request) {\n const response = {\n jsonrpc: '2.0',\n id: request.id,\n };\n const { method } = request;\n response.result = this._handleSynchronousMethods(request);\n if (response.result === undefined) {\n throw new Error(`Coinbase Wallet does not support calling ${method} synchronously without ` +\n `a callback. Please provide a callback parameter to call ${method} ` +\n `asynchronously.`);\n }\n return response;\n }\n _setAddresses(addresses, _) {\n if (!Array.isArray(addresses)) {\n throw new Error('addresses is not an array');\n }\n const newAddresses = addresses.map((address) => (0, util_1.ensureAddressString)(address));\n if (JSON.stringify(newAddresses) === JSON.stringify(this._addresses)) {\n return;\n }\n this._addresses = newAddresses;\n this.emit('accountsChanged', this._addresses);\n this._storage.setItem(RelayAbstract_1.LOCAL_STORAGE_ADDRESSES_KEY, newAddresses.join(' '));\n }\n _sendRequestAsync(request) {\n return new Promise((resolve, reject) => {\n try {\n const syncResult = this._handleSynchronousMethods(request);\n if (syncResult !== undefined) {\n return resolve({\n jsonrpc: '2.0',\n id: request.id,\n result: syncResult,\n });\n }\n const filterPromise = this._handleAsynchronousFilterMethods(request);\n if (filterPromise !== undefined) {\n filterPromise\n .then((res) => resolve(Object.assign(Object.assign({}, res), { id: request.id })))\n .catch((err) => reject(err));\n return;\n }\n const subscriptionPromise = this._handleSubscriptionMethods(request);\n if (subscriptionPromise !== undefined) {\n subscriptionPromise\n .then((res) => resolve({\n jsonrpc: '2.0',\n id: request.id,\n result: res.result,\n }))\n .catch((err) => reject(err));\n return;\n }\n }\n catch (err) {\n return reject(err);\n }\n this._handleAsynchronousMethods(request)\n .then((res) => res && resolve(Object.assign(Object.assign({}, res), { id: request.id })))\n .catch((err) => reject(err));\n });\n }\n _sendMultipleRequestsAsync(requests) {\n return Promise.all(requests.map((r) => this._sendRequestAsync(r)));\n }\n _handleSynchronousMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_accounts':\n return this._eth_accounts();\n case 'eth_coinbase':\n return this._eth_coinbase();\n case 'eth_uninstallFilter':\n return this._eth_uninstallFilter(params);\n case 'net_version':\n return this._net_version();\n case 'eth_chainId':\n return this._eth_chainId();\n default:\n return undefined;\n }\n }\n async _handleAsynchronousMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_requestAccounts':\n return this._eth_requestAccounts();\n case 'eth_sign':\n return this._eth_sign(params);\n case 'eth_ecRecover':\n return this._eth_ecRecover(params);\n case 'personal_sign':\n return this._personal_sign(params);\n case 'personal_ecRecover':\n return this._personal_ecRecover(params);\n case 'eth_signTransaction':\n return this._eth_signTransaction(params);\n case 'eth_sendRawTransaction':\n return this._eth_sendRawTransaction(params);\n case 'eth_sendTransaction':\n return this._eth_sendTransaction(params);\n case 'eth_signTypedData_v1':\n return this._eth_signTypedData_v1(params);\n case 'eth_signTypedData_v2':\n return this._throwUnsupportedMethodError();\n case 'eth_signTypedData_v3':\n return this._eth_signTypedData_v3(params);\n case 'eth_signTypedData_v4':\n case 'eth_signTypedData':\n return this._eth_signTypedData_v4(params);\n case 'cbWallet_arbitrary':\n return this._cbwallet_arbitrary(params);\n case 'wallet_addEthereumChain':\n return this._wallet_addEthereumChain(params);\n case 'wallet_switchEthereumChain':\n return this._wallet_switchEthereumChain(params);\n case 'wallet_watchAsset':\n return this._wallet_watchAsset(params);\n }\n const relay = await this.initializeRelay();\n return relay.makeEthereumJSONRPCRequest(request, this.jsonRpcUrl).catch((err) => {\n var _a;\n if (err.code === error_1.standardErrorCodes.rpc.methodNotFound ||\n err.code === error_1.standardErrorCodes.rpc.methodNotSupported) {\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.METHOD_NOT_IMPLEMENTED, {\n method: request.method,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n }\n throw err;\n });\n }\n _handleAsynchronousFilterMethods(request) {\n const { method } = request;\n const params = request.params || [];\n switch (method) {\n case 'eth_newFilter':\n return this._eth_newFilter(params);\n case 'eth_newBlockFilter':\n return this._eth_newBlockFilter();\n case 'eth_newPendingTransactionFilter':\n return this._eth_newPendingTransactionFilter();\n case 'eth_getFilterChanges':\n return this._eth_getFilterChanges(params);\n case 'eth_getFilterLogs':\n return this._eth_getFilterLogs(params);\n }\n return undefined;\n }\n _handleSubscriptionMethods(request) {\n switch (request.method) {\n case 'eth_subscribe':\n case 'eth_unsubscribe':\n return this._subscriptionManager.handleRequest(request);\n }\n return undefined;\n }\n _isKnownAddress(addressString) {\n try {\n const addressStr = (0, util_1.ensureAddressString)(addressString);\n const lowercaseAddresses = this._addresses.map((address) => (0, util_1.ensureAddressString)(address));\n return lowercaseAddresses.includes(addressStr);\n }\n catch (_a) {\n // noop\n }\n return false;\n }\n _ensureKnownAddress(addressString) {\n var _a;\n if (!this._isKnownAddress(addressString)) {\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED);\n throw new Error('Unknown Ethereum address');\n }\n }\n _prepareTransactionParams(tx) {\n const fromAddress = tx.from ? (0, util_1.ensureAddressString)(tx.from) : this.selectedAddress;\n if (!fromAddress) {\n throw new Error('Ethereum address is unavailable');\n }\n this._ensureKnownAddress(fromAddress);\n const toAddress = tx.to ? (0, util_1.ensureAddressString)(tx.to) : null;\n const weiValue = tx.value != null ? (0, util_1.ensureBN)(tx.value) : new bn_js_1.default(0);\n const data = tx.data ? (0, util_1.ensureBuffer)(tx.data) : Buffer.alloc(0);\n const nonce = tx.nonce != null ? (0, util_1.ensureIntNumber)(tx.nonce) : null;\n const gasPriceInWei = tx.gasPrice != null ? (0, util_1.ensureBN)(tx.gasPrice) : null;\n const maxFeePerGas = tx.maxFeePerGas != null ? (0, util_1.ensureBN)(tx.maxFeePerGas) : null;\n const maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? (0, util_1.ensureBN)(tx.maxPriorityFeePerGas) : null;\n const gasLimit = tx.gas != null ? (0, util_1.ensureBN)(tx.gas) : null;\n const chainId = tx.chainId ? (0, util_1.ensureIntNumber)(tx.chainId) : this.getChainId();\n return {\n fromAddress,\n toAddress,\n weiValue,\n data,\n nonce,\n gasPriceInWei,\n maxFeePerGas,\n maxPriorityFeePerGas,\n gasLimit,\n chainId,\n };\n }\n _isAuthorized() {\n return this._addresses.length > 0;\n }\n _requireAuthorization() {\n if (!this._isAuthorized()) {\n throw error_1.standardErrors.provider.unauthorized({});\n }\n }\n _throwUnsupportedMethodError() {\n throw error_1.standardErrors.provider.unsupportedMethod({});\n }\n async _signEthereumMessage(message, address, addPrefix, typedDataJson) {\n this._ensureKnownAddress(address);\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signEthereumMessage(message, address, addPrefix, typedDataJson)\n .promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied message signature');\n }\n throw err;\n }\n }\n async _ethereumAddressFromSignedMessage(message, signature, addPrefix) {\n const relay = await this.initializeRelay();\n const res = await relay.ethereumAddressFromSignedMessage(message, signature, addPrefix).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n _eth_accounts() {\n return [...this._addresses];\n }\n _eth_coinbase() {\n return this.selectedAddress || null;\n }\n _net_version() {\n return this.getChainId().toString(10);\n }\n _eth_chainId() {\n return (0, util_1.hexStringFromIntNumber)(this.getChainId());\n }\n getChainId() {\n const chainIdStr = this._storage.getItem(DEFAULT_CHAIN_ID_KEY);\n if (!chainIdStr) {\n return (0, util_1.ensureIntNumber)(this._chainIdFromOpts);\n }\n const chainId = parseInt(chainIdStr, 10);\n return (0, util_1.ensureIntNumber)(chainId);\n }\n async _eth_requestAccounts() {\n var _a;\n (_a = this.diagnostic) === null || _a === void 0 ? void 0 : _a.log(DiagnosticLogger_1.EVENTS.ETH_ACCOUNTS_STATE, {\n method: 'provider::_eth_requestAccounts',\n addresses_length: this._addresses.length,\n sessionIdHash: this._relay ? Session_1.Session.hash(this._relay.session.id) : undefined,\n });\n if (this._isAuthorized()) {\n return Promise.resolve({\n jsonrpc: '2.0',\n id: 0,\n result: this._addresses,\n });\n }\n let res;\n try {\n const relay = await this.initializeRelay();\n res = await relay.requestEthereumAccounts().promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied account authorization');\n }\n throw err;\n }\n if (!res.result) {\n throw new Error('accounts received is empty');\n }\n this._setAddresses(res.result);\n if (!this.isCoinbaseBrowser) {\n await this.switchEthereumChain(this.getChainId());\n }\n return { jsonrpc: '2.0', id: 0, result: this._addresses };\n }\n _eth_sign(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const message = (0, util_1.ensureBuffer)(params[1]);\n return this._signEthereumMessage(message, address, false);\n }\n _eth_ecRecover(params) {\n const message = (0, util_1.ensureBuffer)(params[0]);\n const signature = (0, util_1.ensureBuffer)(params[1]);\n return this._ethereumAddressFromSignedMessage(message, signature, false);\n }\n _personal_sign(params) {\n this._requireAuthorization();\n const message = (0, util_1.ensureBuffer)(params[0]);\n const address = (0, util_1.ensureAddressString)(params[1]);\n return this._signEthereumMessage(message, address, true);\n }\n _personal_ecRecover(params) {\n const message = (0, util_1.ensureBuffer)(params[0]);\n const signature = (0, util_1.ensureBuffer)(params[1]);\n return this._ethereumAddressFromSignedMessage(message, signature, true);\n }\n async _eth_signTransaction(params) {\n this._requireAuthorization();\n const tx = this._prepareTransactionParams(params[0] || {});\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signEthereumTransaction(tx).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied transaction signature');\n }\n throw err;\n }\n }\n async _eth_sendRawTransaction(params) {\n const signedTransaction = (0, util_1.ensureBuffer)(params[0]);\n const relay = await this.initializeRelay();\n const res = await relay.submitEthereumTransaction(signedTransaction, this.getChainId()).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n async _eth_sendTransaction(params) {\n this._requireAuthorization();\n const tx = this._prepareTransactionParams(params[0] || {});\n try {\n const relay = await this.initializeRelay();\n const res = await relay.signAndSubmitEthereumTransaction(tx).promise;\n if ((0, Web3Response_1.isErrorResponse)(res)) {\n throw new Error(res.errorMessage);\n }\n return { jsonrpc: '2.0', id: 0, result: res.result };\n }\n catch (err) {\n if (typeof err.message === 'string' && err.message.match(/(denied|rejected)/i)) {\n throw error_1.standardErrors.provider.userRejectedRequest('User denied transaction signature');\n }\n throw err;\n }\n }\n async _eth_signTypedData_v1(params) {\n this._requireAuthorization();\n const typedData = (0, util_1.ensureParsedJSONObject)(params[0]);\n const address = (0, util_1.ensureAddressString)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedDataLegacy({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n async _eth_signTypedData_v3(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const typedData = (0, util_1.ensureParsedJSONObject)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedData_v3({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n async _eth_signTypedData_v4(params) {\n this._requireAuthorization();\n const address = (0, util_1.ensureAddressString)(params[0]);\n const typedData = (0, util_1.ensureParsedJSONObject)(params[1]);\n this._ensureKnownAddress(address);\n const message = eth_eip712_util_1.default.hashForSignTypedData_v4({ data: typedData });\n const typedDataJSON = JSON.stringify(typedData, null, 2);\n return this._signEthereumMessage(message, address, false, typedDataJSON);\n }\n /** @deprecated */\n async _cbwallet_arbitrary(params) {\n const action = params[0];\n const data = params[1];\n if (typeof data !== 'string') {\n throw new Error('parameter must be a string');\n }\n if (typeof action !== 'object' || action === null) {\n throw new Error('parameter must be an object');\n }\n const result = await this.genericRequest(action, data);\n return { jsonrpc: '2.0', id: 0, result };\n }\n async _wallet_addEthereumChain(params) {\n var _a, _b, _c, _d;\n const request = params[0];\n if (((_a = request.rpcUrls) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n return {\n jsonrpc: '2.0',\n id: 0,\n error: { code: 2, message: `please pass in at least 1 rpcUrl` },\n };\n }\n if (!request.chainName || request.chainName.trim() === '') {\n throw error_1.standardErrors.rpc.invalidParams('chainName is a required field');\n }\n if (!request.nativeCurrency) {\n throw error_1.standardErrors.rpc.invalidParams('nativeCurrency is a required field');\n }\n const chainIdNumber = parseInt(request.chainId, 16);\n const success = await this.addEthereumChain(chainIdNumber, (_b = request.rpcUrls) !== null && _b !== void 0 ? _b : [], (_c = request.blockExplorerUrls) !== null && _c !== void 0 ? _c : [], request.chainName, (_d = request.iconUrls) !== null && _d !== void 0 ? _d : [], request.nativeCurrency);\n if (success) {\n return { jsonrpc: '2.0', id: 0, result: null };\n }\n return {\n jsonrpc: '2.0',\n id: 0,\n error: { code: 2, message: `unable to add ethereum chain` },\n };\n }\n async _wallet_switchEthereumChain(params) {\n const request = params[0];\n await this.switchEthereumChain(parseInt(request.chainId, 16));\n return { jsonrpc: '2.0', id: 0, result: null };\n }\n async _wallet_watchAsset(params) {\n const request = (Array.isArray(params) ? params[0] : params);\n if (!request.type) {\n throw error_1.standardErrors.rpc.invalidParams('Type is required');\n }\n if ((request === null || request === void 0 ? void 0 : request.type) !== 'ERC20') {\n throw error_1.standardErrors.rpc.invalidParams(`Asset of type '${request.type}' is not supported`);\n }\n if (!(request === null || request === void 0 ? void 0 : request.options)) {\n throw error_1.standardErrors.rpc.invalidParams('Options are required');\n }\n if (!(request === null || request === void 0 ? void 0 : request.options.address)) {\n throw error_1.standardErrors.rpc.invalidParams('Address is required');\n }\n const chainId = this.getChainId();\n const { address, symbol, image, decimals } = request.options;\n const res = await this.watchAsset(request.type, address, symbol, decimals, image, chainId);\n return { jsonrpc: '2.0', id: 0, result: res };\n }\n _eth_uninstallFilter(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.uninstallFilter(filterId);\n }\n async _eth_newFilter(params) {\n const param = params[0];\n const filterId = await this._filterPolyfill.newFilter(param);\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n async _eth_newBlockFilter() {\n const filterId = await this._filterPolyfill.newBlockFilter();\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n async _eth_newPendingTransactionFilter() {\n const filterId = await this._filterPolyfill.newPendingTransactionFilter();\n return { jsonrpc: '2.0', id: 0, result: filterId };\n }\n _eth_getFilterChanges(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.getFilterChanges(filterId);\n }\n _eth_getFilterLogs(params) {\n const filterId = (0, util_1.ensureHexString)(params[0]);\n return this._filterPolyfill.getFilterLogs(filterId);\n }\n initializeRelay() {\n if (this._relay) {\n return Promise.resolve(this._relay);\n }\n return this._relayProvider().then((relay) => {\n relay.setAccountsCallback((accounts, isDisconnect) => this._setAddresses(accounts, isDisconnect));\n relay.setChainCallback((chainId, jsonRpcUrl) => {\n this.updateProviderInfo(jsonRpcUrl, parseInt(chainId, 10));\n });\n relay.setDappDefaultChainCallback(this._chainIdFromOpts);\n this._relay = relay;\n return relay;\n });\n }\n}\nexports.CoinbaseWalletProvider = CoinbaseWalletProvider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RelayEventManager = void 0;\nconst util_1 = require(\"../core/util\");\nclass RelayEventManager {\n constructor() {\n this._nextRequestId = 0;\n this.callbacks = new Map();\n }\n makeRequestId() {\n // max nextId == max int32 for compatibility with mobile\n this._nextRequestId = (this._nextRequestId + 1) % 0x7fffffff;\n const id = this._nextRequestId;\n const idStr = (0, util_1.prepend0x)(id.toString(16));\n // unlikely that this will ever be an issue, but just to be safe\n const callback = this.callbacks.get(idStr);\n if (callback) {\n this.callbacks.delete(idStr);\n }\n return id;\n }\n}\nexports.RelayEventManager = RelayEventManager;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletSDK = void 0;\nconst wallet_logo_1 = require(\"./assets/wallet-logo\");\nconst constants_1 = require(\"./core/constants\");\nconst util_1 = require(\"./core/util\");\nconst ScopedLocalStorage_1 = require(\"./lib/ScopedLocalStorage\");\nconst CoinbaseWalletProvider_1 = require(\"./provider/CoinbaseWalletProvider\");\nconst MobileRelay_1 = require(\"./relay/mobile/MobileRelay\");\nconst MobileRelayUI_1 = require(\"./relay/mobile/MobileRelayUI\");\nconst RelayEventManager_1 = require(\"./relay/RelayEventManager\");\nconst WalletLinkRelayUI_1 = require(\"./relay/walletlink/ui/WalletLinkRelayUI\");\nconst WalletLinkRelay_1 = require(\"./relay/walletlink/WalletLinkRelay\");\nconst version_1 = require(\"./version\");\nclass CoinbaseWalletSDK {\n /**\n * Constructor\n * @param options Coinbase Wallet SDK constructor options\n */\n constructor(options) {\n var _a, _b, _c;\n this._appName = '';\n this._appLogoUrl = null;\n this._relay = null;\n this._relayEventManager = null;\n const linkAPIUrl = options.linkAPIUrl || constants_1.LINK_API_URL;\n if (typeof options.overrideIsMetaMask === 'undefined') {\n this._overrideIsMetaMask = false;\n }\n else {\n this._overrideIsMetaMask = options.overrideIsMetaMask;\n }\n this._overrideIsCoinbaseWallet = (_a = options.overrideIsCoinbaseWallet) !== null && _a !== void 0 ? _a : true;\n this._overrideIsCoinbaseBrowser = (_b = options.overrideIsCoinbaseBrowser) !== null && _b !== void 0 ? _b : false;\n this._diagnosticLogger = options.diagnosticLogger;\n this._reloadOnDisconnect = (_c = options.reloadOnDisconnect) !== null && _c !== void 0 ? _c : true;\n const url = new URL(linkAPIUrl);\n const origin = `${url.protocol}//${url.host}`;\n this._storage = new ScopedLocalStorage_1.ScopedLocalStorage(`-walletlink:${origin}`); // needs migration to preserve local states\n this._storage.setItem('version', CoinbaseWalletSDK.VERSION);\n if (this.walletExtension || this.coinbaseBrowser) {\n return;\n }\n this._relayEventManager = new RelayEventManager_1.RelayEventManager();\n const isMobile = (0, util_1.isMobileWeb)();\n const uiConstructor = options.uiConstructor ||\n ((opts) => (isMobile ? new MobileRelayUI_1.MobileRelayUI(opts) : new WalletLinkRelayUI_1.WalletLinkRelayUI(opts)));\n const relayOption = {\n linkAPIUrl,\n version: version_1.LIB_VERSION,\n darkMode: !!options.darkMode,\n uiConstructor,\n storage: this._storage,\n relayEventManager: this._relayEventManager,\n diagnosticLogger: this._diagnosticLogger,\n reloadOnDisconnect: this._reloadOnDisconnect,\n enableMobileWalletLink: options.enableMobileWalletLink,\n };\n this._relay = isMobile ? new MobileRelay_1.MobileRelay(relayOption) : new WalletLinkRelay_1.WalletLinkRelay(relayOption);\n this.setAppInfo(options.appName, options.appLogoUrl);\n if (options.headlessMode)\n return;\n this._relay.attachUI();\n }\n /**\n * Create a Web3 Provider object\n * @param jsonRpcUrl Ethereum JSON RPC URL (Default: \"\")\n * @param chainId Ethereum Chain ID (Default: 1)\n * @returns A Web3 Provider\n */\n makeWeb3Provider(jsonRpcUrl = '', chainId = 1) {\n const extension = this.walletExtension;\n if (extension) {\n if (!this.isCipherProvider(extension)) {\n extension.setProviderInfo(jsonRpcUrl, chainId);\n }\n if (this._reloadOnDisconnect === false &&\n typeof extension.disableReloadOnDisconnect === 'function')\n extension.disableReloadOnDisconnect();\n return extension;\n }\n const dappBrowser = this.coinbaseBrowser;\n if (dappBrowser) {\n return dappBrowser;\n }\n const relay = this._relay;\n if (!relay || !this._relayEventManager || !this._storage) {\n throw new Error('Relay not initialized, should never happen');\n }\n if (!jsonRpcUrl)\n relay.setConnectDisabled(true);\n return new CoinbaseWalletProvider_1.CoinbaseWalletProvider({\n relayProvider: () => Promise.resolve(relay),\n relayEventManager: this._relayEventManager,\n storage: this._storage,\n jsonRpcUrl,\n chainId,\n qrUrl: this.getQrUrl(),\n diagnosticLogger: this._diagnosticLogger,\n overrideIsMetaMask: this._overrideIsMetaMask,\n overrideIsCoinbaseWallet: this._overrideIsCoinbaseWallet,\n overrideIsCoinbaseBrowser: this._overrideIsCoinbaseBrowser,\n });\n }\n /**\n * Set application information\n * @param appName Application name\n * @param appLogoUrl Application logo image URL\n */\n setAppInfo(appName, appLogoUrl) {\n var _a;\n this._appName = appName || 'DApp';\n this._appLogoUrl = appLogoUrl || (0, util_1.getFavicon)();\n const extension = this.walletExtension;\n if (extension) {\n if (!this.isCipherProvider(extension)) {\n extension.setAppInfo(this._appName, this._appLogoUrl);\n }\n }\n else {\n (_a = this._relay) === null || _a === void 0 ? void 0 : _a.setAppInfo(this._appName, this._appLogoUrl);\n }\n }\n /**\n * Disconnect. After disconnecting, this will reload the web page to ensure\n * all potential stale state is cleared.\n */\n disconnect() {\n var _a;\n const extension = this === null || this === void 0 ? void 0 : this.walletExtension;\n if (extension) {\n void extension.close();\n }\n else {\n (_a = this._relay) === null || _a === void 0 ? void 0 : _a.resetAndReload();\n }\n }\n /**\n * Return QR URL for mobile wallet connection, will return null if extension is installed\n */\n getQrUrl() {\n var _a, _b;\n return (_b = (_a = this._relay) === null || _a === void 0 ? void 0 : _a.getQRCodeUrl()) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Official Coinbase Wallet logo for developers to use on their frontend\n * @param type Type of wallet logo: \"standard\" | \"circle\" | \"text\" | \"textWithLogo\" | \"textLight\" | \"textWithLogoLight\"\n * @param width Width of the logo (Optional)\n * @returns SVG Data URI\n */\n getCoinbaseWalletLogo(type, width = 240) {\n return (0, wallet_logo_1.walletLogo)(type, width);\n }\n get walletExtension() {\n var _a;\n return (_a = window.coinbaseWalletExtension) !== null && _a !== void 0 ? _a : window.walletLinkExtension;\n }\n get coinbaseBrowser() {\n var _a, _b;\n try {\n // Coinbase DApp browser does not inject into iframes so grab provider from top frame if it exists\n const ethereum = (_a = window.ethereum) !== null && _a !== void 0 ? _a : (_b = window.top) === null || _b === void 0 ? void 0 : _b.ethereum;\n if (!ethereum) {\n return undefined;\n }\n if ('isCoinbaseBrowser' in ethereum && ethereum.isCoinbaseBrowser) {\n return ethereum;\n }\n return undefined;\n }\n catch (e) {\n return undefined;\n }\n }\n isCipherProvider(provider) {\n // @ts-expect-error isCipher walletlink property\n return typeof provider.isCipher === 'boolean' && provider.isCipher;\n }\n}\nexports.CoinbaseWalletSDK = CoinbaseWalletSDK;\nCoinbaseWalletSDK.VERSION = version_1.LIB_VERSION;\n","\"use strict\";\n// Copyright (c) 2018-2023 Coinbase, Inc. \n// Licensed under the Apache License, version 2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoinbaseWalletProvider = exports.CoinbaseWalletSDK = void 0;\nconst CoinbaseWalletSDK_1 = require(\"./CoinbaseWalletSDK\");\nconst CoinbaseWalletProvider_1 = require(\"./provider/CoinbaseWalletProvider\");\nvar CoinbaseWalletSDK_2 = require(\"./CoinbaseWalletSDK\");\nObject.defineProperty(exports, \"CoinbaseWalletSDK\", { enumerable: true, get: function () { return CoinbaseWalletSDK_2.CoinbaseWalletSDK; } });\nvar CoinbaseWalletProvider_2 = require(\"./provider/CoinbaseWalletProvider\");\nObject.defineProperty(exports, \"CoinbaseWalletProvider\", { enumerable: true, get: function () { return CoinbaseWalletProvider_2.CoinbaseWalletProvider; } });\nexports.default = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\nif (typeof window !== 'undefined') {\n window.CoinbaseWalletSDK = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\n window.CoinbaseWalletProvider = CoinbaseWalletProvider_1.CoinbaseWalletProvider;\n /**\n * @deprecated Use `window.CoinbaseWalletSDK`\n */\n window.WalletLink = CoinbaseWalletSDK_1.CoinbaseWalletSDK;\n /**\n * @deprecated Use `window.CoinbaseWalletProvider`\n */\n window.WalletLinkProvider = CoinbaseWalletProvider_1.CoinbaseWalletProvider;\n}\n","import '@web3modal/polyfills';\nimport { CoinbaseWalletSDK } from '@coinbase/wallet-sdk';\nexport function defaultConfig(options) {\n const { enableEIP6963 = true, enableInjected = true, enableCoinbase = true, enableEmail = false, metadata, rpcUrl, defaultChainId } = options;\n let injectedProvider = undefined;\n let coinbaseProvider = undefined;\n const providers = { metadata };\n function getInjectedProvider() {\n if (injectedProvider) {\n return injectedProvider;\n }\n if (typeof window === 'undefined') {\n return undefined;\n }\n if (!window.ethereum) {\n return undefined;\n }\n injectedProvider = window.ethereum;\n return injectedProvider;\n }\n function getCoinbaseProvider() {\n if (coinbaseProvider) {\n return coinbaseProvider;\n }\n if (typeof window === 'undefined') {\n return undefined;\n }\n const coinbaseWallet = new CoinbaseWalletSDK({\n appName: metadata.name,\n appLogoUrl: metadata.icons[0],\n darkMode: false,\n enableMobileWalletLink: true\n });\n coinbaseProvider = coinbaseWallet.makeWeb3Provider(rpcUrl, defaultChainId);\n return coinbaseProvider;\n }\n if (enableInjected) {\n providers.injected = getInjectedProvider();\n }\n if (enableCoinbase && rpcUrl && defaultChainId) {\n providers.coinbase = getCoinbaseProvider();\n }\n if (enableEIP6963) {\n providers.EIP6963 = true;\n }\n if (enableEmail) {\n providers.email = true;\n }\n return providers;\n}\n//# sourceMappingURL=defaultConfig.js.map","import { Web3Modal } from '../src/client.js';\nimport { ConstantsUtil } from '@web3modal/scaffold-utils';\nexport { defaultConfig } from '../src/utils/defaultConfig.js';\nexport function createWeb3Modal(options) {\n return new Web3Modal({ ...options, _sdkVersion: `html-ethers-${ConstantsUtil.VERSION}` });\n}\n//# sourceMappingURL=index.js.map","import icons from './icons'\nimport { networks } from '../../index'\nimport type { EIP1193Provider } from './EIP6963'\nimport type { Provider } from '../../services/Provider'\nimport type { Chain } from '@web3modal/scaffold-utils/ethers'\nimport { createWeb3Modal, defaultConfig } from '@web3modal/ethers'\nimport type { Web3Modal as Web3ModalType } from '@web3modal/ethers'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\nimport { ErrorTypeEnum, WalletPlatformEnum } from '@multiplechain/types'\nimport type { CustomWallet, EventsControllerState, Metadata, ThemeVariables } from '@web3modal/core'\n\ntype EventFunction = (newEvent: EventsControllerState, modal?: Web3ModalType) => void\n\nexport interface Web3ModalConfig {\n projectId: string\n metadata: Metadata\n events?: EventFunction[]\n themeMode?: 'dark' | 'light'\n customWallets?: CustomWallet[]\n themeVariables?: ThemeVariables\n}\n\nconst chains: Chain[] = networks\n .getAll()\n .map((network: any) => {\n return {\n chainId: network.id,\n name: network.name ?? network.nativeCurrency.symbol,\n currency: network.nativeCurrency.symbol,\n explorerUrl: network.explorerUrl,\n rpcUrl: network.rpcUrl\n }\n })\n .filter((network: any) => network)\n\nlet currentNetwork: Chain\nlet web3Wallets: Web3ModalType | undefined\nlet connectRejectMethod: (reason?: any) => void\nlet connectResolveMethod: (value: EIP1193Provider | PromiseLike) => void\n\nconst createWeb3Wallets = (config: Web3ModalConfig): Web3ModalType => {\n if (web3Wallets !== undefined) {\n return web3Wallets\n }\n\n const ethersConfig = defaultConfig({\n metadata: config.metadata\n })\n\n web3Wallets = createWeb3Modal({\n chains,\n ethersConfig,\n projectId: config.projectId,\n themeMode: config.themeMode,\n allowUnsupportedChain: true,\n customWallets: config.customWallets,\n themeVariables: config.themeVariables\n })\n\n if (config.events !== undefined) {\n config.events.forEach((event) => {\n web3Wallets?.subscribeEvents((newEvent: EventsControllerState) => {\n event(newEvent, web3Wallets)\n })\n })\n }\n\n web3Wallets.subscribeProvider(async ({ provider, chainId }) => {\n if (provider === undefined) {\n return\n }\n\n if (currentNetwork.chainId !== chainId) {\n await web3Wallets?.switchNetwork(currentNetwork.chainId).catch(() => {\n connectRejectMethod(new Error(ErrorTypeEnum.WALLET_CONNECT_REJECTED))\n })\n }\n\n connectResolveMethod(provider as EIP1193Provider)\n })\n\n return web3Wallets\n}\n\nconst Web3Wallets: WalletAdapterInterface = {\n id: 'web3wallets',\n name: 'Web3 Wallets',\n icon: icons.web3wallets,\n platforms: [WalletPlatformEnum.UNIVERSAL],\n isDetected: () => true,\n isConnected: () => {\n if (web3Wallets === undefined) {\n return false\n }\n return web3Wallets.getIsConnected()\n },\n disconnect: async () => {\n Object.keys(localStorage)\n .filter((x) => {\n return (\n x.startsWith('wc@2') ||\n x.startsWith('@w3m') ||\n x.startsWith('W3M') ||\n x.startsWith('-walletlink')\n )\n })\n .forEach((x) => {\n localStorage.removeItem(x)\n })\n\n if (web3Wallets?.disconnect !== undefined) {\n await web3Wallets.disconnect()\n }\n },\n connect: async (\n provider?: Provider,\n _config?: Web3ModalConfig | object\n ): Promise => {\n const config = _config as Web3ModalConfig\n\n if (provider === undefined) {\n throw new Error(ErrorTypeEnum.PROVIDER_IS_REQUIRED)\n }\n\n if (config === undefined) {\n throw new Error(ErrorTypeEnum.CONFIG_IS_REQUIRED)\n }\n\n if (config.projectId === undefined) {\n throw new Error(ErrorTypeEnum.PROJECT_ID_IS_REQUIRED)\n }\n\n if (config.metadata === undefined) {\n throw new Error(ErrorTypeEnum.METADATA_IS_REQUIRED)\n }\n\n const network = provider.network\n\n currentNetwork = {\n chainId: network.id,\n name: network.name ?? network.nativeCurrency.symbol,\n currency: network.nativeCurrency.symbol,\n explorerUrl: network.explorerUrl,\n rpcUrl: network.rpcUrl\n }\n\n return await new Promise((resolve, reject) => {\n try {\n const wallets = createWeb3Wallets(config)\n connectRejectMethod = async (reason) => {\n await wallets.disconnect()\n reject(reason)\n }\n connectResolveMethod = resolve\n void wallets.open({ view: 'Connect' })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default Web3Wallets\n","import icons from './icons'\nimport { switcher } from './switcher'\nimport type { EIP1193Provider } from './EIP6963'\nimport { WalletPlatformEnum } from '@multiplechain/types'\nimport type { Provider } from '../../services/Provider'\nimport type { WalletAdapterInterface } from '@multiplechain/types'\n\nconst BitgetWallet: WalletAdapterInterface = {\n id: 'bitgetwallet',\n name: 'BitgetWallet',\n icon: icons.bitgetWallet,\n downloadLink: 'https://web3.bitget.com/en/wallet-download?type=3',\n platforms: [WalletPlatformEnum.BROWSER, WalletPlatformEnum.MOBILE],\n createDeepLink: (url: string): string => `https://bkcode.vip?action=dapp&url=${url}`,\n isDetected: () => Boolean(window?.bitkeep?.ethereum),\n isConnected: async () => {\n return Boolean(\n (await window?.bitkeep?.ethereum?.request({ method: 'eth_accounts' })).length\n )\n },\n connect: async (provider?: Provider): Promise => {\n return await new Promise((resolve, reject) => {\n const bitget = window?.bitkeep?.ethereum\n try {\n bitget\n ?.request({ method: 'eth_requestAccounts' })\n .then(() => {\n switcher(bitget, provider)\n .then(() => {\n resolve(bitget)\n })\n .catch((error: any) => {\n reject(error)\n })\n })\n .catch((error: any) => {\n reject(error)\n })\n } catch (error) {\n reject(error)\n }\n })\n }\n}\n\nexport default BitgetWallet\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n }\n catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${code}`);\n messageDetails.push(`version=${this.version}`);\n const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n }\n else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"bytes/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nfunction isHexable(value) {\n return !!(value.toHexString);\n}\nfunction addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function () {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n}\nexport function isBytesLike(value) {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\nfunction isInteger(value) {\n return (typeof (value) === \"number\" && value == value && (value % 1) === 0);\n}\nexport function isBytes(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof (value) === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) {\n return false;\n }\n }\n return true;\n}\nexport function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof (value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof (value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n let hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n }\n else if (options.hexPad === \"right\") {\n hex += \"0\";\n }\n else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\nexport function concat(items) {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n const result = new Uint8Array(length);\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n}\nexport function stripZeros(value) {\n let result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n return result;\n}\nexport function zeroPad(value, length) {\n value = arrayify(value);\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\nexport function isHexString(value, length) {\n if (typeof (value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n}\nconst HexCharacters = \"0123456789abcdef\";\nexport function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof (value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof (value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return (\"0x0\" + value);\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof (value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n }\n else if (options.hexPad === \"right\") {\n value += \"0\";\n }\n else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data) {\n if (typeof (data) !== \"string\") {\n data = hexlify(data);\n }\n else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n return (data.length - 2) / 2;\n}\nexport function hexDataSlice(data, offset, endOffset) {\n if (typeof (data) !== \"string\") {\n data = hexlify(data);\n }\n else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n}\nexport function hexConcat(items) {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\nexport function hexValue(value) {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n}\nexport function hexStripZeros(value) {\n if (typeof (value) !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n}\nexport function hexZeroPad(value, length) {\n if (typeof (value) !== \"string\") {\n value = hexlify(value);\n }\n else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n}\nexport function splitSignature(signature) {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n let bytes = arrayify(signature);\n // Get the r, s and v\n if (bytes.length === 64) {\n // EIP-2098; pull the v from the top bit of s and clear it\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 0x7f;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n }\n else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n }\n else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n }\n else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) {\n bytes[32] |= 0x80;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n }\n else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1 : 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n }\n else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n }\n else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n }\n else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n }\n else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n }\n else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n }\n else {\n const recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n }\n else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n }\n else {\n result.s = hexZeroPad(result.s, 32);\n }\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 0x80;\n }\n const _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n }\n else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n}\nexport function joinSignature(signature) {\n signature = splitSignature(signature);\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\" : \"0x1b\")\n ]));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport sha3 from \"js-sha3\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function keccak256(data) {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\nimport _BN from \"bn.js\";\nvar BN = _BN.BN;\nimport { hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst _constructorGuard = {};\nconst MAX_SAFE = 0x1fffffffffffff;\nexport function isBigNumberish(value) {\n return (value != null) && (BigNumber.isBigNumber(value) ||\n (typeof (value) === \"number\" && (value % 1) === 0) ||\n (typeof (value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof (value) === \"bigint\") ||\n isBytes(value));\n}\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\nexport class BigNumber {\n constructor(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n fromTwos(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n toTwos(value) {\n return toBigNumber(toBN(this).toTwos(value));\n }\n abs() {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n add(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n sub(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n div(other) {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n mul(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n mod(other) {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n pow(other) {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n and(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n or(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n xor(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n mask(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n shl(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n shr(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n eq(other) {\n return toBN(this).eq(toBN(other));\n }\n lt(other) {\n return toBN(this).lt(toBN(other));\n }\n lte(other) {\n return toBN(this).lte(toBN(other));\n }\n gt(other) {\n return toBN(this).gt(toBN(other));\n }\n gte(other) {\n return toBN(this).gte(toBN(other));\n }\n isNegative() {\n return (this._hex[0] === \"-\");\n }\n isZero() {\n return toBN(this).isZero();\n }\n toNumber() {\n try {\n return toBN(this).toNumber();\n }\n catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n toBigInt() {\n try {\n return BigInt(this.toString());\n }\n catch (e) { }\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n toString() {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n }\n else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n }\n toHexString() {\n return this._hex;\n }\n toJSON(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n static from(value) {\n if (value instanceof BigNumber) {\n return value;\n }\n if (typeof (value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof (value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber.from(String(value));\n }\n const anyValue = value;\n if (typeof (anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n if (anyValue) {\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof (hex) === \"string\") {\n return BigNumber.from(hex);\n }\n }\n else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof (hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n static isBigNumber(value) {\n return !!(value && value._isBigNumber);\n }\n}\n// Normalize the hex string\nfunction toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}\nfunction toBigNumber(value) {\n return BigNumber.from(toHex(value));\n}\nfunction toBN(value) {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\nfunction throwFault(fault, operation, value) {\n const params = { fault: fault, operation: operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n// value should have no prefix\nexport function _base36To16(value) {\n return (new BN(value, 36)).toString(16);\n}\n// value should have no prefix\nexport function _base16To36(value) {\n return (new BN(value, 16)).toString(36);\n}\n//# sourceMappingURL=bignumber.js.map","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\";\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","import { concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\nexport function hashMessage(message) {\n if (typeof (message) === \"string\") {\n message = toUtf8Bytes(message);\n }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n//# sourceMappingURL=message.js.map","export const version = \"address/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction getChecksumAddress(address) {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n const hashed = arrayify(keccak256(expanded));\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n}\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER = 0x1fffffffffffff;\nfunction log10(x) {\n if (Math.log10) {\n return Math.log10(x);\n }\n return Math.log(x) / Math.LN10;\n}\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n// Create lookup table\nconst ibanLookup = {};\nfor (let i = 0; i < 10; i++) {\n ibanLookup[String(i)] = String(i);\n}\nfor (let i = 0; i < 26; i++) {\n ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);\n}\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\nfunction ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) {\n checksum = \"0\" + checksum;\n }\n return checksum;\n}\n;\nexport function getAddress(address) {\n let result = null;\n if (typeof (address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n // Maybe ICAP? (we only support direct mode)\n }\n else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = _base36To16(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n }\n else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n}\nexport function isAddress(address) {\n try {\n getAddress(address);\n return true;\n }\n catch (error) { }\n return false;\n}\nexport function getIcapAddress(address) {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction) {\n let from = null;\n try {\n from = getAddress(transaction.from);\n }\n catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n return getAddress(hexDataSlice(keccak256(encode([from, nonce])), 12));\n}\nexport function getCreate2Address(from, salt, initCodeHash) {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([\"0xff\", getAddress(from), salt, initCodeHash])), 12));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor, key) {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof (ctor.prototype) !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\nexport function resolveProperties(object) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, {});\n });\n}\nexport function checkProperties(object, properties) {\n if (!object || typeof (object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\nexport function shallowCopy(object) {\n const result = {};\n for (const key in object) {\n result[key] = object[key];\n }\n return result;\n}\nconst opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\nfunction _isFrozen(object) {\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof (object)]) {\n return true;\n }\n if (Array.isArray(object) || typeof (object) === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value = null;\n try {\n value = object[keys[i]];\n }\n catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n if (typeof (object) === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\nexport function deepCopy(object) {\n return _deepCopy(object);\n}\nexport class Description {\n constructor(info) {\n for (const key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n}\n//# sourceMappingURL=index.js.map","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","import BN from 'bn.js';\nimport hash from 'hash.js';\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t\tpath: basedir,\n\t\texports: {},\n\t\trequire: function (path, base) {\n\t\t\treturn commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t\t}\n\t}, fn(module, module.exports), module.exports;\n}\n\nfunction getDefaultExportFromNamespaceIfPresent (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;\n}\n\nfunction getDefaultExportFromNamespaceIfNotNamed (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;\n}\n\nfunction getAugmentedNamespace(n) {\n\tif (n.__esModule) return n;\n\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\tObject.keys(n).forEach(function (k) {\n\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn n[k];\n\t\t\t}\n\t\t});\n\t});\n\treturn a;\n}\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n\nvar minimalisticAssert = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n\nvar utils_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n});\n\nvar utils_1$1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar utils = exports;\n\n\n\n\nutils.assert = minimalisticAssert;\nutils.toArray = utils_1.toArray;\nutils.zero2 = utils_1.zero2;\nutils.toHex = utils_1.toHex;\nutils.encode = utils_1.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n});\n\n'use strict';\n\n\n\nvar getNAF = utils_1$1.getNAF;\nvar getJSF = utils_1$1.getJSF;\nvar assert$1 = utils_1$1.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nvar base = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert$1(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert$1(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils_1$1.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert$1(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert$1(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils_1$1.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n\nvar inherits_browser = createCommonjsModule(function (module) {\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n}\n});\n\n'use strict';\n\n\n\n\n\n\nvar assert$2 = utils_1$1.assert;\n\nfunction ShortCurve(conf) {\n base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits_browser(ShortCurve, base);\nvar short_1 = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits_browser(Point, base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits_browser(JPoint, base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nvar curve_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar curve = exports;\n\ncurve.base = base;\ncurve.short = short_1;\ncurve.mont = /*RicMoo:ethers:require(./mont)*/(null);\ncurve.edwards = /*RicMoo:ethers:require(./edwards)*/(null);\n});\n\nvar curves_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar curves = exports;\n\n\n\n\n\nvar assert = utils_1$1.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve_1.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve_1.edwards(options);\n else\n this.curve = new curve_1.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/(null).crash();\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n});\n\n'use strict';\n\n\n\n\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils_1.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils_1.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils_1.toArray(options.pers, options.persEnc || 'hex');\n minimalisticAssert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nvar hmacDrbg = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils_1.toArray(entropy, entropyEnc);\n add = utils_1.toArray(add, addEnc);\n\n minimalisticAssert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils_1.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils_1.encode(res, enc);\n};\n\n'use strict';\n\n\n\nvar assert$3 = utils_1$1.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nvar key = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert$3(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert$3(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert$3(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n\n'use strict';\n\n\n\n\nvar assert$4 = utils_1$1.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert$4(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nvar signature = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils_1$1.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils_1$1.encode(res, enc);\n};\n\n'use strict';\n\n\n\n\n\nvar rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); });\nvar assert$5 = utils_1$1.assert;\n\n\n\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert$5(Object.prototype.hasOwnProperty.call(curves_1, options),\n 'Unknown curve ' + options);\n\n options = curves_1[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves_1.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nvar ec = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new key(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return key.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return key.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new hmacDrbg({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new hmacDrbg({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature$1, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature$1 = new signature(signature$1, 'hex');\n\n // Perform primitive values validation\n var r = signature$1.r;\n var s = signature$1.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature$1, j, enc) {\n assert$5((3 & j) === j, 'The recovery param is more than two bits');\n signature$1 = new signature(signature$1, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature$1.r;\n var s = signature$1.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature$1.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature$1, Q, enc) {\n signature$1 = new signature(signature$1, enc);\n if (signature$1.recoveryParam !== null)\n return signature$1.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature$1, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n\nvar elliptic_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = /*RicMoo:ethers*/{ version: \"6.5.4\" }.version;\nelliptic.utils = utils_1$1;\nelliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); });\nelliptic.curve = curve_1;\nelliptic.curves = curves_1;\n\n// Protocols\nelliptic.ec = ec;\nelliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null);\n});\n\nvar EC$1 = elliptic_1.ec;\n\nexport { EC$1 as EC };\n//# sourceMappingURL=elliptic.js.map\n","export const version = \"signing-key/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { EC } from \"./elliptic\";\nimport { arrayify, hexDataLength, hexlify, hexZeroPad, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nlet _curve = null;\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\nexport class SigningKey {\n constructor(privateKey) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n if (hexDataLength(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n _addPoint(other) {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n signDigest(digest) {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n });\n }\n computeSharedSecret(otherKey) {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n static isSigningKey(value) {\n return !!(value && value._isSigningKey);\n }\n}\nexport function recoverPublicKey(digest, signature) {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\nexport function computePublicKey(key, compressed) {\n const bytes = arrayify(key);\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n }\n else if (bytes.length === 33) {\n if (compressed) {\n return hexlify(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n }\n else if (bytes.length === 65) {\n if (!compressed) {\n return hexlify(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport var TransactionTypes;\n(function (TransactionTypes) {\n TransactionTypes[TransactionTypes[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes[TransactionTypes[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes[TransactionTypes[\"eip1559\"] = 2] = \"eip1559\";\n})(TransactionTypes || (TransactionTypes = {}));\n;\n///////////////////////////////\nfunction handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return getAddress(value);\n}\nfunction handleNumber(value) {\n if (value === \"0x\") {\n return Zero;\n }\n return BigNumber.from(value);\n}\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\nconst allowedTransactionKeys = {\n chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true\n};\nexport function computeAddress(key) {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\nexport function recoverAddress(digest, signature) {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\nfunction formatNumber(value, name) {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\nfunction accessSetify(addr, storageKeys) {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${addr}:${index}]`, storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n}\nexport function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${index}]`, set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\nfunction formatAccessList(value) {\n return accessListify(value).map((set) => [set.address, set.storageKeys]);\n}\nfunction _serializeEip1559(transaction, signature) {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n const fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to) : \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n return hexConcat([\"0x02\", RLP.encode(fields)]);\n}\nfunction _serializeEip2930(transaction, signature) {\n const fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to) : \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n return hexConcat([\"0x01\", RLP.encode(fields)]);\n}\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction, signature) {\n checkProperties(transaction, allowedTransactionKeys);\n const raw = [];\n transactionFields.forEach(function (fieldInfo) {\n let value = transaction[fieldInfo.name] || ([]);\n const options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = arrayify(hexlify(value, options));\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n }\n raw.push(hexlify(value));\n });\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n if (typeof (chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n }\n else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n }\n else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n return RLP.encode(raw);\n}\nexport function serialize(transaction, signature) {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(`unsupported transaction type: ${transaction.type}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\nfunction _parseEipSignature(tx, fields, serialize) {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n }\n catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n }\n catch (error) { }\n}\nfunction _parseEip1559(payload) {\n const transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = keccak256(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n}\nfunction _parseEip2930(payload) {\n const transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n const tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = keccak256(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n}\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction) {\n const transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n const tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n // Legacy unsigned transaction\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n }\n catch (error) {\n // @TODO: What makes snese to do? The v is too big\n return tx;\n }\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n }\n else {\n // Signed Transaction\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n let recoveryParam = tx.v - 27;\n const raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n }\n catch (error) { }\n tx.hash = keccak256(rawTransaction);\n }\n tx.type = null;\n return tx;\n}\nexport function parse(rawTransaction) {\n const payload = arrayify(rawTransaction);\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) {\n return _parse(payload);\n }\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(`unsupported transaction type: ${payload[0]}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n//# sourceMappingURL=index.js.map","export function alloc(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.alloc != null) {\n return globalThis.Buffer.alloc(size);\n }\n return new Uint8Array(size);\n}\nexport function allocUnsafe(size = 0) {\n if (globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null) {\n return globalThis.Buffer.allocUnsafe(size);\n }\n return new Uint8Array(size);\n}","import { allocUnsafe } from './alloc.js';\nexport function concat(arrays, length) {\n if (!length) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = allocUnsafe(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return output;\n}","import { bases } from 'multiformats/basics';\nimport { allocUnsafe } from '../alloc.js';\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: { decode }\n };\n}\nconst string = createCodec('utf8', 'u', buf => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, str => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', buf => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, str => {\n str = str.substring(1);\n const buf = allocUnsafe(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: bases.base16,\n latin1: ascii,\n ascii: ascii,\n binary: ascii,\n ...bases\n};\nexport default BASES;","import bases from './util/bases.js';\nexport function fromString(string, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(string, 'utf8');\n }\n return base.decoder.decode(`${ base.prefix }${ string }`);\n}","import bases from './util/bases.js';\nexport function toString(array, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) {\n return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8');\n }\n return base.encoder.encode(array).substring(1);\n}","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return (c - 48) & 0xf;\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this.strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n","'use strict';\n\nvar utils = exports;\nvar BN = require('bn.js');\nvar minAssert = require('minimalistic-assert');\nvar minUtils = require('minimalistic-crypto-utils');\n\nutils.assert = minAssert;\nutils.toArray = minUtils.toArray;\nutils.zero2 = minUtils.zero2;\nutils.toHex = minUtils.toHex;\nutils.encode = minUtils.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n var i;\n for (i = 0; i < naf.length; i += 1) {\n naf[i] = 0;\n }\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n\n","var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction ShortCurve(conf) {\n Base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits(ShortCurve, Base);\nmodule.exports = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n Base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits(Point, Base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n Base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits(JPoint, Base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar utils = require('../utils');\n\nfunction MontCurve(conf) {\n Base.call(this, 'mont', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n}\ninherits(MontCurve, Base);\nmodule.exports = MontCurve;\n\nMontCurve.prototype.validate = function validate(point) {\n var x = point.normalize().x;\n var x2 = x.redSqr();\n var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);\n var y = rhs.redSqrt();\n\n return y.redSqr().cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, z) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && z === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x, 16);\n this.z = new BN(z, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n}\ninherits(Point, Base.BasePoint);\n\nMontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n};\n\nMontCurve.prototype.point = function point(x, z) {\n return new Point(this, x, z);\n};\n\nMontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nPoint.prototype.precompute = function precompute() {\n // No-op\n};\n\nPoint.prototype._encode = function _encode() {\n return this.getX().toArray('be', this.curve.p.byteLength());\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1] || curve.one);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nPoint.prototype.dbl = function dbl() {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3\n // 2M + 2S + 4A\n\n // A = X1 + Z1\n var a = this.x.redAdd(this.z);\n // AA = A^2\n var aa = a.redSqr();\n // B = X1 - Z1\n var b = this.x.redSub(this.z);\n // BB = B^2\n var bb = b.redSqr();\n // C = AA - BB\n var c = aa.redSub(bb);\n // X3 = AA * BB\n var nx = aa.redMul(bb);\n // Z3 = C * (BB + A24 * C)\n var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.add = function add() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.diffAdd = function diffAdd(p, diff) {\n // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3\n // 4M + 2S + 6A\n\n // A = X2 + Z2\n var a = this.x.redAdd(this.z);\n // B = X2 - Z2\n var b = this.x.redSub(this.z);\n // C = X3 + Z3\n var c = p.x.redAdd(p.z);\n // D = X3 - Z3\n var d = p.x.redSub(p.z);\n // DA = D * A\n var da = d.redMul(a);\n // CB = C * B\n var cb = c.redMul(b);\n // X5 = Z1 * (DA + CB)^2\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n // Z5 = X1 * (DA - CB)^2\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n};\n\nPoint.prototype.mul = function mul(k) {\n var t = k.clone();\n var a = this; // (N / 2) * Q + Q\n var b = this.curve.point(null, null); // (N / 2) * Q\n var c = this; // Q\n\n for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))\n bits.push(t.andln(1));\n\n for (var i = bits.length - 1; i >= 0; i--) {\n if (bits[i] === 0) {\n // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q\n a = a.diffAdd(b, c);\n // N * Q = 2 * ((N / 2) * Q + Q))\n b = b.dbl();\n } else {\n // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)\n b = a.diffAdd(b, c);\n // N * Q + Q = 2 * ((N / 2) * Q + Q)\n a = a.dbl();\n }\n }\n return b;\n};\n\nPoint.prototype.mulAdd = function mulAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.jumlAdd = function jumlAdd() {\n throw new Error('Not supported on Montgomery curve');\n};\n\nPoint.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n};\n\nPoint.prototype.normalize = function normalize() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n};\n\nPoint.prototype.getX = function getX() {\n // Normalize coordinates\n this.normalize();\n\n return this.x.fromRed();\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar BN = require('bn.js');\nvar inherits = require('inherits');\nvar Base = require('./base');\n\nvar assert = utils.assert;\n\nfunction EdwardsCurve(conf) {\n // NOTE: Important as we are creating point in Base.call()\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n\n Base.call(this, 'edwards', conf);\n\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n\n assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n}\ninherits(EdwardsCurve, Base);\nmodule.exports = EdwardsCurve;\n\nEdwardsCurve.prototype._mulA = function _mulA(num) {\n if (this.mOneA)\n return num.redNeg();\n else\n return this.a.redMul(num);\n};\n\nEdwardsCurve.prototype._mulC = function _mulC(num) {\n if (this.oneC)\n return num;\n else\n return this.c.redMul(num);\n};\n\n// Just for compatibility with Short curve\nEdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {\n return this.point(x, y, z, t);\n};\n\nEdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var x2 = x.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x2));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));\n\n var y2 = rhs.redMul(lhs.redInvm());\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {\n y = new BN(y, 16);\n if (!y.red)\n y = y.toRed(this.red);\n\n // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)\n var y2 = y.redSqr();\n var lhs = y2.redSub(this.c2);\n var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x2 = lhs.redMul(rhs.redInvm());\n\n if (x2.cmp(this.zero) === 0) {\n if (odd)\n throw new Error('invalid point');\n else\n return this.point(this.zero, y);\n }\n\n var x = x2.redSqrt();\n if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n if (x.fromRed().isOdd() !== odd)\n x = x.redNeg();\n\n return this.point(x, y);\n};\n\nEdwardsCurve.prototype.validate = function validate(point) {\n if (point.isInfinity())\n return true;\n\n // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)\n point.normalize();\n\n var x2 = point.x.redSqr();\n var y2 = point.y.redSqr();\n var lhs = x2.redMul(this.a).redAdd(y2);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));\n\n return lhs.cmp(rhs) === 0;\n};\n\nfunction Point(curve, x, y, z, t) {\n Base.BasePoint.call(this, curve, 'projective');\n if (x === null && y === null && z === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = z ? new BN(z, 16) : this.curve.one;\n this.t = t && new BN(t, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n\n // Use extended coordinates\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n}\ninherits(Point, Base.BasePoint);\n\nEdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point.fromJSON(this, obj);\n};\n\nEdwardsCurve.prototype.point = function point(x, y, z, t) {\n return new Point(this, x, y, z, t);\n};\n\nPoint.fromJSON = function fromJSON(curve, obj) {\n return new Point(curve, obj[0], obj[1], obj[2]);\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.x.cmpn(0) === 0 &&\n (this.y.cmp(this.z) === 0 ||\n (this.zOne && this.y.cmp(this.curve.c) === 0));\n};\n\nPoint.prototype._extDbl = function _extDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #doubling-dbl-2008-hwcd\n // 4M + 4S\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = 2 * Z1^2\n var c = this.z.redSqr();\n c = c.redIAdd(c);\n // D = a * A\n var d = this.curve._mulA(a);\n // E = (X1 + Y1)^2 - A - B\n var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);\n // G = D + B\n var g = d.redAdd(b);\n // F = G - C\n var f = g.redSub(c);\n // H = D - B\n var h = d.redSub(b);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projDbl = function _projDbl() {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #doubling-dbl-2008-bbjlp\n // #doubling-dbl-2007-bl\n // and others\n // Generally 3M + 4S or 2M + 4S\n\n // B = (X1 + Y1)^2\n var b = this.x.redAdd(this.y).redSqr();\n // C = X1^2\n var c = this.x.redSqr();\n // D = Y1^2\n var d = this.y.redSqr();\n\n var nx;\n var ny;\n var nz;\n var e;\n var h;\n var j;\n if (this.curve.twisted) {\n // E = a * C\n e = this.curve._mulA(c);\n // F = E + D\n var f = e.redAdd(d);\n if (this.zOne) {\n // X3 = (B - C - D) * (F - 2)\n nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F^2 - 2 * F\n nz = f.redSqr().redSub(f).redSub(f);\n } else {\n // H = Z1^2\n h = this.z.redSqr();\n // J = F - 2 * H\n j = f.redSub(h).redISub(h);\n // X3 = (B-C-D)*J\n nx = b.redSub(c).redISub(d).redMul(j);\n // Y3 = F * (E - D)\n ny = f.redMul(e.redSub(d));\n // Z3 = F * J\n nz = f.redMul(j);\n }\n } else {\n // E = C + D\n e = c.redAdd(d);\n // H = (c * Z1)^2\n h = this.curve._mulC(this.z).redSqr();\n // J = E - 2 * H\n j = e.redSub(h).redSub(h);\n // X3 = c * (B - E) * J\n nx = this.curve._mulC(b.redISub(e)).redMul(j);\n // Y3 = c * E * (C - D)\n ny = this.curve._mulC(e).redMul(c.redISub(d));\n // Z3 = E * J\n nz = e.redMul(j);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n // Double in extended coordinates\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n};\n\nPoint.prototype._extAdd = function _extAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html\n // #addition-add-2008-hwcd-3\n // 8M\n\n // A = (Y1 - X1) * (Y2 - X2)\n var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));\n // B = (Y1 + X1) * (Y2 + X2)\n var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));\n // C = T1 * k * T2\n var c = this.t.redMul(this.curve.dd).redMul(p.t);\n // D = Z1 * 2 * Z2\n var d = this.z.redMul(p.z.redAdd(p.z));\n // E = B - A\n var e = b.redSub(a);\n // F = D - C\n var f = d.redSub(c);\n // G = D + C\n var g = d.redAdd(c);\n // H = B + A\n var h = b.redAdd(a);\n // X3 = E * F\n var nx = e.redMul(f);\n // Y3 = G * H\n var ny = g.redMul(h);\n // T3 = E * H\n var nt = e.redMul(h);\n // Z3 = F * G\n var nz = f.redMul(g);\n return this.curve.point(nx, ny, nz, nt);\n};\n\nPoint.prototype._projAdd = function _projAdd(p) {\n // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html\n // #addition-add-2008-bbjlp\n // #addition-add-2007-bl\n // 10M + 1S\n\n // A = Z1 * Z2\n var a = this.z.redMul(p.z);\n // B = A^2\n var b = a.redSqr();\n // C = X1 * X2\n var c = this.x.redMul(p.x);\n // D = Y1 * Y2\n var d = this.y.redMul(p.y);\n // E = d * C * D\n var e = this.curve.d.redMul(c).redMul(d);\n // F = B - E\n var f = b.redSub(e);\n // G = B + E\n var g = b.redAdd(e);\n // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)\n var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);\n var nx = a.redMul(f).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n // Y3 = A * G * (D - a * C)\n ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));\n // Z3 = F * G\n nz = f.redMul(g);\n } else {\n // Y3 = A * G * (D - C)\n ny = a.redMul(g).redMul(d.redSub(c));\n // Z3 = c * F * G\n nz = this.curve._mulC(f).redMul(g);\n }\n return this.curve.point(nx, ny, nz);\n};\n\nPoint.prototype.add = function add(p) {\n if (this.isInfinity())\n return p;\n if (p.isInfinity())\n return this;\n\n if (this.curve.extended)\n return this._extAdd(p);\n else\n return this._projAdd(p);\n};\n\nPoint.prototype.mul = function mul(k) {\n if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p, k2) {\n return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);\n};\n\nPoint.prototype.normalize = function normalize() {\n if (this.zOne)\n return this;\n\n // Normalize coordinates\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n};\n\nPoint.prototype.neg = function neg() {\n return this.curve.point(this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg());\n};\n\nPoint.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n};\n\nPoint.prototype.eq = function eq(other) {\n return this === other ||\n this.getX().cmp(other.getX()) === 0 &&\n this.getY().cmp(other.getY()) === 0;\n};\n\nPoint.prototype.eqXToP = function eqXToP(x) {\n var rx = x.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(this.z);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\n// Compatibility with BaseCurve\nPoint.prototype.toP = Point.prototype.normalize;\nPoint.prototype.mixedAdd = Point.prototype.add;\n","'use strict';\n\nvar curve = exports;\n\ncurve.base = require('./base');\ncurve.short = require('./short');\ncurve.mont = require('./mont');\ncurve.edwards = require('./edwards');\n","module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',\n 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821',\n ],\n [\n '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',\n '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf',\n ],\n [\n '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',\n 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695',\n ],\n [\n '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',\n '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9',\n ],\n [\n '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',\n '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36',\n ],\n [\n '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',\n '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f',\n ],\n [\n 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',\n '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999',\n ],\n [\n '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',\n 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09',\n ],\n [\n 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',\n '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d',\n ],\n [\n 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',\n 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088',\n ],\n [\n 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',\n '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d',\n ],\n [\n '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',\n '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8',\n ],\n [\n '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',\n '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a',\n ],\n [\n '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',\n '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453',\n ],\n [\n '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',\n '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160',\n ],\n [\n '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',\n '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0',\n ],\n [\n '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',\n '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6',\n ],\n [\n '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',\n '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589',\n ],\n [\n '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',\n 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17',\n ],\n [\n 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',\n '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda',\n ],\n [\n 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',\n '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd',\n ],\n [\n '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',\n '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2',\n ],\n [\n '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',\n '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6',\n ],\n [\n 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',\n '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f',\n ],\n [\n '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',\n 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01',\n ],\n [\n 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',\n '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3',\n ],\n [\n 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',\n 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f',\n ],\n [\n 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',\n '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7',\n ],\n [\n 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',\n 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78',\n ],\n [\n 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',\n '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1',\n ],\n [\n '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',\n 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150',\n ],\n [\n '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',\n '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82',\n ],\n [\n 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',\n '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc',\n ],\n [\n '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',\n 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b',\n ],\n [\n 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',\n '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51',\n ],\n [\n 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',\n '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45',\n ],\n [\n 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',\n 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120',\n ],\n [\n '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',\n '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84',\n ],\n [\n '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',\n '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d',\n ],\n [\n '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',\n 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d',\n ],\n [\n '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',\n '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8',\n ],\n [\n 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',\n '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8',\n ],\n [\n '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',\n '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac',\n ],\n [\n '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',\n 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f',\n ],\n [\n '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',\n '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962',\n ],\n [\n 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',\n '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907',\n ],\n [\n '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',\n 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec',\n ],\n [\n 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',\n 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d',\n ],\n [\n 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',\n '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414',\n ],\n [\n '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',\n 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd',\n ],\n [\n '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',\n 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0',\n ],\n [\n 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',\n '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811',\n ],\n [\n 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',\n '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1',\n ],\n [\n 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',\n '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c',\n ],\n [\n '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',\n 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73',\n ],\n [\n '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',\n '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd',\n ],\n [\n 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',\n 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405',\n ],\n [\n '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',\n 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589',\n ],\n [\n '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',\n '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e',\n ],\n [\n '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',\n '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27',\n ],\n [\n 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',\n 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1',\n ],\n [\n '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',\n '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482',\n ],\n [\n '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',\n '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945',\n ],\n [\n 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',\n '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573',\n ],\n [\n 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',\n 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82',\n ],\n ],\n },\n naf: {\n wnd: 7,\n points: [\n [\n 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',\n '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672',\n ],\n [\n '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',\n 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6',\n ],\n [\n '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',\n '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da',\n ],\n [\n 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',\n 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37',\n ],\n [\n '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',\n 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b',\n ],\n [\n 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',\n 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81',\n ],\n [\n 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',\n '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58',\n ],\n [\n 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',\n '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77',\n ],\n [\n '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',\n '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a',\n ],\n [\n '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',\n '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c',\n ],\n [\n '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',\n '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67',\n ],\n [\n '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',\n '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402',\n ],\n [\n 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',\n 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55',\n ],\n [\n 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',\n '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482',\n ],\n [\n '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',\n 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82',\n ],\n [\n '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',\n 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396',\n ],\n [\n '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',\n '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49',\n ],\n [\n '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',\n '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf',\n ],\n [\n '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',\n '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a',\n ],\n [\n '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',\n 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7',\n ],\n [\n 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',\n 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933',\n ],\n [\n '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',\n '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a',\n ],\n [\n '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',\n '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6',\n ],\n [\n 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',\n 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37',\n ],\n [\n '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',\n '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e',\n ],\n [\n 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',\n 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6',\n ],\n [\n 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',\n 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476',\n ],\n [\n '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',\n '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40',\n ],\n [\n '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',\n '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61',\n ],\n [\n '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',\n '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683',\n ],\n [\n 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',\n '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5',\n ],\n [\n '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',\n '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b',\n ],\n [\n 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',\n '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417',\n ],\n [\n '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',\n 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868',\n ],\n [\n '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',\n 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a',\n ],\n [\n 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',\n 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6',\n ],\n [\n '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',\n '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996',\n ],\n [\n '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',\n 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e',\n ],\n [\n 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',\n 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d',\n ],\n [\n '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',\n '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2',\n ],\n [\n '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',\n 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e',\n ],\n [\n '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',\n '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437',\n ],\n [\n '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',\n 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311',\n ],\n [\n 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',\n '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4',\n ],\n [\n '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',\n '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575',\n ],\n [\n '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',\n 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d',\n ],\n [\n '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',\n 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d',\n ],\n [\n 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',\n 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629',\n ],\n [\n 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',\n 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06',\n ],\n [\n '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',\n '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374',\n ],\n [\n '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',\n '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee',\n ],\n [\n 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',\n '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1',\n ],\n [\n 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',\n 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b',\n ],\n [\n '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',\n '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661',\n ],\n [\n '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',\n '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6',\n ],\n [\n 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',\n '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e',\n ],\n [\n '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',\n '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d',\n ],\n [\n 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',\n 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc',\n ],\n [\n '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',\n 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4',\n ],\n [\n '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',\n '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c',\n ],\n [\n 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',\n '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b',\n ],\n [\n 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',\n '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913',\n ],\n [\n '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',\n '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154',\n ],\n [\n '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',\n '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865',\n ],\n [\n '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',\n 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc',\n ],\n [\n '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',\n 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224',\n ],\n [\n '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',\n '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e',\n ],\n [\n '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',\n '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6',\n ],\n [\n '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',\n '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511',\n ],\n [\n '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',\n 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b',\n ],\n [\n 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',\n 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2',\n ],\n [\n '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',\n 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c',\n ],\n [\n 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',\n '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3',\n ],\n [\n 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',\n '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d',\n ],\n [\n 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',\n '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700',\n ],\n [\n 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',\n '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4',\n ],\n [\n '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',\n 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196',\n ],\n [\n '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',\n '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4',\n ],\n [\n '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',\n 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257',\n ],\n [\n 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',\n 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13',\n ],\n [\n 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',\n '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096',\n ],\n [\n 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',\n 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38',\n ],\n [\n 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',\n '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f',\n ],\n [\n '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',\n '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448',\n ],\n [\n 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',\n '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a',\n ],\n [\n 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',\n '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4',\n ],\n [\n '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',\n '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437',\n ],\n [\n '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',\n 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7',\n ],\n [\n 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',\n '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d',\n ],\n [\n 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',\n '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a',\n ],\n [\n 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',\n '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54',\n ],\n [\n '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',\n '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77',\n ],\n [\n 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',\n 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517',\n ],\n [\n '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',\n 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10',\n ],\n [\n 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',\n 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125',\n ],\n [\n 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',\n '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e',\n ],\n [\n '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',\n 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1',\n ],\n [\n 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',\n '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2',\n ],\n [\n 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',\n '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423',\n ],\n [\n 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',\n '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8',\n ],\n [\n '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',\n 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758',\n ],\n [\n '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',\n 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375',\n ],\n [\n 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',\n '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d',\n ],\n [\n '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',\n 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec',\n ],\n [\n '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',\n '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0',\n ],\n [\n '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',\n 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c',\n ],\n [\n 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',\n 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4',\n ],\n [\n '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',\n 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f',\n ],\n [\n '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',\n '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649',\n ],\n [\n '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',\n 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826',\n ],\n [\n '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',\n '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5',\n ],\n [\n 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',\n 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87',\n ],\n [\n '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',\n '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b',\n ],\n [\n 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',\n '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc',\n ],\n [\n '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',\n '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c',\n ],\n [\n 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',\n 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f',\n ],\n [\n 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',\n '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a',\n ],\n [\n 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',\n 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46',\n ],\n [\n '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',\n 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f',\n ],\n [\n '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',\n '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03',\n ],\n [\n '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',\n 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08',\n ],\n [\n '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',\n '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8',\n ],\n [\n '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',\n '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373',\n ],\n [\n '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',\n 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3',\n ],\n [\n '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',\n '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8',\n ],\n [\n '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',\n '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1',\n ],\n [\n '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',\n '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9',\n ],\n ],\n },\n};\n","'use strict';\n\nvar curves = exports;\n\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\n\nvar assert = utils.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n","'use strict';\n\nvar hash = require('hash.js');\nvar utils = require('minimalistic-crypto-utils');\nvar assert = require('minimalistic-assert');\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils.toArray(options.pers, options.persEnc || 'hex');\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nmodule.exports = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils.toArray(entropy, entropyEnc);\n add = utils.toArray(add, addEnc);\n\n assert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nmodule.exports = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature, options) {\n return this.ec.verify(msg, signature, this, undefined, options);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n","'use strict';\n\nvar BN = require('bn.js');\n\nvar utils = require('../utils');\nvar assert = utils.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nmodule.exports = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n if(buf[p.place] === 0x00) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n if ((data[p.place] & 128) !== 0) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n if ((data[p.place] & 128) !== 0) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n};\n","'use strict';\n\nvar BN = require('bn.js');\nvar HmacDRBG = require('hmac-drbg');\nvar utils = require('../utils');\nvar curves = require('../curves');\nvar rand = require('brorand');\nvar assert = utils.assert;\n\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert(Object.prototype.hasOwnProperty.call(curves, options),\n 'Unknown curve ' + options);\n\n options = curves[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nmodule.exports = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {\n var byteLength;\n if (BN.isBN(msg) || typeof msg === 'number') {\n msg = new BN(msg, 16);\n byteLength = msg.byteLength();\n } else if (typeof msg === 'object') {\n // BN assumes an array-like input and asserts length\n byteLength = msg.length;\n msg = new BN(msg, 16);\n } else {\n // BN converts the value to string\n var str = msg.toString();\n // HEX encoding\n byteLength = (str.length + 1) >>> 1;\n msg = new BN(str, 16);\n }\n // Allow overriding\n if (typeof bitLength !== 'number') {\n bitLength = byteLength * 8;\n }\n var delta = bitLength - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new Signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature, key, enc, options) {\n if (!options)\n options = {};\n\n msg = this._truncateToN(msg, false, options.msgBitLength);\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, 'hex');\n\n // Perform primitive values validation\n var r = signature.r;\n var s = signature.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature, j, enc) {\n assert((3 & j) === j, 'The recovery param is more than two bits');\n signature = new Signature(signature, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature.r;\n var s = signature.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar cachedProperty = utils.cachedProperty;\n\n/**\n* @param {EDDSA} eddsa - instance\n* @param {Object} params - public/private key parameters\n*\n* @param {Array} [params.secret] - secret seed bytes\n* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)\n* @param {Array} [params.pub] - public key point encoded as bytes\n*\n*/\nfunction KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n}\n\nKeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub: pub });\n};\n\nKeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret: secret });\n};\n\nKeyPair.prototype.secret = function secret() {\n return this._secret;\n};\n\ncachedProperty(KeyPair, 'pubBytes', function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n});\n\ncachedProperty(KeyPair, 'pub', function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n});\n\ncachedProperty(KeyPair, 'privBytes', function privBytes() {\n var eddsa = this.eddsa;\n var hash = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n\n var a = hash.slice(0, eddsa.encodingLength);\n a[0] &= 248;\n a[lastIx] &= 127;\n a[lastIx] |= 64;\n\n return a;\n});\n\ncachedProperty(KeyPair, 'priv', function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n});\n\ncachedProperty(KeyPair, 'hash', function hash() {\n return this.eddsa.hash().update(this.secret()).digest();\n});\n\ncachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n});\n\nKeyPair.prototype.sign = function sign(message) {\n assert(this._secret, 'KeyPair can only verify');\n return this.eddsa.sign(message, this);\n};\n\nKeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n};\n\nKeyPair.prototype.getSecret = function getSecret(enc) {\n assert(this._secret, 'KeyPair is public only');\n return utils.encode(this.secret(), enc);\n};\n\nKeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n};\n\nmodule.exports = KeyPair;\n","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar cachedProperty = utils.cachedProperty;\nvar parseBytes = utils.parseBytes;\n\n/**\n* @param {EDDSA} eddsa - eddsa instance\n* @param {Array|Object} sig -\n* @param {Array|Point} [sig.R] - R point as Point or bytes\n* @param {Array|bn} [sig.S] - S scalar as bn or bytes\n* @param {Array} [sig.Rencoded] - R point encoded\n* @param {Array} [sig.Sencoded] - S scalar encoded\n*/\nfunction Signature(eddsa, sig) {\n this.eddsa = eddsa;\n\n if (typeof sig !== 'object')\n sig = parseBytes(sig);\n\n if (Array.isArray(sig)) {\n assert(sig.length === eddsa.encodingLength * 2, 'Signature has invalid size');\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength),\n };\n }\n\n assert(sig.R && sig.S, 'Signature without R or S');\n\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n}\n\ncachedProperty(Signature, 'S', function S() {\n return this.eddsa.decodeInt(this.Sencoded());\n});\n\ncachedProperty(Signature, 'R', function R() {\n return this.eddsa.decodePoint(this.Rencoded());\n});\n\ncachedProperty(Signature, 'Rencoded', function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n});\n\ncachedProperty(Signature, 'Sencoded', function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n});\n\nSignature.prototype.toBytes = function toBytes() {\n return this.Rencoded().concat(this.Sencoded());\n};\n\nSignature.prototype.toHex = function toHex() {\n return utils.encode(this.toBytes(), 'hex').toUpperCase();\n};\n\nmodule.exports = Signature;\n","'use strict';\n\nvar hash = require('hash.js');\nvar curves = require('../curves');\nvar utils = require('../utils');\nvar assert = utils.assert;\nvar parseBytes = utils.parseBytes;\nvar KeyPair = require('./key');\nvar Signature = require('./signature');\n\nfunction EDDSA(curve) {\n assert(curve === 'ed25519', 'only tested with ed25519 so far');\n\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash.sha512;\n}\n\nmodule.exports = EDDSA;\n\n/**\n* @param {Array|String} message - message bytes\n* @param {Array|String|KeyPair} secret - secret bytes or a keypair\n* @returns {Signature} - signature\n*/\nEDDSA.prototype.sign = function sign(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r = this.hashInt(key.messagePrefix(), message);\n var R = this.g.mul(r);\n var Rencoded = this.encodePoint(R);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message)\n .mul(key.priv());\n var S = r.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });\n};\n\n/**\n* @param {Array} message - message bytes\n* @param {Array|String|Signature} sig - sig bytes\n* @param {Array|String|Point|KeyPair} pub - public key\n* @returns {Boolean} - true if public key matches sig of message\n*/\nEDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {\n return false;\n }\n var key = this.keyFromPublic(pub);\n var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h));\n return RplusAh.eq(SG);\n};\n\nEDDSA.prototype.hashInt = function hashInt() {\n var hash = this.hash();\n for (var i = 0; i < arguments.length; i++)\n hash.update(arguments[i]);\n return utils.intFromLE(hash.digest()).umod(this.curve.n);\n};\n\nEDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n};\n\nEDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n};\n\nEDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n};\n\n/**\n* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2\n*\n* EDDSA defines methods for encoding and decoding points and integers. These are\n* helper convenience methods, that pass along to utility functions implied\n* parameters.\n*\n*/\nEDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray('le', this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;\n return enc;\n};\n\nEDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);\n var xIsOdd = (bytes[lastIx] & 0x80) !== 0;\n\n var y = utils.intFromLE(normed);\n return this.curve.pointFromY(y, xIsOdd);\n};\n\nEDDSA.prototype.encodeInt = function encodeInt(num) {\n return num.toArray('le', this.encodingLength);\n};\n\nEDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n};\n\nEDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n};\n","'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');\n","import{detect as ot}from\"detect-browser\";import{toMiliseconds as ee,FIVE_MINUTES as Ie,fromMiliseconds as st}from\"@walletconnect/time\";import{getDocument as ne,getNavigator as je,getLocation as Te}from\"@walletconnect/window-getters\";import{getWindowMetadata as it}from\"@walletconnect/window-metadata\";import*as q from\"query-string\";import{hashMessage as Pe}from\"@ethersproject/hash\";import{recoverAddress as ct}from\"@ethersproject/transactions\";import{ChaCha20Poly1305 as Ae}from\"@stablelib/chacha20poly1305\";import{HKDF as at}from\"@stablelib/hkdf\";import{randomBytes as B}from\"@stablelib/random\";import{SHA256 as Ce,hash as Ue}from\"@stablelib/sha256\";import*as _e from\"@stablelib/x25519\";import{toString as v,fromString as w,concat as te}from\"uint8arrays\";import{ec as ut}from\"elliptic\";import{decodeJWT as lt}from\"@walletconnect/relay-auth\";import{RELAY_JSONRPC as dt}from\"@walletconnect/relay-api\";const H=\":\";function re(e){const[n,t]=e.split(H);return{namespace:n,reference:t}}function ke(e){const{namespace:n,reference:t}=e;return[n,t].join(H)}function oe(e){const[n,t,r]=e.split(H);return{namespace:n,reference:t,address:r}}function De(e){const{namespace:n,reference:t,address:r}=e;return[n,t,r].join(H)}function se(e,n){const t=[];return e.forEach(r=>{const o=n(r);t.includes(o)||t.push(o)}),t}function xe(e){const{address:n}=oe(e);return n}function Ve(e){const{namespace:n,reference:t}=oe(e);return ke({namespace:n,reference:t})}function ft(e,n){const{namespace:t,reference:r}=re(n);return De({namespace:t,reference:r,address:e})}function pt(e){return se(e,xe)}function Me(e){return se(e,Ve)}function mt(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...o.accounts)}),t}function ht(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...Me(o.accounts))}),t}function yt(e,n=[]){const t=[];return Object.keys(e).forEach(r=>{if(n.length&&!n.includes(r))return;const o=e[r];t.push(...W(r,o))}),t}function W(e,n){return e.includes(\":\")?[e]:n.chains||[]}var gt=Object.defineProperty,Ke=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Le=(e,n,t)=>n in e?gt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Fe=(e,n)=>{for(var t in n||(n={}))vt.call(n,t)&&Le(e,t,n[t]);if(Ke)for(var t of Ke(n))bt.call(n,t)&&Le(e,t,n[t]);return e};const qe=\"ReactNative\",y={reactNative:\"react-native\",node:\"node\",browser:\"browser\",unknown:\"unknown\"},J=\" \",Et=\":\",Be=\"/\",ie=2,wt=1e3,He=\"js\";function ce(){return typeof process<\"u\"&&typeof process.versions<\"u\"&&typeof process.versions.node<\"u\"}function _(){return!ne()&&!!je()&&navigator.product===qe}function V(){return!ce()&&!!je()&&!!ne()}function P(){return _()?y.reactNative:ce()?y.node:V()?y.browser:y.unknown}function Ot(){var e;try{return _()&&typeof global<\"u\"&&typeof(global==null?void 0:global.Application)<\"u\"?(e=global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function We(e,n){let t=q.parse(e);return t=Fe(Fe({},t),n),e=q.stringify(t),e}function Nt(){return it()||{name:\"\",description:\"\",url:\"\",icons:[\"\"]}}function St(e,n){var t;const r=P(),o={protocol:e,version:n,env:r};return r===\"browser\"&&(o.host=((t=Te())==null?void 0:t.host)||\"unknown\"),o}function Je(){if(P()===y.reactNative&&typeof global<\"u\"&&typeof(global==null?void 0:global.Platform)<\"u\"){const{OS:t,Version:r}=global.Platform;return[t,r].join(\"-\")}const e=ot();if(e===null)return\"unknown\";const n=e.os?e.os.replace(\" \",\"\").toLowerCase():\"unknown\";return e.type===\"browser\"?[n,e.name,e.version].join(\"-\"):[n,e.version].join(\"-\")}function ze(){var e;const n=P();return n===y.browser?[n,((e=Te())==null?void 0:e.host)||\"unknown\"].join(\":\"):n}function Ge(e,n,t){const r=Je(),o=ze();return[[e,n].join(\"-\"),[He,t].join(\"-\"),r,o].join(\"/\")}function $t({protocol:e,version:n,relayUrl:t,sdkVersion:r,auth:o,projectId:s,useOnCloseEvent:i,bundleId:u}){const l=t.split(\"?\"),c=Ge(e,n,r),d={auth:o,ua:c,projectId:s,useOnCloseEvent:i||void 0,origin:u||void 0},a=We(l[1]||\"\",d);return l[0]+\"?\"+a}function Rt(e){let n=(e.match(/^[^:]+(?=:\\/\\/)/gi)||[])[0];const t=typeof n<\"u\"?e.split(\"://\")[1]:e;return n=n===\"wss\"?\"https\":\"http\",[n,t].join(\"://\")}function It(e,n,t){if(!e[n]||typeof e[n]!==t)throw new Error(`Missing or invalid \"${n}\" param`)}function Ye(e,n=ie){return Qe(e.split(Be),n)}function jt(e){return Ye(e).join(J)}function $(e,n){return e.filter(t=>n.includes(t)).length===e.length}function Qe(e,n=ie){return e.slice(Math.max(e.length-n,0))}function Tt(e){return Object.fromEntries(e.entries())}function Pt(e){return new Map(Object.entries(e))}function At(e,n){const t={};return Object.keys(e).forEach(r=>{t[r]=n(e[r])}),t}const Ct=e=>e;function Ze(e){return e.trim().replace(/^\\w/,n=>n.toUpperCase())}function Ut(e){return e.split(J).map(n=>Ze(n)).join(J)}function _t(e=Ie,n){const t=ee(e||Ie);let r,o,s;return{resolve:i=>{s&&r&&(clearTimeout(s),r(i))},reject:i=>{s&&o&&(clearTimeout(s),o(i))},done:()=>new Promise((i,u)=>{s=setTimeout(()=>{u(new Error(n))},t),r=i,o=u})}}function kt(e,n,t){return new Promise(async(r,o)=>{const s=setTimeout(()=>o(new Error(t)),n);try{const i=await e;r(i)}catch(i){o(i)}clearTimeout(s)})}function ae(e,n){if(typeof n==\"string\"&&n.startsWith(`${e}:`))return n;if(e.toLowerCase()===\"topic\"){if(typeof n!=\"string\")throw new Error('Value must be \"string\" for expirer target type: topic');return`topic:${n}`}else if(e.toLowerCase()===\"id\"){if(typeof n!=\"number\")throw new Error('Value must be \"number\" for expirer target type: id');return`id:${n}`}throw new Error(`Unknown expirer target type: ${e}`)}function Dt(e){return ae(\"topic\",e)}function xt(e){return ae(\"id\",e)}function Vt(e){const[n,t]=e.split(\":\"),r={id:void 0,topic:void 0};if(n===\"topic\"&&typeof t==\"string\")r.topic=t;else if(n===\"id\"&&Number.isInteger(Number(t)))r.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${n}:${t}`);return r}function Mt(e,n){return st((n||Date.now())+ee(e))}function Kt(e){return Date.now()>=ee(e)}function Lt(e,n){return`${e}${n?`:${n}`:\"\"}`}function N(e=[],n=[]){return[...new Set([...e,...n])]}async function Ft({id:e,topic:n,wcDeepLink:t}){var r;try{if(!t)return;const o=typeof t==\"string\"?JSON.parse(t):t,s=o?.href;if(typeof s!=\"string\")return;const i=Xe(s,e,n),u=P();if(u===y.browser){if(!((r=ne())!=null&&r.hasFocus())){console.warn(\"Document does not have focus, skipping deeplink.\");return}i.startsWith(\"https://\")||i.startsWith(\"http://\")?window.open(i,\"_blank\",\"noreferrer noopener\"):window.open(i,en()?\"_blank\":\"_self\",\"noreferrer noopener\")}else u===y.reactNative&&typeof(global==null?void 0:global.Linking)<\"u\"&&await global.Linking.openURL(i)}catch(o){console.error(o)}}function Xe(e,n,t){const r=`requestId=${n}&sessionTopic=${t}`;e.endsWith(\"/\")&&(e=e.slice(0,-1));let o=`${e}`;if(e.startsWith(\"https://t.me\")){const s=e.includes(\"?\")?\"&startapp=\":\"?startapp=\";o=`${o}${s}${nn(r,!0)}`}else o=`${o}/wc?${r}`;return o}async function qt(e,n){let t=\"\";try{if(V()&&(t=localStorage.getItem(n),t))return t;t=await e.getItem(n)}catch(r){console.error(r)}return t}function ue(e,n){return e.filter(t=>n.includes(t))}function Bt(e,n){if(!e.includes(n))return null;const t=e.split(/([&,?,=])/),r=t.indexOf(n);return t[r+2]}function Ht(){return typeof crypto<\"u\"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/gu,e=>{const n=Math.random()*16|0;return(e===\"x\"?n:n&3|8).toString(16)})}function Wt(){return typeof process<\"u\"&&process.env.IS_VITEST===\"true\"}function en(){return typeof window<\"u\"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function nn(e,n=!1){const t=Buffer.from(e).toString(\"base64\");return n?t.replace(/[=]/g,\"\"):t}function le(e){return Buffer.from(e,\"base64\").toString(\"utf-8\")}const Jt=\"https://rpc.walletconnect.org/v1\";async function tn(e,n,t,r,o,s){switch(t.t){case\"eip191\":return rn(e,n,t.s);case\"eip1271\":return await on(e,n,t.s,r,o,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}function rn(e,n,t){return ct(Pe(n),t).toLowerCase()===e.toLowerCase()}async function on(e,n,t,r,o,s){const i=re(r);if(!i.namespace||!i.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${r}`);try{const u=\"0x1626ba7e\",l=\"0000000000000000000000000000000000000000000000000000000000000040\",c=\"0000000000000000000000000000000000000000000000000000000000000041\",d=t.substring(2),a=Pe(n).substring(2),f=u+a+l+c+d,h=await fetch(`${s||Jt}/?chainId=${r}&projectId=${o}`,{method:\"POST\",body:JSON.stringify({id:zt(),jsonrpc:\"2.0\",method:\"eth_call\",params:[{to:e,data:f},\"latest\"]})}),{result:p}=await h.json();return p?p.slice(0,u.length).toLowerCase()===u.toLowerCase():!1}catch(u){return console.error(\"isValidEip1271Signature: \",u),!1}}function zt(){return Date.now()+Math.floor(Math.random()*1e3)}var Gt=Object.defineProperty,Yt=Object.defineProperties,Qt=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,cn=(e,n,t)=>n in e?Gt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,de=(e,n)=>{for(var t in n||(n={}))Zt.call(n,t)&&cn(e,t,n[t]);if(sn)for(var t of sn(n))Xt.call(n,t)&&cn(e,t,n[t]);return e},an=(e,n)=>Yt(e,Qt(n));const er=\"did:pkh:\",z=e=>e?.split(\":\"),un=e=>{const n=e&&z(e);if(n)return e.includes(er)?n[3]:n[1]},ln=e=>{const n=e&&z(e);if(n)return n[2]+\":\"+n[3]},fe=e=>{const n=e&&z(e);if(n)return n.pop()};async function nr(e){const{cacao:n,projectId:t}=e,{s:r,p:o}=n,s=dn(o,o.iss),i=fe(o.iss);return await tn(i,s,r,ln(o.iss),t)}const dn=(e,n)=>{const t=`${e.domain} wants you to sign in with your Ethereum account:`,r=fe(n);if(!e.aud&&!e.uri)throw new Error(\"Either `aud` or `uri` is required to construct the message\");let o=e.statement||void 0;const s=`URI: ${e.aud||e.uri}`,i=`Version: ${e.version}`,u=`Chain ID: ${un(n)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,d=e.exp?`Expiration Time: ${e.exp}`:void 0,a=e.nbf?`Not Before: ${e.nbf}`:void 0,f=e.requestId?`Request ID: ${e.requestId}`:void 0,h=e.resources?`Resources:${e.resources.map(m=>`\n- ${m}`).join(\"\")}`:void 0,p=Y(e.resources);if(p){const m=R(p);o=he(o,m)}return[t,r,\"\",o,\"\",s,i,u,l,c,d,a,f,h].filter(m=>m!=null).join(`\n`)};function tr(e,n,t){return t.includes(\"did:pkh:\")||(t=`did:pkh:${t}`),{h:{t:\"caip122\"},p:{iss:t,domain:e.domain,aud:e.aud,version:e.version,nonce:e.nonce,iat:e.iat,statement:e.statement,requestId:e.requestId,resources:e.resources,nbf:e.nbf,exp:e.exp},s:n}}function rr(e){var n;const{authPayload:t,chains:r,methods:o}=e,s=t.statement||\"\";if(!(r!=null&&r.length))return t;const i=t.chains,u=ue(i,r);if(!(u!=null&&u.length))throw new Error(\"No supported chains\");const l=fn(t.resources);if(!l)return t;O(l);const c=pn(l,\"eip155\");let d=t?.resources||[];if(c!=null&&c.length){const a=mn(c),f=ue(a,o);if(!(f!=null&&f.length))throw new Error(`Supported methods don't satisfy the requested: ${JSON.stringify(a)}, supported: ${JSON.stringify(o)}`);const h=pe(\"request\",f,{chains:u}),p=vn(l,\"eip155\",h);d=((n=t?.resources)==null?void 0:n.slice(0,-1))||[],d.push(G(p))}return an(de({},t),{statement:En(s,Y(d)),chains:u,resources:t!=null&&t.resources||d.length>0?d:void 0})}function fn(e){const n=Y(e);if(n&&me(n))return R(n)}function or(e,n){var t;return(t=e?.att)==null?void 0:t.hasOwnProperty(n)}function pn(e,n){var t,r;return(t=e?.att)!=null&&t[n]?Object.keys((r=e?.att)==null?void 0:r[n]):[]}function sr(e){return e?.map(n=>Object.keys(n))||[]}function mn(e){return e?.map(n=>{var t;return(t=n.split(\"/\"))==null?void 0:t[1]})||[]}function hn(e){return Buffer.from(JSON.stringify(e)).toString(\"base64\")}function yn(e){return JSON.parse(Buffer.from(e,\"base64\").toString(\"utf-8\"))}function O(e){if(!e)throw new Error(\"No recap provided, value is undefined\");if(!e.att)throw new Error(\"No `att` property found\");const n=Object.keys(e.att);if(!(n!=null&&n.length))throw new Error(\"No resources found in `att` property\");n.forEach(t=>{const r=e.att[t];if(Array.isArray(r))throw new Error(`Resource must be an object: ${t}`);if(typeof r!=\"object\")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(r).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(r).forEach(o=>{const s=r[o];if(!Array.isArray(s))throw new Error(`Ability limits ${o} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${o} is empty array, must be an array with objects`);s.forEach(i=>{if(typeof i!=\"object\")throw new Error(`Ability limits (${o}) must be an array of objects, found: ${i}`)})})})}function gn(e,n,t,r={}){return t?.sort((o,s)=>o.localeCompare(s)),{att:{[e]:pe(n,t,r)}}}function vn(e,n,t){var r;return e.att[n]=de({},t),((r=Object.keys(e.att))==null?void 0:r.sort((o,s)=>o.localeCompare(s))).reduce((o,s)=>(o.att[s]=e.att[s],o),{att:{}})}function pe(e,n,t={}){n=n?.sort((o,s)=>o.localeCompare(s));const r=n.map(o=>({[`${e}/${o}`]:[t]}));return Object.assign({},...r)}function G(e){return O(e),`urn:recap:${hn(e).replace(/=/g,\"\")}`}function R(e){const n=yn(e.replace(\"urn:recap:\",\"\"));return O(n),n}function ir(e,n,t){const r=gn(e,n,t);return G(r)}function me(e){return e&&e.includes(\"urn:recap:\")}function cr(e,n){const t=R(e),r=R(n),o=bn(t,r);return G(o)}function bn(e,n){O(e),O(n);const t=Object.keys(e.att).concat(Object.keys(n.att)).sort((o,s)=>o.localeCompare(s)),r={att:{}};return t.forEach(o=>{var s,i;Object.keys(((s=e.att)==null?void 0:s[o])||{}).concat(Object.keys(((i=n.att)==null?void 0:i[o])||{})).sort((u,l)=>u.localeCompare(l)).forEach(u=>{var l,c;r.att[o]=an(de({},r.att[o]),{[u]:((l=e.att[o])==null?void 0:l[u])||((c=n.att[o])==null?void 0:c[u])})})}),r}function he(e=\"\",n){O(n);const t=\"I further authorize the stated URI to perform the following actions on my behalf: \";if(e.includes(t))return e;const r=[];let o=0;Object.keys(n.att).forEach(u=>{const l=Object.keys(n.att[u]).map(a=>({ability:a.split(\"/\")[0],action:a.split(\"/\")[1]}));l.sort((a,f)=>a.action.localeCompare(f.action));const c={};l.forEach(a=>{c[a.ability]||(c[a.ability]=[]),c[a.ability].push(a.action)});const d=Object.keys(c).map(a=>(o++,`(${o}) '${a}': '${c[a].join(\"', '\")}' for '${u}'.`));r.push(d.join(\", \").replace(\".,\",\".\"))});const s=r.join(\" \"),i=`${t}${s}`;return`${e?e+\" \":\"\"}${i}`}function ar(e){var n;const t=R(e);O(t);const r=(n=t.att)==null?void 0:n.eip155;return r?Object.keys(r).map(o=>o.split(\"/\")[1]):[]}function ur(e){const n=R(e);O(n);const t=[];return Object.values(n.att).forEach(r=>{Object.values(r).forEach(o=>{var s;(s=o?.[0])!=null&&s.chains&&t.push(o[0].chains)})}),[...new Set(t.flat())]}function En(e,n){if(!n)return e;const t=R(n);return O(t),he(e,t)}function Y(e){if(!e)return;const n=e?.[e.length-1];return me(n)?n:void 0}const ye=\"base10\",g=\"base16\",ge=\"base64pad\",lr=\"base64url\",k=\"utf8\",ve=0,D=1,M=2,dr=0,wn=1,K=12,be=32;function fr(){const e=_e.generateKeyPair();return{privateKey:v(e.secretKey,g),publicKey:v(e.publicKey,g)}}function pr(){const e=B(be);return v(e,g)}function mr(e,n){const t=_e.sharedKey(w(e,g),w(n,g),!0),r=new at(Ce,t).expand(be);return v(r,g)}function hr(e){const n=Ue(w(e,g));return v(n,g)}function yr(e){const n=Ue(w(e,k));return v(n,g)}function Ee(e){return w(`${e}`,ye)}function A(e){return Number(v(e,ye))}function gr(e){const n=Ee(typeof e.type<\"u\"?e.type:ve);if(A(n)===D&&typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");const t=typeof e.senderPublicKey<\"u\"?w(e.senderPublicKey,g):void 0,r=typeof e.iv<\"u\"?w(e.iv,g):B(K),o=new Ae(w(e.symKey,g)).seal(r,w(e.message,k));return we({type:n,sealed:o,iv:r,senderPublicKey:t,encoding:e.encoding})}function vr(e,n){const t=Ee(M),r=B(K),o=w(e,k);return we({type:t,sealed:o,iv:r,encoding:n})}function br(e){const n=new Ae(w(e.symKey,g)),{sealed:t,iv:r}=Q({encoded:e.encoded,encoding:e?.encoding}),o=n.open(r,t);if(o===null)throw new Error(\"Failed to decrypt\");return v(o,k)}function Er(e,n){const{sealed:t}=Q({encoded:e,encoding:n});return v(t,k)}function we(e){const{encoding:n=ge}=e;if(A(e.type)===M)return v(te([e.type,e.sealed]),n);if(A(e.type)===D){if(typeof e.senderPublicKey>\"u\")throw new Error(\"Missing sender public key for type 1 envelope\");return v(te([e.type,e.senderPublicKey,e.iv,e.sealed]),n)}return v(te([e.type,e.iv,e.sealed]),n)}function Q(e){const{encoded:n,encoding:t=ge}=e,r=w(n,t),o=r.slice(dr,wn),s=wn;if(A(o)===D){const c=s+be,d=c+K,a=r.slice(s,c),f=r.slice(c,d),h=r.slice(d);return{type:o,sealed:h,iv:f,senderPublicKey:a}}if(A(o)===M){const c=r.slice(s),d=B(K);return{type:o,sealed:c,iv:d}}const i=s+K,u=r.slice(s,i),l=r.slice(i);return{type:o,sealed:l,iv:u}}function wr(e,n){const t=Q({encoded:e,encoding:n?.encoding});return On({type:A(t.type),senderPublicKey:typeof t.senderPublicKey<\"u\"?v(t.senderPublicKey,g):void 0,receiverPublicKey:n?.receiverPublicKey})}function On(e){const n=e?.type||ve;if(n===D){if(typeof e?.senderPublicKey>\"u\")throw new Error(\"missing sender public key\");if(typeof e?.receiverPublicKey>\"u\")throw new Error(\"missing receiver public key\")}return{type:n,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Or(e){return e.type===D&&typeof e.senderPublicKey==\"string\"&&typeof e.receiverPublicKey==\"string\"}function Nr(e){return e.type===M}function Nn(e){return new ut(\"p256\").keyFromPublic({x:Buffer.from(e.x,\"base64\").toString(\"hex\"),y:Buffer.from(e.y,\"base64\").toString(\"hex\")},\"hex\")}function Sr(e){let n=e.replace(/-/g,\"+\").replace(/_/g,\"/\");const t=n.length%4;return t>0&&(n+=\"=\".repeat(4-t)),n}function $r(e){return Buffer.from(Sr(e),\"base64\")}function Rr(e,n){const[t,r,o]=e.split(\".\"),s=$r(o);if(s.length!==64)throw new Error(\"Invalid signature length\");const i=s.slice(0,32).toString(\"hex\"),u=s.slice(32,64).toString(\"hex\"),l=`${t}.${r}`,c=new Ce().update(Buffer.from(l)).digest(),d=Nn(n),a=Buffer.from(c).toString(\"hex\");if(!d.verify(a,{r:i,s:u}))throw new Error(\"Invalid signature\");return lt(e).payload}const Sn=\"irn\";function Ir(e){return e?.relay||{protocol:Sn}}function jr(e){const n=dt[e];if(typeof n>\"u\")throw new Error(`Relay Protocol not supported: ${e}`);return n}var Tr=Object.defineProperty,Pr=Object.defineProperties,Ar=Object.getOwnPropertyDescriptors,$n=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Rn=(e,n,t)=>n in e?Tr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,In=(e,n)=>{for(var t in n||(n={}))Cr.call(n,t)&&Rn(e,t,n[t]);if($n)for(var t of $n(n))Ur.call(n,t)&&Rn(e,t,n[t]);return e},_r=(e,n)=>Pr(e,Ar(n));function jn(e,n=\"-\"){const t={},r=\"relay\"+n;return Object.keys(e).forEach(o=>{if(o.startsWith(r)){const s=o.replace(r,\"\"),i=e[o];t[s]=i}}),t}function kr(e){if(!e.includes(\"wc:\")){const l=le(e);l!=null&&l.includes(\"wc:\")&&(e=l)}e=e.includes(\"wc://\")?e.replace(\"wc://\",\"\"):e,e=e.includes(\"wc:\")?e.replace(\"wc:\",\"\"):e;const n=e.indexOf(\":\"),t=e.indexOf(\"?\")!==-1?e.indexOf(\"?\"):void 0,r=e.substring(0,n),o=e.substring(n+1,t).split(\"@\"),s=typeof t<\"u\"?e.substring(t):\"\",i=q.parse(s),u=typeof i.methods==\"string\"?i.methods.split(\",\"):void 0;return{protocol:r,topic:Tn(o[0]),version:parseInt(o[1],10),symKey:i.symKey,relay:jn(i),methods:u,expiryTimestamp:i.expiryTimestamp?parseInt(i.expiryTimestamp,10):void 0}}function Tn(e){return e.startsWith(\"//\")?e.substring(2):e}function Pn(e,n=\"-\"){const t=\"relay\",r={};return Object.keys(e).forEach(o=>{const s=t+n+o;e[o]&&(r[s]=e[o])}),r}function Dr(e){return`${e.protocol}:${e.topic}@${e.version}?`+q.stringify(In(_r(In({symKey:e.symKey},Pn(e.relay)),{expiryTimestamp:e.expiryTimestamp}),e.methods?{methods:e.methods.join(\",\")}:{}))}function xr(e,n,t){return`${e}?wc_ev=${t}&topic=${n}`}var Vr=Object.defineProperty,Mr=Object.defineProperties,Kr=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Cn=(e,n,t)=>n in e?Vr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,qr=(e,n)=>{for(var t in n||(n={}))Lr.call(n,t)&&Cn(e,t,n[t]);if(An)for(var t of An(n))Fr.call(n,t)&&Cn(e,t,n[t]);return e},Br=(e,n)=>Mr(e,Kr(n));function C(e){const n=[];return e.forEach(t=>{const[r,o]=t.split(\":\");n.push(`${r}:${o}`)}),n}function Un(e){const n=[];return Object.values(e).forEach(t=>{n.push(...C(t.accounts))}),n}function _n(e,n){const t=[];return Object.values(e).forEach(r=>{C(r.accounts).includes(n)&&t.push(...r.methods)}),t}function kn(e,n){const t=[];return Object.values(e).forEach(r=>{C(r.accounts).includes(n)&&t.push(...r.events)}),t}function Hr(e,n){const t=Wn(e,n);if(t)throw new Error(t.message);const r={};for(const[o,s]of Object.entries(e))r[o]={methods:s.methods,events:s.events,chains:s.accounts.map(i=>`${i.split(\":\")[0]}:${i.split(\":\")[1]}`)};return r}function Wr(e){const{proposal:{requiredNamespaces:n,optionalNamespaces:t={}},supportedNamespaces:r}=e,o=Ne(n),s=Ne(t),i={};Object.keys(r).forEach(c=>{const d=r[c].chains,a=r[c].methods,f=r[c].events,h=r[c].accounts;d.forEach(p=>{if(!h.some(m=>m.includes(p)))throw new Error(`No accounts provided for chain ${p} in namespace ${c}`)}),i[c]={chains:d,methods:a,events:f,accounts:h}});const u=zn(n,i,\"approve()\");if(u)throw new Error(u.message);const l={};return!Object.keys(n).length&&!Object.keys(t).length?i:(Object.keys(o).forEach(c=>{const d=r[c].chains.filter(p=>{var m,E;return(E=(m=o[c])==null?void 0:m.chains)==null?void 0:E.includes(p)}),a=r[c].methods.filter(p=>{var m,E;return(E=(m=o[c])==null?void 0:m.methods)==null?void 0:E.includes(p)}),f=r[c].events.filter(p=>{var m,E;return(E=(m=o[c])==null?void 0:m.events)==null?void 0:E.includes(p)}),h=d.map(p=>r[c].accounts.filter(m=>m.includes(`${p}:`))).flat();l[c]={chains:d,methods:a,events:f,accounts:h}}),Object.keys(s).forEach(c=>{var d,a,f,h,p,m;if(!r[c])return;const E=(a=(d=s[c])==null?void 0:d.chains)==null?void 0:a.filter(j=>r[c].chains.includes(j)),nt=r[c].methods.filter(j=>{var T,x;return(x=(T=s[c])==null?void 0:T.methods)==null?void 0:x.includes(j)}),tt=r[c].events.filter(j=>{var T,x;return(x=(T=s[c])==null?void 0:T.events)==null?void 0:x.includes(j)}),rt=E?.map(j=>r[c].accounts.filter(T=>T.includes(`${j}:`))).flat();l[c]={chains:N((f=l[c])==null?void 0:f.chains,E),methods:N((h=l[c])==null?void 0:h.methods,nt),events:N((p=l[c])==null?void 0:p.events,tt),accounts:N((m=l[c])==null?void 0:m.accounts,rt)}}),l)}function Oe(e){return e.includes(\":\")}function Dn(e){return Oe(e)?e.split(\":\")[0]:e}function Ne(e){var n,t,r;const o={};if(!Z(e))return o;for(const[s,i]of Object.entries(e)){const u=Oe(s)?[s]:i.chains,l=i.methods||[],c=i.events||[],d=Dn(s);o[d]=Br(qr({},o[d]),{chains:N(u,(n=o[d])==null?void 0:n.chains),methods:N(l,(t=o[d])==null?void 0:t.methods),events:N(c,(r=o[d])==null?void 0:r.events)})}return o}function xn(e){const n={};return e?.forEach(t=>{const[r,o]=t.split(\":\");n[r]||(n[r]={accounts:[],chains:[],events:[]}),n[r].accounts.push(t),n[r].chains.push(`${r}:${o}`)}),n}function Jr(e,n){n=n.map(r=>r.replace(\"did:pkh:\",\"\"));const t=xn(n);for(const[r,o]of Object.entries(t))o.methods?o.methods=N(o.methods,e):o.methods=e,o.events=[\"chainChanged\",\"accountsChanged\"];return t}const Vn={INVALID_METHOD:{message:\"Invalid method.\",code:1001},INVALID_EVENT:{message:\"Invalid event.\",code:1002},INVALID_UPDATE_REQUEST:{message:\"Invalid update request.\",code:1003},INVALID_EXTEND_REQUEST:{message:\"Invalid extend request.\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\"Invalid session settle request.\",code:1005},UNAUTHORIZED_METHOD:{message:\"Unauthorized method.\",code:3001},UNAUTHORIZED_EVENT:{message:\"Unauthorized event.\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\"Unauthorized update request.\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\"Unauthorized extend request.\",code:3004},USER_REJECTED:{message:\"User rejected.\",code:5e3},USER_REJECTED_CHAINS:{message:\"User rejected chains.\",code:5001},USER_REJECTED_METHODS:{message:\"User rejected methods.\",code:5002},USER_REJECTED_EVENTS:{message:\"User rejected events.\",code:5003},UNSUPPORTED_CHAINS:{message:\"Unsupported chains.\",code:5100},UNSUPPORTED_METHODS:{message:\"Unsupported methods.\",code:5101},UNSUPPORTED_EVENTS:{message:\"Unsupported events.\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\"Unsupported accounts.\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\"Unsupported namespace key.\",code:5104},USER_DISCONNECTED:{message:\"User disconnected.\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\"Session settlement failed.\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\"Unsupported wc_ method.\",code:10001}},Mn={NOT_INITIALIZED:{message:\"Not initialized.\",code:1},NO_MATCHING_KEY:{message:\"No matching key.\",code:2},RESTORE_WILL_OVERRIDE:{message:\"Restore will override.\",code:3},RESUBSCRIBED:{message:\"Resubscribed.\",code:4},MISSING_OR_INVALID:{message:\"Missing or invalid.\",code:5},EXPIRED:{message:\"Expired.\",code:6},UNKNOWN_TYPE:{message:\"Unknown type.\",code:7},MISMATCHED_TOPIC:{message:\"Mismatched topic.\",code:8},NON_CONFORMING_NAMESPACES:{message:\"Non conforming namespaces.\",code:9}};function S(e,n){const{message:t,code:r}=Mn[e];return{message:n?`${t} ${n}`:t,code:r}}function U(e,n){const{message:t,code:r}=Vn[e];return{message:n?`${t} ${n}`:t,code:r}}function L(e,n){return Array.isArray(e)?typeof n<\"u\"&&e.length?e.every(n):!0:!1}function Z(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function I(e){return typeof e>\"u\"}function b(e,n){return n&&I(e)?!0:typeof e==\"string\"&&!!e.trim().length}function X(e,n){return n&&I(e)?!0:typeof e==\"number\"&&!isNaN(e)}function zr(e,n){const{requiredNamespaces:t}=n,r=Object.keys(e.namespaces),o=Object.keys(t);let s=!0;return $(o,r)?(r.forEach(i=>{const{accounts:u,methods:l,events:c}=e.namespaces[i],d=C(u),a=t[i];(!$(W(i,a),d)||!$(a.methods,l)||!$(a.events,c))&&(s=!1)}),s):!1}function F(e){return b(e,!1)&&e.includes(\":\")?e.split(\":\").length===2:!1}function Kn(e){if(b(e,!1)&&e.includes(\":\")){const n=e.split(\":\");if(n.length===3){const t=n[0]+\":\"+n[1];return!!n[2]&&F(t)}}return!1}function Gr(e){function n(t){try{return typeof new URL(t)<\"u\"}catch{return!1}}try{if(b(e,!1)){if(n(e))return!0;const t=le(e);return n(t)}}catch{}return!1}function Yr(e){var n;return(n=e?.proposer)==null?void 0:n.publicKey}function Qr(e){return e?.topic}function Zr(e,n){let t=null;return b(e?.publicKey,!1)||(t=S(\"MISSING_OR_INVALID\",`${n} controller public key should be a string`)),t}function Se(e){let n=!0;return L(e)?e.length&&(n=e.every(t=>b(t,!1))):n=!1,n}function Ln(e,n,t){let r=null;return L(n)&&n.length?n.forEach(o=>{r||F(o)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chain ${o} should be a string and conform to \"namespace:chainId\" format`))}):F(e)||(r=U(\"UNSUPPORTED_CHAINS\",`${t}, chains must be defined as \"namespace:chainId\" e.g. \"eip155:1\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\"eip155:1\", \"eip155:5\"] }`)),r}function Fn(e,n,t){let r=null;return Object.entries(e).forEach(([o,s])=>{if(r)return;const i=Ln(o,W(o,s),`${n} ${t}`);i&&(r=i)}),r}function qn(e,n){let t=null;return L(e)?e.forEach(r=>{t||Kn(r)||(t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, account ${r} should be a string and conform to \"namespace:chainId:address\" format`))}):t=U(\"UNSUPPORTED_ACCOUNTS\",`${n}, accounts should be an array of strings conforming to \"namespace:chainId:address\" format`),t}function Bn(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=qn(r?.accounts,`${n} namespace`);o&&(t=o)}),t}function Hn(e,n){let t=null;return Se(e?.methods)?Se(e?.events)||(t=U(\"UNSUPPORTED_EVENTS\",`${n}, events should be an array of strings or empty array for no events`)):t=U(\"UNSUPPORTED_METHODS\",`${n}, methods should be an array of strings or empty array for no methods`),t}function $e(e,n){let t=null;return Object.values(e).forEach(r=>{if(t)return;const o=Hn(r,`${n}, namespace`);o&&(t=o)}),t}function Xr(e,n,t){let r=null;if(e&&Z(e)){const o=$e(e,n);o&&(r=o);const s=Fn(e,n,t);s&&(r=s)}else r=S(\"MISSING_OR_INVALID\",`${n}, ${t} should be an object with data`);return r}function Wn(e,n){let t=null;if(e&&Z(e)){const r=$e(e,n);r&&(t=r);const o=Bn(e,n);o&&(t=o)}else t=S(\"MISSING_OR_INVALID\",`${n}, namespaces should be an object with data`);return t}function Jn(e){return b(e.protocol,!0)}function eo(e,n){let t=!1;return n&&!e?t=!0:e&&L(e)&&e.length&&e.forEach(r=>{t=Jn(r)}),t}function no(e){return typeof e==\"number\"}function to(e){return typeof e<\"u\"&&typeof e!==null}function ro(e){return!(!e||typeof e!=\"object\"||!e.code||!X(e.code,!1)||!e.message||!b(e.message,!1))}function oo(e){return!(I(e)||!b(e.method,!1))}function so(e){return!(I(e)||I(e.result)&&I(e.error)||!X(e.id,!1)||!b(e.jsonrpc,!1))}function io(e){return!(I(e)||!b(e.name,!1))}function co(e,n){return!(!F(n)||!Un(e).includes(n))}function ao(e,n,t){return b(t,!1)?_n(e,n).includes(t):!1}function uo(e,n,t){return b(t,!1)?kn(e,n).includes(t):!1}function zn(e,n,t){let r=null;const o=lo(e),s=fo(n),i=Object.keys(o),u=Object.keys(s),l=Gn(Object.keys(e)),c=Gn(Object.keys(n)),d=l.filter(a=>!c.includes(a));return d.length&&(r=S(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces keys don't satisfy requiredNamespaces.\n Required: ${d.toString()}\n Received: ${Object.keys(n).toString()}`)),$(i,u)||(r=S(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces chains don't satisfy required namespaces.\n Required: ${i.toString()}\n Approved: ${u.toString()}`)),Object.keys(n).forEach(a=>{if(!a.includes(\":\")||r)return;const f=C(n[a].accounts);f.includes(a)||(r=S(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces accounts don't satisfy namespace accounts for ${a}\n Required: ${a}\n Approved: ${f.toString()}`))}),i.forEach(a=>{r||($(o[a].methods,s[a].methods)?$(o[a].events,s[a].events)||(r=S(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces events don't satisfy namespace events for ${a}`)):r=S(\"NON_CONFORMING_NAMESPACES\",`${t} namespaces methods don't satisfy namespace methods for ${a}`))}),r}function lo(e){const n={};return Object.keys(e).forEach(t=>{var r;t.includes(\":\")?n[t]=e[t]:(r=e[t].chains)==null||r.forEach(o=>{n[o]={methods:e[t].methods,events:e[t].events}})}),n}function Gn(e){return[...new Set(e.map(n=>n.includes(\":\")?n.split(\":\")[0]:n))]}function fo(e){const n={};return Object.keys(e).forEach(t=>{if(t.includes(\":\"))n[t]=e[t];else{const r=C(e[t].accounts);r?.forEach(o=>{n[o]={accounts:e[t].accounts.filter(s=>s.includes(`${o}:`)),methods:e[t].methods,events:e[t].events}})}}),n}function po(e,n){return X(e,!1)&&e<=n.max&&e>=n.min}function mo(){const e=P();return new Promise(n=>{switch(e){case y.browser:n(Yn());break;case y.reactNative:n(Qn());break;case y.node:n(Zn());break;default:n(!0)}})}function Yn(){return V()&&navigator?.onLine}async function Qn(){if(_()&&typeof global<\"u\"&&global!=null&&global.NetInfo){const e=await(global==null?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}function Zn(){return!0}function ho(e){switch(P()){case y.browser:Xn(e);break;case y.reactNative:et(e);break;case y.node:break}}function Xn(e){!_()&&V()&&(window.addEventListener(\"online\",()=>e(!0)),window.addEventListener(\"offline\",()=>e(!1)))}function et(e){_()&&typeof global<\"u\"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(n=>e(n?.isConnected))}const Re={};class yo{static get(n){return Re[n]}static set(n,t){Re[n]=t}static delete(n){delete Re[n]}}export{ye as BASE10,g as BASE16,ge as BASE64,lr as BASE64URL,Et as COLON,ie as DEFAULT_DEPTH,J as EMPTY_SPACE,y as ENV_MAP,Mn as INTERNAL_ERRORS,yo as MemoryStore,wt as ONE_THOUSAND,qe as REACT_NATIVE_PRODUCT,Sn as RELAYER_DEFAULT_PROTOCOL,Vn as SDK_ERRORS,He as SDK_TYPE,Be as SLASH,ve as TYPE_0,D as TYPE_1,M as TYPE_2,k as UTF8,vn as addResourceToRecap,We as appendToQueryString,It as assertType,pe as assignAbilityToActions,yn as base64Decode,hn as base64Encode,Wr as buildApprovedNamespaces,tr as buildAuthObject,Jr as buildNamespacesFromAuth,En as buildRecapStatement,Mt as calcExpiry,Ut as capitalize,Ze as capitalizeWord,_t as createDelayedPromise,ir as createEncodedRecap,kt as createExpiringPromise,gn as createRecap,R as decodeRecap,A as decodeTypeByte,Er as decodeTypeTwoEnvelope,br as decrypt,mr as deriveSymKey,Q as deserialize,G as encodeRecap,Ee as encodeTypeByte,vr as encodeTypeTwoEnvelope,gr as encrypt,Lt as engineEvent,Ct as enumify,De as formatAccountId,ft as formatAccountWithChain,ke as formatChainId,Xe as formatDeeplinkUrl,ae as formatExpirerTarget,xt as formatIdTarget,dn as formatMessage,jt as formatMessageContext,Pn as formatRelayParams,$t as formatRelayRpcUrl,he as formatStatementFromRecap,Dt as formatTopicTarget,Ge as formatUA,Dr as formatUri,le as fromBase64,fr as generateKeyPair,pr as generateRandomBytes32,C as getAccountsChains,mt as getAccountsFromNamespaces,xe as getAddressFromAccount,pt as getAddressesFromAccounts,Nt as getAppMetadata,Yn as getBrowserOnlineStatus,Ot as getBundleId,Ve as getChainFromAccount,Me as getChainsFromAccounts,W as getChainsFromNamespace,ht as getChainsFromNamespaces,ur as getChainsFromRecap,yt as getChainsFromRequiredNamespaces,ue as getCommonValuesInArrays,Nn as getCryptoKeyFromKeyData,fn as getDecodedRecapFromResources,qt as getDeepLink,fe as getDidAddress,z as getDidAddressSegments,un as getDidChainId,P as getEnvironment,Rt as getHttpUrl,S as getInternalError,ze as getJavascriptID,Je as getJavascriptOS,Qe as getLastItems,xr as getLinkModeURL,ar as getMethodsFromRecap,ln as getNamespacedDidChainId,Un as getNamespacesChains,kn as getNamespacesEventsForChainId,xn as getNamespacesFromAccounts,_n as getNamespacesMethodsForChainId,Zn as getNodeOnlineStatus,mn as getReCapActions,Qn as getReactNativeOnlineStatus,sr as getRecapAbilitiesFromResource,Y as getRecapFromResources,pn as getRecapResource,St as getRelayClientMetadata,jr as getRelayProtocolApi,Ir as getRelayProtocolName,Hr as getRequiredNamespacesFromNamespaces,U as getSdkError,Bt as getSearchParamFromURL,se as getUniqueValues,Ft as handleDeeplinkRedirect,$ as hasOverlap,hr as hashKey,yr as hashMessage,V as isBrowser,Oe as isCaipNamespace,zn as isConformingNamespaces,Kt as isExpired,ce as isNode,mo as isOnline,Yr as isProposalStruct,_ as isReactNative,me as isRecap,zr as isSessionCompatible,Qr as isSessionStruct,en as isTelegram,Wt as isTestRun,Or as isTypeOneEnvelope,Nr as isTypeTwoEnvelope,I as isUndefined,Kn as isValidAccountId,qn as isValidAccounts,Hn as isValidActions,L as isValidArray,F as isValidChainId,Ln as isValidChains,Zr as isValidController,on as isValidEip1271Signature,rn as isValidEip191Signature,ro as isValidErrorReason,io as isValidEvent,no as isValidId,Bn as isValidNamespaceAccounts,$e as isValidNamespaceActions,Fn as isValidNamespaceChains,Se as isValidNamespaceMethodsOrEvents,Wn as isValidNamespaces,co as isValidNamespacesChainId,uo as isValidNamespacesEvent,ao as isValidNamespacesRequest,X as isValidNumber,Z as isValidObject,to as isValidParams,O as isValidRecap,Jn as isValidRelay,eo as isValidRelays,oo as isValidRequest,po as isValidRequestExpiry,Xr as isValidRequiredNamespaces,so as isValidResponse,b as isValidString,Gr as isValidUrl,At as mapEntries,Tt as mapToObj,N as mergeArrays,cr as mergeEncodedRecaps,bn as mergeRecaps,Ne as normalizeNamespaces,Pt as objToMap,oe as parseAccountId,re as parseChainId,Ye as parseContextNames,Vt as parseExpirerTarget,Dn as parseNamespaceKey,jn as parseRelayParams,Tn as parseTopic,kr as parseUri,rr as populateAuthPayload,or as recapHasResource,we as serialize,Xn as subscribeToBrowserNetworkChange,ho as subscribeToNetworkChange,et as subscribeToReactNativeNetworkChange,nn as toBase64,Ht as uuidv4,wr as validateDecoding,On as validateEncoding,nr as validateSignedCacao,Rr as verifyP256Jwt,tn as verifySignature};\n//# sourceMappingURL=index.es.js.map\n","import{EventEmitter as a}from\"events\";import{FIVE_SECONDS as o,toMiliseconds as l}from\"@walletconnect/time\";import{IEvents as v}from\"@walletconnect/events\";class n extends v{constructor(e){super()}}const s=o,r={pulse:\"heartbeat_pulse\"};class i extends n{constructor(e){super(e),this.events=new a,this.interval=s,this.interval=e?.interval||s}static async init(e){const t=new i(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),l(this.interval))}pulse(){this.events.emit(r.pulse)}}export{r as HEARTBEAT_EVENTS,s as HEARTBEAT_INTERVAL,i as HeartBeat,n as IHeartBeat};\n//# sourceMappingURL=index.es.js.map\n","import{IEvents as o}from\"@walletconnect/events\";import c,{EventEmitter as i}from\"events\";class n extends o{constructor(s){super(),this.opts=s,this.protocol=\"wc\",this.version=2}}class l{constructor(s,t,e){this.core=s,this.logger=t}}class h extends o{constructor(s,t){super(),this.core=s,this.logger=t,this.records=new Map}}class a{constructor(s,t){this.logger=s,this.core=t}}class g extends o{constructor(s,t){super(),this.relayer=s,this.logger=t}}class u extends o{constructor(s){super()}}class p{constructor(s,t,e,f){this.core=s,this.logger=t,this.name=e}}class I{constructor(){this.map=new Map}}class d extends o{constructor(s,t){super(),this.relayer=s,this.logger=t}}class E{constructor(s,t){this.core=s,this.logger=t}}class x extends o{constructor(s,t){super(),this.core=s,this.logger=t}}class m{constructor(s,t){this.logger=s,this.core=t}}class y{constructor(s,t,e){this.core=s,this.logger=t,this.store=e}}class v{constructor(s,t){this.projectId=s,this.logger=t}}class C{constructor(s,t,e){this.core=s,this.logger=t,this.telemetryEnabled=e}}class b extends c{constructor(){super()}}class S{constructor(s){this.opts=s,this.protocol=\"wc\",this.version=2}}class w extends i{constructor(){super()}}class M{constructor(s){this.client=s}}export{n as ICore,l as ICrypto,v as IEchoClient,M as IEngine,w as IEngineEvents,C as IEventClient,x as IExpirer,h as IJsonRpcHistory,E as IKeyChain,a as IMessageTracker,m as IPairing,g as IPublisher,u as IRelayer,S as ISignClient,b as ISignClientEvents,p as IStore,d as ISubscriber,I as ISubscriberTopicMap,y as IVerify};\n//# sourceMappingURL=index.es.js.map\n","import{EventEmitter as c}from\"events\";import{IJsonRpcProvider as r,formatJsonRpcRequest as h,getBigIntRpcId as a,isJsonRpcError as d,isJsonRpcResponse as v}from\"@walletconnect/jsonrpc-utils\";class o extends r{constructor(t){super(t),this.events=new c,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async request(t,e){return this.requestStrict(h(t.method,t.params||[],t.id||a().toString()),e)}async requestStrict(t,e){return new Promise(async(i,s)=>{if(!this.connection.connected)try{await this.open()}catch(n){s(n)}this.events.on(`${t.id}`,n=>{d(n)?s(n.error):i(n.result)});try{await this.connection.send(t,e)}catch(n){s(n)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit(\"payload\",t),v(t)?this.events.emit(`${t.id}`,t):this.events.emit(\"message\",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit(\"error\",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:\"\"}`)),this.events.emit(\"disconnect\")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t==\"string\"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit(\"connect\"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on(\"payload\",t=>this.onPayload(t)),this.connection.on(\"close\",t=>this.onClose(t)),this.connection.on(\"error\",t=>this.events.emit(\"error\",t)),this.connection.on(\"register_error\",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}export{o as JsonRpcProvider,o as default};\n//# sourceMappingURL=index.es.js.map\n","import mi,{EventEmitter as U}from\"events\";import{HEARTBEAT_EVENTS as j,HeartBeat as bi}from\"@walletconnect/heartbeat\";import fi from\"@walletconnect/keyvaluestorage\";import{generateChildLogger as E,getLoggerContext as C,pino as _i,getDefaultLoggerOptions as Ie,generatePlatformLogger as Ei}from\"@walletconnect/logger\";import{IMessageTracker as vi,IPublisher as wi,ISubscriber as Ii,IRelayer as Ti,IStore as Ci,IJsonRpcHistory as Pi,IExpirer as Si,IVerify as Ri,IEchoClient as xi,IEventClient as Oi,ICore as Ai}from\"@walletconnect/types\";import{ONE_DAY as F,SIX_HOURS as Ni,THIRTY_DAYS as ee,FIVE_SECONDS as Te,THIRTY_SECONDS as oe,toMiliseconds as w,ONE_MINUTE as ae,ONE_SECOND as q,Watch as zi,FIVE_MINUTES as he,fromMiliseconds as Ce}from\"@walletconnect/time\";import{safeJsonStringify as Li,safeJsonParse as Pe}from\"@walletconnect/safe-json\";import*as te from\"@walletconnect/relay-auth\";import{decodeJWT as Se}from\"@walletconnect/relay-auth\";import{getInternalError as d,mapToObj as Re,objToMap as xe,generateRandomBytes32 as ce,generateKeyPair as $i,deriveSymKey as ki,hashKey as Mi,validateEncoding as Ui,isTypeTwoEnvelope as Oe,encodeTypeTwoEnvelope as Fi,isTypeOneEnvelope as Ae,encrypt as Ki,validateDecoding as Bi,decodeTypeTwoEnvelope as Vi,decrypt as ji,deserialize as Ne,decodeTypeByte as qi,BASE64 as ze,BASE16 as Gi,hashMessage as le,getRelayProtocolName as ue,createExpiringPromise as K,getRelayProtocolApi as G,isUndefined as de,getSdkError as H,isValidArray as Hi,isNode as Le,getBundleId as Yi,isOnline as $e,calcExpiry as Y,formatRelayRpcUrl as Ji,subscribeToNetworkChange as Xi,isProposalStruct as Wi,isSessionStruct as Zi,TYPE_1 as Qi,formatUri as ke,parseUri as Me,createDelayedPromise as es,engineEvent as pe,isExpired as Ue,isValidParams as ge,isValidUrl as ts,isValidString as is,parseExpirerTarget as ss,formatTopicTarget as rs,formatIdTarget as ns,isBrowser as os,verifyP256Jwt as as,isTestRun as Fe,uuidv4 as Ke,formatUA as hs,getAppMetadata as cs}from\"@walletconnect/utils\";import{toString as ls}from\"uint8arrays\";import{JsonRpcProvider as us}from\"@walletconnect/jsonrpc-provider\";import{getBigIntRpcId as Be,isJsonRpcRequest as Ve,isJsonRpcResponse as je,formatJsonRpcResult as qe,formatJsonRpcRequest as Ge,formatJsonRpcError as ds,isJsonRpcResult as ps,isJsonRpcError as He}from\"@walletconnect/jsonrpc-utils\";import gs from\"@walletconnect/jsonrpc-ws-connection\";import ys from\"lodash.isequal\";import{getDocument as Ds}from\"@walletconnect/window-getters\";const ye=\"wc\",De=2,ie=\"core\",x=`${ye}@2:${ie}:`,Ye={name:ie,logger:\"error\"},Je={database:\":memory:\"},Xe=\"crypto\",me=\"client_ed25519_seed\",We=F,Ze=\"keychain\",Qe=\"0.3\",et=\"messages\",tt=\"0.3\",it=Ni,st=\"publisher\",rt=\"irn\",nt=\"error\",be=\"wss://relay.walletconnect.org\",ot=\"relayer\",v={message:\"relayer_message\",message_ack:\"relayer_message_ack\",connect:\"relayer_connect\",disconnect:\"relayer_disconnect\",error:\"relayer_error\",connection_stalled:\"relayer_connection_stalled\",transport_closed:\"relayer_transport_closed\",publish:\"relayer_publish\"},at=\"_subscription\",I={payload:\"payload\",connect:\"connect\",disconnect:\"disconnect\",error:\"error\"},ht=.1,ms={database:\":memory:\"},se=\"2.17.2\",bs=1e4,M={link_mode:\"link_mode\",relay:\"relay\"},ct=\"0.3\",lt=\"WALLETCONNECT_CLIENT_ID\",fe=\"WALLETCONNECT_LINK_MODE_APPS\",O={created:\"subscription_created\",deleted:\"subscription_deleted\",expired:\"subscription_expired\",disabled:\"subscription_disabled\",sync:\"subscription_sync\",resubscribed:\"subscription_resubscribed\"},fs=ee,ut=\"subscription\",dt=\"0.3\",pt=Te*1e3,gt=\"pairing\",yt=\"0.3\",_s=ee,B={wc_pairingDelete:{req:{ttl:F,prompt:!1,tag:1e3},res:{ttl:F,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:oe,prompt:!1,tag:1002},res:{ttl:oe,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:F,prompt:!1,tag:0},res:{ttl:F,prompt:!1,tag:0}}},V={create:\"pairing_create\",expire:\"pairing_expire\",delete:\"pairing_delete\",ping:\"pairing_ping\"},P={created:\"history_created\",updated:\"history_updated\",deleted:\"history_deleted\",sync:\"history_sync\"},Dt=\"history\",mt=\"0.3\",bt=\"expirer\",S={created:\"expirer_created\",deleted:\"expirer_deleted\",expired:\"expirer_expired\",sync:\"expirer_sync\"},ft=\"0.3\",Es=F,_t=\"verify-api\",vs=\"https://verify.walletconnect.com\",Et=\"https://verify.walletconnect.org\",J=Et,vt=`${J}/v3`,wt=[vs,Et],It=\"echo\",Tt=\"https://echo.walletconnect.com\",ws=\"event-client\",z={pairing_started:\"pairing_started\",pairing_uri_validation_success:\"pairing_uri_validation_success\",pairing_uri_not_expired:\"pairing_uri_not_expired\",store_new_pairing:\"store_new_pairing\",subscribing_pairing_topic:\"subscribing_pairing_topic\",subscribe_pairing_topic_success:\"subscribe_pairing_topic_success\",existing_pairing:\"existing_pairing\",pairing_not_expired:\"pairing_not_expired\",emit_inactive_pairing:\"emit_inactive_pairing\",emit_session_proposal:\"emit_session_proposal\",subscribing_to_pairing_topic:\"subscribing_to_pairing_topic\"},$={no_wss_connection:\"no_wss_connection\",no_internet_connection:\"no_internet_connection\",malformed_pairing_uri:\"malformed_pairing_uri\",active_pairing_already_exists:\"active_pairing_already_exists\",subscribe_pairing_topic_failure:\"subscribe_pairing_topic_failure\",pairing_expired:\"pairing_expired\",proposal_expired:\"proposal_expired\",proposal_listener_not_found:\"proposal_listener_not_found\"},Is={session_approve_started:\"session_approve_started\",proposal_not_expired:\"proposal_not_expired\",session_namespaces_validation_success:\"session_namespaces_validation_success\",create_session_topic:\"create_session_topic\",subscribing_session_topic:\"subscribing_session_topic\",subscribe_session_topic_success:\"subscribe_session_topic_success\",publishing_session_approve:\"publishing_session_approve\",session_approve_publish_success:\"session_approve_publish_success\",store_session:\"store_session\",publishing_session_settle:\"publishing_session_settle\",session_settle_publish_success:\"session_settle_publish_success\"},Ts={no_internet_connection:\"no_internet_connection\",no_wss_connection:\"no_wss_connection\",proposal_expired:\"proposal_expired\",subscribe_session_topic_failure:\"subscribe_session_topic_failure\",session_approve_publish_failure:\"session_approve_publish_failure\",session_settle_publish_failure:\"session_settle_publish_failure\",session_approve_namespace_validation_failure:\"session_approve_namespace_validation_failure\",proposal_not_found:\"proposal_not_found\"},Cs={authenticated_session_approve_started:\"authenticated_session_approve_started\",authenticated_session_not_expired:\"authenticated_session_not_expired\",chains_caip2_compliant:\"chains_caip2_compliant\",chains_evm_compliant:\"chains_evm_compliant\",create_authenticated_session_topic:\"create_authenticated_session_topic\",cacaos_verified:\"cacaos_verified\",store_authenticated_session:\"store_authenticated_session\",subscribing_authenticated_session_topic:\"subscribing_authenticated_session_topic\",subscribe_authenticated_session_topic_success:\"subscribe_authenticated_session_topic_success\",publishing_authenticated_session_approve:\"publishing_authenticated_session_approve\",authenticated_session_approve_publish_success:\"authenticated_session_approve_publish_success\"},Ps={no_internet_connection:\"no_internet_connection\",no_wss_connection:\"no_wss_connection\",missing_session_authenticate_request:\"missing_session_authenticate_request\",session_authenticate_request_expired:\"session_authenticate_request_expired\",chains_caip2_compliant_failure:\"chains_caip2_compliant_failure\",chains_evm_compliant_failure:\"chains_evm_compliant_failure\",invalid_cacao:\"invalid_cacao\",subscribe_authenticated_session_topic_failure:\"subscribe_authenticated_session_topic_failure\",authenticated_session_approve_publish_failure:\"authenticated_session_approve_publish_failure\",authenticated_session_pending_request_not_found:\"authenticated_session_pending_request_not_found\"},Ct=.1,Pt=\"event-client\",St=86400,Rt=\"https://pulse.walletconnect.org/batch\";function Ss(o,e){if(o.length>=255)throw new TypeError(\"Alphabet too long\");for(var t=new Uint8Array(256),s=0;s>>0,T=new Uint8Array(A);y!==b;){for(var N=u[y],k=0,R=A-1;(N!==0||k<_)&&R!==-1;R--,k++)N+=256*T[R]>>>0,T[R]=N%a>>>0,N=N/a>>>0;if(N!==0)throw new Error(\"Non-zero carry\");_=k,y++}for(var L=A-_;L!==A&&T[L]===0;)L++;for(var Q=h.repeat(g);L>>0,A=new Uint8Array(b);u[g];){var T=t[u.charCodeAt(g)];if(T===255)return;for(var N=0,k=b-1;(T!==0||N>>0,A[k]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error(\"Non-zero carry\");y=N,g++}if(u[g]!==\" \"){for(var R=b-y;R!==b&&A[R]===0;)R++;for(var L=new Uint8Array(_+(b-R)),Q=_;R!==b;)L[Q++]=A[R++];return L}}}function m(u){var g=D(u);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:D,decode:m}}var Rs=Ss,xs=Rs;const xt=o=>{if(o instanceof Uint8Array&&o.constructor.name===\"Uint8Array\")return o;if(o instanceof ArrayBuffer)return new Uint8Array(o);if(ArrayBuffer.isView(o))return new Uint8Array(o.buffer,o.byteOffset,o.byteLength);throw new Error(\"Unknown type, must be binary type\")},Os=o=>new TextEncoder().encode(o),As=o=>new TextDecoder().decode(o);class Ns{constructor(e,t,s){this.name=e,this.prefix=t,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\"Unknown type, must be binary type\")}}class zs{constructor(e,t,s){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error(\"Invalid prefix character\");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=s}decode(e){if(typeof e==\"string\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\"Can only multibase decode strings\")}or(e){return Ot(this,e)}}class Ls{constructor(e){this.decoders=e}or(e){return Ot(this,e)}decode(e){const t=e[0],s=this.decoders[t];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ot=(o,e)=>new Ls({...o.decoders||{[o.prefix]:o},...e.decoders||{[e.prefix]:e}});class $s{constructor(e,t,s,i){this.name=e,this.prefix=t,this.baseEncode=s,this.baseDecode=i,this.encoder=new Ns(e,t,s),this.decoder=new zs(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const re=({name:o,prefix:e,encode:t,decode:s})=>new $s(o,e,t,s),X=({prefix:o,name:e,alphabet:t})=>{const{encode:s,decode:i}=xs(t,e);return re({prefix:o,name:e,encode:s,decode:r=>xt(i(r))})},ks=(o,e,t,s)=>{const i={};for(let l=0;l=8&&(a-=8,n[c++]=255&h>>a)}if(a>=t||255&h<<8-a)throw new SyntaxError(\"Unexpected end of data\");return n},Ms=(o,e,t)=>{const s=e[e.length-1]===\"=\",i=(1<t;)n-=t,r+=e[i&a>>n];if(n&&(r+=e[i&a<re({prefix:e,name:o,encode(i){return Ms(i,s,t)},decode(i){return ks(i,s,t,o)}}),Us=re({prefix:\"\\0\",name:\"identity\",encode:o=>As(o),decode:o=>Os(o)});var Fs=Object.freeze({__proto__:null,identity:Us});const Ks=f({prefix:\"0\",name:\"base2\",alphabet:\"01\",bitsPerChar:1});var Bs=Object.freeze({__proto__:null,base2:Ks});const Vs=f({prefix:\"7\",name:\"base8\",alphabet:\"01234567\",bitsPerChar:3});var js=Object.freeze({__proto__:null,base8:Vs});const qs=X({prefix:\"9\",name:\"base10\",alphabet:\"0123456789\"});var Gs=Object.freeze({__proto__:null,base10:qs});const Hs=f({prefix:\"f\",name:\"base16\",alphabet:\"0123456789abcdef\",bitsPerChar:4}),Ys=f({prefix:\"F\",name:\"base16upper\",alphabet:\"0123456789ABCDEF\",bitsPerChar:4});var Js=Object.freeze({__proto__:null,base16:Hs,base16upper:Ys});const Xs=f({prefix:\"b\",name:\"base32\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567\",bitsPerChar:5}),Ws=f({prefix:\"B\",name:\"base32upper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\",bitsPerChar:5}),Zs=f({prefix:\"c\",name:\"base32pad\",alphabet:\"abcdefghijklmnopqrstuvwxyz234567=\",bitsPerChar:5}),Qs=f({prefix:\"C\",name:\"base32padupper\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\",bitsPerChar:5}),er=f({prefix:\"v\",name:\"base32hex\",alphabet:\"0123456789abcdefghijklmnopqrstuv\",bitsPerChar:5}),tr=f({prefix:\"V\",name:\"base32hexupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV\",bitsPerChar:5}),ir=f({prefix:\"t\",name:\"base32hexpad\",alphabet:\"0123456789abcdefghijklmnopqrstuv=\",bitsPerChar:5}),sr=f({prefix:\"T\",name:\"base32hexpadupper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\",bitsPerChar:5}),rr=f({prefix:\"h\",name:\"base32z\",alphabet:\"ybndrfg8ejkmcpqxot1uwisza345h769\",bitsPerChar:5});var nr=Object.freeze({__proto__:null,base32:Xs,base32upper:Ws,base32pad:Zs,base32padupper:Qs,base32hex:er,base32hexupper:tr,base32hexpad:ir,base32hexpadupper:sr,base32z:rr});const or=X({prefix:\"k\",name:\"base36\",alphabet:\"0123456789abcdefghijklmnopqrstuvwxyz\"}),ar=X({prefix:\"K\",name:\"base36upper\",alphabet:\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"});var hr=Object.freeze({__proto__:null,base36:or,base36upper:ar});const cr=X({name:\"base58btc\",prefix:\"z\",alphabet:\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"}),lr=X({name:\"base58flickr\",prefix:\"Z\",alphabet:\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"});var ur=Object.freeze({__proto__:null,base58btc:cr,base58flickr:lr});const dr=f({prefix:\"m\",name:\"base64\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",bitsPerChar:6}),pr=f({prefix:\"M\",name:\"base64pad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",bitsPerChar:6}),gr=f({prefix:\"u\",name:\"base64url\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\",bitsPerChar:6}),yr=f({prefix:\"U\",name:\"base64urlpad\",alphabet:\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\",bitsPerChar:6});var Dr=Object.freeze({__proto__:null,base64:dr,base64pad:pr,base64url:gr,base64urlpad:yr});const At=Array.from(\"\\u{1F680}\\u{1FA90}\\u2604\\u{1F6F0}\\u{1F30C}\\u{1F311}\\u{1F312}\\u{1F313}\\u{1F314}\\u{1F315}\\u{1F316}\\u{1F317}\\u{1F318}\\u{1F30D}\\u{1F30F}\\u{1F30E}\\u{1F409}\\u2600\\u{1F4BB}\\u{1F5A5}\\u{1F4BE}\\u{1F4BF}\\u{1F602}\\u2764\\u{1F60D}\\u{1F923}\\u{1F60A}\\u{1F64F}\\u{1F495}\\u{1F62D}\\u{1F618}\\u{1F44D}\\u{1F605}\\u{1F44F}\\u{1F601}\\u{1F525}\\u{1F970}\\u{1F494}\\u{1F496}\\u{1F499}\\u{1F622}\\u{1F914}\\u{1F606}\\u{1F644}\\u{1F4AA}\\u{1F609}\\u263A\\u{1F44C}\\u{1F917}\\u{1F49C}\\u{1F614}\\u{1F60E}\\u{1F607}\\u{1F339}\\u{1F926}\\u{1F389}\\u{1F49E}\\u270C\\u2728\\u{1F937}\\u{1F631}\\u{1F60C}\\u{1F338}\\u{1F64C}\\u{1F60B}\\u{1F497}\\u{1F49A}\\u{1F60F}\\u{1F49B}\\u{1F642}\\u{1F493}\\u{1F929}\\u{1F604}\\u{1F600}\\u{1F5A4}\\u{1F603}\\u{1F4AF}\\u{1F648}\\u{1F447}\\u{1F3B6}\\u{1F612}\\u{1F92D}\\u2763\\u{1F61C}\\u{1F48B}\\u{1F440}\\u{1F62A}\\u{1F611}\\u{1F4A5}\\u{1F64B}\\u{1F61E}\\u{1F629}\\u{1F621}\\u{1F92A}\\u{1F44A}\\u{1F973}\\u{1F625}\\u{1F924}\\u{1F449}\\u{1F483}\\u{1F633}\\u270B\\u{1F61A}\\u{1F61D}\\u{1F634}\\u{1F31F}\\u{1F62C}\\u{1F643}\\u{1F340}\\u{1F337}\\u{1F63B}\\u{1F613}\\u2B50\\u2705\\u{1F97A}\\u{1F308}\\u{1F608}\\u{1F918}\\u{1F4A6}\\u2714\\u{1F623}\\u{1F3C3}\\u{1F490}\\u2639\\u{1F38A}\\u{1F498}\\u{1F620}\\u261D\\u{1F615}\\u{1F33A}\\u{1F382}\\u{1F33B}\\u{1F610}\\u{1F595}\\u{1F49D}\\u{1F64A}\\u{1F639}\\u{1F5E3}\\u{1F4AB}\\u{1F480}\\u{1F451}\\u{1F3B5}\\u{1F91E}\\u{1F61B}\\u{1F534}\\u{1F624}\\u{1F33C}\\u{1F62B}\\u26BD\\u{1F919}\\u2615\\u{1F3C6}\\u{1F92B}\\u{1F448}\\u{1F62E}\\u{1F646}\\u{1F37B}\\u{1F343}\\u{1F436}\\u{1F481}\\u{1F632}\\u{1F33F}\\u{1F9E1}\\u{1F381}\\u26A1\\u{1F31E}\\u{1F388}\\u274C\\u270A\\u{1F44B}\\u{1F630}\\u{1F928}\\u{1F636}\\u{1F91D}\\u{1F6B6}\\u{1F4B0}\\u{1F353}\\u{1F4A2}\\u{1F91F}\\u{1F641}\\u{1F6A8}\\u{1F4A8}\\u{1F92C}\\u2708\\u{1F380}\\u{1F37A}\\u{1F913}\\u{1F619}\\u{1F49F}\\u{1F331}\\u{1F616}\\u{1F476}\\u{1F974}\\u25B6\\u27A1\\u2753\\u{1F48E}\\u{1F4B8}\\u2B07\\u{1F628}\\u{1F31A}\\u{1F98B}\\u{1F637}\\u{1F57A}\\u26A0\\u{1F645}\\u{1F61F}\\u{1F635}\\u{1F44E}\\u{1F932}\\u{1F920}\\u{1F927}\\u{1F4CC}\\u{1F535}\\u{1F485}\\u{1F9D0}\\u{1F43E}\\u{1F352}\\u{1F617}\\u{1F911}\\u{1F30A}\\u{1F92F}\\u{1F437}\\u260E\\u{1F4A7}\\u{1F62F}\\u{1F486}\\u{1F446}\\u{1F3A4}\\u{1F647}\\u{1F351}\\u2744\\u{1F334}\\u{1F4A3}\\u{1F438}\\u{1F48C}\\u{1F4CD}\\u{1F940}\\u{1F922}\\u{1F445}\\u{1F4A1}\\u{1F4A9}\\u{1F450}\\u{1F4F8}\\u{1F47B}\\u{1F910}\\u{1F92E}\\u{1F3BC}\\u{1F975}\\u{1F6A9}\\u{1F34E}\\u{1F34A}\\u{1F47C}\\u{1F48D}\\u{1F4E3}\\u{1F942}\"),mr=At.reduce((o,e,t)=>(o[t]=e,o),[]),br=At.reduce((o,e,t)=>(o[e.codePointAt(0)]=t,o),[]);function fr(o){return o.reduce((e,t)=>(e+=mr[t],e),\"\")}function _r(o){const e=[];for(const t of o){const s=br[t.codePointAt(0)];if(s===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(s)}return new Uint8Array(e)}const Er=re({prefix:\"\\u{1F680}\",name:\"base256emoji\",encode:fr,decode:_r});var vr=Object.freeze({__proto__:null,base256emoji:Er}),wr=zt,Nt=128,Ir=127,Tr=~Ir,Cr=Math.pow(2,31);function zt(o,e,t){e=e||[],t=t||0;for(var s=t;o>=Cr;)e[t++]=o&255|Nt,o/=128;for(;o&Tr;)e[t++]=o&255|Nt,o>>>=7;return e[t]=o|0,zt.bytes=t-s+1,e}var Pr=_e,Sr=128,Lt=127;function _e(o,s){var t=0,s=s||0,i=0,r=s,n,a=o.length;do{if(r>=a)throw _e.bytes=0,new RangeError(\"Could not decode varint\");n=o[r++],t+=i<28?(n&Lt)<=Sr);return _e.bytes=r-s,t}var Rr=Math.pow(2,7),xr=Math.pow(2,14),Or=Math.pow(2,21),Ar=Math.pow(2,28),Nr=Math.pow(2,35),zr=Math.pow(2,42),Lr=Math.pow(2,49),$r=Math.pow(2,56),kr=Math.pow(2,63),Mr=function(o){return o($t.encode(o,e,t),e),Mt=o=>$t.encodingLength(o),Ee=(o,e)=>{const t=e.byteLength,s=Mt(o),i=s+Mt(t),r=new Uint8Array(i+t);return kt(o,r,0),kt(t,r,s),r.set(e,i),new Fr(o,t,e,r)};class Fr{constructor(e,t,s,i){this.code=e,this.size=t,this.digest=s,this.bytes=i}}const Ut=({name:o,code:e,encode:t})=>new Kr(o,e,t);class Kr{constructor(e,t,s){this.name=e,this.code=t,this.encode=s}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Ee(this.code,t):t.then(s=>Ee(this.code,s))}else throw Error(\"Unknown type, must be binary type\")}}const Ft=o=>async e=>new Uint8Array(await crypto.subtle.digest(o,e)),Br=Ut({name:\"sha2-256\",code:18,encode:Ft(\"SHA-256\")}),Vr=Ut({name:\"sha2-512\",code:19,encode:Ft(\"SHA-512\")});var jr=Object.freeze({__proto__:null,sha256:Br,sha512:Vr});const Kt=0,qr=\"identity\",Bt=xt,Gr=o=>Ee(Kt,Bt(o)),Hr={code:Kt,name:qr,encode:Bt,digest:Gr};var Yr=Object.freeze({__proto__:null,identity:Hr});new TextEncoder,new TextDecoder;const Vt={...Fs,...Bs,...js,...Gs,...Js,...nr,...hr,...ur,...Dr,...vr};({...jr,...Yr});function Jr(o=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(o):new Uint8Array(o)}function jt(o,e,t,s){return{name:o,prefix:e,encoder:{name:o,prefix:e,encode:t},decoder:{decode:s}}}const qt=jt(\"utf8\",\"u\",o=>\"u\"+new TextDecoder(\"utf8\").decode(o),o=>new TextEncoder().encode(o.substring(1))),ve=jt(\"ascii\",\"a\",o=>{let e=\"a\";for(let t=0;t{o=o.substring(1);const e=Jr(o.length);for(let t=0;t{if(!this.initialized){const s=await this.getKeyChain();typeof s<\"u\"&&(this.keychain=s),this.initialized=!0}},this.has=s=>(this.isInitialized(),this.keychain.has(s)),this.set=async(s,i)=>{this.isInitialized(),this.keychain.set(s,i),await this.persist()},this.get=s=>{this.isInitialized();const i=this.keychain.get(s);if(typeof i>\"u\"){const{message:r}=d(\"NO_MATCHING_KEY\",`${this.name}: ${s}`);throw new Error(r)}return i},this.del=async s=>{this.isInitialized(),this.keychain.delete(s),await this.persist()},this.core=e,this.logger=E(t,this.name)}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Re(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?xe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Ht{constructor(e,t,s){this.core=e,this.logger=t,this.name=Xe,this.randomSessionIdentifier=ce(),this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),r=te.generateKeyPair(i);return te.encodeIss(r.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=$i();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const r=await this.getClientSeed(),n=te.generateKeyPair(r),a=this.randomSessionIdentifier,h=We;return await te.signJWT(a,i,h,n)},this.generateSharedKey=(i,r,n)=>{this.isInitialized();const a=this.getPrivateKey(i),h=ki(a,r);return this.setSymKey(h,n)},this.setSymKey=async(i,r)=>{this.isInitialized();const n=r||Mi(i);return await this.keychain.set(n,i),n},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,r,n)=>{this.isInitialized();const a=Ui(n),h=Li(r);if(Oe(a))return Fi(h,n?.encoding);if(Ae(a)){const D=a.senderPublicKey,m=a.receiverPublicKey;i=await this.generateSharedKey(D,m)}const c=this.getSymKey(i),{type:l,senderPublicKey:p}=a;return Ki({type:l,symKey:c,message:h,senderPublicKey:p,encoding:n?.encoding})},this.decode=async(i,r,n)=>{this.isInitialized();const a=Bi(r,n);if(Oe(a)){const h=Vi(r,n?.encoding);return Pe(h)}if(Ae(a)){const h=a.receiverPublicKey,c=a.senderPublicKey;i=await this.generateSharedKey(h,c)}try{const h=this.getSymKey(i),c=ji({symKey:h,encoded:r,encoding:n?.encoding});return Pe(c)}catch(h){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(h)}},this.getPayloadType=(i,r=ze)=>{const n=Ne({encoded:i,encoding:r});return qi(n.type)},this.getPayloadSenderPublicKey=(i,r=ze)=>{const n=Ne({encoded:i,encoding:r});return n.senderPublicKey?ls(n.senderPublicKey,Gi):void 0},this.core=e,this.logger=E(t,this.name),this.keychain=s||new Gt(this.core,this.logger)}get context(){return C(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\"\";try{e=this.keychain.get(me)}catch{e=ce(),await this.keychain.set(me,e)}return Wr(e,\"base16\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Yt extends vi{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=et,this.version=tt,this.initialized=!1,this.storagePrefix=x,this.init=async()=>{if(!this.initialized){this.logger.trace(\"Initialized\");try{const s=await this.getRelayerMessages();typeof s<\"u\"&&(this.messages=s),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",size:this.messages.size})}catch(s){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(s)}finally{this.initialized=!0}}},this.set=async(s,i)=>{this.isInitialized();const r=le(i);let n=this.messages.get(s);return typeof n>\"u\"&&(n={}),typeof n[r]<\"u\"||(n[r]=i,this.messages.set(s,n),await this.persist()),r},this.get=s=>{this.isInitialized();let i=this.messages.get(s);return typeof i>\"u\"&&(i={}),i},this.has=(s,i)=>{this.isInitialized();const r=this.get(s),n=le(i);return typeof r[n]<\"u\"},this.del=async s=>{this.isInitialized(),this.messages.delete(s),await this.persist()},this.logger=E(e,this.name),this.core=t}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Re(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<\"u\"?xe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class Zr extends wi{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new U,this.name=st,this.queue=new Map,this.publishTimeout=w(ae),this.failedPublishTimeout=w(q),this.needsTransportRestart=!1,this.publish=async(s,i,r)=>{var n;this.logger.debug(\"Publishing Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{topic:s,message:i,opts:r}});const a=r?.ttl||it,h=ue(r),c=r?.prompt||!1,l=r?.tag||0,p=r?.id||Be().toString(),D={topic:s,message:i,opts:{ttl:a,relay:h,prompt:c,tag:l,id:p,attestation:r?.attestation}},m=`Failed to publish payload, please try again. id:${p} tag:${l}`,u=Date.now();let g,_=1;try{for(;g===void 0;){if(Date.now()-u>this.publishTimeout)throw new Error(m);this.logger.trace({id:p,attempts:_},`publisher.publish - attempt ${_}`),g=await await K(this.rpcPublish(s,i,a,h,c,l,p,r?.attestation).catch(y=>this.logger.warn(y)),this.publishTimeout,m),_++,g||await new Promise(y=>setTimeout(y,this.failedPublishTimeout))}this.relayer.events.emit(v.publish,D),this.logger.debug(\"Successfully Published Payload\"),this.logger.trace({type:\"method\",method:\"publish\",params:{id:p,topic:s,message:i,opts:r}})}catch(y){if(this.logger.debug(\"Failed to Publish Payload\"),this.logger.error(y),(n=r?.internal)!=null&&n.throwOnFailedPublish)throw y;this.queue.set(p,D)}},this.on=(s,i)=>{this.events.on(s,i)},this.once=(s,i)=>{this.events.once(s,i)},this.off=(s,i)=>{this.events.off(s,i)},this.removeListener=(s,i)=>{this.events.removeListener(s,i)},this.relayer=e,this.logger=E(t,this.name),this.registerEventListeners()}get context(){return C(this.logger)}rpcPublish(e,t,s,i,r,n,a,h){var c,l,p,D;const m={method:G(i.protocol).publish,params:{topic:e,message:t,ttl:s,prompt:r,tag:n,attestation:h},id:a};return de((c=m.params)==null?void 0:c.prompt)&&((l=m.params)==null||delete l.prompt),de((p=m.params)==null?void 0:p.tag)&&((D=m.params)==null||delete D.tag),this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"message\",direction:\"outgoing\",request:m}),this.relayer.request(m)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:s,opts:i}=e;await this.publish(t,s,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(j.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(v.connection_stalled);return}this.checkQueue()}),this.relayer.on(v.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Qr{constructor(){this.map=new Map,this.set=(e,t)=>{const s=this.get(e);this.exists(e,t)||this.map.set(e,[...s,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>\"u\"){this.map.delete(e);return}if(!this.map.has(e))return;const s=this.get(e);if(!this.exists(e,t))return;const i=s.filter(r=>r!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var en=Object.defineProperty,tn=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,Xt=(o,e,t)=>e in o?en(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,W=(o,e)=>{for(var t in e||(e={}))rn.call(e,t)&&Xt(o,t,e[t]);if(Jt)for(var t of Jt(e))nn.call(e,t)&&Xt(o,t,e[t]);return o},we=(o,e)=>tn(o,sn(e));class Wt extends Ii{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Qr,this.events=new U,this.name=ut,this.version=dt,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel=\"pending_sub_watch_label\",this.pollingInterval=20,this.storagePrefix=x,this.subscribeTimeout=w(ae),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId(),await this.restore()),this.initialized=!0},this.subscribe=async(s,i)=>{this.isInitialized(),this.logger.debug(\"Subscribing Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:s,opts:i}});try{const r=ue(i),n={topic:s,relay:r,transportType:i?.transportType};this.pending.set(s,n);const a=await this.rpcSubscribe(s,r,i);return typeof a==\"string\"&&(this.onSubscribe(a,n),this.logger.debug(\"Successfully Subscribed Topic\"),this.logger.trace({type:\"method\",method:\"subscribe\",params:{topic:s,opts:i}})),a}catch(r){throw this.logger.debug(\"Failed to Subscribe Topic\"),this.logger.error(r),r}},this.unsubscribe=async(s,i)=>{await this.restartToComplete(),this.isInitialized(),typeof i?.id<\"u\"?await this.unsubscribeById(s,i.id,i):await this.unsubscribeByTopic(s,i)},this.isSubscribed=async s=>{if(this.topics.includes(s))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${s}`;return await new Promise((r,n)=>{const a=new zi;a.start(i);const h=setInterval(()=>{!this.pending.has(s)&&this.topics.includes(s)&&(clearInterval(h),a.stop(i),r(!0)),a.elapsed(i)>=pt&&(clearInterval(h),a.stop(i),n(new Error(\"Subscription resolution timeout\")))},this.pollingInterval)}).catch(()=>!1)},this.on=(s,i)=>{this.events.on(s,i)},this.once=(s,i)=>{this.events.once(s,i)},this.off=(s,i)=>{this.events.off(s,i)},this.removeListener=(s,i)=>{this.events.removeListener(s,i)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=E(t,this.name),this.clientId=\"\"}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\"//\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let s=!1;try{s=this.getSubscription(e).topic===t}catch{}return s}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const s=this.topicMap.get(e);await Promise.all(s.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,s){this.logger.debug(\"Unsubscribing Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:s}});try{const i=ue(s);await this.rpcUnsubscribe(e,t,i);const r=H(\"USER_DISCONNECTED\",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,r),this.logger.debug(\"Successfully Unsubscribed Topic\"),this.logger.trace({type:\"method\",method:\"unsubscribe\",params:{topic:e,id:t,opts:s}})}catch(i){throw this.logger.debug(\"Failed to Unsubscribe Topic\"),this.logger.error(i),i}}async rpcSubscribe(e,t,s){var i;s?.transportType===M.relay&&await this.restartToComplete();const r={method:G(t.protocol).subscribe,params:{topic:e}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:r});const n=(i=s?.internal)==null?void 0:i.throwOnFailedPublish;try{const a=le(e+this.clientId);if(s?.transportType===M.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(r).catch(c=>this.logger.warn(c))},w(q)),a;const h=await K(this.relayer.request(r).catch(c=>this.logger.warn(c)),this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!h&&n)throw new Error(`Subscribing to ${e} failed, please try again`);return h?a:null}catch(a){if(this.logger.debug(\"Outgoing Relay Subscribe Payload stalled\"),this.relayer.events.emit(v.connection_stalled),n)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,s={method:G(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:s});try{return await await K(this.relayer.request(s).catch(i=>this.logger.warn(i)),this.subscribeTimeout)}catch{this.relayer.events.emit(v.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t=e[0].relay,s={method:G(t.protocol).batchFetchMessages,params:{topics:e.map(r=>r.topic)}};this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:s});let i;try{i=await await K(this.relayer.request(s).catch(r=>this.logger.warn(r)),this.subscribeTimeout)}catch{this.relayer.events.emit(v.connection_stalled)}return i}rpcUnsubscribe(e,t,s){const i={method:G(s.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug(\"Outgoing Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"outgoing\",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,we(W({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,W({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,s){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,s),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug(\"Setting subscription\"),this.logger.trace({type:\"method\",method:\"setSubscription\",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,W({},t)),this.topicMap.set(t.topic,e),this.events.emit(O.created,t)}getSubscription(e){this.logger.debug(\"Getting subscription\"),this.logger.trace({type:\"method\",method:\"getSubscription\",id:e});const t=this.subscriptions.get(e);if(!t){const{message:s}=d(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(s)}return t}deleteSubscription(e,t){this.logger.debug(\"Deleting subscription\"),this.logger.trace({type:\"method\",method:\"deleteSubscription\",id:e,reason:t});const s=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(s.topic,e),this.events.emit(O.deleted,we(W({},s),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(O.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t\"u\"||!e.length)return;if(this.subscriptions.size){const{message:t}=d(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);Hi(t)&&this.onBatchSubscribe(t.map((s,i)=>we(W({},e[i]),{id:s})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(j.pulse,async()=>{await this.checkPending()}),this.events.on(O.created,async e=>{const t=O.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()}),this.events.on(O.deleted,async e=>{const t=O.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async restartToComplete(){!this.relayer.connected&&!this.relayer.connecting&&await this.relayer.transportOpen(),this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var on=Object.defineProperty,Zt=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,Qt=(o,e,t)=>e in o?on(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ei=(o,e)=>{for(var t in e||(e={}))an.call(e,t)&&Qt(o,t,e[t]);if(Zt)for(var t of Zt(e))hn.call(e,t)&&Qt(o,t,e[t]);return o};class ti extends Ti{constructor(e){super(e),this.protocol=\"wc\",this.version=2,this.events=new U,this.name=ot,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=[\"socket hang up\",\"stalled\",\"interrupted\"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=w(oe+q),this.request=async t=>{var s,i;this.logger.debug(\"Publishing Request Payload\");const r=t.id||Be().toString();await this.toEstablishConnection();try{const n=this.provider.request(t);this.requestsInFlight.set(r,{promise:n,request:t}),this.logger.trace({id:r,method:t.method,topic:(s=t.params)==null?void 0:s.topic},\"relayer.request - attempt to publish...\");const a=await new Promise(async(h,c)=>{const l=()=>{c(new Error(`relayer.request - publish interrupted, id: ${r}`))};this.provider.on(I.disconnect,l);const p=await n;this.provider.off(I.disconnect,l),h(p)});return this.logger.trace({id:r,method:t.method,topic:(i=t.params)==null?void 0:i.topic},\"relayer.request - published\"),a}catch(n){throw this.logger.debug(`Failed to Publish Request: ${r}`),n}finally{this.requestsInFlight.delete(r)}},this.resetPingTimeout=()=>{if(Le())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,s,i;(i=(s=(t=this.provider)==null?void 0:t.connection)==null?void 0:s.socket)==null||i.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace(\"relayer connected\"),this.startPingTimeout(),this.events.emit(v.connect)},this.onDisconnectHandler=()=>{this.logger.trace(\"relayer disconnected\"),this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(v.error,t),this.logger.info(\"Fatal socket error received, closing transport\"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(I.payload,this.onPayloadHandler),this.provider.on(I.connect,this.onConnectHandler),this.provider.on(I.disconnect,this.onDisconnectHandler),this.provider.on(I.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<\"u\"&&typeof e.logger!=\"string\"?E(e.logger,this.name):_i(Ie({level:e.logger||nt})),this.messages=new Yt(this.logger,e.core),this.subscriber=new Wt(this,this.logger),this.publisher=new Zr(this,this.logger),this.relayUrl=e?.relayUrl||be,this.projectId=e.projectId,this.bundleId=Yi(),this.provider={}}async init(){if(this.logger.trace(\"Initialized\"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.cached.length>0)try{await this.transportOpen()}catch(e){this.logger.warn(e)}}get context(){return C(this.logger)}get connected(){var e,t,s;return((s=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:s.readyState)===1}get connecting(){var e,t,s;return((s=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:s.readyState)===0}async publish(e,t,s){this.isInitialized(),await this.publisher.publish(e,t,s),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:M.relay})}async subscribe(e,t){var s,i,r;this.isInitialized(),t?.transportType===\"relay\"&&await this.toEstablishConnection();const n=typeof((s=t?.internal)==null?void 0:s.throwOnFailedPublish)>\"u\"?!0:(i=t?.internal)==null?void 0:i.throwOnFailedPublish;let a=((r=this.subscriber.topicMap.get(e))==null?void 0:r[0])||\"\",h;const c=l=>{l.topic===e&&(this.subscriber.off(O.created,c),h())};return await Promise.all([new Promise(l=>{h=l,this.subscriber.on(O.created,c)}),new Promise(async(l,p)=>{a=await this.subscriber.subscribe(e,ei({internal:{throwOnFailedPublish:n}},t)).catch(D=>{n&&p(D)})||a,l()})]),a}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await K(this.provider.disconnect(),2e3,\"provider.disconnect()\").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,s)=>{const i=()=>{this.provider.off(I.disconnect,i),s(new Error(\"Connection interrupted while trying to subscribe\"))};this.provider.on(I.disconnect,i),await K(this.provider.connect(),w(ae),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(r=>{s(r)}).finally(()=>{clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0}),this.subscriber.start().catch(r=>{this.logger.error(r),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const s=t;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(s.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await $e())throw new Error(\"No internet connection detected. Please restart your network and try again.\")}async handleBatchMessageEvents(e){if(e?.length===0){this.logger.trace(\"Batch message events is empty. Ignoring...\");return}const t=e.sort((s,i)=>s.publishedAt-i.publishedAt);this.logger.trace(`Batch of ${t.length} message events sorted`);for(const s of t)try{await this.onMessageEvent(s)}catch(i){this.logger.warn(i)}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(e,t){const{topic:s}=e;if(!t.sessionExists){const i=Y(he),r={topic:s,expiry:i,relay:{protocol:\"irn\"},active:!1};await this.core.pairing.pairings.set(s,r)}this.events.emit(v.message,e),await this.recordMessageEvent(e)}startPingTimeout(){var e,t,s,i,r;if(Le())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((r=(i=(s=this.provider)==null?void 0:s.connection)==null?void 0:i.socket)==null||r.once(\"ping\",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(n){this.logger.warn(n)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new us(new gs(Ji({sdkVersion:se,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:s}=e;await this.messages.set(t,s)}async shouldIgnoreMessageEvent(e){const{topic:t,message:s}=e;if(!s||s.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${s}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,s);return i&&this.logger.debug(`Ignoring duplicate message: ${s}`),i}async onProviderPayload(e){if(this.logger.debug(\"Incoming Relay Payload\"),this.logger.trace({type:\"payload\",direction:\"incoming\",payload:e}),Ve(e)){if(!e.method.endsWith(at))return;const t=e.params,{topic:s,message:i,publishedAt:r,attestation:n}=t.data,a={topic:s,message:i,publishedAt:r,transportType:M.relay,attestation:n};this.logger.debug(\"Emitting Relayer Payload\"),this.logger.trace(ei({type:\"event\",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else je(e)&&this.events.emit(v.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(v.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=qe(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(I.payload,this.onPayloadHandler),this.provider.off(I.connect,this.onConnectHandler),this.provider.off(I.disconnect,this.onDisconnectHandler),this.provider.off(I.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await $e();Xi(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(s=>this.logger.error(s)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(v.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&(this.reconnectTimeout||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},w(ht))))}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var cn=Object.defineProperty,ii=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,si=(o,e,t)=>e in o?cn(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,ri=(o,e)=>{for(var t in e||(e={}))ln.call(e,t)&&si(o,t,e[t]);if(ii)for(var t of ii(e))un.call(e,t)&&si(o,t,e[t]);return o};class ni extends Ci{constructor(e,t,s,i=x,r=void 0){super(e,t,s,i),this.core=e,this.logger=t,this.name=s,this.map=new Map,this.version=ct,this.cached=[],this.initialized=!1,this.storagePrefix=x,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(n=>{this.getKey&&n!==null&&!de(n)?this.map.set(this.getKey(n),n):Wi(n)?this.map.set(n.id,n):Zi(n)&&this.map.set(n.topic,n)}),this.cached=[],this.initialized=!0)},this.set=async(n,a)=>{this.isInitialized(),this.map.has(n)?await this.update(n,a):(this.logger.debug(\"Setting value\"),this.logger.trace({type:\"method\",method:\"set\",key:n,value:a}),this.map.set(n,a),await this.persist())},this.get=n=>(this.isInitialized(),this.logger.debug(\"Getting value\"),this.logger.trace({type:\"method\",method:\"get\",key:n}),this.getData(n)),this.getAll=n=>(this.isInitialized(),n?this.values.filter(a=>Object.keys(n).every(h=>ys(a[h],n[h]))):this.values),this.update=async(n,a)=>{this.isInitialized(),this.logger.debug(\"Updating value\"),this.logger.trace({type:\"method\",method:\"update\",key:n,update:a});const h=ri(ri({},this.getData(n)),a);this.map.set(n,h),await this.persist()},this.delete=async(n,a)=>{this.isInitialized(),this.map.has(n)&&(this.logger.debug(\"Deleting value\"),this.logger.trace({type:\"method\",method:\"delete\",key:n,reason:a}),this.map.delete(n),this.addToRecentlyDeleted(n),await this.persist())},this.logger=E(t,this.name),this.storagePrefix=i,this.getKey=r}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:i}=d(\"MISSING_OR_INVALID\",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:s}=d(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>\"u\"||!e.length)return;if(this.map.size){const{message:t}=d(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class oi{constructor(e,t){this.core=e,this.logger=t,this.name=gt,this.version=yt,this.events=new mi,this.initialized=!1,this.storagePrefix=x,this.ignoredPayloadTypes=[Qi],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\"Initialized\"))},this.register=({methods:s})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...s])]},this.create=async s=>{this.isInitialized();const i=ce(),r=await this.core.crypto.setSymKey(i),n=Y(he),a={protocol:rt},h={topic:r,expiry:n,relay:a,active:!1,methods:s?.methods},c=ke({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:i,relay:a,expiryTimestamp:n,methods:s?.methods});return this.events.emit(V.create,h),this.core.expirer.set(r,n),await this.pairings.set(r,h),await this.core.relayer.subscribe(r,{transportType:s?.transportType}),{topic:r,uri:c}},this.pair=async s=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:s?.uri,trace:[z.pairing_started]}});this.isValidPair(s,i);const{topic:r,symKey:n,relay:a,expiryTimestamp:h,methods:c}=Me(s.uri);i.props.properties.topic=r,i.addTrace(z.pairing_uri_validation_success),i.addTrace(z.pairing_uri_not_expired);let l;if(this.pairings.keys.includes(r)){if(l=this.pairings.get(r),i.addTrace(z.existing_pairing),l.active)throw i.setError($.active_pairing_already_exists),new Error(`Pairing already exists: ${r}. Please try again with a new connection URI.`);i.addTrace(z.pairing_not_expired)}const p=h||Y(he),D={topic:r,relay:a,expiry:p,active:!1,methods:c};this.core.expirer.set(r,p),await this.pairings.set(r,D),i.addTrace(z.store_new_pairing),s.activatePairing&&await this.activate({topic:r}),this.events.emit(V.create,D),i.addTrace(z.emit_inactive_pairing),this.core.crypto.keychain.has(r)||await this.core.crypto.setSymKey(n,r),i.addTrace(z.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError($.no_internet_connection)}try{await this.core.relayer.subscribe(r,{relay:a})}catch(m){throw i.setError($.subscribe_pairing_topic_failure),m}return i.addTrace(z.subscribe_pairing_topic_success),D},this.activate=async({topic:s})=>{this.isInitialized();const i=Y(ee);this.core.expirer.set(s,i),await this.pairings.update(s,{active:!0,expiry:i})},this.ping=async s=>{this.isInitialized(),await this.isValidPing(s);const{topic:i}=s;if(this.pairings.keys.includes(i)){const r=await this.sendRequest(i,\"wc_pairingPing\",{}),{done:n,resolve:a,reject:h}=es();this.events.once(pe(\"pairing_ping\",r),({error:c})=>{c?h(c):a()}),await n()}},this.updateExpiry=async({topic:s,expiry:i})=>{this.isInitialized(),await this.pairings.update(s,{expiry:i})},this.updateMetadata=async({topic:s,metadata:i})=>{this.isInitialized(),await this.pairings.update(s,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async s=>{this.isInitialized(),await this.isValidDisconnect(s);const{topic:i}=s;this.pairings.keys.includes(i)&&(await this.sendRequest(i,\"wc_pairingDelete\",H(\"USER_DISCONNECTED\")),await this.deletePairing(i))},this.formatUriFromPairing=s=>{this.isInitialized();const{topic:i,relay:r,expiry:n,methods:a}=s,h=this.core.crypto.keychain.get(i);return ke({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:h,relay:r,expiryTimestamp:n,methods:a})},this.sendRequest=async(s,i,r)=>{const n=Ge(i,r),a=await this.core.crypto.encode(s,n),h=B[i].req;return this.core.history.set(s,n),this.core.relayer.publish(s,a,h),n.id},this.sendResult=async(s,i,r)=>{const n=qe(s,r),a=await this.core.crypto.encode(i,n),h=await this.core.history.get(i,s),c=B[h.request.method].res;await this.core.relayer.publish(i,a,c),await this.core.history.resolve(n)},this.sendError=async(s,i,r)=>{const n=ds(s,r),a=await this.core.crypto.encode(i,n),h=await this.core.history.get(i,s),c=B[h.request.method]?B[h.request.method].res:B.unregistered_method.res;await this.core.relayer.publish(i,a,c),await this.core.history.resolve(n)},this.deletePairing=async(s,i)=>{await this.core.relayer.unsubscribe(s),await Promise.all([this.pairings.delete(s,H(\"USER_DISCONNECTED\")),this.core.crypto.deleteSymKey(s),i?Promise.resolve():this.core.expirer.del(s)])},this.cleanup=async()=>{const s=this.pairings.getAll().filter(i=>Ue(i.expiry));await Promise.all(s.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=s=>{const{topic:i,payload:r}=s;switch(r.method){case\"wc_pairingPing\":return this.onPairingPingRequest(i,r);case\"wc_pairingDelete\":return this.onPairingDeleteRequest(i,r);default:return this.onUnknownRpcMethodRequest(i,r)}},this.onRelayEventResponse=async s=>{const{topic:i,payload:r}=s,n=(await this.core.history.get(i,r.id)).request.method;switch(n){case\"wc_pairingPing\":return this.onPairingPingResponse(i,r);default:return this.onUnknownRpcMethodResponse(n)}},this.onPairingPingRequest=async(s,i)=>{const{id:r}=i;try{this.isValidPing({topic:s}),await this.sendResult(r,s,!0),this.events.emit(V.ping,{id:r,topic:s})}catch(n){await this.sendError(r,s,n),this.logger.error(n)}},this.onPairingPingResponse=(s,i)=>{const{id:r}=i;setTimeout(()=>{ps(i)?this.events.emit(pe(\"pairing_ping\",r),{}):He(i)&&this.events.emit(pe(\"pairing_ping\",r),{error:i.error})},500)},this.onPairingDeleteRequest=async(s,i)=>{const{id:r}=i;try{this.isValidDisconnect({topic:s}),await this.deletePairing(s),this.events.emit(V.delete,{id:r,topic:s})}catch(n){await this.sendError(r,s,n),this.logger.error(n)}},this.onUnknownRpcMethodRequest=async(s,i)=>{const{id:r,method:n}=i;try{if(this.registeredMethods.includes(n))return;const a=H(\"WC_METHOD_UNSUPPORTED\",n);await this.sendError(r,s,a),this.logger.error(a)}catch(a){await this.sendError(r,s,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=s=>{this.registeredMethods.includes(s)||this.logger.error(H(\"WC_METHOD_UNSUPPORTED\",s))},this.isValidPair=(s,i)=>{var r;if(!ge(s)){const{message:a}=d(\"MISSING_OR_INVALID\",`pair() params: ${s}`);throw i.setError($.malformed_pairing_uri),new Error(a)}if(!ts(s.uri)){const{message:a}=d(\"MISSING_OR_INVALID\",`pair() uri: ${s.uri}`);throw i.setError($.malformed_pairing_uri),new Error(a)}const n=Me(s?.uri);if(!((r=n?.relay)!=null&&r.protocol)){const{message:a}=d(\"MISSING_OR_INVALID\",\"pair() uri#relay-protocol\");throw i.setError($.malformed_pairing_uri),new Error(a)}if(!(n!=null&&n.symKey)){const{message:a}=d(\"MISSING_OR_INVALID\",\"pair() uri#symKey\");throw i.setError($.malformed_pairing_uri),new Error(a)}if(n!=null&&n.expiryTimestamp&&w(n?.expiryTimestamp){if(!ge(s)){const{message:r}=d(\"MISSING_OR_INVALID\",`ping() params: ${s}`);throw new Error(r)}const{topic:i}=s;await this.isValidPairingTopic(i)},this.isValidDisconnect=async s=>{if(!ge(s)){const{message:r}=d(\"MISSING_OR_INVALID\",`disconnect() params: ${s}`);throw new Error(r)}const{topic:i}=s;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async s=>{if(!is(s,!1)){const{message:i}=d(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${s}`);throw new Error(i)}if(!this.pairings.keys.includes(s)){const{message:i}=d(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${s}`);throw new Error(i)}if(Ue(this.pairings.get(s).expiry)){await this.deletePairing(s);const{message:i}=d(\"EXPIRED\",`pairing topic: ${s}`);throw new Error(i)}},this.core=e,this.logger=E(t,this.name),this.pairings=new ni(this.core,this.logger,this.name,this.storagePrefix)}get context(){return C(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(v.message,async e=>{const{topic:t,message:s,transportType:i}=e;if(!this.pairings.keys.includes(t)||i===M.link_mode||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(s)))return;const r=await this.core.crypto.decode(t,s);try{Ve(r)?(this.core.history.set(t,r),this.onRelayEventRequest({topic:t,payload:r})):je(r)&&(await this.core.history.resolve(r),await this.onRelayEventResponse({topic:t,payload:r}),this.core.history.delete(t,r.id))}catch(n){this.logger.error(n)}})}registerExpirerEvents(){this.core.expirer.on(S.expired,async e=>{const{topic:t}=ss(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(V.expire,{topic:t}))})}}class ai extends Pi{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new U,this.name=Dt,this.version=mt,this.cached=[],this.initialized=!1,this.storagePrefix=x,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(s=>this.records.set(s.id,s)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(s,i,r)=>{if(this.isInitialized(),this.logger.debug(\"Setting JSON-RPC request history record\"),this.logger.trace({type:\"method\",method:\"set\",topic:s,request:i,chainId:r}),this.records.has(i.id))return;const n={id:i.id,topic:s,request:{method:i.method,params:i.params||null},chainId:r,expiry:Y(ee)};this.records.set(n.id,n),this.persist(),this.events.emit(P.created,n)},this.resolve=async s=>{if(this.isInitialized(),this.logger.debug(\"Updating JSON-RPC response history record\"),this.logger.trace({type:\"method\",method:\"update\",response:s}),!this.records.has(s.id))return;const i=await this.getRecord(s.id);typeof i.response>\"u\"&&(i.response=He(s)?{error:s.error}:{result:s.result},this.records.set(i.id,i),this.persist(),this.events.emit(P.updated,i))},this.get=async(s,i)=>(this.isInitialized(),this.logger.debug(\"Getting record\"),this.logger.trace({type:\"method\",method:\"get\",topic:s,id:i}),await this.getRecord(i)),this.delete=(s,i)=>{this.isInitialized(),this.logger.debug(\"Deleting record\"),this.logger.trace({type:\"method\",method:\"delete\",id:i}),this.values.forEach(r=>{if(r.topic===s){if(typeof i<\"u\"&&r.id!==i)return;this.records.delete(r.id),this.events.emit(P.deleted,r)}}),this.persist()},this.exists=async(s,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===s:!1),this.on=(s,i)=>{this.events.on(s,i)},this.once=(s,i)=>{this.events.once(s,i)},this.off=(s,i)=>{this.events.off(s,i)},this.removeListener=(s,i)=>{this.events.removeListener(s,i)},this.logger=E(t,this.name)}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<\"u\")return;const s={topic:t.topic,request:Ge(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(s)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:s}=d(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw new Error(s)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(P.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>\"u\"||!e.length)return;if(this.records.size){const{message:t}=d(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(P.created,e=>{const t=P.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.events.on(P.updated,e=>{const t=P.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.events.on(P.deleted,e=>{const t=P.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,record:e})}),this.core.heartbeat.on(j.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{w(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(P.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class hi extends Si{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new U,this.name=bt,this.version=ft,this.cached=[],this.initialized=!1,this.storagePrefix=x,this.init=async()=>{this.initialized||(this.logger.trace(\"Initialized\"),await this.restore(),this.cached.forEach(s=>this.expirations.set(s.target,s)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=s=>{try{const i=this.formatTarget(s);return typeof this.getExpiration(i)<\"u\"}catch{return!1}},this.set=(s,i)=>{this.isInitialized();const r=this.formatTarget(s),n={target:r,expiry:i};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(S.created,{target:r,expiration:n})},this.get=s=>{this.isInitialized();const i=this.formatTarget(s);return this.getExpiration(i)},this.del=s=>{if(this.isInitialized(),this.has(s)){const i=this.formatTarget(s),r=this.getExpiration(i);this.expirations.delete(i),this.events.emit(S.deleted,{target:i,expiration:r})}},this.on=(s,i)=>{this.events.on(s,i)},this.once=(s,i)=>{this.events.once(s,i)},this.off=(s,i)=>{this.events.off(s,i)},this.removeListener=(s,i)=>{this.events.removeListener(s,i)},this.logger=E(t,this.name)}get context(){return C(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\"//\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\"string\")return rs(e);if(typeof e==\"number\")return ns(e);const{message:t}=d(\"UNKNOWN_TYPE\",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(S.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>\"u\"||!e.length)return;if(this.expirations.size){const{message:t}=d(\"RESTORE_WILL_OVERRIDE\",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\"method\",method:\"restore\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:s}=d(\"NO_MATCHING_KEY\",`${this.name}: ${e}`);throw this.logger.warn(s),new Error(s)}return t}checkExpiry(e,t){const{expiry:s}=t;w(s)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(S.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(j.pulse,()=>this.checkExpirations()),this.events.on(S.created,e=>{const t=S.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(S.expired,e=>{const t=S.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()}),this.events.on(S.deleted,e=>{const t=S.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:\"event\",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=d(\"NOT_INITIALIZED\",this.name);throw new Error(e)}}}class ci extends Ri{constructor(e,t,s){super(e,t,s),this.core=e,this.logger=t,this.store=s,this.name=_t,this.verifyUrlV3=vt,this.storagePrefix=x,this.version=De,this.init=async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&w((i=this.publicKey)==null?void 0:i.expiresAt){if(!os()||this.isDevEnv)return;const r=window.location.origin,{id:n,decryptedId:a}=i,h=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${r}&id=${n}&decryptedId=${a}`;try{const c=Ds(),l=this.startAbortTimer(q*5),p=await new Promise((D,m)=>{const u=()=>{window.removeEventListener(\"message\",_),c.body.removeChild(g),m(\"attestation aborted\")};this.abortController.signal.addEventListener(\"abort\",u);const g=c.createElement(\"iframe\");g.src=h,g.style.display=\"none\",g.addEventListener(\"error\",u,{signal:this.abortController.signal});const _=y=>{if(y.data&&typeof y.data==\"string\")try{const b=JSON.parse(y.data);if(b.type===\"verify_attestation\"){if(Se(b.attestation).payload.id!==n)return;clearInterval(l),c.body.removeChild(g),this.abortController.signal.removeEventListener(\"abort\",u),window.removeEventListener(\"message\",_),D(b.attestation===null?\"\":b.attestation)}}catch(b){this.logger.warn(b)}};c.body.appendChild(g),window.addEventListener(\"message\",_,{signal:this.abortController.signal})});return this.logger.debug(\"jwt attestation\",p),p}catch(c){this.logger.warn(c)}return\"\"},this.resolve=async i=>{if(this.isDevEnv)return\"\";const{attestationId:r,hash:n,encryptedId:a}=i;if(r===\"\"){this.logger.debug(\"resolve: attestationId is empty, skipping\");return}if(r){if(Se(r).payload.id!==a)return;const c=await this.isValidJwtAttestation(r);if(c){if(!c.isVerified){this.logger.warn(\"resolve: jwt attestation: origin url not verified\");return}return c}}if(!n)return;const h=this.getVerifyUrl(i?.verifyUrl);return this.fetchAttestation(n,h)},this.fetchAttestation=async(i,r)=>{this.logger.debug(`resolving attestation: ${i} from url: ${r}`);const n=this.startAbortTimer(q*5),a=await fetch(`${r}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(n),a.status===200?await a.json():void 0},this.getVerifyUrl=i=>{let r=i||J;return wt.includes(r)||(this.logger.info(`verify url: ${r}, not included in trusted list, assigning default: ${J}`),r=J),r},this.fetchPublicKey=async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(Te),r=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await r.json()}catch(i){this.logger.warn(i)}},this.persistPublicKey=async i=>{this.logger.debug(\"persisting public key to local storage\",i),await this.store.setItem(this.storeKey,i),this.publicKey=i},this.removePublicKey=async()=>{this.logger.debug(\"removing verify v2 public key from storage\"),await this.store.removeItem(this.storeKey),this.publicKey=void 0},this.isValidJwtAttestation=async i=>{const r=await this.getPublicKey();try{if(r)return this.validateAttestation(i,r)}catch(a){this.logger.error(a),this.logger.warn(\"error validating attestation\")}const n=await this.fetchAndPersistPublicKey();try{if(n)return this.validateAttestation(i,n)}catch(a){this.logger.error(a),this.logger.warn(\"error validating attestation\")}},this.getPublicKey=async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey(),this.fetchAndPersistPublicKey=async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async r=>{const n=await this.fetchPublicKey();n&&(await this.persistPublicKey(n),r(n))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i},this.validateAttestation=(i,r)=>{const n=as(i,r.publicKey),a={hasExpired:w(n.exp)this.abortController.abort(),w(e))}}class li extends xi{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=It,this.registerDeviceToken=async s=>{const{clientId:i,token:r,notificationType:n,enableEncrypted:a=!1}=s,h=`${Tt}/${this.projectId}/clients`;await fetch(h,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({client_id:i,type:n,token:r,always_raw:a})})},this.logger=E(t,this.context)}}var dn=Object.defineProperty,ui=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,di=(o,e,t)=>e in o?dn(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,Z=(o,e)=>{for(var t in e||(e={}))pn.call(e,t)&&di(o,t,e[t]);if(ui)for(var t of ui(e))gn.call(e,t)&&di(o,t,e[t]);return o};class pi extends Oi{constructor(e,t,s=!0){super(e,t,s),this.core=e,this.logger=t,this.context=Pt,this.storagePrefix=x,this.storageVersion=Ct,this.events=new Map,this.shouldPersist=!1,this.init=async()=>{if(!Fe())try{const i={eventId:Ke(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:\"INIT\",type:\"\",properties:{client_id:await this.core.crypto.getClientId(),user_agent:hs(this.core.relayer.protocol,this.core.relayer.version,se)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}},this.createEvent=i=>{const{event:r=\"ERROR\",type:n=\"\",properties:{topic:a,trace:h}}=i,c=Ke(),l=this.core.projectId||\"\",p=Date.now(),D=Z({eventId:c,timestamp:p,props:{event:r,type:n,properties:{topic:a,trace:h}},bundleId:l,domain:this.getAppDomain()},this.setMethods(c));return this.telemetryEnabled&&(this.events.set(c,D),this.shouldPersist=!0),D},this.getEvent=i=>{const{eventId:r,topic:n}=i;if(r)return this.events.get(r);const a=Array.from(this.events.values()).find(h=>h.props.properties.topic===n);if(a)return Z(Z({},a),this.setMethods(a.eventId))},this.deleteEvent=i=>{const{eventId:r}=i;this.events.delete(r),this.shouldPersist=!0},this.setEventListeners=()=>{this.core.heartbeat.on(j.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{Ce(Date.now())-Ce(i.timestamp)>St&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})},this.setMethods=i=>({addTrace:r=>this.addTrace(i,r),setError:r=>this.setError(i,r)}),this.addTrace=(i,r)=>{const n=this.events.get(i);n&&(n.props.properties.trace.push(r),this.events.set(i,n),this.shouldPersist=!0)},this.setError=(i,r)=>{const n=this.events.get(i);n&&(n.props.type=r,n.timestamp=Date.now(),this.events.set(i,n),this.shouldPersist=!0)},this.persist=async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1},this.restore=async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(r=>{this.events.set(r.eventId,Z(Z({},r),this.setMethods(r.eventId)))})}catch(i){this.logger.warn(i)}},this.submit=async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[r,n]of this.events)n.props.type&&i.push(n);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const r of i)this.events.delete(r.eventId),this.shouldPersist=!0}catch(r){this.logger.warn(r)}},this.sendEvent=async i=>{const r=this.getAppDomain()?\"\":\"&sp=desktop\";return await fetch(`${Rt}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${se}${r}`,{method:\"POST\",body:JSON.stringify(i)})},this.getAppDomain=()=>cs().url,this.logger=E(t,this.context),this.telemetryEnabled=s,s?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+\"//\"+this.context}}var yn=Object.defineProperty,gi=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,yi=(o,e,t)=>e in o?yn(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,Di=(o,e)=>{for(var t in e||(e={}))Dn.call(e,t)&&yi(o,t,e[t]);if(gi)for(var t of gi(e))mn.call(e,t)&&yi(o,t,e[t]);return o};class ne extends Ai{constructor(e){var t;super(e),this.protocol=ye,this.version=De,this.name=ie,this.events=new U,this.initialized=!1,this.on=(n,a)=>this.events.on(n,a),this.once=(n,a)=>this.events.once(n,a),this.off=(n,a)=>this.events.off(n,a),this.removeListener=(n,a)=>this.events.removeListener(n,a),this.dispatchEnvelope=({topic:n,message:a,sessionExists:h})=>{if(!n||!a)return;const c={topic:n,message:a,publishedAt:Date.now(),transportType:M.link_mode};this.relayer.onLinkMessageEvent(c,{sessionExists:h})},this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||be,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\"\";const s=Ie({level:typeof e?.logger==\"string\"&&e.logger?e.logger:Ye.logger}),{logger:i,chunkLoggerController:r}=Ei({opts:s,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=r,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var n,a;(n=this.logChunkController)!=null&&n.downloadLogsBlobInBrowser&&((a=this.logChunkController)==null||a.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=E(i,this.name),this.heartbeat=new bi,this.crypto=new Ht(this,this.logger,e?.keychain),this.history=new ai(this,this.logger),this.expirer=new hi(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new fi(Di(Di({},Je),e?.storageOptions)),this.relayer=new ti({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new oi(this,this.logger),this.verify=new ci(this,this.logger,this.storage),this.echoClient=new li(this.projectId||\"\",this.logger),this.linkModeSupportedApps=[],this.eventClient=new pi(this,this.logger,e?.telemetryEnabled)}static async init(e){const t=new ne(e);await t.initialize();const s=await t.crypto.getClientId();return await t.storage.setItem(lt,s),t}get context(){return C(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(fe,this.linkModeSupportedApps))}async initialize(){this.logger.trace(\"Initialized\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.eventClient.init(),this.linkModeSupportedApps=await this.storage.getItem(fe)||[],this.initialized=!0,this.logger.info(\"Core Initialization Success\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const bn=ne;export{ie as CORE_CONTEXT,Ye as CORE_DEFAULT,ye as CORE_PROTOCOL,Je as CORE_STORAGE_OPTIONS,x as CORE_STORAGE_PREFIX,De as CORE_VERSION,me as CRYPTO_CLIENT_SEED,Xe as CRYPTO_CONTEXT,We as CRYPTO_JWT_TTL,bn as Core,Ht as Crypto,It as ECHO_CONTEXT,Tt as ECHO_URL,Rt as EVENTS_CLIENT_API_URL,St as EVENTS_STORAGE_CLEANUP_INTERVAL,Pt as EVENTS_STORAGE_CONTEXT,Ct as EVENTS_STORAGE_VERSION,Ps as EVENT_CLIENT_AUTHENTICATE_ERRORS,Cs as EVENT_CLIENT_AUTHENTICATE_TRACES,ws as EVENT_CLIENT_CONTEXT,$ as EVENT_CLIENT_PAIRING_ERRORS,z as EVENT_CLIENT_PAIRING_TRACES,Ts as EVENT_CLIENT_SESSION_ERRORS,Is as EVENT_CLIENT_SESSION_TRACES,bt as EXPIRER_CONTEXT,Es as EXPIRER_DEFAULT_TTL,S as EXPIRER_EVENTS,ft as EXPIRER_STORAGE_VERSION,li as EchoClient,pi as EventClient,hi as Expirer,Dt as HISTORY_CONTEXT,P as HISTORY_EVENTS,mt as HISTORY_STORAGE_VERSION,ai as JsonRpcHistory,Ze as KEYCHAIN_CONTEXT,Qe as KEYCHAIN_STORAGE_VERSION,Gt as KeyChain,et as MESSAGES_CONTEXT,tt as MESSAGES_STORAGE_VERSION,Yt as MessageTracker,gt as PAIRING_CONTEXT,_s as PAIRING_DEFAULT_TTL,V as PAIRING_EVENTS,B as PAIRING_RPC_OPTS,yt as PAIRING_STORAGE_VERSION,pt as PENDING_SUB_RESOLUTION_TIMEOUT,st as PUBLISHER_CONTEXT,it as PUBLISHER_DEFAULT_TTL,oi as Pairing,ot as RELAYER_CONTEXT,nt as RELAYER_DEFAULT_LOGGER,rt as RELAYER_DEFAULT_PROTOCOL,be as RELAYER_DEFAULT_RELAY_URL,v as RELAYER_EVENTS,I as RELAYER_PROVIDER_EVENTS,ht as RELAYER_RECONNECT_TIMEOUT,se as RELAYER_SDK_VERSION,ms as RELAYER_STORAGE_OPTIONS,at as RELAYER_SUBSCRIBER_SUFFIX,bs as RELAYER_TRANSPORT_CUTOFF,ti as Relayer,ct as STORE_STORAGE_VERSION,ut as SUBSCRIBER_CONTEXT,fs as SUBSCRIBER_DEFAULT_TTL,O as SUBSCRIBER_EVENTS,dt as SUBSCRIBER_STORAGE_VERSION,ni as Store,Wt as Subscriber,M as TRANSPORT_TYPES,wt as TRUSTED_VERIFY_URLS,_t as VERIFY_CONTEXT,J as VERIFY_SERVER,vt as VERIFY_SERVER_V3,ci as Verify,lt as WALLETCONNECT_CLIENT_ID,fe as WALLETCONNECT_LINK_MODE_APPS,ne as default};\n//# sourceMappingURL=index.es.js.map\n","import{RELAYER_DEFAULT_PROTOCOL as Et,TRANSPORT_TYPES as f,EVENT_CLIENT_SESSION_TRACES as C,EVENT_CLIENT_SESSION_ERRORS as F,EVENT_CLIENT_AUTHENTICATE_TRACES as Q,EVENT_CLIENT_AUTHENTICATE_ERRORS as se,EVENT_CLIENT_PAIRING_ERRORS as Rt,EVENT_CLIENT_PAIRING_TRACES as St,RELAYER_EVENTS as Ue,VERIFY_SERVER as It,EXPIRER_EVENTS as ft,PAIRING_EVENTS as Ge,Store as H,Core as vt}from\"@walletconnect/core\";import{pino as qt,getDefaultLoggerOptions as Tt,generateChildLogger as Nt,getLoggerContext as Pt}from\"@walletconnect/logger\";import{IEngine as Ot,ISignClient as At}from\"@walletconnect/types\";import{getInternalError as u,calcExpiry as A,createDelayedPromise as Y,engineEvent as g,getSdkError as P,getDeepLink as bt,handleDeeplinkRedirect as Ct,isSessionCompatible as Lt,hashKey as Te,parseChainId as Ne,createEncodedRecap as xt,getRecapFromResources as Pe,mergeEncodedRecaps as Dt,TYPE_2 as Vt,BASE64URL as ie,getLinkModeURL as he,validateSignedCacao as je,getNamespacedDidChainId as Fe,getDidAddress as Qe,getMethodsFromRecap as ze,getChainsFromRecap as He,buildNamespacesFromAuth as Ye,formatMessage as Mt,BASE64 as de,hashMessage as X,isExpired as J,MemoryStore as re,isValidParams as L,isUndefined as ne,isValidRelays as kt,isValidObject as Xe,isValidRequiredNamespaces as $t,isValidNamespaces as Oe,isConformingNamespaces as Je,isValidString as k,isValidErrorReason as Kt,isValidRelay as Ut,isValidController as Gt,isValidNamespacesChainId as Be,isValidRequest as jt,isValidNamespacesRequest as Ft,isValidRequestExpiry as Qt,isValidResponse as zt,isValidEvent as Ht,isValidNamespacesEvent as Yt,getSearchParamFromURL as We,isTestRun as Xt,isReactNative as Jt,parseExpirerTarget as Bt,isValidId as Wt,TYPE_1 as Ae,getAppMetadata as Zt}from\"@walletconnect/utils\";import es,{EventEmitter as ts}from\"events\";import{THIRTY_DAYS as ss,SEVEN_DAYS as Ze,FIVE_MINUTES as b,ONE_DAY as $,ONE_HOUR as et,ONE_SECOND as is,toMiliseconds as tt}from\"@walletconnect/time\";import{payloadId as B,getBigIntRpcId as ue,isJsonRpcResult as K,isJsonRpcError as U,formatJsonRpcRequest as ge,formatJsonRpcResult as rs,formatJsonRpcError as ns,isJsonRpcRequest as os,isJsonRpcResponse as as}from\"@walletconnect/jsonrpc-utils\";const be=\"wc\",Ce=2,Le=\"client\",ye=`${be}@${Ce}:${Le}:`,we={name:Le,logger:\"error\",controller:!1,relayUrl:\"wss://relay.walletconnect.org\"},cs={session_proposal:\"session_proposal\",session_update:\"session_update\",session_extend:\"session_extend\",session_ping:\"session_ping\",session_delete:\"session_delete\",session_expire:\"session_expire\",session_request:\"session_request\",session_request_sent:\"session_request_sent\",session_event:\"session_event\",proposal_expire:\"proposal_expire\",session_authenticate:\"session_authenticate\",session_request_expire:\"session_request_expire\"},ls={database:\":memory:\"},xe=\"WALLETCONNECT_DEEPLINK_CHOICE\",ps={created:\"history_created\",updated:\"history_updated\",deleted:\"history_deleted\",sync:\"history_sync\"},hs=\"history\",ds=\"0.3\",st=\"proposal\",us=ss,it=\"Proposal expired\",rt=\"session\",z=Ze,nt=\"engine\",v={wc_sessionPropose:{req:{ttl:b,prompt:!0,tag:1100},res:{ttl:b,prompt:!1,tag:1101},reject:{ttl:b,prompt:!1,tag:1120},autoReject:{ttl:b,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:b,prompt:!1,tag:1102},res:{ttl:b,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:$,prompt:!1,tag:1104},res:{ttl:$,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:$,prompt:!1,tag:1106},res:{ttl:$,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:b,prompt:!0,tag:1108},res:{ttl:b,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:b,prompt:!0,tag:1110},res:{ttl:b,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:$,prompt:!1,tag:1112},res:{ttl:$,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:$,prompt:!1,tag:1114},res:{ttl:$,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:et,prompt:!0,tag:1116},res:{ttl:et,prompt:!1,tag:1117},reject:{ttl:b,prompt:!1,tag:1118},autoReject:{ttl:b,prompt:!1,tag:1119}}},me={min:b,max:Ze},x={idle:\"IDLE\",active:\"ACTIVE\"},ot=\"request\",at=[\"wc_sessionPropose\",\"wc_sessionRequest\",\"wc_authRequest\",\"wc_sessionAuthenticate\"],ct=\"wc\",gs=1.5,lt=\"auth\",pt=\"authKeys\",ht=\"pairingTopics\",dt=\"requests\",oe=`${ct}@${1.5}:${lt}:`,ae=`${oe}:PUB_KEY`;var ys=Object.defineProperty,ws=Object.defineProperties,ms=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,_s=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable,gt=(q,o,e)=>o in q?ys(q,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):q[o]=e,I=(q,o)=>{for(var e in o||(o={}))_s.call(o,e)&>(q,e,o[e]);if(ut)for(var e of ut(o))Es.call(o,e)&>(q,e,o[e]);return q},D=(q,o)=>ws(q,ms(o));class Rs extends Ot{constructor(o){super(o),this.name=nt,this.events=new es,this.initialized=!1,this.requestQueue={state:x.idle,queue:[]},this.sessionRequestQueue={state:x.idle,queue:[]},this.requestQueueDelay=is,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(v)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},tt(this.requestQueueDelay)))},this.connect=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const t=D(I({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:s,requiredNamespaces:i,optionalNamespaces:r,sessionProperties:n,relays:a}=t;let c=s,h,p=!1;try{c&&(p=this.client.core.pairing.pairings.get(c).active)}catch(E){throw this.client.logger.error(`connect() -> pairing.get(${c}) failed`),E}if(!c||!p){const{topic:E,uri:S}=await this.client.core.pairing.create();c=E,h=S}if(!c){const{message:E}=u(\"NO_MATCHING_KEY\",`connect() pairing topic: ${c}`);throw new Error(E)}const d=await this.client.core.crypto.generateKeyPair(),l=v.wc_sessionPropose.req.ttl||b,w=A(l),m=I({requiredNamespaces:i,optionalNamespaces:r,relays:a??[{protocol:Et}],proposer:{publicKey:d,metadata:this.client.metadata},expiryTimestamp:w,pairingTopic:c},n&&{sessionProperties:n}),{reject:y,resolve:_,done:R}=Y(l,it);this.events.once(g(\"session_connect\"),async({error:E,session:S})=>{if(E)y(E);else if(S){S.self.publicKey=d;const M=D(I({},S),{pairingTopic:m.pairingTopic,requiredNamespaces:m.requiredNamespaces,optionalNamespaces:m.optionalNamespaces,transportType:f.relay});await this.client.session.set(S.topic,M),await this.setExpiry(S.topic,S.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:S.peer.metadata}),this.cleanupDuplicatePairings(M),_(M)}});const V=await this.sendRequest({topic:c,method:\"wc_sessionPropose\",params:m,throwOnFailedPublish:!0});return await this.setProposal(V,I({id:V},m)),{uri:h,approval:R}},this.pair=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(t){throw this.client.logger.error(\"pair() failed\"),t}},this.approve=async e=>{var t,s,i;const r=this.client.core.eventClient.createEvent({properties:{topic:(t=e?.id)==null?void 0:t.toString(),trace:[C.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(N){throw r.setError(F.no_internet_connection),N}try{await this.isValidProposalId(e?.id)}catch(N){throw this.client.logger.error(`approve() -> proposal.get(${e?.id}) failed`),r.setError(F.proposal_not_found),N}try{await this.isValidApprove(e)}catch(N){throw this.client.logger.error(\"approve() -> isValidApprove() failed\"),r.setError(F.session_approve_namespace_validation_failure),N}const{id:n,relayProtocol:a,namespaces:c,sessionProperties:h,sessionConfig:p}=e,d=this.client.proposal.get(n);this.client.core.eventClient.deleteEvent({eventId:r.eventId});const{pairingTopic:l,proposer:w,requiredNamespaces:m,optionalNamespaces:y}=d;let _=(s=this.client.core.eventClient)==null?void 0:s.getEvent({topic:l});_||(_=(i=this.client.core.eventClient)==null?void 0:i.createEvent({type:C.session_approve_started,properties:{topic:l,trace:[C.session_approve_started,C.session_namespaces_validation_success]}}));const R=await this.client.core.crypto.generateKeyPair(),V=w.publicKey,E=await this.client.core.crypto.generateSharedKey(R,V),S=I(I({relay:{protocol:a??\"irn\"},namespaces:c,controller:{publicKey:R,metadata:this.client.metadata},expiry:A(z)},h&&{sessionProperties:h}),p&&{sessionConfig:p}),M=f.relay;_.addTrace(C.subscribing_session_topic);try{await this.client.core.relayer.subscribe(E,{transportType:M})}catch(N){throw _.setError(F.subscribe_session_topic_failure),N}_.addTrace(C.subscribe_session_topic_success);const W=D(I({},S),{topic:E,requiredNamespaces:m,optionalNamespaces:y,pairingTopic:l,acknowledged:!1,self:S.controller,peer:{publicKey:w.publicKey,metadata:w.metadata},controller:R,transportType:f.relay});await this.client.session.set(E,W),_.addTrace(C.store_session);try{_.addTrace(C.publishing_session_settle),await this.sendRequest({topic:E,method:\"wc_sessionSettle\",params:S,throwOnFailedPublish:!0}).catch(N=>{throw _?.setError(F.session_settle_publish_failure),N}),_.addTrace(C.session_settle_publish_success),_.addTrace(C.publishing_session_approve),await this.sendResult({id:n,topic:l,result:{relay:{protocol:a??\"irn\"},responderPublicKey:R},throwOnFailedPublish:!0}).catch(N=>{throw _?.setError(F.session_approve_publish_failure),N}),_.addTrace(C.session_approve_publish_success)}catch(N){throw this.client.logger.error(N),this.client.session.delete(E,P(\"USER_DISCONNECTED\")),await this.client.core.relayer.unsubscribe(E),N}return this.client.core.eventClient.deleteEvent({eventId:_.eventId}),await this.client.core.pairing.updateMetadata({topic:l,metadata:w.metadata}),await this.client.proposal.delete(n,P(\"USER_DISCONNECTED\")),await this.client.core.pairing.activate({topic:l}),await this.setExpiry(E,A(z)),{topic:E,acknowledged:()=>Promise.resolve(this.client.session.get(E))}},this.reject=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(r){throw this.client.logger.error(\"reject() -> isValidReject() failed\"),r}const{id:t,reason:s}=e;let i;try{i=this.client.proposal.get(t).pairingTopic}catch(r){throw this.client.logger.error(`reject() -> proposal.get(${t}) failed`),r}i&&(await this.sendError({id:t,topic:i,error:s,rpcOpts:v.wc_sessionPropose.reject}),await this.client.proposal.delete(t,P(\"USER_DISCONNECTED\")))},this.update=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(p){throw this.client.logger.error(\"update() -> isValidUpdate() failed\"),p}const{topic:t,namespaces:s}=e,{done:i,resolve:r,reject:n}=Y(),a=B(),c=ue().toString(),h=this.client.session.get(t).namespaces;return this.events.once(g(\"session_update\",a),({error:p})=>{p?n(p):r()}),await this.client.session.update(t,{namespaces:s}),await this.sendRequest({topic:t,method:\"wc_sessionUpdate\",params:{namespaces:s},throwOnFailedPublish:!0,clientRpcId:a,relayRpcId:c}).catch(p=>{this.client.logger.error(p),this.client.session.update(t,{namespaces:h}),n(p)}),{acknowledged:i}},this.extend=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(a){throw this.client.logger.error(\"extend() -> isValidExtend() failed\"),a}const{topic:t}=e,s=B(),{done:i,resolve:r,reject:n}=Y();return this.events.once(g(\"session_extend\",s),({error:a})=>{a?n(a):r()}),await this.setExpiry(t,A(z)),this.sendRequest({topic:t,method:\"wc_sessionExtend\",params:{},clientRpcId:s,throwOnFailedPublish:!0}).catch(a=>{n(a)}),{acknowledged:i}},this.request=async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(w){throw this.client.logger.error(\"request() -> isValidRequest() failed\"),w}const{chainId:t,request:s,topic:i,expiry:r=v.wc_sessionRequest.req.ttl}=e,n=this.client.session.get(i);n?.transportType===f.relay&&await this.confirmOnlineStateOrThrow();const a=B(),c=ue().toString(),{done:h,resolve:p,reject:d}=Y(r,\"Request expired. Please try again.\");this.events.once(g(\"session_request\",a),({error:w,result:m})=>{w?d(w):p(m)});const l=this.getAppLinkIfEnabled(n.peer.metadata,n.transportType);return l?(await this.sendRequest({clientRpcId:a,relayRpcId:c,topic:i,method:\"wc_sessionRequest\",params:{request:D(I({},s),{expiryTimestamp:A(r)}),chainId:t},expiry:r,throwOnFailedPublish:!0,appLink:l}).catch(w=>d(w)),this.client.events.emit(\"session_request_sent\",{topic:i,request:s,chainId:t,id:a}),await h()):await Promise.all([new Promise(async w=>{await this.sendRequest({clientRpcId:a,relayRpcId:c,topic:i,method:\"wc_sessionRequest\",params:{request:D(I({},s),{expiryTimestamp:A(r)}),chainId:t},expiry:r,throwOnFailedPublish:!0}).catch(m=>d(m)),this.client.events.emit(\"session_request_sent\",{topic:i,request:s,chainId:t,id:a}),w()}),new Promise(async w=>{var m;if(!((m=n.sessionConfig)!=null&&m.disableDeepLink)){const y=await bt(this.client.core.storage,xe);await Ct({id:a,topic:i,wcDeepLink:y})}w()}),h()]).then(w=>w[2])},this.respond=async e=>{this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:s}=e,{id:i}=s,r=this.client.session.get(t);r.transportType===f.relay&&await this.confirmOnlineStateOrThrow();const n=this.getAppLinkIfEnabled(r.peer.metadata,r.transportType);K(s)?await this.sendResult({id:i,topic:t,result:s.result,throwOnFailedPublish:!0,appLink:n}):U(s)&&await this.sendError({id:i,topic:t,error:s.error,appLink:n}),this.cleanupAfterResponse(e)},this.ping=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(s){throw this.client.logger.error(\"ping() -> isValidPing() failed\"),s}const{topic:t}=e;if(this.client.session.keys.includes(t)){const s=B(),i=ue().toString(),{done:r,resolve:n,reject:a}=Y();this.events.once(g(\"session_ping\",s),({error:c})=>{c?a(c):n()}),await Promise.all([this.sendRequest({topic:t,method:\"wc_sessionPing\",params:{},throwOnFailedPublish:!0,clientRpcId:s,relayRpcId:i}),r()])}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);const{topic:t,event:s,chainId:i}=e,r=ue().toString();await this.sendRequest({topic:t,method:\"wc_sessionEvent\",params:{event:s,chainId:i},throwOnFailedPublish:!0,relayRpcId:r})},this.disconnect=async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:\"wc_sessionDelete\",params:P(\"USER_DISCONNECTED\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{const{message:s}=u(\"MISMATCHED_TOPIC\",`Session or pairing topic not found: ${t}`);throw new Error(s)}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter(t=>Lt(t,e))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async(e,t)=>{var s;this.isInitialized(),this.isValidAuthenticate(e);const i=t&&this.client.core.linkModeSupportedApps.includes(t)&&((s=this.client.metadata.redirect)==null?void 0:s.linkMode),r=i?f.link_mode:f.relay;r===f.relay&&await this.confirmOnlineStateOrThrow();const{chains:n,statement:a=\"\",uri:c,domain:h,nonce:p,type:d,exp:l,nbf:w,methods:m=[],expiry:y}=e,_=[...e.resources||[]],{topic:R,uri:V}=await this.client.core.pairing.create({methods:[\"wc_sessionAuthenticate\"],transportType:r});this.client.logger.info({message:\"Generated new pairing\",pairing:{topic:R,uri:V}});const E=await this.client.core.crypto.generateKeyPair(),S=Te(E);if(await Promise.all([this.client.auth.authKeys.set(ae,{responseTopic:S,publicKey:E}),this.client.auth.pairingTopics.set(S,{topic:S,pairingTopic:R})]),await this.client.core.relayer.subscribe(S,{transportType:r}),this.client.logger.info(`sending request to new pairing topic: ${R}`),m.length>0){const{namespace:O}=Ne(n[0]);let T=xt(O,\"request\",m);Pe(_)&&(T=Dt(T,_.pop())),_.push(T)}const M=y&&y>v.wc_sessionAuthenticate.req.ttl?y:v.wc_sessionAuthenticate.req.ttl,W={authPayload:{type:d??\"caip122\",chains:n,statement:a,aud:c,domain:h,version:\"1\",nonce:p,iat:new Date().toISOString(),exp:l,nbf:w,resources:_},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:A(M)},N={eip155:{chains:n,methods:[...new Set([\"personal_sign\",...m])],events:[\"chainChanged\",\"accountsChanged\"]}},De={requiredNamespaces:{},optionalNamespaces:N,relays:[{protocol:\"irn\"}],pairingTopic:R,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:A(v.wc_sessionPropose.req.ttl)},{done:wt,resolve:Ve,reject:Ee}=Y(M,\"Request expired\"),ce=async({error:O,session:T})=>{if(this.events.off(g(\"session_request\",G),Re),O)Ee(O);else if(T){T.self.publicKey=E,await this.client.session.set(T.topic,T),await this.setExpiry(T.topic,T.expiry),R&&await this.client.core.pairing.updateMetadata({topic:R,metadata:T.peer.metadata});const le=this.client.session.get(T.topic);await this.deleteProposal(Z),Ve({session:le})}},Re=async O=>{var T,le,Me;if(await this.deletePendingAuthRequest(G,{message:\"fulfilled\",code:0}),O.error){const te=P(\"WC_METHOD_UNSUPPORTED\",\"wc_sessionAuthenticate\");return O.error.code===te.code?void 0:(this.events.off(g(\"session_connect\"),ce),Ee(O.error.message))}await this.deleteProposal(Z),this.events.off(g(\"session_connect\"),ce);const{cacaos:ke,responder:j}=O.result,Ie=[],$e=[];for(const te of ke){await je({cacao:te,projectId:this.client.core.projectId})||(this.client.logger.error(te,\"Signature verification failed\"),Ee(P(\"SESSION_SETTLEMENT_FAILED\",\"Signature verification failed\")));const{p:fe}=te,ve=Pe(fe.resources),Ke=[Fe(fe.iss)],mt=Qe(fe.iss);if(ve){const qe=ze(ve),_t=He(ve);Ie.push(...qe),Ke.push(..._t)}for(const qe of Ke)$e.push(`${qe}:${mt}`)}const ee=await this.client.core.crypto.generateSharedKey(E,j.publicKey);let pe;Ie.length>0&&(pe={topic:ee,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:j,controller:j.publicKey,expiry:A(z),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\"irn\"},pairingTopic:R,namespaces:Ye([...new Set(Ie)],[...new Set($e)]),transportType:r},await this.client.core.relayer.subscribe(ee,{transportType:r}),await this.client.session.set(ee,pe),R&&await this.client.core.pairing.updateMetadata({topic:R,metadata:j.metadata}),pe=this.client.session.get(ee)),(T=this.client.metadata.redirect)!=null&&T.linkMode&&(le=j.metadata.redirect)!=null&&le.linkMode&&(Me=j.metadata.redirect)!=null&&Me.universal&&t&&(this.client.core.addLinkModeSupportedApp(j.metadata.redirect.universal),this.client.session.update(ee,{transportType:f.link_mode})),Ve({auths:ke,session:pe})},G=B(),Z=B();this.events.once(g(\"session_connect\"),ce),this.events.once(g(\"session_request\",G),Re);let Se;try{if(i){const O=ge(\"wc_sessionAuthenticate\",W,G);this.client.core.history.set(R,O);const T=await this.client.core.crypto.encode(\"\",O,{type:Vt,encoding:ie});Se=he(t,R,T)}else await Promise.all([this.sendRequest({topic:R,method:\"wc_sessionAuthenticate\",params:W,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:G}),this.sendRequest({topic:R,method:\"wc_sessionPropose\",params:De,expiry:v.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:Z})])}catch(O){throw this.events.off(g(\"session_connect\"),ce),this.events.off(g(\"session_request\",G),Re),O}return await this.setProposal(Z,I({id:Z},De)),await this.setAuthRequest(G,{request:D(I({},W),{verifyContext:{}}),pairingTopic:R,transportType:r}),{uri:Se??V,response:wt}},this.approveSessionAuthenticate=async e=>{const{id:t,auths:s}=e,i=this.client.core.eventClient.createEvent({properties:{topic:t.toString(),trace:[Q.authenticated_session_approve_started]}});try{this.isInitialized()}catch(y){throw i.setError(se.no_internet_connection),y}const r=this.getPendingAuthRequest(t);if(!r)throw i.setError(se.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${t}`);const n=r.transportType||f.relay;n===f.relay&&await this.confirmOnlineStateOrThrow();const a=r.requester.publicKey,c=await this.client.core.crypto.generateKeyPair(),h=Te(a),p={type:Ae,receiverPublicKey:a,senderPublicKey:c},d=[],l=[];for(const y of s){if(!await je({cacao:y,projectId:this.client.core.projectId})){i.setError(se.invalid_cacao);const S=P(\"SESSION_SETTLEMENT_FAILED\",\"Signature verification failed\");throw await this.sendError({id:t,topic:h,error:S,encodeOpts:p}),new Error(S.message)}i.addTrace(Q.cacaos_verified);const{p:_}=y,R=Pe(_.resources),V=[Fe(_.iss)],E=Qe(_.iss);if(R){const S=ze(R),M=He(R);d.push(...S),V.push(...M)}for(const S of V)l.push(`${S}:${E}`)}const w=await this.client.core.crypto.generateSharedKey(c,a);i.addTrace(Q.create_authenticated_session_topic);let m;if(d?.length>0){m={topic:w,acknowledged:!0,self:{publicKey:c,metadata:this.client.metadata},peer:{publicKey:a,metadata:r.requester.metadata},controller:a,expiry:A(z),authentication:s,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\"irn\"},pairingTopic:r.pairingTopic,namespaces:Ye([...new Set(d)],[...new Set(l)]),transportType:n},i.addTrace(Q.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(w,{transportType:n})}catch(y){throw i.setError(se.subscribe_authenticated_session_topic_failure),y}i.addTrace(Q.subscribe_authenticated_session_topic_success),await this.client.session.set(w,m),i.addTrace(Q.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:r.pairingTopic,metadata:r.requester.metadata})}i.addTrace(Q.publishing_authenticated_session_approve);try{await this.sendResult({topic:h,id:t,result:{cacaos:s,responder:{publicKey:c,metadata:this.client.metadata}},encodeOpts:p,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(r.requester.metadata,n)})}catch(y){throw i.setError(se.authenticated_session_approve_publish_failure),y}return await this.client.auth.requests.delete(t,{message:\"fulfilled\",code:0}),await this.client.core.pairing.activate({topic:r.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:i.eventId}),{session:m}},this.rejectSessionAuthenticate=async e=>{this.isInitialized();const{id:t,reason:s}=e,i=this.getPendingAuthRequest(t);if(!i)throw new Error(`Could not find pending auth request with id ${t}`);i.transportType===f.relay&&await this.confirmOnlineStateOrThrow();const r=i.requester.publicKey,n=await this.client.core.crypto.generateKeyPair(),a=Te(r),c={type:Ae,receiverPublicKey:r,senderPublicKey:n};await this.sendError({id:t,topic:a,error:s,encodeOpts:c,rpcOpts:v.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(i.requester.metadata,i.transportType)}),await this.client.auth.requests.delete(t,{message:\"rejected\",code:0}),await this.client.proposal.delete(t,P(\"USER_DISCONNECTED\"))},this.formatAuthMessage=e=>{this.isInitialized();const{request:t,iss:s}=e;return Mt(t,s)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)},this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),s=this.client.core.pairing.pairings.getAll().filter(i=>{var r,n;return((r=i.peerMetadata)==null?void 0:r.url)&&((n=i.peerMetadata)==null?void 0:n.url)===e.peer.metadata.url&&i.topic&&i.topic!==t.topic});if(s.length===0)return;this.client.logger.info(`Cleaning up ${s.length} duplicate pairing(s)`),await Promise.all(s.map(i=>this.client.core.pairing.disconnect({topic:i.topic}))),this.client.logger.info(\"Duplicate pairings clean up finished\")}catch(t){this.client.logger.error(t)}},this.deleteSession=async e=>{var t;const{topic:s,expirerHasDeleted:i=!1,emitEvent:r=!0,id:n=0}=e,{self:a}=this.client.session.get(s);await this.client.core.relayer.unsubscribe(s),await this.client.session.delete(s,P(\"USER_DISCONNECTED\")),this.addToRecentlyDeleted(s,\"session\"),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(s)&&await this.client.core.crypto.deleteSymKey(s),i||this.client.core.expirer.del(s),this.client.core.storage.removeItem(xe).catch(c=>this.client.logger.warn(c)),this.getPendingSessionRequests().forEach(c=>{c.topic===s&&this.deletePendingSessionRequest(c.id,P(\"USER_DISCONNECTED\"))}),s===((t=this.sessionRequestQueue.queue[0])==null?void 0:t.topic)&&(this.sessionRequestQueue.state=x.idle),r&&this.client.events.emit(\"session_delete\",{id:n,topic:s})},this.deleteProposal=async(e,t)=>{if(t)try{const s=this.client.proposal.get(e),i=this.client.core.eventClient.getEvent({topic:s.pairingTopic});i?.setError(F.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,P(\"USER_DISCONNECTED\")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,\"proposal\")},this.deletePendingSessionRequest=async(e,t,s=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),s?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,\"request\"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==e),s&&(this.sessionRequestQueue.state=x.idle,this.client.events.emit(\"session_request_expire\",{id:e}))},this.deletePendingAuthRequest=async(e,t,s=!1)=>{await Promise.all([this.client.auth.requests.delete(e,t),s?Promise.resolve():this.client.core.expirer.del(e)])},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))},this.setProposal=async(e,t)=>{this.client.core.expirer.set(e,A(v.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)},this.setAuthRequest=async(e,t)=>{const{request:s,pairingTopic:i,transportType:r=f.relay}=t;this.client.core.expirer.set(e,s.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:s.authPayload,requester:s.requester,expiryTimestamp:s.expiryTimestamp,id:e,pairingTopic:i,verifyContext:s.verifyContext,transportType:r})},this.setPendingSessionRequest=async e=>{const{id:t,topic:s,params:i,verifyContext:r}=e,n=i.request.expiryTimestamp||A(v.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,n),await this.client.pendingRequest.set(t,{id:t,topic:s,params:i,verifyContext:r})},this.sendRequest=async e=>{const{topic:t,method:s,params:i,expiry:r,relayRpcId:n,clientRpcId:a,throwOnFailedPublish:c,appLink:h}=e,p=ge(s,i,a);let d;const l=!!h;try{const y=l?ie:de;d=await this.client.core.crypto.encode(t,p,{encoding:y})}catch(y){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${t} failed`),y}let w;if(at.includes(s)){const y=X(JSON.stringify(p)),_=X(d);w=await this.client.core.verify.register({id:_,decryptedId:y})}const m=v[s].req;if(m.attestation=w,r&&(m.ttl=r),n&&(m.id=n),this.client.core.history.set(t,p),l){const y=he(h,t,d);await global.Linking.openURL(y,this.client.name)}else{const y=v[s].req;r&&(y.ttl=r),n&&(y.id=n),c?(y.internal=D(I({},y.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,d,y)):this.client.core.relayer.publish(t,d,y).catch(_=>this.client.logger.error(_))}return p.id},this.sendResult=async e=>{const{id:t,topic:s,result:i,throwOnFailedPublish:r,encodeOpts:n,appLink:a}=e,c=rs(t,i);let h;const p=a&&typeof(global==null?void 0:global.Linking)<\"u\";try{const l=p?ie:de;h=await this.client.core.crypto.encode(s,c,D(I({},n||{}),{encoding:l}))}catch(l){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${s} failed`),l}let d;try{d=await this.client.core.history.get(s,t)}catch(l){throw this.client.logger.error(`sendResult() -> history.get(${s}, ${t}) failed`),l}if(p){const l=he(a,s,h);await global.Linking.openURL(l,this.client.name)}else{const l=v[d.request.method].res;r?(l.internal=D(I({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,h,l)):this.client.core.relayer.publish(s,h,l).catch(w=>this.client.logger.error(w))}await this.client.core.history.resolve(c)},this.sendError=async e=>{const{id:t,topic:s,error:i,encodeOpts:r,rpcOpts:n,appLink:a}=e,c=ns(t,i);let h;const p=a&&typeof(global==null?void 0:global.Linking)<\"u\";try{const l=p?ie:de;h=await this.client.core.crypto.encode(s,c,D(I({},r||{}),{encoding:l}))}catch(l){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${s} failed`),l}let d;try{d=await this.client.core.history.get(s,t)}catch(l){throw this.client.logger.error(`sendError() -> history.get(${s}, ${t}) failed`),l}if(p){const l=he(a,s,h);await global.Linking.openURL(l,this.client.name)}else{const l=n||v[d.request.method].res;this.client.core.relayer.publish(s,h,l)}await this.client.core.history.resolve(c)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach(s=>{let i=!1;J(s.expiry)&&(i=!0),this.client.core.crypto.keychain.has(s.topic)||(i=!0),i&&e.push(s.topic)}),this.client.proposal.getAll().forEach(s=>{J(s.expiryTimestamp)&&t.push(s.id)}),await Promise.all([...e.map(s=>this.deleteSession({topic:s})),...t.map(s=>this.deleteProposal(s))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===x.active){this.client.logger.info(\"Request queue already active, skipping...\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=x.active;const e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(t){this.client.logger.warn(t)}}this.requestQueue.state=x.idle},this.processRequest=async e=>{const{topic:t,payload:s,attestation:i,transportType:r,encryptedId:n}=e,a=s.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:a}))switch(a){case\"wc_sessionPropose\":return await this.onSessionProposeRequest({topic:t,payload:s,attestation:i,encryptedId:n});case\"wc_sessionSettle\":return await this.onSessionSettleRequest(t,s);case\"wc_sessionUpdate\":return await this.onSessionUpdateRequest(t,s);case\"wc_sessionExtend\":return await this.onSessionExtendRequest(t,s);case\"wc_sessionPing\":return await this.onSessionPingRequest(t,s);case\"wc_sessionDelete\":return await this.onSessionDeleteRequest(t,s);case\"wc_sessionRequest\":return await this.onSessionRequest({topic:t,payload:s,attestation:i,encryptedId:n,transportType:r});case\"wc_sessionEvent\":return await this.onSessionEventRequest(t,s);case\"wc_sessionAuthenticate\":return await this.onSessionAuthenticateRequest({topic:t,payload:s,attestation:i,encryptedId:n,transportType:r});default:return this.client.logger.info(`Unsupported request method ${a}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:s,transportType:i}=e,r=(await this.client.core.history.get(t,s.id)).request.method;switch(r){case\"wc_sessionPropose\":return this.onSessionProposeResponse(t,s,i);case\"wc_sessionSettle\":return this.onSessionSettleResponse(t,s);case\"wc_sessionUpdate\":return this.onSessionUpdateResponse(t,s);case\"wc_sessionExtend\":return this.onSessionExtendResponse(t,s);case\"wc_sessionPing\":return this.onSessionPingResponse(t,s);case\"wc_sessionRequest\":return this.onSessionRequestResponse(t,s);case\"wc_sessionAuthenticate\":return this.onSessionAuthenticateResponse(t,s);default:return this.client.logger.info(`Unsupported response method ${r}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:s}=u(\"MISSING_OR_INVALID\",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(s)},this.shouldIgnorePairingRequest=e=>{const{topic:t,requestMethod:s}=e,i=this.expectedPairingMethodMap.get(t);return!i||i.includes(s)?!1:!!(i.includes(\"wc_sessionAuthenticate\")&&this.client.events.listenerCount(\"session_authenticate\")>0)},this.onSessionProposeRequest=async e=>{const{topic:t,payload:s,attestation:i,encryptedId:r}=e,{params:n,id:a}=s;try{const c=this.client.core.eventClient.getEvent({topic:t});this.isValidConnect(I({},s.params));const h=n.expiryTimestamp||A(v.wc_sessionPropose.req.ttl),p=I({id:a,pairingTopic:t,expiryTimestamp:h},n);await this.setProposal(a,p);const d=await this.getVerifyContext({attestationId:i,hash:X(JSON.stringify(s)),encryptedId:r,metadata:p.proposer.metadata});this.client.events.listenerCount(\"session_proposal\")===0&&(console.warn(\"No listener for session_proposal event\"),c?.setError(Rt.proposal_listener_not_found)),c?.addTrace(St.emit_session_proposal),this.client.events.emit(\"session_proposal\",{id:a,params:p,verifyContext:d})}catch(c){await this.sendError({id:a,topic:t,error:c,rpcOpts:v.wc_sessionPropose.autoReject}),this.client.logger.error(c)}},this.onSessionProposeResponse=async(e,t,s)=>{const{id:i}=t;if(K(t)){const{result:r}=t;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",result:r});const n=this.client.proposal.get(i);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",proposal:n});const a=n.proposer.publicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",selfPublicKey:a});const c=r.responderPublicKey;this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",peerPublicKey:c});const h=await this.client.core.crypto.generateSharedKey(a,c);this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",sessionTopic:h});const p=await this.client.core.relayer.subscribe(h,{transportType:s});this.client.logger.trace({type:\"method\",method:\"onSessionProposeResponse\",subscriptionId:p}),await this.client.core.pairing.activate({topic:e})}else if(U(t)){await this.client.proposal.delete(i,P(\"USER_DISCONNECTED\"));const r=g(\"session_connect\");if(this.events.listenerCount(r)===0)throw new Error(`emitting ${r} without any listeners, 954`);this.events.emit(g(\"session_connect\"),{error:t.error})}},this.onSessionSettleRequest=async(e,t)=>{const{id:s,params:i}=t;try{this.isValidSessionSettleRequest(i);const{relay:r,controller:n,expiry:a,namespaces:c,sessionProperties:h,sessionConfig:p}=t.params,d=D(I(I({topic:e,relay:r,expiry:a,namespaces:c,acknowledged:!0,pairingTopic:\"\",requiredNamespaces:{},optionalNamespaces:{},controller:n.publicKey,self:{publicKey:\"\",metadata:this.client.metadata},peer:{publicKey:n.publicKey,metadata:n.metadata}},h&&{sessionProperties:h}),p&&{sessionConfig:p}),{transportType:f.relay}),l=g(\"session_connect\");if(this.events.listenerCount(l)===0)throw new Error(`emitting ${l} without any listeners 997`);this.events.emit(g(\"session_connect\"),{session:d}),await this.sendResult({id:t.id,topic:e,result:!0,throwOnFailedPublish:!0})}catch(r){await this.sendError({id:s,topic:e,error:r}),this.client.logger.error(r)}},this.onSessionSettleResponse=async(e,t)=>{const{id:s}=t;K(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(g(\"session_approve\",s),{})):U(t)&&(await this.client.session.delete(e,P(\"USER_DISCONNECTED\")),this.events.emit(g(\"session_approve\",s),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:s,id:i}=t;try{const r=`${e}_session_update`,n=re.get(r);if(n&&this.isRequestOutOfSync(n,i)){this.client.logger.info(`Discarding out of sync request - ${i}`),this.sendError({id:i,topic:e,error:P(\"INVALID_UPDATE_REQUEST\")});return}this.isValidUpdate(I({topic:e},s));try{re.set(r,i),await this.client.session.update(e,{namespaces:s.namespaces}),await this.sendResult({id:i,topic:e,result:!0,throwOnFailedPublish:!0})}catch(a){throw re.delete(r),a}this.client.events.emit(\"session_update\",{id:i,topic:e,params:s})}catch(r){await this.sendError({id:i,topic:e,error:r}),this.client.logger.error(r)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:s}=t,i=g(\"session_update\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);K(t)?this.events.emit(g(\"session_update\",s),{}):U(t)&&this.events.emit(g(\"session_update\",s),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:s}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,A(z)),await this.sendResult({id:s,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\"session_extend\",{id:s,topic:e})}catch(i){await this.sendError({id:s,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionExtendResponse=(e,t)=>{const{id:s}=t,i=g(\"session_extend\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);K(t)?this.events.emit(g(\"session_extend\",s),{}):U(t)&&this.events.emit(g(\"session_extend\",s),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:s}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:s,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\"session_ping\",{id:s,topic:e})}catch(i){await this.sendError({id:s,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionPingResponse=(e,t)=>{const{id:s}=t,i=g(\"session_ping\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);setTimeout(()=>{K(t)?this.events.emit(g(\"session_ping\",s),{}):U(t)&&this.events.emit(g(\"session_ping\",s),{error:t.error})},500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:s}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),Promise.all([new Promise(i=>{this.client.core.relayer.once(Ue.publish,async()=>{i(await this.deleteSession({topic:e,id:s}))})}),this.sendResult({id:s,topic:e,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:P(\"USER_DISCONNECTED\")})]).catch(i=>this.client.logger.error(i))}catch(i){this.client.logger.error(i)}},this.onSessionRequest=async e=>{var t,s,i;const{topic:r,payload:n,attestation:a,encryptedId:c,transportType:h}=e,{id:p,params:d}=n;try{await this.isValidRequest(I({topic:r},d));const l=this.client.session.get(r),w=await this.getVerifyContext({attestationId:a,hash:X(JSON.stringify(ge(\"wc_sessionRequest\",d,p))),encryptedId:c,metadata:l.peer.metadata,transportType:h}),m={id:p,topic:r,params:d,verifyContext:w};await this.setPendingSessionRequest(m),h===f.link_mode&&(t=l.peer.metadata.redirect)!=null&&t.universal&&this.client.core.addLinkModeSupportedApp((s=l.peer.metadata.redirect)==null?void 0:s.universal),(i=this.client.signConfig)!=null&&i.disableRequestQueue?this.emitSessionRequest(m):(this.addSessionRequestToSessionRequestQueue(m),this.processSessionRequestQueue())}catch(l){await this.sendError({id:p,topic:r,error:l}),this.client.logger.error(l)}},this.onSessionRequestResponse=(e,t)=>{const{id:s}=t,i=g(\"session_request\",s);if(this.events.listenerCount(i)===0)throw new Error(`emitting ${i} without any listeners`);K(t)?this.events.emit(g(\"session_request\",s),{result:t.result}):U(t)&&this.events.emit(g(\"session_request\",s),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:s,params:i}=t;try{const r=`${e}_session_event_${i.event.name}`,n=re.get(r);if(n&&this.isRequestOutOfSync(n,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidEmit(I({topic:e},i)),this.client.events.emit(\"session_event\",{id:s,topic:e,params:i}),re.set(r,s)}catch(r){await this.sendError({id:s,topic:e,error:r}),this.client.logger.error(r)}},this.onSessionAuthenticateResponse=(e,t)=>{const{id:s}=t;this.client.logger.trace({type:\"method\",method:\"onSessionAuthenticateResponse\",topic:e,payload:t}),K(t)?this.events.emit(g(\"session_request\",s),{result:t.result}):U(t)&&this.events.emit(g(\"session_request\",s),{error:t.error})},this.onSessionAuthenticateRequest=async e=>{var t;const{topic:s,payload:i,attestation:r,encryptedId:n,transportType:a}=e;try{const{requester:c,authPayload:h,expiryTimestamp:p}=i.params,d=await this.getVerifyContext({attestationId:r,hash:X(JSON.stringify(i)),encryptedId:n,metadata:c.metadata,transportType:a}),l={requester:c,pairingTopic:s,id:i.id,authPayload:h,verifyContext:d,expiryTimestamp:p};await this.setAuthRequest(i.id,{request:l,pairingTopic:s,transportType:a}),a===f.link_mode&&(t=c.metadata.redirect)!=null&&t.universal&&this.client.core.addLinkModeSupportedApp(c.metadata.redirect.universal),this.client.events.emit(\"session_authenticate\",{topic:s,params:i.params,id:i.id,verifyContext:d})}catch(c){this.client.logger.error(c);const h=i.params.requester.publicKey,p=await this.client.core.crypto.generateKeyPair(),d=this.getAppLinkIfEnabled(i.params.requester.metadata,a),l={type:Ae,receiverPublicKey:h,senderPublicKey:p};await this.sendError({id:i.id,topic:s,error:c,encodeOpts:l,rpcOpts:v.wc_sessionAuthenticate.autoReject,appLink:d})}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:\"fulfilled\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=x.idle,this.processSessionRequestQueue()},tt(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{const s=this.client.core.history.pending;s.length>0&&s.filter(i=>i.topic===e&&i.request.method===\"wc_sessionRequest\").forEach(i=>{const r=i.request.id,n=g(\"session_request\",r);if(this.events.listenerCount(n)===0)throw new Error(`emitting ${n} without any listeners`);this.events.emit(g(\"session_request\",i.request.id),{error:t})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===x.active){this.client.logger.info(\"session request queue is already active.\");return}const e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info(\"session request queue is empty.\");return}try{this.sessionRequestQueue.state=x.active,this.emitSessionRequest(e)}catch(t){this.client.logger.error(t)}},this.emitSessionRequest=e=>{this.client.events.emit(\"session_request\",e)},this.onPairingCreated=e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;const t=this.client.proposal.getAll().find(s=>s.pairingTopic===e.topic);t&&this.onSessionProposeRequest({topic:e.topic,payload:ge(\"wc_sessionPropose\",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id)})},this.isValidConnect=async e=>{if(!L(e)){const{message:a}=u(\"MISSING_OR_INVALID\",`connect() params: ${JSON.stringify(e)}`);throw new Error(a)}const{pairingTopic:t,requiredNamespaces:s,optionalNamespaces:i,sessionProperties:r,relays:n}=e;if(ne(t)||await this.isValidPairingTopic(t),!kt(n,!0)){const{message:a}=u(\"MISSING_OR_INVALID\",`connect() relays: ${n}`);throw new Error(a)}!ne(s)&&Xe(s)!==0&&this.validateNamespaces(s,\"requiredNamespaces\"),!ne(i)&&Xe(i)!==0&&this.validateNamespaces(i,\"optionalNamespaces\"),ne(r)||this.validateSessionProps(r,\"sessionProperties\")},this.validateNamespaces=(e,t)=>{const s=$t(e,\"connect()\",t);if(s)throw new Error(s.message)},this.isValidApprove=async e=>{if(!L(e))throw new Error(u(\"MISSING_OR_INVALID\",`approve() params: ${e}`).message);const{id:t,namespaces:s,relayProtocol:i,sessionProperties:r}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);const n=this.client.proposal.get(t),a=Oe(s,\"approve()\");if(a)throw new Error(a.message);const c=Je(n.requiredNamespaces,s,\"approve()\");if(c)throw new Error(c.message);if(!k(i,!0)){const{message:h}=u(\"MISSING_OR_INVALID\",`approve() relayProtocol: ${i}`);throw new Error(h)}ne(r)||this.validateSessionProps(r,\"sessionProperties\")},this.isValidReject=async e=>{if(!L(e)){const{message:i}=u(\"MISSING_OR_INVALID\",`reject() params: ${e}`);throw new Error(i)}const{id:t,reason:s}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!Kt(s)){const{message:i}=u(\"MISSING_OR_INVALID\",`reject() reason: ${JSON.stringify(s)}`);throw new Error(i)}},this.isValidSessionSettleRequest=e=>{if(!L(e)){const{message:c}=u(\"MISSING_OR_INVALID\",`onSessionSettleRequest() params: ${e}`);throw new Error(c)}const{relay:t,controller:s,namespaces:i,expiry:r}=e;if(!Ut(t)){const{message:c}=u(\"MISSING_OR_INVALID\",\"onSessionSettleRequest() relay protocol should be a string\");throw new Error(c)}const n=Gt(s,\"onSessionSettleRequest()\");if(n)throw new Error(n.message);const a=Oe(i,\"onSessionSettleRequest()\");if(a)throw new Error(a.message);if(J(r)){const{message:c}=u(\"EXPIRED\",\"onSessionSettleRequest()\");throw new Error(c)}},this.isValidUpdate=async e=>{if(!L(e)){const{message:a}=u(\"MISSING_OR_INVALID\",`update() params: ${e}`);throw new Error(a)}const{topic:t,namespaces:s}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const i=this.client.session.get(t),r=Oe(s,\"update()\");if(r)throw new Error(r.message);const n=Je(i.requiredNamespaces,s,\"update()\");if(n)throw new Error(n.message)},this.isValidExtend=async e=>{if(!L(e)){const{message:s}=u(\"MISSING_OR_INVALID\",`extend() params: ${e}`);throw new Error(s)}const{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!L(e)){const{message:a}=u(\"MISSING_OR_INVALID\",`request() params: ${e}`);throw new Error(a)}const{topic:t,request:s,chainId:i,expiry:r}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const{namespaces:n}=this.client.session.get(t);if(!Be(n,i)){const{message:a}=u(\"MISSING_OR_INVALID\",`request() chainId: ${i}`);throw new Error(a)}if(!jt(s)){const{message:a}=u(\"MISSING_OR_INVALID\",`request() ${JSON.stringify(s)}`);throw new Error(a)}if(!Ft(n,i,s.method)){const{message:a}=u(\"MISSING_OR_INVALID\",`request() method: ${s.method}`);throw new Error(a)}if(r&&!Qt(r,me)){const{message:a}=u(\"MISSING_OR_INVALID\",`request() expiry: ${r}. Expiry must be a number (in seconds) between ${me.min} and ${me.max}`);throw new Error(a)}},this.isValidRespond=async e=>{var t;if(!L(e)){const{message:r}=u(\"MISSING_OR_INVALID\",`respond() params: ${e}`);throw new Error(r)}const{topic:s,response:i}=e;try{await this.isValidSessionTopic(s)}catch(r){throw(t=e?.response)!=null&&t.id&&this.cleanupAfterResponse(e),r}if(!zt(i)){const{message:r}=u(\"MISSING_OR_INVALID\",`respond() response: ${JSON.stringify(i)}`);throw new Error(r)}},this.isValidPing=async e=>{if(!L(e)){const{message:s}=u(\"MISSING_OR_INVALID\",`ping() params: ${e}`);throw new Error(s)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!L(e)){const{message:n}=u(\"MISSING_OR_INVALID\",`emit() params: ${e}`);throw new Error(n)}const{topic:t,event:s,chainId:i}=e;await this.isValidSessionTopic(t);const{namespaces:r}=this.client.session.get(t);if(!Be(r,i)){const{message:n}=u(\"MISSING_OR_INVALID\",`emit() chainId: ${i}`);throw new Error(n)}if(!Ht(s)){const{message:n}=u(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(s)}`);throw new Error(n)}if(!Yt(r,i,s.name)){const{message:n}=u(\"MISSING_OR_INVALID\",`emit() event: ${JSON.stringify(s)}`);throw new Error(n)}},this.isValidDisconnect=async e=>{if(!L(e)){const{message:s}=u(\"MISSING_OR_INVALID\",`disconnect() params: ${e}`);throw new Error(s)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidAuthenticate=e=>{const{chains:t,uri:s,domain:i,nonce:r}=e;if(!Array.isArray(t)||t.length===0)throw new Error(\"chains is required and must be a non-empty array\");if(!k(s,!1))throw new Error(\"uri is required parameter\");if(!k(i,!1))throw new Error(\"domain is required parameter\");if(!k(r,!1))throw new Error(\"nonce is required parameter\");if([...new Set(t.map(a=>Ne(a).namespace))].length>1)throw new Error(\"Multi-namespace requests are not supported. Please request single namespace only.\");const{namespace:n}=Ne(t[0]);if(n!==\"eip155\")throw new Error(\"Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.\")},this.getVerifyContext=async e=>{const{attestationId:t,hash:s,encryptedId:i,metadata:r,transportType:n}=e,a={verified:{verifyUrl:r.verifyUrl||It,validation:\"UNKNOWN\",origin:r.url||\"\"}};try{if(n===f.link_mode){const h=this.getAppLinkIfEnabled(r,n);return a.verified.validation=h&&new URL(h).origin===new URL(r.url).origin?\"VALID\":\"INVALID\",a}const c=await this.client.core.verify.resolve({attestationId:t,hash:s,encryptedId:i,verifyUrl:r.verifyUrl});c&&(a.verified.origin=c.origin,a.verified.isScam=c.isScam,a.verified.validation=c.origin===new URL(r.url).origin?\"VALID\":\"INVALID\")}catch(c){this.client.logger.warn(c)}return this.client.logger.debug(`Verify context: ${JSON.stringify(a)}`),a},this.validateSessionProps=(e,t)=>{Object.values(e).forEach(s=>{if(!k(s,!1)){const{message:i}=u(\"MISSING_OR_INVALID\",`${t} must be in Record format. Received: ${JSON.stringify(s)}`);throw new Error(i)}})},this.getPendingAuthRequest=e=>{const t=this.client.auth.requests.get(e);return typeof t==\"object\"?t:void 0},this.addToRecentlyDeleted=(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let s=0;const i=this.recentlyDeletedLimit/2;for(const r of this.recentlyDeletedMap.keys()){if(s++>=i)break;this.recentlyDeletedMap.delete(r)}}},this.checkRecentlyDeleted=e=>{const t=this.recentlyDeletedMap.get(e);if(t){const{message:s}=u(\"MISSING_OR_INVALID\",`Record was recently deleted - ${t}: ${e}`);throw new Error(s)}},this.isLinkModeEnabled=(e,t)=>{var s,i,r,n,a,c,h,p,d;return!e||t!==f.link_mode?!1:((i=(s=this.client.metadata)==null?void 0:s.redirect)==null?void 0:i.linkMode)===!0&&((n=(r=this.client.metadata)==null?void 0:r.redirect)==null?void 0:n.universal)!==void 0&&((c=(a=this.client.metadata)==null?void 0:a.redirect)==null?void 0:c.universal)!==\"\"&&((h=e?.redirect)==null?void 0:h.universal)!==void 0&&((p=e?.redirect)==null?void 0:p.universal)!==\"\"&&((d=e?.redirect)==null?void 0:d.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&typeof(global==null?void 0:global.Linking)<\"u\"},this.getAppLinkIfEnabled=(e,t)=>{var s;return this.isLinkModeEnabled(e,t)?(s=e?.redirect)==null?void 0:s.universal:void 0},this.handleLinkModeMessage=({url:e})=>{if(!e||!e.includes(\"wc_ev\")||!e.includes(\"topic\"))return;const t=We(e,\"topic\")||\"\",s=decodeURIComponent(We(e,\"wc_ev\")||\"\"),i=this.client.session.keys.includes(t);i&&this.client.session.update(t,{transportType:f.link_mode}),this.client.core.dispatchEnvelope({topic:t,message:s,sessionExists:i})},this.registerLinkModeListeners=async()=>{var e;if(Xt()||Jt()&&(e=this.client.metadata.redirect)!=null&&e.linkMode){const t=global==null?void 0:global.Linking;if(typeof t<\"u\"){t.addEventListener(\"url\",this.handleLinkModeMessage,this.client.name);const s=await t.getInitialURL();s&&setTimeout(()=>{this.handleLinkModeMessage({url:s})},50)}}}}isInitialized(){if(!this.initialized){const{message:o}=u(\"NOT_INITIALIZED\",this.name);throw new Error(o)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ue.message,o=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(o):this.onRelayMessage(o)})}async onRelayMessage(o){const{topic:e,message:t,attestation:s,transportType:i}=o,{publicKey:r}=this.client.auth.authKeys.keys.includes(ae)?this.client.auth.authKeys.get(ae):{responseTopic:void 0,publicKey:void 0},n=await this.client.core.crypto.decode(e,t,{receiverPublicKey:r,encoding:i===f.link_mode?ie:de});try{os(n)?(this.client.core.history.set(e,n),this.onRelayEventRequest({topic:e,payload:n,attestation:s,transportType:i,encryptedId:X(t)})):as(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:e,payload:n,transportType:i}),this.client.core.history.delete(e,n.id)):this.onRelayEventUnknownPayload({topic:e,payload:n,transportType:i})}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(ft.expired,async o=>{const{topic:e,id:t}=Bt(o.target);if(t&&this.client.pendingRequest.keys.includes(t))return await this.deletePendingSessionRequest(t,u(\"EXPIRED\"),!0);if(t&&this.client.auth.requests.keys.includes(t))return await this.deletePendingAuthRequest(t,u(\"EXPIRED\"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession({topic:e,expirerHasDeleted:!0}),this.client.events.emit(\"session_expire\",{topic:e})):t&&(await this.deleteProposal(t,!0),this.client.events.emit(\"proposal_expire\",{id:t}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ge.create,o=>this.onPairingCreated(o)),this.client.core.pairing.events.on(Ge.delete,o=>{this.addToRecentlyDeleted(o.topic,\"pairing\")})}isValidPairingTopic(o){if(!k(o,!1)){const{message:e}=u(\"MISSING_OR_INVALID\",`pairing topic should be a string: ${o}`);throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(o)){const{message:e}=u(\"NO_MATCHING_KEY\",`pairing topic doesn't exist: ${o}`);throw new Error(e)}if(J(this.client.core.pairing.pairings.get(o).expiry)){const{message:e}=u(\"EXPIRED\",`pairing topic: ${o}`);throw new Error(e)}}async isValidSessionTopic(o){if(!k(o,!1)){const{message:e}=u(\"MISSING_OR_INVALID\",`session topic should be a string: ${o}`);throw new Error(e)}if(this.checkRecentlyDeleted(o),!this.client.session.keys.includes(o)){const{message:e}=u(\"NO_MATCHING_KEY\",`session topic doesn't exist: ${o}`);throw new Error(e)}if(J(this.client.session.get(o).expiry)){await this.deleteSession({topic:o});const{message:e}=u(\"EXPIRED\",`session topic: ${o}`);throw new Error(e)}if(!this.client.core.crypto.keychain.has(o)){const{message:e}=u(\"MISSING_OR_INVALID\",`session topic does not exist in keychain: ${o}`);throw await this.deleteSession({topic:o}),new Error(e)}}async isValidSessionOrPairingTopic(o){if(this.checkRecentlyDeleted(o),this.client.session.keys.includes(o))await this.isValidSessionTopic(o);else if(this.client.core.pairing.pairings.keys.includes(o))this.isValidPairingTopic(o);else if(k(o,!1)){const{message:e}=u(\"NO_MATCHING_KEY\",`session or pairing topic doesn't exist: ${o}`);throw new Error(e)}else{const{message:e}=u(\"MISSING_OR_INVALID\",`session or pairing topic should be a string: ${o}`);throw new Error(e)}}async isValidProposalId(o){if(!Wt(o)){const{message:e}=u(\"MISSING_OR_INVALID\",`proposal id should be a number: ${o}`);throw new Error(e)}if(!this.client.proposal.keys.includes(o)){const{message:e}=u(\"NO_MATCHING_KEY\",`proposal id doesn't exist: ${o}`);throw new Error(e)}if(J(this.client.proposal.get(o).expiryTimestamp)){await this.deleteProposal(o);const{message:e}=u(\"EXPIRED\",`proposal id: ${o}`);throw new Error(e)}}}class Ss extends H{constructor(o,e){super(o,e,st,ye),this.core=o,this.logger=e}}class yt extends H{constructor(o,e){super(o,e,rt,ye),this.core=o,this.logger=e}}class Is extends H{constructor(o,e){super(o,e,ot,ye,t=>t.id),this.core=o,this.logger=e}}class fs extends H{constructor(o,e){super(o,e,pt,oe,()=>ae),this.core=o,this.logger=e}}class vs extends H{constructor(o,e){super(o,e,ht,oe),this.core=o,this.logger=e}}class qs extends H{constructor(o,e){super(o,e,dt,oe,t=>t.id),this.core=o,this.logger=e}}class Ts{constructor(o,e){this.core=o,this.logger=e,this.authKeys=new fs(this.core,this.logger),this.pairingTopics=new vs(this.core,this.logger),this.requests=new qs(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class _e extends At{constructor(o){super(o),this.protocol=be,this.version=Ce,this.name=we.name,this.events=new ts,this.on=(t,s)=>this.events.on(t,s),this.once=(t,s)=>this.events.once(t,s),this.off=(t,s)=>this.events.off(t,s),this.removeListener=(t,s)=>this.events.removeListener(t,s),this.removeAllListeners=t=>this.events.removeAllListeners(t),this.connect=async t=>{try{return await this.engine.connect(t)}catch(s){throw this.logger.error(s.message),s}},this.pair=async t=>{try{return await this.engine.pair(t)}catch(s){throw this.logger.error(s.message),s}},this.approve=async t=>{try{return await this.engine.approve(t)}catch(s){throw this.logger.error(s.message),s}},this.reject=async t=>{try{return await this.engine.reject(t)}catch(s){throw this.logger.error(s.message),s}},this.update=async t=>{try{return await this.engine.update(t)}catch(s){throw this.logger.error(s.message),s}},this.extend=async t=>{try{return await this.engine.extend(t)}catch(s){throw this.logger.error(s.message),s}},this.request=async t=>{try{return await this.engine.request(t)}catch(s){throw this.logger.error(s.message),s}},this.respond=async t=>{try{return await this.engine.respond(t)}catch(s){throw this.logger.error(s.message),s}},this.ping=async t=>{try{return await this.engine.ping(t)}catch(s){throw this.logger.error(s.message),s}},this.emit=async t=>{try{return await this.engine.emit(t)}catch(s){throw this.logger.error(s.message),s}},this.disconnect=async t=>{try{return await this.engine.disconnect(t)}catch(s){throw this.logger.error(s.message),s}},this.find=t=>{try{return this.engine.find(t)}catch(s){throw this.logger.error(s.message),s}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(t){throw this.logger.error(t.message),t}},this.authenticate=async(t,s)=>{try{return await this.engine.authenticate(t,s)}catch(i){throw this.logger.error(i.message),i}},this.formatAuthMessage=t=>{try{return this.engine.formatAuthMessage(t)}catch(s){throw this.logger.error(s.message),s}},this.approveSessionAuthenticate=async t=>{try{return await this.engine.approveSessionAuthenticate(t)}catch(s){throw this.logger.error(s.message),s}},this.rejectSessionAuthenticate=async t=>{try{return await this.engine.rejectSessionAuthenticate(t)}catch(s){throw this.logger.error(s.message),s}},this.name=o?.name||we.name,this.metadata=o?.metadata||Zt(),this.signConfig=o?.signConfig;const e=typeof o?.logger<\"u\"&&typeof o?.logger!=\"string\"?o.logger:qt(Tt({level:o?.logger||we.logger}));this.core=o?.core||new vt(o),this.logger=Nt(e,this.name),this.session=new yt(this.core,this.logger),this.proposal=new Ss(this.core,this.logger),this.pendingRequest=new Is(this.core,this.logger),this.engine=new Rs(this),this.auth=new Ts(this.core,this.logger)}static async init(o){const e=new _e(o);return await e.initialize(),e}get context(){return Pt(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\"Initialized\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info(\"SignClient Initialization Success\"),this.engine.processRelayMessageCache()}catch(o){throw this.logger.info(\"SignClient Initialization Failure\"),this.logger.error(o.message),o}}}const Ns=yt,Ps=_e;export{lt as AUTH_CONTEXT,pt as AUTH_KEYS_CONTEXT,ht as AUTH_PAIRING_TOPIC_CONTEXT,ct as AUTH_PROTOCOL,ae as AUTH_PUBLIC_KEY_NAME,dt as AUTH_REQUEST_CONTEXT,oe as AUTH_STORAGE_PREFIX,gs as AUTH_VERSION,nt as ENGINE_CONTEXT,x as ENGINE_QUEUE_STATES,v as ENGINE_RPC_OPTS,hs as HISTORY_CONTEXT,ps as HISTORY_EVENTS,ds as HISTORY_STORAGE_VERSION,at as METHODS_TO_VERIFY,st as PROPOSAL_CONTEXT,us as PROPOSAL_EXPIRY,it as PROPOSAL_EXPIRY_MESSAGE,ot as REQUEST_CONTEXT,rt as SESSION_CONTEXT,z as SESSION_EXPIRY,me as SESSION_REQUEST_EXPIRY_BOUNDARIES,Le as SIGN_CLIENT_CONTEXT,we as SIGN_CLIENT_DEFAULT,cs as SIGN_CLIENT_EVENTS,be as SIGN_CLIENT_PROTOCOL,ls as SIGN_CLIENT_STORAGE_OPTIONS,ye as SIGN_CLIENT_STORAGE_PREFIX,Ce as SIGN_CLIENT_VERSION,Ns as SessionStore,Ps as SignClient,xe as WALLETCONNECT_DEEPLINK_CHOICE,_e as default};\n//# sourceMappingURL=index.es.js.map\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

      ' + func(text) + '

      ';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

      fred, barney, & pebbles

      '\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '